hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
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
245
max_issues_repo_name
stringlengths
6
130
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
245
max_forks_repo_name
stringlengths
6
130
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
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
08f932eb03697313d6085ad581e76ad28cb44402
1,814
py
Python
onlinecourse/migrations/0002_auto_20210801_1711.py
rajesjai1907/onlinecourse-rj
6932709fc6fbd0e1b1187507fc1e7a370d95e4b2
[ "Apache-2.0" ]
null
null
null
onlinecourse/migrations/0002_auto_20210801_1711.py
rajesjai1907/onlinecourse-rj
6932709fc6fbd0e1b1187507fc1e7a370d95e4b2
[ "Apache-2.0" ]
null
null
null
onlinecourse/migrations/0002_auto_20210801_1711.py
rajesjai1907/onlinecourse-rj
6932709fc6fbd0e1b1187507fc1e7a370d95e4b2
[ "Apache-2.0" ]
null
null
null
# Generated by Django 3.1.3 on 2021-08-01 17:11 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('onlinecourse', '0001_initial'), ] operations = [ migrations.CreateModel( name='Choice', ...
39.434783
125
0.588754
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('onlinecourse', '0001_initial'), ] operations = [ migrations.CreateModel( name='Choice', fields=[ ('id', models.Auto...
true
true
08f9335fadb7a2078cb92c419be0388db91f0208
952
py
Python
leetcode/easy/lemonade_change.py
nicklambourne/hackerrank-solutions
9536aa16a67325566e6d3ebea5d5f2c5bf12a05d
[ "MIT" ]
null
null
null
leetcode/easy/lemonade_change.py
nicklambourne/hackerrank-solutions
9536aa16a67325566e6d3ebea5d5f2c5bf12a05d
[ "MIT" ]
null
null
null
leetcode/easy/lemonade_change.py
nicklambourne/hackerrank-solutions
9536aa16a67325566e6d3ebea5d5f2c5bf12a05d
[ "MIT" ]
null
null
null
from typing import List class Solution: @staticmethod def lemonade_change(bills: List[int]) -> bool: fives = 0 tens = 0 twenties = 0 for bill in bills: if bill == 5: fives += 1 if bill == 10: if not fives: ...
25.72973
64
0.453782
from typing import List class Solution: @staticmethod def lemonade_change(bills: List[int]) -> bool: fives = 0 tens = 0 twenties = 0 for bill in bills: if bill == 5: fives += 1 if bill == 10: if not fives: ...
true
true
08f934f45475b6fe4ad18da38e8ade7358910744
23
py
Python
fastcore/__init__.py
lgvaz/fastcore
fa39696dee5929e9dede5a69e4614ac9f0257ba2
[ "Apache-2.0" ]
7
2021-03-24T21:38:55.000Z
2022-03-16T21:11:34.000Z
fastcore/__init__.py
lgvaz/fastcore
fa39696dee5929e9dede5a69e4614ac9f0257ba2
[ "Apache-2.0" ]
8
2021-03-14T13:46:20.000Z
2021-12-09T08:35:50.000Z
fastcore/__init__.py
lgvaz/fastcore
fa39696dee5929e9dede5a69e4614ac9f0257ba2
[ "Apache-2.0" ]
3
2020-12-05T12:30:27.000Z
2021-03-08T14:24:30.000Z
__version__ = "0.1.18"
11.5
22
0.652174
__version__ = "0.1.18"
true
true
08f935539ecfc0056952645dd803325dd3f3c84b
52,687
py
Python
pandas/core/indexing.py
olgabot/pandas
286811a2775c9b5ca1c30086b1950dd1060ecf68
[ "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
pandas/core/indexing.py
olgabot/pandas
286811a2775c9b5ca1c30086b1950dd1060ecf68
[ "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
pandas/core/indexing.py
olgabot/pandas
286811a2775c9b5ca1c30086b1950dd1060ecf68
[ "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
# pylint: disable=W0223 from datetime import datetime from pandas.core.index import Index, MultiIndex, _ensure_index from pandas.compat import range, zip import pandas.compat as compat import pandas.core.common as com from pandas.core.common import (_is_bool_indexer, is_integer_dtype, _...
34.167964
89
0.520982
from datetime import datetime from pandas.core.index import Index, MultiIndex, _ensure_index from pandas.compat import range, zip import pandas.compat as compat import pandas.core.common as com from pandas.core.common import (_is_bool_indexer, is_integer_dtype, _asarray_tuplesafe, is_li...
true
true
08f935a8c06d8fc2d0978d33f4c47e92e6039f13
3,775
py
Python
groups/models.py
uktrade/directory-cms
8c8d13ce29ea74ddce7a40f3dd29c8847145d549
[ "MIT" ]
6
2018-03-20T11:19:07.000Z
2021-10-05T07:53:11.000Z
groups/models.py
uktrade/directory-cms
8c8d13ce29ea74ddce7a40f3dd29c8847145d549
[ "MIT" ]
802
2018-02-05T14:16:13.000Z
2022-02-10T10:59:21.000Z
groups/models.py
uktrade/directory-cms
8c8d13ce29ea74ddce7a40f3dd29c8847145d549
[ "MIT" ]
6
2019-01-22T13:19:37.000Z
2019-07-01T10:35:26.000Z
from django.core.exceptions import ValidationError from django.db import models from groups.query import GroupInfoQuerySet class GroupInfo(models.Model): """ Store additional information about groups used for role assignment within Wagtail (without affecting the workings of the underlying groups or p...
34.633028
78
0.622517
from django.core.exceptions import ValidationError from django.db import models from groups.query import GroupInfoQuerySet class GroupInfo(models.Model): VISIBILITY_UNRESTRICTED = 0 VISIBILITY_MANAGERS_ONLY = 1 VISIBILITY_SUPERUSERS_ONLY = 2 VISIBILITY_CHOICES = [ (VISIBILITY_UNRESTRICTED, '...
true
true
08f9365cd72ff9f06fb188a8491e0e00be03506d
15,534
py
Python
pennylane_ionq/api_client.py
Cynocracy/PennyLane-IonQ
f69916a52ee67f8a47a0f1844a8bb6d20f617288
[ "Apache-2.0" ]
3
2021-04-20T07:33:19.000Z
2022-02-08T20:02:12.000Z
pennylane_ionq/api_client.py
Cynocracy/PennyLane-IonQ
f69916a52ee67f8a47a0f1844a8bb6d20f617288
[ "Apache-2.0" ]
27
2021-04-20T07:25:39.000Z
2022-03-31T18:52:30.000Z
pennylane_ionq/api_client.py
Cynocracy/PennyLane-IonQ
f69916a52ee67f8a47a0f1844a8bb6d20f617288
[ "Apache-2.0" ]
7
2021-05-20T14:46:13.000Z
2022-03-25T20:45:35.000Z
# Copyright 2019 Xanadu Quantum Technologies Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agre...
29.758621
100
0.626046
import urllib import json import warnings import os import dateutil.parser import requests def join_path(base_path, path): return urllib.parse.urljoin("{}/".format(base_path), path) class MethodNotSupportedException(TypeError): class ObjectAlreadyCreatedException(TypeError): class JobNotQueuedError(Ex...
true
true
08f936ba562537d180f4b7cd40eeae8b8ea70578
918
py
Python
app/actions.py
bxsx/currencies-converter-rest-service-fastapi
1a04cb166cde0966da32bfc5f09670186d1ae7ef
[ "MIT" ]
null
null
null
app/actions.py
bxsx/currencies-converter-rest-service-fastapi
1a04cb166cde0966da32bfc5f09670186d1ae7ef
[ "MIT" ]
null
null
null
app/actions.py
bxsx/currencies-converter-rest-service-fastapi
1a04cb166cde0966da32bfc5f09670186d1ae7ef
[ "MIT" ]
1
2021-06-15T12:49:36.000Z
2021-06-15T12:49:36.000Z
from decimal import Decimal, localcontext from typing import Any, Dict from fastapi import Depends from . import cache, schemas from .settings import config async def get_rate( base: schemas.SupportedCurrencyModel, to: schemas.SupportedCurrencyModel, rates: Dict[str, Any] = Depends(cache.get), ) -> sche...
29.612903
81
0.729847
from decimal import Decimal, localcontext from typing import Any, Dict from fastapi import Depends from . import cache, schemas from .settings import config async def get_rate( base: schemas.SupportedCurrencyModel, to: schemas.SupportedCurrencyModel, rates: Dict[str, Any] = Depends(cache.get), ) -> sche...
true
true
08f936e6d74bef445e3653a1957e5b4abe1990b7
649
py
Python
demo/evaluator.py
oasislabs/ready-layer-2
dcfc5edd2a645ab7a0dfc54933a71a7dca923fff
[ "MIT" ]
1
2020-05-05T21:14:44.000Z
2020-05-05T21:14:44.000Z
demo/evaluator.py
oasislabs/ready-layer-2
dcfc5edd2a645ab7a0dfc54933a71a7dca923fff
[ "MIT" ]
3
2020-08-30T20:31:41.000Z
2022-01-22T11:54:48.000Z
demo/evaluator.py
oasislabs/ready-layer-2
dcfc5edd2a645ab7a0dfc54933a71a7dca923fff
[ "MIT" ]
2
2020-08-28T17:44:06.000Z
2022-01-19T17:23:33.000Z
#!/usr/bin/env python3 import argparse import joblib import pandas as pd def main(): parser = argparse.ArgumentParser() parser.add_argument("--model-path") parser.add_argument("--data-path") args = parser.parse_args() X, y = load_data(args.data_path) model = joblib.load(args.model_path) ...
20.28125
88
0.645609
import argparse import joblib import pandas as pd def main(): parser = argparse.ArgumentParser() parser.add_argument("--model-path") parser.add_argument("--data-path") args = parser.parse_args() X, y = load_data(args.data_path) model = joblib.load(args.model_path) print(model.score(X, y...
true
true
08f937291ab4f4f83ae83953eb416e802705c7da
294
py
Python
python_library/math/pascalsTriangle.py
knuu/test_for_python_contest_library
c594f18b6d9d0d8baebc2e93d98c5f1fccf32d7a
[ "MIT" ]
2
2019-05-21T12:12:58.000Z
2022-01-20T03:19:33.000Z
python_library/math/pascalsTriangle.py
knuu/contest_library
94b0c9eb82e7e2543bf82ea5a07bfe80e5f2ddc3
[ "MIT" ]
null
null
null
python_library/math/pascalsTriangle.py
knuu/contest_library
94b0c9eb82e7e2543bf82ea5a07bfe80e5f2ddc3
[ "MIT" ]
null
null
null
from copy import deepcopy def pascalsTriangle(n): assert n >= 0 psTri = [[0]*n for _ in range(n)] for i in range(n): psTri[i][0] = 1 psTri[i][i] = 1 for j in range(1, i): psTri[i][j] = psTri[i-1][j-1] + psTri[i-1][j] return deepcopy(psTri)
22.615385
57
0.517007
from copy import deepcopy def pascalsTriangle(n): assert n >= 0 psTri = [[0]*n for _ in range(n)] for i in range(n): psTri[i][0] = 1 psTri[i][i] = 1 for j in range(1, i): psTri[i][j] = psTri[i-1][j-1] + psTri[i-1][j] return deepcopy(psTri)
true
true
08f937e39175afe1c079939233ec7cf2a12365dc
486
py
Python
dynamic_programming/get_maximum_in_generated_array.py
elenaborisova/LeetCode-Solutions
98376aab7fd150a724e316357ae5ea46988d9eac
[ "MIT" ]
null
null
null
dynamic_programming/get_maximum_in_generated_array.py
elenaborisova/LeetCode-Solutions
98376aab7fd150a724e316357ae5ea46988d9eac
[ "MIT" ]
null
null
null
dynamic_programming/get_maximum_in_generated_array.py
elenaborisova/LeetCode-Solutions
98376aab7fd150a724e316357ae5ea46988d9eac
[ "MIT" ]
null
null
null
def get_maximum_generated(n): generated_array = [0, 1] if n == 0: return 0 i = 2 while len(generated_array) < n: num = generated_array[i - 1] generated_array.append(num) num = generated_array[i] + generated_array[i - 1] generated_array.append(num) i +=...
20.25
57
0.652263
def get_maximum_generated(n): generated_array = [0, 1] if n == 0: return 0 i = 2 while len(generated_array) < n: num = generated_array[i - 1] generated_array.append(num) num = generated_array[i] + generated_array[i - 1] generated_array.append(num) i +=...
true
true
08f93857a35525a1dbe1e60b79a5eeb1ed9b916c
507
py
Python
LeetCode_firstUniqueCharacter.py
amukher3/Problem_solutions
8fa6014a91f295d08cafb989024caa91d99211d9
[ "Apache-2.0" ]
1
2021-12-28T08:58:51.000Z
2021-12-28T08:58:51.000Z
LeetCode_firstUniqueCharacter.py
amukher3/Coding
a330cb04b5dd5cc1c3cf69249417a71586441bc7
[ "Apache-2.0" ]
null
null
null
LeetCode_firstUniqueCharacter.py
amukher3/Coding
a330cb04b5dd5cc1c3cf69249417a71586441bc7
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Mon Jul 13 14:50:08 2020 @author: abhi0 """ class Solution: def firstUniqChar(self, s: str) -> int: tempDict=dict() for i in s: if i in tempDict.keys(): tempDict[i]+=1 else: tempDict.update...
23.045455
44
0.418146
class Solution: def firstUniqChar(self, s: str) -> int: tempDict=dict() for i in s: if i in tempDict.keys(): tempDict[i]+=1 else: tempDict.update({i:1}) for key,val in tempDict.items(): if val==...
true
true
08f9387ac1ffa73437a53ca03f4c55bae44a56a0
5,975
py
Python
tests/utils/encoding/tests.py
ascan-io/raven-python
5b3f48c66269993a0202cfc988750e5fe66e0c00
[ "BSD-3-Clause" ]
1,108
2015-01-02T01:20:00.000Z
2022-03-09T02:22:40.000Z
tests/utils/encoding/tests.py
ascan-io/raven-python
5b3f48c66269993a0202cfc988750e5fe66e0c00
[ "BSD-3-Clause" ]
698
2015-01-04T11:12:57.000Z
2022-01-22T08:07:51.000Z
tests/utils/encoding/tests.py
ascan-io/raven-python
5b3f48c66269993a0202cfc988750e5fe66e0c00
[ "BSD-3-Clause" ]
486
2015-01-04T09:00:33.000Z
2022-03-09T02:37:18.000Z
# -*- coding: utf-8 -*- import pytest import uuid from raven.utils import compat from raven.utils import json from raven.utils.testutils import TestCase from raven.utils.serializer import transform class TransformTest(TestCase): @pytest.mark.skipif('compat.PY3') def test_incorrect_unicode(self): x = ...
30.329949
113
0.584937
import pytest import uuid from raven.utils import compat from raven.utils import json from raven.utils.testutils import TestCase from raven.utils.serializer import transform class TransformTest(TestCase): @pytest.mark.skipif('compat.PY3') def test_incorrect_unicode(self): x = compat.b('רונית מגן') ...
true
true
08f938b935f7f313aa58aa34303b55b9068e9178
3,546
py
Python
recipes/libsecret/all/conanfile.py
rockandsalt/conan-center-index
d739adcec3e4dd4c250eff559ceb738e420673dd
[ "MIT" ]
1
2021-11-11T03:07:13.000Z
2021-11-11T03:07:13.000Z
recipes/libsecret/all/conanfile.py
rockandsalt/conan-center-index
d739adcec3e4dd4c250eff559ceb738e420673dd
[ "MIT" ]
1
2021-05-06T05:46:41.000Z
2021-05-06T12:27:12.000Z
recipes/libsecret/all/conanfile.py
rockandsalt/conan-center-index
d739adcec3e4dd4c250eff559ceb738e420673dd
[ "MIT" ]
null
null
null
from conans import ConanFile, Meson, tools from conans.errors import ConanInvalidConfiguration import os required_conan_version = ">=1.33.0" class LibsecretConan(ConanFile): name = "libsecret" description = "A library for storing and retrieving passwords and other secrets" topics = ("libsecret", "gobject...
31.660714
84
0.615059
from conans import ConanFile, Meson, tools from conans.errors import ConanInvalidConfiguration import os required_conan_version = ">=1.33.0" class LibsecretConan(ConanFile): name = "libsecret" description = "A library for storing and retrieving passwords and other secrets" topics = ("libsecret", "gobject...
true
true
08f938debfa1176bc478262c37a059046d27457f
1,902
py
Python
Coding/Coding/middlewares.py
toddlerya/learn_scrapy
da152bb3f04cb0dae0d88d661bd615995084e1d2
[ "MIT" ]
4
2017-09-05T05:37:25.000Z
2021-05-22T06:14:32.000Z
Coding/Coding/middlewares.py
toddlerya/learn_scrapy
da152bb3f04cb0dae0d88d661bd615995084e1d2
[ "MIT" ]
null
null
null
Coding/Coding/middlewares.py
toddlerya/learn_scrapy
da152bb3f04cb0dae0d88d661bd615995084e1d2
[ "MIT" ]
3
2017-11-21T14:28:30.000Z
2019-10-13T06:48:57.000Z
# -*- coding: utf-8 -*- # Define here the models for your spider middleware # # See documentation in: # http://doc.scrapy.org/en/latest/topics/spider-middleware.html from scrapy import signals class CodingSpiderMiddleware(object): # Not all methods need to be defined. If a method is not defined, # scrapy ac...
33.368421
78
0.672976
from scrapy import signals class CodingSpiderMiddleware(object): @classmethod def from_crawler(cls, crawler): s = cls() crawler.signals.connect(s.spider_opened, signal=signals.spider_opened) return s def process_spider_input(self, response, spider): ...
true
true
08f938f10077a2beba0c68841cb120b1c6d3835d
612
py
Python
tests/widget_styles/test_toplevel.py
dmalves/ttkbootstrap
04d441c7a0cfbe6a2debea80c41994201dfc5562
[ "MIT" ]
406
2021-04-04T10:58:14.000Z
2022-03-29T22:24:36.000Z
tests/widget_styles/test_toplevel.py
dmalves/ttkbootstrap
04d441c7a0cfbe6a2debea80c41994201dfc5562
[ "MIT" ]
149
2021-03-26T12:45:41.000Z
2022-03-28T20:27:29.000Z
tests/widget_styles/test_toplevel.py
dmalves/ttkbootstrap
04d441c7a0cfbe6a2debea80c41994201dfc5562
[ "MIT" ]
52
2021-04-08T14:50:28.000Z
2022-03-27T15:23:41.000Z
import tkinter as tk import ttkbootstrap as ttk from random import choice from ttkbootstrap import utility utility.enable_high_dpi_awareness() def change_style(): theme = choice(style.theme_names()) style.theme_use(theme) if __name__ == '__main__': # create visual widget style tests root = tk.Tk(...
24.48
68
0.691176
import tkinter as tk import ttkbootstrap as ttk from random import choice from ttkbootstrap import utility utility.enable_high_dpi_awareness() def change_style(): theme = choice(style.theme_names()) style.theme_use(theme) if __name__ == '__main__': root = tk.Tk() style = ttk.Style() ttk....
true
true
08f93937e3cb4fed99dcbf0985e6c91b90b910ed
9,534
py
Python
libgen.py
samuel-cavalcanti/MY-libgen-calibre-plugin
1f37548d3ea0f35ee25d22a7a6dfd1fbaa1bfed8
[ "MIT" ]
2
2020-11-03T06:12:47.000Z
2021-08-15T00:05:28.000Z
libgen.py
samuel-cavalcanti/MY-libgen-calibre-plugin
1f37548d3ea0f35ee25d22a7a6dfd1fbaa1bfed8
[ "MIT" ]
null
null
null
libgen.py
samuel-cavalcanti/MY-libgen-calibre-plugin
1f37548d3ea0f35ee25d22a7a6dfd1fbaa1bfed8
[ "MIT" ]
1
2020-10-16T04:25:22.000Z
2020-10-16T04:25:22.000Z
import requests import urllib from bs4 import BeautifulSoup # WHY # this SearchRequest module is used to contain all of the internal logic that end users will not need to use. # Therefore the logic is contained and users can interact with libgen_search without extra junk for logic. # USAGE # req = search_request.Sea...
33.570423
111
0.564506
import requests import urllib from bs4 import BeautifulSoup class SearchRequest: __min_tags = 17 def __init__(self, query, search_type="title"): self.query = query self.search_type = search_type self.base_url = "https://libgen.is" self.search_url = self.base_url + '/search.p...
true
true
08f93ac4619fd587728de31a7da5e40561ed76c7
2,657
py
Python
torrents.py
jgritans/torrent_finder
4270ebab208727fe5ea559b97ed74b25ea2d37d3
[ "MIT" ]
null
null
null
torrents.py
jgritans/torrent_finder
4270ebab208727fe5ea559b97ed74b25ea2d37d3
[ "MIT" ]
null
null
null
torrents.py
jgritans/torrent_finder
4270ebab208727fe5ea559b97ed74b25ea2d37d3
[ "MIT" ]
null
null
null
import pandas as pd from web import soup class EmptyTable(Exception): def __init__(self, message): self.message = message class FailedDfCreation(Exception): def __init__(self, message): self.message = message class HardToFixBetterSkip(Exception): def __init__(self, message): ...
31.630952
127
0.578848
import pandas as pd from web import soup class EmptyTable(Exception): def __init__(self, message): self.message = message class FailedDfCreation(Exception): def __init__(self, message): self.message = message class HardToFixBetterSkip(Exception): def __init__(self, message): ...
true
true
08f93b245b0442731cdaa50a25eb84d407d7d548
401
py
Python
electrumsys/plugins/ledger/cmdline.py
syscoin/electrum
ac576539c758640ff87ed6be1311eb57b57d205f
[ "MIT" ]
1
2019-06-26T16:51:43.000Z
2019-06-26T16:51:43.000Z
electrumsys/plugins/ledger/cmdline.py
syscoin/electrumsys
ac576539c758640ff87ed6be1311eb57b57d205f
[ "MIT" ]
null
null
null
electrumsys/plugins/ledger/cmdline.py
syscoin/electrumsys
ac576539c758640ff87ed6be1311eb57b57d205f
[ "MIT" ]
1
2018-09-10T21:43:02.000Z
2018-09-10T21:43:02.000Z
from electrumsys.plugin import hook from .ledger import LedgerPlugin from ..hw_wallet import CmdLineHandler class Plugin(LedgerPlugin): handler = CmdLineHandler() @hook def init_keystore(self, keystore): if not isinstance(keystore, self.keystore_class): return keystore.handler =...
26.733333
57
0.710723
from electrumsys.plugin import hook from .ledger import LedgerPlugin from ..hw_wallet import CmdLineHandler class Plugin(LedgerPlugin): handler = CmdLineHandler() @hook def init_keystore(self, keystore): if not isinstance(keystore, self.keystore_class): return keystore.handler =...
true
true
08f93b563de8ccb3ea42a3341997e7f18d40e978
2,186
py
Python
recognition/arcface_torch/config.py
PatrickHwang/insightface
e97344135a88bc0815f60e17f12f13eba1dd875c
[ "MIT" ]
null
null
null
recognition/arcface_torch/config.py
PatrickHwang/insightface
e97344135a88bc0815f60e17f12f13eba1dd875c
[ "MIT" ]
null
null
null
recognition/arcface_torch/config.py
PatrickHwang/insightface
e97344135a88bc0815f60e17f12f13eba1dd875c
[ "MIT" ]
null
null
null
from easydict import EasyDict as edict config = edict() config.dataset = "webface" config.embedding_size = 512 config.sample_rate = 1 config.fp16 = False config.momentum = 0.9 config.weight_decay = 5e-4 config.batch_size = 64 config.lr = 0.1 # batch size is 512 config.output = "output_test1" if config.dataset == "em...
32.147059
91
0.625801
from easydict import EasyDict as edict config = edict() config.dataset = "webface" config.embedding_size = 512 config.sample_rate = 1 config.fp16 = False config.momentum = 0.9 config.weight_decay = 5e-4 config.batch_size = 64 config.lr = 0.1 config.output = "output_test1" if config.dataset == "emore": config.rec...
true
true
08f93bd5f7895ef00ab378e4b276b3487d9a14b6
470
py
Python
stubs/micropython-esp32-1_14/utimeq.py
Josverl/micropython-stubs
3c32403ba2b57375f311ac0d023cd529340efe62
[ "MIT" ]
38
2020-10-18T21:59:44.000Z
2022-03-17T03:03:28.000Z
all-stubs/micropython-esp32-1_14/utimeq.py
ks-tec/Hydroponic
d9347f82698841d85c0a45908e8671b36c50ffce
[ "MIT" ]
176
2020-10-18T14:31:03.000Z
2022-03-30T23:22:39.000Z
all-stubs/micropython-esp32-1_14/utimeq.py
ks-tec/Hydroponic
d9347f82698841d85c0a45908e8671b36c50ffce
[ "MIT" ]
6
2020-12-28T21:11:12.000Z
2022-02-06T04:07:50.000Z
""" Module: 'utimeq' on micropython-esp32-1.14 """ # MCU: {'ver': '1.14', 'port': 'esp32', 'arch': 'xtensawin', 'sysname': 'esp32', 'release': '1.14.0', 'name': 'micropython', 'mpy': 10757, 'version': '1.14.0', 'machine': 'ESP32 module (spiram) with ESP32', 'build': '', 'nodename': 'esp32', 'platform': 'esp32', 'family...
26.111111
286
0.551064
class utimeq: def peektime(): pass def pop(): pass def push(): pass
true
true
08f93be6f3f7c59f0cf5588cacfa5e97746bc78b
6,605
py
Python
app/models.py
ViniciussAlencarr/Projeto_Integrador
3ce876ddc2be7d2617efe63e392ccc139c5bc0e6
[ "MIT" ]
null
null
null
app/models.py
ViniciussAlencarr/Projeto_Integrador
3ce876ddc2be7d2617efe63e392ccc139c5bc0e6
[ "MIT" ]
null
null
null
app/models.py
ViniciussAlencarr/Projeto_Integrador
3ce876ddc2be7d2617efe63e392ccc139c5bc0e6
[ "MIT" ]
null
null
null
from django.db import models from datetime import date from django.db.models.fields import DateTimeField, DecimalField, IntegerField from django.db.models.fields import DateTimeField, IntegerField # Create your models here. class Cliente(models.Model): nome = models.CharField(max_length=20) sobrenome = models....
50.807692
175
0.784103
from django.db import models from datetime import date from django.db.models.fields import DateTimeField, DecimalField, IntegerField from django.db.models.fields import DateTimeField, IntegerField class Cliente(models.Model): nome = models.CharField(max_length=20) sobrenome = models.CharField(max_length=20) ...
true
true
08f93c28692305c3425861b108ff6ce638c4bf47
15,347
py
Python
haystack/pipelines/utils.py
deepset-ai/Haystack
4a63707f1a177123c13929eb316d3ecaa7fd6c5f
[ "Apache-2.0" ]
null
null
null
haystack/pipelines/utils.py
deepset-ai/Haystack
4a63707f1a177123c13929eb316d3ecaa7fd6c5f
[ "Apache-2.0" ]
null
null
null
haystack/pipelines/utils.py
deepset-ai/Haystack
4a63707f1a177123c13929eb316d3ecaa7fd6c5f
[ "Apache-2.0" ]
1
2022-02-17T05:08:53.000Z
2022-02-17T05:08:53.000Z
from typing import Any, Dict, List, Optional try: from typing import Literal except ImportError: from typing_extensions import Literal # type: ignore import re import sys import inspect import logging import networkx as nx from networkx import DiGraph from haystack.pipelines.config import ( build_compo...
44.355491
188
0.661628
from typing import Any, Dict, List, Optional try: from typing import Literal except ImportError: from typing_extensions import Literal import re import sys import inspect import logging import networkx as nx from networkx import DiGraph from haystack.pipelines.config import ( build_component_dependency...
true
true
08f93c72276a75a548149c70ab1d8dceef7a26c2
25,349
py
Python
Traffic_Sign_Classifier.py
kshi1126/CarND-Traffic-Sign-Classifier-Project
7d96575933944309c6de0edc00ac9f03b077c0e2
[ "MIT" ]
null
null
null
Traffic_Sign_Classifier.py
kshi1126/CarND-Traffic-Sign-Classifier-Project
7d96575933944309c6de0edc00ac9f03b077c0e2
[ "MIT" ]
null
null
null
Traffic_Sign_Classifier.py
kshi1126/CarND-Traffic-Sign-Classifier-Project
7d96575933944309c6de0edc00ac9f03b077c0e2
[ "MIT" ]
1
2020-02-19T14:09:10.000Z
2020-02-19T14:09:10.000Z
#!/usr/bin/env python # coding: utf-8 # # Self-Driving Car Engineer Nanodegree # # ## Deep Learning # # ## Project: Build a Traffic Sign Recognition Classifier # # In this notebook, a template is provided for you to implement your functionality in stages, which is required to successfully complete this project. If ...
40.688604
796
0.712967
# "**File -> Download as -> HTML (.html)**. Include the finished document along with this notebook as your submission. import pickle import matplotlib.pyplot as plt training_file = "../data/train.p" validation_file="../data/valid.p" testing_file = "../data/test.p" with open(training_file, mode='rb') as f: ...
true
true
08f93ce99d8cbe860c48c6f40ca89a8eda68c755
6,363
py
Python
soccer_strategy/src/strategy/dummy_strategy.py
sadmanca/soccerbot
5e60eacb51ff1b063ae8c1caf7eb01053add43eb
[ "BSD-3-Clause" ]
null
null
null
soccer_strategy/src/strategy/dummy_strategy.py
sadmanca/soccerbot
5e60eacb51ff1b063ae8c1caf7eb01053add43eb
[ "BSD-3-Clause" ]
2
2022-03-12T01:06:03.000Z
2022-03-12T01:06:11.000Z
soccer_strategy/src/strategy/dummy_strategy.py
sadmanca/soccerbot
5e60eacb51ff1b063ae8c1caf7eb01053add43eb
[ "BSD-3-Clause" ]
null
null
null
import math import numpy as np import rospy import config as config from strategy.strategy import Strategy from soccer_msgs.msg import GameState from robot import Robot HAVENT_SEEN_THE_BALL_TIMEOUT = 10 class DummyStrategy(Strategy): def __init__(self): self.havent_seen_the_ball_timeout = HAVENT_SEEN_TH...
47.842105
152
0.595945
import math import numpy as np import rospy import config as config from strategy.strategy import Strategy from soccer_msgs.msg import GameState from robot import Robot HAVENT_SEEN_THE_BALL_TIMEOUT = 10 class DummyStrategy(Strategy): def __init__(self): self.havent_seen_the_ball_timeout = HAVENT_SEEN_TH...
true
true
08f93dddce1183566199bd1ad8f89595632cb0ac
303
py
Python
src/model/memory/__init__.py
sunbelbd/CL-UN-SentiCLF
518ce2988ccdc1bda39c6a0a22aea2da3132cfb9
[ "MIT" ]
2
2021-08-29T14:39:17.000Z
2022-03-01T02:44:55.000Z
src/model/memory/__init__.py
sunbelbd/CL-UN-SentiCLF
518ce2988ccdc1bda39c6a0a22aea2da3132cfb9
[ "MIT" ]
null
null
null
src/model/memory/__init__.py
sunbelbd/CL-UN-SentiCLF
518ce2988ccdc1bda39c6a0a22aea2da3132cfb9
[ "MIT" ]
null
null
null
# Copyright (c) 2020-present, Baidu, Inc. # All rights reserved. # # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. # # # Acknowledgement: The code is modified based on Facebook AI's XLM. from .memory import HashingMemory
30.3
68
0.732673
from .memory import HashingMemory
true
true
08f93e8125709fa143f9514e44142c17dc7c7d94
34,119
py
Python
PythonVirtEnv/Lib/site-packages/plotly/graph_objs/_indicator.py
zuhorski/EPL_Project
2d2417652879cfbe33c44c003ad77b7222590849
[ "MIT" ]
2
2021-07-18T11:39:56.000Z
2021-11-06T17:13:05.000Z
venv/Lib/site-packages/plotly/graph_objs/_indicator.py
wakisalvador/constructed-misdirection
74779e9ec640a11bc08d5d1967c85ac4fa44ea5e
[ "Unlicense" ]
null
null
null
venv/Lib/site-packages/plotly/graph_objs/_indicator.py
wakisalvador/constructed-misdirection
74779e9ec640a11bc08d5d1967c85ac4fa44ea5e
[ "Unlicense" ]
null
null
null
from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Indicator(_BaseTraceType): # class properties # -------------------- _parent_path_str = "" _path_str = "indicator" _valid_props = { "align", "customdata", "customdatasrc", "...
33.417238
86
0.552302
from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Indicator(_BaseTraceType): _parent_path_str = "" _path_str = "indicator" _valid_props = { "align", "customdata", "customdatasrc", "delta", "domain", "gauge",...
true
true
08f93f23143612a7556612bc37d9f37cb1c76d4b
164
py
Python
PycharmProjects/pythonexercicios/aulas anteriores/ex005.py
zmixtv1/cev-Python
edce04f86d943d9af070bf3c5e89575ff796ec9e
[ "MIT" ]
null
null
null
PycharmProjects/pythonexercicios/aulas anteriores/ex005.py
zmixtv1/cev-Python
edce04f86d943d9af070bf3c5e89575ff796ec9e
[ "MIT" ]
null
null
null
PycharmProjects/pythonexercicios/aulas anteriores/ex005.py
zmixtv1/cev-Python
edce04f86d943d9af070bf3c5e89575ff796ec9e
[ "MIT" ]
null
null
null
n1 = int(input('Digite um numero:')) a = n1-1 s = n1+1 print(f'O antecessor do número que você escolheu é: {a} \nE o sulcessor do número que você escolheu é: {s}')
32.8
108
0.676829
n1 = int(input('Digite um numero:')) a = n1-1 s = n1+1 print(f'O antecessor do número que você escolheu é: {a} \nE o sulcessor do número que você escolheu é: {s}')
true
true
08f9401c7770bd15e7aca190163a07dc8b1b4398
519
py
Python
src/driveBot.py
Baco23/analise-dados-telegram
3e94ead8b8dbe52d3af59286637f08712420d1fe
[ "FTL" ]
null
null
null
src/driveBot.py
Baco23/analise-dados-telegram
3e94ead8b8dbe52d3af59286637f08712420d1fe
[ "FTL" ]
null
null
null
src/driveBot.py
Baco23/analise-dados-telegram
3e94ead8b8dbe52d3af59286637f08712420d1fe
[ "FTL" ]
null
null
null
from fileinput import filename from json import load from dotenv import load_dotenv import gspread import json import os import pandas as pd load_dotenv() class driveBot: def __init__(self): self.gc = gspread.service_account(filename = "credentials.json") def get_data(self): link_google_s...
25.95
72
0.714836
from fileinput import filename from json import load from dotenv import load_dotenv import gspread import json import os import pandas as pd load_dotenv() class driveBot: def __init__(self): self.gc = gspread.service_account(filename = "credentials.json") def get_data(self): link_google_s...
true
true
08f9414a7b5041452573b7c6bc6e4c2f21e3cce3
5,795
py
Python
tests/function.py
cclauss/black
29e97d1d4a7717f1bd0ca35cacf2f2ce6d815b0c
[ "MIT" ]
null
null
null
tests/function.py
cclauss/black
29e97d1d4a7717f1bd0ca35cacf2f2ce6d815b0c
[ "MIT" ]
1
2021-06-02T04:21:34.000Z
2021-06-02T04:21:34.000Z
tests/function.py
tomelliff/black
b07ca2b7d5d03f5d890c1ce5f19b41065ba815c4
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import asyncio import sys from third_party import X, Y, Z from library import some_connection, \ some_decorator f'trigger 3.6 mode' def func_no_args(): a; b; c if True: raise RuntimeError if False: ... for i in range(10): print(i) continue exec("new-style e...
26.705069
160
0.54409
import asyncio import sys from third_party import X, Y, Z from library import some_connection, \ some_decorator f'trigger 3.6 mode' def func_no_args(): a; b; c if True: raise RuntimeError if False: ... for i in range(10): print(i) continue exec("new-style exec", {}, {}) return ...
true
true
08f9414d3a739a0a70ebbfc2550983829410fb66
3,782
py
Python
pyfin/data.py
X0Leon/pyfin
2bdf8ae5f5600838012e1f470a979f3e219df870
[ "MIT" ]
3
2017-03-09T06:46:34.000Z
2021-03-03T09:21:57.000Z
pyfin/data.py
X0Leon/pyfin
2bdf8ae5f5600838012e1f470a979f3e219df870
[ "MIT" ]
null
null
null
pyfin/data.py
X0Leon/pyfin
2bdf8ae5f5600838012e1f470a979f3e219df870
[ "MIT" ]
2
2018-10-13T23:55:10.000Z
2019-01-16T04:47:49.000Z
# -*- coding: utf-8 -*- import datetime import pandas as pd import requests import pyfin import pyfin.utils as utils def get(symbols, provider=None, common_dates=False, forward_fill=True, clean_symbols=True, column_names=None, symbol_field_sep=':', existing=None, **kwargs): """ 获取数据,返回DataF...
27.405797
117
0.607615
import datetime import pandas as pd import requests import pyfin import pyfin.utils as utils def get(symbols, provider=None, common_dates=False, forward_fill=True, clean_symbols=True, column_names=None, symbol_field_sep=':', existing=None, **kwargs): if provider is None: provider = DEF...
true
true
08f94319b2e5b51b4eab563fab2719ff26f7e7d8
38,611
py
Python
Packs/MicrosoftGraphListener/Integrations/MicrosoftGraphListener/MicrosoftGraphListener.py
devods/content
35ecc784b797aa49d187718c8c97f7e5ada010a8
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/MicrosoftGraphListener/Integrations/MicrosoftGraphListener/MicrosoftGraphListener.py
devods/content
35ecc784b797aa49d187718c8c97f7e5ada010a8
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/MicrosoftGraphListener/Integrations/MicrosoftGraphListener/MicrosoftGraphListener.py
devods/content
35ecc784b797aa49d187718c8c97f7e5ada010a8
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import demistomock as demisto from CommonServerPython import * from CommonServerUserPython import * ''' IMPORTS ''' import requests import base64 import os import json # Disable insecure warnings requests.packages.urllib3.disable_warnings() ''' GLOBAL VARS ''' DATE_FORMAT = '%Y-%m-%dT%H:%M:%SZ' # Well known folder...
40.685985
119
0.643366
import demistomock as demisto from CommonServerPython import * from CommonServerUserPython import * import requests import base64 import os import json requests.packages.urllib3.disable_warnings() DATE_FORMAT = '%Y-%m-%dT%H:%M:%SZ' WELL_KNOWN_FOLDERS = { 'archive': 'archive', 'conversation history': 'conve...
true
true
08f943763215363e463b11fe197fac39bb4e11bf
5,276
py
Python
ververica_api_sdk/models/resource_list_deployment.py
justlikemikezz/ververica-api-sdk
0eee284b4433f74b35fd2f41d149e619624aaed3
[ "RSA-MD" ]
null
null
null
ververica_api_sdk/models/resource_list_deployment.py
justlikemikezz/ververica-api-sdk
0eee284b4433f74b35fd2f41d149e619624aaed3
[ "RSA-MD" ]
null
null
null
ververica_api_sdk/models/resource_list_deployment.py
justlikemikezz/ververica-api-sdk
0eee284b4433f74b35fd2f41d149e619624aaed3
[ "RSA-MD" ]
null
null
null
# coding: utf-8 """ Application Manager API Application Manager APIs to control Apache Flink jobs # noqa: E501 OpenAPI spec version: 2.0.1 Contact: platform@ververica.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six cl...
27.195876
93
0.579985
import pprint import re import six class ResourceListDeployment(object): swagger_types = { 'api_version': 'str', 'items': 'list[Deployment]', 'kind': 'str', 'metadata': 'ResourceListMetadata' } attribute_map = { 'api_version': 'apiVersion', 'items': '...
true
true
08f94399c78a13d2b6944656966511781ba37dfd
16,222
py
Python
pytorch_widedeep/models/wide_deep.py
sallypannn/pytorch-widedeep
ab4a209a2a3bff539f543a66ac51306042ed6693
[ "MIT" ]
1
2021-08-23T15:16:13.000Z
2021-08-23T15:16:13.000Z
pytorch_widedeep/models/wide_deep.py
sxjscience/pytorch-widedeep
0c79deb5de7b5005613fd926dee726f3227f5375
[ "MIT" ]
null
null
null
pytorch_widedeep/models/wide_deep.py
sxjscience/pytorch-widedeep
0c79deb5de7b5005613fd926dee726f3227f5375
[ "MIT" ]
null
null
null
import warnings import torch import torch.nn as nn from pytorch_widedeep.wdtypes import * # noqa: F403 from pytorch_widedeep.models.tab_mlp import MLP from pytorch_widedeep.models.tabnet.tab_net import TabNetPredLayer warnings.filterwarnings("default", category=UserWarning) use_cuda = torch.cuda.is_available() dev...
41.809278
105
0.61355
import warnings import torch import torch.nn as nn from pytorch_widedeep.wdtypes import * from pytorch_widedeep.models.tab_mlp import MLP from pytorch_widedeep.models.tabnet.tab_net import TabNetPredLayer warnings.filterwarnings("default", category=UserWarning) use_cuda = torch.cuda.is_available() device = torch.d...
true
true
08f944127e391c69af5edb8a120bbadf2a21eccb
1,563
py
Python
tests/data23/recipe-181905.py
JohannesBuchner/pystrict3
f442a89ac6a23f4323daed8ef829d8e9e1197f90
[ "BSD-2-Clause" ]
1
2020-06-05T08:53:26.000Z
2020-06-05T08:53:26.000Z
tests/data23/recipe-181905.py
JohannesBuchner/pystrict3
f442a89ac6a23f4323daed8ef829d8e9e1197f90
[ "BSD-2-Clause" ]
1
2020-06-04T13:47:19.000Z
2020-06-04T13:47:57.000Z
tests/data23/recipe-181905.py
JohannesBuchner/pystrict3
f442a89ac6a23f4323daed8ef829d8e9e1197f90
[ "BSD-2-Clause" ]
1
2020-11-07T17:02:46.000Z
2020-11-07T17:02:46.000Z
from twisted.spread import pb from twisted.internet import reactor import sys PORT = 8992 DELAY = 1 DOG_DELAY = 2 RESTART_DELAY = 5 class Pinger: def __init__( self, host ): self.ping = None self.host = host self.ball = 0 self._start() def _start...
24.809524
70
0.572617
from twisted.spread import pb from twisted.internet import reactor import sys PORT = 8992 DELAY = 1 DOG_DELAY = 2 RESTART_DELAY = 5 class Pinger: def __init__( self, host ): self.ping = None self.host = host self.ball = 0 self._start() def _start...
true
true
08f9442127328e1108956aba8f17ebdeb20f9b55
1,780
py
Python
tests/profile/admin_history/test_highlights_history.py
OpenUpSA/wazimap-ng
57334e6da319482aa4ff2fde86c4ec27c30ee8d6
[ "Apache-2.0" ]
11
2019-12-31T20:27:22.000Z
2022-03-10T03:55:38.000Z
tests/profile/admin_history/test_highlights_history.py
OpenUpSA/wazimap-ng
57334e6da319482aa4ff2fde86c4ec27c30ee8d6
[ "Apache-2.0" ]
164
2020-02-06T15:02:22.000Z
2022-03-30T22:42:00.000Z
tests/profile/admin_history/test_highlights_history.py
OpenUpSA/wazimap-ng
57334e6da319482aa4ff2fde86c4ec27c30ee8d6
[ "Apache-2.0" ]
16
2020-01-03T20:30:24.000Z
2022-01-11T11:05:15.000Z
import json import pytest from django.contrib.admin.sites import AdminSite from django.urls import reverse from wazimap_ng.profile.models import ProfileHighlight from wazimap_ng.profile.admin import ProfileHighlightAdmin @pytest.mark.django_db class TestProfileHighlightAdminHistory: def test_change_reason_fiel...
36.326531
78
0.681461
import json import pytest from django.contrib.admin.sites import AdminSite from django.urls import reverse from wazimap_ng.profile.models import ProfileHighlight from wazimap_ng.profile.admin import ProfileHighlightAdmin @pytest.mark.django_db class TestProfileHighlightAdminHistory: def test_change_reason_fiel...
true
true
08f945c8112d72894ee36b339b1e4a911f9396b4
4,535
py
Python
tencentcloud/cloudaudit/v20190319/errorcodes.py
PlasticMem/tencentcloud-sdk-python
666db85623d51d640a165907a19aef5fba53b38d
[ "Apache-2.0" ]
465
2018-04-27T09:54:59.000Z
2022-03-29T02:18:01.000Z
tencentcloud/cloudaudit/v20190319/errorcodes.py
PlasticMem/tencentcloud-sdk-python
666db85623d51d640a165907a19aef5fba53b38d
[ "Apache-2.0" ]
91
2018-04-27T09:48:11.000Z
2022-03-12T08:04:04.000Z
tencentcloud/cloudaudit/v20190319/errorcodes.py
PlasticMem/tencentcloud-sdk-python
666db85623d51d640a165907a19aef5fba53b38d
[ "Apache-2.0" ]
232
2018-05-02T08:02:46.000Z
2022-03-30T08:02:48.000Z
# -*- coding: utf8 -*- # Copyright (c) 2017-2021 THL A29 Limited, a Tencent company. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses...
32.625899
98
0.854686
FAILEDOPERATION_CREATEBUCKETFAIL = 'FailedOperation.CreateBucketFail' INTERNALERROR = 'InternalError' INTERNALERROR_CMQERROR = 'InternalError.CmqError' INTERNALERROR_CREATEAUDITERROR = 'InternalError.CreateAuditError' INTERNALERROR_DELETEAUDITERROR = 'InternalError.DeleteAuditError' INTERNALERROR_DESCRIBEAUDITER...
true
true
08f9468b19bf6d14fb9e3763a05f29726f4f940a
149
py
Python
Pacotes/calc/__init__.py
VictorMello1993/CursoPythonUdemy
d3e2e542a7c3d3f9635f2b88d0e75ab4fa84236d
[ "MIT" ]
null
null
null
Pacotes/calc/__init__.py
VictorMello1993/CursoPythonUdemy
d3e2e542a7c3d3f9635f2b88d0e75ab4fa84236d
[ "MIT" ]
4
2021-04-08T21:54:09.000Z
2022-02-10T14:35:13.000Z
Pacotes/calc/__init__.py
VictorMello1993/CursoPythonUdemy
d3e2e542a7c3d3f9635f2b88d0e75ab4fa84236d
[ "MIT" ]
null
null
null
#Pacote como "fachada" de outros pacotes from pacote1.modulo1 import soma from pacote2.modulo1 import subtracao __all__ = ['soma', 'subtracao']
24.833333
40
0.758389
from pacote1.modulo1 import soma from pacote2.modulo1 import subtracao __all__ = ['soma', 'subtracao']
true
true
08f9481be40076b1d667c69211abeea2e8b44ea8
2,800
py
Python
textacy/preprocessing/normalize.py
tbsexton/textacy
964614213c7261f91f09c106334269388d45f790
[ "Apache-2.0" ]
null
null
null
textacy/preprocessing/normalize.py
tbsexton/textacy
964614213c7261f91f09c106334269388d45f790
[ "Apache-2.0" ]
null
null
null
textacy/preprocessing/normalize.py
tbsexton/textacy
964614213c7261f91f09c106334269388d45f790
[ "Apache-2.0" ]
null
null
null
""" Normalize --------- Normalize aspects of raw text that may vary in problematic ways. """ import re import unicodedata from .resources import ( QUOTE_TRANSLATION_TABLE, RE_HYPHENATED_WORD, RE_LINEBREAK, RE_NONBREAKING_SPACE, RE_ZWSP, ) def normalize_hyphenated_words(text: str) -> str: """...
32.941176
89
0.664643
import re import unicodedata from .resources import ( QUOTE_TRANSLATION_TABLE, RE_HYPHENATED_WORD, RE_LINEBREAK, RE_NONBREAKING_SPACE, RE_ZWSP, ) def normalize_hyphenated_words(text: str) -> str: return RE_HYPHENATED_WORD.sub(r"\1\2", text) def normalize_quotation_marks(text: str) -> str: ...
true
true
08f949492db38f7ceab3507a028f891530a4ed41
1,173
py
Python
scripts/prepare_shared_scan_results.py
RRr89/Shared_SIMD_Scan
765930216dd2a18af0183bdf6c3be014e8569778
[ "MIT" ]
null
null
null
scripts/prepare_shared_scan_results.py
RRr89/Shared_SIMD_Scan
765930216dd2a18af0183bdf6c3be014e8569778
[ "MIT" ]
null
null
null
scripts/prepare_shared_scan_results.py
RRr89/Shared_SIMD_Scan
765930216dd2a18af0183bdf6c3be014e8569778
[ "MIT" ]
1
2018-10-06T09:41:10.000Z
2018-10-06T09:41:10.000Z
import sys import os import subprocess import csv if len(sys.argv) < 2: print('Please pass the path to the shared simd scan binary to this script.') sys.exit() simdscan = sys.argv[1] csv_writer = csv.writer(sys.stdout) csv_writer.writerow(['data_size', 'predicate_count', 'variant', 'avg_runtime_ms']) def par...
37.83871
133
0.69139
import sys import os import subprocess import csv if len(sys.argv) < 2: print('Please pass the path to the shared simd scan binary to this script.') sys.exit() simdscan = sys.argv[1] csv_writer = csv.writer(sys.stdout) csv_writer.writerow(['data_size', 'predicate_count', 'variant', 'avg_runtime_ms']) def par...
true
true
08f949b26d67bb9e9cdddb87b1a6fd12c21b3152
973
py
Python
jsonclasses/validators/transform_validator.py
katrina799/jsonclasses
7648d2c1dbef8a001975013f24e49dd6421099ba
[ "MIT" ]
null
null
null
jsonclasses/validators/transform_validator.py
katrina799/jsonclasses
7648d2c1dbef8a001975013f24e49dd6421099ba
[ "MIT" ]
null
null
null
jsonclasses/validators/transform_validator.py
katrina799/jsonclasses
7648d2c1dbef8a001975013f24e49dd6421099ba
[ "MIT" ]
null
null
null
"""module for transform validator.""" from typing import Callable, Any from inspect import signature from .validator import Validator from ..contexts import TransformingContext class TransformValidator(Validator): """Transform validator transforms value.""" def __init__(self, transformer: Callable) -> None: ...
36.037037
64
0.682425
from typing import Callable, Any from inspect import signature from .validator import Validator from ..contexts import TransformingContext class TransformValidator(Validator): def __init__(self, transformer: Callable) -> None: if not callable(transformer): raise ValueError('transformer is not...
true
true
08f94a5e245d969188effffe38405dbead7d5db8
12,302
py
Python
submitit/core/utils.py
araujoalexandre/submitit
276dd6849af05ff6e6f792abdf28280e1efc604c
[ "MIT" ]
null
null
null
submitit/core/utils.py
araujoalexandre/submitit
276dd6849af05ff6e6f792abdf28280e1efc604c
[ "MIT" ]
null
null
null
submitit/core/utils.py
araujoalexandre/submitit
276dd6849af05ff6e6f792abdf28280e1efc604c
[ "MIT" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # import contextlib import io import itertools import os import pickle import re import select import shutil import subprocess import sys impo...
34.948864
124
0.639733
import contextlib import io import itertools import os import pickle import re import select import shutil import subprocess import sys import tarfile from pathlib import Path from typing import IO, Any, Callable, Dict, Iterator, List, Optional, Tuple, Type, Union import cloudpickle @contextlib.contextmanager def e...
true
true
08f94ad5d8853d8f40eb642c93bba87618bc687c
985
py
Python
examples/upload_firmware.py
chrismanivong/python-client
cc69c5bd9777659537f1f2a10ae3a6aac9bed7df
[ "MIT" ]
3
2021-04-14T20:21:34.000Z
2021-05-19T20:59:03.000Z
examples/upload_firmware.py
chrismanivong/python-client
cc69c5bd9777659537f1f2a10ae3a6aac9bed7df
[ "MIT" ]
6
2021-04-20T10:45:30.000Z
2022-01-22T13:02:52.000Z
examples/upload_firmware.py
chrismanivong/python-client
cc69c5bd9777659537f1f2a10ae3a6aac9bed7df
[ "MIT" ]
1
2022-01-19T17:48:44.000Z
2022-01-19T17:48:44.000Z
import sys from getpass import getpass from pathlib import Path from iot_inspector_client import Client from iot_inspector_client.models import FirmwareMetadata API_URL = "https://demo.iot-inspector.com/api" EMAIL = sys.argv[1] PASSWORD = getpass() print("Login to IoT Inspector", EMAIL, "@", API_URL) client = Clien...
21.413043
77
0.753299
import sys from getpass import getpass from pathlib import Path from iot_inspector_client import Client from iot_inspector_client.models import FirmwareMetadata API_URL = "https://demo.iot-inspector.com/api" EMAIL = sys.argv[1] PASSWORD = getpass() print("Login to IoT Inspector", EMAIL, "@", API_URL) client = Clien...
true
true
08f94b0e0e37c098c11e0e685ae908d54e9c7a73
17,625
py
Python
desktop/libs/notebook/src/notebook/connectors/sql_alchemy_tests.py
zhedoubushishi/hue
fe86ec65f06eb891ae80d95daf15ea9ecb158c4f
[ "Apache-2.0" ]
null
null
null
desktop/libs/notebook/src/notebook/connectors/sql_alchemy_tests.py
zhedoubushishi/hue
fe86ec65f06eb891ae80d95daf15ea9ecb158c4f
[ "Apache-2.0" ]
null
null
null
desktop/libs/notebook/src/notebook/connectors/sql_alchemy_tests.py
zhedoubushishi/hue
fe86ec65f06eb891ae80d95daf15ea9ecb158c4f
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (...
34.694882
139
0.64817
from builtins import object import logging import sys from nose.tools import assert_equal, assert_not_equal, assert_true, assert_false, raises from sqlalchemy.exc import UnsupportedCompilationError from sqlalchemy.types import NullType, ARRAY, JSON, VARCHAR from desktop.auth.backend import rewrite_user from desktop....
true
true
08f94ba7bd83da808002a404c53b9cb21f3dbb1a
1,853
py
Python
src/ui/components/component.py
tulustul/MusicPlayer
e44ea89a00c3cf46936544e579191fbbf64b0417
[ "MIT" ]
3
2019-05-04T01:08:44.000Z
2021-07-29T22:35:35.000Z
src/ui/components/component.py
tulustul/MusicPlayer
e44ea89a00c3cf46936544e579191fbbf64b0417
[ "MIT" ]
null
null
null
src/ui/components/component.py
tulustul/MusicPlayer
e44ea89a00c3cf46936544e579191fbbf64b0417
[ "MIT" ]
null
null
null
import logging import curses from ui.colors import colors from .abstract_component import AbstractComponent from ..rect import Rect logger = logging.getLogger("ui") class Component(AbstractComponent): def __init__(self, context=None, **kwargs): super().__init__(**kwargs) self.win = None ...
31.40678
113
0.583918
import logging import curses from ui.colors import colors from .abstract_component import AbstractComponent from ..rect import Rect logger = logging.getLogger("ui") class Component(AbstractComponent): def __init__(self, context=None, **kwargs): super().__init__(**kwargs) self.win = None ...
true
true
08f94c4bbdc7da77a5eae7a3cf3dca78ec994710
1,500
py
Python
aliyun-python-sdk-cloudapi/aliyunsdkcloudapi/request/v20160714/DescribeDomainRequest.py
sdk-team/aliyun-openapi-python-sdk
384730d707e6720d1676ccb8f552e6a7b330ec86
[ "Apache-2.0" ]
1
2019-12-23T12:36:43.000Z
2019-12-23T12:36:43.000Z
aliyun-python-sdk-cloudapi/aliyunsdkcloudapi/request/v20160714/DescribeDomainRequest.py
sdk-team/aliyun-openapi-python-sdk
384730d707e6720d1676ccb8f552e6a7b330ec86
[ "Apache-2.0" ]
null
null
null
aliyun-python-sdk-cloudapi/aliyunsdkcloudapi/request/v20160714/DescribeDomainRequest.py
sdk-team/aliyun-openapi-python-sdk
384730d707e6720d1676ccb8f552e6a7b330ec86
[ "Apache-2.0" ]
null
null
null
# 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 u...
35.714286
85
0.766667
from aliyunsdkcore.request import RpcRequest class DescribeDomainRequest(RpcRequest): def __init__(self): RpcRequest.__init__(self, 'CloudAPI', '2016-07-14', 'DescribeDomain','apigateway') def get_SecurityToken(self): return self.get_query_params().get('SecurityToken') def set_SecurityToken(self,Securit...
true
true
08f94d387475e3fc3d6b1a1924efa1c8bfac379b
3,068
py
Python
src/1/MyDbTransactioner.py
ytyaru/Python.Sqlite3.class.201803041400000
4b1751ff96f4d84cbe8ce87254bc73ebfd654b57
[ "CC0-1.0" ]
null
null
null
src/1/MyDbTransactioner.py
ytyaru/Python.Sqlite3.class.201803041400000
4b1751ff96f4d84cbe8ce87254bc73ebfd654b57
[ "CC0-1.0" ]
null
null
null
src/1/MyDbTransactioner.py
ytyaru/Python.Sqlite3.class.201803041400000
4b1751ff96f4d84cbe8ce87254bc73ebfd654b57
[ "CC0-1.0" ]
null
null
null
from Transactioner import Transactioner #from threading import Thread, Lock #import functools #import dataset #from Singleton import Singleton #class MyDbTransactioner(Transactioner): # def __init__(self, db_url, *dataset_args, **dataset_kwargs): # super().__init__(db_url, *dataset_args, **dataset_kwargs) c...
29.219048
98
0.566819
from Transactioner import Transactioner class MyDbTransactioner: T = Transactioner('sqlite:///mydb.db') @T.transact(MyDbTransactioner) def CreateTable(cls, db, table_name, name_types): columns = ', '.join(k+' '+v for k,v in name_types.items()) sql = f'create table {table_name} ({colum...
true
true
08f950127ed6625a3f0e3315620225b606681315
439
py
Python
db_adapter/curw_sim/grids/__init__.py
CUrW-SL/curw_db_adapter
9d9ef24f42080910e0bd251bc7f001b0a4b0ab31
[ "MIT" ]
2
2019-04-26T07:50:33.000Z
2019-09-28T20:15:33.000Z
db_adapter/curw_sim/grids/__init__.py
CUrW-SL/curw_db_adapter
9d9ef24f42080910e0bd251bc7f001b0a4b0ab31
[ "MIT" ]
1
2019-04-03T09:30:38.000Z
2019-04-20T18:11:59.000Z
db_adapter/curw_sim/grids/__init__.py
shadhini/curw_db_adapter
4db8e1ea8794ffbd0dce29ac954a13315e83d843
[ "MIT" ]
null
null
null
from .flo2d_grid_utils import add_flo2d_raincell_grid_mappings, get_flo2d_cells_to_obs_grid_mappings, \ get_flo2d_cells_to_wrf_grid_mappings from .obs_grid_utils import add_obs_to_d03_grid_mappings_for_rainfall, get_obs_to_d03_grid_mappings_for_rainfall from .flo2d_grid_utils import add_flo2d_initial_conditions, ge...
73.166667
114
0.917995
from .flo2d_grid_utils import add_flo2d_raincell_grid_mappings, get_flo2d_cells_to_obs_grid_mappings, \ get_flo2d_cells_to_wrf_grid_mappings from .obs_grid_utils import add_obs_to_d03_grid_mappings_for_rainfall, get_obs_to_d03_grid_mappings_for_rainfall from .flo2d_grid_utils import add_flo2d_initial_conditions, ge...
true
true
08f9508368af0a412f0a27ba6eee95ec5885bbd5
609
py
Python
t/unit/utils/test_utils.py
CountRedClaw/kombu
14d395aa859b905874d8b4abd677a4c7ac86e10b
[ "BSD-3-Clause" ]
null
null
null
t/unit/utils/test_utils.py
CountRedClaw/kombu
14d395aa859b905874d8b4abd677a4c7ac86e10b
[ "BSD-3-Clause" ]
null
null
null
t/unit/utils/test_utils.py
CountRedClaw/kombu
14d395aa859b905874d8b4abd677a4c7ac86e10b
[ "BSD-3-Clause" ]
null
null
null
from __future__ import annotations import pytest from kombu import version_info_t from kombu.utils.text import version_string_as_tuple def test_dir(): import kombu assert dir(kombu) @pytest.mark.parametrize('version,expected', [ ('3', version_info_t(3, 0, 0, '', '')), ('3.3', version_info_t(3, 3, ...
26.478261
63
0.650246
from __future__ import annotations import pytest from kombu import version_info_t from kombu.utils.text import version_string_as_tuple def test_dir(): import kombu assert dir(kombu) @pytest.mark.parametrize('version,expected', [ ('3', version_info_t(3, 0, 0, '', '')), ('3.3', version_info_t(3, 3, ...
true
true
08f950b1e8f2b230813bd147c05b7f22be83e0ff
2,306
py
Python
python/test/test_meas.py
sarus-tech/opendp
e4b1714fdadd72fe488647be83f6bfc7d1d20064
[ "MIT" ]
null
null
null
python/test/test_meas.py
sarus-tech/opendp
e4b1714fdadd72fe488647be83f6bfc7d1d20064
[ "MIT" ]
null
null
null
python/test/test_meas.py
sarus-tech/opendp
e4b1714fdadd72fe488647be83f6bfc7d1d20064
[ "MIT" ]
null
null
null
from opendp.mod import enable_features from opendp.typing import L1Distance enable_features("floating-point") def test_base_laplace(): from opendp.meas import make_base_laplace meas = make_base_laplace(scale=10.5) print("base laplace:", meas(100.)) assert meas.check(1., 1.3) def test_base_vector_la...
32.942857
92
0.688638
from opendp.mod import enable_features from opendp.typing import L1Distance enable_features("floating-point") def test_base_laplace(): from opendp.meas import make_base_laplace meas = make_base_laplace(scale=10.5) print("base laplace:", meas(100.)) assert meas.check(1., 1.3) def test_base_vector_la...
true
true
08f9515a9a3c3c1048323365947d2436d742cbfc
129
py
Python
openstack_controller/datadog_checks/openstack_controller/__about__.py
andersenleo/integrations-core
e521b88e32820a286a70c7797a663d4f9ba41110
[ "BSD-3-Clause" ]
null
null
null
openstack_controller/datadog_checks/openstack_controller/__about__.py
andersenleo/integrations-core
e521b88e32820a286a70c7797a663d4f9ba41110
[ "BSD-3-Clause" ]
null
null
null
openstack_controller/datadog_checks/openstack_controller/__about__.py
andersenleo/integrations-core
e521b88e32820a286a70c7797a663d4f9ba41110
[ "BSD-3-Clause" ]
null
null
null
# (C) Datadog, Inc. 2018 # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) __version__ = '1.2.1'
25.8
59
0.713178
__version__ = '1.2.1'
true
true
08f9526490a64e9bcb8f3ef0b98abc4a4cb303d1
5,410
py
Python
evaluate_naive.py
datduong/deepgoplus
4e39e9785f196bc2be8fb37dc81a8481b63b1532
[ "BSD-3-Clause" ]
null
null
null
evaluate_naive.py
datduong/deepgoplus
4e39e9785f196bc2be8fb37dc81a8481b63b1532
[ "BSD-3-Clause" ]
null
null
null
evaluate_naive.py
datduong/deepgoplus
4e39e9785f196bc2be8fb37dc81a8481b63b1532
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python import numpy as np import pandas as pd import click as ck # from tensorflow.keras.models import Sequential, Model, load_model # from tensorflow.keras.layers import ( # Dense, Dropout, Activation, Input, Reshape, # Flatten, BatchNormalization, Embedding, # Conv1D, MaxPooling1D, Add, Concaten...
29.086022
91
0.666728
import numpy as np import pandas as pd import click as ck from sklearn.metrics import classification_report from sklearn.metrics.pairwise import cosine_similarity import sys from collections import deque, Counter import time import logging from sklearn.metrics import roc_curve, auc, matthews_corrcoef from scipy.spatia...
true
true
08f952908eda58c61d0d1c15e384030ed7551331
1,082
py
Python
Desafios/Mundo 3/ex100.py
lucasllimati/CursoEmVideo
01d75626baf8b82f141d62f681e55a9bda0099fd
[ "MIT" ]
null
null
null
Desafios/Mundo 3/ex100.py
lucasllimati/CursoEmVideo
01d75626baf8b82f141d62f681e55a9bda0099fd
[ "MIT" ]
null
null
null
Desafios/Mundo 3/ex100.py
lucasllimati/CursoEmVideo
01d75626baf8b82f141d62f681e55a9bda0099fd
[ "MIT" ]
null
null
null
# 100 # Faça um programa que tenha uma lista chamada números e duas funções chamadas sorteia() e somaPar(). A primeira função vai sortear 5 números e vai colocá-los dentro da lista e a segunda função vai mostrar a soma entre todos os valores pares sorteados pela função anterior. from random import randint from time im...
28.473684
273
0.634011
from random import randint from time import sleep def linha(): print('-=' * 20) def sorteia(lista): print('Sorteando 5 valores da lista: ', end='') for cont in range(0, 5): n = randint(1, 10) lista.append(n) print(f'{n} ', end='', flush='True') sleep(0.3) print('PRONT...
true
true
08f95298b2c53b14810ae22bbf6710fc8c725405
85
py
Python
tests/build_test/_lib.py
Aesonus/py-build
790a750492b0f6ecd52f6f564d3aa4522e255406
[ "MIT" ]
null
null
null
tests/build_test/_lib.py
Aesonus/py-build
790a750492b0f6ecd52f6f564d3aa4522e255406
[ "MIT" ]
null
null
null
tests/build_test/_lib.py
Aesonus/py-build
790a750492b0f6ecd52f6f564d3aa4522e255406
[ "MIT" ]
null
null
null
""" The _lib.py file can provide functions to build steps in one convienient area """
28.333333
77
0.752941
true
true
08f952d3238d7b94c882c525527ea756f28d4dc4
3,715
py
Python
args.py
kevinleestone/mmstereo
6757847000ed19cce607ce7537f2f38eed305cdd
[ "MIT" ]
null
null
null
args.py
kevinleestone/mmstereo
6757847000ed19cce607ce7537f2f38eed305cdd
[ "MIT" ]
null
null
null
args.py
kevinleestone/mmstereo
6757847000ed19cce607ce7537f2f38eed305cdd
[ "MIT" ]
null
null
null
# Copyright 2021 Toyota Research Institute. All rights reserved. from dataclasses import dataclass, field from typing import Optional, List from omegaconf import MISSING @dataclass class DatasetConfig(object): """Path where dataset can be found""" path: str = MISSING """True if dataset is simulated"""...
29.023438
115
0.69852
from dataclasses import dataclass, field from typing import Optional, List from omegaconf import MISSING @dataclass class DatasetConfig(object): path: str = MISSING sim: bool = False fraction: float = 1.0 repeats: int = 1 no_split: bool = False @dataclass class TransformConfig(object): r...
true
true
08f953ec8321e7ba7134176af74d49a6e290b476
969
py
Python
tests/oas_types/test_primative.py
endafarrell/openapi-sanic3e
cfb4bcb7e983693e5abb781c23dba3931a1caadd
[ "MIT" ]
7
2021-01-14T19:28:48.000Z
2021-09-19T07:39:02.000Z
tests/oas_types/test_primative.py
endafarrell/sanic-openapi3e
cfb4bcb7e983693e5abb781c23dba3931a1caadd
[ "MIT" ]
24
2019-03-04T09:18:27.000Z
2021-01-20T10:17:04.000Z
tests/oas_types/test_primative.py
endafarrell/sanic-openapi3e
cfb4bcb7e983693e5abb781c23dba3931a1caadd
[ "MIT" ]
null
null
null
import pytest import sanic_openapi3e import sanic_openapi3e.oas_types def test_otype(): with pytest.raises(TypeError): # noinspection PyTypeChecker sanic_openapi3e.oas_types.Contact(name=2) o_contact = sanic_openapi3e.oas_types.Contact(name="name", url="url") assert o_contact.as_yamlable...
33.413793
120
0.736842
import pytest import sanic_openapi3e import sanic_openapi3e.oas_types def test_otype(): with pytest.raises(TypeError): sanic_openapi3e.oas_types.Contact(name=2) o_contact = sanic_openapi3e.oas_types.Contact(name="name", url="url") assert o_contact.as_yamlable_object() == {"name": "name",...
true
true
08f95466089e7cc9d785ee85a3ff57559cc1169a
22,739
py
Python
pyquil/tests/test_paulis_with_placeholders.py
ncrubin/pyquil
442c174ce0b55b10324adf08c8fe3aa8e5110913
[ "Apache-2.0" ]
3
2021-11-08T11:46:42.000Z
2021-12-27T10:13:38.000Z
pyquil/tests/test_paulis_with_placeholders.py
ncrubin/pyquil
442c174ce0b55b10324adf08c8fe3aa8e5110913
[ "Apache-2.0" ]
2
2021-11-09T14:57:09.000Z
2022-01-12T12:35:58.000Z
artifacts/old_dataset_versions/original_commits_v02/pyquil/pyquil#710/before/test_paulis_with_placeholders.py
MattePalte/Bugs-Quantum-Computing-Platforms
0c1c805fd5dfce465a8955ee3faf81037023a23e
[ "MIT" ]
null
null
null
############################################################################## # Copyright 2016-2018 Rigetti Computing # # 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...
37.216039
101
0.584766
import math import warnings from functools import reduce from itertools import product from operator import mul import numpy as np import pytest import re from six.moves import range from pyquil.gates import RX, RZ, CNOT, H, X, PHASE from pyquil.paulis import PauliTerm, PauliSum, exponential_map, exponentiate_commut...
true
true
08f954ae3a0e90bce1d6dd97cec424ce1536c4a2
15,128
py
Python
pfurl/message.py
jdtzmn/pfurl
22c74efd11a3e1cca7ca6636dd909e06bb9387b3
[ "MIT" ]
null
null
null
pfurl/message.py
jdtzmn/pfurl
22c74efd11a3e1cca7ca6636dd909e06bb9387b3
[ "MIT" ]
null
null
null
pfurl/message.py
jdtzmn/pfurl
22c74efd11a3e1cca7ca6636dd909e06bb9387b3
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import sys import os import time import inspect import types from io import IOBase # pman local dependencies from .dgmsocket import C_dgmsocket from ._colors import Colors class Message: ''' A simple messaging class that is able to send text content to a...
33.102845
84
0.538604
import sys import os import time import inspect import types from io import IOBase from .dgmsocket import C_dgmsocket from ._colors import Colors class Message: def verbosity(self, *args): if len(args): self._verbosity = args[0] else: ...
true
true
08f9555e64269eabba1b0ee17d95e65093a1d87f
619
py
Python
tron/utils/twistedutils.py
Yelp/Tron
d60b015163418bf66f638e4c12337289ad8c040a
[ "Apache-2.0" ]
190
2015-01-01T17:40:46.000Z
2022-02-02T09:32:03.000Z
tron/utils/twistedutils.py
Yelp/Tron
d60b015163418bf66f638e4c12337289ad8c040a
[ "Apache-2.0" ]
237
2015-01-14T19:25:01.000Z
2022-03-15T18:33:29.000Z
tron/utils/twistedutils.py
Yelp/Tron
d60b015163418bf66f638e4c12337289ad8c040a
[ "Apache-2.0" ]
40
2015-01-22T07:54:15.000Z
2022-03-03T08:01:29.000Z
from twisted.internet import defer from twisted.internet import reactor from twisted.python import failure class Error(Exception): pass def _cancel(deferred): """Re-implementing what's available in newer twisted in a crappy, but workable way.""" if not deferred.called: deferred.errback(fail...
24.76
73
0.723748
from twisted.internet import defer from twisted.internet import reactor from twisted.python import failure class Error(Exception): pass def _cancel(deferred): if not deferred.called: deferred.errback(failure.Failure(Error())) elif isinstance(deferred.result, defer.Deferred): _cancel(def...
true
true
08f956183205e9446c06b3c0da43fa2c2e4d9da1
564
py
Python
src/tests/functional/cfp/test_base.py
td00/pretalx
aff450de9420fca167e04345fa24ee7140fae819
[ "Apache-2.0" ]
null
null
null
src/tests/functional/cfp/test_base.py
td00/pretalx
aff450de9420fca167e04345fa24ee7140fae819
[ "Apache-2.0" ]
null
null
null
src/tests/functional/cfp/test_base.py
td00/pretalx
aff450de9420fca167e04345fa24ee7140fae819
[ "Apache-2.0" ]
null
null
null
import pytest @pytest.mark.django_db def test_no_crash_on_incorrect_event(client, event): response = client.get(f'/{event.slug}typoe/',) assert response.status_code == 404 @pytest.mark.django_db def test_no_crash_on_incorrect_event_for_orga(orga_client, event): response = orga_client.get(f'/{event.slug}...
26.857143
66
0.751773
import pytest @pytest.mark.django_db def test_no_crash_on_incorrect_event(client, event): response = client.get(f'/{event.slug}typoe/',) assert response.status_code == 404 @pytest.mark.django_db def test_no_crash_on_incorrect_event_for_orga(orga_client, event): response = orga_client.get(f'/{event.slug}...
true
true
08f95650a4c5fad65921974ac48ced0608ec6a92
10,020
py
Python
itests/legacy/test_request_handlers.py
pabarros/asgard-api
3c10d5f99f584df5e8011558cf42e8b201d567e9
[ "MIT" ]
1
2019-04-14T23:39:18.000Z
2019-04-14T23:39:18.000Z
itests/legacy/test_request_handlers.py
pabarros/asgard-api
3c10d5f99f584df5e8011558cf42e8b201d567e9
[ "MIT" ]
2
2019-08-02T21:05:25.000Z
2019-08-12T19:32:06.000Z
itests/legacy/test_request_handlers.py
rockerbacon/asgard-api
1c1eb19225ace4bbecb06b65b1b9c4ab131eb24a
[ "MIT" ]
null
null
null
import json from copy import deepcopy from unittest.mock import ANY, MagicMock, patch from marathon import MarathonApp from responses import RequestsMock from asgard.models.account import AccountDB from asgard.models.user import UserDB from hollowman import conf from hollowman.app import application from hollowman.ht...
40.240964
104
0.547705
import json from copy import deepcopy from unittest.mock import ANY, MagicMock, patch from marathon import MarathonApp from responses import RequestsMock from asgard.models.account import AccountDB from asgard.models.user import UserDB from hollowman import conf from hollowman.app import application from hollowman.ht...
true
true
08f956e304bec4584facdaa7ba985db7f7ee05a1
1,794
py
Python
core/core_server.py
dgpatelgit/findup
e47d57171635ab0f218e9498b08d4dda7c57bab6
[ "MIT" ]
null
null
null
core/core_server.py
dgpatelgit/findup
e47d57171635ab0f218e9498b08d4dda7c57bab6
[ "MIT" ]
null
null
null
core/core_server.py
dgpatelgit/findup
e47d57171635ab0f218e9498b08d4dda7c57bab6
[ "MIT" ]
null
null
null
# Required for logging across app import logging # To get information about any exception import traceback # Sleep function for main loop from time import sleep import time # Include database class from core.sqlite_db import DB # Import internal package. from core.main_menu import MainMenu # Create a new logger f...
24.916667
76
0.750279
import logging import traceback from time import sleep import time from core.sqlite_db import DB from core.main_menu import MainMenu log = logging.getLogger("CORE") log.setLevel(logging.DEBUG) fh = logging.FileHandler("monitor_server.log") fh.setLevel(logging.INFO) ch = logging.StreamHandler() ch.setLevel(logg...
true
true
08f957682c216808c7385e1362b76f4d0a7a16a3
14,157
py
Python
orix/io/plugins/orix_hdf5.py
bm424/texpy
8d78b568209a6da36fc831c6bc9e2b0cb4c740c8
[ "MIT" ]
6
2018-02-05T18:37:10.000Z
2018-10-07T22:07:26.000Z
orix/io/plugins/orix_hdf5.py
bm424/texpy
8d78b568209a6da36fc831c6bc9e2b0cb4c740c8
[ "MIT" ]
5
2018-11-04T18:06:28.000Z
2019-09-13T11:22:43.000Z
orix/io/plugins/orix_hdf5.py
bm424/texpy
8d78b568209a6da36fc831c6bc9e2b0cb4c740c8
[ "MIT" ]
3
2019-04-27T09:24:28.000Z
2019-09-13T10:24:57.000Z
# -*- coding: utf-8 -*- # Copyright 2018-2022 the orix developers # # This file is part of orix. # # orix 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 3 of the License, or # (at your option) ...
28.77439
88
0.620612
import copy from warnings import warn from diffpy.structure import Atom, Lattice, Structure from h5py import File import numpy as np from orix.crystal_map import CrystalMap, Phase, PhaseList from orix.io.plugins._h5ebsd import hdf5group2dict from orix.quaternion import Rotation __all__ = ["file_reader", "file_wri...
true
true
08f9580f32dfe283385ef5f9f76c8f7e5ba3c915
4,173
py
Python
bonds/environment.py
yintaosong/spacegroup
2cfedc2eb966b78c5e66fefa993cc7fb8478fd88
[ "MIT" ]
null
null
null
bonds/environment.py
yintaosong/spacegroup
2cfedc2eb966b78c5e66fefa993cc7fb8478fd88
[ "MIT" ]
null
null
null
bonds/environment.py
yintaosong/spacegroup
2cfedc2eb966b78c5e66fefa993cc7fb8478fd88
[ "MIT" ]
null
null
null
''' Created on Sep 11, 2014 @author: Yintao Song ''' from __future__ import print_function, division, absolute_import from .globals import * from .site import Site from itertools import groupby class Environment(object): ''' An environment of an atom site is defined by the bonds between itself and its ne...
31.37594
103
0.521447
from __future__ import print_function, division, absolute_import from .globals import * from .site import Site from itertools import groupby class Environment(object): def __init__(self, center, ngbrs, B, coord={}, ngbr_type='global'): assert isinstance(center, Site) self._center = center ...
true
true
08f958d96728940d01ac948489adc3f2710db6d4
114
py
Python
unweaver/graphs/digraphgpkg/nodes/__init__.py
jsbeckwith/unweaver
a4ba9e4e288c75e93bf7f9d67bc11680f09c3da0
[ "Apache-2.0" ]
4
2019-04-24T16:38:57.000Z
2021-12-28T20:38:08.000Z
unweaver/graphs/digraphgpkg/nodes/__init__.py
jsbeckwith/unweaver
a4ba9e4e288c75e93bf7f9d67bc11680f09c3da0
[ "Apache-2.0" ]
3
2021-06-02T04:06:33.000Z
2021-11-02T01:47:20.000Z
unweaver/graphs/digraphgpkg/nodes/__init__.py
jsbeckwith/unweaver
a4ba9e4e288c75e93bf7f9d67bc11680f09c3da0
[ "Apache-2.0" ]
1
2020-08-13T04:42:05.000Z
2020-08-13T04:42:05.000Z
from .node_view import NodeView from .node import Node from .nodes_view import NodesView from .nodes import Nodes
22.8
33
0.824561
from .node_view import NodeView from .node import Node from .nodes_view import NodesView from .nodes import Nodes
true
true
08f95b951dcedb05feb55e4e96a2a03f51ec889f
2,697
py
Python
im2scene/gan2d/config.py
yuyuyu223/giraffe
1523606355a792f662cb04242b5fe86b96f62bf9
[ "MIT" ]
1
2022-01-06T03:42:12.000Z
2022-01-06T03:42:12.000Z
im2scene/gan2d/config.py
yuyuyu223/giraffe
1523606355a792f662cb04242b5fe86b96f62bf9
[ "MIT" ]
null
null
null
im2scene/gan2d/config.py
yuyuyu223/giraffe
1523606355a792f662cb04242b5fe86b96f62bf9
[ "MIT" ]
null
null
null
import os from im2scene.discriminator import discriminator_dict from im2scene.gan2d import models, training from torch import randn from copy import deepcopy import numpy as np def get_model(cfg, device=None, len_dataset=0, **kwargs): ''' Returns the model. Args: cfg (dict): imported yaml config ...
32.493976
77
0.657026
import os from im2scene.discriminator import discriminator_dict from im2scene.gan2d import models, training from torch import randn from copy import deepcopy import numpy as np def get_model(cfg, device=None, len_dataset=0, **kwargs): discriminator = cfg['model']['discriminator'] generator = cfg['model'][...
true
true
08f95bded5f49a136da1feb4b676bf0eb0279b0b
282
py
Python
electrum_scribe/plugins/ledger/__init__.py
scribenetwork/scribe-electrum-desktop
b0507a8df1a88038e200905070524fded0a00978
[ "MIT" ]
null
null
null
electrum_scribe/plugins/ledger/__init__.py
scribenetwork/scribe-electrum-desktop
b0507a8df1a88038e200905070524fded0a00978
[ "MIT" ]
null
null
null
electrum_scribe/plugins/ledger/__init__.py
scribenetwork/scribe-electrum-desktop
b0507a8df1a88038e200905070524fded0a00978
[ "MIT" ]
null
null
null
from electrum_scribe.i18n import _ fullname = 'Ledger Wallet' description = 'Provides support for Ledger hardware wallet' requires = [('btchip', 'github.com/ledgerhq/btchip-python')] registers_keystore = ('hardware', 'ledger', _("Ledger wallet")) available_for = ['qt', 'cmdline']
35.25
63
0.741135
from electrum_scribe.i18n import _ fullname = 'Ledger Wallet' description = 'Provides support for Ledger hardware wallet' requires = [('btchip', 'github.com/ledgerhq/btchip-python')] registers_keystore = ('hardware', 'ledger', _("Ledger wallet")) available_for = ['qt', 'cmdline']
true
true
08f95d477305a5f8e70d36c42367cfea35fb065a
300
py
Python
tests/asp/cautious/test8.gus.gringo.cautious.asp.test.py
bernardocuteri/wasp
05c8f961776dbdbf7afbf905ee00fc262eba51ad
[ "Apache-2.0" ]
19
2015-12-03T08:53:45.000Z
2022-03-31T02:09:43.000Z
tests/asp/cautious/test8.gus.gringo.cautious.asp.test.py
bernardocuteri/wasp
05c8f961776dbdbf7afbf905ee00fc262eba51ad
[ "Apache-2.0" ]
80
2017-11-25T07:57:32.000Z
2018-06-10T19:03:30.000Z
tests/asp/cautious/test8.gus.gringo.cautious.asp.test.py
bernardocuteri/wasp
05c8f961776dbdbf7afbf905ee00fc262eba51ad
[ "Apache-2.0" ]
6
2015-01-15T07:51:48.000Z
2020-06-18T14:47:48.000Z
input = """ 3 7 61 146 73 112 115 127 130 0 0 1 146 2 0 155 73 1 155 2 0 146 73 1 148 2 0 150 115 1 150 2 0 148 115 1 148 2 0 152 112 1 152 2 0 148 112 1 152 2 0 158 127 1 158 2 0 152 127 1 155 2 0 157 61 1 157 2 0 155 61 1 158 2 0 160 130 1 160 2 0 158 130 0 0 B+ 0 B- 1 0 1 """ output = """ {} """
11.111111
33
0.606667
input = """ 3 7 61 146 73 112 115 127 130 0 0 1 146 2 0 155 73 1 155 2 0 146 73 1 148 2 0 150 115 1 150 2 0 148 115 1 148 2 0 152 112 1 152 2 0 148 112 1 152 2 0 158 127 1 158 2 0 152 127 1 155 2 0 157 61 1 157 2 0 155 61 1 158 2 0 160 130 1 160 2 0 158 130 0 0 B+ 0 B- 1 0 1 """ output = """ {} """
true
true
08f95d652267af9171051a6cdf2ff4479545b66f
2,232
py
Python
display/tests.py
ange123ux/personal-gallery
72e8ab1fcdaebe7df4798fa75f566e589e586eae
[ "Unlicense" ]
null
null
null
display/tests.py
ange123ux/personal-gallery
72e8ab1fcdaebe7df4798fa75f566e589e586eae
[ "Unlicense" ]
null
null
null
display/tests.py
ange123ux/personal-gallery
72e8ab1fcdaebe7df4798fa75f566e589e586eae
[ "Unlicense" ]
null
null
null
from django.test import TestCase # Create your tests here. from django.test import TestCase from .models import Location, Category, Image # Create your tests here. class LocationTestClass(TestCase): # setup method def setUp(self): self.outdoor = Location(name='outdoor') # Testing instance def...
27.219512
84
0.651882
from django.test import TestCase from django.test import TestCase from .models import Location, Category, Image class LocationTestClass(TestCase): def setUp(self): self.outdoor = Location(name='outdoor') def test_instance(self): self.assertTrue(isinstance(self.outdoor, Location)) ...
true
true
08f95e79c8896a2d037579887936b8b62abdec2a
5,035
py
Python
PythonVirtEnv/Lib/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/__init__.py
zuhorski/EPL_Project
2d2417652879cfbe33c44c003ad77b7222590849
[ "MIT" ]
5
2022-01-20T22:59:04.000Z
2022-02-06T06:11:35.000Z
PythonVirtEnv/Lib/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/__init__.py
zuhorski/EPL_Project
2d2417652879cfbe33c44c003ad77b7222590849
[ "MIT" ]
1
2021-07-02T17:20:55.000Z
2021-07-02T17:20:55.000Z
PythonVirtEnv/Lib/site-packages/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/__init__.py
zuhorski/EPL_Project
2d2417652879cfbe33c44c003ad77b7222590849
[ "MIT" ]
1
2021-05-04T09:48:17.000Z
2021-05-04T09:48:17.000Z
import sys import textwrap import types import unittest from _pydevd_frame_eval.vendored.bytecode import ( UNSET, Label, Instr, ConcreteInstr, BasicBlock, # noqa Bytecode, ControlFlowGraph, ConcreteBytecode, ) WORDCODE = sys.version_info >= (3, 6) def _format_instr_list(block, label...
32.070064
86
0.519762
import sys import textwrap import types import unittest from _pydevd_frame_eval.vendored.bytecode import ( UNSET, Label, Instr, ConcreteInstr, BasicBlock, Bytecode, ControlFlowGraph, ConcreteBytecode, ) WORDCODE = sys.version_info >= (3, 6) def _format_instr_list(block, labels, line...
true
true
08f95e80cb76b8e5c8504fd831f8514a40a93958
217
py
Python
src/poke_env/exceptions.py
NateJones14/poke-env
9acddf280b97ff562262816f5bfbbc5458e7693a
[ "MIT" ]
145
2019-11-01T22:38:02.000Z
2022-03-21T06:06:18.000Z
src/poke_env/exceptions.py
NateJones14/poke-env
9acddf280b97ff562262816f5bfbbc5458e7693a
[ "MIT" ]
229
2019-11-11T09:51:45.000Z
2022-03-29T10:16:24.000Z
src/poke_env/exceptions.py
NateJones14/poke-env
9acddf280b97ff562262816f5bfbbc5458e7693a
[ "MIT" ]
77
2019-11-11T09:17:18.000Z
2022-03-17T11:33:48.000Z
# -*- coding: utf-8 -*- """This module contains exceptions. """ class ShowdownException(Exception): """ This exception is raised when a non-managed message is received from the server. """ pass
16.692308
55
0.640553
class ShowdownException(Exception): pass
true
true
08f95ea5e528c691e940f008cbeb4cb861a5fb42
397
py
Python
Wisapp/app/migrations/0006_auto_20181101_1435.py
AliVillegas/Wisapp
e7e021461eea0e2da7e20ec2070ca24c432c8468
[ "Apache-2.0" ]
null
null
null
Wisapp/app/migrations/0006_auto_20181101_1435.py
AliVillegas/Wisapp
e7e021461eea0e2da7e20ec2070ca24c432c8468
[ "Apache-2.0" ]
null
null
null
Wisapp/app/migrations/0006_auto_20181101_1435.py
AliVillegas/Wisapp
e7e021461eea0e2da7e20ec2070ca24c432c8468
[ "Apache-2.0" ]
null
null
null
# Generated by Django 2.1.2 on 2018-11-01 20:35 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('app', '0005_auto_20181101_1434'), ] operations = [ migrations.AlterField( model_name='event', name='dateOfEvent', ...
20.894737
61
0.602015
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('app', '0005_auto_20181101_1434'), ] operations = [ migrations.AlterField( model_name='event', name='dateOfEvent', field=models.DateField(blank=True, def...
true
true
08f95f0130776e973a5858b32f00213f2e34fb67
2,179
py
Python
Filters/Modeling/Testing/Python/TestCookieCutter3.py
forestGzh/VTK
bc98327275bd5cfa95c5825f80a2755a458b6da8
[ "BSD-3-Clause" ]
1,755
2015-01-03T06:55:00.000Z
2022-03-29T05:23:26.000Z
Filters/Modeling/Testing/Python/TestCookieCutter3.py
forestGzh/VTK
bc98327275bd5cfa95c5825f80a2755a458b6da8
[ "BSD-3-Clause" ]
29
2015-04-23T20:58:30.000Z
2022-03-02T16:16:42.000Z
Filters/Modeling/Testing/Python/TestCookieCutter3.py
forestGzh/VTK
bc98327275bd5cfa95c5825f80a2755a458b6da8
[ "BSD-3-Clause" ]
1,044
2015-01-05T22:48:27.000Z
2022-03-31T02:38:26.000Z
#!/usr/bin/env python import vtk from vtk.util.misc import vtkGetDataRoot # This tests reversing loops and other weird situations # create planes # Create the RenderWindow, Renderer # ren = vtk.vtkRenderer() renWin = vtk.vtkRenderWindow() renWin.AddRenderer( ren ) iren = vtk.vtkRenderWindowInteractor() iren.SetRende...
24.483146
60
0.783846
import vtk from vtk.util.misc import vtkGetDataRoot ren = vtk.vtkRenderer() renWin = vtk.vtkRenderWindow() renWin.AddRenderer( ren ) iren = vtk.vtkRenderWindowInteractor() iren.SetRenderWindow(renWin) polysData = vtk.vtkPolyData() polysPts = vtk.vtkPoints() polysPolys = vtk.vtkCellArray() polysData.SetPoints(polysP...
true
true
08f95f53c46070cca863752eb817de72904b6730
7,092
py
Python
pymzn/__init__.py
darkfishy/pymzn
064b2a139e3534381778e5bd8fbb6a587ed03745
[ "MIT" ]
null
null
null
pymzn/__init__.py
darkfishy/pymzn
064b2a139e3534381778e5bd8fbb6a587ed03745
[ "MIT" ]
null
null
null
pymzn/__init__.py
darkfishy/pymzn
064b2a139e3534381778e5bd8fbb6a587ed03745
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """\ PyMzn is a Python library that wraps and enhances the MiniZinc tools for constraint programming. PyMzn is built on top of the minizinc toolkit and provides a number of off-the-shelf functions to readily solve problems encoded with the MiniZinc language and return solutions as Python diction...
31.105263
80
0.616892
from .log import * from .config import config from .dzn import * from .mzn import * __all__ = ['config'] + log.__all__ + dzn.__all__ + mzn.__all__ __version__ = '0.18.1' def main(): import sys import ast import argparse def _minizinc( no_declare_enums=False, solver=None, output_file=None,...
true
true
08f9617b2256f819246488e14fbeca0245d6b0c7
17,861
py
Python
manim/grpc/impl/frame_server_impl.py
wulkanat/manim
ee32571bd83a033a85111c856780566c16bca9e0
[ "MIT" ]
1
2021-01-31T01:06:31.000Z
2021-01-31T01:06:31.000Z
manim/grpc/impl/frame_server_impl.py
wulkanat/manim
ee32571bd83a033a85111c856780566c16bca9e0
[ "MIT" ]
null
null
null
manim/grpc/impl/frame_server_impl.py
wulkanat/manim
ee32571bd83a033a85111c856780566c16bca9e0
[ "MIT" ]
null
null
null
from ... import config from ..gen import frameserver_pb2 from ..gen import frameserver_pb2_grpc from ..gen import renderserver_pb2 from ..gen import renderserver_pb2_grpc from concurrent import futures from watchdog.events import FileSystemEventHandler from watchdog.observers import Observer import grpc import subproce...
42.224586
94
0.560439
from ... import config from ..gen import frameserver_pb2 from ..gen import frameserver_pb2_grpc from ..gen import renderserver_pb2 from ..gen import renderserver_pb2_grpc from concurrent import futures from watchdog.events import FileSystemEventHandler from watchdog.observers import Observer import grpc import subproce...
true
true
08f9630f16da5c110b2d4d8d8b8f69278bc606ca
3,755
py
Python
harness/determined/_swagger/client/models/v1_get_agent_response.py
wbwatkinson/determined
f9e099e06746a79a2eaf51a89acc264fc5c301e1
[ "Apache-2.0" ]
null
null
null
harness/determined/_swagger/client/models/v1_get_agent_response.py
wbwatkinson/determined
f9e099e06746a79a2eaf51a89acc264fc5c301e1
[ "Apache-2.0" ]
null
null
null
harness/determined/_swagger/client/models/v1_get_agent_response.py
wbwatkinson/determined
f9e099e06746a79a2eaf51a89acc264fc5c301e1
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Determined API (Beta) Determined helps deep learning teams train models more quickly, easily share GPU resources, and effectively collaborate. Determined allows deep learning engineers to focus on building and training models at scale, without needing to worry about DevOps or writing custo...
31.822034
647
0.596272
import pprint import re import six class V1GetAgentResponse(object): swagger_types = { 'agent': 'V1Agent' } attribute_map = { 'agent': 'agent' } def __init__(self, agent=None): self._agent = None self.discriminator = None if agent is not None: ...
true
true
08f9632467cf8a603dd345f90bb9d830e6102a9a
14,773
py
Python
akshare/wdbank/api.py
lisong996/akshare
1ee414cdecc2a492f2bb2f40d326a627c46dae2b
[ "MIT" ]
4,202
2019-10-01T08:55:03.000Z
2021-09-21T07:15:57.000Z
akshare/wdbank/api.py
lisong996/akshare
1ee414cdecc2a492f2bb2f40d326a627c46dae2b
[ "MIT" ]
290
2019-11-21T06:23:30.000Z
2021-09-21T08:29:02.000Z
akshare/wdbank/api.py
lisong996/akshare
1ee414cdecc2a492f2bb2f40d326a627c46dae2b
[ "MIT" ]
894
2019-10-09T08:14:01.000Z
2021-09-20T02:51:54.000Z
# -*- coding:utf-8 -*- #!/usr/bin/env python """ Date: 2020/3/17 22:11 Desc: world bank interface """ import collections import datetime import re import warnings import pandas as pd import tabulate from decorator import decorator from . import fetcher BASE_URL = "https://api.worldbank.org/v2" COUNTRIES_URL = f"{BAS...
31.166667
87
0.6564
import collections import datetime import re import warnings import pandas as pd import tabulate from decorator import decorator from . import fetcher BASE_URL = "https://api.worldbank.org/v2" COUNTRIES_URL = f"{BASE_URL}/countries" ILEVEL_URL = f"{BASE_URL}/incomeLevels" INDICATOR_URL = f"{BASE_URL}/indicators" LTY...
true
true
08f9636a3bdb8c4324452054d6672f9f43de2127
470
py
Python
src/hammer-vlsi/drc/nop.py
XiaoSanchez/hammer
87a2ee26b0912df39973a35632970a47a31ca22a
[ "BSD-3-Clause" ]
138
2017-08-15T18:56:55.000Z
2022-03-29T05:23:37.000Z
src/hammer-vlsi/drc/nop.py
XiaoSanchez/hammer
87a2ee26b0912df39973a35632970a47a31ca22a
[ "BSD-3-Clause" ]
444
2017-09-11T01:15:37.000Z
2022-03-31T17:30:33.000Z
src/hammer-vlsi/drc/nop.py
XiaoSanchez/hammer
87a2ee26b0912df39973a35632970a47a31ca22a
[ "BSD-3-Clause" ]
33
2017-10-30T14:23:53.000Z
2022-03-25T01:36:13.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # nop.py # No-op DRC tool. # # See LICENSE for licence details. from hammer_vlsi import HammerDRCTool, DummyHammerTool from typing import List, Dict class NopDRC(HammerDRCTool, DummyHammerTool): def globally_waived_drc_rules(self) -> List[str]: return [...
18.8
55
0.668085
from hammer_vlsi import HammerDRCTool, DummyHammerTool from typing import List, Dict class NopDRC(HammerDRCTool, DummyHammerTool): def globally_waived_drc_rules(self) -> List[str]: return [] def drc_results_pre_waived(self) -> Dict[str, int]: return {} def fill_outputs(self) -> bool: ...
true
true
08f9644553c7b5aa0ea233b23d678a39c0a21b69
880
py
Python
hsms/streamables/coin.py
richardkiss/hsms
795aafe3d0e7b6261e4f0149cb746e5f429d7037
[ "Apache-2.0" ]
2
2022-03-27T01:57:25.000Z
2022-03-27T21:06:26.000Z
hsms/streamables/coin.py
richardkiss/hsms
795aafe3d0e7b6261e4f0149cb746e5f429d7037
[ "Apache-2.0" ]
null
null
null
hsms/streamables/coin.py
richardkiss/hsms
795aafe3d0e7b6261e4f0149cb746e5f429d7037
[ "Apache-2.0" ]
1
2022-03-25T19:39:51.000Z
2022-03-25T19:39:51.000Z
import io from clvm.casts import int_from_bytes, int_to_bytes from hsms.atoms import uint64 from hsms.meta import streamable from hsms.util.std_hash import std_hash from . import bytes32 @streamable class Coin: """ This structure is used in the body for the reward and fees genesis coins. """ pare...
22.564103
77
0.672727
import io from clvm.casts import int_from_bytes, int_to_bytes from hsms.atoms import uint64 from hsms.meta import streamable from hsms.util.std_hash import std_hash from . import bytes32 @streamable class Coin: parent_coin_info: bytes32 puzzle_hash: bytes32 amount: uint64 @classmethod def fr...
true
true
08f96520c608027ed024271cfd81aa64572f871f
8,175
py
Python
src/www/beacon/handlers.py
IsmailM/myvariant.info
5af6ad68fc2c1eb539ab9e683a34bafd51ed5cb1
[ "Apache-2.0" ]
32
2015-10-23T19:47:09.000Z
2019-11-16T01:28:26.000Z
src/www/beacon/handlers.py
IsmailM/myvariant.info
5af6ad68fc2c1eb539ab9e683a34bafd51ed5cb1
[ "Apache-2.0" ]
12
2015-10-27T20:20:41.000Z
2017-04-04T21:35:46.000Z
src/www/beacon/handlers.py
Mfpfox/myvariant.info
60850eb9af19f6ba0a0979553b5506405f9fa27c
[ "Apache-2.0" ]
15
2015-10-15T20:46:50.000Z
2021-07-12T19:17:49.000Z
import sys from biothings.www.api.helper import BaseHandler from biothings.utils.common import dotdict from www.api.transform import ESResultTransformer #import logging class BeaconHandler(BaseHandler): # Initialize Assembly and Datasets assembly_keys = {'NCBI36':'hg18', 'GRCh37':'hg19', 'GRCh38':'hg38'} p...
41.923077
122
0.591437
import sys from biothings.www.api.helper import BaseHandler from biothings.utils.common import dotdict from www.api.transform import ESResultTransformer class BeaconHandler(BaseHandler): assembly_keys = {'NCBI36':'hg18', 'GRCh37':'hg19', 'GRCh38':'hg38'} pos_dbs = ['exac', 'cadd'] assembly_dbs = ['dbns...
true
true
08f96618a59484ce319941f61e217fcfcab82f55
202
py
Python
typeidea/typeidea/custom_site.py
hhdMrLion/typeidea
cc0fd611030bbe9751d108403d00c85d3041fe25
[ "MIT" ]
2
2020-07-30T08:27:25.000Z
2021-06-18T03:07:52.000Z
typeidea-env/typeidea/typeidea/custom_site.py
freewalker1985/typeidea
80771075837a68921f3e55ccee1dce60abed375c
[ "MIT" ]
null
null
null
typeidea-env/typeidea/typeidea/custom_site.py
freewalker1985/typeidea
80771075837a68921f3e55ccee1dce60abed375c
[ "MIT" ]
null
null
null
from django.contrib.admin import AdminSite class CustomSite(AdminSite): site_header = 'Typeidea' site_title = 'Typeidea管理后台' index_title = '首页' custom_site = CustomSite(name='cus_admin')
20.2
42
0.737624
from django.contrib.admin import AdminSite class CustomSite(AdminSite): site_header = 'Typeidea' site_title = 'Typeidea管理后台' index_title = '首页' custom_site = CustomSite(name='cus_admin')
true
true
08f96692e2df4f3fcabacd4d83772c17a0b52587
1,811
py
Python
src/oloid/circle.py
schrma/oloid
49fc62cd83e9839620292139cc55e5ec848b386c
[ "MIT" ]
null
null
null
src/oloid/circle.py
schrma/oloid
49fc62cd83e9839620292139cc55e5ec848b386c
[ "MIT" ]
null
null
null
src/oloid/circle.py
schrma/oloid
49fc62cd83e9839620292139cc55e5ec848b386c
[ "MIT" ]
null
null
null
import numpy as np from matplotlib.lines import Line2D from mpl_toolkits.mplot3d import proj3d from mpl_toolkits.mplot3d.art3d import Line3D import geometric_functions class circle(Line3D): def __init__(self,center_point, normal_vector, radius=1,nr_of_points=100): self.center_point = np.array(center_point...
36.22
130
0.655991
import numpy as np from matplotlib.lines import Line2D from mpl_toolkits.mplot3d import proj3d from mpl_toolkits.mplot3d.art3d import Line3D import geometric_functions class circle(Line3D): def __init__(self,center_point, normal_vector, radius=1,nr_of_points=100): self.center_point = np.array(center_point...
true
true
08f9679a71584b60bfeb1c6ab57767acd7b457e9
42
py
Python
app/exceptions.py
Bloomca/github-users-explorer
f2cd60e508bfaf584aea456bea9a5eb5e0299c3e
[ "MIT" ]
null
null
null
app/exceptions.py
Bloomca/github-users-explorer
f2cd60e508bfaf584aea456bea9a5eb5e0299c3e
[ "MIT" ]
null
null
null
app/exceptions.py
Bloomca/github-users-explorer
f2cd60e508bfaf584aea456bea9a5eb5e0299c3e
[ "MIT" ]
null
null
null
class NotFoundException(Exception): pass
21
35
0.833333
class NotFoundException(Exception): pass
true
true
08f968004e136a7c3ae9d13d34c379d7fd8b39fd
11,378
py
Python
Core/hippoSeg/startTesting.py
YongLiuLab/BrainRadiomicsTools
19b440acd554ee920857c306442b6d2c411dca88
[ "Apache-2.0", "BSD-3-Clause" ]
10
2019-09-26T03:12:52.000Z
2022-02-25T06:05:38.000Z
Core/hippoSeg/startTesting.py
YongLiuLab/BrainRadiomicsTools
19b440acd554ee920857c306442b6d2c411dca88
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
Core/hippoSeg/startTesting.py
YongLiuLab/BrainRadiomicsTools
19b440acd554ee920857c306442b6d2c411dca88
[ "Apache-2.0", "BSD-3-Clause" ]
8
2020-02-26T01:54:48.000Z
2022-03-19T01:23:55.000Z
# coding=UTF-8 """ Copyright (c) 2016, Jose Dolz .All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of condit...
38.181208
123
0.581473
import numpy as np import os from .LiviaNet.Modules.General.Utils import getImagesSet from .LiviaNet.Modules.General.Utils import load_model_from_gzip_file from .imgOp import applyUnpadding from .loadData import load_imagesSinglePatient from .savedata import saveImageAsNifti from .savedata import saveImageAsMatlab fr...
true
true
08f9686b631338dc09d7bf5164aa0695981c2f1d
276
py
Python
dataent/core/doctype/error_log/test_error_log.py
dataent/dataent
c41bd5942ffe5513f4d921c4c0595c84bbc422b4
[ "MIT" ]
null
null
null
dataent/core/doctype/error_log/test_error_log.py
dataent/dataent
c41bd5942ffe5513f4d921c4c0595c84bbc422b4
[ "MIT" ]
6
2020-03-24T17:15:56.000Z
2022-02-10T18:41:31.000Z
dataent/core/doctype/error_log/test_error_log.py
dataent/dataent
c41bd5942ffe5513f4d921c4c0595c84bbc422b4
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2015, Dataent Technologies and Contributors # See license.txt from __future__ import unicode_literals import dataent import unittest # test_records = dataent.get_test_records('Error Log') class TestErrorLog(unittest.TestCase): pass
21.230769
59
0.775362
from __future__ import unicode_literals import dataent import unittest class TestErrorLog(unittest.TestCase): pass
true
true
08f9699e850a6519dbb5de3bbf0d8b8de01c61b2
30,704
py
Python
tensorflow/contrib/optimizer_v2/checkpointable_utils_test.py
zhangyujing/tensorflow
c7a04561fb8972fb64907acc5f10f3c6d4cef9f2
[ "Apache-2.0" ]
3
2020-04-22T22:03:31.000Z
2020-07-18T12:16:52.000Z
tensorflow/contrib/optimizer_v2/checkpointable_utils_test.py
zhangyujing/tensorflow
c7a04561fb8972fb64907acc5f10f3c6d4cef9f2
[ "Apache-2.0" ]
6
2020-04-21T20:38:18.000Z
2020-06-16T01:00:15.000Z
tensorflow/contrib/optimizer_v2/checkpointable_utils_test.py
zhangyujing/tensorflow
c7a04561fb8972fb64907acc5f10f3c6d4cef9f2
[ "Apache-2.0" ]
1
2021-08-04T07:33:27.000Z
2021-08-04T07:33:27.000Z
# Copyright 2017 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...
44.692868
82
0.705446
from __future__ import absolute_import from __future__ import division from __future__ import print_function import functools import os import six from tensorflow.contrib.eager.python import checkpointable_utils from tensorflow.contrib.optimizer_v2 import adam from tensorflow.python.client import session as session...
true
true
08f969b6d25054a210a73959a94bd0c131c974c2
5,581
py
Python
python/GafferImageTest/ImageAlgoTest.py
mattigruener/gaffer
8216ba1a884712575a0acae747c51b02f7a99a5d
[ "BSD-3-Clause" ]
1
2019-08-02T16:49:59.000Z
2019-08-02T16:49:59.000Z
python/GafferImageTest/ImageAlgoTest.py
rkoschmitzky/gaffer
ec6262ae1292767bdeb9520d1447d65a4a511884
[ "BSD-3-Clause" ]
2
2017-08-23T21:35:45.000Z
2018-01-29T08:59:33.000Z
python/GafferImageTest/ImageAlgoTest.py
rkoschmitzky/gaffer
ec6262ae1292767bdeb9520d1447d65a4a511884
[ "BSD-3-Clause" ]
null
null
null
########################################################################## # # Copyright (c) 2015, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistrib...
31.891429
158
0.629815
# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, import unittest import imath import IECore import GafferTest import GafferImage import GafferImageTest class ImageAlgoTest( GafferImageTest.ImageTestCase ) : def testLayerName( self ) : for channelName, layerName in [ ( "R", "" ), ...
true
true
08f969d4fe9d5baf96f5ebadc4986e4fc2189a09
1,057
py
Python
src/0449_serialize_deserialize_bst.py
soamsy/leetcode
091f3b33e44613fac130ff1018c8b63493798f09
[ "MIT" ]
null
null
null
src/0449_serialize_deserialize_bst.py
soamsy/leetcode
091f3b33e44613fac130ff1018c8b63493798f09
[ "MIT" ]
null
null
null
src/0449_serialize_deserialize_bst.py
soamsy/leetcode
091f3b33e44613fac130ff1018c8b63493798f09
[ "MIT" ]
null
null
null
import json from typing import Optional class TreeNode: def __init__(self, x): self.val = x self.left = None self.right = None def serialize(root: Optional[TreeNode]) -> str: """Encodes a tree to a single string. """ def fn(node): if not node: return None ...
22.020833
49
0.516556
import json from typing import Optional class TreeNode: def __init__(self, x): self.val = x self.left = None self.right = None def serialize(root: Optional[TreeNode]) -> str: def fn(node): if not node: return None parent = {} children = [] ...
true
true
08f969f4a2e372238a3d7db79860cf690cc1bff3
4,788
py
Python
qa/rpc-tests/test_framework.py
travelpaycoin/trpc
50d3fae7177fa6ebdf8dae0e7126ee02d3843015
[ "MIT" ]
1
2018-12-27T15:50:32.000Z
2018-12-27T15:50:32.000Z
qa/rpc-tests/test_framework.py
travelpaycoin/travelpay
a317d1da7dfb7a72f7ccbd0d022645072e45ad24
[ "MIT" ]
null
null
null
qa/rpc-tests/test_framework.py
travelpaycoin/travelpay
a317d1da7dfb7a72f7ccbd0d022645072e45ad24
[ "MIT" ]
null
null
null
#!/usr/bin/env python2 # Copyright (c) 2014-2018 The Bitcoin Core developers # Copyright (c) 2015-2018 The PIVX developers # Copyright (c) 2018 The Trpc developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # Base class for R...
33.02069
103
0.615706
import os import sys sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), "python-bitcoinrpc")) import shutil import tempfile import traceback from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException from util import * class BitcoinTestFramework(object): def run_test(self):...
true
true
08f96a594d8e482f5192d187dc900c891d657914
7,239
py
Python
tools/test_net.py
Morgan-Gan/Slowfast-fb
f7387d5f30d609f6d0e022a81c51729b647dae97
[ "Apache-2.0" ]
null
null
null
tools/test_net.py
Morgan-Gan/Slowfast-fb
f7387d5f30d609f6d0e022a81c51729b647dae97
[ "Apache-2.0" ]
null
null
null
tools/test_net.py
Morgan-Gan/Slowfast-fb
f7387d5f30d609f6d0e022a81c51729b647dae97
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. """Multi-view test a video classification model.""" import numpy as np import os import pickle import torch from iopath.common.file_io import g_pathmgr import slowfast.utils.checkpoint as cu import slowfast.utils.distribut...
35.660099
84
0.6226
import numpy as np import os import pickle import torch from iopath.common.file_io import g_pathmgr import slowfast.utils.checkpoint as cu import slowfast.utils.distributed as du import slowfast.utils.loggings as logging import slowfast.utils.misc as misc import slowfast.visualization.tensorboard_vis as tb from slow...
true
true
08f96ab9a876bb62e6e5bb414ee4279819e9561f
2,425
py
Python
h/migrations/versions/a44ef07b085a_fill_in_missing_denormalized_document_web_uri.py
ssin122/test-h
c10062ae23b690afaac0ab4af7b9a5a5e4b686a9
[ "MIT" ]
2
2021-11-07T23:14:54.000Z
2021-11-17T10:11:55.000Z
h/migrations/versions/a44ef07b085a_fill_in_missing_denormalized_document_web_uri.py
ssin122/test-h
c10062ae23b690afaac0ab4af7b9a5a5e4b686a9
[ "MIT" ]
null
null
null
h/migrations/versions/a44ef07b085a_fill_in_missing_denormalized_document_web_uri.py
ssin122/test-h
c10062ae23b690afaac0ab4af7b9a5a5e4b686a9
[ "MIT" ]
1
2017-03-12T00:18:33.000Z
2017-03-12T00:18:33.000Z
""" Fill in missing denormalized Document.web_uri Revision ID: a44ef07b085a Revises: 58bb601c390f Create Date: 2016-09-12 15:31:00.597582 """ from __future__ import unicode_literals from collections import namedtuple from alembic import op import sqlalchemy as sa from sqlalchemy.ext.declarative import declarative_b...
26.075269
77
0.653608
from __future__ import unicode_literals from collections import namedtuple from alembic import op import sqlalchemy as sa from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker from sqlalchemy.orm import subqueryload from memex._compat import urlparse revision = 'a44ef07b0...
true
true
08f96ae9608865d41270a1b477dec3574d431bbe
1,614
py
Python
pypy/interpreter/test/test_buffer.py
kantai/passe-pypy-taint-tracking
b60a3663f8fe89892dc182c8497aab97e2e75d69
[ "MIT" ]
2
2016-07-06T23:30:20.000Z
2017-05-30T15:59:31.000Z
pypy/interpreter/test/test_buffer.py
kantai/passe-pypy-taint-tracking
b60a3663f8fe89892dc182c8497aab97e2e75d69
[ "MIT" ]
null
null
null
pypy/interpreter/test/test_buffer.py
kantai/passe-pypy-taint-tracking
b60a3663f8fe89892dc182c8497aab97e2e75d69
[ "MIT" ]
2
2020-07-09T08:14:22.000Z
2021-01-15T18:01:25.000Z
import py from pypy.interpreter.buffer import Buffer from rpython.tool.udir import udir testdir = udir.ensure('test_buffer', dir=1) class TestBuffer: def test_buffer_w(self): space = self.space w_hello = space.wrap('hello world') buf = space.buffer_w(w_hello) assert isinstance(bu...
33.625
78
0.611524
import py from pypy.interpreter.buffer import Buffer from rpython.tool.udir import udir testdir = udir.ensure('test_buffer', dir=1) class TestBuffer: def test_buffer_w(self): space = self.space w_hello = space.wrap('hello world') buf = space.buffer_w(w_hello) assert isinstance(bu...
true
true
08f96aec0d1a125191188416853e5f146a979da4
1,458
py
Python
instagram/images/migrations/0006_auto_20181207_1517.py
Yesdoing/yestagram
a8f69b0fa2cb460d578717ac132900c1a1077d57
[ "MIT" ]
5
2019-05-08T07:34:42.000Z
2020-08-16T16:54:53.000Z
instagram/images/migrations/0006_auto_20181207_1517.py
Yesdoing/Instagram
a8f69b0fa2cb460d578717ac132900c1a1077d57
[ "MIT" ]
11
2019-12-29T10:18:20.000Z
2022-02-26T14:28:23.000Z
instagram/images/migrations/0006_auto_20181207_1517.py
Yesdoing/Instagram
a8f69b0fa2cb460d578717ac132900c1a1077d57
[ "MIT" ]
2
2019-01-30T11:45:31.000Z
2020-08-16T16:54:55.000Z
# Generated by Django 2.0.9 on 2018-12-07 06:17 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('images', '0005_image_tags'), ] operations = [ migrations.AlterField( ...
35.560976
144
0.630316
from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('images', '0005_image_tags'), ] operations = [ migrations.AlterField( model_name='comment', name='c...
true
true
08f96c3776bb98a39190e168c35e5b1b21731138
6,551
py
Python
ghostwriter/rolodex/filters.py
er4z0r/Ghostwriter
879f1ab5ff908ac0ecd3b9aa54d9d34c92b0fc7f
[ "BSD-3-Clause" ]
601
2019-07-30T17:06:37.000Z
2022-03-31T00:55:31.000Z
ghostwriter/rolodex/filters.py
chrismaddalena/Ghostwriter
5a938358450cd0e69a42883b1b18e067644744a8
[ "BSD-3-Clause" ]
150
2019-08-01T07:20:22.000Z
2022-03-29T19:18:02.000Z
ghostwriter/rolodex/filters.py
chrismaddalena/Ghostwriter
5a938358450cd0e69a42883b1b18e067644744a8
[ "BSD-3-Clause" ]
126
2019-07-30T17:42:49.000Z
2022-03-21T20:43:35.000Z
"""This contains all of the model filters used by the Rolodex application.""" # Django Imports from django import forms from django.forms.widgets import TextInput # 3rd Party Libraries import django_filters from crispy_forms.bootstrap import PrependedText from crispy_forms.helper import FormHelper from crispy_forms.l...
33.423469
134
0.488322
from django import forms from django.forms.widgets import TextInput import django_filters from crispy_forms.bootstrap import PrependedText from crispy_forms.helper import FormHelper from crispy_forms.layout import HTML, ButtonHolder, Column, Div, Layout, Row, Submit from .models import Client, Project class Client...
true
true
08f96cb472218e3e44845660ea5e03fce620efc8
473
py
Python
surfactant_example/viscosity/viscosity_factory.py
force-h2020/force-bdss-plugin-surfactant-example
ba442f2b39919f7d071f4384f8eaba0d99f44b1f
[ "BSD-2-Clause", "MIT" ]
null
null
null
surfactant_example/viscosity/viscosity_factory.py
force-h2020/force-bdss-plugin-surfactant-example
ba442f2b39919f7d071f4384f8eaba0d99f44b1f
[ "BSD-2-Clause", "MIT" ]
null
null
null
surfactant_example/viscosity/viscosity_factory.py
force-h2020/force-bdss-plugin-surfactant-example
ba442f2b39919f7d071f4384f8eaba0d99f44b1f
[ "BSD-2-Clause", "MIT" ]
null
null
null
from force_bdss.api import BaseDataSourceFactory from .viscosity_model import ViscosityDataSourceModel from .viscosity_data_source import ViscosityDataSource class ViscosityFactory(BaseDataSourceFactory): def get_identifier(self): return "viscosity" def get_name(self): return "Viscosity Calc...
24.894737
54
0.773784
from force_bdss.api import BaseDataSourceFactory from .viscosity_model import ViscosityDataSourceModel from .viscosity_data_source import ViscosityDataSource class ViscosityFactory(BaseDataSourceFactory): def get_identifier(self): return "viscosity" def get_name(self): return "Viscosity Calc...
true
true
08f96de613917146c58af5b3456a32b2dc92ba02
37,183
py
Python
sculptor/specfitgui.py
jtschindler/sculptor
67b7ebfb05ee8ec9d00399c6d80c238d2104eebc
[ "BSD-3-Clause" ]
7
2021-01-25T16:45:57.000Z
2022-03-31T11:53:23.000Z
sculptor/specfitgui.py
jtschindler/sculptor
67b7ebfb05ee8ec9d00399c6d80c238d2104eebc
[ "BSD-3-Clause" ]
1
2022-03-31T15:41:33.000Z
2022-03-31T15:41:33.000Z
sculptor/specfitgui.py
jtschindler/sculptor
67b7ebfb05ee8ec9d00399c6d80c238d2104eebc
[ "BSD-3-Clause" ]
null
null
null
import numpy as np from PyQt5 import QtWidgets, QtCore from PyQt5.QtWidgets import QMainWindow, QWidget, QPushButton, QAction, \ QLabel, QTabWidget, QVBoxLayout, QHBoxLayout, QFileDialog, QLineEdit, \ QComboBox, QCheckBox, QGroupBox, QScrollArea from matplotlib.backends.backend_qt5agg import NavigationToolb...
36.597441
101
0.601108
import numpy as np from PyQt5 import QtWidgets, QtCore from PyQt5.QtWidgets import QMainWindow, QWidget, QPushButton, QAction, \ QLabel, QTabWidget, QVBoxLayout, QHBoxLayout, QFileDialog, QLineEdit, \ QComboBox, QCheckBox, QGroupBox, QScrollArea from matplotlib.backends.backend_qt5agg import NavigationToolb...
true
true
08f96e9567e8e04c3db03178e6ab3be19f2e7842
5,084
py
Python
libfennel/defs.py
hyraxZK/fennel
0aeae644455057547a48422fd9a19d4564d1348f
[ "Apache-2.0" ]
3
2018-04-04T16:26:55.000Z
2021-02-27T03:08:08.000Z
libfennel/defs.py
hyraxZK/fennel
0aeae644455057547a48422fd9a19d4564d1348f
[ "Apache-2.0" ]
1
2019-08-02T09:47:43.000Z
2019-08-02T09:47:43.000Z
libfennel/defs.py
hyraxZK/fennel
0aeae644455057547a48422fd9a19d4564d1348f
[ "Apache-2.0" ]
3
2018-10-30T09:40:10.000Z
2020-01-16T07:48:48.000Z
#!/usr/bin/python # # (C) 2017 Riad S. Wahby <rsw@cs.stanford.edu> # # Defs for circuits import random class Defs(object): # default is a convenient Mersenne prime prime = 2 ** 61 - 1 half = 2 ** 60 third = 1537228672809129301 nbits = 61 rand = None curve = 'm191' savebits = False ...
29.730994
140
0.482101
import random class Defs(object): prime = 2 ** 61 - 1 half = 2 ** 60 third = 1537228672809129301 nbits = 61 rand = None curve = 'm191' savebits = False _fArith = None track_fArith = False @classmethod def fArith(cls): if Defs.track_fArith: if cls....
true
true
08f96f1471fc15c6abae3dad0e299581c83eb92d
8,165
py
Python
testApp/app/routes.py
BrianDehlinger/DCB-Dynamic-Codon-Bias
b430d8e839b46e2fc71aac44883bf4118a667269
[ "BSD-3-Clause" ]
1
2022-01-04T13:23:49.000Z
2022-01-04T13:23:49.000Z
testApp/app/routes.py
BrianDehlinger/DCB-Dynamic-Codon-Bias
b430d8e839b46e2fc71aac44883bf4118a667269
[ "BSD-3-Clause" ]
null
null
null
testApp/app/routes.py
BrianDehlinger/DCB-Dynamic-Codon-Bias
b430d8e839b46e2fc71aac44883bf4118a667269
[ "BSD-3-Clause" ]
null
null
null
from app import app from flask import redirect, url_for, request, render_template, flash, request, make_response, request, send_file import os from Bio import Entrez from Pipeline import Facade from werkzeug.utils import secure_filename from zipfile import ZipFile import io import tempfile import requests import log...
43.663102
300
0.731782
from app import app from flask import redirect, url_for, request, render_template, flash, request, make_response, request, send_file import os from Bio import Entrez from Pipeline import Facade from werkzeug.utils import secure_filename from zipfile import ZipFile import io import tempfile import requests import log...
true
true
08f96f7b5acd4a4aa0b7cdc3e642df4a561b0bf9
9,629
py
Python
owncloud_backup.py
NLCR/owncloud_backup
fb50e0ee4c7cb29fe601c8cc56d6c826f8dda272
[ "MIT" ]
null
null
null
owncloud_backup.py
NLCR/owncloud_backup
fb50e0ee4c7cb29fe601c8cc56d6c826f8dda272
[ "MIT" ]
null
null
null
owncloud_backup.py
NLCR/owncloud_backup
fb50e0ee4c7cb29fe601c8cc56d6c826f8dda272
[ "MIT" ]
null
null
null
#! /usr/bin/env python # -*- coding: utf-8 -*- # # Interpreter version: python 2.7 # # Imports ===================================================================== import os import sys import time import argparse import datetime import ConfigParser from collections import namedtuple import owncloud # to disable SSL ...
27.82948
79
0.59165
import os import sys import time import argparse import datetime import ConfigParser from collections import namedtuple import owncloud import requests if hasattr(requests, "packages"): requests.packages.urllib3.disable_warnings() FileObj = namedtuple("FileObj", "timestamp filename") def collect_files(path, l...
true
true
08f96f9d7df08ef80470b22b4443f056941aa263
71,901
py
Python
myvenv/Lib/site-packages/weasyprint/css/validation.py
Fa67/saleor-shop
76110349162c54c8bfcae61983bb59ba8fb0f778
[ "BSD-3-Clause" ]
null
null
null
myvenv/Lib/site-packages/weasyprint/css/validation.py
Fa67/saleor-shop
76110349162c54c8bfcae61983bb59ba8fb0f778
[ "BSD-3-Clause" ]
9
2020-06-05T20:31:50.000Z
2022-03-11T23:45:47.000Z
upibo-venv/Lib/site-packages/weasyprint/css/validation.py
smbpgroup/upibo
625dcda9f9692c62aeb9fe8f7123a5d407c610ae
[ "BSD-3-Clause" ]
null
null
null
# coding: utf-8 """ weasyprint.css.validation ------------------------- Expand shorthands and validate property values. See http://www.w3.org/TR/CSS21/propidx.html and various CSS3 modules. :copyright: Copyright 2011-2014 Simon Sapin and contributors, see AUTHORS. :license: BSD, see LICENSE fo...
31.702381
79
0.598796
from __future__ import division, unicode_literals import functools import math import tinycss2 from tinycss2.color3 import parse_color from . import computed_values from ..compat import unquote, urljoin from ..formatting_structure import counters from ..images import LinearGradient, RadialGradient from ..logger imp...
true
true
08f96fb8304c73342d67ec826e7dd236ca32522c
10,064
py
Python
tests/misc_env/install_prereq.py
ckulal/cephci
c494bfebeccf7965b2ffa97b66127f924cba16a7
[ "MIT" ]
null
null
null
tests/misc_env/install_prereq.py
ckulal/cephci
c494bfebeccf7965b2ffa97b66127f924cba16a7
[ "MIT" ]
null
null
null
tests/misc_env/install_prereq.py
ckulal/cephci
c494bfebeccf7965b2ffa97b66127f924cba16a7
[ "MIT" ]
null
null
null
import datetime import itertools import logging import time import traceback from ceph.parallel import parallel from ceph.utils import config_ntp, update_ca_cert from utility.utils import get_cephci_config log = logging.getLogger(__name__) rpm_packages = { "py2": [ "wget", "git", "python-...
32.675325
115
0.588235
import datetime import itertools import logging import time import traceback from ceph.parallel import parallel from ceph.utils import config_ntp, update_ca_cert from utility.utils import get_cephci_config log = logging.getLogger(__name__) rpm_packages = { "py2": [ "wget", "git", "python-...
true
true