hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
⌀
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
⌀
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
⌀
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
⌀
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
⌀
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
⌀
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
⌀
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
⌀
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
⌀
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f770e14f4602aa5e966f7224337c23fc840db720
3,638
py
Python
tests/integration/test_batman.py
RealGeeks/batman
ac61d193cbc6cc736f61ae8cf5e933a576b50698
[ "MIT" ]
1
2018-01-09T20:50:49.000Z
2018-01-09T20:50:49.000Z
tests/integration/test_batman.py
RealGeeks/batman
ac61d193cbc6cc736f61ae8cf5e933a576b50698
[ "MIT" ]
1
2021-03-25T21:27:26.000Z
2021-03-25T21:27:26.000Z
tests/integration/test_batman.py
RealGeeks/batman
ac61d193cbc6cc736f61ae8cf5e933a576b50698
[ "MIT" ]
1
2019-12-26T12:25:23.000Z
2019-12-26T12:25:23.000Z
import os from batman.run import run from tests.integration.utils import batman_dir, touch_file # Virtualenv support def test_that_virtualenv_is_created(): with batman_dir({"virtualenv": "__batman__testenv"}) as tmp_batman_dir: os.system('batman {0}'.format(tmp_batman_dir)) output = '__batman__te...
37.122449
120
0.681693
import os from batman.run import run from tests.integration.utils import batman_dir, touch_file def test_that_virtualenv_is_created(): with batman_dir({"virtualenv": "__batman__testenv"}) as tmp_batman_dir: os.system('batman {0}'.format(tmp_batman_dir)) output = '__batman__testenv' in run('lsvirt...
true
true
f770e29f2ed4c6119be08e560357aafdd228e35d
1,340
py
Python
satudata/urls.py
debitomika/satudata
61cfcf7de616cdcd55ac7b575b8171022476a3f1
[ "Apache-2.0" ]
null
null
null
satudata/urls.py
debitomika/satudata
61cfcf7de616cdcd55ac7b575b8171022476a3f1
[ "Apache-2.0" ]
null
null
null
satudata/urls.py
debitomika/satudata
61cfcf7de616cdcd55ac7b575b8171022476a3f1
[ "Apache-2.0" ]
null
null
null
"""satudata URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.0/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-base...
41.875
103
0.731343
from django.contrib import admin from django.contrib.auth import views as auth_views from django.urls import path, include from django.conf import settings from django.conf.urls.static import static urlpatterns = [ path('admin/', admin.site.urls), path('login/', auth_views.LoginView.as_view(template_name='...
true
true
f770e3566a10c8dd199b57a71f78851802d3d928
1,948
py
Python
src/bots/meme.py
orangeblock/slack-bot
1747ed8293c5931193c996f59762dcd69a8f5f40
[ "MIT" ]
null
null
null
src/bots/meme.py
orangeblock/slack-bot
1747ed8293c5931193c996f59762dcd69a8f5f40
[ "MIT" ]
null
null
null
src/bots/meme.py
orangeblock/slack-bot
1747ed8293c5931193c996f59762dcd69a8f5f40
[ "MIT" ]
null
null
null
import re import time import random import logging import requests from base import BaseBot logger = logging.getLogger(__name__) MEME_URL = 'http://www.memes.com' MEME_REGEX = re.compile(r'^!meme') SCRAPE_REGEX = re.compile(r'<img id="image_\d+" src="([^"]+)"') def random_meme(): try: html = requests.ge...
33.016949
108
0.598049
import re import time import random import logging import requests from base import BaseBot logger = logging.getLogger(__name__) MEME_URL = 'http://www.memes.com' MEME_REGEX = re.compile(r'^!meme') SCRAPE_REGEX = re.compile(r'<img id="image_\d+" src="([^"]+)"') def random_meme(): try: html = requests.ge...
true
true
f770e4d5af5c11310e8ab3fac0d4caa7590db27a
486
py
Python
Chapter2_Python/NumpyIntro.py
dependencyInversion/UdemyML
9e1a0a01688a82c61ef006a592a58c12fb186552
[ "MIT" ]
null
null
null
Chapter2_Python/NumpyIntro.py
dependencyInversion/UdemyML
9e1a0a01688a82c61ef006a592a58c12fb186552
[ "MIT" ]
null
null
null
Chapter2_Python/NumpyIntro.py
dependencyInversion/UdemyML
9e1a0a01688a82c61ef006a592a58c12fb186552
[ "MIT" ]
null
null
null
import numpy as np list1 = np.array([-2, 1, 2, -10, 22, -10]) list2 = np.array([-20, 123, 112, -10, 22, -120]) print( f"values: {list1}", f"min: {np.min(list1)}", f"max: {np.max(list1)}", f"mean: {np.mean(list1)}", f"median: {np.median(list2)}", sep="\n", end="\n\n" ) print( f"values:...
19.44
48
0.5
import numpy as np list1 = np.array([-2, 1, 2, -10, 22, -10]) list2 = np.array([-20, 123, 112, -10, 22, -120]) print( f"values: {list1}", f"min: {np.min(list1)}", f"max: {np.max(list1)}", f"mean: {np.mean(list1)}", f"median: {np.median(list2)}", sep="\n", end="\n\n" ) print( f"values:...
true
true
f770e51065634d4cdbce04efa115dbfb869fe3b2
19,173
py
Python
test/vanilla/low-level/AcceptanceTests/asynctests/test_dictionary.py
cfculhane/autorest.python
8cbca95faee88d933a58bbbd17b76834faa8d387
[ "MIT" ]
35
2018-04-03T12:15:53.000Z
2022-03-11T14:03:34.000Z
test/vanilla/low-level/AcceptanceTests/asynctests/test_dictionary.py
cfculhane/autorest.python
8cbca95faee88d933a58bbbd17b76834faa8d387
[ "MIT" ]
652
2017-08-28T22:44:41.000Z
2022-03-31T21:20:31.000Z
test/vanilla/low-level/AcceptanceTests/asynctests/test_dictionary.py
cfculhane/autorest.python
8cbca95faee88d933a58bbbd17b76834faa8d387
[ "MIT" ]
29
2017-08-28T20:57:01.000Z
2022-03-11T14:03:38.000Z
# -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. # # The MIT License (MIT) # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the ""Software""),...
45.75895
159
0.753247
import isodate from datetime import timedelta from bodydictionarylowlevel.rest import dictionary from bodydictionarylowlevel.aio import AutoRestSwaggerBATDictionaryService from azure.core.exceptions import DecodeError from async_generator import yield_, async_generator import pytest @pytest.fixture @async_generator...
false
true
f770e590ce1b0f2b9bfe2ed1bcfadb90a204466f
2,885
py
Python
datalad/support/tests/test_repo_save.py
arokem/datalad
3fd9f6680d845c716db73ebbb122b9f06343c4fb
[ "MIT" ]
null
null
null
datalad/support/tests/test_repo_save.py
arokem/datalad
3fd9f6680d845c716db73ebbb122b9f06343c4fb
[ "MIT" ]
null
null
null
datalad/support/tests/test_repo_save.py
arokem/datalad
3fd9f6680d845c716db73ebbb122b9f06343c4fb
[ "MIT" ]
null
null
null
# ex: set sts=4 ts=4 sw=4 noet: # ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## # # See COPYING file distributed along with the datalad package for the # copyright and license terms. # # ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## """Test saveds func...
28.284314
79
0.616638
from datalad.tests.utils import ( assert_in, assert_not_in, create_tree, with_tempfile, eq_, known_failure_githubci_win, known_failure_windows, ) from datalad.distribution.dataset import Dataset from datalad.support.gitrepo import GitRepo from datalad.support.annexrepo import AnnexRepo fr...
true
true
f770e66f33f589d1dd33fcd7190f8997b6f02490
163
py
Python
untitled7/dysms_python/const.py
pop993012/111122
cee79d5e6eb5b1c9714e3f712503cce9fccfb8c2
[ "Apache-2.0" ]
null
null
null
untitled7/dysms_python/const.py
pop993012/111122
cee79d5e6eb5b1c9714e3f712503cce9fccfb8c2
[ "Apache-2.0" ]
2
2020-12-10T22:22:12.000Z
2020-12-10T22:32:13.000Z
untitled7/dysms_python/const.py
pop993012/111122
cee79d5e6eb5b1c9714e3f712503cce9fccfb8c2
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # ACCESS_KEY_ID/ACCESS_KEY_SECRET 根据实际申请的账号信息进行替换 ACCESS_KEY_ID = "LTAIzr81fXY9ZnnL" ACCESS_KEY_SECRET = "0RtnH7nGDPtqBB23pwAbmGJBtXCIpQ"
27.166667
52
0.803681
ACCESS_KEY_ID = "LTAIzr81fXY9ZnnL" ACCESS_KEY_SECRET = "0RtnH7nGDPtqBB23pwAbmGJBtXCIpQ"
true
true
f770e87d814341475d32f3528d69fba61ccb363b
12,100
py
Python
constance/admin.py
crazyzubr/django-constance
2bba4848cd84ae293b3d3dcb04b9df9124420107
[ "BSD-3-Clause" ]
null
null
null
constance/admin.py
crazyzubr/django-constance
2bba4848cd84ae293b3d3dcb04b9df9124420107
[ "BSD-3-Clause" ]
null
null
null
constance/admin.py
crazyzubr/django-constance
2bba4848cd84ae293b3d3dcb04b9df9124420107
[ "BSD-3-Clause" ]
null
null
null
from collections import OrderedDict from datetime import datetime, date, time, timedelta from decimal import Decimal from operator import itemgetter import hashlib from django import forms, VERSION, conf from django.apps import apps from django.conf.urls import url from django.contrib import admin, messages from djang...
36.011905
105
0.579174
from collections import OrderedDict from datetime import datetime, date, time, timedelta from decimal import Decimal from operator import itemgetter import hashlib from django import forms, VERSION, conf from django.apps import apps from django.conf.urls import url from django.contrib import admin, messages from djang...
true
true
f770e971b385048f4945d31af216e360d02be8ff
1,074
py
Python
scripts/build_cleanup.py
objectrocket/python-client
ae739b4946b84cbe7e7f06ead91c6319b8e6b324
[ "MIT" ]
5
2015-07-15T19:20:33.000Z
2018-02-13T21:36:49.000Z
scripts/build_cleanup.py
objectrocket/python-client
ae739b4946b84cbe7e7f06ead91c6319b8e6b324
[ "MIT" ]
28
2015-07-15T17:54:22.000Z
2020-12-23T13:14:25.000Z
scripts/build_cleanup.py
objectrocket/python-client
ae739b4946b84cbe7e7f06ead91c6319b8e6b324
[ "MIT" ]
5
2016-04-14T19:01:20.000Z
2019-06-24T19:50:26.000Z
#!/usr/bin/env python # -*- coding: utf8 -*- """Cleanup build artifacts.""" import argparse import logging import os import shutil import sys from glob import iglob logger = logging.getLogger() def parse_args(): parser = argparse.ArgumentParser() parser.add_argument('toplevel') parser.add_argument('--all...
20.653846
79
0.648976
import argparse import logging import os import shutil import sys from glob import iglob logger = logging.getLogger() def parse_args(): parser = argparse.ArgumentParser() parser.add_argument('toplevel') parser.add_argument('--all', action='store_true') return parser.parse_args() def rmtree(tree): ...
true
true
f770eadd92749c207582ad11fbacdfbdff059ad2
1,065
py
Python
tests/test_day_002.py
Hsins/Daily-Coding-Problem
99170391fabfbeac359aa91997a2071ab72931b0
[ "MIT" ]
null
null
null
tests/test_day_002.py
Hsins/Daily-Coding-Problem
99170391fabfbeac359aa91997a2071ab72931b0
[ "MIT" ]
null
null
null
tests/test_day_002.py
Hsins/Daily-Coding-Problem
99170391fabfbeac359aa91997a2071ab72931b0
[ "MIT" ]
null
null
null
class TestDay002(object): testcases = [ ([3, 2, 1], [2, 3, 6]), ([1, 2, 3, 4, 5], [120, 60, 40, 30, 24]), ([5, 4, 3, 2, 1], [24, 30, 40, 60, 120]) ] def test_product_expect_self01(self): from solutions.day_002.solution01 import product_expect_self for (inputs, expect...
39.444444
68
0.661033
class TestDay002(object): testcases = [ ([3, 2, 1], [2, 3, 6]), ([1, 2, 3, 4, 5], [120, 60, 40, 30, 24]), ([5, 4, 3, 2, 1], [24, 30, 40, 60, 120]) ] def test_product_expect_self01(self): from solutions.day_002.solution01 import product_expect_self for (inputs, expect...
true
true
f770eb22c909524e662b2b220fecbd93c00eb3b0
1,568
py
Python
src/data/40.py
NULLCT/LOMC
79a16474a8f21310e0fb47e536d527dd5dc6d655
[ "MIT" ]
null
null
null
src/data/40.py
NULLCT/LOMC
79a16474a8f21310e0fb47e536d527dd5dc6d655
[ "MIT" ]
null
null
null
src/data/40.py
NULLCT/LOMC
79a16474a8f21310e0fb47e536d527dd5dc6d655
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import sys sys.setrecursionlimit(10**6) def input(): return sys.stdin.readline().strip() import math import collections from collections import deque, Counter, defaultdict from bisect import bisect_left, bisect from copy import deepcopy import itertools from heapq import heappush, heapp...
23.402985
75
0.552934
import sys sys.setrecursionlimit(10**6) def input(): return sys.stdin.readline().strip() import math import collections from collections import deque, Counter, defaultdict from bisect import bisect_left, bisect from copy import deepcopy import itertools from heapq import heappush, heappop, heapify import stati...
true
true
f770ebccc6a845c90d6757958281c4bd445f573a
11,263
py
Python
transaction.py
crystodev/csk-005
deaf47a8480b95292775c075b4ebc277502935ca
[ "Apache-2.0" ]
null
null
null
transaction.py
crystodev/csk-005
deaf47a8480b95292775c075b4ebc277502935ca
[ "Apache-2.0" ]
null
null
null
transaction.py
crystodev/csk-005
deaf47a8480b95292775c075b4ebc277502935ca
[ "Apache-2.0" ]
null
null
null
""" This module provides some Cardano blockchain transaction tools """ from os import path from json import loads as json_loads from subprocess import run as subprocess_run from tokutils import get_address, get_address_file, get_vkey_file, get_protocol_keydeposit def split_list(tx): """ split list in two with '+' ...
38.704467
164
0.690491
from os import path from json import loads as json_loads from subprocess import run as subprocess_run from tokutils import get_address, get_address_file, get_vkey_file, get_protocol_keydeposit def split_list(tx): idx_list = [idx for idx, val in enumerate(tx) if val == '+'] idx_list1 = [idx+1 for idx, val in enumer...
true
true
f770ebf14841729c2b2262ea81d7ee5c9d993a9b
409
py
Python
plugins/terminal/widget.py
ajenti/ajen
177c1a67278a7763ed06eb2f773d7b409a85ec77
[ "MIT" ]
3,777
2015-02-21T00:10:12.000Z
2022-03-30T15:33:22.000Z
plugins/terminal/widget.py
ajenti/ajen
177c1a67278a7763ed06eb2f773d7b409a85ec77
[ "MIT" ]
749
2015-03-12T14:17:03.000Z
2022-03-25T13:22:28.000Z
plugins/terminal/widget.py
ajenti/ajen
177c1a67278a7763ed06eb2f773d7b409a85ec77
[ "MIT" ]
687
2015-03-21T10:42:33.000Z
2022-03-21T23:18:12.000Z
from jadi import component from aj.plugins.dashboard.api import Widget @component(Widget) class ScriptWidget(Widget): id = 'script' name = _('Script') template = '/terminal:resources/partial/widget.html' config_template = '/terminal:resources/partial/widget.config.html' def __init__(self, context...
24.058824
70
0.701711
from jadi import component from aj.plugins.dashboard.api import Widget @component(Widget) class ScriptWidget(Widget): id = 'script' name = _('Script') template = '/terminal:resources/partial/widget.html' config_template = '/terminal:resources/partial/widget.config.html' def __init__(self, context...
true
true
f770ebf1a99eed5d5c0ab984232b5b38e595f94c
23,784
py
Python
lib/base_wizard.py
CoinCreation/electrum
a120252a9467850a648e935a17324cc488f706a4
[ "MIT" ]
null
null
null
lib/base_wizard.py
CoinCreation/electrum
a120252a9467850a648e935a17324cc488f706a4
[ "MIT" ]
null
null
null
lib/base_wizard.py
CoinCreation/electrum
a120252a9467850a648e935a17324cc488f706a4
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # Electrum - lightweight Bitcoin client # Copyright (C) 2016 Thomas Voegtlin # # 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 witho...
43.640367
174
0.594013
import os import sys import traceback from . import bitcoin from . import keystore from .keystore import bip44_derivation from .wallet import Imported_Wallet, Standard_Wallet, Multisig_Wallet, wallet_types from .storage import STO_EV_USER_PW, STO_EV_XPUB_PW, get_derivation_used_for_hw_device_encryption from .i18n imp...
true
true
f770ec206454e12560899789b374582316f282f6
5,555
py
Python
DQN_SAA/DQN_SAA.py
RobZelluf/RL_pong
55c8feeb9c43c1c11d6fd8924660e8038138cf7e
[ "MIT" ]
1
2020-02-22T20:00:11.000Z
2020-02-22T20:00:11.000Z
DQN_SAA/DQN_SAA.py
RobZelluf/RL_pong
55c8feeb9c43c1c11d6fd8924660e8038138cf7e
[ "MIT" ]
null
null
null
DQN_SAA/DQN_SAA.py
RobZelluf/RL_pong
55c8feeb9c43c1c11d6fd8924660e8038138cf7e
[ "MIT" ]
null
null
null
from wimblepong import Wimblepong import random import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F import numpy as np from utils import Transition, ReplayMemory class Q_CNN(nn.Module): def __init__(self, state_space, action_space, size, fc1_size=64): super(Q_CNN...
38.310345
101
0.627183
from wimblepong import Wimblepong import random import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F import numpy as np from utils import Transition, ReplayMemory class Q_CNN(nn.Module): def __init__(self, state_space, action_space, size, fc1_size=64): super(Q_CNN...
true
true
f770ec9899d154ff8dfe31cd9c3fb294a0fb6ca9
10,263
py
Python
pre_process/conll.py
a101269/Chinese_Semantic_Dependency_Parser_with_knowledge
ca9998045c7789bc3ea5ad6a8ce7fe0af8308669
[ "MIT" ]
1
2020-11-06T01:39:44.000Z
2020-11-06T01:39:44.000Z
pre_process/conll.py
a101269/Chinese_Semantic_Dependency_Parser_with_knowledge
ca9998045c7789bc3ea5ad6a8ce7fe0af8308669
[ "MIT" ]
null
null
null
pre_process/conll.py
a101269/Chinese_Semantic_Dependency_Parser_with_knowledge
ca9998045c7789bc3ea5ad6a8ce7fe0af8308669
[ "MIT" ]
null
null
null
# Author: a101269 # Date : 2020/3/5 """ A wrapper/loader for the official conll-u format files. """ import os import io FIELD_NUM = 10 FIELD_TO_IDX = {'id': 0, 'word': 1, 'lemma': 2, 'upos': 3, 'xpos': 4, 'feats': 5, 'head': 6, 'deprel': 7, 'deps': 8, 'misc': 9} class CoNLLFile(): def ...
38.152416
185
0.493813
import os import io FIELD_NUM = 10 FIELD_TO_IDX = {'id': 0, 'word': 1, 'lemma': 2, 'upos': 3, 'xpos': 4, 'feats': 5, 'head': 6, 'deprel': 7, 'deps': 8, 'misc': 9} class CoNLLFile(): def __init__(self, filename=None, input_str=None, ignore_gapping=True): self.ignore_gapp...
true
true
f770ed502276e5df5566d17da702a7daf5ca9486
2,013
py
Python
setup.py
raphendyr/django-settingsdict
09e54d8f18abeac7126a29efb82870fe3bf01647
[ "BSD-2-Clause" ]
null
null
null
setup.py
raphendyr/django-settingsdict
09e54d8f18abeac7126a29efb82870fe3bf01647
[ "BSD-2-Clause" ]
null
null
null
setup.py
raphendyr/django-settingsdict
09e54d8f18abeac7126a29efb82870fe3bf01647
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python3 # -*- encoding: utf-8 -*- """A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html https://github.com/pypa/sampleproject """ from setuptools import setup, find_packages # To use a consistent encoding from codecs import open from os import path here = pa...
30.969231
104
0.640338
from setuptools import setup, find_packages from codecs import open from os import path here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'README.rst'), encoding='utf-8') as f: long_description = f.read() VERSION = '1.1.1' setup( name='django-settingsdict', version=VERSION, desc...
true
true
f770ef48a4080dd2d7dc44ffe34130d683ef8878
3,224
py
Python
h/migrations/versions/9f5e274b202c_update_all_document_web_uris.py
julien-cheng/h
36c8ec044725720cf36f0986cdf025395aca8929
[ "BSD-2-Clause" ]
2
2019-08-04T07:22:11.000Z
2020-07-17T05:01:41.000Z
h/migrations/versions/9f5e274b202c_update_all_document_web_uris.py
11-eleven-11/h
91c7a4504ad7471ed3e30246763a03e6c1cc531b
[ "BSD-2-Clause" ]
4
2020-03-24T17:38:24.000Z
2022-03-02T05:45:01.000Z
h/migrations/versions/9f5e274b202c_update_all_document_web_uris.py
11-eleven-11/h
91c7a4504ad7471ed3e30246763a03e6c1cc531b
[ "BSD-2-Clause" ]
null
null
null
""" Update all Document.web_uris. Revision ID: 9f5e274b202c Revises: e10ce4472966 Create Date: 2017-01-20 16:07:03.442975 """ from __future__ import unicode_literals from collections import namedtuple import logging from alembic import op import sqlalchemy as sa from sqlalchemy.ext.declarative import declarative_ba...
26.42623
88
0.64361
from __future__ import unicode_literals from collections import namedtuple import logging from alembic import op import sqlalchemy as sa from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker from sqlalchemy.orm import subqueryload from h._compat import urlparse revision =...
true
true
f770efb08b5fdb3a975527563fbc069a82478bb3
2,295
py
Python
software/metax/misc/KeyedDataSource.py
adellanno/MetaXcan
cfc9e369bbf5630e0c9488993cd877f231c5d02e
[ "MIT" ]
83
2016-07-19T20:14:52.000Z
2022-03-28T17:02:39.000Z
software/metax/misc/KeyedDataSource.py
adellanno/MetaXcan
cfc9e369bbf5630e0c9488993cd877f231c5d02e
[ "MIT" ]
75
2016-02-25T16:43:17.000Z
2022-03-30T14:19:03.000Z
software/metax/misc/KeyedDataSource.py
adellanno/MetaXcan
cfc9e369bbf5630e0c9488993cd877f231c5d02e
[ "MIT" ]
71
2016-02-11T17:10:32.000Z
2022-03-30T20:15:19.000Z
import gzip import io import pandas from .. import Utilities def try_parse(string, fail=None): try: return float(string) except Exception: return fail; def skip_na(key, value): skip = (not value or value == "NA") return skip def skip_non_rsid_value(key, value): return not "rs" in...
27.987805
155
0.602179
import gzip import io import pandas from .. import Utilities def try_parse(string, fail=None): try: return float(string) except Exception: return fail; def skip_na(key, value): skip = (not value or value == "NA") return skip def skip_non_rsid_value(key, value): return not "rs" in...
true
true
f770f0474a416d9d1bc149ffe0f9161d571db08a
623
py
Python
.gitbook/assets/backpedal.py
Bryan-Guner-Backup/Web-Dev-Hub-Docs-backup
6c2daacb996a0424487af1ad2ebaa69f2200ea4b
[ "Apache-2.0" ]
42
2021-04-29T13:54:43.000Z
2022-02-04T22:55:02.000Z
algorithms/backpedal.py
travisjungroth/algo-drills
a365dc0c23361e4cc6e0bac27c8c84e2aae4fb47
[ "MIT" ]
14
2021-09-04T13:28:28.000Z
2021-09-22T04:06:35.000Z
.gitbook/assets/backpedal.py
Bryan-Guner-Backup/Web-Dev-Hub-Docs-backup
6c2daacb996a0424487af1ad2ebaa69f2200ea4b
[ "Apache-2.0" ]
5
2021-04-29T15:57:25.000Z
2021-09-08T10:53:06.000Z
""" ID: ebd60a5b-403f-4eac-a651-8a9a52c2b11c Useful with Dijkstra's when you want the path. This version assumes all the keys you need are there, but you could use .get() instead. """ from collections.abc import Mapping from typing import Optional from src.typehints import Node def backpedal(goal: Node, parents: Ma...
29.666667
108
0.704655
from collections.abc import Mapping from typing import Optional from src.typehints import Node def backpedal(goal: Node, parents: Mapping[Node, Optional[Node]]) -> list[Node]: back_path = [] node = goal while node is not None: back_path.append(node) node = parents[node] return back_pa...
true
true
f770f1609113b0eb6c34374e4a190f0438646cc1
2,627
py
Python
datasets/mta_dataset_cam_iterator.py
XiaoSanGit/wda_tracker
b68ec0edb9daa6cc495815ba9ca549b36eec0369
[ "MIT" ]
24
2020-06-23T11:17:42.000Z
2022-03-29T00:38:09.000Z
datasets/mta_dataset_cam_iterator.py
XiaoSanGit/wda_tracker
b68ec0edb9daa6cc495815ba9ca549b36eec0369
[ "MIT" ]
13
2020-07-07T03:59:02.000Z
2022-03-30T04:28:06.000Z
datasets/mta_dataset_cam_iterator.py
XiaoSanGit/wda_tracker
b68ec0edb9daa6cc495815ba9ca549b36eec0369
[ "MIT" ]
9
2021-02-14T07:11:05.000Z
2021-12-23T12:47:08.000Z
import mmcv import os.path as osp from utilities.helper import natural_keys import os import cv2 class Mta_dataset_image: def __init__(self,img,frame_no_cam,cam_id): self._img = img self._frame_no_cam = frame_no_cam self._cam_id = cam_id self._img_dims = (self._img.shape[:2][1],s...
26.009901
124
0.685573
import mmcv import os.path as osp from utilities.helper import natural_keys import os import cv2 class Mta_dataset_image: def __init__(self,img,frame_no_cam,cam_id): self._img = img self._frame_no_cam = frame_no_cam self._cam_id = cam_id self._img_dims = (self._img.shape[:2][1],s...
true
true
f770f20b508bbedf396cbb1518ac8d3b42b7f08a
1,796
py
Python
protos/data_pb2.py
chalant/pluto
e7bfd35a2c1fc0e0753bd2f840b0a4385b5124fc
[ "Apache-2.0" ]
null
null
null
protos/data_pb2.py
chalant/pluto
e7bfd35a2c1fc0e0753bd2f840b0a4385b5124fc
[ "Apache-2.0" ]
null
null
null
protos/data_pb2.py
chalant/pluto
e7bfd35a2c1fc0e0753bd2f840b0a4385b5124fc
[ "Apache-2.0" ]
null
null
null
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: protos/data.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _r...
25.657143
121
0.743318
import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database _sym_db = _s...
true
true
f770f263fb63343552800ca92b0c9c3d6fc14812
3,626
py
Python
research/cv/meta-baseline/preprocess.py
mindspore-ai/models
9127b128e2961fd698977e918861dadfad00a44c
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/cv/meta-baseline/preprocess.py
mindspore-ai/models
9127b128e2961fd698977e918861dadfad00a44c
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/cv/meta-baseline/preprocess.py
mindspore-ai/models
9127b128e2961fd698977e918861dadfad00a44c
[ "Apache-2.0" ]
24
2021-10-15T08:32:45.000Z
2022-03-24T18:45:20.000Z
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
38.989247
105
0.639548
import os import argparse import numpy as np from mindspore import ops, context import mindspore.dataset as ds import src.util as util from src.data.IterSamplers import CategoriesSampler from src.data.mini_Imagenet import MiniImageNet def gen_bin(args): n_way = 5 n_query = 15 n_shots = [args.num_shots] ...
true
true
f770f2efa7b36fa43e3b6a095197dd8af4abf245
18,287
py
Python
django/db/transaction.py
mdj2/django
e71b63e280559122371d125d75a593dc2435c394
[ "BSD-3-Clause" ]
1
2017-02-08T15:13:43.000Z
2017-02-08T15:13:43.000Z
django/db/transaction.py
mdj2/django
e71b63e280559122371d125d75a593dc2435c394
[ "BSD-3-Clause" ]
1
2021-02-23T13:03:28.000Z
2021-02-23T13:03:28.000Z
django/db/transaction.py
isabella232/django
9ff5f100ddf6c77d12327a5d19c984e1d4a46b56
[ "BSD-3-Clause" ]
1
2020-11-07T10:41:48.000Z
2020-11-07T10:41:48.000Z
""" This module implements a transaction manager that can be used to define transaction handling in a request or view function. It is used by transaction control middleware and decorators. The transaction manager can be in managed or in auto state. Auto state means the system is using a commit-on-save strategy (actual...
37.093306
80
0.65511
import warnings from functools import wraps from django.db import connections, DatabaseError, DEFAULT_DB_ALIAS from django.utils.decorators import available_attrs class TransactionManagementError(Exception): pass def get_connection(using=None): if using is None: using = DEFAULT_DB_ALIAS retur...
true
true
f770f3295c567eb6342a7f4288681abb2d16f6c1
721
py
Python
fluiddyn/output/util.py
fluiddyn/fluiddyn
04d125cb4590da7d5db80dac1d20577ce012a005
[ "CECILL-B" ]
20
2018-05-07T13:40:13.000Z
2022-03-30T10:40:42.000Z
fluiddyn/output/util.py
fluiddyn/fluiddyn
04d125cb4590da7d5db80dac1d20577ce012a005
[ "CECILL-B" ]
null
null
null
fluiddyn/output/util.py
fluiddyn/fluiddyn
04d125cb4590da7d5db80dac1d20577ce012a005
[ "CECILL-B" ]
1
2018-11-14T20:41:14.000Z
2018-11-14T20:41:14.000Z
def gradient_colors(nb_colors, color_start=None, color_end=None): """Produce a color gradient.""" if color_start is None: color_start = [1, 0, 0] if color_end is None: color_end = [0, 0, 1] # start at black, finish at white gradient = [color_start] # If only one color, return bla...
30.041667
80
0.550624
def gradient_colors(nb_colors, color_start=None, color_end=None): if color_start is None: color_start = [1, 0, 0] if color_end is None: color_end = [0, 0, 1] gradient = [color_start] if nb_colors == 1: return gradient for t in range(1, nb_colors): gra...
true
true
f770f4c28795368711a46922335b1bcadd83ee3d
2,939
py
Python
davis_data/preprocess.py
simonfqy/DTI_prediction
e01c592cc06c4de04b3ed6db35da5af5ff7f863f
[ "MIT" ]
31
2018-08-15T13:35:24.000Z
2022-02-18T08:11:12.000Z
davis_data/preprocess.py
simonfqy/DTI_prediction
e01c592cc06c4de04b3ed6db35da5af5ff7f863f
[ "MIT" ]
14
2018-07-13T03:56:19.000Z
2020-05-22T23:25:34.000Z
davis_data/preprocess.py
simonfqy/DTI_prediction
e01c592cc06c4de04b3ed6db35da5af5ff7f863f
[ "MIT" ]
13
2018-07-13T03:56:26.000Z
2021-02-24T10:58:37.000Z
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import numpy as np import pandas as pd import argparse import os import sys import pdb import csv def generate_data(input_csv, binarize=False, head_only=False, head_row...
37.202532
93
0.577748
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import numpy as np import pandas as pd import argparse import os import sys import pdb import csv def generate_data(input_csv, binarize=False, head_only=False, head_row...
true
true
f770f4e9d66116c365715db07b135824b56f5909
4,560
py
Python
reactrole/reactrole.py
qaisjp/cogs
e9b3094722980722419905aa8af07c77ebb0ea6c
[ "MIT" ]
2
2020-06-04T11:16:39.000Z
2020-06-27T08:31:57.000Z
reactrole/reactrole.py
qaisjp/cogs
e9b3094722980722419905aa8af07c77ebb0ea6c
[ "MIT" ]
2
2020-06-04T11:07:02.000Z
2020-08-03T16:54:36.000Z
reactrole/reactrole.py
qaisjp/cogs
e9b3094722980722419905aa8af07c77ebb0ea6c
[ "MIT" ]
2
2020-07-08T18:28:08.000Z
2021-02-06T22:18:05.000Z
import discord import unicodedata import time from redbot.core import Config, checks, commands from typing import Optional, Union class ReactRole(commands.Cog): def __init__(self, bot): self.bot = bot self.config = Config.get_conf( self, identifier=95932766180343811, force_registratio...
36.774194
176
0.581798
import discord import unicodedata import time from redbot.core import Config, checks, commands from typing import Optional, Union class ReactRole(commands.Cog): def __init__(self, bot): self.bot = bot self.config = Config.get_conf( self, identifier=95932766180343811, force_registratio...
true
true
f770f51d56ed6fbd86f224a4f54218992f85f64b
5,627
py
Python
src/python/bin/msa2vcf.py
vb-wayne/paragraph
3f6f6f7a2a3ac209c7dbb21487ca4d9eaed5c14c
[ "Apache-2.0" ]
111
2017-11-24T18:22:50.000Z
2022-02-25T07:55:31.000Z
src/python/bin/msa2vcf.py
vb-wayne/paragraph
3f6f6f7a2a3ac209c7dbb21487ca4d9eaed5c14c
[ "Apache-2.0" ]
61
2018-01-01T19:58:06.000Z
2022-03-09T12:01:17.000Z
src/python/bin/msa2vcf.py
vb-wayne/paragraph
3f6f6f7a2a3ac209c7dbb21487ca4d9eaed5c14c
[ "Apache-2.0" ]
30
2018-03-01T04:41:15.000Z
2022-03-11T14:52:03.000Z
#!/usr/bin/env python3 # coding=utf-8 # # Copyright (c) 2016-2019 Illumina, Inc. # All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # You may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LIC...
45.747967
115
0.557846
import os import argparse import subprocess import tempfile import shlex import pysam import findgrm from grm.msa import * VCFHEADER = """##fileformat=VCFv4.2 ##FILTER=<ID=PASS,Description="All filters passed"> ##INFO=<ID=END,Number=1,Type=Integer,Description="End of SV/homref"> ##FORMAT=<ID=GT,Number=1,Type=Stri...
true
true
f770f60d09cace20e95983a3f05240744748287c
2,081
py
Python
paper_admin/patches/django/renderer/widgets.py
dldevinc/paper_admin
ef90605cabdbd2bf966a7b11d5a0a69b72a3dd87
[ "BSD-3-Clause" ]
8
2021-03-01T00:12:01.000Z
2022-01-18T10:54:20.000Z
paper_admin/patches/django/renderer/widgets.py
dldevinc/paper_admin
ef90605cabdbd2bf966a7b11d5a0a69b72a3dd87
[ "BSD-3-Clause" ]
7
2020-02-11T21:54:07.000Z
2022-03-16T15:22:35.000Z
paper_admin/patches/django/renderer/widgets.py
dldevinc/paper_admin
ef90605cabdbd2bf966a7b11d5a0a69b72a3dd87
[ "BSD-3-Clause" ]
null
null
null
from django.contrib.admin.widgets import RelatedFieldWidgetWrapper from django.forms import widgets from paper_admin.monkey_patch import MonkeyPatchMeta # Метакласс MonkeyPatch для класса Widget. WidgetMonkeyPatchMeta = type("WidgetMonkeyPatchMeta", (MonkeyPatchMeta, widgets.MediaDefiningClass, ), {}) class PatchRe...
47.295455
106
0.683806
from django.contrib.admin.widgets import RelatedFieldWidgetWrapper from django.forms import widgets from paper_admin.monkey_patch import MonkeyPatchMeta WidgetMonkeyPatchMeta = type("WidgetMonkeyPatchMeta", (MonkeyPatchMeta, widgets.MediaDefiningClass, ), {}) class PatchRelatedFieldWidgetWrapper(RelatedFieldWidgetW...
true
true
f770f655bc15dc14e148d239202d46ec3bb24aba
3,321
py
Python
settings.py
quang2705/Data_Aggregation
439d62600d97adaa2e585f4fb4fbb726631b0048
[ "MIT" ]
null
null
null
settings.py
quang2705/Data_Aggregation
439d62600d97adaa2e585f4fb4fbb726631b0048
[ "MIT" ]
3
2020-06-06T01:46:18.000Z
2021-06-10T22:48:13.000Z
settings.py
quang2705/Data_Aggregation
439d62600d97adaa2e585f4fb4fbb726631b0048
[ "MIT" ]
null
null
null
""" Django settings for data_aggregate project. Generated by 'django-admin startproject' using Django 3.0.3. For more information on this file, see https://docs.djangoproject.com/en/3.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.0/ref/settings/ """ impor...
25.945313
91
0.699488
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = 'a*b!gmhaqe257+3b-89-nnatbr0*6mup-scwduw1v-4ucix&ax' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes...
true
true
f770f6d3a0e99b8200b1b5a79e09a5258327d1c0
574
py
Python
app/Pipeline.py
rojinva/music-recommendations_Hybrid
67ddd5a76654e5c4ffcb23fb74233023ebae46fb
[ "Apache-2.0" ]
1
2020-11-23T07:02:07.000Z
2020-11-23T07:02:07.000Z
app/Pipeline.py
rojinva/music-recommendations_Hybrid
67ddd5a76654e5c4ffcb23fb74233023ebae46fb
[ "Apache-2.0" ]
null
null
null
app/Pipeline.py
rojinva/music-recommendations_Hybrid
67ddd5a76654e5c4ffcb23fb74233023ebae46fb
[ "Apache-2.0" ]
1
2020-03-12T07:35:36.000Z
2020-03-12T07:35:36.000Z
from datetime import datetime from app.ModelTrainer import ModelTrainer class Pipeline: model_trainer = ModelTrainer() def execute(self): target_predictor = self.model_trainer.train() print("Start predicting values:") print(datetime.now()) target_predictor.calculate_prediction_accuracies() def...
22.076923
58
0.655052
from datetime import datetime from app.ModelTrainer import ModelTrainer class Pipeline: model_trainer = ModelTrainer() def execute(self): target_predictor = self.model_trainer.train() print("Start predicting values:") print(datetime.now()) target_predictor.calculate_prediction_accuracies() def...
true
true
f770f86bb400f97805772a561852610cdecef9e3
3,269
py
Python
virtex/data/datasets/arch_captions.py
GeorgeBatch/arch-pre-training
7ed75868689e9283d61d11360fdbf4e77d4ebd2e
[ "MIT" ]
null
null
null
virtex/data/datasets/arch_captions.py
GeorgeBatch/arch-pre-training
7ed75868689e9283d61d11360fdbf4e77d4ebd2e
[ "MIT" ]
null
null
null
virtex/data/datasets/arch_captions.py
GeorgeBatch/arch-pre-training
7ed75868689e9283d61d11360fdbf4e77d4ebd2e
[ "MIT" ]
null
null
null
from collections import defaultdict import json import os from typing import Dict, List import cv2 from torch.utils.data import Dataset class ArchCaptionsDatasetRaw(Dataset): r""" A PyTorch dataset to read ARCH dataset and provide it completely unprocessed. This dataset is used by various task-specific d...
43.013158
109
0.626797
from collections import defaultdict import json import os from typing import Dict, List import cv2 from torch.utils.data import Dataset class ArchCaptionsDatasetRaw(Dataset): def __init__(self, data_root: str, source: str = 'both', split: str = ''): allowed_source_values = ['pubmed', 'books', 'both'] ...
true
true
f770f8c1929ce280595732e2a9b54141ecd64849
1,942
py
Python
features/steps/settings.py
revvsales/python-docx-1
5b3ff2b828cc30f1567cb1682a8cb399143732d7
[ "MIT" ]
3,031
2015-01-02T11:11:24.000Z
2022-03-30T00:57:17.000Z
features/steps/settings.py
revvsales/python-docx-1
5b3ff2b828cc30f1567cb1682a8cb399143732d7
[ "MIT" ]
934
2015-01-06T20:53:56.000Z
2022-03-28T10:08:03.000Z
features/steps/settings.py
revvsales/python-docx-1
5b3ff2b828cc30f1567cb1682a8cb399143732d7
[ "MIT" ]
901
2015-01-07T18:22:07.000Z
2022-03-31T18:38:51.000Z
# encoding: utf-8 """Step implementations for document settings-related features""" from __future__ import absolute_import, division, print_function, unicode_literals from behave import given, then, when from docx import Document from docx.settings import Settings from helpers import test_docx # given ==========...
34.070175
88
0.724511
from __future__ import absolute_import, division, print_function, unicode_literals from behave import given, then, when from docx import Document from docx.settings import Settings from helpers import test_docx @given('a document having a settings part') def given_a_document_having_a_settings_part(context): ...
true
true
f770fa0f7e1efba8376d5fbbf9d95990562b6c3e
8,624
py
Python
sup_train.py
ily-R/Unsupervised-Optical-Flow
38adc16b968cfaf51220c5763dee4ca0c9e2da78
[ "MIT" ]
14
2020-01-06T00:08:47.000Z
2021-12-18T08:17:12.000Z
sup_train.py
ily-R/Unsupervised-Optical-Flow
38adc16b968cfaf51220c5763dee4ca0c9e2da78
[ "MIT" ]
3
2020-06-30T20:33:01.000Z
2021-11-22T11:10:19.000Z
sup_train.py
ily-R/Unsupervised-Optical-Flow
38adc16b968cfaf51220c5763dee4ca0c9e2da78
[ "MIT" ]
4
2020-02-03T15:11:34.000Z
2021-04-15T19:18:31.000Z
import argparse import time from dataset import * from models import FlowNetS, PWC_Net, LightFlowNet from torch.utils.tensorboard import SummaryWriter import warnings warnings.simplefilter(action='ignore', category=FutureWarning) np.random.seed(seed=1) PRINT_INTERVAL = 50 device = torch.device('cuda') if torch.cuda.is...
39.2
116
0.589518
import argparse import time from dataset import * from models import FlowNetS, PWC_Net, LightFlowNet from torch.utils.tensorboard import SummaryWriter import warnings warnings.simplefilter(action='ignore', category=FutureWarning) np.random.seed(seed=1) PRINT_INTERVAL = 50 device = torch.device('cuda') if torch.cuda.is...
true
true
f770fa90b48d5849accd7760d6dcbff2975642b8
1,371
py
Python
toydata/submit_scripts/run_missing_sim_flu_analysis.py
iosonofabio/FitnessInference
3de97a9301733ac9e47ebc78f4e76f7530ccb538
[ "MIT" ]
11
2015-08-24T05:20:56.000Z
2021-08-13T13:58:31.000Z
toydata/submit_scripts/run_missing_sim_flu_analysis.py
iosonofabio/FitnessInference
3de97a9301733ac9e47ebc78f4e76f7530ccb538
[ "MIT" ]
3
2015-08-24T04:43:25.000Z
2021-07-06T00:33:44.000Z
toydata/submit_scripts/run_missing_sim_flu_analysis.py
iosonofabio/FitnessInference
3de97a9301733ac9e47ebc78f4e76f7530ccb538
[ "MIT" ]
3
2019-08-30T18:52:49.000Z
2021-06-15T06:47:04.000Z
import sys,os, glob import subprocess import numpy as np L=2000 sim_prefix = '/20140820_seqs' dt=100 valdt = 1 jobcount = 0 D=0.5 year_list = range(5000, 24800, dt) dir_list = glob.glob('../data_new/N_10000_L_2*sdt_1*') for dir_name in dir_list: for sample_size in [200]: for dscale in [0.5, 1.0, 2.0, 3.0]...
36.078947
161
0.511306
import sys,os, glob import subprocess import numpy as np L=2000 sim_prefix = '/20140820_seqs' dt=100 valdt = 1 jobcount = 0 D=0.5 year_list = range(5000, 24800, dt) dir_list = glob.glob('../data_new/N_10000_L_2*sdt_1*') for dir_name in dir_list: for sample_size in [200]: for dscale in [0.5, 1.0, 2.0, 3.0]...
false
true
f770fa934cf3fa088daae1830258be144a569003
3,750
py
Python
crawler/crawler/spiders/mangabat.py
dozymoe/manga-download
9c8a8b28e4e3b4536e3afceb10445470c368414d
[ "MIT" ]
null
null
null
crawler/crawler/spiders/mangabat.py
dozymoe/manga-download
9c8a8b28e4e3b4536e3afceb10445470c368414d
[ "MIT" ]
null
null
null
crawler/crawler/spiders/mangabat.py
dozymoe/manga-download
9c8a8b28e4e3b4536e3afceb10445470c368414d
[ "MIT" ]
null
null
null
import logging import re import scrapy from scrapy_selenium import SeleniumRequest from ..items import ComicSerie, ChapterUrl from ..item_loaders import ComicSerieLoader _logger = logging.getLogger(__name__) class MangabatSpider(scrapy.Spider): name = 'mangabat' allowed_domains = [ 'm.mangabat.com', ...
45.180723
132
0.598133
import logging import re import scrapy from scrapy_selenium import SeleniumRequest from ..items import ComicSerie, ChapterUrl from ..item_loaders import ComicSerieLoader _logger = logging.getLogger(__name__) class MangabatSpider(scrapy.Spider): name = 'mangabat' allowed_domains = [ 'm.mangabat.com', ...
true
true
f770fc97a22a8850d7094df9c6beb04597624644
2,570
py
Python
tests/cli_menu_test.py
davvid/skeletor
2673ce418145ec0b594f2993cba7fd889fdaa349
[ "BSD-3-Clause" ]
2
2016-07-28T06:42:36.000Z
2018-10-30T08:19:55.000Z
tests/cli_menu_test.py
davvid/skeletor
2673ce418145ec0b594f2993cba7fd889fdaa349
[ "BSD-3-Clause" ]
null
null
null
tests/cli_menu_test.py
davvid/skeletor
2673ce418145ec0b594f2993cba7fd889fdaa349
[ "BSD-3-Clause" ]
null
null
null
import unittest from skeletor.cli.menu import Menu, confirm class MenuInteraction(object): def __init__(self, inputs): self.inputs = inputs self.idx = -1 self.calls = [] def get(self, prompt): self.idx += 1 return self.inputs[self.idx] def func_a(self): ...
27.340426
76
0.546693
import unittest from skeletor.cli.menu import Menu, confirm class MenuInteraction(object): def __init__(self, inputs): self.inputs = inputs self.idx = -1 self.calls = [] def get(self, prompt): self.idx += 1 return self.inputs[self.idx] def func_a(self): ...
true
true
f770fd8e3046b8783b28d3b41a5cd79746068bbe
223
py
Python
app/source/__init__.py
victorlomi/News-Catchup
214b4e92b0cf90c7e4906c3b2316578918645dac
[ "Unlicense" ]
null
null
null
app/source/__init__.py
victorlomi/News-Catchup
214b4e92b0cf90c7e4906c3b2316578918645dac
[ "Unlicense" ]
null
null
null
app/source/__init__.py
victorlomi/News-Catchup
214b4e92b0cf90c7e4906c3b2316578918645dac
[ "Unlicense" ]
null
null
null
from flask import Blueprint # create blueprint for the components in this module # to connect to app instance. bp = Blueprint('source', __name__) # import modules to include package members. from app.source import routes
24.777778
52
0.784753
from flask import Blueprint bp = Blueprint('source', __name__) from app.source import routes
true
true
f770fe901369e85d3df881cf651313f540544b03
5,283
py
Python
youtube_dl/extractor/abcnews.py
aalvarito68/https-github.com-rg3-youtube-dl
dfc80bdd2e4ef3d30f161a93f99f3050537944ab
[ "Unlicense" ]
3
2017-09-28T22:31:51.000Z
2021-09-15T07:43:07.000Z
youtube_dl/extractor/abcnews.py
aalvarito68/https-github.com-rg3-youtube-dl
dfc80bdd2e4ef3d30f161a93f99f3050537944ab
[ "Unlicense" ]
null
null
null
youtube_dl/extractor/abcnews.py
aalvarito68/https-github.com-rg3-youtube-dl
dfc80bdd2e4ef3d30f161a93f99f3050537944ab
[ "Unlicense" ]
3
2020-12-01T10:58:29.000Z
2021-07-22T15:57:22.000Z
# coding: utf-8 from __future__ import unicode_literals import calendar import re import time from .amp import AMPIE from .common import InfoExtractor from .youtube import YoutubeIE from ..compat import compat_urlparse class AbcNewsVideoIE(AMPIE): IE_NAME = 'abcnews:video' _VALID_URL = r'''(?x) ...
36.184932
127
0.541359
from __future__ import unicode_literals import calendar import re import time from .amp import AMPIE from .common import InfoExtractor from .youtube import YoutubeIE from ..compat import compat_urlparse class AbcNewsVideoIE(AMPIE): IE_NAME = 'abcnews:video' _VALID_URL = r'''(?x) https?:/...
true
true
f770fe94ddb676752de499f3f68016bc95cc2684
3,032
py
Python
ping-pong/tt.py
Lecate1/Ping
a7feb64c5c01dc07dfde6d78a1a2264b28a87bbb
[ "CC0-1.0" ]
null
null
null
ping-pong/tt.py
Lecate1/Ping
a7feb64c5c01dc07dfde6d78a1a2264b28a87bbb
[ "CC0-1.0" ]
null
null
null
ping-pong/tt.py
Lecate1/Ping
a7feb64c5c01dc07dfde6d78a1a2264b28a87bbb
[ "CC0-1.0" ]
null
null
null
from pygame import * class Gamesp(sprite.Sprite): def __init__(self, pl_image, pl_y, pl_x, size_x, size_y, pl_speed): sprite.Sprite.__init__(self) self.image = transform.scale(image.load(pl_image), (size_x, size_y)) self.speed = pl_speed self.rect = self.image.get_rect() ...
29.436893
77
0.516821
from pygame import * class Gamesp(sprite.Sprite): def __init__(self, pl_image, pl_y, pl_x, size_x, size_y, pl_speed): sprite.Sprite.__init__(self) self.image = transform.scale(image.load(pl_image), (size_x, size_y)) self.speed = pl_speed self.rect = self.image.get_rect() ...
true
true
f771000541a558e5e836df3e03e52ea1cc2868af
10,589
py
Python
faster_rcnn/datasets/imdb.py
zjjszj/PS_DM_mydetector_faster_rcnn_pytorch
f1d3ad0711ca6b606f05dfee3ed223edd0ea699f
[ "MIT" ]
null
null
null
faster_rcnn/datasets/imdb.py
zjjszj/PS_DM_mydetector_faster_rcnn_pytorch
f1d3ad0711ca6b606f05dfee3ed223edd0ea699f
[ "MIT" ]
null
null
null
faster_rcnn/datasets/imdb.py
zjjszj/PS_DM_mydetector_faster_rcnn_pytorch
f1d3ad0711ca6b606f05dfee3ed223edd0ea699f
[ "MIT" ]
null
null
null
# -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick # -------------------------------------------------------- import os import os.path as osp import PIL import numpy as np import sc...
38.227437
82
0.532628
import os import os.path as osp import PIL import numpy as np import scipy.sparse from ..utils.cython_bbox import bbox_overlaps from PIL import Image from ..fast_rcnn.config import cfg ROOT_DIR = osp.join(osp.dirname(__file__), '..', '..') MATLAB = 'matlab_r2013b' class imdb(object): def __init__(self, name...
true
true
f77100f3a30f7454c17dc22b7ea25e29ad8b9197
67,693
py
Python
labelImg.py
Scheaven/09_labelImg
978a580e3daaf9c163c5bddfa0b31489c8a4f3f0
[ "MIT" ]
null
null
null
labelImg.py
Scheaven/09_labelImg
978a580e3daaf9c163c5bddfa0b31489c8a4f3f0
[ "MIT" ]
null
null
null
labelImg.py
Scheaven/09_labelImg
978a580e3daaf9c163c5bddfa0b31489c8a4f3f0
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import argparse import codecs import distutils.spawn import os.path import platform import re import sys import subprocess import shutil from functools import partial from collections import defaultdict try: from PyQt5.QtGui import * from PyQt5.QtCore import * ...
40.05503
159
0.60733
import argparse import codecs import distutils.spawn import os.path import platform import re import sys import subprocess import shutil from functools import partial from collections import defaultdict try: from PyQt5.QtGui import * from PyQt5.QtCore import * from PyQt5.QtWidgets import * except ImportEr...
true
true
f77102511cf672488fc369505cc04a94c60ba810
1,581
py
Python
binary_heap.py
sbugrov/biutils
80014032df5ade77674b20d8e7918f0523a0876d
[ "MIT" ]
16
2015-10-05T00:11:32.000Z
2021-12-08T17:18:56.000Z
binary_heap.py
sbugrov/biutils
80014032df5ade77674b20d8e7918f0523a0876d
[ "MIT" ]
null
null
null
binary_heap.py
sbugrov/biutils
80014032df5ade77674b20d8e7918f0523a0876d
[ "MIT" ]
8
2015-10-05T04:57:50.000Z
2022-03-21T17:27:27.000Z
class BinHeap: def __init__(self): self.heapList = [0] self.currentSize = 0 def percUp(self,i): while i // 2 > 0: if self.heapList[i] < self.heapList[i // 2]: tmp = self.heapList[i // 2] self.heapList[i // 2] = self.heapList[i] self.heap...
25.5
56
0.526249
class BinHeap: def __init__(self): self.heapList = [0] self.currentSize = 0 def percUp(self,i): while i // 2 > 0: if self.heapList[i] < self.heapList[i // 2]: tmp = self.heapList[i // 2] self.heapList[i // 2] = self.heapList[i] self.heap...
true
true
f771036d6160de88be7bb1b7229f2df32f86dcaa
9,908
py
Python
pyicloud/services/account.py
zzeleznick/pyicloud
022565c3800ebfd823c4145ed8695d06d2d586d2
[ "MIT" ]
2
2018-11-17T07:46:25.000Z
2019-07-16T07:47:52.000Z
pyicloud/services/account.py
zzeleznick/pyicloud
022565c3800ebfd823c4145ed8695d06d2d586d2
[ "MIT" ]
null
null
null
pyicloud/services/account.py
zzeleznick/pyicloud
022565c3800ebfd823c4145ed8695d06d2d586d2
[ "MIT" ]
null
null
null
"""Account service.""" import sys import six from pyicloud.utils import underscore_to_camelcase class AccountService(object): """The 'Account' iCloud service.""" def __init__(self, service_root, session, params): self.session = session self.params = params self._service_root = servi...
29.141176
88
0.612333
import sys import six from pyicloud.utils import underscore_to_camelcase class AccountService(object): def __init__(self, service_root, session, params): self.session = session self.params = params self._service_root = service_root self._devices = [] self._family = [] ...
true
true
f77103d88bf380ea8fbc328562b1f55a1c1e9122
505
py
Python
setup.py
palon7/simplemona
ae9720b30fd916bbfd59316f731ef7a181adaee7
[ "MIT" ]
3
2017-10-13T17:34:16.000Z
2019-12-21T05:11:19.000Z
setup.py
palon7/simplemona
ae9720b30fd916bbfd59316f731ef7a181adaee7
[ "MIT" ]
null
null
null
setup.py
palon7/simplemona
ae9720b30fd916bbfd59316f731ef7a181adaee7
[ "MIT" ]
null
null
null
#!/usr/bin/env python from setuptools import setup, find_packages setup(name='simplemona', version='0.5.0', description='Monacoin mining with no registration required.', author='Eric Cook/Musee Ullah', author_email='milkteafuzz@gmail.com', url='http://simplemona.com', entry_points=...
26.578947
67
0.60198
from setuptools import setup, find_packages setup(name='simplemona', version='0.5.0', description='Monacoin mining with no registration required.', author='Eric Cook/Musee Ullah', author_email='milkteafuzz@gmail.com', url='http://simplemona.com', entry_points={ 'console_s...
true
true
f771041369b2717a75ebed492de9417fa2ddb787
268
py
Python
jsons/_meta.py
agos-tech/jsons
33db6d4c4d186303ddac2a7c3b1a17dcb141e7a8
[ "MIT" ]
null
null
null
jsons/_meta.py
agos-tech/jsons
33db6d4c4d186303ddac2a7c3b1a17dcb141e7a8
[ "MIT" ]
null
null
null
jsons/_meta.py
agos-tech/jsons
33db6d4c4d186303ddac2a7c3b1a17dcb141e7a8
[ "MIT" ]
null
null
null
__title__ = 'jsons' __version__ = '1.3.0' __author__ = 'Ramon Hagenaars' __author_email__ = 'ramon.hagenaars@gmail.com' __description__ = 'For serializing Python objects to JSON (dicts) and back' __url__ = 'https://github.com/ramonhagenaars/jsons' __license__ = 'MIT'
33.5
75
0.761194
__title__ = 'jsons' __version__ = '1.3.0' __author__ = 'Ramon Hagenaars' __author_email__ = 'ramon.hagenaars@gmail.com' __description__ = 'For serializing Python objects to JSON (dicts) and back' __url__ = 'https://github.com/ramonhagenaars/jsons' __license__ = 'MIT'
true
true
f771044d1ff8645cb7814277d3b1b89045bbe950
1,305
py
Python
Adaboost/test.py
ForrestPi/MachineLearningProjects
f046a1e0669f52da0a447de0fea880173fd0d06c
[ "MIT" ]
null
null
null
Adaboost/test.py
ForrestPi/MachineLearningProjects
f046a1e0669f52da0a447de0fea880173fd0d06c
[ "MIT" ]
null
null
null
Adaboost/test.py
ForrestPi/MachineLearningProjects
f046a1e0669f52da0a447de0fea880173fd0d06c
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Wed Feb 24 15:10:42 2016 @author: liudiwei """ import numpy as np from adaboost import AdaboostClassifier #每行数据以\t隔开,最后一列为类标号 def loadDataSet(datafile): featData = []; labelDate = [] with open(datafile, 'r') as fr_file: for eachline in fr_file: onelin...
29
61
0.649808
""" Created on Wed Feb 24 15:10:42 2016 @author: liudiwei """ import numpy as np from adaboost import AdaboostClassifier def loadDataSet(datafile): featData = []; labelDate = [] with open(datafile, 'r') as fr_file: for eachline in fr_file: oneline = eachline.split('\t') tempArr...
false
true
f771054530a47443e7b19b77a47d0c8e00d736d7
7,858
py
Python
docs/conf.py
samirchar/DeepIMDB
c95d9b0140c1b0371adb5fbfddd3ba08623c2759
[ "MIT" ]
null
null
null
docs/conf.py
samirchar/DeepIMDB
c95d9b0140c1b0371adb5fbfddd3ba08623c2759
[ "MIT" ]
null
null
null
docs/conf.py
samirchar/DeepIMDB
c95d9b0140c1b0371adb5fbfddd3ba08623c2759
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # DeepIMDB documentation build configuration file, created by # sphinx-quickstart. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have ...
32.073469
94
0.708195
import os import sys extensions = [] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = u'DeepIMDB' # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. version = '0.1' # The full version, including alpha/...
true
true
f77106f8d2ad84f5e005d9b5a46a6d398be8fd54
2,346
py
Python
src/my_utils/string_operations.py
xenakal/Simulation_Interactions
4e428bb70445ba7fd2d102facdd18c5def4542b7
[ "MIT" ]
2
2021-03-24T07:26:40.000Z
2022-02-05T23:07:27.000Z
src/my_utils/string_operations.py
xenakal/Simulation_Interactions
4e428bb70445ba7fd2d102facdd18c5def4542b7
[ "MIT" ]
null
null
null
src/my_utils/string_operations.py
xenakal/Simulation_Interactions
4e428bb70445ba7fd2d102facdd18c5def4542b7
[ "MIT" ]
null
null
null
import re def find_first_char(s, char_list): min_index = len(s) for elem in char_list: if s.find(elem) != -1: min_index = min(min_index,s.find(elem)) if min_index == len(s): return "" return s[min_index] def parse_element(s): """ :description ...
26.659091
133
0.528133
import re def find_first_char(s, char_list): min_index = len(s) for elem in char_list: if s.find(elem) != -1: min_index = min(min_index,s.find(elem)) if min_index == len(s): return "" return s[min_index] def parse_element(s): if isinstance(s, str) and len(s) > 0: ...
true
true
f7710796bc3e7c651e4effcae031e1fd95eec129
23,898
py
Python
tools/run_perf.py
sarvex/v8
4f53c5b7f6e1bedf4bf6dc42d86c070edee3122f
[ "BSD-3-Clause-Clear", "BSD-3-Clause" ]
1
2021-01-05T12:17:22.000Z
2021-01-05T12:17:22.000Z
tools/run_perf.py
sarvex/v8
4f53c5b7f6e1bedf4bf6dc42d86c070edee3122f
[ "BSD-3-Clause-Clear", "BSD-3-Clause" ]
null
null
null
tools/run_perf.py
sarvex/v8
4f53c5b7f6e1bedf4bf6dc42d86c070edee3122f
[ "BSD-3-Clause-Clear", "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # Copyright 2014 the V8 project authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Performance runner for d8. Call e.g. with tools/run-perf.py --arch ia32 some_suite.json The suite json format is expected to be...
33.145631
79
0.649427
""" Performance runner for d8. Call e.g. with tools/run-perf.py --arch ia32 some_suite.json The suite json format is expected to be: { "path": <relative path chunks to perf resources and main file>, "name": <optional suite name, file name is default>, "archs": [<architecture name for which this suite is run>, ...
false
true
f77108beeb29ed56b70b5ee0099679acaa9bb4ee
3,272
py
Python
fwsynthesizer/frontends/__init__.py
ComputerNetworks-UFRGS/fws-export
1effa4106109d4e23a3ce306adf0651b056285bd
[ "MIT" ]
25
2017-12-18T14:11:06.000Z
2022-01-09T21:23:16.000Z
fwsynthesizer/frontends/__init__.py
ComputerNetworks-UFRGS/fws-export
1effa4106109d4e23a3ce306adf0651b056285bd
[ "MIT" ]
7
2018-04-17T12:07:01.000Z
2022-02-27T10:40:49.000Z
fwsynthesizer/frontends/__init__.py
ComputerNetworks-UFRGS/fws-export
1effa4106109d4e23a3ce306adf0651b056285bd
[ "MIT" ]
7
2018-02-09T22:52:20.000Z
2022-02-23T02:07:29.000Z
#!/usr/bin/env python2 import os import pkgutil import importlib import fwsynthesizer from fwsynthesizer.utils import * FRONTENDS = [ x[1] for x in pkgutil.iter_modules(__path__) ] class Frontend: "Frontend object" def __init__(self, name, diagram, language_converter, query_configuration=Non...
36.764045
108
0.668399
import os import pkgutil import importlib import fwsynthesizer from fwsynthesizer.utils import * FRONTENDS = [ x[1] for x in pkgutil.iter_modules(__path__) ] class Frontend: "Frontend object" def __init__(self, name, diagram, language_converter, query_configuration=None, interfaces_enabled=T...
false
true
f7710ace6dc0648686988a9bfbc4c2d11f7e3e37
99
py
Python
deeppages/exceptions.py
ricardofalasca/deep-pages
d1b2a48f62c31e20d767df5c6345e07e4d05290d
[ "MIT" ]
null
null
null
deeppages/exceptions.py
ricardofalasca/deep-pages
d1b2a48f62c31e20d767df5c6345e07e4d05290d
[ "MIT" ]
null
null
null
deeppages/exceptions.py
ricardofalasca/deep-pages
d1b2a48f62c31e20d767df5c6345e07e4d05290d
[ "MIT" ]
null
null
null
class InvalidPathException(Exception): pass class PageNotFoundException(Exception): pass
14.142857
39
0.777778
class InvalidPathException(Exception): pass class PageNotFoundException(Exception): pass
true
true
f7710aee0ffd40d7added470b625b75a4135afc7
26,585
py
Python
openmdao/core/tests/test_connections.py
friedenhe/OpenMDAO
db1d7e22a8bf9f66afa82ec3544b7244d5545f6d
[ "Apache-2.0" ]
null
null
null
openmdao/core/tests/test_connections.py
friedenhe/OpenMDAO
db1d7e22a8bf9f66afa82ec3544b7244d5545f6d
[ "Apache-2.0" ]
null
null
null
openmdao/core/tests/test_connections.py
friedenhe/OpenMDAO
db1d7e22a8bf9f66afa82ec3544b7244d5545f6d
[ "Apache-2.0" ]
null
null
null
""" Tests related to connecing inputs to outputs.""" import unittest import numpy as np from io import StringIO import openmdao.api as om from openmdao.utils.assert_utils import assert_near_equal, assert_warning from openmdao.utils.mpi import MPI try: from openmdao.vectors.petsc_vector import PETScVector except...
36.974965
191
0.546549
import unittest import numpy as np from io import StringIO import openmdao.api as om from openmdao.utils.assert_utils import assert_near_equal, assert_warning from openmdao.utils.mpi import MPI try: from openmdao.vectors.petsc_vector import PETScVector except ImportError: PETScVector = None class TestConn...
true
true
f7710c49975a1767acdac8720ba848743ce95a94
3,114
py
Python
cryptography/hazmat/primitives/asymmetric/padding.py
derwolfe/cryptography
a6112133d6797313ea8fe741daf25178b2abe25c
[ "Apache-2.0" ]
null
null
null
cryptography/hazmat/primitives/asymmetric/padding.py
derwolfe/cryptography
a6112133d6797313ea8fe741daf25178b2abe25c
[ "Apache-2.0" ]
null
null
null
cryptography/hazmat/primitives/asymmetric/padding.py
derwolfe/cryptography
a6112133d6797313ea8fe741daf25178b2abe25c
[ "Apache-2.0" ]
null
null
null
# 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, software # distributed under the...
32.778947
79
0.663776
from __future__ import absolute_import, division, print_function import warnings import six from cryptography import utils from cryptography.hazmat.primitives import interfaces @utils.register_interface(interfaces.AsymmetricPadding) class PKCS1v15(object): name = "EMSA-PKCS1-v1_5" @utils.register_interface(...
true
true
f7710ef6698dd01ac34810eaed76adc21312d413
3,362
py
Python
tests/test_client.py
oii/ogreclient
5df3d8256f89bb0d7275ea5f3ffb0548bc26db58
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
tests/test_client.py
oii/ogreclient
5df3d8256f89bb0d7275ea5f3ffb0548bc26db58
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
tests/test_client.py
oii/ogreclient
5df3d8256f89bb0d7275ea5f3ffb0548bc26db58
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
from __future__ import absolute_import from __future__ import unicode_literals import collections import os import shutil import mock from ogreclient.core.scan import scan_for_ebooks from ogreclient.prereqs import get_definitions from ogreclient.providers import LibProvider @mock.patch('ogreclient.utils.connection...
44.236842
404
0.700178
from __future__ import absolute_import from __future__ import unicode_literals import collections import os import shutil import mock from ogreclient.core.scan import scan_for_ebooks from ogreclient.prereqs import get_definitions from ogreclient.providers import LibProvider @mock.patch('ogreclient.utils.connection...
true
true
f7710f03b5f9026db7da928afbb8ac031b1730d4
8,082
py
Python
scrapy/tests/test_commands.py
armujahid/scrapy
14b0cd9399ed57cef226c309b9d6d371e0cc3a57
[ "BSD-3-Clause" ]
null
null
null
scrapy/tests/test_commands.py
armujahid/scrapy
14b0cd9399ed57cef226c309b9d6d371e0cc3a57
[ "BSD-3-Clause" ]
null
null
null
scrapy/tests/test_commands.py
armujahid/scrapy
14b0cd9399ed57cef226c309b9d6d371e0cc3a57
[ "BSD-3-Clause" ]
null
null
null
import os import sys import subprocess import tempfile from time import sleep from os.path import exists, join, abspath from shutil import rmtree from tempfile import mkdtemp from twisted.trial import unittest from scrapy.utils.python import retry_on_eintr from scrapy.utils.test import get_testenv class ProjectTest(...
33.8159
96
0.625588
import os import sys import subprocess import tempfile from time import sleep from os.path import exists, join, abspath from shutil import rmtree from tempfile import mkdtemp from twisted.trial import unittest from scrapy.utils.python import retry_on_eintr from scrapy.utils.test import get_testenv class ProjectTest(...
true
true
f77112f639a4ad9c38e5ea8a4f3f0b23abf53be9
2,056
py
Python
venv/Lib/site-packages/sqlalchemy/dialects/mysql/__init__.py
YunJaePark3908/BaseAPIServer
17ab922917541406a3c2d75b428614ce97152a16
[ "Apache-2.0" ]
2
2021-02-20T22:43:47.000Z
2021-05-06T03:43:20.000Z
venv/Lib/site-packages/sqlalchemy/dialects/mysql/__init__.py
Suspir0n/Care-API
13e9a5116b77a81ed356ab6a8f1d0db1eb8b9a00
[ "MIT" ]
8
2021-03-26T19:13:07.000Z
2021-04-19T18:34:33.000Z
venv/Lib/site-packages/sqlalchemy/dialects/mysql/__init__.py
Suspir0n/Care-API
13e9a5116b77a81ed356ab6a8f1d0db1eb8b9a00
[ "MIT" ]
3
2021-11-30T11:10:26.000Z
2021-12-08T05:59:31.000Z
# mysql/__init__.py # Copyright (C) 2005-2021 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php from . import base # noqa from . import cymysql # noqa from . import gaerdbms #...
20.56
69
0.682393
from . import base from . import cymysql from . import gaerdbms from . import mysqlconnector from . import mysqldb from . import oursql from . import pymysql from . import pyodbc from . import zxjdbc from .base import BIGINT from .base import BINARY from .base import BIT from .base import BLOB from .base impo...
true
true
f7711444e3b4720188b636f5c470f998e182dfb8
7,980
py
Python
cmsplugin_filer_folder/migrations/0004_auto__del_field_filerfolder_view_option.py
skirsdeda/cmsplugin-filer
f0330c24614df3550ec9f6e29096f24e17ed2e77
[ "BSD-3-Clause" ]
null
null
null
cmsplugin_filer_folder/migrations/0004_auto__del_field_filerfolder_view_option.py
skirsdeda/cmsplugin-filer
f0330c24614df3550ec9f6e29096f24e17ed2e77
[ "BSD-3-Clause" ]
null
null
null
cmsplugin_filer_folder/migrations/0004_auto__del_field_filerfolder_view_option.py
skirsdeda/cmsplugin-filer
f0330c24614df3550ec9f6e29096f24e17ed2e77
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models from cmsplugin_filer_utils.migration import rename_tables_new_to_old class Migration(SchemaMigration): cms_plugin_table_mapping = ( # (old_name, new_name), ('cmsplugin_...
71.891892
187
0.580702
import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models from cmsplugin_filer_utils.migration import rename_tables_new_to_old class Migration(SchemaMigration): cms_plugin_table_mapping = ( ('cmsplugin_filerfolder', 'cmsplugin_filer_folder_filerfolde...
true
true
f77115b5cca7489141f2320b1c0ad14ae86d4f97
264
py
Python
checks/tests/license/test-missing-spdx.py
tmichalak/actions
fab6b84075e4aab10b505e257cc1237b5343247d
[ "0BSD" ]
2
2021-04-27T00:34:43.000Z
2021-09-23T21:21:58.000Z
checks/tests/license/test-missing-spdx.py
tmichalak/actions
fab6b84075e4aab10b505e257cc1237b5343247d
[ "0BSD" ]
22
2020-12-03T17:31:54.000Z
2022-01-18T10:24:47.000Z
checks/tests/license/test-missing-spdx.py
SymbiFlow/actions
c6142a4ec7859653352757eb8f7c4630f63f96e3
[ "0BSD" ]
5
2020-12-08T17:17:38.000Z
2021-04-26T11:05:22.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright (C) 2020 The SymbiFlow Authors. # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC print("hello world!")
24
53
0.69697
print("hello world!")
true
true
f77117527d0da0a3b634c090c87a197c9f4f4f36
2,186
py
Python
dbdemo/db.py
notwz/CS1998-Backend
6ddc48e71a7120bd3d6bb040a5e3112686cdf675
[ "MIT" ]
null
null
null
dbdemo/db.py
notwz/CS1998-Backend
6ddc48e71a7120bd3d6bb040a5e3112686cdf675
[ "MIT" ]
null
null
null
dbdemo/db.py
notwz/CS1998-Backend
6ddc48e71a7120bd3d6bb040a5e3112686cdf675
[ "MIT" ]
null
null
null
import os import sqlite3 import json # From: https://goo.gl/YzypOI def singleton(cls): instances = {} def getinstance(): if cls not in instances: instances[cls] = cls() return instances[cls] return getinstance class DatabaseDriver(object): """ Database driver for ...
28.025641
82
0.556725
import os import sqlite3 import json def singleton(cls): instances = {} def getinstance(): if cls not in instances: instances[cls] = cls() return instances[cls] return getinstance class DatabaseDriver(object): def __init__(self): self.conn = sqlite3.connect("...
true
true
f77117a2be88331e107e02c007ca54f60af5cd42
2,881
py
Python
scanners.py
austin395/NetworkTools
3935f3c5283bbeb8a4a19513f9211defbe74e37f
[ "MIT" ]
null
null
null
scanners.py
austin395/NetworkTools
3935f3c5283bbeb8a4a19513f9211defbe74e37f
[ "MIT" ]
null
null
null
scanners.py
austin395/NetworkTools
3935f3c5283bbeb8a4a19513f9211defbe74e37f
[ "MIT" ]
null
null
null
__author__ = 'austin' def module_check_r(module): """ Just for debian-based systems like Kali and Ubuntu """ ri = tk.messagebox.askyesno("error", """%s was not found on your system if your an admin and would like to install it press yes"""...
32.738636
112
0.601527
__author__ = 'austin' def module_check_r(module): ri = tk.messagebox.askyesno("error", """%s was not found on your system if your an admin and would like to install it press yes""" % module) if ri is True: if module == 'nmap': ...
true
true
f771185bf6d8d7ac7f3b338bbfe4ee2677936bd6
6,158
py
Python
pytet_v0.2/pytet.py
zaehuun/pytet
50e76a96e1be0c559c188328f067a12b69d2b948
[ "MIT" ]
null
null
null
pytet_v0.2/pytet.py
zaehuun/pytet
50e76a96e1be0c559c188328f067a12b69d2b948
[ "MIT" ]
null
null
null
pytet_v0.2/pytet.py
zaehuun/pytet
50e76a96e1be0c559c188328f067a12b69d2b948
[ "MIT" ]
null
null
null
from matrix import * import random def draw_matrix(m): array = m.get_array() for y in range(m.get_dy()): for x in range(m.get_dx()): if array[y][x] == 0: print("□", end='') elif array[y][x] == 1: print("■", end='') else: ...
31.258883
109
0.388925
from matrix import * import random def draw_matrix(m): array = m.get_array() for y in range(m.get_dy()): for x in range(m.get_dx()): if array[y][x] == 0: print("□", end='') elif array[y][x] == 1: print("■", end='') else: ...
true
true
f77118ae2e3a2f9875f8e455b1ead52957b578da
2,314
py
Python
Forked_Client/LURKland.py
jmsimons/LURKlandia
da20638f8f72b1452d6b422c81f4082d908ef8fd
[ "Apache-2.0" ]
1
2021-02-15T19:51:55.000Z
2021-02-15T19:51:55.000Z
Forked_Client/LURKland.py
jmsimons/LURKlandia
da20638f8f72b1452d6b422c81f4082d908ef8fd
[ "Apache-2.0" ]
null
null
null
Forked_Client/LURKland.py
jmsimons/LURKlandia
da20638f8f72b1452d6b422c81f4082d908ef8fd
[ "Apache-2.0" ]
null
null
null
# # # Module that initializes server conn, from client_manager import ClientManager import socket, select, logging, os from multiprocessing import Pipe, Process, Queue host = '0.0.0.0' port = 5050 def setup_logging(): FORMAT = '%(asctime)-15s %(clientip)s %(user)-8s %(message)s' logging.basicConfig(filenam...
36.15625
120
0.588159
from client_manager import ClientManager import socket, select, logging, os from multiprocessing import Pipe, Process, Queue host = '0.0.0.0' port = 5050 def setup_logging(): FORMAT = '%(asctime)-15s %(clientip)s %(user)-8s %(message)s' logging.basicConfig(filename = 'LURK.log', level = logging.DEBUG) def ...
true
true
f7711afbb1d577fddc8b037d475d29658a6fd6c9
3,388
py
Python
tests/approximate_als_test.py
kfcislif3/implicit
2a25e768f4a0221a7e313985c4d7af338c5d1d13
[ "MIT" ]
null
null
null
tests/approximate_als_test.py
kfcislif3/implicit
2a25e768f4a0221a7e313985c4d7af338c5d1d13
[ "MIT" ]
null
null
null
tests/approximate_als_test.py
kfcislif3/implicit
2a25e768f4a0221a7e313985c4d7af338c5d1d13
[ "MIT" ]
null
null
null
from __future__ import print_function import unittest from implicit.approximate_als import ( AnnoyAlternatingLeastSquares, FaissAlternatingLeastSquares, NMSLibAlternatingLeastSquares, ) from implicit.gpu import HAS_CUDA from .recommender_base_test import RecommenderBaseTestMixin # don't require annoy/fa...
30.8
98
0.605077
from __future__ import print_function import unittest from implicit.approximate_als import ( AnnoyAlternatingLeastSquares, FaissAlternatingLeastSquares, NMSLibAlternatingLeastSquares, ) from implicit.gpu import HAS_CUDA from .recommender_base_test import RecommenderBaseTestMixin try: import annoy #...
true
true
f7711b2beea9a1e50d582780e324063e4feaa092
1,805
py
Python
annotation/dbscript.py
nlpcl-lab/ted-talks-annotation
b93a5eb2d7bcbd1b06841bb8f315a510f3ed8b2c
[ "MIT" ]
3
2019-11-04T06:51:54.000Z
2019-11-06T08:46:21.000Z
annotation/dbscript.py
nlpcl-lab/ted-talks-annotation
b93a5eb2d7bcbd1b06841bb8f315a510f3ed8b2c
[ "MIT" ]
1
2019-11-21T04:50:59.000Z
2019-11-29T17:22:24.000Z
annotation/dbscript.py
nlpcl-lab/ted-talks-annotation
b93a5eb2d7bcbd1b06841bb8f315a510f3ed8b2c
[ "MIT" ]
null
null
null
import os import json import argparse from tqdm import tqdm import pickle from bson import json_util from mongoengine import connect from annotation.models import Doc, User, Sent, Annotation import config as config def export_data(annotation_type): output_path = os.path.join(os.path.abspath(os.path.dirname(__fil...
31.12069
93
0.612742
import os import json import argparse from tqdm import tqdm import pickle from bson import json_util from mongoengine import connect from annotation.models import Doc, User, Sent, Annotation import config as config def export_data(annotation_type): output_path = os.path.join(os.path.abspath(os.path.dirname(__fil...
true
true
f7711c1af488e8681365f6a99bf2df81ea446704
5,243
py
Python
ChineseNER/tagSchemeConverter.py
cswangjiawei/ChineseNER
183f2a2dd2c552f2c66e6d7be78c3fbc479b9317
[ "MIT" ]
3
2021-03-23T05:23:49.000Z
2021-05-01T15:20:15.000Z
ChineseNER/tagSchemeConverter.py
cswangjiawei/pytorch-ChineseNER
183f2a2dd2c552f2c66e6d7be78c3fbc479b9317
[ "MIT" ]
null
null
null
ChineseNER/tagSchemeConverter.py
cswangjiawei/pytorch-ChineseNER
183f2a2dd2c552f2c66e6d7be78c3fbc479b9317
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # @Author: Jie Yang # @Date: 2017-11-27 16:53:36 # @Last Modified by: Jie Yang, Contact: jieynlp@gmail.com # @Last Modified time: 2019-01-09 21:39:10 """ convert NER/Chunking tag schemes, i.e. BIO->BIOES, BIOES->BIO, IOB->BIO, IOB->BIOES """ from __future__ import print_function i...
36.409722
108
0.497616
from __future__ import print_function import sys def BIO2BIOES(input_file, output_file): print("Convert BIO -> BIOES for file:", input_file) with open(input_file,'r', encoding='utf-8') as in_file: fins = in_file.readlines() fout = open(output_file,'w', encoding='utf-8') words = [] label...
true
true
f7711d24cfd4c9eeaef0ba09651139c013dc357f
318
py
Python
sfmkeyframe/app.py
njzhangyifei/keyframe
91d110e7de43cb6d54c79d60bef302b56e337a6c
[ "MIT" ]
9
2017-11-27T09:03:20.000Z
2022-02-26T01:59:34.000Z
sfmkeyframe/app.py
njzhangyifei/keyframe
91d110e7de43cb6d54c79d60bef302b56e337a6c
[ "MIT" ]
3
2018-06-11T10:03:56.000Z
2022-03-10T19:52:24.000Z
sfmkeyframe/app.py
njzhangyifei/keyframe
91d110e7de43cb6d54c79d60bef302b56e337a6c
[ "MIT" ]
2
2017-09-20T07:36:58.000Z
2021-11-21T16:33:48.000Z
import multiprocessing import sys from PyQt5.QtWidgets import QApplication from sfmkeyframe.view.KeyframeMainWindow import KeyframeMainWindow # for windows compatibility multiprocessing.set_start_method('spawn') app = QApplication(sys.argv) mainWindow = KeyframeMainWindow() mainWindow.show() sys.exit(app.exec_())
22.714286
66
0.833333
import multiprocessing import sys from PyQt5.QtWidgets import QApplication from sfmkeyframe.view.KeyframeMainWindow import KeyframeMainWindow multiprocessing.set_start_method('spawn') app = QApplication(sys.argv) mainWindow = KeyframeMainWindow() mainWindow.show() sys.exit(app.exec_())
true
true
f7711e31ad1ea4b1f971110c745ba0019a95c7c2
11,881
py
Python
mnist/mainMnist.py
vberthiaume/vblandr
dbd139e7b6172b9dbc97707ff4874bc398de7aaa
[ "Apache-2.0" ]
null
null
null
mnist/mainMnist.py
vberthiaume/vblandr
dbd139e7b6172b9dbc97707ff4874bc398de7aaa
[ "Apache-2.0" ]
10
2016-08-29T20:06:05.000Z
2016-10-27T20:40:58.000Z
mnist/mainMnist.py
vberthiaume/vblandr
dbd139e7b6172b9dbc97707ff4874bc398de7aaa
[ "Apache-2.0" ]
null
null
null
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
47.907258
145
0.692113
from __future__ import absolute_import from __future__ import division from __future__ import print_function import time import math from six.moves import urllib from six.moves import xrange import tensorflow as tf from tensorflow.contrib.learn.python.learn.datasets.mnist import read_data_sets import gzip import os...
true
true
f7711f0d4596f1ea7dc1cb8adfe4543ea2ac6279
2,640
py
Python
Dataset/generate_hamming_set.py
mawanda-jun/NoLabels
6861867ad5ab49fc7ae6f562977f60195f9ff216
[ "MIT" ]
1
2021-05-27T09:41:58.000Z
2021-05-27T09:41:58.000Z
Dataset/generate_hamming_set.py
mawanda-jun/NoLabels
6861867ad5ab49fc7ae6f562977f60195f9ff216
[ "MIT" ]
null
null
null
Dataset/generate_hamming_set.py
mawanda-jun/NoLabels
6861867ad5ab49fc7ae6f562977f60195f9ff216
[ "MIT" ]
null
null
null
""" This file generates a set of most distant permutations from each other. This is only a support dataset: this will be useful when we will crop each image and reorder them in those distances. This is a kind of mathematical distribution, no data are loaded here. """ import numpy as np import itertools import os from ...
41.25
123
0.674242
import numpy as np import itertools import os from scipy.spatial.distance import cdist import h5py from config import conf NUM_CROPS = conf.numCrops NUM_PERMUTATIONS = conf.hammingSetSize SELECTION = conf.selectionMethod FILENAME = conf.hammingFileName FOLDER = conf.resources def hamming_set(num_crops=NUM_CROPS, nu...
true
true
f7711f9c8ca728500470acd62b54ff9a39d700d6
18,628
py
Python
sklearn/ensemble/_voting.py
Gnupur/scikit-learn
513695f1e4f7613f988159333bfccc59358879dd
[ "BSD-3-Clause" ]
1
2021-02-09T18:15:01.000Z
2021-02-09T18:15:01.000Z
sklearn/ensemble/_voting.py
Gnupur/scikit-learn
513695f1e4f7613f988159333bfccc59358879dd
[ "BSD-3-Clause" ]
1
2021-07-22T18:24:41.000Z
2021-07-22T18:24:41.000Z
sklearn/ensemble/_voting.py
Gnupur/scikit-learn
513695f1e4f7613f988159333bfccc59358879dd
[ "BSD-3-Clause" ]
2
2017-01-16T17:53:31.000Z
2017-04-22T06:13:07.000Z
""" Soft Voting/Majority Rule classifier and Voting regressor. This module contains: - A Soft Voting/Majority Rule classifier for classification estimators. - A Voting regressor for regression estimators. """ # Authors: Sebastian Raschka <se.raschka@gmail.com>, # Gilles Louppe <g.louppe@gmail.com>, # ...
33.685353
87
0.605164
from abc import abstractmethod import numpy as np from joblib import Parallel from ..base import ClassifierMixin from ..base import RegressorMixin from ..base import TransformerMixin from ..base import clone from ._base import _fit_single_estimator from ._base import _BaseHeterogeneousEnsemble from ..preprocessing...
true
true
f77120912893b36415ffa7deecc59cd6632e9a97
5,060
py
Python
src/pykeen/triples/triples_numeric_literals_factory.py
andreasala98/pykeen
205af6c2604b3882bf0adf275610bceb6ac53c0c
[ "MIT" ]
null
null
null
src/pykeen/triples/triples_numeric_literals_factory.py
andreasala98/pykeen
205af6c2604b3882bf0adf275610bceb6ac53c0c
[ "MIT" ]
null
null
null
src/pykeen/triples/triples_numeric_literals_factory.py
andreasala98/pykeen
205af6c2604b3882bf0adf275610bceb6ac53c0c
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Implementation of factory that create instances containing of triples and numeric literals.tsv.""" import logging import pathlib from typing import Any, Dict, Optional, TextIO, Tuple, Union import numpy as np import torch from .triples_factory import TriplesFactory from .utils import load...
41.138211
116
0.678458
import logging import pathlib from typing import Any, Dict, Optional, TextIO, Tuple, Union import numpy as np import torch from .triples_factory import TriplesFactory from .utils import load_triples from ..typing import EntityMapping, LabeledTriples, MappedTriples __all__ = [ "TriplesNumericLiteralsFactory", ]...
true
true
f771218521ae7e1e36baa1ed8b76b8d51e12a591
5,811
py
Python
billing/gateways/pin_gateway.py
timgates42/merchant
38b20af698b4653168161ad91c2279ab5516b9d5
[ "BSD-3-Clause" ]
332
2015-01-02T17:52:27.000Z
2022-03-15T11:34:30.000Z
billing/gateways/pin_gateway.py
Jbdealord/merchant
38b20af698b4653168161ad91c2279ab5516b9d5
[ "BSD-3-Clause" ]
29
2015-01-19T09:45:22.000Z
2021-12-13T19:39:38.000Z
billing/gateways/pin_gateway.py
Jbdealord/merchant
38b20af698b4653168161ad91c2279ab5516b9d5
[ "BSD-3-Clause" ]
93
2015-01-05T23:26:48.000Z
2022-03-15T11:34:33.000Z
try: import json except ImportError: from django.utils import simplejson as json import requests from copy import copy from django.conf import settings from billing import CreditCard from billing import Gateway, GatewayNotConfigured from billing.signals import transaction_was_successful, transaction_was_unsucc...
38.230263
101
0.608329
try: import json except ImportError: from django.utils import simplejson as json import requests from copy import copy from django.conf import settings from billing import CreditCard from billing import Gateway, GatewayNotConfigured from billing.signals import transaction_was_successful, transaction_was_unsucc...
true
true
f77122828bf9f54631c49ce55a2fed918bb36311
360
py
Python
troposphere/validators/appstream.py
compose-x/troposphere
9a94a8fafd8b4da1cd1f4239be0e7aa0681fd8d4
[ "BSD-2-Clause" ]
null
null
null
troposphere/validators/appstream.py
compose-x/troposphere
9a94a8fafd8b4da1cd1f4239be0e7aa0681fd8d4
[ "BSD-2-Clause" ]
null
null
null
troposphere/validators/appstream.py
compose-x/troposphere
9a94a8fafd8b4da1cd1f4239be0e7aa0681fd8d4
[ "BSD-2-Clause" ]
null
null
null
# Copyright (c) 2012-2022, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. from . import tags_or_list def validate_tags_or_list(x): """ Property: AppBlock.Tags Property: Application.Tags Property: Fleet.Tags Property: ImageBuilder.Tags Property: Stack....
18.947368
52
0.691667
from . import tags_or_list def validate_tags_or_list(x): return tags_or_list(x)
true
true
f7712294f9d159a557d74df0970542c3a9fe70ce
1,105
py
Python
build/mac/should_use_hermetic_xcode.py
o-lim/generate-ninja
4a969ae5334292f0b18369944df3d8cc81f414da
[ "BSD-3-Clause" ]
88
2017-05-07T03:52:01.000Z
2022-03-16T02:09:17.000Z
build/mac/should_use_hermetic_xcode.py
o-lim/generate-ninja
4a969ae5334292f0b18369944df3d8cc81f414da
[ "BSD-3-Clause" ]
3
2018-10-08T13:52:24.000Z
2019-05-19T23:30:19.000Z
build/mac/should_use_hermetic_xcode.py
o-lim/generate-ninja
4a969ae5334292f0b18369944df3d8cc81f414da
[ "BSD-3-Clause" ]
17
2017-04-28T10:15:48.000Z
2021-08-23T11:48:25.000Z
#!/usr/bin/env python # Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Prints "1" if Chrome targets should be built with hermetic Xcode. Prints "2" if Chrome targets should be built with hermetic Xcode,...
25.697674
80
0.742081
import os import sys _THIS_DIR_PATH = os.path.abspath(os.path.dirname(os.path.realpath(__file__))) _BUILD_PATH = os.path.join(_THIS_DIR_PATH, os.pardir) sys.path.insert(0, _BUILD_PATH) import mac_toolchain def _IsCorpMachine(): return os.path.isdir('/Library/GoogleCorpSupport/') def main(): allow_corp = sys...
true
true
f77123c390afda12f59bf3eb62814fd1e39c9cf6
6,787
py
Python
pyalgotrade/kraken/broker.py
metacash-one/pyalgotrade
f9760285b014896e2ef2422adf7268240f6bdee5
[ "Apache-2.0" ]
1
2018-10-15T04:35:42.000Z
2018-10-15T04:35:42.000Z
pyalgotrade/kraken/broker.py
metacash-one/pyalgotrade
f9760285b014896e2ef2422adf7268240f6bdee5
[ "Apache-2.0" ]
null
null
null
pyalgotrade/kraken/broker.py
metacash-one/pyalgotrade
f9760285b014896e2ef2422adf7268240f6bdee5
[ "Apache-2.0" ]
null
null
null
# PyAlgoTrade # # Copyright 2011-2015 Gabriel Martin Becedillas Ruiz # # 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 ap...
39.005747
117
0.686901
import threading from datetime import datetime from pyalgotrade import bar from pyalgotrade import broker from pyalgotrade.broker import backtesting, MarketOrder from pyalgotrade.coinbase import common from pyalgotrade.kraken import livebroker from pyalgotrade.orderbook import OrderBook, Bid, Ask LiveBroker = live...
true
true
f77124cb9a5371315d71c497f8bb487f7472f23d
4,139
py
Python
app.py
saiyidmkazmi/sqlalchemy-challenge
8ed9af5f68ec0220eec9ac177fae38c1a45a61a5
[ "ADSL" ]
null
null
null
app.py
saiyidmkazmi/sqlalchemy-challenge
8ed9af5f68ec0220eec9ac177fae38c1a45a61a5
[ "ADSL" ]
null
null
null
app.py
saiyidmkazmi/sqlalchemy-challenge
8ed9af5f68ec0220eec9ac177fae38c1a45a61a5
[ "ADSL" ]
null
null
null
from flask import Flask, jsonify import datetime as dt import numpy as np import sqlalchemy from sqlalchemy.ext.automap import automap_base from sqlalchemy.orm import Session from sqlalchemy import create_engine, func, inspect engine = create_engine("sqlite:///Resources/hawaii.sqlite", connect_args={'check_same_threa...
28.349315
234
0.692679
from flask import Flask, jsonify import datetime as dt import numpy as np import sqlalchemy from sqlalchemy.ext.automap import automap_base from sqlalchemy.orm import Session from sqlalchemy import create_engine, func, inspect engine = create_engine("sqlite:///Resources/hawaii.sqlite", connect_args={'check_same_threa...
false
true
f7712548c9c6310181580b002453dbdde8284aaf
1,176
py
Python
arjuna/engine/unitee/selection/rules/tags.py
test-mile/arjuna
21880b41e061e11bac2e600a3614684f8af75b2f
[ "Apache-2.0" ]
9
2018-11-15T10:09:17.000Z
2021-01-12T05:59:19.000Z
arjuna/engine/unitee/selection/rules/tags.py
test-mile/arjuna
21880b41e061e11bac2e600a3614684f8af75b2f
[ "Apache-2.0" ]
2
2019-07-01T15:33:46.000Z
2019-07-12T13:04:08.000Z
arjuna/engine/unitee/selection/rules/tags.py
test-mile/arjuna
21880b41e061e11bac2e600a3614684f8af75b2f
[ "Apache-2.0" ]
4
2018-12-02T15:14:04.000Z
2020-05-28T12:57:24.000Z
''' This file is a part of Test Mile Arjuna Copyright 2018 Test Mile Software Testing Pvt Ltd Website: www.TestMile.com Email: support [at] testmile.com Creator: Rahul Verma 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 ...
32.666667
91
0.770408
from .common.rule import * class TagsDefinedRule(SetEntryPresenceRule): def __init__(self, totype, is_inclusion_rule, robject, condition, expression): super().__init__(totype, is_inclusion_rule, robject, condition, expression) def _get_container(self, test_object): return test_object.tvars.t...
true
true
f7712607497e2276a3e0e5870131edfbfa86c9e4
383
py
Python
Community/move_to_bluecatgateway_udf/__init__.py
spenney-bc/gateway-workflows
0311a9224b2d53c01689eb6a9a0a593177abed63
[ "Apache-2.0" ]
43
2017-12-04T17:38:24.000Z
2021-12-29T09:17:17.000Z
Community/move_to_bluecatgateway_udf/__init__.py
spenney-bc/gateway-workflows
0311a9224b2d53c01689eb6a9a0a593177abed63
[ "Apache-2.0" ]
49
2017-12-07T21:02:29.000Z
2022-02-04T22:27:16.000Z
Community/move_to_bluecatgateway_udf/__init__.py
spenney-bc/gateway-workflows
0311a9224b2d53c01689eb6a9a0a593177abed63
[ "Apache-2.0" ]
82
2017-12-04T17:56:00.000Z
2021-12-29T09:17:21.000Z
# Copyright 2020 BlueCat Networks. All rights reserved. # -*- coding: utf-8 -*- type = 'ui' sub_pages = [ { 'name' : 'move_to_bluecatgateway_udf_page', 'title' : u'Migrate to BlueCatGateway UDF', 'endpoint' : 'move_to_bluecatgateway_udf/move_to_bluecatgateway_udf_endpoint', ...
29.461538
89
0.637076
type = 'ui' sub_pages = [ { 'name' : 'move_to_bluecatgateway_udf_page', 'title' : u'Migrate to BlueCatGateway UDF', 'endpoint' : 'move_to_bluecatgateway_udf/move_to_bluecatgateway_udf_endpoint', 'description' : u'move_to_bluecatgateway_udf' }, ]
true
true
f77126a5af92ffb2c6fe877055c443d567ea20d4
374
py
Python
tests/osiris/base/test_generalutils.py
skadyan/aws-glue-python-kickstart
5e3228a0793188d248f801a2b5a522210048ccde
[ "Apache-2.0" ]
4
2020-04-23T18:43:27.000Z
2022-02-22T03:57:06.000Z
tests/osiris/base/test_generalutils.py
skadyan/aws-glue-python-kickstart
5e3228a0793188d248f801a2b5a522210048ccde
[ "Apache-2.0" ]
1
2021-06-02T00:47:12.000Z
2021-06-02T00:47:12.000Z
tests/osiris/base/test_generalutils.py
skadyan/aws-glue-python-kickstart
5e3228a0793188d248f801a2b5a522210048ccde
[ "Apache-2.0" ]
null
null
null
from osiris.base.generalutils import flag def test_flag_values(): assert not flag(None) assert not flag('None') assert not flag('none') assert not flag('null') assert not flag('0') assert not flag(0) assert not flag('N') assert not flag('no') assert not flag('false') assert fl...
20.777778
41
0.63369
from osiris.base.generalutils import flag def test_flag_values(): assert not flag(None) assert not flag('None') assert not flag('none') assert not flag('null') assert not flag('0') assert not flag(0) assert not flag('N') assert not flag('no') assert not flag('false') assert fl...
true
true
f77126a9de5e28f4714a785568382cfa8edf24ce
862
py
Python
models/Order.py
lemon-markets/content-dollar-cost-average
649ec8e248ca42d484092308bc70e70bb29ef31b
[ "MIT" ]
1
2021-11-15T16:05:20.000Z
2021-11-15T16:05:20.000Z
models/Order.py
lemon-markets/content-dollar-cost-average
649ec8e248ca42d484092308bc70e70bb29ef31b
[ "MIT" ]
null
null
null
models/Order.py
lemon-markets/content-dollar-cost-average
649ec8e248ca42d484092308bc70e70bb29ef31b
[ "MIT" ]
1
2021-09-15T10:02:19.000Z
2021-09-15T10:02:19.000Z
import os from dotenv import load_dotenv from helpers import RequestHandler class Order(RequestHandler): def place_order(self, isin: str, expires_at: str, quantity: int, side: str): load_dotenv() order_details = { "isin": isin, "expires_at": expires_at, "side":...
25.352941
80
0.603248
import os from dotenv import load_dotenv from helpers import RequestHandler class Order(RequestHandler): def place_order(self, isin: str, expires_at: str, quantity: int, side: str): load_dotenv() order_details = { "isin": isin, "expires_at": expires_at, "side":...
true
true
f771271d750ba515d8a2dcd945caf9b093171278
226
py
Python
Model/Module _2.py
MadJayQ/Simulation
b0f7564998a1c384ba9f3d7ab34005fdbc13ac75
[ "CC0-1.0" ]
1
2018-12-15T06:38:27.000Z
2018-12-15T06:38:27.000Z
Model/Module _2.py
MadJayQ/Simulation
b0f7564998a1c384ba9f3d7ab34005fdbc13ac75
[ "CC0-1.0" ]
null
null
null
Model/Module _2.py
MadJayQ/Simulation
b0f7564998a1c384ba9f3d7ab34005fdbc13ac75
[ "CC0-1.0" ]
null
null
null
paths = [ [(0, 0), (0, 1), (1, 1), (2, 1), (3, 1), (3, 2)], [(1, 0), (1, 1), (1, 2), (1, 3), (1, 4)], [(2, 0), (2, 1), (2, 2), (2, 3), (2 , 4)] ]; def solvePath(grid, car, start, finish): return paths[car - 1];
32.285714
53
0.362832
paths = [ [(0, 0), (0, 1), (1, 1), (2, 1), (3, 1), (3, 2)], [(1, 0), (1, 1), (1, 2), (1, 3), (1, 4)], [(2, 0), (2, 1), (2, 2), (2, 3), (2 , 4)] ]; def solvePath(grid, car, start, finish): return paths[car - 1];
true
true
f771285818bbf77d45ff649c4bb72ffd7b0bf95a
229
py
Python
ml_project/tests/features/__init__.py
made-ml-in-prod-2021/liliyamakhmutova-
0c1b4ffc1a923ce60834f87fe9cf8d150d9d5b1d
[ "FTL" ]
null
null
null
ml_project/tests/features/__init__.py
made-ml-in-prod-2021/liliyamakhmutova-
0c1b4ffc1a923ce60834f87fe9cf8d150d9d5b1d
[ "FTL" ]
4
2021-05-22T17:45:40.000Z
2021-06-25T09:53:26.000Z
tests/features/__init__.py
made-ml-in-prod-2021/muzaffarsoliyev
9b6c1bd4ec003a8dbf9b375df0e302f58a3e324b
[ "MIT" ]
null
null
null
from .test_build_features import categorical_features, features_to_drop, numerical_features, target_col, feature_params __all__ = ["categorical_features", "features_to_drop", "numerical_features", "target_col", "feature_params"]
76.333333
119
0.838428
from .test_build_features import categorical_features, features_to_drop, numerical_features, target_col, feature_params __all__ = ["categorical_features", "features_to_drop", "numerical_features", "target_col", "feature_params"]
true
true
f77128b051610085f4975847f87a507895343531
1,731
py
Python
plugins/liquid_tags/youtube.py
jeorryb/datarambler
1968ccdc018182f3ad9d34ffaf7c743cebc92357
[ "MIT" ]
4
2017-12-13T19:51:38.000Z
2018-02-27T17:48:16.000Z
plugins/liquid_tags/youtube.py
jeorryb/datarambler
1968ccdc018182f3ad9d34ffaf7c743cebc92357
[ "MIT" ]
120
2018-09-01T20:27:51.000Z
2021-06-30T16:43:12.000Z
pelican-plugins/liquid_tags/youtube.py
JN-Blog/jn-blog.com
669bf9a9c6813f2b7980792fb137f6718077aea1
[ "MIT" ]
1
2020-09-30T07:39:11.000Z
2020-09-30T07:39:11.000Z
""" Youtube Tag --------- This implements a Liquid-style youtube tag for Pelican, based on the jekyll / octopress youtube tag [1]_ Syntax ------ {% youtube id [width height] %} Example ------- {% youtube dQw4w9WgXcQ 640 480 %} Output ------ <span class="videobox"> <iframe width="640" height="480" src="h...
25.455882
81
0.588099
import re from .mdx_liquid_tags import LiquidTags SYNTAX = "{% youtube id [width height] %}" YOUTUBE = re.compile(r'([\S]+)(\s+([\d%]+)\s([\d%]+))?') @LiquidTags.register('youtube') def youtube(preprocessor, tag, markup): width = 640 height = 390 youtube_id = None match = YOUTUBE.search(markup) ...
true
true
f77128d084d5eab007ab40f826e72652687219f0
4,716
py
Python
10.Face-Generated-With-GAN/face_generated_gan_model.py
Fanping/ai.example
452a8c00e58a6c3a27ab78a2b4a30bdd054ef165
[ "Apache-2.0" ]
9
2017-11-20T09:07:54.000Z
2022-02-27T06:58:46.000Z
10.Face-Generated-With-GAN/face_generated_gan_model.py
Fanping/ai.example
452a8c00e58a6c3a27ab78a2b4a30bdd054ef165
[ "Apache-2.0" ]
null
null
null
10.Face-Generated-With-GAN/face_generated_gan_model.py
Fanping/ai.example
452a8c00e58a6c3a27ab78a2b4a30bdd054ef165
[ "Apache-2.0" ]
3
2018-01-23T07:34:07.000Z
2019-08-12T04:48:11.000Z
import tensorflow as tf class FaceGANModel(object): def __init__(self, batch_size=64, learning_rate=1e-3): # 1. Define input. self.input_image = tf.placeholder(tf.float32, [batch_size, 40 * 55], name="input_image") self.input_prior = tf.placeholder...
55.482353
83
0.477311
import tensorflow as tf class FaceGANModel(object): def __init__(self, batch_size=64, learning_rate=1e-3): self.input_image = tf.placeholder(tf.float32, [batch_size, 40 * 55], name="input_image") self.input_prior = tf.placeholder(tf.float32, [batch...
true
true
f7712994e20d415db63ad3f2c79b7af7e48331b3
4,945
py
Python
Templates/String_match.py
ZR-Huang/AlgorithmPractices
226cecde136531341ce23cdf88529345be1912fc
[ "BSD-3-Clause" ]
1
2019-11-26T11:52:25.000Z
2019-11-26T11:52:25.000Z
Templates/String_match.py
ZR-Huang/AlgorithmPractices
226cecde136531341ce23cdf88529345be1912fc
[ "BSD-3-Clause" ]
null
null
null
Templates/String_match.py
ZR-Huang/AlgorithmPractices
226cecde136531341ce23cdf88529345be1912fc
[ "BSD-3-Clause" ]
null
null
null
class Solution(): def my_solution(self, A: str, B: str) -> int: # Brute force, time O(n*m), n=len(A), m=len(B) if not A: return -1 i, j, n, m = 0, 0, len(A), len(B) while i <= n-m: if B[j] == A[i]: while j<m and B[j] == A[i+j]: j+=1 ...
34.58042
131
0.483316
class Solution(): def my_solution(self, A: str, B: str) -> int: if not A: return -1 i, j, n, m = 0, 0, len(A), len(B) while i <= n-m: if B[j] == A[i]: while j<m and B[j] == A[i+j]: j+=1 if j == m: return i ...
true
true
f77129dde990700758d5c6f09cefb3c68d3c4895
3,220
py
Python
Formating/__init__.py
duncanbackr/jit_analytics
9c81ff294459ccda5f3d3ace40dd5f5b44cfa4d1
[ "MIT" ]
null
null
null
Formating/__init__.py
duncanbackr/jit_analytics
9c81ff294459ccda5f3d3ace40dd5f5b44cfa4d1
[ "MIT" ]
null
null
null
Formating/__init__.py
duncanbackr/jit_analytics
9c81ff294459ccda5f3d3ace40dd5f5b44cfa4d1
[ "MIT" ]
null
null
null
comment_format = { 'platformAvatar': 'thumbnail_url', 'badge': 'badge', 'fanID': 'youtube_fan_id', 'authorDisplayName': 'account_title', 'commentDatePosted': 'timestamp', 'commentID': 'comment_id', 'textDisplay': 'content', 'archive': 'archived', '...
30.961538
81
0.564596
comment_format = { 'platformAvatar': 'thumbnail_url', 'badge': 'badge', 'fanID': 'youtube_fan_id', 'authorDisplayName': 'account_title', 'commentDatePosted': 'timestamp', 'commentID': 'comment_id', 'textDisplay': 'content', 'archive': 'archived', '...
true
true
f7712a0a0a452eaec872296c84825f2a9b18e576
770
py
Python
heroctf-v3/pwnQL-2/guess.py
onealmond/hacking-lab
631e615944add02db3c2afef47bf1de7171eb065
[ "MIT" ]
9
2021-04-20T15:28:36.000Z
2022-03-08T19:53:48.000Z
heroctf-v3/pwnQL-2/guess.py
onealmond/hacking-lab
631e615944add02db3c2afef47bf1de7171eb065
[ "MIT" ]
null
null
null
heroctf-v3/pwnQL-2/guess.py
onealmond/hacking-lab
631e615944add02db3c2afef47bf1de7171eb065
[ "MIT" ]
6
2021-06-24T03:25:21.000Z
2022-02-20T21:44:52.000Z
#!/usr/bin/env python3 import requests import string import time # exclude '%' candidates = string.printable[:66] + string.printable[67:] def guess(): user = "admin" pw = [] url = "http://chall1.heroctf.fr:8080/index.php" for i in range(10): for a in candidates: pw.append(a) ...
24.0625
68
0.496104
import requests import string import time candidates = string.printable[:66] + string.printable[67:] def guess(): user = "admin" pw = [] url = "http://chall1.heroctf.fr:8080/index.php" for i in range(10): for a in candidates: pw.append(a) rsp = requests.post(url, data={...
true
true
f7712a6158a0524e0498673dfbcb3a3baa30ea24
12,217
py
Python
src/arcrest/ags/imageservice.py
elitiffin/ArcREST
c3e17b1325c9163d01e260d4e5c54db60a24a527
[ "Apache-2.0" ]
null
null
null
src/arcrest/ags/imageservice.py
elitiffin/ArcREST
c3e17b1325c9163d01e260d4e5c54db60a24a527
[ "Apache-2.0" ]
1
2015-05-01T17:11:24.000Z
2015-05-01T17:12:15.000Z
src/arcrest/ags/imageservice.py
elitiffin/ArcREST
c3e17b1325c9163d01e260d4e5c54db60a24a527
[ "Apache-2.0" ]
null
null
null
from base import BaseAGSServer ######################################################################## class ImageService(BaseAGSServer): """ An image service provides access to raster data through a web service. Multiple rasters can be served as one image service through mosaic dataset techn...
31.650259
97
0.598019
from base import BaseAGSServer class ImageService(BaseAGSServer): """ An image service provides access to raster data through a web service. Multiple rasters can be served as one image service through mosaic dataset technology, dynamically processed and mosaicked on the fly. An image se...
false
true
f7712aadabc5b5433d891ebecafe7d5ee0b50a1d
33,795
py
Python
dtformats/keychain.py
jleaniz/dtformats
03c29442c6a98bd4998314fca7274572ea848a84
[ "Apache-2.0" ]
61
2017-08-30T11:13:17.000Z
2022-03-24T20:45:18.000Z
dtformats/keychain.py
jleaniz/dtformats
03c29442c6a98bd4998314fca7274572ea848a84
[ "Apache-2.0" ]
12
2017-05-01T10:22:49.000Z
2022-02-11T05:51:18.000Z
dtformats/keychain.py
jleaniz/dtformats
03c29442c6a98bd4998314fca7274572ea848a84
[ "Apache-2.0" ]
19
2018-08-16T09:32:07.000Z
2021-11-19T17:14:02.000Z
# -*- coding: utf-8 -*- """MacOS keychain database files.""" import collections from dtfabric.runtime import data_maps as dtfabric_data_maps from dtformats import data_format from dtformats import errors class KeychainDatabaseColumn(object): """MacOS keychain database column. Attributes: attribute_data_ty...
35.990415
80
0.712117
import collections from dtfabric.runtime import data_maps as dtfabric_data_maps from dtformats import data_format from dtformats import errors class KeychainDatabaseColumn(object): def __init__(self): super(KeychainDatabaseColumn, self).__init__() self.attribute_data_type = None self.attribute_ident...
true
true
f7712b36a5a7d00604153de8f73776dd4ef73def
917
py
Python
test/test_engine_task_status_cumulative.py
vtpl1/videonetics_api
bef179df12f449db0c50c3910daca50b7d40ac49
[ "RSA-MD" ]
null
null
null
test/test_engine_task_status_cumulative.py
vtpl1/videonetics_api
bef179df12f449db0c50c3910daca50b7d40ac49
[ "RSA-MD" ]
1
2021-02-26T07:31:37.000Z
2021-02-26T07:31:37.000Z
test/test_engine_task_status_cumulative.py
vtpl1/videonetics_api
bef179df12f449db0c50c3910daca50b7d40ac49
[ "RSA-MD" ]
2
2020-11-04T02:52:55.000Z
2020-11-05T08:09:50.000Z
# coding: utf-8 """ Engine api Engine APIs # noqa: E501 OpenAPI spec version: 1.0.6 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import unittest import vtpl_api from vtpl_api.models.engine_task_status_cumulative import EngineTask...
22.925
106
0.721919
from __future__ import absolute_import import unittest import vtpl_api from vtpl_api.models.engine_task_status_cumulative import EngineTaskStatusCumulative from vtpl_api.rest import ApiException class TestEngineTaskStatusCumulative(unittest.TestCase): def setUp(self): pass def tearDown(self): ...
true
true
f7712d3e881e10fdb74ffc1822929707b652ae1c
3,473
py
Python
pysnmp-with-texts/BEGEMOT-MIB2-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
8
2019-05-09T17:04:00.000Z
2021-06-09T06:50:51.000Z
pysnmp-with-texts/BEGEMOT-MIB2-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
4
2019-05-31T16:42:59.000Z
2020-01-31T21:57:17.000Z
pysnmp-with-texts/BEGEMOT-MIB2-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module BEGEMOT-MIB2-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/BEGEMOT-MIB2-MIB # Produced by pysmi-0.3.4 at Wed May 1 11:37:05 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar ...
115.766667
477
0.790383
ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") SingleValueConstraint, ConstraintsIntersection, ConstraintsUnion, ValueSizeConstraint, ValueRangeConstraint = mibBuilder.impo...
true
true
f7712dd861e3fdf8233cdd73271219ca6245c92d
10,113
py
Python
src/service.py
Fngg/contact_tracing
0df5d859fe7b89ac6539d409af8e6cec86f32137
[ "Apache-2.0" ]
1
2022-03-27T03:56:54.000Z
2022-03-27T03:56:54.000Z
src/service.py
Fngg/contact_tracing
0df5d859fe7b89ac6539d409af8e6cec86f32137
[ "Apache-2.0" ]
null
null
null
src/service.py
Fngg/contact_tracing
0df5d859fe7b89ac6539d409af8e6cec86f32137
[ "Apache-2.0" ]
2
2022-03-25T07:17:25.000Z
2022-03-29T09:28:04.000Z
''' 流调查询 ''' from settings_class import settings_obj import pandas as pd from util.logger import logger from sqlalchemy import desc from datetime import datetime,timedelta def get_forward_backward_time(current_time, minutes): # 获取向前和向后的时间 if isinstance(current_time,str): current = datetime.strptime(cu...
53.507937
366
0.772867
from settings_class import settings_obj import pandas as pd from util.logger import logger from sqlalchemy import desc from datetime import datetime,timedelta def get_forward_backward_time(current_time, minutes): if isinstance(current_time,str): current = datetime.strptime(current_time, "%Y-%m-%d %H:%...
true
true
f7712e7f6013c48ad1b3806eb475b5e1f7d3a37f
2,006
py
Python
force_bdss/app/optimize_operation.py
scottwedge/force-bdss
c3fdf6a190fa448dbaecedcb81aaba504563dee3
[ "BSD-2-Clause" ]
2
2019-08-19T16:02:40.000Z
2020-10-01T11:38:00.000Z
force_bdss/app/optimize_operation.py
scottwedge/force-bdss
c3fdf6a190fa448dbaecedcb81aaba504563dee3
[ "BSD-2-Clause" ]
339
2017-07-06T14:35:40.000Z
2021-05-04T14:18:11.000Z
force_bdss/app/optimize_operation.py
scottwedge/force-bdss
c3fdf6a190fa448dbaecedcb81aaba504563dee3
[ "BSD-2-Clause" ]
2
2019-03-05T14:17:25.000Z
2020-06-26T01:48:07.000Z
# (C) Copyright 2010-2020 Enthought, Inc., Austin, TX # All rights reserved. import logging from traits.api import provides from .i_operation import IOperation from .base_operation import BaseOperation log = logging.getLogger(__name__) @provides(IOperation) class OptimizeOperation(BaseOperation): """Performs...
29.940299
72
0.572283
import logging from traits.api import provides from .i_operation import IOperation from .base_operation import BaseOperation log = logging.getLogger(__name__) @provides(IOperation) class OptimizeOperation(BaseOperation): def run(self): self.verify_workflow() mco = self.create...
true
true
f7712f3e5a1ea7430a1d1a293fa2929fd0843baa
21,680
py
Python
src/lib/datasets/dataset/jde.py
HsiuWen/FairMOT
67c4fe4b5ce11f960251bd8d0cdfd37622194e29
[ "MIT" ]
null
null
null
src/lib/datasets/dataset/jde.py
HsiuWen/FairMOT
67c4fe4b5ce11f960251bd8d0cdfd37622194e29
[ "MIT" ]
null
null
null
src/lib/datasets/dataset/jde.py
HsiuWen/FairMOT
67c4fe4b5ce11f960251bd8d0cdfd37622194e29
[ "MIT" ]
null
null
null
import glob import math import os import os.path as osp import random import time from collections import OrderedDict import cv2 import json import numpy as np import torch import copy from torch.utils.data import Dataset from torchvision.transforms import transforms as T from cython_bbox import bbox_overlaps as bbox...
38.035088
125
0.538515
import glob import math import os import os.path as osp import random import time from collections import OrderedDict import cv2 import json import numpy as np import torch import copy from torch.utils.data import Dataset from torchvision.transforms import transforms as T from cython_bbox import bbox_overlaps as bbox...
true
true
f7712f56edc09f5ae5a815cd8d55119fd38ecb85
2,333
py
Python
h_RNN/Mnist.py
llichengtong/yx1
6619532e43799fea739a21fb14b999f7d1898fe9
[ "MIT" ]
null
null
null
h_RNN/Mnist.py
llichengtong/yx1
6619532e43799fea739a21fb14b999f7d1898fe9
[ "MIT" ]
null
null
null
h_RNN/Mnist.py
llichengtong/yx1
6619532e43799fea739a21fb14b999f7d1898fe9
[ "MIT" ]
null
null
null
import time import tflearn import numpy as np import tensorflow as tf from h_RNN.RNN import RNNWrapper, Generator from h_RNN.SpRNN import SparseRNN from Util.Util import DataUtil class MnistGenerator(Generator): def __init__(self, im=None, om=None, one_hot=True): super(MnistGenerator, self)._...
39.542373
112
0.618517
import time import tflearn import numpy as np import tensorflow as tf from h_RNN.RNN import RNNWrapper, Generator from h_RNN.SpRNN import SparseRNN from Util.Util import DataUtil class MnistGenerator(Generator): def __init__(self, im=None, om=None, one_hot=True): super(MnistGenerator, self)._...
true
true
f771303dbaf60f918f0dcae25a978c0aa2c1b901
916
py
Python
besspin/cyberPhys/cyberphyslib/cyberphyslib/demonstrator/logger.py
CTSRD-CHERI/BESSPIN-Tool-Suite
26c0e7ce8cf6ffa6e33ea4ff9aa6194892ef6474
[ "Apache-2.0" ]
null
null
null
besspin/cyberPhys/cyberphyslib/cyberphyslib/demonstrator/logger.py
CTSRD-CHERI/BESSPIN-Tool-Suite
26c0e7ce8cf6ffa6e33ea4ff9aa6194892ef6474
[ "Apache-2.0" ]
null
null
null
besspin/cyberPhys/cyberphyslib/cyberphyslib/demonstrator/logger.py
CTSRD-CHERI/BESSPIN-Tool-Suite
26c0e7ce8cf6ffa6e33ea4ff9aa6194892ef6474
[ "Apache-2.0" ]
null
null
null
""" Project: SSITH CyberPhysical Demonstrator Name: logging.py Author: Steven Osborn <steven@lolsborn.com>, Ethan Lew <elew@galois.com> Date: 01 January 2021 Logs for Cyberphys Components """ import pathlib, os import logging.config # load utils/logging.conf logging_filepath = pathlib.Path(os.path.realpath(__file__)...
31.586207
93
0.789301
import pathlib, os import logging.config logging_filepath = pathlib.Path(os.path.realpath(__file__)).parent / "utils" / "logging.conf" logging.config.fileConfig(logging_filepath) root_logger: logging.Logger = logging.getLogger('root') can_logger: logging.Logger = logging.getLogger("can") sim_logger: logging.Logger =...
true
true
f7713075c44930d31d2837371da9d01d2d86b032
30
py
Python
settings.py
rodrigo-brito/co-change-analysis
298bb5437371ab29fb94a9e2f9012d3a5cf033f7
[ "MIT" ]
1
2019-04-15T22:27:52.000Z
2019-04-15T22:27:52.000Z
settings.py
rodrigo-brito/co-change-analysis
298bb5437371ab29fb94a9e2f9012d3a5cf033f7
[ "MIT" ]
1
2019-05-09T01:55:12.000Z
2019-05-09T02:14:41.000Z
settings.py
rodrigo-brito/co-change-analysis
298bb5437371ab29fb94a9e2f9012d3a5cf033f7
[ "MIT" ]
2
2019-05-09T01:41:29.000Z
2019-06-12T18:59:45.000Z
CLONE_PATH = "/tmp" DEBUG=True
15
19
0.733333
CLONE_PATH = "/tmp" DEBUG=True
true
true
f77130b79d5b25011324c31553efdb4eb7589283
230
py
Python
py/tests/testWaterBottles/test_WaterBottles.py
zcemycl/algoTest
9518fb2b60fd83c85aeb2ab809ff647aaf643f0a
[ "MIT" ]
1
2022-01-26T16:33:45.000Z
2022-01-26T16:33:45.000Z
py/tests/testWaterBottles/test_WaterBottles.py
zcemycl/algoTest
9518fb2b60fd83c85aeb2ab809ff647aaf643f0a
[ "MIT" ]
null
null
null
py/tests/testWaterBottles/test_WaterBottles.py
zcemycl/algoTest
9518fb2b60fd83c85aeb2ab809ff647aaf643f0a
[ "MIT" ]
1
2022-01-26T16:35:44.000Z
2022-01-26T16:35:44.000Z
import unittest from parameterized import parameterized as p from solns.waterBottles.waterBottles import * class UnitTest_WaterBottles(unittest.TestCase): @p.expand([ [] ]) def test_naive(self): pass
19.166667
47
0.704348
import unittest from parameterized import parameterized as p from solns.waterBottles.waterBottles import * class UnitTest_WaterBottles(unittest.TestCase): @p.expand([ [] ]) def test_naive(self): pass
true
true
f771311f4bc3a1ca973c783d26f4129db776f86a
720
py
Python
prune.py
NathanVaughn/mypypi
5e09f54ffc75d60465dbeecc13aacffc16ec7472
[ "MIT" ]
null
null
null
prune.py
NathanVaughn/mypypi
5e09f54ffc75d60465dbeecc13aacffc16ec7472
[ "MIT" ]
null
null
null
prune.py
NathanVaughn/mypypi
5e09f54ffc75d60465dbeecc13aacffc16ec7472
[ "MIT" ]
null
null
null
import argparse import app.main def main(days: int, dry_run: bool) -> None: deleted = app.main.storage_backend.delete_older_than_days(days, dry_run) if dry_run: print(f"{len(deleted)} files would have been deleted") else: print(f"{len(deleted)} files were deleted") app.main.cache...
26.666667
79
0.668056
import argparse import app.main def main(days: int, dry_run: bool) -> None: deleted = app.main.storage_backend.delete_older_than_days(days, dry_run) if dry_run: print(f"{len(deleted)} files would have been deleted") else: print(f"{len(deleted)} files were deleted") app.main.cache...
true
true
f77132611140b97142abc07dcd366707b9c056d7
3,162
py
Python
data/classify.py
consbio/sarp
b2b8fa1e86296fc7fbd491d83e83098d89a948c6
[ "MIT" ]
1
2020-08-13T08:39:33.000Z
2020-08-13T08:39:33.000Z
data/classify.py
consbio/sarp
b2b8fa1e86296fc7fbd491d83e83098d89a948c6
[ "MIT" ]
3
2019-06-02T13:50:26.000Z
2019-06-02T13:50:32.000Z
data/classify.py
consbio/sarp
b2b8fa1e86296fc7fbd491d83e83098d89a948c6
[ "MIT" ]
1
2019-06-02T13:17:15.000Z
2019-06-02T13:17:15.000Z
import pandas as pd import numpy as np GAINMILES_BINS = [-1, 0, 1, 5, 10, 25, 100] SINUOSITY_BINS = [-1, 0, 1.2, 1.5001] LANDCOVER_BINS = [-1, 0, 50, 75, 90] RARESPP_BINS = [0, 1, 2, 5, 10] STREAMORDER_BINS = [-1, 0, 1, 2, 3, 4, 5, 6] def classify_gainmiles(series): bins = GAINMILES_BINS + [series.max() + 1] ...
34.747253
90
0.637255
import pandas as pd import numpy as np GAINMILES_BINS = [-1, 0, 1, 5, 10, 25, 100] SINUOSITY_BINS = [-1, 0, 1.2, 1.5001] LANDCOVER_BINS = [-1, 0, 50, 75, 90] RARESPP_BINS = [0, 1, 2, 5, 10] STREAMORDER_BINS = [-1, 0, 1, 2, 3, 4, 5, 6] def classify_gainmiles(series): bins = GAINMILES_BINS + [series.max() + 1] ...
true
true