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
f71469034f1006ce1d48aedf70acee846deb393a
6,692
py
Python
pyelastic/pendulum.py
tacox5/elastic_pendulum
c2058444ca161a420466b531b008fe247a87db60
[ "BSD-2-Clause" ]
null
null
null
pyelastic/pendulum.py
tacox5/elastic_pendulum
c2058444ca161a420466b531b008fe247a87db60
[ "BSD-2-Clause" ]
8
2021-06-11T15:26:47.000Z
2021-07-29T23:52:01.000Z
pyelastic/pendulum.py
tyler-a-cox/elastic-pendulum
c2058444ca161a420466b531b008fe247a87db60
[ "BSD-2-Clause" ]
null
null
null
import os import glob import numpy as np import matplotlib.pyplot as plt from scipy.integrate import solve_ivp from scipy.interpolate import interp1d from .settings import * class ElasticPendulum: """Class that handles the simulation of springy, double pendulums. This class handles a number of initial conditi...
34.494845
90
0.51569
import os import glob import numpy as np import matplotlib.pyplot as plt from scipy.integrate import solve_ivp from scipy.interpolate import interp1d from .settings import * class ElasticPendulum: def __init__(self, **kwargs): prop_defaults = { "alpha_0": np.random.uniform(-np.pi, np.pi), ...
true
true
f71469867882f63d4249d507eeda5f87798b2b79
535
py
Python
restful_test.py
Corey0606/FlaskSite
3c547b6e69a955d281451f18a9db8dde65013bd3
[ "CC-BY-3.0" ]
null
null
null
restful_test.py
Corey0606/FlaskSite
3c547b6e69a955d281451f18a9db8dde65013bd3
[ "CC-BY-3.0" ]
null
null
null
restful_test.py
Corey0606/FlaskSite
3c547b6e69a955d281451f18a9db8dde65013bd3
[ "CC-BY-3.0" ]
null
null
null
# -*- coding: utf-8 -*- """ @Time : 2020/12/11 11:57 @Author : Corey """ from flask import Flask, request from flask_restful import Api, Resource, marshal, fields, reqparse app = Flask(__name__) # restful接口方法 api = Api(app) class UserApi(Resource): def get(self): return 'get restful api data' de...
19.814815
66
0.648598
from flask import Flask, request from flask_restful import Api, Resource, marshal, fields, reqparse app = Flask(__name__) api = Api(app) class UserApi(Resource): def get(self): return 'get restful api data' def post(self): return 'update restful api data' def delete(self): retur...
true
true
f71469a4c65abe3c8976410b9d79a0dd097398f2
379
py
Python
dbaas/physical/admin/vip_instance_group.py
amintasvrp/database-as-a-service
8221df604f9252ddf877cd2216bdf1e3f76220ba
[ "BSD-3-Clause" ]
303
2015-01-08T10:35:54.000Z
2022-02-28T08:54:06.000Z
dbaas/physical/admin/vip_instance_group.py
amintasvrp/database-as-a-service
8221df604f9252ddf877cd2216bdf1e3f76220ba
[ "BSD-3-Clause" ]
124
2015-01-14T12:56:15.000Z
2022-03-22T20:45:11.000Z
dbaas/physical/admin/vip_instance_group.py
amintasvrp/database-as-a-service
8221df604f9252ddf877cd2216bdf1e3f76220ba
[ "BSD-3-Clause" ]
110
2015-01-02T11:59:48.000Z
2022-02-28T08:54:06.000Z
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from django.contrib import admin class VipInstanceGroupAdmin(admin.ModelAdmin): search_fields = ("name", "identifier",) list_display = ("name", "identifier", "vip", ) search_fields = ("name", "identifier", "vip__infra__name")...
31.583333
62
0.699208
from __future__ import absolute_import, unicode_literals from django.contrib import admin class VipInstanceGroupAdmin(admin.ModelAdmin): search_fields = ("name", "identifier",) list_display = ("name", "identifier", "vip", ) search_fields = ("name", "identifier", "vip__infra__name") list_filter = ('vip...
true
true
f71469ad5f5395756c71d0408eb3aba396919d37
3,078
py
Python
denorm/join_defer.py
rivethealth/denorm
c9b9070730e3cc7fbe78927d34db7ffa384aed42
[ "MIT" ]
11
2021-03-29T14:27:48.000Z
2022-01-01T00:31:40.000Z
denorm/join_defer.py
rivethealth/denorm
c9b9070730e3cc7fbe78927d34db7ffa384aed42
[ "MIT" ]
null
null
null
denorm/join_defer.py
rivethealth/denorm
c9b9070730e3cc7fbe78927d34db7ffa384aed42
[ "MIT" ]
null
null
null
import typing from pg_sql import SqlId, SqlNumber, SqlObject, SqlString, sql_list from .format import format from .join_common import JoinTarget, Key, Structure from .join_key import KeyConsumer, TargetRefresh from .sql import SqlTableExpr from .sql_query import sync_query, upsert_query from .string import indent d...
24.428571
83
0.668291
import typing from pg_sql import SqlId, SqlNumber, SqlObject, SqlString, sql_list from .format import format from .join_common import JoinTarget, Key, Structure from .join_key import KeyConsumer, TargetRefresh from .sql import SqlTableExpr from .sql_query import sync_query, upsert_query from .string import indent d...
true
true
f7146a3b8bd5c67332e642ddcaf6c0846b506b4b
1,568
py
Python
harstorage/config/environment.py
beenanner/harstorage
c45e735d9d28cb951e70d0c783d5678996ef31ad
[ "Apache-2.0" ]
null
null
null
harstorage/config/environment.py
beenanner/harstorage
c45e735d9d28cb951e70d0c783d5678996ef31ad
[ "Apache-2.0" ]
null
null
null
harstorage/config/environment.py
beenanner/harstorage
c45e735d9d28cb951e70d0c783d5678996ef31ad
[ "Apache-2.0" ]
null
null
null
import os from mako.lookup import TemplateLookup from pylons.configuration import PylonsConfig from pylons.error import handle_mako_error import harstorage.lib.app_globals as app_globals import harstorage.lib.helpers from harstorage.config.routing import make_map def load_environment(global_conf, app_conf): """...
34.844444
77
0.711097
import os from mako.lookup import TemplateLookup from pylons.configuration import PylonsConfig from pylons.error import handle_mako_error import harstorage.lib.app_globals as app_globals import harstorage.lib.helpers from harstorage.config.routing import make_map def load_environment(global_conf, app_conf): co...
true
true
f7146ac1b88ddd7645aeea7aa509f16d3d4bf02a
553
py
Python
code/exampleStrats/forgivingGrimTrigger.py
Texashokies/PrisonersDilemmaTournament
096c131bc774cc5efd29a3b723f9f73ab5a874be
[ "MIT" ]
null
null
null
code/exampleStrats/forgivingGrimTrigger.py
Texashokies/PrisonersDilemmaTournament
096c131bc774cc5efd29a3b723f9f73ab5a874be
[ "MIT" ]
null
null
null
code/exampleStrats/forgivingGrimTrigger.py
Texashokies/PrisonersDilemmaTournament
096c131bc774cc5efd29a3b723f9f73ab5a874be
[ "MIT" ]
null
null
null
# Strategy known as "Forrgviing Grim Trigger" or "Grudger". # We will cooperate repeatedly until our opponent betrays us twice. # Then, we will get angry and defect for the rest of time. # Memory is the number of times the strategy has been wronged def strategy(history, memory): wronged = memory if hist...
32.529412
73
0.625678
def strategy(history, memory): wronged = memory if history.shape[1] ==0: wronged = 0 if history.shape[1] >= 1 and history[1,-1] == 0: wronged += 1 if wronged >= 2: return 0, wronged else: return 1, wronged
true
true
f7146c422cdc8ea2780342f0d121cce5a78ee0fb
516
py
Python
src/apps/datasets/views.py
binfeng1018/competitions-v2
173ea6053b7eda5de3a9f1a687dfb0d43bfc4e9c
[ "Apache-2.0" ]
19
2018-07-27T19:14:10.000Z
2021-12-08T16:34:42.000Z
src/apps/datasets/views.py
binfeng1018/competitions-v2
173ea6053b7eda5de3a9f1a687dfb0d43bfc4e9c
[ "Apache-2.0" ]
516
2017-07-27T15:45:43.000Z
2022-02-10T07:57:46.000Z
src/apps/datasets/views.py
binfeng1018/competitions-v2
173ea6053b7eda5de3a9f1a687dfb0d43bfc4e9c
[ "Apache-2.0" ]
16
2018-01-01T19:07:01.000Z
2021-09-17T07:59:59.000Z
from django.contrib.auth.mixins import LoginRequiredMixin from django.http import HttpResponseRedirect from django.shortcuts import get_object_or_404 from django.views.generic import TemplateView from datasets.models import Data from utils.data import make_url_sassy class DataManagement(LoginRequiredMixin, TemplateV...
30.352941
68
0.827519
from django.contrib.auth.mixins import LoginRequiredMixin from django.http import HttpResponseRedirect from django.shortcuts import get_object_or_404 from django.views.generic import TemplateView from datasets.models import Data from utils.data import make_url_sassy class DataManagement(LoginRequiredMixin, TemplateV...
true
true
f7146d634f0c817722831bea4a10f95b951b6a3b
310
py
Python
file_and_io/tell.py
daiyadong/python2_learn
6930ddc3dd2edfc31064b1a8001ad826a775e912
[ "Apache-2.0" ]
null
null
null
file_and_io/tell.py
daiyadong/python2_learn
6930ddc3dd2edfc31064b1a8001ad826a775e912
[ "Apache-2.0" ]
null
null
null
file_and_io/tell.py
daiyadong/python2_learn
6930ddc3dd2edfc31064b1a8001ad826a775e912
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python2 # -*- coding: UTF-8 -*- # 打开一个文件 fo = open("foo.txt", "r+") str = fo.read(10) print "读取的字符串是 : ", str # 查找当前位置 position = fo.tell() print "当前文件位置 : ", position # 把指针再次重新定位到文件开头 position = fo.seek(0, 0) str = fo.read(10) print "重新读取字符串 : ", str # 关闭打开的文件 fo.close()
17.222222
28
0.580645
fo = open("foo.txt", "r+") str = fo.read(10) print "读取的字符串是 : ", str position = fo.tell() print "当前文件位置 : ", position position = fo.seek(0, 0) str = fo.read(10) print "重新读取字符串 : ", str fo.close()
false
true
f7146d93278ba64bba1fb20d47d61c403f8494f0
32,956
py
Python
qa/rpc-tests/fundrawtransaction.py
Neslin247/Draupnir
1ffd83f4d96be293a6bceb5620d6daf7cb892e42
[ "MIT" ]
null
null
null
qa/rpc-tests/fundrawtransaction.py
Neslin247/Draupnir
1ffd83f4d96be293a6bceb5620d6daf7cb892e42
[ "MIT" ]
null
null
null
qa/rpc-tests/fundrawtransaction.py
Neslin247/Draupnir
1ffd83f4d96be293a6bceb5620d6daf7cb892e42
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * def ge...
44.176944
220
0.571155
from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * def get_unspent(listunspent, amount): for utx in listunspent: if utx['amount'] == amount: return utx raise AssertionError('Could not find unspent with amount={}'.format(amount)) class RawTra...
true
true
f7146e28902a4ba376e0f04a00b98ce31bf4575b
28,745
py
Python
ansible/roles/search_head/files/timestamp_app/lib/splunklib/searchcommands/internals.py
umbrio/attack_range
8bf1bbe5f6db051d3c8cf5d3f3c07cc38ca85bf6
[ "Apache-2.0" ]
12
2017-04-04T11:51:09.000Z
2021-11-05T02:07:58.000Z
ansible/roles/search_head/files/timestamp_app/lib/splunklib/searchcommands/internals.py
umbrio/attack_range
8bf1bbe5f6db051d3c8cf5d3f3c07cc38ca85bf6
[ "Apache-2.0" ]
21
2017-03-28T04:32:54.000Z
2021-09-01T03:52:53.000Z
ansible/roles/search_head/files/timestamp_app/lib/splunklib/searchcommands/internals.py
umbrio/attack_range
8bf1bbe5f6db051d3c8cf5d3f3c07cc38ca85bf6
[ "Apache-2.0" ]
9
2018-07-31T04:15:22.000Z
2020-10-06T13:43:22.000Z
# coding=utf-8 # # Copyright © 2011-2015 Splunk, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"): you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
34.017751
120
0.586085
from __future__ import absolute_import, division, print_function from io import TextIOWrapper from collections import deque, namedtuple from splunklib import six try: from collections import OrderedDict except ImportError: from ..ordereddict import OrderedDict from splunklib.six.moves import StringIO from it...
true
true
f7146fa04286aa454a33161690efd3bc2e7b2b70
5,851
py
Python
src/compas/robots/model/tool.py
ricardoavelino/compas
e3c7f004b8839f96bf01f9f6b21a75786c3f59fa
[ "MIT" ]
null
null
null
src/compas/robots/model/tool.py
ricardoavelino/compas
e3c7f004b8839f96bf01f9f6b21a75786c3f59fa
[ "MIT" ]
null
null
null
src/compas/robots/model/tool.py
ricardoavelino/compas
e3c7f004b8839f96bf01f9f6b21a75786c3f59fa
[ "MIT" ]
null
null
null
from __future__ import absolute_import from __future__ import division from __future__ import print_function from compas.geometry import Frame from compas.geometry import Transformation from compas.robots.model.robot import RobotModel class ToolModel(RobotModel): """Represents a tool to be attached to the robot'...
33.820809
119
0.592719
from __future__ import absolute_import from __future__ import division from __future__ import print_function from compas.geometry import Frame from compas.geometry import Transformation from compas.robots.model.robot import RobotModel class ToolModel(RobotModel): def __init__(self, visual, frame_in_tool0_frame,...
true
true
f714701d95b7e531e20aa26475084c4b139b2eb8
417
py
Python
mainapp/migrations/0004_auto_20181224_1636.py
ploggingdev/finitecoins
60f69cc563e1a26be8c659d4400579025219a223
[ "MIT" ]
null
null
null
mainapp/migrations/0004_auto_20181224_1636.py
ploggingdev/finitecoins
60f69cc563e1a26be8c659d4400579025219a223
[ "MIT" ]
5
2020-02-11T23:31:23.000Z
2021-06-10T21:03:24.000Z
mainapp/migrations/0004_auto_20181224_1636.py
ploggingdev/finitecoins
60f69cc563e1a26be8c659d4400579025219a223
[ "MIT" ]
null
null
null
# Generated by Django 2.1.4 on 2018-12-24 16:36 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('mainapp', '0003_game_description_html'), ] operations = [ migrations.AlterField( model_name='game', name='descriptio...
21.947368
75
0.613909
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('mainapp', '0003_game_description_html'), ] operations = [ migrations.AlterField( model_name='game', name='description', field=models.CharField(blank=Tru...
true
true
f7147066a672f718ec342f39cba6fdc815170b9d
2,054
py
Python
motion_detector/main.py
Mark-Kinyua/python_public
25c4eff3a6f93c35a949f94a2f9c3df3202a3113
[ "MIT" ]
null
null
null
motion_detector/main.py
Mark-Kinyua/python_public
25c4eff3a6f93c35a949f94a2f9c3df3202a3113
[ "MIT" ]
null
null
null
motion_detector/main.py
Mark-Kinyua/python_public
25c4eff3a6f93c35a949f94a2f9c3df3202a3113
[ "MIT" ]
null
null
null
import numpy as np import cv2 # A motion detecetor, yup... lol. # Remember to use an old python version < 3.6 image_path = 'room_people.jpg' # Photo # The model was already formulated, just need to loaad it into the system. prototxt_path = 'models/MobileNetSSD_deploy.prototxt' # Load Model model_path = 'models/Mob...
32.09375
129
0.656767
import numpy as np import cv2 image_path = 'room_people.jpg' prototxt_path = 'models/MobileNetSSD_deploy.prototxt' model_path = 'models/MobileNetSSD_deploy.caffemodel' min_confidence = 0.2 classes = ["background","aeroplane","bicycle","bird","boat","bottle","bus","car","cat","chair","cow","diningtable","dog","hor...
true
true
f714719a188b3cff193941c546d8d5b9cbeb3c7f
227
py
Python
chia/wallet/puzzles/rom_bootstrap_generator.py
ForestCrazy/chia-blockchain-remote-plot
0ba838b7a8ea2b5410d438ac70295df699a30dae
[ "Apache-2.0" ]
11,902
2019-12-05T00:14:29.000Z
2022-03-31T23:25:37.000Z
chia/wallet/puzzles/rom_bootstrap_generator.py
jcteng/ext9-blockchain
46506bc5778e14cbc373de39438b0c6f794a49c5
[ "Apache-2.0" ]
5,246
2019-12-05T04:00:03.000Z
2022-03-31T21:33:30.000Z
chia/wallet/puzzles/rom_bootstrap_generator.py
jcteng/ext9-blockchain
46506bc5778e14cbc373de39438b0c6f794a49c5
[ "Apache-2.0" ]
2,149
2019-12-05T11:12:53.000Z
2022-03-31T06:08:34.000Z
from chia.types.blockchain_format.program import SerializedProgram from .load_clvm import load_clvm MOD = SerializedProgram.from_bytes(load_clvm("rom_bootstrap_generator.clvm").as_bin()) def get_generator(): return MOD
22.7
86
0.814978
from chia.types.blockchain_format.program import SerializedProgram from .load_clvm import load_clvm MOD = SerializedProgram.from_bytes(load_clvm("rom_bootstrap_generator.clvm").as_bin()) def get_generator(): return MOD
true
true
f71471f3e75074020a7c0fdf86353776fcede027
3,324
py
Python
src/Yowsup/ConnectionIO/connectionengine.py
philklc/yowsup
a1736ccbdadfccbf9066964f3a9cb51f3337c840
[ "MIT" ]
1
2018-12-27T23:35:52.000Z
2018-12-27T23:35:52.000Z
src/Yowsup/ConnectionIO/connectionengine.py
philklc/yowsup
a1736ccbdadfccbf9066964f3a9cb51f3337c840
[ "MIT" ]
null
null
null
src/Yowsup/ConnectionIO/connectionengine.py
philklc/yowsup
a1736ccbdadfccbf9066964f3a9cb51f3337c840
[ "MIT" ]
null
null
null
''' Copyright (c) <2012> Tarek Galal <tare2.galal@gmail.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, m...
25.569231
93
0.691637
import socket; import sys from bintreenode import BinTreeNodeReader, BinTreeNodeWriter from Yowsup.Common.debugger import Debugger from ioexceptions import ConnectionClosedException class ConnectionEngine(socket.socket): def __init__(self): Debugger.attach(self) self.reader = BinTreeNodeReader(self) self....
true
true
f7147205a286f1365d68f46e5f1a2e5554c58b41
1,577
py
Python
share/rpcauth/rpcauth.py
bitcointallkcoin/bitcointalkcoin
1c4edf2a6397531581663a9d3110a53fee87ca0b
[ "MIT" ]
null
null
null
share/rpcauth/rpcauth.py
bitcointallkcoin/bitcointalkcoin
1c4edf2a6397531581663a9d3110a53fee87ca0b
[ "MIT" ]
null
null
null
share/rpcauth/rpcauth.py
bitcointallkcoin/bitcointalkcoin
1c4edf2a6397531581663a9d3110a53fee87ca0b
[ "MIT" ]
1
2020-02-27T15:51:47.000Z
2020-02-27T15:51:47.000Z
#!/usr/bin/env python3 # Copyright (c) 2015-2018 The Talkcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from argparse import ArgumentParser from base64 import urlsafe_b64encode from binascii import hexlify fr...
33.553191
134
0.714648
from argparse import ArgumentParser from base64 import urlsafe_b64encode from binascii import hexlify from getpass import getpass from os import urandom import hmac def generate_salt(size): return hexlify(urandom(size)).decode() def generate_password(): return urlsafe_b64encode(urandom(32)).decode('utf-8') ...
true
true
f71472389ed45e2198b8808678490dfe4d7a408f
787
py
Python
script/sklearn_like_toolkit/warpper/skClf_wrapper/skMultinomial_NBClf.py
demetoir/MLtools
8c42fcd4cc71728333d9c116ade639fe57d50d37
[ "MIT" ]
null
null
null
script/sklearn_like_toolkit/warpper/skClf_wrapper/skMultinomial_NBClf.py
demetoir/MLtools
8c42fcd4cc71728333d9c116ade639fe57d50d37
[ "MIT" ]
null
null
null
script/sklearn_like_toolkit/warpper/skClf_wrapper/skMultinomial_NBClf.py
demetoir/MLtools
8c42fcd4cc71728333d9c116ade639fe57d50d37
[ "MIT" ]
null
null
null
from hyperopt import hp from sklearn.naive_bayes import MultinomialNB as _skMultinomialNB from script.sklearn_like_toolkit.warpper.base.BaseWrapperClf import BaseWrapperClf from script.sklearn_like_toolkit.warpper.base.MixIn import MetaBaseWrapperClfWithABC class skMultinomial_NBClf(BaseWrapperClf, _skMultino...
35.772727
98
0.70521
from hyperopt import hp from sklearn.naive_bayes import MultinomialNB as _skMultinomialNB from script.sklearn_like_toolkit.warpper.base.BaseWrapperClf import BaseWrapperClf from script.sklearn_like_toolkit.warpper.base.MixIn import MetaBaseWrapperClfWithABC class skMultinomial_NBClf(BaseWrapperClf, _skMultino...
true
true
f71472b726fa211be0ca1ee4ef01ed7553c09623
8,432
py
Python
pandas/tests/indexes/multi/test_formats.py
umangino/pandas
c492672699110fe711b7f76ded5828ff24bce5ab
[ "BSD-3-Clause" ]
2
2022-02-27T04:02:18.000Z
2022-03-01T03:48:47.000Z
pandas/tests/indexes/multi/test_formats.py
umangino/pandas
c492672699110fe711b7f76ded5828ff24bce5ab
[ "BSD-3-Clause" ]
1
2021-12-01T03:10:17.000Z
2021-12-23T20:27:21.000Z
pandas/tests/indexes/multi/test_formats.py
umangino/pandas
c492672699110fe711b7f76ded5828ff24bce5ab
[ "BSD-3-Clause" ]
2
2022-02-27T04:02:19.000Z
2022-03-01T03:49:21.000Z
import warnings import numpy as np import pytest import pandas as pd from pandas import ( Index, MultiIndex, ) def test_format(idx): idx.format() idx[:0].format() def test_format_integer_names(): index = MultiIndex( levels=[[0, 1], [0, 1]], codes=[[0, 0, 1, 1], [0, 1, 0, 1]], names=[0,...
36.66087
95
0.468098
import warnings import numpy as np import pytest import pandas as pd from pandas import ( Index, MultiIndex, ) def test_format(idx): idx.format() idx[:0].format() def test_format_integer_names(): index = MultiIndex( levels=[[0, 1], [0, 1]], codes=[[0, 0, 1, 1], [0, 1, 0, 1]], names=[0,...
true
true
f71474cfffbbc364e0e62d899c3954f135303af3
8,393
py
Python
included_dependencies/cloudscraper/interpreters/native.py
AlexRiina/FanFicFare
2cd6f53f766e74052c6ca7ab5c2eabff24f59742
[ "Apache-2.0" ]
82
2020-03-28T02:24:38.000Z
2022-03-30T04:18:42.000Z
included_dependencies/cloudscraper/interpreters/native.py
AlexRiina/FanFicFare
2cd6f53f766e74052c6ca7ab5c2eabff24f59742
[ "Apache-2.0" ]
118
2020-03-14T17:34:11.000Z
2022-03-30T07:07:45.000Z
included_dependencies/cloudscraper/interpreters/native.py
AlexRiina/FanFicFare
2cd6f53f766e74052c6ca7ab5c2eabff24f59742
[ "Apache-2.0" ]
30
2020-06-20T15:31:53.000Z
2022-03-06T06:23:55.000Z
from __future__ import absolute_import import ast import re import operator as op import pyparsing from ..exceptions import CloudflareSolveError from . import JavaScriptInterpreter # ------------------------------------------------------------------------------- # _OP_MAP = { ast.Add: op.add, ast.Sub: op.su...
35.867521
124
0.398546
from __future__ import absolute_import import ast import re import operator as op import pyparsing from ..exceptions import CloudflareSolveError from . import JavaScriptInterpreter _OP_MAP = { ast.Add: op.add, ast.Sub: op.sub, ast.Mult: op.mul, ast.Div: op.truediv, ast.Invert: op.neg, } class...
true
true
f714758643422dfaacbc46a0e387395c3f0c97c1
10,009
py
Python
src/lambda_codebase/initial_commit/bootstrap_repository/adf-build/shared/schema_validation.py
StewartW/aws-deployment-framework
7511241664c946ce3b045db211a4931b1dbaac6d
[ "Apache-2.0" ]
1
2021-11-28T09:27:16.000Z
2021-11-28T09:27:16.000Z
src/lambda_codebase/initial_commit/bootstrap_repository/adf-build/shared/schema_validation.py
StewartW/aws-deployment-framework
7511241664c946ce3b045db211a4931b1dbaac6d
[ "Apache-2.0" ]
null
null
null
src/lambda_codebase/initial_commit/bootstrap_repository/adf-build/shared/schema_validation.py
StewartW/aws-deployment-framework
7511241664c946ce3b045db211a4931b1dbaac6d
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: MIT-0 """ Schema Validation for Deployment map files """ from schema import Schema, And, Use, Or, Optional, Regex from logger import configure_logger LOGGER = configure_logger(__name__) NOTIFICATION_PROPS = { Op...
28.194366
172
0.654911
from schema import Schema, And, Use, Or, Optional, Regex from logger import configure_logger LOGGER = configure_logger(__name__) NOTIFICATION_PROPS = { Optional("target"): str, Optional("type") : Or("lambda", "chat_bot") } PARAM_SCHEMA = { Optional("notification_endpoint"): Or(str, NOTIFICATION_PROPS),...
true
true
f71475d212b144b5142445b5a0db415640369fb9
23
py
Python
instance/config.py
randilfernando/bot
a193c557a9ce3d9bc9d542e29e50f3077ba716df
[ "MIT" ]
null
null
null
instance/config.py
randilfernando/bot
a193c557a9ce3d9bc9d542e29e50f3077ba716df
[ "MIT" ]
3
2020-04-15T16:06:19.000Z
2020-04-15T16:07:49.000Z
instance/config.py
randilfernando/bot
a193c557a9ce3d9bc9d542e29e50f3077ba716df
[ "MIT" ]
1
2021-01-27T10:32:47.000Z
2021-01-27T10:32:47.000Z
INTENT_THRESHOLD = 0.5
11.5
22
0.782609
INTENT_THRESHOLD = 0.5
true
true
f7147793a2e6c2dd68fdd7d5efb9db0e5d179701
14,417
py
Python
mi/dataset/dataset_parser.py
rmanoni/mi-dataset
c1012a0cd8f2ea075e008cdd1ab291ed54f44d43
[ "BSD-2-Clause" ]
null
null
null
mi/dataset/dataset_parser.py
rmanoni/mi-dataset
c1012a0cd8f2ea075e008cdd1ab291ed54f44d43
[ "BSD-2-Clause" ]
null
null
null
mi/dataset/dataset_parser.py
rmanoni/mi-dataset
c1012a0cd8f2ea075e008cdd1ab291ed54f44d43
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python """ @package mi.dataset.parser A collection of parsers that strip data blocks out of files and feed them into the system. @file mi/dataset/parser.py @author Steve Foley @brief Base classes for data set agent parsers """ __author__ = 'Steve Foley' __license__ = 'Apache 2.0' import time import nt...
43.820669
119
0.634667
__author__ = 'Steve Foley' __license__ = 'Apache 2.0' import time import ntplib from mi.core.log import get_logger log = get_logger() from mi.core.instrument.chunker import StringChunker from mi.core.instrument.data_particle import DataParticleKey from mi.core.exceptions import RecoverableSampleException, SampleEnc...
true
true
f7147794bdcdc9985403994d39b45297ef13f697
4,281
py
Python
python/algo_mdo_tit_for_2_tat.py
Mark-MDO47/PrisonDilemmaTourney
8be7127c2c8b506429031dc1b9a2e441370307f4
[ "Unlicense" ]
null
null
null
python/algo_mdo_tit_for_2_tat.py
Mark-MDO47/PrisonDilemmaTourney
8be7127c2c8b506429031dc1b9a2e441370307f4
[ "Unlicense" ]
null
null
null
python/algo_mdo_tit_for_2_tat.py
Mark-MDO47/PrisonDilemmaTourney
8be7127c2c8b506429031dc1b9a2e441370307f4
[ "Unlicense" ]
null
null
null
# Author: Mark Olson 2021-11-06 https://github.com/Mark-MDO47/PrisonDilemmaTourney # # algo_mdo_tit_for_2_tat.py - Prisoner's Dilemma tournament algorithm file # # The algo_mdo_tit_for_2_tat algorithm behaves as follows: # On the first two moves it returns choices.COOPERATE # On all subsequent moves: # if t...
57.08
122
0.749825
# # The algo_mdo_tit_for_2_tat algorithm behaves as follows: # On the first two moves it returns choices.COOPERATE # On all subsequent moves: # if the opponent did choices.DEFECT within the last two moves, it returns choices.DEFECT this move # else it returns choices.COOPERATE this move # # For an alg...
true
true
f714788157a6abe32fba2b5d294f2ebd1935e271
93
py
Python
app/config.py
SilentFan/EvenThing
b32054a3c9b53d8dfbdc6a808ff9d00d88d1c876
[ "MIT" ]
null
null
null
app/config.py
SilentFan/EvenThing
b32054a3c9b53d8dfbdc6a808ff9d00d88d1c876
[ "MIT" ]
1
2015-10-23T14:43:09.000Z
2015-10-23T14:43:09.000Z
app/config.py
SilentFan/EvenThing
b32054a3c9b53d8dfbdc6a808ff9d00d88d1c876
[ "MIT" ]
null
null
null
__author__ = 'meli' HOST = '0.0.0.0' STATIC_PATH = "../static" TEPLATE_PATH = "../templates"
18.6
29
0.645161
__author__ = 'meli' HOST = '0.0.0.0' STATIC_PATH = "../static" TEPLATE_PATH = "../templates"
true
true
f71478bc18c79e2a61aca2351a0f0fe624d2d8a9
1,514
py
Python
cephprimarystorage/cephprimarystorage/cdaemon.py
wh872743880/zstack-utility
e8ba863514a62a2e5ede6ed27dd50e4307086ce7
[ "Apache-2.0" ]
null
null
null
cephprimarystorage/cephprimarystorage/cdaemon.py
wh872743880/zstack-utility
e8ba863514a62a2e5ede6ed27dd50e4307086ce7
[ "Apache-2.0" ]
null
null
null
cephprimarystorage/cephprimarystorage/cdaemon.py
wh872743880/zstack-utility
e8ba863514a62a2e5ede6ed27dd50e4307086ce7
[ "Apache-2.0" ]
null
null
null
''' @author: frank ''' import sys, os, os.path from zstacklib.utils import log from zstacklib.utils import linux import zstacklib.utils.iptables as iptables pidfile = '/var/run/zstack/ceph-primarystorage.pid' log.configure_log('/var/log/zstack/ceph-primarystorage.log') logger = log.get_logger(__name__) import cephage...
28.566038
106
0.632761
''' @author: frank ''' import sys, os, os.path from zstacklib.utils import log from zstacklib.utils import linux import zstacklib.utils.iptables as iptables pidfile = '/var/run/zstack/ceph-primarystorage.pid' log.configure_log('/var/log/zstack/ceph-primarystorage.log') logger = log.get_logger(__name__) import cephage...
false
true
f7147b09abce445b07986e1ce4221073dcb14461
2,384
py
Python
dynd/nd/test/test_functional.py
mwiebe/dynd-python
45ffecaf7887761a5634140f0ed120b33ace58a3
[ "BSD-2-Clause" ]
93
2015-01-29T14:00:57.000Z
2021-11-23T14:37:27.000Z
dynd/nd/test/test_functional.py
ContinuumIO/dynd-python
bae7afb8eb604b0bce09befc9e896c8ec8357aaa
[ "BSD-2-Clause" ]
143
2015-01-04T12:30:24.000Z
2016-09-29T18:36:22.000Z
dynd/nd/test/test_functional.py
ContinuumIO/dynd-python
bae7afb8eb604b0bce09befc9e896c8ec8357aaa
[ "BSD-2-Clause" ]
20
2015-06-08T11:54:46.000Z
2021-03-09T07:57:25.000Z
import sys if sys.version_info >= (2, 7): import unittest else: import unittest2 as unittest from dynd import annotate, nd, ndt @unittest.skip('Test disabled since callables were reworked') class TestApply(unittest.TestCase): def test_object(self): @nd.functional.apply(jit = False) def f(x...
25.361702
70
0.588926
import sys if sys.version_info >= (2, 7): import unittest else: import unittest2 as unittest from dynd import annotate, nd, ndt @unittest.skip('Test disabled since callables were reworked') class TestApply(unittest.TestCase): def test_object(self): @nd.functional.apply(jit = False) def f(x...
true
true
f7147bee2514ba0ec8ce68a3df5e77e31205a226
214
py
Python
test.py
BlackPhoenixSlo/vislice
48fc9160bd857656cd383c7dd0e562bfae5ebf3a
[ "MIT" ]
null
null
null
test.py
BlackPhoenixSlo/vislice
48fc9160bd857656cd383c7dd0e562bfae5ebf3a
[ "MIT" ]
null
null
null
test.py
BlackPhoenixSlo/vislice
48fc9160bd857656cd383c7dd0e562bfae5ebf3a
[ "MIT" ]
null
null
null
import math def pra(n): for i in range (2,(int)(math.sqrt(n))): if (n%i==0): return False return True def izpisi(): for i in range (2,200): if (pra(i)): print(i)
19.454545
43
0.481308
import math def pra(n): for i in range (2,(int)(math.sqrt(n))): if (n%i==0): return False return True def izpisi(): for i in range (2,200): if (pra(i)): print(i)
true
true
f7147c16c55d6759428fde88ad86145632dfa7ae
5,378
py
Python
backend/app/literature/crud/cross_reference_crud.py
alliance-genome/agr_literature_service
2278316422d5c3ab65e21bb97d91e861e48853c5
[ "MIT" ]
null
null
null
backend/app/literature/crud/cross_reference_crud.py
alliance-genome/agr_literature_service
2278316422d5c3ab65e21bb97d91e861e48853c5
[ "MIT" ]
39
2021-10-18T17:02:49.000Z
2022-03-28T20:56:24.000Z
backend/app/literature/crud/cross_reference_crud.py
alliance-genome/agr_literature_service
2278316422d5c3ab65e21bb97d91e861e48853c5
[ "MIT" ]
1
2021-10-21T00:11:18.000Z
2021-10-21T00:11:18.000Z
from sqlalchemy.orm import Session from datetime import datetime from fastapi import HTTPException from fastapi import status from fastapi.encoders import jsonable_encoder from literature.schemas import CrossReferenceSchema from literature.schemas import CrossReferenceSchemaUpdate from literature.models import Cross...
42.015625
170
0.697285
from sqlalchemy.orm import Session from datetime import datetime from fastapi import HTTPException from fastapi import status from fastapi.encoders import jsonable_encoder from literature.schemas import CrossReferenceSchema from literature.schemas import CrossReferenceSchemaUpdate from literature.models import Cross...
true
true
f7147c364dc2a6ceaf51a2404c99136f6f4bc427
3,123
py
Python
tensorflow_graphics/nn/metric/tests/fscore_test.py
jackd/graphics
736b99a3306e302674a9b7599e3e2857b85fdb74
[ "Apache-2.0" ]
null
null
null
tensorflow_graphics/nn/metric/tests/fscore_test.py
jackd/graphics
736b99a3306e302674a9b7599e3e2857b85fdb74
[ "Apache-2.0" ]
null
null
null
tensorflow_graphics/nn/metric/tests/fscore_test.py
jackd/graphics
736b99a3306e302674a9b7599e3e2857b85fdb74
[ "Apache-2.0" ]
1
2020-04-11T10:37:36.000Z
2020-04-11T10:37:36.000Z
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
34.7
80
0.707973
from __future__ import absolute_import from __future__ import division from __future__ import print_function from absl.testing import parameterized import numpy as np from tensorflow_graphics.nn.metric import fscore from tensorflow_graphics.nn.metric import precision from tensorflow_graphics.nn.metric import recall ...
true
true
f7147c381b59f0fc0e28d456483711cc73e3d0d7
10,454
py
Python
stylegan2/run_training.py
arita37/pic-recon
703f80eb6d191f68441ce71bc0f388556cb3e1bc
[ "MIT" ]
8
2021-06-16T20:04:27.000Z
2021-12-17T18:57:37.000Z
stylegan2/run_training.py
comp-imaging-sci/pic-recon
703f80eb6d191f68441ce71bc0f388556cb3e1bc
[ "MIT" ]
null
null
null
stylegan2/run_training.py
comp-imaging-sci/pic-recon
703f80eb6d191f68441ce71bc0f388556cb3e1bc
[ "MIT" ]
2
2021-06-19T18:00:58.000Z
2021-07-14T05:08:16.000Z
# Copyright (c) 2019, NVIDIA Corporation. All rights reserved. # # This work is made available under the Nvidia Source Code License-NC. # To view a copy of this license, visit # https://nvlabs.github.io/stylegan2/license.html # # Modified my Varun A. Kelkar - vak2@illinois.edu import argparse import copy import os imp...
42.323887
153
0.621772
import argparse import copy import os import sys import dnnlib from dnnlib import EasyDict from metrics.metric_defaults import metric_defaults _valid_configs = [ 'config-a', 'config-b', 'config-c', 'config-d', 'config-e', 'config-f', 'config-g', 'config-h', 'config-i', '...
true
true
f7147c4f2008f9ebc6684280d9bd9c43be116fb6
1,759
py
Python
application/commonApp/markdown_it_extensions.py
Marcelotsvaz/vaz-projects
8ccc0bf8d25f9276714e1e5ecb0a4e80f07442b4
[ "Unlicense" ]
null
null
null
application/commonApp/markdown_it_extensions.py
Marcelotsvaz/vaz-projects
8ccc0bf8d25f9276714e1e5ecb0a4e80f07442b4
[ "Unlicense" ]
null
null
null
application/commonApp/markdown_it_extensions.py
Marcelotsvaz/vaz-projects
8ccc0bf8d25f9276714e1e5ecb0a4e80f07442b4
[ "Unlicense" ]
null
null
null
# # VAZ Projects # # # Author: Marcelo Tellier Sartori Vaz <marcelotsvaz@gmail.com> from functools import partial import re from django.template import loader def linkAttributes( self, tokens, index, options, env ): ''' Add target and rel attributes to links. ''' tokens[index].attrSet( 'rel', 'noopener'...
22.551282
84
0.683911
from functools import partial import re from django.template import loader def linkAttributes( self, tokens, index, options, env ): tokens[index].attrSet( 'rel', 'noopener' ) return self.renderToken( tokens, index, options, env ) def imageGalleryPlugin( md, markdownImages ): md.block.ruler.before( '...
true
true
f7147f6d980b3546daeecc96d4d8fba4b04a0b48
14,109
py
Python
src/src/create_tf_record.py
zhaodi-Wen/Child_skin_disease_detect
e95045341e8c27161eebb2c9c3b68026a4ea247b
[ "Apache-2.0" ]
null
null
null
src/src/create_tf_record.py
zhaodi-Wen/Child_skin_disease_detect
e95045341e8c27161eebb2c9c3b68026a4ea247b
[ "Apache-2.0" ]
null
null
null
src/src/create_tf_record.py
zhaodi-Wen/Child_skin_disease_detect
e95045341e8c27161eebb2c9c3b68026a4ea247b
[ "Apache-2.0" ]
null
null
null
# -*-coding: utf-8 -*- """ @Project: create_tfrecord @File : create_tfrecord.py @Author : panjq @E-mail : pan_jinquan@163.com @Date : 2018-07-27 17:19:54 @desc : 将图片数据保存为单个tfrecord文件 """ ########################################################################## import tensorflow as tf im...
35.628788
120
0.633851
import tensorflow as tf import numpy as np import os import cv2 import matplotlib.pyplot as plt import random from PIL import Image os.environ["CUDA_VISIBLE_DEVICES"] = "1" train_path = './train_new/img' test_path = './test_new/img' list = set(os.listdir(test_path)) classes=sorted(list,key=str.lower) print(classes) ...
true
true
f7147ffd89ad00e230016e38b0ea2a521df527ea
558
py
Python
tests/test_trend_locations.py
chewett/TrendAnalyser
62a13efa9b9d78449535e791b1932cf3fd60f2a6
[ "MIT" ]
null
null
null
tests/test_trend_locations.py
chewett/TrendAnalyser
62a13efa9b9d78449535e791b1932cf3fd60f2a6
[ "MIT" ]
null
null
null
tests/test_trend_locations.py
chewett/TrendAnalyser
62a13efa9b9d78449535e791b1932cf3fd60f2a6
[ "MIT" ]
1
2020-10-26T15:14:10.000Z
2020-10-26T15:14:10.000Z
import json from TwitterAPI import TwitterAPI from time import gmtime, strftime def load_conf(): conf = json.load(open("../conf.json")) return conf def get_api(): conf = load_conf() det_file = open(conf['twitter_key_location']) det = json.load(det_file) api = TwitterAPI(det['consumer_key'], ...
19.241379
49
0.614695
import json from TwitterAPI import TwitterAPI from time import gmtime, strftime def load_conf(): conf = json.load(open("../conf.json")) return conf def get_api(): conf = load_conf() det_file = open(conf['twitter_key_location']) det = json.load(det_file) api = TwitterAPI(det['consumer_key'], ...
false
true
f714815478b554b66febb336cf04f3a3d3a923e6
10,162
py
Python
melodic/lib/python2.7/dist-packages/geographic_msgs/msg/_RouteSegment.py
Dieptranivsr/Ros_Diep
d790e75e6f5da916701b11a2fdf3e03b6a47086b
[ "MIT" ]
null
null
null
melodic/lib/python2.7/dist-packages/geographic_msgs/msg/_RouteSegment.py
Dieptranivsr/Ros_Diep
d790e75e6f5da916701b11a2fdf3e03b6a47086b
[ "MIT" ]
1
2021-07-08T10:26:06.000Z
2021-07-08T10:31:11.000Z
melodic/lib/python2.7/dist-packages/geographic_msgs/msg/_RouteSegment.py
Dieptranivsr/Ros_Diep
d790e75e6f5da916701b11a2fdf3e03b6a47086b
[ "MIT" ]
null
null
null
# This Python file uses the following encoding: utf-8 """autogenerated by genpy from geographic_msgs/RouteSegment.msg. Do not edit.""" import codecs import sys python3 = True if sys.hexversion > 0x03000000 else False import genpy import struct import geographic_msgs.msg import uuid_msgs.msg class RouteSegment(genpy.M...
33.986622
145
0.605688
import codecs import sys python3 = True if sys.hexversion > 0x03000000 else False import genpy import struct import geographic_msgs.msg import uuid_msgs.msg class RouteSegment(genpy.Message): _md5sum = "8583d1e2ddf1891c3934a5d2ed9a799c" _type = "geographic_msgs/RouteSegment" _has_header = False _full_text = ...
true
true
f7148181728209c0820ba3d6bb65094941aa250a
4,393
py
Python
fairseq/tasks/__init__.py
HYUNMIN-HWANG/fairseq
8094376456f586f119ffe5b83d7af5979066197d
[ "MIT" ]
null
null
null
fairseq/tasks/__init__.py
HYUNMIN-HWANG/fairseq
8094376456f586f119ffe5b83d7af5979066197d
[ "MIT" ]
null
null
null
fairseq/tasks/__init__.py
HYUNMIN-HWANG/fairseq
8094376456f586f119ffe5b83d7af5979066197d
[ "MIT" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """isort:skip_file""" import argparse import importlib import os from fairseq.dataclass import FairseqDataclass from fairseq.dataclass.utils ...
31.833333
153
0.619622
import argparse import importlib import os from fairseq.dataclass import FairseqDataclass from fairseq.dataclass.utils import merge_with_parent from hydra.core.config_store import ConfigStore from .fairseq_task import FairseqTask, LegacyFairseqTask TASK_DATACLASS_REGISTRY = {} TASK_REGISTRY = {} TASK_CLASS_NAMES ...
true
true
f71482183f909628cf759af5837725bdda0f8c43
2,686
py
Python
py/phl/phlsys_workingdircommand__t.py
aevri/phabricator-tools
ef7501bcaee83e98d168d16f64b3f73e744d3336
[ "Apache-2.0" ]
150
2015-01-21T15:52:22.000Z
2021-11-09T05:53:36.000Z
py/phl/phlsys_workingdircommand__t.py
aevri/phabricator-tools
ef7501bcaee83e98d168d16f64b3f73e744d3336
[ "Apache-2.0" ]
72
2015-05-08T04:33:08.000Z
2017-01-27T09:37:36.000Z
py/phl/phlsys_workingdircommand__t.py
aevri/phabricator-tools
ef7501bcaee83e98d168d16f64b3f73e744d3336
[ "Apache-2.0" ]
38
2015-01-30T10:33:47.000Z
2021-11-09T05:53:30.000Z
"""Test suite for phlsys_workingdircommand.""" # ============================================================================= # TEST PLAN # ----------------------------------------------------------------------------- # Here we detail the things we are concerned to test and specify wh...
34.883117
79
0.57446
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import stat import tempfile import unittest import phlsys_fs import phlsys_workingdircommand _PYCAT_COMMAND = """ #! /bin/sh echo "Hello $1!" """ .lstrip() class Test(unittest.TestCase): de...
true
true
f7148301c9b51fcf16d83d7b786a76b3a79b2e1f
31,201
py
Python
wifiphisher/tests/test_deauth.py
burakbozdag/wifiphisher-docker
e5f373f63786c1a6cfeed4e9f5b00d0f986ade58
[ "Apache-2.0" ]
3
2020-09-04T14:54:30.000Z
2022-03-24T19:09:48.000Z
wifiphisher/tests/test_deauth.py
burakbozdag/wifiphisher-docker
e5f373f63786c1a6cfeed4e9f5b00d0f986ade58
[ "Apache-2.0" ]
null
null
null
wifiphisher/tests/test_deauth.py
burakbozdag/wifiphisher-docker
e5f373f63786c1a6cfeed4e9f5b00d0f986ade58
[ "Apache-2.0" ]
1
2020-12-26T20:11:22.000Z
2020-12-26T20:11:22.000Z
# pylint: skip-file """ This module tests the deauth module in extensions """ import collections import unittest from collections import defaultdict import mock import scapy.layers.dot11 as dot11 import wifiphisher.common.constants as constants import wifiphisher.extensions.deauth as deauth class TestDeauth(unittest...
36.154114
101
0.639659
import collections import unittest from collections import defaultdict import mock import scapy.layers.dot11 as dot11 import wifiphisher.common.constants as constants import wifiphisher.extensions.deauth as deauth class TestDeauth(unittest.TestCase): def setUp(self): essid = dot11.Dot11Elt(ID='SSID', i...
true
true
f71483250f4208d1d6c47fbd42c29ab271f6db11
24
py
Python
tests/applicationinsights_tests/exception_tests/__init__.py
Rebeccalau/ApplicationInsights-Python
cc91fede2d6d6c48acaa5687aa13ca491a17025a
[ "MIT" ]
89
2015-05-06T22:02:17.000Z
2019-04-22T14:50:33.000Z
tests/applicationinsights_tests/exception_tests/__init__.py
Rebeccalau/ApplicationInsights-Python
cc91fede2d6d6c48acaa5687aa13ca491a17025a
[ "MIT" ]
115
2015-04-29T17:44:52.000Z
2019-04-25T21:39:02.000Z
tests/applicationinsights_tests/exception_tests/__init__.py
Rebeccalau/ApplicationInsights-Python
cc91fede2d6d6c48acaa5687aa13ca491a17025a
[ "MIT" ]
59
2015-04-19T13:34:52.000Z
2019-04-25T21:04:02.000Z
from . import TestEnable
24
24
0.833333
from . import TestEnable
true
true
f71483376b99d2de664991b4779d8b43020d054e
888
py
Python
from_3b1b/on_hold/eop/reusables/eop_helpers.py
Tarang74/manim
df34d6fc0470916cfba63534b023addb69cdec9a
[ "MIT" ]
1
2021-03-26T08:23:35.000Z
2021-03-26T08:23:35.000Z
from_3b1b/on_hold/eop/reusables/eop_helpers.py
Tarang74/manim
df34d6fc0470916cfba63534b023addb69cdec9a
[ "MIT" ]
null
null
null
from_3b1b/on_hold/eop/reusables/eop_helpers.py
Tarang74/manim
df34d6fc0470916cfba63534b023addb69cdec9a
[ "MIT" ]
null
null
null
from utils.color import * from active_projects.eop.reusables.eop_constants import * def binary(i): # returns an array of 0s and 1s if i == 0: return [] j = i binary_array = [] while j > 0: jj = j / 2 if jj > 0: binary_array.append(j % 2) else: ...
21.658537
72
0.574324
from utils.color import * from active_projects.eop.reusables.eop_constants import * def binary(i): if i == 0: return [] j = i binary_array = [] while j > 0: jj = j / 2 if jj > 0: binary_array.append(j % 2) else: binary_array.append(1) ...
true
true
f714837c409dd8d89eb62bb58f903782ce4acb43
5,005
py
Python
infomercial/exp/softmeta_bandit.py
CoAxLab/infomercial
fa5d1c1e5c1351735dda2961a2a94f71cd17e270
[ "MIT" ]
4
2019-11-14T03:13:25.000Z
2021-01-04T17:30:23.000Z
infomercial/exp/softmeta_bandit.py
CoAxLab/infomercial
fa5d1c1e5c1351735dda2961a2a94f71cd17e270
[ "MIT" ]
null
null
null
infomercial/exp/softmeta_bandit.py
CoAxLab/infomercial
fa5d1c1e5c1351735dda2961a2a94f71cd17e270
[ "MIT" ]
null
null
null
import os import fire import gym import numpy as np from scipy.special import softmax from noboard.csv import SummaryWriter from copy import deepcopy from scipy.stats import entropy from collections import OrderedDict from infomercial.distance import kl from infomercial.memory import DiscreteDistribution from infom...
29.441176
78
0.624575
import os import fire import gym import numpy as np from scipy.special import softmax from noboard.csv import SummaryWriter from copy import deepcopy from scipy.stats import entropy from collections import OrderedDict from infomercial.distance import kl from infomercial.memory import DiscreteDistribution from infom...
true
true
f71483e95b29a8c96562e9039fa444d6ed47f2af
680
py
Python
powerdnsadmin/default_config.py
hivelocity/PowerDNS-Admin
0c9ccf0a7e75817d77fcbfabba58ad2c66c04afa
[ "MIT" ]
null
null
null
powerdnsadmin/default_config.py
hivelocity/PowerDNS-Admin
0c9ccf0a7e75817d77fcbfabba58ad2c66c04afa
[ "MIT" ]
null
null
null
powerdnsadmin/default_config.py
hivelocity/PowerDNS-Admin
0c9ccf0a7e75817d77fcbfabba58ad2c66c04afa
[ "MIT" ]
null
null
null
import os basedir = os.path.abspath(os.path.abspath(os.path.dirname(__file__))) ### BASIC APP CONFIG SALT = '$2b$12$yLUMTIfl21FKJQpTkRQXCu' SECRET_KEY = 'e951e5a1f4b94151b360f47edf596dd2' BIND_ADDRESS = '0.0.0.0' PORT = 9191 HSTS_ENABLED = False ### DATABASE CONFIG SQLA_DB_USER = 'pdns' #SQLA_DB_PASSWORD = 'changeme'...
26.153846
105
0.744118
import os basedir = os.path.abspath(os.path.abspath(os.path.dirname(__file__))) SALT = '$2b$12$yLUMTIfl21FKJQpTkRQXCu' SECRET_KEY = 'e951e5a1f4b94151b360f47edf596dd2' BIND_ADDRESS = '0.0.0.0' PORT = 9191 HSTS_ENABLED = False SQLA_DB_USER = 'pdns' SQLA_DB_HOST = '10.42.42.204' SQLA_DB_NAME = 'pdns' SQLALCHEMY_TRACK_MO...
true
true
f714845eb007f7f56466665f162e3ab47ac7470a
23,375
py
Python
tests/test_chargen.py
jderam/hyperborea3
c9a7aced16793f501f9befae15a47b07a8451edc
[ "MIT" ]
2
2022-01-07T22:53:19.000Z
2022-02-01T07:46:13.000Z
tests/test_chargen.py
jderam/hyperborea-tools
c9a7aced16793f501f9befae15a47b07a8451edc
[ "MIT" ]
60
2021-12-29T04:57:27.000Z
2022-02-12T09:50:55.000Z
tests/test_chargen.py
jderam/hyperborea-tools
c9a7aced16793f501f9befae15a47b07a8451edc
[ "MIT" ]
null
null
null
import pytest from hyperborea3.chargen import ( DBPATH, ac_to_aac, calculate_ac, class_id_to_name, get_alignment, get_attr, get_attr_mod, get_caster_schools, get_class_id_map, get_class_level_data, get_combat_matrix, get_deity, get_favoured_weapons, get_gender, ...
30.47588
88
0.515722
import pytest from hyperborea3.chargen import ( DBPATH, ac_to_aac, calculate_ac, class_id_to_name, get_alignment, get_attr, get_attr_mod, get_caster_schools, get_class_id_map, get_class_level_data, get_combat_matrix, get_deity, get_favoured_weapons, get_gender, ...
true
true
f71484d9b44030ff88de3d344a897e3b616df745
3,140
py
Python
4_forthproject/forthproject/settings.py
merry-hyelyn/LIKE_LION
26d6642a88d5c075447c60d43a70a7d0f082fb07
[ "MIT" ]
null
null
null
4_forthproject/forthproject/settings.py
merry-hyelyn/LIKE_LION
26d6642a88d5c075447c60d43a70a7d0f082fb07
[ "MIT" ]
null
null
null
4_forthproject/forthproject/settings.py
merry-hyelyn/LIKE_LION
26d6642a88d5c075447c60d43a70a7d0f082fb07
[ "MIT" ]
null
null
null
""" Django settings for forthproject project. Generated by 'django-admin startproject' using Django 2.1.8. For more information on this file, see https://docs.djangoproject.com/en/2.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.1/ref/settings/ """ import ...
25.737705
91
0.698726
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = '8sjx*ixqizq%)vswdwn82p(w8en&cknd@dey%8h7ex@e&bqx_4' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes...
true
true
f71485e72b788fa273c442546c715e7aa086321c
8,018
py
Python
gasex/diff.py
dnicholson/gasex-python
53b8c3ff4e64e724d8883bdef299d465621b124f
[ "MIT" ]
1
2019-04-06T17:52:30.000Z
2019-04-06T17:52:30.000Z
gasex/diff.py
dnicholson/gasex-python
53b8c3ff4e64e724d8883bdef299d465621b124f
[ "MIT" ]
null
null
null
gasex/diff.py
dnicholson/gasex-python
53b8c3ff4e64e724d8883bdef299d465621b124f
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ % Diffusion coeff and Schmidt number for gases in fresh/sea water %========================================================================= % Modified by D. Nicholson from MATLAB gas_diffusion Version 2.0 16 July 2013 % Author: Roberta C. Hamme (University of...
43.814208
99
0.607383
from __future__ import division import numpy as np from numpy.polynomial.polynomial import polyval from ._utilities import match_args_return from gasex.phys import R as R from gasex.phys import visc as visc GAS_LIST = ('HE','NE','AR','KR','XE','N2','O2','CH4','N2','CO2') @match_args_return def diff(SP,pt,*,gas=None...
true
true
f7148669ff553acc8e2aab92e20c57cfaa89f4d4
952
py
Python
testing/functional_tests/test_convert_to_onnx.py
cakester/ivadomed
321a91c7e3c82e6296764895e39695b04a80c8af
[ "MIT" ]
null
null
null
testing/functional_tests/test_convert_to_onnx.py
cakester/ivadomed
321a91c7e3c82e6296764895e39695b04a80c8af
[ "MIT" ]
6
2021-03-24T16:23:29.000Z
2021-04-08T15:22:53.000Z
testing/functional_tests/test_convert_to_onnx.py
cakester/ivadomed
321a91c7e3c82e6296764895e39695b04a80c8af
[ "MIT" ]
null
null
null
import logging import pytest import os from functional_tests.t_utils import remove_tmp_dir, create_tmp_dir, __data_testing_dir__ from ivadomed.scripts import convert_to_onnx from ivadomed.utils import ArgParseException logger = logging.getLogger(__name__) __model_path__ = os.path.join(__data_testing_dir__, 'spinegener...
28.848485
89
0.765756
import logging import pytest import os from functional_tests.t_utils import remove_tmp_dir, create_tmp_dir, __data_testing_dir__ from ivadomed.scripts import convert_to_onnx from ivadomed.utils import ArgParseException logger = logging.getLogger(__name__) __model_path__ = os.path.join(__data_testing_dir__, 'spinegener...
true
true
f714889560de33dc5cf5c279055a50f15365c010
6,460
py
Python
courses/machine_learning/deepdive/05_artandscience/simplernn/trainer/model.py
alixhami/training-data-analyst
826a9270e784a64ea3bd62c34689518280df71a8
[ "Apache-2.0" ]
1
2019-02-12T21:40:03.000Z
2019-02-12T21:40:03.000Z
courses/machine_learning/deepdive/05_artandscience/simplernn/trainer/model.py
alixhami/training-data-analyst
826a9270e784a64ea3bd62c34689518280df71a8
[ "Apache-2.0" ]
11
2020-01-28T22:39:44.000Z
2022-03-11T23:42:53.000Z
courses/machine_learning/deepdive/05_artandscience/simplernn/trainer/model.py
vega42/GoogleCloudPlatform-training-data-analyst
3eb60cb6c8b55fd7f38414c1082da36b8e62558e
[ "Apache-2.0" ]
1
2021-01-15T10:20:27.000Z
2021-01-15T10:20:27.000Z
#!/usr/bin/env python3 # Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
39.151515
112
0.657276
import tensorflow as tf import tensorflow.contrib.metrics as metrics import tensorflow.contrib.rnn as rnn tf.logging.set_verbosity(tf.logging.INFO) SEQ_LEN = 10 DEFAULTS = [[0.0] for x in range(0, SEQ_LEN)] BATCH_SIZE = 20 TIMESERIES_INPUT_LAYER = 'rawdata' TIMESERIES_COL = '{}_input'.format(TIMESERIES_INPUT_LAYER)...
true
true
f71488cdf51ba686efdcf99b240b487d5d66ed67
16,474
py
Python
env/lib/python2.7/site-packages/pip/cmdoptions.py
lindamar/ecclesi
cad07fc78daf6facd1b74cc1cb1872aaf4771fa2
[ "MIT" ]
168
2015-05-29T13:56:01.000Z
2022-02-17T07:38:17.000Z
env/lib/python2.7/site-packages/pip/cmdoptions.py
lindamar/ecclesi
cad07fc78daf6facd1b74cc1cb1872aaf4771fa2
[ "MIT" ]
3,243
2017-02-07T15:30:01.000Z
2022-03-31T16:42:19.000Z
env/lib/python2.7/site-packages/pip/cmdoptions.py
lindamar/ecclesi
cad07fc78daf6facd1b74cc1cb1872aaf4771fa2
[ "MIT" ]
210
2017-09-01T00:10:08.000Z
2022-03-19T18:05:12.000Z
""" shared options and groups The principle here is to define options once, but *not* instantiate them globally. One reason being that options with action='append' can carry state between parses. pip parses general options twice internally, and shouldn't pass on state. To be consistent, all options will follow this de...
25.984227
79
0.622253
from __future__ import absolute_import from functools import partial from optparse import OptionGroup, SUPPRESS_HELP, Option import warnings from pip.index import ( FormatControl, fmt_ctl_handle_mutual_exclude, fmt_ctl_no_binary, fmt_ctl_no_use_wheel) from pip.models import PyPI from pip.locations import USER...
true
true
f71489253e48c8415077de99962ccba5eff495e5
962
py
Python
xmrig_exporter/exporter.py
leonardochaia/xmrig_exporter
56cb4a6f4b4a4df3f972fe20478269f79d6da34f
[ "MIT" ]
2
2019-09-19T00:15:20.000Z
2021-06-25T19:35:03.000Z
xmrig_exporter/exporter.py
leonardochaia/xmrig_exporter
56cb4a6f4b4a4df3f972fe20478269f79d6da34f
[ "MIT" ]
1
2019-09-19T02:29:34.000Z
2019-09-19T02:41:45.000Z
xmrig_exporter/exporter.py
leonardochaia/xmrig_exporter
56cb4a6f4b4a4df3f972fe20478269f79d6da34f
[ "MIT" ]
2
2019-09-19T01:36:19.000Z
2021-04-13T01:29:13.000Z
import argparse import http.server import logging import sys import prometheus_client import xmrig_exporter def main(): parser = argparse.ArgumentParser("Xmrig Exporter") parser.add_argument("--port", type=int, default=9189) parser.add_argument("--bind_address", default="0.0.0.0") parser.add_argume...
25.315789
73
0.702703
import argparse import http.server import logging import sys import prometheus_client import xmrig_exporter def main(): parser = argparse.ArgumentParser("Xmrig Exporter") parser.add_argument("--port", type=int, default=9189) parser.add_argument("--bind_address", default="0.0.0.0") parser.add_argume...
true
true
f714898b0c1aae3362b96ae223d64cae5cb39b1a
442
py
Python
run_search_goods.py
nikolay-py/product_optimizer
3d7da484984e63791849ce8a12b285a1ba2daacf
[ "MIT" ]
null
null
null
run_search_goods.py
nikolay-py/product_optimizer
3d7da484984e63791849ce8a12b285a1ba2daacf
[ "MIT" ]
1
2021-07-05T13:42:19.000Z
2021-07-05T14:14:44.000Z
run_search_goods.py
nikolay-py/product_optimizer
3d7da484984e63791849ce8a12b285a1ba2daacf
[ "MIT" ]
null
null
null
"""A utility for experimenting with searching.""" from project.parsers.crud import get_goods from project.parsers.search_goods import db from project.recipes.models import Recipe if __name__ == "__main__": recipe = db.query(Recipe).filter(Recipe.id == 2).first().product_list goods_list = get_goods(recipe,10) ...
34
73
0.649321
from project.parsers.crud import get_goods from project.parsers.search_goods import db from project.recipes.models import Recipe if __name__ == "__main__": recipe = db.query(Recipe).filter(Recipe.id == 2).first().product_list goods_list = get_goods(recipe,10) for inhidient in goods_list: print('--...
true
true
f71489c3ef52e026137535b36258928677e4ed4f
1,562
py
Python
plateo/parsers/file_parsers.py
Edinburgh-Genome-Foundry/plateo
c9a608658325f3c507788d9b966a3f3c8e516bc5
[ "MIT" ]
22
2018-01-29T21:34:25.000Z
2021-12-14T15:31:49.000Z
plateo/parsers/file_parsers.py
Edinburgh-Genome-Foundry/plateo
c9a608658325f3c507788d9b966a3f3c8e516bc5
[ "MIT" ]
3
2017-09-20T16:08:45.000Z
2021-05-28T17:45:14.000Z
plateo/parsers/file_parsers.py
Edinburgh-Genome-Foundry/plateo
c9a608658325f3c507788d9b966a3f3c8e516bc5
[ "MIT" ]
5
2018-09-18T08:53:37.000Z
2021-04-28T08:44:38.000Z
"""Misc. file parsers that are useful for other parsers""" from xml.sax import saxutils, parse, parseString class ExcelHandler(saxutils.handler.ContentHandler): """ This class is taken from the Python Cookbook so I guess the copyright goes to them. Memo: changed the handler from DefaultHandler to Con...
28.925926
75
0.596671
from xml.sax import saxutils, parse, parseString class ExcelHandler(saxutils.handler.ContentHandler): def __init__(self): self.chars = [] self.cells = [] self.rows = [] self.tables = [] def characters(self, content): self.chars.append(content) def startElement(sel...
true
true
f71489efe090002bbbd4dcf98ceba635d27bfa14
7,361
py
Python
rlcard/games/leducholdem/game.py
NiccoloSacchi/rlcard
046129e8616b12e25652957869a94ab5fd838ae1
[ "MIT" ]
null
null
null
rlcard/games/leducholdem/game.py
NiccoloSacchi/rlcard
046129e8616b12e25652957869a94ab5fd838ae1
[ "MIT" ]
null
null
null
rlcard/games/leducholdem/game.py
NiccoloSacchi/rlcard
046129e8616b12e25652957869a94ab5fd838ae1
[ "MIT" ]
1
2020-11-20T16:38:37.000Z
2020-11-20T16:38:37.000Z
import numpy as np from copy import copy from rlcard.games.leducholdem.dealer import LeducholdemDealer as Dealer from rlcard.games.leducholdem.player import LeducholdemPlayer as Player from rlcard.games.leducholdem.judger import LeducholdemJudger as Judger from rlcard.games.leducholdem.round import LeducholdemRound as...
34.237209
141
0.603586
import numpy as np from copy import copy from rlcard.games.leducholdem.dealer import LeducholdemDealer as Dealer from rlcard.games.leducholdem.player import LeducholdemPlayer as Player from rlcard.games.leducholdem.judger import LeducholdemJudger as Judger from rlcard.games.leducholdem.round import LeducholdemRound as...
true
true
f7148a75a4e4a85ae3bd6f491ecb0aa85bbc5afc
471
py
Python
Python/Functions_base/Functions/replace_ElecNaming.py
DanielHuji-RB/RB-article
e5a9ba30edfb030db1cd3bcf562c6abff3f9d48e
[ "MIT" ]
null
null
null
Python/Functions_base/Functions/replace_ElecNaming.py
DanielHuji-RB/RB-article
e5a9ba30edfb030db1cd3bcf562c6abff3f9d48e
[ "MIT" ]
null
null
null
Python/Functions_base/Functions/replace_ElecNaming.py
DanielHuji-RB/RB-article
e5a9ba30edfb030db1cd3bcf562c6abff3f9d48e
[ "MIT" ]
null
null
null
#Daniel Sand import pandas as pd import numpy as np fileName='/Tscores.csv' newFileName='/Tscores_v3.csv' df=pd.read_csv(fileName, sep=',') #6 differnt electordes oldFormat=['0-1','0-2','0-3','2-Jan','3-Jan','3-Feb'] newFormat=['0_1','0_2','0_3','2_1','3_1','3_2'] for iCont in range(0, len(oldFormat)): currEl...
22.428571
53
0.696391
import pandas as pd import numpy as np fileName='/Tscores.csv' newFileName='/Tscores_v3.csv' df=pd.read_csv(fileName, sep=',') oldFormat=['0-1','0-2','0-3','2-Jan','3-Jan','3-Feb'] newFormat=['0_1','0_2','0_3','2_1','3_1','3_2'] for iCont in range(0, len(oldFormat)): currElec_old = oldFormat[iCont] currEl...
true
true
f7148acd3d12984fc7698af4459254aa88540a51
188
py
Python
setup.py
jjc2718/mpmp
9960d8d3e20e4fc9319e5420e083fece5bfb3d9e
[ "BSD-3-Clause" ]
1
2021-11-02T05:47:38.000Z
2021-11-02T05:47:38.000Z
setup.py
jjc2718/mpmp
9960d8d3e20e4fc9319e5420e083fece5bfb3d9e
[ "BSD-3-Clause" ]
63
2020-12-03T23:55:55.000Z
2022-03-29T17:55:29.000Z
setup.py
jjc2718/mpmp
9960d8d3e20e4fc9319e5420e083fece5bfb3d9e
[ "BSD-3-Clause" ]
3
2020-12-01T18:50:00.000Z
2022-02-18T12:32:38.000Z
from setuptools import setup setup( name='mpmp', author='Jake Crawford', version='0.0.1', description='Multimodal Pan-cancer Mutation Prediction', packages=['mpmp'] )
18.8
60
0.670213
from setuptools import setup setup( name='mpmp', author='Jake Crawford', version='0.0.1', description='Multimodal Pan-cancer Mutation Prediction', packages=['mpmp'] )
true
true
f7148c067979d0d62792963a826a42a813df0ab1
8,199
py
Python
ludwig/features/image_feature.py
ThinkBigAnalytics/ludwig
0a3159af4cc91f57251f3dec0cdb863c7003cf00
[ "Apache-2.0" ]
1
2019-07-31T19:11:02.000Z
2019-07-31T19:11:02.000Z
ludwig/features/image_feature.py
ThinkBigAnalytics/ludwig
0a3159af4cc91f57251f3dec0cdb863c7003cf00
[ "Apache-2.0" ]
null
null
null
ludwig/features/image_feature.py
ThinkBigAnalytics/ludwig
0a3159af4cc91f57251f3dec0cdb863c7003cf00
[ "Apache-2.0" ]
null
null
null
#! /usr/bin/env python # coding=utf-8 # Copyright (c) 2019 Uber Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unles...
32.796
80
0.558971
import logging import os import h5py import numpy as np import tensorflow as tf from skimage.io import imread from ludwig.constants import * from ludwig.features.base_feature import BaseFeature from ludwig.features.base_feature import InputFeature from ludwig.models.modules.image_encoders import ResNetEncoder from lu...
true
true
f7148ccd4e901a2e9e3c5c5b644f2f81ee5e045c
133,646
py
Python
tensorflow/python/keras/layers/convolutional.py
devinlife/tensorflow
1445444c15a396410f25ae91b7d1c19d724e2afc
[ "Apache-2.0" ]
8
2020-07-29T18:50:45.000Z
2021-07-25T07:06:43.000Z
tensorflow/python/keras/layers/convolutional.py
devinlife/tensorflow
1445444c15a396410f25ae91b7d1c19d724e2afc
[ "Apache-2.0" ]
203
2019-06-14T23:53:10.000Z
2022-02-10T02:27:23.000Z
tensorflow/python/keras/layers/convolutional.py
devinlife/tensorflow
1445444c15a396410f25ae91b7d1c19d724e2afc
[ "Apache-2.0" ]
11
2020-05-31T13:14:56.000Z
2021-12-14T04:39:25.000Z
# 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...
40.535638
104
0.657221
from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.python.eager import context from tensorflow.python.framework import tensor_shape from tensorflow.python.keras import activations from tensorflow.python.keras import backend from tensorflow.pyth...
true
true
f7148d6111bc6f731ff2f47e5c14db68aaca4f46
590
py
Python
src/aoc/__init__.py
CreatingNull/AoC-2021
ee0aec7aa2f4d7cb2d62838d39f8c74edae8cc96
[ "MIT" ]
null
null
null
src/aoc/__init__.py
CreatingNull/AoC-2021
ee0aec7aa2f4d7cb2d62838d39f8c74edae8cc96
[ "MIT" ]
null
null
null
src/aoc/__init__.py
CreatingNull/AoC-2021
ee0aec7aa2f4d7cb2d62838d39f8c74edae8cc96
[ "MIT" ]
null
null
null
"""Root package for the challenge. Contains generic functionality not specific to days. """ import logging import sys from functools import partial from pathlib import Path ROOT_PATH = Path(Path(__file__).parents[1]) open_utf8 = partial(open, encoding="UTF-8") # Open with explict encoding # Configuring the global ...
25.652174
77
0.766102
import logging import sys from functools import partial from pathlib import Path ROOT_PATH = Path(Path(__file__).parents[1]) open_utf8 = partial(open, encoding="UTF-8") log = logging.getLogger() log.setLevel(logging.INFO) __handler = logging.StreamHandler(sys.stdout) __handler.setLevel(logging.DEBUG) __handler.setF...
true
true
f7148e83286d37d30f28041686db57b3c928f8c8
5,117
py
Python
command/download.py
aungthuphyo21/aungthuphyo22
462c515e7dc987aa877dd8e38ccd1e3e6abeab3d
[ "MIT" ]
null
null
null
command/download.py
aungthuphyo21/aungthuphyo22
462c515e7dc987aa877dd8e38ccd1e3e6abeab3d
[ "MIT" ]
null
null
null
command/download.py
aungthuphyo21/aungthuphyo22
462c515e7dc987aa877dd8e38ccd1e3e6abeab3d
[ "MIT" ]
null
null
null
#!/usr/bin/env python from __future__ import print_function import os import sys import argparse import subprocess from bddown_core import Pan from util import convert_none, parse_url, add_http, logger from config import global_config def download_command(filename, savedir, link, cookies, limit=None, output_dir=Non...
37.07971
117
0.577682
from __future__ import print_function import os import sys import argparse import subprocess from bddown_core import Pan from util import convert_none, parse_url, add_http, logger from config import global_config def download_command(filename, savedir, link, cookies, limit=None, output_dir=None): reload(sys) ...
true
true
f7148f1f8278d6d236a00eec569bd331d09b34c0
1,299
py
Python
main.py
TakeItIsi/Snakehogs-
6c92184a564738a1af8bb7e0b9a3bc74689fde49
[ "MIT" ]
null
null
null
main.py
TakeItIsi/Snakehogs-
6c92184a564738a1af8bb7e0b9a3bc74689fde49
[ "MIT" ]
null
null
null
main.py
TakeItIsi/Snakehogs-
6c92184a564738a1af8bb7e0b9a3bc74689fde49
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import pygame import os from Controlador.Basic_Controller import Controlador from Controlador.Menu_Controller import Menu from Controlador.Versus_Controller import Versus_Controlador __author__ = "Isidora Ulloa" __license__ = "GPL" __version__ = "1.0.0" __email_...
34.184211
151
0.638953
import pygame import os from Controlador.Basic_Controller import Controlador from Controlador.Menu_Controller import Menu from Controlador.Versus_Controller import Versus_Controlador __author__ = "Isidora Ulloa" __license__ = "GPL" __version__ = "1.0.0" __email__ = "isidora.ulloa@ug.uchile.cl" pygame.init(...
true
true
f7148f4a83cab36a038bcd04077b0e24ca251006
1,137
py
Python
migrations/versions/8b25b23d386f_chquery_the_comments_migration.py
macc254/Personal-Blog
3af6083f78e65636a9cf6caa1a3598b13b3b0134
[ "Unlicense" ]
null
null
null
migrations/versions/8b25b23d386f_chquery_the_comments_migration.py
macc254/Personal-Blog
3af6083f78e65636a9cf6caa1a3598b13b3b0134
[ "Unlicense" ]
null
null
null
migrations/versions/8b25b23d386f_chquery_the_comments_migration.py
macc254/Personal-Blog
3af6083f78e65636a9cf6caa1a3598b13b3b0134
[ "Unlicense" ]
null
null
null
"""ChQuery the comments Migration Revision ID: 8b25b23d386f Revises: a21b8da19c7d Create Date: 2022-03-12 09:58:47.379065 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '8b25b23d386f' down_revision = 'a21b8da19c7d' branch_labels = None depends_on = None def ...
32.485714
103
0.700967
from alembic import op import sqlalchemy as sa revision = '8b25b23d386f' down_revision = 'a21b8da19c7d' branch_labels = None depends_on = None def upgrade(): op.add_column('comments', sa.Column('blogs_id', sa.Integer(), nullable=False)) op.drop_constraint('comments_pitch_id_fkey', 'comments', type_='for...
true
true
f714902580ef72ea76cb338fc2ad31571450e93b
2,584
py
Python
openGaussBase/testcase/SYSTEM_CATALOGS&SYSTEM_VIEWS/SYSTEM_VIEW/Opengauss_Function_System_View_Case0044.py
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
openGaussBase/testcase/SYSTEM_CATALOGS&SYSTEM_VIEWS/SYSTEM_VIEW/Opengauss_Function_System_View_Case0044.py
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
openGaussBase/testcase/SYSTEM_CATALOGS&SYSTEM_VIEWS/SYSTEM_VIEW/Opengauss_Function_System_View_Case0044.py
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
""" Copyright (c) 2022 Huawei Technologies Co.,Ltd. openGauss is licensed under Mulan PSL v2. You can use this software according to the terms and conditions of the Mulan PSL v2. You may obtain a copy of Mulan PSL v2 at: http://license.coscl.org.cn/MulanPSL2 THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, W...
36.394366
84
0.589783
import unittest from testcase.utils.Common import Common from testcase.utils.CommonSH import CommonSH from testcase.utils.Logger import Logger LOG = Logger() class SystemView(unittest.TestCase): def setUp(self): LOG.info('----------------this is setup-----------------------') LOG.info( ...
true
true
f7149050818fa7e7d8741a281c8eedd9cd01f51f
185
py
Python
tests/resource/test_module.py
asyncee/pycamunda
f4834d224ff99fcf80874efeaedf68a8a2efa926
[ "MIT" ]
null
null
null
tests/resource/test_module.py
asyncee/pycamunda
f4834d224ff99fcf80874efeaedf68a8a2efa926
[ "MIT" ]
null
null
null
tests/resource/test_module.py
asyncee/pycamunda
f4834d224ff99fcf80874efeaedf68a8a2efa926
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- def test_all_contains_only_valid_names(): import pycamunda.resource for name in pycamunda.resource.__all__: getattr(pycamunda.resource, name)
20.555556
43
0.708108
def test_all_contains_only_valid_names(): import pycamunda.resource for name in pycamunda.resource.__all__: getattr(pycamunda.resource, name)
true
true
f71491334e653edf6dda365969aee2cd5e3794d8
531
py
Python
ex14.py
YunMeMeThaw/python_exercises
151d5d3695d578059611ac09c94b3677442197d7
[ "MIT" ]
null
null
null
ex14.py
YunMeMeThaw/python_exercises
151d5d3695d578059611ac09c94b3677442197d7
[ "MIT" ]
null
null
null
ex14.py
YunMeMeThaw/python_exercises
151d5d3695d578059611ac09c94b3677442197d7
[ "MIT" ]
null
null
null
from sys import argv script, user_name = argv prompt = '> ' print("Hi %s, I'm the %s script." % (user_name, script)) print("I'd like to ask you a few questions.") print("Do you like me %s?" % user_name) likes = input(prompt) print("Where do you live %s?" % user_name) lives = input(prompt) print("What kind of computer d...
31.235294
56
0.6629
from sys import argv script, user_name = argv prompt = '> ' print("Hi %s, I'm the %s script." % (user_name, script)) print("I'd like to ask you a few questions.") print("Do you like me %s?" % user_name) likes = input(prompt) print("Where do you live %s?" % user_name) lives = input(prompt) print("What kind of computer d...
true
true
f714924a2eb8a90be404ca381f44409a550c4985
8,049
py
Python
python/mxnet/base.py
ChidanandKumarKS/mxnet
1ed8b19849046bce92fd3d4a390b2adc405b584a
[ "Apache-2.0" ]
1
2018-09-08T05:58:17.000Z
2018-09-08T05:58:17.000Z
python/mxnet/base.py
ChidanandKumarKS/mxnet
1ed8b19849046bce92fd3d4a390b2adc405b584a
[ "Apache-2.0" ]
null
null
null
python/mxnet/base.py
ChidanandKumarKS/mxnet
1ed8b19849046bce92fd3d4a390b2adc405b584a
[ "Apache-2.0" ]
1
2018-09-04T10:46:25.000Z
2018-09-04T10:46:25.000Z
# coding: utf-8 # pylint: disable=invalid-name, no-member """ctypes library of mxnet and helper functions.""" from __future__ import absolute_import import sys import ctypes import atexit import warnings import inspect import numpy as np from . import libinfo warnings.filterwarnings('default', category=DeprecationWarn...
26.564356
78
0.60815
from __future__ import absolute_import import sys import ctypes import atexit import warnings import inspect import numpy as np from . import libinfo warnings.filterwarnings('default', category=DeprecationWarning) __all__ = ['MXNetError'] if sys.version_info[0] == 3: string_types = str, numeric_types = (float...
true
true
f7149262bdb3bfb5bea3bb847f496514f2be6606
4,880
py
Python
scripts/automation.py
Alexey19/Python-UIAutomation-for-Windows
43d33bed99da66c31bc8471694422352291ae1fb
[ "Apache-2.0" ]
null
null
null
scripts/automation.py
Alexey19/Python-UIAutomation-for-Windows
43d33bed99da66c31bc8471694422352291ae1fb
[ "Apache-2.0" ]
null
null
null
scripts/automation.py
Alexey19/Python-UIAutomation-for-Windows
43d33bed99da66c31bc8471694422352291ae1fb
[ "Apache-2.0" ]
null
null
null
#!python3 # -*- coding:utf-8 -*- import sys import time from uiautomation import (Win32API, Logger, ControlFromCursor, GetRootControl, GetFocusedControl, LogControl, EnumAndLogControlAncestors, EnumAndLogControl, ConsoleColor) from uiautomation import VERSION def usage(): Logger.Color...
40
191
0.604713
import sys import time from uiautomation import (Win32API, Logger, ControlFromCursor, GetRootControl, GetFocusedControl, LogControl, EnumAndLogControlAncestors, EnumAndLogControl, ConsoleColor) from uiautomation import VERSION def usage(): Logger.ColorfulWrite("""usage <Color=Cyan>-h<...
true
true
f71492be13cc39a498d67a30628c4004f0f40da6
172
py
Python
1541/solution.py
bossm0n5t3r/BOJ
03132388a0c76ef66d6b0dec2053aeca65c4aee6
[ "MIT" ]
2
2020-01-14T07:27:25.000Z
2020-02-12T07:49:58.000Z
1541/solution.py
bossm0n5t3r/BOJ
03132388a0c76ef66d6b0dec2053aeca65c4aee6
[ "MIT" ]
1
2020-01-14T07:29:30.000Z
2021-11-28T11:29:08.000Z
1541/solution.py
bossm0n5t3r/BOJ
03132388a0c76ef66d6b0dec2053aeca65c4aee6
[ "MIT" ]
null
null
null
def sol(): expression = [sum(map(int, x.split("+"))) for x in input().split("-")] print(expression[0] - sum(expression[1:])) if __name__ == "__main__": sol()
21.5
74
0.569767
def sol(): expression = [sum(map(int, x.split("+"))) for x in input().split("-")] print(expression[0] - sum(expression[1:])) if __name__ == "__main__": sol()
true
true
f7149435f8090b28b434d5fbe89c07cf906c1832
2,207
py
Python
arc852/opencv_utils.py
athenian-robotics/common-robotics-python
a2ede8fb3072cf1baa53672f76081aa6bfde397f
[ "MIT" ]
1
2019-02-20T22:59:59.000Z
2019-02-20T22:59:59.000Z
arc852/opencv_utils.py
athenian-robotics/common-robotics
a2ede8fb3072cf1baa53672f76081aa6bfde397f
[ "MIT" ]
null
null
null
arc852/opencv_utils.py
athenian-robotics/common-robotics
a2ede8fb3072cf1baa53672f76081aa6bfde397f
[ "MIT" ]
1
2020-05-23T09:08:42.000Z
2020-05-23T09:08:42.000Z
import datetime import logging import math import cv2 RED = (0, 0, 255) GREEN = (0, 255, 0) BLUE = (255, 0, 0) YELLOW = (0, 255, 255) logger = logging.getLogger(__name__) def get_moment(contour): moment1 = cv2.moments(contour) area = int(moment1["m00"]) x = int(moment1["m10"] / area) y = int(moment...
22.752577
105
0.61169
import datetime import logging import math import cv2 RED = (0, 0, 255) GREEN = (0, 255, 0) BLUE = (255, 0, 0) YELLOW = (0, 255, 255) logger = logging.getLogger(__name__) def get_moment(contour): moment1 = cv2.moments(contour) area = int(moment1["m00"]) x = int(moment1["m10"] / area) y = int(moment...
true
true
f71494b465a073d5dd94888bf5f7ef9ae0951d01
959
py
Python
tests/v2/test_0879-non-primitive-with-field.py
jpivarski/awkward-1.0
49a3ff13ef90b8778a80573211d58c544729eaa5
[ "BSD-3-Clause" ]
2
2019-09-12T03:07:23.000Z
2019-09-27T05:32:07.000Z
tests/v2/test_0879-non-primitive-with-field.py
jpivarski/awkward-1.0
49a3ff13ef90b8778a80573211d58c544729eaa5
[ "BSD-3-Clause" ]
1
2019-09-26T17:57:45.000Z
2019-09-26T17:57:45.000Z
tests/v2/test_0879-non-primitive-with-field.py
jpivarski/awkward-1.0
49a3ff13ef90b8778a80573211d58c544729eaa5
[ "BSD-3-Clause" ]
null
null
null
# BSD 3-Clause License; see https://github.com/scikit-hep/awkward-1.0/blob/main/LICENSE import pytest # noqa: F401 import numpy as np # noqa: F401 import awkward as ak # noqa: F401 def test_unknown_type(): array = ak._v2.Array({"x": np.arange(10)}) array = ak._v2.operations.with_field(base=array, what=Non...
33.068966
87
0.663191
import pytest import numpy as np import awkward as ak def test_unknown_type(): array = ak._v2.Array({"x": np.arange(10)}) array = ak._v2.operations.with_field(base=array, what=None, where="unknown field1") array = ak._v2.operations.with_field( base=array, what=[None], where="unknown field2" ...
true
true
f714958b669c31b21b54bd0ddb5714e078f4ab0f
4,265
py
Python
empower/cli/projects.py
joncnet/empower-runtime
c04d9c7621fdb97dc3bd4ace5cb2d8f7194d540c
[ "Apache-2.0" ]
null
null
null
empower/cli/projects.py
joncnet/empower-runtime
c04d9c7621fdb97dc3bd4ace5cb2d8f7194d540c
[ "Apache-2.0" ]
null
null
null
empower/cli/projects.py
joncnet/empower-runtime
c04d9c7621fdb97dc3bd4ace5cb2d8f7194d540c
[ "Apache-2.0" ]
2
2018-09-24T09:44:19.000Z
2018-10-12T09:57:36.000Z
#!/usr/bin/env python3 # # Copyright (c) 2019 Roberto Riggio # # 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 applicabl...
28.245033
73
0.605393
import uuid import argparse import empower.cli.command as command from empower.core.plmnid import PLMNID from empower.core.ssid import SSID def pa_delete_project(args, cmd): usage = "%s <options>" % command.USAGE.format(cmd) desc = command.DESCS[cmd] parser = argparse.ArgumentParser(usage=usage, des...
true
true
f7149618008b2c55257eac69dff2390850219ebb
1,584
py
Python
bin/list-keys.py
fenglsuc/PatCit
6f2585dac156a69ff94f002d387c75bd723529df
[ "MIT" ]
1
2020-04-10T09:18:27.000Z
2020-04-10T09:18:27.000Z
bin/list-keys.py
fenglsuc/PatCit
6f2585dac156a69ff94f002d387c75bd723529df
[ "MIT" ]
null
null
null
bin/list-keys.py
fenglsuc/PatCit
6f2585dac156a69ff94f002d387c75bd723529df
[ "MIT" ]
null
null
null
import json import lzma from glob import glob from pprint import pprint import click import smart_open from tqdm import tqdm @click.command() @click.option("--path", help="Path. Wilcard '*' enabled") @click.option("--tar", default=False, help="True for .xz files") @click.option( "--flavor", default="sm", ...
29.333333
87
0.454545
import json import lzma from glob import glob from pprint import pprint import click import smart_open from tqdm import tqdm @click.command() @click.option("--path", help="Path. Wilcard '*' enabled") @click.option("--tar", default=False, help="True for .xz files") @click.option( "--flavor", default="sm", ...
true
true
f714961d576161dc58be3cf12b089bd26a129c85
1,215
py
Python
ex3_collatz.py
grace-burke/Grace-Burke-Programming-and-Scripting-GMIT-2018
b676ebf81388ec3ed46a2d2c9b897ee466598b0b
[ "Apache-2.0" ]
null
null
null
ex3_collatz.py
grace-burke/Grace-Burke-Programming-and-Scripting-GMIT-2018
b676ebf81388ec3ed46a2d2c9b897ee466598b0b
[ "Apache-2.0" ]
null
null
null
ex3_collatz.py
grace-burke/Grace-Burke-Programming-and-Scripting-GMIT-2018
b676ebf81388ec3ed46a2d2c9b897ee466598b0b
[ "Apache-2.0" ]
null
null
null
# Grace Burke # 08/02/2018 # Exercise 3: # Complete the exercise discussed in the Collatz conjecture video by writing a single Python script that starts with an integer and repeatedly applies the Collatz function (divide by 2 if even, multiply by three and 1 if odd) using a while loop and if statement. # At each ite...
48.6
263
0.719342
x = int(input("Please enter an integer: ")) while x > 1: if x % 2 == 0: x = x//2 else: x = 3*x + 1 print (x)
true
true
f7149705d601e6aca77921bd8014f22187956ca9
13,102
py
Python
xoa/__init__.py
VACUMM/xoa
c6a0d860528cf33ae15c77fa111f95daab0321c0
[ "Apache-2.0" ]
7
2021-04-08T08:46:30.000Z
2022-02-07T11:19:51.000Z
xoa/__init__.py
VACUMM/xoa
c6a0d860528cf33ae15c77fa111f95daab0321c0
[ "Apache-2.0" ]
29
2021-02-18T10:27:26.000Z
2022-03-25T08:29:04.000Z
xoa/__init__.py
VACUMM/xoa
c6a0d860528cf33ae15c77fa111f95daab0321c0
[ "Apache-2.0" ]
2
2020-04-30T17:20:46.000Z
2022-03-18T14:29:14.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ xarray-based ocean analysis library The successor of Vacumm. """ # Copyright 2020-2021 Shom # # 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...
24.48972
93
0.598611
import os import re import warnings import platform import pkg_resources import appdirs import configobj import validate try: __version__ = pkg_resources.get_distribution("xoa").version except Exception: __version__ = "999" _RE_OPTION_MATCH = re.compile(r"^(\w+)\W(\w+)$").match CONFIG_SPECS = """...
true
true
f7149723918e0c4f1a80671f68d3b10a2ce44e1c
457
py
Python
ftm_service/app.py
cansik/FIFATournamentManager
ee86673fe2d754aee35ef277f152fa48e39281d8
[ "MIT" ]
null
null
null
ftm_service/app.py
cansik/FIFATournamentManager
ee86673fe2d754aee35ef277f152fa48e39281d8
[ "MIT" ]
null
null
null
ftm_service/app.py
cansik/FIFATournamentManager
ee86673fe2d754aee35ef277f152fa48e39281d8
[ "MIT" ]
null
null
null
import connexion import logging from flask.ext.cors import CORS from data.data_source import FTMDataSource data_source = FTMDataSource() def start_server(): logging.basicConfig(level=logging.INFO) app = connexion.App(__name__, port=8080, specification_dir='swagger/', server='gevent') app.add_api('ftm_ser...
21.761905
91
0.724289
import connexion import logging from flask.ext.cors import CORS from data.data_source import FTMDataSource data_source = FTMDataSource() def start_server(): logging.basicConfig(level=logging.INFO) app = connexion.App(__name__, port=8080, specification_dir='swagger/', server='gevent') app.add_api('ftm_ser...
true
true
f71498faa11249dfd60ec67c988ac1d9a4251dca
4,390
py
Python
homeassistant/components/unifi_direct/device_tracker.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
30,023
2016-04-13T10:17:53.000Z
2020-03-02T12:56:31.000Z
homeassistant/components/unifi_direct/device_tracker.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
24,710
2016-04-13T08:27:26.000Z
2020-03-02T12:59:13.000Z
homeassistant/components/unifi_direct/device_tracker.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
11,956
2016-04-13T18:42:31.000Z
2020-03-02T09:32:12.000Z
"""Support for Unifi AP direct access.""" from __future__ import annotations import json import logging from pexpect import exceptions, pxssh import voluptuous as vol from homeassistant.components.device_tracker import ( DOMAIN, PLATFORM_SCHEMA as PARENT_PLATFORM_SCHEMA, DeviceScanner, ) from homeassista...
30.915493
82
0.622551
from __future__ import annotations import json import logging from pexpect import exceptions, pxssh import voluptuous as vol from homeassistant.components.device_tracker import ( DOMAIN, PLATFORM_SCHEMA as PARENT_PLATFORM_SCHEMA, DeviceScanner, ) from homeassistant.const import CONF_HOST, CONF_PASSWORD, ...
true
true
f7149918e61836615e0176df95bfc1ed42c287dc
821
py
Python
spider/code/bs_spider01.py
mama2100/knowledge
5a18a3c243d7411f5135ec680dc5bd95d92be056
[ "MIT" ]
881
2018-03-20T09:19:14.000Z
2022-03-24T10:17:33.000Z
spider/code/bs_spider01.py
mama2100/knowledge
5a18a3c243d7411f5135ec680dc5bd95d92be056
[ "MIT" ]
null
null
null
spider/code/bs_spider01.py
mama2100/knowledge
5a18a3c243d7411f5135ec680dc5bd95d92be056
[ "MIT" ]
248
2018-05-31T01:06:15.000Z
2022-03-14T06:52:25.000Z
import urllib3 # 你需要一个PoolManager实例来生成请求,由该实例对象处理与线程池的连接以及 # 线程安全的所有细节,不需要任何人为操作 http = urllib3.PoolManager() # request()方法创建一个GET请求去获取百度的网页信息,返回的r是一个HttpResponse对象 r = http.request('GET', 'https://www.baidu.com') # 打印请求的状态 print(r.status) # 打印请求网页的内容 print(r.data) ''' Accept: text/html, */*;q=0.8 # 浏览器告诉服务器可以接收的...
28.310345
121
0.773447
import urllib3 http = urllib3.PoolManager() r = http.request('GET', 'https://www.baidu.com') print(r.status) print(r.data)
true
true
f71499c7f2f926ce80c69f47e36b2d1191d1b667
22,070
py
Python
nipy/labs/spatial_models/hroi.py
fabianp/nipy
40e89f3ca7f34df05631623807993026134e6de3
[ "BSD-3-Clause" ]
1
2020-01-02T01:50:19.000Z
2020-01-02T01:50:19.000Z
nipy/labs/spatial_models/hroi.py
fabianp/nipy
40e89f3ca7f34df05631623807993026134e6de3
[ "BSD-3-Clause" ]
null
null
null
nipy/labs/spatial_models/hroi.py
fabianp/nipy
40e89f3ca7f34df05631623807993026134e6de3
[ "BSD-3-Clause" ]
null
null
null
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """ This module contains the specification of 'hierarchical ROI' object, Which is used in spatial models of the library such as structural analysis The connection with other classes is not completely satis...
36.419142
79
0.561305
import numpy as np from nipy.algorithms.graph.graph import WeightedGraph from nipy.algorithms.graph.forest import Forest from nipy.algorithms.graph.field import field_from_coo_matrix_and_data from .mroi import SubDomains NINF = - np.inf def hroi_agglomeration(input_hroi, criterion='size', smin=0): if criterion...
true
true
f71499f5deb8f014468d50ba23386afe547af396
5,599
py
Python
utils.py
lgraesser/MCER
250aa6965064dbc73462eb5edb559bf9ce949b70
[ "Apache-2.0" ]
null
null
null
utils.py
lgraesser/MCER
250aa6965064dbc73462eb5edb559bf9ce949b70
[ "Apache-2.0" ]
null
null
null
utils.py
lgraesser/MCER
250aa6965064dbc73462eb5edb559bf9ce949b70
[ "Apache-2.0" ]
null
null
null
import json import logging import matplotlib.pyplot as plt import os import tensorflow as tf from sklearn.utils import shuffle import model import train logger = logging.getLogger('utils') logger.setLevel(logging.INFO) def get_data_path(): '''Returns the path to the image and annotation data. Downloads the ...
37.577181
135
0.666905
import json import logging import matplotlib.pyplot as plt import os import tensorflow as tf from sklearn.utils import shuffle import model import train logger = logging.getLogger('utils') logger.setLevel(logging.INFO) def get_data_path(): annotation_folder = '/data/train_data/annotations/' if not os.pa...
true
true
f7149a066af83fb2bde594eb67a847e0095f1a45
8,345
py
Python
apischema/conversions/visitor.py
klauer/apischema
0da9b96b74dabe8704e2dcfca4502aed98500799
[ "MIT" ]
null
null
null
apischema/conversions/visitor.py
klauer/apischema
0da9b96b74dabe8704e2dcfca4502aed98500799
[ "MIT" ]
null
null
null
apischema/conversions/visitor.py
klauer/apischema
0da9b96b74dabe8704e2dcfca4502aed98500799
[ "MIT" ]
null
null
null
from contextlib import contextmanager, suppress from dataclasses import replace from functools import lru_cache from types import new_class from typing import ( Any, ClassVar, Collection, Generic, Iterable, Optional, Sequence, Tuple, Type, TypeVar, Union, ) from apischema.co...
34.341564
88
0.660036
from contextlib import contextmanager, suppress from dataclasses import replace from functools import lru_cache from types import new_class from typing import ( Any, ClassVar, Collection, Generic, Iterable, Optional, Sequence, Tuple, Type, TypeVar, Union, ) from apischema.co...
true
true
f7149a685dddb6fa97224e4564f4831152a7289f
3,618
py
Python
outputs/8c5d9918967dd5901fcbadab29308672/chuansong/pipelines.py
louis-xuy/scrapy_helper
14acdb8c23316cc1d83c2526ce024447cf60ccbf
[ "MIT" ]
89
2018-01-13T06:51:41.000Z
2021-12-27T05:52:46.000Z
outputs/8c5d9918967dd5901fcbadab29308672/chuansong/pipelines.py
facert/scrapy_helper
14acdb8c23316cc1d83c2526ce024447cf60ccbf
[ "MIT" ]
1
2021-06-10T23:54:48.000Z
2021-06-10T23:54:48.000Z
outputs/8c5d9918967dd5901fcbadab29308672/chuansong/pipelines.py
louis-xuy/scrapy_helper
14acdb8c23316cc1d83c2526ce024447cf60ccbf
[ "MIT" ]
37
2018-01-16T06:24:17.000Z
2021-12-27T05:52:54.000Z
# Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html import json import socket import scrapy import hashlib from scrapy.exceptions import DropItem from scrapy.pipelines.images import ImagesPipeline from sc...
30.923077
112
0.640409
# See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html import json import socket import scrapy import hashlib from scrapy.exceptions import DropItem from scrapy.pipelines.images import ImagesPipeline from scrapy.utils.project import get_project_settings s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) c...
true
true
f7149aa3d4724732c401b0215429d670613bea8e
2,020
py
Python
ppa6test.py
linglingltd/peripage-a6-control
11c9d36e4f6abb091955452b83120f25c5cc5cef
[ "MIT" ]
9
2021-05-15T15:35:34.000Z
2022-03-09T22:00:40.000Z
ppa6test.py
linglingltd/peripage-a6-control
11c9d36e4f6abb091955452b83120f25c5cc5cef
[ "MIT" ]
null
null
null
ppa6test.py
linglingltd/peripage-a6-control
11c9d36e4f6abb091955452b83120f25c5cc5cef
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """ Simple test procedure for manual printing functions of ppa6ctl module """ import ppa6ctl as printer print("Start module ppa6ctl test procedure") print("Search for a PeriPage printer, this might take some time...") mac = printer.search() if not mac: print("No printer found, stopping tes...
24.938272
75
0.736634
import ppa6ctl as printer print("Start module ppa6ctl test procedure") print("Search for a PeriPage printer, this might take some time...") mac = printer.search() if not mac: print("No printer found, stopping test procedure") exit() print("Connecting to: %s" % mac) if not printer.connect(mac): print("Connec...
true
true
f7149bf48e26c827d23132c1ed53812c920506cd
40,725
py
Python
apps/users/views.py
MaLei666/oms
2447ec656ae5b61b9edc93c28a42f487476b5978
[ "MIT" ]
null
null
null
apps/users/views.py
MaLei666/oms
2447ec656ae5b61b9edc93c28a42f487476b5978
[ "MIT" ]
6
2020-03-23T09:21:13.000Z
2022-03-11T23:49:57.000Z
apps/users/views.py
MaLei666/oms
2447ec656ae5b61b9edc93c28a42f487476b5978
[ "MIT" ]
1
2019-10-15T03:06:46.000Z
2019-10-15T03:06:46.000Z
###################################### # Django 模块 ###################################### from django.shortcuts import render, HttpResponseRedirect, redirect, reverse from django.views import View from django.contrib.auth import login, logout, authenticate from django.http import HttpResponse from django.contrib.auth.b...
35.19879
119
0.520958
from django.shortcuts import render, HttpResponseRedirect, redirect, reverse from django.views import View from django.contrib.auth import login, logout, authenticate from django.http import HttpResponse from django.contrib.auth.backends import ModelBackend from django.contrib.auth.hashers import make_password from dja...
true
true
f7149d10c9678284dc5d440d0ecff556d5542556
1,631
py
Python
aspdotnet/datadog_checks/aspdotnet/config_models/instance.py
tdimnet/integrations-core
a78133a3b71a1b8377fa214d121a98647031ab06
[ "BSD-3-Clause" ]
663
2016-08-23T05:23:45.000Z
2022-03-29T00:37:23.000Z
aspdotnet/datadog_checks/aspdotnet/config_models/instance.py
tdimnet/integrations-core
a78133a3b71a1b8377fa214d121a98647031ab06
[ "BSD-3-Clause" ]
6,642
2016-06-09T16:29:20.000Z
2022-03-31T22:24:09.000Z
aspdotnet/datadog_checks/aspdotnet/config_models/instance.py
tdimnet/integrations-core
a78133a3b71a1b8377fa214d121a98647031ab06
[ "BSD-3-Clause" ]
1,222
2017-01-27T15:51:38.000Z
2022-03-31T18:17:51.000Z
# (C) Datadog, Inc. 2021-present # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) from __future__ import annotations from typing import Optional, Sequence from pydantic import BaseModel, root_validator, validator from datadog_checks.base.utils.functions import identity from datadog_c...
31.365385
110
0.722869
from __future__ import annotations from typing import Optional, Sequence from pydantic import BaseModel, root_validator, validator from datadog_checks.base.utils.functions import identity from datadog_checks.base.utils.models import validation from . import defaults, validators class InstanceConfig(BaseModel): ...
true
true
f7149d9c7f8e80f6164a3e016765476165ed9141
49,616
py
Python
tensorflow/python/training/checkpointable_utils.py
imdone/tensorflow
bb4d1ef3861c83627ee9586b85ac3070a7d38335
[ "Apache-2.0" ]
1
2021-04-16T14:53:22.000Z
2021-04-16T14:53:22.000Z
tensorflow/python/training/checkpointable_utils.py
imdone/tensorflow
bb4d1ef3861c83627ee9586b85ac3070a7d38335
[ "Apache-2.0" ]
10
2018-02-04T18:41:52.000Z
2018-05-02T09:00:46.000Z
tensorflow/python/training/checkpointable_utils.py
imdone/tensorflow
bb4d1ef3861c83627ee9586b85ac3070a7d38335
[ "Apache-2.0" ]
4
2018-01-17T14:22:49.000Z
2018-02-27T15:06:41.000Z
"""Utilities for saving/loading Checkpointable objects.""" # Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apa...
43.294939
116
0.730893
from __future__ import absolute_import from __future__ import division from __future__ import print_function import abc import collections import weakref from tensorflow.core.protobuf import checkpointable_object_graph_pb2 from tensorflow.python import pywrap_tensorflow from tensorflow.python.client import session as...
true
true
f7149e143f5585d098d18b700bb17a159cb42dc1
14,337
py
Python
airflow/api/common/experimental/mark_tasks.py
crunchbase/incubator-airflow
903e37a09f05f4ab022bb7153be8dc62b3d9da99
[ "Apache-2.0" ]
null
null
null
airflow/api/common/experimental/mark_tasks.py
crunchbase/incubator-airflow
903e37a09f05f4ab022bb7153be8dc62b3d9da99
[ "Apache-2.0" ]
22
2019-12-09T23:22:07.000Z
2021-05-12T23:15:40.000Z
airflow/api/common/experimental/mark_tasks.py
crunchbase/incubator-airflow
903e37a09f05f4ab022bb7153be8dc62b3d9da99
[ "Apache-2.0" ]
5
2019-11-18T13:19:29.000Z
2020-03-25T13:20:29.000Z
# -*- coding: utf-8 -*- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the #...
38.334225
99
0.68515
import datetime from typing import Iterable from sqlalchemy import or_ from airflow.jobs import BackfillJob from airflow.models import BaseOperator, DagRun, TaskInstance from airflow.operators.subdag_operator import SubDagOperator from airflow.utils import timezone from airflow.utils.db import provide_session from a...
true
true
f7149e2412d81d75a93d4991ff57ab4e7bd62d19
1,125
py
Python
laplace/__init__.py
georgezefko/Laplace
c488f7bf739297bab5d771f65635352a07716ca0
[ "MIT" ]
null
null
null
laplace/__init__.py
georgezefko/Laplace
c488f7bf739297bab5d771f65635352a07716ca0
[ "MIT" ]
null
null
null
laplace/__init__.py
georgezefko/Laplace
c488f7bf739297bab5d771f65635352a07716ca0
[ "MIT" ]
null
null
null
""" .. include:: ../README.md .. include:: ../examples/regression_example.md .. include:: ../examples/calibration_example.md """ REGRESSION = 'regression' CLASSIFICATION = 'classification' from laplace.baselaplace import BaseLaplace, ParametricLaplace, FullLaplace, KronLaplace, DiagLaplace, LowRankLaplace from laplac...
46.875
117
0.734222
REGRESSION = 'regression' CLASSIFICATION = 'classification' from laplace.baselaplace import BaseLaplace, ParametricLaplace, FullLaplace, KronLaplace, DiagLaplace, LowRankLaplace from laplace.lllaplace import LLLaplace, FullLLLaplace, KronLLLaplace, DiagLLLaplace from laplace.subnetlaplace import SubnetLaplace, FullSub...
true
true
f7149e6533709c3087902b7fa956335e88e12f63
450
py
Python
paperplane/backends/click/echo.py
abhilash1in/paperplane
1dfda182dc8a70fe08fa2284ea63b434246c394b
[ "MIT" ]
null
null
null
paperplane/backends/click/echo.py
abhilash1in/paperplane
1dfda182dc8a70fe08fa2284ea63b434246c394b
[ "MIT" ]
null
null
null
paperplane/backends/click/echo.py
abhilash1in/paperplane
1dfda182dc8a70fe08fa2284ea63b434246c394b
[ "MIT" ]
null
null
null
import logging from typing import Optional from paperplane.backends.click import _secho logger = logging.getLogger(__name__) def run( prompt: str, color: Optional[str] = None, fg: Optional[str] = None, bg: Optional[str] = None, bold: Optional[bool] = False, ): if prompt is not None: r...
23.684211
71
0.668889
import logging from typing import Optional from paperplane.backends.click import _secho logger = logging.getLogger(__name__) def run( prompt: str, color: Optional[str] = None, fg: Optional[str] = None, bg: Optional[str] = None, bold: Optional[bool] = False, ): if prompt is not None: r...
true
true
f7149f74e1c827d11855a1dd871ba6c9659096d7
9,270
py
Python
trac/web/tests/auth.py
lelit/trac
ee8f811a29321f3c0fc8b8235d143e0ffcd6d013
[ "BSD-3-Clause" ]
1
2017-08-03T07:04:28.000Z
2017-08-03T07:04:28.000Z
trac/web/tests/auth.py
lelit/trac
ee8f811a29321f3c0fc8b8235d143e0ffcd6d013
[ "BSD-3-Clause" ]
null
null
null
trac/web/tests/auth.py
lelit/trac
ee8f811a29321f3c0fc8b8235d143e0ffcd6d013
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright (C) 2005-2013 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://trac.edgewall.org/wiki/TracLicense. # # This software consi...
40.480349
80
0.602697
import os import trac.tests.compat from trac.core import TracError from trac.test import EnvironmentStub, Mock from trac.web.auth import BasicAuthentication, LoginModule from trac.web.href import Href from Cookie import SimpleCookie as Cookie import unittest class LoginModuleTestCase(unittest.TestCase): def s...
true
true
f7149f8bfbbe334b4581ab62205607d9646fef42
1,364
py
Python
tests/test_download.py
iacopoff/climetlab
cc01604de991928018291725407d891f3c01ce5b
[ "Apache-2.0" ]
null
null
null
tests/test_download.py
iacopoff/climetlab
cc01604de991928018291725407d891f3c01ce5b
[ "Apache-2.0" ]
null
null
null
tests/test_download.py
iacopoff/climetlab
cc01604de991928018291725407d891f3c01ce5b
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # (C) Copyright 2020 ECMWF. # # This software is licensed under the terms of the Apache Licence Version 2.0 # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. # In applying this licence, ECMWF does not waive the privileges and immunities # granted to it by virtue of its statu...
26.230769
88
0.725806
import os import pathlib import time from climetlab import settings from climetlab.utils import download_and_cache def path_to_url(path): return pathlib.Path(os.path.abspath(path)).as_uri() def test_download_1(): url = "https://github.com/ecmwf/climetlab/raw/main/docs/examples/test.grib?_=%s" % ( ...
true
true
f7149ff103223405ef329d427e9cce2551ef21f0
207
py
Python
vet_website/vet_website/doctype/vetasset/test_vetasset.py
rezazrna/vet_website
26e731cb10c31d69292f33659c49c3cfa5646c39
[ "MIT" ]
null
null
null
vet_website/vet_website/doctype/vetasset/test_vetasset.py
rezazrna/vet_website
26e731cb10c31d69292f33659c49c3cfa5646c39
[ "MIT" ]
null
null
null
vet_website/vet_website/doctype/vetasset/test_vetasset.py
rezazrna/vet_website
26e731cb10c31d69292f33659c49c3cfa5646c39
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2020, bikbuk and Contributors # See license.txt from __future__ import unicode_literals # import frappe import unittest class TestVetAsset(unittest.TestCase): pass
18.818182
45
0.758454
from __future__ import unicode_literals import unittest class TestVetAsset(unittest.TestCase): pass
true
true
f714a04a559914d1915f3c51c7c305616a25454f
2,090
py
Python
setup.py
kruserr/i6
90a198ae543844faa1073d8bd317f11e1bb80298
[ "MIT" ]
1
2020-07-05T22:08:22.000Z
2020-07-05T22:08:22.000Z
setup.py
kruserr/i6
90a198ae543844faa1073d8bd317f11e1bb80298
[ "MIT" ]
null
null
null
setup.py
kruserr/i6
90a198ae543844faa1073d8bd317f11e1bb80298
[ "MIT" ]
null
null
null
import setuptools import urllib.request DESCRIPTION = 'A standardized collection of python libs and tools' try: with open('README.md', 'r') as f: LONG_DESCRIPTION = f.read() except FileNotFoundError: LONG_DESCRIPTION = DESCRIPTION try: with open('VERSION', 'r') as f: VERSION = f.read() e...
26.455696
88
0.574641
import setuptools import urllib.request DESCRIPTION = 'A standardized collection of python libs and tools' try: with open('README.md', 'r') as f: LONG_DESCRIPTION = f.read() except FileNotFoundError: LONG_DESCRIPTION = DESCRIPTION try: with open('VERSION', 'r') as f: VERSION = f.read() e...
true
true
f714a04aab9e0bff1e00c2120d335960fe4730f0
9,816
py
Python
surveysim/music2/interpolate.py
jakgel/clusterbuster
d79400a0faf43dece457d99b024b955aef544fc2
[ "MIT" ]
1
2018-09-10T14:06:45.000Z
2018-09-10T14:06:45.000Z
surveysim/music2/interpolate.py
jakgel/clusterbuster
d79400a0faf43dece457d99b024b955aef544fc2
[ "MIT" ]
null
null
null
surveysim/music2/interpolate.py
jakgel/clusterbuster
d79400a0faf43dece457d99b024b955aef544fc2
[ "MIT" ]
null
null
null
import numpy as np import scipy.interpolate as interpolate import matplotlib.pyplot as plt import clusterbuster.mathut as math """ Start with e.g. InterpolateRadio2D(psiFile = '../Analysis_MUSIC2/Hoeft_radio/mach_psi_tablefine(10,3).txt', inter=(10,6)) """ # from http://stackoverflow....
42.310345
262
0.561125
import numpy as np import scipy.interpolate as interpolate import matplotlib.pyplot as plt import clusterbuster.mathut as math def my_interp(X, Y, Z, x, y, spn=3): xs,ys = map(np.array,(x,y)) z = np.zeros(xs.shape) for i,(x,y) in enumerate(zip(xs,ys)): xi = np...
true
true
f714a0761443c704df72e831e1a6e9881201965d
202
py
Python
flutterapi/myapp/models.py
PariTA05/Todolist
fa18d02e3f989cbb37f877fb18e3e715bfc76f0c
[ "MIT" ]
null
null
null
flutterapi/myapp/models.py
PariTA05/Todolist
fa18d02e3f989cbb37f877fb18e3e715bfc76f0c
[ "MIT" ]
null
null
null
flutterapi/myapp/models.py
PariTA05/Todolist
fa18d02e3f989cbb37f877fb18e3e715bfc76f0c
[ "MIT" ]
null
null
null
from django.db import models class Todolist(models.Model): title = models.CharField(max_length=100) detail = models.TextField(null=True, blank=True) def __str__(self): return self.title
25.25
50
0.732673
from django.db import models class Todolist(models.Model): title = models.CharField(max_length=100) detail = models.TextField(null=True, blank=True) def __str__(self): return self.title
true
true
f714a098ed7801e900ae6b4770cd7b10a0067882
301
py
Python
hackerrank/an-interesting-game-1/solution.py
SamProkopchuk/coding-problems
fa0ca2c05ac90e41945de1a5751e5545a8459ac4
[ "MIT" ]
null
null
null
hackerrank/an-interesting-game-1/solution.py
SamProkopchuk/coding-problems
fa0ca2c05ac90e41945de1a5751e5545a8459ac4
[ "MIT" ]
null
null
null
hackerrank/an-interesting-game-1/solution.py
SamProkopchuk/coding-problems
fa0ca2c05ac90e41945de1a5751e5545a8459ac4
[ "MIT" ]
null
null
null
for _ in range(int(input())): n = int(input()) rounds = 0 minidx = 1_000_000_000 for _, idx in sorted(zip(map(int, input().split()), range(n)), reverse=True): if idx < minidx: minidx = idx rounds += 1 print("BOB" if rounds % 2 else "ANDY")
30.1
82
0.521595
for _ in range(int(input())): n = int(input()) rounds = 0 minidx = 1_000_000_000 for _, idx in sorted(zip(map(int, input().split()), range(n)), reverse=True): if idx < minidx: minidx = idx rounds += 1 print("BOB" if rounds % 2 else "ANDY")
true
true
f714a0caf548812f27ce214b01b5f8336d284c42
4,545
py
Python
note12/download_text_data.py
zhuyawen/LearnPaddle2
c2ed0cea1634159b1f005a0d2d954ce44b51b739
[ "Apache-2.0" ]
163
2019-01-30T04:34:01.000Z
2021-12-10T12:19:03.000Z
note12/download_text_data.py
stonebb/LearnPaddle2
c3b6a9f5897e684b6de544cb12c959f7771a6c3c
[ "Apache-2.0" ]
3
2019-07-15T07:14:17.000Z
2022-03-24T01:14:06.000Z
note12/download_text_data.py
stonebb/LearnPaddle2
c3b6a9f5897e684b6de544cb12c959f7771a6c3c
[ "Apache-2.0" ]
83
2018-10-31T02:44:09.000Z
2022-03-25T13:40:54.000Z
import os import random import requests import json import time # 分类新闻参数 news_classify = [ [0, '民生', 'news_story'], [1, '文化', 'news_culture'], [2, '娱乐', 'news_entertainment'], [3, '体育', 'news_sports'], [4, '财经', 'news_finance'], [5, '房产', 'news_house'], [6, '汽车', 'news_car'], [7, '教育', ...
40.945946
475
0.572937
import os import random import requests import json import time news_classify = [ [0, '民生', 'news_story'], [1, '文化', 'news_culture'], [2, '娱乐', 'news_entertainment'], [3, '体育', 'news_sports'], [4, '财经', 'news_finance'], [5, '房产', 'news_house'], [6, '汽车', 'news_car'], [7, '教育', 'news_edu...
true
true
f714a1b02ca1276050523ec8c90956dae69d86bf
3,521
py
Python
tools/emprofile.py
talrasha/emscripten
5ece531a4bc724b133da0e1b0ce061e0c2e7bebd
[ "MIT" ]
1
2021-06-15T20:40:30.000Z
2021-06-15T20:40:30.000Z
tools/emprofile.py
talrasha/emscripten
5ece531a4bc724b133da0e1b0ce061e0c2e7bebd
[ "MIT" ]
null
null
null
tools/emprofile.py
talrasha/emscripten
5ece531a4bc724b133da0e1b0ce061e0c2e7bebd
[ "MIT" ]
null
null
null
#!/usr/bin/env python # Copyright 2016 The Emscripten Authors. All rights reserved. # Emscripten is available under two separate licenses, the MIT license and the # University of Illinois/NCSA Open Source License. Both these licenses can be # found in the LICENSE file. import json import os import shutil import sys ...
32.302752
197
0.650099
import json import os import shutil import sys import tempfile import time profiler_logs_path = os.path.join(tempfile.gettempdir(), 'emscripten_toolchain_profiler_logs') OUTFILE = 'emprofile.' + time.strftime('%Y%m%d_%H%M') for i in range(len(sys.argv)): arg = sys.argv[i] if arg.startswith('--outfile=') or arg.s...
true
true
f714a32598047c41a41ca8c84b2495aad909f3ac
829
py
Python
QiuBaiSpider/spider_main.py
lidenghong1/SmallReptileTraining
a1bfb81c9969edfb7554acc50370c0cb036da690
[ "MIT" ]
133
2017-06-10T02:18:00.000Z
2022-01-08T03:29:08.000Z
QiuBaiSpider/spider_main.py
ljj2666/SmallReptileTraining
b6253e835120da457c416fbf4a012e545d9c70ad
[ "MIT" ]
null
null
null
QiuBaiSpider/spider_main.py
ljj2666/SmallReptileTraining
b6253e835120da457c416fbf4a012e545d9c70ad
[ "MIT" ]
212
2017-06-14T03:29:22.000Z
2022-01-29T15:14:47.000Z
from QiuBaiSpider.pymysqldb_manager import DbManager from QiuBaiSpider.page_items import PageItems from QiuBaiSpider.tools import Tools ''' 爬取糗事百科笑话剔除正文DOM标签然后将爬取数据存入MySQL数据库 Extra module: PyMySQL ''' class Main(object): def __init__(self, max_page=1): self.max_page = max_page self.db_manager = Db...
24.382353
63
0.679131
from QiuBaiSpider.pymysqldb_manager import DbManager from QiuBaiSpider.page_items import PageItems from QiuBaiSpider.tools import Tools class Main(object): def __init__(self, max_page=1): self.max_page = max_page self.db_manager = DbManager() def run(self): self.db_manager.connect() ...
true
true
f714a3eab380aa3fea7349fb1fb1cb7718fcf9fb
2,713
py
Python
test/pyaz/acr/helm/__init__.py
bigdatamoore/py-az-cli
54383a4ee7cc77556f6183e74e992eec95b28e01
[ "MIT" ]
null
null
null
test/pyaz/acr/helm/__init__.py
bigdatamoore/py-az-cli
54383a4ee7cc77556f6183e74e992eec95b28e01
[ "MIT" ]
9
2021-09-24T16:37:24.000Z
2021-12-24T00:39:19.000Z
test/pyaz/acr/helm/__init__.py
bigdatamoore/py-az-cli
54383a4ee7cc77556f6183e74e992eec95b28e01
[ "MIT" ]
null
null
null
import json, subprocess from ... pyaz_utils import get_cli_name, get_params def list(name, repository=None, resource_group=None, suffix=None, username=None, password=None): params = get_params(locals()) command = "az acr helm list " + params print(command) output = subprocess.run(command, shell=Tru...
36.662162
133
0.669001
import json, subprocess from ... pyaz_utils import get_cli_name, get_params def list(name, repository=None, resource_group=None, suffix=None, username=None, password=None): params = get_params(locals()) command = "az acr helm list " + params print(command) output = subprocess.run(command, shell=Tru...
true
true
f714a4d032c0d9c04d96fb38385edc266e67dc16
516
py
Python
worker/Facebook/service1/main.py
OmarZOS/remote-extraction-proxy-and-worker
739466a0df588d7eb5b1dae9666ceb8c7a25e928
[ "MIT" ]
null
null
null
worker/Facebook/service1/main.py
OmarZOS/remote-extraction-proxy-and-worker
739466a0df588d7eb5b1dae9666ceb8c7a25e928
[ "MIT" ]
10
2022-03-17T23:23:18.000Z
2022-03-18T00:15:11.000Z
worker/Facebook/service1/main.py
OmarZOS/remote-extraction-proxy-and-worker
739466a0df588d7eb5b1dae9666ceb8c7a25e928
[ "MIT" ]
1
2022-03-24T23:56:46.000Z
2022-03-24T23:56:46.000Z
from http import cookies from Extractor import Extractor from context import Context import networkx as nx from facebook_scraper import get_posts,get_friends,get_profile,get_group_info cxt=Context(account,creds,limit_post,limit_friends,max,post,False,True) #print(get_profile("100009975842374")) #prin...
17.793103
77
0.813953
from http import cookies from Extractor import Extractor from context import Context import networkx as nx from facebook_scraper import get_posts,get_friends,get_profile,get_group_info cxt=Context(account,creds,limit_post,limit_friends,max,post,False,True) ex =Extractor('Fb',cxt,Schema,cookie) ex.cr...
true
true
f714a58617a8965d0d4cc18d282b5dffc7518090
4,801
py
Python
main.py
ammar-khan/raspberry-pi-opencv-dnn-face-detection
04ea998ee9e4d7bf71da022b0d8613940e8e7cfb
[ "MIT" ]
3
2018-10-25T05:01:13.000Z
2021-01-22T11:29:15.000Z
main.py
ammar-khan/raspberry-pi-opencv-dnn-face-detection
04ea998ee9e4d7bf71da022b0d8613940e8e7cfb
[ "MIT" ]
null
null
null
main.py
ammar-khan/raspberry-pi-opencv-dnn-face-detection
04ea998ee9e4d7bf71da022b0d8613940e8e7cfb
[ "MIT" ]
1
2019-08-24T19:22:04.000Z
2019-08-24T19:22:04.000Z
## # Copyright 2018, Ammar Ali Khan # Licensed under MIT. # Since: v1.0.0 ## import time import cv2 import numpy as np from src.common.package.config import application from src.opencv.package.config import application as _application from src.common.package.http import server as _server from src.common.package.http.h...
34.789855
109
0.534264
import time import cv2 import numpy as np from src.common.package.config import application from src.opencv.package.config import application as _application from src.common.package.http import server as _server from src.common.package.http.handler import Handler from src.common.package.camera.capture import Capture a...
true
true
f714a5f04300870022842049f2926bc20c34e5c2
4,647
py
Python
nova/tests/functional/libvirt/test_live_migration.py
muraliselva10/nova
97626394bcce5c8cd020b136ca54a6aa919eb3a9
[ "Apache-2.0" ]
1
2022-02-24T08:49:48.000Z
2022-02-24T08:49:48.000Z
nova/tests/functional/libvirt/test_live_migration.py
muraliselva10/nova
97626394bcce5c8cd020b136ca54a6aa919eb3a9
[ "Apache-2.0" ]
null
null
null
nova/tests/functional/libvirt/test_live_migration.py
muraliselva10/nova
97626394bcce5c8cd020b136ca54a6aa919eb3a9
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
39.381356
75
0.663869
import threading from lxml import etree from nova.tests.functional import integrated_helpers from nova.tests.functional.libvirt import base as libvirt_base class LiveMigrationQueuedAbortTest( libvirt_base.LibvirtMigrationMixin, libvirt_base.ServersTestBase, integrated_helpers.InstanceHelperMixin ): ...
true
true
f714a5ff5c93a84a57edfda15f6f4e42f0eb012f
175
py
Python
run.py
B02902008/TaipeiWater
7364ce0bdfafddb7448cd8943c0c048f1a199dda
[ "MIT" ]
null
null
null
run.py
B02902008/TaipeiWater
7364ce0bdfafddb7448cd8943c0c048f1a199dda
[ "MIT" ]
null
null
null
run.py
B02902008/TaipeiWater
7364ce0bdfafddb7448cd8943c0c048f1a199dda
[ "MIT" ]
null
null
null
from app import app if __name__ == '__main__': context = ('/etc/ssl/certificate.crt', '/etc/ssl/private.key') app.run(host='0.0.0.0', port=8443, ssl_context=context)
29.166667
66
0.668571
from app import app if __name__ == '__main__': context = ('/etc/ssl/certificate.crt', '/etc/ssl/private.key') app.run(host='0.0.0.0', port=8443, ssl_context=context)
true
true