hexsha
stringlengths
40
40
size
int64
7
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
125
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
247
max_issues_repo_name
stringlengths
4
125
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
247
max_forks_repo_name
stringlengths
4
125
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
1
1.04M
avg_line_length
float64
1.77
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
7
1.04M
filtered:remove_function_no_docstring
int64
-102
942k
filtered:remove_class_no_docstring
int64
-354
977k
filtered:remove_delete_markers
int64
0
60.1k
bbbe0f0646ca9e5ab125007e2dbd6fff16fb53be
259
py
Python
ABC/168/A.py
yu9824/AtCoder
50a209059c005efadc1c912e443ec41365381c16
[ "MIT" ]
null
null
null
ABC/168/A.py
yu9824/AtCoder
50a209059c005efadc1c912e443ec41365381c16
[ "MIT" ]
null
null
null
ABC/168/A.py
yu9824/AtCoder
50a209059c005efadc1c912e443ec41365381c16
[ "MIT" ]
null
null
null
# list(map(int, input().split())) # int(input()) if __name__ == '__main__': N = int(input()) main(N)
15.235294
33
0.447876
# list(map(int, input().split())) # int(input()) def main(N): a = N % 10 if a in [2, 4, 5, 7, 9]: print('hon') elif a == 3: print('bon') else: print('pon') if __name__ == '__main__': N = int(input()) main(N)
125
0
23
647bd590850dd94d78732d1a50c17ef1cc1d1102
533
py
Python
lab13/controlbeep.py
chrijack/csap-rpi
afc8bc8b826285682855d044d54a87b7ab8ab2e3
[ "Unlicense" ]
null
null
null
lab13/controlbeep.py
chrijack/csap-rpi
afc8bc8b826285682855d044d54a87b7ab8ab2e3
[ "Unlicense" ]
null
null
null
lab13/controlbeep.py
chrijack/csap-rpi
afc8bc8b826285682855d044d54a87b7ab8ab2e3
[ "Unlicense" ]
null
null
null
"""/usr/bin/python $ Filename :controlbeep.py $ Description :If KEY_4 is pressed,this script will be executed $ Author :alan $ Website :www.osoyoo.com $ Update :2017/07/07 $ $ """ import RPi.GPIO as GPIO PIN = 23 GPIO.setmode(GPIO.BCM) GPIO.setwarnings(F...
19.740741
70
0.598499
"""/usr/bin/python $ Filename :controlbeep.py $ Description :If KEY_4 is pressed,this script will be executed $ Author :alan $ Website :www.osoyoo.com $ Update :2017/07/07 $ $ """ import RPi.GPIO as GPIO PIN = 23 GPIO.setmode(GPIO.BCM) GPIO.setwarnings(F...
0
0
0
a86f96505462e383f6c2341faddf2a1e85c4c268
9,562
py
Python
fwks/tasks.py
Zantyr/fwks
4dee4d406fcab4eb375afe6c9a08206fb58af061
[ "MIT" ]
null
null
null
fwks/tasks.py
Zantyr/fwks
4dee4d406fcab4eb375afe6c9a08206fb58af061
[ "MIT" ]
null
null
null
fwks/tasks.py
Zantyr/fwks
4dee4d406fcab4eb375afe6c9a08206fb58af061
[ "MIT" ]
null
null
null
""" fwks.tasks ========== Module responsible for scheduling the computations. Each type of task may be configured and then run in sequence. Useful for creation of batches of jobs. """ __all__ = ["Task", "make_training_task", "make_ab_feature_test", "make_feature_learnability"] import keras import numpy as np import ...
32.634812
113
0.535139
""" fwks.tasks ========== Module responsible for scheduling the computations. Each type of task may be configured and then run in sequence. Useful for creation of batches of jobs. """ __all__ = ["Task", "make_training_task", "make_ab_feature_test", "make_feature_learnability"] import keras import numpy as np import ...
7,090
473
146
e1b21927b899e3c70cbab7b30d6f6390e76b3a7e
1,980
py
Python
main.py
shubhamrauniyar/angela
a2f7b9a822f7194f2518f1668df7c417516c28ae
[ "MIT" ]
21
2018-10-29T06:04:43.000Z
2021-02-11T17:13:49.000Z
main.py
shubhamrauniyar/angela
a2f7b9a822f7194f2518f1668df7c417516c28ae
[ "MIT" ]
null
null
null
main.py
shubhamrauniyar/angela
a2f7b9a822f7194f2518f1668df7c417516c28ae
[ "MIT" ]
7
2018-11-08T16:09:14.000Z
2021-08-01T18:15:53.000Z
#!/usr/bin/env python import importlib import argparse import sys import signal from subprocess import call # parse command line arguments parser = argparse.ArgumentParser() parser.add_argument("--cfg", help="path to hyperparameter config file", type=str) parser.add_argument("--render", help="render agent", action="s...
38.823529
90
0.713131
#!/usr/bin/env python import importlib import argparse import sys import signal from subprocess import call # parse command line arguments parser = argparse.ArgumentParser() parser.add_argument("--cfg", help="path to hyperparameter config file", type=str) parser.add_argument("--render", help="render agent", action="s...
197
0
22
2892e5890e99adcc1660a6ac845123dea7c3532e
315
py
Python
createdb.py
MjKay1/Reading-and-writing-Databases
dc9cef0c246ce296e62368854dd4bb7b017a6256
[ "Unlicense" ]
null
null
null
createdb.py
MjKay1/Reading-and-writing-Databases
dc9cef0c246ce296e62368854dd4bb7b017a6256
[ "Unlicense" ]
null
null
null
createdb.py
MjKay1/Reading-and-writing-Databases
dc9cef0c246ce296e62368854dd4bb7b017a6256
[ "Unlicense" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Thu Feb 22 10:23:18 2018 @author: gy17mjk """ import sqlite3 conn = sqlite3.connect('resultsdb.sqlite') c = conn.cursor() c.execute("CREATE TABLE Results (address text, burglaries integer)") c.execute("INSERT INTO Results VALUES ('Queen Vic',2)") conn.commit() conn.close()
21
68
0.698413
# -*- coding: utf-8 -*- """ Created on Thu Feb 22 10:23:18 2018 @author: gy17mjk """ import sqlite3 conn = sqlite3.connect('resultsdb.sqlite') c = conn.cursor() c.execute("CREATE TABLE Results (address text, burglaries integer)") c.execute("INSERT INTO Results VALUES ('Queen Vic',2)") conn.commit() conn.close()
0
0
0
d49a7482d3353fba50c8ecc225a4567c6a6bc170
4,145
py
Python
temboo/core/Library/DuckDuckGo/Query.py
jordanemedlock/psychtruths
52e09033ade9608bd5143129f8a1bfac22d634dd
[ "Apache-2.0" ]
7
2016-03-07T02:07:21.000Z
2022-01-21T02:22:41.000Z
temboo/core/Library/DuckDuckGo/Query.py
jordanemedlock/psychtruths
52e09033ade9608bd5143129f8a1bfac22d634dd
[ "Apache-2.0" ]
null
null
null
temboo/core/Library/DuckDuckGo/Query.py
jordanemedlock/psychtruths
52e09033ade9608bd5143129f8a1bfac22d634dd
[ "Apache-2.0" ]
8
2016-06-14T06:01:11.000Z
2020-04-22T09:21:44.000Z
# -*- coding: utf-8 -*- ############################################################################### # # Query # Access DuckDuckGo web search functionality. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this ...
38.37963
177
0.666104
# -*- coding: utf-8 -*- ############################################################################### # # Query # Access DuckDuckGo web search functionality. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this ...
304
415
100
21f0c65dcc3c0489a3a6b0e84d739d306f07efe8
2,773
py
Python
testsuite/tests/apicast/parameters/apicast_path_routing/conftest.py
dlaso99/3scale-tests
b31a3b3596af6d632b393e383c0417ea56bd95ca
[ "Apache-2.0" ]
5
2021-11-04T14:09:24.000Z
2021-12-23T13:48:36.000Z
testsuite/tests/apicast/parameters/apicast_path_routing/conftest.py
dlaso99/3scale-tests
b31a3b3596af6d632b393e383c0417ea56bd95ca
[ "Apache-2.0" ]
41
2021-11-03T14:27:21.000Z
2022-03-29T14:46:16.000Z
testsuite/tests/apicast/parameters/apicast_path_routing/conftest.py
dlaso99/3scale-tests
b31a3b3596af6d632b393e383c0417ea56bd95ca
[ "Apache-2.0" ]
12
2021-11-03T17:28:31.000Z
2021-11-30T12:28:25.000Z
"""Path routing-based tests fixtures.""" import pytest from testsuite import rawobj from testsuite.gateways.apicast.selfmanaged import SelfManagedApicast from testsuite.utils import blame def delete_all_mapping_rules(proxy): """Deletes all mapping rules in a given proxy.""" mapping_rules = proxy.mapping_rule...
28.587629
101
0.728814
"""Path routing-based tests fixtures.""" import pytest from testsuite import rawobj from testsuite.gateways.apicast.selfmanaged import SelfManagedApicast from testsuite.utils import blame def delete_all_mapping_rules(proxy): """Deletes all mapping rules in a given proxy.""" mapping_rules = proxy.mapping_rule...
0
0
0
7c4cdcb5715123a2ae7ebe5c31eeba4b5e3734d5
771
py
Python
skp_edu_docker/code/demo/botbuilder/api_call_botbuilder_def_list_info.py
TensorMSA/hoyai_docker
12f0041e6306d8a6421585a4b51666bad30be442
[ "MIT" ]
8
2017-06-16T00:19:12.000Z
2020-08-13T03:15:57.000Z
skp_edu_docker/code/demo/botbuilder/api_call_botbuilder_def_list_info.py
TensorMSA/tensormsa_docker
12f0041e6306d8a6421585a4b51666bad30be442
[ "MIT" ]
21
2017-06-09T10:15:14.000Z
2018-03-29T07:51:02.000Z
skp_edu_docker/code/demo/botbuilder/api_call_botbuilder_def_list_info.py
TensorMSA/hoyai_docker
12f0041e6306d8a6421585a4b51666bad30be442
[ "MIT" ]
4
2017-10-25T09:59:53.000Z
2020-05-07T09:51:11.000Z
import requests import json, os url = "{0}:{1}".format(os.environ['HOSTNAME'] , "8000") resp = requests.post('http://' + url + '/api/v1/type/service/botbuilder/def/', json={ "cb_id" : "cb0001", "chat_cate" : "EP", "chat_sub_ca...
40.578947
78
0.437095
import requests import json, os url = "{0}:{1}".format(os.environ['HOSTNAME'] , "8000") resp = requests.post('http://' + url + '/api/v1/type/service/botbuilder/def/', json={ "cb_id" : "cb0001", "chat_cate" : "EP", "chat_sub_ca...
0
0
0
ffed64b5a02620e3e4582f2a952d467adc001127
455
py
Python
services/galtelecom/service/app/index/controllers.py
SharLike-CTF-Team/altayctf-2019
a1e1c06ace90a6cd02fa200854a16a8e4de1ec85
[ "MIT" ]
7
2019-07-01T15:15:36.000Z
2020-11-07T06:06:53.000Z
services/galtelecom/service/app/index/controllers.py
SharLike-CTF-Team/altayctf-2019
a1e1c06ace90a6cd02fa200854a16a8e4de1ec85
[ "MIT" ]
3
2020-03-24T17:12:57.000Z
2021-02-02T22:04:21.000Z
services/galtelecom/service/app/index/controllers.py
SharLike-CTF-Team/altayctf-2019
a1e1c06ace90a6cd02fa200854a16a8e4de1ec85
[ "MIT" ]
3
2019-07-01T14:32:55.000Z
2020-03-27T11:42:51.000Z
from flask import ( Blueprint, render_template, session, make_response, request, redirect, url_for, ) from .. import orm module = Blueprint('index', __name__, url_prefix='/') @module.route('/', methods=['GET'])
20.681818
55
0.632967
from flask import ( Blueprint, render_template, session, make_response, request, redirect, url_for, ) from .. import orm module = Blueprint('index', __name__, url_prefix='/') @module.route('/', methods=['GET']) def index(): if 'uid' not in session: return redirect(url_for('pro...
191
0
22
d319f274a2d00a0312511031fb936bb3630c5cbd
36,437
py
Python
pyccel/parser/syntax/openacc.py
nandiniraja348/pyccel
d857efcb8ff327f72473daeb86903c7e9ef93a36
[ "MIT" ]
3
2017-08-31T14:11:55.000Z
2018-03-05T04:47:58.000Z
pyccel/parser/syntax/openacc.py
nandiniraja348/pyccel
d857efcb8ff327f72473daeb86903c7e9ef93a36
[ "MIT" ]
null
null
null
pyccel/parser/syntax/openacc.py
nandiniraja348/pyccel
d857efcb8ff327f72473daeb86903c7e9ef93a36
[ "MIT" ]
1
2018-02-13T23:46:49.000Z
2018-02-13T23:46:49.000Z
# coding: utf-8 #------------------------------------------------------------------------------------------# # This file is part of Pyccel which is released under MIT License. See the LICENSE file or # # go to https://github.com/pyccel/pyccel/blob/master/LICENSE for full license details. # #------------------------...
26.930525
95
0.511705
# coding: utf-8 #------------------------------------------------------------------------------------------# # This file is part of Pyccel which is released under MIT License. See the LICENSE file or # # go to https://github.com/pyccel/pyccel/blob/master/LICENSE for full license details. # #------------------------...
16,648
14
1,479
6aeca52d79b3b71218823d6f94b7b675cedf6369
772
py
Python
app/server/database.py
saisyam/review-analytics-api
95d693c09de31757ead50542cf36b7807f0e09dd
[ "Apache-2.0" ]
null
null
null
app/server/database.py
saisyam/review-analytics-api
95d693c09de31757ead50542cf36b7807f0e09dd
[ "Apache-2.0" ]
6
2021-08-02T08:39:37.000Z
2021-09-15T12:26:50.000Z
app/server/database.py
saisyam/review-analytics-api
95d693c09de31757ead50542cf36b7807f0e09dd
[ "Apache-2.0" ]
null
null
null
import motor.motor_asyncio from bson.objectid import ObjectId MONGO_DETAILS = "mongodb://localhost:27017" client = motor.motor_asyncio.AsyncIOMotorClient(MONGO_DETAILS) database = client.review_db review_collection = database.get_collection("reviews") # Retrieve all businesses present in the database
28.592593
62
0.673575
import motor.motor_asyncio from bson.objectid import ObjectId MONGO_DETAILS = "mongodb://localhost:27017" client = motor.motor_asyncio.AsyncIOMotorClient(MONGO_DETAILS) database = client.review_db review_collection = database.get_collection("reviews") def review_helper(review) -> dict: return { "id": str...
422
0
45
7a6e74a8500a5b161d7fbd7592f76f02c558a1ba
38,466
py
Python
src/py21cmfast/_utils.py
charlottenosam/21cmFAST-v3
07b99e5f6d8f06f833eba33a82311e7ed793861b
[ "MIT" ]
null
null
null
src/py21cmfast/_utils.py
charlottenosam/21cmFAST-v3
07b99e5f6d8f06f833eba33a82311e7ed793861b
[ "MIT" ]
null
null
null
src/py21cmfast/_utils.py
charlottenosam/21cmFAST-v3
07b99e5f6d8f06f833eba33a82311e7ed793861b
[ "MIT" ]
null
null
null
"""Utilities that help with wrapping various C structures.""" import copy import glob import h5py import logging import numpy as np import warnings from cffi import FFI from hashlib import md5 from os import makedirs, path from pathlib import Path from . import __version__ from ._cfg import config _ffi = FFI() logge...
35.00091
111
0.556361
"""Utilities that help with wrapping various C structures.""" import copy import glob import h5py import logging import numpy as np import warnings from cffi import FFI from hashlib import md5 from os import makedirs, path from pathlib import Path from . import __version__ from ._cfg import config _ffi = FFI() logge...
7,710
0
429
0e73b74702ba4321343283e7109d668f50035938
4,282
py
Python
taxes/tests/test_loading.py
K4cp3rski/NPD_final
fab845e4bcf591eb51b866d09e01fa7a207ab78c
[ "MIT" ]
null
null
null
taxes/tests/test_loading.py
K4cp3rski/NPD_final
fab845e4bcf591eb51b866d09e01fa7a207ab78c
[ "MIT" ]
null
null
null
taxes/tests/test_loading.py
K4cp3rski/NPD_final
fab845e4bcf591eb51b866d09e01fa7a207ab78c
[ "MIT" ]
null
null
null
import pathlib import pandas as pd import pytest import taxes.download as dload from taxes.loading import ( # noqa: E501 dload_to_df_list, get_gov_dir, gov_dir_to_names_dict, names_dict_to_df_dict, ) gov_dir = { 2019: ( [ "https://www.gov.pl/attachment/6594af94-cd1e-49fb-9149-...
33.984127
95
0.643157
import pathlib import pandas as pd import pytest import taxes.download as dload from taxes.loading import ( # noqa: E501 dload_to_df_list, get_gov_dir, gov_dir_to_names_dict, names_dict_to_df_dict, ) gov_dir = { 2019: ( [ "https://www.gov.pl/attachment/6594af94-cd1e-49fb-9149-...
1,490
0
159
dace2c8025dcab397c2a5517d4990e4f7a6e31ec
8,148
py
Python
ezflags/flagparser.py
karx1/ezflags
db5520662ede49d6e61c8cbb1acf66957bfe0832
[ "MIT" ]
1
2019-12-20T22:54:57.000Z
2019-12-20T22:54:57.000Z
ezflags/flagparser.py
karx1/ezflags
db5520662ede49d6e61c8cbb1acf66957bfe0832
[ "MIT" ]
null
null
null
ezflags/flagparser.py
karx1/ezflags
db5520662ede49d6e61c8cbb1acf66957bfe0832
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import sys from typing import List import time import datetime from .exceptions import NotEnoughValuesError, UnrecognizedFlagError # MIT License # # Copyright (c) 2019-2020 karx1 # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associate...
36.538117
146
0.632916
# -*- coding: utf-8 -*- import sys from typing import List import time import datetime from .exceptions import NotEnoughValuesError, UnrecognizedFlagError # MIT License # # Copyright (c) 2019-2020 karx1 # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associate...
2,210
70
221
0a1d52765ddf7b8e4ec173be4ddcfcc9b3c7ac4c
2,110
py
Python
tests/test_autoscaling.py
graze/tropopause
c4bbed42ec38cdd65b8a99f1b1e65af77eba7989
[ "MIT" ]
6
2017-09-13T11:15:44.000Z
2020-08-23T20:07:52.000Z
tests/test_autoscaling.py
graze/tropopause
c4bbed42ec38cdd65b8a99f1b1e65af77eba7989
[ "MIT" ]
1
2017-09-15T10:45:39.000Z
2017-09-15T10:45:39.000Z
tests/test_autoscaling.py
graze/tropopause
c4bbed42ec38cdd65b8a99f1b1e65af77eba7989
[ "MIT" ]
null
null
null
import unittest from tropopause import Tags as BaseTags from tropopause.ec2 import InternetGatewayVPC, PublicSubnet from tropopause.autoscaling import AutoScalingGroup, LaunchConfigurationRPM from troposphere import Ref, Template from troposphere.autoscaling import LaunchConfiguration, Tag class TestAutoscaling(unit...
28.133333
75
0.567773
import unittest from tropopause import Tags as BaseTags from tropopause.ec2 import InternetGatewayVPC, PublicSubnet from tropopause.autoscaling import AutoScalingGroup, LaunchConfigurationRPM from troposphere import Ref, Template from troposphere.autoscaling import LaunchConfiguration, Tag class TestAutoscaling(unit...
1,616
0
108
767c2c558186a8f222a9f474e8fe993746b0cd4b
137
py
Python
actions/video.py
paulomcnally/pi-voice
feda3210f7cde72b98d263a8dce66d699bbc3608
[ "Apache-2.0" ]
1
2019-02-13T04:58:30.000Z
2019-02-13T04:58:30.000Z
actions/video.py
paulomcnally/pi-voice
feda3210f7cde72b98d263a8dce66d699bbc3608
[ "Apache-2.0" ]
null
null
null
actions/video.py
paulomcnally/pi-voice
feda3210f7cde72b98d263a8dce66d699bbc3608
[ "Apache-2.0" ]
null
null
null
import subprocess
13.7
68
0.627737
import subprocess class Video: @staticmethod def run(): subprocess.run(['sh', '/home/pi/pi-voice/actions/video.sh'])
58
35
23
e6c4da2bebfe9b47b3cbc341b6db1c4f15a4f613
2,841
py
Python
src/scripts/cleanup_peering_partner.py
emjemj/ni
a78e6d97d1e4610aad7698c4f0f459221c680b4f
[ "BSD-2-Clause-FreeBSD" ]
2
2018-12-21T09:35:27.000Z
2019-07-31T18:51:58.000Z
src/scripts/cleanup_peering_partner.py
emjemj/ni
a78e6d97d1e4610aad7698c4f0f459221c680b4f
[ "BSD-2-Clause-FreeBSD" ]
6
2019-07-25T07:10:23.000Z
2021-02-08T09:58:57.000Z
src/scripts/cleanup_peering_partner.py
emjemj/ni
a78e6d97d1e4610aad7698c4f0f459221c680b4f
[ "BSD-2-Clause-FreeBSD" ]
5
2019-02-06T12:00:26.000Z
2021-11-19T14:48:06.000Z
import argparse import logging import utils # noqa: F401 Keep for django_hack from apps.noclook.models import NodeType, NodeHandle from actstream.models import Action logger = logging.getLogger('noclook_cleanup_peering_partners') if __name__ == '__main__': if not len(logger.handlers): logger.propaga...
36.423077
108
0.664203
import argparse import logging import utils # noqa: F401 Keep for django_hack from apps.noclook.models import NodeType, NodeHandle from actstream.models import Action logger = logging.getLogger('noclook_cleanup_peering_partners') def cli(): parser = argparse.ArgumentParser() parser.add_argument('--verbose',...
2,101
0
92
78216117ab59870650b8096930f0c587e6ee2b6f
2,685
py
Python
Demos/RainbowAll.py
gooday2die/PyRGBDev
686c2a046670252fcc6d7a72a39a055b5c578a8e
[ "MIT" ]
2
2022-03-01T04:54:07.000Z
2022-03-03T17:03:20.000Z
Demos/RainbowAll.py
gooday2die/PyRGBDev
686c2a046670252fcc6d7a72a39a055b5c578a8e
[ "MIT" ]
1
2022-03-02T04:44:42.000Z
2022-03-02T04:49:40.000Z
Demos/RainbowAll.py
gooday2die/PyRGBDev
686c2a046670252fcc6d7a72a39a055b5c578a8e
[ "MIT" ]
null
null
null
""" @project : pyrgbdev @author : Gooday2die @date : 2022-02-13 @file : RainbowAll.py """ import threading import time from pyrgbdev import All from abstractDemo import AbstractDemo if __name__ == '__main__': sdk_object = All.sdk() sdk_object.connect() rainbow_all = Demo() rainbow_all.run(sdk_objec...
28.56383
67
0.524022
""" @project : pyrgbdev @author : Gooday2die @date : 2022-02-13 @file : RainbowAll.py """ import threading import time from pyrgbdev import All from abstractDemo import AbstractDemo class Demo(AbstractDemo): def __init__(self): """ An initializer method for class Demo in RainbowAll """ ...
0
2,314
23
f618c4eda999d7405409736472269f308b783010
322
py
Python
ex053.py
almmessias/CursoPython
4cec6946f32002cbd5d3b802df11ea1ba74169f5
[ "MIT" ]
null
null
null
ex053.py
almmessias/CursoPython
4cec6946f32002cbd5d3b802df11ea1ba74169f5
[ "MIT" ]
null
null
null
ex053.py
almmessias/CursoPython
4cec6946f32002cbd5d3b802df11ea1ba74169f5
[ "MIT" ]
null
null
null
frase = str (input ('Digite uma frase: ')).strip().upper() palavras = frase.split() junto = ''.join(palavras) inverso = '' for letra in range (len(junto) -1, -1, -1): inverso += junto[letra] if inverso == junto: print ('A frase digitada é um palindromo') else: print ('A frase digitada não é um palindromo'...
29.272727
60
0.642857
frase = str (input ('Digite uma frase: ')).strip().upper() palavras = frase.split() junto = ''.join(palavras) inverso = '' for letra in range (len(junto) -1, -1, -1): inverso += junto[letra] if inverso == junto: print ('A frase digitada é um palindromo') else: print ('A frase digitada não é um palindromo'...
0
0
0
f3f010672562d2a3615acb4219c38a77a75898d3
1,148
py
Python
src/bandit_algorithms/thompson_sampling_learner.py
Desno365/Data-Intelligence-Applications-Project
01965790b80847f92321651d1d352537bf2859f3
[ "MIT" ]
null
null
null
src/bandit_algorithms/thompson_sampling_learner.py
Desno365/Data-Intelligence-Applications-Project
01965790b80847f92321651d1d352537bf2859f3
[ "MIT" ]
null
null
null
src/bandit_algorithms/thompson_sampling_learner.py
Desno365/Data-Intelligence-Applications-Project
01965790b80847f92321651d1d352537bf2859f3
[ "MIT" ]
null
null
null
import numpy as np from src.bandit_algorithms.bandit_learner import BanditLearner # n_arms = number of arms the learner can pull. # Select which arm to pull by sampling beta distribution. # We select the max value from the values sampled. # pulled_arm = arm pulled. # reward = reward of arm pulle...
35.875
95
0.679443
import numpy as np from src.bandit_algorithms.bandit_learner import BanditLearner class ThompsonSamplingLearner(BanditLearner): # n_arms = number of arms the learner can pull. def __init__(self, n_arms: int): super().__init__(n_arms) self.beta_parameters = np.ones((n_arms, 2)) # Select w...
700
24
101
0687ca1eedb51a04826ba3517b3e1e5e222a5457
91
py
Python
src/graph_construction/__init__.py
aria-systems-group/PDDLtoSim
66e7fb26c39654992310caf962994c27b7979647
[ "MIT" ]
null
null
null
src/graph_construction/__init__.py
aria-systems-group/PDDLtoSim
66e7fb26c39654992310caf962994c27b7979647
[ "MIT" ]
null
null
null
src/graph_construction/__init__.py
aria-systems-group/PDDLtoSim
66e7fb26c39654992310caf962994c27b7979647
[ "MIT" ]
null
null
null
from .causal_graph import CausalGraph from .transition_system import FiniteTransitionSystem
45.5
53
0.901099
from .causal_graph import CausalGraph from .transition_system import FiniteTransitionSystem
0
0
0
0bd7c649209014b0584b775ee92cb5341226c2e6
4,079
py
Python
scripts/populate_metadata_store.py
ghga-de/metadata-api
2000c285a0604c7ad658672c2a88ab702c9eb0f0
[ "Apache-2.0" ]
null
null
null
scripts/populate_metadata_store.py
ghga-de/metadata-api
2000c285a0604c7ad658672c2a88ab702c9eb0f0
[ "Apache-2.0" ]
11
2021-12-02T11:59:32.000Z
2022-03-24T09:11:46.000Z
scripts/populate_metadata_store.py
ghga-de/metadata-repository-service
2000c285a0604c7ad658672c2a88ab702c9eb0f0
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # Copyright 2021 - 2022 Universität Tübingen, DKFZ and EMBL # for the German Human Genome-Phenome Archive (GHGA) # # 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 # # ...
35.469565
87
0.701888
#!/usr/bin/env python3 # Copyright 2021 - 2022 Universität Tübingen, DKFZ and EMBL # for the German Human Genome-Phenome Archive (GHGA) # # 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 # # ...
0
0
0
1c9b8a7d1142ca6575f76202db658a7195af2819
1,321
py
Python
setup.py
Chash-dot/Pythin_CI_Example
06837441eb1b76086fae06fda80dfac73105e750
[ "MIT" ]
null
null
null
setup.py
Chash-dot/Pythin_CI_Example
06837441eb1b76086fae06fda80dfac73105e750
[ "MIT" ]
null
null
null
setup.py
Chash-dot/Pythin_CI_Example
06837441eb1b76086fae06fda80dfac73105e750
[ "MIT" ]
null
null
null
import os import io from setuptools import setup, find_packages from os import path from io import open setup( # This is the name of your project. The first time you publish this # package, this name will be registered for you. It will determine how # users can install this project, e.g.: # # $ pip...
30.022727
77
0.687358
import os import io from setuptools import setup, find_packages from os import path from io import open setup( # This is the name of your project. The first time you publish this # package, this name will be registered for you. It will determine how # users can install this project, e.g.: # # $ pip...
0
0
0
af5b1a61d364c54d730825d109f7faebb675d6f9
118,678
py
Python
cottonformation/res/rds.py
MacHu-GWU/cottonformation-project
23e28c08cfb5a7cc0db6dbfdb1d7e1585c773f3b
[ "BSD-2-Clause" ]
5
2021-07-22T03:45:59.000Z
2021-12-17T21:07:14.000Z
cottonformation/res/rds.py
MacHu-GWU/cottonformation-project
23e28c08cfb5a7cc0db6dbfdb1d7e1585c773f3b
[ "BSD-2-Clause" ]
1
2021-06-25T18:01:31.000Z
2021-06-25T18:01:31.000Z
cottonformation/res/rds.py
MacHu-GWU/cottonformation-project
23e28c08cfb5a7cc0db6dbfdb1d7e1585c773f3b
[ "BSD-2-Clause" ]
2
2021-06-27T03:08:21.000Z
2021-06-28T22:15:51.000Z
# -*- coding: utf-8 -*- """ This module """ import attr import typing from ..core.model import ( Property, Resource, Tag, GetAtt, TypeHint, TypeCheck, ) from ..core.constant import AttrMeta #--- Property declaration --- @attr.s class PropDBProxyTargetGroupConnectionPoolConfigurationInfoFormat(Property): ""...
69.565064
272
0.766216
# -*- coding: utf-8 -*- """ This module """ import attr import typing from ..core.model import ( Property, Resource, Tag, GetAtt, TypeHint, TypeCheck, ) from ..core.constant import AttrMeta #--- Property declaration --- @attr.s class PropDBProxyTargetGroupConnectionPoolConfigurationInfoFormat(Property): ""...
0
0
0
b7d4e62666a6011f2658eaf32cbd248faaf656ac
1,423
py
Python
examples/00_densification.py
christiandimitri/compas_singular
4a80b30664b07e15eb799229171bbc02c27e0efc
[ "MIT" ]
1
2021-04-19T15:09:21.000Z
2021-04-19T15:09:21.000Z
examples/00_densification.py
christiandimitri/compas_singular
4a80b30664b07e15eb799229171bbc02c27e0efc
[ "MIT" ]
null
null
null
examples/00_densification.py
christiandimitri/compas_singular
4a80b30664b07e15eb799229171bbc02c27e0efc
[ "MIT" ]
null
null
null
import json from compas_singular.datastructures import CoarseQuadMesh from compas_plotters.meshplotter import MeshPlotter # read input data json_data = 'data/coarse_quad_mesh_british_museum.json' coarse_quad_mesh = CoarseQuadMesh.from_json(json_data) # plot coarse quad mesh plotter = MeshPlotter(coarse_quad_mesh, ...
25.872727
71
0.811665
import json from compas_singular.datastructures import CoarseQuadMesh from compas_plotters.meshplotter import MeshPlotter # read input data json_data = 'data/coarse_quad_mesh_british_museum.json' coarse_quad_mesh = CoarseQuadMesh.from_json(json_data) # plot coarse quad mesh plotter = MeshPlotter(coarse_quad_mesh, ...
0
0
0
a63ff870e18d0353ea93821d20755d401349fbfd
2,455
py
Python
BioModelsDAG/pipeline/parsers/reactions_parser.py
danielqiang/BioModels
4697ad44d98953e2646f692f3010191febc64747
[ "MIT" ]
1
2021-03-07T13:47:07.000Z
2021-03-07T13:47:07.000Z
BioModelsDAG/pipeline/parsers/reactions_parser.py
danielqiang/BioModels
4697ad44d98953e2646f692f3010191febc64747
[ "MIT" ]
2
2021-03-31T19:53:45.000Z
2021-12-13T20:46:15.000Z
BioModelsDAG/pipeline/parsers/reactions_parser.py
danielqiang/BioModels
4697ad44d98953e2646f692f3010191febc64747
[ "MIT" ]
null
null
null
from ..bases import BaseParser from collections import defaultdict __all__ = ['ReactionsParser']
38.359375
90
0.602851
from ..bases import BaseParser from collections import defaultdict __all__ = ['ReactionsParser'] class ReactionsParser(BaseParser): def parser(self, sbml_file, counter: dict = None, **kwargs): """ Extracts all reactions from an SBML file and returns a generator of (Model, Edge, Parent Mod...
0
2,333
23
31e43b5deed81d3cc2c64f4794163a92fa6e6053
4,484
py
Python
daily-brief.py
BenDoan/daily-brief
7cc44161ad6a49035f1535810ae5e2b0ef1e489c
[ "MIT" ]
null
null
null
daily-brief.py
BenDoan/daily-brief
7cc44161ad6a49035f1535810ae5e2b0ef1e489c
[ "MIT" ]
null
null
null
daily-brief.py
BenDoan/daily-brief
7cc44161ad6a49035f1535810ae5e2b0ef1e489c
[ "MIT" ]
null
null
null
#!/usr/bin/env python import argparse import datetime import json import os import feedparser import httplib2 import requests import dateutil.parser from apiclient import discovery from oauth2client import client from oauth2client import tools from oauth2client.file import Storage from lib.bottle import ( defa...
25.191011
99
0.678635
#!/usr/bin/env python import argparse import datetime import json import os import feedparser import httplib2 import requests import dateutil.parser from apiclient import discovery from oauth2client import client from oauth2client import tools from oauth2client.file import Storage from lib.bottle import ( defa...
1,844
0
273
0a9869a8694e1e26d2fab10d3b47f8d04f98b86f
9,618
py
Python
pyrevolve/revolve_bot/revolve_bot.py
safsaf150/revolve
ff12ac6992c99116b9d571dc277165362d8d5602
[ "Apache-2.0" ]
null
null
null
pyrevolve/revolve_bot/revolve_bot.py
safsaf150/revolve
ff12ac6992c99116b9d571dc277165362d8d5602
[ "Apache-2.0" ]
null
null
null
pyrevolve/revolve_bot/revolve_bot.py
safsaf150/revolve
ff12ac6992c99116b9d571dc277165362d8d5602
[ "Apache-2.0" ]
null
null
null
""" Revolve body generator based on RoboGen framework """ import yaml import traceback from collections import OrderedDict from pyrevolve import SDF from .revolve_module import CoreModule, Orientation from .brain import Brain, BrainNN, BrainRLPowerSplines from .render.render import Render from .render.brain_graph im...
34.106383
128
0.586089
""" Revolve body generator based on RoboGen framework """ import yaml import traceback from collections import OrderedDict from pyrevolve import SDF from .revolve_module import CoreModule, Orientation from .brain import Brain, BrainNN, BrainRLPowerSplines from .render.render import Render from .render.brain_graph im...
885
0
216
999b2a449a105777e31373d8a51c859b9f348516
4,420
py
Python
src/hearth/_collate.py
leaprovenzano/hearth
0f32f67a5d132e836a34fd7d7c982d7f35cf6c79
[ "MIT" ]
null
null
null
src/hearth/_collate.py
leaprovenzano/hearth
0f32f67a5d132e836a34fd7d7c982d7f35cf6c79
[ "MIT" ]
42
2020-12-14T18:04:41.000Z
2022-02-06T12:30:14.000Z
src/hearth/_collate.py
leaprovenzano/muspelheim
00f09ab35df93e67fd25536f6a3d6fa4ab001afb
[ "MIT" ]
1
2021-08-03T06:59:46.000Z
2021-08-03T06:59:46.000Z
"""only needed post torch 1.10 updates patches improvements that allow us to handle tensordicts """ import torch import re import collections from torch._six import string_classes np_str_obj_array_pattern = re.compile(r'[SaUO]') default_collate_err_msg_format = ( "default_collate: batch must contain tensors, n...
42.912621
99
0.623303
"""only needed post torch 1.10 updates patches improvements that allow us to handle tensordicts """ import torch import re import collections from torch._six import string_classes np_str_obj_array_pattern = re.compile(r'[SaUO]') default_collate_err_msg_format = ( "default_collate: batch must contain tensors, n...
0
0
0
a57206a08de1cc43f64d8c3a0d73347803a4d690
15,980
py
Python
iqmon/webpage/webpage.py
joshwalawender/IQMon
d6b7df9f489b94a197e4faeb53785f3f30d248df
[ "BSD-2-Clause" ]
9
2017-08-04T04:02:52.000Z
2021-03-15T23:01:04.000Z
iqmon/webpage/webpage.py
joshwalawender/IQMon
d6b7df9f489b94a197e4faeb53785f3f30d248df
[ "BSD-2-Clause" ]
9
2022-01-10T03:04:44.000Z
2022-01-10T03:04:46.000Z
iqmon/webpage/webpage.py
joshwalawender/IQMon
d6b7df9f489b94a197e4faeb53785f3f30d248df
[ "BSD-2-Clause" ]
5
2015-07-01T00:46:21.000Z
2018-11-19T11:05:24.000Z
from pathlib import Path import configparser import logging import flask import pymongo from datetime import datetime, timedelta import numpy as np from iqmon import get_webpage_config, get_all_configs from iqmon.webpage import mongo_query from iqmon.webpage.weather_plot import generate_weather_plot from iqmon.webpage...
45.787966
99
0.546058
from pathlib import Path import configparser import logging import flask import pymongo from datetime import datetime, timedelta import numpy as np from iqmon import get_webpage_config, get_all_configs from iqmon.webpage import mongo_query from iqmon.webpage.weather_plot import generate_weather_plot from iqmon.webpage...
13,604
0
154
0dce7ffedcacd46e25852cdb1b791409cd684885
400
py
Python
server/app/db/__init__.py
amaksymov/andreslist
389ced424dd45cefc384eb67b6ee84dd4740aab5
[ "MIT" ]
null
null
null
server/app/db/__init__.py
amaksymov/andreslist
389ced424dd45cefc384eb67b6ee84dd4740aab5
[ "MIT" ]
null
null
null
server/app/db/__init__.py
amaksymov/andreslist
389ced424dd45cefc384eb67b6ee84dd4740aab5
[ "MIT" ]
null
null
null
import logging import databases import sqlalchemy from app.settings import DATABASE_URL log = logging.getLogger(__name__) db = databases.Database(DATABASE_URL) metadata = sqlalchemy.MetaData()
16.666667
39
0.7075
import logging import databases import sqlalchemy from app.settings import DATABASE_URL log = logging.getLogger(__name__) db = databases.Database(DATABASE_URL) metadata = sqlalchemy.MetaData() async def startup_db(): try: await db.connect() log.info("Database connected.") except Exception ...
155
0
46
7b483db9b418e24be9a29faef02b72c9979cae8b
1,595
py
Python
tests/debug.py
XianyiCheng/kinorrt
99e22914e52623bad5aad797971735ad5f339e0f
[ "MIT" ]
1
2022-03-21T01:08:34.000Z
2022-03-21T01:08:34.000Z
tests/debug.py
XianyiCheng/kinorrt
99e22914e52623bad5aad797971735ad5f339e0f
[ "MIT" ]
null
null
null
tests/debug.py
XianyiCheng/kinorrt
99e22914e52623bad5aad797971735ad5f339e0f
[ "MIT" ]
2
2021-09-30T21:38:45.000Z
2022-03-01T07:43:42.000Z
from kinorrt.mechanics.mechanics import * from kinorrt.mechanics.stability_margin import * #import wrenchStampingLib as ws smsolver = StabilityMarginSolver() h_modes = np.array([[CONTACT_MODE.STICKING, CONTACT_MODE.STICKING], [CONTACT_MODE.SLIDING_RIGHT, CONTACT_MODE.SLIDING_RIGHT], ...
49.84375
111
0.678997
from kinorrt.mechanics.mechanics import * from kinorrt.mechanics.stability_margin import * #import wrenchStampingLib as ws smsolver = StabilityMarginSolver() h_modes = np.array([[CONTACT_MODE.STICKING, CONTACT_MODE.STICKING], [CONTACT_MODE.SLIDING_RIGHT, CONTACT_MODE.SLIDING_RIGHT], ...
0
0
0
875eaf7ed3046d0db10ffe4a5bf4a91983591e90
3,445
py
Python
blog/models.py
josephdubon/boilerplate_dubon_django_blog
1dbe470006be066b12dd6486eb26a41d304206f8
[ "Unlicense", "MIT" ]
null
null
null
blog/models.py
josephdubon/boilerplate_dubon_django_blog
1dbe470006be066b12dd6486eb26a41d304206f8
[ "Unlicense", "MIT" ]
2
2021-06-10T20:43:00.000Z
2021-09-22T19:55:41.000Z
blog/models.py
josephdubon/boilerplate_dubon_django_blog
1dbe470006be066b12dd6486eb26a41d304206f8
[ "Unlicense", "MIT" ]
null
null
null
from django.db import models from django.utils import timezone from django.contrib.auth.models import User from django.urls import reverse from taggit.managers import TaggableManager # Published custom post manager model # Returns the QuerySet that will be executed / custom manager # Post model # Comment mode...
37.857143
117
0.692598
from django.db import models from django.utils import timezone from django.contrib.auth.models import User from django.urls import reverse from taggit.managers import TaggableManager # Published custom post manager model class PublishedManager(models.Manager): # Returns the QuerySet that will be executed / custom...
402
2,629
92
0923306083ac4d397ac078d69ab9b190c91eeb8c
107
py
Python
Practice/bacteria.py
ashishjayamohan/competitive-programming
05c5c560c2c2eb36121c52693b8c7d084f435f9e
[ "MIT" ]
null
null
null
Practice/bacteria.py
ashishjayamohan/competitive-programming
05c5c560c2c2eb36121c52693b8c7d084f435f9e
[ "MIT" ]
null
null
null
Practice/bacteria.py
ashishjayamohan/competitive-programming
05c5c560c2c2eb36121c52693b8c7d084f435f9e
[ "MIT" ]
null
null
null
num = int(input()) ans = [int(i) for i in bin(num)[2:]] sum = 0 for i in ans: sum += i print(str(sum))
15.285714
36
0.551402
num = int(input()) ans = [int(i) for i in bin(num)[2:]] sum = 0 for i in ans: sum += i print(str(sum))
0
0
0
a4e84e4a552a82371259882409a12ca647bd5fb9
2,898
py
Python
smartsheet/models/cell_link_widget_content.py
bromic007/smartsheet-python-sdk
ef256b7421a65a56a7138dc2b3eb5d69a1a06590
[ "Apache-2.0" ]
106
2015-02-21T14:26:32.000Z
2022-03-31T05:56:53.000Z
smartsheet/models/cell_link_widget_content.py
bromic007/smartsheet-python-sdk
ef256b7421a65a56a7138dc2b3eb5d69a1a06590
[ "Apache-2.0" ]
94
2015-02-09T13:16:00.000Z
2022-03-16T06:37:41.000Z
smartsheet/models/cell_link_widget_content.py
bromic007/smartsheet-python-sdk
ef256b7421a65a56a7138dc2b3eb5d69a1a06590
[ "Apache-2.0" ]
85
2015-02-06T22:05:25.000Z
2022-03-16T06:22:59.000Z
# pylint: disable=C0111,R0902,R0904,R0912,R0913,R0915,E1101 # Smartsheet Python SDK. # # Copyright 2019 Smartsheet.com, 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....
27.865385
80
0.680124
# pylint: disable=C0111,R0902,R0904,R0912,R0913,R0915,E1101 # Smartsheet Python SDK. # # Copyright 2019 Smartsheet.com, 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....
655
0
343
1ef96038f8d9a53ecba0ac1ec0535d81b656ef77
7,569
py
Python
src/datamodules/language_modeling_hf.py
xxchenxx/pixelfly
6c366dab855bede8b8ff0d6c8473a64a790bd042
[ "Apache-2.0" ]
49
2021-12-07T11:51:49.000Z
2022-03-12T20:07:32.000Z
src/datamodules/language_modeling_hf.py
xxchenxx/pixelfly
6c366dab855bede8b8ff0d6c8473a64a790bd042
[ "Apache-2.0" ]
7
2021-12-07T11:51:35.000Z
2022-02-07T14:36:08.000Z
src/datamodules/language_modeling_hf.py
xxchenxx/pixelfly
6c366dab855bede8b8ff0d6c8473a64a790bd042
[ "Apache-2.0" ]
6
2021-12-16T09:24:09.000Z
2022-03-14T04:59:27.000Z
# Adapted from https://github.com/huggingface/transformers/blob/master/examples/pytorch/language-modeling/run_clm.py from itertools import chain from pathlib import Path import pickle from typing import Any, List, Union from torch.utils.data.dataloader import DataLoader, Dataset from transformers import AutoTokenizer,...
44.523529
123
0.65068
# Adapted from https://github.com/huggingface/transformers/blob/master/examples/pytorch/language-modeling/run_clm.py from itertools import chain from pathlib import Path import pickle from typing import Any, List, Union from torch.utils.data.dataloader import DataLoader, Dataset from transformers import AutoTokenizer,...
6,239
803
23
2b3ed985183b653880c149a0ff756f414a748f17
1,850
py
Python
mlflow/utils/proto_json_utils.py
akarloff/mlflow
be9774a76b4b6dcdb8cc2147a93d7c8676438292
[ "Apache-2.0" ]
3
2019-10-07T01:12:25.000Z
2020-07-06T04:27:51.000Z
mlflow/utils/proto_json_utils.py
akarloff/mlflow
be9774a76b4b6dcdb8cc2147a93d7c8676438292
[ "Apache-2.0" ]
15
2019-10-07T01:11:46.000Z
2022-03-08T23:33:53.000Z
mlflow/utils/proto_json_utils.py
akarloff/mlflow
be9774a76b4b6dcdb8cc2147a93d7c8676438292
[ "Apache-2.0" ]
6
2019-11-28T13:23:35.000Z
2020-07-08T19:22:12.000Z
from google.protobuf.json_format import MessageToJson, ParseDict def message_to_json(message): """Converts a message to JSON, using snake_case for field names.""" return MessageToJson(message, preserving_proto_field_name=True) def _stringify_all_experiment_ids(x): """Converts experiment_id fields which ...
45.121951
98
0.675135
from google.protobuf.json_format import MessageToJson, ParseDict def message_to_json(message): """Converts a message to JSON, using snake_case for field names.""" return MessageToJson(message, preserving_proto_field_name=True) def _stringify_all_experiment_ids(x): """Converts experiment_id fields which ...
0
0
0
e89f5e8077104cfcb02cbe932c76fc9ed32e19d6
168
py
Python
b_cfn_custom_userpool_authorizer_test/integration/app.py
simonasvaitkus/B.CfnCustomUserPoolAuthorizer
6532665d3b29031f86c19205cd58b0bcd9e4f827
[ "Apache-2.0" ]
null
null
null
b_cfn_custom_userpool_authorizer_test/integration/app.py
simonasvaitkus/B.CfnCustomUserPoolAuthorizer
6532665d3b29031f86c19205cd58b0bcd9e4f827
[ "Apache-2.0" ]
null
null
null
b_cfn_custom_userpool_authorizer_test/integration/app.py
simonasvaitkus/B.CfnCustomUserPoolAuthorizer
6532665d3b29031f86c19205cd58b0bcd9e4f827
[ "Apache-2.0" ]
1
2022-01-04T07:46:14.000Z
2022-01-04T07:46:14.000Z
from aws_cdk.core import App from b_cfn_custom_userpool_authorizer_test.integration.infrastructure.main_stack import MainStack app = App() MainStack(app) app.synth()
21
97
0.839286
from aws_cdk.core import App from b_cfn_custom_userpool_authorizer_test.integration.infrastructure.main_stack import MainStack app = App() MainStack(app) app.synth()
0
0
0
553c19fc645a50cb62f682b4f96e26d230a363e7
402
py
Python
month01/day18/extance01.py
Amiao-miao/all-codes
ec50036d42d40086cac5fddf6baf4de18ac91e55
[ "Apache-2.0" ]
1
2021-02-02T02:17:37.000Z
2021-02-02T02:17:37.000Z
month01/day18/extance01.py
Amiao-miao/all-codes
ec50036d42d40086cac5fddf6baf4de18ac91e55
[ "Apache-2.0" ]
null
null
null
month01/day18/extance01.py
Amiao-miao/all-codes
ec50036d42d40086cac5fddf6baf4de18ac91e55
[ "Apache-2.0" ]
null
null
null
""" 重写range函数,要求重写之后的myrange(5)输出结果为:5,4,3,2,1,0 """ mr=MyRange(5) iterator=mr.__iter__() while True: try: i=iterator.__next__() print(i) except StopIteration: break
18.272727
44
0.597015
""" 重写range函数,要求重写之后的myrange(5)输出结果为:5,4,3,2,1,0 """ class Iterator: def __init__(self,start): self.start=start+1 def __next__(self): self.start-=1 if self.start<0: raise StopIteration return self.start mr=MyRange(5) iterator=mr.__iter__() while True: try: ...
134
-6
74
768c8de4ecc5351af79f245ca4a22a3b13c34e5e
42,844
py
Python
dramkit/plottools/plot_common.py
Genlovy-Hoo/dramkit
fa3d2f35ebe9effea88a19e49d876b43d3c5c4c7
[ "MIT" ]
null
null
null
dramkit/plottools/plot_common.py
Genlovy-Hoo/dramkit
fa3d2f35ebe9effea88a19e49d876b43d3c5c4c7
[ "MIT" ]
null
null
null
dramkit/plottools/plot_common.py
Genlovy-Hoo/dramkit
fa3d2f35ebe9effea88a19e49d876b43d3c5c4c7
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # import seaborn as sns # sns.set() import numpy as np from dramkit.gentools import isnull from dramkit.gentools import get_con_start_end from dramkit.gentools import get_update_kwargs from dramkit.logtools.utils_logger import logger_show import matplotlib as mpl mpl.rcParams['font.family'] ...
40.380773
95
0.520283
# -*- coding: utf-8 -*- # import seaborn as sns # sns.set() import numpy as np from dramkit.gentools import isnull from dramkit.gentools import get_con_start_end from dramkit.gentools import get_update_kwargs from dramkit.logtools.utils_logger import logger_show import matplotlib as mpl mpl.rcParams['font.family'] ...
2,672
0
114
fefcd687313ea0c5ab5f76d2d60e8b4ac990e510
4,209
py
Python
3_detector/baseline_prediction.py
meliketoy/gradcam.pytorch
7b71c55b1debf633918793bd7db5ac4533647eb0
[ "MIT" ]
125
2018-04-11T09:55:23.000Z
2021-08-25T03:31:09.000Z
3_detector/baseline_prediction.py
meliketoy/gradcam.pytorch
7b71c55b1debf633918793bd7db5ac4533647eb0
[ "MIT" ]
3
2018-05-22T05:50:04.000Z
2019-04-05T03:27:55.000Z
3_detector/baseline_prediction.py
meliketoy/gradcam.pytorch
7b71c55b1debf633918793bd7db5ac4533647eb0
[ "MIT" ]
18
2018-04-12T00:16:33.000Z
2022-02-16T11:41:49.000Z
import os import cv2 import sys import numpy as np import torch import torch.nn as nn import torch.backends.cudnn as cudnn import torchvision import argparse import config as cf import operator import csv from torchvision import datasets, models, transforms from networks import * from torch.autograd import Variable f...
31.646617
111
0.613447
import os import cv2 import sys import numpy as np import torch import torch.nn as nn import torch.backends.cudnn as cudnn import torchvision import argparse import config as cf import operator import csv from torchvision import datasets, models, transforms from networks import * from torch.autograd import Variable f...
475
0
69
005116bda9ab7e18043f040ffd6d11a5553c80dc
6,058
py
Python
analyse_actions/main_analyse_action_cooccurence.py
bryant1410/vlog_action_reason
ac4e1ba437b9d544218bab48b1d788f54a62e794
[ "MIT" ]
null
null
null
analyse_actions/main_analyse_action_cooccurence.py
bryant1410/vlog_action_reason
ac4e1ba437b9d544218bab48b1d788f54a62e794
[ "MIT" ]
null
null
null
analyse_actions/main_analyse_action_cooccurence.py
bryant1410/vlog_action_reason
ac4e1ba437b9d544218bab48b1d788f54a62e794
[ "MIT" ]
null
null
null
import json from collections import Counter import spacy import en_core_web_sm from tqdm import tqdm nlp = en_core_web_sm.load() # def get_subject_verb_obj(sentence): # print(sentence) # tokens = nlp(sentence) # svos = findSVOs(tokens) # print(svos) # print("-------------------------------") if ...
38.833333
144
0.556949
import json from collections import Counter import spacy import en_core_web_sm from tqdm import tqdm nlp = en_core_web_sm.load() # def get_subject_verb_obj(sentence): # print(sentence) # tokens = nlp(sentence) # svos = findSVOs(tokens) # print(svos) # print("-------------------------------") def ...
5,543
0
161
2fe727a6ae8c370954a0bb1707dcf30d4d326e1f
791
py
Python
setup.py
jackd/multi-graph
e4db7dfdf7dc5e45bb743a1baa85203bed135f23
[ "Apache-2.0" ]
null
null
null
setup.py
jackd/multi-graph
e4db7dfdf7dc5e45bb743a1baa85203bed135f23
[ "Apache-2.0" ]
null
null
null
setup.py
jackd/multi-graph
e4db7dfdf7dc5e45bb743a1baa85203bed135f23
[ "Apache-2.0" ]
null
null
null
import os from setuptools import setup # We follow Semantic Versioning (https://semver.org/) _MAJOR_VERSION = "0" _MINOR_VERSION = "1" _PATCH_VERSION = "0" with open(os.path.join(os.path.dirname(__file__), "requirements.txt")) as fp: install_requires = fp.read().split("\n") setup( name="multi-graph", de...
27.275862
87
0.690265
import os from setuptools import setup # We follow Semantic Versioning (https://semver.org/) _MAJOR_VERSION = "0" _MINOR_VERSION = "1" _PATCH_VERSION = "0" with open(os.path.join(os.path.dirname(__file__), "requirements.txt")) as fp: install_requires = fp.read().split("\n") setup( name="multi-graph", de...
0
0
0
6570921c87d4e1bbef050578028ce1d8a8de3951
9,799
py
Python
fastaqc/main.py
lukasjelonek/fastaqc
9874106e24adff2f06e3b42a38225bd890337f74
[ "MIT" ]
2
2020-08-06T14:30:10.000Z
2021-05-25T11:38:11.000Z
fastaqc/main.py
lukasjelonek/fastaqc
9874106e24adff2f06e3b42a38225bd890337f74
[ "MIT" ]
null
null
null
fastaqc/main.py
lukasjelonek/fastaqc
9874106e24adff2f06e3b42a38225bd890337f74
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import argparse from argparse import RawTextHelpFormatter import logging from pbr.version import VersionInfo from Bio import SeqIO import itertools from prettytable import PrettyTable import tabulate from xopen import xopen from fastaqc.alphabet import Alphabet import pprint __version__ = Versio...
35.893773
135
0.724462
#!/usr/bin/env python3 import argparse from argparse import RawTextHelpFormatter import logging from pbr.version import VersionInfo from Bio import SeqIO import itertools from prettytable import PrettyTable import tabulate from xopen import xopen from fastaqc.alphabet import Alphabet import pprint __version__ = Versio...
6,926
0
437
2184103632d21249a04ae9785c0dc0deaaf65c13
24,585
py
Python
pyplr/pupil.py
PyPlr/cvd_pupillometry
d2e0980a6f902668e46c14f79988a2743b0c2fd4
[ "MIT" ]
7
2021-03-20T11:40:11.000Z
2022-02-12T15:49:12.000Z
pyplr/pupil.py
PyPlr/cvd_pupillometry
d2e0980a6f902668e46c14f79988a2743b0c2fd4
[ "MIT" ]
1
2021-06-04T06:00:42.000Z
2021-06-04T06:00:42.000Z
pyplr/pupil.py
PyPlr/cvd_pupillometry
d2e0980a6f902668e46c14f79988a2743b0c2fd4
[ "MIT" ]
2
2021-06-04T03:09:53.000Z
2021-08-30T17:14:09.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ pyplr.pupil =========== A module for interfacing with a Pupil Core eye tracker. @author: jtm """ from time import time from concurrent import futures from typing import List, Tuple import numpy as np import msgpack import zmq class PupilCore...
34.675599
113
0.534838
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ pyplr.pupil =========== A module for interfacing with a Pupil Core eye tracker. @author: jtm """ from time import time from concurrent import futures from typing import List, Tuple import numpy as np import msgpack import zmq class PupilCore...
0
0
0
3408635665e30e7200d0cedd9014019a50c33b29
42
py
Python
parkloader/__init__.py
patientzero/parkloader
9c0d8f49b83a831b716c7d99f2eb674daab3f23a
[ "WTFPL" ]
1
2021-07-29T07:02:01.000Z
2021-07-29T07:02:01.000Z
parkloader/__init__.py
patientzero/parkloader
9c0d8f49b83a831b716c7d99f2eb674daab3f23a
[ "WTFPL" ]
null
null
null
parkloader/__init__.py
patientzero/parkloader
9c0d8f49b83a831b716c7d99f2eb674daab3f23a
[ "WTFPL" ]
null
null
null
from ._loader import ParkLoader, ParkData
21
41
0.833333
from ._loader import ParkLoader, ParkData
0
0
0
45bc12a5b1f52670fbe1c8e2c50db97f03d19b5b
660
py
Python
2miner-monitoring/utils.py
Tocard/2miner-monitoring
810a166930f21605ffbc6f398ba2024c7967db44
[ "MIT" ]
null
null
null
2miner-monitoring/utils.py
Tocard/2miner-monitoring
810a166930f21605ffbc6f398ba2024c7967db44
[ "MIT" ]
null
null
null
2miner-monitoring/utils.py
Tocard/2miner-monitoring
810a166930f21605ffbc6f398ba2024c7967db44
[ "MIT" ]
null
null
null
import orchestrator
22
46
0.60303
import orchestrator def get_rig_info(rig_name): for rig in orchestrator.config['rig']: if rig['rig_name'] == rig_name: return rig return None def get_gpus(rig_name): rig = get_rig_info(rig_name) if rig is None: return ['No_GPU_FOUND'] cards_list = [] for card in r...
568
0
69
819b36536a59af143c326bb3444e741a07c40d72
95
py
Python
src/features/__init__.py
brunompacheco/part-counting
dbf71e7465c8e384e3c60694f65819a65742193b
[ "CNRI-Python" ]
null
null
null
src/features/__init__.py
brunompacheco/part-counting
dbf71e7465c8e384e3c60694f65819a65742193b
[ "CNRI-Python" ]
null
null
null
src/features/__init__.py
brunompacheco/part-counting
dbf71e7465c8e384e3c60694f65819a65742193b
[ "CNRI-Python" ]
null
null
null
from .base import ( preprocess_box_for_cv, preprocess_box_for_dl, load_part_model )
19
26
0.747368
from .base import ( preprocess_box_for_cv, preprocess_box_for_dl, load_part_model )
0
0
0
e3ca1bc287e5fdcf72f9c756246891a6df1fa012
4,572
py
Python
app/app/core/auth.py
ARgorithm/Server
b25b593721bab87263c49dddf52066288e45c272
[ "MIT" ]
2
2021-02-24T17:23:46.000Z
2021-03-07T12:43:31.000Z
app/app/core/auth.py
ARgorithm/Server
b25b593721bab87263c49dddf52066288e45c272
[ "MIT" ]
14
2020-10-18T14:50:43.000Z
2021-06-18T07:35:13.000Z
app/app/core/auth.py
ARgorithm/Server
b25b593721bab87263c49dddf52066288e45c272
[ "MIT" ]
null
null
null
"""Authentication and authorization tools """ import os from typing import Optional from fastapi import Depends, HTTPException, status from fastapi.security import OAuth2PasswordBearer, OAuth2PasswordRequestForm from fastapi.security.utils import get_authorization_scheme_param from typing import Optional from datetime ...
34.119403
89
0.666885
"""Authentication and authorization tools """ import os from typing import Optional from fastapi import Depends, HTTPException, status from fastapi.security import OAuth2PasswordBearer, OAuth2PasswordRequestForm from fastapi.security.utils import get_authorization_scheme_param from typing import Optional from datetime ...
0
0
0
b4c8b22ee24602456db544e5aed37bdd8ac96935
376
py
Python
website/migrations/0002_auto_20210111_0922.py
minielectron/portfolio
c45e5976d141ca69fb4e9fc35ca862ef1bda8d52
[ "Apache-2.0" ]
null
null
null
website/migrations/0002_auto_20210111_0922.py
minielectron/portfolio
c45e5976d141ca69fb4e9fc35ca862ef1bda8d52
[ "Apache-2.0" ]
null
null
null
website/migrations/0002_auto_20210111_0922.py
minielectron/portfolio
c45e5976d141ca69fb4e9fc35ca862ef1bda8d52
[ "Apache-2.0" ]
1
2021-01-19T16:27:29.000Z
2021-01-19T16:27:29.000Z
# Generated by Django 3.1.4 on 2021-01-11 03:52 from django.db import migrations, models
19.789474
47
0.587766
# Generated by Django 3.1.4 on 2021-01-11 03:52 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('website', '0001_initial'), ] operations = [ migrations.AlterField( model_name='project', name='action_url', ...
0
262
23
8a1b61bc6b40e6f4c78096129e21b78457da84f3
16,109
py
Python
heidelberg_metadata_gui/metadata_forms/metadata_forms.py
lkeegan/heidelberg-metadata-gui
4584cf4fd0253a8578ecf2d00656fb511aa55914
[ "MIT" ]
5
2020-12-10T08:38:48.000Z
2021-05-17T13:23:47.000Z
heidelberg_metadata_gui/metadata_forms/metadata_forms.py
lkeegan/heidelberg-metadata-gui
4584cf4fd0253a8578ecf2d00656fb511aa55914
[ "MIT" ]
5
2020-10-29T18:03:01.000Z
2021-05-18T13:36:50.000Z
heidelberg_metadata_gui/metadata_forms/metadata_forms.py
lkeegan/heidelberg-metadata-gui
4584cf4fd0253a8578ecf2d00656fb511aa55914
[ "MIT" ]
2
2021-01-25T02:59:04.000Z
2021-05-18T12:33:18.000Z
import dash import dash_html_components as html import dash_core_components as dcc from dash.dependencies import Input, Output, State import dash_bootstrap_components as dbc import numpy as np from jsonschema import validate import json import yaml import base64 from json_schema_to_dash_forms.forms import SchemaFormCon...
41.625323
181
0.49581
import dash import dash_html_components as html import dash_core_components as dcc from dash.dependencies import Input, Output, State import dash_bootstrap_components as dbc import numpy as np from jsonschema import validate import json import yaml import base64 from json_schema_to_dash_forms.forms import SchemaFormCon...
1,048
14,603
23
b2ea94ad5392d51063bea1570b6755fe9f1b1bf9
1,754
py
Python
tools/concat_video.py
jumploop/collection_python
f66f18dc5ae50fce95679e0f4aee5e28b2543432
[ "MIT" ]
null
null
null
tools/concat_video.py
jumploop/collection_python
f66f18dc5ae50fce95679e0f4aee5e28b2543432
[ "MIT" ]
null
null
null
tools/concat_video.py
jumploop/collection_python
f66f18dc5ae50fce95679e0f4aee5e28b2543432
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding:utf-8 -*- """ 使用 ffmpeg 截取视频片段并且重新拼接 使用方式: 提供文件格式如下:比如 input.txt ./input.mp4 00:01:00 00:02:00 00:04:00 00:08:00 """ import os import sys CONCAT_FILE = '_concat.txt' def remove(filepath_list): """移除中间文件""" for path in filepath_list + [CONCAT_FILE]: if os.path....
23.078947
81
0.59293
#!/usr/bin/env python # -*- coding:utf-8 -*- """ 使用 ffmpeg 截取视频片段并且重新拼接 使用方式: 提供文件格式如下:比如 input.txt ./input.mp4 00:01:00 00:02:00 00:04:00 00:08:00 """ import os import sys CONCAT_FILE = '_concat.txt' def read_input(filepath): with open(filepath) as f: lines = f.readlines() input_mp4 = lines[0...
1,259
0
92
704b9d4c5553970c0f3e90917e7358c824ef4c8b
3,456
py
Python
pyknp_eventgraph/sentence.py
ku-nlp/pyknp-eventgraph
927128ac41098bc45637b02a3c2420d345a41347
[ "BSD-3-Clause" ]
7
2019-11-23T10:57:35.000Z
2021-01-03T22:40:13.000Z
pyknp_eventgraph/sentence.py
ku-nlp/pyknp-eventgraph
927128ac41098bc45637b02a3c2420d345a41347
[ "BSD-3-Clause" ]
1
2021-11-05T02:19:17.000Z
2021-11-05T02:19:17.000Z
pyknp_eventgraph/sentence.py
ku-nlp/pyknp-eventgraph
927128ac41098bc45637b02a3c2420d345a41347
[ "BSD-3-Clause" ]
null
null
null
from logging import getLogger from typing import TYPE_CHECKING, List, Optional from pyknp import BList, Tag from pyknp_eventgraph.builder import Builder from pyknp_eventgraph.component import Component from pyknp_eventgraph.event import Event, EventBuilder from pyknp_eventgraph.helper import convert_mrphs_to_surf if...
34.217822
104
0.616898
from logging import getLogger from typing import TYPE_CHECKING, List, Optional from pyknp import BList, Tag from pyknp_eventgraph.builder import Builder from pyknp_eventgraph.component import Component from pyknp_eventgraph.event import Event, EventBuilder from pyknp_eventgraph.helper import convert_mrphs_to_surf if...
1,529
110
73
a24e9311e07d4e4c88a452ed870219f9da3eb322
1,970
py
Python
leetcode/Q1-30/Q7.py
BennyJane/algorithm_mad
4173a4cc60d0f4f87b0cb7f6bc87d1eefbaff937
[ "Apache-2.0" ]
null
null
null
leetcode/Q1-30/Q7.py
BennyJane/algorithm_mad
4173a4cc60d0f4f87b0cb7f6bc87d1eefbaff937
[ "Apache-2.0" ]
null
null
null
leetcode/Q1-30/Q7.py
BennyJane/algorithm_mad
4173a4cc60d0f4f87b0cb7f6bc87d1eefbaff937
[ "Apache-2.0" ]
null
null
null
# !/usr/bin/env python # -*-coding:utf-8 -*- # PROJECT : Python-Exercise # Time :2020/12/19 15:59 # Warning :The Hard Way Is Easier from typing import List """ 给定一个整数数组,编写一个函数,找出索引m和n,只要将索引区间[m,n]的元素排好序,整个数组就是有序的。注意:n-m尽量最小,也就是说,找出符合条件的最短序列。函数返回值为[m,n],若不存在这样的m和n(例如整个数组是有序的),请返回[-1,-1]。 输入: [1,2,4,7,10,11...
25.584416
127
0.484264
# !/usr/bin/env python # -*-coding:utf-8 -*- # PROJECT : Python-Exercise # Time :2020/12/19 15:59 # Warning :The Hard Way Is Easier from typing import List """ 给定一个整数数组,编写一个函数,找出索引m和n,只要将索引区间[m,n]的元素排好序,整个数组就是有序的。注意:n-m尽量最小,也就是说,找出符合条件的最短序列。函数返回值为[m,n],若不存在这样的m和n(例如整个数组是有序的),请返回[-1,-1]。 输入: [1,2,4,7,10,11...
358
1,465
23
c3aaf3d7a9934f6e30372230ee9ed118c686eaac
2,228
py
Python
apis/grpc/egress_filter/egress_filter_pb2_grpc.py
jaipradeesh/vald
4642466de438d83cdaf244a592284878dd6e0986
[ "Apache-2.0" ]
null
null
null
apis/grpc/egress_filter/egress_filter_pb2_grpc.py
jaipradeesh/vald
4642466de438d83cdaf244a592284878dd6e0986
[ "Apache-2.0" ]
null
null
null
apis/grpc/egress_filter/egress_filter_pb2_grpc.py
jaipradeesh/vald
4642466de438d83cdaf244a592284878dd6e0986
[ "Apache-2.0" ]
null
null
null
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc import payload_pb2 as payload__pb2
34.8125
77
0.749551
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc import payload_pb2 as payload__pb2 class EgressFilterStub(object): # missing associated documentation comment in .proto file pass def __init__(self, channel): """Constructor. Args: channel: A grpc.Channel. """...
1,232
806
69
f5162641ff92c0cfb2e530d8ef03d9778fa21e9f
937
py
Python
examples/timeseries/TS9_create_cattimeseries_from_timeseries.py
SciFin-Team/SciFin
e4e3d1a32e060c911e43d89df833b3ad078ba6df
[ "MIT" ]
9
2020-08-07T02:58:44.000Z
2021-10-05T16:37:07.000Z
examples/timeseries/TS9_create_cattimeseries_from_timeseries.py
SciFin-Team/SciFin
e4e3d1a32e060c911e43d89df833b3ad078ba6df
[ "MIT" ]
9
2020-08-30T09:55:23.000Z
2020-10-15T20:06:36.000Z
examples/timeseries/TS9_create_cattimeseries_from_timeseries.py
SciFin-Team/SciFin
e4e3d1a32e060c911e43d89df833b3ad078ba6df
[ "MIT" ]
5
2020-08-17T10:35:26.000Z
2020-11-13T17:46:33.000Z
# Standard library imports # / # Third party imports import pandas as pd # Local application imports from scifin.timeseries.timeseries import build_from_csv, CatTimeSeries, multi_plot # Build a time series from a CSV file online ts1 = build_from_csv(filepath_or_buffer='https://raw.githubusercontent.com/selva86/datas...
26.027778
109
0.727855
# Standard library imports # / # Third party imports import pandas as pd # Local application imports from scifin.timeseries.timeseries import build_from_csv, CatTimeSeries, multi_plot # Build a time series from a CSV file online ts1 = build_from_csv(filepath_or_buffer='https://raw.githubusercontent.com/selva86/datas...
0
0
0
cdd7dac01b01a8e4138ec85c3d9be56f87a5c857
3,143
py
Python
tests/inputs/test_list_input.py
rominf/cleo
72f6a8a19f26eefc32c3fcf9844484fc9a38583f
[ "MIT" ]
null
null
null
tests/inputs/test_list_input.py
rominf/cleo
72f6a8a19f26eefc32c3fcf9844484fc9a38583f
[ "MIT" ]
null
null
null
tests/inputs/test_list_input.py
rominf/cleo
72f6a8a19f26eefc32c3fcf9844484fc9a38583f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from cleo.inputs import ListInput, InputDefinition, InputArgument, InputOption from .. import CleoTestCase
30.221154
85
0.459752
# -*- coding: utf-8 -*- from cleo.inputs import ListInput, InputDefinition, InputArgument, InputOption from .. import CleoTestCase class ListInputTest(CleoTestCase): def test_get_first_argument(self): input_ = ListInput([]) self.assertEqual(None, input_.get_first_argument()) input_ = Li...
2,784
13
212
39dd068f5a603fde52304319053d558e7b1c5429
371
py
Python
tests/components/tado/test_binary_sensor.py
dlintott/core
a6c83cc46a34084fdc4c0e7221b6ba493f82cbac
[ "Apache-2.0" ]
1
2021-01-27T08:47:19.000Z
2021-01-27T08:47:19.000Z
tests/components/tado/test_binary_sensor.py
dlintott/core
a6c83cc46a34084fdc4c0e7221b6ba493f82cbac
[ "Apache-2.0" ]
48
2021-01-06T07:02:41.000Z
2022-03-31T06:10:45.000Z
tests/components/tado/test_binary_sensor.py
dlintott/core
a6c83cc46a34084fdc4c0e7221b6ba493f82cbac
[ "Apache-2.0" ]
2
2021-07-14T20:22:04.000Z
2021-09-22T08:56:16.000Z
"""The sensor tests for the tado platform.""" from homeassistant.const import STATE_ON from .util import async_init_integration async def test_home_create_binary_sensors(hass): """Test creation of home binary sensors.""" await async_init_integration(hass) state = hass.states.get("binary_sensor.wr1_con...
24.733333
65
0.765499
"""The sensor tests for the tado platform.""" from homeassistant.const import STATE_ON from .util import async_init_integration async def test_home_create_binary_sensors(hass): """Test creation of home binary sensors.""" await async_init_integration(hass) state = hass.states.get("binary_sensor.wr1_con...
0
0
0
209e03c081b70ba1ae892eaa9e06a4a8601490c5
2,845
py
Python
check_tus.py
flashdagger/conmon
c6e75f115ad104ea7ecc7b14618efadefadad2f8
[ "MIT" ]
null
null
null
check_tus.py
flashdagger/conmon
c6e75f115ad104ea7ecc7b14618efadefadad2f8
[ "MIT" ]
null
null
null
check_tus.py
flashdagger/conmon
c6e75f115ad104ea7ecc7b14618efadefadad2f8
[ "MIT" ]
null
null
null
import json import sys from collections import defaultdict from difflib import ndiff from pathlib import Path from pprint import pformat from typing import List from conmon.utils import shorten if __name__ == "__main__": test_main(*sys.argv[1:2])
27.621359
87
0.557469
import json import sys from collections import defaultdict from difflib import ndiff from pathlib import Path from pprint import pformat from typing import List from conmon.utils import shorten def show_diff(key, obj_a, obj_b) -> List[str]: lines = [f">>> {key}:"] width = 1 if any(len(str(obj)) for obj in (o...
2,495
0
92
2a77e6578c6033d34bb733d2b6d8b6696f5e031b
742
py
Python
src/session/twitter/buffers/local_trends.py
Oire/TheQube
fcfd8a68b15948e0740642d635db24adef8cc314
[ "MIT" ]
21
2015-08-02T21:26:14.000Z
2019-12-27T09:57:44.000Z
src/session/twitter/buffers/local_trends.py
Oire/TheQube
fcfd8a68b15948e0740642d635db24adef8cc314
[ "MIT" ]
34
2015-01-12T00:38:14.000Z
2020-08-31T11:19:37.000Z
src/session/twitter/buffers/local_trends.py
Oire/TheQube
fcfd8a68b15948e0740642d635db24adef8cc314
[ "MIT" ]
15
2015-03-24T15:42:30.000Z
2020-09-24T20:26:42.000Z
from logger import logger logging = logger.getChild('sessions.twitter.buffers.local_trends') import output import threading from trends import Trends
32.26087
153
0.726415
from logger import logger logging = logger.getChild('sessions.twitter.buffers.local_trends') import output import threading from trends import Trends class LocalTrends (Trends): def __init__ (self, woeid=1, *args, **kwargs): self.init_done_event = threading.Event() self.woeid = woeid self.initia...
500
6
77
6384d4a6dfa25b8cce835f5d1b582b1e028f769c
1,411
py
Python
misc/get_max_mesh.py
kwrobert/nanowire
2dd003e9e1898b2ae9f78a261b3ce1406ec717b8
[ "Apache-2.0", "MIT" ]
null
null
null
misc/get_max_mesh.py
kwrobert/nanowire
2dd003e9e1898b2ae9f78a261b3ce1406ec717b8
[ "Apache-2.0", "MIT" ]
null
null
null
misc/get_max_mesh.py
kwrobert/nanowire
2dd003e9e1898b2ae9f78a261b3ce1406ec717b8
[ "Apache-2.0", "MIT" ]
1
2019-06-23T01:26:44.000Z
2019-06-23T01:26:44.000Z
import numpy as np import os # import matplotlib.pyplot as plt import scipy.constants as c if __name__ == '__main__': main()
42.757576
84
0.670446
import numpy as np import os # import matplotlib.pyplot as plt import scipy.constants as c def main(): print('adfbadb') base = '/home/kyle_robertson/schoolwork/gradschool/nanowire/code/NK' nkfiles = ['004_SiO2_nk_Hz.txt','006_GaAs_nk_Walker_modified_Hz.txt', '007_Cyclotrene_nk_Hz.txt','008...
1,256
0
23
ae9364344294710bd1de6b73955cc5936bc86346
219
py
Python
ignore.py
kiseonjeong/tensorflow-v1.x-ml
5b5636672eb5bdc67f1a3272614d79bdb1717ee1
[ "MIT" ]
1
2020-09-25T07:51:35.000Z
2020-09-25T07:51:35.000Z
ignore.py
kiseonjeong/tensorflow-v1.x-ml
5b5636672eb5bdc67f1a3272614d79bdb1717ee1
[ "MIT" ]
5
2020-09-29T15:25:32.000Z
2020-10-07T16:07:56.000Z
ignore.py
kiseonjeong/tensorflow-v1.x-ml
5b5636672eb5bdc67f1a3272614d79bdb1717ee1
[ "MIT" ]
null
null
null
# For tensorflow version 1.x import warnings warnings.filterwarnings('ignore', category=Warning) #warnings.filterwarnings('ignore', category=DeprecationWarning) #warnings.filterwarnings('ignore', category=FutureWarning)
43.8
63
0.83105
# For tensorflow version 1.x import warnings warnings.filterwarnings('ignore', category=Warning) #warnings.filterwarnings('ignore', category=DeprecationWarning) #warnings.filterwarnings('ignore', category=FutureWarning)
0
0
0
c24848df48f172d9d0e112a80fff56c4f63df5fe
949
py
Python
setup.py
ganggas95/flask2neo4j
172b60096cfe75e811f20f04acfd0d35dba84181
[ "MIT" ]
1
2019-03-10T18:01:12.000Z
2019-03-10T18:01:12.000Z
setup.py
ganggas95/flask2neo4j
172b60096cfe75e811f20f04acfd0d35dba84181
[ "MIT" ]
null
null
null
setup.py
ganggas95/flask2neo4j
172b60096cfe75e811f20f04acfd0d35dba84181
[ "MIT" ]
1
2020-02-12T09:21:31.000Z
2020-02-12T09:21:31.000Z
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="Flask2Neo4J", version="0.1a1", author="Ganggas95", author_email="subhannizar25@amail.com", description="""Extension Flask for integration with neo4j graph database""", long_description...
30.612903
80
0.638567
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="Flask2Neo4J", version="0.1a1", author="Ganggas95", author_email="subhannizar25@amail.com", description="""Extension Flask for integration with neo4j graph database""", long_description...
0
0
0
cf6f156403ce7cd2c7b980116d1345c37b6d6fbc
1,908
py
Python
tools/download_file.py
extensions/rusty_v8
eeffe1d722b4c5bb5828bad338c0f325fe6556ce
[ "MIT" ]
2,235
2019-10-31T23:02:17.000Z
2022-03-30T08:35:50.000Z
tools/download_file.py
extensions/rusty_v8
eeffe1d722b4c5bb5828bad338c0f325fe6556ce
[ "MIT" ]
423
2019-11-19T18:35:27.000Z
2022-03-29T08:43:04.000Z
tools/download_file.py
extensions/rusty_v8
eeffe1d722b4c5bb5828bad338c0f325fe6556ce
[ "MIT" ]
257
2019-11-08T02:53:32.000Z
2022-03-31T15:09:25.000Z
#!/usr/bin/env python # Copyright (c) 2012 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. from __future__ import print_function import argparse import os import sys import time try: from urllib2 import HTTPError, URL...
29.353846
78
0.592767
#!/usr/bin/env python # Copyright (c) 2012 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. from __future__ import print_function import argparse import os import sys import time try: from urllib2 import HTTPError, URL...
306
0
23
967730a921c4f9e6b2deb143029cac22acfae585
5,991
py
Python
mbot/utils/mainhelper.py
rozari0/MusicDownloader
24882aa2855a3151634216fe1bfa43fc5db9ea50
[ "MIT" ]
7
2022-01-25T19:51:52.000Z
2022-02-23T09:49:44.000Z
mbot/utils/mainhelper.py
rozari0/MusicDownloader
24882aa2855a3151634216fe1bfa43fc5db9ea50
[ "MIT" ]
2
2021-12-23T12:44:34.000Z
2022-02-25T10:26:29.000Z
mbot/utils/mainhelper.py
rozari0/MusicDownloader
24882aa2855a3151634216fe1bfa43fc5db9ea50
[ "MIT" ]
7
2021-12-11T13:48:35.000Z
2022-02-03T08:30:27.000Z
"""MIT License Copyright (c) 2022 Daniel Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distrib...
38.159236
157
0.633617
"""MIT License Copyright (c) 2022 Daniel Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distrib...
1,505
0
110
e1422de50940eb0e16779428af4948abd474d63b
4,223
py
Python
tests/template_tests/syntax_tests/test_ssi.py
bpeschier/django
f54c0ec06e390dc5bce95fdccbcb51d6423da4f9
[ "BSD-3-Clause" ]
1
2016-02-13T15:40:02.000Z
2016-02-13T15:40:02.000Z
tests/template_tests/syntax_tests/test_ssi.py
bpeschier/django
f54c0ec06e390dc5bce95fdccbcb51d6423da4f9
[ "BSD-3-Clause" ]
null
null
null
tests/template_tests/syntax_tests/test_ssi.py
bpeschier/django
f54c0ec06e390dc5bce95fdccbcb51d6423da4f9
[ "BSD-3-Clause" ]
1
2020-04-20T19:50:52.000Z
2020-04-20T19:50:52.000Z
from __future__ import unicode_literals import os from django.template import Context, Engine from django.test import SimpleTestCase, ignore_warnings from django.utils.deprecation import RemovedInDjango20Warning from ..utils import ROOT, setup @ignore_warnings(category=RemovedInDjango20Warning) @ignore_warnings(...
37.371681
87
0.602889
from __future__ import unicode_literals import os from django.template import Context, Engine from django.test import SimpleTestCase, ignore_warnings from django.utils.deprecation import RemovedInDjango20Warning from ..utils import ROOT, setup @ignore_warnings(category=RemovedInDjango20Warning) class SsiTagTests(S...
1,948
1,876
44
a182b567fcc7e47ea0a00715f8c65ee87e4bc6d6
696
py
Python
testing/code/odf_tarball/python/geo_reader.py
ageller/iceCubeTest
1cf74f0f225c8ab60820835cc5eee49cad586277
[ "MIT" ]
null
null
null
testing/code/odf_tarball/python/geo_reader.py
ageller/iceCubeTest
1cf74f0f225c8ab60820835cc5eee49cad586277
[ "MIT" ]
null
null
null
testing/code/odf_tarball/python/geo_reader.py
ageller/iceCubeTest
1cf74f0f225c8ab60820835cc5eee49cad586277
[ "MIT" ]
null
null
null
from encoder import decode_unsigned from encoder import decode_float import sys FLOAT_SIZE = 8 INT_SIZE = 4 LONG_SIZE = 8
25.777778
87
0.606322
from encoder import decode_unsigned from encoder import decode_float import sys FLOAT_SIZE = 8 INT_SIZE = 4 LONG_SIZE = 8 def read(file_handle): geo = dict() while True : data = file_handle.read( INT_SIZE ) #AMG edit for python 3 if (data == "" or (sys.version_info > (3, 0)...
550
0
23
5394f2f0a1144764eaeb2cb51a82db048b008d26
1,090
py
Python
src/commands/drive_forward.py
LaneFiddy/frc2020
d7c288ca1ecda37e9185bbb2c2f7534186bf5ed0
[ "MIT" ]
1
2019-12-11T05:21:28.000Z
2019-12-11T05:21:28.000Z
src/commands/drive_forward.py
LaneFiddy/frc2020
d7c288ca1ecda37e9185bbb2c2f7534186bf5ed0
[ "MIT" ]
2
2021-02-09T01:45:40.000Z
2021-05-18T00:25:44.000Z
src/commands/drive_forward.py
LaneFiddy/frc2020
d7c288ca1ecda37e9185bbb2c2f7534186bf5ed0
[ "MIT" ]
10
2019-08-12T16:11:07.000Z
2021-02-02T00:23:36.000Z
#!/usr/bin/env python3 '''Drive differentially with an Xbox controller.''' from wpilib.command import Command class DriveForward(Command): '''Drive differentially with an Xbox controller.''' def __init__(self, robot): '''Save the robot object and pull in the drivetrain subsystem.''' super().__...
32.058824
73
0.655963
#!/usr/bin/env python3 '''Drive differentially with an Xbox controller.''' from wpilib.command import Command class DriveForward(Command): '''Drive differentially with an Xbox controller.''' def __init__(self, robot): '''Save the robot object and pull in the drivetrain subsystem.''' super().__...
0
0
0
f3b0d0e844697b6d295e9bcea748ebb68d989e77
986
py
Python
Test3(square tracking face and eyes)/final.py
spell1612/Face-Overlay
7350d13999c2647412b34637a70c817cf5940350
[ "Apache-2.0" ]
4
2020-05-28T10:09:20.000Z
2020-09-27T08:42:35.000Z
Test3(square tracking face and eyes)/final.py
spell1612/Face-Overlay
7350d13999c2647412b34637a70c817cf5940350
[ "Apache-2.0" ]
null
null
null
Test3(square tracking face and eyes)/final.py
spell1612/Face-Overlay
7350d13999c2647412b34637a70c817cf5940350
[ "Apache-2.0" ]
3
2018-05-30T07:53:22.000Z
2020-12-06T19:26:42.000Z
import numpy as np import cv2 face_cascade = cv2.CascadeClassifier('haarcascade_frontalface_default.xml') eye_cascade = cv2.CascadeClassifier('haarcascade_eye.xml') cap = cv2.VideoCapture(0) count=1 while True: ret, img = cap.read() gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) faces = face_cascade.detect...
28.171429
75
0.602434
import numpy as np import cv2 face_cascade = cv2.CascadeClassifier('haarcascade_frontalface_default.xml') eye_cascade = cv2.CascadeClassifier('haarcascade_eye.xml') cap = cv2.VideoCapture(0) count=1 while True: ret, img = cap.read() gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) faces = face_cascade.detect...
0
0
0
5af21a99457c4dc2f490436f8edd08d4ef288ea1
148
py
Python
w3resource/Basics- Part I/basics025.py
DanielPascualSenties/pythonw3
f0355d1b640dec19e0b087797538204332111bb5
[ "MIT" ]
null
null
null
w3resource/Basics- Part I/basics025.py
DanielPascualSenties/pythonw3
f0355d1b640dec19e0b087797538204332111bb5
[ "MIT" ]
null
null
null
w3resource/Basics- Part I/basics025.py
DanielPascualSenties/pythonw3
f0355d1b640dec19e0b087797538204332111bb5
[ "MIT" ]
null
null
null
print("Insert a number") s = input() print("Insert a list of letters") lis = input().split(',') if s in lis: print(True) else: print(False)
16.444444
33
0.628378
print("Insert a number") s = input() print("Insert a list of letters") lis = input().split(',') if s in lis: print(True) else: print(False)
0
0
0
48eac921757831c53878d0bd97aaa23b45854771
307
py
Python
archive/app/views.py
rudijs/openshift-demo-app
e1deb2e5fb2a6b6f9bffaeecaf369e45cfa1c55c
[ "MIT" ]
null
null
null
archive/app/views.py
rudijs/openshift-demo-app
e1deb2e5fb2a6b6f9bffaeecaf369e45cfa1c55c
[ "MIT" ]
null
null
null
archive/app/views.py
rudijs/openshift-demo-app
e1deb2e5fb2a6b6f9bffaeecaf369e45cfa1c55c
[ "MIT" ]
null
null
null
from app import app from flask import render_template, abort import json @app.route('/') @app.route('/health')
25.583333
80
0.710098
from app import app from flask import render_template, abort import json @app.route('/') def home(): return render_template('home.html') @app.route('/health') def healthcheck(): # abort(500, description="server error") return json.dumps({'success':True}), 200, {'ContentType':'application/json'}
150
0
45
6852e717d22d2ecb417108ad98cb8365071fb621
1,524
py
Python
genetic/genetic_testing2.py
AlexanderGolys/anamator
92b2eb7a36c7d66c83d206e50c00de85f8d5d108
[ "MIT" ]
2
2021-08-16T21:31:05.000Z
2021-08-17T21:06:31.000Z
genetic/genetic_testing2.py
AlexanderGolys/anamator
92b2eb7a36c7d66c83d206e50c00de85f8d5d108
[ "MIT" ]
null
null
null
genetic/genetic_testing2.py
AlexanderGolys/anamator
92b2eb7a36c7d66c83d206e50c00de85f8d5d108
[ "MIT" ]
null
null
null
from genetic import * if __name__ == '__main__': # basic_func.DEBUG = True # init() # target = lambda x: math.sin(10*x) # populations_ = genetic_algorithm(target, population_size=40, unit_length=10, epochs=120, # selection_type='rank', default_std=1, save_king=True...
58.615385
121
0.658793
from genetic import * if __name__ == '__main__': # basic_func.DEBUG = True # init() # target = lambda x: math.sin(10*x) # populations_ = genetic_algorithm(target, population_size=40, unit_length=10, epochs=120, # selection_type='rank', default_std=1, save_king=True...
0
0
0
cbca2bdaace4ea792bf25d616c37eb572c2970bb
705
py
Python
tests/test_utils.py
victle/wikirec
46862c5e684caddd8843eb55f322d12a3edc7a55
[ "BSD-3-Clause" ]
4
2021-03-13T17:38:03.000Z
2021-09-28T09:22:06.000Z
tests/test_utils.py
victle/wikirec
46862c5e684caddd8843eb55f322d12a3edc7a55
[ "BSD-3-Clause" ]
null
null
null
tests/test_utils.py
victle/wikirec
46862c5e684caddd8843eb55f322d12a3edc7a55
[ "BSD-3-Clause" ]
1
2021-07-08T17:03:37.000Z
2021-07-08T17:03:37.000Z
""" Utilities Tests --------------- """ from wikirec import utils
23.5
81
0.632624
""" Utilities Tests --------------- """ from wikirec import utils def test__check_str_similarity(): assert utils._check_str_similarity("word", "word") == 1 def test__check_str_args(): assert utils._check_str_args("word_0", ["word_0", "word_1"]) == "word_0" assert utils._check_str_args(["word_0", "word_...
566
0
69
4ea20c229bc261c24fbc270df1fb0694b1927f92
185,086
py
Python
PES_Stadium_Exporter.py
antonysiuming/PES_Stadium_Exporter
c18e2724d028be3004bc6f2969580755a37718af
[ "MIT" ]
null
null
null
PES_Stadium_Exporter.py
antonysiuming/PES_Stadium_Exporter
c18e2724d028be3004bc6f2969580755a37718af
[ "MIT" ]
null
null
null
PES_Stadium_Exporter.py
antonysiuming/PES_Stadium_Exporter
c18e2724d028be3004bc6f2969580755a37718af
[ "MIT" ]
null
null
null
# # MIT License # Copyright (c) 2021 MjTs-140914 # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, ...
42.90357
190
0.667652
# # MIT License # Copyright (c) 2021 MjTs-140914 # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, ...
155,438
1,461
2,564
7c742415bf1c2ea3de6993fb9961b3f1b843f4dd
269
py
Python
djangoapp/api/models.py
kevinha298/microservice
4de46929a802afa7997436c781338532be6c2cb9
[ "MIT" ]
null
null
null
djangoapp/api/models.py
kevinha298/microservice
4de46929a802afa7997436c781338532be6c2cb9
[ "MIT" ]
null
null
null
djangoapp/api/models.py
kevinha298/microservice
4de46929a802afa7997436c781338532be6c2cb9
[ "MIT" ]
null
null
null
from django.db import models # Create your models here.
22.416667
43
0.680297
from django.db import models # Create your models here. class Member(models.Model): mrn = models.IntegerField(unique=True) name = models.CharField(max_length=100) dob = models.DateField() def __str__(self): return f'{self.mrn} - {self.name}'
40
149
22
e9f098c6427cfd9a3d47e2dece3b461b16ac69ad
12,478
py
Python
tests/test_spectrapepper.py
ksunden/spectrapepper
9e2b9c0f84b778fee8bcc7216a45e71281e8b424
[ "MIT" ]
null
null
null
tests/test_spectrapepper.py
ksunden/spectrapepper
9e2b9c0f84b778fee8bcc7216a45e71281e8b424
[ "MIT" ]
null
null
null
tests/test_spectrapepper.py
ksunden/spectrapepper
9e2b9c0f84b778fee8bcc7216a45e71281e8b424
[ "MIT" ]
null
null
null
#!/usr/bin/env python """Tests for `spectrapepper` package.""" import unittest import spectrapepper as spep import numpy as np import pandas as pd # import my_functions as spep class TestSpectrapepper(unittest.TestCase): """Tests for `spectrapepper` package.""" if __name__ == '__main__': unittest.main()
32.159794
100
0.540471
#!/usr/bin/env python """Tests for `spectrapepper` package.""" import unittest import spectrapepper as spep import numpy as np import pandas as pd # import my_functions as spep class TestSpectrapepper(unittest.TestCase): """Tests for `spectrapepper` package.""" def setUp(self): pass def tearDown...
12,054
0
107
687ce60426cafee78573991ddba1a037c73d33f2
1,762
py
Python
exceptions.py
HKuz/Test_Code
798efc9fc668ef021736a6d9699ef4713cf8b718
[ "MIT" ]
1
2020-06-14T20:10:04.000Z
2020-06-14T20:10:04.000Z
exceptions.py
makramjandar/Test_Code
798efc9fc668ef021736a6d9699ef4713cf8b718
[ "MIT" ]
null
null
null
exceptions.py
makramjandar/Test_Code
798efc9fc668ef021736a6d9699ef4713cf8b718
[ "MIT" ]
1
2019-12-09T12:48:05.000Z
2019-12-09T12:48:05.000Z
#!/Applications/anaconda/envs/Python3/bin def main(): '''Examples Using Exceptions in Python''' # Python exceptions: http://docs.python.org/library/exceptions.html # Catch exceptions with try try: f = open('noFile.txt') except IOError as e: print('Oh no, IOError:', e) except Va...
24.816901
79
0.591941
#!/Applications/anaconda/envs/Python3/bin def main(): '''Examples Using Exceptions in Python''' # Python exceptions: http://docs.python.org/library/exceptions.html # Catch exceptions with try try: f = open('noFile.txt') except IOError as e: print('Oh no, IOError:', e) except Va...
234
12
72
85e7dbe55d0e82bfe0e0b30c6e1f78f2f2f41bd8
1,221
py
Python
app.py
Illumaria/extractive-text-summarization
7a6439a0fd6460b24a366bdfa9125e3f6f442714
[ "MIT" ]
null
null
null
app.py
Illumaria/extractive-text-summarization
7a6439a0fd6460b24a366bdfa9125e3f6f442714
[ "MIT" ]
null
null
null
app.py
Illumaria/extractive-text-summarization
7a6439a0fd6460b24a366bdfa9125e3f6f442714
[ "MIT" ]
null
null
null
"""Main application logic""" import logging from flask import Flask, jsonify, render_template, request from summarizer import Summarizer from src.utils import setup_logging DEFAULT_MODEL_NAME = 'distilbert-base-uncased' DEFAULT_NUM_SENTENCES = 1 setup_logging() logger = logging.getLogger('ext_summarizer') summari...
24.918367
77
0.684685
"""Main application logic""" import logging from flask import Flask, jsonify, render_template, request from summarizer import Summarizer from src.utils import setup_logging DEFAULT_MODEL_NAME = 'distilbert-base-uncased' DEFAULT_NUM_SENTENCES = 1 setup_logging() logger = logging.getLogger('ext_summarizer') summari...
0
0
0
e96c4e1268bc695155ff6b318e54483990f67595
2,032
py
Python
gr-ieee802-15-4/python/qa_zeropadding_b.py
xueyuecanfeng/C-LQI
f489c6447428d6affb2159e9d8f895caab2868c7
[ "BSD-2-Clause" ]
2
2021-11-30T02:35:48.000Z
2021-11-30T02:53:02.000Z
gr-ieee802-15-4/python/qa_zeropadding_b.py
xueyuecanfeng/C-LQI
f489c6447428d6affb2159e9d8f895caab2868c7
[ "BSD-2-Clause" ]
null
null
null
gr-ieee802-15-4/python/qa_zeropadding_b.py
xueyuecanfeng/C-LQI
f489c6447428d6affb2159e9d8f895caab2868c7
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2015 Felix Wunsch, Communications Engineering Lab (CEL) / Karlsruhe Institute of Technology (KIT) <wunsch.felix@googlemail.com>. # # This is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as publis...
36.945455
140
0.697835
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2015 Felix Wunsch, Communications Engineering Lab (CEL) / Karlsruhe Institute of Technology (KIT) <wunsch.felix@googlemail.com>. # # This is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as publis...
799
25
104
5c1d2f8b18b97cfa16442b81cda870184af77496
6,755
py
Python
redmine_shell/shell/input.py
shlomo90/redmine_shell
546a28ca216cf9d75082b5008089e8263916a876
[ "MIT" ]
1
2021-11-09T03:44:48.000Z
2021-11-09T03:44:48.000Z
redmine_shell/shell/input.py
shlomo90/redmine_shell
546a28ca216cf9d75082b5008089e8263916a876
[ "MIT" ]
null
null
null
redmine_shell/shell/input.py
shlomo90/redmine_shell
546a28ca216cf9d75082b5008089e8263916a876
[ "MIT" ]
null
null
null
""" Input for Redmine shell. """ import sys import os import termios import contextlib from enum import Enum from .command import Command from redmine_shell.command.system.commands import History, HistoryMove class State(Enum): ''' Character Key Event State. ''' CONTINUE = -1 BREAK = -2 @contextlib.co...
30.986239
81
0.454922
""" Input for Redmine shell. """ import sys import os import termios import contextlib from enum import Enum from .command import Command from redmine_shell.command.system.commands import History, HistoryMove class State(Enum): ''' Character Key Event State. ''' CONTINUE = -1 BREAK = -2 @contextlib.co...
3,988
0
402
97962b721edd0579fda27942999eb0a6257bfc88
5,746
py
Python
ltfs-data-science-finhack/src/feature/bureau_feat.py
sudhirln92/analytics-vidhya-competitions
2e284f1ae7e3ddd4d810714db0b8eca5770756ee
[ "MIT" ]
null
null
null
ltfs-data-science-finhack/src/feature/bureau_feat.py
sudhirln92/analytics-vidhya-competitions
2e284f1ae7e3ddd4d810714db0b8eca5770756ee
[ "MIT" ]
null
null
null
ltfs-data-science-finhack/src/feature/bureau_feat.py
sudhirln92/analytics-vidhya-competitions
2e284f1ae7e3ddd4d810714db0b8eca5770756ee
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Feb 06 09:13:14 2021 @author: sudhir """ # ============================================================================= # Import library # ============================================================================= import pandas as pd import numpy a...
29.772021
89
0.445179
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Feb 06 09:13:14 2021 @author: sudhir """ # ============================================================================= # Import library # ============================================================================= import pandas as pd import numpy a...
3,939
1,214
23
eb098d707af186720bc23ab59e1764a018b42874
5,128
py
Python
dfp/network.py
vishalbelsare/dfp
d46a0be426e1d079c383585b052766cd79b1a4e3
[ "MIT" ]
null
null
null
dfp/network.py
vishalbelsare/dfp
d46a0be426e1d079c383585b052766cd79b1a4e3
[ "MIT" ]
null
null
null
dfp/network.py
vishalbelsare/dfp
d46a0be426e1d079c383585b052766cd79b1a4e3
[ "MIT" ]
1
2020-06-28T12:16:57.000Z
2020-06-28T12:16:57.000Z
import torch import torch.nn as nn from sacred import Ingredient model = Ingredient('model') @model.config @model.capture
29.471264
93
0.597699
import torch import torch.nn as nn from sacred import Ingredient model = Ingredient('model') @model.config def cfg(): dim_hidden = 128 dim_joint_hidden = 512 nonlinearity = 'lrelu' alpha = 0.2 channels = [32, 64, 64] kernels = [8, 4, 3] strides = [4, 2, 1] dim_perception = 512 cl...
3,461
1,317
219
1379f667376c2642c04fd6b935ecda0cbe98aafe
1,405
py
Python
newton/trade/portfolio.py
thermo2nd/newton_old
29da5063e1165e99604c4262c241168a8b4cf108
[ "MIT" ]
null
null
null
newton/trade/portfolio.py
thermo2nd/newton_old
29da5063e1165e99604c4262c241168a8b4cf108
[ "MIT" ]
null
null
null
newton/trade/portfolio.py
thermo2nd/newton_old
29da5063e1165e99604c4262c241168a8b4cf108
[ "MIT" ]
null
null
null
import itertools from threading import Thread
31.931818
79
0.63274
import itertools from threading import Thread class Portfolio: def __init__(self): self._strategies = dict() def register_strategies(self, strategy, *strategies): for strategy in itertools.chain((strategy,), strategies): self._strategies[strategy.id_] = dict() self._st...
1,097
-5
265
2925e42b43e3414dec5c4de98250d6bcee2ed55a
3,784
py
Python
TensorFlowDemo/train.py
Drogheda/Deeplearning
67a84b992a70289df601f8b421d6efc9e90edd67
[ "Apache-2.0" ]
null
null
null
TensorFlowDemo/train.py
Drogheda/Deeplearning
67a84b992a70289df601f8b421d6efc9e90edd67
[ "Apache-2.0" ]
null
null
null
TensorFlowDemo/train.py
Drogheda/Deeplearning
67a84b992a70289df601f8b421d6efc9e90edd67
[ "Apache-2.0" ]
null
null
null
import tensorflow as tf import numpy as np import h5py #broadcasting:先将实数或向量扩展再对对应元素进行运算 A = np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12]]) print(A) print(A.shape[1]) #输出为3 print(A + 100) #reshape()函数,注意reshape以后不能丢失数据:1x12 12x1 2x6 6x2 3x4 4x3 #-1表示未知 print(A.reshape(-1)) print(A.reshape(-1, 1)) print(A...
21.258427
94
0.665698
import tensorflow as tf import numpy as np import h5py #broadcasting:先将实数或向量扩展再对对应元素进行运算 A = np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12]]) print(A) print(A.shape[1]) #输出为3 print(A + 100) #reshape()函数,注意reshape以后不能丢失数据:1x12 12x1 2x6 6x2 3x4 4x3 #-1表示未知 print(A.reshape(-1)) print(A.reshape(-1, 1)) print(A...
30
0
23
acd24e065fc66e9316f5455addd38cbf4d3c7d87
7,984
py
Python
servicecatalog_puppet/manifest_utils_unit_test.py
nathanroys/aws-service-catalog-puppet
3805b19e1b90e445fbd823f83d2161e4afb4ee3b
[ "Apache-2.0" ]
null
null
null
servicecatalog_puppet/manifest_utils_unit_test.py
nathanroys/aws-service-catalog-puppet
3805b19e1b90e445fbd823f83d2161e4afb4ee3b
[ "Apache-2.0" ]
null
null
null
servicecatalog_puppet/manifest_utils_unit_test.py
nathanroys/aws-service-catalog-puppet
3805b19e1b90e445fbd823f83d2161e4afb4ee3b
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 from unittest import mock from pytest import fixture import json from servicecatalog_puppet import constants, luigi_tasks_and_targets @fixture
34.413793
120
0.369865
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 from unittest import mock from pytest import fixture import json from servicecatalog_puppet import constants, luigi_tasks_and_targets @fixture def sut(): from servicecatalog_puppet import manifest_uti...
7,655
0
68
516f27566f19536fb0d00134bf2cd776a0f01008
921
py
Python
examples/get_page_views.py
uw-it-aca/uw-restclients-canvas
2c54d7676649ec18129817992890878ace1ec6c6
[ "Apache-2.0" ]
1
2019-11-26T21:38:50.000Z
2019-11-26T21:38:50.000Z
examples/get_page_views.py
uw-it-aca/uw-restclients-canvas
2c54d7676649ec18129817992890878ace1ec6c6
[ "Apache-2.0" ]
135
2017-04-04T23:11:26.000Z
2021-05-28T17:00:20.000Z
examples/get_page_views.py
uw-it-aca/uw-restclients-canvas
2c54d7676649ec18129817992890878ace1ec6c6
[ "Apache-2.0" ]
2
2020-05-20T20:36:55.000Z
2022-03-05T00:23:44.000Z
from commonconf.backends import use_configparser_backend from commonconf import settings from datetime import datetime import argparse import json import os if __name__ == '__main__': settings_path = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'settings.cfg') use...
28.78125
76
0.710098
from commonconf.backends import use_configparser_backend from commonconf import settings from datetime import datetime import argparse import json import os def get_page_views(login): from uw_canvas.users import Users start_time = datetime(2019, 1, 1) end_time = datetime(2019, 5, 1) canvas = Users(p...
354
0
23
d89905686207bfd30b034f57fc99e0d12b0c1c1f
309
py
Python
nycrud/urls.py
copydataai/nycrud
0e02c20998507977ae7f3ccfd156de687d4ee7c7
[ "MIT" ]
null
null
null
nycrud/urls.py
copydataai/nycrud
0e02c20998507977ae7f3ccfd156de687d4ee7c7
[ "MIT" ]
null
null
null
nycrud/urls.py
copydataai/nycrud
0e02c20998507977ae7f3ccfd156de687d4ee7c7
[ "MIT" ]
null
null
null
"""nycrud URL Configuration""" # Django from django.contrib import admin from django.urls import path, include urlpatterns = [ path('admin/', admin.site.urls), path('users/', include(('users.urls', 'users'), namespace='users')), path('', include(('posts.urls', 'posts'), namespace='posts')), ]
23.769231
72
0.656958
"""nycrud URL Configuration""" # Django from django.contrib import admin from django.urls import path, include urlpatterns = [ path('admin/', admin.site.urls), path('users/', include(('users.urls', 'users'), namespace='users')), path('', include(('posts.urls', 'posts'), namespace='posts')), ]
0
0
0
e5148626c83b77ae6e815681200012fb042937ae
2,595
py
Python
configs/fcos/fcos_center-normbbox-centeronreg-giou_r50_caffe_fpn_carafe_ldcn1_pdcn_cat_gn-head_1x_visdrone.py
shenyanmw/mmdetection
a27836898e2ed5a7832b8ea024d1f8e899f6c28e
[ "Apache-2.0" ]
null
null
null
configs/fcos/fcos_center-normbbox-centeronreg-giou_r50_caffe_fpn_carafe_ldcn1_pdcn_cat_gn-head_1x_visdrone.py
shenyanmw/mmdetection
a27836898e2ed5a7832b8ea024d1f8e899f6c28e
[ "Apache-2.0" ]
1
2022-01-28T14:24:41.000Z
2022-01-28T14:25:38.000Z
configs/fcos/fcos_center-normbbox-centeronreg-giou_r50_caffe_fpn_carafe_ldcn1_pdcn_cat_gn-head_1x_visdrone.py
bushou-yhh/mmdetection
a27836898e2ed5a7832b8ea024d1f8e899f6c28e
[ "Apache-2.0" ]
null
null
null
_base_ = 'fcos_r50_caffe_fpn_gn-head_1x_coco.py' model = dict( pretrained='open-mmlab://detectron2/resnet50_caffe', neck=dict( _delete_=True, type='FPN_CARAFE_LDCN3_PDCN_CAT', in_channels=[256, 512, 1024, 2048], out_channels=256, num_outs=5, start_level=1, ...
29.827586
72
0.618497
_base_ = 'fcos_r50_caffe_fpn_gn-head_1x_coco.py' model = dict( pretrained='open-mmlab://detectron2/resnet50_caffe', neck=dict( _delete_=True, type='FPN_CARAFE_LDCN3_PDCN_CAT', in_channels=[256, 512, 1024, 2048], out_channels=256, num_outs=5, start_level=1, ...
0
0
0
5e0bfe2cc25a5e4b4574303e8851bfdcce5439c8
11,277
py
Python
bdemeta/__init__.py
cppguru/bdemeta
497c615c6b94f6b1421ebe83f9691c722594f095
[ "Unlicense" ]
null
null
null
bdemeta/__init__.py
cppguru/bdemeta
497c615c6b94f6b1421ebe83f9691c722594f095
[ "Unlicense" ]
null
null
null
bdemeta/__init__.py
cppguru/bdemeta
497c615c6b94f6b1421ebe83f9691c722594f095
[ "Unlicense" ]
null
null
null
from __future__ import print_function import argparse import io import locale import os import sys import shlex from collections import defaultdict import bdemeta.resolver import bdemeta.commands if __name__ == "__main__": main()
46.599174
112
0.432473
from __future__ import print_function import argparse import io import locale import os import sys import shlex from collections import defaultdict import bdemeta.resolver import bdemeta.commands def get_parser(): parser = argparse.ArgumentParser(description='build and test BDE-style ' ...
10,948
0
92
4506e14a748b52a300d097402ea9207aa4b8dfa0
211
py
Python
kubernetes_rest_service/app/api/urls.py
stkrizh/otus
6bff5cf62661bb7bab6eac6cb563a63a52a56423
[ "MIT" ]
1
2021-07-25T11:11:55.000Z
2021-07-25T11:11:55.000Z
kubernetes_rest_service/app/api/urls.py
stkrizh/otus
6bff5cf62661bb7bab6eac6cb563a63a52a56423
[ "MIT" ]
3
2020-03-24T17:33:29.000Z
2021-08-23T20:20:31.000Z
kubernetes_rest_service/app/api/urls.py
stkrizh/otus
6bff5cf62661bb7bab6eac6cb563a63a52a56423
[ "MIT" ]
null
null
null
from rest_framework.routers import DefaultRouter from app.api import views router = DefaultRouter(trailing_slash=False) router.register("users", views.UserViewSet, basename="user") urlpatterns = router.urls
21.1
60
0.810427
from rest_framework.routers import DefaultRouter from app.api import views router = DefaultRouter(trailing_slash=False) router.register("users", views.UserViewSet, basename="user") urlpatterns = router.urls
0
0
0
91de589c0ddf2b713e2f8d0103ed706139018c5a
7,474
py
Python
myWorkDir/runScript/run.py
yuhengy/gem5_Grad
d8377c7e2ba647d67290aaf27ddbd61700768a86
[ "BSD-3-Clause" ]
null
null
null
myWorkDir/runScript/run.py
yuhengy/gem5_Grad
d8377c7e2ba647d67290aaf27ddbd61700768a86
[ "BSD-3-Clause" ]
null
null
null
myWorkDir/runScript/run.py
yuhengy/gem5_Grad
d8377c7e2ba647d67290aaf27ddbd61700768a86
[ "BSD-3-Clause" ]
null
null
null
import os import time #-------------------- 1/4 Run Config Begin -------------------- RUN_MODE = "slurmCluster" # singleProc, multiProc, slurmCluster REDIRECT_TERMINAL_OUTPUT = True COMPILE_APP = False #-------------------- 1/4 Run Config End -------------------- #-------------------- 2/4 Base CPU Config Begin ---...
41.065934
339
0.630854
import os import time #-------------------- 1/4 Run Config Begin -------------------- RUN_MODE = "slurmCluster" # singleProc, multiProc, slurmCluster REDIRECT_TERMINAL_OUTPUT = True COMPILE_APP = False #-------------------- 1/4 Run Config End -------------------- #-------------------- 2/4 Base CPU Config Begin ---...
1,539
0
46
b1c6eaf5bcb02592bcd0d30ace3d18f93369a358
220
py
Python
salt_tower/loader.py
MatthiasWiesner/salt-tower
055e95578f13a5ef3ac2d8c0cd256fa0008f9da9
[ "MIT" ]
null
null
null
salt_tower/loader.py
MatthiasWiesner/salt-tower
055e95578f13a5ef3ac2d8c0cd256fa0008f9da9
[ "MIT" ]
null
null
null
salt_tower/loader.py
MatthiasWiesner/salt-tower
055e95578f13a5ef3ac2d8c0cd256fa0008f9da9
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import os PKG_DIR = os.path.abspath(os.path.dirname(__file__))
16.923077
52
0.677273
# -*- coding: utf-8 -*- import os PKG_DIR = os.path.abspath(os.path.dirname(__file__)) def pillar_dirs(): yield os.path.join(PKG_DIR, 'pillar') def renderers_dirs(): yield os.path.join(PKG_DIR, 'renderers')
84
0
46
4aae800fb79c244eab675911ab05474cd28abaf4
4,527
py
Python
HOPS/hops_velocity3.py
petercunning/notebook
5b26f2dc96bcb36434542b397de6ca5fa3b61a0a
[ "MIT" ]
32
2015-01-07T01:48:05.000Z
2022-03-02T07:07:42.000Z
HOPS/hops_velocity3.py
petercunning/notebook
5b26f2dc96bcb36434542b397de6ca5fa3b61a0a
[ "MIT" ]
1
2015-04-13T21:00:18.000Z
2015-04-13T21:00:18.000Z
HOPS/hops_velocity3.py
petercunning/notebook
5b26f2dc96bcb36434542b397de6ca5fa3b61a0a
[ "MIT" ]
30
2015-01-28T09:31:29.000Z
2022-03-07T03:08:28.000Z
# coding: utf-8 # The problem: CF compliant readers cannot read HOPS dataset directly. # The solution: read with the `netCDF4-python` raw interface and create a CF object from the data. # # NOTE: Ideally this should be a `nco` script that could be run as a CLI script and fix the files. # Here I am using `Python`+`i...
31.880282
98
0.554009
# coding: utf-8 # The problem: CF compliant readers cannot read HOPS dataset directly. # The solution: read with the `netCDF4-python` raw interface and create a CF object from the data. # # NOTE: Ideally this should be a `nco` script that could be run as a CLI script and fix the files. # Here I am using `Python`+`i...
0
0
0
523d37e8b223e68fc1555988e0c48aa93d58ab16
4,052
py
Python
A58Spider/spiders/a58spider.py
nathanchenstudio/A58Spider
fedce06ad869a52963c309ea380607171d86a756
[ "MIT" ]
null
null
null
A58Spider/spiders/a58spider.py
nathanchenstudio/A58Spider
fedce06ad869a52963c309ea380607171d86a756
[ "MIT" ]
null
null
null
A58Spider/spiders/a58spider.py
nathanchenstudio/A58Spider
fedce06ad869a52963c309ea380607171d86a756
[ "MIT" ]
null
null
null
import base64 import re import time from datetime import datetime from fontTools.ttLib import TTFont from io import BytesIO import scrapy from A58Spider.items import A58SpiderItem if __name__ == '__main__': from scrapy.crawler import CrawlerProcess from scrapy.utils.project import get_project_settings ...
37.869159
104
0.543682
import base64 import re import time from datetime import datetime from fontTools.ttLib import TTFont from io import BytesIO import scrapy from A58Spider.items import A58SpiderItem class A58Spider(scrapy.Spider): name = 'a58' allowed_domains = ['58.com'] start_urls = ['https://hz.58.com/zufang/0/j1/?minpr...
3,380
261
23
54a714d1de1b19130135f464260618a97a35e6e2
1,355
py
Python
python/minify/tumult.py
lcary/tmp
1ea8e06bc25d13f5be6a0ac578d3302ee2134a77
[ "MIT" ]
null
null
null
python/minify/tumult.py
lcary/tmp
1ea8e06bc25d13f5be6a0ac578d3302ee2134a77
[ "MIT" ]
null
null
null
python/minify/tumult.py
lcary/tmp
1ea8e06bc25d13f5be6a0ac578d3302ee2134a77
[ "MIT" ]
null
null
null
#!/usr/bin/env python """ tumult.py - Because everyone needs a little chaos every now and again. """ try: import demiurgic except ImportError: print("Warning: You're not demiurgic. Actually, I think that's normal.") try: import mystificate except ImportError: print("Warning: Dark voodoo may be unreliab...
28.229167
76
0.657565
#!/usr/bin/env python """ tumult.py - Because everyone needs a little chaos every now and again. """ try: import demiurgic except ImportError: print("Warning: You're not demiurgic. Actually, I think that's normal.") try: import mystificate except ImportError: print("Warning: Dark voodoo may be unreliab...
0
0
0
9b94f7cd6acaff829652aa4e0626553d0b57d886
12,402
py
Python
src/redis_server/operation.py
odzzi/pyredis-server
5baa6c4f5986059a5ac1ece810e135c6c5b1ce48
[ "MIT" ]
2
2018-01-09T07:24:17.000Z
2020-09-20T12:03:39.000Z
src/redis_server/operation.py
odzzi/pyredis-server
5baa6c4f5986059a5ac1ece810e135c6c5b1ce48
[ "MIT" ]
3
2018-01-08T08:07:40.000Z
2018-01-21T13:51:01.000Z
src/redis_server/operation.py
odzzi/pyredis-server
5baa6c4f5986059a5ac1ece810e135c6c5b1ce48
[ "MIT" ]
2
2018-01-09T06:38:15.000Z
2020-03-26T07:37:37.000Z
import logging import array from store import database OPERATIONS = {} @register_oper(key="SET") @check_paras_len(gt=2) @register_oper(key="GET") @check_paras_len(eq=2) @register_oper(key="DEL") @check_paras_len(gt=1) @register_oper(key="DUMP") @check_paras_len(eq=2) INFO = """# Server redis_version:2...
22.924214
82
0.643687
import logging import array from store import database OPERATIONS = {} def register_oper(**kwds): def decorate(f): key = kwds.get("key") subkey = kwds.get("subkey") if key: key = key.upper() if subkey: subkey = subkey.upper() if key...
7,232
0
1,084
23de5487726f7d7138afacc7c7a79c84879e6131
793
py
Python
Intermediate/locked.py
Fernal73/LearnPython3
5288017c0dbf95633b84f1e6324f00dec6982d36
[ "MIT" ]
1
2021-12-17T11:03:13.000Z
2021-12-17T11:03:13.000Z
Intermediate/locked.py
Fernal73/LearnPython3
5288017c0dbf95633b84f1e6324f00dec6982d36
[ "MIT" ]
1
2020-02-05T00:14:43.000Z
2020-02-06T09:22:49.000Z
Intermediate/locked.py
Fernal73/LearnPython3
5288017c0dbf95633b84f1e6324f00dec6982d36
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """LockedIterator.""" from threading import Lock from collections.abc import Iterator # pylint: disable=too-few-public-methods class LockedIterator(Iterator): """Locked Iterator.""" def __init__(self, _it): """Initialise object.""" self.lock = Lock() self._it =...
22.027778
40
0.567465
#!/usr/bin/env python3 """LockedIterator.""" from threading import Lock from collections.abc import Iterator # pylint: disable=too-few-public-methods class LockedIterator(Iterator): """Locked Iterator.""" def __init__(self, _it): """Initialise object.""" self.lock = Lock() self._it =...
0
0
0
f646575457b7be73cf57eaef18dc2fde0f94c503
22
py
Python
app/tests/__init__.py
JeremySpradlin/datascience
6faa1ed9613134591a32267896166bc6c9d840be
[ "MIT" ]
null
null
null
app/tests/__init__.py
JeremySpradlin/datascience
6faa1ed9613134591a32267896166bc6c9d840be
[ "MIT" ]
null
null
null
app/tests/__init__.py
JeremySpradlin/datascience
6faa1ed9613134591a32267896166bc6c9d840be
[ "MIT" ]
null
null
null
"""Initialize tests"""
22
22
0.681818
"""Initialize tests"""
0
0
0
d61532583aa28ac735bbdc732b56c56982ecfece
4,044
py
Python
src/api/datamanage/pro/datamodel/dmm/schema.py
Chromico/bk-base
be822d9bbee544a958bed4831348185a75604791
[ "MIT" ]
84
2021-06-30T06:20:23.000Z
2022-03-22T03:05:49.000Z
src/api/datamanage/pro/datamodel/dmm/schema.py
Chromico/bk-base
be822d9bbee544a958bed4831348185a75604791
[ "MIT" ]
7
2021-06-30T06:21:16.000Z
2022-03-29T07:36:13.000Z
src/api/datamanage/pro/datamodel/dmm/schema.py
Chromico/bk-base
be822d9bbee544a958bed4831348185a75604791
[ "MIT" ]
40
2021-06-30T06:21:26.000Z
2022-03-29T12:42:26.000Z
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making BK-BASE 蓝鲸基础平台 available. Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. BK-BASE 蓝鲸基础平台 is licensed under the MIT License. License for BK-BASE 蓝鲸基础平台: ---------------------------------------------...
47.023256
115
0.69906
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making BK-BASE 蓝鲸基础平台 available. Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. BK-BASE 蓝鲸基础平台 is licensed under the MIT License. License for BK-BASE 蓝鲸基础平台: ---------------------------------------------...
0
0
0
b99ccd20816fbf181d31ce4d5f36362a7af7332d
877
py
Python
examples/configuration_modes/eos_configure_session.py
verbosemode/scrapli
b3885169dccf24ac65d0d433eae16bcab8288002
[ "MIT" ]
404
2020-02-11T09:05:40.000Z
2022-03-31T05:10:03.000Z
examples/configuration_modes/eos_configure_session.py
verbosemode/scrapli
b3885169dccf24ac65d0d433eae16bcab8288002
[ "MIT" ]
155
2020-02-18T00:21:43.000Z
2022-03-06T16:34:47.000Z
examples/configuration_modes/eos_configure_session.py
verbosemode/scrapli
b3885169dccf24ac65d0d433eae16bcab8288002
[ "MIT" ]
48
2020-04-02T00:24:44.000Z
2022-03-07T18:24:53.000Z
"""examples.configuration_modes.eos_configure_session""" from scrapli.driver.core import EOSDriver MY_DEVICE = { "host": "172.18.0.14", "auth_username": "scrapli", "auth_password": "scrapli", "auth_secondary": "VR-netlab9", "auth_strict_key": False, } def main(): """Connect to an EOS Device a...
32.481481
93
0.703535
"""examples.configuration_modes.eos_configure_session""" from scrapli.driver.core import EOSDriver MY_DEVICE = { "host": "172.18.0.14", "auth_username": "scrapli", "auth_password": "scrapli", "auth_secondary": "VR-netlab9", "auth_strict_key": False, } def main(): """Connect to an EOS Device a...
0
0
0