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
77e226c838e3ba2fbc0124b3cc743aa4f7dec4bd
12,518
py
Python
src/hooks/build-tag.py
jouvin/scdb
2e367a79c2f0ece59d30fe46d0a586a6d69b72d5
[ "Apache-2.0" ]
1
2015-02-12T11:19:18.000Z
2015-02-12T11:19:18.000Z
src/hooks/build-tag.py
jouvin/scdb
2e367a79c2f0ece59d30fe46d0a586a6d69b72d5
[ "Apache-2.0" ]
12
2015-01-09T13:47:08.000Z
2022-03-23T22:26:17.000Z
src/hooks/build-tag.py
jouvin/scdb
2e367a79c2f0ece59d30fe46d0a586a6d69b72d5
[ "Apache-2.0" ]
4
2015-02-12T11:19:33.000Z
2018-04-05T11:52:50.000Z
#!/usr/bin/python """ Script used to compile and deploy a tagged configuration on a deployment server. This script is intended to be called by SVN post-commit hook script. """ __version__ = "1.0.3" __author__ = "Michel Jouvin <jouvin@lal.in2p3.fr>" import sys import os import re import shutil import StringIO impor...
33.560322
151
0.718645
#!/usr/bin/python """ Script used to compile and deploy a tagged configuration on a deployment server. This script is intended to be called by SVN post-commit hook script. """ __version__ = "1.0.3" __author__ = "Michel Jouvin <jouvin@lal.in2p3.fr>" import sys import os import re import shutil from subprocess impor...
0
0
0
0
0
390
0
3
91
22e3e2c5a8e0084d4bbf31891a9ec61c3b9572d0
9,623
py
Python
nicos_mlz/toftof/gui/resolutionpanel.py
jkrueger1/nicos
5f4ce66c312dedd78995f9d91e8a6e3c891b262b
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
null
null
null
nicos_mlz/toftof/gui/resolutionpanel.py
jkrueger1/nicos
5f4ce66c312dedd78995f9d91e8a6e3c891b262b
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
null
null
null
nicos_mlz/toftof/gui/resolutionpanel.py
jkrueger1/nicos
5f4ce66c312dedd78995f9d91e8a6e3c891b262b
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
null
null
null
# -*- coding: utf-8 -*- # ***************************************************************************** # NICOS, the Networked Instrument Control System of the MLZ # Copyright (c) 2009-2022 by the NICOS contributors (see AUTHORS) # # This program is free software; you can redistribute it and/or modify it under # the t...
37.44358
79
0.59285
# -*- coding: utf-8 -*- # ***************************************************************************** # NICOS, the Networked Instrument Control System of the MLZ # Copyright (c) 2009-2022 by the NICOS contributors (see AUTHORS) # # This program is free software; you can redistribute it and/or modify it under # the t...
2
891
0
6,649
0
0
0
352
384
b2b18deb75d1457551245ff02d950f3b4d3ae316
8,944
py
Python
test/proxy/python/proxy.py
trjaeger/sauZTP
cfe88724ccd01b1db13d42f0c8c25c3b11c091de
[ "MIT" ]
1
2019-04-01T18:19:09.000Z
2019-04-01T18:19:09.000Z
test/proxy/python/proxy.py
trjaeger/sauZTP
cfe88724ccd01b1db13d42f0c8c25c3b11c091de
[ "MIT" ]
null
null
null
test/proxy/python/proxy.py
trjaeger/sauZTP
cfe88724ccd01b1db13d42f0c8c25c3b11c091de
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """This is some demo code showing how a BRSKI proxy would find a registrar in an ANIMA network using GRASP. This version also shows how the proxy could advertise itself by flooding to on-link nodes seeking a proxy. The actual BRSKI transactions are not included. """ impo...
34.007605
116
0.569208
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """This is some demo code showing how a BRSKI proxy would find a registrar in an ANIMA network using GRASP. This version also shows how the proxy could advertise itself by flooding to on-link nodes seeking a proxy. The actual BRSKI transactions are not included. """ impo...
0
0
0
0
0
1,494
0
-10
90
5d7ab5ddd92bdd0269a70f7eac2809d02b683942
25,157
py
Python
xdet_v2_resnet_eval.py
jacke121/X-Detector
a24e370a5acb6f5c29cd5db81fa4270f2697b8c1
[ "Apache-2.0" ]
null
null
null
xdet_v2_resnet_eval.py
jacke121/X-Detector
a24e370a5acb6f5c29cd5db81fa4270f2697b8c1
[ "Apache-2.0" ]
null
null
null
xdet_v2_resnet_eval.py
jacke121/X-Detector
a24e370a5acb6f5c29cd5db81fa4270f2697b8c1
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 Changan Wang # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, so...
51.55123
242
0.655325
# Copyright 2018 Changan Wang # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, so...
0
0
0
0
0
10,990
0
147
433
7c14ceed74fda1a62c069fe757cd844c073d563d
248
py
Python
virtual_testing_machine/test_cases/scenarios/scenario_02_feature_door.py
TobKed/system_test_progress_tracking
633792e7057289b6a23db30c6353241123eaa2e4
[ "MIT" ]
null
null
null
virtual_testing_machine/test_cases/scenarios/scenario_02_feature_door.py
TobKed/system_test_progress_tracking
633792e7057289b6a23db30c6353241123eaa2e4
[ "MIT" ]
3
2020-02-11T23:29:05.000Z
2021-06-10T21:03:42.000Z
virtual_testing_machine/test_cases/scenarios/scenario_02_feature_door.py
TobKed/system_test_progress_tracking
633792e7057289b6a23db30c6353241123eaa2e4
[ "MIT" ]
2
2019-01-24T20:39:31.000Z
2019-01-29T07:42:27.000Z
import os from run import TEST_CASES_DIR, run_test_case FEATURE_DIR = os.path.join(TEST_CASES_DIR, "02_feature_door") run_test_case(os.path.join(FEATURE_DIR, "01_01_test_door.py")) run_test_case(os.path.join(FEATURE_DIR, "01_02_test_door.py"))
24.8
62
0.806452
import os from run import TEST_CASES_DIR, run_test_case FEATURE_DIR = os.path.join(TEST_CASES_DIR, "02_feature_door") run_test_case(os.path.join(FEATURE_DIR, "01_01_test_door.py")) run_test_case(os.path.join(FEATURE_DIR, "01_02_test_door.py"))
0
0
0
0
0
0
0
0
0
898a47ba58e4d76c8114799cae5641740842da98
8,639
py
Python
delight/utils.py
sylvielsstfr/Delight
67202a27061dee33cb162ca382d11e4994189644
[ "MIT" ]
1
2021-12-01T10:30:08.000Z
2021-12-01T10:30:08.000Z
delight/utils.py
sylvielsstfr/Delight
67202a27061dee33cb162ca382d11e4994189644
[ "MIT" ]
null
null
null
delight/utils.py
sylvielsstfr/Delight
67202a27061dee33cb162ca382d11e4994189644
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import numpy as np import logging import coloredlogs logger = logging.getLogger(__name__) coloredlogs.install(level='DEBUG', logger=logger,fmt='%(asctime)s,%(msecs)03d %(programname)s, %(name)s[%(process)d] %(levelname)s %(message)s') def symmetrize(a): """ Symmmetrize matrix ...
33.878431
144
0.588378
# -*- coding: utf-8 -*- import numpy as np from scipy.misc import derivative import logging import coloredlogs logger = logging.getLogger(__name__) coloredlogs.install(level='DEBUG', logger=logger,fmt='%(asctime)s,%(msecs)03d %(programname)s, %(name)s[%(process)d] %(levelname)s %(message)s') class approx_DL(): ...
0
0
0
345
0
2,500
0
12
137
754a6c1d143fcb676f1d4c3d66b7498268b5da30
1,929
py
Python
opentargets_validator/cli.py
pcm32/validator
711c098df9c82e66ff9b95412f4561c28a63b572
[ "Apache-2.0" ]
null
null
null
opentargets_validator/cli.py
pcm32/validator
711c098df9c82e66ff9b95412f4561c28a63b572
[ "Apache-2.0" ]
null
null
null
opentargets_validator/cli.py
pcm32/validator
711c098df9c82e66ff9b95412f4561c28a63b572
[ "Apache-2.0" ]
null
null
null
from __future__ import print_function, absolute_import from __future__ import unicode_literals import logging import sys if __name__ == '__main__': sys.exit(main())
35.072727
77
0.635044
from __future__ import print_function, absolute_import from __future__ import unicode_literals import argparse import logging import logging.config import sys from opentargets_validator.helpers import file_or_resource, URLZSource from opentargets_validator.validator import validate def main(): logging.config.fil...
0
0
0
0
0
1,571
0
74
112
fa18577018997090e59693b955ae9745e82a58ed
2,891
py
Python
salt/pillar/sqlite3.py
bechtoldt/salt
01dfa10dee93163b25400b4aac884aa9e35209b7
[ "Apache-2.0" ]
3
2015-04-16T18:42:35.000Z
2017-10-30T16:57:49.000Z
salt/pillar/sqlite3.py
bechtoldt/salt
01dfa10dee93163b25400b4aac884aa9e35209b7
[ "Apache-2.0" ]
16
2015-11-18T00:44:03.000Z
2018-10-29T20:48:27.000Z
salt/pillar/sqlite3.py
bechtoldt/salt
01dfa10dee93163b25400b4aac884aa9e35209b7
[ "Apache-2.0" ]
1
2018-04-19T16:57:27.000Z
2018-04-19T16:57:27.000Z
# -*- coding: utf-8 -*- ''' Retrieve Pillar data by doing a SQLite3 query sqlite3 is included in the stdlib since python2.5. This module is a concrete implementation of the sql_base ext_pillar for SQLite3. :maturity: new :platform: all Configuring the sqlite3 ext_pillar ===================================== Use th...
25.13913
80
0.593912
# -*- coding: utf-8 -*- ''' Retrieve Pillar data by doing a SQLite3 query sqlite3 is included in the stdlib since python2.5. This module is a concrete implementation of the sql_base ext_pillar for SQLite3. :maturity: new :platform: all Configuring the sqlite3 ext_pillar ===================================== Use th...
0
509
0
729
0
13
0
37
112
2bbc149f725af8a385294ee1d15436db3b85e8a0
1,181
py
Python
mlgo/datatraining/feature_selection.py
binary-warriors/ML-GO
f2572a4de5fd6361b26166cb022e6f60ba53f34b
[ "MIT" ]
5
2019-01-27T11:56:46.000Z
2019-12-30T04:18:38.000Z
mlgo/datatraining/feature_selection.py
binary-warriors/ML-GO
f2572a4de5fd6361b26166cb022e6f60ba53f34b
[ "MIT" ]
2
2019-11-20T21:21:28.000Z
2019-11-20T21:21:34.000Z
mlgo/datatraining/feature_selection.py
binary-warriors/ML-GO
f2572a4de5fd6361b26166cb022e6f60ba53f34b
[ "MIT" ]
1
2019-02-15T07:19:58.000Z
2019-02-15T07:19:58.000Z
''' For regression: f_regression, mutual_info_regression For classification: chi2, f_classif, mutual_info_classif ''' ''' threshold=0.0 means keeps only those features with non-zero variance '''
32.805556
108
0.7663
from sklearn.feature_selection import chi2 from sklearn.feature_selection import SelectKBest from sklearn.feature_selection import VarianceThreshold ''' For regression: f_regression, mutual_info_regression For classification: chi2, f_classif, mutual_info_classif ''' def select_k_best(train_features, train_...
0
0
0
0
0
772
0
83
112
04c090bc596623aa03893dd697bfb5985cdcf597
3,679
py
Python
cdk_bootstrap_multiple_accounts.py
raajheshkannaa/cdk-booty-strappin
b2351c0347325245dbbfaa1693842f7538a3ee32
[ "MIT" ]
2
2021-12-05T15:05:06.000Z
2022-01-23T17:55:31.000Z
cdk_bootstrap_multiple_accounts.py
raajheshkannaa/cdk-booty-strappin
b2351c0347325245dbbfaa1693842f7538a3ee32
[ "MIT" ]
null
null
null
cdk_bootstrap_multiple_accounts.py
raajheshkannaa/cdk-booty-strappin
b2351c0347325245dbbfaa1693842f7538a3ee32
[ "MIT" ]
null
null
null
import boto3 import subprocess # By default since code is run from the Organizations account, the account is trusted. Use this variable to add another account as trusted such as an Automation or Security account, from where CI/CD pipelines will be run. If you don't need or have a dedicated account, just use the Organi...
40.428571
339
0.74966
import boto3 import subprocess # By default since code is run from the Organizations account, the account is trusted. Use this variable to add another account as trusted such as an Automation or Security account, from where CI/CD pipelines will be run. If you don't need or have a dedicated account, just use the Organi...
0
0
0
0
0
865
0
0
46
853f4afc4fa2639432fa9b0f42ef8eb867e6190c
803
py
Python
Pythagorean-triplet.py
Shahibur50/ClassWork
0fb8787668a55b7a722fa9a4920e2ab8fdad0f90
[ "MIT" ]
1
2021-01-02T17:51:18.000Z
2021-01-02T17:51:18.000Z
Pythagorean-triplet.py
Shahibur50/ClassWork
0fb8787668a55b7a722fa9a4920e2ab8fdad0f90
[ "MIT" ]
null
null
null
Pythagorean-triplet.py
Shahibur50/ClassWork
0fb8787668a55b7a722fa9a4920e2ab8fdad0f90
[ "MIT" ]
null
null
null
""" Pythagorean triplet version 1.2.10.20 Copyright (c) 2020 Shahibur Rahaman Licensed under MIT """ print("--------------------------------------------------------") print("") hypo = float(input("Enter the length of hypotenuse of triangle: ")) base = float(input("Enter the length of base of triangle: ")) height = fl...
29.740741
84
0.594022
""" Pythagorean triplet version 1.2.10.20 Copyright (c) 2020 Shahibur Rahaman Licensed under MIT """ print("--------------------------------------------------------") print("") hypo = float(input("Enter the length of hypotenuse of triangle: ")) base = float(input("Enter the length of base of triangle: ")) height = fl...
0
0
0
0
0
0
0
0
0
eb0678a6fd7cd4344e63da96a41c39051eae2505
354
py
Python
scripts/export_query_registry.py
pydefi/pytelliot
8dd761dfd11986aa818e7a9faf2560929113b104
[ "MIT" ]
null
null
null
scripts/export_query_registry.py
pydefi/pytelliot
8dd761dfd11986aa818e7a9faf2560929113b104
[ "MIT" ]
null
null
null
scripts/export_query_registry.py
pydefi/pytelliot
8dd761dfd11986aa818e7a9faf2560929113b104
[ "MIT" ]
1
2021-09-02T20:53:58.000Z
2021-09-02T20:53:58.000Z
""" This script exports the tellor query registry to json """ from telliot.queries.query_registry import query_registry from telliot.queries.query_registry import QueryRegistry exported = query_registry.json(indent=2) print(exported) with open("query_registry_export.json", "w") as f: f.write(exported) imported = ...
29.5
57
0.799435
""" This script exports the tellor query registry to json """ from telliot.queries.query_registry import query_registry from telliot.queries.query_registry import QueryRegistry exported = query_registry.json(indent=2) print(exported) with open("query_registry_export.json", "w") as f: f.write(exported) imported = ...
0
0
0
0
0
0
0
0
0
4c66b633ac0f09d8e046115d5ab4a772dd56c954
17,967
py
Python
torchreid/data/datasets/dataset.py
dhenisdj/deep-object-reid
9c6eed99b6d2f22fccac82ff4b3f8e3adc10fde7
[ "MIT" ]
1
2020-09-27T08:40:42.000Z
2020-09-27T08:40:42.000Z
torchreid/data/datasets/dataset.py
dhenisdj/deep-object-reid
9c6eed99b6d2f22fccac82ff4b3f8e3adc10fde7
[ "MIT" ]
null
null
null
torchreid/data/datasets/dataset.py
dhenisdj/deep-object-reid
9c6eed99b6d2f22fccac82ff4b3f8e3adc10fde7
[ "MIT" ]
null
null
null
from __future__ import division, print_function, absolute_import
34.618497
99
0.559136
from __future__ import division, print_function, absolute_import import copy import os.path as osp from collections import defaultdict import numpy as np import tarfile import zipfile import torch import operator from torchreid.utils import read_image, download_url, mkdir_if_missing class Dataset: """An abstra...
0
2,702
0
14,906
0
0
0
21
270
9cd519fd3a4ef5beb68b9c3624d78ce13ce54dab
1,421
py
Python
No_0168_Excel Sheet Column Title/excel_shhet_column_title_by_recursive.py
coderMaruf/leetcode-1
20ffe26e43999e44c8acf9800acb371a49bb5853
[ "MIT" ]
32
2020-01-05T13:37:16.000Z
2022-03-26T07:27:09.000Z
No_0168_Excel Sheet Column Title/excel_shhet_column_title_by_recursive.py
coderMaruf/leetcode-1
20ffe26e43999e44c8acf9800acb371a49bb5853
[ "MIT" ]
null
null
null
No_0168_Excel Sheet Column Title/excel_shhet_column_title_by_recursive.py
coderMaruf/leetcode-1
20ffe26e43999e44c8acf9800acb371a49bb5853
[ "MIT" ]
8
2020-06-18T16:17:27.000Z
2022-03-15T23:58:18.000Z
''' Description: Given a positive integer, return its corresponding column title as appear in an Excel sheet. For example: 1 -> A 2 -> B 3 -> C ... 26 -> Z 27 -> AA 28 -> AB ... Example 1: Input: 1 Output: "A" Example 2: Input: 28 Output: "AB" Example 3: Input: 701 Output: "ZY" ...
15.966292
98
0.539057
''' Description: Given a positive integer, return its corresponding column title as appear in an Excel sheet. For example: 1 -> A 2 -> B 3 -> C ... 26 -> Z 27 -> AA 28 -> AB ... Example 1: Input: 1 Output: "A" Example 2: Input: 28 Output: "AB" Example 3: Input: 701 Output: "ZY" ...
0
0
0
463
0
213
0
0
46
826f599c76249c92080a3a5fdfac7f4b1c7020f4
2,164
py
Python
checkov/common/images/image_referencer.py
peaudecastor/checkov
a4804b61c1b1390b7abd44ab53285fcbc3e7e80b
[ "Apache-2.0" ]
null
null
null
checkov/common/images/image_referencer.py
peaudecastor/checkov
a4804b61c1b1390b7abd44ab53285fcbc3e7e80b
[ "Apache-2.0" ]
null
null
null
checkov/common/images/image_referencer.py
peaudecastor/checkov
a4804b61c1b1390b7abd44ab53285fcbc3e7e80b
[ "Apache-2.0" ]
null
null
null
from __future__ import annotations
33.292308
144
0.628928
from __future__ import annotations import logging from abc import abstractmethod from typing import cast import docker class Image: def __init__(self, file_path: str, name: str, image_id: str, start_line: int, end_line: int) -> None: """ :param file_path: example: 'checkov/integration_tests/exa...
0
522
0
1,473
0
0
0
-4
136
2c5c8dd1e6c25291a9b6f7d2f216afabe215b161
3,527
py
Python
swm-master/swm-master/calc/misc/diss_vis.py
m2lines/subgrid
3de5d14c5525a62529d43cbafccda716c74e32df
[ "MIT" ]
1
2021-11-03T01:27:16.000Z
2021-11-03T01:27:16.000Z
swm-master/swm-master/calc/misc/diss_vis.py
m2lines/subgrid
3de5d14c5525a62529d43cbafccda716c74e32df
[ "MIT" ]
null
null
null
swm-master/swm-master/calc/misc/diss_vis.py
m2lines/subgrid
3de5d14c5525a62529d43cbafccda716c74e32df
[ "MIT" ]
1
2021-06-24T15:58:32.000Z
2021-06-24T15:58:32.000Z
## UNDERSTANDING DISSIPATION from __future__ import print_function path = '/home/mkloewer/python/swm/' import os; os.chdir(path) # change working directory import numpy as np import matplotlib.pyplot as plt from netCDF4 import Dataset # import functions exec(open(path+'swm_param.py').read()) exec(open(path+'swm_operat...
24.493056
91
0.622625
## UNDERSTANDING DISSIPATION from __future__ import print_function path = '/home/mkloewer/python/swm/' import os; os.chdir(path) # change working directory import numpy as np from scipy import sparse from scipy.integrate import cumtrapz import matplotlib.pyplot as plt import time as tictoc from netCDF4 import Dataset i...
0
0
0
0
0
1,204
0
9
160
1f960740fdf359a3f5a455f685d9e6216838c47e
1,877
py
Python
ssl_image_classification/algorithms/ict.py
JanMarcelKezmann/Semi-Supervised-Learning-Image-Classification
b32599d1a5f28beefb4f9a744087e1dc47bd9906
[ "MIT" ]
4
2021-04-16T18:56:46.000Z
2021-11-18T07:14:04.000Z
ssl_image_classification/algorithms/ict.py
JanMarcelKezmann/Semi-Supervised-Learning-Image-Classification
b32599d1a5f28beefb4f9a744087e1dc47bd9906
[ "MIT" ]
2
2022-02-05T16:55:14.000Z
2022-03-06T11:04:23.000Z
ssl_image_classification/algorithms/ict.py
JanMarcelKezmann/Semi-Supervised-Learning-Image-Classification
b32599d1a5f28beefb4f9a744087e1dc47bd9906
[ "MIT" ]
2
2022-02-08T12:43:49.000Z
2022-03-06T10:47:56.000Z
from ..libml.data_augmentations import weak_augment, medium_augment def ict(x, u, height, width): """ Applies medium augmentations on inputs x and u returns augmented tensors. Args: x: tensor, labeled batch of images of shape [batch, height, width, channels] u: tensor, ...
39.104167
103
0.700053
import tensorflow as tf from ..libml.data_augmentations import weak_augment, medium_augment, strong_augment def ict(x, u, height, width): """ Applies medium augmentations on inputs x and u returns augmented tensors. Args: x: tensor, labeled batch of images of shape [batch, height, width...
0
1,062
0
0
0
0
0
18
45
e05ecb607217b90e55bf40931bf9023577bb0eeb
517
py
Python
tests/MenderAPI/__init__.py
bboozzoo/mender-integration
e9e5df47f09adf14ea18d5d7d536f1eb05af568e
[ "Apache-2.0" ]
null
null
null
tests/MenderAPI/__init__.py
bboozzoo/mender-integration
e9e5df47f09adf14ea18d5d7d536f1eb05af568e
[ "Apache-2.0" ]
null
null
null
tests/MenderAPI/__init__.py
bboozzoo/mender-integration
e9e5df47f09adf14ea18d5d7d536f1eb05af568e
[ "Apache-2.0" ]
null
null
null
import os import logging api_version = os.getenv("MENDER_API_VERSION", "v1") logger = logging.getLogger() logger.setLevel(logging.DEBUG) #logging.getLogger("paramiko").setLevel(logging.DEBUG) logging.info("Setting api_version as: " + api_version) import authentication import admission import deployments import art...
21.541667
54
0.798839
import os import logging api_version = os.getenv("MENDER_API_VERSION", "v1") logger = logging.getLogger() logger.setLevel(logging.DEBUG) #logging.getLogger("paramiko").setLevel(logging.DEBUG) logging.info("Setting api_version as: " + api_version) import authentication import admission import deployments import art...
0
0
0
0
0
0
0
0
0
fc774541c6946966d63e7a063e2bc4711c1e05a0
3,228
py
Python
ooobuild/lo/awt/x_text_component.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
ooobuild/lo/awt/x_text_component.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
ooobuild/lo/awt/x_text_component.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # # Copyright 2022 :Barry-Thomas-Paul: Moss # # 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 applicab...
31.339806
130
0.656753
# coding: utf-8 # # Copyright 2022 :Barry-Thomas-Paul: Moss # # 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 applicab...
0
1,372
0
798
0
0
0
131
119
a5a2784e76badd805508193534eb920041b18a3b
699
py
Python
examples/parametric/hyperparameters.py
vishalbelsare/skpro
05f0df076db777946f317117d6cc66f2dd54259b
[ "BSD-3-Clause" ]
112
2018-01-03T18:37:30.000Z
2021-11-03T13:47:22.000Z
examples/parametric/hyperparameters.py
vishalbelsare/skpro
05f0df076db777946f317117d6cc66f2dd54259b
[ "BSD-3-Clause" ]
6
2018-09-04T14:06:32.000Z
2020-05-14T12:15:21.000Z
examples/parametric/hyperparameters.py
vishalbelsare/skpro
05f0df076db777946f317117d6cc66f2dd54259b
[ "BSD-3-Clause" ]
16
2018-01-05T04:01:42.000Z
2021-03-12T20:28:43.000Z
from sklearn.ensemble import RandomForestRegressor from sklearn.datasets.base import load_boston from sklearn.model_selection import GridSearchCV from skpro.parametric import ParametricEstimator from skpro.parametric.estimators import Constant model = ParametricEstimator( point=RandomForestRegressor(), std=Co...
31.772727
81
0.778255
from sklearn.ensemble import RandomForestRegressor from sklearn.datasets.base import load_boston from sklearn.model_selection import GridSearchCV from skpro.parametric import ParametricEstimator from skpro.parametric.estimators import Constant model = ParametricEstimator( point=RandomForestRegressor(), std=Co...
0
0
0
0
0
0
0
0
0
c37a9609915afb8e7ef58422b09882edd6503e3d
211
py
Python
zcls/config/key_word.py
ZJCV/ZCls
d67d2c69cc3607a3514c1daadabe51f50c820efa
[ "Apache-2.0" ]
110
2021-02-04T14:32:57.000Z
2022-03-30T01:51:56.000Z
zcls/config/key_word.py
ZJCV/ZCls
d67d2c69cc3607a3514c1daadabe51f50c820efa
[ "Apache-2.0" ]
8
2021-04-11T02:46:57.000Z
2021-12-14T19:30:58.000Z
zcls/config/key_word.py
ZJCV/ZCls
d67d2c69cc3607a3514c1daadabe51f50c820efa
[ "Apache-2.0" ]
20
2021-02-07T14:17:07.000Z
2022-03-22T05:20:40.000Z
# -*- coding: utf-8 -*- """ @date: 2020/12/28 10:35 @file: key_word.py @author: zj @description: """ KEY_OUTPUT = 'output' KEY_LOSS = 'loss' KEY_SEP = ',,' KEY_DATASET = 'data.csv' KEY_CLASSES = 'cls.csv'
13.1875
25
0.620853
# -*- coding: utf-8 -*- """ @date: 2020/12/28 上午10:35 @file: key_word.py @author: zj @description: """ KEY_OUTPUT = 'output' KEY_LOSS = 'loss' KEY_SEP = ',,' KEY_DATASET = 'data.csv' KEY_CLASSES = 'cls.csv'
6
0
0
0
0
0
0
0
0
ed8efbdb00fb38ff596c2045914cfe1da2114b38
2,053
py
Python
Desktop Application/Intermediate/Python/Space War/start.py
jyothi-k-g/Project-Guidance
a49c0576992739b8104694db5fdc1d5e50b96b8d
[ "MIT" ]
1
2022-03-03T09:30:07.000Z
2022-03-03T09:30:07.000Z
Desktop Application/Intermediate/Python/Space War/start.py
srinjoy-26/Project-Guidance
504f37e8f7566db2d1bca873df7dd1fff5368497
[ "MIT" ]
null
null
null
Desktop Application/Intermediate/Python/Space War/start.py
srinjoy-26/Project-Guidance
504f37e8f7566db2d1bca873df7dd1fff5368497
[ "MIT" ]
null
null
null
import pygame screen_size = [360, 600] screen = pygame.display.set_mode(screen_size) score = 0 green = (0, 255, 0) pygame.font.init() background = load('./img/space_open_space_planets_135213_360x640.jpg') kill = load('./img/meteorBrown_med1.png') user = load('./img/playerShip1_orange.png') user_x = 160 c_positio...
25.036585
70
0.636142
import pygame import random screen_size = [360, 600] screen = pygame.display.set_mode(screen_size) score = 0 green = (0, 255, 0) pygame.font.init() def load(name): return pygame.image.load(name) def display_score(score): font = pygame.font.SysFont('Comic Sans MS', 30) score_text = 'Score: ' + str(score...
0
0
0
0
0
415
0
-8
116
9852a9743ebe111d6a6600ed36b5f23c5f1b2da1
1,756
py
Python
tests/functions/test_is_after.py
RDFLib/timefuncs
dd3bde87277327e14cf1cde34dc5b682679f9c51
[ "BSD-3-Clause" ]
3
2021-07-28T21:17:11.000Z
2021-07-31T10:09:08.000Z
tests/functions/test_is_after.py
RDFLib/timefuncs
dd3bde87277327e14cf1cde34dc5b682679f9c51
[ "BSD-3-Clause" ]
1
2021-07-26T00:20:21.000Z
2021-07-26T00:37:26.000Z
tests/functions/test_is_after.py
RDFLib/timefuncs
dd3bde87277327e14cf1cde34dc5b682679f9c51
[ "BSD-3-Clause" ]
1
2021-07-25T04:38:29.000Z
2021-07-25T04:38:29.000Z
from pathlib import Path from rdflib import Namespace import sys sys.path.append(str(Path(__file__).parent.parent)) TFUN = Namespace("https://w3id.org/timefuncs/") AFTER = Namespace("https://w3id.org/timefuncs/testdata/after/") tests_dir = Path(__file__).parent
29.266667
63
0.545558
from pathlib import Path from rdflib import Graph, Namespace from rdflib.namespace import TIME import sys sys.path.append(str(Path(__file__).parent.parent)) from timefuncs import is_after TFUN = Namespace("https://w3id.org/timefuncs/") AFTER = Namespace("https://w3id.org/timefuncs/testdata/after/") tests_dir = Path(...
0
0
0
0
0
1,395
0
28
67
7c77ee13b9ff115b15cacbf33ff5d51bc57ca48d
12,013
py
Python
src/sentry/integrations/slack/utils.py
pombredanne/django-sentry
4ad09417fb3cfa3aa4a0d4175ae49fe02837c567
[ "BSD-3-Clause" ]
null
null
null
src/sentry/integrations/slack/utils.py
pombredanne/django-sentry
4ad09417fb3cfa3aa4a0d4175ae49fe02837c567
[ "BSD-3-Clause" ]
null
null
null
src/sentry/integrations/slack/utils.py
pombredanne/django-sentry
4ad09417fb3cfa3aa4a0d4175ae49fe02837c567
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import import logging from sentry import http from sentry.models import (Integration) logger = logging.getLogger("sentry.integrations.slack") # Attachment colors used for issues with no actions take ACTIONED_ISSUE_COLOR = "#EDEEEF" RESOLVED_COLOR = "#0cbd4d" LEVEL_TO_COLOR = { "d...
30.259446
98
0.621077
from __future__ import absolute_import import logging from django.core.cache import cache from django.core.urlresolvers import reverse from sentry import http from sentry import tagstore from sentry.api.fields.actor import Actor from sentry.incidents.logic import get_incident_aggregates from sentry.incidents.models ...
0
0
0
0
0
8,725
0
338
497
89ad0ad6e43eff28375eb4a00e494e71c34c168e
4,472
py
Python
scripts/driver_2dmast.py
vandalt/ImPlaneIA
72b22e487ef45a8a665e4a6a88a91e99e382fdd0
[ "BSD-3-Clause" ]
6
2020-03-03T16:15:40.000Z
2022-03-23T16:15:09.000Z
scripts/driver_2dmast.py
vandalt/ImPlaneIA
72b22e487ef45a8a665e4a6a88a91e99e382fdd0
[ "BSD-3-Clause" ]
5
2020-02-03T17:46:59.000Z
2022-03-07T20:00:59.000Z
scripts/driver_2dmast.py
vandalt/ImPlaneIA
72b22e487ef45a8a665e4a6a88a91e99e382fdd0
[ "BSD-3-Clause" ]
1
2021-07-06T23:02:01.000Z
2021-07-06T23:02:01.000Z
#! /usr/bin/env python import os import numpy as np from astropy.io import fits import sys import matplotlib.pylab as plot from nrm_analysis.misctools import utils from nrm_analysis import nrm_core, InstrumentData np.set_printoptions(precision=4, linewidth=160) def examine_residuals(ff, trim=36): """ input: F...
41.407407
107
0.591682
#! /usr/bin/env python import os import numpy as np from astropy.io import fits from astropy import units as u import sys import string import matplotlib.pylab as plot import nrm_analysis from nrm_analysis.fringefitting.LG_Model import NRM_Model from nrm_analysis.misctools import utils from nrm_analysis import nrm_c...
0
0
0
0
0
0
0
101
154
6f9e31f93077a2ac8e6fd1a1ae12de1e4b7f82cc
3,168
py
Python
code/ReID_net/datasets/COCO/COCO_interactive.py
GeniusGaryant/PReMVOS
53c5fac37fb57429d0046b77a491009d7b81607f
[ "MIT" ]
null
null
null
code/ReID_net/datasets/COCO/COCO_interactive.py
GeniusGaryant/PReMVOS
53c5fac37fb57429d0046b77a491009d7b81607f
[ "MIT" ]
null
null
null
code/ReID_net/datasets/COCO/COCO_interactive.py
GeniusGaryant/PReMVOS
53c5fac37fb57429d0046b77a491009d7b81607f
[ "MIT" ]
null
null
null
import Constants as Constants
37.270588
106
0.648359
import random import numpy as np import tensorflow as tf import Constants as Constants from datasets.COCO.COCO_instance import COCOInstanceDataset from datasets.Util import Reader class COCOInteractiveDataset(COCOInstanceDataset): def __init__(self, config, subset, coord, fraction=1.0): super(COCOInteractive...
0
0
0
2,962
0
0
0
40
134
cb935a7319fb383e3ae5bc03e23311ed35d0a96d
11,029
py
Python
BatchLabelMap/automatic/pydicom/tests/test_data_manager.py
weras2/BatchLabelMap
56af3d20df79f6b10a5d932278a33d02020d1e59
[ "MIT" ]
null
null
null
BatchLabelMap/automatic/pydicom/tests/test_data_manager.py
weras2/BatchLabelMap
56af3d20df79f6b10a5d932278a33d02020d1e59
[ "MIT" ]
1
2020-11-26T19:53:16.000Z
2020-11-26T19:53:16.000Z
BatchLabelMap/automatic/pydicom/tests/test_data_manager.py
weras2/BatchLabelMap
56af3d20df79f6b10a5d932278a33d02020d1e59
[ "MIT" ]
null
null
null
# Copyright 2008-2020 pydicom authors. See LICENSE file for details. """Unit tests for pydicom.data_manager""" import json from pathlib import Path import pytest from pydicom.data import (fetch_data_files) from pydicom.data.data_manager import (DATA_ROOT, external_data_sources) from pydicom.data.download import (get...
34.901899
78
0.641128
# Copyright 2008-2020 pydicom authors. See LICENSE file for details. """Unit tests for pydicom.data_manager""" import json import os from os.path import basename from pathlib import Path import shutil import pytest from pydicom.data import ( get_charset_files, get_testdata_files, get_palette_files, fetch_data_fi...
0
6,462
0
2,540
0
0
0
136
180
ab0c317a25fe724c3540d5942e8e0369ebebbfa4
3,042
py
Python
app/temperatures/migrations/0001_initial.py
swelanauguste/comptechs-1.1
5da6975a1eb93ed39fb2467e5c1cd702fe5917c5
[ "MIT" ]
null
null
null
app/temperatures/migrations/0001_initial.py
swelanauguste/comptechs-1.1
5da6975a1eb93ed39fb2467e5c1cd702fe5917c5
[ "MIT" ]
null
null
null
app/temperatures/migrations/0001_initial.py
swelanauguste/comptechs-1.1
5da6975a1eb93ed39fb2467e5c1cd702fe5917c5
[ "MIT" ]
null
null
null
# Generated by Django 3.2.7 on 2021-12-04 01:15
55.309091
211
0.629191
# Generated by Django 3.2.7 on 2021-12-04 01:15 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] ope...
0
0
0
2,862
0
0
0
41
90
589f83e2f1598859d74597f3d8dc8e2adced7600
2,079
py
Python
epicteller/core/util/imghosting.py
KawashiroNitori/epicteller
264b11e7e6eb58beb0f67ecbbb811d268a533f7a
[ "MIT" ]
null
null
null
epicteller/core/util/imghosting.py
KawashiroNitori/epicteller
264b11e7e6eb58beb0f67ecbbb811d268a533f7a
[ "MIT" ]
null
null
null
epicteller/core/util/imghosting.py
KawashiroNitori/epicteller
264b11e7e6eb58beb0f67ecbbb811d268a533f7a
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import functools from qcloud_cos import CosConfig, CosS3Client from epicteller.core.config import Config config = CosConfig( Region=Config.COS_REGION, SecretId=Config.COS_SECRET_ID, SecretKey=Config.COS_SECRET_KEY, ) cos_client = CosS3Client(config) ge...
27.355263
79
0.679173
#!/usr/bin/env python # -*- coding: utf-8 -*- import base64 import functools import hashlib import imghdr import httpx from qcloud_cos import CosConfig, CosS3Client from epicteller.core.config import Config config = CosConfig( Region=Config.COS_REGION, SecretId=Config.COS_SECRET_ID, SecretKey=Config.COS_...
0
0
1,129
0
0
400
0
-32
204
341ac263a9dd42368f40c67ea90e97b6357b0d72
2,426
py
Python
sdk/identity/azure-identity/azure/identity/_internal/win_vscode_adapter.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
2,728
2015-01-09T10:19:32.000Z
2022-03-31T14:50:33.000Z
sdk/identity/azure-identity/azure/identity/_internal/win_vscode_adapter.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
17,773
2015-01-05T15:57:17.000Z
2022-03-31T23:50:25.000Z
sdk/identity/azure-identity/azure/identity/_internal/win_vscode_adapter.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
1,916
2015-01-19T05:05:41.000Z
2022-03-31T19:36:44.000Z
# ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ import logging import ctypes as ct try: import ctypes.wintypes as wt except (IOError, ValueError): pass _LOGGER = logging.getLogger(__name__) SUPPORTED_CREDKE...
31.102564
120
0.647568
# ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ import os import json import logging import ctypes as ct from .._constants import VSCODE_CREDENTIALS_SECTION try: import ctypes.wintypes as wt except (IOError, Valu...
0
0
0
461
0
1,101
0
8
158
e9339d70eb355b800703f5509494bc73b4cc3667
9,622
py
Python
Backend/autonomus/utils/populareAutomata.py
IrinaMBejan/Autonom
4a97da1b26ed22e3ec8bb939359148765392b692
[ "MIT" ]
2
2019-03-08T10:04:35.000Z
2020-03-14T15:24:56.000Z
Backend/autonomus/utils/populareAutomata.py
IrinaMBejan/Autonom
4a97da1b26ed22e3ec8bb939359148765392b692
[ "MIT" ]
null
null
null
Backend/autonomus/utils/populareAutomata.py
IrinaMBejan/Autonom
4a97da1b26ed22e3ec8bb939359148765392b692
[ "MIT" ]
2
2019-03-16T14:47:36.000Z
2020-04-28T14:09:45.000Z
from concurrent.futures import ThreadPoolExecutor executor = ThreadPoolExecutor(50000) meetUpHeaders = { 'Authorization': 'Bearer 48bafed7ddb40e635bf562959a48d0ba', 'Content-Type': 'application/json' } eventBrideHeaders = { 'Authorization': 'Bearer UQX3SCD7LBHRUIATU5BC', 'Content-Type':...
36.44697
148
0.536687
import datetime import pytz import json import string from urllib.request import Request, urlopen from autonomus.models import Tag, Event, Link,User from dateutil import parser from autonomus.controllers import tags_controller, events_controller import requests import re from autonomus.utils import sms from concurrent...
0
0
0
75
0
8,668
0
62
473
b0b8590b9f8d8697f3895891763688345f7c5907
4,473
py
Python
tvm/sandbox/testing/notepad.py
cmu-catalyst/collage
663d6df941f559f372c87ff9207bf7905e3eaca0
[ "Apache-2.0" ]
32
2021-12-09T07:55:32.000Z
2022-03-29T12:20:52.000Z
tvm/sandbox/testing/notepad.py
mikepapadim/collage-non-tvm-fork
fd2c7987359e2e4523d1de81bbb21f64bb3c8f75
[ "Apache-2.0" ]
null
null
null
tvm/sandbox/testing/notepad.py
mikepapadim/collage-non-tvm-fork
fd2c7987359e2e4523d1de81bbb21f64bb3c8f75
[ "Apache-2.0" ]
1
2021-12-17T11:25:17.000Z
2021-12-17T11:25:17.000Z
# from e2e_perf_logger import * # # memo_dic = E2EPerfLogger().read_dict_from_csv() # E2EPerfLogger().log_all_perf(memo_dic) # # def printa(text): # print(text + "-a") # # # class ABC(): # def __init__(self): # self.func = printa # # def wow(self): # self.func("WOW") # # a = ABC() # a.wow...
27.27439
163
0.642969
# from e2e_perf_logger import * # # memo_dic = E2EPerfLogger().read_dict_from_csv() # E2EPerfLogger().log_all_perf(memo_dic) # # def printa(text): # print(text + "-a") # # # class ABC(): # def __init__(self): # self.func = printa # # def wow(self): # self.func("WOW") # # a = ABC() # a.wow...
4
0
0
0
0
0
0
0
0
6f1dfa2e61338451ee70d48ccd156b42cba5b7fa
791
py
Python
src/categories/admin.py
evis-market/web-interface-backend
f8930ff1c009ad18e522ab29680b4bcd50a6020e
[ "MIT" ]
2
2021-08-30T22:58:32.000Z
2021-12-12T10:47:52.000Z
src/categories/admin.py
evis-market/web-interface-backend
f8930ff1c009ad18e522ab29680b4bcd50a6020e
[ "MIT" ]
null
null
null
src/categories/admin.py
evis-market/web-interface-backend
f8930ff1c009ad18e522ab29680b4bcd50a6020e
[ "MIT" ]
1
2021-08-22T19:12:44.000Z
2021-08-22T19:12:44.000Z
from django.contrib import admin from categories.models import Category, RecommendedFor admin.site.register(Category, CategoryAdmin) admin.site.register(RecommendedFor, RecommendedForAdmin)
27.275862
74
0.735777
from django.contrib import admin from django_admin_listfilter_dropdown.filters import RelatedDropdownFilter from mptt.admin import MPTTModelAdmin from categories.models import Category, RecommendedFor class CategoryAdmin(MPTTModelAdmin): """ Class representing category admin Attributes: list_display...
0
0
0
437
0
0
0
69
90
53ea60ae4820953621f064d7250baacb7429c36b
2,506
py
Python
src/fparser/two/tests/fortran2003/test_program_stmt_r1102.py
martin-schlipf/fparser
95da2f617a4b448e11c1a001e3185faaf93f67ba
[ "BSD-3-Clause" ]
null
null
null
src/fparser/two/tests/fortran2003/test_program_stmt_r1102.py
martin-schlipf/fparser
95da2f617a4b448e11c1a001e3185faaf93f67ba
[ "BSD-3-Clause" ]
null
null
null
src/fparser/two/tests/fortran2003/test_program_stmt_r1102.py
martin-schlipf/fparser
95da2f617a4b448e11c1a001e3185faaf93f67ba
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2018 Science and Technology Facilities Council # All rights reserved. # Modifications made as part of the fparser project are distributed # under the following license: # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following condi...
40.419355
73
0.749002
# Copyright (c) 2018 Science and Technology Facilities Council # All rights reserved. # Modifications made as part of the fparser project are distributed # under the following license: # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following condi...
0
0
0
0
0
0
0
0
0
9399d6860eb65a749d984d6cbd5e7041d55a6f6c
3,128
py
Python
lib_utils/tests/test_file_funcs.py
jfuruness/lib_utils
41e0a4f71044645f24ea6558bf92224f1173c79d
[ "BSD-3-Clause" ]
1
2021-09-27T14:14:18.000Z
2021-09-27T14:14:18.000Z
lib_utils/tests/test_file_funcs.py
jfuruness/lib_utils
41e0a4f71044645f24ea6558bf92224f1173c79d
[ "BSD-3-Clause" ]
null
null
null
lib_utils/tests/test_file_funcs.py
jfuruness/lib_utils
41e0a4f71044645f24ea6558bf92224f1173c79d
[ "BSD-3-Clause" ]
null
null
null
from .. import file_funcs
28.697248
70
0.555627
from pathlib import Path import pytest from .. import file_funcs @pytest.mark.file_funcs class TestFileFuncs: """Tests all funcs in file_funcs""" @pytest.mark.skip(reason="New hire work") def test_temp_path(self): pass def test_delete_files(self, tmp_path: Path): """Tests the delet...
0
3,037
0
0
0
0
0
-5
68
1975e7ebc5d36658def7e702cc396501ea42f874
7,623
py
Python
hummingbot/connector/exchange/binance/binance_api_user_stream_data_source.py
cclauss/hummingbot
441041faac0d5e9f06fafef0f625ab1f19642371
[ "Apache-2.0" ]
11
2020-09-15T08:21:59.000Z
2022-03-19T05:06:59.000Z
hummingbot/connector/exchange/binance/binance_api_user_stream_data_source.py
cclauss/hummingbot
441041faac0d5e9f06fafef0f625ab1f19642371
[ "Apache-2.0" ]
null
null
null
hummingbot/connector/exchange/binance/binance_api_user_stream_data_source.py
cclauss/hummingbot
441041faac0d5e9f06fafef0f625ab1f19642371
[ "Apache-2.0" ]
5
2020-09-18T12:59:31.000Z
2021-06-27T01:46:16.000Z
#!/usr/bin/env python
45.106509
136
0.619835
#!/usr/bin/env python import asyncio import aiohttp import logging import time import ujson import websockets import hummingbot.connector.exchange.binance.binance_constants as CONSTANTS from binance.client import Client as BinanceClient from typing import ( AsyncIterable, Dict, Optional, Tuple, ) fr...
0
329
5,528
1,077
0
0
0
331
335
900d6a2d0998da38a55cb405be354080354675b6
1,473
py
Python
modules/pel/hexdump.py
zane131/openpower-pel-parsers
0fcba2fc006edf385c83b961384f9153ea6a1015
[ "Apache-2.0" ]
1
2021-08-10T21:50:07.000Z
2021-08-10T21:50:07.000Z
modules/pel/hexdump.py
zane131/openpower-pel-parsers
0fcba2fc006edf385c83b961384f9153ea6a1015
[ "Apache-2.0" ]
1
2022-03-29T22:02:34.000Z
2022-03-29T22:02:34.000Z
modules/pel/hexdump.py
zane131/openpower-pel-parsers
0fcba2fc006edf385c83b961384f9153ea6a1015
[ "Apache-2.0" ]
2
2021-11-30T23:16:06.000Z
2022-03-23T10:18:36.000Z
import math def hexdump(data: memoryview, bytes_per_line: int = 16, bytes_per_chunk: int = 4) -> list: """ Returns a list of strings. Each entry will be one line of the hex dump from the given data. """ # Allowing the flexibility for whatever size dump is needed, but still ...
28.882353
79
0.580448
import math def hexdump(data: memoryview, bytes_per_line: int = 16, bytes_per_chunk: int = 4) -> list: """ Returns a list of strings. Each entry will be one line of the hex dump from the given data. """ # Allowing the flexibility for whatever size dump is needed, but still ...
0
0
0
0
0
0
0
0
0
baae399e16885bab5c4b2cf2013734a4f919c6bf
363
py
Python
poll/migrations/0004_auto_20210321_1554.py
Rob-T-98/take-home-poll
14420971620b440309f7366f5999d61ab7b50598
[ "MIT" ]
null
null
null
poll/migrations/0004_auto_20210321_1554.py
Rob-T-98/take-home-poll
14420971620b440309f7366f5999d61ab7b50598
[ "MIT" ]
null
null
null
poll/migrations/0004_auto_20210321_1554.py
Rob-T-98/take-home-poll
14420971620b440309f7366f5999d61ab7b50598
[ "MIT" ]
null
null
null
# Generated by Django 3.1.7 on 2021-03-21 15:54
19.105263
47
0.584022
# Generated by Django 3.1.7 on 2021-03-21 15:54 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('poll', '0003_auto_20210321_1553'), ] operations = [ migrations.RenameField( model_name='answers', old_name='question3', ...
0
0
0
257
0
0
0
11
46
8653d2c4f477b86bb5a0e7de6a44b76b495a36ca
3,528
py
Python
src/Python/GeometricObjects/ColoredLines.py
ajpmaclean/vtk-examples
1a55fc8c6af67a3c07791807c7d1ec0ab97607a2
[ "Apache-2.0" ]
81
2020-08-10T01:44:30.000Z
2022-03-23T06:46:36.000Z
src/Python/GeometricObjects/ColoredLines.py
ajpmaclean/vtk-examples
1a55fc8c6af67a3c07791807c7d1ec0ab97607a2
[ "Apache-2.0" ]
2
2020-09-12T17:33:52.000Z
2021-04-15T17:33:09.000Z
src/Python/GeometricObjects/ColoredLines.py
ajpmaclean/vtk-examples
1a55fc8c6af67a3c07791807c7d1ec0ab97607a2
[ "Apache-2.0" ]
27
2020-08-17T07:09:30.000Z
2022-02-15T03:44:58.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # noinspection PyUnresolvedReferences import vtkmodules.vtkInteractionStyle # noinspection PyUnresolvedReferences if __name__ == '__main__': main()
31.783784
104
0.719671
#!/usr/bin/env python # -*- coding: utf-8 -*- # noinspection PyUnresolvedReferences import vtkmodules.vtkInteractionStyle # noinspection PyUnresolvedReferences import vtkmodules.vtkRenderingOpenGL2 from vtkmodules.vtkCommonColor import vtkNamedColors from vtkmodules.vtkCommonCore import ( vtkPoints, vtkUnsigne...
0
0
0
0
0
2,889
0
304
133
3ecd03a67aac58e122fe61f0feed59498b397041
741
py
Python
arvestust/views/file_list.py
lehvitus/arvestust
2d508317b744eaf12a643a398ff95723893a046a
[ "BSD-3-Clause" ]
1
2021-09-17T23:45:27.000Z
2021-09-17T23:45:27.000Z
arvestust/views/file_list.py
lehvitus/arvestust
2d508317b744eaf12a643a398ff95723893a046a
[ "BSD-3-Clause" ]
3
2020-07-25T05:40:54.000Z
2020-08-11T04:01:19.000Z
arvestust/views/file_list.py
lehvitus/arvestust
2d508317b744eaf12a643a398ff95723893a046a
[ "BSD-3-Clause" ]
null
null
null
from django.urls import path from .urls import urlpatterns urlpatterns.append( path('files/', FileListView.as_view(), name='file-list') )
25.551724
60
0.704453
from django.utils import timezone from django.views.generic import ListView from django.contrib.auth.mixins import LoginRequiredMixin from django.urls import path from .urls import urlpatterns from ..models import File class FileListView(LoginRequiredMixin, ListView): model = File context_object_name = 'files...
0
0
0
413
0
0
0
72
111
652072ad69b540b291928fe7404d455c42057cf1
5,380
py
Python
chatbot/routes.py
Karan-Malik/Chatbot
93a7b8180f0c6832211a7444eb4b4e2dc6c31c95
[ "MIT" ]
30
2020-06-16T08:46:36.000Z
2022-03-23T20:03:25.000Z
chatbot/routes.py
TharukRenuja/Chatbot
93a7b8180f0c6832211a7444eb4b4e2dc6c31c95
[ "MIT" ]
2
2020-09-15T08:43:33.000Z
2021-12-17T15:50:25.000Z
chatbot/routes.py
TharukRenuja/Chatbot
93a7b8180f0c6832211a7444eb4b4e2dc6c31c95
[ "MIT" ]
15
2020-11-15T16:18:28.000Z
2022-03-23T12:33:52.000Z
from nltk.stem import WordNetLemmatizer lemmatizer=WordNetLemmatizer() #Predict
29.398907
108
0.596654
from chatbot import app from flask import render_template,flash, request from chatbot.forms import chatbotform from chatbot.__init__ import model,words,classes,intents import nltk import pickle import json import numpy as np from keras.models import Sequential,load_model import random from datetime import datetime imp...
0
324
0
0
0
4,362
0
29
580
36319251989eaeef405b48ab8e7967cfc386441b
173
py
Python
appr/models/kv/etcd/__init__.py
sergeyberezansky/appr
03168addf05c3efd779dad5168fb0a80d0512100
[ "Apache-2.0" ]
31
2017-07-05T07:25:31.000Z
2021-01-18T22:21:57.000Z
appr/models/kv/etcd/__init__.py
sergeyberezansky/appr
03168addf05c3efd779dad5168fb0a80d0512100
[ "Apache-2.0" ]
48
2017-06-27T15:48:29.000Z
2021-01-26T21:02:27.000Z
appr/models/kv/etcd/__init__.py
sergeyberezansky/appr
03168addf05c3efd779dad5168fb0a80d0512100
[ "Apache-2.0" ]
17
2017-07-05T07:25:38.000Z
2021-01-20T14:52:29.000Z
import os ETCD_HOST = os.getenv("ETCD_HOST", "localhost") etcd_client = EtcdClient(host=ETCD_HOST, port=2379)
15.727273
51
0.751445
import os import etcd class EtcdClient(etcd.client.Client): pass ETCD_HOST = os.getenv("ETCD_HOST", "localhost") etcd_client = EtcdClient(host=ETCD_HOST, port=2379)
0
0
0
25
0
0
0
-10
45
4ba27d800bbac38bf2cb7bead5520cf5c049bafa
8,293
py
Python
app.py
sharksmhi/flask_station_app
b1e0e712c5a5bdd5a51b2667f61946d2d8063387
[ "MIT" ]
null
null
null
app.py
sharksmhi/flask_station_app
b1e0e712c5a5bdd5a51b2667f61946d2d8063387
[ "MIT" ]
null
null
null
app.py
sharksmhi/flask_station_app
b1e0e712c5a5bdd5a51b2667f61946d2d8063387
[ "MIT" ]
null
null
null
#!/usr/bin/env python # Copyright (c) 2022 SMHI, Swedish Meteorological and Hydrological Institute. # License: MIT License (see LICENSE.txt or http://opensource.org/licenses/mit). """ Created on 2022-02-24 14:51 @author: johannes """ from flask import (Flask) import os import shutil import sys import glob import datet...
29.512456
79
0.611118
#!/usr/bin/env python # Copyright (c) 2022 SMHI, Swedish Meteorological and Hydrological Institute. # License: MIT License (see LICENSE.txt or http://opensource.org/licenses/mit). """ Created on 2022-02-24 14:51 @author: johannes """ import flask from flask import ( Flask, render_template, flash, reque...
0
3,274
0
0
0
0
0
88
316
b11e4b4580cf808a4345f7aaca4c42893d85f11c
6,243
py
Python
app.py
leigh-jewell/dnaspaces-iot-services-demo
ddd95cc09cf3885605c903fb1eb112093ba48da3
[ "MIT" ]
null
null
null
app.py
leigh-jewell/dnaspaces-iot-services-demo
ddd95cc09cf3885605c903fb1eb112093ba48da3
[ "MIT" ]
null
null
null
app.py
leigh-jewell/dnaspaces-iot-services-demo
ddd95cc09cf3885605c903fb1eb112093ba48da3
[ "MIT" ]
1
2021-12-13T04:11:39.000Z
2021-12-13T04:11:39.000Z
from flask import Flask app = Flask(__name__) global_token = "" if __name__ == '__main__': app.run()
47.295455
119
0.527791
from flask import Flask, render_template, request import requests import json from datetime import datetime import csv from activate import process_activation app = Flask(__name__) global_token = "" @app.route('/activate', methods=['GET', 'POST']) def activate_app(): global global_token api_token = "" if...
0
5,734
0
0
0
170
0
25
202
f1af4232977e54da754fef857ae2acf42d6a1cde
13,928
py
Python
geoevents/operations/urls.py
mcenirm/geoevents
f78cc09b8bcc8c6e4eee0d1de14e5becad7d49e6
[ "MIT" ]
null
null
null
geoevents/operations/urls.py
mcenirm/geoevents
f78cc09b8bcc8c6e4eee0d1de14e5becad7d49e6
[ "MIT" ]
null
null
null
geoevents/operations/urls.py
mcenirm/geoevents
f78cc09b8bcc8c6e4eee0d1de14e5becad7d49e6
[ "MIT" ]
null
null
null
# This technical data was produced for the U. S. Government under Contract No. W15P7T-13-C-F600, and # is subject to the Rights in Technical Data-Noncommercial Items clause at DFARS 252.227-7013 (FEB 2012) from django.conf.urls import url from django.core.urlresolvers import reverse_lazy from django.contrib.auth.decor...
72.921466
136
0.461086
# This technical data was produced for the U. S. Government under Contract No. W15P7T-13-C-F600, and # is subject to the Rights in Technical Data-Noncommercial Items clause at DFARS 252.227-7013 (FEB 2012) from django.conf.urls import patterns, url from django.core.urlresolvers import reverse_lazy from django.contrib....
0
0
0
0
0
0
0
16
0
5d46e541daebb08b6177b57997de8690e59f69c8
1,307
py
Python
step2.py
theIsaacLim/hakdPizza
0471dc6ee9fc049bd10f0a8aa9d707f2c0388fc5
[ "MIT" ]
null
null
null
step2.py
theIsaacLim/hakdPizza
0471dc6ee9fc049bd10f0a8aa9d707f2c0388fc5
[ "MIT" ]
null
null
null
step2.py
theIsaacLim/hakdPizza
0471dc6ee9fc049bd10f0a8aa9d707f2c0388fc5
[ "MIT" ]
null
null
null
# ===STEP 2=== # from selenium import webdriver from time import sleep # Sleep will pause the program import os # for getting the local path dirpath = os.getcwd() # gets local path driver = webdriver.Chrome(dirpath + "/chromedriver") driver.get("http://www.dominos.com.cn/menu/menu.html?menuIndex=0&RNDSEED=c429056...
40.84375
128
0.751339
# ===STEP 2=== # from selenium import webdriver from time import sleep # Sleep will pause the program import os # for getting the local path dirpath = os.getcwd() # gets local path driver = webdriver.Chrome(dirpath + "/chromedriver") driver.get("http://www.dominos.com.cn/menu/menu.html?menuIndex=0&RNDSEED=c429056...
0
0
0
0
0
0
0
0
0
cdf32b378197c2978d914ebd74942abb2cc9a4ce
965
py
Python
project/staticpages/migrations/0001_initial.py
NIEHS/orio-web
3ad29fa80cf8d19bbe0f60e2aa85a2edf2d504bc
[ "MIT" ]
null
null
null
project/staticpages/migrations/0001_initial.py
NIEHS/orio-web
3ad29fa80cf8d19bbe0f60e2aa85a2edf2d504bc
[ "MIT" ]
5
2017-02-21T19:52:08.000Z
2021-08-24T15:12:06.000Z
project/staticpages/migrations/0001_initial.py
shapiromatron/orio-web
3ad29fa80cf8d19bbe0f60e2aa85a2edf2d504bc
[ "MIT" ]
1
2021-04-21T10:39:37.000Z
2021-04-21T10:39:37.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2016-09-07 15:40 from __future__ import unicode_literals
30.15625
114
0.572021
# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2016-09-07 15:40 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Page',...
0
0
0
786
0
0
0
19
46
65d503903b8bec3ab20bd1915618dbd467710207
211
py
Python
python-package/insightface/thirdparty/face3d/mesh_numpy/__init__.py
qaz734913414/insightface
4101fe608ca1d38604a23d53f32314ce8a28fe79
[ "MIT" ]
12,377
2017-12-04T02:46:57.000Z
2022-03-31T16:48:31.000Z
python-package/insightface/thirdparty/face3d/mesh_numpy/__init__.py
qaz734913414/insightface
4101fe608ca1d38604a23d53f32314ce8a28fe79
[ "MIT" ]
1,851
2017-12-05T05:41:23.000Z
2022-03-30T13:06:22.000Z
python-package/insightface/thirdparty/face3d/mesh_numpy/__init__.py
qaz734913414/insightface
4101fe608ca1d38604a23d53f32314ce8a28fe79
[ "MIT" ]
4,198
2017-12-05T02:57:19.000Z
2022-03-30T10:29:37.000Z
from __future__ import absolute_import from __future__ import division from __future__ import print_function
19.181818
38
0.815166
from __future__ import absolute_import from __future__ import division from __future__ import print_function from . import io from . import vis from . import transform from . import light from . import render
0
0
0
0
0
0
0
-10
111
c8a5ed968723e875f0ecf76315b11f6f69a23263
1,174
py
Python
saddle.py
JustGk/fds
3ea5017df8f51d7adf4af1ad07dcf5e4ea55fef9
[ "Apache-2.0" ]
null
null
null
saddle.py
JustGk/fds
3ea5017df8f51d7adf4af1ad07dcf5e4ea55fef9
[ "Apache-2.0" ]
null
null
null
saddle.py
JustGk/fds
3ea5017df8f51d7adf4af1ad07dcf5e4ea55fef9
[ "Apache-2.0" ]
null
null
null
# Driver method if __name__ == '__main__': mat = [[1, 2, 3], [4, 5, 6], [7, 18, 14]]; n = 3; if (findSaddlePoint(mat, n) == False): print("No Saddle Po");
23.959184
44
0.437819
def findSaddlePoint(mat, n): # Process all rows one # by one for i in range(n): # Find the minimum element # of row i. # Also find column index of # the minimum element min_row = mat[i][0]; col_ind = 0; for j in range(1, n): if...
0
0
0
0
0
927
0
0
23
af5f2f732ebea62c2d2cb5e8a7664705f1035022
2,001
py
Python
core/consumer/consumer.py
ayushkalani/bitcoin-streamer
ed66e25fac661c7ed239b8c32ef7ae916f514d3a
[ "MIT" ]
null
null
null
core/consumer/consumer.py
ayushkalani/bitcoin-streamer
ed66e25fac661c7ed239b8c32ef7ae916f514d3a
[ "MIT" ]
null
null
null
core/consumer/consumer.py
ayushkalani/bitcoin-streamer
ed66e25fac661c7ed239b8c32ef7ae916f514d3a
[ "MIT" ]
null
null
null
import sys import os import traceback import json PACKAGE_ROOT = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) sys.path.insert(0,PACKAGE_ROOT) from commons.logger import Logger logger = Logger().get_logger("test") if __name__ == "__main__": consumer = Consumer() while True: co...
38.480769
115
0.61969
import sys import os import time, traceback import json PACKAGE_ROOT = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) sys.path.insert(0,PACKAGE_ROOT) from commons.logger import Logger from config.initializers import KAFKA_BROKER, KAFKA_TOPIC,KAFKA_CONSUMER_GROUP_ID from kafka import KafkaC...
0
0
0
882
0
0
0
76
67
78d8cf0b5c8877caa217dd7c395e5220313a7566
5,178
py
Python
launch_testing/launch_testing/legacy/output.py
pal-robotics-forks/launch
9a0a01924cd88f832c5a50903553ddcec6ef648d
[ "Apache-2.0" ]
67
2015-06-12T21:17:24.000Z
2022-03-30T07:19:52.000Z
launch_testing/launch_testing/legacy/output.py
pal-robotics-forks/launch
9a0a01924cd88f832c5a50903553ddcec6ef648d
[ "Apache-2.0" ]
516
2015-03-20T02:22:59.000Z
2022-03-30T12:33:33.000Z
launch_testing/launch_testing/legacy/output.py
pal-robotics-forks/launch
9a0a01924cd88f832c5a50903553ddcec6ef648d
[ "Apache-2.0" ]
101
2016-01-12T16:56:54.000Z
2022-03-09T12:35:37.000Z
# Copyright 2018 Open Source Robotics Foundation, 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...
37.79562
94
0.715527
# Copyright 2018 Open Source Robotics Foundation, 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...
0
0
0
0
0
1,753
0
4
225
374532031f4115e45e4ec9177352aa150bf5a649
615
py
Python
src/vbr/api/status.py
a2cps/python-vbr
9d5d4480386d0530450d59157e0da6937320f928
[ "BSD-3-Clause" ]
1
2021-05-26T19:08:29.000Z
2021-05-26T19:08:29.000Z
src/vbr/api/status.py
a2cps/python-vbr
9d5d4480386d0530450d59157e0da6937320f928
[ "BSD-3-Clause" ]
7
2021-05-04T13:12:39.000Z
2022-03-09T21:04:33.000Z
src/vbr/api/status.py
a2cps/python-vbr
9d5d4480386d0530450d59157e0da6937320f928
[ "BSD-3-Clause" ]
2
2021-04-20T14:46:52.000Z
2021-06-07T20:28:28.000Z
__all__ = ["StatusApi"]
32.368421
82
0.621138
from vbr.tableclasses import Status __all__ = ["StatusApi"] class StatusApi(object): def get_status(self, pkid: str) -> Status: """Retrieve a Status by primary identifier.""" return self._get_row_from_table_with_id("status", pkid) def get_status_by_name(self, name: str) -> Status: ""...
0
0
0
530
0
0
0
14
45
2ec0b542963219116fb259b3f3a069857678c2a5
1,573
py
Python
tflmlib/ProgressBar.py
bjascob/SmartLMVocabs
9989cccc67387d38fc829f34022c66a7d9bba415
[ "Apache-2.0" ]
10
2019-04-10T09:44:10.000Z
2021-05-03T21:13:44.000Z
tflmlib/ProgressBar.py
bjascob/SmartLMVocabs
9989cccc67387d38fc829f34022c66a7d9bba415
[ "Apache-2.0" ]
null
null
null
tflmlib/ProgressBar.py
bjascob/SmartLMVocabs
9989cccc67387d38fc829f34022c66a7d9bba415
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 Brad Jascob # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
32.770833
74
0.621742
# Copyright 2018 Brad Jascob # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
0
0
0
964
0
0
0
-11
45
e307a3308b0e34af808256803ed6a23eacd61291
10,455
py
Python
Algorithm.Python/stubs/QuantConnect/Data/__Fundamental_43.py
gaoxiaojun/Lean
9dca43bccb720d0df91e4bfc1d363b71e3a36cb5
[ "Apache-2.0" ]
2
2020-12-08T11:27:20.000Z
2021-04-06T13:21:15.000Z
Algorithm.Python/stubs/QuantConnect/Data/__Fundamental_43.py
gaoxiaojun/Lean
9dca43bccb720d0df91e4bfc1d363b71e3a36cb5
[ "Apache-2.0" ]
null
null
null
Algorithm.Python/stubs/QuantConnect/Data/__Fundamental_43.py
gaoxiaojun/Lean
9dca43bccb720d0df91e4bfc1d363b71e3a36cb5
[ "Apache-2.0" ]
1
2020-12-08T11:27:21.000Z
2020-12-08T11:27:21.000Z
import System.IO import System.Collections.Generic import QuantConnect.Data.Fundamental.MultiPeriodField import QuantConnect.Data.Fundamental import QuantConnect.Data
29.367978
167
0.732281
from .__Fundamental_44 import * import typing import System.IO import System.Collections.Generic import System import QuantConnect.Data.Fundamental.MultiPeriodField import QuantConnect.Data.Fundamental import QuantConnect.Data import QuantConnect import datetime class NetLongTermDebtIssuanceCashFlowStatement(QuantCon...
0
0
0
9,904
0
0
0
-14
386
e300b0e6276c0569cc88bd35916647f237e326a9
20,675
py
Python
du/denv/App.py
spiricn/DevUtils
58a035a08a7c58035c25f992c1b8aa33cc997cd2
[ "MIT" ]
1
2021-12-21T13:18:08.000Z
2021-12-21T13:18:08.000Z
du/denv/App.py
spiricn/DevUtils
58a035a08a7c58035c25f992c1b8aa33cc997cd2
[ "MIT" ]
null
null
null
du/denv/App.py
spiricn/DevUtils
58a035a08a7c58035c25f992c1b8aa33cc997cd2
[ "MIT" ]
null
null
null
import logging import sys import subprocess # Host platform string for Windows PLATFORM_OS_WIN32 = "win32" # Host platform string for Linux PLATFORM_OS_LINUX = "linux" # Host platform string for MAC OS PLATFORM_OS_MACOS = "darwin" try: import cmd2 except ModuleNotFoundError: if sys.platform == PLATFORM_OS_W...
33.672638
142
0.603869
import argparse import logging import sys import os import traceback import time import subprocess import getpass import datetime from inspect import getfullargspec from argparse import RawTextHelpFormatter from du.denv.Denv import Denv from du.denv.Denv import ErrCodes # Host platform string for Windows PLATFORM_OS_...
0
8,669
0
9,206
0
308
0
7
317
62f0422e7fc485af770292e413ed7fd5dcb4d569
622
py
Python
stunning/constants.py
Ahuge/stunning-barnacle
b672521ba3f901f87dd1bdecb1c886bd575ddb5e
[ "MIT" ]
1
2018-09-11T11:15:10.000Z
2018-09-11T11:15:10.000Z
stunning/constants.py
Ahuge/stunning-barnacle
b672521ba3f901f87dd1bdecb1c886bd575ddb5e
[ "MIT" ]
null
null
null
stunning/constants.py
Ahuge/stunning-barnacle
b672521ba3f901f87dd1bdecb1c886bd575ddb5e
[ "MIT" ]
null
null
null
# For tokens ONE_OR_MORE = "+" OR = "|" # Reserved is a generic keyword type. # Meant to be a builtin for the TCL syntax. RESERVED = "RESERVED" # Ignore is a flag for characters that don't have functional impact on the TCL source. # We are using it quite liberally to ignore all whitespace and newline characters. IGNO...
27.043478
86
0.728296
# For tokens ONE_OR_MORE = "+" OR = "|" # Reserved is a generic keyword type. # Meant to be a builtin for the TCL syntax. RESERVED = "RESERVED" # Ignore is a flag for characters that don't have functional impact on the TCL source. # We are using it quite liberally to ignore all whitespace and newline characters. IGNO...
0
0
0
0
0
0
0
0
0
9d2aa63e47154382cafdd20eab87bb534ccd872b
43
py
Python
LiBis/test/test.py
biobai/LiBis
e334cd14de2d365943c2f4edbc36505901f01df1
[ "MIT" ]
null
null
null
LiBis/test/test.py
biobai/LiBis
e334cd14de2d365943c2f4edbc36505901f01df1
[ "MIT" ]
null
null
null
LiBis/test/test.py
biobai/LiBis
e334cd14de2d365943c2f4edbc36505901f01df1
[ "MIT" ]
null
null
null
import os print(os.path.abspath(__file__))
14.333333
32
0.790698
import os print(os.path.abspath(__file__))
0
0
0
0
0
0
0
0
0
b672251263d4b6c2f9b360b0bc4c1c3a484696e6
2,300
py
Python
craid/eddb/base/Aware.py
HausReport/ClubRaiders
88bd64d2512302ca2b391b48979b6e88b092eb92
[ "BSD-3-Clause" ]
null
null
null
craid/eddb/base/Aware.py
HausReport/ClubRaiders
88bd64d2512302ca2b391b48979b6e88b092eb92
[ "BSD-3-Clause" ]
2
2020-05-28T13:30:08.000Z
2020-06-02T14:12:04.000Z
craid/eddb/base/Aware.py
HausReport/ClubRaiders
88bd64d2512302ca2b391b48979b6e88b092eb92
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2020 Club Raiders Project # https://github.com/HausReport/ClubRaiders # # SPDX-License-Identifier: BSD-3-Clause # # SPDX-License-Identifier: BSD-3-Clause
34.848485
80
0.675217
# Copyright (c) 2020 Club Raiders Project # https://github.com/HausReport/ClubRaiders # # SPDX-License-Identifier: BSD-3-Clause # # SPDX-License-Identifier: BSD-3-Clause from typing import Dict from craid.eddb.base.NamedItem import NamedItem class Aware(NamedItem): systemsDict: Dict[int, object] = None ...
0
1,405
0
619
0
0
0
28
69
5d84ce0016ef2ab7533abc3790d6943d1685bb5e
2,190
py
Python
rest_framework_social_oauth2/backends.py
amolc2iq/rest_oauth_social
155087d04866f08dd3fae3ec27ec6710bd9895f8
[ "MIT" ]
null
null
null
rest_framework_social_oauth2/backends.py
amolc2iq/rest_oauth_social
155087d04866f08dd3fae3ec27ec6710bd9895f8
[ "MIT" ]
null
null
null
rest_framework_social_oauth2/backends.py
amolc2iq/rest_oauth_social
155087d04866f08dd3fae3ec27ec6710bd9895f8
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- try: from django.urls import reverse except ImportError: # Will be removed in Django 2.0
39.107143
147
0.634247
# -*- coding: utf-8 -*- try: from django.urls import reverse except ImportError: # Will be removed in Django 2.0 from django.core.urlresolvers import reverse from social_core.backends.oauth import BaseOAuth2 from .settings import DRFSO2_PROPRIETARY_BACKEND_NAME, DRFSO2_URL_NAMESPACE from oauth2_provider.mod...
0
0
0
1,727
0
0
0
178
161
360b8523764af851cd61d83a77e2c5dc4be8e3d9
5,363
py
Python
tests/unit/test_CXDataFrameData.py
docinfosci/canvasxpress-python
532a981b04d0f50bbde1852c695117a6220f4589
[ "MIT" ]
4
2021-03-18T17:23:40.000Z
2022-02-01T19:07:01.000Z
tests/unit/test_CXDataFrameData.py
docinfosci/canvasxpress-python
532a981b04d0f50bbde1852c695117a6220f4589
[ "MIT" ]
8
2021-04-30T20:46:57.000Z
2022-03-10T07:25:31.000Z
tests/unit/test_CXDataFrameData.py
docinfosci/canvasxpress-python
532a981b04d0f50bbde1852c695117a6220f4589
[ "MIT" ]
1
2022-02-03T00:35:14.000Z
2022-02-03T00:35:14.000Z
from io import StringIO import pandas from pandas import DataFrame # Required for eval FORCE_INCLUDE_DATAFRAME_IN_PYCHARM = DataFrame() # Prevents clean=up removal csv_sample = """ "C1","C2","C3" 1,2,3 4,5,6 """ df_sample = pandas.read_csv( StringIO(csv_sample), index_col=False )
29.146739
79
0.716763
import json from copy import copy, deepcopy from io import StringIO import pandas from pandas import DataFrame # Required for eval FORCE_INCLUDE_DATAFRAME_IN_PYCHARM = DataFrame() # Prevents clean=up removal import pytest from deepdiff import DeepDiff from hypothesis import given from hypothesis.extra.pandas impor...
0
1,922
0
0
0
2,570
0
110
454
ba8a7b5e41582cc51a9237727b454acf501ca6df
490
py
Python
fin_model_course/gradetools/config.py
whoopnip/fin-model-course
e6c5ae313bba601c4aca0f334818b61cc0393118
[ "MIT" ]
5
2020-08-29T15:28:39.000Z
2021-12-01T16:53:25.000Z
fin_model_course/gradetools/config.py
whoopnip/fin-model-course
e6c5ae313bba601c4aca0f334818b61cc0393118
[ "MIT" ]
16
2020-02-26T16:03:47.000Z
2021-06-15T15:17:37.000Z
fin_model_course/gradetools/config.py
whoopnip/fin-model-course
e6c5ae313bba601c4aca0f334818b61cc0393118
[ "MIT" ]
3
2021-01-22T19:38:36.000Z
2021-09-28T08:14:00.000Z
import os from gradetools.py.execute2.insert import InsertConfig PYTHON_EXTENSIONS = ('ipynb', 'py') EXCEL_EXTENSIONS = ('xlsx', 'xls', 'xlsm') PYTHON_FOLDER = os.path.sep.join(['Grading', 'Python']) PYTHON_PLAGIARISM_FOLDER = os.path.sep.join([PYTHON_FOLDER, 'Plagiarism']) EXCEL_FOLDER = os.path.sep.join(['Grading',...
25.789474
74
0.644898
import os from gradetools.py.execute2.insert import InsertConfig PYTHON_EXTENSIONS = ('ipynb', 'py') EXCEL_EXTENSIONS = ('xlsx', 'xls', 'xlsm') PYTHON_FOLDER = os.path.sep.join(['Grading', 'Python']) PYTHON_PLAGIARISM_FOLDER = os.path.sep.join([PYTHON_FOLDER, 'Plagiarism']) EXCEL_FOLDER = os.path.sep.join(['Grading',...
0
0
0
0
0
0
0
0
0
6a58d9ece833fd04526901d65cd8db9a3c1ebcf5
363
py
Python
008 Selection Sort/Selection_Sort.py
Iftakharpy/AlgoExpert-Questions
f4aef449bfe0ee651d84a92487c3b3bedb3aa739
[ "Apache-2.0" ]
3
2021-11-19T07:32:27.000Z
2022-03-22T13:46:27.000Z
008 Selection Sort/Selection_Sort.py
Iftakharpy/AlgoExpert-Questions
f4aef449bfe0ee651d84a92487c3b3bedb3aa739
[ "Apache-2.0" ]
null
null
null
008 Selection Sort/Selection_Sort.py
Iftakharpy/AlgoExpert-Questions
f4aef449bfe0ee651d84a92487c3b3bedb3aa739
[ "Apache-2.0" ]
5
2022-01-02T11:51:12.000Z
2022-03-22T13:53:32.000Z
# time O(n^2) # space O(1)
33
78
0.600551
# time O(n^2) # space O(1) def selectionSort(array): for swap_with in range(len(array)-1): smallest = swap_with for finder in range(swap_with, len(array)): if array[finder] < array[smallest]: smallest = finder array[swap_with], array[smallest] = array[smal...
0
0
0
0
0
311
0
0
23
609f70b6266c3554f665f6c1366c16fe9b9c160b
881
py
Python
aula19.py
GantzLorran/Python
ce6073754318443345973471589cceb4a24ed832
[ "Apache-2.0" ]
1
2020-03-26T13:23:17.000Z
2020-03-26T13:23:17.000Z
aula19.py
GantzLorran/Python
ce6073754318443345973471589cceb4a24ed832
[ "Apache-2.0" ]
null
null
null
aula19.py
GantzLorran/Python
ce6073754318443345973471589cceb4a24ed832
[ "Apache-2.0" ]
null
null
null
'''pessoas = {'nome': 'Lorran', 'sexo': 'M', 'idade': 22} #pessoas['peso'] = '100.0' #Esse comando adiciona uma linha for k, v in pessoas.items(): print(f'{k} = {v}')''' #print(pessoas.items()) #print(pessoas.values()) #print(pessoas.keys()) #print(f'O {pessoas["nome"]} tem {pessoas["idade"]} anos') '...
31.464286
115
0.591373
'''pessoas = {'nome': 'Lorran', 'sexo': 'M', 'idade': 22} #pessoas['peso'] = '100.0' #Esse comando adiciona uma linha for k, v in pessoas.items(): print(f'{k} = {v}')''' #print(pessoas.items()) #print(pessoas.values()) #print(pessoas.keys()) #print(f'O {pessoas["nome"]} tem {pessoas["idade"]} anos') '...
2
0
0
0
0
0
0
0
0
1c53295c4fb30a7a4a7939833a9f4c27c638986b
228
py
Python
Hash_SHA3.py
Ottothebull/tcc_pos_pucpr2019
628bd376a4adf213261464eb3c10b29732681a2e
[ "CC0-1.0" ]
1
2021-07-10T03:14:27.000Z
2021-07-10T03:14:27.000Z
Hash_SHA3.py
Ottothebull/tcc_pos_pucpr2019
628bd376a4adf213261464eb3c10b29732681a2e
[ "CC0-1.0" ]
null
null
null
Hash_SHA3.py
Ottothebull/tcc_pos_pucpr2019
628bd376a4adf213261464eb3c10b29732681a2e
[ "CC0-1.0" ]
1
2021-03-24T01:10:46.000Z
2021-03-24T01:10:46.000Z
import hashlib str = "String_senha" #Senha em texto aberto hash_sha3_512 = hashlib.new("sha3_512", str.encode()) #Algoritimo de Hash selecionado e executado print(hash_sha3_512) print(hash_sha3_512.hexdigest())#Hash gerada
20.727273
97
0.780702
import hashlib str = "String_senha" #Senha em texto aberto hash_sha3_512 = hashlib.new("sha3_512", str.encode()) #Algoritimo de Hash selecionado e executado print(hash_sha3_512) print(hash_sha3_512.hexdigest())#Hash gerada
0
0
0
0
0
0
0
0
0
5bb0e1f796bbdc4ab51efba22f9764886d516521
2,204
py
Python
pyglet/libs/x11/xinerama.py
bitcraft/pyglet
144257c365ca85528c6a4c5bed8141e683d7a9b6
[ "BSD-3-Clause" ]
15
2015-01-21T12:29:01.000Z
2018-12-09T09:17:33.000Z
pyglet/libs/x11/xinerama.py
bitcraft/pyglet
144257c365ca85528c6a4c5bed8141e683d7a9b6
[ "BSD-3-Clause" ]
null
null
null
pyglet/libs/x11/xinerama.py
bitcraft/pyglet
144257c365ca85528c6a4c5bed8141e683d7a9b6
[ "BSD-3-Clause" ]
9
2015-12-12T09:12:46.000Z
2021-12-26T13:29:14.000Z
"""Wrapper for Xinerama Generated with: tools/genwrappers.py xinerama Do not modify this file. """ import ctypes import pyglet.lib _lib = pyglet.lib.load_library('Xinerama') _int_types = (c_int16, c_int32) if hasattr(ctypes, 'c_int64'): # Some builds of ctypes apparently do not have c_int64 # defined; it'...
27.209877
78
0.72686
"""Wrapper for Xinerama Generated with: tools/genwrappers.py xinerama Do not modify this file. """ import ctypes from ctypes import * import pyglet.lib _lib = pyglet.lib.load_library('Xinerama') _int_types = (c_int16, c_int32) if hasattr(ctypes, 'c_int64'): # Some builds of ctypes apparently do not have c_int...
0
0
0
345
0
0
0
-1
68
ed2796ca9ae2551a10aa26fb1c81d8d1243c594c
626
py
Python
localsearch/metropolis.py
jguhh/Prostheoinf
335b2e8a832e082f36043117090077db4195eb39
[ "MIT" ]
null
null
null
localsearch/metropolis.py
jguhh/Prostheoinf
335b2e8a832e082f36043117090077db4195eb39
[ "MIT" ]
null
null
null
localsearch/metropolis.py
jguhh/Prostheoinf
335b2e8a832e082f36043117090077db4195eb39
[ "MIT" ]
null
null
null
#%%
28.454545
74
0.64377
#%% from localsearch.local_search import NeighborhoodRelation from localsearch.simulated_annealing import SimulatedAnnealing from typing import Callable import networkx as nx class Metropolis(SimulatedAnnealing): def __init__(self, relation: NeighborhoodRelation, cost_fn: Callable): super().__init__(relati...
0
0
0
428
0
0
0
83
111
b61859d21e9a775417fba5a41035235b2600a012
301
py
Python
hdcp_app/views.py
joakimzhang/qa_study
ff8930e674d45c49bea4e130d14d73d17b090e48
[ "Apache-2.0" ]
null
null
null
hdcp_app/views.py
joakimzhang/qa_study
ff8930e674d45c49bea4e130d14d73d17b090e48
[ "Apache-2.0" ]
null
null
null
hdcp_app/views.py
joakimzhang/qa_study
ff8930e674d45c49bea4e130d14d73d17b090e48
[ "Apache-2.0" ]
null
null
null
# Create your views here.
27.363636
70
0.747508
from django.shortcuts import render from hdcp_app.models import test_table # Create your views here. def test(request): test_obj = test_table.objects.all() return render(request,'hdcp_app/index.html',{'test_obj':test_obj}) #return HttpResponse("hello world") def login(request): pass
0
0
0
0
0
155
0
31
89
5780c7f487cb347c8be134f0e57ce423bccf201d
10,634
py
Python
plot_scripts/metrics/plot_nsn_metric_WFD_summary.py
LSSTDESC/sn_pipe
d42c7490ba5ff8c52f62e70a20c922172a6baff1
[ "BSD-3-Clause" ]
null
null
null
plot_scripts/metrics/plot_nsn_metric_WFD_summary.py
LSSTDESC/sn_pipe
d42c7490ba5ff8c52f62e70a20c922172a6baff1
[ "BSD-3-Clause" ]
3
2020-07-16T09:43:49.000Z
2020-10-06T11:46:05.000Z
plot_scripts/metrics/plot_nsn_metric_WFD_summary.py
LSSTDESC/sn_pipe
d42c7490ba5ff8c52f62e70a20c922172a6baff1
[ "BSD-3-Clause" ]
2
2019-10-22T13:39:33.000Z
2020-07-23T20:42:07.000Z
import numpy as np import sn_plotter_metrics.nsnPlot as nsn_plot import matplotlib.pylab as plt from optparse import OptionParser # from sn_tools.sn_obs import dataInside import healpy as hp import pandas as pd import os import multiprocessing def processMulti(toproc, Npixels, outFile, nproc=1): """ Function ...
27.127551
89
0.614256
import numpy as np import sn_plotter_metrics.nsnPlot as nsn_plot import matplotlib.pylab as plt import argparse from optparse import OptionParser import glob # from sn_tools.sn_obs import dataInside import healpy as hp import numpy.lib.recfunctions as rf import pandas as pd import os import multiprocessing def proces...
2
0
0
0
0
551
0
-2
89
0ce0a029a9e1728b59978c0ab41c22e40a7ba118
1,265
py
Python
raw/day06/part1.py
aesdeef/advent-of-code-2021
4561bcf12ac03d360f5b28c48ef80134f97613b9
[ "MIT" ]
2
2021-12-03T06:18:27.000Z
2021-12-06T11:28:33.000Z
raw/day06/part1.py
aesdeef/advent-of-code-2021
4561bcf12ac03d360f5b28c48ef80134f97613b9
[ "MIT" ]
null
null
null
raw/day06/part1.py
aesdeef/advent-of-code-2021
4561bcf12ac03d360f5b28c48ef80134f97613b9
[ "MIT" ]
null
null
null
import re from collections import Counter INPUT_FILE = "../../input/06.txt" # pre-written code starts here with open(INPUT_FILE) as f: input_ = f.read() blocks = [block.split("\n") for block in input_.split("\n\n")] lines = [line.strip() for line in input_.split("\n")] wordlines = [line.split() for line in lin...
24.326923
88
0.601581
import re from collections import Counter INPUT_FILE = "../../input/06.txt" # pre-written code starts here def intify(line: list[str]): return [int(x) if re.match(r"^[+-]?\d+$", x) else x for x in line] with open(INPUT_FILE) as f: input_ = f.read() blocks = [block.split("\n") for block in input_.split("\n\...
0
0
0
0
0
78
0
0
22
3c05cd8880f21cd7a2172a05c937173dd00dcd35
8,284
py
Python
lib/devtool/cache.py
shift-left-test/meta-shift
effce9bea894f990703cc047157e3f30d53d9365
[ "MIT" ]
2
2022-01-19T02:39:43.000Z
2022-02-07T01:58:17.000Z
lib/devtool/cache.py
shift-left-test/meta-shift
effce9bea894f990703cc047157e3f30d53d9365
[ "MIT" ]
null
null
null
lib/devtool/cache.py
shift-left-test/meta-shift
effce9bea894f990703cc047157e3f30d53d9365
[ "MIT" ]
null
null
null
""" Copyright (c) 2020 LG Electronics Inc. SPDX-License-Identifier: MIT """ import bb import logging import os import re import shutil import sys import tempfile from devtool import setup_tinfoil logger = logging.getLogger("devtool") logger.setLevel(logging.WARNING) def parse(args, basepath): """Return the ...
34.373444
115
0.577378
""" Copyright (c) 2020 LG Electronics Inc. SPDX-License-Identifier: MIT """ import bb import json import logging import os import re import shutil import subprocess import sys import tempfile from devtool import setup_tinfoil, DevtoolError logger = logging.getLogger("devtool") logger.setLevel(logging.WARNING) clas...
0
0
0
1,877
0
3,196
0
0
208
d284f6b254fd2a97325bbed799ee2bc0e25a76be
45,021
py
Python
elixir/entity.py
peggygao1988/elixir
47f4e6e999f3925546c27fb386b079654ee45f6e
[ "Apache-2.0" ]
1
2015-08-25T14:24:17.000Z
2015-08-25T14:24:17.000Z
elixir/entity.py
peggygao1988/elixir
47f4e6e999f3925546c27fb386b079654ee45f6e
[ "Apache-2.0" ]
null
null
null
elixir/entity.py
peggygao1988/elixir
47f4e6e999f3925546c27fb386b079654ee45f6e
[ "Apache-2.0" ]
null
null
null
''' This module provides the ``Entity`` base class, as well as its metaclass ``EntityMeta``. ''' from py23compat import sorted from copy import deepcopy from sqlalchemy.sql import ColumnCollection from elixir.statements import process_mutators from elixir.properties import Property DEBUG = False try: SA05orlater...
38.056636
94
0.590769
''' This module provides the ``Entity`` base class, as well as its metaclass ``EntityMeta``. ''' from py23compat import sorted import sys import types import warnings from copy import deepcopy import sqlalchemy from sqlalchemy import Table, Column, Integer, desc, ForeignKey, and_, \ ForeignKe...
0
0
0
34,929
0
4,051
0
271
503
05543f6c9e36f83b41641ae76f708b5b45f66748
15,231
py
Python
source/Userdocs/NML2_examples/tune-izhikevich.py
NeuroML/Documentation
06e355a8268c848b872b4e4c44d990b77b1fcb37
[ "CC-BY-4.0" ]
5
2020-09-28T20:47:04.000Z
2021-08-23T16:46:30.000Z
source/Userdocs/NML2_examples/tune-izhikevich.py
NeuroML/Documentation
06e355a8268c848b872b4e4c44d990b77b1fcb37
[ "CC-BY-4.0" ]
86
2020-11-05T12:32:01.000Z
2022-03-30T22:45:00.000Z
source/Userdocs/NML2_examples/tune-izhikevich.py
NeuroML/Documentation
06e355a8268c848b872b4e4c44d990b77b1fcb37
[ "CC-BY-4.0" ]
2
2021-08-23T16:46:34.000Z
2022-03-25T00:43:11.000Z
#!/usr/bin/env python3 """ Example file showing the tuning of an Izhikevich neuron using pyNeuroML. File: source/Userdocs/NML2_examples/tune-izhikevich.py Copyright 2021 NeuroML contributors """ from pyneuroml.tune.NeuroMLTuner import run_optimisation import pynwb # type: ignore import numpy as np from pyelectro.u...
35.013793
138
0.646576
#!/usr/bin/env python3 """ Example file showing the tuning of an Izhikevich neuron using pyNeuroML. File: source/Userdocs/NML2_examples/tune-izhikevich.py Copyright 2021 NeuroML contributors """ from pyneuroml.tune.NeuroMLTuner import run_optimisation import pynwb # type: ignore import numpy as np from pyelectro.u...
0
0
0
0
0
0
0
27
0
4d89301af6fa6b1c5046c610d2de1c47a8dbbf0c
3,158
py
Python
supervised/data_collector.py
gthd/supervised_learning
183c6b67031a506bb130a2ca5b091225aaa26112
[ "MIT" ]
null
null
null
supervised/data_collector.py
gthd/supervised_learning
183c6b67031a506bb130a2ca5b091225aaa26112
[ "MIT" ]
null
null
null
supervised/data_collector.py
gthd/supervised_learning
183c6b67031a506bb130a2ca5b091225aaa26112
[ "MIT" ]
null
null
null
policy = Policy() policy.collect_training_data()
31.267327
84
0.60228
import robot import robot2 import numpy as np class Policy: def __init__(self): self.robot = robot.VrepCommunication() self.termination_height = 0.13 self.script = '' def start_vrep(self, again=False): if again: self.robot.end_communication() self.robot...
0
0
0
3,039
0
0
0
-20
89
088d45a21edc44b0a63398d3e36433350352c431
896
py
Python
teleope_twist_keyboard.py
masamasa9841/mouserobot_ros
6838693be1289d456cf8e6cff1e94d7889e5bb34
[ "BSD-3-Clause" ]
null
null
null
teleope_twist_keyboard.py
masamasa9841/mouserobot_ros
6838693be1289d456cf8e6cff1e94d7889e5bb34
[ "BSD-3-Clause" ]
null
null
null
teleope_twist_keyboard.py
masamasa9841/mouserobot_ros
6838693be1289d456cf8e6cff1e94d7889e5bb34
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python import rospy if __name__ == '__main__': rospy.init_node('keyboard_cmd_vel') keyboard_cmd_vel = KeyTwist() keyboard_cmd_vel.main()
28
76
0.543527
#!/usr/bin/env python import rospy from geometry_msgs.msg import Twist class KeyTwist(object): def __init__(self): self._twist_pub = rospy.Publisher('/cmd_vel', Twist, queue_size=100) def main(self): while not rospy.is_shutdown(): twist = Twist() direction = raw_input(...
0
0
0
670
0
0
0
14
45
56a1f57503621c1b5223a878a4331ddc6ee9b4ac
263
py
Python
pyfilter/distributions/typing.py
tingiskhan/pyfilter
2d7ef0638c0c0fe70d8e01d6bcf8131d901144fd
[ "MIT" ]
61
2018-07-12T17:17:37.000Z
2022-03-19T17:37:59.000Z
pyfilter/distributions/typing.py
tingiskhan/pyfilter
2d7ef0638c0c0fe70d8e01d6bcf8131d901144fd
[ "MIT" ]
12
2018-08-26T20:01:03.000Z
2021-12-04T16:42:48.000Z
pyfilter/distributions/typing.py
tingiskhan/pyfilter
2d7ef0638c0c0fe70d8e01d6bcf8131d901144fd
[ "MIT" ]
9
2019-01-20T16:31:03.000Z
2021-12-24T07:10:04.000Z
from torch.distributions import Distribution import torch from typing import Type, Callable, Sequence, Union HyperParameters = Union[torch.Tensor, float, int] DistributionOrBuilder = Union[Type[Distribution], Callable[[Sequence[HyperParameters]], Distribution]]
37.571429
102
0.821293
from torch.distributions import Distribution import torch from typing import Type, Callable, Sequence, Union HyperParameters = Union[torch.Tensor, float, int] DistributionOrBuilder = Union[Type[Distribution], Callable[[Sequence[HyperParameters]], Distribution]]
0
0
0
0
0
0
0
0
0
c51030fc61c2b97bd82d27a033e7fef59d3c609f
1,440
py
Python
scripts/mkegglistindex.py
mjfwest/OpenMDAO-Framework
a5521f47ad7686c25b203de74e1c7dff5fd7a52b
[ "Apache-2.0" ]
69
2015-01-02T19:10:08.000Z
2021-11-14T04:42:28.000Z
scripts/mkegglistindex.py
jcchin/OpenMDAO-Framework
038e89b06da1c74f00918f4c6fbd8bd365e25657
[ "Apache-2.0" ]
3
2015-01-15T23:08:18.000Z
2015-03-11T16:57:35.000Z
scripts/mkegglistindex.py
jcchin/OpenMDAO-Framework
038e89b06da1c74f00918f4c6fbd8bd365e25657
[ "Apache-2.0" ]
31
2015-09-16T00:37:35.000Z
2022-01-10T06:27:55.000Z
""" This creates an index.html file for the find-links directory on the openmdao.org site. """ import hashlib def file_md5(fpath): """Return the MD5 digest for the given file""" try: f = open(fpath,'rb') m = hashlib.md5() while True: s = f.read(4096) if not s:...
25.263158
86
0.571528
""" This creates an index.html file for the find-links directory on the openmdao.org site. """ import sys import os.path import hashlib import fnmatch def find_files(startdir, pats): """Return a list of files (using a generator) that match the given list of glob patterns. Walks an entire directory structure...
0
0
0
0
398
468
0
-25
113
74284982f0805ee428f4f93c11149908b0a346bc
1,583
py
Python
pyPLM/Core/Process.py
vtta2008/pipelineTool
2431d2fc987e3b31f2a6a63427fee456fa0765a0
[ "Apache-2.0" ]
7
2018-09-09T01:14:34.000Z
2020-01-26T10:06:08.000Z
pyPLM/Core/Process.py
vtta2008/pipelineTool
2431d2fc987e3b31f2a6a63427fee456fa0765a0
[ "Apache-2.0" ]
null
null
null
pyPLM/Core/Process.py
vtta2008/pipelineTool
2431d2fc987e3b31f2a6a63427fee456fa0765a0
[ "Apache-2.0" ]
3
2019-03-11T21:54:52.000Z
2019-11-25T11:23:17.000Z
# -*- coding: utf-8 -*- """ Script Name: Process.py Author: Do Trinh/Jimmy - 3D artist. Description: """ # ------------------------------------------------------------------------------------------------------------- # ------------------------------------------------------------------------------------------------...
28.267857
114
0.51295
# -*- coding: utf-8 -*- """ Script Name: Process.py Author: Do Trinh/Jimmy - 3D artist. Description: """ # ------------------------------------------------------------------------------------------------------------- import os from PySide2.QtCore import QProcess class Process(QProcess): Type ...
2
146
0
928
0
0
0
18
68
edc11b374a127df07419ec92b94954b31dc4e57b
601
py
Python
pdf_playground/pdf.py
dukagjinramosaj1/python_exercises
7585f483f5061ad22acf5ec9a3ae237403fa1c58
[ "MIT" ]
null
null
null
pdf_playground/pdf.py
dukagjinramosaj1/python_exercises
7585f483f5061ad22acf5ec9a3ae237403fa1c58
[ "MIT" ]
null
null
null
pdf_playground/pdf.py
dukagjinramosaj1/python_exercises
7585f483f5061ad22acf5ec9a3ae237403fa1c58
[ "MIT" ]
null
null
null
import sys #inputs from command inputs = sys.argv[1:] #merging PDF #call the function pdf_merger(inputs) #ROTATE PDFs # with open('dummy.pdf', 'rb') as file: # reader = PyPDF2.PdfFileReader(file) # page = reader.getPage(0) # page.rotateClockwise(90) # writer = PyPDF2.PdfFileWriter() # wri...
17.171429
46
0.643927
import PyPDF2 import sys #inputs from command inputs = sys.argv[1:] #merging PDF def pdf_merger(pdf_list): merger = PyPDF2.PdfFileMerger() for pdf in pdf_list: print(pdf) merger.append(pdf) merger.write('super.pdf') #call the function pdf_merger(inputs) #ROTATE PDFs # with open('...
0
0
0
0
0
141
0
-8
45
377cace65f0288d47a5c627af6e029b919f9ee87
826
py
Python
robot_test.py
KyleDev008/AlphaBot2-Pi-Core
4b6ec9bd7f760fd2a41edb05a10b1b1b4750a61a
[ "MIT" ]
1
2022-02-13T18:10:23.000Z
2022-02-13T18:10:23.000Z
robot_test.py
KyleDev008/AlphaBot2-Pi-Core
4b6ec9bd7f760fd2a41edb05a10b1b1b4750a61a
[ "MIT" ]
null
null
null
robot_test.py
KyleDev008/AlphaBot2-Pi-Core
4b6ec9bd7f760fd2a41edb05a10b1b1b4750a61a
[ "MIT" ]
null
null
null
from time import sleep from LEDStrip import LEDStrip from Wheels import Wheels from Servos import Servos from Joystick import Joystick if __name__ == "__main__": print("> Testing Robot <") print(" > Testing LEDs...") led = LEDStrip(0.5) led.led_test() print(" > LED Testing Complete!") ...
18.772727
42
0.59322
from time import sleep from LEDStrip import LEDStrip from Wheels import Wheels from Servos import Servos from Joystick import Joystick if __name__ == "__main__": print("> Testing Robot <") print(" > Testing LEDs...") led = LEDStrip(0.5) led.led_test() print(" > LED Testing Complete!") ...
0
0
0
0
0
0
0
0
0
d101cf6bb24a02017604ba63c91029a4ec28843a
2,818
py
Python
reasoner/json2f2.py
shiv-io/blawx
2fef1fbc26f7c4479714e3fa291660964672b612
[ "MIT" ]
1
2020-06-21T02:19:54.000Z
2020-06-21T02:19:54.000Z
reasoner/json2f2.py
shiv-io/blawx
2fef1fbc26f7c4479714e3fa291660964672b612
[ "MIT" ]
null
null
null
reasoner/json2f2.py
shiv-io/blawx
2fef1fbc26f7c4479714e3fa291660964672b612
[ "MIT" ]
null
null
null
# Script to Take a JSON object, convert it into a Python structure, and convert the Python structure into Flora-2 code. # Jason Morris import sys, json # Get the data from the command line filename = sys.argv[1] file = open(filename, "r") # Convert from JSON to Python structure dictionary = json.load(file) #print(di...
28.18
119
0.562811
# Script to Take a JSON object, convert it into a Python structure, and convert the Python structure into Flora-2 code. # Jason Morris import sys, json, types def json2flora(key,value,parentname="data",root=False): retstr = "" # If this is not a leaf: if isinstance(value, (list,dict,tuple)): # for each of t...
0
0
0
0
0
2,133
0
7
48
020d633565e9ec12c078b859df25d05c02e5b784
2,757
py
Python
src/loaders.py
dchevell/sourcepy
069e1d2f7d5de3f18947871a099156105d218848
[ "MIT" ]
6
2022-03-07T11:34:13.000Z
2022-03-31T13:04:11.000Z
src/loaders.py
dchevell/sourcepy
069e1d2f7d5de3f18947871a099156105d218848
[ "MIT" ]
null
null
null
src/loaders.py
dchevell/sourcepy
069e1d2f7d5de3f18947871a099156105d218848
[ "MIT" ]
null
null
null
import importlib.machinery from typing import Iterator, List, Tuple MemberDefinitions = Iterator[_MemberDef] Members = List[Tuple[str, object]]
33.621951
92
0.670294
import importlib.machinery import importlib.util import inspect import sys from pathlib import Path from types import ModuleType from typing import Callable, Iterator, List, Optional, Tuple, TypedDict class _MemberDef(TypedDict): name: str type: str value: object MemberDefinitions = Iterator[_MemberDef...
0
0
0
53
1,262
994
0
23
271
e3bae06f8864e2fbc2f533aaba84197ffb142a0b
130
py
Python
tests/Test.py
DHI/mikecore-python
04c36b1ee3dc6c81905d75ff8c39d7b8a8411bd7
[ "BSD-3-Clause" ]
2
2021-06-01T21:06:48.000Z
2021-06-16T03:49:35.000Z
tests/Test.py
DHI/mikecore-python
04c36b1ee3dc6c81905d75ff8c39d7b8a8411bd7
[ "BSD-3-Clause" ]
6
2021-05-27T10:26:13.000Z
2022-03-07T09:44:19.000Z
tests/Test.py
DHI/mikecore-python
04c36b1ee3dc6c81905d75ff8c39d7b8a8411bd7
[ "BSD-3-Clause" ]
null
null
null
# To run all test in a Python environment:
26
84
0.746154
# To run all test in a Python environment: import sys; sys.path.insert(0, "C:\Work\python\mikecore"); import tests.test_run_all
0
0
0
0
0
0
0
4
81
10e989c9013462f2a694b06e0d9d7052327fda62
16,350
py
Python
datalad_metalad/extractors/studyminimeta/ldcreator.py
christian-monch/datalad-metalad
75dd34f71d1fa6d03ccd8cb64d8b438593519226
[ "MIT" ]
null
null
null
datalad_metalad/extractors/studyminimeta/ldcreator.py
christian-monch/datalad-metalad
75dd34f71d1fa6d03ccd8cb64d8b438593519226
[ "MIT" ]
null
null
null
datalad_metalad/extractors/studyminimeta/ldcreator.py
christian-monch/datalad-metalad
75dd34f71d1fa6d03ccd8cb64d8b438593519226
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from collections import namedtuple LDCreatorResult = namedtuple("LDCreatorResult", ["success", "json_ld_object", "keys", "messages"]) DATALAD_SCHEMA_BASE = "https://schema.datalad.org" # Automatically translated study-element properties STUDY_TRANSLATION_TABLE = { SMMProperties.N...
39.97555
115
0.606972
# -*- coding: utf-8 -*- from collections import namedtuple from typing import Dict, List, Union LDCreatorResult = namedtuple("LDCreatorResult", ["success", "json_ld_object", "keys", "messages"]) DATALAD_SCHEMA_BASE = "https://schema.datalad.org" class SMMProperties: AFFILIATION = "affiliation" AUTHOR = "...
0
0
0
14,329
0
0
0
15
160
054f6f37e1c84c6edd0b73fb1733fa8f36342414
1,904
py
Python
suanfa/binary_tree.py
nciefeiniu/python-test
d81fcfff8cdec724c3010d6b7a77aabad7f90595
[ "Apache-2.0" ]
null
null
null
suanfa/binary_tree.py
nciefeiniu/python-test
d81fcfff8cdec724c3010d6b7a77aabad7f90595
[ "Apache-2.0" ]
null
null
null
suanfa/binary_tree.py
nciefeiniu/python-test
d81fcfff8cdec724c3010d6b7a77aabad7f90595
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import Queue if __name__ == '__main__': b = BinaryTree() b.add(1) b.add(2) b.add(3) b.add(4) b.add(5) b.add(6) b.add(7) # b.p_traversal() b.recursion_p(b.root) print '=========================' b.recursion_af(b.root)
22.666667
55
0.480567
# -*- coding: utf-8 -*- import Queue class Node: def __init__(self, value=None): self.value = value self.left = None self.right = None class BinaryTree: def __init__(self, root=None): self.root = root def add(self, value): node = Node(value=value) if sel...
60
0
0
1,544
0
0
0
0
46
cfba7b41cedad63952f82913214af852abe6da30
1,940
py
Python
test/rfcn_box_split_test.py
engineer1109/TensorFlow-R-FCN-for-primary-students
66be2133052cacc04b5b04054624333c2c17ebd2
[ "MIT" ]
12
2017-12-23T12:03:36.000Z
2020-04-28T09:37:30.000Z
test/rfcn_box_split_test.py
engineer1109/TensorFlow-R-FCN-for-primary-students
66be2133052cacc04b5b04054624333c2c17ebd2
[ "MIT" ]
6
2017-12-27T12:30:52.000Z
2021-05-02T11:01:59.000Z
test/rfcn_box_split_test.py
engineer1109/TensorFlow-R-FCN-for-primary-students
66be2133052cacc04b5b04054624333c2c17ebd2
[ "MIT" ]
3
2018-08-22T08:47:17.000Z
2019-10-10T07:53:40.000Z
import numpy as np import tensorflow as tf if __name__ == '__main__': np.random.seed(0) img = np.random.randn(1, 10, 10, 1) tf_img = tf.convert_to_tensor(img) print(img[0, :, :, 0]) rois = np.array([[0, 0, 6, 6], [2, 2, 8, 8]], dtype=np.float32) tf_rois = tf.convert_to_...
30.793651
102
0.570103
import numpy as np import tensorflow as tf def _normalize(rois, height, width): xmin, ymin, xmax, ymax = tf.unstack(rois, axis=1) xmin = xmin/width ymin = ymin/height xmax = xmax/width ymax = ymax/height return tf.stack([xmin, ymin, xmax, ymax], axis=1) def _grid_features(imgs, tf_rois): ...
0
0
0
0
0
1,197
0
0
46
bba2c2461f1e70c70314af3caaf13dce05c68df3
1,615
py
Python
operations/fleet_management/migrations/0090_auto_20181109_1214.py
kaizer88/emps
2669b32c46befcf1a19390fb25013817e6b00980
[ "MIT" ]
null
null
null
operations/fleet_management/migrations/0090_auto_20181109_1214.py
kaizer88/emps
2669b32c46befcf1a19390fb25013817e6b00980
[ "MIT" ]
null
null
null
operations/fleet_management/migrations/0090_auto_20181109_1214.py
kaizer88/emps
2669b32c46befcf1a19390fb25013817e6b00980
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.7 on 2018-11-09 10:14 from __future__ import unicode_literals
40.375
199
0.671207
# -*- coding: utf-8 -*- # Generated by Django 1.11.7 on 2018-11-09 10:14 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion import lib.fields class Migration(migrations.Migration): dependencies = [ migrations...
0
0
0
1,352
0
0
0
37
112
e1e5da328bcac61d876a8562733e6cb63390217a
1,212
py
Python
day22/guidos-gorgeous-lasagna/lasagna.py
Akankshasharmaa/100DaysOfCode
395bd8bd063495af7d04ec7b2f819923f502059f
[ "MIT" ]
2
2021-12-22T07:43:14.000Z
2021-12-24T12:07:33.000Z
day22/guidos-gorgeous-lasagna/lasagna.py
Akankshasharmaa/100DaysOfCode
395bd8bd063495af7d04ec7b2f819923f502059f
[ "MIT" ]
null
null
null
day22/guidos-gorgeous-lasagna/lasagna.py
Akankshasharmaa/100DaysOfCode
395bd8bd063495af7d04ec7b2f819923f502059f
[ "MIT" ]
1
2021-12-22T07:43:26.000Z
2021-12-22T07:43:26.000Z
"""Time taken when baking lasagna """ EXPECTED_BAKE_TIME = 40 PREPARATION_TIME = 2 def bake_time_remaining(elapsed_bake_time): """Calculate the bake time remaining. :param elapsed_bake_time: int baking time already elapsed. :return: int remaining bake time derived from 'EXPECTED_BAKE_TIME'. Function...
34.628571
94
0.765677
"""Time taken when baking lasagna """ EXPECTED_BAKE_TIME = 40 PREPARATION_TIME = 2 def bake_time_remaining(elapsed_bake_time): """Calculate the bake time remaining. :param elapsed_bake_time: int baking time already elapsed. :return: int remaining bake time derived from 'EXPECTED_BAKE_TIME'. Function...
0
0
0
0
0
0
0
0
0
8496ca6e11555c92788c1c363227b112e67a3fe5
1,054
py
Python
core-python/Core_Python/socketpkg/TCPSendRcvServer_3.py
theumang100/tutorials-1
497f54c2adb022c316530319a168fca1c007d4b1
[ "MIT" ]
9
2020-04-23T05:24:19.000Z
2022-02-17T16:37:51.000Z
core-python/Core_Python/socketpkg/TCPSendRcvServer_3.py
theumang100/tutorials-1
497f54c2adb022c316530319a168fca1c007d4b1
[ "MIT" ]
5
2020-10-01T05:08:37.000Z
2020-10-12T03:18:10.000Z
core-python/Core_Python/socketpkg/TCPSendRcvServer_3.py
theumang100/tutorials-1
497f54c2adb022c316530319a168fca1c007d4b1
[ "MIT" ]
9
2020-04-28T14:06:41.000Z
2021-10-19T18:32:28.000Z
import socket as s try: server_soc = s.socket(family=s.AF_INET,type=s.SOCK_STREAM) server_soc.bind(('localhost',9999)) server_soc.listen(1) print("<---- Server side ---->") while True: (clien_soc,(c_addr)) = server_soc.accept() print("Connection Established from {0} with {1} port"....
42.16
130
0.640417
import socket as s try: server_soc = s.socket(family=s.AF_INET,type=s.SOCK_STREAM) server_soc.bind(('localhost',9999)) server_soc.listen(1) print("<---- Server side ---->") while True: (clien_soc,(c_addr)) = server_soc.accept() print("Connection Established from {0} with {1} port"....
0
0
0
0
0
0
0
0
0
6884847afa89a68ef7373968d978010939107441
2,762
py
Python
graph/word_search_in_matrix.py
mantoshkumar1/interview_preparation
c7e5b6692ad6772b38de8be029bddf0e273e0bce
[ "MIT" ]
1
2020-05-28T19:14:56.000Z
2020-05-28T19:14:56.000Z
graph/word_search_in_matrix.py
mantoshkumar1/interview_preparation
c7e5b6692ad6772b38de8be029bddf0e273e0bce
[ "MIT" ]
null
null
null
graph/word_search_in_matrix.py
mantoshkumar1/interview_preparation
c7e5b6692ad6772b38de8be029bddf0e273e0bce
[ "MIT" ]
null
null
null
""" 79. Word Search ------------------ https://leetcode.com/problems/word-search/ Given a 2D board and a word, find if the word exists in the grid. The word can be constructed from letters of sequentially adjacent cell, where "adjacent" cells are those horizontally or vertically neighboring. The same letter cell may ...
26.557692
197
0.530413
""" 79. Word Search ------------------ https://leetcode.com/problems/word-search/ Given a 2D board and a word, find if the word exists in the grid. The word can be constructed from letters of sequentially adjacent cell, where "adjacent" cells are those horizontally or vertically neighboring. The same letter cell may ...
0
0
0
1,837
0
0
0
0
23
4e42d038f853e11ca382a5c7456212889054d2ab
7,027
py
Python
Mini Project/Mini Project/mini_project_v4.py
gyalpodongo/g_lab
48d4bc19c7cfbaeb486c6ddbd5cafd8dfc3ca81b
[ "MIT" ]
null
null
null
Mini Project/Mini Project/mini_project_v4.py
gyalpodongo/g_lab
48d4bc19c7cfbaeb486c6ddbd5cafd8dfc3ca81b
[ "MIT" ]
null
null
null
Mini Project/Mini Project/mini_project_v4.py
gyalpodongo/g_lab
48d4bc19c7cfbaeb486c6ddbd5cafd8dfc3ca81b
[ "MIT" ]
null
null
null
""" The purpose of this mini project for ES 8.01/8.012 is to show the orbit of two objects in a bynary system using Newton's Gravitational Law, Conservation of Momentum and Newton's 2nd Law. The visualization will be produced using the different features of vpython. Before running the code, in the command pro...
45.335484
126
0.659741
""" The purpose of this mini project for ES 8.01/8.012 is to show the orbit of two objects in a bynary system using Newton's Gravitational Law, Conservation of Momentum and Newton's 2nd Law. The visualization will be produced using the different features of vpython. Before running the code, in the command pro...
0
0
0
0
0
0
0
-10
48
a782537e0b90194833ff57c752abddc47a9d1c34
5,248
py
Python
workflow/migrations/0001_initial.py
uktrade/approval-firebreak
77ab80eb26509681efadbe559f2a234e22b39a54
[ "MIT" ]
1
2021-08-10T14:37:53.000Z
2021-08-10T14:37:53.000Z
workflow/migrations/0001_initial.py
uktrade/approval-firebreak
77ab80eb26509681efadbe559f2a234e22b39a54
[ "MIT" ]
null
null
null
workflow/migrations/0001_initial.py
uktrade/approval-firebreak
77ab80eb26509681efadbe559f2a234e22b39a54
[ "MIT" ]
1
2021-08-05T16:41:47.000Z
2021-08-05T16:41:47.000Z
# Generated by Django 3.2 on 2021-04-12 10:10
73.915493
253
0.664634
# Generated by Django 3.2 on 2021-04-12 10:10 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django_fsm import uuid class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH...
0
0
0
5,040
0
0
0
27
134
b7c2ca37bcc69a1116c0188f0f06973f2d847ba2
7,761
py
Python
scripts/patch_potentials/plot_patch_potential_sim.py
charlesblakemore/opt_lev_analysis
704f174e9860907de349688ed82b5812bbb07c2d
[ "MIT" ]
null
null
null
scripts/patch_potentials/plot_patch_potential_sim.py
charlesblakemore/opt_lev_analysis
704f174e9860907de349688ed82b5812bbb07c2d
[ "MIT" ]
null
null
null
scripts/patch_potentials/plot_patch_potential_sim.py
charlesblakemore/opt_lev_analysis
704f174e9860907de349688ed82b5812bbb07c2d
[ "MIT" ]
1
2019-11-27T19:10:25.000Z
2019-11-27T19:10:25.000Z
import numpy as np import matplotlib.pyplot as plt import scipy.interpolate as interp import scipy.constants as constants import scipy.signal as signal import bead_util as bu fac = 425 * constants.elementary_charge base_path = '/processed_data/comsol_data/patch_potentials/' fnames = bu.find_all_fnames(base_path,...
32.609244
95
0.615513
import numpy as np import matplotlib.pyplot as plt import scipy.interpolate as interp import scipy.constants as constants import scipy.signal as signal import sys, time, os import bead_util as bu fac = 425 * constants.elementary_charge base_path = '/processed_data/comsol_data/patch_potentials/' fnames = bu.find...
0
0
0
0
0
0
0
-1
23
2bbd71138203e58a16908ec4f881133eccc489f7
18,868
py
Python
models/records.py
alaashaalan/flaskLocus
71d6347c6961ae999c894f96e7a49cba9999844f
[ "MIT" ]
null
null
null
models/records.py
alaashaalan/flaskLocus
71d6347c6961ae999c894f96e7a49cba9999844f
[ "MIT" ]
null
null
null
models/records.py
alaashaalan/flaskLocus
71d6347c6961ae999c894f96e7a49cba9999844f
[ "MIT" ]
null
null
null
import pandas as pd #from mpl_toolkits.mplot3d import Axes3D pd.options.mode.chained_assignment = None # default='warn' if __name__ == "__main__": pass # pd.options.mode.chained_assignment = None # default='warn' # beacon_id = "0117C59B07A4" # gateway_list = ['C9827BC63EE9', 'EF4DCFA41F7E', 'EDC36C497B4...
31.871622
159
0.728217
import numpy as np import copy from datetime import datetime, timedelta import pandas as pd from sklearn.neural_network import MLPClassifier from sklearn import svm from sklearn.neighbors import KNeighborsClassifier from sklearn.model_selection import GridSearchCV from sklearn.model_selection import StratifiedShuffleS...
0
0
0
14,274
0
0
0
164
425
60b85edf927478abb74878a6c6e7914d73182692
147
py
Python
src/testcase/GN_Y201H/input_case/GN_Y201H_Smart_Link.py
maiyajj/AutoTest_script-Appium_Connect
f9c2c42c281a9e2f984acb4a72dda0694b053f22
[ "Apache-2.0" ]
28
2017-11-10T00:19:16.000Z
2022-02-19T16:42:05.000Z
src/testcase/GN_Y201H/input_case/GN_Y201H_Smart_Link.py
maiyajj/AutoTest_script-Appium_Connect
f9c2c42c281a9e2f984acb4a72dda0694b053f22
[ "Apache-2.0" ]
null
null
null
src/testcase/GN_Y201H/input_case/GN_Y201H_Smart_Link.py
maiyajj/AutoTest_script-Appium_Connect
f9c2c42c281a9e2f984acb4a72dda0694b053f22
[ "Apache-2.0" ]
23
2017-08-22T06:12:19.000Z
2021-09-18T05:45:41.000Z
# coding=utf-8 try: except ImportError as e: print(e)
24.5
88
0.77551
# coding=utf-8 try: from src.testcase.GN_Y201H.case.GN_Y201H_SMART_LINK.GN_Y201H_SMART_LINK_001 import * except ImportError as e: print(e)
0
0
0
0
0
0
0
63
26
35c2a2b8c0988124e2ad7496f66286e5e4b24a30
622
py
Python
validate.py
goord/xios-grib-compare
28e51d1340a8a30e63252aeed07d490770cea6be
[ "Apache-2.0" ]
null
null
null
validate.py
goord/xios-grib-compare
28e51d1340a8a30e63252aeed07d490770cea6be
[ "Apache-2.0" ]
null
null
null
validate.py
goord/xios-grib-compare
28e51d1340a8a30e63252aeed07d490770cea6be
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python if __name__ == "__main__": main()
24.88
118
0.665595
#!/usr/bin/env python import argparse import complib def main(args=None): if args is None: pass parser = argparse.ArgumentParser(description="Automatic comparison IFS GRIB and XIOS NetCDF output") parser.add_argument("--grb", required=True, type=str, metavar="FILE", help="IFS output grib files (...
0
0
0
0
0
503
0
-13
69
20cb302b8b180db47f4ae76c8a3526731a431ce3
943
py
Python
dumbledore/server.py
mashrikt/grpc-microservices
b5812cdb96b222713ace2c0e3cbc69b3e5708e51
[ "MIT" ]
null
null
null
dumbledore/server.py
mashrikt/grpc-microservices
b5812cdb96b222713ace2c0e3cbc69b3e5708e51
[ "MIT" ]
null
null
null
dumbledore/server.py
mashrikt/grpc-microservices
b5812cdb96b222713ace2c0e3cbc69b3e5708e51
[ "MIT" ]
null
null
null
import logging if __name__ == '__main__': logging.basicConfig() serve()
26.194444
79
0.660657
from concurrent import futures import logging import csv import grpc import meter_usage_pb2 import meter_usage_pb2_grpc class MeterUsage(meter_usage_pb2_grpc.MeterUsage): def ListUsages(self, request, context): response_data = [] with open('meterusage.csv', 'r') as read_obj: next(rea...
0
0
0
471
0
236
0
-5
157
cf0179ee6562ea0d063f80d0b0f2b70dfff2c83a
1,279
py
Python
wm_metrics/fdc/indicator.py
Commonists/wm_metrics
4837861fa8a17b13618d701cddef9c3ef199ea96
[ "MIT" ]
3
2015-06-29T21:17:22.000Z
2016-01-22T11:39:52.000Z
wm_metrics/fdc/indicator.py
Commonists/wm_metrics
4837861fa8a17b13618d701cddef9c3ef199ea96
[ "MIT" ]
9
2015-02-09T07:42:44.000Z
2018-06-16T12:57:00.000Z
wm_metrics/fdc/indicator.py
Commonists/wm_metrics
4837861fa8a17b13618d701cddef9c3ef199ea96
[ "MIT" ]
4
2015-07-02T23:17:39.000Z
2020-09-10T08:18:47.000Z
"""Indicator model."""
36.542857
98
0.591087
"""Indicator model.""" class Indicator(object): """Indicator for FDC report. Indicator for FDC reports have values for Q1, Q2, Q3, Q4 or/and a value. it allows to follow the evolution of an indicator during the quarters and have its final value or to follow an indicator with only a single value. ...
0
0
0
1,232
0
0
0
0
23
5bd03e81670ac13c04e16816e61ae996a75620ba
2,026
py
Python
easypypi/shared_functions.py
JayKayAce/easypypi
23109bf8c4fce9c91667ade437c6431eb6132ddc
[ "MIT" ]
null
null
null
easypypi/shared_functions.py
JayKayAce/easypypi
23109bf8c4fce9c91667ade437c6431eb6132ddc
[ "MIT" ]
null
null
null
easypypi/shared_functions.py
JayKayAce/easypypi
23109bf8c4fce9c91667ade437c6431eb6132ddc
[ "MIT" ]
null
null
null
""" Functions shared by easypypi.py and licenses.py Check: Separate file required to avoid circular import? """ def create_file(filepath, content, **kwargs): """ Create a new file using writelines, and backup if filepath==setup.py. Returns "file exists" if filepath already exists and overwrite = False ...
39.72549
101
0.579467
""" Functions shared by easypypi.py and licenses.py Check: Separate file required to avoid circular import? """ import os def create_file(filepath, content, **kwargs): """ Create a new file using writelines, and backup if filepath==setup.py. Returns "file exists" if filepath already exists and overwrite ...
12
0
0
0
0
0
0
-12
23
8c0b36bc0176569b3857bd5837fb2987cf54269f
2,875
py
Python
ToDo-GUI/todo.py
Aayush-hub/Amazing-Python-Scripts
5488454b16fa969d32ad7a56618e62e64291c052
[ "MIT" ]
3
2021-01-14T13:54:22.000Z
2021-11-15T11:26:51.000Z
ToDo-GUI/todo.py
Aayush-hub/Amazing-Python-Scripts
5488454b16fa969d32ad7a56618e62e64291c052
[ "MIT" ]
1
2021-01-26T02:12:47.000Z
2021-01-26T02:12:47.000Z
ToDo-GUI/todo.py
Aayush-hub/Amazing-Python-Scripts
5488454b16fa969d32ad7a56618e62e64291c052
[ "MIT" ]
null
null
null
'''ToDo List GUI''' import tkinter from tkinter import END, ANCHOR count=0 '''Defining root window''' root=tkinter.Tk() root.title('ToDo-GUI') root.iconbitmap('todo.ico') root.geometry('400x400') root.resizable(0,0) '''Define fonts and colors''' my_font=('Times New Roman',12) root_color='green' button_color='#e2cff...
28.186275
130
0.72
'''ToDo List GUI''' import tkinter from tkinter import END,ANCHOR count=0 '''Defining root window''' root=tkinter.Tk() root.title('ToDo-GUI') root.iconbitmap('todo.ico') root.geometry('400x400') root.resizable(0,0) '''Define fonts and colors''' my_font=('Times New Roman',12) root_color='green' button_color='#e2cff4...
0
0
0
0
0
615
0
-1
114
5918a6f4139b12cc844271ffd363f2ab46161537
566
py
Python
examples/sanic_example.py
Hanaasagi/throttle
c80aa6266e36f8ff0b99fbedac1c4e28e305f91d
[ "MIT" ]
null
null
null
examples/sanic_example.py
Hanaasagi/throttle
c80aa6266e36f8ff0b99fbedac1c4e28e305f91d
[ "MIT" ]
null
null
null
examples/sanic_example.py
Hanaasagi/throttle
c80aa6266e36f8ff0b99fbedac1c4e28e305f91d
[ "MIT" ]
null
null
null
from sanic import Sanic app = Sanic() if __name__ == "__main__": app.run(host="0.0.0.0", port=8000)
25.727273
60
0.611307
from sanic import Sanic from sanic.response import json, text from throttle import AsyncThrottle from throttle.storage import RedisStorage app = Sanic() @app.route("/") @AsyncThrottle("5/m", "request.remote_addr", callback=lambda *args, **kwargs: text('tirgger the throttle', status...
0
319
0
0
0
0
0
49
89