hexsha
stringlengths
40
40
size
int64
2
1.05M
ext
stringclasses
9 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
193
max_stars_repo_name
stringlengths
6
109
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
36.6k
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
193
max_issues_repo_name
stringlengths
6
109
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
29.8k
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
193
max_forks_repo_name
stringlengths
6
109
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
11.2k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.05M
avg_line_length
float64
1
404k
max_line_length
int64
1
1.03M
alphanum_fraction
float64
0
1
032a1de4a1d8dc9218df7d5a72094358462a57fe
13,020
py
Python
MachineLearning_code_examples/src/utils/.ipynb_checkpoints/DataFrameExplorer_distribusion-checkpoint.py
PawelRosikiewicz/MachineLearning
a119ff3327f77937101a70ea12a66652b9f42f2a
[ "MIT" ]
1
2022-03-25T14:24:57.000Z
2022-03-25T14:24:57.000Z
MachineLearning_code_examples/src/utils/DataFrameExplorer_distribusion.py
PawelRosikiewicz/MachineLearning
a119ff3327f77937101a70ea12a66652b9f42f2a
[ "MIT" ]
null
null
null
MachineLearning_code_examples/src/utils/DataFrameExplorer_distribusion.py
PawelRosikiewicz/MachineLearning
a119ff3327f77937101a70ea12a66652b9f42f2a
[ "MIT" ]
null
null
null
# ********************************************************************************** # # # # Project: Data Frame Explorer # # Author: Pawel Rosikiewicz ...
39.099099
136
0.486406
032a21bc1a080b2e87d169fbcb90c3620d74fdee
580
py
Python
invoice2data/input/pdftotext.py
uditjuneja1/invoice2data
689537879d7caea3c93528d311de04422ce3e33c
[ "MIT" ]
1
2018-02-14T17:24:09.000Z
2018-02-14T17:24:09.000Z
invoice2data/input/pdftotext.py
duskybomb/invoice2data
4ddbaa5d43d522caaacfaa7f2d81d4a3bbf88e05
[ "MIT" ]
null
null
null
invoice2data/input/pdftotext.py
duskybomb/invoice2data
4ddbaa5d43d522caaacfaa7f2d81d4a3bbf88e05
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- def to_text(path): import subprocess import logging as logger import shutil from distutils import spawn #py2 compat """ Wrapper around Poppler pdftotext. """ if spawn.find_executable("pdftotext"): #shutil.which('pdftotext'): out, err = subprocess.Popen( ...
30.526316
114
0.627586
032a2cd8e2191d184731700e1249042a425a8069
133
py
Python
py/cidoc_crm_types/properties/p105i_has_right_on.py
minorg/cidoc-crm-types
9018bdbf0658e4d28a87bc94543e467be45d8aa5
[ "Apache-2.0" ]
null
null
null
py/cidoc_crm_types/properties/p105i_has_right_on.py
minorg/cidoc-crm-types
9018bdbf0658e4d28a87bc94543e467be45d8aa5
[ "Apache-2.0" ]
null
null
null
py/cidoc_crm_types/properties/p105i_has_right_on.py
minorg/cidoc-crm-types
9018bdbf0658e4d28a87bc94543e467be45d8aa5
[ "Apache-2.0" ]
null
null
null
from dataclasses import dataclass @dataclass class P105iHasRightOn: URI = "http://erlangen-crm.org/current/P105i_has_right_on"
19
62
0.789474
032a370a7634ae78c257cbbd2a25883ce04d5c79
1,622
py
Python
FacadeProposalfARApplication/Server/TcpServer.py
raphealshirley/Facade-Proposal
d5d3d09774d18f06c24ec13686c75a3acfbcfd56
[ "MIT" ]
null
null
null
FacadeProposalfARApplication/Server/TcpServer.py
raphealshirley/Facade-Proposal
d5d3d09774d18f06c24ec13686c75a3acfbcfd56
[ "MIT" ]
1
2021-02-26T12:13:53.000Z
2021-02-26T12:13:53.000Z
FacadeProposalfARApplication/Server/TcpServer.py
raphealshirley/Facade-Proposal
d5d3d09774d18f06c24ec13686c75a3acfbcfd56
[ "MIT" ]
null
null
null
import socket import sys import os import io from facade2 import facade # Create communication channel TCPsock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) UDPsock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) # Bind the socket to the port TCPserver_address = ('', 8052) #accept from any address UDPserver_a...
35.26087
102
0.656597
032a4d1d697ddac8ef1f1878a3aa652a032d515a
10,953
py
Python
main.py
TeamJumpstart/InformatiCup2021
a4d07992f772d3a1e9ef715fa8e9ce2234cd47a4
[ "MIT" ]
10
2021-04-18T17:54:02.000Z
2021-07-26T19:58:41.000Z
main.py
DiddiZ/InformatiCup2021
a4d07992f772d3a1e9ef715fa8e9ce2234cd47a4
[ "MIT" ]
1
2021-04-21T15:13:41.000Z
2021-04-21T15:13:41.000Z
main.py
DiddiZ/InformatiCup2021
a4d07992f772d3a1e9ef715fa8e9ce2234cd47a4
[ "MIT" ]
1
2021-04-20T09:42:50.000Z
2021-04-20T09:42:50.000Z
import argparse import logging import multiprocessing as mp import os import time from pathlib import Path import matplotlib.pyplot as plt import numpy as np from tqdm import tqdm from environments import SimulatedSpe_edEnv, WebsocketEnv from environments.logging import CloudUploader, Spe_edLogger from e...
35.911475
121
0.589245
032a63d36e0c2a21ce1dba31d81de9a446407ad8
2,333
py
Python
decimate_mesh_blender.py
CarolineBao/mouse-brain-atlases_generator
a6e264b86de5fd561a9bfc46cd80c8ac0bb8dab1
[ "MIT" ]
8
2019-07-04T06:48:58.000Z
2020-06-30T19:34:47.000Z
decimate_mesh_blender.py
CarolineBao/mouse-brain-atlases_generator
a6e264b86de5fd561a9bfc46cd80c8ac0bb8dab1
[ "MIT" ]
2
2018-11-15T16:59:29.000Z
2019-02-20T20:25:15.000Z
decimate_mesh_blender.py
CarolineBao/mouse-brain-atlases_generator
a6e264b86de5fd561a9bfc46cd80c8ac0bb8dab1
[ "MIT" ]
5
2019-07-04T06:57:19.000Z
2021-01-13T15:06:49.000Z
import bpy import os import sys import argparse ## Example call from commandline: blender -b -P decimate_mesh_blender.py -- -f mesh.obj -o mesh_dec.obj -r 0.5 -i 2 -n 4 -l 0.5 ## Blender will ignore all options after -- so parameters can be passed to python script. # get the args passed to blender after "--", all of ...
33.328571
127
0.747964
032aa1f493c05b23ef746e78309c1c85d0e7b5db
7,489
py
Python
phonlp/models/jointmodel/trainer.py
WEYAI/PhoNLP
8fefe49965dc6346c224a5636d9333a7ddf55a2c
[ "Apache-2.0" ]
null
null
null
phonlp/models/jointmodel/trainer.py
WEYAI/PhoNLP
8fefe49965dc6346c224a5636d9333a7ddf55a2c
[ "Apache-2.0" ]
null
null
null
phonlp/models/jointmodel/trainer.py
WEYAI/PhoNLP
8fefe49965dc6346c224a5636d9333a7ddf55a2c
[ "Apache-2.0" ]
null
null
null
""" A trainer class to handle training and testing of models. """ import sys import torch from phonlp.models.common import utils as util from phonlp.models.common.chuliu_edmonds import chuliu_edmonds_one_root from phonlp.models.common.crf import viterbi_decode from phonlp.models.common.trainer import Trainer as BaseTr...
38.603093
118
0.614501
032ac7f1b4fb598085ab038293cd823249ad513a
2,884
py
Python
translation-transformer/inference.py
lyeoni/pytorch-nlp-tutorial
8cc490adc6cc92d458548e0e73fbbf1db575f049
[ "MIT" ]
1,433
2018-12-14T06:20:28.000Z
2022-03-31T14:12:50.000Z
translation-transformer/inference.py
itsshaikaslam/nlp-tutorial-1
6e4c74e103f4cdc5e0559d987ae6e41c40e17a5a
[ "MIT" ]
14
2019-04-03T08:30:23.000Z
2021-07-11T11:41:05.000Z
translation-transformer/inference.py
itsshaikaslam/nlp-tutorial-1
6e4c74e103f4cdc5e0559d987ae6e41c40e17a5a
[ "MIT" ]
306
2018-12-20T09:41:24.000Z
2022-03-31T05:07:14.000Z
import argparse import torch from tokenization import Tokenizer, PretrainedTokenizer def main(args): print(args) # Load tokenizer tokenizer_src = PretrainedTokenizer(pretrained_model = args.pretrained_model_src, vocab_file = args.vocab_file_src) tokenizer_tgt = PretrainedTokenizer(pretrained_mode...
45.0625
179
0.65638
032af99c7d3e14c358edeed5806e9de7e655ba11
161
py
Python
main.py
EpicEric/rpcar-controller
9ab8afa30b470000f9b9a8ec5e1182f656fc8f16
[ "MIT" ]
null
null
null
main.py
EpicEric/rpcar-controller
9ab8afa30b470000f9b9a8ec5e1182f656fc8f16
[ "MIT" ]
null
null
null
main.py
EpicEric/rpcar-controller
9ab8afa30b470000f9b9a8ec5e1182f656fc8f16
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from listen import listen if __name__ == "__main__": listen() else: raise ImportError("You should not use this file as a lib")
16.1
62
0.689441
032b0b2e9abd955c086b2984473fbd14d28de890
7,525
py
Python
test/language/indexed_offsets/python/OptionalIndexedOffsetArrayTest.py
PeachOS/zserio
ea01f6906c125a6baab7e8ed865eeb08cd46c37c
[ "BSD-3-Clause" ]
2
2019-02-06T17:50:24.000Z
2019-11-20T16:51:34.000Z
test/language/indexed_offsets/python/OptionalIndexedOffsetArrayTest.py
PeachOS/zserio
ea01f6906c125a6baab7e8ed865eeb08cd46c37c
[ "BSD-3-Clause" ]
1
2019-11-25T16:25:51.000Z
2019-11-25T18:09:39.000Z
test/language/indexed_offsets/python/OptionalIndexedOffsetArrayTest.py
PeachOS/zserio
ea01f6906c125a6baab7e8ed865eeb08cd46c37c
[ "BSD-3-Clause" ]
null
null
null
import unittest import zserio from testutils import getZserioApi class OptionalIndexedOffsetArrayTest(unittest.TestCase): @classmethod def setUpClass(cls): cls.api = getZserioApi(__file__, "indexed_offsets.zs").optional_indexed_offset_array def testBitSizeOfWithOptional(self): hasOptional...
44.526627
108
0.711495
032b1b88340794dce6ffb3d5ed5c0d009e97c560
37,022
py
Python
Polygon/lab_UI.py
shenhsinyu/Cam_Feild_Setting_UI
4fdb9b2d3823de154f035dabe8abfc4c6edb0dad
[ "MIT" ]
null
null
null
Polygon/lab_UI.py
shenhsinyu/Cam_Feild_Setting_UI
4fdb9b2d3823de154f035dabe8abfc4c6edb0dad
[ "MIT" ]
null
null
null
Polygon/lab_UI.py
shenhsinyu/Cam_Feild_Setting_UI
4fdb9b2d3823de154f035dabe8abfc4c6edb0dad
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- ################################################################################ # Form generated from reading UI file 'project changed.ui' # # Created by: Qt User Interface Compiler version 5.15.2 # # WARNING! All changes made in this file will be lost when recompiling UI file! #######...
43.098952
122
0.575442
032b2bc2df671163125cd68fd48272ea45d11a00
1,481
py
Python
tasks.py
iceye-ltd/icecube
9db3005f2ac2d6fb43d5562c0646527eb4ab6700
[ "MIT" ]
47
2021-08-25T09:40:29.000Z
2022-02-16T06:52:01.000Z
tasks.py
iceye-ltd/icecube
9db3005f2ac2d6fb43d5562c0646527eb4ab6700
[ "MIT" ]
7
2021-09-08T09:37:59.000Z
2022-01-04T10:12:45.000Z
tasks.py
iceye-ltd/icecube
9db3005f2ac2d6fb43d5562c0646527eb4ab6700
[ "MIT" ]
4
2021-09-01T12:40:23.000Z
2021-12-07T11:00:19.000Z
""" Note: Change variables in `deployment_conf.py` before using these tasks Docker specific tasks are prefixed with a d. docker run > drun """ import os from invoke import task PYTEST = "python3.8 -m pytest" PYTEST_COVERAGE = "-m pytest" PYTEST_FLAGS = "--color yes --durations 3 -ra --failed-first -x" @task def set...
22.439394
105
0.623228
032b34874383db103d55f275b7d30364bd68c73e
43,328
py
Python
indra/tests/test_preassembler.py
djinnome/indra
382b7f236e0b1422c96a268ef873530b5e92d48f
[ "BSD-2-Clause" ]
null
null
null
indra/tests/test_preassembler.py
djinnome/indra
382b7f236e0b1422c96a268ef873530b5e92d48f
[ "BSD-2-Clause" ]
null
null
null
indra/tests/test_preassembler.py
djinnome/indra
382b7f236e0b1422c96a268ef873530b5e92d48f
[ "BSD-2-Clause" ]
null
null
null
import os from indra.preassembler import Preassembler, render_stmt_graph, \ flatten_evidence, flatten_stmts from indra.sources import reach from indra.statements import * from indra.ontology.bio import bio_ontology from indra.ontology.world import world_ontology def test_duplicates(): ...
42.025218
81
0.635801
032b7d09a2a24bdac96291c3549e8fc86442fedb
3,191
py
Python
oslo_limit/fixture.py
openstack/oslo.limit
a6fff3be3194ebb26c5c851ddb0200f84458c46d
[ "Apache-2.0" ]
5
2018-06-27T11:21:26.000Z
2019-01-28T22:07:55.000Z
oslo_limit/fixture.py
openstack/oslo.limit
a6fff3be3194ebb26c5c851ddb0200f84458c46d
[ "Apache-2.0" ]
null
null
null
oslo_limit/fixture.py
openstack/oslo.limit
a6fff3be3194ebb26c5c851ddb0200f84458c46d
[ "Apache-2.0" ]
3
2018-11-02T16:09:57.000Z
2020-05-11T07:57:20.000Z
# Copyright 2021 Red Hat, Inc # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
41.986842
79
0.642432
032b7e18e955122557166fe38620ac20e89605d6
935
py
Python
conf/pyrogram.py
PushDotGame/telegram-forward-bot
40a54aff1a8b10e79fa8a6f611e2371c79869340
[ "Apache-2.0" ]
1
2020-07-09T02:26:14.000Z
2020-07-09T02:26:14.000Z
conf/pyrogram.py
PushDotGame/telegram-bots
40a54aff1a8b10e79fa8a6f611e2371c79869340
[ "Apache-2.0" ]
null
null
null
conf/pyrogram.py
PushDotGame/telegram-bots
40a54aff1a8b10e79fa8a6f611e2371c79869340
[ "Apache-2.0" ]
null
null
null
import sys from libs.settings import * from libs import config from decimal import Decimal dotenv.load_dotenv(dotenv_path=os.path.join(BASE_DIR, '.env')) PYROGRAM_API_ID = os.getenv("PYROGRAM_API_ID") PYROGRAM_API_HASH = os.getenv("PYROGRAM_API_HASH") PYROGRAM_APP_VERSION = os.getenv("PYROGRAM_APP_VERSION") ...
29.21875
91
0.720856
032b859d469ee5039e08e4af4c2f4ebf35c2ff19
14,120
py
Python
tensorflow/contrib/bayesflow/python/ops/monte_carlo_impl.py
tianyapiaozi/tensorflow
fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a
[ "Apache-2.0" ]
71
2017-05-25T16:02:15.000Z
2021-06-09T16:08:08.000Z
tensorflow/contrib/bayesflow/python/ops/monte_carlo_impl.py
tianyapiaozi/tensorflow
fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a
[ "Apache-2.0" ]
133
2017-04-26T16:49:49.000Z
2019-10-15T11:39:26.000Z
tensorflow/contrib/bayesflow/python/ops/monte_carlo_impl.py
tianyapiaozi/tensorflow
fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a
[ "Apache-2.0" ]
31
2018-09-11T02:17:17.000Z
2021-12-15T10:33:35.000Z
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
38.162162
80
0.652762
032baa4f1837078a2afe676badcdb0af3d7a9f49
1,469
py
Python
taxamo/models/confirmTransactionOut.py
taxamo/taxamo-python
190bdda68963860c131d2b1e9d31cd88de10d694
[ "Apache-2.0" ]
4
2016-03-14T03:59:08.000Z
2020-06-21T07:58:38.000Z
taxamo/models/confirmTransactionOut.py
taxamo/taxamo-python
190bdda68963860c131d2b1e9d31cd88de10d694
[ "Apache-2.0" ]
2
2016-03-07T13:41:23.000Z
2017-07-11T13:39:44.000Z
taxamo/models/confirmTransactionOut.py
taxamo/taxamo-python
190bdda68963860c131d2b1e9d31cd88de10d694
[ "Apache-2.0" ]
8
2016-01-13T14:32:19.000Z
2021-08-16T11:14:06.000Z
#!/usr/bin/env python """ Copyright 2014-2021 by Taxamo 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 applic...
38.657895
141
0.704561
032bafee0757a766cca2a97ec77f1dfbf5101968
6,276
py
Python
lib/rucio/daemons/badreplicas/minos_temporary_expiration.py
elichad/rucio
0705e4124e18c853c4661f85e00238cb0c6bd750
[ "Apache-2.0" ]
null
null
null
lib/rucio/daemons/badreplicas/minos_temporary_expiration.py
elichad/rucio
0705e4124e18c853c4661f85e00238cb0c6bd750
[ "Apache-2.0" ]
null
null
null
lib/rucio/daemons/badreplicas/minos_temporary_expiration.py
elichad/rucio
0705e4124e18c853c4661f85e00238cb0c6bd750
[ "Apache-2.0" ]
null
null
null
# Copyright 2013-2018 CERN for the benefit of the ATLAS collaboration. # # 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...
42.405405
147
0.639898
032bbb52721dfb8843ad8cfe1dc345fbe067acf4
16,126
py
Python
edb/edgeql/compiler/cast.py
aeros/edgedb
db8c240d1607765799caf124a4b418250e0c0a96
[ "Apache-2.0" ]
null
null
null
edb/edgeql/compiler/cast.py
aeros/edgedb
db8c240d1607765799caf124a4b418250e0c0a96
[ "Apache-2.0" ]
null
null
null
edb/edgeql/compiler/cast.py
aeros/edgedb
db8c240d1607765799caf124a4b418250e0c0a96
[ "Apache-2.0" ]
null
null
null
# # This source file is part of the EdgeDB open source project. # # Copyright 2008-present MagicStack Inc. and the EdgeDB authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http...
33.525988
79
0.634317
032bde72e4326c706bbadf54161d0cbbadabdf54
2,312
py
Python
tests/test_plugins.py
musicinmybrain/aws-xray-sdk-python
b8e59423f1891351ceb1a0bd585603e0cd46c74c
[ "Apache-2.0" ]
294
2017-10-10T19:01:04.000Z
2022-03-18T15:52:19.000Z
tests/test_plugins.py
musicinmybrain/aws-xray-sdk-python
b8e59423f1891351ceb1a0bd585603e0cd46c74c
[ "Apache-2.0" ]
285
2017-10-20T09:27:21.000Z
2022-03-29T15:33:45.000Z
tests/test_plugins.py
musicinmybrain/aws-xray-sdk-python
b8e59423f1891351ceb1a0bd585603e0cd46c74c
[ "Apache-2.0" ]
134
2017-10-11T13:55:17.000Z
2022-03-23T07:21:17.000Z
from aws_xray_sdk.core.plugins.utils import get_plugin_modules from mock import patch supported_plugins = ( 'ec2_plugin', 'ecs_plugin', 'elasticbeanstalk_plugin', ) def test_runtime_context_available(): plugins = get_plugin_modules(supported_plugins) for plugin in plugins: plugin.initial...
37.290323
103
0.700692
032be6c8da2371ea0e7180c37f2487ced1136f41
3,072
py
Python
kalman filter/assignment4-sol.py
zbs881314/Self-Driving-Car-
4e18a410b1ad6c542c72c7ee68f0a4042f45f9d3
[ "MIT" ]
1
2019-01-27T23:00:44.000Z
2019-01-27T23:00:44.000Z
kalman filter/assignment4-sol.py
zbs881314/Self-Driving-Car-
4e18a410b1ad6c542c72c7ee68f0a4042f45f9d3
[ "MIT" ]
null
null
null
kalman filter/assignment4-sol.py
zbs881314/Self-Driving-Car-
4e18a410b1ad6c542c72c7ee68f0a4042f45f9d3
[ "MIT" ]
null
null
null
import numpy as np from sim.sim2d_prediction import sim_run # Simulator options. options = {} options['FIG_SIZE'] = [8,8] options['ALLOW_SPEEDING'] = False # could change to True, make speed up class KalmanFilter: def __init__(self): # Initial State self.x = np.matrix([[55.], ...
31.670103
72
0.423828
032bee2d28acbd1a0fe4c8afee44c64d1dc8e0fb
26
py
Python
tests/wordpad_tests.py
rheard/pynetauto
4dbbed5786cee403aa3b073ef535215dcad30a6c
[ "MIT" ]
null
null
null
tests/wordpad_tests.py
rheard/pynetauto
4dbbed5786cee403aa3b073ef535215dcad30a6c
[ "MIT" ]
null
null
null
tests/wordpad_tests.py
rheard/pynetauto
4dbbed5786cee403aa3b073ef535215dcad30a6c
[ "MIT" ]
null
null
null
# TODO: Automate wordpad?
13
25
0.730769
032c065625c3b6a340bf99003ac7d71fc50f2361
171,876
py
Python
snap_shot.py
kuanhanl/cappresse
31cd7d03414a930f7e2c21e1a3eb5e7dd25cc500
[ "MIT" ]
2
2019-09-26T20:56:06.000Z
2019-11-18T21:03:27.000Z
snap_shot.py
kuanhanl/cappresse
31cd7d03414a930f7e2c21e1a3eb5e7dd25cc500
[ "MIT" ]
6
2018-03-19T20:36:49.000Z
2018-04-13T15:27:29.000Z
snap_shot.py
kuanhanl/cappresse
31cd7d03414a930f7e2c21e1a3eb5e7dd25cc500
[ "MIT" ]
5
2018-10-04T18:51:02.000Z
2020-07-02T15:31:35.000Z
snap = {} snap['Ngb',(1, 0, 1, 0, 'h')] = 1.0 snap['Ngb',(1, 0, 1, 0, 'c')] = 1.0 snap['Ngb',(1, 0, 1, 0, 'n')] = 1.0 snap['Ngb',(1, 0, 1, 1, 'h')] = 1.0 snap['Ngb',(1, 0, 1, 1, 'c')] = 1.0 snap['Ngb',(1, 0, 1, 1, 'n')] = 1.0 snap['Ngb',(1, 0, 1, 2, 'h')] = 1.0 snap['Ngb',(1, 0, 1, 2, 'c')] = 1.0 snap['Ngb',(1, 0, 1, 2...
43.490891
54
0.534409
032c077b81698261eabc228594ffaaf985c06173
320
py
Python
generator/management/commands/generate_titles.py
Matoking/Markovstuck
177fc714161752176d6d662eb908e5b3fb3bce11
[ "Unlicense" ]
3
2016-04-01T19:58:26.000Z
2016-08-14T23:21:53.000Z
generator/management/commands/generate_titles.py
Matoking/Markovstuck
177fc714161752176d6d662eb908e5b3fb3bce11
[ "Unlicense" ]
8
2020-02-11T21:45:28.000Z
2021-06-09T17:18:48.000Z
generator/management/commands/generate_titles.py
Matoking/Markovstuck
177fc714161752176d6d662eb908e5b3fb3bce11
[ "Unlicense" ]
null
null
null
from django.core.management.base import BaseCommand from generator.models import TitleText class Command(BaseCommand): help = "Generate titles" def handle(self, *args, **options): title_text = TitleText.objects.all()[0] for i in range(0, 25): print(title_text.generate_sentence())
26.666667
51
0.6875
032c29a38b96fa4595faf09239631373b36e779a
1,497
py
Python
assets/adventure-1.py
Akaito/ZeroToBoto
5806fa004ae4ce54d594303133d043d1e606f0e8
[ "Zlib" ]
null
null
null
assets/adventure-1.py
Akaito/ZeroToBoto
5806fa004ae4ce54d594303133d043d1e606f0e8
[ "Zlib" ]
null
null
null
assets/adventure-1.py
Akaito/ZeroToBoto
5806fa004ae4ce54d594303133d043d1e606f0e8
[ "Zlib" ]
null
null
null
# adventure-1.py #========================================================== class Room(object): """A describeable place which connects to other rooms.""" def __init__(self, name, connections={}): # Should assign something to each variable you want to exist on an # object during its initializ...
33.266667
80
0.60187
032c460ddc623af52210723dd5fc80c7d4e8fd5b
168
py
Python
pynamodb_mate/models.py
MacHu-GWU/pynamodb_mate-project
373ca8b21758b807632393f4a10dc70f57af082e
[ "MIT" ]
3
2019-09-17T23:01:45.000Z
2021-01-07T08:50:17.000Z
pynamodb_mate/models.py
MacHu-GWU/pynamodb_mate-project
373ca8b21758b807632393f4a10dc70f57af082e
[ "MIT" ]
1
2020-08-21T02:23:55.000Z
2020-09-21T15:05:19.000Z
pynamodb_mate/models.py
MacHu-GWU/pynamodb_mate-project
373ca8b21758b807632393f4a10dc70f57af082e
[ "MIT" ]
1
2021-01-07T00:57:18.000Z
2021-01-07T00:57:18.000Z
# -*- coding: utf-8 -*- from pynamodb.models import ( Model as PynamodbModel, ) class Model(PynamodbModel): """ Add more features later """ pass
12.923077
29
0.60119
032c83d4099e60f34df0af2342709b12c82319b9
14,666
py
Python
tests/test_read_parsers.py
wltrimbl/khmer
ff95776eabee96420f1ae43d0eff562682cbb17b
[ "CNRI-Python" ]
null
null
null
tests/test_read_parsers.py
wltrimbl/khmer
ff95776eabee96420f1ae43d0eff562682cbb17b
[ "CNRI-Python" ]
null
null
null
tests/test_read_parsers.py
wltrimbl/khmer
ff95776eabee96420f1ae43d0eff562682cbb17b
[ "CNRI-Python" ]
null
null
null
# This file is part of khmer, https://github.com/dib-lab/khmer/, and is # Copyright (C) 2013-2015, Michigan State University. # Copyright (C) 2015-2016, The Regents of the University of California. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the fol...
28.870079
79
0.666098
032cb4967ca6632e79028db869b313732260f309
251,169
py
Python
tencentcloud/cwp/v20180228/cwp_client.py
lleiyyang/tencentcloud-sdk-python
e6e6a4ce89286673b2322ae92d3c2fbf8665aa0b
[ "Apache-2.0" ]
37
2017-10-12T01:50:42.000Z
2022-02-24T02:44:45.000Z
tencentcloud/cwp/v20180228/cwp_client.py
lleiyyang/tencentcloud-sdk-python
e6e6a4ce89286673b2322ae92d3c2fbf8665aa0b
[ "Apache-2.0" ]
null
null
null
tencentcloud/cwp/v20180228/cwp_client.py
lleiyyang/tencentcloud-sdk-python
e6e6a4ce89286673b2322ae92d3c2fbf8665aa0b
[ "Apache-2.0" ]
12
2018-07-31T10:04:56.000Z
2022-02-07T00:08:06.000Z
# -*- coding: utf8 -*- # Copyright (c) 2017-2021 THL A29 Limited, a Tencent company. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses...
41.931386
109
0.59632
032cc021934a0869ec1f1592f64d0354e30f22bc
381
py
Python
Easy/2089 Find Target Indices After Sorting Array.py
raj713335/LeetCode
e60e145d90f45d37e148e8307a3d97f5f0741de0
[ "Apache-2.0" ]
null
null
null
Easy/2089 Find Target Indices After Sorting Array.py
raj713335/LeetCode
e60e145d90f45d37e148e8307a3d97f5f0741de0
[ "Apache-2.0" ]
null
null
null
Easy/2089 Find Target Indices After Sorting Array.py
raj713335/LeetCode
e60e145d90f45d37e148e8307a3d97f5f0741de0
[ "Apache-2.0" ]
null
null
null
# https://leetcode.com/problems/find-target-indices-after-sorting-array/ class Solution: def targetIndices(self, nums: List[int], target: int) -> List[int]: res = [] nums = sorted(nums) for i in range(0, len(nums)): if nums[i] == target: ...
23.8125
72
0.488189
032cc2fd08ecd328071e2da7806071034ba595a9
824
py
Python
py/cidoc_crm_types/properties/p121_overlaps_with.py
minorg/cidoc-crm-types
9018bdbf0658e4d28a87bc94543e467be45d8aa5
[ "Apache-2.0" ]
null
null
null
py/cidoc_crm_types/properties/p121_overlaps_with.py
minorg/cidoc-crm-types
9018bdbf0658e4d28a87bc94543e467be45d8aa5
[ "Apache-2.0" ]
null
null
null
py/cidoc_crm_types/properties/p121_overlaps_with.py
minorg/cidoc-crm-types
9018bdbf0658e4d28a87bc94543e467be45d8aa5
[ "Apache-2.0" ]
null
null
null
from dataclasses import dataclass @dataclass class P121OverlapsWith: """ Scope note: This symmetric property associates an instance of E53 Place with another instance of E53 Place geometrically overlapping it. It does not specify anything about the shared area. This property is purely spatial, in contrast to the...
32.96
238
0.760922
032cca09b00c3785a1d17cf0fb1399c6599bdf38
5,317
py
Python
discovery-provider/src/utils/config.py
AudiusProject/audius-protocol
0315c31402121b24faa039e93cea8869d5b80743
[ "Apache-2.0" ]
429
2019-08-14T01:34:07.000Z
2022-03-30T06:31:38.000Z
discovery-provider/src/utils/config.py
AudiusProject/audius-protocol
0315c31402121b24faa039e93cea8869d5b80743
[ "Apache-2.0" ]
998
2019-08-14T01:52:37.000Z
2022-03-31T23:17:22.000Z
discovery-provider/src/utils/config.py
AudiusProject/audius-protocol
0315c31402121b24faa039e93cea8869d5b80743
[ "Apache-2.0" ]
73
2019-10-04T04:24:16.000Z
2022-03-24T16:27:30.000Z
# TODO: Add DocString import logging import configparser import os import os.path import datetime import requests from flask import current_app logger = logging.getLogger(__name__) config_files = [] if os.path.isfile("default_config.ini"): config_files.append("default_config.ini") if os.path.isfile("contract_con...
38.810219
98
0.687794
032cca399447c57f7b8c9d7b2bbc8a9d54947646
7,952
py
Python
src/models/head_mlp.py
IML-DKFZ/m-pax_lib
54a97b0503c779fefbd4e71f9b68fdc465d7193e
[ "Apache-2.0" ]
2
2022-03-18T09:39:48.000Z
2022-03-18T09:41:41.000Z
src/models/head_mlp.py
IML-DKFZ/m-pax_lib
54a97b0503c779fefbd4e71f9b68fdc465d7193e
[ "Apache-2.0" ]
null
null
null
src/models/head_mlp.py
IML-DKFZ/m-pax_lib
54a97b0503c779fefbd4e71f9b68fdc465d7193e
[ "Apache-2.0" ]
null
null
null
import pytorch_lightning as pl import torch from torch import nn from torch.nn import functional as F from torch.optim import SGD, Adam from torch.optim.lr_scheduler import CosineAnnealingLR from torchmetrics.functional import confusion_matrix, accuracy from src.models.tcvae_resnet import * from src.models.tcvae_conv...
28.4
87
0.560111
032ccbc7834b80fe47ec4fe896997768ab955606
127,768
py
Python
src/sage/modular/btquotients/btquotient.py
saraedum/sage-renamed
d2da67b14da2ad766a5906425d60d43a3b3e1270
[ "BSL-1.0" ]
null
null
null
src/sage/modular/btquotients/btquotient.py
saraedum/sage-renamed
d2da67b14da2ad766a5906425d60d43a3b3e1270
[ "BSL-1.0" ]
null
null
null
src/sage/modular/btquotients/btquotient.py
saraedum/sage-renamed
d2da67b14da2ad766a5906425d60d43a3b3e1270
[ "BSL-1.0" ]
null
null
null
# -*- coding: utf-8 -*- ######################################################################### # Copyright (C) 2011 Cameron Franc and Marc Masdeu # # Distributed under the terms of the GNU General Public License (GPL) # # http://www.gnu.org/licenses/ ##########################################...
33.412134
773
0.520725
032ce0a78c1f7a50066f9b9445e7039c6bbe228d
1,292
py
Python
carts/migrations/0003_auto_20170908_1559.py
benoitboyer/DjangoBio
415e048e7207f4abc6ac9b6bde7b7c7043aab78a
[ "MIT" ]
null
null
null
carts/migrations/0003_auto_20170908_1559.py
benoitboyer/DjangoBio
415e048e7207f4abc6ac9b6bde7b7c7043aab78a
[ "MIT" ]
null
null
null
carts/migrations/0003_auto_20170908_1559.py
benoitboyer/DjangoBio
415e048e7207f4abc6ac9b6bde7b7c7043aab78a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2017-09-08 11:59 from __future__ import unicode_literals import datetime from django.db import migrations, models import django.db.models.deletion from django.utils.timezone import utc class Migration(migrations.Migration): dependencies = [ ('profi...
34
127
0.616099
032ce3a8d88c0e972c9339d64022b32bf9775818
4,295
py
Python
symbols/symbol_to_id_lookup.py
FlyBase/bulkfile-scripts
cddd06a8c91e7448608e73a49f73c4ca5ef914d8
[ "BSD-3-Clause" ]
2
2017-12-04T17:41:56.000Z
2020-03-06T05:38:17.000Z
symbols/symbol_to_id_lookup.py
FlyBase/bulkfile-scripts
cddd06a8c91e7448608e73a49f73c4ca5ef914d8
[ "BSD-3-Clause" ]
null
null
null
symbols/symbol_to_id_lookup.py
FlyBase/bulkfile-scripts
cddd06a8c91e7448608e73a49f73c4ca5ef914d8
[ "BSD-3-Clause" ]
4
2018-07-12T07:02:20.000Z
2020-03-07T05:42:16.000Z
#!/usr/bin/env python3 import sys import os import re """ This script accepts a list of gene or transcript symbol/synonyms and converts them into one or more FlyBase IDs. The synonyms file can be download from: ftp://ftp.flybase.org/releases/current/precomputed_files/synonyms/ Usage: ./symbol_to_id_lookup.py your...
35.204918
102
0.594179
032cec55d0e673bad8c0b15c360554b8fe1bfd28
16,032
py
Python
improver_tests/acceptance/test_spot_extract.py
owena11/improver
ff658db31364c0bdf3af3940736c260e10544705
[ "BSD-3-Clause" ]
1
2021-08-02T21:17:18.000Z
2021-08-02T21:17:18.000Z
improver_tests/acceptance/test_spot_extract.py
owena11/improver
ff658db31364c0bdf3af3940736c260e10544705
[ "BSD-3-Clause" ]
4
2018-01-24T11:29:15.000Z
2021-01-11T15:16:21.000Z
improver_tests/acceptance/test_spot_extract.py
owena11/improver
ff658db31364c0bdf3af3940736c260e10544705
[ "BSD-3-Clause" ]
1
2021-08-02T21:17:19.000Z
2021-08-02T21:17:19.000Z
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # (C) British Crown Copyright 2017-2021 Met Office. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions a...
33.4
86
0.663486
032cff2fb53aa1152be2540a24fd4cf6c941c132
892
py
Python
sandbox/order/migrations/0005_auto_20170502_1553.py
thelabnyc/django-oscar-cch
d98832c9cf642c6d241e3aaf4b1dc631c3d5ce0e
[ "0BSD" ]
null
null
null
sandbox/order/migrations/0005_auto_20170502_1553.py
thelabnyc/django-oscar-cch
d98832c9cf642c6d241e3aaf4b1dc631c3d5ce0e
[ "0BSD" ]
14
2020-02-11T21:53:07.000Z
2022-01-13T00:40:33.000Z
sandbox/order/migrations/0005_auto_20170502_1553.py
thelabnyc/django-oscar-cch
d98832c9cf642c6d241e3aaf4b1dc631c3d5ce0e
[ "0BSD" ]
1
2016-05-31T10:02:38.000Z
2016-05-31T10:02:38.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.10.7 on 2017-05-02 15:53 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ("order", "0004_auto_20160325_1012"), ] operations =...
26.235294
78
0.56278
032d429632bb729abc69444995454dacc3ad7227
5,034
py
Python
tph/monitor/views.py
ono-t01/django-rpi-tph-monitor
30894d937ece11f8c7d087dd735cd79b203f0cf4
[ "MIT" ]
null
null
null
tph/monitor/views.py
ono-t01/django-rpi-tph-monitor
30894d937ece11f8c7d087dd735cd79b203f0cf4
[ "MIT" ]
null
null
null
tph/monitor/views.py
ono-t01/django-rpi-tph-monitor
30894d937ece11f8c7d087dd735cd79b203f0cf4
[ "MIT" ]
null
null
null
""" Views contoroller. @date 27 November 2019 @author mitsuhisaT <asihustim@gmail.com> """ from importlib import import_module import logging import deprecation from datetime import timedelta from django.conf import settings as ts from django.http import JsonResponse, HttpResponse, Http404 from django.shortcuts import...
35.702128
79
0.65594
032d4ca7f25653ed0afefbf9e6587250272224f4
168,751
py
Python
Tests/test_NCBIXML.py
mikepm35/biopython
9f2d4d8d70ec7223df35fdc3d9c4a3c018756327
[ "BSD-3-Clause" ]
null
null
null
Tests/test_NCBIXML.py
mikepm35/biopython
9f2d4d8d70ec7223df35fdc3d9c4a3c018756327
[ "BSD-3-Clause" ]
null
null
null
Tests/test_NCBIXML.py
mikepm35/biopython
9f2d4d8d70ec7223df35fdc3d9c4a3c018756327
[ "BSD-3-Clause" ]
1
2019-03-14T18:59:30.000Z
2019-03-14T18:59:30.000Z
# Copyright 2005 by Michiel de Hoon. All rights reserved. # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. """Test the NCBI XML parser.""" import os import unittest from Bio.Blast import NCBIXML E_V...
53.656916
328
0.686645
032d4cb2acecbe87027f0e5108930fc184bd59ce
2,047
py
Python
tests/flake8_sphinx_links_test.py
python-formate/flake8-sphinx-links
7a45a6fdc64d94133df05c6d658a6ed3550e4994
[ "MIT" ]
1
2021-03-17T13:31:11.000Z
2021-03-17T13:31:11.000Z
tests/flake8_sphinx_links_test.py
domdfcoding/flake8-sphinx-links
8cb182244320ddb1d6a352fa1c043b968a333ae7
[ "MIT" ]
24
2020-07-30T09:43:43.000Z
2021-04-26T18:54:55.000Z
tests/flake8_sphinx_links_test.py
domdfcoding/flake8-sphinx-links
8cb182244320ddb1d6a352fa1c043b968a333ae7
[ "MIT" ]
null
null
null
# stdlib import ast # 3rd party import pytest # this package from flake8_sphinx_links import SXL001, Plugin, class_, exc, py_obj, py_obj_python def results(s): return {"{}:{}: {}".format(*r) for r in Plugin(ast.parse(s)).run()} @pytest.mark.parametrize("obj", py_obj) def test_bad_docstring_py_obj(obj): test_cod...
13.379085
82
0.548608
032d6001bec54cb8cde4f751ca360cb5d748ccac
1,019
py
Python
ucb_cs61A/quiz/quiz03/tests/legal.py
tavaresdong/courses-notes
7fb89103bca679f5ef9b14cbc777152daac1402e
[ "MIT" ]
null
null
null
ucb_cs61A/quiz/quiz03/tests/legal.py
tavaresdong/courses-notes
7fb89103bca679f5ef9b14cbc777152daac1402e
[ "MIT" ]
1
2017-07-31T08:15:26.000Z
2017-07-31T08:15:26.000Z
ucb_cs61A/quiz/quiz03/tests/legal.py
tavaresdong/courses-notes
7fb89103bca679f5ef9b14cbc777152daac1402e
[ "MIT" ]
1
2019-10-06T16:52:31.000Z
2019-10-06T16:52:31.000Z
test = { 'name': 'legal', 'points': 1, 'suites': [ { 'cases': [ { 'code': r""" scm> (legal '(3 7) 5) ((3 . False) (7 . True)) """, 'hidden': False, 'locked': False }, { 'code': r""" scm> (legal '(5 2 ...
23.159091
45
0.31894
032d6c600fbcdae76913b5fb1347461373aefd62
96
py
Python
images/MER/create_lexicon.py
nleguillarme/snr_tools_and_methods
0a62b411989289a72b2dbf8e3a60bcdc32306dae
[ "Apache-2.0" ]
2
2021-08-24T14:57:26.000Z
2022-02-07T19:46:48.000Z
images/MER/create_lexicon.py
nleguillarme/snr_tools_and_methods
0a62b411989289a72b2dbf8e3a60bcdc32306dae
[ "Apache-2.0" ]
null
null
null
images/MER/create_lexicon.py
nleguillarme/snr_tools_and_methods
0a62b411989289a72b2dbf8e3a60bcdc32306dae
[ "Apache-2.0" ]
null
null
null
import merpy merpy.create_lexicon_from_file("ncbi.txt", "ncbi") merpy.process_lexicon("ncbi")
16
50
0.78125
032d6eb28fc70c71ca5038e7cbdf7ccbc7d13aae
1,177
py
Python
tests/test_elastic_search.py
NYPL-Simplified/dictionary-api
282c1a7d0501786e97c6cf921dbdffa4da3ff598
[ "Apache-2.0" ]
1
2020-10-05T12:23:10.000Z
2020-10-05T12:23:10.000Z
tests/test_elastic_search.py
NYPL-Simplified/dictionary-api
282c1a7d0501786e97c6cf921dbdffa4da3ff598
[ "Apache-2.0" ]
4
2020-01-22T20:36:30.000Z
2020-03-12T17:07:58.000Z
tests/test_elastic_search.py
NYPL-Simplified/dictionary-api
282c1a7d0501786e97c6cf921dbdffa4da3ff598
[ "Apache-2.0" ]
null
null
null
import logging from elasticsearch import Elasticsearch from nose.tools import ( eq_, set_trace, ) from api.elastic_search import ( ExternalSearchIndex, MockExternalSearchIndex, ) from api.app import app class TestExternalSearchIndex(): def setup(self): es_url = app.config["TEST_ELASTIC_SEARCH_URL"] s...
29.425
87
0.691589
032dd2e3718f7c4d231fec641f3e73f6d4c7327c
1,187
py
Python
utilities.py
ProtKsen/pgame
c4455c6c07eaf275f9fcfa661cd6933ee7b1ff92
[ "MIT" ]
2
2021-04-14T09:49:27.000Z
2022-03-08T17:26:49.000Z
utilities.py
ProtKsen/pgame
c4455c6c07eaf275f9fcfa661cd6933ee7b1ff92
[ "MIT" ]
null
null
null
utilities.py
ProtKsen/pgame
c4455c6c07eaf275f9fcfa661cd6933ee7b1ff92
[ "MIT" ]
2
2021-01-11T12:09:26.000Z
2021-04-14T09:49:45.000Z
"""Some additional functions.""" import os from texts import SEPARATOR, CONT_GAME def clear(): """Cleaning console.""" return os.system('cls' if os.name == 'nt' else 'clear') def printing(f_print): """Changing the standard print function.""" def inner(*args, **kwargs): """Printing text in t...
22.396226
59
0.577928
032dd466c58aab15fcfe54642491eba4025f614d
629
py
Python
tests/test_base.py
giommok/cumulator
042e303b64976ef71a93a91aa85180f14d46c25e
[ "MIT" ]
1
2020-06-10T10:23:54.000Z
2020-06-10T10:23:54.000Z
tests/test_base.py
giommok/cumulator
042e303b64976ef71a93a91aa85180f14d46c25e
[ "MIT" ]
null
null
null
tests/test_base.py
giommok/cumulator
042e303b64976ef71a93a91aa85180f14d46c25e
[ "MIT" ]
1
2020-06-10T10:24:33.000Z
2020-06-10T10:24:33.000Z
import unittest from src.cumulator.base import Cumulator class TestBase(unittest.TestCase): def test_run(self): cumulator = Cumulator() # Test without parameters def foo(): return 1 output = cumulator.run(foo) self.assertEqual(1, output) # Tests with ...
20.290323
43
0.573927
032de80813ddb4573ea7ba2a4833d3972fd2a66f
7,067
py
Python
appengine_module/gae_ts_mon/test/instrument_webapp2_test.py
allaparthi/monorail
e18645fc1b952a5a6ff5f06e0c740d75f1904473
[ "BSD-3-Clause" ]
null
null
null
appengine_module/gae_ts_mon/test/instrument_webapp2_test.py
allaparthi/monorail
e18645fc1b952a5a6ff5f06e0c740d75f1904473
[ "BSD-3-Clause" ]
null
null
null
appengine_module/gae_ts_mon/test/instrument_webapp2_test.py
allaparthi/monorail
e18645fc1b952a5a6ff5f06e0c740d75f1904473
[ "BSD-3-Clause" ]
null
null
null
# Copyright 2019 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import mock import webapp2 from .test_support import test_case from google.appengine.api.runtime import runtime from infra_libs.ts_mon import co...
28.611336
77
0.691807
032e04cf6a92f5e573a26979d6de03d3e6ac72dd
15,791
py
Python
utils_psgail.py
oldpaws/AI3601_RL_Final_Project_MAGAIL
6e53d5c4ad21c9e3907e6d14b20c04b3287800cf
[ "MIT" ]
null
null
null
utils_psgail.py
oldpaws/AI3601_RL_Final_Project_MAGAIL
6e53d5c4ad21c9e3907e6d14b20c04b3287800cf
[ "MIT" ]
null
null
null
utils_psgail.py
oldpaws/AI3601_RL_Final_Project_MAGAIL
6e53d5c4ad21c9e3907e6d14b20c04b3287800cf
[ "MIT" ]
null
null
null
import sys import numpy as np import torch import random import matplotlib.pyplot as plt import time import math from collections import defaultdict import cv2 # Increase system recursion limit sys.setrecursionlimit(25000) if torch.cuda.is_available(): device = "cuda:0" else: device = "cpu" def im_show(image...
44.860795
246
0.614337
032e0f649fcebcf364c2f3b89bca94e3c3375de6
8,163
py
Python
tests/smb_share_fixtures.py
IMTEK-Simulation/imteksimfw
887275920ea864b02ae5149a7c85c656ab5f34b6
[ "MIT" ]
null
null
null
tests/smb_share_fixtures.py
IMTEK-Simulation/imteksimfw
887275920ea864b02ae5149a7c85c656ab5f34b6
[ "MIT" ]
null
null
null
tests/smb_share_fixtures.py
IMTEK-Simulation/imteksimfw
887275920ea864b02ae5149a7c85c656ab5f34b6
[ "MIT" ]
null
null
null
"""smb share fixture.""" import logging import pytest import requests import time import urllib3 from smb.SMBConnection import SMBConnection from smb.base import NotConnectedError from utils import _allocate_random_free_port, _random_string SAMBA_CONTAINER_IMAGE_NAME = 'docker.io/dperson/samba:latest' SAMBA_HOST = ...
42.07732
110
0.589122
032e5752d128c0ea475990e30948de2c07cc62d5
2,280
py
Python
experiment_utils.py
lechugaa/negative-graphs
3cf46a29b96cc07964ec8f2cd90aa98346544113
[ "MIT" ]
null
null
null
experiment_utils.py
lechugaa/negative-graphs
3cf46a29b96cc07964ec8f2cd90aa98346544113
[ "MIT" ]
null
null
null
experiment_utils.py
lechugaa/negative-graphs
3cf46a29b96cc07964ec8f2cd90aa98346544113
[ "MIT" ]
null
null
null
import networkx as nx from noisy_graphs.noisy_graph import NoisyGraph def create_data_path_file(data_path: str): header = "exp_name,sigma_mean,sigma_variance,uncertainty_mean,uncertainty_variance,dc_distance," \ "dc_correlation,dc_mean_change,bc_distance,bc_correlation,bc_mean_change,cc_distance," \ ...
41.454545
108
0.745614
032e5effac0f0a0465e2a3977a0ebcbff7fc6f59
7,004
py
Python
src/preprocessors/face_preprocessor.py
kevincong95/cs231n-emotiw
edf3e91cc585f6701c0d7946d4263da0025ad352
[ "MIT" ]
2
2020-11-25T15:16:51.000Z
2021-03-26T23:52:11.000Z
src/preprocessors/face_preprocessor.py
fusical/emotiw
edf3e91cc585f6701c0d7946d4263da0025ad352
[ "MIT" ]
1
2020-05-27T02:00:04.000Z
2020-05-27T02:00:04.000Z
src/preprocessors/face_preprocessor.py
fusical/emotiw
edf3e91cc585f6701c0d7946d4263da0025ad352
[ "MIT" ]
3
2020-11-25T15:17:08.000Z
2021-12-17T09:41:50.000Z
import zipfile import cv2 from concurrent.futures import ThreadPoolExecutor from pathlib import Path import os from os.path import isfile, join import face_recognition import pickle class FacePreprocessor: """ Extract the faces from the videos. Faces are stored in a flat directory structure (no categorica...
42.448485
175
0.58438
032e762f627c46d8a224602c88b8558739fa3cd7
7,840
py
Python
oscar_docdata/facade.py
django-oscar/django-oscar-docdata
8f95458d4dff7d27ec507bacfede0a19e1f0e6b2
[ "ECL-2.0", "Apache-2.0" ]
15
2017-04-25T10:31:27.000Z
2022-03-01T10:58:10.000Z
oscar_docdata/facade.py
django-oscar/django-oscar-docdata
8f95458d4dff7d27ec507bacfede0a19e1f0e6b2
[ "ECL-2.0", "Apache-2.0" ]
45
2017-04-26T13:17:51.000Z
2022-02-16T12:27:57.000Z
oscar_docdata/facade.py
django-oscar/django-oscar-docdata
8f95458d4dff7d27ec507bacfede0a19e1f0e6b2
[ "ECL-2.0", "Apache-2.0" ]
7
2017-07-18T03:43:53.000Z
2020-07-10T16:29:30.000Z
""" Bridging module between Oscar and the gateway module (which is Oscar agnostic) """ import logging import importlib from django.db import transaction from django.utils.translation import get_language from oscar.apps.order.exceptions import InvalidOrderStatus from oscar.apps.payment.exceptions import PaymentError fr...
39.004975
185
0.659566
032e8feadcf93193edf025e83e8986ab984f0f27
762
py
Python
TVDNet/models/spinal_net.py
chenyao96/TVDNet
26fb2bfe65612b89b1a98edfe3d3e7308c6272e3
[ "MIT" ]
null
null
null
TVDNet/models/spinal_net.py
chenyao96/TVDNet
26fb2bfe65612b89b1a98edfe3d3e7308c6272e3
[ "MIT" ]
null
null
null
TVDNet/models/spinal_net.py
chenyao96/TVDNet
26fb2bfe65612b89b1a98edfe3d3e7308c6272e3
[ "MIT" ]
null
null
null
from .dec_net import DecNet from . import resnet import torch.nn as nn import numpy as np class SpineNet(nn.Module): def __init__(self, heads, pretrained, down_ratio, final_kernel, head_conv): super(SpineNet, self).__init__() assert down_ratio in [2, 4, 8, 16] channels = [3, 64, 64, 128, 2...
28.222222
81
0.641732
032e9844240f5dd1b8e6227252276cbea9bd3fee
3,577
py
Python
main/api/v1/upload_api.py
wodore/wodore-ng
0f5f1fd720a52a36e8bfe0cc588a81bdf43b0ce5
[ "MIT" ]
null
null
null
main/api/v1/upload_api.py
wodore/wodore-ng
0f5f1fd720a52a36e8bfe0cc588a81bdf43b0ce5
[ "MIT" ]
null
null
null
main/api/v1/upload_api.py
wodore/wodore-ng
0f5f1fd720a52a36e8bfe0cc588a81bdf43b0ce5
[ "MIT" ]
null
null
null
# coding: utf-8 # pylint: disable=too-few-public-methods, no-self-use, missing-docstring, unused-argument """ Provides API logic relevant to users """ from flask_restful import reqparse, Resource import auth import util from main import API from model import User, UserValidator import model from api.helpers import Ar...
39.307692
128
0.648588
032eb733df7a59ff0b4f04b6072c725ddcf3abb9
3,859
py
Python
Leetcode/Out of Boundary Paths/out_of_bounds.py
vedant-jad99/GeeksForGeeks-DSA-Workshop-Complete-Codes
35cee8317c05b36864a992789c741554205b3919
[ "MIT" ]
1
2021-02-11T14:54:34.000Z
2021-02-11T14:54:34.000Z
Leetcode/Out of Boundary Paths/out_of_bounds.py
vedant-jad99/GeeksForGeeks-DSA-Workshop-Complete-Codes
35cee8317c05b36864a992789c741554205b3919
[ "MIT" ]
null
null
null
Leetcode/Out of Boundary Paths/out_of_bounds.py
vedant-jad99/GeeksForGeeks-DSA-Workshop-Complete-Codes
35cee8317c05b36864a992789c741554205b3919
[ "MIT" ]
null
null
null
""" There is an m x n grid with a ball. The ball is initially at the position [startRow, startColumn]. You are allowed to move the ball to one of the four adjacent cells in the grid (possibly out of the grid crossing the grid boundary). You can apply at most maxMove moves to the ball. Given the five integers m, n, max...
36.40566
178
0.423167
032ec266f3b6f3d74771d561cafb7054dd5fdf6d
9,404
py
Python
src/osxfixup/osxfixup.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
226
2018-12-29T01:13:49.000Z
2022-03-30T19:16:31.000Z
src/osxfixup/osxfixup.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
5,100
2019-01-14T18:19:25.000Z
2022-03-31T23:08:36.000Z
src/osxfixup/osxfixup.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
84
2019-01-24T17:41:50.000Z
2022-03-10T10:01:46.000Z
# Copyright (c) Lawrence Livermore National Security, LLC and other VisIt # Project developers. See the top-level LICENSE file for dates and other # details. No copyright assignment is required to contribute to VisIt. import os import sys import stat import subprocess import fnmatch from os.path import join as pjo...
35.089552
97
0.544768
032ed8003a8c6e75cb2b1f220a0d4ce616478ad6
7,438
py
Python
txdav/common/datastore/test/test_sql_schema_files.py
eventable/CalendarServer
384444edb1966b530bc391789afbe3fb9cd6fd3e
[ "Apache-2.0" ]
1
2017-02-18T19:22:19.000Z
2017-02-18T19:22:19.000Z
txdav/common/datastore/test/test_sql_schema_files.py
eventable/CalendarServer
384444edb1966b530bc391789afbe3fb9cd6fd3e
[ "Apache-2.0" ]
null
null
null
txdav/common/datastore/test/test_sql_schema_files.py
eventable/CalendarServer
384444edb1966b530bc391789afbe3fb9cd6fd3e
[ "Apache-2.0" ]
null
null
null
# # # Copyright (c) 2012-2015 Apple Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
40.423913
148
0.640091
032f270fa22a18a18a31b38121f6f91b3887f99d
3,716
py
Python
common/schedules.py
ethanabrooks/teacher-RL
41b44fa4de1e8ce7e0c3eac726919c28ede63538
[ "MIT" ]
null
null
null
common/schedules.py
ethanabrooks/teacher-RL
41b44fa4de1e8ce7e0c3eac726919c28ede63538
[ "MIT" ]
null
null
null
common/schedules.py
ethanabrooks/teacher-RL
41b44fa4de1e8ce7e0c3eac726919c28ede63538
[ "MIT" ]
null
null
null
"""This file is used for specifying various schedules that evolve over time throughout the execution of the algorithm, such as: - learning rate for the optimizer - exploration epsilon for the epsilon greedy exploration strategy - beta parameter for beta parameter in prioritized replay Each schedule has a function `...
36.431373
88
0.634822
032f4c64eeeb2695eddd1ffb82fbd07ccd03716c
155
py
Python
0x03-python-data_structures/8-multiple_returns.py
FatChicken277/holbertonschool-higher_level_programming
520d6310a5e2a874f8c5f5185d0fb769b6412e7c
[ "CNRI-Python" ]
null
null
null
0x03-python-data_structures/8-multiple_returns.py
FatChicken277/holbertonschool-higher_level_programming
520d6310a5e2a874f8c5f5185d0fb769b6412e7c
[ "CNRI-Python" ]
null
null
null
0x03-python-data_structures/8-multiple_returns.py
FatChicken277/holbertonschool-higher_level_programming
520d6310a5e2a874f8c5f5185d0fb769b6412e7c
[ "CNRI-Python" ]
null
null
null
#!/usr/bin/python3 def multiple_returns(sentence): if sentence == "" or not sentence: return (0, None) return (len(sentence), sentence[0])
25.833333
39
0.645161
032f621bbe84d282c07265a11d3d4e3202320876
1,694
py
Python
datascience/census_data/census.py
JASTYN/pythonmaster
46638ab09d28b65ce5431cd0759fe6df272fb85d
[ "Apache-2.0", "MIT" ]
3
2017-05-02T10:28:13.000Z
2019-02-06T09:10:11.000Z
datascience/census_data/census.py
JASTYN/pythonmaster
46638ab09d28b65ce5431cd0759fe6df272fb85d
[ "Apache-2.0", "MIT" ]
2
2017-06-21T20:39:14.000Z
2020-02-25T10:28:57.000Z
datascience/census_data/census.py
JASTYN/pythonmaster
46638ab09d28b65ce5431cd0759fe6df272fb85d
[ "Apache-2.0", "MIT" ]
2
2016-07-29T04:35:22.000Z
2017-01-18T17:05:36.000Z
""" This script reads csv file and plots a chart""" import csv as csv import matplotlib.pyplot as plt DATA_FILE = "adult.csv" KEYS = ["age", "workclass", "fnlwgt", "education", "education-num", "marital-status", "occupation", "relationship", " race", "sex", "capital-gain", "capital-loss", "hours-per-week", ...
34.571429
99
0.567296
032fa015e89ddedc99a1600eeae6bfc0418b8ea5
5,440
py
Python
sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_log_files_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
1
2022-03-09T08:59:13.000Z
2022-03-09T08:59:13.000Z
sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_log_files_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
null
null
null
sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_log_files_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
44.590164
184
0.668199
032fa594a77e508ddc400392bd9310cfc5720960
117
py
Python
ecs_fargate/datadog_checks/ecs_fargate/__init__.py
dvanderveer/integrations-core
41dd9950296455457c9b7342584153678503d5aa
[ "BSD-3-Clause" ]
null
null
null
ecs_fargate/datadog_checks/ecs_fargate/__init__.py
dvanderveer/integrations-core
41dd9950296455457c9b7342584153678503d5aa
[ "BSD-3-Clause" ]
null
null
null
ecs_fargate/datadog_checks/ecs_fargate/__init__.py
dvanderveer/integrations-core
41dd9950296455457c9b7342584153678503d5aa
[ "BSD-3-Clause" ]
null
null
null
from . import ecs_fargate FargateCheck = ecs_fargate.FargateCheck __version__ = "1.2.0" __all__ = ['ecs_fargate']
14.625
39
0.752137
032fc271c99027a5c76c30cf692ff65cc67de232
2,215
py
Python
mne/fiff/tests/test_proj.py
mluessi/mne-python
aef0cd79b0543c6d121de236098bd7865feff39e
[ "BSD-3-Clause" ]
1
2022-03-23T22:26:50.000Z
2022-03-23T22:26:50.000Z
mne/fiff/tests/test_proj.py
neurodebian/mne-python
44a5ef5241a748b2f77c62fdcda6334220c6af45
[ "BSD-3-Clause" ]
null
null
null
mne/fiff/tests/test_proj.py
neurodebian/mne-python
44a5ef5241a748b2f77c62fdcda6334220c6af45
[ "BSD-3-Clause" ]
null
null
null
import os.path as op from nose.tools import assert_true import numpy as np from numpy.testing import assert_array_almost_equal from .. import Raw, pick_types, compute_spatial_vectors from ..proj import make_projector, read_proj from ..open import fiff_open from ... import read_events, Epochs raw_fname = op.join(op.d...
35.725806
76
0.628894
032fc8f49e6d70b2abacd77af4ce3c81fa6b9c88
1,016
py
Python
archive/aisle_navigation/carriage_end_detection/distance_check.py
SDP-Team10/Railly-Clean
f2960d995d9440ecfde6c04f67635f81977c140b
[ "MIT" ]
null
null
null
archive/aisle_navigation/carriage_end_detection/distance_check.py
SDP-Team10/Railly-Clean
f2960d995d9440ecfde6c04f67635f81977c140b
[ "MIT" ]
14
2021-01-24T11:52:26.000Z
2021-04-02T06:59:59.000Z
archive/aisle_navigation/carriage_end_detection/distance_check.py
SDP-Team10/Railly-Clean
f2960d995d9440ecfde6c04f67635f81977c140b
[ "MIT" ]
null
null
null
# Distance sensor helper functions for railly Clean from controller import Robot, DistanceSensor # Distance sensor initilazation def init_dist(robot, ds_names, timestep): """ function init_dist :param robot: webots robot object :param ds_name: names of the 'physical' distance sensor on the webots robot ...
36.285714
91
0.734252
032fcc4130d93df86e051088cbfb84805c5a2461
3,226
py
Python
Q1.py
garghimanshu565/Ass4
864491f0949b0b7c09d8a8c91fb30800821def6f
[ "BSD-3-Clause" ]
null
null
null
Q1.py
garghimanshu565/Ass4
864491f0949b0b7c09d8a8c91fb30800821def6f
[ "BSD-3-Clause" ]
null
null
null
Q1.py
garghimanshu565/Ass4
864491f0949b0b7c09d8a8c91fb30800821def6f
[ "BSD-3-Clause" ]
null
null
null
import copy visited_states = [] # heuristic fn - number of misplaced blocks as compared to goal state def heuristic(curr_state,goal_state): goal_=goal_state[3] val=0 for i in range(len(curr_state)): check_val=curr_state[i] if len(check_val)>0: for j in range(len(che...
33.957895
102
0.49845
032fd83f25fe2291806e0456bc65529ff38a9d38
4,085
py
Python
datatrans/management/commands/deleteduplicates.py
gtoffoli/django-datatrans
9be14e55e0869963deba03e0d070030f9422e5c9
[ "BSD-3-Clause" ]
1
2020-01-11T05:11:00.000Z
2020-01-11T05:11:00.000Z
datatrans/management/commands/deleteduplicates.py
jairtrejo/django-datatrans
72180b7cc0a127430c4a46512ce7be3c5972cce3
[ "BSD-3-Clause" ]
null
null
null
datatrans/management/commands/deleteduplicates.py
jairtrejo/django-datatrans
72180b7cc0a127430c4a46512ce7be3c5972cce3
[ "BSD-3-Clause" ]
null
null
null
from collections import defaultdict from datatrans.models import KeyValue from django.db import connection, transaction from django.core.management.base import BaseCommand from south.db import db class Command(BaseCommand): help = 'Deletes duplicate KeyValues, only mysql is supported in a fast way' @transact...
39.278846
118
0.573317
032fde67e36e6bbea2718bfd4fec9590e0214723
7,321
py
Python
TFLearn_sentiment/curses-2.2-source/curses-2.2/examples/life.py
oscarmore2/deep-learning-study
fdf3b1182b49f683f2cf7d2f85d3233b4af7ba10
[ "MIT" ]
null
null
null
TFLearn_sentiment/curses-2.2-source/curses-2.2/examples/life.py
oscarmore2/deep-learning-study
fdf3b1182b49f683f2cf7d2f85d3233b4af7ba10
[ "MIT" ]
null
null
null
TFLearn_sentiment/curses-2.2-source/curses-2.2/examples/life.py
oscarmore2/deep-learning-study
fdf3b1182b49f683f2cf7d2f85d3233b4af7ba10
[ "MIT" ]
null
null
null
#!/usr/bin/env python # life.py -- A curses-based version of Conway's Game of Life. # Contributed by AMK # # An empty board will be displayed, and the following commands are available: # E : Erase the board # R : Fill the board randomly # S : Step for a single generation # C : Update continuously until a key is str...
33.737327
87
0.510313
032ffa813f591a08ffca1ca03f74b8ff9ea0710d
3,339
py
Python
homeassistant/components/template/trigger.py
maximoei/core
3df67ff9e12868734b369a2a27612036638f6df4
[ "Apache-2.0" ]
1
2018-04-24T21:48:14.000Z
2018-04-24T21:48:14.000Z
homeassistant/components/template/trigger.py
maximoei/core
3df67ff9e12868734b369a2a27612036638f6df4
[ "Apache-2.0" ]
44
2020-08-03T07:31:07.000Z
2022-03-31T06:02:04.000Z
homeassistant/components/template/trigger.py
jeroen84/home-assistant
a47f73244c0b3fbe4210ffd7731be69b3984fbbd
[ "Apache-2.0" ]
2
2017-09-03T16:06:02.000Z
2021-01-12T15:07:52.000Z
"""Offer template automation rules.""" import logging import voluptuous as vol from homeassistant import exceptions from homeassistant.const import CONF_FOR, CONF_PLATFORM, CONF_VALUE_TEMPLATE from homeassistant.core import callback from homeassistant.helpers import config_validation as cv, template from homeassistan...
30.354545
85
0.586703
03302722fa394fad38f090415f2928429d28ad69
247
py
Python
WebMonitoring/API/settings.py
raresraf/rafMetrics
21eb5e8210364bf70eee746d71c45f3e353dcb10
[ "MIT" ]
15
2019-11-03T18:01:27.000Z
2021-05-05T20:54:57.000Z
WebMonitoring/API/settings.py
raresraf/rafMetrics
21eb5e8210364bf70eee746d71c45f3e353dcb10
[ "MIT" ]
392
2019-11-09T21:28:01.000Z
2022-03-31T13:04:45.000Z
WebMonitoring/API/settings.py
raresraf/rafMetrics
21eb5e8210364bf70eee746d71c45f3e353dcb10
[ "MIT" ]
1
2021-03-11T18:35:16.000Z
2021-03-11T18:35:16.000Z
import os # DB configs MYSQL_DATABASE_USER = "root" MYSQL_DATABASE_PASSWORD = "password" MYSQL_DATABASE_DB = "WebMonitoring" if os.environ.get("DOCKER_COMPOSE_BUILD"): MYSQL_DATABASE_HOST = "mysql" else: MYSQL_DATABASE_HOST = "10.96.0.2"
22.454545
42
0.761134
03302eee5a1a91a3107b47e9fcc1364843864412
4,492
py
Python
nozama-cloudsearch-data/nozama/cloudsearch/data/db.py
iGamesInc/nozama-cloudsearch
2f3637a98d4ef594cec0273a9c9c4cd8a8aac375
[ "BSD-3-Clause" ]
null
null
null
nozama-cloudsearch-data/nozama/cloudsearch/data/db.py
iGamesInc/nozama-cloudsearch
2f3637a98d4ef594cec0273a9c9c4cd8a8aac375
[ "BSD-3-Clause" ]
null
null
null
nozama-cloudsearch-data/nozama/cloudsearch/data/db.py
iGamesInc/nozama-cloudsearch
2f3637a98d4ef594cec0273a9c9c4cd8a8aac375
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ """ import logging from pymongo import MongoClient class DB(object): """An lightwrapper around a mongodb connection. The init is given the configuration dict:: dict( db_name='<name>', # test-db is default. port=<mongodb tcp port>, # 27012 by def...
25.816092
77
0.611309
03307e53b5ed1aff4d4ef45e26b6986a7e445dc9
407
py
Python
i2c_PersoAD_RW.py
OkTekk/uSpir
6e75a0214e50df75366da9810db2a6fc8fbd53d8
[ "Apache-2.0" ]
1
2016-11-05T09:00:12.000Z
2016-11-05T09:00:12.000Z
i2c_PersoAD_RW.py
laurentfournier/a.gus
6e75a0214e50df75366da9810db2a6fc8fbd53d8
[ "Apache-2.0" ]
null
null
null
i2c_PersoAD_RW.py
laurentfournier/a.gus
6e75a0214e50df75366da9810db2a6fc8fbd53d8
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python ''' ''' import datetime, time import os, sys import smbus ADC = 0x48 aTest = 0x40 bTest = 0x00 i = 0 bus = smbus.SMBus(1) while True: bus.write_byte_data(ADC, int(aTest), i) reading = bus.read_byte(ADC) print ("Read byte: {} - Write byte: {} - Value: {}").format(hex(reading), hex...
14.535714
97
0.594595
0330b982bb6266a4eb9b234eaae2b700e57e66d8
4,669
py
Python
vctl/helpers/helpers.py
GMH501/vctl-vsphere-cli
eaa26b79e13917ce06cf3a23f19a1c4b6761dffa
[ "Apache-2.0" ]
1
2020-07-12T14:27:34.000Z
2020-07-12T14:27:34.000Z
vctl/helpers/helpers.py
GMH501/vctl-vsphere-cli
eaa26b79e13917ce06cf3a23f19a1c4b6761dffa
[ "Apache-2.0" ]
3
2021-03-25T23:59:37.000Z
2021-06-02T02:28:17.000Z
vctl/helpers/helpers.py
GMH501/vctl-vsphere-cli
eaa26b79e13917ce06cf3a23f19a1c4b6761dffa
[ "Apache-2.0" ]
null
null
null
import os import sys import json import base64 import random import re import string from pathlib import Path import yaml from bs4 import BeautifulSoup from vctl.helpers.auth import decode_token from vctl.exceptions.exceptions import ContextNotFound, ConfigNotFound def random_string(n=5): """Generate a random s...
29.550633
86
0.61662
03310b9bffaca46900359de7310dfce19806de67
48,743
py
Python
sac.py
georgeliu233/DRLFD_Urban
08e448d50ba0def1f968ba51d5a24053f37a0791
[ "MIT" ]
1
2022-01-21T16:01:17.000Z
2022-01-21T16:01:17.000Z
sac.py
georgeliu233/DRLFD_Urban
08e448d50ba0def1f968ba51d5a24053f37a0791
[ "MIT" ]
null
null
null
sac.py
georgeliu233/DRLFD_Urban
08e448d50ba0def1f968ba51d5a24053f37a0791
[ "MIT" ]
null
null
null
import sys import time import warnings import numpy as np import tensorflow as tf from collections import deque from stable_baselines.common import tf_util, OffPolicyRLModel, SetVerbosity, TensorboardWriter from stable_baselines.common.vec_env import VecEnv from stable_baselines.common.math_util import safe_mean, unsc...
55.579247
168
0.591511
03311c6c5c8b82f8f605c79295855e4f5a3f5e82
5,613
py
Python
python3/numpy/Comparisons Masks and Boolean Logic.py
Nahid-Hassan/code-snippets
24bd4b81564887822a0801a696001fcbeb6a7a75
[ "MIT" ]
2
2020-09-29T04:09:41.000Z
2020-10-18T13:33:36.000Z
python3/numpy/Comparisons Masks and Boolean Logic.py
Nahid-Hassan/code-snippets
24bd4b81564887822a0801a696001fcbeb6a7a75
[ "MIT" ]
null
null
null
python3/numpy/Comparisons Masks and Boolean Logic.py
Nahid-Hassan/code-snippets
24bd4b81564887822a0801a696001fcbeb6a7a75
[ "MIT" ]
1
2021-12-26T04:55:55.000Z
2021-12-26T04:55:55.000Z
# Reference Book: Python Data Science Handbook (page:(70-77)) # Date(13 April, 2019) Day-3, Time = 3:25 PM # This section covers the use of Boolean masks to examine and manipulate values # within NumPy arrays. import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn; seaborn.set() #set...
36.212903
104
0.690362
033156afa59d43456ec4e0d24eefaca2c8ab504b
4,092
py
Python
alipay/aop/api/response/AlipayBossFncApinvoiceRcptQueryResponse.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
213
2018-08-27T16:49:32.000Z
2021-12-29T04:34:12.000Z
alipay/aop/api/response/AlipayBossFncApinvoiceRcptQueryResponse.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
29
2018-09-29T06:43:00.000Z
2021-09-02T03:27:32.000Z
alipay/aop/api/response/AlipayBossFncApinvoiceRcptQueryResponse.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
59
2018-08-27T16:59:26.000Z
2022-03-25T10:08:15.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.response.AlipayResponse import AlipayResponse from alipay.aop.api.domain.ArInvoiceReceiptOpenApiResponse import ArInvoiceReceiptOpenApiResponse from alipay.aop.api.domain.MultiCurrencyMoneyOpenApi import MultiCurrencyMoneyOpenApi from alipay...
35.582609
112
0.691105
033181b0ba1eaf4763e8c908dce36637dd37b9e5
684
py
Python
GPU/python/Matrix.py
maxtcurie/Parallel_programming
512ac4da0e99d4413e34790edcb255f2e145749e
[ "MIT" ]
null
null
null
GPU/python/Matrix.py
maxtcurie/Parallel_programming
512ac4da0e99d4413e34790edcb255f2e145749e
[ "MIT" ]
null
null
null
GPU/python/Matrix.py
maxtcurie/Parallel_programming
512ac4da0e99d4413e34790edcb255f2e145749e
[ "MIT" ]
null
null
null
import numba from numba import jit, cuda import numpy as np # to measure exec time from timeit import default_timer as timer n_loop=10000000 # normal function to run on cpu def func(a): for i in range(n_loop): a[i]+= 1 # function optimized to run on gpu #@jit(target...
21.375
43
0.584795
03318b52aa2a169255cac2fae1eceaa6c5d56358
1,443
py
Python
breadth_first_search/773_sliding_puzzle.py
shawlu95/Algorithm-Toolbox
b6c7b2228d8e70e0842e0bad607533a2c8322cf0
[ "MIT" ]
null
null
null
breadth_first_search/773_sliding_puzzle.py
shawlu95/Algorithm-Toolbox
b6c7b2228d8e70e0842e0bad607533a2c8322cf0
[ "MIT" ]
null
null
null
breadth_first_search/773_sliding_puzzle.py
shawlu95/Algorithm-Toolbox
b6c7b2228d8e70e0842e0bad607533a2c8322cf0
[ "MIT" ]
2
2020-02-07T20:49:02.000Z
2020-02-11T06:01:55.000Z
import itertools class Solution(object): def slidingPuzzle(self, board): R, C = len(board), len(board[0]) # flatten to 1-D turple, note that list is not hashable start = tuple(itertools.chain(*board)) # get index of element 0 from turple queue = [(start, start.index(0), 0)...
33.55814
81
0.454608
0331aad098565269ba79f6944e4e1f319dc3b4b2
21,162
py
Python
vnpy_pro/tools/chart.py
caizhanjin/vnpy
c0886dbd8eba7f506634b1700dfd09b0b098ef26
[ "MIT" ]
5
2020-09-13T05:07:38.000Z
2020-12-26T15:10:00.000Z
vnpy_pro/tools/chart.py
caizhanjin/vnpy
c0886dbd8eba7f506634b1700dfd09b0b098ef26
[ "MIT" ]
null
null
null
vnpy_pro/tools/chart.py
caizhanjin/vnpy
c0886dbd8eba7f506634b1700dfd09b0b098ef26
[ "MIT" ]
2
2020-06-03T06:40:31.000Z
2020-06-12T14:55:17.000Z
from pyecharts.charts import Line, Grid, Bar, Kline import pyecharts.options as opts import numpy as np import pandas as pd import os from functools import wraps def draw_daily_results_chart(daily_df, save_path): """绘制资金曲线图""" date_list = daily_df.index.values.tolist() balance_list = daily_df.balance.valu...
38.476364
118
0.502504
0331ad9aa997642f0a9913884bf9a868bd66591f
665
py
Python
mobiletrans/mtdistmap/management/commands/shortest_path.py
JoeJasinski/WindyTransit
b883c7eebe618923ecc7b1914a696543d8864215
[ "MIT" ]
1
2015-04-28T14:48:27.000Z
2015-04-28T14:48:27.000Z
mobiletrans/mtdistmap/management/commands/shortest_path.py
JoeJasinski/WindyTransit
b883c7eebe618923ecc7b1914a696543d8864215
[ "MIT" ]
null
null
null
mobiletrans/mtdistmap/management/commands/shortest_path.py
JoeJasinski/WindyTransit
b883c7eebe618923ecc7b1914a696543d8864215
[ "MIT" ]
null
null
null
import os from django.core.management.base import BaseCommand, CommandError from optparse import make_option from mobiletrans.mtdistmap.cta_conn import load_transitnetwork class Command(BaseCommand): args = '<stop_id stop_id >' help = 'caculates the shortest route between two transit stop ids.' def ...
30.227273
71
0.639098
0331efda0b723e5fe20f29a7c8115285b172ca34
4,187
py
Python
social_dist/test_1_settings.py
cmput404-project-2021fall/CMPUT404-project-socialdistribution
bbf002e827cda52b443f610139c7c2c5d6003292
[ "Apache-2.0" ]
null
null
null
social_dist/test_1_settings.py
cmput404-project-2021fall/CMPUT404-project-socialdistribution
bbf002e827cda52b443f610139c7c2c5d6003292
[ "Apache-2.0" ]
2
2021-10-10T17:51:01.000Z
2021-10-16T16:58:54.000Z
social_dist/test_1_settings.py
cmput404-project-2021fall/CMPUT404-project-socialdistribution
bbf002e827cda52b443f610139c7c2c5d6003292
[ "Apache-2.0" ]
null
null
null
""" Django settings for social_dist project. Generated by 'django-admin startproject' using Django 3.2.8. For more information on this file, see https://docs.djangoproject.com/en/3.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.2/ref/settings/ """ from pat...
25.687117
130
0.700024
0332327ae1ca463badfbd7c8cfed135a83262e66
3,733
py
Python
tests/livetest/test_api_alpaca.py
webclinic017/harvest
70c8de717b816fedb32c4d0c88b5544d874083e2
[ "MIT" ]
null
null
null
tests/livetest/test_api_alpaca.py
webclinic017/harvest
70c8de717b816fedb32c4d0c88b5544d874083e2
[ "MIT" ]
null
null
null
tests/livetest/test_api_alpaca.py
webclinic017/harvest
70c8de717b816fedb32c4d0c88b5544d874083e2
[ "MIT" ]
null
null
null
# Builtins import os import time import unittest import unittest.mock import datetime as dt from harvest.utils import * from harvest.definitions import * from harvest.api.alpaca import Alpaca secret_path = os.environ["SECRET_PATH"] debugger.setLevel("DEBUG") class TestAlpaca(unittest.TestCase): def test_current...
34.564815
83
0.668095
03323cf11b75e6467d7ee5010778e74c5e987286
6,934
py
Python
src/morphforgecontrib/simulation/channels/hh_style/neuron/mm_neuron_alphabeta.py
mikehulluk/morphforge
2a95096f144ed4ea487decb735ce66706357d3c7
[ "BSD-2-Clause" ]
1
2021-01-21T11:31:59.000Z
2021-01-21T11:31:59.000Z
src/morphforgecontrib/simulation/channels/hh_style/neuron/mm_neuron_alphabeta.py
mikehulluk/morphforge
2a95096f144ed4ea487decb735ce66706357d3c7
[ "BSD-2-Clause" ]
null
null
null
src/morphforgecontrib/simulation/channels/hh_style/neuron/mm_neuron_alphabeta.py
mikehulluk/morphforge
2a95096f144ed4ea487decb735ce66706357d3c7
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # --------------------------------------------------------------------- # Copyright (c) 2012 Michael Hull. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are m...
36.114583
120
0.714018
03324cc679485d662564b8ecd94ee51e154a783b
92,830
py
Python
tencentcloud/cdn/v20180606/cdn_client.py
lleiyyang/tencentcloud-sdk-python
e6e6a4ce89286673b2322ae92d3c2fbf8665aa0b
[ "Apache-2.0" ]
37
2017-10-12T01:50:42.000Z
2022-02-24T02:44:45.000Z
tencentcloud/cdn/v20180606/cdn_client.py
lleiyyang/tencentcloud-sdk-python
e6e6a4ce89286673b2322ae92d3c2fbf8665aa0b
[ "Apache-2.0" ]
null
null
null
tencentcloud/cdn/v20180606/cdn_client.py
lleiyyang/tencentcloud-sdk-python
e6e6a4ce89286673b2322ae92d3c2fbf8665aa0b
[ "Apache-2.0" ]
12
2018-07-31T10:04:56.000Z
2022-02-07T00:08:06.000Z
# -*- coding: utf8 -*- # Copyright (c) 2017-2021 THL A29 Limited, a Tencent company. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses...
41.553268
112
0.593838
03324ceb0b0466f225bcfc07d1966aa74c03e57d
19,737
py
Python
adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/lib/adafruit_pn532/adafruit_pn532.py
jacoblb64/pico_rgb_keypad_hid
3251ca6a98ef86d9f98c54f639c4d61810601a0b
[ "MIT" ]
47
2021-02-15T23:02:36.000Z
2022-03-04T21:30:03.000Z
adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/lib/adafruit_pn532/adafruit_pn532.py
jacoblb64/pico_rgb_keypad_hid
3251ca6a98ef86d9f98c54f639c4d61810601a0b
[ "MIT" ]
7
2021-02-19T20:00:08.000Z
2022-01-14T10:51:12.000Z
adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/lib/adafruit_pn532/adafruit_pn532.py
jacoblb64/pico_rgb_keypad_hid
3251ca6a98ef86d9f98c54f639c4d61810601a0b
[ "MIT" ]
14
2021-02-20T17:40:56.000Z
2022-01-01T19:53:38.000Z
# SPDX-FileCopyrightText: 2015-2018 Tony DiCola for Adafruit Industries # # SPDX-License-Identifier: MIT """ ``adafruit_pn532`` ==================================================== This module will let you communicate with a PN532 RFID/NFC shield or breakout using I2C, SPI or UART. * Author(s): Original Raspberry Pi...
39.553106
93
0.66692
03326cc87992cc4c776fd04842b9111a3e77f347
2,870
py
Python
nova/api/sizelimit.py
osrg/nova
14b6bc655145c832bd9c822e48f877818e0e53ff
[ "Apache-2.0" ]
null
null
null
nova/api/sizelimit.py
osrg/nova
14b6bc655145c832bd9c822e48f877818e0e53ff
[ "Apache-2.0" ]
null
null
null
nova/api/sizelimit.py
osrg/nova
14b6bc655145c832bd9c822e48f877818e0e53ff
[ "Apache-2.0" ]
null
null
null
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2012 OpenStack Foundation # # 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/LICE...
34.166667
78
0.639721
03327ad27d1372139b45df3a6eec00ba60cfff39
971
py
Python
codility.com/leader/equi.py
Jagrmi-C/jagrmitest
7c6cf61317972e5d7ddc4fdced0b4e5e6dd52e96
[ "MIT" ]
null
null
null
codility.com/leader/equi.py
Jagrmi-C/jagrmitest
7c6cf61317972e5d7ddc4fdced0b4e5e6dd52e96
[ "MIT" ]
null
null
null
codility.com/leader/equi.py
Jagrmi-C/jagrmitest
7c6cf61317972e5d7ddc4fdced0b4e5e6dd52e96
[ "MIT" ]
null
null
null
def solution(arr): size = 0 value = 0 for i in range(len(arr)): if size == 0: value = arr[i] size += 1 else: if value != arr[i] and size != 0: size -= 1 else: size += 1 leader_count = len([number for number i...
26.972222
81
0.508754
033282748e1f24b017ab1ecacc53759ab2c43416
8,919
py
Python
utility/gdalwrapper.py
Guiming/PyiPSM
e306489835bbe8daa99098d815166e98c36e42f9
[ "MIT" ]
2
2021-02-18T09:24:15.000Z
2021-04-05T01:59:34.000Z
utility/gdalwrapper.py
Guiming/PyiPSM
e306489835bbe8daa99098d815166e98c36e42f9
[ "MIT" ]
null
null
null
utility/gdalwrapper.py
Guiming/PyiPSM
e306489835bbe8daa99098d815166e98c36e42f9
[ "MIT" ]
3
2020-04-14T03:42:13.000Z
2022-01-16T19:39:43.000Z
# Author: Guiming Zhang # Last update: May 19 2020 #http://www.paolocorti.net/2012/03/08/gdal_virtual_formats/ #https://stackoverflow.com/questions/41742162/gdal-readasarray-for-vrt-extremely-slow #https://gdal.org/development/rfc/rfc26_blockcache.html import gdal, gdalconst, glob, psutil import os, sys, time...
37.008299
137
0.578204
0332a96084790a9b189f44e78a2d63b28b2de1c8
36,015
py
Python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_11_01/models/__init__.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
1
2022-01-24T08:54:57.000Z
2022-01-24T08:54:57.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_11_01/models/__init__.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
null
null
null
sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_11_01/models/__init__.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
39.664097
123
0.829654
0332ae3d1e3f8b600d1e3562fe47938560d8d51a
74,801
py
Python
cinderclient/tests/unit/v3/test_shell.py
deepanshhu/python-cinderclient
2c0f74c708fd09c5ae813255aaa671073f2fe250
[ "Apache-1.1" ]
null
null
null
cinderclient/tests/unit/v3/test_shell.py
deepanshhu/python-cinderclient
2c0f74c708fd09c5ae813255aaa671073f2fe250
[ "Apache-1.1" ]
null
null
null
cinderclient/tests/unit/v3/test_shell.py
deepanshhu/python-cinderclient
2c0f74c708fd09c5ae813255aaa671073f2fe250
[ "Apache-1.1" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2013 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LI...
45.499392
79
0.521851
0332b4f73bd1236e64db20ce40c0c55afeced4cd
269
py
Python
problems/191_number-of-1-bits.py
okuda-seminar/review_leetcode
9774dbb85b836c3ebab4b24d77774ed05abb7a32
[ "MIT" ]
null
null
null
problems/191_number-of-1-bits.py
okuda-seminar/review_leetcode
9774dbb85b836c3ebab4b24d77774ed05abb7a32
[ "MIT" ]
170
2021-05-11T14:03:05.000Z
2021-11-30T14:22:52.000Z
problems/191_number-of-1-bits.py
ryuji0123/review_leetcode
9774dbb85b836c3ebab4b24d77774ed05abb7a32
[ "MIT" ]
null
null
null
# # @lc app=leetcode id=191 lang=python3 # # [191] Number of 1 Bits # # @lc code=start class Solution: def hammingWeight(self, n: int) -> int: """ time: O(logn) space: O(1) """ return list(bin(n)).count("1") # @lc code=end
15.823529
43
0.524164
0332d1f27197fa66b03bd8ab70c2e3b8111bbf45
2,516
py
Python
api/routes/web.py
gregsmi/sample-metadata
f8d18c3e750475f40147097c2861cc6ffc712a2e
[ "MIT" ]
null
null
null
api/routes/web.py
gregsmi/sample-metadata
f8d18c3e750475f40147097c2861cc6ffc712a2e
[ "MIT" ]
null
null
null
api/routes/web.py
gregsmi/sample-metadata
f8d18c3e750475f40147097c2861cc6ffc712a2e
[ "MIT" ]
null
null
null
""" Web routes """ from typing import Optional, List from fastapi import APIRouter, Request from pydantic import BaseModel from models.models.sample import sample_id_format from db.python.layers.web import WebLayer, NestedParticipant from api.utils.db import ( get_project_readonly_connection, Connection, ) ...
25.414141
80
0.674881
0332fcf12acd1b2f41a49fdaebef1bbe38d91173
1,840
py
Python
ooni/tests/test_txscapy.py
irl/ooni-probe
c21861c28ca6bd667715872d099006fab87222fd
[ "BSD-2-Clause" ]
null
null
null
ooni/tests/test_txscapy.py
irl/ooni-probe
c21861c28ca6bd667715872d099006fab87222fd
[ "BSD-2-Clause" ]
null
null
null
ooni/tests/test_txscapy.py
irl/ooni-probe
c21861c28ca6bd667715872d099006fab87222fd
[ "BSD-2-Clause" ]
null
null
null
from mock import MagicMock from twisted.internet import defer from twisted.trial import unittest from ooni.utils import txscapy defer.setDebugging(True) class TestTxScapy(unittest.TestCase): def setUp(self): # if not txscapy.hasRawSocketPermission(): # self.skipTest("No raw socket permissions......
33.454545
78
0.635326
033301e69bb2cd5ff2308b86ce90eecddc7a8a53
354
py
Python
utility/func.py
shawnau/DataScienceBowl2018
3c6f0f26dd86b71aad55fca52314e6432d0b3a82
[ "MIT" ]
null
null
null
utility/func.py
shawnau/DataScienceBowl2018
3c6f0f26dd86b71aad55fca52314e6432d0b3a82
[ "MIT" ]
null
null
null
utility/func.py
shawnau/DataScienceBowl2018
3c6f0f26dd86b71aad55fca52314e6432d0b3a82
[ "MIT" ]
null
null
null
import numpy as np # https://stackoverflow.com/questions/34968722/how-to-implement-the-softmax-function-in-python def np_softmax(x): """Compute softmax values for each sets of scores in x.""" e_x = np.exp(x - np.max(x, axis=1, keepdims=True)) return e_x / e_x.sum(axis=1, keepdims=True) def np_sigmoid(x)...
27.230769
94
0.680791
033314f9ba545e91543e88e5a38f9bbd81eb07ed
5,076
py
Python
heatclient/common/utils.py
citrix-openstack-build/python-heatclient
96dbb0911c8d139a5b3fe64af82783cf81790ff8
[ "Apache-2.0" ]
null
null
null
heatclient/common/utils.py
citrix-openstack-build/python-heatclient
96dbb0911c8d139a5b3fe64af82783cf81790ff8
[ "Apache-2.0" ]
null
null
null
heatclient/common/utils.py
citrix-openstack-build/python-heatclient
96dbb0911c8d139a5b3fe64af82783cf81790ff8
[ "Apache-2.0" ]
null
null
null
# Copyright 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
28.2
78
0.623719
03331609398bd26adee2b2605ee9d8b4c5018cff
168
py
Python
wizard_builder/apps.py
SexualHealthInnovations/django-wizard-builder
f5effe8c462313f16be914b562dbea8ea796b672
[ "BSD-3-Clause" ]
16
2016-06-21T04:05:24.000Z
2017-09-26T15:40:24.000Z
wizard_builder/apps.py
SexualHealthInnovations/django-wizard-builder
f5effe8c462313f16be914b562dbea8ea796b672
[ "BSD-3-Clause" ]
141
2016-06-21T20:46:46.000Z
2017-09-28T00:20:49.000Z
wizard_builder/apps.py
project-callisto/django-wizard-builder
f5effe8c462313f16be914b562dbea8ea796b672
[ "BSD-3-Clause" ]
7
2017-10-04T22:52:18.000Z
2018-05-31T17:14:39.000Z
from django.apps import AppConfig # TODO: smell this app config class WizardBuilderConfig(AppConfig): name = 'wizard_builder' verbose_name = "Wizard Builder"
21
37
0.755952
03332002f82ae8ef5b73e0dbc4d38243c0c8de06
3,479
py
Python
myia/graph_utils.py
strint/myia
3d00d3fb3df80ab7a264a724226c5f56c6ff1a8a
[ "MIT" ]
222
2019-02-13T07:56:28.000Z
2022-03-28T07:07:54.000Z
myia/graph_utils.py
strint/myia
3d00d3fb3df80ab7a264a724226c5f56c6ff1a8a
[ "MIT" ]
107
2019-02-12T21:56:39.000Z
2022-03-12T01:08:03.000Z
myia/graph_utils.py
strint/myia
3d00d3fb3df80ab7a264a724226c5f56c6ff1a8a
[ "MIT" ]
27
2017-11-14T17:58:15.000Z
2019-01-14T01:36:09.000Z
"""Generic graph utilities. The utilities in this file should be abstract with respect to node types or the notion of successor. """ from typing import Any, Callable, Dict, Iterable, List, Set, TypeVar FOLLOW = "follow" NOFOLLOW = "nofollow" EXCLUDE = "exclude" T = TypeVar("T") def always_include(node: Any) -> s...
26.968992
77
0.546134
03332a34b172db4a5461aef1700f2dbdeed7af03
5,713
py
Python
fabric_cf/actor/core/apis/abc_client_policy.py
fabric-testbed/ControlFramework
95ab745e32f15c993bc7a017aa97a5a0f67f210f
[ "MIT" ]
null
null
null
fabric_cf/actor/core/apis/abc_client_policy.py
fabric-testbed/ControlFramework
95ab745e32f15c993bc7a017aa97a5a0f67f210f
[ "MIT" ]
67
2020-12-21T15:39:49.000Z
2022-02-27T17:55:00.000Z
fabric_cf/actor/core/apis/abc_client_policy.py
fabric-testbed/ControlFramework
95ab745e32f15c993bc7a017aa97a5a0f67f210f
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # MIT License # # Copyright (c) 2020 FABRIC Testbed # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to ...
44.632813
106
0.719937
033341ae9a808f5ef39c53020a54ff27147b5642
39,632
py
Python
schapke/cresi/05_wkt_to_G.py
SpaceNetChallenge/SpaceNet_Optimized_Routing_Solutions
3fbc215de6b05904a5b54b2c7cde7e61074ae38d
[ "Apache-2.0" ]
27
2020-03-04T05:54:48.000Z
2022-01-05T07:07:44.000Z
schapke/cresi/05_wkt_to_G.py
CosmiQ/SpaceNet_Optimized_Routing_Solutions
3fbc215de6b05904a5b54b2c7cde7e61074ae38d
[ "Apache-2.0" ]
1
2020-07-14T10:35:50.000Z
2020-07-14T10:35:50.000Z
schapke/cresi/05_wkt_to_G.py
SpaceNetChallenge/SpaceNet_Optimized_Routing_Solutions
3fbc215de6b05904a5b54b2c7cde7e61074ae38d
[ "Apache-2.0" ]
7
2020-03-07T21:42:57.000Z
2022-01-07T10:49:50.000Z
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Tue May 8 00:10:40 2018 @author: avanetten Read in a list of wkt linestrings, render to networkx graph """ from __future__ import print_function import os import utm import shapely.wkt import shapely.ops from shapely.geometry import mapping, Point, LineS...
38.515063
165
0.548774
033382e805b20281fd632d968a31fd51d6693332
3,225
py
Python
pkg/deploy/dcanvas/canvas_circle.py
ToraNova/rapidflask
f42354b296659dac5be904d7bb68076b9458f79a
[ "MIT" ]
null
null
null
pkg/deploy/dcanvas/canvas_circle.py
ToraNova/rapidflask
f42354b296659dac5be904d7bb68076b9458f79a
[ "MIT" ]
null
null
null
pkg/deploy/dcanvas/canvas_circle.py
ToraNova/rapidflask
f42354b296659dac5be904d7bb68076b9458f79a
[ "MIT" ]
null
null
null
#-------------------------------------------------- # canvas_circle.py # This is a generic class for a canvas paint circle # A circle consist of it's width, radius and a point # also contains the color, and the FILL color # FILL change color (for trig) # triggering color change # primarily used for html5 canvas context...
43
106
0.585426
03338bbb7dfbd3ace4ea14415a6602e1c57a1a98
458
py
Python
examples/docs_snippets/docs_snippets/intro_tutorial/advanced/repositories/hello_cereal.py
kstennettlull/dagster
dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6
[ "Apache-2.0" ]
null
null
null
examples/docs_snippets/docs_snippets/intro_tutorial/advanced/repositories/hello_cereal.py
kstennettlull/dagster
dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6
[ "Apache-2.0" ]
null
null
null
examples/docs_snippets/docs_snippets/intro_tutorial/advanced/repositories/hello_cereal.py
kstennettlull/dagster
dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6
[ "Apache-2.0" ]
null
null
null
import csv import requests from dagster import job, op @op def hello_cereal(context): response = requests.get("https://docs.dagster.io/assets/cereal.csv") lines = response.text.split("\n") cereals = [row for row in csv.DictReader(lines)] context.log.info(f"Found {len(cereals)} cereals") return ...
18.32
72
0.703057
0333a973a94459a59a4d82831cdc54dc2d6c26ba
248
py
Python
smartystreets_python_sdk/shared_credentials.py
melonhead901/smartystreets-python-sdk
dd1af1c497968819b3e73a701af5e1f45b58a389
[ "Apache-2.0" ]
19
2017-01-20T16:34:19.000Z
2021-12-09T15:56:09.000Z
smartystreets_python_sdk/shared_credentials.py
melonhead901/smartystreets-python-sdk
dd1af1c497968819b3e73a701af5e1f45b58a389
[ "Apache-2.0" ]
25
2016-12-11T01:20:19.000Z
2022-03-24T19:59:25.000Z
smartystreets_python_sdk/shared_credentials.py
melonhead901/smartystreets-python-sdk
dd1af1c497968819b3e73a701af5e1f45b58a389
[ "Apache-2.0" ]
28
2016-12-31T17:06:07.000Z
2022-02-17T00:09:02.000Z
class SharedCredentials: def __init__(self, id, host_name): self.id = id self.host_name = host_name def sign(self, request): request.parameters['key'] = self.id request.referer = "https://" + self.host_name
27.555556
53
0.620968