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
f738ce8023f6a2decafbfa571a6db38148ea9429
4,411
py
Python
src/procedural_city_generation/polygons/getBlock.py
kritika-srivastava/The-Conurbation-Algorithm
d5d39d701b1e09c975dceca5445c4398fd5fd93b
[ "MIT" ]
4
2020-09-22T14:28:24.000Z
2022-02-02T00:15:27.000Z
src/procedural_city_generation/polygons/getBlock.py
kritika-srivastava/The-Conurbation-Algorithm
d5d39d701b1e09c975dceca5445c4398fd5fd93b
[ "MIT" ]
null
null
null
src/procedural_city_generation/polygons/getBlock.py
kritika-srivastava/The-Conurbation-Algorithm
d5d39d701b1e09c975dceca5445c4398fd5fd93b
[ "MIT" ]
1
2021-06-25T15:25:13.000Z
2021-06-25T15:25:13.000Z
from __future__ import division import numpy as np from procedural_city_generation.additional_stuff.Singleton import Singleton from procedural_city_generation.polygons.Polygon2D import Polygon2D singleton = Singleton("polygons") def p_in_poly(poly, point): x, y = point n = len(poly) inside = False ...
36.155738
83
0.557017
from __future__ import division import numpy as np from procedural_city_generation.additional_stuff.Singleton import Singleton from procedural_city_generation.polygons.Polygon2D import Polygon2D singleton = Singleton("polygons") def p_in_poly(poly, point): x, y = point n = len(poly) inside = False ...
true
true
f738ceaf874ab5508e04c45a60cbc61c1d376c10
3,610
py
Python
extended_kalman_filter/extended_kalman_filter.py
ryan-dd/autonomous-systems
39fa1394e6b9577600e52d9b7ecd9184a1c90ce1
[ "MIT" ]
null
null
null
extended_kalman_filter/extended_kalman_filter.py
ryan-dd/autonomous-systems
39fa1394e6b9577600e52d9b7ecd9184a1c90ce1
[ "MIT" ]
null
null
null
extended_kalman_filter/extended_kalman_filter.py
ryan-dd/autonomous-systems
39fa1394e6b9577600e52d9b7ecd9184a1c90ce1
[ "MIT" ]
null
null
null
from math import cos, sin, atan2, exp import numpy as np from heading_range_robot.parameters import * class EKF: def __init__(self, sample_period): self._change_t = sample_period self.mean_belief = np.vstack((INITIAL_X, INITIAL_Y, INITIAL_THETA)) self.covariance_belief = np.eye(3) ...
42.97619
148
0.581163
from math import cos, sin, atan2, exp import numpy as np from heading_range_robot.parameters import * class EKF: def __init__(self, sample_period): self._change_t = sample_period self.mean_belief = np.vstack((INITIAL_X, INITIAL_Y, INITIAL_THETA)) self.covariance_belief = np.eye(3) ...
true
true
f738cf24af7138d988dffecb2ef44f559fc23734
925
py
Python
password-generator.py
AkashSDas/Mini-Projects
908cea6df6ef6c62abdfe05585634b786e60b812
[ "MIT" ]
null
null
null
password-generator.py
AkashSDas/Mini-Projects
908cea6df6ef6c62abdfe05585634b786e60b812
[ "MIT" ]
null
null
null
password-generator.py
AkashSDas/Mini-Projects
908cea6df6ef6c62abdfe05585634b786e60b812
[ "MIT" ]
null
null
null
import random import string # Generating characters for password def generate_password_characters(): alphabets = string.ascii_letters alphabets = [alphabet for alphabet in alphabets] numbers = string.digits numbers = [number for number in numbers] special_characters = string.punctuation spec...
25.694444
73
0.726486
import random import string def generate_password_characters(): alphabets = string.ascii_letters alphabets = [alphabet for alphabet in alphabets] numbers = string.digits numbers = [number for number in numbers] special_characters = string.punctuation special_characters = [ special_c...
true
true
f738cf63d0defe7800ee62d77cb5f24a10290e99
2,560
py
Python
test/functional/ncc_state_root.py
nccproject/ncc
068ccc82a73d28136546095261ad8ccef7e541a3
[ "MIT" ]
null
null
null
test/functional/ncc_state_root.py
nccproject/ncc
068ccc82a73d28136546095261ad8ccef7e541a3
[ "MIT" ]
null
null
null
test/functional/ncc_state_root.py
nccproject/ncc
068ccc82a73d28136546095261ad8ccef7e541a3
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2015-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * from tes...
38.787879
200
0.715625
from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * from test_framework.script import * from test_framework.mininode import * from test_framework.messages import COIN from test_framework.nccconfig import * import sys class StateRootTest(BitcoinTestFramework): def s...
true
true
f738cf941c2a8ecc9a7e38fe3c49971fe26c72c6
65,550
py
Python
glance_store/tests/unit/test_swift_store.py
redhat-openstack/glance_store
c816b38d9f12be75d989409cbab6dfefa8f49dc3
[ "Apache-2.0" ]
null
null
null
glance_store/tests/unit/test_swift_store.py
redhat-openstack/glance_store
c816b38d9f12be75d989409cbab6dfefa8f49dc3
[ "Apache-2.0" ]
null
null
null
glance_store/tests/unit/test_swift_store.py
redhat-openstack/glance_store
c816b38d9f12be75d989409cbab6dfefa8f49dc3
[ "Apache-2.0" ]
null
null
null
# Copyright 2011 OpenStack Foundation # 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 requ...
41.278338
79
0.62328
import copy import fixtures import hashlib import mock import tempfile import uuid from oslo_config import cfg from oslo_utils import units from oslotest import moxstubout import requests_mock import six from six import moves from six.moves import http_client from six.moves import range import swiftcl...
true
true
f738d1cc691e5e7835df1f29f63efb94f2ce77a6
1,149
py
Python
src/scrapy_redis_loadbalancing/tools.py
EchoShoot/scrapy-redis-loadbalancing
d5c7ff76dc842f201dcaa68928dd27c24be4acb8
[ "MIT" ]
3
2019-03-05T02:30:19.000Z
2020-03-13T13:29:34.000Z
src/scrapy_redis_loadbalancing/tools.py
EchoShoot/scrapy-redis-loadbalancing
d5c7ff76dc842f201dcaa68928dd27c24be4acb8
[ "MIT" ]
null
null
null
src/scrapy_redis_loadbalancing/tools.py
EchoShoot/scrapy-redis-loadbalancing
d5c7ff76dc842f201dcaa68928dd27c24be4acb8
[ "MIT" ]
3
2019-12-20T04:41:04.000Z
2020-07-12T22:26:27.000Z
class Color(object): """ 输出各种颜色,方便 shell观察 """ @staticmethod def black(text): """ 黑色 """ return '\033[90m{content}\033[0m'.format(content=text) @staticmethod def red(text): """ 红色 """ return '\033[91m{content}\033[0m'.format(content=text) @staticmethod def ...
24.446809
62
0.552654
class Color(object): @staticmethod def black(text): return '\033[90m{content}\033[0m'.format(content=text) @staticmethod def red(text): return '\033[91m{content}\033[0m'.format(content=text) @staticmethod def green(text): return '\033[92m{content}\033[0m'.format(conten...
true
true
f738d27a767e8d05f94578173bcb4472c4c89b20
4,332
py
Python
stream_alert_cli/terraform/cloudtrail.py
yutiansut/streamalert
7d198a3273781f66465420e90886a3ce53ec7559
[ "Apache-2.0" ]
2
2018-01-18T14:09:24.000Z
2021-11-02T10:45:23.000Z
stream_alert_cli/terraform/cloudtrail.py
revaniki/streamalert
7d198a3273781f66465420e90886a3ce53ec7559
[ "Apache-2.0" ]
null
null
null
stream_alert_cli/terraform/cloudtrail.py
revaniki/streamalert
7d198a3273781f66465420e90886a3ce53ec7559
[ "Apache-2.0" ]
null
null
null
""" Copyright 2017-present, Airbnb Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, sof...
41.257143
100
0.686288
import json from stream_alert.shared.logger import get_logger LOGGER = get_logger(__name__) def generate_cloudtrail(cluster_name, cluster_dict, config): modules = config['clusters'][cluster_name]['modules'] cloudtrail_module = 'cloudtrail_{}'.format(cluster_name) enabled_legacy = modules['cloudtrail']....
true
true
f738d34b0b45fa9d7ce0797c816edf87cad25272
7,402
py
Python
src/dials/util/batch_handling.py
dials-src/dials
25055c1f6164dc33e672e7c5c6a9c5a35e870660
[ "BSD-3-Clause" ]
1
2021-12-10T17:28:16.000Z
2021-12-10T17:28:16.000Z
src/dials/util/batch_handling.py
dials-src/dials
25055c1f6164dc33e672e7c5c6a9c5a35e870660
[ "BSD-3-Clause" ]
null
null
null
src/dials/util/batch_handling.py
dials-src/dials
25055c1f6164dc33e672e7c5c6a9c5a35e870660
[ "BSD-3-Clause" ]
1
2021-12-07T12:39:04.000Z
2021-12-07T12:39:04.000Z
""" Functions to help with calculating batch properties for experiments objects. """ from __future__ import annotations import logging from dials.array_family import flex logger = logging.getLogger("dials") class batch_manager: def __init__(self, batches, batch_params): # batch params is a list of dic...
38.552083
86
0.579168
from __future__ import annotations import logging from dials.array_family import flex logger = logging.getLogger("dials") class batch_manager: def __init__(self, batches, batch_params): self.batch_params = sorted(batch_params, key=lambda b: b["range"][0]) self.batches = batch...
true
true
f738d3546b92ea29140748d9f8745f245cb5fc8e
33,002
py
Python
salt/modules/rh_ip.py
wikimedia/operations-debs-salt
be6342abc7401ff92f67ed59f7834f1359f35314
[ "Apache-2.0" ]
null
null
null
salt/modules/rh_ip.py
wikimedia/operations-debs-salt
be6342abc7401ff92f67ed59f7834f1359f35314
[ "Apache-2.0" ]
null
null
null
salt/modules/rh_ip.py
wikimedia/operations-debs-salt
be6342abc7401ff92f67ed59f7834f1359f35314
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' The networking module for RHEL/Fedora based distros ''' # Import python libs import logging import os.path import os import StringIO # Import third party libs import jinja2 import jinja2.exceptions # Import salt libs import salt.utils import salt.utils.templates import salt.utils.validate...
30.699535
117
0.597146
import logging import os.path import os import StringIO import jinja2 import jinja2.exceptions import salt.utils import salt.utils.templates import salt.utils.validate.net log = logging.getLogger(__name__) JINJA = jinja2.Environment( loader=jinja2.FileSystemLoader( os.path.join(salt.utils.templat...
true
true
f738d5716ac500af9359849c11832bf0363239e6
991
py
Python
problems/predictingofficespaceprice/submissions/accepted/stefan2.py
stoman/CompetitiveProgramming
0000b64369b50e31c6f48939e837bdf6cece8ce4
[ "MIT" ]
2
2020-12-22T13:21:25.000Z
2021-12-12T22:26:26.000Z
problems/predictingofficespaceprice/submissions/accepted/stefan2.py
stoman/CompetitiveProgramming
0000b64369b50e31c6f48939e837bdf6cece8ce4
[ "MIT" ]
null
null
null
problems/predictingofficespaceprice/submissions/accepted/stefan2.py
stoman/CompetitiveProgramming
0000b64369b50e31c6f48939e837bdf6cece8ce4
[ "MIT" ]
null
null
null
#!/usr/bin/env python2 #Author: Stefan Toman import itertools import numpy as np from operator import mul from sklearn.linear_model import LinearRegression if __name__ == '__main__': #read input f, n = map(int, raw_input().split()) X = [] y = [] for _ in range(n): line = raw_input().split...
30.030303
85
0.572149
import itertools import numpy as np from operator import mul from sklearn.linear_model import LinearRegression if __name__ == '__main__': f, n = map(int, raw_input().split()) X = [] y = [] for _ in range(n): line = raw_input().split() X.append([float(x) for x in line[:-1]]) ...
true
true
f738d5b0215c5883ba81ab9a0ea08660d6114dd6
584
py
Python
examples/plotting/server/iris.py
rothnic/bokeh
8da5e16b260a75caa8e7ef4caf215bb93dd784db
[ "BSD-3-Clause" ]
1
2015-07-17T13:57:01.000Z
2015-07-17T13:57:01.000Z
examples/plotting/server/iris.py
evidation-health/bokeh
2c580d93419033b962d36e3c46d7606cc2f24606
[ "BSD-3-Clause" ]
null
null
null
examples/plotting/server/iris.py
evidation-health/bokeh
2c580d93419033b962d36e3c46d7606cc2f24606
[ "BSD-3-Clause" ]
1
2016-03-18T03:01:59.000Z
2016-03-18T03:01:59.000Z
# The plot server must be running # Go to http://localhost:5006/bokeh to view this plot from bokeh.sampledata.iris import flowers from bokeh.plotting import figure, show, output_server colormap = {'setosa': 'red', 'versicolor': 'green', 'virginica': 'blue'} flowers['color'] = flowers['species'].map(lambda x: colormap...
30.736842
72
0.715753
from bokeh.sampledata.iris import flowers from bokeh.plotting import figure, show, output_server colormap = {'setosa': 'red', 'versicolor': 'green', 'virginica': 'blue'} flowers['color'] = flowers['species'].map(lambda x: colormap[x]) output_server("iris") p = figure(title = "Iris Morphology") p.xaxis.axis_label ...
true
true
f738d5eb525196b32ef354d702e313f16b6ed068
1,464
py
Python
binarytree.py
sanofi2104/algorithms
a331a143aa51837df876b93993e1e1930d823331
[ "MIT" ]
1
2015-10-11T11:54:07.000Z
2015-10-11T11:54:07.000Z
binarytree.py
sanofi2104/algorithms
a331a143aa51837df876b93993e1e1930d823331
[ "MIT" ]
null
null
null
binarytree.py
sanofi2104/algorithms
a331a143aa51837df876b93993e1e1930d823331
[ "MIT" ]
null
null
null
import Queue class binary_node(object): def __init__(self, _value): self.value = _value self.left = None self.right = None ''' Breadth-First search ''' def breadth_first(_tree): if not _tree: return False result = [] queue = Queue.Queue() queue.put(_tree)...
18.531646
44
0.594262
import Queue class binary_node(object): def __init__(self, _value): self.value = _value self.left = None self.right = None def breadth_first(_tree): if not _tree: return False result = [] queue = Queue.Queue() queue.put(_tree) while not queue.empty()...
true
true
f738d63d673034757db9e2a842b937dc2fff5775
8,276
py
Python
azure-cosmosdb-table/azure/cosmosdb/table/sharedaccesssignature.py
bluca/azure-cosmos-table-python
25e99050f93b1f76f19bbd2534502955d0247aac
[ "Apache-2.0" ]
20
2018-10-03T04:36:03.000Z
2021-10-03T09:01:05.000Z
azure-cosmosdb-table/azure/cosmosdb/table/sharedaccesssignature.py
bluca/azure-cosmos-table-python
25e99050f93b1f76f19bbd2534502955d0247aac
[ "Apache-2.0" ]
25
2018-12-13T15:31:06.000Z
2021-12-13T19:29:36.000Z
azure-cosmosdb-table/azure/cosmosdb/table/sharedaccesssignature.py
bluca/azure-cosmos-table-python
25e99050f93b1f76f19bbd2534502955d0247aac
[ "Apache-2.0" ]
16
2019-01-19T09:04:26.000Z
2021-09-10T19:05:35.000Z
# ------------------------------------------------------------------------- # Copyright (c) Microsoft. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apa...
47.83815
110
0.666989
from azure.cosmosdb.table.common._common_conversion import ( _sign_string, ) from azure.cosmosdb.table.common.sharedaccesssignature import ( SharedAccessSignature, _SharedAccessHelper, _QueryStringConstants, ) from ._constants import X_MS_VERSION class TableSharedAccessSignature(SharedA...
true
true
f738d6c9152aaf0bc30172d9c59308cf84ce2746
2,011
py
Python
21-fs-ias-lec/16-nicknames-forward/subChat/Colorize.py
paultroeger/BACnet
855b931f2a0e9b64e9571f41de2a8cd71d7a01f4
[ "MIT" ]
8
2020-03-17T21:12:18.000Z
2021-12-12T15:55:54.000Z
21-fs-ias-lec/16-nicknames-forward/subChat/Colorize.py
paultroeger/BACnet
855b931f2a0e9b64e9571f41de2a8cd71d7a01f4
[ "MIT" ]
2
2021-07-19T06:18:43.000Z
2022-02-10T12:17:58.000Z
21-fs-ias-lec/16-nicknames-forward/subChat/Colorize.py
paultroeger/BACnet
855b931f2a0e9b64e9571f41de2a8cd71d7a01f4
[ "MIT" ]
25
2020-03-20T09:32:45.000Z
2021-07-18T18:12:59.000Z
#version 15:38 import random import string #name = 'zzz' set_off = 23 def convert(name): for i in range(len(name)): if name[i].lower() == 'i' or name[i].lower() == 'y' or name[i].lower() == '9': name = list(name) name[i] = 'g' name = ''.join(name) ...
38.673077
401
0.558429
import random import string set_off = 23 def convert(name): for i in range(len(name)): if name[i].lower() == 'i' or name[i].lower() == 'y' or name[i].lower() == '9': name = list(name) name[i] = 'g' name = ''.join(name) indx = 0 c=0 w...
true
true
f738d788b59babbab994d85a7f5b2804becccbe1
14,640
py
Python
tests/integration/conftest.py
linsicai/peloton
4706ce094432f8fcdacdf7d8045a4aaa7f5259af
[ "Apache-2.0" ]
null
null
null
tests/integration/conftest.py
linsicai/peloton
4706ce094432f8fcdacdf7d8045a4aaa7f5259af
[ "Apache-2.0" ]
null
null
null
tests/integration/conftest.py
linsicai/peloton
4706ce094432f8fcdacdf7d8045a4aaa7f5259af
[ "Apache-2.0" ]
null
null
null
import logging import os import pytest import time import grpc import requests from docker import Client from tools.minicluster.main import setup, teardown, config as mc_config from tools.minicluster.minicluster import run_mesos_agent, teardown_mesos_agent from host import start_maintenance, complete_maintenance, wait...
26.961326
81
0.647746
import logging import os import pytest import time import grpc import requests from docker import Client from tools.minicluster.main import setup, teardown, config as mc_config from tools.minicluster.minicluster import run_mesos_agent, teardown_mesos_agent from host import start_maintenance, complete_maintenance, wait...
true
true
f738daab38d0ea2df36ed71b54b64b00c4cdf066
2,876
py
Python
google/cloud/securitycenter/v1/securitycenter-v1-py/google/cloud/securitycenter_v1/types/source.py
googleapis/googleapis-gen
d84824c78563d59b0e58d5664bfaa430e9ad7e7a
[ "Apache-2.0" ]
7
2021-02-21T10:39:41.000Z
2021-12-07T07:31:28.000Z
google/cloud/securitycenter/v1/securitycenter-v1-py/google/cloud/securitycenter_v1/types/source.py
googleapis/googleapis-gen
d84824c78563d59b0e58d5664bfaa430e9ad7e7a
[ "Apache-2.0" ]
6
2021-02-02T23:46:11.000Z
2021-11-15T01:46:02.000Z
google/cloud/securitycenter/v1/securitycenter-v1-py/google/cloud/securitycenter_v1/types/source.py
googleapis/googleapis-gen
d84824c78563d59b0e58d5664bfaa430e9ad7e7a
[ "Apache-2.0" ]
4
2021-01-28T23:25:45.000Z
2021-08-30T01:55:16.000Z
# -*- 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
34.238095
86
0.645688
import proto __protobuf__ = proto.module( package='google.cloud.securitycenter.v1', manifest={ 'Source', }, ) class Source(proto.Message): name = proto.Field( proto.STRING, number=1, ) display_name = proto.Field( proto.STRING, number=...
true
true
f738db5484d20dc4c77a6d9f4274781afffe802a
5,607
py
Python
recip/network/messages/extensions/types/Account.py
anthonybuckle/Reciprocity-Core
3254073f44e8fe2222aed9879885a2e609d4044a
[ "MIT" ]
null
null
null
recip/network/messages/extensions/types/Account.py
anthonybuckle/Reciprocity-Core
3254073f44e8fe2222aed9879885a2e609d4044a
[ "MIT" ]
null
null
null
recip/network/messages/extensions/types/Account.py
anthonybuckle/Reciprocity-Core
3254073f44e8fe2222aed9879885a2e609d4044a
[ "MIT" ]
null
null
null
from recip.network.messages.extensions.ExtMessage import ExtMessage from recip.network.messages.extensions import ExtMessageType from recip.core.Account import Account as CoreAccount from recip.core import AccountType from recip.storage import Accounts from recip.util import Address from recip.util import Crypto from r...
38.142857
104
0.622258
from recip.network.messages.extensions.ExtMessage import ExtMessage from recip.network.messages.extensions import ExtMessageType from recip.core.Account import Account as CoreAccount from recip.core import AccountType from recip.storage import Accounts from recip.util import Address from recip.util import Crypto from r...
true
true
f738db80f9cc00ed7e5eb5f0b2d93c033d9219fc
6,378
py
Python
src/datasets/Fruits360/f360_dataset.py
JoseLuisRojasAranda/tfmodels
56dce0236f0cc03dd7031aecf305d470c9fb97a9
[ "MIT" ]
1
2020-06-05T23:25:03.000Z
2020-06-05T23:25:03.000Z
src/datasets/Fruits360/f360_dataset.py
JoseLuisRojasAranda/tfmodels
56dce0236f0cc03dd7031aecf305d470c9fb97a9
[ "MIT" ]
null
null
null
src/datasets/Fruits360/f360_dataset.py
JoseLuisRojasAranda/tfmodels
56dce0236f0cc03dd7031aecf305d470c9fb97a9
[ "MIT" ]
null
null
null
import tensorflow as tf import cv2 from glob import glob import sys import os from os import path import json import random from datasets.datasets_features import bytes_feature # Metodo que regresa el dataset de f360 ya procesado a tfrecord # Los data set tiene el formato: # x: tensor con la imagen normalizada # ...
31.418719
80
0.611007
import tensorflow as tf import cv2 from glob import glob import sys import os from os import path import json import random from datasets.datasets_features import bytes_feature def f360_load_dataset(path=None, resize=None, num_classes=None): train_path = "f360_train.tfrecord" test_path = "f360_test.tfr...
true
true
f738dc133f66e48df7c43829949098c52214b42c
256
py
Python
src/airfly/_vendor/airflow/decorators/python.py
ryanchao2012/airfly
230ddd88885defc67485fa0c51f66c4a67ae98a9
[ "MIT" ]
7
2021-09-27T11:38:48.000Z
2022-02-01T06:06:24.000Z
src/airfly/_vendor/airflow/decorators/python.py
ryanchao2012/airfly
230ddd88885defc67485fa0c51f66c4a67ae98a9
[ "MIT" ]
null
null
null
src/airfly/_vendor/airflow/decorators/python.py
ryanchao2012/airfly
230ddd88885defc67485fa0c51f66c4a67ae98a9
[ "MIT" ]
null
null
null
# Auto generated by 'inv collect-airflow' from airfly._vendor.airflow.decorators.base import DecoratedOperator from airfly._vendor.airflow.operators.python import PythonOperator class _PythonDecoratedOperator(DecoratedOperator, PythonOperator): pass
32
68
0.84375
from airfly._vendor.airflow.decorators.base import DecoratedOperator from airfly._vendor.airflow.operators.python import PythonOperator class _PythonDecoratedOperator(DecoratedOperator, PythonOperator): pass
true
true
f738dc15aae4bc9e8704d6dc10a845408ad63b2e
1,759
py
Python
src/main/python/pybuilder/_vendor/virtualenv/seed/wheels/embed/__init__.py
arcivanov/pybuilder
419dd58cf52b1547ca1044e8e1f6b9faa47fadec
[ "Apache-2.0" ]
null
null
null
src/main/python/pybuilder/_vendor/virtualenv/seed/wheels/embed/__init__.py
arcivanov/pybuilder
419dd58cf52b1547ca1044e8e1f6b9faa47fadec
[ "Apache-2.0" ]
6
2021-09-05T06:00:20.000Z
2021-11-07T08:26:55.000Z
src/main/python/pybuilder/_vendor/virtualenv/seed/wheels/embed/__init__.py
ufo2011/pybuilder
9cb589c11f743e4f9e3a9051184471206b1d7c3b
[ "Apache-2.0" ]
1
2020-02-22T05:25:50.000Z
2020-02-22T05:25:50.000Z
from __future__ import absolute_import, unicode_literals from ..util import Wheel from ....util.path import Path BUNDLE_FOLDER = Path(__file__).absolute().parent BUNDLE_SUPPORT = { "3.10": { "pip": "pip-21.3.1-py3-none-any.whl", "setuptools": "setuptools-58.3.0-py3-none-any.whl", "wheel": ...
30.327586
108
0.572484
from __future__ import absolute_import, unicode_literals from ..util import Wheel from ....util.path import Path BUNDLE_FOLDER = Path(__file__).absolute().parent BUNDLE_SUPPORT = { "3.10": { "pip": "pip-21.3.1-py3-none-any.whl", "setuptools": "setuptools-58.3.0-py3-none-any.whl", "wheel": ...
true
true
f738dc24263c0009dbd5d4831b0b1b62ca5c82ef
309
py
Python
05/5.5.py
abe-101/ThinkPython-2
bcebb1e9b3cc63c403f59c3cc0f33017bb017363
[ "MIT" ]
1
2021-12-16T16:46:47.000Z
2021-12-16T16:46:47.000Z
05/5.5.py
abe-101/ThinkPython-2
bcebb1e9b3cc63c403f59c3cc0f33017bb017363
[ "MIT" ]
null
null
null
05/5.5.py
abe-101/ThinkPython-2
bcebb1e9b3cc63c403f59c3cc0f33017bb017363
[ "MIT" ]
null
null
null
#!/usr/bin/python3 import turtle def draw(t, length, n): if n == 0: return angle = 50 t.fd(length*n) t.lt(angle) draw(t, length, n-1) t.rt(2*angle) draw(t, length, n-1) t.lt(angle) t.bk(length*n) bob = turtle.Turtle() print(bob) draw(bob, 7, 5) turtle.mainloop()
15.45
24
0.563107
import turtle def draw(t, length, n): if n == 0: return angle = 50 t.fd(length*n) t.lt(angle) draw(t, length, n-1) t.rt(2*angle) draw(t, length, n-1) t.lt(angle) t.bk(length*n) bob = turtle.Turtle() print(bob) draw(bob, 7, 5) turtle.mainloop()
true
true
f738dc71bfd7d43ffae7f7d4c2c4ec1081620eff
890
py
Python
tests/test_html_escaping.py
PureDreamer/lms
4e4c2030f4f51a552e1fbfe82c16dc837e95310c
[ "BSD-3-Clause" ]
85
2020-03-21T18:52:57.000Z
2022-03-22T06:33:38.000Z
tests/test_html_escaping.py
PureDreamer/lms
4e4c2030f4f51a552e1fbfe82c16dc837e95310c
[ "BSD-3-Clause" ]
210
2020-03-21T22:44:57.000Z
2022-01-06T22:47:50.000Z
tests/test_html_escaping.py
PureDreamer/lms
4e4c2030f4f51a552e1fbfe82c16dc837e95310c
[ "BSD-3-Clause" ]
27
2020-03-31T13:57:33.000Z
2022-03-06T15:57:32.000Z
from flask import json from lms.lmsdb.models import Solution, User from tests import conftest USER_COMMENT_BEFORE_ESCAPING = '<html><body><p>Welcome "LMS"</p></body></html>' USER_COMMENT_AFTER_ESCAPING = ( '&lt;html&gt;&lt;body&gt;&lt;p&gt;Welcome &quot;LMS&quot;' '&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;' ) c...
35.6
79
0.689888
from flask import json from lms.lmsdb.models import Solution, User from tests import conftest USER_COMMENT_BEFORE_ESCAPING = '<html><body><p>Welcome "LMS"</p></body></html>' USER_COMMENT_AFTER_ESCAPING = ( '&lt;html&gt;&lt;body&gt;&lt;p&gt;Welcome &quot;LMS&quot;' '&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;' ) c...
true
true
f738dce996b7b83b3e2c5c20eda0dab44a0f28d3
64
py
Python
numbers.py
Arif8099/myNewRepository
7fe087a5fa0ce6b81238c0a2a1229cc30ac21aa7
[ "MIT" ]
null
null
null
numbers.py
Arif8099/myNewRepository
7fe087a5fa0ce6b81238c0a2a1229cc30ac21aa7
[ "MIT" ]
null
null
null
numbers.py
Arif8099/myNewRepository
7fe087a5fa0ce6b81238c0a2a1229cc30ac21aa7
[ "MIT" ]
null
null
null
for i in range(1,11): print(str(i)) print(list(range(1,11)))
12.8
24
0.625
for i in range(1,11): print(str(i)) print(list(range(1,11)))
true
true
f738dd6ff6034d08207c1bcd65c39091e0e5c9fb
6,621
py
Python
src/kestrel/codegen/pattern.py
vincentywdeng/kestrel-lang
91e61c179bef433f5dc2e9fb6edf184d38ae6173
[ "Apache-2.0" ]
119
2021-06-04T15:40:10.000Z
2022-03-24T09:56:53.000Z
src/kestrel/codegen/pattern.py
vincentywdeng/kestrel-lang
91e61c179bef433f5dc2e9fb6edf184d38ae6173
[ "Apache-2.0" ]
76
2021-06-04T15:06:10.000Z
2022-03-20T21:03:13.000Z
src/kestrel/codegen/pattern.py
vincentywdeng/kestrel-lang
91e61c179bef433f5dc2e9fb6edf184d38ae6173
[ "Apache-2.0" ]
28
2021-06-05T07:27:15.000Z
2022-01-20T18:43:47.000Z
import dateutil.parser import datetime import logging import re from kestrel.utils import dedup_dicts from kestrel.semantics import get_entity_table from kestrel.syntax.paramstix import parse_extended_stix_pattern from kestrel.exceptions import ( InvalidAttribute, UnsupportedStixSyntax, KestrelInternalErro...
33.105
87
0.622414
import dateutil.parser import datetime import logging import re from kestrel.utils import dedup_dicts from kestrel.semantics import get_entity_table from kestrel.syntax.paramstix import parse_extended_stix_pattern from kestrel.exceptions import ( InvalidAttribute, UnsupportedStixSyntax, KestrelInternalErro...
true
true
f738ddd9c66d2ab195c75e9d45d2b52105e9e45c
10,263
py
Python
systolic/test/SystolicCL_test.py
pnnl/open-cgra
c19bc3a1baca3da659dc8f3cbfe32dd6003a2c65
[ "BSD-3-Clause" ]
13
2020-09-01T16:55:42.000Z
2021-09-01T16:39:44.000Z
systolic/test/SystolicCL_test.py
pnnl/open-cgra
c19bc3a1baca3da659dc8f3cbfe32dd6003a2c65
[ "BSD-3-Clause" ]
5
2020-08-19T05:40:01.000Z
2021-07-15T22:05:03.000Z
systolic/test/SystolicCL_test.py
pnnl/open-cgra
c19bc3a1baca3da659dc8f3cbfe32dd6003a2c65
[ "BSD-3-Clause" ]
4
2020-09-01T16:44:02.000Z
2021-07-11T04:40:05.000Z
""" ========================================================================== SystolicCL_test.py ========================================================================== Test cases for Systolic Array with CL data/config memory. Author : Cheng Tan Date : Dec 28, 2019 """ from pymtl3 import ...
48.871429
102
0.518952
from pymtl3 import * from pymtl3.stdlib.test import TestSinkCL from pymtl3.stdlib.test.test_srcs import TestSrcRTL from ...lib.opt_type import * from ...lib.messages import * from ...lib.ctrl_helper import * from ...fu.flexible.FlexibleFuRTL import ...
true
true
f738df852121a8d04e083354e6672df79a7edc21
1,216
py
Python
Attic/migrations/0002_auto_20210508_1848.py
RemeoLong/Attic
8d9458b86a924b639001fe0bee052ba5be66dbce
[ "MIT" ]
null
null
null
Attic/migrations/0002_auto_20210508_1848.py
RemeoLong/Attic
8d9458b86a924b639001fe0bee052ba5be66dbce
[ "MIT" ]
null
null
null
Attic/migrations/0002_auto_20210508_1848.py
RemeoLong/Attic
8d9458b86a924b639001fe0bee052ba5be66dbce
[ "MIT" ]
null
null
null
# Generated by Django 2.2.16 on 2021-05-08 23:48 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('Attic', '0001_initial'), ] operations = [ migrations.AlterField( model_name='consultation', name='service', ...
50.666667
593
0.602796
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('Attic', '0001_initial'), ] operations = [ migrations.AlterField( model_name='consultation', name='service', field=models.CharField(choices=[('Pest: Mic...
true
true
f738e02e16d4fecbf7e5a9e653b312bc74d74d3a
903
py
Python
home_work/lesson6/ModuleCounter.py
JayIvhen/StudyRepoPython2014
96affa9b3d5cb342d9c9ef8582610c9d7a0e7f5d
[ "Unlicense" ]
1
2018-10-11T09:48:30.000Z
2018-10-11T09:48:30.000Z
home_work/lesson6/ModuleCounter.py
JayIvhen/StudyRepoPython2014
96affa9b3d5cb342d9c9ef8582610c9d7a0e7f5d
[ "Unlicense" ]
null
null
null
home_work/lesson6/ModuleCounter.py
JayIvhen/StudyRepoPython2014
96affa9b3d5cb342d9c9ef8582610c9d7a0e7f5d
[ "Unlicense" ]
null
null
null
#!usr\bin\python """SubModule counter""" #count how many objects of module are modules themselfs __author__ = "JayIvhen" def u_input(): pass def u_count(name): a = 0 try: module = __import__(name) for i in dir(module): try: print i, print typ...
28.21875
118
0.528239
"""SubModule counter""" __author__ = "JayIvhen" def u_input(): pass def u_count(name): a = 0 try: module = __import__(name) for i in dir(module): try: print i, print type(eval('module' + '.{}'.format(i))) if "module" in str(...
false
true
f738e07889769bc26b37aa793f9905064e6a4642
6,970
py
Python
databricks_cli/pipelines/api.py
itaiw/databricks-cli
fdcb92499da5cda90c4436d5f09cdc697a8f46b9
[ "Apache-2.0" ]
null
null
null
databricks_cli/pipelines/api.py
itaiw/databricks-cli
fdcb92499da5cda90c4436d5f09cdc697a8f46b9
[ "Apache-2.0" ]
null
null
null
databricks_cli/pipelines/api.py
itaiw/databricks-cli
fdcb92499da5cda90c4436d5f09cdc697a8f46b9
[ "Apache-2.0" ]
null
null
null
# Databricks CLI # Copyright 2017 Databricks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"), except # that the use of services to which certain application programming # interfaces (each, an "API") connect requires that the user first obtain # a license for the use of the APIs from Databricks,...
41
100
0.649785
from hashlib import sha1 import os from six.moves import urllib from databricks_cli.sdk import DeltaPipelinesService from databricks_cli.dbfs.api import DbfsApi from databricks_cli.dbfs.dbfs_path import DbfsPath BUFFER_SIZE = 1024 * 64 base_pipelines_dir = 'dbfs:/pipelines/code' supported_lib...
true
true
f738e07fab3be3ad49fc0d2c35aa572ce82c17c9
3,616
py
Python
amical/_cli/commands/clean.py
tomasstolker/AMICAL
c9bbf8e4a468313efff3b349fffea7648c411a51
[ "MIT" ]
null
null
null
amical/_cli/commands/clean.py
tomasstolker/AMICAL
c9bbf8e4a468313efff3b349fffea7648c411a51
[ "MIT" ]
null
null
null
amical/_cli/commands/clean.py
tomasstolker/AMICAL
c9bbf8e4a468313efff3b349fffea7648c411a51
[ "MIT" ]
null
null
null
import os from datetime import datetime from glob import glob from pathlib import Path from astropy.io import fits from matplotlib import pyplot as plt from tabulate import tabulate from termcolor import cprint from tqdm import tqdm import amical def _select_data_file(args, process): """Show report with the dat...
30.386555
109
0.589878
import os from datetime import datetime from glob import glob from pathlib import Path from astropy.io import fits from matplotlib import pyplot as plt from tabulate import tabulate from termcolor import cprint from tqdm import tqdm import amical def _select_data_file(args, process): l_file = sorted(glob("%s/*....
true
true
f738e084271100fae4934591514291316a9bafdd
1,500
py
Python
ui/mext.py
szymonkaliski/nott
fa85e64b570f71733ea199dddbd0bc0f013a613b
[ "MIT" ]
25
2019-07-01T14:58:48.000Z
2021-11-13T17:00:44.000Z
ui/mext.py
szymonkaliski/nott
fa85e64b570f71733ea199dddbd0bc0f013a613b
[ "MIT" ]
6
2019-12-30T02:50:19.000Z
2021-05-10T16:41:47.000Z
ui/mext.py
szymonkaliski/nott
fa85e64b570f71733ea199dddbd0bc0f013a613b
[ "MIT" ]
2
2020-01-05T13:02:07.000Z
2020-05-21T15:54:57.000Z
# FIXME: fix all "happy paths coding" issues import liblo from threading import Thread class Mext(object): device = None def __init__(self, device_port=5000): self.device_receiver = liblo.ServerThread(device_port) self.device_receiver.add_method("/monome/grid/key", "iii", self.on_grid_key) ...
26.315789
85
0.544
import liblo from threading import Thread class Mext(object): device = None def __init__(self, device_port=5000): self.device_receiver = liblo.ServerThread(device_port) self.device_receiver.add_method("/monome/grid/key", "iii", self.on_grid_key) self.device_receiver.add_method( ...
true
true
f738e0bea76b5ce7f1a12a4e6443af286201917a
33,549
py
Python
src/at/utils/_vendor/tomlkit/items.py
alextremblay/si-utils
1377ffd9dbefe63ac51efcca638fb583b2c89628
[ "MIT" ]
1
2021-08-21T03:26:14.000Z
2021-08-21T03:26:14.000Z
src/at/utils/_vendor/tomlkit/items.py
alextremblay/si-utils
1377ffd9dbefe63ac51efcca638fb583b2c89628
[ "MIT" ]
null
null
null
src/at/utils/_vendor/tomlkit/items.py
alextremblay/si-utils
1377ffd9dbefe63ac51efcca638fb583b2c89628
[ "MIT" ]
null
null
null
from __future__ import unicode_literals import re import string from datetime import date from datetime import datetime from datetime import time from enum import Enum from typing import Any from typing import Dict from typing import Generator from typing import List from typing import Optional from typing import Uni...
25.186937
108
0.534442
from __future__ import unicode_literals import re import string from datetime import date from datetime import datetime from datetime import time from enum import Enum from typing import Any from typing import Dict from typing import Generator from typing import List from typing import Optional from typing import Uni...
true
true
f738e33442f8fe750877550660aea02e805f4126
646
py
Python
winlib/pyreadline/__init__.py
netsec/pytan
29a3484d21cb90d8896275febd1c535e4f3cdc7e
[ "MIT" ]
1
2019-01-29T21:22:06.000Z
2019-01-29T21:22:06.000Z
winlib/pyreadline/__init__.py
c1rdan/pytan
5e537a6dcf4136e3b9c3905a39f073396e7f044f
[ "MIT" ]
null
null
null
winlib/pyreadline/__init__.py
c1rdan/pytan
5e537a6dcf4136e3b9c3905a39f073396e7f044f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- #***************************************************************************** # Copyright (C) 2003-2006 Gary Bishop. # Copyright (C) 2006 Jorgen Stenarson. <jorgen.stenarson@bostream.nu> # # Distributed under the terms of the BSD License. The full license is in # the file ...
46.142857
79
0.544892
from __future__ import print_function, unicode_literals, absolute_import from . import unicode_helper, logger, clipboard, lineeditor, modes, console from .rlmain import * from . import rlmain
true
true
f738e52b4e0b5f53940c8f7c5d99b58167225f41
5,934
py
Python
trustlab/lab/scenarios/basic_scenario.py
ValentinSiegert/aTLAS
a2e7521447f81add83a0c958d61846a1cbfbbe9c
[ "MIT" ]
null
null
null
trustlab/lab/scenarios/basic_scenario.py
ValentinSiegert/aTLAS
a2e7521447f81add83a0c958d61846a1cbfbbe9c
[ "MIT" ]
null
null
null
trustlab/lab/scenarios/basic_scenario.py
ValentinSiegert/aTLAS
a2e7521447f81add83a0c958d61846a1cbfbbe9c
[ "MIT" ]
null
null
null
""" This file was auto-generated by an ObjectFactory of aTLAS """ NAME = 'Basic Scenario' AGENTS = ['A', 'B', 'C', 'D'] OBSERVATIONS = [{'authors': ['A'], 'before': [], 'details': {'content_trust.topics': ['Web Engineering'], 'uri': 'http://example.co...
47.472
92
0.422144
NAME = 'Basic Scenario' AGENTS = ['A', 'B', 'C', 'D'] OBSERVATIONS = [{'authors': ['A'], 'before': [], 'details': {'content_trust.topics': ['Web Engineering'], 'uri': 'http://example.com/Redecentralization_of_the_Web'}, 'message': 'Re...
true
true
f738e53dae0449ebfaecf3213895f97f66501890
1,148
py
Python
scripts/gen__dfd_pyx.py
jgukelberger/fdint
0237323d6fd5d4161190ff7982811d8ae290f89e
[ "BSD-3-Clause" ]
11
2015-10-25T18:51:55.000Z
2021-02-26T13:05:07.000Z
scripts/gen__dfd_pyx.py
jgukelberger/fdint
0237323d6fd5d4161190ff7982811d8ae290f89e
[ "BSD-3-Clause" ]
19
2015-04-23T19:41:20.000Z
2017-08-01T02:04:04.000Z
scripts/gen__dfd_pyx.py
jgukelberger/fdint
0237323d6fd5d4161190ff7982811d8ae290f89e
[ "BSD-3-Clause" ]
10
2017-05-31T07:27:16.000Z
2021-08-28T15:34:09.000Z
# Copyright (c) 2015, Scott J Maddox. All rights reserved. # Use of this source code is governed by the BSD-3-Clause # license that can be found in the LICENSE file. import os import sys fpath = os.path.abspath(os.path.join(os.path.dirname(__file__), '../fdint/_dfd.pyx')) with open...
31.888889
70
0.53223
import os import sys fpath = os.path.abspath(os.path.join(os.path.dirname(__file__), '../fdint/_dfd.pyx')) with open(fpath, 'w') as f: for i in range(-9,22,2)+range(0,21,2): a = str(i).replace('-','m') b = str(i+2).replace('-','m') c = (i+2)/2. ...
true
true
f738e6cb47bc1d908d59e53b6310543e27de90e0
14,855
py
Python
analysis/Only_GIFK_ABF.py
apayeur/GIF-K
36228dfe5ffc2cded3f3224e289bd60e6bc7b93c
[ "MIT" ]
1
2020-06-05T15:33:51.000Z
2020-06-05T15:33:51.000Z
analysis/Only_GIFK_ABF.py
apayeur/GIF-K
36228dfe5ffc2cded3f3224e289bd60e6bc7b93c
[ "MIT" ]
null
null
null
analysis/Only_GIFK_ABF.py
apayeur/GIF-K
36228dfe5ffc2cded3f3224e289bd60e6bc7b93c
[ "MIT" ]
null
null
null
from Experiment import * from GIF import * from GIF_K import * from AEC_Badel import * from Tools import * from Filter_Rect_LinSpaced import * from Filter_Rect_LogSpaced import * from Filter_Exps import * import matplotlib.pyplot as plt import numpy as np import copy import json import scipy from scipy import io i...
39.195251
145
0.63763
from Experiment import * from GIF import * from GIF_K import * from AEC_Badel import * from Tools import * from Filter_Rect_LinSpaced import * from Filter_Rect_LogSpaced import * from Filter_Exps import * import matplotlib.pyplot as plt import numpy as np import copy import json import scipy from scipy import io i...
false
true
f738e6f8d7b8453bcf33d0004fdbca2710d10727
463
py
Python
redditBotColorize/colorize_gif.py
ForeverRecompin/reddit_crawlers
e72b317dba5a8f2195de186f766192dfe873fbd4
[ "BSD-2-Clause" ]
422
2016-07-20T20:07:11.000Z
2022-02-22T18:58:11.000Z
redditBotColorize/colorize_gif.py
ForeverRecompin/reddit_crawlers
e72b317dba5a8f2195de186f766192dfe873fbd4
[ "BSD-2-Clause" ]
2
2016-08-05T15:20:04.000Z
2017-01-28T11:53:55.000Z
redditBotColorize/colorize_gif.py
ForeverRecompin/reddit_crawlers
e72b317dba5a8f2195de186f766192dfe873fbd4
[ "BSD-2-Clause" ]
61
2016-07-25T19:26:39.000Z
2021-12-17T17:23:06.000Z
import sys import cv2 import colorize import os colorize.loadDNN(False) gif_path = sys.argv[1] cam = cv2.VideoCapture(gif_path) counter = 0 while True: ret,img = cam.read() if not ret: break temp_img_path = '/tmp/%06d.jpg'%counter cv2.imwrite(temp_img_path,img) coloredImage = colorize.ru...
18.52
59
0.701944
import sys import cv2 import colorize import os colorize.loadDNN(False) gif_path = sys.argv[1] cam = cv2.VideoCapture(gif_path) counter = 0 while True: ret,img = cam.read() if not ret: break temp_img_path = '/tmp/%06d.jpg'%counter cv2.imwrite(temp_img_path,img) coloredImage = colorize.ru...
true
true
f738e719fb08c24a6742e31d1ec58bb25023459d
11,535
py
Python
dashboard/lib/flanker/addresslib/_parser/mailbox_or_url_parsetab.py
robertsimmons514/isthislegit
aa8f2b6cb2ac3de2b0fe03bb93dbceccc4c1f495
[ "BSD-3-Clause" ]
929
2015-01-01T11:14:21.000Z
2022-03-28T23:47:40.000Z
dashboard/lib/flanker/addresslib/_parser/mailbox_or_url_parsetab.py
robertsimmons514/isthislegit
aa8f2b6cb2ac3de2b0fe03bb93dbceccc4c1f495
[ "BSD-3-Clause" ]
141
2015-01-10T19:02:03.000Z
2021-07-26T18:04:14.000Z
dashboard/lib/flanker/addresslib/_parser/mailbox_or_url_parsetab.py
robertsimmons514/isthislegit
aa8f2b6cb2ac3de2b0fe03bb93dbceccc4c1f495
[ "BSD-3-Clause" ]
179
2015-01-01T18:42:46.000Z
2022-02-16T21:57:14.000Z
# mailbox_or_url_parsetab.py # This file is automatically generated. Do not edit. _tabversion = '3.10' _lr_method = 'LALR' _lr_signature = 'mailbox_or_urlFWSP AT DOT COMMA SEMICOLON LANGLE RANGLE ATOM DOT_ATOM LBRACKET RBRACKET DTEXT DQUOTE QTEXT QPAIR LPAREN RPAREN CTEXT URLmailbox_or_url_list : mailbox_or_url_list...
126.758242
2,514
0.638231
_tabversion = '3.10' _lr_method = 'LALR' _lr_signature = 'mailbox_or_urlFWSP AT DOT COMMA SEMICOLON LANGLE RANGLE ATOM DOT_ATOM LBRACKET RBRACKET DTEXT DQUOTE QTEXT QPAIR LPAREN RPAREN CTEXT URLmailbox_or_url_list : mailbox_or_url_list delim mailbox_or_url\n | mailbox_or_url_list delim\n ...
true
true
f738e78252750acaa726dff41bb06d29194b1d5d
1,556
py
Python
2018/7/7.py
kristianwiklund/AOC2019
a98affaccd53ca4ea2d3a8c3fa125680f1e8cc08
[ "MIT" ]
3
2020-12-02T18:18:05.000Z
2021-12-03T18:39:26.000Z
2018/7/7.py
kristianwiklund/AOC2019
a98affaccd53ca4ea2d3a8c3fa125680f1e8cc08
[ "MIT" ]
null
null
null
2018/7/7.py
kristianwiklund/AOC2019
a98affaccd53ca4ea2d3a8c3fa125680f1e8cc08
[ "MIT" ]
null
null
null
import networkx as nx import matplotlib.pyplot as plt G = nx.DiGraph() #with open ("shortinput.txt") as fd: with open ("input.txt") as fd: for line in fd: x = line.split(" ") before = x[1] after = x[7] G.add_edge(before, after, weight=ord(after)-64) nx.draw(G, with_labels=True)...
24.3125
71
0.492288
import networkx as nx import matplotlib.pyplot as plt G = nx.DiGraph() with open ("input.txt") as fd: for line in fd: x = line.split(" ") before = x[1] after = x[7] G.add_edge(before, after, weight=ord(after)-64) nx.draw(G, with_labels=True) plt.savefig("maze.png") helalistan=...
true
true
f738e7edc1e0b3c55014c9a208313ddbb2ef668a
1,812
py
Python
api/main.py
MineiToshio/cryptongo
3cb1eddf45bf87a47a32597f7fa66eb8ac932f4a
[ "MIT" ]
2
2019-09-25T18:13:34.000Z
2020-02-13T16:54:13.000Z
api/main.py
MineiToshio/cryptongo
3cb1eddf45bf87a47a32597f7fa66eb8ac932f4a
[ "MIT" ]
null
null
null
api/main.py
MineiToshio/cryptongo
3cb1eddf45bf87a47a32597f7fa66eb8ac932f4a
[ "MIT" ]
null
null
null
import pymongo from flask import Flask, jsonify, request def get_db_connection(uri): client = pymongo.MongoClient(uri) return client.cryptongo app = Flask(__name__) db_connection = get_db_connection('mongodb://localhost:27017/') def get_documents(): params = {} name = request.args.get('name', '') ...
25.521127
88
0.587196
import pymongo from flask import Flask, jsonify, request def get_db_connection(uri): client = pymongo.MongoClient(uri) return client.cryptongo app = Flask(__name__) db_connection = get_db_connection('mongodb://localhost:27017/') def get_documents(): params = {} name = request.args.get('name', '') ...
true
true
f738e8009f71e7b6b6f5602de347597c0a56c06c
1,302
py
Python
node_modules/_npm@6.14.9@npm/node_modules/node-gyp/gyp/gyp_main.py
TT555666/cms-server
8b8302af597615501743042163504987fb27269e
[ "MIT" ]
1,666
2017-01-12T03:58:44.000Z
2017-08-20T23:39:20.000Z
node_modules/node-gyp/gyp/gyp_main.py
BABY636-Guarda-CRUX/cli
abdf52879fcf0e0f534ad977931f6935f5d1dce3
[ "Artistic-2.0" ]
95
2017-08-21T07:38:56.000Z
2022-02-18T21:59:54.000Z
node_modules/node-gyp/gyp/gyp_main.py
mtdev2/cli
d73879893ca7c1d0ce2b5fcb2364200955febfc0
[ "Artistic-2.0" ]
161
2017-08-25T20:20:01.000Z
2022-02-08T02:59:03.000Z
#!/usr/bin/env python # Copyright (c) 2009 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import sys import subprocess PY3 = bytes != str # Below IsCygwin() function copied from pylib/gyp/common.py def IsCygwin(): tr...
25.529412
77
0.672811
import os import sys import subprocess PY3 = bytes != str def IsCygwin(): try: out = subprocess.Popen("uname", stdout=subprocess.PIPE, stderr=subprocess.STDOUT) stdout, stderr = out.communicate() if PY3: stdout = stdout.decode("utf-8") return "CYGWIN" in str(stdo...
true
true
f738e865f19a3185e155cb3d9afeef9554d24a04
5,739
py
Python
data/anthro.py
WadhwaniAI/ESTRNN
4af8d53b0ebb1655c40aaf4f6950904580a34aa2
[ "MIT" ]
null
null
null
data/anthro.py
WadhwaniAI/ESTRNN
4af8d53b0ebb1655c40aaf4f6950904580a34aa2
[ "MIT" ]
null
null
null
data/anthro.py
WadhwaniAI/ESTRNN
4af8d53b0ebb1655c40aaf4f6950904580a34aa2
[ "MIT" ]
null
null
null
import os import random from os.path import join, basename, dirname import cv2 import numpy as np import torch from glob import glob import ipdb from torch.utils.data import Dataset, DataLoader from torchvision import transforms from utils import normalize, Crop, Flip, ToTensor class AnthroDeblurDataset(Dataset): ...
35.208589
124
0.600453
import os import random from os.path import join, basename, dirname import cv2 import numpy as np import torch from glob import glob import ipdb from torch.utils.data import Dataset, DataLoader from torchvision import transforms from utils import normalize, Crop, Flip, ToTensor class AnthroDeblurDataset(Dataset): ...
true
true
f738e8964def8ab2e2e98eee4038f5f125d6f96c
3,594
py
Python
myapp/DeepSegmentor/data/__init__.py
AbelardoDV/crack-detector
c8f1ecf6eb617f1078c9bdf0ef7af89d95ba33ed
[ "MIT" ]
6
2021-02-14T00:46:58.000Z
2022-03-25T10:50:26.000Z
myapp/DeepSegmentor/data/__init__.py
AbelardoDV/crack-detector
c8f1ecf6eb617f1078c9bdf0ef7af89d95ba33ed
[ "MIT" ]
null
null
null
myapp/DeepSegmentor/data/__init__.py
AbelardoDV/crack-detector
c8f1ecf6eb617f1078c9bdf0ef7af89d95ba33ed
[ "MIT" ]
6
2021-05-09T12:44:53.000Z
2022-03-17T00:02:10.000Z
"""This package includes all the modules related to data loading and preprocessing To add a custom dataset class called 'dummy', you need to add a file called 'dummy_dataset.py' and define a subclass 'DummyDataset' inherited from BaseDataset. You need to implement four functions: -- <__init__>: ...
38.234043
176
0.684474
import importlib import torch.utils.data from myapp.DeepSegmentor.data.base_dataset import BaseDataset def find_dataset_using_name(dataset_name): dataset_filename = "myapp.DeepSegmentor.data." + dataset_name + "_dataset" datasetlib = importlib.import_module(dataset_filename) dataset = None target_dat...
true
true
f738e8ef5f24e0b2ca574e60daacbd4ce87ebfab
3,472
py
Python
tests/test_reduce_memory.py
nagomiso/komono
3158dc14ebaee724defe63d54c214d40065558d7
[ "MIT" ]
null
null
null
tests/test_reduce_memory.py
nagomiso/komono
3158dc14ebaee724defe63d54c214d40065558d7
[ "MIT" ]
null
null
null
tests/test_reduce_memory.py
nagomiso/komono
3158dc14ebaee724defe63d54c214d40065558d7
[ "MIT" ]
null
null
null
import pandas as pd import pytest from pandas.testing import assert_frame_equal, assert_series_equal import komono.pandas._reduce_memory as rd @pytest.fixture def base_data(): return { "int8": [-128, 127], "int16": [-129, 127], "Int8": [None, 127], "Str": ["foo", "bar"], } @...
30.45614
73
0.604839
import pandas as pd import pytest from pandas.testing import assert_frame_equal, assert_series_equal import komono.pandas._reduce_memory as rd @pytest.fixture def base_data(): return { "int8": [-128, 127], "int16": [-129, 127], "Int8": [None, 127], "Str": ["foo", "bar"], } @...
true
true
f738e8f3c2ffddb15e62af6c07e36ec6aa5f61fb
1,782
py
Python
easy_dict/tests/test_04_mods.py
cahoy/NestedDictionary
881f0ea8af36a60fcd1b9d7a84b1aec4cd7072b2
[ "MIT" ]
2
2021-02-13T03:58:59.000Z
2021-09-15T01:02:12.000Z
easy_dict/tests/test_04_mods.py
cahoy/NestedDictionary
881f0ea8af36a60fcd1b9d7a84b1aec4cd7072b2
[ "MIT" ]
1
2017-01-12T00:18:38.000Z
2017-01-12T00:18:38.000Z
easy_dict/tests/test_04_mods.py
cahoy/NestedDictionary
881f0ea8af36a60fcd1b9d7a84b1aec4cd7072b2
[ "MIT" ]
1
2022-02-16T18:28:52.000Z
2022-02-16T18:28:52.000Z
from pytest import fixture, raises import easy_dict as nd @fixture() def n(): return nd.NestedDict({'a': {'b': {'c': 123}}, 'd': {'e': 456}, 'f': {'e': 789}}) def test_mod_rooted_chain(n): n['a']['b']['c'] = 234 assert n == {'a': {'b': {'c': 234}}, 'd': {'e': 456}, 'f': {'e': 789}} def test_mod_float...
27
95
0.442761
from pytest import fixture, raises import easy_dict as nd @fixture() def n(): return nd.NestedDict({'a': {'b': {'c': 123}}, 'd': {'e': 456}, 'f': {'e': 789}}) def test_mod_rooted_chain(n): n['a']['b']['c'] = 234 assert n == {'a': {'b': {'c': 234}}, 'd': {'e': 456}, 'f': {'e': 789}} def test_mod_float...
true
true
f738e8fe93b26fc4b1d67c654e45efdee0d4fc59
1,114
py
Python
app/service/auth/group_user.py
ryan4yin/flypy-backend
7fcc2971ac27d3b44e352dfed73acd12e1913d65
[ "MIT" ]
6
2019-03-14T02:39:17.000Z
2021-10-31T11:43:58.000Z
app/service/auth/group_user.py
ryan4yin/flypy-backend
7fcc2971ac27d3b44e352dfed73acd12e1913d65
[ "MIT" ]
null
null
null
app/service/auth/group_user.py
ryan4yin/flypy-backend
7fcc2971ac27d3b44e352dfed73acd12e1913d65
[ "MIT" ]
2
2020-02-04T07:44:37.000Z
2021-04-02T23:02:20.000Z
""" 群成员权限验证 """ from typing import Iterable, List from app import db from app.models import Group, GroupUser, MainUser, GroupUserRelation from app.utils.db import get_group def is_(role: List[str], main_user: MainUser, group_id, platform): """ 该用户是否是指定群组的管理员 需要用户先绑定群组! :param role: 群角色,可选 'admin' 或 '...
26.52381
96
0.691203
from typing import Iterable, List from app import db from app.models import Group, GroupUser, MainUser, GroupUserRelation from app.utils.db import get_group def is_(role: List[str], main_user: MainUser, group_id, platform): group = get_group(group_id, platform) group_users_id: Iterable[GroupUser.id] = ...
true
true
f738e9ae1be3a751cceefa326d7426a350d1e65f
7,573
py
Python
Pipelines/ADNI_AV1451/ADNI_V1_AV1451.py
sulantha2006/Processing_Pipeline
fb135560b7db79d811177cf02ee96e6081ce3364
[ "Apache-2.0" ]
1
2015-08-11T17:39:26.000Z
2015-08-11T17:39:26.000Z
Pipelines/ADNI_AV1451/ADNI_V1_AV1451.py
sulantha2006/Processing_Pipeline
fb135560b7db79d811177cf02ee96e6081ce3364
[ "Apache-2.0" ]
null
null
null
Pipelines/ADNI_AV1451/ADNI_V1_AV1451.py
sulantha2006/Processing_Pipeline
fb135560b7db79d811177cf02ee96e6081ce3364
[ "Apache-2.0" ]
2
2015-11-13T18:05:48.000Z
2020-01-17T17:28:08.000Z
__author__ = 'sulantha' from Utils.DbUtils import DbUtils import Config.PipelineConfig as pc from Pipelines.ADNI_T1.ADNI_T1_Helper import ADNI_T1_Helper from Utils.PipelineLogger import PipelineLogger import distutils.dir_util import distutils.file_util import shutil import subprocess from Manager.QSubJob import QSubJ...
57.80916
279
0.628549
__author__ = 'sulantha' from Utils.DbUtils import DbUtils import Config.PipelineConfig as pc from Pipelines.ADNI_T1.ADNI_T1_Helper import ADNI_T1_Helper from Utils.PipelineLogger import PipelineLogger import distutils.dir_util import distutils.file_util import shutil import subprocess from Manager.QSubJob import QSubJ...
true
true
f738ea5fe3f4affcffd0189bbf82496b2931a05e
1,893
py
Python
source/force.py
swyang50066/sun-jupiter-earth-orbit
c50012ff1a187485b717d86a24c25cfe6edd78a1
[ "MIT" ]
null
null
null
source/force.py
swyang50066/sun-jupiter-earth-orbit
c50012ff1a187485b717d86a24c25cfe6edd78a1
[ "MIT" ]
null
null
null
source/force.py
swyang50066/sun-jupiter-earth-orbit
c50012ff1a187485b717d86a24c25cfe6edd78a1
[ "MIT" ]
null
null
null
import numpy as np from allvar import * def _distance(r1, r2): """Return Euclidean _distance between positions""" return np.sqrt(np.sum((r1 - r2)**2.)) def drdt(r, v): """Return position derivative :param r: shape: (x_earth, y_earth, x_jupiter, y_jupiter)) :param v: shape: (vx_earth, vy_earth,...
28.253731
68
0.578975
import numpy as np from allvar import * def _distance(r1, r2): return np.sqrt(np.sum((r1 - r2)**2.)) def drdt(r, v): return v def dvdt(r, v, eps=1.e-20): r_se, r_sj, r_ej = r[:2], r[2:], r[2:] - r[:2] dist_se = _distance((0, 0), r_se) dist_sj = _distance((0, 0), r_sj) dist_ej = _dist...
true
true
f738eae3572e7241435ab4c22191359b1e9a5923
4,073
py
Python
tests/test_end2end.py
haojiepan1/CrossWOZ
6d7b4c4cfb73a528b76074764687906abecc90b6
[ "Apache-2.0" ]
1
2020-03-09T02:09:10.000Z
2020-03-09T02:09:10.000Z
tests/test_end2end.py
haojiepan1/CrossWOZ
6d7b4c4cfb73a528b76074764687906abecc90b6
[ "Apache-2.0" ]
null
null
null
tests/test_end2end.py
haojiepan1/CrossWOZ
6d7b4c4cfb73a528b76074764687906abecc90b6
[ "Apache-2.0" ]
null
null
null
from convlab2.nlu.svm.multiwoz import SVMNLU from convlab2.nlu.jointBERT.multiwoz import BERTNLU from convlab2.nlu.milu.multiwoz import MILU from convlab2.dst.rule.multiwoz import RuleDST from convlab2.policy.rule.multiwoz import RulePolicy from convlab2.nlg.template.multiwoz import TemplateNLG from convlab2.dialog_age...
35.417391
103
0.674687
from convlab2.nlu.svm.multiwoz import SVMNLU from convlab2.nlu.jointBERT.multiwoz import BERTNLU from convlab2.nlu.milu.multiwoz import MILU from convlab2.dst.rule.multiwoz import RuleDST from convlab2.policy.rule.multiwoz import RulePolicy from convlab2.nlg.template.multiwoz import TemplateNLG from convlab2.dialog_age...
true
true
f738eb6ca204ada7a97361995987942b2201b0e0
5,821
py
Python
legacy/brats/original_unet_train.py
zjdcts/CSAM-U-Net
91fae3c6b4fc7247ba9ee2dc6e64b51da569bf2e
[ "MIT" ]
1
2021-07-28T03:36:34.000Z
2021-07-28T03:36:34.000Z
legacy/brats/original_unet_train.py
zjdcts/CSAM-U-Net
91fae3c6b4fc7247ba9ee2dc6e64b51da569bf2e
[ "MIT" ]
null
null
null
legacy/brats/original_unet_train.py
zjdcts/CSAM-U-Net
91fae3c6b4fc7247ba9ee2dc6e64b51da569bf2e
[ "MIT" ]
1
2021-07-28T03:36:37.000Z
2021-07-28T03:36:37.000Z
import os import glob from legacy.unet3dlegacy.data import write_data_to_file, open_data_file from legacy.unet3dlegacy.generator import get_training_and_validation_generators from legacy.unet3dlegacy.model import unet_model_3d from legacy.unet3dlegacy.training import load_old_model, train_model config = dict() confi...
51.061404
119
0.706923
import os import glob from legacy.unet3dlegacy.data import write_data_to_file, open_data_file from legacy.unet3dlegacy.generator import get_training_and_validation_generators from legacy.unet3dlegacy.model import unet_model_3d from legacy.unet3dlegacy.training import load_old_model, train_model config = dict() confi...
true
true
f738ec615bbc59a200166241a693db04f8899803
1,074
py
Python
bin/test-object-detector.py
ririko-nakamura/HOG-SVM-python
5baa2d715b7c7a69a33328ef01f67d0af3c0b682
[ "MIT" ]
44
2018-12-07T09:44:36.000Z
2022-03-08T02:43:13.000Z
bin/test-object-detector.py
deng88598424/HOG-SVM-python
5baa2d715b7c7a69a33328ef01f67d0af3c0b682
[ "MIT" ]
5
2019-06-04T13:26:29.000Z
2021-12-28T15:27:06.000Z
bin/test-object-detector.py
deng88598424/HOG-SVM-python
5baa2d715b7c7a69a33328ef01f67d0af3c0b682
[ "MIT" ]
29
2019-01-17T07:36:35.000Z
2022-03-22T12:59:23.000Z
#!/usr/bin/python import os # Link to the UIUC Car Database # http://l2r.cs.uiuc.edu/~cogcomp/Data/Car/CarData.tar.gz # dataset_url = "http://l2r.cs.uiuc.edu/~cogcomp/Data/Car/CarData.tar.gz" # dataset_path = "../data/dataset/CarData.tar.gz" # Fetch and extract the dataset # if not os.path.exists(dataset_path): # ...
39.777778
109
0.699255
import os test_im_path = "../data/dataset/CarData/TestImages/test-18.pgm" os.system("python ../object-detector/test-classifier.py -i {} -d {}".format(test_im_path,2))
true
true
f738ecb6bc186b66228336eb1ee27467d2b2701a
1,241
py
Python
crudProj/crudProj/urls.py
Dishant15/simform-crud
93a02898f6dc5e8fa509f324a1e6d4137d7d26ad
[ "Apache-2.0" ]
null
null
null
crudProj/crudProj/urls.py
Dishant15/simform-crud
93a02898f6dc5e8fa509f324a1e6d4137d7d26ad
[ "Apache-2.0" ]
null
null
null
crudProj/crudProj/urls.py
Dishant15/simform-crud
93a02898f6dc5e8fa509f324a1e6d4137d7d26ad
[ "Apache-2.0" ]
null
null
null
"""crudProj URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.0/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-base...
35.457143
77
0.701048
from django.contrib import admin from django.urls import path from django.conf.urls import url, include from crudApp import views from django.conf.urls.static import static from django.conf import settings urlpatterns = [ path('admin/', admin.site.urls), url(r'^register/$', views.register, name='register'), ...
true
true
f738ed20226c816f2abe1cbbc4bdbd9d9c9c81d1
2,904
py
Python
tests/on_policy_models/test_on_policy_model.py
HenryJia/lightning-baselines3
10d1a0eed6136978204323250e37d49915a12e14
[ "MIT" ]
3
2021-01-18T23:27:38.000Z
2021-10-04T12:07:16.000Z
tests/on_policy_models/test_on_policy_model.py
HenryJia/lightning-baselines3
10d1a0eed6136978204323250e37d49915a12e14
[ "MIT" ]
8
2021-01-21T03:29:29.000Z
2021-07-25T18:45:39.000Z
tests/on_policy_models/test_on_policy_model.py
HenryJia/lightning-baselines3
10d1a0eed6136978204323250e37d49915a12e14
[ "MIT" ]
null
null
null
from collections import OrderedDict import pytest import gym from gym import spaces import torch from torch import nn import torch.nn.functional as F from torch import distributions import pytorch_lightning as pl from lightning_baselines3.on_policy_models.on_policy_model import OnPolicyModel class DummyModel(On...
30.893617
97
0.625
from collections import OrderedDict import pytest import gym from gym import spaces import torch from torch import nn import torch.nn.functional as F from torch import distributions import pytorch_lightning as pl from lightning_baselines3.on_policy_models.on_policy_model import OnPolicyModel class DummyModel(On...
true
true
f738ee018a1e60522d6b78e953990ae94a7f8ee5
13,942
py
Python
vsts/vsts/vss_client.py
mariusvniekerk/vsts-python-api
db69b3bdb08d926ff64239c3d651741a2ae4ea87
[ "MIT" ]
null
null
null
vsts/vsts/vss_client.py
mariusvniekerk/vsts-python-api
db69b3bdb08d926ff64239c3d651741a2ae4ea87
[ "MIT" ]
null
null
null
vsts/vsts/vss_client.py
mariusvniekerk/vsts-python-api
db69b3bdb08d926ff64239c3d651741a2ae4ea87
[ "MIT" ]
null
null
null
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
50.698182
121
0.632047
from __future__ import print_function import logging import os import re import uuid from msrest import Deserializer, Serializer from msrest.exceptions import DeserializationError, SerializationError from msrest.pipeline import ClientRequest from msrest.service_client import ServiceClient from .exceptions import...
true
true
f738ee35e34e271b4ca2586a8ae20de703c3c117
1,253
py
Python
tensorflow/mnist-for-ml-beginners/main.py
squaresurf/ml-playground
77e9f2f11838c630d95d8a1292730f6b29932207
[ "MIT" ]
1
2016-10-07T18:40:57.000Z
2016-10-07T18:40:57.000Z
tensorflow/mnist-for-ml-beginners/main.py
squaresurf/ml-playground
77e9f2f11838c630d95d8a1292730f6b29932207
[ "MIT" ]
null
null
null
tensorflow/mnist-for-ml-beginners/main.py
squaresurf/ml-playground
77e9f2f11838c630d95d8a1292730f6b29932207
[ "MIT" ]
null
null
null
#!/usr/bin/env python """MNIST Tutorial""" # pylint: disable=C0103 import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data mnist = input_data.read_data_sets("MNIST_data/", one_hot=True) def main(training_runs): """The basic model.""" x = tf.placeholder(tf.float32, [None, 784]) ...
29.833333
89
0.670391
"""MNIST Tutorial""" import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data mnist = input_data.read_data_sets("MNIST_data/", one_hot=True) def main(training_runs): """The basic model.""" x = tf.placeholder(tf.float32, [None, 784]) y_ = tf.placeholder(tf.float32, [None, 10])...
false
true
f738ee36d86611a0e4f64027426f2e2fee301bdd
1,505
py
Python
openapi/pagination/search.py
lendingblock/aio-openapi
cd274c618dfeb67c6e77b0293e6f5941e4c98f97
[ "BSD-3-Clause" ]
7
2018-05-22T16:15:32.000Z
2019-01-23T19:50:58.000Z
openapi/pagination/search.py
lendingblock/aio-openapi
cd274c618dfeb67c6e77b0293e6f5941e4c98f97
[ "BSD-3-Clause" ]
116
2018-05-17T21:55:02.000Z
2019-02-14T08:35:31.000Z
openapi/pagination/search.py
lendingblock/aio-openapi
cd274c618dfeb67c6e77b0293e6f5941e4c98f97
[ "BSD-3-Clause" ]
null
null
null
from dataclasses import dataclass from typing import Sequence from openapi.data.fields import str_field from openapi.utils import docjoin from .pagination import from_filters_and_dataclass class SearchVisitor: def apply_search(self, search: str, search_fields: Sequence[str]) -> None: raise NotImplemente...
28.942308
86
0.685714
from dataclasses import dataclass from typing import Sequence from openapi.data.fields import str_field from openapi.utils import docjoin from .pagination import from_filters_and_dataclass class SearchVisitor: def apply_search(self, search: str, search_fields: Sequence[str]) -> None: raise NotImplemente...
true
true
f738ee521433ce2b9bd1a33e489995858abb8aa1
670
py
Python
main/byacc/template.py
matu3ba/cports
deab766f255539c3679b78706ec4d194bc019dc9
[ "BSD-2-Clause" ]
46
2021-06-10T02:27:32.000Z
2022-03-27T11:33:24.000Z
main/byacc/template.py
matu3ba/cports
deab766f255539c3679b78706ec4d194bc019dc9
[ "BSD-2-Clause" ]
58
2021-07-03T13:58:20.000Z
2022-03-13T16:45:35.000Z
main/byacc/template.py
matu3ba/cports
deab766f255539c3679b78706ec4d194bc019dc9
[ "BSD-2-Clause" ]
6
2021-07-04T10:46:40.000Z
2022-01-09T00:03:59.000Z
pkgname = "byacc" pkgver = "20210808" pkgrel = 0 build_style = "gnu_configure" configure_args = ["--program-transform=s,^,b,"] pkgdesc = "Berkeley yacc, a LALR(1) parser generator" maintainer = "q66 <q66@chimera-linux.org>" license="custom:byacc" url = "http://invisible-island.net/byacc" source = f"ftp://ftp.invisible-...
35.263158
75
0.732836
pkgname = "byacc" pkgver = "20210808" pkgrel = 0 build_style = "gnu_configure" configure_args = ["--program-transform=s,^,b,"] pkgdesc = "Berkeley yacc, a LALR(1) parser generator" maintainer = "q66 <q66@chimera-linux.org>" license="custom:byacc" url = "http://invisible-island.net/byacc" source = f"ftp://ftp.invisible-...
true
true
f738ef03184ad63ad181d038e48b405d46e813a0
20,699
py
Python
temporal_evaluation.py
catherinekerr/ip-ensemble
a1ddcf0260d5a210dd55ae5faf015f3a8792c812
[ "Apache-2.0" ]
1
2020-07-25T10:55:21.000Z
2020-07-25T10:55:21.000Z
temporal_evaluation.py
jmarecek/ip-ensemble
9a867373ea1c99c746debdc9d7aa3a76e00b2005
[ "Apache-2.0" ]
1
2019-10-16T20:18:26.000Z
2019-10-16T20:18:26.000Z
temporal_evaluation.py
catherinekerr/ip-ensemble
a1ddcf0260d5a210dd55ae5faf015f3a8792c812
[ "Apache-2.0" ]
null
null
null
""" Evaluates systems that extract temporal information from text This code is licensed under the Apache License, Version 2.0. You may obtain a copy of this license in the LICENSE file in the root directory of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. Any modifications or derivative works o...
33.821895
133
0.655974
""" Evaluates systems that extract temporal information from text This code is licensed under the Apache License, Version 2.0. You may obtain a copy of this license in the LICENSE file in the root directory of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. Any modifications or derivative works o...
false
true
f738ef9698057d4e6f0320a579c6146780b82dba
584
py
Python
odds/common/utils.py
conrad-evans/sports_betting_api
baa80df5608c1cc244f51be86ba29eaabd8f031e
[ "MIT" ]
null
null
null
odds/common/utils.py
conrad-evans/sports_betting_api
baa80df5608c1cc244f51be86ba29eaabd8f031e
[ "MIT" ]
null
null
null
odds/common/utils.py
conrad-evans/sports_betting_api
baa80df5608c1cc244f51be86ba29eaabd8f031e
[ "MIT" ]
null
null
null
import secrets import time class Utils: _instance = None def __init__(self) -> None: pass @staticmethod def generateRandomId(): """ Generates a random hexicdecimal string Returns: `str`: string with hexidecimal values >>> """ toke...
18.83871
49
0.563356
import secrets import time class Utils: _instance = None def __init__(self) -> None: pass @staticmethod def generateRandomId(): token = secrets.token_hex() now = time.time() id = now + token return id @staticmethod def getInstance(re_init=False): ...
true
true
f738efd3cb1efcfae0696fc528784f0661c8331f
176
py
Python
tests/modules/imported/alias_classes.py
treeform/pystorm
3a2224bcdaccc5a2abf6a820c0bcf7afa3e6fed4
[ "MIT" ]
50
2015-03-24T19:45:34.000Z
2022-02-20T04:34:26.000Z
tests/modules/imported/alias_classes.py
dusty-phillips/pyjaco
066895ae38d1828498e529c1875cb88df6cbc54d
[ "MIT" ]
2
2017-02-26T09:43:07.000Z
2017-03-06T20:04:24.000Z
tests/modules/imported/alias_classes.py
Slater-Victoroff/pyjaco
89c4e3c46399c5023b0e160005d855a01241c58a
[ "MIT" ]
12
2016-03-07T09:30:49.000Z
2021-09-05T20:38:47.000Z
class spam: def __init__(self): self.msgtxt = "this is spam" def msg(self): print self.msgtxt if __name__ == '__main__': s = spam() s.msg()
13.538462
36
0.545455
class spam: def __init__(self): self.msgtxt = "this is spam" def msg(self): print self.msgtxt if __name__ == '__main__': s = spam() s.msg()
false
true
f738f3a02a6643116edf664e741054e24c835882
332
py
Python
sdk/python/pulumi_aws/ram/__init__.py
lemonade-hq/pulumi-aws
9ee22c65c7bad42d38b16879ccd56526d856a01a
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_aws/ram/__init__.py
lemonade-hq/pulumi-aws
9ee22c65c7bad42d38b16879ccd56526d856a01a
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_aws/ram/__init__.py
lemonade-hq/pulumi-aws
9ee22c65c7bad42d38b16879ccd56526d856a01a
[ "ECL-2.0", "Apache-2.0" ]
1
2021-03-08T15:05:29.000Z
2021-03-08T15:05:29.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** # Export this package's modules as members: from .principal_association import * from .resource_association import * from .resource_sha...
36.888889
87
0.740964
# Export this package's modules as members: from .principal_association import * from .resource_association import * from .resource_share import *
true
true
f738f4f4e9aaf552abff28f5e76349433a08aac1
396
py
Python
trio-stuff/interleaved_output.py
bmintz/python-snippets
982861c173bf4bcd5d908514a9e8b1914a580a5d
[ "CC0-1.0" ]
2
2018-11-12T10:33:13.000Z
2019-02-24T05:01:40.000Z
trio-stuff/interleaved_output.py
iomintz/python-snippets
982861c173bf4bcd5d908514a9e8b1914a580a5d
[ "CC0-1.0" ]
null
null
null
trio-stuff/interleaved_output.py
iomintz/python-snippets
982861c173bf4bcd5d908514a9e8b1914a580a5d
[ "CC0-1.0" ]
2
2018-11-24T08:16:59.000Z
2019-02-24T04:41:30.000Z
#!/usr/bin/env python3 import trio async def a(): print('enter a') await trio.sleep(0) print('leave a') async def b(): print('enter b') await trio.sleep(0) print('leave b') async def main(): async with trio.open_nursery() as nursery: print(nursery.start_soon(a)) nursery.start_soon(b) # seems like the ou...
16.5
50
0.694444
import trio async def a(): print('enter a') await trio.sleep(0) print('leave a') async def b(): print('enter b') await trio.sleep(0) print('leave b') async def main(): async with trio.open_nursery() as nursery: print(nursery.start_soon(a)) nursery.start_soon(b) if __name__ == '__main__': trio.run(ma...
true
true
f738f581a62bbf2ba1039ce79893ba2e39af5318
179
py
Python
fretboard/__init__.py
honorabel/python-fretboard
fb6a37e29bf6a19bee11940e9b42d58220c1306c
[ "MIT" ]
69
2016-11-18T02:11:01.000Z
2022-03-26T12:54:55.000Z
fretboard/__init__.py
honorabel/python-fretboard
fb6a37e29bf6a19bee11940e9b42d58220c1306c
[ "MIT" ]
3
2018-05-24T15:08:46.000Z
2020-09-19T21:49:36.000Z
fretboard/__init__.py
honorabel/python-fretboard
fb6a37e29bf6a19bee11940e9b42d58220c1306c
[ "MIT" ]
16
2018-06-12T10:34:26.000Z
2021-01-09T15:21:55.000Z
from .chord import Chord, BassChord, UkuleleChord from .fretboard import Fretboard __version__ = '1.0.0' __author__ = 'Derek Payton <derek.payton@gmail.com>' __license__ = 'MIT'
25.571429
52
0.765363
from .chord import Chord, BassChord, UkuleleChord from .fretboard import Fretboard __version__ = '1.0.0' __author__ = 'Derek Payton <derek.payton@gmail.com>' __license__ = 'MIT'
true
true
f738f63479f804d9170fe21b0f803e86f9f518c6
4,680
py
Python
tests/www/api/experimental/test_dag_runs_endpoint.py
rliuamzn/airflow
177dfbd12a42a5c229640c6c830f43f280ea5caa
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
3
2021-07-30T17:29:38.000Z
2022-03-06T08:44:23.000Z
tests/www/api/experimental/test_dag_runs_endpoint.py
rliuamzn/airflow
177dfbd12a42a5c229640c6c830f43f280ea5caa
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
210
2021-07-17T00:25:52.000Z
2021-12-29T00:44:48.000Z
tests/www/api/experimental/test_dag_runs_endpoint.py
rliuamzn/airflow
177dfbd12a42a5c229640c6c830f43f280ea5caa
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
3
2020-06-30T02:38:17.000Z
2022-01-19T06:14:08.000Z
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
36.850394
80
0.680556
import json import pytest from airflow.api.common.experimental.trigger_dag import trigger_dag from airflow.models import DagBag, DagRun from airflow.models.serialized_dag import SerializedDagModel from airflow.settings import Session class TestDagRunsEndpoint: @pytest.fixture(scope="class", aut...
true
true
f738f6c80a1a23e674eb48045329f0dee12e3ee9
21,450
py
Python
salt/utils/templates.py
fake-name/salt
d8f04936e4407f51946e32e8166159778f6c31a5
[ "Apache-2.0" ]
null
null
null
salt/utils/templates.py
fake-name/salt
d8f04936e4407f51946e32e8166159778f6c31a5
[ "Apache-2.0" ]
null
null
null
salt/utils/templates.py
fake-name/salt
d8f04936e4407f51946e32e8166159778f6c31a5
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Template render systems """ from __future__ import absolute_import, print_function, unicode_literals # Import Python libs import codecs import logging import os import sys import tempfile import traceback # Import 3rd-party libs import jinja2 import jinja2.ext # Import Salt libs import s...
34.265176
138
0.619068
from __future__ import absolute_import, print_function, unicode_literals import codecs import logging import os import sys import tempfile import traceback import jinja2 import jinja2.ext import salt.utils.data import salt.utils.dateutils import salt.utils.files import salt.utils.hashutils import salt.utils.htt...
true
true
f738f711c7c8087a0ebd860809e2161fd2425045
49,489
py
Python
test/backend/test_node.py
golunovas/onnx-tensorflow
b6340b3e66aa08af1ea4382e98257c2098177371
[ "Apache-2.0" ]
null
null
null
test/backend/test_node.py
golunovas/onnx-tensorflow
b6340b3e66aa08af1ea4382e98257c2098177371
[ "Apache-2.0" ]
null
null
null
test/backend/test_node.py
golunovas/onnx-tensorflow
b6340b3e66aa08af1ea4382e98257c2098177371
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import math import unittest import numpy as np import tensorflow as tf from onnx_tf.backend import run_node from onnx_tf.common import supports_device from onnx_tf.common...
39.97496
94
0.591121
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import math import unittest import numpy as np import tensorflow as tf from onnx_tf.backend import run_node from onnx_tf.common import supports_device from onnx_tf.common...
true
true
f738f76413d33197ccb79eae071324cc3b4852b8
85
py
Python
django/django_fundamentals/django_intro/SemiRestfulTvShows/shows/apps.py
fatimaalheeh/python_stack
9ba84e6dc030a65494f105152a97f0a38aa2e4f3
[ "MIT" ]
1
2021-07-21T23:50:14.000Z
2021-07-21T23:50:14.000Z
django/app/shows/apps.py
danieltorrescode/themoviedb
b963b15c2812a33ff707a8077e99106204efe023
[ "CNRI-Python" ]
26
2021-02-08T07:57:42.000Z
2022-03-01T02:07:58.000Z
django/app/shows/apps.py
danieltorrescode/themoviedb
b963b15c2812a33ff707a8077e99106204efe023
[ "CNRI-Python" ]
null
null
null
from django.apps import AppConfig class ShowsConfig(AppConfig): name = 'shows'
14.166667
33
0.741176
from django.apps import AppConfig class ShowsConfig(AppConfig): name = 'shows'
true
true
f738f7bdd36618d581b5ca730bc93d8921e26533
9,321
py
Python
src/lib/Bcfg2/Server/Reports/reports/templatetags/bcfg2_tags.py
espro/bcfg2
8470a15940309428d9286f2ef6372749dd14bddf
[ "mpich2" ]
null
null
null
src/lib/Bcfg2/Server/Reports/reports/templatetags/bcfg2_tags.py
espro/bcfg2
8470a15940309428d9286f2ef6372749dd14bddf
[ "mpich2" ]
null
null
null
src/lib/Bcfg2/Server/Reports/reports/templatetags/bcfg2_tags.py
espro/bcfg2
8470a15940309428d9286f2ef6372749dd14bddf
[ "mpich2" ]
null
null
null
from django import template from django.core.urlresolvers import resolve, reverse, Resolver404, NoReverseMatch from django.utils.encoding import smart_unicode, smart_str from datetime import datetime, timedelta from Bcfg2.Server.Reports.utils import filter_list register = template.Library() __PAGE_NAV_LIMITS__ = (10,...
33.649819
110
0.623216
from django import template from django.core.urlresolvers import resolve, reverse, Resolver404, NoReverseMatch from django.utils.encoding import smart_unicode, smart_str from datetime import datetime, timedelta from Bcfg2.Server.Reports.utils import filter_list register = template.Library() __PAGE_NAV_LIMITS__ = (10,...
true
true
f738f8af0f2cf36e0effa21aab9241a41cb0ed9c
381
py
Python
cracking_the_coding_interview_qs/17.15/get_longest_composite_test.py
angelusualle/algorithms
86286a49db2a755bc57330cb455bcbd8241ea6be
[ "Apache-2.0" ]
null
null
null
cracking_the_coding_interview_qs/17.15/get_longest_composite_test.py
angelusualle/algorithms
86286a49db2a755bc57330cb455bcbd8241ea6be
[ "Apache-2.0" ]
null
null
null
cracking_the_coding_interview_qs/17.15/get_longest_composite_test.py
angelusualle/algorithms
86286a49db2a755bc57330cb455bcbd8241ea6be
[ "Apache-2.0" ]
null
null
null
import unittest from get_longest_composite import get_longest_composite class Test_Case_Get_Longest_Composite(unittest.TestCase): def test_get_longest_composite(self): self.assertEqual(get_longest_composite(['bobby', 'brosef', 'john', 'apple', 'seed', 'pear', 'punch', 'bottom', 'appleseeds', 'applejohn']),...
42.333333
160
0.745407
import unittest from get_longest_composite import get_longest_composite class Test_Case_Get_Longest_Composite(unittest.TestCase): def test_get_longest_composite(self): self.assertEqual(get_longest_composite(['bobby', 'brosef', 'john', 'apple', 'seed', 'pear', 'punch', 'bottom', 'appleseeds', 'applejohn']),...
true
true
f738f94bd178ee25dcbf8d360c5abd45fdea583d
10,565
py
Python
cupydo/interfaces/Flow.py
chandanbose/CUPyDO
d8e4193efbdf549bcb6f783cd54729fefbeed4c7
[ "Apache-2.0" ]
1
2020-08-13T13:20:01.000Z
2020-08-13T13:20:01.000Z
cupydo/interfaces/Flow.py
chandanbose/CUPyDO
d8e4193efbdf549bcb6f783cd54729fefbeed4c7
[ "Apache-2.0" ]
null
null
null
cupydo/interfaces/Flow.py
chandanbose/CUPyDO
d8e4193efbdf549bcb6f783cd54729fefbeed4c7
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8; -*- """ Copyright 2018 University of Liège 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 b...
38.98524
154
0.55646
""" Copyright 2018 University of Liège 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, sof...
false
true
f738f96e3c7e444aa88fd83fb171e57d9f3c193d
1,698
py
Python
Picture/Exbar.py
hashtagSELFIE/That-s-a-Wrap-
31c8b824742fee01c384eefa49f9f82d85518651
[ "MIT" ]
2
2018-11-30T04:13:04.000Z
2018-11-30T13:01:12.000Z
Picture/Exbar.py
hashtagSELFIE/That-s-a-Wrap-
31c8b824742fee01c384eefa49f9f82d85518651
[ "MIT" ]
1
2022-02-12T05:05:55.000Z
2022-02-12T05:05:55.000Z
Picture/Exbar.py
hashtagSELFIE/That-s-a-Wrap-
31c8b824742fee01c384eefa49f9f82d85518651
[ "MIT" ]
1
2018-12-03T07:33:39.000Z
2018-12-03T07:33:39.000Z
import pygal def picture(): """picture Bar""" line_chart = pygal.Bar() line_chart.title = 'Director (in %)' line_chart.x_labels = map(str, range(2002, 2013)) line_chart.add('Action',[None, None, 0, 16.6, 25, 31, 36.4, 45.5, 46.3, 42.8, 37.1]) line_chart.add('Adventure',[None, None, None, None, N...
70.75
95
0.570671
import pygal def picture(): line_chart = pygal.Bar() line_chart.title = 'Director (in %)' line_chart.x_labels = map(str, range(2002, 2013)) line_chart.add('Action',[None, None, 0, 16.6, 25, 31, 36.4, 45.5, 46.3, 42.8, 37.1]) line_chart.add('Adventure',[None, None, None, None, None, None, 0, 3.9, 10....
true
true
f738f99974c4e4b13c1fb2b29395384be695d5c0
924
py
Python
pyalmondplus/cli.py
penright/pyalmondplus
f6f223eb650352a17f3ce536b2258bed139cf317
[ "Apache-2.0" ]
1
2018-08-05T04:28:58.000Z
2018-08-05T04:28:58.000Z
pyalmondplus/cli.py
penright/pyalmondplus
f6f223eb650352a17f3ce536b2258bed139cf317
[ "Apache-2.0" ]
311
2018-08-04T08:09:03.000Z
2022-03-28T05:17:18.000Z
pyalmondplus/cli.py
penright/pyalmondplus
f6f223eb650352a17f3ce536b2258bed139cf317
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """Console script for pyalmondplus.""" import sys import time import click import pyalmondplus.api import threading import asyncio def do_commands(url, my_api): click.echo("Connecting to " + url) while True: value = click.prompt("What next: ") print("command is: " + val...
23.1
73
0.640693
import sys import time import click import pyalmondplus.api import threading import asyncio def do_commands(url, my_api): click.echo("Connecting to " + url) while True: value = click.prompt("What next: ") print("command is: " + value) if value == "stop": break elif...
true
true
f738f9d16d50cf5b6e563ba2caffbc8115609b53
5,354
py
Python
tapas/models/tapas_classifier_model_utils.py
Martin36/tapas
c2578e8dfaa862ae0eaa3ae3ade6808c81200ddf
[ "Apache-2.0" ]
816
2020-03-31T15:15:56.000Z
2022-03-31T19:28:02.000Z
tapas/models/tapas_classifier_model_utils.py
Fgerald/tapas
2987658c3b65c5ab6e698d6c57823dc30d3d0f96
[ "Apache-2.0" ]
155
2020-05-02T15:45:42.000Z
2022-03-31T08:35:23.000Z
tapas/models/tapas_classifier_model_utils.py
Fgerald/tapas
2987658c3b65c5ab6e698d6c57823dc30d3d0f96
[ "Apache-2.0" ]
173
2020-05-01T02:39:38.000Z
2022-03-30T06:43:29.000Z
# coding=utf-8 # Copyright 2019 The Google AI Language Team 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 ...
39.955224
79
0.734591
from typing import Dict, Text, Tuple, Optional from tapas.models import segmented_tensor import tensorflow.compat.v1 as tf EPSILON_ZERO_DIVISION = 1e-10 CLOSE_ENOUGH_TO_LOG_ZERO = -10000.0 def classification_initializer(): return tf.truncated_normal_initializer(stddev=0.02) def extract_answer_fro...
true
true
f738f9df61c3fda0d35caee0b14e0e5a092dc611
942
py
Python
Tests/generate_report.py
avpreserve/interstitial
4ac1fa470670289350fe32227400b325a1f2a328
[ "BSD-3-Clause" ]
5
2015-11-06T18:00:11.000Z
2017-12-14T16:22:33.000Z
Tests/generate_report.py
avpreserve/interstitial
4ac1fa470670289350fe32227400b325a1f2a328
[ "BSD-3-Clause" ]
1
2021-02-09T18:03:10.000Z
2021-02-09T18:03:10.000Z
Tests/generate_report.py
WeAreAVP/interstitial
4ac1fa470670289350fe32227400b325a1f2a328
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: UTF-8 -*- # Interstitial Error Detector # Version 0.2, 2013-08-28 # Copyright (c) 2013 AudioVisual Preservation Solutions # All rights reserved. # Released under the Apache license, v. 2.0 # Created on Aug 12, 2014 # @author: Furqan Wasi <furqan@avpreserve.com> import shlex, subprocess, os # Co...
29.4375
136
0.685775
import shlex, subprocess, os if os.name == 'posix': OsType = 'linux' elif os.name == 'nt': OsType = 'Windows' elif os.name == 'os2': OsType = 'check' command_html_report = 'coverage html --omit=../GUI/*,../Tests/*,../Config/Validation.py,../Core/CustomException.py,../Core/Debugger....
true
true
f738fae13d36290b3bda56030bc913e1edc0187f
713
py
Python
full-problems/gameWithStrings.py
vikas-t/DS-Algo
ea654d1cad5374c824c52da9d3815a9546eb43fa
[ "Apache-2.0" ]
null
null
null
full-problems/gameWithStrings.py
vikas-t/DS-Algo
ea654d1cad5374c824c52da9d3815a9546eb43fa
[ "Apache-2.0" ]
null
null
null
full-problems/gameWithStrings.py
vikas-t/DS-Algo
ea654d1cad5374c824c52da9d3815a9546eb43fa
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python3 # https://practice.geeksforgeeks.org/problems/game-with-string/0 import heapq def sol(s, k): """ Keep decreasing the max frequency by 1 uptill k. We store the frequencies in a max heap to get the max each time """ f = [0]*26 for x in s: f[ord(x)-97] -= 1 # We...
24.586207
72
0.57784
import heapq def sol(s, k): f = [0]*26 for x in s: f[ord(x)-97] -= 1 heapq.heapify(f) while k and f: d = heapq.heappop(f) heapq.heappush(f, d+1) k-=1 res = 0 for x in f: res += x**2 return res
true
true
f738fb591d3e4da7bac480926eae3a268abc1135
37,282
py
Python
PythonAPI/carissma_project/lib/python3.5/site-packages/matplotlib/dviread.py
AbdulHoffmann/carla_carissma
8d382769ffa02a6c61a22c57160285505f5ff0a4
[ "MIT" ]
445
2019-01-26T13:50:26.000Z
2022-03-18T05:17:38.000Z
venv/lib/python3.7/site-packages/matplotlib/dviread.py
John1001Song/Big-Data-Robo-Adviser
9444dce96954c546333d5aecc92a06c3bfd19aa5
[ "MIT" ]
242
2019-01-29T15:48:27.000Z
2022-03-31T22:09:21.000Z
venv/lib/python3.7/site-packages/matplotlib/dviread.py
John1001Song/Big-Data-Robo-Adviser
9444dce96954c546333d5aecc92a06c3bfd19aa5
[ "MIT" ]
64
2018-04-25T08:51:57.000Z
2022-01-29T14:13:57.000Z
""" A module for reading dvi files output by TeX. Several limitations make this not (currently) useful as a general-purpose dvi preprocessor, but it is currently used by the pdf backend for processing usetex text. Interface:: with Dvi(filename, 72) as dvi: # iterate over pages: for page in dvi: ...
35.304924
79
0.566466
from collections import namedtuple import enum from functools import lru_cache, partial, wraps import logging import os import re import struct import subprocess import textwrap import numpy as np from matplotlib import cbook, rcParams _log = logging.getLogger(__name__) _dvistate = enum.Enum('D...
true
true
f738fb755883c2f74681fac8b121abf0c9cd6e56
5,175
py
Python
vehicle_detection.py
suhongkim/SSD-Vehicle-Detector
8337d237f4c7923e55d02747ec37a60681e5beff
[ "MIT" ]
null
null
null
vehicle_detection.py
suhongkim/SSD-Vehicle-Detector
8337d237f4c7923e55d02747ec37a60681e5beff
[ "MIT" ]
null
null
null
vehicle_detection.py
suhongkim/SSD-Vehicle-Detector
8337d237f4c7923e55d02747ec37a60681e5beff
[ "MIT" ]
null
null
null
import os import torch from torch.utils.data import DataLoader from cityscape_dataset import CityScapeDataset from ssd_util import load_dataset_list, load_dataset_list_original, show_loss, show_log from ssd_net import SSD from ssd_train import train_net from ssd_test import test_net if __name__ == '__main__...
45.394737
127
0.582802
import os import torch from torch.utils.data import DataLoader from cityscape_dataset import CityScapeDataset from ssd_util import load_dataset_list, load_dataset_list_original, show_loss, show_log from ssd_net import SSD from ssd_train import train_net from ssd_test import test_net if __name__ == '__main__...
true
true
f738feb48528bc44a1c44d1a4c3cafea3b88882f
2,149
py
Python
CMSIS/DSP/Examples/ARM/arm_bayes_example/train.py
DavidLesnjak/CMSIS_5
e0848410d137758a3356a5ee94ca4501cea708a8
[ "Apache-2.0" ]
2,293
2016-02-25T06:47:33.000Z
2022-03-29T16:44:02.000Z
CMSIS/DSP/Examples/ARM/arm_bayes_example/train.py
DavidLesnjak/CMSIS_5
e0848410d137758a3356a5ee94ca4501cea708a8
[ "Apache-2.0" ]
1,125
2016-02-27T09:56:01.000Z
2022-03-31T13:57:05.000Z
CMSIS/DSP/Examples/ARM/arm_bayes_example/train.py
DavidLesnjak/CMSIS_5
e0848410d137758a3356a5ee94ca4501cea708a8
[ "Apache-2.0" ]
1,160
2016-02-27T09:06:10.000Z
2022-03-31T19:06:24.000Z
from sklearn.naive_bayes import GaussianNB import random import numpy as np import math from pylab import scatter,figure, clf, plot, xlabel, ylabel, xlim, ylim, title, grid, axes, show,semilogx, semilogy import matplotlib.pyplot as plt from matplotlib.font_manager import FontProperties # Generation of data to train t...
29.040541
115
0.717543
from sklearn.naive_bayes import GaussianNB import random import numpy as np import math from pylab import scatter,figure, clf, plot, xlabel, ylabel, xlim, ylim, title, grid, axes, show,semilogx, semilogy import matplotlib.pyplot as plt from matplotlib.font_manager import FontProperties NBVECS = 100 VECDIM = 2 bal...
true
true
f738ff1b59bd6407c45587658b34887b5f3bc25d
1,511
py
Python
bilibili/bilibili/spiders/relationship.py
PyDee/Spiders
6fc0a414060032b5ba4332302285e3fcc9a6113e
[ "Apache-2.0" ]
6
2020-06-02T16:22:58.000Z
2021-09-18T03:20:16.000Z
bilibili/bilibili/spiders/relationship.py
PyDee/Spiders
6fc0a414060032b5ba4332302285e3fcc9a6113e
[ "Apache-2.0" ]
4
2021-03-31T19:54:37.000Z
2022-03-12T00:33:41.000Z
bilibili/bilibili/spiders/relationship.py
PyDee/Spiders
6fc0a414060032b5ba4332302285e3fcc9a6113e
[ "Apache-2.0" ]
5
2020-06-02T16:23:00.000Z
2021-09-03T02:16:15.000Z
# -*- coding: utf-8 -*- """ 获取用户关注 """ import json import redis from scrapy_redis.spiders import RedisSpider from ..items import Relationship from .bos_filter import RedisDB, BosFilter class RelationshipSpider(RedisSpider): rdb = RedisDB() r = redis.Redis(host="127.0.0.1") name = 'relationship' allow...
36.853659
114
0.577763
import json import redis from scrapy_redis.spiders import RedisSpider from ..items import Relationship from .bos_filter import RedisDB, BosFilter class RelationshipSpider(RedisSpider): rdb = RedisDB() r = redis.Redis(host="127.0.0.1") name = 'relationship' allowed_domains = ['api.bilibili.com'] ...
true
true
f738ff759b6f7cf53b2e7583c0b4df87d9a35a39
1,352
py
Python
kaggle_SIIM-ACR_Pneumothorax_Segmentation/utils/loss.py
allen050883/Project
22a9f1e466e595d8808e59fc58801881f3399df4
[ "MIT" ]
null
null
null
kaggle_SIIM-ACR_Pneumothorax_Segmentation/utils/loss.py
allen050883/Project
22a9f1e466e595d8808e59fc58801881f3399df4
[ "MIT" ]
null
null
null
kaggle_SIIM-ACR_Pneumothorax_Segmentation/utils/loss.py
allen050883/Project
22a9f1e466e595d8808e59fc58801881f3399df4
[ "MIT" ]
null
null
null
import torch import torch.nn.functional as F def dice_score(inputs, targets, smooth=1): # Flatten label and prediction tensors inputs = inputs.view(-1) targets = targets.view(-1) intersection = (inputs * targets).sum() dice_score = (2.*intersection + smooth)/(inputs.sum...
32.190476
88
0.647189
import torch import torch.nn.functional as F def dice_score(inputs, targets, smooth=1): inputs = inputs.view(-1) targets = targets.view(-1) intersection = (inputs * targets).sum() dice_score = (2.*intersection + smooth)/(inputs.sum() + targets.sum() + smooth) ...
true
true
f738ffc00adfe3ae0e5db9437b05b358c231180f
296
py
Python
daiquiri/stats/admin.py
agy-why/daiquiri
4d3e2ce51e202d5a8f1df404a0094a4e018dcb4d
[ "Apache-2.0" ]
14
2018-12-23T18:35:02.000Z
2021-12-15T04:55:12.000Z
daiquiri/stats/admin.py
agy-why/daiquiri
4d3e2ce51e202d5a8f1df404a0094a4e018dcb4d
[ "Apache-2.0" ]
40
2018-12-20T12:44:05.000Z
2022-03-21T11:35:20.000Z
daiquiri/stats/admin.py
agy-why/daiquiri
4d3e2ce51e202d5a8f1df404a0094a4e018dcb4d
[ "Apache-2.0" ]
5
2019-05-16T08:03:35.000Z
2021-08-23T20:03:11.000Z
from django.contrib import admin from .models import Record class RecordAdmin(admin.ModelAdmin): search_fields = ('resource', 'user__username') list_display = ('time', 'resource_type', 'client_ip', 'user') list_display_links = ('time', ) admin.site.register(Record, RecordAdmin)
22.769231
65
0.722973
from django.contrib import admin from .models import Record class RecordAdmin(admin.ModelAdmin): search_fields = ('resource', 'user__username') list_display = ('time', 'resource_type', 'client_ip', 'user') list_display_links = ('time', ) admin.site.register(Record, RecordAdmin)
true
true
f73900a0283ab4836b6eccbee5cb864bc5a14b42
3,725
py
Python
main.py
wcontreras785/Controlador-Termohigrometro-Micropayhon
a15c4b71eec8f0e8fb72f20e9de2e1032b97685c
[ "MIT" ]
null
null
null
main.py
wcontreras785/Controlador-Termohigrometro-Micropayhon
a15c4b71eec8f0e8fb72f20e9de2e1032b97685c
[ "MIT" ]
null
null
null
main.py
wcontreras785/Controlador-Termohigrometro-Micropayhon
a15c4b71eec8f0e8fb72f20e9de2e1032b97685c
[ "MIT" ]
null
null
null
from machine import SoftI2C, Pin, RTC import onewire, ds18x20, time import utime, dht, network, urequests import OLED, ntptime temp=30 url = "https://api.thingspeak.com/update?api_key=CTVG0E49RI7RSV78" #------------------------------------------WIFI------------------- def conectaWifi (red, password): global miR...
30.040323
112
0.506577
from machine import SoftI2C, Pin, RTC import onewire, ds18x20, time import utime, dht, network, urequests import OLED, ntptime temp=30 url = "https://api.thingspeak.com/update?api_key=CTVG0E49RI7RSV78" def conectaWifi (red, password): global miRed miRed = network.WLAN(network.STA_IF) if not mi...
true
true
f73900beec9d1bdce44f7fe9ddbae6a26c87436c
34,396
py
Python
scripts/interp_sea_level_ICESat2_ATL07.py
mrsiegfried/read-ICESat-2
1406b92691d284616ca6c9d72646eca4592d1f1d
[ "MIT" ]
null
null
null
scripts/interp_sea_level_ICESat2_ATL07.py
mrsiegfried/read-ICESat-2
1406b92691d284616ca6c9d72646eca4592d1f1d
[ "MIT" ]
null
null
null
scripts/interp_sea_level_ICESat2_ATL07.py
mrsiegfried/read-ICESat-2
1406b92691d284616ca6c9d72646eca4592d1f1d
[ "MIT" ]
null
null
null
#!/usr/bin/env python u""" interp_sea_level_ICESat2_ATL07.py Written by Tyler Sutterley (05/2021) Interpolates sea level anomalies (sla), absolute dynamic topography (adt) and mean dynamic topography (mdt) to times and locations of ICESat-2 ATL07 data https://www.aviso.altimetry.fr/en/data/products/sea-surface-hei...
54.424051
121
0.658129
from __future__ import print_function import os import re import gzip import h5py import pyproj import netCDF4 import argparse import datetime import numpy as np import sklearn.neighbors import icesat2_toolkit.time from icesat2_toolkit.read_ICESat2_ATL07 import read_HDF5_ATL07 def set_hemisphere(GRANULE): if GR...
true
true
f739014e51e38690018ed000125672340d61618f
8,914
py
Python
src/argteller/builder/access_object.py
mozjay0619/argteller-viz
963c6d43019efb2b0e9bcdb4b3053b57cd4ff373
[ "BSD-3-Clause" ]
null
null
null
src/argteller/builder/access_object.py
mozjay0619/argteller-viz
963c6d43019efb2b0e9bcdb4b3053b57cd4ff373
[ "BSD-3-Clause" ]
7
2021-08-04T15:54:07.000Z
2021-09-17T17:40:38.000Z
src/argteller/builder/access_object.py
mozjay0619/argteller-viz
963c6d43019efb2b0e9bcdb4b3053b57cd4ff373
[ "BSD-3-Clause" ]
null
null
null
from ..tree.tree_node import TreeNode from ..tree.tree_builder import display_tree from ..widgets.dynamic_widgets import DynamicWidget from ..utils.data_structure_utils import nested_defaultdict try: from IPython.display import display import ipywidgets as widgets from ipywidgets import HBox, Label, VBox ...
26.372781
141
0.538479
from ..tree.tree_node import TreeNode from ..tree.tree_builder import display_tree from ..widgets.dynamic_widgets import DynamicWidget from ..utils.data_structure_utils import nested_defaultdict try: from IPython.display import display import ipywidgets as widgets from ipywidgets import HBox, Label, VBox ...
true
true
f7390183394d1de2b6751c913c3b457fe6ef6277
37,497
py
Python
mgsa/bio/sam.py
supernifty/mgsa
5f950f8c9c2bf0439a100a2348f1aef478e32934
[ "MIT" ]
2
2016-11-02T20:27:00.000Z
2019-10-23T08:14:44.000Z
mgsa/bio/sam.py
supernifty/mgsa
5f950f8c9c2bf0439a100a2348f1aef478e32934
[ "MIT" ]
null
null
null
mgsa/bio/sam.py
supernifty/mgsa
5f950f8c9c2bf0439a100a2348f1aef478e32934
[ "MIT" ]
null
null
null
import collections import datetime #pypy import numpy import random import re import struct import subprocess import sys import zlib import bio import fasta import features import statistics import vcf SOFT_CLIP_CONFIDENCE = 0.0 class SamToMultiChromosomeVCF(object): def __init__( self, sam, multi_fasta_reference...
44.322695
307
0.597301
import collections import datetime import random import re import struct import subprocess import sys import zlib import bio import fasta import features import statistics import vcf SOFT_CLIP_CONFIDENCE = 0.0 class SamToMultiChromosomeVCF(object): def __init__( self, sam, multi_fasta_reference, target_vcf, log,...
false
true
f73901e1ff6cfefad9f65ca0f31da49a0cddd668
8,751
py
Python
models/reid.py
FDU-VTS/Person-Search
36a1eab8d8fdf149e32dece030edff02dbc8a915
[ "Apache-2.0" ]
null
null
null
models/reid.py
FDU-VTS/Person-Search
36a1eab8d8fdf149e32dece030edff02dbc8a915
[ "Apache-2.0" ]
null
null
null
models/reid.py
FDU-VTS/Person-Search
36a1eab8d8fdf149e32dece030edff02dbc8a915
[ "Apache-2.0" ]
null
null
null
# encoding: utf-8 """ @author: liaoxingyu @contact: sherlockliao01@gmail.com """ import math import torch from torch import nn from torch.utils import model_zoo from models.context_block import * model_urls = { 'resnet18': 'https://download.pytorch.org/models/resnet18-5c106cde.pth', 'resnet34': 'https://do...
34.864542
116
0.587019
import math import torch from torch import nn from torch.utils import model_zoo from models.context_block import * model_urls = { 'resnet18': 'https://download.pytorch.org/models/resnet18-5c106cde.pth', 'resnet34': 'https://download.pytorch.org/models/resnet34-333f7ec4.pth', 'resnet50': 'https://downlo...
true
true
f73901ef4984a451692d472712810fe344735601
965
py
Python
qiskit/providers/basicaer/__init__.py
lerongil/qiskit-terra
a25af2a2378bc3d4f5ec73b948d048d1b707454c
[ "Apache-2.0" ]
1
2021-10-13T14:37:54.000Z
2021-10-13T14:37:54.000Z
qiskit/providers/basicaer/__init__.py
lerongil/qiskit-terra
a25af2a2378bc3d4f5ec73b948d048d1b707454c
[ "Apache-2.0" ]
null
null
null
qiskit/providers/basicaer/__init__.py
lerongil/qiskit-terra
a25af2a2378bc3d4f5ec73b948d048d1b707454c
[ "Apache-2.0" ]
2
2020-02-10T16:34:18.000Z
2020-05-22T08:37:07.000Z
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2017, 2018. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any...
37.115385
77
0.786528
from .basicaerprovider import BasicAerProvider from .basicaerjob import BasicAerJob from .qasm_simulator import QasmSimulatorPy from .statevector_simulator import StatevectorSimulatorPy from .unitary_simulator import UnitarySimulatorPy from .exceptions import BasicAerError BasicAer = BasicAerProvider()...
true
true
f739026db4d6230a954e2a2f055660caab5f5f09
7,956
py
Python
tulislessonplansqlite2013.py
mwbetrg/englishdb
3cbeb0aa62e906e9a654a0699330c90f678e3e6e
[ "CC0-1.0" ]
null
null
null
tulislessonplansqlite2013.py
mwbetrg/englishdb
3cbeb0aa62e906e9a654a0699330c90f678e3e6e
[ "CC0-1.0" ]
null
null
null
tulislessonplansqlite2013.py
mwbetrg/englishdb
3cbeb0aa62e906e9a654a0699330c90f678e3e6e
[ "CC0-1.0" ]
null
null
null
#!/usr/bin/python #Created : Thu 04 Sep 2008 12:25:03 PM GMT #Last Modified : Tue 01 Jan 2013 06:24:01 AM GMT import os import sys from time import strftime import time import datetime #from pysqlite2 import dbapi2 as sqlite import sqlite3 con = sqlite3.connect("/usb/phpmysql/lessonplan2010.db", isolation_level=None)...
38.434783
174
0.562092
import os import sys from time import strftime import time import datetime import sqlite3 con = sqlite3.connect("/usb/phpmysql/lessonplan2010.db", isolation_level=None) cur = con.cursor() tahunini = "2013" if len(sys.argv) < 2: print "Usage: %s date (MMDD) " % sys.argv[0] sys.exit(1) hb = sys.argv[1]...
false
true
f73904b8d9c1cb95aa33edbe0ce7ade57ca5ceab
1,757
py
Python
test/test_image_helpers.py
vincentriche/yoga
583217064e31e303cfe93eeaa5a0a25a7fb2c2b1
[ "BSD-3-Clause" ]
null
null
null
test/test_image_helpers.py
vincentriche/yoga
583217064e31e303cfe93eeaa5a0a25a7fb2c2b1
[ "BSD-3-Clause" ]
null
null
null
test/test_image_helpers.py
vincentriche/yoga
583217064e31e303cfe93eeaa5a0a25a7fb2c2b1
[ "BSD-3-Clause" ]
null
null
null
import pytest from PIL import Image from yoga.image import helpers class Test_image_have_alpha(object): @pytest.mark.parametrize( "image_path", [ "test/images/image1.jpg", "test/images/unused-alpha.png", "test/images/indexed.png", "test/images/grays...
31.375
73
0.63062
import pytest from PIL import Image from yoga.image import helpers class Test_image_have_alpha(object): @pytest.mark.parametrize( "image_path", [ "test/images/image1.jpg", "test/images/unused-alpha.png", "test/images/indexed.png", "test/images/grays...
true
true
f739068bdaf87f5feab35741d7c2f3304166461b
86
py
Python
src/final_exam/q_player/main_player.py
acc-cosc-1336/cosc-1336-spring-2018-Miguelh1997
ac4b0405c4070758d0fc07458d4dca8a8a0313de
[ "MIT" ]
null
null
null
src/final_exam/q_player/main_player.py
acc-cosc-1336/cosc-1336-spring-2018-Miguelh1997
ac4b0405c4070758d0fc07458d4dca8a8a0313de
[ "MIT" ]
null
null
null
src/final_exam/q_player/main_player.py
acc-cosc-1336/cosc-1336-spring-2018-Miguelh1997
ac4b0405c4070758d0fc07458d4dca8a8a0313de
[ "MIT" ]
1
2018-02-13T03:32:50.000Z
2018-02-13T03:32:50.000Z
from player import Player p = Player(7,11) new = p.check_come_out_roll() print(new)
12.285714
29
0.732558
from player import Player p = Player(7,11) new = p.check_come_out_roll() print(new)
true
true
f7390997788e9f8d8c665a703e70cda0e5065dcd
226
py
Python
Products/admin.py
Annukumari99312/e-commerce
3e7c206fb545f41adfa09bdbc64c765eb8be8b0c
[ "MIT" ]
null
null
null
Products/admin.py
Annukumari99312/e-commerce
3e7c206fb545f41adfa09bdbc64c765eb8be8b0c
[ "MIT" ]
null
null
null
Products/admin.py
Annukumari99312/e-commerce
3e7c206fb545f41adfa09bdbc64c765eb8be8b0c
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Product class ProductAdmin(admin.ModelAdmin): list_display = ['__str__', 'slug'] class Meta: model = Product admin.site.register(Product, ProductAdmin)
17.384615
42
0.721239
from django.contrib import admin from .models import Product class ProductAdmin(admin.ModelAdmin): list_display = ['__str__', 'slug'] class Meta: model = Product admin.site.register(Product, ProductAdmin)
true
true
f7390b592a5ce8e43b6054ce5bf5ec8c333bb565
15,777
py
Python
devel/lib/python2.7/dist-packages/robotnik_msgs/msg/_SetElevatorActionResult.py
Jam-cpu/Masters-Project---Final
0b266b1f117a579b96507249f0a128d0e3cc082a
[ "BSD-3-Clause-Clear" ]
null
null
null
devel/lib/python2.7/dist-packages/robotnik_msgs/msg/_SetElevatorActionResult.py
Jam-cpu/Masters-Project---Final
0b266b1f117a579b96507249f0a128d0e3cc082a
[ "BSD-3-Clause-Clear" ]
null
null
null
devel/lib/python2.7/dist-packages/robotnik_msgs/msg/_SetElevatorActionResult.py
Jam-cpu/Masters-Project---Final
0b266b1f117a579b96507249f0a128d0e3cc082a
[ "BSD-3-Clause-Clear" ]
null
null
null
# This Python file uses the following encoding: utf-8 """autogenerated by genpy from robotnik_msgs/SetElevatorActionResult.msg. Do not edit.""" import codecs import sys python3 = True if sys.hexversion > 0x03000000 else False import genpy import struct import actionlib_msgs.msg import genpy import robotnik_msgs.msg im...
36.352535
145
0.623566
import codecs import sys python3 = True if sys.hexversion > 0x03000000 else False import genpy import struct import actionlib_msgs.msg import genpy import robotnik_msgs.msg import std_msgs.msg class SetElevatorActionResult(genpy.Message): _md5sum = "d72997606702a7ef168a85ecdb795c78" _type = "robotnik_msgs/SetEle...
true
true
f7390c2e11c7451649e3783cb5ad8d2db9e0dc57
17,027
py
Python
setup.py
RobertHalwass/habitat-sim
a329a90a70767c92789bdbeb2a983161d1207e98
[ "MIT" ]
null
null
null
setup.py
RobertHalwass/habitat-sim
a329a90a70767c92789bdbeb2a983161d1207e98
[ "MIT" ]
null
null
null
setup.py
RobertHalwass/habitat-sim
a329a90a70767c92789bdbeb2a983161d1207e98
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ Adapted from: http://www.benjack.io/2017/06/12/python-cpp-tests.html """ import argparse import builtins import glo...
34.054
112
0.58789
import argparse import builtins import glob import json import os import os.path as osp import re import shlex import shutil import subprocess import sys from distutils.util import strtobool from distutils.version import StrictVersion from setuptools import Extension, find_packages, setup from setuptools.comman...
true
true
f7390cd227338410fabb9b4cd5b45f0af8f77191
11,974
py
Python
ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/protocols/dcenodetopologyrange_34374b8565456318538178dbf3a92ccb.py
OpenIxia/ixnetwork_restpy
f628db450573a104f327cf3c737ca25586e067ae
[ "MIT" ]
20
2019-05-07T01:59:14.000Z
2022-02-11T05:24:47.000Z
ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/protocols/dcenodetopologyrange_34374b8565456318538178dbf3a92ccb.py
OpenIxia/ixnetwork_restpy
f628db450573a104f327cf3c737ca25586e067ae
[ "MIT" ]
60
2019-04-03T18:59:35.000Z
2022-02-22T12:05:05.000Z
ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/protocols/dcenodetopologyrange_34374b8565456318538178dbf3a92ccb.py
OpenIxia/ixnetwork_restpy
f628db450573a104f327cf3c737ca25586e067ae
[ "MIT" ]
13
2019-05-20T10:48:31.000Z
2021-10-06T07:45:44.000Z
# MIT LICENSE # # Copyright 1997 - 2020 by IXIA Keysight # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify,...
42.310954
219
0.674461
from ixnetwork_restpy.base import Base from ixnetwork_restpy.files import Files from typing import List, Any, Union class DceNodeTopologyRange(Base): __slots__ = () _SDM_NAME = 'dceNodeTopologyRange' _SDM_ATT_MAP = { 'BroadcastPriority': 'broadcastPriority', 'IncludeL...
true
true
f7390cf292e209f021713892d3fb85ddd364f972
3,048
py
Python
packages/w3af/w3af/plugins/evasion/full_width_encode.py
ZooAtmosphereGroup/HelloPackages
0ccffd33bf927b13d28c8f715ed35004c33465d9
[ "Apache-2.0" ]
null
null
null
packages/w3af/w3af/plugins/evasion/full_width_encode.py
ZooAtmosphereGroup/HelloPackages
0ccffd33bf927b13d28c8f715ed35004c33465d9
[ "Apache-2.0" ]
null
null
null
packages/w3af/w3af/plugins/evasion/full_width_encode.py
ZooAtmosphereGroup/HelloPackages
0ccffd33bf927b13d28c8f715ed35004c33465d9
[ "Apache-2.0" ]
null
null
null
""" full_width_encode.py Copyright 2006 Andres Riancho This file is part of w3af, http://w3af.org/ . w3af is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation version 2 of the License. w3af is distributed in the hop...
29.882353
78
0.614829
import urllib from w3af.core.controllers.plugins.evasion_plugin import EvasionPlugin from w3af.core.data.parsers.doc.url import parse_qs class full_width_encode(EvasionPlugin): def modify_request(self, request): path = request.url_object.get_path() path = self._mutate(path) ...
true
true
f7390dc9891b3c2959a43d730cd03c3815a2319d
9,135
py
Python
tests/utilities/test_storage.py
nicolasiltis/prefect
4298105651c2fe02b21013ae8a0468e9e101154d
[ "Apache-2.0" ]
3
2021-11-09T10:46:58.000Z
2022-03-11T04:22:35.000Z
tests/utilities/test_storage.py
nicolasiltis/prefect
4298105651c2fe02b21013ae8a0468e9e101154d
[ "Apache-2.0" ]
8
2021-10-11T16:42:59.000Z
2022-03-31T08:42:24.000Z
tests/utilities/test_storage.py
nicolasiltis/prefect
4298105651c2fe02b21013ae8a0468e9e101154d
[ "Apache-2.0" ]
1
2022-03-11T04:22:40.000Z
2022-03-11T04:22:40.000Z
import os import sys import types import textwrap import pytest import cloudpickle import prefect from prefect import Flow, Task from prefect.storage import Docker, Local from prefect.exceptions import FlowStorageError from prefect.run_configs import DockerRun, UniversalRun from prefect.utilities.storage import ( ...
33.218182
87
0.67214
import os import sys import types import textwrap import pytest import cloudpickle import prefect from prefect import Flow, Task from prefect.storage import Docker, Local from prefect.exceptions import FlowStorageError from prefect.run_configs import DockerRun, UniversalRun from prefect.utilities.storage import ( ...
true
true
f7390dce5ed924db4eacae76988830e0d21eb18c
7,605
py
Python
iot/api-client/http_example/cloudiot_http_example.py
bxue16/bx_byte1
e8c2face224f16ab2d2fa927a0c944176e4dd557
[ "Apache-2.0" ]
null
null
null
iot/api-client/http_example/cloudiot_http_example.py
bxue16/bx_byte1
e8c2face224f16ab2d2fa927a0c944176e4dd557
[ "Apache-2.0" ]
null
null
null
iot/api-client/http_example/cloudiot_http_example.py
bxue16/bx_byte1
e8c2face224f16ab2d2fa927a0c944176e4dd557
[ "Apache-2.0" ]
1
2018-09-19T05:55:27.000Z
2018-09-19T05:55:27.000Z
#!/usr/bin/env python # Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
35.372093
79
0.644313
import argparse import base64 import datetime import json import time from google.api_core import retry import jwt import requests _BASE_URL = 'https://cloudiot-device.googleapis.com/v1beta1' _BACKOFF_DURATION = 60 def create_jwt(project_id, private_key_file, algorithm): token = { ...
true
true
f7390e4926bf78ad6d372fb87866cacff08ee9fb
7,677
py
Python
tests/e2e/test_clickhouse.py
a-dot/clickhouse-operator
cecb54ad1ade33a9d748a0108e765abad9b2412e
[ "Apache-2.0" ]
null
null
null
tests/e2e/test_clickhouse.py
a-dot/clickhouse-operator
cecb54ad1ade33a9d748a0108e765abad9b2412e
[ "Apache-2.0" ]
null
null
null
tests/e2e/test_clickhouse.py
a-dot/clickhouse-operator
cecb54ad1ade33a9d748a0108e765abad9b2412e
[ "Apache-2.0" ]
null
null
null
import time import e2e.clickhouse as clickhouse import e2e.kubectl as kubectl import e2e.yaml_manifest as yaml_manifest import e2e.settings as settings import e2e.util as util from testflows.core import * from testflows.asserts import error @TestScenario @Name("test_ch_001. Insert quorum") def test_ch_001(self): ...
42.65
157
0.639703
import time import e2e.clickhouse as clickhouse import e2e.kubectl as kubectl import e2e.yaml_manifest as yaml_manifest import e2e.settings as settings import e2e.util as util from testflows.core import * from testflows.asserts import error @TestScenario @Name("test_ch_001. Insert quorum") def test_ch_001(self): ...
true
true
f7390f2181b2fb75bb45374f2417c1618860d2fb
387
py
Python
djnic/djnic/wsgi.py
avdata99/nic
70399bd78fd2b4b496d338e7959867ad12cdf477
[ "MIT" ]
8
2021-05-01T13:03:22.000Z
2021-12-17T21:50:04.000Z
djnic/djnic/wsgi.py
avdata99/nic
70399bd78fd2b4b496d338e7959867ad12cdf477
[ "MIT" ]
16
2020-11-20T23:18:22.000Z
2021-04-08T20:09:35.000Z
djnic/djnic/wsgi.py
OpenDataCordoba/nic
f9528856e13d106bdfb476cab1236bc5b8a92183
[ "MIT" ]
null
null
null
""" WSGI config for djnic 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/3.1/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTING...
22.764706
78
0.782946
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'djnic.settings') application = get_wsgi_application()
true
true
f7390f52affc6ece0f1ab2fdfedbef5e4b8f2be3
7,721
py
Python
doc/conf.py
dbolshak/secure-xgboost
fd4f240fc35b07329b39795fc17a5ad5540656ec
[ "Apache-2.0" ]
77
2019-10-28T04:41:29.000Z
2022-03-04T03:56:47.000Z
doc/conf.py
dbolshak/secure-xgboost
fd4f240fc35b07329b39795fc17a5ad5540656ec
[ "Apache-2.0" ]
61
2020-02-25T21:18:39.000Z
2020-06-20T10:13:39.000Z
doc/conf.py
chester-leung/mc2-xgboost
71c00b7c597a7145aae179980052bff79ec61846
[ "Apache-2.0" ]
27
2019-10-02T00:04:18.000Z
2022-03-02T07:57:46.000Z
# -*- coding: utf-8 -*- # # documentation build configuration file, created by # sphinx-quickstart on Thu Jul 23 19:40:08 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All confi...
35.417431
137
0.696671
from subprocess import call from recommonmark.parser import CommonMarkParser import sys import re import os, subprocess import shlex )) libpath = os.path.join(curr_path, '../python-package/') sys.path.insert(0, libpath) sys.path.insert(0, curr_path) import mock MOCK_MODULES = ['scipy', 'scipy.spar...
true
true
f7390f5e6066b32bfb5e0deb3646be9a163e3667
25,060
py
Python
SimG4Core/Application/python/g4SimHits_cfi.py
AFJohan92/cmssw
c5b36f05986c35998ddd4c873dc6812646579744
[ "Apache-2.0" ]
2
2020-01-21T11:23:39.000Z
2020-01-21T11:23:42.000Z
SimG4Core/Application/python/g4SimHits_cfi.py
AFJohan92/cmssw
c5b36f05986c35998ddd4c873dc6812646579744
[ "Apache-2.0" ]
null
null
null
SimG4Core/Application/python/g4SimHits_cfi.py
AFJohan92/cmssw
c5b36f05986c35998ddd4c873dc6812646579744
[ "Apache-2.0" ]
3
2019-03-09T13:06:43.000Z
2020-07-03T00:47:30.000Z
import FWCore.ParameterSet.Config as cms from SimG4Core.Application.hectorParameter_cfi import * ## HF Raddam Dose Class in /SimG4CMS/Calo from SimG4CMS.Calo.HFDarkeningParams_cff import * ## This object is used to customise g4SimHits for different running scenarios common_heavy_suppression = cms.PSet( NeutronT...
42.691652
127
0.580686
import FWCore.ParameterSet.Config as cms from SimG4Core.Application.hectorParameter_cfi import * f import * 0), ProtonThreshold = cms.double(30.0), IonThreshold = cms.double(30.0) ) common_maximum_time = cms.PSet( MaxTrackTime = cms.double(500.0), MaxTimeNames = cms.vstring('ZDCRegion'), MaxTr...
true
true