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
08fe2dea91932d463e333a5944d8d0c9020b4e1c
1,399
py
Python
libmodernize/fixes/fix_sha_md5.py
adhintz/python-modernize
e6664a82d1033129ff3f65e5273703bf32da9fa0
[ "BSD-3-Clause" ]
null
null
null
libmodernize/fixes/fix_sha_md5.py
adhintz/python-modernize
e6664a82d1033129ff3f65e5273703bf32da9fa0
[ "BSD-3-Clause" ]
null
null
null
libmodernize/fixes/fix_sha_md5.py
adhintz/python-modernize
e6664a82d1033129ff3f65e5273703bf32da9fa0
[ "BSD-3-Clause" ]
null
null
null
"""Replace sha and md5 with hashlib.""" from __future__ import absolute_import from lib2to3 import fixer_base class FixShaMd5(fixer_base.BaseFix): import_found = False PATTERN = """ import_name< 'import' (modulename='sha' | modulename='md5') > | power< sha='sha' trailer< '.' (new='n...
31.795455
131
0.491065
from __future__ import absolute_import from lib2to3 import fixer_base class FixShaMd5(fixer_base.BaseFix): import_found = False PATTERN = """ import_name< 'import' (modulename='sha' | modulename='md5') > | power< sha='sha' trailer< '.' (new='new' | new='sha') > trailer< '(' [any] ')...
true
true
08fe2f3738c7226fb0e33043ab45306f41016b24
875
py
Python
cn/PyTorch/demo_1/demo.py
Jasonandy/Python-X
2f02b9a17bd5495dd1f8746b191f11ec2d7bccbe
[ "Apache-2.0" ]
null
null
null
cn/PyTorch/demo_1/demo.py
Jasonandy/Python-X
2f02b9a17bd5495dd1f8746b191f11ec2d7bccbe
[ "Apache-2.0" ]
null
null
null
cn/PyTorch/demo_1/demo.py
Jasonandy/Python-X
2f02b9a17bd5495dd1f8746b191f11ec2d7bccbe
[ "Apache-2.0" ]
2
2019-06-18T05:53:26.000Z
2019-06-19T03:26:02.000Z
# coding=utf-8 import torch import torch.nn as nn from torch.autograd import Variable m = nn.LeakyReLU(0.1) input = Variable(torch.randn(2)) print(input) print '---' * 10 print(m(input)) print '--' * 10 r = nn.ReLU() print r(input) m = nn.Threshold(0.1, 20) input = Variable(torch.randn(2)) print(input) print(m(input)...
19.021739
84
0.690286
import torch import torch.nn as nn from torch.autograd import Variable m = nn.LeakyReLU(0.1) input = Variable(torch.randn(2)) print(input) print '---' * 10 print(m(input)) print '--' * 10 r = nn.ReLU() print r(input) m = nn.Threshold(0.1, 20) input = Variable(torch.randn(2)) print(input) print(m(input)) m = nn.Sigmo...
true
true
08fe32aa9044c49e51038dc1d87f6dbbc4fcaa22
1,097
py
Python
tests/test_imageObject.py
jhunkeler/drizzlepac
09ca153b8e4f4e03dd155c61243d722e1c40caee
[ "BSD-3-Clause" ]
28
2016-08-16T04:16:32.000Z
2022-03-27T15:39:29.000Z
tests/test_imageObject.py
jhunkeler/drizzlepac
09ca153b8e4f4e03dd155c61243d722e1c40caee
[ "BSD-3-Clause" ]
822
2016-03-10T01:19:28.000Z
2022-03-30T20:25:34.000Z
tests/test_imageObject.py
jhunkeler/drizzlepac
09ca153b8e4f4e03dd155c61243d722e1c40caee
[ "BSD-3-Clause" ]
33
2016-03-16T19:18:03.000Z
2021-12-27T04:20:44.000Z
#!/usr/bin/env python import pytest from drizzlepac import imageObject #from http://blog.moertel.com/articles/2008/03/19/property-checking-with-pythons-nose-testing-framework def forall_cases(cases): def decorate(testfn): def gen(): for case in cases: yield testfn, case ...
31.342857
103
0.678213
import pytest from drizzlepac import imageObject def forall_cases(cases): def decorate(testfn): def gen(): for case in cases: yield testfn, case gen.__name__ = "test_%s_for_a_case" % testfn.__name__ return gen return decorate @pytest.mark.xfail(reason="Bro...
true
true
08fe32df19b8f40c796cafcb0e46fcce7248bb98
4,553
py
Python
Community_Water_Model/CWATM_analyze/plot_indus5min_temperature_worldclim.py
amirsarikhani/NEST
2771f6593bca0827489359c4129db9eea439d036
[ "Apache-2.0" ]
8
2019-07-15T19:28:36.000Z
2021-06-24T04:45:43.000Z
Community_Water_Model/CWATM_analyze/plot_indus5min_temperature_worldclim.py
amirsarikhani/NEST
2771f6593bca0827489359c4129db9eea439d036
[ "Apache-2.0" ]
1
2020-10-19T15:49:34.000Z
2020-10-19T15:49:34.000Z
Community_Water_Model/CWATM_analyze/plot_indus5min_temperature_worldclim.py
amirsarikhani/NEST
2771f6593bca0827489359c4129db9eea439d036
[ "Apache-2.0" ]
7
2019-05-20T08:50:22.000Z
2022-03-08T03:35:08.000Z
# -*- coding: utf-8 -*- """ Created on Thu Jun 14 12:12:11 2018 @author: wangy Compare the annual mean temperature in the Indus River Basin in the WorldClim dataset and the WFDEI dataset """ import xarray as xr import pandas as pd import numpy as np import matplotlib.pyplot as plt import os import matplotlib.colors ...
36.134921
82
0.594114
import xarray as xr import pandas as pd import numpy as np import matplotlib.pyplot as plt import os import matplotlib.colors as colors import rasterio.features as rf from shapely.geometry import shape import fiona from affine import Affine from calcAffine import calcAffine dom = [31,28.25,31,30,31,30,31,31,30,31,30,...
true
true
08fe32e31e404e21c61e46b04d30167e77433644
1,805
py
Python
pymux/daemonize.py
jonathanslenders/old-pymux
f5b0562ae880a0e0c26df0fa7954ae60dc92cc62
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
pymux/daemonize.py
jonathanslenders/old-pymux
f5b0562ae880a0e0c26df0fa7954ae60dc92cc62
[ "BSD-2-Clause-FreeBSD" ]
1
2016-08-10T22:36:09.000Z
2016-08-10T22:36:09.000Z
pymux/daemonize.py
jonathanslenders/old-pymux
f5b0562ae880a0e0c26df0fa7954ae60dc92cc62
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
""" Double fork-trick. For starting a posix daemon. http://code.activestate.com/recipes/66012-fork-a-daemon-process-on-unix/ """ import os import sys def daemonize(stdin='/dev/null', stdout='/dev/null', stderr='/dev/null'): '''This forks the current process into a daemon. The stdin, stdout, and stderr argume...
29.590164
82
0.603324
import os import sys def daemonize(stdin='/dev/null', stdout='/dev/null', stderr='/dev/null'): try: pid = os.fork() if pid > 0: return 0 except OSError as e: sys.stderr.write("fork #1 failed: (%d) %s\n" % (e.errno, e.strerror) ) sys.exit(1) ...
true
true
08fe33da9ba858229bc4e4f9fa55fb7532fadd02
1,058
py
Python
test/test_group_edit.py
Alimury/Python_lesson
8e97632fd9f1eaf4ec3cd878280333e1409beb52
[ "Apache-2.0" ]
null
null
null
test/test_group_edit.py
Alimury/Python_lesson
8e97632fd9f1eaf4ec3cd878280333e1409beb52
[ "Apache-2.0" ]
null
null
null
test/test_group_edit.py
Alimury/Python_lesson
8e97632fd9f1eaf4ec3cd878280333e1409beb52
[ "Apache-2.0" ]
1
2020-12-29T17:55:13.000Z
2020-12-29T17:55:13.000Z
# -*- coding: utf-8 -*- from model.group import Group import random #import allure def test_edit_group_name(app, db, check_ui): # with allure.step("Given if the list is empty new group"): if len(db.get_group_list()) == 0: app.group.create(Group(name="test4")) # with allure.step("Given remembering a g...
44.083333
113
0.708885
from model.group import Group import random def test_edit_group_name(app, db, check_ui): if len(db.get_group_list()) == 0: app.group.create(Group(name="test4")) old_groups = db.get_group_list() edit_group = random.choice(old_groups) new_group_data = Group(name="test5") app.group.modify_grou...
true
true
08fe351a9fabe4e2447aad7e48fc2310d6a6ad44
3,916
py
Python
resources/en/docs/3/origin_destination_matrix/scripts/matrix_to_routes.py
spatialthoughts/qgis-tutorials
dc1c6027de72e4875d8d5428fbc1f453b51e0468
[ "CC-BY-4.0" ]
34
2015-05-11T14:54:47.000Z
2022-02-11T06:16:48.000Z
resources/en/docs/3/origin_destination_matrix/scripts/matrix_to_routes.py
Santhosh-M31/qgis-tutorials
d22c534219689cff663b9b91b7d6e0e658f83b0d
[ "CC-BY-4.0" ]
16
2016-04-20T10:52:10.000Z
2022-01-08T13:57:11.000Z
resources/en/docs/3/origin_destination_matrix/scripts/matrix_to_routes.py
Santhosh-M31/qgis-tutorials
d22c534219689cff663b9b91b7d6e0e658f83b0d
[ "CC-BY-4.0" ]
34
2015-07-23T11:13:22.000Z
2021-12-19T05:50:11.000Z
import requests import processing from PyQt5.QtCore import QCoreApplication from qgis.core import (QgsProcessing, QgsProcessingAlgorithm, QgsProcessingParameterFeatureSource, QgsProcessingParameterFeatureSink, QgsFeatureSink) class MatrixToRoutes(QgsProcessingAlgorithm): """Creats Routes from Distance Ma...
32.633333
93
0.573544
import requests import processing from PyQt5.QtCore import QCoreApplication from qgis.core import (QgsProcessing, QgsProcessingAlgorithm, QgsProcessingParameterFeatureSource, QgsProcessingParameterFeatureSink, QgsFeatureSink) class MatrixToRoutes(QgsProcessingAlgorithm): NETWORK = 'NETWORK' MATRIX = ...
true
true
08fe35bb212ab1820bfbc1cf6d988eb4a03fb3cf
11,467
py
Python
tutorials/blitz/3_message_passing.py
kyawlin/dgl
4579bbf7b7254eee84a9cba14f26808df8b00c09
[ "Apache-2.0" ]
42
2021-07-01T11:03:17.000Z
2022-03-30T07:40:01.000Z
tutorials/blitz/3_message_passing.py
kyawlin/dgl
4579bbf7b7254eee84a9cba14f26808df8b00c09
[ "Apache-2.0" ]
6
2018-12-13T15:22:08.000Z
2021-04-22T02:40:27.000Z
tutorials/blitz/3_message_passing.py
kyawlin/dgl
4579bbf7b7254eee84a9cba14f26808df8b00c09
[ "Apache-2.0" ]
6
2021-07-07T10:04:13.000Z
2021-12-11T15:03:50.000Z
""" Write your own GNN module ========================= Sometimes, your model goes beyond simply stacking existing GNN modules. For example, you would like to invent a new way of aggregating neighbor information by considering node importance or edge weights. By the end of this tutorial you will be able to - Unders...
31.941504
116
0.578617
import dgl import torch import torch.nn as nn import torch.nn.functional as F import dgl.function as fn class SAGEConv(nn.Module): def __init__(self, in_feat, out_feat): super(SAGEConv, self).__init__() self.linear = nn.Linear(in_feat * 2, out_feat) def forward(self, g, h): ...
true
true
08fe35d757669bcc94e745984e78988ff733c008
2,880
py
Python
test/tokeniser.py
Leoprvn/DataQuest
f79076309c4a41aa46b913f1645abcc82ccc581b
[ "Apache-2.0" ]
1
2020-09-30T15:08:55.000Z
2020-09-30T15:08:55.000Z
test/tokeniser.py
Leoprvn/DataQuest
f79076309c4a41aa46b913f1645abcc82ccc581b
[ "Apache-2.0" ]
null
null
null
test/tokeniser.py
Leoprvn/DataQuest
f79076309c4a41aa46b913f1645abcc82ccc581b
[ "Apache-2.0" ]
null
null
null
""" This module is to tokenise data """ import sys from pyspark.sql import SparkSession import pyspark.sql.functions as fn def arg_validate(): """ Validated the argument :return: if the validation fails, comes out of the script """ if len(sys.argv) < 2: print("Please pass val...
29.690722
94
0.628472
import sys from pyspark.sql import SparkSession import pyspark.sql.functions as fn def arg_validate(): if len(sys.argv) < 2: print("Please pass valid arguments") print("Execution: tokeniser.py <csv_file_input> <output_folder_name>") print("Example: tokeniser.py '/opt/io_folder/in...
true
true
08fe36382534a56718d8ef73ef49d2c8f27aa217
422
py
Python
plotly/validators/layout/xaxis/_showgrid.py
faezs/plotly.py
6009b5b9c746e5d2a2849ad255a4eb234b551ed7
[ "MIT" ]
2
2020-03-24T11:41:14.000Z
2021-01-14T07:59:43.000Z
plotly/validators/layout/xaxis/_showgrid.py
faezs/plotly.py
6009b5b9c746e5d2a2849ad255a4eb234b551ed7
[ "MIT" ]
null
null
null
plotly/validators/layout/xaxis/_showgrid.py
faezs/plotly.py
6009b5b9c746e5d2a2849ad255a4eb234b551ed7
[ "MIT" ]
4
2019-06-03T14:49:12.000Z
2022-01-06T01:05:12.000Z
import _plotly_utils.basevalidators class ShowgridValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__( self, plotly_name='showgrid', parent_name='layout.xaxis', **kwargs ): super(ShowgridValidator, self).__init__( plotly_name=plotly_name, parent_name...
26.375
74
0.632701
import _plotly_utils.basevalidators class ShowgridValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__( self, plotly_name='showgrid', parent_name='layout.xaxis', **kwargs ): super(ShowgridValidator, self).__init__( plotly_name=plotly_name, parent_name...
true
true
08fe3697fea306a68b5312b74bd1925b8c549734
867
py
Python
tests/test_config.py
fossabot/OpenTAXII
cb267fc3f5b17b72e16a52bf8a5cbf7a7789e9ad
[ "BSD-Source-Code" ]
1
2022-03-24T09:47:26.000Z
2022-03-24T09:47:26.000Z
tests/test_config.py
fossabot/OpenTAXII
cb267fc3f5b17b72e16a52bf8a5cbf7a7789e9ad
[ "BSD-Source-Code" ]
1
2019-04-12T08:48:38.000Z
2019-04-12T08:48:38.000Z
tests/test_config.py
fossabot/OpenTAXII
cb267fc3f5b17b72e16a52bf8a5cbf7a7789e9ad
[ "BSD-Source-Code" ]
1
2021-02-09T15:00:22.000Z
2021-02-09T15:00:22.000Z
import os import tempfile import pytest from opentaxii.config import ServerConfig CUSTOM_CONFIG = ''' --- dummy: some persistence_api: class: some.test.PersistenceClass parameters: a: 1 b: 2 auth_api: class: other.test.AuthClass parameters: c: 3 ''' @pytest.yield_fixture def config_file_name(co...
21.675
77
0.698962
import os import tempfile import pytest from opentaxii.config import ServerConfig CUSTOM_CONFIG = ''' --- dummy: some persistence_api: class: some.test.PersistenceClass parameters: a: 1 b: 2 auth_api: class: other.test.AuthClass parameters: c: 3 ''' @pytest.yield_fixture def config_file_name(co...
true
true
08fe36edd934036b4d685e4f3fc1f308d7c86492
2,594
py
Python
demo_pkg/site_pkg_adds/app_demo.py
aristanetworks/DirectFlowAssist
16c594cb42edd8aa084c6dbb931c87bbdff81ed0
[ "Apache-2.0" ]
null
null
null
demo_pkg/site_pkg_adds/app_demo.py
aristanetworks/DirectFlowAssist
16c594cb42edd8aa084c6dbb931c87bbdff81ed0
[ "Apache-2.0" ]
null
null
null
demo_pkg/site_pkg_adds/app_demo.py
aristanetworks/DirectFlowAssist
16c594cb42edd8aa084c6dbb931c87bbdff81ed0
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python2.7 # # Copyright (c) 2014-2015 Arista Networks, Inc. All rights reserved. # Arista Networks, Inc. Confidential and Proprietary. # # pylint: disable = unused-argument ''' main entry point for DirectFlow Assist demo ''' from common import utils import DemoController import config import app cla...
35.054054
78
0.558982
''' main entry point for DirectFlow Assist demo ''' from common import utils import DemoController import config import app class AssistDemo(app.Assist, object): ''' main entry point for DirectFlow Assist demo ''' def __init__(self): super(AssistDemo, self).__init__() def run_demo(self, arg...
false
true
08fe375908549392ab47082d7dc4fffc5f182d25
3,620
py
Python
huaweicloud-sdk-vod/huaweicloudsdkvod/v1/model/vod_sample_data.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
64
2020-06-12T07:05:07.000Z
2022-03-30T03:32:50.000Z
huaweicloud-sdk-vod/huaweicloudsdkvod/v1/model/vod_sample_data.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
11
2020-07-06T07:56:54.000Z
2022-01-11T11:14:40.000Z
huaweicloud-sdk-vod/huaweicloudsdkvod/v1/model/vod_sample_data.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
24
2020-06-08T11:42:13.000Z
2022-03-04T06:44:08.000Z
# coding: utf-8 import re import six from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization class VodSampleData: """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is a...
25.492958
79
0.541989
import re import six from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization class VodSampleData: sensitive_list = [] openapi_types = { 'storage': 'float', 'transcode': 'int' } attribute_map = { 'storage': 'storage', 'transcode': 'transcode' ...
true
true
08fe38840e6730270bc3e70dadd827ad413cb9d5
4,189
py
Python
refer/train_cartoon_wgan.py
zampie/GAN_framework
8e2ff764b08b9199916fef66e49332ef7d21ae32
[ "MIT" ]
1
2019-12-09T12:51:16.000Z
2019-12-09T12:51:16.000Z
refer/train_cartoon_wgan.py
zampie/GAN-tensorflow-framework
8e2ff764b08b9199916fef66e49332ef7d21ae32
[ "MIT" ]
null
null
null
refer/train_cartoon_wgan.py
zampie/GAN-tensorflow-framework
8e2ff764b08b9199916fef66e49332ef7d21ae32
[ "MIT" ]
null
null
null
from __future__ import division from __future__ import print_function from __future__ import absolute_import import glob import utils import traceback import numpy as np import tensorflow as tf import models_64x64 as models """ param """ epoch = 100 batch_size = 64 lr = 0.0002 z_dim = 100 clip = 0.01 n_critic = 5 gp...
29.293706
135
0.645978
from __future__ import division from __future__ import print_function from __future__ import absolute_import import glob import utils import traceback import numpy as np import tensorflow as tf import models_64x64 as models epoch = 100 batch_size = 64 lr = 0.0002 z_dim = 100 clip = 0.01 n_critic = 5 gpu_id = 0 de...
true
true
08fe39419fba136958d6c307ecc9726761347d46
2,100
py
Python
assignments/2021/assignment1/cs231n/optim.py
Bitdribble/cs231n
08cc359b91107fb2f7cb68e16eb703b6bd3d2176
[ "MIT" ]
null
null
null
assignments/2021/assignment1/cs231n/optim.py
Bitdribble/cs231n
08cc359b91107fb2f7cb68e16eb703b6bd3d2176
[ "MIT" ]
null
null
null
assignments/2021/assignment1/cs231n/optim.py
Bitdribble/cs231n
08cc359b91107fb2f7cb68e16eb703b6bd3d2176
[ "MIT" ]
null
null
null
import numpy as np """ This file implements various first-order update rules that are commonly used for training neural networks. Each update rule accepts current weights and the gradient of the loss with respect to those weights and produces the next set of weights. Each update rule has the same interface: def updat...
38.181818
79
0.594286
import numpy as np def sgd(w, dw, config=None): if config is None: config = {} config.setdefault("learning_rate", 1e-2) w = w - dw * config.get("learning_rate") return w, config
true
true
08fe39fd2d30b99bdf31c411201738d79c669881
778
py
Python
final_project/server.py
David-Coutinho/xzceb-flask_eng_fr
2ccd6f08907bfd7147b7e639ae4d3cb51aaf4edb
[ "Apache-2.0" ]
null
null
null
final_project/server.py
David-Coutinho/xzceb-flask_eng_fr
2ccd6f08907bfd7147b7e639ae4d3cb51aaf4edb
[ "Apache-2.0" ]
null
null
null
final_project/server.py
David-Coutinho/xzceb-flask_eng_fr
2ccd6f08907bfd7147b7e639ae4d3cb51aaf4edb
[ "Apache-2.0" ]
null
null
null
from machinetranslation import translator from flask import Flask, render_template, request import json import machinetranslation app = Flask("Web Translator") @app.route("/englishToFrench") def englishToFrench(): textToTranslate = request.args.get('textToTranslate') # Write your code here return machinet...
27.785714
73
0.75964
from machinetranslation import translator from flask import Flask, render_template, request import json import machinetranslation app = Flask("Web Translator") @app.route("/englishToFrench") def englishToFrench(): textToTranslate = request.args.get('textToTranslate') return machinetranslation.translator.e...
true
true
08fe3bdb4e9a51845e3fefe2fbc0b130712ad76c
1,046
py
Python
setup.py
thesharp/Leaf
0eb8ff8e4a9899ea4f09e8a85b5f88257ff16510
[ "MIT" ]
null
null
null
setup.py
thesharp/Leaf
0eb8ff8e4a9899ea4f09e8a85b5f88257ff16510
[ "MIT" ]
null
null
null
setup.py
thesharp/Leaf
0eb8ff8e4a9899ea4f09e8a85b5f88257ff16510
[ "MIT" ]
null
null
null
#!/usr/bin/env python # encoding: utf-8 from setuptools import setup, find_packages import os.path def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup(name='leaf', version='0.4.5', description='Simple Python library for HTML parsing', author='Roman Koblov', au...
30.764706
70
0.606119
from setuptools import setup, find_packages import os.path def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup(name='leaf', version='0.4.5', description='Simple Python library for HTML parsing', author='Roman Koblov', author_email='pingu.g@gmail.com', url=...
true
true
08fe3cc383c151fa1bc647ee6d68784719eb4f84
446
py
Python
Computer Programming 2021-1 Python/Parcial1/Conversion.py
jdramirezl/Teacher-Assistant
9a79270abbb491967ecc5146969bf4ff1166cf3b
[ "MIT" ]
null
null
null
Computer Programming 2021-1 Python/Parcial1/Conversion.py
jdramirezl/Teacher-Assistant
9a79270abbb491967ecc5146969bf4ff1166cf3b
[ "MIT" ]
null
null
null
Computer Programming 2021-1 Python/Parcial1/Conversion.py
jdramirezl/Teacher-Assistant
9a79270abbb491967ecc5146969bf4ff1166cf3b
[ "MIT" ]
null
null
null
''' Dolar = 3.450 Dolar a peso ''' # ---------------------------------------------------------------- # Dolar a peso dolares = float(input("Ingrese cantidad de dolares")) precio_dolar = 3450 multiplicacion = dolares * precio_dolar print(multiplicacion) # --------------------------------------------------------------...
22.3
66
0.508969
dolares = float(input("Ingrese cantidad de dolares")) precio_dolar = 3450 multiplicacion = dolares * precio_dolar print(multiplicacion) pesos = float(input("Ingrese pesos: ")) precio_dolar = 3450 dolares = pesos / precio_dolar print(dolares)
true
true
08fe3d8214488bda9070aa8de802dfe11bc2980f
835
py
Python
tests/samples_test.py
DiddiZ/donk.ai
ccf9a00fb22203a8ab351a5d559d927e6ebfc318
[ "MIT" ]
null
null
null
tests/samples_test.py
DiddiZ/donk.ai
ccf9a00fb22203a8ab351a5d559d927e6ebfc318
[ "MIT" ]
5
2021-09-14T06:45:44.000Z
2022-03-09T15:02:13.000Z
tests/samples_test.py
DiddiZ/donk.ai
ccf9a00fb22203a8ab351a5d559d927e6ebfc318
[ "MIT" ]
null
null
null
import unittest import numpy as np from numpy.testing import assert_array_equal class Test_TransitionPool(unittest.TestCase): def test_add(self): """Test TransitionPool.add().""" from donk.samples import TransitionPool N, T, dX, dU = 3, 10, 5, 3 rng = np.random.defa...
29.821429
130
0.559281
import unittest import numpy as np from numpy.testing import assert_array_equal class Test_TransitionPool(unittest.TestCase): def test_add(self): from donk.samples import TransitionPool N, T, dX, dU = 3, 10, 5, 3 rng = np.random.default_rng(0) X = rng.standard_nor...
true
true
08fe3e0e66aa9ef121aabe37b5e9d42ea9848d77
1,484
py
Python
src/routers/token.py
andrew-chang-dewitt/hoops-api
3530c5127c35742aad84df8d6a5286b9f5ad3608
[ "MIT" ]
null
null
null
src/routers/token.py
andrew-chang-dewitt/hoops-api
3530c5127c35742aad84df8d6a5286b9f5ad3608
[ "MIT" ]
10
2021-11-02T23:31:56.000Z
2021-12-07T03:41:12.000Z
src/routers/token.py
andrew-chang-dewitt/hoops
3530c5127c35742aad84df8d6a5286b9f5ad3608
[ "MIT" ]
null
null
null
"""Routes under `/token`.""" from db_wrapper.model.base import NoResultFound from fastapi import Depends from fastapi.routing import APIRouter from fastapi.security import OAuth2PasswordRequestForm from src.config import Config from src.database import Client from src.models import ( UserOut, UserModel as Mod...
30.285714
74
0.679919
from db_wrapper.model.base import NoResultFound from fastapi import Depends from fastapi.routing import APIRouter from fastapi.security import OAuth2PasswordRequestForm from src.config import Config from src.database import Client from src.models import ( UserOut, UserModel as Model, Token ) from src.secu...
true
true
08fe3e5276604a2eab2187101b871f15a172e613
369
py
Python
commands/kick.py
b0tdev/ProdigyBot
6840ee517533097a7097c90013be978476a35d63
[ "MIT" ]
null
null
null
commands/kick.py
b0tdev/ProdigyBot
6840ee517533097a7097c90013be978476a35d63
[ "MIT" ]
null
null
null
commands/kick.py
b0tdev/ProdigyBot
6840ee517533097a7097c90013be978476a35d63
[ "MIT" ]
1
2019-07-25T16:07:59.000Z
2019-07-25T16:07:59.000Z
import discord from discord.ext import commands bot = commands.Bot(command_prefix=".") @bot.command(name="kick", description="Kicks the User", hidden=False) async def kick(ctx, user: discord.Member): await ctx.send(" {} Has been kicked!".format(user.mention)) await user.send("You have been kicked from {}.".fo...
28.384615
75
0.704607
import discord from discord.ext import commands bot = commands.Bot(command_prefix=".") @bot.command(name="kick", description="Kicks the User", hidden=False) async def kick(ctx, user: discord.Member): await ctx.send(" {} Has been kicked!".format(user.mention)) await user.send("You have been kicked from {}.".fo...
true
true
08fe3eafbfc25d8a2a526d4c3d42ea8665737c79
797
py
Python
setup.py
sharksmhi/sharkpylib
2a1d3cf3c15729e50525ab8da5920b6f9bb3faf2
[ "MIT" ]
null
null
null
setup.py
sharksmhi/sharkpylib
2a1d3cf3c15729e50525ab8da5920b6f9bb3faf2
[ "MIT" ]
null
null
null
setup.py
sharksmhi/sharkpylib
2a1d3cf3c15729e50525ab8da5920b6f9bb3faf2
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages import os from sharkpylib import __version__ include_files = [] for root, dirs, files in os.walk('.', topdown=False): for name in files: if name.endswith('.txt') or name.endswith('.json'): file_path = os.path.join(root, name).strip('.\\sharkpylib\\')...
29.518519
73
0.657465
from setuptools import setup, find_packages import os from sharkpylib import __version__ include_files = [] for root, dirs, files in os.walk('.', topdown=False): for name in files: if name.endswith('.txt') or name.endswith('.json'): file_path = os.path.join(root, name).strip('.\\sharkpylib\\')...
true
true
08fe3f4dec75c5bff4f3d97283ca8316e8973f00
1,214
py
Python
demos/_videos_index_recording_type.py
Ziggeo/ZiggeoPythonSdk
7c1e46bdd0649bdd58707747279da40783f14f8b
[ "Apache-2.0" ]
3
2018-07-17T16:38:17.000Z
2020-10-31T19:56:47.000Z
demos/_videos_index_recording_type.py
Ziggeo/ZiggeoPythonSdk
7c1e46bdd0649bdd58707747279da40783f14f8b
[ "Apache-2.0" ]
8
2015-08-20T15:59:13.000Z
2022-01-17T13:08:45.000Z
demos/_videos_index_recording_type.py
Ziggeo/ZiggeoPythonSdk
7c1e46bdd0649bdd58707747279da40783f14f8b
[ "Apache-2.0" ]
7
2015-08-12T14:32:12.000Z
2019-10-30T05:26:51.000Z
import sys from Ziggeo import Ziggeo if(len(sys.argv) < 3): print ("Error\n") print ("Usage: $>python _recording_type.py YOUR_API_TOKEN YOUR_PRIVATE_KEY\n") sys.exit() api_token = sys.argv[1] private_key = sys.argv[2] webrtc_screen_recordings = 0 webrtc_camera_recordings = 0 file_uploads_or_camera_...
28.232558
87
0.735585
import sys from Ziggeo import Ziggeo if(len(sys.argv) < 3): print ("Error\n") print ("Usage: $>python _recording_type.py YOUR_API_TOKEN YOUR_PRIVATE_KEY\n") sys.exit() api_token = sys.argv[1] private_key = sys.argv[2] webrtc_screen_recordings = 0 webrtc_camera_recordings = 0 file_uploads_or_camera_...
true
true
08fe3f6248b7f3bcb19bae82b8c171ac3f928709
288
py
Python
py/constants.py
Uberibsen/s-train-frame
5b68206b3c09ebe9a2c1b7e0bb3e6c94564ea5cd
[ "MIT" ]
2
2021-08-12T15:30:11.000Z
2022-01-27T13:38:59.000Z
py/constants.py
Uberibsen/s-train-frame
5b68206b3c09ebe9a2c1b7e0bb3e6c94564ea5cd
[ "MIT" ]
null
null
null
py/constants.py
Uberibsen/s-train-frame
5b68206b3c09ebe9a2c1b7e0bb3e6c94564ea5cd
[ "MIT" ]
null
null
null
BASE_URL = 'http://xmlopen.rejseplanen.dk/bin/rest.exe' DATE_FORMAT = "%d.%m.%y" TIME_FORMAT = "%H:%M" """ # Train lines color in RGB A_LINE = [25,255,255] B_LINE = [77,255,0] BX_LINE = [153,255,77] C_LINE = [255,128,0] E_LINE = [102,102,255] F_LINE = [255,191,0] H_LINE = [255,38,0] """
20.571429
55
0.635417
BASE_URL = 'http://xmlopen.rejseplanen.dk/bin/rest.exe' DATE_FORMAT = "%d.%m.%y" TIME_FORMAT = "%H:%M"
true
true
08fe41743ff22d3b7f19cbd8af8bea5412007f97
5,774
py
Python
covsirphy/cleaning/covid19datahub.py
davidpetra/covid19-sir
3ee3e3c3fe35acfd90781d82c259a9d3a1cb5ac0
[ "Apache-2.0" ]
null
null
null
covsirphy/cleaning/covid19datahub.py
davidpetra/covid19-sir
3ee3e3c3fe35acfd90781d82c259a9d3a1cb5ac0
[ "Apache-2.0" ]
100
2021-02-06T17:50:15.000Z
2022-03-31T20:30:49.000Z
covsirphy/cleaning/covid19datahub.py
ardhani31/Covid19-SIRV
813bc66f668a3d2945dc97474ea1149bbc6e40c2
[ "Apache-2.0" ]
1
2021-09-18T12:36:11.000Z
2021-09-18T12:36:11.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- from pathlib import Path import warnings import covid19dh import pandas as pd from covsirphy.util.term import Term from covsirphy.cleaning.jhu_data import JHUData from covsirphy.cleaning.oxcgrt import OxCGRTData from covsirphy.cleaning.population import PopulationData from...
37.012821
98
0.590405
from pathlib import Path import warnings import covid19dh import pandas as pd from covsirphy.util.term import Term from covsirphy.cleaning.jhu_data import JHUData from covsirphy.cleaning.oxcgrt import OxCGRTData from covsirphy.cleaning.population import PopulationData from covsirphy.cleaning.pcr_data import PCRData ...
true
true
08fe43244d05a5f02d65be3992f3d6fac485a65f
4,535
py
Python
io_import_rbsp/bsp_tool/__init__.py
snake-biscuits/io_import_rbsp
0de47dc70c373cc0417cc222d5d83e6dde72068b
[ "MIT" ]
7
2021-09-30T11:13:00.000Z
2022-03-25T16:19:19.000Z
io_import_rbsp/bsp_tool/__init__.py
snake-biscuits/io_import_rbsp
0de47dc70c373cc0417cc222d5d83e6dde72068b
[ "MIT" ]
1
2021-11-15T18:36:51.000Z
2021-11-15T18:36:51.000Z
io_import_rbsp/bsp_tool/__init__.py
snake-biscuits/io_import_rbsp
0de47dc70c373cc0417cc222d5d83e6dde72068b
[ "MIT" ]
null
null
null
"""A library for .bsp file analysis & modification""" __all__ = ["base", "branches", "load_bsp", "lumps", "tools", "D3DBsp", "GoldSrcBsp", "IdTechBsp", "InfinityWardBsp", "QuakeBsp", "RavenBsp", "RespawnBsp", "RitualBsp", "ValveBsp"] __version__ = "v0.3.1 commit da2734e" import os from types impo...
45.808081
101
0.632635
__all__ = ["base", "branches", "load_bsp", "lumps", "tools", "D3DBsp", "GoldSrcBsp", "IdTechBsp", "InfinityWardBsp", "QuakeBsp", "RavenBsp", "RespawnBsp", "RitualBsp", "ValveBsp"] __version__ = "v0.3.1 commit da2734e" import os from types import ModuleType from . import base from . import branc...
true
true
08fe43f10b32dd2d33ff79d6cc6c3ad3844b09bf
88
py
Python
rekt_googlecore/__init__.py
vengefuldrx/rekt_google_core
77ea5f305c8c7b907bd9e5d8bf60f032077c8156
[ "Apache-2.0" ]
1
2015-09-18T06:31:46.000Z
2015-09-18T06:31:46.000Z
rekt_googlecore/__init__.py
vengefuldrx/rekt-googlecore
77ea5f305c8c7b907bd9e5d8bf60f032077c8156
[ "Apache-2.0" ]
null
null
null
rekt_googlecore/__init__.py
vengefuldrx/rekt-googlecore
77ea5f305c8c7b907bd9e5d8bf60f032077c8156
[ "Apache-2.0" ]
null
null
null
__version__ = '0.2015.10.18' from .client import GoogleAPIClient from .errors import *
17.6
35
0.761364
__version__ = '0.2015.10.18' from .client import GoogleAPIClient from .errors import *
true
true
08fe4466a98c732bfa5798498f5e5cfb4acdd8eb
210
py
Python
explore/urls.py
robpop/explore_engine
21942c73b28b7b22351877b9772773dfdf298667
[ "MIT" ]
null
null
null
explore/urls.py
robpop/explore_engine
21942c73b28b7b22351877b9772773dfdf298667
[ "MIT" ]
null
null
null
explore/urls.py
robpop/explore_engine
21942c73b28b7b22351877b9772773dfdf298667
[ "MIT" ]
null
null
null
from django.urls import path from . import views app_name = 'explore' urlpatterns = [ path('', views.explore, name='explore'), path('<slug:category>/', views.exploreCategory, name='exploreCategory') ]
23.333333
75
0.7
from django.urls import path from . import views app_name = 'explore' urlpatterns = [ path('', views.explore, name='explore'), path('<slug:category>/', views.exploreCategory, name='exploreCategory') ]
true
true
08fe4582e66daf1b5f5b116fce68a5e0db349a30
5,621
py
Python
tensorflow/compiler/tests/adadelta_test.py
EricRemmerswaal/tensorflow
141ff27877579c81a213fa113bd1b474c1749aca
[ "Apache-2.0" ]
190,993
2015-11-09T13:17:30.000Z
2022-03-31T23:05:27.000Z
tensorflow/compiler/tests/adadelta_test.py
EricRemmerswaal/tensorflow
141ff27877579c81a213fa113bd1b474c1749aca
[ "Apache-2.0" ]
48,461
2015-11-09T14:21:11.000Z
2022-03-31T23:17:33.000Z
tensorflow/compiler/tests/adadelta_test.py
EricRemmerswaal/tensorflow
141ff27877579c81a213fa113bd1b474c1749aca
[ "Apache-2.0" ]
104,981
2015-11-09T13:40:17.000Z
2022-03-31T19:51:54.000Z
# Copyright 2018 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.438849
80
0.598114
import numpy as np from tensorflow.compiler.tests import xla_test from tensorflow.python.framework import constant_op from tensorflow.python.ops import resource_variable_ops from tensorflow.python.ops import variables from tensorflow.python.platform import test from tensorflow.python.training import adadelta class ...
true
true
08fe45a22a6147f82916d916816efa645a4bc999
13,459
py
Python
homeassistant/components/sensor/pollen.py
shanbs/home-assistant
818776d2b4f11e4f51992dc88bc0a6f9055833b2
[ "Apache-2.0" ]
1
2019-03-08T02:19:14.000Z
2019-03-08T02:19:14.000Z
homeassistant/components/sensor/pollen.py
shanbs/home-assistant
818776d2b4f11e4f51992dc88bc0a6f9055833b2
[ "Apache-2.0" ]
null
null
null
homeassistant/components/sensor/pollen.py
shanbs/home-assistant
818776d2b4f11e4f51992dc88bc0a6f9055833b2
[ "Apache-2.0" ]
1
2019-12-18T20:06:33.000Z
2019-12-18T20:06:33.000Z
"""Support for Pollen.com allergen and cold/flu sensors.""" from datetime import timedelta import logging from statistics import mean import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import ( ATTR_ATTRIBUTION, ATTR_STATE, CONF_MONITORED_CONDITIONS) from...
33.150246
79
0.617877
from datetime import timedelta import logging from statistics import mean import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import ( ATTR_ATTRIBUTION, ATTR_STATE, CONF_MONITORED_CONDITIONS) from homeassistant.helpers import aiohttp_client import homeassi...
true
true
08fe470fa47886ec1aa65f917984bd3bb3e0b44f
470
py
Python
mypybox/__init__.py
d-bouvier/mypybox
27d1f8eccce57b2a13f388a1f7a8574023d59938
[ "BSD-3-Clause" ]
null
null
null
mypybox/__init__.py
d-bouvier/mypybox
27d1f8eccce57b2a13f388a1f7a8574023d59938
[ "BSD-3-Clause" ]
null
null
null
mypybox/__init__.py
d-bouvier/mypybox
27d1f8eccce57b2a13f388a1f7a8574023d59938
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ Python toolboxes for math functions, personalized plots and other things. Notes ----- Developed for Python 3.6.1 @author: d-bouvier (bouvierdamien@gmail.com) """ __author__ = "Damien Bouvier" __maintainer__ = "Damien Bouvier" __version__ = "0.3" __author_email__ = 'bouvierdamien@gmail.com'...
21.363636
73
0.723404
__author__ = "Damien Bouvier" __maintainer__ = "Damien Bouvier" __version__ = "0.3" __author_email__ = 'bouvierdamien@gmail.com' from . import mathbox from . import savebox from . import plotbox from . import utilities __all__ = ['mathbox', 'savebox', 'plotbox', 'utilities']
true
true
08fe473accf1b7c16489dfaba1577ba89af1a5d8
2,408
py
Python
dart/experiments/tools/noise.py
fpirovan/NoiseInjection
d1a8c90aaf45d435d40c476a2d2e74258920ff22
[ "RSA-MD" ]
null
null
null
dart/experiments/tools/noise.py
fpirovan/NoiseInjection
d1a8c90aaf45d435d40c476a2d2e74258920ff22
[ "RSA-MD" ]
null
null
null
dart/experiments/tools/noise.py
fpirovan/NoiseInjection
d1a8c90aaf45d435d40c476a2d2e74258920ff22
[ "RSA-MD" ]
2
2020-11-06T06:57:35.000Z
2021-04-26T13:23:35.000Z
import numpy as np import statistics def sample_covariance_lnr(env, lnr, sup, samples, T): cov = np.zeros(env.action_space.shape[0]) for s in range(samples): states, tmp_actions, _, _ = statistics.collect_traj(env, lnr, T) sup_actions = np.array([sup.intended_action(s) for s in states]) ...
35.411765
85
0.6549
import numpy as np import statistics def sample_covariance_lnr(env, lnr, sup, samples, T): cov = np.zeros(env.action_space.shape[0]) for s in range(samples): states, tmp_actions, _, _ = statistics.collect_traj(env, lnr, T) sup_actions = np.array([sup.intended_action(s) for s in states]) ...
true
true
08fe4815ece535ece500a1de517191f04e0d6886
756
py
Python
ch04/gradient_method.py
tmsick/deep-learning-from-scratch
96c52aeb74eb77bbfce505a47bbdcdba70e47559
[ "MIT" ]
null
null
null
ch04/gradient_method.py
tmsick/deep-learning-from-scratch
96c52aeb74eb77bbfce505a47bbdcdba70e47559
[ "MIT" ]
null
null
null
ch04/gradient_method.py
tmsick/deep-learning-from-scratch
96c52aeb74eb77bbfce505a47bbdcdba70e47559
[ "MIT" ]
null
null
null
# coding: utf-8 import numpy as np import matplotlib.pylab as plt from gradient_2d import numerical_gradient def gradient_descent(f, init_x, lr=0.01, step_num=100): x = init_x x_history = [] for i in range(step_num): x_history.append(x.copy()) grad = numerical_gradient(f, x) x -=...
19.384615
77
0.612434
import numpy as np import matplotlib.pylab as plt from gradient_2d import numerical_gradient def gradient_descent(f, init_x, lr=0.01, step_num=100): x = init_x x_history = [] for i in range(step_num): x_history.append(x.copy()) grad = numerical_gradient(f, x) x -= lr * grad ...
true
true
08fe48afff591605c88865d0e75ca61c751a3c01
22,892
py
Python
eventstore/test_forms.py
praekeltfoundation/ndoh-hub
91d834ff8fe43b930a73d8debdaa0e6af78c5efc
[ "BSD-3-Clause" ]
null
null
null
eventstore/test_forms.py
praekeltfoundation/ndoh-hub
91d834ff8fe43b930a73d8debdaa0e6af78c5efc
[ "BSD-3-Clause" ]
126
2016-07-12T19:39:44.000Z
2022-03-24T13:39:38.000Z
eventstore/test_forms.py
praekeltfoundation/ndoh-hub
91d834ff8fe43b930a73d8debdaa0e6af78c5efc
[ "BSD-3-Clause" ]
3
2016-09-28T13:16:11.000Z
2020-11-07T15:32:37.000Z
from unittest import mock from django.core.files.uploadedfile import SimpleUploadedFile from django.test import TestCase from eventstore.forms import MomConnectImportForm from eventstore.models import ImportRow, MomConnectImport from registrations.models import ClinicCode class MomConnectImportFormTests(TestCase): ...
40.020979
88
0.601127
from unittest import mock from django.core.files.uploadedfile import SimpleUploadedFile from django.test import TestCase from eventstore.forms import MomConnectImportForm from eventstore.models import ImportRow, MomConnectImport from registrations.models import ClinicCode class MomConnectImportFormTests(TestCase): ...
true
true
08fe49615d35e4a9f4665404fd6bb10c87e9f620
139
py
Python
ThreeBotPackages/threefold/gridnetwork/GridNetworkFactory.py
jimbertools/jumpscaleX_threebot
9909aa270a1f5d04350c440ad787d755b905c456
[ "Apache-2.0" ]
null
null
null
ThreeBotPackages/threefold/gridnetwork/GridNetworkFactory.py
jimbertools/jumpscaleX_threebot
9909aa270a1f5d04350c440ad787d755b905c456
[ "Apache-2.0" ]
null
null
null
ThreeBotPackages/threefold/gridnetwork/GridNetworkFactory.py
jimbertools/jumpscaleX_threebot
9909aa270a1f5d04350c440ad787d755b905c456
[ "Apache-2.0" ]
null
null
null
from Jumpscale import j class GridNetworkFactory(j.baseclasses.threebot_factory): __jslocation__ = "j.threebot.package.grid_network"
23.166667
57
0.81295
from Jumpscale import j class GridNetworkFactory(j.baseclasses.threebot_factory): __jslocation__ = "j.threebot.package.grid_network"
true
true
08fe496b920c94e083d076a94a667041631c9022
992
py
Python
DomoticControl/DomoticControl/datahandler.py
apuly/domotic
d9646373a077c233c2c16a15bc26f5c4a5d0ce1e
[ "MIT" ]
null
null
null
DomoticControl/DomoticControl/datahandler.py
apuly/domotic
d9646373a077c233c2c16a15bc26f5c4a5d0ce1e
[ "MIT" ]
null
null
null
DomoticControl/DomoticControl/datahandler.py
apuly/domotic
d9646373a077c233c2c16a15bc26f5c4a5d0ce1e
[ "MIT" ]
null
null
null
#import packets.base_protocol as packets from lib.uuid64 import uuid64 import ctypes import time import struct from protocols.v1.protocol import protocol as protocol_v1 #number of bytes that indicate the length of a packet #actual number of bytes will be limited to 384 bytes as per bluetooth mesh specification FRAME_...
31
88
0.69254
from lib.uuid64 import uuid64 import ctypes import time import struct from protocols.v1.protocol import protocol as protocol_v1 FRAME_LENGTH_SIZE = 2 class DataHandler(): def __init__(self, dc_info): self._info = dc_info self._protocols = [protocol_v1(dc_info)] def handle(self, data): ...
true
true
08fe4a53377e9e0ed0ba0db9c454925822476a3d
10,358
py
Python
plugins/modules/oci_file_storage_file_system_facts.py
A7rMtWE57x/oci-ansible-collection
80548243a085cd53fd5dddaa8135b5cb43612c66
[ "Apache-2.0" ]
null
null
null
plugins/modules/oci_file_storage_file_system_facts.py
A7rMtWE57x/oci-ansible-collection
80548243a085cd53fd5dddaa8135b5cb43612c66
[ "Apache-2.0" ]
null
null
null
plugins/modules/oci_file_storage_file_system_facts.py
A7rMtWE57x/oci-ansible-collection
80548243a085cd53fd5dddaa8135b5cb43612c66
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # Copyright (c) 2017, 2020 Oracle and/or its affiliates. # This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Apache License v2.0 # See LICENSE.TXT for d...
34.64214
133
0.610446
from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = { "metadata_version": "1.1", "status": ["preview"], "supported_by": "community", } DOCUMENTATION = """ --- module: oci_file_storage_file_system_facts short_description: Fetches details about one or ...
true
true
08fe4a5c623269f5a4cbd822790dcad047c9e186
784
py
Python
percentCal.py
ttreed/percentCal
57ba36725832db50f88987dd02f5b108ba5ed85a
[ "MIT" ]
null
null
null
percentCal.py
ttreed/percentCal
57ba36725832db50f88987dd02f5b108ba5ed85a
[ "MIT" ]
null
null
null
percentCal.py
ttreed/percentCal
57ba36725832db50f88987dd02f5b108ba5ed85a
[ "MIT" ]
null
null
null
import time def calculate(): percent = eval(input("\nEnter the percent you want to calculate.\n\nPercent must be in decimal form!: ")) percentNum = eval(input("\nEnter the number you want a percentage of: ")) result = (percent) * (percentNum) print (percent,"percent of", percentNum, "is", result) ...
29.037037
109
0.589286
import time def calculate(): percent = eval(input("\nEnter the percent you want to calculate.\n\nPercent must be in decimal form!: ")) percentNum = eval(input("\nEnter the number you want a percentage of: ")) result = (percent) * (percentNum) print (percent,"percent of", percentNum, "is", result) ...
true
true
08fe4be455473bc50a9080823cb973bda0c8e29f
1,453
py
Python
tests/test_vcs_put_png_on_canvas.py
scottwittenburg/vcs
5b9f17fb78f7ab186fc0132ab81ada043a7ba348
[ "BSD-3-Clause" ]
11
2018-10-10T03:14:33.000Z
2022-01-05T14:18:15.000Z
tests/test_vcs_put_png_on_canvas.py
scottwittenburg/vcs
5b9f17fb78f7ab186fc0132ab81ada043a7ba348
[ "BSD-3-Clause" ]
196
2018-03-21T19:44:56.000Z
2021-12-21T21:56:24.000Z
tests/test_vcs_put_png_on_canvas.py
scottwittenburg/vcs
5b9f17fb78f7ab186fc0132ab81ada043a7ba348
[ "BSD-3-Clause" ]
5
2019-12-09T21:54:45.000Z
2022-03-20T04:22:14.000Z
import os import vcs import basevcstest class TestVCSPNG(basevcstest.VCSBaseTest): def __init__(self, *args, **kwargs): kwargs['geometry'] = {"width": 1200, "height": 800} self.png = os.path.join(vcs.sample_data, "BlueMarble.ppm") super(TestVCSPNG, self).__init__(*args, **kwargs) def ...
33.790698
78
0.511356
import os import vcs import basevcstest class TestVCSPNG(basevcstest.VCSBaseTest): def __init__(self, *args, **kwargs): kwargs['geometry'] = {"width": 1200, "height": 800} self.png = os.path.join(vcs.sample_data, "BlueMarble.ppm") super(TestVCSPNG, self).__init__(*args, **kwargs) def ...
true
true
08fe4be5de7fe921776f6cf2d02dffc58e3b77c3
2,786
py
Python
check_asset_distribution.py
alexeykiselev/waves-tools
7f195cf809ec238e585620b8d00c526128b3bc71
[ "MIT" ]
null
null
null
check_asset_distribution.py
alexeykiselev/waves-tools
7f195cf809ec238e585620b8d00c526128b3bc71
[ "MIT" ]
null
null
null
check_asset_distribution.py
alexeykiselev/waves-tools
7f195cf809ec238e585620b8d00c526128b3bc71
[ "MIT" ]
null
null
null
import sys import requests def current_height(node): response = requests.get(f'{node}/blocks/height').json() if response and 'height' in response: return response['height'] else: return 0 def asset_info(node, asset): response = requests.get(f'{node}/assets/details/{asset}').json() ...
29.638298
103
0.552046
import sys import requests def current_height(node): response = requests.get(f'{node}/blocks/height').json() if response and 'height' in response: return response['height'] else: return 0 def asset_info(node, asset): response = requests.get(f'{node}/assets/details/{asset}').json() ...
true
true
08fe4c4714b117778331634a6b680494308a3058
5,362
py
Python
corrscope/utils/scipy/signal.py
beetrootpaul/corrscope
79f443da068efe3d83b871f226ff8b59083bc8b7
[ "BSD-2-Clause" ]
1
2018-08-07T10:52:08.000Z
2018-08-07T10:52:08.000Z
corrscope/utils/scipy/signal.py
beetrootpaul/corrscope
79f443da068efe3d83b871f226ff8b59083bc8b7
[ "BSD-2-Clause" ]
65
2018-07-15T11:42:43.000Z
2018-12-22T09:19:36.000Z
corrscope/utils/scipy/signal.py
jimbo1qaz/ovgenpy
ca3d4ae61e66de2907fd01004afe23af8f5d374a
[ "BSD-2-Clause" ]
null
null
null
from bisect import bisect_left import numpy as np def correlate_valid(buffer: np.ndarray, kernel: np.ndarray) -> np.ndarray: """ Based on scipy.correlate. buffer must be longer (or equal) to kernel. Returns an array of length (buffer - kernel + 1) without edge effects, much like mode="valid". """ ...
31.727811
87
0.59157
from bisect import bisect_left import numpy as np def correlate_valid(buffer: np.ndarray, kernel: np.ndarray) -> np.ndarray: buffer = np.asarray(buffer) kernel = np.asarray(kernel) assert buffer.ndim == kernel.ndim == 1 kernel = _reverse_and_conj(kernel) kernel_support = len(kernel) - 1 ...
true
true
08fe4df88b127ae71c4eb7da906b2c1746475650
30
py
Python
ldaptor/test/__init__.py
arossert/ldaptor
6ed55a380f05dd47aa0d03ead0ff214e26399df0
[ "MIT" ]
133
2015-02-03T08:40:56.000Z
2022-03-26T06:36:36.000Z
ldaptor/test/__init__.py
arossert/ldaptor
6ed55a380f05dd47aa0d03ead0ff214e26399df0
[ "MIT" ]
193
2015-01-02T00:35:01.000Z
2022-03-12T15:00:04.000Z
ldaptor/test/__init__.py
arossert/ldaptor
6ed55a380f05dd47aa0d03ead0ff214e26399df0
[ "MIT" ]
51
2015-05-08T08:11:07.000Z
2021-07-28T02:52:02.000Z
"""Unit tests for Ldaptor."""
15
29
0.633333
true
true
08fe4ec41f5186625270ef778d3de21ea4d1f5da
5,314
py
Python
venv/lib/python3.9/site-packages/crefi.py
BravoHaruki/api_auto_test
31a61609a7d4d39b361169c5b1aeedc604abb8af
[ "MIT" ]
null
null
null
venv/lib/python3.9/site-packages/crefi.py
BravoHaruki/api_auto_test
31a61609a7d4d39b361169c5b1aeedc604abb8af
[ "MIT" ]
null
null
null
venv/lib/python3.9/site-packages/crefi.py
BravoHaruki/api_auto_test
31a61609a7d4d39b361169c5b1aeedc604abb8af
[ "MIT" ]
null
null
null
#!/usr/bin/python import os import errno import argparse from version import __version__ from multiprocessing import Process from crefi_helper import singledir, multipledir def multiple(mnt_pnt, brdth, depth, files, fop, file_type="text", inter="1000", size="100K", mins="10K", maxs="500K", rand=False, l...
42.854839
79
0.543846
import os import errno import argparse from version import __version__ from multiprocessing import Process from crefi_helper import singledir, multipledir def multiple(mnt_pnt, brdth, depth, files, fop, file_type="text", inter="1000", size="100K", mins="10K", maxs="500K", rand=False, l=10, ...
false
true
08fe4f3b2190e488b6a0084e3dd827f42951bf3f
1,161
py
Python
torchvision/models/video/r3d.py
stevehuanghe/vision
2287c8f2dc9dcad955318cc022cabe4d53051f65
[ "BSD-3-Clause" ]
2
2020-10-09T13:35:59.000Z
2021-08-22T15:17:28.000Z
torchvision/models/video/r3d.py
seominseok0429/vision
9168476a9cb28b308d8314a1faf4da6262806154
[ "BSD-3-Clause" ]
1
2019-09-17T18:23:37.000Z
2019-09-17T18:23:37.000Z
torchvision/models/video/r3d.py
seominseok0429/vision
9168476a9cb28b308d8314a1faf4da6262806154
[ "BSD-3-Clause" ]
null
null
null
import torch.nn as nn from ._utils import Conv3DSimple from .video_stems import get_default_stem from .video_trunk import VideoTrunkBuilder, BasicBlock, Bottleneck __all__ = ["r3d_18"] def _r3d(model_depth, use_pool1=False, **kwargs): """Constructor of a r3d network as in https://arxiv.org/abs/1711.11248 ...
26.386364
92
0.670973
import torch.nn as nn from ._utils import Conv3DSimple from .video_stems import get_default_stem from .video_trunk import VideoTrunkBuilder, BasicBlock, Bottleneck __all__ = ["r3d_18"] def _r3d(model_depth, use_pool1=False, **kwargs): conv_makers = [Conv3DSimple] * 4 if model_depth < 50: block = Ba...
true
true
08fe4f88d9583296286cb6f8d9d0bc126e6009e4
55,915
py
Python
zesysman/zesys/stub.py
TApplencourt/level-zero-tests
7983a11cbfb8a815af0296e3400f59f635107f67
[ "MIT" ]
32
2020-03-05T19:26:02.000Z
2022-02-21T13:13:52.000Z
zesysman/zesys/stub.py
TApplencourt/level-zero-tests
7983a11cbfb8a815af0296e3400f59f635107f67
[ "MIT" ]
9
2020-05-04T20:15:09.000Z
2021-12-19T07:17:50.000Z
zesysman/zesys/stub.py
TApplencourt/level-zero-tests
7983a11cbfb8a815af0296e3400f59f635107f67
[ "MIT" ]
19
2020-04-07T16:00:48.000Z
2022-01-19T00:19:49.000Z
#!/usr/bin/env python3 # Copyright (C) 2020 Intel Corporation # SPDX-License-Identifier: MIT from . import logger from . import state from . import util from zesys.zes_wrap import * from zesys.types import * def api(): # # Default API stubs # # For stubs to retain state state.stub = {} # Stu...
48.537326
109
0.610283
from . import logger from . import state from . import util from zesys.zes_wrap import * from zesys.types import * def api(): state.stub = {} def zesDeviceEnumTemperatureSensors(dev, count_ptr, handle_array): if handle_array is None: uint32_assign(count_ptr, 6) ...
true
true
08fe4f9012997cbe6d647bc3c9748088207f6493
4,426
py
Python
nested_admin/tests/nested_polymorphic/test_polymorphic_std/models.py
jpic/django-nested-admin
338cf2129a233b9d1105041d19b59695a8b40a13
[ "BSD-2-Clause" ]
580
2015-03-15T06:34:35.000Z
2022-03-24T21:05:16.000Z
nested_admin/tests/nested_polymorphic/test_polymorphic_std/models.py
jpic/django-nested-admin
338cf2129a233b9d1105041d19b59695a8b40a13
[ "BSD-2-Clause" ]
204
2015-03-30T14:59:53.000Z
2022-03-30T00:34:09.000Z
nested_admin/tests/nested_polymorphic/test_polymorphic_std/models.py
jpic/django-nested-admin
338cf2129a233b9d1105041d19b59695a8b40a13
[ "BSD-2-Clause" ]
106
2015-04-29T21:26:06.000Z
2022-01-19T19:16:23.000Z
from __future__ import unicode_literals import django from django.contrib.contenttypes.fields import GenericRelation, GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.db import models from django.db.models import ForeignKey, CASCADE from nested_admin.tests.compat import python_2...
28.012658
87
0.655219
from __future__ import unicode_literals import django from django.contrib.contenttypes.fields import GenericRelation, GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.db import models from django.db.models import ForeignKey, CASCADE from nested_admin.tests.compat import python_2...
true
true
08fe5098710c80cd0f0b4d3e63862cc82f315d9f
1,387
py
Python
Port_Scanner.py
ofinley/Python-Security-Scripts
bf6a9358319d2ccc78aad3ab3f3fa652c642553b
[ "MIT" ]
null
null
null
Port_Scanner.py
ofinley/Python-Security-Scripts
bf6a9358319d2ccc78aad3ab3f3fa652c642553b
[ "MIT" ]
null
null
null
Port_Scanner.py
ofinley/Python-Security-Scripts
bf6a9358319d2ccc78aad3ab3f3fa652c642553b
[ "MIT" ]
null
null
null
import socket from utils import timefunc class Scanner: def __init__(self, ip): self.ip = ip self.open_ports = []; def __repr__(self): # Returns Target return 'Scanner: {}'.format(self.ip) def add_port(self, port): # Add open ports to array self.open_ports.ap...
28.895833
126
0.578226
import socket from utils import timefunc class Scanner: def __init__(self, ip): self.ip = ip self.open_ports = []; def __repr__(self): return 'Scanner: {}'.format(self.ip) def add_port(self, port): self.open_ports.append(port) def scan(self, lowerport, u...
true
true
08fe50c21a487b61cce358f0898fe88a0344b8b8
7,688
py
Python
ganb_personal_client/models/va_status_code.py
k0uki/gmo-aozora-api-python
3715f4c16957d239a82313d904e29a64998196f0
[ "MIT" ]
8
2019-05-21T05:10:35.000Z
2021-08-11T04:59:42.000Z
ganb_personal_client/models/va_status_code.py
k0uki/gmo-aozora-api-python
3715f4c16957d239a82313d904e29a64998196f0
[ "MIT" ]
2
2019-05-24T09:42:06.000Z
2020-06-05T02:49:29.000Z
ganb_personal_client/models/va_status_code.py
k0uki/gmo-aozora-api-python
3715f4c16957d239a82313d904e29a64998196f0
[ "MIT" ]
6
2019-05-22T01:57:19.000Z
2021-12-16T13:33:58.000Z
# coding: utf-8 """ GMO Aozora Net Bank Open API <p>オープンAPI仕様書(PDF版)は下記リンクをご参照ください</p> <div> <div style='display:inline-block;'><a style='text-decoration:none; font-weight:bold; color:#00b8d4;' href='https://gmo-aozora.com/business/service/api-specification.html' target='_blank'>オープンAPI仕様書</a></div><div sty...
63.016393
4,061
0.638528
import pprint import re import six class VaStatusCode(object): swagger_types = { 'va_status_code': 'str' } attribute_map = { 'va_status_code': 'vaStatusCode' } def __init__(self, va_status_code=None): self._va_status_code = None self.discriminator = None ...
true
true
08fe512a2ea84dd726cd82e5287055d68d2d1626
944
py
Python
tests/test_mod_send.py
laplacetw/botlegram
ee08512c7612c8c8193615b383dcf7b6007db505
[ "MIT" ]
null
null
null
tests/test_mod_send.py
laplacetw/botlegram
ee08512c7612c8c8193615b383dcf7b6007db505
[ "MIT" ]
null
null
null
tests/test_mod_send.py
laplacetw/botlegram
ee08512c7612c8c8193615b383dcf7b6007db505
[ "MIT" ]
null
null
null
#!usr/bin/python3 # coding:utf-8 import os import pytest import requests as rq from botlegram.utils.send import Send token = os.environ['TOKEN'] chat_id = os.environ['CHAT_ID'] voice_id = os.environ['VOICE_ID'] audio_id = os.environ['AUDIO_ID'] api = "https://api.telegram.org/bot" + token + "/" test = Send() test.API ...
26.971429
92
0.694915
import os import pytest import requests as rq from botlegram.utils.send import Send token = os.environ['TOKEN'] chat_id = os.environ['CHAT_ID'] voice_id = os.environ['VOICE_ID'] audio_id = os.environ['AUDIO_ID'] api = "https://api.telegram.org/bot" + token + "/" test = Send() test.API = api def test_forward_message()...
true
true
08fe5252b1626321f7c938a327cabafc3019549d
328
py
Python
python/advanced/generator.py
mum-chen/Language-learning
95ec7b91ee2ce50ba69a82c1b1e47ece5fe63012
[ "MIT" ]
null
null
null
python/advanced/generator.py
mum-chen/Language-learning
95ec7b91ee2ce50ba69a82c1b1e47ece5fe63012
[ "MIT" ]
null
null
null
python/advanced/generator.py
mum-chen/Language-learning
95ec7b91ee2ce50ba69a82c1b1e47ece5fe63012
[ "MIT" ]
null
null
null
print ' gen with compre ' L = [x * x for x in range(10)] print L g = (x * x for x in range(10)) print g for n in g: print n print ' gen with function ' def fib(max): n, a, b = 0, 0, 1 while n < max: # case next yield yield b a, b = b, a + b n = n + 1 for n in fib(6): ...
14.909091
30
0.493902
print ' gen with compre ' L = [x * x for x in range(10)] print L g = (x * x for x in range(10)) print g for n in g: print n print ' gen with function ' def fib(max): n, a, b = 0, 0, 1 while n < max: yield b a, b = b, a + b n = n + 1 for n in fib(6): print n
false
true
08fe528632176bd9cc2de39af4f7066eb63c7216
1,747
py
Python
guiutils.py
autonamaskar/opencv-gui-helper-tool
02bc9f76c9a57bdec238c807661da58dd035a58b
[ "MIT" ]
43
2018-05-24T12:52:18.000Z
2021-09-21T06:41:04.000Z
guiutils.py
autonamaskar/opencv-gui-helper-tool
02bc9f76c9a57bdec238c807661da58dd035a58b
[ "MIT" ]
null
null
null
guiutils.py
autonamaskar/opencv-gui-helper-tool
02bc9f76c9a57bdec238c807661da58dd035a58b
[ "MIT" ]
22
2018-05-24T12:52:24.000Z
2022-03-24T06:42:07.000Z
import cv2 class EdgeFinder: def __init__(self, image, filter_size=1, threshold1=0, threshold2=0): self.image = image self._filter_size = filter_size self._threshold1 = threshold1 self._threshold2 = threshold2 def onchangeThreshold1(pos): self._threshold1 = pos...
29.610169
117
0.644533
import cv2 class EdgeFinder: def __init__(self, image, filter_size=1, threshold1=0, threshold2=0): self.image = image self._filter_size = filter_size self._threshold1 = threshold1 self._threshold2 = threshold2 def onchangeThreshold1(pos): self._threshold1 = pos...
false
true
08fe534950a33aa92c290bdf080da17beacfd13b
46,623
py
Python
test/test_optimizers.py
ksrinivs64/lale
e0ffc357c3711940078718717aebc5b06c9dc4ae
[ "Apache-2.0" ]
null
null
null
test/test_optimizers.py
ksrinivs64/lale
e0ffc357c3711940078718717aebc5b06c9dc4ae
[ "Apache-2.0" ]
null
null
null
test/test_optimizers.py
ksrinivs64/lale
e0ffc357c3711940078718717aebc5b06c9dc4ae
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 IBM Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
34.45898
134
0.631641
import unittest import warnings from test import EnableSchemaValidation import jsonschema import numpy as np import sklearn.datasets import lale.schemas as schemas from lale.lib.lale import SMAC, ConcatFeatures, GridSearchCV, Hyperopt, NoOp from lale.lib.sklearn import ( PCA, KNeighborsClassifier, KNeigh...
true
true
08fe544e9668a12fda53def43fb8875b173e6723
170
py
Python
main.py
Shaza-Is/Re-IDOL
5db3d950b2d3d8dbdbcafa77803b271c01e3ada1
[ "Apache-2.0" ]
2
2021-11-16T02:23:09.000Z
2022-03-01T07:40:35.000Z
main.py
Shaza-Is/Re-IDOL
5db3d950b2d3d8dbdbcafa77803b271c01e3ada1
[ "Apache-2.0" ]
null
null
null
main.py
Shaza-Is/Re-IDOL
5db3d950b2d3d8dbdbcafa77803b271c01e3ada1
[ "Apache-2.0" ]
null
null
null
import os from dotenv import load_dotenv from app.api.command import CommandLine def main(): CommandLine() if __name__ == "__main__": load_dotenv() main()
14.166667
39
0.705882
import os from dotenv import load_dotenv from app.api.command import CommandLine def main(): CommandLine() if __name__ == "__main__": load_dotenv() main()
true
true
08fe547a94651b6f6d281a0ead7a8fcd14082a92
10,890
py
Python
phonopy/cui/collect_cell_info.py
dftbplus/phonopy
32d3d52902c314c7f00192d10f7a156d0a8341c9
[ "BSD-3-Clause" ]
null
null
null
phonopy/cui/collect_cell_info.py
dftbplus/phonopy
32d3d52902c314c7f00192d10f7a156d0a8341c9
[ "BSD-3-Clause" ]
4
2018-09-18T08:12:43.000Z
2020-10-20T23:37:28.000Z
phonopy/cui/collect_cell_info.py
dftbplus/phonopy
32d3d52902c314c7f00192d10f7a156d0a8341c9
[ "BSD-3-Clause" ]
1
2018-09-13T09:32:01.000Z
2018-09-13T09:32:01.000Z
# Copyright (C) 2018 Atsushi Togo # All rights reserved. # # This file is part of phonopy. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notic...
35.822368
78
0.640771
import numpy as np from phonopy.interface.calculator import ( read_crystal_structure, get_default_cell_filename) from phonopy.interface.vasp import read_vasp from phonopy.interface.phonopy_yaml import PhonopyYaml def collect_cell_info(supercell_matrix=None, primitive_matrix=None, ...
true
true
08fe55fb0e42fe7cdba2dbe1d88dba1f33877c2e
455
py
Python
api/views.py
inziani/goodreads
947259e6a78450dca2760c66245227d264476062
[ "Unlicense" ]
null
null
null
api/views.py
inziani/goodreads
947259e6a78450dca2760c66245227d264476062
[ "Unlicense" ]
null
null
null
api/views.py
inziani/goodreads
947259e6a78450dca2760c66245227d264476062
[ "Unlicense" ]
null
null
null
from django.shortcuts import render from rest_framework import generics from books.models import Book from users.models import Profile from .serializers import BookSerializer, ProfileSerializer # Create your views here. class BookAPIView(generics.ListAPIView): queryset = Book.objects.all() serializer_class = B...
26.764706
58
0.813187
from django.shortcuts import render from rest_framework import generics from books.models import Book from users.models import Profile from .serializers import BookSerializer, ProfileSerializer class BookAPIView(generics.ListAPIView): queryset = Book.objects.all() serializer_class = BookSerializer class Profi...
true
true
08fe56025c19e63e3b6a51fa7646aab7d5776bc5
1,098
py
Python
deprecated_examples/multimedia/mmimdb_cca.py
TianhaoFu/MultiBench
b174a3187124d6f92be1ff3b487eef292f7883bb
[ "MIT" ]
null
null
null
deprecated_examples/multimedia/mmimdb_cca.py
TianhaoFu/MultiBench
b174a3187124d6f92be1ff3b487eef292f7883bb
[ "MIT" ]
null
null
null
deprecated_examples/multimedia/mmimdb_cca.py
TianhaoFu/MultiBench
b174a3187124d6f92be1ff3b487eef292f7883bb
[ "MIT" ]
null
null
null
import sys import os sys.path.append(os.getcwd()) import torch from training_structures.cca_onestage import train, test from fusions.common_fusions import Concat from datasets.imdb.get_data import get_dataloader from unimodals.common_models import MLP, VGG16, Linear, MaxOut_MLP traindata, validdata, testdata = get_d...
37.862069
118
0.770492
import sys import os sys.path.append(os.getcwd()) import torch from training_structures.cca_onestage import train, test from fusions.common_fusions import Concat from datasets.imdb.get_data import get_dataloader from unimodals.common_models import MLP, VGG16, Linear, MaxOut_MLP traindata, validdata, testdata = get_d...
true
true
08fe565bc96a7beb8c80e0b564102f40d5948895
6,420
py
Python
chainer/training/extensions/plot_report.py
LuoYuanke/PrivChainer
758d765c7903f6913cfd58c21db069d5f2a12203
[ "MIT" ]
1
2020-05-28T10:07:25.000Z
2020-05-28T10:07:25.000Z
chainer/training/extensions/plot_report.py
LuoYuanke/PrivChainer
758d765c7903f6913cfd58c21db069d5f2a12203
[ "MIT" ]
null
null
null
chainer/training/extensions/plot_report.py
LuoYuanke/PrivChainer
758d765c7903f6913cfd58c21db069d5f2a12203
[ "MIT" ]
1
2022-02-20T10:32:59.000Z
2022-02-20T10:32:59.000Z
import json from os import path import warnings import numpy import six from chainer import reporter from chainer import serializer as serializer_module from chainer.training import extension from chainer.training import trigger as trigger_module try: import matplotlib # NOQA _available = True except (Im...
34.702703
79
0.600779
import json from os import path import warnings import numpy import six from chainer import reporter from chainer import serializer as serializer_module from chainer.training import extension from chainer.training import trigger as trigger_module try: import matplotlib _available = True except (ImportErr...
true
true
08fe56d93708c49360c433e383950084a02db419
8,755
py
Python
doc/source/conf.py
wsoula/jenkins-job-builder
2bff652b03bfcf0ab272e5cd0b5092472c201f7e
[ "Apache-2.0" ]
null
null
null
doc/source/conf.py
wsoula/jenkins-job-builder
2bff652b03bfcf0ab272e5cd0b5092472c201f7e
[ "Apache-2.0" ]
null
null
null
doc/source/conf.py
wsoula/jenkins-job-builder
2bff652b03bfcf0ab272e5cd0b5092472c201f7e
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # Jenkins Job Builder documentation build configuration file, created by # sphinx-quickstart on Mon Sep 10 19:36:21 2012. # # This file is execfile()d with the current directory set to its containing dir # # Note that not all possible configuration values are present in this # autogenerated fi...
33.673077
79
0.707025
import os import sys from jenkins_jobs.version import version_info as jenkins_jobs_version sys.path.insert(0, os.path.abspath('../..')) sys.path.insert(0, os.path.abspath('../../jenkins_jobs/modules')) extensions = ['sphinx.ext.autodoc', 'sphinx.ext.coverage', 'jenkins_jobs.sphinx.yaml', 'sphinxcontr...
true
true
08fe5b8fc02517d0bd0f62b8ba3252c5918566ce
54,460
py
Python
Amplo/Pipeline.py
nielsuit227/AutoML
51e2076d52d76dc84a190293b5bb59da2833df89
[ "MIT" ]
2
2021-06-16T22:09:01.000Z
2021-09-06T20:26:42.000Z
Amplo/Pipeline.py
nielsuit227/AutoML
51e2076d52d76dc84a190293b5bb59da2833df89
[ "MIT" ]
1
2021-06-04T08:22:02.000Z
2021-06-04T08:22:02.000Z
Amplo/Pipeline.py
nielsuit227/AutoML
51e2076d52d76dc84a190293b5bb59da2833df89
[ "MIT" ]
1
2021-09-15T08:34:20.000Z
2021-09-15T08:34:20.000Z
import re import os import time import copy import json import Amplo import joblib import shutil import warnings import numpy as np import pandas as pd from tqdm import tqdm from datetime import datetime from shap import TreeExplainer from sklearn import metrics from sklearn.model_selection import KFold from sklearn.m...
41.667942
120
0.590488
import re import os import time import copy import json import Amplo import joblib import shutil import warnings import numpy as np import pandas as pd from tqdm import tqdm from datetime import datetime from shap import TreeExplainer from sklearn import metrics from sklearn.model_selection import KFold from sklearn.m...
true
true
08fe5ba01ff8a9c0121c9b4f6ab41522e37af2d2
3,751
py
Python
aws_securityhub/icon_aws_securityhub/triggers/sqs_feed/trigger.py
emartin-merrill-r7/insightconnect-plugins
a589745dbcc9f01d3e601431e77ab7221a84c117
[ "MIT" ]
null
null
null
aws_securityhub/icon_aws_securityhub/triggers/sqs_feed/trigger.py
emartin-merrill-r7/insightconnect-plugins
a589745dbcc9f01d3e601431e77ab7221a84c117
[ "MIT" ]
null
null
null
aws_securityhub/icon_aws_securityhub/triggers/sqs_feed/trigger.py
emartin-merrill-r7/insightconnect-plugins
a589745dbcc9f01d3e601431e77ab7221a84c117
[ "MIT" ]
null
null
null
import komand import time from .schema import SqsFeedInput, SqsFeedOutput, Input, Output, Component import json # Custom imports below class SqsFeed(komand.Trigger): def __init__(self): super(self.__class__, self).__init__( name="sqs_feed", description=Component.DESCRIPTION, ...
40.771739
495
0.579312
import komand import time from .schema import SqsFeedInput, SqsFeedOutput, Input, Output, Component import json class SqsFeed(komand.Trigger): def __init__(self): super(self.__class__, self).__init__( name="sqs_feed", description=Component.DESCRIPTION, input=SqsFeedIn...
true
true
08fe5c03cd855beb3a3cbc3466b0440c7387097d
1,095
py
Python
src/appengine/driver.py
tomwilkie/awesomation
708a0ff2ffd431f24ed3f942cafd24882dc89620
[ "MIT" ]
28
2015-01-12T15:34:37.000Z
2021-06-17T14:27:49.000Z
src/appengine/driver.py
tomwilkie/awesomation
708a0ff2ffd431f24ed3f942cafd24882dc89620
[ "MIT" ]
16
2015-01-11T21:46:08.000Z
2015-02-06T17:01:50.000Z
src/appengine/driver.py
tomwilkie/awesomation
708a0ff2ffd431f24ed3f942cafd24882dc89620
[ "MIT" ]
2
2015-01-10T17:34:23.000Z
2015-01-10T18:38:01.000Z
"""List drivers and send them commands.""" import logging import flask from appengine import device, rest class Query(object): def iter(self): for name, cls in device.DEVICE_TYPES.iteritems(): yield Driver(name, cls) class Driver(object): """This is a fake for compatibility with the rest module""" ...
21.470588
75
0.675799
import logging import flask from appengine import device, rest class Query(object): def iter(self): for name, cls in device.DEVICE_TYPES.iteritems(): yield Driver(name, cls) class Driver(object): def __init__(self, name, cls): self._name = name self._cls = cls def to_dict(self): retu...
true
true
08fe5d35166b8674701d4ed792b21635eb03ca65
19,010
py
Python
AutomatedTesting/Gem/PythonTests/scripting/TestSuite_Periodic.py
LB-KatarzynaDylska/o3de
d8d273697ea8e1beeb698f62b84904a192b0ab76
[ "Apache-2.0", "MIT" ]
1
2022-03-28T08:06:58.000Z
2022-03-28T08:06:58.000Z
AutomatedTesting/Gem/PythonTests/scripting/TestSuite_Periodic.py
LB-KatarzynaDylska/o3de
d8d273697ea8e1beeb698f62b84904a192b0ab76
[ "Apache-2.0", "MIT" ]
null
null
null
AutomatedTesting/Gem/PythonTests/scripting/TestSuite_Periodic.py
LB-KatarzynaDylska/o3de
d8d273697ea8e1beeb698f62b84904a192b0ab76
[ "Apache-2.0", "MIT" ]
null
null
null
""" Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. SPDX-License-Identifier: Apache-2.0 OR MIT """ import pytest import os import sys sys.path.append(os.path.dirname(__file__)) import ImportPathHelper as impor...
50.693333
146
0.691215
import pytest import os import sys sys.path.append(os.path.dirname(__file__)) import ImportPathHelper as imports imports.init() import hydra_test_utils as hydra import ly_test_tools.environment.file_system as file_system from ly_test_tools import LAUNCHERS from base import TestAutomationBase TEST_DIRECTORY = os.pat...
true
true
08fe5d354a743c3fd68616d229df06ba2fc1cb16
4,242
py
Python
classifier_tuning.py
I-love-lamp/ml-apps
71f65fc284bc68794acd4a39df3a5791fcba7c46
[ "CC0-1.0" ]
null
null
null
classifier_tuning.py
I-love-lamp/ml-apps
71f65fc284bc68794acd4a39df3a5791fcba7c46
[ "CC0-1.0" ]
null
null
null
classifier_tuning.py
I-love-lamp/ml-apps
71f65fc284bc68794acd4a39df3a5791fcba7c46
[ "CC0-1.0" ]
null
null
null
# -*- coding: utf-8 -*- import streamlit as st from sklearn import datasets import pandas as pd import numpy as np from sklearn.neighbors import KNeighborsClassifier from sklearn.svm import SVC from sklearn.ensemble import RandomForestClassifier from sklearn.model_selection import train_test_split from sklea...
33.666667
84
0.638614
import streamlit as st from sklearn import datasets import pandas as pd import numpy as np from sklearn.neighbors import KNeighborsClassifier from sklearn.svm import SVC from sklearn.ensemble import RandomForestClassifier from sklearn.model_selection import train_test_split from sklearn.metrics import accurac...
true
true
08fe5d8ef6c6220511cefb90aa66549e8a0d888f
5,084
py
Python
openGaussBase/testcase/TOOLS/OPEN_TOOLS/SQLINES/Opengauss_Function_Tools_Sqlines_Case0006.py
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
openGaussBase/testcase/TOOLS/OPEN_TOOLS/SQLINES/Opengauss_Function_Tools_Sqlines_Case0006.py
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
openGaussBase/testcase/TOOLS/OPEN_TOOLS/SQLINES/Opengauss_Function_Tools_Sqlines_Case0006.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...
37.109489
84
0.574351
import os import unittest from yat.test import Node from yat.test import macro from testcase.utils.Logger import Logger class SqlinesTest(unittest.TestCase): def setUp(self): self.log = Logger() self.log.info(f'----- {os.path.basename(__file__)} start-----') self.root = Node('PrimaryRoot...
true
true
08fe5dd473c045f7355db283e132f07708cf080c
82
py
Python
spatialpandas/io/__init__.py
isabella232/spatialpandas
0a4e08ecf2c9e2f69c65c627cc353d88b6cd2807
[ "BSD-2-Clause" ]
null
null
null
spatialpandas/io/__init__.py
isabella232/spatialpandas
0a4e08ecf2c9e2f69c65c627cc353d88b6cd2807
[ "BSD-2-Clause" ]
1
2021-04-17T15:22:28.000Z
2021-04-17T15:22:28.000Z
spatialpandas/io/__init__.py
isabella232/spatialpandas
0a4e08ecf2c9e2f69c65c627cc353d88b6cd2807
[ "BSD-2-Clause" ]
1
2021-04-17T15:22:00.000Z
2021-04-17T15:22:00.000Z
from .parquet import read_parquet, read_parquet_dask, to_parquet, to_parquet_dask
41
81
0.865854
from .parquet import read_parquet, read_parquet_dask, to_parquet, to_parquet_dask
true
true
08fe5e81abc5c8e3555866511e10a416f7233535
49,966
py
Python
src/hatchet/utils/BBeval.py
FrancisCrickInstitute/hatchet
a92992f3464f4df566ac4e9ff69069e736821b4b
[ "BSD-3-Clause" ]
null
null
null
src/hatchet/utils/BBeval.py
FrancisCrickInstitute/hatchet
a92992f3464f4df566ac4e9ff69069e736821b4b
[ "BSD-3-Clause" ]
null
null
null
src/hatchet/utils/BBeval.py
FrancisCrickInstitute/hatchet
a92992f3464f4df566ac4e9ff69069e736821b4b
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/python3 import os import sys import argparse import shutil import subprocess import shlex import sys, os import math import warnings import numpy as np import matplotlib as mpl mpl.use('Agg') import matplotlib.pyplot as plt import seaborn as sns import pandas as pd import matplotlib.colors as col from matpl...
47.496198
241
0.57363
import os import sys import argparse import shutil import subprocess import shlex import sys, os import math import warnings import numpy as np import matplotlib as mpl mpl.use('Agg') import matplotlib.pyplot as plt import seaborn as sns import pandas as pd import matplotlib.colors as col from matplotlib.pyplot import...
true
true
08fe5ee6e528eff2e1e5c023be500f4fa68edf87
12,105
py
Python
revolt/http.py
Rexogamer/revolt.py
63c5ab3b96830d26bfe15714bdcb12bd702aa4ba
[ "MIT" ]
28
2021-08-17T23:25:48.000Z
2021-12-16T00:13:05.000Z
revolt/http.py
Rexogamer/revolt.py
63c5ab3b96830d26bfe15714bdcb12bd702aa4ba
[ "MIT" ]
14
2021-08-31T06:00:12.000Z
2021-12-28T22:59:08.000Z
revolt/http.py
Rexogamer/revolt.py
63c5ab3b96830d26bfe15714bdcb12bd702aa4ba
[ "MIT" ]
12
2021-08-18T00:55:53.000Z
2021-11-20T16:58:18.000Z
from __future__ import annotations from typing import (TYPE_CHECKING, Any, Coroutine, Literal, Optional, TypeVar, Union, overload) import aiohttp import ulid from .errors import HTTPError, ServerError from .file import File try: import ujson as _json except ImportError: import json as _j...
34.098592
249
0.602396
from __future__ import annotations from typing import (TYPE_CHECKING, Any, Coroutine, Literal, Optional, TypeVar, Union, overload) import aiohttp import ulid from .errors import HTTPError, ServerError from .file import File try: import ujson as _json except ImportError: import json as _j...
true
true
08fe6003a923a07d010b70c027c7a88cd4db2d28
24,604
py
Python
lib/datasets/ycb.py
asbe/PoseCNN
0dc7f4f1d63908a43d5afc1ac4cf327ae88c658c
[ "MIT" ]
null
null
null
lib/datasets/ycb.py
asbe/PoseCNN
0dc7f4f1d63908a43d5afc1ac4cf327ae88c658c
[ "MIT" ]
null
null
null
lib/datasets/ycb.py
asbe/PoseCNN
0dc7f4f1d63908a43d5afc1ac4cf327ae88c658c
[ "MIT" ]
1
2018-06-24T14:48:59.000Z
2018-06-24T14:48:59.000Z
__author__ = 'yuxiang' import os import datasets import datasets.ycb import datasets.imdb import pickle import numpy as np import cv2 from fcn.config import cfg from utils.pose_error import * from transforms3d.quaternions import quat2mat, mat2quat class ycb(datasets.imdb): def __init__(self, image_set, ycb_path =...
43.013986
177
0.524915
__author__ = 'yuxiang' import os import datasets import datasets.ycb import datasets.imdb import pickle import numpy as np import cv2 from fcn.config import cfg from utils.pose_error import * from transforms3d.quaternions import quat2mat, mat2quat class ycb(datasets.imdb): def __init__(self, image_set, ycb_path =...
true
true
08fe601919362576c857a3d6046c989411a2ca31
2,486
py
Python
var/spack/repos/builtin/packages/autoconf/package.py
plamborn/spack
e2ec1c76cecaa2f21690994ba017fe942b37f780
[ "ECL-2.0", "Apache-2.0", "MIT" ]
null
null
null
var/spack/repos/builtin/packages/autoconf/package.py
plamborn/spack
e2ec1c76cecaa2f21690994ba017fe942b37f780
[ "ECL-2.0", "Apache-2.0", "MIT" ]
null
null
null
var/spack/repos/builtin/packages/autoconf/package.py
plamborn/spack
e2ec1c76cecaa2f21690994ba017fe942b37f780
[ "ECL-2.0", "Apache-2.0", "MIT" ]
null
null
null
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Autoconf(AutotoolsPackage, GNUMirrorPackage): """Autoconf -- system configuration part of ...
40.754098
94
0.636766
from spack import * class Autoconf(AutotoolsPackage, GNUMirrorPackage): homepage = 'https://www.gnu.org/software/autoconf/' gnu_mirror_path = 'autoconf/autoconf-2.69.tar.gz' version('2.69', sha256='954bd69b391edc12d6a4a51a2dd1476543da5c6bbf05a95b59dc0dd6fd4c2969') version('2.62', sha256='83aa747e64...
true
true
08fe61a0473ee84668860a1ee75cb29e10ba7f41
1,154
py
Python
testagent/utils/Singleton.py
patriziotufarolo/testagent
daf1a56bd208704dfd61d4c9f779f4ad7ee7d6cd
[ "BSD-3-Clause" ]
1
2016-07-12T15:34:36.000Z
2016-07-12T15:34:36.000Z
testagent/utils/Singleton.py
patriziotufarolo/testagent
daf1a56bd208704dfd61d4c9f779f4ad7ee7d6cd
[ "BSD-3-Clause" ]
null
null
null
testagent/utils/Singleton.py
patriziotufarolo/testagent
daf1a56bd208704dfd61d4c9f779f4ad7ee7d6cd
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import from functools import wraps from testagent.exceptions.SingletonException import SingletonException __author__ = 'patrizio' class Singleton(object): _instances = {} _configured = False def __new__(class_, *args, **kwargs): if class_ not in class_._instances: ...
31.189189
97
0.655113
from __future__ import absolute_import from functools import wraps from testagent.exceptions.SingletonException import SingletonException __author__ = 'patrizio' class Singleton(object): _instances = {} _configured = False def __new__(class_, *args, **kwargs): if class_ not in class_._instances: ...
true
true
08fe623e73d90864c36c02bb8f5e3d14b766eb32
213
py
Python
Q6.1_brain_teasers.py
latika18/learning
a57c9aacc0157bf7c318f46c1e7c4971d1d55aea
[ "Unlicense" ]
null
null
null
Q6.1_brain_teasers.py
latika18/learning
a57c9aacc0157bf7c318f46c1e7c4971d1d55aea
[ "Unlicense" ]
null
null
null
Q6.1_brain_teasers.py
latika18/learning
a57c9aacc0157bf7c318f46c1e7c4971d1d55aea
[ "Unlicense" ]
null
null
null
Add arithmetic operators (plus, minus, times, divide) to make the following expression true: 3 1 3 6 = 8. You can use any parentheses you’d like. _ ________________________________________________________________
53.25
145
0.821596
Add arithmetic operators (plus, minus, times, divide) to make the following expression true: 3 1 3 6 = 8. You can use any parentheses you’d like. _ ________________________________________________________________
false
true
08fe62ce7561eec1aa6385b3c60742ff1a8c7c3a
538
py
Python
ex34.py
SuMonHlaing/python-exercises
367315f76917a053e8854be14559061616b26d73
[ "MIT" ]
null
null
null
ex34.py
SuMonHlaing/python-exercises
367315f76917a053e8854be14559061616b26d73
[ "MIT" ]
null
null
null
ex34.py
SuMonHlaing/python-exercises
367315f76917a053e8854be14559061616b26d73
[ "MIT" ]
null
null
null
animals = ['bear', 'python3.6', 'peacock', 'kangaroo', 'whale', 'platypus'] bear = animals[0] python = animals[1] peacock = animals[2] kangaroo = animals[3] whale = animals[4] platypus = animals[5] print(f"The first animal is at 0 and is a {bear}") print(f"The third animal is at 2 and is a {peacock}") print(f"The firs...
29.888889
75
0.687732
animals = ['bear', 'python3.6', 'peacock', 'kangaroo', 'whale', 'platypus'] bear = animals[0] python = animals[1] peacock = animals[2] kangaroo = animals[3] whale = animals[4] platypus = animals[5] print(f"The first animal is at 0 and is a {bear}") print(f"The third animal is at 2 and is a {peacock}") print(f"The firs...
true
true
08fe636128bab5cff30bd888d0b6d4181a7b1f81
69,586
py
Python
tests/admin_changelist/tests.py
MisterNayDev/django
0788e7c1b339b903a119ce701863e4f4562d83ca
[ "CNRI-Python-GPL-Compatible", "BSD-3-Clause" ]
null
null
null
tests/admin_changelist/tests.py
MisterNayDev/django
0788e7c1b339b903a119ce701863e4f4562d83ca
[ "CNRI-Python-GPL-Compatible", "BSD-3-Clause" ]
null
null
null
tests/admin_changelist/tests.py
MisterNayDev/django
0788e7c1b339b903a119ce701863e4f4562d83ca
[ "CNRI-Python-GPL-Compatible", "BSD-3-Clause" ]
null
null
null
import datetime from django.contrib import admin from django.contrib.admin.models import LogEntry from django.contrib.admin.options import IncorrectLookupParameters from django.contrib.admin.templatetags.admin_list import pagination from django.contrib.admin.tests import AdminSeleniumTestCase from django.contrib.admin...
44.72108
118
0.628
import datetime from django.contrib import admin from django.contrib.admin.models import LogEntry from django.contrib.admin.options import IncorrectLookupParameters from django.contrib.admin.templatetags.admin_list import pagination from django.contrib.admin.tests import AdminSeleniumTestCase from django.contrib.admin...
true
true
08fe63dbce05d5f92c3f8f2c0f100326d91c4b7f
5,741
py
Python
encrypted_model_fields/fields.py
haasr/django3-encrypted-model-fields-
bf3f32557335b4bbec1e1c7176146207fb720fe4
[ "MIT" ]
1
2020-07-16T01:16:37.000Z
2020-07-16T01:16:37.000Z
encrypted_model_fields/fields.py
Ordrslip/django-encrypted-model-fields
74f2fd2f25ff19c27848264a115c2cceb5faa8c5
[ "MIT" ]
null
null
null
encrypted_model_fields/fields.py
Ordrslip/django-encrypted-model-fields
74f2fd2f25ff19c27848264a115c2cceb5faa8c5
[ "MIT" ]
null
null
null
from __future__ import unicode_literals import django.db import django.db.models from six import PY2, string_types from django.utils.functional import cached_property from django.core import validators from django.conf import settings from django.core.exceptions import ImproperlyConfigured import cryptography.fernet ...
29.901042
107
0.687337
from __future__ import unicode_literals import django.db import django.db.models from six import PY2, string_types from django.utils.functional import cached_property from django.core import validators from django.conf import settings from django.core.exceptions import ImproperlyConfigured import cryptography.fernet ...
true
true
08fe6422dec84665742a8ddf76cc44cc0c473caa
44,411
py
Python
nova/exception.py
rossella/nova
9b1180d5a09227604a470cb9d0790b57daf1b6d7
[ "Apache-2.0" ]
null
null
null
nova/exception.py
rossella/nova
9b1180d5a09227604a470cb9d0790b57daf1b6d7
[ "Apache-2.0" ]
null
null
null
nova/exception.py
rossella/nova
9b1180d5a09227604a470cb9d0790b57daf1b6d7
[ "Apache-2.0" ]
null
null
null
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # 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 ...
28.432138
79
0.692981
"""Nova base exception handling. Includes decorator for re-raising Nova-type exceptions. SHOULD include dedicated exception logging. """ import functools import sys from oslo.config import cfg import webob.exc from nova.openstack.common import excutils from nova.openstack.common.gettextutils import _ from nova.o...
false
true
08fe64a8432b007dca8fd52eb00c9bc4e1d09a07
2,282
py
Python
tests/core/bidirectional_iterator_test.py
digjanaik/detect-secrets
624024ad5fd8a608e09ed719e5edab6ca95ef47e
[ "Apache-2.0" ]
46
2020-05-30T19:59:58.000Z
2022-03-30T01:54:53.000Z
tests/core/bidirectional_iterator_test.py
digjanaik/detect-secrets
624024ad5fd8a608e09ed719e5edab6ca95ef47e
[ "Apache-2.0" ]
23
2020-06-01T20:38:03.000Z
2022-03-30T14:50:51.000Z
tests/core/bidirectional_iterator_test.py
digjanaik/detect-secrets
624024ad5fd8a608e09ed719e5edab6ca95ef47e
[ "Apache-2.0" ]
16
2020-06-01T20:51:14.000Z
2022-03-25T08:14:28.000Z
import pytest from detect_secrets.core import bidirectional_iterator class TestBidirectionalIterator: def test_no_input(self): iterator = bidirectional_iterator.BidirectionalIterator([]) with pytest.raises(StopIteration): iterator.__next__() def test_cannot_step_back_too_far(sel...
37.409836
89
0.630587
import pytest from detect_secrets.core import bidirectional_iterator class TestBidirectionalIterator: def test_no_input(self): iterator = bidirectional_iterator.BidirectionalIterator([]) with pytest.raises(StopIteration): iterator.__next__() def test_cannot_step_back_too_far(sel...
true
true
08fe656698e856b250794d0786a27f5aa13436ad
1,020
py
Python
src/gg/interfaces.py
exclowd/gg
6fc30767eaf11b155c607d8212bf38e50fa9bdf2
[ "MIT" ]
null
null
null
src/gg/interfaces.py
exclowd/gg
6fc30767eaf11b155c607d8212bf38e50fa9bdf2
[ "MIT" ]
5
2021-09-01T15:08:03.000Z
2021-09-01T15:08:19.000Z
src/gg/interfaces.py
exclowd/gg
6fc30767eaf11b155c607d8212bf38e50fa9bdf2
[ "MIT" ]
null
null
null
class Renderable: """ Every renderable must have a width and a height For our purposes it would have a rect box It must have a render method to be called with a screen the position onto which it should be rendered """ def width(self): """ Every renderable must have a definit...
23.181818
66
0.581373
class Renderable: def width(self): pass def height(self): pass def shape(self): pass def render(self, screen): pass class Updatable: def update(self, timestamp): pass
true
true
08fe6678fb95734ff209ab34d7245fd3882e4be4
854
py
Python
tensorflow/3_regression.py
RafalStaszak/TensorflowCourse
af0d7f6d367d078dd8d36ec1e48d0a20f65a90ab
[ "MIT" ]
null
null
null
tensorflow/3_regression.py
RafalStaszak/TensorflowCourse
af0d7f6d367d078dd8d36ec1e48d0a20f65a90ab
[ "MIT" ]
null
null
null
tensorflow/3_regression.py
RafalStaszak/TensorflowCourse
af0d7f6d367d078dd8d36ec1e48d0a20f65a90ab
[ "MIT" ]
null
null
null
import tensorflow as tf import numpy as np import matplotlib.pyplot as plt x_data = np.random.rand(20).astype(np.float32) y_data = x_data*1+3+np.random.uniform(0, 0.2, size=[20]) plt.plot(x_data, y_data, 'ro', label='Produced data') plt.legend() plt.show() a=tf.Variable([0], dtype=tf.float32) b=tf.Variable([0], dt...
21.35
69
0.73185
import tensorflow as tf import numpy as np import matplotlib.pyplot as plt x_data = np.random.rand(20).astype(np.float32) y_data = x_data*1+3+np.random.uniform(0, 0.2, size=[20]) plt.plot(x_data, y_data, 'ro', label='Produced data') plt.legend() plt.show() a=tf.Variable([0], dtype=tf.float32) b=tf.Variable([0], dt...
true
true
08fe6727e9c1d821d2f66140ca8b4afc416ed6e4
5,692
py
Python
corpus/datasources/webscrape.py
LeMyst/ConferenceCorpus
727afb6f5c9b2e3807260a6161a27531b2f77dd2
[ "Apache-2.0" ]
1
2022-01-30T12:36:39.000Z
2022-01-30T12:36:39.000Z
corpus/datasources/webscrape.py
LeMyst/ConferenceCorpus
727afb6f5c9b2e3807260a6161a27531b2f77dd2
[ "Apache-2.0" ]
42
2021-07-30T08:51:30.000Z
2022-03-24T11:21:55.000Z
corpus/datasources/webscrape.py
LeMyst/ConferenceCorpus
727afb6f5c9b2e3807260a6161a27531b2f77dd2
[ "Apache-2.0" ]
2
2021-09-29T22:49:00.000Z
2021-11-09T22:38:53.000Z
''' Created on 2020-08-20 @author: wf ''' import urllib.request from urllib.request import build_opener, HTTPCookieProcessor from bs4 import BeautifulSoup import re class WebScrape(object): ''' WebScraper with a rudimentary Parser for https://en.wikipedia.org/wiki/RDFa extended for CEUR-WS and WikiCFP...
33.28655
97
0.549719
import urllib.request from urllib.request import build_opener, HTTPCookieProcessor from bs4 import BeautifulSoup import re class WebScrape(object): def __init__(self,debug:bool=False,showHtml:bool=False,timeout:float=20,agent='Mozilla/5.0'): self.err=None self.valid=False self.debug=debug ...
true
true
08fe67590b2a1c4a4c418f8d16a499ffa177527a
1,867
py
Python
src/promnesia/sources/plaintext.py
volt4ire/promnesia
a552c1e41c1a176b07f0c017c15881bb39ed95bd
[ "MIT" ]
null
null
null
src/promnesia/sources/plaintext.py
volt4ire/promnesia
a552c1e41c1a176b07f0c017c15881bb39ed95bd
[ "MIT" ]
null
null
null
src/promnesia/sources/plaintext.py
volt4ire/promnesia
a552c1e41c1a176b07f0c017c15881bb39ed95bd
[ "MIT" ]
null
null
null
from ..common import get_logger, get_tmpdir, PathIsh from pathlib import Path from shlex import quote # https://linux-and-mac-hacks.blogspot.co.uk/2013/04/use-grep-and-regular-expressions-to.html _URL_REGEX = r'\b(https?|ftp|file)://[-A-Za-z0-9+&@#/%?=~_|!:,.;]*[-A-Za-z0-9+&@#/%=~_|]' # -n to output line numbers so...
31.644068
101
0.572041
from ..common import get_logger, get_tmpdir, PathIsh from pathlib import Path from shlex import quote _URL_REGEX = r'\b(https?|ftp|file)://[-A-Za-z0-9+&@#/%?=~_|!:,.;]*[-A-Za-z0-9+&@#/%=~_|]' _GREP_CMD = r"""grep --color=never -E -I {grep_args} --exclude-dir=".git" '{regex}' {path} || true""" def _extract_from_di...
true
true
08fe67a2979da1dd53201620fec5f7feab8045da
91,698
py
Python
pandas/core/internals/blocks.py
lpkirwin/pandas
bb929a637ca9d4f24ea78ee4cca9ee17b65a5c1e
[ "BSD-3-Clause" ]
null
null
null
pandas/core/internals/blocks.py
lpkirwin/pandas
bb929a637ca9d4f24ea78ee4cca9ee17b65a5c1e
[ "BSD-3-Clause" ]
null
null
null
pandas/core/internals/blocks.py
lpkirwin/pandas
bb929a637ca9d4f24ea78ee4cca9ee17b65a5c1e
[ "BSD-3-Clause" ]
null
null
null
from datetime import datetime, timedelta import inspect import re from typing import TYPE_CHECKING, Any, List, Optional, Type, Union, cast import warnings import numpy as np from pandas._libs import NaT, algos as libalgos, internals as libinternals, lib, writers from pandas._libs.internals import BlockPlacement from ...
32.621131
88
0.579685
from datetime import datetime, timedelta import inspect import re from typing import TYPE_CHECKING, Any, List, Optional, Type, Union, cast import warnings import numpy as np from pandas._libs import NaT, algos as libalgos, internals as libinternals, lib, writers from pandas._libs.internals import BlockPlacement from ...
true
true
08fe67bfdaedf114001d7b43b8ff0ccb301b10c1
3,914
py
Python
Pre_Processing/pre_process_task_manager.py
alexgonzl/TreeMazeAnalyses2
9bd20328368a915a0d9b81c02ae7af37c5c0c839
[ "MIT" ]
null
null
null
Pre_Processing/pre_process_task_manager.py
alexgonzl/TreeMazeAnalyses2
9bd20328368a915a0d9b81c02ae7af37c5c0c839
[ "MIT" ]
null
null
null
Pre_Processing/pre_process_task_manager.py
alexgonzl/TreeMazeAnalyses2
9bd20328368a915a0d9b81c02ae7af37c5c0c839
[ "MIT" ]
null
null
null
import sys import getopt import json import time import warnings import traceback from pathlib import Path from pre_process_functions import process_tetrode, process_events, process_video, post_process_channel_table warnings.simplefilter(action='ignore', category=FutureWarning) if __name__ == "__main__": # Store...
38.752475
119
0.588401
import sys import getopt import json import time import warnings import traceback from pathlib import Path from pre_process_functions import process_tetrode, process_events, process_video, post_process_channel_table warnings.simplefilter(action='ignore', category=FutureWarning) if __name__ == "__main__": tas...
true
true
08fe67cc5306ae8f1edd888deb8ddee8f58727e7
12,741
py
Python
src/selfies_ga/ga_funcs.py
AustinT/ai4sci-2021-denovo-benchmarks
32ecd258394156581c2435769a3ab4aa3823b72b
[ "MIT" ]
2
2021-12-11T15:48:52.000Z
2021-12-16T15:04:51.000Z
src/selfies_ga/ga_funcs.py
AustinT/ai4sci-2021-denovo-benchmarks
32ecd258394156581c2435769a3ab4aa3823b72b
[ "MIT" ]
null
null
null
src/selfies_ga/ga_funcs.py
AustinT/ai4sci-2021-denovo-benchmarks
32ecd258394156581c2435769a3ab4aa3823b72b
[ "MIT" ]
1
2022-02-09T17:14:45.000Z
2022-02-09T17:14:45.000Z
# Code largely copied from: # https://github.com/aspuru-guzik-group/stoned-selfies/blob/main/GA_rediscover.py import random import functools from typing import Union import logging import selfies import numpy as np from rdkit.Chem import MolFromSmiles as smi2mol from rdkit.Chem import MolToSmiles as mol2smi from rdkit...
37.584071
110
0.632917
import random import functools from typing import Union import logging import selfies import numpy as np from rdkit.Chem import MolFromSmiles as smi2mol from rdkit.Chem import MolToSmiles as mol2smi from rdkit import RDLogger from selfies import encoder, decoder from function_utils import CachedFunction ga_logger =...
true
true
08fe683667f07d1e9c607353fa670907a0cdb5f1
86
py
Python
simple_playgrounds/playgrounds/__init__.py
Asjidkalam/simple-playgrounds
72ec42987a33175103191fa9722e0e002f889954
[ "MIT" ]
null
null
null
simple_playgrounds/playgrounds/__init__.py
Asjidkalam/simple-playgrounds
72ec42987a33175103191fa9722e0e002f889954
[ "MIT" ]
1
2021-02-19T20:55:05.000Z
2021-02-19T20:55:05.000Z
simple_playgrounds/playgrounds/__init__.py
Asjidkalam/simple-playgrounds
72ec42987a33175103191fa9722e0e002f889954
[ "MIT" ]
1
2021-02-19T20:46:00.000Z
2021-02-19T20:46:00.000Z
from .empty import SingleRoom, LinearRooms, ConnectedRooms2D from .collection import *
43
60
0.837209
from .empty import SingleRoom, LinearRooms, ConnectedRooms2D from .collection import *
true
true
08fe687a73df2c257519929d8deb2575a98d1493
4,315
py
Python
tests/ut/python/parallel/test_layer_norm.py
ZephyrChenzf/mindspore
8f191847cf71e12715ced96bc3575914f980127a
[ "Apache-2.0" ]
7
2020-05-24T03:19:26.000Z
2020-05-24T03:20:00.000Z
tests/ut/python/parallel/test_layer_norm.py
dilingsong/mindspore
4276050f2494cfbf8682560a1647576f859991e8
[ "Apache-2.0" ]
null
null
null
tests/ut/python/parallel/test_layer_norm.py
dilingsong/mindspore
4276050f2494cfbf8682560a1647576f859991e8
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
39.587156
107
0.666512
import numpy as np import pytest import mindspore as ms from mindspore import context, Tensor, Parameter from mindspore.common.api import _executor from mindspore.common.initializer import initializer from mindspore.nn import Cell, TrainOneStepCell, Momentum from mindspore.ops import operations as P class Net(Cell):...
true
true
08fe68c256c43b3ff3a1128228a1abf1cedc17f3
8,300
py
Python
data_pilot2/nav/day3_test2/env5/8/session_15_07_31_12_45/config.py
thackerybrown/SST-anal
e3fa368f8d57b62bbcbfa2de5a0d2c24863a5d30
[ "BSD-2-Clause" ]
null
null
null
data_pilot2/nav/day3_test2/env5/8/session_15_07_31_12_45/config.py
thackerybrown/SST-anal
e3fa368f8d57b62bbcbfa2de5a0d2c24863a5d30
[ "BSD-2-Clause" ]
null
null
null
data_pilot2/nav/day3_test2/env5/8/session_15_07_31_12_45/config.py
thackerybrown/SST-anal
e3fa368f8d57b62bbcbfa2de5a0d2c24863a5d30
[ "BSD-2-Clause" ]
1
2019-10-11T17:36:36.000Z
2019-10-11T17:36:36.000Z
# Copyright (c) 2007-2012, Michael J. Kahana. # # This file is part of PandaEPL. # # PandaEPL is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 2.1 of the License, or # (at your option) any...
33.603239
252
0.671807
FOV = 75 linearAcceleration = 100fullForwardSpeed = 4.5 fullBackwardSpeed = 0turningAcceleration = 85 fullTurningSpeed = 85 turningLinearSpeed = 0.25 maxTurningLinearSpeed = 7.0 minTurningLinearSpeedReqd = 1.0 minTurningLinearSpeed = 1.5 minTurningLinearSpeedIncrement = 0.5 initia...
true
true
08fe68f5d253b4ee4b6308742746ae718e61105f
1,899
py
Python
onmt/utils/stats_manager.py
sw32-seo/GTA
86b102a14b78f6c8b50d742a56445c748e59b51e
[ "MIT" ]
5
2021-09-30T16:28:48.000Z
2022-03-30T05:20:27.000Z
onmt/utils/stats_manager.py
sw32-seo/GTA
86b102a14b78f6c8b50d742a56445c748e59b51e
[ "MIT" ]
null
null
null
onmt/utils/stats_manager.py
sw32-seo/GTA
86b102a14b78f6c8b50d742a56445c748e59b51e
[ "MIT" ]
null
null
null
import numpy as np class StatsManager(object): def __init__(self, stat_names=['step', 'acc', 'ppl']): self.stat_names = stat_names self.train_stats = {} self.val_stats = {} for name in stat_names: self.train_stats[name] = [] self.val_stats[name] = [] d...
33.910714
73
0.56872
import numpy as np class StatsManager(object): def __init__(self, stat_names=['step', 'acc', 'ppl']): self.stat_names = stat_names self.train_stats = {} self.val_stats = {} for name in stat_names: self.train_stats[name] = [] self.val_stats[name] = [] d...
true
true
08fe69e41a66eaaa3a78a49b81ee7a1660d4332f
1,183
py
Python
salt/output/overstatestage.py
Vye/salt
89ef86096c8f3aa02834cf2e94fc542fd2127879
[ "Apache-2.0" ]
3
2016-09-03T06:26:42.000Z
2019-06-30T13:04:53.000Z
salt/output/overstatestage.py
hulu/salt
b96b852aa15e32a95fceae8b4210a31f89a1100f
[ "Apache-2.0" ]
null
null
null
salt/output/overstatestage.py
hulu/salt
b96b852aa15e32a95fceae8b4210a31f89a1100f
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' Display clean output of an overstate stage ========================================== This outputter is used to display :ref:`OverState <states-overstate>` stages, and should not be called directly. ''' from __future__ import absolute_import #[{'group2': {'match': ['fedora17-2', 'fedora17...
27.511628
77
0.469992
from __future__ import absolute_import import salt.utils def output(data): colors = salt.utils.get_colors( __opts__.get('color'), __opts__.get('color_theme')) ostr = '' for comp in data: for name, stage in comp.items(): ostr += '{0}{1}: {2}\n'.format( ...
true
true
08fe69e468ff0303efe2eb69eaf7f0b4938065c8
2,782
py
Python
catalog/templates/.cached_templates/index.html.py
lindsthemormon/fomo_intex2
3d500414fb17db64929da40e27cbd4ea916ec936
[ "Apache-2.0" ]
null
null
null
catalog/templates/.cached_templates/index.html.py
lindsthemormon/fomo_intex2
3d500414fb17db64929da40e27cbd4ea916ec936
[ "Apache-2.0" ]
null
null
null
catalog/templates/.cached_templates/index.html.py
lindsthemormon/fomo_intex2
3d500414fb17db64929da40e27cbd4ea916ec936
[ "Apache-2.0" ]
null
null
null
# -*- coding:utf-8 -*- from mako import runtime, filters, cache UNDEFINED = runtime.UNDEFINED STOP_RENDERING = runtime.STOP_RENDERING __M_dict_builtin = dict __M_locals_builtin = locals _magic_number = 10 _modified_time = 1523548976.620961 _enable_loop = True _template_filename = 'C:/Users/Linds/desktop/intex2_fomo/cat...
38.638889
238
0.6578
from mako import runtime, filters, cache UNDEFINED = runtime.UNDEFINED STOP_RENDERING = runtime.STOP_RENDERING __M_dict_builtin = dict __M_locals_builtin = locals _magic_number = 10 _modified_time = 1523548976.620961 _enable_loop = True _template_filename = 'C:/Users/Linds/desktop/intex2_fomo/catalog/templates/index.ht...
true
true
08fe6a7715b9f1ee6d5f9498fc31d0ccc0fe1279
3,905
py
Python
scripts/plot_fig8.py
pik-copan/pycopanpbcc
3fcf0a895cd444f445e1a36f0373fefa4eefe786
[ "BSD-3-Clause" ]
1
2020-07-30T16:46:08.000Z
2020-07-30T16:46:08.000Z
scripts/plot_fig8.py
pik-copan/pycopanpbcc
3fcf0a895cd444f445e1a36f0373fefa4eefe786
[ "BSD-3-Clause" ]
null
null
null
scripts/plot_fig8.py
pik-copan/pycopanpbcc
3fcf0a895cd444f445e1a36f0373fefa4eefe786
[ "BSD-3-Clause" ]
1
2022-02-26T09:16:37.000Z
2022-02-26T09:16:37.000Z
# -*- coding: utf-8 -*- # Author: Vera Heck <heck@pik-potsdam.de> # Script generates Fig. 8 of Heck et al. 2016 (ESD) import numpy as np import matplotlib.pyplot as plt import matplotlib.cm as cm from pylab import * array = np.array nstep = 128 # steps of parameter variation par1='alpha_max' par2= 'thresh_geo' a2...
35.18018
141
0.664533
import numpy as np import matplotlib.pyplot as plt import matplotlib.cm as cm from pylab import * array = np.array nstep = 128 par1='alpha_max' par2= 'thresh_geo' a2 = np.load('/save/a_alpha_max_thresh_geo_c_max=0.2.npy') a4 = np.load('/save/a_alpha_max_thresh_geo_c_max=0.31.npy') a6 = np.load('/save/a_alpha_max_t...
true
true
08fe6ad711fa977248a2ffb5ff89d18ebc221778
2,511
py
Python
setup.py
arubiales/scikit-route
83262d9d41ff700c911927f5bb6c93feb0c595e4
[ "MIT" ]
2
2020-12-30T19:01:08.000Z
2022-01-17T09:50:59.000Z
setup.py
arubiales/scikit-route
83262d9d41ff700c911927f5bb6c93feb0c595e4
[ "MIT" ]
39
2020-12-30T14:58:45.000Z
2021-06-21T20:50:02.000Z
setup.py
arubiales/scikit-route
83262d9d41ff700c911927f5bb6c93feb0c595e4
[ "MIT" ]
1
2020-12-31T00:41:10.000Z
2020-12-31T00:41:10.000Z
import os from setuptools import setup, find_packages from setuptools.extension import Extension from Cython.Build import cythonize import Cython.Compiler.Options Cython.Compiler.Options.annotate = True extensions = cythonize([ Extension( "skroute.heuristics.brute._base_brute_force._base_brute_force", ...
38.045455
122
0.707686
import os from setuptools import setup, find_packages from setuptools.extension import Extension from Cython.Build import cythonize import Cython.Compiler.Options Cython.Compiler.Options.annotate = True extensions = cythonize([ Extension( "skroute.heuristics.brute._base_brute_force._base_brute_force", ...
true
true
08fe6afcc84b07d2edc9683b8362eae0dd3486f5
1,466
py
Python
program/GANs/data_generator.py
robgon-art/music-generator
88a681bef5ee53fcd764e8c156ee97c892f0caf3
[ "MIT" ]
35
2019-02-01T14:59:46.000Z
2022-03-22T02:23:08.000Z
program/GANs/data_generator.py
robgon-art/music-generator
88a681bef5ee53fcd764e8c156ee97c892f0caf3
[ "MIT" ]
null
null
null
program/GANs/data_generator.py
robgon-art/music-generator
88a681bef5ee53fcd764e8c156ee97c892f0caf3
[ "MIT" ]
11
2019-02-01T14:59:48.000Z
2021-12-29T01:24:18.000Z
import random from random import randint from numpy import array import numpy NOTE_SPACE = 24 #two octaves of notes are valid here. TRUE_CHORD_FALSE_MAX = 0.0 def get_three_notes_and_is_chord(all_major=False): answer = [0] * NOTE_SPACE if(randint(0, 1) == 0 or all_major): #make half major, half garbage #return...
28.745098
87
0.720327
import random from random import randint from numpy import array import numpy NOTE_SPACE = 24 TRUE_CHORD_FALSE_MAX = 0.0 def get_three_notes_and_is_chord(all_major=False): answer = [0] * NOTE_SPACE if(randint(0, 1) == 0 or all_major): base = randint(0, 16) answer = numpy.random.uniform(low=0.0, hi...
true
true
08fe6caaabd2cb492102f71bde05ffaf3d7f64ee
643
py
Python
tests/network/state/test_get_transaction.py
sambacha/brownie
b51bafa9e1ab8f3aa794348686db4cbd7c58c3c7
[ "MIT" ]
1
2020-10-09T17:23:03.000Z
2020-10-09T17:23:03.000Z
tests/network/state/test_get_transaction.py
sambacha/brownie
b51bafa9e1ab8f3aa794348686db4cbd7c58c3c7
[ "MIT" ]
null
null
null
tests/network/state/test_get_transaction.py
sambacha/brownie
b51bafa9e1ab8f3aa794348686db4cbd7c58c3c7
[ "MIT" ]
null
null
null
import pytest from web3.exceptions import TransactionNotFound def test_exists_in_history(accounts, chain, history): tx = accounts[0].transfer(accounts[1], 1000) assert chain.get_transaction(tx.txid) == tx def test_not_in_history(accounts, chain, history): tx = accounts[0].transfer(accounts[1], 1000) ...
29.227273
99
0.757387
import pytest from web3.exceptions import TransactionNotFound def test_exists_in_history(accounts, chain, history): tx = accounts[0].transfer(accounts[1], 1000) assert chain.get_transaction(tx.txid) == tx def test_not_in_history(accounts, chain, history): tx = accounts[0].transfer(accounts[1], 1000) ...
true
true
08fe6cb4d5fdc0d3d55520c044febe6c62b92a8d
2,473
py
Python
tensorflow_federated/python/core/backends/iree/computation_module.py
j35tor/federated
d92bfa6b8e3c9ebbac51ff7a3a180c2baaa08730
[ "Apache-2.0" ]
1
2021-04-01T08:35:06.000Z
2021-04-01T08:35:06.000Z
tensorflow_federated/python/core/backends/iree/computation_module.py
j35tor/federated
d92bfa6b8e3c9ebbac51ff7a3a180c2baaa08730
[ "Apache-2.0" ]
null
null
null
tensorflow_federated/python/core/backends/iree/computation_module.py
j35tor/federated
d92bfa6b8e3c9ebbac51ff7a3a180c2baaa08730
[ "Apache-2.0" ]
null
null
null
# Copyright 2020, The TensorFlow Federated Authors. # # 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 o...
40.540984
80
0.767085
from tensorflow_federated.python.common_libs import py_typecheck from tensorflow_federated.python.core.api import computation_types from tensorflow_federated.python.core.api import typed_object class ComputationModule(typed_object.TypedObject): def __init__(self, compiler_module, function_name, type_sign...
true
true
08fe6d2332bfc87fb25d1643afc08e5f7d77aa1e
1,209
py
Python
setup.py
k1000/django-stratus
1e0cf86c1137a5738053c19fd53193fa92869256
[ "MIT" ]
1
2015-11-05T15:17:05.000Z
2015-11-05T15:17:05.000Z
setup.py
k1000/django-stratus
1e0cf86c1137a5738053c19fd53193fa92869256
[ "MIT" ]
null
null
null
setup.py
k1000/django-stratus
1e0cf86c1137a5738053c19fd53193fa92869256
[ "MIT" ]
null
null
null
# -*- coding: utf-8 - # # This file is part of gunicorn released under the MIT license. # See the NOTICE for more information. import os from setuptools import setup, find_packages setup( name = 'django-stratus', version = "0.1", description = 'Preview your git commits.', long_description = file( ...
27.477273
71
0.593052
import os from setuptools import setup, find_packages setup( name = 'django-stratus', version = "0.1", description = 'Preview your git commits.', long_description = file( os.path.join( os.path.dirname(__file__), 'README.rst' ) ).read(), author = 'Kamil...
true
true
08fe6dc6c2e8b581261a5973c7977ef7702e0f97
8,072
py
Python
src/reactive/ctdb.py
cholcombe973/charm-glusterfs
56c424393d38188b0b35e14f9955215d6f6eed79
[ "Apache-2.0" ]
null
null
null
src/reactive/ctdb.py
cholcombe973/charm-glusterfs
56c424393d38188b0b35e14f9955215d6f6eed79
[ "Apache-2.0" ]
null
null
null
src/reactive/ctdb.py
cholcombe973/charm-glusterfs
56c424393d38188b0b35e14f9955215d6f6eed79
[ "Apache-2.0" ]
null
null
null
# Setup ctdb for high availability NFSv3 """ NOTE: Most of this is still Rust code and needs to be translated to Python from ipaddress import ip_address, ip_network from io import TextIOBase import netifaces from typing import List, Optional class VirtualIp: def __init__(self, cidr: ip_network, interface: str): ...
34.20339
79
0.603196
true
true
08fe6e2efbae931f176ce37ea156ac73a505f524
7,532
py
Python
demos/SAC/GraphDrive-Medium(SR)/HW_sans_simplicity.py
proroklab/xaer
9a59d1ec19ffd8037697aa7ffc43246d4c0c0e69
[ "MIT" ]
1
2021-10-16T16:48:56.000Z
2021-10-16T16:48:56.000Z
demos/SAC/GraphDrive-Medium(SR)/HW_sans_simplicity.py
proroklab/xaer
9a59d1ec19ffd8037697aa7ffc43246d4c0c0e69
[ "MIT" ]
null
null
null
demos/SAC/GraphDrive-Medium(SR)/HW_sans_simplicity.py
proroklab/xaer
9a59d1ec19ffd8037697aa7ffc43246d4c0c0e69
[ "MIT" ]
null
null
null
# Read this guide for how to use this script: https://medium.com/distributed-computing-with-ray/intro-to-rllib-example-environments-3a113f532c70 import os os.environ["TUNE_RESULT_DIR"] = 'tmp/ray_results' import multiprocessing import json import shutil import ray import time from xarl.utils.workflow import train from...
91.853659
433
0.749336
import os os.environ["TUNE_RESULT_DIR"] = 'tmp/ray_results' import multiprocessing import json import shutil import ray import time from xarl.utils.workflow import train from xarl.agents.xasac import XASACTrainer, XASAC_DEFAULT_CONFIG from environments import * from ray.rllib.models import ModelCatalog from xarl.model...
true
true
08fe6e4ecda1288bd59a4a82d1c8b7388bdc7eae
52,612
py
Python
tensorflow/python/ops/linalg/linear_operator.py
ashutom/tensorflow-upstream
c16069c19de9e286dd664abb78d0ea421e9f32d4
[ "Apache-2.0" ]
8
2021-08-03T03:57:10.000Z
2021-12-13T01:19:02.000Z
tensorflow/python/ops/linalg/linear_operator.py
CaptainGizzy21/tensorflow
3457a2b122e50b4d44ceaaed5a663d635e5c22df
[ "Apache-2.0" ]
17
2021-08-12T19:38:42.000Z
2022-01-27T14:39:35.000Z
tensorflow/python/ops/linalg/linear_operator.py
CaptainGizzy21/tensorflow
3457a2b122e50b4d44ceaaed5a663d635e5c22df
[ "Apache-2.0" ]
4
2022-01-13T11:23:44.000Z
2022-03-02T11:11:42.000Z
# Copyright 2016 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...
36.15945
116
0.683038
from __future__ import absolute_import from __future__ import division from __future__ import print_function import abc import contextlib import numpy as np import six from tensorflow.python.framework import composite_tensor from tensorflow.python.framework import dtypes from tensorflow.python.framework import ops ...
true
true
08fe6e52d7accfb1972b9f9002bc85f89bbebcdc
5,249
py
Python
tests/cpp/coordinate_map_gpu_test.py
NNstorm/MinkowskiEngine
443b37a58c379b2482b5d160d9e874b356b4bf2f
[ "MIT" ]
851
2020-07-09T21:35:06.000Z
2022-03-31T14:35:57.000Z
tests/cpp/coordinate_map_gpu_test.py
NNstorm/MinkowskiEngine
443b37a58c379b2482b5d160d9e874b356b4bf2f
[ "MIT" ]
301
2020-07-09T21:51:23.000Z
2022-03-30T12:23:24.000Z
tests/cpp/coordinate_map_gpu_test.py
NNstorm/MinkowskiEngine
443b37a58c379b2482b5d160d9e874b356b4bf2f
[ "MIT" ]
151
2020-07-15T09:22:09.000Z
2022-03-23T21:32:47.000Z
import numpy as np import unittest import time import torch import MinkowskiEngineTest._C from utils import load_file, batched_coordinates class CoordinateMapTestCase(unittest.TestCase): def test_batch_insert(self): assert torch.cuda.is_available() coordinates = torch.IntTensor([[0, 1], [1, 2], ...
38.595588
88
0.595733
import numpy as np import unittest import time import torch import MinkowskiEngineTest._C from utils import load_file, batched_coordinates class CoordinateMapTestCase(unittest.TestCase): def test_batch_insert(self): assert torch.cuda.is_available() coordinates = torch.IntTensor([[0, 1], [1, 2], ...
true
true
08fe6e571d02b2b58ed81628e51af169dba1073c
8,638
py
Python
aitools/proofs/knowledge_base.py
OneManEquipe/thinkerino
4b9508156371643f31d1d26608e42e3aafcb0153
[ "MIT" ]
1
2020-05-02T19:44:18.000Z
2020-05-02T19:44:18.000Z
aitools/proofs/knowledge_base.py
OneManEquipe/aitools
4b9508156371643f31d1d26608e42e3aafcb0153
[ "MIT" ]
29
2019-08-07T17:49:03.000Z
2021-08-31T10:25:00.000Z
aitools/proofs/knowledge_base.py
OneManEquipe/thinkerino
4b9508156371643f31d1d26608e42e3aafcb0153
[ "MIT" ]
null
null
null
import asyncio import logging import typing from contextlib import contextmanager from typing import Iterable from aitools.logic.core import Expression, LogicObject, Variable from aitools.logic.language import Language from aitools.logic.unification import Substitution from aitools.logic.utils import normalize_variabl...
41.729469
118
0.681524
import asyncio import logging import typing from contextlib import contextmanager from typing import Iterable from aitools.logic.core import Expression, LogicObject, Variable from aitools.logic.language import Language from aitools.logic.unification import Substitution from aitools.logic.utils import normalize_variabl...
true
true