hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | max_stars_repo_head_hexsha stringlengths 40 78 | 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 3 248 | max_issues_repo_name stringlengths 5 125 | max_issues_repo_head_hexsha stringlengths 40 78 | 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 3 248 | max_forks_repo_name stringlengths 5 125 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4eb7e3ada081cac1383991df8368a6295ca6cbec | 5,057 | py | Python | decompile/Scanner.py | gauravssnl/Pyc2Py-Symbian | 6e0a3e8f4bf9b470005decabb3c34f9f4723cf61 | [
"MIT"
] | 3 | 2020-03-28T11:57:46.000Z | 2021-04-16T14:10:40.000Z | decompile/Scanner.py | gauravssnl/Pyc2Py-Symbian | 6e0a3e8f4bf9b470005decabb3c34f9f4723cf61 | [
"MIT"
] | null | null | null | decompile/Scanner.py | gauravssnl/Pyc2Py-Symbian | 6e0a3e8f4bf9b470005decabb3c34f9f4723cf61 | [
"MIT"
] | 3 | 2019-04-18T14:33:36.000Z | 2021-07-07T13:44:52.000Z | __all__ = ['Token', 'Scanner', 'getscanner']
import types
class Token:
def __init__(self, type, attr=None, pattr=None, offset=-1):
self.type = intern(type)
self.attr = attr
self.pattr = pattr
self.offset = offset
def __cmp__(self, o):
if isinstance(o, Token):
... | 36.912409 | 77 | 0.479533 | 4,837 | 0.956496 | 0 | 0 | 0 | 0 | 0 | 0 | 330 | 0.065256 |
4eb925716edb4ee9dd67f2ff8a8ea4fae8d882c9 | 312 | py | Python | library/fcntl_test.py | creativemindplus/skybison | d1740e08d8de85a0a56b650675717da67de171a0 | [
"CNRI-Python-GPL-Compatible"
] | 278 | 2021-08-31T00:46:51.000Z | 2022-02-13T19:43:28.000Z | library/fcntl_test.py | creativemindplus/skybison | d1740e08d8de85a0a56b650675717da67de171a0 | [
"CNRI-Python-GPL-Compatible"
] | 9 | 2021-11-05T22:28:43.000Z | 2021-11-23T08:39:04.000Z | library/fcntl_test.py | tekknolagi/skybison | bea8fc2af0a70e7203b4c19f36c14a745512a335 | [
"CNRI-Python-GPL-Compatible"
] | 12 | 2021-08-31T07:49:54.000Z | 2021-10-08T01:09:01.000Z | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. (http://www.facebook.com)
import unittest
class FcntlModuleTest(unittest.TestCase):
def test_it_imports(self):
import fcntl
self.assertEqual(fcntl.__name__, "fcntl")
if __name__ == "__main__":
unittest.main()
| 20.8 | 76 | 0.695513 | 144 | 0.461538 | 0 | 0 | 0 | 0 | 0 | 0 | 115 | 0.36859 |
4eb9e46990415a6b4e9b33a746cb5c6ea0b09797 | 7,576 | py | Python | main.py | jarchv/capsnet-tensorflow | e4a69124060ac946cf21861b3ef3870e956325b6 | [
"MIT"
] | null | null | null | main.py | jarchv/capsnet-tensorflow | e4a69124060ac946cf21861b3ef3870e956325b6 | [
"MIT"
] | null | null | null | main.py | jarchv/capsnet-tensorflow | e4a69124060ac946cf21861b3ef3870e956325b6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#title :main.py
#description :Tensorflow implementation of CapsNet.
#author :Jose Chavez
#date :2019/04/30
#version :1.0
#usage :python3 main.py
#python_version :3.6.7
#============================================================================... | 35.905213 | 161 | 0.574314 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,262 | 0.166579 |
4eb9f86a4d0753268d20bf93e74403357afd1729 | 7,707 | py | Python | legacy/otc_mp.py | kimSooHyun950921/Heuristics | 97757aebdaf1290c371b84596757de00742d9f5c | [
"Apache-2.0"
] | 3 | 2020-06-26T05:29:20.000Z | 2021-03-26T22:11:24.000Z | legacy/otc_mp.py | kimSooHyun950921/Heuristics | 97757aebdaf1290c371b84596757de00742d9f5c | [
"Apache-2.0"
] | 1 | 2021-08-23T20:51:27.000Z | 2021-08-23T20:51:27.000Z | legacy/otc_mp.py | kimSooHyun950921/Heuristics | 97757aebdaf1290c371b84596757de00742d9f5c | [
"Apache-2.0"
] | null | null | null | import os
import sys
import time
import decimal
import sqlite3
import multiprocessing
from secret import rpc_user, rpc_password
from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
import cluster_db_query as cdq
import db_query as dq
rpc_ip = '127.0.0.1'
rpc_port = '8332'
timeout = 300
def get_rpc():
... | 30.705179 | 101 | 0.552615 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,534 | 0.186823 |
4ebb360ae9b11a1457dfb35575d9b1a3c0b33203 | 6,240 | py | Python | platforms_handlers/dialogflow/request.py | Robinson04/inoft_vocal_framework | 9659e0852604bc628b01e0440535add0ae5fc5d1 | [
"MIT"
] | 11 | 2020-04-15T07:47:34.000Z | 2022-03-30T21:47:36.000Z | platforms_handlers/dialogflow/request.py | Robinson04/inoft_vocal_framework | 9659e0852604bc628b01e0440535add0ae5fc5d1 | [
"MIT"
] | 20 | 2020-08-09T00:11:49.000Z | 2021-09-11T11:34:02.000Z | platforms_handlers/dialogflow/request.py | Robinson04/inoft_vocal_framework | 9659e0852604bc628b01e0440535add0ae5fc5d1 | [
"MIT"
] | 6 | 2020-02-21T04:45:19.000Z | 2021-07-18T22:13:55.000Z | from typing import Optional, List
from pydantic import Field
from pydantic.main import BaseModel
from inoft_vocal_framework.utils.formatters import normalize_intent_name
class Intent(BaseModel):
name: str
displayName: str
class User(BaseModel):
_VERIFICATION_NAME_GUEST = "GUEST"
_VERIFICATION_NAME_... | 37.365269 | 149 | 0.680769 | 6,050 | 0.969551 | 0 | 0 | 0 | 0 | 0 | 0 | 426 | 0.068269 |
4ebc1c80bd48bd6945b5be017cbcc2dddcc7d826 | 589 | py | Python | emailtemplates/admin.py | mpasternak/django-emailtemplates | 529e0120c8c3a58605257eff893df636a5cbf8d0 | [
"MIT"
] | 1 | 2015-05-18T13:51:08.000Z | 2015-05-18T13:51:08.000Z | emailtemplates/admin.py | mpasternak/django-emailtemplates | 529e0120c8c3a58605257eff893df636a5cbf8d0 | [
"MIT"
] | null | null | null | emailtemplates/admin.py | mpasternak/django-emailtemplates | 529e0120c8c3a58605257eff893df636a5cbf8d0 | [
"MIT"
] | null | null | null | # -*- encoding: utf-8 -*-
from django.contrib import admin
from emailtemplates.models import EmailTemplate
from emailtemplates.models import MailServerFailure
class EmailTemplateAdmin(admin.ModelAdmin):
list_display = ['desc', 'subject']
readonly_fields = ['uid']
pass
admin.site.register(Ema... | 26.772727 | 63 | 0.726655 | 288 | 0.488964 | 0 | 0 | 0 | 0 | 0 | 0 | 96 | 0.162988 |
4ebf8d3d945323e73e17ed94dafefa6fcbf477bd | 380 | py | Python | src/pip/_internal/resolution/mixology/package.py | OhMyBuggg/pip | 89d500c658dcd1f55a42bf5f77e052e6d17ed9d0 | [
"MIT"
] | null | null | null | src/pip/_internal/resolution/mixology/package.py | OhMyBuggg/pip | 89d500c658dcd1f55a42bf5f77e052e6d17ed9d0 | [
"MIT"
] | 1 | 2020-09-25T18:54:26.000Z | 2020-09-25T18:54:26.000Z | src/pip/_internal/resolution/mixology/package.py | OhMyBuggg/pip | 89d500c658dcd1f55a42bf5f77e052e6d17ed9d0 | [
"MIT"
] | null | null | null | class Package(object):
def __init__(self, name):
self._name = name
@classmethod
def root(cls): # type: () -> Package
return Package("_root_")
@property
def __str__(self):
return self._name
def __eq__(self, other):
return str(other == self._name)
def __re... | 22.352941 | 48 | 0.584211 | 380 | 1 | 0 | 0 | 145 | 0.381579 | 0 | 0 | 43 | 0.113158 |
4ebf96b0cd05bc2eb3a4a7d33d2460323ab21921 | 1,073 | py | Python | scraping_data.py | WeiTaKuan/TPEX_StockBot | e8a7d694dd08efdc66989a827518a629e380de16 | [
"MIT"
] | null | null | null | scraping_data.py | WeiTaKuan/TPEX_StockBot | e8a7d694dd08efdc66989a827518a629e380de16 | [
"MIT"
] | null | null | null | scraping_data.py | WeiTaKuan/TPEX_StockBot | e8a7d694dd08efdc66989a827518a629e380de16 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#--------------------------------#
"""
File name: TPEX_STOCKBOT/main.py
Author: WEI-TA KUAN
Date created: 12/9/2021
Date last modified: 9/10/2021
Version: 1.0
Python Version: 3.8.8
Status: Developing
"""
#--------------------------------#
from scraping_data import stock_da... | 29 | 90 | 0.649581 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 568 | 0.521579 |
4ec073c949edac61a57ee7d6306e6b0a094db09d | 3,959 | py | Python | l1t_cli/commands/list/twikis/__init__.py | kreczko/l1t-cli | f708f001b6f434d4245da6631a068a7eeb9edf30 | [
"Apache-2.0"
] | null | null | null | l1t_cli/commands/list/twikis/__init__.py | kreczko/l1t-cli | f708f001b6f434d4245da6631a068a7eeb9edf30 | [
"Apache-2.0"
] | null | null | null | l1t_cli/commands/list/twikis/__init__.py | kreczko/l1t-cli | f708f001b6f434d4245da6631a068a7eeb9edf30 | [
"Apache-2.0"
] | null | null | null | """
list twikis:
List all L1 Trigger Offline Twikis
Usage:
list twikis [check=1]
Parameters:
check: force a check of the twiki URL before printing.
Useful when adding new entries. Default: 0
"""
import logging
import urllib
import hepshell
LOG = log... | 32.186992 | 97 | 0.605961 | 1,382 | 0.349078 | 0 | 0 | 0 | 0 | 0 | 0 | 1,815 | 0.458449 |
4ec139a98dfaa140655178c0f7864e5e8a59aecf | 1,528 | py | Python | examples/surrogates/corrnoise.py | manu-mannattil/nolitsa | 40befcb1ce5535703f90ffe87209181bcdb5eb5c | [
"BSD-3-Clause"
] | 118 | 2017-06-21T08:38:07.000Z | 2022-03-29T05:39:44.000Z | examples/surrogates/corrnoise.py | tanmaymaloo/nolitsa | 40befcb1ce5535703f90ffe87209181bcdb5eb5c | [
"BSD-3-Clause"
] | 2 | 2018-06-17T03:49:53.000Z | 2019-10-21T14:45:01.000Z | examples/surrogates/corrnoise.py | tanmaymaloo/nolitsa | 40befcb1ce5535703f90ffe87209181bcdb5eb5c | [
"BSD-3-Clause"
] | 35 | 2018-06-16T22:41:24.000Z | 2022-02-19T19:42:45.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""IAAFT surrogates for correlated noise.
The properties of linearly correlated noise can be captured quite
accurately by IAAFT surrogates. Thus, they cannot easily fool
a dimension estimator (here we use Takens's maximum likelihood estimator
for the correlation dimensio... | 26.807018 | 72 | 0.685864 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 634 | 0.414921 |
4ec177a61c4b2700cdcadf9e2506e37171a32c85 | 1,853 | py | Python | test/pubmed/test_entrez.py | aaronnorrish/PubMedConnections | dc17e141d94afe6d26a9b49b2183c06f3630e561 | [
"CC-BY-4.0"
] | 4 | 2022-03-09T05:20:46.000Z | 2022-03-13T11:18:58.000Z | test/pubmed/test_entrez.py | aaronnorrish/PubMedConnections | dc17e141d94afe6d26a9b49b2183c06f3630e561 | [
"CC-BY-4.0"
] | null | null | null | test/pubmed/test_entrez.py | aaronnorrish/PubMedConnections | dc17e141d94afe6d26a9b49b2183c06f3630e561 | [
"CC-BY-4.0"
] | 1 | 2022-03-09T05:21:53.000Z | 2022-03-09T05:21:53.000Z | import time
from unittest import TestCase
from app.pubmed.source_entrez import *
class TestEntrez(TestCase):
def test_do_rate_limit(self):
# Serial Test
start = time.time()
do_rate_limit()
do_rate_limit()
do_rate_limit()
do_rate_limit()
elapsed = time.time()... | 36.333333 | 115 | 0.636805 | 1,769 | 0.954668 | 0 | 0 | 0 | 0 | 0 | 0 | 293 | 0.158122 |
4ec3208965da07154e57bd52236ae75fc871d372 | 776 | py | Python | src/nltkproperties.py | marufzubery/Red-List-Bot | 6c9f737ede6d4c823693476fa7b7b85bf4dcf5a8 | [
"Apache-2.0"
] | null | null | null | src/nltkproperties.py | marufzubery/Red-List-Bot | 6c9f737ede6d4c823693476fa7b7b85bf4dcf5a8 | [
"Apache-2.0"
] | null | null | null | src/nltkproperties.py | marufzubery/Red-List-Bot | 6c9f737ede6d4c823693476fa7b7b85bf4dcf5a8 | [
"Apache-2.0"
] | null | null | null |
import nltk
import numpy as np
from nltk.stem.porter import PorterStemmer
nltk.download('punkt')
stemmer = PorterStemmer()
# splitting a string into words, punctuation and numbers
def tokenize(sentence):
return nltk.word_tokenize(sentence)
# generating the root form the words ex: universe - univers, universi... | 24.25 | 81 | 0.725515 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 230 | 0.296392 |
4ec4dd9e5afd36d15c0c2a204aed4c3badf824b1 | 1,799 | py | Python | bankapi.py | robinstauntoncollins/bank-api | b19cadf5a65f5e66ca14688af8774f400d4fb0f8 | [
"Unlicense"
] | null | null | null | bankapi.py | robinstauntoncollins/bank-api | b19cadf5a65f5e66ca14688af8774f400d4fb0f8 | [
"Unlicense"
] | null | null | null | bankapi.py | robinstauntoncollins/bank-api | b19cadf5a65f5e66ca14688af8774f400d4fb0f8 | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python3
import os
import click
from bank_api import create_app, db, models, utils
app = create_app(os.getenv('FLASK_CONFIG') or 'default')
@app.shell_context_processor
def make_shell_context():
return {
'db': db,
'Account': models.Account,
'Customer': models.Customer,
... | 32.125 | 105 | 0.612007 | 0 | 0 | 0 | 0 | 1,585 | 0.881045 | 0 | 0 | 465 | 0.258477 |
4ec57a734fd6e6ba23c2187e7f9b9d79eb49894f | 742 | py | Python | src/push_api_clientpy/__init__.py | coveo/push-api-client.py | bc4e7a6befbaed14ac16863cc25ff43ef41525d8 | [
"MIT"
] | null | null | null | src/push_api_clientpy/__init__.py | coveo/push-api-client.py | bc4e7a6befbaed14ac16863cc25ff43ef41525d8 | [
"MIT"
] | 1 | 2022-02-09T11:59:17.000Z | 2022-02-09T11:59:17.000Z | src/push_api_clientpy/__init__.py | coveo/push-api-client.py | bc4e7a6befbaed14ac16863cc25ff43ef41525d8 | [
"MIT"
] | null | null | null | import sys
if sys.version_info[:2] >= (3, 8):
# TODO: Import directly (no need for conditional) when `python_requires = >= 3.8`
from importlib.metadata import PackageNotFoundError, version # pragma: no cover
else:
from importlib_metadata import PackageNotFoundError, version # pragma: no cover
try:
#... | 32.26087 | 85 | 0.745283 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 241 | 0.324798 |
4ec7963e75127ea8afb2b3034873981f0b12657f | 296 | py | Python | loaddd.py | Sharingsky/resrep | a173d1bc256b75b2c902024929e406863ce48b9b | [
"MIT"
] | null | null | null | loaddd.py | Sharingsky/resrep | a173d1bc256b75b2c902024929e406863ce48b9b | [
"MIT"
] | null | null | null | loaddd.py | Sharingsky/resrep | a173d1bc256b75b2c902024929e406863ce48b9b | [
"MIT"
] | null | null | null | import os
import sys
rootpath=str("D:/_1work/pycharmcode/pycharmproject/resrep")
syspath=sys.path
sys.path=[]
sys.path.append(rootpath)#将工程根目录加入到python搜索路径中
sys.path.extend([rootpath+i for i in os.listdir(rootpath) if i[0]!="."])#将工程目录下的一级目录添加到python搜索路径中
sys.path.extend(syspath)
print(sys.path) | 32.888889 | 98 | 0.790541 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 161 | 0.444751 |
4ecc15d4ccded89291e34497472b06937ec1df8b | 18,554 | py | Python | WS_CNN.py | Aks-Dmv/WSDDN | 71fe1ccb17d5e779c8dac94a84227c871bd3aa73 | [
"MIT"
] | null | null | null | WS_CNN.py | Aks-Dmv/WSDDN | 71fe1ccb17d5e779c8dac94a84227c871bd3aa73 | [
"MIT"
] | null | null | null | WS_CNN.py | Aks-Dmv/WSDDN | 71fe1ccb17d5e779c8dac94a84227c871bd3aa73 | [
"MIT"
] | null | null | null | import argparse
import os
import shutil
import time
import sys
import sklearn
import sklearn.metrics
import torch
torch.cuda.init()
import torch.nn as nn
import torch.nn.parallel
import torch.nn.functional as F
import torch.backends.cudnn as cudnn
import torch.distributed as dist
import torch.optim
import torch.utils.... | 32.955595 | 129 | 0.579929 | 390 | 0.02102 | 0 | 0 | 0 | 0 | 0 | 0 | 4,494 | 0.242212 |
4ecd621ab56bfd508e9835987ea7537a72ff3b56 | 1,093 | py | Python | fuc/cli/vcf_index.py | sbslee/fuc | f4eb5f6b95b533252ee877920278cd4e4c964bb8 | [
"MIT"
] | 17 | 2021-06-09T23:23:56.000Z | 2022-03-10T11:58:46.000Z | fuc/cli/vcf_index.py | sbslee/fuc | f4eb5f6b95b533252ee877920278cd4e4c964bb8 | [
"MIT"
] | 27 | 2021-04-21T06:25:22.000Z | 2022-03-30T23:25:36.000Z | fuc/cli/vcf_index.py | sbslee/fuc | f4eb5f6b95b533252ee877920278cd4e4c964bb8 | [
"MIT"
] | null | null | null | import sys
from .. import api
import pysam
description = """
Index a VCF file.
This command will create an index file (.tbi) for the input VCF.
"""
epilog = f"""
[Example] Index a compressed VCF file:
$ fuc {api.common._script_name()} in.vcf.gz
[Example] Index an uncompressed VCF file (will create a compressed ... | 25.418605 | 78 | 0.643184 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 589 | 0.538884 |
4ecd71c762bc771fde1ea85f54d06c0a60939363 | 1,174 | py | Python | config.py | mazanax/identity-quiz | b9468b305b23701d027a3fc1cfd2536da8371a4e | [
"MIT"
] | null | null | null | config.py | mazanax/identity-quiz | b9468b305b23701d027a3fc1cfd2536da8371a4e | [
"MIT"
] | null | null | null | config.py | mazanax/identity-quiz | b9468b305b23701d027a3fc1cfd2536da8371a4e | [
"MIT"
] | null | null | null | import logging
import os
import sys
from peewee import SqliteDatabase, PostgresqlDatabase
logger = logging.getLogger()
logger.setLevel(logging.DEBUG)
handler = logging.StreamHandler(sys.stdout)
handler.setLevel(logging.DEBUG)
logger.addHandler(handler)
if not os.getenv('POSTGRES_DB_NAME'):
logger.warning('[DB] u... | 30.102564 | 96 | 0.749574 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 358 | 0.30494 |
4ece31e4c80ccf74cc98a1222f00653c142ee026 | 65 | py | Python | scuttlecrab/main.py | PUMBA-1997/scuttlecrab.py | 13e0074b7d94af81bf5c13feb5a3d036bc71f133 | [
"Apache-2.0"
] | 4 | 2022-01-05T14:16:07.000Z | 2022-01-09T07:29:08.000Z | scuttlecrab/main.py | Fabrizio1663/scuttlecrab.py | 13e0074b7d94af81bf5c13feb5a3d036bc71f133 | [
"Apache-2.0"
] | null | null | null | scuttlecrab/main.py | Fabrizio1663/scuttlecrab.py | 13e0074b7d94af81bf5c13feb5a3d036bc71f133 | [
"Apache-2.0"
] | null | null | null | from scuttlecrab.classes.bot import CustomBot
bot = CustomBot()
| 16.25 | 45 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4ece3ece6512a9e1cbd43be4fb424a421b22f700 | 1,384 | py | Python | python/paddle_fl/split_learning/core/reader/reader_base.py | jhjiangcs/PaddleFL | debcc3809f634f696637e1fd8f15ca2430b0c1df | [
"Apache-2.0"
] | 2 | 2021-03-02T09:24:31.000Z | 2021-05-27T21:00:29.000Z | python/paddle_fl/split_learning/core/reader/reader_base.py | JedHong/PaddleFL | 4b10985f808511d63f2efc76e387103ccde14e32 | [
"Apache-2.0"
] | null | null | null | python/paddle_fl/split_learning/core/reader/reader_base.py | JedHong/PaddleFL | 4b10985f808511d63f2efc76e387103ccde14e32 | [
"Apache-2.0"
] | 1 | 2020-05-18T11:07:38.000Z | 2020-05-18T11:07:38.000Z | # Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 39.542857 | 112 | 0.680636 | 770 | 0.556358 | 0 | 0 | 0 | 0 | 0 | 0 | 756 | 0.546243 |
4ecec912c81fe613d6387ded4c0e5121003a14a5 | 640 | py | Python | main.py | sergioyahni/captcha | f8235a4c3b64fadf71c00d9932fae7f1bf1962f5 | [
"MIT"
] | null | null | null | main.py | sergioyahni/captcha | f8235a4c3b64fadf71c00d9932fae7f1bf1962f5 | [
"MIT"
] | null | null | null | main.py | sergioyahni/captcha | f8235a4c3b64fadf71c00d9932fae7f1bf1962f5 | [
"MIT"
] | null | null | null | from captcha.image import ImageCaptcha
import random
def create_captcha():
captcha_text = str(hex(random.randint(3000, 5999) * random.randint(100, 199)))
image = ImageCaptcha(width=280, height=90)
data = image.generate(captcha_text)
image.write(captcha_text, 'cImg.png')
return captcha_tex... | 23.703704 | 83 | 0.6 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 27 | 0.042188 |
4ed15e1a4c599c5f5acf73a58c9805ac84372eae | 4,045 | py | Python | openstates/openstates-master/openstates/mi/events.py | Jgorsick/Advocacy_Angular | 8906af3ba729b2303880f319d52bce0d6595764c | [
"CC-BY-4.0"
] | null | null | null | openstates/openstates-master/openstates/mi/events.py | Jgorsick/Advocacy_Angular | 8906af3ba729b2303880f319d52bce0d6595764c | [
"CC-BY-4.0"
] | null | null | null | openstates/openstates-master/openstates/mi/events.py | Jgorsick/Advocacy_Angular | 8906af3ba729b2303880f319d52bce0d6595764c | [
"CC-BY-4.0"
] | null | null | null | from openstates.utils import LXMLMixin
import datetime as dt
import re
from billy.scrape.events import Event, EventScraper
import lxml.html
import pytz
mi_events = "http://legislature.mi.gov/doc.aspx?CommitteeMeetings"
class MIEventScraper(EventScraper, LXMLMixin):
jurisdiction = 'mi'
_tz = pytz.timezone('... | 32.36 | 85 | 0.528307 | 3,821 | 0.944623 | 0 | 0 | 0 | 0 | 0 | 0 | 1,041 | 0.257355 |
4ed2ebd3e68752d3caa55e15dd92ce5cc345106b | 418 | py | Python | code/0190-reverseBits.py | RRRoger/LeetCodeExercise | 0019a048fcfac9ac9e6f37651b17d01407c92c7d | [
"MIT"
] | null | null | null | code/0190-reverseBits.py | RRRoger/LeetCodeExercise | 0019a048fcfac9ac9e6f37651b17d01407c92c7d | [
"MIT"
] | null | null | null | code/0190-reverseBits.py | RRRoger/LeetCodeExercise | 0019a048fcfac9ac9e6f37651b17d01407c92c7d | [
"MIT"
] | null | null | null | class Solution:
# @param n, an integer
# @return an integer
def reverseBits(self, n):
ret, power = 0, 31
while n:
ret += (n & 1) << power # n & 1 means: 末位是1则是1, 0则是0 向右移位
n = n >> 1 # n 左移移位
power -= 1 # 位数-1
return ret
if "__main__... | 19.904762 | 69 | 0.5 | 338 | 0.747788 | 0 | 0 | 0 | 0 | 0 | 0 | 133 | 0.294248 |
4ed342ee0815f43f923a49b70459817dc28094de | 1,018 | py | Python | muria/db/preload.py | xakiy/muria | 0d16ae02f65d2a4b8cfe31419a4d9343ccbe6905 | [
"MIT"
] | 1 | 2020-02-10T00:12:27.000Z | 2020-02-10T00:12:27.000Z | muria/db/preload.py | xakiy/muria | 0d16ae02f65d2a4b8cfe31419a4d9343ccbe6905 | [
"MIT"
] | 8 | 2019-12-07T16:48:08.000Z | 2021-08-31T06:31:34.000Z | muria/db/preload.py | xakiy/muria | 0d16ae02f65d2a4b8cfe31419a4d9343ccbe6905 | [
"MIT"
] | null | null | null | """Some preloads of database content."""
tables = list()
roles = list()
roles.append({"id": 1, "name": "administrator"})
roles.append({"id": 2, "name": "contributor"})
roles.append({"id": 3, "name": "staff"})
roles.append({"id": 4, "name": "parent"})
roles.append({"id": 5, "name": "caretaker"})
roles.append... | 22.130435 | 69 | 0.52554 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 323 | 0.317289 |
4ed3a96b67e22aff964a1489de5d4c55aa41991d | 6,689 | py | Python | src/meeting_timer/settings.py | andrewjrobinson/meeting_timer | cad3303f6925d2e8961b262c6cfbecf4a30a1ce5 | [
"MIT"
] | null | null | null | src/meeting_timer/settings.py | andrewjrobinson/meeting_timer | cad3303f6925d2e8961b262c6cfbecf4a30a1ce5 | [
"MIT"
] | null | null | null | src/meeting_timer/settings.py | andrewjrobinson/meeting_timer | cad3303f6925d2e8961b262c6cfbecf4a30a1ce5 | [
"MIT"
] | null | null | null | #
# MIT License
#
# Copyright (c) 2020 Andrew Robinson
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify,... | 32.470874 | 87 | 0.575123 | 5,426 | 0.811183 | 0 | 0 | 0 | 0 | 0 | 0 | 2,616 | 0.39109 |
4ed623c2f06e37c570057cd2950ac913943aac09 | 651 | py | Python | python/191122.py | Xanonymous-GitHub/main | 53120110bd8dc9ab33424fa26d1a8ca5b9256ebe | [
"Apache-2.0"
] | 1 | 2019-09-27T17:46:41.000Z | 2019-09-27T17:46:41.000Z | python/191122.py | Xanonymous-GitHub/main | 53120110bd8dc9ab33424fa26d1a8ca5b9256ebe | [
"Apache-2.0"
] | null | null | null | python/191122.py | Xanonymous-GitHub/main | 53120110bd8dc9ab33424fa26d1a8ca5b9256ebe | [
"Apache-2.0"
] | 5 | 2019-09-30T16:41:14.000Z | 2019-10-25T11:13:39.000Z | from os import getcwd
def rdfile():
data = list()
# 顯示這個程式碼檔案是在哪裡被執行
print(getcwd())
with open("pm25.txt", 'r') as fd:
for line in fd:
try:
data.append(float(line.replace('\n', '')))
except:
pass
print('Max =', max(data))
print('M... | 21.7 | 78 | 0.533026 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 146 | 0.213763 |
4ed6b577e511cc21f5108b75969a300169a86b9c | 5,534 | py | Python | treeplotter/plotter.py | Luke-Poeppel/treeplotter | 940e08b02d30f69972b0df1a5668f3b2ade02027 | [
"MIT"
] | 7 | 2021-06-12T17:48:17.000Z | 2022-01-27T09:47:12.000Z | treeplotter/plotter.py | Luke-Poeppel/treeplotter | 940e08b02d30f69972b0df1a5668f3b2ade02027 | [
"MIT"
] | 36 | 2021-06-09T18:31:44.000Z | 2022-03-17T12:06:59.000Z | treeplotter/plotter.py | Luke-Poeppel/treeplotter | 940e08b02d30f69972b0df1a5668f3b2ade02027 | [
"MIT"
] | 2 | 2021-12-07T18:41:53.000Z | 2022-03-09T10:46:52.000Z | ####################################################################################################
# File: plotter.py
# Purpose: Plotting module.
#
# Author: Luke Poeppel
#
# Location: Kent, 2021
####################################################################################################
import logging... | 28.091371 | 100 | 0.696061 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,853 | 0.334537 |
4ed7072eb26c7d3dbe4f2527653e38fa3cf65c67 | 638 | py | Python | app/__init__.py | PabloEckardt/Flask-Login-Example | a230a6ce6678b52bb4c62b0b62b167edd927ebd0 | [
"MIT"
] | null | null | null | app/__init__.py | PabloEckardt/Flask-Login-Example | a230a6ce6678b52bb4c62b0b62b167edd927ebd0 | [
"MIT"
] | null | null | null | app/__init__.py | PabloEckardt/Flask-Login-Example | a230a6ce6678b52bb4c62b0b62b167edd927ebd0 | [
"MIT"
] | null | null | null | from flask import current_app, Flask, redirect, url_for
from flask_cors import CORS
from flask_sqlalchemy import SQLAlchemy
import config
from flask_login import LoginManager
app = Flask(__name__)
app.config.from_object(config) # load config.py
app.secret_key = 'super duper mega secret key'
login_manager = LoginManag... | 31.9 | 69 | 0.80721 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 207 | 0.324451 |
4ed70f9df4c3c063308c836d1a779ff6d33f1046 | 3,814 | py | Python | filewriter.py | FrederikBjorne/python-serial-logging | e553bc2421699a2bb38f21abffbb08ee70c81a21 | [
"MIT"
] | null | null | null | filewriter.py | FrederikBjorne/python-serial-logging | e553bc2421699a2bb38f21abffbb08ee70c81a21 | [
"MIT"
] | null | null | null | filewriter.py | FrederikBjorne/python-serial-logging | e553bc2421699a2bb38f21abffbb08ee70c81a21 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import logging
from threading import Thread, Event
from Queue import Queue, Empty as QueueEmpty
import codecs
class FileWriter(Thread):
"""
This thread reads log lines from a queue and writes these to a file passed as log_file_path.
The log line queue is filled with new log lines b... | 40.574468 | 113 | 0.588621 | 3,677 | 0.96408 | 0 | 0 | 312 | 0.081804 | 0 | 0 | 1,514 | 0.396959 |
4ed7b53a4e6b728656b2c884c550c9f3728497ff | 361 | py | Python | ejercicios/ejercicio4.py | Ironwilly/python | f6d42c685b4026b018089edb4ae8cc0ca9614e86 | [
"CC0-1.0"
] | null | null | null | ejercicios/ejercicio4.py | Ironwilly/python | f6d42c685b4026b018089edb4ae8cc0ca9614e86 | [
"CC0-1.0"
] | null | null | null | ejercicios/ejercicio4.py | Ironwilly/python | f6d42c685b4026b018089edb4ae8cc0ca9614e86 | [
"CC0-1.0"
] | null | null | null | #Dados dos números, mostrar la suma, resta, división y multiplicación de ambos.
a = int(input("Dime el primer número: "))
b = int(input("Dime el segundo número: "))
print("La suma de los dos números es: ",a+b)
print("La resta de los dos números es: ",a-b)
print("La multiplicación de los dos números es: ",a*b)
print("L... | 40.111111 | 79 | 0.700831 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 288 | 0.774194 |
4ed8c0b61feb32ca367f3590a99a8b047fcbbc95 | 610 | py | Python | adv/pipple.py | XenoXilus/dl | cdfce03835cd67aac553140d6d88bc4c5c5d60ff | [
"Apache-2.0"
] | null | null | null | adv/pipple.py | XenoXilus/dl | cdfce03835cd67aac553140d6d88bc4c5c5d60ff | [
"Apache-2.0"
] | null | null | null | adv/pipple.py | XenoXilus/dl | cdfce03835cd67aac553140d6d88bc4c5c5d60ff | [
"Apache-2.0"
] | null | null | null | from core.advbase import *
def module():
return Pipple
class Pipple(Adv):
conf = {}
conf['slots.a'] = ['Proper_Maintenance', 'Brothers_in_Arms']
conf['slots.frostbite.a'] = conf['slots.a']
conf['slots.d'] = 'Gaibhne_and_Creidhne'
conf['acl'] = """
`dragon(c3-s-end),x=5
`s2, (x=... | 25.416667 | 64 | 0.568852 | 439 | 0.719672 | 0 | 0 | 0 | 0 | 0 | 0 | 314 | 0.514754 |
4eda24af6ddf82cc5cc2e25951b4fb9c83b51905 | 159 | py | Python | bitmovin/resources/models/encodings/pertitle/auto_representation.py | koraygulcu/bitmovin-python | e8b896e2cb44142c91828533b8fb02f20eb0fbe5 | [
"Unlicense"
] | null | null | null | bitmovin/resources/models/encodings/pertitle/auto_representation.py | koraygulcu/bitmovin-python | e8b896e2cb44142c91828533b8fb02f20eb0fbe5 | [
"Unlicense"
] | null | null | null | bitmovin/resources/models/encodings/pertitle/auto_representation.py | koraygulcu/bitmovin-python | e8b896e2cb44142c91828533b8fb02f20eb0fbe5 | [
"Unlicense"
] | null | null | null | class AutoRepresentation:
def __init__(self, adopt_configuration_threshold=None):
self.adoptConfigurationThreshold = adopt_configuration_threshold
| 39.75 | 72 | 0.823899 | 158 | 0.993711 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4edad0b70551d7b3c45fcd8cf2f69ef8cc0ea351 | 3,799 | py | Python | test/testFactorMethods.py | turkeydonkey/nzmath3 | a48ae9efcf0d9ad1485c2e9863c948a7f1b20311 | [
"BSD-3-Clause"
] | 1 | 2021-05-26T19:22:17.000Z | 2021-05-26T19:22:17.000Z | test/testFactorMethods.py | turkeydonkey/nzmath3 | a48ae9efcf0d9ad1485c2e9863c948a7f1b20311 | [
"BSD-3-Clause"
] | null | null | null | test/testFactorMethods.py | turkeydonkey/nzmath3 | a48ae9efcf0d9ad1485c2e9863c948a7f1b20311 | [
"BSD-3-Clause"
] | null | null | null | import unittest
import logging
import nzmath.factor.methods as mthd
try:
_log = logging.getLogger('test.testFactorMethod')
except:
try:
_log = logging.getLogger('nzmath.test.testFactorMethod')
except:
_log = logging.getLogger('testFactorMethod')
_log.setLevel(logging.INFO)
class FactorTest... | 39.164948 | 84 | 0.609108 | 3,136 | 0.82548 | 0 | 0 | 0 | 0 | 0 | 0 | 412 | 0.10845 |
14c1c00575d1e7a958fc95661cce6a81b4fbbd6f | 2,057 | py | Python | LeetCode/0151-reverse-words-in-a-string/solution.py | RyouMon/road-of-master | 02e18c2e524db9c7df4e6f8db56b3c8408a9fc6b | [
"Apache-2.0"
] | null | null | null | LeetCode/0151-reverse-words-in-a-string/solution.py | RyouMon/road-of-master | 02e18c2e524db9c7df4e6f8db56b3c8408a9fc6b | [
"Apache-2.0"
] | null | null | null | LeetCode/0151-reverse-words-in-a-string/solution.py | RyouMon/road-of-master | 02e18c2e524db9c7df4e6f8db56b3c8408a9fc6b | [
"Apache-2.0"
] | null | null | null | import collections
class Solution01:
"""
使用内置API
"""
def reverseWords(self, s: str) -> str:
return ' '.join(reversed(s.split()))
class Solution02:
"""
自己实现对应的功能
"""
def trim_space(self, s: str) -> list:
left, right = 0, len(s) - 1
# 去除首尾空格
while s[le... | 22.855556 | 62 | 0.427807 | 2,207 | 0.987472 | 0 | 0 | 0 | 0 | 0 | 0 | 388 | 0.173602 |
14c1f4a62cb93b24d14dc7d0ea4f4f2eb0f1a413 | 3,154 | py | Python | setup.py | Tiksagol/hype | 1485b80fe16a7678605afe209b2494a2a875df3f | [
"MIT"
] | 13 | 2021-07-31T12:07:06.000Z | 2022-03-24T15:00:50.000Z | setup.py | Tiksagol/hype | 1485b80fe16a7678605afe209b2494a2a875df3f | [
"MIT"
] | 2 | 2021-08-02T14:04:58.000Z | 2021-09-06T09:35:20.000Z | setup.py | Tiksagol/hype | 1485b80fe16a7678605afe209b2494a2a875df3f | [
"MIT"
] | 3 | 2021-08-07T13:23:54.000Z | 2022-01-24T13:23:08.000Z |
# Copyright (c) 2021, Serum Studio
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, mer... | 38.938272 | 91 | 0.679138 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,212 | 0.701332 |
14c231909289d40787ee027c30489129b5c603c6 | 300 | py | Python | visualize_d_tree_generator/dummy_data.py | dan-silver/machine-learning-visualizer | 13e31b953dd24fbed5970f54487a9bb65d2e6cd4 | [
"MIT"
] | 2 | 2015-09-23T03:32:26.000Z | 2017-07-24T12:03:37.000Z | visualize_d_tree_generator/dummy_data.py | dan-silver/machine-learning-visualizer | 13e31b953dd24fbed5970f54487a9bb65d2e6cd4 | [
"MIT"
] | null | null | null | visualize_d_tree_generator/dummy_data.py | dan-silver/machine-learning-visualizer | 13e31b953dd24fbed5970f54487a9bb65d2e6cd4 | [
"MIT"
] | null | null | null | import sklearn
from sklearn import datasets
def generate(n_samples, features):
n_features = len(features)
data = sklearn.datasets.make_blobs(n_samples=n_samples, n_features=n_features, centers=10, cluster_std=1.0, center_box=(-10.0, 10.0), shuffle=True, random_state=None)
return (data, features) | 42.857143 | 167 | 0.79 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
14c4fe8cfdba355e578ef806e7db3a2e2f8ba8db | 947 | py | Python | Recommender_System/algorithm/KGCN/main.py | Holldean/Recommender-System | 5c1508b4fb430dc06979353627c4cb873aad490c | [
"MIT"
] | 348 | 2019-11-12T12:20:08.000Z | 2022-03-31T12:34:45.000Z | Recommender_System/algorithm/KGCN/main.py | Runjeo/Recommender-System | 6a93e6ee970b32c76e2f71043383bf24a7e865d5 | [
"MIT"
] | 15 | 2019-12-04T15:16:15.000Z | 2021-07-21T06:27:38.000Z | Recommender_System/algorithm/KGCN/main.py | Runjeo/Recommender-System | 6a93e6ee970b32c76e2f71043383bf24a7e865d5 | [
"MIT"
] | 87 | 2019-11-24T10:26:26.000Z | 2022-03-11T05:35:39.000Z | if __name__ == '__main__':
import Recommender_System.utility.gpu_memory_growth
from Recommender_System.algorithm.KGCN.tool import construct_undirected_kg, get_adj_list
from Recommender_System.algorithm.KGCN.model import KGCN_model
from Recommender_System.algorithm.KGCN.train import train
from R... | 55.705882 | 152 | 0.779303 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 15 | 0.015839 |
14c57c94bb76c89fd6223c07cfaec40385ecbc9c | 1,133 | py | Python | setup.py | travisliu/data-spec-validator | 7ee0944ca9899d565ad04ed82ca26bb402970958 | [
"MIT"
] | 23 | 2021-08-11T08:53:15.000Z | 2022-02-14T04:44:13.000Z | setup.py | travisliu/data-spec-validator | 7ee0944ca9899d565ad04ed82ca26bb402970958 | [
"MIT"
] | 2 | 2021-09-11T08:59:12.000Z | 2022-03-29T00:40:42.000Z | setup.py | travisliu/data-spec-validator | 7ee0944ca9899d565ad04ed82ca26bb402970958 | [
"MIT"
] | 1 | 2022-01-04T07:45:22.000Z | 2022-01-04T07:45:22.000Z | import os
import setuptools
CUR_DIR = os.path.abspath(os.path.dirname(__file__))
about = {}
with open(os.path.join(CUR_DIR, "data_spec_validator", "__version__.py"), "r") as f:
exec(f.read(), about)
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setuptools.setup(
name... | 29.815789 | 84 | 0.672551 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 489 | 0.431598 |
14c7234590ee0036166bb3c285dac3557145714c | 9,204 | py | Python | prisms_influxdb.py | VDL-PRISM/home-assistant-components | 2041d2a257aede70613ddf8fe1e76bcc1877ef2e | [
"Apache-2.0"
] | null | null | null | prisms_influxdb.py | VDL-PRISM/home-assistant-components | 2041d2a257aede70613ddf8fe1e76bcc1877ef2e | [
"Apache-2.0"
] | null | null | null | prisms_influxdb.py | VDL-PRISM/home-assistant-components | 2041d2a257aede70613ddf8fe1e76bcc1877ef2e | [
"Apache-2.0"
] | null | null | null | """
A component which allows you to send data to an Influx database.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/influxdb/
"""
from datetime import timedelta
import functools
import logging
import itertools
import json
from persistent_queue import P... | 34.215613 | 94 | 0.624402 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,077 | 0.225663 |
14c9c1f833fdc6508d89df41045c267b53031119 | 587 | py | Python | utils/callbacks/callbacks_weather.py | Chris1nexus/carla-data-collector | 333019622cb07dc53bbe8f1c07cfb12fbfaae60c | [
"MIT"
] | null | null | null | utils/callbacks/callbacks_weather.py | Chris1nexus/carla-data-collector | 333019622cb07dc53bbe8f1c07cfb12fbfaae60c | [
"MIT"
] | null | null | null | utils/callbacks/callbacks_weather.py | Chris1nexus/carla-data-collector | 333019622cb07dc53bbe8f1c07cfb12fbfaae60c | [
"MIT"
] | null | null | null | import numpy as np
import os
from ..helpers import save_json
def callback_weather_fn(sensor_data, custom_args):
## note that in this function, sensor data comes from the
## 'weather' custom arg
## the sensor is used just to trigger the callback at the correct timestamp
weather = custom_args['weather']... | 29.35 | 79 | 0.722317 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 179 | 0.30494 |
14cb05cd02a2460b30efdd3be4e6a69dc0d1eedd | 114 | py | Python | change_fw_name.py | maxgerhardt/gd32-bootloader-dfu-dapboot | fcb8c47e17b2bee813ca8c6b33cb52b547538719 | [
"ISC"
] | 1 | 2021-10-03T17:26:38.000Z | 2021-10-03T17:26:38.000Z | change_fw_name.py | maxgerhardt/gd32-bootloader-dfu-dapboot | fcb8c47e17b2bee813ca8c6b33cb52b547538719 | [
"ISC"
] | null | null | null | change_fw_name.py | maxgerhardt/gd32-bootloader-dfu-dapboot | fcb8c47e17b2bee813ca8c6b33cb52b547538719 | [
"ISC"
] | 1 | 2021-11-03T22:06:01.000Z | 2021-11-03T22:06:01.000Z | Import("env")
# original Makefile builds into dapboot.bin/elf, let's do the same
env.Replace(PROGNAME="dapboot")
| 22.8 | 66 | 0.754386 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 80 | 0.701754 |
14cbaa1dbf623ab97aaa48323072de223e8374d1 | 1,393 | py | Python | exp2.py | advaithca/CG_LAB | 07c4424be2f37d21ed7af804361f0a992a8124ac | [
"MIT"
] | null | null | null | exp2.py | advaithca/CG_LAB | 07c4424be2f37d21ed7af804361f0a992a8124ac | [
"MIT"
] | null | null | null | exp2.py | advaithca/CG_LAB | 07c4424be2f37d21ed7af804361f0a992a8124ac | [
"MIT"
] | null | null | null | #drawing a line using DDA
from OpenGL.GL import *
from OpenGL.GLU import *
from OpenGL.GLUT import *
import sys
import math
def init():
glClearColor(1.0,2.0,1.0,1.0)
gluOrtho2D(-100.0,100.0,-100.0,100.0)
x1 = 0
x2 = 0
y1 = 0
y2 = 0
def plotpoints():
global x1, y1, x2, y2
glClear(G... | 21.106061 | 52 | 0.557789 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 194 | 0.139268 |
14cc76852586183e306354dd7443e72f19468e4e | 4,884 | py | Python | landlab/io/netcdf/dump.py | clebouteiller/landlab | e6f47db76ea0814c4c5a24e695bbafb74c722ff7 | [
"MIT"
] | 1 | 2022-01-07T02:36:07.000Z | 2022-01-07T02:36:07.000Z | landlab/io/netcdf/dump.py | clebouteiller/landlab | e6f47db76ea0814c4c5a24e695bbafb74c722ff7 | [
"MIT"
] | 1 | 2021-11-11T21:23:46.000Z | 2021-11-11T21:23:46.000Z | landlab/io/netcdf/dump.py | clebouteiller/landlab | e6f47db76ea0814c4c5a24e695bbafb74c722ff7 | [
"MIT"
] | 2 | 2019-08-19T08:58:10.000Z | 2022-01-07T02:36:01.000Z | import pathlib
import numpy as np
import xarray as xr
def to_netcdf(
grid, path, include="*", exclude=None, time=None, format="NETCDF4", mode="w"
):
"""Write landlab a grid to a netcdf file.
Write the data and grid information for *grid* to *path* as NetCDF.
If the *append* keyword argument in True,... | 33.682759 | 84 | 0.600328 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,135 | 0.641892 |
14cccb90d3e5e893e8714d97f092815310280afd | 4,053 | py | Python | app.py | ethylomat/MathPhysTheoTS | 76144c3990d9511817cfaa007a75ec55bc8e7310 | [
"MIT"
] | 1 | 2019-04-29T22:23:22.000Z | 2019-04-29T22:23:22.000Z | app.py | ethylomat/MathPhysTheoTS | 76144c3990d9511817cfaa007a75ec55bc8e7310 | [
"MIT"
] | 2 | 2016-08-11T14:26:47.000Z | 2016-08-11T14:29:44.000Z | app.py | ethylomat/MathPhysTheoTS | 76144c3990d9511817cfaa007a75ec55bc8e7310 | [
"MIT"
] | null | null | null | from flask import request, url_for, g
from flask_api import FlaskAPI, status, exceptions
from flask_sqlalchemy import SQLAlchemy
import arrow
from flask_admin import Admin
from flask_admin.contrib.sqla import ModelView
from flask_cors import CORS
app = FlaskAPI(__name__)
cors = CORS(app, resources={r"/*": {"origins... | 29.583942 | 100 | 0.635085 | 454 | 0.112016 | 0 | 0 | 1,365 | 0.336788 | 0 | 0 | 573 | 0.141377 |
14cd52d75b110058b96680b7258b9682ab53013c | 592 | py | Python | python/0496.toy-factory.py | Ubastic/lintcode | 9f600eece075410221a24859331a810503c76014 | [
"MIT"
] | 6 | 2019-10-02T02:24:49.000Z | 2021-11-18T10:08:07.000Z | python/0496.toy-factory.py | Ubastic/lintcode | 9f600eece075410221a24859331a810503c76014 | [
"MIT"
] | 1 | 2020-02-28T03:42:36.000Z | 2020-03-07T09:26:00.000Z | src/0496.toy-factory/0496.toy-factory.py | jiangshanmeta/lintcode | 7d7003825b5a7b9fd5b0be57aa2d84391e0d1fa5 | [
"MIT"
] | 2 | 2020-07-25T08:42:38.000Z | 2021-05-07T06:16:46.000Z | """
Your object will be instantiated and called as such:
ty = ToyFactory()
toy = ty.getToy(type)
toy.talk()
"""
class Toy:
def talk(self):
raise NotImplementedError('This method should have implemented.')
class Dog(Toy):
def talk(self):
print('Wow')
class Cat(Toy):
def talk(self):
... | 20.413793 | 73 | 0.584459 | 472 | 0.797297 | 0 | 0 | 0 | 0 | 0 | 0 | 244 | 0.412162 |
14cdf01dc867ab894916d46f7f85f97ee82b9f96 | 143 | py | Python | Dataflow/dimension.py | duseok/CNNDataflowAnalysis | a8e53ac1a1da47cfff16850efa365da9f9a72664 | [
"BSD-2-Clause"
] | 1 | 2021-04-02T07:17:15.000Z | 2021-04-02T07:17:15.000Z | Dataflow/dimension.py | duseok/CNNDataflowAnalysis | a8e53ac1a1da47cfff16850efa365da9f9a72664 | [
"BSD-2-Clause"
] | null | null | null | Dataflow/dimension.py | duseok/CNNDataflowAnalysis | a8e53ac1a1da47cfff16850efa365da9f9a72664 | [
"BSD-2-Clause"
] | null | null | null | from enum import IntEnum, unique
@unique
class Dimension(IntEnum):
InChan = 0
OutChan = 1
Height = 2
Width = 3
Batch = 4
| 13 | 32 | 0.615385 | 99 | 0.692308 | 0 | 0 | 107 | 0.748252 | 0 | 0 | 0 | 0 |
14d350e4c24338a388b8fa1fb69e9c619ba5502a | 4,746 | py | Python | autohandshake/src/Pages/LoginPage.py | cedwards036/autohandshake | 7f57b242a612b0f0aad634bc111a3db3050c6597 | [
"MIT"
] | 3 | 2018-05-18T16:15:32.000Z | 2019-08-01T23:06:44.000Z | autohandshake/src/Pages/LoginPage.py | cedwards036/autohandshake | 7f57b242a612b0f0aad634bc111a3db3050c6597 | [
"MIT"
] | null | null | null | autohandshake/src/Pages/LoginPage.py | cedwards036/autohandshake | 7f57b242a612b0f0aad634bc111a3db3050c6597 | [
"MIT"
] | null | null | null | from autohandshake.src.Pages.Page import Page
from autohandshake.src.HandshakeBrowser import HandshakeBrowser
from autohandshake.src.exceptions import InvalidURLError, NoSuchElementError, \
InvalidEmailError, InvalidPasswordError
import re
class LoginPage(Page):
"""
The old Handshake login page
"""
... | 46.529412 | 107 | 0.630004 | 4,499 | 0.947956 | 0 | 0 | 547 | 0.115255 | 0 | 0 | 1,993 | 0.419933 |
14d5f7d082a22edb6ba40c486b8faa869556d8a1 | 2,649 | py | Python | simsiam/engine/supervised.py | tillaczel/simsiam | d4d03aae625314ac2f24155fac3ca5bfc31502c7 | [
"MIT"
] | null | null | null | simsiam/engine/supervised.py | tillaczel/simsiam | d4d03aae625314ac2f24155fac3ca5bfc31502c7 | [
"MIT"
] | null | null | null | simsiam/engine/supervised.py | tillaczel/simsiam | d4d03aae625314ac2f24155fac3ca5bfc31502c7 | [
"MIT"
] | null | null | null | from omegaconf import DictConfig
import pytorch_lightning as pl
import numpy as np
import torch
import wandb
from simsiam.models import get_resnet
from simsiam.metrics import get_accuracy
from simsiam.optimizer import get_optimizer, get_scheduler
class SupervisedEngine(pl.LightningModule):
def __init__(self, co... | 33.531646 | 123 | 0.645527 | 2,393 | 0.90336 | 0 | 0 | 106 | 0.040015 | 0 | 0 | 150 | 0.056625 |
14da4fb90332f13ce9a537a25767a0c5d2699a55 | 5,568 | py | Python | app/auth/routes.py | Jumballaya/save-energy-tx | 1aa75cfdabe169c05f845cd47e477560f5319883 | [
"FSFAP"
] | null | null | null | app/auth/routes.py | Jumballaya/save-energy-tx | 1aa75cfdabe169c05f845cd47e477560f5319883 | [
"FSFAP"
] | 7 | 2021-03-09T00:51:13.000Z | 2022-03-11T23:40:46.000Z | app/auth/routes.py | Jumballaya/save-energy-tx | 1aa75cfdabe169c05f845cd47e477560f5319883 | [
"FSFAP"
] | 1 | 2019-03-20T16:58:23.000Z | 2019-03-20T16:58:23.000Z | from flask import render_template, redirect, url_for, flash
from flask_login import current_user, login_user, logout_user
from sqlalchemy import func
import stripe
from app import db
from app.auth import bp
from app.auth.forms import LoginForm, RegistrationForm, ResetPasswordRequestForm, ResetPasswordForm
from app.mode... | 36.155844 | 116 | 0.681214 | 0 | 0 | 0 | 0 | 5,026 | 0.902658 | 0 | 0 | 1,932 | 0.346983 |
14de090b5ed8c8188f4a83029df00bd8928fb8be | 607 | py | Python | rtcloud/ui.py | Brainiak/rtcloud | 43c7525c9a9be12d33426b24fac353dc4d92c35a | [
"Apache-2.0"
] | null | null | null | rtcloud/ui.py | Brainiak/rtcloud | 43c7525c9a9be12d33426b24fac353dc4d92c35a | [
"Apache-2.0"
] | 43 | 2017-11-16T22:05:42.000Z | 2017-12-12T16:20:04.000Z | rtcloud/ui.py | Brainiak/rtcloud | 43c7525c9a9be12d33426b24fac353dc4d92c35a | [
"Apache-2.0"
] | 1 | 2017-11-26T15:42:02.000Z | 2017-11-26T15:42:02.000Z | from nilearn import plotting
from IPython import display
def display_input(nifti, i, fig, ax, cut_coords=None):
if cut_coords is None:
cut_coords = [-9]
plotting.plot_img(nifti, title="In {}".format(i), axes=ax,
display_mode="z", cut_coords=cut_coords)
display.clear_output(wa... | 30.35 | 63 | 0.642504 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 21 | 0.034596 |
14de21cf53b113f2413b7d529932853ff2790fae | 2,420 | py | Python | demo.py | allenjhuang/rsys_api | 41bc05fbeda5b5c76232a548aa16d33d05bfa8e4 | [
"Unlicense"
] | null | null | null | demo.py | allenjhuang/rsys_api | 41bc05fbeda5b5c76232a548aa16d33d05bfa8e4 | [
"Unlicense"
] | null | null | null | demo.py | allenjhuang/rsys_api | 41bc05fbeda5b5c76232a548aa16d33d05bfa8e4 | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python3
import config
import rsys_api
import secrets
import json
import logging
import sys
def main():
logging.basicConfig(
level=logging.DEBUG,
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
datefmt="%Y/%m/%d %H:%M:%S",
filename="demo.log"
)
... | 30.632911 | 73 | 0.605372 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 776 | 0.320661 |
14debfd1d4eddfbeadc1ea54fc7d19ccc2df866b | 4,377 | py | Python | algorithms/common/runner.py | Fluidy/twc2020 | 0c65ab3508675a81e3edc831e45d59729dab159d | [
"MIT"
] | 1 | 2021-09-05T01:56:45.000Z | 2021-09-05T01:56:45.000Z | algorithms/common/runner.py | Fluidy/twc2020 | 0c65ab3508675a81e3edc831e45d59729dab159d | [
"MIT"
] | null | null | null | algorithms/common/runner.py | Fluidy/twc2020 | 0c65ab3508675a81e3edc831e45d59729dab159d | [
"MIT"
] | null | null | null | from utils import save_params, load_params
from importlib import import_module
from environments.env import Env
def run(algorithm_name, exp_name, env_name, agent_params, train_params, use_ray, use_gpu, is_train,
num_runs=None, test_run_id=None, test_model_id=None):
"""
Runner for training or t... | 39.432432 | 111 | 0.59767 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,144 | 0.261366 |
14dfa0d9c76706f000826c67f074640fd5155034 | 679 | py | Python | src/database/conn.py | ninaamorim/sentiment-analysis-2018-president-election | a5c12f1b659186edbc2dfa916bc82a2cfa2dd67f | [
"MIT"
] | 39 | 2018-09-05T14:42:05.000Z | 2021-09-24T20:21:56.000Z | src/database/conn.py | ninaamorim/sentiment-analysis-2018-president-election | a5c12f1b659186edbc2dfa916bc82a2cfa2dd67f | [
"MIT"
] | null | null | null | src/database/conn.py | ninaamorim/sentiment-analysis-2018-president-election | a5c12f1b659186edbc2dfa916bc82a2cfa2dd67f | [
"MIT"
] | 11 | 2018-12-07T19:43:44.000Z | 2021-05-21T21:54:43.000Z | from decouple import config
from peewee import SqliteDatabase
from playhouse.pool import PooledSqliteExtDatabase, PooledPostgresqlExtDatabase
# db = SqliteDatabase(config('DATABASE_PATH', default='sentiment_analysis.db'))
db = PooledSqliteExtDatabase(
config('DATABASE_PATH', default='sentiment_analysis.db'),
... | 30.863636 | 79 | 0.733432 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 374 | 0.55081 |
14e0f7d00154bf2e7af79e4ad4be7d9c4b233cd5 | 347 | py | Python | src/server/main.py | IsaacLean/project-owl | ba1b995f28abe461d40af5884d974bee15e0625f | [
"MIT"
] | 1 | 2018-10-23T01:42:14.000Z | 2018-10-23T01:42:14.000Z | src/server/main.py | IsaacLean/project-owl | ba1b995f28abe461d40af5884d974bee15e0625f | [
"MIT"
] | 1 | 2015-10-03T18:26:42.000Z | 2015-10-03T18:26:42.000Z | src/server/main.py | IsaacLean/project-owl | ba1b995f28abe461d40af5884d974bee15e0625f | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import webapp2
from pkg.controllers.transactionctrl import TransactionCtrl
from pkg.controllers.appctrl import AppCtrl
from pkg.controllers.debug import Debug
app = webapp2.WSGIApplication([
('/transaction', TransactionCtrl),
('/transaction/([0-9]+)', TransactionCtrl),
('/', AppCtrl),
('/deb... | 24.785714 | 59 | 0.746398 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 69 | 0.198847 |
14e118dd6032aaabd75d35019107d6e409ebb6bc | 875 | py | Python | login/middleWare/auth.py | csk17k/WebPanel | fdb0ae1b2fd12d006fbca65c779369e2d3d62928 | [
"Apache-2.0"
] | null | null | null | login/middleWare/auth.py | csk17k/WebPanel | fdb0ae1b2fd12d006fbca65c779369e2d3d62928 | [
"Apache-2.0"
] | null | null | null | login/middleWare/auth.py | csk17k/WebPanel | fdb0ae1b2fd12d006fbca65c779369e2d3d62928 | [
"Apache-2.0"
] | 1 | 2021-06-24T13:38:23.000Z | 2021-06-24T13:38:23.000Z | import re
from django.conf import settings
from django.shortcuts import redirect
from django.http import HttpResponseRedirect
EXEMPT_URLS=[]
if hasattr(settings,'LOGIN_EXEMPT_URLS'):
EXEMPT_URLS+=[re.compile(url) for url in settings.LOGIN_EXEMPT_URLS]
class AuthenticationMiddleware(object):
def __init__(self, get_... | 31.25 | 69 | 0.76 | 618 | 0.706286 | 0 | 0 | 0 | 0 | 0 | 0 | 206 | 0.235429 |
14e28f82f57d04fe78acc078756343daa686d910 | 579 | py | Python | tests/domain/entities/metadata_test.py | keigohtr/autify-web-scraper | 007ed78c461b31007328b5560957278856908979 | [
"Apache-2.0"
] | null | null | null | tests/domain/entities/metadata_test.py | keigohtr/autify-web-scraper | 007ed78c461b31007328b5560957278856908979 | [
"Apache-2.0"
] | null | null | null | tests/domain/entities/metadata_test.py | keigohtr/autify-web-scraper | 007ed78c461b31007328b5560957278856908979 | [
"Apache-2.0"
] | null | null | null | from datetime import datetime, timedelta, timezone
import freezegun
from autifycli.domain.entities.metadata import Metadata
JST = timezone(timedelta(hours=+9), "JST")
@freezegun.freeze_time("2021-08-12")
def test_metadata():
site = "https://example.com"
num_links = 0
num_images = 0
last_fetch = dat... | 25.173913 | 55 | 0.716753 | 0 | 0 | 0 | 0 | 406 | 0.701209 | 0 | 0 | 38 | 0.06563 |
14e2f68640f152f69f9e7b649672501b2bacc025 | 128 | py | Python | demeter/admin/model/__load__.py | shemic/demeter | 01f91aac43c325c48001dda86af17da43fb8d6fe | [
"MIT"
] | 1 | 2017-12-05T08:17:53.000Z | 2017-12-05T08:17:53.000Z | demos/helloworld/model/__load__.py | shemic/demeter | 01f91aac43c325c48001dda86af17da43fb8d6fe | [
"MIT"
] | null | null | null | demos/helloworld/model/__load__.py | shemic/demeter | 01f91aac43c325c48001dda86af17da43fb8d6fe | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
demeter database
name:__load__.py
"""
from demeter.model import *
from demeter.core import * | 18.285714 | 27 | 0.640625 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 72 | 0.5625 |
14e532fb903c9f210c1888329335296a3e6816c7 | 148 | py | Python | rheem-build-parent/rheem/rheem-api-python/pyrheem/graph/Visitor.py | DLUTLiuFengyi/rheem-integration | 34c437d73761ab44b4c6b7dbd5cab91875f0933a | [
"Apache-2.0"
] | null | null | null | rheem-build-parent/rheem/rheem-api-python/pyrheem/graph/Visitor.py | DLUTLiuFengyi/rheem-integration | 34c437d73761ab44b4c6b7dbd5cab91875f0933a | [
"Apache-2.0"
] | null | null | null | rheem-build-parent/rheem/rheem-api-python/pyrheem/graph/Visitor.py | DLUTLiuFengyi/rheem-integration | 34c437d73761ab44b4c6b7dbd5cab91875f0933a | [
"Apache-2.0"
] | null | null | null | import abc
class Visitor(metaclass=abc.ABCMeta):
@abc.abstractmethod
def visit_node(self, node, udf, orientation, last_iter):
pass | 21.142857 | 60 | 0.709459 | 135 | 0.912162 | 0 | 0 | 93 | 0.628378 | 0 | 0 | 0 | 0 |
14e6bab7bbc2ab9b9311ff6dc777217f71212f04 | 8,217 | py | Python | src/tie/__init__.py | shadowbq/opendxl-arctic-phase | 730a60d7e81c843115c341cb48225a30af001996 | [
"Apache-2.0"
] | 1 | 2019-07-24T14:48:06.000Z | 2019-07-24T14:48:06.000Z | src/tie/__init__.py | shadowbq/opendxl-arctic-phase | 730a60d7e81c843115c341cb48225a30af001996 | [
"Apache-2.0"
] | 1 | 2018-02-20T03:11:21.000Z | 2018-02-20T03:11:21.000Z | src/tie/__init__.py | shadowbq/opendxl-arctic-phase | 730a60d7e81c843115c341cb48225a30af001996 | [
"Apache-2.0"
] | null | null | null | # TIE Methods
import utils
from dxltieclient import TieClient
from dxltieclient.constants import HashType, ReputationProp, FileProvider, FileEnterpriseAttrib, \
CertProvider, CertEnterpriseAttrib, TrustLevel
# TIE Reputation Average Map
tiescoreMap = {0: 'Not Set', 1: 'Known Malicious', 15: 'Most Likely Malicious'... | 41.5 | 120 | 0.643909 | 5,989 | 0.728855 | 0 | 0 | 79 | 0.009614 | 0 | 0 | 1,789 | 0.217719 |
14e8b8ee0a1f85b70e2cc66661f3d254f3aee85e | 3,720 | py | Python | keepthis/KeepThis.py | puhoshville/keepthis | 70447ec367b78caba03c302470f591df2dcc1e7e | [
"MIT"
] | 4 | 2020-02-18T12:29:29.000Z | 2020-11-12T10:19:37.000Z | keepthis/KeepThis.py | puhoshville/keepthis | 70447ec367b78caba03c302470f591df2dcc1e7e | [
"MIT"
] | 79 | 2019-12-26T14:00:11.000Z | 2022-03-18T02:20:45.000Z | keepthis/KeepThis.py | puhoshville/keepthis | 70447ec367b78caba03c302470f591df2dcc1e7e | [
"MIT"
] | 3 | 2019-09-25T22:47:25.000Z | 2019-10-03T15:07:36.000Z | import hashlib
import json
import numpy as np
import pandas as pd
from pymemcache import serde
from pymemcache.client import base
from keepthis.MemcachedConnection import MemcachedConnection
from keepthis.exceptions import KeepThisValueError
class KeepThis:
def __init__(
self,
memcached_... | 32.631579 | 92 | 0.608065 | 3,473 | 0.933602 | 0 | 0 | 947 | 0.25457 | 0 | 0 | 365 | 0.098118 |
14ec81da7a7909c65783eff82c284b4266341daf | 1,016 | py | Python | sbx_bgsvc_starterpack/sbx_cfg.py | parkssie/sbx-bgsvc-starterpack | 9f2cb80cc677b9ab73cbf085a910d30c40194449 | [
"MIT"
] | null | null | null | sbx_bgsvc_starterpack/sbx_cfg.py | parkssie/sbx-bgsvc-starterpack | 9f2cb80cc677b9ab73cbf085a910d30c40194449 | [
"MIT"
] | null | null | null | sbx_bgsvc_starterpack/sbx_cfg.py | parkssie/sbx-bgsvc-starterpack | 9f2cb80cc677b9ab73cbf085a910d30c40194449 | [
"MIT"
] | null | null | null | import json
from pathlib import Path
from sbx_bgsvc_starterpack.sbx_json_default import json_default
def load(default_cfg: dict = {}, file: str = './cfg/cfg.json', encoding: str = 'utf-8-sig') -> dict:
# 1. 설정 파일이 없는경우 생성
cfg_file1 = Path(file)
if not cfg_file1.is_file():
save(default_cfg, file, ... | 31.75 | 100 | 0.662402 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 400 | 0.337838 |
14edc23ecedc5fce9202c1d0ece77446d5db16e6 | 7,804 | py | Python | lsp_shiloh/common/scan/aspscan/random_scan.py | internaru/Pinetree_P | 1f1525454c8b20c6c589529ff4bc159404611297 | [
"FSFAP"
] | null | null | null | lsp_shiloh/common/scan/aspscan/random_scan.py | internaru/Pinetree_P | 1f1525454c8b20c6c589529ff4bc159404611297 | [
"FSFAP"
] | null | null | null | lsp_shiloh/common/scan/aspscan/random_scan.py | internaru/Pinetree_P | 1f1525454c8b20c6c589529ff4bc159404611297 | [
"FSFAP"
] | null | null | null | #!/usr/bin/python
#
# ============================================================================
# Copyright (c) 2011 Marvell International, Ltd. All Rights Reserved
#
# Marvell Confidential
# ============================================================================
#
# Run a random sca... | 29.673004 | 94 | 0.580984 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,911 | 0.373014 |
14ededd86abda0dc6be68373dfe57be0e413a26e | 10,880 | py | Python | pyi_updater/client/patcher.py | rsumner31/PyUpdater1 | d9658000472e57453267ee8fa174ae914dd8d33c | [
"BSD-2-Clause"
] | null | null | null | pyi_updater/client/patcher.py | rsumner31/PyUpdater1 | d9658000472e57453267ee8fa174ae914dd8d33c | [
"BSD-2-Clause"
] | null | null | null | pyi_updater/client/patcher.py | rsumner31/PyUpdater1 | d9658000472e57453267ee8fa174ae914dd8d33c | [
"BSD-2-Clause"
] | null | null | null | # --------------------------------------------------------------------------
# Copyright 2014 Digital Sapphire Development Team
#
# 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://... | 36.881356 | 79 | 0.583732 | 9,431 | 0.86682 | 0 | 0 | 126 | 0.011581 | 0 | 0 | 3,414 | 0.313787 |
14eebabc8dc87995f7ccb85df841dd281ddfc7b5 | 649 | py | Python | app/recommendations/forms.py | ExiledNarwal28/glo-2005-project | 3b5b5f9cdcfe53d1e6e702609587068c4bd3310d | [
"MIT"
] | null | null | null | app/recommendations/forms.py | ExiledNarwal28/glo-2005-project | 3b5b5f9cdcfe53d1e6e702609587068c4bd3310d | [
"MIT"
] | null | null | null | app/recommendations/forms.py | ExiledNarwal28/glo-2005-project | 3b5b5f9cdcfe53d1e6e702609587068c4bd3310d | [
"MIT"
] | 1 | 2020-05-21T10:07:07.000Z | 2020-05-21T10:07:07.000Z | from flask_wtf import FlaskForm
from wtforms import StringField, SubmitField, SelectField
from wtforms.validators import DataRequired, Length
def range_to_select_choices(items):
choices = [(0, '0 star')]
for item in items:
choices.append((item, str(item) + ' stars'))
return choices
class AddReco... | 36.055556 | 99 | 0.707242 | 341 | 0.525424 | 0 | 0 | 0 | 0 | 0 | 0 | 73 | 0.112481 |
14eee5ee3d7b6b1d697c697b8f6b60cc9529087d | 3,090 | py | Python | tests/test_absort.py | MapleCCC/ABSort | fa020d7f2d6025603910c12fdfe775922d33afbc | [
"MIT"
] | null | null | null | tests/test_absort.py | MapleCCC/ABSort | fa020d7f2d6025603910c12fdfe775922d33afbc | [
"MIT"
] | null | null | null | tests/test_absort.py | MapleCCC/ABSort | fa020d7f2d6025603910c12fdfe775922d33afbc | [
"MIT"
] | null | null | null | from __future__ import annotations
import ast
import os
import re
import sys
from itertools import product
from pathlib import Path
import attr
from hypothesis import given, settings
from hypothesis.strategies import sampled_from
from absort.__main__ import (
CommentStrategy,
FormatOption,
NameRedefiniti... | 30 | 128 | 0.726537 | 205 | 0.066343 | 0 | 0 | 1,215 | 0.393204 | 0 | 0 | 901 | 0.291586 |
14ef95586e2cc40aadbf1094d06743d8533ef65a | 4,593 | py | Python | BrickBreaker/brick_breaker.py | Urosh91/BrickBreaker | 527564eb7fbab31e215a60ca8d46843a5a13791b | [
"MIT"
] | null | null | null | BrickBreaker/brick_breaker.py | Urosh91/BrickBreaker | 527564eb7fbab31e215a60ca8d46843a5a13791b | [
"MIT"
] | null | null | null | BrickBreaker/brick_breaker.py | Urosh91/BrickBreaker | 527564eb7fbab31e215a60ca8d46843a5a13791b | [
"MIT"
] | null | null | null | import pygame
from BrickBreaker import *
from BrickBreaker.Scenes import *
from BrickBreaker.Shared import *
class BrickBreaker:
def __init__(self):
self._lives = 5
self._score = 0
self._bonus = 1
self._level = Level(self)
self._level.load_random()
self._pad = P... | 28.886792 | 95 | 0.609188 | 4,383 | 0.954278 | 0 | 0 | 0 | 0 | 0 | 0 | 25 | 0.005443 |
14f0031f20c1d451293a9e4ffe1e1cb773cf31df | 57 | py | Python | flyeye/dynamics/__init__.py | sbernasek/flyeye | 95be4c6b52785d5ff3d0c68362308cb0fd1e8ae8 | [
"MIT"
] | 2 | 2020-02-22T09:53:17.000Z | 2020-02-24T19:02:01.000Z | flyeye/dynamics/__init__.py | sbernasek/flyeye | 95be4c6b52785d5ff3d0c68362308cb0fd1e8ae8 | [
"MIT"
] | 1 | 2019-11-20T17:11:07.000Z | 2019-11-20T17:11:07.000Z | flyeye/dynamics/__init__.py | sebastianbernasek/flyeye | 95be4c6b52785d5ff3d0c68362308cb0fd1e8ae8 | [
"MIT"
] | null | null | null | from .visualization import plot_mean, plot_mean_interval
| 28.5 | 56 | 0.877193 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
14f0fe0a265ae04fc3df046e751c6650ca481d2f | 2,188 | py | Python | mow/strong/phase2/predict.py | tychen5/Audio_Tagging_Challenge | 4602400433d37958d95ebf40a3c0798d17cc53c6 | [
"MIT"
] | 3 | 2019-01-22T03:14:32.000Z | 2019-08-17T02:22:06.000Z | mow/strong/phase2/predict.py | tychen5/Audio_Tagging_Challenge | 4602400433d37958d95ebf40a3c0798d17cc53c6 | [
"MIT"
] | null | null | null | mow/strong/phase2/predict.py | tychen5/Audio_Tagging_Challenge | 4602400433d37958d95ebf40a3c0798d17cc53c6 | [
"MIT"
] | null | null | null | '''
###################################
Modified from Mike's predict_acc.py
###################################
'''
import os
import sys
import random
import pickle
import numpy as np
import pandas as pd
from keras.utils import to_categorical
from keras.models import load_model
from sklearn.metrics import accuracy_s... | 25.741176 | 111 | 0.706581 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 573 | 0.261883 |
14f1a8447efc963a4a6ad15b82d5aee9bf59542f | 4,408 | py | Python | tests/test_date_utils.py | rob-blackbourn/aiofix | 2a07822e07414c1ea850708d7660c16a0564c21d | [
"Apache-2.0"
] | 1 | 2021-03-25T21:52:36.000Z | 2021-03-25T21:52:36.000Z | tests/test_date_utils.py | rob-blackbourn/jetblack-fixengine | 2a07822e07414c1ea850708d7660c16a0564c21d | [
"Apache-2.0"
] | null | null | null | tests/test_date_utils.py | rob-blackbourn/jetblack-fixengine | 2a07822e07414c1ea850708d7660c16a0564c21d | [
"Apache-2.0"
] | null | null | null | """Tests for date utils"""
from datetime import time, datetime
import pytz
from jetblack_fixengine.utils.date_utils import (
is_dow_in_range,
is_time_in_range,
delay_for_time_period
)
MONDAY = 0
TUESDAY = 1
WEDNESDAY = 2
THURSDAY = 3
FRIDAY = 4
SATURDAY = 5
SUNDAY = 6
def test_dow_range():
"""Test... | 34.708661 | 79 | 0.639292 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 401 | 0.090971 |
14f209a2e4864dbd925cb1c73c1a1f7110e0b62f | 400 | py | Python | xscratch/exceptions.py | gabaconrado/mainecoon | e8c9eb0c28ed874728315e386c9ec86dc06f1d7a | [
"Apache-2.0"
] | null | null | null | xscratch/exceptions.py | gabaconrado/mainecoon | e8c9eb0c28ed874728315e386c9ec86dc06f1d7a | [
"Apache-2.0"
] | null | null | null | xscratch/exceptions.py | gabaconrado/mainecoon | e8c9eb0c28ed874728315e386c9ec86dc06f1d7a | [
"Apache-2.0"
] | null | null | null | '''
xScratch exceptions
'''
class XSSyntaxError(Exception):
'''
Error raised when there is a syntax error in the script
'''
pass
class XSSemanticError(Exception):
'''
Error raised when there is a semantic error in the script
'''
pass
class XSArduinoError(Exception):
'''
Err... | 16 | 69 | 0.6525 | 363 | 0.9075 | 0 | 0 | 0 | 0 | 0 | 0 | 252 | 0.63 |
14f3c981162924e41ccbbaedac2e774e7979b26d | 2,267 | py | Python | environments/locomotion/scene_stadium.py | wx-b/unsup-3d-keypoints | 8a2e687b802d19b750aeadffa9bb6970f5956d4d | [
"MIT"
] | 28 | 2021-06-15T03:38:14.000Z | 2022-03-15T04:12:41.000Z | environments/locomotion/scene_stadium.py | wx-b/unsup-3d-keypoints | 8a2e687b802d19b750aeadffa9bb6970f5956d4d | [
"MIT"
] | 3 | 2021-12-25T17:57:47.000Z | 2022-03-24T09:52:43.000Z | environments/locomotion/scene_stadium.py | wx-b/unsup-3d-keypoints | 8a2e687b802d19b750aeadffa9bb6970f5956d4d | [
"MIT"
] | 5 | 2021-11-02T17:38:36.000Z | 2021-12-11T02:57:39.000Z | import os
import pybullet_data
from environments.locomotion.scene_abstract import Scene
import pybullet as p
class StadiumScene(Scene):
zero_at_running_strip_start_line = True # if False, center of coordinates (0,0,0) will be at the middle of the stadium
stadium_halflen = 105 * 0.25 # FOOBALL_FIELD_HALFLEN
... | 42.773585 | 123 | 0.666961 | 2,149 | 0.947949 | 0 | 0 | 0 | 0 | 0 | 0 | 824 | 0.363476 |
14f46540bddbc3d9b12cae1ca8aeeee6d852e367 | 522 | py | Python | src/python/providers/movement/standard_move.py | daboross/dxnr | 8f73e9d5f4473b97dcfe05804a40c9a0826e51b6 | [
"MIT"
] | null | null | null | src/python/providers/movement/standard_move.py | daboross/dxnr | 8f73e9d5f4473b97dcfe05804a40c9a0826e51b6 | [
"MIT"
] | null | null | null | src/python/providers/movement/standard_move.py | daboross/dxnr | 8f73e9d5f4473b97dcfe05804a40c9a0826e51b6 | [
"MIT"
] | null | null | null | from defs import *
from utilities import warnings
def move_to(creep: Creep, target: RoomPosition) -> int:
result = creep.moveTo(target, {
'ignoreCreeps': True,
})
if result == ERR_NO_PATH:
result = creep.moveTo(target, {
'ignoreCreeps': False,
})
if result != OK an... | 27.473684 | 89 | 0.603448 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 75 | 0.143678 |
14f8101f9071baa5ade2230825bde845717654bf | 4,817 | py | Python | pyshop/helpers/timeseries.py | sintef-energy/pyshop | 2991372f023e75c69ab83ece54a47fa9c3b73d60 | [
"MIT"
] | 1 | 2022-03-08T07:20:16.000Z | 2022-03-08T07:20:16.000Z | pyshop/helpers/timeseries.py | sintef-energy/pyshop | 2991372f023e75c69ab83ece54a47fa9c3b73d60 | [
"MIT"
] | 2 | 2022-02-09T13:53:16.000Z | 2022-03-16T14:36:21.000Z | pyshop/helpers/timeseries.py | sintef-energy/pyshop | 2991372f023e75c69ab83ece54a47fa9c3b73d60 | [
"MIT"
] | null | null | null | from typing import Dict, Sequence, Union
from .typing_annotations import DataFrameOrSeries
import pandas as pd
import numpy as np
def create_constant_time_series(value:Union[int,float], start:pd.Timestamp) -> pd.Series:
return pd.Series([value], index=[start])
def remove_consecutive_duplicates(df:DataFrameOrSeri... | 44.192661 | 166 | 0.686734 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,442 | 0.299356 |
14f8a6f3308057e78995708d4b904e36cb6a06da | 841 | py | Python | hlsclt/classes.py | qarlosalberto/hlsclt | cc657b780aac3a617f48c1a80e263a6945f8b7c9 | [
"MIT"
] | 34 | 2017-07-03T09:56:11.000Z | 2022-03-22T02:03:27.000Z | hlsclt/classes.py | qarlosalberto/hlsclt | cc657b780aac3a617f48c1a80e263a6945f8b7c9 | [
"MIT"
] | 22 | 2017-06-18T03:49:02.000Z | 2021-10-06T12:41:09.000Z | hlsclt/classes.py | qarlosalberto/hlsclt | cc657b780aac3a617f48c1a80e263a6945f8b7c9 | [
"MIT"
] | 11 | 2018-06-02T04:38:26.000Z | 2021-06-10T11:57:27.000Z | # -*- coding: utf-8 -*-
""" Class definitions for the HLSCLT Command Line Tool.
Copyright (c) 2017 Ben Marshall
"""
# Generic error class
class Error(Exception):
"""Base class for exceptions in this module."""
pass
# Specific error class for local config file errors
class ConfigError(Error):
"""Exception... | 28.033333 | 88 | 0.699168 | 576 | 0.684899 | 0 | 0 | 0 | 0 | 0 | 0 | 424 | 0.504162 |
14f9e7e5dad9d0b30bd98785f713bf50cb29033e | 718 | py | Python | office_test_word/test_platform/core/BasePage.py | yag8009/office_test_team | edf06f3c0818b08ec39541bdcd04bcc537fc9ed1 | [
"MIT"
] | null | null | null | office_test_word/test_platform/core/BasePage.py | yag8009/office_test_team | edf06f3c0818b08ec39541bdcd04bcc537fc9ed1 | [
"MIT"
] | null | null | null | office_test_word/test_platform/core/BasePage.py | yag8009/office_test_team | edf06f3c0818b08ec39541bdcd04bcc537fc9ed1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
class BasePage(object):
"""
BasePage封装所有页面都公用的方法,例如driver, url
"""
#初始化driver、url、等
def __init__(self, selenium_driver, base_url, pagetitle):
self.base_url = base_url
self.pagetitle = pagetitle
self.driver = selenium_driver
def _iopen(self, url, pagetitle):
... | 26.592593 | 58 | 0.739554 | 890 | 0.946809 | 0 | 0 | 0 | 0 | 0 | 0 | 480 | 0.510638 |
14f9fc6ca518d45dcde0a27042ff52217603dcff | 9,740 | py | Python | nex/parsing/utils.py | eddiejessup/nex | d61005aacb3b87f8cf1a1e2080ca760d757d5751 | [
"MIT"
] | null | null | null | nex/parsing/utils.py | eddiejessup/nex | d61005aacb3b87f8cf1a1e2080ca760d757d5751 | [
"MIT"
] | null | null | null | nex/parsing/utils.py | eddiejessup/nex | d61005aacb3b87f8cf1a1e2080ca760d757d5751 | [
"MIT"
] | null | null | null | import logging
from collections import deque
from ..tokens import BuiltToken
from ..utils import LogicError
from ..router import NoSuchControlSequence
from ..constants.instructions import Instructions
logger = logging.getLogger(__name__)
# Stuff specific to *my parsing*.
letter_to_non_active_uncased_type_map = {
... | 37.751938 | 90 | 0.658316 | 670 | 0.068789 | 247 | 0.025359 | 0 | 0 | 0 | 0 | 3,676 | 0.377413 |
14fbcce3feb4c4d3755700befad3fb8381ba83ea | 719 | py | Python | carnival/migrations/0011_auto_20191017_1045.py | farro4069/allez | c6ba374ee03cb01a494a4f6fe8ae0d0de5ce463c | [
"BSD-2-Clause"
] | null | null | null | carnival/migrations/0011_auto_20191017_1045.py | farro4069/allez | c6ba374ee03cb01a494a4f6fe8ae0d0de5ce463c | [
"BSD-2-Clause"
] | null | null | null | carnival/migrations/0011_auto_20191017_1045.py | farro4069/allez | c6ba374ee03cb01a494a4f6fe8ae0d0de5ce463c | [
"BSD-2-Clause"
] | null | null | null | # Generated by Django 2.1.4 on 2019-10-17 00:45
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('carnival', '0010_auto_20191013_1246'),
]
operations = [
migrations.AlterField(
model_name='register',
name='prime_on... | 24.793103 | 53 | 0.5758 | 626 | 0.870654 | 0 | 0 | 0 | 0 | 0 | 0 | 147 | 0.204451 |
14fbebb9df421f915a2a0442fc7bcdd045fbbef0 | 2,787 | py | Python | openweave/tlv/schema/tests/test_VENDOR.py | robszewczyk/openweave-tlv-schema | c0acbccce4fcaf213a09261f79d6a141ae94f7e8 | [
"Apache-2.0"
] | 1 | 2020-05-19T22:52:27.000Z | 2020-05-19T22:52:27.000Z | openweave/tlv/schema/tests/test_VENDOR.py | robszewczyk/openweave-tlv-schema | c0acbccce4fcaf213a09261f79d6a141ae94f7e8 | [
"Apache-2.0"
] | null | null | null | openweave/tlv/schema/tests/test_VENDOR.py | robszewczyk/openweave-tlv-schema | c0acbccce4fcaf213a09261f79d6a141ae94f7e8 | [
"Apache-2.0"
] | 1 | 2021-02-15T16:14:17.000Z | 2021-02-15T16:14:17.000Z | #!/usr/bin/env python3
#
# Copyright (c) 2020 Google LLC.
# All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.... | 34.8375 | 76 | 0.614281 | 1,966 | 0.705418 | 0 | 0 | 0 | 0 | 0 | 0 | 1,457 | 0.522784 |
14fc3caa752fb624866d5cfe60083c14dfb17ed9 | 336 | py | Python | app/services/events.py | fufuok/FF.PyAdmin | 031fcafe70ecb78488876d0c61e30ca4fb4290af | [
"MIT"
] | 56 | 2019-11-26T15:42:29.000Z | 2022-03-10T12:28:07.000Z | app/services/events.py | fufuok/FF.PyAdmin | 031fcafe70ecb78488876d0c61e30ca4fb4290af | [
"MIT"
] | 4 | 2020-03-20T01:51:47.000Z | 2022-03-30T22:10:56.000Z | app/services/events.py | fufuok/FF.PyAdmin | 031fcafe70ecb78488876d0c61e30ca4fb4290af | [
"MIT"
] | 15 | 2019-11-26T15:42:33.000Z | 2022-03-09T05:41:44.000Z | # -*- coding:utf-8 -*-
"""
events.py
~~~~~~~~
自定义信号, 事件
:author: Fufu, 2019/12/20
"""
from blinker import signal
# 用户登录成功
event_user_logined = signal('event_user_logined')
# 系统管理操作(用户授权/权限组管理等)
event_sys_admin = signal('event_sys_admin')
# app 上下文环境示例
event_async_with_app_demo = signal('event_async_... | 17.684211 | 63 | 0.690476 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 279 | 0.683824 |
14fe3c3a6b1c35d2aade0c7366e77fd7418c122a | 1,181 | py | Python | oura_to_sqlite/utils.py | mfa/oura-to-sqlite | 724dab55e94df0c3a3e6e2faafa758cf20ea0792 | [
"Apache-2.0"
] | null | null | null | oura_to_sqlite/utils.py | mfa/oura-to-sqlite | 724dab55e94df0c3a3e6e2faafa758cf20ea0792 | [
"Apache-2.0"
] | 2 | 2021-10-31T15:16:34.000Z | 2021-10-31T15:22:17.000Z | oura_to_sqlite/utils.py | mfa/oura-to-sqlite | 724dab55e94df0c3a3e6e2faafa758cf20ea0792 | [
"Apache-2.0"
] | null | null | null | import datetime
import click
from oura import OuraClient
def download(db, token):
client = OuraClient(personal_access_token=token)
click.echo("User: ")
click.echo(client.user_info())
# FIXME get start_date from database (last day downloaded - 1day)
start_date = "2015-01-01"
end_date = str(da... | 25.12766 | 81 | 0.628281 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 284 | 0.240474 |
14fe677b2376deed69fc96644a350773e0c985ca | 1,635 | py | Python | ai_finger_counting.py | dnovai/advancedCVProject | de3e75247c7b7ae617a578800c51c42fadbdc844 | [
"MIT"
] | 1 | 2022-02-25T02:36:02.000Z | 2022-02-25T02:36:02.000Z | ai_finger_counting.py | dnovai/advancedCVProject | de3e75247c7b7ae617a578800c51c42fadbdc844 | [
"MIT"
] | null | null | null | ai_finger_counting.py | dnovai/advancedCVProject | de3e75247c7b7ae617a578800c51c42fadbdc844 | [
"MIT"
] | null | null | null | import cv2
import os
import time
import advancedcv.hand_tracking as htm
import numpy as np
import itertools
patterns = np.array(list(itertools.product([0, 1], repeat=5)))
p_time = 0
cap = cv2.VideoCapture(0)
# w_cam, h_cam = 648, 480
# cap.set(3, w_cam)
# cap.set(4, h_cam)
folder_path = "finger_images"
my_list = os... | 24.044118 | 100 | 0.601223 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 184 | 0.112538 |
14ff6bd96aa976b58904b681f23b026afedef8de | 12,852 | py | Python | PaddleFSL/examples/image_classification/maml_image_classification.py | tianxin1860/FSL-Mate | 74dde9a3e1f789ec92710b9ecdf9c5b060d26fd3 | [
"MIT"
] | null | null | null | PaddleFSL/examples/image_classification/maml_image_classification.py | tianxin1860/FSL-Mate | 74dde9a3e1f789ec92710b9ecdf9c5b060d26fd3 | [
"MIT"
] | null | null | null | PaddleFSL/examples/image_classification/maml_image_classification.py | tianxin1860/FSL-Mate | 74dde9a3e1f789ec92710b9ecdf9c5b060d26fd3 | [
"MIT"
] | null | null | null | import paddle
import paddlefsl
from paddlefsl.model_zoo import maml
# Set computing device
paddle.set_device('gpu:0')
# """ ---------------------------------------------------------------------------------
# Config: MAML, Omniglot, MLP, 5 Ways, 1 Shot
TRAIN_DATASET = paddlefsl.datasets.Omniglot(mode='train', image_s... | 35.502762 | 106 | 0.591581 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10,776 | 0.838469 |
14ff741d0e6a57229801a6e6be5e98e3344172dd | 3,085 | py | Python | convert.py | AndreiBaias/PAS | 8905f86db15806647ab7879fd32c9057a9b93868 | [
"MIT"
] | null | null | null | convert.py | AndreiBaias/PAS | 8905f86db15806647ab7879fd32c9057a9b93868 | [
"MIT"
] | 3 | 2022-03-30T15:43:12.000Z | 2022-03-30T15:43:41.000Z | convert.py | AndreiBaias/PAS | 8905f86db15806647ab7879fd32c9057a9b93868 | [
"MIT"
] | null | null | null |
import numpy as np
import collections, numpy
import glob
from PIL import Image
from matplotlib.pyplot import cm
nrImages = 1
imageSize = 449
finalImageSize = 449
ImageNumber = 0
sourceFolder = 'images'
# sourceFolder = "testInput"
destinationFolder = 'final_text_files_2'
# destinationFolder = "testOutpu... | 24.68 | 83 | 0.491086 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 862 | 0.279417 |
14ff9b4e350a6ca08c90a2722fd722026d991e51 | 1,857 | py | Python | ravager/housekeeping.py | CoolFool/Ravager | 3d647115689dc23a160255221aaa493f879406a5 | [
"MIT"
] | null | null | null | ravager/housekeeping.py | CoolFool/Ravager | 3d647115689dc23a160255221aaa493f879406a5 | [
"MIT"
] | 1 | 2022-03-15T06:55:48.000Z | 2022-03-15T15:38:20.000Z | ravager/housekeeping.py | CoolFool/Ravager | 3d647115689dc23a160255221aaa493f879406a5 | [
"MIT"
] | 2 | 2022-02-09T21:30:57.000Z | 2022-03-15T06:19:57.000Z | from ravager.database.tasks import Tasks
import logging
from ravager.database.helpers import setup_db
from ravager.config import DATABASE_URL, LOGS_DIR
from ravager.helpers.check_process import Process
from subprocess import check_call
logger = logging.getLogger(__file__)
setup_db.create_tables()
logger.info("Databas... | 36.411765 | 74 | 0.726979 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 635 | 0.341949 |
14ffa6b25312cc8be37c853fbf3300bd513054fa | 4,623 | py | Python | VOTA_Control/VOTAScopeHW/daq_do/daq_do_dev.py | fullerene12/VOTA | 3a5cfc1e210ac7ea274537a8d189b54660416599 | [
"MIT"
] | null | null | null | VOTA_Control/VOTAScopeHW/daq_do/daq_do_dev.py | fullerene12/VOTA | 3a5cfc1e210ac7ea274537a8d189b54660416599 | [
"MIT"
] | null | null | null | VOTA_Control/VOTAScopeHW/daq_do/daq_do_dev.py | fullerene12/VOTA | 3a5cfc1e210ac7ea274537a8d189b54660416599 | [
"MIT"
] | 1 | 2021-08-01T22:39:18.000Z | 2021-08-01T22:39:18.000Z | from PyDAQmx import *
from ctypes import byref, c_ulong,c_int32
import numpy as np
class DAQSimpleDOTask(Task):
'''
a simple task that set one digital output line to high or low
'''
def __init__(self,chan= 'Dev2/port0/line5'):
'''
chan: name of the chanel, in the format of Dev2/por... | 26.722543 | 100 | 0.544884 | 4,519 | 0.977504 | 0 | 0 | 0 | 0 | 0 | 0 | 1,978 | 0.427861 |
14ffc8d1112cea4351881119362848071845aff2 | 1,603 | py | Python | test/examples/integrated/codec/testlib.py | rodrigomelo9/uvm-python | e3127eba2cc1519a61dc6f736d862a8dcd6fce20 | [
"Apache-2.0"
] | 140 | 2020-01-18T00:14:17.000Z | 2022-03-29T10:57:24.000Z | test/examples/integrated/codec/testlib.py | Mohsannaeem/uvm-python | 1b8768a1358d133465ede9cadddae651664b1d53 | [
"Apache-2.0"
] | 24 | 2020-01-18T18:40:58.000Z | 2021-03-25T17:39:07.000Z | test/examples/integrated/codec/testlib.py | Mohsannaeem/uvm-python | 1b8768a1358d133465ede9cadddae651664b1d53 | [
"Apache-2.0"
] | 34 | 2020-01-18T12:22:59.000Z | 2022-02-11T07:03:11.000Z | #//
#// -------------------------------------------------------------
#// Copyright 2011 Synopsys, Inc.
#// Copyright 2010-2011 Mentor Graphics Corporation
#// Copyright 2019-2020 Tuomas Poikela (tpoikela)
#// All Rights Reserved Worldwide
#//
#// Licensed under the Apache License, Version 2.0 (the
#//... | 34.106383 | 71 | 0.559576 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,449 | 0.90393 |
09000834339f325e00a15ac2eaa5bf2ddeeff627 | 1,110 | py | Python | MGTU-demo/arrange_signs.py | webkadiz/olympiad-problems | 620912815904c0f95b91ccd193ca3db0ea20e507 | [
"MIT"
] | null | null | null | MGTU-demo/arrange_signs.py | webkadiz/olympiad-problems | 620912815904c0f95b91ccd193ca3db0ea20e507 | [
"MIT"
] | null | null | null | MGTU-demo/arrange_signs.py | webkadiz/olympiad-problems | 620912815904c0f95b91ccd193ca3db0ea20e507 | [
"MIT"
] | null | null | null | from math import inf
nums = list(map(int, input().split()))
signs = { '+': 1, '-': 2, '*': 3, '/': 4, '%': 5, '=': 0 }
anss = []
def comb(nums, exp, wasEq):
if not nums:
try:
res = eval(exp)
except:
res = 0
if type(res) == bool and eval(exp):
anss.append(exp)
return
return
cur, nrest = str(n... | 17.076923 | 58 | 0.544144 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 61 | 0.054955 |
09003d15be83a3b390c12acd09219a14eb6cb09a | 15,291 | py | Python | kempnn/trainer.py | ttyhasebe/KEMPNN | d52ec0a82d758431120c0831738b104a535f2264 | [
"BSD-3-Clause"
] | 4 | 2022-01-14T08:43:52.000Z | 2022-03-02T11:06:03.000Z | kempnn/trainer.py | ttyhasebe/KEMPNN | d52ec0a82d758431120c0831738b104a535f2264 | [
"BSD-3-Clause"
] | null | null | null | kempnn/trainer.py | ttyhasebe/KEMPNN | d52ec0a82d758431120c0831738b104a535f2264 | [
"BSD-3-Clause"
] | null | null | null | #
# Copyright 2021 by Tatsuya Hasebe, Hitachi, Ltd.
# All rights reserved.
#
# This file is part of the KEMPNN package,
# and is released under the "BSD 3-Clause License". Please see the LICENSE
# file that should have been included as part of this package.
#
import datetime
import json
import os
import pickle
import ... | 33.459519 | 80 | 0.511804 | 14,455 | 0.945327 | 0 | 0 | 87 | 0.00569 | 0 | 0 | 3,094 | 0.202341 |
09003f8db6874b60bff5eb74103e02a1d139ecc6 | 222 | py | Python | ex052.py | almmessias/CursoPython | 4cec6946f32002cbd5d3b802df11ea1ba74169f5 | [
"MIT"
] | null | null | null | ex052.py | almmessias/CursoPython | 4cec6946f32002cbd5d3b802df11ea1ba74169f5 | [
"MIT"
] | null | null | null | ex052.py | almmessias/CursoPython | 4cec6946f32002cbd5d3b802df11ea1ba74169f5 | [
"MIT"
] | null | null | null | num = int (input ('Digite um número inteiro: '))
if num % 2 != 0 and num % 3 != 0 and num % 5 != 0 and num % 7 != 0:
print ('{} é um número primo'.format(num))
else:
print ('{} não é um número primo.'.format(num))
| 37 | 67 | 0.567568 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 83 | 0.364035 |
090286670227babe5f029e77ab867cf49a3711a6 | 659 | py | Python | invenio_records_lom/records/systemfields/providers.py | martinobersteiner/invenio-records-lom | 545a78eeb056b3c88ed46f7fe345a699bf283895 | [
"MIT"
] | null | null | null | invenio_records_lom/records/systemfields/providers.py | martinobersteiner/invenio-records-lom | 545a78eeb056b3c88ed46f7fe345a699bf283895 | [
"MIT"
] | 18 | 2020-10-21T07:58:14.000Z | 2022-03-29T12:10:25.000Z | invenio_records_lom/records/systemfields/providers.py | martinobersteiner/invenio-records-lom | 545a78eeb056b3c88ed46f7fe345a699bf283895 | [
"MIT"
] | 7 | 2020-10-06T08:46:40.000Z | 2021-07-06T13:21:29.000Z | # -*- coding: utf-8 -*-
#
# Copyright (C) 2021 Graz University of Technology.
#
# invenio-records-lom is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""Provider for LOM PID-fields."""
from invenio_drafts_resources.records.api import ... | 27.458333 | 80 | 0.760243 | 239 | 0.362671 | 0 | 0 | 0 | 0 | 0 | 0 | 355 | 0.538695 |
0902becf0cc85035e9f04cc78c468e09f7880261 | 1,127 | py | Python | discord_base/__manifest__.py | bishalgit/discord-addons | f7f36791734440cd0b37296f5f5132e91035b15f | [
"MIT"
] | 1 | 2020-10-02T23:22:44.000Z | 2020-10-02T23:22:44.000Z | discord_base/__manifest__.py | bishalgit/discord-addons | f7f36791734440cd0b37296f5f5132e91035b15f | [
"MIT"
] | null | null | null | discord_base/__manifest__.py | bishalgit/discord-addons | f7f36791734440cd0b37296f5f5132e91035b15f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Part of Ygen. See LICENSE file for full copyright and licensing details.
{
'name': 'Discord - Base module for discord',
'summary': """
This module is a base module to provide foudation for building discord modules for Odoo.""",
'description': """
This module is a b... | 32.2 | 100 | 0.598048 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 852 | 0.755989 |
0903fb75c589ec651b3db5a68d90addf520bf4a1 | 696 | py | Python | app.py | KaceyHirth/Library-DBMS-System | 40b425ed5c7b46627b7c48724b2d20e7a64cf025 | [
"MIT"
] | null | null | null | app.py | KaceyHirth/Library-DBMS-System | 40b425ed5c7b46627b7c48724b2d20e7a64cf025 | [
"MIT"
] | null | null | null | app.py | KaceyHirth/Library-DBMS-System | 40b425ed5c7b46627b7c48724b2d20e7a64cf025 | [
"MIT"
] | null | null | null | from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_bootstrap import Bootstrap
from flask_login import LoginManager, UserMixin, login_user, login_required, logout_user, current_user
import os
basePath = os.path.abspath(os.path.dirname(__file__))
template_dir = os.path.join(basePath, 'templates')... | 27.84 | 102 | 0.806034 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 131 | 0.188218 |
09042b5650522c004e88f9bb356dd4258fbf0a37 | 78 | py | Python | python_resolutions/beginner/1070.py | DanielYe1/UriResolutions | 7140c4a7f37b95cc15d9c77612c4abde469d379f | [
"Apache-2.0"
] | null | null | null | python_resolutions/beginner/1070.py | DanielYe1/UriResolutions | 7140c4a7f37b95cc15d9c77612c4abde469d379f | [
"Apache-2.0"
] | null | null | null | python_resolutions/beginner/1070.py | DanielYe1/UriResolutions | 7140c4a7f37b95cc15d9c77612c4abde469d379f | [
"Apache-2.0"
] | null | null | null | x = int(input())
for i in range(12):
if (i+x) % 2 ==1:
print(i+x)
| 15.6 | 21 | 0.448718 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
09047cdff4106518ddb7312a4ad2e4fbacd7ac5f | 6,167 | py | Python | xdl/blueprints/chasm2.py | mcrav/xdl | c120a1cf50a9b668a79b118700930eb3d60a9298 | [
"MIT"
] | null | null | null | xdl/blueprints/chasm2.py | mcrav/xdl | c120a1cf50a9b668a79b118700930eb3d60a9298 | [
"MIT"
] | null | null | null | xdl/blueprints/chasm2.py | mcrav/xdl | c120a1cf50a9b668a79b118700930eb3d60a9298 | [
"MIT"
] | null | null | null | from ..constants import JSON_PROP_TYPE
from .base_blueprint import BaseProcedureBlueprint
from ..steps import placeholders
from ..reagents import Reagent
DEFAULT_VESSEL: str = 'reactor'
DEFAULT_SEPARATION_VESSEL: str = 'separator'
DEFAULT_EVAPORATION_VESSEL: str = 'rotavap'
class Chasm2(BaseProcedureBlueprint):
... | 31.304569 | 78 | 0.592995 | 2,170 | 0.351873 | 0 | 0 | 0 | 0 | 0 | 0 | 688 | 0.111562 |
0904bf755d3e10215cee53a8c90b515aa46d7e38 | 1,487 | py | Python | build/lib/modules/admin.py | HyperServiceOne/py-nsbcli | 9da6f01455b14cf21863acb0ba5acfce21f818cb | [
"BSD-3-Clause"
] | null | null | null | build/lib/modules/admin.py | HyperServiceOne/py-nsbcli | 9da6f01455b14cf21863acb0ba5acfce21f818cb | [
"BSD-3-Clause"
] | null | null | null | build/lib/modules/admin.py | HyperServiceOne/py-nsbcli | 9da6f01455b14cf21863acb0ba5acfce21f818cb | [
"BSD-3-Clause"
] | 1 | 2021-04-09T13:07:44.000Z | 2021-04-09T13:07:44.000Z |
class Admin(object):
def __init__(self):
self.rpc_host = None
self._abci_info_url = None
self._abci_query_url = None
self._block_url = None
self._block_result_url = None
self._block_chain_url = None
self._broadcast_tx_async_url = None
self._broadcast... | 29.74 | 78 | 0.659045 | 1,485 | 0.998655 | 0 | 0 | 241 | 0.162071 | 0 | 0 | 47 | 0.031607 |
09050f807c744801e59522d4a44d059ae276259e | 570 | py | Python | pandaharvester/harvestercore/plugin_base.py | tsulaiav/harvester | ca3f78348019dd616738f2da7d50e81700a8e6b9 | [
"Apache-2.0"
] | 11 | 2017-06-01T10:16:58.000Z | 2019-11-22T08:41:36.000Z | pandaharvester/harvestercore/plugin_base.py | tsulaiav/harvester | ca3f78348019dd616738f2da7d50e81700a8e6b9 | [
"Apache-2.0"
] | 34 | 2016-10-25T19:15:24.000Z | 2021-03-05T12:59:04.000Z | pandaharvester/harvestercore/plugin_base.py | tsulaiav/harvester | ca3f78348019dd616738f2da7d50e81700a8e6b9 | [
"Apache-2.0"
] | 17 | 2016-10-24T13:29:45.000Z | 2021-03-23T17:35:27.000Z | from future.utils import iteritems
from pandaharvester.harvestercore import core_utils
class PluginBase(object):
def __init__(self, **kwarg):
for tmpKey, tmpVal in iteritems(kwarg):
setattr(self, tmpKey, tmpVal)
# make logger
def make_logger(self, base_log, token=None, method_name=Non... | 33.529412 | 96 | 0.685965 | 480 | 0.842105 | 0 | 0 | 0 | 0 | 0 | 0 | 26 | 0.045614 |
0905ad16307a5af70bde741ea4817b4a93ef0e8a | 1,762 | py | Python | preprocessing/MEG/filtering.py | athiede13/neural_sources | 3435f26a4b99b7f705c7ed6b43ab9c741fdd1502 | [
"MIT"
] | null | null | null | preprocessing/MEG/filtering.py | athiede13/neural_sources | 3435f26a4b99b7f705c7ed6b43ab9c741fdd1502 | [
"MIT"
] | null | null | null | preprocessing/MEG/filtering.py | athiede13/neural_sources | 3435f26a4b99b7f705c7ed6b43ab9c741fdd1502 | [
"MIT"
] | null | null | null | """
Filtering of MEG data
Created on 13.9.2017
@author: Anja Thiede <[email protected]>
"""
import os
from os import walk
import datetime
import numpy as np
import mne
now = datetime.datetime.now()
def processedcount(file_list):
n = 0
for item in file_list:
if item[-8:-4] == 'filt':
... | 27.53125 | 88 | 0.611805 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 579 | 0.328604 |
090815c73402b5617ea4e0affb9e020029701833 | 108 | py | Python | solutions/week-1/interval.py | bekbolsky/stepik-python | 91613178ef8401019fab01ad18f10ee84f2f4491 | [
"MIT"
] | 1 | 2022-02-23T09:05:47.000Z | 2022-02-23T09:05:47.000Z | solutions/week-1/interval.py | bekbolsky/stepik-python | 91613178ef8401019fab01ad18f10ee84f2f4491 | [
"MIT"
] | null | null | null | solutions/week-1/interval.py | bekbolsky/stepik-python | 91613178ef8401019fab01ad18f10ee84f2f4491 | [
"MIT"
] | null | null | null | x = int(input())
if (-15 < x <= 12) or (14 < x < 17) or x >= 19:
print("True")
else:
print("False")
| 18 | 47 | 0.472222 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 13 | 0.12037 |
09098bec23281af47e835daa26b81dccca6d2e2c | 22,972 | py | Python | src/pds_doi_service/core/db/doi_database.py | NASA-PDS/pds-doi-service | b994381a5757700229865e8fe905553559684e0d | [
"Apache-2.0"
] | 2 | 2020-11-03T19:29:11.000Z | 2021-09-26T01:42:41.000Z | src/pds_doi_service/core/db/doi_database.py | NASA-PDS/pds-doi-service | b994381a5757700229865e8fe905553559684e0d | [
"Apache-2.0"
] | 222 | 2020-05-07T21:05:23.000Z | 2021-12-16T22:14:54.000Z | src/pds_doi_service/core/db/doi_database.py | NASA-PDS/pds-doi-service | b994381a5757700229865e8fe905553559684e0d | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2020–21, by the California Institute of Technology. ALL RIGHTS
# RESERVED. United States Government Sponsorship acknowledged. Any commercial
# use must be negotiated with the Office of Technology Transfer at the
# California Institute of Technology.
#
"""
===============
doi_database.py
=============... | 36.176378 | 119 | 0.632596 | 22,048 | 0.959694 | 0 | 0 | 5,126 | 0.223122 | 0 | 0 | 10,586 | 0.460782 |
0909f5e66b19795a40b888634a2cf23b87f0cd63 | 786 | py | Python | amnesia/modules/search/views/tag.py | silenius/amnesia | ba5e3ac79a89da599c22206ad1fd17541855f74c | [
"BSD-2-Clause"
] | 4 | 2015-05-08T10:57:56.000Z | 2021-05-17T04:32:11.000Z | amnesia/modules/search/views/tag.py | silenius/amnesia | ba5e3ac79a89da599c22206ad1fd17541855f74c | [
"BSD-2-Clause"
] | 6 | 2019-12-26T16:43:41.000Z | 2022-02-28T11:07:54.000Z | amnesia/modules/search/views/tag.py | silenius/amnesia | ba5e3ac79a89da599c22206ad1fd17541855f74c | [
"BSD-2-Clause"
] | 1 | 2019-09-23T14:08:11.000Z | 2019-09-23T14:08:11.000Z | # -*- coding: utf-8 -*-
# pylint: disable=E1101
from pyramid.view import view_config
from pyramid.httpexceptions import HTTPNotFound
from amnesia.modules.tag import Tag
from amnesia.modules.search import SearchResource
def includeme(config):
''' Pyramid includeme func'''
config.scan(__name__)
@view_confi... | 23.117647 | 70 | 0.683206 | 0 | 0 | 0 | 0 | 475 | 0.604326 | 0 | 0 | 145 | 0.184478 |