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
1c220d94922be680021bd96c6b7ddbf2593c6125
3,509
py
Python
tensorflow/python/autograph/utils/py_func_test.py
fraudies/tensorflow
a42423e302b71893bbd24aa896869941013c07fb
[ "Apache-2.0" ]
52
2018-11-12T06:39:35.000Z
2022-03-08T05:31:27.000Z
tensorflow/python/autograph/utils/py_func_test.py
fraudies/tensorflow
a42423e302b71893bbd24aa896869941013c07fb
[ "Apache-2.0" ]
2
2018-12-04T08:35:40.000Z
2020-10-22T16:17:39.000Z
tensorflow/python/autograph/utils/py_func_test.py
fraudies/tensorflow
a42423e302b71893bbd24aa896869941013c07fb
[ "Apache-2.0" ]
17
2019-03-11T01:17:16.000Z
2022-02-21T00:44:47.000Z
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
33.740385
80
0.632089
from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.python.autograph.utils import py_func from tensorflow.python.framework import constant_op from tensorflow.python.framework import dtypes from tensorflow.python.platform import tes...
true
true
1c220da53959785a6abd189d87f4c105eddfce73
547
py
Python
nature/bricks/built_in/input.py
bionicles/neuromax
a53a17a1c033c11ac607a9e28f43b1f906e58aad
[ "MIT" ]
null
null
null
nature/bricks/built_in/input.py
bionicles/neuromax
a53a17a1c033c11ac607a9e28f43b1f906e58aad
[ "MIT" ]
null
null
null
nature/bricks/built_in/input.py
bionicles/neuromax
a53a17a1c033c11ac607a9e28f43b1f906e58aad
[ "MIT" ]
null
null
null
import tensorflow as tf from tools import make_id def Input(spec, batch_size=1, drop_batch_dim=False): shape, format = spec["shape"], spec["format"] # if tf.is_tensor(tensor_or_shape): # shape = tensor_or_shape.shape # else: # shape = tensor_or_shape # if drop_batch_dim: # shap...
32.176471
66
0.659963
import tensorflow as tf from tools import make_id def Input(spec, batch_size=1, drop_batch_dim=False): shape, format = spec["shape"], spec["format"] shape_string = 'x'.join([str(n) for n in list(shape)]) name = make_id(f"{batch_size}x{shape_string}_{format}") return tf.ke...
true
true
1c220dff11311a9edc058a8cbdbdf602dbdd3174
9,377
py
Python
networking_l2gw/tests/unit/services/l2gateway/test_plugin.py
mail2nsrajesh/networking-l2gw
4bb98061ab23e3b9815620d01d9b994915ff8261
[ "Apache-2.0" ]
null
null
null
networking_l2gw/tests/unit/services/l2gateway/test_plugin.py
mail2nsrajesh/networking-l2gw
4bb98061ab23e3b9815620d01d9b994915ff8261
[ "Apache-2.0" ]
null
null
null
networking_l2gw/tests/unit/services/l2gateway/test_plugin.py
mail2nsrajesh/networking-l2gw
4bb98061ab23e3b9815620d01d9b994915ff8261
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2016 Openstack Foundation # # 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 ...
50.144385
79
0.618001
import mock from neutron.tests import base from networking_l2gw.db.l2gateway import l2gateway_db from networking_l2gw.services.l2gateway.common import config from networking_l2gw.services.l2gateway import plugin as l2gw_plugin class TestL2GatewayPlugin(base.BaseTestCase): def setUp(self): ...
true
true
1c221174ff62eeadc53d4bff4bbeab51012cc5c2
2,810
py
Python
smms.py
Kenny-Z/IOT-Message-Board-with-Face-Recognition
81b9a778ebf850b9f78e5d18a52720bd78593565
[ "MIT" ]
null
null
null
smms.py
Kenny-Z/IOT-Message-Board-with-Face-Recognition
81b9a778ebf850b9f78e5d18a52720bd78593565
[ "MIT" ]
null
null
null
smms.py
Kenny-Z/IOT-Message-Board-with-Face-Recognition
81b9a778ebf850b9f78e5d18a52720bd78593565
[ "MIT" ]
null
null
null
import json import requests BASE_PATH = 'https://sm.ms/api/v2/' class SMMS: def __init__(self, username, password): self.login_success = False self.api_key = None self.username = username self.password = password def login(self): """ 登录SMMS username,password ...
31.222222
114
0.571174
import json import requests BASE_PATH = 'https://sm.ms/api/v2/' class SMMS: def __init__(self, username, password): self.login_success = False self.api_key = None self.username = username self.password = password def login(self): result = self.__post('token', data={'u...
true
true
1c2211f791cbf26ca26cc5eb4c0a5d0c352af332
1,439
py
Python
TlmMQRecv.py
CDKnightNASA/cFS-GroundSystem
3263506ae0501eb1d7b9aa6e401ed018bb1f5ffa
[ "Apache-2.0" ]
null
null
null
TlmMQRecv.py
CDKnightNASA/cFS-GroundSystem
3263506ae0501eb1d7b9aa6e401ed018bb1f5ffa
[ "Apache-2.0" ]
1
2020-06-04T12:16:56.000Z
2020-06-04T12:16:56.000Z
TlmMQRecv.py
CDKnightNASA/cFS-GroundSystem
3263506ae0501eb1d7b9aa6e401ed018bb1f5ffa
[ "Apache-2.0" ]
null
null
null
# # GSC-18128-1, "Core Flight Executive Version 6.7" # # Copyright (c) 2006-2019 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 fi...
28.78
83
0.708131
import zmq def main(): context = zmq.Context() subscriber = context.socket(zmq.SUB) subscriber.connect("ipc:///tmp/GroundSystem") subscriber.setsockopt(zmq.SUBSCRIBE, b"GroundSystem") while True: address, contents = subscriber.recv_multipart() ...
true
true
1c22122640602591e0b16170818f29c1dcc48cdd
2,807
py
Python
main_archivepics.py
hmrs-cr/PyArcPics
daf07cb65ab253d5852bbf8586633d1be3ba739b
[ "Apache-2.0" ]
null
null
null
main_archivepics.py
hmrs-cr/PyArcPics
daf07cb65ab253d5852bbf8586633d1be3ba739b
[ "Apache-2.0" ]
null
null
null
main_archivepics.py
hmrs-cr/PyArcPics
daf07cb65ab253d5852bbf8586633d1be3ba739b
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # coding=UTF8 import argparse import os import sys from picturearchiver import PictureArchiver import utils DEFAUL_CONFIG = "~/.hmsoft/arcpics.json" if __name__ == "__main__": parser = argparse.ArgumentParser(description='Backup pictures from source to destination, sorting them in a folder ' ...
38.452055
129
0.634841
import argparse import os import sys from picturearchiver import PictureArchiver import utils DEFAUL_CONFIG = "~/.hmsoft/arcpics.json" if __name__ == "__main__": parser = argparse.ArgumentParser(description='Backup pictures from source to destination, sorting them in a folder ' ...
false
true
1c22136543c43f01cd24b096a1fd6d1adada2504
8,788
py
Python
utils.py
devzhk/Implicit-Competitive-Regularization
71bda29f2db18d1d7ae9860e4a761ff61cbec756
[ "Apache-2.0" ]
107
2019-10-15T15:55:20.000Z
2021-12-27T02:02:50.000Z
utils.py
devzhk/Implicit-Competitive-Regularization
71bda29f2db18d1d7ae9860e4a761ff61cbec756
[ "Apache-2.0" ]
11
2019-10-16T09:41:23.000Z
2020-12-16T08:44:38.000Z
utils.py
devzhk/Implicit-Competitive-Regularization
71bda29f2db18d1d7ae9860e4a761ff61cbec756
[ "Apache-2.0" ]
26
2019-10-15T03:38:41.000Z
2021-03-25T11:52:08.000Z
from argparse import ArgumentParser def stylegan_parser(): description = 'Basic parser for training styleGAN' parser = ArgumentParser(description=description) parser.add_argument("--path", type=str, help="path to the lmdb dataset") parser.add_argument( "--iter", type=int, default=800000, help=...
38.54386
105
0.652594
from argparse import ArgumentParser def stylegan_parser(): description = 'Basic parser for training styleGAN' parser = ArgumentParser(description=description) parser.add_argument("--path", type=str, help="path to the lmdb dataset") parser.add_argument( "--iter", type=int, default=800000, help=...
true
true
1c22137dc0d57f24603fce2ed2cb0216d159fec8
6,303
py
Python
otp/avatar/PositionExaminer.py
chrisd149/OpenLevelEditor
2527f84910b198a38de140b533d07d65fe30c6c9
[ "MIT" ]
25
2020-11-23T13:55:42.000Z
2022-03-26T06:17:18.000Z
otp/avatar/PositionExaminer.py
chrisd149/OpenLevelEditor
2527f84910b198a38de140b533d07d65fe30c6c9
[ "MIT" ]
15
2020-11-25T14:47:24.000Z
2021-04-21T23:40:57.000Z
otp/avatar/PositionExaminer.py
chrisd149/OpenLevelEditor
2527f84910b198a38de140b533d07d65fe30c6c9
[ "MIT" ]
11
2020-11-25T13:57:02.000Z
2022-02-23T14:25:15.000Z
from panda3d.core import * from direct.showbase.DirectObject import DirectObject from otp.otpbase import OTPGlobals class PositionExaminer(DirectObject, NodePath): """ This class defines an object that can be used to examine a point in space for suitability for standing on. It's used, for instance, t...
39.892405
86
0.650325
from panda3d.core import * from direct.showbase.DirectObject import DirectObject from otp.otpbase import OTPGlobals class PositionExaminer(DirectObject, NodePath): def __init__(self): try: self.__initialized return except: self.__initialized = 1 ...
true
true
1c2216ca6d8d789949f82aeb7057ae3f12b0a567
192
py
Python
homeworks/aleksey_gukov/hw05/test_lvl2.py
tgrx/Z22
b2539682ff26c8b6d9f63a7670c8a9c6b614a8ff
[ "Apache-2.0" ]
null
null
null
homeworks/aleksey_gukov/hw05/test_lvl2.py
tgrx/Z22
b2539682ff26c8b6d9f63a7670c8a9c6b614a8ff
[ "Apache-2.0" ]
8
2019-11-15T18:15:56.000Z
2020-02-03T18:05:05.000Z
homeworks/aleksey_gukov/hw05/test_lvl2.py
tgrx/Z22
b2539682ff26c8b6d9f63a7670c8a9c6b614a8ff
[ "Apache-2.0" ]
null
null
null
from homeworks.aleksey_gukov.hw05 import level02 def test(): assert level02.hello("") == "Hi!" assert level02.hello("Alex") == "Hello, Alex!" assert level02.hello(None) == "Hi!"
24
50
0.651042
from homeworks.aleksey_gukov.hw05 import level02 def test(): assert level02.hello("") == "Hi!" assert level02.hello("Alex") == "Hello, Alex!" assert level02.hello(None) == "Hi!"
true
true
1c221729cd3baf780089eb9b8bb4a4133a507eaa
774
py
Python
hatch/util.py
mtvjr/mtvjrbot
eda26c2e8f57cd108cafee18ae4e1850da9461c2
[ "MIT" ]
null
null
null
hatch/util.py
mtvjr/mtvjrbot
eda26c2e8f57cd108cafee18ae4e1850da9461c2
[ "MIT" ]
null
null
null
hatch/util.py
mtvjr/mtvjrbot
eda26c2e8f57cd108cafee18ae4e1850da9461c2
[ "MIT" ]
null
null
null
async def send(context, message): ''' This function prints a message to stdout and sends it to the context ''' print(message) await context.send(message) def is_from_guild(context): """ This function returns true if a message was sent from a guild, false otherwise. """ return conte...
24.1875
92
0.667959
async def send(context, message): print(message) await context.send(message) def is_from_guild(context): return context.message.guild is not None def is_from_dm(context): return context.message.guild is None def get_displayname(id, context): user = context.message.guild.get_member(id) if u...
true
true
1c22184a7a62697cc98560cb029a2a7870d98979
891
py
Python
pioneer/das/api/sensors/radar_ti.py
leddartech/pioneer.das.api
35f2c541ea8d1768d5f4612ea8d29cb2ba8345b7
[ "BSD-3-Clause" ]
8
2021-02-19T16:24:18.000Z
2021-10-01T17:51:22.000Z
pioneer/das/api/sensors/radar_ti.py
leddartech/pioneer.das.api
35f2c541ea8d1768d5f4612ea8d29cb2ba8345b7
[ "BSD-3-Clause" ]
8
2021-02-25T08:56:37.000Z
2021-10-20T20:58:26.000Z
pioneer/das/api/sensors/radar_ti.py
leddartech/pioneer.das.api
35f2c541ea8d1768d5f4612ea8d29cb2ba8345b7
[ "BSD-3-Clause" ]
2
2021-03-01T07:47:31.000Z
2021-07-07T20:50:27.000Z
from pioneer.das.api.interpolators import nearest_interpolator from pioneer.das.api.samples import Sample, XYZVCFAR from pioneer.das.api.sensors.sensor import Sensor class RadarTI(Sensor): def __init__(self, name, platform): super(RadarTI, self).__init__(name, platfor...
44.55
103
0.603816
from pioneer.das.api.interpolators import nearest_interpolator from pioneer.das.api.samples import Sample, XYZVCFAR from pioneer.das.api.sensors.sensor import Sensor class RadarTI(Sensor): def __init__(self, name, platform): super(RadarTI, self).__init__(name, platfor...
true
true
1c22192aae462ff6d83ed50880902c75a7fa608e
1,034
py
Python
src/doit/remote/fetch.py
khusmann/doit
305c04bda1ccfc38c86b97e4360481af654827e7
[ "MIT" ]
null
null
null
src/doit/remote/fetch.py
khusmann/doit
305c04bda1ccfc38c86b97e4360481af654827e7
[ "MIT" ]
null
null
null
src/doit/remote/fetch.py
khusmann/doit
305c04bda1ccfc38c86b97e4360481af654827e7
[ "MIT" ]
null
null
null
import typing as t from pathlib import Path from urllib.parse import urlparse, ParseResult from .model import Blob ### (Impure) Fetching functions def get_listing(remote_service: str): match remote_service: case "qualtrics": from .qualtrics.impl import fetch_qualtrics_listing retu...
36.928571
101
0.689555
import typing as t from pathlib import Path from urllib.parse import urlparse, ParseResult from .model import Blob rvice: case "qualtrics": from .qualtrics.impl import fetch_qualtrics_listing return fetch_qualtrics_listing() case _: raise Exception("Unrecognized ser...
true
true
1c2219aae855b7bdfa0285259b0b5c615adc75e8
997
py
Python
sentimentja/__init__.py
Naguchi/ml
77d77b50fb5a5d936ec1dd28cef5da0ff240735e
[ "MIT" ]
null
null
null
sentimentja/__init__.py
Naguchi/ml
77d77b50fb5a5d936ec1dd28cef5da0ff240735e
[ "MIT" ]
5
2020-01-28T23:02:23.000Z
2022-02-10T00:21:32.000Z
sentimentja/__init__.py
Naguchi/ml
77d77b50fb5a5d936ec1dd28cef5da0ff240735e
[ "MIT" ]
null
null
null
import os import warnings warnings.simplefilter(action='ignore', category=FutureWarning) os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' from sentimentja import sentiment class Analyzer: def __init__(self): import sentimentja import pickle from keras.preprocessing.sequence import pad_sequences ...
29.323529
88
0.61986
import os import warnings warnings.simplefilter(action='ignore', category=FutureWarning) os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' from sentimentja import sentiment class Analyzer: def __init__(self): import sentimentja import pickle from keras.preprocessing.sequence import pad_sequences ...
true
true
1c221ac32dc430ad3db26a6eff3dbaae216be0b0
3,816
py
Python
etc/server/fabfile.py
rehive/django-starter
4eaec738cea740addb73623c7173f546b55e1c84
[ "MIT" ]
2
2018-06-27T15:46:43.000Z
2021-08-16T19:04:58.000Z
etc/server/fabfile.py
rehive/django-starter
4eaec738cea740addb73623c7173f546b55e1c84
[ "MIT" ]
1
2017-07-20T13:12:43.000Z
2017-07-20T13:12:43.000Z
etc/server/fabfile.py
rehive/django-starter
4eaec738cea740addb73623c7173f546b55e1c84
[ "MIT" ]
5
2017-06-10T16:22:49.000Z
2021-07-29T22:18:21.000Z
from fabric.api import env, local, run, cd import dotenv import os # Load local .env file from fabric.contrib.project import rsync_project, upload_project from fabric.operations import sudo env.local_dotenv_path = os.path.join( os.path.dirname(__file__), './.server.env') env.local_dir = os.path.dirname(__file__) ...
35.663551
114
0.623428
from fabric.api import env, local, run, cd import dotenv import os from fabric.contrib.project import rsync_project, upload_project from fabric.operations import sudo env.local_dotenv_path = os.path.join( os.path.dirname(__file__), './.server.env') env.local_dir = os.path.dirname(__file__) dotenv.load_dotenv(env...
true
true
1c221b23c0fe712815aa4b8a5f921c8ef629e954
1,133
py
Python
scrapy/utils/testsite.py
hobson/scrapy
9f2465fb81628f2bb70d8d03fd23aa41e9801eae
[ "BSD-3-Clause" ]
1
2015-09-03T18:30:10.000Z
2015-09-03T18:30:10.000Z
scrapy/utils/testsite.py
hobson/scrapy
9f2465fb81628f2bb70d8d03fd23aa41e9801eae
[ "BSD-3-Clause" ]
1
2021-07-30T18:00:54.000Z
2021-07-30T18:00:54.000Z
scrapy/utils/testsite.py
hobson/scrapy
9f2465fb81628f2bb70d8d03fd23aa41e9801eae
[ "BSD-3-Clause" ]
1
2019-09-07T06:29:04.000Z
2019-09-07T06:29:04.000Z
from __future__ import print_function import urlparse from twisted.internet import reactor from twisted.web import server, resource, static, util class SiteTest(object): def setUp(self): self.site = reactor.listenTCP(0, test_site(), interface="127.0.0.1") self.baseurl = "http://localhost:%d/" % s...
34.333333
113
0.663725
from __future__ import print_function import urlparse from twisted.internet import reactor from twisted.web import server, resource, static, util class SiteTest(object): def setUp(self): self.site = reactor.listenTCP(0, test_site(), interface="127.0.0.1") self.baseurl = "http://localhost:%d/" % s...
true
true
1c221c1e4f49ef64a16fcb79af2a2b391f99d48b
24,516
py
Python
lib/python3.8/site-packages/ansible_collections/community/postgresql/plugins/modules/postgresql_publication.py
cjsteel/python3-venv-ansible-2.10.5
c95395c4cae844dc66fddde9b4343966f4b2ecd5
[ "Apache-1.1" ]
null
null
null
lib/python3.8/site-packages/ansible_collections/community/postgresql/plugins/modules/postgresql_publication.py
cjsteel/python3-venv-ansible-2.10.5
c95395c4cae844dc66fddde9b4343966f4b2ecd5
[ "Apache-1.1" ]
null
null
null
lib/python3.8/site-packages/ansible_collections/community/postgresql/plugins/modules/postgresql_publication.py
cjsteel/python3-venv-ansible-2.10.5
c95395c4cae844dc66fddde9b4343966f4b2ecd5
[ "Apache-1.1" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2019, Loic Blot (@nerzhul) <loic.blot@unix-experience.fr> # Copyright: (c) 2019, Andrew Klychkov (@Andersson007) <aaklychkov@mail.ru> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_...
35.894583
118
0.618535
from __future__ import absolute_import, division, print_function __metaclass__ = type DOCUMENTATION = r''' --- module: postgresql_publication short_description: Add, update, or remove PostgreSQL publication description: - Add, update, or remove PostgreSQL publication. options: name: description: - Na...
true
true
1c221c8e3c354ec24be1bf07c13c1e8b58f62c72
113
py
Python
tests/test_objmpp_classification.py
JEmonet67/objmpp-organoid-classification
47d0be56acfd55658a649afd30fd8c41fa966641
[ "MIT" ]
1
2020-07-16T11:43:58.000Z
2020-07-16T11:43:58.000Z
tests/test_objmpp_classification.py
JEmonet67/objmpp-classification
47d0be56acfd55658a649afd30fd8c41fa966641
[ "MIT" ]
null
null
null
tests/test_objmpp_classification.py
JEmonet67/objmpp-classification
47d0be56acfd55658a649afd30fd8c41fa966641
[ "MIT" ]
null
null
null
import pytest class TestOrganoidClassification(object): def test_return_value(self): assert = True
16.142857
41
0.734513
import pytest class TestOrganoidClassification(object): def test_return_value(self): assert = True
false
true
1c221c936cf3edd7263720d7283977390fbfc6b7
977
py
Python
Beginner/2502.py
LorranSutter/URI-Online-Judge
aef885b9a7caa83484cf172e29eea8ec92fc3627
[ "MIT" ]
null
null
null
Beginner/2502.py
LorranSutter/URI-Online-Judge
aef885b9a7caa83484cf172e29eea8ec92fc3627
[ "MIT" ]
null
null
null
Beginner/2502.py
LorranSutter/URI-Online-Judge
aef885b9a7caa83484cf172e29eea8ec92fc3627
[ "MIT" ]
null
null
null
while True: try: C, N = tuple(map(int,input().split())) C1, C2 = input(), input() crypt = dict() for k in range(C): if C1[k] not in crypt.keys(): if C1[k].isalpha() and C2[k].isalpha(): crypt[C1[k].lower()] = C2[k].lower() crypt[C2[k].lower()] = C1[k].lower() elif C1[k].isalpha(): c...
20.787234
43
0.522006
while True: try: C, N = tuple(map(int,input().split())) C1, C2 = input(), input() crypt = dict() for k in range(C): if C1[k] not in crypt.keys(): if C1[k].isalpha() and C2[k].isalpha(): crypt[C1[k].lower()] = C2[k].lower() crypt[C2[k].lower()] = C1[k].lower() elif C1[k].isalpha(): c...
true
true
1c221ced7ae7e1e5874a80a892b8f984ed20b6cd
6,274
py
Python
TM-GCN-master/experiment_uci_wd-gcn_link_prediction.py
OsmanMalik/TM-GCN
31b19a538f264f6c30b5503ecefb497ee865b4d7
[ "Apache-2.0" ]
14
2020-11-04T17:10:19.000Z
2022-03-04T07:48:22.000Z
TM-GCN-master/experiment_uci_wd-gcn_link_prediction.py
OsmanMalik/TM-GCN
31b19a538f264f6c30b5503ecefb497ee865b4d7
[ "Apache-2.0" ]
2
2021-09-06T09:38:12.000Z
2021-09-06T09:50:52.000Z
TensorGCN-master/experiment_uci_wd-gcn_link_prediction.py
NaimahmedNesaragi/TM-GCN
275d057a7261d8e6b544dad66b7daa7943d11c4f
[ "Apache-2.0" ]
6
2021-01-11T23:42:39.000Z
2022-01-31T08:37:13.000Z
# This version of uci experiment imports data preprocessed in Matlab, and uses a variant of the WD-GCN by Manessi et al. (2019) # The point of this script is to do link prediction # Imports and aliases import pickle import torch as t import torch.nn as nn import torch.nn.functional as F import torchvision import torch...
45.136691
191
0.708479
import pickle import torch as t import torch.nn as nn import torch.nn.functional as F import torchvision import torchvision.datasets as datasets import numpy as np import matplotlib.pyplot as plt import cProfile import pandas as pd import datetime from scipy.sparse import csr_matrix import os.path import wd_gcn_fun...
true
true
1c221d1e0310225a9ff21ec61aeae60f863c86ef
1,869
py
Python
bci_learning_studio/qt/device_manager/device_status.py
hellomoto-ai/bci-learning-studio
f37256bd0e2d85590ff258f14d70f09afcd9609f
[ "MIT" ]
null
null
null
bci_learning_studio/qt/device_manager/device_status.py
hellomoto-ai/bci-learning-studio
f37256bd0e2d85590ff258f14d70f09afcd9609f
[ "MIT" ]
13
2018-11-28T05:00:00.000Z
2019-01-07T04:06:37.000Z
bci_learning_studio/qt/device_manager/device_status.py
hellomoto-ai/bci-learning-studio
f37256bd0e2d85590ff258f14d70f09afcd9609f
[ "MIT" ]
null
null
null
"""Device status shows board information and read time sampling rate""" from PyQt5 import QtWidgets from .device_status_ui import Ui_DeviceStatus _RAILED_THREASHOLD = int(pow(2, 23) - 1000) _NEAR_RAILED_THREASHOLD = int(pow(2, 23) * 0.9) class DeviceStatus(QtWidgets.QWidget): """Show board status""" def __...
34.611111
78
0.665597
from PyQt5 import QtWidgets from .device_status_ui import Ui_DeviceStatus _RAILED_THREASHOLD = int(pow(2, 23) - 1000) _NEAR_RAILED_THREASHOLD = int(pow(2, 23) * 0.9) class DeviceStatus(QtWidgets.QWidget): def __init__(self, parent=None): super().__init__(parent) self.ui = Ui_DeviceStatus() ...
true
true
1c221da50dd8df5d2339ed5218ba2ef41bc96400
244
py
Python
exec.24.py
Domingosws/Aprendendo.PYTHON.3
f525e4324ab3fe33107b9c8cbea2deb61736d151
[ "MIT" ]
1
2022-02-01T04:22:56.000Z
2022-02-01T04:22:56.000Z
exec.24.py
Domingosws/Aprendendo.PYTHON.3
f525e4324ab3fe33107b9c8cbea2deb61736d151
[ "MIT" ]
null
null
null
exec.24.py
Domingosws/Aprendendo.PYTHON.3
f525e4324ab3fe33107b9c8cbea2deb61736d151
[ "MIT" ]
null
null
null
#Procurando uma String dentro de outra. #Crie um programa que leia o nome de uma pessoa e diga se ela tem "SILVA" no nome. nome = str(input('\033[1;34mQual é seu nome completo?')).strip() print('Seu nome tem Silva? {}'.format('Silva' in nome))
48.8
82
0.713115
nome = str(input('\033[1;34mQual é seu nome completo?')).strip() print('Seu nome tem Silva? {}'.format('Silva' in nome))
true
true
1c221e6b176f70909865cb447e6b645c67fadaf0
173
py
Python
hy-data-analysis-with-python-spring-2020/part04-e14_special_missing_values/src/special_missing_values.py
Melimet/DAP2020
0854fe4ce8ace6abf6dc0bbcf71984595ff6d42a
[ "MIT" ]
null
null
null
hy-data-analysis-with-python-spring-2020/part04-e14_special_missing_values/src/special_missing_values.py
Melimet/DAP2020
0854fe4ce8ace6abf6dc0bbcf71984595ff6d42a
[ "MIT" ]
null
null
null
hy-data-analysis-with-python-spring-2020/part04-e14_special_missing_values/src/special_missing_values.py
Melimet/DAP2020
0854fe4ce8ace6abf6dc0bbcf71984595ff6d42a
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import pandas as pd import numpy as np def special_missing_values(): return None def main(): return if __name__ == "__main__": main()
12.357143
29
0.676301
import pandas as pd import numpy as np def special_missing_values(): return None def main(): return if __name__ == "__main__": main()
true
true
1c221e89f5b831faa1daceca8e003c47db7437bc
2,852
py
Python
lib/googlecloudsdk/command_lib/media/asset/transformers/hooks.py
google-cloud-sdk-unofficial/google-cloud-sdk
2a48a04df14be46c8745050f98768e30474a1aac
[ "Apache-2.0" ]
2
2019-11-10T09:17:07.000Z
2019-12-18T13:44:08.000Z
lib/googlecloudsdk/command_lib/media/asset/transformers/hooks.py
google-cloud-sdk-unofficial/google-cloud-sdk
2a48a04df14be46c8745050f98768e30474a1aac
[ "Apache-2.0" ]
null
null
null
lib/googlecloudsdk/command_lib/media/asset/transformers/hooks.py
google-cloud-sdk-unofficial/google-cloud-sdk
2a48a04df14be46c8745050f98768e30474a1aac
[ "Apache-2.0" ]
1
2020-07-25T01:40:19.000Z
2020-07-25T01:40:19.000Z
# -*- coding: utf-8 -*- # # Copyright 2021 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
35.65
105
0.774194
from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import json from apitools.base.py import encoding from googlecloudsdk.api_lib.util import apis from googlecloudsdk.command_lib.media.asset import utils from googlecloudsdk.core import resources...
true
true
1c221e8d4a674b53ee143d37fcd7774f58aebcae
3,733
py
Python
train_encoder.py
yohan-pg/stylegan2-ada-pytorch
e1225b08d55ff5ca38e1646fa430d3c3c3bb3c68
[ "BSD-Source-Code" ]
null
null
null
train_encoder.py
yohan-pg/stylegan2-ada-pytorch
e1225b08d55ff5ca38e1646fa430d3c3c3bb3c68
[ "BSD-Source-Code" ]
null
null
null
train_encoder.py
yohan-pg/stylegan2-ada-pytorch
e1225b08d55ff5ca38e1646fa430d3c3c3bb3c68
[ "BSD-Source-Code" ]
null
null
null
from inversion import * from encoding import * from datetime import datetime ## todo must haves # todo try IID machines # todo try a chunking version of splitter # todo chunking splitter is too slow -> vectorize ## todo to test eventually # todo data augmentation? we are overfitting. try ffhq first tho -> at least x ...
31.905983
127
0.602197
from inversion import * from encoding import * from datetime import datetime ck" METHOD, PKL_PATH = "adaconv", f"pretrained/no_torgb_adaconv_tmp.pkl" GAIN = 1.0 VARIABLE_TYPE = WVariable LEARNING_RATE = 1e-3 BATCH_SIZE = 4 SUBSET_SIZE = None DIST_WEIGHT = 1.0 DISCR_WEIGHT = 0.1 MEAN_REG = 0.0 OUTDIR = f"encoder-t...
true
true
1c221f10bc8d55f23529a70fedb53b94d3d9dd2c
18,337
py
Python
tests/gis_tests/test_geoforms.py
pawl/django
c591bc3ccece1514d6b419826c7fa36ada9d9213
[ "PSF-2.0", "BSD-3-Clause" ]
12
2018-06-30T15:20:10.000Z
2020-10-20T02:15:00.000Z
tests/gis_tests/test_geoforms.py
Blaahborgh/django
c591bc3ccece1514d6b419826c7fa36ada9d9213
[ "PSF-2.0", "BSD-3-Clause" ]
1
2019-09-27T16:40:34.000Z
2019-09-27T16:40:34.000Z
tests/gis_tests/test_geoforms.py
Blaahborgh/django
c591bc3ccece1514d6b419826c7fa36ada9d9213
[ "PSF-2.0", "BSD-3-Clause" ]
5
2018-07-17T05:41:04.000Z
2020-07-31T12:30:46.000Z
import re from django.contrib.gis import forms from django.contrib.gis.forms import BaseGeometryWidget, OpenLayersWidget from django.contrib.gis.geos import GEOSGeometry from django.forms import ValidationError from django.test import SimpleTestCase, override_settings from django.test.utils import patch_logger from dj...
43.763723
113
0.563178
import re from django.contrib.gis import forms from django.contrib.gis.forms import BaseGeometryWidget, OpenLayersWidget from django.contrib.gis.geos import GEOSGeometry from django.forms import ValidationError from django.test import SimpleTestCase, override_settings from django.test.utils import patch_logger from dj...
true
true
1c2220a8b1407258a71854845ea88eec8c7759c7
491
py
Python
hw3/wordcount/othermapper.py
venamax/ucb-261
7df292668a971f49f8a099d38f899e9961432e7c
[ "MIT-0", "Apache-2.0", "BSD-2-Clause", "BSD-3-Clause" ]
1
2022-01-05T14:27:20.000Z
2022-01-05T14:27:20.000Z
hw3/wordcount/othermapper.py
venamax/ucb-261
7df292668a971f49f8a099d38f899e9961432e7c
[ "MIT-0", "Apache-2.0", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
hw3/wordcount/othermapper.py
venamax/ucb-261
7df292668a971f49f8a099d38f899e9961432e7c
[ "MIT-0", "Apache-2.0", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
#!/usr/bin/python from csv import reader import sys for row in reader(iter(sys.stdin.readline, '')): product = row[1].lower() issue = row[3].lower() if product == 'mortgage' or product == 'debt collection': continue else: bagofwords = issue.split(' ') for word in bagofwor...
28.882353
90
0.578411
from csv import reader import sys for row in reader(iter(sys.stdin.readline, '')): product = row[1].lower() issue = row[3].lower() if product == 'mortgage' or product == 'debt collection': continue else: bagofwords = issue.split(' ') for word in bagofwords: s...
true
true
1c22210753b1b377402eba7c7a34e83e75ca65ad
15,442
py
Python
electrum_but/gui/qt/console.py
Butkoin/electrum-but
254fd26fc09a5fd925669da0f8608a4afacd86da
[ "MIT" ]
null
null
null
electrum_but/gui/qt/console.py
Butkoin/electrum-but
254fd26fc09a5fd925669da0f8608a4afacd86da
[ "MIT" ]
null
null
null
electrum_but/gui/qt/console.py
Butkoin/electrum-but
254fd26fc09a5fd925669da0f8608a4afacd86da
[ "MIT" ]
null
null
null
# source: http://stackoverflow.com/questions/2758159/how-to-embed-a-python-interpreter-in-a-pyqt-widget import sys import os import re import time import traceback from PyQt5 import QtCore from PyQt5 import QtGui from PyQt5 import QtWidgets from electrum_but import util from electrum_but.i18n import _ from electrum...
33.642702
106
0.588007
import sys import os import re import time import traceback from PyQt5 import QtCore from PyQt5 import QtGui from PyQt5 import QtWidgets from electrum_but import util from electrum_but.i18n import _ from electrum_but.plugin import run_hook from .util import (MONOSPACE_FONT, WindowModalDialog, OkButton, CancelButt...
true
true
1c2221d3309d22c65dfccde0109b04f170ea8823
2,114
py
Python
unif/unif_model.py
franpena-kth/learning-deep-learning
9cd287b602dee1358672c4189445721a9c24f107
[ "MIT" ]
null
null
null
unif/unif_model.py
franpena-kth/learning-deep-learning
9cd287b602dee1358672c4189445721a9c24f107
[ "MIT" ]
null
null
null
unif/unif_model.py
franpena-kth/learning-deep-learning
9cd287b602dee1358672c4189445721a9c24f107
[ "MIT" ]
null
null
null
import math import torch from torch import nn import utils class UNIFAttention(nn.Module): def __init__(self, code_vocab_size, desc_vocab_size, embedding_size): super(UNIFAttention, self).__init__() self.code_embedding_layer = nn.Embedding(num_embeddings=code_vocab_size, embedding_dim=embedding...
50.333333
150
0.7228
import math import torch from torch import nn import utils class UNIFAttention(nn.Module): def __init__(self, code_vocab_size, desc_vocab_size, embedding_size): super(UNIFAttention, self).__init__() self.code_embedding_layer = nn.Embedding(num_embeddings=code_vocab_size, embedding_dim=embedding...
true
true
1c2222668c7014ceef1daffd415749baa565981b
2,743
py
Python
lib/template.py
gabrieli88/ga-dev-tools
cc2fae0a00d0527a77341d480fe12a23b4fc7347
[ "Apache-2.0" ]
1
2021-01-05T23:36:23.000Z
2021-01-05T23:36:23.000Z
lib/template.py
Electrohaze/ga-dev-tools
cc2fae0a00d0527a77341d480fe12a23b4fc7347
[ "Apache-2.0" ]
null
null
null
lib/template.py
Electrohaze/ga-dev-tools
cc2fae0a00d0527a77341d480fe12a23b4fc7347
[ "Apache-2.0" ]
1
2018-04-11T08:57:32.000Z
2018-04-11T08:57:32.000Z
# coding=utf-8 # Copyright 2016 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
26.892157
80
0.672257
import logging import jinja2 import os.path import yaml import lib.service_account as service_account JINJA_ENVIRONMENT = jinja2.Environment( loader=jinja2.FileSystemLoader('templates'), extensions=['jinja2.ext.autoescape'], autoescape=True) with open('meta.yaml') as file: data = yaml.load(...
true
true
1c2222880a9da044ae5d6f767de92d49ffc06173
2,343
py
Python
CipherTools/proto_2_6_0_vs2013_LIB/google/protobuf/descriptor_pb2_test.py
kuustudio/CipherTools
d99e707eab0515424ebe3555bb15dfbdc1782575
[ "MIT" ]
1
2020-01-16T01:15:42.000Z
2020-01-16T01:15:42.000Z
CipherTools/proto_2_6_0_vs2013_LIB/google/protobuf/descriptor_pb2_test.py
746396173/CipherTools
d99e707eab0515424ebe3555bb15dfbdc1782575
[ "MIT" ]
null
null
null
CipherTools/proto_2_6_0_vs2013_LIB/google/protobuf/descriptor_pb2_test.py
746396173/CipherTools
d99e707eab0515424ebe3555bb15dfbdc1782575
[ "MIT" ]
1
2021-07-03T02:49:46.000Z
2021-07-03T02:49:46.000Z
#! /usr/bin/python # # Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # http://code.google.com/p/protobuf/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # ...
42.6
80
0.766965
# Copyright 2008 Google Inc. All rights reserved. # http://code.google.com/p/protobuf/ # # 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 # not...
true
true
1c2222f0a2c6953ee730c5b53d47f5ddc7182f8a
5,714
py
Python
ibm_boto3/docs/utils.py
nglange/ibm-cos-sdk-python
5369799fcb94f4a69330ba3f4b7cfcc46a927185
[ "Apache-2.0" ]
33
2017-11-07T20:34:54.000Z
2022-02-20T22:10:49.000Z
ibm_boto3/docs/utils.py
nglange/ibm-cos-sdk-python
5369799fcb94f4a69330ba3f4b7cfcc46a927185
[ "Apache-2.0" ]
46
2017-10-16T11:28:16.000Z
2022-03-30T17:25:36.000Z
ibm_boto3/docs/utils.py
nglange/ibm-cos-sdk-python
5369799fcb94f4a69330ba3f4b7cfcc46a927185
[ "Apache-2.0" ]
26
2018-01-15T19:58:18.000Z
2021-12-14T15:21:14.000Z
# Copyright 2015 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompa...
39.958042
79
0.647707
import inspect import jmespath from ibm_botocore.compat import six def get_resource_ignore_params(params): ignore_params = [] for param in params: result = jmespath.compile(param.target) current = result.parsed while current['children']: curr...
true
true
1c2222f5dd04fd190c16fa8ab506bda00f236496
33,537
py
Python
src/sage/rings/function_field/place.py
ChamanAgrawal/sage
5f6d56ba247b352d7d46442e88fa3a027e9f222d
[ "BSL-1.0" ]
2
2019-06-02T03:16:59.000Z
2019-06-15T10:17:18.000Z
src/sage/rings/function_field/place.py
ChamanAgrawal/sage
5f6d56ba247b352d7d46442e88fa3a027e9f222d
[ "BSL-1.0" ]
null
null
null
src/sage/rings/function_field/place.py
ChamanAgrawal/sage
5f6d56ba247b352d7d46442e88fa3a027e9f222d
[ "BSL-1.0" ]
1
2019-06-02T03:16:55.000Z
2019-06-02T03:16:55.000Z
""" Places of function fields Places are defined for arbitrary function fields, but presently Sage can find and compute with places only of rational function fields and global function fields. The places of a function field correspond, one-to-one, to valuation rings of the function field, each of which defines discre...
31.226257
95
0.487313
from __future__ import absolute_import from sage.misc.cachefunc import cached_method from sage.arith.all import lcm from sage.structure.unique_representation import UniqueRepresentation from sage.structure.parent import Parent from sage.structure.element import Element from sage.structure.richcmp import rich...
true
true
1c2222f7beecd8ed09574405810b07f4187ca212
1,656
py
Python
design_pattern/memento/run.py
AustinHellerRepo/DesignPatternDemo
2409315eb7494ff738e64e1ca51206fb46083040
[ "MIT" ]
null
null
null
design_pattern/memento/run.py
AustinHellerRepo/DesignPatternDemo
2409315eb7494ff738e64e1ca51206fb46083040
[ "MIT" ]
null
null
null
design_pattern/memento/run.py
AustinHellerRepo/DesignPatternDemo
2409315eb7494ff738e64e1ca51206fb46083040
[ "MIT" ]
null
null
null
from design_pattern.memento.implementation import Implementor import os class ConsoleDisplay(Implementor): """ This class implements the interface for the """ def __init__(self): super().__init__() pass def show(self): # gather all of the lines to be printed out _lines = [] # type: List[str] _line...
21.789474
65
0.661232
from design_pattern.memento.implementation import Implementor import os class ConsoleDisplay(Implementor): def __init__(self): super().__init__() pass def show(self): _lines = [] _lines.append(f"Title: {self.get_title()}") if len(self.get_items()) == 0: _lines.append("(no items)") else: f...
true
true
1c2222ff764ceb6cc192a5ebed1d485be4d8ac41
2,664
py
Python
setup.py
CLRN/recastlib
41c336b0960069a75fa902e03ea3d5b6137addf9
[ "Zlib" ]
null
null
null
setup.py
CLRN/recastlib
41c336b0960069a75fa902e03ea3d5b6137addf9
[ "Zlib" ]
null
null
null
setup.py
CLRN/recastlib
41c336b0960069a75fa902e03ea3d5b6137addf9
[ "Zlib" ]
2
2020-04-19T13:19:10.000Z
2020-04-21T00:19:44.000Z
import os import sys from distutils.core import setup, Extension import importlib env = importlib.import_module(f"{os.name}_env") libext_name = '_recast' def findall(dir=os.curdir): """Find all files under 'dir' and return the list of full filenames (relative to 'dir'). """ all_files = [] for ba...
25.615385
96
0.571697
import os import sys from distutils.core import setup, Extension import importlib env = importlib.import_module(f"{os.name}_env") libext_name = '_recast' def findall(dir=os.curdir): all_files = [] for base, dirs, files in os.walk(dir): if base==os.curdir or base.startswith(os.curdir+os.sep): ...
true
true
1c22231434692c6365699492b135a4167a2e8360
15,086
py
Python
tfx/types/component_spec_test.py
avelez93/tfx
75fbb6a7d50e99138609be3ca4c3a204a13a2195
[ "Apache-2.0" ]
1
2022-03-29T23:06:54.000Z
2022-03-29T23:06:54.000Z
tfx/types/component_spec_test.py
avelez93/tfx
75fbb6a7d50e99138609be3ca4c3a204a13a2195
[ "Apache-2.0" ]
null
null
null
tfx/types/component_spec_test.py
avelez93/tfx
75fbb6a7d50e99138609be3ca4c3a204a13a2195
[ "Apache-2.0" ]
1
2020-12-13T22:07:53.000Z
2020-12-13T22:07:53.000Z
# Copyright 2019 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
36.351807
80
0.682023
import json from typing import Dict, List import tensorflow as tf from tfx.dsl.placeholder import placeholder from tfx.proto import example_gen_pb2 from tfx.types import artifact from tfx.types import channel from tfx.types import component_spec from tfx.types.component_spec import ChannelParameter from ...
true
true
1c2226076e16b549f8043b6ac9ea27f934953353
7,772
py
Python
Albert/models/multi_class_cnn.py
RacleRay/Fine-grained_TextClassification
ffd43b576ee766dfdfefa17946592a8506eae0de
[ "MIT" ]
3
2021-07-06T05:38:47.000Z
2022-03-21T02:36:59.000Z
Albert/models/multi_class_cnn.py
RacleRay/Fine-grained_TextClassification
ffd43b576ee766dfdfefa17946592a8506eae0de
[ "MIT" ]
null
null
null
Albert/models/multi_class_cnn.py
RacleRay/Fine-grained_TextClassification
ffd43b576ee766dfdfefa17946592a8506eae0de
[ "MIT" ]
1
2022-01-06T12:25:31.000Z
2022-01-06T12:25:31.000Z
#!/usr/bin/env python # -*- encoding: utf-8 -*- ''' @File : multi_class_cnn.py @Author : Racle @Version : 1.0 @Desc : None ''' import torch from torch import nn from torch.nn import BCEWithLogitsLoss, CrossEntropyLoss, MSELoss from transformers import ( PreTrainedModel, BertModel, BertPreTra...
39.653061
111
0.606536
import torch from torch import nn from torch.nn import BCEWithLogitsLoss, CrossEntropyLoss, MSELoss from transformers import ( PreTrainedModel, BertModel, BertPreTrainedModel, AlbertModel, AlbertPreTrainedModel, XLNetModel, XLNetPreTrainedModel, DistilBertConfig, DistilBertModel, ...
true
true
1c2227ab33d3f10c098a8e3fd8ac19a4714ff32a
394
py
Python
setup.py
ppps/ms-utils
8bd10cb15d41693c15bb63571c8a1f1b47cbd4aa
[ "MIT" ]
1
2021-02-02T21:56:35.000Z
2021-02-02T21:56:35.000Z
setup.py
ppps/ms-utils
8bd10cb15d41693c15bb63571c8a1f1b47cbd4aa
[ "MIT" ]
1
2019-09-09T19:10:05.000Z
2019-09-09T21:07:02.000Z
setup.py
ppps/ms-utils
8bd10cb15d41693c15bb63571c8a1f1b47cbd4aa
[ "MIT" ]
null
null
null
from setuptools import setup setup(name='msutils', version='0.0.1', description='Utilities for the Morning Star newspaper', url='https://github.com/robjwells/ms-utils', author='Rob Wells', author_email='production@peoples-press.com', license='MIT', packages=['msutils'], ...
28.142857
61
0.626904
from setuptools import setup setup(name='msutils', version='0.0.1', description='Utilities for the Morning Star newspaper', url='https://github.com/robjwells/ms-utils', author='Rob Wells', author_email='production@peoples-press.com', license='MIT', packages=['msutils'], ...
true
true
1c222852ecdc958c36688bb9ff6d1e6d2622ced1
518
py
Python
examples/scanner_eddystone_example.py
hbcho/beacontools1
82606d871c72bccb8962f50cb374595bcc2ab77d
[ "MIT" ]
null
null
null
examples/scanner_eddystone_example.py
hbcho/beacontools1
82606d871c72bccb8962f50cb374595bcc2ab77d
[ "MIT" ]
1
2018-12-08T01:43:02.000Z
2018-12-08T01:43:02.000Z
examples/scanner_eddystone_example.py
hbcho/beacontools1
82606d871c72bccb8962f50cb374595bcc2ab77d
[ "MIT" ]
null
null
null
import time from beacontools import BeaconScanner, EddystoneTLMFrame, EddystoneFilter, EddystoneUIDFrame def callback(bt_addr, rssi, packet, additional_info): print("<%s, %d> %s %s" % (bt_addr, rssi, packet, additional_info)) # scan for all TLM frames of beacons in the namespace "12345678901234678901" scanner = B...
34.533333
92
0.781853
import time from beacontools import BeaconScanner, EddystoneTLMFrame, EddystoneFilter, EddystoneUIDFrame def callback(bt_addr, rssi, packet, additional_info): print("<%s, %d> %s %s" % (bt_addr, rssi, packet, additional_info)) scanner = BeaconScanner(callback, device_filter=EddystoneFilter(namespace="1234567...
true
true
1c22288c7c5a5073fff3a349d34e2b977ccc8ccd
7,470
py
Python
ibis/inventory/tests/test_it_inventory.py
shivaathreya/ibis
f99e3b7a677652a8a1c00a069e645d97682e839c
[ "Apache-2.0" ]
50
2018-09-27T13:03:45.000Z
2021-04-06T15:36:59.000Z
ibis/inventory/tests/test_it_inventory.py
shivaathreya/ibis
f99e3b7a677652a8a1c00a069e645d97682e839c
[ "Apache-2.0" ]
null
null
null
ibis/inventory/tests/test_it_inventory.py
shivaathreya/ibis
f99e3b7a677652a8a1c00a069e645d97682e839c
[ "Apache-2.0" ]
14
2018-10-03T20:36:15.000Z
2021-05-18T07:08:57.000Z
"""It inventory tests.""" import unittest import os import sys from mock import patch, MagicMock from ibis.inventory.inventory import Inventory from ibis.inventory.it_inventory import ITInventory from ibis.utilities.config_manager import ConfigManager from ibis.model.table import ItTable from ibis.settings import UNIT_...
42.931034
99
0.681258
import unittest import os import sys from mock import patch, MagicMock from ibis.inventory.inventory import Inventory from ibis.inventory.it_inventory import ITInventory from ibis.utilities.config_manager import ConfigManager from ibis.model.table import ItTable from ibis.settings import UNIT_TEST_ENV BASE_DIR = os.p...
true
true
1c22289ece7edde320b744c829c752f43f1f1619
11,266
py
Python
test/database/test_load_file.py
andrjas/data_check
12ba740fcf54261bed15f909290649e8350474da
[ "MIT" ]
1
2020-12-26T23:59:42.000Z
2020-12-26T23:59:42.000Z
test/database/test_load_file.py
andrjas/data_check
12ba740fcf54261bed15f909290649e8350474da
[ "MIT" ]
null
null
null
test/database/test_load_file.py
andrjas/data_check
12ba740fcf54261bed15f909290649e8350474da
[ "MIT" ]
null
null
null
from pathlib import Path import pytest import pandas as pd from pandas.testing import assert_frame_equal from sqlalchemy import Table, Column, String, Integer, MetaData, Date, Numeric, DateTime import datetime from data_check import DataCheck # noqa E402 from data_check.config import DataCheckConfig # noqa E402 fro...
34.347561
88
0.636694
from pathlib import Path import pytest import pandas as pd from pandas.testing import assert_frame_equal from sqlalchemy import Table, Column, String, Integer, MetaData, Date, Numeric, DateTime import datetime from data_check import DataCheck from data_check.config import DataCheckConfig from data_check.sql impor...
true
true
1c2229a5fd0b893ff643121cfccce08e9816ef7d
3,608
gyp
Python
binding.gyp
anak10thn/node-qt5
ec01a9c95297c34802b9a2461fae24ac36a7d37f
[ "MIT" ]
28
2018-05-09T05:45:59.000Z
2021-09-20T20:49:00.000Z
binding.gyp
anak10thn/node-qt5
ec01a9c95297c34802b9a2461fae24ac36a7d37f
[ "MIT" ]
4
2018-07-02T18:18:00.000Z
2019-04-16T08:25:04.000Z
binding.gyp
anak10thn/node-qt5
ec01a9c95297c34802b9a2461fae24ac36a7d37f
[ "MIT" ]
7
2018-05-12T05:01:16.000Z
2021-01-31T04:21:45.000Z
{ 'targets': [{ 'target_name': 'qt5', 'sources': [ 'src/qt.cc', 'src/QtCore/qsize.cc', # 'src/QtCore/qpointf.cc', # 'src/QtGui/qapplication.cc', # 'src/QtGui/qwidget.cc' # 'src/QtGui/qpainter.cc' ...
42.447059
137
0.405765
{ 'targets': [{ 'target_name': 'qt5', 'sources': [ 'src/qt.cc', 'src/QtCore/qsize.cc', 'src/QtGui/qapplication.cc', 'src/QtWidgets/qpushbutton.cc', 'src/Q...
true
true
1c2229f0e31fce394692cf0aa3d0ee1175e42ca9
9,685
py
Python
tests/unit/gapic/v2/test_session_entity_types_client_v2.py
gertventer1970/dialogflow-python-client-v2
e78b0e6765f94fb9ecbbc72c9fc30ce7245703e2
[ "Apache-2.0" ]
1
2020-10-14T07:43:19.000Z
2020-10-14T07:43:19.000Z
tests/unit/gapic/v2/test_session_entity_types_client_v2.py
everydaycodings/dialogflow-python-client-v2
c1c925d94726f49e549870e087ad79ee491056e2
[ "Apache-2.0" ]
null
null
null
tests/unit/gapic/v2/test_session_entity_types_client_v2.py
everydaycodings/dialogflow-python-client-v2
c1c925d94726f49e549870e087ad79ee491056e2
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
35.346715
87
0.682499
import mock import pytest import dialogflow_v2 from dialogflow_v2.proto import session_entity_type_pb2 from google.protobuf import empty_pb2 class MultiCallableStub(object): def __init__(self, method, channel_stub): self.method = method self.channel_stub = channel_stub def ...
true
true
1c222abbc4c34d5e8bb0d4809a6edd98046668ce
74
py
Python
project-euler/completed/first-attempt/euler1.py
davidxmoody/kata
d88569584c2390da0e8127258d8751f8a47b7d83
[ "MIT" ]
null
null
null
project-euler/completed/first-attempt/euler1.py
davidxmoody/kata
d88569584c2390da0e8127258d8751f8a47b7d83
[ "MIT" ]
null
null
null
project-euler/completed/first-attempt/euler1.py
davidxmoody/kata
d88569584c2390da0e8127258d8751f8a47b7d83
[ "MIT" ]
null
null
null
sum = 0 for i in range(1,1000): if(i%3==0 or i%5==0): sum += i print sum
14.8
31
0.567568
sum = 0 for i in range(1,1000): if(i%3==0 or i%5==0): sum += i print sum
false
true
1c222c52eeb7eb9dc45a7349e445034f8f3db4f2
3,454
py
Python
test/test_utils.py
iMichka/conjure-up
8e4599e6f58b52163384150d8d71e7802462d126
[ "MIT" ]
1
2019-06-26T23:39:13.000Z
2019-06-26T23:39:13.000Z
test/test_utils.py
iMichka/conjure-up
8e4599e6f58b52163384150d8d71e7802462d126
[ "MIT" ]
null
null
null
test/test_utils.py
iMichka/conjure-up
8e4599e6f58b52163384150d8d71e7802462d126
[ "MIT" ]
1
2020-10-05T14:42:31.000Z
2020-10-05T14:42:31.000Z
#!/usr/bin/env python # # tests test/utils.py # # Copyright Canonical, Ltd. import asyncio import logging import unittest from unittest.mock import patch from conjureup import utils from .helpers import test_loop class UtilsTestCase(unittest.TestCase): def test_valid_hostnames(self): "Verify is_valid...
29.521368
74
0.519687
import asyncio import logging import unittest from unittest.mock import patch from conjureup import utils from .helpers import test_loop class UtilsTestCase(unittest.TestCase): def test_valid_hostnames(self): hostnames = [ 'battlemidget.lol', 'www.battlemidget.lol', ...
true
true
1c222eaba6e7d5eed1f436b01dadc52817a6dfc8
4,418
py
Python
tests/transformers/auto/modeling_test.py
JeremyZhao1998/PaddleNLP
5a34684a7f0c8a186043fed386be4b62cb85fb15
[ "Apache-2.0" ]
7,091
2021-02-05T13:56:25.000Z
2022-03-31T11:42:50.000Z
tests/transformers/auto/modeling_test.py
JeremyZhao1998/PaddleNLP
5a34684a7f0c8a186043fed386be4b62cb85fb15
[ "Apache-2.0" ]
844
2021-02-10T01:09:29.000Z
2022-03-31T12:12:58.000Z
tests/transformers/auto/modeling_test.py
JeremyZhao1998/PaddleNLP
5a34684a7f0c8a186043fed386be4b62cb85fb15
[ "Apache-2.0" ]
1,035
2021-02-05T14:26:48.000Z
2022-03-31T11:42:57.000Z
import paddle from paddlenlp.transformers.auto.modeling import * from paddlenlp.transformers import * import warnings def from_built_in_model(): print('From_built_in_models:-------------------------------') # model test model = AutoModel.from_pretrained('bert-base-uncased') print(type(model)) #mo...
37.440678
89
0.726347
import paddle from paddlenlp.transformers.auto.modeling import * from paddlenlp.transformers import * import warnings def from_built_in_model(): print('From_built_in_models:-------------------------------') model = AutoModel.from_pretrained('bert-base-uncased') print(type(model)) ...
true
true
1c22318cfdf9c37b48cca1b8b11b110c43c33a40
1,471
py
Python
checks/batch/responses.py
Abhijit-06/Internet.nl
482a62cf0b1cf0fec2b40d7f2a460873f90f2379
[ "Apache-2.0", "CC-BY-4.0" ]
9
2021-07-19T09:34:35.000Z
2022-01-06T15:38:06.000Z
checks/batch/responses.py
Abhijit-06/Internet.nl
482a62cf0b1cf0fec2b40d7f2a460873f90f2379
[ "Apache-2.0", "CC-BY-4.0" ]
86
2021-07-16T12:56:15.000Z
2022-03-28T13:09:48.000Z
checks/batch/responses.py
Abhijit-06/Internet.nl
482a62cf0b1cf0fec2b40d7f2a460873f90f2379
[ "Apache-2.0", "CC-BY-4.0" ]
4
2021-08-20T13:47:03.000Z
2021-12-01T21:31:43.000Z
from django.http import JsonResponse, HttpResponse from . import BATCH_API_FULL_VERSION, BATCH_API_MAJOR_VERSION def api_response(data, status_code=200): data.update({"api_version": BATCH_API_FULL_VERSION}) json = JsonResponse(data) json.status_code = status_code return json def unknown_request_res...
24.516667
79
0.558124
from django.http import JsonResponse, HttpResponse from . import BATCH_API_FULL_VERSION, BATCH_API_MAJOR_VERSION def api_response(data, status_code=200): data.update({"api_version": BATCH_API_FULL_VERSION}) json = JsonResponse(data) json.status_code = status_code return json def unknown_request_res...
true
true
1c2232cc27c82751a1725348162fac071fbadfce
2,211
py
Python
Dia1/numpy2.py
MarcelRG/semanai
08a1ceb9f24b361fc155bf18526325aaf6769798
[ "MIT" ]
null
null
null
Dia1/numpy2.py
MarcelRG/semanai
08a1ceb9f24b361fc155bf18526325aaf6769798
[ "MIT" ]
null
null
null
Dia1/numpy2.py
MarcelRG/semanai
08a1ceb9f24b361fc155bf18526325aaf6769798
[ "MIT" ]
null
null
null
import streamlit as st import pandas as pd import numpy as np import time import uber_display from scipy import stats "# Numpy and Pandas Tutorial" "### Semana i 2019" "Made in Streamlit" if st.checkbox('Show Uber Data'): st.subheader('Uber data data') uber_display.main() """# Numpy exercises """ "- **Show...
21.259615
161
0.615559
import streamlit as st import pandas as pd import numpy as np import time import uber_display from scipy import stats if st.checkbox('Show Uber Data'): st.subheader('Uber data data') uber_display.main() version = np.__version__ result = "Numpy version : {}".format(version) result result = np.array([0,1...
true
true
1c2233fad04b701ad343d245fbc1c726ce5cf861
12,441
py
Python
nexus/models/proto/operation_pb2.py
RobbiNespu/hyperboria
7db858386f1a20e8d49bc16f53bfd7f1e4d03f7e
[ "Unlicense" ]
54
2021-01-07T03:02:36.000Z
2022-03-28T17:19:29.000Z
nexus/models/proto/operation_pb2.py
the-superpirate/hyperboria
74776166158d07b199677f9738862e5f1fa54367
[ "Unlicense" ]
10
2021-01-08T17:38:59.000Z
2022-02-28T14:34:45.000Z
nexus/models/proto/operation_pb2.py
the-superpirate/hyperboria
74776166158d07b199677f9738862e5f1fa54367
[ "Unlicense" ]
16
2020-12-28T18:31:44.000Z
2022-02-22T15:00:53.000Z
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: nexus/models/proto/operation.proto """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflectio...
44.591398
1,015
0.770356
from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database _sym_db = _symbol_database.Default() from nexus.models.proto import \ typed_document_pb2...
true
true
1c223663581f1cf0a4c1ccd64ec9dd48e84fa7b0
1,372
py
Python
Ogrenciler/Ersan/hesapmakinesi.py
ProEgitim/Python-Dersleri-BEM
b25e9fdb1fa3026925a46b2fcbcba348726b775c
[ "MIT" ]
1
2021-04-18T17:35:22.000Z
2021-04-18T17:35:22.000Z
Ogrenciler/Ersan/hesapmakinesi.py
waroi/Python-Dersleri-BEM
b25e9fdb1fa3026925a46b2fcbcba348726b775c
[ "MIT" ]
null
null
null
Ogrenciler/Ersan/hesapmakinesi.py
waroi/Python-Dersleri-BEM
b25e9fdb1fa3026925a46b2fcbcba348726b775c
[ "MIT" ]
2
2021-04-18T18:22:26.000Z
2021-04-24T17:16:19.000Z
print("\n-------------------------") print("\nHesap Makinesi") print("\n-------------------------") print("\nLütfen yapmak istediğiniz işlemi seçiniz") print("\nToplama İşlemi için lütfen 1'e basınız") print("Çıkartma İşlemi için lütfen 2'ye basınız") print("Çarpma İşlemi için lütfen 3'e basınız") print("Bölme İşlemi...
31.906977
68
0.60277
print("\n-------------------------") print("\nHesap Makinesi") print("\n-------------------------") print("\nLütfen yapmak istediğiniz işlemi seçiniz") print("\nToplama İşlemi için lütfen 1'e basınız") print("Çıkartma İşlemi için lütfen 2'ye basınız") print("Çarpma İşlemi için lütfen 3'e basınız") print("Bölme İşlemi...
true
true
1c223673a11dec550e6a72a5368132d7b4c2980f
2,970
py
Python
backend/config/settings/base.py
flowfree/digits-recognition
d1a9d8b50a88a41b7b08e7ae63da5f527c54d2bf
[ "MIT" ]
1
2021-09-30T15:42:49.000Z
2021-09-30T15:42:49.000Z
backend/config/settings/base.py
flowfree/digits-recognition
d1a9d8b50a88a41b7b08e7ae63da5f527c54d2bf
[ "MIT" ]
null
null
null
backend/config/settings/base.py
flowfree/digits-recognition
d1a9d8b50a88a41b7b08e7ae63da5f527c54d2bf
[ "MIT" ]
1
2021-09-30T15:43:05.000Z
2021-09-30T15:43:05.000Z
from pathlib import Path import os # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = Path(__file__).resolve().parent.parent.parent # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/3.2/howto/deployment/checklist/ # Application definitio...
25.826087
91
0.688889
from pathlib import Path import os BASE_DIR = Path(__file__).resolve().parent.parent.parent INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'rest_fra...
true
true
1c2236ef96506928e316447088a8f672cacf4365
253
py
Python
helloworld_task.py
unnati-xyz/luigi-sample
a1a52ac25f5b2316737b91436d6c339851d100f6
[ "MIT" ]
39
2016-06-18T08:14:45.000Z
2022-01-13T05:02:59.000Z
helloworld_task.py
unnati-xyz/luigi-sample
a1a52ac25f5b2316737b91436d6c339851d100f6
[ "MIT" ]
null
null
null
helloworld_task.py
unnati-xyz/luigi-sample
a1a52ac25f5b2316737b91436d6c339851d100f6
[ "MIT" ]
10
2016-06-18T18:03:18.000Z
2020-04-27T13:33:30.000Z
import luigi class HelloWorldTask(luigi.Task): def output(self): return luigi.LocalTarget('out.txt') def run(self): print("Hello World") with self.output().open("w") as f: f.write("Hello from luigi task")
19.461538
44
0.596838
import luigi class HelloWorldTask(luigi.Task): def output(self): return luigi.LocalTarget('out.txt') def run(self): print("Hello World") with self.output().open("w") as f: f.write("Hello from luigi task")
true
true
1c223831ae1004a3b94ecc7bae717e2097295397
602
py
Python
end/autoPaint/autoPaint.py
fusecodecamp2018/automatingtheinternet
7aaf6a1755c5baefde5b7f036137c188f66fdfd6
[ "Apache-2.0" ]
null
null
null
end/autoPaint/autoPaint.py
fusecodecamp2018/automatingtheinternet
7aaf6a1755c5baefde5b7f036137c188f66fdfd6
[ "Apache-2.0" ]
null
null
null
end/autoPaint/autoPaint.py
fusecodecamp2018/automatingtheinternet
7aaf6a1755c5baefde5b7f036137c188f66fdfd6
[ "Apache-2.0" ]
null
null
null
import pyautogui import time # Wait for 5 seconds. During this time, open up the painting program you want to use. time.sleep(5) # click to put drawing program in focus pyautogui.click() # this value will be used to determine the starting size distance = 200 # let's draw! while distance > 0: pyautogui.dragRel(d...
28.666667
85
0.710963
import pyautogui import time time.sleep(5) pyautogui.click() distance = 200 while distance > 0: pyautogui.dragRel(distance, 0, duration=0.2) # move right distance = distance - 5 pyautogui.dragRel(0, distance, duration=0.2) # move down pyautogui.dragRel(-distance, 0, duration=0.2) # move left ...
true
true
1c2238b7008ee6f2236415ff30eeba56194404e3
3,745
py
Python
inbetween/NNKernel.py
cambridge-mlg/expressiveness-approx-bnns
1d63a8671581bf388f1a84d0daf48990ebecb1e1
[ "MIT" ]
11
2020-10-21T08:48:45.000Z
2020-12-16T00:38:05.000Z
inbetween/NNKernel.py
cambridge-mlg/expressiveness-approx-bnns
1d63a8671581bf388f1a84d0daf48990ebecb1e1
[ "MIT" ]
null
null
null
inbetween/NNKernel.py
cambridge-mlg/expressiveness-approx-bnns
1d63a8671581bf388f1a84d0daf48990ebecb1e1
[ "MIT" ]
1
2021-04-27T10:41:40.000Z
2021-04-27T10:41:40.000Z
import tensorflow as tf import numpy as np import gpflow from gpflow.base import Parameter from gpflow.utilities import positive class ReLUKernel(gpflow.kernels.Kernel): """ Kernel such that the mean 0 GP with the corresponding covariance function is equal in distribution to an infinitely wide BNN prior w...
43.546512
113
0.624566
import tensorflow as tf import numpy as np import gpflow from gpflow.base import Parameter from gpflow.utilities import positive class ReLUKernel(gpflow.kernels.Kernel): def __init__(self, prior_weight_std, prior_bias_std, depth): super(ReLUKernel, self).__init__() if isinstance(prior_weight_std...
true
true
1c2238ff2e87b3865f1739170003019e77b78421
2,665
py
Python
openstack_dashboard/test/integration_tests/basewebobject.py
Tehsmash/horizon
8ffade099a3a437509dcdcf25d5b054e5c188b61
[ "Apache-2.0" ]
60
2015-03-09T14:31:46.000Z
2021-12-12T19:22:31.000Z
openstack_dashboard/test/integration_tests/basewebobject.py
2733284198/avos
becf7dd313fb8569581f985118c8367921c731ab
[ "Apache-2.0" ]
7
2015-04-13T13:21:10.000Z
2016-02-24T18:38:28.000Z
openstack_dashboard/test/integration_tests/basewebobject.py
2733284198/avos
becf7dd313fb8569581f985118c8367921c731ab
[ "Apache-2.0" ]
13
2015-03-09T17:26:26.000Z
2020-02-22T19:19:14.000Z
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
36.013514
78
0.679174
import selenium.common.exceptions as Exceptions from selenium.webdriver.support import expected_conditions import selenium.webdriver.support.ui as Support from selenium.webdriver.support import wait class BaseWebObject(object): def __init__(self, driver, conf): self.driver = driver sel...
true
true
1c223903556e42b97753888a9973c71f4a205a5b
20,574
py
Python
pytorch_lightning/trainer/training_io.py
tullie/pytorch-lightning
b39f4798a6859d2237b48b29b39a2390164612c1
[ "Apache-2.0" ]
1
2021-04-09T08:32:21.000Z
2021-04-09T08:32:21.000Z
pytorch_lightning/trainer/training_io.py
tullie/pytorch-lightning
b39f4798a6859d2237b48b29b39a2390164612c1
[ "Apache-2.0" ]
null
null
null
pytorch_lightning/trainer/training_io.py
tullie/pytorch-lightning
b39f4798a6859d2237b48b29b39a2390164612c1
[ "Apache-2.0" ]
null
null
null
""" Lightning can automate saving and loading checkpoints ===================================================== Checkpointing is enabled by default to the current working directory. To change the checkpoint path pass in:: Trainer(default_root_dir='/your/path/to/save/checkpoints') To modify the behavior of check...
36.349823
117
0.64528
import os import re import signal from abc import ABC from distutils.version import LooseVersion from subprocess import call from pkg_resources import parse_version import torch import torch.distributed as torch_distrib import pytorch_lightning from pytorch_lightning import _logger as log from pytorch_lightning.core...
true
true
1c223abe70f962b85d7709767b926333b67f513f
15,798
py
Python
test/functional/wallet_multiwallet.py
bitcoinbam/btcbam
b6d6784c3865ab660c5e99a2d1402b0dada77e70
[ "MIT" ]
8
2020-10-05T14:13:16.000Z
2021-11-17T20:16:53.000Z
test/functional/wallet_multiwallet.py
bitcoinbam/btcbam
b6d6784c3865ab660c5e99a2d1402b0dada77e70
[ "MIT" ]
1
2021-08-11T21:34:17.000Z
2021-08-11T21:34:17.000Z
test/functional/wallet_multiwallet.py
bitcoinbam/btcbam
b6d6784c3865ab660c5e99a2d1402b0dada77e70
[ "MIT" ]
3
2020-10-24T22:10:59.000Z
2022-01-11T14:16:03.000Z
#!/usr/bin/env python3 # Copyright (c) 2017-2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test multiwallet. Verify that a bitcoinbamd node can load multiple wallet files """ import os import s...
50.96129
177
0.674832
import os import shutil import time from test_framework.test_framework import BitcoinBamTestFramework from test_framework.test_node import ErrorMatch from test_framework.util import ( assert_equal, assert_raises_rpc_error, ) class MultiWalletTest(BitcoinBamTestFramework): def set_test_params(self): ...
true
true
1c223ae54e9485dcbdb4f7437e922001c461cced
11,452
py
Python
gps/gps.py
leearmstrong/gpsd
d8c8a8a7aea0585aa48e221a568bb991ea7169cb
[ "BSD-3-Clause" ]
null
null
null
gps/gps.py
leearmstrong/gpsd
d8c8a8a7aea0585aa48e221a568bb991ea7169cb
[ "BSD-3-Clause" ]
null
null
null
gps/gps.py
leearmstrong/gpsd
d8c8a8a7aea0585aa48e221a568bb991ea7169cb
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # # This file is Copyright (c) 2010 by the GPSD project # BSD terms apply: see the file COPYING in the distribution root for details. # # gps.py -- Python interface to GPSD. # # This interface has a lot of historical cruft in it related to old # protocol, and was modeled on...
34.493976
145
0.538858
# away, but it's likely to be deprecated in favor of something more from __future__ import absolute_import, print_function, division from .client import * from .misc import isotime NaN = float('nan') def isnan(x): return str(x) == 'nan' ONLINE_SET = (1<<1) TIME_SET = (1<<2) TIMERR_SE...
true
true
1c223caf19486f5e7760bb4135565e0ad02aa9e4
509
py
Python
lib/python3.9/site-packages/pip/_internal/__init__.py
ichomchom/Twitter-Media-Downloader
8287e0c4d034a8ae83422a623ee1049a3b7150a8
[ "MIT" ]
1
2020-08-07T16:09:57.000Z
2020-08-07T16:09:57.000Z
lib/python3.9/site-packages/pip/_internal/__init__.py
ichomchom/Twitter-Media-Downloader
8287e0c4d034a8ae83422a623ee1049a3b7150a8
[ "MIT" ]
2
2021-05-12T06:25:57.000Z
2022-03-01T04:16:03.000Z
env/lib/python3.9/site-packages/pip/_internal/__init__.py
simotwo/AbileneParadox-ddd
c85961efb37aba43c0d99ed1c36d083507e2b2d3
[ "MIT" ]
null
null
null
import pip._internal.utils.inject_securetransport # noqa from pip._internal.utils.typing import MYPY_CHECK_RUNNING if MYPY_CHECK_RUNNING: from typing import Optional, List def main(args=None): # type: (Optional[List[str]]) -> int """This is preserved for old console scripts that may still be referencing...
28.277778
78
0.738703
import pip._internal.utils.inject_securetransport from pip._internal.utils.typing import MYPY_CHECK_RUNNING if MYPY_CHECK_RUNNING: from typing import Optional, List def main(args=None): from pip._internal.utils.entrypoints import _wrapper return _wrapper(args, _nowarn=True)
true
true
1c223f2deb12127126b49a7070fde4220adba730
2,555
py
Python
account/forms.py
sushildk/recommindation-product-movie
ec400fb7e4097d5d3c8d92bdc48bcabe91281cf8
[ "MIT" ]
3
2021-05-16T06:53:06.000Z
2022-03-08T00:54:16.000Z
account/forms.py
sushildk/recommindation-product-movie
ec400fb7e4097d5d3c8d92bdc48bcabe91281cf8
[ "MIT" ]
null
null
null
account/forms.py
sushildk/recommindation-product-movie
ec400fb7e4097d5d3c8d92bdc48bcabe91281cf8
[ "MIT" ]
2
2021-06-18T03:13:36.000Z
2021-09-22T10:27:57.000Z
from django import forms from django.contrib import auth from django.contrib.auth import authenticate from django.contrib.auth.models import User from django.core.exceptions import ValidationError class UserCreationForm(forms.ModelForm): first_name = forms.CharField(widget= forms.TextInput,label="Firstname:") ...
32.341772
85
0.652446
from django import forms from django.contrib import auth from django.contrib.auth import authenticate from django.contrib.auth.models import User from django.core.exceptions import ValidationError class UserCreationForm(forms.ModelForm): first_name = forms.CharField(widget= forms.TextInput,label="Firstname:") ...
true
true
1c224139fc488803c32b30e79a24cdef52475712
7,301
py
Python
pyzoo/zoo/util/utils.py
limn2o4/analytics-zoo
78d6ce10976a7e1320ff5ebdf431db93a439ec56
[ "Apache-2.0" ]
2,970
2017-06-08T00:24:43.000Z
2022-03-30T12:14:55.000Z
pyzoo/zoo/util/utils.py
limn2o4/analytics-zoo
78d6ce10976a7e1320ff5ebdf431db93a439ec56
[ "Apache-2.0" ]
3,530
2017-05-09T08:29:10.000Z
2022-03-21T02:11:45.000Z
pyzoo/zoo/util/utils.py
limn2o4/analytics-zoo
78d6ce10976a7e1320ff5ebdf431db93a439ec56
[ "Apache-2.0" ]
972
2017-05-09T07:03:50.000Z
2022-03-23T07:48:48.000Z
# # Copyright 2018 Analytics Zoo 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 or agreed to...
36.873737
96
0.665662
import glob from zoo.common import Sample import numpy as np from pyspark.ml.linalg import DenseVector, SparseVector, VectorUDT def to_sample_rdd(x, y, sc, num_slices=None): x_rdd = sc.parallelize(x, num_slices) y_rdd = sc.parallelize(y, num_slices) return x_rdd.zip(y_rdd).map(lambda item:...
true
true
1c2241bb052b23e3846c3f4c7c1852485fb3f502
4,458
py
Python
chainer/links/__init__.py
tkerola/chainer
572f6eef2c3f1470911ac08332c2b5c3440edf44
[ "MIT" ]
2
2019-08-12T21:48:04.000Z
2020-08-27T18:04:20.000Z
chainer/links/__init__.py
hitsgub/chainer
20d4d70f5cdacc1f24f243443f5bebc2055c8f8e
[ "MIT" ]
null
null
null
chainer/links/__init__.py
hitsgub/chainer
20d4d70f5cdacc1f24f243443f5bebc2055c8f8e
[ "MIT" ]
2
2019-07-16T00:24:47.000Z
2021-02-26T10:27:27.000Z
"""Collection of :class:`~chainer.Link` implementations.""" from chainer.links.activation.maxout import Maxout # NOQA from chainer.links.activation.prelu import PReLU # NOQA from chainer.links.activation.simplified_dropconnect import SimplifiedDropconnect # NOQA from chainer.links.activation.swish import Swish # N...
68.584615
111
0.841633
from chainer.links.activation.maxout import Maxout from chainer.links.activation.prelu import PReLU from chainer.links.activation.simplified_dropconnect import SimplifiedDropconnect from chainer.links.activation.swish import Swish from chainer.links.connection.bias import Bias from chainer.links.connection.b...
true
true
1c2241f49be65010870f23fc6c0b2d665632ebf8
4,189
py
Python
AutomatedTesting/Gem/PythonTests/scripting/EditMenu_Default_UndoRedo.py
aaarsene/o3de
37e3b0226958974defd14dd6d808e8557dcd7345
[ "Apache-2.0", "MIT" ]
1
2021-09-13T00:01:12.000Z
2021-09-13T00:01:12.000Z
AutomatedTesting/Gem/PythonTests/scripting/EditMenu_Default_UndoRedo.py
aaarsene/o3de
37e3b0226958974defd14dd6d808e8557dcd7345
[ "Apache-2.0", "MIT" ]
null
null
null
AutomatedTesting/Gem/PythonTests/scripting/EditMenu_Default_UndoRedo.py
aaarsene/o3de
37e3b0226958974defd14dd6d808e8557dcd7345
[ "Apache-2.0", "MIT" ]
1
2021-07-20T11:07:25.000Z
2021-07-20T11:07:25.000Z
""" 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 """ # fmt: off class Tests(): variable_created = ("New variable created", "New variable not created") undo...
38.431193
155
0.719265
class Tests(): variable_created = ("New variable created", "New variable not created") undo_worked = ("Undo action working", "Undo action did not work") redo_worked = ("Redo action working", "Redo action did not work") def EditMenu_Default_UndoRedo(): from PySide2 import QtWidgets, QtC...
true
true
1c22426b9b2f70900737791fc1b1486ddd0180d4
2,081
py
Python
aiida_siesta/workflows/bandgap.py
pfebrer96/aiida_siesta_plugin
ef0b086f070767921edf96ca4195176877768f69
[ "MIT" ]
null
null
null
aiida_siesta/workflows/bandgap.py
pfebrer96/aiida_siesta_plugin
ef0b086f070767921edf96ca4195176877768f69
[ "MIT" ]
null
null
null
aiida_siesta/workflows/bandgap.py
pfebrer96/aiida_siesta_plugin
ef0b086f070767921edf96ca4195176877768f69
[ "MIT" ]
null
null
null
from aiida import orm from aiida.engine import calcfunction from aiida_siesta.workflows.base import SiestaBaseWorkChain @calcfunction def get_bandgap(e_fermi, band): """ Takes a band object, and a Fermi energy, and extracts the band gap value and 'is_insulator' boolean :param band: (orm.BandsData): band-s...
36.508772
103
0.658337
from aiida import orm from aiida.engine import calcfunction from aiida_siesta.workflows.base import SiestaBaseWorkChain @calcfunction def get_bandgap(e_fermi, band): from aiida.orm.nodes.data.array.bands import find_bandgap is_insulator, bandgap = find_bandgap(fermi_energy=e_fermi.value, bandsdata=band) ...
true
true
1c22455ae3abf7950923457192fd69a024a96f1d
734
py
Python
c1_2_processes/util.py
zhou-zhenyi/sicp
ee6475d79a486a3bdc458378c55d0721195ea7d6
[ "MIT" ]
null
null
null
c1_2_processes/util.py
zhou-zhenyi/sicp
ee6475d79a486a3bdc458378c55d0721195ea7d6
[ "MIT" ]
null
null
null
c1_2_processes/util.py
zhou-zhenyi/sicp
ee6475d79a486a3bdc458378c55d0721195ea7d6
[ "MIT" ]
null
null
null
num = 0 def line(): global num num += 1 return num def newl(): global num num = 0 def logl(msg): print(str(line()) + ": " + msg) def square(x): return x * x def double(x): return x + x def halve(x): return x / 2 def even(n): return n % 2 == 0 def prime(n): def smalles...
17.47619
56
0.512262
num = 0 def line(): global num num += 1 return num def newl(): global num num = 0 def logl(msg): print(str(line()) + ": " + msg) def square(x): return x * x def double(x): return x + x def halve(x): return x / 2 def even(n): return n % 2 == 0 def prime(n): def smalles...
true
true
1c224738c4af9bd3bb6c7ea91419c0e43996f172
5,758
py
Python
Operations/display_logging_manager_ops.py
baguapro/log_xray
629d9dc99eeb03861aead7b94a20fd4af2a73bab
[ "MIT" ]
null
null
null
Operations/display_logging_manager_ops.py
baguapro/log_xray
629d9dc99eeb03861aead7b94a20fd4af2a73bab
[ "MIT" ]
null
null
null
Operations/display_logging_manager_ops.py
baguapro/log_xray
629d9dc99eeb03861aead7b94a20fd4af2a73bab
[ "MIT" ]
null
null
null
""" Manager that controls the creation of tabs displaying the selected logs along with the objects that provides the functionality to query the logs for information. """ __version__ = '0.01' __author__ = 'Adrian Phung' from PyQt5 import QtWidgets, QtCore from numbered_text_browser import NumberedTextBrowser from O...
42.651852
93
0.719521
__version__ = '0.01' __author__ = 'Adrian Phung' from PyQt5 import QtWidgets, QtCore from numbered_text_browser import NumberedTextBrowser from Operations.display_log_processing_ops import DisplayLogProcessingOps class DisplayLoggingManagerOps(QtWidgets.QTabWidget): goto_line_history_data = QtCore.pyqtSignal(...
true
true
1c224a22cd09a2d7839ee6e2f33716f9e7a32d46
207
py
Python
iris_sdk/models/maps/reservation.py
NumberAI/python-bandwidth-iris
0e05f79d68b244812afb97e00fd65b3f46d00aa3
[ "MIT" ]
2
2020-04-13T13:47:59.000Z
2022-02-23T20:32:41.000Z
iris_sdk/models/maps/reservation.py
bandwidthcom/python-bandwidth-iris
dbcb30569631395041b92917252d913166f7d3c9
[ "MIT" ]
5
2020-09-18T20:59:24.000Z
2021-08-25T16:51:42.000Z
iris_sdk/models/maps/reservation.py
bandwidthcom/python-bandwidth-iris
dbcb30569631395041b92917252d913166f7d3c9
[ "MIT" ]
5
2018-12-12T14:39:50.000Z
2020-11-17T21:42:29.000Z
#!/usr/bin/env python from iris_sdk.models.maps.base_map import BaseMap class ReservationMap(BaseMap): account_id = None reservation_id = None reservation_expires = None reserved_tn = None
20.7
49
0.743961
from iris_sdk.models.maps.base_map import BaseMap class ReservationMap(BaseMap): account_id = None reservation_id = None reservation_expires = None reserved_tn = None
true
true
1c224a66a87898ab314c95757863bbafd1f66a66
1,732
py
Python
cryptography/rail_fence_cipher/__init__.py
JASTYN/pythonmaster
46638ab09d28b65ce5431cd0759fe6df272fb85d
[ "Apache-2.0", "MIT" ]
3
2017-05-02T10:28:13.000Z
2019-02-06T09:10:11.000Z
cryptography/rail_fence_cipher/__init__.py
JASTYN/pythonmaster
46638ab09d28b65ce5431cd0759fe6df272fb85d
[ "Apache-2.0", "MIT" ]
2
2017-06-21T20:39:14.000Z
2020-02-25T10:28:57.000Z
cryptography/rail_fence_cipher/__init__.py
JASTYN/pythonmaster
46638ab09d28b65ce5431cd0759fe6df272fb85d
[ "Apache-2.0", "MIT" ]
2
2016-07-29T04:35:22.000Z
2017-01-18T17:05:36.000Z
from itertools import cycle, chain def fence_pattern(rail, size): """ Creates a fence pattern for th encoding of messages This is done by creating a zig zag pattern using cycle and chain chain will 'chain' the rail and the decreasing rail range to create 1 long iterable cycle will produce this cha...
37.652174
101
0.700346
from itertools import cycle, chain def fence_pattern(rail, size): zig = cycle(chain(range(rail), range(rail - 2, 0, -1))) return zip(zig, range(size)) def encode(message, rail): fence = fence_pattern(rail=rail, size=len(message)) return "".join(message[i] for _, i in sorted(fence)) def decode(encr...
true
true
1c224ac19fd265f25e59c3e59e95b3e59709cb4b
25,485
py
Python
fasttext_model.py
webbfontaine/fasttext-tensorflow
fab3f3341862b4582d398939c7604752ba744902
[ "Apache-2.0" ]
1
2019-12-25T02:12:17.000Z
2019-12-25T02:12:17.000Z
fasttext_model.py
webbfontaine/fasttext-tensorflow
fab3f3341862b4582d398939c7604752ba744902
[ "Apache-2.0" ]
7
2019-12-16T21:57:58.000Z
2022-02-09T23:34:32.000Z
fasttext_model.py
webbfontaine/fasttext-tensorflow
fab3f3341862b4582d398939c7604752ba744902
[ "Apache-2.0" ]
null
null
null
import inspect import json import os import warnings from subprocess import ( Popen, PIPE, STDOUT, ) import numpy as np import pandas as pd from tqdm import tqdm import tensorflow as tf import tensorflow.compat.v1.logging as logging from utils import ( load_graph, hash_, validate, handle_s...
45.672043
120
0.612439
import inspect import json import os import warnings from subprocess import ( Popen, PIPE, STDOUT, ) import numpy as np import pandas as pd from tqdm import tqdm import tensorflow as tf import tensorflow.compat.v1.logging as logging from utils import ( load_graph, hash_, validate, handle_s...
true
true
1c224bb9c9669d53884d0f38e0000815d0542ec1
2,126
py
Python
day-18-turtles-intro/main.py
jskolnicki/100-Days-of-Python
146af2b73914a525121f1c91737abd4857dc2f89
[ "CNRI-Python" ]
null
null
null
day-18-turtles-intro/main.py
jskolnicki/100-Days-of-Python
146af2b73914a525121f1c91737abd4857dc2f89
[ "CNRI-Python" ]
null
null
null
day-18-turtles-intro/main.py
jskolnicki/100-Days-of-Python
146af2b73914a525121f1c91737abd4857dc2f89
[ "CNRI-Python" ]
null
null
null
from turtle import Turtle from turtle import Screen import random timmy = Turtle() screen = Screen() timmy.shape("turtle") timmy.color("red") screen.colormode(255) #Challenge 3 - triangle, square, ... , decagon # for num in range(3,11): # for i in range(num): # timmy.forward(100) # ti...
22.145833
88
0.662277
from turtle import Turtle from turtle import Screen import random timmy = Turtle() screen = Screen() timmy.shape("turtle") timmy.color("red") screen.colormode(255) t colorgram colors = colorgram.extract('D:/Downloads/hirst.png',25) list_of_colors = [] for i in colors: r = i.rgb.r g = i.rgb.g ...
true
true
1c224bc246ccf21094592501a2e443d6e8d030e0
1,635
py
Python
tests/test_schema_creator.py
schafrn/s3parq
f854819540e069f53fe42938a9bb6b8f800907b5
[ "MIT" ]
null
null
null
tests/test_schema_creator.py
schafrn/s3parq
f854819540e069f53fe42938a9bb6b8f800907b5
[ "MIT" ]
null
null
null
tests/test_schema_creator.py
schafrn/s3parq
f854819540e069f53fe42938a9bb6b8f800907b5
[ "MIT" ]
null
null
null
import pytest from mock import patch from s3parq import publish_redshift from s3parq.session_helper import SessionHelper class MockScopeObj(): def execute(self, schema_string: str): pass def scope_execute_mock(mock_session_helper): pass class Test(): # Given a correctly formatted string mak...
38.023256
109
0.716208
import pytest from mock import patch from s3parq import publish_redshift from s3parq.session_helper import SessionHelper class MockScopeObj(): def execute(self, schema_string: str): pass def scope_execute_mock(mock_session_helper): pass class Test(): def test_validator(self): s...
true
true
1c224bc451b533ee1a5fb6b8b610c0a696781d6e
165
py
Python
aleph/index/__init__.py
Ueland/aleph
d644e5f8b956c7186a59f3ce1c16798017961765
[ "MIT" ]
null
null
null
aleph/index/__init__.py
Ueland/aleph
d644e5f8b956c7186a59f3ce1c16798017961765
[ "MIT" ]
null
null
null
aleph/index/__init__.py
Ueland/aleph
d644e5f8b956c7186a59f3ce1c16798017961765
[ "MIT" ]
null
null
null
from aleph.index.entities import index_entity # noqa from aleph.index.documents import index_document # noqa from aleph.index.records import index_records # noqa
41.25
56
0.818182
from aleph.index.entities import index_entity from aleph.index.documents import index_document from aleph.index.records import index_records
true
true
1c224ce61b3c15d90723bcd4e749eedd16e112f8
16,534
py
Python
maci/learners/maddpg.py
bbrito/mapr2
5aa1a4c85c28918d9f16e5544793bf5574d7c49e
[ "Apache-2.0" ]
null
null
null
maci/learners/maddpg.py
bbrito/mapr2
5aa1a4c85c28918d9f16e5544793bf5574d7c49e
[ "Apache-2.0" ]
null
null
null
maci/learners/maddpg.py
bbrito/mapr2
5aa1a4c85c28918d9f16e5544793bf5574d7c49e
[ "Apache-2.0" ]
null
null
null
import numpy as np import tensorflow as tf from maci.misc import logger from maci.misc.overrides import overrides import maci.misc.tf_utils as U from maci.misc import tf_utils from .base import MARLAlgorithm # A Multiagent Reinforcement Learning Algorithm EPS = 1e-6 def assert_shape(tensor, expected_shape): t...
41.964467
137
0.622233
import numpy as np import tensorflow as tf from maci.misc import logger from maci.misc.overrides import overrides import maci.misc.tf_utils as U from maci.misc import tf_utils from .base import MARLAlgorithm EPS = 1e-6 def assert_shape(tensor, expected_shape): tensor_shape = tensor.shape.as_list() assert...
true
true
1c224de2032f1dcd01061d393a1b5025e142edc5
3,648
py
Python
textpreforrkr.py
ieeecompsoc/Plagiarism-Checker
81105a84d6105d2b36c8096674976fbb1922c532
[ "MIT" ]
12
2018-01-12T10:29:05.000Z
2021-04-27T21:19:20.000Z
textpreforrkr.py
ieeecompsoc/Plagiarism-Checker
81105a84d6105d2b36c8096674976fbb1922c532
[ "MIT" ]
1
2017-08-09T17:14:34.000Z
2017-08-09T17:14:34.000Z
textpreforrkr.py
ieeecompsoc/Plagiarism-Checker
81105a84d6105d2b36c8096674976fbb1922c532
[ "MIT" ]
4
2017-08-06T17:24:40.000Z
2019-02-11T09:18:25.000Z
from __future__ import division import string from plag import main_func #from plag import * import codecs from nltk.tokenize import sent_tokenize,word_tokenize from nltk.stem import PorterStemmer from nltk.tokenize import word_tokenize from nltk.corpus import stopwords from nltk.stem import WordNetLemmatizer def...
26.057143
134
0.680921
from __future__ import division import string from plag import main_func import codecs from nltk.tokenize import sent_tokenize,word_tokenize from nltk.stem import PorterStemmer from nltk.tokenize import word_tokenize from nltk.corpus import stopwords from nltk.stem import WordNetLemmatizer def pre_processing(tex...
false
true
1c224e1656dfb4af5f31c4e82b29e2e076dfb67d
1,823
py
Python
UtilityFunctions/integrals.py
TanmayeeGujar/CP1_Calculus
1a2c545299ac5fc355ba7f56b1ddc21fb81785a5
[ "Apache-2.0" ]
null
null
null
UtilityFunctions/integrals.py
TanmayeeGujar/CP1_Calculus
1a2c545299ac5fc355ba7f56b1ddc21fb81785a5
[ "Apache-2.0" ]
12
2021-11-13T21:38:46.000Z
2021-12-03T16:48:55.000Z
UtilityFunctions/integrals.py
TanmayeeGujar/CP1_Calculus
1a2c545299ac5fc355ba7f56b1ddc21fb81785a5
[ "Apache-2.0" ]
5
2021-11-12T20:06:50.000Z
2021-11-21T20:23:30.000Z
import numpy as np def simpson(f, a, b, n): """Approximates the definite integral of f from a to b by the composite Simpson's rule, using n subintervals. From http://en.wikipedia.org/wiki/Simpson's_rule Args: f : function to integrate a,b : boundaries n : number of subintervals ...
25.319444
73
0.511794
import numpy as np def simpson(f, a, b, n): h = (b - a) / n i = np.arange(0,n) s = f(a) + f(b) s += 4 * np.sum( f( a + i[1::2] * h ) ) s += 2 * np.sum( f( a + i[2:-1:2] * h ) ) return s * h / 3 def trapezoid(f, a, b, n): h = (b - a) / n s = f(a) + f(b) i = np.arange(0,n...
true
true
1c224edc528ce1429e79898bee244b99be08a5d7
52
py
Python
app/instructor/__init__.py
enkeboll/FIS-attendance-server
8bbc7df0bd881c310507a2013bcd19e34de55c51
[ "MIT" ]
2
2019-12-29T10:59:11.000Z
2021-10-02T19:29:35.000Z
app/instructor/__init__.py
enkeboll/FIS-attendance-server
8bbc7df0bd881c310507a2013bcd19e34de55c51
[ "MIT" ]
1
2021-06-02T00:48:29.000Z
2021-06-02T00:48:29.000Z
app/instructor/__init__.py
enkeboll/FIS-attendance-server
8bbc7df0bd881c310507a2013bcd19e34de55c51
[ "MIT" ]
1
2021-10-02T19:29:36.000Z
2021-10-02T19:29:36.000Z
from app.instructor.views import instructor # noqa
26
51
0.807692
from app.instructor.views import instructor
true
true
1c224feb6e852ee2ffd4fef6d501952e0dd08557
383
py
Python
tests/globals/document/dataclass_document.py
RelevanceAI/RelevanceAI
a0542f35153d9c842f3d2cd0955d6b07f6dfc07b
[ "Apache-2.0" ]
21
2021-11-23T13:01:36.000Z
2022-03-23T03:45:30.000Z
tests/globals/document/dataclass_document.py
RelevanceAI/RelevanceAI
a0542f35153d9c842f3d2cd0955d6b07f6dfc07b
[ "Apache-2.0" ]
217
2021-11-23T00:11:01.000Z
2022-03-30T08:11:49.000Z
tests/globals/document/dataclass_document.py
RelevanceAI/RelevanceAI
a0542f35153d9c842f3d2cd0955d6b07f6dfc07b
[ "Apache-2.0" ]
4
2022-01-04T01:48:30.000Z
2022-02-11T03:19:32.000Z
import random from typing import NamedTuple from dataclasses import dataclass from relevanceai.utils import make_id @dataclass class DataclassDocument: _id: str = None value1: float = random.random() value2: float = random.random() def dataclass_document() -> NamedTuple: document = DataclassDocum...
18.238095
39
0.741514
import random from typing import NamedTuple from dataclasses import dataclass from relevanceai.utils import make_id @dataclass class DataclassDocument: _id: str = None value1: float = random.random() value2: float = random.random() def dataclass_document() -> NamedTuple: document = DataclassDocum...
true
true
1c22501c1172409425af636de862c055d864c368
707
py
Python
usginmodels/model_version.py
usgin/ExcelToNGDSServiceTool
feefb70c3a94f57e02ca9e1c1588a85ff0902b48
[ "MIT" ]
null
null
null
usginmodels/model_version.py
usgin/ExcelToNGDSServiceTool
feefb70c3a94f57e02ca9e1c1588a85ff0902b48
[ "MIT" ]
null
null
null
usginmodels/model_version.py
usgin/ExcelToNGDSServiceTool
feefb70c3a94f57e02ca9e1c1588a85ff0902b48
[ "MIT" ]
null
null
null
from datetime import datetime from dateutil import parser as date_parser from layer import Layer class ModelVersion(): version = "" uri = "" xsd_url = "" xls_url = "" date_created = datetime(1900, 1, 1) layers = [] def __init__(self, version_dict): self.version = version_dict.ge...
32.136364
110
0.647808
from datetime import datetime from dateutil import parser as date_parser from layer import Layer class ModelVersion(): version = "" uri = "" xsd_url = "" xls_url = "" date_created = datetime(1900, 1, 1) layers = [] def __init__(self, version_dict): self.version = version_dict.ge...
true
true
1c2250e89848eb7688441e139f1814203de04f54
845
py
Python
src/sentry/digests/__init__.py
AlexWayfer/sentry
ef935cda2b2e960bd602fda590540882d1b0712d
[ "BSD-3-Clause" ]
4
2019-05-27T13:55:07.000Z
2021-03-30T07:05:09.000Z
src/sentry/digests/__init__.py
AlexWayfer/sentry
ef935cda2b2e960bd602fda590540882d1b0712d
[ "BSD-3-Clause" ]
196
2019-06-10T08:34:10.000Z
2022-02-22T01:26:13.000Z
src/sentry/digests/__init__.py
AlexWayfer/sentry
ef935cda2b2e960bd602fda590540882d1b0712d
[ "BSD-3-Clause" ]
1
2020-08-10T07:55:40.000Z
2020-08-10T07:55:40.000Z
from __future__ import absolute_import from collections import namedtuple from django.conf import settings from sentry.utils.dates import to_datetime from sentry.utils.services import LazyServiceWrapper from .backends.base import Backend # NOQA from .backends.dummy import DummyBackend # NOQA backend = LazyService...
26.40625
87
0.768047
from __future__ import absolute_import from collections import namedtuple from django.conf import settings from sentry.utils.dates import to_datetime from sentry.utils.services import LazyServiceWrapper from .backends.base import Backend from .backends.dummy import DummyBackend backend = LazyServiceWrapper( ...
true
true
1c22513990dcdd67c4798f127ea2b4650ec753da
2,091
py
Python
hangman/hangman.py
julia-shenshina/hangman
ecb6101932710e0d66c40f78c46a31fa8b257a63
[ "MIT" ]
null
null
null
hangman/hangman.py
julia-shenshina/hangman
ecb6101932710e0d66c40f78c46a31fa8b257a63
[ "MIT" ]
null
null
null
hangman/hangman.py
julia-shenshina/hangman
ecb6101932710e0d66c40f78c46a31fa8b257a63
[ "MIT" ]
null
null
null
import random import re class Hangman: MAX_MISTAKES_NUMBER = 5 VOCABULARY = ["hello", "algorithm", "time", "name", "computer"] def __init__(self): self.word = None self.mistakes_count = None self.opened_letters = None self.closed_letters_count = None def print_opened_...
29.450704
102
0.613582
import random import re class Hangman: MAX_MISTAKES_NUMBER = 5 VOCABULARY = ["hello", "algorithm", "time", "name", "computer"] def __init__(self): self.word = None self.mistakes_count = None self.opened_letters = None self.closed_letters_count = None def print_opened_...
true
true
1c2251e3587ae3409909b307a25fb5f2a8be46b2
426
py
Python
utils/os_utils.py
FeeeeK/vk_schema_codegen
036c5b00f09714ccad0d442d087504580ac79cfd
[ "MIT" ]
null
null
null
utils/os_utils.py
FeeeeK/vk_schema_codegen
036c5b00f09714ccad0d442d087504580ac79cfd
[ "MIT" ]
null
null
null
utils/os_utils.py
FeeeeK/vk_schema_codegen
036c5b00f09714ccad0d442d087504580ac79cfd
[ "MIT" ]
null
null
null
import logging from pathlib import Path logging.basicConfig(level=logging.INFO) def create_results_dir(dir_name: str) -> str: if not Path(dir_name).exists(): Path(dir_name).mkdir(parents=True) return dir_name def create_python_files(files_dir: str, filenames: list) -> list: for filename in file...
22.421053
65
0.676056
import logging from pathlib import Path logging.basicConfig(level=logging.INFO) def create_results_dir(dir_name: str) -> str: if not Path(dir_name).exists(): Path(dir_name).mkdir(parents=True) return dir_name def create_python_files(files_dir: str, filenames: list) -> list: for filename in file...
true
true
1c225227151489ae3881bd526781f210642a88af
5,423
py
Python
scripts/destination.py
DavMrc/thesis
ce386f1dea69ca9521d35a74f1d6823ed34fb066
[ "MIT" ]
null
null
null
scripts/destination.py
DavMrc/thesis
ce386f1dea69ca9521d35a74f1d6823ed34fb066
[ "MIT" ]
null
null
null
scripts/destination.py
DavMrc/thesis
ce386f1dea69ca9521d35a74f1d6823ed34fb066
[ "MIT" ]
null
null
null
#!/usr/bin/env python """ a file that holds the Idleness, Observation and Destination classes. """ import rospy class Idleness(object): def __init__(self, true, remaining, estim): self.__true_idl = true self.__estim_idl = estim self.__remaining_idl = remaining def get_true(se...
30.638418
103
0.570349
import rospy class Idleness(object): def __init__(self, true, remaining, estim): self.__true_idl = true self.__estim_idl = estim self.__remaining_idl = remaining def get_true(self): return self.__true_idl def get_remaining(self): return self.__remaining_...
true
true
1c22523c71b75b8f3c5d5e51b18cc3dd5c888d18
1,251
py
Python
horizon/openstack_dashboard/dashboards/admin/routers/tabs.py
yianjiajia/openstack_horizon
9e36a4c3648ef29d0df6912d990465f51d6124a6
[ "Apache-2.0" ]
null
null
null
horizon/openstack_dashboard/dashboards/admin/routers/tabs.py
yianjiajia/openstack_horizon
9e36a4c3648ef29d0df6912d990465f51d6124a6
[ "Apache-2.0" ]
null
null
null
horizon/openstack_dashboard/dashboards/admin/routers/tabs.py
yianjiajia/openstack_horizon
9e36a4c3648ef29d0df6912d990465f51d6124a6
[ "Apache-2.0" ]
null
null
null
# Copyright 2012, Nachi Ueno, NTT MCL, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
37.909091
83
0.760192
from openstack_dashboard.dashboards.admin.routers.ports import tables as ptbl from openstack_dashboard.dashboards.network.routers.extensions.routerrules\ import tabs as rr_tabs from openstack_dashboard.dashboards.network.routers import tabs as r_tabs class OverviewTab(r_tabs.OverviewTab): templa...
true
true
1c22525a33bd701a0e2589a1472030eed669a513
684
py
Python
utils/altutils.py
fazilaltinel/pytorch-dann-resnet
fe6abb274065c26c918d71c38babe2ec894d8293
[ "MIT" ]
4
2021-02-08T10:32:48.000Z
2021-09-15T05:43:20.000Z
utils/altutils.py
fazilaltinel/pytorch-dann-resnet
fe6abb274065c26c918d71c38babe2ec894d8293
[ "MIT" ]
null
null
null
utils/altutils.py
fazilaltinel/pytorch-dann-resnet
fe6abb274065c26c918d71c38babe2ec894d8293
[ "MIT" ]
2
2021-02-25T20:17:41.000Z
2021-08-29T08:06:39.000Z
import configparser import logging def readConfigFile(filePath): """ Read config file Args: filePath ([str]): path to config file Returns: [Obj]: config object """ config = configparser.ConfigParser() config.read(filePath) return config def setLogger(logFilePath...
20.727273
98
0.635965
import configparser import logging def readConfigFile(filePath): config = configparser.ConfigParser() config.read(filePath) return config def setLogger(logFilePath): logHandler = [logging.FileHandler(logFilePath), logging.StreamHandler()] logging.basicConfig(level=logging.INFO, format="%(asctime...
true
true
1c2252bc2e9cc7bc196f4a33f0530c21630bf150
2,238
py
Python
src/apps/menu/forms.py
yrrodriguezb/django_menu
9323243cdd43ab48b54ca21a698169942c6e1a3e
[ "MIT" ]
null
null
null
src/apps/menu/forms.py
yrrodriguezb/django_menu
9323243cdd43ab48b54ca21a698169942c6e1a3e
[ "MIT" ]
null
null
null
src/apps/menu/forms.py
yrrodriguezb/django_menu
9323243cdd43ab48b54ca21a698169942c6e1a3e
[ "MIT" ]
null
null
null
from django import forms from django.db.models import Q from .models import Menu class MenuForm(forms.ModelForm): class Meta: model = Menu fields = ( 'code', 'name', 'path', 'level', 'order', 'parent', 'last_child'...
30.243243
109
0.502681
from django import forms from django.db.models import Q from .models import Menu class MenuForm(forms.ModelForm): class Meta: model = Menu fields = ( 'code', 'name', 'path', 'level', 'order', 'parent', 'last_child'...
true
true
1c2253345155c158b2fc870171a729279621dfe7
285
py
Python
Bill_division.py
axxe007/hackerrank
464ae0a6dbe078d131507db72add540587128e47
[ "MIT" ]
null
null
null
Bill_division.py
axxe007/hackerrank
464ae0a6dbe078d131507db72add540587128e47
[ "MIT" ]
null
null
null
Bill_division.py
axxe007/hackerrank
464ae0a6dbe078d131507db72add540587128e47
[ "MIT" ]
null
null
null
def bonAppetit(bill, k, b): shares_brian = (sum(bill)+bill[k])/2 shares_anna = (sum(bill) - bill[k])/2 if shares_anna == b: return print('Bon Appetit') else: return print(int(bill[k]/2)) bill = [3, 10, 2, 9] n = 4 k = 1 b = 12 bonAppetit(bill, k, b)
17.8125
41
0.557895
def bonAppetit(bill, k, b): shares_brian = (sum(bill)+bill[k])/2 shares_anna = (sum(bill) - bill[k])/2 if shares_anna == b: return print('Bon Appetit') else: return print(int(bill[k]/2)) bill = [3, 10, 2, 9] n = 4 k = 1 b = 12 bonAppetit(bill, k, b)
true
true
1c22534a58d7eaf93416face1d8fa33be8da2f7f
1,374
py
Python
nengo/spa/tests/test_bind.py
hunse/nengo
5fcd7b18aa9496e5c47c38c6408430cd9f68a720
[ "BSD-2-Clause" ]
null
null
null
nengo/spa/tests/test_bind.py
hunse/nengo
5fcd7b18aa9496e5c47c38c6408430cd9f68a720
[ "BSD-2-Clause" ]
null
null
null
nengo/spa/tests/test_bind.py
hunse/nengo
5fcd7b18aa9496e5c47c38c6408430cd9f68a720
[ "BSD-2-Clause" ]
null
null
null
import numpy as np import nengo from nengo import spa from nengo.utils.numpy import rmse def test_basic(): with spa.SPA() as model: model.bind = spa.Bind(dimensions=16) inputA = model.get_module_input('bind_A') inputB = model.get_module_input('bind_B') output = model.get_module_output('bind'...
25.924528
58
0.623726
import numpy as np import nengo from nengo import spa from nengo.utils.numpy import rmse def test_basic(): with spa.SPA() as model: model.bind = spa.Bind(dimensions=16) inputA = model.get_module_input('bind_A') inputB = model.get_module_input('bind_B') output = model.get_module_output('bind'...
true
true
1c22538567d33ba407c3f6feaf21b04623be8635
53,972
py
Python
crabageprediction/venv/Lib/site-packages/numpy/core/tests/test_indexing.py
13rianlucero/CrabAgePrediction
92bc7fbe1040f49e820473e33cc3902a5a7177c7
[ "MIT" ]
20,453
2015-01-02T09:00:47.000Z
2022-03-31T23:35:56.000Z
crabageprediction/venv/Lib/site-packages/numpy/core/tests/test_indexing.py
13rianlucero/CrabAgePrediction
92bc7fbe1040f49e820473e33cc3902a5a7177c7
[ "MIT" ]
14,862
2015-01-01T01:28:34.000Z
2022-03-31T23:48:52.000Z
crabageprediction/venv/Lib/site-packages/numpy/core/tests/test_indexing.py
13rianlucero/CrabAgePrediction
92bc7fbe1040f49e820473e33cc3902a5a7177c7
[ "MIT" ]
9,362
2015-01-01T15:49:43.000Z
2022-03-31T21:26:51.000Z
import sys import warnings import functools import operator import pytest import numpy as np from numpy.core._multiarray_tests import array_indexing from itertools import product from numpy.testing import ( assert_, assert_equal, assert_raises, assert_raises_regex, assert_array_equal, assert_warns, HAS_REFCOU...
38.223796
94
0.552453
import sys import warnings import functools import operator import pytest import numpy as np from numpy.core._multiarray_tests import array_indexing from itertools import product from numpy.testing import ( assert_, assert_equal, assert_raises, assert_raises_regex, assert_array_equal, assert_warns, HAS_REFCOU...
true
true
1c2253dfa4ebe7c3caa7aa05c0391cee168df5ce
8,328
py
Python
spacy/tests/doc/test_token_api.py
ilivans/spaCy
9ce059dd067ecc3f097d04023e3cfa0d70d35bb8
[ "MIT" ]
null
null
null
spacy/tests/doc/test_token_api.py
ilivans/spaCy
9ce059dd067ecc3f097d04023e3cfa0d70d35bb8
[ "MIT" ]
3
2021-09-21T18:04:50.000Z
2022-02-26T02:14:42.000Z
spacy/tests/doc/test_token_api.py
ilivans/spaCy
9ce059dd067ecc3f097d04023e3cfa0d70d35bb8
[ "MIT" ]
null
null
null
# coding: utf-8 from __future__ import unicode_literals import pytest import numpy from spacy.attrs import IS_ALPHA, IS_DIGIT, IS_LOWER, IS_PUNCT, IS_TITLE, IS_STOP from spacy.symbols import VERB from spacy.vocab import Vocab from spacy.tokens import Doc from ..util import get_doc @pytest.fixture def doc(en_tokeniz...
33.445783
88
0.634966
from __future__ import unicode_literals import pytest import numpy from spacy.attrs import IS_ALPHA, IS_DIGIT, IS_LOWER, IS_PUNCT, IS_TITLE, IS_STOP from spacy.symbols import VERB from spacy.vocab import Vocab from spacy.tokens import Doc from ..util import get_doc @pytest.fixture def doc(en_tokenizer): t...
true
true
1c22548b536cb544986eebdf7be092af6265fb62
13,640
py
Python
mg_toolkit/bulk_download.py
EBI-Metagenomics/emg-full-metadata-download
45e3bd3398468b12ff30ed7c227262a667126285
[ "Apache-2.0" ]
14
2018-05-12T14:11:46.000Z
2021-09-04T12:30:12.000Z
mg_toolkit/bulk_download.py
EBI-Metagenomics/emg-full-metadata-download
45e3bd3398468b12ff30ed7c227262a667126285
[ "Apache-2.0" ]
18
2018-08-08T15:30:32.000Z
2022-03-15T11:57:11.000Z
mg_toolkit/bulk_download.py
EBI-Metagenomics/emg-full-metadata-download
45e3bd3398468b12ff30ed7c227262a667126285
[ "Apache-2.0" ]
7
2018-05-12T14:11:32.000Z
2021-07-31T10:09:31.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2021 EMBL - European Bioinformatics Institute # # 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/LICEN...
35.154639
86
0.591129
import logging import os import platform import csv from pathlib import Path from requests.adapters import HTTPAdapter from requests.packages.urllib3.util.retry import Retry from requests import Session, HTTPError from tqdm import tqdm from .constants import API_BASE, MG_ANALYSES_BASE_URL, MG_ANALYSES...
true
true
1c225580c255cea1785d05833a7ce2e27f2b6828
726
py
Python
apps/basic_channel/dialog_lexicon/resetVariable.py
Cognitive-Robotics-UOS/open-pepper-project
7a878e69751c9e477cc622cd423c4baf056082c2
[ "MIT" ]
7
2018-09-27T12:57:17.000Z
2021-11-05T16:45:46.000Z
apps/basic_channel/dialog_lexicon/resetVariable.py
Cognitive-Robotics-UOS/open-pepper-project
7a878e69751c9e477cc622cd423c4baf056082c2
[ "MIT" ]
null
null
null
apps/basic_channel/dialog_lexicon/resetVariable.py
Cognitive-Robotics-UOS/open-pepper-project
7a878e69751c9e477cc622cd423c4baf056082c2
[ "MIT" ]
1
2018-11-29T18:00:35.000Z
2018-11-29T18:00:35.000Z
import qi class resetVariable(): APP_ID="com.aldebaran.setVariable" def __init__(self, app): self.qiapp= app self.session = app.session self.session.waitForService('ALMemory') self.memory=self.session.service('ALMemory') def resetVariable(self, variable): ...
22
53
0.61157
import qi class resetVariable(): APP_ID="com.aldebaran.setVariable" def __init__(self, app): self.qiapp= app self.session = app.session self.session.waitForService('ALMemory') self.memory=self.session.service('ALMemory') def resetVariable(self, variable): ...
true
true
1c2255b67746e17801501d33b76a18b6dfdfa694
31,111
py
Python
var/spack/repos/builtin/packages/llvm/package.py
pbrady/spack
91fc4cf28fa7145e1f855f8c03f30574a550308f
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
1
2021-09-23T01:12:04.000Z
2021-09-23T01:12:04.000Z
var/spack/repos/builtin/packages/llvm/package.py
pbrady/spack
91fc4cf28fa7145e1f855f8c03f30574a550308f
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
15
2021-07-23T22:10:08.000Z
2022-03-21T19:57:53.000Z
var/spack/repos/builtin/packages/llvm/package.py
flatironinstitute/spack
71a7b1b5fadbe16bcdb36fb679aa828cd7d83b02
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
1
2022-02-22T12:42:18.000Z
2022-02-22T12:42:18.000Z
# Copyright 2013-2021 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) import os import os.path import re import sys import llnl.util.tty as tty import spack.build_environment import spack.uti...
40.935526
120
0.613674
import os import os.path import re import sys import llnl.util.tty as tty import spack.build_environment import spack.util.executable class Llvm(CMakePackage, CudaPackage): homepage = "https://llvm.org/" url = "https://github.com/llvm/llvm-project/archive/llvmorg-7.1.0.tar.gz" list_url = "https://r...
true
true
1c2255bb32170ee138d791821eba0f8bdd1862c6
405
py
Python
ECE650-system-programming/HW4_db/hw4_django_orm/hw4_django_orm/wsgi.py
yo1995/cht_Duke_courses
d889e85e677f419c67c12e78143f3e8143457944
[ "MIT" ]
8
2019-03-28T18:37:32.000Z
2022-03-29T22:15:05.000Z
ECE650-system-programming/HW4_db/hw4_django_orm/hw4_django_orm/wsgi.py
yo1995/cht_Duke_courses
d889e85e677f419c67c12e78143f3e8143457944
[ "MIT" ]
null
null
null
ECE650-system-programming/HW4_db/hw4_django_orm/hw4_django_orm/wsgi.py
yo1995/cht_Duke_courses
d889e85e677f419c67c12e78143f3e8143457944
[ "MIT" ]
13
2018-09-12T19:56:46.000Z
2020-11-24T22:48:46.000Z
""" WSGI config for hw4_django_orm project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/2.1/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANG...
23.823529
78
0.792593
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'hw4_django_orm.settings') application = get_wsgi_application()
true
true
1c22560483ba8748d27eee8616556fa7a9b6745f
929
py
Python
oo/pessoa.py
SergioVenicio21/pythonbirds
ac060d279846e09dea7407c9391c125f02769065
[ "MIT" ]
null
null
null
oo/pessoa.py
SergioVenicio21/pythonbirds
ac060d279846e09dea7407c9391c125f02769065
[ "MIT" ]
null
null
null
oo/pessoa.py
SergioVenicio21/pythonbirds
ac060d279846e09dea7407c9391c125f02769065
[ "MIT" ]
null
null
null
#!/usr/bin/python3 # -*- coding: utf-8 -*- class Pessoa: olhos = 2 pessoas = 0 def __init__(self, nome, idade, *filhos): self.nome = nome self.idade = idade self.filhos = list(filhos) Pessoa.pessoas += 1 def comprimentar(self): return f'Olá, meu nome é {self.n...
20.195652
49
0.585576
class Pessoa: olhos = 2 pessoas = 0 def __init__(self, nome, idade, *filhos): self.nome = nome self.idade = idade self.filhos = list(filhos) Pessoa.pessoas += 1 def comprimentar(self): return f'Olá, meu nome é {self.nome}' @staticmethod def metodo_e...
true
true
1c225705d58372c3f8bfe3076c55a63d4bc5d65f
12,210
py
Python
apps/network/tests/test_routes/test_roles_http.py
aisportsbets/pygrid
eeee1e7ef6ba50a03f6f486992a45f7171976e5a
[ "Apache-2.0" ]
null
null
null
apps/network/tests/test_routes/test_roles_http.py
aisportsbets/pygrid
eeee1e7ef6ba50a03f6f486992a45f7171976e5a
[ "Apache-2.0" ]
null
null
null
apps/network/tests/test_routes/test_roles_http.py
aisportsbets/pygrid
eeee1e7ef6ba50a03f6f486992a45f7171976e5a
[ "Apache-2.0" ]
null
null
null
from json import dumps, loads import jwt import pytest from flask import current_app as app from src.main.core.database import Role, User, create_role, create_user, model_to_json payload = { "name": "mario mario", "can_edit_settings": False, "can_create_users": True, "can_edit_roles": False, "can...
27.133333
90
0.659378
from json import dumps, loads import jwt import pytest from flask import current_app as app from src.main.core.database import Role, User, create_role, create_user, model_to_json payload = { "name": "mario mario", "can_edit_settings": False, "can_create_users": True, "can_edit_roles": False, "can...
true
true
1c2257ab5ded4264d0501d96dc70bb298d310275
15,142
py
Python
pyNastran/op2/tables/oes_stressStrain/real/oes_bush.py
JohannesSeidel/pyNastran
91ccd2756b201a7a3e4bb81cc6dc53b947d43bbf
[ "BSD-3-Clause" ]
null
null
null
pyNastran/op2/tables/oes_stressStrain/real/oes_bush.py
JohannesSeidel/pyNastran
91ccd2756b201a7a3e4bb81cc6dc53b947d43bbf
[ "BSD-3-Clause" ]
null
null
null
pyNastran/op2/tables/oes_stressStrain/real/oes_bush.py
JohannesSeidel/pyNastran
91ccd2756b201a7a3e4bb81cc6dc53b947d43bbf
[ "BSD-3-Clause" ]
null
null
null
import numpy as np from numpy import zeros from pyNastran.utils.numpy_utils import integer_types from pyNastran.op2.tables.oes_stressStrain.real.oes_objects import StressObject, StrainObject, OES_Object from pyNastran.f06.f06_formatting import write_floats_13e, _eigenvalue_header class RealBushArray(OES_Object): ...
38.92545
132
0.514265
import numpy as np from numpy import zeros from pyNastran.utils.numpy_utils import integer_types from pyNastran.op2.tables.oes_stressStrain.real.oes_objects import StressObject, StrainObject, OES_Object from pyNastran.f06.f06_formatting import write_floats_13e, _eigenvalue_header class RealBushArray(OES_Object): ...
true
true
1c2258061c9713f47fae868153177a9dea30a273
1,398
py
Python
carrier.py
fcchn4/carrier
f29f049565ad5efa458176a095e07573bd132085
[ "MIT" ]
null
null
null
carrier.py
fcchn4/carrier
f29f049565ad5efa458176a095e07573bd132085
[ "MIT" ]
null
null
null
carrier.py
fcchn4/carrier
f29f049565ad5efa458176a095e07573bd132085
[ "MIT" ]
1
2020-10-20T23:47:38.000Z
2020-10-20T23:47:38.000Z
#!/usr/bin/env python """Carrier Usage: carrier.py provision --nodes=<n> --containers-per-node=<c> --api-key=<key> carrier.py delete carrier.py start carrier.py stop Options: --nodes=<n> Number of nodes to create --containers-per-node=<c> Number of containers-per-node --api-key=<...
22.190476
76
0.676681
from docopt import docopt from os.path import expanduser from carrier.config import ConfigurationManager from carrier.worker import WorkerController def provision_droplets(args): nodes = int(args['--nodes']) containers_per_node = int(args['--containers-per-node']) api_key = args['--api-key'] conf =...
true
true
1c2258f4ea607bc103b184f48d2ec9ae534397d0
1,278
py
Python
NanoSnake/wrappers/pycometh_cpg_aggregate/wrapper.py
BenjaminSchwessinger/NanoSnake
647c948751b622506b3f66fe6bf0979f2359130d
[ "MIT" ]
null
null
null
NanoSnake/wrappers/pycometh_cpg_aggregate/wrapper.py
BenjaminSchwessinger/NanoSnake
647c948751b622506b3f66fe6bf0979f2359130d
[ "MIT" ]
null
null
null
NanoSnake/wrappers/pycometh_cpg_aggregate/wrapper.py
BenjaminSchwessinger/NanoSnake
647c948751b622506b3f66fe6bf0979f2359130d
[ "MIT" ]
null
null
null
__author__ = "Adrien Leger" __copyright__ = "Copyright 2019, Adrien Leger" __email__ = "aleg@ebi.ac.uk" __license__ = "MIT" __version__ = "0.0.3" # Imports import os from snakemake.shell import shell # Shortcuts opt = snakemake.params.get("opt", "") input_tsv = snakemake.input.tsv ref = snakemake.input.ref output_tsv...
29.72093
105
0.686228
__author__ = "Adrien Leger" __copyright__ = "Copyright 2019, Adrien Leger" __email__ = "aleg@ebi.ac.uk" __license__ = "MIT" __version__ = "0.0.3" import os from snakemake.shell import shell opt = snakemake.params.get("opt", "") input_tsv = snakemake.input.tsv ref = snakemake.input.ref output_tsv = snakemake.output....
true
true
1c225a57535b088324ffaac6729b38e24aa612bf
17,085
py
Python
pysnpimpute/utils.py
neurospin/pySnpImpute
133db33a43c9eb01b2538cb3f4e2f146d7e7a532
[ "CECILL-B" ]
null
null
null
pysnpimpute/utils.py
neurospin/pySnpImpute
133db33a43c9eb01b2538cb3f4e2f146d7e7a532
[ "CECILL-B" ]
null
null
null
pysnpimpute/utils.py
neurospin/pySnpImpute
133db33a43c9eb01b2538cb3f4e2f146d7e7a532
[ "CECILL-B" ]
null
null
null
# -*- coding: utf-8 -*- """ A set of common utility functions. """ import os import subprocess import time import argparse import logging import json import glob from collections import OrderedDict import numpy import pandas import pysnpimpute from pysnpimpute import (POSITIONS_OF_X_REGION_OF_BUILD, ...
34.93865
79
0.640445
import os import subprocess import time import argparse import logging import json import glob from collections import OrderedDict import numpy import pandas import pysnpimpute from pysnpimpute import (POSITIONS_OF_X_REGION_OF_BUILD, CENTROMERE_POSITIONS_OF_CHROMOSOME_OF_BUILD) from pysnp...
true
true
1c225a7260c16ebe075e9b7044ddc883e9508b12
2,862
py
Python
examples/set_up_multisig_account.py
MartinThoma/py-stellar-base
07ab28cde7a7040f2262b224f9af8a3416c0e5ab
[ "Apache-2.0" ]
1
2021-07-06T01:34:08.000Z
2021-07-06T01:34:08.000Z
examples/set_up_multisig_account.py
MartinThoma/py-stellar-base
07ab28cde7a7040f2262b224f9af8a3416c0e5ab
[ "Apache-2.0" ]
36
2021-08-23T17:31:52.000Z
2022-03-28T01:39:00.000Z
examples/set_up_multisig_account.py
MartinThoma/py-stellar-base
07ab28cde7a7040f2262b224f9af8a3416c0e5ab
[ "Apache-2.0" ]
1
2021-07-06T01:33:40.000Z
2021-07-06T01:33:40.000Z
""" Stellar uses signatures as authorization. Transactions always need authorization from at least one public key in order to be considered valid. Generally, transactions only need authorization from the public key of the source account. Transaction signatures are created by cryptographically signing the transaction o...
39.205479
98
0.786164
from stellar_sdk import Server, TransactionBuilder, Signer, Network, Keypair server = Server(horizon_url="https://horizon-testnet.stellar.org") root_keypair = Keypair.from_secret( "SA6XHAH4GNLRWWWF6TEVEWNS44CBNFAJWHWOPZCVZOUXSQA7BOYN7XHC" ) root_account = server.load_account(account_id=root_keypair.public_key) sec...
true
true
1c225ab9b2e303a380231696065ce700c8f57366
15,880
py
Python
src/plotman/job.py
drewmullen/plotman
7599426711f6cdab5ce535cf0ba91ff29cefca76
[ "Apache-2.0" ]
null
null
null
src/plotman/job.py
drewmullen/plotman
7599426711f6cdab5ce535cf0ba91ff29cefca76
[ "Apache-2.0" ]
null
null
null
src/plotman/job.py
drewmullen/plotman
7599426711f6cdab5ce535cf0ba91ff29cefca76
[ "Apache-2.0" ]
null
null
null
# TODO do we use all these? import argparse import contextlib import functools import logging import os import random import re import sys import time from datetime import datetime from enum import Enum, auto from subprocess import call import attr import click import pendulum import psutil from plotman import chia ...
35.685393
124
0.560768
import argparse import contextlib import functools import logging import os import random import re import sys import time from datetime import datetime from enum import Enum, auto from subprocess import call import attr import click import pendulum import psutil from plotman import chia def job_phases_for_tmpdir(...
true
true