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
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
1c2a83e87784b1f9fad1d296c658f0ae943b6e1f
2,547
py
Python
weld-python/weld/grizzly/core/forwarding.py
tustvold/weld
dcbba9a45ae2a190b31badec530ea54a58437606
[ "BSD-3-Clause" ]
2,912
2017-03-16T19:32:54.000Z
2022-03-30T09:03:11.000Z
weld-python/weld/grizzly/core/forwarding.py
QiangHeisenberg/weld
0926f84f6f4361e40842fcd6e00b7afdcc10a87f
[ "BSD-3-Clause" ]
285
2017-03-16T18:01:00.000Z
2021-08-12T10:58:23.000Z
weld-python/weld/grizzly/core/forwarding.py
QiangHeisenberg/weld
0926f84f6f4361e40842fcd6e00b7afdcc10a87f
[ "BSD-3-Clause" ]
272
2017-03-17T06:28:58.000Z
2022-02-24T04:22:02.000Z
""" Implements method forwarding from one class to another. The `Forwarding` class can be used as a mixin. """ import inspect import warnings class Forwarding(object): @classmethod def _get_class_that_defined_method(cls, meth): """ Returns the class that defines the requested method. ...
35.375
126
0.588143
import inspect import warnings class Forwarding(object): @classmethod def _get_class_that_defined_method(cls, meth): if inspect.ismethod(meth): for cls in inspect.getmro(meth.__self__.__class__): if cls.__dict__.get(meth.__name__) is meth: return cls ...
true
true
1c2a842015bd70bfd957c88365b8869b70467fd5
826
py
Python
errors.py
fabiobaccarin/pyoneer
50162898c7a96dbf8bad0d97134b7d1c2a6770ff
[ "MIT" ]
1
2020-08-20T18:29:55.000Z
2020-08-20T18:29:55.000Z
errors.py
fabiobaccarin/pyoneer
50162898c7a96dbf8bad0d97134b7d1c2a6770ff
[ "MIT" ]
null
null
null
errors.py
fabiobaccarin/pyoneer
50162898c7a96dbf8bad0d97134b7d1c2a6770ff
[ "MIT" ]
null
null
null
''' Errors ''' class BaseError(Exception): pass class NotCallableError(BaseError): message = "Object '{}' is not callable (e.g. a function)" class NotDataFrameError(BaseError): message = "Object '{}' is not a pandas.DataFrame" class NotSeriesError(BaseError): message = "Object '{}' is not a panda...
21.179487
90
0.681598
class BaseError(Exception): pass class NotCallableError(BaseError): message = "Object '{}' is not callable (e.g. a function)" class NotDataFrameError(BaseError): message = "Object '{}' is not a pandas.DataFrame" class NotSeriesError(BaseError): message = "Object '{}' is not a pandas.Series" cla...
true
true
1c2a84c22574253fa064dfd0de994a933293cc1a
9,701
py
Python
Utility/file_lists.py
fairwell-coding/speech_synthesis
f2fd089d5bef87d2229df63da8614878e6ba1430
[ "Apache-2.0" ]
null
null
null
Utility/file_lists.py
fairwell-coding/speech_synthesis
f2fd089d5bef87d2229df63da8614878e6ba1430
[ "Apache-2.0" ]
null
null
null
Utility/file_lists.py
fairwell-coding/speech_synthesis
f2fd089d5bef87d2229df63da8614878e6ba1430
[ "Apache-2.0" ]
null
null
null
import os def get_file_list_aridialect(): path_train = "/IMS-Toucan/aridialect" file_list = list() with open(os.path.join(path_train, "train-text.txt")) as file: #with open(os.path.join(path_train, "train-text.txt")) as file: filenames = file.readlines() file_list = [os.path.join(path...
45.12093
125
0.641686
import os def get_file_list_aridialect(): path_train = "/IMS-Toucan/aridialect" file_list = list() with open(os.path.join(path_train, "train-text.txt")) as file: filenames = file.readlines() file_list = [os.path.join(path_train,"aridialect_wav16000",line.rstrip().split("|")[0]+".wav"...
true
true
1c2a8678c67ebd5969855bb504302e0cee6dfba1
1,759
py
Python
company/migrations/0089_auto_20190829_0845.py
uktrade/directory-api
45a9024a7ecc2842895201cbb51420ba9e57a168
[ "MIT" ]
2
2017-06-02T09:09:08.000Z
2021-01-18T10:26:53.000Z
company/migrations/0089_auto_20190829_0845.py
konradko/directory-api
e9cd05b1deaf575e94352c46ddbd1857d8119fda
[ "MIT" ]
629
2016-10-10T09:35:52.000Z
2022-03-25T15:04:04.000Z
company/migrations/0089_auto_20190829_0845.py
konradko/directory-api
e9cd05b1deaf575e94352c46ddbd1857d8119fda
[ "MIT" ]
5
2017-06-22T10:02:22.000Z
2022-03-14T17:55:21.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.11.23 on 2019-08-29 08:45 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import django_extensions.db.fields import uuid class Migration(migrations.Migration): dependencies = [ ('supplier', ...
45.102564
135
0.641842
from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import django_extensions.db.fields import uuid class Migration(migrations.Migration): dependencies = [ ('supplier', '0006_remove_supplier_is_company_owner'), ('company', '0088_auto...
true
true
1c2a8680f7ef9eb3facb797a411f737304aa2300
9,331
py
Python
gedcom_remastered_parser/structure.py
shaun-wilson/gedcom-remastered-parser-python
f0c86e6cd1c56602971a05d75331363f0bdc9cc5
[ "MIT" ]
1
2019-03-05T20:26:54.000Z
2019-03-05T20:26:54.000Z
gedcom_remastered_parser/structure.py
shaun-wilson/gedcom-remastered-parser-python
f0c86e6cd1c56602971a05d75331363f0bdc9cc5
[ "MIT" ]
null
null
null
gedcom_remastered_parser/structure.py
shaun-wilson/gedcom-remastered-parser-python
f0c86e6cd1c56602971a05d75331363f0bdc9cc5
[ "MIT" ]
2
2019-03-05T20:26:59.000Z
2020-01-03T11:41:44.000Z
from collections import OrderedDict from typing import List, Union from .schema_element import SchemaElement class Structure(SchemaElement): def __init__(self, label:str, **kwargs): super().__init__(**kwargs) self.label = label self.description = "" self.definitions:List[List[Row]...
33.325
140
0.58954
from collections import OrderedDict from typing import List, Union from .schema_element import SchemaElement class Structure(SchemaElement): def __init__(self, label:str, **kwargs): super().__init__(**kwargs) self.label = label self.description = "" self.definitions:List[List[Row]...
true
true
1c2a86a0d44e31846b4c7752d5dce3a81393a5c1
7,073
py
Python
lnbits/wallets/lndrest.py
dme1sc/lnbits-legend
c626e12fa310e9b5eb5fcee2e49d2477055c8471
[ "MIT" ]
null
null
null
lnbits/wallets/lndrest.py
dme1sc/lnbits-legend
c626e12fa310e9b5eb5fcee2e49d2477055c8471
[ "MIT" ]
null
null
null
lnbits/wallets/lndrest.py
dme1sc/lnbits-legend
c626e12fa310e9b5eb5fcee2e49d2477055c8471
[ "MIT" ]
null
null
null
import asyncio from pydoc import describe import httpx import json import base64 from os import getenv from typing import Optional, Dict, AsyncGenerator from lnbits import bolt11 as lnbits_bolt11 from .macaroon import load_macaroon, AESCipher from .base import ( StatusResponse, InvoiceResponse, PaymentRes...
35.903553
99
0.574014
import asyncio from pydoc import describe import httpx import json import base64 from os import getenv from typing import Optional, Dict, AsyncGenerator from lnbits import bolt11 as lnbits_bolt11 from .macaroon import load_macaroon, AESCipher from .base import ( StatusResponse, InvoiceResponse, PaymentRes...
true
true
1c2a86bfb7d50db607124b73156e01d0d5720922
651
py
Python
sample_db_utils/__init__.py
fabianazioti/sample-db-utils
2ff1a9c8c94764339cdf842b7e34bdbed7f6f181
[ "MIT" ]
null
null
null
sample_db_utils/__init__.py
fabianazioti/sample-db-utils
2ff1a9c8c94764339cdf842b7e34bdbed7f6f181
[ "MIT" ]
22
2020-10-14T13:57:47.000Z
2021-11-29T11:58:24.000Z
sample_db_utils/__init__.py
fabianazioti/sample-db-utils
2ff1a9c8c94764339cdf842b7e34bdbed7f6f181
[ "MIT" ]
1
2020-03-18T10:57:45.000Z
2020-03-18T10:57:45.000Z
# # This file is part of Sample Database Utils. # Copyright (C) 2020-2021 INPE. # # Sample Database Model is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. # """Python Sample Database Utils.""" from .core.driver import CSV, Shapefile fr...
31
82
0.745008
from .core.driver import CSV, Shapefile from .drivers.bdc import BDC from .drivers.factory_driver import DriversFactory from .drivers.hugo import Hugo from .drivers.hugo_tese import HugoTese from .drivers.inSitu import InSitu from .version import __version__ __all__ = ('__version__', 'InSitu', 'DriversFactory...
true
true
1c2a86cd6dffea2d1925ece7a3ada677bca647d7
420
py
Python
src/CodeGenerationCore/CodeGenerationResolver.py
BlackBeard98/Code-Generation
769ef8fd9162c0fae6326dc9d08e20bb5d20c067
[ "MIT" ]
1
2021-11-03T01:24:21.000Z
2021-11-03T01:24:21.000Z
src/CodeGenerationCore/CodeGenerationResolver.py
BlackBeard98/Code-Generation
769ef8fd9162c0fae6326dc9d08e20bb5d20c067
[ "MIT" ]
null
null
null
src/CodeGenerationCore/CodeGenerationResolver.py
BlackBeard98/Code-Generation
769ef8fd9162c0fae6326dc9d08e20bb5d20c067
[ "MIT" ]
null
null
null
from abc import ABCMeta, abstractclassmethod, abstractmethod #from .CommandHandler import CommandHandler class CodeGenResolver(metaclass =ABCMeta): @abstractmethod def Build(): pass @abstractmethod def RegisterEngine(engine): pass @abstractmethod def ResolveCommand(): pas...
28
65
0.711905
from abc import ABCMeta, abstractclassmethod, abstractmethod class CodeGenResolver(metaclass =ABCMeta): @abstractmethod def Build(): pass @abstractmethod def RegisterEngine(engine): pass @abstractmethod def ResolveCommand(): pass @abstractmethod def ResolveComman...
true
true
1c2a8791adcc9bed424b1379957c4b18cfba6241
10,734
py
Python
zstacktestagent/zstacktestagent/plugins/vm.py
KevinDavidMitnick/zstack-woodpecker
96257faaf3c362168d008bdb47002025ad669b24
[ "Apache-2.0" ]
2
2016-03-23T08:45:44.000Z
2017-06-26T02:40:46.000Z
zstacktestagent/zstacktestagent/plugins/vm.py
KevinDavidMitnick/zstack-woodpecker
96257faaf3c362168d008bdb47002025ad669b24
[ "Apache-2.0" ]
null
null
null
zstacktestagent/zstacktestagent/plugins/vm.py
KevinDavidMitnick/zstack-woodpecker
96257faaf3c362168d008bdb47002025ad669b24
[ "Apache-2.0" ]
null
null
null
''' @author: Frank ''' import zstacktestagent.testagent as testagent import zstacklib.utils.shell as shell import zstacklib.utils.jsonobject as jsonobject import zstacklib.utils.http as http import zstacklib.utils.linux as linux import zstacklib.utils.ssh as ssh import zstacklib.utils.log as log import threading...
35.66113
124
0.614403
import zstacktestagent.testagent as testagent import zstacklib.utils.shell as shell import zstacklib.utils.jsonobject as jsonobject import zstacklib.utils.http as http import zstacklib.utils.linux as linux import zstacklib.utils.ssh as ssh import zstacklib.utils.log as log import threading import time logger = log....
true
true
1c2a88fb7cd5a5279235b373121270c25f937ab0
3,018
py
Python
pyrela/create_atari.py
facebookresearch/rela
0bd091576921b8f060b73159f8393a8e13aa6227
[ "MIT" ]
93
2019-10-25T20:10:47.000Z
2022-03-14T15:28:57.000Z
pyrela/create_atari.py
facebookresearch/rela
0bd091576921b8f060b73159f8393a8e13aa6227
[ "MIT" ]
1
2020-05-16T08:18:46.000Z
2020-05-16T08:18:46.000Z
pyrela/create_atari.py
facebookresearch/rela
0bd091576921b8f060b73159f8393a8e13aa6227
[ "MIT" ]
10
2019-11-29T23:48:10.000Z
2022-03-24T07:42:22.000Z
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import os import pprint import set_path set_path.append_sys_path() import torch import rela import atari assert rela.__file__.endswith(".so") assert atari.__file__.endswith(".so") def get_rom_path(game): root = os.path.dirname(os.path.dir...
23.038168
72
0.614314
import os import pprint import set_path set_path.append_sys_path() import torch import rela import atari assert rela.__file__.endswith(".so") assert atari.__file__.endswith(".so") def get_rom_path(game): root = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) rom_path = os.path.join(root, "at...
true
true
1c2a895cdc946104ea2edf20f48ee90279d78bb4
405
py
Python
docker-deploy/web-app/Ride_Share_App/asgi.py
universebh/ride_share
f5426b13ed256c6d6a0e966e2306da0f5fce8235
[ "MIT" ]
null
null
null
docker-deploy/web-app/Ride_Share_App/asgi.py
universebh/ride_share
f5426b13ed256c6d6a0e966e2306da0f5fce8235
[ "MIT" ]
null
null
null
docker-deploy/web-app/Ride_Share_App/asgi.py
universebh/ride_share
f5426b13ed256c6d6a0e966e2306da0f5fce8235
[ "MIT" ]
null
null
null
""" ASGI config for Ride_Share_App project. It exposes the ASGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.0/howto/deployment/asgi/ """ import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJANG...
23.823529
78
0.792593
import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'Ride_Share_App.settings') application = get_asgi_application()
true
true
1c2a8a8e6f37448e474466f3e3cab428c928fadb
13,932
py
Python
czsc/traders/ts_backtest.py
fnsoxt/czsc
ae908ca807251eefb1c23c1a3bfa20f36977ba4b
[ "Apache-2.0" ]
null
null
null
czsc/traders/ts_backtest.py
fnsoxt/czsc
ae908ca807251eefb1c23c1a3bfa20f36977ba4b
[ "Apache-2.0" ]
null
null
null
czsc/traders/ts_backtest.py
fnsoxt/czsc
ae908ca807251eefb1c23c1a3bfa20f36977ba4b
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ author: zengbin93 email: zeng_bin8888@163.com create_dt: 2022/2/14 17:25 describe: 基于 Tushare 分钟数据的择时策略快速回测 """ import os import inspect import traceback import pandas as pd from tqdm import tqdm from typing import Callable from .. import envs from ..data.ts_cache import TsDataCache from ....
37.858696
120
0.55211
import os import inspect import traceback import pandas as pd from tqdm import tqdm from typing import Callable from .. import envs from ..data.ts_cache import TsDataCache from ..traders.utils import trader_fast_backtest, freq_cn2ts from ..utils import x_round from ..objects import cal_break_even_point def read_ra...
true
true
1c2a8bb290060f71a8f3fb9781fce42e4c9c0cdd
752
py
Python
ab/generate_and_test.py
explorer02/AI-Algorithms
5f3d496fe11e50e78336417a2e80665be2d08d48
[ "MIT" ]
null
null
null
ab/generate_and_test.py
explorer02/AI-Algorithms
5f3d496fe11e50e78336417a2e80665be2d08d48
[ "MIT" ]
null
null
null
ab/generate_and_test.py
explorer02/AI-Algorithms
5f3d496fe11e50e78336417a2e80665be2d08d48
[ "MIT" ]
4
2020-10-06T03:13:31.000Z
2020-10-06T03:54:25.000Z
import random print("\nFinding if subarray exists with given sum->\n") arr = [int(item) for item in input("Enter input array : ").split()] size = len(arr) cumilativeSum = [] sum = 0 cumilativeSum.append(sum) for item in arr : sum+=item cumilativeSum.append(sum) target = int(input("Enter target sum : ")) nu...
25.066667
67
0.642287
import random print("\nFinding if subarray exists with given sum->\n") arr = [int(item) for item in input("Enter input array : ").split()] size = len(arr) cumilativeSum = [] sum = 0 cumilativeSum.append(sum) for item in arr : sum+=item cumilativeSum.append(sum) target = int(input("Enter target sum : ")) nu...
true
true
1c2a8c39c2e2c17b0b38193d659dd6d7cb2b2e0a
2,380
py
Python
src/confidentialledger/azext_confidentialledger/vendored_sdks/confidentialledger/models/_confidential_ledger_enums.py
saisankargochhayat/azure-cli-extensions
f89443a766961f984977a2cf1b682973fcb61edd
[ "MIT" ]
null
null
null
src/confidentialledger/azext_confidentialledger/vendored_sdks/confidentialledger/models/_confidential_ledger_enums.py
saisankargochhayat/azure-cli-extensions
f89443a766961f984977a2cf1b682973fcb61edd
[ "MIT" ]
null
null
null
src/confidentialledger/azext_confidentialledger/vendored_sdks/confidentialledger/models/_confidential_ledger_enums.py
saisankargochhayat/azure-cli-extensions
f89443a766961f984977a2cf1b682973fcb61edd
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
33.055556
94
0.663445
from enum import Enum, EnumMeta from six import with_metaclass class _CaseInsensitiveEnumMeta(EnumMeta): def __getitem__(self, name): return super().__getitem__(name.upper()) def __getattr__(cls, name): try: return cls._member_map_[name.upper()] except KeyError: ...
true
true
1c2a8c4f0c10cee1dcef9b831ced983a703d7099
25,489
py
Python
pandas/core/indexes/timedeltas.py
krishnakumarraghu/pandas
d7eb306cc1b6e3430895a7d2af0cfa1cbc8c4c06
[ "BSD-3-Clause" ]
null
null
null
pandas/core/indexes/timedeltas.py
krishnakumarraghu/pandas
d7eb306cc1b6e3430895a7d2af0cfa1cbc8c4c06
[ "BSD-3-Clause" ]
null
null
null
pandas/core/indexes/timedeltas.py
krishnakumarraghu/pandas
d7eb306cc1b6e3430895a7d2af0cfa1cbc8c4c06
[ "BSD-3-Clause" ]
1
2020-01-24T09:05:17.000Z
2020-01-24T09:05:17.000Z
""" implement the TimedeltaIndex """ from datetime import datetime import warnings import numpy as np from pandas._libs import NaT, Timedelta, index as libindex, join as libjoin, lib from pandas.util._decorators import Appender, Substitution from pandas.core.dtypes.common import ( _TD_DTYPE, ensure_int64, ...
32.428753
95
0.598454
from datetime import datetime import warnings import numpy as np from pandas._libs import NaT, Timedelta, index as libindex, join as libjoin, lib from pandas.util._decorators import Appender, Substitution from pandas.core.dtypes.common import ( _TD_DTYPE, ensure_int64, is_float, is_integer, is_li...
true
true
1c2a8c56eae9600a72ede44ae540e4a6ded04c15
6,775
py
Python
src/azure-cli/azure/cli/command_modules/signalr/tests/latest/test_signalr_commands.py
xaliciayang/azure-cli
38c80c875e8a79d08d06a2f42ec82fd54934343e
[ "MIT" ]
7
2020-04-26T09:54:05.000Z
2021-07-22T16:54:41.000Z
src/azure-cli/azure/cli/command_modules/signalr/tests/latest/test_signalr_commands.py
xaliciayang/azure-cli
38c80c875e8a79d08d06a2f42ec82fd54934343e
[ "MIT" ]
120
2018-03-27T19:14:40.000Z
2020-12-10T23:53:35.000Z
src/azure-cli/azure/cli/command_modules/signalr/tests/latest/test_signalr_commands.py
xaliciayang/azure-cli
38c80c875e8a79d08d06a2f42ec82fd54934343e
[ "MIT" ]
13
2020-06-30T16:23:36.000Z
2022-03-29T17:12:05.000Z
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
49.094203
279
0.558229
import time import unittest from azure.cli.testsdk import ScenarioTest, ResourceGroupPreparer class AzureSignalRServiceScenarioTest(ScenarioTest): @ResourceGroupPreparer(random_name_length=20) def test_signalr_commands(self, resource_group): signalr_name = self.create_random_name('signalr', 16) ...
true
true
1c2a8ca8946d43888e0d7c217f8537ec4e1acd3d
1,080
py
Python
stubs.min/Autodesk/Revit/DB/__init___parts/InSessionViewSheetSet.py
denfromufa/ironpython-stubs
4d2b405eda3ceed186e8adca55dd97c332c6f49d
[ "MIT" ]
1
2017-07-07T11:15:45.000Z
2017-07-07T11:15:45.000Z
stubs.min/Autodesk/Revit/DB/__init___parts/InSessionViewSheetSet.py
hdm-dt-fb/ironpython-stubs
4d2b405eda3ceed186e8adca55dd97c332c6f49d
[ "MIT" ]
null
null
null
stubs.min/Autodesk/Revit/DB/__init___parts/InSessionViewSheetSet.py
hdm-dt-fb/ironpython-stubs
4d2b405eda3ceed186e8adca55dd97c332c6f49d
[ "MIT" ]
null
null
null
class InSessionViewSheetSet(object,IViewSheetSet,IDisposable): """ Represents the in-session ViewSheetSet. """ def Dispose(self): """ Dispose(self: InSessionViewSheetSet) """ pass def ReleaseUnmanagedResources(self,*args): """ ReleaseUnmanagedResources(self: InSessionViewSheetSet,disposing: bool) """ ...
36
215
0.7
class InSessionViewSheetSet(object,IViewSheetSet,IDisposable): def Dispose(self): pass def ReleaseUnmanagedResources(self,*args): pass def __enter__(self,*args): pass def __exit__(self,*args): pass def __init__(self,*args): pass def __repr__(self,*args): pass Views=property(lambda self: ...
true
true
1c2a8d48ced32ba78b5debd47a719a472d06158a
5,525
py
Python
apps/editors/tasks.py
muffinresearch/addons-server
66613e9262a5e9475254091552de28a53b5b4072
[ "BSD-3-Clause" ]
1
2015-12-01T03:53:51.000Z
2015-12-01T03:53:51.000Z
apps/editors/tasks.py
muffinresearch/addons-server
66613e9262a5e9475254091552de28a53b5b4072
[ "BSD-3-Clause" ]
5
2021-02-02T23:09:35.000Z
2021-09-08T02:47:20.000Z
apps/editors/tasks.py
Acidburn0zzz/olympia
7f766a5fdff255b827333d4fb01aa77546ed8c70
[ "BSD-3-Clause" ]
null
null
null
import os from django.conf import settings from django.utils.translation import override import commonware.log from tower import ugettext as _ import constants.editors as rvw from addons.tasks import create_persona_preview_images from amo.celery import task from amo.decorators import write from amo.helpers import us...
33.895706
79
0.643439
import os from django.conf import settings from django.utils.translation import override import commonware.log from tower import ugettext as _ import constants.editors as rvw from addons.tasks import create_persona_preview_images from amo.celery import task from amo.decorators import write from amo.helpers import us...
true
true
1c2a8db911c5669ea511b89f0b361f7efa1b43e1
5,156
py
Python
3D/classic/biAuxApf.py
lidiaxp/plannie
b05f80a8bb5170ccec0124c97251d515892dc931
[ "Unlicense" ]
6
2021-09-15T12:33:20.000Z
2022-03-30T17:40:17.000Z
3D/classic/biAuxApf.py
lidiaxp/plannie
b05f80a8bb5170ccec0124c97251d515892dc931
[ "Unlicense" ]
null
null
null
3D/classic/biAuxApf.py
lidiaxp/plannie
b05f80a8bb5170ccec0124c97251d515892dc931
[ "Unlicense" ]
null
null
null
# -*- coding: utf-8 -*- import math import random from matplotlib import pyplot as plt from helper.ambiente import Pontos from helper.utils import colidir, simulate_points, definir_angulo, dist_euclidiana, pseudo3D, distancia_rota3D import numpy as np from classic.vetor2D import Vector2d from classic.minLocalAPF import...
44.448276
183
0.557797
import math import random from matplotlib import pyplot as plt from helper.ambiente import Pontos from helper.utils import colidir, simulate_points, definir_angulo, dist_euclidiana, pseudo3D, distancia_rota3D import numpy as np from classic.vetor2D import Vector2d from classic.minLocalAPF import deuRuim class APF(): ...
true
true
1c2a8e548f776655f7880462a9940f818df1d725
7,560
py
Python
tests/tls.py
binaryhq/mysql-main-in-a-box
10f45dbd56ef868be3e51adccd487c49b2c1abb1
[ "CC0-1.0" ]
null
null
null
tests/tls.py
binaryhq/mysql-main-in-a-box
10f45dbd56ef868be3e51adccd487c49b2c1abb1
[ "CC0-1.0" ]
null
null
null
tests/tls.py
binaryhq/mysql-main-in-a-box
10f45dbd56ef868be3e51adccd487c49b2c1abb1
[ "CC0-1.0" ]
null
null
null
#!/usr/bin/python3 # -*- coding: utf-8 -*- # Runs SSLyze on the TLS endpoints of a box and outputs # the results so we can inspect the settings and compare # against a known good version in tls_results.txt. # # Make sure you have SSLyze available: # wget https://github.com/nabla-c0d3/sslyze/releases/download/release-0...
45.542169
862
0.703042
import sys, subprocess, re, time, json, csv, io, urllib.request
true
true
1c2a8ebd3a7bd11a1fdcd99959313c3b24140264
2,561
py
Python
examples/notebooks/model.py
sohailsomani/soso-state
05e92b26e06555f9041c61a6ffaefaa3050e6213
[ "MIT" ]
4
2021-02-06T04:31:49.000Z
2021-07-07T02:06:30.000Z
examples/notebooks/model.py
sohailsomani/soso.state
05e92b26e06555f9041c61a6ffaefaa3050e6213
[ "MIT" ]
null
null
null
examples/notebooks/model.py
sohailsomani/soso.state
05e92b26e06555f9041c61a6ffaefaa3050e6213
[ "MIT" ]
1
2021-02-28T18:59:34.000Z
2021-02-28T18:59:34.000Z
import datetime as dt import math import typing from dataclasses import dataclass, field import numpy as np from soso import state @dataclass class Bars: date: typing.List[dt.datetime] = field(default_factory=list) open: typing.List[float] = field(default_factory=list) high: typing.List[float] = field(de...
29.102273
92
0.565795
import datetime as dt import math import typing from dataclasses import dataclass, field import numpy as np from soso import state @dataclass class Bars: date: typing.List[dt.datetime] = field(default_factory=list) open: typing.List[float] = field(default_factory=list) high: typing.List[float] = field(de...
true
true
1c2a8f66085ad77fe454c0e51d80b17454ffd231
13,661
py
Python
tools/pythonpkg/tests/fast/test_multithread.py
leoYY/duckdb
2f8fc15dedc923e0f3b463bd01bca12af89b393d
[ "MIT" ]
2,816
2018-06-26T18:52:52.000Z
2021-04-06T10:39:15.000Z
tools/pythonpkg/tests/fast/test_multithread.py
lnkuiper/duckdb
dd2f405ae3a74f317e10f0a32254ba2d5e2d8c41
[ "MIT" ]
1,310
2021-04-06T16:04:52.000Z
2022-03-31T13:52:53.000Z
tools/pythonpkg/tests/fast/test_multithread.py
lnkuiper/duckdb
dd2f405ae3a74f317e10f0a32254ba2d5e2d8c41
[ "MIT" ]
270
2021-04-09T06:18:28.000Z
2022-03-31T11:55:37.000Z
import duckdb import pytest import threading import queue as Queue import pandas as pd import numpy as np import os try: import pyarrow as pa can_run = True except: can_run = False class DuckDBThreaded: def __init__(self,duckdb_insert_thread_count,thread_function): self.duckdb_insert_thread_cou...
31.549654
133
0.64373
import duckdb import pytest import threading import queue as Queue import pandas as pd import numpy as np import os try: import pyarrow as pa can_run = True except: can_run = False class DuckDBThreaded: def __init__(self,duckdb_insert_thread_count,thread_function): self.duckdb_insert_thread_cou...
true
true
1c2a8f8b2525d1bc7be1fced41876d0f6cb6daf5
1,735
py
Python
app.py
neliphaz45/HerokuQA
33bf61b75e4bd98241999b57dacc98f550ae5913
[ "MIT" ]
null
null
null
app.py
neliphaz45/HerokuQA
33bf61b75e4bd98241999b57dacc98f550ae5913
[ "MIT" ]
null
null
null
app.py
neliphaz45/HerokuQA
33bf61b75e4bd98241999b57dacc98f550ae5913
[ "MIT" ]
null
null
null
# import numpy as np from flask import Flask, request, jsonify, render_template import joblib import os import sklearn from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.metrics.pairwise import cosine_similarity from nltk.corpus import stopwords from nltk.stem import PorterStemmer fro...
34.7
140
0.697406
from flask import Flask, request, jsonify, render_template import joblib import os import sklearn from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.metrics.pairwise import cosine_similarity from nltk.corpus import stopwords from nltk.stem import PorterStemmer from textblob import Wor...
true
true
1c2a8fd2a36029b741243f20f4bf072caf4ab2c0
5,387
py
Python
kegbot/pycore/kbevent.py
Kegbot/kegbot-pycore
40923e4b359ecccfb773ac76a258f02d3487605f
[ "MIT" ]
3
2016-04-17T20:15:35.000Z
2016-09-02T13:53:26.000Z
kegbot/pycore/kbevent.py
Kegbot/kegbot-pycore
40923e4b359ecccfb773ac76a258f02d3487605f
[ "MIT" ]
3
2015-01-28T02:48:35.000Z
2020-04-30T03:58:15.000Z
kegbot/pycore/kbevent.py
Kegbot/kegbot-pycore
40923e4b359ecccfb773ac76a258f02d3487605f
[ "MIT" ]
9
2016-02-03T16:15:02.000Z
2018-07-23T13:34:05.000Z
"""Simple event-passing mechanisms. This module implements a very simple inter-process event passing system (EventHub), and corresponding message class (Event). """ from __future__ import absolute_import from future import standard_library standard_library.install_aliases() from past.builtins import basestring from ...
24.824885
78
0.696492
from __future__ import absolute_import from future import standard_library standard_library.install_aliases() from past.builtins import basestring from builtins import object from future.utils import raise_ import json import logging import queue import types import gflags from kegbot.util import util FLAGS = gfla...
true
true
1c2a9008d7a196d83edf0542900a66730b032e48
39,040
py
Python
cycleGAN_chainer.py
masataka46/cycle-GAN
003a17f01cba32862ad62bbc9e09be8401ac376e
[ "MIT" ]
null
null
null
cycleGAN_chainer.py
masataka46/cycle-GAN
003a17f01cba32862ad62bbc9e09be8401ac376e
[ "MIT" ]
null
null
null
cycleGAN_chainer.py
masataka46/cycle-GAN
003a17f01cba32862ad62bbc9e09be8401ac376e
[ "MIT" ]
null
null
null
import numpy as np import os import chainer from chainer import cuda, Function, gradient_check, report, training, utils, Variable from chainer import datasets, iterators, optimizers, serializers # from chainer import Link, Chain, ChainList import chainer.functions as F import chainer.links as L # from chainer.training ...
42.854007
137
0.597003
import numpy as np import os import chainer from chainer import cuda, Function, gradient_check, report, training, utils, Variable from chainer import datasets, iterators, optimizers, serializers import chainer.functions as F import chainer.links as L import utility as Utility from make_datasets import Make_datasets_...
true
true
1c2a90ffc70d81b766bdd36b24127368318e7e25
2,327
py
Python
__init__.py
h-a-r-s-h-a/skill-singing
1b657bb0bbf7a9097f1afba7deb5a5afd82db9a7
[ "Apache-2.0" ]
null
null
null
__init__.py
h-a-r-s-h-a/skill-singing
1b657bb0bbf7a9097f1afba7deb5a5afd82db9a7
[ "Apache-2.0" ]
null
null
null
__init__.py
h-a-r-s-h-a/skill-singing
1b657bb0bbf7a9097f1afba7deb5a5afd82db9a7
[ "Apache-2.0" ]
null
null
null
# Copyright 2016 Mycroft AI, Inc. # # This file is part of Mycroft Core. # # Mycroft Core 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) any later versio...
35.257576
71
0.677267
import random from os.path import dirname, join from adapt.intent import IntentBuilder from mycroft import MycroftSkill, intent_handler from mycroft.skills.audioservice import AudioService from mycroft.audio import wait_while_speaking class SingingSkill(MycroftSkill): def __init__(self): ...
true
true
1c2a91dfa93ce153b401e452f8206aef11572492
4,694
py
Python
nn_meter/prediction/predictors/extract_feature.py
kaleid-liner/nn-Meter
526f8ddeeb33816a0b2b7f97964683e0510cd85d
[ "MIT" ]
null
null
null
nn_meter/prediction/predictors/extract_feature.py
kaleid-liner/nn-Meter
526f8ddeeb33816a0b2b7f97964683e0510cd85d
[ "MIT" ]
null
null
null
nn_meter/prediction/predictors/extract_feature.py
kaleid-liner/nn-Meter
526f8ddeeb33816a0b2b7f97964683e0510cd85d
[ "MIT" ]
null
null
null
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import numpy as np from sklearn.metrics import mean_squared_error import logging def get_flop(input_channel, output_channel, k, H, W, stride): paras = output_channel * (k * k * input_channel + 1) flops = 2 * H / stride * W / stride * par...
34.514706
112
0.530464
import numpy as np from sklearn.metrics import mean_squared_error import logging def get_flop(input_channel, output_channel, k, H, W, stride): paras = output_channel * (k * k * input_channel + 1) flops = 2 * H / stride * W / stride * paras return flops, paras def get_conv_mem(input_channel, output_cha...
true
true
1c2a920169570b950b2af459b71ee82da467b7a3
1,077
py
Python
e2e/test_github_configuration.py
04n0/jenkins-configuration
8c79f2eb294b8114da896573762b619509221352
[ "Apache-2.0" ]
177
2017-05-30T20:17:11.000Z
2022-02-28T11:02:23.000Z
e2e/test_github_configuration.py
04n0/jenkins-configuration
8c79f2eb294b8114da896573762b619509221352
[ "Apache-2.0" ]
40
2017-06-26T17:50:24.000Z
2022-03-03T19:47:13.000Z
e2e/test_github_configuration.py
04n0/jenkins-configuration
8c79f2eb294b8114da896573762b619509221352
[ "Apache-2.0" ]
61
2017-06-28T04:40:15.000Z
2022-02-12T10:33:45.000Z
from __future__ import absolute_import import unittest import yaml import os from bok_choy.web_app_test import WebAppTest from .pages.github_configuration_subpage import GithubConfigurationSubPage class TestGithubConfiguration(WebAppTest): def setUp(self): super(TestGithubConfiguration, self).setUp() ...
37.137931
92
0.684308
from __future__ import absolute_import import unittest import yaml import os from bok_choy.web_app_test import WebAppTest from .pages.github_configuration_subpage import GithubConfigurationSubPage class TestGithubConfiguration(WebAppTest): def setUp(self): super(TestGithubConfiguration, self).setUp() ...
true
true
1c2a927858ec20c79ed89ef6f2f03be4c713d78b
1,006
py
Python
osc_generator/tools/__init__.py
EFS-OpenSource/OSC-Generator
a4744d29c8c21ff577102e16208b243525789422
[ "Apache-2.0" ]
null
null
null
osc_generator/tools/__init__.py
EFS-OpenSource/OSC-Generator
a4744d29c8c21ff577102e16208b243525789422
[ "Apache-2.0" ]
null
null
null
osc_generator/tools/__init__.py
EFS-OpenSource/OSC-Generator
a4744d29c8c21ff577102e16208b243525789422
[ "Apache-2.0" ]
null
null
null
# **************************************************************************** # @__init__.py # # @copyright 2022 Elektronische Fahrwerksysteme GmbH and Audi AG. All rights reserved. # # @license Apache v2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except...
41.916667
103
0.616302
true
true
1c2a9347ea79c23c23eb6ec016445f3ad7d38545
4,554
py
Python
CTS.py
pozaylov/CTS
77aeb504ea55ba150458e88043253fbb7b86c90a
[ "MIT" ]
null
null
null
CTS.py
pozaylov/CTS
77aeb504ea55ba150458e88043253fbb7b86c90a
[ "MIT" ]
null
null
null
CTS.py
pozaylov/CTS
77aeb504ea55ba150458e88043253fbb7b86c90a
[ "MIT" ]
null
null
null
import os from win32com.client import Dispatch path_1 = 'C:\Program Files (x86)\Waves\MultiRack' path_2 = 'C:\Program Files (x86)\Waves\MultiRack ref' class waves_item(object): def __init__(self, path, selected_path): self.path = path self.view_path = path[len(selected_path):] # Create view pat...
32.528571
103
0.564998
import os from win32com.client import Dispatch path_1 = 'C:\Program Files (x86)\Waves\MultiRack' path_2 = 'C:\Program Files (x86)\Waves\MultiRack ref' class waves_item(object): def __init__(self, path, selected_path): self.path = path self.view_path = path[len(selected_path):] self.ver...
true
true
1c2a93eab13e6add0adb7175d9185f653e4b8e8f
513
py
Python
dictionaries/statistics.py
MaggieIllustrations/softuni-github-programming
f5695cb14602f3d2974359f6d8734332acc650d3
[ "MIT" ]
null
null
null
dictionaries/statistics.py
MaggieIllustrations/softuni-github-programming
f5695cb14602f3d2974359f6d8734332acc650d3
[ "MIT" ]
null
null
null
dictionaries/statistics.py
MaggieIllustrations/softuni-github-programming
f5695cb14602f3d2974359f6d8734332acc650d3
[ "MIT" ]
1
2022-01-14T17:12:44.000Z
2022-01-14T17:12:44.000Z
products = {} command = input() while command != "statistics": command = input() while command != "statistics": tokens = command.split(": ") product = tokens[0] quantity = int(tokens[1]) if product not in products: products[product] = 0 products[product] += quantity print("Products in s...
24.428571
50
0.645224
products = {} command = input() while command != "statistics": command = input() while command != "statistics": tokens = command.split(": ") product = tokens[0] quantity = int(tokens[1]) if product not in products: products[product] = 0 products[product] += quantity print("Products in s...
true
true
1c2a959273c3f9124f5a44408677c60973bbbfca
3,152
py
Python
services/web/server/tests/unit/login/test_login.py
oetiker/osparc-simcore
00918bf8f000840cc70cc49458780a55858d52ea
[ "MIT" ]
null
null
null
services/web/server/tests/unit/login/test_login.py
oetiker/osparc-simcore
00918bf8f000840cc70cc49458780a55858d52ea
[ "MIT" ]
2
2018-05-13T09:10:57.000Z
2019-03-06T08:10:40.000Z
services/web/server/tests/unit/login/test_login.py
oetiker/osparc-simcore
00918bf8f000840cc70cc49458780a55858d52ea
[ "MIT" ]
null
null
null
# pylint:disable=wildcard-import # pylint:disable=unused-import # pylint:disable=unused-variable # pylint:disable=unused-argument # pylint:disable=redefined-outer-name from aiohttp import web from servicelib.rest_responses import unwrap_envelope from simcore_service_webserver.db_models import ConfirmationAction, User...
32.163265
81
0.672589
from aiohttp import web from servicelib.rest_responses import unwrap_envelope from simcore_service_webserver.db_models import ConfirmationAction, UserStatus from simcore_service_webserver.login.cfg import cfg from utils_login import NewUser EMAIL, PASSWORD = 'tester@test.com', 'password' async def test_login_...
true
true
1c2a96dc3f0eca358649d97d859329b1e2cbe9a2
281
py
Python
CodeSamples/Chapter2/error_handler.py
PacktPublishing/Python-Microservices-Development-2nd-Edition
bbd0ed0f2f26e91cf589e539a70666057dc880eb
[ "MIT" ]
16
2021-08-28T13:46:53.000Z
2022-03-21T18:09:57.000Z
CodeSamples/Chapter2/error_handler.py
saibaldas/Python-Microservices-Development-2nd-Edition
bbd0ed0f2f26e91cf589e539a70666057dc880eb
[ "MIT" ]
null
null
null
CodeSamples/Chapter2/error_handler.py
saibaldas/Python-Microservices-Development-2nd-Edition
bbd0ed0f2f26e91cf589e539a70666057dc880eb
[ "MIT" ]
15
2021-08-19T03:49:17.000Z
2022-03-23T13:53:33.000Z
# error_handler.py from quart import Quart app = Quart(__name__) @app.errorhandler(500) def error_handling(error): return {"Error": str(error)}, 500 @app.route("/api") def my_microservice(): raise TypeError("Some Exception") if __name__ == "__main__": app.run()
14.789474
37
0.686833
from quart import Quart app = Quart(__name__) @app.errorhandler(500) def error_handling(error): return {"Error": str(error)}, 500 @app.route("/api") def my_microservice(): raise TypeError("Some Exception") if __name__ == "__main__": app.run()
true
true
1c2a97e1ea5a39d916326d28847541d7bec2755f
9,364
py
Python
august/api.py
ai-write-city/py-august
5b3b539851dea7f166eb93f7abb5de6283b15e46
[ "MIT" ]
63
2017-12-09T03:26:36.000Z
2022-01-31T08:38:55.000Z
august/api.py
ai-write-city/py-august
5b3b539851dea7f166eb93f7abb5de6283b15e46
[ "MIT" ]
51
2018-03-04T04:50:02.000Z
2022-01-28T17:31:13.000Z
august/api.py
ai-write-city/py-august
5b3b539851dea7f166eb93f7abb5de6283b15e46
[ "MIT" ]
28
2018-03-03T04:32:04.000Z
2022-02-05T06:52:07.000Z
"""Api calls for sync.""" import json import logging import time from requests import Session, request from requests.exceptions import HTTPError from august.api_common import ( API_LOCK_URL, API_RETRY_ATTEMPTS, API_RETRY_TIME, API_UNLOCK_URL, HEADER_AUGUST_ACCESS_TOKEN, ApiCommon, _api_hea...
34.175182
90
0.637014
import json import logging import time from requests import Session, request from requests.exceptions import HTTPError from august.api_common import ( API_LOCK_URL, API_RETRY_ATTEMPTS, API_RETRY_TIME, API_UNLOCK_URL, HEADER_AUGUST_ACCESS_TOKEN, ApiCommon, _api_headers, _convert_lock_re...
true
true
1c2a9933c44d3069a73f3bd62ff6d36c49547819
3,607
py
Python
tests/test_ui.py
MJGrey/thefuck
c88b0792b8a2db3c181938af6c357662993a30c3
[ "MIT" ]
1
2018-07-06T04:10:56.000Z
2018-07-06T04:10:56.000Z
tests/test_ui.py
MJGrey/thefuck
c88b0792b8a2db3c181938af6c357662993a30c3
[ "MIT" ]
null
null
null
tests/test_ui.py
MJGrey/thefuck
c88b0792b8a2db3c181938af6c357662993a30c3
[ "MIT" ]
1
2021-12-19T21:34:14.000Z
2021-12-19T21:34:14.000Z
# -*- encoding: utf-8 -*- import pytest from itertools import islice from thefuck import ui from thefuck.types import CorrectedCommand from thefuck import const @pytest.fixture def patch_get_key(monkeypatch): def patch(vals): vals = iter(vals) monkeypatch.setattr('thefuck.ui.get_key', lambda: nex...
35.019417
94
0.628223
import pytest from itertools import islice from thefuck import ui from thefuck.types import CorrectedCommand from thefuck import const @pytest.fixture def patch_get_key(monkeypatch): def patch(vals): vals = iter(vals) monkeypatch.setattr('thefuck.ui.get_key', lambda: next(vals)) return patc...
true
true
1c2a9993dcccbb4b8f5bfaff6b92914e6a94bd3c
4,666
py
Python
seqManip/getProtList.py
andersonbrito/miscCodes
2052e3627867a4f90f359840edb690e2a463ae74
[ "MIT" ]
1
2021-02-04T15:18:34.000Z
2021-02-04T15:18:34.000Z
seqManip/getProtList.py
andersonbrito/miscCodes
2052e3627867a4f90f359840edb690e2a463ae74
[ "MIT" ]
null
null
null
seqManip/getProtList.py
andersonbrito/miscCodes
2052e3627867a4f90f359840edb690e2a463ae74
[ "MIT" ]
null
null
null
#!/usr/bin/python # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Created by: Anderson Brito # # getProtList.py -> This code downloads a list of proteins given a list # of uniprot identifiers. The auxiliary file must # contain tab separated lines with a uni...
38.245902
160
0.542435
d_all("tr") for row in dataRows: if dom in str(row): outputFile.write(">" + prot + "|" + dom + "\n") if int(row.find_all("td")[2].text) - aaBefore < 0: start = 1 else: ...
true
true
1c2a9ba6f3330d742e76da919e183d54bd22dc35
730
py
Python
src/python/src/spiders/test_spider.py
CESSIDY/boilerplate_copy
a9f00f6b9d39faff33ea4b80d67a111fdafe5863
[ "MIT" ]
1
2022-01-30T11:20:24.000Z
2022-01-30T11:20:24.000Z
src/python/src/spiders/test_spider.py
CESSIDY/boilerplate_copy
a9f00f6b9d39faff33ea4b80d67a111fdafe5863
[ "MIT" ]
null
null
null
src/python/src/spiders/test_spider.py
CESSIDY/boilerplate_copy
a9f00f6b9d39faff33ea4b80d67a111fdafe5863
[ "MIT" ]
null
null
null
from scrapy import Spider, Request class TestSpider(Spider): name = "test_spider" start_urls = ["https://docs.djangoproject.com/en/3.0/"] index = 0 custom_settings = { "DOWNLOADER_MIDDLEWARES": { 'middlewares.UserAgentMiddleware': 1, } } def parse(self, response, ...
25.172414
64
0.554795
from scrapy import Spider, Request class TestSpider(Spider): name = "test_spider" start_urls = ["https://docs.djangoproject.com/en/3.0/"] index = 0 custom_settings = { "DOWNLOADER_MIDDLEWARES": { 'middlewares.UserAgentMiddleware': 1, } } def parse(self, response, ...
true
true
1c2a9be829f64f5f209a1fd963f8f098b9c9e5e7
639
py
Python
tests/conftest.py
majamassarini/hardly
d4e7601f2ff3edece13060924cb026fd094172aa
[ "MIT" ]
null
null
null
tests/conftest.py
majamassarini/hardly
d4e7601f2ff3edece13060924cb026fd094172aa
[ "MIT" ]
null
null
null
tests/conftest.py
majamassarini/hardly
d4e7601f2ff3edece13060924cb026fd094172aa
[ "MIT" ]
null
null
null
# Copyright Contributors to the Packit project. # SPDX-License-Identifier: MIT import json import pytest from tests.spellbook import DATA_DIR @pytest.fixture(scope="module") def mr_event(): return json.loads((DATA_DIR / "webhooks" / "gitlab" / "mr_event.json").read_text()) @pytest.fixture(scope="module") def p...
24.576923
87
0.685446
import json import pytest from tests.spellbook import DATA_DIR @pytest.fixture(scope="module") def mr_event(): return json.loads((DATA_DIR / "webhooks" / "gitlab" / "mr_event.json").read_text()) @pytest.fixture(scope="module") def pipeline_event(): return json.loads((DATA_DIR / "webhooks" / "gitlab" / "p...
true
true
1c2a9d2c2d71f21dabb2d65c1991a44b749dd818
634
py
Python
astro/clusters/utils.py
cristobal-sifon/astro
e3ca00bebc5dbdd33e2df8df30191cc54c17f722
[ "MIT" ]
null
null
null
astro/clusters/utils.py
cristobal-sifon/astro
e3ca00bebc5dbdd33e2df8df30191cc54c17f722
[ "MIT" ]
3
2018-01-28T18:27:35.000Z
2019-10-11T13:29:11.000Z
astro/clusters/utils.py
cristobal-sifon/astro
e3ca00bebc5dbdd33e2df8df30191cc54c17f722
[ "MIT" ]
1
2021-12-06T14:29:13.000Z
2021-12-06T14:29:13.000Z
from __future__ import (absolute_import, division, print_function, unicode_literals) def name_from_coords(coords=None, ra=None, dec=None): """Create name from coordinates following IAU convention Name can be created by passing either an `astropy.coordinates.SkyCoord` object or an ...
33.368421
70
0.656151
from __future__ import (absolute_import, division, print_function, unicode_literals) def name_from_coords(coords=None, ra=None, dec=None): if coords is not None: name_ra = '{0:02.0f}{1:02.0f}{1:04.1f}'.format(*coords.ra.hms)
true
true
1c2a9e55f4d7234d7fce3cb8734b41ddc3779232
3,415
py
Python
generate_groundtruth.py
huynhtruc0309/VAL
adaf51ee8b6544a889c1ae2e592b555b311290cb
[ "Apache-2.0" ]
null
null
null
generate_groundtruth.py
huynhtruc0309/VAL
adaf51ee8b6544a889c1ae2e592b555b311290cb
[ "Apache-2.0" ]
null
null
null
generate_groundtruth.py
huynhtruc0309/VAL
adaf51ee8b6544a889c1ae2e592b555b311290cb
[ "Apache-2.0" ]
null
null
null
from datasets import fashion200k from datasets import fashion_iq from datasets import shoes from config import * from model import * import tensorflow as tf import numpy as np # python generate_groundtruth.py --dataset='fashion200k' # python generate_groundtruth.py --dataset='shoes' --data_path='' # python generate_g...
37.944444
126
0.718302
from datasets import fashion200k from datasets import fashion_iq from datasets import shoes from config import * from model import * import tensorflow as tf import numpy as np tf.app.flags.DEFINE_string( 'data_path', "datasets/fashion200k", 'path of dataset.') tf.app.flags.DEFINE_string( 'data_split', "tes...
true
true
1c2a9e597116038fb17ced8a4bd068f1f3790013
4,023
py
Python
utils/YOLO.py
duongttr/vehicles-counting-yolov4-deepsort
8e5e84d495987929e95b77610802ea206d40e5af
[ "MIT" ]
19
2021-10-10T14:29:01.000Z
2022-03-26T15:18:30.000Z
utils/YOLO.py
duongttr/vehicles-counting-yolov4-deepsort
8e5e84d495987929e95b77610802ea206d40e5af
[ "MIT" ]
7
2021-12-09T03:54:42.000Z
2022-03-30T10:27:59.000Z
utils/YOLO.py
duongttr/vehicles-counting-yolov4-deepsort
8e5e84d495987929e95b77610802ea206d40e5af
[ "MIT" ]
10
2021-10-17T00:38:34.000Z
2022-01-28T21:16:33.000Z
import numpy as np import time import cv2 import os class YOLO: def __init__(self, labels, cfg, weight, use_gpu=False): """ Parameters: - labels: path to labels' file - cfg: path to config file - weight: path to weight model - use_gpu: enable this if your machine is ...
40.23
152
0.558041
import numpy as np import time import cv2 import os class YOLO: def __init__(self, labels, cfg, weight, use_gpu=False): self.LABELS = open(labels).read().strip().split('\n') self.COLORS = np.random.uniform(0, 255, size=(len(self.LABELS), 3)) self.net = cv2.dnn.readNetFromDarknet(cfg, weight...
true
true
1c2a9ec5fc2c27f84fbbd2bb3cf358c7424d69d7
2,952
py
Python
test/reliability/scripts/chaos-test.py
cita-cloud/integration-test
003489c22034eec5ab9cbf8a9df5f5eeefc326c0
[ "Apache-2.0" ]
null
null
null
test/reliability/scripts/chaos-test.py
cita-cloud/integration-test
003489c22034eec5ab9cbf8a9df5f5eeefc326c0
[ "Apache-2.0" ]
null
null
null
test/reliability/scripts/chaos-test.py
cita-cloud/integration-test
003489c22034eec5ab9cbf8a9df5f5eeefc326c0
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # # Copyright Rivtower Technologies LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
30.75
94
0.692073
import os import subprocess import time import sys sys.path.append("test/utils") import util apply_cmd = "kubectl apply -f {}" delete_cmd = "kubectl delete -f {}" def clean(chain_type): subprocess.getoutput(delete_cmd.format("test/reliability/chaos/network-chaos.yaml")) subprocess.getoutput(d...
true
true
1c2a9f30d3c5e0b8e024417e4f99ba0924a48a74
11,591
py
Python
py3status/autodoc.py
boucman/py3status
84b57304fbf71a466ccb1ed2f2dd039ece6eefb6
[ "BSD-3-Clause" ]
1
2020-04-07T19:11:36.000Z
2020-04-07T19:11:36.000Z
py3status/autodoc.py
boucman/py3status
84b57304fbf71a466ccb1ed2f2dd039ece6eefb6
[ "BSD-3-Clause" ]
2
2018-03-15T18:44:42.000Z
2018-03-15T19:22:04.000Z
py3status/autodoc.py
boucman/py3status
84b57304fbf71a466ccb1ed2f2dd039ece6eefb6
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- import ast import inspect import os.path import re from docutils import nodes from docutils.parsers.rst import Directive from pygments.lexer import RegexLexer, bygroups import pygments.token as pygments_token from py3status.docstrings import core_module_docstrings from py3status.screenshots i...
31.669399
88
0.533517
import ast import inspect import os.path import re from docutils import nodes from docutils.parsers.rst import Directive from pygments.lexer import RegexLexer, bygroups import pygments.token as pygments_token from py3status.docstrings import core_module_docstrings from py3status.screenshots import create_screenshot...
true
true
1c2a9f358af965e10c575ca52f39d90c0ccdabb2
98
py
Python
tinkertest/__init__.py
austinv11/TinkerTest
d97f1c771b7d8bc6244b34682985ee596c48aa30
[ "Apache-2.0" ]
2
2018-08-19T11:06:55.000Z
2018-08-19T13:29:31.000Z
tinkertest/__init__.py
austinv11/TinkerTest
d97f1c771b7d8bc6244b34682985ee596c48aa30
[ "Apache-2.0" ]
null
null
null
tinkertest/__init__.py
austinv11/TinkerTest
d97f1c771b7d8bc6244b34682985ee596c48aa30
[ "Apache-2.0" ]
null
null
null
from .tinkertest import * __all__ = (inject_into_function, inject_into_module, inject_into_type)
24.5
70
0.826531
from .tinkertest import * __all__ = (inject_into_function, inject_into_module, inject_into_type)
true
true
1c2a9f8510988b73936777bca25a19b644320cc2
2,140
py
Python
magicweb/routes.py
mordy-python/magicweb
ad3b2b217cbd964b152183240619b75a6a76251b
[ "MIT" ]
1
2021-09-08T14:37:10.000Z
2021-09-08T14:37:10.000Z
magicweb/routes.py
IsraelWald/magicweb
234f9fe5b81ce70d07782cb259b5ff3497f5c0f7
[ "MIT" ]
1
2021-09-08T13:22:40.000Z
2021-09-08T13:22:40.000Z
magicweb/routes.py
IsraelWald/magicweb
234f9fe5b81ce70d07782cb259b5ff3497f5c0f7
[ "MIT" ]
1
2021-09-03T12:12:31.000Z
2021-09-03T12:12:31.000Z
from parse import parse from jinja2 import Environment, FileSystemLoader import os from datetime import timedelta from webob import Request, Response def run(app, host='0.0.0.0', port=5000): from waitress import serve print(f"Starting server @ http://{host}:{port}/") serve(app, host=host, port=port) print("Killin...
27.088608
76
0.72757
from parse import parse from jinja2 import Environment, FileSystemLoader import os from datetime import timedelta from webob import Request, Response def run(app, host='0.0.0.0', port=5000): from waitress import serve print(f"Starting server @ http://{host}:{port}/") serve(app, host=host, port=port) print("Killin...
true
true
1c2a9fbfe677307fce05b6e009e835a1f5ef1807
407
py
Python
modules/gitlab/reverse_shell/gitlab-shell.py
grimlyreaper/CICADA
a84524fa57e4976ad4017d78096a169c468d9599
[ "Apache-2.0" ]
4
2020-09-08T00:33:12.000Z
2022-02-03T14:12:25.000Z
modules/gitlab/reverse_shell/gitlab-shell.py
emmaunel/CICADA
a84524fa57e4976ad4017d78096a169c468d9599
[ "Apache-2.0" ]
null
null
null
modules/gitlab/reverse_shell/gitlab-shell.py
emmaunel/CICADA
a84524fa57e4976ad4017d78096a169c468d9599
[ "Apache-2.0" ]
2
2021-01-07T22:00:14.000Z
2021-03-15T09:10:05.000Z
class Module: # def __init__(self): # print("In Gitlab ENUM MOdule") # # Cmd.__init__(self) # # self.prompt = args def info(self): "Give info about module" print("This module will attempt to return a reverse shell") def exploit(self): "Run the exploit" ...
23.941176
67
0.565111
class Module: "This module will attempt to return a reverse shell") def exploit(self): print("Attackkkk")
true
true
1c2aa01219e917477550384cda4fa94772ca3989
1,195
py
Python
src/rctgen/activity_stmts.py
mballance/pyrctgen
eb47ed2039d36ab236b63e795b313feb499820bd
[ "Apache-2.0" ]
1
2022-03-10T04:12:11.000Z
2022-03-10T04:12:11.000Z
src/rctgen/activity_stmts.py
mballance/pyrctgen
eb47ed2039d36ab236b63e795b313feb499820bd
[ "Apache-2.0" ]
null
null
null
src/rctgen/activity_stmts.py
mballance/pyrctgen
eb47ed2039d36ab236b63e795b313feb499820bd
[ "Apache-2.0" ]
null
null
null
''' Created on Mar 19, 2022 @author: mballance ''' from rctgen.impl.activity_block_meta_t import ActivityBlockMetaT from rctgen.impl.do_impl_meta import DoImplMeta from rctgen.impl.do_with_impl_meta import DoWithImplMeta class parallel(metaclass=ActivityBlockMetaT): def __init__(self, *args, **kwargs): ...
20.254237
64
0.622594
from rctgen.impl.activity_block_meta_t import ActivityBlockMetaT from rctgen.impl.do_impl_meta import DoImplMeta from rctgen.impl.do_with_impl_meta import DoWithImplMeta class parallel(metaclass=ActivityBlockMetaT): def __init__(self, *args, **kwargs): pass def __enter__(self): print...
true
true
1c2aa068bff4d273f7b300801c652a53be38a062
610
py
Python
whiley.py
sgriffith3/2020-12-07-PyNDE
9924fd3dbc006f083d11b55e07571fa4117b41dc
[ "MIT" ]
1
2020-12-10T15:57:58.000Z
2020-12-10T15:57:58.000Z
whiley.py
sgriffith3/2020-12-07-PyNDE
9924fd3dbc006f083d11b55e07571fa4117b41dc
[ "MIT" ]
null
null
null
whiley.py
sgriffith3/2020-12-07-PyNDE
9924fd3dbc006f083d11b55e07571fa4117b41dc
[ "MIT" ]
null
null
null
import time import random num = random.randint(1, 100) print(f"{num},", end=" ", flush=True) # while num <= 75: num = random.randint(1, 100) print(f"{num},", end=" ", flush=True) # if num > 75: # break #while True: # play_again = input("Do you want to play again? (y/N) ") # if play_again != "y...
19.677419
60
0.545902
import time import random num = random.randint(1, 100) print(f"{num},", end=" ", flush=True) while num <= 75: num = random.randint(1, 100) print(f"{num},", end=" ", flush=True)
true
true
1c2aa0823e8647057582809b3eec714cc72569fe
10,413
py
Python
tests/graphql/readme_forum/readme_forum_permissions/tests.py
karlosss/simple_api
03f87035c648f161d5e7a59b24f4e04bd34399f1
[ "MIT" ]
2
2020-11-13T14:00:06.000Z
2020-12-19T11:50:22.000Z
tests/graphql/readme_forum/readme_forum_permissions/tests.py
karlosss/simple_api
03f87035c648f161d5e7a59b24f4e04bd34399f1
[ "MIT" ]
5
2021-02-04T14:27:43.000Z
2021-06-04T23:22:24.000Z
test_project/simple_api_test/testcases/tests.py
karlosss/simple_api
03f87035c648f161d5e7a59b24f4e04bd34399f1
[ "MIT" ]
1
2021-01-06T13:54:38.000Z
2021-01-06T13:54:38.000Z
import json from django.contrib.auth.models import User from .objects import schema from tests.graphql.graphql_test_utils import remove_ws, GraphQLTestCase class Test(GraphQLTestCase): GRAPHQL_SCHEMA = schema REF_GRAPHQL_SCHEMA = """ schema { query: Query mutation: Mutation ...
26.976684
116
0.47095
import json from django.contrib.auth.models import User from .objects import schema from tests.graphql.graphql_test_utils import remove_ws, GraphQLTestCase class Test(GraphQLTestCase): GRAPHQL_SCHEMA = schema REF_GRAPHQL_SCHEMA = """ schema { query: Query mutation: Mutation ...
true
true
1c2aa19dc34967379f43fc0402f89c8666f55b8b
51,552
py
Python
flink-ai-flow/ai_flow/rest_endpoint/protobuf/metadata_service_pb2_grpc.py
MarvinMiao/flink-ai-extended
e45eecf2deea6976ba3d7ba821ffb8d9ce0a17f4
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
1
2020-12-12T15:21:05.000Z
2020-12-12T15:21:05.000Z
flink-ai-flow/ai_flow/rest_endpoint/protobuf/metadata_service_pb2_grpc.py
MarvinMiao/flink-ai-extended
e45eecf2deea6976ba3d7ba821ffb8d9ce0a17f4
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
1
2021-01-30T11:28:37.000Z
2021-01-30T11:28:37.000Z
flink-ai-flow/ai_flow/rest_endpoint/protobuf/metadata_service_pb2_grpc.py
MarvinMiao/flink-ai-extended
e45eecf2deea6976ba3d7ba821ffb8d9ce0a17f4
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
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...
46.737987
106
0.76129
import grpc from . import message_pb2 as message__pb2 from . import metadata_service_pb2 as metadata__service__pb2 class MetadataServiceStub(object): pass def __init__(self, channel): self.getExampleById = channel.unary_unary( '/MetadataService/getExampleById', request_...
true
true
1c2aa22a0baf5e1e6a561593f6b1dacdd190aa73
213
py
Python
bitmovin_api_sdk/models/response_status.py
jaythecaesarean/bitmovin-api-sdk-python
48166511fcb9082041c552ace55a9b66cc59b794
[ "MIT" ]
11
2019-07-03T10:41:16.000Z
2022-02-25T21:48:06.000Z
bitmovin_api_sdk/models/response_status.py
jaythecaesarean/bitmovin-api-sdk-python
48166511fcb9082041c552ace55a9b66cc59b794
[ "MIT" ]
8
2019-11-23T00:01:25.000Z
2021-04-29T12:30:31.000Z
bitmovin_api_sdk/models/response_status.py
jaythecaesarean/bitmovin-api-sdk-python
48166511fcb9082041c552ace55a9b66cc59b794
[ "MIT" ]
13
2020-01-02T14:58:18.000Z
2022-03-26T12:10:30.000Z
# coding: utf-8 from enum import Enum from six import string_types, iteritems from bitmovin_api_sdk.common.poscheck import poscheck_model class ResponseStatus(Enum): SUCCESS = "SUCCESS" ERROR = "ERROR"
19.363636
59
0.765258
from enum import Enum from six import string_types, iteritems from bitmovin_api_sdk.common.poscheck import poscheck_model class ResponseStatus(Enum): SUCCESS = "SUCCESS" ERROR = "ERROR"
true
true
1c2aa23d8f7ee830f2c06c0a7fedb24307136152
748
py
Python
altair/vegalite/v2/examples/cumulative_wiki_donations.py
alchemyst/altair
cf6284408b2828e1989712ea1e0a0c18f56db1bf
[ "BSD-3-Clause" ]
1
2019-03-08T09:29:59.000Z
2019-03-08T09:29:59.000Z
altair/vegalite/v2/examples/cumulative_wiki_donations.py
Zhujunnan/altair
3ee552ad672eb54e7c92d8ad9dd1dfdaf60f7d26
[ "BSD-3-Clause" ]
null
null
null
altair/vegalite/v2/examples/cumulative_wiki_donations.py
Zhujunnan/altair
3ee552ad672eb54e7c92d8ad9dd1dfdaf60f7d26
[ "BSD-3-Clause" ]
null
null
null
""" Cumulative Wikipedia Donations ============================== This chart shows cumulative donations to Wikipedia over the past 10 years. Inspired by this `Reddit post <https://www.reddit.com/r/dataisbeautiful/comments/7guwd0/cumulative_wikimedia_donations_over_the_past_10/>`_ but using lines instead of areas. """ ...
35.619048
248
0.684492
import altair as alt source = "https://frdata.wikimedia.org/donationdata-vs-day.csv" alt.Chart(source).mark_line().encode( alt.X('monthdate(date):T', axis=alt.Axis(format='%B', title='Month')), alt.Y( 'max(ytdsum):Q', stack=None, axis=alt.Axis(title='Cumulative Donations') ), alt.Colo...
true
true
1c2aa25db151b94821ad95d236e7d6c96ce3e75a
1,275
py
Python
neutron/plugins/vmware/vshield/common/constants.py
SnabbCo/neutron
a657c06d10f2171149c6b1863df36522bdc11cd7
[ "Apache-2.0" ]
10
2015-09-22T10:22:53.000Z
2016-02-25T06:12:05.000Z
neutron/plugins/vmware/vshield/common/constants.py
SnabbCo/neutron
a657c06d10f2171149c6b1863df36522bdc11cd7
[ "Apache-2.0" ]
12
2015-01-08T18:30:45.000Z
2015-03-13T21:04:15.000Z
neutron/plugins/vmware/vshield/common/constants.py
SnabbCo/neutron
a657c06d10f2171149c6b1863df36522bdc11cd7
[ "Apache-2.0" ]
7
2015-02-05T10:23:52.000Z
2019-05-18T17:11:19.000Z
# Copyright 2013 OpenStack Foundation. # 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 req...
27.717391
78
0.749804
EDGE_ID = 'edge_id' ROUTER_ID = 'router_id' EXTERNAL_VNIC_INDEX = 0 INTERNAL_VNIC_INDEX = 1 EXTERNAL_VNIC_NAME = "external" INTERNAL_VNIC_NAME = "internal" INTEGRATION_LR_IPADDRESS = "169.254.2.1/28" INTEGRATION_EDGE_IPADDRESS = "169.254.2.3" INTEGRATION_SUBNET_NETMASK = "255.255.255.240" PREPEND = ...
true
true
1c2aa2f17c952091fad5d28765d7559f46b6f16f
2,101
py
Python
keyboard_handler/linux.py
TyGillespie/keyboard_handler
1af978fa753fcea7e3aba98340d8d5724ffa2188
[ "MIT" ]
null
null
null
keyboard_handler/linux.py
TyGillespie/keyboard_handler
1af978fa753fcea7e3aba98340d8d5724ffa2188
[ "MIT" ]
null
null
null
keyboard_handler/linux.py
TyGillespie/keyboard_handler
1af978fa753fcea7e3aba98340d8d5724ffa2188
[ "MIT" ]
null
null
null
from main import KeyboardHandler import threading import thread import pyatspi def parse(s): """parse a string like control+f into (modifier, key). Unknown modifiers will return ValueError.""" m = 0 lst = s.split("+") if not len(lst): return (0, s) # Are these right? d = { ...
28.780822
83
0.606854
from main import KeyboardHandler import threading import thread import pyatspi def parse(s): m = 0 lst = s.split("+") if not len(lst): return (0, s) d = { "shift": 1 << pyatspi.MODIFIER_SHIFT, "control": 1 << pyatspi.MODIFIER_CONTROL, "alt": 1 << pyatspi.MODIFIER_A...
true
true
1c2aa40bbe155d14990a1fca83f3c94e998b7968
14,261
py
Python
tests/test_cython_parsing.py
wltrimbl/khmer
ff95776eabee96420f1ae43d0eff562682cbb17b
[ "CNRI-Python" ]
null
null
null
tests/test_cython_parsing.py
wltrimbl/khmer
ff95776eabee96420f1ae43d0eff562682cbb17b
[ "CNRI-Python" ]
null
null
null
tests/test_cython_parsing.py
wltrimbl/khmer
ff95776eabee96420f1ae43d0eff562682cbb17b
[ "CNRI-Python" ]
null
null
null
from __future__ import print_function from __future__ import absolute_import import gc import itertools import random import khmer from khmer._oxli.parsing import Sequence, FastxParser, SanitizedFastxParser from khmer._oxli.parsing import BrokenPairedReader, Alphabets, check_is_pair from khmer._oxli.parsing import ch...
32.191874
78
0.57233
from __future__ import print_function from __future__ import absolute_import import gc import itertools import random import khmer from khmer._oxli.parsing import Sequence, FastxParser, SanitizedFastxParser from khmer._oxli.parsing import BrokenPairedReader, Alphabets, check_is_pair from khmer._oxli.parsing import ch...
true
true
1c2aa689a74d5607b8fb12876e007b5fa72452c5
2,862
py
Python
di/core/module/solvers.py
dlski/python-di
04dcdf58f3cf820e2d2ba5086e4e89822ae1f409
[ "MIT" ]
8
2021-02-05T16:17:31.000Z
2022-03-03T00:01:33.000Z
di/core/module/solvers.py
dlski/python-di
04dcdf58f3cf820e2d2ba5086e4e89822ae1f409
[ "MIT" ]
null
null
null
di/core/module/solvers.py
dlski/python-di
04dcdf58f3cf820e2d2ba5086e4e89822ae1f409
[ "MIT" ]
null
null
null
import itertools from typing import Collection, Sequence from di.core.module.base import ( AbstractModuleElementConsistencyCheck, AbstractModuleImportSolver, Module, ModuleElementConsistencyError, ModuleImportGraph, ModuleImportGraphEdge, ModuleImportPlan, ModuleImportSolverError, ) fro...
34.481928
80
0.674004
import itertools from typing import Collection, Sequence from di.core.module.base import ( AbstractModuleElementConsistencyCheck, AbstractModuleImportSolver, Module, ModuleElementConsistencyError, ModuleImportGraph, ModuleImportGraphEdge, ModuleImportPlan, ModuleImportSolverError, ) fro...
true
true
1c2aa69c27d7446013d5c05c76d7054df1495638
503
py
Python
src/profiles/migrations/0007_auto_20170711_2025.py
pwelzel/bornhack-website
af794e6a2fba06e09626259c7768feb30ff394be
[ "BSD-3-Clause" ]
null
null
null
src/profiles/migrations/0007_auto_20170711_2025.py
pwelzel/bornhack-website
af794e6a2fba06e09626259c7768feb30ff394be
[ "BSD-3-Clause" ]
null
null
null
src/profiles/migrations/0007_auto_20170711_2025.py
pwelzel/bornhack-website
af794e6a2fba06e09626259c7768feb30ff394be
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-07-11 18:25 from __future__ import unicode_literals from django.db import migrations def populate_team_responsible_public_credit_names(apps, schema_editor): pass class Migration(migrations.Migration): dependencies = [ ('profiles', '0006_au...
23.952381
76
0.72167
from __future__ import unicode_literals from django.db import migrations def populate_team_responsible_public_credit_names(apps, schema_editor): pass class Migration(migrations.Migration): dependencies = [ ('profiles', '0006_auto_20170711_1757'), ('teams', '0014_remove_teammember_deleted')...
true
true
1c2aa6dca24a5246beee8a02eb46ed515236bf56
17,710
py
Python
web/server.py
jackymardt/YYeTsBot
4bb72863c29f4272b77f4e5ecc382ffbbd4f7f0d
[ "MIT" ]
null
null
null
web/server.py
jackymardt/YYeTsBot
4bb72863c29f4272b77f4e5ecc382ffbbd4f7f0d
[ "MIT" ]
null
null
null
web/server.py
jackymardt/YYeTsBot
4bb72863c29f4272b77f4e5ecc382ffbbd4f7f0d
[ "MIT" ]
null
null
null
#!/usr/local/bin/python3 # coding: utf-8 # YYeTsBot - server.py # 2/5/21 21:02 # __author__ = "Benny <benny.think@gmail.com>" import os import contextlib import logging import json import time from urllib import request from datetime import date, timedelta from http import HTTPStatus from concurrent.futures import T...
31.738351
119
0.553247
__author__ = "Benny <benny.think@gmail.com>" import os import contextlib import logging import json import time from urllib import request from datetime import date, timedelta from http import HTTPStatus from concurrent.futures import ThreadPoolExecutor import redis import pymongo from apscheduler.schedulers....
true
true
1c2aa6eb7b53a6b03937d524db032bac786ebb7f
5,432
py
Python
scripts/create_jekyll_ninjabuild.py
phiberoptick/documentation
1f381c0912d5f84812b3e8882fef5be4d68c8e10
[ "CC0-1.0" ]
null
null
null
scripts/create_jekyll_ninjabuild.py
phiberoptick/documentation
1f381c0912d5f84812b3e8882fef5be4d68c8e10
[ "CC0-1.0" ]
null
null
null
scripts/create_jekyll_ninjabuild.py
phiberoptick/documentation
1f381c0912d5f84812b3e8882fef5be4d68c8e10
[ "CC0-1.0" ]
null
null
null
#!/usr/bin/env python3 import os.path import sys import json import re import ninja_syntax def resolve_url(filename, relative_link): return os.path.normpath(os.path.join(os.path.dirname(filename), relative_link)) def scan_adoc(adoc_filename, apparent_filename): # look for image files with open(os.path....
36.213333
133
0.579529
import os.path import sys import json import re import ninja_syntax def resolve_url(filename, relative_link): return os.path.normpath(os.path.join(os.path.dirname(filename), relative_link)) def scan_adoc(adoc_filename, apparent_filename): with open(os.path.join(input_dir, adoc_filename)) as fh: ...
true
true
1c2aa7aee1b715fc825300cf9b47b11f544e204f
1,205
py
Python
openeogeotrellis/configparams.py
Open-EO/openeo-geopyspark-driver
afd5902f426d2aa456d70ed6f2d51b6907de1cab
[ "Apache-2.0" ]
12
2018-03-22T15:02:24.000Z
2022-03-30T20:13:29.000Z
openeogeotrellis/configparams.py
Open-EO/openeo-geopyspark-driver
afd5902f426d2aa456d70ed6f2d51b6907de1cab
[ "Apache-2.0" ]
116
2018-09-27T17:17:14.000Z
2022-03-30T18:32:29.000Z
openeogeotrellis/configparams.py
Open-EO/openeo-geopyspark-driver
afd5902f426d2aa456d70ed6f2d51b6907de1cab
[ "Apache-2.0" ]
3
2019-06-28T15:44:32.000Z
2021-10-30T07:05:54.000Z
import os from pprint import pformat class ConfigParams: def __init__(self, env=os.environ): self.zookeepernodes = env.get( "ZOOKEEPERNODES", 'epod-master1.vgt.vito.be:2181,epod-master2.vgt.vito.be:2181,epod-master3.vgt.vito.be:2181' ).split(',') self.batch_jobs_z...
37.65625
117
0.697095
import os from pprint import pformat class ConfigParams: def __init__(self, env=os.environ): self.zookeepernodes = env.get( "ZOOKEEPERNODES", 'epod-master1.vgt.vito.be:2181,epod-master2.vgt.vito.be:2181,epod-master3.vgt.vito.be:2181' ).split(',') self.batch_jobs_z...
true
true
1c2aa8c7d17fb1039877da6061acc87f80d0fbee
443
py
Python
eisenmann-backend/user/migrations/0004_auto_20220131_1157.py
RubenRodrigo/Eisenmann-Inventory
5abb59a11d43987db3d1742b6f0978c6aa6ee81d
[ "MIT" ]
null
null
null
eisenmann-backend/user/migrations/0004_auto_20220131_1157.py
RubenRodrigo/Eisenmann-Inventory
5abb59a11d43987db3d1742b6f0978c6aa6ee81d
[ "MIT" ]
null
null
null
eisenmann-backend/user/migrations/0004_auto_20220131_1157.py
RubenRodrigo/Eisenmann-Inventory
5abb59a11d43987db3d1742b6f0978c6aa6ee81d
[ "MIT" ]
null
null
null
# Generated by Django 3.2.5 on 2022-01-31 11:57 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('user', '0003_auto_20220131_1155'), ] operations = [ migrations.RemoveField( model_name='customuser', name='first_name', ...
20.136364
47
0.571106
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('user', '0003_auto_20220131_1155'), ] operations = [ migrations.RemoveField( model_name='customuser', name='first_name', ), migrations.RemoveField( ...
true
true
1c2aaab2ed329b6a9ee2423d313e33199a161625
38,585
py
Python
pds_pipelines/service_job_manager.py
amystamile-usgs/PDS-Pipelines
cdf5c03b08cf6c231117039ac44b8d78d98cd4c2
[ "Unlicense" ]
8
2019-04-18T01:41:26.000Z
2021-10-06T00:34:02.000Z
pds_pipelines/service_job_manager.py
amystamile-usgs/PDS-Pipelines
cdf5c03b08cf6c231117039ac44b8d78d98cd4c2
[ "Unlicense" ]
420
2018-03-07T02:02:41.000Z
2022-01-31T18:23:06.000Z
pds_pipelines/service_job_manager.py
amystamile-usgs/PDS-Pipelines
cdf5c03b08cf6c231117039ac44b8d78d98cd4c2
[ "Unlicense" ]
19
2018-03-13T19:52:04.000Z
2022-02-26T09:46:27.000Z
#!/usr/bin/env python import os import sys import pvl import lxml.etree as ET import logging import argparse import json from pds_pipelines.pds_db_query import PDS_DBquery from pds_pipelines.redis_queue import RedisQueue from pds_pipelines.redis_hash import RedisHash from pds_pipelines.recipe import Recipe from pds_p...
34.176262
138
0.54713
import os import sys import pvl import lxml.etree as ET import logging import argparse import json from pds_pipelines.pds_db_query import PDS_DBquery from pds_pipelines.redis_queue import RedisQueue from pds_pipelines.redis_hash import RedisHash from pds_pipelines.recipe import Recipe from pds_pipelines.process impo...
true
true
1c2aab37834e009fddc8f804342dc0cd10058e74
3,174
py
Python
consensus/fastpow/core/suomi_poet/poet_consensus/poet_enclave_factory.py
suomichain/suomi-core
dada0499ddc2b4b4a5d9a975de5af63b87ded9d2
[ "Apache-2.0" ]
28
2018-03-05T23:47:28.000Z
2018-03-15T12:34:46.000Z
consensus/fastpow/core/suomi_poet/poet_consensus/poet_enclave_factory.py
suomichain/suomi-core
dada0499ddc2b4b4a5d9a975de5af63b87ded9d2
[ "Apache-2.0" ]
null
null
null
consensus/fastpow/core/suomi_poet/poet_consensus/poet_enclave_factory.py
suomichain/suomi-core
dada0499ddc2b4b4a5d9a975de5af63b87ded9d2
[ "Apache-2.0" ]
1
2018-03-08T04:33:17.000Z
2018-03-08T04:33:17.000Z
# Copyright 2017 Suomi Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
39.185185
80
0.636106
import threading import importlib import logging from suomi_poet.poet_consensus.poet_settings_view import PoetSettingsView LOGGER = logging.getLogger(__name__) class PoetEnclaveFactory(object): _lock = threading.Lock() _poet_enclave_module = None @classmethod def get_poet_enclave_mo...
true
true
1c2aab60eda03e264e5c1f39137d03f1fc9af99d
4,264
py
Python
invenio_app_rdm/records_ui/views/filters.py
effervescent-shot/invenio-app-rdm
977f736041b02bfe30e7fa08060235298470a433
[ "MIT" ]
null
null
null
invenio_app_rdm/records_ui/views/filters.py
effervescent-shot/invenio-app-rdm
977f736041b02bfe30e7fa08060235298470a433
[ "MIT" ]
null
null
null
invenio_app_rdm/records_ui/views/filters.py
effervescent-shot/invenio-app-rdm
977f736041b02bfe30e7fa08060235298470a433
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright (C) 2019-2020 CERN. # Copyright (C) 2019-2020 Northwestern University. # Copyright (C) 2021 TU Wien. # # Invenio App RDM is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """Filters to be used i...
31.352941
77
0.67425
from operator import itemgetter from os.path import splitext import idutils from flask import current_app from invenio_previewer.views import is_previewable from invenio_rdm_records.resources.serializers import UIJSONSerializer from invenio_rdm_records.vocabularies import Vocabularies from invenio_records_fi...
true
true
1c2aab9cbb4071f50300e4e74cd118e634212fdd
28,062
py
Python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01/operations/_application_security_groups_operations.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
3
2020-06-23T02:25:27.000Z
2021-09-07T18:48:11.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01/operations/_application_security_groups_operations.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
510
2019-07-17T16:11:19.000Z
2021-08-02T08:38:32.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01/operations/_application_security_groups_operations.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
5
2019-09-04T12:51:37.000Z
2020-09-16T07:28:40.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
50.65343
219
0.674435
from typing import TYPE_CHECKING import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport impor...
true
true
1c2aac7806f6ed8f2f005273c3927539b6f75f7c
2,242
py
Python
hi_ur/tsv2html.py
cibu/language-resources
a6158942286112b2808460b2cdbcb03260e8879b
[ "Apache-2.0" ]
177
2019-05-31T17:58:29.000Z
2022-03-27T11:24:00.000Z
hi_ur/tsv2html.py
cibu/language-resources
a6158942286112b2808460b2cdbcb03260e8879b
[ "Apache-2.0" ]
21
2019-05-29T09:51:11.000Z
2021-12-08T01:54:13.000Z
hi_ur/tsv2html.py
cibu/language-resources
a6158942286112b2808460b2cdbcb03260e8879b
[ "Apache-2.0" ]
57
2015-09-28T12:05:27.000Z
2019-05-15T05:44:50.000Z
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
22.877551
77
0.668599
from __future__ import unicode_literals import re from utils import utf8 HEADER = r'''<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta charset="utf-8"> <style type="text/css"> @import url('https://fonts.googleapis.com/css?family=Vesper+Libre'); @i...
true
true
1c2aace276ff2b06a3f6c99cf3176154ee3a51e7
6,213
py
Python
third_party/mini_chromium/mini_chromium/build/find_mac_sdk.py
karoyqiu/crashpad
0517e0a2709352de995767f35106b3c932094bc6
[ "Apache-2.0" ]
175
2017-05-21T05:12:50.000Z
2022-03-21T02:06:51.000Z
third_party/mini_chromium/mini_chromium/build/find_mac_sdk.py
karoyqiu/crashpad
0517e0a2709352de995767f35106b3c932094bc6
[ "Apache-2.0" ]
113
2019-12-14T04:28:04.000Z
2021-09-26T18:40:27.000Z
third_party/mini_chromium/mini_chromium/build/find_mac_sdk.py
karoyqiu/crashpad
0517e0a2709352de995767f35106b3c932094bc6
[ "Apache-2.0" ]
65
2017-05-21T05:13:05.000Z
2021-12-18T05:35:42.000Z
#!/usr/bin/env python # coding: utf-8 # Copyright 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from __future__ import print_function import argparse import distutils.version import os import re import subprocess ...
37.654545
80
0.6554
from __future__ import print_function import argparse import distutils.version import os import re import subprocess import sys import textwrap def _AsVersion(string): return distutils.version.StrictVersion(string) def _RunXCRun(args, sdk=None): xcrun_args = ['xcrun'] if sdk is not None: xcrun_arg...
true
true
1c2aada379dbf076dfd205708d9fd7d20b93c21b
1,736
py
Python
setup.py
npelikan/clarify
2760b416209aa20c879e7ac4861a94cb3df55e30
[ "MIT" ]
null
null
null
setup.py
npelikan/clarify
2760b416209aa20c879e7ac4861a94cb3df55e30
[ "MIT" ]
null
null
null
setup.py
npelikan/clarify
2760b416209aa20c879e7ac4861a94cb3df55e30
[ "MIT" ]
null
null
null
#!/usr/bin/env python from setuptools import setup, find_packages # PyPI only supports nicely-formatted README files in reStructuredText. # GitHub and @dwillis prefer Markdown. Use a version of the pattern from # https://coderwall.com/p/qawuyq/use-markdown-readme-s-in-python-modules # to convert the Markdown README ...
32.754717
76
0.651498
from setuptools import setup, find_packages try: import pypandoc long_description = pypandoc.convert('README.md', 'rst') except (IOError, ImportError, OSError): long_description = open('README.md').read() exec(open('clarify/version.py').read()) setup( name='Clarify', version="0.1.0", ...
true
true
1c2aadcbff64820d3e388304824775a483f46ff0
5,641
py
Python
mpl_gui/_manage_backend.py
matplotlib/mpl-gui
5be9b47a6afb018e79c502e5c8c9211c3e04918b
[ "BSD-3-Clause" ]
null
null
null
mpl_gui/_manage_backend.py
matplotlib/mpl-gui
5be9b47a6afb018e79c502e5c8c9211c3e04918b
[ "BSD-3-Clause" ]
2
2022-02-11T15:35:56.000Z
2022-02-11T15:36:01.000Z
mpl_gui/_manage_backend.py
matplotlib/mpl-gui
5be9b47a6afb018e79c502e5c8c9211c3e04918b
[ "BSD-3-Clause" ]
null
null
null
import importlib import sys import logging import types from matplotlib import cbook, rcsetup from matplotlib import rcParams, rcParamsDefault import matplotlib.backend_bases _backend_mod = None _log = logging.getLogger(__name__) def current_backend_module(): """ Get the currently active backend module, s...
31.870056
81
0.604148
import importlib import sys import logging import types from matplotlib import cbook, rcsetup from matplotlib import rcParams, rcParamsDefault import matplotlib.backend_bases _backend_mod = None _log = logging.getLogger(__name__) def current_backend_module(): if _backend_mod is None: select_gui_toolki...
true
true
1c2aade6eaaf7cae9a6b574b0581f5acccbab983
904
py
Python
run.py
wu-2018/Interactome
1b3837a74dc7c3ecbf48fe4735963c352b434ece
[ "MIT" ]
8
2018-08-14T07:49:51.000Z
2020-09-30T20:07:03.000Z
run.py
wu-2018/Interactome
1b3837a74dc7c3ecbf48fe4735963c352b434ece
[ "MIT" ]
null
null
null
run.py
wu-2018/Interactome
1b3837a74dc7c3ecbf48fe4735963c352b434ece
[ "MIT" ]
1
2019-11-18T05:58:09.000Z
2019-11-18T05:58:09.000Z
import argparse import os parser = argparse.ArgumentParser(description="*****Welcome!*****") parser.add_argument('subcommand', choices=['start','stop'], help='start or stop') parser.add_argument('--port', type=int, nargs='*', default=[5006,8080], help='specify the ports') args ...
36.16
86
0.594027
import argparse import os parser = argparse.ArgumentParser(description="*****Welcome!*****") parser.add_argument('subcommand', choices=['start','stop'], help='start or stop') parser.add_argument('--port', type=int, nargs='*', default=[5006,8080], help='specify the ports') args ...
true
true
1c2aaeeff16797af6c82bda0c2c45e474b6b7c66
1,039
py
Python
doodle.py
mltrons-ai/mltrons-automl
dca0c0bd06c68e4b0a36f225280c1596dc8936da
[ "MIT" ]
null
null
null
doodle.py
mltrons-ai/mltrons-automl
dca0c0bd06c68e4b0a36f225280c1596dc8936da
[ "MIT" ]
6
2021-02-02T22:36:55.000Z
2022-03-12T00:24:13.000Z
doodle.py
mltrons-ai/mltrons-automl
dca0c0bd06c68e4b0a36f225280c1596dc8936da
[ "MIT" ]
1
2020-04-18T19:25:58.000Z
2020-04-18T19:25:58.000Z
import dask.dataframe as dd from handling_data.handling_data import HandlingData from automl.mltrons_automl import MltronsAutoml ddf = dd.read_csv("titanic.csv") target_variable = 'Survived' ml_auto = MltronsAutoml("Classification", target_variable) h = HandlingData(ddf,target_variable) # step 1 ddf_transform1, lst...
25.341463
104
0.81232
import dask.dataframe as dd from handling_data.handling_data import HandlingData from automl.mltrons_automl import MltronsAutoml ddf = dd.read_csv("titanic.csv") target_variable = 'Survived' ml_auto = MltronsAutoml("Classification", target_variable) h = HandlingData(ddf,target_variable) ddf_transform1, lst = h.spl...
true
true
1c2aaf1aee3aba725a49dd8b76f6a7262676634f
9,461
py
Python
pysmt/walkers/identitydag.py
keram88/pysmt
ecf4ea4c709df8e5f1f768820ac0f6f74803ab42
[ "Apache-2.0" ]
null
null
null
pysmt/walkers/identitydag.py
keram88/pysmt
ecf4ea4c709df8e5f1f768820ac0f6f74803ab42
[ "Apache-2.0" ]
null
null
null
pysmt/walkers/identitydag.py
keram88/pysmt
ecf4ea4c709df8e5f1f768820ac0f6f74803ab42
[ "Apache-2.0" ]
1
2019-11-13T00:36:59.000Z
2019-11-13T00:36:59.000Z
# # This file is part of pySMT. # # Copyright 2014 Andrea Micheli and Marco Gario # # 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 ...
35.302239
82
0.640524
from pysmt.walkers.dag import DagWalker class IdentityDagWalker(DagWalker): def __init__(self, env=None, invalidate_memoization=None): DagWalker.__init__(self, env=env, invalidate_memoization=invalidate_memoization) self.mgr = ...
true
true
1c2aaf70d6c8958fc78d46d27e378a3fdbb02439
1,462
py
Python
postprocessing.py
pukku/tiktok-rss-flat
803e4605cc0ec1e53daa8a18644093f43d3dbfc6
[ "Apache-2.0" ]
null
null
null
postprocessing.py
pukku/tiktok-rss-flat
803e4605cc0ec1e53daa8a18644093f43d3dbfc6
[ "Apache-2.0" ]
1
2021-10-02T22:06:39.000Z
2021-10-02T22:06:39.000Z
postprocessing.py
pukku/tiktok-rss-flat
803e4605cc0ec1e53daa8a18644093f43d3dbfc6
[ "Apache-2.0" ]
null
null
null
from TikTokApi import TikTokApi import csv from feedgen.feed import FeedGenerator from datetime import datetime, timezone # Normal GitHub Pages URL ghPagesURL = "https://pukku.github.io/tiktok-rss-flat/" api = TikTokApi.get_instance() count = 10 with open('subscriptions.csv') as f: cf = csv.DictRea...
34.809524
85
0.573187
from TikTokApi import TikTokApi import csv from feedgen.feed import FeedGenerator from datetime import datetime, timezone ghPagesURL = "https://pukku.github.io/tiktok-rss-flat/" api = TikTokApi.get_instance() count = 10 with open('subscriptions.csv') as f: cf = csv.DictReader(f, fieldnames=['userna...
true
true
1c2ab1abba99de539e9c8f13f7fd3a2f329b3266
8,780
py
Python
trainer.py
vineeths96/QSGD
e5b61b1ebfa4288c3c2a9109819b72c13a93b5f7
[ "MIT" ]
1
2021-12-06T18:51:26.000Z
2021-12-06T18:51:26.000Z
trainer.py
vineeths96/Gradient-Compression
e5b61b1ebfa4288c3c2a9109819b72c13a93b5f7
[ "MIT" ]
null
null
null
trainer.py
vineeths96/Gradient-Compression
e5b61b1ebfa4288c3c2a9109819b72c13a93b5f7
[ "MIT" ]
null
null
null
import os import datetime import argparse import numpy as np import torch import torch.optim as optim import torch.distributed as dist from model_dispatcher import CIFAR from reducer import ( NoneReducer, NoneAllReducer, QSGDReducer, QSGDWECReducer, QSGDWECModReducer, TernGradReducer, Tern...
35.836735
114
0.572893
import os import datetime import argparse import numpy as np import torch import torch.optim as optim import torch.distributed as dist from model_dispatcher import CIFAR from reducer import ( NoneReducer, NoneAllReducer, QSGDReducer, QSGDWECReducer, QSGDWECModReducer, TernGradReducer, Tern...
true
true
1c2ab3000447861c8ef656e9bce5a73fdd640bb0
928
py
Python
test.py
HanSeokhyeon/Spiking_neural_network_for_MNIST
2ea9477309c4758baf24d9ac18651037f6f7fab2
[ "MIT" ]
3
2019-09-27T10:04:40.000Z
2020-07-04T11:00:09.000Z
test.py
HanSeokhyeon/Spiking_neural_network_for_MNIST
2ea9477309c4758baf24d9ac18651037f6f7fab2
[ "MIT" ]
null
null
null
test.py
HanSeokhyeon/Spiking_neural_network_for_MNIST
2ea9477309c4758baf24d9ac18651037f6f7fab2
[ "MIT" ]
1
2019-09-02T06:19:58.000Z
2019-09-02T06:19:58.000Z
import numpy as np import os import matplotlib.pyplot as plt import SNN import data SAVE_PATH = os.getcwd() + '/weight_mnist' mnist = data.MNIST(path=["MNIST/t10k-images.idx3-ubyte", "MNIST/t10k-labels.idx1-ubyte"]) w1 = np.load(SAVE_PATH + '1.npy') w2 = np.load(SAVE_PATH + '2.npy') Ts = 1e-3 scale = 2 view_max = 2 ...
21.090909
89
0.645474
import numpy as np import os import matplotlib.pyplot as plt import SNN import data SAVE_PATH = os.getcwd() + '/weight_mnist' mnist = data.MNIST(path=["MNIST/t10k-images.idx3-ubyte", "MNIST/t10k-labels.idx1-ubyte"]) w1 = np.load(SAVE_PATH + '1.npy') w2 = np.load(SAVE_PATH + '2.npy') Ts = 1e-3 scale = 2 view_max = 2 ...
true
true
1c2ab410c1b1862336cbcf429abcf84c18f798f3
1,652
py
Python
model-optimizer/extensions/front/onnx/dequantize_linear_resolver.py
JOCh1958/openvino
070201feeec5550b7cf8ec5a0ffd72dc879750be
[ "Apache-2.0" ]
1
2021-04-06T03:32:12.000Z
2021-04-06T03:32:12.000Z
model-optimizer/extensions/front/onnx/dequantize_linear_resolver.py
JOCh1958/openvino
070201feeec5550b7cf8ec5a0ffd72dc879750be
[ "Apache-2.0" ]
28
2021-09-24T09:29:02.000Z
2022-03-28T13:20:46.000Z
model-optimizer/extensions/front/onnx/dequantize_linear_resolver.py
JOCh1958/openvino
070201feeec5550b7cf8ec5a0ffd72dc879750be
[ "Apache-2.0" ]
1
2021-08-18T14:29:37.000Z
2021-08-18T14:29:37.000Z
# Copyright (C) 2018-2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 from extensions.front.onnx.quantize_dequantize_linear import QuantizeDequantizeLinear from extensions.ops.Cast import Cast from extensions.ops.elementwise import Mul, Sub from mo.front.common.replacement import FrontReplacementOp from mo...
40.292683
100
0.693705
from extensions.front.onnx.quantize_dequantize_linear import QuantizeDequantizeLinear from extensions.ops.Cast import Cast from extensions.ops.elementwise import Mul, Sub from mo.front.common.replacement import FrontReplacementOp from mo.graph.graph import Graph, Node, rename_nodes from mo.middle.passes.convert_data...
true
true
1c2ab4a2b55d1cbca5425bbed4e0850ccdc2155e
3,916
py
Python
tests/tokamak/seoul/test.py
ggs134/py-evm
5ad87356181b03c14a2452131f50fe8762127c84
[ "MIT" ]
null
null
null
tests/tokamak/seoul/test.py
ggs134/py-evm
5ad87356181b03c14a2452131f50fe8762127c84
[ "MIT" ]
null
null
null
tests/tokamak/seoul/test.py
ggs134/py-evm
5ad87356181b03c14a2452131f50fe8762127c84
[ "MIT" ]
null
null
null
from eth_keys import keys from eth_utils import decode_hex, to_wei from eth_typing import Address from eth.consensus.pow import mine_pow_nonce from eth import constants, chains ## Seoul VM is used here from eth.vm.forks.seoul import SeoulVM from eth.db.atomic import AtomicDB GENESIS_PARAMS = { 'parent_hash': con...
29.89313
106
0.724719
from eth_keys import keys from eth_utils import decode_hex, to_wei from eth_typing import Address from eth.consensus.pow import mine_pow_nonce from eth import constants, chains l import SeoulVM from eth.db.atomic import AtomicDB GENESIS_PARAMS = { 'parent_hash': constants.GENESIS_PARENT_HASH, 'uncles_hash': ...
true
true
1c2ab738ce11577d9c67d4892896bb83a2988641
513
py
Python
tests/test_drivers/middleware.py
abnerjacobsen/apiwrappers
eb004fd86cbbc1d468030544472851a262b196dc
[ "MIT" ]
16
2020-01-07T23:09:11.000Z
2021-12-28T21:53:54.000Z
tests/test_drivers/middleware.py
abnerjacobsen/apiwrappers
eb004fd86cbbc1d468030544472851a262b196dc
[ "MIT" ]
57
2020-01-03T20:49:08.000Z
2022-01-15T15:30:00.000Z
tests/test_drivers/middleware.py
abnerjacobsen/apiwrappers
eb004fd86cbbc1d468030544472851a262b196dc
[ "MIT" ]
1
2021-12-28T21:54:11.000Z
2021-12-28T21:54:11.000Z
from apiwrappers import Request, Response from apiwrappers.middleware import BaseMiddleware class RequestMiddleware(BaseMiddleware): def process_request(self, request: Request) -> Request: request.headers = {"Request": "middleware"} return super().process_request(request) class ResponseMiddlewar...
34.2
63
0.744639
from apiwrappers import Request, Response from apiwrappers.middleware import BaseMiddleware class RequestMiddleware(BaseMiddleware): def process_request(self, request: Request) -> Request: request.headers = {"Request": "middleware"} return super().process_request(request) class ResponseMiddlewar...
true
true
1c2ab8cd0c1449c367bd3ef86e65b4777eb16aa4
16,855
py
Python
venv/Lib/site-packages/torch/nn/modules/transformer.py
countBMB/BenjiRepo
79d882263baaf2a11654ca67d2e5593074d36dfa
[ "Apache-2.0" ]
1
2020-02-24T06:23:07.000Z
2020-02-24T06:23:07.000Z
venv/Lib/site-packages/torch/nn/modules/transformer.py
countBMB/BenjiRepo
79d882263baaf2a11654ca67d2e5593074d36dfa
[ "Apache-2.0" ]
4
2021-06-02T00:49:27.000Z
2022-01-13T01:59:34.000Z
venv/Lib/site-packages/torch/nn/modules/transformer.py
countBMB/BenjiRepo
79d882263baaf2a11654ca67d2e5593074d36dfa
[ "Apache-2.0" ]
null
null
null
import torch import copy from .. import functional as F from .module import Module from .activation import MultiheadAttention from .container import ModuleList from ..init import xavier_uniform_ from .dropout import Dropout from .linear import Linear from .normalization import LayerNorm class Transformer(Module): ...
44.589947
111
0.652507
import torch import copy from .. import functional as F from .module import Module from .activation import MultiheadAttention from .container import ModuleList from ..init import xavier_uniform_ from .dropout import Dropout from .linear import Linear from .normalization import LayerNorm class Transformer(Module): ...
true
true
1c2ab99d0fba3398a620ec4d4d550d3c6663b5d0
764
py
Python
src/pretalx/api/views/room.py
lili668668/pretalx
5ba2185ffd7c5f95254aafe25ad3de340a86eadb
[ "Apache-2.0" ]
418
2017-10-05T05:52:49.000Z
2022-03-24T09:50:06.000Z
src/pretalx/api/views/room.py
AKJK-Internet-32002/pretalx
062177a8a361dd57a8889e2dd422beec505881a9
[ "Apache-2.0" ]
1,049
2017-09-16T09:34:55.000Z
2022-03-23T16:13:04.000Z
src/pretalx/api/views/room.py
AKJK-Internet-32002/pretalx
062177a8a361dd57a8889e2dd422beec505881a9
[ "Apache-2.0" ]
155
2017-10-16T18:32:01.000Z
2022-03-15T12:48:33.000Z
from rest_framework import pagination, viewsets from pretalx.api.serializers.room import RoomOrgaSerializer, RoomSerializer from pretalx.schedule.models import Room class RoomPagination(pagination.LimitOffsetPagination): default_limit = 100 class RoomViewSet(viewsets.ReadOnlyModelViewSet): queryset = Room....
31.833333
82
0.748691
from rest_framework import pagination, viewsets from pretalx.api.serializers.room import RoomOrgaSerializer, RoomSerializer from pretalx.schedule.models import Room class RoomPagination(pagination.LimitOffsetPagination): default_limit = 100 class RoomViewSet(viewsets.ReadOnlyModelViewSet): queryset = Room....
true
true
1c2aba47132bf16d0e618a8f92513e158503b991
1,679
py
Python
fastavro/__init__.py
jquast/fastavro
8ceb46d69428690f97f7e89ac320aa596595ae07
[ "MIT" ]
null
null
null
fastavro/__init__.py
jquast/fastavro
8ceb46d69428690f97f7e89ac320aa596595ae07
[ "MIT" ]
null
null
null
fastavro/__init__.py
jquast/fastavro
8ceb46d69428690f97f7e89ac320aa596595ae07
[ "MIT" ]
null
null
null
'''Fast Avro file iteration. Example usage:: # Reading import fastavro with open('some-file.avro', 'rb') as fo: reader = fastavro.reader(fo) schema = reader.schema for record in reader: process_record(record) # Writing from fastavro import writer schema...
26.234375
73
0.617034
__version_info__ = (0, 21, 10) __version__ = '%s.%s.%s' % __version_info__ import fastavro.read import fastavro.write import fastavro.schema import fastavro.validation reader = iter_avro = fastavro.read.reader block_reader = fastavro.read.block_reader schemaless_reader = fastavro.read.schemaless_reader writer = fas...
true
true
1c2aba80af8af892c509c3d4533a4116db48af8c
3,742
py
Python
third_party/test262-harness/src/parseTestRecord.py
bobbyLXArt/v8
4ed9d835b463ec5fb37f01b20f9ab8ad95d8b83b
[ "BSD-3-Clause" ]
9
2016-10-14T13:50:44.000Z
2022-01-11T06:18:43.000Z
third_party/test262-harness/src/parseTestRecord.py
Mohsenpoureiny/v8
5974242ae2141744091e5c6adcc95c8d9f6cee81
[ "BSD-3-Clause" ]
9
2016-10-20T08:14:09.000Z
2022-02-19T09:43:11.000Z
third_party/test262-harness/src/parseTestRecord.py
Mohsenpoureiny/v8
5974242ae2141744091e5c6adcc95c8d9f6cee81
[ "BSD-3-Clause" ]
9
2017-02-03T09:49:48.000Z
2022-03-24T02:23:40.000Z
#!/usr/bin/env python # Copyright 2011 by Google, Inc. All rights reserved. # This code is governed by the BSD license found in the LICENSE file. # TODO: resolve differences with common.py and unify into one file. from __future__ import print_function import os import re import imp from _monkeyYaml import load a...
32.824561
112
0.651523
from __future__ import print_function import os import re import imp from _monkeyYaml import load as yamlLoad _BLANK_LINES = r"([ \t]*[\r\n]{1,2})*" _YAML_PATTERN = re.compile(r"/\*---(.*)---\*/" + _BLANK_LINES, re.DOTALL) _LICENSE_PATTERN = re.compile( r'// Copyright( \([C]\))? (\w+) .+\. {1,2}A...
true
true
1c2abaf83899efef7349d33d9e938ccf74068a51
2,987
py
Python
tests/components/coolmaster/test_config_flow.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
22,481
2020-03-02T13:09:59.000Z
2022-03-31T23:34:28.000Z
tests/components/coolmaster/test_config_flow.py
jagadeeshvenkatesh/core
1bd982668449815fee2105478569f8e4b5670add
[ "Apache-2.0" ]
31,101
2020-03-02T13:00:16.000Z
2022-03-31T23:57:36.000Z
tests/components/coolmaster/test_config_flow.py
jagadeeshvenkatesh/core
1bd982668449815fee2105478569f8e4b5670add
[ "Apache-2.0" ]
11,411
2020-03-02T14:19:20.000Z
2022-03-31T22:46:07.000Z
"""Test the Coolmaster config flow.""" from unittest.mock import patch from homeassistant import config_entries from homeassistant.components.coolmaster.const import AVAILABLE_MODES, DOMAIN def _flow_data(): options = {"host": "1.1.1.1"} for mode in AVAILABLE_MODES: options[mode] = True return op...
30.793814
79
0.656177
from unittest.mock import patch from homeassistant import config_entries from homeassistant.components.coolmaster.const import AVAILABLE_MODES, DOMAIN def _flow_data(): options = {"host": "1.1.1.1"} for mode in AVAILABLE_MODES: options[mode] = True return options async def test_form(hass): ...
true
true
1c2abb38a57a83686e72700ddcf47daad3bbb502
3,937
py
Python
opennmt/layers/position.py
SamueLacombe/OpenNMT-tf
92c76d895ea9b226c74c9cd4cca9d6570d994634
[ "MIT" ]
null
null
null
opennmt/layers/position.py
SamueLacombe/OpenNMT-tf
92c76d895ea9b226c74c9cd4cca9d6570d994634
[ "MIT" ]
null
null
null
opennmt/layers/position.py
SamueLacombe/OpenNMT-tf
92c76d895ea9b226c74c9cd4cca9d6570d994634
[ "MIT" ]
null
null
null
"""Define position encoder classes.""" import math import abc import tensorflow as tf from opennmt.layers.reducer import SumReducer class PositionEncoder(tf.keras.layers.Layer): """Base class for position encoders.""" def __init__(self, reducer=None, **kwargs): """Initializes the position encoder....
35.151786
87
0.629667
import math import abc import tensorflow as tf from opennmt.layers.reducer import SumReducer class PositionEncoder(tf.keras.layers.Layer): def __init__(self, reducer=None, **kwargs): super().__init__(**kwargs) if reducer is None: reducer = SumReducer(dtype=kwargs.get("dtype")) ...
true
true
1c2abbe784d2f137615bae6b044a465c421bf87d
791
py
Python
phoenix/integration/migrations/0001_initial.py
kiwicom/phoenix
19bfbd23387e7d054780cfba9dbb385525aa7d80
[ "MIT" ]
8
2019-03-03T22:46:06.000Z
2021-12-14T20:26:28.000Z
phoenix/integration/migrations/0001_initial.py
kiwicom/phoenix
19bfbd23387e7d054780cfba9dbb385525aa7d80
[ "MIT" ]
250
2018-11-21T09:21:11.000Z
2021-09-22T17:48:07.000Z
phoenix/integration/migrations/0001_initial.py
kiwicom/phoenix
19bfbd23387e7d054780cfba9dbb385525aa7d80
[ "MIT" ]
1
2021-02-16T08:01:04.000Z
2021-02-16T08:01:04.000Z
# Generated by Django 2.0.5 on 2018-07-30 10:46 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [] operations = [ migrations.CreateModel( name="GoogleGroup", fields=[ ( "id...
25.516129
66
0.450063
from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [] operations = [ migrations.CreateModel( name="GoogleGroup", fields=[ ( "id", models.AutoField( ...
true
true
1c2abc0cba8c78af47c9c1bf5be57b6d33b962e9
1,389
py
Python
config.py
aambrioso1/alex_site
9d292ca4061603317e7ff0e9131e5249e8d0d9d7
[ "MIT" ]
null
null
null
config.py
aambrioso1/alex_site
9d292ca4061603317e7ff0e9131e5249e8d0d9d7
[ "MIT" ]
null
null
null
config.py
aambrioso1/alex_site
9d292ca4061603317e7ff0e9131e5249e8d0d9d7
[ "MIT" ]
null
null
null
import os basedir = os.path.abspath(os.path.dirname(__file__)) class Config: SECRET_KEY = os.environ.get('SECRET_KEY') or 'hard to guess string' MAIL_SERVER = os.environ.get('MAIL_SERVER', 'smtp.googlemail.com') MAIL_PORT = int(os.environ.get('MAIL_PORT', '587')) MAIL_USE_TLS = os.environ.get('MAIL_US...
29.553191
75
0.686105
import os basedir = os.path.abspath(os.path.dirname(__file__)) class Config: SECRET_KEY = os.environ.get('SECRET_KEY') or 'hard to guess string' MAIL_SERVER = os.environ.get('MAIL_SERVER', 'smtp.googlemail.com') MAIL_PORT = int(os.environ.get('MAIL_PORT', '587')) MAIL_USE_TLS = os.environ.get('MAIL_US...
true
true
1c2abc465e1a417e0c60d7032cb578a16292224e
2,281
py
Python
examples/python/testapp/server.py
sseeeff/a3s
0cdaefaf9742a226b7045478aa76f0c5fde54713
[ "Apache-2.0" ]
null
null
null
examples/python/testapp/server.py
sseeeff/a3s
0cdaefaf9742a226b7045478aa76f0c5fde54713
[ "Apache-2.0" ]
null
null
null
examples/python/testapp/server.py
sseeeff/a3s
0cdaefaf9742a226b7045478aa76f0c5fde54713
[ "Apache-2.0" ]
null
null
null
#!/bin/python from flask import Flask, request, Response, redirect from functools import wraps import requests app = Flask(__name__) # CORS(app) self_url = 'https://localhost:5000' a3s_url = 'https://127.0.0.1:44443' def authenticate(f): @wraps(f) def wrapper(*args, **kwargs): password = request.c...
24.265957
75
0.544936
from flask import Flask, request, Response, redirect from functools import wraps import requests app = Flask(__name__) self_url = 'https://localhost:5000' a3s_url = 'https://127.0.0.1:44443' def authenticate(f): @wraps(f) def wrapper(*args, **kwargs): password = request.cookies.get("x-a3s-token"...
true
true
1c2abd42ffa299efed459451f886fe466faf46b1
5,513
py
Python
piperine/tests/CRNImportTests.py
DNA-and-Natural-Algorithms-Group/piperine
40855414e709d38bd4b66436e1443b88c5aac34e
[ "MIT" ]
20
2017-07-05T17:15:34.000Z
2021-12-26T01:05:32.000Z
piperine/tests/CRNImportTests.py
DNA-and-Natural-Algorithms-Group/piperine
40855414e709d38bd4b66436e1443b88c5aac34e
[ "MIT" ]
2
2019-02-19T22:08:20.000Z
2019-07-18T11:02:21.000Z
piperine/tests/CRNImportTests.py
DNA-and-Natural-Algorithms-Group/piperine
40855414e709d38bd4b66436e1443b88c5aac34e
[ "MIT" ]
3
2017-08-05T06:39:36.000Z
2020-12-01T15:54:46.000Z
import unittest import sys from tempfile import mkstemp import os from ..designer import read_crn, get_parameters_from_crn_file from .. import Srinivas2017 as default_translation_scheme default_energyfuncs = default_translation_scheme.energetics.energyfuncs() class TestCRNImport(unittest.TestCase): def setUp(sel...
43.753968
122
0.569744
import unittest import sys from tempfile import mkstemp import os from ..designer import read_crn, get_parameters_from_crn_file from .. import Srinivas2017 as default_translation_scheme default_energyfuncs = default_translation_scheme.energetics.energyfuncs() class TestCRNImport(unittest.TestCase): def setUp(sel...
true
true
1c2abd7080eb0187e3debf5529f03ca978548991
1,016
bzl
Python
rules/bugfix.bzl
asb/opentitan
af68ff5041b10c81e97adc075a4d042f8ac7ab20
[ "Apache-2.0" ]
1,375
2019-11-05T15:11:00.000Z
2022-03-28T17:50:43.000Z
rules/bugfix.bzl
asb/opentitan
af68ff5041b10c81e97adc075a4d042f8ac7ab20
[ "Apache-2.0" ]
7,045
2019-11-05T16:05:45.000Z
2022-03-31T23:08:08.000Z
rules/bugfix.bzl
asb/opentitan
af68ff5041b10c81e97adc075a4d042f8ac7ab20
[ "Apache-2.0" ]
428
2019-11-05T15:00:20.000Z
2022-03-28T15:34:57.000Z
# Copyright lowRISC contributors. # Licensed under the Apache License, Version 2.0, see LICENSE for details. # SPDX-License-Identifier: Apache-2.0 def find_cc_toolchain(ctx): """ Returns the current `CcToolchainInfo`. Args: ctx: The rule context for which to find a toolchain. Returns: A C...
37.62963
146
0.725394
def find_cc_toolchain(ctx): if hasattr(cc_common, "is_cc_toolchain_resolution_enabled_do_not_use") and cc_common.is_cc_toolchain_resolution_enabled_do_not_use(ctx = ctx): if "@rules_cc//cc:toolchain_type" in ctx.toolchains: return ctx.toolchains["@rules_cc//cc:toolchain_type"] ...
true
true
1c2abe81ce3dbcce3842bc89de5ab58d5e3ccf6e
4,805
py
Python
source/ui/graphics/double_bar_chart.py
seemir/stressa
7c3b178cf13f74ee010dbd44ce99188de3862ef7
[ "MIT" ]
null
null
null
source/ui/graphics/double_bar_chart.py
seemir/stressa
7c3b178cf13f74ee010dbd44ce99188de3862ef7
[ "MIT" ]
337
2019-09-27T12:26:14.000Z
2022-03-31T04:13:04.000Z
source/ui/graphics/double_bar_chart.py
seemir/stressa
7c3b178cf13f74ee010dbd44ce99188de3862ef7
[ "MIT" ]
1
2019-11-08T13:40:30.000Z
2019-11-08T13:40:30.000Z
# -*- coding: utf-8 -*- """ Module containing logic for the DoubleBarChart """ __author__ = 'Samir Adrik' __email__ = 'samir.adrik@gmail.com' from numpy import arange, cumsum, asarray from pyqtgraph import BarGraphItem, PlotWidget, SignalProxy from source.util import Assertor from .double_cross_hair import Double...
37.834646
99
0.554422
__author__ = 'Samir Adrik' __email__ = 'samir.adrik@gmail.com' from numpy import arange, cumsum, asarray from pyqtgraph import BarGraphItem, PlotWidget, SignalProxy from source.util import Assertor from .double_cross_hair import DoubleCrossHair from .chart import Chart class DoubleBarChart(Chart): def __in...
true
true
1c2abee4cf825e910dfd978efd7f3af5fc0241f6
4,560
py
Python
platformlibs/json_data_handler.py
janselva/platform-libraries
c795551375430156ddb07b8b646d2b653c8dfa93
[ "Apache-2.0" ]
null
null
null
platformlibs/json_data_handler.py
janselva/platform-libraries
c795551375430156ddb07b8b646d2b653c8dfa93
[ "Apache-2.0" ]
null
null
null
platformlibs/json_data_handler.py
janselva/platform-libraries
c795551375430156ddb07b8b646d2b653c8dfa93
[ "Apache-2.0" ]
null
null
null
""" Copyright (c) 2016 Cisco and/or its affiliates. This software is licensed to you under the terms of the Apache License, Version 2.0 (the "License"). You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 The code, technical concepts, and all information contained herein, are the property...
34.80916
110
0.55943
import json from platformlibs.common_helpers import flatten_dict from platformlibs.data_handler import DataHandler class JsonDataHandler(DataHandler): def __init__(self, spark_context, datasource, path, isTopic=False): DataHandler.__init__...
true
true
1c2abf707f5f1a37fb0f31885be1874aee9be93a
275
py
Python
tango_project/rango/tests.py
JMJAC/Rango
018cef9136802391b823ba60e3526f985736dd9e
[ "Apache-2.0" ]
null
null
null
tango_project/rango/tests.py
JMJAC/Rango
018cef9136802391b823ba60e3526f985736dd9e
[ "Apache-2.0" ]
null
null
null
tango_project/rango/tests.py
JMJAC/Rango
018cef9136802391b823ba60e3526f985736dd9e
[ "Apache-2.0" ]
null
null
null
from django.test import TestCase from rango.models import Category class CategoryMethodTests(TestCase): def test_slug_line_creation(self): cat = Category(name='Random Name', views=0, likes=0) cat.save() self.assertEqual(cat.slug, 'random-name')
27.5
60
0.709091
from django.test import TestCase from rango.models import Category class CategoryMethodTests(TestCase): def test_slug_line_creation(self): cat = Category(name='Random Name', views=0, likes=0) cat.save() self.assertEqual(cat.slug, 'random-name')
true
true
1c2abfb3cb485e7ef4e4d390f8c320c589a89c7b
9,247
py
Python
openshift/client/models/v1_exec_new_pod_hook.py
flaper87/openshift-restclient-python
13d5d86ca89035b9f596032e7a34f3cc33bf8f18
[ "Apache-2.0" ]
null
null
null
openshift/client/models/v1_exec_new_pod_hook.py
flaper87/openshift-restclient-python
13d5d86ca89035b9f596032e7a34f3cc33bf8f18
[ "Apache-2.0" ]
null
null
null
openshift/client/models/v1_exec_new_pod_hook.py
flaper87/openshift-restclient-python
13d5d86ca89035b9f596032e7a34f3cc33bf8f18
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ OpenShift API (with Kubernetes) OpenShift provides builds, application lifecycle, image content management, and administrative policy on top of Kubernetes. The API allows consistent management of those objects. All API operations are authenticated via an Authorization bearer token that is...
46.235
3,330
0.66335
from pprint import pformat from six import iteritems import re class V1ExecNewPodHook(object): def __init__(self, command=None, container_name=None, env=None, volumes=None): self.swagger_types = { 'command': 'list[str]', 'container_name': 'str', 'env': 'list[V1EnvVa...
true
true
1c2ac124ea4ce3c632bf592f3e22c7e9c2d2bdb8
53,687
py
Python
sem_tasks/segmentation/specialized.py
chasejohnson3/BRAINSPydra
8d3984f78c807283d182b624ed671b11d38bf82b
[ "Apache-2.0" ]
null
null
null
sem_tasks/segmentation/specialized.py
chasejohnson3/BRAINSPydra
8d3984f78c807283d182b624ed671b11d38bf82b
[ "Apache-2.0" ]
null
null
null
sem_tasks/segmentation/specialized.py
chasejohnson3/BRAINSPydra
8d3984f78c807283d182b624ed671b11d38bf82b
[ "Apache-2.0" ]
null
null
null
""" Autogenerated file - DO NOT EDIT If you spot a bug, please report it on the mailing list and/or change the generator. """ import attr from nipype.interfaces.base import ( Directory, File, InputMultiPath, OutputMultiPath, traits, ) from pydra import ShellCommandTask from pydra.engine.specs impor...
41.553406
668
0.430439
import attr from nipype.interfaces.base import ( Directory, File, InputMultiPath, OutputMultiPath, traits, ) from pydra import ShellCommandTask from pydra.engine.specs import ( SpecInfo, ShellSpec, MultiInputFile, MultiOutputFile, MultiInputObj, ) import pydra class BRAINSABC:...
true
true
1c2ac1529c8db345b9575535fe79161cd6541a18
4,690
py
Python
reana_workflow_controller/utils.py
dprelipcean/reana-workflow-controller
5d011444c4f9b22e1a089afd22767bdea69283d7
[ "MIT" ]
null
null
null
reana_workflow_controller/utils.py
dprelipcean/reana-workflow-controller
5d011444c4f9b22e1a089afd22767bdea69283d7
[ "MIT" ]
null
null
null
reana_workflow_controller/utils.py
dprelipcean/reana-workflow-controller
5d011444c4f9b22e1a089afd22767bdea69283d7
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # This file is part of REANA. # Copyright (C) 2017, 2018 CERN. # # REANA is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """Workflow persistence management.""" import os from pathlib import Path import fs fro...
35.801527
75
0.653945
import os from pathlib import Path import fs from flask import current_app as app from git import Repo from reana_commons.config import REANA_WORKFLOW_UMASK from reana_commons.k8s.secrets import REANAUserSecretsStore from reana_db.database import Session from reana_db.models import Job, JobCache from reana_wo...
true
true
1c2ac18cf29db1c4fdedec0d89e51dd5b12e10ae
34,759
py
Python
boreas/process.py
pmmilani/boreas
e422b44236774d98bbf96f861dcc72e9e86d7b83
[ "Apache-2.0" ]
2
2020-07-21T10:06:18.000Z
2021-06-03T18:45:14.000Z
boreas/process.py
pmmilani/boreas
e422b44236774d98bbf96f861dcc72e9e86d7b83
[ "Apache-2.0" ]
null
null
null
boreas/process.py
pmmilani/boreas
e422b44236774d98bbf96f861dcc72e9e86d7b83
[ "Apache-2.0" ]
1
2020-07-21T10:06:25.000Z
2020-07-21T10:06:25.000Z
#----------------------------------- processing.py -------------------------------------# """ This file contains utility functions to process a case into useful quantities (stored in numpy arrays). These include calculating features, Pr_t, should_use, etc. """ # ------------ Import statements import tecplot i...
47.291156
102
0.607353
import tecplot import timeit import numpy as np import joblib from tqdm import tqdm from boreas import constants def calcInvariants(S, R, gradT, with_tensor_basis=False, reduced=True): S2 = np.linalg.multi_dot([S, S]) R2 = np.linalg.multi_dot([R, R]) S_R2 = np.linalg.multi_dot([S, R2])...
true
true
1c2ac22b1e9f993004bfaac6846fabf3aa50017c
6,405
py
Python
smartsim/settings/alpsSettings.py
billschereriii/SmartSim
7ef4cffeba23fe19b931bdae819f4de99bb112a3
[ "BSD-2-Clause" ]
null
null
null
smartsim/settings/alpsSettings.py
billschereriii/SmartSim
7ef4cffeba23fe19b931bdae819f4de99bb112a3
[ "BSD-2-Clause" ]
null
null
null
smartsim/settings/alpsSettings.py
billschereriii/SmartSim
7ef4cffeba23fe19b931bdae819f4de99bb112a3
[ "BSD-2-Clause" ]
null
null
null
# BSD 2-Clause License # # Copyright (c) 2021-2022, Hewlett Packard Enterprise # 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...
35.983146
83
0.616081
from .base import RunSettings from ..error import SSUnsupportedError class AprunSettings(RunSettings): def __init__(self, exe, exe_args=None, run_args=None, env_vars=None, **kwargs): super().__init__( exe, exe_args, run_command="aprun", ...
true
true
1c2ac34e1b501d65bba35a1ec4daa67f1d6ea618
14,377
py
Python
python/paddle/fluid/tests/unittests/dygraph_to_static/test_declarative.py
tangzhiyi11/Paddle
790cadd1f06fabeadc4b9aeca5622ea50985b990
[ "Apache-2.0" ]
2
2020-10-14T13:05:51.000Z
2021-12-27T02:52:02.000Z
python/paddle/fluid/tests/unittests/dygraph_to_static/test_declarative.py
tangzhiyi11/Paddle
790cadd1f06fabeadc4b9aeca5622ea50985b990
[ "Apache-2.0" ]
null
null
null
python/paddle/fluid/tests/unittests/dygraph_to_static/test_declarative.py
tangzhiyi11/Paddle
790cadd1f06fabeadc4b9aeca5622ea50985b990
[ "Apache-2.0" ]
2
2021-03-10T08:05:40.000Z
2021-03-11T14:30:14.000Z
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
34.811138
104
0.594143
import numpy as np import unittest import paddle import paddle.fluid as fluid from paddle.static import InputSpec from paddle.fluid.dygraph import to_variable, declarative, ProgramTranslator, Layer, jit from paddle.fluid.dygraph.dygraph_to_static.program_translator import ConcreteProgram, StaticFunction ...
true
true
1c2ac3bd69f244a11b296d448cabd6429111bfdd
484
py
Python
jill/__main__.py
melonedo/jill.py
75810178427383516d8382587a4024fd611e7140
[ "MIT" ]
null
null
null
jill/__main__.py
melonedo/jill.py
75810178427383516d8382587a4024fd611e7140
[ "MIT" ]
null
null
null
jill/__main__.py
melonedo/jill.py
75810178427383516d8382587a4024fd611e7140
[ "MIT" ]
null
null
null
from .download import download_package from .install import install_julia from .utils import show_upstream from .mirror import mirror import fire import logging import os def main(): logging.basicConfig(filename=os.devnull, level=logging.DEBUG) fire.Fire({ 'download': download...
20.166667
44
0.659091
from .download import download_package from .install import install_julia from .utils import show_upstream from .mirror import mirror import fire import logging import os def main(): logging.basicConfig(filename=os.devnull, level=logging.DEBUG) fire.Fire({ 'download': download...
true
true
1c2ac3e8d16825de54537d0791d62d55addff784
57,181
py
Python
pypy/lib-python/3/xml/etree/ElementTree.py
Clear-Sight/cython-vs-pypy-performance
a81df5e1dbc115468ddfd60670ddfad448a5c992
[ "MIT" ]
null
null
null
pypy/lib-python/3/xml/etree/ElementTree.py
Clear-Sight/cython-vs-pypy-performance
a81df5e1dbc115468ddfd60670ddfad448a5c992
[ "MIT" ]
null
null
null
pypy/lib-python/3/xml/etree/ElementTree.py
Clear-Sight/cython-vs-pypy-performance
a81df5e1dbc115468ddfd60670ddfad448a5c992
[ "MIT" ]
null
null
null
"""Lightweight XML support for Python. XML is an inherently hierarchical data format, and the most natural way to represent it is with a tree. This module has two classes for this purpose: 1. ElementTree represents the whole XML document as a tree and 2. Element represents a single node in this tree. In...
34.425647
79
0.58091
__all__ = [ "Comment", "dump", "Element", "ElementTree", "fromstring", "fromstringlist", "iselement", "iterparse", "parse", "ParseError", "PI", "ProcessingInstruction", "QName", "SubElement", "tostring", "tostringlist", "TreeBuilder"...
true
true