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
264d8ba2c220bd5539794618d18f2873eb943500
5,463
py
Python
faraday_gui.py
MartinCapraro/2d-faraday-cage
689aa882aa5d805102630eca7a0618a8264e8435
[ "MIT" ]
1
2019-11-27T11:50:15.000Z
2019-11-27T11:50:15.000Z
faraday_gui.py
MartinCapraro/2d-faraday-cage
689aa882aa5d805102630eca7a0618a8264e8435
[ "MIT" ]
null
null
null
faraday_gui.py
MartinCapraro/2d-faraday-cage
689aa882aa5d805102630eca7a0618a8264e8435
[ "MIT" ]
null
null
null
# Import appropriate version of tkinter try: import Tkinter as tk except ImportError: import matplotlib.backends.backend_tkagg as backend_tkagg if __name__ == '__main__': main()
30.519553
133
0.580633
import math # Import appropriate version of tkinter try: import Tkinter as tk except ImportError: import tkinter as tk import numpy as np import matplotlib as mpl import matplotlib.backends.backend_tkagg as backend_tkagg import faraday_numerics import entry_boxes import options class FaradayCageApplication(...
0
0
0
5,026
0
60
0
-19
205
32ef6826eeb2b3c8bb1b52d36ad656fab909a46c
372
py
Python
joc.py
Adrianlov/Python_study
ccd5b309fda7c50caea062b690b894478d656cd0
[ "Apache-2.0" ]
null
null
null
joc.py
Adrianlov/Python_study
ccd5b309fda7c50caea062b690b894478d656cd0
[ "Apache-2.0" ]
null
null
null
joc.py
Adrianlov/Python_study
ccd5b309fda7c50caea062b690b894478d656cd0
[ "Apache-2.0" ]
null
null
null
comanda = "" while comanda != "quit": comanda = input("> ").lower() if comanda == "start": print("Masina a pornit") elif comanda == "stop": print("Masina sa oprit") elif comanda == "help": print(''' Start - Masina porneste Stop - Masina se opreste quit - A iesi ...
20.666667
32
0.521505
comanda = "" while comanda != "quit": comanda = input("> ").lower() if comanda == "start": print("Masina a pornit") elif comanda == "stop": print("Masina sa oprit") elif comanda == "help": print(''' Start - Masina porneste Stop - Masina se opreste quit - A iesi ...
0
0
0
0
0
0
0
0
0
f942dc0edd2abaac164a4973ff199336f55c5e56
4,691
py
Python
xls/CMXlsByHall.py
pengphei/cinemaman
f2de21e9034f7dc07f25980a653d8af82342136f
[ "Unlicense" ]
null
null
null
xls/CMXlsByHall.py
pengphei/cinemaman
f2de21e9034f7dc07f25980a653d8af82342136f
[ "Unlicense" ]
null
null
null
xls/CMXlsByHall.py
pengphei/cinemaman
f2de21e9034f7dc07f25980a653d8af82342136f
[ "Unlicense" ]
null
null
null
# -*- coding: utf-8 -*- # global import # local import # global vars header_names = [ u"", u"", u"", u"", u"", u"", ] ## HEADER STYLE header_pat = Pattern() header_pat.pattern = header_pat.SOLID_PATTERN header_pat.pattern_fore_colour = 1 header_pat.pattern_back_colour = 1 # header alignment...
33.748201
125
0.698785
# -*- coding: utf-8 -*- # global import from xlwt import * # local import # global vars header_names = [ u"影片名称", u"片长", u"语言", u"开映时间", u"结束时间", u"场间", ] ## HEADER STYLE header_pat = Pattern() header_pat.pattern = header_pat.SOLID_PATTERN header_pat.pattern_fore_colour = 1 header_pat.patte...
87
0
0
2,983
0
0
0
-3
45
f63c464e281d5fd54bd4105acf8ac53ec39c33b6
1,819
py
Python
Scripts/dk/spline.py
hhg128/DKGL
c61bc6546ac5655da97462cc532a9034ba08516d
[ "PSF-2.0", "BSD-3-Clause" ]
14
2015-09-12T01:32:05.000Z
2021-10-13T02:52:53.000Z
Scripts/dk/spline.py
hhg128/DKGL
c61bc6546ac5655da97462cc532a9034ba08516d
[ "PSF-2.0", "BSD-3-Clause" ]
null
null
null
Scripts/dk/spline.py
hhg128/DKGL
c61bc6546ac5655da97462cc532a9034ba08516d
[ "PSF-2.0", "BSD-3-Clause" ]
3
2015-11-10T03:12:49.000Z
2018-10-15T15:38:31.000Z
import _dk_core as core # interpolation type CATMULL_ROM = 0 UNIFORM_CUBIC = 1 HERMITE = 2 BEZIER = 3 Spline = core.Spline
30.316667
89
0.59923
import _dk_core as core # interpolation type CATMULL_ROM = 0 UNIFORM_CUBIC = 1 HERMITE = 2 BEZIER = 3 Spline = core.Spline class Spline1(core.Spline): pass class Spline2: '''spline for Vector2''' def __init__(self, p0, p1, p2, p3): self.p0 = p0 self.p1 = p1 self.p2 = p2 ...
0
0
0
1,485
0
92
0
0
115
e80d00dbfeac10dab4858318d86530d0832d1665
17,598
py
Python
lit_nlp/examples/models/t5.py
eichinflo/lit
b46c0cac34baa571242637b53b78cfd69de536d0
[ "Apache-2.0" ]
2,854
2020-08-12T15:51:12.000Z
2022-03-31T08:24:13.000Z
lit_nlp/examples/models/t5.py
soma2000-lang/lit
b46c0cac34baa571242637b53b78cfd69de536d0
[ "Apache-2.0" ]
156
2020-08-16T21:09:05.000Z
2022-03-30T18:04:53.000Z
lit_nlp/examples/models/t5.py
soma2000-lang/lit
b46c0cac34baa571242637b53b78cfd69de536d0
[ "Apache-2.0" ]
301
2020-08-14T05:52:56.000Z
2022-03-25T22:48:01.000Z
# Lint as: python3 """LIT wrappers for T5, supporting both HuggingFace and SavedModel formats.""" from lit_nlp.api import model as lit_model from lit_nlp.api import types as lit_types import tensorflow as tf # tensorflow_text is required for T5 SavedModel JsonDict = lit_types.JsonDict def masked_token_mean(vectors,...
36.284536
80
0.698034
# Lint as: python3 """LIT wrappers for T5, supporting both HuggingFace and SavedModel formats.""" import re from typing import List import attr from lit_nlp.api import model as lit_model from lit_nlp.api import types as lit_types from lit_nlp.examples.models import model_utils from lit_nlp.lib import utils import ten...
0
376
0
15,178
0
0
0
28
326
8c6303badf0da3979a9584cc59fec3a57c1ef4a8
3,526
py
Python
projects/migrations/0011_auto_20170118_1449.py
18F/acquisitions.18f.gov
7ef7091fd65b4b6797ddeb1c1f56def29522c43b
[ "CC0-1.0" ]
3
2016-11-27T05:02:52.000Z
2017-01-31T17:36:36.000Z
projects/migrations/0011_auto_20170118_1449.py
18F/acquisitions.18f.gov
7ef7091fd65b4b6797ddeb1c1f56def29522c43b
[ "CC0-1.0" ]
61
2016-11-05T00:27:34.000Z
2017-09-15T23:37:58.000Z
projects/migrations/0011_auto_20170118_1449.py
18F/acquisitions.18f.gov
7ef7091fd65b4b6797ddeb1c1f56def29522c43b
[ "CC0-1.0" ]
2
2017-07-14T06:21:26.000Z
2021-02-14T11:53:05.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2017-01-18 14:49 from __future__ import unicode_literals
38.326087
261
0.592456
# -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2017-01-18 14:49 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('projects', '0010_auto_20170117_2357'), ] operations = [ migrations.RemoveFi...
0
0
0
3,347
0
0
0
19
46
3c7f3794d55a5a7497bada6694896e246c94aeb6
107
py
Python
chances/__init__.py
JohanMollevik/chances
4d4cd8d952b97ced55de7602e65744cb29ce6979
[ "MIT" ]
null
null
null
chances/__init__.py
JohanMollevik/chances
4d4cd8d952b97ced55de7602e65744cb29ce6979
[ "MIT" ]
null
null
null
chances/__init__.py
JohanMollevik/chances
4d4cd8d952b97ced55de7602e65744cb29ce6979
[ "MIT" ]
null
null
null
__version__ = "0.1.4"
15.285714
31
0.738318
from .methods import Randomizer from .plots import oned, twod from .utils import * __version__ = "0.1.4"
0
0
0
0
0
0
0
17
66
5026d54aea765c38bfd225661ff5f91cb006826c
1,357
py
Python
Pollination/1_PollinationDataProcessing.py
jandrewjohnson/natcap_accounting
21854a62d168274cce662e225ae8eee9f33898ef
[ "BSD-3-Clause" ]
null
null
null
Pollination/1_PollinationDataProcessing.py
jandrewjohnson/natcap_accounting
21854a62d168274cce662e225ae8eee9f33898ef
[ "BSD-3-Clause" ]
null
null
null
Pollination/1_PollinationDataProcessing.py
jandrewjohnson/natcap_accounting
21854a62d168274cce662e225ae8eee9f33898ef
[ "BSD-3-Clause" ]
1
2018-03-22T19:07:11.000Z
2018-03-22T19:07:11.000Z
##Script to prepare data for pollination analyses ##Before running, you must have the NLCD and CDL rasters for your year(s) of analysis and the states raster in one folder # Import modules, reset environments import arcpy arcpy.CheckOutExtension("spatial") arcpy.ResetEnvironments() import tkFileDialog # Se...
34.794872
146
0.731024
##Script to prepare data for pollination analyses ##Before running, you must have the NLCD and CDL rasters for your year(s) of analysis and the states raster in one folder # Import modules, reset environments import arcpy arcpy.CheckOutExtension("spatial") arcpy.ResetEnvironments() import tkFileDialog # Se...
0
0
0
0
0
0
0
0
0
096a4cf71a8055086f8e9399752cfe1dff6ea0e3
633
py
Python
src/daily-coding-problem/medium/kaprekars-constant/test_keprekars_constant.py
nwthomas/code-challenges
49c2532ff597495474e67b13f2ed9b9ad93d40b5
[ "MIT" ]
1
2020-12-11T05:54:59.000Z
2020-12-11T05:54:59.000Z
src/daily-coding-problem/medium/kaprekars-constant/test_keprekars_constant.py
nwthomas/code-challenges
49c2532ff597495474e67b13f2ed9b9ad93d40b5
[ "MIT" ]
1
2021-04-10T06:53:30.000Z
2021-04-10T06:53:30.000Z
src/daily-coding-problem/medium/kaprekars-constant/test_keprekars_constant.py
nwthomas/code-challenges
49c2532ff597495474e67b13f2ed9b9ad93d40b5
[ "MIT" ]
7
2019-11-24T12:10:35.000Z
2020-12-14T22:36:31.000Z
import unittest if __name__ == "__main__": unittest.main()
27.521739
72
0.693523
from keprekars_constant import find_keprekars_constant_steps import unittest class TestKeprekarsConstant(unittest.TestCase): def test_returns_for_number(self): """ Returns the number of steps required to find Keprekar's Constant """ result = find_keprekars_constant_steps(9988) ...
0
0
0
483
0
0
0
39
45
bd1ea0abb4e98998f1481ee67451cc092912d47d
494
py
Python
tests/utils/test_focus_measure.py
kwrobert/qualipy
a514e8d2e7d3b24d111556a1af91689ace36af9a
[ "MIT" ]
null
null
null
tests/utils/test_focus_measure.py
kwrobert/qualipy
a514e8d2e7d3b24d111556a1af91689ace36af9a
[ "MIT" ]
null
null
null
tests/utils/test_focus_measure.py
kwrobert/qualipy
a514e8d2e7d3b24d111556a1af91689ace36af9a
[ "MIT" ]
null
null
null
import cv2 IMAGE = cv2.imread('tests/images/lama.jpg', 0) BLURRED = cv2.blur(IMAGE, (10, 10))
21.478261
47
0.761134
import cv2 from qualipy.utils.focus_measure import * IMAGE = cv2.imread('tests/images/lama.jpg', 0) BLURRED = cv2.blur(IMAGE, (10, 10)) def test_LAPV_returns_less_for_blurred_image(): assert LAPV(BLURRED) < LAPV(IMAGE) def test_LAPM_returns_less_for_blurred_image(): assert LAPM(BLURRED) < LAPM(IMAGE) de...
0
0
0
0
0
260
0
20
115
22877fe254989fac12206a77e4d2e89b0cb08aee
3,894
py
Python
meta/typeset_keywords.py
JohnDTill/Forscape
dbbab01f30597af00f87527a8a3d7b468c04b67b
[ "MIT" ]
10
2021-11-13T12:39:06.000Z
2022-03-19T13:40:05.000Z
meta/typeset_keywords.py
JohnDTill/Forscape
dbbab01f30597af00f87527a8a3d7b468c04b67b
[ "MIT" ]
22
2021-11-13T12:57:10.000Z
2022-03-15T21:42:05.000Z
meta/typeset_keywords.py
JohnDTill/Forscape
dbbab01f30597af00f87527a8a3d7b468c04b67b
[ "MIT" ]
null
null
null
if __name__ == "__main__": main()
41.425532
115
0.476117
from utils import cpp, table_reader def main(): constructs = table_reader.csv_to_list_of_tuples( csv_filepath="construct_codes.csv", tuple_name="Construct", ) keywords = table_reader.csv_to_list_of_tuples( csv_filepath="typeset_keywords.csv", tuple_name="Shortcut", ) ...
0
0
0
0
0
3,794
0
14
45
5b58e15f538009e46e43e040ea9f0a2da92a7873
644
py
Python
send.py
alixnovosi/not5oclock_bot
9eb7f79a79e8f2c4d5b5dfac0d6190890a0f6765
[ "BSD-3-Clause" ]
1
2016-12-02T10:51:02.000Z
2016-12-02T10:51:02.000Z
send.py
andrewmichaud/not5oclock_bot
9eb7f79a79e8f2c4d5b5dfac0d6190890a0f6765
[ "BSD-3-Clause" ]
null
null
null
send.py
andrewmichaud/not5oclock_bot
9eb7f79a79e8f2c4d5b5dfac0d6190890a0f6765
[ "BSD-3-Clause" ]
null
null
null
"""Send file for not5oclock_bot""" import argparse from os import path import botskeleton if __name__ == "__main__": SECRETS_DIR = path.join(path.abspath(path.dirname(__file__)), "SECRETS") botskeleton = botskeleton.BotSkeleton(SECRETS_DIR, bot_name="not5oclock_bot") # Get arg. # Could probably do i...
30.666667
82
0.687888
"""Send file for not5oclock_bot""" import argparse from os import path import botskeleton if __name__ == "__main__": SECRETS_DIR = path.join(path.abspath(path.dirname(__file__)), "SECRETS") botskeleton = botskeleton.BotSkeleton(SECRETS_DIR, bot_name="not5oclock_bot") # Get arg. # Could probably do i...
0
0
0
0
0
0
0
0
0
1c7c656fa1f628d738c08443ca5aa9f4c0513d0c
1,191
py
Python
stancode_projects/breakout_game/breakout.py
JochenMa/stancode_projects
1f7bc363cdc4fcc4ce95e0cc9ff78a46f4de323e
[ "MIT" ]
null
null
null
stancode_projects/breakout_game/breakout.py
JochenMa/stancode_projects
1f7bc363cdc4fcc4ce95e0cc9ff78a46f4de323e
[ "MIT" ]
null
null
null
stancode_projects/breakout_game/breakout.py
JochenMa/stancode_projects
1f7bc363cdc4fcc4ce95e0cc9ff78a46f4de323e
[ "MIT" ]
null
null
null
""" stanCode Breakout Project Adapted from Eric Roberts's Breakout by Sonja Johnson-Yu, Kylie Jue, Nick Bowman, and Jerry Liao. This is a breakout game with loading animation, two levels of games, and a score board """ FRAME_RATE = 1000 / 120 # 120 frames per second if __name__ == '__main__': main()
28.357143
86
0.632242
""" stanCode Breakout Project Adapted from Eric Roberts's Breakout by Sonja Johnson-Yu, Kylie Jue, Nick Bowman, and Jerry Liao. This is a breakout game with loading animation, two levels of games, and a score board """ from campy.gui.events.timer import pause from breakoutgraphics import BreakoutGraphics FRAME_RATE ...
0
0
0
0
0
769
0
43
68
0baa18485463b66f114b88aa64c9d3d4bbd918f0
1,886
py
Python
tools_yuan/convert_data/cvc-09-pkl.py
DouCir/mmdetection
44613202c379d85315ed47ca670fd9853f90c3a5
[ "Apache-2.0" ]
null
null
null
tools_yuan/convert_data/cvc-09-pkl.py
DouCir/mmdetection
44613202c379d85315ed47ca670fd9853f90c3a5
[ "Apache-2.0" ]
null
null
null
tools_yuan/convert_data/cvc-09-pkl.py
DouCir/mmdetection
44613202c379d85315ed47ca670fd9853f90c3a5
[ "Apache-2.0" ]
null
null
null
""" Author: Yuan Yuan Date:2018/12/16 Location:SCU """ if __name__ == '__main__': main()
41.911111
96
0.692471
import os.path as osp import mmcv from tools_yuan.convert_data.utils import parse_xml from tools_yuan.convert_data.utils import track_progress_yuan import getpass """ Author: Yuan Yuan Date:2018/12/16 Location:SCU """ def main(): username = getpass.getuser() xml_dir = osp.join('/media/', username, 'Data/Doub...
0
0
0
0
0
1,604
0
53
133
d1e56e7dab51cf73192a49b5477b005921d42e4e
1,653
py
Python
ros/src/control/servers/heave.py
srmauvsoftware/URSim
feb7d257e61f192067209de5456965d7d0a3a612
[ "Apache-2.0" ]
30
2019-03-23T13:25:13.000Z
2022-03-31T07:41:27.000Z
ros/src/control/servers/heave.py
SIA-Underwater-Robots/URSim
feb7d257e61f192067209de5456965d7d0a3a612
[ "Apache-2.0" ]
2
2021-02-02T16:29:03.000Z
2021-05-08T10:07:43.000Z
ros/src/control/servers/heave.py
SIA-Underwater-Robots/URSim
feb7d257e61f192067209de5456965d7d0a3a612
[ "Apache-2.0" ]
12
2020-02-06T11:56:45.000Z
2022-02-03T05:30:03.000Z
#!/usr/bin/env python import rospy if __name__ == '__main__': rospy.init_node('heaveServer') server = Heave(rospy.get_name()) rospy.spin()
34.4375
81
0.584997
#!/usr/bin/env python from control.msg import heaveFeedback, heaveAction, heaveResult import rospy import time import actionlib class Heave(object): feedback = heaveFeedback() result = heaveResult() def __init__(self, name): self.heavePub = rospy.Publisher('/heave_setpoint', Float64, queue_size=1)...
0
0
0
1,385
0
0
0
27
89
ebdad07000afa14f7bcce41d2a28ea72df3e6551
3,796
py
Python
main.py
ababier/open-kbp-opt
c7909ee8c1561ec9c0199f3c0a79ac0fd0720478
[ "MIT" ]
2
2022-02-21T09:27:12.000Z
2022-02-25T03:32:10.000Z
main.py
ababier/open-kbp-opt
c7909ee8c1561ec9c0199f3c0a79ac0fd0720478
[ "MIT" ]
null
null
null
main.py
ababier/open-kbp-opt
c7909ee8c1561ec9c0199f3c0a79ac0fd0720478
[ "MIT" ]
2
2022-02-21T09:27:16.000Z
2022-02-22T01:04:58.000Z
from itertools import product as it_product import tqdm from scipy import sparse from provided_code.constants_class import ModelParameters from provided_code.data_loader import DataLoader from provided_code.general_functions import get_paths, get_predictions_to_optimize from provided_code.optimizer import PlanningMod...
54.228571
113
0.650421
from itertools import product as it_product import tqdm from scipy import sparse from provided_code.constants_class import ModelParameters from provided_code.data_loader import DataLoader from provided_code.general_functions import get_paths, get_predictions_to_optimize from provided_code.optimizer import PlanningMod...
0
0
0
0
0
0
0
0
0
4ae3624c5d54ec2df9ea28870ce455547096fc54
3,936
py
Python
alig/tf/alig_tf1.py
oval-group/ali-g
568947a2bbb651be3401fbae60229e2fcbf8a505
[ "MIT" ]
19
2019-06-15T06:23:26.000Z
2021-03-01T11:09:08.000Z
alig/tf/alig_tf1.py
oval-group/ali-g
568947a2bbb651be3401fbae60229e2fcbf8a505
[ "MIT" ]
3
2021-02-17T20:57:11.000Z
2021-03-27T13:41:52.000Z
alig/tf/alig_tf1.py
oval-group/ali-g
568947a2bbb651be3401fbae60229e2fcbf8a505
[ "MIT" ]
6
2019-06-17T13:18:27.000Z
2022-03-04T15:29:17.000Z
"""Implementation of ALI-G in tensorflow 1.""" import tensorflow as tf def minimize(optimizer, loss, global_step=None, var_list=None, gate_gradients=tf.compat.v1.train.Optimizer.GATE_OP, aggregation_method=None, colocate_gradients_with_ops=False, name=None, grad_loss=None): ...
45.767442
95
0.667683
"""Implementation of ALI-G in tensorflow 1.""" import tensorflow as tf def minimize(optimizer, loss, global_step=None, var_list=None, gate_gradients=tf.compat.v1.train.Optimizer.GATE_OP, aggregation_method=None, colocate_gradients_with_ops=False, name=None, grad_loss=None): ...
0
0
0
1,907
0
425
0
0
69
ef7badf555a062e8001543f128edae7d4fdb8121
376
py
Python
xii/assembler/__init__.py
MiroK/fenics_ii
58c41f0e8dba720962830395851e081b057269cc
[ "MIT" ]
10
2017-06-22T21:05:17.000Z
2020-09-25T08:36:59.000Z
xii/assembler/__init__.py
MiroK/fenics_ii
58c41f0e8dba720962830395851e081b057269cc
[ "MIT" ]
2
2018-04-14T08:43:59.000Z
2018-09-19T14:51:46.000Z
xii/assembler/__init__.py
MiroK/fenics_ii
58c41f0e8dba720962830395851e081b057269cc
[ "MIT" ]
6
2018-04-13T20:33:53.000Z
2020-09-25T08:37:01.000Z
from . trace_form import Trace from . average_form import Average from . extension_form import Extension from . restriction_form import Restriction from . injection_form import Injection from . point_trace_form import PointTrace from . xii_assembly import assemble as ii_assemble from . average_shape import Square, Squa...
37.6
59
0.835106
from . trace_form import Trace from . average_form import Average from . extension_form import Extension from . restriction_form import Restriction from . injection_form import Injection from . point_trace_form import PointTrace from . xii_assembly import assemble as ii_assemble from . average_shape import Square, Squa...
0
0
0
0
0
0
0
0
0
c777e07b672f4292d431b3be35b47f7c951ddf04
868
py
Python
ip-whois-mail.py
DIVD-NL/scripts
a81c4d74bfaa0a5cde52af324cf60b06d3caa21f
[ "Apache-2.0" ]
1
2021-08-14T19:17:50.000Z
2021-08-14T19:17:50.000Z
ip-whois-mail.py
DIVD-NL/scripts
a81c4d74bfaa0a5cde52af324cf60b06d3caa21f
[ "Apache-2.0" ]
2
2022-03-05T14:04:54.000Z
2022-03-20T13:36:00.000Z
ip-whois-mail.py
DIVD-NL/scripts
a81c4d74bfaa0a5cde52af324cf60b06d3caa21f
[ "Apache-2.0" ]
3
2021-11-14T13:08:29.000Z
2022-03-05T13:53:28.000Z
#!/bin/python3 # https://www.DIVD.nl # Developed by Hidde Smit & Wietse Boonstra # Usage: cat ips.txt | python3 ip-whois-mail.py # ips.txt 1 ip per line # Debugging: sys.stdin = ['1.1.1.1', '8.8.8.8'] from ipwhois import IPWhois import sys for line in sys.stdin: try: ip = line.strip('\n') obj = IP...
32.148148
65
0.574885
#!/bin/python3 # https://www.DIVD.nl # Developed by Hidde Smit & Wietse Boonstra # Usage: cat ips.txt | python3 ip-whois-mail.py # ips.txt 1 ip per line # Debugging: sys.stdin = ['1.1.1.1', '8.8.8.8'] from ipwhois import IPWhois import sys for line in sys.stdin: try: ip = line.strip('\n') obj = IP...
0
0
0
0
0
0
0
0
0
d31ec4bd3a1e7af2c0bc92f9bc8aa4ad444f5b3d
3,518
py
Python
lib/prody/tests/__init__.py
npabon/ProDy
390322d9b7688809f91656bc1cadfdb66cd0a9b3
[ "NCSA" ]
null
null
null
lib/prody/tests/__init__.py
npabon/ProDy
390322d9b7688809f91656bc1cadfdb66cd0a9b3
[ "NCSA" ]
null
null
null
lib/prody/tests/__init__.py
npabon/ProDy
390322d9b7688809f91656bc1cadfdb66cd0a9b3
[ "NCSA" ]
1
2018-12-13T12:15:09.000Z
2018-12-13T12:15:09.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- # ProDy: A Python Package for Protein Dynamics Analysis # # Copyright (C) 2010-2012 Ahmet Bakan # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either...
27.920635
77
0.662877
#!/usr/bin/python # -*- coding: utf-8 -*- # ProDy: A Python Package for Protein Dynamics Analysis # # Copyright (C) 2010-2012 Ahmet Bakan # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either...
0
0
0
0
0
1,241
0
33
127
ee56f9746263c4d84d24762619ef9546cf81f20e
698
py
Python
abc202/abc202_d.py
Vermee81/practice-coding-contests
78aada60fa75f208ee0eef337b33b27b1c260d18
[ "MIT" ]
null
null
null
abc202/abc202_d.py
Vermee81/practice-coding-contests
78aada60fa75f208ee0eef337b33b27b1c260d18
[ "MIT" ]
null
null
null
abc202/abc202_d.py
Vermee81/practice-coding-contests
78aada60fa75f208ee0eef337b33b27b1c260d18
[ "MIT" ]
null
null
null
# https://atcoder.jp/contests/abc202/tasks/abc202_d A, B, K = map(int, input().split()) # memo[a][b] aa, bb memo = [[0 for _ in range(31)] for _ in range(31)] memo[0][0] = 1 for i in range(A + 1): for j in range(B + 1): if i == 0: memo[i][j] = 1 continue if j == 0: ...
23.266667
56
0.444126
# https://atcoder.jp/contests/abc202/tasks/abc202_d A, B, K = map(int, input().split()) # memo[a][b] aがa個, bがb個の時の場合の数 memo = [[0 for _ in range(31)] for _ in range(31)] memo[0][0] = 1 for i in range(A + 1): for j in range(B + 1): if i == 0: memo[i][j] = 1 continue if j == 0...
33
0
0
0
0
226
0
0
23
70589e653b6e630bb2205f6da1d790c6ab6c2c58
2,567
py
Python
tensorflow/compiler/mlir/tfrt/python_tests/tf_matmul_test.py
ashutom/tensorflow-upstream
c16069c19de9e286dd664abb78d0ea421e9f32d4
[ "Apache-2.0" ]
8
2021-08-03T03:57:10.000Z
2021-12-13T01:19:02.000Z
tensorflow/compiler/mlir/tfrt/python_tests/tf_matmul_test.py
ashutom/tensorflow-upstream
c16069c19de9e286dd664abb78d0ea421e9f32d4
[ "Apache-2.0" ]
17
2021-08-12T19:38:42.000Z
2022-01-27T14:39:35.000Z
tensorflow/compiler/mlir/tfrt/python_tests/tf_matmul_test.py
ashutom/tensorflow-upstream
c16069c19de9e286dd664abb78d0ea421e9f32d4
[ "Apache-2.0" ]
4
2022-01-13T11:23:44.000Z
2022-03-02T11:11:42.000Z
# Copyright 2021 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
30.559524
80
0.625633
# Copyright 2021 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
0
0
0
974
0
576
0
-6
92
c3bbf538b562202aa596e9b0bffb514d5d906e89
11,373
py
Python
src/appengine/handlers/cron/fuzzer_weights.py
mikiec84/clusterfuzz
fb053896ee5b5f1468479e75223c07b4281a72d3
[ "Apache-2.0" ]
1
2020-11-09T21:05:50.000Z
2020-11-09T21:05:50.000Z
src/appengine/handlers/cron/fuzzer_weights.py
M31MOTH/clusterfuzz
a614d2e09238f11ae578337e10dfeaba38dcae76
[ "Apache-2.0" ]
12
2020-11-13T18:58:31.000Z
2022-03-21T22:19:55.000Z
src/appengine/handlers/cron/fuzzer_weights.py
gaybro8777/clusterfuzz
fb053896ee5b5f1468479e75223c07b4281a72d3
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 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 agreed to in writing, ...
32.869942
80
0.741053
# Copyright 2019 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 agreed to in writing, ...
0
352
0
121
0
0
0
15
67
655f2e364853371f596b18db8ae3dd9dfeacd2ac
5,866
py
Python
examples/qt_avbmodel.py
markreidvfx/pyavb
48b05a84ff9752703a9218d5ca157ee672b020ab
[ "MIT" ]
21
2019-02-05T22:08:32.000Z
2022-03-07T03:37:59.000Z
examples/qt_avbmodel.py
markreidvfx/pyavb
48b05a84ff9752703a9218d5ca157ee672b020ab
[ "MIT" ]
10
2019-07-25T04:03:44.000Z
2021-08-12T21:31:37.000Z
examples/qt_avbmodel.py
markreidvfx/pyavb
48b05a84ff9752703a9218d5ca157ee672b020ab
[ "MIT" ]
1
2020-02-20T15:08:40.000Z
2020-02-20T15:08:40.000Z
from __future__ import ( unicode_literals, absolute_import, print_function, division, ) import sys import avb if str is not bytes: unicode = str if __name__ == "__main__": from PySide2 import QtWidgets from optparse import OptionParser parser = OptionParser() parser.add_opt...
24.543933
81
0.588817
from __future__ import ( unicode_literals, absolute_import, print_function, division, ) import sys from PySide2 import QtCore import avb if str is not bytes: unicode = str def pretty_value(value): if isinstance(value, bytearray): return "bytearray(%d)" % len(value) # retur...
0
0
0
3,687
0
786
0
5
114
2997477dfa190f25ae19e618f8064176980b342f
18,401
py
Python
src/friendlyshell/base_shell.py
TheFriendlyCoder/FriendlyShell
8508c09e787cb8f0fc44c2a9e2587e8d4eec555c
[ "Apache-2.0" ]
null
null
null
src/friendlyshell/base_shell.py
TheFriendlyCoder/FriendlyShell
8508c09e787cb8f0fc44c2a9e2587e8d4eec555c
[ "Apache-2.0" ]
93
2018-04-21T01:03:06.000Z
2019-06-23T14:22:37.000Z
src/friendlyshell/base_shell.py
TheFriendlyCoder/FriendlyShell
8508c09e787cb8f0fc44c2a9e2587e8d4eec555c
[ "Apache-2.0" ]
null
null
null
"""Common shell interaction logic shared between different shells""" from __future__ import print_function import os # Path where configuration data is stored for friendly shells CONFIG_FOLDER = os.path.expanduser(os.path.join("~", ".friendlyshell")) # pylint: disable=no-member if __name__ == "__main__": pass...
37.248988
89
0.607087
"""Common shell interaction logic shared between different shells""" from __future__ import print_function import os import sys import inspect import subprocess import pyparsing as pp from six.moves import input from friendlyshell.command_parsers import default_line_parser # Path where configuration data is stored for...
0
2,665
0
15,236
0
0
0
25
154
293ae57c61e3117e02596a06527405a882bd94fb
9,882
py
Python
ibmdbpy/tests/test_geoSeries.py
marc-mclean1/ibmdbpy
46d885e793da52c58424885d74ab1a6668c391b3
[ "BSD-3-Clause" ]
null
null
null
ibmdbpy/tests/test_geoSeries.py
marc-mclean1/ibmdbpy
46d885e793da52c58424885d74ab1a6668c391b3
[ "BSD-3-Clause" ]
null
null
null
ibmdbpy/tests/test_geoSeries.py
marc-mclean1/ibmdbpy
46d885e793da52c58424885d74ab1a6668c391b3
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- #----------------------------------------------------------------------------- # Copyright (c) 2015, IBM Corp. # All rights reserved. # # Distributed under the terms of the BSD Simplified License. # # The full license is in the LICENSE file, distributed with this software. ...
40.666667
78
0.699858
#!/usr/bin/env python # -*- coding: utf-8 -*- #----------------------------------------------------------------------------- # Copyright (c) 2015, IBM Corp. # All rights reserved. # # Distributed under the terms of the BSD Simplified License. # # The full license is in the LICENSE file, distributed with this software. ...
0
0
0
9,040
0
0
0
22
157
7024ee02b3c7015ba174d9a7e43b8b0421f75dde
640
py
Python
thanos/train.py
nntrongnghia/thanos_project
6db56bc232541d2c857ace0cd0d4681d53290422
[ "MIT" ]
1
2022-02-13T15:07:41.000Z
2022-02-13T15:07:41.000Z
thanos/train.py
nntrongnghia/thanos_project
6db56bc232541d2c857ace0cd0d4681d53290422
[ "MIT" ]
null
null
null
thanos/train.py
nntrongnghia/thanos_project
6db56bc232541d2c857ace0cd0d4681d53290422
[ "MIT" ]
null
null
null
import wandb import pytorch_lightning as pl import argparse from thanos.trainers.lit_detector import LitGestureTransformer from thanos.trainers import load_config if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("config", type=str, help="Path to config py file") args = p...
32
78
0.759375
import os import wandb import pytorch_lightning as pl import argparse from thanos.trainers.lit_detector import LitGestureTransformer from thanos.trainers import load_config if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("config", type=str, help="Path to config py file") ...
0
0
0
0
0
0
0
-12
22
3355356edd64d34b575db36745c83670220183c9
813
py
Python
solutions/796.py
pacokwon/leetcode
37c943d371c106d1e6f24e065700e5edd1c3f9f9
[ "MIT" ]
2
2022-01-18T08:57:13.000Z
2022-01-18T15:49:06.000Z
solutions/796.py
pacokwon/leetcode
37c943d371c106d1e6f24e065700e5edd1c3f9f9
[ "MIT" ]
null
null
null
solutions/796.py
pacokwon/leetcode
37c943d371c106d1e6f24e065700e5edd1c3f9f9
[ "MIT" ]
null
null
null
# Rotate String if __name__ == "__main__": sol = Solution() s = "abcde" goal = "cdeab" s = "abcde" goal = "abced" s = "bbbacddceeb" goal = "ceebbbbacdd" print(sol.rotateString(s, goal))
23.911765
79
0.510455
# Rotate String class Solution: def check(self, s: str, goal: str, start: int) -> bool: for i in range(len(s)): gi = (start + i) % len(s) if s[i] != goal[gi]: return False return True def rotateString(self, s: str, goal: str) -> bool: if len(s) !...
0
0
0
571
0
0
0
0
23
0ad55b78084b83ebe23ad5b807de58e01cb11379
1,486
py
Python
tests/st/ops/cpu/test_unique_op.py
dongkcs/mindspore
cd7df6dbf463ff3128e9181e9d0c779cecb81320
[ "Apache-2.0" ]
2
2020-11-23T13:46:37.000Z
2020-12-20T02:02:38.000Z
tests/st/ops/cpu/test_unique_op.py
dongkcs/mindspore
cd7df6dbf463ff3128e9181e9d0c779cecb81320
[ "Apache-2.0" ]
1
2020-12-29T06:46:38.000Z
2020-12-29T06:46:38.000Z
tests/st/ops/cpu/test_unique_op.py
dongkcs/mindspore
cd7df6dbf463ff3128e9181e9d0c779cecb81320
[ "Apache-2.0" ]
1
2021-05-12T06:30:29.000Z
2021-05-12T06:30:29.000Z
# Copyright 2020 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
30.958333
78
0.661507
# Copyright 2020 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
0
0
0
146
0
359
0
47
135
6d1513081c7e6fb2b07be1477020d68104c3afa5
871
py
Python
alembic/versions/cb98a72750ab_bugfix_correct_active_to_is_active.py
rmcguire6/leitner-box-v-2-
a5c84c5ee8ded61bc8ce18ac497b1811e0efc634
[ "MIT" ]
null
null
null
alembic/versions/cb98a72750ab_bugfix_correct_active_to_is_active.py
rmcguire6/leitner-box-v-2-
a5c84c5ee8ded61bc8ce18ac497b1811e0efc634
[ "MIT" ]
10
2022-01-15T19:08:13.000Z
2022-01-15T19:59:26.000Z
alembic/versions/cb98a72750ab_bugfix_correct_active_to_is_active.py
rmcguire6/leitner-box-v-2-
a5c84c5ee8ded61bc8ce18ac497b1811e0efc634
[ "MIT" ]
null
null
null
"""bugfix: correct active to is_active Revision ID: cb98a72750ab Revises: 7685fd00e696 Create Date: 2021-12-03 12:16:09.979253 """ # revision identifiers, used by Alembic. revision = 'cb98a72750ab' down_revision = '7685fd00e696' branch_labels = None depends_on = None
28.096774
130
0.700344
"""bugfix: correct active to is_active Revision ID: cb98a72750ab Revises: 7685fd00e696 Create Date: 2021-12-03 12:16:09.979253 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'cb98a72750ab' down_revision = '7685fd00e696' branch_labels = None depends_on = None ...
0
0
0
0
0
504
0
3
90
b5533c3c3ac96eac66ad42b8b70a975885f119e2
7,707
py
Python
vn_lang.py
Tranquangdai/seq2seq
5211d49e87d34a1a66c2541519ed9ccc669153b7
[ "BSD-2-Clause" ]
2
2020-04-26T04:46:44.000Z
2020-05-22T18:45:41.000Z
vn_lang.py
Tranquangdai/seq2seq
5211d49e87d34a1a66c2541519ed9ccc669153b7
[ "BSD-2-Clause" ]
null
null
null
vn_lang.py
Tranquangdai/seq2seq
5211d49e87d34a1a66c2541519ed9ccc669153b7
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function import codecs SUBSTITUTIONS = { u'a': u'', u'': u'a', u'': u'a', u'': u'a', u'': u'a', u'': u'a', u'': u'a', u'': u'a', u'': u...
23.354545
67
0.500843
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function import codecs from unidecode import unidecode from itertools import product SUBSTITUTIONS = { u'a': u'áảàãạâấẩẫầậăắẳẵằặ', u'á': u'aảàãạâấẩẫầậăắẳẵằặ', ...
3,272
0
0
0
0
1,137
0
18
136
cc5252c9c600d5b5b17b1bab38b0aa762eeec90c
3,865
py
Python
src/dataloaders.py
OsvaldFrisk/dp-not-all-noise-is-equal
a9293eab2e68577f5244d21c672cf18de33d5d29
[ "MIT" ]
null
null
null
src/dataloaders.py
OsvaldFrisk/dp-not-all-noise-is-equal
a9293eab2e68577f5244d21c672cf18de33d5d29
[ "MIT" ]
null
null
null
src/dataloaders.py
OsvaldFrisk/dp-not-all-noise-is-equal
a9293eab2e68577f5244d21c672cf18de33d5d29
[ "MIT" ]
null
null
null
"""Dataloaders for MNIST, FashionMNIST, CIFAR10"""
24.775641
73
0.652523
"""Dataloaders for MNIST, FashionMNIST, CIFAR10""" from typing import Tuple import torchvision from torch.utils.data import DataLoader from opacus.utils.uniform_sampler import UniformWithReplacementSampler def MNIST_dataloaders( trainloader_sample_rate: float, test_batch_size: int, root: str = './', ...
0
0
0
0
0
3,562
0
67
181
386582d6fac6cdb4b34d6690284d4cf4e29f313b
6,679
py
Python
lemmatized_text/models.py
eldarion-client/hedera
a01d44232fadab4e60e8d06971feba9fad21e3f2
[ "MIT" ]
null
null
null
lemmatized_text/models.py
eldarion-client/hedera
a01d44232fadab4e60e8d06971feba9fad21e3f2
[ "MIT" ]
null
null
null
lemmatized_text/models.py
eldarion-client/hedera
a01d44232fadab4e60e8d06971feba9fad21e3f2
[ "MIT" ]
null
null
null
# this is for representing the lemmatized text
31.654028
103
0.628537
import logging from django.db import models from django.template.defaultfilters import floatformat from django.urls import reverse from django.utils import timezone from django.contrib.auth.models import User from django.contrib.postgres.fields import JSONField from django_rq import get_connection, job from iso639 i...
0
585
0
5,484
0
42
0
178
338
f41e8a6c1c7a86a44724cfeba65fa24d78242ee7
8,188
py
Python
pypy/tool/pytest/htmlreport.py
microvm/pypy-mu
6b03fbe93052d0eb3a4c67152c987c16837b3484
[ "Apache-2.0", "OpenSSL" ]
34
2015-07-09T04:53:27.000Z
2021-07-19T05:22:27.000Z
pypy/tool/pytest/htmlreport.py
microvm/pypy-mu
6b03fbe93052d0eb3a4c67152c987c16837b3484
[ "Apache-2.0", "OpenSSL" ]
6
2015-05-30T17:20:45.000Z
2017-06-12T14:29:23.000Z
pypy/tool/pytest/htmlreport.py
microvm/pypy-mu
6b03fbe93052d0eb3a4c67152c987c16837b3484
[ "Apache-2.0", "OpenSSL" ]
11
2015-09-07T14:26:08.000Z
2020-04-10T07:20:41.000Z
#! /usr/bin/env python """ the html test reporter """ import py # # various interesting path objects # html = py.xml.html NBSP = py.xml.raw("&nbsp;") mydir = py.path.local(__file__).dirpath()
34.116667
83
0.557401
#! /usr/bin/env python """ the html test reporter """ import sys, os, re import pprint import py from pypy.tool.pytest import result from pypy.tool.pytest.overview import ResultCache # # various interesting path objects # html = py.xml.html NBSP = py.xml.raw("&nbsp;") class HtmlReport(object): def __init...
0
0
0
7,455
0
263
0
31
238
34e02ec0c6d12f72f95771aa7fd5b3e8268430c5
633
py
Python
src/lesson02/10-populationWebServer.py
shq-shq-shq/python-lessons
fac96b0c95c676e8256329ac269ad4530f245d84
[ "MIT" ]
null
null
null
src/lesson02/10-populationWebServer.py
shq-shq-shq/python-lessons
fac96b0c95c676e8256329ac269ad4530f245d84
[ "MIT" ]
null
null
null
src/lesson02/10-populationWebServer.py
shq-shq-shq/python-lessons
fac96b0c95c676e8256329ac269ad4530f245d84
[ "MIT" ]
null
null
null
from simpleWebServer import SimpleWebServer #--------------------------------------------------- usersCount = 0 estonianPopulation = { "tallinn" : 441000, "tartu" : 94000, "narva" : 58000, "parnu" : 41000 } #--------------------------------------------------- SimpleWebServer().serve(8088, getPopul...
22.607143
115
0.524487
from simpleWebServer import SimpleWebServer #--------------------------------------------------- usersCount = 0 estonianPopulation = { "tallinn" : 441000, "tartu" : 94000, "narva" : 58000, "parnu" : 41000 } def getPopulation(path): global usersCount usersCount += 1 city = path[1:] ...
0
0
0
0
0
284
0
0
23
79b472404e3b277d60f5ef3b54f5b7775f5f0353
991
py
Python
Static_data.py
leoc98/FGO-
6b331d78fae6f14fa54438787addb352c128bb75
[ "MIT" ]
null
null
null
Static_data.py
leoc98/FGO-
6b331d78fae6f14fa54438787addb352c128bb75
[ "MIT" ]
null
null
null
Static_data.py
leoc98/FGO-
6b331d78fae6f14fa54438787addb352c128bb75
[ "MIT" ]
null
null
null
from Automator import Automator position_dictionary = { "skill_1": (54, 432), "skill_2": (123, 432), "skill_3": (192, 432), "skill_4": (291, 432), "skill_5": (362, 432), "skill_6": (432, 432), "skill_7": (530, 432), "skill_8": (600, 432), "skill_9": (672, 432), "mast...
27.527778
44
0.564077
from Automator import Automator position_dictionary = { "skill_1": (54, 432), "skill_2": (123, 432), "skill_3": (192, 432), "skill_4": (291, 432), "skill_5": (362, 432), "skill_6": (432, 432), "skill_7": (530, 432), "skill_8": (600, 432), "skill_9": (672, 432), "mast...
0
0
0
0
0
0
0
0
0
8db3d0b05b87692cb1b140db9d3cf555bf2b87b9
348
py
Python
4-manufacturing/lessons/4-trigger-fruit-detector/code-proximity/virtual-iot-device/fruit-quality-detector/distance_sensor.py
yash7raut/IoT-For-Beginners
074f4880e655f19008f2fa9dfca03e18f94cf441
[ "MIT" ]
9,718
2021-03-17T12:14:37.000Z
2022-03-31T21:34:50.000Z
4-manufacturing/lessons/4-trigger-fruit-detector/code-proximity/virtual-iot-device/fruit-quality-detector/distance_sensor.py
bennice/IoT-For-Beginners
caaca7b5b6dac7298d72c3bfa802fda4c3a49e29
[ "MIT" ]
123
2021-05-17T17:24:15.000Z
2022-03-04T06:58:47.000Z
4-manufacturing/lessons/4-trigger-fruit-detector/code-proximity/virtual-iot-device/fruit-quality-detector/distance_sensor.py
bennice/IoT-For-Beginners
caaca7b5b6dac7298d72c3bfa802fda4c3a49e29
[ "MIT" ]
1,115
2021-07-08T13:56:20.000Z
2022-03-31T22:54:25.000Z
from counterfit_connection import CounterFitConnection CounterFitConnection.init('127.0.0.1', 5000) import time from counterfit_shims_rpi_vl53l0x.vl53l0x import VL53L0X distance_sensor = VL53L0X() distance_sensor.begin() while True: distance_sensor.wait_ready() print(f'Distance = {distance_sensor.get_distan...
24.857143
60
0.793103
from counterfit_connection import CounterFitConnection CounterFitConnection.init('127.0.0.1', 5000) import time from counterfit_shims_rpi_vl53l0x.vl53l0x import VL53L0X distance_sensor = VL53L0X() distance_sensor.begin() while True: distance_sensor.wait_ready() print(f'Distance = {distance_sensor.get_distan...
0
0
0
0
0
0
0
0
0
e530cb2060a25b0c5a85ce3635e1da636cc05d01
7,566
py
Python
src/greyd/active_user.py
canberk/greyd
b3ce055ba856277d5efd5e2bbb9b59ff8d3b3c58
[ "MIT" ]
2
2019-02-18T16:31:14.000Z
2019-03-05T18:24:39.000Z
src/greyd/active_user.py
canberk/greyd
b3ce055ba856277d5efd5e2bbb9b59ff8d3b3c58
[ "MIT" ]
null
null
null
src/greyd/active_user.py
canberk/greyd
b3ce055ba856277d5efd5e2bbb9b59ff8d3b3c58
[ "MIT" ]
1
2019-02-20T21:42:20.000Z
2019-02-20T21:42:20.000Z
# -*- coding: utf-8 -*- """Active user in game. Greyd Rule: 1xx """
37.270936
79
0.577452
# -*- coding: utf-8 -*- """Active user in game. Greyd Rule: 1xx """ import logging from datetime import datetime, timedelta from greyd.db import session from greyd.models.user import User from greyd.models.lobby import Lobby from greyd.models.user_to_lobby import UserToLobby from greyd.models.chat import Chat from g...
0
0
0
7,176
0
0
0
119
201
cc509c24aa8c7051a7516a656786559975dfc474
875
py
Python
Python/Numba/Primes/primes.py
Gjacquenot/training-material
16b29962bf5683f97a1072d961dd9f31e7468b8d
[ "CC-BY-4.0" ]
115
2015-03-23T13:34:42.000Z
2022-03-21T00:27:21.000Z
Python/Numba/Primes/primes.py
Gjacquenot/training-material
16b29962bf5683f97a1072d961dd9f31e7468b8d
[ "CC-BY-4.0" ]
56
2015-02-25T15:04:26.000Z
2022-01-03T07:42:48.000Z
Python/Numba/Primes/primes.py
Gjacquenot/training-material
16b29962bf5683f97a1072d961dd9f31e7468b8d
[ "CC-BY-4.0" ]
59
2015-11-26T11:44:51.000Z
2022-03-21T00:27:22.000Z
#!/usr/bin/env python from argparse import ArgumentParser if __name__ == '__main__': arg_parser = ArgumentParser(description='compute primes') arg_parser.add_argument('implmentation', choices=['python', 'numba' 'python_array', ...
38.043478
71
0.549714
#!/usr/bin/env python from argparse import ArgumentParser import sys if __name__ == '__main__': arg_parser = ArgumentParser(description='compute primes') arg_parser.add_argument('implmentation', choices=['python', 'numba' 'python_array', ...
0
0
0
0
0
0
0
-11
22
19d01c8d8e2f79014cfabea11d56a370264f08f3
1,663
py
Python
applications/migrations/0029_application_and_basket_city.py
SuviVappula/tilavarauspalvelu-core
ad7dec36e392a7b2927e2f825c3b0eb29b700793
[ "MIT" ]
null
null
null
applications/migrations/0029_application_and_basket_city.py
SuviVappula/tilavarauspalvelu-core
ad7dec36e392a7b2927e2f825c3b0eb29b700793
[ "MIT" ]
90
2020-11-13T07:42:32.000Z
2022-03-29T08:54:20.000Z
applications/migrations/0029_application_and_basket_city.py
SuviVappula/tilavarauspalvelu-core
ad7dec36e392a7b2927e2f825c3b0eb29b700793
[ "MIT" ]
8
2021-02-10T11:31:22.000Z
2022-01-28T14:33:47.000Z
# Generated by Django 3.1.7 on 2021-04-08 07:14
42.641026
160
0.671678
# Generated by Django 3.1.7 on 2021-04-08 07:14 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('applications', '0028_organisation_email'), ] operations = [ migrations.CreateModel( name='City'...
0
0
0
1,516
0
0
0
30
68
1b9b70269ddb5dd0e669e8360b18f5ecc15e5c05
221
py
Python
django_auth_adfs/drf-urls.py
mmcclelland1002/django-auth-adfs
e716f9d8c1be7afcf67e3296f3d340a25a8f1810
[ "BSD-2-Clause" ]
123
2016-02-10T19:55:59.000Z
2021-01-13T03:52:05.000Z
django_auth_adfs/drf-urls.py
mmcclelland1002/django-auth-adfs
e716f9d8c1be7afcf67e3296f3d340a25a8f1810
[ "BSD-2-Clause" ]
117
2016-02-17T09:51:22.000Z
2021-01-14T09:02:02.000Z
django_auth_adfs/drf-urls.py
mmcclelland1002/django-auth-adfs
e716f9d8c1be7afcf67e3296f3d340a25a8f1810
[ "BSD-2-Clause" ]
56
2016-02-21T04:07:28.000Z
2021-01-14T07:42:17.000Z
# flake8: noqa import warnings warnings.warn( "drf-urls.py is not a valid module name and will be " "removed in a future version, use drf_urls.py instead", PendingDeprecationWarning )
22.1
59
0.728507
# flake8: noqa import warnings from .drf_urls import * warnings.warn( "drf-urls.py is not a valid module name and will be " "removed in a future version, use drf_urls.py instead", PendingDeprecationWarning )
0
0
0
0
0
0
0
2
22
b8c9b53e38c8d63cb97c7d6ff09045af00012ead
2,165
py
Python
nimses-adimate/android/screencap.py
GiantTreeLP/nimses-adimate
e3bac4780012b670be3f7b14cc5100e2545f0e58
[ "MIT" ]
5
2019-07-21T00:08:21.000Z
2021-04-21T23:13:58.000Z
nimses-adimate/android/screencap.py
GiantTreeLP/nimses-adimate
e3bac4780012b670be3f7b14cc5100e2545f0e58
[ "MIT" ]
3
2019-08-08T17:52:58.000Z
2019-08-25T20:36:20.000Z
nimses-adimate/android/screencap.py
GiantTreeLP/nimses-adimate
e3bac4780012b670be3f7b14cc5100e2545f0e58
[ "MIT" ]
null
null
null
import logging logger = logging.getLogger(__name__)
32.80303
115
0.637875
import logging import socket from concurrent.futures import Executor from time import time import cv2 import numpy as np from adbutils import AdbDevice from .raw_socket import send_raw logger = logging.getLogger(__name__) def screencap_raw(device: AdbDevice): start = time() buffer = send_raw(device, "frame...
0
0
0
0
0
1,868
0
16
225
d32dd05e45d4a97f6417af61b721892fec3ce4ad
4,699
py
Python
manual_test_phase.py
slimpotatoes/Holo_EM_magn_rev
84bfa4ab1d344fd3d04d33dd4153ebe6b707efb8
[ "BSD-3-Clause" ]
null
null
null
manual_test_phase.py
slimpotatoes/Holo_EM_magn_rev
84bfa4ab1d344fd3d04d33dd4153ebe6b707efb8
[ "BSD-3-Clause" ]
null
null
null
manual_test_phase.py
slimpotatoes/Holo_EM_magn_rev
84bfa4ab1d344fd3d04d33dd4153ebe6b707efb8
[ "BSD-3-Clause" ]
null
null
null
# Test of phase Module (Manual) import numpy as np import math as math import data as data import phase as phase import matplotlib.pyplot as plt ########################################################## # Test Difference of identical phase # 1 ########################################################## # Generate da...
37
103
0.746755
# Test of phase Module (Manual) import numpy as np import math as math import data as data import phase as phase import matplotlib.pyplot as plt import statistics ########################################################## # Test Difference of identical phase # 1 #######################################################...
0
0
0
0
0
0
0
-4
22
fb69a59361750e7a978d2d006b14c5727bcc5d1a
646
py
Python
tests/shared/TestIpv4Validator.py
svensp/hcloud_ocf
aff82e100187f84f04916752ea3c1f95805fc54b
[ "MIT" ]
9
2019-06-02T16:37:03.000Z
2021-11-25T13:54:59.000Z
tests/shared/TestIpv4Validator.py
svensp/hcloud_ocf
aff82e100187f84f04916752ea3c1f95805fc54b
[ "MIT" ]
9
2019-01-03T14:57:39.000Z
2021-02-08T12:28:58.000Z
tests/shared/TestIpv4Validator.py
svensp/hcloud_ocf
aff82e100187f84f04916752ea3c1f95805fc54b
[ "MIT" ]
5
2019-08-13T16:35:41.000Z
2021-11-18T13:43:53.000Z
#!/usr/bin/python3 import sys import os sys.path.append( os.path.dirname( os.path.realpath(__file__) ) + '/../..' ) import unittest if __name__ == '__main__': unittest.main()
25.84
75
0.668731
#!/usr/bin/python3 import sys import os sys.path.append( os.path.dirname( os.path.realpath(__file__) ) + '/../..' ) from shared import Ipv4Validator from common import Parameter import unittest import mock class TestTestHostFinder(unittest.TestCase): def test_validates_ipv4(self): ip = Parameter('ip') ...
0
0
0
368
0
0
0
8
90
831f25d2fa4d1737702566ad6b4f189f8980db4a
1,816
py
Python
_unittests/ut_td_1a/test_classique.py
mohamedelkansouli/Ensae_py
8bc867bd2081c259c793fadfa8be5dcc7bd1400b
[ "MIT" ]
null
null
null
_unittests/ut_td_1a/test_classique.py
mohamedelkansouli/Ensae_py
8bc867bd2081c259c793fadfa8be5dcc7bd1400b
[ "MIT" ]
null
null
null
_unittests/ut_td_1a/test_classique.py
mohamedelkansouli/Ensae_py
8bc867bd2081c259c793fadfa8be5dcc7bd1400b
[ "MIT" ]
null
null
null
""" @brief test log(time=1s) """ import sys import os import unittest try: import src except ImportError: path = os.path.normpath( os.path.abspath( os.path.join( os.path.split(__file__)[0], "..", ".."))) if path not in sys.path: ...
24.540541
106
0.595264
""" @brief test log(time=1s) """ import sys import os import unittest from datetime import datetime from pyquickhelper.loghelper import fLOG try: import src except ImportError: path = os.path.normpath( os.path.abspath( os.path.join( os.path.split(__file__)[0], ...
0
0
0
1,120
0
0
0
160
138
e808618cb7b31d99f35db8ba3b0a90fe6d9e417a
8,194
py
Python
NCS1/Classes/Data.py
AdamMiltonBarker/ALL-Detection-System-2019
d548aec257d89927a4e933c2487606bfbc64b02f
[ "MIT" ]
9
2018-11-25T02:13:12.000Z
2019-01-24T17:52:03.000Z
NCS1/Classes/Data.py
AdamMiltonBarker/ALL-Detection-System-2019
d548aec257d89927a4e933c2487606bfbc64b02f
[ "MIT" ]
5
2018-11-25T13:54:39.000Z
2018-12-23T22:15:03.000Z
NCS1/Classes/Data.py
AdamMiltonBarker/ALL-Detection-System-2019
d548aec257d89927a4e933c2487606bfbc64b02f
[ "MIT" ]
6
2019-05-05T15:38:34.000Z
2020-02-21T14:08:06.000Z
############################################################################################ # # Project: Peter Moss Acute Myeloid & Lymphoblastic Leukemia AI Research Project # Repository: ALL Detection System 2019 # Project: Facial Authentication Server # # Author: Adam Milton-Barker (AdamMilton...
35.318966
133
0.562729
############################################################################################ # # Project: Peter Moss Acute Myeloid & Lymphoblastic Leukemia AI Research Project # Repository: ALL Detection System 2019 # Project: Facial Authentication Server # # Author: Adam Milton-Barker (AdamMilton...
0
0
0
7,321
0
0
0
59
205
e3f9507871806531b8e8c9ee4673f9fcc5fbd87d
53,577
py
Python
Instrument_Turi_Project/venv/lib/python3.6/site-packages/mxnet/ndarray/gen_sparse.py
fozoglu/instrument-recognition
8cc14a481c2736c4ba55f48f00794684271d82cd
[ "MIT" ]
null
null
null
Instrument_Turi_Project/venv/lib/python3.6/site-packages/mxnet/ndarray/gen_sparse.py
fozoglu/instrument-recognition
8cc14a481c2736c4ba55f48f00794684271d82cd
[ "MIT" ]
null
null
null
Instrument_Turi_Project/venv/lib/python3.6/site-packages/mxnet/ndarray/gen_sparse.py
fozoglu/instrument-recognition
8cc14a481c2736c4ba55f48f00794684271d82cd
[ "MIT" ]
null
null
null
# File content is auto-generated. Do not modify. # pylint: skip-file from ..base import _Null def ElementWiseSum(*args, **kwargs): r"""Adds all input arguments element-wise. .. math:: add\_n(a_1, a_2, ..., a_n) = a_1 + a_2 + ... + a_n ``add_n`` is potentially more efficient than calling ``add`` by...
26.483935
602
0.60819
# File content is auto-generated. Do not modify. # pylint: skip-file from ._internal import NDArrayBase from ..base import _Null def ElementWiseSum(*args, **kwargs): r"""Adds all input arguments element-wise. .. math:: add\_n(a_1, a_2, ..., a_n) = a_1 + a_2 + ... + a_n ``add_n`` is potentially mor...
0
0
0
0
0
0
0
13
22
45e2384aaa2dcdf1e8cbcdbe1b60819efd424ddd
180
py
Python
addon/pycThermopack/pyctp/platform_specifics.py
Helarga/thermopack
2f9231c921b8133ccb41749ca4d7d6f57fe0ef44
[ "MIT" ]
28
2020-10-14T07:51:21.000Z
2022-03-21T04:59:23.000Z
addon/pycThermopack/pyctp/platform_specifics.py
Helarga/thermopack
2f9231c921b8133ccb41749ca4d7d6f57fe0ef44
[ "MIT" ]
20
2020-10-26T11:43:43.000Z
2022-03-30T22:06:30.000Z
addon/pycThermopack/pyctp/platform_specifics.py
morteham/thermopack
67deaf74a2ae974e880be25026738cc32e3a6c1e
[ "MIT" ]
13
2020-10-27T13:04:19.000Z
2022-03-21T04:59:24.000Z
# Module for platform specific stuff.
25.714286
72
0.838889
# Module for platform specific stuff. from . import map_platform_specifics def get_platform_specifics(): return map_platform_specifics.get_platform_specifics_from_platform()
0
0
0
0
0
81
0
15
45
1fa38135a0d19f9640d49eb49191283aaa77867e
4,216
py
Python
m2cpp.py
emc2norway/m2cpp
81943057c184c539b409282cbbd47bbf933db04f
[ "BSD-3-Clause" ]
28
2017-04-25T10:06:38.000Z
2022-02-09T07:25:34.000Z
m2cpp.py
emc2norway/m2cpp
81943057c184c539b409282cbbd47bbf933db04f
[ "BSD-3-Clause" ]
null
null
null
m2cpp.py
emc2norway/m2cpp
81943057c184c539b409282cbbd47bbf933db04f
[ "BSD-3-Clause" ]
5
2017-04-25T17:54:53.000Z
2022-03-21T20:15:15.000Z
#!/usr/bin/env python # PYTHON_ARGCOMPLETE_OK import argparse from textwrap import dedent from glob import glob import matlab2cpp hstring = "*** Matlab2cpp version " + str(matlab2cpp.__version__) + " ***\n\n" + """\ The toolbox frontend of the Matlab2cpp library. Use this to try to do automatic and semi-automatic tr...
40.152381
118
0.696157
#!/usr/bin/env python # PYTHON_ARGCOMPLETE_OK import argparse from textwrap import dedent from glob import glob import matlab2cpp hstring = "*** Matlab2cpp version " + str(matlab2cpp.__version__) + " ***\n\n" + """\ The toolbox frontend of the Matlab2cpp library. Use this to try to do automatic and semi-automatic tr...
0
0
0
0
0
0
0
0
0
c656ec934e368eacdd0825f8fd6b30c88276fee3
5,075
py
Python
biggan_discovery/hessian_penalty.py
andreasjansson/OroJaR
ebb8c0333bbd33c063b6dd4a21a0559eb86d13e9
[ "BSD-2-Clause" ]
199
2020-08-25T00:39:19.000Z
2022-03-03T09:00:46.000Z
biggan_discovery/hessian_penalty.py
andreasjansson/OroJaR
ebb8c0333bbd33c063b6dd4a21a0559eb86d13e9
[ "BSD-2-Clause" ]
2
2020-08-28T04:38:25.000Z
2021-09-16T06:53:04.000Z
biggan_discovery/hessian_penalty.py
andreasjansson/OroJaR
ebb8c0333bbd33c063b6dd4a21a0559eb86d13e9
[ "BSD-2-Clause" ]
22
2020-08-25T08:46:51.000Z
2022-01-03T14:20:27.000Z
import torch def rademacher(shape, gpu=True): """ Creates a random tensor of size [shape] under the Rademacher distribution (P(x=1) == P(x=-1) == 0.5) """ x = torch.empty(shape) if gpu: x = x.cuda() x.random_(0, 2) x[x == 0] = -1 return x def second_directional_derivative(G, ...
44.517544
119
0.652808
import torch def rademacher(shape, gpu=True): """ Creates a random tensor of size [shape] under the Rademacher distribution (P(x=1) == P(x=-1) == 0.5) """ x = torch.empty(shape) if gpu: x = x.cuda() x.random_(0, 2) x[x == 0] = -1 return x def second_directional_derivative(G, ...
0
0
0
0
0
1,241
0
0
69
816bf89da47faf24ec8824adc1c762d92b8d7bc5
4,221
py
Python
t/unit/asynchronous/http/test_http.py
CountRedClaw/kombu
14d395aa859b905874d8b4abd677a4c7ac86e10b
[ "BSD-3-Clause" ]
null
null
null
t/unit/asynchronous/http/test_http.py
CountRedClaw/kombu
14d395aa859b905874d8b4abd677a4c7ac86e10b
[ "BSD-3-Clause" ]
null
null
null
t/unit/asynchronous/http/test_http.py
CountRedClaw/kombu
14d395aa859b905874d8b4abd677a4c7ac86e10b
[ "BSD-3-Clause" ]
null
null
null
from __future__ import annotations
27.057692
75
0.614309
from __future__ import annotations from io import BytesIO from unittest.mock import Mock import pytest from vine import promise import t.skip from kombu.asynchronous import http from kombu.asynchronous.http.base import BaseClient, normalize_header from kombu.exceptions import HttpError from t.mocks import PromiseMoc...
0
1,888
0
1,891
0
0
0
86
316
d87e43b6491c4f731ff2ee4f47b555a2d95633c4
6,237
py
Python
burger/toppings/sounds.py
mat-1/Burger
80f12b6c09d4f6781ec766c4d0790847805b051f
[ "MIT" ]
113
2015-03-10T03:10:16.000Z
2022-01-19T12:26:35.000Z
burger/toppings/sounds.py
mat-1/Burger
80f12b6c09d4f6781ec766c4d0790847805b051f
[ "MIT" ]
29
2016-03-06T18:56:59.000Z
2022-02-06T19:36:30.000Z
burger/toppings/sounds.py
mat-1/Burger
80f12b6c09d4f6781ec766c4d0790847805b051f
[ "MIT" ]
23
2015-03-10T04:51:51.000Z
2021-12-16T12:43:48.000Z
#!/usr/bin/env python # -*- coding: utf8 -*- """ Copyright (c) 2011 Tyler Kenendy <tk@tkte.ch> 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...
38.030488
100
0.575116
#!/usr/bin/env python # -*- coding: utf8 -*- """ Copyright (c) 2011 Tyler Kenendy <tk@tkte.ch> 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...
0
4,025
0
315
0
0
0
14
114
a2a6d2c66b50c18623dd7b11cffa422c1a64fba5
14,034
py
Python
pipelines/toast_ground_sim_simple.py
giuspugl/toast
4ab2873467d9e02b70901f45ac663f89a8bac1b3
[ "BSD-2-Clause" ]
1
2020-06-09T15:11:02.000Z
2020-06-09T15:11:02.000Z
pipelines/toast_ground_sim_simple.py
giuspugl/toast
4ab2873467d9e02b70901f45ac663f89a8bac1b3
[ "BSD-2-Clause" ]
null
null
null
pipelines/toast_ground_sim_simple.py
giuspugl/toast
4ab2873467d9e02b70901f45ac663f89a8bac1b3
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2015-2020 by the parties listed in the AUTHORS file. # All rights reserved. Use of this source code is governed by # a BSD-style license that can be found in the LICENSE file. """ Simpler version of the ground simulation script """ import sys import traceback from toast.mpi im...
28.294355
87
0.608308
#!/usr/bin/env python3 # Copyright (c) 2015-2020 by the parties listed in the AUTHORS file. # All rights reserved. Use of this source code is governed by # a BSD-style license that can be found in the LICENSE file. """ Simpler version of the ground simulation script """ import argparse import dateutil.parser import...
0
0
0
0
0
8,008
0
800
272
abec02c390148730d0ab72efb05642ec6bb9ec61
235
py
Python
argparsetools/types/datetimes.py
Lukisn/argparsetools
b02a42ef3aa51bc4d68c8d0433e6306a7a685192
[ "MIT" ]
1
2019-07-31T15:14:30.000Z
2019-07-31T15:14:30.000Z
argparsetools/types/datetimes.py
Lukisn/argparsetools
b02a42ef3aa51bc4d68c8d0433e6306a7a685192
[ "MIT" ]
null
null
null
argparsetools/types/datetimes.py
Lukisn/argparsetools
b02a42ef3aa51bc4d68c8d0433e6306a7a685192
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Type checking functions for datetime related types for use with arparse."""
23.5
78
0.748936
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Type checking functions for datetime related types for use with arparse.""" from argparse import ArgumentTypeError def datetime_string(string, format): raise NotImplementedError
0
0
0
0
0
45
0
17
46
6377fd6481d1fb580855eaf03c8de68704f1a558
32,167
py
Python
pyhpeimc/plat/device.py
HPNetworking/HP-Intelligent-Management-Center
4fba31827573587e03a6233c7db60f188038c8e5
[ "Apache-2.0" ]
13
2016-03-14T17:55:03.000Z
2021-03-26T07:18:26.000Z
pyhpeimc/plat/device.py
HPNetworking/HP-Intelligent-Management-Center
4fba31827573587e03a6233c7db60f188038c8e5
[ "Apache-2.0" ]
7
2016-08-04T17:39:11.000Z
2017-09-19T13:42:35.000Z
pyhpeimc/plat/device.py
HPNetworking/HP-Intelligent-Management-Center
4fba31827573587e03a6233c7db60f188038c8e5
[ "Apache-2.0" ]
17
2016-03-03T05:24:20.000Z
2022-03-10T08:16:31.000Z
#!/usr/bin/env python3 # coding=utf-8 # author: @netmanchris # -*- coding: utf-8 -*- """ This module contains functions for working with the device capabilities of the HPE IMC NMS platform using the RESTful API """ # This section imports required libraries import json import requests from pyhpeimc.auth import HEADE...
35.940782
120
0.661641
#!/usr/bin/env python3 # coding=utf-8 # author: @netmanchris # -*- coding: utf-8 -*- """ This module contains functions for working with the device capabilities of the HPE IMC NMS platform using the RESTful API """ # This section imports required libraries import json import requests from pyhpeimc.auth import HEADE...
0
0
0
0
0
31
0
0
23
bf396846a675bc0ea10ca6db7a5c883da3aa26e8
1,432
py
Python
Libraries_Benchmark/Normally_distributed_dataset_experiments/Code/Python/openmined_pydp.py
gonzalo-munillag/Benchmarking_Differential_Privacy_Analytics_Libraries
eb0aaa38686812112d421085b0b61fa9880c4f87
[ "MIT" ]
null
null
null
Libraries_Benchmark/Normally_distributed_dataset_experiments/Code/Python/openmined_pydp.py
gonzalo-munillag/Benchmarking_Differential_Privacy_Analytics_Libraries
eb0aaa38686812112d421085b0b61fa9880c4f87
[ "MIT" ]
null
null
null
Libraries_Benchmark/Normally_distributed_dataset_experiments/Code/Python/openmined_pydp.py
gonzalo-munillag/Benchmarking_Differential_Privacy_Analytics_Libraries
eb0aaa38686812112d421085b0b61fa9880c4f87
[ "MIT" ]
null
null
null
import pandas as pd epsilon = pd.read_pickle('epsilon.pkl') library_name = 'pydp'
39.777778
203
0.643156
from pydp.algorithms import laplacian as dp import numpy as np import pandas as pd import time import os import psutil from utils import * epsilon = pd.read_pickle('epsilon.pkl') library_name = 'pydp' def openmind_pydp_single_query(dataset_folder_path, number_of_csv_files, query_name, number_of_experiments): f...
0
0
0
0
0
1,190
0
-13
156
0225cd4a747f7101c950fab541053c3f752e28e5
1,372
py
Python
nsist/tests/test_main.py
bastimeyer/pynsist
ca4c2cea9c0c1eba277d9cd79f30eb61ac0951de
[ "MIT" ]
null
null
null
nsist/tests/test_main.py
bastimeyer/pynsist
ca4c2cea9c0c1eba277d9cd79f30eb61ac0951de
[ "MIT" ]
null
null
null
nsist/tests/test_main.py
bastimeyer/pynsist
ca4c2cea9c0c1eba277d9cd79f30eb61ac0951de
[ "MIT" ]
null
null
null
from pathlib import Path from .utils import test_dir example_dir = Path(test_dir, 'console_example')
30.488889
79
0.684402
import io from pathlib import Path import re import responses from shutil import copy from testpath import MockCommand, modified_env, assert_isfile, assert_isdir from testpath.tempdir import TemporaryWorkingDirectory from zipfile import ZipFile from nsist import main from nsist.util import CACHE_ENV_VAR from .utils im...
0
805
0
0
0
138
0
82
245
dfd4bbbd85d05603f82476217937f7f0a8d5a223
8,019
py
Python
magni/utils/config.py
SIP-AAU/Magni
6328dc98a273506f433af52e6bd394754a844550
[ "BSD-2-Clause" ]
42
2015-02-09T10:17:26.000Z
2021-12-21T09:38:04.000Z
magni/utils/config.py
SIP-AAU/Magni
6328dc98a273506f433af52e6bd394754a844550
[ "BSD-2-Clause" ]
3
2015-03-20T12:00:40.000Z
2015-03-20T12:01:16.000Z
magni/utils/config.py
SIP-AAU/Magni
6328dc98a273506f433af52e6bd394754a844550
[ "BSD-2-Clause" ]
14
2015-04-28T03:08:32.000Z
2021-07-24T13:29:24.000Z
""" .. Copyright (c) 2014-2017, Magni developers. All rights reserved. See LICENSE.rst for further information. Module providing a robust configger class. Routine listings ---------------- Configger(object) Provide functionality to access a set of configuration options. Notes ----- This module does n...
25.538217
79
0.56416
""" .. Copyright (c) 2014-2017, Magni developers. All rights reserved. See LICENSE.rst for further information. Module providing a robust configger class. Routine listings ---------------- Configger(object) Provide functionality to access a set of configuration options. Notes ----- This module does n...
0
1,057
0
6,142
0
0
0
187
134
238c4fbb86fe849ff908da43f3497e8471d121f4
217
py
Python
examples/grouped_boxplot.py
PhilipeRLeal/seaborn
c1b49102b0b38223fd5cf9811427368250b586a2
[ "MIT", "BSD-3-Clause" ]
3
2016-01-25T16:54:25.000Z
2020-05-01T15:15:30.000Z
examples/grouped_boxplot.py
PureW/seaborn
f400d86002c6d4b2d67eb9740adad908e84f8328
[ "MIT", "BSD-3-Clause" ]
1
2021-06-23T16:40:53.000Z
2021-06-23T16:40:53.000Z
examples/grouped_boxplot.py
PureW/seaborn
f400d86002c6d4b2d67eb9740adad908e84f8328
[ "MIT", "BSD-3-Clause" ]
2
2019-04-02T19:52:25.000Z
2021-07-06T21:17:27.000Z
""" Grouped boxplots ================ """ import seaborn as sns sns.set(style="ticks") tips = sns.load_dataset("tips") sns.boxplot("day", "total_bill", "sex", tips, palette="PRGn") sns.despine(offset=10, trim=True)
18.083333
61
0.640553
""" Grouped boxplots ================ """ import seaborn as sns sns.set(style="ticks") tips = sns.load_dataset("tips") sns.boxplot("day", "total_bill", "sex", tips, palette="PRGn") sns.despine(offset=10, trim=True)
0
0
0
0
0
0
0
0
0
380c4076778a5b91bf6b65e5d942d1230724a161
2,529
py
Python
plugins/polio/admin.py
BLSQ/iaso-copy
85fb17f408c15e8c2d730416d1312f58f8db39b7
[ "MIT" ]
null
null
null
plugins/polio/admin.py
BLSQ/iaso-copy
85fb17f408c15e8c2d730416d1312f58f8db39b7
[ "MIT" ]
null
null
null
plugins/polio/admin.py
BLSQ/iaso-copy
85fb17f408c15e8c2d730416d1312f58f8db39b7
[ "MIT" ]
1
2022-03-23T16:44:12.000Z
2022-03-23T16:44:12.000Z
from django.contrib import admin from .models import (Campaign, Preparedness, Surge, Round, Config, CountryUsersGroup, URLCache, SpreadSheetImport, LQASIMCache, IMStatsCache) admin.site.register(Campaign, CampaignAdmin) admin.site.register(Preparedness, PreparednessAdmin) admin.site.register(Config) admin.site.re...
30.107143
100
0.596283
import gspread.utils from django.contrib import admin from django.utils.safestring import mark_safe from .models import ( Campaign, Preparedness, Surge, Round, Config, CountryUsersGroup, URLCache, SpreadSheetImport, LQASIMCache, IMStatsCache, ) class CampaignAdmin(admin.ModelA...
0
0
0
1,790
0
0
0
66
113
8d43939abe7f45a191c9e77b134e484966644ca2
593
py
Python
readframe.py
trungbanh/hand_dance
b4e985eaf94fa3f27b61b3f9697e006a56e3604a
[ "Apache-2.0" ]
null
null
null
readframe.py
trungbanh/hand_dance
b4e985eaf94fa3f27b61b3f9697e006a56e3604a
[ "Apache-2.0" ]
null
null
null
readframe.py
trungbanh/hand_dance
b4e985eaf94fa3f27b61b3f9697e006a56e3604a
[ "Apache-2.0" ]
null
null
null
import cv2 def read(path, video): """ @get path, video as string @return void """ realpath = path + video i = 0 myvideo = cv2.VideoCapture(realpath) while(myvideo.isOpened()): ret, frame = myvideo.read() i += 1 cv2.imshow('frame', frame) if (c...
19.129032
53
0.532884
import cv2 def read(path, video): """ @get path, video as string @return void """ realpath = path + video i = 0 myvideo = cv2.VideoCapture(realpath) while(myvideo.isOpened()): ret, frame = myvideo.read() i += 1 cv2.imshow('frame', frame) if (c...
0
0
0
0
0
0
0
0
0
c4865c0d2e04d02b69cca31241d7c4b1b2c9cb5e
10,597
py
Python
balloon_learning_environment/agents/quantile_agent.py
taodav/balloon-learning-environment
4beb45f52ab7127a4c051df25894738420e8e691
[ "Apache-2.0" ]
null
null
null
balloon_learning_environment/agents/quantile_agent.py
taodav/balloon-learning-environment
4beb45f52ab7127a4c051df25894738420e8e691
[ "Apache-2.0" ]
null
null
null
balloon_learning_environment/agents/quantile_agent.py
taodav/balloon-learning-environment
4beb45f52ab7127a4c051df25894738420e8e691
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2021 The Balloon Learning Environment 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 require...
41.556863
103
0.670567
# coding=utf-8 # Copyright 2021 The Balloon Learning Environment 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 require...
0
9,292
0
0
0
0
0
239
388
1aaabbb6aefc564f534c47a529184a713858f26b
10,446
py
Python
scripts/preprocess.py
edwardoughton/globalsat
f4d53e94eb54f939a6afa816810ba1ff5bbf83cf
[ "MIT" ]
6
2021-09-07T13:32:28.000Z
2022-03-30T21:32:17.000Z
scripts/preprocess.py
edwardoughton/globalsat
f4d53e94eb54f939a6afa816810ba1ff5bbf83cf
[ "MIT" ]
null
null
null
scripts/preprocess.py
edwardoughton/globalsat
f4d53e94eb54f939a6afa816810ba1ff5bbf83cf
[ "MIT" ]
null
null
null
""" Process settlement layer Written by Ed Oughton. December 2020 """ import os import configparser import json import pandas as pd import geopandas as gpd import pyproj from shapely.geometry import MultiPolygon from shapely.ops import transform import rasterio from rasterio.mask import mask from rasterstats import ...
26.716113
93
0.645319
""" Process settlement layer Written by Ed Oughton. December 2020 """ import os import configparser import json import math import glob import numpy as np import pandas as pd import geopandas as gpd import pyproj from shapely.geometry import Point, LineString, Polygon, MultiPolygon, shape, mapping, box from shapely....
0
0
0
0
0
0
0
127
88
c2947a27a4fe3fa1fdbb5b79bc22f70941807f2d
373
py
Python
scripts/plot_hists.py
jrekoske/reduced-order-shaking
cd01ef9d6a313a06d2083d7dcb1cc59cb767cc47
[ "MIT" ]
null
null
null
scripts/plot_hists.py
jrekoske/reduced-order-shaking
cd01ef9d6a313a06d2083d7dcb1cc59cb767cc47
[ "MIT" ]
null
null
null
scripts/plot_hists.py
jrekoske/reduced-order-shaking
cd01ef9d6a313a06d2083d7dcb1cc59cb767cc47
[ "MIT" ]
null
null
null
fig, axes = plt.subplots(nrows=1, ncols=3, figsize=(9, 3)) cols = ['vp', 'vs', 'rho'] labels = ['$V_p$ (m/s)', '$V_s$ (m/s)', 'Density (kg/m$^3$)'] for i, ax in enumerate(axes): ax.hist(df[cols[i]], density=True, edgecolor='k', linewidth=0.5) ax.set_xlabel(labels[i]) ax.set_ylabel('Probability') plt.tight_l...
33.909091
68
0.627346
fig, axes = plt.subplots(nrows=1, ncols=3, figsize=(9, 3)) cols = ['vp', 'vs', 'rho'] labels = ['$V_p$ (m/s)', '$V_s$ (m/s)', 'Density (kg/m$^3$)'] for i, ax in enumerate(axes): ax.hist(df[cols[i]], density=True, edgecolor='k', linewidth=0.5) ax.set_xlabel(labels[i]) ax.set_ylabel('Probability') plt.tight_l...
0
0
0
0
0
0
0
0
0
bc70228e599dcf695ef31aae0d14d06e8973a735
4,059
py
Python
breadthanalysis.py
oxym/honeypot_analysis
7b2d00f935a3012e235bcf01e9fd9ee8450bd1a0
[ "MIT" ]
null
null
null
breadthanalysis.py
oxym/honeypot_analysis
7b2d00f935a3012e235bcf01e9fd9ee8450bd1a0
[ "MIT" ]
null
null
null
breadthanalysis.py
oxym/honeypot_analysis
7b2d00f935a3012e235bcf01e9fd9ee8450bd1a0
[ "MIT" ]
null
null
null
import json from functools import reduce from operator import itemgetter from ip2loc import ip2loc_bulk from funcs import count_occurence, folding, get_timestamp, get_unique_values LOG_FILE_PATH = 'honey.log' COUNTRY_STAT_HEADER_FORMAT = '{:<25s}\t{:<10s}\t{:<12s}' COUNTRY_STAT_FORMAT = '{:<25s}\t{:<10d}\t{:<1...
43.180851
160
0.703868
import re import json from functools import reduce from operator import itemgetter from ip2loc import ip2loc, ip2loc_bulk from funcs import count_occurence, folding, get_events_before_timestamp, get_timestamp, get_first_timestamp, get_unique_values LOG_FILE_PATH = 'honey.log' COUNTRY_STAT_HEADER_FORMAT = '{:<2...
0
0
0
0
0
47
0
46
48
461d2fc40a4ede7edcebc5d960da4388fa3abe0e
9,504
py
Python
LL_RR_faceAligner.py
keshariS/FacialAsymmetry
8686f914c1af019b6dcb1484c4feace7fbfdcc09
[ "MIT" ]
null
null
null
LL_RR_faceAligner.py
keshariS/FacialAsymmetry
8686f914c1af019b6dcb1484c4feace7fbfdcc09
[ "MIT" ]
null
null
null
LL_RR_faceAligner.py
keshariS/FacialAsymmetry
8686f914c1af019b6dcb1484c4feace7fbfdcc09
[ "MIT" ]
null
null
null
from imutils import face_utils from imutils.face_utils import FaceAligner import numpy as np import imutils import dlib import cv2 from skimage.metrics import structural_similarity as ssim #import os #import time import tkinter as tk from pandas import DataFrame #import pandas as pd import matplotlib.pyplot as plt fro...
40.965517
148
0.650779
from imutils import face_utils from imutils.face_utils import FaceAligner import numpy as np import imutils import dlib import cv2 from skimage.metrics import structural_similarity as ssim #import os import glob #import time from tkinter import * import tkinter as tk from tkinter import filedialog from pandas import D...
0
0
0
0
0
2,220
0
-1
89
03b789ec8ee0e70dbab1e3e6a321e2b1b04b9baa
453
py
Python
talk_like/scraper.py
devacto/talk_like
52b8864255c21d131f9414b7755a7aa21ed63d2e
[ "Apache-2.0" ]
null
null
null
talk_like/scraper.py
devacto/talk_like
52b8864255c21d131f9414b7755a7aa21ed63d2e
[ "Apache-2.0" ]
2
2021-09-28T05:42:28.000Z
2022-02-26T10:28:38.000Z
talk_like/scraper.py
devacto/talk_like
52b8864255c21d131f9414b7755a7aa21ed63d2e
[ "Apache-2.0" ]
null
null
null
# AUTOGENERATED! DO NOT EDIT! File to edit: 00_scraper.ipynb (unless otherwise specified). __all__ = ['Scraper', 'print_something'] # Cell # Cell # Cell
20.590909
90
0.739514
# AUTOGENERATED! DO NOT EDIT! File to edit: 00_scraper.ipynb (unless otherwise specified). __all__ = ['Scraper', 'print_something'] # Cell class Scraper: def __init__(self, username=''): self.username = username # Cell from fastcore.foundation import patch from facebook_scraper import get_posts @patch ...
0
59
0
63
0
29
0
33
113
611d47a1836149111477e7f762985ba05e3cb24d
8,027
py
Python
tests/framework_starlette/test_application.py
Sybret/newrelic-python-agent
ca208ec0ab916dffceb225794acb032d22815899
[ "Apache-2.0" ]
null
null
null
tests/framework_starlette/test_application.py
Sybret/newrelic-python-agent
ca208ec0ab916dffceb225794acb032d22815899
[ "Apache-2.0" ]
null
null
null
tests/framework_starlette/test_application.py
Sybret/newrelic-python-agent
ca208ec0ab916dffceb225794acb032d22815899
[ "Apache-2.0" ]
null
null
null
# Copyright 2010 New Relic, 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 applicable law or agreed to in writ...
39.737624
167
0.749969
# Copyright 2010 New Relic, 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 applicable law or agreed to in writ...
0
6,536
0
0
0
0
0
145
274
f17a9dc7dd89f46e01de769ee41ea37985d718e1
211
py
Python
snippets/Jira Rest API Consumer/main.py
keremkoseoglu/Python-Library
f66ab246da4eabea94596494cf2bc9b416b65b1d
[ "MIT" ]
3
2018-06-28T07:09:04.000Z
2019-03-04T14:43:52.000Z
snippets/Jira Rest API Consumer/main.py
keremkoseoglu/Python-Library
f66ab246da4eabea94596494cf2bc9b416b65b1d
[ "MIT" ]
null
null
null
snippets/Jira Rest API Consumer/main.py
keremkoseoglu/Python-Library
f66ab246da4eabea94596494cf2bc9b416b65b1d
[ "MIT" ]
5
2018-06-28T07:12:28.000Z
2021-06-03T18:20:21.000Z
import jira __URL = "http://jira.example.com" __USER = "my_user" __PASS = "my_pass" __ISSUE = "VOL-1234" my_jira = jira.Jira(__URL, __USER, __PASS) my_issue = my_jira.get_issue(__ISSUE) print(my_issue.summary)
21.1
42
0.739336
import jira __URL = "http://jira.example.com" __USER = "my_user" __PASS = "my_pass" __ISSUE = "VOL-1234" my_jira = jira.Jira(__URL, __USER, __PASS) my_issue = my_jira.get_issue(__ISSUE) print(my_issue.summary)
0
0
0
0
0
0
0
0
0
d1d4046c56da08fd4fd832b87470ceb2640e55da
5,105
py
Python
backend/app/routers/videos.py
jcwillox/deeplabcut-webui
6cdf6c33486f416551172a3285919dff3b6a8b90
[ "MIT" ]
null
null
null
backend/app/routers/videos.py
jcwillox/deeplabcut-webui
6cdf6c33486f416551172a3285919dff3b6a8b90
[ "MIT" ]
1
2022-03-20T02:04:24.000Z
2022-03-20T02:04:24.000Z
backend/app/routers/videos.py
jcwillox/deeplabcut-webui
6cdf6c33486f416551172a3285919dff3b6a8b90
[ "MIT" ]
null
null
null
from fastapi import APIRouter router = APIRouter()
31.319018
80
0.687953
import os from typing import List import cv2 from fastapi import APIRouter, Depends, HTTPException, status from fastapi.requests import Request from fastapi.responses import FileResponse from natsort import os_sorted from pydantic import BaseModel, validator from .projects import ProjectType from ..config import Sett...
0
4,034
0
267
0
0
0
198
542
a0c69bef70fb2b54318bf150b6bf9daab3eb791e
378
py
Python
Deprecated/GGP/kif/R03_mod/test.py
sleyzerzon/soar
74a6f32ba1be3a7b3ed4eac0b44b0f4b2e981f71
[ "Unlicense" ]
1
2016-04-01T04:02:28.000Z
2016-04-01T04:02:28.000Z
Deprecated/GGP/kif/R03_mod/test.py
sleyzerzon/soar
74a6f32ba1be3a7b3ed4eac0b44b0f4b2e981f71
[ "Unlicense" ]
null
null
null
Deprecated/GGP/kif/R03_mod/test.py
sleyzerzon/soar
74a6f32ba1be3a7b3ed4eac0b44b0f4b2e981f71
[ "Unlicense" ]
null
null
null
r = range(8) for x in r: for y in r: for x1 in r: if x < x1: print '(nCell %d east %d %d %d %d)' % (x1-x, x, y, x1, y) elif x > x1: print '(nCell %d west %d %d %d %d)' % (x-x1, x, y, x1, y) for y1 in r: if y < y1: print '(nCell %d south %d %d %d %d)' % (y1-y, x, y, x, y1) elif y > y1: p...
27
62
0.452381
r = range(8) for x in r: for y in r: for x1 in r: if x < x1: print '(nCell %d east %d %d %d %d)' % (x1-x, x, y, x1, y) elif x > x1: print '(nCell %d west %d %d %d %d)' % (x-x1, x, y, x1, y) for y1 in r: if y < y1: print '(nCell %d south %d %d %d %d)' % (y1-y, x, y, x, y1) elif y > y1: p...
0
0
0
0
0
0
0
0
0
6e1d744d3f6560c3f69b8910a8293effeb2a32fc
1,963
py
Python
examples/responses/lst_kml.py
nkoshell/iss-positioner
a8222e31394f232f1b6aef2b9c79304d8ccd6e12
[ "MIT" ]
null
null
null
examples/responses/lst_kml.py
nkoshell/iss-positioner
a8222e31394f232f1b6aef2b9c79304d8ccd6e12
[ "MIT" ]
1
2021-03-25T22:13:30.000Z
2021-03-25T22:13:30.000Z
examples/responses/lst_kml.py
nkoshell/iss-positioner
a8222e31394f232f1b6aef2b9c79304d8ccd6e12
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import json from datetime import datetime, timedelta URL = 'http://iss-positioner.nkoshelev.tech/lst' NOW = datetime.utcnow() PARAMS = dict(start_dt=NOW.isoformat(), end_dt=(NOW + timedelta(days=21)).isoformat(), dist='250', units='km', s...
30.671875
115
0.527254
# -*- coding: utf-8 -*- import json from datetime import datetime, timedelta import requests import lxml from pykml.factory import KML_ElementMaker as KML URL = 'http://iss-positioner.nkoshelev.tech/lst' NOW = datetime.utcnow() PARAMS = dict(start_dt=NOW.isoformat(), end_dt=(NOW + timedelta(days=21)).i...
0
0
0
0
0
1,389
0
12
113
0ef6f4cf9f99c15e487d9d9c4ca0ea1d83727ba6
1,571
py
Python
main.py
juliaaz/Naibe-Bayes-Classifier
eff29b5fbaa40ff09c71577e89aa9d07c3a727f9
[ "MIT" ]
null
null
null
main.py
juliaaz/Naibe-Bayes-Classifier
eff29b5fbaa40ff09c71577e89aa9d07c3a727f9
[ "MIT" ]
null
null
null
main.py
juliaaz/Naibe-Bayes-Classifier
eff29b5fbaa40ff09c71577e89aa9d07c3a727f9
[ "MIT" ]
null
null
null
""" Module for implementation Naive Bayes Classifier. """ import string from collections import Counter import pandas as pd from nltk.corpus import stopwords from nltk.tokenize import word_tokenize def process_data(data_file): """ Function for data processing and split it into X and y sets. :param data_fi...
29.092593
110
0.668364
""" Module for implementation Naive Bayes Classifier. """ import string from collections import Counter from typing import Dict from bayesian_classifier import * import pandas as pd from nltk.corpus import stopwords from nltk.tokenize import word_tokenize def process_data(data_file): """ Function for data pro...
0
0
0
0
0
0
0
14
44
02426620c8822e20a9020af67111430a424e28d7
15,007
py
Python
lib/query.py
vitalif/viewvc-4intranet
3c1cfef827ce3841fd10769f28f2e9f2117ba7fc
[ "BSD-2-Clause" ]
2
2015-04-03T14:15:48.000Z
2019-08-06T07:09:58.000Z
lib/query.py
vitalif/viewvc-4intranet
3c1cfef827ce3841fd10769f28f2e9f2117ba7fc
[ "BSD-2-Clause" ]
null
null
null
lib/query.py
vitalif/viewvc-4intranet
3c1cfef827ce3841fd10769f28f2e9f2117ba7fc
[ "BSD-2-Clause" ]
1
2022-01-11T13:02:46.000Z
2022-01-11T13:02:46.000Z
#!/usr/bin/env python # -*-python-*- # # Copyright (C) 1999-2013 The ViewCVS Group. All Rights Reserved. # # By using this file, you agree to the terms and conditions set forth in # the LICENSE.html file which can be found at the top level of the ViewVC # distribution or at http://viewvc.org/license-1.html. # # For mor...
30.317172
87
0.540548
#!/usr/bin/env python # -*-python-*- # # Copyright (C) 1999-2013 The ViewCVS Group. All Rights Reserved. # # By using this file, you agree to the terms and conditions set forth in # the LICENSE.html file which can be found at the top level of the ViewVC # distribution or at http://viewvc.org/license-1.html. # # For mor...
0
0
0
2,165
0
9,967
0
-69
387
5467ab58572e20cc133937491512034c881f8ee9
383
py
Python
vendor-local/src/django-piston/piston/__init__.py
jlin/inventory
c098c98e570c3bf9fadfd811eb75e1213f6ea428
[ "BSD-3-Clause" ]
22
2015-01-16T01:36:32.000Z
2020-06-08T00:46:18.000Z
vendor-local/src/django-piston/piston/__init__.py
jlin/inventory
c098c98e570c3bf9fadfd811eb75e1213f6ea428
[ "BSD-3-Clause" ]
9
2019-03-15T11:39:32.000Z
2019-04-30T00:59:50.000Z
vendor-local/src/django-piston/piston/__init__.py
jlin/inventory
c098c98e570c3bf9fadfd811eb75e1213f6ea428
[ "BSD-3-Clause" ]
13
2015-01-13T20:56:22.000Z
2022-02-23T06:01:17.000Z
try: import pkg_resources pkg_resources.declare_namespace(__name__) except ImportError: # don't prevent use of paste if pkg_resources isn't installed from pkgutil import extend_path __path__ = extend_path(__path__, __name__) try: import modulefinder except ImportError: pass else: for p...
23.9375
65
0.741514
try: import pkg_resources pkg_resources.declare_namespace(__name__) except ImportError: # don't prevent use of paste if pkg_resources isn't installed from pkgutil import extend_path __path__ = extend_path(__path__, __name__) try: import modulefinder except ImportError: pass else: for p...
0
0
0
0
0
0
0
0
0
044c29dfd4938e9d3a0b918cff044b0eb8475e97
14,797
py
Python
metro.py
Vicmart1/metro.css
0a8aab2e322f1287d41a05762c70b16daed48d85
[ "FSFAP" ]
null
null
null
metro.py
Vicmart1/metro.css
0a8aab2e322f1287d41a05762c70b16daed48d85
[ "FSFAP" ]
null
null
null
metro.py
Vicmart1/metro.css
0a8aab2e322f1287d41a05762c70b16daed48d85
[ "FSFAP" ]
null
null
null
import sys central_line = [] #-----------------------# if len(sys.argv) < 3: error("Usage: python metro.py [read file] [write file]") f = open(sys.argv[2],'w') f.write("<html><head><style>@font-face { font-family: KeepCalm; src: url(http://ff.static.1001fonts.net/k/e/keep-calm.regular.ttf); } html { overflow-x...
106.453237
7,870
0.635399
import sys central_line = [] def drawLine(line, f): global central_line data_points = line.split(":") if len(data_points) > 1: f.write("<div class='center' style='height:" + data_points[len(data_points) - 1][:-1] + "px'>") color = "background:" + central_line[1] css = "" if len(d...
0
0
0
0
0
4,793
0
0
138
56d00e9ea4255959b91186ed8950e53e4f5cf101
2,873
py
Python
neo4j/work/query.py
matilda-me/neo4j-python-driver
4fb25a266841bf2a861f00d5dcf257bd5ae5c686
[ "Apache-2.0" ]
null
null
null
neo4j/work/query.py
matilda-me/neo4j-python-driver
4fb25a266841bf2a861f00d5dcf257bd5ae5c686
[ "Apache-2.0" ]
null
null
null
neo4j/work/query.py
matilda-me/neo4j-python-driver
4fb25a266841bf2a861f00d5dcf257bd5ae5c686
[ "Apache-2.0" ]
null
null
null
# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. # # 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...
36.833333
217
0.695092
# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. # # 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...
0
0
0
424
0
165
0
0
50
8c4fe0837a9374641799001ce8bab8594ee46fcc
2,567
py
Python
.local/share/OpenSCAD/libraries/NopSCADlib/scripts/set_config.py
IlyaMZP/dotfiles
b55e0cd63117c09778ea917b02313da74f7c1067
[ "MIT" ]
null
null
null
.local/share/OpenSCAD/libraries/NopSCADlib/scripts/set_config.py
IlyaMZP/dotfiles
b55e0cd63117c09778ea917b02313da74f7c1067
[ "MIT" ]
null
null
null
.local/share/OpenSCAD/libraries/NopSCADlib/scripts/set_config.py
IlyaMZP/dotfiles
b55e0cd63117c09778ea917b02313da74f7c1067
[ "MIT" ]
null
null
null
#!/usr/bin/env python # # NopSCADlib Copyright Chris Palmer 2018 # nop.head@gmail.com # hydraraptor.blogspot.com # # This file is part of NopSCADlib. # # NopSCADlib is free software: you can redistribute it and/or modify it under the terms of the # GNU General Public License as published by the Free Software Foundatio...
27.021053
106
0.618231
#!/usr/bin/env python # # NopSCADlib Copyright Chris Palmer 2018 # nop.head@gmail.com # hydraraptor.blogspot.com # # This file is part of NopSCADlib. # # NopSCADlib is free software: you can redistribute it and/or modify it under the terms of the # GNU General Public License as published by the Free Software Foundatio...
0
0
0
0
0
1,381
0
-12
114
0a464262545f510b0608fec709c27136cd12f3e5
418
py
Python
app/views/ApiTest/RunTest.py
DDDDanny/MintBlue-TestPlatform-Soul
e5a763f6537e424cf85f04d4d36516a0d88fe8cc
[ "Apache-2.0" ]
2
2020-12-01T03:33:46.000Z
2020-12-15T05:34:32.000Z
app/views/ApiTest/RunTest.py
DDDDanny/MintBlue-TestPlatform-Soul
e5a763f6537e424cf85f04d4d36516a0d88fe8cc
[ "Apache-2.0" ]
null
null
null
app/views/ApiTest/RunTest.py
DDDDanny/MintBlue-TestPlatform-Soul
e5a763f6537e424cf85f04d4d36516a0d88fe8cc
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # @Time : 2021/03/13 17:31:29 # @Author : DannyDong # @File : RunTest.py # @Describe: #
18.173913
57
0.602871
# -*- coding: utf-8 -*- # @Time : 2021/03/13 17:31:29 # @Author : DannyDong # @File : RunTest.py # @Describe: 用例执行逻辑 from app.Utils import DataReceive # 测试执行类 class RunTest(object): def __init__(self, data, cookie): self.data_list = DataReceive(data).data_resolve() self.cookie = cookie ...
69
0
0
215
0
0
0
12
45
d0f4a5199ea563644879e47ea3488566519ed300
1,528
py
Python
bitcoder/bitcoder.py
jemoster/bitcoder
85457ce41895a536ab587461db1e0de3bd7741d5
[ "MIT" ]
2
2018-03-11T04:30:13.000Z
2018-04-04T16:35:52.000Z
bitcoder/bitcoder.py
jemoster/bitcoder
85457ce41895a536ab587461db1e0de3bd7741d5
[ "MIT" ]
null
null
null
bitcoder/bitcoder.py
jemoster/bitcoder
85457ce41895a536ab587461db1e0de3bd7741d5
[ "MIT" ]
null
null
null
__author__ = 'Joe'
25.898305
88
0.567408
from collections import OrderedDict __author__ = 'Joe' class DescriptorAccessMixin: def _list_instances(self, *targets): rtn = {} for name, field in self.__class__.__dict__.items(): if isinstance(field, targets): rtn[name] = field return rtn class Field(objec...
0
71
0
1,305
0
0
0
14
114
4e202c624eec481747bcf67eea4f1525add9e7c5
686
py
Python
51-100/p81.py
YiWeiShen/Project-Euler-Hints
a79cacab075dd98d393516f083aaa7ffc6115a06
[ "MIT" ]
1
2019-02-25T13:00:31.000Z
2019-02-25T13:00:31.000Z
51-100/p81.py
YiWeiShen/Project-Euler-Hints
a79cacab075dd98d393516f083aaa7ffc6115a06
[ "MIT" ]
null
null
null
51-100/p81.py
YiWeiShen/Project-Euler-Hints
a79cacab075dd98d393516f083aaa7ffc6115a06
[ "MIT" ]
null
null
null
with open('p081_matrix.txt') as f: content = f.readlines() print(content) clear_list = [] for i in range(0, len(content)): clear_list.append(content[i].strip().split(',')) for i in range(1,80): clear_list[0][i] = int(clear_list[0][i]) + int(clear_list[0][i-1]) for i in range(1,80): clear_list[i][0]...
27.44
78
0.59621
with open('p081_matrix.txt') as f: content = f.readlines() print(content) clear_list = [] for i in range(0, len(content)): clear_list.append(content[i].strip().split(',')) for i in range(1,80): clear_list[0][i] = int(clear_list[0][i]) + int(clear_list[0][i-1]) for i in range(1,80): clear_list[i][0]...
0
0
0
0
0
0
0
0
0
60860857d6b9dfa13faef9faf8f141e8a9eb5134
3,051
py
Python
jolla/plugins.py
salamer/jolla
c3662a1743c4b0a3c5e7311190a6914b33beb524
[ "Apache-2.0" ]
162
2016-04-14T14:50:21.000Z
2021-09-04T05:48:21.000Z
jolla/plugins.py
salamer/jolla
c3662a1743c4b0a3c5e7311190a6914b33beb524
[ "Apache-2.0" ]
2
2016-09-02T16:30:08.000Z
2020-11-05T09:42:54.000Z
jolla/plugins.py
salamer/jolla
c3662a1743c4b0a3c5e7311190a6914b33beb524
[ "Apache-2.0" ]
26
2016-04-24T17:54:06.000Z
2021-01-19T08:29:56.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*-
30.207921
108
0.56801
#!/usr/bin/env python # -*- coding: utf-8 -*- import json import os from HTTPerror import HTTP404Error, HTTP302Error from server import static_setting import logging class HeaderError(Exception): def __init__(self): pass class HeaderTupleError(HeaderError): def __init__(self): logging.de...
0
0
0
174
0
2,565
0
10
249
e9eb893f6de71453ec421be4a6af987c6444f28c
440
py
Python
languageBot/messengerBot/tests.py
singhvisha/LanguageBot
9cef316bceb2f6951863af2fa869398fb5242519
[ "MIT" ]
null
null
null
languageBot/messengerBot/tests.py
singhvisha/LanguageBot
9cef316bceb2f6951863af2fa869398fb5242519
[ "MIT" ]
1
2021-06-10T23:09:30.000Z
2021-06-10T23:09:30.000Z
languageBot/messengerBot/tests.py
singhvisha/LanguageBot
9cef316bceb2f6951863af2fa869398fb5242519
[ "MIT" ]
null
null
null
# Create your tests here.
31.428571
92
0.709091
from django.test import TestCase from views import translate_text # Create your tests here. class testLanguageChange(TestCase): def testTranslateText(self): self.assertEqual(translate_text('fr', 'Hello'), 'Bonjour', msg="Wrong translation!") self.assertEqual(translate_text('de', 'Hello'), 'Hallo',...
0
0
0
321
0
0
0
22
67
59ea2c195581a0bb42cb64d93051f5bb1a490ac8
393
py
Python
tests/libgsync/sync/test_file.py
iwonbigbro/gsync
03db22fe826f073e56877918b0acb7b4ba908f18
[ "BSD-3-Clause" ]
199
2015-01-05T04:45:03.000Z
2021-08-15T12:04:03.000Z
tests/libgsync/sync/test_file.py
iwonbigbro/gsync
03db22fe826f073e56877918b0acb7b4ba908f18
[ "BSD-3-Clause" ]
42
2015-01-06T13:38:49.000Z
2021-11-23T19:36:20.000Z
tests/libgsync/sync/test_file.py
iwonbigbro/gsync
03db22fe826f073e56877918b0acb7b4ba908f18
[ "BSD-3-Clause" ]
49
2015-01-06T13:45:11.000Z
2022-03-22T11:46:29.000Z
#!/usr/bin/env python # Copyright (C) 2014 Craig Phillips. All rights reserved.
24.5625
63
0.681934
#!/usr/bin/env python # Copyright (C) 2014 Craig Phillips. All rights reserved. import unittest from libgsync.sync.file import SyncFile class TestSyncFile(unittest.TestCase): def test_SyncFile_relative_to(self): f = SyncFile("/gsync_unittest") self.assertEqual( f.relative_to("/gsync...
0
0
0
231
0
0
0
12
68
186325fe9221ca9117f4f4f9b967e01e6dfe17c0
10,758
py
Python
misago/misago/threads/tests/test_thread_postbulkdelete_api.py
vascoalramos/misago-deployment
20226072138403108046c0afad9d99eb4163cedc
[ "MIT" ]
2
2021-03-06T21:06:13.000Z
2021-03-09T15:05:12.000Z
misago/misago/threads/tests/test_thread_postbulkdelete_api.py
vascoalramos/misago-deployment
20226072138403108046c0afad9d99eb4163cedc
[ "MIT" ]
null
null
null
misago/misago/threads/tests/test_thread_postbulkdelete_api.py
vascoalramos/misago-deployment
20226072138403108046c0afad9d99eb4163cedc
[ "MIT" ]
null
null
null
from .. import test
38.014134
88
0.628555
import json from datetime import timedelta from django.urls import reverse from django.utils import timezone from .. import test from ..models import Post, Thread from ..test import patch_category_acl from .test_threads_api import ThreadsApiTestCase class PostBulkDeleteApiTests(ThreadsApiTestCase): def setUp(se...
0
8,182
0
2,300
0
0
0
76
178
9101a106c619fd7c812be346af49ac1c33d6d4de
1,039
py
Python
watchmen/connector/kafka/kafka_connector.py
Insurance-Metrics-Measure-Advisory/watchman-data-connector
8ecab0c5b28174f1611e51deba8d94a42f53d51d
[ "MIT" ]
125
2021-03-13T07:39:46.000Z
2022-02-28T03:14:17.000Z
watchmen/connector/kafka/kafka_connector.py
Insurance-Metrics-Measure-Advisory/watchman-data-connector
8ecab0c5b28174f1611e51deba8d94a42f53d51d
[ "MIT" ]
null
null
null
watchmen/connector/kafka/kafka_connector.py
Insurance-Metrics-Measure-Advisory/watchman-data-connector
8ecab0c5b28174f1611e51deba8d94a42f53d51d
[ "MIT" ]
17
2021-03-13T07:31:58.000Z
2021-05-20T09:38:02.000Z
import asyncio import logging from watchmen_boot.config.config import settings log = logging.getLogger("app." + __name__) loop = asyncio.get_event_loop() kafka_topics = settings.KAFKA_TOPICS kafka_topics_list = kafka_topics.split(",")
29.685714
75
0.733397
import asyncio import json import logging import traceback from watchmen.collection.model.topic_event import TopicEvent from watchmen_boot.config.config import settings from watchmen.raw_data.service.import_raw_data import import_raw_topic_data log = logging.getLogger("app." + __name__) loop = asyncio.get_event_loop(...
0
0
611
0
0
0
0
78
112
2c642124c4cc7d91de11529279b7e2e5b3fa1712
4,213
py
Python
scr/Maze.py
IanDrunk/MazeBuilder
84f516ca1331960170874bfef2a556f8a8e4a3b5
[ "MIT" ]
null
null
null
scr/Maze.py
IanDrunk/MazeBuilder
84f516ca1331960170874bfef2a556f8a8e4a3b5
[ "MIT" ]
null
null
null
scr/Maze.py
IanDrunk/MazeBuilder
84f516ca1331960170874bfef2a556f8a8e4a3b5
[ "MIT" ]
null
null
null
""" This class represents a maze instance """ # Maze class itself # Represents single node in the maze
27.180645
85
0.471873
import random import sys """ This class represents a maze instance """ # Maze class itself class Maze: size = 0 layout = list() def __init__(self, dimensions): layout = self.layout self.size = dimensions # Build initial layout for xx in range(dimensions): row...
0
0
0
4,036
0
0
0
-19
88
a3bf597e741229e477fc37b44fecb33fafa4826f
4,775
py
Python
src/lib/handling/entities.py
Toblobs/RPGOnline
3cdbf21219d71f2890b4e61eef54d83bad7d65d0
[ "MIT" ]
1
2022-03-29T18:18:41.000Z
2022-03-29T18:18:41.000Z
src/lib/handling/entities.py
Toblobs/RPGOnline
3cdbf21219d71f2890b4e61eef54d83bad7d65d0
[ "MIT" ]
null
null
null
src/lib/handling/entities.py
Toblobs/RPGOnline
3cdbf21219d71f2890b4e61eef54d83bad7d65d0
[ "MIT" ]
null
null
null
### RPGOnline ### A Synergy Studios Project # - GAME CLASSES - # # - ENTITY CLASSES - # # - MOVESET CLASSES - # # - EFFECT CLASSES - #
23.638614
132
0.62199
### RPGOnline ### A Synergy Studios Project import random # - GAME CLASSES - # class Game: """A class for a single game that stores all the other classes. For now, this refers to local-game only classes.""" def __init__(self): self.players = {} #PlayerID, PlayerClass class Shop: """A ...
0
0
0
4,373
0
0
0
-8
261
6681e1fb83dbed43de80cfe92266c1da0981a122
3,150
py
Python
home/home.py
abkraynak/smart-home
26439a322ee75811731da413c8e80d8fb89ab876
[ "MIT" ]
null
null
null
home/home.py
abkraynak/smart-home
26439a322ee75811731da413c8e80d8fb89ab876
[ "MIT" ]
null
null
null
home/home.py
abkraynak/smart-home
26439a322ee75811731da413c8e80d8fb89ab876
[ "MIT" ]
null
null
null
# home.py
30.882353
72
0.573016
# home.py from .alarm import Alarm from .light import Light from .lock import Lock class Home(object): def __init__(self, first_name: str, address: str): self._username = 'abkraynak' self._password = 'mypassword' self._first_name = first_name self._address = address self._a...
0
0
0
3,044
0
0
0
7
90
fb329dc6d8a1d5c4374cc30489618e6b2c079d66
8,732
py
Python
homefinder.py
sheegl/home-finder
81830931bdd87243d0b14841e536eb0846b6da12
[ "MIT" ]
null
null
null
homefinder.py
sheegl/home-finder
81830931bdd87243d0b14841e536eb0846b6da12
[ "MIT" ]
null
null
null
homefinder.py
sheegl/home-finder
81830931bdd87243d0b14841e536eb0846b6da12
[ "MIT" ]
null
null
null
from io import StringIO from notification import notify_about_home, notify_dev import logging as log from preferences import SEEN_PATH, CRITERIA, SITES_TO_SCRAPE from hashlib import md5 import sys def fingerprint(home: Home): """ Get 'unique' id for home Object :param home: defined Home object :retur...
32.70412
114
0.545121
from io import StringIO from typing import NamedTuple, List, Set, Tuple, Optional from sites import SELECTORS from preferences import URLS from selenium.webdriver import FirefoxProfile, FirefoxOptions, Firefox from selenium.common.exceptions import NoSuchElementException from notification import notify_about_home, noti...
0
541
0
5,175
0
924
0
159
293
3c913f668c30268c7d5383a29723d2a5a48524db
547
py
Python
check_compatibility.py
rongxiao2014/ONNX-helpers
7deaaa9055db0c91e9dc58afb6d164b0fc28bd04
[ "MIT" ]
null
null
null
check_compatibility.py
rongxiao2014/ONNX-helpers
7deaaa9055db0c91e9dc58afb6d164b0fc28bd04
[ "MIT" ]
null
null
null
check_compatibility.py
rongxiao2014/ONNX-helpers
7deaaa9055db0c91e9dc58afb6d164b0fc28bd04
[ "MIT" ]
null
null
null
import onnx.numpy_helper as numpy_helper # This function checks whether two onnx files (onnx_A and onnx_B) have the same underlying computational graph and operators.
30.388889
125
0.714808
import onnx import onnx.numpy_helper as numpy_helper import numpy as np # This function checks whether two onnx files (onnx_A and onnx_B) have the same underlying computational graph and operators. def check_model(onnx_A, onnx_B): model_A = onnx.load(onnx_A) model_B = onnx.load(onnx_B) if model_A.graph.in...
0
0
0
0
0
325
0
-13
66
76aa7154783688f93ffe35e1edb556109a3a8e23
1,055
py
Python
data/contacts.py
Pavlov85/python_training
55169bbc7b4e9aba69e70e39d800c5a46342cdcf
[ "Apache-2.0" ]
null
null
null
data/contacts.py
Pavlov85/python_training
55169bbc7b4e9aba69e70e39d800c5a46342cdcf
[ "Apache-2.0" ]
null
null
null
data/contacts.py
Pavlov85/python_training
55169bbc7b4e9aba69e70e39d800c5a46342cdcf
[ "Apache-2.0" ]
null
null
null
from model.contact import Contact testdata = [ Contact(firstname="qqqqqqqq", middlename="wwwwwww", nickname="eeefdeeee", title="vvvvvvvvvv", lastname="eeeeeeeee", company="xccccccccc", adress="ffcvcxvcvcxvxcvx", home="23144124214", mobile="45565656678", work="56678678678", fax="...
58.611111
97
0.636967
from model.contact import Contact testdata = [ Contact(firstname="qqqqqqqq", middlename="wwwwwww", nickname="eeefdeeee", title="vvvvvvvvvv", lastname="eeeeeeeee", company="xccccccccc", adress="ffcvcxvcvcxvxcvx", home="23144124214", mobile="45565656678", work="56678678678", fax="...
0
0
0
0
0
0
0
0
0
747d5363eb18a36a4ee219760f7ab5b01e63e00f
3,847
py
Python
Examples/PDFTool/MergeNew_cmd.py
wxh0000mm/TKinterDesigner
01878e78746082413a09444283edbd52118d15ef
[ "Apache-2.0" ]
1
2022-03-09T08:43:41.000Z
2022-03-09T08:43:41.000Z
Examples/PDFTool/MergeNew_cmd.py
wxh0000mm/TKinterDesigner
01878e78746082413a09444283edbd52118d15ef
[ "Apache-2.0" ]
null
null
null
Examples/PDFTool/MergeNew_cmd.py
wxh0000mm/TKinterDesigner
01878e78746082413a09444283edbd52118d15ef
[ "Apache-2.0" ]
null
null
null
#coding=utf-8 import sys from os.path import abspath, dirname sys.path.append(abspath(dirname(__file__))) import tkinter ElementBGArray={} ElementBGArray_Resize={} ElementBGArray_IM={} DirPath=""
36.292453
162
0.675331
#coding=utf-8 import sys import os from os.path import abspath, dirname sys.path.append(abspath(dirname(__file__))) import tkinter import tkinter.filedialog from tkinter import * import Fun ElementBGArray={} ElementBGArray_Resize={} ElementBGArray_IM={} from PyPDF2 import PdfFileReader, PdfFileWriter DirPath=""...
318
0
0
0
0
3,199
0
11
330
38ec129fdce345e5491f76cdf291fe1044bda1e6
2,090
py
Python
books/dongbin-na/part3_sorting/sorting_3.py
livlikwav/Algorithms
dbb443aeb56946252ed8fa2fccd3c35026697a16
[ "MIT" ]
1
2019-11-28T02:47:48.000Z
2019-11-28T02:47:48.000Z
books/dongbin-na/part3_sorting/sorting_3.py
livlikwav/Algorithms
dbb443aeb56946252ed8fa2fccd3c35026697a16
[ "MIT" ]
6
2019-11-27T14:01:51.000Z
2020-12-03T16:34:27.000Z
books/dongbin-na/part3_sorting/sorting_3.py
livlikwav/BOJstack
dbb443aeb56946252ed8fa2fccd3c35026697a16
[ "MIT" ]
null
null
null
''' < > 30( 20 ) () . , ! < > 1) python list.count(<< >>) O(N) loop . built-in . 2) stages 1 , fail = count / length length -= count . ! < > . , 200,000 , O(NlogN) . ''' ''' <Answer> # def solution(N, stages): answer = [] l...
21.326531
61
0.528708
''' <실수 줄이기 메모> 소요 시간 30분(권장 20분 문제) 초기화 하는 과정(누산) 알고리즘을 잘 못 짜서 헤맸다. 쉬운 문제일수록, 집중해서 정확히 한번에 풀고 끝내자 ㅜㅜ! <답안 꿀팁> 1) python list.count(<<특정 값>>) 시간 복잡도 O(N) 근데 사실 내가 짠 코드가 한번 loop로 끝이니 더 빠르긴함. 다만 여유로우니 위 built-in 사용하면 코드가 깔끔함. 2) stages 1부터 차례로 실패율을 계산하면서, 전체 사람수를 줄여나감 fail = count / length length -= count 이렇게 하면 더 코드...
1,464
0
0
0
0
812
0
0
22
8a4dd649f486cc91d2dc2ff4b2a59f4b61a25860
7,188
py
Python
test/basetest/vramsteg.py
GothenburgBitFactory/vramsteg
627f22e248f07fd90bd6df3b0f0715c3ce7a00fa
[ "MIT" ]
3
2018-08-30T23:16:21.000Z
2020-12-07T04:54:20.000Z
test/basetest/vramsteg.py
GothenburgBitFactory/vramsteg
627f22e248f07fd90bd6df3b0f0715c3ce7a00fa
[ "MIT" ]
null
null
null
test/basetest/vramsteg.py
GothenburgBitFactory/vramsteg
627f22e248f07fd90bd6df3b0f0715c3ce7a00fa
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # vim: ai sts=4 et sw=4
34.228571
109
0.617418
# -*- coding: utf-8 -*- import atexit import json import os import shlex import shutil import tempfile import unittest from .exceptions import CommandError from .utils import run_cmd_wait, run_cmd_wait_nofail, which, vramsteg_binary_location, DEFAULT_EXTENSION_PATH from .compat import STRING_TYPE class Vramsteg(obje...
0
545
0
6,295
0
0
0
54
244
29c2607d7bf80b32cb7d218c68ceb4a4a69ab6c6
1,166
py
Python
tests/test_imdb_list_interface.py
thisirs/Flexget
4dacd31e89dd37c6c8afce0c11b37eeb177ebc0f
[ "MIT" ]
null
null
null
tests/test_imdb_list_interface.py
thisirs/Flexget
4dacd31e89dd37c6c8afce0c11b37eeb177ebc0f
[ "MIT" ]
null
null
null
tests/test_imdb_list_interface.py
thisirs/Flexget
4dacd31e89dd37c6c8afce0c11b37eeb177ebc0f
[ "MIT" ]
null
null
null
from __future__ import unicode_literals, division, absolute_import
24.291667
74
0.650086
from __future__ import unicode_literals, division, absolute_import from builtins import * # pylint: disable=unused-import, redefined-builtin import pytest from flexget.entry import Entry from flexget.plugins.list.imdb_list import ImdbEntrySet @pytest.mark.online class TestIMDBList(object): config = """ ...
0
894
0
0
0
0
0
37
165
1dbf3897d67d8c520db975995e72908a8e56a9a7
116
py
Python
src/data/__init__.py
tinyperegrine/techex
4e468f8b6196b56b1422a41c9e2dd44e3d9b5970
[ "MIT" ]
null
null
null
src/data/__init__.py
tinyperegrine/techex
4e468f8b6196b56b1422a41c9e2dd44e3d9b5970
[ "MIT" ]
null
null
null
src/data/__init__.py
tinyperegrine/techex
4e468f8b6196b56b1422a41c9e2dd44e3d9b5970
[ "MIT" ]
null
null
null
from flask_sqlalchemy import SQLAlchemy db = SQLAlchemy()
16.571429
39
0.810345
from flask_sqlalchemy import SQLAlchemy db = SQLAlchemy() from .models import User from .models import CoffeeShop
0
0
0
0
0
0
0
12
45
9a271fccc8ec544dcd26b1db9167fe40336bf114
2,982
py
Python
guidesyn/dataset/scripts/dudsds+/View.py
eth-sri/guiding-synthesizers
3622b80eb3bf633be65036dc47e4ed7b98c3fce8
[ "Apache-2.0" ]
9
2020-04-04T16:20:20.000Z
2021-07-01T04:11:38.000Z
guidesyn/dataset/scripts/dudsds+/View.py
eth-sri/guiding-synthesizers
3622b80eb3bf633be65036dc47e4ed7b98c3fce8
[ "Apache-2.0" ]
1
2020-02-23T20:16:43.000Z
2020-02-24T13:10:23.000Z
guidesyn/dataset/scripts/dudsds+/View.py
eth-sri/guiding-synthesizers
3622b80eb3bf633be65036dc47e4ed7b98c3fce8
[ "Apache-2.0" ]
3
2020-04-05T16:57:50.000Z
2022-02-18T01:46:37.000Z
""" Copyright 2019 Software Reliability Lab, ETH Zurich Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to i...
38.727273
118
0.629108
""" Copyright 2019 Software Reliability Lab, ETH Zurich Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to i...
0
0
0
2,263
0
0
0
2
134
daaed69bee1675e209be9bef60c0811ff5f119df
2,579
py
Python
schematizer/models/base_model.py
Yelp/schematizer
035845d27945a05db475f00eb76f59e8825dbaa4
[ "Apache-2.0" ]
86
2016-11-17T17:39:13.000Z
2021-06-01T15:19:05.000Z
schematizer/models/base_model.py
tomzhang/schematizer
035845d27945a05db475f00eb76f59e8825dbaa4
[ "Apache-2.0" ]
2
2016-12-01T20:57:43.000Z
2021-09-28T09:26:25.000Z
schematizer/models/base_model.py
tomzhang/schematizer
035845d27945a05db475f00eb76f59e8825dbaa4
[ "Apache-2.0" ]
26
2016-11-29T22:38:11.000Z
2021-03-02T19:44:17.000Z
# -*- coding: utf-8 -*- # Copyright 2016 Yelp 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 applicable law or ag...
36.842857
79
0.677007
# -*- coding: utf-8 -*- # Copyright 2016 Yelp 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 applicable law or ag...
0
1,403
0
364
0
0
0
66
68
1fbe0a27731d89d2903d37723d788e47be5f98f0
246
py
Python
src/tushare/main.py
frosh-li/stocks
9f55e82376471af7735223e433d5ef1eca5c1e34
[ "MIT" ]
null
null
null
src/tushare/main.py
frosh-li/stocks
9f55e82376471af7735223e433d5ef1eca5c1e34
[ "MIT" ]
3
2020-07-17T06:16:03.000Z
2022-01-22T12:42:25.000Z
src/tushare/main.py
frosh-li/stocks
9f55e82376471af7735223e433d5ef1eca5c1e34
[ "MIT" ]
null
null
null
import tushare as ts import pymongo import json stock_lists = ts.get_stock_basics() # conn = pymongo.MongoClient('127.0.0.1', port=27017) conn.db.tickdata.insert_many(json.loads(stock_lists.to_json(orient='records'))) print(stock_lists)
27.333333
79
0.792683
import tushare as ts import pymongo import json stock_lists = ts.get_stock_basics() #获取所有股票列表 conn = pymongo.MongoClient('127.0.0.1', port=27017) conn.db.tickdata.insert_many(json.loads(stock_lists.to_json(orient='records'))) print(stock_lists)
24
0
0
0
0
0
0
0
0