hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 248 | max_issues_repo_name stringlengths 5 125 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 248 | max_forks_repo_name stringlengths 5 125 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
658173776bf6e1aa6395db9260e9462745880428 | 28,191 | py | Python | dataloader/data.py | yuhogun0908/Forward-Convolutive-Prediction | 11dea881b70daf45fa2c39883a601c613e2e53f2 | [
"MIT"
] | 3 | 2022-02-27T12:12:31.000Z | 2022-03-18T07:01:20.000Z | dataloader/data.py | ishine/Forward-Convolutive-Prediction | 11dea881b70daf45fa2c39883a601c613e2e53f2 | [
"MIT"
] | null | null | null | dataloader/data.py | ishine/Forward-Convolutive-Prediction | 11dea881b70daf45fa2c39883a601c613e2e53f2 | [
"MIT"
] | 1 | 2021-12-07T01:18:10.000Z | 2021-12-07T01:18:10.000Z | import numpy as np
import os
import torch
import torch.utils.data as data
import pdb
import pickle
from pathlib import Path
from scipy import signal
import librosa
import scipy
from itertools import permutations
from numpy.linalg import solve
import numpy as np
import soundfile as sf
from convolutive_prediction import ... | 47.943878 | 196 | 0.545564 | 27,862 | 0.987559 | 0 | 0 | 0 | 0 | 0 | 0 | 7,428 | 0.263283 |
6582ec795f9be718fba1c563c5c66e44261c6ce1 | 3,053 | py | Python | tests/bugs/core_4160_test.py | reevespaul/firebird-qa | 98f16f425aa9ab8ee63b86172f959d63a2d76f21 | [
"MIT"
] | null | null | null | tests/bugs/core_4160_test.py | reevespaul/firebird-qa | 98f16f425aa9ab8ee63b86172f959d63a2d76f21 | [
"MIT"
] | null | null | null | tests/bugs/core_4160_test.py | reevespaul/firebird-qa | 98f16f425aa9ab8ee63b86172f959d63a2d76f21 | [
"MIT"
] | null | null | null | #coding:utf-8
#
# id: bugs.core_4160
# title: Parameterized exception does not accept not ASCII characters as parameter
# decription:
# tracker_id: CORE-4160
# min_versions: ['3.0']
# versions: 3.0
# qmid: None
import pytest
from firebird.qa import db_factory, isql_act, Action
# vers... | 31.802083 | 113 | 0.681625 | 0 | 0 | 0 | 0 | 183 | 0.057385 | 0 | 0 | 2,700 | 0.84666 |
658406b3a8a1489ae1dff93411406c5f22d90b10 | 784 | py | Python | 12_TreeClassification3D/main.py | ManMohan291/PyProgram | edcaa927bd70676bd14355acad7262ae2d32b8e5 | [
"MIT"
] | 2 | 2018-09-07T17:44:54.000Z | 2018-09-07T17:44:57.000Z | 12_TreeClassification3D/main.py | ManMohan291/PyProgram | edcaa927bd70676bd14355acad7262ae2d32b8e5 | [
"MIT"
] | null | null | null | 12_TreeClassification3D/main.py | ManMohan291/PyProgram | edcaa927bd70676bd14355acad7262ae2d32b8e5 | [
"MIT"
] | null | null | null | import TreeClassification as T
T.clearScreen()
dataTraining= T.loadData("dataTraining.txt")
X=dataTraining[:,0:3]
y=dataTraining[:,3:4]
Threshold=30
#Training
TrainedTree = T.SplitTree(X, y,ThresholdCount=Threshold)
newX,newY=T.PredictTree(X,y,TrainedTree)
#CheckAccuracy
Xy=T.concatenateVectors(X,y) ... | 20.631579 | 110 | 0.732143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 195 | 0.248724 |
6584791fe17e82f5787899fa97ce0db3fa35bfb0 | 1,535 | py | Python | uhelpers/tests/test_archive_helpers.py | Johannes-Sahlmann/uhelpers | 58f8e25ef8644ab5b24a5be76fd58a338a400912 | [
"BSD-3-Clause"
] | null | null | null | uhelpers/tests/test_archive_helpers.py | Johannes-Sahlmann/uhelpers | 58f8e25ef8644ab5b24a5be76fd58a338a400912 | [
"BSD-3-Clause"
] | 2 | 2020-12-21T18:08:48.000Z | 2021-01-26T01:24:39.000Z | uhelpers/tests/test_archive_helpers.py | Johannes-Sahlmann/uhelpers | 58f8e25ef8644ab5b24a5be76fd58a338a400912 | [
"BSD-3-Clause"
] | 5 | 2019-10-02T14:16:15.000Z | 2021-12-27T18:46:18.000Z | #!/usr/bin/env python
"""Tests for the jwcf hawki module.
Authors
-------
Johannes Sahlmann
"""
import netrc
import os
from astropy.table import Table
import pytest
from ..archive_helpers import get_exoplanet_orbit_database, gacs_list_query
local_dir = os.path.dirname(os.path.abspath(__file__))
ON_TRAVIS = os... | 29.519231 | 104 | 0.70684 | 0 | 0 | 0 | 0 | 1,178 | 0.767427 | 0 | 0 | 437 | 0.284691 |
6584f2d684176e56a028fa83fba17e1495411607 | 1,264 | py | Python | TP3/test.py | paul-arthurthiery/IAMethodesAlgos | f49fe17c278424588df263ab0e6778721cbc4394 | [
"MIT"
] | null | null | null | TP3/test.py | paul-arthurthiery/IAMethodesAlgos | f49fe17c278424588df263ab0e6778721cbc4394 | [
"MIT"
] | null | null | null | TP3/test.py | paul-arthurthiery/IAMethodesAlgos | f49fe17c278424588df263ab0e6778721cbc4394 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sun Dec 2 14:33:13 2018
@author: Nathan
"""
import numpy as np
from sklearn.datasets import load_iris
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import StandardScaler
# load dataset
data,target =load_iris().data,load_... | 26.333333 | 99 | 0.77769 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 431 | 0.340981 |
65850e2ff2df32252ae9c695f9a58c5a8d385efe | 1,013 | py | Python | HUGGINGFACE.py | mkingopng/NBME_score_clinical_patient_notes | 4ca9816be2665d7585ab0d168376a340aa800088 | [
"MIT"
] | 1 | 2022-03-27T12:47:25.000Z | 2022-03-27T12:47:25.000Z | HUGGINGFACE.py | mkingopng/NBME_score_clinical_patient_notes | 4ca9816be2665d7585ab0d168376a340aa800088 | [
"MIT"
] | null | null | null | HUGGINGFACE.py | mkingopng/NBME_score_clinical_patient_notes | 4ca9816be2665d7585ab0d168376a340aa800088 | [
"MIT"
] | null | null | null | import os
TRANSFORMERS = '/home/noone/documents/github/transformers'
TOKENIZERS = '/home/noone/documents/github/tokenizers'
DATASETS = '/home/noone/documents/github/datasets'
MODELS = os.path.join(TRANSFORMERS, 'src/transformers/models')
DEBERTA_V2 = os.path.join(MODELS, 'deberta_v2')
DEBERTA_V3 = os.path.join(MO... | 22.021739 | 64 | 0.699901 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 781 | 0.770977 |
65852219b6e7161ca8a0d874955000bd7586ea4b | 830 | py | Python | Curso_em_Video_Exercicios/ex068.py | Cohuzer/Exercicios-do-Curso-em-Video | 879cbb53c54ba226e12d9972bc28eadcd521fc10 | [
"MIT"
] | null | null | null | Curso_em_Video_Exercicios/ex068.py | Cohuzer/Exercicios-do-Curso-em-Video | 879cbb53c54ba226e12d9972bc28eadcd521fc10 | [
"MIT"
] | null | null | null | Curso_em_Video_Exercicios/ex068.py | Cohuzer/Exercicios-do-Curso-em-Video | 879cbb53c54ba226e12d9972bc28eadcd521fc10 | [
"MIT"
] | null | null | null | #Par ou Impar- para qnd o jogador perder e mostra o tanto de vitoria consecutivas
from random import randint
c = 0
while True:
print('\033[1;33m-' * 30)
n = int(input('ESCOLHA UM NÚMERO: '))
e = str(input('PAR OU IMPAR? ')).strip().upper()[0]
print('-' * 30)
j = randint(0, 10)
if e == 'P':
... | 33.2 | 96 | 0.503614 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 367 | 0.437426 |
65870cdea10ace0d94e2b600195f694036787b41 | 1,727 | py | Python | tests/test_write.py | AlexsanderShaw/libdesock | 5945a5ab0f002078fc6eaaf7e20e2b7b66c67086 | [
"MIT"
] | 88 | 2022-02-26T20:59:53.000Z | 2022-03-21T21:29:09.000Z | tests/test_write.py | fkie-cad/libdesock | 3d20862e9cfd18e20bdeb599ab2f39e20e94373c | [
"MIT"
] | null | null | null | tests/test_write.py | fkie-cad/libdesock | 3d20862e9cfd18e20bdeb599ab2f39e20e94373c | [
"MIT"
] | 7 | 2022-02-27T01:42:00.000Z | 2022-03-07T03:06:32.000Z | """
This file tests that sendmmsg works correctly.
Target files:
- libdesock/src/write.c
"""
import ctypes
import desock
import helper
data = bytes(range(65, 115))
cursor = 0
def _get_data(size):
global cursor
ret = bytes(data[cursor: cursor + size])
assert(len(ret) == size)
cursor += size
r... | 27.854839 | 112 | 0.643891 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 97 | 0.056167 |
6587d36784219790a446003c11e770c4bed4d07f | 8,409 | py | Python | ratin_cpython/common/common.py | openearth/eo-rivers | 752f90aed92fa862a2c107bb58bcae298c1bf313 | [
"MIT"
] | 2 | 2018-10-19T03:20:08.000Z | 2020-05-06T22:56:20.000Z | ratin_cpython/common/common.py | openearth/eo-river | 752f90aed92fa862a2c107bb58bcae298c1bf313 | [
"MIT"
] | 11 | 2018-06-05T09:41:15.000Z | 2021-11-15T17:47:27.000Z | ratin_cpython/common/common.py | openearth/eo-rivers | 752f90aed92fa862a2c107bb58bcae298c1bf313 | [
"MIT"
] | 2 | 2020-10-15T12:29:36.000Z | 2021-12-13T22:53:58.000Z | import numpy as np
from math import factorial
import scipy.signal
#Gaussian filter with convolution - faster and easier to handle
## Degree is equal to the number of values left and right of the central value
## of the gaussian window:
## ie degree=3 yields a window of length 7
## It uses normalized weights (sum of ... | 35.331933 | 97 | 0.631704 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,277 | 0.389702 |
658815cb00ae7e0794df13b589c297b74cf7ffbd | 3,879 | py | Python | discordbot/stocks/technical_analysis/rsi.py | Aerex/GamestonkTerminal | 680e0cd278f0d8e45031cdc9d51f247e9aa90ce1 | [
"MIT"
] | 3 | 2021-02-28T09:54:47.000Z | 2021-03-11T17:42:35.000Z | discordbot/stocks/technical_analysis/rsi.py | Aerex/GamestonkTerminal | 680e0cd278f0d8e45031cdc9d51f247e9aa90ce1 | [
"MIT"
] | 3 | 2022-02-28T03:37:52.000Z | 2022-02-28T03:37:53.000Z | discordbot/stocks/technical_analysis/rsi.py | Aerex/GamestonkTerminal | 680e0cd278f0d8e45031cdc9d51f247e9aa90ce1 | [
"MIT"
] | 1 | 2021-11-20T16:09:48.000Z | 2021-11-20T16:09:48.000Z | import os
from datetime import datetime, timedelta
import discord
from matplotlib import pyplot as plt
import discordbot.config_discordbot as cfg
from discordbot.run_discordbot import gst_imgur
import discordbot.helpers
from gamestonk_terminal.helper_funcs import plot_autoscale
from gamestonk_terminal.common.technica... | 34.026316 | 85 | 0.60299 | 0 | 0 | 0 | 0 | 0 | 0 | 3,471 | 0.894818 | 651 | 0.167827 |
65894aac96ac4562697b30a8369779ac8960ace4 | 5,011 | py | Python | train.py | xushenkun/vae | 35e136257e5a3122b92dff9961dd08585b7cce2d | [
"MIT"
] | 1 | 2020-09-19T00:03:59.000Z | 2020-09-19T00:03:59.000Z | train.py | xushenkun/vae | 35e136257e5a3122b92dff9961dd08585b7cce2d | [
"MIT"
] | null | null | null | train.py | xushenkun/vae | 35e136257e5a3122b92dff9961dd08585b7cce2d | [
"MIT"
] | null | null | null | import argparse
import os
import shutil
import numpy as np
import torch as t
from torch.optim import Adam
from utils.batch_loader import BatchLoader
from utils.parameters import Parameters
from model.rvae_dilated import RVAE_dilated
if __name__ == "__main__":
parser = argparse.ArgumentParser(description='RV... | 43.95614 | 136 | 0.631411 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 882 | 0.176013 |
658c87d29e07d35154d2bbcefbc473d8ad660860 | 1,152 | py | Python | renovation_core_graphql/auth/otp.py | e-lobo/renovation_core_graphql | 31e464e00badc308bf03c70364331b08ad9d1b1d | [
"MIT"
] | 1 | 2021-12-15T06:05:06.000Z | 2021-12-15T06:05:06.000Z | renovation_core_graphql/auth/otp.py | e-lobo/renovation_core_graphql | 31e464e00badc308bf03c70364331b08ad9d1b1d | [
"MIT"
] | 5 | 2021-06-09T19:00:56.000Z | 2022-01-23T09:51:13.000Z | renovation_core_graphql/auth/otp.py | e-lobo/renovation_core_graphql | 31e464e00badc308bf03c70364331b08ad9d1b1d | [
"MIT"
] | 1 | 2021-06-01T05:22:41.000Z | 2021-06-01T05:22:41.000Z | from graphql import GraphQLResolveInfo
import frappe
from renovation_core.utils.auth import generate_otp, verify_otp
VERIFY_OTP_STATUS_MAP = {
"no_linked_user": "NO_LINKED_USER",
"no_otp_for_mobile": "NO_OTP_GENERATED",
"invalid_otp": "INVALID_OTP",
"verified": "VERIFIED",
}
def generate_otp_resol... | 29.538462 | 84 | 0.703993 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 244 | 0.211806 |
658d5e23890b80d2c423a20bb23bdcaa811dcbe7 | 6,050 | py | Python | solaris/utils/core.py | mananeau/solaris | ca000e8a255bd792ff3f192a6350ff8cace3d050 | [
"Apache-2.0"
] | null | null | null | solaris/utils/core.py | mananeau/solaris | ca000e8a255bd792ff3f192a6350ff8cace3d050 | [
"Apache-2.0"
] | null | null | null | solaris/utils/core.py | mananeau/solaris | ca000e8a255bd792ff3f192a6350ff8cace3d050 | [
"Apache-2.0"
] | null | null | null | import os
import numpy as np
from shapely.wkt import loads
from shapely.geometry import Point
from shapely.geometry.base import BaseGeometry
import pandas as pd
import geopandas as gpd
import rasterio
import skimage
from fiona._err import CPLE_OpenFailedError
from fiona.errors import DriverError
from warnings import wa... | 35.798817 | 79 | 0.624793 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,606 | 0.430744 |
658e190370f91502c18753af3de961237b0e0150 | 129 | py | Python | model/__init__.py | Pearl-UTexas/DUST-net | debea05a04e9340109176c7803909b50f84892ba | [
"MIT"
] | null | null | null | model/__init__.py | Pearl-UTexas/DUST-net | debea05a04e9340109176c7803909b50f84892ba | [
"MIT"
] | null | null | null | model/__init__.py | Pearl-UTexas/DUST-net | debea05a04e9340109176c7803909b50f84892ba | [
"MIT"
] | null | null | null | from .von_mises_stiefel import *
from .von_mises_fisher import *
from .model import *
from .metrics import *
from .loss import *
| 21.5 | 32 | 0.767442 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
658e27d4f55208e3b1fbe0a8174313df62d9c767 | 980 | py | Python | blog_app/templatetags/blog_app_tags.py | axkiss/FirstBlog | dc4444c70c58647abf733f06bab963eadced646d | [
"Unlicense"
] | null | null | null | blog_app/templatetags/blog_app_tags.py | axkiss/FirstBlog | dc4444c70c58647abf733f06bab963eadced646d | [
"Unlicense"
] | null | null | null | blog_app/templatetags/blog_app_tags.py | axkiss/FirstBlog | dc4444c70c58647abf733f06bab963eadced646d | [
"Unlicense"
] | null | null | null | from django import template
from blog_app.models import Post
from django.utils import timezone
register = template.Library()
@register.simple_tag(name='list_tags')
def get_list_tags(pos, cnt_head_tag, cnt_side_tag):
list_tags = Post.tag.most_common()
if pos == 'head':
return list_tags[:cnt_head_tag]
... | 32.666667 | 82 | 0.720408 | 0 | 0 | 0 | 0 | 848 | 0.865306 | 0 | 0 | 128 | 0.130612 |
658e58ab530a47e10043fd6372afe98be7d02d5f | 3,941 | py | Python | flow/core/azure_blob_filesystem.py | hwknsj/synergy_flow | aba8f57b2cbeeb0368a64eaa7e5369fcef0a3136 | [
"BSD-3-Clause"
] | null | null | null | flow/core/azure_blob_filesystem.py | hwknsj/synergy_flow | aba8f57b2cbeeb0368a64eaa7e5369fcef0a3136 | [
"BSD-3-Clause"
] | 1 | 2016-10-03T18:48:15.000Z | 2019-11-01T21:53:30.000Z | flow/core/azure_blob_filesystem.py | hwknsj/synergy_flow | aba8f57b2cbeeb0368a64eaa7e5369fcef0a3136 | [
"BSD-3-Clause"
] | 1 | 2019-11-02T00:45:26.000Z | 2019-11-02T00:45:26.000Z | __author__ = 'Bohdan Mushkevych'
from os import path
from azure.storage.blob import BlockBlobService
from flow.core.abstract_filesystem import AbstractFilesystem, splitpath
class AzureBlobFilesystem(AbstractFilesystem):
""" implementation of Azure Page Blob filesystem
https://docs.microsoft.com/en-us/azur... | 49.886076 | 148 | 0.713524 | 3,762 | 0.95458 | 0 | 0 | 0 | 0 | 0 | 0 | 363 | 0.092109 |
658f10b8ae6eef666116cd8610e4111c0de53318 | 1,085 | py | Python | asyncworker/types/registry.py | etandel/async-worker | 3cd68e3e4dc3a32d35a4fa67bfd26cf2cfb7e01a | [
"MIT"
] | null | null | null | asyncworker/types/registry.py | etandel/async-worker | 3cd68e3e4dc3a32d35a4fa67bfd26cf2cfb7e01a | [
"MIT"
] | null | null | null | asyncworker/types/registry.py | etandel/async-worker | 3cd68e3e4dc3a32d35a4fa67bfd26cf2cfb7e01a | [
"MIT"
] | null | null | null | from typing import Type, Any, Dict, Optional
class RegistryItem:
def __init__(self, type: Type, value: Any) -> None:
self.type = type
self.value = value
class TypesRegistry:
def __init__(self):
self.__data: Dict[Type, RegistryItem] = {}
self.__by_name: Dict[str, RegistryItem]... | 27.820513 | 80 | 0.564055 | 1,034 | 0.952995 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6590118b6d44f92c7d79cfaff34140de85d60254 | 591 | py | Python | kpe/BertKPE/MyCode/functions/filer/filesaver.py | thunlp/COVID19IRQA | fe359ce12ce38fd74ccc004cc524ec6011580023 | [
"MIT"
] | 32 | 2020-03-26T17:03:54.000Z | 2021-09-10T08:30:48.000Z | kpe/BertKPE/MyCode/functions/filer/filesaver.py | thunlp/COVID19IRQA | fe359ce12ce38fd74ccc004cc524ec6011580023 | [
"MIT"
] | 1 | 2020-04-06T16:35:12.000Z | 2020-04-13T07:08:14.000Z | kpe/BertKPE/MyCode/functions/filer/filesaver.py | thunlp/COVID19IRQA | fe359ce12ce38fd74ccc004cc524ec6011580023 | [
"MIT"
] | 6 | 2020-03-28T05:07:22.000Z | 2021-03-04T01:46:00.000Z | from tqdm import tqdm
import json
import os
def save_jsonl(data_list, filename):
with open(filename, 'w', encoding='utf-8') as fo:
for data in data_list:
fo.write("{}\n".format(json.dumps(data)))
fo.close()
print("Success save file to %s \n" %filename)
def save_json(d... | 25.695652 | 53 | 0.620981 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 0.138748 |
6590b1b797014d04b65cb873f63aee28028c3c0f | 6,563 | py | Python | tests/conftest.py | HenryTraill/morpheus | 6bc095a7734f5f4a48d8556006266bf60ecdba68 | [
"MIT"
] | null | null | null | tests/conftest.py | HenryTraill/morpheus | 6bc095a7734f5f4a48d8556006266bf60ecdba68 | [
"MIT"
] | null | null | null | tests/conftest.py | HenryTraill/morpheus | 6bc095a7734f5f4a48d8556006266bf60ecdba68 | [
"MIT"
] | null | null | null | import asyncio
import pytest
import re
import uuid
from aiohttp.test_utils import teardown_test_loop
from aioredis import create_redis
from arq import ArqRedis, Worker
from atoolbox.db import prepare_database
from atoolbox.db.helpers import DummyPgPool
from atoolbox.test_utils import DummyServer, create_dummy_server
fr... | 32.979899 | 118 | 0.666464 | 0 | 0 | 1,079 | 0.164407 | 5,637 | 0.858906 | 4,179 | 0.636751 | 1,298 | 0.197775 |
65914d3047a8283780b6e3edcde39dc7eb8ebb8b | 477 | py | Python | gratify_proj/gratify_proj/urls.py | ConnorH2582/grat_proj | f59b4a30ef0bef48b81fb75ade92af615b1e3e77 | [
"MIT"
] | null | null | null | gratify_proj/gratify_proj/urls.py | ConnorH2582/grat_proj | f59b4a30ef0bef48b81fb75ade92af615b1e3e77 | [
"MIT"
] | null | null | null | gratify_proj/gratify_proj/urls.py | ConnorH2582/grat_proj | f59b4a30ef0bef48b81fb75ade92af615b1e3e77 | [
"MIT"
] | null | null | null | from django.conf.urls import include, url
from django.contrib import admin
from django.views.generic import View
urlpatterns = [
url(r'^client/', include('client.urls', namespace = 'client', app_name = 'client')),
url(r'^app/', include('app.urls', namespace = 'app', app_name = 'app')),
url('', include('django.... | 31.8 | 85 | 0.685535 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 151 | 0.316562 |
659182ecb712f24f0371757649f6618c51a53b68 | 193 | py | Python | Server/prediction/admin.py | mohanj098/Item-Price-Forecasting | 14fc787ad4d9dcc6af03b43fa5e866cd254a99f5 | [
"MIT"
] | null | null | null | Server/prediction/admin.py | mohanj098/Item-Price-Forecasting | 14fc787ad4d9dcc6af03b43fa5e866cd254a99f5 | [
"MIT"
] | 2 | 2021-03-15T15:53:22.000Z | 2021-05-03T09:32:34.000Z | Server/prediction/admin.py | mohanj098/Item-Price-Forecasting | 14fc787ad4d9dcc6af03b43fa5e866cd254a99f5 | [
"MIT"
] | 1 | 2021-05-04T15:35:06.000Z | 2021-05-04T15:35:06.000Z | from django.contrib import admin
from prediction.models import product
from prediction.models import price
# Register your models here.
admin.site.register(product)
admin.site.register(price)
| 24.125 | 37 | 0.829016 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 28 | 0.145078 |
65923c69268087aca7de1d2a3dc4a13663164289 | 5,813 | py | Python | imutils/big/make_shards.py | JacobARose/image-utils | aa0e005c0b4df5198d188b074f4e21f8d8f97962 | [
"MIT"
] | null | null | null | imutils/big/make_shards.py | JacobARose/image-utils | aa0e005c0b4df5198d188b074f4e21f8d8f97962 | [
"MIT"
] | null | null | null | imutils/big/make_shards.py | JacobARose/image-utils | aa0e005c0b4df5198d188b074f4e21f8d8f97962 | [
"MIT"
] | null | null | null | """
imutils/big/make_shards.py
Generate one or more webdataset-compatible tar archive shards from an image classification dataset.
Based on script: https://github.com/tmbdev-archive/webdataset-examples/blob/7f56e9a8b978254c06aa0a98572a1331968b0eb3/makeshards.py
Added on: Sunday March 6th, 2022
Example usage:
pytho... | 31.085561 | 188 | 0.732152 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,592 | 0.445897 |
65941982873c5bf22451352b6be11931a96f85a2 | 2,917 | py | Python | wetterdienst/util/network.py | meteoDaniel/wetterdienst | 106a2fa9f887983281a6886c15bb3a845850dfb7 | [
"MIT"
] | null | null | null | wetterdienst/util/network.py | meteoDaniel/wetterdienst | 106a2fa9f887983281a6886c15bb3a845850dfb7 | [
"MIT"
] | null | null | null | wetterdienst/util/network.py | meteoDaniel/wetterdienst | 106a2fa9f887983281a6886c15bb3a845850dfb7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2018-2021, earthobservations developers.
# Distributed under the MIT License. See LICENSE for more info.
import os
from io import BytesIO
from typing import List, Optional, Union
from fsspec.implementations.cached import WholeFileCacheFileSystem
from fsspec.implementations.http ... | 31.365591 | 101 | 0.680151 | 1,310 | 0.449092 | 0 | 0 | 1,154 | 0.395612 | 0 | 0 | 869 | 0.297909 |
65941fce079e2342f67bde15c5c07c193940a076 | 2,927 | pyde | Python | mode/examples/Topics/Motion/Reflection1/Reflection1.pyde | kazimuth/processing.py | 9aa1ddf7ebd4efed73a8c2a1ecf6d2c167b1faf1 | [
"Apache-2.0"
] | 4 | 2016-08-09T14:14:36.000Z | 2021-12-10T07:51:35.000Z | mode/examples/Topics/Motion/Reflection1/Reflection1.pyde | kazimuth/processing.py | 9aa1ddf7ebd4efed73a8c2a1ecf6d2c167b1faf1 | [
"Apache-2.0"
] | null | null | null | mode/examples/Topics/Motion/Reflection1/Reflection1.pyde | kazimuth/processing.py | 9aa1ddf7ebd4efed73a8c2a1ecf6d2c167b1faf1 | [
"Apache-2.0"
] | null | null | null | """
Non-orthogonal Reflection
by Ira Greenberg.
Based on the equation (R = 2N(N * L) - L) where R is the reflection vector, N
is the normal, and L is the incident vector.
"""
# Position of left hand side of floor.
base1 = None
# Position of right hand side of floor.
base2 = None
# A list of subpoints along the floo... | 25.232759 | 77 | 0.598223 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 964 | 0.329347 |
6594ce65379700398a3a74c57669881f0dce9a22 | 1,182 | py | Python | linear.py | AliRzvn/HW1 | d6420c1656800372aae78e18327612df540b674e | [
"MIT"
] | null | null | null | linear.py | AliRzvn/HW1 | d6420c1656800372aae78e18327612df540b674e | [
"MIT"
] | null | null | null | linear.py | AliRzvn/HW1 | d6420c1656800372aae78e18327612df540b674e | [
"MIT"
] | null | null | null | import numpy as np
from module import Module
class Linear(Module):
def __init__(self, name, input_dim, output_dim, l2_coef=.0):
super(Linear, self).__init__(name)
self.l2_coef = l2_coef # coefficient of l2 regularization.
self.W = np.random.randn(input_dim, output_dim) # weights of the... | 31.945946 | 80 | 0.600677 | 1,134 | 0.959391 | 0 | 0 | 0 | 0 | 0 | 0 | 610 | 0.516074 |
65958e7861004b1f3934ff47c4a5e6dfe2a86170 | 239 | py | Python | iot/common_functions/all_imports.py | sankaet/IOT-DB | a554f49b9c25ae1a9a91b6a2564489b999da03bd | [
"MIT"
] | 1 | 2016-10-26T23:10:57.000Z | 2016-10-26T23:10:57.000Z | iot/common_functions/all_imports.py | sankaet/IOT-DB | a554f49b9c25ae1a9a91b6a2564489b999da03bd | [
"MIT"
] | null | null | null | iot/common_functions/all_imports.py | sankaet/IOT-DB | a554f49b9c25ae1a9a91b6a2564489b999da03bd | [
"MIT"
] | null | null | null | from pymongo import MongoClient
from bson import ObjectId
from bson.json_util import dumps
from json import loads
client = MongoClient('localhost', 27017)
IOT_DB = client.iot_db
IOT_SCHEMAS = IOT_DB.iot_schemas
IOT_DATA = IOT_DB.iot_data | 23.9 | 40 | 0.820084 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 0.046025 |
6598ac2ebf4cb397f3e2b86a4a598e93fd0dbafd | 659 | py | Python | pages/login_page.py | 0verchenko/PageObject | b50ec33b6f511680e5be14b16c379df825b87285 | [
"Apache-2.0"
] | null | null | null | pages/login_page.py | 0verchenko/PageObject | b50ec33b6f511680e5be14b16c379df825b87285 | [
"Apache-2.0"
] | 1 | 2021-06-02T00:14:07.000Z | 2021-06-02T00:14:07.000Z | pages/login_page.py | 0verchenko/PageObject | b50ec33b6f511680e5be14b16c379df825b87285 | [
"Apache-2.0"
] | null | null | null | from .base_page import BasePage
from .locators import LoginPageLocators
class LoginPage(BasePage):
def should_be_login_page(self):
self.should_be_login_url()
self.should_be_login_form()
self.should_be_register_form()
def should_be_login_url(self):
assert "login" in self.brows... | 29.954545 | 83 | 0.740516 | 584 | 0.886191 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | 0.010622 |
65990aa07c9374074643ecde94fe1aa073f34786 | 4,310 | py | Python | tests/test_schema.py | LeafyLappa/starlette-jsonapi | 1cd7268fe78983c0203e4f65549f974d3f5d968f | [
"MIT"
] | 16 | 2020-07-05T18:12:41.000Z | 2022-03-11T21:12:17.000Z | tests/test_schema.py | LeafyLappa/starlette-jsonapi | 1cd7268fe78983c0203e4f65549f974d3f5d968f | [
"MIT"
] | 25 | 2020-07-04T17:06:40.000Z | 2021-08-18T09:24:30.000Z | tests/test_schema.py | LeafyLappa/starlette-jsonapi | 1cd7268fe78983c0203e4f65549f974d3f5d968f | [
"MIT"
] | 3 | 2020-07-10T14:17:44.000Z | 2021-08-12T11:43:45.000Z | import pytest
from marshmallow_jsonapi import fields
from starlette.applications import Starlette
from starlette_jsonapi.resource import BaseResource
from starlette_jsonapi.schema import JSONAPISchema
def test_schema_urls(app: Starlette):
class TResource(BaseResource):
type_ = 'test-resource'
TResour... | 30.567376 | 120 | 0.542691 | 1,716 | 0.398144 | 0 | 0 | 0 | 0 | 0 | 0 | 1,215 | 0.281903 |
659af9491af7136fafb0016f0624386d06bcfa4b | 3,280 | py | Python | demo/demo/settings.py | ikcam/django-boilerplate | d8253665d74f0f18cf9a5fd46772598a60f20c5c | [
"Apache-2.0"
] | 5 | 2016-10-02T04:57:10.000Z | 2019-08-12T22:22:39.000Z | demo/demo/settings.py | ikcam/django-boilerplate | d8253665d74f0f18cf9a5fd46772598a60f20c5c | [
"Apache-2.0"
] | null | null | null | demo/demo/settings.py | ikcam/django-boilerplate | d8253665d74f0f18cf9a5fd46772598a60f20c5c | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Django settings for demo project.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.9/ref/settings/
"""
# Build paths inside the project like this: os.path.j... | 24.661654 | 71 | 0.690549 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,154 | 0.656707 |
659cc327a8d71d143b1d4f60325b26e2f3b52adc | 818 | py | Python | pem_recover.py | EggPool/gpg-experiments | 82f79fc05dbc745a84b9bb14c60161716cd08756 | [
"MIT"
] | null | null | null | pem_recover.py | EggPool/gpg-experiments | 82f79fc05dbc745a84b9bb14c60161716cd08756 | [
"MIT"
] | null | null | null | pem_recover.py | EggPool/gpg-experiments | 82f79fc05dbc745a84b9bb14c60161716cd08756 | [
"MIT"
] | null | null | null | from Cryptodome.PublicKey import RSA
import hashlib
import json
def recover(key):
private_key_readable = key.exportKey().decode("utf-8")
public_key_readable = key.publickey().exportKey().decode("utf-8")
address = hashlib.sha224(public_key_readable.encode("utf-8")).hexdigest()
wallet_dict = {}
wal... | 30.296296 | 77 | 0.720049 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 186 | 0.227384 |
659cf1416e415156d8b4e266bad74755407e575d | 316 | py | Python | arcade/python/arcade-theCore/06_LabyrinthOfNestedLoops/043_IsPower.py | netor27/codefights-arcade-solutions | 69701ab06d45902c79ec9221137f90b75969d8c8 | [
"MIT"
] | null | null | null | arcade/python/arcade-theCore/06_LabyrinthOfNestedLoops/043_IsPower.py | netor27/codefights-arcade-solutions | 69701ab06d45902c79ec9221137f90b75969d8c8 | [
"MIT"
] | null | null | null | arcade/python/arcade-theCore/06_LabyrinthOfNestedLoops/043_IsPower.py | netor27/codefights-arcade-solutions | 69701ab06d45902c79ec9221137f90b75969d8c8 | [
"MIT"
] | null | null | null | def isPower(n):
'''
Determine if the given number is a power of some non-negative integer.
'''
if n == 1:
return True
sqrt = math.sqrt(n)
for a in range(int(sqrt)+1):
for b in range(2, int(sqrt)+1):
if a ** b == n:
return True
return False | 24.307692 | 74 | 0.506329 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 86 | 0.272152 |
659ffa3c1d30e46aa593ca5d32d54d54bd7d5e35 | 218 | py | Python | plugins/pick/choices.py | rbracken/internbot | 58b802e0dd7597ace12acd9342bb938e2f33c25d | [
"BSD-2-Clause"
] | 1 | 2016-09-24T16:00:06.000Z | 2016-09-24T16:00:06.000Z | plugins/pick/choices.py | rbracken/internbot | 58b802e0dd7597ace12acd9342bb938e2f33c25d | [
"BSD-2-Clause"
] | null | null | null | plugins/pick/choices.py | rbracken/internbot | 58b802e0dd7597ace12acd9342bb938e2f33c25d | [
"BSD-2-Clause"
] | null | null | null | # Add your own choices here!
fruit = ["apples", "oranges", "pears", "grapes", "blueberries"]
lunch = ["pho", "timmies", "thai", "burgers", "buffet!", "indian", "montanas"]
situations = {"fruit":fruit, "lunch":lunch}
| 36.333333 | 79 | 0.62844 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 143 | 0.655963 |
65a027371c207094c43000aeb78dc0ce9124ddf6 | 1,806 | py | Python | testing.py | blairg23/rename-images-to-datetime | e4fc8e34be9d651c4442b023d851bd64fd613e7f | [
"MIT"
] | null | null | null | testing.py | blairg23/rename-images-to-datetime | e4fc8e34be9d651c4442b023d851bd64fd613e7f | [
"MIT"
] | null | null | null | testing.py | blairg23/rename-images-to-datetime | e4fc8e34be9d651c4442b023d851bd64fd613e7f | [
"MIT"
] | null | null | null | '''
Stolen straight from https://stackoverflow.com/a/51337247/1224827
'''
try:
import PIL
import PIL.Image as PILimage
from PIL import ImageDraw, ImageFont, ImageEnhance
from PIL.ExifTags import TAGS, GPSTAGS
import os
import glob
except ImportError as err:
exit(err)
class Worker(object):
... | 26.558824 | 65 | 0.55814 | 941 | 0.521041 | 0 | 0 | 0 | 0 | 0 | 0 | 183 | 0.101329 |
65a0da8d520c64ade98d09bb5d2663a8e3d3134d | 102 | py | Python | tftool/access/__init__.py | antsfamily/tftool | 0de72be13b3ca43e8a95c8be726c55841b389973 | [
"MIT"
] | null | null | null | tftool/access/__init__.py | antsfamily/tftool | 0de72be13b3ca43e8a95c8be726c55841b389973 | [
"MIT"
] | null | null | null | tftool/access/__init__.py | antsfamily/tftool | 0de72be13b3ca43e8a95c8be726c55841b389973 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from .load import load_ckpt
from .save import save_ckpt
| 17 | 39 | 0.794118 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
65a11747e48582b0ad97e6b0273c903fafd78306 | 1,730 | py | Python | scripts/box3d_trpo/sweep_ddpg_0.py | fredshentu/public_model_based_controller | 9301699bc56aa49ba5c699f7d5be299046a8aa0c | [
"MIT"
] | null | null | null | scripts/box3d_trpo/sweep_ddpg_0.py | fredshentu/public_model_based_controller | 9301699bc56aa49ba5c699f7d5be299046a8aa0c | [
"MIT"
] | null | null | null | scripts/box3d_trpo/sweep_ddpg_0.py | fredshentu/public_model_based_controller | 9301699bc56aa49ba5c699f7d5be299046a8aa0c | [
"MIT"
] | null | null | null | import os
from rllab.envs.normalized_env import normalize
from rllab.misc.instrument import stub, run_experiment_lite
from sandbox.rocky.tf.envs.base import TfEnv
from rllab.envs.gym_env import GymEnv
from railrl.algos.ddpg import DDPG
from railrl.policies.nn_policy import FeedForwardPolicy
from railrl.qfunctions.nn_q... | 23.378378 | 92 | 0.750289 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 214 | 0.123699 |
65a1934b198c619626a687dd053ddc9910070a15 | 17,974 | py | Python | tests/test_engine.py | popravich/hiku | 4ce6b46302de61fc17016ddf3af3f378b3fce119 | [
"BSD-3-Clause"
] | null | null | null | tests/test_engine.py | popravich/hiku | 4ce6b46302de61fc17016ddf3af3f378b3fce119 | [
"BSD-3-Clause"
] | null | null | null | tests/test_engine.py | popravich/hiku | 4ce6b46302de61fc17016ddf3af3f378b3fce119 | [
"BSD-3-Clause"
] | 1 | 2022-01-20T17:03:23.000Z | 2022-01-20T17:03:23.000Z | import re
import pytest
from hiku import query as q
from hiku.graph import Graph, Node, Field, Link, Option, Root
from hiku.types import Record, Sequence, Integer, Optional, TypeRef
from hiku.utils import listify
from hiku.engine import Engine, pass_context, Context
from hiku.builder import build, Q
from hiku.executo... | 27.780526 | 80 | 0.476355 | 0 | 0 | 5,684 | 0.316235 | 5,150 | 0.286525 | 0 | 0 | 2,284 | 0.127072 |
65a1c52735b77b5b062b18c86f7b8f8507e5e9d2 | 90 | py | Python | helper.py | b-nguyen/cs3240-labdemo | ee8da87092bc46d6a774fa5030283224819a4b87 | [
"MIT"
] | null | null | null | helper.py | b-nguyen/cs3240-labdemo | ee8da87092bc46d6a774fa5030283224819a4b87 | [
"MIT"
] | null | null | null | helper.py | b-nguyen/cs3240-labdemo | ee8da87092bc46d6a774fa5030283224819a4b87 | [
"MIT"
] | null | null | null | __author__ = 'Brian Nguyen'
def greeting(msg):
print("We would like to say: " + msg) | 18 | 41 | 0.655556 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 38 | 0.422222 |
65a24baaac6c0fcc20473db9883448f3352703ee | 6,251 | py | Python | twitter_verified_blocker.py | antoinemcgrath/twitter_blocker_tool | f4c0ed866830259a5ae6844dbb5fbdac8b3674b2 | [
"MIT"
] | null | null | null | twitter_verified_blocker.py | antoinemcgrath/twitter_blocker_tool | f4c0ed866830259a5ae6844dbb5fbdac8b3674b2 | [
"MIT"
] | null | null | null | twitter_verified_blocker.py | antoinemcgrath/twitter_blocker_tool | f4c0ed866830259a5ae6844dbb5fbdac8b3674b2 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
#### A tool for blocking all verified users on Twitter.
## You may want to create a (public or private) Twitter list named 'exceptions' and add verified users to it.
## This 'exceptions' list that you create on Twitter is for verified accounts that you like and do not want to block.
#### Import dep... | 38.58642 | 117 | 0.628379 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,838 | 0.454007 |
65a29ad725144c4d2dc24167982660ac5a79324c | 586 | py | Python | src/pktmapper/common.py | Sapunov/pktmapper | 9d72a42c5b756c10c7fb0debcfc6c20031626aa1 | [
"MIT"
] | null | null | null | src/pktmapper/common.py | Sapunov/pktmapper | 9d72a42c5b756c10c7fb0debcfc6c20031626aa1 | [
"MIT"
] | null | null | null | src/pktmapper/common.py | Sapunov/pktmapper | 9d72a42c5b756c10c7fb0debcfc6c20031626aa1 | [
"MIT"
] | null | null | null | """
Common functions
---
Package: PACKET-MAPPER
Author: Sapunov Nikita <[email protected]>
"""
import netaddr
import socket
def ip2str(address):
"""
Print out an IP address given a string
Args:
address (inet struct): inet network address
Returns:
str: Printable/readable IP address... | 16.742857 | 52 | 0.641638 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 411 | 0.701365 |
65a7dd3e05e8bc60ee17293d906552f32358fc04 | 1,236 | py | Python | custom_packages/CustomNeuralNetworks/test_CustomNeuralNetworks/test_resnet50_unet.py | davidelomeo/mangroves_deep_learning | 27ce24fe183b65f054c1d6b41417a64355cd0c9c | [
"MIT"
] | null | null | null | custom_packages/CustomNeuralNetworks/test_CustomNeuralNetworks/test_resnet50_unet.py | davidelomeo/mangroves_deep_learning | 27ce24fe183b65f054c1d6b41417a64355cd0c9c | [
"MIT"
] | null | null | null | custom_packages/CustomNeuralNetworks/test_CustomNeuralNetworks/test_resnet50_unet.py | davidelomeo/mangroves_deep_learning | 27ce24fe183b65f054c1d6b41417a64355cd0c9c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# This script tests the function that builds the Un-Net model combined
# with the ResNet50 model as an encoder. The test does not look for
# numerical values but checks if the model returns am object or not.
# This is because there are several tests within the UNet class t... | 35.314286 | 79 | 0.755663 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 669 | 0.541262 |
65a81a20a737d47906a247b2cf2e411a76cfdb20 | 1,988 | py | Python | htb/Knife/exploit/49933.py | oonray/Notes | 7e52bd058cce5ccf488977222fdb7d7e88aabbbf | [
"MIT"
] | null | null | null | htb/Knife/exploit/49933.py | oonray/Notes | 7e52bd058cce5ccf488977222fdb7d7e88aabbbf | [
"MIT"
] | null | null | null | htb/Knife/exploit/49933.py | oonray/Notes | 7e52bd058cce5ccf488977222fdb7d7e88aabbbf | [
"MIT"
] | null | null | null | # Exploit Title: PHP 8.1.0-dev - 'User-Agentt' Remote Code Execution
# Date: 23 may 2021
# Exploit Author: flast101
# Vendor Homepage: https://www.php.net/
# Software Link:
# - https://hub.docker.com/r/phpdaily/php
# - https://github.com/phpdaily/php
# Version: 8.1.0-dev
# Tested on: Ubuntu 20.04
# References:
... | 37.509434 | 267 | 0.667505 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,365 | 0.68662 |
65a8a8d322da8f141e973ee61e8ca8e2f7c15699 | 2,271 | py | Python | flashcards/cli.py | elliott-king/flashcards | 5dd6ae3d996797b11e28b2bd8a5b0d6e038e1a5d | [
"MIT"
] | null | null | null | flashcards/cli.py | elliott-king/flashcards | 5dd6ae3d996797b11e28b2bd8a5b0d6e038e1a5d | [
"MIT"
] | null | null | null | flashcards/cli.py | elliott-king/flashcards | 5dd6ae3d996797b11e28b2bd8a5b0d6e038e1a5d | [
"MIT"
] | null | null | null | """
Module that contains the command line app.
Why does this file exist, and why not put this in __main__?
You might be tempted to import things from __main__ later, but that will cause
problems: the code will get executed twice:
- When you run `python -mflashcards` python will execute
``__main__.py`` as a... | 40.553571 | 80 | 0.65742 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,429 | 0.629238 |
65a8c04b64b959ed6c434b2c56b2ea70ca122b10 | 744 | py | Python | C2C/simple_server.py | muhammedabdelkader/python_collection | 7084588ab983224ccc969f63688d62fcc988263a | [
"MIT"
] | null | null | null | C2C/simple_server.py | muhammedabdelkader/python_collection | 7084588ab983224ccc969f63688d62fcc988263a | [
"MIT"
] | null | null | null | C2C/simple_server.py | muhammedabdelkader/python_collection | 7084588ab983224ccc969f63688d62fcc988263a | [
"MIT"
] | null | null | null | import aiohttp
import asyncio
import time
start_time = time.time()
async def get_pokemon(session,url):
async with session.get(url) as resp:
pokemon = await resp.json()
return pokemon["name"]
async def main():
async with aiohttp.ClientSession(connector=aiohttp.TCPConnector(limit=64,verif... | 27.555556 | 111 | 0.629032 | 0 | 0 | 0 | 0 | 0 | 0 | 609 | 0.818548 | 79 | 0.106183 |
65a9792b2934e3a0bc3ead9a9eef72f6382f49c5 | 3,454 | py | Python | Important_data/Thesis figure scripts/six_sigmoids.py | haakonvt/LearningTensorFlow | 6988a15af2ac916ae1a5e23b2c5bde9630cc0519 | [
"MIT"
] | 5 | 2018-09-06T12:52:12.000Z | 2020-05-09T01:40:12.000Z | Important_data/Thesis figure scripts/six_sigmoids.py | haakonvt/LearningTensorFlow | 6988a15af2ac916ae1a5e23b2c5bde9630cc0519 | [
"MIT"
] | null | null | null | Important_data/Thesis figure scripts/six_sigmoids.py | haakonvt/LearningTensorFlow | 6988a15af2ac916ae1a5e23b2c5bde9630cc0519 | [
"MIT"
] | 4 | 2018-02-06T08:42:06.000Z | 2019-04-16T11:23:06.000Z | from matplotlib import rc
rc('font',**{'family':'sans-serif','sans-serif':['Helvetica']})
rc('text', usetex=True)
rc('legend',**{'fontsize':11}) # Font size for legend
from mpl_toolkits.axes_grid.axislines import SubplotZero
import matplotlib as mpl
mpl.rcParams['lines.linewidth'] = 2.5
import matplotlib.pyplot as plt... | 40.635294 | 116 | 0.630573 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,438 | 0.416329 |
65aa73e15457005cd520549df842b9dc33211c7c | 3,820 | py | Python | src/web/modules/search/controllers/search/control.py | unkyulee/elastic-cms | 3ccf4476c3523d4fefc0d8d9dee0196815b81489 | [
"MIT"
] | 2 | 2017-04-30T07:29:23.000Z | 2017-04-30T07:36:27.000Z | src/web/modules/search/controllers/search/control.py | unkyulee/elastic-cms | 3ccf4476c3523d4fefc0d8d9dee0196815b81489 | [
"MIT"
] | null | null | null | src/web/modules/search/controllers/search/control.py | unkyulee/elastic-cms | 3ccf4476c3523d4fefc0d8d9dee0196815b81489 | [
"MIT"
] | null | null | null | import json
import urllib2
import traceback
import cgi
from flask import render_template, request
import web.util.tools as tools
import lib.http as http
import lib.es as es
from web import app
from lib.read import readfile
def get(p):
host = p['c']['host']; index = p['c']['index'];
# debug
p['debug'] = ... | 33.217391 | 85 | 0.546073 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,491 | 0.390314 |
65aa8588c528dddf9da0b75de2f8177f0b66e0ef | 1,043 | py | Python | Go6/policy_probabilistic_player.py | skyu0221/cmput496 | ad1e59805ab49324ec1e387ddeaf3dd3202518bc | [
"MIT"
] | null | null | null | Go6/policy_probabilistic_player.py | skyu0221/cmput496 | ad1e59805ab49324ec1e387ddeaf3dd3202518bc | [
"MIT"
] | null | null | null | Go6/policy_probabilistic_player.py | skyu0221/cmput496 | ad1e59805ab49324ec1e387ddeaf3dd3202518bc | [
"MIT"
] | null | null | null | #!/usr/bin/python3
from board_util import GoBoardUtil
from gtp_connection import GtpConnection
class PolicyPlayer(object):
"""
Plays according to the Go4 playout policy.
No simulations, just random choice among current policy moves
"""
version = 0.1
name = "Policy Probabilistic Player... | 22.673913 | 80 | 0.633749 | 799 | 0.766059 | 0 | 0 | 0 | 0 | 0 | 0 | 189 | 0.181208 |
65ac271abc5546a6ef5541faf5bc32786bb4d4dc | 1,531 | py | Python | test_models.py | ChirilaLaura/covid-z | f1cc0818831519404486cd2fd2e78c36b789de24 | [
"MIT"
] | 2 | 2020-05-14T03:02:22.000Z | 2020-06-16T10:05:44.000Z | test_models.py | ChirilaLaura/covid-z | f1cc0818831519404486cd2fd2e78c36b789de24 | [
"MIT"
] | null | null | null | test_models.py | ChirilaLaura/covid-z | f1cc0818831519404486cd2fd2e78c36b789de24 | [
"MIT"
] | null | null | null | from keras.preprocessing.image import img_to_array
from keras.models import load_model
import numpy as np
import argparse
import imutils
import cv2
ap = argparse.ArgumentParser()
ap.add_argument("-m1", "--model1", required=True, help="path to model1")
ap.add_argument("-m2", "--model2", required=True, help="path to mo... | 31.895833 | 88 | 0.674722 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 240 | 0.15676 |
65ac8cde7af97a0e6637820254f0d7a893315eae | 143 | py | Python | src/settings.py | MichaelJWelsh/bot-evolution | 6d8e3449fc5350f47e91a6aa7a3e8b719c0c2f16 | [
"MIT"
] | 151 | 2017-05-01T02:47:34.000Z | 2022-01-21T17:08:11.000Z | src/settings.py | MichaelJWelsh/bot-evolution | 6d8e3449fc5350f47e91a6aa7a3e8b719c0c2f16 | [
"MIT"
] | null | null | null | src/settings.py | MichaelJWelsh/bot-evolution | 6d8e3449fc5350f47e91a6aa7a3e8b719c0c2f16 | [
"MIT"
] | 26 | 2017-05-01T21:41:02.000Z | 2021-12-21T11:40:20.000Z | """
This module contains the general settings used across modules.
"""
FPS = 60
WINDOW_WIDTH = 1100
WINDOW_HEIGHT = 600
TIME_MULTIPLIER = 1.0
| 15.888889 | 62 | 0.748252 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 70 | 0.48951 |
65ad5e7a545499575a16b2d06ffd961696d9832d | 7,974 | py | Python | katana-nbi/katana/api/nfvo.py | afoteas/katana-slice_manager | f03a8520fc06f7bed18ff5c2a01a9b8ea7da84c8 | [
"Apache-2.0"
] | null | null | null | katana-nbi/katana/api/nfvo.py | afoteas/katana-slice_manager | f03a8520fc06f7bed18ff5c2a01a9b8ea7da84c8 | [
"Apache-2.0"
] | null | null | null | katana-nbi/katana/api/nfvo.py | afoteas/katana-slice_manager | f03a8520fc06f7bed18ff5c2a01a9b8ea7da84c8 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import logging
from logging import handlers
import pickle
import time
import uuid
from bson.binary import Binary
from bson.json_util import dumps
from flask import request
from flask_classful import FlaskView
import pymongo
from requests import ConnectTimeout, ConnectionError
from katana.share... | 39.088235 | 97 | 0.538375 | 7,027 | 0.881239 | 0 | 0 | 0 | 0 | 0 | 0 | 2,240 | 0.280913 |
65ad681676318e198f9ba24f925ddf67a7312897 | 7,400 | py | Python | helpers.py | mochja/ISA-DNS | 463713b97329b000721be2512c9581c4881d664c | [
"MIT"
] | null | null | null | helpers.py | mochja/ISA-DNS | 463713b97329b000721be2512c9581c4881d664c | [
"MIT"
] | null | null | null | helpers.py | mochja/ISA-DNS | 463713b97329b000721be2512c9581c4881d664c | [
"MIT"
] | null | null | null | import threading
import traceback
import socketserver
import struct
import time
import sys
import http.client
import json
import uuid
import config
import dns.rdatatype
import dns.rdataclass
args = config.args
QTYPES = {1:'A', 15: 'MX', 6: 'SOA'}
custom_mx = uuid.uuid4().hex
# https://github.com/shuque/pydig GNUv2... | 30.578512 | 148 | 0.553514 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,172 | 0.158378 |
65ad8049b22c02c19b00ee9ceab0dd889c8339c3 | 3,278 | py | Python | convert/templatetags/convert_tags.py | aino/aino-convert | f3bd773f02a9645c75bfbd773e747dd8dc6e08f4 | [
"BSD-3-Clause"
] | 1 | 2015-07-15T07:40:19.000Z | 2015-07-15T07:40:19.000Z | convert/templatetags/convert_tags.py | aino/aino-convert | f3bd773f02a9645c75bfbd773e747dd8dc6e08f4 | [
"BSD-3-Clause"
] | null | null | null | convert/templatetags/convert_tags.py | aino/aino-convert | f3bd773f02a9645c75bfbd773e747dd8dc6e08f4 | [
"BSD-3-Clause"
] | null | null | null | from django.template import Library, Node, TemplateSyntaxError
from django.utils.encoding import force_unicode
from convert.base import MediaFile, EmptyMediaFile, convert_solo
from convert.conf import settings
register = Library()
class ConvertBaseNode(Node):
def error(self, context):
if sett... | 31.519231 | 73 | 0.589079 | 1,734 | 0.528981 | 0 | 0 | 1,274 | 0.388652 | 0 | 0 | 195 | 0.059487 |
65ad9a16451cd40a1e7a1f6a7b00166acc44cfb1 | 7,826 | py | Python | tests/utils_test.py | lovetrading10/tda-api | 0e38c85739248fbf3b0e3386eb2fb9bf9298f93d | [
"MIT"
] | 7 | 2020-05-03T16:25:08.000Z | 2021-11-03T22:08:27.000Z | tests/utils_test.py | lovetrading10/tda-api | 0e38c85739248fbf3b0e3386eb2fb9bf9298f93d | [
"MIT"
] | null | null | null | tests/utils_test.py | lovetrading10/tda-api | 0e38c85739248fbf3b0e3386eb2fb9bf9298f93d | [
"MIT"
] | 11 | 2020-06-26T22:09:05.000Z | 2022-02-13T13:30:52.000Z | from unittest.mock import MagicMock
import datetime
import json
import unittest
from tda.orders import EquityOrderBuilder
from tda.utils import Utils
from . import test_utils
class MockResponse:
def __init__(self, json, ok, headers=None):
self._json = json
self.ok = ok
self.headers = hea... | 37.806763 | 80 | 0.625607 | 7,643 | 0.976616 | 0 | 0 | 0 | 0 | 0 | 0 | 1,678 | 0.214413 |
65ae5ae925181ff1d726f472dfbdd87ce820d687 | 9,535 | py | Python | aiida/orm/entities.py | PercivalN/aiida-core | b215ed5a7ce9342bb7f671b67e95c1f474cc5940 | [
"BSD-2-Clause"
] | 1 | 2019-07-31T04:08:13.000Z | 2019-07-31T04:08:13.000Z | aiida/orm/entities.py | PercivalN/aiida-core | b215ed5a7ce9342bb7f671b67e95c1f474cc5940 | [
"BSD-2-Clause"
] | null | null | null | aiida/orm/entities.py | PercivalN/aiida-core | b215ed5a7ce9342bb7f671b67e95c1f474cc5940 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
# ... | 32.431973 | 116 | 0.627687 | 8,347 | 0.875406 | 0 | 0 | 3,981 | 0.417514 | 0 | 0 | 5,676 | 0.595281 |
65ae685c4283988c38775f88a233b7c8ac475f6e | 2,088 | py | Python | src/fullyautomatednutcracker/cogs/antiselfdeprecation.py | dovedevic/fullyautomatednutcracker | c746601f93097b88febea64adb09be5ef569adaa | [
"MIT"
] | 5 | 2020-08-12T00:30:03.000Z | 2020-08-24T08:24:34.000Z | src/fullyautomatednutcracker/cogs/antiselfdeprecation.py | dovedevic/fullyautomatednutcracker | c746601f93097b88febea64adb09be5ef569adaa | [
"MIT"
] | 3 | 2020-08-12T19:25:00.000Z | 2020-08-28T00:23:18.000Z | src/fullyautomatednutcracker/cogs/antiselfdeprecation.py | dovedevic/fullyautomatednutcracker | c746601f93097b88febea64adb09be5ef569adaa | [
"MIT"
] | 8 | 2020-08-12T00:37:03.000Z | 2020-08-20T19:49:32.000Z | from discord.ext import commands
import asyncio
import time
class AntiSelfDeprecation(commands.Cog):
def __init__(self, bot):
self.bot = bot
self.bot.nono_words = []
self.dumb = ('im dumb', 'i\'m dumb', 'im stupid', 'i\'m stupid')
self.not_dumb = ('im not dumb', 'i\'m not dumb', ... | 43.5 | 198 | 0.632184 | 1,967 | 0.940698 | 0 | 0 | 1,556 | 0.744142 | 1,469 | 0.702535 | 473 | 0.226208 |
65aee5c9340fded7e6ab5b1f35346dad94ab5fed | 10,809 | py | Python | pyaff4/lexicon.py | timbolle-unil/pyaff4 | 845bec2dc7a274766e3c9a96adf10a812a925cd7 | [
"Apache-2.0"
] | null | null | null | pyaff4/lexicon.py | timbolle-unil/pyaff4 | 845bec2dc7a274766e3c9a96adf10a812a925cd7 | [
"Apache-2.0"
] | null | null | null | pyaff4/lexicon.py | timbolle-unil/pyaff4 | 845bec2dc7a274766e3c9a96adf10a812a925cd7 | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... | 38.603571 | 85 | 0.753261 | 3,217 | 0.297622 | 0 | 0 | 0 | 0 | 0 | 0 | 4,629 | 0.428254 |
65af59058300b104393557367f8057f6940196d0 | 431 | py | Python | dusted/dustforce/linux.py | AlexMorson/dustforce-tas-editor | 80546ca525ba215252c23a74807857e9c7c2566c | [
"MIT"
] | 1 | 2021-03-20T07:43:33.000Z | 2021-03-20T07:43:33.000Z | dusted/dustforce/linux.py | AlexMorson/dustforce-tas-editor | 80546ca525ba215252c23a74807857e9c7c2566c | [
"MIT"
] | null | null | null | dusted/dustforce/linux.py | AlexMorson/dustforce-tas-editor | 80546ca525ba215252c23a74807857e9c7c2566c | [
"MIT"
] | null | null | null | import queue
import threading
from subprocess import PIPE, Popen
procs = []
stdout = queue.Queue()
def process_stdout(proc):
while (line := proc.stdout.readline()) != b"":
stdout.put(line.decode().strip())
procs.remove(proc)
def create_proc(uri):
proc = Popen(["unbuffer", "xdg-open", uri], stdo... | 22.684211 | 73 | 0.679814 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 23 | 0.053364 |
65afb03352fe6b2c1a60ffb0e33ef381c9954df6 | 1,834 | py | Python | joplin/pages/official_documents_page/factories.py | cityofaustin/joplin | 01424e46993e9b1c8e57391d6b7d9448f31d596b | [
"MIT"
] | 15 | 2018-09-27T07:36:30.000Z | 2021-08-03T16:01:21.000Z | joplin/pages/official_documents_page/factories.py | cityofaustin/joplin | 01424e46993e9b1c8e57391d6b7d9448f31d596b | [
"MIT"
] | 183 | 2017-11-16T23:30:47.000Z | 2020-12-18T21:43:36.000Z | joplin/pages/official_documents_page/factories.py | cityofaustin/joplin | 01424e46993e9b1c8e57391d6b7d9448f31d596b | [
"MIT"
] | 12 | 2017-12-12T22:48:05.000Z | 2021-03-01T18:01:24.000Z | import factory
from pages.official_documents_page.models import OfficialDocumentPage, OfficialDocumentCollectionOfficialDocumentPage
from pages.base_page.factories import JanisBasePageFactory
from pages.official_documents_collection.factories import OfficialDocumentCollectionFactory
from wagtail.documents.models import... | 35.960784 | 117 | 0.745911 | 1,495 | 0.815158 | 0 | 0 | 758 | 0.413304 | 0 | 0 | 303 | 0.165213 |
65b0c43d10ec56796ba655b95a3c9d479381e676 | 6,927 | py | Python | flask_qa/routes/main.py | gouravdhar/youtube_video_code | ade7b8dded7992149d34137f801ebe9c26e9bcf0 | [
"Unlicense"
] | null | null | null | flask_qa/routes/main.py | gouravdhar/youtube_video_code | ade7b8dded7992149d34137f801ebe9c26e9bcf0 | [
"Unlicense"
] | null | null | null | flask_qa/routes/main.py | gouravdhar/youtube_video_code | ade7b8dded7992149d34137f801ebe9c26e9bcf0 | [
"Unlicense"
] | null | null | null | from flask import Blueprint, render_template, request, redirect, url_for
from flask_login import current_user, login_required
from flask_cors import CORS
from flask_qa.extensions import db
from flask_qa.models import Question, User, Stats, Notes
import json
main = Blueprint('main', __name__)
@main.route('/')... | 27.379447 | 147 | 0.549877 | 0 | 0 | 0 | 0 | 6,579 | 0.949762 | 0 | 0 | 1,212 | 0.174968 |
65b1a21d6fc172f7d80c2944e861d993aee45a5a | 7,453 | py | Python | src/compas_rhino/utilities/misc.py | XingxinHE/compas | d2901dbbacdaf4694e5adae78ba8f093f10532bf | [
"MIT"
] | 235 | 2017-11-07T07:33:22.000Z | 2022-03-25T16:20:00.000Z | src/compas_rhino/utilities/misc.py | XingxinHE/compas | d2901dbbacdaf4694e5adae78ba8f093f10532bf | [
"MIT"
] | 770 | 2017-09-22T13:42:06.000Z | 2022-03-31T21:26:45.000Z | src/compas_rhino/utilities/misc.py | XingxinHE/compas | d2901dbbacdaf4694e5adae78ba8f093f10532bf | [
"MIT"
] | 99 | 2017-11-06T23:15:28.000Z | 2022-03-25T16:05:36.000Z | from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
try:
basestring
except NameError:
basestring = str
import os
import sys
import ast
from compas_rhino.forms import TextForm
from compas_rhino.forms import ImageForm
import System
import rhinoscriptsy... | 27.603704 | 96 | 0.56058 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,484 | 0.333289 |
65b235fdfa7ea03f6e55907463fc98d053669de0 | 3,539 | py | Python | lib/utils/visualization/fixup_resnet.py | yandex-research/learnable-init | 480627217763912e83251833df2d678c8b6ea6fd | [
"Apache-2.0"
] | 4 | 2021-07-14T19:18:47.000Z | 2022-03-21T17:50:46.000Z | lib/utils/visualization/fixup_resnet.py | yandex-research/learnable-init | 480627217763912e83251833df2d678c8b6ea6fd | [
"Apache-2.0"
] | null | null | null | lib/utils/visualization/fixup_resnet.py | yandex-research/learnable-init | 480627217763912e83251833df2d678c8b6ea6fd | [
"Apache-2.0"
] | null | null | null | import torch
import numpy as np
import matplotlib.pyplot as plt
from lib.utils import moving_average, check_numpy
@torch.no_grad()
def visualize_pdf(maml):
i = 0
plt.figure(figsize=[22, 34])
for name, (weight_maml_init, bias_maml_init) in maml.initializers.items():
weight_base_init, _ = maml.untra... | 39.322222 | 98 | 0.607234 | 0 | 0 | 0 | 0 | 2,614 | 0.738627 | 0 | 0 | 218 | 0.061599 |
65b25da916e80ac5c60ab157203cd5360dfed5f5 | 3,170 | py | Python | DataPreprocessing/load_diabetes.py | iosifidisvasileios/CumulativeCostBoosting | 05a51390c7cadb23eb47b94406b2aa509d25716d | [
"MIT"
] | null | null | null | DataPreprocessing/load_diabetes.py | iosifidisvasileios/CumulativeCostBoosting | 05a51390c7cadb23eb47b94406b2aa509d25716d | [
"MIT"
] | null | null | null | DataPreprocessing/load_diabetes.py | iosifidisvasileios/CumulativeCostBoosting | 05a51390c7cadb23eb47b94406b2aa509d25716d | [
"MIT"
] | null | null | null | from __future__ import division
# import urllib2
import os, sys
import numpy as np
import pandas as pd
from collections import defaultdict
from sklearn import feature_extraction
from sklearn import preprocessing
from random import seed, shuffle
# sys.path.insert(0, '../../fair_classification/') # the code for fair cla... | 44.647887 | 121 | 0.613565 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,493 | 0.470978 |
65b262473f8b6de6d59edf029ac0e4e27f71979d | 2,300 | py | Python | python/scripts/copy_pin.py | ehabnaduvi/api-quickstart | 956409098cbce1bf3674d739fe64ebafaaf63ca3 | [
"Apache-2.0"
] | null | null | null | python/scripts/copy_pin.py | ehabnaduvi/api-quickstart | 956409098cbce1bf3674d739fe64ebafaaf63ca3 | [
"Apache-2.0"
] | null | null | null | python/scripts/copy_pin.py | ehabnaduvi/api-quickstart | 956409098cbce1bf3674d739fe64ebafaaf63ca3 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
# Copying a pin is not representative of typical user behavior on Pinterest.
#
# This script is intended to demonstrate how to use the API to developers,
# and to provide functionality that might be convenient for developers.
# For example, it might be used as part of a program to generate an
# ... | 37.096774 | 86 | 0.729565 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,129 | 0.49087 |
65b30f63399f7d1910889d551fa68b83b2e4d6e6 | 10,308 | py | Python | BL_ColorRamp4_MF.py | SpectralVectors/TransMat | 590b04b273005d95f02b567562c08042c2937af4 | [
"MIT"
] | 31 | 2020-10-16T03:15:06.000Z | 2022-01-31T03:06:44.000Z | BL_ColorRamp4_MF.py | SpectralVectors/TransMat | 590b04b273005d95f02b567562c08042c2937af4 | [
"MIT"
] | 1 | 2020-10-16T07:02:25.000Z | 2020-10-16T13:05:39.000Z | BL_ColorRamp4_MF.py | SpectralVectors/TransMat | 590b04b273005d95f02b567562c08042c2937af4 | [
"MIT"
] | null | null | null | import unreal
BL_ColorRamp4 = unreal.AssetToolsHelpers.get_asset_tools().create_asset('BL_ColorRamp4', '/Engine/Functions/BLUI/', unreal.MaterialFunction, unreal.MaterialFunctionFactoryNew())
BL_ColorRamp4.set_editor_property("expose_to_library", True)
BL_ColorRamp4.set_editor_property("library_categories_text", (... | 60.994083 | 178 | 0.796954 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 708 | 0.068685 |
65b36386e6a8fce39db4d492a4e6ead8f8c27f5c | 6,731 | py | Python | tools/log2csv.py | Haixing-Hu/lambda-tensorflow-benchmark | 080a6b7fee1c651228f227f52a2bed6ff90579cf | [
"BSD-3-Clause"
] | null | null | null | tools/log2csv.py | Haixing-Hu/lambda-tensorflow-benchmark | 080a6b7fee1c651228f227f52a2bed6ff90579cf | [
"BSD-3-Clause"
] | null | null | null | tools/log2csv.py | Haixing-Hu/lambda-tensorflow-benchmark | 080a6b7fee1c651228f227f52a2bed6ff90579cf | [
"BSD-3-Clause"
] | null | null | null | import os
import re
import glob
import argparse
import pandas as pd
list_test = ['alexnet',
'inception3',
'inception4',
'resnet152',
'resnet50',
'vgg16']
# Naming convention
# Key: log name
# Value: ([num_gpus], [names])
# num_gpus: Since each log... | 38.028249 | 167 | 0.606002 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,545 | 0.378101 |
65b51ba1b7053c61b8b8e0893b561770fa90e439 | 22 | py | Python | python/testData/keywordCompletion/noneInArgList.py | jnthn/intellij-community | 8fa7c8a3ace62400c838e0d5926a7be106aa8557 | [
"Apache-2.0"
] | 2 | 2019-04-28T07:48:50.000Z | 2020-12-11T14:18:08.000Z | python/testData/keywordCompletion/noneInArgList.py | Cyril-lamirand/intellij-community | 60ab6c61b82fc761dd68363eca7d9d69663cfa39 | [
"Apache-2.0"
] | 173 | 2018-07-05T13:59:39.000Z | 2018-08-09T01:12:03.000Z | python/testData/keywordCompletion/noneInArgList.py | Cyril-lamirand/intellij-community | 60ab6c61b82fc761dd68363eca7d9d69663cfa39 | [
"Apache-2.0"
] | 2 | 2020-03-15T08:57:37.000Z | 2020-04-07T04:48:14.000Z | def foo(x=Non<caret>): | 22 | 22 | 0.681818 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
65b8b4c75d35105b5ff106a11aa54530eaf30029 | 2,687 | py | Python | stellar_sdk/xdr/survey_response_body.py | Shaptic/py-stellar-base | f5fa47f4d96f215889d99249fb25c7be002f5cf3 | [
"Apache-2.0"
] | null | null | null | stellar_sdk/xdr/survey_response_body.py | Shaptic/py-stellar-base | f5fa47f4d96f215889d99249fb25c7be002f5cf3 | [
"Apache-2.0"
] | 27 | 2022-01-12T10:55:38.000Z | 2022-03-28T01:38:24.000Z | stellar_sdk/xdr/survey_response_body.py | Shaptic/py-stellar-base | f5fa47f4d96f215889d99249fb25c7be002f5cf3 | [
"Apache-2.0"
] | 2 | 2021-12-02T12:42:03.000Z | 2021-12-07T20:53:10.000Z | # This is an automatically generated file.
# DO NOT EDIT or your changes may be overwritten
import base64
from xdrlib import Packer, Unpacker
from ..type_checked import type_checked
from .survey_message_command_type import SurveyMessageCommandType
from .topology_response_body import TopologyResponseBody
__all__ = ["S... | 32.373494 | 80 | 0.668031 | 2,330 | 0.867138 | 0 | 0 | 2,344 | 0.872348 | 0 | 0 | 542 | 0.201712 |
65b9bd2ad1163a0006a5a233a9d9d9cd5e6a3646 | 763 | py | Python | poll/migrations/0002_auto_20210114_2215.py | slk007/SahiGalat.com | 786688e07237f3554187b90e01149225efaa1713 | [
"MIT"
] | null | null | null | poll/migrations/0002_auto_20210114_2215.py | slk007/SahiGalat.com | 786688e07237f3554187b90e01149225efaa1713 | [
"MIT"
] | null | null | null | poll/migrations/0002_auto_20210114_2215.py | slk007/SahiGalat.com | 786688e07237f3554187b90e01149225efaa1713 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.5 on 2021-01-14 22:15
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('poll', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Topic',
fields=[
('id', model... | 28.259259 | 114 | 0.571429 | 670 | 0.878113 | 0 | 0 | 0 | 0 | 0 | 0 | 153 | 0.200524 |
65b9efe5fd413429042a21c46095ea299b352b7a | 370 | py | Python | Leetcode/Python/_1493.py | Xrenya/algorithms | aded82cacde2f4f2114241907861251e0e2e5638 | [
"MIT"
] | null | null | null | Leetcode/Python/_1493.py | Xrenya/algorithms | aded82cacde2f4f2114241907861251e0e2e5638 | [
"MIT"
] | null | null | null | Leetcode/Python/_1493.py | Xrenya/algorithms | aded82cacde2f4f2114241907861251e0e2e5638 | [
"MIT"
] | null | null | null | class Solution:
def longestSubarray(self, nums: List[int]) -> int:
k = 1
max_len, i = 0, 0
for j in range(len(nums)):
if nums[j] == 0:
k -= 1
if k < 0:
if nums[i] == 0:
k += 1
i += 1
max_... | 23.125 | 54 | 0.37027 | 369 | 0.997297 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
65bb496751451a7bd133a1ac2b24c5b70ac17431 | 5,375 | py | Python | setup.py | JakaKokosar/pysqlite3-binary | 808e9689c69b1ada784eda3d5a8ea7865c8318ad | [
"Zlib"
] | null | null | null | setup.py | JakaKokosar/pysqlite3-binary | 808e9689c69b1ada784eda3d5a8ea7865c8318ad | [
"Zlib"
] | null | null | null | setup.py | JakaKokosar/pysqlite3-binary | 808e9689c69b1ada784eda3d5a8ea7865c8318ad | [
"Zlib"
] | null | null | null | # -*- coding: ISO-8859-1 -*-
# setup.py: the distutils script
#
import os
import setuptools
import sys
from distutils import log
from distutils.command.build_ext import build_ext
from setuptools import Extension
# If you need to change anything, it should be enough to change setup.cfg.
PACKAGE_NAME = 'pysqlite3'
VER... | 32.97546 | 77 | 0.618233 | 2,833 | 0.52707 | 0 | 0 | 0 | 0 | 0 | 0 | 2,095 | 0.389767 |
65bc3f6e1793bcf43d99a8c4a348a352385aa4a0 | 5,267 | py | Python | gridder/gridder.py | PDFGridder/PDFGridder | 94bc6e76eadc3799905c905a70228fcd6b30c4fb | [
"MIT"
] | 2 | 2016-09-07T18:32:44.000Z | 2016-11-24T19:45:06.000Z | gridder/gridder.py | PDFGridder/PDFGridder | 94bc6e76eadc3799905c905a70228fcd6b30c4fb | [
"MIT"
] | null | null | null | gridder/gridder.py | PDFGridder/PDFGridder | 94bc6e76eadc3799905c905a70228fcd6b30c4fb | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import cairo
from .utils import hex_to_rgba, parse_unit
def parse_size(size):
"""take a size as str (es: 14px), return its value in px/pt as int
"""
if hasattr(size, 'isdigit'):
if size.isdigit():
return int(size)
return parse_unit(size[:-2], size[-2:])
... | 36.324138 | 180 | 0.58838 | 4,221 | 0.801405 | 0 | 0 | 0 | 0 | 0 | 0 | 626 | 0.118853 |
65bc5bc0726d3703c47b9225540efbf4baf75f28 | 462 | py | Python | wanikani_api/constants.py | peraperacafe/wanikani_api | 7340fde25ef4b102545e4fa2c485339d79136e17 | [
"BSD-3-Clause"
] | 12 | 2019-04-30T13:11:52.000Z | 2021-05-14T02:52:05.000Z | wanikani_api/constants.py | peraperacafe/wanikani_api | 7340fde25ef4b102545e4fa2c485339d79136e17 | [
"BSD-3-Clause"
] | 323 | 2018-07-13T00:39:22.000Z | 2022-03-31T19:29:08.000Z | wanikani_api/constants.py | peraperacafe/wanikani_api | 7340fde25ef4b102545e4fa2c485339d79136e17 | [
"BSD-3-Clause"
] | 9 | 2020-02-14T14:56:00.000Z | 2022-01-09T19:14:07.000Z |
ROOT_WK_API_URL = "https://api.wanikani.com/v2/"
RESOURCES_WITHOUT_IDS = ["user", "collection", "report"]
SUBJECT_ENDPOINT = "subjects"
SINGLE_SUBJECT_ENPOINT = r"subjects/\d+"
ASSIGNMENT_ENDPOINT = "assignments"
REVIEW_STATS_ENDPOINT = "review_statistics"
STUDY_MATERIALS_ENDPOINT = "study_materials"
REVIEWS_ENDPOINT ... | 33 | 56 | 0.798701 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 182 | 0.393939 |
65bd680ebf2391800df849001a9518d85eba50ba | 1,943 | py | Python | utils/dataloader.py | Jiaqi0602/adversarial-attack-from-leakage | 90db721bed10094ac7d458b232ad5b1573884338 | [
"BSD-3-Clause"
] | 9 | 2021-06-17T00:46:19.000Z | 2022-03-05T13:57:38.000Z | utils/dataloader.py | Jiaqi0602/adversarial-attack-from-leakage | 90db721bed10094ac7d458b232ad5b1573884338 | [
"BSD-3-Clause"
] | null | null | null | utils/dataloader.py | Jiaqi0602/adversarial-attack-from-leakage | 90db721bed10094ac7d458b232ad5b1573884338 | [
"BSD-3-Clause"
] | null | null | null | from inversefed import consts
import torch
from torchvision import datasets, transforms
class DataLoader:
def __init__(self, data, device):
self.data = data
self.device = device
def get_mean_std(self):
if self.data == 'cifar10':
mean, std = consts.cifar10_mean... | 39.653061 | 104 | 0.609882 | 1,846 | 0.950077 | 0 | 0 | 0 | 0 | 0 | 0 | 183 | 0.094184 |
65be1830984a29d7acd4c26b6de2aa0995caf8fb | 10,651 | py | Python | hintedhandoff_test.py | Ankou76ers/cassandra-dtest | 54f5a983738a1580fbbe43bdb7201ff9b2664401 | [
"Apache-2.0"
] | 44 | 2017-07-13T14:20:42.000Z | 2022-03-27T23:55:27.000Z | hintedhandoff_test.py | Ankou76ers/cassandra-dtest | 54f5a983738a1580fbbe43bdb7201ff9b2664401 | [
"Apache-2.0"
] | 64 | 2017-07-26T16:06:01.000Z | 2022-03-17T22:57:03.000Z | hintedhandoff_test.py | Ankou76ers/cassandra-dtest | 54f5a983738a1580fbbe43bdb7201ff9b2664401 | [
"Apache-2.0"
] | 105 | 2017-07-13T14:28:14.000Z | 2022-03-23T04:22:46.000Z | import os
import time
import pytest
import logging
from cassandra import ConsistencyLevel
from dtest import Tester, create_ks
from tools.data import create_c1c2_table, insert_c1c2, query_c1c2
from tools.assertions import assert_stderr_clean
since = pytest.mark.since
ported_to_in_jvm = pytest.mark.ported_to_in_jvm
lo... | 40.192453 | 118 | 0.648202 | 10,276 | 0.964792 | 0 | 0 | 10,246 | 0.961975 | 0 | 0 | 3,561 | 0.334335 |
65be1ffede01306450a5f34b42845bf53968f1d8 | 248 | py | Python | pre_definition/solve_caller.py | sr9000/stepik_code_task_baking | 60a5197f659db1734132eeb9d82624f1b7aaeb3f | [
"MIT"
] | null | null | null | pre_definition/solve_caller.py | sr9000/stepik_code_task_baking | 60a5197f659db1734132eeb9d82624f1b7aaeb3f | [
"MIT"
] | null | null | null | pre_definition/solve_caller.py | sr9000/stepik_code_task_baking | 60a5197f659db1734132eeb9d82624f1b7aaeb3f | [
"MIT"
] | null | null | null | from collections.abc import Iterable as ABCIterable
def call_with_args(func, args):
if isinstance(args, dict):
return func(**args)
elif isinstance(args, ABCIterable):
return func(*args)
else:
return func(args)
| 22.545455 | 51 | 0.665323 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
65bea9d189e5ba73f3c48d6d3eae40bf9da3717b | 817 | py | Python | wikipedia_test.py | pedrogengo/TopicBlob | e6a7736d39c7a174d0289b21c152cd8bb02f2669 | [
"Apache-2.0"
] | null | null | null | wikipedia_test.py | pedrogengo/TopicBlob | e6a7736d39c7a174d0289b21c152cd8bb02f2669 | [
"Apache-2.0"
] | null | null | null | wikipedia_test.py | pedrogengo/TopicBlob | e6a7736d39c7a174d0289b21c152cd8bb02f2669 | [
"Apache-2.0"
] | null | null | null | import wikipedia
from topicblob import TopicBlob
#get random wikipeida summaries
wiki_pages = ["Facebook","New York City","Barack Obama","Wikipedia","Topic Modeling","Python (programming language)","Snapchat"]
wiki_pages = ["Facebook","New York City","Barack Obama"]
texts = []
for page in wiki_pages:
text = ... | 18.568182 | 128 | 0.71481 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 340 | 0.416157 |
65c19e6d0f4a645a3e85871f601e50a70618990c | 215 | py | Python | component/model/dmp_model.py | 12rambau/damage_proxy_maps | 98a004bf4420c6ce1b7ecd77e426e8fe7d512f52 | [
"MIT"
] | 1 | 2021-09-01T18:27:19.000Z | 2021-09-01T18:27:19.000Z | component/model/dmp_model.py | 12rambau/damage_proxy_maps | 98a004bf4420c6ce1b7ecd77e426e8fe7d512f52 | [
"MIT"
] | 3 | 2021-06-01T10:15:36.000Z | 2021-10-07T10:00:16.000Z | component/model/dmp_model.py | 12rambau/damage_proxy_maps | 98a004bf4420c6ce1b7ecd77e426e8fe7d512f52 | [
"MIT"
] | 2 | 2021-06-01T10:16:03.000Z | 2021-06-10T12:43:47.000Z | from sepal_ui import model
from traitlets import Any
class DmpModel(model.Model):
# inputs
event = Any(None).tag(sync=True)
username = Any(None).tag(sync=True)
password = Any(None).tag(sync=True)
| 19.545455 | 39 | 0.693023 | 159 | 0.739535 | 0 | 0 | 0 | 0 | 0 | 0 | 8 | 0.037209 |
65c1e68e0dc7466b357152cbb876f5ad24ac99ef | 9,154 | py | Python | SaIL/envs/state_lattice_planner_env.py | yonetaniryo/SaIL | c7404024c7787184c3638e9730bd185373ed0bf6 | [
"BSD-3-Clause"
] | 12 | 2018-05-18T19:29:09.000Z | 2020-05-15T13:47:12.000Z | SaIL/envs/state_lattice_planner_env.py | yonetaniryo/SaIL | c7404024c7787184c3638e9730bd185373ed0bf6 | [
"BSD-3-Clause"
] | 1 | 2018-05-18T19:36:42.000Z | 2018-07-20T03:03:13.000Z | SaIL/envs/state_lattice_planner_env.py | yonetaniryo/SaIL | c7404024c7787184c3638e9730bd185373ed0bf6 | [
"BSD-3-Clause"
] | 10 | 2018-01-11T21:23:40.000Z | 2021-11-10T04:38:07.000Z | #!/usr/bin/env python
"""An environment that takes as input databases of environments and runs episodes,
where each episode is a search based planner. It then returns the average number of expansions,
and features (if training)
Author: Mohak Bhardwaj
"""
from collections import defaultdict
import numpy as np
import os... | 45.093596 | 192 | 0.693358 | 8,038 | 0.878086 | 0 | 0 | 0 | 0 | 0 | 0 | 2,606 | 0.284684 |
65c266ffeb9dad82408ef950252b4d7368839fc3 | 966 | py | Python | opi_dragon_api/auth/__init__.py | CEAC33/opi-dragon-api | 8f050a0466dab4aaeec13151b9f49990bbd73640 | [
"MIT"
] | null | null | null | opi_dragon_api/auth/__init__.py | CEAC33/opi-dragon-api | 8f050a0466dab4aaeec13151b9f49990bbd73640 | [
"MIT"
] | null | null | null | opi_dragon_api/auth/__init__.py | CEAC33/opi-dragon-api | 8f050a0466dab4aaeec13151b9f49990bbd73640 | [
"MIT"
] | null | null | null | from sanic_jwt import exceptions
class User:
def __init__(self, id, username, password):
self.user_id = id
self.username = username
self.password = password
def __repr__(self):
return "User(id='{}')".format(self.user_id)
def to_dict(self):
return {"user_id": self.... | 29.272727 | 79 | 0.677019 | 321 | 0.331954 | 0 | 0 | 0 | 0 | 463 | 0.4788 | 146 | 0.150982 |
65c2afb8b2d130681f854965474e19205bdcd378 | 5,087 | py | Python | tests/test_observable/test_dowhile.py | yutiansut/RxPY | c3bbba77f9ebd7706c949141725e220096deabd4 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2018-11-16T09:07:13.000Z | 2018-11-16T09:07:13.000Z | tests/test_observable/test_dowhile.py | yutiansut/RxPY | c3bbba77f9ebd7706c949141725e220096deabd4 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | tests/test_observable/test_dowhile.py | yutiansut/RxPY | c3bbba77f9ebd7706c949141725e220096deabd4 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2020-05-08T08:23:08.000Z | 2020-05-08T08:23:08.000Z | import unittest
from rx.testing import TestScheduler, ReactiveTest
class TestDoWhile(ReactiveTest, unittest.TestCase):
def test_dowhile_always_false(self):
scheduler = TestScheduler()
xs = scheduler.create_cold_observable(
self.on_next(50, 1),
self.on_next(100, 2),
... | 31.79375 | 68 | 0.525654 | 5,016 | 0.986043 | 0 | 0 | 0 | 0 | 0 | 0 | 8 | 0.001573 |
65c311baef365241a86f5ea9eee583a30d354076 | 1,459 | py | Python | ZAP_Scripts/passive/14-4-2-api-content-disposition-header.py | YaleUniversity/ZAP_ASVS_Checks | f69b57f5fe0bc196ffc57fb1bb0762ffb367c1cb | [
"MIT"
] | 3 | 2022-01-22T11:21:23.000Z | 2022-03-09T06:45:55.000Z | ZAP_Scripts/passive/14-4-2-api-content-disposition-header.py | YaleUniversity/ZAP_ASVS_Checks | f69b57f5fe0bc196ffc57fb1bb0762ffb367c1cb | [
"MIT"
] | null | null | null | ZAP_Scripts/passive/14-4-2-api-content-disposition-header.py | YaleUniversity/ZAP_ASVS_Checks | f69b57f5fe0bc196ffc57fb1bb0762ffb367c1cb | [
"MIT"
] | null | null | null | """
Script testing 14.4.2 control from OWASP ASVS 4.0:
'Verify that all API responses contain a Content-Disposition: attachment;
filename="api.json" header (or other appropriate filename for the content
type).'
The script will raise an alert if 'Content-Disposition' header is present but not follow the format - Cont... | 41.685714 | 175 | 0.749143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 921 | 0.631254 |
65c34c95b750096053aaef54a2b648be5c44772c | 230 | py | Python | server.py | Peopple-Shopping-App/mockserver | c38c3f325e44f4eaba39cdbe24544e3181307218 | [
"MIT"
] | 1 | 2021-07-23T03:43:19.000Z | 2021-07-23T03:43:19.000Z | server.py | Peopple-Shopping-App/mockserver | c38c3f325e44f4eaba39cdbe24544e3181307218 | [
"MIT"
] | null | null | null | server.py | Peopple-Shopping-App/mockserver | c38c3f325e44f4eaba39cdbe24544e3181307218 | [
"MIT"
] | null | null | null | import uvicorn
if __name__ == '__main__':
<<<<<<< HEAD
uvicorn.run('app.main:app', host='0.0.0.0', port=80)
=======
uvicorn.run('app.main:app', host='0.0.0.0', port=2323)
>>>>>>> c583e3d93c9b7f8e76ce1d676a24740b62ef3552
| 23 | 58 | 0.630435 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 56 | 0.243478 |
65c37b82e34797425fdb4ac383cf6c771dd605d3 | 399 | py | Python | 9020/main.py | yeonghoey/baekjoon | a3f7c0aa901ad0e2ca6a863f1867fc574feb8c8e | [
"MIT"
] | 1 | 2018-09-20T05:15:30.000Z | 2018-09-20T05:15:30.000Z | 9020/main.py | yeonghoey/baekjoon | a3f7c0aa901ad0e2ca6a863f1867fc574feb8c8e | [
"MIT"
] | null | null | null | 9020/main.py | yeonghoey/baekjoon | a3f7c0aa901ad0e2ca6a863f1867fc574feb8c8e | [
"MIT"
] | null | null | null | MAX_N = 10000 + 1
isprime = [True] * (MAX_N)
isprime[0] = False
isprime[1] = False
for i in range(2, MAX_N):
if not isprime[i]:
continue
for j in range(i+i, MAX_N, i):
isprime[j] = False
T = int(input())
for _ in range(T):
n = int(input())
for i in range(n//2, 1, -1):
if isprim... | 21 | 39 | 0.513784 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | 0.017544 |
65c451b4c4af62ac430c54bacf4793ebfef0c2ef | 48,201 | py | Python | pysnmp-with-texts/DOCS-LOADBALANCING-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 8 | 2019-05-09T17:04:00.000Z | 2021-06-09T06:50:51.000Z | pysnmp-with-texts/DOCS-LOADBALANCING-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 4 | 2019-05-31T16:42:59.000Z | 2020-01-31T21:57:17.000Z | pysnmp-with-texts/DOCS-LOADBALANCING-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module DOCS-LOADBALANCING-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/DOCS-LOADBALANCING-MIB
# Produced by pysmi-0.3.4 at Wed May 1 12:53:17 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (d... | 187.552529 | 4,381 | 0.801954 | 1,167 | 0.024211 | 0 | 0 | 0 | 0 | 0 | 0 | 22,276 | 0.462148 |
65c5048befc6241d54580f74f3551d1f18adabab | 671 | py | Python | src/interview-cake/permutation-palindrome/test_permutation_palindrome.py | nwthomas/code-challenges | 49c2532ff597495474e67b13f2ed9b9ad93d40b5 | [
"MIT"
] | 1 | 2020-12-11T05:54:59.000Z | 2020-12-11T05:54:59.000Z | src/interview-cake/permutation-palindrome/test_permutation_palindrome.py | nwthomas/code-challenges | 49c2532ff597495474e67b13f2ed9b9ad93d40b5 | [
"MIT"
] | 1 | 2021-04-10T06:53:30.000Z | 2021-04-10T06:53:30.000Z | src/interview-cake/permutation-palindrome/test_permutation_palindrome.py | nwthomas/code-challenges | 49c2532ff597495474e67b13f2ed9b9ad93d40b5 | [
"MIT"
] | 7 | 2019-11-24T12:10:35.000Z | 2020-12-14T22:36:31.000Z | from permutation_palindrome import is_permutation_palindrome
import unittest
class TestIsPermutationPalindrome(unittest.TestCase):
def test_returns_true_if_possible_palindrome(self):
"""Returns true if a palindrome is possible with a given permutation of a string"""
result = is_permutation_palindr... | 35.315789 | 96 | 0.754098 | 542 | 0.80775 | 0 | 0 | 0 | 0 | 0 | 0 | 208 | 0.309985 |
65c5b96f2aa86a20d59448029f070a81f3667eea | 3,199 | py | Python | sagemaker_tidymodels/tidymodels.py | tmastny/sagemaker-tidymodels | fdb6a71d2ca54b7ffce7c5bab12067413ebb4026 | [
"MIT"
] | 3 | 2020-11-23T18:16:05.000Z | 2021-03-23T16:48:24.000Z | sagemaker_tidymodels/tidymodels.py | tmastny/sagemaker-tidymodels | fdb6a71d2ca54b7ffce7c5bab12067413ebb4026 | [
"MIT"
] | 4 | 2020-07-25T21:49:55.000Z | 2020-08-03T15:37:49.000Z | sagemaker_tidymodels/tidymodels.py | tmastny/sagemaker-tidymodels | fdb6a71d2ca54b7ffce7c5bab12067413ebb4026 | [
"MIT"
] | null | null | null | from sagemaker.estimator import Framework
from sagemaker.model import FrameworkModel
from sagemaker.predictor import RealTimePredictor
import subprocess
def _run_command(command):
return (
subprocess.run(command.split(" "), stdout=subprocess.PIPE,)
.stdout.decode("utf-8")
.strip()
)
... | 30.759615 | 147 | 0.660832 | 2,506 | 0.78337 | 0 | 0 | 353 | 0.110347 | 0 | 0 | 586 | 0.183182 |
65c60fb41ff8d93478e349410ca2f8f7c41a7cea | 835 | py | Python | articles/pdf2bib.py | kenbeese/articles | 389ed551fb5ed0c6a5c64726e527acd6154e83f5 | [
"BSD-3-Clause"
] | 4 | 2015-02-07T10:04:50.000Z | 2022-01-17T18:33:26.000Z | articles/pdf2bib.py | termoshtt/articles | 389ed551fb5ed0c6a5c64726e527acd6154e83f5 | [
"BSD-3-Clause"
] | null | null | null | articles/pdf2bib.py | termoshtt/articles | 389ed551fb5ed0c6a5c64726e527acd6154e83f5 | [
"BSD-3-Clause"
] | null | null | null | # coding=utf-8
def pdf2text(pdf_path,encoding="ASCII7"):
import subprocess
import os.path
pdf_path = os.path.abspath(pdf_path)
subprocess.call(["pdftotext","-l","1","-enc",encoding,"-q",pdf_path])
text = os.path.splitext(pdf_path)[0] + ".txt"
return text
def pick_out_doi(txt):
import re
... | 27.833333 | 86 | 0.589222 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 201 | 0.240719 |
65c64d0d6e346b2c86db0238e477f1aee46d6160 | 2,313 | py | Python | tensorflow/python/data/experimental/kernel_tests/serialization/textline_dataset_serialization_test.py | DanMitroshin/tensorflow | 74aa353842f1788bdb7506ecceaf6ba99140e165 | [
"Apache-2.0"
] | 4 | 2021-06-02T03:21:44.000Z | 2021-11-08T09:47:24.000Z | tensorflow/python/data/experimental/kernel_tests/serialization/textline_dataset_serialization_test.py | DanMitroshin/tensorflow | 74aa353842f1788bdb7506ecceaf6ba99140e165 | [
"Apache-2.0"
] | 7 | 2021-11-10T20:21:23.000Z | 2022-03-22T19:18:39.000Z | tensorflow/python/data/experimental/kernel_tests/serialization/textline_dataset_serialization_test.py | DanMitroshin/tensorflow | 74aa353842f1788bdb7506ecceaf6ba99140e165 | [
"Apache-2.0"
] | 3 | 2021-05-09T13:41:29.000Z | 2021-06-24T06:12:05.000Z | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 39.20339 | 89 | 0.750108 | 1,000 | 0.432339 | 0 | 0 | 641 | 0.277129 | 0 | 0 | 818 | 0.353653 |
65c8b9280ebaf25f0fb4b1658671be5a8f2ed641 | 228 | py | Python | apps/news/forms.py | LishenZz/my_project | c2ac8199efb467e303d343ea34ed1969b64280d7 | [
"Apache-2.0"
] | null | null | null | apps/news/forms.py | LishenZz/my_project | c2ac8199efb467e303d343ea34ed1969b64280d7 | [
"Apache-2.0"
] | null | null | null | apps/news/forms.py | LishenZz/my_project | c2ac8199efb467e303d343ea34ed1969b64280d7 | [
"Apache-2.0"
] | null | null | null | #Author:Li Shen
from django import forms
from apps.forms import FormMixin
class PublicCommentForm(forms.Form,FormMixin):
#CharField字长在form可不定义,但是在model模型中必须定义
content=forms.CharField()
news_id=forms.IntegerField()
| 22.8 | 46 | 0.79386 | 187 | 0.708333 | 0 | 0 | 0 | 0 | 0 | 0 | 88 | 0.333333 |
65c9968621cc82c96799c6059ed2551c70dfc1c5 | 6,446 | py | Python | data_preprocessing.py | hwRG/FastSpeech2-Pytorch-old-man_city | c32ee3a09bf2a53fcd17a2d0b74e8d1c93586573 | [
"MIT"
] | null | null | null | data_preprocessing.py | hwRG/FastSpeech2-Pytorch-old-man_city | c32ee3a09bf2a53fcd17a2d0b74e8d1c93586573 | [
"MIT"
] | null | null | null | data_preprocessing.py | hwRG/FastSpeech2-Pytorch-old-man_city | c32ee3a09bf2a53fcd17a2d0b74e8d1c93586573 | [
"MIT"
] | null | null | null | ### Data Preprocessing
## 1. Json to Transcript
## 2. Aligner
## 3. Text Replace
from jamo import h2j
import json
import os, re, tqdm
import unicodedata
from tqdm import tqdm
import hparams as hp
name = hp.dataset
first_dir = os.getcwd()
transcript = name + '_transcript.txt'
dict_name = name + '_k... | 31.910891 | 135 | 0.51691 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,248 | 0.191001 |
65cb00b6e400d3acf13ccac0a2014cd803772f2a | 1,435 | py | Python | cachet-tools/purge-cachet.py | thearifismail/black-box-tester | 23114fa73394a141bc091d6903e3ef4202f80bbf | [
"MIT"
] | null | null | null | cachet-tools/purge-cachet.py | thearifismail/black-box-tester | 23114fa73394a141bc091d6903e3ef4202f80bbf | [
"MIT"
] | 3 | 2020-01-02T13:04:07.000Z | 2020-02-05T14:18:50.000Z | cachet-tools/purge-cachet.py | thearifismail/black-box-tester | 23114fa73394a141bc091d6903e3ef4202f80bbf | [
"MIT"
] | 5 | 2019-11-07T20:55:05.000Z | 2020-07-15T13:59:07.000Z | #!/usr/bin/env python3
import requests
import os
import json
CACHET_HOSTNAME = os.environ.get("CACHET_HOSTNAME")
URL = f"https://{CACHET_HOSTNAME}/api/v1/components"
HEADERS = {
'X-Cachet-Token': os.environ.get("CACHET_TOKEN")
}
with requests.Session() as session:
session.headers.update(HEADERS)
respon... | 33.372093 | 82 | 0.622997 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 435 | 0.303136 |
65cb24c821d26b2c77253d1d9836328c541460bf | 489 | py | Python | astrophysics_toolset/utilities/tests/test_funcs.py | cphyc/astrophysics_toolset | 36be3f459a1bbca73af6f39f0957bfac0cb122eb | [
"MIT"
] | 3 | 2020-07-19T15:46:48.000Z | 2021-08-02T21:58:49.000Z | astrophysics_toolset/utilities/tests/test_funcs.py | cphyc/astrophysics_toolset | 36be3f459a1bbca73af6f39f0957bfac0cb122eb | [
"MIT"
] | 30 | 2020-05-12T11:07:47.000Z | 2022-02-27T12:54:08.000Z | astrophysics_toolset/utilities/tests/test_funcs.py | cphyc/astrophysics_toolset | 36be3f459a1bbca73af6f39f0957bfac0cb122eb | [
"MIT"
] | null | null | null | import numpy as np
from mpmath import besselj, mpf, pi, sqrt
from ..funcs import j1_over_x
@np.vectorize
def mpmath_jn_over_x(i, x):
xx = mpf(x)
if x == 0:
return float(1 / mpf(3))
else:
return float(sqrt(pi / mpf(2) / xx) * besselj(i + mpf("1/2"), xx) / xx)
def test_j1_over_x():
x ... | 21.26087 | 79 | 0.615542 | 0 | 0 | 0 | 0 | 195 | 0.398773 | 0 | 0 | 5 | 0.010225 |
65cb50fe55b88d486a160d6a37760bb1772d7906 | 2,176 | py | Python | tools/isolate-run.py | France-ioi/taskgrader | 72b043195af752d68cfee1d28fb52ae6012bc9a2 | [
"MIT"
] | 12 | 2015-02-19T20:09:04.000Z | 2021-12-25T13:52:17.000Z | tools/isolate-run.py | France-ioi/taskgrader | 72b043195af752d68cfee1d28fb52ae6012bc9a2 | [
"MIT"
] | 102 | 2015-08-03T14:07:46.000Z | 2022-02-18T19:56:55.000Z | tools/isolate-run.py | France-ioi/taskgrader | 72b043195af752d68cfee1d28fb52ae6012bc9a2 | [
"MIT"
] | 3 | 2016-05-12T15:03:16.000Z | 2019-07-31T14:38:24.000Z | #!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
# Copyright (c) 2016 France-IOI, MIT license
#
# http://opensource.org/licenses/MIT
# This tool launches an isolated execution. It is intended as a wrapper around
# the execution of any command.
import argparse, os, sys
DEFAULT_EXECPARAMS = {
'timeLimitMs': 60000... | 35.672131 | 168 | 0.696691 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 923 | 0.424173 |
65cc242de89c19efa4090dc93f9caa33777e25e0 | 837 | py | Python | monitor/monitorlibs/sendemail.py | vaedit/- | 4e68910737ac794390df05ac34a6cf46339b0002 | [
"Apache-2.0"
] | 1 | 2021-04-09T05:47:42.000Z | 2021-04-09T05:47:42.000Z | monitor/monitorlibs/sendemail.py | vaedit/python-monitor-script | 4e68910737ac794390df05ac34a6cf46339b0002 | [
"Apache-2.0"
] | null | null | null | monitor/monitorlibs/sendemail.py | vaedit/python-monitor-script | 4e68910737ac794390df05ac34a6cf46339b0002 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding:utf-8 -*-
import smtplib
from email.mime.text import MIMEText
from email.header import Header
#发送邮件函数
def smail(sub,body):
tolist = ["[email protected]", "[email protected]"]
cc = ["[email protected]", "[email protected]"]
sender = '管理员 <[email protected]>'
subject = sub
smtpserver = 'smtp.1... | 26.15625 | 54 | 0.577061 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 271 | 0.307605 |
65ccdd74df24a36712a75efa27299093b23c6844 | 583 | py | Python | submissions/abc146/f.py | m-star18/atcoder | 08e475810516602fa088f87daf1eba590b4e07cc | [
"Unlicense"
] | 1 | 2021-05-10T01:16:28.000Z | 2021-05-10T01:16:28.000Z | submissions/abc146/f.py | m-star18/atcoder | 08e475810516602fa088f87daf1eba590b4e07cc | [
"Unlicense"
] | 3 | 2021-05-11T06:14:15.000Z | 2021-06-19T08:18:36.000Z | submissions/abc146/f.py | m-star18/atcoder | 08e475810516602fa088f87daf1eba590b4e07cc | [
"Unlicense"
] | null | null | null | import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)
from collections import deque
n, m = map(int, readline().split())
s = readline().rstrip().decode()[::-1]
index = 0
ans = deque([])
for i in range(n):
for j in range(m,... | 22.423077 | 38 | 0.538593 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 0.005146 |
65cd5a403032e83361e632b7cbcf870eef107bce | 1,790 | py | Python | src/tests/__init__.py | laichimirum/docker-appium-emulator | 3549c5f1fc09bbc650dd30351ad4f509a72a90fa | [
"Apache-2.0"
] | 8 | 2019-04-26T04:09:40.000Z | 2022-01-04T05:24:12.000Z | src/tests/__init__.py | laichimirum/docker-appium-emulator | 3549c5f1fc09bbc650dd30351ad4f509a72a90fa | [
"Apache-2.0"
] | null | null | null | src/tests/__init__.py | laichimirum/docker-appium-emulator | 3549c5f1fc09bbc650dd30351ad4f509a72a90fa | [
"Apache-2.0"
] | 2 | 2019-12-16T15:34:57.000Z | 2020-10-22T07:03:15.000Z | """Unit test to test app."""
import os
from unittest import TestCase
import mock
from src import app
class TestApp(TestCase):
"""Unit test class to test other methods in the app."""
def test_valid_env(self):
key = 'ENV_1'
os.environ[key] = 'test'
app.get_or_raise(key)
del os... | 32.545455 | 70 | 0.653073 | 1,684 | 0.940782 | 0 | 0 | 844 | 0.471508 | 0 | 0 | 262 | 0.146369 |
65cdd034fed36877b4031f60332f1c40cdb5f6a5 | 2,224 | py | Python | tools/python-mock-server/python-mock-server.py | msmagnanijr/jboss-kie-modules | 1ab85aa12e70db810a4d607fb6aaa85a19bb8607 | [
"Apache-2.0"
] | 8 | 2018-07-20T02:32:39.000Z | 2022-03-27T10:52:55.000Z | tools/python-mock-server/python-mock-server.py | msmagnanijr/jboss-kie-modules | 1ab85aa12e70db810a4d607fb6aaa85a19bb8607 | [
"Apache-2.0"
] | 167 | 2017-12-19T14:33:35.000Z | 2022-03-22T11:47:20.000Z | tools/python-mock-server/python-mock-server.py | msmagnanijr/jboss-kie-modules | 1ab85aa12e70db810a4d607fb6aaa85a19bb8607 | [
"Apache-2.0"
] | 52 | 2017-12-18T13:55:24.000Z | 2022-02-09T14:07:14.000Z | #!/usr/bin/python3
import os
import sys
from http.server import HTTPServer, BaseHTTPRequestHandler
class MyHandler(BaseHTTPRequestHandler):
def do_GET(self):
# do not change paths
if self.path == '/apis/apps.openshift.io/v1/namespaces/testNamespace/deploymentconfigs?labelSelector=services.server... | 37.694915 | 179 | 0.642536 | 2,045 | 0.919514 | 0 | 0 | 0 | 0 | 0 | 0 | 850 | 0.382194 |
65cff554030214e04d5a8a2df9a42dced600b89e | 11,487 | py | Python | test/nn/test_nonlinearities_fliprotations.py | steven-lang/e2cnn | 48f49760766ec958b52d0dd7b02483886dfa2096 | [
"BSD-3-Clause"
] | 356 | 2019-11-22T10:37:22.000Z | 2022-03-25T14:42:45.000Z | test/nn/test_nonlinearities_fliprotations.py | steven-lang/e2cnn | 48f49760766ec958b52d0dd7b02483886dfa2096 | [
"BSD-3-Clause"
] | 52 | 2020-01-20T16:51:36.000Z | 2022-03-31T21:40:19.000Z | test/nn/test_nonlinearities_fliprotations.py | steven-lang/e2cnn | 48f49760766ec958b52d0dd7b02483886dfa2096 | [
"BSD-3-Clause"
] | 48 | 2019-12-11T09:29:30.000Z | 2022-03-18T17:51:55.000Z | import unittest
from unittest import TestCase
from e2cnn.nn import *
from e2cnn.gspaces import *
import random
class TestNonLinearitiesFlipRotations(TestCase):
def test_dihedral_norm_relu(self):
N = 8
g = FlipRot2dOnR2(N)
r = FieldType(g, list(g.representations.values()) * ... | 30.149606 | 107 | 0.572038 | 11,322 | 0.985636 | 0 | 0 | 0 | 0 | 0 | 0 | 412 | 0.035867 |
65d01a4d1ad87624330d3bcc5a359ecdd7b3f0fa | 5,880 | py | Python | TestModule/AnonymousPlayerTest.py | INYEONGKIM/Quattro | 0fd70b08716f71404f520941791cd314d90de83a | [
"MIT"
] | null | null | null | TestModule/AnonymousPlayerTest.py | INYEONGKIM/Quattro | 0fd70b08716f71404f520941791cd314d90de83a | [
"MIT"
] | null | null | null | TestModule/AnonymousPlayerTest.py | INYEONGKIM/Quattro | 0fd70b08716f71404f520941791cd314d90de83a | [
"MIT"
] | null | null | null | import unittest
from QuattroComponents.Player import Anonymous_player
from QuattroComponents.Card import Card
from TestModule.GetMethodName import get_method_name_decorator
from collections import deque
def reset_player_attributes(anonymous: Anonymous_player):
anonymous.player1_changed = False
anonymous.playe... | 43.880597 | 126 | 0.633844 | 5,538 | 0.941837 | 0 | 0 | 5,358 | 0.911224 | 0 | 0 | 431 | 0.073299 |
65d0a80d19258c77b9d91fc06cfaa6455396ecc8 | 10,012 | py | Python | octopus_deploy_swagger_client/models/phase_resource.py | cvent/octopus-deploy-api-client | 0e03e842e1beb29b132776aee077df570b88366a | [
"Apache-2.0"
] | null | null | null | octopus_deploy_swagger_client/models/phase_resource.py | cvent/octopus-deploy-api-client | 0e03e842e1beb29b132776aee077df570b88366a | [
"Apache-2.0"
] | null | null | null | octopus_deploy_swagger_client/models/phase_resource.py | cvent/octopus-deploy-api-client | 0e03e842e1beb29b132776aee077df570b88366a | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Octopus Server API
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: 2019.6.7+Branch.tags-2019.6.7.Sha.aa18dc6809953218c66f57eff7d26481d9b23d6a
Generated by: https://github.com/swagger-api... | 33.373333 | 257 | 0.663504 | 9,510 | 0.94986 | 0 | 0 | 5,074 | 0.506792 | 0 | 0 | 4,724 | 0.471834 |
65d15f45a4747bc3b8090b4f6795c908d2c9cd6a | 660 | py | Python | src/cryptoadvance/specter/util/common.py | jonathancross/specter-desktop | 0178aa3879134415d63d62098b7f4f1b17db1d13 | [
"MIT"
] | null | null | null | src/cryptoadvance/specter/util/common.py | jonathancross/specter-desktop | 0178aa3879134415d63d62098b7f4f1b17db1d13 | [
"MIT"
] | null | null | null | src/cryptoadvance/specter/util/common.py | jonathancross/specter-desktop | 0178aa3879134415d63d62098b7f4f1b17db1d13 | [
"MIT"
] | null | null | null | import re
def str2bool(my_str):
"""returns a reasonable boolean from a string so that "False" will result in False"""
if my_str is None:
return False
elif isinstance(my_str, str) and my_str.lower() == "false":
return False
elif isinstance(my_str, str) and my_str.lower() == "off":
... | 27.5 | 89 | 0.645455 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 183 | 0.277273 |