hexsha
stringlengths
40
40
size
int64
6
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
130
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
247
max_issues_repo_name
stringlengths
4
130
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
247
max_forks_repo_name
stringlengths
4
130
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
1
1.04M
avg_line_length
float64
1.53
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
6
1.04M
filtered:remove_non_ascii
int64
0
538k
filtered:remove_decorators
int64
0
917k
filtered:remove_async
int64
0
722k
filtered:remove_classes
int64
-45
1M
filtered:remove_generators
int64
0
814k
filtered:remove_function_no_docstring
int64
-102
850k
filtered:remove_class_no_docstring
int64
-3
5.46k
filtered:remove_unused_imports
int64
-1,350
52.4k
filtered:remove_delete_markers
int64
0
59.6k
17f3c7f78e01745f6b3482cefe947cc17063b57b
2,435
py
Python
python/companies_plugin-1.21/companies_plugin/utils/sys_utils.py
dataesr/scanr-backend
39681be69b9a96b4a07b9410754c897cd5b65c24
[ "MIT" ]
null
null
null
python/companies_plugin-1.21/companies_plugin/utils/sys_utils.py
dataesr/scanr-backend
39681be69b9a96b4a07b9410754c897cd5b65c24
[ "MIT" ]
3
2020-06-18T15:06:10.000Z
2021-05-07T16:29:50.000Z
plugins/companies_plugin/companies_plugin/utils/sys_utils.py
reseachalps/Search-Engine
1cd1e83902119938ffd412394b09dce92d082500
[ "MIT" ]
null
null
null
import traceback # To test with doctest... if not __package__: # pragma: no cover LIB_PATH = "." else: from .. import LIB_PATH # Global configuration DUMP_DIRECTORY = LIB_PATH + "/dump/" DUMP_CURRENT_PROCESS = DUMP_DIRECTORY + "%(ppid)s/" DUMP_FILENAME = DUMP_CURRENT_PROCESS + "%(pid)s.dump" def get_stack...
31.623377
110
0.643121
import faulthandler import atexit import signal import traceback import os import multiprocessing # To test with doctest... if not __package__: # pragma: no cover LIB_PATH = "." else: from .. import LIB_PATH # Global configuration DUMP_DIRECTORY = LIB_PATH + "/dump/" DUMP_CURRENT_PROCESS = DUMP_DIRECTORY + ...
0
0
0
1,292
0
0
0
-29
133
4c9227643a202094fb84db7b27faaa285c006aab
4,370
py
Python
IcebergCalculations.py
helenamorgan/WhiteStarLine
fea59659de10d1d192beb1543b82de43098b2c7d
[ "MIT" ]
null
null
null
IcebergCalculations.py
helenamorgan/WhiteStarLine
fea59659de10d1d192beb1543b82de43098b2c7d
[ "MIT" ]
null
null
null
IcebergCalculations.py
helenamorgan/WhiteStarLine
fea59659de10d1d192beb1543b82de43098b2c7d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Fri May 7 11:32:58 2021 @author: helena """
30.774648
189
0.559497
# -*- coding: utf-8 -*- """ Created on Fri May 7 11:32:58 2021 @author: helena """ class IcebergCalc(): """ Class declaration for the IcebergCalc class. Provides methods for calculating an iceberg's area, volume and mass. """ def __init__(self, lidardata, radardata, seaice_m): "...
0
0
0
4,245
0
0
0
0
23
7eb8517b615d71c48f5f7c34f233991231b9648f
6,502
py
Python
keras_mobile/blocks/conv.py
i404788/keras-mobile
db48cb9a3b63cfda5d8edd2749c3eb17661ef8d4
[ "MIT" ]
1
2019-09-30T10:37:22.000Z
2019-09-30T10:37:22.000Z
keras_mobile/blocks/conv.py
i404788/keras-mobile
db48cb9a3b63cfda5d8edd2749c3eb17661ef8d4
[ "MIT" ]
null
null
null
keras_mobile/blocks/conv.py
i404788/keras-mobile
db48cb9a3b63cfda5d8edd2749c3eb17661ef8d4
[ "MIT" ]
null
null
null
# Emulate class behaviour for parameterization def SeperableConvBlock(output_filters=None, ReLU_Max=None, strides=(1, 1)): r""" x->DWConv(3x3)->BN->ReLU(max)->Conv2D(1x1)->BN ``` output_filters: int, size of last axis output ReLU_Max: float, max value as output of a ReLU in this block, if < 0, ...
32.348259
106
0.563211
from keras.layers import Conv2D, BatchNormalization, Input, DepthwiseConv2D, Lambda, Concatenate from keras.layers import GlobalAveragePooling2D, Reshape, ReLU, Add, Dropout import keras.backend as K from ..functions.mutations import channel_split, channel_shuffle # Emulate class behaviour for parameterization def S...
0
0
0
0
0
3,385
0
177
267
7cf87342ec75cba52f90005f86e21e0e03f234af
41
py
Python
tests/_support/configs/python/invoke.py
daobook/invoke
577faf1c016a69392583046613bfb42356855e8f
[ "BSD-2-Clause" ]
null
null
null
tests/_support/configs/python/invoke.py
daobook/invoke
577faf1c016a69392583046613bfb42356855e8f
[ "BSD-2-Clause" ]
null
null
null
tests/_support/configs/python/invoke.py
daobook/invoke
577faf1c016a69392583046613bfb42356855e8f
[ "BSD-2-Clause" ]
null
null
null
outer = {"inner": {"hooray": "python"}}
20.5
40
0.536585
outer = {"inner": {"hooray": "python"}}
0
0
0
0
0
0
0
0
0
82cb4d5dd9061a4bb4f537e15e18859ca7f1c372
601
py
Python
multi_user.py
rithikrice/Whatsapp_auto_2
3e00988b5d8725e6bb3b3039a7bb56308ccfe714
[ "MIT" ]
1
2019-08-04T20:12:00.000Z
2019-08-04T20:12:00.000Z
multi_user.py
rithikrice/Whatsapp_auto_2
3e00988b5d8725e6bb3b3039a7bb56308ccfe714
[ "MIT" ]
null
null
null
multi_user.py
rithikrice/Whatsapp_auto_2
3e00988b5d8725e6bb3b3039a7bb56308ccfe714
[ "MIT" ]
1
2020-03-02T22:24:18.000Z
2020-03-02T22:24:18.000Z
from selenium import webdriver driver = webdriver.Chrome() driver.get('https://web.whatsapp.com/') all_names = ['Sachin Yadav'] msg = input('Enter the message') count = int(input('no.of times to send message')) input('click any random key after qr scanning') for name in all_names: user = driver.find...
28.619048
78
0.663894
from selenium import webdriver driver = webdriver.Chrome() driver.get('https://web.whatsapp.com/') all_names = ['Sachin Yadav'] msg = input('Enter the message') count = int(input('no.of times to send message')) input('click any random key after qr scanning') for name in all_names: user = driver.find...
0
0
0
0
0
0
0
0
0
7e6cbc5d15b6db6d05cc1a9bb65b6ab33e786060
1,626
py
Python
iogt_users/wagtail_hooks.py
saqlainrasheed/iogt
4bebfe4cd2f1d4ff9cab50d1126756c162a30b89
[ "BSD-2-Clause" ]
1
2021-11-18T05:10:14.000Z
2021-11-18T05:10:14.000Z
iogt_users/wagtail_hooks.py
mbilalhameed/iogt
9c12f0be29f1eea0097ec43f692c77ba65673610
[ "BSD-2-Clause" ]
null
null
null
iogt_users/wagtail_hooks.py
mbilalhameed/iogt
9c12f0be29f1eea0097ec43f692c77ba65673610
[ "BSD-2-Clause" ]
null
null
null
from wagtail.contrib.modeladmin.options import modeladmin_register modeladmin_register(UsersExportAdmin)
41.692308
109
0.740467
from django.conf import settings from django.contrib.auth import get_user_model from django.utils import timezone from wagtail.contrib.modeladmin.options import ModelAdmin, modeladmin_register from home.models import SiteSettings from iogt_users.filters import GroupsFilter class UsersExportAdmin(ModelAdmin): mod...
0
112
0
1,175
0
0
0
97
134
8222c146252aa8643f4d57a50a367425f145b298
985
py
Python
aioethereum/utils.py
h8is2w8/aioethereum
eb23e28068c34cda28bbef45c3f288d16936d88e
[ "MIT" ]
16
2017-10-04T17:44:51.000Z
2021-03-07T12:55:04.000Z
aioethereum/utils.py
h8is2w8/aioethereum
eb23e28068c34cda28bbef45c3f288d16936d88e
[ "MIT" ]
8
2017-10-04T22:53:08.000Z
2021-01-15T18:04:41.000Z
aioethereum/utils.py
h8is2w8/aioethereum
eb23e28068c34cda28bbef45c3f288d16936d88e
[ "MIT" ]
5
2018-02-22T15:56:34.000Z
2021-01-03T21:25:22.000Z
from .constants import BLOCK_TAGS def add_0x(string): """Add 0x to string at start. """ if isinstance(string, bytes): string = string.decode('utf-8') return '0x' + str(string) def hex_to_dec(x): """Convert hex to decimal """ return int(x, 16) def wei_to_ether(wei): """Conve...
18.584906
50
0.592893
from .constants import BLOCK_TAGS def add_0x(string): """Add 0x to string at start. """ if isinstance(string, bytes): string = string.decode('utf-8') return '0x' + str(string) def hex_to_dec(x): """Convert hex to decimal """ return int(x, 16) def wei_to_ether(wei): """Conve...
0
0
0
0
0
0
0
0
0
c92a4fae037b23367735659e7e8606b589d6c871
1,911
py
Python
pybw/tokens.py
louisdevie/birdway
fc71ab4deaa154033cd3228746919e6e82c4723f
[ "CC0-1.0" ]
null
null
null
pybw/tokens.py
louisdevie/birdway
fc71ab4deaa154033cd3228746919e6e82c4723f
[ "CC0-1.0" ]
null
null
null
pybw/tokens.py
louisdevie/birdway
fc71ab4deaa154033cd3228746919e6e82c4723f
[ "CC0-1.0" ]
null
null
null
for name in [ "KeywordMeta", "KeywordArgs", "KeywordParam", "KeywordRun", "KeywordIf", "KeywordThen", "KeywordElse", "KeywordPrintln", "KeywordOption", "BlockBegin", "BlockEnd", "TableBegin", "TableEnd", "OpeningParens", "ClosingParens", "FormattedStrin...
20.329787
69
0.579278
from enum import Enum, auto from autorepr import AutoRepr from birdway import Unary, Type, Binary class Token: def __init__(self, line=None, **attributes): self._line = line for attr in dir(self): if not attr.startswith("_"): if attr in attributes: s...
0
0
0
875
0
0
0
32
250
ca7b5cebd80d5aca1a160db747c842eb5e4be84f
1,643
py
Python
adventofcode/code_7.py
fearless-spider/python_playground
5150b2de09736d68558f4c159e110a7ebbe29bfc
[ "BSD-3-Clause" ]
null
null
null
adventofcode/code_7.py
fearless-spider/python_playground
5150b2de09736d68558f4c159e110a7ebbe29bfc
[ "BSD-3-Clause" ]
null
null
null
adventofcode/code_7.py
fearless-spider/python_playground
5150b2de09736d68558f4c159e110a7ebbe29bfc
[ "BSD-3-Clause" ]
null
null
null
file1 = open('input_7.txt', 'r') Lines = file1.readlines() bingo_numbers = Lines[0].split(",") bingo_tables = [] bingo_win = 0 bingo_row_number = 0 for line in Lines[2:]: new_row = [] if line == '\n': continue row = line.split(" ") for element in row: if element == '\n' or element == ''...
27.383333
61
0.529519
file1 = open('input_7.txt', 'r') Lines = file1.readlines() bingo_numbers = Lines[0].split(",") bingo_tables = [] bingo_win = 0 bingo_row_number = 0 for line in Lines[2:]: new_row = [] if line == '\n': continue row = line.split(" ") for element in row: if element == '\n' or element == ''...
0
0
0
0
0
0
0
0
0
57baad10af5b26c0c3e29aeccdf74f93c7ca4346
103
py
Python
user_input.py
NathanKr/python-playground
03ea7f6489ab4db84c8180332a2ebf07caa9136e
[ "MIT" ]
null
null
null
user_input.py
NathanKr/python-playground
03ea7f6489ab4db84c8180332a2ebf07caa9136e
[ "MIT" ]
null
null
null
user_input.py
NathanKr/python-playground
03ea7f6489ab4db84c8180332a2ebf07caa9136e
[ "MIT" ]
null
null
null
username = input("Please enter your name : ") print(type(username)) print(f'Your name is : {username}')
34.333333
45
0.708738
username = input("Please enter your name : ") print(type(username)) print(f'Your name is : {username}')
0
0
0
0
0
0
0
0
0
65abe0016207dd33ebabe1cf568609bc06ca94ca
9,175
py
Python
FileCrypt/__init__.py
TA40/FileCryptcc
f6f7144a0204c5141fa7f12f91b112d6db8f2b96
[ "MIT" ]
4
2019-07-03T00:32:57.000Z
2021-03-08T17:14:19.000Z
FileCrypt/__init__.py
TA40/FileCryptcc
f6f7144a0204c5141fa7f12f91b112d6db8f2b96
[ "MIT" ]
null
null
null
FileCrypt/__init__.py
TA40/FileCryptcc
f6f7144a0204c5141fa7f12f91b112d6db8f2b96
[ "MIT" ]
null
null
null
import requests, json def userApiKey(apikey): """ Returns information about an apikey apikey: Your ApiKey from FileCrypt Attention: this API is limited to 10 requests for an timeframe of 1 hour. """ data={"api_key":apikey,"sub":"apikey","fn":"user"} return json.loads(requests.post("https://filecrypt...
38.55042
173
0.685014
import requests, json def userApiKey(apikey): """ Returns information about an apikey apikey: Your ApiKey from FileCrypt Attention: this API is limited to 10 requests for an timeframe of 1 hour. """ data={"api_key":apikey,"sub":"apikey","fn":"user"} return json.loads(requests.post("https://filecrypt...
0
0
0
0
0
0
0
0
0
222bffa1cd27cddad2aa20e2e4bec46c065c5610
363
py
Python
pintest.py
PHSCRC/NotHotBot
651671d5df263fe82debc264c4e74b598ed15252
[ "MIT" ]
1
2018-03-26T18:24:54.000Z
2018-03-26T18:24:54.000Z
pintest.py
PHSCRC/NotHotBot
651671d5df263fe82debc264c4e74b598ed15252
[ "MIT" ]
null
null
null
pintest.py
PHSCRC/NotHotBot
651671d5df263fe82debc264c4e74b598ed15252
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import RPi.GPIO as GPIO import sys if __name__ == '__main__': main(int(sys.argv[1]))
18.15
60
0.658402
#!/usr/bin/env python3 import RPi.GPIO as GPIO import sys import time def callback(pin): out = GPIO.input(pin) print(pin, out) def main(pin): GPIO.setmode(GPIO.BCM) GPIO.setup(pin, GPIO.IN) GPIO.add_event_detect(pin, GPIO.BOTH, callback=callback) while True: time.sleep(1) if __name__...
0
0
0
0
0
191
0
-10
68
217a23271cf0e977d97d4f30363fd22f97b7adfe
1,864
py
Python
catalog/pub/redisco/__init__.py
onap/archive-vfc-nfvo-catalog
24b92a2210c2063935d313f08e1da1e9cee45f3f
[ "Apache-2.0" ]
4
2018-08-29T02:51:38.000Z
2021-11-16T11:36:11.000Z
catalog/pub/redisco/__init__.py
onap/archive-vfc-nfvo-catalog
24b92a2210c2063935d313f08e1da1e9cee45f3f
[ "Apache-2.0" ]
null
null
null
catalog/pub/redisco/__init__.py
onap/archive-vfc-nfvo-catalog
24b92a2210c2063935d313f08e1da1e9cee45f3f
[ "Apache-2.0" ]
1
2019-05-12T08:21:19.000Z
2019-05-12T08:21:19.000Z
# Copyright (c) 2010 Tim Medina # # 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, ...
31.59322
95
0.724785
# Copyright (c) 2010 Tim Medina # # 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, ...
0
0
0
270
0
201
0
-9
92
ec66bc66f993ab1a980149e8ee9e58421317a060
420
py
Python
backend/src/resource/randoms.py
myang81/Degree_Project
4535f8a45148e3d6d061d0ddbca9cd94d995d42f
[ "MIT" ]
1
2021-03-28T14:16:03.000Z
2021-03-28T14:16:03.000Z
backend/src/resource/randoms.py
myang81/Degree_Project
4535f8a45148e3d6d061d0ddbca9cd94d995d42f
[ "MIT" ]
null
null
null
backend/src/resource/randoms.py
myang81/Degree_Project
4535f8a45148e3d6d061d0ddbca9cd94d995d42f
[ "MIT" ]
null
null
null
import random import xlwt # # 39264103,11525 11730 workbook = xlwt.Workbook(encoding='utf-8') worksheet = workbook.add_sheet("My Workbook") print(worksheet) a=[] for i in range(0,5107): x=random.uniform(115,117) y=random.uniform(39,41) a.append(str( ( str(y)))) print(a[0]) j=0 for i in a: wo...
16.153846
45
0.654762
import numpy as np import random import xlwt # # 市界的地理坐标为:北纬39”26’至41”03’,东经115”25’至 117”30’ workbook = xlwt.Workbook(encoding='utf-8') worksheet = workbook.add_sheet("My Workbook") print(worksheet) a=[] for i in range(0,5107): x=random.uniform(115,117) y=random.uniform(39,41) a.append(str( ( st...
69
0
0
0
0
0
0
-3
23
3863c5d84e88b51b65a954ee08415339f58f5ec8
2,640
py
Python
statsmodels/compatnp/iter_compat.py
toobaz/statsmodels
5286dd713a809b0630232508bf9ad5104aae1980
[ "BSD-3-Clause" ]
2
2017-01-05T22:44:37.000Z
2018-04-26T08:34:00.000Z
statsmodels/compatnp/iter_compat.py
AnaMP/statsmodels
2d4aad9a14619ce0c84d4c7bca9dacd66b2be566
[ "BSD-3-Clause" ]
null
null
null
statsmodels/compatnp/iter_compat.py
AnaMP/statsmodels
2d4aad9a14619ce0c84d4c7bca9dacd66b2be566
[ "BSD-3-Clause" ]
1
2017-05-12T09:51:44.000Z
2017-05-12T09:51:44.000Z
# -*- coding: utf-8 -*- """ Created on Wed Feb 29 10:12:38 2012 Author: Josef Perktold License: BSD-3 """ import itertools try: #python 2.6, 2.7 zip_longest = itertools.izip_longest pass except AttributeError: #python 3.2 try: zip_longest = itertools.zip_longest pass except ...
30
84
0.481818
# -*- coding: utf-8 -*- """ Created on Wed Feb 29 10:12:38 2012 Author: Josef Perktold License: BSD-3 """ import itertools try: #python 2.6, 2.7 zip_longest = itertools.izip_longest pass except AttributeError: #python 3.2 try: zip_longest = itertools.zip_longest pass except ...
0
0
0
0
2,127
0
0
0
56
b0da74a3faec35ede730e6192678e7ff370057e5
4,119
py
Python
tutorials/mobilenetv3_prod/Step1-5/05_test_backward.py
leiqing1/models
33aa4e7ec09a0c210b182dec7aec8ff3bbda45e3
[ "Apache-2.0" ]
7,090
2017-04-21T00:22:09.000Z
2022-03-31T11:52:40.000Z
tutorials/mobilenetv3_prod/Step1-5/05_test_backward.py
leiqing1/models
33aa4e7ec09a0c210b182dec7aec8ff3bbda45e3
[ "Apache-2.0" ]
2,601
2017-04-21T02:52:04.000Z
2022-03-09T08:43:09.000Z
tutorials/mobilenetv3_prod/Step1-5/05_test_backward.py
leiqing1/models
33aa4e7ec09a0c210b182dec7aec8ff3bbda45e3
[ "Apache-2.0" ]
3,391
2017-04-21T00:22:19.000Z
2022-03-30T17:53:25.000Z
import torch.optim.lr_scheduler as lr_scheduler from reprod_log import ReprodDiffHelper if __name__ == "__main__": test_backward() # load data diff_helper = ReprodDiffHelper() torch_info = diff_helper.load_info("./result/losses_ref.npy") paddle_info = diff_helper.load_info("./result/losses_pad...
33.762295
89
0.667881
import paddle import numpy as np import torch import torch.optim.lr_scheduler as lr_scheduler from reprod_log import ReprodLogger from reprod_log import ReprodDiffHelper from mobilenetv3_paddle.paddlevision.models import mobilenet_v3_small as mv3_small_paddle from mobilenetv3_ref.torchvision.models import mobilenet_v3...
0
0
0
0
0
3,308
0
125
202
66090fc039d6b9801a2c41c0d0b537b7e123ca6c
4,302
py
Python
Resaltador Paralelo/Carpeta1/Carpeta1-2/mejorracional.py
erteck/textHighlighter
9f079d81b16acbd98a4f5f8520e43bef483d0071
[ "MIT" ]
null
null
null
Resaltador Paralelo/Carpeta1/Carpeta1-2/mejorracional.py
erteck/textHighlighter
9f079d81b16acbd98a4f5f8520e43bef483d0071
[ "MIT" ]
null
null
null
Resaltador Paralelo/Carpeta1/Carpeta1-2/mejorracional.py
erteck/textHighlighter
9f079d81b16acbd98a4f5f8520e43bef483d0071
[ "MIT" ]
null
null
null
# ---------------------------------------------------------- #Erick Alberto Bustos Cruz A01378966 # # # ----------------------------------------------------------
36.769231
121
0.653649
# ---------------------------------------------------------- #Erick Alberto Bustos Cruz A01378966 # # # ---------------------------------------------------------- from functools import total_ordering import math as m @total_ordering class Racional: """Instancias de esta clase representan números racionales ...
2
4,060
0
0
0
0
0
10
68
85f74b093fce2b393c1d5630945f304dc90ef82f
13,422
py
Python
src/neural_networks.py
HinanawiTS/ECE-143-Project
b23c85d4815943b284a4275f10f0a73f77d1c038
[ "Apache-2.0" ]
null
null
null
src/neural_networks.py
HinanawiTS/ECE-143-Project
b23c85d4815943b284a4275f10f0a73f77d1c038
[ "Apache-2.0" ]
null
null
null
src/neural_networks.py
HinanawiTS/ECE-143-Project
b23c85d4815943b284a4275f10f0a73f77d1c038
[ "Apache-2.0" ]
1
2021-11-05T23:10:30.000Z
2021-11-05T23:10:30.000Z
import numpy as np import pandas as pd import json from mplsoccer.pitch import Pitch path = "C:/Users/brand/desktop/events/events_England.json" with open(path) as f: data = json.load(f) train = pd.DataFrame(data) path2 = "C:/Users/brand/desktop/players.json" with open(path2) as f: p...
24.855556
130
0.629116
import numpy as np import pandas as pd import json from mplsoccer.pitch import Pitch, VerticalPitch path = "C:/Users/brand/desktop/events/events_England.json" with open(path) as f: data = json.load(f) train = pd.DataFrame(data) path2 = "C:/Users/brand/desktop/players.json" with open(path...
0
0
0
0
0
1,709
0
8
99
e78e172f5ecee98c80457e5fc00170c7e563ca2f
4,202
py
Python
bce/parser/interface/molecule_parser.py
bce-toolkit/BCE
9e4d168cab18132bbe2867d13c629510b86d350a
[ "BSD-3-Clause" ]
12
2017-12-18T10:37:52.000Z
2021-11-28T07:08:46.000Z
bce/parser/interface/molecule_parser.py
bce-toolkit/BCE
9e4d168cab18132bbe2867d13c629510b86d350a
[ "BSD-3-Clause" ]
null
null
null
bce/parser/interface/molecule_parser.py
bce-toolkit/BCE
9e4d168cab18132bbe2867d13c629510b86d350a
[ "BSD-3-Clause" ]
4
2018-04-29T10:32:26.000Z
2021-07-13T08:17:36.000Z
#!/usr/bin/env python # # Copyright 2014 - 2018 The BCE Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the license.txt file. #
36.224138
109
0.673489
#!/usr/bin/env python # # Copyright 2014 - 2018 The BCE Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the license.txt file. # import bce.parser.interface.printer as _interface_printer class SubstituteError(Exception): """Molecule substitution...
0
0
0
3,898
0
0
0
36
69
343d6f9567caad37d311aa09d840dc694a588fef
1,836
py
Python
generators.py
sichkar-valentyn/Generators_in_Python
c8cb66960fc8f6e253cb4076dfaa440b7eb06503
[ "MIT" ]
null
null
null
generators.py
sichkar-valentyn/Generators_in_Python
c8cb66960fc8f6e253cb4076dfaa440b7eb06503
[ "MIT" ]
null
null
null
generators.py
sichkar-valentyn/Generators_in_Python
c8cb66960fc8f6e253cb4076dfaa440b7eb06503
[ "MIT" ]
null
null
null
# File: generators.py # Description: Examples on how to create and use generators in Python # Environment: PyCharm and Anaconda environment # # MIT License # Copyright (c) 2018 Valentyn N Sichkar # github.com/sichkar-valentyn # # Reference to: # [1] Valentyn N Sichkar. Examples on how to create and use generators in Py...
21.103448
213
0.638889
# File: generators.py # Description: Examples on how to create and use generators in Python # Environment: PyCharm and Anaconda environment # # MIT License # Copyright (c) 2018 Valentyn N Sichkar # github.com/sichkar-valentyn # # Reference to: # [1] Valentyn N Sichkar. Examples on how to create and use generators in Py...
0
0
0
327
255
168
0
4
134
705d98e1ed46727a93b0c67d7b1e53f1efab3221
25,439
py
Python
src/UniData.py
bazilinskyy/agent-based-uni
a8a5086a9d012e6cd972cf58c7865463b5e6f9b3
[ "MIT" ]
null
null
null
src/UniData.py
bazilinskyy/agent-based-uni
a8a5086a9d012e6cd972cf58c7865463b5e6f9b3
[ "MIT" ]
null
null
null
src/UniData.py
bazilinskyy/agent-based-uni
a8a5086a9d012e6cd972cf58c7865463b5e6f9b3
[ "MIT" ]
null
null
null
#!/usr/bin/env python """ Loading data from Excel files stored at /src/data. """ # Copyright (c) 2014, Pavlo Bazilinskyy <pavlo.bazilinskyy@gmail.com> # Department of Computer Science, National University of Ireland, Maynooth # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this sof...
41.096931
147
0.671056
#!/usr/bin/env python """ Loading data from Excel files stored at /src/data. """ # Copyright (c) 2014, Pavlo Bazilinskyy <pavlo.bazilinskyy@gmail.com> # Department of Computer Science, National University of Ireland, Maynooth # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this sof...
0
0
0
23,763
0
0
0
-24
156
8193d1da13031328c8e781646be0da0dbfa4d864
346
py
Python
projeto_labhacker/core/urls.py
thiagonf/prova-labhacker
c6cf3bbc89f5af16e9d784b53e0787a71e2ab292
[ "MIT" ]
null
null
null
projeto_labhacker/core/urls.py
thiagonf/prova-labhacker
c6cf3bbc89f5af16e9d784b53e0787a71e2ab292
[ "MIT" ]
7
2020-06-05T22:40:01.000Z
2022-02-10T09:51:52.000Z
projeto_labhacker/core/urls.py
thiagonf/prova-labhacker
c6cf3bbc89f5af16e9d784b53e0787a71e2ab292
[ "MIT" ]
null
null
null
from django.urls import path, include from django.contrib import admin from authentication.views import HomeView urlpatterns = [ path('admin/', admin.site.urls), path('', HomeView.as_view(), name='home'), path('auth/', include('authentication.urls')), path('', include('dashboard.urls')), ]
28.833333
50
0.708092
from django.urls import path, include from django.contrib import admin from django.contrib.auth import views from authentication.views import HomeView urlpatterns = [ path('admin/', admin.site.urls), path('', HomeView.as_view(), name='home'), path('auth/', include('authentication.urls')), path('', incl...
0
0
0
0
0
0
0
16
22
fc8976d261902bb332c90666a49e82c71afea265
4,257
py
Python
conf/example_apps/ObjectTracker/objectcontrole.py
chipsi007/appdaemon
4eaf4cc9a9c9bd3f703014bd60730c65ed7bfb74
[ "Apache-2.0" ]
2
2018-10-01T10:09:16.000Z
2018-12-25T20:03:48.000Z
conf/example_apps/ObjectTracker/objectcontrole.py
chipsi007/appdaemon
4eaf4cc9a9c9bd3f703014bd60730c65ed7bfb74
[ "Apache-2.0" ]
null
null
null
conf/example_apps/ObjectTracker/objectcontrole.py
chipsi007/appdaemon
4eaf4cc9a9c9bd3f703014bd60730c65ed7bfb74
[ "Apache-2.0" ]
1
2021-05-09T00:28:23.000Z
2021-05-09T00:28:23.000Z
########################################################################################### # # # ObjectTracker 2.0 # # ...
73.396552
209
0.439276
########################################################################################### # # # ObjectTracker 2.0 # # ...
0
0
0
1,319
0
0
0
18
68
0055b398181444b5c296d52fa505b1604e04fe4d
1,663
py
Python
getmedia/face_mesh.py
yuanzhoulvpi2017/tiny_python
0247ef6ce76eeb8219a6fd2a4b2c092dc62f89f7
[ "MIT" ]
34
2021-09-17T09:32:34.000Z
2022-03-28T07:26:02.000Z
getmedia/face_mesh.py
luji1515/tiny_python
5ff7921bd241bdd8dca695712f6e0666cc35527f
[ "MIT" ]
null
null
null
getmedia/face_mesh.py
luji1515/tiny_python
5ff7921bd241bdd8dca695712f6e0666cc35527f
[ "MIT" ]
27
2021-09-17T14:07:28.000Z
2022-03-15T02:03:37.000Z
import mediapipe as mp mp_drawing = mp.solutions.drawing_utils # mp_drawing_styles = mp.solutions.drawing_styles mp_face_mesh = mp.solutions.face_mesh # for webcam input: if __name__ == '__main__': main()
32.607843
113
0.58629
import cv2 import mediapipe as mp mp_drawing = mp.solutions.drawing_utils # mp_drawing_styles = mp.solutions.drawing_styles mp_face_mesh = mp.solutions.face_mesh # for webcam input: def main(): drawing_spec = mp_drawing.DrawingSpec(thickness=1, circle_radius=1) cap = cv2.VideoCapture(0) with mp_face_me...
0
0
0
0
0
1,415
0
-11
45
1df567ae3270fbc9ec71f1694fa6fa8978628cd5
2,510
py
Python
src/CacheSim/CacheRow.py
andrewoconnell89/CS472_Project2
8846b1ad6ecdbe88406d994d9e396b4c6f2bf552
[ "MIT" ]
null
null
null
src/CacheSim/CacheRow.py
andrewoconnell89/CS472_Project2
8846b1ad6ecdbe88406d994d9e396b4c6f2bf552
[ "MIT" ]
null
null
null
src/CacheSim/CacheRow.py
andrewoconnell89/CS472_Project2
8846b1ad6ecdbe88406d994d9e396b4c6f2bf552
[ "MIT" ]
null
null
null
# Designed by Andy OConnell <aoconnel@bu.edu> <andrewoconnell89@gmail.com>
34.861111
74
0.323904
# Designed by Andy OConnell <aoconnel@bu.edu> <andrewoconnell89@gmail.com> class CacheRow(object): """This represents a row of cache. Instance Variables Slot : middle 4 bits Valid : If the row is real data Tag : left 4 Bits Data : 16 Bytes of information from memory Dirt...
0
0
0
2,412
0
0
0
0
23
50f97070acc1569e51c3cee3d2a264838a2d00e1
61,329
py
Python
sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/workspaces_operations.py
tzhanl/azure-sdk-for-python
18cd03f4ab8fd76cc0498f03e80fbc99f217c96e
[ "MIT" ]
1
2021-09-07T18:36:04.000Z
2021-09-07T18:36:04.000Z
sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/workspaces_operations.py
tzhanl/azure-sdk-for-python
18cd03f4ab8fd76cc0498f03e80fbc99f217c96e
[ "MIT" ]
2
2019-10-02T23:37:38.000Z
2020-10-02T01:17:31.000Z
sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/workspaces_operations.py
tzhanl/azure-sdk-for-python
18cd03f4ab8fd76cc0498f03e80fbc99f217c96e
[ "MIT" ]
1
2019-06-17T22:18:23.000Z
2019-06-17T22:18:23.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
47.764019
234
0.669634
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
0
0
0
60,595
0
0
0
103
134
3e2e8941c27d3a24c5b1554248525566a0a63029
765
py
Python
softlearning/scripts/console_scripts.py
hanglai/bmpo
d065cf195b942c3e534d4c789a0982e0ec09957c
[ "MIT" ]
19
2020-09-02T05:58:09.000Z
2021-08-23T11:03:00.000Z
softlearning/scripts/console_scripts.py
hanglai/bmpo
d065cf195b942c3e534d4c789a0982e0ec09957c
[ "MIT" ]
4
2020-07-19T13:57:56.000Z
2021-11-10T19:42:58.000Z
softlearning/scripts/console_scripts.py
apexrl/bmpo
d065cf195b942c3e534d4c789a0982e0ec09957c
[ "MIT" ]
3
2020-09-28T11:21:24.000Z
2020-12-28T23:27:25.000Z
"""A command line interface that exposes softlearning examples to user. run_example_* methods, which run the experiments by invoking `tune.run_experiments` function. """ import sys sys.path.append('./') cli.add_command(run_example_local_cmd) if __name__ == "__main__": main()
20.131579
71
0.754248
"""A command line interface that exposes softlearning examples to user. run_example_* methods, which run the experiments by invoking `tune.run_experiments` function. """ import click import sys sys.path.append('./') from examples.instrument import run_example_local @click.group() def cli(): pass @cli.co...
0
331
0
0
0
7
0
19
115
9687324a6d1d4c0aad3ca95660de57e524efe185
510
py
Python
students/migrations/0004_auto_20210801_0618.py
yamako-tech/yamako-tech-web50-projects-2020-x-capstone
5ff4faaa2cf1b3489c554232044dfc532213a0a7
[ "MIT" ]
null
null
null
students/migrations/0004_auto_20210801_0618.py
yamako-tech/yamako-tech-web50-projects-2020-x-capstone
5ff4faaa2cf1b3489c554232044dfc532213a0a7
[ "MIT" ]
null
null
null
students/migrations/0004_auto_20210801_0618.py
yamako-tech/yamako-tech-web50-projects-2020-x-capstone
5ff4faaa2cf1b3489c554232044dfc532213a0a7
[ "MIT" ]
null
null
null
# Generated by Django 3.2.5 on 2021-07-31 21:18
22.173913
50
0.568627
# Generated by Django 3.2.5 on 2021-07-31 21:18 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('students', '0003_auto_20210731_2009'), ] operations = [ migrations.AlterModelOptions( name='textbook', options={'ord...
0
0
0
396
0
0
0
19
46
db3c24c12d152e2453312bcbf65b95284e2451dd
9,495
py
Python
tools/living_resources.py
osvenskan/data_rescue_D62CD1E5
ebcadde2f0046bcfbd3f76166655c56d254e13fc
[ "BSD-3-Clause" ]
null
null
null
tools/living_resources.py
osvenskan/data_rescue_D62CD1E5
ebcadde2f0046bcfbd3f76166655c56d254e13fc
[ "BSD-3-Clause" ]
null
null
null
tools/living_resources.py
osvenskan/data_rescue_D62CD1E5
ebcadde2f0046bcfbd3f76166655c56d254e13fc
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # Python imports import collections # Project imports import util import util_date NAMESPACE = 'LivingResources' DATE_RANGE = util_date.DATES[NAMESPACE] """ LivingResources data has 3 top-level categories (programs) -- Tidal Plankton Data, Tidal Benthic Data, and Nontidal Benthic Data. """ #...
54.568966
144
0.627278
#!/usr/bin/env python # Python imports import collections # Project imports import util import util_date NAMESPACE = 'LivingResources' DATE_RANGE = util_date.DATES[NAMESPACE] """ LivingResources data has 3 top-level categories (programs) -- Tidal Plankton Data, Tidal Benthic Data, and Nontidal Benthic Data. """ #...
0
0
0
0
0
0
0
0
0
6eabdf90cb21e1477bd6afe8491180df9c31d5b2
2,229
py
Python
server.py
schollz/twittermatic
b66cf1142b77788d485c8f0efed47aa1e41150cf
[ "Unlicense", "MIT" ]
8
2015-10-09T15:37:33.000Z
2022-01-03T10:15:21.000Z
server.py
schollz/twittermatic
b66cf1142b77788d485c8f0efed47aa1e41150cf
[ "Unlicense", "MIT" ]
9
2015-10-09T21:03:03.000Z
2016-03-12T14:00:20.000Z
server.py
schollz/twittermatic
b66cf1142b77788d485c8f0efed47aa1e41150cf
[ "Unlicense", "MIT" ]
3
2015-10-08T19:40:49.000Z
2019-12-17T19:16:37.000Z
from flask import Flask from flask.ext.triangle import Triangle import data.database_commands as database_commands app = Flask(__name__) Triangle(app) # @app.route("/tweets") # def root(): # handle = request.args.get('handle') # tweets = database_commands.get_tweet_by_handle(handle) # data = 'handle,tim...
28.576923
71
0.612831
import csv import json from flask import Flask from flask import Response from flask import request from flask import render_template from flask.ext.triangle import Triangle import data.database_commands as database_commands app = Flask(__name__) Triangle(app) @app.route("/") def index(): handles = json.load(ope...
0
1,234
0
0
0
0
0
0
179
40d1a3102a6c8c45938443c8b532d5d246c9d3f2
2,347
py
Python
src/simmate/calculators/vasp/error_handlers/rotation_matrix_nonint.py
laurenmm/simmate-1
c06b94c46919b01cda50f78221ad14f75c100a14
[ "BSD-3-Clause" ]
9
2021-12-21T02:58:21.000Z
2022-01-25T14:00:06.000Z
src/simmate/calculators/vasp/error_handlers/rotation_matrix_nonint.py
laurenmm/simmate-1
c06b94c46919b01cda50f78221ad14f75c100a14
[ "BSD-3-Clause" ]
51
2022-01-01T15:59:58.000Z
2022-03-26T21:25:42.000Z
src/simmate/calculators/vasp/error_handlers/rotation_matrix_nonint.py
laurenmm/simmate-1
c06b94c46919b01cda50f78221ad14f75c100a14
[ "BSD-3-Clause" ]
7
2022-01-01T03:44:32.000Z
2022-03-29T19:59:27.000Z
# -*- coding: utf-8 -*-
33.528571
83
0.637836
# -*- coding: utf-8 -*- import os import json from simmate.workflow_engine import ErrorHandler from simmate.calculators.vasp.inputs import Incar class RotationNonIntMatrix(ErrorHandler): """ This a simple error handler that is active when VASP finds an issue with the rotation matrix. """ is_mon...
0
0
0
2,176
0
0
0
33
113
9ed1895ea4a827b4694e3d99b715c2f22204199e
776
py
Python
darshan-util/pydarshan/darshan/cli/to_json.py
gaocegege/darshan
2d54cd8ec96d26db23e9ca421df48d2031a4c55e
[ "mpich2" ]
null
null
null
darshan-util/pydarshan/darshan/cli/to_json.py
gaocegege/darshan
2d54cd8ec96d26db23e9ca421df48d2031a4c55e
[ "mpich2" ]
null
null
null
darshan-util/pydarshan/darshan/cli/to_json.py
gaocegege/darshan
2d54cd8ec96d26db23e9ca421df48d2031a4c55e
[ "mpich2" ]
null
null
null
if __name__ == "__main__": main()
21.555556
95
0.668814
import sys import argparse import darshan def setup_parser(parser=None): # setup nested actions/subcommands? #actions = parser.add_subparsers(dest='api') # setup arguments parser.add_argument('input', help='darshan log file', nargs='?', default='example.darshan') parser.add_argument('--verbose'...
0
0
0
0
0
643
0
-24
112
3acc55ec7cebd9acbc300172a3e236a44fad366b
4,826
py
Python
crownstone_cloud/cloud.py
crownstone/crownstone-lib-python-cloud
c6a48ab8c6990c5c99d136d9a8cf1df01a7c094d
[ "MIT" ]
1
2020-05-29T23:45:15.000Z
2020-05-29T23:45:15.000Z
crownstone_cloud/cloud.py
crownstone/crownstone-lib-python-cloud
c6a48ab8c6990c5c99d136d9a8cf1df01a7c094d
[ "MIT" ]
3
2021-11-09T15:36:48.000Z
2021-11-12T00:43:23.000Z
crownstone_cloud/cloud.py
crownstone/crownstone-lib-python-cloud
c6a48ab8c6990c5c99d136d9a8cf1df01a7c094d
[ "MIT" ]
1
2021-11-09T15:33:01.000Z
2021-11-09T15:33:01.000Z
"""Main class for the Crownstone cloud cloud.""" from __future__ import annotations import logging _LOGGER = logging.getLogger(__name__)
33.513889
82
0.640075
"""Main class for the Crownstone cloud cloud.""" from __future__ import annotations import asyncio import logging import aiohttp from crownstone_cloud.cloud_models.crownstones import Crownstone from crownstone_cloud.cloud_models.spheres import Spheres from crownstone_cloud.exceptions import CrownstoneNotFoundError f...
0
0
1,676
2,642
0
0
0
189
180
3f157bc25feb7dd79f2e1fa5015bd441d9c0eef3
8,773
py
Python
corehq/apps/locations/util.py
bglar/commcare-hq
972129fc26864c08c7bef07874bd2a7218550bff
[ "BSD-3-Clause" ]
1
2017-02-10T03:14:51.000Z
2017-02-10T03:14:51.000Z
corehq/apps/locations/util.py
bglar/commcare-hq
972129fc26864c08c7bef07874bd2a7218550bff
[ "BSD-3-Clause" ]
null
null
null
corehq/apps/locations/util.py
bglar/commcare-hq
972129fc26864c08c7bef07874bd2a7218550bff
[ "BSD-3-Clause" ]
null
null
null
from corehq.apps.commtrack.models import SupplyPointCase from corehq.apps.products.models import Product from corehq.apps.locations.models import Location, SQLLocation from corehq.apps.domain.models import Domain from corehq.util.quickcache import quickcache from dimagi.utils.decorators.memoized import memoized from di...
34.952191
115
0.640032
from corehq.apps.commtrack.models import SupplyPointCase from corehq.apps.products.models import Product from corehq.apps.locations.models import Location, SQLLocation from corehq.apps.domain.models import Domain from corehq.util.quickcache import quickcache from dimagi.utils.decorators.memoized import memoized from di...
0
1,027
0
2,780
0
1,692
0
0
187
b784ed5536e878aab0baf0382c465a053b11a1b1
6,704
py
Python
google/cloud/forseti/enforcer/enforcer.py
mitsuo0114/forseti-security
a21dc6b7a7420a60f02c1a4bdfbab9e101291dd2
[ "Apache-2.0" ]
1
2018-10-06T23:16:59.000Z
2018-10-06T23:16:59.000Z
google/cloud/forseti/enforcer/enforcer.py
mitsuo0114/forseti-security
a21dc6b7a7420a60f02c1a4bdfbab9e101291dd2
[ "Apache-2.0" ]
null
null
null
google/cloud/forseti/enforcer/enforcer.py
mitsuo0114/forseti-security
a21dc6b7a7420a60f02c1a4bdfbab9e101291dd2
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 The Forseti Security Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
34.379487
80
0.676909
# Copyright 2017 The Forseti Security Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
0
0
0
111
0
0
0
0
46
cebe158fa96d11636d7e608ec07e33216f13dd64
368
py
Python
admin_tools/urls.py
asherf/django-admin-tools
26a993545de7d68286be56ac640fe12acf1a1abe
[ "MIT" ]
1
2020-04-06T23:21:17.000Z
2020-04-06T23:21:17.000Z
admin_tools/urls.py
asherf/django-admin-tools
26a993545de7d68286be56ac640fe12acf1a1abe
[ "MIT" ]
6
2020-03-25T16:58:30.000Z
2021-06-10T19:55:55.000Z
admin_tools/urls.py
asherf/django-admin-tools
26a993545de7d68286be56ac640fe12acf1a1abe
[ "MIT" ]
1
2020-02-24T22:34:17.000Z
2020-02-24T22:34:17.000Z
from django.conf import settings from django.conf.urls import url, include urlpatterns = [] if 'admin_tools.menu' in settings.INSTALLED_APPS: urlpatterns.append(url(r'^menu/', include('admin_tools.menu.urls'))) if 'admin_tools.dashboard' in settings.INSTALLED_APPS: urlpatterns.append( url(r'^dashboard/...
33.454545
72
0.73913
from django.conf import settings from django.conf.urls import url, include urlpatterns = [] if 'admin_tools.menu' in settings.INSTALLED_APPS: urlpatterns.append(url(r'^menu/', include('admin_tools.menu.urls'))) if 'admin_tools.dashboard' in settings.INSTALLED_APPS: urlpatterns.append( url(r'^dashboard/...
0
0
0
0
0
0
0
0
0
95b23018af8b6d6db6b5511ee2ad613d8f7f0859
32,798
py
Python
resources/libraries/python/DUTSetup.py
preym17/csit
3151c98618c78e3782e48bbe4d9c8f906c126f69
[ "Apache-2.0" ]
null
null
null
resources/libraries/python/DUTSetup.py
preym17/csit
3151c98618c78e3782e48bbe4d9c8f906c126f69
[ "Apache-2.0" ]
null
null
null
resources/libraries/python/DUTSetup.py
preym17/csit
3151c98618c78e3782e48bbe4d9c8f906c126f69
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2018 Cisco and/or its affiliates. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at: # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
38.048724
80
0.566071
# Copyright (c) 2018 Cisco and/or its affiliates. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at: # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
0
31,043
0
887
0
0
0
133
113
21e754d69abc89769daf7e31f441ea29a015848c
171
py
Python
book_crawler/run.py
zheng-zy/book_crawler
a092607a097986e9cd242809066e0948e64d8bcb
[ "Apache-2.0" ]
null
null
null
book_crawler/run.py
zheng-zy/book_crawler
a092607a097986e9cd242809066e0948e64d8bcb
[ "Apache-2.0" ]
null
null
null
book_crawler/run.py
zheng-zy/book_crawler
a092607a097986e9cd242809066e0948e64d8bcb
[ "Apache-2.0" ]
null
null
null
#!usr/bin/env python # coding=utf-8 # Created by zhezhiyong@163.com on 2016/11/16. """ """ from scrapy import cmdline cmdline.execute("scrapy crawl biquge".split())
14.25
46
0.707602
#!usr/bin/env python # coding=utf-8 # Created by zhezhiyong@163.com on 2016/11/16. """ 启动 """ from scrapy import cmdline cmdline.execute("scrapy crawl biquge".split())
6
0
0
0
0
0
0
0
0
54e66a5e54bee3047e85fcfaef77f2b1ac20bf82
302
py
Python
pykage/setup.py
antoineB24/pykage
472bd9b80f93b3a1c61851370915b843ff2719c9
[ "MIT" ]
null
null
null
pykage/setup.py
antoineB24/pykage
472bd9b80f93b3a1c61851370915b843ff2719c9
[ "MIT" ]
null
null
null
pykage/setup.py
antoineB24/pykage
472bd9b80f93b3a1c61851370915b843ff2719c9
[ "MIT" ]
null
null
null
from cx_Freeze import setup, Executable files = {"include_files": [ "command/", ], "packages": []} setup( name="pykage", version="0.1.5", description="npmjs en python", options={'build_exe': files}, executables=[Executable("pykage.py", base=None)])
23.230769
50
0.576159
from cx_Freeze import setup, Executable files = {"include_files": [ "command/", ], "packages": []} setup( name="pykage", version="0.1.5", description="npmjs en python", options={'build_exe': files}, executables=[Executable("pykage.py", base=None)])
0
0
0
0
0
0
0
0
0
84900ee8ef51e507d9d9ff1b73f2ced60e75a3c0
732
py
Python
pkgcore/test/cache/test_flat_hash.py
pombreda/pkgcore
b438fc573af1a031d7ce12adbbf299bab5338451
[ "BSD-3-Clause" ]
1
2021-07-05T13:10:18.000Z
2021-07-05T13:10:18.000Z
pkgcore/test/cache/test_flat_hash.py
vapier/pkgcore
35a7e4f4f0fc61dd9c4dc72d35a57e2e9d5b832f
[ "BSD-3-Clause" ]
8
2015-03-24T14:21:44.000Z
2015-03-24T14:21:44.000Z
pkgcore/test/cache/test_flat_hash.py
vapier/pkgcore
35a7e4f4f0fc61dd9c4dc72d35a57e2e9d5b832f
[ "BSD-3-Clause" ]
null
null
null
# Copyright: 2006 Brian Harring <ferringb@gmail.com> # License: GPL2/BSD
27.111111
71
0.703552
# Copyright: 2006 Brian Harring <ferringb@gmail.com> # License: GPL2/BSD from snakeoil.test.mixins import TempDirMixin from pkgcore.cache import flat_hash from pkgcore.test.cache import util, test_base class db(flat_hash.database): def __setitem__(self, cpv, data): data['_chf_'] = test_base._chf_obj ...
0
0
0
480
0
0
0
63
114
3de6852662f7918708904ec09050295efde9728e
3,616
py
Python
rqalpha/utils/functools.py
tranzwalle/rqalphax
5a85d5c8c9df988ace26b68852c9ec39ad2de6df
[ "Apache-2.0" ]
1
2022-01-27T15:37:31.000Z
2022-01-27T15:37:31.000Z
rqalpha/utils/functools.py
tranzwalle/rqalphax
5a85d5c8c9df988ace26b68852c9ec39ad2de6df
[ "Apache-2.0" ]
1
2021-12-21T08:14:51.000Z
2021-12-21T08:14:51.000Z
rqalpha/utils/functools.py
tranzwalle/rqalphax
5a85d5c8c9df988ace26b68852c9ec39ad2de6df
[ "Apache-2.0" ]
1
2022-03-30T11:50:20.000Z
2022-03-30T11:50:20.000Z
# -*- coding: utf-8 -*- # 2019 # # # # * # Apache License 2.0Apache 2.0 # Apache 2.0 http://www.apache.org/licenses/LICENSE-2.0 # # # * # # # # Apache 2.0 Apache 2.0 # public@ricequant.com cached_functions = []
32.576577
104
0.625
# -*- coding: utf-8 -*- # 版权所有 2019 深圳米筐科技有限公司(下称“米筐科技”) # # 除非遵守当前许可,否则不得使用本软件。 # # * 非商业用途(非商业用途指个人出于非商业目的使用本软件,或者高校、研究所等非营利机构出于教育、科研等目的使用本软件): # 遵守 Apache License 2.0(下称“Apache 2.0 许可”), # 您可以在以下位置获得 Apache 2.0 许可的副本:http://www.apache.org/licenses/LICENSE-2.0。 # 除非法律有要求或以书面形式达成协议,否则本软件分发时...
1,245
1,064
0
0
0
1,630
0
68
136
f09f90174f6ec9d109747da36951eb742860b8c9
14,593
py
Python
bomeba0/templates/glycans.py
aloctavodia/bomeba0
e212986d8ee60be1da91d63a7a889db14ec851c3
[ "Apache-2.0" ]
null
null
null
bomeba0/templates/glycans.py
aloctavodia/bomeba0
e212986d8ee60be1da91d63a7a889db14ec851c3
[ "Apache-2.0" ]
28
2017-06-01T15:46:33.000Z
2021-07-01T18:28:36.000Z
bomeba0/templates/glycans.py
aloctavodia/bomeba0
e212986d8ee60be1da91d63a7a889db14ec851c3
[ "Apache-2.0" ]
6
2017-09-30T13:26:08.000Z
2022-02-13T10:01:18.000Z
from collections import namedtuple import numpy as np """ Templates for glycan residues """ AA_info = namedtuple('AA_info', 'coords atom_names bonds bb sc offset') BDP_info = AA_info(coords=np.array([[-14.69, 10.15, -18.15], [-15.46, 11.47, -18.33], ...
47.37987
329
0.299459
from collections import namedtuple import numpy as np """ Templates for glycan residues """ AA_info = namedtuple('AA_info', 'coords atom_names bonds bb sc offset') BDP_info = AA_info(coords=np.array([[-14.69, 10.15, -18.15], [-15.46, 11.47, -18.33], ...
0
0
0
0
0
0
0
0
0
5fbca564b6fc867c711e32a5b0b9d483f86650a4
694
py
Python
src/coalescenceml/metadata_store/__init__.py
CornellDataScience/CoalescenceML
6dd849b272c77011719952b47d5b55684d90733a
[ "Apache-2.0" ]
1
2022-03-22T17:48:55.000Z
2022-03-22T17:48:55.000Z
src/coalescenceml/metadata_store/__init__.py
CornellDataScience/CoalescenceML
6dd849b272c77011719952b47d5b55684d90733a
[ "Apache-2.0" ]
2
2022-02-18T18:48:12.000Z
2022-02-19T18:14:38.000Z
src/coalescenceml/metadata_store/__init__.py
CornellDataScience/CoalescenceML
6dd849b272c77011719952b47d5b55684d90733a
[ "Apache-2.0" ]
1
2022-02-10T02:52:22.000Z
2022-02-10T02:52:22.000Z
""" ## Metadata Store The configuration of each pipeline, step, backend, and produced artifacts are all tracked within the metadata store. The metadata store is an SQL database, and can be `sqlite` or `mysql`. Metadata are the pieces of information tracked about the pipelines, experiments and configurations that you a...
30.173913
80
0.802594
""" ## Metadata Store The configuration of each pipeline, step, backend, and produced artifacts are all tracked within the metadata store. The metadata store is an SQL database, and can be `sqlite` or `mysql`. Metadata are the pieces of information tracked about the pipelines, experiments and configurations that you a...
0
0
0
0
0
0
0
7
0
92db293498fd8f1ab38064f3db1404cc4729b205
4,861
py
Python
PublicWebServicesAPI_AND_servercommandScripts/simpleTopUpBalance/simpleTopUpBalance.py
PaperCutSoftware/PaperCutExamples
392f284939bb498d621600c68a997a8d3559bc77
[ "MIT" ]
59
2015-10-02T18:42:19.000Z
2022-01-01T09:37:26.000Z
PublicWebServicesAPI_AND_servercommandScripts/simpleTopUpBalance/simpleTopUpBalance.py
PaperCutSoftware/PaperCutExamples
392f284939bb498d621600c68a997a8d3559bc77
[ "MIT" ]
16
2016-06-16T06:42:49.000Z
2021-08-31T22:49:59.000Z
PublicWebServicesAPI_AND_servercommandScripts/simpleTopUpBalance/simpleTopUpBalance.py
PaperCutSoftware/PaperCutExamples
392f284939bb498d621600c68a997a8d3559bc77
[ "MIT" ]
20
2015-09-09T16:27:33.000Z
2020-11-12T18:17:36.000Z
#!/usr/bin/env python # Small web app to allow a user to top up their personal PaperCut balance # Add a custom URL to the PaperCut user web page, which is used by end users # when they want to add credit to their PaperCut personal account. The url # should refer to this small web app When the user clicks on the URL l...
38.275591
154
0.727628
#!/usr/bin/env python # Small web app to allow a user to top up their personal PaperCut balance # Add a custom URL to the PaperCut user web page, which is used by end users # when they want to add credit to their PaperCut personal account. The url # should refer to this small web app When the user clicks on the URL l...
0
2,279
0
0
0
0
0
20
158
371d8878b031f08785e6952cc7b14ad180d14add
2,226
py
Python
generate.py
jseguillon/get-awx
8c3c4be2f53d9bc1e1d1556117190c7619134acc
[ "MIT" ]
null
null
null
generate.py
jseguillon/get-awx
8c3c4be2f53d9bc1e1d1556117190c7619134acc
[ "MIT" ]
null
null
null
generate.py
jseguillon/get-awx
8c3c4be2f53d9bc1e1d1556117190c7619134acc
[ "MIT" ]
null
null
null
#!/usr/bin/env python import os, yaml, datetime import logging logging.basicConfig(level=logging.INFO) from jinja2 import Environment, FileSystemLoader from shutil import copyfile # Mimic Ansible addional Jinja filter # Prepare Jinja envs env = Environment(loader = FileSystemLoader("/awx"), trim_blocks=True, lstrip...
28.909091
90
0.743935
#!/usr/bin/env python import os, yaml, json, shlex, datetime import logging logging.basicConfig(level=logging.INFO) from jinja2 import Environment, FileSystemLoader from datetime import datetime from shutil import copyfile # Mimic Ansible addional Jinja filter def quote(input): logging.debug("Quoting : %s", inpu...
0
0
0
0
0
72
0
21
44
4120a6254f740d446bdedbcf16a3b5f9b9dc4b49
6,777
py
Python
scrape_weather.py
rbbastos/Weather_Processing_App
c77b61e95e53851634afa3a0b1500a1227dcb443
[ "MIT" ]
null
null
null
scrape_weather.py
rbbastos/Weather_Processing_App
c77b61e95e53851634afa3a0b1500a1227dcb443
[ "MIT" ]
null
null
null
scrape_weather.py
rbbastos/Weather_Processing_App
c77b61e95e53851634afa3a0b1500a1227dcb443
[ "MIT" ]
null
null
null
"""Module: Creates a WeatherScraper class to scrape data from website."""
33.549505
78
0.449461
"""Module: Creates a WeatherScraper class to scrape data from website.""" import urllib.request import datetime import time from time import strptime from html.parser import HTMLParser from html.entities import name2codepoint class WeatherScraper(HTMLParser): """This class contains HTMLParser functions.""" d...
0
0
0
6,527
0
0
0
20
155
6e85a1b14c54d8fac368ba969c95b6dc1c2eb330
1,020
py
Python
drone_control/record_video.py
maxhchen/eecs149-final-project
4b3fd66c59d2f60f85006c8781fbb5eb0e50723a
[ "MIT" ]
1
2022-01-15T20:26:47.000Z
2022-01-15T20:26:47.000Z
drone_control/record_video.py
maxhchen/eecs149-final-project
4b3fd66c59d2f60f85006c8781fbb5eb0e50723a
[ "MIT" ]
null
null
null
drone_control/record_video.py
maxhchen/eecs149-final-project
4b3fd66c59d2f60f85006c8781fbb5eb0e50723a
[ "MIT" ]
null
null
null
import time, cv2 from threading import Thread from djitellopy import Tello FPS = 30 tello = Tello() tello.connect() print("Battery level:", tello.get_battery()) keepRecording = True tello.streamon() frame_read = tello.get_frame_read() # we need to run the recorder in a seperate thread, otherwise blocking options # ...
23.181818
95
0.709804
import time, cv2 from threading import Thread from djitellopy import Tello FPS = 30 tello = Tello() tello.connect() print("Battery level:", tello.get_battery()) keepRecording = True tello.streamon() frame_read = tello.get_frame_read() def video_recorder(): height, width, _ = frame_read.frame.shape video = c...
0
0
0
0
0
307
0
0
23
a47d322a9a5e9bda464a37de739f116470546692
1,901
py
Python
bireme/biblioref/migrations/0004_auto_20150902_1229.py
rfdeoliveira/fi-admin
c2df084c7e79d587e2273dc222f106fa243b7f6e
[ "MIT", "Python-2.0", "Apache-2.0", "BSD-3-Clause" ]
null
null
null
bireme/biblioref/migrations/0004_auto_20150902_1229.py
rfdeoliveira/fi-admin
c2df084c7e79d587e2273dc222f106fa243b7f6e
[ "MIT", "Python-2.0", "Apache-2.0", "BSD-3-Clause" ]
null
null
null
bireme/biblioref/migrations/0004_auto_20150902_1229.py
rfdeoliveira/fi-admin
c2df084c7e79d587e2273dc222f106fa243b7f6e
[ "MIT", "Python-2.0", "Apache-2.0", "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals
43.204545
137
0.622304
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import utils.fields class Migration(migrations.Migration): dependencies = [ ('biblioref', '0003_auto_20150901_1025'), ] operations = [ migrations.CreateModel( name='Refer...
0
0
0
1,751
0
0
0
17
68
05b01b55fd1d0c2d100e825d487acf27fb75a047
748
py
Python
tests/variable/test_use_local_in_initializer.py
sco1/pylox
b4820828306c20cee3f8533c2547fafb92c6c1bd
[ "MIT" ]
2
2021-12-18T01:52:50.000Z
2022-01-17T19:41:52.000Z
tests/variable/test_use_local_in_initializer.py
sco1/pylox
b4820828306c20cee3f8533c2547fafb92c6c1bd
[ "MIT" ]
18
2021-11-30T04:05:53.000Z
2022-02-01T03:30:04.000Z
tests/variable/test_use_local_in_initializer.py
sco1/pylox
b4820828306c20cee3f8533c2547fafb92c6c1bd
[ "MIT" ]
null
null
null
from textwrap import dedent # Base cases from https://github.com/munificent/craftinginterpreters/blob/master/test/variable/use_local_in_initializer.lox TEST_SRC = dedent( """\ var a = "outer"; { var a = a; // Error at 'a': Can't read local variable in its own initializer. } """ ) EXPECTED_ST...
25.793103
123
0.721925
from textwrap import dedent import pytest from pylox.lox import Lox # Base cases from https://github.com/munificent/craftinginterpreters/blob/master/test/variable/use_local_in_initializer.lox TEST_SRC = dedent( """\ var a = "outer"; { var a = a; // Error at 'a': Can't read local variable in its own...
0
0
0
0
0
276
0
-4
69
b43a716afff8ac59493a9d2793b6c660350d23ad
13,453
py
Python
lfs/lfs_eeg.py
shiningsunnyday/chestXRay
75712a34cf025df60261f195262cc671a9fa04dc
[ "Apache-2.0" ]
9
2019-05-27T21:33:13.000Z
2022-02-24T02:30:16.000Z
lfs/lfs_eeg.py
shiningsunnyday/chestXRay
75712a34cf025df60261f195262cc671a9fa04dc
[ "Apache-2.0" ]
null
null
null
lfs/lfs_eeg.py
shiningsunnyday/chestXRay
75712a34cf025df60261f195262cc671a9fa04dc
[ "Apache-2.0" ]
5
2019-06-01T00:36:25.000Z
2021-11-15T17:09:14.000Z
import re import spacy spacy_en = spacy.load('en_core_web_sm') # Setting LF output values ABSTAIN_VAL = 0 SEIZURE_VAL = 1 NO_SEIZURE_VAL = -1 ###################################################################################################### ##### HELPFUL REGEXES AND ONTOLOGIES ####################################...
37.895775
124
0.592953
import re import spacy spacy_en = spacy.load('en_core_web_sm') # Setting LF output values ABSTAIN_VAL = 0 SEIZURE_VAL = 1 NO_SEIZURE_VAL = -1 ###################################################################################################### ##### HELPFUL REGEXES AND ONTOLOGIES ####################################...
0
0
0
0
0
0
0
0
0
69dbba474be55d7f5d144dd4498854100f8c4b6b
313
py
Python
find_missing.py
Kunalpod/codewars
8dc1af2f3c70e209471045118fd88b3ea1e627e5
[ "MIT" ]
null
null
null
find_missing.py
Kunalpod/codewars
8dc1af2f3c70e209471045118fd88b3ea1e627e5
[ "MIT" ]
null
null
null
find_missing.py
Kunalpod/codewars
8dc1af2f3c70e209471045118fd88b3ea1e627e5
[ "MIT" ]
null
null
null
#Kunal Gautam #Codewars : @Kunalpod #Problem name: Find the missing term in an Arithmetic Progression #Problem level: 5 kyu
31.3
94
0.58147
#Kunal Gautam #Codewars : @Kunalpod #Problem name: Find the missing term in an Arithmetic Progression #Problem level: 5 kyu def find_missing(s): for i in range(1, len(s)-1): if s[i]-s[i-1] != s[i+1]-s[i]: return 2*s[i]-s[i-1] if abs(s[i] - s[i-1]) < abs(s[i+1] - s[i]) else 2*s[i]-s[i+1]
0
0
0
0
0
166
0
0
23
466de17ce18f9b0f37cc8bbacbd2c4cb46780504
1,698
py
Python
tests/dataverk/test_datapackage.py
navikt/dataverk
7dd803236433048686dd7a58358bc1c09565b14b
[ "MIT" ]
3
2019-09-29T20:48:46.000Z
2021-03-31T10:16:07.000Z
tests/dataverk/test_datapackage.py
navikt/dataverk
7dd803236433048686dd7a58358bc1c09565b14b
[ "MIT" ]
148
2019-02-08T12:30:58.000Z
2021-03-11T15:31:55.000Z
tests/dataverk/test_datapackage.py
navikt/dataverk
7dd803236433048686dd7a58358bc1c09565b14b
[ "MIT" ]
1
2020-11-18T14:10:05.000Z
2020-11-18T14:10:05.000Z
valid_metadata = { 'title': 'title', 'readme': "readme", 'license': 'MIT', 'accessRights': 'Open', 'auth': 'unknown', 'description': 'unknown', 'source': 'unknown', 'keywords': ['unknown'], 'provenance': 'unknown', 'publisher': 'unknown', 'bucket': 'opendata', 'store': '...
28.3
77
0.657244
import os import unittest from dataverk.datapackage import Datapackage from dataverk.exceptions.dataverk_exceptions import EnvironmentVariableNotSet from dataverk.utils import storage_paths valid_metadata = { 'title': 'title', 'readme': "readme", 'license': 'MIT', 'accessRights': 'Open', 'auth': 'u...
0
0
0
1,033
0
0
0
80
156
33f2919884e5b7e7f21877ccbd78c73ebaf908bc
3,966
py
Python
shoppingapp/views.py
KONAPAVANKUMAR/shopping-app-django
f0494a47e4b953cc63198c66f50bc59b94ddc860
[ "MIT" ]
null
null
null
shoppingapp/views.py
KONAPAVANKUMAR/shopping-app-django
f0494a47e4b953cc63198c66f50bc59b94ddc860
[ "MIT" ]
null
null
null
shoppingapp/views.py
KONAPAVANKUMAR/shopping-app-django
f0494a47e4b953cc63198c66f50bc59b94ddc860
[ "MIT" ]
null
null
null
# Create your views here.
37.065421
114
0.703227
from django.shortcuts import render,redirect from .models import * from django.contrib import messages from django.contrib.auth import login,logout,authenticate # Create your views here. def logoutuser(request): logout(request) return redirect('homepage') def loginview(request): return render(request,"sho...
0
0
0
0
0
3,433
0
77
429
ed3fbe249d1378ec4305fb66ee15835b31c365fc
9,439
py
Python
src/inscriptis/model/table.py
rlskoeser/inscriptis
e23f79a4ad561f53943c3c6dd70a7d4981b0e0fb
[ "Apache-2.0" ]
90
2016-01-29T15:09:21.000Z
2022-03-08T15:08:57.000Z
src/inscriptis/model/table.py
rlskoeser/inscriptis
e23f79a4ad561f53943c3c6dd70a7d4981b0e0fb
[ "Apache-2.0" ]
27
2016-01-14T10:30:10.000Z
2022-03-24T08:00:31.000Z
src/inscriptis/model/table.py
rlskoeser/inscriptis
e23f79a4ad561f53943c3c6dd70a7d4981b0e0fb
[ "Apache-2.0" ]
20
2016-01-14T12:50:55.000Z
2022-03-04T07:26:30.000Z
#!/usr/bin/env python3 # encoding: utf-8 """Classes used for representing Tables, TableRows and TableCells."""
35.220149
79
0.569658
#!/usr/bin/env python3 # encoding: utf-8 """Classes used for representing Tables, TableRows and TableCells.""" from typing import List from itertools import chain, accumulate from inscriptis.html_properties import HorizontalAlignment, VerticalAlignment from inscriptis.annotation import Annotation, horizontal_shift fr...
0
2,184
0
6,822
0
0
0
138
181
a03f6959328a0b40991c5eae5c7f38e786add882
2,238
py
Python
step_by_step_code_blocks/split_train_validate.py
AlphaVantageSupport/time-series-forecasting-pytorch
9d68a0d7ded73592e0a21c08d7652ee8188760bb
[ "Apache-2.0" ]
43
2021-04-29T18:36:48.000Z
2022-03-23T04:20:42.000Z
step_by_step_code_blocks/split_train_validate.py
djshem/time-series-forecasting-pytorch
defc88f5995c4356c337c14212b684abc7ca1cb7
[ "Apache-2.0" ]
9
2021-05-21T14:13:07.000Z
2022-03-17T11:04:49.000Z
step_by_step_code_blocks/split_train_validate.py
djshem/time-series-forecasting-pytorch
defc88f5995c4356c337c14212b684abc7ca1cb7
[ "Apache-2.0" ]
26
2021-04-29T22:34:30.000Z
2022-03-31T09:31:13.000Z
data_x, data_x_unseen = prepare_data_x(normalized_data_close_price, window_size=config["data"]["window_size"]) data_y = prepare_data_y(normalized_data_close_price, window_size=config["data"]["window_size"]) # split dataset split_index = int(data_y.shape[0]*config["data"]["train_split_size"]) data_x_train = data_x[:...
43.882353
217
0.743968
def prepare_data_x(x, window_size): # perform windowing n_row = x.shape[0] - window_size + 1 output = np.lib.stride_tricks.as_strided(x, shape=(n_row, window_size), strides=(x.strides[0], x.strides[0])) return output[:-1], output[-1] def prepare_data_y(x, window_size): # # perform simple moving av...
0
0
0
0
0
435
0
0
45
f5c2ac374420189e47c9161aa9686ce368683db5
5,367
py
Python
magfetch/settings/common.py
NumanIbnMazid/magfetch
fb6297fd3b2277bf48289ff95d1ed4f071b9aded
[ "MIT" ]
1
2020-03-13T07:09:34.000Z
2020-03-13T07:09:34.000Z
magfetch/settings/common.py
NumanIbnMazid/magfetch
fb6297fd3b2277bf48289ff95d1ed4f071b9aded
[ "MIT" ]
8
2020-02-11T23:52:58.000Z
2022-03-11T23:42:09.000Z
magfetch/settings/common.py
NumanIbnMazid/magfetch
fb6297fd3b2277bf48289ff95d1ed4f071b9aded
[ "MIT" ]
1
2020-03-13T07:09:35.000Z
2020-03-13T07:09:35.000Z
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', # Third Party Apps 'wid...
26.969849
91
0.662754
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', # Third Party Apps 'wid...
0
0
0
0
0
0
0
0
0
1f500aed9bfce93cd45309a81d07439da902bcae
4,513
py
Python
main.py
NortySpock/TESS
639c7c157bf17b8eb0527ec135dd1fefa4e2038c
[ "MIT" ]
null
null
null
main.py
NortySpock/TESS
639c7c157bf17b8eb0527ec135dd1fefa4e2038c
[ "MIT" ]
null
null
null
main.py
NortySpock/TESS
639c7c157bf17b8eb0527ec135dd1fefa4e2038c
[ "MIT" ]
null
null
null
# TESS - ToastmastErs Simple Scheduler # This simple script will create a shuffled list of suggested meeting roles for multiple meetings. import sys if __name__ == "__main__": main(sys.argv[1:])
33.932331
130
0.669621
# TESS - ToastmastErs Simple Scheduler # This simple script will create a shuffled list of suggested meeting roles for multiple meetings. from random import shuffle from os import linesep import csv import sys def main(argv): if(len(sys.argv) == 2): try: number_of_meetings = int(sys.argv[1]) excep...
0
0
0
0
0
4,229
0
-5
90
e26da87d1a7e5fed466d77acba027ac3c6b8e4a9
2,671
py
Python
src/core/src/tortuga/os_utility/tortugaSubprocess.py
sutasu/tortuga
48d7cde4fa652346600b217043b4a734fa2ba455
[ "Apache-2.0" ]
33
2018-03-02T17:07:39.000Z
2021-05-21T18:02:51.000Z
src/core/src/tortuga/os_utility/tortugaSubprocess.py
sutasu/tortuga
48d7cde4fa652346600b217043b4a734fa2ba455
[ "Apache-2.0" ]
201
2018-03-05T14:28:24.000Z
2020-11-23T19:58:27.000Z
src/core/src/tortuga/os_utility/tortugaSubprocess.py
sutasu/tortuga
48d7cde4fa652346600b217043b4a734fa2ba455
[ "Apache-2.0" ]
23
2018-03-02T17:21:59.000Z
2020-11-18T14:52:38.000Z
# Copyright 2008-2018 Univa Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
28.72043
74
0.67091
# Copyright 2008-2018 Univa Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
0
0
0
1,411
0
0
0
-4
46
dee87b225dc9554e3dce793df7d81a7dd581f3cd
2,698
py
Python
parser/code_blocks/AK.py
ZaldivardeA/dstv_matcher
2899c433c42f0a265cf0b377bd257c01c53e1569
[ "MIT" ]
1
2020-12-03T16:17:56.000Z
2020-12-03T16:17:56.000Z
parser/code_blocks/AK.py
ZaldivardeA/dstv_matcher
2899c433c42f0a265cf0b377bd257c01c53e1569
[ "MIT" ]
null
null
null
parser/code_blocks/AK.py
ZaldivardeA/dstv_matcher
2899c433c42f0a265cf0b377bd257c01c53e1569
[ "MIT" ]
null
null
null
from typing import List FORMAT: List[int] = [2, 1, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10] # 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11,12, 13,14, 15
32.506024
135
0.576353
from .general import check_for_block_tag, check_for_comment, split_info_lines, read_face_column, dimension_reference from typing import List, Union, Any FORMAT: List[int] = [2, 1, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10] # 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11,12, 13,14, 15 def get_type_n...
0
0
0
0
0
2,299
0
107
114
79f80e484561d0b01952d366471c57e5bc9c0587
6,804
py
Python
vessel/common/models.py
RaphaelPrevost/Back2Shops
5f2d369e82fe2a7b9b3a6c55782319b23d142dfd
[ "CECILL-B" ]
null
null
null
vessel/common/models.py
RaphaelPrevost/Back2Shops
5f2d369e82fe2a7b9b3a6c55782319b23d142dfd
[ "CECILL-B" ]
6
2021-03-31T19:21:50.000Z
2022-01-13T01:46:09.000Z
vessel/common/models.py
RaphaelPrevost/Back2Shops
5f2d369e82fe2a7b9b3a6c55782319b23d142dfd
[ "CECILL-B" ]
null
null
null
# -*- coding: utf-8 -*- ############################################################################# # # Copyright Dragon Dollar Limited # contact: contact@dragondollar.com # # This software is a collection of webservices designed to provide a secure # and scalable framework to build e-commerce websites. # # This so...
41.487805
79
0.591858
# -*- coding: utf-8 -*- ############################################################################# # # Copyright © Dragon Dollar Limited # contact: contact@dragondollar.com # # This software is a collection of webservices designed to provide a secure # and scalable framework to build e-commerce websites. # # This s...
2
0
0
4,744
0
0
0
-2
229
6dc89da0e6369c98d276198668c58b74f82f54d8
2,504
py
Python
tests/test_smplify.py
JasonBoy1/mmhuman3d
79b2665191115f3ed905e6afdf09990a8d484362
[ "Apache-2.0" ]
1
2021-12-03T04:17:52.000Z
2021-12-03T04:17:52.000Z
tests/test_smplify.py
wmj142326/mmhuman3d
f107203714f9627a9308d4515d35ab8fbd0074a4
[ "Apache-2.0" ]
null
null
null
tests/test_smplify.py
wmj142326/mmhuman3d
f107203714f9627a9308d4515d35ab8fbd0074a4
[ "Apache-2.0" ]
null
null
null
body_model_load_dir = 'data/body_models' batch_size = 2
30.536585
79
0.676518
import mmcv import numpy as np import torch from mmhuman3d.core.parametric_model.builder import build_registrant from mmhuman3d.models.builder import build_body_model body_model_load_dir = 'data/body_models' batch_size = 2 def test_smpl(): smplify_config = dict(mmcv.Config.fromfile('configs/smplify/smplify.py')...
0
0
0
0
0
2,231
0
57
157
0aaf3087ab8b452b83ab332928e5e2e21a1d6465
372
py
Python
code/03-skimage-images/Open.py
rahulisaac/image-processing
595e702e337729844625cd6d5d8252fcc9b63a6a
[ "CC-BY-4.0" ]
2
2021-01-10T17:24:07.000Z
2021-01-11T09:34:42.000Z
code/03-skimage-images/Open.py
rahulisaac/image-processing
595e702e337729844625cd6d5d8252fcc9b63a6a
[ "CC-BY-4.0" ]
null
null
null
code/03-skimage-images/Open.py
rahulisaac/image-processing
595e702e337729844625cd6d5d8252fcc9b63a6a
[ "CC-BY-4.0" ]
null
null
null
""" * Python program to open, display, and save an image. * """ import skimage.io import skimage.viewer # read image image = skimage.io.imread(fname="chair.jpg") # display image and wait for keypress, using a resizable window viewer = skimage.viewer.ImageViewer(image) viewer.show() # save a new version in .tif for...
21.882353
63
0.736559
""" * Python program to open, display, and save an image. * """ import skimage.io import skimage.viewer # read image image = skimage.io.imread(fname="chair.jpg") # display image and wait for keypress, using a resizable window viewer = skimage.viewer.ImageViewer(image) viewer.show() # save a new version in .tif for...
0
0
0
0
0
0
0
0
0
715920b78cf3a81962fdc56f128b96fd50298cad
1,478
py
Python
src/stance/preprocessing/make_vocab.py
emilyallaway/connotation-embedding
7f24f4a2ad0945189dd8961f8a85b0a2d4a19f6d
[ "MIT" ]
null
null
null
src/stance/preprocessing/make_vocab.py
emilyallaway/connotation-embedding
7f24f4a2ad0945189dd8961f8a85b0a2d4a19f6d
[ "MIT" ]
null
null
null
src/stance/preprocessing/make_vocab.py
emilyallaway/connotation-embedding
7f24f4a2ad0945189dd8961f8a85b0a2d4a19f6d
[ "MIT" ]
null
null
null
import argparse if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('-m', '--mode', help='What to do', required=True) parser.add_argument('-d', '--data', help='Data file', required=False) parser.add_argument('-o', '--out_file', help='Output file name prefix', required=Fal...
28.423077
98
0.635995
import pandas as pd import json from sklearn.feature_extraction.text import CountVectorizer import argparse from functools import reduce def load_original(inname, col, k=None): df = pd.read_csv(inname) str_data = [] for i in df.index: words = reduce(lambda x, y: x + y, json.loads(df.iloc[i][col]))...
0
0
0
0
0
524
0
33
134
8fa74f5878fd6fd1f76933cccee2f6c3baac37ae
1,268
py
Python
toolbox/nn/DistMult.py
LinXueyuanStdio/KGE-toolbox
916842835e61ba99dde1409592977a2ec55f8aae
[ "Apache-2.0" ]
2
2021-10-17T17:50:24.000Z
2021-12-13T05:22:46.000Z
toolbox/nn/DistMult.py
LinXueyuanStdio/KGE-toolbox
916842835e61ba99dde1409592977a2ec55f8aae
[ "Apache-2.0" ]
null
null
null
toolbox/nn/DistMult.py
LinXueyuanStdio/KGE-toolbox
916842835e61ba99dde1409592977a2ec55f8aae
[ "Apache-2.0" ]
null
null
null
import torch.nn as nn
28.818182
91
0.623028
import torch import torch.nn as nn import torch.nn.functional as F class CoreDistMult(nn.Module): def __init__(self, input_dropout_rate=0.2): super(CoreDistMult, self).__init__() self.dropout = nn.Dropout(input_dropout_rate) def forward(self, h, r): h = self.dropout(h) r = sel...
0
0
0
1,153
0
0
0
1
90
6df03bd7229b468f7bdab1cd1fe73c6951d497a6
17,523
py
Python
bot.py
dathbezumniy/kmd-sync-bot
bdc922b5b47ded2e851f16441de818a298c1394a
[ "MIT" ]
null
null
null
bot.py
dathbezumniy/kmd-sync-bot
bdc922b5b47ded2e851f16441de818a298c1394a
[ "MIT" ]
2
2020-04-28T19:35:06.000Z
2020-05-12T04:39:07.000Z
bot.py
dathbezumniy/kmd-sync-bot
bdc922b5b47ded2e851f16441de818a298c1394a
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import logging from telegram import ReplyKeyboardMarkup #STATES CONFIGURE, CHOOSE_SERVER, API_CALL, TYPING_REPLY, TYPING_CHOICE, TYPING_CONFIRMATION = range(6) # TODO: proper logging logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging.INFO) logger ...
41.721429
270
0.672259
#!/usr/bin/env python3 import os import time import logging import requests from emoji import emojize from functools import wraps from pssh.clients import SSHClient from pssh.exceptions import AuthenticationException from requests.exceptions import RequestException from telegram import ReplyKeyboardMarkup, ChatAction, ...
0
12,184
0
0
0
2,630
0
193
725
d97ce5b1583caa862f15cea2cc1f385f8676bdfd
207
py
Python
server/api/admin.py
haliciyazilim/beste-yarismasi
34acc5067caa547c12c81c8ffa9e524c288945aa
[ "MIT" ]
null
null
null
server/api/admin.py
haliciyazilim/beste-yarismasi
34acc5067caa547c12c81c8ffa9e524c288945aa
[ "MIT" ]
null
null
null
server/api/admin.py
haliciyazilim/beste-yarismasi
34acc5067caa547c12c81c8ffa9e524c288945aa
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Composition, Contest, Vote, Content admin.site.register(Content) admin.site.register(Composition) admin.site.register(Contest) admin.site.register(Vote)
25.875
55
0.821256
from django.contrib import admin from .models import Composition, Contest, Vote, Content admin.site.register(Content) admin.site.register(Composition) admin.site.register(Contest) admin.site.register(Vote)
0
0
0
0
0
0
0
0
0
f36c54205fb7bfc423d5970e687b7dc0ee76796c
2,495
py
Python
connectivity/src/stations/comstation.py
nakata5321/sensors-connectivity
307c61196791a62365eda5516cdd161999a1a7f2
[ "BSD-3-Clause" ]
null
null
null
connectivity/src/stations/comstation.py
nakata5321/sensors-connectivity
307c61196791a62365eda5516cdd161999a1a7f2
[ "BSD-3-Clause" ]
null
null
null
connectivity/src/stations/comstation.py
nakata5321/sensors-connectivity
307c61196791a62365eda5516cdd161999a1a7f2
[ "BSD-3-Clause" ]
null
null
null
import logging.config from connectivity.config.logging import LOGGING_CONFIG logging.config.dictConfig(LOGGING_CONFIG) logger = logging.getLogger("sensors-connectivity")
31.582278
87
0.598397
import threading import typing import nacl.signing import time import typing as tp import logging.config from .istation import IStation, StationData, STATION_VERSION, Measurement from ..drivers.sds011 import SDS011_MODEL, SDS011 from collections import deque from connectivity.config.logging import LOGGING_CONFIG logg...
0
0
0
1,842
0
196
0
61
223
bbc03689b792220d2c67aec673e094e5a211d4d8
3,188
py
Python
app/apimodels/ApiModel.py
Voltra/prodLogPy
df8e069342262beefd4210edce8cb13b2a9b936a
[ "MIT" ]
null
null
null
app/apimodels/ApiModel.py
Voltra/prodLogPy
df8e069342262beefd4210edce8cb13b2a9b936a
[ "MIT" ]
null
null
null
app/apimodels/ApiModel.py
Voltra/prodLogPy
df8e069342262beefd4210edce8cb13b2a9b936a
[ "MIT" ]
null
null
null
#!/usr/bin/python3 # -*- coding: utf-8 -*- """ A class that factorizes the behavior of models used for the API """ #
32.530612
151
0.608218
#!/usr/bin/python3 # -*- coding: utf-8 -*- from app.models.Model import Model from flask_restful import abort import sqlite3 """ A class that factorizes the behavior of models used for the API """ class ApiModel(Model): LIMIT = 20 """ Construct an ApiModel from meta data of a DB table @:param idCol be...
0
0
0
2,965
0
0
0
16
88
e2f9721e2bc57b9639d847af890205856469becc
810
py
Python
mission_control/devices/lock.py
aborger/RockSatX2020-KauIda
4ee505c7dfac1a9f14a86f17e273fbdaa2af8319
[ "MIT" ]
null
null
null
mission_control/devices/lock.py
aborger/RockSatX2020-KauIda
4ee505c7dfac1a9f14a86f17e273fbdaa2af8319
[ "MIT" ]
1
2021-04-02T03:53:32.000Z
2021-04-02T03:53:32.000Z
mission_control/devices/lock.py
aborger/RockSatX2020-KauIda
4ee505c7dfac1a9f14a86f17e273fbdaa2af8319
[ "MIT" ]
null
null
null
""" * The Lock class controls multiple servos to latch the door shut before the rocket spins up. * Author: Aaron Borger <aborger@nnu.edu (307)534-6265> """ import RPi.GPIO as GPIO SERVO_PIN = 14 ZERO = 2.5 NINETY = 7.5 ONE_EIGHTY = 12.5
23.823529
92
0.688889
""" * The Lock class controls multiple servos to latch the door shut before the rocket spins up. * Author: Aaron Borger <aborger@nnu.edu (307)534-6265> """ from devices.device import Device import RPi.GPIO as GPIO SERVO_PIN = 14 ZERO = 2.5 NINETY = 7.5 ONE_EIGHTY = 12.5 class Lock(Device): def __init__(self...
0
0
0
510
0
0
0
12
46
eafe6d5fd00caff37beb5f3a4362830c727ed60f
1,028
py
Python
scripts/sundry/generate_features.py
huydhn/certstream-analytics
ed4dced6fcc399ef02be2c03754e49018623785b
[ "MIT" ]
10
2019-04-27T17:24:14.000Z
2021-01-21T01:30:39.000Z
scripts/sundry/generate_features.py
huydhn/certstream-analytics
ed4dced6fcc399ef02be2c03754e49018623785b
[ "MIT" ]
null
null
null
scripts/sundry/generate_features.py
huydhn/certstream-analytics
ed4dced6fcc399ef02be2c03754e49018623785b
[ "MIT" ]
1
2019-09-16T13:07:12.000Z
2019-09-16T13:07:12.000Z
''' Generate features for outlier detection. ''' import json import sys from certstream_analytics.analysers import WordSegmentation from certstream_analytics.analysers import IDNADecoder from certstream_analytics.analysers import FeaturesGenerator def main(max_count=None): ''' The record is assumed to be sto...
23.906977
76
0.628405
''' Generate features for outlier detection. ''' import json import sys from certstream_analytics.analysers import WordSegmentation from certstream_analytics.analysers import IDNADecoder from certstream_analytics.analysers import FeaturesGenerator def main(max_count=None): ''' The record is assumed to be sto...
0
0
0
0
0
0
0
0
0
76058567d78556566acc67bff6c4ae064b8fd719
2,190
py
Python
stage1/lib/fitTool.py
YU-Zhiyang/WEVI
0282dc6de58722fc3ed3829a004800b035685b3a
[ "MIT" ]
14
2021-08-10T06:58:07.000Z
2022-02-25T23:03:10.000Z
stage1/lib/fitTool.py
YU-Zhiyang/WEVI
0282dc6de58722fc3ed3829a004800b035685b3a
[ "MIT" ]
4
2021-10-30T13:01:52.000Z
2022-03-22T04:59:46.000Z
stage2/lib/fitTool.py
YU-Zhiyang/WEVI
0282dc6de58722fc3ed3829a004800b035685b3a
[ "MIT" ]
null
null
null
import torch.nn as nn
26.071429
76
0.56758
import torch import numpy as np from torch.nn import functional as F import torch.nn as nn from torch.autograd import Variable def backWarp(img: torch.Tensor, flow: torch.Tensor): device = img.device N, C, H, W = img.size() u = flow[:, 0, :, :] v = flow[:, 1, :, :] gridX, gridY = np.meshgrid(np....
0
247
0
588
0
1,132
0
17
180
fb4fb8e645fc7e3b4d149216cfec4b327f930503
564
py
Python
stamps/stest/designmatrix.py
stemlab689/stamps
5494d4e86ad005082c677d9a07f71e1606338ba0
[ "MIT" ]
null
null
null
stamps/stest/designmatrix.py
stemlab689/stamps
5494d4e86ad005082c677d9a07f71e1606338ba0
[ "MIT" ]
null
null
null
stamps/stest/designmatrix.py
stemlab689/stamps
5494d4e86ad005082c677d9a07f71e1606338ba0
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- #only accept order = numpy.nan or 0
22.56
81
0.576241
# -*- coding: utf-8 -*- import numpy #only accept order = numpy.nan or 0 def designmatrix( c, order ): if numpy.isnan(order): return numpy.array([],ndmin=2).reshape(c.shape[0],0), numpy.array([],ndmin = 2) else: n, nd = c.shape X = numpy.ones((n, 1)) index = numpy.zeros((2, 1)) if nd == 1: return X, ...
0
0
0
0
0
466
0
-9
44
daf47cb37e81ee6379fc73e1083c92143c9ef311
377
py
Python
profile/compute.py
emilleishida/School2019
d5141df58d3240ceb0037e8f084f60fc2ef9b4c1
[ "MIT" ]
14
2019-02-02T08:33:10.000Z
2021-05-04T17:38:26.000Z
profile/compute.py
emilleishida/School2019
d5141df58d3240ceb0037e8f084f60fc2ef9b4c1
[ "MIT" ]
10
2019-04-01T11:39:40.000Z
2019-04-09T12:53:33.000Z
profile/compute.py
emilleishida/School2019
d5141df58d3240ceb0037e8f084f60fc2ef9b4c1
[ "MIT" ]
23
2019-03-25T18:37:26.000Z
2021-08-19T16:41:45.000Z
if __name__ == "__main__": main()
17.136364
40
0.633952
def generate_data(size): return [i ** 2 for i in range(size)] def compute_result(data): total = 0 for _ in range(10): total += sum(data) return total def main(): data = generate_data(size=100_000) result = compute_result(data) data = generate_data(size=200_000) result = comp...
0
0
0
0
0
267
0
0
68
c087cb6cc61b4a2b2df255ea5c8e9c35642e6d36
824
py
Python
locust_swarm/config.py
ryankanno/locust-swarm
bd652b7fb6fc2c0cb23ef2b6a7f0c5abd80973d7
[ "MIT" ]
26
2015-03-02T23:09:12.000Z
2022-02-22T13:21:55.000Z
locust_swarm/config.py
ryankanno/locust-swarm
bd652b7fb6fc2c0cb23ef2b6a7f0c5abd80973d7
[ "MIT" ]
3
2015-02-09T12:41:38.000Z
2015-09-03T15:59:11.000Z
locust_swarm/config.py
ryankanno/locust-swarm
bd652b7fb6fc2c0cb23ef2b6a7f0c5abd80973d7
[ "MIT" ]
15
2015-02-09T20:16:27.000Z
2021-04-08T07:17:18.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- DEFAULT_CFG_FILEPATH = 'locust-swarm.cfg' DEFAULT_MASTER_ROLE_NAME = 'locust-master' DEFAULT_SLAVE_ROLE_NAME = 'locust-slave' DEFAULT_MASTER_BOOTSTRAP_DIR = './bootstrap-master' DEFAULT_SLAVE_BOOTSTRAP_DIR = './bootstrap-slave' DEFAULT_NUM_SLAVES = 5 DEFAULT_CUSTOM_TAG_NA...
26.580645
78
0.723301
#!/usr/bin/env python # -*- coding: utf-8 -*- import ConfigParser from helpers import get_abs_path DEFAULT_CFG_FILEPATH = 'locust-swarm.cfg' DEFAULT_MASTER_ROLE_NAME = 'locust-master' DEFAULT_SLAVE_ROLE_NAME = 'locust-slave' DEFAULT_MASTER_BOOTSTRAP_DIR = './bootstrap-master' DEFAULT_SLAVE_BOOTSTRAP_DIR = './bootstr...
0
0
0
0
0
362
0
9
68
b443bb6a343b457998597961b1e456c536f15615
358
py
Python
Codes.python/P12/P12.py
hanzenglong/robot
fc686f751fc224b331bae2f1ee7b26b603c04634
[ "MIT" ]
null
null
null
Codes.python/P12/P12.py
hanzenglong/robot
fc686f751fc224b331bae2f1ee7b26b603c04634
[ "MIT" ]
null
null
null
Codes.python/P12/P12.py
hanzenglong/robot
fc686f751fc224b331bae2f1ee7b26b603c04634
[ "MIT" ]
null
null
null
#-------by HYH -------# import numpy as np pCan=0.001 pNon=0.999 pPosCan=0.8 pPosNon=0.1 z='positive' if 'positive'==z: p=[pPosCan*pCan,pPosNon*pNon] else: p=[(1-pPosCan)*pCan,(1-pPosNon)*pNon] p=p/np.sum(p) print('The probability of having cancer given the %s test:\n'% z,'\n',p[0]) print('The probability of cancer f...
25.571429
75
0.653631
#-------by HYH -------# import numpy as np pCan=0.001 pNon=0.999 pPosCan=0.8 pPosNon=0.1 z='positive' if 'positive'==z: p=[pPosCan*pCan,pPosNon*pNon] else: p=[(1-pPosCan)*pCan,(1-pPosNon)*pNon] p=p/np.sum(p) print('The probability of having cancer given the %s test:\n'% z,'\n',p[0]) print('The probability of cancer f...
0
0
0
0
0
0
0
0
0
74b5b86bbc8e2112482a8c3593af3294d721f966
1,104
py
Python
nit/__main__.py
udasitharani/name-initials-tile-generator
31fb8722cf1084e0827061f47baadf3ec034184d
[ "MIT" ]
null
null
null
nit/__main__.py
udasitharani/name-initials-tile-generator
31fb8722cf1084e0827061f47baadf3ec034184d
[ "MIT" ]
null
null
null
nit/__main__.py
udasitharani/name-initials-tile-generator
31fb8722cf1084e0827061f47baadf3ec034184d
[ "MIT" ]
null
null
null
import argparse, os, sys from nit import generate_tile_from_initials my_parser = argparse.ArgumentParser(prog="name initials tile generator", usage="$(prog)s [options] name save_path", description="Generate a name initials tile icon given name") ...
55.2
121
0.707428
import argparse, os, sys from nit import generate_tile, generate_tile_from_initials, generate_initials_from_string my_parser = argparse.ArgumentParser(prog="name initials tile generator", usage="$(prog)s [options] name save_path", description="Gen...
0
0
0
0
0
0
0
46
0
f72c69bd895eea56254b314d4418757ffc5e1cbe
1,266
py
Python
Scripts/Legacy/line1prep.py
rhong3/CPTAC-UCEC
ec83fbee234b5ad3df6524cdd960b5f0f3da9ea9
[ "MIT" ]
4
2019-01-04T21:11:03.000Z
2020-12-11T16:56:15.000Z
Scripts/Legacy/line1prep.py
rhong3/CPTAC-UCEC
ec83fbee234b5ad3df6524cdd960b5f0f3da9ea9
[ "MIT" ]
null
null
null
Scripts/Legacy/line1prep.py
rhong3/CPTAC-UCEC
ec83fbee234b5ad3df6524cdd960b5f0f3da9ea9
[ "MIT" ]
null
null
null
import pandas as pd labels = pd.read_csv('../Fusion_dummy_His_MUT_joined.csv', header=0) # line = pd.read_csv('../../Line1.csv', header=0) line = pd.read_csv('../EC_cyclin_expression.csv', header=0) # line['name'] = line['Proteomics_Participant_ID'] # line = line.drop(['Proteomics_Participant_ID', 'Histologic_type', ...
48.692308
109
0.671406
import pandas as pd labels = pd.read_csv('../Fusion_dummy_His_MUT_joined.csv', header=0) # line = pd.read_csv('../../Line1.csv', header=0) line = pd.read_csv('../EC_cyclin_expression.csv', header=0) # line['name'] = line['Proteomics_Participant_ID'] # line = line.drop(['Proteomics_Participant_ID', 'Histologic_type', ...
0
0
0
0
0
0
0
0
0
d3859c10913045fb875d56e28ad9df02ba42ab36
1,043
py
Python
CursoEmVideo/Python/Mundo 2/ex039.py
GabriellyBailon/Cursos
0fe82881638a48dabbfd5963db39d2a0b7d7e4c3
[ "MIT" ]
null
null
null
CursoEmVideo/Python/Mundo 2/ex039.py
GabriellyBailon/Cursos
0fe82881638a48dabbfd5963db39d2a0b7d7e4c3
[ "MIT" ]
null
null
null
CursoEmVideo/Python/Mundo 2/ex039.py
GabriellyBailon/Cursos
0fe82881638a48dabbfd5963db39d2a0b7d7e4c3
[ "MIT" ]
null
null
null
#Ler o ano de nascimento de um jovem e verificar se ele est na hora de alistar, se est muito cedo #para isso ou j passou do momento certo from datetime import date nascimento = int(input("Digite o ano do seu nascimento: ")); sexo = str(input("Voc homem ou mulher? Digite H para homem e M se for mulher: ")).upper(...
47.409091
195
0.662512
#Ler o ano de nascimento de um jovem e verificar se ele está na hora de alistar, se está muito cedo #para isso ou já passou do momento certo from datetime import date nascimento = int(input("Digite o ano do seu nascimento: ")); sexo = str(input("Você é homem ou mulher? Digite H para homem e M se for mulher: ")).u...
40
0
0
0
0
0
0
0
0
b6fdcee777e9b0d18d33cf3d235811c1799c4efa
4,549
py
Python
tests/utils/test_sal_on_coco_dets.py
schencej/xaitk-saliency
d51dcc32e15118839133f7023e4f8e8cd65824af
[ "BSD-3-Clause" ]
null
null
null
tests/utils/test_sal_on_coco_dets.py
schencej/xaitk-saliency
d51dcc32e15118839133f7023e4f8e8cd65824af
[ "BSD-3-Clause" ]
null
null
null
tests/utils/test_sal_on_coco_dets.py
schencej/xaitk-saliency
d51dcc32e15118839133f7023e4f8e8cd65824af
[ "BSD-3-Clause" ]
null
null
null
import os from tests import DATA_DIR from importlib.util import find_spec deps = ['kwcoco'] specs = [find_spec(dep) for dep in deps] is_usable = all([spec is not None for spec in specs]) dets_file = os.path.join(DATA_DIR, 'test_dets.json') config_file = os.path.join(DATA_DIR, 'config.json')
35.818898
118
0.65377
from click.testing import CliRunner import os import py import pytest import builtins import sys from typing import Any from tests import DATA_DIR from xaitk_saliency.utils.bin.sal_on_coco_dets import sal_on_coco_dets from importlib.util import find_spec deps = ['kwcoco'] specs = [find_spec(dep) for dep in deps] is...
0
2,580
0
1,443
0
0
0
27
201
c36de79193b1d457ea4dabbbff54cc86fe2825ee
1,584
py
Python
setup.py
JohnGoertz/Gumbi
7a7df9bf97bf10cdf5dc8af36026dba578e161c9
[ "Apache-2.0" ]
34
2021-11-29T11:40:52.000Z
2022-03-10T09:08:59.000Z
setup.py
JohnGoertz/Gumbi
7a7df9bf97bf10cdf5dc8af36026dba578e161c9
[ "Apache-2.0" ]
13
2021-12-30T17:07:34.000Z
2022-02-18T18:46:37.000Z
setup.py
JohnGoertz/Gumbi
7a7df9bf97bf10cdf5dc8af36026dba578e161c9
[ "Apache-2.0" ]
null
null
null
from setuptools import find_packages, setup import pathlib as pl DISTNAME = "gumbi" DESCRIPTION = "Gaussian Process Model Building Interface" AUTHOR = "John Goertz" AUTHOR_EMAIL = "" URL = "https://github.com/JohnGoertz/Gumbi" LICENSE = "Apache 2.0" PROJECT_ROOT = pl.Path(__file__).resolve().parent REQUIRE...
28.8
58
0.668561
from setuptools import find_packages, setup import pathlib as pl DISTNAME = "gumbi" DESCRIPTION = "Gaussian Process Model Building Interface" AUTHOR = "John Goertz" AUTHOR_EMAIL = "" URL = "https://github.com/JohnGoertz/Gumbi" LICENSE = "Apache 2.0" PROJECT_ROOT = pl.Path(__file__).resolve().parent REQUIRE...
0
0
0
0
0
0
0
0
0
ba00ea527fb88c2eeb702875e541d67aadb66a24
14,056
py
Python
cisco-ios-xr/ydk/models/cisco_ios_xr/Cisco_IOS_XR_mpls_te_datatypes.py
bopopescu/ACI
dd717bc74739eeed4747b3ea9e36b239580df5e1
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
cisco-ios-xr/ydk/models/cisco_ios_xr/Cisco_IOS_XR_mpls_te_datatypes.py
bopopescu/ACI
dd717bc74739eeed4747b3ea9e36b239580df5e1
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
cisco-ios-xr/ydk/models/cisco_ios_xr/Cisco_IOS_XR_mpls_te_datatypes.py
bopopescu/ACI
dd717bc74739eeed4747b3ea9e36b239580df5e1
[ "ECL-2.0", "Apache-2.0" ]
1
2020-07-22T04:04:44.000Z
2020-07-22T04:04:44.000Z
""" Cisco_IOS_XR_mpls_te_datatypes This module contains a collection of generally useful derived YANG data types. Copyright (c) 2013\-2017 by Cisco Systems, Inc. All rights reserved. """
15.617778
126
0.611483
""" Cisco_IOS_XR_mpls_te_datatypes This module contains a collection of generally useful derived YANG data types. Copyright (c) 2013\-2017 by Cisco Systems, Inc. All rights reserved. """ from collections import OrderedDict from ydk.types import Entity, EntityPath, Identity, Enum, YType, YLeaf, YLeafList, YList, Le...
0
0
0
12,802
0
0
0
205
824
9ea88e402074b31fd58c53eea583cd8b32a5a4bc
454
py
Python
backend/api/migrations/0010_auto_20180505_0100.py
genehsun/HwakimBlog
714b4ab43675f4a21cf356282238d03b9585e5c4
[ "MIT" ]
6
2018-03-30T09:45:14.000Z
2022-02-25T07:10:37.000Z
backend/api/migrations/0010_auto_20180505_0100.py
genehsun/HwakimBlog
714b4ab43675f4a21cf356282238d03b9585e5c4
[ "MIT" ]
2
2019-02-25T18:36:26.000Z
2019-02-25T18:37:37.000Z
backend/api/migrations/0010_auto_20180505_0100.py
genehsun/HwakimBlog
714b4ab43675f4a21cf356282238d03b9585e5c4
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2018-05-05 01:00 from __future__ import unicode_literals
19.73913
46
0.581498
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2018-05-05 01:00 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('api', '0009_auto_20180503_0708'), ] operations = [ migrations.RemoveField( ...
0
0
0
285
0
0
0
11
46
fd53637a318ac81a6cb7c7c4d4895aec1be44fc3
948
py
Python
2021/03/solution_one.py
adtok/advent-of-code
df1f61759bd8f3bfd7995b7e2a124d7f6e97ba01
[ "MIT" ]
null
null
null
2021/03/solution_one.py
adtok/advent-of-code
df1f61759bd8f3bfd7995b7e2a124d7f6e97ba01
[ "MIT" ]
null
null
null
2021/03/solution_one.py
adtok/advent-of-code
df1f61759bd8f3bfd7995b7e2a124d7f6e97ba01
[ "MIT" ]
null
null
null
""" Advent of Code: Day 03 Part 1 tldr: most prevalent bit """ if __name__ == "__main__": main()
22.046512
86
0.617089
""" Advent of Code: Day 03 Part 1 tldr: most prevalent bit """ from collections import defaultdict def bitchar(condition: bool) -> str: return "1" if condition else "0" def ZERO() -> int: return 0 def solve(input_file): tracker = defaultdict(ZERO) with open(input_file, "r") as file: for ...
0
0
0
0
0
711
0
14
115
979869f37ae6498474b7c34a957d81033e23233c
5,598
py
Python
scrape_crs_website.py
JoshData/crs-reports-website
b72d09307511973a892a77f7ea0643cab28926a0
[ "CC0-1.0" ]
41
2016-09-17T13:12:41.000Z
2022-01-04T08:32:26.000Z
scrape_crs_website.py
JoshData/crs-reports-website
b72d09307511973a892a77f7ea0643cab28926a0
[ "CC0-1.0" ]
13
2016-10-19T18:53:02.000Z
2018-08-19T16:11:03.000Z
scrape_crs_website.py
JoshData/crs-reports-website
b72d09307511973a892a77f7ea0643cab28926a0
[ "CC0-1.0" ]
6
2016-10-19T18:44:53.000Z
2021-01-07T02:52:11.000Z
#!/usr/bin/env python3 # # Scrape reports from https://crsreports.congress.gov. # # This site provides many of the same reports that # are available through our own archive, but only as # PDFs and only with versions as of the site launch # date and going forward. import os import scrapelib BASE_PATH = "incoming/crsre...
34.134146
111
0.65577
#!/usr/bin/env python3 # # Scrape reports from https://crsreports.congress.gov. # # This site provides many of the same reports that # are available through our own archive, but only as # PDFs and only with versions as of the site launch # date and going forward. from collections import OrderedDict import datetime imp...
0
0
0
0
0
4,551
0
-25
179
56ae42b088337f9464441adc110055e63c597818
188
py
Python
locale/pot/api/core/_autosummary/pyvista-Light-specular_color-1.py
tkoyama010/pyvista-doc-translations
23bb813387b7f8bfe17e86c2244d5dd2243990db
[ "MIT" ]
4
2020-08-07T08:19:19.000Z
2020-12-04T09:51:11.000Z
locale/pot/api/core/_autosummary/pyvista-Light-specular_color-1.py
tkoyama010/pyvista-doc-translations
23bb813387b7f8bfe17e86c2244d5dd2243990db
[ "MIT" ]
19
2020-08-06T00:24:30.000Z
2022-03-30T19:22:24.000Z
locale/pot/api/core/_autosummary/pyvista-Light-specular_color-1.py
tkoyama010/pyvista-doc-translations
23bb813387b7f8bfe17e86c2244d5dd2243990db
[ "MIT" ]
1
2021-03-09T07:50:40.000Z
2021-03-09T07:50:40.000Z
# Create a light and set its specular color to bright green. # import pyvista as pv light = pv.Light() light.specular_color = '#00FF00' light.specular_color # Expected: ## (0.0, 1.0, 0.0)
20.888889
60
0.712766
# Create a light and set its specular color to bright green. # import pyvista as pv light = pv.Light() light.specular_color = '#00FF00' light.specular_color # Expected: ## (0.0, 1.0, 0.0)
0
0
0
0
0
0
0
0
0
d31dfbf24fe2af161e356b5834c663977684c417
6,407
py
Python
opennem/db/views/__init__.py
paulculmsee/opennem
9ebe4ab6d3b97bdeebc352e075bbd5c22a8ddea1
[ "MIT" ]
22
2020-06-30T05:27:21.000Z
2022-02-21T12:13:51.000Z
opennem/db/views/__init__.py
paulculmsee/opennem
9ebe4ab6d3b97bdeebc352e075bbd5c22a8ddea1
[ "MIT" ]
71
2020-08-07T13:06:30.000Z
2022-03-15T06:44:49.000Z
opennem/db/views/__init__.py
paulculmsee/opennem
9ebe4ab6d3b97bdeebc352e075bbd5c22a8ddea1
[ "MIT" ]
13
2020-06-30T03:28:32.000Z
2021-12-30T08:17:16.000Z
import logging from operator import attrgetter from pathlib import Path from typing import List from opennem.db import get_database_engine from opennem.db.views.queries import (get_all_views_query, get_query_drop_view, get_view_unique_index_query) from .continuous_aggregates import (create_continuous_aggregation_quer...
28.602679
97
0.64133
import logging from operator import attrgetter from pathlib import Path from typing import List from opennem.db import get_database_engine from opennem.db.views.queries import ( get_all_views_query, get_query_drop_view, get_view_unique_index_query, ) from .continuous_aggregates import ( create_continu...
0
0
0
0
0
444
0
26
23
f853927ccd43fef77f91ed6e39a184b8c8436f43
4,264
py
Python
callback_script_template.py
Phedorabot/phedorabot-python-sdk
9e5e4a72a573cf85d41dfd765f96ec725f844ea6
[ "Apache-2.0" ]
null
null
null
callback_script_template.py
Phedorabot/phedorabot-python-sdk
9e5e4a72a573cf85d41dfd765f96ec725f844ea6
[ "Apache-2.0" ]
null
null
null
callback_script_template.py
Phedorabot/phedorabot-python-sdk
9e5e4a72a573cf85d41dfd765f96ec725f844ea6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # # Copyright 2017 Phedorabot # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
45.361702
81
0.705441
#!/usr/bin/env python # # Copyright 2017 Phedorabot # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
0
0
0
0
0
0
0
0
0
cf19db66604da08c8957990aad01534c1093b2d9
5,031
py
Python
tests/test_wsClaims.py
pedromtorres/TigerShark
2790a7c03905a094b126b48387c7919c09cce238
[ "BSD-3-Clause" ]
24
2015-03-18T10:15:20.000Z
2022-03-18T13:38:34.000Z
tests/test_wsClaims.py
tspannhw/TigerShark
5081641f1b189a43e9eab4813256598cc0a79f6f
[ "BSD-3-Clause" ]
6
2015-03-27T12:36:57.000Z
2021-04-13T15:01:24.000Z
tests/test_wsClaims.py
tspannhw/TigerShark
5081641f1b189a43e9eab4813256598cc0a79f6f
[ "BSD-3-Clause" ]
21
2015-11-21T09:19:47.000Z
2020-09-17T16:52:50.000Z
#!/usr/bin/env python2.6 """ Unit test of web.claims application as a complete Django WSGI web service. """ from __future__ import print_function import unittest import logging, sys import datetime import subprocess, time logger= logging.getLogger( __file__ ) def setUpModule(): """Spawn the test server process. ...
35.429577
114
0.602465
#!/usr/bin/env python2.6 """ Unit test of web.claims application as a complete Django WSGI web service. """ from __future__ import print_function import unittest import httplib import urllib2, urllib import logging, sys import os.path import datetime import base64 import subprocess, time import json logger= logging.ge...
0
0
0
2,701
0
0
0
-31
133
ed83f26f4982188dfda254ff2bee2fbae7eae451
507
py
Python
libs/core/cms/api/migrations/0015_auto_20190321_1017.py
myog-io/WebDjangular
73d3c40aa449eec5acc59d4493ee94059bddabbd
[ "MIT" ]
1
2018-09-14T15:17:19.000Z
2018-09-14T15:17:19.000Z
libs/core/cms/api/migrations/0015_auto_20190321_1017.py
MyOwnGamesLLC/WebDjangular
73d3c40aa449eec5acc59d4493ee94059bddabbd
[ "MIT" ]
41
2018-12-16T16:58:54.000Z
2019-02-22T20:08:58.000Z
libs/core/cms/api/migrations/0015_auto_20190321_1017.py
myog-io/WebDjangular
73d3c40aa449eec5acc59d4493ee94059bddabbd
[ "MIT" ]
1
2019-12-10T09:32:49.000Z
2019-12-10T09:32:49.000Z
# Generated by Django 2.1.7 on 2019-03-21 13:17
22.043478
74
0.571992
# Generated by Django 2.1.7 on 2019-03-21 13:17 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('cms', '0014_auto_20190316_0855'), ] operations = [ migrations.RemoveField( model_name='menuitem', name='alt', ...
0
0
0
393
0
0
0
19
46
b635f0b214c294a4e5c938f85314753a4f657db5
760
py
Python
astro/units.py
cristobal-sifon/astro
e3ca00bebc5dbdd33e2df8df30191cc54c17f722
[ "MIT" ]
null
null
null
astro/units.py
cristobal-sifon/astro
e3ca00bebc5dbdd33e2df8df30191cc54c17f722
[ "MIT" ]
3
2018-01-28T18:27:35.000Z
2019-10-11T13:29:11.000Z
astro/units.py
cristobal-sifon/astro
e3ca00bebc5dbdd33e2df8df30191cc54c17f722
[ "MIT" ]
1
2021-12-06T14:29:13.000Z
2021-12-06T14:29:13.000Z
# -*- coding: utf-8 -*- """ Conversion factors and units, in cgs. To convert a given value, in cgs, to the desired units, divide by that unit. Example: The speed of light in kms would be c_km = c / km """ # length cm = 1. m = 1e2 km = 1e5 AU = 1.4959787066e13 ly = 9.460730472e17 pc = 3.0856776e18 kpc = 1e3 * pc Mp...
16.888889
93
0.628947
# -*- coding: utf-8 -*- """ Conversion factors and units, in cgs. To convert a given value, in cgs, to the desired units, divide by that unit. Example: The speed of light in km·s⁻¹ would be c_km = c / km """ # length cm = 1. m = 1e2 km = 1e5 AU = 1.4959787066e13 ly = 9.460730472e17 pc = 3.0856776e18 kpc = 1e3 * pc...
7
0
0
0
0
0
0
0
0
bd1439993c7b2de1eaa84498533416500afc6a36
3,276
py
Python
bids/config.py
DimitriPapadopoulos/pybids
9449fdc319c4bdff4ed9aa1b299964352f394d56
[ "MIT" ]
101
2018-10-11T07:49:03.000Z
2022-03-13T10:24:29.000Z
bids/config.py
DimitriPapadopoulos/pybids
9449fdc319c4bdff4ed9aa1b299964352f394d56
[ "MIT" ]
572
2018-09-26T20:13:24.000Z
2022-03-30T00:03:15.000Z
bids/config.py
Remi-Gau/pybids
0f460a8f31eb2ea829c17c85720a1effcfaaf791
[ "MIT" ]
61
2018-09-26T21:12:13.000Z
2022-02-15T00:51:45.000Z
''' Utilities for manipulating package-level settings. ''' import json from pathlib import Path import os import warnings from .utils import listify __all__ = ['set_option', 'set_options', 'get_option'] _config_name = 'pybids_config.json' conf_path = str(Path(__file__).absolute().parent.joinpath('layout', 'config'...
28.99115
89
0.637363
''' Utilities for manipulating package-level settings. ''' import json from pathlib import Path import os from io import open import warnings from .utils import listify __all__ = ['set_option', 'set_options', 'get_option'] _config_name = 'pybids_config.json' conf_path = str(Path(__file__).absolute().parent.joinpat...
0
0
0
0
0
0
0
-2
22
82b4c9eb61538b0dde49e019fd485fb5be6c2b4a
221
py
Python
broca/tokenize/keyword/__init__.py
ftzeng/broca
7236dcf54edc0a4a54a55eb93be30800910667e7
[ "MIT" ]
50
2015-07-25T01:15:50.000Z
2015-11-29T11:19:25.000Z
broca/tokenize/keyword/__init__.py
publicscience/broca
7236dcf54edc0a4a54a55eb93be30800910667e7
[ "MIT" ]
2
2016-06-22T16:34:45.000Z
2017-03-20T16:29:56.000Z
broca/tokenize/keyword/__init__.py
publicscience/broca
7236dcf54edc0a4a54a55eb93be30800910667e7
[ "MIT" ]
7
2016-01-22T13:33:27.000Z
2021-05-21T07:58:35.000Z
""" Keyword extraction methods. These accept lists of strings as arguments. """
22.1
43
0.81448
""" Keyword extraction methods. These accept lists of strings as arguments. """ from .pos import POSTokenizer from .rake import RAKETokenizer from .apriori import AprioriTokenizer from .overkill import OverkillTokenizer
0
0
0
0
0
0
0
52
89
01ec0b3d1d4096d3b37ba06c1d0bd436c4d3b83d
303
py
Python
01_strategy/duck/lib/fly_behaviors.py
denzow/practice-design-pattern
141d59c51375e36769a73b6ff135a8afae64b664
[ "MIT" ]
1
2018-08-15T08:07:58.000Z
2018-08-15T08:07:58.000Z
01_strategy/duck/lib/fly_behaviors.py
denzow/practice-design-pattern
141d59c51375e36769a73b6ff135a8afae64b664
[ "MIT" ]
null
null
null
01_strategy/duck/lib/fly_behaviors.py
denzow/practice-design-pattern
141d59c51375e36769a73b6ff135a8afae64b664
[ "MIT" ]
null
null
null
# coding: utf-8
13.173913
39
0.650165
# coding: utf-8 from abc import ABCMeta, abstractmethod class FlyBehavior(metaclass=ABCMeta): @abstractmethod def fly(self): pass class FlyWithWings(FlyBehavior): def fly(self): print('ばっさばっさ') class FlyNoWay(FlyBehavior): def fly(self): print('飛べない豚')
33
26
0
110
0
0
0
18
119
2b51b3261d36e5e14448058fed17cc77ecbb1371
1,384
py
Python
emailcrawler/spiders/emailspider.py
seth2000/scrapyExample
8eb47195d0d4dd4a174d10b358c2bd7f1fa67496
[ "MIT" ]
null
null
null
emailcrawler/spiders/emailspider.py
seth2000/scrapyExample
8eb47195d0d4dd4a174d10b358c2bd7f1fa67496
[ "MIT" ]
null
null
null
emailcrawler/spiders/emailspider.py
seth2000/scrapyExample
8eb47195d0d4dd4a174d10b358c2bd7f1fa67496
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*-
33.756098
75
0.632948
# -*- coding: utf-8 -*- import re import scrapy from scrapy.crawler import CrawlerProcess from scrapy.linkextractors.lxmlhtml import LxmlLinkExtractor class EmailspiderSpider(scrapy.Spider): name = 'emailspider' allowed_domains = [''] start_urls = ['https://www.asx.com.au/contact/#/'] def start_reques...
0
0
0
1,210
0
0
0
39
111
e6cd6c80307fa4e80b5fc81d74610ff4a1853c06
7,324
py
Python
wildfireassessment/test.py
aalten77/wildfireassessment
0d4f1639b443350b50068e154e845f1abafcb49f
[ "MIT" ]
null
null
null
wildfireassessment/test.py
aalten77/wildfireassessment
0d4f1639b443350b50068e154e845f1abafcb49f
[ "MIT" ]
null
null
null
wildfireassessment/test.py
aalten77/wildfireassessment
0d4f1639b443350b50068e154e845f1abafcb49f
[ "MIT" ]
null
null
null
""" def writeRasters(): #read in filepaths for data print("Reading filepaths...") filepath_post = Path("./data/Paradise/post") filepath_pre = Path("./data/Paradise/pre") #WorldView Post/Pre fps_wv_post = sorted(list(filepath_post.glob("2*_clip.tif"))) fps_wv_pre = sorted(...
39.165775
155
0.63722
from wildfireassessment.ops import * #my package import numpy as np import matplotlib.pyplot as plt from pathlib import Path from skimage import morphology from skimage.transform import resize import pandas as pd import geopandas as gpd import pickle from sklearn.impute import SimpleImputer from sklearn.ensemble import...
0
0
0
0
0
1,224
0
355
585
ca77a34e6b30cd8393feee1458421f616d04bc53
186
py
Python
PyAirwave/__init__.py
zhuyuehui1993/PyAirwave
690a290a3e6ef8126c1a16d6d5ac37907cdc3072
[ "MIT" ]
1
2021-11-08T02:26:17.000Z
2021-11-08T02:26:17.000Z
PyAirwave/__init__.py
zhuyuehui1993/PyAirwave
690a290a3e6ef8126c1a16d6d5ac37907cdc3072
[ "MIT" ]
null
null
null
PyAirwave/__init__.py
zhuyuehui1993/PyAirwave
690a290a3e6ef8126c1a16d6d5ac37907cdc3072
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # !/usr/bin/env python3 """ @author: zhuyuehui @contact: zhuyuehui02@meituan.com @time: 2021/11/6 12:57 """ name = "PyAirwave"
16.909091
33
0.672043
# -*- coding: utf-8 -*- # !/usr/bin/env python3 """ @author: zhuyuehui @contact: zhuyuehui02@meituan.com @time: 2021/11/6 12:57 下午 """ name = "PyAirwave" from .PyAirwave import AirWave
6
0
0
0
0
0
0
9
23
f3cb6bd49a8549eee2ca13a7669b29bcdaf92856
590
py
Python
setup.py
nichdu/Adafruit_Python_CharLCD
82f08d5f8d991666070e622e42816f5bf70c1965
[ "MIT" ]
2
2015-12-14T03:17:03.000Z
2018-03-24T23:17:24.000Z
setup.py
nichdu/Adafruit_Python_CharLCD
82f08d5f8d991666070e622e42816f5bf70c1965
[ "MIT" ]
1
2017-10-13T00:25:50.000Z
2017-11-10T01:53:14.000Z
setup.py
nichdu/Adafruit_Python_CharLCD
82f08d5f8d991666070e622e42816f5bf70c1965
[ "MIT" ]
1
2022-03-28T08:28:04.000Z
2022-03-28T08:28:04.000Z
from ez_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages setup(name = 'Adafruit_CharLCD', version = '1.0.0', author = 'Tony DiCola', author_email = 'tdicola@adafruit.com', description = 'Library to drive character LCD display and plate.', license = 'M...
39.333333
114
0.705085
from ez_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages setup(name = 'Adafruit_CharLCD', version = '1.0.0', author = 'Tony DiCola', author_email = 'tdicola@adafruit.com', description = 'Library to drive character LCD display and plate.', license = 'M...
0
0
0
0
0
0
0
0
0
1e1f613430421f25217068f4b3fd9a6953bcc0d5
1,177
py
Python
projects/keypad/keypad-12.py
romilly/explorer-hat-examples
e92157d647c3ba4bc719e9255e52279e7eaa9d74
[ "MIT" ]
3
2020-09-02T14:17:13.000Z
2022-03-18T04:18:53.000Z
projects/keypad/keypad-12.py
romilly/explorer-hat-examples
e92157d647c3ba4bc719e9255e52279e7eaa9d74
[ "MIT" ]
null
null
null
projects/keypad/keypad-12.py
romilly/explorer-hat-examples
e92157d647c3ba4bc719e9255e52279e7eaa9d74
[ "MIT" ]
null
null
null
from time import sleep CHAR_TABLE = [['1','2','3'],['4','5','6'],['7','8','9'],['*','0','#']] while True: ch = decode_key(key_pressed(), CHAR_TABLE) print('%s pressed' % ch) wait_for_release() sleep(0.1)
21.4
70
0.542906
import explorerhat as eh from time import sleep CHAR_TABLE = [['1','2','3'],['4','5','6'],['7','8','9'],['*','0','#']] def prepare_column(column): for each_col in range(3): if each_col == column: eh.output[each_col].off() # so it's at 5v else: eh.output[each_col].on() # s...
0
0
0
0
0
785
0
3
160
df07f31c61d1cff722dac100df336a6fb4a46aea
479
py
Python
data/convertCSV2JSONreizigerskilometers.py
LinseyUvA/Programmeerproject
aee51d2a77559fd5f7754fc9aad020f9949b1a68
[ "Apache-2.0" ]
null
null
null
data/convertCSV2JSONreizigerskilometers.py
LinseyUvA/Programmeerproject
aee51d2a77559fd5f7754fc9aad020f9949b1a68
[ "Apache-2.0" ]
null
null
null
data/convertCSV2JSONreizigerskilometers.py
LinseyUvA/Programmeerproject
aee51d2a77559fd5f7754fc9aad020f9949b1a68
[ "Apache-2.0" ]
null
null
null
# Name: Linsey Schaap # Student number: 11036109 """ This script convert a csv file into a JSON format. """ import csv import json csvbestand = open("reizigerskilometers.csv", "r") jsonbestand = open("reizigerskilometers.json", "w") namen = ("Vervoerswijze", "Periode", "Provincie", "Afstand") bestand = csv.DictRead...
22.809524
60
0.699374
# Name: Linsey Schaap # Student number: 11036109 """ This script convert a csv file into a JSON format. """ import csv import json csvbestand = open("reizigerskilometers.csv", "r") jsonbestand = open("reizigerskilometers.json", "w") namen = ("Vervoerswijze", "Periode", "Provincie", "Afstand") bestand = csv.DictRead...
0
0
0
0
0
0
0
0
0
1a829d5a0111c4cb59be4b92c77947f0fff833c0
892
py
Python
tests/support/test_variant.py
Jacobs4/pyatv
52956adf3b79198be52cc03649f3ddeee19f9e6c
[ "MIT" ]
532
2017-02-01T19:23:28.000Z
2022-03-29T09:57:39.000Z
tests/support/test_variant.py
Jacobs4/pyatv
52956adf3b79198be52cc03649f3ddeee19f9e6c
[ "MIT" ]
1,639
2017-02-01T19:22:04.000Z
2022-03-31T17:26:40.000Z
tests/support/test_variant.py
bdraco/pyatv
9541d21e6101c60866d832626be97bf962774cd5
[ "MIT" ]
102
2017-02-02T01:42:13.000Z
2022-02-26T08:49:34.000Z
"""Unit tests for pyatv.protocols.mrp.variant."""
24.777778
61
0.700673
"""Unit tests for pyatv.protocols.mrp.variant.""" import pytest from pyatv.support.variant import read_variant, write_variant def test_read_single_byte(): assert read_variant(b"\x00")[0] == 0x00 assert read_variant(b"\x35")[0] == 0x35 def test_read_multiple_bytes(): assert read_variant(b"\xb5\x44")[0] ...
0
0
0
0
0
621
0
32
183