hexsha
stringlengths
40
40
size
int64
7
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
125
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
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
4
247
max_issues_repo_name
stringlengths
4
125
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
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
4
247
max_forks_repo_name
stringlengths
4
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
1
1.04M
avg_line_length
float64
1.77
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
7
1.04M
filtered:remove_function_no_docstring
int64
-102
942k
filtered:remove_class_no_docstring
int64
-354
977k
filtered:remove_delete_markers
int64
0
60.1k
215095b596d46dfb9be5d016b9319bae2de0f6bf
1,320
py
Python
src/data/bg_ri_eng.py
nedlrichards/tau_decomp
77560307836f67ae68f3571fb6cd0fd9d831398d
[ "MIT" ]
null
null
null
src/data/bg_ri_eng.py
nedlrichards/tau_decomp
77560307836f67ae68f3571fb6cd0fd9d831398d
[ "MIT" ]
null
null
null
src/data/bg_ri_eng.py
nedlrichards/tau_decomp
77560307836f67ae68f3571fb6cd0fd9d831398d
[ "MIT" ]
null
null
null
import numpy as np from math import pi from os.path import join import matplotlib.pyplot as plt from src import MLEnergy, list_tl_files plt.ion() source_depth = 'shallow' #source_depth = 'deep' save_dict = one_freq(400) save_dict['e_ri_400'] = save_dict.pop('e_ri') save_dict['e_ri_0_400'] = save_dict.pop('e_ri_0') s...
26.4
74
0.665909
import numpy as np from math import pi from os.path import join import matplotlib.pyplot as plt from src import MLEnergy, list_tl_files plt.ion() source_depth = 'shallow' #source_depth = 'deep' def one_freq(fc): tl_list = list_tl_files(fc, source_depth=source_depth) x_s = [] e_ri = [] e_ri_0 = [] ...
666
0
23
5e2b6e1969ce5954f3bdccfa6a100c966b6661fa
1,246
py
Python
imagedraw/imagedraw-paths.py
martinmcbride/python-imaging-book-examples
37e4ccf9b7b2fc3ff75b1fdb9f772de452a843b2
[ "MIT" ]
1
2021-08-22T17:09:44.000Z
2021-08-22T17:09:44.000Z
imagedraw/imagedraw-paths.py
sthagen/python-imaging-book-examples
2a079c5271f9849bc90a33bed6f3288142035ea7
[ "MIT" ]
null
null
null
imagedraw/imagedraw-paths.py
sthagen/python-imaging-book-examples
2a079c5271f9849bc90a33bed6f3288142035ea7
[ "MIT" ]
1
2021-08-22T17:09:48.000Z
2021-08-22T17:09:48.000Z
# Author: Martin McBride # Created: 2021-07-07 # Copyright (C) 2021, Martin McBride # License: MIT # Draw paths with Pillow from PIL import Image, ImageDraw, ImagePath import math import random count = 201 points = [curve(t) for t in range(0, count, 10)] # Creating and drawing a path image = Image.new('RGB', (400...
19.46875
59
0.685393
# Author: Martin McBride # Created: 2021-07-07 # Copyright (C) 2021, Martin McBride # License: MIT # Draw paths with Pillow from PIL import Image, ImageDraw, ImagePath import math import random count = 201 def curve(x): y = (x-100)**2/100 return x, y points = [curve(t) for t in range(0, count, 10)] # Cre...
87
0
45
a3fbe48071f7fc7c36317844d7f21651190631a2
408
py
Python
bot.py
MrAsminaf/T-Rex_bot
67c32323b8002308c53a7a7a3c0bcec8c814f1af
[ "MIT" ]
null
null
null
bot.py
MrAsminaf/T-Rex_bot
67c32323b8002308c53a7a7a3c0bcec8c814f1af
[ "MIT" ]
null
null
null
bot.py
MrAsminaf/T-Rex_bot
67c32323b8002308c53a7a7a3c0bcec8c814f1af
[ "MIT" ]
null
null
null
import pyautogui from PIL import ImageGrab, ImageOps from numpy import * if __name__ == "__main__": main()
17.73913
41
0.64951
import pyautogui from PIL import ImageGrab, ImageOps from numpy import * def Jump(): pyautogui.keyDown('space') def ImageSum(): box = [770, 380, 850, 450] image = ImageGrab.grab(box) grayImage = ImageOps.grayscale(image) a = array(grayImage.getcolors()) print(a.sum()) return a.sum() def main...
230
0
69
95464089294a197e7aedeb9cdf44b80eb42724ab
1,767
py
Python
configs/system.py
microsoft/PARA
966c7b8b170d935157adf944175d939bd15a4f16
[ "MIT" ]
null
null
null
configs/system.py
microsoft/PARA
966c7b8b170d935157adf944175d939bd15a4f16
[ "MIT" ]
null
null
null
configs/system.py
microsoft/PARA
966c7b8b170d935157adf944175d939bd15a4f16
[ "MIT" ]
null
null
null
from collections import namedtuple HOST = namedtuple('HOST', 'servers sockets channels DPC') DRAM = namedtuple('DRAM', 'ranks bgroups banks') ''' Datacenter of ICX servers: 100K, 2 sockets, 8 channels, 2DPC Datacenter of ARM servers: 100K, 1 socket, 12 channels, 1DPC Dual-socket ICX server: 1 node, 2 sockets, 8 c...
27.609375
106
0.633843
from collections import namedtuple HOST = namedtuple('HOST', 'servers sockets channels DPC') DRAM = namedtuple('DRAM', 'ranks bgroups banks') ''' Datacenter of ICX servers: 100K, 2 sockets, 8 channels, 2DPC Datacenter of ARM servers: 100K, 1 socket, 12 channels, 1DPC Dual-socket ICX server: 1 node, 2 sockets, 8 c...
0
0
0
bcbc6b0f76417ebb6565d633ece1efa22a7779e9
3,095
py
Python
computor.py
madvid/42_computorv1
e7ed8bc5eee004fe166fac5d31ed261820e9cc23
[ "MIT" ]
null
null
null
computor.py
madvid/42_computorv1
e7ed8bc5eee004fe166fac5d31ed261820e9cc23
[ "MIT" ]
null
null
null
computor.py
madvid/42_computorv1
e7ed8bc5eee004fe166fac5d31ed261820e9cc23
[ "MIT" ]
null
null
null
# =========================================================================== # # ____________________ |Importation des lib/packages| ____________________ # # =========================================================================== # import numpy as np import matplotlib.pyplot as plt import seaborn as sns import ...
31.907216
82
0.541195
# =========================================================================== # # ____________________ |Importation des lib/packages| ____________________ # # =========================================================================== # import numpy as np import matplotlib.pyplot as plt import seaborn as sns import ...
0
0
0
123da5196a0ac8b1fa99f110cb6fbc7e14c076ba
307
py
Python
academicPhylogeny/sitemaps.py
wabarr/physanth-phylogeny-v3
eb8f19ce4123f14e5077ec3a14620d59907ce7c4
[ "MIT" ]
null
null
null
academicPhylogeny/sitemaps.py
wabarr/physanth-phylogeny-v3
eb8f19ce4123f14e5077ec3a14620d59907ce7c4
[ "MIT" ]
null
null
null
academicPhylogeny/sitemaps.py
wabarr/physanth-phylogeny-v3
eb8f19ce4123f14e5077ec3a14620d59907ce7c4
[ "MIT" ]
null
null
null
from django.contrib.sitemaps import Sitemap from academicPhylogeny.models import PhD
23.615385
49
0.703583
from django.contrib.sitemaps import Sitemap from academicPhylogeny.models import PhD class PhDSitemap(Sitemap): changefreq = "weekly" priority = 0.5 def items(self): return PhD.objects.filter(validated=True) def location(self, obj): return "/detail/" + obj.URL_for_detail
95
104
23
2a046ced552a6a2e47dcd643908579b1b9557da6
6,093
py
Python
tmlib/lda/ldalearning.py
hncuong/topicmodel-lib
a14b065838c5ea996cc13b6454b8c051a2a87c9b
[ "MIT" ]
3
2020-06-09T04:47:46.000Z
2020-07-24T08:18:58.000Z
tmlib/lda/ldalearning.py
hncuong/topicmodel-lib
a14b065838c5ea996cc13b6454b8c051a2a87c9b
[ "MIT" ]
null
null
null
tmlib/lda/ldalearning.py
hncuong/topicmodel-lib
a14b065838c5ea996cc13b6454b8c051a2a87c9b
[ "MIT" ]
1
2021-03-08T10:54:33.000Z
2021-03-08T10:54:33.000Z
import sys, os sys.path.append(os.path.abspath(os.path.dirname(__file__) + '/' + '../..')) from tmlib.datasets import utilizies from ldamodel import LdaModel from tmlib.datasets.dataset import DataSet import logging FORMAT = "%(levelname)s> In %(module)s.%(funcName)s line %(lineno)d at %(asctime)-s> %(message)s" logg...
38.563291
125
0.617758
import sys, os sys.path.append(os.path.abspath(os.path.dirname(__file__) + '/' + '../..')) from tmlib.datasets import utilizies from ldamodel import LdaModel from tmlib.datasets.dataset import DataSet import logging FORMAT = "%(levelname)s> In %(module)s.%(funcName)s line %(lineno)d at %(asctime)-s> %(message)s" logg...
1,885
0
270
560d50f7122c78ed47967a0293dfc91bfcb446bb
1,431
py
Python
scripts/result2latex.py
jinzhao3611/Political_Stance_Prediction
b2314363e00a41836c5ae747ec29933601976736
[ "MIT" ]
null
null
null
scripts/result2latex.py
jinzhao3611/Political_Stance_Prediction
b2314363e00a41836c5ae747ec29933601976736
[ "MIT" ]
3
2020-11-13T18:49:31.000Z
2022-02-10T01:47:02.000Z
scripts/result2latex.py
jinzhao3611/Political_Stance_Prediction
b2314363e00a41836c5ae747ec29933601976736
[ "MIT" ]
null
null
null
from os.path import join as pjoin from os import listdir import pandas as pd from pandas import DataFrame if __name__ == '__main__': main()
31.108696
89
0.645003
from os.path import join as pjoin from os import listdir import pandas as pd from pandas import DataFrame def get_best_performance(input_df: "DataFrame", binary: bool) -> "DataFrame": line = input_df.iloc[input_df["micro_f"].argmax()] if binary: result = line[["micro_f", "Left-leaning_f", "Right-leani...
1,213
0
69
e7963127091b0bc9639c98e29377d85410010087
472
py
Python
webapp/home/templatetags/markdown.py
usegalaxy-au/galaxy-media-site
3ec13e0f42591d2543768f252be037784933e271
[ "MIT" ]
null
null
null
webapp/home/templatetags/markdown.py
usegalaxy-au/galaxy-media-site
3ec13e0f42591d2543768f252be037784933e271
[ "MIT" ]
36
2021-11-14T21:34:22.000Z
2022-03-24T22:46:42.000Z
webapp/home/templatetags/markdown.py
neoformit/galaxy-content-site
a6eeaf1893c12dd4d7d714fb823f43509a0a3893
[ "MIT" ]
null
null
null
"""Markdown rendering with python-markdown2. https://github.com/trentm/python-markdown2 """ import markdown2 from django import template register = template.Library() @register.filter() def markdown(md): """Render html from markdown string.""" if not md: return "" return markdown2.markdown(md, ...
19.666667
44
0.616525
"""Markdown rendering with python-markdown2. https://github.com/trentm/python-markdown2 """ import markdown2 from django import template register = template.Library() @register.filter() def markdown(md): """Render html from markdown string.""" if not md: return "" return markdown2.markdown(md, ...
0
0
0
d8a0ae1f9e988d5c2cbccd32b851e5193e7800b0
491
py
Python
meiduo_mall/meiduo_mall/apps/areas/urls.py
Zasling/meiduo_mall
c222b10588a9a5835ec7266b07019dc8b8ca7d65
[ "MIT" ]
1
2019-04-12T08:56:29.000Z
2019-04-12T08:56:29.000Z
meiduo_mall/meiduo_mall/apps/areas/urls.py
Zasling/meiduo_mall
c222b10588a9a5835ec7266b07019dc8b8ca7d65
[ "MIT" ]
null
null
null
meiduo_mall/meiduo_mall/apps/areas/urls.py
Zasling/meiduo_mall
c222b10588a9a5835ec7266b07019dc8b8ca7d65
[ "MIT" ]
1
2020-03-30T14:35:22.000Z
2020-03-30T14:35:22.000Z
from django.conf.urls import url from . import views urlpatterns = [ url(r'^areas/$', views.AreasView.as_view()), # 如果路由匹配成功,会生成一个字典数据{'pk':1300} url(r'^areas/(?P<pk>\d+)/$', views.AreaView.as_view()), url(r'^addresses/$', views.AddressView.as_view()), url(r'^addresses/(?P<pk>\d+)/$', views.Address...
35.071429
75
0.631365
from django.conf.urls import url from . import views urlpatterns = [ url(r'^areas/$', views.AreasView.as_view()), # 如果路由匹配成功,会生成一个字典数据{'pk':1300} url(r'^areas/(?P<pk>\d+)/$', views.AreaView.as_view()), url(r'^addresses/$', views.AddressView.as_view()), url(r'^addresses/(?P<pk>\d+)/$', views.Address...
0
0
0
bcc97809bae5b3ef3ce33fa4847a57ad78a25213
3,903
py
Python
silo/benchmarks/results/istc11-3-16-13.py
anshsarkar/TailBench
25845756aee9a892229c25b681051591c94daafd
[ "MIT" ]
274
2015-01-23T16:24:09.000Z
2022-02-22T03:16:14.000Z
silo/benchmarks/results/istc11-3-16-13.py
anshsarkar/TailBench
25845756aee9a892229c25b681051591c94daafd
[ "MIT" ]
3
2015-03-17T11:52:36.000Z
2019-07-22T23:04:25.000Z
silo/benchmarks/results/istc11-3-16-13.py
anshsarkar/TailBench
25845756aee9a892229c25b681051591c94daafd
[ "MIT" ]
94
2015-01-07T06:55:36.000Z
2022-01-22T08:14:15.000Z
RESULTS = [({'scale_factor': 1000, 'threads': 1, 'txn_flags': 1, 'db': 'kvdb', 'bench': 'ycsb'}, (455923.0, 0.0)), ({'scale_factor': 1000, 'threads': 1, 'txn_flags': 1, 'db': 'ndb-proto2', 'bench': 'ycsb'}, (392189.0, 0.0)), ({'scale_factor': 4000, 'threads': 4, 'txn_flags': 1, 'db': 'kvdb', 'bench': 'ycsb'}, (1837830....
1,951.5
3,902
0.570074
RESULTS = [({'scale_factor': 1000, 'threads': 1, 'txn_flags': 1, 'db': 'kvdb', 'bench': 'ycsb'}, (455923.0, 0.0)), ({'scale_factor': 1000, 'threads': 1, 'txn_flags': 1, 'db': 'ndb-proto2', 'bench': 'ycsb'}, (392189.0, 0.0)), ({'scale_factor': 4000, 'threads': 4, 'txn_flags': 1, 'db': 'kvdb', 'bench': 'ycsb'}, (1837830....
0
0
0
461c5356a6924c335a6822c19302d8aca5bde7b0
546
py
Python
src/plotSave.py
nik7273/computational-medical-knowledge
03357fc63382bed49509d7860f87a3d010f03018
[ "Apache-2.0" ]
null
null
null
src/plotSave.py
nik7273/computational-medical-knowledge
03357fc63382bed49509d7860f87a3d010f03018
[ "Apache-2.0" ]
null
null
null
src/plotSave.py
nik7273/computational-medical-knowledge
03357fc63382bed49509d7860f87a3d010f03018
[ "Apache-2.0" ]
1
2019-09-17T18:38:44.000Z
2019-09-17T18:38:44.000Z
# -*- coding: utf-8 -*- "PLOTTING FILE" import matplotlib.pyplot as plt import Graphics as artist
26
91
0.692308
# -*- coding: utf-8 -*- "PLOTTING FILE" import matplotlib.pyplot as plt import Graphics as artist def plot_and_save(frequencies, words, ylabel, savefile): fig = plt.figure() ax = fig.add_subplot(111) ax.semilogy(frequencies,'k--',linewidth=3) artist.adjust_spines(ax) ax.set_xticks(xrange(len(wor...
422
0
23
a8ccf99bf92775e812696b7aa7a676a37b4a0fa6
62,852
py
Python
prmaya/scripts/prSelectionUi.py
parzival-roethlein/prmaya
1a081ac859a97f9fbbbc91226441aa75a5449fea
[ "MIT" ]
20
2018-09-03T05:50:09.000Z
2021-03-27T11:42:38.000Z
prmaya/scripts/prSelectionUi.py
parzival-roethlein/prmaya
1a081ac859a97f9fbbbc91226441aa75a5449fea
[ "MIT" ]
null
null
null
prmaya/scripts/prSelectionUi.py
parzival-roethlein/prmaya
1a081ac859a97f9fbbbc91226441aa75a5449fea
[ "MIT" ]
4
2018-09-14T02:06:47.000Z
2020-01-28T15:14:39.000Z
""" # SOURCE https://gum.co/prselectionui https://github.com/parzival-roethlein/prmaya # DESCRIPTION A dynamic User Interface (UI) to manage selections and poses in Autodesk Maya. # USAGE Put the file prSelectionUi.py in your Maya scripts folder and execute: - Python: import prSelectionUi;prSelectionUi.UI() - MEL (fo...
40.084184
179
0.592344
""" # SOURCE https://gum.co/prselectionui https://github.com/parzival-roethlein/prmaya # DESCRIPTION A dynamic User Interface (UI) to manage selections and poses in Autodesk Maya. # USAGE Put the file prSelectionUi.py in your Maya scripts folder and execute: - Python: import prSelectionUi;prSelectionUi.UI() - MEL (fo...
0
0
0
6d054b1471d4e47cd65d6f2c1c0ade33fa15e499
2,424
py
Python
authApp/types/UserType.py
Alex-Bruno/steller-web
9dba1766989f9aaf165a26434dda40cf5c5cc409
[ "MIT" ]
null
null
null
authApp/types/UserType.py
Alex-Bruno/steller-web
9dba1766989f9aaf165a26434dda40cf5c5cc409
[ "MIT" ]
null
null
null
authApp/types/UserType.py
Alex-Bruno/steller-web
9dba1766989f9aaf165a26434dda40cf5c5cc409
[ "MIT" ]
null
null
null
from django.contrib.auth.models import Group from django.contrib.auth.forms import UserCreationForm, UserCreationForm, UserChangeForm from django import forms # from authApp.models import User #
31.076923
245
0.614274
from django.contrib.auth.models import Group from django.contrib.auth.forms import UserCreationForm, UserCreationForm, UserChangeForm from django import forms # from authApp.models import User # class FilterUserForm(forms.Form): name = forms.CharField( widget=forms.TextInput( attrs={ ...
1,147
1,026
68
dfa24d2d396a057ad4abd3fca908278d7a8726ed
2,432
py
Python
dia-proc.py
kwoodham/sublime
ed3dcd7b0a22938d1d7de2d55db3cc2960ed117f
[ "CC-BY-4.0" ]
1
2015-08-04T11:43:34.000Z
2015-08-04T11:43:34.000Z
dia-proc.py
kwoodham/sublime
ed3dcd7b0a22938d1d7de2d55db3cc2960ed117f
[ "CC-BY-4.0" ]
null
null
null
dia-proc.py
kwoodham/sublime
ed3dcd7b0a22938d1d7de2d55db3cc2960ed117f
[ "CC-BY-4.0" ]
null
null
null
#!/usr/bin/python3 import subprocess import sys import re import textwrap P = [] P.append(['<lb type="x-begin-paragraph"/>', '']) P.append(['<lb type="x-end-paragraph"/>', '\\']) P.append(['<q marker="">', '']) P.append(['</q>', '']) P.append(['<milestone marker="&#8220;" type="cQuote"/>', '"']) P.append(['<milestone...
28.27907
81
0.559622
#!/usr/bin/python3 import subprocess import sys import re import textwrap P = [] P.append(['<lb type="x-begin-paragraph"/>', '']) P.append(['<lb type="x-end-paragraph"/>', '\\']) P.append(['<q marker="">', '']) P.append(['</q>', '']) P.append(['<milestone marker="&#8220;" type="cQuote"/>', '"']) P.append(['<milestone...
0
0
0
e6cfb40a7909a858375c17997ee8066614cf094f
577
py
Python
tests/data_for_tests.py
Eldenwyre/DataMiningLib
9b6d8c8c322faf23e5c72320160e2749c939c4ca
[ "MIT" ]
null
null
null
tests/data_for_tests.py
Eldenwyre/DataMiningLib
9b6d8c8c322faf23e5c72320160e2749c939c4ca
[ "MIT" ]
null
null
null
tests/data_for_tests.py
Eldenwyre/DataMiningLib
9b6d8c8c322faf23e5c72320160e2749c939c4ca
[ "MIT" ]
null
null
null
import numpy as np # Num entries per column DATA_LENGTH = 10 # Data for tests in datamining lib data = { "dates": [ "01/17/2000", "January 17, 2000", "Jan 17, 2000", "17 Jan 2000", "17 January 2000", "01-17-2000", "January 17th 2000", "17-01-2000", ...
24.041667
74
0.464471
import numpy as np # Num entries per column DATA_LENGTH = 10 # Data for tests in datamining lib data = { "dates": [ "01/17/2000", "January 17, 2000", "Jan 17, 2000", "17 Jan 2000", "17 January 2000", "01-17-2000", "January 17th 2000", "17-01-2000", ...
0
0
0
4ba1b4fa6ac22800fb173161a2a0825382d61b72
2,361
py
Python
pacote download/aula10.py
henrique-maceira/estudos-em-python-3
aae9ab3df35034444497d13c1c8d7f9ea2c4b2ab
[ "MIT" ]
null
null
null
pacote download/aula10.py
henrique-maceira/estudos-em-python-3
aae9ab3df35034444497d13c1c8d7f9ea2c4b2ab
[ "MIT" ]
null
null
null
pacote download/aula10.py
henrique-maceira/estudos-em-python-3
aae9ab3df35034444497d13c1c8d7f9ea2c4b2ab
[ "MIT" ]
null
null
null
import random #===exercício 01=== num= int(input("Seu palpite:")) sor= random.randint(1,5) if (num == sor): print("O número sorteado foi {}.\nVocê é o bichão mesmo hein".format(sor)) else: print("O número sorteado foi {}.\nTente novamente".format(sor)) #===exercício02=== vel= float(input("velocidade do automóv...
32.791667
105
0.618806
import random #===exercício 01=== num= int(input("Seu palpite:")) sor= random.randint(1,5) if (num == sor): print("O número sorteado foi {}.\nVocê é o bichão mesmo hein".format(sor)) else: print("O número sorteado foi {}.\nTente novamente".format(sor)) #===exercício02=== vel= float(input("velocidade do automóv...
0
0
0
49cd42d8558d45b7810a4b458b53bd6ffc27d481
5,624
py
Python
xsdata/formats/dataclass/parsers/mixins.py
pashashocky/xsdata
1cd681598d2235626d0e21716fc9fb885d26e351
[ "MIT" ]
null
null
null
xsdata/formats/dataclass/parsers/mixins.py
pashashocky/xsdata
1cd681598d2235626d0e21716fc9fb885d26e351
[ "MIT" ]
null
null
null
xsdata/formats/dataclass/parsers/mixins.py
pashashocky/xsdata
1cd681598d2235626d0e21716fc9fb885d26e351
[ "MIT" ]
null
null
null
import abc from typing import Any from typing import Dict from typing import List from typing import Optional from typing import Tuple from typing import Type from xsdata.exceptions import XmlHandlerError from xsdata.formats.bindings import AbstractParser from xsdata.formats.dataclass.parsers.config import ParserConfi...
29.445026
87
0.607219
import abc from typing import Any from typing import Dict from typing import List from typing import Optional from typing import Tuple from typing import Type from xsdata.exceptions import XmlHandlerError from xsdata.formats.bindings import AbstractParser from xsdata.formats.dataclass.parsers.config import ParserConfi...
322
0
54
07d3c56c661508aceb7614458b915275d98c79f3
984
py
Python
scripts/process_surface_data.py
NCAR/mlsurfacelayer
762d2fe43c9da23fe3779057bfc5d4d3871b2f47
[ "MIT" ]
1
2022-02-16T01:16:55.000Z
2022-02-16T01:16:55.000Z
scripts/process_surface_data.py
NCAR/mlsurfacelayer
762d2fe43c9da23fe3779057bfc5d4d3871b2f47
[ "MIT" ]
null
null
null
scripts/process_surface_data.py
NCAR/mlsurfacelayer
762d2fe43c9da23fe3779057bfc5d4d3871b2f47
[ "MIT" ]
null
null
null
#!/usr/bin/env python import argparse from mlsurfacelayer.data import process_cabauw_data from mlsurfacelayer.data import process_idaho_data if __name__ == "__main__": main()
46.857143
130
0.705285
#!/usr/bin/env python import argparse from mlsurfacelayer.data import process_cabauw_data from mlsurfacelayer.data import process_idaho_data def main(): parser = argparse.ArgumentParser() parser.add_argument("-i", "--input", help="Input data path.") parser.add_argument("-s", "--site", default="cabauw", hel...
782
0
23
3986a2611808a95de262abd24ae43b57008d4da7
606
py
Python
test/TarantoolAppBuilderTest.py
LuaStakky/LuaStakky
275c6b1b90adbdcf06ad8ad4420afb4b7d7e7195
[ "MIT" ]
3
2020-04-20T06:12:54.000Z
2021-03-08T08:28:20.000Z
test/TarantoolAppBuilderTest.py
LuaStakky/LuaStakky
275c6b1b90adbdcf06ad8ad4420afb4b7d7e7195
[ "MIT" ]
20
2020-04-20T05:48:57.000Z
2021-02-21T03:45:30.000Z
test/TarantoolAppBuilderTest.py
LuaStakky/LuaStakky
275c6b1b90adbdcf06ad8ad4420afb4b7d7e7195
[ "MIT" ]
null
null
null
from LuaStakky.TarantoolAppBuilder import * import os import pytest
33.666667
112
0.645215
from LuaStakky.TarantoolAppBuilder import * import os import pytest def test(): sub_conf = { "worker_processes": 12, "worker_connections": 8192, "keepalive_timeout": 75, "main": "manifest.yaml", "mount_points": {"app": "TestTarantoolApp", "modules": ["TarantoolMo...
508
0
25
a479f4d71c6326cce26fad23ae885287ea3ce629
3,890
py
Python
daily_fantasy_sports_models/draft_kings/nba/models/contests/salary_cap/classic/lineup.py
jaebradley/daily_fantasy_sports_models
a8a4b6296badabe116aaf49e89aa53ab8d75853a
[ "MIT" ]
2
2021-09-06T06:52:48.000Z
2021-09-09T23:34:07.000Z
daily_fantasy_sports_models/draft_kings/nba/models/contests/salary_cap/classic/lineup.py
jaebradley/daily_fantasy_sports_models
a8a4b6296badabe116aaf49e89aa53ab8d75853a
[ "MIT" ]
4
2021-09-06T16:23:07.000Z
2021-09-16T18:46:21.000Z
daily_fantasy_sports_models/draft_kings/nba/models/contests/salary_cap/classic/lineup.py
jaebradley/daily_fantasy_sports_models
a8a4b6296badabe116aaf49e89aa53ab8d75853a
[ "MIT" ]
null
null
null
from dataclasses import dataclass from daily_fantasy_sports_models.core.sets import is_disjoint from daily_fantasy_sports_models.draft_kings.nba.models.contests.salary_cap.player_pool.player import Player \ as PlayerPoolPlayer from daily_fantasy_sports_models.draft_kings.nba.models.core.position import Position ...
30.629921
110
0.661954
from dataclasses import dataclass from daily_fantasy_sports_models.core.sets import is_disjoint from daily_fantasy_sports_models.draft_kings.nba.models.contests.salary_cap.player_pool.player import Player \ as PlayerPoolPlayer from daily_fantasy_sports_models.draft_kings.nba.models.core.position import Position ...
1,583
1,217
135
6f2b969076b332b37990f3fbb47651ae60f9885a
481
py
Python
python/sdss_install/install4/__init__.py
sdss/sdss_install
f641c158877b827ccd519c5b5bafce76ecda2ec7
[ "BSD-3-Clause" ]
3
2019-06-28T18:45:01.000Z
2020-07-19T03:38:51.000Z
python/sdss_install/install4/__init__.py
sdss/sdss_install
f641c158877b827ccd519c5b5bafce76ecda2ec7
[ "BSD-3-Clause" ]
49
2018-09-29T01:03:25.000Z
2020-05-12T15:54:55.000Z
python/sdss_install/install4/__init__.py
sdss/sdss_install
f641c158877b827ccd519c5b5bafce76ecda2ec7
[ "BSD-3-Clause" ]
1
2019-04-29T16:14:57.000Z
2019-04-29T16:14:57.000Z
# License information goes here # -*- coding: utf-8 -*- """ ====================== sdss_install.install4 ====================== This package contains code for installing SDSS-IV software products. """ from __future__ import absolute_import, division, print_function, unicode_literals # The line above will help with 2to...
26.722222
82
0.727651
# License information goes here # -*- coding: utf-8 -*- """ ====================== sdss_install.install4 ====================== This package contains code for installing SDSS-IV software products. """ from __future__ import absolute_import, division, print_function, unicode_literals # The line above will help with 2to...
0
0
0
6494ae361f944ae3cf8153562be41369a5001385
17,382
py
Python
caffe2/python/tutorials/py_gen/CIFAR10_Part2.py
inkawhich/caffe2
411c52c3945c9f0b46a11730175986a75c9f39be
[ "Apache-2.0" ]
6
2016-09-28T18:51:21.000Z
2019-04-01T04:42:08.000Z
caffe2/python/tutorials/py_gen/CIFAR10_Part2.py
inkawhich/caffe2
411c52c3945c9f0b46a11730175986a75c9f39be
[ "Apache-2.0" ]
null
null
null
caffe2/python/tutorials/py_gen/CIFAR10_Part2.py
inkawhich/caffe2
411c52c3945c9f0b46a11730175986a75c9f39be
[ "Apache-2.0" ]
1
2017-11-09T21:53:57.000Z
2017-11-09T21:53:57.000Z
######################################################### # # DO NOT EDIT THIS FILE. IT IS GENERATED AUTOMATICALLY. # # PLEASE LOOK INTO THE README FOR MORE INFORMATION. # # ######################################################### # coding: utf-8 # # CIFAR-10: Part 2 # # Welcome back! If you have not completed...
44.116751
924
0.729375
######################################################### # # DO NOT EDIT THIS FILE. IT IS GENERATED AUTOMATICALLY. # # PLEASE LOOK INTO THE README FOR MORE INFORMATION. # # ######################################################### # coding: utf-8 # # CIFAR-10: Part 2 # # Welcome back! If you have not completed...
2,475
0
69
0b6352e2d5b21f0f5e779876f61a8b06830704b5
6,080
py
Python
autocomplete_light/autocomplete/model.py
kimetrica/django-autocomplete-light
be516741fc1072615f376d1459ce5ad7ecec1bbe
[ "MIT" ]
null
null
null
autocomplete_light/autocomplete/model.py
kimetrica/django-autocomplete-light
be516741fc1072615f376d1459ce5ad7ecec1bbe
[ "MIT" ]
2
2021-03-31T18:52:30.000Z
2021-12-13T19:50:13.000Z
autocomplete_light/autocomplete/model.py
kimetrica/django-autocomplete-light
be516741fc1072615f376d1459ce5ad7ecec1bbe
[ "MIT" ]
null
null
null
from django.db.models import Q from django.utils.encoding import force_text from django.db import connection from ..settings import DEFAULT_SEARCH_FIELDS __all__ = ('AutocompleteModel', ) class AutocompleteModel(object): """Autocomplete which considers choices as a queryset. .. py:attribute:: choices ...
34.942529
78
0.604441
from django.db.models import Q from django.utils.encoding import force_text from django.db import connection from ..settings import DEFAULT_SEARCH_FIELDS __all__ = ('AutocompleteModel', ) class AutocompleteModel(object): """Autocomplete which considers choices as a queryset. .. py:attribute:: choices ...
0
0
0
bfca2924dfa23f55a89a549dc298d93f78d763e6
876
py
Python
process_mmsdk/scratch.py
e-remington-lee/record_video
e33d9ab91e1194da3c94286344c309debd57dc02
[ "Apache-2.0" ]
2
2021-08-24T03:26:44.000Z
2022-02-07T12:52:43.000Z
process_mmsdk/scratch.py
e-remington-lee/record_video
e33d9ab91e1194da3c94286344c309debd57dc02
[ "Apache-2.0" ]
null
null
null
process_mmsdk/scratch.py
e-remington-lee/record_video
e33d9ab91e1194da3c94286344c309debd57dc02
[ "Apache-2.0" ]
null
null
null
import csv with open("process_mmsdk/mosei_dataset_int.csv", "r") as rf: csvreader = csv.reader(rf) next(csvreader) with open("process_mmsdk/no_sentiment.csv", "w", newline="") as wf: csvwriter = csv.writer(wf) headers = ["video_name_segment", "happy", "sad", "anger", "surprise", "disgust",...
27.375
96
0.552511
import csv def convert(number): if number == -3: return 0 elif number == -2: return 1 elif number == -1: return 2 elif number == 0: return 3 elif number == 1: return 4 elif number == 2: return 5 elif number == 3: return 6 with open("...
273
0
23
359fcf75770aab11cd37a0cafccb991868d37351
384
py
Python
tictactoe/gameplay/migrations/0002_move_status.py
saumil-jain/tictactoe
8fa9996dcbedc274e43571ab8c1849431175bb48
[ "MIT" ]
null
null
null
tictactoe/gameplay/migrations/0002_move_status.py
saumil-jain/tictactoe
8fa9996dcbedc274e43571ab8c1849431175bb48
[ "MIT" ]
null
null
null
tictactoe/gameplay/migrations/0002_move_status.py
saumil-jain/tictactoe
8fa9996dcbedc274e43571ab8c1849431175bb48
[ "MIT" ]
null
null
null
# Generated by Django 2.0.1 on 2018-01-18 09:06 from django.db import migrations, models
20.210526
62
0.583333
# Generated by Django 2.0.1 on 2018-01-18 09:06 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('gameplay', '0001_initial'), ] operations = [ migrations.AddField( model_name='move', name='status', fiel...
0
270
23
37fbf0176f31031373e2246d455eb1b5a7e27604
1,157
py
Python
proj/celery.py
iandmyhand/python-tester
b4fa2bd2706f3fb516388c9866e86fb7a1a9dfa4
[ "MIT" ]
1
2015-03-30T08:35:57.000Z
2015-03-30T08:35:57.000Z
proj/celery.py
iandmyhand/python-tester
b4fa2bd2706f3fb516388c9866e86fb7a1a9dfa4
[ "MIT" ]
null
null
null
proj/celery.py
iandmyhand/python-tester
b4fa2bd2706f3fb516388c9866e86fb7a1a9dfa4
[ "MIT" ]
null
null
null
# celery.py """ Using SQS queue & MySQL result pip install https://github.com/celery/vine/zipball/master#egg=vine pip install https://github.com/celery/kombu/zipball/master#egg=kombu pip install https://github.com/celery/py-amqp/zipball/master#egg=amqp pip install https://github.com/celery/billiard/zipball/master#egg=b...
33.057143
193
0.766638
# celery.py """ Using SQS queue & MySQL result pip install https://github.com/celery/vine/zipball/master#egg=vine pip install https://github.com/celery/kombu/zipball/master#egg=kombu pip install https://github.com/celery/py-amqp/zipball/master#egg=amqp pip install https://github.com/celery/billiard/zipball/master#egg=b...
0
0
0
124a97546aee25d8cb33592bda48b40675ae2148
1,746
py
Python
beginner/list_comprehension.py
chaudha4/python-projects
baba3235069b7d6b084f28904f0662c043762175
[ "MIT" ]
null
null
null
beginner/list_comprehension.py
chaudha4/python-projects
baba3235069b7d6b084f28904f0662c043762175
[ "MIT" ]
3
2021-11-23T22:19:19.000Z
2022-03-12T00:52:34.000Z
beginner/list_comprehension.py
chaudha4/python-projects
baba3235069b7d6b084f28904f0662c043762175
[ "MIT" ]
null
null
null
print(f"\n{'*' * 50}") # Example 1 - Using Square function print(f'Square of 5 is {square(5)}') lst = [1, 2, -5, 4] # Apply the square function to each element in the list - Using For loop rslt = list() # Or rslt = [] for ii in lst: rslt.append(square(ii)) print("Example 1 - Using Loop", rslt) # Apply the squ...
23.917808
122
0.647766
print(f"\n{'*' * 50}") # Example 1 - Using Square function def square(x): return x * x print(f'Square of 5 is {square(5)}') lst = [1, 2, -5, 4] # Apply the square function to each element in the list - Using For loop rslt = list() # Or rslt = [] for ii in lst: rslt.append(square(ii)) print("Example 1 - Us...
357
0
92
5007883467559a21096e8c71c828d50f735dc569
54
py
Python
app/application/__init__.py
hack4impact-upenn/immigrant-defense-project
38b4698151178a4c82f314408cd7007c4dd80f51
[ "MIT" ]
1
2018-09-22T05:14:23.000Z
2018-09-22T05:14:23.000Z
app/application/__init__.py
hack4impact-upenn/immigrant-defense-project
38b4698151178a4c82f314408cd7007c4dd80f51
[ "MIT" ]
null
null
null
app/application/__init__.py
hack4impact-upenn/immigrant-defense-project
38b4698151178a4c82f314408cd7007c4dd80f51
[ "MIT" ]
null
null
null
from app.application.views import application # noqa
27
53
0.814815
from app.application.views import application # noqa
0
0
0
fef7aee23d76c73ea7889d267a2c85519b3702f1
114
py
Python
IMClient/__init__.py
UC-FAST/BUBBLE
d56a91ec5e7c71c193e4932aade9dba1f27f5415
[ "Apache-2.0" ]
2
2020-01-28T12:10:06.000Z
2020-01-28T12:10:08.000Z
IMClient/__init__.py
UC-FAST/BUBBLE
d56a91ec5e7c71c193e4932aade9dba1f27f5415
[ "Apache-2.0" ]
null
null
null
IMClient/__init__.py
UC-FAST/BUBBLE
d56a91ec5e7c71c193e4932aade9dba1f27f5415
[ "Apache-2.0" ]
null
null
null
from .IMClientProtocol import * from .IMClientSocket import * from .user import * from .localService import *
22.8
32
0.754386
from .IMClientProtocol import * from .IMClientSocket import * from .user import * from .localService import *
0
0
0
7624c99f5046ec6bade9801e681ca29d30676e73
154
py
Python
spotify/credentials.py
andeen171/Django-React-Spotify-Controller
4dd6095b110cb8bc4f3bd516916768ef85efe77f
[ "Unlicense" ]
2
2021-10-19T17:29:04.000Z
2021-10-19T17:29:30.000Z
spotify/credentials.py
andeen171/Django-React-Spotify-Controller
4dd6095b110cb8bc4f3bd516916768ef85efe77f
[ "Unlicense" ]
null
null
null
spotify/credentials.py
andeen171/Django-React-Spotify-Controller
4dd6095b110cb8bc4f3bd516916768ef85efe77f
[ "Unlicense" ]
null
null
null
CLIENT_ID = "9ecf1e52d5034f01ac8fce5378decd00" CLIENT_SECRET = "519c44e4a4764c208327e9ba8059f2fd" REDIRECT_URI = "http://localhost:8000/spotify/redirect"
38.5
55
0.844156
CLIENT_ID = "9ecf1e52d5034f01ac8fce5378decd00" CLIENT_SECRET = "519c44e4a4764c208327e9ba8059f2fd" REDIRECT_URI = "http://localhost:8000/spotify/redirect"
0
0
0
dc72d3b656ad82c0b39743974c04ad15fe6f5147
1,749
py
Python
tests/functions_tests/baseline_test.py
camilorey/signals_package
fe28fe9b4f791a951fb5249ab0da5efbcd54fd5c
[ "MIT" ]
1
2022-01-03T19:39:45.000Z
2022-01-03T19:39:45.000Z
tests/functions_tests/baseline_test.py
camilorey/signals_package
fe28fe9b4f791a951fb5249ab0da5efbcd54fd5c
[ "MIT" ]
null
null
null
tests/functions_tests/baseline_test.py
camilorey/signals_package
fe28fe9b4f791a951fb5249ab0da5efbcd54fd5c
[ "MIT" ]
null
null
null
import unittest import math from signals.functions.baseline import BaseLine if __name__ == '__main__': unittest.main()
39.75
96
0.630646
import unittest import math from signals.functions.baseline import BaseLine class BaselineTest(unittest.TestCase): def test_functionDefaultCreate(self): base_test = BaseLine() base_dict = {'_amplitude':0,'_period':0,'_phase':0,'_translation':0} self.assertEqual(base_test.__dict__,base_dict...
1,424
17
185
534946893723d7de3f6da0b0488112b9d1e42172
2,581
py
Python
adlibre_dms/apps/mdtui/templatetags/mui_permissions.py
adlibre/Adlibre-DMS
96ce41b5699e2ea58e3ca560d46d481e954f17a4
[ "BSD-3-Clause" ]
48
2015-02-25T03:20:35.000Z
2022-03-11T09:02:42.000Z
adlibre_dms/apps/mdtui/templatetags/mui_permissions.py
adlibre/Adlibre-DMS
96ce41b5699e2ea58e3ca560d46d481e954f17a4
[ "BSD-3-Clause" ]
6
2015-01-09T08:30:53.000Z
2016-12-05T15:03:01.000Z
adlibre_dms/apps/mdtui/templatetags/mui_permissions.py
adlibre/Adlibre-DMS
96ce41b5699e2ea58e3ca560d46d481e954f17a4
[ "BSD-3-Clause" ]
24
2015-01-15T11:41:40.000Z
2022-03-17T20:31:06.000Z
""" Module: Permissions for templates rendering helpers for MDTUI Project: Adlibre DMS Copyright: Adlibre Pty Ltd 2012 License: See LICENSE for license information Author: Iurii Garmash """ from django import template from mdtui.security import SEC_GROUP_NAMES register = template.Library() @register.simple_tag(take...
30.011628
68
0.672608
""" Module: Permissions for templates rendering helpers for MDTUI Project: Adlibre DMS Copyright: Adlibre Pty Ltd 2012 License: See LICENSE for license information Author: Iurii Garmash """ from django import template from mdtui.security import SEC_GROUP_NAMES register = template.Library() @register.simple_tag(take...
0
0
0
cb8357256ca5927438e0d4939592bbeb67f49e8b
6,758
py
Python
datageneration/main_part2.py
phivision/surreal
61f56db4c840013497eef4c3954d1112c1c1acec
[ "MIT-CMU", "OLDAP-2.2.1" ]
null
null
null
datageneration/main_part2.py
phivision/surreal
61f56db4c840013497eef4c3954d1112c1c1acec
[ "MIT-CMU", "OLDAP-2.2.1" ]
null
null
null
datageneration/main_part2.py
phivision/surreal
61f56db4c840013497eef4c3954d1112c1c1acec
[ "MIT-CMU", "OLDAP-2.2.1" ]
null
null
null
import sys import os from os import remove from os.path import join, dirname, realpath, exists import numpy as np import time start_time = None if __name__ == '__main__': # time logging #global start_time start_time = time.time() from pickle import load import argparse # parse c...
39.290698
166
0.60654
import sys import os from os import remove from os.path import join, dirname, realpath, exists import numpy as np def load_body_data(smpl_data, idx=0): cmu_keys = [] for seq in smpl_data.files: if seq.startswith('pose_'): cmu_keys.append(seq.replace('pose_', '')) name = sorted(cmu...
605
0
45
a7f2103ef315fd3e1285381b39b6d16d9f69b77d
8,369
py
Python
places/add_test_places.py
samargulies/welp
8ed292c392885840787752f86d0aa8f538da5465
[ "MIT" ]
null
null
null
places/add_test_places.py
samargulies/welp
8ed292c392885840787752f86d0aa8f538da5465
[ "MIT" ]
7
2020-06-05T18:14:31.000Z
2022-03-11T23:20:50.000Z
places/add_test_places.py
samargulies/welp
8ed292c392885840787752f86d0aa8f538da5465
[ "MIT" ]
null
null
null
from .models import Place from django.contrib.gis.geos import Point import random min_x = -74.8 max_x = -75.2 min_y = 39.7 max_y = 40.2 objects = [ "CD", "Christmas ornament", "acorn", "apple", "bag", "bag of cotton balls", "bag of popcorn", "bag of rubber bands", "ball of yarn", ...
17.806383
74
0.509738
from .models import Place from django.contrib.gis.geos import Point import random min_x = -74.8 max_x = -75.2 min_y = 39.7 max_y = 40.2 objects = [ "CD", "Christmas ornament", "acorn", "apple", "bag", "bag of cotton balls", "bag of popcorn", "bag of rubber bands", "ball of yarn", ...
395
0
23
d1658c0bdea578126b31280aec11451405e18c6c
6,092
py
Python
software/python/LsstIonPump/Fpga.py
slaclab/lsst-ion-pump-ps-controller
1e853ef43fd065fe187ade7ef73ebbb0c45876b9
[ "BSD-3-Clause-LBNL" ]
null
null
null
software/python/LsstIonPump/Fpga.py
slaclab/lsst-ion-pump-ps-controller
1e853ef43fd065fe187ade7ef73ebbb0c45876b9
[ "BSD-3-Clause-LBNL" ]
null
null
null
software/python/LsstIonPump/Fpga.py
slaclab/lsst-ion-pump-ps-controller
1e853ef43fd065fe187ade7ef73ebbb0c45876b9
[ "BSD-3-Clause-LBNL" ]
null
null
null
#!/usr/bin/env python #----------------------------------------------------------------------------- # Title : #----------------------------------------------------------------------------- # File : TopLevel.py # Created : 2017-04-03 #----------------------------------------------------------------------...
32.92973
105
0.437951
#!/usr/bin/env python #----------------------------------------------------------------------------- # Title : #----------------------------------------------------------------------------- # File : TopLevel.py # Created : 2017-04-03 #----------------------------------------------------------------------...
4,926
9
164
7dc313e28d49e5209852035768c6fb541889d836
12,124
py
Python
tools/run_tests/lb_interop_tests/gen_build_yaml.py
warlock135/grpc
81e13e4fa9c0cdf7dc131ce548e1604c895b738c
[ "Apache-2.0" ]
36,552
2015-02-26T17:30:13.000Z
2022-03-31T22:41:33.000Z
tools/run_tests/lb_interop_tests/gen_build_yaml.py
SanjanaSingh897/grpc
2d858866eb95ce5de8ccc8c35189a12733d8ca79
[ "Apache-2.0" ]
23,536
2015-02-26T17:50:56.000Z
2022-03-31T23:39:42.000Z
tools/run_tests/lb_interop_tests/gen_build_yaml.py
SanjanaSingh897/grpc
2d858866eb95ce5de8ccc8c35189a12733d8ca79
[ "Apache-2.0" ]
11,050
2015-02-26T17:22:10.000Z
2022-03-31T10:12:35.000Z
#!/usr/bin/env python2.7 # Copyright 2015 gRPC 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 applicable la...
34.939481
86
0.544622
#!/usr/bin/env python2.7 # Copyright 2015 gRPC 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 applicable la...
10,179
0
207
44ae42679f52a964d0fc59c1d162f31e5b45c91e
20,748
py
Python
app/python/names.py
ProfessorUdGuru/treebard_gps
c61e4acac918e74110a94054d92029a46f131443
[ "Unlicense" ]
null
null
null
app/python/names.py
ProfessorUdGuru/treebard_gps
c61e4acac918e74110a94054d92029a46f131443
[ "Unlicense" ]
null
null
null
app/python/names.py
ProfessorUdGuru/treebard_gps
c61e4acac918e74110a94054d92029a46f131443
[ "Unlicense" ]
null
null
null
# names.py import tkinter as tk import sqlite3 from files import get_current_file from styles import config_generic from widgets import ( Frame, Label, Button, LabelMovable, LabelH3, Entry, Toplevel) from window_border import Border from custom_combobox_widget import Combobox from scrolling import Mous...
33.681818
82
0.574658
# names.py import tkinter as tk import sqlite3 from files import get_current_file from styles import config_generic from widgets import ( Frame, Label, Button, LabelMovable, LabelH3, Entry, Toplevel) from window_border import Border from custom_combobox_widget import Combobox from scrolling import Mous...
16,870
5
683
c0442d776472d098e3eaa96a0adbb77f9b89e4e4
6,588
py
Python
python/obra_hacks/backend/data.py
brandond/obra-hacks
df451c6c6cd78b48f6e32bbd102a8e8a6bd77cb3
[ "Apache-2.0" ]
null
null
null
python/obra_hacks/backend/data.py
brandond/obra-hacks
df451c6c6cd78b48f6e32bbd102a8e8a6bd77cb3
[ "Apache-2.0" ]
null
null
null
python/obra_hacks/backend/data.py
brandond/obra-hacks
df451c6c6cd78b48f6e32bbd102a8e8a6bd77cb3
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import re from collections import OrderedDict from datetime import date CATEGORY_RE = re.compile(r'(?:^| )(beginner|novice|pro|[a-c](?:/[a-c])*|(?:pro/?)*[1-5](?:/[1-5])*)(?: |$)', flags=re.I) AGE_RANGE_RE = re.compile(r'([7-9]|1[0-9])(-([7-9]|1[0-9]))?') NAME_RE = re.com...
39.927273
146
0.414542
#!/usr/bin/env python # -*- coding: utf-8 -*- import re from collections import OrderedDict from datetime import date CATEGORY_RE = re.compile(r'(?:^| )(beginner|novice|pro|[a-c](?:/[a-c])*|(?:pro/?)*[1-5](?:/[1-5])*)(?: |$)', flags=re.I) AGE_RANGE_RE = re.compile(r'([7-9]|1[0-9])(-([7-9]|1[0-9]))?') NAME_RE = re.com...
0
0
0
601f549bc96ded30232d3ef37d9b6f8aed93d755
1,168
py
Python
postgresqleu/adyen/management/commands/reprocess_adyen_notification.py
bradfordboyle/pgeu-system
bbe70e7a94092c10f11a0f74fda23079532bb018
[ "MIT" ]
11
2020-08-20T11:16:02.000Z
2022-03-12T23:25:04.000Z
postgresqleu/adyen/management/commands/reprocess_adyen_notification.py
bradfordboyle/pgeu-system
bbe70e7a94092c10f11a0f74fda23079532bb018
[ "MIT" ]
71
2019-11-18T10:11:22.000Z
2022-03-27T16:12:57.000Z
postgresqleu/adyen/management/commands/reprocess_adyen_notification.py
bradfordboyle/pgeu-system
bbe70e7a94092c10f11a0f74fda23079532bb018
[ "MIT" ]
18
2019-11-18T09:56:31.000Z
2022-01-08T03:16:43.000Z
from django.core.management.base import BaseCommand, CommandError from django.db import transaction from postgresqleu.adyen.models import Notification, AdyenLog from postgresqleu.adyen.util import process_one_notification
41.714286
107
0.695205
from django.core.management.base import BaseCommand, CommandError from django.db import transaction from postgresqleu.adyen.models import Notification, AdyenLog from postgresqleu.adyen.util import process_one_notification class Command(BaseCommand): help = 'Reprocess a notification that for some reason failed' ...
795
126
23
269c8fe829843b0f0e93fe37213c2801fd8db620
725
py
Python
theory/panel/kpanels/kpanelt/evaluating_functions/kpanel.py
mrosemeier/compmech
f18f6d0471c72b26a3b014d2df41df3463505eae
[ "BSD-3-Clause" ]
4
2019-02-05T06:12:12.000Z
2022-03-25T14:41:18.000Z
theory/panel/kpanels/kpanelt/evaluating_functions/kpanel.py
mrosemeier/compmech
f18f6d0471c72b26a3b014d2df41df3463505eae
[ "BSD-3-Clause" ]
null
null
null
theory/panel/kpanels/kpanelt/evaluating_functions/kpanel.py
mrosemeier/compmech
f18f6d0471c72b26a3b014d2df41df3463505eae
[ "BSD-3-Clause" ]
2
2019-06-05T07:19:35.000Z
2020-12-29T00:22:18.000Z
import numpy as np from numpy import sin from numpy.linalg import lstsq import matplotlib.pyplot as plt xdata = np.array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14.]) ydata = np.array([0, 0, 0, -1, -2, -4, -8, -16, -8, -4, -2, -1, 0, 0, 0.]) m = 10 a = np.array([[1*sin(i*np.pi*(xdata-0)/(14-0))] for i in rang...
27.884615
74
0.609655
import numpy as np from numpy import sin from numpy.linalg import lstsq import matplotlib.pyplot as plt xdata = np.array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14.]) ydata = np.array([0, 0, 0, -1, -2, -4, -8, -16, -8, -4, -2, -1, 0, 0, 0.]) m = 10 a = np.array([[1*sin(i*np.pi*(xdata-0)/(14-0))] for i in rang...
0
0
0
35d916c3825e8cd692969fa5d471678e7e911635
257
py
Python
u1f345/views.py
jag1g13/1f345
319f6c036c975b9b02678f9db3797221754209f5
[ "BSD-3-Clause" ]
null
null
null
u1f345/views.py
jag1g13/1f345
319f6c036c975b9b02678f9db3797221754209f5
[ "BSD-3-Clause" ]
4
2021-03-18T23:31:04.000Z
2021-09-22T18:32:07.000Z
u1f345/views.py
jag1g13/1f345
319f6c036c975b9b02678f9db3797221754209f5
[ "BSD-3-Clause" ]
null
null
null
""" Views belonging to the core of the site which do not relate to a person, project or task. """ from django.views.generic import TemplateView class IndexView(TemplateView): """ View for site index page. """ template_name = 'index.html'
19.769231
89
0.692607
""" Views belonging to the core of the site which do not relate to a person, project or task. """ from django.views.generic import TemplateView class IndexView(TemplateView): """ View for site index page. """ template_name = 'index.html'
0
0
0
81018a55a1530d6d96979b5d5f4887431ad5fa06
2,904
py
Python
tests/insert_data.py
kazshinohara/spanner-sqlalchemy-demo
af86c9241b34cbd91d09dd4e800ad24b6de5525f
[ "Apache-2.0" ]
3
2022-03-23T00:43:55.000Z
2022-03-25T09:54:10.000Z
tests/insert_data.py
kazshinohara/spanner-sqlalchemy-demo
af86c9241b34cbd91d09dd4e800ad24b6de5525f
[ "Apache-2.0" ]
null
null
null
tests/insert_data.py
kazshinohara/spanner-sqlalchemy-demo
af86c9241b34cbd91d09dd4e800ad24b6de5525f
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Copyright 2022 Google LLC # # 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...
30.893617
102
0.657369
#!/usr/bin/env python # Copyright 2022 Google LLC # # 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...
1,802
0
92
36f77ea7d997694645f8df5c92b83533040ca796
2,574
py
Python
onehot.py
koyappe/MyHAN
d088812f6e0dc00a45fb478f6df05be81aac202c
[ "MIT" ]
null
null
null
onehot.py
koyappe/MyHAN
d088812f6e0dc00a45fb478f6df05be81aac202c
[ "MIT" ]
null
null
null
onehot.py
koyappe/MyHAN
d088812f6e0dc00a45fb478f6df05be81aac202c
[ "MIT" ]
null
null
null
import numpy as np import json from tqdm import tqdm import gc #import cupy # for num in tqdm(range(1,12)): # dataset[num] = [] # for vec in tqdm(vector_dict['{}'.format(num)]): #print(num) #print(vec) #print(len(vec)) # dataset[num].append(oneho...
32.582278
72
0.477855
import numpy as np import json from tqdm import tqdm import gc #import cupy class MakeData(): def onehot_vec(self, vector, dic_size): onehot_vector = np.zeros((25,dic_size+1)) for i,vec in enumerate(vector): onehot_vector[i][vec] = 1 return onehot_vector def program...
2,051
-4
111
e9efc8258eadc518c9319a3c673ceaa8316f4b0e
343
py
Python
acme/data/constants.py
israteneda/acme
2f127bb306c7542a60ca397269ad7e2cda0b7cd3
[ "MIT" ]
null
null
null
acme/data/constants.py
israteneda/acme
2f127bb306c7542a60ca397269ad7e2cda0b7cd3
[ "MIT" ]
2
2020-12-14T06:40:26.000Z
2021-04-15T01:20:34.000Z
acme/data/constants.py
israteneda/acme
2f127bb306c7542a60ca397269ad7e2cda0b7cd3
[ "MIT" ]
5
2021-05-18T22:13:52.000Z
2021-09-23T17:35:30.000Z
ONE_MINUTE = 1 / 60 SUCCESS = 1 FAIL = 0 FILE_NOT_FOUND = 'File not found.\nBe sure the file exists.' MALFORMED_FILE = 'File is malformed, please check the file' WRONG_TIME_RANGE = 'Invalid range of hours' EMPTY_FILE = 'File is empty' WORKWEEK = ['MO', 'TU', 'WE', 'TH', 'FR', 'SA', 'SU'] WEEKEND = ['SA', 'SU'] MIN_...
21.4375
60
0.661808
ONE_MINUTE = 1 / 60 SUCCESS = 1 FAIL = 0 FILE_NOT_FOUND = 'File not found.\nBe sure the file exists.' MALFORMED_FILE = 'File is malformed, please check the file' WRONG_TIME_RANGE = 'Invalid range of hours' EMPTY_FILE = 'File is empty' WORKWEEK = ['MO', 'TU', 'WE', 'TH', 'FR', 'SA', 'SU'] WEEKEND = ['SA', 'SU'] MIN_...
0
0
0
90f8f5f5d6114a761d6aacafb0c8be6a9f086d10
1,124
py
Python
environ.py
rboxbot/rodabox
255a63b60c9479371ec9209b5ce1cf27443e3c4e
[ "Apache-2.0" ]
null
null
null
environ.py
rboxbot/rodabox
255a63b60c9479371ec9209b5ce1cf27443e3c4e
[ "Apache-2.0" ]
null
null
null
environ.py
rboxbot/rodabox
255a63b60c9479371ec9209b5ce1cf27443e3c4e
[ "Apache-2.0" ]
null
null
null
import os import json _FILENAME = 'environ' _FILEPATH = './.%s' % _FILENAME
27.414634
74
0.658363
import os import json _FILENAME = 'environ' _FILEPATH = './.%s' % _FILENAME def set(key, value): environ = dict() with open(_FILEPATH, 'r') as file: environ = json.loads(file.read()) with open(_FILEPATH, 'w') as file: environ[key] = str(value) json.dump(environ, file, ensure_ascii=False, sort_keys=T...
955
0
92
feccae8431b9586e41cb1afa21fdca432c3e7cc3
84
py
Python
OpenCV/__init__.py
LaraFranklin/Reconocimiento-de-Placa-vehicular
e849d34ebac122828c98d79275e84b252ca3f656
[ "Apache-2.0" ]
null
null
null
OpenCV/__init__.py
LaraFranklin/Reconocimiento-de-Placa-vehicular
e849d34ebac122828c98d79275e84b252ca3f656
[ "Apache-2.0" ]
null
null
null
OpenCV/__init__.py
LaraFranklin/Reconocimiento-de-Placa-vehicular
e849d34ebac122828c98d79275e84b252ca3f656
[ "Apache-2.0" ]
null
null
null
import numpy import cv2 image = cv2.imread("imagenes/carro.jpg") cv2.waitKey(0)
9.333333
40
0.72619
import numpy import cv2 image = cv2.imread("imagenes/carro.jpg") cv2.waitKey(0)
0
0
0
5a2d3c58addbfb88add13cde7ea92d5f4e20c36c
664
py
Python
pytype/tools/xref/testdata/function_call.py
adamcataldo/pytype
7163e85880b52d53d58044e53157e2a21988308e
[ "Apache-2.0" ]
3,882
2015-03-22T12:17:15.000Z
2022-03-31T17:13:20.000Z
pytype/tools/xref/testdata/function_call.py
adamcataldo/pytype
7163e85880b52d53d58044e53157e2a21988308e
[ "Apache-2.0" ]
638
2015-11-03T06:34:44.000Z
2022-03-31T23:41:48.000Z
pytype/tools/xref/testdata/function_call.py
adamcataldo/pytype
7163e85880b52d53d58044e53157e2a21988308e
[ "Apache-2.0" ]
301
2015-08-14T10:21:17.000Z
2022-03-08T11:03:40.000Z
# pylint: skip-file #- @test defines/binding FnTest #- @x defines/binding ArgX #- FnTest.node/kind function #- FnTest param.0 ArgX #- @foo defines/binding FnFoo #- @x defines/binding ArgFooX #- FnFoo.node/kind function #- FnFoo param.0 ArgFooX #- @y defines/binding VarY #- @test ref FnTest #- @test ref/call FnTest...
17.473684
46
0.670181
# pylint: skip-file #- @test defines/binding FnTest #- @x defines/binding ArgX #- FnTest.node/kind function #- FnTest param.0 ArgX def test(x): #- @x ref ArgX return x #- @foo defines/binding FnFoo #- @x defines/binding ArgFooX #- FnFoo.node/kind function #- FnFoo param.0 ArgFooX def foo(x): #- @test ref/call ...
78
0
44
d325c95ddd665aadbef98a7e5b46472de508c41d
121
py
Python
blaze-server-script.py
daPharaoh/croutom-templet
81be6e60d400ddb00036502ff27592f8ceed6a2f
[ "BSD-3-Clause" ]
null
null
null
blaze-server-script.py
daPharaoh/croutom-templet
81be6e60d400ddb00036502ff27592f8ceed6a2f
[ "BSD-3-Clause" ]
null
null
null
blaze-server-script.py
daPharaoh/croutom-templet
81be6e60d400ddb00036502ff27592f8ceed6a2f
[ "BSD-3-Clause" ]
null
null
null
if __name__ == '__main__': import sys import blaze.server.spider sys.exit(blaze.server.spider._main())
20.166667
42
0.652893
if __name__ == '__main__': import sys import blaze.server.spider sys.exit(blaze.server.spider._main())
0
0
0
df28948d1bc79d89d5b70242acaf68598d6f376c
1,224
py
Python
pneumo/losses.py
wilmeryan/pneumo
c9f05542a3304c0ec19ade98edea348ffc67153e
[ "MIT" ]
null
null
null
pneumo/losses.py
wilmeryan/pneumo
c9f05542a3304c0ec19ade98edea348ffc67153e
[ "MIT" ]
null
null
null
pneumo/losses.py
wilmeryan/pneumo
c9f05542a3304c0ec19ade98edea348ffc67153e
[ "MIT" ]
null
null
null
import torch import torch.nn as nn import torch.nn.functional as F def weighted_soft_dice_loss(inputs, targets, v2=0.9, eps=1e-4): """ From https://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=9180275 allows contribution of negative samples """ v1 = 1 - v2 iflat = inputs.view(-1) tflat = ...
29.853659
102
0.627451
import torch import torch.nn as nn import torch.nn.functional as F def dice_loss(inputs, targets, eps=1): iflat = inputs.view(-1) tflat = targets.view(-1) intersection = (iflat * tflat).sum() return 1 - ((2. * intersection + eps) / (iflat.sum() + tflat.sum() + eps)) def weighted_soft_dice_loss(...
552
0
46
9b57eb7d3e8c39731a22c17912dc12851c140067
3,666
py
Python
dynbae/preprocessing/split_fb.py
CarlosOrtegaV/dynamite
244030a8c27d46b2f82e176b4ebf7aac97cfd865
[ "MIT" ]
null
null
null
dynbae/preprocessing/split_fb.py
CarlosOrtegaV/dynamite
244030a8c27d46b2f82e176b4ebf7aac97cfd865
[ "MIT" ]
null
null
null
dynbae/preprocessing/split_fb.py
CarlosOrtegaV/dynamite
244030a8c27d46b2f82e176b4ebf7aac97cfd865
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Tue Nov 26 23:59:24 2019 @author: orteg """ import click import pandas as pd import networkx as nx from preprop_utils import splitgraph from datetime import datetime ################################################################### @click.command() @click.argument('input_...
36.66
141
0.598745
# -*- coding: utf-8 -*- """ Created on Tue Nov 26 23:59:24 2019 @author: orteg """ import click import pandas as pd import networkx as nx from preprop_utils import splitgraph from datetime import datetime ################################################################### @click.command() @click.argument('input_...
2,839
0
24
c955c1f5de6b8f364ce4d3567e6fa90826fa3de3
376
py
Python
src/censys_maltego/resources/external/__init__.py
censys/censys-maltego
eb643c4795dda80291deecb8bc620c59a309c8a9
[ "Apache-2.0" ]
23
2019-04-18T22:55:52.000Z
2022-02-21T14:41:15.000Z
src/censys_maltego/resources/external/__init__.py
Censys/censys-maltego
69b982fa1e1ca3350e389568fd916fda4ebe45d1
[ "Apache-2.0" ]
27
2020-03-31T16:12:15.000Z
2022-03-28T12:00:28.000Z
src/censys_maltego/resources/external/__init__.py
Censys/censys-maltego
69b982fa1e1ca3350e389568fd916fda4ebe45d1
[ "Apache-2.0" ]
6
2019-08-01T01:20:56.000Z
2021-08-31T11:24:31.000Z
"""This package directory is used to store non-Canari transform code. Why would you want to use for Canari? For easy transform distribution. You can use Canari as a transform proxy to execute your non-Python or non-Canari transform code. This allows you to package up your transforms in an easy-to-use transform package...
41.777778
74
0.795213
"""This package directory is used to store non-Canari transform code. Why would you want to use for Canari? For easy transform distribution. You can use Canari as a transform proxy to execute your non-Python or non-Canari transform code. This allows you to package up your transforms in an easy-to-use transform package...
0
0
0
6961b26d672f9925c69f8958d0ab7d49da333a5a
556
py
Python
tests/test_lfsr.py
prudywsh/GS15-crypto
d7bbe3fcce9131bf1b1d222843a1a2acf2f7c824
[ "MIT" ]
null
null
null
tests/test_lfsr.py
prudywsh/GS15-crypto
d7bbe3fcce9131bf1b1d222843a1a2acf2f7c824
[ "MIT" ]
null
null
null
tests/test_lfsr.py
prudywsh/GS15-crypto
d7bbe3fcce9131bf1b1d222843a1a2acf2f7c824
[ "MIT" ]
1
2017-12-29T10:45:57.000Z
2017-12-29T10:45:57.000Z
import unittest from src.LFSR import LFSR if __name__ == '__main__': unittest.main()
29.263158
71
0.622302
import unittest from src.LFSR import LFSR class TestLFSR(unittest.TestCase): def test_simple(self): lfsr = LFSR(name="test", taps=[0, 1, 3], length=4, seed='0110') self.assertEqual(lfsr.shift(), '1011') self.assertEqual(lfsr.shift(), '0101') self.assertEqual(lfsr.shift(), '0010') ...
402
13
50
8af16dff8be31c14c487ce2e324cef2b361ee891
347
py
Python
lectures/lecture06/code/hw.py
mateusza/Introduction-to-Python-Numerical-Analysis-for-Engineers-and-Scientist
a27144cc8742e67af215e8de781bd208cc1f7436
[ "MIT" ]
101
2017-11-28T15:08:25.000Z
2022-03-26T13:59:49.000Z
lectures/lecture06/code/hw.py
mateusza/Introduction-to-Python-Numerical-Analysis-for-Engineers-and-Scientist
a27144cc8742e67af215e8de781bd208cc1f7436
[ "MIT" ]
1
2017-12-16T19:41:39.000Z
2017-12-16T19:41:39.000Z
lectures/lecture06/code/hw.py
mateusza/Introduction-to-Python-Numerical-Analysis-for-Engineers-and-Scientist
a27144cc8742e67af215e8de781bd208cc1f7436
[ "MIT" ]
54
2017-12-15T19:19:53.000Z
2022-03-01T23:36:55.000Z
import numpy as np import matplotlib.pyplot as plt x1 = np.linspace(0,4,100) x2 = np.linspace(-0.5,1,100) x1, x2 = np.meshgrid(x1,x2) f = (1.5 - x1*(1.0-x2))**2 + (2.25 - x1*(1.0-(x2**2)))**2 + (2.625 - x1*(1.0-(x2**3)))**2 plt.figure() plt.contourf(x1,x2,f,100) plt.colorbar() plt.xlabel(r'$x_1$') plt.y...
23.133333
90
0.576369
import numpy as np import matplotlib.pyplot as plt x1 = np.linspace(0,4,100) x2 = np.linspace(-0.5,1,100) x1, x2 = np.meshgrid(x1,x2) f = (1.5 - x1*(1.0-x2))**2 + (2.25 - x1*(1.0-(x2**2)))**2 + (2.625 - x1*(1.0-(x2**3)))**2 plt.figure() plt.contourf(x1,x2,f,100) plt.colorbar() plt.xlabel(r'$x_1$') plt.y...
0
0
0
5afe4acc19c3deff0621391e914c850fd9d6e5e9
4,126
py
Python
leetcode/python/sudokuSolver.py
yaoxuanw007/forfun
db50bd40852d49bd68bae03ceb43cb4a901c6d37
[ "MIT" ]
null
null
null
leetcode/python/sudokuSolver.py
yaoxuanw007/forfun
db50bd40852d49bd68bae03ceb43cb4a901c6d37
[ "MIT" ]
null
null
null
leetcode/python/sudokuSolver.py
yaoxuanw007/forfun
db50bd40852d49bd68bae03ceb43cb4a901c6d37
[ "MIT" ]
null
null
null
# https://oj.leetcode.com/problems/sudoku-solver/ # @param board, a 9x9 2D array # Solve the Sudoku by modifying the input board in-place. # Do not return any value. import pprint as pp # Pass OJ !! # @param board, a 9x9 2D array # Solve the Sudoku by modifying the input board in-place. # Do not return an...
29.683453
117
0.509937
# https://oj.leetcode.com/problems/sudoku-solver/ class Solution: # @param board, a 9x9 2D array # Solve the Sudoku by modifying the input board in-place. # Do not return any value. def solveSudoku(self, board): if len(board) == 0 or len(board[0]) == 0: return m, n = len(board), len(board[0]) ...
3,387
-11
243
2982fcf6909f7901f95ccca12900905020d426c2
2,704
py
Python
src/subsonic_api_proxy/app.py
tarioch/subsonic-api-proxy
0f77f08f5f4ca520c8c22a932c37ae2822c2973a
[ "MIT" ]
null
null
null
src/subsonic_api_proxy/app.py
tarioch/subsonic-api-proxy
0f77f08f5f4ca520c8c22a932c37ae2822c2973a
[ "MIT" ]
null
null
null
src/subsonic_api_proxy/app.py
tarioch/subsonic-api-proxy
0f77f08f5f4ca520c8c22a932c37ae2822c2973a
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import argparse import sys import logging from flask import Flask, request import requests from subsonic_api_proxy import __version__ _logger = logging.getLogger(__name__) def parse_args(args): """Parse command line parameters Args: args ([str]): command...
24.581818
76
0.613905
#!/usr/bin/env python # -*- coding: utf-8 -*- import argparse import sys import logging from flask import Flask, request import requests from subsonic_api_proxy import __version__ _logger = logging.getLogger(__name__) def parse_args(args): """Parse command line parameters Args: args ([str]): command...
740
0
22
a1ba001c2b56610cb23166c445eb45d0f7b16cee
6,254
py
Python
saltproc/separator.py
mehmeturkmen/saltproc
3d025b1bd9c7e3ea57e42ae37f2d7fef5d246c83
[ "BSD-3-Clause" ]
1
2020-07-22T18:25:27.000Z
2020-07-22T18:25:27.000Z
saltproc/separator.py
mehmeturkmen/saltproc
3d025b1bd9c7e3ea57e42ae37f2d7fef5d246c83
[ "BSD-3-Clause" ]
1
2021-03-07T17:14:01.000Z
2021-03-07T17:14:01.000Z
saltproc/separator.py
mehmeturkmen/saltproc
3d025b1bd9c7e3ea57e42ae37f2d7fef5d246c83
[ "BSD-3-Clause" ]
null
null
null
import numpy as np from saltproc import Process class Separator(Process): """Class evaluates gas removal efficiency in separator (bubble separator). Attributes ---------- q_salt : float volumetric salt flow rate (m^3/s) Default: 0.1 q_he : float volumetric helium flow rat...
32.071795
80
0.50048
import numpy as np from saltproc import Process class Separator(Process): """Class evaluates gas removal efficiency in separator (bubble separator). Attributes ---------- q_salt : float volumetric salt flow rate (m^3/s) Default: 0.1 q_he : float volumetric helium flow rat...
0
0
0
016da535d5483cb4c650164860f542e71ee9db13
504
py
Python
pyPUC/fig_scripts/0061_bwap.py
sblanky/psd_uptake_correlator
263de773bf9ea703102549d68b0319930ca5d952
[ "MIT" ]
null
null
null
pyPUC/fig_scripts/0061_bwap.py
sblanky/psd_uptake_correlator
263de773bf9ea703102549d68b0319930ca5d952
[ "MIT" ]
1
2022-01-31T16:52:13.000Z
2022-02-01T09:38:24.000Z
pyPUC/fig_scripts/0061_bwap.py
sblanky/pyPUC
263de773bf9ea703102549d68b0319930ca5d952
[ "MIT" ]
null
null
null
import core.utils as utils import core.plots as plots import pandas as pd bwap_dict = {} source_dir = utils.make_path('result', '0061_all') bwap_S = pd.read_csv(f"{source_dir}S/twap/0.csv") bwap_V = pd.read_csv(f"{source_dir}2202101349/twap/0.csv") bwap_dict['bwap_V'] = bwap_V bwap_dict['bwap_S'] = bwap_S results_pa...
28
58
0.660714
import core.utils as utils import core.plots as plots import pandas as pd bwap_dict = {} source_dir = utils.make_path('result', '0061_all') bwap_S = pd.read_csv(f"{source_dir}S/twap/0.csv") bwap_V = pd.read_csv(f"{source_dir}2202101349/twap/0.csv") bwap_dict['bwap_V'] = bwap_V bwap_dict['bwap_S'] = bwap_S results_pa...
0
0
0
9c96cbbe652c94a8ed902497336cd32b22560620
7,732
py
Python
src/rendere/eml/eml_data_format.py
PASTAplus/rendere
63cc5effae4118fa20545339c2f0b0ebbee35271
[ "Apache-2.0" ]
null
null
null
src/rendere/eml/eml_data_format.py
PASTAplus/rendere
63cc5effae4118fa20545339c2f0b0ebbee35271
[ "Apache-2.0" ]
5
2021-04-01T02:12:50.000Z
2022-03-14T01:40:58.000Z
src/rendere/eml/eml_data_format.py
PASTAplus/rendere
63cc5effae4118fa20545339c2f0b0ebbee35271
[ "Apache-2.0" ]
1
2020-09-22T21:47:31.000Z
2020-09-22T21:47:31.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """ :Mod: eml_data_format :Synopsis: :Author: servilla :Created: 3/29/20 """ import daiquiri from rendere.eml.eml_utils import clean logger = daiquiri.getLogger(__name__)
46.02381
79
0.54837
#!/usr/bin/env python # -*- coding: utf-8 -*- """ :Mod: eml_data_format :Synopsis: :Author: servilla :Created: 3/29/20 """ import daiquiri from rendere.eml.eml_utils import clean logger = daiquiri.getLogger(__name__) def eml_data_format(df) -> dict: data_format = dict() f = df.getchildren()[0] ...
7,476
0
23
9c9052486b08e2914aaba10640c9090b276db64d
17,361
py
Python
django_mri/models/nifti.py
TheLabbingProject/django_mri
d2672022f1f135cb54be35899a3250ec3092b13b
[ "Apache-2.0" ]
4
2020-07-27T20:33:54.000Z
2022-01-11T20:24:03.000Z
django_mri/models/nifti.py
TheLabbingProject/django_mri
d2672022f1f135cb54be35899a3250ec3092b13b
[ "Apache-2.0" ]
107
2019-09-04T11:38:46.000Z
2022-03-04T13:59:51.000Z
django_mri/models/nifti.py
TheLabbingProject/django_mri
d2672022f1f135cb54be35899a3250ec3092b13b
[ "Apache-2.0" ]
2
2020-05-24T06:35:33.000Z
2020-06-14T13:15:32.000Z
""" Definition of the :class:`NIfTI` model. """ import itertools import json import logging from pathlib import Path from typing import Iterable, List, Union import nibabel as nib import numpy as np from django.db import IntegrityError, models from django_analyses.models.input import FileInput, ListInput from django_e...
32.209647
99
0.570128
""" Definition of the :class:`NIfTI` model. """ import itertools import json import logging from pathlib import Path from typing import Iterable, List, Union import nibabel as nib import numpy as np from django.db import IntegrityError, models from django_analyses.models.input import FileInput, ListInput from django_e...
4,494
49
161
892a888517e2ef0dfe30c115eaa295c05a9161c3
1,302
py
Python
examples/resources/accounts.py
cuenca-mx/fast-agave
4d347bfbb8dc0ff176ba9bf392564b6f87dffb16
[ "MIT" ]
null
null
null
examples/resources/accounts.py
cuenca-mx/fast-agave
4d347bfbb8dc0ff176ba9bf392564b6f87dffb16
[ "MIT" ]
79
2021-04-12T16:24:10.000Z
2022-03-30T17:11:19.000Z
examples/resources/accounts.py
cuenca-mx/fast-agave
4d347bfbb8dc0ff176ba9bf392564b6f87dffb16
[ "MIT" ]
null
null
null
import datetime as dt from fastapi.responses import JSONResponse as Response from fastapi import Request from fast_agave.filters import generic_query from ..models import Account as AccountModel from ..validators import AccountQuery, AccountRequest, AccountUpdateRequest from .base import app @app.resource('/accounts...
32.55
76
0.718894
import datetime as dt from fastapi.responses import JSONResponse as Response from fastapi import Request from fast_agave.filters import generic_query from ..models import Account as AccountModel from ..validators import AccountQuery, AccountRequest, AccountUpdateRequest from .base import app @app.resource('/accounts...
688
269
22
9c43cf4a5381b6b11568286d61523f0ee7532b32
43,245
py
Python
venv/local/lib/python2.7/dist-packages/scapy/layers/tls/crypto/pkcs1.py
pengwu/scapy_env
3db9c5dea2e219048a2387649d6d89be342903d9
[ "MIT" ]
14
2018-02-20T07:11:40.000Z
2021-09-23T08:31:59.000Z
venv/local/lib/python2.7/dist-packages/scapy/layers/tls/crypto/pkcs1.py
pengwu/scapy_env
3db9c5dea2e219048a2387649d6d89be342903d9
[ "MIT" ]
1
2018-08-18T23:06:53.000Z
2018-08-21T00:01:06.000Z
venv/local/lib/python2.7/dist-packages/scapy/layers/tls/crypto/pkcs1.py
pengwu/scapy_env
3db9c5dea2e219048a2387649d6d89be342903d9
[ "MIT" ]
9
2017-12-01T15:45:18.000Z
2020-04-14T02:42:32.000Z
## This file is part of Scapy ## Copyright (C) 2008 Arnaud Ebalard <arno@natisbad.org> ## 2015, 2016 Maxence Tury <maxence.tury@ssi.gouv.fr> ## This program is published under a GPLv2 license """ PKCS #1 methods as defined in RFC 3447. """ import os, popen2, tempfile import math, random, struct from hashlib i...
37.312338
96
0.527992
## This file is part of Scapy ## Copyright (C) 2008 Arnaud Ebalard <arno@natisbad.org> ## 2015, 2016 Maxence Tury <maxence.tury@ssi.gouv.fr> ## This program is published under a GPLv2 license """ PKCS #1 methods as defined in RFC 3447. """ import os, popen2, tempfile import math, random, struct from hashlib i...
153
27,926
92
631b051d6c6a00796397ef413b0e08078bfbb64e
7,565
py
Python
metrics_handler/alert_handler.py
taylanbil/ml-testing-accelerators
10a24b5f3a32107f26dd767552a9feb9b331da60
[ "Apache-2.0" ]
null
null
null
metrics_handler/alert_handler.py
taylanbil/ml-testing-accelerators
10a24b5f3a32107f26dd767552a9feb9b331da60
[ "Apache-2.0" ]
null
null
null
metrics_handler/alert_handler.py
taylanbil/ml-testing-accelerators
10a24b5f3a32107f26dd767552a9feb9b331da60
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
39.401042
88
0.68764
# Copyright 2020 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
879
5,350
23
8e65495dfd87d658eb5b5d170d143d049b9f8a72
1,512
py
Python
test/test_error_stencil.py
degawa/dictos
566b2a8358a1ee505d2131a8778f178412f39cb2
[ "MIT" ]
1
2022-03-12T06:10:59.000Z
2022-03-12T06:10:59.000Z
test/test_error_stencil.py
degawa/dictos
566b2a8358a1ee505d2131a8778f178412f39cb2
[ "MIT" ]
64
2022-01-15T11:00:35.000Z
2022-02-07T15:24:17.000Z
test/test_error_stencil.py
degawa/dictos
566b2a8358a1ee505d2131a8778f178412f39cb2
[ "MIT" ]
null
null
null
"""Tests for distos.error.stencil """ import sys sys.path.insert(1, "..") import unittest from dictos.spec import has_zero, has_duplicated_points from dictos.error.stencil import ContainsZeroError, DuplicatedPointError, TooNarrowError if __name__ == "__main__": unittest.main()
25.627119
88
0.613095
"""Tests for distos.error.stencil """ import sys sys.path.insert(1, "..") import unittest from dictos.spec import has_zero, has_duplicated_points from dictos.error.stencil import ContainsZeroError, DuplicatedPointError, TooNarrowError class ErrorStencilTest(unittest.TestCase): @unittest.expectedFailure def...
0
1,201
23
a2ecb9db8232855b22e7532f29512f887ba13f39
1,076
py
Python
libs/yowsup/yowsup/yowsup/layers/protocol_groups/protocolentities/iq_groups_subject.py
akshitpradhan/TomHack
837226e7b38de1140c19bc2d478eeb9e379ed1fd
[ "MIT" ]
22
2017-07-14T20:01:17.000Z
2022-03-08T14:22:39.000Z
libs/yowsup/yowsup/yowsup/layers/protocol_groups/protocolentities/iq_groups_subject.py
akshitpradhan/TomHack
837226e7b38de1140c19bc2d478eeb9e379ed1fd
[ "MIT" ]
6
2017-07-14T21:03:50.000Z
2021-06-10T19:08:32.000Z
libs/yowsup/yowsup/yowsup/layers/protocol_groups/protocolentities/iq_groups_subject.py
akshitpradhan/TomHack
837226e7b38de1140c19bc2d478eeb9e379ed1fd
[ "MIT" ]
13
2017-07-14T20:13:14.000Z
2020-11-12T08:06:05.000Z
from yowsup.structs import ProtocolEntity, ProtocolTreeNode from .iq_groups import GroupsIqProtocolEntity class SubjectGroupsIqProtocolEntity(GroupsIqProtocolEntity): ''' <iq type="set" id="{{id}}" xmlns="w:g2", to={{group_jid}}"> <subject> {{NEW_VAL}} </subject> </iq> ''' ...
37.103448
111
0.682156
from yowsup.structs import ProtocolEntity, ProtocolTreeNode from .iq_groups import GroupsIqProtocolEntity class SubjectGroupsIqProtocolEntity(GroupsIqProtocolEntity): ''' <iq type="set" id="{{id}}" xmlns="w:g2", to={{group_jid}}"> <subject> {{NEW_VAL}} </subject> </iq> ''' ...
631
0
106
bba8915db9931f84c1c7228b7fc7409617493794
45
py
Python
tests/test_pyutils.py
james-gloudemans/cs101
295e279dbb258e93d15f20499f592d2180a3f37f
[ "MIT" ]
null
null
null
tests/test_pyutils.py
james-gloudemans/cs101
295e279dbb258e93d15f20499f592d2180a3f37f
[ "MIT" ]
null
null
null
tests/test_pyutils.py
james-gloudemans/cs101
295e279dbb258e93d15f20499f592d2180a3f37f
[ "MIT" ]
null
null
null
"""test_pyutils.py: Tests for pyutils.py."""
22.5
44
0.688889
"""test_pyutils.py: Tests for pyutils.py."""
0
0
0
2ecf95467c18d385303c04ae0a370b214263bc82
3,445
py
Python
src/weather_helpers.py
edesz/chicago-bikeshare
8a51dac660defc618c4174131ac287047854b0c0
[ "MIT" ]
null
null
null
src/weather_helpers.py
edesz/chicago-bikeshare
8a51dac660defc618c4174131ac287047854b0c0
[ "MIT" ]
15
2021-06-01T22:49:59.000Z
2021-12-31T18:13:35.000Z
src/weather_helpers.py
edesz/chicago-bikeshare
8a51dac660defc618c4174131ac287047854b0c0
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os import time from multiprocessing import cpu_count import pandas as pd from joblib import Parallel, delayed from meteostat import Daily, Hourly, Point
29.444444
78
0.597968
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os import time from multiprocessing import cpu_count import pandas as pd from joblib import Parallel, delayed from meteostat import Daily, Hourly, Point def get_single_station_weather( k, row, num_stations, keys_wanted, weather_data_dir, ...
3,187
0
46
11798b1f7b7d4b9644755b5633984e626f13cb7e
244
py
Python
examples/example_4.py
SamHDev/tycho-py
cd6f8082c2d261bac96d1b5d4ff5b5ed251658b2
[ "MIT" ]
2
2021-02-07T19:46:08.000Z
2021-05-14T14:54:45.000Z
examples/example_4.py
SamHDev/tycho-py
cd6f8082c2d261bac96d1b5d4ff5b5ed251658b2
[ "MIT" ]
null
null
null
examples/example_4.py
SamHDev/tycho-py
cd6f8082c2d261bac96d1b5d4ff5b5ed251658b2
[ "MIT" ]
null
null
null
import tycho data = bytes.fromhex("40 03 03 66 6f 6f 1e 0b 48 65 6c 6c 6f 20 57 6f 72 6c 64 03 62 61 72 11 0a 03 62 61 7a 10 01") print(tycho.decode(data)) # Structure({'foo': String('Hello World'), 'bar': Unsigned8(10), 'baz': Boolean(True)})
48.8
116
0.67623
import tycho data = bytes.fromhex("40 03 03 66 6f 6f 1e 0b 48 65 6c 6c 6f 20 57 6f 72 6c 64 03 62 61 72 11 0a 03 62 61 7a 10 01") print(tycho.decode(data)) # Structure({'foo': String('Hello World'), 'bar': Unsigned8(10), 'baz': Boolean(True)})
0
0
0
96a5cc3ddc5b2e65039f518b7f9e583270449293
1,787
py
Python
tests/test_evaluation.py
manfred-kaiser/sifter
897ea92d5fa2ec8ee5af359ea04a8d28aec6a568
[ "BSD-2-Clause" ]
1
2021-03-02T10:53:15.000Z
2021-03-02T10:53:15.000Z
tests/test_evaluation.py
manfred-kaiser/sifter
897ea92d5fa2ec8ee5af359ea04a8d28aec6a568
[ "BSD-2-Clause" ]
12
2020-10-10T16:36:22.000Z
2020-10-10T16:48:56.000Z
tests/test_evaluation.py
manfred-kaiser/sifter
897ea92d5fa2ec8ee5af359ea04a8d28aec6a568
[ "BSD-2-Clause" ]
2
2020-12-16T14:07:01.000Z
2021-03-24T08:58:33.000Z
# type: ignore import email import os.path import sifter.parser
49.638889
144
0.663123
# type: ignore import email import os.path import sifter.parser def eval_rules(filename_message, filename_rules): with open(os.path.join(os.path.dirname(__file__), filename_message), encoding='utf-8') as msg_fh: message = email.message_from_file(msg_fh) with open(os.path.join(os.path.dirname(__file_...
1,673
0
46
9a57339fe43189739601a0efe9ae26adcab34d1e
4,595
py
Python
tests/download_atcoder.py
hachi-88/online-judge-tools
f008cecf010468d8fbde6f7c21bf15f8d9e2b506
[ "MIT" ]
1
2018-11-03T19:17:33.000Z
2018-11-03T19:17:33.000Z
tests/download_atcoder.py
hachi-88/online-judge-tools
f008cecf010468d8fbde6f7c21bf15f8d9e2b506
[ "MIT" ]
null
null
null
tests/download_atcoder.py
hachi-88/online-judge-tools
f008cecf010468d8fbde6f7c21bf15f8d9e2b506
[ "MIT" ]
null
null
null
import unittest import tests.download
55.361446
95
0.626115
import unittest import tests.download class DownloadAtCoderTest(unittest.TestCase): def snippet_call_download(self, *args, **kwargs): tests.download.snippet_call_download(self, *args, **kwargs) def test_call_download_atcoder_abc001_1(self): self.snippet_call_download( 'http://abc0...
4,300
24
233
bb3f6113ca6d7cc5a922881bcbb2d0e75481b927
536
py
Python
Python/traffic lights.py
sektor338/prog
5002e32e1fe7a7f8931c94fc2795f0ddb45ae02f
[ "MIT" ]
null
null
null
Python/traffic lights.py
sektor338/prog
5002e32e1fe7a7f8931c94fc2795f0ddb45ae02f
[ "MIT" ]
null
null
null
Python/traffic lights.py
sektor338/prog
5002e32e1fe7a7f8931c94fc2795f0ddb45ae02f
[ "MIT" ]
null
null
null
import RPi.GPIO as GPIO import time GPIO.setmode(GPIO.BOARD) GPIO.setwarnings(False) GPIO.setup(12, GPIO.OUT)#piros GPIO.setup(16, GPIO.OUT)#sárga GPIO.setup(18, GPIO.OUT)#zöld for x in range(10): GPIO.output(12, GPIO.HIGH) print("Felkészülni!") time.sleep(0.15) GPIO.output(12, GPIO.LOW) time.sleep(0.15) GPIO.o...
19.851852
30
0.701493
import RPi.GPIO as GPIO import time GPIO.setmode(GPIO.BOARD) GPIO.setwarnings(False) GPIO.setup(12, GPIO.OUT)#piros GPIO.setup(16, GPIO.OUT)#sárga GPIO.setup(18, GPIO.OUT)#zöld for x in range(10): GPIO.output(12, GPIO.HIGH) print("Felkészülni!") time.sleep(0.15) GPIO.output(12, GPIO.LOW) time.sleep(0.15) GPIO.o...
0
0
0
1e7238cfaab912494b2a5089bc09470a188e5e7b
1,202
py
Python
packages/pyright-internal/src/tests/samples/classes9.py
martindemello/pyright
4fe3f1f7c08f139715701fdf746183062b5165ff
[ "MIT" ]
4,391
2019-05-07T01:18:57.000Z
2022-03-31T20:45:44.000Z
packages/pyright-internal/src/tests/samples/classes9.py
martindemello/pyright
4fe3f1f7c08f139715701fdf746183062b5165ff
[ "MIT" ]
2,740
2019-05-07T03:29:30.000Z
2022-03-31T12:57:46.000Z
packages/pyright-internal/src/tests/samples/classes9.py
martindemello/pyright
4fe3f1f7c08f139715701fdf746183062b5165ff
[ "MIT" ]
455
2019-05-07T12:55:14.000Z
2022-03-31T17:09:15.000Z
# This sample tests incompatible method overrides for multiple inheritance. # This functionality is controlled by the reportIncompatibleMethodOverride # diagnostic rule. from typing import Generic, TypeVar # This should generate an error because func1 is incompatible. # This should generate an error becaus...
14.481928
75
0.577371
# This sample tests incompatible method overrides for multiple inheritance. # This functionality is controlled by the reportIncompatibleMethodOverride # diagnostic rule. from typing import Generic, TypeVar class A1: def func1(self, a: int) -> str: ... class A2: def func1(self, a: int, b: int = 3) ...
210
-50
602
a849a5dba0160abdd5170081221fb43f725b7816
331
py
Python
glue_vispy_viewers/extern/vispy/ext/cassowary.py
jzuhone/glue-vispy-viewers
d940705f4ba95f8d7a9a74d37fb68c71080b490a
[ "BSD-2-Clause" ]
3
2018-05-09T17:55:53.000Z
2019-07-22T09:14:41.000Z
glue_vispy_viewers/extern/vispy/ext/cassowary.py
jzuhone/glue-vispy-viewers
d940705f4ba95f8d7a9a74d37fb68c71080b490a
[ "BSD-2-Clause" ]
9
2017-04-07T01:44:15.000Z
2018-12-16T20:47:08.000Z
graphViz/vispy/ext/cassowary.py
onecklam/ethereum-graphviz
6993accf0cb85e23013bf7ae6b04145724a6dbd2
[ "Apache-2.0" ]
1
2017-09-29T01:24:47.000Z
2017-09-29T01:24:47.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2015, Vispy Development Team. # Distributed under the (new) BSD License. See LICENSE.txt for more info. """ Handle loading cassowary package from system or from the bundled copy """ try: from ._bundled.cassowary import * # noqa except ImportError: from cassowary import...
25.461538
73
0.703927
# -*- coding: utf-8 -*- # Copyright (c) 2015, Vispy Development Team. # Distributed under the (new) BSD License. See LICENSE.txt for more info. """ Handle loading cassowary package from system or from the bundled copy """ try: from ._bundled.cassowary import * # noqa except ImportError: from cassowary import...
0
0
0
e9ddcd52fd1bf361005464d50077a3b6ed4a8f4a
2,226
py
Python
tests/unit/test_ecs_fargate.py
radsec/ottr
411559a2bac307594c92d4d14667143cd04625ff
[ "Apache-2.0" ]
207
2021-10-29T20:35:04.000Z
2022-03-02T08:04:06.000Z
tests/unit/test_ecs_fargate.py
wngn123/ottr
411559a2bac307594c92d4d14667143cd04625ff
[ "Apache-2.0" ]
3
2021-11-05T05:50:57.000Z
2022-01-03T06:07:18.000Z
tests/unit/test_ecs_fargate.py
wngn123/ottr
411559a2bac307594c92d4d14667143cd04625ff
[ "Apache-2.0" ]
19
2021-11-03T06:34:46.000Z
2022-03-21T14:06:54.000Z
import json import boto3 import pytest from moto import mock_ecs from moto import mock_ec2 from moto.ec2 import utils as ec2_utils # from otter.router.src.shared.client import ECSClient from otter.router.src.shared.device import Device from tests.unit import EXAMPLE_AMI_ID @pytest.fixture
32.26087
84
0.543127
import json import boto3 import pytest from moto import mock_ecs from moto import mock_ec2 from moto.ec2 import utils as ec2_utils # from otter.router.src.shared.client import ECSClient from otter.router.src.shared.device import Device from tests.unit import EXAMPLE_AMI_ID @pytest.fixture def _init_cluster(): @...
1,910
0
22
e225bf3751c12659f5712cc619bb819cd8d9e58e
2,599
py
Python
helpers/helpers.py
cabbagelover25/Mentorbot3.0
1a39a63f8eebd351f18edf8b4823d67aa740f9eb
[ "MIT" ]
null
null
null
helpers/helpers.py
cabbagelover25/Mentorbot3.0
1a39a63f8eebd351f18edf8b4823d67aa740f9eb
[ "MIT" ]
null
null
null
helpers/helpers.py
cabbagelover25/Mentorbot3.0
1a39a63f8eebd351f18edf8b4823d67aa740f9eb
[ "MIT" ]
null
null
null
"""Helper functions for mentorbot events and commands.""" from datetime import datetime import discord from discord.ext import commands # Helper Functions def character_info(cursor, character=None, region=None): """Return id, name, color, and icon url of given character/region.""" if character: # If charac...
33.320513
83
0.65102
"""Helper functions for mentorbot events and commands.""" from datetime import datetime import discord from discord.ext import commands # Helper Functions def character_info(cursor, character=None, region=None): """Return id, name, color, and icon url of given character/region.""" if character: # If charac...
172
0
52
cc1a8b9f86a5c175011b35cbfd5e096ce1759471
21,174
py
Python
AxisPrint.py
Nurrl/AxisPrint
7cce2dbd6542582a78d9e2cb3d2221d697c58da7
[ "MIT" ]
2
2017-09-24T20:53:37.000Z
2021-07-15T04:03:38.000Z
AxisPrint.py
Nurrl/AxisPrint
7cce2dbd6542582a78d9e2cb3d2221d697c58da7
[ "MIT" ]
null
null
null
AxisPrint.py
Nurrl/AxisPrint
7cce2dbd6542582a78d9e2cb3d2221d697c58da7
[ "MIT" ]
1
2016-02-03T12:51:01.000Z
2016-02-03T12:51:01.000Z
#!/usr/bin/python print("Loading libs..."), #Importing all libs import os import sys import time import simplejson from threading import Thread import ConfigParser import cherrypy import serial print("Ok") if not os.geteuid() == 0: #Check if is started as root sys.exit('Must be run as root') #Define Global vars#...
41.599214
232
0.476575
#!/usr/bin/python print("Loading libs..."), #Importing all libs import os import sys import time import simplejson from threading import Thread import ConfigParser import cherrypy import serial print("Ok") if not os.geteuid() == 0: #Check if is started as root sys.exit('Must be run as root') class Log: #Colored ...
18,268
804
594
824b14cb8ceb400005e2946394cca2f756fa12bb
8,016
py
Python
rplugin/python3/pycoqtop/parser.py
lorenzleutgeb/coquille
81cea3080eb781216c4f3ab14dc7a1673d6688f6
[ "ISC" ]
null
null
null
rplugin/python3/pycoqtop/parser.py
lorenzleutgeb/coquille
81cea3080eb781216c4f3ab14dc7a1673d6688f6
[ "ISC" ]
null
null
null
rplugin/python3/pycoqtop/parser.py
lorenzleutgeb/coquille
81cea3080eb781216c4f3ab14dc7a1673d6688f6
[ "ISC" ]
null
null
null
class Parser: """ Parser for coq sentences. WS: (" " | "\\n" | "\\t")* unit: WS (comment | bullet | command) comment: "(*" (comment | [^*] | "*" not followed by ")")* "*)" bullet: (bullet-selector? WS "{") | "-"+ | "+"+ | "*"+ | "}" bullet-selector: ([0-9]+ | "[" WS ident WS "]") WS ":" ...
34.110638
92
0.466941
class Parser: """ Parser for coq sentences. WS: (" " | "\\n" | "\\t")* unit: WS (comment | bullet | command) comment: "(*" (comment | [^*] | "*" not followed by ")")* "*)" bullet: (bullet-selector? WS "{") | "-"+ | "+"+ | "*"+ | "}" bullet-selector: ([0-9]+ | "[" WS ident WS "]") WS ":" ...
931
0
138
64e111ae0a868a8faa2343aeceb41ee57f932484
1,960
py
Python
codewalker/adapters/judge0.py
tilda/codewalker
d07ee1fc7e52193783405dfaa84ec8b0e993d5cc
[ "Apache-2.0" ]
3
2019-11-22T09:52:47.000Z
2019-11-22T12:22:44.000Z
codewalker/adapters/judge0.py
tilda/codewalker
d07ee1fc7e52193783405dfaa84ec8b0e993d5cc
[ "Apache-2.0" ]
null
null
null
codewalker/adapters/judge0.py
tilda/codewalker
d07ee1fc7e52193783405dfaa84ec8b0e993d5cc
[ "Apache-2.0" ]
null
null
null
import aiohttp import string import base64
42.608696
157
0.64949
import aiohttp import string import base64 class Judge0: def __init__(self, *args, **kwargs): self.base_url_submit = 'https://api.judge0.com/submissions?wait=true' super().__init__(*args, **kwargs) async def add_submission(self, session: aiohttp.ClientSession(), lang: int, code: str, stdin...
135
1,760
23
7b3b41dac42383aba72a457f0fa7b6749cd993a1
4,306
py
Python
web/app/movie/userCF.py
Fivepoints/BISHE
58086a644279d6f22a509c52384a6ac6c2440746
[ "MIT" ]
null
null
null
web/app/movie/userCF.py
Fivepoints/BISHE
58086a644279d6f22a509c52384a6ac6c2440746
[ "MIT" ]
null
null
null
web/app/movie/userCF.py
Fivepoints/BISHE
58086a644279d6f22a509c52384a6ac6c2440746
[ "MIT" ]
null
null
null
# -*-coding:utf-8-*- from math import sqrt from ..models import Rating import random random.seed(0) # 声明一个ItemBased推荐的 对象 usercf = UserBasedCF() # usercf.generate_dataset() # usercf.cal_user_sim('A') # for rank_result in usercf.recommend('A'): # print('推荐%s,推荐度%.2f' %(rank_result[0],rank_result[1]))
32.37594
116
0.529494
# -*-coding:utf-8-*- from math import sqrt from ..models import Rating import random random.seed(0) class UserBasedCF: def __init__(self): self.trainset_len = 0 self.sim_mat = {} self.train = {} @staticmethod def loadBase(): ''' load file from dataBase, return a generator...
567
3,565
22
0e67014ad5271df21d83b7f6b4a475d7c70ccecb
2,904
py
Python
entropylab/cli/main.py
qguyk/entropy
e43077026c83fe84de022cf8636b2c9d42f1d330
[ "BSD-3-Clause" ]
null
null
null
entropylab/cli/main.py
qguyk/entropy
e43077026c83fe84de022cf8636b2c9d42f1d330
[ "BSD-3-Clause" ]
null
null
null
entropylab/cli/main.py
qguyk/entropy
e43077026c83fe84de022cf8636b2c9d42f1d330
[ "BSD-3-Clause" ]
null
null
null
import argparse import functools import sys import pkg_resources from entropylab.dashboard import serve_dashboard from entropylab.logger import logger from entropylab.pipeline.results_backend.sqlalchemy import init_db, upgrade_db # Decorator for friendly error messages def command(func: callable) -> callable: ...
24.403361
88
0.661157
import argparse import functools import sys import pkg_resources from entropylab.dashboard import serve_dashboard from entropylab.logger import logger from entropylab.pipeline.results_backend.sqlalchemy import init_db, upgrade_db # Decorator for friendly error messages def command(func: callable) -> callable: ...
2,188
0
138
6f8aae0f988540814048d9c58d31f0a4d80aa893
7,133
py
Python
main.py
raoulpicconi/pythonProject_Start2Impact
f434ee7ede646be68e5e2e49c55e4008fe7c6971
[ "MIT" ]
null
null
null
main.py
raoulpicconi/pythonProject_Start2Impact
f434ee7ede646be68e5e2e49c55e4008fe7c6971
[ "MIT" ]
null
null
null
main.py
raoulpicconi/pythonProject_Start2Impact
f434ee7ede646be68e5e2e49c55e4008fe7c6971
[ "MIT" ]
null
null
null
import requests import json import os from datetime import datetime import time # This is the class to connect this code to CoinMarketCap APIs # This is the class in which I set the parameters to fetch the data I need from CoinMarketCap while True: # This is an infinite loop that sleeps for 24 hours ea...
39.40884
126
0.63031
import requests import json import os from datetime import datetime import time class Request: # This is the class to connect this code to CoinMarketCap APIs def __init__(self): self.url = '' self.params = {} self.headers = {} def fetch_currencies_data(self): r = requests....
5,078
-5
337
71aa90433d5ca0c4ffa44239f3a672c0a946e0ec
630
py
Python
tkinter_examples/button__change_button_icon_on_click/main__next_image_generator__using__itertools_cycle.py
gil9red/SimplePyScripts
c191ce08fbdeb29377639184579e392057945154
[ "CC-BY-4.0" ]
117
2015-12-18T07:18:27.000Z
2022-03-28T00:25:54.000Z
tkinter_examples/button__change_button_icon_on_click/main__next_image_generator__using__itertools_cycle.py
gil9red/SimplePyScripts
c191ce08fbdeb29377639184579e392057945154
[ "CC-BY-4.0" ]
8
2018-10-03T09:38:46.000Z
2021-12-13T19:51:09.000Z
tkinter_examples/button__change_button_icon_on_click/main__next_image_generator__using__itertools_cycle.py
gil9red/SimplePyScripts
c191ce08fbdeb29377639184579e392057945154
[ "CC-BY-4.0" ]
28
2016-08-02T17:43:47.000Z
2022-03-21T08:31:12.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = 'ipetrash' import itertools import tkinter as tk root = tk.Tk() root.geometry('200x200') CYCLED_IMAGES = itertools.cycle([ tk.PhotoImage(file="icons/ok.png"), tk.PhotoImage(file="icons/no.png"), tk.PhotoImage(file="icons/help.png"), ]) p...
16.578947
46
0.7
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = 'ipetrash' import itertools import tkinter as tk root = tk.Tk() root.geometry('200x200') CYCLED_IMAGES = itertools.cycle([ tk.PhotoImage(file="icons/ok.png"), tk.PhotoImage(file="icons/no.png"), tk.PhotoImage(file="icons/help.png"), ]) def...
91
0
46
beabe1376f5aaaad79f07a0175c734c6b0a8a409
8,435
py
Python
src/oci/cloud_guard/models/impacted_resource_summary.py
Manny27nyc/oci-python-sdk
de60b04e07a99826254f7255e992f41772902df7
[ "Apache-2.0", "BSD-3-Clause" ]
249
2017-09-11T22:06:05.000Z
2022-03-04T17:09:29.000Z
src/oci/cloud_guard/models/impacted_resource_summary.py
Manny27nyc/oci-python-sdk
de60b04e07a99826254f7255e992f41772902df7
[ "Apache-2.0", "BSD-3-Clause" ]
228
2017-09-11T23:07:26.000Z
2022-03-23T10:58:50.000Z
src/oci/cloud_guard/models/impacted_resource_summary.py
Manny27nyc/oci-python-sdk
de60b04e07a99826254f7255e992f41772902df7
[ "Apache-2.0", "BSD-3-Clause" ]
224
2017-09-27T07:32:43.000Z
2022-03-25T16:55:42.000Z
# coding: utf-8 # Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
29.288194
245
0.634855
# coding: utf-8 # Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
177
0
81
8b9f89cfe09de7e60368fb6b11509374837fcb8e
13,139
py
Python
filtermetagenome.py
adamkoziol/metagenomeFilter
f779c59aa2b9e3b1eb2ad8e0072aafabb6f528c8
[ "MIT" ]
null
null
null
filtermetagenome.py
adamkoziol/metagenomeFilter
f779c59aa2b9e3b1eb2ad8e0072aafabb6f528c8
[ "MIT" ]
null
null
null
filtermetagenome.py
adamkoziol/metagenomeFilter
f779c59aa2b9e3b1eb2ad8e0072aafabb6f528c8
[ "MIT" ]
null
null
null
#!/usr/bin/env python import subprocess from threading import Thread from csv import DictReader from SPAdesPipeline.OLCspades.accessoryFunctions import * import SPAdesPipeline.OLCspades.metadataprinter as metadataprinter __author__ = 'adamkoziol' # If the script is called from the command line, then call the argument...
49.394737
120
0.595479
#!/usr/bin/env python import subprocess from threading import Thread from csv import DictReader from SPAdesPipeline.OLCspades.accessoryFunctions import * import SPAdesPipeline.OLCspades.metadataprinter as metadataprinter __author__ = 'adamkoziol' class FilterGenome(object): def objectprep(self): import c...
10,279
2,340
130
7ef79910a0329c0df1095201faebb68e58c67e2d
5,996
py
Python
mc_b_est.py
RussellAzadKhan/etas
5742077dac5e9bc1f05426e34af299fa6c1c5842
[ "MIT" ]
44
2021-03-08T17:28:10.000Z
2022-03-20T10:20:57.000Z
mc_b_est.py
RussellAzadKhan/etas
5742077dac5e9bc1f05426e34af299fa6c1c5842
[ "MIT" ]
null
null
null
mc_b_est.py
RussellAzadKhan/etas
5742077dac5e9bc1f05426e34af299fa6c1c5842
[ "MIT" ]
9
2021-03-08T22:52:12.000Z
2021-08-24T02:16:27.000Z
#!/usr/bin/env python # coding: utf-8 ############################################################################## # joint beta and completeness magnitude estimation # using p-value of Kolmogorov-Smirnov distance to fitted Gutenberg-Richter law # # as described by Mizrahi et al., 2021 # Leila Mizrahi, Shyam Nandan, ...
32.586957
108
0.616244
#!/usr/bin/env python # coding: utf-8 ############################################################################## # joint beta and completeness magnitude estimation # using p-value of Kolmogorov-Smirnov distance to fitted Gutenberg-Richter law # # as described by Mizrahi et al., 2021 # Leila Mizrahi, Shyam Nandan, ...
3,208
0
138
a6454a8c8ede5d86843f2ba3c2aa9d761dae4364
1,812
py
Python
statistics/ratings.py
SLIPO-EU/poi-data-exploration
4d11a14423a5b68c56da4131e67ff36e11dabe16
[ "Apache-2.0" ]
1
2019-02-25T09:36:36.000Z
2019-02-25T09:36:36.000Z
statistics/ratings.py
SLIPO-EU/poi-data-exploration
4d11a14423a5b68c56da4131e67ff36e11dabe16
[ "Apache-2.0" ]
null
null
null
statistics/ratings.py
SLIPO-EU/poi-data-exploration
4d11a14423a5b68c56da4131e67ff36e11dabe16
[ "Apache-2.0" ]
null
null
null
import re import numpy as np from .statistics import Statistics """ The module to extract ratings and create their distribution. """
25.166667
74
0.669978
import re import numpy as np from .statistics import Statistics """ The module to extract ratings and create their distribution. """ class Ratings(Statistics): __unrecognized = 0 """ The number of unrecognized entries.""" data = [] """ The distribution data.""" width = 0 """ The width of the bin.""" def __i...
48
1,609
22
761b6a1cb5e24d6812c8f6adc6340e39e6bc0d57
2,584
py
Python
app/views/read_book_views.py
OlegKlimenko/Plamber
a3536b864d05abb6b6bba0f2971ab4b7b9c60db6
[ "Apache-2.0" ]
13
2017-03-30T12:19:35.000Z
2019-12-09T03:15:22.000Z
app/views/read_book_views.py
OlegKlimenko/Plamber
a3536b864d05abb6b6bba0f2971ab4b7b9c60db6
[ "Apache-2.0" ]
213
2017-02-18T11:48:40.000Z
2022-03-11T23:20:36.000Z
app/views/read_book_views.py
OlegKlimenko/Plamber
a3536b864d05abb6b6bba0f2971ab4b7b9c60db6
[ "Apache-2.0" ]
3
2018-06-17T11:54:49.000Z
2019-10-22T16:19:28.000Z
# -*- coding: utf-8 -*- import json import logging from django.core.exceptions import ObjectDoesNotExist from django.db import transaction from django.http import HttpResponse from django.shortcuts import redirect, render, get_object_or_404 from .selected_book_views import selected_book from ..forms import SetCurren...
34.918919
120
0.601393
# -*- coding: utf-8 -*- import json import logging from django.core.exceptions import ObjectDoesNotExist from django.db import transaction from django.http import HttpResponse from django.shortcuts import redirect, render, get_object_or_404 from .selected_book_views import selected_book from ..forms import SetCurren...
0
0
0
60b44fe086577e80208f7eed89a06624f93bd684
177
py
Python
Black Hat Python Book Projects/mail_sniffer1.py
felipemsalles/Cybersecurity
87d012c138284c96b8fbd99ffc6c2a40bb5b7c3e
[ "MIT" ]
1
2021-12-22T20:52:03.000Z
2021-12-22T20:52:03.000Z
Black Hat Python Book Projects/mail_sniffer1.py
felipemsalles/Cybersecurity
87d012c138284c96b8fbd99ffc6c2a40bb5b7c3e
[ "MIT" ]
null
null
null
Black Hat Python Book Projects/mail_sniffer1.py
felipemsalles/Cybersecurity
87d012c138284c96b8fbd99ffc6c2a40bb5b7c3e
[ "MIT" ]
null
null
null
from scapy.all import sniff if __name__ == '__main__': main()
13.615385
39
0.677966
from scapy.all import sniff def packet_callback(packet): print(packet.show()) def main(): sniff(prn=packet_callback, count=1) if __name__ == '__main__': main()
62
0
46
1b579d02cd280da2ed067a58a689713bf2a13aef
239
py
Python
compiled/construct/docstrings_docref.py
smarek/ci_targets
c5edee7b0901fd8e7f75f85245ea4209b38e0cb3
[ "MIT" ]
4
2017-04-08T12:55:11.000Z
2020-12-05T21:09:31.000Z
compiled/construct/docstrings_docref.py
smarek/ci_targets
c5edee7b0901fd8e7f75f85245ea4209b38e0cb3
[ "MIT" ]
7
2018-04-23T01:30:33.000Z
2020-10-30T23:56:14.000Z
compiled/construct/docstrings_docref.py
smarek/ci_targets
c5edee7b0901fd8e7f75f85245ea4209b38e0cb3
[ "MIT" ]
6
2017-04-08T11:41:14.000Z
2020-10-30T22:47:31.000Z
from construct import * from construct.lib import * docstrings_docref = Struct( 'one' / Int8ub, 'two' / Int8ub, 'three' / Int8ub, 'foo' / Computed(lambda this: True), 'parse_inst' / Pointer(0, Int8ub), ) _schema = docstrings_docref
18.384615
37
0.694561
from construct import * from construct.lib import * docstrings_docref = Struct( 'one' / Int8ub, 'two' / Int8ub, 'three' / Int8ub, 'foo' / Computed(lambda this: True), 'parse_inst' / Pointer(0, Int8ub), ) _schema = docstrings_docref
0
0
0
8d38f2c21b02675af20b410b02d1bf95771c7843
13,216
py
Python
txbit/txbit.py
itamar-j-allali/txbit
09d3639817abe33fac58f12843ef1b3c98b5ada1
[ "MIT" ]
null
null
null
txbit/txbit.py
itamar-j-allali/txbit
09d3639817abe33fac58f12843ef1b3c98b5ada1
[ "MIT" ]
null
null
null
txbit/txbit.py
itamar-j-allali/txbit
09d3639817abe33fac58f12843ef1b3c98b5ada1
[ "MIT" ]
null
null
null
import hashlib import hmac import json import requests from time import time class Txbit: """A class to interact with the Txbit.io API Attributes ---------- endpoint : str the base url for API calls APIKey : str key for working with the Market and Account methods Secret : st...
40.415902
94
0.6278
import hashlib import hmac import json import requests from time import time class TxbitResponse: def __init__(self, success, message, result): self.success = success self.message = message self.result = result def __str__(self): d = { 'success': self.success,\ ...
364
-1
103
7881ace615b384ff104bce9104df5ec23ad593b9
2,453
py
Python
src/onegov/org/models/person_move.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/org/models/person_move.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/org/models/person_move.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from onegov.page import Page from onegov.form import FormDefinition from onegov.reservation import Resource class PersonMove(object): """ Represents a single move of a linked person. """ @classmethod @staticmethod class PagePersonMove(PersonMove): """ Represents a single move of a linked person on...
27.561798
79
0.599266
from onegov.page import Page from onegov.form import FormDefinition from onegov.reservation import Resource class PersonMove(object): """ Represents a single move of a linked person. """ def __init__(self, session, obj, subject, target, direction): self.session = session self.obj = obj ...
1,659
0
184
be36fe87de557091a9716b72be50733751167f1a
4,041
py
Python
client/hr_services/doctype/employee_resignation/employee_resignation.py
mhbu50/client
b99003b872a1599ba8c4b0ca948610a1f49d527f
[ "MIT" ]
null
null
null
client/hr_services/doctype/employee_resignation/employee_resignation.py
mhbu50/client
b99003b872a1599ba8c4b0ca948610a1f49d527f
[ "MIT" ]
null
null
null
client/hr_services/doctype/employee_resignation/employee_resignation.py
mhbu50/client
b99003b872a1599ba8c4b0ca948610a1f49d527f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document from frappe import msgprint, _ from client.hr_services.doctype.end_of_service_a...
34.245763
117
0.732244
# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document from frappe import msgprint, _ from client.hr_services.doctype.end_of_service_a...
2,981
15
142
c1dff31312277598bac593ced84e4cedc4d3c056
1,527
py
Python
delivery_django/delivery/migrations/0003_auto_20220105_1547.py
huang0819/Django-Vue
d534aa04f47c30e9bab0bca40cc734b9395bfd2d
[ "MIT" ]
null
null
null
delivery_django/delivery/migrations/0003_auto_20220105_1547.py
huang0819/Django-Vue
d534aa04f47c30e9bab0bca40cc734b9395bfd2d
[ "MIT" ]
null
null
null
delivery_django/delivery/migrations/0003_auto_20220105_1547.py
huang0819/Django-Vue
d534aa04f47c30e9bab0bca40cc734b9395bfd2d
[ "MIT" ]
null
null
null
# Generated by Django 3.2.11 on 2022-01-05 07:47 from django.db import migrations
23.859375
48
0.510151
# Generated by Django 3.2.11 on 2022-01-05 07:47 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('delivery', '0002_auto_20220105_1456'), ] operations = [ migrations.DeleteModel( name='AuthGroup', ), migrations.DeleteM...
0
1,420
23
13b1596c06a05c43760f9df87a12c0069459b5a1
558
py
Python
telethon/tl/patched/__init__.py
xditya/Telethon
71212a37847402a31306422208f7b36d29b5039e
[ "MIT" ]
2
2021-12-27T14:40:42.000Z
2022-02-08T03:07:59.000Z
telethon/tl/patched/__init__.py
xditya/Telethon
71212a37847402a31306422208f7b36d29b5039e
[ "MIT" ]
null
null
null
telethon/tl/patched/__init__.py
xditya/Telethon
71212a37847402a31306422208f7b36d29b5039e
[ "MIT" ]
2
2021-12-15T12:22:06.000Z
2021-12-27T15:00:01.000Z
from .. import types, alltlobjects from ..custom.message import Message as _Message types.MessageEmpty = MessageEmpty alltlobjects.tlobjects[MessageEmpty.CONSTRUCTOR_ID] = MessageEmpty types.MessageService = MessageService alltlobjects.tlobjects[MessageService.CONSTRUCTOR_ID] = MessageService types.Message = M...
20.666667
70
0.808244
from .. import types, alltlobjects from ..custom.message import Message as _Message class MessageEmpty(_Message, types.MessageEmpty): pass types.MessageEmpty = MessageEmpty alltlobjects.tlobjects[MessageEmpty.CONSTRUCTOR_ID] = MessageEmpty class MessageService(_Message, types.MessageService): pass types...
0
105
69
9c0e78b19001520bedac9e2c7ed4dc464ccfdceb
9,561
py
Python
djangae/tests/test_transactional.py
iwi-games/djangae
a8e5d051723e6bcd9cdb75c40eef45d748899e9f
[ "BSD-3-Clause" ]
null
null
null
djangae/tests/test_transactional.py
iwi-games/djangae
a8e5d051723e6bcd9cdb75c40eef45d748899e9f
[ "BSD-3-Clause" ]
null
null
null
djangae/tests/test_transactional.py
iwi-games/djangae
a8e5d051723e6bcd9cdb75c40eef45d748899e9f
[ "BSD-3-Clause" ]
null
null
null
# STANDARD LIB import threading # DJANGAE from djangae.db import transaction from djangae.contrib import sleuth from djangae.test import TestCase
32.300676
99
0.605794
# STANDARD LIB import threading # DJANGAE from djangae.db import transaction from djangae.contrib import sleuth from djangae.test import TestCase class TransactionTests(TestCase): def test_repeated_usage_in_a_loop(self): from .test_connector import TestUser pk = TestUser.objects.create(username="...
8,114
1,171
127
49ec7324b4afa9dc66f1fa34098f71487def90c3
8,556
py
Python
objects/player.py
elgrandt/ShooterInc
0552e563d9ea81b0e0a0c4be1648412aa52c56e6
[ "MIT" ]
null
null
null
objects/player.py
elgrandt/ShooterInc
0552e563d9ea81b0e0a0c4be1648412aa52c56e6
[ "MIT" ]
null
null
null
objects/player.py
elgrandt/ShooterInc
0552e563d9ea81b0e0a0c4be1648412aa52c56e6
[ "MIT" ]
null
null
null
import OGL from macros import * from math import cos, sin, radians, degrees from OpenGL.GL import * from OpenGL.GLU import * import pygame import shoot import config from formula import *
45.269841
136
0.576438
import OGL from macros import * from math import cos, sin, radians, degrees from OpenGL.GL import * from OpenGL.GLU import * import pygame import shoot import config from formula import * class SmithAndWesson(OGL.Cube): def __init__(self): self.standby_pos = config.SmithAndWesson["Standby Pos"]#[.3,-.25,-1...
8,146
21
202
129fd921119c0e7251942c2b9da83a5f87fa8695
3,203
py
Python
Lib/site-packages/jupyterhub/apihandlers/hub.py
KarmaScripter/PiggyPy
25ba1d0c8933a0cb655f09db6c228f74f4d52894
[ "MIT" ]
null
null
null
Lib/site-packages/jupyterhub/apihandlers/hub.py
KarmaScripter/PiggyPy
25ba1d0c8933a0cb655f09db6c228f74f4d52894
[ "MIT" ]
null
null
null
Lib/site-packages/jupyterhub/apihandlers/hub.py
KarmaScripter/PiggyPy
25ba1d0c8933a0cb655f09db6c228f74f4d52894
[ "MIT" ]
null
null
null
"""API handlers for administering the Hub itself""" # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. import json import sys from tornado import web from tornado.ioloop import IOLoop from .._version import __version__ from ..scopes import needs_scope from .base impor...
31.712871
91
0.588199
"""API handlers for administering the Hub itself""" # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. import json import sys from tornado import web from tornado.ioloop import IOLoop from .._version import __version__ from ..scopes import needs_scope from .base impor...
0
2,660
69
fbef3ba48f1d30cc05741d00a3628d5afc43a223
2,458
py
Python
kahuna/session.py
esagecloudOS/kahuna-master
0c97ab5a756d49265b327ff29babc400377a9187
[ "MIT" ]
null
null
null
kahuna/session.py
esagecloudOS/kahuna-master
0c97ab5a756d49265b327ff29babc400377a9187
[ "MIT" ]
null
null
null
kahuna/session.py
esagecloudOS/kahuna-master
0c97ab5a756d49265b327ff29babc400377a9187
[ "MIT" ]
3
2015-02-20T03:54:42.000Z
2016-10-23T20:25:47.000Z
#!/usr/bin/env jython import atexit import logging from config import Config from java.util import Properties from org.jclouds import ContextBuilder from org.jclouds.abiquo import AbiquoApiMetadata, AbiquoContext from org.jclouds.logging.slf4j.config import SLF4JLoggingModule from org.jclouds.sshj.config import SshjS...
37.815385
77
0.638731
#!/usr/bin/env jython import atexit import logging from config import Config from java.util import Properties from org.jclouds import ContextBuilder from org.jclouds.abiquo import AbiquoApiMetadata, AbiquoContext from org.jclouds.logging.slf4j.config import SLF4JLoggingModule from org.jclouds.sshj.config import SshjS...
0
0
0
f6a47c0a2d5328d0b909c7bb4155d8528e094745
1,752
py
Python
server/app/redis_req.py
CSID-DGU/2022-1-CSC4031-Kloud
a22a150939ae7f35585a8dc5e0edd4f56118d96a
[ "MIT" ]
2
2022-03-21T10:02:37.000Z
2022-03-22T16:37:34.000Z
server/app/redis_req.py
CSID-DGU/2022-1-CSC4031-Kloud
a22a150939ae7f35585a8dc5e0edd4f56118d96a
[ "MIT" ]
2
2022-03-26T05:27:20.000Z
2022-03-26T07:16:24.000Z
server/app/redis_req.py
CSID-DGU/2022-1-CSC4031-Kloud
a22a150939ae7f35585a8dc5e0edd4f56118d96a
[ "MIT" ]
4
2022-03-21T06:12:32.000Z
2022-03-21T10:03:42.000Z
import json from json import JSONDecodeError from aioredis import Redis from .config.redis_conf import HOST, PORT, CREDDB, CRED_EXP, COST_EXP, REVOKED_TOKENS, CACHEDB from .response_exceptions import UserNotInDBException cred_db = Redis(host=HOST, port=PORT, db=CREDDB, decode_responses=True) cache_db = Redis(host=HO...
26.953846
94
0.706621
import json from json import JSONDecodeError from aioredis import Redis from .config.redis_conf import HOST, PORT, CREDDB, CRED_EXP, COST_EXP, REVOKED_TOKENS, CACHEDB from .response_exceptions import UserNotInDBException cred_db = Redis(host=HOST, port=PORT, db=CREDDB, decode_responses=True) cache_db = Redis(host=HO...
531
0
92
12d936170fc913a7ec215cf5c32b42b65d070827
418
py
Python
main.py
DejaPierce/Dictionaries
8b427127524120c8d4f28e216abfed913bdf15d9
[ "MIT" ]
null
null
null
main.py
DejaPierce/Dictionaries
8b427127524120c8d4f28e216abfed913bdf15d9
[ "MIT" ]
null
null
null
main.py
DejaPierce/Dictionaries
8b427127524120c8d4f28e216abfed913bdf15d9
[ "MIT" ]
null
null
null
birthdays = { "Albert Einstein": "03/14/1879", "Benjamin Franklin": "01/06/1705", "Ada Lovelace": "12/10/1815" } lst = birthdays.keys() print("We know the birthday of:") for x in lst: print(x) choice = input("Who's birthday do you want to look up?") if choice in lst: print("{}'s birthday is {}....
22
67
0.633971
birthdays = { "Albert Einstein": "03/14/1879", "Benjamin Franklin": "01/06/1705", "Ada Lovelace": "12/10/1815" } lst = birthdays.keys() print("We know the birthday of:") for x in lst: print(x) choice = input("Who's birthday do you want to look up?") if choice in lst: print("{}'s birthday is {}....
0
0
0