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
445ef4455f305009ac0e1b4aeb8c80e0b3115162
20,825
py
Python
wolfgang_robot/wolfgang_pybullet_sim/src/wolfgang_pybullet_sim/simulation.py
MosHumanoid/bitbots_thmos_meta
f45ccc362dc689b69027be5b0d000d2a08580de4
[ "MIT" ]
null
null
null
wolfgang_robot/wolfgang_pybullet_sim/src/wolfgang_pybullet_sim/simulation.py
MosHumanoid/bitbots_thmos_meta
f45ccc362dc689b69027be5b0d000d2a08580de4
[ "MIT" ]
null
null
null
wolfgang_robot/wolfgang_pybullet_sim/src/wolfgang_pybullet_sim/simulation.py
MosHumanoid/bitbots_thmos_meta
f45ccc362dc689b69027be5b0d000d2a08580de4
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import math import sys import os import time import pybullet as p from time import sleep import time import rospy import tf from scipy import signal import pybullet_data import rospkg from transforms3d.quaternions import quat2mat from wolfgang_pybullet_sim.terrain import Terrain import numpy as...
47.115385
120
0.585066
20,493
0.984058
0
0
0
0
0
0
3,788
0.181897
4460bbb142aa4c99178afe32a15838a44e96e1f2
11,641
py
Python
dataloader_cifar.py
pizard/DivideMix
9610201b9eb5dc871a77bf12017c137be291c71c
[ "MIT" ]
null
null
null
dataloader_cifar.py
pizard/DivideMix
9610201b9eb5dc871a77bf12017c137be291c71c
[ "MIT" ]
null
null
null
dataloader_cifar.py
pizard/DivideMix
9610201b9eb5dc871a77bf12017c137be291c71c
[ "MIT" ]
null
null
null
from torch.utils.data import Dataset, DataLoader import torchvision.transforms as transforms import random import numpy as np from PIL import Image import json import os from torchnet.meter import AUCMeter def uniform_mix_C(mixing_ratio, num_classes): ''' returns a linear interpolation of a uniform matrix and a...
44.601533
259
0.545486
9,951
0.852772
0
0
0
0
0
0
1,542
0.132145
4460e4feed0f72a43de6ee2899df2357b585c9b2
4,134
py
Python
tests/render-out/Drawing13.py
debragail/reportlab-mirror
1e5814e1313ed50d5abb65487b207711cb4f7595
[ "BSD-3-Clause" ]
1
2020-05-21T23:34:55.000Z
2020-05-21T23:34:55.000Z
tests/render-out/Drawing13.py
debragail/reportlab-mirror
1e5814e1313ed50d5abb65487b207711cb4f7595
[ "BSD-3-Clause" ]
null
null
null
tests/render-out/Drawing13.py
debragail/reportlab-mirror
1e5814e1313ed50d5abb65487b207711cb4f7595
[ "BSD-3-Clause" ]
null
null
null
#Autogenerated by ReportLab guiedit do not edit from reportlab.graphics.shapes import _DrawingEditorMixin, Drawing, Group, Rect, String from reportlab.lib.colors import Color, CMYKColor, PCMYKColor class ExplodedDrawing_Drawing(_DrawingEditorMixin,Drawing): def __init__(self,width=756.284,height=240.20000000000002,*a...
142.551724
242
0.779149
3,935
0.926755
0
0
0
0
0
0
1,158
0.272727
4460f4628cd89ed83a3cb70a7461035c26830bb4
2,971
py
Python
rnnparser/RecursiveNN/tests/test_vectorized_variables.py
uphere-co/nlp-prototype
c4623927e5c5c5f9c3e702eb36497ea1d9fd1ff3
[ "BSD-3-Clause" ]
null
null
null
rnnparser/RecursiveNN/tests/test_vectorized_variables.py
uphere-co/nlp-prototype
c4623927e5c5c5f9c3e702eb36497ea1d9fd1ff3
[ "BSD-3-Clause" ]
null
null
null
rnnparser/RecursiveNN/tests/test_vectorized_variables.py
uphere-co/nlp-prototype
c4623927e5c5c5f9c3e702eb36497ea1d9fd1ff3
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- import numpy as np import pytest from vecGraphComp.base import MatrixValues, ValueHolder, Block, NodeType, ExpressionWriter def test_numpy_structure_of_arrays_with_expand_dims(): m,n = 200,100 x1=np.random.random((n,1)) x2=np.random.random((n,1)) A=np.random.random((m,n)) x...
30.947917
90
0.63211
0
0
0
0
0
0
0
0
481
0.161247
4462a86f114257e11040144f6da38d51df8b1bf2
6,421
py
Python
code/pyorg/scripts/ribo_mt/particles_curator.py
anmartinezs/pyseg_system
5bb07c7901062452a34b73f376057cabc15a13c3
[ "Apache-2.0" ]
12
2020-01-08T01:33:02.000Z
2022-03-16T00:25:34.000Z
code/pyorg/scripts/ribo_mt/particles_curator.py
anmartinezs/pyseg_system
5bb07c7901062452a34b73f376057cabc15a13c3
[ "Apache-2.0" ]
8
2019-12-19T19:34:56.000Z
2022-03-10T10:11:28.000Z
code/pyorg/scripts/ribo_mt/particles_curator.py
anmartinezs/pyseg_system
5bb07c7901062452a34b73f376057cabc15a13c3
[ "Apache-2.0" ]
2
2022-03-30T13:12:22.000Z
2022-03-30T18:12:10.000Z
""" Curates an output STAR file from Relion to work as input for pyseg.pyorg scripts for microtubules Input: - STAR file with the particles to curate - STAR file to pair tomograms used for reconstruction with the one segmented used to pick the particles Output: - A curated output STAR file ...
35.672222
115
0.63339
0
0
0
0
0
0
0
0
2,613
0.406946
4462c41b0b42cc76b2753d10c545dd05d91c8946
1,954
py
Python
tests/test_proprietor_validation.py
LandRegistry/datatypes-alpha
b7ec20c9aec84697aa49aaf6bff52fac3770a942
[ "MIT" ]
null
null
null
tests/test_proprietor_validation.py
LandRegistry/datatypes-alpha
b7ec20c9aec84697aa49aaf6bff52fac3770a942
[ "MIT" ]
null
null
null
tests/test_proprietor_validation.py
LandRegistry/datatypes-alpha
b7ec20c9aec84697aa49aaf6bff52fac3770a942
[ "MIT" ]
1
2021-04-11T06:07:21.000Z
2021-04-11T06:07:21.000Z
import unittest from copy import deepcopy from datatypes.exceptions import DataDoesNotMatchSchemaException from datatypes import proprietor_validator from datatypes.core import unicoded proprietor = unicoded({ "title" : "Mrs", "full_name": "Bootata Smick", "decoration": "tidy" }) proprietor_with_additi...
39.08
149
0.754862
1,487
0.761003
0
0
0
0
0
0
326
0.166837
446311708b993bd3bd09966b836ad93712d7141b
2,999
py
Python
neuralknight/tests/test_mock_board_integration.py
grandquista/neuralknight-v1
f54e8e1ac90019c1a3a84089bac20485e8f626b4
[ "MIT" ]
null
null
null
neuralknight/tests/test_mock_board_integration.py
grandquista/neuralknight-v1
f54e8e1ac90019c1a3a84089bac20485e8f626b4
[ "MIT" ]
158
2018-08-14T17:42:49.000Z
2021-08-19T13:19:44.000Z
neuralknight/tests/test_mock_board_integration.py
grandquista/neuralknight-v1
f54e8e1ac90019c1a3a84089bac20485e8f626b4
[ "MIT" ]
2
2018-04-06T02:40:16.000Z
2018-04-16T16:13:21.000Z
from ..models.base_agent import BaseAgent class MockAgent(BaseAgent): def __init__(self, testapp, moves, game_id, player): self.testapp = testapp self.args = [] self.kwargs = [] self.moves = iter(moves) self.past_end = False super().__init__(game_id, player) de...
32.247312
64
0.481827
524
0.174725
0
0
0
0
0
0
1,733
0.577859
44632699c65d23e5e6c27862e4557240a69f61f0
1,888
py
Python
Selenium-Test/script.py
zeabdelkhalek/TP-IGL-Client
b75904df147fa3905d5e8e1d666ef54e3aefe4a2
[ "MIT" ]
1
2020-05-11T02:38:22.000Z
2020-05-11T02:38:22.000Z
Selenium-Test/script.py
AbdelkhalekESI/TP-IGL-Client
b75904df147fa3905d5e8e1d666ef54e3aefe4a2
[ "MIT" ]
3
2020-07-19T04:53:34.000Z
2021-05-10T23:00:57.000Z
Selenium-Test/script.py
zeabdelkhalek/TP-IGL-Client
b75904df147fa3905d5e8e1d666ef54e3aefe4a2
[ "MIT" ]
null
null
null
from selenium import webdriver import time from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.common.exceptions import TimeoutException options = webdriver.ChromeOptions() options.add_argument('--disable-web-security') url='http://127...
32.551724
73
0.739407
0
0
0
0
0
0
0
0
625
0.330863
4463d5e39650a4e7422e085de2d3acc28f0ff1e9
815
py
Python
python100days/day09/multi.py
lanSeFangZhou/pythonbase
f4daa373573b2fc0a59a5eb919d02eddf5914e18
[ "Apache-2.0" ]
null
null
null
python100days/day09/multi.py
lanSeFangZhou/pythonbase
f4daa373573b2fc0a59a5eb919d02eddf5914e18
[ "Apache-2.0" ]
1
2021-06-02T00:58:26.000Z
2021-06-02T00:58:26.000Z
python100days/day09/multi.py
lanSeFangZhou/pythonbase
f4daa373573b2fc0a59a5eb919d02eddf5914e18
[ "Apache-2.0" ]
null
null
null
''' 多重继承 - 通过多重继承可以给一个类的对象具备多方面的能力 - 这样在设计类的时候可以避免设计太多层次的复杂的继承关系 ''' class Father(object): def _init_(self, name): self._name = name def gamble(self): print('%s在打麻将.' % self._name) def eat(self): print('%s在大吃大喝.' % self._name) class Monk(object): def _init_(self, name): ...
18.111111
38
0.619632
595
0.587364
0
0
0
0
0
0
416
0.410661
446691647b7b65b8fcd033c966f9edcd95dfe8b8
907
py
Python
src/plots/experiments_1.py
ekreutz/bayes-cv-pruning
a82888fcc8771fdf90d51bd6c37c5bc7a449c81a
[ "MIT" ]
null
null
null
src/plots/experiments_1.py
ekreutz/bayes-cv-pruning
a82888fcc8771fdf90d51bd6c37c5bc7a449c81a
[ "MIT" ]
null
null
null
src/plots/experiments_1.py
ekreutz/bayes-cv-pruning
a82888fcc8771fdf90d51bd6c37c5bc7a449c81a
[ "MIT" ]
null
null
null
import os import pickle import numpy as np import matplotlib.font_manager as font_manager import matplotlib.pyplot as plt import seaborn as sns # Plot sns.set(context="paper", style="whitegrid", font="STIXGeneral", font_scale=1.25) def plot(): CURRENT_PATH = os.path.dirname(os.path.realpath(__file__)) # Fi...
29.258065
80
0.654906
0
0
0
0
0
0
0
0
236
0.260198
44674ec2d9f2bc00d3172b73a93d3bb416c64936
1,661
py
Python
cyberexperiment/core/models.py
udrems/cyberexperiment
9ad9c9580cd9dd1c28c0d8e27975f5bca530e101
[ "MIT" ]
null
null
null
cyberexperiment/core/models.py
udrems/cyberexperiment
9ad9c9580cd9dd1c28c0d8e27975f5bca530e101
[ "MIT" ]
4
2021-09-10T16:21:53.000Z
2021-09-17T18:04:22.000Z
cyberexperiment/core/models.py
udrems/cyberexperiment
9ad9c9580cd9dd1c28c0d8e27975f5bca530e101
[ "MIT" ]
2
2021-09-08T07:50:59.000Z
2021-09-08T16:15:26.000Z
from django.conf import settings from django.db import models from django.shortcuts import redirect class TimeStamp(models.Model): """timestamp to capture all the time of event in the database""" created_at = models.DateTimeField(auto_now_add=True) modified_at = models.DateTimeField(auto_now=True) c...
27.229508
110
0.713426
1,451
0.87357
0
0
0
0
0
0
298
0.17941
44677c1268d64c9902a9bcde21123859ab265c49
709
py
Python
quickstart.py
adamstimb/nimbusinator
a7bb7e282b8322c1a97bffc3c40ab0541f746615
[ "MIT" ]
null
null
null
quickstart.py
adamstimb/nimbusinator
a7bb7e282b8322c1a97bffc3c40ab0541f746615
[ "MIT" ]
16
2019-11-23T19:08:45.000Z
2020-03-13T17:13:23.000Z
quickstart.py
adamstimb/nimbusinator
a7bb7e282b8322c1a97bffc3c40ab0541f746615
[ "MIT" ]
null
null
null
from nimbusinator.nimbus import Nimbus from nimbusinator.command import Command if __name__ == '__main__': # Create and bind nimbusinator objects: nim = Nimbus(full_screen=True) cmd = Command(nim) nim.boot() # Boot the Nimbus cmd.set_mode(40) # Low resolution mode cmd.set_border(1)...
33.761905
57
0.638928
0
0
0
0
0
0
0
0
255
0.359661
4467af496402d2c4c04283d114962eb0a43111b9
264
py
Python
03-threads/threads_example.py
LeandroMelloo/programacao_concorrente_assincrona_com_python
49790de6004d588ccc2a07d1be0c420d6a1e4b7a
[ "Apache-2.0" ]
null
null
null
03-threads/threads_example.py
LeandroMelloo/programacao_concorrente_assincrona_com_python
49790de6004d588ccc2a07d1be0c420d6a1e4b7a
[ "Apache-2.0" ]
null
null
null
03-threads/threads_example.py
LeandroMelloo/programacao_concorrente_assincrona_com_python
49790de6004d588ccc2a07d1be0c420d6a1e4b7a
[ "Apache-2.0" ]
null
null
null
import threading def start_threading(param): print('Executa algo....') print(f'Utiliza o parâmetro recebido: {param}') return print(f'Resultado final: {param * param}') th = threading.Thread(target=start_threading, args=(5,)) th.start() th.join()
18.857143
56
0.689394
0
0
0
0
0
0
0
0
94
0.354717
4469f717f508277478e42eda4cc4da6b53f5509d
2,386
py
Python
bench_scenarios/generate_obj_based_scope.py
JanDorniak99/pmemkv-bench
c89cfec5bc12f8a54424572b149e843f9f5a5379
[ "Apache-2.0" ]
null
null
null
bench_scenarios/generate_obj_based_scope.py
JanDorniak99/pmemkv-bench
c89cfec5bc12f8a54424572b149e843f9f5a5379
[ "Apache-2.0" ]
null
null
null
bench_scenarios/generate_obj_based_scope.py
JanDorniak99/pmemkv-bench
c89cfec5bc12f8a54424572b149e843f9f5a5379
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # # SPDX-License-Identifier: Apache-2.0 # Copyright 2021, Intel Corporation # This script implements generate() method, which may be invoked by run_benchmark.py directly, # or used as standalone application, which prints configuration json (also validated against schema) # to stdout. Such once g...
29.097561
100
0.642498
0
0
0
0
0
0
0
0
926
0.388097
446a3b7125f8d81082029efd8515e3cb3a464996
453
py
Python
pyews/configuration/endpoint.py
kartones-forks/pyews
763f3eb7918e55fc6ea8ff1fa333657ae0d9c18f
[ "MIT" ]
1
2021-03-15T13:38:08.000Z
2021-03-15T13:38:08.000Z
pyews/configuration/endpoint.py
nautics889/pyews
e35ad7425bf100a2ae67e3d4b763cc5d2cc8d4f3
[ "MIT" ]
null
null
null
pyews/configuration/endpoint.py
nautics889/pyews
e35ad7425bf100a2ae67e3d4b763cc5d2cc8d4f3
[ "MIT" ]
null
null
null
class Endpoint: def __init__(self, domain=None): self.domain = domain def get(self): endpoint_list = ['https://outlook.office365.com/autodiscover/autodiscover.svc'] if self.domain: endpoint_list.append("https://{}/autodiscover/autodiscover.svc".format(self.domain)) ...
32.357143
109
0.673289
450
0.993377
0
0
0
0
0
0
158
0.348786
446a9b413000d786cd15da4f54dc59cd09eba6bf
9,450
py
Python
catan-simulator/src/Api/Catan.py
williamaredal/Catan-Simulator
27b5fa2bb77554fc5dfc67286899a70d3c41aeb4
[ "MIT" ]
null
null
null
catan-simulator/src/Api/Catan.py
williamaredal/Catan-Simulator
27b5fa2bb77554fc5dfc67286899a70d3c41aeb4
[ "MIT" ]
null
null
null
catan-simulator/src/Api/Catan.py
williamaredal/Catan-Simulator
27b5fa2bb77554fc5dfc67286899a70d3c41aeb4
[ "MIT" ]
null
null
null
from collections import Counter from random import choice import numpy as np # Figuring out the roads to victory requiring the minimum number of cards to achieve victory in catan class Ledger: def __init__( self, victoryPointCondition=10, villageSettlement=1, citySettlement=2, startVillages=...
31.605351
153
0.610899
3,120
0.330159
0
0
0
0
0
0
1,003
0.106138
446aff1f81c23a0f38cd568dd2d43f6846714b6e
29,745
py
Python
client_server_test INHERIT/LocalModel.py
hades208002/mdp-project
c242a8d00412cc3772d298986977f6acc47002ee
[ "MIT" ]
null
null
null
client_server_test INHERIT/LocalModel.py
hades208002/mdp-project
c242a8d00412cc3772d298986977f6acc47002ee
[ "MIT" ]
null
null
null
client_server_test INHERIT/LocalModel.py
hades208002/mdp-project
c242a8d00412cc3772d298986977f6acc47002ee
[ "MIT" ]
null
null
null
# Import all the useful libraries import numpy as np import pandas as pd import fancyimpute from sklearn import model_selection from sklearn.model_selection import StratifiedKFold from sklearn.ensemble import AdaBoostClassifier # PROBABILITY from sklearn.tree import DecisionTreeClassifier # PROBABILITY from sklearn....
59.49
605
0.755455
28,178
0.947192
0
0
0
0
0
0
17,945
0.603214
446b4021141854c01eb8346f6d3902a45b8ff171
4,455
py
Python
get_weibo.py
SUIBE-Blockchain/Data-Crawler-Practice
46f4b98f05923ab534e28e51456c87efc33dbb8d
[ "Apache-2.0" ]
1
2021-10-05T05:52:39.000Z
2021-10-05T05:52:39.000Z
get_weibo.py
SUIBE-Blockchain/Data-Crawler-Practice
46f4b98f05923ab534e28e51456c87efc33dbb8d
[ "Apache-2.0" ]
null
null
null
get_weibo.py
SUIBE-Blockchain/Data-Crawler-Practice
46f4b98f05923ab534e28e51456c87efc33dbb8d
[ "Apache-2.0" ]
7
2020-08-09T09:52:15.000Z
2020-08-16T08:04:02.000Z
import sys from bs4 import BeautifulSoup import re import urllib.request, urllib.error import xlwt # 进行Excel操作 import time def main(): Baseurl = 'https://weibo.cn/thepapernewsapp?page=' # 1.爬取网页 datalist = getdata(Baseurl) #IDlence = (len(datalist) - 1) savepath = "澎湃新闻.xls" # 3...
28.928571
412
0.525701
0
0
0
0
0
0
0
0
1,800
0.368626
446c1a08792230c1d74587f3d323492f2871df02
3,273
py
Python
mouse.py
AlbertMelo/MouseExpressions
8e2bc36d8378541d512e04b17908bdefac6090e8
[ "MIT" ]
3
2019-07-22T18:29:10.000Z
2019-09-11T12:24:05.000Z
mouse.py
AlbertMelo/MouseExpressions
8e2bc36d8378541d512e04b17908bdefac6090e8
[ "MIT" ]
7
2019-12-16T22:20:58.000Z
2022-02-10T00:50:45.000Z
mouse.py
AlbertMelo/MouseExpressions
8e2bc36d8378541d512e04b17908bdefac6090e8
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import pyautogui as pyg import os import subprocess import programa class Mouse(object): def __init__(self, QuadroXI, QuadroYI, Dimensao): self.TEMPO = 0 #Touchpad do monitor self.QuadroXI = QuadroXI - Dimensao self.QuadroYI = QuadroYI - Dimensao + int(Dimensao/3) self.QuadroXF ...
21.966443
101
0.676749
3,180
0.970696
0
0
0
0
0
0
940
0.286935
446d377b81da3c67728272ccd4cb25650010c8a7
549
py
Python
unittests/check_external_packages.py
davidharvey1986/rrg
26b4658f14279af21af1a61d57e9936daf315a71
[ "MIT" ]
2
2019-11-18T12:51:09.000Z
2019-12-11T03:13:51.000Z
unittests/check_external_packages.py
davidharvey1986/rrg
26b4658f14279af21af1a61d57e9936daf315a71
[ "MIT" ]
5
2017-06-09T10:06:27.000Z
2019-07-19T11:28:18.000Z
unittests/check_external_packages.py
davidharvey1986/rrg
26b4658f14279af21af1a61d57e9936daf315a71
[ "MIT" ]
2
2017-07-19T15:48:33.000Z
2017-08-09T16:07:20.000Z
import subprocess def check_external_packages(): try: stilts_path = subprocess.check_output(['which','stilts.sh']) except: raise ValueError('Cannot find STILTS please install and ensure it is in the shell path') try: stilts_path = subprocess.check_output(['which','sex']) ...
27.45
105
0.668488
0
0
0
0
0
0
0
0
214
0.3898
446d5bb17dd8a928ca7451126fb10c9f182c9616
6,084
py
Python
2020/day16/day16ab.py
jeremy-frank/advent-of-code
6a9dd284f0e67fea694548f1545402c579ef3f08
[ "MIT" ]
null
null
null
2020/day16/day16ab.py
jeremy-frank/advent-of-code
6a9dd284f0e67fea694548f1545402c579ef3f08
[ "MIT" ]
null
null
null
2020/day16/day16ab.py
jeremy-frank/advent-of-code
6a9dd284f0e67fea694548f1545402c579ef3f08
[ "MIT" ]
null
null
null
""" day16ab - https://adventofcode.com/2020/day/16 --- Day 16: Ticket Translation --- * Part 1 Three input files: the rules for ticket fields the numbers on your ticket the numbers on other nearby tickets The rules for ticket fields specify a list of fields that exist somewhere on the ticket and the valid r...
28.971429
100
0.619001
0
0
0
0
0
0
0
0
2,540
0.417488
446f6522d2f68fb06ab1adc22f7cb83ad19c1bfc
712
py
Python
docs/blog/2017/0610.py
CylonOven/blog
ddc560edb0445f950b39d441b569ef2258abc2d6
[ "BSD-2-Clause" ]
null
null
null
docs/blog/2017/0610.py
CylonOven/blog
ddc560edb0445f950b39d441b569ef2258abc2d6
[ "BSD-2-Clause" ]
null
null
null
docs/blog/2017/0610.py
CylonOven/blog
ddc560edb0445f950b39d441b569ef2258abc2d6
[ "BSD-2-Clause" ]
null
null
null
import random random.seed("lel") class table(object): changes= { '1':"@", '0':" " } def __init__(self, lists): self.data = lists @classmethod def gen_matix(cls, x, y): return cls( [ [random.choice((1,0)) for y in range(y)] for x in range(x) ...
20.342857
66
0.463483
639
0.897472
0
0
158
0.22191
0
0
47
0.066011
447050f1592cecfe7f5d28a4335436f9cc0b4d7b
228
py
Python
regtests/loop/while_else.py
bpmbank/PythonJS
591a80afd8233fb715493591db2b68f1748558d9
[ "BSD-3-Clause" ]
319
2015-01-02T11:34:16.000Z
2022-03-25T00:43:33.000Z
regtests/loop/while_else.py
bpmbank/PythonJS
591a80afd8233fb715493591db2b68f1748558d9
[ "BSD-3-Clause" ]
10
2015-02-03T02:33:09.000Z
2021-11-09T21:41:00.000Z
regtests/loop/while_else.py
bpmbank/PythonJS
591a80afd8233fb715493591db2b68f1748558d9
[ "BSD-3-Clause" ]
61
2015-01-02T12:01:56.000Z
2021-12-08T07:16:16.000Z
''' while else loop (DEPRECATED) ''' def main(): a = False i = 0 while i < 10: i += 1 else: a = True TestError( a==True ) b = False i = 0 while i < 10: i += 1 break else: b = True TestError( b==False )
8.769231
28
0.517544
0
0
0
0
0
0
0
0
36
0.157895
447144dab05f58bb3666adc6c76ca187a3b6abdf
2,116
py
Python
Firefly.py
iglennrogers/swarm_pyside
8930f668473c5f9b399c29661295be47f31b9164
[ "BSD-2-Clause" ]
null
null
null
Firefly.py
iglennrogers/swarm_pyside
8930f668473c5f9b399c29661295be47f31b9164
[ "BSD-2-Clause" ]
null
null
null
Firefly.py
iglennrogers/swarm_pyside
8930f668473c5f9b399c29661295be47f31b9164
[ "BSD-2-Clause" ]
null
null
null
import PySide.QtGui as QtGui import PySide.QtCore as QtCore import GravitionalObject as go class Firefly(go.GravitationalObject): def __init__(self): super(Firefly, self).__init__() self._acc = QtCore.QPointF() self._vel = QtCore.QPointF() self._pos = QtCore.QPointF() ...
32.553846
112
0.557183
2,012
0.950851
0
0
0
0
0
0
118
0.055766
44721cfa8e5eb18c5d3df0207aabe203967e7af7
14,325
py
Python
translate.py
mursalinkhan0018/python-translation-project
11a4b333cea3aaee1a90291898c293c7a6f96c45
[ "CC-BY-4.0" ]
null
null
null
translate.py
mursalinkhan0018/python-translation-project
11a4b333cea3aaee1a90291898c293c7a6f96c45
[ "CC-BY-4.0" ]
null
null
null
translate.py
mursalinkhan0018/python-translation-project
11a4b333cea3aaee1a90291898c293c7a6f96c45
[ "CC-BY-4.0" ]
null
null
null
#! /usr/bin/env python3 import sys #1 DONE!!! Passed 9/10 def translate_sequence(rna_sequence, genetic_code): pass # Read and get the RNA string rna = rna_sequence.upper() print ("\n \n RNA String: ", rna) x=len(rna) if x < 3: return '' # RNA codon table(make sure you have it) protein...
28.198819
787
0.530471
0
0
0
0
0
0
0
0
4,112
0.287051
44738fe37e6ee74c46f89a6a97da23dbbd1f4bcc
289
py
Python
utils/parsing.py
Cherimolah/TeaBot
6c475bc70e2d71b37d613fbd4df16529d4c1d28c
[ "MIT" ]
2
2021-12-26T09:31:15.000Z
2022-02-15T17:08:19.000Z
utils/parsing.py
Cherimolah/TeaBot
6c475bc70e2d71b37d613fbd4df16529d4c1d28c
[ "MIT" ]
null
null
null
utils/parsing.py
Cherimolah/TeaBot
6c475bc70e2d71b37d613fbd4df16529d4c1d28c
[ "MIT" ]
null
null
null
from datetime import datetime, timedelta from typing import Union def parse_unix_to_date(unix_time: Union[int, float]) -> str: if unix_time == 0: return "навсегда" return (datetime.utcfromtimestamp(unix_time)+timedelta(hours=3)).strftime("до %d.%m.%Y %H:%M:%S МСК")
20.642857
105
0.695502
0
0
0
0
0
0
0
0
49
0.162252
4475eccd120177058a082a3f92db22d0104dd277
4,226
py
Python
sasoptpy/abstract/parameter.py
jld23/sasoptpy
f96911f04d6c0c01fce902f1f995935583df69a8
[ "Apache-2.0" ]
20
2017-12-22T18:29:55.000Z
2021-09-12T15:04:39.000Z
sasoptpy/abstract/parameter.py
jld23/sasoptpy
f96911f04d6c0c01fce902f1f995935583df69a8
[ "Apache-2.0" ]
9
2019-01-24T14:52:33.000Z
2022-03-16T14:14:35.000Z
sasoptpy/abstract/parameter.py
jld23/sasoptpy
f96911f04d6c0c01fce902f1f995935583df69a8
[ "Apache-2.0" ]
12
2017-12-22T19:37:16.000Z
2021-07-30T21:04:03.000Z
#!/usr/bin/env python # encoding: utf-8 # # Copyright SAS Institute # # 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 b...
27.986755
80
0.604827
3,488
0.825367
0
0
754
0.178419
0
0
1,908
0.451491
447765c57c490141d0b8cee8dfb8c7b014fcc8e9
721
py
Python
truffe2/communication/forms2.py
JonathanCollaud/truffe2
5cbb055ac1acf7e7dc697340618fcb56c67fbd91
[ "BSD-2-Clause" ]
9
2016-09-14T02:19:19.000Z
2020-10-18T14:52:14.000Z
truffe2/communication/forms2.py
JonathanCollaud/truffe2
5cbb055ac1acf7e7dc697340618fcb56c67fbd91
[ "BSD-2-Clause" ]
19
2016-11-09T21:28:51.000Z
2021-02-10T22:37:31.000Z
truffe2/communication/forms2.py
JonathanCollaud/truffe2
5cbb055ac1acf7e7dc697340618fcb56c67fbd91
[ "BSD-2-Clause" ]
13
2016-12-31T14:22:09.000Z
2020-12-27T19:43:19.000Z
from django.forms import ModelForm from django.utils.safestring import mark_safe from django.utils.html import escape from .models import DisplayReservationLine, Display class DisplayReservationLineForm(ModelForm): class Meta: model = DisplayReservationLine exclude = ('display_reservation', '...
40.055556
130
0.705964
549
0.761442
0
0
0
0
0
0
75
0.104022
447ad10e9234f1a46678ef5e6f05c247b8fa544c
468
py
Python
windowsbuild/MSVC2017/python/3.7.7/Scripts/pygmentize-script.py
Tech-XCorp/visit-deps
23e2bd534bf9c332d6b7d32310495f1f65b1b936
[ "BSD-3-Clause" ]
null
null
null
windowsbuild/MSVC2017/python/3.7.7/Scripts/pygmentize-script.py
Tech-XCorp/visit-deps
23e2bd534bf9c332d6b7d32310495f1f65b1b936
[ "BSD-3-Clause" ]
null
null
null
windowsbuild/MSVC2017/python/3.7.7/Scripts/pygmentize-script.py
Tech-XCorp/visit-deps
23e2bd534bf9c332d6b7d32310495f1f65b1b936
[ "BSD-3-Clause" ]
null
null
null
#!C:\A_Visit\ForRegression\visit-deps\windowsbuild\MSVC2017\python\3.7.7\python.exe # EASY-INSTALL-ENTRY-SCRIPT: 'pygments==2.5.2','console_scripts','pygmentize' __requires__ = 'pygments==2.5.2' import re import sys from pkg_resources import load_entry_point if __name__ == '__main__': sys.argv[0] = re.sub(...
36
84
0.675214
0
0
0
0
0
0
0
0
263
0.561966
447be6e4fc567f716395f5061f29158ceb4b650e
1,034
py
Python
day-03/automatic-pizza-order-program.py
swokyisalreadytaken/100-Days-of-Code-in-Python
269c99a481b94248454114c051fafa8f52697332
[ "Unlicense" ]
1
2021-08-13T23:46:20.000Z
2021-08-13T23:46:20.000Z
day-03/automatic-pizza-order-program.py
swokyisalreadytaken/100-Days-of-Code-in-Python
269c99a481b94248454114c051fafa8f52697332
[ "Unlicense" ]
null
null
null
day-03/automatic-pizza-order-program.py
swokyisalreadytaken/100-Days-of-Code-in-Python
269c99a481b94248454114c051fafa8f52697332
[ "Unlicense" ]
null
null
null
# build an automatic pizza order program. # ask the user the size and extra ingredients inputs print("Welcome to Python Pizza Deliveries!") size = input("What size pizza do you want? S, M, or L \n") add_pepperoni = input("Do you want pepperoni? Y or N \n") extra_cheese = input("Do you want extra cheese? Y or N \n") # ...
27.945946
59
0.647002
0
0
0
0
0
0
0
0
570
0.549133
44809a2040f353f40337b79e36aebadd2135b1f0
2,091
py
Python
WindowOperators.py
zatricion/Streams
d2f688e230b4cb325d5f76886a7499d132591bd4
[ "MIT" ]
null
null
null
WindowOperators.py
zatricion/Streams
d2f688e230b4cb325d5f76886a7499d132591bd4
[ "MIT" ]
null
null
null
WindowOperators.py
zatricion/Streams
d2f688e230b4cb325d5f76886a7499d132591bd4
[ "MIT" ]
null
null
null
from Agent import * from Stream import * from MergeSplitOpStructures import * def window_many_to_many(f, in_streams, num_out_streams, window_size, step_size, state=None): def transition(in_lists, state=None): range_out = range((num_out_streams)) range_in = range(len(in_streams)) output_list...
44.489362
93
0.679101
0
0
0
0
0
0
0
0
78
0.037303
4482d252ebee04a4fe3a2d16129164bc0d1de4ec
623
py
Python
frontend_command.py
privacyrespected/Alpha
60ffdb73b334e37a87be119ce881d084aef8d7a1
[ "Apache-2.0" ]
null
null
null
frontend_command.py
privacyrespected/Alpha
60ffdb73b334e37a87be119ce881d084aef8d7a1
[ "Apache-2.0" ]
null
null
null
frontend_command.py
privacyrespected/Alpha
60ffdb73b334e37a87be119ce881d084aef8d7a1
[ "Apache-2.0" ]
null
null
null
#this files process commands entered through the front end from modules.sense import * from modules.mainsystem import * def Pcommand(command): command=command.lower() if command.startswith("speak"): #speak function to debug command=command.replace("","speak") speak(command) elif command.star...
34.611111
60
0.64366
0
0
0
0
0
0
0
0
173
0.277689
44830eb53faf0ef1df3db123fb8ce39f3db546df
197
py
Python
src/defuzzification/utils.py
stdevAntiD2ta/fuzzy-control-system
c58b503846a2b46cd09c3457a411f58bcbad3ec7
[ "MIT" ]
null
null
null
src/defuzzification/utils.py
stdevAntiD2ta/fuzzy-control-system
c58b503846a2b46cd09c3457a411f58bcbad3ec7
[ "MIT" ]
null
null
null
src/defuzzification/utils.py
stdevAntiD2ta/fuzzy-control-system
c58b503846a2b46cd09c3457a411f58bcbad3ec7
[ "MIT" ]
null
null
null
def get_maximums(set): fuz_set = [(set.membership(x), x) for x in set] fuz_set.sort() fuz_set = [x for (ux, x) in fuz_set if ux == fuz_set[-1][0]] fuz_set.sort() return fuz_set
28.142857
64
0.609137
0
0
0
0
0
0
0
0
0
0
4483b0857e8241cf5117ec7285f536dc85720d7e
2,177
py
Python
swamp/mr/tests/test_mrjob.py
rigdenlab/SWAMP
3e93ab27f4acf0124f7cb2d78a151cc3352b9c6e
[ "BSD-3-Clause" ]
2
2020-02-15T11:06:34.000Z
2020-04-10T08:48:49.000Z
swamp/mr/tests/test_mrjob.py
rigdenlab/SWAMP
3e93ab27f4acf0124f7cb2d78a151cc3352b9c6e
[ "BSD-3-Clause" ]
15
2020-02-04T10:56:07.000Z
2021-02-12T09:11:03.000Z
swamp/mr/tests/test_mrjob.py
rigdenlab/SWAMP
3e93ab27f4acf0124f7cb2d78a151cc3352b9c6e
[ "BSD-3-Clause" ]
4
2020-02-04T13:25:09.000Z
2022-03-23T13:44:17.000Z
import os import dill import unittest import collections from pyjob import Script from swamp.utils import remove from swamp.mr.mrjob import MrJob RESULTS = collections.namedtuple('results', ['results']) WORKDIR = os.path.join(os.environ['CCP4_SCR'], 'test_workdir') class MrJobTestCase(unittest.TestCase): def te...
38.875
137
0.673404
1,907
0.875976
0
0
0
0
0
0
768
0.352779
44844a84b744658a244c29556a18ff7de739bdd6
6,306
py
Python
distil/active_learning_strategies/partition_strategy.py
ansunsujoe/distil
cf6cae2b88ef129d09c159aae0569978190e9f98
[ "MIT" ]
83
2021-01-06T06:50:30.000Z
2022-03-31T05:16:32.000Z
distil/active_learning_strategies/partition_strategy.py
ansunsujoe/distil
cf6cae2b88ef129d09c159aae0569978190e9f98
[ "MIT" ]
30
2021-02-27T06:09:47.000Z
2021-12-23T11:03:36.000Z
distil/active_learning_strategies/partition_strategy.py
ansunsujoe/distil
cf6cae2b88ef129d09c159aae0569978190e9f98
[ "MIT" ]
13
2021-03-05T18:26:58.000Z
2022-03-12T01:53:17.000Z
import math import numpy as np from torch.utils.data import Subset from .strategy import Strategy class PartitionStrategy(Strategy): """ Provides a wrapper around most of the strategies implemented in DISTIL that allows one to select portions of the budget from specific partitions of the unlabeled d...
52.115702
189
0.669997
6,206
0.984142
0
0
0
0
0
0
3,157
0.500634
4485c237e7028b7f11bca171722bc70d54c20ee5
2,120
py
Python
lib/lib_constant.py
NingAnMe/GFSSI
066ac3dcffe04927aa497ee8b2257bee3ec3789a
[ "MIT" ]
1
2020-08-18T08:05:35.000Z
2020-08-18T08:05:35.000Z
lib/lib_constant.py
NingAnMe/GFSSI
066ac3dcffe04927aa497ee8b2257bee3ec3789a
[ "MIT" ]
null
null
null
lib/lib_constant.py
NingAnMe/GFSSI
066ac3dcffe04927aa497ee8b2257bee3ec3789a
[ "MIT" ]
1
2020-08-26T06:50:59.000Z
2020-08-26T06:50:59.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """ @Time : 2019/8/2 @Author : AnNing """ import os from lib.lib_path import get_aid_path, GFSSI_DIR aid_path = get_aid_path() # 无效数据的填充值 FULL_VALUE = -999 # 辅助文件 BASEMAP_FY4_4KM = os.path.join(aid_path, 'ditu_fy4a_4km.png') LON_LAT_LUT_FY4_4KM = os.path.join(aid_pat...
37.192982
92
0.745283
0
0
0
0
0
0
0
0
1,088
0.450704
44860ad18421633ee3079c64cf2ba7d53eaef76a
1,647
py
Python
fondo_api/tests/runner.py
Fonmon/Fondo-API
0c78eaab259df18219c01fceb67bd1b6ff8ec941
[ "MIT" ]
null
null
null
fondo_api/tests/runner.py
Fonmon/Fondo-API
0c78eaab259df18219c01fceb67bd1b6ff8ec941
[ "MIT" ]
48
2018-01-13T14:52:52.000Z
2022-03-13T17:41:42.000Z
fondo_api/tests/runner.py
Fonmon/Fondo-API
0c78eaab259df18219c01fceb67bd1b6ff8ec941
[ "MIT" ]
null
null
null
import logging from django.test.runner import DiscoverRunner class TestRunner(DiscoverRunner): """ When migrations are disabled for the test runner, the `pre_migrate` signal does not emit. So we need another hook for installing the extension. Prior to Django 1.9, the `pre_syncdb` signal worked for that. ...
44.513514
84
0.680631
1,585
0.962356
0
0
0
0
0
0
532
0.323012
44862ca62ad76ed43e2aa3db0d2b5e1183483ba1
3,706
py
Python
tests/test_reference.py
foliant-docs/foliantcontrib.apireferences
4b4bfe865970b7adb1a8c7b5f3cb697ec3257976
[ "MIT" ]
null
null
null
tests/test_reference.py
foliant-docs/foliantcontrib.apireferences
4b4bfe865970b7adb1a8c7b5f3cb697ec3257976
[ "MIT" ]
null
null
null
tests/test_reference.py
foliant-docs/foliantcontrib.apireferences
4b4bfe865970b7adb1a8c7b5f3cb697ec3257976
[ "MIT" ]
null
null
null
import re from foliant.preprocessors.apireferences.apireferences import DEFAULT_REF_REGEX from foliant.preprocessors.apireferences.classes import Reference from unittest import TestCase class TestReference(TestCase): def test_repr_doesnt_throw_errors(self): ref = Reference( source='`MyAPI: GE...
32.79646
79
0.611441
3,516
0.948732
0
0
0
0
0
0
553
0.149217
448774b167c44c150d8ea3fd24f5266556ab412f
460
py
Python
Diffusion of Infection and Campus Evacuation/parameters.py
dem123456789/Computer-Simulation
ec61bdd7ca767f631ef190c1248690bd65327302
[ "MIT" ]
2
2016-07-03T05:19:20.000Z
2021-03-07T04:39:07.000Z
Diffusion of Infection and Campus Evacuation/parameters.py
dem123456789/Computer-Simulation
ec61bdd7ca767f631ef190c1248690bd65327302
[ "MIT" ]
null
null
null
Diffusion of Infection and Campus Evacuation/parameters.py
dem123456789/Computer-Simulation
ec61bdd7ca767f631ef190c1248690bd65327302
[ "MIT" ]
null
null
null
import math DEBUG = 1 PARKING_NODE_COLOR = '#FF0099' EXIT_NODE_COLOR = 'r' STREET_NODE_COLOR = 'g' COP_NODE_COLOR = '#3c3ccc' VISUAL = 1 COP_MODE = 0 COP_INTERSECTION_THRESHOLD = 0 COP_CONGESTION_THRESHOLD = 0.5 COP_EVACUATION_THRESHOLD = 0 DEPTH_OF_AWARENESS = 1 EAST_TENDENCY = 0 SPACE_TIME_TRADEOFF = 1 DEAD_END = [] ...
20.909091
39
0.773913
0
0
0
0
0
0
0
0
56
0.121739
4487941981e54376941db03ab4c7b9fc524aa4f4
316
py
Python
Section 3/33_alert.py
IgorPavlovski84/-Automating-Web-Testing-with-Selenium-and-Python
c57b43416bb4bdc7242e79aa9d202851a852daae
[ "MIT" ]
26
2018-12-21T00:52:01.000Z
2021-11-08T13:12:26.000Z
Section 3/33_alert.py
calvinkkd/-Automating-Web-Testing-with-Selenium-and-Python
ca6e427cf6393993245263e26a704beeea8c1fed
[ "MIT" ]
1
2021-02-02T22:05:36.000Z
2021-02-02T22:05:36.000Z
Section 3/33_alert.py
calvinkkd/-Automating-Web-Testing-with-Selenium-and-Python
ca6e427cf6393993245263e26a704beeea8c1fed
[ "MIT" ]
14
2018-12-08T11:40:38.000Z
2021-05-04T01:02:39.000Z
from selenium import webdriver import time driver = webdriver.Chrome() driver.get('http://localhost/se/33.html') driver.execute_script("document.body.style.zoom = '1.5'") time.sleep(1) driver.find_element_by_css_selector('button').click() time.sleep(1) driver.switch_to_alert().accept() time.sleep(1) driver.close()
28.727273
57
0.772152
0
0
0
0
0
0
0
0
71
0.224684
448bc1e703300278885ac596fbdec39b730d307d
3,611
py
Python
constrained_language_typology/plot_languages_main.py
deepneuralmachine/google-research
d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231
[ "Apache-2.0" ]
23,901
2018-10-04T19:48:53.000Z
2022-03-31T21:27:42.000Z
constrained_language_typology/plot_languages_main.py
deepneuralmachine/google-research
d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231
[ "Apache-2.0" ]
891
2018-11-10T06:16:13.000Z
2022-03-31T10:42:34.000Z
constrained_language_typology/plot_languages_main.py
deepneuralmachine/google-research
d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231
[ "Apache-2.0" ]
6,047
2018-10-12T06:31:02.000Z
2022-03-31T13:59:28.000Z
# coding=utf-8 # Copyright 2021 The Google Research Authors. # # 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 applicab...
32.241071
77
0.663805
0
0
0
0
0
0
0
0
1,861
0.51537
448ce569784ffe842d7c48946cdd94821413b192
1,515
py
Python
experiments/cartpole_dqn.py
jkulhanek/deep-rl-pytorch
6fa7ceee8524f002d4a8d93295b231f6b9b7c29c
[ "MIT" ]
7
2019-03-24T19:51:11.000Z
2022-01-27T17:20:29.000Z
experiments/cartpole_dqn.py
jkulhanek/deep-rl-pytorch
6fa7ceee8524f002d4a8d93295b231f6b9b7c29c
[ "MIT" ]
null
null
null
experiments/cartpole_dqn.py
jkulhanek/deep-rl-pytorch
6fa7ceee8524f002d4a8d93295b231f6b9b7c29c
[ "MIT" ]
4
2020-04-11T01:06:24.000Z
2021-07-18T01:22:36.000Z
import gym import torch.nn as nn import torch.nn.functional as F import numpy as np import deep_rl.deepq as deepq from deep_rl import register_trainer class Model(nn.Module): def __init__(self): super().__init__() def init_weights(m): if type(m) == nn.Linear: nn.init....
25.25
65
0.617162
1,175
0.775578
0
0
590
0.389439
0
0
13
0.008581
448dcd1097bbc80970b03d1a55067eb7abf25a12
3,314
py
Python
account/views.py
Django-Pyhon/basic-banking-django
c0393fcc06101ebfde8a681fa2d6c8cd8d02a3bc
[ "MIT" ]
1
2021-07-27T22:20:17.000Z
2021-07-27T22:20:17.000Z
account/views.py
Django-Pyhon/basic-banking-django
c0393fcc06101ebfde8a681fa2d6c8cd8d02a3bc
[ "MIT" ]
null
null
null
account/views.py
Django-Pyhon/basic-banking-django
c0393fcc06101ebfde8a681fa2d6c8cd8d02a3bc
[ "MIT" ]
null
null
null
from django.http import Http404 from django.shortcuts import render # Create your views here. from django.contrib.auth.models import User, Group from rest_framework import views, status from rest_framework.response import Response from account.serializers import * class ListCustomers(views.APIView): def get(se...
31.865385
82
0.67592
3,019
0.910984
0
0
0
0
0
0
35
0.010561
448f5af76ad0cc20a0a28294b6c5340ad6385f98
1,063
py
Python
setup.py
pymgrit/pymgrit
40eca08cedf486de22604279b4add87086b7d3cc
[ "MIT" ]
6
2020-04-24T13:14:17.000Z
2022-03-09T14:16:51.000Z
setup.py
pymgrit/pymgrit
40eca08cedf486de22604279b4add87086b7d3cc
[ "MIT" ]
6
2020-03-24T09:03:05.000Z
2021-08-02T13:31:39.000Z
setup.py
pymgrit/pymgrit
40eca08cedf486de22604279b4add87086b7d3cc
[ "MIT" ]
4
2020-06-09T21:11:19.000Z
2021-06-27T11:34:58.000Z
from setuptools import setup, find_packages install_requires = [ 'numpy>=1.17.0', 'scipy>=1.4.1', 'mpi4py>=3.0', 'matplotlib>=3.1.3' ] extras_requires = { 'docs': [ 'sphinx' ], 'tests': [ 'tox', ] } def long_description(): with open('README.rst') as f: ret...
25.309524
116
0.631232
0
0
0
0
0
0
0
0
382
0.35936
448fa6d89d25e8087b61e1aab2f8a346c2002a80
185
py
Python
study/python/OtherTutorials/flexibleNumberOfArgs.py
YoungsAppWorkshop/dev_environment_setup
f197c81059ec5f1ce0bd8b5d972034252f29d9d0
[ "MIT" ]
null
null
null
study/python/OtherTutorials/flexibleNumberOfArgs.py
YoungsAppWorkshop/dev_environment_setup
f197c81059ec5f1ce0bd8b5d972034252f29d9d0
[ "MIT" ]
3
2021-01-06T10:18:17.000Z
2021-09-02T17:55:51.000Z
study/python/OtherTutorials/flexibleNumberOfArgs.py
YoungsAppWorkshop/dev_environment_setup
f197c81059ec5f1ce0bd8b5d972034252f29d9d0
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 def add_numbers(*args): total = 0 for arg in args: total += arg print(total) add_numbers(3) add_numbers(3, 2) add_numbers(1, 3, 5, 6, 7, 8)
15.416667
29
0.605405
0
0
0
0
0
0
0
0
22
0.118919
4490ad67efce400919429713bee906671961ca09
2,590
py
Python
mod6_lab1.py
KMSkelton/pyPrac
11cec31d4cc1cbb890f89324a10f4daf66376de0
[ "MIT" ]
1
2017-08-08T20:38:27.000Z
2017-08-08T20:38:27.000Z
mod6_lab1.py
KMSkelton/pyPrac
11cec31d4cc1cbb890f89324a10f4daf66376de0
[ "MIT" ]
1
2018-08-15T22:26:29.000Z
2018-08-15T22:26:29.000Z
mod6_lab1.py
KMSkelton/pyPrac
11cec31d4cc1cbb890f89324a10f4daf66376de0
[ "MIT" ]
null
null
null
# Update the code to have a function that reads in the file and returns contents as a list def open_sample_func(sample_text): with open(sample_text) as file: lines = file.readlines() return lines # Update the code to have a function that converts the list of book lines into a list of the words def ...
41.774194
105
0.71583
0
0
0
0
0
0
0
0
1,432
0.552896
4490e5d26b0906c435e659bb5263d97c5a74554f
648
py
Python
tests/two_three_compat_test.py
dw/econtext
c1e72b82258752d4a3155e88806c2e1235805eff
[ "BSD-3-Clause" ]
null
null
null
tests/two_three_compat_test.py
dw/econtext
c1e72b82258752d4a3155e88806c2e1235805eff
[ "BSD-3-Clause" ]
27
2017-08-22T21:20:22.000Z
2017-09-10T07:35:55.000Z
tests/two_three_compat_test.py
dw/econtext
c1e72b82258752d4a3155e88806c2e1235805eff
[ "BSD-3-Clause" ]
null
null
null
import mitogen.core import testlib import simple_pkg.ping # TODO: this is a joke. 2/3 interop is one of the hardest bits to get right. # There should be 100 tests in this file. class TwoThreeCompatTest(testlib.RouterMixin, testlib.TestCase): if mitogen.core.PY3: python_path = 'python2' else: ...
28.173913
76
0.700617
466
0.719136
0
0
0
0
0
0
135
0.208333
44911cbbd93bdb5beaecefc59e565353a88e30d2
1,439
py
Python
volume/pipeline.py
Napam/INF399-Master-Evaluation
d6e66397ae6951cffae65ddd41979bab367abdb8
[ "MIT" ]
1
2021-05-31T13:32:09.000Z
2021-05-31T13:32:09.000Z
volume/pipeline.py
Napam/INF399-Master-Evaluation
d6e66397ae6951cffae65ddd41979bab367abdb8
[ "MIT" ]
null
null
null
volume/pipeline.py
Napam/INF399-Master-Evaluation
d6e66397ae6951cffae65ddd41979bab367abdb8
[ "MIT" ]
null
null
null
import glob, os from cococonvert import convert_csv_labels, convert_csv_outputs from cocoeval import COCO, COCOeval import sys class StdoutRedirection: """Standard output redirection context manager""" def __init__(self, path): self._path = path def __enter__(self): sys.stdout = open(se...
32.704545
99
0.660181
344
0.239055
0
0
0
0
0
0
417
0.289785
4492af236eff4aa2e983034e070713b3b4e8e677
3,076
py
Python
play.py
brandoFranco/tictactoeOpenCV
60eaa9c028cdfe13e68124de4037b39fcfa7432c
[ "MIT" ]
null
null
null
play.py
brandoFranco/tictactoeOpenCV
60eaa9c028cdfe13e68124de4037b39fcfa7432c
[ "MIT" ]
null
null
null
play.py
brandoFranco/tictactoeOpenCV
60eaa9c028cdfe13e68124de4037b39fcfa7432c
[ "MIT" ]
null
null
null
# # Jogo da Velha utilizando Visao Computacional e Realidade aumentada. # Definicao de funcoes auxiliares # import numpy as np # Funcao que verifica se e o fim do jogo. def won(tabuleiro): if (tabuleiro[0] == tabuleiro[1] == tabuleiro[2] == 0): return 1 elif (tabuleiro[0] == tabuleiro[3] == tabuleiro...
28.220183
69
0.535761
0
0
0
0
0
0
0
0
394
0.128088
4492b1a697142e5525ad3f5dfe95027989301553
1,407
py
Python
src/main.py
TomoTom0/DiscordBot_Heroku_Stat.ink
458ad08fb53a83b8fa96dad25fd603c9d14722b2
[ "MIT" ]
1
2020-11-12T04:26:30.000Z
2020-11-12T04:26:30.000Z
src/main.py
TomoTom0/DiscordBot_Heroku_Stat.ink
458ad08fb53a83b8fa96dad25fd603c9d14722b2
[ "MIT" ]
null
null
null
src/main.py
TomoTom0/DiscordBot_Heroku_Stat.ink
458ad08fb53a83b8fa96dad25fd603c9d14722b2
[ "MIT" ]
4
2020-11-14T14:53:30.000Z
2021-07-05T11:36:59.000Z
#! /usr/bin/env python3 import discord from discord.ext import commands import subprocess import re import os, sys import json import basic import datetime import traceback import iksm_discord TOKEN = basic.DISCORD_TOKENS["0"] startup_extensions = ["splat"] # cogの導入 description = f"stat.inkへ戦績自動アップロードを行うbotです。\nまずはs...
25.125
86
0.702914
0
0
0
0
556
0.329579
534
0.316538
789
0.467694
44932b7c61cbe0cddbdb7086477b87d6e2cfcb5d
1,019
py
Python
tls/Alerts.py
anuraagbaishya/tls1.3
e86b575431694fe4ea987cdb89ef3438f7f28360
[ "MIT" ]
null
null
null
tls/Alerts.py
anuraagbaishya/tls1.3
e86b575431694fe4ea987cdb89ef3438f7f28360
[ "MIT" ]
null
null
null
tls/Alerts.py
anuraagbaishya/tls1.3
e86b575431694fe4ea987cdb89ef3438f7f28360
[ "MIT" ]
null
null
null
from tls.CustomEnums import UInt8Enum class Alert(Exception): def __init__(self, level, description): self.level = level self.description = description class AlertLevel(UInt8Enum): warning = 1 fatal = 2 class AlertDescription(UInt8Enum): close_notify = 0 unexpected_message = 10...
23.697674
43
0.708538
972
0.953876
0
0
0
0
0
0
0
0
4494889d1e0dfebc5119191d7266469bf0009a3a
21,922
py
Python
ProjectSurveillance/views.py
psymen145/OVS-django-fe
1823e8b42c17276d6b50a63dddd9b04a21c2038c
[ "MIT" ]
null
null
null
ProjectSurveillance/views.py
psymen145/OVS-django-fe
1823e8b42c17276d6b50a63dddd9b04a21c2038c
[ "MIT" ]
null
null
null
ProjectSurveillance/views.py
psymen145/OVS-django-fe
1823e8b42c17276d6b50a63dddd9b04a21c2038c
[ "MIT" ]
null
null
null
from django.shortcuts import render, get_object_or_404, redirect from django.http import HttpResponse, JsonResponse, Http404 from django.contrib.auth.decorators import login_required from django.core.exceptions import ObjectDoesNotExist from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from ...
42.238921
178
0.59251
0
0
0
0
12,133
0.553462
0
0
6,165
0.281224
4496bc453a600d2cdbfc10306dcde26b6af41bee
41
py
Python
test_server/src/controllers/__init__.py
s-nao/gatling-practice
5d4e6abfbed34a4e356a7ef770393e57411de80c
[ "Apache-2.0" ]
null
null
null
test_server/src/controllers/__init__.py
s-nao/gatling-practice
5d4e6abfbed34a4e356a7ef770393e57411de80c
[ "Apache-2.0" ]
null
null
null
test_server/src/controllers/__init__.py
s-nao/gatling-practice
5d4e6abfbed34a4e356a7ef770393e57411de80c
[ "Apache-2.0" ]
null
null
null
from . import ( users, search, )
8.2
15
0.512195
0
0
0
0
0
0
0
0
0
0
4497d26024dfdc2730aaaf21bcb0e80805684f50
7,806
py
Python
optur/storages/backends/mysql.py
ytsmiling/optur
cbc56c60b322ea764592f01758798f745199b455
[ "MIT" ]
1
2022-01-19T09:18:15.000Z
2022-01-19T09:18:15.000Z
optur/storages/backends/mysql.py
ytsmiling/optur
cbc56c60b322ea764592f01758798f745199b455
[ "MIT" ]
null
null
null
optur/storages/backends/mysql.py
ytsmiling/optur
cbc56c60b322ea764592f01758798f745199b455
[ "MIT" ]
null
null
null
import time from typing import Any, Callable, List, Optional from google.protobuf.timestamp_pb2 import Timestamp from optur.errors import NotFoundError from optur.proto.study_pb2 import StudyInfo from optur.proto.study_pb2 import Trial as TrialProto from optur.storages.backends.backend import StorageBackend def _re...
37.893204
99
0.55816
6,697
0.85793
0
0
5,350
0.68537
0
0
2,877
0.368563
449998dcb11c693a0012e9960aaba5d1b4901d48
1,394
py
Python
pymclevel/test/templevel.py
bennettdc/MCEdit-Unified
90abfb170c65b877ac67193e717fa3a3ded635dd
[ "0BSD" ]
237
2018-02-04T19:13:31.000Z
2022-03-26T03:06:07.000Z
pymclevel/test/templevel.py
bennettdc/MCEdit-Unified
90abfb170c65b877ac67193e717fa3a3ded635dd
[ "0BSD" ]
551
2015-01-01T02:36:53.000Z
2018-02-01T00:03:12.000Z
pymclevel/test/templevel.py
bennettdc/MCEdit-Unified
90abfb170c65b877ac67193e717fa3a3ded635dd
[ "0BSD" ]
97
2015-01-02T01:31:12.000Z
2018-01-22T05:37:47.000Z
import atexit import os from os.path import join import shutil import tempfile from pymclevel import mclevel __author__ = 'Rio' tempdir = os.path.join(tempfile.gettempdir(), "pymclevel_test") if not os.path.exists(tempdir): os.mkdir(tempdir) def mktemp(suffix): td = tempfile.mkdtemp(suffix, dir=tempdir) ...
24.892857
63
0.601148
1,043
0.748207
0
0
0
0
0
0
68
0.04878
449a09fa6cac651fdb37c7759dc5ded62edc72b2
5,157
py
Python
dags/oss_know/libs/github/init_profiles.py
HexaemeronFsk/airflow-jobs
674f4c15f6889653bf5578117b085ef794c7b3f4
[ "Apache-2.0" ]
null
null
null
dags/oss_know/libs/github/init_profiles.py
HexaemeronFsk/airflow-jobs
674f4c15f6889653bf5578117b085ef794c7b3f4
[ "Apache-2.0" ]
null
null
null
dags/oss_know/libs/github/init_profiles.py
HexaemeronFsk/airflow-jobs
674f4c15f6889653bf5578117b085ef794c7b3f4
[ "Apache-2.0" ]
null
null
null
import itertools from loguru import logger from opensearchpy.helpers import scan as os_scan from oss_know.libs.base_dict.opensearch_index import OPENSEARCH_INDEX_GITHUB_COMMITS, \ OPENSEARCH_INDEX_GITHUB_ISSUES_TIMELINE from oss_know.libs.util.opensearch_api import OpensearchAPI from oss_know.libs.util.base import ...
46.459459
114
0.61528
0
0
0
0
0
0
0
0
1,398
0.269936
921fdb31b845a38c9c0e90ae7d4068748c59af90
10,274
py
Python
json_to_relation/test/testModuleStoreImporter.py
paepcke/json_to_relation
acfa58d540f8f51d1d913d0c173ee3ded1b6c2a9
[ "BSD-3-Clause" ]
4
2015-10-10T19:09:49.000Z
2021-09-02T00:58:06.000Z
json_to_relation/test/testModuleStoreImporter.py
paepcke/json_to_relation
acfa58d540f8f51d1d913d0c173ee3ded1b6c2a9
[ "BSD-3-Clause" ]
null
null
null
json_to_relation/test/testModuleStoreImporter.py
paepcke/json_to_relation
acfa58d540f8f51d1d913d0c173ee3ded1b6c2a9
[ "BSD-3-Clause" ]
8
2015-05-16T14:33:33.000Z
2019-10-24T08:56:25.000Z
# Copyright (c) 2014, Stanford University # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the ...
51.114428
757
0.662644
8,437
0.821199
0
0
3,258
0.317111
0
0
4,593
0.447051
922098fba0782c8cc0b4f538f40dc425f77aa77a
1,457
py
Python
image_extractor.py
satrajit-chatterjee/DeXpression-PyTorch
00100385145485cf00b0a1cc53154db623c8a14f
[ "MIT" ]
6
2019-01-18T02:34:21.000Z
2022-03-22T13:37:11.000Z
image_extractor.py
satrajit-chatterjee/DeXpression-PyTorch
00100385145485cf00b0a1cc53154db623c8a14f
[ "MIT" ]
3
2019-01-18T02:44:13.000Z
2019-12-16T14:32:55.000Z
image_extractor.py
satrajit-chatterjee/DeXpression-PyTorch
00100385145485cf00b0a1cc53154db623c8a14f
[ "MIT" ]
1
2022-03-14T03:29:47.000Z
2022-03-14T03:29:47.000Z
import glob from shutil import copyfile emotions = ["neutral", "anger", "contempt", "disgust", "fear", "happy", "sadness", "surprise"] # Define emotion order participants = glob.glob("source_emotion\\*") # Returns a list of all folders with participant numbers for x in participants: part = "%s" % x[-4:] ...
60.708333
121
0.621139
0
0
0
0
0
0
0
0
650
0.446122
9221f8b3cd619ef0a25608b276b0b53b07e7b0d4
83
py
Python
cfgr/__init__.py
markkorput/pycfgr
594fc8d1c36e59e4fcf3e1d0bb5a5db8edf426c5
[ "MIT" ]
1
2021-09-15T08:40:10.000Z
2021-09-15T08:40:10.000Z
cfgr/__init__.py
markkorput/pycfgr
594fc8d1c36e59e4fcf3e1d0bb5a5db8edf426c5
[ "MIT" ]
6
2019-09-25T08:09:00.000Z
2019-09-27T12:26:09.000Z
cfgr/__init__.py
markkorput/pycfgr
594fc8d1c36e59e4fcf3e1d0bb5a5db8edf426c5
[ "MIT" ]
1
2021-09-15T08:40:14.000Z
2021-09-15T08:40:14.000Z
from .Runtime import Runtime from .Type import Type from .Instance import Instance
20.75
30
0.819277
0
0
0
0
0
0
0
0
0
0
9222f71379c7695e4f0ab4cb4b35f058fef9c401
156
py
Python
apps/BlogContent/urls.py
Roberto09/MyBlog
24634ce60a3af45a5675668132dbfa725872b793
[ "MIT" ]
null
null
null
apps/BlogContent/urls.py
Roberto09/MyBlog
24634ce60a3af45a5675668132dbfa725872b793
[ "MIT" ]
null
null
null
apps/BlogContent/urls.py
Roberto09/MyBlog
24634ce60a3af45a5675668132dbfa725872b793
[ "MIT" ]
null
null
null
from django.conf.urls import url, include from apps.BlogContent.views import SeeBP urlpatterns = [ url(r'^MyBlogs', SeeBP.as_view() , name='see_BP'), ]
26
54
0.724359
0
0
0
0
0
0
0
0
19
0.121795
92231061990614a2931123b7d435d718a7b2ef2d
62
py
Python
run.py
rblack42/flask-inventory
48c0cfaf1ab10d0891c5af9d2b609e2b9e44ed74
[ "BSD-3-Clause" ]
null
null
null
run.py
rblack42/flask-inventory
48c0cfaf1ab10d0891c5af9d2b609e2b9e44ed74
[ "BSD-3-Clause" ]
null
null
null
run.py
rblack42/flask-inventory
48c0cfaf1ab10d0891c5af9d2b609e2b9e44ed74
[ "BSD-3-Clause" ]
null
null
null
from app.core import create_app app = create_app('flask.cfg')
20.666667
31
0.774194
0
0
0
0
0
0
0
0
11
0.177419
92232435b0e0b41e1bc75ad98de9764440370bab
13,549
py
Python
resultr_format/__init__.py
haykkh/resultr-format
8188a9b9a011899a58be54c8036edc9207e63948
[ "MIT" ]
null
null
null
resultr_format/__init__.py
haykkh/resultr-format
8188a9b9a011899a58be54c8036edc9207e63948
[ "MIT" ]
null
null
null
resultr_format/__init__.py
haykkh/resultr-format
8188a9b9a011899a58be54c8036edc9207e63948
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """ Makes UCL PHAS results better """ __author__ = "Hayk Khachatryan" __version__ = "0.1.4.4" __license__ = "MIT" import argparse import csv import sys import itertools import pathlib as pathlib import inquirer ######################### # # # # # ...
32.259524
114
0.518857
0
0
0
0
0
0
0
0
6,486
0.478707
922341f36deca5a7a2891e78eb58b70f3fdc0eb8
1,981
py
Python
dmg/edits/pallete.py
Antolin1/DMG-Python
ba3942e13006e1a32f3fe9f1b29615311f667274
[ "MIT" ]
null
null
null
dmg/edits/pallete.py
Antolin1/DMG-Python
ba3942e13006e1a32f3fe9f1b29615311f667274
[ "MIT" ]
null
null
null
dmg/edits/pallete.py
Antolin1/DMG-Python
ba3942e13006e1a32f3fe9f1b29615311f667274
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Sep 6 11:36:49 2021 @author: Jose Antonio """ import random from networkx.algorithms.isomorphism import is_isomorphic from dmg.graphUtils import edge_match_type as edge_match from dmg.graphUtils import node_match_type as node_match import networkx as ...
30.953125
68
0.570419
1,634
0.824836
0
0
0
0
0
0
257
0.129732
922361dea1d8463d9ea2c90bf6568fee4603b6fb
14,689
py
Python
ml_boilerplate/preprocess/generic_pipeline.py
mcraig2/ml_boilerplate
5373f593b76fb115fb7a80dc9b87c633a3fcde48
[ "MIT" ]
null
null
null
ml_boilerplate/preprocess/generic_pipeline.py
mcraig2/ml_boilerplate
5373f593b76fb115fb7a80dc9b87c633a3fcde48
[ "MIT" ]
null
null
null
ml_boilerplate/preprocess/generic_pipeline.py
mcraig2/ml_boilerplate
5373f593b76fb115fb7a80dc9b87c633a3fcde48
[ "MIT" ]
null
null
null
""" The Pipeline object in sci-kit learn is very useful for constructing simple and complex modeling pipelines. However, out of the box it is cumbersome to build pipelines that involve heterogenous data. Most transformers assume that the entirety of the input datasets are of the same dtype. So, how do y...
38.054404
82
0.601675
11,308
0.769828
0
0
0
0
0
0
7,379
0.502349
92248f27e069d6c0f5243445c0b5840242d3af37
455
py
Python
provider/urls.py
Creationeers/Django_Barebone_Rest
f7e414575a5e6ff6324cef7e4ceccac0775eba78
[ "Apache-2.0" ]
null
null
null
provider/urls.py
Creationeers/Django_Barebone_Rest
f7e414575a5e6ff6324cef7e4ceccac0775eba78
[ "Apache-2.0" ]
7
2020-05-14T23:03:48.000Z
2022-02-10T08:49:02.000Z
provider/urls.py
Creationeers/Django_Barebone_Rest
f7e414575a5e6ff6324cef7e4ceccac0775eba78
[ "Apache-2.0" ]
null
null
null
from django.urls import path, include from rest_framework_simplejwt import views as jwt_views from .views import (RegisterUserView) AUTH_PATTERNS = [ path('token/', jwt_views.TokenObtainPairView.as_view(), name='token-obtain'), path('token/refresh/', jwt_views.TokenRefreshView.as_view(), name='token-refresh') ...
35
86
0.742857
0
0
0
0
0
0
0
0
86
0.189011
92249c945ed95319b78da0f8f6f1d5710f928e02
4,598
py
Python
pipeline/config.py
felipemoran/tcc_sfm
b0b35e92c7c2f86d84120366147a8a650d0a4f7c
[ "MIT" ]
2
2020-10-27T21:45:01.000Z
2021-04-21T11:47:37.000Z
pipeline/config.py
felipemoran/tcc_sfm
b0b35e92c7c2f86d84120366147a8a650d0a4f7c
[ "MIT" ]
null
null
null
pipeline/config.py
felipemoran/tcc_sfm
b0b35e92c7c2f86d84120366147a8a650d0a4f7c
[ "MIT" ]
null
null
null
from dataclasses import dataclass from typing import Tuple, Any, List, Union import ruamel.yaml from ruamel.yaml.constructor import SafeConstructor import dacite import numpy as np @dataclass class CornerSelectionConfig: """ Config for the corner selection phase of KLT """ quality_level: float mi...
19
85
0.705524
3,647
0.793171
0
0
3,801
0.826664
0
0
1,138
0.247499
922663d4e78a63fff7f9bf0e66748de595d3c9af
161
py
Python
pymath/map_squares/__init__.py
JASTYN/pythonmaster
46638ab09d28b65ce5431cd0759fe6df272fb85d
[ "Apache-2.0", "MIT" ]
3
2017-05-02T10:28:13.000Z
2019-02-06T09:10:11.000Z
pymath/map_squares/__init__.py
JASTYN/pythonmaster
46638ab09d28b65ce5431cd0759fe6df272fb85d
[ "Apache-2.0", "MIT" ]
2
2017-06-21T20:39:14.000Z
2020-02-25T10:28:57.000Z
pymath/map_squares/__init__.py
JASTYN/pythonmaster
46638ab09d28b65ce5431cd0759fe6df272fb85d
[ "Apache-2.0", "MIT" ]
2
2016-07-29T04:35:22.000Z
2017-01-18T17:05:36.000Z
def map_squares(numbers): """ :param numbers: list of numbers :return: square of the numbers """ return list(map(lambda x: x ** 2, numbers))
23
47
0.614907
0
0
0
0
0
0
0
0
82
0.509317
92278d4c99a794fc39f30624185168097ec4b202
1,400
py
Python
url_fetcher.py
netarachelhershko/crawler
22a5b41a768fae7415ad30cc6aec97063f2d07ce
[ "MIT" ]
null
null
null
url_fetcher.py
netarachelhershko/crawler
22a5b41a768fae7415ad30cc6aec97063f2d07ce
[ "MIT" ]
null
null
null
url_fetcher.py
netarachelhershko/crawler
22a5b41a768fae7415ad30cc6aec97063f2d07ce
[ "MIT" ]
null
null
null
from html_url_extractor import HtmlUrlExtractor from request_getter import RequestGetter from sitemap_fetcher import SitemapFetcher from urlparse import urljoin class UrlFetcher(object): """ Handles url fetching from both html source and sitemaps """ def __init__(self, request_limit=10): self.html_url...
40
98
0.712143
1,236
0.882857
0
0
0
0
0
0
219
0.156429
9227e595e3c40b1cac183a271ef1634007be821b
7,207
py
Python
lib/db.py
IoTtalk/os-IoTtalk
3c8609d10fcad040e3de727216507d0369be4cd0
[ "MIT" ]
2
2021-06-28T13:25:54.000Z
2021-07-27T08:43:38.000Z
lib/db.py
IoTtalk/IoTtalk
3c8609d10fcad040e3de727216507d0369be4cd0
[ "MIT" ]
1
2021-11-24T09:15:40.000Z
2021-11-24T13:51:23.000Z
lib/db.py
IoTtalk/IoTtalk
3c8609d10fcad040e3de727216507d0369be4cd0
[ "MIT" ]
null
null
null
from sqlalchemy import create_engine from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import Session from ec_config import SQLITE_PATH, MYSQL_HOST, MYSQL_USER, MYSQL_PASS Base = declarative_base() engine = None def connect(db_name): global engine if db_name.startswith('sqlite:'):...
42.146199
122
0.686971
5,906
0.819481
0
0
0
0
0
0
1,635
0.226863
92295505eb2a2180c78b5213c3250cea2e678cad
2,995
py
Python
chaos_genius/controllers/alert_controller.py
rsohlot/chaos_genius
ee1f68bf44af36b50d0ccb8c0824bbbbb079b07d
[ "MIT" ]
320
2022-02-18T18:18:42.000Z
2022-03-31T16:42:38.000Z
chaos_genius/controllers/alert_controller.py
rsohlot/chaos_genius
ee1f68bf44af36b50d0ccb8c0824bbbbb079b07d
[ "MIT" ]
115
2022-02-18T16:39:01.000Z
2022-03-31T15:23:52.000Z
chaos_genius/controllers/alert_controller.py
rsohlot/chaos_genius
ee1f68bf44af36b50d0ccb8c0824bbbbb079b07d
[ "MIT" ]
18
2022-02-18T18:44:01.000Z
2022-03-10T08:33:34.000Z
# -*- coding: utf-8 -*- """alert controlller.""" from typing import Any, Dict, List, Literal, Optional, Sequence, Tuple, overload from flask_sqlalchemy import Pagination from chaos_genius.databases.models.alert_model import Alert ALERT_CHANNELS = { "email": "E-mail", "slack": "Slack", } """A mapping of chann...
30.876289
88
0.66611
0
0
0
0
647
0.216027
0
0
907
0.302838
922960e3fb0974ea30b7500861328def7470c6f3
783
py
Python
PraticandoKivy/aula1.py
AlexandrePeBrito/Python
79a09b1fb8e705dc7b6859d977c8916a2d0dd4d0
[ "MIT" ]
null
null
null
PraticandoKivy/aula1.py
AlexandrePeBrito/Python
79a09b1fb8e705dc7b6859d977c8916a2d0dd4d0
[ "MIT" ]
null
null
null
PraticandoKivy/aula1.py
AlexandrePeBrito/Python
79a09b1fb8e705dc7b6859d977c8916a2d0dd4d0
[ "MIT" ]
null
null
null
from kivy.app import App from kivy.uix.behaviors import button from kivy.uix.button import Button from kivy.uix.boxlayout import BoxLayout from kivy.uix.label import Label class teste(App): def build(self): #Interface box = BoxLayout( orientation='vertical') button=Butt...
27.964286
86
0.630907
592
0.756066
0
0
0
0
0
0
146
0.186462
92299645cac68849bfd2688dce2525ba1cb2cd5d
1,160
py
Python
webapp/forms.py
rustprooflabs/osm2pgsql-tuner
1a70cf591ed364f5f0f4a71ef9c164388558da52
[ "MIT" ]
3
2021-05-08T16:44:19.000Z
2021-12-04T20:12:19.000Z
webapp/forms.py
rustprooflabs/osm2pgsql-tuner
1a70cf591ed364f5f0f4a71ef9c164388558da52
[ "MIT" ]
13
2021-05-08T16:47:02.000Z
2022-02-23T14:06:26.000Z
webapp/forms.py
rustprooflabs/osm2pgsql-tuner
1a70cf591ed364f5f0f4a71ef9c164388558da52
[ "MIT" ]
null
null
null
"""Provides Flask Forms related functionality.""" from wtforms import SelectField, BooleanField from flask_wtf import FlaskForm from webapp import config def _get_pbf_gb_choices(): """Prepares list of PBF size choices for drop-down menu. Returns ------------------------- pbf_gb_choices : list ...
32.222222
69
0.580172
598
0.515517
0
0
0
0
0
0
376
0.324138
922ad101e021f8b01709397177dc8e329b180e68
1,798
py
Python
karbor-1.3.0/karbor/tests/unit/fake_operation_log.py
scottwedge/OpenStack-Stein
7077d1f602031dace92916f14e36b124f474de15
[ "Apache-2.0" ]
1
2021-05-23T01:48:25.000Z
2021-05-23T01:48:25.000Z
karbor-1.3.0/karbor/tests/unit/fake_operation_log.py
scottwedge/OpenStack-Stein
7077d1f602031dace92916f14e36b124f474de15
[ "Apache-2.0" ]
5
2019-08-14T06:46:03.000Z
2021-12-13T20:01:25.000Z
karbor-1.3.0/karbor/tests/unit/fake_operation_log.py
scottwedge/OpenStack-Stein
7077d1f602031dace92916f14e36b124f474de15
[ "Apache-2.0" ]
2
2020-03-15T01:24:15.000Z
2020-07-22T20:34:26.000Z
# 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 agreed to in writing, software # d...
39.086957
78
0.669077
0
0
0
0
0
0
0
0
1,074
0.59733
922bba1b4a76b2a553064b7df320dfa6750e6b3c
2,776
py
Python
stage_check/stage_check/OutputRedundancyDatabaseConn.py
128technology/stage_check
2c9cdc491bafbcc6ed1a308093fe606dfd37da67
[ "MIT" ]
2
2020-05-26T15:13:47.000Z
2021-04-29T18:14:21.000Z
stage_check/stage_check/OutputRedundancyDatabaseConn.py
128technology/stage_check
2c9cdc491bafbcc6ed1a308093fe606dfd37da67
[ "MIT" ]
null
null
null
stage_check/stage_check/OutputRedundancyDatabaseConn.py
128technology/stage_check
2c9cdc491bafbcc6ed1a308093fe606dfd37da67
[ "MIT" ]
null
null
null
""" """ try: from stage_check import Output except ImportError: import Output class Base(Output.Base): """ """ def __init__(self): super().__init__() self.__full_name = "OutputRedundancyDatabaseConn.Base" self.status = Output.Status.OK """ no_node_data """ def proc_no_node_d...
19.828571
60
0.482349
2,684
0.966859
0
0
0
0
0
0
589
0.212176
922c6959cdb3d1ae6948d3f9838d9fd85526c23d
105
py
Python
bans/database/common.py
examknow/bans
2a405788770090e552e605e00e70cfb2cf910ac1
[ "MIT" ]
null
null
null
bans/database/common.py
examknow/bans
2a405788770090e552e605e00e70cfb2cf910ac1
[ "MIT" ]
null
null
null
bans/database/common.py
examknow/bans
2a405788770090e552e605e00e70cfb2cf910ac1
[ "MIT" ]
null
null
null
class DBTable(object): def __init__(self, db_location: str): self._db_location = db_location
26.25
41
0.704762
104
0.990476
0
0
0
0
0
0
0
0
922e25c5c3aba311e0beb70dcaf014c52bc03e0f
221
py
Python
eyey/constants.py
dincamihai/eyey
146c75a1c8b4f3da6ced57b4fee43ba3315052e0
[ "Apache-2.0" ]
null
null
null
eyey/constants.py
dincamihai/eyey
146c75a1c8b4f3da6ced57b4fee43ba3315052e0
[ "Apache-2.0" ]
null
null
null
eyey/constants.py
dincamihai/eyey
146c75a1c8b4f3da6ced57b4fee43ba3315052e0
[ "Apache-2.0" ]
null
null
null
IMPORTANT = b'important' NOT_IMPORTANT = b'not-important' SHOULD_BE_IMPORTANT = b'should-be-important' SHOULD_BE_NOT_IMPORTANT = b'should-be-not-important' RETRAIN = b'retrain' RELABEL = b'relabel' DELETED = b'\\Deleted'
27.625
52
0.773756
0
0
0
0
0
0
0
0
108
0.488688
922ebbdd04efb0dd43f3ace3b299d783e86149ce
27
py
Python
type_mappers/example.py
christabor/type_mappers
4c992b350dd579451f8956fb6ba8f70dd6e9a42f
[ "MIT" ]
2
2017-01-27T22:55:57.000Z
2017-01-29T01:56:52.000Z
type_mappers/example.py
christabor/type_mappers
4c992b350dd579451f8956fb6ba8f70dd6e9a42f
[ "MIT" ]
5
2017-01-28T07:36:31.000Z
2018-10-12T16:37:06.000Z
type_mappers/example.py
christabor/type_mappers
4c992b350dd579451f8956fb6ba8f70dd6e9a42f
[ "MIT" ]
null
null
null
from type_mappers import *
13.5
26
0.814815
0
0
0
0
0
0
0
0
0
0
922fe87b33a94fd0514ba31eace5ebb1c4d0f849
504
py
Python
APPS/PICK/models.py
RockhoRockho/Project_FG
362c75ebfdfcc8f1a8c88236279fefe24dfbd2c7
[ "MIT" ]
1
2022-03-25T12:45:24.000Z
2022-03-25T12:45:24.000Z
APPS/PICK/models.py
RockhoRockho/Project_FG
362c75ebfdfcc8f1a8c88236279fefe24dfbd2c7
[ "MIT" ]
null
null
null
APPS/PICK/models.py
RockhoRockho/Project_FG
362c75ebfdfcc8f1a8c88236279fefe24dfbd2c7
[ "MIT" ]
null
null
null
from django.db import models class Pick(models.Model): reason = models.CharField(max_length=30, default='', verbose_name='사유') comment = models.TextField(default='', verbose_name='덧글') member = models.ForeignKey('MEMBER.Member', on_delete=models.CASCADE) product = models.ForeignKey('PRODUCT.Product', o...
29.647059
76
0.676587
487
0.940154
0
0
0
0
0
0
71
0.137066
9230b5dfc3dc5973a4a8bb85e64adb2810164e90
154
py
Python
data/test_xunit.py
dustprotocol/go2xunit
15f9176b63ac73928fea9106350a53d7556ddf27
[ "MIT" ]
163
2015-03-18T09:42:39.000Z
2022-02-09T01:22:29.000Z
data/test_xunit.py
dustprotocol/go2xunit
15f9176b63ac73928fea9106350a53d7556ddf27
[ "MIT" ]
50
2015-05-28T08:27:51.000Z
2019-09-26T08:07:31.000Z
data/test_xunit.py
dustprotocol/go2xunit
15f9176b63ac73928fea9106350a53d7556ddf27
[ "MIT" ]
50
2015-01-10T18:44:32.000Z
2021-11-18T03:52:03.000Z
def test_add(): assert 1 + 2 == 3, "bad add" def test_sub(): assert 2 - 1 == 1, "bad sub" def test_sub_fail(): assert 2 - 2 == 1, "bad sub"
17.111111
32
0.538961
0
0
0
0
0
0
0
0
27
0.175325
9231baa109d9435fe051070cbdf5afd97866fc14
5,134
py
Python
graphlearn/python/nn/tf/app/link_predictor.py
gasdaf/graph-learn
4a77b39be37bb7507f0e9fb5d4ed40ca623b2ceb
[ "Apache-2.0" ]
1
2021-08-30T03:13:23.000Z
2021-08-30T03:13:23.000Z
graphlearn/python/nn/tf/app/link_predictor.py
gasdaf/graph-learn
4a77b39be37bb7507f0e9fb5d4ed40ca623b2ceb
[ "Apache-2.0" ]
null
null
null
graphlearn/python/nn/tf/app/link_predictor.py
gasdaf/graph-learn
4a77b39be37bb7507f0e9fb5d4ed40ca623b2ceb
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Alibaba Group Holding Limited. 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 ...
36.15493
80
0.653292
4,132
0.804831
0
0
0
0
0
0
2,235
0.435333
9231c9644edcc00c1f418f1e4bb4808e72a0d692
1,099
py
Python
torchtext/functional.py
parmeet/text
1fb2aedb48b5ecc5e81741e7c8504486b91655c6
[ "BSD-3-Clause" ]
null
null
null
torchtext/functional.py
parmeet/text
1fb2aedb48b5ecc5e81741e7c8504486b91655c6
[ "BSD-3-Clause" ]
null
null
null
torchtext/functional.py
parmeet/text
1fb2aedb48b5ecc5e81741e7c8504486b91655c6
[ "BSD-3-Clause" ]
null
null
null
import torch from torch import Tensor from torch.nn.utils.rnn import pad_sequence from typing import List, Optional __all__ = [ 'to_tensor', 'truncate', 'add_token', ] def to_tensor(input: List[List[int]], padding_value: Optional[int] = None) -> Tensor: if padding_value is None: output = torc...
23.891304
92
0.616015
0
0
0
0
0
0
0
0
32
0.029117
92332ccdf59f7541211edc49c0cc5adb5fbfec98
913
py
Python
img_backend/add_device.py
FIGLAB/zensors
4c80de1970ccaf167f87c474aadd96bcbcf5b9a1
[ "MIT" ]
2
2019-07-17T15:43:02.000Z
2020-05-04T17:21:43.000Z
img_backend/add_device.py
FIGLAB/zensors
4c80de1970ccaf167f87c474aadd96bcbcf5b9a1
[ "MIT" ]
null
null
null
img_backend/add_device.py
FIGLAB/zensors
4c80de1970ccaf167f87c474aadd96bcbcf5b9a1
[ "MIT" ]
2
2018-10-31T16:39:52.000Z
2018-11-08T22:41:14.000Z
#!/usr/bin/env python ''' Simple script to add a device to the database. ''' from ZensorDevice import ZensorDevice from enumerations import * import sys import random def main(argv): if len(argv) != 2: print "Usage:", argv[0], "<device_id>" return -1 devid = sys.argv[1] device = ZensorDev...
26.085714
60
0.63965
0
0
0
0
0
0
0
0
239
0.261774
92334af517a1402e63b55a3fe85da09a5408dc14
6,901
py
Python
python/GafferScene/ScriptProcedural.py
PaulDoessel/gaffer-play
8b72dabb388e12424c230acfb0bd209049b01bd6
[ "BSD-3-Clause" ]
1
2016-07-31T09:55:09.000Z
2016-07-31T09:55:09.000Z
python/GafferScene/ScriptProcedural.py
Kthulhu/gaffer
8995d579d07231988abc92c3ac2788c15c8bc75c
[ "BSD-3-Clause" ]
null
null
null
python/GafferScene/ScriptProcedural.py
Kthulhu/gaffer
8995d579d07231988abc92c3ac2788c15c8bc75c
[ "BSD-3-Clause" ]
1
2020-02-15T16:15:54.000Z
2020-02-15T16:15:54.000Z
########################################################################## # # Copyright (c) 2012, John Haddon. All rights reserved. # Copyright (c) 2013, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that ...
30.946188
108
0.697
4,847
0.702362
0
0
1,634
0.236777
0
0
2,835
0.41081
923501e60d59a0a4529bbd2a7bc6300d6760071d
5,881
py
Python
tests/testapps/tests/test_models.py
salexkidd/django-stackstore-model
fb0bb6431dd772a80b8c9d6d2b625eae69562fa9
[ "MIT" ]
5
2020-05-28T07:04:25.000Z
2020-09-26T05:29:46.000Z
tests/testapps/tests/test_models.py
salexkidd/django-stackstore-model
fb0bb6431dd772a80b8c9d6d2b625eae69562fa9
[ "MIT" ]
1
2020-09-26T05:34:19.000Z
2020-09-26T05:34:19.000Z
tests/testapps/tests/test_models.py
salexkidd/django-stackstore-model
fb0bb6431dd772a80b8c9d6d2b625eae69562fa9
[ "MIT" ]
null
null
null
from django.conf import settings from django.test import TestCase from django.test.utils import override_settings from copy import deepcopy from .. import models as testapps_models from .. import factories as testapps_factories class StackStoreManagerTest(TestCase): def test_delete(self): with self.asser...
33.605714
125
0.689679
5,646
0.960041
0
0
0
0
0
0
49
0.008332
9235169950838a2e17fec391196466cf8a8f8312
6,915
py
Python
docs/_downloads/d6b1e39143e3255799ec607967cb9223/sample.py
harishbalakrishnan3/Visual-Categorization
28c5fc4695fca931bb2a49697cf1776dae1e8259
[ "MIT" ]
null
null
null
docs/_downloads/d6b1e39143e3255799ec607967cb9223/sample.py
harishbalakrishnan3/Visual-Categorization
28c5fc4695fca931bb2a49697cf1776dae1e8259
[ "MIT" ]
null
null
null
docs/_downloads/d6b1e39143e3255799ec607967cb9223/sample.py
harishbalakrishnan3/Visual-Categorization
28c5fc4695fca931bb2a49697cf1776dae1e8259
[ "MIT" ]
1
2021-03-15T14:00:27.000Z
2021-03-15T14:00:27.000Z
""" A sample python script that illustrates how to use the gcm module. As a first step, we need to find the model's parameters - c,w,b (we will assume r = 2). This is done using MLE. After we find the parameters, we use them to find the corresponding probabilities using the functions from the gcm module. The following ...
36.015625
119
0.580188
0
0
0
0
0
0
0
0
2,634
0.380911
92372ee1b7c3e312c79430dd59dae4078f3316d3
948
py
Python
Python/Qiskit/Grower_search_algorithm.py
Pavel555-star/programs
d4cb812c0b9c5fff7b7c3cd20965bf820b1b95d8
[ "BSD-3-Clause" ]
1
2021-01-23T19:11:35.000Z
2021-01-23T19:11:35.000Z
Python/Qiskit/Grower_search_algorithm.py
Pavel555-star/programs
d4cb812c0b9c5fff7b7c3cd20965bf820b1b95d8
[ "BSD-3-Clause" ]
null
null
null
Python/Qiskit/Grower_search_algorithm.py
Pavel555-star/programs
d4cb812c0b9c5fff7b7c3cd20965bf820b1b95d8
[ "BSD-3-Clause" ]
null
null
null
from qiskit import * import matplotlib.pyplot as plt import numpy as np # define the oracle circuit oracle = QuantumCircuit(2, name='oracle') oracle.cz(0,1) -> cz-matrix ((1,0,0,0), (0,1,0,0), (0,0,1,0), (0,0,0,1)) oracle.to_gate() backend = Aer.get_backend('statevector_simulator') reflect = QuantumCircuit(2, name ...
28.727273
74
0.652954
0
0
0
0
0
0
0
0
275
0.290084
92379068cb2a4bc0fdeb0bc56557ae60741cfaaa
687
py
Python
sympy/crypto/__init__.py
shipci/sympy
4b59927bed992b980c9b3faac01becb36feef26b
[ "BSD-3-Clause" ]
319
2016-09-22T15:54:48.000Z
2022-03-18T02:36:58.000Z
sympy/crypto/__init__.py
curzel-it/KiPyCalc
909c783d5e6967ea58ca93f875106d8a8e3ca5db
[ "MIT" ]
9
2016-11-03T21:56:41.000Z
2020-08-09T19:27:37.000Z
sympy/crypto/__init__.py
curzel-it/KiPyCalc
909c783d5e6967ea58ca93f875106d8a8e3ca5db
[ "MIT" ]
27
2016-10-06T16:05:32.000Z
2022-03-18T02:37:00.000Z
from sympy.crypto.crypto import (alphabet_of_cipher, cycle_list, encipher_shift, encipher_affine, encipher_substitution, encipher_vigenere, decipher_vigenere, bifid5_square, bifid6_square, bifid7_square, encipher_hill, decipher_hill, encipher_bifid5, encipher_bifid6, encipher_bifid7, decip...
57.25
74
0.804949
0
0
0
0
0
0
0
0
0
0
923986f9bd14fbab28d2e07beb811c4e8f7e82e8
2,656
py
Python
5-Detection/SSD/utils/config.py
MaybeS/mnist
d0aeafce97d7308dc84adbb6ad8e547776db0cd5
[ "MIT" ]
8
2020-07-17T00:30:20.000Z
2021-06-15T07:14:55.000Z
5-Detection/SSD/utils/config.py
MaybeS/mnist
d0aeafce97d7308dc84adbb6ad8e547776db0cd5
[ "MIT" ]
null
null
null
5-Detection/SSD/utils/config.py
MaybeS/mnist
d0aeafce97d7308dc84adbb6ad8e547776db0cd5
[ "MIT" ]
2
2019-07-02T04:20:21.000Z
2019-07-16T06:51:13.000Z
import json from typing import Tuple, List class Config: """Config stack layers - Default config - Model default config - Load from config file - User argument config """ size = (300, 300) ssd_attributes = ['feature_map', 'steps', 'sizes', 'aspect_ratios'] ssd = { "aspec...
27.381443
92
0.50753
2,610
0.982681
0
0
277
0.104292
0
0
546
0.205572
923bc38bcf577c37aae6244f55a0e48675ccbfd5
5,200
py
Python
testing/testing_apiai_requests.py
Muflhi01/flow-dashboard
993320e2eb0f86d89b9904a3d5415c7479c5918e
[ "MIT" ]
1,623
2017-03-11T11:49:48.000Z
2022-03-30T06:44:11.000Z
testing/testing_apiai_requests.py
Muflhi01/flow-dashboard
993320e2eb0f86d89b9904a3d5415c7479c5918e
[ "MIT" ]
136
2017-03-11T17:08:57.000Z
2022-03-09T21:38:46.000Z
testing/testing_apiai_requests.py
Muflhi01/flow-dashboard
993320e2eb0f86d89b9904a3d5415c7479c5918e
[ "MIT" ]
217
2017-05-06T14:28:36.000Z
2022-03-29T16:56:01.000Z
#!/usr/bin/python # -*- coding: utf8 -*- from datetime import datetime from base_test_case import BaseTestCase from models import Goal from flow import app as tst_app from models import Habit, Task import json import imp try: imp.find_module('secrets', ['settings']) except ImportError: from settings import sec...
34.210526
133
0.363846
4,781
0.919423
0
0
0
0
0
0
1,247
0.239808
923d6daeee1f26ba47d523d2b91fd5411beae0a5
937
py
Python
cozyfuse/binary.py
poupotte/couchdb-fuse
1e81098f62c41d9566c01d2a2fadd0bdfe54402d
[ "BSD-3-Clause" ]
1
2016-03-28T22:56:04.000Z
2016-03-28T22:56:04.000Z
cozyfuse/binary.py
poupotte/couchdb-fuse
1e81098f62c41d9566c01d2a2fadd0bdfe54402d
[ "BSD-3-Clause" ]
null
null
null
cozyfuse/binary.py
poupotte/couchdb-fuse
1e81098f62c41d9566c01d2a2fadd0bdfe54402d
[ "BSD-3-Clause" ]
null
null
null
import sys from kivy.app import App from kivy.uix.anchorlayout import AnchorLayout from kivy.properties import * from replication import recover_progression_binary from kivy.clock import Clock class Binary(AnchorLayout): ''' Manage binaries download window ''' progress = ObjectProperty() def ini...
20.822222
56
0.608324
686
0.732124
0
0
0
0
0
0
140
0.149413
924075a62dfbc2884a5bde01f2ed7a11d0476d1c
3,019
py
Python
institutions/geo/models.py
sephcoster/mapusaurus
5515f0d89ff7b7cbc796af25b3d45950c8ed882f
[ "CC0-1.0" ]
null
null
null
institutions/geo/models.py
sephcoster/mapusaurus
5515f0d89ff7b7cbc796af25b3d45950c8ed882f
[ "CC0-1.0" ]
null
null
null
institutions/geo/models.py
sephcoster/mapusaurus
5515f0d89ff7b7cbc796af25b3d45950c8ed882f
[ "CC0-1.0" ]
null
null
null
import json from django.contrib.gis.db import models class Geo(models.Model): STATE_TYPE, COUNTY_TYPE, TRACT_TYPE, METRO_TYPE, MICRO_TYPE = range(1, 6) METDIV_TYPE, = range(6, 7) TYPES = [(STATE_TYPE, 'State'), (COUNTY_TYPE, 'County'), (TRACT_TYPE, 'Census Tract'), (METRO_TYPE, 'Metropolitan...
39.207792
77
0.532958
2,962
0.98112
0
0
0
0
0
0
591
0.19576
924185f1b41185b073f99907c5347d88ec6b3ce8
2,798
py
Python
phone_dic_accent_archive.py
arcman7/cmu_sphinx
343ee1c08061d607cab6ba9ab738a1ac5a8b59d9
[ "MIT" ]
null
null
null
phone_dic_accent_archive.py
arcman7/cmu_sphinx
343ee1c08061d607cab6ba9ab738a1ac5a8b59d9
[ "MIT" ]
null
null
null
phone_dic_accent_archive.py
arcman7/cmu_sphinx
343ee1c08061d607cab6ba9ab738a1ac5a8b59d9
[ "MIT" ]
null
null
null
import collections import os counter = collections.Counter() dir_name = 'accent_archive' text_file_name = 'reading-passage.txt' print('creating dictionary from "{}"'.format(os.path.join(dir_name, 'AA_unpacked', text_file_name))) # The Accent Archive uses the same text transcript for every audio recording text ...
38.328767
149
0.602931
0
0
0
0
0
0
0
0
842
0.300929
9242d22fb136a3ab5cbefda78054161564a70807
5,308
py
Python
necroassembler/utils.py
rdeioris/necroassembler
3dd60f0b71158b15dac061ddae0e2048e9c20d86
[ "MIT" ]
2
2019-10-09T21:12:15.000Z
2020-01-27T03:09:03.000Z
necroassembler/utils.py
rdeioris/necroassembler
3dd60f0b71158b15dac061ddae0e2048e9c20d86
[ "MIT" ]
null
null
null
necroassembler/utils.py
rdeioris/necroassembler
3dd60f0b71158b15dac061ddae0e2048e9c20d86
[ "MIT" ]
1
2019-10-16T20:51:29.000Z
2019-10-16T20:51:29.000Z
import string import struct from necroassembler.exceptions import NotInBitRange, InvalidBitRange def neg_fix(value, bits): negative = 1 << (bits - 1) if value & negative: return -(1 << (bits)) + value return value def pack_byte(*args): return struct.pack('B' * len(args), *[n & 0xff if n is n...
27.936842
102
0.568953
0
0
0
0
0
0
0
0
145
0.027317
9242da30eb8cc1d9931d3a3bfc2731f59cc10a24
3,367
py
Python
Advanced Computer Vision & Deep Learning/Project-2_Image_Captioning/model.py
sudoberlin/Computer_Vision_ND
6211d0a610a26f6ed54116127588adb6ff4b7ba9
[ "Apache-2.0" ]
1
2020-08-09T19:49:38.000Z
2020-08-09T19:49:38.000Z
Advanced Computer Vision & Deep Learning/Project-2_Image_Captioning/model.py
sudoberlin/Computer_Vision_ND
6211d0a610a26f6ed54116127588adb6ff4b7ba9
[ "Apache-2.0" ]
null
null
null
Advanced Computer Vision & Deep Learning/Project-2_Image_Captioning/model.py
sudoberlin/Computer_Vision_ND
6211d0a610a26f6ed54116127588adb6ff4b7ba9
[ "Apache-2.0" ]
null
null
null
import torch import torch.nn as nn import torchvision.models as models import torch.nn.functional as F import math class EncoderCNN(nn.Module): def __init__(self, embed_size): super(EncoderCNN, self).__init__() resnet = models.resnet50(pretrained=True) for param in resnet.parameters(): ...
38.701149
125
0.612712
3,182
0.945055
0
0
0
0
0
0
822
0.244134
924648ee2a9039a086b544cb62c526565fc25489
724
py
Python
amshared/stage/__init__.py
avidclam/amshared
fc605639409f3ea2b0efb2c0b45ad03969115bb6
[ "MIT" ]
null
null
null
amshared/stage/__init__.py
avidclam/amshared
fc605639409f3ea2b0efb2c0b45ad03969115bb6
[ "MIT" ]
null
null
null
amshared/stage/__init__.py
avidclam/amshared
fc605639409f3ea2b0efb2c0b45ad03969115bb6
[ "MIT" ]
null
null
null
""" Stage is a way to serialize data flows. Data Flow is a sequence (list, generator) of (metadata, content) tuples. Metadata is a key-value dictionary with several key names reserved: ``rubric``, ``name``, ``part``, `format``, and ``payload``. Content is useful application data (payload) or miscellaneous informatio...
32.909091
80
0.75
0
0
0
0
0
0
0
0
671
0.926796
9246509ac7b49513170c02e13891de80c2511c3a
29
py
Python
api/dorest/dorest/__init__.py
ichise-laboratory/uwkgm
6505fa5d524336b30505804a3d241143cb1fa4bf
[ "BSD-3-Clause" ]
null
null
null
api/dorest/dorest/__init__.py
ichise-laboratory/uwkgm
6505fa5d524336b30505804a3d241143cb1fa4bf
[ "BSD-3-Clause" ]
6
2020-11-25T10:49:45.000Z
2021-09-22T18:50:03.000Z
api/dorest/dorest/__init__.py
ichise-laboratory/uwkgm
6505fa5d524336b30505804a3d241143cb1fa4bf
[ "BSD-3-Clause" ]
1
2020-12-24T02:15:42.000Z
2020-12-24T02:15:42.000Z
from .libs.sh import verbose
14.5
28
0.793103
0
0
0
0
0
0
0
0
0
0
92469e853a715e9955a582e9ea45ef2f7e9cfdce
3,585
py
Python
running_modes/scoring/logging/base_scoring_logger.py
lilleswing/Reinvent-1
ac4e3e6fa6379c6f4af883478dfd1b3407933ada
[ "Apache-2.0" ]
183
2020-04-04T02:01:15.000Z
2022-03-30T21:56:56.000Z
running_modes/scoring/logging/base_scoring_logger.py
lilleswing/Reinvent-1
ac4e3e6fa6379c6f4af883478dfd1b3407933ada
[ "Apache-2.0" ]
39
2020-04-05T15:19:56.000Z
2022-03-09T12:58:21.000Z
running_modes/scoring/logging/base_scoring_logger.py
lilleswing/Reinvent-1
ac4e3e6fa6379c6f4af883478dfd1b3407933ada
[ "Apache-2.0" ]
70
2020-04-05T19:25:43.000Z
2022-02-22T12:04:39.000Z
import json import logging import os from abc import ABC, abstractmethod import pandas as pd from typing import List from running_modes.configurations.general_configuration_envelope import GeneralConfigurationEnvelope from running_modes.configurations.logging.scoring_log_configuration import ScoringLoggerConfiguratio...
41.206897
114
0.698187
3,126
0.871967
0
0
131
0.036541
0
0
185
0.051604
924a0eddccceff04dda1decc76232550991e0be7
2,697
py
Python
shopkit/contrib/payment/stripe_provider/__init__.py
sakkada/django-shopkit
35e6f8ac73bf6aa40887aa9b1b860d27db8b2975
[ "BSD-3-Clause" ]
null
null
null
shopkit/contrib/payment/stripe_provider/__init__.py
sakkada/django-shopkit
35e6f8ac73bf6aa40887aa9b1b860d27db8b2975
[ "BSD-3-Clause" ]
null
null
null
shopkit/contrib/payment/stripe_provider/__init__.py
sakkada/django-shopkit
35e6f8ac73bf6aa40887aa9b1b860d27db8b2975
[ "BSD-3-Clause" ]
null
null
null
from django.conf import settings from django.utils.translation import ugettext_lazy as _ from ....payment import PaymentProvider, PaymentFailure, PaymentType from . import forms from . import models import stripe import datetime class StripeProvider(PaymentProvider): form_class = forms.StripeReceiptForm pay...
35.486842
84
0.595476
2,463
0.913237
122
0.045235
0
0
0
0
326
0.120875
924a32e6e209fa2de53fe9b454a531ee0e4f03f5
2,424
py
Python
lambda/src/handlers/receive_email.py
sjmatta-forks/serverless-southwest-check-in
6b8cfbf1cb19c222f51a039db024217637db2ce4
[ "MIT" ]
49
2017-02-14T13:49:37.000Z
2022-03-24T13:57:05.000Z
lambda/src/handlers/receive_email.py
sjmatta-forks/serverless-southwest-check-in
6b8cfbf1cb19c222f51a039db024217637db2ce4
[ "MIT" ]
39
2017-02-08T14:21:17.000Z
2022-01-11T00:20:22.000Z
lambda/src/handlers/receive_email.py
sjmatta-forks/serverless-southwest-check-in
6b8cfbf1cb19c222f51a039db024217637db2ce4
[ "MIT" ]
13
2018-02-18T18:49:49.000Z
2022-02-16T15:05:35.000Z
import json import logging import os import time import boto3 import mail # Set up logging log = logging.getLogger(__name__) log.setLevel(logging.DEBUG) def _get_sfn_execution_name(reservation): """ Generate a human-readable execution named composed of the passenger's check in details followed by a tim...
32.32
79
0.691832
0
0
0
0
0
0
0
0
1,058
0.436469
924b85ea9f7b1945f0fd22f097a20909bd163eef
723
py
Python
src/a9a/__init__.py
hvod2000/a9a
6b5cddbac885e2aff56e32936b966f4ce05afbba
[ "MIT" ]
null
null
null
src/a9a/__init__.py
hvod2000/a9a
6b5cddbac885e2aff56e32936b966f4ce05afbba
[ "MIT" ]
null
null
null
src/a9a/__init__.py
hvod2000/a9a
6b5cddbac885e2aff56e32936b966f4ce05afbba
[ "MIT" ]
null
null
null
import a9a.encoder import a9a.decoder import a9a.dir_reader import a9a.dir_writer class Archive: def __init__(self, nodes=None): if nodes is None: nodes = {} self.content = nodes def to_bytes(self): return b"a9a\n" + encoder.encode_nodes(self.content) def __repr__(sel...
24.1
65
0.658368
638
0.882434
0
0
240
0.33195
0
0
42
0.058091