hexsha
stringlengths
40
40
size
int64
7
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
125
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
247
max_issues_repo_name
stringlengths
4
125
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
247
max_forks_repo_name
stringlengths
4
125
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
1
1.04M
avg_line_length
float64
1.77
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
7
1.04M
filtered:remove_function_no_docstring
int64
-102
942k
filtered:remove_class_no_docstring
int64
-354
977k
filtered:remove_delete_markers
int64
0
60.1k
0d607dd9d30fd2b66bf03406a4293eb03eebd09f
548
py
Python
june-challenge/min-cost-stairs.py
kd82/interview-preparation
a47de06c677b37c8160d1429f43e38288c157754
[ "MIT" ]
null
null
null
june-challenge/min-cost-stairs.py
kd82/interview-preparation
a47de06c677b37c8160d1429f43e38288c157754
[ "MIT" ]
null
null
null
june-challenge/min-cost-stairs.py
kd82/interview-preparation
a47de06c677b37c8160d1429f43e38288c157754
[ "MIT" ]
null
null
null
from collections import List
26.095238
63
0.481752
from collections import List def minCostClimbingStairs(cost: List[int]) -> int: def dfs(cost, i): if i >= len(cost): return 0 if dp[i] > -1: return dp[i] res = cost[i] + min(dfs(cost, i + 1), dfs(cost, i + 2)) dp[i] = res return res dp = [-1]*(len...
474
0
46
4b4e3ddd829c54567bd78d89e6a6a0b6affd419f
1,010
py
Python
portlab/evaluate/lib/backtest.py
sqt-aliu/portlab
366755c2cfe7bb53c1b236688684fc2c9d8bf4d1
[ "MIT" ]
1
2017-11-06T06:01:24.000Z
2017-11-06T06:01:24.000Z
portlab/evaluate/lib/backtest.py
sqt-aliu/portlab
366755c2cfe7bb53c1b236688684fc2c9d8bf4d1
[ "MIT" ]
null
null
null
portlab/evaluate/lib/backtest.py
sqt-aliu/portlab
366755c2cfe7bb53c1b236688684fc2c9d8bf4d1
[ "MIT" ]
null
null
null
import numpy as np # core functions totalreturn = lambda x: (x[-1]/x[0])-1 finalreturn = lambda x: x[-1] sharpe = lambda x: np.sqrt(12) * (np.mean(x) / np.std(x)) ann_vol = lambda x: np.sqrt(12) * np.std(x) cagr = lambda x: ((((x[-1]) / x[0])) ** (12.0/(x.count()-1))) - 1 cagr2 = lambda x: ((np.mean(x)+1) ** 12) -1 ...
21.956522
65
0.447525
import numpy as np # core functions totalreturn = lambda x: (x[-1]/x[0])-1 finalreturn = lambda x: x[-1] sharpe = lambda x: np.sqrt(12) * (np.mean(x) / np.std(x)) ann_vol = lambda x: np.sqrt(12) * np.std(x) cagr = lambda x: ((((x[-1]) / x[0])) ** (12.0/(x.count()-1))) - 1 cagr2 = lambda x: ((np.mean(x)+1) ** 12) -1 d...
607
0
81
18efce23cede35e1ce11c9f84824727b1df23f9d
2,044
py
Python
sample_scripts/retarget_campaign.py
decisive/api-demo-python
58cd14e9e1f6373a3cd927536fd29f5f286940a0
[ "MIT" ]
null
null
null
sample_scripts/retarget_campaign.py
decisive/api-demo-python
58cd14e9e1f6373a3cd927536fd29f5f286940a0
[ "MIT" ]
null
null
null
sample_scripts/retarget_campaign.py
decisive/api-demo-python
58cd14e9e1f6373a3cd927536fd29f5f286940a0
[ "MIT" ]
null
null
null
import sys # NOTE: for exiting import requests import datetime import pprint import ujson as json # NOTE: faster json API_KEY = '' # TODO: input api key here!!! if not API_KEY: sys.exit('Please insert your Decisive API key') print print 'Creating session to always add API key...' # NOTE: you can also use decisi...
30.507463
95
0.65362
import sys # NOTE: for exiting import requests import datetime import pprint import ujson as json # NOTE: faster json API_KEY = '' # TODO: input api key here!!! if not API_KEY: sys.exit('Please insert your Decisive API key') print print 'Creating session to always add API key...' # NOTE: you can also use decisi...
652
0
91
9975b4944c84ea643a71a8fe95b55e6ebcf03607
342
py
Python
taaontia/commands/registry.py
Kagaminara/taaontia.py
5f31f22fd26767903f8351eab209848fe1ddb6b0
[ "MIT" ]
null
null
null
taaontia/commands/registry.py
Kagaminara/taaontia.py
5f31f22fd26767903f8351eab209848fe1ddb6b0
[ "MIT" ]
null
null
null
taaontia/commands/registry.py
Kagaminara/taaontia.py
5f31f22fd26767903f8351eab209848fe1ddb6b0
[ "MIT" ]
null
null
null
commands = CommandsRegistry()
21.375
56
0.652047
class CommandsRegistry: def __init__(self): self.commands = {} def register(self, command): self.commands[command.trigger] = command() return command def get(self, command): from .helper import HelpCommand return self.commands.get(command, HelpCommand()) commands...
206
2
102
de76335bf95488a9cd521c5b94630a6f3bfab345
24,150
py
Python
src/graph_transpiler/webdnn/frontend/tensorflow/ops/gen_nn_ops.py
steerapi/webdnn
1df51cc094e5a528cfd3452c264905708eadb491
[ "MIT" ]
1
2021-04-09T15:55:35.000Z
2021-04-09T15:55:35.000Z
src/graph_transpiler/webdnn/frontend/tensorflow/ops/gen_nn_ops.py
steerapi/webdnn
1df51cc094e5a528cfd3452c264905708eadb491
[ "MIT" ]
null
null
null
src/graph_transpiler/webdnn/frontend/tensorflow/ops/gen_nn_ops.py
steerapi/webdnn
1df51cc094e5a528cfd3452c264905708eadb491
[ "MIT" ]
null
null
null
from typing import Tuple, List import numpy as np import tensorflow as tf from webdnn.frontend.tensorflow.converter import TensorFlowConverter from webdnn.frontend.tensorflow.util import unary_op_handler, check_data_format, convert_odd_padding_to_concat, parse_padding from webdnn.graph.axis import Axis from webdnn.gr...
42.592593
135
0.755735
from typing import Tuple, List import numpy as np import tensorflow as tf from webdnn.frontend.tensorflow.converter import TensorFlowConverter from webdnn.frontend.tensorflow.util import unary_op_handler, check_data_format, convert_odd_padding_to_concat, parse_padding from webdnn.graph.axis import Axis from webdnn.gr...
17,740
0
1,386
7162d76d7a0f15ece55362aaf305b6e9001bee7f
673
py
Python
GF2.py
JediKoder/coursera-CodeMatrix
1ac461d22ebaf2777eabdcf31d76d709c33f472a
[ "MIT" ]
6
2015-09-18T02:07:21.000Z
2020-04-22T17:05:11.000Z
GF2.py
JediKoder/coursera-CodeMatrix
1ac461d22ebaf2777eabdcf31d76d709c33f472a
[ "MIT" ]
null
null
null
GF2.py
JediKoder/coursera-CodeMatrix
1ac461d22ebaf2777eabdcf31d76d709c33f472a
[ "MIT" ]
10
2015-09-05T03:54:00.000Z
2020-04-21T12:56:40.000Z
from numbers import Number one = One() zero = 0
25.884615
62
0.644874
from numbers import Number class One: def __add__(self, other): return self if other == 0 else 0 __sub__ = __add__ def __mul__(self, other): if isinstance(other, Number): return 0 if other == 0 else self return other def __div__(self, other): if other == 0: raise Zer...
262
339
23
1cf508199cbd0764682bf5bdcd24b98f81e53734
1,151
py
Python
tonks/vision/helpers.py
vanderveld/tonks
e87afbd9614b276b443b4a7527fd1fda01a8be4c
[ "BSD-3-Clause" ]
null
null
null
tonks/vision/helpers.py
vanderveld/tonks
e87afbd9614b276b443b4a7527fd1fda01a8be4c
[ "BSD-3-Clause" ]
null
null
null
tonks/vision/helpers.py
vanderveld/tonks
e87afbd9614b276b443b4a7527fd1fda01a8be4c
[ "BSD-3-Clause" ]
null
null
null
from creevey.ops.image import centercrop import numpy as np from PIL import Image import torch.nn as nn def center_crop_pil_image(img): """ Helper function to crop the center out of images. Utilizes the centercrop function from `creevey` Parameters ---------- img: array PIL image arr...
24.489362
85
0.638575
from creevey.ops.image import centercrop import numpy as np from PIL import Image import torch.nn as nn def center_crop_pil_image(img): """ Helper function to crop the center out of images. Utilizes the centercrop function from `creevey` Parameters ---------- img: array PIL image arr...
224
0
76
711d9ac3055874d62d06bdb20403fb0a203b8348
8,608
py
Python
cornflow_client/schema/manager.py
baobabsoluciones/cornflow-client
f9996f0b841885d26639cb63c8ba6090387de57f
[ "MIT" ]
3
2021-05-12T11:21:26.000Z
2022-02-22T19:23:46.000Z
cornflow_client/schema/manager.py
baobabsoluciones/cornflow-client
f9996f0b841885d26639cb63c8ba6090387de57f
[ "MIT" ]
17
2021-03-14T17:09:46.000Z
2022-02-28T19:12:37.000Z
cornflow_client/schema/manager.py
baobabsoluciones/cornflow-client
f9996f0b841885d26639cb63c8ba6090387de57f
[ "MIT" ]
2
2020-10-03T20:00:19.000Z
2022-03-24T11:52:22.000Z
""" Class to help create and manage data schema and to validate json files. """ from jsonschema import Draft7Validator from copy import deepcopy from genson import SchemaBuilder from .dictSchema import DictSchema from cornflow_client.core.tools import load_json, save_json class SchemaManager: """ A schema ma...
31.188406
106
0.580507
""" Class to help create and manage data schema and to validate json files. """ from jsonschema import Draft7Validator from copy import deepcopy from genson import SchemaBuilder from .dictSchema import DictSchema from cornflow_client.core.tools import load_json, save_json class SchemaManager: """ A schema ma...
1,835
0
78
0048849928d11e99a79abed4f15fdfd4ce533927
1,461
py
Python
src/summary/trigger.py
latonaio/template-matching-summary-server
2f0e792d38f897a08d6f792012dbfdad6d7c695b
[ "MIT" ]
9
2021-09-22T07:17:02.000Z
2021-11-05T01:26:19.000Z
src/summary/trigger.py
latonaio/template-matching-summary-server
2f0e792d38f897a08d6f792012dbfdad6d7c695b
[ "MIT" ]
null
null
null
src/summary/trigger.py
latonaio/template-matching-summary-server
2f0e792d38f897a08d6f792012dbfdad6d7c695b
[ "MIT" ]
null
null
null
from src import log from src.summary.base import BaseSummary if __name__ == "__main__": import json with open('json/C_TemplateMatchingSummary.json') as f: _dict = json.load(f) dicts = _dict['metadata'][0]['value'] summary = TriggerSummary() should_be_reset = summary.should_be_reset(dicts...
22.828125
93
0.603696
from src import log from src.summary.base import BaseSummary class TriggerSummary(BaseSummary): def __init__(self): self.vehicle_name = None self.reset() def reset(self): super().reset() return def should_be_reset(self, dicts): new_vehicle_name = None if d...
701
13
130
8ab448056412da458a047ede6337a58d5e53cdfb
195
py
Python
thrift/protocol/__init__.py
getlove555/getbotline
639e157495849e12ac7dd4bae6012841cf511892
[ "MIT" ]
7
2020-04-30T09:03:36.000Z
2021-02-21T17:45:35.000Z
thrift/protocol/__init__.py
getlove555/getbotline
639e157495849e12ac7dd4bae6012841cf511892
[ "MIT" ]
4
2020-08-01T10:10:14.000Z
2021-01-03T00:55:05.000Z
thrift/protocol/__init__.py
LOUREN03/lourenelle
5448a8634d438f35df98e43ad135f232cf74d2b1
[ "MIT" ]
20
2020-05-11T08:53:30.000Z
2021-07-16T09:50:20.000Z
#LICENCE : http://www.apache.org/licenses/LICENSE-2.0 #CREATOR BY : PRANKBOT #MOD BY ACIL __all__ = ['fastbinary', 'TBase', 'TBinaryProtocol', 'TCompactProtocol', 'TJSONProtocol', 'TProtocol']
39
102
0.723077
#LICENCE : http://www.apache.org/licenses/LICENSE-2.0 #CREATOR BY : PRANKBOT #MOD BY ACIL __all__ = ['fastbinary', 'TBase', 'TBinaryProtocol', 'TCompactProtocol', 'TJSONProtocol', 'TProtocol']
0
0
0
63eaa450af3c58a5dba398f2348a71fa45fd20c0
2,693
py
Python
navigation_events.py
gkovacs/invideo-quizzes-analysis-las2016
6ec8686ef0d3ffa5e994f8dec41590fea87e9539
[ "MIT" ]
null
null
null
navigation_events.py
gkovacs/invideo-quizzes-analysis-las2016
6ec8686ef0d3ffa5e994f8dec41590fea87e9539
[ "MIT" ]
null
null
null
navigation_events.py
gkovacs/invideo-quizzes-analysis-las2016
6ec8686ef0d3ffa5e994f8dec41590fea87e9539
[ "MIT" ]
null
null
null
#!/usr/bin/env python # md5: a2cb6a826f222fa843ab488ae8a2de22 # coding: utf-8 import json
29.593407
74
0.680654
#!/usr/bin/env python # md5: a2cb6a826f222fa843ab488ae8a2de22 # coding: utf-8 import json class SeekEvent: def __init__(self, timestamp, start, end, paused, user): self.timestamp = timestamp self.start = start self.end = end self.event_type = 'seeked' self.paused = bool(paused) if self.end >...
2,199
-24
426
9930cfc3b8857f7d8d5760e9dc01072e8dcd4337
1,665
py
Python
sketch n draw.py
Ayush2007A/Code-master
fafe4a020adc3f8e78c78f6b8b2b08b5c3005613
[ "Unlicense" ]
1
2021-02-05T10:29:30.000Z
2021-02-05T10:29:30.000Z
sketch n draw.py
Ayush2007A/Code-master
fafe4a020adc3f8e78c78f6b8b2b08b5c3005613
[ "Unlicense" ]
null
null
null
sketch n draw.py
Ayush2007A/Code-master
fafe4a020adc3f8e78c78f6b8b2b08b5c3005613
[ "Unlicense" ]
null
null
null
import turtle from turtle import Turtle, Screen a = turtle.Turtle() screen = Screen() a.shape('turtle') print('Welcome to sketch n draw') print('select your color 1 and 2') color_1 = (input('color 1: ')) color_2 = (input('color 2: ')) print('ok! your colors are ' + color_1 + (' and ') + color_2) print("change...
30.833333
83
0.493093
import turtle from turtle import Turtle, Screen a = turtle.Turtle() screen = Screen() a.shape('turtle') print('Welcome to sketch n draw') print('select your color 1 and 2') color_1 = (input('color 1: ')) color_2 = (input('color 2: ')) print('ok! your colors are ' + color_1 + (' and ') + color_2) print("change...
251
0
93
0741193fb2dfb937b0530c65ea59f7bbd0aebd09
1,481
py
Python
ppln/experiment.py
Mikhail-M/ppln
11bacc40ec6808c0b7bae0f9fb6b36b860294417
[ "MIT" ]
null
null
null
ppln/experiment.py
Mikhail-M/ppln
11bacc40ec6808c0b7bae0f9fb6b36b860294417
[ "MIT" ]
null
null
null
ppln/experiment.py
Mikhail-M/ppln
11bacc40ec6808c0b7bae0f9fb6b36b860294417
[ "MIT" ]
null
null
null
import torch.distributed as dist from torch.utils.data import DataLoader from .data.transforms import make_albumentations from .factory import make_model from .hooks import DistSamplerSeedHook, IterTimerHook, LogBufferHook
26.927273
69
0.646185
import torch.distributed as dist from torch.utils.data import DataLoader from .data.transforms import make_albumentations from .factory import make_model from .hooks import DistSamplerSeedHook, IterTimerHook, LogBufferHook class BaseExperiment: def __init__(self, cfg): self.cfg = cfg self._model ...
935
298
23
48c7bf8eab29ebaf195b176af688e2d1694ca5d3
699
py
Python
backend_server/tests/test_pybackend_urilib.py
ismir-net/open-eval
ebb4612ff5a6c6f7b6fbc908d837857f8377d95a
[ "MIT" ]
6
2016-08-09T18:34:18.000Z
2016-08-12T01:58:05.000Z
backend_server/tests/test_pybackend_urilib.py
cosmir/openmic-annotator
ebb4612ff5a6c6f7b6fbc908d837857f8377d95a
[ "MIT" ]
4
2016-08-13T14:35:00.000Z
2016-08-13T14:37:25.000Z
backend_server/tests/test_pybackend_urilib.py
ismir-net/open-eval
ebb4612ff5a6c6f7b6fbc908d837857f8377d95a
[ "MIT" ]
null
null
null
import pytest import pybackend.urilib as U
18.394737
39
0.566524
import pytest import pybackend.urilib as U def test_validate(): U.validate("x:y") with pytest.raises(ValueError): U.validate(":x") with pytest.raises(ValueError): U.validate("y:") with pytest.raises(ValueError): U.validate(":") with pytest.raises(ValueError): U....
583
0
69
60bade3775753250997ff137e10f278ae7d7d12a
5,476
py
Python
examples/slit_channel.py
cwaluga/singularities_dolfin
dd379f71f384717a63906fd701df542a1603b03b
[ "MIT" ]
null
null
null
examples/slit_channel.py
cwaluga/singularities_dolfin
dd379f71f384717a63906fd701df542a1603b03b
[ "MIT" ]
null
null
null
examples/slit_channel.py
cwaluga/singularities_dolfin
dd379f71f384717a63906fd701df542a1603b03b
[ "MIT" ]
null
null
null
#! /usr/bin/env python # coding=utf-8 """ Example from the paper Rüde/Waluga/Wohlmuth 2013 """ __author__ = "Christian Waluga (waluga@ma.tum.de)" __copyright__ = "Copyright (c) 2013 %s" % __author__ from dolfin import * from energy_correction.correction import * from energy_correction.meshtools import * from energy...
30.764045
164
0.649379
#! /usr/bin/env python # coding=utf-8 """ Example from the paper Rüde/Waluga/Wohlmuth 2013 """ __author__ = "Christian Waluga (waluga@ma.tum.de)" __copyright__ = "Copyright (c) 2013 %s" % __author__ from dolfin import * from energy_correction.correction import * from energy_correction.meshtools import * from energy...
1,394
10
91
a7c5fe548eda7fb588f956399f68c6d16da1faec
1,314
py
Python
ca_on_wellesley/people.py
dcycle/scrapers-ca
4c7a6cd01d603221b5b3b7a400d2e5ca0c6e916f
[ "MIT" ]
19
2015-05-26T03:18:50.000Z
2022-01-31T03:27:41.000Z
ca_on_wellesley/people.py
dcycle/scrapers-ca
4c7a6cd01d603221b5b3b7a400d2e5ca0c6e916f
[ "MIT" ]
119
2015-01-09T06:09:35.000Z
2022-01-20T23:05:05.000Z
ca_on_wellesley/people.py
dcycle/scrapers-ca
4c7a6cd01d603221b5b3b7a400d2e5ca0c6e916f
[ "MIT" ]
17
2015-11-23T05:00:10.000Z
2021-09-15T16:03:33.000Z
from utils import CanadianScraper, CanadianPerson as Person import re COUNCIL_PAGE = 'http://www.wellesley.ca/council/councillors/?q=council/councillors'
34.578947
95
0.571537
from utils import CanadianScraper, CanadianPerson as Person import re COUNCIL_PAGE = 'http://www.wellesley.ca/council/councillors/?q=council/councillors' def post_number(name): return { 'Ward One': 'Ward 1', 'Ward Two': 'Ward 2', 'Ward Three': 'Ward 3', 'Ward Four': 'Ward 4' }...
1,060
25
72
fb53dcf3b5f85da5350281d96e99a77c6877114e
1,261
py
Python
api/client/src/test/test_update_cluster_bad_request_exception_response_content.py
maclema/aws-parallelcluster
ade6e5e76201ee43c6e222fcd1c2891aba938838
[ "Apache-2.0" ]
415
2018-11-13T15:02:15.000Z
2022-03-31T15:26:06.000Z
api/client/src/test/test_update_cluster_bad_request_exception_response_content.py
maclema/aws-parallelcluster
ade6e5e76201ee43c6e222fcd1c2891aba938838
[ "Apache-2.0" ]
2,522
2018-11-13T16:16:27.000Z
2022-03-31T13:57:10.000Z
api/client/src/test/test_update_cluster_bad_request_exception_response_content.py
yuleiwan/aws-parallelcluster
aad2a3019ef4ad08d702f5acf41b152b3f7a0b46
[ "Apache-2.0" ]
164
2018-11-14T22:47:46.000Z
2022-03-22T11:33:22.000Z
""" ParallelCluster ParallelCluster API # noqa: E501 The version of the OpenAPI document: 3.0.0 Generated by: https://openapi-generator.tech """ import sys import unittest import pcluster.client from pcluster.client.model.change import Change from pcluster.client.model.config_validation_message im...
30.02381
135
0.77954
""" ParallelCluster ParallelCluster API # noqa: E501 The version of the OpenAPI document: 3.0.0 Generated by: https://openapi-generator.tech """ import sys import unittest import pcluster.client from pcluster.client.model.change import Change from pcluster.client.model.config_validation_message im...
19
0
54
87793261619b7cb430625fdd5dd5441808c7b619
2,864
py
Python
qiskit/providers/aer/pulse/de_solvers/pulse_de_solver.py
SooluThomas/qiskit-aer
1602b1cc35a18f5a008c38433f607c7ad0870ce9
[ "Apache-2.0" ]
1
2019-05-19T10:30:03.000Z
2019-05-19T10:30:03.000Z
qiskit/providers/aer/pulse/de_solvers/pulse_de_solver.py
stefan-woerner/qiskit-aer
cef92153dad6e9acded627b2e3cb10c5a1d7851a
[ "Apache-2.0" ]
null
null
null
qiskit/providers/aer/pulse/de_solvers/pulse_de_solver.py
stefan-woerner/qiskit-aer
cef92153dad6e9acded627b2e3cb10c5a1d7851a
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2018, 2019, 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. #...
33.302326
77
0.641411
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2018, 2019, 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. #...
176
0
26
8424167fac0970dd1983c3a928d7777a5ac90453
190
py
Python
TEST/RPLCD_CharLCD.py
sireline/raspi
f3f1879d3c8cc4e702b8f0f7c5fcc4d9bf5901c1
[ "MIT" ]
null
null
null
TEST/RPLCD_CharLCD.py
sireline/raspi
f3f1879d3c8cc4e702b8f0f7c5fcc4d9bf5901c1
[ "MIT" ]
1
2019-03-14T11:42:15.000Z
2019-03-14T11:42:15.000Z
TEST/RPLCD_CharLCD.py
sireline/raspi
f3f1879d3c8cc4e702b8f0f7c5fcc4d9bf5901c1
[ "MIT" ]
null
null
null
from RPLCD import CharLCD import RPi.GPIO as GPIO lcd = CharLCD(numbering_mode=GPIO.BOARD, cols=16, rows=2, pin_rs=37, pin_e=35, pins_data=[33, 31, 29, 23]) lcd.write_string(u'Hello World')
38
106
0.752632
from RPLCD import CharLCD import RPi.GPIO as GPIO lcd = CharLCD(numbering_mode=GPIO.BOARD, cols=16, rows=2, pin_rs=37, pin_e=35, pins_data=[33, 31, 29, 23]) lcd.write_string(u'Hello World')
0
0
0
30ac7343bb8e51ff66295aa68294f848fe139c9b
14,856
py
Python
indicators/tests/iptt_tests/indicator_report_data_queries.py
mercycorps/toladata
4d5f9b45905a81af9981b586690e020d5b3bfc60
[ "Apache-2.0" ]
null
null
null
indicators/tests/iptt_tests/indicator_report_data_queries.py
mercycorps/toladata
4d5f9b45905a81af9981b586690e020d5b3bfc60
[ "Apache-2.0" ]
268
2020-03-31T15:46:59.000Z
2022-03-31T18:01:08.000Z
indicators/tests/iptt_tests/indicator_report_data_queries.py
mercycorps/toladata
4d5f9b45905a81af9981b586690e020d5b3bfc60
[ "Apache-2.0" ]
1
2021-01-05T01:58:24.000Z
2021-01-05T01:58:24.000Z
"""Tests for the IPTT Report Data Indicators (TP/TVA) to ensure their query counts stay O(n) and not O(n^2) - api_report_data takes program_pk and frequency, calls IPTT<TVA/TP>ReportIndicatorSerializer.load_report - IPTT<TVA/TP>ReportIndicatorSerializer.load_report takes program_pk and frequency - quer...
54.021818
117
0.580506
"""Tests for the IPTT Report Data Indicators (TP/TVA) to ensure their query counts stay O(n) and not O(n^2) - api_report_data takes program_pk and frequency, calls IPTT<TVA/TP>ReportIndicatorSerializer.load_report - IPTT<TVA/TP>ReportIndicatorSerializer.load_report takes program_pk and frequency - quer...
13,250
158
23
5dfc3ef0fa75c74b1c61d2f529a6109260b3259f
4,081
py
Python
MAOL/personal_list/models.py
noxlock/my-anime-openings-list
4ab7660f226af5f06b941c657b8ff611ec8c63bc
[ "MIT" ]
null
null
null
MAOL/personal_list/models.py
noxlock/my-anime-openings-list
4ab7660f226af5f06b941c657b8ff611ec8c63bc
[ "MIT" ]
4
2021-12-31T07:56:10.000Z
2021-12-31T09:43:27.000Z
MAOL/personal_list/models.py
noxlock/my-anime-openings-list
4ab7660f226af5f06b941c657b8ff611ec8c63bc
[ "MIT" ]
null
null
null
from django.db import models from django.db.models.signals import post_save from django.contrib.auth.models import User from django.core.validators import MaxValueValidator from imagekit.models import ProcessedImageField from imagekit.processors import ResizeToFill from home.models import ModelAbstract, Song class ...
30.684211
114
0.666503
from django.db import models from django.db.models.signals import post_save from django.contrib.auth.models import User from django.core.validators import MaxValueValidator from imagekit.models import ProcessedImageField from imagekit.processors import ResizeToFill from home.models import ModelAbstract, Song class ...
339
179
152
9afa88946cd84c21fe6fd73d3c1f70f534351283
192
py
Python
backend/app/db/mongodb.py
soumitdas/xmeme
a0a39c55e1cb11f9cd3d001f88df88d2913efbd9
[ "MIT" ]
null
null
null
backend/app/db/mongodb.py
soumitdas/xmeme
a0a39c55e1cb11f9cd3d001f88df88d2913efbd9
[ "MIT" ]
null
null
null
backend/app/db/mongodb.py
soumitdas/xmeme
a0a39c55e1cb11f9cd3d001f88df88d2913efbd9
[ "MIT" ]
null
null
null
from motor.motor_asyncio import AsyncIOMotorClient db = Database()
21.333333
50
0.776042
from motor.motor_asyncio import AsyncIOMotorClient class Database: client: AsyncIOMotorClient = None db = Database() async def get_database() -> AsyncIOMotorClient: return db.client
47
32
46
1873b48a08443ccfc17f1f4b9fdf04d22a02923d
2,785
py
Python
shrinky/glsl_block_struct.py
xyproto/shrinky
8f318d2f62f8ef3cffae6bd5db1b36c95067aac6
[ "BSD-3-Clause" ]
11
2019-03-16T11:03:50.000Z
2021-12-26T12:41:57.000Z
shrinky/glsl_block_struct.py
xyproto/shrinky
8f318d2f62f8ef3cffae6bd5db1b36c95067aac6
[ "BSD-3-Clause" ]
1
2022-02-12T16:22:37.000Z
2022-02-12T16:22:37.000Z
shrinky/glsl_block_struct.py
xyproto/shrinky
8f318d2f62f8ef3cffae6bd5db1b36c95067aac6
[ "BSD-3-Clause" ]
null
null
null
from shrinky.glsl_block import GlslBlock from shrinky.glsl_block import extract_tokens from shrinky.glsl_block_member import glsl_parse_member_list ######################################## # GlslBlockStruct ###################### ######################################## class GlslBlockStruct(GlslBlock): """Struc...
30.944444
98
0.560144
from shrinky.glsl_block import GlslBlock from shrinky.glsl_block import extract_tokens from shrinky.glsl_block_member import glsl_parse_member_list ######################################## # GlslBlockStruct ###################### ######################################## class GlslBlockStruct(GlslBlock): """Struc...
0
0
0
1a50f81d932843336b3e69b5e740b3960191e4df
638
py
Python
wtiproj04/zad_6_mean_user.py
kwitnacy/wti
9ee659bf2912f5b2fe6229bbda5074d4f3ebb3d4
[ "Apache-2.0" ]
null
null
null
wtiproj04/zad_6_mean_user.py
kwitnacy/wti
9ee659bf2912f5b2fe6229bbda5074d4f3ebb3d4
[ "Apache-2.0" ]
null
null
null
wtiproj04/zad_6_mean_user.py
kwitnacy/wti
9ee659bf2912f5b2fe6229bbda5074d4f3ebb3d4
[ "Apache-2.0" ]
null
null
null
import pandas as pd import numpy as np from typing import List user_ID = 78 query = 'userID == ' + str(user_ID) # head = my_join() head = ['Action', 'Adventure', 'Animation', 'Children', 'Comedy', 'Crime', 'Documentary', 'Drama', 'Fantasy', 'Film-Noir', 'Horror', 'IMAX', 'Musical', 'Mystery', 'Romance', 'Sci-Fi', 'Sh...
39.875
222
0.661442
import pandas as pd import numpy as np from typing import List user_ID = 78 query = 'userID == ' + str(user_ID) # head = my_join() head = ['Action', 'Adventure', 'Animation', 'Children', 'Comedy', 'Crime', 'Documentary', 'Drama', 'Fantasy', 'Film-Noir', 'Horror', 'IMAX', 'Musical', 'Mystery', 'Romance', 'Sci-Fi', 'Sh...
0
0
0
7a5e99161a963ae3dbd40cd45ad6fc98263f2ffb
1,698
py
Python
uPython/clock/main.py
c3dprk/split-flap
0b4a8bc4e540f38ad24d0b790ed6268a0b832a2f
[ "MIT" ]
13
2017-12-11T12:25:49.000Z
2022-03-02T11:44:09.000Z
uPython/clock/main.py
c3dprk/split-flap
0b4a8bc4e540f38ad24d0b790ed6268a0b832a2f
[ "MIT" ]
null
null
null
uPython/clock/main.py
c3dprk/split-flap
0b4a8bc4e540f38ad24d0b790ed6268a0b832a2f
[ "MIT" ]
6
2018-01-01T16:15:48.000Z
2020-04-07T23:44:03.000Z
from machine import Pin, RTC from time import sleep, sleep_ms, sleep_us from json import load as jload from ntptime import settime ADDR_DELAY_US = 100 GOTO_DELAY_MS = 20 HOUR_LUT = jload(open("hour_lut.json")) MINUTE_LUT = jload(open("minute_lut.json")) TIME_ZONE = +2 encoder_pins = [Pin(i, Pin.IN, Pin.PULL_UP) for i...
19.744186
74
0.59894
from machine import Pin, RTC from time import sleep, sleep_ms, sleep_us from json import load as jload from ntptime import settime ADDR_DELAY_US = 100 GOTO_DELAY_MS = 20 HOUR_LUT = jload(open("hour_lut.json")) MINUTE_LUT = jload(open("minute_lut.json")) TIME_ZONE = +2 encoder_pins = [Pin(i, Pin.IN, Pin.PULL_UP) for i...
951
0
184
5cfc29885daabd72bd7e5d74a2904b6dbfab5b1f
866
py
Python
conftest.py
MatPoliquin/retro
c70c174a9818d1e97bc36e61abb4694d28fc68e1
[ "MIT-0", "MIT" ]
2,706
2018-04-05T18:28:50.000Z
2022-03-29T16:56:59.000Z
conftest.py
MatPoliquin/retro
c70c174a9818d1e97bc36e61abb4694d28fc68e1
[ "MIT-0", "MIT" ]
242
2018-04-05T22:30:42.000Z
2022-03-19T01:55:11.000Z
conftest.py
MatPoliquin/retro
c70c174a9818d1e97bc36e61abb4694d28fc68e1
[ "MIT-0", "MIT" ]
464
2018-04-05T19:10:34.000Z
2022-03-28T13:33:32.000Z
import pytest import retro.data inttypes = { 'exp': retro.data.Integrations.EXPERIMENTAL_ONLY, 'contrib': retro.data.Integrations.CONTRIB_ONLY, }
32.074074
129
0.572748
import pytest import retro.data inttypes = { 'exp': retro.data.Integrations.EXPERIMENTAL_ONLY, 'contrib': retro.data.Integrations.CONTRIB_ONLY, } def pytest_collection_modifyitems(items): def test(*args, **kwargs): print(kwargs) return False for item in items: if item.origina...
687
0
23
67146385598397f73fdfde407de56e453e1380c1
266
py
Python
examples/futures/market/funding_rate.py
AlfonsoAgAr/binance-futures-connector-python
f0bd2c7b0576503bf526ce6be329ca2dae90fefe
[ "MIT" ]
58
2021-11-22T11:46:27.000Z
2022-03-30T06:58:53.000Z
examples/futures/market/funding_rate.py
sanjeevan121/binance-futures-connector-python
d820b73a15e9f64c80891a13694ca0c5d1693b90
[ "MIT" ]
15
2021-12-15T22:40:52.000Z
2022-03-29T22:08:31.000Z
examples/futures/market/funding_rate.py
sanjeevan121/binance-futures-connector-python
d820b73a15e9f64c80891a13694ca0c5d1693b90
[ "MIT" ]
28
2021-12-10T03:56:13.000Z
2022-03-25T22:23:44.000Z
#!/usr/bin/env python from binance.futures import Futures as Client import logging from binance.lib.utils import config_logging config_logging(logging, logging.DEBUG) futures_client = Client() logging.info(futures_client.funding_rate("BTCUSDT",**{'limit':100}))
22.166667
68
0.793233
#!/usr/bin/env python from binance.futures import Futures as Client import logging from binance.lib.utils import config_logging config_logging(logging, logging.DEBUG) futures_client = Client() logging.info(futures_client.funding_rate("BTCUSDT",**{'limit':100}))
0
0
0
6a497cd03b5c018bcfd778acb4c7bc5cc9a8d147
7,904
py
Python
perfkitbenchmarker/providers/aws/aws_capacity_reservation.py
Nowasky/PerfKitBenchmarker
cfa88e269eb373780910896ed4bdc8db09469753
[ "Apache-2.0" ]
3
2018-04-28T13:06:14.000Z
2020-06-09T02:39:44.000Z
perfkitbenchmarker/providers/aws/aws_capacity_reservation.py
Nowasky/PerfKitBenchmarker
cfa88e269eb373780910896ed4bdc8db09469753
[ "Apache-2.0" ]
1
2021-09-09T07:43:25.000Z
2021-09-09T10:47:56.000Z
perfkitbenchmarker/providers/aws/aws_capacity_reservation.py
Nowasky/PerfKitBenchmarker
cfa88e269eb373780910896ed4bdc8db09469753
[ "Apache-2.0" ]
6
2019-06-11T18:59:57.000Z
2021-03-02T19:14:42.000Z
# Copyright 2019 PerfKitBenchmarker 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 appli...
39.52
80
0.711285
# Copyright 2019 PerfKitBenchmarker 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 appli...
460
70
94
cb4016d8c942b829044e83083af5b694d65e6752
519
py
Python
jieba-0.38/jieba/analyse/__init__.py
scmsqhn/changhongmall
41ce7a42e6484be0e4d4d3912b9e23b96a281d4a
[ "MIT" ]
2
2016-02-13T08:36:45.000Z
2017-05-07T22:43:34.000Z
jieba-0.38/jieba/analyse/__init__.py
scmsqhn/changhongmall
41ce7a42e6484be0e4d4d3912b9e23b96a281d4a
[ "MIT" ]
null
null
null
jieba-0.38/jieba/analyse/__init__.py
scmsqhn/changhongmall
41ce7a42e6484be0e4d4d3912b9e23b96a281d4a
[ "MIT" ]
null
null
null
from __future__ import absolute_import from .tfidf import TFIDF from .textrank import TextRank try: from .analyzer import ChineseAnalyzer except ImportError: pass default_tfidf = TFIDF() default_textrank = TextRank() extract_tags = tfidf = default_tfidf.extract_tags set_idf_path = default_tfidf.se...
27.315789
53
0.797688
from __future__ import absolute_import from .tfidf import TFIDF from .textrank import TextRank try: from .analyzer import ChineseAnalyzer except ImportError: pass default_tfidf = TFIDF() default_textrank = TextRank() extract_tags = tfidf = default_tfidf.extract_tags set_idf_path = default_tfidf.se...
120
0
25
267f7a0745f4981f02d8619bb346037688232eb9
12,792
py
Python
elastica/rod/factory_function.py
bhosale2/PyElastica
520374672cbd6b0c89a912c5019559e66c5535e3
[ "MIT" ]
null
null
null
elastica/rod/factory_function.py
bhosale2/PyElastica
520374672cbd6b0c89a912c5019559e66c5535e3
[ "MIT" ]
null
null
null
elastica/rod/factory_function.py
bhosale2/PyElastica
520374672cbd6b0c89a912c5019559e66c5535e3
[ "MIT" ]
null
null
null
__doc__ = """ Factory function to allocate variables for Cosserat Rod""" __all__ = ["allocate"] import typing from typing import Optional, Tuple import warnings import logging import numpy as np from numpy.testing import assert_allclose from elastica.utils import MaxDimension, Tolerance from elastica._linalg import _ba...
34.021277
123
0.636413
__doc__ = """ Factory function to allocate variables for Cosserat Rod""" __all__ = ["allocate"] import typing from typing import Optional, Tuple import warnings import logging import numpy as np from numpy.testing import assert_allclose from elastica.utils import MaxDimension, Tolerance from elastica._linalg import _ba...
10,412
0
69
edebf6391ea5ad0a5b7782e9f778bed9cb045eb3
356
py
Python
rl_vs_rand.py
yangmuzhi/wuziqi
7bdee51ef2a37373b0823b00c4536138560ec3bb
[ "MIT" ]
null
null
null
rl_vs_rand.py
yangmuzhi/wuziqi
7bdee51ef2a37373b0823b00c4536138560ec3bb
[ "MIT" ]
null
null
null
rl_vs_rand.py
yangmuzhi/wuziqi
7bdee51ef2a37373b0823b00c4536138560ec3bb
[ "MIT" ]
null
null
null
from env_wrapper import wzq_env from policy.rand_policy import rand_agent from policy.algo.ppo import PPO from policy.net.net_v0 import policy_net from policy.net.net_v0 import value_net from policy.rl_policy import ppo_agent import time import numpy as np agent0 = ppo_agent(size=15) agent1 = rand_agent(size=15) env =...
27.384615
41
0.814607
from env_wrapper import wzq_env from policy.rand_policy import rand_agent from policy.algo.ppo import PPO from policy.net.net_v0 import policy_net from policy.net.net_v0 import value_net from policy.rl_policy import ppo_agent import time import numpy as np agent0 = ppo_agent(size=15) agent1 = rand_agent(size=15) env =...
0
0
0
7f879e3d16877aed4273aa22fc10b7ba833b6e0c
2,494
py
Python
catalog/bindings/gmd/md_application_schema_information_type.py
NIVANorge/s-enda-playground
56ae0a8978f0ba8a5546330786c882c31e17757a
[ "Apache-2.0" ]
null
null
null
catalog/bindings/gmd/md_application_schema_information_type.py
NIVANorge/s-enda-playground
56ae0a8978f0ba8a5546330786c882c31e17757a
[ "Apache-2.0" ]
null
null
null
catalog/bindings/gmd/md_application_schema_information_type.py
NIVANorge/s-enda-playground
56ae0a8978f0ba8a5546330786c882c31e17757a
[ "Apache-2.0" ]
null
null
null
from dataclasses import dataclass, field from typing import Optional from bindings.gmd.abstract_object_type import AbstractObjectType from bindings.gmd.binary_property_type import BinaryPropertyType from bindings.gmd.character_string_property_type import CharacterStringPropertyType from bindings.gmd.ci_citation_type im...
31.974359
84
0.607859
from dataclasses import dataclass, field from typing import Optional from bindings.gmd.abstract_object_type import AbstractObjectType from bindings.gmd.binary_property_type import BinaryPropertyType from bindings.gmd.character_string_property_type import CharacterStringPropertyType from bindings.gmd.ci_citation_type im...
0
44
27
ff3169fa89df03f86c76a1e4195a8f9a48e7d51f
5,733
py
Python
semibandits/plotting_script.py
akshaykr/oracle_cb
68f10fce5eca8ebe3f57fd5a56a0ef8d82537ab4
[ "MIT" ]
26
2017-08-02T19:58:06.000Z
2021-11-03T06:31:01.000Z
semibandits/plotting_script.py
akshaykr/oracle_cb
68f10fce5eca8ebe3f57fd5a56a0ef8d82537ab4
[ "MIT" ]
1
2020-03-03T06:06:32.000Z
2020-03-03T06:06:32.000Z
semibandits/plotting_script.py
akshaykr/oracle_cb
68f10fce5eca8ebe3f57fd5a56a0ef8d82537ab4
[ "MIT" ]
10
2017-06-02T19:34:38.000Z
2022-03-22T10:38:51.000Z
import pickle import matplotlib.pyplot as plt import matplotlib.patches import matplotlib as mpl import numpy as np import sys, argparse sys.path.append("../") import Plotting Names = { 'mini_gb2': 'VC-GB2', 'mini_gb5': 'VC-GB5', 'mini_lin': 'VC-Lin', 'epsall_gb2': '$\epsilon$-GB2', 'epsall_gb5'...
33.331395
162
0.593581
import pickle import matplotlib.pyplot as plt import matplotlib.patches import matplotlib as mpl import numpy as np import sys, argparse sys.path.append("../") import Plotting Names = { 'mini_gb2': 'VC-GB2', 'mini_gb5': 'VC-GB5', 'mini_lin': 'VC-Lin', 'epsall_gb2': '$\epsilon$-GB2', 'epsall_gb5'...
0
0
0
010b5e0043bc5876ab1a0b032ec3c37d63f3d2ba
3,697
py
Python
pacmill/filtering/mothur_uchime.py
xapple/pacmill
1fde2316968251eaaf72618fd3d104ba524d6d12
[ "MIT" ]
null
null
null
pacmill/filtering/mothur_uchime.py
xapple/pacmill
1fde2316968251eaaf72618fd3d104ba524d6d12
[ "MIT" ]
null
null
null
pacmill/filtering/mothur_uchime.py
xapple/pacmill
1fde2316968251eaaf72618fd3d104ba524d6d12
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Written by Lucas Sinclair. MIT Licensed. Contact at www.sinclair.bio """ # Built-in modules # import os # First party modules # from fasta import FASTQ from plumbing.check_cmd_found import check_cmd from plumbing.cache import property_cached from autopaths...
34.231481
86
0.54693
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Written by Lucas Sinclair. MIT Licensed. Contact at www.sinclair.bio """ # Built-in modules # import os # First party modules # from fasta import FASTQ from plumbing.check_cmd_found import check_cmd from plumbing.cache import property_cached from autopaths...
1,871
0
106
098723ab33dce0dbfff39bd8321132e24734ccf0
6,980
py
Python
olypy/oio.py
akhand2222/olypy
d2b62a590c416a7d919e6e7bfcabf35873bc13c4
[ "Apache-2.0" ]
null
null
null
olypy/oio.py
akhand2222/olypy
d2b62a590c416a7d919e6e7bfcabf35873bc13c4
[ "Apache-2.0" ]
null
null
null
olypy/oio.py
akhand2222/olypy
d2b62a590c416a7d919e6e7bfcabf35873bc13c4
[ "Apache-2.0" ]
null
null
null
''' Read and write Olympia state files. ''' import os import os.path import sys from contextlib import redirect_stdout from .oid import to_oid from .formatters import print_one_thing, read_oly_file def fixup_ms(data): ''' For whatever reason, the value in IM/ms needs to have a trailing space ''' for...
30.21645
96
0.559312
''' Read and write Olympia state files. ''' import os import os.path import sys from contextlib import redirect_stdout from .oid import to_oid from .formatters import print_one_thing, read_oly_file def fixup_ms(data): ''' For whatever reason, the value in IM/ms needs to have a trailing space ''' for...
5,459
0
115
4ec1d714cb3bf6af4fe8c713411aefe484a53f23
589
py
Python
flat/announce/migrations/0002_auto_20150916_0830.py
bilbeyt/ITURO-Giant_Flat
5a3f766ab1394cefd3589a30c07b5a68b48be00e
[ "MIT" ]
null
null
null
flat/announce/migrations/0002_auto_20150916_0830.py
bilbeyt/ITURO-Giant_Flat
5a3f766ab1394cefd3589a30c07b5a68b48be00e
[ "MIT" ]
null
null
null
flat/announce/migrations/0002_auto_20150916_0830.py
bilbeyt/ITURO-Giant_Flat
5a3f766ab1394cefd3589a30c07b5a68b48be00e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations
22.653846
62
0.575552
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('announce', '0001_initial'), ] operations = [ migrations.RenameField( model_name='announce', old_name...
0
459
23
b8458625ce4634483d199c8fcd5007dd84bf4c6b
2,097
py
Python
CondTools/L1Trigger/python/L1ConfigTSCPayloads_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
852
2015-01-11T21:03:51.000Z
2022-03-25T21:14:00.000Z
CondTools/L1Trigger/python/L1ConfigTSCPayloads_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
30,371
2015-01-02T00:14:40.000Z
2022-03-31T23:26:05.000Z
CondTools/L1Trigger/python/L1ConfigTSCPayloads_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
3,240
2015-01-02T05:53:18.000Z
2022-03-31T17:24:21.000Z
from L1TriggerConfig.CSCTFConfigProducers.CSCTFConfigOnline_cfi import * #from L1TriggerConfig.CSCTFConfigProducers.CSCTFAlignmentOnline_cfi import * from L1TriggerConfig.CSCTFConfigProducers.L1MuCSCPtLutConfigOnline_cfi import * from L1TriggerConfig.DTTrackFinder.L1MuDTEtaPatternLutOnline_cfi import * from L1TriggerC...
59.914286
84
0.904149
from L1TriggerConfig.CSCTFConfigProducers.CSCTFConfigOnline_cfi import * #from L1TriggerConfig.CSCTFConfigProducers.CSCTFAlignmentOnline_cfi import * from L1TriggerConfig.CSCTFConfigProducers.L1MuCSCPtLutConfigOnline_cfi import * from L1TriggerConfig.DTTrackFinder.L1MuDTEtaPatternLutOnline_cfi import * from L1TriggerC...
0
0
0
9290a51e42313a8d3b64495f00e57922277cdd9a
1,366
py
Python
powerdnsadmin/models/domain_template_record.py
warf/PowerDNS-Admin
3bf6e6e9f119d2af7f2faff46c41a2152b84d3ab
[ "MIT" ]
1
2019-12-31T04:51:02.000Z
2019-12-31T04:51:02.000Z
powerdnsadmin/models/domain_template_record.py
warf/PowerDNS-Admin
3bf6e6e9f119d2af7f2faff46c41a2152b84d3ab
[ "MIT" ]
1
2021-03-11T06:55:41.000Z
2021-03-11T06:55:41.000Z
powerdnsadmin/models/domain_template_record.py
warf/PowerDNS-Admin
3bf6e6e9f119d2af7f2faff46c41a2152b84d3ab
[ "MIT" ]
null
null
null
from .base import db
29.695652
77
0.545388
from .base import db class DomainTemplateRecord(db.Model): __tablename__ = "domain_template_record" id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(255)) type = db.Column(db.String(64)) ttl = db.Column(db.Integer) data = db.Column(db.Text) comment = db.Column(db.Tex...
775
546
23
884efdb2fa9981926fc3d98ed7f25106e9e285d7
3,083
py
Python
test/math/TestUniverse.py
pulsar-chem/BPModule
f8e64e04fdb01947708f098e833600c459c2ff0e
[ "BSD-3-Clause" ]
null
null
null
test/math/TestUniverse.py
pulsar-chem/BPModule
f8e64e04fdb01947708f098e833600c459c2ff0e
[ "BSD-3-Clause" ]
null
null
null
test/math/TestUniverse.py
pulsar-chem/BPModule
f8e64e04fdb01947708f098e833600c459c2ff0e
[ "BSD-3-Clause" ]
null
null
null
import pulsar as psr
46.712121
87
0.725268
import pulsar as psr def run_test(): tester = psr.PyTester("Testing Universe Python Interface") #Constructors and assignment U0, U1=psr.DoubleUniverse(),psr.DoubleUniverse() tester.test_equal("Default constructor",U0,U1) U2=psr.DoubleUniverse([1.0,2.0,3.0]) U3=psr.DoubleUniverse([1.0,2.0,3.0])...
3,039
0
23
9215d936336e65cb6f3b980e5620414869829e05
354
py
Python
orchard/system_status/__init__.py
BMeu/Orchard
cd595c9942e4e1ad0032193059f2b39fdf3bcfba
[ "MIT" ]
2
2016-10-06T21:19:32.000Z
2016-10-06T21:58:04.000Z
orchard/system_status/__init__.py
BMeu/Orchard
cd595c9942e4e1ad0032193059f2b39fdf3bcfba
[ "MIT" ]
392
2016-10-06T17:13:30.000Z
2021-01-15T04:15:38.000Z
orchard/system_status/__init__.py
BMeu/Orchard
cd595c9942e4e1ad0032193059f2b39fdf3bcfba
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ This package includes the Flask blueprint and all related functionality for displaying system information. """ from .blueprint import blueprint from .status_item import StatusItem from .status_group import StatusGroup import orchard.system_status.views # NOQA __all__ = ['bluepri...
23.6
97
0.751412
# -*- coding: utf-8 -*- """ This package includes the Flask blueprint and all related functionality for displaying system information. """ from .blueprint import blueprint from .status_item import StatusItem from .status_group import StatusGroup import orchard.system_status.views # NOQA __all__ = ['bluepri...
0
0
0
e1f06e37830afaf38b03d65459b500198005e166
1,290
py
Python
PP4E/Examples/PP4E/Integrate/Embed/prioredition-2x/Inventory/validate1.py
BeacherHou/Python-_Markdown-
015d79a02d32f49395b80ca10919b3a09b72c4df
[ "MIT" ]
null
null
null
PP4E/Examples/PP4E/Integrate/Embed/prioredition-2x/Inventory/validate1.py
BeacherHou/Python-_Markdown-
015d79a02d32f49395b80ca10919b3a09b72c4df
[ "MIT" ]
null
null
null
PP4E/Examples/PP4E/Integrate/Embed/prioredition-2x/Inventory/validate1.py
BeacherHou/Python-_Markdown-
015d79a02d32f49395b80ca10919b3a09b72c4df
[ "MIT" ]
null
null
null
# embedded validation code, run from C # input vars: PRODUCT, QUANTITY, BUYER # output vars: ERRORS, WARNINGS import string # all python tools are available to embedded code import inventory # plus C extensions, Python modules, classes,.. msgs, errs = [], [] # warning, error messag...
43
79
0.624031
# embedded validation code, run from C # input vars: PRODUCT, QUANTITY, BUYER # output vars: ERRORS, WARNINGS import string # all python tools are available to embedded code import inventory # plus C extensions, Python modules, classes,.. msgs, errs = [], [] # warning, error messag...
408
0
25
7014bf2c3e6cadc190f879e6754e67fbb619c0e2
2,850
py
Python
examples/auracog_suggestions/sessions/sessions.py
Telefonica/clipspy
87d1d63604a209e2271efd3d3b8df0943836a504
[ "BSD-3-Clause" ]
null
null
null
examples/auracog_suggestions/sessions/sessions.py
Telefonica/clipspy
87d1d63604a209e2271efd3d3b8df0943836a504
[ "BSD-3-Clause" ]
null
null
null
examples/auracog_suggestions/sessions/sessions.py
Telefonica/clipspy
87d1d63604a209e2271efd3d3b8df0943836a504
[ "BSD-3-Clause" ]
null
null
null
from typing import Any, Dict, Iterable, List, Text from ..common import FeatureSet class SessionFeatureSet(FeatureSet): """ This class represents a session's set of features. """ def __init__(self, features: Dict[Text, Any], aura_id_name="AURA_ID", aura_id_global_name="AURA_ID_GLOBAL", ...
39.041096
117
0.659649
from typing import Any, Dict, Iterable, List, Text from ..common import FeatureSet class SessionFeatureSet(FeatureSet): """ This class represents a session's set of features. """ def __init__(self, features: Dict[Text, Any], aura_id_name="AURA_ID", aura_id_global_name="AURA_ID_GLOBAL", ...
164
0
78
f4d42441b96321040a54f16e2b431bb5d1c4b18d
3,334
py
Python
include/server/bw/tools/__init__.py
spacebeam/bw
8f975a2925f309b0038c876f1234595df9798c98
[ "Apache-2.0" ]
2
2019-10-30T04:26:21.000Z
2019-10-31T17:26:59.000Z
include/server/bw/tools/__init__.py
spacebeam/bw
8f975a2925f309b0038c876f1234595df9798c98
[ "Apache-2.0" ]
22
2019-08-21T17:13:45.000Z
2020-08-06T00:38:56.000Z
include/server/bw/tools/__init__.py
spacebeam/bw
8f975a2925f309b0038c876f1234595df9798c98
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # This file is part of bw. # Distributed under the terms of the last AGPL License. __author__ = 'Jean Chassoul' import arrow import ujson as json import logging import uuid from tornado import gen def validate_uuid4(uuid_string): ''' Validate that a UUID string is in ...
21.934211
69
0.588482
# -*- coding: utf-8 -*- # This file is part of bw. # Distributed under the terms of the last AGPL License. __author__ = 'Jean Chassoul' import arrow import ujson as json import logging import uuid from tornado import gen def validate_uuid4(uuid_string): ''' Validate that a UUID string is in ...
0
0
0
2aa9e4e31a22f81d608b3540fff2696084e6a97e
5,586
py
Python
pyox/webhdfs.py
alexmilowski/webhdfs
c549f2db2f05fbe2348117870522c519c8da4613
[ "Apache-2.0" ]
8
2018-10-25T04:31:22.000Z
2021-08-05T20:12:14.000Z
pyox/webhdfs.py
alexmilowski/webhdfs
c549f2db2f05fbe2348117870522c519c8da4613
[ "Apache-2.0" ]
5
2018-02-09T08:34:08.000Z
2018-03-22T18:56:17.000Z
pyox/webhdfs.py
alexmilowski/webhdfs
c549f2db2f05fbe2348117870522c519c8da4613
[ "Apache-2.0" ]
5
2019-01-29T19:17:53.000Z
2020-12-30T15:47:17.000Z
from pyox.client import Client, ServiceError
37.24
113
0.61493
from pyox.client import Client, ServiceError def absolute_path(path): if len(path)>0 and path[0]!='/': path = '/'+path return path class WebHDFS(Client): def __init__(self,**kwargs): super().__init__(**kwargs) self.service = 'webhdfs' self.read_chunk_size = 65536 def list_direct...
5,259
1
280
356caf4ee17cfa856f9452e5b81fc78885d6f859
122
py
Python
utils/poweroff_restart.py
ndkjing/usv
132e021432a0344a22914aaf68da7d7955d7331f
[ "MIT" ]
null
null
null
utils/poweroff_restart.py
ndkjing/usv
132e021432a0344a22914aaf68da7d7955d7331f
[ "MIT" ]
null
null
null
utils/poweroff_restart.py
ndkjing/usv
132e021432a0344a22914aaf68da7d7955d7331f
[ "MIT" ]
1
2021-09-04T10:27:30.000Z
2021-09-04T10:27:30.000Z
from os import system # 重启电脑
11.090909
31
0.655738
from os import system # 重启电脑 def restart(): system('sudo reboot') def poweroff(): system('sudo shutdown now')
45
0
45
33b53b231a99d94ff5cc752b86bbc0159b2e1fb3
17,472
py
Python
pyctrl/flask/server.py
ComplexArts/pyctrl-core
a72bd53924410c2e7f1e71c8188a0391550febdd
[ "Apache-2.0" ]
12
2017-06-20T13:20:40.000Z
2021-01-18T00:12:10.000Z
pyctrl/flask/server.py
mcdeoliveira/beaglebone
6c6062c6d1e9902178500abcd10be6ac0bcf043d
[ "Apache-2.0" ]
2
2017-06-12T15:17:24.000Z
2018-01-30T18:22:19.000Z
pyctrl/flask/server.py
mcdeoliveira/beaglebone
6c6062c6d1e9902178500abcd10be6ac0bcf043d
[ "Apache-2.0" ]
4
2017-09-25T12:19:19.000Z
2019-01-31T21:46:24.000Z
from flask import Flask, request, render_template, jsonify, make_response, redirect, flash, url_for from functools import wraps import re import pyctrl from pyctrl.block import Logger import warnings import importlib import traceback, sys, io from pyctrl.flask import JSONEncoder, JSONDecoder encoder = JSONEncoder(so...
33.926214
129
0.54802
from flask import Flask, request, render_template, jsonify, make_response, redirect, flash, url_for from functools import wraps import re import pyctrl from pyctrl.block import Logger import warnings import importlib import traceback, sys, io from pyctrl.flask import JSONEncoder, JSONDecoder encoder = JSONEncoder(so...
14,217
2,037
111
0dc7c93fd4a387857947da414073d7a073aa653c
1,925
py
Python
posts/api/views.py
loafbaker/django_blog
abd912962318527473654c9d2043f4a361a4abf1
[ "MIT" ]
null
null
null
posts/api/views.py
loafbaker/django_blog
abd912962318527473654c9d2043f4a361a4abf1
[ "MIT" ]
null
null
null
posts/api/views.py
loafbaker/django_blog
abd912962318527473654c9d2043f4a361a4abf1
[ "MIT" ]
null
null
null
from django.db.models import Q from rest_framework.filters import SearchFilter, OrderingFilter from rest_framework.generics import ListAPIView, CreateAPIView, RetrieveAPIView, RetrieveUpdateAPIView, DestroyAPIView from rest_framework.permissions import IsAuthenticated, IsAuthenticatedOrReadOnly from posts.models impor...
36.320755
118
0.818182
from django.db.models import Q from rest_framework.filters import SearchFilter, OrderingFilter from rest_framework.generics import ListAPIView, CreateAPIView, RetrieveAPIView, RetrieveUpdateAPIView, DestroyAPIView from rest_framework.permissions import IsAuthenticated, IsAuthenticatedOrReadOnly from posts.models impor...
366
932
115
5f6900da0b97f7cb9568e67607b74fc2b4feca0c
3,732
py
Python
proxy-alpha.py
ARTRoyale/ZapRoyale
984d72ee942b29f18250eae130d083d29151bd68
[ "MIT" ]
null
null
null
proxy-alpha.py
ARTRoyale/ZapRoyale
984d72ee942b29f18250eae130d083d29151bd68
[ "MIT" ]
null
null
null
proxy-alpha.py
ARTRoyale/ZapRoyale
984d72ee942b29f18250eae130d083d29151bd68
[ "MIT" ]
null
null
null
# by ARTRoyale (A. Lebedev) for ZapRoyale import socket import threading import struct import os import uuid import random # начинаем дебаг global debugmode debugmode = True global gl_server_address gl_server_address = ('***.***.*.**', 9339) if __name__ == "__main__": port_num = 9339 print('[IN...
32.172414
111
0.549303
# by ARTRoyale (A. Lebedev) for ZapRoyale import socket import threading import struct import os import uuid import random # начинаем дебаг global debugmode debugmode = True def debug(debmessage): if debmessage: if debugmode: print('[DEBUG]',debmessage) else: pass else:...
3,126
8
192
a5087d2093117c0c8a944443b7263a2f96effcb6
213
py
Python
api/api_scheme.py
raywu60kg/tensorlfow-project-demo
acd1085788da289ec7ed21ec0d46c9599188e32c
[ "MIT" ]
null
null
null
api/api_scheme.py
raywu60kg/tensorlfow-project-demo
acd1085788da289ec7ed21ec0d46c9599188e32c
[ "MIT" ]
null
null
null
api/api_scheme.py
raywu60kg/tensorlfow-project-demo
acd1085788da289ec7ed21ec0d46c9599188e32c
[ "MIT" ]
null
null
null
from pydantic import BaseModel # class MetricsOutput(BaseModel): # name: str # metrics: dict
14.2
36
0.723005
from pydantic import BaseModel class HealthCheckOutput(BaseModel): health: bool # class MetricsOutput(BaseModel): # name: str # metrics: dict class RetrainModelOutput(BaseModel): train: bool
0
62
46
de32d45449405b3ec00b4326a7b6348906ee8392
742
py
Python
api/blueprints/users/views/roles.py
mohamed040406/API
40ceb2b35271938d90e4309a6cdcf63ba0c17f0b
[ "MIT" ]
1
2021-05-01T02:25:27.000Z
2021-05-01T02:25:27.000Z
api/blueprints/users/views/roles.py
mohamed040406/API
40ceb2b35271938d90e4309a6cdcf63ba0c17f0b
[ "MIT" ]
null
null
null
api/blueprints/users/views/roles.py
mohamed040406/API
40ceb2b35271938d90e4309a6cdcf63ba0c17f0b
[ "MIT" ]
null
null
null
from quart import request, jsonify import time from api.models import User from .. import bp import utils request: utils.Request @bp.route("/<int:user_id>/roles", methods=["GET"]) @utils.auth_required async def fetch_user_roles(user_id: int): """Fetch the specific users roles""" query = """ SELECT j...
24.733333
66
0.617251
from quart import request, jsonify import time from api.models import User from .. import bp import utils request: utils.Request @bp.route("/<int:user_id>/roles", methods=["GET"]) @utils.auth_required async def fetch_user_roles(user_id: int): """Fetch the specific users roles""" query = """ SELECT j...
0
0
0
d262a3348286d2c2acf7e83331728949dbe00b99
2,328
py
Python
mkgta.py
shaun95/Tacotron2-PyTorch
b1761fd7660e56adf39f3c8d02852fbaec1da2c5
[ "MIT" ]
1
2022-03-10T20:02:58.000Z
2022-03-10T20:02:58.000Z
mkgta.py
shaun95/Tacotron2-PyTorch
b1761fd7660e56adf39f3c8d02852fbaec1da2c5
[ "MIT" ]
null
null
null
mkgta.py
shaun95/Tacotron2-PyTorch
b1761fd7660e56adf39f3c8d02852fbaec1da2c5
[ "MIT" ]
null
null
null
import os import torch import argparse import numpy as np import matplotlib.pylab as plt from text import text_to_sequence from model.model import Tacotron2 from hparams import hparams as hps from utils.util import mode, to_var, to_arr from utils.audio import load_wav, save_wav, melspectrogram if __name__ == '__m...
31.04
75
0.627577
import os import torch import argparse import numpy as np import matplotlib.pylab as plt from text import text_to_sequence from model.model import Tacotron2 from hparams import hparams as hps from utils.util import mode, to_var, to_arr from utils.audio import load_wav, save_wav, melspectrogram def files_to_list(fdir ...
1,224
0
92
78a847a9735c69df68fbcc09cc32244397b197f6
5,580
py
Python
doors-detector/doors_detector/dataset/dataset_doors_final/datasets_creator_doors_final.py
micheleantonazzi/master-thesis-robust-door-detector
685c2d13a6617978c8fc0324e92aab82f5a04b85
[ "Apache-2.0" ]
null
null
null
doors-detector/doors_detector/dataset/dataset_doors_final/datasets_creator_doors_final.py
micheleantonazzi/master-thesis-robust-door-detector
685c2d13a6617978c8fc0324e92aab82f5a04b85
[ "Apache-2.0" ]
null
null
null
doors-detector/doors_detector/dataset/dataset_doors_final/datasets_creator_doors_final.py
micheleantonazzi/master-thesis-robust-door-detector
685c2d13a6617978c8fc0324e92aab82f5a04b85
[ "Apache-2.0" ]
null
null
null
from typing import Union, Tuple import pandas as pd from sklearn.utils import shuffle from doors_detector.dataset.torch_dataset import TRAIN_SET, TEST_SET, SET from generic_dataset.dataset_manager import DatasetManager from doors_detector.dataset.dataset_doors_final.door_sample import DoorSample, DOOR_LABELS from skl...
54.174757
174
0.682437
from typing import Union, Tuple import pandas as pd from sklearn.utils import shuffle from doors_detector.dataset.torch_dataset import TRAIN_SET, TEST_SET, SET from generic_dataset.dataset_manager import DatasetManager from doors_detector.dataset.dataset_doors_final.door_sample import DoorSample, DOOR_LABELS from skl...
1,162
3,936
23
005dfd3bd6b99b749c3643626e7c275bbe2acb28
1,251
py
Python
com/Leetcode/981.TimeBasedKey-ValueStore.py
samkitsheth95/InterviewPrep
6be68c19bcaab4e64a8f646cc64f651bade8ba86
[ "MIT" ]
null
null
null
com/Leetcode/981.TimeBasedKey-ValueStore.py
samkitsheth95/InterviewPrep
6be68c19bcaab4e64a8f646cc64f651bade8ba86
[ "MIT" ]
null
null
null
com/Leetcode/981.TimeBasedKey-ValueStore.py
samkitsheth95/InterviewPrep
6be68c19bcaab4e64a8f646cc64f651bade8ba86
[ "MIT" ]
null
null
null
from collections import defaultdict from bisect import bisect # Your TimeMap object will be instantiated and called as such: # obj = TimeMap() # obj.set(key,value,timestamp) # param_2 = obj.get(key,timestamp)
25.02
64
0.513189
from collections import defaultdict from bisect import bisect class TimeMap: def binarySearch(self, a, key): if key < a[0][1]: return '' elif key >= a[-1][1]: return a[-1][0] low = 0 high = len(a) - 1 while low <= high: mid = low + (hi...
786
230
23
5017ac97f2b5056a11800f28fde484ec4a35c1b3
8,797
py
Python
sstvis.py
mdjong1/sstvis
927590b1295491a062a77634008a9146e783c617
[ "MIT" ]
null
null
null
sstvis.py
mdjong1/sstvis
927590b1295491a062a77634008a9146e783c617
[ "MIT" ]
null
null
null
sstvis.py
mdjong1/sstvis
927590b1295491a062a77634008a9146e783c617
[ "MIT" ]
null
null
null
import fileinput import sys import math import time import os import click # prevent pygame from printing their welcome message os.environ['PYGAME_HIDE_SUPPORT_PROMPT'] = "hide" import pygame # Define some basic colors for easy use white = (255, 255, 255) red = (255, 0, 0) black = (0, 0, 0) green = (0, 255, 0) blue =...
35.615385
128
0.630329
import fileinput import sys import math import time import os import click # prevent pygame from printing their welcome message os.environ['PYGAME_HIDE_SUPPORT_PROMPT'] = "hide" import pygame # Define some basic colors for easy use white = (255, 255, 255) red = (255, 0, 0) black = (0, 0, 0) green = (0, 255, 0) blue =...
5,526
-13
228
c566c62bfc91343391f87b835b9e079719e2045b
24,813
py
Python
neo4j/_async/io/_bolt.py
matilda-me/neo4j-python-driver
4fb25a266841bf2a861f00d5dcf257bd5ae5c686
[ "Apache-2.0" ]
null
null
null
neo4j/_async/io/_bolt.py
matilda-me/neo4j-python-driver
4fb25a266841bf2a861f00d5dcf257bd5ae5c686
[ "Apache-2.0" ]
null
null
null
neo4j/_async/io/_bolt.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...
35.548711
95
0.614476
# 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...
5,741
0
405
9578398d67c4ab380e45b5e1357b9a225ddd1afc
1,633
py
Python
examples/ex09/process.py
oditorium/PageBuilder
74fa95285d41ed390f46f22129a45900c1d8b474
[ "MIT" ]
null
null
null
examples/ex09/process.py
oditorium/PageBuilder
74fa95285d41ed390f46f22129a45900c1d8b474
[ "MIT" ]
null
null
null
examples/ex09/process.py
oditorium/PageBuilder
74fa95285d41ed390f46f22129a45900c1d8b474
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """ process data generated by PageBuilder """ import json INFN = "document.json" OUTFN = "_DATA.json" print ("PROCESSING ===========================================================") ######################################################################## ## READING THE INPUT FILE print ("...
27.677966
80
0.509492
#!/usr/bin/env python3 """ process data generated by PageBuilder """ import json INFN = "document.json" OUTFN = "_DATA.json" print ("PROCESSING ===========================================================") ######################################################################## ## READING THE INPUT FILE print ("...
0
0
0
18e2ff9e48d9884824271b259f5494d590944f7d
48
py
Python
cyder/api/v1/endpoints/dhcp/vrf/__init__.py
drkitty/cyder
1babc443cc03aa51fa3c1015bcd22f0ea2e5f0f8
[ "BSD-3-Clause" ]
6
2015-04-16T23:18:22.000Z
2020-08-25T22:50:13.000Z
cyder/api/v1/endpoints/dhcp/vrf/__init__.py
drkitty/cyder
1babc443cc03aa51fa3c1015bcd22f0ea2e5f0f8
[ "BSD-3-Clause" ]
267
2015-01-01T00:18:57.000Z
2015-10-14T00:01:13.000Z
cyder/api/v1/endpoints/dhcp/vrf/__init__.py
drkitty/cyder
1babc443cc03aa51fa3c1015bcd22f0ea2e5f0f8
[ "BSD-3-Clause" ]
5
2015-03-23T00:57:09.000Z
2019-09-09T22:42:37.000Z
from cyder.api.v1.endpoints.dhcp.vrf import api
24
47
0.8125
from cyder.api.v1.endpoints.dhcp.vrf import api
0
0
0
8a8cfc04c5c7ae8b231f967292f73edd9f04f568
141
py
Python
oogli/Texture.py
brianbruggeman/oogli
6a6f681468d609035924ede27d895afcc9d432b6
[ "Apache-2.0" ]
3
2016-01-18T22:10:51.000Z
2016-06-10T16:02:55.000Z
oogli/Texture.py
brianbruggeman/oogli
6a6f681468d609035924ede27d895afcc9d432b6
[ "Apache-2.0" ]
null
null
null
oogli/Texture.py
brianbruggeman/oogli
6a6f681468d609035924ede27d895afcc9d432b6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*-
15.666667
38
0.560284
#!/usr/bin/env python # -*- coding: utf-8 -*- class Texture(object): def __init__(self, *args, **kwds): '''TODO: something'''
0
71
23
a2787fee555cd02e69dfc120dfda3be28257df6b
2,548
py
Python
pyramids/rules/token_set.py
leomauro/pyramids
4f7a8e97e13a5ee0b037dc528e5ba72f31ac36e5
[ "MIT" ]
9
2015-09-04T22:33:40.000Z
2019-04-11T14:05:11.000Z
pyramids/rules/token_set.py
leomauro/pyramids
4f7a8e97e13a5ee0b037dc528e5ba72f31ac36e5
[ "MIT" ]
2
2015-09-04T22:31:44.000Z
2017-07-29T04:11:53.000Z
pyramids/rules/token_set.py
hosford42/pyramids
4f7a8e97e13a5ee0b037dc528e5ba72f31ac36e5
[ "MIT" ]
3
2015-10-14T12:41:26.000Z
2022-01-08T19:43:47.000Z
import os from sys import intern from typing import Iterable, FrozenSet, Optional from pyramids.categorization import Category from pyramids.rules.leaf import LeafRule from pyramids.word_sets import WordSetUtils
37.470588
100
0.642072
import os from sys import intern from typing import Iterable, FrozenSet, Optional from pyramids.categorization import Category from pyramids.rules.leaf import LeafRule from pyramids.word_sets import WordSetUtils class SetRule(LeafRule): @classmethod def from_word_set(cls, file_path: str, verbose: bool = Fal...
1,290
1,021
23
fc7058a10d7e658bef7595f63f5638b9966e1a4c
6,236
py
Python
neutron/common/config.py
plumgrid/plumgrid-quantum
dbd7e472ca28d22d694eeeba47e0738985583961
[ "Apache-2.0" ]
1
2016-04-23T21:33:31.000Z
2016-04-23T21:33:31.000Z
neutron/common/config.py
plumgrid/plumgrid-quantum
dbd7e472ca28d22d694eeeba47e0738985583961
[ "Apache-2.0" ]
null
null
null
neutron/common/config.py
plumgrid/plumgrid-quantum
dbd7e472ca28d22d694eeeba47e0738985583961
[ "Apache-2.0" ]
4
2015-04-14T10:06:51.000Z
2019-10-02T01:28:34.000Z
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 Nicira Networks, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apac...
39.974359
78
0.657473
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 Nicira Networks, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apac...
362
0
23
b12bdd3b7613ac6f1ca82e2ac22d65ec1929d997
3,978
py
Python
code/tmp_rtrip/test/test_structmembers.py
emilyemorehouse/ast-and-me
3f58117512e125e1ecbe3c72f2f0d26adb80b7b3
[ "MIT" ]
24
2018-01-23T05:28:40.000Z
2021-04-13T20:52:59.000Z
code/tmp_rtrip/test/test_structmembers.py
emilyemorehouse/ast-and-me
3f58117512e125e1ecbe3c72f2f0d26adb80b7b3
[ "MIT" ]
17
2017-12-21T18:32:31.000Z
2018-12-18T17:09:50.000Z
code/tmp_rtrip/test/test_structmembers.py
emilyemorehouse/ast-and-me
3f58117512e125e1ecbe3c72f2f0d26adb80b7b3
[ "MIT" ]
null
null
null
import unittest from test import support support.import_module('_testcapi') from _testcapi import _test_structmembersType, CHAR_MAX, CHAR_MIN, UCHAR_MAX, SHRT_MAX, SHRT_MIN, USHRT_MAX, INT_MAX, INT_MIN, UINT_MAX, LONG_MAX, LONG_MIN, ULONG_MAX, LLONG_MAX, LLONG_MIN, ULLONG_MAX, PY_SSIZE_T_MAX, PY_SSIZE_T_MIN ts = _test_...
35.20354
232
0.65083
import unittest from test import support support.import_module('_testcapi') from _testcapi import _test_structmembersType, CHAR_MAX, CHAR_MIN, UCHAR_MAX, SHRT_MAX, SHRT_MIN, USHRT_MAX, INT_MAX, INT_MIN, UINT_MAX, LONG_MAX, LONG_MIN, ULONG_MAX, LLONG_MAX, LLONG_MIN, ULLONG_MAX, PY_SSIZE_T_MAX, PY_SSIZE_T_MIN ts = _test_...
2,956
356
208
ace8a02a07baa1d3676ee33620ccb26e1bf748c5
5,705
py
Python
src/predict.py
jamesmcclain/algae-model
45e3e83544034022aba16ad1ed254f1445e4bb1b
[ "MIT" ]
null
null
null
src/predict.py
jamesmcclain/algae-model
45e3e83544034022aba16ad1ed254f1445e4bb1b
[ "MIT" ]
null
null
null
src/predict.py
jamesmcclain/algae-model
45e3e83544034022aba16ad1ed254f1445e4bb1b
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import argparse import copy import logging import sys import warnings import numpy as np import rasterio as rio import torch import torch.hub import tqdm from rasterio.windows import Window BACKBONES = [ 'vgg16', 'densenet161', 'shufflenet_v2_x1_0', 'mobilenet_v2', 'mobilenet_v3_large'...
39.895105
107
0.564242
#!/usr/bin/env python3 import argparse import copy import logging import sys import warnings import numpy as np import rasterio as rio import torch import torch.hub import tqdm from rasterio.windows import Window BACKBONES = [ 'vgg16', 'densenet161', 'shufflenet_v2_x1_0', 'mobilenet_v2', 'mobilenet_v3_large'...
1,150
0
53
ed5cc620f755b91673991e6e44482f82fb01cfdf
669
py
Python
tz_detect/defaults.py
dkirkham/django-tz-detect
ec3c66a967e2518adf070bfd42a9076471f1bc2a
[ "MIT" ]
null
null
null
tz_detect/defaults.py
dkirkham/django-tz-detect
ec3c66a967e2518adf070bfd42a9076471f1bc2a
[ "MIT" ]
null
null
null
tz_detect/defaults.py
dkirkham/django-tz-detect
ec3c66a967e2518adf070bfd42a9076471f1bc2a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from django.conf import settings # How often to check TZ_DETECT_PERIOD = getattr(settings, 'TZ_DETECT_PERIOD', 3*3600) # Version of moment and moment-timezone to load TZ_DETECT_SCRIPTS = getattr(settings, 'TZ_DETECT_SCRIPTS', [ '<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/...
55.75
224
0.77429
# -*- coding: utf-8 -*- from django.conf import settings # How often to check TZ_DETECT_PERIOD = getattr(settings, 'TZ_DETECT_PERIOD', 3*3600) # Version of moment and moment-timezone to load TZ_DETECT_SCRIPTS = getattr(settings, 'TZ_DETECT_SCRIPTS', [ '<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/...
0
0
0
0051e0bd2a9085c3ed7b3685be94b2da7bc22176
1,525
py
Python
cs/algorithms/graph/kargers.py
TylerYep/workshop
69b19afc81c1b84b7f60723077670fb789b55744
[ "MIT" ]
1
2021-06-14T01:20:09.000Z
2021-06-14T01:20:09.000Z
cs/algorithms/graph/kargers.py
TylerYep/workshop
69b19afc81c1b84b7f60723077670fb789b55744
[ "MIT" ]
null
null
null
cs/algorithms/graph/kargers.py
TylerYep/workshop
69b19afc81c1b84b7f60723077670fb789b55744
[ "MIT" ]
null
null
null
import random from cs.structures import Edge, Graph, Node, V def kargers_min_cut(orig_graph: Graph[V]) -> set[Edge[V]]: """ Partitions a graph using Karger's Algorithm. Works on directed and undirected graphs, but involves random choices, so it does not give consistent outputs. Args: graph: A...
31.122449
88
0.633443
import random from cs.structures import Edge, Graph, Node, V def kargers_min_cut(orig_graph: Graph[V]) -> set[Edge[V]]: """ Partitions a graph using Karger's Algorithm. Works on directed and undirected graphs, but involves random choices, so it does not give consistent outputs. Args: graph: A...
0
0
0
2a8f7460a21b7cad5dc74cfff3405c3af0fe2006
471
py
Python
Python/FindDigits.py
MuriloRoque/coding_challenges
dd1ca31bc1c9e77026ef625fbca7f8938d3e965e
[ "MIT" ]
7
2020-06-03T19:19:07.000Z
2022-01-08T03:00:59.000Z
Python/FindDigits.py
MuriloRoque/coding-challenges
dd1ca31bc1c9e77026ef625fbca7f8938d3e965e
[ "MIT" ]
4
2020-05-25T10:31:26.000Z
2022-02-26T08:03:55.000Z
Python/FindDigits.py
MuriloRoque/coding_challenges
dd1ca31bc1c9e77026ef625fbca7f8938d3e965e
[ "MIT" ]
null
null
null
#!/bin/python3 import os # Complete the findDigits function below. if __name__ == '__main__': fptr = open(os.environ['OUTPUT_PATH'], 'w') t = int(input()) for t_itr in range(t): n = int(input()) result = findDigits(n) fptr.write(str(result) + '\n') fptr.close()
15.193548
47
0.501062
#!/bin/python3 import os # Complete the findDigits function below. def findDigits(n): s = str(n) res = 0 for i in s: if int(i) != 0: if n % int(i) == 0: res += 1 return res if __name__ == '__main__': fptr = open(os.environ['OUTPUT_PATH'], 'w') t = int(i...
136
0
23
bc45dbd742de9463f2a3a8dabbfff37df96ff9fa
3,467
py
Python
dfirtrack_artifacts/urls.py
thomas-kropeit/dfirtrack
b1e0e659af7bc8085cfe2d269ddc651f9f4ba585
[ "Apache-2.0" ]
null
null
null
dfirtrack_artifacts/urls.py
thomas-kropeit/dfirtrack
b1e0e659af7bc8085cfe2d269ddc651f9f4ba585
[ "Apache-2.0" ]
6
2022-03-16T12:30:51.000Z
2022-03-28T01:34:45.000Z
dfirtrack_artifacts/urls.py
thomas-kropeit/dfirtrack
b1e0e659af7bc8085cfe2d269ddc651f9f4ba585
[ "Apache-2.0" ]
null
null
null
from django.urls import path from dfirtrack_artifacts.creator import artifact_creator from dfirtrack_artifacts.exporter.spreadsheet import xls from dfirtrack_artifacts.views import ( artifact_view, artifactpriority_view, artifactstatus_view, artifacttype_view, ) urlpatterns = ( # urls for Artifact...
27.736
88
0.651284
from django.urls import path from dfirtrack_artifacts.creator import artifact_creator from dfirtrack_artifacts.exporter.spreadsheet import xls from dfirtrack_artifacts.views import ( artifact_view, artifactpriority_view, artifactstatus_view, artifacttype_view, ) urlpatterns = ( # urls for Artifact...
0
0
0
3f7cd28b00b51df823099bd4153d8f5599444380
270
py
Python
mayan/apps/locales/icons.py
bonitobonita24/Mayan-EDMS
7845fe0e1e83c81f5d227a16116397a3d3883b85
[ "Apache-2.0" ]
343
2015-01-05T14:19:35.000Z
2018-12-10T19:07:48.000Z
mayan/apps/locales/icons.py
bonitobonita24/Mayan-EDMS
7845fe0e1e83c81f5d227a16116397a3d3883b85
[ "Apache-2.0" ]
191
2015-01-03T00:48:19.000Z
2018-11-30T09:10:25.000Z
mayan/apps/locales/icons.py
bonitobonita24/Mayan-EDMS
7845fe0e1e83c81f5d227a16116397a3d3883b85
[ "Apache-2.0" ]
114
2015-01-08T20:21:05.000Z
2018-12-10T19:07:53.000Z
from mayan.apps.appearance.classes import Icon icon_user_locale_profile_detail = Icon( driver_name='fontawesome', symbol='globe' ) icon_user_locale_profile_edit = Icon( driver_name='fontawesome-dual', primary_symbol='globe', secondary_symbol='pencil-alt' )
27
59
0.781481
from mayan.apps.appearance.classes import Icon icon_user_locale_profile_detail = Icon( driver_name='fontawesome', symbol='globe' ) icon_user_locale_profile_edit = Icon( driver_name='fontawesome-dual', primary_symbol='globe', secondary_symbol='pencil-alt' )
0
0
0
6ab583d13ec98e93752ce61e59742114fe5f4689
4,643
py
Python
result/arka/parse_result.py
MingzheWu418/plastering
322531e934c3acf2ecc8f520b37a6d255b9959c2
[ "MIT" ]
29
2018-09-19T01:16:27.000Z
2022-03-29T14:35:36.000Z
result/arka/parse_result.py
MingzheWu418/plastering
322531e934c3acf2ecc8f520b37a6d255b9959c2
[ "MIT" ]
14
2019-04-12T18:37:36.000Z
2022-02-10T00:27:55.000Z
result/arka/parse_result.py
MingzheWu418/plastering
322531e934c3acf2ecc8f520b37a6d255b9959c2
[ "MIT" ]
14
2019-03-05T23:44:11.000Z
2022-03-18T07:29:31.000Z
import os import sys import pdb import re from copy import deepcopy from operator import itemgetter import json import pandas as pd dir_path = os.path.dirname(os.path.realpath(__file__)) sys.path.insert(0, dir_path + '/../..') from plastering.metadata_interface import * from plastering.evaluator import * target_buil...
30.748344
82
0.645272
import os import sys import pdb import re from copy import deepcopy from operator import itemgetter import json import pandas as pd dir_path = os.path.dirname(os.path.realpath(__file__)) sys.path.insert(0, dir_path + '/../..') from plastering.metadata_interface import * from plastering.evaluator import * target_buil...
642
0
92
580fe86ae0aa9c38a9e6907e1803cb156d5b2bdf
7,285
py
Python
learntools/ml_intermediate/ex3.py
roannav/learntools
355a5df6a66562de62254b723da1a9389b9acc49
[ "Apache-2.0" ]
null
null
null
learntools/ml_intermediate/ex3.py
roannav/learntools
355a5df6a66562de62254b723da1a9389b9acc49
[ "Apache-2.0" ]
null
null
null
learntools/ml_intermediate/ex3.py
roannav/learntools
355a5df6a66562de62254b723da1a9389b9acc49
[ "Apache-2.0" ]
null
null
null
import pandas as pd import warnings from learntools.core import * Label = MultipartProblem(LabelA, LabelB) Cardinality = MultipartProblem(CardinalityA, CardinalityB) qvars = bind_exercises(globals(), [ Drop, Label, Cardinality, OneHot ], var_format='step_{n}', ) __all__ = list(qvars)
41.158192
104
0.68744
import pandas as pd import warnings from learntools.core import * class Drop(CodingProblem): _vars = ['drop_X_train', 'drop_X_valid'] _hint = ("Use the [`select_dtypes()`](https://pandas.pydata.org/pandas-" "docs/stable/reference/api/pandas.DataFrame.select_dtypes.html) method " "to ...
2,451
4,378
138
adcc7eef90b09be43068eff5739a52723c4a565f
976
py
Python
src/vnc_me/controllers/connect.py
maizy/vnc-me
644cbe7c58d5077b2a2c41145e088430c97860ee
[ "MIT" ]
null
null
null
src/vnc_me/controllers/connect.py
maizy/vnc-me
644cbe7c58d5077b2a2c41145e088430c97860ee
[ "MIT" ]
null
null
null
src/vnc_me/controllers/connect.py
maizy/vnc-me
644cbe7c58d5077b2a2c41145e088430c97860ee
[ "MIT" ]
null
null
null
# _*_ coding: utf-8 _*_ # Copyright (c) Nikita Kovaliov, maizy.ru, 2013 # See LICENSE.txt for details. from tornado.web import asynchronous from vnc_me.controllers import HttpHandler from vnc_me.vnc_client import VncClient
27.885714
68
0.604508
# _*_ coding: utf-8 _*_ # Copyright (c) Nikita Kovaliov, maizy.ru, 2013 # See LICENSE.txt for details. from tornado.web import asynchronous from vnc_me.controllers import HttpHandler from vnc_me.vnc_client import VncClient class Handler(HttpHandler): @asynchronous def post(self): host = self.get_ar...
676
51
23
5be6b16b88128604801bcc33e64d646652abc4ae
2,318
py
Python
tests/test_spacecurve.py
SPOCKnots/pyknotid
514a3f0f64d980100dc5f1086551f2d809c14907
[ "MIT" ]
17
2019-02-07T11:39:38.000Z
2022-03-31T13:14:29.000Z
tests/test_spacecurve.py
SPOCKnots/pyknotid
514a3f0f64d980100dc5f1086551f2d809c14907
[ "MIT" ]
5
2017-11-10T15:12:30.000Z
2021-11-01T16:36:22.000Z
tests/test_spacecurve.py
SPOCKnots/pyknotid
514a3f0f64d980100dc5f1086551f2d809c14907
[ "MIT" ]
7
2017-11-10T14:23:46.000Z
2021-03-28T06:05:04.000Z
import pyknotid.spacecurves.spacecurve as sp import pyknotid.make as mk from functools import wraps import os from os import path import numpy as np import pytest @pass_trefoil @pass_trefoil @pass_trefoil @pass_trefoil @pass_trefoil @pass_trefoil @pass_trefoil @pass_trefoil @pass_trefoil @pass_trefoil ...
20.156522
75
0.689819
import pyknotid.spacecurves.spacecurve as sp import pyknotid.make as mk from functools import wraps import os from os import path import numpy as np import pytest def pass_trefoil(func): def new_func(): return func(sp.SpaceCurve(mk.trefoil())) return new_func @pass_trefoil def test_init(k): ...
1,530
0
376
3be12f5f6443ad94d4862814b4ddfa13ca970561
998
py
Python
pcloudpy/gui/graphics/QVTKWindow.py
mmolero/pcloudpy
c8e4b342f9180374db97af3d87d60ece683b7bc0
[ "BSD-3-Clause" ]
39
2015-09-30T18:59:22.000Z
2020-10-28T01:52:41.000Z
pcloudpy/gui/graphics/QVTKWindow.py
mmolero/pcloudpy
c8e4b342f9180374db97af3d87d60ece683b7bc0
[ "BSD-3-Clause" ]
3
2017-01-05T20:53:54.000Z
2017-11-30T06:57:13.000Z
pcloudpy/gui/graphics/QVTKWindow.py
mmolero/pcloudpy
c8e4b342f9180374db97af3d87d60ece683b7bc0
[ "BSD-3-Clause" ]
19
2017-01-05T20:33:59.000Z
2021-09-25T09:19:28.000Z
#Author: Miguel Molero <miguel.molero@gmail.com> from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import * from pcloudpy.gui.graphics.QVTKWidget import QVTKWidget if __name__ == "__main__": from vtk import vtkConeSource from vtk import vtkPolyDataMapper, vtkActor app = QApplic...
26.972973
55
0.709419
#Author: Miguel Molero <miguel.molero@gmail.com> from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import * from pcloudpy.gui.graphics.QVTKWidget import QVTKWidget class QVTKMainWindow(QMainWindow): def __init__(self, parent = None): super(QVTKMainWindow, self).__init__(parent) ...
241
13
49
839732c105e90217381325571c730da38f09602e
3,377
py
Python
service/docs/source/conf.py
dannosliwcd/geopm
3ec0d223e700350ff37f6d10adde7b9bfbdba286
[ "BSD-3-Clause" ]
2
2016-07-23T18:05:45.000Z
2020-07-24T17:55:24.000Z
service/docs/source/conf.py
dannosliwcd/geopm
3ec0d223e700350ff37f6d10adde7b9bfbdba286
[ "BSD-3-Clause" ]
null
null
null
service/docs/source/conf.py
dannosliwcd/geopm
3ec0d223e700350ff37f6d10adde7b9bfbdba286
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2015 - 2021, Intel Corporation # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and...
39.267442
79
0.70151
# Copyright (c) 2015 - 2021, Intel Corporation # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and...
0
0
0
4d834666adfb7a39b9f9187dae673a2b0a66c916
980
py
Python
jdxapi/utils/logger_resource.py
jobdataexchange/jdx-api
7815a6463de56423c3b4196648607c4ebe56828c
[ "Apache-2.0" ]
null
null
null
jdxapi/utils/logger_resource.py
jobdataexchange/jdx-api
7815a6463de56423c3b4196648607c4ebe56828c
[ "Apache-2.0" ]
9
2019-12-26T17:39:58.000Z
2022-01-13T01:59:49.000Z
jdxapi/utils/logger_resource.py
jobdataexchange/jdx-api
7815a6463de56423c3b4196648607c4ebe56828c
[ "Apache-2.0" ]
null
null
null
import functools import logging from flask_restful import Resource from flask import request import json
28.823529
108
0.67551
import functools import logging from flask_restful import Resource from flask import request import json def failsafe_pp_json_obj(json_obj): try: return json.dumps(json_obj, indent=4) except: return json_obj def log_input_output(func): @functools.wraps(func) def wrapper(*args, **kwarg...
748
53
72
7f2a71b1e414d3825cb38086a03f7cd11fd7e6ea
259
py
Python
spatialpooch/__init__.py
achapkowski/spatial-pooch
e2525678d1b5f6acadfb53de43d8a10cf30d6ec9
[ "Apache-2.0" ]
1
2020-04-02T16:44:03.000Z
2020-04-02T16:44:03.000Z
spatialpooch/__init__.py
achapkowski/spatial-pooch
e2525678d1b5f6acadfb53de43d8a10cf30d6ec9
[ "Apache-2.0" ]
null
null
null
spatialpooch/__init__.py
achapkowski/spatial-pooch
e2525678d1b5f6acadfb53de43d8a10cf30d6ec9
[ "Apache-2.0" ]
null
null
null
from ._tabular import fetch_crime_data, fetch_traffic_data from ._vector import (fetch_beach_access_data, fetch_crime_shp_data, fetch_family_resource_centers_data, fetch_shipping_lanes_data)
51.8
58
0.660232
from ._tabular import fetch_crime_data, fetch_traffic_data from ._vector import (fetch_beach_access_data, fetch_crime_shp_data, fetch_family_resource_centers_data, fetch_shipping_lanes_data)
0
0
0
7641bdb92e4dd1311b939ff97255a4f2bfe9d25c
1,295
py
Python
predict.py
don6105/OCR-Captcha-Recognition
f9d3088b4937218e2675ad19832cd6cdf333d683
[ "Apache-2.0" ]
null
null
null
predict.py
don6105/OCR-Captcha-Recognition
f9d3088b4937218e2675ad19832cd6cdf333d683
[ "Apache-2.0" ]
null
null
null
predict.py
don6105/OCR-Captcha-Recognition
f9d3088b4937218e2675ad19832cd6cdf333d683
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python3 import cv2 import numpy as np import os import process_img import pickle from shutil import copyfile # model = cv2.ml.KNearest_create() # model.load('model.xml') model = cv2.ml.KNearest_load('model.xml') img_area = 40 * 40 # 将序列化的内容加载到内存中 f = open('id_label_map.txt', 'rb') try: id_label_map = ...
25.9
78
0.643243
#!/usr/bin/python3 import cv2 import numpy as np import os import process_img import pickle from shutil import copyfile # model = cv2.ml.KNearest_create() # model.load('model.xml') model = cv2.ml.KNearest_load('model.xml') img_area = 40 * 40 # 将序列化的内容加载到内存中 f = open('id_label_map.txt', 'rb') try: id_label_map = ...
0
0
0
bd4cecd93bd9c57a578f054d6684869c8da3f50d
210
py
Python
AlgorithmTest/PROGRAMMERS_PYTHON/Lv1/Prog_12934.py
bluesky0960/AlgorithmTest
35e6c01b1c25bf13d4c034c047f3dd3b67f1578e
[ "MIT" ]
null
null
null
AlgorithmTest/PROGRAMMERS_PYTHON/Lv1/Prog_12934.py
bluesky0960/AlgorithmTest
35e6c01b1c25bf13d4c034c047f3dd3b67f1578e
[ "MIT" ]
null
null
null
AlgorithmTest/PROGRAMMERS_PYTHON/Lv1/Prog_12934.py
bluesky0960/AlgorithmTest
35e6c01b1c25bf13d4c034c047f3dd3b67f1578e
[ "MIT" ]
null
null
null
#https://programmers.co.kr/learn/courses/30/lessons/12934
23.333333
57
0.533333
#https://programmers.co.kr/learn/courses/30/lessons/12934 def solution(n): answer = 0 if int(n**0.5)**2 == n: answer = (int(n**0.5)+1)**2 else: answer = -1 return answer
131
0
22
be56fe3a0855a11c83234a8075eb53f6c7ee860e
12,531
py
Python
main.py
sem-onyalo/knowledge-graph-loader
7beadc3fe0f159e5386639d8fa9aeccffa23950c
[ "MIT" ]
null
null
null
main.py
sem-onyalo/knowledge-graph-loader
7beadc3fe0f159e5386639d8fa9aeccffa23950c
[ "MIT" ]
null
null
null
main.py
sem-onyalo/knowledge-graph-loader
7beadc3fe0f159e5386639d8fa9aeccffa23950c
[ "MIT" ]
null
null
null
import csv import logging import neo4j import os import uuid from concurrent.futures import ThreadPoolExecutor from pyopenie import OpenIE5 from queue import Empty, Queue from spacy.lang.en import English from time import sleep from typing import List ENCODING = "utf-8" DATA_DIRECTORY = "./data" CACHE_DIRECTORY = "cac...
34.905292
168
0.677201
import csv import logging import neo4j import os import uuid from concurrent.futures import ThreadPoolExecutor from pyopenie import OpenIE5 from queue import Empty, Queue from spacy.lang.en import English from time import sleep from typing import List ENCODING = "utf-8" DATA_DIRECTORY = "./data" CACHE_DIRECTORY = "cac...
10,461
437
644
9c2ab7ec270dc8209d5b75adadfdc279f77d4441
270
py
Python
polls/scraping_db/wadi_fashion.py
young-ha713/TeamProject
f98bbfbb7cab1b292f83f48a926dc6fd8b3eaf84
[ "Apache-2.0" ]
null
null
null
polls/scraping_db/wadi_fashion.py
young-ha713/TeamProject
f98bbfbb7cab1b292f83f48a926dc6fd8b3eaf84
[ "Apache-2.0" ]
null
null
null
polls/scraping_db/wadi_fashion.py
young-ha713/TeamProject
f98bbfbb7cab1b292f83f48a926dc6fd8b3eaf84
[ "Apache-2.0" ]
2
2021-08-12T01:51:32.000Z
2021-08-17T05:16:37.000Z
import pandas as pd df = pd.read_excel('C:/Users/gkdud/PycharmProjects/TeamProject/Scraping/files/fashion_scraping.xlsx') import sqlite3 connect = sqlite3.connect('./wadizdb.sqlite3') df.to_sql('table_fashion', connect, if_exists='append', index=False) connect.close()
33.75
101
0.788889
import pandas as pd df = pd.read_excel('C:/Users/gkdud/PycharmProjects/TeamProject/Scraping/files/fashion_scraping.xlsx') import sqlite3 connect = sqlite3.connect('./wadizdb.sqlite3') df.to_sql('table_fashion', connect, if_exists='append', index=False) connect.close()
0
0
0
15506c9d3b917a6a1bc46dffb7f880578de51951
5,177
py
Python
static_compress/mixin.py
RentFreeMedia/django-static-compress
b56940b9246714401bdd0b24c2f9595419dc6671
[ "MIT" ]
8
2017-10-23T07:32:43.000Z
2019-12-16T16:25:02.000Z
static_compress/mixin.py
RentFreeMedia/django-static-compress
b56940b9246714401bdd0b24c2f9595419dc6671
[ "MIT" ]
90
2018-06-02T07:37:29.000Z
2022-03-31T13:01:24.000Z
static_compress/mixin.py
RentFreeMedia/django-static-compress
b56940b9246714401bdd0b24c2f9595419dc6671
[ "MIT" ]
8
2018-07-25T13:56:40.000Z
2022-02-11T17:18:17.000Z
import os from os.path import getatime, getctime, getmtime import errno from django.core.exceptions import ImproperlyConfigured from . import compressors __all__ = ["CompressMixin"] DEFAULT_METHODS = ["gz", "br"] METHOD_MAPPING = { "gz": compressors.ZopfliCompressor, "br": compressors.BrotliCompressor, ...
40.131783
114
0.618119
import os from os.path import getatime, getctime, getmtime import errno from django.core.exceptions import ImproperlyConfigured from . import compressors __all__ = ["CompressMixin"] DEFAULT_METHODS = ["gz", "br"] METHOD_MAPPING = { "gz": compressors.ZopfliCompressor, "br": compressors.BrotliCompressor, ...
4,357
334
23
d136bbf6cfe49c89ba2ae55848ff79c2754f45bf
1,433
py
Python
cvat/apps/engine/ddln/tasks/vls/persistence/csv.py
daedaleanai/cvat
d0df08c3f66a39324bd0b82683ee4cef05ed9c53
[ "MIT" ]
1
2021-07-12T20:34:31.000Z
2021-07-12T20:34:31.000Z
cvat/apps/engine/ddln/tasks/vls/persistence/csv.py
daedaleanai/cvat
d0df08c3f66a39324bd0b82683ee4cef05ed9c53
[ "MIT" ]
8
2020-05-04T09:44:13.000Z
2021-10-14T12:54:40.000Z
cvat/apps/engine/ddln/tasks/vls/persistence/csv.py
daedaleanai/cvat
d0df08c3f66a39324bd0b82683ee4cef05ed9c53
[ "MIT" ]
1
2020-07-15T09:30:13.000Z
2020-07-15T09:30:13.000Z
from ..models import RunwayPoint, Runway
31.152174
124
0.681089
from ..models import RunwayPoint, Runway def iterate_runways(reader): for row in reader._reader: runway_id, full_visible, *pts_data = row full_visible = bool(int(full_visible)) assert len(pts_data) == 18 # 6 points, each point having 3 values start_left, start_right = _from_row(pt...
1,248
0
138
0069c9e2e22ac4791dcf0c3156a7d75e7be45e71
346
py
Python
old files/problem0009.py
kmarcini/Project-Euler-Python
d644e8e1ec4fac70a9ab407ad5e1f0a75547c8d3
[ "BSD-3-Clause" ]
null
null
null
old files/problem0009.py
kmarcini/Project-Euler-Python
d644e8e1ec4fac70a9ab407ad5e1f0a75547c8d3
[ "BSD-3-Clause" ]
null
null
null
old files/problem0009.py
kmarcini/Project-Euler-Python
d644e8e1ec4fac70a9ab407ad5e1f0a75547c8d3
[ "BSD-3-Clause" ]
null
null
null
########################### # Project Euler Problem 9 # Special Pythagorean triplet # # Code by Kevin Marciniak ########################### total = 1000 product = 0 for c in range(1, 1000): for b in range(1, c): for a in range(1, b): if (a + b + c) == 1000: if ((a * a) + (b * b)) == (c * c): product = ...
18.210526
38
0.471098
########################### # Project Euler Problem 9 # Special Pythagorean triplet # # Code by Kevin Marciniak ########################### total = 1000 product = 0 for c in range(1, 1000): for b in range(1, c): for a in range(1, b): if (a + b + c) == 1000: if ((a * a) + (b * b)) == (c * c): product = ...
0
0
0
a147e22d5aeaabe35ccc4c56ea5539f536e24407
3,685
py
Python
lbrynet/wallet/ledger.py
ttkopec/lbry
03415415ed397730e6f691f527f51b429a834ed5
[ "MIT" ]
null
null
null
lbrynet/wallet/ledger.py
ttkopec/lbry
03415415ed397730e6f691f527f51b429a834ed5
[ "MIT" ]
110
2018-11-26T05:41:35.000Z
2021-08-03T15:37:20.000Z
lbrynet/wallet/ledger.py
ttkopec/lbry
03415415ed397730e6f691f527f51b429a834ed5
[ "MIT" ]
1
2018-09-20T22:15:59.000Z
2018-09-20T22:15:59.000Z
import logging from six import int2byte from binascii import unhexlify from twisted.internet import defer from .resolve import Resolver from lbryschema.error import URIParseError from lbryschema.uri import parse_lbry_uri from torba.baseledger import BaseLedger from .account import Account from .network import Netwo...
34.12037
101
0.735414
import logging from six import int2byte from binascii import unhexlify from twisted.internet import defer from .resolve import Resolver from lbryschema.error import URIParseError from lbryschema.uri import parse_lbry_uri from torba.baseledger import BaseLedger from .account import Account from .network import Netwo...
1,336
1,796
69
226c32b59ca6bfd5663903c81b43098c8f2f31df
1,870
py
Python
emontranslator_v0.py
mkaiserpm/emonpython
f5e7d70b83f1c528fc485556464ce1b4f8553d9b
[ "MIT" ]
null
null
null
emontranslator_v0.py
mkaiserpm/emonpython
f5e7d70b83f1c528fc485556464ce1b4f8553d9b
[ "MIT" ]
null
null
null
emontranslator_v0.py
mkaiserpm/emonpython
f5e7d70b83f1c528fc485556464ce1b4f8553d9b
[ "MIT" ]
null
null
null
''' Created on 01.05.2017 @author: mario Emontranslator Receive messages from serial/uart Generate JSON Emon Input Messages Insert via EMON API / APIKEY to emoncms on locahost (running on pi) ''' import serial import httplib import time domain = "localhost" emoncmspath = "emoncms" apikey = "2eba96e51f6b41534f52110...
26.338028
120
0.578075
''' Created on 01.05.2017 @author: mario Emontranslator Receive messages from serial/uart Generate JSON Emon Input Messages Insert via EMON API / APIKEY to emoncms on locahost (running on pi) ''' import serial import httplib import time domain = "localhost" emoncmspath = "emoncms" apikey = "2eba96e51f6b41534f52110...
529
0
23
515fea6b09cfd40afa2a167b2e7a719933d9dd52
3,970
py
Python
client.py
AvaCity/avacity-async
d600bf3914ab13c918d33a17b1c70df8d2af6913
[ "BSD-3-Clause" ]
10
2020-08-14T03:41:13.000Z
2021-12-12T20:04:08.000Z
client.py
oopss1k/1
78fc1d2cdd001630d80a065a4243e1745f6ba876
[ "BSD-3-Clause" ]
6
2020-08-28T17:27:55.000Z
2022-02-25T20:39:02.000Z
client.py
AvaCity/avacity-async
d600bf3914ab13c918d33a17b1c70df8d2af6913
[ "BSD-3-Clause" ]
5
2020-08-13T20:40:16.000Z
2022-02-25T20:28:43.000Z
import logging import asyncio import binascii import time import struct from ipaddress import ip_network, ip_address import protocol import const PUFFIN_SUB = ["107.178.32.0/20", "45.33.128.0/20", "101.127.206.0/23", "101.127.208.0/23"]
32.276423
79
0.517884
import logging import asyncio import binascii import time import struct from ipaddress import ip_network, ip_address import protocol import const PUFFIN_SUB = ["107.178.32.0/20", "45.33.128.0/20", "101.127.206.0/23", "101.127.208.0/23"] def is_puffin(ip): for net in PUFFIN_SUB: net = ip_net...
3,582
-6
180
96e5618a2b4dd65a44b72e0d8d469e32ed2b883d
894
py
Python
geotrek/trekking/filters.py
pierreloicq/Geotrek-admin
00cd29f29843f2cc25e5a3c7372fcccf14956887
[ "BSD-2-Clause" ]
null
null
null
geotrek/trekking/filters.py
pierreloicq/Geotrek-admin
00cd29f29843f2cc25e5a3c7372fcccf14956887
[ "BSD-2-Clause" ]
null
null
null
geotrek/trekking/filters.py
pierreloicq/Geotrek-admin
00cd29f29843f2cc25e5a3c7372fcccf14956887
[ "BSD-2-Clause" ]
null
null
null
from django.utils.translation import ugettext_lazy as _ from mapentity.filters import MapEntityFilterSet from geotrek.core.filters import TopologyFilter from .models import Trek, POI, Service
27.090909
78
0.671141
from django.utils.translation import ugettext_lazy as _ from mapentity.filters import MapEntityFilterSet from geotrek.core.filters import TopologyFilter from .models import Trek, POI, Service class TrekFilterSet(MapEntityFilterSet): class Meta: model = Trek fields = ['published', 'difficulty', '...
0
605
92
6f9cf2d8cd0d99cb21323c1e981144539e4f1b93
255,228
py
Python
gbpservice/neutron/tests/unit/services/grouppolicy/test_apic_mapping.py
ashutosh-mishra/my-test
51c82af293f291b9182204392e7d21bda27786d1
[ "Apache-2.0" ]
null
null
null
gbpservice/neutron/tests/unit/services/grouppolicy/test_apic_mapping.py
ashutosh-mishra/my-test
51c82af293f291b9182204392e7d21bda27786d1
[ "Apache-2.0" ]
null
null
null
gbpservice/neutron/tests/unit/services/grouppolicy/test_apic_mapping.py
ashutosh-mishra/my-test
51c82af293f291b9182204392e7d21bda27786d1
[ "Apache-2.0" ]
null
null
null
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the...
48.002257
79
0.584552
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the...
242,267
965
7,649
87484e3ece20f96eee0532619677e15accd1c4e4
4,760
py
Python
ResourceMonitor.py
Bot-7037/Resource-Monitor
44c96606784d6138bbfbc0fd8254252bb676dbfc
[ "MIT" ]
1
2021-11-21T05:26:06.000Z
2021-11-21T05:26:06.000Z
ResourceMonitor.py
Bot-7037/Resource-Monitor
44c96606784d6138bbfbc0fd8254252bb676dbfc
[ "MIT" ]
null
null
null
ResourceMonitor.py
Bot-7037/Resource-Monitor
44c96606784d6138bbfbc0fd8254252bb676dbfc
[ "MIT" ]
null
null
null
import psutil import pandas as pd from datetime import datetime from termcolor import colored import GetInfo import Notify import time import os if __name__ == "__main__": import argparse parser = argparse.ArgumentParser() parser.add_argument("-c", "--columns", default="name,cpu_usage,memor...
35
134
0.575
import psutil import pandas as pd from datetime import datetime from termcolor import colored import GetInfo import Notify import time import os def print_header(): print("╔"+"═"*117,end="╗\n║") print(colored("\t\t\t\t\t\t[= RESOURCE MONITOR =]\t\t\t\t\t\t ", "cyan", attrs=['bold']),end="║\n"...
2,165
0
125
8d272e209965eda5ff24423747a5f6f4591b2b0c
1,369
py
Python
shutdown.py
liusl104/py_sync_binlog
33a67f545159767d38a522d28d2f79b3ac3802ca
[ "Apache-2.0" ]
3
2018-09-18T03:29:33.000Z
2020-01-13T03:34:39.000Z
shutdown.py
liusl104/py_sync_binlog
33a67f545159767d38a522d28d2f79b3ac3802ca
[ "Apache-2.0" ]
null
null
null
shutdown.py
liusl104/py_sync_binlog
33a67f545159767d38a522d28d2f79b3ac3802ca
[ "Apache-2.0" ]
1
2022-01-25T09:39:17.000Z
2022-01-25T09:39:17.000Z
# encoding=utf8 import os import socket from sync_binlog.output_log import logger as loging import time import sys from sync_binlog.update_post import update_datetime try: import psutil except ImportError: print("psutil 模块不存在,请使用 pip install psutil 安装") sys.exit(0) # Shutdown complete if __name__ == "...
24.890909
63
0.637692
# encoding=utf8 import os import socket from sync_binlog.output_log import logger as loging import time import sys from sync_binlog.update_post import update_datetime try: import psutil except ImportError: print("psutil 模块不存在,请使用 pip install psutil 安装") sys.exit(0) def shutdown_program(): hostname =...
601
0
46
e1c34e1f2ca887b5b7509177103c082a02ee4201
337
py
Python
example/test/T7_duocaiyinyuebang.py
Michael8968/skulpt
15956a60398fac92ee1dab25bf661ffc003b2eaf
[ "MIT" ]
2
2021-12-18T06:34:26.000Z
2022-01-05T05:08:47.000Z
example/test/T8_duocaiyinyuebang.py
Michael8968/skulpt
15956a60398fac92ee1dab25bf661ffc003b2eaf
[ "MIT" ]
null
null
null
example/test/T8_duocaiyinyuebang.py
Michael8968/skulpt
15956a60398fac92ee1dab25bf661ffc003b2eaf
[ "MIT" ]
null
null
null
import turtle turtle.mode("logo") turtle.shape("turtle") turtle.bgcolor("black") turtle.hideturtle() turtle.pensize(12) turtle.colormode(255) s = 50 a = 0 for i in range(10): turtle.pencolor(200-a, a, 100) turtle.pu() turtle.goto(25*i, 0) turtle.pd() turtle.forward(s) a = a + 20 s = s + 10...
14.652174
34
0.62908
import turtle turtle.mode("logo") turtle.shape("turtle") turtle.bgcolor("black") turtle.hideturtle() turtle.pensize(12) turtle.colormode(255) s = 50 a = 0 for i in range(10): turtle.pencolor(200-a, a, 100) turtle.pu() turtle.goto(25*i, 0) turtle.pd() turtle.forward(s) a = a + 20 s = s + 10...
0
0
0
d73f56d089f03fc6f77ef649bdcfbef43da2b862
1,144
py
Python
docs/scripts/cluster_add_k8s.py
pramaku/hpecp-python-library
55550a1e27259a3132ea0608e66719e9732fb081
[ "Apache-2.0" ]
null
null
null
docs/scripts/cluster_add_k8s.py
pramaku/hpecp-python-library
55550a1e27259a3132ea0608e66719e9732fb081
[ "Apache-2.0" ]
null
null
null
docs/scripts/cluster_add_k8s.py
pramaku/hpecp-python-library
55550a1e27259a3132ea0608e66719e9732fb081
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 from hpecp import ContainerPlatformClient, APIException from hpecp.k8s_cluster import K8sClusterHostConfig import textwrap client = ContainerPlatformClient(username='admin', password='admin123', api_host='127.0.0.1', ...
35.75
139
0.604021
#!/usr/bin/env python3 from hpecp import ContainerPlatformClient, APIException from hpecp.k8s_cluster import K8sClusterHostConfig import textwrap client = ContainerPlatformClient(username='admin', password='admin123', api_host='127.0.0.1', ...
0
0
0
ff3dcdc0b12675c40e2b4e49025d944716d7d7ae
1,195
py
Python
datasets/data_splitter.py
AjayMudhai/pytorch-CycleGAN-and-pix2pix
64fcf0b926e2125042a559b0fb6a4a57559923c2
[ "BSD-3-Clause" ]
null
null
null
datasets/data_splitter.py
AjayMudhai/pytorch-CycleGAN-and-pix2pix
64fcf0b926e2125042a559b0fb6a4a57559923c2
[ "BSD-3-Clause" ]
null
null
null
datasets/data_splitter.py
AjayMudhai/pytorch-CycleGAN-and-pix2pix
64fcf0b926e2125042a559b0fb6a4a57559923c2
[ "BSD-3-Clause" ]
null
null
null
import os import shutil # wbg_pth='/datadrive/Reflection/training_data/wbg' # img_pth='/datadrive/Reflection/training_data/images' # dst_pth='/datadrive/Reflection/training_data/valB' # move_data(wbg_pth,img_pth,dst_pth) wbg_pth='/datadrive/Reflection/training_data/wbg' trainA_pth='/datadrive/pytorch-CycleGAN-an...
35.147059
73
0.702092
import os import shutil def move_data(wbg_pth,img_pth,dst_pth): for root,dirs,files in os.walk(wbg_pth): for file in files: op=os.path.join(img_pth,file) nnp=os.path.join(dst_pth,file) shutil.move(op,nnp) # wbg_pth='/datadrive/Reflection/training_data/wbg' # img_pt...
620
0
46
5679b81204b649dc0cd086786518ea8025d21ff4
2,711
py
Python
venv/lib/python3.8/site-packages/azureml/_base_sdk_common/field_info.py
amcclead7336/Enterprise_Data_Science_Final
ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28
[ "Unlicense", "MIT" ]
null
null
null
venv/lib/python3.8/site-packages/azureml/_base_sdk_common/field_info.py
amcclead7336/Enterprise_Data_Science_Final
ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28
[ "Unlicense", "MIT" ]
null
null
null
venv/lib/python3.8/site-packages/azureml/_base_sdk_common/field_info.py
amcclead7336/Enterprise_Data_Science_Final
ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28
[ "Unlicense", "MIT" ]
2
2021-05-23T16:46:31.000Z
2021-05-26T23:51:09.000Z
# --------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # --------------------------------------------------------- """A class for storing the field information.""" class _FieldInfo(object): """A class for storing the field information.""" ...
30.806818
113
0.57986
# --------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # --------------------------------------------------------- """A class for storing the field information.""" class _FieldInfo(object): """A class for storing the field information.""" ...
0
0
0
6f3cd2cc7dc0d6471de7c34578d22cf3a32749f4
3,440
py
Python
GmailWrapper_JE/venv/Lib/site-packages/google/auth/crypt/__init__.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
null
null
null
GmailWrapper_JE/venv/Lib/site-packages/google/auth/crypt/__init__.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
null
null
null
GmailWrapper_JE/venv/Lib/site-packages/google/auth/crypt/__init__.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
null
null
null
# Copyright 2016 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 w...
34.059406
85
0.684302
# Copyright 2016 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 w...
0
0
0
139954145bee80fddd7c595da934e0de4728e34e
84
py
Python
hw7/ch16/automate_online-materials/sameNameError.py
JWiliams/csc221
0653dcb5f185e8517be9146e17b580f62d4930e6
[ "CC0-1.0" ]
null
null
null
hw7/ch16/automate_online-materials/sameNameError.py
JWiliams/csc221
0653dcb5f185e8517be9146e17b580f62d4930e6
[ "CC0-1.0" ]
null
null
null
hw7/ch16/automate_online-materials/sameNameError.py
JWiliams/csc221
0653dcb5f185e8517be9146e17b580f62d4930e6
[ "CC0-1.0" ]
null
null
null
eggs = 'global' spam()
14
24
0.571429
def spam(): print(eggs) # ERROR! eggs = 'spam local' eggs = 'global' spam()
39
0
22
49e036fce5023369b407b2429dceb9099d47e801
1,209
py
Python
scripts/release_helper/utils.py
DavidZeLiang/azure-sdk-for-python
b343247adc7c3c7ff52d6eadeca6b57eb0a23047
[ "MIT" ]
null
null
null
scripts/release_helper/utils.py
DavidZeLiang/azure-sdk-for-python
b343247adc7c3c7ff52d6eadeca6b57eb0a23047
[ "MIT" ]
null
null
null
scripts/release_helper/utils.py
DavidZeLiang/azure-sdk-for-python
b343247adc7c3c7ff52d6eadeca6b57eb0a23047
[ "MIT" ]
null
null
null
from github.Issue import Issue from github.Repository import Repository import logging from typing import List REQUEST_REPO = 'Azure/sdk-release-request' REST_REPO = 'Azure/azure-rest-api-specs' AUTO_ASSIGN_LABEL = 'assigned' AUTO_PARSE_LABEL = 'auto-link' _LOG = logging.getLogger(__name__)
31
87
0.635236
from github.Issue import Issue from github.Repository import Repository import logging from typing import List REQUEST_REPO = 'Azure/sdk-release-request' REST_REPO = 'Azure/azure-rest-api-specs' AUTO_ASSIGN_LABEL = 'assigned' AUTO_PARSE_LABEL = 'auto-link' _LOG = logging.getLogger(__name__) def get_origin_link_and_...
685
182
46
11de465540347c176ba804221d719eaf15627d08
2,350
py
Python
ex9/api_processor.py
Maheliusz/nlp_lab
49e5c9dfe81d94bac4323e044502d1b73c99ce3c
[ "MIT" ]
null
null
null
ex9/api_processor.py
Maheliusz/nlp_lab
49e5c9dfe81d94bac4323e044502d1b73c99ce3c
[ "MIT" ]
null
null
null
ex9/api_processor.py
Maheliusz/nlp_lab
49e5c9dfe81d94bac4323e044502d1b73c99ce3c
[ "MIT" ]
null
null
null
import argparse import os import random import sys import time import requests parser = argparse.ArgumentParser() parser.add_argument('--path', type=str, help='Path to text files with bills', required=True) parser.add_argument('--count', type=int, help='How much files process', required=False, default=20) args = par...
41.22807
113
0.570638
import argparse import os import random import sys import time import requests parser = argparse.ArgumentParser() parser.add_argument('--path', type=str, help='Path to text files with bills', required=True) parser.add_argument('--count', type=int, help='How much files process', required=False, default=20) args = par...
0
0
0
5dedd4b58a8257ac092a43187da5519e0e4f4069
732
py
Python
src/routes/v1/faculties.py
university-my/ultimate-schedule-api
6dbf2368da8751a8b6105c8d783a4b105f99866d
[ "MIT" ]
5
2020-04-18T16:33:50.000Z
2021-09-30T09:24:56.000Z
src/routes/v1/faculties.py
university-my/ultimate-schedule-api
6dbf2368da8751a8b6105c8d783a4b105f99866d
[ "MIT" ]
15
2020-04-18T13:03:26.000Z
2021-12-13T20:44:54.000Z
src/routes/v1/faculties.py
university-my/ultimate-schedule-api
6dbf2368da8751a8b6105c8d783a4b105f99866d
[ "MIT" ]
2
2020-05-30T20:51:45.000Z
2021-09-28T10:32:12.000Z
from fastapi import APIRouter from src.utils.events import Events from src.schemas.schema import x_schedule_header from src.controllers.faculties_controller import get_all_faculties, is_faculty_exists from src.utils.tracking import track tag = "Faculties" router = APIRouter() @router.get("", tags=[tag]) @track(fmt="...
34.857143
85
0.79235
from fastapi import APIRouter from src.utils.events import Events from src.schemas.schema import x_schedule_header from src.controllers.faculties_controller import get_all_faculties, is_faculty_exists from src.utils.tracking import track tag = "Faculties" router = APIRouter() @router.get("", tags=[tag]) @track(fmt="...
236
0
44
20b200530b1cf1e5a75bb3eada9fd29120296117
11,062
py
Python
ckanext/ksext/controllers/MUser.py
WilJoey/ckanext-ksext
1f3383d34beb35702d5bf0799defa5398f207ce2
[ "MIT" ]
null
null
null
ckanext/ksext/controllers/MUser.py
WilJoey/ckanext-ksext
1f3383d34beb35702d5bf0799defa5398f207ce2
[ "MIT" ]
null
null
null
ckanext/ksext/controllers/MUser.py
WilJoey/ckanext-ksext
1f3383d34beb35702d5bf0799defa5398f207ce2
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import ckan.plugins as p #from ckan.lib.base import BaseController, config import ckan.lib.base as base import ckan.lib.helpers as h import ckan.model as model import ckan.logic as logic import ckan.logic.schema as schema import ckan.new_authz as new_authz import ckan.lib.captcha as captcha imp...
37.120805
175
0.593835
# -*- coding: utf-8 -*- import ckan.plugins as p #from ckan.lib.base import BaseController, config import ckan.lib.base as base import ckan.lib.helpers as h import ckan.model as model import ckan.logic as logic import ckan.logic.schema as schema import ckan.new_authz as new_authz import ckan.lib.captcha as captcha imp...
7,830
2,600
23
a156f74140169b47890b5b7f16f2a1189fccdb1f
15,863
py
Python
pypeit/core/load.py
finagle29/PypeIt
418d6d24d24054ad590d2f06c0b4688ea18f492e
[ "BSD-3-Clause" ]
null
null
null
pypeit/core/load.py
finagle29/PypeIt
418d6d24d24054ad590d2f06c0b4688ea18f492e
[ "BSD-3-Clause" ]
null
null
null
pypeit/core/load.py
finagle29/PypeIt
418d6d24d24054ad590d2f06c0b4688ea18f492e
[ "BSD-3-Clause" ]
null
null
null
""" Module for loading PypeIt files """ import os import warnings import numpy as np from astropy import units from astropy.time import Time from astropy.io import fits from astropy.table import Table from linetools.spectra.xspectrum1d import XSpectrum1D from linetools.spectra.utils import collate import linetools.u...
38.040767
128
0.60348
""" Module for loading PypeIt files """ import os import warnings import numpy as np from astropy import units from astropy.time import Time from astropy.io import fits from astropy.table import Table from linetools.spectra.xspectrum1d import XSpectrum1D from linetools.spectra.utils import collate import linetools.u...
246
0
23