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
05d5cfdbbe3c961ee304c3907a509a6901453052
629
py
Python
balances.py
sangminem/bitcoin_auto_trade_with_ai
6f630e5e8c88c3c91feb224377740a6117443710
[ "MIT" ]
1
2022-03-23T10:47:35.000Z
2022-03-23T10:47:35.000Z
balances.py
sangminem/bitcoin_auto_trade_with_ai
6f630e5e8c88c3c91feb224377740a6117443710
[ "MIT" ]
null
null
null
balances.py
sangminem/bitcoin_auto_trade_with_ai
6f630e5e8c88c3c91feb224377740a6117443710
[ "MIT" ]
null
null
null
balances = [{'currency':'KRW','balance':50000000}]
26.208333
66
0.643879
from util import get_index balances = [{'currency':'KRW','balance':50000000}] def get_balances(): return balances def get_balance_index(ticker, balances): value = 'KRW' if ticker != 'KRW': value = ticker[4:] return get_index(balances, 'currency', value) def get_krw_balance(balances): ret...
0
0
0
0
0
459
0
5
114
9886f6ef61ce8671578994a8e3555d6131699f26
444
py
Python
jp.atcoder/abc129/abc129_c/10071155.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
1
2022-02-09T03:06:25.000Z
2022-02-09T03:06:25.000Z
jp.atcoder/abc129/abc129_c/10071155.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
1
2022-02-05T22:53:18.000Z
2022-02-09T01:29:30.000Z
jp.atcoder/abc129/abc129_c/10071155.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
null
null
null
import sys MOD = 10 ** 9 + 7 n, m, *a = map(int, sys.stdin.read().split()) broken = set(a) if __name__ == '__main__': ans = main() print(ans)
17.76
46
0.432432
import sys MOD = 10 ** 9 + 7 n, m, *a = map(int, sys.stdin.read().split()) broken = set(a) def main(): res = [None] * (n + 1) res[0] = 1 res[1] = 0 if 1 in broken else 1 for i in range(2, n+1): if i in broken: res[i] = 0 else: res[i] = res[i-2]...
0
0
0
0
0
257
0
0
25
9ed89eff6be6e5103bb75d986d93c4932e9935d4
4,772
py
Python
spider/spider/spiders/customer_report.py
wederribas/bigpy-crawler
58cef9a0dbaf327d7fc18503d30b821b5f9b07f7
[ "MIT" ]
null
null
null
spider/spider/spiders/customer_report.py
wederribas/bigpy-crawler
58cef9a0dbaf327d7fc18503d30b821b5f9b07f7
[ "MIT" ]
4
2021-03-31T18:45:45.000Z
2022-03-02T14:55:24.000Z
spider/spider/spiders/customer_report.py
wederribas/bigpy-customer-reports-spider
58cef9a0dbaf327d7fc18503d30b821b5f9b07f7
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*-
37.28125
86
0.583403
# -*- coding: utf-8 -*- import scrapy from scrapy.loader import ItemLoader from scrapy.exceptions import CloseSpider from spider.items import Report class CustomerReports(scrapy.Spider): """Spider that retrieves raw customer reports about companies. This spider reaches the consumidor.gov.br website to craw...
8
0
0
4,594
0
0
0
37
112
c065b5aa259b99c2bd6329f5cb3052beebc1d768
4,107
py
Python
episcan/database.py
eliottness/episcan
aee955fa87488a0945f4e8947b49b9dc9b37a0ba
[ "MIT" ]
3
2020-07-14T15:07:27.000Z
2021-09-06T09:50:10.000Z
episcan/database.py
eliottness/episcan
aee955fa87488a0945f4e8947b49b9dc9b37a0ba
[ "MIT" ]
1
2020-07-30T16:32:55.000Z
2020-08-03T12:37:08.000Z
episcan/database.py
eliottness/episcan
aee955fa87488a0945f4e8947b49b9dc9b37a0ba
[ "MIT" ]
null
null
null
__doc__ = r''' CREATE TABLE "manga_list" ( "filename" TEXT NOT NULL, "name" TEXT NOT NULL, "nb_chap" INTEGER NOT NULL, "last_update" TEXT NOT NULL, "added_date" TEXT NOT NULL, "image_path" TEXT, PRIMARY KEY("filename") ) '''
28.72028
102
0.557828
import sqlite3 import time import datetime as dt from episcan.manga import Manga __doc__ = r''' CREATE TABLE "manga_list" ( "filename" TEXT NOT NULL, "name" TEXT NOT NULL, "nb_chap" INTEGER NOT NULL, "last_update" TEXT NOT NULL, "added_date" TEXT NOT NULL, "image_path" TEXT,...
0
0
0
3,727
0
0
0
-7
112
1f3ec2a0571c3f4999908f398af1800792cf9cd9
53
py
Python
docker/axonius/verify.py
MySMBTech/dockerfiles
6bdd4c874b4d2c33114b917cad4cf9d6d267dd97
[ "MIT" ]
48
2018-12-12T12:18:09.000Z
2022-03-05T02:23:42.000Z
docker/axonius/verify.py
Axonius/dockerfiles
f2135e9abb468ee8db339ec27b2ba737acbbaef6
[ "MIT" ]
7,201
2018-12-24T17:14:17.000Z
2022-03-31T13:39:12.000Z
docker/axonius/verify.py
Axonius/dockerfiles
f2135e9abb468ee8db339ec27b2ba737acbbaef6
[ "MIT" ]
94
2018-12-17T10:59:21.000Z
2022-03-29T12:59:30.000Z
import axonius_api_client as axonapi print(axonapi)
13.25
36
0.849057
import axonius_api_client as axonapi print(axonapi)
0
0
0
0
0
0
0
0
0
ecc8cd95821dfca0cf57884f78f249761decfdae
1,724
py
Python
Scripts/Python/ip_info/ip_info.py
hajdaini/Docker
a8a72a52aef4b8296a5ec74d8f3e1fe960ca50d8
[ "Apache-2.0" ]
null
null
null
Scripts/Python/ip_info/ip_info.py
hajdaini/Docker
a8a72a52aef4b8296a5ec74d8f3e1fe960ca50d8
[ "Apache-2.0" ]
null
null
null
Scripts/Python/ip_info/ip_info.py
hajdaini/Docker
a8a72a52aef4b8296a5ec74d8f3e1fe960ca50d8
[ "Apache-2.0" ]
null
null
null
subnet = cmd(['docker', 'network', 'inspect', 'bridge' ,"--format", "'{{range .IPAM.Config}}{{.Subnet}}{{end}}'"]) gateway = cmd(['docker', 'network', 'inspect', 'bridge' ,"--format", "'{{range .IPAM.Config}}{{.Gateway}}{{end}}'"]) bridge_name = get_bridge_name() ids = cmd(["docker", "ps", "-q"], True) images = cm...
38.311111
117
0.596868
import os import subprocess def cmd(cmd, listed=False): output = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL) correct_output = output.communicate()[0].decode().replace('\'', '').splitlines() if listed: return correct_output else: return correct_output[0] ...
0
0
0
0
0
459
0
-16
91
72cbed733a08fd3cddda49b710f07f7fe47b5fad
3,182
py
Python
examples/model_persistence.py
alexlib/piecewise_linear_fit_py
cb32e331690e668b374a54f890eac549d884b2fe
[ "MIT" ]
199
2017-10-31T10:26:15.000Z
2022-03-30T09:16:52.000Z
examples/model_persistence.py
alexlib/piecewise_linear_fit_py
cb32e331690e668b374a54f890eac549d884b2fe
[ "MIT" ]
79
2017-10-31T10:26:12.000Z
2022-03-31T18:46:24.000Z
examples/model_persistence.py
alexlib/piecewise_linear_fit_py
cb32e331690e668b374a54f890eac549d884b2fe
[ "MIT" ]
54
2017-11-09T06:50:34.000Z
2022-03-09T06:15:54.000Z
# import our libraries import numpy as np import pwlf # if you use Python 2.x you should import cPickle # import cPickle as pickle # if you use Python 3.x you can just use pickle import pickle # your data y = np.array([0.00000000e+00, 9.69801700e-03, 2.94350340e-02, 4.39052750e-02, 5.45343950e-02, 6.741...
46.115942
75
0.617536
# import our libraries import numpy as np import pwlf # if you use Python 2.x you should import cPickle # import cPickle as pickle # if you use Python 3.x you can just use pickle import pickle # your data y = np.array([0.00000000e+00, 9.69801700e-03, 2.94350340e-02, 4.39052750e-02, 5.45343950e-02, 6.741...
0
0
0
0
0
0
0
0
0
6a1f7c4e42ac93a73b4ec127f9f410189208c72f
8,016
py
Python
datasets/robot_car.py
liaojh1998/RNW
412764400a4a555fb8245ab51047019429d1141f
[ "MIT" ]
46
2021-07-28T11:09:24.000Z
2022-03-05T07:48:50.000Z
datasets/robot_car.py
liaojh1998/RNW
412764400a4a555fb8245ab51047019429d1141f
[ "MIT" ]
10
2021-09-27T00:26:26.000Z
2022-03-31T13:28:12.000Z
datasets/robot_car.py
liaojh1998/RNW
412764400a4a555fb8245ab51047019429d1141f
[ "MIT" ]
6
2021-11-18T08:06:12.000Z
2022-03-22T13:46:53.000Z
import os from utils import read_list_from_file # rgb extension name _RGB_EXT = '.png' # crop size _CROP_SIZE = (1152, 640) # half size _HALF_SIZE = (576, 320) # limit of equ _EQU_LIMIT = 0.008 # nuscenes size _NUSCENES_SIZE = (768, 384) # # Utils # def read_chunks(fn, drt): """ Get all files from list file ...
34.551724
116
0.558009
import os import numpy as np import cv2 import torch import torch.nn.functional as F from torch.utils.data import Dataset from utils import read_list_from_file from transforms import ResizeWithIntrinsic, RandomHorizontalFlipWithIntrinsic, CenterCropWithIntrinsic, EqualizeHist from torchvision.transforms import ToTenso...
0
0
0
6,965
0
0
0
131
199
86a69f5a2797be23c8b76b5db9d92f48a6c44ff9
3,721
py
Python
budget-rnn/src/test.py
tejaskannan/ml-models
ad5acad2c0ce75773062ffcdff088a6fbe5ffc17
[ "Apache-2.0" ]
1
2021-06-28T15:40:41.000Z
2021-06-28T15:40:41.000Z
budget-rnn/src/test.py
tejaskannan/ml-models
ad5acad2c0ce75773062ffcdff088a6fbe5ffc17
[ "Apache-2.0" ]
5
2021-03-04T19:42:15.000Z
2022-02-10T05:46:15.000Z
budget-rnn/src/test.py
tejaskannan/budget-rnn
ad5acad2c0ce75773062ffcdff088a6fbe5ffc17
[ "Apache-2.0" ]
null
null
null
from argparse import ArgumentParser if __name__ == '__main__': parser = ArgumentParser() parser.add_argument('--model-path', type=str, required=True, help='Path to the trained model parameters.') parser.add_argument('--dataset-folder', type=str, required=True, help='Path to the dataset to test on.') ...
45.378049
187
0.730986
import re import os import sys from argparse import ArgumentParser from typing import Optional from models.model_factory import get_model from dataset.dataset_factory import get_dataset from dataset.dataset import DataSeries from utils.hyperparameters import HyperParameters from utils.file_utils import extract_model_n...
0
0
0
0
0
2,392
0
243
267
53d019e7100270336744f17700a97396ec2731a0
14,557
py
Python
mindspore/python/mindspore/scipy/optimize/line_search.py
zimo-geek/mindspore
665ec683d4af85c71b2a1f0d6829356f2bc0e1ff
[ "Apache-2.0" ]
1
2021-12-27T13:42:29.000Z
2021-12-27T13:42:29.000Z
mindspore/python/mindspore/scipy/optimize/line_search.py
zimo-geek/mindspore
665ec683d4af85c71b2a1f0d6829356f2bc0e1ff
[ "Apache-2.0" ]
null
null
null
mindspore/python/mindspore/scipy/optimize/line_search.py
zimo-geek/mindspore
665ec683d4af85c71b2a1f0d6829356f2bc0e1ff
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 Huawei Technologies Co., Ltd # # 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...
39.882192
105
0.553067
# Copyright 2021 Huawei Technologies Co., Ltd # # 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...
0
0
0
5,404
0
0
0
47
112
58d0c948fc8c5606d9536bb9d289ba5d2a086256
2,658
py
Python
src/viz_kamada.py
akcube/risk-averse-routing
bcf2e31dfb4043362dabd5fd243e536b1bb068cf
[ "MIT" ]
null
null
null
src/viz_kamada.py
akcube/risk-averse-routing
bcf2e31dfb4043362dabd5fd243e536b1bb068cf
[ "MIT" ]
null
null
null
src/viz_kamada.py
akcube/risk-averse-routing
bcf2e31dfb4043362dabd5fd243e536b1bb068cf
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt import networkx as nx edgeListRaw = [] pathList = [] label = {} weights = [] col = [] edgeTraffic = {} maxw = 0 minw = 999999999 # Reading path from file textFile = open("src/data/path.txt", "r") data = textFile.read().split() for r in range(1,len(data)-1): pathList.append((int(d...
23.315789
91
0.63544
import matplotlib.pyplot as plt import networkx as nx edgeListRaw = [] pathList = [] label = {} weights = [] col = [] edgeTraffic = {} maxw = 0 minw = 999999999 # Reading path from file textFile = open("src/data/path.txt", "r") data = textFile.read().split() for r in range(1,len(data)-1): pathList.append((int(d...
0
0
0
0
0
0
0
0
0
c4a5d4cbc7dc387bb3a14363294e36a800ab3472
398
py
Python
tftutorials/tf.py
bahalbach/nbaproject
b2336452ebefa1251dee9ff19a6f189756c5a3dd
[ "MIT" ]
null
null
null
tftutorials/tf.py
bahalbach/nbaproject
b2336452ebefa1251dee9ff19a6f189756c5a3dd
[ "MIT" ]
null
null
null
tftutorials/tf.py
bahalbach/nbaproject
b2336452ebefa1251dee9ff19a6f189756c5a3dd
[ "MIT" ]
null
null
null
# %% from tensorflow import keras (x_train, y_train), (x_test, y_test) = keras.datasets.fashion_mnist.load_data() model = keras.models.Sequential([ keras.layers.Flatten(input_shape=[28, 28]), keras.layers.Dense(128, activation='relu'), keras.layers.Dense(10, activation='softmax') ]) model.compile(loss=ke...
24.875
79
0.731156
# %% from tensorflow import keras (x_train, y_train), (x_test, y_test) = keras.datasets.fashion_mnist.load_data() model = keras.models.Sequential([ keras.layers.Flatten(input_shape=[28, 28]), keras.layers.Dense(128, activation='relu'), keras.layers.Dense(10, activation='softmax') ]) model.compile(loss=ke...
0
0
0
0
0
0
0
0
0
7e9e9d6c80f0e952a1b3bf7194bdd45240a55a13
5,784
py
Python
b2sdk/account_info/in_memory.py
jhart-r7/b2-sdk-python
d995013768ee9816244d1a6ce49ea6d91014982f
[ "MIT" ]
null
null
null
b2sdk/account_info/in_memory.py
jhart-r7/b2-sdk-python
d995013768ee9816244d1a6ce49ea6d91014982f
[ "MIT" ]
null
null
null
b2sdk/account_info/in_memory.py
jhart-r7/b2-sdk-python
d995013768ee9816244d1a6ce49ea6d91014982f
[ "MIT" ]
null
null
null
###################################################################### # # File: b2sdk/account_info/in_memory.py # # Copyright 2019 Backblaze Inc. All Rights Reserved. # # License https://www.backblaze.com/using_b2_code.html # ###################################################################### def _raise_missing_i...
27.674641
77
0.624827
###################################################################### # # File: b2sdk/account_info/in_memory.py # # Copyright 2019 Backblaze Inc. All Rights Reserved. # # License https://www.backblaze.com/using_b2_code.html # ###################################################################### from .exception impor...
0
2,136
0
3,037
0
0
0
52
118
5052f2f2e0f1ee20801e850ce72641f08f6fadf7
2,242
py
Python
core/views.py
hossainchisty/Multi-Vendor-eCommerce
42c5f62b8b098255cc9ea57858d3cc7de94bd76a
[ "MIT" ]
16
2021-09-22T19:08:28.000Z
2022-03-18T18:57:02.000Z
core/views.py
hossainchisty/Multi-Vendor-eCommerce
42c5f62b8b098255cc9ea57858d3cc7de94bd76a
[ "MIT" ]
6
2021-09-30T12:36:02.000Z
2022-03-18T22:18:00.000Z
core/views.py
hossainchisty/Multi-Vendor-eCommerce
42c5f62b8b098255cc9ea57858d3cc7de94bd76a
[ "MIT" ]
6
2021-12-06T02:04:51.000Z
2022-03-13T14:38:14.000Z
from django.contrib import messages from django.shortcuts import redirect, render from .models import Contact def contact(request): ''' user contact submission form ''' if request.method == 'POST': name = request.POST.get('name') email = request.POST.get('email') ...
31.138889
84
0.614184
from django.contrib import messages from django.db.models import Q from django.http import Http404, JsonResponse from django.shortcuts import redirect, render from django.views.decorators.cache import cache_page from product.models import Product from .models import Contact def home(request): products...
0
1,135
0
0
0
150
0
77
192
f2d69c4c18942c325518663c68c92a2b0083ae54
1,423
py
Python
us-states-game/main.py
dlouima/python_project
2f84c5131efccfa04a633a608605b957b20b5f7e
[ "Apache-2.0" ]
null
null
null
us-states-game/main.py
dlouima/python_project
2f84c5131efccfa04a633a608605b957b20b5f7e
[ "Apache-2.0" ]
null
null
null
us-states-game/main.py
dlouima/python_project
2f84c5131efccfa04a633a608605b957b20b5f7e
[ "Apache-2.0" ]
null
null
null
import turtle import pandas # creen setup correct_guess_list = [] screen = turtle.Screen() screen.title(" U.S State Game") image = 'blank_states_img.gif' screen.addshape(image) turtle.shape(image) # import the dataset as a csv data = pandas.read_csv('50_states.csv') state_list = data.state.to_list() # getting user...
29.645833
89
0.653549
import turtle import pandas # creen setup correct_guess_list = [] screen = turtle.Screen() screen.title(" U.S State Game") image = 'blank_states_img.gif' screen.addshape(image) turtle.shape(image) # import the dataset as a csv data = pandas.read_csv('50_states.csv') state_list = data.state.to_list() # getting user...
0
0
0
0
0
0
0
0
0
694342ce6b5d2412b74bf152ec3145ef2b05573f
1,227
py
Python
1/test.py
AlecRosenbaum/adventofcode2018
9c24aff22420f8ac59b2c4045b86e3991332dfe0
[ "MIT" ]
null
null
null
1/test.py
AlecRosenbaum/adventofcode2018
9c24aff22420f8ac59b2c4045b86e3991332dfe0
[ "MIT" ]
null
null
null
1/test.py
AlecRosenbaum/adventofcode2018
9c24aff22420f8ac59b2c4045b86e3991332dfe0
[ "MIT" ]
null
null
null
import unittest if __name__ == "__main__": unittest.main()
30.675
65
0.607987
import unittest from solution import solution_part_one, solution_part_two class TestPartOne(unittest.TestCase): def test_one(self): problem_input = "\n".join(["+1", "+1", "+1"]) self.assertEqual(3, solution_part_one(problem_input)) def test_two(self): problem_input = "\n".join(["+1",...
0
0
0
1,055
0
0
0
36
69
2f0733697eb9053c9f604adcdf375dcd8f7f0298
2,663
py
Python
tests/mdp_test.py
Duckie-town-isu/tulip-control
07de9f85591a36e9556c612a371e9c28693156d2
[ "BSD-3-Clause" ]
91
2015-01-28T10:18:48.000Z
2022-02-09T16:37:32.000Z
tests/mdp_test.py
Duckie-town-isu/tulip-control
07de9f85591a36e9556c612a371e9c28693156d2
[ "BSD-3-Clause" ]
166
2015-01-21T17:30:58.000Z
2022-01-31T19:42:24.000Z
tests/mdp_test.py
Duckie-town-isu/tulip-control
07de9f85591a36e9556c612a371e9c28693156d2
[ "BSD-3-Clause" ]
34
2015-08-25T01:04:23.000Z
2021-11-05T19:35:59.000Z
# This test includes unit tests for MarkovChain and MarkovDecisionProcess of # the tulip.transys module # # * mc_test(): a unit test for the MarkovChain class # * mdp_test(): a unit test for the MarkovDecisionProcess class
28.634409
76
0.567405
# This test includes unit tests for MarkovChain and MarkovDecisionProcess of # the tulip.transys module # # * mc_test(): a unit test for the MarkovChain class # * mdp_test(): a unit test for the MarkovDecisionProcess class from tulip.transys import MarkovChain as MC from tulip.transys import MarkovDecisionProcess as M...
0
0
0
0
0
2,268
0
55
114
3d1d3371cbf08e3c3d4b3efa58d242b3d479084b
2,682
py
Python
python-algorithm/leetcode/problem_959.py
isudox/nerd-algorithm
c1fbe153953cf3fc24395f75d102016fdf9ea0fa
[ "MIT" ]
5
2017-06-11T09:19:34.000Z
2019-01-16T16:58:31.000Z
python-algorithm/leetcode/problem_959.py
isudox/leetcode-solution
60085e64deaf396a171367affc94b18114565c43
[ "MIT" ]
5
2020-03-22T13:53:54.000Z
2020-03-23T08:49:35.000Z
python-algorithm/leetcode/problem_959.py
isudox/nerd-algorithm
c1fbe153953cf3fc24395f75d102016fdf9ea0fa
[ "MIT" ]
1
2019-03-02T15:50:43.000Z
2019-03-02T15:50:43.000Z
"""959. Regions Cut By Slashes https://leetcode.com/problems/regions-cut-by-slashes/ In a N x N grid composed of 1 x 1 squares, each 1 x 1 square consists of a /, \, or blank space. These characters divide the square into contiguous regions. (Note that backslash characters are escaped, so a \ is represented as "\\"....
22.923077
80
0.486577
"""959. Regions Cut By Slashes https://leetcode.com/problems/regions-cut-by-slashes/ In a N x N grid composed of 1 x 1 squares, each 1 x 1 square consists of a /, \, or blank space. These characters divide the square into contiguous regions. (Note that backslash characters are escaped, so a \ is represented as "\\"....
0
0
0
1,467
0
0
0
2
45
a8f979b85045b54a79fdb97fbaef39e0048bb18a
4,242
py
Python
http_server_livereload/__init__.py
paradoxxxzero/http-server-livereload
d6e2813ef2bc0315718675cdf64e4b464091093e
[ "MIT" ]
null
null
null
http_server_livereload/__init__.py
paradoxxxzero/http-server-livereload
d6e2813ef2bc0315718675cdf64e4b464091093e
[ "MIT" ]
null
null
null
http_server_livereload/__init__.py
paradoxxxzero/http-server-livereload
d6e2813ef2bc0315718675cdf64e4b464091093e
[ "MIT" ]
null
null
null
# *-* coding: utf-8 *-* # Copyright (c) 2015 Mounier Florian # 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, modi...
37.539823
79
0.673032
# *-* coding: utf-8 *-* # Copyright (c) 2015 Mounier Florian # 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, modi...
0
447
0
1,154
0
0
0
20
155
aec9fc334fddbacc0d62a22310f846863f3809d5
9,167
py
Python
medallion/backends/mongodb_backend.py
eiyuki/cti-taxii-server
55bde5ee8e20a19d6dad855c8d270c47725c68a1
[ "BSD-3-Clause" ]
null
null
null
medallion/backends/mongodb_backend.py
eiyuki/cti-taxii-server
55bde5ee8e20a19d6dad855c8d270c47725c68a1
[ "BSD-3-Clause" ]
null
null
null
medallion/backends/mongodb_backend.py
eiyuki/cti-taxii-server
55bde5ee8e20a19d6dad855c8d270c47725c68a1
[ "BSD-3-Clause" ]
null
null
null
import logging # Module-level logger log = logging.getLogger(__name__) def catch_mongodb_error(func): """Catch mongodb availability error""" return api_wrapper
36.090551
103
0.564307
import logging from pymongo import ASCENDING, MongoClient from pymongo.errors import ConnectionFailure, ServerSelectionTimeoutError from ..exceptions import MongoBackendError, ProcessingError from ..filters.mongodb_filter import MongoDBFilter from ..utils.common import (create_bundle, format_datetime, generate_status...
0
7,779
0
577
0
212
0
242
184
ba6fce0160df84d020fba5eefe2c1e098cea01b2
2,452
py
Python
athletes/migrations/0005_auto_20150726_1356.py
shermanng10/superathletebuilder
dbaf98d5bbb5d93575985a89f244d1732b16c7bc
[ "MIT" ]
null
null
null
athletes/migrations/0005_auto_20150726_1356.py
shermanng10/superathletebuilder
dbaf98d5bbb5d93575985a89f244d1732b16c7bc
[ "MIT" ]
null
null
null
athletes/migrations/0005_auto_20150726_1356.py
shermanng10/superathletebuilder
dbaf98d5bbb5d93575985a89f244d1732b16c7bc
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals
37.723077
130
0.600326
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import datetime from django.utils.timezone import utc class Migration(migrations.Migration): dependencies = [ ('athletes', '0004_auto_20150726_1354'), ] operations = [ migrations.Add...
0
0
0
2,268
0
0
0
29
90
b4c979b1a85f9d3c76e877cf4bee69447f6ed157
13,689
py
Python
pandasdmx/util.py
aboddie/pandaSDMX
224bf7c86ca159628e0087c8041be6cf9228f4c5
[ "Apache-2.0" ]
null
null
null
pandasdmx/util.py
aboddie/pandaSDMX
224bf7c86ca159628e0087c8041be6cf9228f4c5
[ "Apache-2.0" ]
null
null
null
pandasdmx/util.py
aboddie/pandaSDMX
224bf7c86ca159628e0087c8041be6cf9228f4c5
[ "Apache-2.0" ]
null
null
null
import logging import typing from collections.abc import Iterator from enum import Enum from functools import lru_cache from typing import Any, Dict, Mapping, Tuple, TypeVar, Union import pydantic import requests from pydantic import Field, ValidationError, validator from pydantic.class_validators import make_generic_...
31.6875
88
0.614508
import logging import typing from collections.abc import Iterator from enum import Enum from functools import lru_cache from typing import Any, Dict, Mapping, Tuple, TypeVar, Union import pydantic import requests from pydantic import Field, ValidationError, validator from pydantic.class_validators import make_generic_...
3
1,395
0
7,427
0
42
0
0
187
f2351bf4bc6d8fdde57423269322066f1bdce93c
4,026
py
Python
SLpackage/private/pacbio/pythonpkgs/pysiv2/lib/python2.7/site-packages/pysiv2/custom/test_mapping_stats.py
fanglab/6mASCOPE
3f1fdcb7693ff152f17623ce549526ec272698b1
[ "BSD-3-Clause" ]
5
2022-02-20T07:10:02.000Z
2022-03-18T17:47:53.000Z
SLpackage/private/pacbio/pythonpkgs/pysiv2/lib/python2.7/site-packages/pysiv2/custom/test_mapping_stats.py
fanglab/6mASCOPE
3f1fdcb7693ff152f17623ce549526ec272698b1
[ "BSD-3-Clause" ]
null
null
null
SLpackage/private/pacbio/pythonpkgs/pysiv2/lib/python2.7/site-packages/pysiv2/custom/test_mapping_stats.py
fanglab/6mASCOPE
3f1fdcb7693ff152f17623ce549526ec272698b1
[ "BSD-3-Clause" ]
null
null
null
""" Test report metrics for a mapping job. """ import logging log = logging.getLogger(__name__)
39.087379
93
0.640338
""" Test report metrics for a mapping job. """ import unittest import logging import numpy from pbcore.io import AlignmentSet, ConsensusAlignmentSet from pbcommand.models import FileTypes from pysiv2.custom.base import TestReportStatistics, setUpFindAlignments log = logging.getLogger(__name__) class TestMapping...
0
0
0
3,701
0
0
0
89
137
7d85f5c4d7d7a95c065cd6ae12589c977c5172ae
2,809
py
Python
src/CalculatorTests.py
krishnaeleti/travisbuildtestforcalc
21b205e1faa7bc2b8c52b471d11bcd791f55c309
[ "MIT" ]
null
null
null
src/CalculatorTests.py
krishnaeleti/travisbuildtestforcalc
21b205e1faa7bc2b8c52b471d11bcd791f55c309
[ "MIT" ]
null
null
null
src/CalculatorTests.py
krishnaeleti/travisbuildtestforcalc
21b205e1faa7bc2b8c52b471d11bcd791f55c309
[ "MIT" ]
null
null
null
import unittest if __name__ == '__main__': unittest.main()
42.560606
108
0.683161
import unittest from Calculator import Calculator from CsvReader import CsvReader from pprint import pprint class MyTestCase(unittest.TestCase): def setUp(self) -> None: self.calculator = Calculator() def test_instantiate_calculator(self): self.assertIsInstance(self.calculator, Calculator) ...
0
0
0
2,629
0
0
0
26
89
c7898babfcac022cdb9e50aff522d71e64fa290b
17,984
py
Python
elevenclock/lang/lang_sv.py
npsand/ElevenClock
1663a0be7c1f2cb0bafc5d1e1a71083ac6348c80
[ "Apache-2.0" ]
null
null
null
elevenclock/lang/lang_sv.py
npsand/ElevenClock
1663a0be7c1f2cb0bafc5d1e1a71083ac6348c80
[ "Apache-2.0" ]
null
null
null
elevenclock/lang/lang_sv.py
npsand/ElevenClock
1663a0be7c1f2cb0bafc5d1e1a71083ac6348c80
[ "Apache-2.0" ]
null
null
null
# INSTRUCTIONS # Translate the text and write it between the " # EXAMPLE: original -> "This text is in english: value {0}" # translation -> "Aquest text est en angls: valor {0}" # So it would look like: "ORIGINAL_TEXT" : "TRANSLATED_TEXT", # If you see sth like {0}, {1}, maintain it on the ...
63.77305
340
0.662978
# INSTRUCTIONS # Translate the text and write it between the " # EXAMPLE: original -> "This text is in english: value {0}" # translation -> "Aquest text està en anglès: valor {0}" # So it would look like: "ORIGINAL_TEXT" : "TRANSLATED_TEXT", # If you see sth like {0}, {1}, maintain it on th...
564
0
0
0
0
0
0
0
0
e0b86ec8638677da4750164aa1a69d48931c8c6b
343
py
Python
py/builtin/testing/test_set.py
woodrow/pyoac
b5dc59e6a38e7912db47f26fb23ffa4764a3c0e7
[ "MIT" ]
1
2019-05-27T00:58:46.000Z
2019-05-27T00:58:46.000Z
py/builtin/testing/test_set.py
woodrow/pyoac
b5dc59e6a38e7912db47f26fb23ffa4764a3c0e7
[ "MIT" ]
null
null
null
py/builtin/testing/test_set.py
woodrow/pyoac
b5dc59e6a38e7912db47f26fb23ffa4764a3c0e7
[ "MIT" ]
null
null
null
# some small tests to see whether sets are there and work
22.866667
57
0.586006
# some small tests to see whether sets are there and work from py.builtin import set, frozenset def test_simple(): s = set([1, 2, 3, 4]) assert s == set([3, 4, 2, 1]) s1 = s.union(set([5, 6])) assert 5 in s1 assert 1 in s1 def test_frozenset(): s = set([frozenset([0, 1]), frozenset([1, 0])]) ...
0
0
0
0
0
200
0
16
69
3d20dcda26b226fce3faed4077727e57f3460cb2
224
py
Python
settings/constants.py
MykhaiIo/heart-attention
44d4760bd3f571e5080c25156d53ac5cc57921af
[ "MIT" ]
null
null
null
settings/constants.py
MykhaiIo/heart-attention
44d4760bd3f571e5080c25156d53ac5cc57921af
[ "MIT" ]
null
null
null
settings/constants.py
MykhaiIo/heart-attention
44d4760bd3f571e5080c25156d53ac5cc57921af
[ "MIT" ]
null
null
null
import os DATA_FOLDER = 'data' TRAIN_CSV = os.path.join(DATA_FOLDER, 'train.csv') VAL_CSV = os.path.join(DATA_FOLDER, 'val.csv') MODEL_FOLDER = 'models' SAVED_ESTIMATOR = os.path.join(MODEL_FOLDER, 'LGBMClassifier.pickle')
28
69
0.758929
import os DATA_FOLDER = 'data' TRAIN_CSV = os.path.join(DATA_FOLDER, 'train.csv') VAL_CSV = os.path.join(DATA_FOLDER, 'val.csv') MODEL_FOLDER = 'models' SAVED_ESTIMATOR = os.path.join(MODEL_FOLDER, 'LGBMClassifier.pickle')
0
0
0
0
0
0
0
0
0
27aa8358b400b7cfd05aa44cb4fa8afb3e2f30d6
3,303
py
Python
main.py
AlfredoCU/Classifications
12d168c391029d104e56109bb5f54555aaff8f0c
[ "MIT" ]
null
null
null
main.py
AlfredoCU/Classifications
12d168c391029d104e56109bb5f54555aaff8f0c
[ "MIT" ]
null
null
null
main.py
AlfredoCU/Classifications
12d168c391029d104e56109bb5f54555aaff8f0c
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Nov 8 19:23:20 2020 @author: alfredocu """ import numpy as np import matplotlib.pyplot as plt from matplotlib.colors import ListedColormap from sklearn.model_selection import train_test_split from sklearn.preprocessing import StandardScaler from sklear...
32.70297
105
0.64063
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Nov 8 19:23:20 2020 @author: alfredocu """ import numpy as np import matplotlib.pyplot as plt from matplotlib.colors import ListedColormap from sklearn.model_selection import train_test_split from sklearn.preprocessing import StandardScaler from sklear...
0
0
0
0
0
0
0
0
0
fafef9b84f9edcbac5e06dbb9431d7c3761ad75b
7,928
py
Python
im_lib_test.py
erinmrichards/SG_enrichment
4d3f1baa17928c358d6fe2b598d9f74949111b27
[ "MIT" ]
1
2021-12-15T06:37:50.000Z
2021-12-15T06:37:50.000Z
im_lib_test.py
erinmrichards/SG_enrichment
4d3f1baa17928c358d6fe2b598d9f74949111b27
[ "MIT" ]
null
null
null
im_lib_test.py
erinmrichards/SG_enrichment
4d3f1baa17928c358d6fe2b598d9f74949111b27
[ "MIT" ]
1
2021-12-15T06:37:04.000Z
2021-12-15T06:37:04.000Z
import unittest #class CountObjectsTest(unittest.TestCase): #@classmethod #def setUpClass(clc): #print("\nRunning CountObjects class setUp...") #@classmethod #def tearDownClass(clc): #print("\nRunning CountObjects class tearDown...") #def setUp(self): #print("\nRunni...
33.451477
95
0.661075
import unittest import im_lib import numpy class MaskObjectTest(unittest.TestCase): @classmethod def setUpClass(clc): print("\nRunning MaskObject class setUp...") @classmethod def tearDownClass(clc): print("\nRunning MaskObject class tearDown...") def setUp(self): print(...
0
738
0
6,566
0
0
0
-17
159
64ce2f8c12afd6cf2ef40cf1b31a965c4d681989
2,354
py
Python
docs/sphinxext/flickr.py
glangsto/pyspeckit
346b24fb828d1d33c7891cdde7609723e51af34c
[ "MIT" ]
79
2015-03-03T15:06:20.000Z
2022-03-27T21:29:47.000Z
docs/sphinxext/flickr.py
glangsto/pyspeckit
346b24fb828d1d33c7891cdde7609723e51af34c
[ "MIT" ]
240
2015-01-04T02:59:12.000Z
2021-11-13T15:11:14.000Z
docs/sphinxext/flickr.py
glangsto/pyspeckit
346b24fb828d1d33c7891cdde7609723e51af34c
[ "MIT" ]
68
2015-03-02T12:23:12.000Z
2022-02-28T10:26:36.000Z
from docutils import nodes from docutils.parsers.rst import directives CODE = """\ <object width="%(width)i" height="%(height)i"> <param name="flashvars" value="offsite=true&lang=en-us&page_show_url=%2Fphotos%2F75341362%40N04%2Fsets%2F72157629059614751%2Fshow%2F&page_show_back_url=%2Fphotos%2F75341362%40N04%2Fsets%2...
44.415094
403
0.694987
from docutils import nodes from docutils.parsers.rst import directives CODE = """\ <object width="%(width)i" height="%(height)i"> <param name="flashvars" value="offsite=true&lang=en-us&page_show_url=%2Fphotos%2F75341362%40N04%2Fsets%2F72157629059614751%2Fshow%2F&page_show_back_url=%2Fphotos%2F75341362%40N04%2Fsets%2...
0
0
0
70
0
140
0
19
69
f44b1e2a33c35dd2dd5bfdaad7507c40defa447e
3,035
py
Python
holotalk/holotalk/load_and_train.py
whitejetyeh/Insight
aa219c2ddf9fae7241ca5db5fabfa0a65f07c9e3
[ "MIT" ]
1
2019-10-06T01:58:03.000Z
2019-10-06T01:58:03.000Z
holotalk/holotalk/load_and_train.py
whitejetyeh/Insight
aa219c2ddf9fae7241ca5db5fabfa0a65f07c9e3
[ "MIT" ]
7
2020-01-28T23:02:33.000Z
2022-02-10T00:24:25.000Z
holotalk/holotalk/load_and_train.py
whitejetyeh/Insight
aa219c2ddf9fae7241ca5db5fabfa0a65f07c9e3
[ "MIT" ]
null
null
null
''' Convolutional AutoEncoder This code serves to load a pretrained model and to train for more epochs with selected data. ''' import LRsymmetrizer as sym import tensorflow as tf import tensorflow.keras as keras from keras.models import load_model import os, time import numpy as np import matplotlib.pyplot as plt prin...
34.488636
101
0.714003
''' Convolutional AutoEncoder This code serves to load a pretrained model and to train for more epochs with selected data. ''' import LRsymmetrizer as sym import tensorflow as tf import tensorflow.keras as keras from keras.preprocessing import image from keras.models import Model, model_from_json, load_model import os,...
0
0
0
0
0
0
0
40
22
d230c015a45584478b5c41ae1f44af579f185abb
1,150
py
Python
chapter9.py
rpmva/Python1
c642070eea506dfce3863d5534a616668dcf5575
[ "MIT" ]
null
null
null
chapter9.py
rpmva/Python1
c642070eea506dfce3863d5534a616668dcf5575
[ "MIT" ]
null
null
null
chapter9.py
rpmva/Python1
c642070eea506dfce3863d5534a616668dcf5575
[ "MIT" ]
null
null
null
#Chapter 9 notes #1 #states = {} <- dictionary #states = {"Virginia": "Richmond", "Maryland": "Annapolis", "New York": "Albany"} #print states . . . {'Maryland': 'Annapolis', 'New York': 'Albany', 'Virginia': 'Richmond'} #states['Oregon'] = 'Salem' <- adding something to the dictionary #states.pop(Oregon) = Salem; Stat...
33.823529
91
0.606087
#Chapter 9 notes #1 #states = {} <- dictionary #states = {"Virginia": "Richmond", "Maryland": "Annapolis", "New York": "Albany"} #print states . . . {'Maryland': 'Annapolis', 'New York': 'Albany', 'Virginia': 'Richmond'} #states['Oregon'] = 'Salem' <- adding something to the dictionary #states.pop(Oregon) = Salem; Stat...
0
0
0
0
0
0
0
0
0
c54ec92bd4c8d9781606b671fe08eb9276fe1ad3
2,670
py
Python
Neural-Networks-main/AlgoNet/core/AlgoNet/RNN.py
eugenennamdi/Machine-Learning
39fee05a857b7bc9ffdd8a1c228719c0a32cbbaf
[ "Apache-2.0" ]
23
2021-12-30T05:11:55.000Z
2022-02-18T18:01:50.000Z
Neural-Networks-main/AlgoNet/core/AlgoNet/RNN.py
eugenennamdi/Machine-Learning
39fee05a857b7bc9ffdd8a1c228719c0a32cbbaf
[ "Apache-2.0" ]
3
2022-01-02T00:35:46.000Z
2022-01-18T05:03:45.000Z
Neural-Networks-main/AlgoNet/core/AlgoNet/RNN.py
eugenennamdi/Machine-Learning
39fee05a857b7bc9ffdd8a1c228719c0a32cbbaf
[ "Apache-2.0" ]
6
2021-12-27T21:10:46.000Z
2022-02-18T12:33:58.000Z
# Copyright Fortior Blockchain, LLLP 2021 # Imports import numpy as np from pandas_datareader import data ALGO = data.DataReader("ALGO-USD", start='2019-9-18', end='2021-9-14', data_source='yahoo') import matplotlib.pyplot as plt import seaborn as...
28.404255
88
0.724719
# Copyright Fortior Blockchain, LLLP 2021 # Imports import numpy as np import pandas as pd from pandas_datareader import data ALGO = data.DataReader("ALGO-USD", start='2019-9-18', end='2021-9-14', data_source='yahoo') import matplotlib.pyplot as p...
0
0
0
0
0
0
0
-2
22
81a350830da5c371c8a29cec49f4b1f6e74c5ea1
1,562
py
Python
.github/workflows/link-check/to_sheets.py
lucascr91/mais
a137328d683a0252a6159e9135f1326157cd018f
[ "MIT" ]
290
2020-10-14T17:18:21.000Z
2022-03-31T20:56:07.000Z
.github/workflows/link-check/to_sheets.py
lucascr91/mais
a137328d683a0252a6159e9135f1326157cd018f
[ "MIT" ]
756
2020-10-09T16:37:57.000Z
2022-03-31T18:28:18.000Z
.github/workflows/link-check/to_sheets.py
lucascr91/mais
a137328d683a0252a6159e9135f1326157cd018f
[ "MIT" ]
81
2020-10-15T18:21:42.000Z
2022-03-31T03:25:13.000Z
import os if __name__ == "__main__": spreadsheet_id = os.environ["SPREADSHEET_ID"] range_name = os.environ["RANGE_NAME"] credential = os.environ["GDOCS_SERVICE_ACCOUNT"] credential = decode_credential(credential) scopes = ["https://www.googleapis.com/auth/spreadsheets"] write_sheet(spre...
25.193548
72
0.685019
import base64 import csv import json import os from google.oauth2 import service_account from googleapiclient.discovery import build def encode_credential(credential): credential = json.dumps(credential) credential = credential.encode("utf-8") credential = base64.b64encode(credential) return credenti...
0
0
0
0
0
982
0
13
203
306a7fa2f72c22b56a0c8d838d7c1fce1e6a0de3
364
py
Python
listings/migrations/0002_auto_20190825_0220.py
matheus-francisco/air-ap-django
a6166891b4c9de45f22b697fcb2449773b3e60e3
[ "MIT" ]
1
2020-06-28T20:23:49.000Z
2020-06-28T20:23:49.000Z
listings/migrations/0002_auto_20190825_0220.py
matheusfrancisco/air-ap-django
a6166891b4c9de45f22b697fcb2449773b3e60e3
[ "MIT" ]
null
null
null
listings/migrations/0002_auto_20190825_0220.py
matheusfrancisco/air-ap-django
a6166891b4c9de45f22b697fcb2449773b3e60e3
[ "MIT" ]
1
2019-11-25T12:33:48.000Z
2019-11-25T12:33:48.000Z
# Generated by Django 2.2.4 on 2019-08-25 02:20
19.157895
47
0.585165
# Generated by Django 2.2.4 on 2019-08-25 02:20 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('listings', '0001_initial'), ] operations = [ migrations.RenameField( model_name='listing', old_name='discription', ...
0
0
0
258
0
0
0
11
46
8a4e816e955e4a2a9f0d76ed1d455f2c174d1e7d
612
py
Python
tensorflow_data_validation/types.py
AndreaPi/data-validation
e62ee101a9cab32406ea204fe87186400222ce5f
[ "Apache-2.0" ]
null
null
null
tensorflow_data_validation/types.py
AndreaPi/data-validation
e62ee101a9cab32406ea204fe87186400222ce5f
[ "Apache-2.0" ]
null
null
null
tensorflow_data_validation/types.py
AndreaPi/data-validation
e62ee101a9cab32406ea204fe87186400222ce5f
[ "Apache-2.0" ]
null
null
null
"""Types.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import apache_beam as beam import numpy as np from tensorflow_data_validation.types_compat import Dict, Text, Union FeatureName = Union[bytes, Text] # Feature type enum value. FeatureNameStati...
24.48
75
0.797386
"""Types.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import apache_beam as beam import numpy as np from tensorflow_data_validation.types_compat import Dict, Text, Union FeatureName = Union[bytes, Text] # Feature type enum value. FeatureNameStati...
0
0
0
0
0
0
0
0
0
ed11f487d06fd4e77a331494e8f8f65f4672ec8e
102
py
Python
src/gluonts/model/canonical/__init__.py
lovvge/gluon-ts
284376138f41968bec0a4cb05b274c8ee259493a
[ "Apache-2.0" ]
2
2019-09-05T05:39:03.000Z
2020-11-08T17:07:04.000Z
src/gluonts/model/canonical/__init__.py
lovvge/gluon-ts
284376138f41968bec0a4cb05b274c8ee259493a
[ "Apache-2.0" ]
null
null
null
src/gluonts/model/canonical/__init__.py
lovvge/gluon-ts
284376138f41968bec0a4cb05b274c8ee259493a
[ "Apache-2.0" ]
null
null
null
# Relative imports from ._estimator import CanonicalRNNEstimator __all__ = ["CanonicalRNNEstimator"]
20.4
45
0.823529
# Relative imports from ._estimator import CanonicalRNNEstimator __all__ = ["CanonicalRNNEstimator"]
0
0
0
0
0
0
0
0
0
7d8b840ab2090979f45f6a513482eed31f48f46a
3,712
py
Python
lab6/transition.py
Ovhagen/EDAN20
403b72c332baf23b48d6f698fa0e9d06e66e5fa0
[ "MIT" ]
null
null
null
lab6/transition.py
Ovhagen/EDAN20
403b72c332baf23b48d6f698fa0e9d06e66e5fa0
[ "MIT" ]
null
null
null
lab6/transition.py
Ovhagen/EDAN20
403b72c332baf23b48d6f698fa0e9d06e66e5fa0
[ "MIT" ]
null
null
null
""" Transitions for Nivre's parser The parser state consists of the stack, the queue, and the partial graph The partial graph is represented as a dictionary """ __author__ = "Pierre Nugues" def shift(stack, queue, graph): """ Shift the first word in the queue onto the stack :param stack: :param queue...
23.643312
87
0.601832
""" Transitions for Nivre's parser The parser state consists of the stack, the queue, and the partial graph The partial graph is represented as a dictionary """ __author__ = "Pierre Nugues" import conll import dparser def shift(stack, queue, graph): """ Shift the first word in the queue onto the stack :...
0
0
0
0
0
0
0
-16
45
2ce8017db10da0b41d63c5082e08fa66a922bd17
7,430
py
Python
models/generator.py
affromero/SMILE
931510d69b2e33f2fe633563833c50a7408f89ef
[ "MIT" ]
20
2020-10-07T15:44:38.000Z
2022-02-25T10:08:22.000Z
models/generator.py
affromero/SMILE
931510d69b2e33f2fe633563833c50a7408f89ef
[ "MIT" ]
1
2022-03-11T03:19:14.000Z
2022-03-11T03:53:59.000Z
models/generator.py
affromero/SMILE
931510d69b2e33f2fe633563833c50a7408f89ef
[ "MIT" ]
1
2021-11-03T11:15:52.000Z
2021-11-03T11:15:52.000Z
import torch.nn as nn # ----------------- # # --- GENERATOR --- # # ----------------- #
35.89372
79
0.501077
import torch import torch.nn as nn import torch.nn.functional as F from models.utils import print_debug from misc.utils import PRINT from models.utils import weights_init from misc.normalization import AdainResBlk, ResBlk, MODResBlk, Conv2DMod import numpy as np class HighPass(nn.Module): def __init__(self, w_hpf...
0
0
0
7,053
0
0
0
87
199
15eec461ea96bfe7d739c83d4c884c5533b931dd
829
py
Python
Hard/023_Merge_k_Sorted_Lists.py
ChenKuanSun/LeetCode
f346ad5c75d81907fa05cfc5dd3fe6bfd45c66bd
[ "MIT" ]
null
null
null
Hard/023_Merge_k_Sorted_Lists.py
ChenKuanSun/LeetCode
f346ad5c75d81907fa05cfc5dd3fe6bfd45c66bd
[ "MIT" ]
null
null
null
Hard/023_Merge_k_Sorted_Lists.py
ChenKuanSun/LeetCode
f346ad5c75d81907fa05cfc5dd3fe6bfd45c66bd
[ "MIT" ]
null
null
null
""" Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. Example: Input: [ 1->4->5, 1->3->4, 2->6 ] Output: 1->1->2->3->4->4->5->6 """ # Definition for singly-linked list. # class ListNode(object): # def __init__(self, x): # self.val = x # self....
23.027778
98
0.553679
""" Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. Example: Input: [ 1->4->5, 1->3->4, 2->6 ] Output: 1->1->2->3->4->4->5->6 """ # Definition for singly-linked list. # class ListNode(object): # def __init__(self, x): # self.val = x # self....
0
0
0
444
0
0
0
10
44
75de98668e46d651a1485c4c3bae5beb8927e941
86
py
Python
app/constants/auth.py
1995chen/jingdong_financial
0d3542fc91c28cf051d57775ab529f789fbdbba1
[ "MIT" ]
1
2022-03-09T13:05:14.000Z
2022-03-09T13:05:14.000Z
app/constants/auth.py
1995chen/jingdong_financial
0d3542fc91c28cf051d57775ab529f789fbdbba1
[ "MIT" ]
null
null
null
app/constants/auth.py
1995chen/jingdong_financial
0d3542fc91c28cf051d57775ab529f789fbdbba1
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*-
12.285714
23
0.523256
# -*- coding: utf-8 -*- class Role(object): User = "User" Leader = "Leader"
0
0
0
38
0
0
0
0
23
bed9e268ecc5e655935ec0e5b75b154e88ee1c5f
21,915
py
Python
addons/cats-blender-plugin-0-19-0/tools/decimation.py
trisadmeslek/V-Sekai-Blender-tools
0d8747387c58584b50c69c61ba50a881319114f8
[ "MIT" ]
725
2020-06-30T00:12:35.000Z
2021-11-07T03:10:44.000Z
addons/cats-blender-plugin-0-19-0/tools/decimation.py
trisadmeslek/V-Sekai-Blender-tools
0d8747387c58584b50c69c61ba50a881319114f8
[ "MIT" ]
144
2017-12-27T20:57:07.000Z
2020-06-27T13:58:40.000Z
addons/cats-blender-plugin-0-19-0/tools/decimation.py
trisadmeslek/V-Sekai-Blender-tools
0d8747387c58584b50c69c61ba50a881319114f8
[ "MIT" ]
106
2020-07-04T02:56:27.000Z
2021-11-07T08:54:11.000Z
# MIT License # Copyright (c) 2018 Hotox # 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,...
39.344704
137
0.561488
# MIT License # Copyright (c) 2018 Hotox # 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
20,309
0
0
0
0
0
24
341
849a817d06232c4bec9f6d426a3bc57fb8c508bf
506
py
Python
Python/Python For Absolute Beginner/83 Akhbaar Padhke Sunaao.py
omkarsutar1255/Python-Data
169d0c54b23d9dd5a7f1aea41ab385121c3b3c63
[ "CC-BY-3.0" ]
null
null
null
Python/Python For Absolute Beginner/83 Akhbaar Padhke Sunaao.py
omkarsutar1255/Python-Data
169d0c54b23d9dd5a7f1aea41ab385121c3b3c63
[ "CC-BY-3.0" ]
null
null
null
Python/Python For Absolute Beginner/83 Akhbaar Padhke Sunaao.py
omkarsutar1255/Python-Data
169d0c54b23d9dd5a7f1aea41ab385121c3b3c63
[ "CC-BY-3.0" ]
null
null
null
if __name__ == '__main__': import requests import json url = ('http://newsapi.org/v2/top-headlines?' 'country=us&' 'apiKey=9b8a6a83887b4da4ace3d23b91e57e89') response = requests.get(url) text = response.text my_json = json.loads(text) for ...
24.095238
56
0.586957
def speak(str): from win32com.client import Dispatch speak = Dispatch("SAPI.SpVoice") speak.speak(str) if __name__ == '__main__': import requests import json url = ('http://newsapi.org/v2/top-headlines?' 'country=us&' 'apiKey=9b8a6a83887b4da4ace3d23b91e...
0
0
0
0
0
95
0
0
22
d9a7cf17041642c4a49b7983da66853b2340b120
442
py
Python
myfamily/fabfile.py
fortyMiles/my-family
d827b7fa36753726318fcf9e55d0b482fdf8323d
[ "BSD-3-Clause" ]
null
null
null
myfamily/fabfile.py
fortyMiles/my-family
d827b7fa36753726318fcf9e55d0b482fdf8323d
[ "BSD-3-Clause" ]
null
null
null
myfamily/fabfile.py
fortyMiles/my-family
d827b7fa36753726318fcf9e55d0b482fdf8323d
[ "BSD-3-Clause" ]
null
null
null
# -*- coding:utf-8 -*- from __future__ import with_statement import os import argparse from fabric.contrib.console import confirm # add fabric function here if __name__ == '__main__': parser = argparse.ArgumentParser() # add argument to parser # parser.add_argument() args = parser.parse_args() #...
21.047619
44
0.701357
# -*- coding:utf-8 -*- from __future__ import with_statement import os import argparse from fabric.api import * from fabric.contrib.console import confirm # add fabric function here if __name__ == '__main__': parser = argparse.ArgumentParser() # add argument to parser # parser.add_argument() args =...
0
0
0
0
0
0
0
3
23
506f8223c1e30603a1d1050fa932b28f3f3fc98f
3,143
py
Python
api/v1/login.py
muslax/aces-api
9d56f68277c284bd6985e13dca7f993e9db1b70f
[ "MIT" ]
null
null
null
api/v1/login.py
muslax/aces-api
9d56f68277c284bd6985e13dca7f993e9db1b70f
[ "MIT" ]
1
2020-08-17T04:17:58.000Z
2020-08-17T04:17:58.000Z
api/v1/login.py
muslax/aces-api
9d56f68277c284bd6985e13dca7f993e9db1b70f
[ "MIT" ]
2
2020-08-16T11:59:34.000Z
2020-08-26T05:35:07.000Z
from fastapi import APIRouter # oauth2_scheme = OAuth2PasswordBearer(tokenUrl="/v1/token") router = APIRouter() # def recover_password(email: str, db: Session = Depends(deps.get_db)) -> Any:
34.538462
92
0.716513
import logging from datetime import datetime, timedelta from typing import Any, List, Optional from fastapi import APIRouter, Depends, HTTPException, Security, status from fastapi.security import OAuth2PasswordRequestForm from jose import JWTError, jwt from passlib.context import CryptContext from pydantic import Base...
0
1,990
0
0
0
0
0
508
445
a2c8f9e94ead28760b5841319c22ba2cead30c83
410
py
Python
Python-programs/newlist.py
manavbansalcoder/Hacktoberfest2021
ba20770f070bf9c0b02a8fe2bcbeb72cd559e428
[ "CC0-1.0" ]
null
null
null
Python-programs/newlist.py
manavbansalcoder/Hacktoberfest2021
ba20770f070bf9c0b02a8fe2bcbeb72cd559e428
[ "CC0-1.0" ]
null
null
null
Python-programs/newlist.py
manavbansalcoder/Hacktoberfest2021
ba20770f070bf9c0b02a8fe2bcbeb72cd559e428
[ "CC0-1.0" ]
null
null
null
t=int(input()) while(t>0): t=t-1 n=int(input()) a=input().split() for i in range(n): a[i]=int(a[i]) b=[0] c=0 d=0 for i in range(-1,-n,-1): if(a[i]==a[i-1]): c=c+0 d=d+1 else: c=c+1+d d=0 b.appen...
17.083333
35
0.339024
t=int(input()) while(t>0): t=t-1 n=int(input()) a=input().split() for i in range(n): a[i]=int(a[i]) b=[0] c=0 d=0 for i in range(-1,-n,-1): if(a[i]==a[i-1]): c=c+0 d=d+1 else: c=c+1+d d=0 b.appen...
0
0
0
0
0
0
0
0
0
230f57029f796a408a23ea15dd232add284f77e6
436
py
Python
txweb/log.py
devdave/txWeb
e447fbefd16134cb2f83323c04c20c41638d7da3
[ "MIT" ]
null
null
null
txweb/log.py
devdave/txWeb
e447fbefd16134cb2f83323c04c20c41638d7da3
[ "MIT" ]
4
2020-11-03T19:59:05.000Z
2021-06-02T03:22:25.000Z
txweb/log.py
devdave/txWeb
e447fbefd16134cb2f83323c04c20c41638d7da3
[ "MIT" ]
null
null
null
""" Currently just a stupid bridge between twisted.logger and user applications """ # from logging import getLogger as stdlib_getLogger, Logger from twisted import logger def getLogger(namespace: str = None) -> logger.Logger: """ Just an adapted to mimic python's logging getLogger to twisted's Logger...
27.25
81
0.713303
""" Currently just a stupid bridge between twisted.logger and user applications """ # from logging import getLogger as stdlib_getLogger, Logger from twisted import logger def getLogger(namespace: str = None) -> logger.Logger: """ Just an adapted to mimic python's logging getLogger to twisted's Logger...
0
0
0
0
0
0
0
0
0
121d341ada0477f11c766f5d0de33388ccd812dc
2,168
bzl
Python
avionics/firmware/monitors/build_rules.bzl
leozz37/makani
c94d5c2b600b98002f932e80a313a06b9285cc1b
[ "Apache-2.0" ]
1,178
2020-09-10T17:15:42.000Z
2022-03-31T14:59:35.000Z
avionics/firmware/monitors/build_rules.bzl
leozz37/makani
c94d5c2b600b98002f932e80a313a06b9285cc1b
[ "Apache-2.0" ]
1
2020-05-22T05:22:35.000Z
2020-05-22T05:22:35.000Z
avionics/firmware/monitors/build_rules.bzl
leozz37/makani
c94d5c2b600b98002f932e80a313a06b9285cc1b
[ "Apache-2.0" ]
107
2020-09-10T17:29:30.000Z
2022-03-18T09:00:14.000Z
"""This module contains monitor genrules.""" load("//lib/bazel:py_rules.bzl", "py_binary")
31.882353
72
0.585793
"""This module contains monitor genrules.""" load("//lib/bazel:py_rules.bzl", "py_binary") def _monitor_genrule(monitor_name, name, deps, **kwargs): py_binary( name = "generate_" + name, srcs = [ "//avionics/firmware/monitors:generate_" + monitor_name + "_monitor.py", ...
0
0
0
0
0
1,823
0
0
253
32adb0a7e29e0f470078518502fb878106ff769d
2,240
py
Python
gui/src/core/seriation_test.py
retallickj/qca-embedding
96fd37a3ecd4beacb04ad1cb193d65d0b48ceab2
[ "MIT" ]
1
2017-11-02T20:38:20.000Z
2017-11-02T20:38:20.000Z
gui/src/core/seriation_test.py
retallickj/qca-embedding
96fd37a3ecd4beacb04ad1cb193d65d0b48ceab2
[ "MIT" ]
null
null
null
gui/src/core/seriation_test.py
retallickj/qca-embedding
96fd37a3ecd4beacb04ad1cb193d65d0b48ceab2
[ "MIT" ]
null
null
null
#!/usr/bin/env python from parse_qca import parse_qca_file from auxil import qca_to_coef, hash_problem import sys from random import shuffle import numpy as np # #class QCACell(QtGui.QWidget): # ''' ''' # # def __init__(self, parent=None): # super(QCACell, self).__init__(parent) # #cla...
22.857143
76
0.506696
#!/usr/bin/env python from PyQt4 import QtGui from parse_qca import parse_qca_file from auxil import qca_to_coef, hash_problem import sys from pprint import pprint from random import shuffle import numpy as np # #class QCACell(QtGui.QWidget): # ''' ''' # # def __init__(self, parent=None): #...
0
0
0
0
0
0
0
6
48
911e4732aec58a2456526ebb044f220524aceebf
1,925
py
Python
demo/seq_design_plots.py
AndrewKirby2/data_synthesis
656858137a348fd5dcb57bcd04bdfece2b9eac1b
[ "MIT" ]
null
null
null
demo/seq_design_plots.py
AndrewKirby2/data_synthesis
656858137a348fd5dcb57bcd04bdfece2b9eac1b
[ "MIT" ]
null
null
null
demo/seq_design_plots.py
AndrewKirby2/data_synthesis
656858137a348fd5dcb57bcd04bdfece2b9eac1b
[ "MIT" ]
null
null
null
import numpy as np from matplotlib import pyplot as plt from sklearn.gaussian_process import GaussianProcessRegressor from sklearn.gaussian_process.kernels import RBF np.random.seed(1) # First the noiseless case X = np.array([3.]) # Observations y = np.array([0.]) # Mesh the input space for evaluations of the re...
29.166667
79
0.698182
import numpy as np from matplotlib import pyplot as plt from sklearn.gaussian_process import GaussianProcessRegressor from sklearn.gaussian_process.kernels import RBF, ConstantKernel as C np.random.seed(1) # First the noiseless case X = np.array([3.]) # Observations y = np.array([0.]) # Mesh the input space for ...
0
0
0
0
0
0
0
21
0
0a6cb1ba2d56605ef2f3adab8fa75752343b94c9
190
py
Python
tethys_datasets/views.py
CI-WATER/django-tethys_datasets
504963a720693931a1fa1a899d5492548672216f
[ "BSD-2-Clause" ]
null
null
null
tethys_datasets/views.py
CI-WATER/django-tethys_datasets
504963a720693931a1fa1a899d5492548672216f
[ "BSD-2-Clause" ]
null
null
null
tethys_datasets/views.py
CI-WATER/django-tethys_datasets
504963a720693931a1fa1a899d5492548672216f
[ "BSD-2-Clause" ]
null
null
null
from django.shortcuts import render def home(request): """ Home page for Tethys Datasets """ context = {} return render(request, 'tethys_datasets/home.html', context)
17.272727
64
0.663158
from django.shortcuts import render def home(request): """ Home page for Tethys Datasets """ context = {} return render(request, 'tethys_datasets/home.html', context)
0
0
0
0
0
0
0
0
0
70ac291a2f8d8d101ef79b35618e90e52733bfb2
294
py
Python
molsysmt/tests/basic/convert/test_convert_from_Molsysmt_MolSys.py
uibcdf/MolModMTs
4f6b6f671a9fa3e73008d1e9c48686d5f20a6573
[ "MIT" ]
null
null
null
molsysmt/tests/basic/convert/test_convert_from_Molsysmt_MolSys.py
uibcdf/MolModMTs
4f6b6f671a9fa3e73008d1e9c48686d5f20a6573
[ "MIT" ]
null
null
null
molsysmt/tests/basic/convert/test_convert_from_Molsysmt_MolSys.py
uibcdf/MolModMTs
4f6b6f671a9fa3e73008d1e9c48686d5f20a6573
[ "MIT" ]
null
null
null
""" Unit and regression test for the convert module of the molsysmt package. """ # Import package, test suite, and other packages as needed # Whole systems (selection='all' and structure_indices='all') # Selection ## Multiple outputs
15.473684
72
0.744898
""" Unit and regression test for the convert module of the molsysmt package. """ # Import package, test suite, and other packages as needed import molsysmt as msm import numpy as np import os # Whole systems (selection='all' and structure_indices='all') # Selection ## Multiple outputs
0
0
0
0
0
0
0
-14
66
5b906ad62973b7dacfdbfd71c1137a6a0753f356
2,158
py
Python
src/devil/fg_size_scoring/__init__.py
MichiganCOG/devil
296115cd5f4952c7dc65bbcaaf2d1d5c55ef5d35
[ "MIT" ]
8
2021-05-13T02:37:16.000Z
2021-09-22T09:28:52.000Z
src/devil/fg_size_scoring/__init__.py
MichiganCOG/devil
296115cd5f4952c7dc65bbcaaf2d1d5c55ef5d35
[ "MIT" ]
3
2021-07-30T11:55:56.000Z
2022-03-24T04:33:46.000Z
src/devil/fg_size_scoring/__init__.py
MichiganCOG/devil
296115cd5f4952c7dc65bbcaaf2d1d5c55ef5d35
[ "MIT" ]
1
2021-06-10T08:43:12.000Z
2021-06-10T08:43:12.000Z
from .. import get_spaced_index_list
44.040816
118
0.721501
import numpy as np from .. import get_spaced_index_list from ..features import BinaryForegroundMaskComputer class ForegroundSizeScorer(object): """Scores the size of the foreground as a percentage of the average mask size over the entire frame area.""" def score_foreground_size(self, fg_masks): """S...
0
0
0
2,001
0
0
0
27
90
dd98247b363ebc4645dbf8fb294c1db02206bf5b
21,280
py
Python
pdf_tchotchke/bookmarks/bkmk.py
lord-zo/pdf_tchotchke
deca0dfef24bb445b5f3698af968b9d23f812a09
[ "MIT" ]
null
null
null
pdf_tchotchke/bookmarks/bkmk.py
lord-zo/pdf_tchotchke
deca0dfef24bb445b5f3698af968b9d23f812a09
[ "MIT" ]
null
null
null
pdf_tchotchke/bookmarks/bkmk.py
lord-zo/pdf_tchotchke
deca0dfef24bb445b5f3698af968b9d23f812a09
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # bkmk.py # Author: Lorenzo Van Muoz # Last updated Dec 31, 2020 ''' A script to generate pdf bookmarks in cpdf,gs,pdftk syntaxes This script uses regular expressions to identify relevant bookmark information and to typeset the syntaxes. It also supports conversion between the different suppor...
39.117647
156
0.595348
#!/usr/bin/env python3 # bkmk.py # Author: Lorenzo Van Muñoz # Last updated Dec 31, 2020 ''' A script to generate pdf bookmarks in cpdf,gs,pdftk syntaxes This script uses regular expressions to identify relevant bookmark information and to typeset the syntaxes. It also supports conversion between the different suppo...
12
0
0
0
0
0
0
0
0
680c4ee5f251b39fc71e051c06aef3322766fffb
290
py
Python
jobboardscraper/organizations/urls.py
dillonko/jobboardscraper
21d662c3bad2e054c3b43f648e5b276339ee1d32
[ "BSD-3-Clause" ]
null
null
null
jobboardscraper/organizations/urls.py
dillonko/jobboardscraper
21d662c3bad2e054c3b43f648e5b276339ee1d32
[ "BSD-3-Clause" ]
5
2020-12-09T20:45:28.000Z
2021-12-14T10:38:50.000Z
jobboardscraper/organizations/urls.py
dillonko/jobboardscraper
21d662c3bad2e054c3b43f648e5b276339ee1d32
[ "BSD-3-Clause" ]
null
null
null
from django.conf.urls import url from .views import OrganizationDetailView, OrganizationListView urlpatterns = [ url(r'^(?P<slug>[-\w]+)/$', OrganizationDetailView.as_view(), name='organization_detail'), url(r'^$', OrganizationListView.as_view(), name='organization_list'), ]
22.307692
94
0.72069
from django.conf.urls import url from .views import OrganizationDetailView, OrganizationListView urlpatterns = [ url(r'^(?P<slug>[-\w]+)/$', OrganizationDetailView.as_view(), name='organization_detail'), url(r'^$', OrganizationListView.as_view(), name='organization_list'), ]
0
0
0
0
0
0
0
0
0
1a1bd084432375ac8dbb5ac87027b72e59cbffd4
44,156
py
Python
sktime/transformations/base.py
abdkg/sktime
889090193b28dd1b36fd97efcc29115df1393838
[ "BSD-3-Clause" ]
1
2019-12-23T16:57:14.000Z
2019-12-23T16:57:14.000Z
sktime/transformations/base.py
abdkg/sktime
889090193b28dd1b36fd97efcc29115df1393838
[ "BSD-3-Clause" ]
null
null
null
sktime/transformations/base.py
abdkg/sktime
889090193b28dd1b36fd97efcc29115df1393838
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # copyright: sktime developers, BSD-3-Clause License (see LICENSE file) """ Base class template for transformers. class name: BaseTransformer Covers all types of transformers. Type and behaviour of transformer is determined by the following tags: "scitype:transform-input" tag with valu...
41.461033
88
0.590248
# -*- coding: utf-8 -*- # copyright: sktime developers, BSD-3-Clause License (see LICENSE file) """ Base class template for transformers. class name: BaseTransformer Covers all types of transformers. Type and behaviour of transformer is determined by the following tags: "scitype:transform-input" tag with valu...
0
0
0
40,337
0
0
0
170
204
f49bd1a3037b9a0bca1909067b4ba9b73fd382ae
71
py
Python
h5Nastran/h5Nastran/h5/__init__.py
ACea15/pyNastran
5ffc37d784b52c882ea207f832bceb6b5eb0e6d4
[ "BSD-3-Clause" ]
293
2015-03-22T20:22:01.000Z
2022-03-14T20:28:24.000Z
h5Nastran/h5Nastran/h5/__init__.py
ACea15/pyNastran
5ffc37d784b52c882ea207f832bceb6b5eb0e6d4
[ "BSD-3-Clause" ]
512
2015-03-14T18:39:27.000Z
2022-03-31T16:15:43.000Z
h5Nastran/h5Nastran/h5/__init__.py
ACea15/pyNastran
5ffc37d784b52c882ea207f832bceb6b5eb0e6d4
[ "BSD-3-Clause" ]
136
2015-03-19T03:26:06.000Z
2022-03-25T22:14:54.000Z
""" The h5 module is organized like the resulting h5 file's groups. """
23.666667
63
0.71831
""" The h5 module is organized like the resulting h5 file's groups. """
0
0
0
0
0
0
0
0
0
01402bfeeeae4848a9688066569764a782a201be
1,175
py
Python
src/nodes/topk_reducer.py
PatricioIribarneCatella/TP-NBA-statistics
e5a9a67a56614c63e4761316403e8ba6181ba447
[ "MIT" ]
null
null
null
src/nodes/topk_reducer.py
PatricioIribarneCatella/TP-NBA-statistics
e5a9a67a56614c63e4761316403e8ba6181ba447
[ "MIT" ]
null
null
null
src/nodes/topk_reducer.py
PatricioIribarneCatella/TP-NBA-statistics
e5a9a67a56614c63e4761316403e8ba6181ba447
[ "MIT" ]
null
null
null
import sys import argparse from os import path sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) if __name__ == '__main__': parser = argparse.ArgumentParser( description='Top K reducer NBA', formatter_class=argparse.ArgumentDefaultsHelpFormatter) par...
22.596154
75
0.579574
import sys import json import argparse from os import path sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) from reducers.topk import TopkReducer def main(rid, num_workers, k_number, config): with open(config) as f: config_data = json.load(f) reducer = TopkReducer(rid, num_worker...
0
0
0
0
0
175
0
6
68
4b3e7dcd0f506b8199e52697e028c157cf3b54f0
8,347
py
Python
tests/fixtures/kube.py
gmarkey/k8s-snapshots
35a5125c6241f0eb35e04b69f9f6e512d718b4fb
[ "BSD-2-Clause" ]
326
2017-01-07T17:08:19.000Z
2022-03-28T05:54:51.000Z
tests/fixtures/kube.py
gmarkey/k8s-snapshots
35a5125c6241f0eb35e04b69f9f6e512d718b4fb
[ "BSD-2-Clause" ]
96
2017-01-25T15:42:35.000Z
2021-11-06T04:06:41.000Z
tests/fixtures/kube.py
gmarkey/k8s-snapshots
35a5125c6241f0eb35e04b69f9f6e512d718b4fb
[ "BSD-2-Clause" ]
66
2017-02-03T21:40:42.000Z
2021-08-15T17:27:40.000Z
from typing import Tuple, Type from unittest.mock import MagicMock, Mock import structlog import pykube from k8s_snapshots import kube _logger = structlog.get_logger(__name__) KUBE_SAFETY_CHECK_CONFIG_KEY = 'test-fixture-safety-check' KUBE_CONFIG = pykube.KubeConfig({ 'apiVersion': 'v1', 'kind': 'Config', ...
25.92236
80
0.59147
import contextlib from typing import Dict, Iterable, Optional, Tuple, List, Any, Type, Hashable, \ NamedTuple, Generator, Callable from unittest import mock from unittest.mock import MagicMock, Mock import structlog import pykube import pytest from _pytest.fixtures import FixtureRequest from k8s_snapshots import ...
0
2,938
0
1,797
0
107
0
128
294
3563ee567509c5dc8fe257ec4553884ba5a3a056
1,989
py
Python
artworks/urls.py
mnosinov/artworks_project
b6901ff83c1cd370ce1539f09b464ecb995e1ce3
[ "MIT" ]
null
null
null
artworks/urls.py
mnosinov/artworks_project
b6901ff83c1cd370ce1539f09b464ecb995e1ce3
[ "MIT" ]
null
null
null
artworks/urls.py
mnosinov/artworks_project
b6901ff83c1cd370ce1539f09b464ecb995e1ce3
[ "MIT" ]
null
null
null
from django.urls import path from .views import index, InsertSampleDataView, GenreListView, GenreDetailView, GenreUpdateView, GenreDeleteView, GenreCreateView, AuthorListView, AuthorDetailView, AuthorUpdateView, AuthorDeleteView, AuthorCreateView, ArtworkListView, ArtworkDetailView, ArtworkDeleteView, ArtworkWizard fro...
62.15625
111
0.732529
from django.urls import path from .views import index, InsertSampleDataView, \ GenreListView, GenreDetailView, GenreUpdateView, GenreDeleteView, GenreCreateView, \ AuthorListView, AuthorDetailView, AuthorUpdateView, AuthorDeleteView, AuthorCreateView, \ ArtworkListView, ArtworkDetailView, ArtworkUpdateView,...
0
0
0
0
0
0
0
43
0
72607d54fcc5eef96c2e8f2f9a7c3eb6cef41a30
59
py
Python
Chapter 01/Chap01_Example1.32.py
bpbpublications/Programming-Techniques-using-Python
49b785f37e95a3aad1d36cef51e219ac56e5e9f0
[ "MIT" ]
null
null
null
Chapter 01/Chap01_Example1.32.py
bpbpublications/Programming-Techniques-using-Python
49b785f37e95a3aad1d36cef51e219ac56e5e9f0
[ "MIT" ]
null
null
null
Chapter 01/Chap01_Example1.32.py
bpbpublications/Programming-Techniques-using-Python
49b785f37e95a3aad1d36cef51e219ac56e5e9f0
[ "MIT" ]
null
null
null
#\\ --- backslash print("I am here for the backslash\\")
19.666667
39
0.610169
#\\ --- backslash print("I am here for the backslash\\")
0
0
0
0
0
0
0
0
0
67fdb600ace0357bf7740af51ba96aa599f981ad
117
py
Python
applications/office_panel/admin.py
szypkiwonsz/Physiotherapy-Management-System
36decab47890e2f4be259c8796f47324ffad28fe
[ "MIT" ]
null
null
null
applications/office_panel/admin.py
szypkiwonsz/Physiotherapy-Management-System
36decab47890e2f4be259c8796f47324ffad28fe
[ "MIT" ]
8
2020-08-17T14:36:02.000Z
2022-03-12T00:33:50.000Z
applications/office_panel/admin.py
szypkiwonsz/Physiotherapy-Management-System
36decab47890e2f4be259c8796f47324ffad28fe
[ "MIT" ]
null
null
null
from django.contrib import admin from applications.office_panel.models import Patient admin.site.register(Patient)
19.5
52
0.846154
from django.contrib import admin from applications.office_panel.models import Patient admin.site.register(Patient)
0
0
0
0
0
0
0
0
0
77cfe83f9640f9085b301da94a09ca6496e4c640
716
py
Python
shellexample.py
mpentler/edinbustrack
18d08052a95907cca117cb6367da45ef64153e38
[ "MIT" ]
1
2017-12-07T18:38:30.000Z
2017-12-07T18:38:30.000Z
shellexample.py
mpentler/edinbustrack
18d08052a95907cca117cb6367da45ef64153e38
[ "MIT" ]
4
2017-12-07T15:15:09.000Z
2020-04-26T21:34:41.000Z
shellexample.py
mpentler/edinbustrack
18d08052a95907cca117cb6367da45ef64153e38
[ "MIT" ]
null
null
null
# Edinburgh bus tracker - simple example output to a shell # (c) Mark Pentler 2017 import os from time import sleep # setup our variables first. stop id and url are definable in case they change them stop_id = "36232626" # grabbed from the mybustracker website stop_name = get_stop_name(stop_id) while True: services ...
28.64
83
0.684358
# Edinburgh bus tracker - simple example output to a shell # (c) Mark Pentler 2017 from edinbustrack import * import os from time import sleep # setup our variables first. stop id and url are definable in case they change them stop_id = "36232626" # grabbed from the mybustracker website stop_name = get_stop_name(stop...
0
0
0
0
0
0
0
5
23
80f1eb9c3a8de8272b6f44d9585bc600082a6618
46
py
Python
pySPACE/tests/unittests/nodes/feature_generation/__init__.py
pyspace/pyspace
763e62c0e7fa7cfcb19ccee1a0333c4f7e68ae62
[ "BSD-3-Clause" ]
32
2015-02-20T09:03:09.000Z
2022-02-25T22:32:52.000Z
pySPACE/tests/unittests/nodes/feature_generation/__init__.py
pyspace/pyspace
763e62c0e7fa7cfcb19ccee1a0333c4f7e68ae62
[ "BSD-3-Clause" ]
5
2015-05-18T15:08:40.000Z
2020-03-05T19:18:01.000Z
pySPACE/tests/unittests/nodes/feature_generation/__init__.py
pyspace/pyspace
763e62c0e7fa7cfcb19ccee1a0333c4f7e68ae62
[ "BSD-3-Clause" ]
18
2015-09-28T07:16:38.000Z
2021-01-20T13:52:19.000Z
""" Unittests for nodes.feature_generation"""
23
45
0.76087
""" Unittests for nodes.feature_generation"""
0
0
0
0
0
0
0
0
0
339cf5f6dac862489d3c1d5a082175cfb504a006
4,985
py
Python
darts/tests/models/filtering/test_filters.py
shaginhekvs/darts
145a30f8c9f3fb18ca33cf7b6d183da262d054c4
[ "Apache-2.0" ]
null
null
null
darts/tests/models/filtering/test_filters.py
shaginhekvs/darts
145a30f8c9f3fb18ca33cf7b6d183da262d054c4
[ "Apache-2.0" ]
null
null
null
darts/tests/models/filtering/test_filters.py
shaginhekvs/darts
145a30f8c9f3fb18ca33cf7b6d183da262d054c4
[ "Apache-2.0" ]
null
null
null
if __name__ == "__main__": KalmanFilterTestCase().test_kalman() MovingAverageTestCase().test_moving_average_univariate() MovingAverageTestCase().test_moving_average_multivariate() GaussianProcessFilterTestCase().test_gaussian_process()
36.123188
86
0.688666
import numpy as np import pandas as pd from sklearn.gaussian_process.kernels import RBF, ExpSineSquared from darts.models import GaussianProcessFilter from darts.models.filtering.moving_average import MovingAverage from darts.models.filtering.kalman_filter import KalmanFilter from darts import TimeSeries from darts.ut...
0
72
0
4,119
0
0
0
219
317
7e95928a0784cff11e16904a215d1c7c5dc13fe0
1,429
py
Python
networks/decoder.py
MrChenFeng/Project-Template
42a335c6abb710bbae6407cbb0ca461533bc12f9
[ "MIT" ]
null
null
null
networks/decoder.py
MrChenFeng/Project-Template
42a335c6abb710bbae6407cbb0ca461533bc12f9
[ "MIT" ]
null
null
null
networks/decoder.py
MrChenFeng/Project-Template
42a335c6abb710bbae6407cbb0ca461533bc12f9
[ "MIT" ]
null
null
null
import torch.nn as nn
34.02381
68
0.568929
import torch.nn as nn from .base_model import Up_Conv_Block class Decoder(nn.Module): """ Args: N_p (int): The sum of the poses N_z (int): The dimensions of the noise """ def __init__(self, h, w, p_dim=320, c_dim=320): super(Decoder, self).__init__() Fconv_layers = [ ...
0
0
0
1,345
0
0
0
16
45
9fb7f93ba058e57f23e93d22a758c61b872072a4
4,653
py
Python
sparse_operation_kit/documents/tutorials/DLRM/dataset.py
aalbersk/DeepRec
f673a950780959b44dcda99398880a1d883ab338
[ "Apache-2.0" ]
292
2021-12-24T03:24:33.000Z
2022-03-31T15:41:05.000Z
sparse_operation_kit/documents/tutorials/DLRM/dataset.py
aalbersk/DeepRec
f673a950780959b44dcda99398880a1d883ab338
[ "Apache-2.0" ]
72
2021-10-09T04:59:09.000Z
2022-03-31T11:27:54.000Z
sparse_operation_kit/documents/tutorials/DLRM/dataset.py
aalbersk/DeepRec
f673a950780959b44dcda99398880a1d883ab338
[ "Apache-2.0" ]
75
2021-12-24T04:48:21.000Z
2022-03-29T10:13:39.000Z
""" Copyright (c) 2021, NVIDIA 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 ...
39.769231
110
0.602622
""" Copyright (c) 2021, NVIDIA 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
1,138
0
2,119
0
0
0
4
67
a2747b2142f626061b57825c6ac20316d827f02b
7,416
py
Python
amromics/libs/element_finder.py
hoangnguyen177/amromics
18f8c130ead373edd9c9380aade9edda31157682
[ "MIT" ]
null
null
null
amromics/libs/element_finder.py
hoangnguyen177/amromics
18f8c130ead373edd9c9380aade9edda31157682
[ "MIT" ]
7
2021-06-04T01:21:01.000Z
2022-01-08T22:02:07.000Z
amromics/libs/element_finder.py
hoangnguyen177/amromics
18f8c130ead373edd9c9380aade9edda31157682
[ "MIT" ]
1
2021-08-22T01:58:46.000Z
2021-08-22T01:58:46.000Z
# -*- coding: utf-8 -*- """ Detect genes using blast Revision history: ---------------- 2020-02-13: Amromics created """ from __future__ import division, print_function, absolute_import import os def blast(sample,db,output, identity=90, threads=1, mincov=0,dbtype='nucl'): """ Call blastn with params ...
31.828326
273
0.560005
# -*- coding: utf-8 -*- """ Detect genes using blast Revision history: ---------------- 2020-02-13: Amromics created """ from __future__ import division, print_function, absolute_import import subprocess import os, shutil, glob import re import sys import argparse def search_amr(sample,output,threads=1): db=...
0
0
0
0
0
4,295
0
-19
288
1ccd33378c88b1307460d4de28686b6d04859b05
2,894
py
Python
pyci/tests/api/publish/test_pypi.py
iliapolo/pyrelease
85784c556a0760d560378ef6edcfb32ab87048a5
[ "Apache-2.0" ]
5
2018-05-03T15:20:12.000Z
2019-12-13T20:19:47.000Z
pyci/tests/api/publish/test_pypi.py
iliapolo/pyci
85784c556a0760d560378ef6edcfb32ab87048a5
[ "Apache-2.0" ]
54
2018-04-09T06:34:50.000Z
2020-03-30T06:13:39.000Z
pyci/tests/api/publish/test_pypi.py
iliapolo/pyrelease
85784c556a0760d560378ef6edcfb32ab87048a5
[ "Apache-2.0" ]
null
null
null
############################################################################# # Copyright (c) 2018 Eli Polonsky. 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...
33.264368
93
0.670698
############################################################################# # Copyright (c) 2018 Eli Polonsky. 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...
0
0
0
0
0
1,786
0
61
272
31929ae5059f8e2d8c95294b7248d49cb625cdae
174
py
Python
hamcrest_unit_test/object_import.py
keis/PyHamcrest
4202bf32a37405057d74db21de5aa7380202263d
[ "BSD-3-Clause" ]
null
null
null
hamcrest_unit_test/object_import.py
keis/PyHamcrest
4202bf32a37405057d74db21de5aa7380202263d
[ "BSD-3-Clause" ]
null
null
null
hamcrest_unit_test/object_import.py
keis/PyHamcrest
4202bf32a37405057d74db21de5aa7380202263d
[ "BSD-3-Clause" ]
null
null
null
try: except TypeError: print 'Object class defined at ' + getattr(object, '__file__', 'NOWHERE') raise
19.333333
77
0.66092
from hamcrest import * try: class MyTest(object): pass except TypeError: print 'Object class defined at ' + getattr(object, '__file__', 'NOWHERE') raise
0
0
0
13
0
0
0
1
48
b16d3c00a2d511b39e3410fb1152d3d46b3c62b0
2,354
py
Python
code/lowestcost_search/sol_328.py
bhavinjawade/project-euler-solutions
56bf6a282730ed4b9b875fa081cf4509d9939d98
[ "Apache-2.0" ]
2
2020-07-16T08:16:32.000Z
2020-10-01T07:16:48.000Z
code/lowestcost_search/sol_328.py
Psingh12354/project-euler-solutions
56bf6a282730ed4b9b875fa081cf4509d9939d98
[ "Apache-2.0" ]
null
null
null
code/lowestcost_search/sol_328.py
Psingh12354/project-euler-solutions
56bf6a282730ed4b9b875fa081cf4509d9939d98
[ "Apache-2.0" ]
1
2021-05-07T18:06:08.000Z
2021-05-07T18:06:08.000Z
# -*- coding: utf-8 -*- ''' File name: code\lowestcost_search\sol_328.py Author: Vaidic Joshi Date created: Oct 20, 2018 Python Version: 3.x ''' # Solution to Project Euler Problem #328 :: Lowest-cost Search # # For more information see: # https://projecteuler.net/problem=328 # Problem Statement ''...
50.085106
193
0.724724
# -*- coding: utf-8 -*- ''' File name: code\lowestcost_search\sol_328.py Author: Vaidic Joshi Date created: Oct 20, 2018 Python Version: 3.x ''' # Solution to Project Euler Problem #328 :: Lowest-cost Search # # For more information see: # https://projecteuler.net/problem=328 # Problem Statement ''...
0
0
0
0
0
0
0
0
0
0a67d71e72e7c09815fb7ee305b3f9b0378d9291
16,036
py
Python
foreshadow/tests/test_transformers/test_transformers.py
adithyabsk/foreshadow
ca2e927c396ae0d61923b287d6e32e142f3ba96f
[ "Apache-2.0" ]
25
2018-07-26T17:30:31.000Z
2021-02-23T22:54:01.000Z
foreshadow/tests/test_transformers/test_transformers.py
adithyabsk/foreshadow
ca2e927c396ae0d61923b287d6e32e142f3ba96f
[ "Apache-2.0" ]
150
2018-11-02T18:09:12.000Z
2020-05-15T01:01:35.000Z
foreshadow/tests/test_transformers/test_transformers.py
adithyabsk/foreshadow
ca2e927c396ae0d61923b287d6e32e142f3ba96f
[ "Apache-2.0" ]
1
2019-02-20T22:24:00.000Z
2019-02-20T22:24:00.000Z
import pytest from foreshadow.cachemanager import CacheManager from foreshadow.utils.testing import get_file_path def test_smarttransformer_instantiate(): """Instantiating a SmartTransformer should fail""" from foreshadow.smart import SmartTransformer # Note: cannot use fixture since this is not a s...
27.888696
79
0.686268
import pytest from foreshadow.cachemanager import CacheManager from foreshadow.utils import get_transformer from foreshadow.utils.testing import get_file_path def test_transformer_keep_cols(): import pandas as pd from foreshadow.concrete import StandardScaler as CustomScaler boston_path = get_file_path(...
0
5,423
0
48
0
1,952
0
53
381
c526352dac2ffb891e1bedaea41b28e7baa046b3
543
py
Python
code/early_stopping_example.py
leetschau/h2o
f28cbb43090d181689e01084607043116b036c26
[ "MIT" ]
93
2016-12-09T11:13:04.000Z
2022-03-28T15:35:51.000Z
code/early_stopping_example.py
NivedhithaE/h2o
c077af549ab539b5f71218155f11e5fe3c25042c
[ "MIT" ]
5
2016-12-27T08:55:16.000Z
2017-12-22T09:42:36.000Z
code/early_stopping_example.py
NivedhithaE/h2o
c077af549ab539b5f71218155f11e5fe3c25042c
[ "MIT" ]
114
2016-12-10T17:03:40.000Z
2021-10-30T00:46:50.000Z
import h2o h2o.init() datasets = "https://raw.githubusercontent.com/DarrenCook/h2o/bk/datasets/" data = h2o.import_file(datasets + "iris_wheader.csv") y = "class" x = data.names x.remove(y) train, valid, test = data.split_frame([0.75,0.15]) from h2o.estimators.random_forest import H2ORandomForestEstimator m = H2ORand...
25.857143
74
0.755064
import h2o h2o.init() datasets = "https://raw.githubusercontent.com/DarrenCook/h2o/bk/datasets/" data = h2o.import_file(datasets + "iris_wheader.csv") y = "class" x = data.names x.remove(y) train, valid, test = data.split_frame([0.75,0.15]) from h2o.estimators.random_forest import H2ORandomForestEstimator m = H2ORand...
0
0
0
0
0
0
0
0
0
6cfba6f9b5b7fec6717cafee87001ad25abde3b6
2,763
py
Python
fable/fable_sources/libtbx/topological_sort.py
hickerson/bbn
17ef63ad1717553ab2abb50592f8de79228c8523
[ "MIT" ]
4
2016-09-30T15:03:39.000Z
2021-03-25T13:27:08.000Z
fable/fable_sources/libtbx/topological_sort.py
hickerson/bbn
17ef63ad1717553ab2abb50592f8de79228c8523
[ "MIT" ]
1
2018-04-18T14:41:18.000Z
2018-04-20T19:33:52.000Z
fable/fable_sources/libtbx/topological_sort.py
hickerson/bbn
17ef63ad1717553ab2abb50592f8de79228c8523
[ "MIT" ]
3
2016-04-19T18:20:30.000Z
2019-04-03T14:54:29.000Z
from __future__ import division def strongly_connected_components( successors_by_node, omit_single_node_components=True, low_infinite=2**30): """ successors_by_node = { "node1": ["successor1", "successor2"], "node2": ["successor1", "successor3"] } http://en.wikipedia.org/wiki/Tarjan%27s_strong...
28.193878
79
0.650742
from __future__ import division def stable(connections): ranks = {} for node, deps in connections: assert node not in ranks ranks[node] = len(ranks) deps_by_node = {} for node, deps in connections: deps_by_node[node] = deps for d in deps: if (d not in ranks): ranks[d] = len(ranks) ...
0
0
0
0
0
2,037
0
0
69
8043eb1b98bbf5eefa08ce46a782c4c4494192df
5,047
py
Python
rules/archive/src/fasta_utils.py
cmdoret/Acastellanii_genome_analysis
ae5111597431d1170cee0739c0fa258c97b8e65c
[ "MIT" ]
5
2019-07-29T09:41:12.000Z
2022-02-17T03:10:35.000Z
rules/archive/src/fasta_utils.py
cmdoret/Acastellanii_genome_analysis
ae5111597431d1170cee0739c0fa258c97b8e65c
[ "MIT" ]
null
null
null
rules/archive/src/fasta_utils.py
cmdoret/Acastellanii_genome_analysis
ae5111597431d1170cee0739c0fa258c97b8e65c
[ "MIT" ]
1
2019-12-05T08:19:33.000Z
2019-12-05T08:19:33.000Z
# Misc functions to operate on fasta files in the frame of the A. castellanii # genome analysis project # cmdoret, 20190502 from Bio import SeqIO import re def safe_request(fun): """ Wraps function requesting data to allow safe errors and retry. Parameters ---------- fun : python function ...
31.154321
88
0.582524
# Misc functions to operate on fasta files in the frame of the A. castellanii # genome analysis project # cmdoret, 20190502 from Bio import SeqIO from BCBio import GFF import time import re import os def safe_request(fun): """ Wraps function requesting data to allow safe errors and retry. Parameters ...
0
1,684
0
0
0
462
0
-22
139
6e5c8c9e3d2ab309657b1740c69d12fda94ee218
531
py
Python
controllers/playlistExtractor.py
M-ArafatZaman/LyricsFinder
6b9b8d65ce0a77c4083ebb276797301de62f46d1
[ "MIT" ]
null
null
null
controllers/playlistExtractor.py
M-ArafatZaman/LyricsFinder
6b9b8d65ce0a77c4083ebb276797301de62f46d1
[ "MIT" ]
null
null
null
controllers/playlistExtractor.py
M-ArafatZaman/LyricsFinder
6b9b8d65ce0a77c4083ebb276797301de62f46d1
[ "MIT" ]
null
null
null
# Static typing from typing import List def getTrackName(apiResponse) -> List[str]: ''' This function returns the string name of a single track from the reponse provided by the spotify API. https://developer.spotify.com/console/get-playlist-tracks/ ''' name = apiResponse['track']['name'] artist...
26.55
105
0.659134
# Static typing from typing import List def getTrackName(apiResponse) -> List[str]: ''' This function returns the string name of a single track from the reponse provided by the spotify API. https://developer.spotify.com/console/get-playlist-tracks/ ''' name = apiResponse['track']['name'] artist...
0
0
0
0
0
0
0
0
0
eb1762b6c5acd0f18415f1bcea184e7163ca6281
2,120
py
Python
plugins/butia/pybot/drivers/ax.py
RodPy/Turtlebots.activity
f885d7d2e5d710c01294ae60da995dfb0eb36b21
[ "MIT" ]
null
null
null
plugins/butia/pybot/drivers/ax.py
RodPy/Turtlebots.activity
f885d7d2e5d710c01294ae60da995dfb0eb36b21
[ "MIT" ]
null
null
null
plugins/butia/pybot/drivers/ax.py
RodPy/Turtlebots.activity
f885d7d2e5d710c01294ae60da995dfb0eb36b21
[ "MIT" ]
1
2020-06-17T15:44:16.000Z
2020-06-17T15:44:16.000Z
RD_VERSION = 0x00 WRITE_INFO = 0x01 READ_INFO = 0x02 SEND_RAW = 0x03
25.238095
82
0.588208
RD_VERSION = 0x00 WRITE_INFO = 0x01 READ_INFO = 0x02 SEND_RAW = 0x03 def getVersion(dev): dev.send([RD_VERSION]) raw = dev.read(3) return raw[1] + raw[2] * 256 def writeInfo(dev, motor_id, regstart, value): msg = [WRITE_INFO, motor_id, regstart, value / 256, value % 256] dev.send(msg) raw = ...
0
0
0
0
0
1,841
0
0
207
db7593529fbb1b96b1e34faaf8135dc1bf1e9e8d
2,149
py
Python
policykit/integrations/discord/auth_backends.py
hozzjss/policykit
8d00418d2caacf81cf1faacaf81ca1b2da6f6a48
[ "MIT" ]
null
null
null
policykit/integrations/discord/auth_backends.py
hozzjss/policykit
8d00418d2caacf81cf1faacaf81ca1b2da6f6a48
[ "MIT" ]
null
null
null
policykit/integrations/discord/auth_backends.py
hozzjss/policykit
8d00418d2caacf81cf1faacaf81ca1b2da6f6a48
[ "MIT" ]
null
null
null
import logging logger = logging.getLogger(__name__)
39.796296
139
0.65007
from django.contrib.auth.backends import BaseBackend from django.contrib.auth.models import User from integrations.discord.models import DiscordCommunity, DiscordUser from urllib import parse import urllib.request import json import logging logger = logging.getLogger(__name__) class DiscordBackend(BaseBackend): ...
0
0
0
1,847
0
0
0
94
155
4a2a2b4cce4142cd3fd1db5441bc733518a8f6f3
504
py
Python
miau.py
NelsonGomesNeto/ProgramC
e743b1b869f58f7f3022d18bac00c5e0b078562e
[ "MIT" ]
3
2018-12-18T13:39:42.000Z
2021-06-23T18:05:18.000Z
miau.py
NelsonGomesNeto/ProgramC
e743b1b869f58f7f3022d18bac00c5e0b078562e
[ "MIT" ]
1
2018-11-02T21:32:40.000Z
2018-11-02T22:47:12.000Z
miau.py
NelsonGomesNeto/ProgramC
e743b1b869f58f7f3022d18bac00c5e0b078562e
[ "MIT" ]
6
2018-10-27T14:07:52.000Z
2019-11-14T13:49:29.000Z
# Q = int(input()) while (True): try: x,n = input().split() x = float(x) n = int(n) print( '{:.4f}'.format(search(x,n)) ) except: break
14
39
0.529762
def expf(v,e): if e == 1: return v ans = expf(v,e//2) ans = ans*ans if e%2 == 0: return ans return ans*v pass def search(v,n): if v == 0 or v == 1: return v else : begin = 0 end = max(v,1.0) mid = 0 while end-begin > 0.000001: mid = (begin+end)/2 if expf(mid,n) > v: end = mid else : ...
0
0
0
0
0
310
0
0
45
d6c3ea15a4654023415ca8bfa7b6f9dd5ea0cf15
421
py
Python
python/416PartitionEqualSubsetSum.py
zuisixian/LeetCode
851498561e5006d4803151cff467864d36a1dc2e
[ "MIT" ]
null
null
null
python/416PartitionEqualSubsetSum.py
zuisixian/LeetCode
851498561e5006d4803151cff467864d36a1dc2e
[ "MIT" ]
1
2018-01-20T16:25:13.000Z
2018-01-20T16:25:13.000Z
python/416PartitionEqualSubsetSum.py
zuisixian/LeetCode
851498561e5006d4803151cff467864d36a1dc2e
[ "MIT" ]
1
2018-01-09T14:08:06.000Z
2018-01-09T14:08:06.000Z
# !usr/bin/env python # -*- coding:utf-8 -*- if __name__ == "__main__": print("hello")
18.304348
67
0.484561
# !usr/bin/env python # -*- coding:utf-8 -*- class Solution(object): def canPartition(self, nums): """ :param nums: List(int) :return:bool """ sum_val = 0 bits = 1 for num in nums: sum_val += num bits |= bits << num return...
0
0
0
301
0
0
0
0
23
e45ea71f6988eedf4511ae3ac3739a0a5d2513de
1,162
py
Python
bytes-booze/Team python 2/part1.py
AE-nv/aedvent-code-2021
7ce199d6be5f6cce2e61a9c0d26afd6d064a86a7
[ "MIT" ]
1
2021-12-02T12:09:11.000Z
2021-12-02T12:09:11.000Z
bytes-booze/Team python 2/part1.py
AE-nv/aedvent-code-2021
7ce199d6be5f6cce2e61a9c0d26afd6d064a86a7
[ "MIT" ]
null
null
null
bytes-booze/Team python 2/part1.py
AE-nv/aedvent-code-2021
7ce199d6be5f6cce2e61a9c0d26afd6d064a86a7
[ "MIT" ]
1
2021-12-01T21:14:41.000Z
2021-12-01T21:14:41.000Z
if __name__ == '__main__': with open("input.txt", 'r') as f: data = f.readlines() dancers="abcdefghijklmnop" print(dancers) instructions = data[0].strip().split(',') for i in range(0, 1000000000): for instruction in instructions: command=instruction[0] pars ...
33.2
67
0.479346
if __name__ == '__main__': with open("input.txt", 'r') as f: data = f.readlines() dancers="abcdefghijklmnop" print(dancers) instructions = data[0].strip().split(',') for i in range(0, 1000000000): for instruction in instructions: command=instruction[0] pars ...
0
0
0
0
0
0
0
0
0
8aea300c7c80841bf7e80289ca017204ec7df05b
108
py
Python
tests/syntax/annotated_name_global.py
friendly-traceback/friendly-traceback
4f6785f14c271a4d6412ef19c140f9d380cdbcbf
[ "MIT" ]
45
2021-07-06T03:30:20.000Z
2022-03-16T17:30:58.000Z
tests/syntax/annotated_name_global.py
friendly-traceback/friendly-traceback
4f6785f14c271a4d6412ef19c140f9d380cdbcbf
[ "MIT" ]
110
2021-06-28T11:48:46.000Z
2022-03-25T20:41:25.000Z
tests/syntax/annotated_name_global.py
friendly-traceback/friendly-traceback
4f6785f14c271a4d6412ef19c140f9d380cdbcbf
[ "MIT" ]
4
2021-07-05T20:56:39.000Z
2021-11-11T20:24:34.000Z
# SyntaxError: annotated name 'var' can't be global var = 0 foo()
15.428571
51
0.62963
# SyntaxError: annotated name 'var' can't be global def foo(): global var var:int = 1 var = 0 foo()
0
0
0
0
0
20
0
0
22
dc6dc6f905ae88e1707691b85288bddeec342a46
1,285
py
Python
test/rg_test.py
outkine/rgkit
eb5d80c0d1815cc016bf7c584310120991760cc8
[ "Unlicense" ]
1
2021-11-04T22:19:59.000Z
2021-11-04T22:19:59.000Z
test/rg_test.py
outkine/rgkit
eb5d80c0d1815cc016bf7c584310120991760cc8
[ "Unlicense" ]
null
null
null
test/rg_test.py
outkine/rgkit
eb5d80c0d1815cc016bf7c584310120991760cc8
[ "Unlicense" ]
2
2021-02-16T09:37:47.000Z
2021-11-04T22:30:51.000Z
import ast import pkg_resources from rgkit.settings import settings map_data = ast.literal_eval( open(pkg_resources.resource_filename('rgkit', 'maps/default.py')).read()) settings.init_map(map_data)
30.595238
77
0.635019
import ast import pkg_resources import unittest from rgkit.settings import settings from rgkit import rg map_data = ast.literal_eval( open(pkg_resources.resource_filename('rgkit', 'maps/default.py')).read()) settings.init_map(map_data) class TestRG(unittest.TestCase): def test_center(self): self.ass...
0
0
0
1,019
0
0
0
-7
67
fcdc04c1945b98787166bc6d3717755d05232f19
2,480
py
Python
SECDataTools/GetData/_cli.py
tnieds/SECDataTools
a29bfdafa673c9978df92ccc467909cce487c317
[ "MIT" ]
22
2018-01-16T09:33:04.000Z
2021-11-10T03:20:08.000Z
SECDataTools/GetData/_cli.py
tnieds/SECDataTools
a29bfdafa673c9978df92ccc467909cce487c317
[ "MIT" ]
null
null
null
SECDataTools/GetData/_cli.py
tnieds/SECDataTools
a29bfdafa673c9978df92ccc467909cce487c317
[ "MIT" ]
9
2018-04-03T13:32:46.000Z
2022-01-22T01:54:39.000Z
import argparse parser = argparse.ArgumentParser( description='''Download and extract zip archive(s) from https://www.sec.gov/dera/data/financial-statement-data-sets.html.''') parser.add_argument( '-path', type=str, help='''Directory path that zip archives will be saved to. May be absolute o...
34.929577
81
0.697581
import sys, argparse parser = argparse.ArgumentParser( description='''Download and extract zip archive(s) from https://www.sec.gov/dera/data/financial-statement-data-sets.html.''') parser.add_argument( '-path', type=str, help='''Directory path that zip archives will be saved to. May be absolute ...
0
0
0
0
0
0
0
5
0
c09e4ebe1afc91820a7c60eae7150d087c63e24a
13,269
py
Python
briefmetrics/web/views/report.py
shazow/briefmetrics
b6ca5ac0980ae00ccc160e6456e36ade8a3e2eeb
[ "MIT" ]
18
2020-02-06T23:31:43.000Z
2022-02-09T00:32:42.000Z
briefmetrics/web/views/report.py
shazow/briefmetrics
b6ca5ac0980ae00ccc160e6456e36ade8a3e2eeb
[ "MIT" ]
8
2020-02-08T23:00:46.000Z
2021-07-27T20:52:12.000Z
briefmetrics/web/views/report.py
shazow/briefmetrics
b6ca5ac0980ae00ccc160e6456e36ade8a3e2eeb
[ "MIT" ]
1
2020-07-09T12:59:27.000Z
2020-07-09T12:59:27.000Z
# TODO: Move this somewhere else?
38.46087
179
0.670133
from itertools import groupby from unstdlib import now, get_many from sqlalchemy import orm from briefmetrics import api, model, tasks from briefmetrics.web.environment import Response, httpexceptions from briefmetrics.lib.controller import Controller, Context from briefmetrics.lib.exceptions import APIControllerError...
0
9,640
0
3,007
0
0
0
194
384
5805412b102e975a4c5e68f78412b44e89156bba
6,064
py
Python
skylearn/modules/decision_tree.py
sherwyn11/Skylearn.py
ab3069950a2f58222ccb9eefc1740f8896a0ea40
[ "MIT" ]
1
2020-05-17T21:24:34.000Z
2020-05-17T21:24:34.000Z
skylearn/modules/decision_tree.py
sherwyn11/Skylearn.py
ab3069950a2f58222ccb9eefc1740f8896a0ea40
[ "MIT" ]
null
null
null
skylearn/modules/decision_tree.py
sherwyn11/Skylearn.py
ab3069950a2f58222ccb9eefc1740f8896a0ea40
[ "MIT" ]
1
2020-04-26T11:11:08.000Z
2020-04-26T11:11:08.000Z
classification_Reports = [] confusion_Matrix = [] accuracies = [] target_Names = []
28.739336
76
0.561675
import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns from flask import session from sklearn.preprocessing import StandardScaler, LabelEncoder from sklearn.model_selection import train_test_split, cross_val_score, KFold from sklearn.tree import DecisionTreeClassifier, plot_tree fr...
0
0
0
0
0
5,429
0
282
266
11566d06747c0e121665c83105f4a86b6937232e
108,628
py
Python
catalogService_test/vcloudtest.py
sassoftware/-catalog-service
4b68af224842a2e93f7a4bacdac1fc262ae7b917
[ "Apache-2.0" ]
3
2015-06-10T19:31:17.000Z
2017-11-29T07:04:12.000Z
catalogService_test/vcloudtest.py
sassoftware/-catalog-service
4b68af224842a2e93f7a4bacdac1fc262ae7b917
[ "Apache-2.0" ]
null
null
null
catalogService_test/vcloudtest.py
sassoftware/-catalog-service
4b68af224842a2e93f7a4bacdac1fc262ae7b917
[ "Apache-2.0" ]
2
2016-02-04T00:51:15.000Z
2020-07-24T00:22:44.000Z
# vim: set fileencoding=utf-8 : # # Copyright (c) SAS Institute Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
56.48882
1,045
0.661901
# vim: set fileencoding=utf-8 : # # Copyright (c) SAS Institute Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
0
0
0
106,900
0
8
0
202
428
cdbece1a7302da0ca0d501750b3a762b938eae60
3,491
py
Python
src/test/pan_angle/calculate_point.py
chrisspen/homebot
cd1a5a2bddcb90d50a00e67b94297942827fbc61
[ "MIT" ]
8
2017-11-19T01:42:59.000Z
2021-02-08T09:18:58.000Z
src/test/pan_angle/calculate_point.py
chrisspen/homebot
cd1a5a2bddcb90d50a00e67b94297942827fbc61
[ "MIT" ]
24
2017-02-14T16:50:02.000Z
2017-06-07T18:38:20.000Z
src/test/pan_angle/calculate_point.py
chrisspen/homebot
cd1a5a2bddcb90d50a00e67b94297942827fbc61
[ "MIT" ]
6
2017-05-17T03:07:05.000Z
2019-11-14T09:33:06.000Z
#!/usr/bin/env python """ given a point relative to the baseframe, calculate the necessary pan+tilt angle to point camera at it given a pan+tilt angle, calculate the point relative to the base frame """ import unittest #https://github.com/ros/geometry/blob/hydro-devel/tf/src/tf/transformations.py if __name__ == '__m...
34.91
104
0.582641
#!/usr/bin/env python """ given a point relative to the baseframe, calculate the necessary pan+tilt angle to point camera at it given a pan+tilt angle, calculate the point relative to the base frame """ import unittest #https://github.com/ros/geometry/blob/hydro-devel/tf/src/tf/transformations.py from tf import trans...
0
0
0
2,980
0
0
0
51
112
661f92d3e39c740aea21825c2ca35633d050e1e6
2,377
py
Python
webkin/scaffold.py
mr-karan/castle
5b22cf7b2888036df03af814ee84560c9ab6a3f8
[ "MIT" ]
52
2017-02-01T16:17:09.000Z
2022-01-04T06:15:39.000Z
webkin/scaffold.py
mr-karan/castle
5b22cf7b2888036df03af814ee84560c9ab6a3f8
[ "MIT" ]
7
2017-11-17T11:14:21.000Z
2022-03-11T23:17:13.000Z
webkin/scaffold.py
mr-karan/castle
5b22cf7b2888036df03af814ee84560c9ab6a3f8
[ "MIT" ]
7
2017-02-01T16:00:22.000Z
2020-12-17T12:26:11.000Z
import logging __all__ = ['log', 'check_for_tokens'] logging.basicConfig(level=logging.INFO, format='%(levelname)s: %(asctime)s -' ' %(funcName)s - %(message)s') log = logging.getLogger('webkin')
37.140625
109
0.634413
import logging from os import getenv __all__ = ['log', 'check_for_tokens'] logging.basicConfig(level=logging.INFO, format='%(levelname)s: %(asctime)s -' ' %(funcName)s - %(message)s') log = logging.getLogger('webkin') def check_for_tokens(): log.debug('Checking for token...
0
0
0
0
0
2,092
0
0
45
075d6ab68c9909fa6fbd2a00d8c70a663b839dee
1,017
py
Python
dautils/conf.py
diabloxenon/dautils
064307b0fd9bbca2adcc7df5c6a0289954c74d58
[ "MIT" ]
null
null
null
dautils/conf.py
diabloxenon/dautils
064307b0fd9bbca2adcc7df5c6a0289954c74d58
[ "MIT" ]
null
null
null
dautils/conf.py
diabloxenon/dautils
064307b0fd9bbca2adcc7df5c6a0289954c74d58
[ "MIT" ]
null
null
null
""" This module contains configuration utilities. """ import json import os FJSON = 'dautils.json' def file_exists(tocheck): """ Checks whether a file exists. :param tocheck: The path of the file. :returns: True if the file exists. """ return os.path.isfile(tocheck) def read_rc(): """ Re...
20.755102
68
0.637168
""" This module contains configuration utilities. """ import json import os FJSON = 'dautils.json' def file_exists(tocheck): """ Checks whether a file exists. :param tocheck: The path of the file. :returns: True if the file exists. """ return os.path.isfile(tocheck) def read_rc(): """ Re...
0
0
0
0
0
0
0
0
0
fcb3831fe739af46294a7ee043f9cd887b8feec7
222
py
Python
ch5-blog-app/blog/urls.py
benikim/beni-django
56a3024c93cd30bcd2f934ad304917eda827e8bd
[ "MIT" ]
16
2020-09-04T17:35:45.000Z
2021-11-02T15:06:04.000Z
ch5-blog-app/blog/urls.py
benikim/beni-django
56a3024c93cd30bcd2f934ad304917eda827e8bd
[ "MIT" ]
32
2020-02-12T16:03:14.000Z
2021-09-22T18:37:38.000Z
ch5-blog-app/blog/urls.py
benikim/beni-django
56a3024c93cd30bcd2f934ad304917eda827e8bd
[ "MIT" ]
8
2020-09-24T17:28:58.000Z
2022-01-13T11:58:47.000Z
from django.urls import path from .views import BlogDetailView, BlogListView urlpatterns = [ path('post/<int:pk>/', BlogDetailView.as_view(), name='post_detail'), path('', BlogListView.as_view(), name='home'), ]
24.666667
73
0.702703
from django.urls import path from .views import BlogDetailView, BlogListView urlpatterns = [ path('post/<int:pk>/', BlogDetailView.as_view(), name='post_detail'), path('', BlogListView.as_view(), name='home'), ]
0
0
0
0
0
0
0
0
0
f424431253d18eadd9cc573ad9a24a57f71c3f93
625
py
Python
scripts/thrust_test.py
chutsu/red
792d075896a70ad841a0951ecd7b4d412c57a422
[ "BSD-4-Clause" ]
1
2021-06-30T15:46:32.000Z
2021-06-30T15:46:32.000Z
scripts/thrust_test.py
chutsu/red
792d075896a70ad841a0951ecd7b4d412c57a422
[ "BSD-4-Clause" ]
null
null
null
scripts/thrust_test.py
chutsu/red
792d075896a70ad841a0951ecd7b4d412c57a422
[ "BSD-4-Clause" ]
null
null
null
import rospy from geometry_msgs.msg import Quaternion from geometry_msgs.msg import Vector3 from mavros_msgs.msg import AttitudeTarget node = rospy.init_node("thrust_test") rate = rospy.Rate(20) # Hz pub = rospy.Publisher('/mavros/setpoint_raw/attitude', AttitudeTarget, queue_size=1) print("looping!") while True: ...
26.041667
84
0.7136
from time import sleep import rospy from geometry_msgs.msg import Quaternion from geometry_msgs.msg import Vector3 from mavros_msgs.msg import Thrust from mavros_msgs.msg import AttitudeTarget node = rospy.init_node("thrust_test") rate = rospy.Rate(20) # Hz pub = rospy.Publisher('/mavros/setpoint_raw/attitude', Att...
0
0
0
0
0
0
0
14
44
da4aeeec2556daf2c80d848bd33bb3c7e4d477a3
462
py
Python
smtp/gsetup.py
hwase0ng/klseScrappers
367ac86b603fad35c4983b04f9e72d4694d4bc31
[ "MIT" ]
3
2020-05-27T06:01:12.000Z
2021-11-29T20:56:06.000Z
smtp/gsetup.py
hwase0ng/klseScrappers
367ac86b603fad35c4983b04f9e72d4694d4bc31
[ "MIT" ]
3
2020-03-08T14:45:16.000Z
2021-12-13T19:47:14.000Z
smtp/gsetup.py
hwase0ng/klseScrappers
367ac86b603fad35c4983b04f9e72d4694d4bc31
[ "MIT" ]
null
null
null
""" Created on Mar 8, 2020 @author: hwase """ import settings as S import yagmail if __name__ == '__main__': contents = ['This is the body, and here is just text http://somedomain/image.png', 'You can find an audio file attached.', '/local/path/song.mp3'] # yagmail.register(sender...
30.8
97
0.660173
""" Created on Mar 8, 2020 @author: hwase """ import settings as S import yagmail if __name__ == '__main__': contents = ['This is the body, and here is just text http://somedomain/image.png', 'You can find an audio file attached.', '/local/path/song.mp3'] # yagmail.register(sender...
0
0
0
0
0
0
0
0
0
98ef460843e2e6e62531e036f3d4d82a96a84b7a
2,438
py
Python
lianjia/lianjia/items.py
Bruceey/PythonSpider
4d64c45ca41d449f4950915887ef786ae812e7fa
[ "MIT" ]
3
2021-05-21T03:31:35.000Z
2021-07-03T11:39:05.000Z
lianjia/lianjia/items.py
Bruceey/PythonSpider
4d64c45ca41d449f4950915887ef786ae812e7fa
[ "MIT" ]
null
null
null
lianjia/lianjia/items.py
Bruceey/PythonSpider
4d64c45ca41d449f4950915887ef786ae812e7fa
[ "MIT" ]
3
2021-04-14T15:09:00.000Z
2021-12-13T14:37:54.000Z
# Define here the models for your scraped items # # See documentation in: # https://docs.scrapy.org/en/latest/topics/items.html if __name__ == '__main__': item = LianjiaItem() item[''] = 'fasgseg' for k, v in item.items(): print(k, v)
23
53
0.576702
# Define here the models for your scraped items # # See documentation in: # https://docs.scrapy.org/en/latest/topics/items.html import scrapy class LianjiaItem(scrapy.Item): # 新房 collection = 'xinFang' 省份 = scrapy.Field() 城市 = scrapy.Field() 区域位置 = scrapy.Field() 小区 = scrapy.Field() 别名 = ...
876
0
0
1,851
0
0
0
-8
46
8f9823426670fdabd7a06936000ba1b874ff43ab
976
py
Python
section2/video5/oware/server/__main__.py
PacktPublishing/Mastering-Python-3.x-3rd-Edition
addfb6b1ecbc788030be119318386e1261ba6f2a
[ "MIT" ]
6
2019-04-10T17:27:30.000Z
2021-11-08T13:10:37.000Z
section2/video5/oware/server/__main__.py
PacktPublishing/Mastering-Python-3.x
526f2d02266fa6c0a5badf892f2db177b2f52f64
[ "MIT" ]
2
2021-06-01T23:45:41.000Z
2021-06-02T00:07:56.000Z
section2/video5/oware/server/__main__.py
PacktPublishing/Mastering-Python-3.x-3rd-Edition
addfb6b1ecbc788030be119318386e1261ba6f2a
[ "MIT" ]
8
2019-01-30T01:59:47.000Z
2022-03-01T06:03:06.000Z
"""Minimal Oware server This server doesn't actually implement the Oware game. It simply allows a single client to connect, and speaks the game protocol well enough to allow that client to run. """ if __name__ == '__main__': main()
21.217391
68
0.564549
"""Minimal Oware server This server doesn't actually implement the Oware game. It simply allows a single client to connect, and speaks the game protocol well enough to allow that client to run. """ import pickle import socket from ..model.board import Board from ..util import ByteFIFO def main(): board = Board(...
0
0
0
0
0
625
0
0
112
a5b6994d19063fd117b1d86378fb7cf4323d7b7f
1,644
py
Python
Example code/Adafruit Dashboard/send data to simulated feed with paho-mqtt publish.py
SeekingAura/IoTCurseUTP
f98dda90f544e78b92733a5ed403fb56c943fc97
[ "MIT" ]
null
null
null
Example code/Adafruit Dashboard/send data to simulated feed with paho-mqtt publish.py
SeekingAura/IoTCurseUTP
f98dda90f544e78b92733a5ed403fb56c943fc97
[ "MIT" ]
null
null
null
Example code/Adafruit Dashboard/send data to simulated feed with paho-mqtt publish.py
SeekingAura/IoTCurseUTP
f98dda90f544e78b92733a5ed403fb56c943fc97
[ "MIT" ]
1
2019-06-20T21:59:06.000Z
2019-06-20T21:59:06.000Z
# Import standard python modules import threading import time import os import sys # Import paho MQTT client. import paho.mqtt.client as mqtt # Define callback functions which will be called when certain events happen. # Define Functions for Threading if __name__ == "__main__": if(len(sys.argv)!=2): sys.stderr...
26.516129
76
0.750608
# Import standard python modules import threading import time import os import sys # Import paho MQTT client. import paho.mqtt.client as mqtt # Define callback functions which will be called when certain events happen. def on_connect(client, userdata, flags, rc): # Connected function will be called when the client c...
4
0
0
0
0
424
0
0
67
8bdc017c55b6c0d0301ccaa66b55bd75b1b7d722
6,247
py
Python
OpenGLES/GLKit/glkmath/vector2.py
pome-ta/pystaGLES
f52b51dd1364f87b22a12d7527482b76e7fab0bb
[ "MIT" ]
null
null
null
OpenGLES/GLKit/glkmath/vector2.py
pome-ta/pystaGLES
f52b51dd1364f87b22a12d7527482b76e7fab0bb
[ "MIT" ]
null
null
null
OpenGLES/GLKit/glkmath/vector2.py
pome-ta/pystaGLES
f52b51dd1364f87b22a12d7527482b76e7fab0bb
[ "MIT" ]
null
null
null
# coding: utf-8 from objc_util import parse_struct glk2 = parse_struct('{glkvec2=fff}') 'GLKVector2Make', 'GLKVector2MakeWithArray', 'GLKVector2Length', 'GLKVector2Distance', 'GLKVector2Negate', 'GLKVector2Normalize', 'GLKVector2AddScalar', 'GLKVector2SubtractScalar', 'GLKVector2Multiply...
24.594488
521
0.714103
# coding: utf-8 import math import ctypes from objc_util import parse_struct class xy(ctypes.Structure): _fields_ = [ ('x', ctypes.c_float), ('y', ctypes.c_float), ] class st(ctypes.Structure): _fields_ = [ ('s', ctypes.c_float), ('t', ctypes.c_float), ] class float2(ctypes.Structure): _...
0
0
0
509
0
3,900
0
-18
803
69c0a4b9503b191cf2caff06950e91d998bb7841
1,117
py
Python
transforms/relatedactors.py
crits/mcrits
5ea142ea277976c1694ca878cb4a4a4928341507
[ "BSD-2-Clause" ]
29
2015-01-09T17:30:17.000Z
2019-07-26T18:19:55.000Z
transforms/relatedactors.py
crits/mcrits
5ea142ea277976c1694ca878cb4a4a4928341507
[ "BSD-2-Clause" ]
null
null
null
transforms/relatedactors.py
crits/mcrits
5ea142ea277976c1694ca878cb4a4a4928341507
[ "BSD-2-Clause" ]
10
2015-04-22T21:49:34.000Z
2019-08-16T06:57:14.000Z
crits = mcrits() me = MaltegoTransform() me.parseArguments(sys.argv) id_ = me.getVar('id') crits_type = me.getVar('crits_type') for result in crits.get_related(crits_type, id_, 'Actor'): # For each related object, get the details. obj = crits.get_single_obj('Actor', result[1]) # For each identifer, get t...
34.90625
63
0.585497
from MaltegoTransform import * from mcrits_utils import * crits = mcrits() me = MaltegoTransform() me.parseArguments(sys.argv) id_ = me.getVar('id') crits_type = me.getVar('crits_type') for result in crits.get_related(crits_type, id_, 'Actor'): # For each related object, get the details. obj = crits.get_sing...
0
0
0
0
0
0
0
14
44
38c5940cbda5ed9d93092b9d10d436f03f4aadde
73,055
py
Python
pylacuna/tests/test_map.py
miketwo/pylacuna
ef2144cef6d5793b75e9c82018d434e0ff2b2c46
[ "MIT" ]
null
null
null
pylacuna/tests/test_map.py
miketwo/pylacuna
ef2144cef6d5793b75e9c82018d434e0ff2b2c46
[ "MIT" ]
null
null
null
pylacuna/tests/test_map.py
miketwo/pylacuna
ef2144cef6d5793b75e9c82018d434e0ff2b2c46
[ "MIT" ]
null
null
null
#!/usr/bin/env python import unittest import ast from sys import version_info if version_info.major == 2: import __builtin__ as builtins # pylint:disable=import-error else: GET_STAR_MAP_RESPONSE = ast.literaleval(''' {u'id': 7, u'jsonrpc': u'2.0', u'result': {u'stars': [{u'bodies': [{u'id': u'356648', u...
24.697431
79
0.442762
#!/usr/bin/env python import sys import os import unittest from mock import patch, MagicMock, ANY, call import pylacuna.core.map import ast from sys import version_info if version_info.major == 2: import __builtin__ as builtins # pylint:disable=import-error else: import builtins # pylint:disable=import-err...
0
0
0
594
0
292
0
-3
192
0abd772ee0ab41462a8c9b47fe78cb63f355ef84
1,165
py
Python
12_Nguyen_Lam_Manh_Tuyen/1.6.py
lpython2006e/exercies
84343eae57d86708a7984aa02f77183a4688a508
[ "MIT" ]
null
null
null
12_Nguyen_Lam_Manh_Tuyen/1.6.py
lpython2006e/exercies
84343eae57d86708a7984aa02f77183a4688a508
[ "MIT" ]
null
null
null
12_Nguyen_Lam_Manh_Tuyen/1.6.py
lpython2006e/exercies
84343eae57d86708a7984aa02f77183a4688a508
[ "MIT" ]
8
2020-07-10T14:13:54.000Z
2020-08-03T08:17:50.000Z
#Write a guessing game where the user has to guess a secret number. # After every guess the program tells the user whether their number was too large or too small. # At the end the number of tries needed should be printed. # It counts only as one try if they input the same number multiple times consecutively. import ra...
38.833333
95
0.68412
#Write a guessing game where the user has to guess a secret number. # After every guess the program tells the user whether their number was too large or too small. # At the end the number of tries needed should be printed. # It counts only as one try if they input the same number multiple times consecutively. import ra...
0
0
0
0
0
0
0
0
0