hexsha
stringlengths
40
40
size
int64
6
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
130
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
247
max_issues_repo_name
stringlengths
4
130
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
247
max_forks_repo_name
stringlengths
4
130
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
1
1.04M
avg_line_length
float64
1.53
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
6
1.04M
filtered:remove_non_ascii
int64
0
538k
filtered:remove_decorators
int64
0
917k
filtered:remove_async
int64
0
722k
filtered:remove_classes
int64
-45
1M
filtered:remove_generators
int64
0
814k
filtered:remove_function_no_docstring
int64
-102
850k
filtered:remove_class_no_docstring
int64
-3
5.46k
filtered:remove_unused_imports
int64
-1,350
52.4k
filtered:remove_delete_markers
int64
0
59.6k
9e23152804a80dba8e674f6265d038a01dfd8566
1,436
py
Python
Projects/Online Workouts/w3resource/Basic - Part-II/program-7.py
ivenpoker/Python-Projects
2975e1bd687ec8dbcc7a4842c13466cb86292679
[ "MIT" ]
1
2019-09-23T15:51:45.000Z
2019-09-23T15:51:45.000Z
Projects/Online Workouts/w3resource/Basic - Part-II/program-7.py
ivenpoker/Python-Projects
2975e1bd687ec8dbcc7a4842c13466cb86292679
[ "MIT" ]
5
2021-02-08T20:47:19.000Z
2022-03-12T00:35:44.000Z
Projects/Online Workouts/w3resource/Basic - Part-II/program-7.py
ivenpoker/Python-Projects
2975e1bd687ec8dbcc7a4842c13466cb86292679
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 ############################################################################################## # # # Program purpose: Counts the occurrences of character of a given text in a text # # ...
41.028571
155
0.362813
#!/usr/bin/env python3 ############################################################################################## # # # Program purpose: Counts the occurrences of character of a given text in a text # # ...
0
0
0
0
0
301
0
0
23
69ab54549168974d80e52f6e732db3683cfcb6ee
833
py
Python
raiden_contracts/tests/utils/constants.py
marcosmartinez7/lumino-contracts
700d6cb6b4c90d0173b3d206238fd31a02dcb9bd
[ "MIT" ]
3
2019-06-12T14:50:12.000Z
2020-12-25T07:25:23.000Z
raiden_contracts/tests/utils/constants.py
marcosmartinez7/lumino-contracts
700d6cb6b4c90d0173b3d206238fd31a02dcb9bd
[ "MIT" ]
2
2019-12-08T21:06:56.000Z
2021-01-21T02:44:58.000Z
raiden_contracts/tests/utils/constants.py
marcosmartinez7/lumino-contracts
700d6cb6b4c90d0173b3d206238fd31a02dcb9bd
[ "MIT" ]
5
2019-06-12T14:02:07.000Z
2020-12-10T11:21:37.000Z
from eth_typing.evm import HexAddress from eth_utils.units import units from raiden_contracts.utils.signature import private_key_to_address MAX_UINT256 = 2 ** 256 - 1 MAX_UINT192 = 2 ** 192 - 1 MAX_UINT32 = 2 ** 32 - 1 FAKE_ADDRESS = "0x03432" EMPTY_ADDRESS = HexAddress("0x0000000000000000000000000000000000000000") ...
28.724138
89
0.779112
from enum import IntEnum from eth_typing.evm import HexAddress from eth_utils.units import units from raiden_contracts.utils.signature import private_key_to_address MAX_UINT256 = 2 ** 256 - 1 MAX_UINT192 = 2 ** 192 - 1 MAX_UINT32 = 2 ** 32 - 1 FAKE_ADDRESS = "0x03432" EMPTY_ADDRESS = HexAddress("0x000000000000000000...
0
0
0
76
0
0
0
3
45
47b42aee6007f1db60088439ebeeb41fb45bf8fe
7,708
py
Python
python/plugins/processing/algs/gdal/gdaltindex.py
dyna-mis/Hilabeling
cb7d5d4be29624a20c8a367162dbc6fd779b2b52
[ "MIT" ]
null
null
null
python/plugins/processing/algs/gdal/gdaltindex.py
dyna-mis/Hilabeling
cb7d5d4be29624a20c8a367162dbc6fd779b2b52
[ "MIT" ]
null
null
null
python/plugins/processing/algs/gdal/gdaltindex.py
dyna-mis/Hilabeling
cb7d5d4be29624a20c8a367162dbc6fd779b2b52
[ "MIT" ]
1
2021-12-25T08:40:30.000Z
2021-12-25T08:40:30.000Z
# -*- coding: utf-8 -*- """ *************************************************************************** gdaltindex.py --------------------- Date : February 2015 Copyright : (C) 2015 by Pedro Venancio Email : pedrongvenancio at gmail dot com ****************...
46.433735
203
0.559808
# -*- coding: utf-8 -*- """ *************************************************************************** gdaltindex.py --------------------- Date : February 2015 Copyright : (C) 2015 by Pedro Venancio Email : pedrongvenancio at gmail dot com ****************...
0
0
0
5,745
0
0
0
618
113
5c5fba25c13482f2cad1825a71d08182d7258aef
637
py
Python
misc/random_permutations.py
butla/experiments
8c8ade15bb01978763d6618342fa42ad7563e38f
[ "MIT" ]
1
2020-06-01T02:41:45.000Z
2020-06-01T02:41:45.000Z
misc/random_permutations.py
butla/experiments
8c8ade15bb01978763d6618342fa42ad7563e38f
[ "MIT" ]
48
2019-12-26T16:38:19.000Z
2021-07-06T13:29:50.000Z
misc/random_permutations.py
butla/experiments
8c8ade15bb01978763d6618342fa42ad7563e38f
[ "MIT" ]
null
null
null
import time if __name__ == '__main__': zagadka = 'jedziemy sobie pocigiem i jestem troch zmczony, ale jednak wesoo' print(f'Haso to:\n{zagadka}\n') print('Losowe przetasowania jego liter to:') # for p in regular_permuts(zagadka): for p in random_permuts(zagadka): print(p) time.sl...
24.5
84
0.675039
import time import random import itertools def random_permuts(text: str): while True: character_list = list(text) random.shuffle(character_list) yield ''.join(character_list) def regular_permuts(text: str): for permut in itertools.permutations(text): yield ''.join(permut) i...
10
0
0
0
226
0
0
-13
90
1ffb468ebedeb4b5b563f72bf2acb0f5c13faa04
5,959
py
Python
doc/python/conf.py
hi-ogawa/magnum-bindings
5f324bdcde828d9ffc3bcd8e562480875586c54b
[ "MIT" ]
null
null
null
doc/python/conf.py
hi-ogawa/magnum-bindings
5f324bdcde828d9ffc3bcd8e562480875586c54b
[ "MIT" ]
null
null
null
doc/python/conf.py
hi-ogawa/magnum-bindings
5f324bdcde828d9ffc3bcd8e562480875586c54b
[ "MIT" ]
null
null
null
import os import sys # TODO make this less brittle sys.path = [os.path.join(os.path.dirname(__file__), '../../build/src/python/')] + sys.path import corrade import corrade.containers import corrade.pluginmanager import magnum import magnum.gl import magnum.meshtools import magnum.platform import magnum.platform.egl ...
32.037634
235
0.706998
import os import sys # TODO make this less brittle sys.path = [os.path.join(os.path.dirname(__file__), '../../build/src/python/')] + sys.path import corrade import corrade.containers import corrade.pluginmanager import magnum import magnum.gl import magnum.meshtools import magnum.platform import magnum.platform.egl ...
9
0
0
6
0
0
0
0
22
d7bb7247513a1b0f8a35eac4f5f673d519433b98
2,302
py
Python
test/test_ccat_controller_helper_df_x_df.py
bhaveshrawal/Python
5b67c3df196a72ab986b52c84e816d5674ca9af3
[ "MIT" ]
3
2018-11-25T16:45:01.000Z
2019-06-16T13:50:44.000Z
test/test_ccat_controller_helper_df_x_df.py
bliiir/ccat
b9a4418c93961e8400703d87d3e94518199c5f09
[ "MIT" ]
10
2018-12-19T14:38:06.000Z
2021-06-01T23:41:36.000Z
test/test_ccat_controller_helper_df_x_df.py
bliiir/ccat
b9a4418c93961e8400703d87d3e94518199c5f09
[ "MIT" ]
null
null
null
# IMPORTS -------------------------------------------------------------- # Standard packages import unittest # Third party packages # Local packages import ccat.controller.feature.height as height import ccat.controller.indicator.sma as sma import ccat.controller.helper.df_x_df as df_x_df # TESTS -----------------...
27.082353
81
0.565161
# IMPORTS -------------------------------------------------------------- # Standard packages import unittest # Third party packages import pandas as pd # Local packages from ccat.model.database.bucket import Bucket import ccat.controller.feature.height as height import ccat.controller.indicator.sma as sma import cca...
4
1,037
0
686
0
0
0
22
67
0fed75e4e9c80e748c43ca62285163a75823cbc3
3,333
py
Python
Creating_Web_services_in_Python/WEEK_5_Working_with_user_data/obrabotka-dannykh-na-siervierie/somemart/views.py
diekaltesonne/PYTHON_COURSE
16213ff2cfc18c2cbf52c9884722e004febbf7f4
[ "MIT" ]
1
2020-11-04T13:41:57.000Z
2020-11-04T13:41:57.000Z
Creating_Web_services_in_Python/WEEK_5_Working_with_user_data/obrabotka-dannykh-na-siervierie/somemart/views.py
diekaltesonne/Python_course
16213ff2cfc18c2cbf52c9884722e004febbf7f4
[ "MIT" ]
null
null
null
Creating_Web_services_in_Python/WEEK_5_Working_with_user_data/obrabotka-dannykh-na-siervierie/somemart/views.py
diekaltesonne/Python_course
16213ff2cfc18c2cbf52c9884722e004febbf7f4
[ "MIT" ]
null
null
null
#[\s\w+][\S]*
41.6625
116
0.612361
import json from django.core.validators import RegexValidator from django.http import HttpResponse, JsonResponse from django.views import View from django.views.decorators.csrf import csrf_exempt from django.forms.models import model_to_dict from django.utils.decorators import method_decorator from django import forms...
82
1,540
0
1,201
0
45
0
156
334
1d3ab4fbf1be2bf09998097bbdc07ed6dc14d047
23,416
py
Python
binclf/xgbopt.py
Casokaks/binclf
01b0f3c324d1e0e25d99ce1506c1c083044c83da
[ "MIT" ]
null
null
null
binclf/xgbopt.py
Casokaks/binclf
01b0f3c324d1e0e25d99ce1506c1c083044c83da
[ "MIT" ]
null
null
null
binclf/xgbopt.py
Casokaks/binclf
01b0f3c324d1e0e25d99ce1506c1c083044c83da
[ "MIT" ]
null
null
null
""" binclf xgbopt ================================== Utils library for XGBoost optimization. Author: Casokaks (https://github.com/Casokaks/) Created on: Nov 1st 2018 """ import math from sklearn.model_selection import StratifiedKFold, KFold from sklearn.model_selection import GridSearchCV, RandomizedS...
47.305051
130
0.517808
""" binclf xgbopt ================================== Utils library for XGBoost optimization. Author: Casokaks (https://github.com/Casokaks/) Created on: Nov 1st 2018 """ import math from sklearn.model_selection import StratifiedKFold, KFold from sklearn.model_selection import GridSearchCV, RandomizedS...
0
0
0
0
0
190
0
0
26
8a38c02768a23aff99a66c7a8475fe4bedae1f14
628
py
Python
Data Engineering/Productization and Cloud/Adding Data Science to a Web Application/iris-app/app.py
Tyler9937/Data-Science-and-Computer-Science-Fundamentals
927199af8e5bbebc0d8bb1f23c1509ca3f558d19
[ "MIT" ]
null
null
null
Data Engineering/Productization and Cloud/Adding Data Science to a Web Application/iris-app/app.py
Tyler9937/Data-Science-and-Computer-Science-Fundamentals
927199af8e5bbebc0d8bb1f23c1509ca3f558d19
[ "MIT" ]
null
null
null
Data Engineering/Productization and Cloud/Adding Data Science to a Web Application/iris-app/app.py
Tyler9937/Data-Science-and-Computer-Science-Fundamentals
927199af8e5bbebc0d8bb1f23c1509ca3f558d19
[ "MIT" ]
null
null
null
from flask import Flask # set FLASK_APP=app.py flask run app = Flask(__name__)
23.259259
107
0.68949
from flask import Flask from model import clf from model import X_test, y_test # set FLASK_APP=app.py flask run app = Flask(__name__) @app.route("/") def landing_page(): return 'Welcome to iris predictor. use /score, /predict, /iris to anaylis iris model with flask webapp' @app.route('/score') def score(): ...
0
400
0
0
0
0
0
11
136
ec4dabfe9cb4520c2d6073d3c77fbdbfb99debfb
741
py
Python
pyenv.py
brendonthiede/iterm-components
34f662a9a1b63a76a8463d6b229eea12a03fe3d2
[ "MIT" ]
68
2019-04-07T16:13:38.000Z
2022-03-16T11:00:02.000Z
pyenv.py
brendonthiede/iterm-components
34f662a9a1b63a76a8463d6b229eea12a03fe3d2
[ "MIT" ]
13
2019-04-07T13:56:22.000Z
2022-02-24T11:39:04.000Z
pyenv.py
brendonthiede/iterm-components
34f662a9a1b63a76a8463d6b229eea12a03fe3d2
[ "MIT" ]
16
2019-04-07T15:32:32.000Z
2021-11-24T15:45:15.000Z
""" To use this component, add the following to iterm2_print_user_vars: iterm2_set_user_var python_version $(pyenv_prompt_info) """ import iterm2 iterm2.run_forever(main)
24.7
86
0.695007
""" To use this component, add the following to iterm2_print_user_vars: iterm2_set_user_var python_version $(pyenv_prompt_info) """ import asyncio import iterm2 async def main(connection): component = iterm2.StatusBarComponent( short_description='pyenv', detailed_description='The currently ...
14
144
375
0
0
0
0
-7
46
b0744b28661d4d89f72d67556f1ad64a7acbc12c
2,935
py
Python
tests/pheweb/serve/components/chip/service_test.py
stellakeppo/pheweb
10ea317dbe9419fa77f99e6b735fa9a3290ccd5e
[ "MIT" ]
null
null
null
tests/pheweb/serve/components/chip/service_test.py
stellakeppo/pheweb
10ea317dbe9419fa77f99e6b735fa9a3290ccd5e
[ "MIT" ]
null
null
null
tests/pheweb/serve/components/chip/service_test.py
stellakeppo/pheweb
10ea317dbe9419fa77f99e6b735fa9a3290ccd5e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Service test. """ import pytest from flask import Flask from werkzeug.exceptions import NotFound from pheweb.serve.components.chip.model import JeevesContext from pheweb.serve.components.chip.service import get_dao def test_get_dao_missing() -> None: """ Test get doa with dao m...
24.663866
75
0.698126
# -*- coding: utf-8 -*- """ Service test. """ import pytest from flask import Flask from flask.testing import FlaskClient from werkzeug.exceptions import NotFound from pheweb.serve.components.chip.fs_storage import FileChipDAO from pheweb.serve.components.chip.model import JeevesContext, ChipDAO from pheweb.serve.com...
0
997
0
0
0
0
0
178
136
ed3a01f217e2fc018266e2f9ed0c79c02857c5e9
3,319
py
Python
util/chplenv/chpl_llvm.py
nldias/chapel
3a63044cd50b639dca8e851d4a505546b57bc299
[ "ECL-2.0", "Apache-2.0" ]
3
2015-02-15T16:49:11.000Z
2017-06-23T13:15:50.000Z
util/chplenv/chpl_llvm.py
nldias/chapel
3a63044cd50b639dca8e851d4a505546b57bc299
[ "ECL-2.0", "Apache-2.0" ]
30
2017-01-20T21:37:45.000Z
2017-03-28T21:11:56.000Z
util/chplenv/chpl_llvm.py
nldias/chapel
3a63044cd50b639dca8e851d4a505546b57bc299
[ "ECL-2.0", "Apache-2.0" ]
1
2021-03-11T13:34:27.000Z
2021-03-11T13:34:27.000Z
#!/usr/bin/env python3 if __name__ == '__main__': _main()
31.311321
79
0.630913
#!/usr/bin/env python3 import optparse import os import sys import chpl_bin_subdir, chpl_arch, chpl_compiler, chpl_platform, overrides from chpl_home_utils import get_chpl_third_party from utils import memoize, run_command @memoize def get_uniq_cfg_path_for(llvm_val): if llvm_val == "bundled": # put platfor...
0
1,220
0
0
0
1,672
0
68
294
efdb86419c033b6750316c6455dae6bb8e7b5bec
2,666
py
Python
guess_the_number/src/server.py
lethanhtrung222/2018-CFI-CTF
65c1123779745335bc4ad57f739ea8ae262a2774
[ "MIT" ]
21
2018-10-03T02:37:43.000Z
2022-03-06T22:20:48.000Z
guess_the_number/src/server.py
lethanhtrung222/2018-CFI-CTF
65c1123779745335bc4ad57f739ea8ae262a2774
[ "MIT" ]
3
2018-10-03T16:09:58.000Z
2019-02-26T01:22:32.000Z
guess_the_number/src/server.py
lethanhtrung222/2018-CFI-CTF
65c1123779745335bc4ad57f739ea8ae262a2774
[ "MIT" ]
11
2019-06-19T17:09:23.000Z
2021-04-23T22:31:34.000Z
#!/usr/bin/env python3 import os PORT = int(os.environ.get("PORT", 24000)) flag = open('flag', 'r').readline() start_server()
30.643678
91
0.59865
#!/usr/bin/env python3 import socket import os import sys import traceback import random from threading import Thread PORT = int(os.environ.get("PORT", 24000)) flag = open('flag', 'r').readline() def client_thread(conn, ip, port, MAX_BUFFER_SIZE = 4096): RANDOM_NUMBER = random.randint(0, 2 ** 32) tries = 0 ...
0
0
0
0
0
2,403
0
-25
157
33ab7a61de74f98960c3616d67d3bf3269b180e3
265
py
Python
u10/blueprints/formatting.py
THS-on/AttestationEngine
6746d602215df43056b04515bd9b831f0bb0ddbb
[ "BSD-3-Clause-Clear" ]
7
2021-10-20T05:22:47.000Z
2022-01-31T14:46:14.000Z
u10/blueprints/formatting.py
THS-on/AttestationEngine
6746d602215df43056b04515bd9b831f0bb0ddbb
[ "BSD-3-Clause-Clear" ]
15
2021-11-21T23:27:36.000Z
2022-03-25T11:35:07.000Z
u10/blueprints/formatting.py
THS-on/AttestationEngine
6746d602215df43056b04515bd9b831f0bb0ddbb
[ "BSD-3-Clause-Clear" ]
5
2021-12-08T20:55:34.000Z
2022-03-29T11:41:33.000Z
# Copyright 2021 Nokia # Licensed under the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause
24.090909
85
0.716981
# Copyright 2021 Nokia # Licensed under the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause import datetime def futc(t): # formats a timestamp to a UTC date: return datetime.datetime.utcfromtimestamp(float(t)).strftime("%Y-%m-%d_%H:%M:%S")
0
0
0
0
0
118
0
-6
46
375cac6db37aca214bb77aa1a9e05448b3646f08
501
py
Python
index_1/simple_nn.py
specbug/nnfs
ed17617483217ac308941468d9c0ec111bfdb4e9
[ "MIT" ]
null
null
null
index_1/simple_nn.py
specbug/nnfs
ed17617483217ac308941468d9c0ec111bfdb4e9
[ "MIT" ]
null
null
null
index_1/simple_nn.py
specbug/nnfs
ed17617483217ac308941468d9c0ec111bfdb4e9
[ "MIT" ]
null
null
null
# 3x2 NN (populated random values) inputs = [1.2, 5.1, 2.0] # (m1, m2, m3) w1 = [0.2, 1.2, 1.6] # weights for n1 (from m1, m2, m3) (w11, w21, w31) w2 = [3.7, 1.0, 0.6] # weights for n2 (from m1, m2, m3) (w12, w22, w32) b1 = 1.2 # bias for n1 b2 = 0.3 # bias for n2 n1 = inputs[0] * w1[0] + inputs[1] * w1[1] + inputs...
33.4
73
0.550898
# 3x2 NN (populated random values) inputs = [1.2, 5.1, 2.0] # (m1, m2, m3) w1 = [0.2, 1.2, 1.6] # weights for n1 (from m1, m2, m3) → (w11, w21, w31) w2 = [3.7, 1.0, 0.6] # weights for n2 (from m1, m2, m3) → (w12, w22, w32) b1 = 1.2 # bias for n1 b2 = 0.3 # bias for n2 n1 = inputs[0] * w1[0] + inputs[1] * w1[1] + inpu...
6
0
0
0
0
0
0
0
0
b1a6e8f8cf04b5a83272d6a69b25c92e61ce9349
2,400
py
Python
Clipping features in dataset and creating grid graticules.py
nimisha12345/Arcpy-programs
034250215bb2a4bd24cac9b2d4cc1343224638dc
[ "MIT" ]
1
2020-05-26T16:32:11.000Z
2020-05-26T16:32:11.000Z
Clipping features in dataset and creating grid graticules.py
nimisha12345/Arcpy-programs
034250215bb2a4bd24cac9b2d4cc1343224638dc
[ "MIT" ]
null
null
null
Clipping features in dataset and creating grid graticules.py
nimisha12345/Arcpy-programs
034250215bb2a4bd24cac9b2d4cc1343224638dc
[ "MIT" ]
null
null
null
import arcpy import os import math fc = r'D:\Pythoning\288205C\Database\288205C.gdb\Sheets\sheets_1' print "a" input_gdb = r'D:\Pythoning\288205C\Database\288205C.gdb' print "b.." output_folder = r'D:\Pythoning\outPut' print "c...." xmlFolder=r'D:\Pythoning' prj_file = r'D:\Pythoning\Nepal_Nagarkot_TM_81.prj...
39.344262
110
0.575417
import arcpy import os import math fc = r'D:\Pythoning\288205C\Database\288205C.gdb\Sheets\sheets_1' print "a" input_gdb = r'D:\Pythoning\288205C\Database\288205C.gdb' print "b.." output_folder = r'D:\Pythoning\outPut' print "c...." xmlFolder=r'D:\Pythoning' prj_file = r'D:\Pythoning\Nepal_Nagarkot_TM_81.prj...
0
0
0
0
0
0
0
0
0
ce5a8c6952c9e886fa1704b7b885707fc51af318
1,894
py
Python
locations/spiders/micro_center.py
jleedev/alltheplaces
258ef5be7ca736c83575734890e3aad055fa3304
[ "MIT" ]
297
2017-12-07T01:29:14.000Z
2022-03-29T06:58:01.000Z
locations/spiders/micro_center.py
jleedev/alltheplaces
258ef5be7ca736c83575734890e3aad055fa3304
[ "MIT" ]
2,770
2017-11-28T04:20:21.000Z
2022-03-31T11:29:16.000Z
locations/spiders/micro_center.py
jleedev/alltheplaces
258ef5be7ca736c83575734890e3aad055fa3304
[ "MIT" ]
111
2017-11-27T21:40:02.000Z
2022-01-22T01:21:52.000Z
# -*- coding: utf-8 -*-
34.436364
82
0.574446
# -*- coding: utf-8 -*- import json import scrapy from locations.hours import OpeningHours from locations.items import GeojsonPointItem class MicroCenterSpider(scrapy.Spider): name = "micro_center" item_attributes = {"brand": "Micro Center", "brand_wikidata": "Q6839153"} allowed_domains = ["www.microcen...
0
0
0
1,732
0
0
0
24
113
ffc72bbdd0fca28990744e308322b7e4cf8c1f5e
198
py
Python
WEEKS/CD_Sata-Structures/_MISC/misc-examples/python3-book-examples/sysconfig/sysconfig_get_path_names.py
webdevhub42/Lambda
b04b84fb5b82fe7c8b12680149e25ae0d27a0960
[ "MIT" ]
null
null
null
WEEKS/CD_Sata-Structures/_MISC/misc-examples/python3-book-examples/sysconfig/sysconfig_get_path_names.py
webdevhub42/Lambda
b04b84fb5b82fe7c8b12680149e25ae0d27a0960
[ "MIT" ]
null
null
null
WEEKS/CD_Sata-Structures/_MISC/misc-examples/python3-book-examples/sysconfig/sysconfig_get_path_names.py
webdevhub42/Lambda
b04b84fb5b82fe7c8b12680149e25ae0d27a0960
[ "MIT" ]
null
null
null
# Copyright (c) 2010 Doug Hellmann. All rights reserved. # """The names of the paths in a scheme. """ # end_pymotw_header import sysconfig for name in sysconfig.get_path_names(): print(name)
18
57
0.722222
# Copyright (c) 2010 Doug Hellmann. All rights reserved. # """The names of the paths in a scheme. """ # end_pymotw_header import sysconfig for name in sysconfig.get_path_names(): print(name)
0
0
0
0
0
0
0
0
0
5f930c28e5666a090d70d65ecfe8a371e47e9df5
265
py
Python
yanytapi/__init__.py
neverna-ptitsa/yanytapi
3331ec62f6e2d5ca702e9239195d5730457e991a
[ "MIT" ]
1
2019-11-08T18:23:43.000Z
2019-11-08T18:23:43.000Z
yanytapi/__init__.py
neverna-ptitsa/yanytapi
3331ec62f6e2d5ca702e9239195d5730457e991a
[ "MIT" ]
null
null
null
yanytapi/__init__.py
neverna-ptitsa/yanytapi
3331ec62f6e2d5ca702e9239195d5730457e991a
[ "MIT" ]
null
null
null
from .search import SearchAPI __version__ = "2.0.0" __author__ = "Ed Kohlwey" __all__ = ["SearchAPI"] if __name__ == "__main__": print("This module cannot be run on its own. Please use by running ", "\"from yanytapi import SearchAPI\"") exit(0)
24.090909
73
0.664151
from .search import SearchAPI __version__ = "2.0.0" __author__ = "Ed Kohlwey" __all__ = ["SearchAPI"] if __name__ == "__main__": print("This module cannot be run on its own. Please use by running ", "\"from yanytapi import SearchAPI\"") exit(0)
0
0
0
0
0
0
0
0
0
a6732f3656ecc0f078dbc888fa69796538b1ab12
993
py
Python
chemstruct/examples/ex03.py
pdemingos/chemstruct
2d732baa8f45f91271cd0f65a536a6d32eaaa287
[ "MIT" ]
5
2019-05-27T19:55:24.000Z
2021-10-09T19:24:56.000Z
chemstruct/examples/ex03.py
pdemingos/chemstruct
2d732baa8f45f91271cd0f65a536a6d32eaaa287
[ "MIT" ]
null
null
null
chemstruct/examples/ex03.py
pdemingos/chemstruct
2d732baa8f45f91271cd0f65a536a6d32eaaa287
[ "MIT" ]
null
null
null
"""Example 03: Writing LAMMPS Data File for a periodic system""" from quick import write_lmpdat # path to the xyz file from constants import PACKAGE_DIR # just the package directory xyz = PACKAGE_DIR + "/examples/rubber.xyz" # you can open rubber.xyz as a text file # notice how the Lattice is defined in the second ...
34.241379
74
0.76435
"""Example 03: Writing LAMMPS Data File for a periodic system""" from quick import write_lmpdat # path to the xyz file from constants import PACKAGE_DIR # just the package directory xyz = PACKAGE_DIR + "/examples/rubber.xyz" # you can open rubber.xyz as a text file # notice how the Lattice is defined in the second ...
0
0
0
0
0
0
0
0
0
1d3e63c3610d61ac9306e868b0699425fe470d7e
3,731
py
Python
tests/aequilibrae/project/test_nodes.py
Art-Ev/aequilibrae
9f438278e09c875717779bfcc99bf7ba75ed1372
[ "MIT" ]
82
2018-07-18T09:58:21.000Z
2022-03-30T15:36:25.000Z
tests/aequilibrae/project/test_nodes.py
Art-Ev/aequilibrae
9f438278e09c875717779bfcc99bf7ba75ed1372
[ "MIT" ]
197
2018-06-30T07:01:46.000Z
2022-03-30T06:30:43.000Z
tests/aequilibrae/project/test_nodes.py
Art-Ev/aequilibrae
9f438278e09c875717779bfcc99bf7ba75ed1372
[ "MIT" ]
29
2018-07-16T18:10:39.000Z
2022-03-30T15:36:26.000Z
from unittest import TestLoader TestLoader.sortTestMethodsUsing = None
33.612613
105
0.624497
from unittest import TestCase, TestLoader from sqlite3 import IntegrityError from copy import copy, deepcopy import os from shutil import copytree, rmtree from random import randint, random import uuid from tempfile import gettempdir from shapely.geometry import Point import shapely.wkb from aequilibrae.project import...
0
0
0
3,298
0
0
0
93
267
560951423cc4275c3b926ea1196288c3c9eecad2
10,860
py
Python
language_development/genRAW.py
bdeboe/iknow
8fdc422937de0bdda934f71285be81f68689f13b
[ "MIT" ]
null
null
null
language_development/genRAW.py
bdeboe/iknow
8fdc422937de0bdda934f71285be81f68689f13b
[ "MIT" ]
null
null
null
language_development/genRAW.py
bdeboe/iknow
8fdc422937de0bdda934f71285be81f68689f13b
[ "MIT" ]
null
null
null
# This Python file uses the following encoding: utf-8 ''' genRAW.py tool for generating linguistic reference material Usage: "python genRAW.py <text files directory> <output directory> <language>" Example (on Windows): "python genRAW.py C:/TextCorpus/English/Financial/ C:/Raw/English/ en ''' # import the usual...
46.016949
245
0.548987
# This Python file uses the following encoding: utf-8 ''' genRAW.py tool for generating linguistic reference material Usage: "python genRAW.py <text files directory> <output directory> <language>" Example (on Windows): "python genRAW.py C:/TextCorpus/English/Financial/ C:/Raw/English/ en ''' # import the usual...
192
0
0
0
0
454
0
12
45
5243f7e5c2fa0ef56fc8048327963d95b46ed1a3
10,821
py
Python
auth/tests/test_refresh_token.py
OpenMatchmaking/microservice-auth
b0597687d1c3472225be8dd4e2d04d20fc58c2b8
[ "BSD-3-Clause" ]
10
2018-03-14T13:14:04.000Z
2022-03-18T04:18:03.000Z
auth/tests/test_refresh_token.py
OpenMatchmaking/microservice-auth
b0597687d1c3472225be8dd4e2d04d20fc58c2b8
[ "BSD-3-Clause" ]
1
2018-10-09T15:12:07.000Z
2018-10-20T09:48:04.000Z
auth/tests/test_refresh_token.py
OpenMatchmaking/microservice-auth
b0597687d1c3472225be8dd4e2d04d20fc58c2b8
[ "BSD-3-Clause" ]
2
2019-09-15T06:35:58.000Z
2022-03-18T06:48:02.000Z
from app.token.api.workers.generate_token import GenerateTokenWorker from app.token.api.workers.refresh_token import RefreshTokenWorker REQUEST_TOKEN_QUEUE = GenerateTokenWorker.QUEUE_NAME REQUEST_TOKEN_EXCHANGE = GenerateTokenWorker.REQUEST_EXCHANGE_NAME RESPONSE_TOKEN_EXCHANGE = GenerateTokenWorker.RESPONSE_EXCHAN...
37.572917
97
0.723501
from asyncio import sleep as asyncio_sleep from sage_utils.amqp.clients import RpcAmqpClient from sage_utils.constants import NOT_FOUND_ERROR, TOKEN_ERROR, VALIDATION_ERROR from sage_utils.wrappers import Response from app.token.api.workers.generate_token import GenerateTokenWorker from app.token.api.workers.refresh_...
0
0
9,952
0
0
0
0
141
226
bb78d38690f7a988e2e66e05e4b6f1aa5f67d0a4
2,491
py
Python
leetcode/017_letter_combinations_of_a_phone_number.py
aiden0z/snippets
c3534ad718599a64f3c7ccdbfe51058e01244c60
[ "MIT" ]
null
null
null
leetcode/017_letter_combinations_of_a_phone_number.py
aiden0z/snippets
c3534ad718599a64f3c7ccdbfe51058e01244c60
[ "MIT" ]
null
null
null
leetcode/017_letter_combinations_of_a_phone_number.py
aiden0z/snippets
c3534ad718599a64f3c7ccdbfe51058e01244c60
[ "MIT" ]
null
null
null
"""Letter Combinations of a Phone Number Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent. A mapping of digit to letters (just like on the telephone buttons) is given below. Note that 1 does not map to any letters. 2 -> ['a', 'b', 'c'] 3 -> [...
24.184466
98
0.47772
"""Letter Combinations of a Phone Number Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent. A mapping of digit to letters (just like on the telephone buttons) is given below. Note that 1 does not map to any letters. 2 -> ['a', 'b', 'c'] 3 -> [...
0
0
0
1,288
0
0
0
0
46
7108d5639b3f9d4ab469d65486c54289537ab45b
268
py
Python
Chapter07/LUIS.py
PacktPublishing/Artificial-Intelligence-for-IoT-Cookbook
c2f522c2a1dbb78c99e05abc3c0e8706618f4353
[ "MIT" ]
19
2019-11-06T08:00:03.000Z
2022-01-01T20:02:40.000Z
Chapter07/LUIS.py
PacktPublishing/Artificial-Intelligence-for-IoT-Cookbook
c2f522c2a1dbb78c99e05abc3c0e8706618f4353
[ "MIT" ]
null
null
null
Chapter07/LUIS.py
PacktPublishing/Artificial-Intelligence-for-IoT-Cookbook
c2f522c2a1dbb78c99e05abc3c0e8706618f4353
[ "MIT" ]
9
2020-02-17T23:44:16.000Z
2022-02-03T15:26:46.000Z
import requests text_query = "a vanilla milk shake would be lovely" r = requests.get(f'URL YOU COPIED &query={text_query}') message = r.json() print(message['prediction']['topIntent']) for entity in message['prediction']["entities"]['$instance']: print(entity)
24.363636
61
0.716418
import requests text_query = "a vanilla milk shake would be lovely" r = requests.get(f'URL YOU COPIED &query={text_query}') message = r.json() print(message['prediction']['topIntent']) for entity in message['prediction']["entities"]['$instance']: print(entity)
0
0
0
0
0
0
0
0
0
89fa4d9775765fa7ece6a485f9998fa5127bb517
2,749
py
Python
zmail/info.py
solomsk/zmail
87499f803f9980f4dfbf92156b3cddf8b623fa74
[ "MIT" ]
1
2021-08-04T03:11:14.000Z
2021-08-04T03:11:14.000Z
zmail/info.py
solomsk/zmail
87499f803f9980f4dfbf92156b3cddf8b623fa74
[ "MIT" ]
null
null
null
zmail/info.py
solomsk/zmail
87499f803f9980f4dfbf92156b3cddf8b623fa74
[ "MIT" ]
null
null
null
""" zmail.info ~~~~~~~~~~ This module provide supported server information. 'Server_provider_address':{ 'protocol':('protocol_server_address', port, use_ssl,use_tls), } """ SUPPORTED_SERVER = { '163.com': { 'smtp': ('smtp.163.com', 994, True, False), 'pop3': ('pop.163.com', 995, True, False), ...
26.68932
73
0.558385
""" zmail.info ~~~~~~~~~~ This module provide supported server information. 'Server_provider_address':{ 'protocol':('protocol_server_address', port, use_ssl,use_tls), } """ SUPPORTED_SERVER = { '163.com': { 'smtp': ('smtp.163.com', 994, True, False), 'pop3': ('pop.163.com', 995, True, False), ...
0
0
0
0
0
0
0
0
0
3fed71cd4e305fa0aa001759f842a5767b9fe8dc
14,826
py
Python
rsp1570serial/emulator.py
pp81381/rsp1570serial
9a31be2578f00905a1df2a78a46f3c87631cd177
[ "MIT" ]
1
2020-03-06T06:04:18.000Z
2020-03-06T06:04:18.000Z
rsp1570serial/emulator.py
pp81381/rsp1570serial
9a31be2578f00905a1df2a78a46f3c87631cd177
[ "MIT" ]
null
null
null
rsp1570serial/emulator.py
pp81381/rsp1570serial
9a31be2578f00905a1df2a78a46f3c87631cd177
[ "MIT" ]
1
2020-01-21T18:27:07.000Z
2020-01-21T18:27:07.000Z
import argparse import asyncio import logging from rsp1570serial.messages import (MSGTYPE_VOLUME_DIRECT_COMMANDS, MSGTYPE_ZONE_2_VOLUME_DIRECT_COMMANDS, MSGTYPE_ZONE_3_VOLUME_DIRECT_COMMANDS, MSGTYPE_ZONE_4_VOLUME_DIRECT_COMMANDS) MIN_VOLUME = 0 MAX_VOLUME = 96 INITIAL_VOLUME = 50 INITIAL_SOURCE = "VIDEO 1" VOLUME_DI...
31.344609
101
0.599555
import argparse import asyncio from contextlib import asynccontextmanager from functools import wraps import logging from rsp1570serial.commands import messages from rsp1570serial.icons import icon_list_to_flags from rsp1570serial.messages import ( decode_message_stream, CommandMessage, DEVICE_ID_RSP1570, ...
0
2,720
5,605
2,145
0
267
0
224
340
595b147712d0948c0820e32742ad0a8045518e8b
6,800
py
Python
pyaz/ams/content_key_policy/option/__init__.py
py-az-cli/py-az-cli
9a7dc44e360c096a5a2f15595353e9dad88a9792
[ "MIT" ]
null
null
null
pyaz/ams/content_key_policy/option/__init__.py
py-az-cli/py-az-cli
9a7dc44e360c096a5a2f15595353e9dad88a9792
[ "MIT" ]
null
null
null
pyaz/ams/content_key_policy/option/__init__.py
py-az-cli/py-az-cli
9a7dc44e360c096a5a2f15595353e9dad88a9792
[ "MIT" ]
1
2022-02-03T09:12:01.000Z
2022-02-03T09:12:01.000Z
from .... pyaz_utils import _call_az def add(account_name, name, policy_option_name, resource_group, alt_rsa_token_keys=None, alt_symmetric_token_keys=None, alt_x509_token_keys=None, ask=None, audience=None, clear_key_configuration=None, fair_play_pfx=None, fair_play_pfx_password=None, fp_playback_duration_seconds=Non...
80
573
0.758676
from .... pyaz_utils import _call_az def add(account_name, name, policy_option_name, resource_group, alt_rsa_token_keys=None, alt_symmetric_token_keys=None, alt_x509_token_keys=None, ask=None, audience=None, clear_key_configuration=None, fair_play_pfx=None, fair_play_pfx_password=None, fp_playback_duration_seconds=Non...
0
0
0
0
0
0
0
0
0
c9855ae5b1a629bd6c24224115559edef0eff041
586
py
Python
pipeline/tests/model_tests.py
siddBanPsu/production-tools
138008cc93fa8b2bcc1991fa2978ac3648f276df
[ "BSD-3-Clause" ]
457
2018-11-24T17:46:41.000Z
2022-03-27T16:34:26.000Z
pipeline/tests/model_tests.py
siddBanPsu/production-tools
138008cc93fa8b2bcc1991fa2978ac3648f276df
[ "BSD-3-Clause" ]
null
null
null
pipeline/tests/model_tests.py
siddBanPsu/production-tools
138008cc93fa8b2bcc1991fa2978ac3648f276df
[ "BSD-3-Clause" ]
39
2018-11-26T19:31:01.000Z
2022-01-19T11:01:35.000Z
""" Unit tests for the MNIST model ============================== """
23.44
67
0.672355
""" Unit tests for the MNIST model ============================== """ import os import shutil from sklearn.externals import joblib from sklearn.metrics import accuracy_score from pipeline.dags.train_model import get_mnist_data, fit_estimator def test_accuracy(): # XX: This is not the cleanest test ever, but show...
0
0
0
0
0
319
0
62
134
0253568191ae764461436621ad0393edf5f6a7d8
2,637
py
Python
app/scraper.py
ftupas/hta2021-snowdepth-analysis
344bff95f8be0ac27a960390681c809132aeef3c
[ "MIT" ]
2
2021-03-14T05:13:47.000Z
2021-10-01T07:03:45.000Z
app/scraper.py
ftupas/hta2021-snowdepth-analysis
344bff95f8be0ac27a960390681c809132aeef3c
[ "MIT" ]
null
null
null
app/scraper.py
ftupas/hta2021-snowdepth-analysis
344bff95f8be0ac27a960390681c809132aeef3c
[ "MIT" ]
2
2021-03-14T12:33:43.000Z
2021-03-14T12:34:25.000Z
import os URL = 'https://data.coat.no' DATASET = 'v_snowdepth_intensive_v1' CWD = os.getcwd() OUTPUT_PATH = os.path.join(CWD, 'raw_data') if __name__ == '__main__': main()
26.908163
85
0.608267
import requests import os import zipfile import wget from bs4 import BeautifulSoup URL = 'https://data.coat.no' DATASET = 'v_snowdepth_intensive_v1' CWD = os.getcwd() OUTPUT_PATH = os.path.join(CWD, 'raw_data') class Scraper: """ Creates a Scraper Object :param root_url: Root URL of page being scraped ...
0
0
0
1,969
0
372
0
-15
134
3c2ea07e8c7c3d3a34087f461ba62ead5229adad
170
py
Python
tests/read_from_stdin.py
rhpvorderman/dnaio
ae1fd0e1771ec171d22e905cd26b7817502acdca
[ "MIT" ]
32
2018-06-25T15:46:29.000Z
2022-03-29T15:47:38.000Z
tests/read_from_stdin.py
rhpvorderman/dnaio
ae1fd0e1771ec171d22e905cd26b7817502acdca
[ "MIT" ]
63
2019-06-20T13:15:44.000Z
2022-03-26T06:27:06.000Z
tests/read_from_stdin.py
rhpvorderman/dnaio
ae1fd0e1771ec171d22e905cd26b7817502acdca
[ "MIT" ]
5
2019-05-20T15:34:59.000Z
2022-01-24T03:11:19.000Z
"""Test helper script that reads from stdin""" import dnaio if __name__ == '__main__': with dnaio.open('-') as f: records = list(f) print(len(records))
18.888889
46
0.623529
"""Test helper script that reads from stdin""" import dnaio if __name__ == '__main__': with dnaio.open('-') as f: records = list(f) print(len(records))
0
0
0
0
0
0
0
0
0
e0e3618dc74e9d50ddb048939bd04f5e330ddbfe
1,495
py
Python
mycodes/check_list_of_files.py
AzmHmd/ERG_Synthesis_model
6d1d9666f95b4d002fd6d5df82f9e2f0f1b7963f
[ "MIT" ]
null
null
null
mycodes/check_list_of_files.py
AzmHmd/ERG_Synthesis_model
6d1d9666f95b4d002fd6d5df82f9e2f0f1b7963f
[ "MIT" ]
null
null
null
mycodes/check_list_of_files.py
AzmHmd/ERG_Synthesis_model
6d1d9666f95b4d002fd6d5df82f9e2f0f1b7963f
[ "MIT" ]
null
null
null
import os # used for JSs path0='/home/azamhamidinekoo/Documents/projects/Azam_HDGAN_feb21/results/results3_1may2021/original_he' path1 = '/home/azamhamidinekoo/Documents/projects/Azam_HDGAN_feb21/dataset/cohort3/original_he' for case in os.listdir(path0): x_sr = os.path.join(path0,case,'he_erg_1may21/test_latest/ima...
46.71875
545
0.745819
import os # used for JSs path0='/home/azamhamidinekoo/Documents/projects/Azam_HDGAN_feb21/results/results3_1may2021/original_he' path1 = '/home/azamhamidinekoo/Documents/projects/Azam_HDGAN_feb21/dataset/cohort3/original_he' for case in os.listdir(path0): x_sr = os.path.join(path0,case,'he_erg_1may21/test_latest/ima...
0
0
0
0
0
0
0
0
0
c6a373d3b8ab7f9d74724bbc246432cfc524ccb4
23,492
py
Python
src/malibu/database/dbmapper.py
maiome/malibu
8e272678ecba5cf2f76ae284d18ee47eaed9dd26
[ "Unlicense" ]
null
null
null
src/malibu/database/dbmapper.py
maiome/malibu
8e272678ecba5cf2f76ae284d18ee47eaed9dd26
[ "Unlicense" ]
null
null
null
src/malibu/database/dbmapper.py
maiome/malibu
8e272678ecba5cf2f76ae284d18ee47eaed9dd26
[ "Unlicense" ]
null
null
null
# -*- coding: utf-8 -*- __doc__ = """ malibu.database.dbmapper ------------------------ This is a small, hackish ORM for SQLite3. Note from the author: (01 / 14 / 2016) -------------------------------------- I've got to be honest, this is probably the worst code I have ever written and read. At this point, this co...
34.445748
128
0.534139
# -*- coding: utf-8 -*- import copy import re import sqlite3 import types from malibu.database import dbtypeconv __doc__ = """ malibu.database.dbmapper ------------------------ This is a small, hackish ORM for SQLite3. Note from the author: (01 / 14 / 2016) -------------------------------------- I've got to be hon...
0
9,143
0
13,215
0
0
0
-21
179
ffcac300fa89fc062f04dc09ba503daf4c20ec8e
8,050
py
Python
system_calls/tables/ia64.py
hrw/python-syscalls
52f9fcbe8963ea261bbef0b969f8f50f373c4860
[ "MIT" ]
2
2021-05-13T16:52:29.000Z
2021-06-27T03:39:17.000Z
system_calls/tables/ia64.py
hrw/python-syscalls
52f9fcbe8963ea261bbef0b969f8f50f373c4860
[ "MIT" ]
4
2021-05-13T16:48:46.000Z
2021-08-04T12:59:52.000Z
system_calls/tables/ia64.py
hrw/python-syscalls
52f9fcbe8963ea261bbef0b969f8f50f373c4860
[ "MIT" ]
1
2021-09-16T13:33:51.000Z
2021-09-16T13:33:51.000Z
# Content autogenerated. Do not edit. syscalls_ia64 = { "_sysctl": 1150, "accept": 1194, "accept4": 1334, "access": 1049, "acct": 1064, "add_key": 1271, "adjtimex": 1131, "bdflush": 1138, "bind": 1191, "bpf": 1341, "brk": 1060, "capget": 1185, "capset": 1186, "ch...
22.804533
37
0.56559
# Content autogenerated. Do not edit. syscalls_ia64 = { "_sysctl": 1150, "accept": 1194, "accept4": 1334, "access": 1049, "acct": 1064, "add_key": 1271, "adjtimex": 1131, "bdflush": 1138, "bind": 1191, "bpf": 1341, "brk": 1060, "capget": 1185, "capset": 1186, "ch...
0
0
0
0
0
0
0
0
0
7a343e3e913a4a803ee8617625578d730fce8ec0
18,237
py
Python
storagevet/POI.py
epri-dev/StorageVET
26b740ba03b1ad4fc0734af56787ec5c0ebd3824
[ "BSD-3-Clause" ]
35
2020-06-04T18:04:11.000Z
2022-02-24T07:48:29.000Z
storagevet/POI.py
epri-dev/StorageVET
26b740ba03b1ad4fc0734af56787ec5c0ebd3824
[ "BSD-3-Clause" ]
4
2021-05-13T22:36:24.000Z
2022-01-13T03:42:16.000Z
storagevet/POI.py
epri-dev/StorageVET
26b740ba03b1ad4fc0734af56787ec5c0ebd3824
[ "BSD-3-Clause" ]
16
2020-06-04T18:07:18.000Z
2022-03-10T13:27:08.000Z
""" Copyright (c) 2021, Electric Power Research Institute All rights reserved. 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 li...
51.957265
190
0.671986
""" Copyright (c) 2021, Electric Power Research Institute All rights reserved. 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 li...
0
0
0
16,541
0
0
0
10
111
edaa7f015ffb7243019f6bf6a3b8fbc3bab206e0
266
py
Python
sem6/wbo/laby/lab4/src/task1.py
abrams27/mimuw
ad8b01b63c05d7903aab29fd145845cf97ac32d9
[ "MIT" ]
3
2021-10-07T18:19:37.000Z
2021-10-07T19:02:14.000Z
sem6/wbo/laby/lab4/src/task1.py
abrams27/mimuw
ad8b01b63c05d7903aab29fd145845cf97ac32d9
[ "MIT" ]
null
null
null
sem6/wbo/laby/lab4/src/task1.py
abrams27/mimuw
ad8b01b63c05d7903aab29fd145845cf97ac32d9
[ "MIT" ]
3
2021-12-02T11:09:09.000Z
2022-01-25T21:31:23.000Z
from Bio import AlignIO pah_paralogues = AlignIO.read("../input/Human_PAH_paralogues.nex", "nexus") h2bfs_paralogues = AlignIO.read("../input/Human_H2BFS_paralogues.nex", "nexus") pah_orthologues_30 = AlignIO.read("../input/Human_PAH_orthologues_30.nex", "nexus")
38
83
0.774436
from Bio import AlignIO pah_paralogues = AlignIO.read("../input/Human_PAH_paralogues.nex", "nexus") h2bfs_paralogues = AlignIO.read("../input/Human_H2BFS_paralogues.nex", "nexus") pah_orthologues_30 = AlignIO.read("../input/Human_PAH_orthologues_30.nex", "nexus")
0
0
0
0
0
0
0
0
0
90633c33cd564f0b14090ba6973a2034a381e7b2
1,377
py
Python
tk_gui_tools/template/base.py
Walrick/gui_tool
47feddcc61e24e2fba2bff779e712c626dea5923
[ "MIT" ]
null
null
null
tk_gui_tools/template/base.py
Walrick/gui_tool
47feddcc61e24e2fba2bff779e712c626dea5923
[ "MIT" ]
null
null
null
tk_gui_tools/template/base.py
Walrick/gui_tool
47feddcc61e24e2fba2bff779e712c626dea5923
[ "MIT" ]
null
null
null
#!/usr/bin/python3 # -*- coding: utf8 -*- # Instance import tk_gui_tools.manage_widget as manage_widget # Heritage
24.589286
74
0.641975
#!/usr/bin/python3 # -*- coding: utf8 -*- import tkinter as tk # Instance import tk_gui_tools.manage_widget as manage_widget # Heritage from tk_gui_tools.command_gui.mouse import Mouse from tk_gui_tools.command_gui.keyboard import Keyboard from tk_gui_tools.command_gui.command import CommandGUI from tk_gui_tools.too...
4
0
0
1,002
0
0
0
121
134
a1e5b809f0cb0da8a0f99295e12dd1736710665a
2,944
py
Python
sidecar/files_to_cm.py
sysincz/k8s-sidecar-cm-to-file
547361b7be5d379101c2cdd274543a7e69478e3e
[ "MIT" ]
2
2019-03-04T17:21:19.000Z
2019-08-08T14:10:52.000Z
sidecar/files_to_cm.py
sysincz/k8s-sidecar-cm-to-file
547361b7be5d379101c2cdd274543a7e69478e3e
[ "MIT" ]
null
null
null
sidecar/files_to_cm.py
sysincz/k8s-sidecar-cm-to-file
547361b7be5d379101c2cdd274543a7e69478e3e
[ "MIT" ]
null
null
null
import sys import argparse parser = argparse.ArgumentParser(sys.argv[0]) #parser.add_argument("--configmap", help="Create configmap (default: 'Secret')", action='store_true',default=False) parser.add_argument("--name", help="Name of Secret/Configmap", type=str,required=True) parser.add_argument("--dir", help="Source d...
28.307692
116
0.653193
from kubernetes import client, config, watch from kubernetes.client.rest import ApiException import os,sys import re import argparse parser = argparse.ArgumentParser(sys.argv[0]) #parser.add_argument("--configmap", help="Create configmap (default: 'Secret')", action='store_true',default=False) parser.add_argument("--n...
0
0
0
0
0
1,932
0
40
181
e7ece700ce89ea6d7f131a4ad6be6b235cb9e4c9
1,198
py
Python
manual/metadata.py
acmutd/leadership
68c858100448aa1288f80a50f06843a60e9f0056
[ "MIT" ]
1
2021-12-13T21:00:38.000Z
2021-12-13T21:00:38.000Z
manual/metadata.py
acmutd/leadership
68c858100448aa1288f80a50f06843a60e9f0056
[ "MIT" ]
34
2021-09-09T21:39:20.000Z
2022-03-30T16:26:14.000Z
manual/metadata.py
acmutd/leadership
68c858100448aa1288f80a50f06843a60e9f0056
[ "MIT" ]
3
2021-08-31T18:28:08.000Z
2021-09-18T16:15:23.000Z
# Note: After all the names add the word STOP on the next row in the first column import firebase_admin from firebase_admin import credentials from firebase_admin import firestore import pandas as pd # Initialize firebase admin sdk cred = credentials.Certificate('path-to-acm-core-json') firebase_admin.initialize_app(...
34.228571
121
0.719533
# Note: After all the names add the word STOP on the next row in the first column import firebase_admin from firebase_admin import credentials from firebase_admin import firestore import pandas as pd # Initialize firebase admin sdk cred = credentials.Certificate('path-to-acm-core-json') firebase_admin.initialize_app(...
0
0
0
0
0
0
0
0
0
71d2fec48f69dcb2883d8c22dea322aba673fa05
24,039
py
Python
src/compas/geometry/primitives/frame.py
robin-gdwl/compas
76a3f75e2e8f73a07b73189dc2fe6e6c70762fa1
[ "MIT" ]
null
null
null
src/compas/geometry/primitives/frame.py
robin-gdwl/compas
76a3f75e2e8f73a07b73189dc2fe6e6c70762fa1
[ "MIT" ]
null
null
null
src/compas/geometry/primitives/frame.py
robin-gdwl/compas
76a3f75e2e8f73a07b73189dc2fe6e6c70762fa1
[ "MIT" ]
null
null
null
from __future__ import print_function __all__ = ['Frame'] # ============================================================================== # Main # ============================================================================== if __name__ == '__main__': import doctest doctest.testmod(globs=globals())
32.180723
143
0.547069
from __future__ import print_function import math from compas.geometry import cross_vectors from compas.geometry import subtract_vectors from compas.geometry import matrix_from_basis_vectors from compas.geometry import basis_vectors_from_matrix from compas.geometry import quaternion_from_matrix from compas.geometry i...
0
14,747
0
8,051
0
0
0
463
462
7c09361e087ab9f6202790d8bf9df23a4919416e
1,260
py
Python
exercise_04/exercise_code/tests/solver_tests.py
Sihifu/i2dl
5beafccc85d29ebc62c37b42674df209b7995c39
[ "RSA-MD" ]
null
null
null
exercise_04/exercise_code/tests/solver_tests.py
Sihifu/i2dl
5beafccc85d29ebc62c37b42674df209b7995c39
[ "RSA-MD" ]
null
null
null
exercise_04/exercise_code/tests/solver_tests.py
Sihifu/i2dl
5beafccc85d29ebc62c37b42674df209b7995c39
[ "RSA-MD" ]
null
null
null
from .base_tests import test_results_to_score import numpy as np def rel_error(x, y): """ returns relative error """ return np.max(np.abs(x - y) / (np.maximum(1e-8, np.abs(x) + np.abs(y)))) def test_solver(Solver): """Test the Solver""" test = SolverTest(Solver) return test_results_to_score(te...
25.714286
82
0.646825
from .base_tests import UnitTest, CompositeTest, MethodTest, test_results_to_score import numpy as np import math def rel_error(x, y): """ returns relative error """ return np.max(np.abs(x - y) / (np.maximum(1e-8, np.abs(x) + np.abs(y)))) class SolverStepTest(UnitTest): """Test whether Solver._step() up...
0
0
0
839
0
0
0
27
68
c28c746a7eb32ca713efa513d10333f9ad54ed58
3,835
py
Python
example/table_scan.py
colinlouie/py_maprclient
ab8f1737a9181363f49e24d5261c3be28a8448de
[ "MIT" ]
1
2019-04-22T20:03:51.000Z
2019-04-22T20:03:51.000Z
example/table_scan.py
colinlouie/py_maprclient
ab8f1737a9181363f49e24d5261c3be28a8448de
[ "MIT" ]
null
null
null
example/table_scan.py
colinlouie/py_maprclient
ab8f1737a9181363f49e24d5261c3be28a8448de
[ "MIT" ]
null
null
null
# Standard libraries. import threading # Third-party libraries. # None # Internal libraries. # For table scans. scan_mutex = threading.Lock() scan_cv = threading.Condition(scan_mutex) is_scan_done = False if __name__ == '__main__': main() # EOF
28.834586
78
0.654237
# Standard libraries. import ctypes import threading # Third-party libraries. # None # Internal libraries. from maprclient.maprclient import * # All functions are prefixed with "hb_". # For table scans. scan_mutex = threading.Lock() scan_cv = threading.Condition(scan_mutex) is_scan_done = False @ctypes.CFUNCTYPE(...
0
1,441
0
0
0
1,932
0
6
200
bf6811e5c8bccfc1867ca446e6a4c9664cede10b
170
py
Python
scripts/item/consume_2435046.py
Snewmy/swordie
ae01ed4ec0eb20a18730e8cd209eea0b84a8dd17
[ "MIT" ]
null
null
null
scripts/item/consume_2435046.py
Snewmy/swordie
ae01ed4ec0eb20a18730e8cd209eea0b84a8dd17
[ "MIT" ]
null
null
null
scripts/item/consume_2435046.py
Snewmy/swordie
ae01ed4ec0eb20a18730e8cd209eea0b84a8dd17
[ "MIT" ]
null
null
null
# Fireworks Damage Skin success = sm.addDamageSkin(2435046) if success: sm.chat("The Fireworks Damage Skin has been added to your account's damage skin collection.")
34
97
0.770588
# Fireworks Damage Skin success = sm.addDamageSkin(2435046) if success: sm.chat("The Fireworks Damage Skin has been added to your account's damage skin collection.")
0
0
0
0
0
0
0
0
0
566c39a19b4cf378415136aba59bb7a786d033e3
7,054
py
Python
notebooks/0.1_TF_Ranking_Basic_Intro.py
AlessandroVol23/kdd-cup-2019
7f140d1d6213dc0d05d07a2c8bff9fe949b72ed8
[ "MIT" ]
10
2019-07-24T19:14:59.000Z
2022-01-04T06:35:27.000Z
notebooks/0.1_TF_Ranking_Basic_Intro.py
AlessandroVol23/kdd-cup-2019
7f140d1d6213dc0d05d07a2c8bff9fe949b72ed8
[ "MIT" ]
2
2020-07-02T15:53:45.000Z
2020-07-29T04:40:33.000Z
notebooks/0.1_TF_Ranking_Basic_Intro.py
AlessandroVol23/kdd-cup-2019
7f140d1d6213dc0d05d07a2c8bff9fe949b72ed8
[ "MIT" ]
8
2019-07-21T20:05:09.000Z
2021-12-28T03:03:40.000Z
# -*- coding: utf-8 -*- """ Created on Sun May 5 16:03:53 2019 @author: kuche_000 Get Started with TF Ranking """ # Import needed Packages: import tensorflow as tf import tensorflow_ranking as tfr tf.enable_eager_execution() tf.executing_eagerly() # (1) Define all flexible Parameters-------------------------------...
33.913462
115
0.680749
# -*- coding: utf-8 -*- """ Created on Sun May 5 16:03:53 2019 @author: kuche_000 Get Started with TF Ranking """ # Import needed Packages: import tensorflow as tf import tensorflow_ranking as tfr tf.enable_eager_execution() tf.executing_eagerly() # (1) Define all flexible Parameters-------------------------------...
0
0
0
0
0
0
0
0
0
f43ed6d55b45e41c29ca5f99a5be95041aace04d
1,132
py
Python
push/all_ploy.py
luckyharryji/physical-modeling-band
636b6f1d85914bc5919b7307bee6e8b2dcc34ff2
[ "MIT" ]
null
null
null
push/all_ploy.py
luckyharryji/physical-modeling-band
636b6f1d85914bc5919b7307bee6e8b2dcc34ff2
[ "MIT" ]
null
null
null
push/all_ploy.py
luckyharryji/physical-modeling-band
636b6f1d85914bc5919b7307bee6e8b2dcc34ff2
[ "MIT" ]
null
null
null
import csv import matplotlib.animation as animation ''' timestamo: data[11] linearacceleration x,y,z[12,13,14] ''' import numpy as np from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt if __name__=='__main__': number = 6 _ax,_ay,_az,_time = load_data(number) print _ax fig = plt....
24.085106
66
0.629859
import csv import matplotlib.animation as animation ''' timestamo: data[11] linearacceleration x,y,z[12,13,14] ''' import numpy as np from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt def load_data(index): with open('signal'+str(index)+'_data.csv','rb') as f_in: reader = csv.reader(...
0
0
0
0
0
529
0
0
23
749be9f617c8931bb7797b209b37056e827e6c90
261
py
Python
swc/__main__.py
pesap/swc
7ded1cda44489a82415f507bf407e9a8454c0ae5
[ "MIT" ]
1
2021-07-27T00:57:02.000Z
2021-07-27T00:57:02.000Z
swc/__main__.py
pesap/swc
7ded1cda44489a82415f507bf407e9a8454c0ae5
[ "MIT" ]
5
2018-08-06T23:51:03.000Z
2020-07-09T03:02:12.000Z
swc/__main__.py
pesap/swc
7ded1cda44489a82415f507bf407e9a8454c0ae5
[ "MIT" ]
null
null
null
#Code to import packages import sys import os from dotenv import load_dotenv from pathlib import Path # python3 only env_path = Path('..') / '.env' load_dotenv(dotenv_path=env_path) ROOT = os.path.dirname(os.path.realpath(__file__)) sys.path.insert(0, ROOT)
21.75
50
0.758621
#Code to import packages import sys import os from dotenv import load_dotenv from pathlib import Path # python3 only env_path = Path('..') / '.env' load_dotenv(dotenv_path=env_path) ROOT = os.path.dirname(os.path.realpath(__file__)) sys.path.insert(0, ROOT)
0
0
0
0
0
0
0
0
0
06601b808022eb3f818b3279c458155ace3f5b0f
2,945
py
Python
src/the_tale/the_tale/linguistics/relations.py
al-arz/the-tale
542770257eb6ebd56a5ac44ea1ef93ff4ab19eb5
[ "BSD-3-Clause" ]
85
2017-11-21T12:22:02.000Z
2022-03-27T23:07:17.000Z
src/the_tale/the_tale/linguistics/relations.py
al-arz/the-tale
542770257eb6ebd56a5ac44ea1ef93ff4ab19eb5
[ "BSD-3-Clause" ]
545
2017-11-04T14:15:04.000Z
2022-03-27T14:19:27.000Z
src/the_tale/the_tale/linguistics/relations.py
al-arz/the-tale
542770257eb6ebd56a5ac44ea1ef93ff4ab19eb5
[ "BSD-3-Clause" ]
45
2017-11-11T12:36:30.000Z
2022-02-25T06:10:44.000Z
import smart_imports smart_imports.all()
33.850575
112
0.616638
import smart_imports smart_imports.all() def word_type_record(name): utg_type = getattr(utg_relations.WORD_TYPE, name) return (name, utg_type.value, utg_type.text, utg_type) class ALLOWED_WORD_TYPE(rels_django.DjangoEnum): utg_type = rels.Column() records = (wo...
516
0
0
2,201
0
155
0
0
276
90a5c603b6a49c5bf9f6c95ddd80e082f30b0adc
8,067
py
Python
src/rxnpy/reaction/ingredients.py
dylanwal/rxnpy
e8243728b098778cce597d15b5967a7a6ca5981b
[ "BSD-3-Clause" ]
null
null
null
src/rxnpy/reaction/ingredients.py
dylanwal/rxnpy
e8243728b098778cce597d15b5967a7a6ca5981b
[ "BSD-3-Clause" ]
null
null
null
src/rxnpy/reaction/ingredients.py
dylanwal/rxnpy
e8243728b098778cce597d15b5967a7a6ca5981b
[ "BSD-3-Clause" ]
null
null
null
if __name__ == "__main__": calc = IngredientCalculator() calc.add({ "name": "secbuLi", "volume": 0.0172 * Unit("ml"), "molar_mass": 64.06 * Unit("g/mol"), "density": 0.768 * Unit("g/ml"), "molar_conc": 1.3 * Unit("M") }) calc.add({ "name": "styrene", ...
33.473029
111
0.526962
from warnings import warn from rxnpy.chemical.ingredient import Ingredient from rxnpy.reaction.tools.ingredients_calc import QuantityCalculator, RelativeCalculator class IngredientsError(Exception): pass class Ingredients: _error = IngredientsError _label_length = 12 def __init__(self, *args): ...
0
404
0
6,521
0
0
0
98
113
03758bb1c46458b93d2ed8394e54937de3a43fb4
1,395
py
Python
model/utils/generate_anchor.py
yurynamgung/faster-rcnn-pytorch
6817ffdedfa8527ea06a93782ac37ebfdb3d33af
[ "MIT" ]
4
2018-03-18T15:38:24.000Z
2018-09-21T13:17:39.000Z
model/utils/generate_anchor.py
yurynamgung/faster-rcnn-pytorch
6817ffdedfa8527ea06a93782ac37ebfdb3d33af
[ "MIT" ]
2
2018-06-11T11:54:56.000Z
2019-04-30T12:02:17.000Z
model/utils/generate_anchor.py
yurynamgung/faster-rcnn-pytorch
6817ffdedfa8527ea06a93782ac37ebfdb3d33af
[ "MIT" ]
5
2018-08-23T19:29:09.000Z
2020-11-11T09:39:06.000Z
if __name__ == '__main__': anchor = generate_anchor(50, 50, (512,812.34)) assert anchor.shape == (50*50*9,4)
34.875
113
0.612186
import math import numpy as np def generate_anchor(feature_height, feature_width, image_size, ratio=[0.5, 1, 2], anchor_size = [128, 256, 512]): #---------- debug assert len(image_size) == 2 #---------- anchor_base = [] for ratio_t in ratio: for anchor_size_t in anchor_size: h =...
0
0
0
0
0
1,223
0
-13
67
fc59366a42d775d2a182036874fb400c41208af1
4,944
py
Python
datasets/tiny_imagenet_input.py
0three/CAAD-2018-Kunlin
51bd872aa2999be746ebfca332b202a62696528a
[ "MIT" ]
12
2018-10-04T16:27:41.000Z
2020-03-17T02:49:31.000Z
datasets/tiny_imagenet_input.py
0three/CAAD-2018-Kunlin
51bd872aa2999be746ebfca332b202a62696528a
[ "MIT" ]
1
2020-12-02T03:44:37.000Z
2020-12-02T03:44:37.000Z
datasets/tiny_imagenet_input.py
0three/CAAD-2018-Kunlin
51bd872aa2999be746ebfca332b202a62696528a
[ "MIT" ]
null
null
null
#copyright 2018 Google 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
32.96
80
0.686691
#copyright 2018 Google 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
0
0
0
0
0
0
0
0
0
b50ed4891d4020e22861ce60e4e25edfd0414404
17,210
py
Python
tests/transforms/test_get_unitary_matrix.py
KarimAED/pennylane
d201dd52def0dfa44efd485e06ea06defda22dc0
[ "Apache-2.0" ]
null
null
null
tests/transforms/test_get_unitary_matrix.py
KarimAED/pennylane
d201dd52def0dfa44efd485e06ea06defda22dc0
[ "Apache-2.0" ]
null
null
null
tests/transforms/test_get_unitary_matrix.py
KarimAED/pennylane
d201dd52def0dfa44efd485e06ea06defda22dc0
[ "Apache-2.0" ]
null
null
null
# Copyright 2018-2021 Xanadu Quantum Technologies Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or...
29.982578
143
0.653515
# Copyright 2018-2021 Xanadu Quantum Technologies Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or...
0
4,866
0
0
0
992
0
0
489
d9d446fb251ac1c3179a6b49567d6b32c1d9b1f9
74,029
py
Python
interp.py
hhu-stups/python_jvm
57b9e6cbdfae23c2aeac1383b04b2ab9424cea16
[ "MIT" ]
4
2016-10-08T20:23:22.000Z
2018-07-25T10:59:08.000Z
interp.py
hhu-stups/python_jvm
57b9e6cbdfae23c2aeac1383b04b2ab9424cea16
[ "MIT" ]
null
null
null
interp.py
hhu-stups/python_jvm
57b9e6cbdfae23c2aeac1383b04b2ab9424cea16
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import thread #import classfile, classloader, javaclasses # for threading: interp_lock = thread.allocate_lock() opcodes_count = 0 OPCODES_MAX = 2**8 # JVMS: 4.4.4 # cast int (n) to IEEE 754 float (num) # TODO: NaN infinety # JVMS: 4.4.5 # adds to the AbstractClassLoader just one method #...
34.005053
183
0.571182
# -*- coding: utf-8 -*- import new, sys, os, types, native, thread #import classfile, classloader, javaclasses from classloader import JClass, descriptor # eg. for putfield from helper import make_String, throw_NullPointerException, throw_ArithmeticException, throw_ArrayIndexOutOfBoundsException, throw_ClassCastExcep...
0
0
0
70,701
0
767
0
432
433
7a9f7fe5c74daaf2a4b2117eb2db1f483b7db004
773
py
Python
Statistics/TenDays/day5_1.py
MightyPixel/MightyLab
92a9407e7f15aec24c14b0808d46f512ac313ce9
[ "MIT" ]
null
null
null
Statistics/TenDays/day5_1.py
MightyPixel/MightyLab
92a9407e7f15aec24c14b0808d46f512ac313ce9
[ "MIT" ]
null
null
null
Statistics/TenDays/day5_1.py
MightyPixel/MightyLab
92a9407e7f15aec24c14b0808d46f512ac313ce9
[ "MIT" ]
1
2022-03-19T08:37:17.000Z
2022-03-19T08:37:17.000Z
# Binomial Distribution I # Task: The ratio of boys to girls for babies born in Russia is 1.09 : 1. # If there is child born per birth, what proportion of Russian families with exactly 6 children will have at least 3 boys? import sys args = sys.stdin.readlines()[0].split(' ') boys_rat, girls_rat = [float(ratio) for...
22.735294
123
0.658473
# Binomial Distribution I # Task: The ratio of boys to girls for babies born in Russia is 1.09 : 1. # If there is child born per birth, what proportion of Russian families with exactly 6 children will have at least 3 boys? import sys from math import factorial def binom(x, n): return factorial(n)/(factorial(x)*f...
0
0
0
0
0
151
0
5
68
c98f29cb65e6bd36a1e946ee17248bd155126fe7
2,289
py
Python
tools/get_bops.py
lucifer443/BinaryNeuralNetwork
3ceadfb67cd048fc89f4eea8cc833d9bf5f62153
[ "Apache-2.0" ]
13
2021-01-19T03:12:38.000Z
2022-03-23T01:24:19.000Z
tools/get_bops.py
lucifer443/BinaryNeuralNetwork
3ceadfb67cd048fc89f4eea8cc833d9bf5f62153
[ "Apache-2.0" ]
null
null
null
tools/get_bops.py
lucifer443/BinaryNeuralNetwork
3ceadfb67cd048fc89f4eea8cc833d9bf5f62153
[ "Apache-2.0" ]
2
2021-03-15T09:51:05.000Z
2021-03-15T09:51:49.000Z
TOTAL_BOPS = 0 if __name__ == '__main__': main()
31.791667
158
0.631717
import argparse from mmcv import Config from mmcv.cnn.utils import get_model_complexity_info from mmcls.models import build_classifier from mmcls.models.backbones.binary_utils.binary_convs import BaseBinaryConv2d import torch TOTAL_BOPS = 0 def parse_args(): parser = argparse.ArgumentParser(descript...
0
0
0
0
0
1,916
0
94
217
d721b860c67e641dbba892a32ec13bb9ca63d0de
20,543
py
Python
inat_add_obs2project.py
tombova/inat_add_obs2project
71e01ff3df7117398415db613db328e7cdf33938
[ "MIT" ]
null
null
null
inat_add_obs2project.py
tombova/inat_add_obs2project
71e01ff3df7117398415db613db328e7cdf33938
[ "MIT" ]
null
null
null
inat_add_obs2project.py
tombova/inat_add_obs2project
71e01ff3df7117398415db613db328e7cdf33938
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Jan 1 13:57:09 2019 @author: Tom """ import sys import json import logging import configparser import pprint from datetime import datetime from typing import Dict import requests import send_gmail INAT_NODE_API_BASE_URL = "https://api.inaturalist.or...
37.762868
88
0.568174
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Jan 1 13:57:09 2019 @author: Tom """ import sys import json import logging import configparser import pprint from datetime import datetime from typing import Dict import requests import send_gmail INAT_NODE_API_BASE_URL = "https://api.inaturalist.or...
0
0
0
139
0
0
0
0
46
2cc5e822724601b825d4d549ec2e63cfb603fd13
11,265
py
Python
spa/ajax.py
fergalmoran/dss
684fb4030e33212c3ecde774ca86cb74a1ffc8ac
[ "BSD-2-Clause" ]
null
null
null
spa/ajax.py
fergalmoran/dss
684fb4030e33212c3ecde774ca86cb74a1ffc8ac
[ "BSD-2-Clause" ]
3
2020-02-11T21:55:44.000Z
2021-06-10T17:35:37.000Z
spa/ajax.py
fergalmoran/dss
684fb4030e33212c3ecde774ca86cb74a1ffc8ac
[ "BSD-2-Clause" ]
null
null
null
import logging from django.http import HttpResponse from django.utils import simplejson logger = logging.getLogger(__name__) def session_play_count(request): """ :param request: :return: Number of tracks played in this session """ if not request.user.is_authenticated(): ...
37.802013
120
0.635775
from datetime import datetime import os import logging from django.conf.urls import url from django.contrib.auth.decorators import login_required from django.core.files.base import ContentFile from django.core.files.storage import FileSystemStorage from django.db.models import get_model from django.http impor...
0
5,488
0
146
0
3,588
0
427
862
266619656ff6e1a2a4c59c79f79f82114bbcd7df
1,816
py
Python
acl1/a2.py
nishio/atcoder
8db36537b5d8580745d5f98312162506ad7d7ab4
[ "MIT" ]
1
2021-03-09T04:28:13.000Z
2021-03-09T04:28:13.000Z
acl1/a2.py
nishio/atcoder
8db36537b5d8580745d5f98312162506ad7d7ab4
[ "MIT" ]
null
null
null
acl1/a2.py
nishio/atcoder
8db36537b5d8580745d5f98312162506ad7d7ab4
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import sys sys.setrecursionlimit(10**6) INF = 10 ** 9 + 1 # sys.maxsize # float("inf") MOD = 10 ** 9 + 7 # tests T1 = """ 4 1 4 2 3 3 1 4 2 """ TEST_T1 = """ >>> as_input(T1) >>> main() 1 1 2 2 """ T2 = """ 7 6 4 4 3 3 5 7 1 2 7 5 2 1 6 """ TEST_T2 = """ >>> as_input(T2) >>> main() 3 3 1 ...
14.412698
59
0.469163
#!/usr/bin/env python3 import sys sys.setrecursionlimit(10**6) INF = 10 ** 9 + 1 # sys.maxsize # float("inf") MOD = 10 ** 9 + 7 def debug(*x, msg=""): import sys print(msg, *x, file=sys.stderr) def solve(N, XS, YS): size = [0] * N x2y = [0] * N x2i = [0] * N for i in range(N): x2y[...
0
0
0
0
0
1,009
0
0
92
437feeef959ad5c41af1b289ff9f17e67b1606ce
11,764
py
Python
resources/resources.py
jjleewustledu/NIPET
da809e61bc24440441a011d3c7725400b438ddb3
[ "Apache-2.0" ]
null
null
null
resources/resources.py
jjleewustledu/NIPET
da809e61bc24440441a011d3c7725400b438ddb3
[ "Apache-2.0" ]
null
null
null
resources/resources.py
jjleewustledu/NIPET
da809e61bc24440441a011d3c7725400b438ddb3
[ "Apache-2.0" ]
null
null
null
"""Resources file for NiftyPET NIPET and NIMPA etc.""" #--------------------------------------------------------------- __author__ = "Pawel Markiewicz" __copyright__ = "Copyright 2018" #--------------------------------------------------------------- import numpy as np from math import pi # Hardware (CT-based) ...
30.87664
122
0.593166
"""Resources file for NiftyPET NIPET and NIMPA etc.""" #--------------------------------------------------------------- __author__ = "Pawel Markiewicz" __copyright__ = "Copyright 2018" #--------------------------------------------------------------- import numpy as np from math import pi import platform import ...
0
0
0
0
0
0
0
-18
44
e7cf926f9169b5c609fb86c41a537fa3fd5c27c3
4,013
py
Python
path_config.py
songheony/AAA-journal
4306fac0afe567269b8d2f1cbef2a1c398fdde82
[ "MIT" ]
9
2020-07-07T09:03:07.000Z
2021-04-22T03:38:49.000Z
path_config.py
songheony/AAA-journal
4306fac0afe567269b8d2f1cbef2a1c398fdde82
[ "MIT" ]
null
null
null
path_config.py
songheony/AAA-journal
4306fac0afe567269b8d2f1cbef2a1c398fdde82
[ "MIT" ]
1
2021-07-31T19:26:52.000Z
2021-07-31T19:26:52.000Z
RESULTS_PATH = "tracking_results" EVALUATION_PATH = "evaluation_results" VISUALIZATION_PATH = "visualization_results" # Dataset GOT10K_PATH = "/home/heonsong/Disk2/Dataset/Got10K" LASOT_PATH = "/home/heonsong/Disk2/Dataset/LaSOT" NFS_PATH = "/home/heonsong/Disk2/Dataset/NFS" OTB_PATH = "/home/heonsong/Disk2/Dataset/OT...
35.201754
88
0.813107
RESULTS_PATH = "tracking_results" EVALUATION_PATH = "evaluation_results" VISUALIZATION_PATH = "visualization_results" # Dataset GOT10K_PATH = "/home/heonsong/Disk2/Dataset/Got10K" LASOT_PATH = "/home/heonsong/Disk2/Dataset/LaSOT" NFS_PATH = "/home/heonsong/Disk2/Dataset/NFS" OTB_PATH = "/home/heonsong/Disk2/Dataset/OT...
0
0
0
0
0
0
0
0
0
3c9294c4f9b6f20e8349754b66a47e449f3400e9
4,928
py
Python
lib/ansible/utils/module_docs_fragments/alicloud.py
talenhao/alibaba.alicloud
86dff1d4bc6177f9f07054d8fd4cd159a48c356a
[ "Apache-2.0" ]
null
null
null
lib/ansible/utils/module_docs_fragments/alicloud.py
talenhao/alibaba.alicloud
86dff1d4bc6177f9f07054d8fd4cd159a48c356a
[ "Apache-2.0" ]
null
null
null
lib/ansible/utils/module_docs_fragments/alicloud.py
talenhao/alibaba.alicloud
86dff1d4bc6177f9f07054d8fd4cd159a48c356a
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2017-present Alibaba Group Holding Limited. He Guimin <heguimin36@163.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
46.490566
121
0.739042
# -*- coding: utf-8 -*- # Copyright (c) 2017-present Alibaba Group Holding Limited. He Guimin <heguimin36@163.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) class ModuleDocFragment(object): # Alicloud only documentation fragment DOCUMENTATION = r''' options...
0
0
0
4,695
0
0
0
0
23
f4f640244f7565cb2e7c279cb2e605542914e268
6,592
py
Python
fsleyes/actions/updatecheck.py
pauldmccarthy/fsleyes
453a6b91ec7763c39195814d635257e3766acf83
[ "Apache-2.0" ]
12
2018-05-05T01:36:25.000Z
2021-09-23T20:44:08.000Z
fsleyes/actions/updatecheck.py
pauldmccarthy/fsleyes
453a6b91ec7763c39195814d635257e3766acf83
[ "Apache-2.0" ]
97
2018-05-05T02:17:23.000Z
2022-03-29T14:58:42.000Z
fsleyes/actions/updatecheck.py
pauldmccarthy/fsleyes
453a6b91ec7763c39195814d635257e3766acf83
[ "Apache-2.0" ]
6
2017-12-09T09:02:00.000Z
2021-03-05T18:55:13.000Z
#!/usr/bin/env python # # updatecheck.py - The UpdateCheckAction class. # # Author: Paul McCarthy <pauldmccarthy@gmail.com> # """This module provides the :class:`.UpdateCheckAction`, which checks to see if a new version of FSLeyes is available. """ import logging import urllib.request as request import fsl.version ...
33.292929
78
0.547178
#!/usr/bin/env python # # updatecheck.py - The UpdateCheckAction class. # # Author: Paul McCarthy <pauldmccarthy@gmail.com> # """This module provides the :class:`.UpdateCheckAction`, which checks to see if a new version of FSLeyes is available. """ import logging import urllib.request as request import ssl import js...
0
83
0
5,494
0
0
0
-10
157
5ec6e590137ba5c33c8298596c62002f77e5106e
1,388
py
Python
leonardo_sitestarter/management/commands/load_demo_data.py
leonardo-modules/leonardo-sitestarter
452422e21b0730ccc8c975ab64361139100c183b
[ "BSD-3-Clause" ]
null
null
null
leonardo_sitestarter/management/commands/load_demo_data.py
leonardo-modules/leonardo-sitestarter
452422e21b0730ccc8c975ab64361139100c183b
[ "BSD-3-Clause" ]
1
2015-10-18T13:35:46.000Z
2015-10-18T13:35:46.000Z
leonardo_sitestarter/management/commands/load_demo_data.py
leonardo-modules/leonardo-sitestarter
452422e21b0730ccc8c975ab64361139100c183b
[ "BSD-3-Clause" ]
null
null
null
from __future__ import unicode_literals
33.047619
75
0.596542
from __future__ import unicode_literals from optparse import make_option from leonardo import leonardo from django.core.management.base import BaseCommand, NoArgsCommand from leonardo_sitestarter.scaffold_web import load_data from leonardo_sitestarter.utils import _load_from_stream class Command(BaseCommand): h...
0
0
0
1,080
0
0
0
133
134
f376afa2ad5235ce873d19466a4f79d174bd078f
1,210
py
Python
src/leetcode/prob_1_two_sums.py
arnaudblois/leetcode
242e68ba2d83ab67941e12ab95d723ab0bcdcc23
[ "MIT" ]
1
2022-01-19T18:21:31.000Z
2022-01-19T18:21:31.000Z
src/leetcode/prob_1_two_sums.py
arnaudblois/leetcode
242e68ba2d83ab67941e12ab95d723ab0bcdcc23
[ "MIT" ]
1
2022-03-30T14:33:16.000Z
2022-03-30T14:33:16.000Z
src/leetcode/prob_1_two_sums.py
arnaudblois/leetcode
242e68ba2d83ab67941e12ab95d723ab0bcdcc23
[ "MIT" ]
null
null
null
"""LeetCode problem 001 - Two Sum Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have exactly one solution. Example: >>>> two_sum(nums=[2, 5, 8, 21], target=13) [1, 2]. """ def two_sum(nums: list, target: int) -> list[in...
28.139535
71
0.566942
"""LeetCode problem 001 - Two Sum Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have exactly one solution. Example: >>>> two_sum(nums=[2, 5, 8, 21], target=13) [1, 2]. """ def two_sum(nums: list, target: int) -> list[in...
0
0
0
0
0
0
0
0
0
401dfbe74253987bf16e39f5eb6b320630577f69
11,891
py
Python
src/run_ssc.py
853108389/DeepConcolic
2fb4bee11a07dcf39d9df9b2534f377336257def
[ "BSD-3-Clause" ]
1
2019-11-28T12:43:35.000Z
2019-11-28T12:43:35.000Z
src/run_ssc.py
853108389/DeepConcolic
2fb4bee11a07dcf39d9df9b2534f377336257def
[ "BSD-3-Clause" ]
null
null
null
src/run_ssc.py
853108389/DeepConcolic
2fb4bee11a07dcf39d9df9b2534f377336257def
[ "BSD-3-Clause" ]
2
2019-06-07T15:04:09.000Z
2020-02-25T18:56:22.000Z
try: from art.attacks.fast_gradient import FastGradientMethod from art.classifiers import KerasClassifier except: try: except:
37.043614
318
0.666975
import argparse import sys import os from datetime import datetime import keras from keras.models import * from keras.datasets import cifar10 from keras.datasets import mnist from keras.applications.vgg16 import VGG16 from keras.preprocessing.image import load_img from keras.layers import * from keras import * from ut...
0
0
0
0
0
11,182
0
100
473
bcffb282811ccb69d57f8baeef38af69fff87e39
1,461
py
Python
day06/day6.py
w-m/aoc2021
1d74dea32d3ac73261a019fdae9bfa3c63ee6d1a
[ "CC0-1.0" ]
null
null
null
day06/day6.py
w-m/aoc2021
1d74dea32d3ac73261a019fdae9bfa3c63ee6d1a
[ "CC0-1.0" ]
null
null
null
day06/day6.py
w-m/aoc2021
1d74dea32d3ac73261a019fdae9bfa3c63ee6d1a
[ "CC0-1.0" ]
null
null
null
if __name__ == "__main__": test_a, test_b = day6("test_input.txt", 80), day6("test_input.txt", 256) puzzle_a, puzzle_b = day6("input.txt", 80), day6("input.txt", 256) print(f"Day 6a: {test_a}") print(f"Day 6b: {test_b}") print(f"Day 6a: {puzzle_a}") print(f"Day 6b: {puzzle_b}") assert ...
29.816327
77
0.657084
from funcy import print_durations from collections import Counter, defaultdict import numpy as np @print_durations def day6(file, num_simulation_days): # you can model each fish as a single number that represents # the number of days until it creates a new lanternfish fish_days = np.loadtxt(file, delimit...
0
904
0
0
0
0
0
32
89
88aa1ea030d019996abacdc7fe56266fdc7b366d
1,164
py
Python
maintenance/management/commands/clear_inactive_variant_sets.py
brand-fabian/varfish-server
6a084d891d676ff29355e72a29d4f7b207220283
[ "MIT" ]
14
2019-09-30T12:44:17.000Z
2022-02-04T14:45:16.000Z
maintenance/management/commands/clear_inactive_variant_sets.py
brand-fabian/varfish-server
6a084d891d676ff29355e72a29d4f7b207220283
[ "MIT" ]
244
2021-03-26T15:13:15.000Z
2022-03-31T15:48:04.000Z
maintenance/management/commands/clear_inactive_variant_sets.py
brand-fabian/varfish-server
6a084d891d676ff29355e72a29d4f7b207220283
[ "MIT" ]
8
2020-05-19T21:55:13.000Z
2022-03-31T07:02:58.000Z
"""Django command for clearing inactivate variant sets."""
33.257143
90
0.69244
"""Django command for clearing inactivate variant sets.""" from django.core.management.base import BaseCommand from django.db import transaction from variants.models import cleanup_variant_sets as clear_inactive_variant_sets from variants.tasks import clear_inactive_variant_sets as task_clear_inactive_variant_sets ...
0
407
0
414
0
0
0
169
113
61e6658d0671a72cdc0586a286440f61032785c0
433
py
Python
jasper_erpnext_report/jasper_erpnext_report/doctype/jasper_parameter/jasper_parameter.py
Zyten/jasper_erpnext_report
499fc07d9e1b7e7393d392e1544366ab176ca8ef
[ "MIT" ]
27
2015-07-07T11:43:24.000Z
2022-03-12T03:46:10.000Z
jasper_erpnext_report/jasper_erpnext_report/doctype/jasper_parameter/jasper_parameter.py
Zyten/jasper_erpnext_report
499fc07d9e1b7e7393d392e1544366ab176ca8ef
[ "MIT" ]
13
2015-11-10T14:25:18.000Z
2021-12-20T06:23:30.000Z
jasper_erpnext_report/jasper_erpnext_report/doctype/jasper_parameter/jasper_parameter.py
Zyten/jasper_erpnext_report
499fc07d9e1b7e7393d392e1544366ab176ca8ef
[ "MIT" ]
27
2015-05-21T21:16:56.000Z
2021-09-05T17:40:10.000Z
# Copyright (c) 2013, Luis Fernandes and contributors # For license information, please see license.txt from __future__ import unicode_literals
30.928571
83
0.766744
# Copyright (c) 2013, Luis Fernandes and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document class JasperParameter(Document): def autoname(self, method=None): if not frappe.flags.in_import: print "jasper...
0
0
0
208
0
0
0
13
67
127e3fcdb2b9168c961fca3d9f3713538234e740
496
py
Python
mojo/tools/run_mojo_python_tests.py
domenic/mojo
53dda76fed90a47c35ed6e06baf833a0d44495b8
[ "BSD-3-Clause" ]
null
null
null
mojo/tools/run_mojo_python_tests.py
domenic/mojo
53dda76fed90a47c35ed6e06baf833a0d44495b8
[ "BSD-3-Clause" ]
null
null
null
mojo/tools/run_mojo_python_tests.py
domenic/mojo
53dda76fed90a47c35ed6e06baf833a0d44495b8
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import sys if __name__ == '__main__': sys.exit(main())
24.8
72
0.667339
#!/usr/bin/env python # Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import sys from mopy.mojo_python_tests_runner import MojoPythonTestRunner def main(): runner = MojoPythonTestRunner(os.p...
0
0
0
0
0
154
0
29
69
c4689f8aaf18f90b5ee8dee8e210ac5e1f169139
1,456
py
Python
ib_async/__init__.py
ondergetekende/ib_async
b70a62f0b7d4e2fe4ef9dff3061a248c0c7416cf
[ "Apache-2.0" ]
17
2018-05-04T14:11:06.000Z
2022-01-06T11:45:20.000Z
ib_async/__init__.py
ondergetekende/ib_async
b70a62f0b7d4e2fe4ef9dff3061a248c0c7416cf
[ "Apache-2.0" ]
null
null
null
ib_async/__init__.py
ondergetekende/ib_async
b70a62f0b7d4e2fe4ef9dff3061a248c0c7416cf
[ "Apache-2.0" ]
2
2020-01-21T15:26:48.000Z
2020-02-04T12:08:33.000Z
from ib_async.instrument import Instrument, SecurityIdentifierType, SecurityType from ib_async.tick_types import TickType, TickTypeGroup, MarketDataTimeliness __all__ = [ "IBClient", "connect", "Instrument", "SecurityIdentifierType", "SecurityType", "TickType", "TickTypeGroup", "MarketDataTimeliness" ]
42.823529
114
0.824176
from ib_async.functionality.current_time import CurrentTimeMixin from ib_async.functionality.executions import ExecutionsMixin from ib_async.functionality.instrument_details import InstrumentDetailsMixin from ib_async.functionality.matching_symbols import MatchingSymbolsMixin from ib_async.functionality.market_data imp...
0
0
109
295
0
0
0
443
289
f0f43b960e9f424396f7452277dd4ad37d38cbdc
1,579
py
Python
utilities/dashboard/components/intro_page/create_data.py
covid-19-impact-lab/covidlab-utilities
f350306440e54ce3eb4eeb4e389fd239637e23bc
[ "MIT" ]
2
2020-04-09T22:02:17.000Z
2021-03-09T23:24:25.000Z
utilities/dashboard/components/intro_page/create_data.py
covid-19-impact-lab/covidlab-utilities
f350306440e54ce3eb4eeb4e389fd239637e23bc
[ "MIT" ]
2
2020-03-22T12:53:40.000Z
2020-04-12T14:32:11.000Z
utilities/dashboard/components/intro_page/create_data.py
covid-19-impact-lab/covidlab-utilities
f350306440e54ce3eb4eeb4e389fd239637e23bc
[ "MIT" ]
1
2021-12-08T21:57:38.000Z
2021-12-08T21:57:38.000Z
from utilities.dashboard.config import INTRO_PAGE_DIR def create_intro_page_data(language, dataset_name): """Create a dictionary with several dataset and language specific text snippets and headers.""" metadata_path = INTRO_PAGE_DIR / "metadata" / dataset_name res = {} with open(metadata_path / f"top...
45.114286
99
0.645978
from utilities.dashboard.config import INTRO_PAGE_DIR def create_intro_page_data(language, dataset_name): """Create a dictionary with several dataset and language specific text snippets and headers.""" metadata_path = INTRO_PAGE_DIR / "metadata" / dataset_name res = {} with open(metadata_path / f"top...
2
0
0
0
0
0
0
0
0
366bfd6157dee52c5939eecf8b4d1b4cfaaccead
3,167
py
Python
rps/robotarium_abc.py
anxie/robotarium_python_simulator
5de62490381dd8f62ee55d6918377a04cfa4628a
[ "MIT" ]
null
null
null
rps/robotarium_abc.py
anxie/robotarium_python_simulator
5de62490381dd8f62ee55d6918377a04cfa4628a
[ "MIT" ]
null
null
null
rps/robotarium_abc.py
anxie/robotarium_python_simulator
5de62490381dd8f62ee55d6918377a04cfa4628a
[ "MIT" ]
null
null
null
import matplotlib.patches as patches import rps.utilities.misc as misc
32.989583
156
0.619829
import time from abc import ABC, abstractmethod import numpy as np import matplotlib.pyplot as plt import matplotlib.patches as patches import rps.utilities.misc as misc class RobotariumABC(ABC): def __init__(self, number_of_agents=10, show_figure=True, save_data=True): self.number_of_agents = number_...
0
170
0
2,801
0
0
0
11
112
5c8e9233880b4ca64b74fd305dcb47e1d4aec09d
40,800
py
Python
array_params/Content/Scripts/bpscripter.py
dfb/uepy_test_prjs
60fa0b7d4bca8eee9f88868ee1f9c0863b9de2d1
[ "MIT" ]
null
null
null
array_params/Content/Scripts/bpscripter.py
dfb/uepy_test_prjs
60fa0b7d4bca8eee9f88868ee1f9c0863b9de2d1
[ "MIT" ]
1
2019-10-23T07:27:08.000Z
2019-11-09T17:53:23.000Z
array_params/Content/Scripts/bpscripter.py
dfb/uepy_test_prjs
60fa0b7d4bca8eee9f88868ee1f9c0863b9de2d1
[ "MIT" ]
null
null
null
from unreal_engine.classes import (Blueprint, K2Node_MakeArray as K2Node_MakeArray) def MakeConnectedArray(graph, category, subcategory, pins, pos=None): '''like MakeArray, but instead of literals, it connects the pins to the given inputs''' if pos is None: pos = graph.graph_get_good_place_for_new_node...
42.018538
163
0.686275
from helpers import * from unreal_engine.classes import (Blueprint, K2Node_FunctionResult, K2Node_MakeArray as K2Node_MakeArray, K2Node_Event, K2Node_MakeStruct, KismetSystemLibrary as KSL, KismetTextLibrary as KTL, KismetStringLibrary as KStrLib) from unreal_engine import EdGraphPin, UObject, UScriptStruct def Fi...
0
0
0
1,304
0
3,155
0
335
432
ca9d820a30dfe3247c66c99470e0a69bcaaa7cf4
2,613
py
Python
result_eval_time.py
ziranl16/UROP_KMTE
537606277544716699f708f51b6d9461695cf259
[ "Apache-2.0" ]
1
2022-03-01T12:58:06.000Z
2022-03-01T12:58:06.000Z
result_eval_time.py
ziranl16/UROP_KMTE
537606277544716699f708f51b6d9461695cf259
[ "Apache-2.0" ]
null
null
null
result_eval_time.py
ziranl16/UROP_KMTE
537606277544716699f708f51b6d9461695cf259
[ "Apache-2.0" ]
null
null
null
import numpy as np import argparse, sys parser = argparse.ArgumentParser(description='Eval model outputs') parser.add_argument('-model', dest="model", required=True, help='Dataset to use') parser.add_argument('-test_freq', dest="freq", required=True, type=int, help='what is to be predicted') parser.add_argument('-eval...
37.869565
105
0.595484
import numpy as np import argparse, pdb, sys parser = argparse.ArgumentParser(description='Eval model outputs') parser.add_argument('-model', dest="model", required=True, help='Dataset to use') parser.add_argument('-test_freq', dest="freq", required=True, type=int, help='what is to be predicted') parser.add_argument('...
0
0
0
0
0
0
0
5
0
d448581fee6f62b9fa7ae28518991d525d009096
12,894
py
Python
track_people_py/scripts/track_utils/tracker_sort_3d.py
kufusha/cabot
52a40a39a29f0bd79b6fdd8f961708e09fda9a51
[ "MIT" ]
null
null
null
track_people_py/scripts/track_utils/tracker_sort_3d.py
kufusha/cabot
52a40a39a29f0bd79b6fdd8f961708e09fda9a51
[ "MIT" ]
null
null
null
track_people_py/scripts/track_utils/tracker_sort_3d.py
kufusha/cabot
52a40a39a29f0bd79b6fdd8f961708e09fda9a51
[ "MIT" ]
null
null
null
# Copyright (c) 2021 IBM Corporation # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, di...
49.976744
167
0.620211
# Copyright (c) 2021 IBM Corporation # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, di...
0
0
0
11,624
0
0
0
41
134
0f963a2d0c825bd02d612bfb8034f567b44fde0b
1,389
py
Python
tsa/public/analyze.py
eghuro/dcat-dry
8e669583b77814c6a7fe2b038c0011fd3619f125
[ "MIT" ]
1
2018-11-16T09:04:01.000Z
2018-11-16T09:04:01.000Z
tsa/public/analyze.py
eghuro/nkod-ts
8e669583b77814c6a7fe2b038c0011fd3619f125
[ "MIT" ]
4
2019-03-31T08:58:42.000Z
2020-02-27T16:44:20.000Z
tsa/public/analyze.py
eghuro/dcat-dry
8e669583b77814c6a7fe2b038c0011fd3619f125
[ "MIT" ]
null
null
null
"""Endpoints to start the analysis.""" from flask import Blueprint blueprint = Blueprint('analyze', __name__, static_folder='../static')
34.725
93
0.632109
"""Endpoints to start the analysis.""" import redis import rfc3987 import uuid import time from flask import Blueprint, abort, current_app, request, session from tsa.extensions import redis_pool from tsa.tasks.batch import inspect_graph blueprint = Blueprint('analyze', __name__, static_folder='../static') @blueprin...
0
1,056
0
0
0
0
0
38
156
0aa144ac364065cf4402349f94bdf78c8a7ebe19
4,824
py
Python
fast-reid/fastreid/data/datasets/naic.py
icicle4/TranSTAM
3dfda76cc507b3a3a4b25fbecab7df65fd8cab4d
[ "Apache-2.0" ]
71
2021-03-12T07:43:43.000Z
2022-03-30T03:28:16.000Z
fast-reid/fastreid/data/datasets/naic.py
icicle4/TranSTAM
3dfda76cc507b3a3a4b25fbecab7df65fd8cab4d
[ "Apache-2.0" ]
8
2021-04-06T03:02:58.000Z
2022-02-16T14:05:47.000Z
fast-reid/fastreid/data/datasets/naic.py
icicle4/TranSTAM
3dfda76cc507b3a3a4b25fbecab7df65fd8cab4d
[ "Apache-2.0" ]
7
2021-04-19T02:55:58.000Z
2021-11-11T12:39:09.000Z
# encoding: utf-8 """ @author: Yang Qian @contact: yqian@aibee.com """
41.947826
130
0.570688
# encoding: utf-8 """ @author: Yang Qian @contact: yqian@aibee.com """ import glob import os.path as osp import re import warnings import numpy as np from .bases import ImageDataset from ..datasets import DATASET_REGISTRY @DATASET_REGISTRY.register() class NAIC(ImageDataset): """NAIC. URL: `<https://naic....
0
4,576
0
0
0
0
0
-3
179
b136b079d46537dbcf8d6612147f8f6c4e5fa493
1,530
py
Python
tgbot/async/workers.py
JacoRuit/tgbot
1e32a802bc4869d46562ec4c2d46dc691868061c
[ "MIT" ]
2
2016-08-09T21:28:04.000Z
2016-08-16T12:04:40.000Z
tgbot/async/workers.py
JacoRuit/tgbot
1e32a802bc4869d46562ec4c2d46dc691868061c
[ "MIT" ]
null
null
null
tgbot/async/workers.py
JacoRuit/tgbot
1e32a802bc4869d46562ec4c2d46dc691868061c
[ "MIT" ]
null
null
null
import threading import Queue from tgbot import logging from tgbot.async import Future
26.842105
81
0.558824
import threading import Queue from tgbot import logging from tgbot.async import Future class Worker(threading.Thread): def __init__(self, q): threading.Thread.__init__(self) self.q = q self.do_run = True def start(self): self.do_run = True threading.Thread.start(self) ...
0
0
0
1,396
0
0
0
0
46
8c5fc494384e7d5d8702ad1f06cc5be22aaa8ad0
3,212
py
Python
movieflix/controllers/movieData.py
shanesaravia/Movieflix2.0
3c29be81e634f58495c9779cce332895ffd49d5b
[ "MIT" ]
null
null
null
movieflix/controllers/movieData.py
shanesaravia/Movieflix2.0
3c29be81e634f58495c9779cce332895ffd49d5b
[ "MIT" ]
7
2020-03-24T15:44:26.000Z
2021-06-01T22:10:38.000Z
movieflix/controllers/movieData.py
shanesaravia/Movieflix2.0
3c29be81e634f58495c9779cce332895ffd49d5b
[ "MIT" ]
null
null
null
if __name__ == '__main__': main()
31.80198
77
0.529888
import requests import pandas import re from pandas.io.json import json_normalize from configs import Config from movieflix.models import Movie from django.urls import reverse class API(): pass class TMDB(API): pass class RottonTomatoes(): def __init__(self): self.config = Config.load() ...
0
0
0
2,827
0
75
0
22
246
7ccd3c8f8628ee4f970ca197e9e95dcd82fb9980
23,097
py
Python
tests/test_mayaBugs.py
JFlynnXYZ/pymel
2aa254c7982c78aac3e30e8d1b6a85f2465f898e
[ "BSD-3-Clause" ]
287
2015-01-03T21:18:59.000Z
2022-03-16T07:55:33.000Z
tests/test_mayaBugs.py
JFlynnXYZ/pymel
2aa254c7982c78aac3e30e8d1b6a85f2465f898e
[ "BSD-3-Clause" ]
412
2015-06-19T15:13:33.000Z
2022-02-25T08:12:25.000Z
tests/test_mayaBugs.py
JFlynnXYZ/pymel
2aa254c7982c78aac3e30e8d1b6a85f2465f898e
[ "BSD-3-Clause" ]
106
2015-01-03T06:46:44.000Z
2022-03-30T15:43:01.000Z
from __future__ import print_function from __future__ import division from __future__ import absolute_import import maya.cmds as cmds if not hasattr(cmds, 'about'): import maya.standalone maya.standalone.initialize() #=============================================================================== # Current Bu...
38.240066
160
0.577131
from __future__ import print_function from __future__ import division from __future__ import absolute_import from builtins import object import sys import os import unittest import maya.cmds as cmds import maya.OpenMaya as om import maya.OpenMayaAnim as oma import maya.OpenMayaFX as omfx import pymel.versions from pym...
0
2,458
0
17,045
0
0
0
27
464
f81f00ee5ae67486ca0df549241508008d369dcb
526
py
Python
ghidra_scripts/PpssppImportSymFile.py
John-K/ghidra-allegrex
67c436268f5ec6e0cefd20da308707d36b334571
[ "Apache-2.0" ]
58
2019-03-11T03:15:40.000Z
2022-03-24T04:40:55.000Z
ghidra_scripts/PpssppImportSymFile.py
John-K/ghidra-allegrex
67c436268f5ec6e0cefd20da308707d36b334571
[ "Apache-2.0" ]
15
2019-11-19T08:10:38.000Z
2021-12-10T21:44:40.000Z
ghidra_scripts/PpssppImportSymFile.py
John-K/ghidra-allegrex
67c436268f5ec6e0cefd20da308707d36b334571
[ "Apache-2.0" ]
5
2019-05-23T09:41:21.000Z
2021-09-01T20:10:38.000Z
# Imports function labels from PPSSPP .sym file. #@author Kotcrab #@category Data sym = askFile("Select PPSSPP .sym file", "Select") offsetBy = askInt("Offset addresses by", "Offset") skipZun = True makePrimary = True for line in file(sym.absolutePath): parts = line.split(" ") address = toAddr(long(parts[0], ...
29.222222
51
0.674905
# Imports function labels from PPSSPP .sym file. #@author Kotcrab #@category Data sym = askFile("Select PPSSPP .sym file", "Select") offsetBy = askInt("Offset addresses by", "Offset") skipZun = True makePrimary = True for line in file(sym.absolutePath): parts = line.split(" ") address = toAddr(long(parts[0], ...
0
0
0
0
0
0
0
0
0
c38ffb1b3ac2de9c9e3d449fe4b0532ab0bedd31
1,966
py
Python
convert2gaf.py
marcb109/geoelectricalSurveyTools
0f5602b26a9826ec68ebbbedf134118b91380520
[ "MIT" ]
null
null
null
convert2gaf.py
marcb109/geoelectricalSurveyTools
0f5602b26a9826ec68ebbbedf134118b91380520
[ "MIT" ]
null
null
null
convert2gaf.py
marcb109/geoelectricalSurveyTools
0f5602b26a9826ec68ebbbedf134118b91380520
[ "MIT" ]
null
null
null
#!/usr/bin/python from sys import argv as sys_argv from sys import exit as sys_exit try: inp_file = sys_argv[1] out_file = sys_argv[2] except: print "USAGE: \n convert2gaf.py name_of_input_file name_of_output_file \n e.g. \n convert2gaf.py Wenner.dat Wenner_gaf.dat \n\n" sys_exit() inp = open(inp_fi...
23.97561
133
0.598678
#!/usr/bin/python from sys import argv as sys_argv from sys import exit as sys_exit try: inp_file = sys_argv[1] out_file = sys_argv[2] except: print "USAGE: \n convert2gaf.py name_of_input_file name_of_output_file \n e.g. \n convert2gaf.py Wenner.dat Wenner_gaf.dat \n\n" sys_exit() inp = open(inp_fi...
0
0
0
0
0
0
0
0
0
3f0632fc75af0892f8caeb09b9518e755f9dd49a
12,822
py
Python
eogrow/pipelines/sampling.py
sentinel-hub/eo-grow
458202fc55c01cc95a17b442144ef2c935103c80
[ "MIT" ]
17
2022-01-27T11:50:23.000Z
2022-02-12T10:01:03.000Z
eogrow/pipelines/sampling.py
sentinel-hub/eo-grow
458202fc55c01cc95a17b442144ef2c935103c80
[ "MIT" ]
5
2022-02-10T11:15:09.000Z
2022-02-28T10:46:47.000Z
eogrow/pipelines/sampling.py
sentinel-hub/eo-grow
458202fc55c01cc95a17b442144ef2c935103c80
[ "MIT" ]
null
null
null
""" Module implementing sampling pipelines """
41.765472
120
0.661909
""" Module implementing sampling pipelines """ import abc from typing import Any, Dict, List, Optional, Tuple, Union import numpy as np from pydantic import Field, validator from eolearn.core import EONode, EOWorkflow, FeatureType, LoadTask, MergeEOPatchesTask, OverwritePermission, SaveTask from eolearn.geometry impo...
0
528
0
11,523
0
0
0
359
360
e8fba3949197ba3c5ab01f8d22be7819ade9b5ae
616
py
Python
108_sortedArrayToBST.py
stuti-rastogi/leetcode-python-solutions
73593fe642a06a83cde974ba5e6de3a7b396ec84
[ "MIT" ]
4
2018-07-24T08:36:42.000Z
2019-08-25T17:48:47.000Z
108_sortedArrayToBST.py
stuti-rastogi/leetcodesolutions
73593fe642a06a83cde974ba5e6de3a7b396ec84
[ "MIT" ]
null
null
null
108_sortedArrayToBST.py
stuti-rastogi/leetcodesolutions
73593fe642a06a83cde974ba5e6de3a7b396ec84
[ "MIT" ]
null
null
null
# Definition for a binary tree node. # class TreeNode(object): # def __init__(self, x): # self.val = x # self.left = None # self.right = None
25.666667
56
0.511364
# Definition for a binary tree node. # class TreeNode(object): # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution(object): def sortedArrayToBST(self, nums): """ :type nums: List[int] :rtype: TreeNode """ ...
0
0
0
398
0
0
0
0
23
17e9cfb82c820d80334c1843ebf41fb97592d9c4
728
py
Python
migrations/versions/001_create_books_table.py
tayutaedomo/sqlachemy-sandbox
f453554103fad671e438ea0e0b930c6bc9c57766
[ "MIT" ]
null
null
null
migrations/versions/001_create_books_table.py
tayutaedomo/sqlachemy-sandbox
f453554103fad671e438ea0e0b930c6bc9c57766
[ "MIT" ]
null
null
null
migrations/versions/001_create_books_table.py
tayutaedomo/sqlachemy-sandbox
f453554103fad671e438ea0e0b930c6bc9c57766
[ "MIT" ]
null
null
null
"""create books table Revision ID: 001 Revises: Create Date: 2021-08-08 21:34:07.136758 """ # revision identifiers, used by Alembic. revision = '001' down_revision = None branch_labels = None depends_on = None
21.411765
65
0.644231
"""create books table Revision ID: 001 Revises: Create Date: 2021-08-08 21:34:07.136758 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '001' down_revision = None branch_labels = None depends_on = None def upgrade(): # ### commands auto generated by Alem...
0
0
0
0
0
418
0
3
90
ae6205bfbe6ce6edc4ae7cb30262cad7953e1399
1,060
py
Python
validate_sptx/test_experiment.py
vipulsinghal02/starfish
c3d347954ad40a7a4be9a50d89974f5fbbc2919d
[ "MIT" ]
null
null
null
validate_sptx/test_experiment.py
vipulsinghal02/starfish
c3d347954ad40a7a4be9a50d89974f5fbbc2919d
[ "MIT" ]
null
null
null
validate_sptx/test_experiment.py
vipulsinghal02/starfish
c3d347954ad40a7a4be9a50d89974f5fbbc2919d
[ "MIT" ]
null
null
null
from pkg_resources import resource_filename from .util import SpaceTxValidator experiment_schema_path = resource_filename("validate_sptx", "schema/experiment.json") validator = SpaceTxValidator(experiment_schema_path) example = resource_filename("validate_sptx", "examples/experiment/experiment.json")
32.121212
85
0.785849
import pytest from pkg_resources import resource_filename from .util import SpaceTxValidator experiment_schema_path = resource_filename("validate_sptx", "schema/experiment.json") validator = SpaceTxValidator(experiment_schema_path) example = resource_filename("validate_sptx", "examples/experiment/experiment.json") ...
0
0
0
0
0
646
0
-8
114
cbc3b3f9db55ed2d52636db82adfc6d40af6e9e0
1,110
py
Python
testCase/test_login.py
zhuyao0905/AutoTest
994bc9952dae01e8e5aa532282d53df7cd5c0a51
[ "Apache-2.0" ]
2
2019-03-21T02:32:57.000Z
2019-03-21T03:26:50.000Z
testCase/test_login.py
zhuyao0905/AutoTest
994bc9952dae01e8e5aa532282d53df7cd5c0a51
[ "Apache-2.0" ]
null
null
null
testCase/test_login.py
zhuyao0905/AutoTest
994bc9952dae01e8e5aa532282d53df7cd5c0a51
[ "Apache-2.0" ]
null
null
null
#coding=utf-8 if __name__ == '__main__': t = Test() t.setUp()
39.642857
111
0.679279
#coding=utf-8 from appium import webdriver class Test(object): def setUp(self): desired_caps = {} desired_caps['platformName'] = 'Android' desired_caps['platformVersion'] = '7.1' desired_caps['deviceName'] = '721QADRG345FC' desired_caps['appPackage'] = 'com.excelliance.duala...
66
0
0
965
0
0
0
7
45
ea6f3a5f3bae8e3c9eb1d8eb9266435633f2024d
1,412
py
Python
python/qipy/test/test_qipy_install.py
vbarbaresi/qibuild
eab6b815fe0af49ea5c41ccddcd0dff2363410e1
[ "BSD-3-Clause" ]
null
null
null
python/qipy/test/test_qipy_install.py
vbarbaresi/qibuild
eab6b815fe0af49ea5c41ccddcd0dff2363410e1
[ "BSD-3-Clause" ]
null
null
null
python/qipy/test/test_qipy_install.py
vbarbaresi/qibuild
eab6b815fe0af49ea5c41ccddcd0dff2363410e1
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2012-2018 SoftBank Robotics. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the COPYING file. # pylint: disable=unused-variable
41.529412
72
0.713881
# Copyright (c) 2012-2018 SoftBank Robotics. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the COPYING file. # pylint: disable=unused-variable def test_install(qipy_action, tmpdir): big_project = qipy_action.add_test_project("big_project") dest = tmp...
0
0
0
0
0
1,137
0
0
69
eeb89aa254f3f35091747346e66ec932a4203e04
6,728
py
Python
CDF_plots.py
arjunroyihrpa/AdaFair
1d6d79bae9fb0b6771b79452d7315966593f6fde
[ "MIT" ]
null
null
null
CDF_plots.py
arjunroyihrpa/AdaFair
1d6d79bae9fb0b6771b79452d7315966593f6fde
[ "MIT" ]
null
null
null
CDF_plots.py
arjunroyihrpa/AdaFair
1d6d79bae9fb0b6771b79452d7315966593f6fde
[ "MIT" ]
null
null
null
import matplotlib matplotlib.use('Agg') import sys sys.path.insert(0, 'DataPreprocessing') sys.path.insert(0, 'equalized_odds_and_calibration-master') # import funcs_disp_mist as fdm # from load_german import load_german if __name__ == '__main__': # main("compass-gender") # main("adult-gender") # ma...
38.666667
161
0.700059
import matplotlib import numpy matplotlib.use('Agg') import matplotlib.pyplot as plt import sys from AdaFair import AdaFair sys.path.insert(0, 'DataPreprocessing') sys.path.insert(0, 'equalized_odds_and_calibration-master') # import funcs_disp_mist as fdm from Competitors.AdaCost import AdaCostClassifier from loa...
0
0
0
0
0
6,050
0
84
247
9576d2250d54d6f63d21b375295ebc84ccfce5e1
161
py
Python
threads/__init__.py
keyzt/VKMusicDownloader
c2cfbf734b94be5ab96a35b65f88cc5e1231fc7e
[ "MIT" ]
52
2018-07-28T18:05:16.000Z
2020-11-20T18:59:32.000Z
threads/__init__.py
Maozinha159/VKMusicDownloader
c2cfbf734b94be5ab96a35b65f88cc5e1231fc7e
[ "MIT" ]
5
2018-12-03T19:00:33.000Z
2020-09-30T16:51:13.000Z
threads/__init__.py
Maozinha159/VKMusicDownloader
c2cfbf734b94be5ab96a35b65f88cc5e1231fc7e
[ "MIT" ]
12
2018-12-03T18:45:11.000Z
2020-08-30T19:48:34.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*-
23
41
0.770186
#!/usr/bin/env python # -*- coding: utf-8 -*- from .download_files import DownloadsFile from .network_info import NetworkInfo from .load_music import LoadMusic
0
0
0
0
0
0
0
48
67
0f2a1f5b71989cfc2b3c60c5e132446cf0ee166c
6,001
py
Python
noseOfYeti/tokeniser/containers.py
delfick/nose-of-yeti
b9fbb32c131074bc61eb5d1da67f0931d9803637
[ "MIT" ]
12
2015-02-20T11:21:58.000Z
2022-01-20T08:33:32.000Z
noseOfYeti/tokeniser/containers.py
delfick/nose-of-yeti
b9fbb32c131074bc61eb5d1da67f0931d9803637
[ "MIT" ]
8
2015-12-05T01:26:19.000Z
2021-06-07T01:22:59.000Z
noseOfYeti/tokeniser/containers.py
delfick/nose-of-yeti
b9fbb32c131074bc61eb5d1da67f0931d9803637
[ "MIT" ]
4
2015-05-26T19:49:48.000Z
2016-05-25T20:33:59.000Z
import re regexes = { "joins": re.compile(r"[- /]"), "repeated_underscore": re.compile(r"_{2,}"), "invalid_variable_name_start": re.compile(r"^[^a-zA-Z_]"), "invalid_variable_name_characters": re.compile(r"[^0-9a-zA-Z_]"), } def acceptable(name, capitalize=False): """Convert a string into somethi...
29.131068
90
0.593401
from tokenize import NAME, OP import re regexes = { "joins": re.compile(r"[- /]"), "repeated_underscore": re.compile(r"_{2,}"), "invalid_variable_name_start": re.compile(r"^[^a-zA-Z_]"), "invalid_variable_name_characters": re.compile(r"[^0-9a-zA-Z_]"), } def acceptable(name, capitalize=False): ""...
0
1,380
0
3,232
0
0
0
8
91
e088d168aa5cfcaafbecda0e609d5458292ead2c
13,935
py
Python
pysnmp-with-texts/BAS-FTD-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
8
2019-05-09T17:04:00.000Z
2021-06-09T06:50:51.000Z
pysnmp-with-texts/BAS-FTD-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
4
2019-05-31T16:42:59.000Z
2020-01-31T21:57:17.000Z
pysnmp-with-texts/BAS-FTD-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module BAS-FTD-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/BAS-FTD-MIB # Produced by pysmi-0.3.4 at Wed May 1 11:33:53 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 0...
127.844037
1,520
0.790025
# # PySNMP MIB module BAS-FTD-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/BAS-FTD-MIB # Produced by pysmi-0.3.4 at Wed May 1 11:33:53 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 0...
0
0
0
0
0
0
0
0
0
0e8f92c9d0f38f8636b253a5c26bb8d84f59c04c
605
py
Python
tests/test_citation.py
clnsmth/cite
d55201e33d487790a63c6a1d5dbf0c6145225493
[ "Apache-2.0" ]
2
2020-02-24T14:50:09.000Z
2021-03-09T21:20:01.000Z
tests/test_citation.py
clnsmth/cite
d55201e33d487790a63c6a1d5dbf0c6145225493
[ "Apache-2.0" ]
12
2020-02-03T17:54:39.000Z
2022-02-26T18:28:06.000Z
tests/test_citation.py
clnsmth/cite
d55201e33d487790a63c6a1d5dbf0c6145225493
[ "Apache-2.0" ]
1
2022-03-03T17:20:02.000Z
2022-03-03T17:20:02.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """ :Mod: test_citation :Synopsis: :Author: servilla :Created: 1/25/20 """
17.285714
73
0.65124
#!/usr/bin/env python # -*- coding: utf-8 -*- """ :Mod: test_citation :Synopsis: :Author: servilla :Created: 1/25/20 """ import json import pytest from webapp.citation import Citation def test_citation(): pid = "knb-lter-nin.1.1" env = "production" style = "ESIP" accept = "text/plain" ...
0
0
0
0
0
383
0
-3
91
97ec930b66f5b319347b580d41c742aba91e394a
2,912
py
Python
aisle_4/DEPRE_client.py
Mimieam/NMouse
d7d7bb2b5fc22b6961852217e2c60be2e4e4c8b4
[ "MIT" ]
null
null
null
aisle_4/DEPRE_client.py
Mimieam/NMouse
d7d7bb2b5fc22b6961852217e2c60be2e4e4c8b4
[ "MIT" ]
null
null
null
aisle_4/DEPRE_client.py
Mimieam/NMouse
d7d7bb2b5fc22b6961852217e2c60be2e4e4c8b4
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: latin-1 -*- import sys import zmq import socket from pynput.mouse import Controller # Socket to talk to server context = zmq.Context() socket = context.socket(zmq.SUB) mouse = Controller() print("Collecting updates from weather server") socket.connect("tcp://localhost:5556") # Su...
24.677966
73
0.667582
#!/usr/bin/python # -*- coding: latin-1 -*- import sys import zmq import time import socket import autopy from pynput.mouse import Button, Controller # Socket to talk to server context = zmq.Context() socket = context.socket(zmq.SUB) mouse = Controller() print("Collecting updates from weather server…") socket.c...
9
0
0
0
0
483
0
-10
91
b1763971508267844d737deff19c55282416287e
2,613
py
Python
xiuhong_ms_hbond_code/Stable-MCCE/bin/vdw.py
caixiuhong/Develop-MCCE
31df6d22b8aac9a10c1e5c7809913b63ba83d23b
[ "MIT" ]
null
null
null
xiuhong_ms_hbond_code/Stable-MCCE/bin/vdw.py
caixiuhong/Develop-MCCE
31df6d22b8aac9a10c1e5c7809913b63ba83d23b
[ "MIT" ]
36
2019-06-03T20:30:45.000Z
2020-04-17T19:17:26.000Z
xiuhong_ms_hbond_code/Stable-MCCE/bin/vdw.py
caixiuhong/Develop-MCCE
31df6d22b8aac9a10c1e5c7809913b63ba83d23b
[ "MIT" ]
6
2019-06-03T16:56:43.000Z
2020-01-09T03:32:31.000Z
#!/usr/bin/python """ Calculate vdw energy table. This is a separate calculation at atom level. The result is not used by MCCE. However the conformer level vdw terms should be consistent with those in opp files. """ import sys import libvdw if __name__ == "__main__": # find location of parameters libvdw.i...
35.310811
117
0.510142
#!/usr/bin/python """ Calculate vdw energy table. This is a separate calculation at atom level. The result is not used by MCCE. However the conformer level vdw terms should be consistent with those in opp files. """ import sys import libvdw from pdbio import * if __name__ == "__main__": # find location of par...
0
0
0
0
0
0
0
-2
22
8cd610018d310907aca95e45b590c020eed26d4c
710
py
Python
jp.atcoder/abc123/abc123_d/8669197.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
1
2022-02-09T03:06:25.000Z
2022-02-09T03:06:25.000Z
jp.atcoder/abc123/abc123_d/8669197.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
1
2022-02-05T22:53:18.000Z
2022-02-09T01:29:30.000Z
jp.atcoder/abc123/abc123_d/8669197.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
null
null
null
INF = 10 ** 18 if __name__ == "__main__": main()
25.357143
61
0.46338
import sys import numpy as np INF = 10 ** 18 def main(): x, y, z, K = map(int, sys.stdin.readline().split()) abc = np.array(sys.stdin.read().split(), dtype=np.int64) a = np.append(abc[:x], INF) b = np.append(abc[x:x + y], INF) c = np.append(abc[x + y:x + y+ z], INF) a = np.sort(a)...
0
0
0
0
0
592
0
-14
73
613e40a6f3e1ec555b151b90dbe195277f00d18c
708
py
Python
tests/test_search_str.py
undo-nothing/swttaro
ac86c4b2a9ad065383b5787399a92836868aaf4b
[ "MIT" ]
2
2020-11-16T08:43:18.000Z
2021-03-17T02:19:25.000Z
tests/test_search_str.py
undo-nothing/swttaro
ac86c4b2a9ad065383b5787399a92836868aaf4b
[ "MIT" ]
null
null
null
tests/test_search_str.py
undo-nothing/swttaro
ac86c4b2a9ad065383b5787399a92836868aaf4b
[ "MIT" ]
null
null
null
import unittest if __name__ == '__main__': suite = unittest.TestSuite() suite.addTest(SearchStrTest('test_search_str')) suite.addTest(SearchStrTest('test_re_search_str')) runner = unittest.TextTestRunner() runner.run(suite)
22.125
89
0.687853
import os import unittest from swttaro.search_str import SearchStr class SearchStrTest(unittest.TestCase): def setUp(self): pass def tearDown(self): pass def test_search_str(self): ss = SearchStr() print(ss.search_str('search_str', os.path.abspath(__file__), match_all=...
0
0
0
384
0
0
0
7
68
f35404ef1e04d24ade9d0d904a7d19db072106cf
260
py
Python
bitmovin_api_sdk/models/vp9_aq_mode.py
jaythecaesarean/bitmovin-api-sdk-python
48166511fcb9082041c552ace55a9b66cc59b794
[ "MIT" ]
11
2019-07-03T10:41:16.000Z
2022-02-25T21:48:06.000Z
bitmovin_api_sdk/models/vp9_aq_mode.py
jaythecaesarean/bitmovin-api-sdk-python
48166511fcb9082041c552ace55a9b66cc59b794
[ "MIT" ]
8
2019-11-23T00:01:25.000Z
2021-04-29T12:30:31.000Z
bitmovin_api_sdk/models/vp9_aq_mode.py
jaythecaesarean/bitmovin-api-sdk-python
48166511fcb9082041c552ace55a9b66cc59b794
[ "MIT" ]
13
2020-01-02T14:58:18.000Z
2022-03-26T12:10:30.000Z
# coding: utf-8
20
59
0.730769
# coding: utf-8 from enum import Enum from six import string_types, iteritems from bitmovin_api_sdk.common.poscheck import poscheck_model class Vp9AqMode(Enum): NONE = "NONE" VARIANCE = "VARIANCE" COMPLEXITY = "COMPLEXITY" CYCLIC = "CYCLIC"
0
0
0
97
0
0
0
56
90
53026799cb0f095ee596c01b1babddbd158678a6
6,532
py
Python
ghost/core/base/console.py
gitsurya1996/Ghost
87e5e0cf619550ea6b2a73d4998129780677165a
[ "MIT" ]
461
2020-10-21T06:08:06.000Z
2021-06-17T11:43:01.000Z
ghost/core/base/console.py
gitsurya1996/Ghost
87e5e0cf619550ea6b2a73d4998129780677165a
[ "MIT" ]
79
2020-10-20T16:35:41.000Z
2021-06-15T15:38:47.000Z
ghost/core/base/console.py
gitsurya1996/Ghost
87e5e0cf619550ea6b2a73d4998129780677165a
[ "MIT" ]
192
2020-10-21T10:41:29.000Z
2021-06-14T09:49:00.000Z
#!/usr/bin/env python3 # # MIT License # # Copyright (c) 2020 EntySec # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use,...
41.081761
141
0.488212
#!/usr/bin/env python3 # # MIT License # # Copyright (c) 2020 EntySec # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use,...
0
0
0
5,183
0
0
0
60
158
fe6b17e134d557dc74863324112d3a2bf1a4512d
11,705
py
Python
src/utils.py
ankush2805/fawkes
12e3341863bf01cf6c0d0aa506c64a37c1a6ffbc
[ "MIT" ]
1
2022-02-16T12:00:06.000Z
2022-02-16T12:00:06.000Z
src/utils.py
ankush2805/fawkes
12e3341863bf01cf6c0d0aa506c64a37c1a6ffbc
[ "MIT" ]
null
null
null
src/utils.py
ankush2805/fawkes
12e3341863bf01cf6c0d0aa506c64a37c1a6ffbc
[ "MIT" ]
1
2022-01-25T07:01:22.000Z
2022-01-25T07:01:22.000Z
import json import sys import os import re import dateutil.parser import spacy from datetime import datetime from datetime import datetime from nltk.corpus import stopwords # This is so that the following imports work sys.path.append(os.path.realpath(".")) def merge_json(file1, file2): """ Merges two jsons w...
29.483627
127
0.669287
import json import ast import sys import os import re import csv import itertools import operator import dateutil.parser import hashlib import gensim import spacy import jsonschema from datetime import datetime from pprint import pprint from datetime import datetime, timedelta from gensim.utils import simple_preproc...
0
0
0
0
0
4,453
0
-1
636
3bd033c2c72d4045b1d23b477f8ed5a618ee7d4d
8,019
py
Python
book-code/numpy-ml/numpy_ml/trees/dt.py
yangninghua/code_library
b769abecb4e0cbdbbb5762949c91847a0f0b3c5a
[ "MIT" ]
null
null
null
book-code/numpy-ml/numpy_ml/trees/dt.py
yangninghua/code_library
b769abecb4e0cbdbbb5762949c91847a0f0b3c5a
[ "MIT" ]
null
null
null
book-code/numpy-ml/numpy_ml/trees/dt.py
yangninghua/code_library
b769abecb4e0cbdbbb5762949c91847a0f0b3c5a
[ "MIT" ]
null
null
null
import numpy as np def mse(y): """ Mean squared error for decision tree (ie., mean) predictions """ return np.mean((y - np.mean(y)) ** 2) def entropy(y): """ Entropy of a label sequence """ hist = np.bincount(y) ps = hist / np.sum(hist) return -np.sum([p * np.log2(p) for p...
33.693277
88
0.56441
import numpy as np class Node: def __init__(self, left, right, rule): self.left = left self.right = right self.feature = rule[0] self.threshold = rule[1] class Leaf: def __init__(self, value): """ `value` is an array of class probabilities if classifier is Tru...
0
0
0
7,431
0
0
0
0
69