hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 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
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f7fd9571c1ea46ab8032fc16bb1afb0ea68e13c1
943
py
Python
gans/experiments/emnist/preprocessing/filtered_emnist_data_utils_test.py
garyxcheng/federated
ba7133ead6127af71ea9356e26bfd05c02f8324a
[ "Apache-2.0" ]
330
2020-09-14T23:10:16.000Z
2022-03-30T19:49:19.000Z
gans/experiments/emnist/preprocessing/filtered_emnist_data_utils_test.py
garyxcheng/federated
ba7133ead6127af71ea9356e26bfd05c02f8324a
[ "Apache-2.0" ]
52
2020-09-30T06:10:51.000Z
2022-03-31T19:25:16.000Z
gans/experiments/emnist/preprocessing/filtered_emnist_data_utils_test.py
garyxcheng/federated
ba7133ead6127af71ea9356e26bfd05c02f8324a
[ "Apache-2.0" ]
119
2020-09-24T04:54:46.000Z
2022-03-31T21:46:57.000Z
# Copyright 2021, Google LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
32.517241
76
0.778367
import tensorflow as tf from gans.experiments.emnist.preprocessing import filtered_emnist_data_utils class FilteredEmnistDataUtilsTest(tf.test.TestCase): def test_get_filtered_client_data_for_training(self): filtered_emnist_data_utils.get_filtered_client_data_for_training( None, None, ba...
true
true
f7fd95c4fa958dae0d1b4c43138630a897afb4e9
4,645
py
Python
python3/erfr-keygen.py
urbanware-org/erfr
3f82f42092923b6f03597a54a4d3a8e1cb771d61
[ "MIT" ]
2
2018-04-20T20:13:25.000Z
2018-06-18T18:37:16.000Z
python3/erfr-keygen.py
urbanware-org/erfr
3f82f42092923b6f03597a54a4d3a8e1cb771d61
[ "MIT" ]
null
null
null
python3/erfr-keygen.py
urbanware-org/erfr
3f82f42092923b6f03597a54a4d3a8e1cb771d61
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # ============================================================================ # Erfr - One-time pad encryption tool # Key Generator script # Copyright (C) 2018 by Ralf Kilian # Distributed under the MIT License (https://opensource.org/licenses/MIT) # # Website: http://ww...
38.708333
78
0.54704
import os import sys def main(): from core import clap from core import common from core import keyfile from datetime import datetime as dt try: p = clap.Parser() except Exception as e: print("%s: error: %s" % (os.path.basename(sys.argv[0]), e)) sys.exit(1)...
true
true
f7fd95cc368ddbd403306e4b95518d6b994b0ad0
984
py
Python
django_event_store/client.py
Magni77/django-event-store
cc52d4748fced42df0cc49f8a4f72368595809df
[ "MIT" ]
4
2021-11-24T20:51:11.000Z
2021-11-25T15:37:38.000Z
django_event_store/client.py
mgodkowicz/django-event-store
cc52d4748fced42df0cc49f8a4f72368595809df
[ "MIT" ]
1
2021-11-25T08:15:37.000Z
2021-11-25T08:15:37.000Z
django_event_store/client.py
mgodkowicz/django-event-store
cc52d4748fced42df0cc49f8a4f72368595809df
[ "MIT" ]
null
null
null
from datetime import datetime from typing import Callable, Optional from django_event_store.event_repository import DjangoEventRepository from event_store import Client as EsClient from event_store import Dispatcher, EventsRepository, Subscriptions from event_store.dispatcher import DispatcherBase from event_store.map...
35.142857
69
0.723577
from datetime import datetime from typing import Callable, Optional from django_event_store.event_repository import DjangoEventRepository from event_store import Client as EsClient from event_store import Dispatcher, EventsRepository, Subscriptions from event_store.dispatcher import DispatcherBase from event_store.map...
true
true
f7fd962d4d49ee1ab3ab47e910296055c7268246
64,380
py
Python
python/ccxt/kraken.py
jknight/ccxt
02cdef0247435a6c6557faad8a1793d3da67c085
[ "MIT" ]
null
null
null
python/ccxt/kraken.py
jknight/ccxt
02cdef0247435a6c6557faad8a1793d3da67c085
[ "MIT" ]
null
null
null
python/ccxt/kraken.py
jknight/ccxt
02cdef0247435a6c6557faad8a1793d3da67c085
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.base.exchange import Exchange # ----------------------------------------------------------------------------- try: basestri...
40.439698
288
0.466511
ge import Exchange try: basestring except NameError: basestring = str import base64 import hashlib import math from ccxt.base.errors import ExchangeError from ccxt.base.errors import AuthenticationError from ccxt.base.errors import PermissionDenied from ccxt.base.errors import ArgumentsRequired from c...
true
true
f7fd96bb420b56fde26a6d4a501e4af400790593
1,390
py
Python
01_versoes_pacotes_pip/async_api_calls/version_checker/main.py
fernandosavio/hackatombo
9ef412b976c34c3cbd075b512a3bfcafd86b4d98
[ "MIT" ]
null
null
null
01_versoes_pacotes_pip/async_api_calls/version_checker/main.py
fernandosavio/hackatombo
9ef412b976c34c3cbd075b512a3bfcafd86b4d98
[ "MIT" ]
null
null
null
01_versoes_pacotes_pip/async_api_calls/version_checker/main.py
fernandosavio/hackatombo
9ef412b976c34c3cbd075b512a3bfcafd86b4d98
[ "MIT" ]
null
null
null
import argparse from . import __version__ from .parser import Package def get_options(): """ Faz o parsing dos argumentos recebidos pela linha de comando. Docs: https://docs.python.org/3.9/library/argparse.html Tutorial: https://docs.python.org/3.9/howto/argparse.html """ parser = argparse.A...
27.254902
86
0.585612
import argparse from . import __version__ from .parser import Package def get_options(): parser = argparse.ArgumentParser( prog='version_checker', description=''' Reads package version from a requirements-like text file and check on PyPI if there is a newer version for ea...
true
true
f7fd96d979ac2ea3fa118ca31f4b62a0b3f2438f
3,832
py
Python
progentrl/gen_rl.py
icyray/proGENTRL
c48305c3411ecb604c4f26f5e6b62f285e42e696
[ "MIT" ]
1
2022-01-07T13:39:10.000Z
2022-01-07T13:39:10.000Z
progentrl/gen_rl.py
christofer-f/proGENTRL
c48305c3411ecb604c4f26f5e6b62f285e42e696
[ "MIT" ]
null
null
null
progentrl/gen_rl.py
christofer-f/proGENTRL
c48305c3411ecb604c4f26f5e6b62f285e42e696
[ "MIT" ]
1
2021-08-30T05:47:29.000Z
2021-08-30T05:47:29.000Z
import os import torch import torch.nn as nn import torch.optim as optim from torch.utils.data import Dataset, DataLoader from math import pi, log from .lp import LP from .utils import save, load import joblib from collections import OrderedDict from moses.metrics.utils import get_mol import pytorch_lightning as pl ...
29.705426
75
0.566545
import os import torch import torch.nn as nn import torch.optim as optim from torch.utils.data import Dataset, DataLoader from math import pi, log from .lp import LP from .utils import save, load import joblib from collections import OrderedDict from moses.metrics.utils import get_mol import pytorch_lightning as pl ...
true
true
f7fd9746661308c0bd6cfaea0565773212bb6d9c
41,244
py
Python
MicroPythonPkg/MicroPythonDxe/Lib/Uefi/smbios.py
curtisrlee/edk2-staging
26f310d39e8dcb4fdfb6cb205f1430977dbbc366
[ "BSD-2-Clause" ]
null
null
null
MicroPythonPkg/MicroPythonDxe/Lib/Uefi/smbios.py
curtisrlee/edk2-staging
26f310d39e8dcb4fdfb6cb205f1430977dbbc366
[ "BSD-2-Clause" ]
null
null
null
MicroPythonPkg/MicroPythonDxe/Lib/Uefi/smbios.py
curtisrlee/edk2-staging
26f310d39e8dcb4fdfb6cb205f1430977dbbc366
[ "BSD-2-Clause" ]
null
null
null
## @file # Definitions of SMBIOS standard. # # Copyright (c) 2018, Intel Corporation. All rights reserved.<BR> # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may ...
34.199005
117
0.500242
from _uefi import * from ucollections import OrderedDict from protocols import * import uefi SMBIOS_STRUCTURE = OrderedDict(( ("Type", 'B'), ("Length", 'B'), ("Handle", 'H') )) EFI_SMBIOS_PROTOCOL = OrderedDict(( ("Add", 'FE(PO#EFI_SMBIOS_PROTOCOL,T,PH,PO#SMBIOS_STRUCT...
true
true
f7fd97803538e02e683e7c280d66d692a0f79aa0
728
py
Python
pearl/nacre/handle.py
dynosaur72/pearl
5fe929f9feabb91d4e183aea8b8908380fad3208
[ "MIT" ]
11
2017-11-24T02:19:18.000Z
2021-08-24T21:00:45.000Z
pearl/nacre/handle.py
dynosaur72/pearl
5fe929f9feabb91d4e183aea8b8908380fad3208
[ "MIT" ]
8
2017-11-23T20:24:41.000Z
2020-03-06T20:29:43.000Z
pearl/nacre/handle.py
dynosaur72/pearl
5fe929f9feabb91d4e183aea8b8908380fad3208
[ "MIT" ]
15
2017-11-23T20:08:09.000Z
2020-06-18T21:53:24.000Z
import re import hangups def isEventNotification(update): if update.event_notification: return True return False def isMessageEvent(update): if isEventNotification(update): event = update.event_notification.event if event.event_type == hangups.hangouts_pb2.EVENT_TYPE_REGULAR_CHAT_MESSAGE: return True re...
28
92
0.822802
import re import hangups def isEventNotification(update): if update.event_notification: return True return False def isMessageEvent(update): if isEventNotification(update): event = update.event_notification.event if event.event_type == hangups.hangouts_pb2.EVENT_TYPE_REGULAR_CHAT_MESSAGE: return True re...
true
true
f7fd97d1bbd762598167b0efb2e5645c5f7b4642
1,245
py
Python
model-optimizer/mo/front/kaldi/extractors/elementwise_component_ext.py
Andruxin52rus/openvino
d824e371fe7dffb90e6d3d58e4e34adecfce4606
[ "Apache-2.0" ]
2
2020-11-18T14:14:06.000Z
2020-11-28T04:55:57.000Z
model-optimizer/mo/front/kaldi/extractors/elementwise_component_ext.py
Andruxin52rus/openvino
d824e371fe7dffb90e6d3d58e4e34adecfce4606
[ "Apache-2.0" ]
30
2020-11-13T11:44:07.000Z
2022-02-21T13:03:16.000Z
model-optimizer/mo/front/kaldi/extractors/elementwise_component_ext.py
mmakridi/openvino
769bb7709597c14debdaa356dd60c5a78bdfa97e
[ "Apache-2.0" ]
3
2021-03-09T08:27:29.000Z
2021-04-07T04:58:54.000Z
""" Copyright (C) 2018-2020 Intel 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 i...
32.763158
73
0.727711
from mo.front.extractor import FrontExtractorOp from mo.front.kaldi.utils import read_token_value from mo.ops.eltwise_ninputs_in_1 import EltwiseNin1 class ElementwiseProductComponentFrontExtractor(FrontExtractorOp): op = 'elementwiseproductcomponent' enabled = True @classmethod def extract(cls, node...
true
true
f7fd97d7349167e4069b5e2cce8d20b8cdfac5d2
4,185
py
Python
src/collector.py
migvanderlei/dataset-parser
b6febccbdc829737e50640d980b2034d2c54c95a
[ "MIT" ]
null
null
null
src/collector.py
migvanderlei/dataset-parser
b6febccbdc829737e50640d980b2034d2c54c95a
[ "MIT" ]
null
null
null
src/collector.py
migvanderlei/dataset-parser
b6febccbdc829737e50640d980b2034d2c54c95a
[ "MIT" ]
null
null
null
import os import json import logging from pandas import json_normalize from src.configurable import Configurable from datetime import datetime from glob import glob from concurrent.futures import ThreadPoolExecutor, as_completed class Collector(Configurable): def __init__(self, input_path=None, output_file="colle...
38.394495
121
0.621983
import os import json import logging from pandas import json_normalize from src.configurable import Configurable from datetime import datetime from glob import glob from concurrent.futures import ThreadPoolExecutor, as_completed class Collector(Configurable): def __init__(self, input_path=None, output_file="colle...
true
true
f7fd9851fc9c05dde5a5ce02508213ae080f0bb0
466
py
Python
ngn/resources/state.py
hodgestar/banjo
a168efff6f1660bba964bf652aae821607d2643c
[ "MIT" ]
null
null
null
ngn/resources/state.py
hodgestar/banjo
a168efff6f1660bba964bf652aae821607d2643c
[ "MIT" ]
null
null
null
ngn/resources/state.py
hodgestar/banjo
a168efff6f1660bba964bf652aae821607d2643c
[ "MIT" ]
null
null
null
""" A resource for holding game state. """ from .base import Resource, ResourceEvent class StateResource(Resource): """ A resource for holding game state. """ name = 'state' def __init__(self): self.state = {} self.state['ngn'] = { 'fps': 0.0, } def apply_set_eve...
20.26087
46
0.585837
from .base import Resource, ResourceEvent class StateResource(Resource): name = 'state' def __init__(self): self.state = {} self.state['ngn'] = { 'fps': 0.0, } def apply_set_event(self, **kw): self.state.update(kw) class StateUpdate(ResourceEvent): reso...
true
true
f7fd9894e47f4c8c58c553cb352b0ea11e25e59a
200
py
Python
day02/test13.py
liuweidongg/dejin
12240b9d27347d6e041338869591aa7133bf80cd
[ "Apache-2.0" ]
1
2018-09-27T02:01:38.000Z
2018-09-27T02:01:38.000Z
day02/test13.py
liuweidongg/dejin
12240b9d27347d6e041338869591aa7133bf80cd
[ "Apache-2.0" ]
null
null
null
day02/test13.py
liuweidongg/dejin
12240b9d27347d6e041338869591aa7133bf80cd
[ "Apache-2.0" ]
null
null
null
kg1,jq1 = eval(raw_input(">>")) kg2,jq2 = eval(raw_input(">>")) dj1 = jq1/kg1 dj2 = jq2/kg2 if dj1 > dj2: print("Package 2 has the better price") else: print("Package 1 has the better price")
22.222222
43
0.64
kg1,jq1 = eval(raw_input(">>")) kg2,jq2 = eval(raw_input(">>")) dj1 = jq1/kg1 dj2 = jq2/kg2 if dj1 > dj2: print("Package 2 has the better price") else: print("Package 1 has the better price")
true
true
f7fd9936776797c37b889b257034f33f0ecaec9c
2,833
py
Python
PhysicsTools/NanoAOD/python/globals_cff.py
Purva-Chaudhari/cmssw
32e5cbfe54c4d809d60022586cf200b7c3020bcf
[ "Apache-2.0" ]
852
2015-01-11T21:03:51.000Z
2022-03-25T21:14:00.000Z
PhysicsTools/NanoAOD/python/globals_cff.py
Purva-Chaudhari/cmssw
32e5cbfe54c4d809d60022586cf200b7c3020bcf
[ "Apache-2.0" ]
30,371
2015-01-02T00:14:40.000Z
2022-03-31T23:26:05.000Z
PhysicsTools/NanoAOD/python/globals_cff.py
Purva-Chaudhari/cmssw
32e5cbfe54c4d809d60022586cf200b7c3020bcf
[ "Apache-2.0" ]
3,240
2015-01-02T05:53:18.000Z
2022-03-31T17:24:21.000Z
import FWCore.ParameterSet.Config as cms from PhysicsTools.NanoAOD.common_cff import * rhoTable = cms.EDProducer("GlobalVariablesTableProducer", variables = cms.PSet( fixedGridRhoFastjetAll = ExtVar( cms.InputTag("fixedGridRhoFastjetAll"), "double", doc = "rho from all PF Candidates, used e.g. for JECs" ),...
65.883721
228
0.676315
import FWCore.ParameterSet.Config as cms from PhysicsTools.NanoAOD.common_cff import * rhoTable = cms.EDProducer("GlobalVariablesTableProducer", variables = cms.PSet( fixedGridRhoFastjetAll = ExtVar( cms.InputTag("fixedGridRhoFastjetAll"), "double", doc = "rho from all PF Candidates, used e.g. for JECs" ),...
true
true
f7fd9aeef918f4ae3dffe14b1cf95b479a5a7ed2
1,599
py
Python
tests/test_calculation.py
esak21/learnapi_beginners
2a80fbfe98eedcb08528c211a90b76d08628be95
[ "Apache-2.0" ]
null
null
null
tests/test_calculation.py
esak21/learnapi_beginners
2a80fbfe98eedcb08528c211a90b76d08628be95
[ "Apache-2.0" ]
null
null
null
tests/test_calculation.py
esak21/learnapi_beginners
2a80fbfe98eedcb08528c211a90b76d08628be95
[ "Apache-2.0" ]
null
null
null
import pytest from app.calculation import add , sub, mul, div, BankAccount, InsufficientFund ## Creating a Fixture for our Bank account class @pytest.fixture def zero_bank_account(): return BankAccount() @pytest.fixture def bank_account(): return BankAccount(50) @pytest.mark.parametrize( "num1, num2, r...
22.208333
78
0.707942
import pytest from app.calculation import add , sub, mul, div, BankAccount, InsufficientFund eturn BankAccount() @pytest.fixture def bank_account(): return BankAccount(50) @pytest.mark.parametrize( "num1, num2, result", [ (3,3,6), (4,2,6), (4,5,9), (1,3,4) ] ) def test_add(num1, num2,resul...
true
true
f7fd9b5849162b9798e259ab506444fc52abbb48
264
py
Python
output/models/nist_data/atomic/g_year/schema_instance/nistschema_sv_iv_atomic_g_year_max_exclusive_2_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
1
2021-08-14T17:59:21.000Z
2021-08-14T17:59:21.000Z
output/models/nist_data/atomic/g_year/schema_instance/nistschema_sv_iv_atomic_g_year_max_exclusive_2_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
4
2020-02-12T21:30:44.000Z
2020-04-15T20:06:46.000Z
output/models/nist_data/atomic/g_year/schema_instance/nistschema_sv_iv_atomic_g_year_max_exclusive_2_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
null
null
null
from output.models.nist_data.atomic.g_year.schema_instance.nistschema_sv_iv_atomic_g_year_max_exclusive_2_xsd.nistschema_sv_iv_atomic_g_year_max_exclusive_2 import NistschemaSvIvAtomicGYearMaxExclusive2 __all__ = [ "NistschemaSvIvAtomicGYearMaxExclusive2", ]
44
202
0.897727
from output.models.nist_data.atomic.g_year.schema_instance.nistschema_sv_iv_atomic_g_year_max_exclusive_2_xsd.nistschema_sv_iv_atomic_g_year_max_exclusive_2 import NistschemaSvIvAtomicGYearMaxExclusive2 __all__ = [ "NistschemaSvIvAtomicGYearMaxExclusive2", ]
true
true
f7fd9c8d21ede9ba6de226daa3b159c437eea1ff
1,179
py
Python
yoongram/users/adapters.py
happyjy/yoonGram
20555619721065296d5dab88e80c763b4a3f295e
[ "MIT" ]
null
null
null
yoongram/users/adapters.py
happyjy/yoonGram
20555619721065296d5dab88e80c763b4a3f295e
[ "MIT" ]
9
2021-03-09T02:00:36.000Z
2022-02-26T10:13:36.000Z
yoongram/users/adapters.py
happyjy/yoonGram
20555619721065296d5dab88e80c763b4a3f295e
[ "MIT" ]
null
null
null
from typing import Any from allauth.account.adapter import DefaultAccountAdapter from allauth.socialaccount.adapter import DefaultSocialAccountAdapter from django.conf import settings from django.http import HttpRequest class AccountAdapter(DefaultAccountAdapter): def is_open_for_signup(self, request: HttpReque...
38.032258
73
0.685327
from typing import Any from allauth.account.adapter import DefaultAccountAdapter from allauth.socialaccount.adapter import DefaultSocialAccountAdapter from django.conf import settings from django.http import HttpRequest class AccountAdapter(DefaultAccountAdapter): def is_open_for_signup(self, request: HttpReque...
true
true
f7fd9cae1ecd0a224c3db0cf3eb8b52563e45bf4
2,406
py
Python
superqt/_tests/test_eliding_label.py
alisterburt/superqt
5ab72a0c488d36c3b3b6bd70134656358978afc8
[ "BSD-3-Clause" ]
null
null
null
superqt/_tests/test_eliding_label.py
alisterburt/superqt
5ab72a0c488d36c3b3b6bd70134656358978afc8
[ "BSD-3-Clause" ]
null
null
null
superqt/_tests/test_eliding_label.py
alisterburt/superqt
5ab72a0c488d36c3b3b6bd70134656358978afc8
[ "BSD-3-Clause" ]
null
null
null
from superqt import QElidingLabel from superqt.qtcompat.QtCore import QSize, Qt from superqt.qtcompat.QtGui import QResizeEvent TEXT = ( "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do " "eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad " "minim ven iam, quis nostrud ...
34.869565
82
0.698254
from superqt import QElidingLabel from superqt.qtcompat.QtCore import QSize, Qt from superqt.qtcompat.QtGui import QResizeEvent TEXT = ( "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do " "eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad " "minim ven iam, quis nostrud ...
true
true
f7fd9d53bb43bb4a289793d1cb06947372a35456
6,560
py
Python
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/gcp_spanner_database_info.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/gcp_spanner_database_info.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/gcp_spanner_database_info.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2017 Google # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # ...
34.166667
147
0.628811
from __future__ import absolute_import, division, print_function __metaclass__ = type
true
true
f7fd9d72917f67c968c12a062913db529405d312
5,260
py
Python
IMLearn/learners/classifiers/perceptron.py
pelegrichman/IML.HUJI
b8c158b9a6e332313a8a69cbbfd42ed8aede2858
[ "MIT" ]
1
2022-03-09T18:51:53.000Z
2022-03-09T18:51:53.000Z
IMLearn/learners/classifiers/perceptron.py
pelegrichman/IML.HUJI
b8c158b9a6e332313a8a69cbbfd42ed8aede2858
[ "MIT" ]
null
null
null
IMLearn/learners/classifiers/perceptron.py
pelegrichman/IML.HUJI
b8c158b9a6e332313a8a69cbbfd42ed8aede2858
[ "MIT" ]
null
null
null
from __future__ import annotations from typing import Callable, List from typing import NoReturn from ...base import BaseEstimator import numpy as np from ...metrics import misclassification_error def default_callback(fit: Perceptron, x: np.ndarray, y: int): pass class Perceptron(BaseEstimator): """ Pe...
32.469136
115
0.605894
from __future__ import annotations from typing import Callable, List from typing import NoReturn from ...base import BaseEstimator import numpy as np from ...metrics import misclassification_error def default_callback(fit: Perceptron, x: np.ndarray, y: int): pass class Perceptron(BaseEstimator): def __ini...
true
true
f7fd9f26ef574e59b1be0f05d5f957a7c223c716
288
py
Python
glassdoor/items.py
snahor/glassdoor-questions
402baa0b9321441a809760c9f4d2c7e8751d33b9
[ "Unlicense" ]
1
2017-09-24T23:24:49.000Z
2017-09-24T23:24:49.000Z
glassdoor/items.py
snahor/glassdoor-questions
402baa0b9321441a809760c9f4d2c7e8751d33b9
[ "Unlicense" ]
null
null
null
glassdoor/items.py
snahor/glassdoor-questions
402baa0b9321441a809760c9f4d2c7e8751d33b9
[ "Unlicense" ]
null
null
null
# -*- coding: utf-8 -*- # Define here the models for your scraped items # # See documentation in: # http://doc.scrapy.org/en/latest/topics/items.html import scrapy class GlassdoorItem(scrapy.Item): # define the fields for your item here like: # name = scrapy.Field() pass
19.2
51
0.6875
import scrapy class GlassdoorItem(scrapy.Item): pass
true
true
f7fd9f656c52c9d89bd258f04ea913966b9a2ca8
4,110
py
Python
app/views/notebook_view.py
awesome-archive/susnote
402384e5de1a51ce6e41aea090376d5efef05fdc
[ "MIT" ]
null
null
null
app/views/notebook_view.py
awesome-archive/susnote
402384e5de1a51ce6e41aea090376d5efef05fdc
[ "MIT" ]
null
null
null
app/views/notebook_view.py
awesome-archive/susnote
402384e5de1a51ce6e41aea090376d5efef05fdc
[ "MIT" ]
null
null
null
#!/usr/bin/env python # encoding: utf-8 import logging from sanic import Blueprint, response from sanic.response import json, text, html, redirect import ujson import datetime logger = logging.getLogger('notebook') notebook_bp = Blueprint('notebook', url_prefix='notebook') @notebook_bp.route('/get',methods=['GET'])...
33.145161
91
0.606569
import logging from sanic import Blueprint, response from sanic.response import json, text, html, redirect import ujson import datetime logger = logging.getLogger('notebook') notebook_bp = Blueprint('notebook', url_prefix='notebook') @notebook_bp.route('/get',methods=['GET']) async def notebooks(request): arg...
true
true
f7fd9f743952c0ea6b05b34d2391f181c6c94e55
6,201
py
Python
app.py
ggojard/guittinywebdb
9d90f4d6cf62e0917280e6c08398844fec71f525
[ "MIT" ]
null
null
null
app.py
ggojard/guittinywebdb
9d90f4d6cf62e0917280e6c08398844fec71f525
[ "MIT" ]
null
null
null
app.py
ggojard/guittinywebdb
9d90f4d6cf62e0917280e6c08398844fec71f525
[ "MIT" ]
null
null
null
# from datetime import datetime import os from flask import Flask, request, jsonify from flask_sqlalchemy import SQLAlchemy app = Flask(__name__) app.config['SQLALCHEMY_DATABASE_URI'] = os.environ['DATABASE_URL'] app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False db = SQLAlchemy(app) class TinyWebDB(db.Model): ...
34.071429
110
0.585067
import os from flask import Flask, request, jsonify from flask_sqlalchemy import SQLAlchemy app = Flask(__name__) app.config['SQLALCHEMY_DATABASE_URI'] = os.environ['DATABASE_URL'] app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False db = SQLAlchemy(app) class TinyWebDB(db.Model): __tablename__ = 'tinywebdb' ...
true
true
f7fda0748185d5ba88bb1fa3af9c06f1a4599a83
854
py
Python
test/fixtures/generatekeyaddrvector.py
happyucjs/happyucjs-lightwallet
5555829871cb0aade98a39483756e3bd66505c3b
[ "MIT" ]
null
null
null
test/fixtures/generatekeyaddrvector.py
happyucjs/happyucjs-lightwallet
5555829871cb0aade98a39483756e3bd66505c3b
[ "MIT" ]
null
null
null
test/fixtures/generatekeyaddrvector.py
happyucjs/happyucjs-lightwallet
5555829871cb0aade98a39483756e3bd66505c3b
[ "MIT" ]
null
null
null
from happyuc import tester from happyuc import utils from bitcoin import ecdsa_sign, ecdsa_raw_sign, ecdsa_raw_recover, decode_sig import json s = tester.state() init_seed = 'some_random_initial_seed_' indices = range(10000) result_vector = [] for i in indices: seed = init_seed + str(i) key = utils.sha3(se...
29.448276
84
0.662763
from happyuc import tester from happyuc import utils from bitcoin import ecdsa_sign, ecdsa_raw_sign, ecdsa_raw_recover, decode_sig import json s = tester.state() init_seed = 'some_random_initial_seed_' indices = range(10000) result_vector = [] for i in indices: seed = init_seed + str(i) key = utils.sha3(se...
true
true
f7fda0be5bfa5ffa18a069db5ca8add1b4d483a4
11,993
py
Python
moderngl_window/context/pyglet/window.py
joehalliwell/moderngl-window
f0241fe3a6bc058eb4d2c9d622934a168de82865
[ "MIT" ]
142
2019-11-11T23:14:28.000Z
2022-03-29T08:37:03.000Z
moderngl_window/context/pyglet/window.py
robertdluigi/moderngl-window
b6319494a22107c4ffc64d2f50670f8cbf953667
[ "MIT" ]
107
2019-10-31T20:31:45.000Z
2022-03-23T15:01:41.000Z
moderngl_window/context/pyglet/window.py
robertdluigi/moderngl-window
b6319494a22107c4ffc64d2f50670f8cbf953667
[ "MIT" ]
36
2019-12-12T16:14:10.000Z
2022-01-18T22:58:21.000Z
from typing import Tuple import platform import pyglet # On OS X we need to disable the shadow context # because the 2.1 shadow context cannot be upgrade to a 3.3+ core if platform.system() == "Darwin": pyglet.options["shadow_window"] = False pyglet.options["debug_gl"] = False from moderngl_window.con...
32.76776
92
0.600267
from typing import Tuple import platform import pyglet if platform.system() == "Darwin": pyglet.options["shadow_window"] = False pyglet.options["debug_gl"] = False from moderngl_window.context.pyglet.keys import Keys from moderngl_window.context.base import BaseWindow class Window(BaseWindow):...
true
true
f7fda1731af86be37b8c5e999eff6e24d03104fc
6,822
py
Python
Twitter-Data-Analysis/twitter_streaming.py
vivekparasharr/Social-Text-Web-Data-Analysis
9c19edc2a2917454b558ee7e4464e0c41418b6cd
[ "MIT" ]
null
null
null
Twitter-Data-Analysis/twitter_streaming.py
vivekparasharr/Social-Text-Web-Data-Analysis
9c19edc2a2917454b558ee7e4464e0c41418b6cd
[ "MIT" ]
null
null
null
Twitter-Data-Analysis/twitter_streaming.py
vivekparasharr/Social-Text-Web-Data-Analysis
9c19edc2a2917454b558ee7e4464e0c41418b6cd
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun May 28 12:25:54 2017 @author: vivekparashar """ #Import the necessary methods from tweepy library from tweepy.streaming import StreamListener from tweepy import OAuthHandler from tweepy import Stream #Variables that contains the user credentials to ac...
30.052863
200
0.70903
from tweepy.streaming import StreamListener from tweepy import OAuthHandler from tweepy import Stream access_token = "----" access_token_secret = "----" consumer_key = "----" consumer_secret = "----" class StdOutListener(StreamListener): def on_data(self, data): if 'text' in data: fil...
true
true
f7fda40d65049b9d477fa2a0a59bf4be27ea8b97
14,441
py
Python
uqcsbot/scripts/trivia.py
dhood/uqcsbot
d36fb77a848d17d91ac8bd4c1b85000bac06f7c0
[ "MIT" ]
38
2017-04-13T01:15:05.000Z
2021-07-25T08:22:20.000Z
uqcsbot/scripts/trivia.py
dhood/uqcsbot
d36fb77a848d17d91ac8bd4c1b85000bac06f7c0
[ "MIT" ]
302
2017-04-13T01:20:26.000Z
2021-04-06T07:08:29.000Z
uqcsbot/scripts/trivia.py
dhood/uqcsbot
d36fb77a848d17d91ac8bd4c1b85000bac06f7c0
[ "MIT" ]
54
2017-05-04T23:18:29.000Z
2021-04-07T17:57:16.000Z
import argparse import base64 import json import random from datetime import datetime, timezone, timedelta from functools import partial from typing import List, Dict, Union, NamedTuple, Optional, Callable, Set import requests from uqcsbot import bot, Command from uqcsbot.api import Channel from uqcsbot.utils.command...
38.30504
100
0.685202
import argparse import base64 import json import random from datetime import datetime, timezone, timedelta from functools import partial from typing import List, Dict, Union, NamedTuple, Optional, Callable, Set import requests from uqcsbot import bot, Command from uqcsbot.api import Channel from uqcsbot.utils.command...
true
true
f7fda4f14479365f169cc9e649d6252b9f3f754e
2,481
py
Python
losses.py
stevezhangz/ournn
a5d8383971e9a921c38380507f1abbd93a88ca88
[ "Apache-2.0" ]
2
2021-04-05T02:28:59.000Z
2021-11-20T01:24:17.000Z
ournn/losses.py
stevezhangz/ournn
a5d8383971e9a921c38380507f1abbd93a88ca88
[ "Apache-2.0" ]
null
null
null
ournn/losses.py
stevezhangz/ournn
a5d8383971e9a921c38380507f1abbd93a88ca88
[ "Apache-2.0" ]
null
null
null
import numpy as np from ournn.tools.matrix_tools import dot_mul2d import math class MSE: def __init__(self): pass def loss(self,x,y,delta=1e-3): if isinstance(x,int) or isinstance(x,float): if isinstance(y, int) or isinstance(y, float): return (x-y)*(x-y) a...
28.193182
85
0.584442
import numpy as np from ournn.tools.matrix_tools import dot_mul2d import math class MSE: def __init__(self): pass def loss(self,x,y,delta=1e-3): if isinstance(x,int) or isinstance(x,float): if isinstance(y, int) or isinstance(y, float): return (x-y)*(x-y) a...
true
true
f7fda6cdb459a8f9f20428e30d2c2938e76bca2f
5,097
py
Python
BaseTools/Plugin/CompilerPlugin/CompilerPlugin.py
changeworld/mu_basecore
1a883ec85d8d2f49663c76e1a1bc5068333f5508
[ "BSD-2-Clause" ]
null
null
null
BaseTools/Plugin/CompilerPlugin/CompilerPlugin.py
changeworld/mu_basecore
1a883ec85d8d2f49663c76e1a1bc5068333f5508
[ "BSD-2-Clause" ]
null
null
null
BaseTools/Plugin/CompilerPlugin/CompilerPlugin.py
changeworld/mu_basecore
1a883ec85d8d2f49663c76e1a1bc5068333f5508
[ "BSD-2-Clause" ]
1
2021-11-01T19:33:11.000Z
2021-11-01T19:33:11.000Z
# @file Compiler_plugin.py # Simple Project Mu Build Plugin to support # compiling code ## # Copyright (c) 2018, Microsoft Corporation # # 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. Redistri...
49.485437
139
0.664312
mport logging from MuEnvironment.PluginManager import IMuBuildPlugin from MuEnvironment.UefiBuild import UefiBuilder import os import re class CompilerPlugin(IMuBuildPlugin): def GetTestName(self, packagename, environment): target = environment.GetValue("TARGET") retu...
true
true
f7fda70d6ddc238f16a588ac5b140c6453a27f89
3,997
py
Python
alipay/aop/api/request/AlipayUserJobcardJobsupplierQueryRequest.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/request/AlipayUserJobcardJobsupplierQueryRequest.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/request/AlipayUserJobcardJobsupplierQueryRequest.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.FileItem import FileItem from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.AlipayUserJobcardJobsupplierQueryModel import AlipayUserJobcardJobsupplierQueryModel class AlipayUserJobcardJobsupplierQueryRequest(...
27.565517
148
0.646985
import json from alipay.aop.api.FileItem import FileItem from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.AlipayUserJobcardJobsupplierQueryModel import AlipayUserJobcardJobsupplierQueryModel class AlipayUserJobcardJobsupplierQueryRequest(object): def __init__(self, biz_model=N...
true
true
f7fda7d77a841a81cf90cfa8d6ab27e956a1b1e9
5,156
py
Python
app/eMenu/settings.py
asawicki96/eMenu
39850ea9a25932462fdb12c7f6b1341ad94266bc
[ "MIT" ]
null
null
null
app/eMenu/settings.py
asawicki96/eMenu
39850ea9a25932462fdb12c7f6b1341ad94266bc
[ "MIT" ]
null
null
null
app/eMenu/settings.py
asawicki96/eMenu
39850ea9a25932462fdb12c7f6b1341ad94266bc
[ "MIT" ]
null
null
null
""" Django settings for eMenu project. Generated by 'django-admin startproject' using Django 3.2.3. For more information on this file, see https://docs.djangoproject.com/en/3.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.2/ref/settings/ """ from pathlib i...
27.87027
91
0.712762
from pathlib import Path from datetime import timedelta import os import sys BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = 'django-insecure-#wl5z(!)p0nau_d=sp_7)58870%7l=yp(_mu4w*ceswoq_i(=t' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib....
true
true
f7fda824e4beae2e7ee28f17f89463e0215fa794
9,625
py
Python
venv/Lib/site-packages/pandas/tests/indexes/timedeltas/test_setops.py
OliviaNabbosa89/Disaster_Responses
1e66d77c303cec685dfc2ca94f4fca4cc9400570
[ "MIT" ]
null
null
null
venv/Lib/site-packages/pandas/tests/indexes/timedeltas/test_setops.py
OliviaNabbosa89/Disaster_Responses
1e66d77c303cec685dfc2ca94f4fca4cc9400570
[ "MIT" ]
null
null
null
venv/Lib/site-packages/pandas/tests/indexes/timedeltas/test_setops.py
OliviaNabbosa89/Disaster_Responses
1e66d77c303cec685dfc2ca94f4fca4cc9400570
[ "MIT" ]
null
null
null
import numpy as np import pytest import pandas as pd from pandas import Int64Index, TimedeltaIndex, timedelta_range import pandas._testing as tm from pandas.tseries.offsets import Hour class TestTimedeltaIndex: def test_union(self): i1 = timedelta_range("1day", periods=5) i2 = tim...
37.745098
88
0.581922
import numpy as np import pytest import pandas as pd from pandas import Int64Index, TimedeltaIndex, timedelta_range import pandas._testing as tm from pandas.tseries.offsets import Hour class TestTimedeltaIndex: def test_union(self): i1 = timedelta_range("1day", periods=5) i2 = tim...
true
true
f7fdaa029dd647b0bc142b96342a06b4457c06ce
94
py
Python
enthought/mayavi/filters/delaunay2d.py
enthought/etsproxy
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
[ "BSD-3-Clause" ]
3
2016-12-09T06:05:18.000Z
2018-03-01T13:00:29.000Z
enthought/mayavi/filters/delaunay2d.py
enthought/etsproxy
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
[ "BSD-3-Clause" ]
1
2020-12-02T00:51:32.000Z
2020-12-02T08:48:55.000Z
enthought/mayavi/filters/delaunay2d.py
enthought/etsproxy
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
[ "BSD-3-Clause" ]
null
null
null
# proxy module from __future__ import absolute_import from mayavi.filters.delaunay2d import *
23.5
39
0.840426
from __future__ import absolute_import from mayavi.filters.delaunay2d import *
true
true
f7fdac1ec7a2d0a1dbbf432803eb274f794b791d
3,102
py
Python
PythonProjects/RpgHordeGame/RPG_Horde.py
Samuel-Melo890/Python-Projects
7968b4a7383ec95b92993264f8469240ac92425c
[ "MIT" ]
null
null
null
PythonProjects/RpgHordeGame/RPG_Horde.py
Samuel-Melo890/Python-Projects
7968b4a7383ec95b92993264f8469240ac92425c
[ "MIT" ]
null
null
null
PythonProjects/RpgHordeGame/RPG_Horde.py
Samuel-Melo890/Python-Projects
7968b4a7383ec95b92993264f8469240ac92425c
[ "MIT" ]
null
null
null
'''Create a game with races and some classes of an ordinary fantasy medieval rpg where: 1. You choose a race, a class and start 1v1 battles against some monsters, gaining points for each monster defeated. Each race and class will have some unique traits and skills. 2. The battle system will use some dices (like a T...
42.493151
134
0.734043
from tkinter import * from tkinter import ttk import os from RPG_module.classes import * from RPG_module.functions import * dir = os.path.dirname(__file__) game = Tk() game.title('RPG Horde Game') game.geometry('700x400') screen_fr = Frame(game, borderwidth=1, relief='flat', background='lightblue') screen_fr.place(...
true
true
f7fdac53a697b91f50273d8dd7c43ed55557a0dd
3,772
py
Python
contrib/macdeploy/custom_dsstore.py
mxdum/Mxdum
813de58604a5dc0936e61c440af8b768cb35f055
[ "MIT" ]
null
null
null
contrib/macdeploy/custom_dsstore.py
mxdum/Mxdum
813de58604a5dc0936e61c440af8b768cb35f055
[ "MIT" ]
1
2019-02-23T21:39:25.000Z
2019-02-23T21:39:25.000Z
contrib/macdeploy/custom_dsstore.py
mxdum/Mxdum
813de58604a5dc0936e61c440af8b768cb35f055
[ "MIT" ]
1
2019-02-23T21:34:31.000Z
2019-02-23T21:34:31.000Z
#!/usr/bin/env python # Copyright (c) 2013-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from __future__ import division,print_function,unicode_literals import biplist from ds_store import DSStore...
61.836066
1,817
0.7272
from __future__ import division,print_function,unicode_literals import biplist from ds_store import DSStore from mac_alias import Alias import sys output_file = sys.argv[1] package_name_ns = sys.argv[2] ds = DSStore.open(output_file, 'w+') ds['.']['bwsp'] = { 'ShowStatusBar': False, 'WindowBounds': b'{{30...
true
true
f7fdac9cb82b14c35e8dcbf67fb1523ee2ce8cca
316
py
Python
Step_8/Parameter.py
LeeDaeil/Process_A3C
1876fbe1b928e13b9c8766095b2d13abfda94019
[ "Apache-2.0" ]
1
2020-03-22T14:39:44.000Z
2020-03-22T14:39:44.000Z
Step_8/Parameter.py
LeeDaeil/Process_A3C
1876fbe1b928e13b9c8766095b2d13abfda94019
[ "Apache-2.0" ]
1
2018-12-23T07:35:43.000Z
2018-12-23T07:35:43.000Z
Step_8/Parameter.py
LeeDaeil/Process_A3C
1876fbe1b928e13b9c8766095b2d13abfda94019
[ "Apache-2.0" ]
2
2018-10-10T01:56:04.000Z
2018-10-11T03:57:39.000Z
class PARA: CNS_ip = '192.168.0.55' CNS_port = 7001 CNS_test_ip = '192.168.0.60' CNS_test_port = 7001 Remote_ip = '192.168.0.29' Remote_port = 7001 # select model # Model = 'LSTM' Model = 'DNN' show_model = False show_input_windows = True save_input_log = False
15.8
32
0.601266
class PARA: CNS_ip = '192.168.0.55' CNS_port = 7001 CNS_test_ip = '192.168.0.60' CNS_test_port = 7001 Remote_ip = '192.168.0.29' Remote_port = 7001 Model = 'DNN' show_model = False show_input_windows = True save_input_log = False
true
true
f7fdacbe2c01fbe3fa5d31f5b4df0d5a906394da
8,660
py
Python
controllerlib/action.py
magnetikonline/docker-unifi-network-controller
d3f8e31af47b1db488448a60876f35862fd99918
[ "MIT" ]
3
2019-11-16T15:33:13.000Z
2020-05-28T02:01:13.000Z
controllerlib/action.py
magnetikonline/docker-unifi-network-controller
d3f8e31af47b1db488448a60876f35862fd99918
[ "MIT" ]
null
null
null
controllerlib/action.py
magnetikonline/docker-unifi-network-controller
d3f8e31af47b1db488448a60876f35862fd99918
[ "MIT" ]
null
null
null
import os import tarfile from typing import AbstractSet from controllerlib import docker CONTROLLER_REPOSITORY_NAME = "magnetikonline/unifi-network-controller" CONTROLLER_PORT_COMMS = 8080 CONTROLLER_PORT_GUI = 8443 CONTROLLER_BASE_DIR = "/usr/lib/unifi" BACKUP_REPOSITORY_NAME = "alpine" BACKUP_RESTORE_BACKUP_PATH =...
34.501992
107
0.677714
import os import tarfile from typing import AbstractSet from controllerlib import docker CONTROLLER_REPOSITORY_NAME = "magnetikonline/unifi-network-controller" CONTROLLER_PORT_COMMS = 8080 CONTROLLER_PORT_GUI = 8443 CONTROLLER_BASE_DIR = "/usr/lib/unifi" BACKUP_REPOSITORY_NAME = "alpine" BACKUP_RESTORE_BACKUP_PATH =...
true
true
f7fdae0a82acd5745866d6173d68f4a83be7ab76
5,406
py
Python
homeassistant/components/modbus/validators.py
gadgetmobile/homeassistant-core
14b74fbf71ba6d508744883fd2af138d6356ee02
[ "Apache-2.0" ]
null
null
null
homeassistant/components/modbus/validators.py
gadgetmobile/homeassistant-core
14b74fbf71ba6d508744883fd2af138d6356ee02
[ "Apache-2.0" ]
49
2021-01-16T21:01:32.000Z
2022-03-31T06:06:06.000Z
homeassistant/components/modbus/validators.py
Vaarlion/core
f3de8b9f28de01abf72c0f5bb0b457eb1841f201
[ "Apache-2.0" ]
null
null
null
"""Validate Modbus configuration.""" from __future__ import annotations import logging import struct from typing import Any import voluptuous as vol from homeassistant.const import ( CONF_COUNT, CONF_NAME, CONF_SCAN_INTERVAL, CONF_STRUCTURE, CONF_TIMEOUT, ) from .const import ( CONF_DATA_TYP...
30.370787
88
0.586385
from __future__ import annotations import logging import struct from typing import Any import voluptuous as vol from homeassistant.const import ( CONF_COUNT, CONF_NAME, CONF_SCAN_INTERVAL, CONF_STRUCTURE, CONF_TIMEOUT, ) from .const import ( CONF_DATA_TYPE, CONF_SWAP, CONF_SWAP_BYTE,...
true
true
f7fdae23cdea726d4c696ff651a75f7454cbb106
1,054
py
Python
camera.py
andreajessen/robot
e92d318d1e71994cb1c5c19e97bb27b89d23e22a
[ "MIT" ]
null
null
null
camera.py
andreajessen/robot
e92d318d1e71994cb1c5c19e97bb27b89d23e22a
[ "MIT" ]
null
null
null
camera.py
andreajessen/robot
e92d318d1e71994cb1c5c19e97bb27b89d23e22a
[ "MIT" ]
null
null
null
import os from PIL import Image class Camera: def __init__(self, img_width=128, img_height=96, img_rot=0): self.value = None self.img_width = img_width self.img_height = img_height self.img_rot = img_rot def get_value(self): return self.value def u...
32.9375
150
0.594877
import os from PIL import Image class Camera: def __init__(self, img_width=128, img_height=96, img_rot=0): self.value = None self.img_width = img_width self.img_height = img_height self.img_rot = img_rot def get_value(self): return self.value def u...
true
true
f7fdae2951a756ee65ff893e4e77f21d1168ab5a
4,032
py
Python
tests/test_enum.py
gkpln3/Hydras
b5c91a9eb7f8455db23aab1962eb9da2a2e9e534
[ "MIT" ]
null
null
null
tests/test_enum.py
gkpln3/Hydras
b5c91a9eb7f8455db23aab1962eb9da2a2e9e534
[ "MIT" ]
null
null
null
tests/test_enum.py
gkpln3/Hydras
b5c91a9eb7f8455db23aab1962eb9da2a2e9e534
[ "MIT" ]
null
null
null
#!/usr/bin/env python """ :file: EnumsTests.py This file contains tests for the "Enum" type formatters. :date: 20/01/2016 :authors: - Kfir Gollan """ import unittest from hydras import * class TestEnumFormatters(unittest.TestCase): def setUp(self): HydraSettings.push() HydraSettings.endian =...
29.007194
103
0.401538
import unittest from hydras import * class TestEnumFormatters(unittest.TestCase): def setUp(self): HydraSettings.push() HydraSettings.endian = LittleEndian self.enum_params = ["A", {"A": 1, "B": 2}] def tearDown(self): HydraSettings.pop() def test_get_attributes(self): ...
true
true
f7fdafe8c337ae34453ed39560ea6713686a55a4
11,404
py
Python
consensus/poet/core/sawtooth_poet/poet_consensus/poet_block_verifier.py
lcarranco/sawtooth-core
70cd65bfe4204545501d73f748d908e6695828f3
[ "Apache-2.0" ]
null
null
null
consensus/poet/core/sawtooth_poet/poet_consensus/poet_block_verifier.py
lcarranco/sawtooth-core
70cd65bfe4204545501d73f748d908e6695828f3
[ "Apache-2.0" ]
1
2021-12-09T23:11:26.000Z
2021-12-09T23:11:26.000Z
consensus/poet/core/sawtooth_poet/poet_consensus/poet_block_verifier.py
lcarranco/sawtooth-core
70cd65bfe4204545501d73f748d908e6695828f3
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 Intel 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...
45.434263
80
0.59786
import logging from sawtooth_validator.journal.block_wrapper import BlockWrapper from sawtooth_validator.journal.consensus.consensus \ import BlockVerifierInterface from sawtooth_poet.poet_consensus.consensus_state_store \ import ConsensusStateStore from sawtooth_poet.poet_consensus.poet_config...
true
true
f7fdb00a62d1bf93df847c6c65ca2d66bf0c730d
20,409
py
Python
pypureclient/flasharray/FA_2_13/api/api_clients_api.py
ashahid-ps/py-pure-client
2e3565d37b2a41db69308769f6f485d08a7c46c3
[ "BSD-2-Clause" ]
null
null
null
pypureclient/flasharray/FA_2_13/api/api_clients_api.py
ashahid-ps/py-pure-client
2e3565d37b2a41db69308769f6f485d08a7c46c3
[ "BSD-2-Clause" ]
null
null
null
pypureclient/flasharray/FA_2_13/api/api_clients_api.py
ashahid-ps/py-pure-client
2e3565d37b2a41db69308769f6f485d08a7c46c3
[ "BSD-2-Clause" ]
null
null
null
# coding: utf-8 """ FlashArray REST API No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: 2.13 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import re # pyt...
45.76009
671
0.634377
from __future__ import absolute_import import re import six from typing import List, Optional from .. import models class APIClientsApi(object): def __init__(self, api_client): self.api_client = api_client def api213_api_clients_delete_with_http_info( self, authorization=None,...
true
true
f7fdb110597e8701a229c068eb8c48bc251019cd
952
py
Python
tests/functional/branching/black_box_with_y.py
satyaog/orion
671dbb3fb51bf8f49f0146101b749f70166896a6
[ "BSD-3-Clause" ]
1
2017-09-07T06:20:39.000Z
2017-09-07T06:20:39.000Z
tests/functional/branching/black_box_with_y.py
satyaog/orion
671dbb3fb51bf8f49f0146101b749f70166896a6
[ "BSD-3-Clause" ]
null
null
null
tests/functional/branching/black_box_with_y.py
satyaog/orion
671dbb3fb51bf8f49f0146101b749f70166896a6
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """Simple one dimensional example for a possible user's script.""" import argparse from orion.client import report_results def function(x, y): """Evaluate partial information of a quadratic.""" y = x + y - 34.56789 return 4 * y**2 + 23.4, 8 * y def execute(...
26.444444
78
0.661765
import argparse from orion.client import report_results def function(x, y): y = x + y - 34.56789 return 4 * y**2 + 23.4, 8 * y def execute(): parser = argparse.ArgumentParser() parser.add_argument("-x", type=float, required=True) parser.add_argument("-y", type=float, default=0.0) inp...
true
true
f7fdb208baa0390cfac7fe73b1618af8b1312615
5,780
py
Python
venv/lib/python3.6/site-packages/ansible_collections/community/network/plugins/module_utils/network/aos/aos.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
1
2020-01-22T13:11:23.000Z
2020-01-22T13:11:23.000Z
venv/lib/python3.6/site-packages/ansible_collections/community/network/plugins/module_utils/network/aos/aos.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
12
2020-02-21T07:24:52.000Z
2020-04-14T09:54:32.000Z
venv/lib/python3.6/site-packages/ansible_collections/community/network/plugins/module_utils/network/aos/aos.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
null
null
null
# # Copyright (c) 2017 Apstra Inc, <community@apstra.com> # # This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the m...
31.413043
107
0.686851
from __future__ import absolute_import, division, print_function __metaclass__ = type import json from distutils.version import LooseVersion try: import yaml HAS_YAML = True except ImportError: HAS_YAML = False try: from apstra.aosom.session import Session HAS_AOS_P...
true
true
f7fdb318437a941360b8499d5a8e3f2e59604c63
7,565
py
Python
ALREC_Method/stmarc/train_new_method_v4_for_atd.py
proy3/Abnormal_Trajectory_Classifier
a6b27c6847262e9703a0f3404c85c135415c1d4c
[ "MIT" ]
6
2019-10-29T03:05:14.000Z
2022-03-18T05:14:25.000Z
ALREC_Method/rene/train_new_method_v4_for_atd.py
proy3/Abnormal_Trajectory_Classifier
a6b27c6847262e9703a0f3404c85c135415c1d4c
[ "MIT" ]
1
2022-03-11T03:49:34.000Z
2022-03-11T03:49:34.000Z
ALREC_Method/rouen/train_new_method_v4_for_atd.py
proy3/Abnormal_Trajectory_Classifier
a6b27c6847262e9703a0f3404c85c135415c1d4c
[ "MIT" ]
1
2021-12-15T09:21:26.000Z
2021-12-15T09:21:26.000Z
""" Train Abnormal trajectory detection with deep autoencoder. """ import warnings warnings.simplefilter(action='ignore', category=FutureWarning) import ae_utilities as aeu import input_data as data import abnormal_data_generation as adg import dataset_defines as dd import numpy as np import os abspath = os.path.abs...
49.444444
118
0.645605
import warnings warnings.simplefilter(action='ignore', category=FutureWarning) import ae_utilities as aeu import input_data as data import abnormal_data_generation as adg import dataset_defines as dd import numpy as np import os abspath = os.path.abspath(__file__) dir_name = os.path.dirname(abspath) dataset_name = d...
true
true
f7fdb3971f8b15e5eafc6e529f1129f69771664e
1,506
py
Python
com/shbak/effective_python/_01_example/_74_memoryview_bytearray/main.py
sanghyunbak/effective_python
e35d880c47e988607e4a11aa6eb6b62ae887688a
[ "Apache-2.0" ]
null
null
null
com/shbak/effective_python/_01_example/_74_memoryview_bytearray/main.py
sanghyunbak/effective_python
e35d880c47e988607e4a11aa6eb6b62ae887688a
[ "Apache-2.0" ]
null
null
null
com/shbak/effective_python/_01_example/_74_memoryview_bytearray/main.py
sanghyunbak/effective_python
e35d880c47e988607e4a11aa6eb6b62ae887688a
[ "Apache-2.0" ]
null
null
null
import timeit from socket import socket from termcolor import colored def print_memoryview(): data = b'shave and a haircut, two bits' view = memoryview(data) chunk = view[12:19] print(colored(f'chunk: {chunk}', 'green')) print(colored(f'size: {chunk.nbytes}', 'green')) print(colored(f'view da...
25.1
66
0.632802
import timeit from socket import socket from termcolor import colored def print_memoryview(): data = b'shave and a haircut, two bits' view = memoryview(data) chunk = view[12:19] print(colored(f'chunk: {chunk}', 'green')) print(colored(f'size: {chunk.nbytes}', 'green')) print(colored(f'view da...
true
true
f7fdb428b910bb6d6e131170f6089015f3491cb8
1,400
py
Python
memoize/decorator.py
ECrownofFire/chaos
0cfbb85ab52654967909aef54eff3a0e62b641bd
[ "MIT" ]
1,804
2017-05-23T02:34:27.000Z
2017-05-26T00:44:44.000Z
memoize/decorator.py
ECrownofFire/chaos
0cfbb85ab52654967909aef54eff3a0e62b641bd
[ "MIT" ]
345
2017-05-20T23:55:12.000Z
2017-06-19T07:48:58.000Z
memoize/decorator.py
ECrownofFire/chaos
0cfbb85ab52654967909aef54eff3a0e62b641bd
[ "MIT" ]
248
2017-05-23T02:00:07.000Z
2017-05-26T00:00:28.000Z
from functools import wraps import time import inspect from . import helpers def memoize(ttl_spec, whitelist=None, blacklist=None, key_fn=helpers._json_keyify, backend=lambda fn: dict(), get_now=time.time): """ memoize/cache the decorated function for ttl amount of time """ ttl = hel...
29.787234
80
0.566429
from functools import wraps import time import inspect from . import helpers def memoize(ttl_spec, whitelist=None, blacklist=None, key_fn=helpers._json_keyify, backend=lambda fn: dict(), get_now=time.time): ttl = helpers._time_code_to_seconds(ttl_spec) def wrapper(fn): sig =...
true
true
f7fdb5778147d1140e0a87c95c5b25a36bd7de1a
4,249
py
Python
pi_turret/turret/turret.py
iot-foam-turret/pi-turret
583d72a7625eb702ccde7afe66a085162854555a
[ "MIT" ]
2
2021-05-12T21:13:14.000Z
2022-03-27T15:24:08.000Z
pi_turret/turret/turret.py
iot-foam-turret/pi-turret
583d72a7625eb702ccde7afe66a085162854555a
[ "MIT" ]
7
2019-09-14T15:21:46.000Z
2019-09-29T02:58:46.000Z
pi_turret/turret/turret.py
iot-foam-turret/pi-turret
583d72a7625eb702ccde7afe66a085162854555a
[ "MIT" ]
null
null
null
""" Main Blaster Turret """ import time import threading from typing import Callable import pi_turret.config as config from pi_turret.blaster.hyperfire import Hyperfire from pi_turret.stepper_motor.stepper import StepperMotor, STEP_DEGREES from pi_turret.stepper_motor.stepper_slot import StepperMotorSlot from pi_turret...
30.35
125
0.581549
import time import threading from typing import Callable import pi_turret.config as config from pi_turret.blaster.hyperfire import Hyperfire from pi_turret.stepper_motor.stepper import StepperMotor, STEP_DEGREES from pi_turret.stepper_motor.stepper_slot import StepperMotorSlot from pi_turret.sensor.button import yaw_bu...
true
true
f7fdb724517a005f9585d71e40aee91e0ba66b97
9,947
py
Python
qa/rpc-tests/cfund-paymentrequest-state-accept.py
lordhace/navcoin-core
50150863785850447582ce0d8b80538b273e2fde
[ "MIT" ]
1
2020-07-31T19:43:05.000Z
2020-07-31T19:43:05.000Z
qa/rpc-tests/cfund-paymentrequest-state-accept.py
Alonewolf-123/navcoin-core
e0879195bdf5373e5b1fcf4e970af0a8815660f6
[ "MIT" ]
1
2019-01-16T23:33:01.000Z
2019-06-29T13:02:54.000Z
qa/rpc-tests/cfund-paymentrequest-state-accept.py
Alonewolf-123/navcoin-core
e0879195bdf5373e5b1fcf4e970af0a8815660f6
[ "MIT" ]
1
2019-07-16T09:13:48.000Z
2019-07-16T09:13:48.000Z
#!/usr/bin/env python3 # Copyright (c) 2018 The Navcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.test_framework import NavCoinTestFramework from test_framework.cfund_util import * import...
45.420091
152
0.674977
from test_framework.test_framework import NavCoinTestFramework from test_framework.cfund_util import * import time class CommunityFundPaymentRequestsTest(NavCoinTestFramework): def __init__(self): super().__init__() self.setup_clean_chain = True self.num_nodes = 1 def setup_netw...
true
true
f7fdb7a417cb8178de8a72c418a00fea091d0e4e
9,602
py
Python
ranking/semi_hard_triplet.py
ahmdtaha/tf_retrieval_baseline
31b1588f888cecc1d4287f77bd046314956482d5
[ "Apache-2.0" ]
37
2019-06-01T02:11:48.000Z
2021-12-31T06:27:42.000Z
ranking/semi_hard_triplet.py
ahmdtaha/tf_retrieval_baseline
31b1588f888cecc1d4287f77bd046314956482d5
[ "Apache-2.0" ]
1
2019-06-21T03:20:59.000Z
2019-09-03T14:20:04.000Z
ranking/semi_hard_triplet.py
ahmdtaha/tf_retrieval_baseline
31b1588f888cecc1d4287f77bd046314956482d5
[ "Apache-2.0" ]
6
2019-10-11T10:21:56.000Z
2022-03-09T06:22:57.000Z
import numbers import tensorflow as tf from tensorflow.python.ops import math_ops from tensorflow.python.ops import array_ops from tensorflow.python.framework import dtypes def masked_minimum(data, mask, dim=1): """Computes the axis wise minimum over chosen elements. Args: data: 2-D float `Tensor` of size [n,...
38.408
117
0.687878
import numbers import tensorflow as tf from tensorflow.python.ops import math_ops from tensorflow.python.ops import array_ops from tensorflow.python.framework import dtypes def masked_minimum(data, mask, dim=1): axis_maximums = math_ops.reduce_max(data, dim, keepdims=True) masked_minimums = math_ops.reduce_min( ...
true
true
f7fdb844016bb74899c26109edc632e87e2fa88c
8,721
py
Python
mesa/custom_bn.py
zhuang-group/Mesa
8b7a0db0461de7df5c99d644a60cc7704c67a02a
[ "Apache-2.0" ]
98
2021-11-23T03:38:52.000Z
2022-02-17T00:26:22.000Z
mesa/custom_bn.py
zip-group/Mesa
8b7a0db0461de7df5c99d644a60cc7704c67a02a
[ "Apache-2.0" ]
2
2021-12-02T11:45:24.000Z
2022-01-18T19:46:57.000Z
mesa/custom_bn.py
zip-group/Mesa
8b7a0db0461de7df5c99d644a60cc7704c67a02a
[ "Apache-2.0" ]
6
2021-11-23T22:49:21.000Z
2022-03-01T09:16:45.000Z
# Copyright (c) 2021-present, Zhuang AI Group. # All rights reserved. import torch import torch.nn as nn import torch.nn.functional as F if 'mesa' not in __name__: import custom_quant import packbit import native else: from . import custom_quant from . import native from . import packbit def...
41.528571
145
0.6724
import torch import torch.nn as nn import torch.nn.functional as F if 'mesa' not in __name__: import custom_quant import packbit import native else: from . import custom_quant from . import native from . import packbit def SyncBatchNorm_forward(self, input, weight, bias, running_mean, runn...
true
true
f7fdb8f8135d355ca7cd3f450dc773ff7936b7e1
240
py
Python
wtforms_webwidgets/__init__.py
mdornseif/wtforms-webwidgets
457bc20ba82c5b1c7638b58cf2fb9cd4f46f1a10
[ "MIT" ]
4
2015-07-29T13:21:56.000Z
2021-04-27T12:26:16.000Z
wtforms_webwidgets/__init__.py
mdornseif/wtforms-webwidgets
457bc20ba82c5b1c7638b58cf2fb9cd4f46f1a10
[ "MIT" ]
2
2015-06-09T05:59:35.000Z
2018-01-23T18:09:27.000Z
wtforms_webwidgets/__init__.py
mdornseif/wtforms-webwidgets
457bc20ba82c5b1c7638b58cf2fb9cd4f46f1a10
[ "MIT" ]
3
2015-06-08T13:44:20.000Z
2019-08-08T10:34:12.000Z
""" WTForms-Webwidgets ================== This package aims to one day eventually contain comprehensive widgets for all the common web UI frameworks. Currently this module contains widgets for: * Bootstrap """ from .common import *
18.461538
81
0.704167
from .common import *
true
true
f7fdb94d3d1973655d4a1b1decb590cc7e7b1385
453
py
Python
qvapay/models/invoice.py
codeshard/qvapay-python
6483345e8b1236aacd9252743634e5f12ab3187b
[ "MIT" ]
1
2021-08-29T01:09:08.000Z
2021-08-29T01:09:08.000Z
qvapay/models/invoice.py
codeshard/qvapay-python
6483345e8b1236aacd9252743634e5f12ab3187b
[ "MIT" ]
null
null
null
qvapay/models/invoice.py
codeshard/qvapay-python
6483345e8b1236aacd9252743634e5f12ab3187b
[ "MIT" ]
null
null
null
from dataclasses import dataclass, field from uuid import UUID from dataclasses_json import config, dataclass_json @dataclass_json @dataclass class Invoice: """ QvaPay invoice """ app_id: UUID amount: float description: str remote_id: str signed = None transaction_uuid: UUID = fi...
20.590909
81
0.717439
from dataclasses import dataclass, field from uuid import UUID from dataclasses_json import config, dataclass_json @dataclass_json @dataclass class Invoice: app_id: UUID amount: float description: str remote_id: str signed = None transaction_uuid: UUID = field(metadata=config(field_name="tra...
true
true
f7fdb9f37cf41c70aad93b792f4495cbd6ca2290
826
py
Python
scheduled_bots/disease_ontology/disease_ontology/deprecated_code/bot_ng.py
egonw/scheduled-bots
1f00461d03e341568075fdcd90adb878ccaccbc3
[ "MIT" ]
6
2017-05-04T01:04:26.000Z
2022-03-04T12:22:17.000Z
scheduled_bots/disease_ontology/disease_ontology/deprecated_code/bot_ng.py
egonw/scheduled-bots
1f00461d03e341568075fdcd90adb878ccaccbc3
[ "MIT" ]
55
2017-03-14T21:16:44.000Z
2022-03-02T12:39:14.000Z
scheduled_bots/disease_ontology/disease_ontology/deprecated_code/bot_ng.py
egonw/scheduled-bots
1f00461d03e341568075fdcd90adb878ccaccbc3
[ "MIT" ]
13
2017-02-10T21:40:06.000Z
2022-01-18T01:27:52.000Z
import json import pprint import time with open("doid.json", "r") as read_file: data = json.load(read_file) i = 0 for graphs in data["graphs"]: if graphs["id"] == 'http://purl.obolibrary.org/obo/doid.owl': print('================') for node in graphs["nodes"]: if node['type'] == 'C...
30.592593
75
0.428571
import json import pprint import time with open("doid.json", "r") as read_file: data = json.load(read_file) i = 0 for graphs in data["graphs"]: if graphs["id"] == 'http://purl.obolibrary.org/obo/doid.owl': print('================') for node in graphs["nodes"]: if node['type'] == 'C...
true
true
f7fdbb705526be01bcfb410cef4df170c6da28a6
9,877
py
Python
kfac/autograd_hacks.py
shyhuai/kfac_pytorch
f5a99366fa94345697432a8aabdc5d370f68d06f
[ "MIT" ]
null
null
null
kfac/autograd_hacks.py
shyhuai/kfac_pytorch
f5a99366fa94345697432a8aabdc5d370f68d06f
[ "MIT" ]
null
null
null
kfac/autograd_hacks.py
shyhuai/kfac_pytorch
f5a99366fa94345697432a8aabdc5d370f68d06f
[ "MIT" ]
1
2020-12-30T03:06:40.000Z
2020-12-30T03:06:40.000Z
""" Library for extracting interesting quantites from autograd, see README.md Not thread-safe because of module-level variables Notation: o: number of output classes (exact Hessian), number of Hessian samples (sampled Hessian) n: batch-size do: output dimension (output channels for convolution) di: input dimension (i...
34.414634
133
0.64311
from typing import List import torch import torch.nn as nn import torch.nn.functional as F _supported_layers = ['Linear', 'Conv2d'] _hooks_disabled: bool = False _enforce_fresh_backprop: bool = False def add_hooks(model: nn.Module) -> None: global _hooks_disabled _hooks_disabled = False ...
true
true
f7fdbc862b000826917fa0aea9b1fd061d433f57
2,344
py
Python
cut.py
Jhilbertxtu/JDComments_Analyze
9a93c7cfc572509fce5e0f82702d8d55d029ef8f
[ "MIT" ]
2
2021-03-01T13:32:22.000Z
2021-07-28T13:37:43.000Z
cut.py
Jhilbertxtu/JDComments_Analyze
9a93c7cfc572509fce5e0f82702d8d55d029ef8f
[ "MIT" ]
null
null
null
cut.py
Jhilbertxtu/JDComments_Analyze
9a93c7cfc572509fce5e0f82702d8d55d029ef8f
[ "MIT" ]
null
null
null
''' 处理语料数据 数据来源:京东手机分类>按评论排序后的第一页所有产品(60个)->产品评论5星和1星的评论内容(见single_spiders/JDcomments) 去标点及英文后逐行读取文件数据进行jieba分词 去除空行,重复,停用词 然后导到mysql再去重一次,得到dis_neg_cut.txt,dis_pos_cut.txt 坑: 差评一般是真的差,好评不一定是好!!! ''' import jieba import jieba.analyse import codecs,re def pdata(inFile,outFile,st,good): ''' 处理评论数据,good是特别为隐藏在好评中...
27.904762
118
0.572099
import jieba import jieba.analyse import codecs,re def pdata(inFile,outFile,st,good): f=codecs.open(inFile,'r',encoding='utf8') target=codecs.open(outFile,'w',encoding='utf8') i=1 line=f.readline() while line: line=fix(line,good) if line: line=cut(line,st) if ...
true
true
f7fdbced9c81ca99b1680779c870d1cc2fc3e5d0
2,062
py
Python
angr/analyses/decompiler/peephole_optimizations/conv_shl_shr.py
BA7JCM/angr
187a713c35759d998d93dfc5280630976d42d717
[ "BSD-2-Clause" ]
null
null
null
angr/analyses/decompiler/peephole_optimizations/conv_shl_shr.py
BA7JCM/angr
187a713c35759d998d93dfc5280630976d42d717
[ "BSD-2-Clause" ]
null
null
null
angr/analyses/decompiler/peephole_optimizations/conv_shl_shr.py
BA7JCM/angr
187a713c35759d998d93dfc5280630976d42d717
[ "BSD-2-Clause" ]
null
null
null
from ailment.expression import Convert, BinaryOp, Const from .base import PeepholeOptimizationExprBase class ConvShlShr(PeepholeOptimizationExprBase): __slots__ = () NAME = "(expr << P) >> Q => (expr & mask) >> R" expr_classes = (BinaryOp, ) # all expressions are allowed def optimize(self, expr: B...
38.90566
109
0.387003
from ailment.expression import Convert, BinaryOp, Const from .base import PeepholeOptimizationExprBase class ConvShlShr(PeepholeOptimizationExprBase): __slots__ = () NAME = "(expr << P) >> Q => (expr & mask) >> R" expr_classes = (BinaryOp, ) def optimize(self, expr: BinaryOp): ...
true
true
f7fdbd064c1f4d795998df200938ea7655036464
5,382
py
Python
azure-cognitiveservices-search-customimagesearch/azure/cognitiveservices/search/customimagesearch/models/media_object_py3.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2021-09-07T18:36:04.000Z
2021-09-07T18:36:04.000Z
azure-cognitiveservices-search-customimagesearch/azure/cognitiveservices/search/customimagesearch/models/media_object_py3.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
2
2019-10-02T23:37:38.000Z
2020-10-02T01:17:31.000Z
azure-cognitiveservices-search-customimagesearch/azure/cognitiveservices/search/customimagesearch/models/media_object_py3.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2019-06-17T22:18:23.000Z
2019-06-17T22:18:23.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
40.164179
79
0.603865
from .creative_work import CreativeWork class MediaObject(CreativeWork): _validation = { '_type': {'required': True}, 'id': {'readonly': True}, 'read_link': {'readonly': True}, 'web_search_url': {'readonly': True}, 'name': {'readonly': True}, 'url': {'re...
true
true
f7fdbdb07b5f903ceb6245f909088d02120a539c
891
py
Python
ksif/util/spinner.py
MingyoJung/ksif
ccb96cc8c0fd4588ddb3e2ee65596691af914f86
[ "MIT" ]
2
2018-07-31T07:45:42.000Z
2018-09-07T07:01:54.000Z
ksif/util/spinner.py
MingyoJung/ksif
ccb96cc8c0fd4588ddb3e2ee65596691af914f86
[ "MIT" ]
2
2018-07-30T10:48:31.000Z
2018-08-02T11:33:24.000Z
ksif/util/spinner.py
MingyoJung/ksif
ccb96cc8c0fd4588ddb3e2ee65596691af914f86
[ "MIT" ]
1
2019-03-01T05:31:21.000Z
2019-03-01T05:31:21.000Z
""" Date : 2018. 9. 1 Author : Jiwoo Park """ import time import threading import itertools import sys class Spinner(): spinner_char = itertools.cycle(['-','/','|','\\']) def __init__(self): self.stop_running = threading.Event() self.spin_thread = threading.Thread(target=self.init_spin) d...
19.8
66
0.589226
import time import threading import itertools import sys class Spinner(): spinner_char = itertools.cycle(['-','/','|','\\']) def __init__(self): self.stop_running = threading.Event() self.spin_thread = threading.Thread(target=self.init_spin) def start(self): self.spin_thread.start...
true
true
f7fdbff52622f6c30779279369d2cd6798075004
1,781
py
Python
cached_path/schemes/s3.py
allenai/cached_path
f89e348e76913183d2bf90cc70db8ca87f4227e2
[ "Apache-2.0" ]
11
2021-09-10T19:25:40.000Z
2022-01-13T07:44:59.000Z
cached_path/schemes/s3.py
allenai/cached_path
f89e348e76913183d2bf90cc70db8ca87f4227e2
[ "Apache-2.0" ]
31
2021-09-09T17:05:56.000Z
2022-03-25T16:10:15.000Z
cached_path/schemes/s3.py
allenai/cached_path
f89e348e76913183d2bf90cc70db8ca87f4227e2
[ "Apache-2.0" ]
2
2021-09-10T19:22:25.000Z
2021-09-15T02:28:04.000Z
""" AWS S3. """ from typing import IO, Optional, Tuple import boto3 import botocore from cached_path.common import _split_cloud_path from cached_path.schemes.scheme_client import SchemeClient from cached_path.tqdm import Tqdm class S3Client(SchemeClient): recoverable_errors = SchemeClient.recoverable_errors + ...
30.706897
88
0.632791
from typing import IO, Optional, Tuple import boto3 import botocore from cached_path.common import _split_cloud_path from cached_path.schemes.scheme_client import SchemeClient from cached_path.tqdm import Tqdm class S3Client(SchemeClient): recoverable_errors = SchemeClient.recoverable_errors + ( botoco...
true
true
f7fdc07b196b86a4aeedff990553d210fcd7a25c
1,126
py
Python
selenium_python_docker_test/test_selenium_remote_webdriver.py
WommyInStandingPosition/YtbDataApiRelated
4856ad2ee5be49bb74c79c3d6649f9d1fdbdc85d
[ "MIT" ]
null
null
null
selenium_python_docker_test/test_selenium_remote_webdriver.py
WommyInStandingPosition/YtbDataApiRelated
4856ad2ee5be49bb74c79c3d6649f9d1fdbdc85d
[ "MIT" ]
null
null
null
selenium_python_docker_test/test_selenium_remote_webdriver.py
WommyInStandingPosition/YtbDataApiRelated
4856ad2ee5be49bb74c79c3d6649f9d1fdbdc85d
[ "MIT" ]
null
null
null
from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.wait import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.desired_capabilities import DesiredCapabilities command_executor = 'http://localhost:4445/...
51.181818
131
0.714032
from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.wait import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.desired_capabilities import DesiredCapabilities command_executor = 'http://localhost:4445/...
true
true
f7fdc15f0f71c624018f6e0e41114b4262a7eb97
39,327
py
Python
vnpy/app/multifactor_strategy/engine.py
AMAZED-FINTECH/vnpy-Amazed-Fintech
b0c938a66e518e1ed87d828566419ee176e0959a
[ "MIT" ]
10
2019-06-18T04:52:38.000Z
2019-12-29T03:11:15.000Z
vnpy/app/multifactor_strategy/engine.py
AMAZED-FINTECH/vnpy-Amazed-Fintech
b0c938a66e518e1ed87d828566419ee176e0959a
[ "MIT" ]
null
null
null
vnpy/app/multifactor_strategy/engine.py
AMAZED-FINTECH/vnpy-Amazed-Fintech
b0c938a66e518e1ed87d828566419ee176e0959a
[ "MIT" ]
null
null
null
"""""" import importlib import os import traceback from collections import defaultdict from pathlib import Path from typing import Any, Callable from datetime import datetime, timedelta from threading import Thread from queue import Queue, Empty from copy import copy, deepcopy import time import psutil import os from...
32.025244
110
0.57383
import importlib import os import traceback from collections import defaultdict from pathlib import Path from typing import Any, Callable from datetime import datetime, timedelta from threading import Thread from queue import Queue, Empty from copy import copy, deepcopy import time import psutil import os from vnpy.e...
true
true
f7fdc17bacc98f3829b24ae777174bfdfee9092a
2,313
py
Python
model-optimizer/extensions/front/image_scaler.py
zhoub/dldt
e42c01cf6e1d3aefa55e2c5df91f1054daddc575
[ "Apache-2.0" ]
3
2020-02-09T23:25:37.000Z
2021-01-19T09:44:12.000Z
model-optimizer/extensions/front/image_scaler.py
zhoub/dldt
e42c01cf6e1d3aefa55e2c5df91f1054daddc575
[ "Apache-2.0" ]
null
null
null
model-optimizer/extensions/front/image_scaler.py
zhoub/dldt
e42c01cf6e1d3aefa55e2c5df91f1054daddc575
[ "Apache-2.0" ]
2
2020-04-18T16:24:39.000Z
2021-01-19T09:42:19.000Z
""" Copyright (c) 2018-2019 Intel 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 i...
37.306452
96
0.671422
import numpy as np from mo.front.common.replacement import FrontReplacementOp from mo.graph.graph import Graph from mo.ops.const import Const from extensions.ops.elementwise import Mul, Add class ImageScaler(FrontReplacementOp): op = "ImageScaler" enabled = True def replace_sub_graph(self, graph: Graph...
true
true
f7fdc18c84175d37b66091643e4c1cc0085e38d1
160,652
py
Python
sympy/matrices/matrices.py
darknight009/sympy
618193720b862a41aa295d474793cc12e4de2927
[ "BSD-3-Clause" ]
1
2021-07-24T12:45:14.000Z
2021-07-24T12:45:14.000Z
sympy/matrices/matrices.py
darknight009/sympy
618193720b862a41aa295d474793cc12e4de2927
[ "BSD-3-Clause" ]
null
null
null
sympy/matrices/matrices.py
darknight009/sympy
618193720b862a41aa295d474793cc12e4de2927
[ "BSD-3-Clause" ]
1
2021-12-31T12:31:28.000Z
2021-12-31T12:31:28.000Z
from __future__ import print_function, division import collections from sympy.core.add import Add from sympy.core.basic import Basic, Atom from sympy.core.expr import Expr from sympy.core.function import count_ops from sympy.core.logic import fuzzy_and from sympy.core.power import Pow from sympy.core.symbol import Sym...
30.237531
115
0.497566
from __future__ import print_function, division import collections from sympy.core.add import Add from sympy.core.basic import Basic, Atom from sympy.core.expr import Expr from sympy.core.function import count_ops from sympy.core.logic import fuzzy_and from sympy.core.power import Pow from sympy.core.symbol import Sym...
true
true
f7fdc19e5ba88c5776654857744917519c8bb7b9
383
py
Python
junction/devices/admin.py
theSage21/junction
ac713edcf56c41eb3f066da776a0a5d24e55b46a
[ "MIT" ]
192
2015-01-12T06:21:24.000Z
2022-03-10T09:57:37.000Z
junction/devices/admin.py
theSage21/junction
ac713edcf56c41eb3f066da776a0a5d24e55b46a
[ "MIT" ]
621
2015-01-01T09:19:17.000Z
2021-05-28T09:27:35.000Z
junction/devices/admin.py
theSage21/junction
ac713edcf56c41eb3f066da776a0a5d24e55b46a
[ "MIT" ]
207
2015-01-05T16:39:06.000Z
2022-02-15T13:18:15.000Z
# -*- coding: utf-8 -*- from django.contrib import admin from junction.base.admin import TimeAuditAdmin from .models import Device # Register your models here. class DeviceAdmin(TimeAuditAdmin): list_display = ( "uuid", "verification_code", "verification_code_sent_at", ) + TimeAudi...
18.238095
46
0.707572
from django.contrib import admin from junction.base.admin import TimeAuditAdmin from .models import Device class DeviceAdmin(TimeAuditAdmin): list_display = ( "uuid", "verification_code", "verification_code_sent_at", ) + TimeAuditAdmin.list_display admin.site.register(Device, D...
true
true
f7fdc274be50a8252ecd3e7cf4fc1e9376cc1836
2,566
py
Python
t2t_bert/utils/data_ops/dataset_ops.py
yyht/bert
480c909e0835a455606e829310ff949c9dd23549
[ "Apache-2.0" ]
34
2018-12-19T01:00:57.000Z
2021-03-26T09:36:37.000Z
t2t_bert/utils/data_ops/dataset_ops.py
yyht/bert
480c909e0835a455606e829310ff949c9dd23549
[ "Apache-2.0" ]
11
2018-12-25T03:37:59.000Z
2021-08-25T14:43:58.000Z
t2t_bert/utils/data_ops/dataset_ops.py
yyht/bert
480c909e0835a455606e829310ff949c9dd23549
[ "Apache-2.0" ]
9
2018-12-27T08:00:44.000Z
2020-06-08T03:05:14.000Z
from utils.data_ops import structure as structure_lib def get_structure(dataset_or_iterator): """Returns the `tf.data.experimental.Structure` of a `Dataset` or `Iterator`. Args: dataset_or_iterator: A `tf.data.Dataset`, `tf.compat.v1.data.Iterator`, or `IteratorV2`. Returns: A `tf.data.experimenta...
42.065574
107
0.746298
from utils.data_ops import structure as structure_lib def get_structure(dataset_or_iterator): try: ret = dataset_or_iterator._element_structure if isinstance(ret, structure_lib.Structure): return ret except AttributeError: pass raise TypeError("`dataset_or_iterator` must be a Dataset or Iter...
true
true
f7fdc2f6f7ee603e52d2b7d7c42ebf21cbf52d56
3,360
py
Python
src/zope/browserpage/viewpagetemplatefile.py
zopefoundation/zope.browserpage
0965ae7606eebdc6b997da46a8b065a1e4afd8ba
[ "ZPL-2.1" ]
null
null
null
src/zope/browserpage/viewpagetemplatefile.py
zopefoundation/zope.browserpage
0965ae7606eebdc6b997da46a8b065a1e4afd8ba
[ "ZPL-2.1" ]
5
2016-03-24T07:52:49.000Z
2020-10-08T15:14:26.000Z
src/zope/browserpage/viewpagetemplatefile.py
zopefoundation/zope.browserpage
0965ae7606eebdc6b997da46a8b065a1e4afd8ba
[ "ZPL-2.1" ]
1
2015-04-03T08:17:11.000Z
2015-04-03T08:17:11.000Z
############################################################################## # # Copyright (c) 2001, 2002 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # TH...
35.744681
78
0.649702
true
true
f7fdc3b6a60e3883b491028b2a74d931f5c6e2ad
147
py
Python
PapMinPy/author.py
KKGanguly/PapMinPy
5ad699ee1dc948150b1e01d77f5e5fffef84c196
[ "MIT" ]
3
2018-03-22T10:57:30.000Z
2018-03-23T12:07:58.000Z
PapMinPy/author.py
KKGanguly/PapMinPy
5ad699ee1dc948150b1e01d77f5e5fffef84c196
[ "MIT" ]
null
null
null
PapMinPy/author.py
KKGanguly/PapMinPy
5ad699ee1dc948150b1e01d77f5e5fffef84c196
[ "MIT" ]
null
null
null
import json class Author: surname="" givenName="" def toJSON(self): return dict(surname=self.surname,givenName=self.givenName)
21
66
0.680272
import json class Author: surname="" givenName="" def toJSON(self): return dict(surname=self.surname,givenName=self.givenName)
true
true
f7fdc3def8907b373b431d91e6bc835bef2bd64f
5,872
py
Python
scout/commands/export/variant.py
mhkc/scout
a7162f28c0f3490c3f3376268118fa8e6072a9db
[ "BSD-3-Clause" ]
null
null
null
scout/commands/export/variant.py
mhkc/scout
a7162f28c0f3490c3f3376268118fa8e6072a9db
[ "BSD-3-Clause" ]
null
null
null
scout/commands/export/variant.py
mhkc/scout
a7162f28c0f3490c3f3376268118fa8e6072a9db
[ "BSD-3-Clause" ]
null
null
null
import os import click import logging import datetime from flask.cli import with_appcontext from bson.json_util import dumps from xlsxwriter import Workbook from scout.export.variant import export_variants, export_verified_variants from .utils import json_option from scout.constants import CALLERS from scout.constants...
31.913043
100
0.661785
import os import click import logging import datetime from flask.cli import with_appcontext from bson.json_util import dumps from xlsxwriter import Workbook from scout.export.variant import export_variants, export_verified_variants from .utils import json_option from scout.constants import CALLERS from scout.constants...
true
true
f7fdc47afa8d16ed2a4347263911ee6667d5b9ef
74,684
py
Python
pandas/io/sql.py
tyuyoshi/pandas
4e034ec0006b6c05160ce67ea1420ce28f295c91
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
1
2022-03-03T11:26:55.000Z
2022-03-03T11:26:55.000Z
pandas/io/sql.py
tyuyoshi/pandas
4e034ec0006b6c05160ce67ea1420ce28f295c91
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
1
2021-12-01T03:10:17.000Z
2021-12-23T20:27:21.000Z
pandas/io/sql.py
tyuyoshi/pandas
4e034ec0006b6c05160ce67ea1420ce28f295c91
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
""" Collection of query wrappers / abstractions to both facilitate data retrieval and to reduce dependency on DB-specific API. """ from __future__ import annotations from contextlib import contextmanager from datetime import ( date, datetime, time, ) from functools import partial import re from typing imp...
33.148691
120
0.581343
from __future__ import annotations from contextlib import contextmanager from datetime import ( date, datetime, time, ) from functools import partial import re from typing import ( Any, Iterator, Sequence, cast, overload, ) import warnings import numpy as np import pandas._libs.lib a...
true
true
f7fdc54e14c5e6092dc79862a68525f099901e73
2,402
py
Python
greenberry/cmds/start_funcs.py
greenberrycoin/gbch-blockchain
d99843d720c6e7bd7baaf8bb4639a46dbb56caed
[ "Apache-2.0" ]
null
null
null
greenberry/cmds/start_funcs.py
greenberrycoin/gbch-blockchain
d99843d720c6e7bd7baaf8bb4639a46dbb56caed
[ "Apache-2.0" ]
null
null
null
greenberry/cmds/start_funcs.py
greenberrycoin/gbch-blockchain
d99843d720c6e7bd7baaf8bb4639a46dbb56caed
[ "Apache-2.0" ]
null
null
null
import asyncio import os import subprocess import sys from pathlib import Path from typing import Optional from greenberry.daemon.client import DaemonProxy, connect_to_daemon_and_validate from greenberry.util.service_groups import services_for_groups def launch_start_daemon(root_path: Path) -> subprocess.Popen: ...
34.811594
90
0.642798
import asyncio import os import subprocess import sys from pathlib import Path from typing import Optional from greenberry.daemon.client import DaemonProxy, connect_to_daemon_and_validate from greenberry.util.service_groups import services_for_groups def launch_start_daemon(root_path: Path) -> subprocess.Popen: ...
true
true
f7fdc552f7ecb99de31eeaf956540da0b2278715
2,076
py
Python
InstagramAPI/src/http/Response/Objects/User.py
partizan007/Instagram-API
3435dc6855e1cccf2c85a41839d15ca930563b21
[ "MIT" ]
126
2016-05-18T19:20:32.000Z
2022-02-12T10:30:50.000Z
InstagramAPI/src/http/Response/Objects/User.py
partizan007/Instagram-API
3435dc6855e1cccf2c85a41839d15ca930563b21
[ "MIT" ]
41
2016-08-07T17:32:37.000Z
2022-01-13T00:25:31.000Z
InstagramAPI/src/http/Response/Objects/User.py
partizan007/Instagram-API
3435dc6855e1cccf2c85a41839d15ca930563b21
[ "MIT" ]
61
2016-07-07T14:18:38.000Z
2021-03-28T12:48:26.000Z
from InstagramAPI.src.http.Response.Objects.FriendshipStatus import FriendshipStatus class User(object): def __init__(self, userData): self.username = None self.has_anonymous_profile_picture = False self.is_favorite = False self.profile_pic_url = None self.full_name = None ...
33.483871
101
0.679672
from InstagramAPI.src.http.Response.Objects.FriendshipStatus import FriendshipStatus class User(object): def __init__(self, userData): self.username = None self.has_anonymous_profile_picture = False self.is_favorite = False self.profile_pic_url = None self.full_name = None ...
true
true
f7fdc5668ed5d1e051febae0930901b26d1090bc
786
py
Python
pyexcel/plugins/renderers/__init__.py
hiaselhans/pyexcel
4c96909eaa7ec322f28207f43e41f1fff07d8123
[ "BSD-3-Clause" ]
null
null
null
pyexcel/plugins/renderers/__init__.py
hiaselhans/pyexcel
4c96909eaa7ec322f28207f43e41f1fff07d8123
[ "BSD-3-Clause" ]
null
null
null
pyexcel/plugins/renderers/__init__.py
hiaselhans/pyexcel
4c96909eaa7ec322f28207f43e41f1fff07d8123
[ "BSD-3-Clause" ]
null
null
null
""" pyexcel.plugins.renderers ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ A list of built-in renderers :copyright: (c) 2015-2022 by Onni Software Ltd. :license: New BSD License """ from pyexcel.plugins import PyexcelPluginChain from pyexcel_io.plugins import WRITERS from pyexcel_io.constants import DB_SQL, DB_...
29.111111
78
0.745547
from pyexcel.plugins import PyexcelPluginChain from pyexcel_io.plugins import WRITERS from pyexcel_io.constants import DB_SQL, DB_DJANGO PyexcelPluginChain(__name__).add_a_renderer( relative_plugin_class_path="sqlalchemy.SQLAlchemyRenderer", file_types=[DB_SQL], ).add_a_renderer( relative_plugin_class_pat...
true
true
f7fdc632b63b56e6ac7db5f3721b8ac23214eb58
14,597
py
Python
tests/transformations/transformations_utils.py
cmutel/Ocelot
20e9639570c43f84ae255750a6c402ebabe00981
[ "BSD-3-Clause" ]
21
2016-06-01T14:10:07.000Z
2022-02-28T01:56:31.000Z
tests/transformations/transformations_utils.py
cmutel/Ocelot
20e9639570c43f84ae255750a6c402ebabe00981
[ "BSD-3-Clause" ]
152
2016-05-16T21:33:22.000Z
2019-06-24T12:57:14.000Z
tests/transformations/transformations_utils.py
cmutel/Ocelot
20e9639570c43f84ae255750a6c402ebabe00981
[ "BSD-3-Clause" ]
12
2016-09-05T15:35:59.000Z
2021-07-03T19:28:47.000Z
# -*- coding: utf-8 -*- from ocelot.errors import InvalidMultioutputDataset, ZeroProduction from ocelot.transformations.uncertainty import remove_exchange_uncertainty from ocelot.transformations.utils import * from ocelot.utils import get_function_meta import pytest def test_allocatable_production(): exchanges = ...
30.221532
89
0.555525
from ocelot.errors import InvalidMultioutputDataset, ZeroProduction from ocelot.transformations.uncertainty import remove_exchange_uncertainty from ocelot.transformations.utils import * from ocelot.utils import get_function_meta import pytest def test_allocatable_production(): exchanges = [ {'type': 'ref...
true
true
f7fdc6d798a802b061a34ada5a01b6aebd4cb6cb
3,601
py
Python
sdk/keyvault/azure-keyvault-secrets/samples/backup_restore_operations_async.py
tzhanl/azure-sdk-for-python
18cd03f4ab8fd76cc0498f03e80fbc99f217c96e
[ "MIT" ]
1
2021-06-02T08:01:35.000Z
2021-06-02T08:01:35.000Z
sdk/keyvault/azure-keyvault-secrets/samples/backup_restore_operations_async.py
tzhanl/azure-sdk-for-python
18cd03f4ab8fd76cc0498f03e80fbc99f217c96e
[ "MIT" ]
null
null
null
sdk/keyvault/azure-keyvault-secrets/samples/backup_restore_operations_async.py
tzhanl/azure-sdk-for-python
18cd03f4ab8fd76cc0498f03e80fbc99f217c96e
[ "MIT" ]
null
null
null
# ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ import asyncio import os from azure.keyvault.secrets.aio import SecretClient from azure.identity.aio import DefaultAzureCredential from azure.core.exceptions import Http...
46.166667
125
0.631491
import asyncio import os from azure.keyvault.secrets.aio import SecretClient from azure.identity.aio import DefaultAzureCredential from azure.core.exceptions import HttpResponseError n_sample(): VAULT_URL = os.environ["VAULT_URL"] credential = DefaultAzureCredential() client...
true
true
f7fdc756cae32f809030a4d54be7f39f3dad94a3
2,376
py
Python
src/data/modelling_movement.py
Albert-GM/TFM
2574f7cd1411ff253d045c7dff894de36659aae8
[ "MIT" ]
null
null
null
src/data/modelling_movement.py
Albert-GM/TFM
2574f7cd1411ff253d045c7dff894de36659aae8
[ "MIT" ]
null
null
null
src/data/modelling_movement.py
Albert-GM/TFM
2574f7cd1411ff253d045c7dff894de36659aae8
[ "MIT" ]
null
null
null
# ============================================================================= # Makes a model simulating the movement of people between countries. # ============================================================================= import pandas as pd import numpy as np import networkx as nx import os import re root_pro...
36
79
0.673401
import pandas as pd import numpy as np import networkx as nx import os import re root_project = re.findall(r'(^\S*TFM)', os.getcwd())[0] df = pd.read_pickle(f"{root_project}/data/interim/country_info_nonans.pickle") df_move = df.loc[:, ['country_name', 'country_code']] df_move['arrivals/day'] = df['arrivals'] /...
true
true
f7fdc76521540ed1826fa0bcaaaa7dd3534f1785
8,991
py
Python
src/settings.py
roadlit/vandal
20ca417876e7052fd5b40b381eafca234cbb0bf8
[ "BSD-3-Clause" ]
109
2017-12-09T23:49:36.000Z
2022-03-10T11:52:54.000Z
src/settings.py
lukerQuant/vandal
a7160969494263bc5989ccb4ccff3defea23fe45
[ "BSD-3-Clause" ]
46
2017-12-09T06:06:49.000Z
2022-01-07T13:35:18.000Z
src/settings.py
lukerQuant/vandal
a7160969494263bc5989ccb4ccff3defea23fe45
[ "BSD-3-Clause" ]
39
2017-12-08T11:13:43.000Z
2022-02-28T09:07:27.000Z
# BSD 3-Clause License # # Copyright (c) 2016, 2017, The University of Sydney. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright no...
35.258824
116
0.748081
max_iterations = None bailout_seconds = None remove_unreachable = None merge_unreachable = None die_on_empty_pop = None skip_stack_on_overflow = None reinit_stacks = None hook_up_stack_vars = None hook_up_jumps = None mutate_jumps = None generate_throws = None final_mutate_jumps = None fi...
true
true
f7fdc8ca01ef7ed880bb6aa1de30b30a02e6f042
248,656
py
Python
geemap/geemap.py
mtoqeerpk/geemap
70ebe305d25a7a5a5191b24595b4180fb7962f52
[ "MIT" ]
null
null
null
geemap/geemap.py
mtoqeerpk/geemap
70ebe305d25a7a5a5191b24595b4180fb7962f52
[ "MIT" ]
null
null
null
geemap/geemap.py
mtoqeerpk/geemap
70ebe305d25a7a5a5191b24595b4180fb7962f52
[ "MIT" ]
1
2021-07-18T14:52:48.000Z
2021-07-18T14:52:48.000Z
"""Main module for interactive mapping using Google Earth Engine Python API and ipyleaflet. Keep in mind that Earth Engine functions use both camel case and snake case, such as setOptions(), setCenter(), centerObject(), addLayer(). ipyleaflet functions use snake case, such as add_tile_layer(), add_wms_layer(), add_mini...
38.986516
452
0.590684
import colour import ee import geocoder import ipyleaflet import math import os import time import ipywidgets as widgets from bqplot import pyplot as plt from ipyfilechooser import FileChooser from ipyleaflet import * from ipytree import Tree, Node from IPython.display import display from .basemaps import ee_basemaps ...
true
true
f7fdc99b72357a26806137abf448bcc577cab82d
3,742
py
Python
azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/image_os_disk_py3.py
ashirey-msft/azure-sdk-for-python
e04778e13306dad2e8fb044970215bad6296afb6
[ "MIT" ]
null
null
null
azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/image_os_disk_py3.py
ashirey-msft/azure-sdk-for-python
e04778e13306dad2e8fb044970215bad6296afb6
[ "MIT" ]
null
null
null
azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/image_os_disk_py3.py
ashirey-msft/azure-sdk-for-python
e04778e13306dad2e8fb044970215bad6296afb6
[ "MIT" ]
1
2018-08-28T14:36:47.000Z
2018-08-28T14:36:47.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
47.367089
182
0.65954
from msrest.serialization import Model class ImageOSDisk(Model): _validation = { 'os_type': {'required': True}, 'os_state': {'required': True}, } _attribute_map = { 'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'}, 'os_state': {'key': 'osState', 'ty...
true
true
f7fdcc6b2b516329734a1c19749bfc557a6c4e40
391
py
Python
sizakat/wsgi.py
artmxra7/sizkt-backend
49263b7d937ac62307b8ced47fa1497226f1d4cc
[ "MIT" ]
null
null
null
sizakat/wsgi.py
artmxra7/sizkt-backend
49263b7d937ac62307b8ced47fa1497226f1d4cc
[ "MIT" ]
5
2021-03-30T14:16:46.000Z
2021-09-22T19:38:45.000Z
sizakat/wsgi.py
artmxra7/sizkt-backend
49263b7d937ac62307b8ced47fa1497226f1d4cc
[ "MIT" ]
1
2020-11-14T02:58:29.000Z
2020-11-14T02:58:29.000Z
""" WSGI config for sizakat project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.0/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTI...
23
78
0.785166
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'sizakat.settings') application = get_wsgi_application()
true
true
f7fdcd5a5a66bda9b8e917b753ad6475909d0e8d
1,894
py
Python
utils/swift_build_support/swift_build_support/products/indexstoredb.py
orakaro/swift
e6ae7867bfd017a614b78a320618a1b675d6b82f
[ "Apache-2.0" ]
3
2019-06-25T10:54:55.000Z
2020-07-07T10:29:53.000Z
utils/swift_build_support/swift_build_support/products/indexstoredb.py
liangliang12/swift
e7c294a076b41a9c87be99bf28d91f864977012a
[ "Apache-2.0" ]
null
null
null
utils/swift_build_support/swift_build_support/products/indexstoredb.py
liangliang12/swift
e7c294a076b41a9c87be99bf28d91f864977012a
[ "Apache-2.0" ]
null
null
null
# swift_build_support/products/indexstoredb.py -------------------*- python -*- # # This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See https://swift.org/LICENSE.t...
32.655172
79
0.653643
import os import platform from . import product from .. import shell from .. import targets class IndexStoreDB(product.Product): @classmethod def product_source_name(cls): return "indexstore-db" @classmethod def is_build_script_impl_product(cls): return False def bui...
true
true
f7fdcdb6485fbe32cd6afbac28f4491107befbc0
2,519
py
Python
src/responsive/Responsive.py
zhengtong0898/django-decode
69680853a4a5b07f6a9c4b65c7d86b2d401a92b1
[ "MIT" ]
5
2020-07-14T07:48:10.000Z
2021-12-20T21:20:10.000Z
src/responsive/Responsive.py
zhengtong0898/django-decode
69680853a4a5b07f6a9c4b65c7d86b2d401a92b1
[ "MIT" ]
7
2021-03-26T03:13:38.000Z
2022-03-12T00:42:03.000Z
src/responsive/Responsive.py
zhengtong0898/django-decode
69680853a4a5b07f6a9c4b65c7d86b2d401a92b1
[ "MIT" ]
1
2021-02-16T07:04:25.000Z
2021-02-16T07:04:25.000Z
import wx import wx.grid import typing from pubsub import pub class MainFrame(wx.Frame): def __init__(self): wx.Frame.__init__(self, parent=None, title="A Simple Grid", size=(900, 400)) self.panel = wx.Panel(self) pub.subscribe(self.grid_rerender, "grid_rerender") # grid_...
41.983333
117
0.500198
import wx import wx.grid import typing from pubsub import pub class MainFrame(wx.Frame): def __init__(self): wx.Frame.__init__(self, parent=None, title="A Simple Grid", size=(900, 400)) self.panel = wx.Panel(self) pub.subscribe(self.grid_rerender, "grid_rerender") ...
true
true
f7fdcf18f27e413c741d140937778af39416871a
4,565
py
Python
CAAPR/CAAPR_AstroMagic/PTS/pts/do/magic/subtract.py
wdobbels/CAAPR
50d0b32642a61af614c22f1c6dc3c4a00a1e71a3
[ "MIT" ]
7
2016-05-20T21:56:39.000Z
2022-02-07T21:09:48.000Z
CAAPR/CAAPR_AstroMagic/PTS/pts/do/magic/subtract.py
wdobbels/CAAPR
50d0b32642a61af614c22f1c6dc3c4a00a1e71a3
[ "MIT" ]
1
2019-03-21T16:10:04.000Z
2019-03-22T17:21:56.000Z
CAAPR/CAAPR_AstroMagic/PTS/pts/do/magic/subtract.py
wdobbels/CAAPR
50d0b32642a61af614c22f1c6dc3c4a00a1e71a3
[ "MIT" ]
1
2020-05-19T16:17:17.000Z
2020-05-19T16:17:17.000Z
#!/usr/bin/env python # -*- coding: utf8 -*- # ***************************************************************** # ** PTS -- Python Toolkit for working with SKIRT ** # ** © Astronomical Observatory, Ghent University ** # ***************************************************************** ##...
38.686441
136
0.674918
t os import argparse from pts.magic.misc.imageimporter import ImageImporter from pts.magic.sky.skysubtractor import SkySubtractor from pts.magic.basics.mask import Mask from pts.core.tools import configuration parser = argparse.ArgumentParser() parser.add_argument("image", type=str, help="the name of the...
true
true
f7fdcfdf21ac4ecf1f8b843bdc7b5446d47bbba7
642
py
Python
diffie_helman.py
kbrezinski/Cryptography-Encryption
0d44c06a509fb5b3b85cad10ac0e98264490fd01
[ "BSD-3-Clause" ]
null
null
null
diffie_helman.py
kbrezinski/Cryptography-Encryption
0d44c06a509fb5b3b85cad10ac0e98264490fd01
[ "BSD-3-Clause" ]
null
null
null
diffie_helman.py
kbrezinski/Cryptography-Encryption
0d44c06a509fb5b3b85cad10ac0e98264490fd01
[ "BSD-3-Clause" ]
null
null
null
key_a = 17 key_b = 44_207 g = 3 n = 57_349 message = "IM THE WINNER AND YOU'RE NOT!" # encrypt function given key, g, n def encrypt(key: int, g: int, n: int): ans = pow(g, key, n) print(f"{key=} {ans=}") return ans def encrypt_message(key: int, text: str): cipher = '' for i, c in enumerate(r...
16.461538
51
0.615265
key_a = 17 key_b = 44_207 g = 3 n = 57_349 message = "IM THE WINNER AND YOU'RE NOT!" # encrypt function given key, g, n def encrypt(key: int, g: int, n: int): ans = pow(g, key, n) print(f"{key=} {ans=}") return ans def encrypt_message(key: int, text: str): cipher = '' for i, c in enumerate(r...
true
true
f7fdcff2cbc6d59473e407d5d13b4d592c160dad
5,701
py
Python
django/docs/releases/0.95.txt.py
roshanba/mangal
f7b428811dc07214009cc33f0beb665ead402038
[ "bzip2-1.0.6", "MIT" ]
null
null
null
django/docs/releases/0.95.txt.py
roshanba/mangal
f7b428811dc07214009cc33f0beb665ead402038
[ "bzip2-1.0.6", "MIT" ]
null
null
null
django/docs/releases/0.95.txt.py
roshanba/mangal
f7b428811dc07214009cc33f0beb665ead402038
[ "bzip2-1.0.6", "MIT" ]
null
null
null
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXX XXXXXXX XXXX XXXXXXX XXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXX XX XXX XXXXXX XXXX XXXXXXXX XXXX XXXXXXXXXX X XXXXXXXXXXX XXXXXXX XX XXXXXX XXXXXXXXXXX XXXXX XXX XXXX XXXXXXX XX XXXXXXX XXXXX XXX XXXXXXX XX XXXXX XXXXXX XX XXXX XXXXXXX XXXXX XX XXX XXXXXXXXX XX XXXX XX XX...
46.349593
79
0.83652
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXX XXXXXXX XXXX XXXXXXX XXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXX XX XXX XXXXXX XXXX XXXXXXXX XXXX XXXXXXXXXX X XXXXXXXXXXX XXXXXXX XX XXXXXX XXXXXXXXXXX XXXXX XXX XXXX XXXXXXX XX XXXXXXX XXXXX XXX XXXXXXX XX XXXXX XXXXXX XX XXXX XXXXXXX XXXXX XX XXX XXXXXXXXX XX XXXX XX XX...
false
true
f7fdd0cf28d58b12a407b6868232dd098064d4dd
164
py
Python
jp.atcoder/abc088/abc088_a/8710718.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
1
2022-02-09T03:06:25.000Z
2022-02-09T03:06:25.000Z
jp.atcoder/abc088/abc088_a/8710718.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
1
2022-02-05T22:53:18.000Z
2022-02-09T01:29:30.000Z
jp.atcoder/abc088/abc088_a/8710718.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
null
null
null
import sys def main(): n, a = map(int, sys.stdin.read().split()) print("Yes" if n % 500 <= a else "No") if __name__ == "__main__": main()
14.909091
46
0.512195
import sys def main(): n, a = map(int, sys.stdin.read().split()) print("Yes" if n % 500 <= a else "No") if __name__ == "__main__": main()
true
true
f7fdd1975d4756109c9cbe2a682b60c81f8ca70f
5,950
py
Python
kanga/forms.py
deptofdefense/kanga
9c8d926a4828e2fca528915ddf35759d1c328c85
[ "MIT" ]
1
2022-03-05T01:17:59.000Z
2022-03-05T01:17:59.000Z
kanga/forms.py
deptofdefense/kanga
9c8d926a4828e2fca528915ddf35759d1c328c85
[ "MIT" ]
null
null
null
kanga/forms.py
deptofdefense/kanga
9c8d926a4828e2fca528915ddf35759d1c328c85
[ "MIT" ]
null
null
null
# ================================================================= # # Work of the U.S. Department of Defense, Defense Digital Service. # Released as open source under the MIT License. See LICENSE file. # # ================================================================= from django import forms from kanga import ...
34.593023
104
0.635294
from django import forms from kanga import settings from kanga.models import Group, Origin, Template class NewAccountForm(forms.Form): name = forms.CharField(max_length=255) sid = forms.CharField(max_length=255) auth_token = forms.CharField(max_length=255) active = forms.CharField(max_length=...
true
true
f7fdd2db2d51ec9818fe7ce7742cef0c58691de1
2,496
py
Python
ietf/secr/proceedings/urls.py
wpjesus/codematch
eee7405259cce9239ea0545a2a1300ee1accfe94
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
1
2015-09-02T19:53:12.000Z
2015-09-02T19:53:12.000Z
ietf/secr/proceedings/urls.py
wpjesus/codematch
eee7405259cce9239ea0545a2a1300ee1accfe94
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
ietf/secr/proceedings/urls.py
wpjesus/codematch
eee7405259cce9239ea0545a2a1300ee1accfe94
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
from django.conf.urls import patterns, url urlpatterns = patterns('ietf.secr.proceedings.views', url(r'^$', 'main', name='proceedings'), url(r'^ajax/generate-proceedings/(?P<meeting_num>\d{1,3})/$', 'ajax_generate_proceedings', name='proceedings_ajax_generate_proceedings'), url(r'^ajax/get-sessions/(?P<mee...
78
147
0.652644
from django.conf.urls import patterns, url urlpatterns = patterns('ietf.secr.proceedings.views', url(r'^$', 'main', name='proceedings'), url(r'^ajax/generate-proceedings/(?P<meeting_num>\d{1,3})/$', 'ajax_generate_proceedings', name='proceedings_ajax_generate_proceedings'), url(r'^ajax/get-sessions/(?P<mee...
true
true
f7fdd357552cff30f0e88b40e5b0f1d75ab20fd9
781
py
Python
django_import_data/migrations/0011_auto_20190705_1351.py
GreenBankObservatory/django-import-data
80b75f5a1a750c75c1d9f6c759a357cf600d4a5e
[ "MIT" ]
1
2021-09-22T14:37:41.000Z
2021-09-22T14:37:41.000Z
django_import_data/migrations/0011_auto_20190705_1351.py
GreenBankObservatory/django-import-data
80b75f5a1a750c75c1d9f6c759a357cf600d4a5e
[ "MIT" ]
null
null
null
django_import_data/migrations/0011_auto_20190705_1351.py
GreenBankObservatory/django-import-data
80b75f5a1a750c75c1d9f6c759a357cf600d4a5e
[ "MIT" ]
null
null
null
# Generated by Django 2.2.2 on 2019-07-05 17:51 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('django_import_data', '0010_auto_20190705_1323'), ] operations = [ migrations.RemoveField( model...
32.541667
255
0.681178
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('django_import_data', '0010_auto_20190705_1323'), ] operations = [ migrations.RemoveField( model_name='modelimportattempt', name='f...
true
true
f7fdd4f9975efb6ebc2d2a7ed003922a73542a88
575
py
Python
todo_list/migrations/0003_auto_20181104_1142.py
zzerjae/TODO-List
7410bd99385b22098ca842396634329e47c73a29
[ "MIT" ]
null
null
null
todo_list/migrations/0003_auto_20181104_1142.py
zzerjae/TODO-List
7410bd99385b22098ca842396634329e47c73a29
[ "MIT" ]
1
2019-05-23T02:38:57.000Z
2019-07-03T15:08:42.000Z
todo_list/migrations/0003_auto_20181104_1142.py
zzerjae/TODO-List
7410bd99385b22098ca842396634329e47c73a29
[ "MIT" ]
null
null
null
# Generated by Django 2.1.2 on 2018-11-04 02:42 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('todo_list', '0002_auto_20181101_2325'), ] operations = [ migrations.AlterField( model_name='todo', name='priority', ...
23.958333
70
0.587826
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('todo_list', '0002_auto_20181101_2325'), ] operations = [ migrations.AlterField( model_name='todo', name='priority', field=models.PositiveIntegerField(v...
true
true
f7fdd504f92b09c803f1c972adb486e08c18b940
29,200
py
Python
pymysqlreplication/tests/test_data_type.py
marching-cube/python-mysql-replication
54e84afe0ffdc02ddc69653c6ecba5e862c808f5
[ "Apache-2.0" ]
null
null
null
pymysqlreplication/tests/test_data_type.py
marching-cube/python-mysql-replication
54e84afe0ffdc02ddc69653c6ecba5e862c808f5
[ "Apache-2.0" ]
null
null
null
pymysqlreplication/tests/test_data_type.py
marching-cube/python-mysql-replication
54e84afe0ffdc02ddc69653c6ecba5e862c808f5
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import copy import platform import sys if sys.version_info < (2, 7): import unittest2 as unittest else: import unittest from decimal import Decimal from pymysqlreplication.tests import base from pymysqlreplication.constants.BINLOG import * from pymysqlreplication.row_event import * fr...
48.747913
159
0.63637
import copy import platform import sys if sys.version_info < (2, 7): import unittest2 as unittest else: import unittest from decimal import Decimal from pymysqlreplication.tests import base from pymysqlreplication.constants.BINLOG import * from pymysqlreplication.row_event import * from pymysqlreplication.e...
true
true
f7fdd52c99651adf569d5833e47ab1c4d6a723af
5,116
py
Python
contrib/linearize/linearize-hashes.py
Darrenshome40/shitecoin
a2535c8fc5a43ee21ec818d5367439f6302cd084
[ "MIT" ]
null
null
null
contrib/linearize/linearize-hashes.py
Darrenshome40/shitecoin
a2535c8fc5a43ee21ec818d5367439f6302cd084
[ "MIT" ]
null
null
null
contrib/linearize/linearize-hashes.py
Darrenshome40/shitecoin
a2535c8fc5a43ee21ec818d5367439f6302cd084
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # # linearize-hashes.py: List blocks in a linear, no-fork version of the chain. # # Copyright (c) 2013-2019 The shitecoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # from http.client i...
33.437908
108
0.607506
from http.client import HTTPConnection import json import re import base64 import sys import os import os.path settings = {} def hex_switchEndian(s): pairList = [s[i:i+2].encode() for i in range(0, len(s), 2)] return b''.join(pairList[::-1]).decode() class shitecoinRPC: def __init__(self, host, ...
true
true
f7fdd5bc80e595be22faeed0580a4c27329ccb0c
11,841
py
Python
tests/models/dsheetpiling/test_profiles.py
Deltares/GEOLib
73c3f325ba40a3e0c586e337541d491f4296f50c
[ "MIT" ]
4
2021-10-29T21:30:47.000Z
2022-03-18T13:15:17.000Z
tests/models/dsheetpiling/test_profiles.py
Deltares/GEOLib
73c3f325ba40a3e0c586e337541d491f4296f50c
[ "MIT" ]
3
2021-11-05T07:56:16.000Z
2022-03-27T13:27:05.000Z
tests/models/dsheetpiling/test_profiles.py
Deltares/GEOLib
73c3f325ba40a3e0c586e337541d491f4296f50c
[ "MIT" ]
4
2021-10-29T21:30:51.000Z
2022-01-17T13:20:40.000Z
from contextlib import nullcontext as does_not_raise from typing import Callable, List import pytest from pydantic import ValidationError from geolib.geometry.one import Point from geolib.models.dsheetpiling.dsheetpiling_model import DSheetPilingModel from geolib.models.dsheetpiling.internal import _DEFAULT_SOIL_PROF...
35.990881
101
0.638966
from contextlib import nullcontext as does_not_raise from typing import Callable, List import pytest from pydantic import ValidationError from geolib.geometry.one import Point from geolib.models.dsheetpiling.dsheetpiling_model import DSheetPilingModel from geolib.models.dsheetpiling.internal import _DEFAULT_SOIL_PROF...
true
true
f7fdd607971950a60b86a93c23218877e186c5cc
15,243
py
Python
onnxruntime/core/providers/nuphar/scripts/model_quantizer.py
toothache/onnxruntime
217b2c9f931b5b0f704df0c8336def47025d2148
[ "MIT" ]
1
2021-09-15T08:20:39.000Z
2021-09-15T08:20:39.000Z
onnxruntime/core/providers/nuphar/scripts/model_quantizer.py
toothache/onnxruntime
217b2c9f931b5b0f704df0c8336def47025d2148
[ "MIT" ]
1
2021-03-01T23:16:36.000Z
2021-03-01T23:16:36.000Z
onnxruntime/core/providers/nuphar/scripts/model_quantizer.py
toothache/onnxruntime
217b2c9f931b5b0f704df0c8336def47025d2148
[ "MIT" ]
3
2019-01-08T12:19:04.000Z
2020-05-09T21:33:12.000Z
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. # -*- coding: UTF-8 -*- import argparse from enum import Enum import json import numpy as np import onnx from onnx import helper, numpy_helper from .node_factory import NodeFactory, ensure_opset class QuantizeConfig: def...
50.641196
225
0.627698
import argparse from enum import Enum import json import numpy as np import onnx from onnx import helper, numpy_helper from .node_factory import NodeFactory, ensure_opset class QuantizeConfig: def __init__(self, signed, reserved_bits, type_bits): self.sign_bit_ = 1 if signed else 0 self.reserve...
true
true
f7fdd6e9085a256e0332aa09cdad5fd35513793d
43,477
py
Python
test/functional/wallet_importmulti.py
arnoldcho/superman
2b581db736c2e5dbc7346b76a42d34ece92416fa
[ "MIT" ]
128
2018-02-06T00:54:33.000Z
2022-03-31T13:58:18.000Z
test/functional/wallet_importmulti.py
arnoldcho/superman
2b581db736c2e5dbc7346b76a42d34ece92416fa
[ "MIT" ]
101
2018-02-08T05:30:56.000Z
2022-03-31T23:17:46.000Z
test/functional/wallet_importmulti.py
arnoldcho/superman
2b581db736c2e5dbc7346b76a42d34ece92416fa
[ "MIT" ]
93
2018-02-05T23:36:22.000Z
2022-03-17T15:38:08.000Z
#!/usr/bin/env python3 # Copyright (c) 2014-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the importmulti RPC. Test importmulti by generating keys on node0, importing the scriptPubKeys an...
50.378911
316
0.556915
from test_framework.script import ( CScript, OP_NOP, ) from test_framework.test_framework import BitcoinTestFramework from test_framework.descriptors import descsum_create from test_framework.util import ( assert_equal, assert_greater_than, assert_raises_rpc_error, ) from test_framework.wallet_...
true
true
f7fdd74267cb0c7793d9b3516f920b3f7c301469
1,453
py
Python
ALGO/graph/dp__floyd_warshall__all_pair_shortest_path.py
jainrocky/LORD
15c923129f6d5e024f6606a7d6005adfc9f9af90
[ "MIT" ]
2
2020-09-24T21:24:26.000Z
2021-11-03T09:15:40.000Z
ALGO/graph/dp__floyd_warshall__all_pair_shortest_path.py
jainrocky/LORD
15c923129f6d5e024f6606a7d6005adfc9f9af90
[ "MIT" ]
4
2021-06-08T22:23:44.000Z
2022-03-12T00:48:19.000Z
ALGO/graph/dp__floyd_warshall__all_pair_shortest_path.py
jainrocky/LORD
15c923129f6d5e024f6606a7d6005adfc9f9af90
[ "MIT" ]
1
2021-02-22T06:11:38.000Z
2021-02-22T06:11:38.000Z
import os, sys inf = 2**31 def all_pair_shortest_path(matrix, printing=None): n = len(matrix) p_cache = [[None] * n for i in range(n)] for mid in range(n): for start in range(n): for end in range(n): temp = matrix[start][mid] + matrix[mid][end] if temp < ...
30.914894
99
0.511356
import os, sys inf = 2**31 def all_pair_shortest_path(matrix, printing=None): n = len(matrix) p_cache = [[None] * n for i in range(n)] for mid in range(n): for start in range(n): for end in range(n): temp = matrix[start][mid] + matrix[mid][end] if temp < ...
true
true
f7fdd81596ef38657be23c57b3df68fab7af5224
2,180
py
Python
tests/test_pf_pixfmt_to_bpc.py
rtmigo/vtcff_py
e26a5e55ea455b10995932dccd319c1f7fc28385
[ "MIT" ]
null
null
null
tests/test_pf_pixfmt_to_bpc.py
rtmigo/vtcff_py
e26a5e55ea455b10995932dccd319c1f7fc28385
[ "MIT" ]
null
null
null
tests/test_pf_pixfmt_to_bpc.py
rtmigo/vtcff_py
e26a5e55ea455b10995932dccd319c1f7fc28385
[ "MIT" ]
null
null
null
# SPDX-FileCopyrightText: (c) 2021 Artёm IG <github.com/rtmigo> # SPDX-License-Identifier: MIT import unittest from vtcff._pf_15_pixfmt_subsampling import _three_digits from vtcff._pf_20_pixfmt_bpc import _guess_bpc, _ending, _subsampling_factor class TestGuess(unittest.TestCase): def test(self): self.a...
41.132075
76
0.676606
import unittest from vtcff._pf_15_pixfmt_subsampling import _three_digits from vtcff._pf_20_pixfmt_bpc import _guess_bpc, _ending, _subsampling_factor class TestGuess(unittest.TestCase): def test(self): self.assertEqual(_guess_bpc('yuva444p12be', 4, 48), 12) self.assertEqual(_guess_bpc('yuvj44...
true
true
f7fdd87a76d2bfd0c448aa05fdb8aba9f726cd3e
5,182
py
Python
features/generator_features.py
aolabNeuro/brain-python-interface
11590717e1a1a2d5cc89a0495f02170b1b5f3c08
[ "Apache-2.0" ]
2
2020-04-14T23:35:36.000Z
2020-09-11T01:34:50.000Z
features/generator_features.py
aolabNeuro/brain-python-interface
11590717e1a1a2d5cc89a0495f02170b1b5f3c08
[ "Apache-2.0" ]
89
2020-08-03T16:54:08.000Z
2022-03-09T19:56:19.000Z
features/generator_features.py
aolabNeuro/brain-python-interface
11590717e1a1a2d5cc89a0495f02170b1b5f3c08
[ "Apache-2.0" ]
3
2020-08-10T21:29:26.000Z
2021-01-18T18:29:09.000Z
''' Features which have task-like functionality w.r.t. task... ''' import time import tempfile import random import traceback import numpy as np import fnmatch import os import subprocess from riglib.experiment import traits class Autostart(traits.HasTraits): ''' Automatically begins the trial from the wait ...
35.013514
113
0.654766
import time import tempfile import random import traceback import numpy as np import fnmatch import os import subprocess from riglib.experiment import traits class Autostart(traits.HasTraits): rand_start = traits.Tuple((0., 0.), desc="Start interval") exclude_parent_traits = ['wait_time'] def _start_wai...
true
true
f7fdd8880ea99f126ba61a61e3b34ab49ba52b93
1,549
py
Python
runtests.py
ombu/django-sortedm2m
2691cf00174577bc667d5d8c1d42071604ee2095
[ "BSD-3-Clause" ]
null
null
null
runtests.py
ombu/django-sortedm2m
2691cf00174577bc667d5d8c1d42071604ee2095
[ "BSD-3-Clause" ]
null
null
null
runtests.py
ombu/django-sortedm2m
2691cf00174577bc667d5d8c1d42071604ee2095
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals import os, sys, warnings parent = os.path.dirname(os.path.abspath(__file__)) sys.path.insert(0, parent) os.environ.setdefault("DJANGO_SETTINGS_MODULE", "test_project.settings") import django from django.core.management import exe...
28.163636
88
0.654616
from __future__ import unicode_literals import os, sys, warnings parent = os.path.dirname(os.path.abspath(__file__)) sys.path.insert(0, parent) os.environ.setdefault("DJANGO_SETTINGS_MODULE", "test_project.settings") import django from django.core.management import execute_from_command_line if django.VERSION <...
true
true
f7fdd8b5de11cfffbe6654456d7b96e8f270da1c
502
py
Python
data/scripts/templates/object/tangible/wearables/armor/ithorian_guardian/shared_ith_armor_s02_chest_plate.py
obi-two/GameServer
7d37024e2291a97d49522610cd8f1dbe5666afc2
[ "MIT" ]
20
2015-02-23T15:11:56.000Z
2022-03-18T20:56:48.000Z
data/scripts/templates/object/tangible/wearables/armor/ithorian_guardian/shared_ith_armor_s02_chest_plate.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
null
null
null
data/scripts/templates/object/tangible/wearables/armor/ithorian_guardian/shared_ith_armor_s02_chest_plate.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
20
2015-04-04T16:35:59.000Z
2022-03-24T14:54:37.000Z
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Tangible() result.template = "object/tangible/wearables/armor/ithorian_guardian/shared_ith_armor_s02_chest_plate.i...
29.529412
107
0.75498
true
true
f7fdd94b940af905ef11d3e121465ead8e5882db
2,189
py
Python
model/gru.py
susht3/Text_Mutil_Classification_keras
82e43bec29588c620a731323c5bf95c50c94c119
[ "MIT" ]
null
null
null
model/gru.py
susht3/Text_Mutil_Classification_keras
82e43bec29588c620a731323c5bf95c50c94c119
[ "MIT" ]
null
null
null
model/gru.py
susht3/Text_Mutil_Classification_keras
82e43bec29588c620a731323c5bf95c50c94c119
[ "MIT" ]
null
null
null
from keras.layers import Input, Dense, Dropout, Flatten, merge, Reshape,Embedding from keras.models import Model from keras.layers import LSTM,TimeDistributed,Bidirectional, Highway,Activation,Convolution1D, MaxPooling1D,GRU,AveragePooling1D #SimpleDeepRNN from keras.optimizers import SGD from keras.layers.normalizatio...
37.741379
128
0.706715
from keras.layers import Input, Dense, Dropout, Flatten, merge, Reshape,Embedding from keras.models import Model from keras.layers import LSTM,TimeDistributed,Bidirectional, Highway,Activation,Convolution1D, MaxPooling1D,GRU,AveragePooling1D from keras.optimizers import SGD from keras.layers.normalization import Batch...
true
true