hexsha
stringlengths
40
40
size
int64
6
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
130
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
130
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
130
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.53
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
6
1.04M
filtered:remove_non_ascii
int64
0
538k
filtered:remove_decorators
int64
0
917k
filtered:remove_async
int64
0
722k
filtered:remove_classes
int64
-45
1M
filtered:remove_generators
int64
0
814k
filtered:remove_function_no_docstring
int64
-102
850k
filtered:remove_class_no_docstring
int64
-3
5.46k
filtered:remove_unused_imports
int64
-1,350
52.4k
filtered:remove_delete_markers
int64
0
59.6k
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 #----------------------------------------------------------------------...
0
0
0
5,013
0
0
0
8
131
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...
0
0
0
0
0
10,179
0
-22
252
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 widgets import (Button, Entry) from query_strings import (select_all_names_ids, select_birth_names_ids) GENDER_TYPES = ('unknown', 'female', 'male', 'other') NAME_SUFFIXES = ( 'jr.', 'sr.', 'jr', 'sr', 'juni...
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...
0
0
0
15,040
0
2,308
0
706
493
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
0
0
0
0
0
0
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
0
0
0
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. """
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
88
0
0
0
24
46
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...
0
0
805
0
0
997
0
-8
203
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 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(onehot_vec(vec,dict_size)) #print(dataset) if __name__=='__m...
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...
15
0
0
2,121
0
0
0
-25
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
0
0
0
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
_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...
0
0
0
0
0
955
0
-22
136
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 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
0
0
0
0
-9
22
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 ...
0
0
0
0
0
78
0
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
0
0
0
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 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 = targets.view(-1) w = (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(...
0
0
0
0
0
552
0
10
68
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 """ ################################################################### if __name__ == '__main__': main()
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_...
0
3,321
0
0
0
0
0
12
134
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
0
0
0
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 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') ...
0
0
0
442
0
0
0
4
46
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
0
0
0
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/ import pprint as pp # Pass OJ !! # Test s = Solution1() board = [".87654329","2........","3........","4........","5........","6........","7........","8........","9........"] s.solveSudoku(board) print board
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]) ...
0
0
0
3,818
0
0
0
0
45
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 from subsonic_api_proxy import __version__ _logger = logging.getLogger(__name__) def parse_args(args): """Parse command line parameters Args: args ([str]): command line parameters as list ...
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...
0
772
0
0
0
0
0
3
45
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
if __name__ == "__main__": print(Separator().eff())
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
6,122
0
0
0
4
68
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
0
0
0
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 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] ...
0
0
0
0
0
7,476
0
18
46
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. """
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...
0
3,120
0
13,733
0
0
0
171
288
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...
0
0
0
27,926
0
153
0
0
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, ...
0
0
0
6,229
0
0
0
118
202
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 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,100
0
21
0
0
0
101
148
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
0
0
0
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 -*-
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, ...
0
0
0
0
0
3,187
0
28
180
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
0
0
0
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
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_...
0
0
0
0
0
1,673
0
-17
114
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)#srga GPIO.setup(18, GPIO.OUT)#zld for x in range(10): GPIO.output(12, GPIO.HIGH) print("Felkszlni!") time.sleep(0.15) GPIO.output(12, GPIO.LOW) time.sleep(0.15) GPIO.outpu...
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...
10
0
0
0
0
0
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 TypeVar # This should generate an error because func1 is incompatible. # This should generate an error because func1 i...
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) ...
0
0
0
420
0
0
0
9
342
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: except ImportError:
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
0
0
0
0
14
68
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
# from otter.router.src.shared.client import ECSClient
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(): @...
0
1,926
0
0
0
0
0
43
200
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.""" 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 character was given return cu...
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...
0
0
741
0
0
0
0
8
98
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 ConfigParser import cherrypy print("Ok") if not os.geteuid() == 0: #Check if is started as root sys.exit('Must be run as root') # Printer Functions # Serial Functions # Host Fucntions # Print Functions...
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 ...
0
12,180
0
6,367
0
519
0
-15
571
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-*- 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...
282
361
0
3,534
0
0
0
6
67
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
# Decorator for friendly error messages def command(func: callable) -> callable: """Decorator that runs commands. On error, prints friendly message when possible""" return wrapper # CLI command functions # The parser # main if __name__ == "__main__": main()
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: ...
0
555
0
0
0
1,687
0
76
298
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
from datetime import datetime import time while True: # This is an infinite loop that sleeps for 24 hours each cycle, so it returns 1 report per day # and print the fundamental information report = Reports() print(f"Daily report of crypto according to CoinMarketCap of: {datetime.now()}") print...
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....
0
0
0
4,952
0
554
0
-28
135
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...
0
0
0
0
0
91
0
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...
0
7,904
0
0
0
0
0
105
82
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 SPAdesPipeline.OLCspades.metadataprinter as metadataprinter __author__ = 'adamkoziol' # If the script is called from the command line, then call the argument parser if __name__ == '__main__': # Run the script Parser()
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...
0
0
0
12,677
0
0
0
44
160
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, ...
0
0
0
0
0
3,208
0
-2
161
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
""" 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...
0
0
0
1,657
0
0
0
-2
88
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 logging from django.core.exceptions import ObjectDoesNotExist from django.http import HttpResponse from django.shortcuts import redirect, render, get_object_or_404 from .selected_book_views import selected_book from ..models import Book, AddedBook, TheUser logger = logging.getLogger('c...
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
681
0
0
0
0
0
44
111
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
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()
0
0
0
0
0
62
0
6
68
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
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
0
0
0
0
8
44
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
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...
102
0
0
2,934
0
450
0
261
156
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
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
0
0
1,420
0
0
0
11
46
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 types.MessageEmpty = MessageEmpty alltlobjects.tlobjects[MessageEmpty.CONSTRUCTOR_ID] = MessageEmpty types.MessageService = MessageService alltlobjects.tlobjects[MessageService.CONSTRUCTOR_ID] = MessageService types.Message = Message alltlobjects.tlobjects[Message.CONSTRUCTOR...
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
0
0
105
0
0
0
27
91
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 # DJANGAE
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="...
0
1,829
0
7,537
0
0
0
33
134
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. default_handlers = [ (r"/api/shutdown", ShutdownAPIHandler), (r"/api/?", RootAPIHandler), (r"/api/info", InfoAPIHandler), ]
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,286
0
322
0
0
0
24
277
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 logging log = logging.getLogger('kahuna')
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
2,064
0
0
0
142
179
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
from aioredis import Redis from .config.redis_conf import HOST, PORT, CREDDB, CACHEDB cred_db = Redis(host=HOST, port=PORT, db=CREDDB, decode_responses=True) cache_db = Redis(host=HOST, port=PORT, db=CACHEDB, decode_responses=True)
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...
279
0
1,096
0
0
0
0
69
250
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
0
0
0
0
0
0
1e1dc46d2220fad993619e19fec951a80a2c5b34
1,453
py
Python
python_scripts/date_countdown.py
elsingaa/Home-Assistant-Config
d20a2dabf5deeef8f087fa6d34a371617da9c4cd
[ "MIT" ]
1
2019-12-22T12:59:01.000Z
2019-12-22T12:59:01.000Z
python_scripts/date_countdown.py
elsingaa/Home-Assistant-Config
d20a2dabf5deeef8f087fa6d34a371617da9c4cd
[ "MIT" ]
28
2019-12-22T10:33:13.000Z
2020-08-09T04:46:46.000Z
python_scripts/date_countdown.py
elsingaa/Home-Assistant-Config
d20a2dabf5deeef8f087fa6d34a371617da9c4cd
[ "MIT" ]
null
null
null
today = datetime.datetime.now().date() name = data.get('name') eventType = data.get('type') sensorName = "sensor.{}_{}".format(eventType , name.replace(" " , "_")) dateStr = data.get('date') dateSplit = dateStr.split("/") dateDay = int(dateSplit[0]) dateMonth = int(dateSplit[1]) dateYear = int(dateSplit[2]) date = ...
27.415094
87
0.692361
today = datetime.datetime.now().date() name = data.get('name') eventType = data.get('type') sensorName = "sensor.{}_{}".format(eventType , name.replace(" " , "_")) dateStr = data.get('date') dateSplit = dateStr.split("/") dateDay = int(dateSplit[0]) dateMonth = int(dateSplit[1]) dateYear = int(dateSplit[2]) date = ...
0
0
0
0
0
0
0
0
0
4e42bfb584b1b42ea765266b576f1792a9d005b0
5,027
py
Python
modules/shared/graphBehaviours.py
MatthewDaggitt/PathVision
93880bb21bc3b52ce7a7ecc0e5bd7bc1289718cd
[ "MIT" ]
1
2021-06-14T11:12:36.000Z
2021-06-14T11:12:36.000Z
modules/shared/graphBehaviours.py
Ballemons/PathVision
93880bb21bc3b52ce7a7ecc0e5bd7bc1289718cd
[ "MIT" ]
null
null
null
modules/shared/graphBehaviours.py
Ballemons/PathVision
93880bb21bc3b52ce7a7ecc0e5bd7bc1289718cd
[ "MIT" ]
1
2021-06-14T11:12:37.000Z
2021-06-14T11:12:37.000Z
################ ## Base class ## ################ ############################ ## Some common behaviours ## ############################ # Highlights nodes when mouse passes over # Allows the dragging of nodes around the canvas # Allows the addition and removal of nodes and edges to the graph # Allows the addi...
25.912371
107
0.7408
import abc from modules.shared.graphInteraction import Interaction, DrawData from modules.shared.dialogs.edge import EdgeDialog ################ ## Base class ## ################ class Behaviour(): def _init_(self): pass @abc.abstractmethod def getTriggers(): pass @abc.abstractmethod def processDrawData()...
0
54
0
4,322
0
0
0
62
200
741daec93c26e5097bf7057aa8f1a2e043075911
581
py
Python
riemann/sampling_errors.py
bentran225/riemann
85c1ec9b7509e91a1de13013f57e9f47e1b3712c
[ "MIT" ]
2
2021-09-28T23:30:27.000Z
2022-03-28T22:11:26.000Z
riemann/sampling_errors.py
bentran225/riemann
85c1ec9b7509e91a1de13013f57e9f47e1b3712c
[ "MIT" ]
7
2019-07-22T04:13:43.000Z
2019-08-08T00:46:08.000Z
riemann/sampling_errors.py
bentran225/riemann
85c1ec9b7509e91a1de13013f57e9f47e1b3712c
[ "MIT" ]
5
2019-07-22T02:23:18.000Z
2021-09-29T00:21:29.000Z
#!/usr/bin/env python """ RS 2018/03/11: Riemann -- a geometric MCMC sampler This package supports CTDS's investigations into geometric MCMC, as in "information geometry", using a connection associated with the Fisher metric. """
19.366667
77
0.671256
#!/usr/bin/env python """ RS 2018/03/11: Riemann -- a geometric MCMC sampler This package supports CTDS's investigations into geometric MCMC, as in "information geometry", using a connection associated with the Fisher metric. """ class RiemannBaseError(Exception): """ Simple base class for Riemann exceptio...
0
0
0
298
0
0
0
0
46
efd0f016c4d97207277e7c9c594d775ea3ad34e7
26,652
py
Python
gui/operations/computer_vision.py
hawwestin/MSR.APO
5e150a8058b0789996f702e03936037ce3da9e73
[ "Apache-2.0" ]
1
2020-11-21T19:53:58.000Z
2020-11-21T19:53:58.000Z
gui/operations/computer_vision.py
hawwestin/MSR.APO
5e150a8058b0789996f702e03936037ce3da9e73
[ "Apache-2.0" ]
64
2017-09-02T16:51:48.000Z
2018-02-23T13:56:24.000Z
gui/operations/computer_vision.py
hawwestin/MSR.APO
5e150a8058b0789996f702e03936037ce3da9e73
[ "Apache-2.0" ]
1
2019-10-12T20:09:12.000Z
2019-10-12T20:09:12.000Z
import cv2 colors = {"COLOR": 1, "GREY": 0} supported_ext = [ ".jpg", ".png" ] """ https://docs.opencv.org/3.3.0/d2/de8/group__core__array.html#ga209f2f4869e304c82d07739337eae7c5 """ borderType = { "CONSTANT": cv2.BORDER_CONSTANT, "ISOLATED": cv2.BORDER_ISOLATED, "REFLECT": cv2.BORDER_...
37.911807
120
0.562134
import copy from tkinter import filedialog import cv2 import numpy as np from PIL import Image from PIL import ImageTk from cv2 import * from matplotlib import pyplot as plt from gui.operations.repeater import Repeater colors = {"COLOR": 1, "GREY": 0} supported_ext = [ ".jpg", ".png" ] """ https:...
9
1,506
0
24,453
0
0
0
32
246
38a4d9a71af2efe2b36b08f980fb251369ed6c73
1,696
py
Python
AllInOneInstagramBot/plugins/data_analytics.py
AllInOneInstagramBot/bot
b4415fff23c581650c0063a773b10bc3383ff2fe
[ "MIT" ]
null
null
null
AllInOneInstagramBot/plugins/data_analytics.py
AllInOneInstagramBot/bot
b4415fff23c581650c0063a773b10bc3383ff2fe
[ "MIT" ]
null
null
null
AllInOneInstagramBot/plugins/data_analytics.py
AllInOneInstagramBot/bot
b4415fff23c581650c0063a773b10bc3383ff2fe
[ "MIT" ]
null
null
null
import logging logger = logging.getLogger(__name__)
41.365854
150
0.599057
import logging import sys from AllInOneInstagramBot.core.plugin_loader import Plugin logger = logging.getLogger(__name__) class DataAnalytics(Plugin): """Generates a PDF analytics report of current username session data""" def __init__(self): super().__init__() self.description = ( ...
0
0
0
1,548
0
0
0
26
68
d255f3fb58a02d97c9c8851fbcac1756b13912cb
537
py
Python
client/commands/__init__.py
0xedward/pyre-check
dcfe8f45e40f235b49b5d04ed826433e0808f168
[ "MIT" ]
5,975
2018-05-11T15:54:32.000Z
2022-03-31T14:38:00.000Z
client/commands/__init__.py
0xedward/pyre-check
dcfe8f45e40f235b49b5d04ed826433e0808f168
[ "MIT" ]
524
2018-05-11T16:47:20.000Z
2022-03-22T17:43:06.000Z
client/commands/__init__.py
0xedward/pyre-check
dcfe8f45e40f235b49b5d04ed826433e0808f168
[ "MIT" ]
501
2018-05-11T16:46:29.000Z
2022-03-19T04:41:57.000Z
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from typing import List, Type from .analyze import Analyze as Analyze from .command import (ClientException as ClientException, Command as Co...
25.571429
65
0.741155
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from typing import List, Type from .analyze import Analyze as Analyze from .command import ( # noqa; noqa; noqa ClientException as Clien...
0
0
0
0
0
0
0
39
0
0af92050e3e3baf476b72c7562b0a1d6d2fb28ae
3,032
py
Python
examples/src/main/python/ml/decision_tree_classification_example.py
christopherbozeman/spark
14cf753704ea60f358cb870b018cbcf73654f198
[ "BSD-3-Clause-Open-MPI", "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "MIT", "MIT-0", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause-Clear", "BSD-3-Clause" ]
null
null
null
examples/src/main/python/ml/decision_tree_classification_example.py
christopherbozeman/spark
14cf753704ea60f358cb870b018cbcf73654f198
[ "BSD-3-Clause-Open-MPI", "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "MIT", "MIT-0", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause-Clear", "BSD-3-Clause" ]
null
null
null
examples/src/main/python/ml/decision_tree_classification_example.py
christopherbozeman/spark
14cf753704ea60f358cb870b018cbcf73654f198
[ "BSD-3-Clause-Open-MPI", "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "MIT", "MIT-0", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause-Clear", "BSD-3-Clause" ]
null
null
null
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
38.871795
98
0.747032
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
0
0
0
0
0
0
0
-11
23
9be89039226499a03dce86fa39785ae4b22c0855
2,745
py
Python
blatann/examples/peripheral_battery_service.py
dkkeller/blatann
2b72df4812f68fb718ab96d16c82343ee35969a5
[ "BSD-3-Clause" ]
null
null
null
blatann/examples/peripheral_battery_service.py
dkkeller/blatann
2b72df4812f68fb718ab96d16c82343ee35969a5
[ "BSD-3-Clause" ]
null
null
null
blatann/examples/peripheral_battery_service.py
dkkeller/blatann
2b72df4812f68fb718ab96d16c82343ee35969a5
[ "BSD-3-Clause" ]
null
null
null
""" This example demonstrates using Bluetooth SIG's Battery service as a peripheral. The peripheral adds the service, then updates the battery level percentage periodically. This can be used in conjunction with the nRF Connect apps to explore the functionality demonstrated """ from blatann.utils import setup_log...
33.072289
100
0.71184
""" This example demonstrates using Bluetooth SIG's Battery service as a peripheral. The peripheral adds the service, then updates the battery level percentage periodically. This can be used in conjunction with the nRF Connect apps to explore the functionality demonstrated """ import time from blatann import Bl...
0
0
0
0
0
1,405
0
27
117
a9b58717de2d6152a196872f3894d67c30a04809
880
py
Python
OOP_formy/src/pages/modal_page.py
AntonioIonica/Automation_testing
6f7c94c55677b0958e6fada24058f1a00d2c0d0e
[ "MIT" ]
null
null
null
OOP_formy/src/pages/modal_page.py
AntonioIonica/Automation_testing
6f7c94c55677b0958e6fada24058f1a00d2c0d0e
[ "MIT" ]
null
null
null
OOP_formy/src/pages/modal_page.py
AntonioIonica/Automation_testing
6f7c94c55677b0958e6fada24058f1a00d2c0d0e
[ "MIT" ]
null
null
null
""" Modal page Where click on given buttons """
25.882353
61
0.654545
""" Modal page Where click on given buttons """ from pages.base_page import BasePage import time from selenium.webdriver.common.by import By class ModalPage(BasePage): MODAL_BTN = (By.ID, 'modal-button') CLOSE_BTN = (By.ID, 'close-button') OK_BTN = (By.ID, 'ok-button') def click_on_ok(self): ...
0
0
0
714
0
0
0
27
90
0836633f1fdb041422499f605943875a1547cdf2
303
py
Python
setup.py
jrasero/mdmr
74868089db39f8fb92910a1f702e45256b98ff8e
[ "MIT" ]
null
null
null
setup.py
jrasero/mdmr
74868089db39f8fb92910a1f702e45256b98ff8e
[ "MIT" ]
1
2021-07-14T21:22:28.000Z
2021-07-14T21:22:28.000Z
setup.py
jrasero/mdmr
74868089db39f8fb92910a1f702e45256b98ff8e
[ "MIT" ]
null
null
null
#!/usr/bin/env python from distutils.core import setup setup(name='mdmr', version='1.0', description='Multivariate distance matrix regression', author='Javier Rasero', author_email='jrasero.daparte@gmail.com', url='', license='MIT', packages=['mdmr'], )
21.642857
60
0.623762
#!/usr/bin/env python from distutils.core import setup setup(name='mdmr', version='1.0', description='Multivariate distance matrix regression', author='Javier Rasero', author_email='jrasero.daparte@gmail.com', url='', license='MIT', packages=['mdmr'], )
0
0
0
0
0
0
0
0
0
962ef75b9f5ef8a98abd359a07776335b7ce7f09
859
py
Python
cgi-bin/writefiles.py
raspibo/ThermoRed
55f93e49e3fac6cc919c64d5246d6fdf77e641ee
[ "MIT" ]
null
null
null
cgi-bin/writefiles.py
raspibo/ThermoRed
55f93e49e3fac6cc919c64d5246d6fdf77e641ee
[ "MIT" ]
1
2015-02-03T18:30:29.000Z
2015-02-03T18:30:29.000Z
cgi-bin/writefiles.py
raspibo/ThermoRed
55f93e49e3fac6cc919c64d5246d6fdf77e641ee
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copia files nel .bak import shutil # Serve per la parte di gestione html in python import cgitb # Abilita gli errori al server web/http cgitb.enable() # Intestazione HTML print("<!DOCTYPE html>") print(""" <html> <head> <title>ThermoRed</title> <meta name="GENERATOR" content="Midnigh...
18.276596
79
0.703143
#!/usr/bin/env python3 # Copia files nel .bak import shutil # Serve per la parte di gestione html in python import cgi import cgitb import time # Abilita gli errori al server web/http cgitb.enable() # Intestazione HTML print("<!DOCTYPE html>") print(""" <html> <head> <title>ThermoRed</title> <meta name="GEN...
0
0
0
0
0
0
0
-21
45
ab3209de2fa70f66670005d33fc4f1a7b6a7de8a
2,463
py
Python
networkx/algorithms/assortativity/tests/test_neighbor_degree.py
jmmcd/networkx
207ff7d1e9bfaff013ac77c8d6bb79619892c994
[ "BSD-3-Clause" ]
3
2020-08-04T20:29:41.000Z
2020-11-09T09:28:19.000Z
networkx/algorithms/assortativity/tests/test_neighbor_degree.py
jmmcd/networkx
207ff7d1e9bfaff013ac77c8d6bb79619892c994
[ "BSD-3-Clause" ]
30
2020-04-15T19:37:40.000Z
2020-04-22T21:19:35.000Z
networkx/algorithms/assortativity/tests/test_neighbor_degree.py
jmmcd/networkx
207ff7d1e9bfaff013ac77c8d6bb79619892c994
[ "BSD-3-Clause" ]
2
2020-03-12T23:20:22.000Z
2021-02-15T21:54:02.000Z
#!/usr/bin/env python
30.407407
70
0.550142
#!/usr/bin/env python import networkx as nx from networkx.testing import almost_equal class TestAverageNeighbor(object): def test_degree_p4(self): G = nx.path_graph(4) answer = {0: 2, 1: 1.5, 2: 1.5, 3: 2} nd = nx.average_neighbor_degree(G) assert nd == answer D = G.to_di...
0
0
0
2,353
0
0
0
20
67
47d409c1fedf524d43057743731aef1cde8a2406
46,702
py
Python
bright/apigen/typesystem.py
bright-dev/bright
af3ff83d37880787443b1a8e785f375142d42882
[ "WTFPL" ]
3
2016-05-08T06:13:10.000Z
2019-02-14T10:01:22.000Z
bright/apigen/typesystem.py
bright-dev/bright
af3ff83d37880787443b1a8e785f375142d42882
[ "WTFPL" ]
null
null
null
bright/apigen/typesystem.py
bright-dev/bright
af3ff83d37880787443b1a8e785f375142d42882
[ "WTFPL" ]
null
null
null
"""Implements a simple, dynamic type system for API generation. :author: Anthony Scopatz <scopatz@gmail.com> Introduction ============ This module provides a suite of tools for denoting, describing, and converting between various data types and the types coming from various systems. This is achieved by providing ca...
37.572003
111
0.602672
"""Implements a simple, dynamic type system for API generation. :author: Anthony Scopatz <scopatz@gmail.com> Introduction ============ This module provides a suite of tools for denoting, describing, and converting between various data types and the types coming from various systems. This is achieved by providing ca...
0
18,834
0
0
0
308
0
10
506
f7b38074e23cdb4c561a986c04702beda05cbe13
54,525
py
Python
pymod/util.py
philpot/wat
e3a654c5169a0de44cf706bcd1d7e854bf9dae41
[ "Apache-2.0" ]
null
null
null
pymod/util.py
philpot/wat
e3a654c5169a0de44cf706bcd1d7e854bf9dae41
[ "Apache-2.0" ]
null
null
null
pymod/util.py
philpot/wat
e3a654c5169a0de44cf706bcd1d7e854bf9dae41
[ "Apache-2.0" ]
2
2016-01-09T13:52:20.000Z
2018-08-05T13:40:07.000Z
#!/usr/bin/env python # Filename: util.py ''' util @author: Andrew Philpot @version 0.79 collection of misc utils Usage: python util.py Options: \t-h, --help:\tprint help to STDOUT and quit \t-v, --verbose:\tverbose output ''' import sys import inspect import types import getopt import fileinput import tempfile impo...
33.206456
204
0.579331
#!/usr/bin/env python # Filename: util.py ''' util @author: Andrew Philpot @version 0.79 collection of misc utils Usage: python util.py Options: \t-h, --help:\tprint help to STDOUT and quit \t-v, --verbose:\tverbose output ''' import sys import inspect import types import getopt import fileinput import tempfile impo...
0
2,780
0
3,197
1,695
18,198
0
0
2,068
9c6d652ed944dfdf2a250332d65b50dc1ee4c792
1,681
py
Python
setup.py
Zegocover/python-dataclasses-serialization
71f98341d7c19b495e967f14022d8aaccaa3643f
[ "MIT" ]
null
null
null
setup.py
Zegocover/python-dataclasses-serialization
71f98341d7c19b495e967f14022d8aaccaa3643f
[ "MIT" ]
null
null
null
setup.py
Zegocover/python-dataclasses-serialization
71f98341d7c19b495e967f14022d8aaccaa3643f
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages from os import path project_root = path.join(path.abspath(path.dirname(__file__))) setup( name='dataclasses_serialization', version=get_version(), packages=find_packages(include=('dataclasses_serialization', 'dataclasses_serialization.*')), install_...
32.326923
114
0.690065
from setuptools import setup, find_packages from os import path import re project_root = path.join(path.abspath(path.dirname(__file__))) def get_version(): with open(path.join(project_root, 'dataclasses_serialization', '__init__.py'), encoding='utf-8') as init_file: return re.search(r"^__version__ = ['\...
0
0
0
0
0
509
0
-12
92
6e14fb00b23e91a1caf55da4041be57069a6b0fb
6,725
py
Python
owl/owl/scanner.py
badmonkey/owlbear-lang
df4e4501017b7d10bb5bc61ee6c5d98f9c897135
[ "Apache-2.0" ]
null
null
null
owl/owl/scanner.py
badmonkey/owlbear-lang
df4e4501017b7d10bb5bc61ee6c5d98f9c897135
[ "Apache-2.0" ]
null
null
null
owl/owl/scanner.py
badmonkey/owlbear-lang
df4e4501017b7d10bb5bc61ee6c5d98f9c897135
[ "Apache-2.0" ]
null
null
null
import re RESERVED_WORDS = re.split( r"\s+", """ is as or not and let try end bor bsl bsr div rem pow type with self case cond bnot band true bxor error catch begin false import memory primitive receive finally undefined otherwise """, ) # |> -!> !-> LONGSYMBOL_TOKENS = { "#[": "LAMBDA", "~>": "SEND...
26.581028
99
0.505428
import re from spark_parser.scanner import GenericScanner from owl.token import OwlbearToken RESERVED_WORDS = re.split( r"\s+", """ is as or not and let try end bor bsl bsr div rem pow type with self case cond bnot band true bxor error catch begin false import memory primitive receive finally undefined other...
0
60
0
5,436
0
0
0
39
69
4c4d41cc7f1397bc4327cf3635643b0ae58dc824
35,844
py
Python
yahoo_panoptes/plugins/polling/generic/snmp/plugin_polling_generic_snmp.py
varunvarma/panoptes
733e1b17e01d47fe0a399e2fe635f614cc5a0b88
[ "Apache-2.0" ]
null
null
null
yahoo_panoptes/plugins/polling/generic/snmp/plugin_polling_generic_snmp.py
varunvarma/panoptes
733e1b17e01d47fe0a399e2fe635f614cc5a0b88
[ "Apache-2.0" ]
null
null
null
yahoo_panoptes/plugins/polling/generic/snmp/plugin_polling_generic_snmp.py
varunvarma/panoptes
733e1b17e01d47fe0a399e2fe635f614cc5a0b88
[ "Apache-2.0" ]
null
null
null
""" This module implements a generic SNMP Panoptes plugin that can consume enrichments for a range of device types in order to poll those same devices. """ import re from yahoo_panoptes.framework import metrics _MAX_REPETITIONS = 25 _TABLE_PATTERN = re.compile(r'(\w+)(?=\.|\[|$)') _TYPE_MAPPING = { "Integer": i...
47.412698
120
0.575354
""" This module implements a generic SNMP Panoptes plugin that can consume enrichments for a range of device types in order to poll those same devices. """ import json import re import time from yahoo_panoptes.framework import metrics from yahoo_panoptes.framework import exceptions from yahoo_panoptes.framework import...
0
887
0
33,408
0
0
0
218
268
d3eba687e813c8a24053dabb9857a302f2967953
2,519
py
Python
DailyProgrammer/DP20160115C.py
DayGitH/Python-Challenges
bc32f1332a92fcc2dfa6f5ea4d95f8a8d64c3edf
[ "MIT" ]
2
2020-12-23T18:59:22.000Z
2021-04-14T13:16:09.000Z
DailyProgrammer/DP20160115C.py
DayGitH/Python-Challenges
bc32f1332a92fcc2dfa6f5ea4d95f8a8d64c3edf
[ "MIT" ]
null
null
null
DailyProgrammer/DP20160115C.py
DayGitH/Python-Challenges
bc32f1332a92fcc2dfa6f5ea4d95f8a8d64c3edf
[ "MIT" ]
null
null
null
""" [2016-01-15] Challenge #249 [Hard] Museum Cameras https://www.reddit.com/r/dailyprogrammer/comments/41346z/20160115_challenge_249_hard_museum_cameras/ # Description You run a museum, and you have a small budget - but you have to protect the museum with cameras. Given some descriptions of rooms, can you organize t...
43.431034
119
0.621675
""" [2016-01-15] Challenge #249 [Hard] Museum Cameras https://www.reddit.com/r/dailyprogrammer/comments/41346z/20160115_challenge_249_hard_museum_cameras/ # Description You run a museum, and you have a small budget - but you have to protect the museum with cameras. Given some descriptions of rooms, can you organize t...
0
0
0
0
0
-1
0
0
23
1ca1c673486030f27aaf7ed4bccf8eba33675722
11,088
py
Python
env3.10/lib/python3.10/site-packages/pyramid_tm/__init__.py
slmaankhaan/todo_app
4e5a81a789e02be84525682f3ec5d0bfc3d91e8d
[ "MIT" ]
null
null
null
env3.10/lib/python3.10/site-packages/pyramid_tm/__init__.py
slmaankhaan/todo_app
4e5a81a789e02be84525682f3ec5d0bfc3d91e8d
[ "MIT" ]
null
null
null
env3.10/lib/python3.10/site-packages/pyramid_tm/__init__.py
slmaankhaan/todo_app
4e5a81a789e02be84525682f3ec5d0bfc3d91e8d
[ "MIT" ]
null
null
null
from pyramid.tweens import EXCVIEW from pyramid.util import DottedNameResolver import transaction import zope.interface try: from pyramid_retry import IRetryableError except ImportError: # pragma: no cover IRetryableError = zope.interface.Interface try: from pyramid_retry import mark_error_retryable exce...
36.117264
79
0.650523
import sys from pyramid.exceptions import ConfigurationError from pyramid.exceptions import NotFound from pyramid.settings import asbool from pyramid.tweens import EXCVIEW from pyramid.util import DottedNameResolver import transaction import warnings import zope.interface try: from pyramid_retry import IRetryableE...
0
0
0
927
0
6,226
0
53
297
983e9800f41de82213b3f7285b95f08cae900d7a
691
py
Python
servio-backend-app/servio/service/migrations/0007_remove_service_feedbackgiven_service_feedbacklist.py
emreerkaslan/SWE573
086f44bfbf6feb9629148de820d76aef1088c909
[ "MIT" ]
null
null
null
servio-backend-app/servio/service/migrations/0007_remove_service_feedbackgiven_service_feedbacklist.py
emreerkaslan/SWE573
086f44bfbf6feb9629148de820d76aef1088c909
[ "MIT" ]
19
2021-10-21T12:43:36.000Z
2021-12-05T14:21:55.000Z
servio-backend-app/servio/service/migrations/0007_remove_service_feedbackgiven_service_feedbacklist.py
emreerkaslan/Servio
086f44bfbf6feb9629148de820d76aef1088c909
[ "MIT" ]
null
null
null
# Generated by Django 4.0 on 2022-01-07 16:26
27.64
157
0.632417
# Generated by Django 4.0 on 2022-01-07 16:26 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('feedback', '0004_alter_feedback_taker'), ('service', '0006_alter_service_date'), ] operations = [ mig...
0
0
0
546
0
0
0
30
68
c7585fac919bf9e8b7d4076ae5255a0091325824
12,676
py
Python
RunAndPlot.py
kachourim/MieScatteringPEC
df6f4ffaa72d75ddd4488cb8f7f507e18155fa1e
[ "MIT" ]
null
null
null
RunAndPlot.py
kachourim/MieScatteringPEC
df6f4ffaa72d75ddd4488cb8f7f507e18155fa1e
[ "MIT" ]
null
null
null
RunAndPlot.py
kachourim/MieScatteringPEC
df6f4ffaa72d75ddd4488cb8f7f507e18155fa1e
[ "MIT" ]
null
null
null
#!/usr/bin/python3 # -*- coding: utf-8 -*- from matplotlib.ticker import StrMethodFormatter from os import system, path, remove import sys import re # ---------------------------------------------------------------- # Running this script # ---------------------------------------------------------------- # This...
25.250996
206
0.524692
#!/usr/bin/python3 # -*- coding: utf-8 -*- from numpy import * from matplotlib.pyplot import * from matplotlib.ticker import StrMethodFormatter from mpl_toolkits import mplot3d from os import system, path, remove import sys import re # ---------------------------------------------------------------- # Running this...
4
0
0
0
0
0
0
19
66
0bf431d2785411629685e804d55562f39393e330
3,442
py
Python
pingdom/pingdom.py
srinivas-kandula/integrations
7c9857fadacc845b3261ba5c1244faccd6511c80
[ "Apache-2.0" ]
10
2016-09-23T21:09:55.000Z
2022-02-05T08:12:43.000Z
pingdom/pingdom.py
srinivas-kandula/integrations
7c9857fadacc845b3261ba5c1244faccd6511c80
[ "Apache-2.0" ]
20
2017-06-29T00:20:56.000Z
2022-03-24T07:32:15.000Z
pingdom/pingdom.py
srinivas-kandula/integrations
7c9857fadacc845b3261ba5c1244faccd6511c80
[ "Apache-2.0" ]
39
2016-11-22T17:19:44.000Z
2022-03-24T07:09:42.000Z
import json import argparse parser = argparse.ArgumentParser(description='Collects monitoring data from Pingdom.') parser.add_argument('-u', '--pingdom-user-name', help='The Pingdom User Name', required=True) parser.add_argument('-p', '--pingdom-password', help='The Pingdom Password', required=True) parser.add_argumen...
35.484536
129
0.597908
import sys import requests import json import argparse import time parser = argparse.ArgumentParser(description='Collects monitoring data from Pingdom.') parser.add_argument('-u', '--pingdom-user-name', help='The Pingdom User Name', required=True) parser.add_argument('-p', '--pingdom-password', help='The Pingdom Passw...
0
0
0
2,616
0
0
0
-27
89
ff25d1ad17d2628edda77fd7b702158c89f51d8d
9,816
py
Python
ipa/browser.py
liepa-project/liepa_ipa
f53e6895df97e8965f59b0a4e0e62704189f1993
[ "BSD-2-Clause" ]
null
null
null
ipa/browser.py
liepa-project/liepa_ipa
f53e6895df97e8965f59b0a4e0e62704189f1993
[ "BSD-2-Clause" ]
null
null
null
ipa/browser.py
liepa-project/liepa_ipa
f53e6895df97e8965f59b0a4e0e62704189f1993
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # vim: set fileencoding=utf-8 import logger SUPPORTED_BROWSERS = ('iexplore', 'firefox', 'chrome', 'opera', 'seamonkey') log = logger.get(__name__) #moz.TypeKeys('%+') #app = application.Application() #moz = app.connect_(path = 'seamonkey.exe...
37.323194
101
0.597596
# -*- coding: utf-8 -*- # vim: set fileencoding=utf-8 import time import logger import subprocess import pythoncom from utils import GetAssocExe, GetWindowPID, SetForegroundWindow, COMDispatch import pywinauto.application SUPPORTED_BROWSERS = ('iexplore', 'firefox', 'chrome', 'opera', 'seamonkey') lo...
0
0
0
8,244
0
890
0
44
194
b90bf06a55b9105c9d71b0afdea3f1e5af63492e
14,704
py
Python
csvimport_connector.py
splunk-soar-connectors/csvimport
cb1bbf5e3d137e5568a6475ab0da44f42ad94cff
[ "Apache-2.0" ]
1
2022-02-13T18:56:52.000Z
2022-02-13T18:56:52.000Z
csvimport_connector.py
splunk-soar-connectors/csvimport
cb1bbf5e3d137e5568a6475ab0da44f42ad94cff
[ "Apache-2.0" ]
2
2021-12-22T12:32:17.000Z
2022-01-21T17:40:38.000Z
csvimport_connector.py
splunk-soar-connectors/csvimport
cb1bbf5e3d137e5568a6475ab0da44f42ad94cff
[ "Apache-2.0" ]
null
null
null
# File: csvimport_connector.py # Copyright (c) 2022 Splunk Inc. # # 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 appli...
40.065395
130
0.623096
# File: csvimport_connector.py # Copyright (c) 2022 Splunk Inc. # # 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 appli...
0
0
0
13,127
0
0
0
93
268
4b72d6611feb8783c6b64b2665a776971c7c531f
5,898
py
Python
nbs/30_drug_disease_associations/100-lincs/py/039-save_full_predictions.py
greenelab/phenoplier
95f04b17f0b5227560fcf32ac0a85b2c5aa9001f
[ "BSD-2-Clause-Patent" ]
3
2021-08-17T21:59:19.000Z
2022-03-08T15:46:24.000Z
nbs/30_drug_disease_associations/100-lincs/py/039-save_full_predictions.py
greenelab/phenoplier
95f04b17f0b5227560fcf32ac0a85b2c5aa9001f
[ "BSD-2-Clause-Patent" ]
4
2021-08-04T13:57:24.000Z
2021-10-11T14:57:15.000Z
nbs/30_drug_disease_associations/100-lincs/py/039-save_full_predictions.py
greenelab/phenoplier
95f04b17f0b5227560fcf32ac0a85b2c5aa9001f
[ "BSD-2-Clause-Patent" ]
null
null
null
# --- # jupyter: # jupytext: # cell_metadata_filter: all,-execution,-papermill,-trusted # formats: ipynb,py//py:percent # text_representation: # extension: .py # format_name: percent # format_version: '1.3' # jupytext_version: 1.7.1 # kernelspec: # display_name: Python 3 # ...
25.205128
205
0.656663
# --- # jupyter: # jupytext: # cell_metadata_filter: all,-execution,-papermill,-trusted # formats: ipynb,py//py:percent # text_representation: # extension: .py # format_name: percent # format_version: '1.3' # jupytext_version: 1.7.1 # kernelspec: # display_name: Python 3 # ...
0
0
0
0
0
0
0
14
22
6d439c13d528ed75dc486e893454eb955a854f40
3,604
py
Python
ginga/util/io_asdf.py
chyan26/ginga
e00c887d8660e0a4178f9681ca7ea7784b7ca129
[ "BSD-3-Clause" ]
null
null
null
ginga/util/io_asdf.py
chyan26/ginga
e00c887d8660e0a4178f9681ca7ea7784b7ca129
[ "BSD-3-Clause" ]
null
null
null
ginga/util/io_asdf.py
chyan26/ginga
e00c887d8660e0a4178f9681ca7ea7784b7ca129
[ "BSD-3-Clause" ]
null
null
null
# This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. """ Module wrapper for loading ASDF files. .. note:: The API for this module is currently unstable and may change in a future release. """ import numpy as np try: import asdf # noqa have_asd...
25.380282
75
0.63263
# This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. """ Module wrapper for loading ASDF files. .. note:: The API for this module is currently unstable and may change in a future release. """ import numpy as np try: import asdf # noqa have_asd...
0
0
0
1,292
0
0
0
10
46
b83743466f4ff07f8a6ee4dd24ca96c47f60cf3f
15,121
py
Python
latex_suite/latex.py
jbuerman/latexsuite
699af5caf6e95e89864f9c8debe94f1a73b40aec
[ "MIT" ]
null
null
null
latex_suite/latex.py
jbuerman/latexsuite
699af5caf6e95e89864f9c8debe94f1a73b40aec
[ "MIT" ]
4
2022-03-03T12:56:43.000Z
2022-03-21T15:59:40.000Z
latex_suite/latex.py
jbuerman/latexsuite
699af5caf6e95e89864f9c8debe94f1a73b40aec
[ "MIT" ]
null
null
null
""" Compiling tex files and processing bibliography (bib) files. """ def make_pdf(file_to_translate, engine, bib_engine, max_end_attempts=1, verbose=False, do_bib=False, do_single_run=False): """ Compile a tex file to a pdf. Performs one or several steps of the translation of a tex fi...
33.45354
118
0.633556
""" Compiling tex files and processing bibliography (bib) files. """ import subprocess import sys import threading import time import latex_suite.util class Outcome: """ The outcome of compiling or processing latex and related files. """ UNKNOWN = -1 SUCCESS = 0 FAILURE = 1 ABORTED = 2 ...
0
1,830
0
8,320
0
0
0
-28
273
6c9d791660dbb5343519e0da1ee9f93cb0a18126
29,493
py
Python
xarray/tests/test_conventions.py
metocean/xarray
f87bb0beadd937e3e9657e6d686a20b2bb288d2b
[ "Apache-2.0" ]
null
null
null
xarray/tests/test_conventions.py
metocean/xarray
f87bb0beadd937e3e9657e6d686a20b2bb288d2b
[ "Apache-2.0" ]
null
null
null
xarray/tests/test_conventions.py
metocean/xarray
f87bb0beadd937e3e9657e6d686a20b2bb288d2b
[ "Apache-2.0" ]
1
2018-08-24T00:08:21.000Z
2018-08-24T00:08:21.000Z
from __future__ import absolute_import from __future__ import division from __future__ import print_function from xarray import Variable from xarray.core.pycompat import iteritems from xarray.backends.memory import InMemoryDataStore def null_wrap(ds): """ Given a data store this wraps each variable...
45.234663
89
0.563897
from __future__ import absolute_import from __future__ import division from __future__ import print_function import contextlib import numpy as np import pandas as pd import warnings from xarray import conventions, Variable, Dataset, open_dataset from xarray.core import utils, indexing from . import TestCase, requires_...
0
16,679
0
11,635
0
0
0
143
451
3981ecaa83bb29cba8bdcb7dba55ef8054904492
4,472
py
Python
api2/Task2_groupbased.py
shyam-patel-kira/LA-CO-SS
76ace6159b5fcf60063e52809b7dac76ccf4952d
[ "BSD-2-Clause" ]
null
null
null
api2/Task2_groupbased.py
shyam-patel-kira/LA-CO-SS
76ace6159b5fcf60063e52809b7dac76ccf4952d
[ "BSD-2-Clause" ]
null
null
null
api2/Task2_groupbased.py
shyam-patel-kira/LA-CO-SS
76ace6159b5fcf60063e52809b7dac76ccf4952d
[ "BSD-2-Clause" ]
null
null
null
import numpy as np import networkx as nx from src import get_img_data_for_2 as gi import configparser as cp import Visualize as vis import Helper as hp import LocationMapping as LM import os image_ids,imgs,cos_img,sorted_k = gi.get_data() k = input("Enter the number of nearest neighbours ") k = int(k) fname = 'IdxI...
32.405797
117
0.617174
import numpy as np import networkx as nx from src import get_img_data_for_2 as gi import configparser as cp import Visualize as vis import Helper as hp import LocationMapping as LM import os image_ids,imgs,cos_img,sorted_k = gi.get_data() k = input("Enter the number of nearest neighbours ") k = int(k) fname = 'IdxI...
0
0
0
0
0
0
0
0
0
cbd53d43569d9ed50e4b0d34c6628d8bbf07b6e5
2,584
py
Python
src/ID_presentations.py
faycalki/medieval-conquests
113e13e2b166b79517c14f2c13f7561307a89f75
[ "MIT" ]
7
2019-08-11T14:20:20.000Z
2021-11-21T06:48:24.000Z
src/ID_presentations.py
faycalki/medieval-conquests
113e13e2b166b79517c14f2c13f7561307a89f75
[ "MIT" ]
null
null
null
src/ID_presentations.py
faycalki/medieval-conquests
113e13e2b166b79517c14f2c13f7561307a89f75
[ "MIT" ]
null
null
null
prsnt_game_start = 0 prsnt_game_credits = 1 prsnt_game_profile_banner_selection = 2 prsnt_game_custom_battle_designer = 3 prsnt_game_multiplayer_admin_panel = 4 prsnt_multiplayer_welcome_message = 5 prsnt_multiplayer_team_select = 6 prsnt_multiplayer_troop_select = 7 prsnt_multiplayer_item_select = 8 prsnt_multiplayer_...
31.512195
51
0.874613
prsnt_game_start = 0 prsnt_game_credits = 1 prsnt_game_profile_banner_selection = 2 prsnt_game_custom_battle_designer = 3 prsnt_game_multiplayer_admin_panel = 4 prsnt_multiplayer_welcome_message = 5 prsnt_multiplayer_team_select = 6 prsnt_multiplayer_troop_select = 7 prsnt_multiplayer_item_select = 8 prsnt_multiplayer_...
0
0
0
0
0
0
0
0
0
929c4b982c2231ed813c23c08fd0230e0cc9d625
2,750
py
Python
gameowfication/verlet.py
Gato-X/NotYourData
98bd79480795aa6b8ad480aa5c1779b3e8203624
[ "MIT" ]
null
null
null
gameowfication/verlet.py
Gato-X/NotYourData
98bd79480795aa6b8ad480aa5c1779b3e8203624
[ "MIT" ]
null
null
null
gameowfication/verlet.py
Gato-X/NotYourData
98bd79480795aa6b8ad480aa5c1779b3e8203624
[ "MIT" ]
null
null
null
""" The MIT License (MIT) Copyright (c) 2015 Guillermo Romero Franco (AKA Gato) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use...
29.569892
100
0.664727
""" The MIT License (MIT) Copyright (c) 2015 Guillermo Romero Franco (AKA Gato) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use...
0
0
0
1,574
0
0
0
-2
68
50883d337dbb2a5c8c42ee48ff9460aa52c1b14a
1,755
py
Python
djforms/admissions/admitted/models.py
carthagecollege/django-djforms
6d05a13223646f47062f827c6d90c88bcbdcb470
[ "Unlicense" ]
null
null
null
djforms/admissions/admitted/models.py
carthagecollege/django-djforms
6d05a13223646f47062f827c6d90c88bcbdcb470
[ "Unlicense" ]
null
null
null
djforms/admissions/admitted/models.py
carthagecollege/django-djforms
6d05a13223646f47062f827c6d90c88bcbdcb470
[ "Unlicense" ]
null
null
null
STATUS = ( ("Freshman","Freshman"), ("Transfer","Transfer"), ) GPA_SCALE = ( ("4.0","4.0"), ("5.0","5.0"), ("6.0","6.0"), ("7.0","7.0"), ("8.0","8.0"), ("9.0","9.0"), ("10.0","10.0"), ("11.0","11.0"), ("12.0","12.0"), ("100","100"), )
24.71831
63
0.556125
from django.db import models from djtools.fields.validators import credit_gpa_validator STATUS = ( ("Freshman","Freshman"), ("Transfer","Transfer"), ) GPA_SCALE = ( ("4.0","4.0"), ("5.0","5.0"), ("6.0","6.0"), ("7.0","7.0"), ("8.0","8.0"), ("9.0","9.0"), ("10.0","1...
0
0
0
1,335
0
0
0
44
73
e788d9a3481f3ecd5da85820ea946f41c5285369
3,686
py
Python
integratingmachinelearning/cfn/lambda_functions/create_thing.py
racheliurui/aws-iot-events-accelerators
2905825720d9dd252d8d1878f5b363a60b87d054
[ "MIT-0" ]
9
2019-10-17T06:22:07.000Z
2021-10-20T17:41:12.000Z
integratingmachinelearning/cfn/lambda_functions/create_thing.py
racheliurui/aws-iot-events-accelerators
2905825720d9dd252d8d1878f5b363a60b87d054
[ "MIT-0" ]
2
2019-12-26T10:40:07.000Z
2019-12-28T07:23:06.000Z
integratingmachinelearning/cfn/lambda_functions/create_thing.py
racheliurui/aws-iot-events-accelerators
2905825720d9dd252d8d1878f5b363a60b87d054
[ "MIT-0" ]
4
2019-12-26T09:22:15.000Z
2021-10-30T20:16:51.000Z
import logging logger = logging.getLogger() logger.setLevel(logging.INFO) policyDocument = { "Version": "2012-10-17", "Statement": [ {"Effect": "Allow", "Action": "iot:*", "Resource": "*"}, ], } configDocument = { "coreThing": { "thingArn": "", "iotHost": "", "iotMqttP...
36.49505
87
0.574607
import sys import json import logging import cfnresponse import boto3 from botocore.exceptions import ClientError logger = logging.getLogger() logger.setLevel(logging.INFO) policyDocument = { "Version": "2012-10-17", "Statement": [ {"Effect": "Allow", "Action": "iot:*", "Resource": "*"}, ], } con...
0
0
0
0
0
2,748
0
-11
133
f3e764a5139f9986d23ea10a9f37247f37f1351c
659
py
Python
app/museolib/widgets/tutorials/7.py
urbanlab/museotouch-educatouch
9ad8f4329a84ba69147ffef57dc564082153bf02
[ "MIT" ]
1
2018-02-09T12:56:01.000Z
2018-02-09T12:56:01.000Z
app/museolib/widgets/tutorials/7.py
urbanlab/museotouch-educatouch
9ad8f4329a84ba69147ffef57dc564082153bf02
[ "MIT" ]
null
null
null
app/museolib/widgets/tutorials/7.py
urbanlab/museotouch-educatouch
9ad8f4329a84ba69147ffef57dc564082153bf02
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*-
36.611111
102
0.728376
#!/usr/bin/env python # -*- coding: utf-8 -*- from kivy.uix.widget import Widget from kivy.graphics import Color, Rectangle from kivy.uix.label import Label from museolib.widgets.tutorials.tutoitem import TutoItem class TutoWidget(Widget): def __init__(self,img_path): super(TutoWidget,self).__init__() s...
0
0
0
416
0
0
0
80
116
129eb24a9c880ecaa6bb8f1b05380469e5a65ab5
1,244
py
Python
tests/test_webdriver_remote.py
Sankhe-LLC/splinter
62297148a6a95211e73fa1b747afb4dd8da8e764
[ "BSD-3-Clause" ]
1
2022-03-25T20:49:52.000Z
2022-03-25T20:49:52.000Z
tests/test_webdriver_remote.py
Sankhe-LLC/splinter
62297148a6a95211e73fa1b747afb4dd8da8e764
[ "BSD-3-Clause" ]
null
null
null
tests/test_webdriver_remote.py
Sankhe-LLC/splinter
62297148a6a95211e73fa1b747afb4dd8da8e764
[ "BSD-3-Clause" ]
1
2020-07-28T17:00:58.000Z
2020-07-28T17:00:58.000Z
# -*- coding: utf-8 -*- # Copyright 2013 splinter authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. try: from urllib import urlopen except ImportError:
26.468085
62
0.71865
# -*- coding: utf-8 -*- # Copyright 2013 splinter authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. try: from urllib import urlopen except ImportError: from urllib.request import urlopen import unittest from splinter import Bro...
0
164
0
390
0
232
0
32
184
eaa3b152e77db9545a20877a2eb2ba8391232770
47
py
Python
grortir/main/model/processes/factories/__init__.py
wojtekPi/grortir
0ef8b495527a4f3861e5df5db756d0ee3ed4aa6f
[ "MIT" ]
null
null
null
grortir/main/model/processes/factories/__init__.py
wojtekPi/grortir
0ef8b495527a4f3861e5df5db756d0ee3ed4aa6f
[ "MIT" ]
null
null
null
grortir/main/model/processes/factories/__init__.py
wojtekPi/grortir
0ef8b495527a4f3861e5df5db756d0ee3ed4aa6f
[ "MIT" ]
null
null
null
"""Contains factories related to processes."""
23.5
46
0.744681
"""Contains factories related to processes."""
0
0
0
0
0
0
0
0
0
13b01d77ebd0680db5e98329aa2028f50af5c14e
935
py
Python
gdsfactory/samples/17_ports.py
jorgepadilla19/gdsfactory
68e1c18257a75d4418279851baea417c8899a165
[ "MIT" ]
42
2020-05-25T09:33:45.000Z
2022-03-29T03:41:19.000Z
gdsfactory/samples/17_ports.py
jorgepadilla19/gdsfactory
68e1c18257a75d4418279851baea417c8899a165
[ "MIT" ]
133
2020-05-28T18:29:04.000Z
2022-03-31T22:21:42.000Z
gdsfactory/samples/17_ports.py
jorgepadilla19/gdsfactory
68e1c18257a75d4418279851baea417c8899a165
[ "MIT" ]
17
2020-06-30T07:07:50.000Z
2022-03-17T15:45:27.000Z
""" Ports define where each port has: - name - midpoint: (x, y) - width: - orientation: (deg) 0, 90, 180, 270. where 0 faces east, 90 (north), 180 (west), 270 (south) """ if __name__ == "__main__": c = test_component_with_port() c.show()
19.081633
84
0.586096
""" Ports define where each port has: - name - midpoint: (x, y) - width: - orientation: (deg) 0, 90, 180, 270. where 0 faces east, 90 (north), 180 (west), 270 (south) """ from typing import Tuple import gdsfactory as gf from gdsfactory.component import Component @gf.cell def test_component_with_port( leng...
0
563
0
0
0
0
0
26
91
60ddd7eaf7552c1eb0c29845fef56fde3ae8c0ac
1,769
py
Python
wot/commands/optimal_transport.py
faro1219/wot
fbe5b63e64a54857d3aebd55d6313d06b39f74de
[ "BSD-3-Clause" ]
null
null
null
wot/commands/optimal_transport.py
faro1219/wot
fbe5b63e64a54857d3aebd55d6313d06b39f74de
[ "BSD-3-Clause" ]
null
null
null
wot/commands/optimal_transport.py
faro1219/wot
fbe5b63e64a54857d3aebd55d6313d06b39f74de
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import wot.io
35.38
119
0.578293
#!/usr/bin/env python # -*- coding: utf-8 -*- import wot.io import wot.ot def main(argv): parser = wot.ot.OptimalTransportHelper.create_base_parser('Compute transport maps between pairs of time points') parser.add_argument('--format', help=wot.commands.FORMAT_HELP, default='loom', choices=wot.commands.FORMA...
0
0
0
0
0
1,669
0
-8
45
b95e1af1a9c0c7f99faa2906e927682ebe54725b
6,811
py
Python
src/asr/asr_utils.py
arendu/espnet
c98079008b064f3d297ff1b1f6f5d3817f6fb967
[ "Apache-2.0" ]
null
null
null
src/asr/asr_utils.py
arendu/espnet
c98079008b064f3d297ff1b1f6f5d3817f6fb967
[ "Apache-2.0" ]
null
null
null
src/asr/asr_utils.py
arendu/espnet
c98079008b064f3d297ff1b1f6f5d3817f6fb967
[ "Apache-2.0" ]
1
2021-12-16T08:24:31.000Z
2021-12-16T08:24:31.000Z
#!/usr/bin/env python # Copyright 2017 Johns Hopkins University (Shinji Watanabe) # Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) # chainer related import chainer # * -------------------- agumenting data prep -------------------- * # * -------------------- training iterator related -----------------...
33.885572
110
0.615328
#!/usr/bin/env python # Copyright 2017 Johns Hopkins University (Shinji Watanabe) # Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) import logging # chainer related import chainer from chainer import training import numpy as np # * -------------------- agumenting data prep -------------------- * def mak...
0
222
0
1,289
0
4,203
0
-3
299
2e169f327a9ef609b7fbe52c8c056361c9403d22
4,338
py
Python
src/scs_philips_hue/client/rest_client.py
south-coast-science/scs_philips_hue
80f4e7f0e7b3b7a11af2326b4c7e18871c5a7040
[ "MIT" ]
null
null
null
src/scs_philips_hue/client/rest_client.py
south-coast-science/scs_philips_hue
80f4e7f0e7b3b7a11af2326b4c7e18871c5a7040
[ "MIT" ]
null
null
null
src/scs_philips_hue/client/rest_client.py
south-coast-science/scs_philips_hue
80f4e7f0e7b3b7a11af2326b4c7e18871c5a7040
[ "MIT" ]
null
null
null
""" Created on 27 Oct 2017 @author: Bruno Beloff (bruno.beloff@southcoastscience.com) header: CURLOPT_HTTPHEADER => array('Accept: application/json'), """ # --------------------------------------------------------------------------------------------------------------------
27.630573
118
0.520055
""" Created on 27 Oct 2017 @author: Bruno Beloff (bruno.beloff@southcoastscience.com) header: CURLOPT_HTTPHEADER => array('Accept: application/json'), """ import json from scs_core.data.json import JSONify from scs_core.client.http_client import HTTPClient from scs_core.sys.http_exception import HTTPException fro...
0
61
0
3,699
0
0
0
140
160
459e6b902da7ea32220ceaa4c91f33095d0a8cbe
2,886
py
Python
utils.py
joaootavio93/3DFaceTracking
39471c87f6d9d6a79615212d68bef80b710aaf15
[ "MIT" ]
null
null
null
utils.py
joaootavio93/3DFaceTracking
39471c87f6d9d6a79615212d68bef80b710aaf15
[ "MIT" ]
null
null
null
utils.py
joaootavio93/3DFaceTracking
39471c87f6d9d6a79615212d68bef80b710aaf15
[ "MIT" ]
null
null
null
""" Contains common functions. """ import cv2 import numpy as np def add_alpha_channel(img): """ Adds alpha channel to an image. Parameters: img (mat): The image which will be received the alpha channel. Returns: mat: The image with alpha channel. """ gray_img = cv2.c...
31.032258
108
0.590783
""" Contains common functions. """ import cv2 import numpy as np def add_alpha_channel(img): """ Adds alpha channel to an image. Parameters: img (mat): The image which will be received the alpha channel. Returns: mat: The image with alpha channel. """ gray_img = cv2.c...
0
0
0
0
0
427
0
0
23
b86d03a8a256eb247660faa35dbe0439b589ee27
101
py
Python
xml2json/exceptions.py
dimagi/xml2json
041b1ef1b98ed28bb6e3bd1c9d626b88e3f45c92
[ "BSD-3-Clause" ]
3
2017-04-17T23:15:20.000Z
2019-04-16T18:40:30.000Z
xml2json/exceptions.py
dimagi/xml2json
041b1ef1b98ed28bb6e3bd1c9d626b88e3f45c92
[ "BSD-3-Clause" ]
6
2015-05-13T20:08:26.000Z
2021-05-12T21:32:09.000Z
xml2json/exceptions.py
dimagi/xml2json
041b1ef1b98ed28bb6e3bd1c9d626b88e3f45c92
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import from lxml import etree XMLSyntaxError = etree.XMLSyntaxError
20.2
38
0.861386
from __future__ import absolute_import from lxml import etree XMLSyntaxError = etree.XMLSyntaxError
0
0
0
0
0
0
0
0
0
1393e109398078e6fcf73d68d3a31d5f1cc057e6
127
py
Python
blank/__init__.py
minhng-info/python-blank
046effcc0fbf8c6b8694b86ec32469f9cfd699ed
[ "MIT" ]
1
2021-04-16T16:55:47.000Z
2021-04-16T16:55:47.000Z
thaipackage/__init__.py
nhithai4620/create_lib_demo1
602d3a8340b658ad8dfd34d4332da4b83d687907
[ "MIT" ]
null
null
null
thaipackage/__init__.py
nhithai4620/create_lib_demo1
602d3a8340b658ad8dfd34d4332da4b83d687907
[ "MIT" ]
1
2021-09-07T08:00:10.000Z
2021-09-07T08:00:10.000Z
# -*- coding: utf-8 -*- from .blank_func import reverse __version__ = "0.1.0" __all__ = [ "reverse", ]
14.111111
31
0.622047
# -*- coding: utf-8 -*- from .blank_func import reverse from . import main __version__ = "0.1.0" __all__ = [ "reverse", ]
0
0
0
0
0
0
0
-3
22
b6d4b3f021f5618f62537b86c0828dfd5e17b079
485
py
Python
zerver/migrations/0135_scheduledmessage_delivery_type.py
TylerPham2000/zulip
2e7aaba0dde5517b4a55cb0bd782f009be45e3ba
[ "Apache-2.0" ]
17,004
2015-09-25T18:27:24.000Z
2022-03-31T22:02:32.000Z
zerver/migrations/0135_scheduledmessage_delivery_type.py
TylerPham2000/zulip
2e7aaba0dde5517b4a55cb0bd782f009be45e3ba
[ "Apache-2.0" ]
20,344
2015-09-25T19:02:42.000Z
2022-03-31T23:54:40.000Z
zerver/migrations/0135_scheduledmessage_delivery_type.py
TylerPham2000/zulip
2e7aaba0dde5517b4a55cb0bd782f009be45e3ba
[ "Apache-2.0" ]
7,271
2015-09-25T18:48:39.000Z
2022-03-31T21:06:11.000Z
# Generated by Django 1.11.6 on 2018-01-12 10:37
23.095238
69
0.579381
# Generated by Django 1.11.6 on 2018-01-12 10:37 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("zerver", "0134_scheduledmessage"), ] operations = [ migrations.AddField( model_name="scheduledmessage", name="deliv...
0
0
0
370
0
0
0
19
46