hexsha
stringlengths
40
40
size
int64
4
1.02M
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
209
max_stars_repo_name
stringlengths
5
121
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
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
209
max_issues_repo_name
stringlengths
5
121
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
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
209
max_forks_repo_name
stringlengths
5
121
max_forks_repo_head_hexsha
stringlengths
40
40
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
4
1.02M
avg_line_length
float64
1.07
66.1k
max_line_length
int64
4
266k
alphanum_fraction
float64
0.01
1
d4e260459749ff763cc29289bb61a3da0e6e6901
7,434
py
Python
search_domain_list2csv.py
op7ic/investigatehunt
79c3d4827bc2af372548f5f97ae356c905ce6dad
[ "MIT" ]
6
2020-07-02T07:59:29.000Z
2021-09-07T17:14:22.000Z
search_domain_list2csv.py
op7ic/investigatehunt
79c3d4827bc2af372548f5f97ae356c905ce6dad
[ "MIT" ]
null
null
null
search_domain_list2csv.py
op7ic/investigatehunt
79c3d4827bc2af372548f5f97ae356c905ce6dad
[ "MIT" ]
4
2020-07-02T07:59:31.000Z
2021-09-05T18:22:41.000Z
import sys import requests import configparser import time import json import datetime # Ignore insecure cert warnings (enable only if working with onsite-amp deployments) from requests.packages.urllib3.exceptions import InsecureRequestWarning requests.packages.urllib3.disable_warnings(InsecureRequestWarning) def ch...
42.238636
136
0.636938
3134cb8d4d97e66ebd06717eeb67982ab6e0911a
21,750
py
Python
userinterface/flightPathDefinition.py
MarkHermreck/UAS-C2C2-2019
9eb04c080eb1e05da0e18616b7dd245d8afb4c75
[ "MIT" ]
null
null
null
userinterface/flightPathDefinition.py
MarkHermreck/UAS-C2C2-2019
9eb04c080eb1e05da0e18616b7dd245d8afb4c75
[ "MIT" ]
null
null
null
userinterface/flightPathDefinition.py
MarkHermreck/UAS-C2C2-2019
9eb04c080eb1e05da0e18616b7dd245d8afb4c75
[ "MIT" ]
null
null
null
from __future__ import unicode_literals import sys import os import csv import numbers import re from matplotlib.backends import qt_compat use_pyside = qt_compat.QT_API == qt_compat.QT_API_PYSIDE if use_pyside: from PySide import QtWidgets, QtCore else: from PyQt5 import QtWidgets, QtCore from...
42.730845
209
0.550483
cab37bb57207ef46dacbfa766ab626e9357364a7
857
py
Python
medium/73.py
pisskidney/leetcode
08c19cbf3d7afc897908ea05db4ad11a5487f523
[ "MIT" ]
null
null
null
medium/73.py
pisskidney/leetcode
08c19cbf3d7afc897908ea05db4ad11a5487f523
[ "MIT" ]
null
null
null
medium/73.py
pisskidney/leetcode
08c19cbf3d7afc897908ea05db4ad11a5487f523
[ "MIT" ]
null
null
null
#!/usr/bin/python from typing import List """ 73. Set Matrix Zeroes https://leetcode.com/problems/set-matrix-zeroes/ """ class Solution: def setZeroes(self, matrix: List[List[int]]) -> None: """ Do not return anything, modify matrix in-place instead. """ rows, cols = set([]), se...
21.974359
63
0.500583
d6b5befe3b5464b1ec89518470702cc88b67fc65
9,527
py
Python
pahelix/utils/splitters.py
agave233/PaddleHelix
e5578f72c2a203a27d9df7da111f1ced826c1429
[ "Apache-2.0" ]
454
2020-11-21T01:02:45.000Z
2022-03-29T12:53:40.000Z
pahelix/utils/splitters.py
chupvl/PaddleHelix
6e082f89b8090c3c360593d40a08bffc884165dd
[ "Apache-2.0" ]
161
2020-12-12T06:35:54.000Z
2022-03-27T11:31:13.000Z
pahelix/utils/splitters.py
chupvl/PaddleHelix
6e082f89b8090c3c360593d40a08bffc884165dd
[ "Apache-2.0" ]
108
2020-12-07T09:01:10.000Z
2022-03-31T14:42:29.000Z
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
35.950943
137
0.627375
7f4e427c98ebad68ae988246aeef63231ea76f3d
2,039
py
Python
pettingzoo/butterfly/prospector/constants.py
MarioJayakumar/PettingZoo
0673d44c33ae1843a773babf5e6595baf8214664
[ "MIT" ]
null
null
null
pettingzoo/butterfly/prospector/constants.py
MarioJayakumar/PettingZoo
0673d44c33ae1843a773babf5e6595baf8214664
[ "MIT" ]
null
null
null
pettingzoo/butterfly/prospector/constants.py
MarioJayakumar/PettingZoo
0673d44c33ae1843a773babf5e6595baf8214664
[ "MIT" ]
null
null
null
import math SCREEN_SIZE = SCREEN_WIDTH, SCREEN_HEIGHT = (1280, 720) BACKGROUND_COLOR = (217, 151, 106) FPS = 15 FENCE_WIDTH = 22 WATER_HEIGHT = 100 AGENT_RADIUS = 15 AGENT_DIAMETER = AGENT_RADIUS * 2 # The 3 is for RBG values PROSPEC_OBSERV_SIDE_LEN = 5 * AGENT_DIAMETER PROSPEC_OBSERV_SHAPE = (PROSPEC_OBSERV_SIDE_LE...
24.27381
76
0.681707
0e762ee3740ea1054280a33487adbee08b43b750
747
py
Python
wikilabels/util/tsv.py
aryan040501/wikilabels
ea110da2b969cc978a0f288c4da6250dc9d67e72
[ "MIT" ]
15
2015-07-16T17:56:43.000Z
2018-08-20T14:59:16.000Z
wikilabels/util/tsv.py
aryan040501/wikilabels
ea110da2b969cc978a0f288c4da6250dc9d67e72
[ "MIT" ]
122
2015-06-10T15:58:11.000Z
2018-08-16T14:56:23.000Z
wikilabels/util/tsv.py
aryan040501/wikilabels
ea110da2b969cc978a0f288c4da6250dc9d67e72
[ "MIT" ]
27
2015-07-15T22:12:35.000Z
2018-08-06T23:10:28.000Z
import json def read(f, header=False): if header: headers = decode_row(f.readline()) else: headers = None for line in f: yield decode_row(line, headers=headers) def encode(value): return json.dumps(value) def encode_row(values, headers=None): if headers is None: ...
20.189189
64
0.613119
0ac27deddc6a6760037aee8469353b4c5e98ab8d
1,291
py
Python
qaqg/main.py
monatis/ai-aas
d8363dfa33ba73cc09f5ed47511b7bdccb6e3d33
[ "Apache-2.0" ]
7
2021-04-25T18:50:44.000Z
2021-12-04T01:15:50.000Z
qaqg/main.py
monatis/ai-aas
d8363dfa33ba73cc09f5ed47511b7bdccb6e3d33
[ "Apache-2.0" ]
null
null
null
qaqg/main.py
monatis/ai-aas
d8363dfa33ba73cc09f5ed47511b7bdccb6e3d33
[ "Apache-2.0" ]
1
2021-06-17T16:24:22.000Z
2021-06-17T16:24:22.000Z
import asyncio import logging import aioredis import ujson from pipelines import pipeline # pipelines.py script in the cloned repo from transformers import AutoModelForSeq2SeqLM, AutoTokenizer async def task(): tokenizer = AutoTokenizer.from_pretrained( "ozcangundes/mt5-multitask-qa-qg-turkish") mod...
30.023256
83
0.627421
56fd20a56074d3642b499dabf03e660ee1a70dd1
1,144
py
Python
RandomCameras/settings/test.py
Haizza1/RandomCameras-Backend
b679e2c685a9f9582f5f1a6b4c79c91c2328e326
[ "MIT" ]
1
2021-06-09T01:35:59.000Z
2021-06-09T01:35:59.000Z
RandomCameras/settings/test.py
Haizza1/RandomCameras-Backend
b679e2c685a9f9582f5f1a6b4c79c91c2328e326
[ "MIT" ]
null
null
null
RandomCameras/settings/test.py
Haizza1/RandomCameras-Backend
b679e2c685a9f9582f5f1a6b4c79c91c2328e326
[ "MIT" ]
null
null
null
"""Testing settings. With these settings, tests run faster. """ from .base import * from .base import env # Base DEBUG = False SECRET_KEY = env('SECRET_KEY', default="7lEaACt4wsCj8JbXYgQLf4BmdG5QbuHTMYUGir2Gc1GHqqb2Pv8w9iXwwlIIviI2" ) TEST_RUNNER = "django.test.runner.DiscoverRunner" # Database # https://docs...
21.185185
78
0.663462
7cece22c01449d5fe8a8e8acd5517606f670a7a3
5,878
py
Python
tests/sync_test_app.py
BiuroCo/mega
31dbbe791b591b3d80f332ad782d9db76c9d388f
[ "BSD-2-Clause" ]
1
2020-01-25T21:20:15.000Z
2020-01-25T21:20:15.000Z
tests/sync_test_app.py
BiuroCo/mega
31dbbe791b591b3d80f332ad782d9db76c9d388f
[ "BSD-2-Clause" ]
null
null
null
tests/sync_test_app.py
BiuroCo/mega
31dbbe791b591b3d80f332ad782d9db76c9d388f
[ "BSD-2-Clause" ]
1
2022-02-24T10:06:08.000Z
2022-02-24T10:06:08.000Z
""" Application for testing syncing algorithm (c) 2013-2014 by Mega Limited, Wellsford, New Zealand This file is part of the MEGA SDK - Client Access Engine. Applications using the MEGA API must present a valid application key and comply with the the rules set forth in the Terms of Service. The MEGA SDK is di...
29.39
130
0.58166
354edf779bda3095a7c579484d998c0142ecfa74
13,855
py
Python
core/admin/mailu/utils.py
Archipel/Mailu
637c72f3fc08b7c8917da2d073aced945a10ebe4
[ "MIT" ]
null
null
null
core/admin/mailu/utils.py
Archipel/Mailu
637c72f3fc08b7c8917da2d073aced945a10ebe4
[ "MIT" ]
null
null
null
core/admin/mailu/utils.py
Archipel/Mailu
637c72f3fc08b7c8917da2d073aced945a10ebe4
[ "MIT" ]
null
null
null
""" Mailu admin app utilities """ try: import cPickle as pickle except ImportError: import pickle import hmac import secrets import time from multiprocessing import Value from mailu import limiter import flask import flask_login import flask_migrate import flask_babel import redis from flask.sessions impo...
29.924406
108
0.605485
8adc2a9d885c68814ac38d0bcc885b9a092cc2bd
46,762
py
Python
django/db/models/base.py
Rao-Muneeb/django-nonrel
875bb88f07178c591eef69cdf2482a3d595a093c
[ "BSD-3-Clause" ]
null
null
null
django/db/models/base.py
Rao-Muneeb/django-nonrel
875bb88f07178c591eef69cdf2482a3d595a093c
[ "BSD-3-Clause" ]
null
null
null
django/db/models/base.py
Rao-Muneeb/django-nonrel
875bb88f07178c591eef69cdf2482a3d595a093c
[ "BSD-3-Clause" ]
null
null
null
from __future__ import unicode_literals import copy import sys from functools import update_wrapper from django.utils.six.moves import zip import django.db.models.manager # Imported to register signal handler. from django.conf import settings from django.core.exceptions import (ObjectDoesNotExist, MultipleObject...
43.743686
166
0.601129
96b1672a84cf397bee7d47bf721602133931339b
3,577
py
Python
mxfold2/fold/mix.py
n-mikamo/mxfold2
8c195c77f824bdd5899d3d01d6a096de95cd0e9b
[ "MIT" ]
46
2020-09-17T04:50:22.000Z
2022-03-22T08:14:15.000Z
mxfold2/fold/mix.py
n-mikamo/mxfold2
8c195c77f824bdd5899d3d01d6a096de95cd0e9b
[ "MIT" ]
7
2021-02-09T10:09:03.000Z
2022-01-14T21:19:02.000Z
mxfold2/fold/mix.py
n-mikamo/mxfold2
8c195c77f824bdd5899d3d01d6a096de95cd0e9b
[ "MIT" ]
20
2020-10-15T09:03:59.000Z
2022-03-09T07:16:20.000Z
import torch from .. import interface from .fold import AbstractFold from .rnafold import RNAFold from .zuker import ZukerFold class MixedFold(AbstractFold): def __init__(self, init_param=None, model_type='M', max_helix_length=30, **kwargs): super(MixedFold, self).__init__(interface.predict_mxfold, interfa...
51.84058
124
0.600224
a2b26118af1b6bb84bacd8a6d43c7c863c284681
911
py
Python
ooobuild/dyn/script/document_script_library_container.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
ooobuild/dyn/script/document_script_library_container.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
ooobuild/dyn/script/document_script_library_container.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # # Copyright 2022 :Barry-Thomas-Paul: Moss # # Licensed under the Apache License, Version 2.0 (the "License") # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http: // www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
35.038462
123
0.77607
3a2243a8d7d0a1143c54d1046ece5b0c1820011a
3,362
py
Python
diskcache/memo.py
allaudet/python-diskcache
2774689c60bac3ebd06246943bca2014779ee2c6
[ "Apache-2.0" ]
null
null
null
diskcache/memo.py
allaudet/python-diskcache
2774689c60bac3ebd06246943bca2014779ee2c6
[ "Apache-2.0" ]
null
null
null
diskcache/memo.py
allaudet/python-diskcache
2774689c60bac3ebd06246943bca2014779ee2c6
[ "Apache-2.0" ]
null
null
null
"""Memoization utilities. """ from functools import wraps from .core import ENOVAL def memoize(cache, name=None, typed=False, expire=None, tag=None): """Memoizing cache decorator. Decorator to wrap callable with memoizing function using cache. Repeated calls with the same arguments will lookup result i...
31.716981
79
0.620761
87d9ae38cc93180705bba7d94ad39daa2a32049b
1,482
py
Python
blogger/users/views.py
reallyusefulengine/django_blogger
b9f6444318e7b2a2643f25cd8974d11a8de6cfea
[ "MIT" ]
null
null
null
blogger/users/views.py
reallyusefulengine/django_blogger
b9f6444318e7b2a2643f25cd8974d11a8de6cfea
[ "MIT" ]
7
2020-02-12T01:17:07.000Z
2022-02-10T12:13:24.000Z
blogger/users/views.py
reallyusefulengine/django_blogger
b9f6444318e7b2a2643f25cd8974d11a8de6cfea
[ "MIT" ]
null
null
null
from django.contrib.auth.decorators import login_required from django.shortcuts import render, redirect from django.contrib.auth.forms import UserCreationForm from django.contrib import messages from . forms import UserRegistrationForm, UserUpdateForm, ProfileUpdateForm def register(request): if request.meth...
35.285714
94
0.65857
9835e711858b1376a0815b79900875854fc9273a
15,750
py
Python
spanner_orm/tests/query_test.py
jtoss/python-spanner-orm
d06b2a594b79268de80cbd8332829f41f9361985
[ "Apache-2.0" ]
2
2020-07-12T00:43:08.000Z
2021-01-30T03:03:32.000Z
spanner_orm/tests/query_test.py
maroux/python-spanner-orm
a42b39cb1a1aadd945c12563cc732aa96da28656
[ "Apache-2.0" ]
20
2020-07-20T21:55:52.000Z
2021-02-03T21:53:00.000Z
spanner_orm/tests/query_test.py
maroux/python-spanner-orm
a42b39cb1a1aadd945c12563cc732aa96da28656
[ "Apache-2.0" ]
3
2020-07-20T21:13:45.000Z
2021-01-29T18:41:20.000Z
# python3 # Copyright 2019 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
41.122715
88
0.660635
24e4b67c65f904e0aed6a9d78b2f58d656aad33e
2,700
py
Python
oi/Contest/self/IOI-Test-Round/puzzle/data/checker.py
Riteme/test
b511d6616a25f4ae8c3861e2029789b8ee4dcb8d
[ "BSD-Source-Code" ]
3
2018-08-30T09:43:20.000Z
2019-12-03T04:53:43.000Z
oi/Contest/self/IOI-Test-Round/puzzle/data/checker.py
Riteme/test
b511d6616a25f4ae8c3861e2029789b8ee4dcb8d
[ "BSD-Source-Code" ]
null
null
null
oi/Contest/self/IOI-Test-Round/puzzle/data/checker.py
Riteme/test
b511d6616a25f4ae8c3861e2029789b8ee4dcb8d
[ "BSD-Source-Code" ]
null
null
null
#!/usr/bin/env python # # Copyright 2017 riteme # from sys import argv, version from os.path import * if version[0] == '3': xrange = range if len(argv) == 1 or "--help" in argv or "-h" in argv: print("Participate answer checker & grader.") print("Usage: %s [ID] [--no-limit] [--help/-h]" % argv[0]) p...
23.275862
85
0.510741
7ca29ef138bfacee2476cfcc44f9aa99263e8e23
6,430
py
Python
mappyfile/validator.py
tomkralidis/mappyfile
4313f9e52f5c54198988e62c3e2ebc9223f174ef
[ "MIT" ]
1
2018-08-08T06:48:05.000Z
2018-08-08T06:48:05.000Z
mappyfile/validator.py
tomkralidis/mappyfile
4313f9e52f5c54198988e62c3e2ebc9223f174ef
[ "MIT" ]
null
null
null
mappyfile/validator.py
tomkralidis/mappyfile
4313f9e52f5c54198988e62c3e2ebc9223f174ef
[ "MIT" ]
null
null
null
import json import os import sys from collections import OrderedDict import logging import jsonschema import jsonref import mappyfile as utils log = logging.getLogger("mappyfile") PY2 = sys.version_info[0] < 3 if PY2: str = unicode # NOQA class Validator(object): def __init__(self): self.schemas = ...
33.14433
117
0.611975
569507451c36635dbb108eecc62b18de68082398
385
py
Python
day-10/python/part2.py
kayew/aoc-2020
55ea804c983aef4d3a7e159403247ec23a47aa10
[ "MIT" ]
null
null
null
day-10/python/part2.py
kayew/aoc-2020
55ea804c983aef4d3a7e159403247ec23a47aa10
[ "MIT" ]
null
null
null
day-10/python/part2.py
kayew/aoc-2020
55ea804c983aef4d3a7e159403247ec23a47aa10
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import sys from collections import defaultdict adapter_list = sorted([0] + [int(x.strip()) for x in open(sys.argv[1], "r").readlines()]) highest = adapter_list[-1] + 3 adapter_list.append(highest) combos = defaultdict(lambda: 0) combos[0] = 1 for x in adapter_list: combos[x] += combos[x ...
21.388889
89
0.675325
93320a72708991d2e7b088eda08192301a1f4c19
1,258
py
Python
merfi/tests/test_util.py
alfredodeza/merfi
899ca4cea60a335c6574a00696fd552b4460db28
[ "MIT" ]
2
2017-12-02T23:54:45.000Z
2021-04-29T15:45:13.000Z
merfi/tests/test_util.py
alfredodeza/merfi
899ca4cea60a335c6574a00696fd552b4460db28
[ "MIT" ]
35
2015-09-18T00:30:42.000Z
2019-01-24T22:46:12.000Z
merfi/tests/test_util.py
alfredodeza/merfi
899ca4cea60a335c6574a00696fd552b4460db28
[ "MIT" ]
2
2015-09-16T20:16:12.000Z
2017-12-02T23:54:16.000Z
from pytest import raises from merfi import util class TestInferPath(object): def test_no_last_argument(self): args = ['gpg', '--output', 'signed'] with raises(RuntimeError) as error: util.infer_path(args) assert 'is not a valid path' in str(error.value) def test_last_arg...
29.952381
62
0.63434
a8adcfc23d39e8953a157abec8786d4b13bb7c66
3,524
py
Python
ironic/api/controllers/v1/volume.py
armohamm/ironic
21093ca886ed736a7a25bf5e71e05d41e132fd2f
[ "Apache-2.0" ]
2
2019-06-17T21:37:53.000Z
2020-07-11T03:58:39.000Z
ironic/api/controllers/v1/volume.py
armohamm/ironic
21093ca886ed736a7a25bf5e71e05d41e132fd2f
[ "Apache-2.0" ]
5
2019-08-14T06:46:03.000Z
2021-12-13T20:01:25.000Z
ironic/api/controllers/v1/volume.py
armohamm/ironic
21093ca886ed736a7a25bf5e71e05d41e132fd2f
[ "Apache-2.0" ]
6
2019-06-13T12:49:33.000Z
2021-04-17T16:33:19.000Z
# Copyright (c) 2017 Hitachi, 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 ...
33.884615
79
0.661464
6f2f016788262e42295074a1229da84c64492b12
1,092
py
Python
python_exercises_folder/Exercises/cnpj.py
Kaique425/python_exercises
c203384d372d9ef7193300d6ce35857879d91839
[ "MIT" ]
null
null
null
python_exercises_folder/Exercises/cnpj.py
Kaique425/python_exercises
c203384d372d9ef7193300d6ce35857879d91839
[ "MIT" ]
null
null
null
python_exercises_folder/Exercises/cnpj.py
Kaique425/python_exercises
c203384d372d9ef7193300d6ce35857879d91839
[ "MIT" ]
null
null
null
import re regressives_numbers = [6, 5, 4, 3, 2, 9, 8, 7, 6, 5, 4, 3, 2] def validate_cnpj(cnpj): cnpj = clean_cnpj(cnpj) if is_sequence(cnpj): return False try: new_cnpj = calculate_digit(cnpj=cnpj, cnpj_digit=1) new_cnpj = calculate_digit(cnpj=cnpj, cnpj_digit=2) if new_...
21.84
61
0.582418
2fdb1776715872660cb429417ee01b2205a6ea7a
11,802
py
Python
ASR2.py
mn270/Recognition-phenomena-TIMIT-
a549e6e9b813555bde5d6f2803e4bb5f7dc1ea52
[ "MIT" ]
null
null
null
ASR2.py
mn270/Recognition-phenomena-TIMIT-
a549e6e9b813555bde5d6f2803e4bb5f7dc1ea52
[ "MIT" ]
null
null
null
ASR2.py
mn270/Recognition-phenomena-TIMIT-
a549e6e9b813555bde5d6f2803e4bb5f7dc1ea52
[ "MIT" ]
null
null
null
import python_speech_features as psf import scipy.io.wavfile as sciwav import os import glob import numpy as np import numpy import scipy.io.wavfile from scipy.fftpack import dct from sklearn.preprocessing import StandardScaler import random import tensorflow as tf import tensorflow.python.keras.backend as K from tenso...
42.15
133
0.611845
95cfad0340085f5af167901584fc5e6120b08369
1,366
py
Python
LineAlpha/LineApi/LineTracer.py
AnzPo/Des12
844df70cd8ab10fcb8108371b8d7e50b166810d0
[ "Apache-2.0" ]
null
null
null
LineAlpha/LineApi/LineTracer.py
AnzPo/Des12
844df70cd8ab10fcb8108371b8d7e50b166810d0
[ "Apache-2.0" ]
null
null
null
LineAlpha/LineApi/LineTracer.py
AnzPo/Des12
844df70cd8ab10fcb8108371b8d7e50b166810d0
[ "Apache-2.0" ]
1
2019-06-02T15:35:25.000Z
2019-06-02T15:35:25.000Z
# -*- coding: utf-8 -*- from .LineClient import LineClient from types import * from ..LineThrift.ttypes import OpType from .LineServer import url try: from thrift.protocol import fastbinary except: fastbinary = None class LineTracer(object): OpInterrupt = {} client = None def __ini...
29.695652
89
0.628111
33bc24d79d26b766bea32bc4d06086f2d084543e
275
py
Python
tests/artificial/transf_Difference/trend_ConstantTrend/cycle_12/ar_12/test_artificial_32_Difference_ConstantTrend_12_12_20.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
null
null
null
tests/artificial/transf_Difference/trend_ConstantTrend/cycle_12/ar_12/test_artificial_32_Difference_ConstantTrend_12_12_20.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
1
2019-11-30T23:39:38.000Z
2019-12-01T04:34:35.000Z
tests/artificial/transf_Difference/trend_ConstantTrend/cycle_12/ar_12/test_artificial_32_Difference_ConstantTrend_12_12_20.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
null
null
null
import pyaf.Bench.TS_datasets as tsds import pyaf.tests.artificial.process_artificial_dataset as art art.process_dataset(N = 32 , FREQ = 'D', seed = 0, trendtype = "ConstantTrend", cycle_length = 12, transform = "Difference", sigma = 0.0, exog_count = 20, ar_order = 12);
39.285714
170
0.738182
45f3ee3eaf6c8bd8d60f9f4c18b74561db4382d7
2,200
py
Python
tensorflow_probability/python/experimental/auto_batching/tfp_xla_test_case.py
matthieucoquet/probability
2426f4fc4743ceedc1a638a03d19ce6654ebff76
[ "Apache-2.0" ]
null
null
null
tensorflow_probability/python/experimental/auto_batching/tfp_xla_test_case.py
matthieucoquet/probability
2426f4fc4743ceedc1a638a03d19ce6654ebff76
[ "Apache-2.0" ]
null
null
null
tensorflow_probability/python/experimental/auto_batching/tfp_xla_test_case.py
matthieucoquet/probability
2426f4fc4743ceedc1a638a03d19ce6654ebff76
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 The TensorFlow Probability Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
37.288136
97
0.726364
8558cc12c1aa5ff3a51d33dce9ca63ca239f58db
2,168
py
Python
__init__.py
ThakeeNathees/localhost
098a9eab05d5645b32e5709e315f49830b4e978d
[ "MIT" ]
1
2021-05-23T21:37:13.000Z
2021-05-23T21:37:13.000Z
__init__.py
ThakeeNathees/localhost
098a9eab05d5645b32e5709e315f49830b4e978d
[ "MIT" ]
null
null
null
__init__.py
ThakeeNathees/localhost
098a9eab05d5645b32e5709e315f49830b4e978d
[ "MIT" ]
1
2021-04-29T06:03:50.000Z
2021-04-29T06:03:50.000Z
import sys, os from http.server import HTTPServer from .handler import ( Handler, _home_page_handler, ) from .response import ( HttpResponse, JsonResponse, Http404, render, _get_404_context, redirect, media_response, _static_handler ) from . import auth from .auth import admin_page from .urls import Pa...
33.875
110
0.630535
6232726565431ff968e0b5f9cc941a888cb9075f
448
py
Python
mezzanine/galleries/migrations/0002_auto_20141227_0224.py
interrogator/mezzanine
5011534749a2319891c35457dda61152407a6dde
[ "BSD-2-Clause" ]
null
null
null
mezzanine/galleries/migrations/0002_auto_20141227_0224.py
interrogator/mezzanine
5011534749a2319891c35457dda61152407a6dde
[ "BSD-2-Clause" ]
null
null
null
mezzanine/galleries/migrations/0002_auto_20141227_0224.py
interrogator/mezzanine
5011534749a2319891c35457dda61152407a6dde
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from django.db import migrations import mezzanine.core.fields class Migration(migrations.Migration): dependencies = [ ('galleries', '0001_initial'), ] operations = [ migrations.AlterField( model_name='galleryimage', name='_order', ...
22.4
84
0.602679
88e0ee4b5126da566502ba255355d25909374956
4,361
py
Python
tb_rest_client/models/models_pe/customer_id.py
samson0v/python_tb_rest_client
08ff7898740f7cec2170e85d5c3c89e222e967f7
[ "Apache-2.0" ]
30
2020-06-19T06:42:50.000Z
2021-08-23T21:16:36.000Z
tb_rest_client/models/models_pe/customer_id.py
samson0v/python_tb_rest_client
08ff7898740f7cec2170e85d5c3c89e222e967f7
[ "Apache-2.0" ]
25
2021-08-30T01:17:27.000Z
2022-03-16T14:10:14.000Z
tb_rest_client/models/models_pe/customer_id.py
samson0v/python_tb_rest_client
08ff7898740f7cec2170e85d5c3c89e222e967f7
[ "Apache-2.0" ]
23
2020-07-06T13:41:54.000Z
2021-08-23T21:04:50.000Z
# coding: utf-8 """ ThingsBoard REST API ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 OpenAPI spec version: 3.3.3PAAS-RC1 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F40...
29.268456
97
0.559734
4fcf8c5bef23383b384ac39574be95089bfa7d16
9,369
py
Python
src/cake/test/task.py
anlongfei/cake
8ede70a58516d2cf3117fcef050bc14046be91c9
[ "MIT" ]
14
2017-06-16T11:56:24.000Z
2022-01-27T15:09:22.000Z
src/cake/test/task.py
anlongfei/cake
8ede70a58516d2cf3117fcef050bc14046be91c9
[ "MIT" ]
19
2015-01-18T10:45:50.000Z
2019-12-19T06:02:24.000Z
src/cake/test/task.py
anlongfei/cake
8ede70a58516d2cf3117fcef050bc14046be91c9
[ "MIT" ]
6
2017-06-07T04:14:12.000Z
2021-03-24T14:25:53.000Z
"""Task Unit Tests. """ import unittest import threading import sys import cake.task class TaskTests(unittest.TestCase): def testTaskFunctionExecutedExactlyOnce(self): result = [] def f(): result.append(None) e = threading.Event() t = cake.task.Task(f) t.addCallback(e.set) ...
20.10515
65
0.57829
366c39818dee161e42d0eea8cc6b21722923eb06
4,052
py
Python
collaboration/telepathyclient.py
hafizyunus/TortugadeMexico
ed303715f77f79e697e33b3d0df082843ffc1492
[ "MIT" ]
1
2020-05-27T19:05:13.000Z
2020-05-27T19:05:13.000Z
collaboration/telepathyclient.py
hafizyunus/TortugadeMexico
ed303715f77f79e697e33b3d0df082843ffc1492
[ "MIT" ]
4
2018-02-14T01:29:55.000Z
2020-01-23T02:18:29.000Z
collaboration/telepathyclient.py
hafizyunus/TortugadeMexico
ed303715f77f79e697e33b3d0df082843ffc1492
[ "MIT" ]
4
2018-02-04T15:18:31.000Z
2020-05-27T16:21:56.000Z
# Copyright (C) 2010 Collabora Ltd. <http://www.collabora.co.uk/> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # ...
38.590476
79
0.663623
6db4cb3e60af234c64ad1e3d4646448e58378dfd
6,852
py
Python
reamber/sm/SMMapMeta.py
Eve-ning/reamber_base_py
6d19c84f2c110b60e633b82b73e0516396466f56
[ "MIT" ]
10
2020-06-28T11:16:36.000Z
2021-08-09T21:41:43.000Z
reamber/sm/SMMapMeta.py
Eve-ning/reamberPy
6d19c84f2c110b60e633b82b73e0516396466f56
[ "MIT" ]
35
2020-06-18T13:05:50.000Z
2022-02-18T10:13:35.000Z
reamber/sm/SMMapMeta.py
Eve-ning/reamber_base_py
6d19c84f2c110b60e633b82b73e0516396466f56
[ "MIT" ]
2
2021-05-26T17:05:06.000Z
2021-06-12T18:42:13.000Z
from dataclasses import dataclass from dataclasses import field from typing import List class SMMapDifficulty: BEGINNER: str = "Beginner" EASY: str = "Easy" MEDIUM: str = "Medium" HARD: str = "Hard" CHALLENGE: str = "Challenge" EDIT: str = "Edit" class SMMapChartTypes: # Full Description...
52.707692
113
0.638646
614fedc5d118cc5a4bf210fe6551afac33c5370a
8,356
py
Python
osmnx/geocoder.py
Picajoluna/osmnx
eb4fab8789abfa0c99569627d4d9d6318497ad9d
[ "MIT" ]
null
null
null
osmnx/geocoder.py
Picajoluna/osmnx
eb4fab8789abfa0c99569627d4d9d6318497ad9d
[ "MIT" ]
null
null
null
osmnx/geocoder.py
Picajoluna/osmnx
eb4fab8789abfa0c99569627d4d9d6318497ad9d
[ "MIT" ]
null
null
null
"""Geocode queries and create GeoDataFrames of place boundaries.""" import logging as lg from collections import OrderedDict import geopandas as gpd from . import downloader from . import projection from . import settings from . import utils def geocode(query): """ Geocode a query string to (lat, lng) with...
36.17316
94
0.663475
f6f551e1a0be75359d2927ba09ad33ac1e7e21f3
7,323
py
Python
bb_structural_pipeline/bb_pipeline_struct.py
yilewang/tvb-ukbb
9b89811e3c1acde1ecc73df9ff668bbdc6533d1b
[ "Apache-2.0" ]
4
2022-01-25T15:53:07.000Z
2022-02-04T01:24:45.000Z
bb_structural_pipeline/bb_pipeline_struct.py
yilewang/tvb-ukbb
9b89811e3c1acde1ecc73df9ff668bbdc6533d1b
[ "Apache-2.0" ]
11
2021-07-09T17:22:36.000Z
2021-12-07T22:43:20.000Z
bb_structural_pipeline/bb_pipeline_struct.py
yilewang/tvb-ukbb
9b89811e3c1acde1ecc73df9ff668bbdc6533d1b
[ "Apache-2.0" ]
2
2022-02-14T01:38:51.000Z
2022-02-18T20:38:32.000Z
#!/bin/env python # # Script name: bb_pipeline_struct.py # # Description: Script with the structural pipeline. # This script will call the rest of structural functions. # # Authors: Fidel Alfaro-Almagro, Stephen M. Smith & Mark Jenkinson # # Copyright 2017 University of Oxford # # Licensed under the Apache Licens...
35.038278
214
0.517957
53e06baf5ebf1aa972351528c846a2d866752fe1
779
py
Python
others/array_move_zeros_to_end.py
johnklee/algprac
51a7c872806aec261c5e3db6cbac47ec34516b4d
[ "Apache-2.0" ]
null
null
null
others/array_move_zeros_to_end.py
johnklee/algprac
51a7c872806aec261c5e3db6cbac47ec34516b4d
[ "Apache-2.0" ]
null
null
null
others/array_move_zeros_to_end.py
johnklee/algprac
51a7c872806aec261c5e3db6cbac47ec34516b4d
[ "Apache-2.0" ]
null
null
null
#!/usr/local/bin/python3 r''' Array Manipulation in Place: Coding Interview Question in Whiteboard Thursday ''' def move_zero_to_end(alist): nz_list = [] for i in range(len(alist)): if alist[i] != 0: nz_list.append(i) if len(nz_list) == len(alist) or len(nz_list) == 0: return a...
22.911765
77
0.57638
ee7169b4c6b649f6baf7cec7039c6d6a2d8c5f67
3,936
py
Python
project_euler/problem_144/sol1.py
TeddyFirman/Algorithm_Python
edbd50a97a62c2beb2a187e4c411c677aa43115e
[ "MIT" ]
null
null
null
project_euler/problem_144/sol1.py
TeddyFirman/Algorithm_Python
edbd50a97a62c2beb2a187e4c411c677aa43115e
[ "MIT" ]
null
null
null
project_euler/problem_144/sol1.py
TeddyFirman/Algorithm_Python
edbd50a97a62c2beb2a187e4c411c677aa43115e
[ "MIT" ]
null
null
null
""" In laser physics, a "white cell" is a mirror system that acts as a delay line for the laser beam. The beam enters the cell, bounces around on the mirrors, and eventually works its way back out. The specific white cell we will be considering is an ellipse with the equation 4x^2 + y^2 = 100 The section corr...
38.588235
88
0.667429
cd22327ea0b8ab35191e21ba14f53e319f284adc
383
py
Python
medcab/plotly-dash/dashboard.py
BobBriksz/front-end
2519659e732552c684b8eb2e39ec724788412faf
[ "MIT" ]
null
null
null
medcab/plotly-dash/dashboard.py
BobBriksz/front-end
2519659e732552c684b8eb2e39ec724788412faf
[ "MIT" ]
null
null
null
medcab/plotly-dash/dashboard.py
BobBriksz/front-end
2519659e732552c684b8eb2e39ec724788412faf
[ "MIT" ]
1
2021-01-04T23:03:34.000Z
2021-01-04T23:03:34.000Z
from dash import Dash def init_dashboard(server): """Create a Plotly Dash dashboard.""" dash_app = dash.Dash( server=server, routes_pathname_prefix='/dashapp/', external_stylesheets=[ '/static/dist/css/styles.css', ] ) # Create Dash Layout dash_app.layo...
21.277778
51
0.62141
6703edc9f4930b1f9a10ee0d863d14a2c8109ecb
202
py
Python
tests/watson/filters/test_abc.py
watsonpy/watson-filters
22e3473d4caa3a5b208eeecd6d810f58f2d3a834
[ "BSD-3-Clause" ]
null
null
null
tests/watson/filters/test_abc.py
watsonpy/watson-filters
22e3473d4caa3a5b208eeecd6d810f58f2d3a834
[ "BSD-3-Clause" ]
1
2021-12-03T23:47:40.000Z
2021-12-03T23:47:40.000Z
tests/watson/filters/test_abc.py
watsonpy/watson-filters
22e3473d4caa3a5b208eeecd6d810f58f2d3a834
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from pytest import raises from watson.filters import abc class TestFilterBase(object): def test_call_error(self): with raises(TypeError): abc.Filter()
18.363636
31
0.658416
227e3090643aebe3bd3e188e599fb111a3643dcb
3,085
py
Python
detection_training/coco/yolov4_resize416_multi/train_config.py
LANCEREN/simpleAICV-pytorch-ImageNet-COCO-training
86c1b38df3cdcb195ec5b6229c343f07a52aeb7b
[ "MIT" ]
154
2020-05-31T08:31:12.000Z
2021-05-14T02:46:32.000Z
detection_training/coco/yolov4_resize416_multi/train_config.py
LANCEREN/simpleAICV-pytorch-ImageNet-COCO-training
86c1b38df3cdcb195ec5b6229c343f07a52aeb7b
[ "MIT" ]
11
2021-05-20T09:02:50.000Z
2022-01-20T09:55:47.000Z
detection_training/coco/yolov4_resize416_multi/train_config.py
LANCEREN/simpleAICV-pytorch-ImageNet-COCO-training
86c1b38df3cdcb195ec5b6229c343f07a52aeb7b
[ "MIT" ]
37
2020-07-20T06:14:25.000Z
2021-05-18T01:27:19.000Z
import os import sys BASE_DIR = os.path.dirname( os.path.dirname(os.path.dirname(os.path.dirname( os.path.abspath(__file__))))) sys.path.append(BASE_DIR) from tools.path import COCO2017_path from simpleAICV.detection.models import yolov4 from simpleAICV.detection.losses import Yolov4Loss from simpleAICV.d...
33.901099
136
0.530308
022f3c82002345b7f4b3e36792908a65c7213bc8
1,104
py
Python
guillotina/component/testing.py
rboixaderg/guillotina
fcae65c2185222272f3b8fee4bc2754e81e0e983
[ "BSD-2-Clause" ]
173
2017-03-10T18:26:12.000Z
2022-03-03T06:48:56.000Z
guillotina/component/testing.py
rboixaderg/guillotina
fcae65c2185222272f3b8fee4bc2754e81e0e983
[ "BSD-2-Clause" ]
921
2017-03-08T14:04:43.000Z
2022-03-30T10:28:56.000Z
guillotina/component/testing.py
rboixaderg/guillotina
fcae65c2185222272f3b8fee4bc2754e81e0e983
[ "BSD-2-Clause" ]
60
2017-03-16T19:59:44.000Z
2022-03-03T06:48:59.000Z
############################################################################## # # Copyright (c) 2001, 2002 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # TH...
28.307692
78
0.622283
9a663a604d3f60dd9feca0bf7d0559d994287fa9
7,068
py
Python
numpyro/util.py
Anthonymcqueen21/numpyro
94efe3a35491465eba66465b4dd1d4fb870d6c8c
[ "MIT" ]
1
2019-06-24T04:27:18.000Z
2019-06-24T04:27:18.000Z
numpyro/util.py
Anthonymcqueen21/numpyro
94efe3a35491465eba66465b4dd1d4fb870d6c8c
[ "MIT" ]
null
null
null
numpyro/util.py
Anthonymcqueen21/numpyro
94efe3a35491465eba66465b4dd1d4fb870d6c8c
[ "MIT" ]
null
null
null
from collections import namedtuple from contextlib import contextmanager import random import numpy as onp import tqdm from jax import jit, lax, ops, vmap from jax.flatten_util import ravel_pytree import jax.numpy as np from jax.tree_util import register_pytree_node _DATA_TYPES = {} _DISABLE_CONTROL_FLOW_PRIM = Fals...
35.164179
101
0.630164
6dafad1c348fe7504b6adc6f9bef8c99584e152c
4,987
py
Python
openspeech/modules/relative_multi_head_attention.py
CanYouImagine/openspeech
095d78828a9caed0151727897f35534231947846
[ "Apache-2.0", "MIT" ]
207
2021-07-22T02:04:47.000Z
2022-03-31T07:24:12.000Z
openspeech/modules/relative_multi_head_attention.py
tqslj2/openspeech
10307587f08615224df5a868fb5249c68c70b12d
[ "Apache-2.0", "MIT" ]
81
2021-07-21T16:52:22.000Z
2022-03-31T14:56:54.000Z
openspeech/modules/relative_multi_head_attention.py
tqslj2/openspeech
10307587f08615224df5a868fb5249c68c70b12d
[ "Apache-2.0", "MIT" ]
43
2021-07-21T16:33:27.000Z
2022-03-23T09:43:49.000Z
# MIT License # # Copyright (c) 2021 Soohwan Kim and Sangchun Ha and Soyoung Cho # # 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...
40.877049
110
0.67295
73df76d75d09534335e8e60d3db04b825a0152b1
8,059
py
Python
mmdetection/tools/analysis_tools/robustness_eval.py
lizhaoliu-Lec/Conformer
577cff26b78b338f035c075727c408fca3272208
[ "Apache-2.0" ]
null
null
null
mmdetection/tools/analysis_tools/robustness_eval.py
lizhaoliu-Lec/Conformer
577cff26b78b338f035c075727c408fca3272208
[ "Apache-2.0" ]
null
null
null
mmdetection/tools/analysis_tools/robustness_eval.py
lizhaoliu-Lec/Conformer
577cff26b78b338f035c075727c408fca3272208
[ "Apache-2.0" ]
null
null
null
import os.path as osp from argparse import ArgumentParser import mmcv import numpy as np def print_coco_results(results): def _print(result, ap=1, iouThr=None, areaRng='all', maxDets=100): titleStr = 'Average Precision' if ap == 1 else 'Average Recall' typeStr = '(AP)' if ap == 1 else '(AR)' ...
32.62753
79
0.554287
37a667e590d47df7ad5d5f36165bcef00c989b6b
1,842
py
Python
official/vision/beta/dataloaders/utils.py
gujralsanyam22/models
d96f8f043dbe2b5ca8ea1785f57df8faf68d8875
[ "Apache-2.0" ]
15
2018-08-15T19:29:39.000Z
2021-11-05T02:14:59.000Z
official/vision/beta/dataloaders/utils.py
yangxl-2014-fe/models
11ea5237818e791a5717716d5413977f4c4db1e3
[ "Apache-2.0" ]
5
2020-10-01T09:02:34.000Z
2021-02-21T12:50:11.000Z
official/vision/beta/dataloaders/utils.py
yangxl-2014-fe/models
11ea5237818e791a5717716d5413977f4c4db1e3
[ "Apache-2.0" ]
8
2019-06-06T20:37:15.000Z
2022-03-04T13:54:38.000Z
# Copyright 2020 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
40.043478
80
0.711183
f788c16c24983e25f2c6c22334da81ea3519c3c6
6,369
py
Python
SARSA/SARSA.py
knit-pk/AI-Section-2017
a744b130defe58050264a37d88732af66ecabf40
[ "MIT" ]
2
2017-11-17T13:32:55.000Z
2017-11-17T21:29:58.000Z
SARSA/SARSA.py
knit-pk/ai-section-2017
a744b130defe58050264a37d88732af66ecabf40
[ "MIT" ]
null
null
null
SARSA/SARSA.py
knit-pk/ai-section-2017
a744b130defe58050264a37d88732af66ecabf40
[ "MIT" ]
null
null
null
''' Example implementation of SARSA algorithm for learning the path through frozen lake. The is_slippery flag lets us change the rules of the game, if True the probability of changing the chosen direction is 4 out of 10. ''' import gym import numpy as np import time import pygame class Game: stan = 0; def _...
28.057269
87
0.477626
1619aa8873afea22e625673b61d1ba0a37ecbf5c
5,574
py
Python
fastapi_asyncpg/__init__.py
sashad/fastapi_asyncpg
7a6155e55b66c6f4dd22d11b5a4ad9af2d8efeff
[ "MIT" ]
null
null
null
fastapi_asyncpg/__init__.py
sashad/fastapi_asyncpg
7a6155e55b66c6f4dd22d11b5a4ad9af2d8efeff
[ "MIT" ]
null
null
null
fastapi_asyncpg/__init__.py
sashad/fastapi_asyncpg
7a6155e55b66c6f4dd22d11b5a4ad9af2d8efeff
[ "MIT" ]
null
null
null
from __future__ import annotations from fastapi import FastAPI import asyncpg import typing async def noop(db: asyncpg.Connection): return class configure_asyncpg: def __init__( self, dsn: str, *, init_db: typing.Callable = None, # callable for running sql on init ...
30.293478
97
0.601005
9f066043f55a510f45e9edae6fc8cb276b861771
28,990
py
Python
tests/validation/tests/v3_api/test_monitoring.py
gezb/rancher
e11d4781405448701b706cbf505837bf932ac6d9
[ "Apache-2.0" ]
1
2020-02-19T08:36:18.000Z
2020-02-19T08:36:18.000Z
tests/validation/tests/v3_api/test_monitoring.py
guichuanghua/rancher
88be50a880482e3f32d851b9122ee7fc1b1daca3
[ "Apache-2.0" ]
null
null
null
tests/validation/tests/v3_api/test_monitoring.py
guichuanghua/rancher
88be50a880482e3f32d851b9122ee7fc1b1daca3
[ "Apache-2.0" ]
null
null
null
import pytest import copy from .common import * # NOQA namespace = { "cluster": None, "project": None, "system_project": None, "system_project_client": None } cluster_query_template = { "obj": None, "action_name": "query", "filters": {}, "metricParams": {}, "interval": "5s", "...
38.094612
79
0.693446
f4709b4fa73fd04ac14b56f70a848ee104668d76
2,618
py
Python
src/extraction.py
glemaitre/bow-sklearn-example
202b1e388596d922319a0e5586d3b96bbabf359a
[ "MIT" ]
null
null
null
src/extraction.py
glemaitre/bow-sklearn-example
202b1e388596d922319a0e5586d3b96bbabf359a
[ "MIT" ]
null
null
null
src/extraction.py
glemaitre/bow-sklearn-example
202b1e388596d922319a0e5586d3b96bbabf359a
[ "MIT" ]
null
null
null
from scipy.misc import imread from sklearn.feature_extraction.image import extract_patches_2d from sklearn.decomposition import PCA import numpy as np import os from joblib import Parallel, delayed import multiprocessing def proc_image(path_image, patch_size=(9,9), max_patches=10000): # Parameter for the patch...
31.542169
90
0.640565
0dc8816eceeefa2e4ec18026e1d0e59c283fa0d9
1,278
py
Python
assign_gt_distribution/save_txt.py
SunshineOnLeft/share
cca0f32fbedb935e5a338ddfcb2694701049f907
[ "Apache-2.0" ]
1
2020-04-28T11:42:04.000Z
2020-04-28T11:42:04.000Z
assign_gt_distribution/save_txt.py
SunshineOnLeft/mmdetection
cca0f32fbedb935e5a338ddfcb2694701049f907
[ "Apache-2.0" ]
null
null
null
assign_gt_distribution/save_txt.py
SunshineOnLeft/mmdetection
cca0f32fbedb935e5a338ddfcb2694701049f907
[ "Apache-2.0" ]
null
null
null
def save_txt(name, pos_gt_bboxes_size_max, gt_bboxes_size_mean, gt_bboxes_size_std, initiallize_csv): print("gt_bboxes_size_mean", gt_bboxes_size_mean) print("gt_bboxes_size_std", gt_bboxes_size_std) if initiallize_csv: initiallize_csv = 0 headers = ['p3','p4','p5','p6','p7'] with o...
53.25
101
0.600939
3f18470344020d83e7dd1d65e0f43d7adef00e38
579
py
Python
trinity/components/builtin/metrics/registry.py
AYCH-Inc/aych.eth.client
1c8be83cebffd889c1c98d48605bba741743f31d
[ "MIT" ]
null
null
null
trinity/components/builtin/metrics/registry.py
AYCH-Inc/aych.eth.client
1c8be83cebffd889c1c98d48605bba741743f31d
[ "MIT" ]
null
null
null
trinity/components/builtin/metrics/registry.py
AYCH-Inc/aych.eth.client
1c8be83cebffd889c1c98d48605bba741743f31d
[ "MIT" ]
null
null
null
import time from types import ModuleType from typing import Dict, Any from pyformance import MetricsRegistry class HostMetricsRegistry(MetricsRegistry): def __init__(self, host: str, clock: ModuleType = time) -> None: super().__init__(clock) self.host = host def dump_metrics(self) -> Dict[s...
26.318182
98
0.66494
a00f00222d693191cf1f99690c0d3a6a91f89010
1,727
py
Python
PythonEngine/VanillaClass.py
marioharper182/OptionsPricing
0212a1e421380e7a903439aaef93d99373e71fc6
[ "Apache-2.0" ]
null
null
null
PythonEngine/VanillaClass.py
marioharper182/OptionsPricing
0212a1e421380e7a903439aaef93d99373e71fc6
[ "Apache-2.0" ]
null
null
null
PythonEngine/VanillaClass.py
marioharper182/OptionsPricing
0212a1e421380e7a903439aaef93d99373e71fc6
[ "Apache-2.0" ]
null
null
null
__author__ = 'HarperMain' import numpy as np from numpy import exp, log, sqrt from scipy.stats import norm class Vanilla(object): def __init__(self, flag, S, K, r, v, T, div): self.Vanilla = self.BlackSholes(flag, float(S), float(K), float(r), float(v), ...
33.211538
105
0.539085
97ba86725dc3ce37cfe7f39dcc4726faf5873897
711
py
Python
ditto/pinboard/migrations/0018_auto_20160414_1637.py
garrettc/django-ditto
fcf15beb8f9b4d61634efd4a88064df12ee16a6f
[ "MIT" ]
54
2016-08-15T17:32:41.000Z
2022-02-27T03:32:05.000Z
ditto/pinboard/migrations/0018_auto_20160414_1637.py
garrettc/django-ditto
fcf15beb8f9b4d61634efd4a88064df12ee16a6f
[ "MIT" ]
229
2015-07-23T12:50:47.000Z
2022-03-24T10:33:20.000Z
ditto/pinboard/migrations/0018_auto_20160414_1637.py
garrettc/django-ditto
fcf15beb8f9b4d61634efd4a88064df12ee16a6f
[ "MIT" ]
8
2015-09-10T17:10:35.000Z
2022-03-25T13:05:01.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ("pinboard", "0017_auto_20160413_0906"), ] operations = [ migrations.AlterField( model_name="bookmark", ...
24.517241
69
0.561181
5ae0f79be99bc946cfed14af3f17815f12a23bb1
2,079
py
Python
python/kserve/test/test_v1beta1_explainer_config.py
ittus/kserve
922a9b7e8a9a86b5ae65faf4ce863927873fd456
[ "Apache-2.0" ]
1,146
2019-03-27T21:14:34.000Z
2021-09-22T08:36:46.000Z
python/kserve/test/test_v1beta1_explainer_config.py
ittus/kserve
922a9b7e8a9a86b5ae65faf4ce863927873fd456
[ "Apache-2.0" ]
1,803
2019-03-27T22:16:02.000Z
2021-09-22T15:27:44.000Z
python/kserve/test/test_v1beta1_explainer_config.py
ittus/kserve
922a9b7e8a9a86b5ae65faf4ce863927873fd456
[ "Apache-2.0" ]
573
2019-03-27T21:14:58.000Z
2021-09-20T21:15:52.000Z
# Copyright 2021 The KServe Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
29.7
95
0.688312
1b753960b369bc636d817a9a157a0c0200787288
11,445
py
Python
src/cranet/nn/modules/module.py
shizuku/cranet
4c86ad16029ed76a74e22b5e5e4c21267d6b9996
[ "MIT" ]
4
2021-10-31T13:31:13.000Z
2021-12-11T08:45:36.000Z
src/cranet/nn/modules/module.py
Azathoth1729/cranet
4c86ad16029ed76a74e22b5e5e4c21267d6b9996
[ "MIT" ]
null
null
null
src/cranet/nn/modules/module.py
Azathoth1729/cranet
4c86ad16029ed76a74e22b5e5e4c21267d6b9996
[ "MIT" ]
2
2021-10-31T13:34:28.000Z
2021-11-21T09:11:46.000Z
from __future__ import annotations from cranet import Tensor from ..parameter import Parameter from typing import ( Iterator, Iterable, Optional, List, Dict, Set, Union, Tuple, Callable, ) from collections import OrderedDict class Module: _version = 1 training: bool ...
38.023256
113
0.571865
be0f55848f464a912443f5b7d114789d41bdcd34
542
py
Python
example.py
efrontier-io/gnosis-extension
7212e92cc0902ace0f2800762e1d8c5784dddea8
[ "MIT" ]
null
null
null
example.py
efrontier-io/gnosis-extension
7212e92cc0902ace0f2800762e1d8c5784dddea8
[ "MIT" ]
null
null
null
example.py
efrontier-io/gnosis-extension
7212e92cc0902ace0f2800762e1d8c5784dddea8
[ "MIT" ]
null
null
null
import os from extensions.gnosis_extension import GnosisExchange def main(): if not os.getenv('GN_PRIVATE'): print(""" Usage: place your private key to GN_PRIVATE: export GN_PRIVATE run example: python example.py """...
22.583333
86
0.564576
c7d6c5f5c9315ecea1c73cc08a574e0cfd032eff
1,487
py
Python
nipype/interfaces/fsl/tests/test_auto_CopyGeom.py
moloney/nipype
a7a9c85c79cb1412ba03406074f83200447ef50b
[ "Apache-2.0" ]
7
2017-02-17T08:54:26.000Z
2022-03-10T20:57:23.000Z
nipype/interfaces/fsl/tests/test_auto_CopyGeom.py
moloney/nipype
a7a9c85c79cb1412ba03406074f83200447ef50b
[ "Apache-2.0" ]
1
2016-04-25T15:07:09.000Z
2016-04-25T15:07:09.000Z
nipype/interfaces/fsl/tests/test_auto_CopyGeom.py
moloney/nipype
a7a9c85c79cb1412ba03406074f83200447ef50b
[ "Apache-2.0" ]
2
2017-09-23T16:22:00.000Z
2019-08-01T14:18:52.000Z
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from __future__ import unicode_literals from ..utils import CopyGeom def test_CopyGeom_inputs(): input_map = dict( args=dict(argstr='%s', ), dest_file=dict( argstr='%s', copyfile=True, mandatory=True, ...
27.537037
67
0.535306
0568e1e5e39136520add27310c9317e27cd461cb
975
py
Python
src/main.py
ericponce/assassin-server
f7e87af00ce784b33a3985d7115caba8e5b7c359
[ "MIT" ]
null
null
null
src/main.py
ericponce/assassin-server
f7e87af00ce784b33a3985d7115caba8e5b7c359
[ "MIT" ]
null
null
null
src/main.py
ericponce/assassin-server
f7e87af00ce784b33a3985d7115caba8e5b7c359
[ "MIT" ]
null
null
null
#!/bin/python import email_util import database import sqlite3 if __name__ == "__main__": f = open('email_config.cfg', 'r') username = f.readline().strip() password = f.readline().strip() dbase = f.readline().strip() f.close() database.init_table(dbase); while(1): num, sender, body = email_util.receive_ema...
27.857143
79
0.685128
51c3b090aab506c5c5b7f7161d5fe8e2f7c5d35f
12,997
py
Python
quid/quid/training/data.py
hovinhthinh/Qsearch
ed450efbb0eebe1a5ad625422edb435b402b096e
[ "Apache-2.0" ]
7
2022-01-26T16:37:56.000Z
2022-02-19T09:31:55.000Z
quid/quid/training/data.py
hovinhthinh/Qsearch
ed450efbb0eebe1a5ad625422edb435b402b096e
[ "Apache-2.0" ]
null
null
null
quid/quid/training/data.py
hovinhthinh/Qsearch
ed450efbb0eebe1a5ad625422edb435b402b096e
[ "Apache-2.0" ]
null
null
null
import gzip import json import math import multiprocessing as mp import os import time from functools import lru_cache from nltk.stem import PorterStemmer from nltk.tokenize import word_tokenize from quantity.kb import parse from util.iterutils import chunk from util.mongo import get_collection, open_client, close_cl...
31.019093
134
0.556898
58e7949850053c3cd8529f45ac0d6d66594a7f04
1,493
py
Python
polyaxon/signals/utils.py
elyase/polyaxon
1c19f059a010a6889e2b7ea340715b2bcfa382a0
[ "MIT" ]
null
null
null
polyaxon/signals/utils.py
elyase/polyaxon
1c19f059a010a6889e2b7ea340715b2bcfa382a0
[ "MIT" ]
null
null
null
polyaxon/signals/utils.py
elyase/polyaxon
1c19f059a010a6889e2b7ea340715b2bcfa382a0
[ "MIT" ]
null
null
null
from db.models.bookmarks import Bookmark from libs.paths.data_paths import validate_persistence_data from libs.paths.outputs_paths import validate_persistence_outputs from schemas.environments import PersistenceConfig def set_tags(instance): if not instance.tags and instance.specification: instance.tags =...
41.472222
95
0.816477
8f41f982cdf2b79153994102ddea19d2d3273072
94,671
py
Python
plotly_study/graph_objs/histogram/marker/__init__.py
lucasiscovici/plotly_py
42ab769febb45fbbe0a3c677dc4306a4f59cea36
[ "MIT" ]
null
null
null
plotly_study/graph_objs/histogram/marker/__init__.py
lucasiscovici/plotly_py
42ab769febb45fbbe0a3c677dc4306a4f59cea36
[ "MIT" ]
null
null
null
plotly_study/graph_objs/histogram/marker/__init__.py
lucasiscovici/plotly_py
42ab769febb45fbbe0a3c677dc4306a4f59cea36
[ "MIT" ]
null
null
null
from plotly_study.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): # autocolorscale # -------------- @property def autocolorscale(self): """ Determines whether the colorscale is a default palette (...
37.883553
108
0.574706
86956dd638793dd23a4857313ce9bcc56abb5cbb
15,278
py
Python
shellpartylib/lib/log.py
satoshichain/satoshiparty-lib
87b99678e5498b1f536f9be589b1b0cde6f21ad0
[ "MIT" ]
null
null
null
shellpartylib/lib/log.py
satoshichain/satoshiparty-lib
87b99678e5498b1f536f9be589b1b0cde6f21ad0
[ "MIT" ]
null
null
null
shellpartylib/lib/log.py
satoshichain/satoshiparty-lib
87b99678e5498b1f536f9be589b1b0cde6f21ad0
[ "MIT" ]
null
null
null
import logging logger = logging.getLogger(__name__) import decimal D = decimal.Decimal import binascii import collections import json import time from datetime import datetime from dateutil.tz import tzlocal import os from colorlog import ColoredFormatter from shellpartylib.lib import config from shellpartylib.lib imp...
54.177305
520
0.6133
b68f65ddbece6a49234e2dd5b0472a96cf419c32
8,359
py
Python
darkhex/algorithms/pone_optimal.py
BedirT/dark-hex-tools
c4b803253e57d3c87edddde6e82740c643378dde
[ "MIT" ]
null
null
null
darkhex/algorithms/pone_optimal.py
BedirT/dark-hex-tools
c4b803253e57d3c87edddde6e82740c643378dde
[ "MIT" ]
10
2022-01-16T05:55:09.000Z
2022-03-09T20:21:21.000Z
darkhex/algorithms/pone_optimal.py
BedirT/darkhex
c4b803253e57d3c87edddde6e82740c643378dde
[ "MIT" ]
null
null
null
# PONE (Probability One) # # Finds all probability one wins for the players for the game Dark Hex # Assuming both players are playing optimally. # # Uses pyspiel states to traverse the tree. # # Uses a dictionary to save the states that are definite win states. # These data can be used to early stop when doing search o...
40.1875
82
0.567532
4e7c44d1048b71433e1784c3807957ae6cb3b73b
1,592
py
Python
src/apps/logs/models.py
COAStatistics/alss
e1b14cb13de7b8455fa6835587cb1ceb16e4595c
[ "MIT" ]
null
null
null
src/apps/logs/models.py
COAStatistics/alss
e1b14cb13de7b8455fa6835587cb1ceb16e4595c
[ "MIT" ]
null
null
null
src/apps/logs/models.py
COAStatistics/alss
e1b14cb13de7b8455fa6835587cb1ceb16e4595c
[ "MIT" ]
null
null
null
from django.db.models import ( Model, IntegerField, PositiveIntegerField, ForeignKey, DateTimeField, CASCADE, Q, ) from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.utils.translation import ugettext_lazy as...
27.929825
71
0.670854
fe90ec972f67e365632b690120f82c991b7e3dd5
2,683
py
Python
tests/io/epmc/test_client.py
wellcometrust/WellcomeML
f7f5427f6dfdc6e5ee1342764263c6411e0f9bdf
[ "MIT" ]
29
2020-01-31T17:05:38.000Z
2021-12-14T14:17:55.000Z
tests/io/epmc/test_client.py
wellcometrust/WellcomeML
f7f5427f6dfdc6e5ee1342764263c6411e0f9bdf
[ "MIT" ]
342
2020-02-05T10:40:43.000Z
2022-03-17T19:50:23.000Z
tests/io/epmc/test_client.py
wellcometrust/WellcomeML
f7f5427f6dfdc6e5ee1342764263c6411e0f9bdf
[ "MIT" ]
9
2020-06-07T17:01:00.000Z
2021-11-24T16:03:38.000Z
from unittest.mock import MagicMock import pytest from wellcomeml.io.epmc.client import EPMCClient @pytest.fixture def epmc_client(): return EPMCClient( max_retries=3 ) def test_search(epmc_client): epmc_client._execute_query = MagicMock() epmc_client.search( "session", "query", res...
30.146067
85
0.714499
92df3ece3bbe871212b0aaf8e2edd13bf3d236d9
746
py
Python
django-guestbook/apps/brounder/brounder/wsgi.py
ser0090/deployment-pm
41d3174e0516d519aad5a248028f7c12fc84f27e
[ "MIT" ]
null
null
null
django-guestbook/apps/brounder/brounder/wsgi.py
ser0090/deployment-pm
41d3174e0516d519aad5a248028f7c12fc84f27e
[ "MIT" ]
null
null
null
django-guestbook/apps/brounder/brounder/wsgi.py
ser0090/deployment-pm
41d3174e0516d519aad5a248028f7c12fc84f27e
[ "MIT" ]
null
null
null
# Copyright 2015 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
32.434783
74
0.774799
87d0f52128e7c7e84243f57acee38471b5d4b396
651
py
Python
src-server/app/handlers/apis/about_modules.py
mjmcconnell/sra
ff1c2563dead2fe4d81cda3d431482defd0f6a62
[ "Apache-2.0" ]
null
null
null
src-server/app/handlers/apis/about_modules.py
mjmcconnell/sra
ff1c2563dead2fe4d81cda3d431482defd0f6a62
[ "Apache-2.0" ]
null
null
null
src-server/app/handlers/apis/about_modules.py
mjmcconnell/sra
ff1c2563dead2fe4d81cda3d431482defd0f6a62
[ "Apache-2.0" ]
null
null
null
"""Api endpoints to interactions for the Image ndb model """ # local imports from app.base.handlers import AdminAjaxHandler from app.handlers.apis.mixins import ListCreateMixin from app.handlers.apis.mixins import OrderMixin from app.handlers.apis.mixins import RetrieveUpdateDeleteMixin from app.forms.about_modules im...
27.125
63
0.809524
226986db0791ced185b117db5de3e962f8feac47
3,306
py
Python
examples/adspygoogle/dfa/v1_20/create_rotation_group.py
cherry-wb/googleads-python-lib
24a1ecb7c1cca5af3624a3b03ebaa7f5147b4a04
[ "Apache-2.0" ]
null
null
null
examples/adspygoogle/dfa/v1_20/create_rotation_group.py
cherry-wb/googleads-python-lib
24a1ecb7c1cca5af3624a3b03ebaa7f5147b4a04
[ "Apache-2.0" ]
null
null
null
examples/adspygoogle/dfa/v1_20/create_rotation_group.py
cherry-wb/googleads-python-lib
24a1ecb7c1cca5af3624a3b03ebaa7f5147b4a04
[ "Apache-2.0" ]
2
2020-04-02T19:00:31.000Z
2020-08-06T03:28:38.000Z
#!/usr/bin/python # # Copyright 2013 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
32.097087
80
0.692377
56d09c916a7cf0d7a2e5c88e24b522522d8d55cf
1,691
py
Python
ivi/agilent/agilentDSOX92004A.py
sacherjj/python-ivi
6dd1ba93d65dc30a652a3a1b34c66921d94315e8
[ "MIT" ]
161
2015-01-23T17:43:01.000Z
2022-03-29T14:42:42.000Z
ivi/agilent/agilentDSOX92004A.py
sacherjj/python-ivi
6dd1ba93d65dc30a652a3a1b34c66921d94315e8
[ "MIT" ]
45
2015-01-15T13:35:04.000Z
2021-06-03T01:58:55.000Z
ivi/agilent/agilentDSOX92004A.py
sacherjj/python-ivi
6dd1ba93d65dc30a652a3a1b34c66921d94315e8
[ "MIT" ]
87
2015-01-31T10:55:23.000Z
2022-03-17T08:18:47.000Z
""" Python Interchangeable Virtual Instrument Library Copyright (c) 2012-2017 Alex Forencich 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...
37.577778
86
0.755766
2b62a46c27dfc2ef57a7adef054319f893fa09b4
482
py
Python
daemon/core/gui/graph/shapeutils.py
alehmannFRA-UAS/core
bcf74297851e40e383c279f1f0a7eff3257c258b
[ "BSD-2-Clause" ]
463
2015-07-28T16:28:12.000Z
2022-03-31T16:11:29.000Z
daemon/core/gui/graph/shapeutils.py
alehmannFRA-UAS/core
bcf74297851e40e383c279f1f0a7eff3257c258b
[ "BSD-2-Clause" ]
392
2015-08-07T09:14:40.000Z
2022-03-31T18:12:28.000Z
daemon/core/gui/graph/shapeutils.py
alehmannFRA-UAS/core
bcf74297851e40e383c279f1f0a7eff3257c258b
[ "BSD-2-Clause" ]
163
2015-07-30T15:54:03.000Z
2022-03-21T22:54:03.000Z
import enum from typing import Set class ShapeType(enum.Enum): MARKER = "marker" OVAL = "oval" RECTANGLE = "rectangle" TEXT = "text" SHAPES: Set[ShapeType] = {ShapeType.OVAL, ShapeType.RECTANGLE} def is_draw_shape(shape_type: ShapeType) -> bool: return shape_type in SHAPES def is_shape_text(...
19.28
62
0.711618
625922d735eb5677c96ea74384b6bba56c2dce1b
8,128
py
Python
shgp/models/pgpr.py
GiovanniPasserello/SHGP
7b8d06eaeb00cb745c4ad449524dfe97d404fd4e
[ "MIT" ]
null
null
null
shgp/models/pgpr.py
GiovanniPasserello/SHGP
7b8d06eaeb00cb745c4ad449524dfe97d404fd4e
[ "MIT" ]
null
null
null
shgp/models/pgpr.py
GiovanniPasserello/SHGP
7b8d06eaeb00cb745c4ad449524dfe97d404fd4e
[ "MIT" ]
null
null
null
from typing import Optional, Tuple import numpy as np import tensorflow as tf from gpflow.config import default_float from gpflow.covariances.dispatch import Kuf, Kuu from gpflow.inducing_variables import InducingPoints from gpflow.kernels import Kernel from gpflow.mean_functions import MeanFunction from gpflow.model...
39.456311
115
0.642347
31bea9b848fc63ecddccce91c34c0f75e9e84d13
1,662
py
Python
Fuzzy-C/fuzzy_c.py
ritafolisi/Tirocinio
c9a14ac33ab20c3c6524d32de4634f93ece001fb
[ "CC-BY-4.0" ]
null
null
null
Fuzzy-C/fuzzy_c.py
ritafolisi/Tirocinio
c9a14ac33ab20c3c6524d32de4634f93ece001fb
[ "CC-BY-4.0" ]
null
null
null
Fuzzy-C/fuzzy_c.py
ritafolisi/Tirocinio
c9a14ac33ab20c3c6524d32de4634f93ece001fb
[ "CC-BY-4.0" ]
null
null
null
from FCM import * import logging import numpy as np def fcm_script(data): #Da utilizzare se so a priori i nomi delle colonne #feat1=sys.argv[2] #feat2=sys.argv[3] #labels=sys.argv[4] dataset=pd.read_csv(data) # extract features and labels #X = dataset[[feat1, feat2]].values #y = dataset[labels].values X =...
23.083333
135
0.700963
aeb5ee7d0d39f54632891961fa10b710da214b40
57,466
py
Python
teimedit.py
gmaterni/teimedpy
f9cf58a37ec30fde406dce677e160bcbb120f746
[ "MIT" ]
null
null
null
teimedit.py
gmaterni/teimedpy
f9cf58a37ec30fde406dce677e160bcbb120f746
[ "MIT" ]
null
null
null
teimedit.py
gmaterni/teimedpy
f9cf58a37ec30fde406dce677e160bcbb120f746
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # coding: utf-8 from pdb import set_trace import platform import argparse import os import pprint import sys import re import tkinter as tk import tkinter.filedialog as fdialog import tkinter.messagebox as mbox from lxml import etree import teimedlib.check_teimed as chk import teimedlib.pathuti...
35.341943
89
0.54949
46fcfa76bc605cf66195434120e084f9bd607f0d
5,857
py
Python
tests/test_events/test_events_cloudformation.py
gtourkas/moto
307104417b579d23d02f670ff55217a2d4a16bee
[ "Apache-2.0" ]
5,460
2015-01-01T01:11:17.000Z
2022-03-31T23:45:38.000Z
tests/test_events/test_events_cloudformation.py
gtourkas/moto
307104417b579d23d02f670ff55217a2d4a16bee
[ "Apache-2.0" ]
4,475
2015-01-05T19:37:30.000Z
2022-03-31T13:55:12.000Z
tests/test_events/test_events_cloudformation.py
gtourkas/moto
307104417b579d23d02f670ff55217a2d4a16bee
[ "Apache-2.0" ]
1,831
2015-01-14T00:00:44.000Z
2022-03-31T20:30:04.000Z
import pytest import copy from string import Template import boto3 import json from botocore.exceptions import ClientError from moto import mock_cloudformation, mock_events import sure # noqa # pylint: disable=unused-import from moto.core import ACCOUNT_ID archive_template = Template( json.dumps( { ...
30.664921
108
0.619942
fd54d87fc0f387ea49e4fb6a47d4b1dec8ae9230
5,148
py
Python
A2C/task0.py
JohnJim0816/rl-tutorials
e99daea815da85f9f25dff2d01b030249a203d22
[ "MIT" ]
16
2021-04-07T03:03:59.000Z
2021-10-05T17:49:45.000Z
A2C/task0.py
JohnJim0816/rl-tutorials
e99daea815da85f9f25dff2d01b030249a203d22
[ "MIT" ]
1
2021-07-20T02:46:23.000Z
2021-10-04T14:57:18.000Z
A2C/task0.py
JohnJim0816/rl-tutorials
e99daea815da85f9f25dff2d01b030249a203d22
[ "MIT" ]
8
2021-04-09T03:24:12.000Z
2021-10-10T06:41:16.000Z
import sys import os curr_path = os.path.dirname(os.path.abspath(__file__)) # 当前文件所在绝对路径 parent_path = os.path.dirname(curr_path) # 父路径 sys.path.append(parent_path) # 添加路径到系统路径 import gym import numpy as np import torch import torch.optim as optim import datetime from common.multiprocessing_env import SubprocVecEnv...
37.035971
91
0.620435
c2f80e4c42036a725fca434be7043b0c6a5a0d16
3,510
py
Python
archives/scope/data_loader/data_sets/geneva_stroke_outcome_dataset.py
JulianKlug/scop
b0d6a805a11ee8b4d0f53a4d6a5ec402988298e4
[ "MIT" ]
null
null
null
archives/scope/data_loader/data_sets/geneva_stroke_outcome_dataset.py
JulianKlug/scop
b0d6a805a11ee8b4d0f53a4d6a5ec402988298e4
[ "MIT" ]
2
2021-05-13T08:13:06.000Z
2021-05-13T08:13:30.000Z
archives/scope/data_loader/data_sets/geneva_stroke_outcome_dataset.py
JulianKlug/scope
b0d6a805a11ee8b4d0f53a4d6a5ec402988298e4
[ "MIT" ]
null
null
null
import torch from torch.utils.data import Dataset import numpy as np import pandas as pd class GenevaStrokeOutcomeDataset(Dataset): """Geneva Clinical Stroke Outcome Dataset.""" def __init__(self, imaging_dataset_path, outcome_file_path, channels, outcome, transform=None, preload_data=True): """ ...
35.454545
118
0.6151
1285ad17989531ffe21075fa0b0fd733f5f0fce2
602
py
Python
scripts/price_feed_scripts/01_deploy_price_consumer_v3.py
boitenoire-dev/dev-bootcamp-brownie
c4feb2a2d4bfd9da2048fe458e5f735dab64d30d
[ "MIT" ]
null
null
null
scripts/price_feed_scripts/01_deploy_price_consumer_v3.py
boitenoire-dev/dev-bootcamp-brownie
c4feb2a2d4bfd9da2048fe458e5f735dab64d30d
[ "MIT" ]
null
null
null
scripts/price_feed_scripts/01_deploy_price_consumer_v3.py
boitenoire-dev/dev-bootcamp-brownie
c4feb2a2d4bfd9da2048fe458e5f735dab64d30d
[ "MIT" ]
null
null
null
#!/usr/bin/python3 from brownie import PriceFeedConsumer, accounts from scripts.helpful_scripts import ( get_verify_status, get_account, get_contract, ) def deploy_price_feed_consumer(): account = get_account() eth_usd_price_feed_address = get_contract("eth_usd_price_feed").address price_feed ...
25.083333
75
0.729236
77dd047693e90b7e0ac103e5286bfc5d2f523b50
324
py
Python
events/admin.py
reddevilcero/SchoolWeb
7adb0d6a82a803aab3e06ebedfcb022ab758c56e
[ "MIT" ]
null
null
null
events/admin.py
reddevilcero/SchoolWeb
7adb0d6a82a803aab3e06ebedfcb022ab758c56e
[ "MIT" ]
null
null
null
events/admin.py
reddevilcero/SchoolWeb
7adb0d6a82a803aab3e06ebedfcb022ab758c56e
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Event, EventImage # Register your models here. class EventImageInline(admin.TabularInline): model = EventImage extra = 3 @admin.register(Event) class EventAdmin(admin.ModelAdmin): readonly_fields = ['created', 'updated'] inlines = [EventImageInli...
20.25
44
0.743827
7ad021760a7953cb5c1d123a3103d7aa5c7b50d9
3,646
py
Python
project_generator/tools_supported.py
GeneKong/project_generator
84681246d236a39f22410988afc2b4593b805829
[ "Apache-2.0" ]
null
null
null
project_generator/tools_supported.py
GeneKong/project_generator
84681246d236a39f22410988afc2b4593b805829
[ "Apache-2.0" ]
null
null
null
project_generator/tools_supported.py
GeneKong/project_generator
84681246d236a39f22410988afc2b4593b805829
[ "Apache-2.0" ]
null
null
null
# Copyright 2014-2015 0xc0170 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
36.828283
111
0.644816
edb291817a2b04b3b5331f412cb6294ef038b66f
8,077
py
Python
madgraph/various/rambo.py
khurtado/MG5_aMC
9cde676b0a1097058c416983017af257385fa375
[ "NCSA" ]
5
2018-10-23T14:37:18.000Z
2021-11-22T20:59:02.000Z
madgraph/various/rambo.py
khurtado/MG5_aMC
9cde676b0a1097058c416983017af257385fa375
[ "NCSA" ]
26
2018-10-08T15:49:32.000Z
2020-05-15T13:33:36.000Z
madgraph/various/rambo.py
khurtado/MG5_aMC
9cde676b0a1097058c416983017af257385fa375
[ "NCSA" ]
4
2019-02-18T11:42:18.000Z
2021-11-11T20:46:08.000Z
from __future__ import division import math import random class FortranList(list): def __init__(self, min, max=None): if max is None: self.min = 1 self.max = min + 1 else: self.min = min self.max = max + 1 list.__init__(self,[0]*(self.max...
33.238683
139
0.396434
56f4b3ceb927dd6bb69449cf182700edbe189e7e
1,041
py
Python
tests/tools/test_persistent_reference_dict_merge.py
yaal-fr/sheraf
9821a53d8b0ea0aba420175e4cfa81529262f88c
[ "MIT" ]
1
2020-03-18T09:54:52.000Z
2020-03-18T09:54:52.000Z
tests/tools/test_persistent_reference_dict_merge.py
yaal-fr/sheraf
9821a53d8b0ea0aba420175e4cfa81529262f88c
[ "MIT" ]
null
null
null
tests/tools/test_persistent_reference_dict_merge.py
yaal-fr/sheraf
9821a53d8b0ea0aba420175e4cfa81529262f88c
[ "MIT" ]
null
null
null
import pytest from sheraf.tools.dicttools import DictConflictException, merge from ZODB.ConflictResolution import PersistentReference as PR def test_edited_once(): assert {"ref": PR("bar")} == merge( {"ref": PR("foo")}, {"ref": PR("foo")}, {"ref": PR("bar")}, ) assert {"ref": PR(...
20.411765
75
0.48511
68074a9012f3a6b6eb7229cbf6790d4addaacc04
21,559
py
Python
pyzoo/test/zoo/orca/learn/ray/tf/test_tf_ray_estimator.py
Elena-Qiu/analytics-zoo
deb1e42c20b1003345690152fd782f3177e8ee25
[ "Apache-2.0" ]
null
null
null
pyzoo/test/zoo/orca/learn/ray/tf/test_tf_ray_estimator.py
Elena-Qiu/analytics-zoo
deb1e42c20b1003345690152fd782f3177e8ee25
[ "Apache-2.0" ]
null
null
null
pyzoo/test/zoo/orca/learn/ray/tf/test_tf_ray_estimator.py
Elena-Qiu/analytics-zoo
deb1e42c20b1003345690152fd782f3177e8ee25
[ "Apache-2.0" ]
null
null
null
# # Copyright 2018 Analytics Zoo Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
36.916096
98
0.586437
f914819b81b1431a3eb1b61b209eda4c89ca8fa4
219
py
Python
__Training__/Python - HackerRank/11. Built-Ins/Any or All.py
JUD210/Study-Note
2add9db3f11d99370f49878f0c19e9caa60d2d02
[ "MIT" ]
null
null
null
__Training__/Python - HackerRank/11. Built-Ins/Any or All.py
JUD210/Study-Note
2add9db3f11d99370f49878f0c19e9caa60d2d02
[ "MIT" ]
null
null
null
__Training__/Python - HackerRank/11. Built-Ins/Any or All.py
JUD210/Study-Note
2add9db3f11d99370f49878f0c19e9caa60d2d02
[ "MIT" ]
null
null
null
# https://www.hackerrank.com/challenges/any-or-all/problem len_numbers, numbers = input(), input().split() # 6 # 1 2 11 121 -9 print(all([int(n) > 0 for n in numbers]) and any([n == n[::-1] for n in numbers])) # False
27.375
82
0.643836
0d347a8c5880dc7ffef3e5659f2cff1523ee7117
704
py
Python
virtual/bin/django-admin.py
FGacheru/Awwards
341124ad40f073a3ba3f4c712359a274f5cfa07f
[ "RSA-MD" ]
null
null
null
virtual/bin/django-admin.py
FGacheru/Awwards
341124ad40f073a3ba3f4c712359a274f5cfa07f
[ "RSA-MD" ]
null
null
null
virtual/bin/django-admin.py
FGacheru/Awwards
341124ad40f073a3ba3f4c712359a274f5cfa07f
[ "RSA-MD" ]
null
null
null
#!/home/frank/Desktop/core-projects/django/awwards/virtual/bin/python # When the django-admin.py deprecation ends, remove this script. import warnings from django.core import management try: from django.utils.deprecation import RemovedInDjango40Warning except ImportError: raise ImportError( 'django-ad...
32
80
0.730114
86ae6ab03045a286db847acc766741122b48ccf5
1,187
py
Python
rtlive/sources/data_lu.py
michaelosthege/covid-model
378dc8d0c89098b8b8a469efe1e8e0fcb9f7b5de
[ "Apache-2.0" ]
1
2020-10-29T11:00:27.000Z
2020-10-29T11:00:27.000Z
rtlive/sources/data_lu.py
michaelosthege/covid-model
378dc8d0c89098b8b8a469efe1e8e0fcb9f7b5de
[ "Apache-2.0" ]
null
null
null
rtlive/sources/data_lu.py
michaelosthege/covid-model
378dc8d0c89098b8b8a469efe1e8e0fcb9f7b5de
[ "Apache-2.0" ]
null
null
null
import logging import pandas from . import ourworldindata from .. import preprocessing _log = logging.getLogger(__file__) def forecast_LU(df: pandas.DataFrame): """ Applies testcount interpolation/extrapolation. Currently this assumes the OWID data, which only has an "all" region. In the future, this s...
29.675
95
0.708509
504d56d6abb67eac45971ae095341b4bfe29a421
1,126
py
Python
accounts/migrations/0003_userprofile.py
shaymk1/Felicia-s-ecommerce-store
aaf9d5aed018e451602c6c39bf8e5e24f9cedc01
[ "MIT" ]
null
null
null
accounts/migrations/0003_userprofile.py
shaymk1/Felicia-s-ecommerce-store
aaf9d5aed018e451602c6c39bf8e5e24f9cedc01
[ "MIT" ]
null
null
null
accounts/migrations/0003_userprofile.py
shaymk1/Felicia-s-ecommerce-store
aaf9d5aed018e451602c6c39bf8e5e24f9cedc01
[ "MIT" ]
null
null
null
# Generated by Django 3.2.5 on 2021-08-05 10:07 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('accounts', '0002_alter_account_id'), ] operations = [ migrations.CreateMod...
38.827586
121
0.625222
cfb33ca2e65ad6c490f3676eabfd8732b530e0b2
389
py
Python
src/sentry_plugins/github/urls.py
MattPark/sentry-plugins
3b08a43ea9ca1fb0fd183c3fe7bd5606f14ba993
[ "Apache-2.0" ]
null
null
null
src/sentry_plugins/github/urls.py
MattPark/sentry-plugins
3b08a43ea9ca1fb0fd183c3fe7bd5606f14ba993
[ "Apache-2.0" ]
2
2018-05-26T13:19:41.000Z
2018-06-01T20:14:41.000Z
src/sentry_plugins/github/urls.py
MattPark/sentry-plugins
3b08a43ea9ca1fb0fd183c3fe7bd5606f14ba993
[ "Apache-2.0" ]
1
2018-05-26T11:45:46.000Z
2018-05-26T11:45:46.000Z
from __future__ import absolute_import from django.conf.urls import patterns, url from .endpoints.webhook import GithubIntegrationsWebhookEndpoint, GithubWebhookEndpoint urlpatterns = patterns( '', url(r'^organizations/(?P<organization_id>[^\/]+)/webhook/$', GithubWebhookEndpoint.as_view()), url(r'^insta...
32.416667
98
0.773779
45de74bed49969f9b0986bb6429350a6d7e9ce72
11,485
py
Python
src/dbcontext.py
jimmg35/Sensor_Crawling_v2
5154885cad5173127539487a2fcf2140a4409b8b
[ "MIT" ]
null
null
null
src/dbcontext.py
jimmg35/Sensor_Crawling_v2
5154885cad5173127539487a2fcf2140a4409b8b
[ "MIT" ]
null
null
null
src/dbcontext.py
jimmg35/Sensor_Crawling_v2
5154885cad5173127539487a2fcf2140a4409b8b
[ "MIT" ]
null
null
null
# Author : @jimmg35 import datetime import schedule import psycopg2 from psycopg2.extensions import ISOLATION_LEVEL_AUTOCOMMIT class Storer(): """ Storing processed data from Parser. """ data_list = [] storage = {} def __init__(self, dbcontext): self.dbcontext = dbcontext de...
45.94
214
0.514236
9564b0c1a1f685ef8f8e5bc654c654e6d6364be2
17,266
py
Python
syft/frameworks/torch/dp/pate.py
sparkingdark/PySyft
8fec86803dd20ca9ad58590ff0d16559991f1b08
[ "Apache-2.0" ]
7
2020-04-20T22:22:08.000Z
2020-07-25T17:32:08.000Z
syft/frameworks/torch/dp/pate.py
sparkingdark/PySyft
8fec86803dd20ca9ad58590ff0d16559991f1b08
[ "Apache-2.0" ]
3
2020-04-24T21:20:57.000Z
2020-05-28T09:17:02.000Z
syft/frameworks/torch/dp/pate.py
sparkingdark/PySyft
8fec86803dd20ca9ad58590ff0d16559991f1b08
[ "Apache-2.0" ]
4
2020-04-24T22:32:37.000Z
2020-05-25T19:29:20.000Z
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
33.140115
99
0.641608
71f9543e653d7334ca5a4302db3c350b9ed9668b
4,405
py
Python
tests/records/test_mockrecords_api.py
mirekys/invenio-communities
f412c941627cfd1a515755fdf17cc0aa794d857e
[ "MIT" ]
3
2017-10-25T00:58:24.000Z
2021-05-02T23:42:02.000Z
tests/records/test_mockrecords_api.py
mirekys/invenio-communities
f412c941627cfd1a515755fdf17cc0aa794d857e
[ "MIT" ]
277
2015-04-30T09:39:22.000Z
2022-03-31T07:38:26.000Z
tests/records/test_mockrecords_api.py
mirekys/invenio-communities
f412c941627cfd1a515755fdf17cc0aa794d857e
[ "MIT" ]
44
2015-04-22T11:34:49.000Z
2022-03-22T09:56:33.000Z
# -*- coding: utf-8 -*- # # Copyright (C) 2021 CERN. # # Invenio-Communities is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see LICENSE file for more # details. """Data layer tests for record/community integration.""" import pytest from jsonschema import ValidationErr...
26.859756
73
0.676277
dfb3f5aa6bb79a0fdcd45f50d8d8abe060d884f4
62
py
Python
hwt/simulator/exceptions.py
mgielda/hwt
e6c699fb154f93ac03523bfe40a3d4fc1912d28b
[ "MIT" ]
null
null
null
hwt/simulator/exceptions.py
mgielda/hwt
e6c699fb154f93ac03523bfe40a3d4fc1912d28b
[ "MIT" ]
null
null
null
hwt/simulator/exceptions.py
mgielda/hwt
e6c699fb154f93ac03523bfe40a3d4fc1912d28b
[ "MIT" ]
null
null
null
class SimException(Exception): """Error in simulation"""
15.5
30
0.693548
55bcbf5bdc649f3bd5143721829d54b52e530560
3,294
py
Python
data-structures/python/int_graph.py
zubinshah/algorithms
292cd1ac0ddd84b8c3933b0c2404d1c4b316be9d
[ "Apache-2.0" ]
null
null
null
data-structures/python/int_graph.py
zubinshah/algorithms
292cd1ac0ddd84b8c3933b0c2404d1c4b316be9d
[ "Apache-2.0" ]
null
null
null
data-structures/python/int_graph.py
zubinshah/algorithms
292cd1ac0ddd84b8c3933b0c2404d1c4b316be9d
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python ''' int_graph module is a wrapper module to implement an integer graph data structure in python. TBD : (1) derive child class to differentiate matrix vs adj-list impl. (2) dynamically grow/shrink the graph data struct (matrix) and avoid constructor to specific...
31.371429
90
0.563752
5f37bf15d09e009f999032f2493ff64ce830f206
3,306
py
Python
test/TEX/recursive_scanner_dependencies_input.py
edobez/scons
722228995b223b4507ebb686b48f94b9f7a8380c
[ "MIT" ]
null
null
null
test/TEX/recursive_scanner_dependencies_input.py
edobez/scons
722228995b223b4507ebb686b48f94b9f7a8380c
[ "MIT" ]
null
null
null
test/TEX/recursive_scanner_dependencies_input.py
edobez/scons
722228995b223b4507ebb686b48f94b9f7a8380c
[ "MIT" ]
null
null
null
#!/usr/bin/env python # # __COPYRIGHT__ # # 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, ...
29
73
0.724138
e8af0355f4d22c9ca0a8fb43252d8c9acac1da7d
13,735
py
Python
airflow/providers/microsoft/azure/hooks/azure_batch.py
yang040840219/airflow
c73d9e09cc650374e975ba287e9ed8ea59cde51a
[ "Apache-2.0" ]
2
2021-07-30T17:25:56.000Z
2021-08-03T13:51:09.000Z
airflow/providers/microsoft/azure/hooks/azure_batch.py
yang040840219/airflow
c73d9e09cc650374e975ba287e9ed8ea59cde51a
[ "Apache-2.0" ]
null
null
null
airflow/providers/microsoft/azure/hooks/azure_batch.py
yang040840219/airflow
c73d9e09cc650374e975ba287e9ed8ea59cde51a
[ "Apache-2.0" ]
1
2020-11-06T01:26:29.000Z
2020-11-06T01:26:29.000Z
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
38.909348
110
0.627084
6d18259601f97fa73f920f9db7283b9cfe938ecd
602
py
Python
scripts/jginames_to_tab.py
stajichlab/Chytrid_Virus
bab9353e12ba0afe3f1726fd50187640e74d17cc
[ "MIT" ]
null
null
null
scripts/jginames_to_tab.py
stajichlab/Chytrid_Virus
bab9353e12ba0afe3f1726fd50187640e74d17cc
[ "MIT" ]
null
null
null
scripts/jginames_to_tab.py
stajichlab/Chytrid_Virus
bab9353e12ba0afe3f1726fd50187640e74d17cc
[ "MIT" ]
1
2020-04-21T17:08:19.000Z
2020-04-21T17:08:19.000Z
#!/usr/bin/env python3 import csv,re,os topdir="lib" outfile="lib/jgi_names.tab" with open(outfile,"w") as ofh: writer = csv.writer(ofh,delimiter="\t",lineterminator='\n') for infile in os.listdir(topdir): if not infile.endswith("_names.csv"): continue with open(os.path.join(topdi...
30.1
63
0.546512
fcd72762a607b8aa53702fcea7a546913a163ebb
4,076
py
Python
kindle/books.py
szarroug3/X-Ray-Creator-2
61b3ff772794c13c31f91cabf299edd4264f803d
[ "MIT" ]
2
2016-06-06T23:52:21.000Z
2020-02-03T20:32:04.000Z
kindle/books.py
szarroug3/X-Ray-Creator-2
61b3ff772794c13c31f91cabf299edd4264f803d
[ "MIT" ]
null
null
null
kindle/books.py
szarroug3/X-Ray-Creator-2
61b3ff772794c13c31f91cabf299edd4264f803d
[ "MIT" ]
null
null
null
# books.py import ctypes import os from mobibook import MobiBook from customexceptions import * # Drive types DRIVE_UNKNOWN = 0 # The drive type cannot be determined. DRIVE_NO_ROOT_DIR = 1 # The root path is invalbookID; for example, there is no volume mounted at the specified path. DRIVE_REMOVABLE = 2 # The...
33.409836
119
0.593229
ba64d996f8983ea4afd752da2f561ebebaa06444
57
py
Python
Examples/Misc/Resources/calc.py
OldSecureIQLab/MyWarez
c0c3bcbd1d206ff6fff7efb2c798538d79fbe87f
[ "MIT" ]
1
2021-07-07T04:08:39.000Z
2021-07-07T04:08:39.000Z
Examples/Misc/Resources/calc.py
OldSecureIQLab/MyWarez
c0c3bcbd1d206ff6fff7efb2c798538d79fbe87f
[ "MIT" ]
null
null
null
Examples/Misc/Resources/calc.py
OldSecureIQLab/MyWarez
c0c3bcbd1d206ff6fff7efb2c798538d79fbe87f
[ "MIT" ]
1
2021-01-28T16:36:34.000Z
2021-01-28T16:36:34.000Z
import os os.system("c:\\windows\\system32\\calc.exe");
14.25
45
0.684211
9bfe391f05d96dd62c3b06723c0635db819f8562
15,091
py
Python
help.py
bsoyka/sunset-bot
ea05000e52e1883ddba77ab754e5f733c8b3375c
[ "MIT" ]
1
2021-06-21T16:58:48.000Z
2021-06-21T16:58:48.000Z
help.py
bsoyka/sunset-bot
ea05000e52e1883ddba77ab754e5f733c8b3375c
[ "MIT" ]
4
2021-08-13T16:52:51.000Z
2021-09-01T13:05:42.000Z
help.py
sunset-vacation/bot
ea05000e52e1883ddba77ab754e5f733c8b3375c
[ "MIT" ]
4
2021-06-21T22:16:12.000Z
2021-08-11T21:01:19.000Z
import itertools from collections import namedtuple from contextlib import suppress from typing import List, Union from discord import Color, Embed from discord.ext import commands from fuzzywuzzy import fuzz, process from fuzzywuzzy.utils import full_process from config import CONFIG from pagination impor...
35.177156
119
0.59393
4e6c26cd5916f0cce02f51cd3baf3ba5302515ab
34,404
py
Python
Lib/test/test_importlib/test_abc.py
zsilver1/RustPython
820337e6c31d2ffcdd341dd238c381ed6f3c23e8
[ "CC-BY-4.0", "MIT" ]
null
null
null
Lib/test/test_importlib/test_abc.py
zsilver1/RustPython
820337e6c31d2ffcdd341dd238c381ed6f3c23e8
[ "CC-BY-4.0", "MIT" ]
null
null
null
Lib/test/test_importlib/test_abc.py
zsilver1/RustPython
820337e6c31d2ffcdd341dd238c381ed6f3c23e8
[ "CC-BY-4.0", "MIT" ]
null
null
null
import io import marshal import os import sys from test import support import types import unittest from unittest import mock import warnings from . import util as test_util init = test_util.import_importlib('importlib') abc = test_util.import_importlib('importlib.abc') machinery = test_util.import_importlib('importl...
34.164846
112
0.660795
bf9d77104da80500e820fa91ab7050d725159775
5,006
py
Python
homeassistant/components/sensehat/sensor.py
andersop91/core
0e0ef0aa17073609eae7c974cf4c73306b7c414b
[ "Apache-2.0" ]
4
2021-07-11T09:11:00.000Z
2022-02-27T14:43:50.000Z
homeassistant/components/sensehat/sensor.py
andersop91/core
0e0ef0aa17073609eae7c974cf4c73306b7c414b
[ "Apache-2.0" ]
277
2021-10-04T06:39:33.000Z
2021-12-28T22:04:17.000Z
homeassistant/components/sensehat/sensor.py
andersop91/core
0e0ef0aa17073609eae7c974cf4c73306b7c414b
[ "Apache-2.0" ]
3
2021-11-14T13:29:33.000Z
2021-12-27T17:05:22.000Z
"""Support for Sense HAT sensors.""" from __future__ import annotations from datetime import timedelta import logging from pathlib import Path from sense_hat import SenseHat import voluptuous as vol from homeassistant.components.sensor import ( PLATFORM_SCHEMA, SensorDeviceClass, SensorEntity, Sensor...
30.52439
87
0.68298
4231c167995cee3f162e0218cfc7fbb9099ee53c
445
py
Python
lesson3/task1.py
kati-Ist/python_geekbrains
fdafd6134ab4287d80fbf5b6c1750142d2013238
[ "MIT" ]
null
null
null
lesson3/task1.py
kati-Ist/python_geekbrains
fdafd6134ab4287d80fbf5b6c1750142d2013238
[ "MIT" ]
null
null
null
lesson3/task1.py
kati-Ist/python_geekbrains
fdafd6134ab4287d80fbf5b6c1750142d2013238
[ "MIT" ]
null
null
null
# 1. Реализовать функцию, принимающую два числа (позиционные аргументы) и выполняющую их деление. # Числа запрашивать у пользователя, предусмотреть обработку ситуации деления на ноль. def my_f(k_1, k_2): try: number = k_1 / k_2 return round(number, 2) except ZeroDivisionError: print("В...
31.785714
97
0.698876