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
f759d5d213dc0a9d8cdec28e2f00e83e46644679
2,636
py
Python
2020/day-11/day11.py
smolsbs/aoc
558cc68b94ead332190e14ad7a9ecd6ca5c4aa5a
[ "Unlicense" ]
1
2019-12-02T20:20:41.000Z
2019-12-02T20:20:41.000Z
2020/day-11/day11.py
smolsbs/aoc
558cc68b94ead332190e14ad7a9ecd6ca5c4aa5a
[ "Unlicense" ]
null
null
null
2020/day-11/day11.py
smolsbs/aoc
558cc68b94ead332190e14ad7a9ecd6ca5c4aa5a
[ "Unlicense" ]
null
null
null
#!/usr/bin/env python3 import numpy as np dirs = [(0,1), (1,0), (0, -1), (-1, 0), (1,1), (1,-1), (-1, 1), (-1,-1)] def parse_seats(line): v = [] for s in line: if s == 'L': v.append(0) else: v.append(-1) return v def allpos(xx,yy): all_p = [] for x in xx: ...
28.042553
100
0.424886
import numpy as np dirs = [(0,1), (1,0), (0, -1), (-1, 0), (1,1), (1,-1), (-1, 1), (-1,-1)] def parse_seats(line): v = [] for s in line: if s == 'L': v.append(0) else: v.append(-1) return v def allpos(xx,yy): all_p = [] for x in xx: for y in yy: ...
true
true
f759d69213eee8096fcfa9f6b7f5c85df65f6397
453
py
Python
py/examples/tests/pySparklingImportBeforeSparkSessionCreated.py
kmullapudi-11/sparkling-water
9b43bc82b0fc6f1be7c23ed7f65cd42c14e5887e
[ "Apache-2.0" ]
null
null
null
py/examples/tests/pySparklingImportBeforeSparkSessionCreated.py
kmullapudi-11/sparkling-water
9b43bc82b0fc6f1be7c23ed7f65cd42c14e5887e
[ "Apache-2.0" ]
null
null
null
py/examples/tests/pySparklingImportBeforeSparkSessionCreated.py
kmullapudi-11/sparkling-water
9b43bc82b0fc6f1be7c23ed7f65cd42c14e5887e
[ "Apache-2.0" ]
null
null
null
from pysparkling import * from pyspark.sql import SparkSession spark = SparkSession.builder.appName("App name").getOrCreate() # Check if Sparkling Water classes are available jvm = spark.sparkContext._jvm package = getattr(jvm.ai.h2o.sparkling.backend, "BuildInfo$") module = package.__getattr__("MODULE$") # This would...
41.181818
125
0.792494
from pysparkling import * from pyspark.sql import SparkSession spark = SparkSession.builder.appName("App name").getOrCreate() jvm = spark.sparkContext._jvm package = getattr(jvm.ai.h2o.sparkling.backend, "BuildInfo$") module = package.__getattr__("MODULE$") module.SWVersion()
true
true
f759d701580bc27c9665ed8d897d6e58dee7d2ef
18,909
py
Python
pypureclient/flasharray/FA_2_2/api/remote_volume_snapshots_api.py
Flav-STOR-WL/py-pure-client
03b889c997d90380ac5d6380ca5d5432792d3e89
[ "BSD-2-Clause" ]
14
2018-12-07T18:30:27.000Z
2022-02-22T09:12:33.000Z
pypureclient/flasharray/FA_2_2/api/remote_volume_snapshots_api.py
Flav-STOR-WL/py-pure-client
03b889c997d90380ac5d6380ca5d5432792d3e89
[ "BSD-2-Clause" ]
28
2019-09-17T21:03:52.000Z
2022-03-29T22:07:35.000Z
pypureclient/flasharray/FA_2_2/api/remote_volume_snapshots_api.py
Flav-STOR-WL/py-pure-client
03b889c997d90380ac5d6380ca5d5432792d3e89
[ "BSD-2-Clause" ]
15
2020-06-11T15:50:08.000Z
2022-03-21T09:27:25.000Z
# coding: utf-8 """ FlashArray REST API No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: 2.2 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import re # pyth...
56.276786
671
0.657676
from __future__ import absolute_import import re import six from typing import List, Optional from .. import models class RemoteVolumeSnapshotsApi(object): def __init__(self, api_client): self.api_client = api_client def api22_remote_volume_snapshots_get_with_http_info( self, au...
true
true
f759d7744a21fcc2476340607e301473ad8af990
1,113
py
Python
interview/leet/BST.py
eroicaleo/LearningPython
297d46eddce6e43ce0c160d2660dff5f5d616800
[ "MIT" ]
1
2020-10-12T13:33:29.000Z
2020-10-12T13:33:29.000Z
interview/leet/BST.py
eroicaleo/LearningPython
297d46eddce6e43ce0c160d2660dff5f5d616800
[ "MIT" ]
null
null
null
interview/leet/BST.py
eroicaleo/LearningPython
297d46eddce6e43ce0c160d2660dff5f5d616800
[ "MIT" ]
1
2016-11-09T07:28:45.000Z
2016-11-09T07:28:45.000Z
#!/usr/bin/env python from tree import TreeNode class BST: def __init__(self): self.root = None def put(self, val): self.root = self.put_int(self.root, val) def put_int(self, node, val): if node == None: return TreeNode(val) if val < node.val: nod...
25.295455
90
0.546271
from tree import TreeNode class BST: def __init__(self): self.root = None def put(self, val): self.root = self.put_int(self.root, val) def put_int(self, node, val): if node == None: return TreeNode(val) if val < node.val: node.left = self.put_int(...
true
true
f759d855562143a44ed678b1d083204c9d6628cf
21,790
py
Python
pypesto/objective/amici.py
m-philipps/pyPESTO
4c30abfca56ba714c302141cd44a9dd366bff4bb
[ "BSD-3-Clause" ]
null
null
null
pypesto/objective/amici.py
m-philipps/pyPESTO
4c30abfca56ba714c302141cd44a9dd366bff4bb
[ "BSD-3-Clause" ]
null
null
null
pypesto/objective/amici.py
m-philipps/pyPESTO
4c30abfca56ba714c302141cd44a9dd366bff4bb
[ "BSD-3-Clause" ]
null
null
null
import abc import copy import os import tempfile from collections import OrderedDict from typing import Dict, Optional, Sequence, Tuple, Union import numpy as np from ..C import FVAL, MODE_FUN, MODE_RES, RDATAS from .amici_calculator import AmiciCalculator from .amici_util import ( create_identity_parameter_mappi...
35.838816
79
0.598118
import abc import copy import os import tempfile from collections import OrderedDict from typing import Dict, Optional, Sequence, Tuple, Union import numpy as np from ..C import FVAL, MODE_FUN, MODE_RES, RDATAS from .amici_calculator import AmiciCalculator from .amici_util import ( create_identity_parameter_mappi...
true
true
f759d906fe474ce5ead49ace36bb5de6ba9a1eac
1,481
py
Python
tests/test_datadog.py
polyswarm/microengine-utils
ec3bd59fce5abf9f273f3149616d82dba4542de4
[ "MIT" ]
1
2021-11-13T19:26:28.000Z
2021-11-13T19:26:28.000Z
tests/test_datadog.py
polyswarm/microengine-utils
ec3bd59fce5abf9f273f3149616d82dba4542de4
[ "MIT" ]
3
2020-07-16T16:11:26.000Z
2021-07-16T12:54:13.000Z
tests/test_datadog.py
polyswarm/microengine-utils
ec3bd59fce5abf9f273f3149616d82dba4542de4
[ "MIT" ]
1
2021-04-26T10:59:10.000Z
2021-04-26T10:59:10.000Z
import os from time import sleep from unittest import TestCase from datadog import ThreadStats from microengine_utils.constants import SCAN_TIME, SCAN_VERDICT from microengine_utils.datadog import configure_metrics DATADOG_API_KEY = 'my_api_key' DATADOG_APP_KEY = 'my_app_key' # Configure Datadog metric keys for use ...
32.195652
99
0.626604
import os from time import sleep from unittest import TestCase from datadog import ThreadStats from microengine_utils.constants import SCAN_TIME, SCAN_VERDICT from microengine_utils.datadog import configure_metrics DATADOG_API_KEY = 'my_api_key' DATADOG_APP_KEY = 'my_app_key' ENGINE_NAME = 'myengine' SCANNER_TYPE = ...
true
true
f759daf1a17d9ed8c495d21060a227d5af664d9f
4,798
py
Python
ElectroWeakAnalysis/ZMuMu/test/zMuMuIsolationAnalysis.py
SWuchterl/cmssw
769b4a7ef81796579af7d626da6039dfa0347b8e
[ "Apache-2.0" ]
6
2017-09-08T14:12:56.000Z
2022-03-09T23:57:01.000Z
ElectroWeakAnalysis/ZMuMu/test/zMuMuIsolationAnalysis.py
SWuchterl/cmssw
769b4a7ef81796579af7d626da6039dfa0347b8e
[ "Apache-2.0" ]
545
2017-09-19T17:10:19.000Z
2022-03-07T16:55:27.000Z
ElectroWeakAnalysis/ZMuMu/test/zMuMuIsolationAnalysis.py
SWuchterl/cmssw
769b4a7ef81796579af7d626da6039dfa0347b8e
[ "Apache-2.0" ]
14
2017-10-04T09:47:21.000Z
2019-10-23T18:04:45.000Z
from __future__ import print_function import FWCore.ParameterSet.Config as cms import copy process = cms.Process("ZMuMuIsolationAnalysis") process.TFileService=cms.Service( "TFileService", fileName=cms.string("Prova_W_Isolamento.root") ) process.maxEvents = cms.untracked.PSet( input = cms.untracked.i...
33.552448
159
0.680075
from __future__ import print_function import FWCore.ParameterSet.Config as cms import copy process = cms.Process("ZMuMuIsolationAnalysis") process.TFileService=cms.Service( "TFileService", fileName=cms.string("Prova_W_Isolamento.root") ) process.maxEvents = cms.untracked.PSet( input = cms.untracked.i...
true
true
f759dc78bf83551caab36f010fd95594a60b05ba
2,137
py
Python
tests/functional/test_stacks_data/cluster_proto_wo_actions/services/cluster/job.py
dimuha-rs/adcm
0f49cc9ece16c1e257be12375a64b65a34b3a3ae
[ "Apache-2.0" ]
null
null
null
tests/functional/test_stacks_data/cluster_proto_wo_actions/services/cluster/job.py
dimuha-rs/adcm
0f49cc9ece16c1e257be12375a64b65a34b3a3ae
[ "Apache-2.0" ]
null
null
null
tests/functional/test_stacks_data/cluster_proto_wo_actions/services/cluster/job.py
dimuha-rs/adcm
0f49cc9ece16c1e257be12375a64b65a34b3a3ae
[ "Apache-2.0" ]
null
null
null
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
37.491228
96
0.696303
from cm.logger import log from cm.errors import AdcmEx from cm.models import Prototype, Action def task_generator(action, selector): log.debug("call task_generator: %s", action) try: service = Prototype.objects.get(type='service', name='ZOOKEEPER', version='1.2') except Prototype.DoesNotExist: ...
true
true
f759dccbfc554accce962735cdbc9369821eec31
10,115
py
Python
tests/reproduction/reproduction_test.py
shaheen19/FAIR
345c23b3d35918729e7aa49ecb39047494c48a6e
[ "Apache-2.0" ]
1
2019-09-15T02:35:47.000Z
2019-09-15T02:35:47.000Z
tests/reproduction/reproduction_test.py
shaheen19/FAIR
345c23b3d35918729e7aa49ecb39047494c48a6e
[ "Apache-2.0" ]
null
null
null
tests/reproduction/reproduction_test.py
shaheen19/FAIR
345c23b3d35918729e7aa49ecb39047494c48a6e
[ "Apache-2.0" ]
null
null
null
import pytest import fair from fair.RCPs import rcp3pd, rcp45, rcp6, rcp85, rcp26, rcp60 import numpy as np import os from fair.constants import molwt, radeff, lifetime from fair.tools.constrain import hist_temp from fair.tools.gwp import gwp def test_ten_GtC_pulse(): emissions = np.zeros(250) emissions[125:]...
35.491228
172
0.660504
import pytest import fair from fair.RCPs import rcp3pd, rcp45, rcp6, rcp85, rcp26, rcp60 import numpy as np import os from fair.constants import molwt, radeff, lifetime from fair.tools.constrain import hist_temp from fair.tools.gwp import gwp def test_ten_GtC_pulse(): emissions = np.zeros(250) emissions[125:]...
true
true
f759dd794a5b54ac87f184b7e8ffec4dbb0e82ba
5,850
py
Python
v1pysdk/base_asset.py
jeremy-w/VersionOne.SDK.Python
cb06bd2017fb7e6e27c1848223356c7d61d1a9d3
[ "BSD-3-Clause" ]
null
null
null
v1pysdk/base_asset.py
jeremy-w/VersionOne.SDK.Python
cb06bd2017fb7e6e27c1848223356c7d61d1a9d3
[ "BSD-3-Clause" ]
null
null
null
v1pysdk/base_asset.py
jeremy-w/VersionOne.SDK.Python
cb06bd2017fb7e6e27c1848223356c7d61d1a9d3
[ "BSD-3-Clause" ]
1
2020-05-01T21:06:49.000Z
2020-05-01T21:06:49.000Z
from pprint import pformat as pf from query import V1Query class BaseAsset(object): """Provides common methods for the dynamically derived asset type classes built by V1Meta.asset_class""" @classmethod def query(Class, where=None, sel=None): 'Takes a V1 Data query string and returns an iterable o...
31.283422
94
0.666496
from pprint import pformat as pf from query import V1Query class BaseAsset(object): @classmethod def query(Class, where=None, sel=None): return V1Query(Class, sel, where) @classmethod def select(Class, *selectlist): return V1Query(Class).select(*selectlist) @classmethod def where(Cla...
true
true
f759de597f6f1d85acba015e168bd2f38f09ee20
4,695
py
Python
matplotlib/gallery_python/event_handling/path_editor.py
gottaegbert/penter
8cbb6be3c4bf67c7c69fa70e597bfbc3be4f0a2d
[ "MIT" ]
13
2020-01-04T07:37:38.000Z
2021-08-31T05:19:58.000Z
matplotlib/gallery_python/event_handling/path_editor.py
gottaegbert/penter
8cbb6be3c4bf67c7c69fa70e597bfbc3be4f0a2d
[ "MIT" ]
3
2020-06-05T22:42:53.000Z
2020-08-24T07:18:54.000Z
matplotlib/gallery_python/event_handling/path_editor.py
gottaegbert/penter
8cbb6be3c4bf67c7c69fa70e597bfbc3be4f0a2d
[ "MIT" ]
9
2020-10-19T04:53:06.000Z
2021-08-31T05:20:01.000Z
""" =========== Path Editor =========== Sharing events across GUIs. This example demonstrates a cross-GUI application using Matplotlib event handling to interact with and modify objects on the canvas. """ import numpy as np import matplotlib.path as mpath import matplotlib.patches as mpatches import matplotlib.pyplot...
28.981481
82
0.615974
import numpy as np import matplotlib.path as mpath import matplotlib.patches as mpatches import matplotlib.pyplot as plt Path = mpath.Path fig, ax = plt.subplots() pathdata = [ (Path.MOVETO, (1.58, -2.57)), (Path.CURVE4, (0.35, -1.1)), (Path.CURVE4, (-1.75, 2.0)), (Path.CURVE4, (0.375, 2.0)), (Pa...
true
true
f759debaab346738f5baa4e8d1fb9c26d94ba337
3,528
py
Python
manila_ui/dashboards/admin/share_servers/views.py
dinaSap/manila-ui
3b8d685dd7830da3c8c703bab3355902dcb1e610
[ "Apache-2.0" ]
29
2015-05-02T16:19:12.000Z
2022-03-29T06:51:16.000Z
manila_ui/dashboards/admin/share_servers/views.py
dinaSap/manila-ui
3b8d685dd7830da3c8c703bab3355902dcb1e610
[ "Apache-2.0" ]
null
null
null
manila_ui/dashboards/admin/share_servers/views.py
dinaSap/manila-ui
3b8d685dd7830da3c8c703bab3355902dcb1e610
[ "Apache-2.0" ]
17
2015-09-18T16:00:32.000Z
2021-10-16T03:17:37.000Z
# Copyright 2012 Nebula, 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 agree...
38.347826
78
0.693878
from django.urls import reverse from django.urls import reverse_lazy from django.utils.translation import ugettext_lazy as _ from horizon import exceptions from horizon import tables from horizon import tabs from horizon.utils import memoized from manila_ui.api import manila from manila_ui.dashboards.admin.share_ser...
true
true
f759df5e07ac9570a07a8ab9f13cee6e21a2d243
130,040
py
Python
pycocosn/classes.py
UoS-SNe/pycoco
bbcb09b6c8fde7e0c4464bfbd574a42e09dbfed2
[ "MIT" ]
1
2018-02-22T21:14:21.000Z
2018-02-22T21:14:21.000Z
pycocosn/classes.py
UoS-SNe/pycoco
bbcb09b6c8fde7e0c4464bfbd574a42e09dbfed2
[ "MIT" ]
null
null
null
pycocosn/classes.py
UoS-SNe/pycoco
bbcb09b6c8fde7e0c4464bfbd574a42e09dbfed2
[ "MIT" ]
null
null
null
""" Workhorse classes for interacting/running the CoCo templates. author: Rob Firth; github.com/RobFirth ; University of Southampton SN Group 2017 """ from __future__ import print_function ## Force python3-like printing import os import re import warnings from collections import OrderedDict import astropy....
36.072122
215
0.53815
from __future__ import print_function import os import re import warnings from collections import OrderedDict import astropy.units as u import numpy as np from astropy.constants import c from astropy.coordinates import SkyCoord, Distance from astropy.table import Table, vstack, Row, Column from astropy.time import ...
true
true
f759df7f9920a00d481640a3e5e29c834b855596
116,487
py
Python
gpu/command_buffer/build_gles2_cmd_buffer.py
chromium/chromium
df46e572c3449a4b108d6e02fbe4f6d24cf98381
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
14,668
2015-01-01T01:57:10.000Z
2022-03-31T23:33:32.000Z
gpu/command_buffer/build_gles2_cmd_buffer.py
chromium/chromium
df46e572c3449a4b108d6e02fbe4f6d24cf98381
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
86
2015-10-21T13:02:42.000Z
2022-03-14T07:50:50.000Z
gpu/command_buffer/build_gles2_cmd_buffer.py
chromium/chromium
df46e572c3449a4b108d6e02fbe4f6d24cf98381
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
5,941
2015-01-02T11:32:21.000Z
2022-03-31T16:35:46.000Z
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """code generator for GLES2 command buffers.""" import filecmp import os import os.path import sys from optparse import OptionParse...
26.821782
80
0.613639
"""code generator for GLES2 command buffers.""" import filecmp import os import os.path import sys from optparse import OptionParser import build_cmd_buffer_lib _NAMED_TYPE_INFO = { 'BlitFilter': { 'type': 'GLenum', 'is_complete': True, 'valid': [ 'GL_NEAREST', 'GL_LINEAR', ], 'inva...
false
true
f759df8f97374d60477ff19eac312e543fb26aa4
359
py
Python
applied-statistics/python-revisited/libraries/numpy/sorting.py
TXM-DOOM/B.Tech-CSE-Y2
763436ae866f1f18fa8071c253d005bdf289532f
[ "MIT" ]
null
null
null
applied-statistics/python-revisited/libraries/numpy/sorting.py
TXM-DOOM/B.Tech-CSE-Y2
763436ae866f1f18fa8071c253d005bdf289532f
[ "MIT" ]
null
null
null
applied-statistics/python-revisited/libraries/numpy/sorting.py
TXM-DOOM/B.Tech-CSE-Y2
763436ae866f1f18fa8071c253d005bdf289532f
[ "MIT" ]
null
null
null
import numpy as np testArr1 = np.array([1, 20, 23, 14, 2, 1, 234, 12, 1, 3]) # Sorts in ascending order testArr2 = np.array([True, False, False, True]) # False at the start of the array and then True testArr3 = np.array(['C', 'A', 'Z', 'V']) # Sorts Alphabetically print('1: {}\n2: {}\n3: {}'.format(np.sort(testArr1),...
51.285714
95
0.64624
import numpy as np testArr1 = np.array([1, 20, 23, 14, 2, 1, 234, 12, 1, 3]) testArr2 = np.array([True, False, False, True]) testArr3 = np.array(['C', 'A', 'Z', 'V']) print('1: {}\n2: {}\n3: {}'.format(np.sort(testArr1), np.sort(testArr2), np.sort(testArr3)))
true
true
f759e0ddeaabedc4cf2902532281b9707757ad19
2,585
py
Python
aristomini/common/wordtwovec.py
benjamin-work/aristo-mini
4d99fa4cb9eb1e64d0d21adfea15450d626cfcba
[ "Apache-2.0" ]
null
null
null
aristomini/common/wordtwovec.py
benjamin-work/aristo-mini
4d99fa4cb9eb1e64d0d21adfea15450d626cfcba
[ "Apache-2.0" ]
null
null
null
aristomini/common/wordtwovec.py
benjamin-work/aristo-mini
4d99fa4cb9eb1e64d0d21adfea15450d626cfcba
[ "Apache-2.0" ]
null
null
null
""" a wrapper class for the gensim Word2Vec model that has extra features we need, as well as some helper functions for tokenizing and stemming and things like that. """ from functools import lru_cache import math from typing import Iterable, List from gensim.parsing.preprocessing import STOPWORDS from gensim.parsing...
33.571429
94
0.682012
from functools import lru_cache import math from typing import Iterable, List from gensim.parsing.preprocessing import STOPWORDS from gensim.parsing.porter import PorterStemmer from gensim.models import Word2Vec from gensim.utils import simple_preprocess import numpy as np stemmer = PorterStemmer() @lru_cache(max...
true
true
f759e2c1daed9eab320be9bab581c18d7d7234ec
4,418
py
Python
ryu/lib/packet/vlan.py
hiArvin/ryu
b568088f8fe1d2334d9773f6ddaac8674f2a0f61
[ "Apache-2.0" ]
269
2015-03-08T11:32:45.000Z
2022-03-30T11:18:16.000Z
ryu/lib/packet/vlan.py
hiArvin/ryu
b568088f8fe1d2334d9773f6ddaac8674f2a0f61
[ "Apache-2.0" ]
2
2015-09-14T14:18:39.000Z
2015-09-14T14:23:16.000Z
ryu/lib/packet/vlan.py
hiArvin/ryu
b568088f8fe1d2334d9773f6ddaac8674f2a0f61
[ "Apache-2.0" ]
205
2015-01-13T04:52:25.000Z
2022-03-30T13:37:33.000Z
# Copyright (C) 2012 Nippon Telegraph and Telephone Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
33.725191
77
0.649842
import abc import six import struct from . import packet_base from . import arp from . import ipv4 from . import ipv6 from . import lldp from . import slow from . import llc from . import pbb from . import cfm from ryu.ofproto import ether @six.add_metaclass(abc.ABCMeta) class _vlan(packet_base.PacketBase): _PAC...
true
true
f759e2c23cd4b8e1e1b534bffdb693b2e9d02ff4
5,166
py
Python
stcloud/models/invoice_response.py
sematext/sematext-api-client-python
16e025cd3d32aa58deb70fc5930ae4165afebe97
[ "Apache-2.0" ]
1
2020-05-01T12:15:52.000Z
2020-05-01T12:15:52.000Z
stcloud/models/invoice_response.py
sematext/sematext-api-client-python
16e025cd3d32aa58deb70fc5930ae4165afebe97
[ "Apache-2.0" ]
null
null
null
stcloud/models/invoice_response.py
sematext/sematext-api-client-python
16e025cd3d32aa58deb70fc5930ae4165afebe97
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Sematext Cloud API API Explorer provides access and documentation for Sematext REST API. The REST API requires the API Key to be sent as part of `Authorization` header. E.g.: `Authorization : apiKey e5f18450-205a-48eb-8589-7d49edaea813`. # noqa: E501 OpenAPI spec version: v3 ...
27.333333
236
0.566009
import pprint import re import six class InvoiceResponse(object): swagger_types = { 'data': 'InvoiceResponseEntry', 'errors': 'list[Error]', 'message': 'str', 'success': 'bool' } attribute_map = { 'data': 'data', 'errors': 'errors', 'message': 'm...
true
true
f759e32d5f2b2b8b628329f7039a397aecc2c64e
370
py
Python
app/core/migrations/0006_auto_20200421_1326.py
saku3/recipe-app-api
f04f40823d6894a6a8c81d6882e237e3fe391487
[ "MIT" ]
null
null
null
app/core/migrations/0006_auto_20200421_1326.py
saku3/recipe-app-api
f04f40823d6894a6a8c81d6882e237e3fe391487
[ "MIT" ]
null
null
null
app/core/migrations/0006_auto_20200421_1326.py
saku3/recipe-app-api
f04f40823d6894a6a8c81d6882e237e3fe391487
[ "MIT" ]
null
null
null
# Generated by Django 2.2.12 on 2020-04-21 13:26 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('core', '0005_auto_20200421_1228'), ] operations = [ migrations.RenameField( model_name='recipe', old_name='ingredient', ...
19.473684
48
0.591892
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('core', '0005_auto_20200421_1228'), ] operations = [ migrations.RenameField( model_name='recipe', old_name='ingredient', new_name='ingredients', ), ]...
true
true
f759e3430fffff72e7865e95baa61ca815027f8b
1,006
py
Python
704 Binary Search.py
krishna13052001/LeetCode
cd6ec626bea61f0bd9e8493622074f9e69a7a1c3
[ "MIT" ]
872
2015-06-15T12:02:41.000Z
2022-03-30T08:44:35.000Z
704 Binary Search.py
nadeemshaikh-github/LeetCode
3fb14aeea62a960442e47dfde9f964c7ffce32be
[ "MIT" ]
8
2015-06-21T15:11:59.000Z
2022-02-01T11:22:34.000Z
704 Binary Search.py
nadeemshaikh-github/LeetCode
3fb14aeea62a960442e47dfde9f964c7ffce32be
[ "MIT" ]
328
2015-06-28T03:10:35.000Z
2022-03-29T11:05:28.000Z
#!/usr/bin/python3 """ Given a sorted (in ascending order) integer array nums of n elements and a target value, write a function to search target in nums. If target exists, then return its index, otherwise return -1. Example 1: Input: nums = [-1,0,3,5,9,12], target = 9 Output: 4 Explanation: 9 exists in nums and its...
22.863636
79
0.595427
from typing import List class Solution: def search(self, nums: List[int], target: int) -> int: lo = 0 hi = len(nums) while lo < hi: mid = (lo + hi) // 2 if nums[mid] == target: return mid elif nums[mid] < target: lo = mid ...
true
true
f759e3f9235fc0572b99a579f9302480bd5cd652
12,500
py
Python
code/python/FundsAPIforDigitalPortals/v2/fds/sdk/FundsAPIforDigitalPortals/model/inline_response2006_data_legal_entities_custodian_bank.py
factset/enterprise-sdk
3fd4d1360756c515c9737a0c9a992c7451d7de7e
[ "Apache-2.0" ]
6
2022-02-07T16:34:18.000Z
2022-03-30T08:04:57.000Z
code/python/FundsAPIforDigitalPortals/v2/fds/sdk/FundsAPIforDigitalPortals/model/inline_response2006_data_legal_entities_custodian_bank.py
factset/enterprise-sdk
3fd4d1360756c515c9737a0c9a992c7451d7de7e
[ "Apache-2.0" ]
2
2022-02-07T05:25:57.000Z
2022-03-07T14:18:04.000Z
code/python/FundsAPIforDigitalPortals/v2/fds/sdk/FundsAPIforDigitalPortals/model/inline_response2006_data_legal_entities_custodian_bank.py
factset/enterprise-sdk
3fd4d1360756c515c9737a0c9a992c7451d7de7e
[ "Apache-2.0" ]
null
null
null
""" Funds API For Digital Portals Search for mutual funds and ETFs using one single consolidated API, including a criteria-based screener. The API provides also base data, key figures, and holdings. A separate endpoint returns the possible values and value range for the parameters that the endpoint /fund/nota...
48.076923
1,125
0.59496
import re import sys from fds.sdk.FundsAPIforDigitalPortals.model_utils import ( ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_type, validate_get_comp...
true
true
f759e451bcb1f89f55bd659929f8688f45e6b0df
8,704
py
Python
saleor/graphql/order/mutations/fulfillments.py
PhuongLam94/saleor
1c0a773d8d025bd215d68fa406441cc98ead0c05
[ "BSD-3-Clause" ]
2
2018-12-24T01:00:13.000Z
2019-01-21T15:09:16.000Z
saleor/graphql/order/mutations/fulfillments.py
denis554/saleor
c14de2dbe00b4df90c6385feb75d0a4c862e2b0d
[ "BSD-3-Clause" ]
5
2020-03-24T16:25:25.000Z
2021-06-10T20:57:33.000Z
saleor/graphql/order/mutations/fulfillments.py
akikieng/aee-saleor
db3231904020c1cd38df0518b19795ccafd382a2
[ "BSD-3-Clause" ]
2
2019-01-08T02:32:42.000Z
2021-07-05T14:05:55.000Z
import graphene from django.utils.translation import npgettext_lazy, pgettext_lazy from graphql_jwt.decorators import permission_required from ....dashboard.order.utils import fulfill_order_line from ....order import OrderEvents, OrderEventsEmails, models from ....order.emails import send_fulfillment_confirmation from...
38.343612
79
0.647403
import graphene from django.utils.translation import npgettext_lazy, pgettext_lazy from graphql_jwt.decorators import permission_required from ....dashboard.order.utils import fulfill_order_line from ....order import OrderEvents, OrderEventsEmails, models from ....order.emails import send_fulfillment_confirmation from...
true
true
f759e52abceae2840d3914aeef7618ae041ef30c
3,955
py
Python
cloudasr/shared/cloudasr/messages/helpers.py
oplatek/cloud-asr
2452aea0ff4af166af496200006dc95d42e94e57
[ "Apache-2.0" ]
null
null
null
cloudasr/shared/cloudasr/messages/helpers.py
oplatek/cloud-asr
2452aea0ff4af166af496200006dc95d42e94e57
[ "Apache-2.0" ]
null
null
null
cloudasr/shared/cloudasr/messages/helpers.py
oplatek/cloud-asr
2452aea0ff4af166af496200006dc95d42e94e57
[ "Apache-2.0" ]
null
null
null
from messages_pb2 import * def createResultsMessage(final, alternatives): message = ResultsMessage() message.status = ResultsMessage.SUCCESS message.final = final for (confidence, transcript) in alternatives: alternative = message.alternatives.add() alternative.confidence = confidence ...
25.352564
93
0.705689
from messages_pb2 import * def createResultsMessage(final, alternatives): message = ResultsMessage() message.status = ResultsMessage.SUCCESS message.final = final for (confidence, transcript) in alternatives: alternative = message.alternatives.add() alternative.confidence = confidence ...
true
true
f759e5ba04b423a1cf4c5173c9803c3dbdd6680a
2,210
py
Python
social_core/tests/backends/test_patreon.py
odidev/social-core
71b76511f0b92e4bcba60dc61d9b982bd53c5d5e
[ "BSD-3-Clause" ]
2
2020-10-08T05:44:30.000Z
2021-01-02T02:41:13.000Z
social_core/tests/backends/test_patreon.py
odidev/social-core
71b76511f0b92e4bcba60dc61d9b982bd53c5d5e
[ "BSD-3-Clause" ]
6
2021-03-30T13:54:46.000Z
2021-09-22T19:23:39.000Z
virtual/lib/python3.6/site-packages/social_core/tests/backends/test_patreon.py
dennismwaniki67/awards
80ed10541f5f751aee5f8285ab1ad54cfecba95f
[ "MIT" ]
3
2020-07-27T16:44:41.000Z
2020-09-03T15:26:22.000Z
import json from .oauth import OAuth2Test class PatreonOAuth2Test(OAuth2Test): backend_path = 'social_core.backends.patreon.PatreonOAuth2' user_data_url = 'https://www.patreon.com/api/oauth2/v2/identity?fields%5Buser%5D=about,created,email,first_name,full_name,image_url,last_name,social_connections,thumb_url...
33.484848
186
0.460181
import json from .oauth import OAuth2Test class PatreonOAuth2Test(OAuth2Test): backend_path = 'social_core.backends.patreon.PatreonOAuth2' user_data_url = 'https://www.patreon.com/api/oauth2/v2/identity?fields%5Buser%5D=about,created,email,first_name,full_name,image_url,last_name,social_connections,thumb_url...
true
true
f759e7cfa8d9f934dada6930aca6e70f6289447b
15,337
py
Python
helper.py
kw1jjang/P2PVoD
17ac0e3b88976a79b4ee577232242f3d8b9e10f3
[ "BSD-3-Clause" ]
1
2019-06-29T19:03:19.000Z
2019-06-29T19:03:19.000Z
helper.py
kw1jjang/P2PVoD
17ac0e3b88976a79b4ee577232242f3d8b9e10f3
[ "BSD-3-Clause" ]
null
null
null
helper.py
kw1jjang/P2PVoD
17ac0e3b88976a79b4ee577232242f3d8b9e10f3
[ "BSD-3-Clause" ]
null
null
null
import os import urllib2 import csv import commands import Queue import sys import math import requests import pdb DEBUGGING_MSG = True tracker_address = 'http://localhost:8080/req/' def load_tracker_address(): filename = '/tracker_address.txt' full_filename = os.path.abspath(sys.path[0]) + filename f = o...
41.339623
195
0.645693
import os import urllib2 import csv import commands import Queue import sys import math import requests import pdb DEBUGGING_MSG = True tracker_address = 'http://localhost:8080/req/' def load_tracker_address(): filename = '/tracker_address.txt' full_filename = os.path.abspath(sys.path[0]) + filename f = o...
false
true
f759e806a782eb0a74914160867fbc73feeb847a
750
py
Python
umbrella/__init__.py
retornam/umbrella-top-sites
2503111997bd2b31444fa44d655986896a18a1fb
[ "MIT" ]
null
null
null
umbrella/__init__.py
retornam/umbrella-top-sites
2503111997bd2b31444fa44d655986896a18a1fb
[ "MIT" ]
null
null
null
umbrella/__init__.py
retornam/umbrella-top-sites
2503111997bd2b31444fa44d655986896a18a1fb
[ "MIT" ]
null
null
null
import zipfile import cStringIO from urllib import urlopen DATA_URL = 'http://s3-us-west-1.amazonaws.com/umbrella-static/top-1m.csv.zip' def zip_extract(): """ Generator that: Extracts by downloading the csv.zip, unzipping. Transforms the data into python via CSV lib Loads it to the e...
24.193548
77
0.644
import zipfile import cStringIO from urllib import urlopen DATA_URL = 'http://s3-us-west-1.amazonaws.com/umbrella-static/top-1m.csv.zip' def zip_extract(): """ Generator that: Extracts by downloading the csv.zip, unzipping. Transforms the data into python via CSV lib Loads it to the e...
false
true
f759e80895f80602c24e43218cdea5eeb7253864
495
py
Python
examples/publisher_camera_sends.py
aquilesC/experimentor
1a70760912ef40f0e2aaee44ed1a1e5594fd5b45
[ "MIT" ]
4
2020-05-15T04:07:25.000Z
2020-09-30T22:20:46.000Z
examples/publisher_camera_sends.py
aquilesC/experimentor
1a70760912ef40f0e2aaee44ed1a1e5594fd5b45
[ "MIT" ]
null
null
null
examples/publisher_camera_sends.py
aquilesC/experimentor
1a70760912ef40f0e2aaee44ed1a1e5594fd5b45
[ "MIT" ]
null
null
null
import zmq from experimentor.models.devices.cameras.basler.basler import BaslerCamera cam = BaslerCamera('p') cam.initialize() ctx = zmq.Context() publisher = ctx.socket(zmq.PUB) publisher.bind('tcp://*:1234') i = 0 while True: try: cam.trigger_camera() ans = cam.read_camera()[0] publis...
19.8
74
0.648485
import zmq from experimentor.models.devices.cameras.basler.basler import BaslerCamera cam = BaslerCamera('p') cam.initialize() ctx = zmq.Context() publisher = ctx.socket(zmq.PUB) publisher.bind('tcp://*:1234') i = 0 while True: try: cam.trigger_camera() ans = cam.read_camera()[0] publis...
true
true
f759e814f57fe5ec1b432917ac4d2139e4b2f11d
5,842
py
Python
nanonisTCP/Piezo.py
New-Horizons-SPM/nanonisTCP
e810877fce41c4dc3d9ba2b18cbe619ff04c640a
[ "MIT" ]
null
null
null
nanonisTCP/Piezo.py
New-Horizons-SPM/nanonisTCP
e810877fce41c4dc3d9ba2b18cbe619ff04c640a
[ "MIT" ]
null
null
null
nanonisTCP/Piezo.py
New-Horizons-SPM/nanonisTCP
e810877fce41c4dc3d9ba2b18cbe619ff04c640a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Thu Jun 9 22:51:52 2022 @author: jced0001 """ class Piezo: """ Nanonis Piezo Module """ def __init__(self,NanonisTCP): self.NanonisTCP = NanonisTCP def TiltSet(self,tilt_x=None,tilt_y=None): """ Configures the tilt correction par...
33.768786
81
0.595515
class Piezo: def __init__(self,NanonisTCP): self.NanonisTCP = NanonisTCP def TiltSet(self,tilt_x=None,tilt_y=None): n_tilt_x,n_tilt_y = self.TiltGet() if(not tilt_x): tilt_x = n_tilt_x if(not tilt_y): tilt_y = n_tilt_y hex_rep = self.NanonisTCP.make_header(...
true
true
f759e8444204d7ae86a6c7ce7eb57ba08c80e0a9
52,543
py
Python
databricks/koalas/base.py
AishwaryaKalloli/koalas
8d35a74508c1319996c8c27e2a5e24af52b9ee31
[ "Apache-2.0" ]
null
null
null
databricks/koalas/base.py
AishwaryaKalloli/koalas
8d35a74508c1319996c8c27e2a5e24af52b9ee31
[ "Apache-2.0" ]
null
null
null
databricks/koalas/base.py
AishwaryaKalloli/koalas
8d35a74508c1319996c8c27e2a5e24af52b9ee31
[ "Apache-2.0" ]
null
null
null
# # Copyright (C) 2019 Databricks, 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 i...
34.727693
100
0.550673
from abc import ABCMeta, abstractmethod import datetime from functools import wraps, partial from typing import Any, Callable, Tuple, Union, cast, TYPE_CHECKING import warnings import numpy as np import pandas as pd from pandas.api.types import is_list_like from pyspark import sql as spark from pyspark.sql import fu...
true
true
f759e89c4b7ac65bab500d2f31fe4e73f0d59d33
11,981
py
Python
seisflows/preprocess/base.py
katigeophysics/seisflows
fa2f762874299752d233ca6803180ace82f16019
[ "BSD-2-Clause" ]
null
null
null
seisflows/preprocess/base.py
katigeophysics/seisflows
fa2f762874299752d233ca6803180ace82f16019
[ "BSD-2-Clause" ]
null
null
null
seisflows/preprocess/base.py
katigeophysics/seisflows
fa2f762874299752d233ca6803180ace82f16019
[ "BSD-2-Clause" ]
1
2021-11-19T12:51:00.000Z
2021-11-19T12:51:00.000Z
import sys import numpy as np import obspy from seisflows.tools import msg, unix from seisflows.tools.tools import exists, getset from seisflows.config import ParameterError from seisflows.plugins import adjoint, misfit, readers, writers from seisflows.tools import signal PAR = sys.modules['seisflows_parameters'] P...
29.803483
83
0.560554
import sys import numpy as np import obspy from seisflows.tools import msg, unix from seisflows.tools.tools import exists, getset from seisflows.config import ParameterError from seisflows.plugins import adjoint, misfit, readers, writers from seisflows.tools import signal PAR = sys.modules['seisflows_parameters'] P...
false
true
f759e90b0ac9faf6b231bea461f8c169ba729272
10,728
py
Python
nova/api/openstack/compute/contrib/simple_tenant_usage.py
NetApp/nova
ca490d48a762a423449c654d5a7caeadecf2f6ca
[ "Apache-2.0" ]
2
2015-11-05T04:52:34.000Z
2016-03-07T03:00:06.000Z
nova/api/openstack/compute/contrib/simple_tenant_usage.py
NetApp/nova
ca490d48a762a423449c654d5a7caeadecf2f6ca
[ "Apache-2.0" ]
null
null
null
nova/api/openstack/compute/contrib/simple_tenant_usage.py
NetApp/nova
ca490d48a762a423449c654d5a7caeadecf2f6ca
[ "Apache-2.0" ]
1
2020-07-24T08:14:24.000Z
2020-07-24T08:14:24.000Z
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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.apach...
39.010909
79
0.553598
import datetime import urlparse from webob import exc from nova.api.openstack import extensions from nova.api.openstack import wsgi from nova.api.openstack import xmlutil from nova.compute import api from nova import exception from nova.openstack.common import timeutils authorize_show = extensions.extension_author...
true
true
f759e9642c0ee7a18dd0b0eb22eeb6f22c6ca1d2
381
py
Python
portfolio/migrations/0002_project_date.py
matthew-t-smith/Portfolio
cb2a3ce5479c0f521781757f3182c0e6dd78e424
[ "MIT" ]
null
null
null
portfolio/migrations/0002_project_date.py
matthew-t-smith/Portfolio
cb2a3ce5479c0f521781757f3182c0e6dd78e424
[ "MIT" ]
null
null
null
portfolio/migrations/0002_project_date.py
matthew-t-smith/Portfolio
cb2a3ce5479c0f521781757f3182c0e6dd78e424
[ "MIT" ]
null
null
null
# Generated by Django 2.0.3 on 2018-04-28 04:17 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('portfolio', '0001_initial'), ] operations = [ migrations.AddField( model_name='project', name='date', fi...
20.052632
57
0.582677
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('portfolio', '0001_initial'), ] operations = [ migrations.AddField( model_name='project', name='date', field=models.DateField(default='2018-05-07'), ...
true
true
f759ea7c2b2f5fa3eccc1e9b741410287de6529c
48
py
Python
dataExtract/__init__.py
dshadowwolf/pdf-data-extractor
754a00649873ec43399f227858b6d9ddb2b32666
[ "MIT" ]
null
null
null
dataExtract/__init__.py
dshadowwolf/pdf-data-extractor
754a00649873ec43399f227858b6d9ddb2b32666
[ "MIT" ]
null
null
null
dataExtract/__init__.py
dshadowwolf/pdf-data-extractor
754a00649873ec43399f227858b6d9ddb2b32666
[ "MIT" ]
null
null
null
__all__ = ["Deskew", "YAMLBits", "ImageUtils"]
16
46
0.645833
__all__ = ["Deskew", "YAMLBits", "ImageUtils"]
true
true
f759ead90c028b84bcb8ec7e041c6e570af059de
1,537
py
Python
duke-cs671-fall21-coupon-recommendation/outputs/rules/RF/4_features/numtrees_45/rule_41.py
apcarrik/kaggle
6e2d4db58017323e7ba5510bcc2598e01a4ee7bf
[ "MIT" ]
null
null
null
duke-cs671-fall21-coupon-recommendation/outputs/rules/RF/4_features/numtrees_45/rule_41.py
apcarrik/kaggle
6e2d4db58017323e7ba5510bcc2598e01a4ee7bf
[ "MIT" ]
null
null
null
duke-cs671-fall21-coupon-recommendation/outputs/rules/RF/4_features/numtrees_45/rule_41.py
apcarrik/kaggle
6e2d4db58017323e7ba5510bcc2598e01a4ee7bf
[ "MIT" ]
null
null
null
def findDecision(obj): #obj[0]: Coupon, obj[1]: Education, obj[2]: Occupation, obj[3]: Distance # {"feature": "Education", "instances": 23, "metric_value": 0.9877, "depth": 1} if obj[1]>0: # {"feature": "Coupon", "instances": 14, "metric_value": 0.9403, "depth": 2} if obj[0]>2: # {"feature": "Occupation", "ins...
32.020833
95
0.571243
def findDecision(obj): if obj[1]>0: if obj[0]>2: if obj[2]<=6: if obj[3]<=2: return 'True' elif obj[3]>2: return 'True' else: return 'True' elif obj[2]>6: return 'False' else: return 'False' elif obj[0]<=2: if obj[2]>1: if obj[3]>1: return 'True' ...
true
true
f759eb3658951746521f40b4331ae5e380fca6d8
233
py
Python
exceptions/NoProfileIDException.py
johnyenter-briars/Grove
a1a3e784b3ae22113d2596ecea019b52aa2c138d
[ "MIT" ]
null
null
null
exceptions/NoProfileIDException.py
johnyenter-briars/Grove
a1a3e784b3ae22113d2596ecea019b52aa2c138d
[ "MIT" ]
null
null
null
exceptions/NoProfileIDException.py
johnyenter-briars/Grove
a1a3e784b3ae22113d2596ecea019b52aa2c138d
[ "MIT" ]
null
null
null
class NoProfileIDException(Exception): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self._messageString = "The user navigated to a page without providing a profileID in the query string"
46.6
110
0.708155
class NoProfileIDException(Exception): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self._messageString = "The user navigated to a page without providing a profileID in the query string"
true
true
f759eb903a85a5706cf7d4af89efc6098dc28caf
1,424
py
Python
aliyun-python-sdk-idrsservice/aliyunsdkidrsservice/request/v20200630/GetTaskRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
1,001
2015-07-24T01:32:41.000Z
2022-03-25T01:28:18.000Z
aliyun-python-sdk-idrsservice/aliyunsdkidrsservice/request/v20200630/GetTaskRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
363
2015-10-20T03:15:00.000Z
2022-03-08T12:26:19.000Z
aliyun-python-sdk-idrsservice/aliyunsdkidrsservice/request/v20200630/GetTaskRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
682
2015-09-22T07:19:02.000Z
2022-03-22T09:51:46.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 u...
37.473684
82
0.765449
from aliyunsdkcore.request import RpcRequest from aliyunsdkidrsservice.endpoint import endpoint_data class GetTaskRequest(RpcRequest): def __init__(self): RpcRequest.__init__(self, 'idrsservice', '2020-06-30', 'GetTask','idrsservice') self.set_method('POST') if hasattr(self, "endpoint_map"): setattr(self,...
true
true
f759ebcd19d68227b8138e0cf0871d810a6fd937
2,451
py
Python
object_detection/YOLO_v3/model/yolov3.py
taolon2018/Tensorflow2_Models
b931b6779e8d2fc775bcaa1e9cbcad6edf0438f4
[ "MIT" ]
1
2021-01-06T14:23:26.000Z
2021-01-06T14:23:26.000Z
object_detection/YOLO_v3/model/yolov3.py
taolon2018/Tensorflow2_Models
b931b6779e8d2fc775bcaa1e9cbcad6edf0438f4
[ "MIT" ]
null
null
null
object_detection/YOLO_v3/model/yolov3.py
taolon2018/Tensorflow2_Models
b931b6779e8d2fc775bcaa1e9cbcad6edf0438f4
[ "MIT" ]
null
null
null
import tensorflow as tf from object_detection.YOLO_v3.backbone.darknet53 import Darknet53, ConvLayer class ConvSet(tf.keras.layers.Layer): def __init__(self, output_dim): super(ConvSet, self).__init__() self.conv_1 = ConvLayer(output_dim, 1) self.conv_2 = ConvLayer(output_dim * 2, 3) ...
32.68
82
0.611587
import tensorflow as tf from object_detection.YOLO_v3.backbone.darknet53 import Darknet53, ConvLayer class ConvSet(tf.keras.layers.Layer): def __init__(self, output_dim): super(ConvSet, self).__init__() self.conv_1 = ConvLayer(output_dim, 1) self.conv_2 = ConvLayer(output_dim * 2, 3) ...
true
true
f759ec0515e81f95291c2f7906281ca3e7780949
505
py
Python
Lib/site-packages/plotly/validators/contourcarpet/line/_color.py
tytanya/my-first-blog
2b40adb0816c3546e90ad6ca1e7fb50d924c1536
[ "bzip2-1.0.6" ]
12
2020-04-18T18:10:22.000Z
2021-12-06T10:11:15.000Z
plotly/validators/contourcarpet/line/_color.py
Vesauza/plotly.py
e53e626d59495d440341751f60aeff73ff365c28
[ "MIT" ]
6
2021-03-18T22:27:08.000Z
2022-03-11T23:40:50.000Z
plotly/validators/contourcarpet/line/_color.py
Vesauza/plotly.py
e53e626d59495d440341751f60aeff73ff365c28
[ "MIT" ]
6
2020-04-18T23:07:08.000Z
2021-11-18T07:53:06.000Z
import _plotly_utils.basevalidators class ColorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name='color', parent_name='contourcarpet.line', **kwargs ): super(ColorValidator, self).__init__( plotly_name=plotly_name, parent_name=pare...
29.705882
77
0.621782
import _plotly_utils.basevalidators class ColorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name='color', parent_name='contourcarpet.line', **kwargs ): super(ColorValidator, self).__init__( plotly_name=plotly_name, parent_name=pare...
true
true
f759ec12795768cb704b4030e4c9b4ecc63876f1
774
py
Python
algorithms/rotateList/rotateList.py
zhyu/leetcode
3c2d85b4b7a497ceffac3e562ac1a468f1f6a4b0
[ "MIT" ]
5
2015-02-18T10:17:12.000Z
2016-11-14T19:12:21.000Z
algorithms/rotateList/rotateList.py
zhyu/leetcode
3c2d85b4b7a497ceffac3e562ac1a468f1f6a4b0
[ "MIT" ]
null
null
null
algorithms/rotateList/rotateList.py
zhyu/leetcode
3c2d85b4b7a497ceffac3e562ac1a468f1f6a4b0
[ "MIT" ]
null
null
null
# Definition for singly-linked list. # class ListNode: # def __init__(self, x): # self.val = x # self.next = None class Solution: # @param head, a ListNode # @param k, an integer # @return a ListNode def rotateRight(self, head, k): if not head: return None ...
22.114286
45
0.492248
class Solution: def rotateRight(self, head, k): if not head: return None n = self.len(head) k %= n if k == 0: return head slow = fast = head for _ in xrange(k): fast = fast.next while fast.next: sl...
true
true
f759ed465c6240f572b471464bc3effea4e1b950
46,572
py
Python
cvprac/cvp_client.py
titom73/cvprac
3ec7e312c594da585fdf22d841f10e0ea3e24dd1
[ "BSD-3-Clause" ]
null
null
null
cvprac/cvp_client.py
titom73/cvprac
3ec7e312c594da585fdf22d841f10e0ea3e24dd1
[ "BSD-3-Clause" ]
null
null
null
cvprac/cvp_client.py
titom73/cvprac
3ec7e312c594da585fdf22d841f10e0ea3e24dd1
[ "BSD-3-Clause" ]
null
null
null
# # Copyright (c) 2017, Arista Networks, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # Redistributions of source code must retain the above copyright notice, # this list of condit...
48.5125
84
0.570987
import os import re import json import logging from logging.handlers import SysLogHandler from itertools import cycle from pkg_resources import parse_version import requests from requests.exceptions import ConnectionError, HTTPError, Timeout, \ ReadTimeout, TooManyRedirects from cvprac.cvp_api import CvpApi from...
true
true
f759edeacea028c75d19c1d68db994582c25f942
1,121
py
Python
autoScrabbing/python_tool/datapackage/data_category/lib/MongoDatabase/MongoController.py
yuhioh217/Stock-analysis
89ff5803bb246dd3488318062f59901185f48feb
[ "MIT" ]
1
2017-12-31T06:49:43.000Z
2017-12-31T06:49:43.000Z
autoScrabbing/python_tool/datapackage/data_category/lib/MongoDatabase/MongoController.py
yuhioh217/Stock-analysis
89ff5803bb246dd3488318062f59901185f48feb
[ "MIT" ]
null
null
null
autoScrabbing/python_tool/datapackage/data_category/lib/MongoDatabase/MongoController.py
yuhioh217/Stock-analysis
89ff5803bb246dd3488318062f59901185f48feb
[ "MIT" ]
null
null
null
from pymongo import MongoClient class MongoController(): def __init__(self, options): #print options['url'] self.url = options['url'] self.mongo = MongoClient(self.url) self.db = self.mongo[options['db']] self.collection = self.db[options['collection']] def insertData(self, data): try: post_id ...
21.557692
59
0.673506
from pymongo import MongoClient class MongoController(): def __init__(self, options): self.url = options['url'] self.mongo = MongoClient(self.url) self.db = self.mongo[options['db']] self.collection = self.db[options['collection']] def insertData(self, data): try: post_id = (self.collection).in...
false
true
f759eefd377fccb244f85bab7b02ec344b472973
391
py
Python
mainapp/wsgi.py
aveetron/cafe3_resturant_management
f13e290bd28a12e8c190c333d8137f1d99fc8d22
[ "MIT" ]
null
null
null
mainapp/wsgi.py
aveetron/cafe3_resturant_management
f13e290bd28a12e8c190c333d8137f1d99fc8d22
[ "MIT" ]
11
2019-12-04T22:55:41.000Z
2022-03-11T23:47:40.000Z
mainapp/wsgi.py
yaishenka/MIPT-Flea-Market
0d4b69de33382dfa46b546798f6ecab08ececf56
[ "MIT" ]
null
null
null
""" WSGI config for mainapp project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTI...
23
78
0.785166
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mainapp.settings') application = get_wsgi_application()
true
true
f759ef2b80cb0563c47f39e0e0e2070099e5916b
4,423
py
Python
authentication/base_authentication.py
kerolloskromer/Voicee-Backend
4ceb944b968044341b4f53000e851820f13e0613
[ "MIT" ]
1
2020-09-29T10:57:21.000Z
2020-09-29T10:57:21.000Z
authentication/base_authentication.py
kerolloskromer/Voicee-Backend
4ceb944b968044341b4f53000e851820f13e0613
[ "MIT" ]
6
2021-02-08T20:51:33.000Z
2021-06-10T20:11:37.000Z
authentication/base_authentication.py
kerolloskromer/Voicee-Backend
4ceb944b968044341b4f53000e851820f13e0613
[ "MIT" ]
null
null
null
from rest_framework import authentication from rest_framework.exceptions import AuthenticationFailed from django.utils.translation import gettext_lazy as _ from firebase_admin import auth as firebase_auth class BaseFirebaseAuthentication(authentication.BaseAuthentication): """ Firebase Authentication based dj...
38.12931
94
0.664255
from rest_framework import authentication from rest_framework.exceptions import AuthenticationFailed from django.utils.translation import gettext_lazy as _ from firebase_admin import auth as firebase_auth class BaseFirebaseAuthentication(authentication.BaseAuthentication): keyword = 'FirebaseToken' check_revo...
true
true
f759ef4577360a20442fe3c347bfb9e699d707c1
23,286
py
Python
src/harness/util.py
nirajankeybridge/Spectrum-Access-System
e4e157f3b8fc9f29cb6fbb283acc3a7cbb1212e1
[ "Apache-2.0" ]
null
null
null
src/harness/util.py
nirajankeybridge/Spectrum-Access-System
e4e157f3b8fc9f29cb6fbb283acc3a7cbb1212e1
[ "Apache-2.0" ]
null
null
null
src/harness/util.py
nirajankeybridge/Spectrum-Access-System
e4e157f3b8fc9f29cb6fbb283acc3a7cbb1212e1
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 SAS Project Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
39.136134
126
0.709912
from collections import defaultdict import ConfigParser from datetime import datetime from functools import wraps import inspect import json from jsonschema import validate, Draft4Validator, RefResolver import logging import os import sys import time import random import uuid import jwt import portpicker from OpenSSL....
true
true
f759ef457f93fa04491c45a298d869aceb95059b
825
py
Python
GmailWrapper_JE/venv/Lib/site-packages/requests_oauthlib/compliance_fixes/plentymarkets.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
null
null
null
GmailWrapper_JE/venv/Lib/site-packages/requests_oauthlib/compliance_fixes/plentymarkets.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
null
null
null
GmailWrapper_JE/venv/Lib/site-packages/requests_oauthlib/compliance_fixes/plentymarkets.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
null
null
null
from json import dumps, loads import re from oauthlib.common import to_unicode def plentymarkets_compliance_fix(session): def _to_snake_case(n): return re.sub("(.)([A-Z][a-z]+)", r"\1_\2", n).lower() def _compliance_fix(r): # Plenty returns the Token in CamelCase instead of _ ...
27.5
79
0.581818
from json import dumps, loads import re from oauthlib.common import to_unicode def plentymarkets_compliance_fix(session): def _to_snake_case(n): return re.sub("(.)([A-Z][a-z]+)", r"\1_\2", n).lower() def _compliance_fix(r): if ( "application/json" in r.headers...
true
true
f759ef5833b4f058aadba43d778b54d85da58f95
6,193
py
Python
src/adorn/alter/dict_alter.py
pyadorn/adorn
a34a9a20c1a80c7bdbee0fa641c2bd17e20e60e6
[ "Apache-2.0" ]
3
2021-12-11T03:52:57.000Z
2022-03-22T20:42:56.000Z
src/adorn/alter/dict_alter.py
pyadorn/adorn
a34a9a20c1a80c7bdbee0fa641c2bd17e20e60e6
[ "Apache-2.0" ]
12
2021-12-31T19:22:09.000Z
2022-03-21T03:49:13.000Z
src/adorn/alter/dict_alter.py
pyadorn/adorn
a34a9a20c1a80c7bdbee0fa641c2bd17e20e60e6
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 Jacob Baumbach # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
34.597765
100
0.609075
from os import environ from typing import Any from typing import Dict from typing import Optional from typing import Type from typing import TYPE_CHECKING from typing import Union from adorn.exception.type_check_error import TypeCheckError from adorn.exception.type_check_error import UserDictError if TYPE_CHECKING: ...
true
true
f759ef672970db8dcacc316ab3dac3da235b71e1
5,748
py
Python
sdk/storage/azure-storage-file/tests/test_file_samples_directory_async.py
kushan2018/azure-sdk-for-python
08a9296207281f4e90e23cf7a30173863accc867
[ "MIT" ]
null
null
null
sdk/storage/azure-storage-file/tests/test_file_samples_directory_async.py
kushan2018/azure-sdk-for-python
08a9296207281f4e90e23cf7a30173863accc867
[ "MIT" ]
1
2020-03-06T05:57:16.000Z
2020-03-06T05:57:16.000Z
sdk/storage/azure-storage-file/tests/test_file_samples_directory_async.py
kushan2018/azure-sdk-for-python
08a9296207281f4e90e23cf7a30173863accc867
[ "MIT" ]
null
null
null
# coding: utf-8 # ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # --------------------------------------------------------------------...
34.419162
91
0.617258
import os import asyncio try: import settings_real as settings except ImportError: import file_settings_fake as settings from filetestcase import ( FileTestCase, TestMode, record ) SOURCE_FILE = 'SampleSource.txt' class TestDirectorySamples(FileTestCase): connection_string = settings.CONN...
true
true
f759efac619e2edce7608f7c0a20ab13bee0a90f
394
py
Python
storm_analysis/test/test_wavelet_bgr.py
bintulab/storm-analysis
71ae493cbd17ddb97938d0ae2032d97a0eaa76b2
[ "CNRI-Python" ]
null
null
null
storm_analysis/test/test_wavelet_bgr.py
bintulab/storm-analysis
71ae493cbd17ddb97938d0ae2032d97a0eaa76b2
[ "CNRI-Python" ]
null
null
null
storm_analysis/test/test_wavelet_bgr.py
bintulab/storm-analysis
71ae493cbd17ddb97938d0ae2032d97a0eaa76b2
[ "CNRI-Python" ]
1
2021-04-19T18:17:06.000Z
2021-04-19T18:17:06.000Z
#!/usr/bin/env python import storm_analysis def test_wavelet_bgr(): movie_in = storm_analysis.getData("test/data/test_bg_sub.dax") movie_out = storm_analysis.getPathOutputTest("test_bg_sub_wbgr.dax") from storm_analysis.wavelet_bgr.wavelet_bgr import waveletBGRSub waveletBGRSub(movie_in, movie_out,...
20.736842
72
0.746193
import storm_analysis def test_wavelet_bgr(): movie_in = storm_analysis.getData("test/data/test_bg_sub.dax") movie_out = storm_analysis.getPathOutputTest("test_bg_sub_wbgr.dax") from storm_analysis.wavelet_bgr.wavelet_bgr import waveletBGRSub waveletBGRSub(movie_in, movie_out, "db4", 2, 2, 10) if...
true
true
f759efd1e6b1baff3c95845fe1eaf58f34583035
6,678
py
Python
molpy/algorithms/isomorphism/isomorph.py
kylincaster/molpy
39304733570d62613bd7708834d2185bcce4ae86
[ "BSD-3-Clause" ]
6
2021-11-04T12:28:44.000Z
2021-12-22T13:49:52.000Z
molpy/algorithms/isomorphism/isomorph.py
kylincaster/molpy
39304733570d62613bd7708834d2185bcce4ae86
[ "BSD-3-Clause" ]
2
2021-11-26T12:06:24.000Z
2021-11-28T11:03:11.000Z
molpy/algorithms/isomorphism/isomorph.py
kylincaster/molpy
39304733570d62613bd7708834d2185bcce4ae86
[ "BSD-3-Clause" ]
4
2021-11-04T10:36:51.000Z
2021-12-17T11:58:47.000Z
# author: Roy Kid # contact: lijichen365@126.com # date: 2021-10-28 # version: 0.0.1 # source: https://github.com/networkx/networkx/blob/main/networkx/algorithms/isomorphism/isomorph.py # description: Graph isomorphism functions. __all__ = [ "could_be_isomorphic", "fast_could_be_isomorphic", "faster_could_...
27.368852
100
0.630279
__all__ = [ "could_be_isomorphic", "fast_could_be_isomorphic", "faster_could_be_isomorphic", "is_isomorphic", ] def could_be_isomorphic(G1, G2): if G1.natoms() != G2.natoms(): return False if G1.degree() != G2.degree(): return False t1 = nx.triangles(G1) ...
true
true
f759f0879c64429372ef7cd33cf60343aa7ad984
233
py
Python
python-upbit/basic/unit10/01.py
sharebook-kr/learningspoons-bootcamp-finance
0288f3f3b39f54420e4e9987f1de12892dc680ea
[ "MIT" ]
9
2020-10-25T15:13:32.000Z
2022-03-26T11:27:21.000Z
python-upbit/basic/unit10/01.py
sharebook-kr/learningspoons-bootcamp-finance
0288f3f3b39f54420e4e9987f1de12892dc680ea
[ "MIT" ]
null
null
null
python-upbit/basic/unit10/01.py
sharebook-kr/learningspoons-bootcamp-finance
0288f3f3b39f54420e4e9987f1de12892dc680ea
[ "MIT" ]
7
2021-03-01T11:06:45.000Z
2022-03-14T07:06:04.000Z
import pyupbit import pprint f = open("upbit.txt") lines = f.readlines() access = lines[0].strip() secret = lines[1].strip() f.close() upbit = pyupbit.Upbit(access, secret) balances = upbit.get_balances() pprint.pprint(balances[0])
19.416667
37
0.72103
import pyupbit import pprint f = open("upbit.txt") lines = f.readlines() access = lines[0].strip() secret = lines[1].strip() f.close() upbit = pyupbit.Upbit(access, secret) balances = upbit.get_balances() pprint.pprint(balances[0])
true
true
f759f0bf05faaecaa4f04fbddd083b4fe4cd01b9
7,882
py
Python
sympy/physics/units/util.py
SirAbhi13/sympy
5868aa1cc649f048cdbddd0082be67f2b65f0d95
[ "BSD-3-Clause" ]
null
null
null
sympy/physics/units/util.py
SirAbhi13/sympy
5868aa1cc649f048cdbddd0082be67f2b65f0d95
[ "BSD-3-Clause" ]
null
null
null
sympy/physics/units/util.py
SirAbhi13/sympy
5868aa1cc649f048cdbddd0082be67f2b65f0d95
[ "BSD-3-Clause" ]
null
null
null
""" Several methods to simplify expressions involving unit objects. """ from functools import reduce from collections.abc import Iterable from sympy.core.add import Add from sympy.core.containers import Tuple from sympy.core.mul import Mul from sympy.core.power import Pow from sympy.core.sympify import sympify from sy...
36.322581
153
0.675082
from functools import reduce from collections.abc import Iterable from sympy.core.add import Add from sympy.core.containers import Tuple from sympy.core.mul import Mul from sympy.core.power import Pow from sympy.core.sympify import sympify from sympy.core.compatibility import ordered from sympy.matrices.common import ...
true
true
f759f15f22c61b881e5a11d4ab505de00470b505
23,885
py
Python
kedro/framework/cli/cli.py
dataengineerone/kedro
c7da64ae363e6a4cc55d406853d630d5b2575570
[ "Apache-2.0" ]
null
null
null
kedro/framework/cli/cli.py
dataengineerone/kedro
c7da64ae363e6a4cc55d406853d630d5b2575570
[ "Apache-2.0" ]
null
null
null
kedro/framework/cli/cli.py
dataengineerone/kedro
c7da64ae363e6a4cc55d406853d630d5b2575570
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 QuantumBlack Visual Analytics Limited # # 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 # # THE SOFTWARE IS PROVIDED "AS IS",...
33.735876
109
0.659828
import importlib import os import re import shutil import sys import traceback import warnings import webbrowser from collections import defaultdict from copy import deepcopy from pathlib import Path from typing import Any, Callable, Dict, List import click import pkg_resources import yaml import kedro.config.defaul...
true
true
f759f1ab40044aa0765518ed1b7152c943a8343e
6,688
py
Python
bindings/python/ensmallen_graph/datasets/string/vibrioazureus.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
bindings/python/ensmallen_graph/datasets/string/vibrioazureus.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
bindings/python/ensmallen_graph/datasets/string/vibrioazureus.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
""" This file offers the methods to automatically retrieve the graph Vibrio azureus. The graph is automatically retrieved from the STRING repository. Report --------------------- At the time of rendering these methods (please see datetime below), the graph had the following characteristics: Datetime: 2021-02-02 2...
35.015707
223
0.703648
from typing import Dict from ..automatic_graph_retrieval import AutomaticallyRetrievedGraph from ...ensmallen_graph import EnsmallenGraph def VibrioAzureus( directed: bool = False, verbose: int = 2, cache_path: str = "graphs/string", **additional_graph_kwargs: Dict ) -> EnsmallenGraph: return Au...
true
true
f759f24a1c4b6011d968e4108cc43a443c059f1b
3,710
py
Python
logistic_regression/logistic.py
jeffreyblair/ML
9cf810cbe9a1720de9013740650f9d72b61bde59
[ "Unlicense" ]
null
null
null
logistic_regression/logistic.py
jeffreyblair/ML
9cf810cbe9a1720de9013740650f9d72b61bde59
[ "Unlicense" ]
null
null
null
logistic_regression/logistic.py
jeffreyblair/ML
9cf810cbe9a1720de9013740650f9d72b61bde59
[ "Unlicense" ]
null
null
null
""" Methods for doing logistic regression.""" import numpy as np from utils import sigmoid def logistic_predict(weights, data): """ Compute the probabilities predicted by the logistic classifier. Note: N is the number of examples and M is the number of features per example. Inputs: ...
34.672897
112
0.619677
import numpy as np from utils import sigmoid def logistic_predict(weights, data): ones = np.array([[1] for i in range(data.shape[0])]) n_data = np.c_[data, ones] y = n_data @ weights return sigmoid(y) def evaluate(targets, y): ce = -np.sum(targets * np.log(y) + (1-targets) * np.log(1-y))/len(tar...
true
true
f759f2ba61678b2c951f752d6fe3f16c2e349000
14,521
py
Python
test/test_component.py
Gonza10V/SBOL-utilities
a668424eb865d28ba2617bdc9e0150fa6b3e28a3
[ "MIT" ]
null
null
null
test/test_component.py
Gonza10V/SBOL-utilities
a668424eb865d28ba2617bdc9e0150fa6b3e28a3
[ "MIT" ]
null
null
null
test/test_component.py
Gonza10V/SBOL-utilities
a668424eb865d28ba2617bdc9e0150fa6b3e28a3
[ "MIT" ]
null
null
null
import filecmp import os import tempfile import unittest import sbol3 import tyto from sbol_utilities.component import contained_components, contains, add_feature, add_interaction, constitutive, \ regulate, order, in_role, all_in_role, ensure_singleton_feature from sbol_utilities.component import dna_component_wi...
52.99635
128
0.687487
import filecmp import os import tempfile import unittest import sbol3 import tyto from sbol_utilities.component import contained_components, contains, add_feature, add_interaction, constitutive, \ regulate, order, in_role, all_in_role, ensure_singleton_feature from sbol_utilities.component import dna_component_wi...
true
true
f759f2db9292d1202771ad35d9a844c68da2af12
2,326
py
Python
Web/download.py
mak626/vscode-java-installer
db1d2fe9ebd90caa4daf5b02cb016b2809871a32
[ "MIT" ]
16
2020-10-14T05:07:39.000Z
2020-12-19T14:57:35.000Z
Web/download.py
mak626/vscode-java-installer
db1d2fe9ebd90caa4daf5b02cb016b2809871a32
[ "MIT" ]
null
null
null
Web/download.py
mak626/vscode-java-installer
db1d2fe9ebd90caa4daf5b02cb016b2809871a32
[ "MIT" ]
1
2022-02-07T16:50:35.000Z
2022-02-07T16:50:35.000Z
import requests import sys import os import platform # LINKS TO FILES vs = "https://aka.ms/win32-x64-user-stable" vs32 = "https://aka.ms/win32-user-stable" jcp = "https://aka.ms/vscode-java-installer-win" jdk = "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.9%2B11/OpenJDK11U-jdk_x64_win...
34.716418
146
0.549011
import requests import sys import os import platform vs = "https://aka.ms/win32-x64-user-stable" vs32 = "https://aka.ms/win32-user-stable" jcp = "https://aka.ms/vscode-java-installer-win" jdk = "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.9%2B11/OpenJDK11U-jdk_x64_windows_hotspot_11.0...
true
true
f759f42222c7ad5c8fd2e53a5557bb90e5aa90fe
726
py
Python
src/test_workflow/test_result/test_result.py
Rishikesh1159/opensearch-build
9f402afe9c945c9b715a69e94cbf0137bfbcd8b7
[ "Apache-2.0" ]
null
null
null
src/test_workflow/test_result/test_result.py
Rishikesh1159/opensearch-build
9f402afe9c945c9b715a69e94cbf0137bfbcd8b7
[ "Apache-2.0" ]
null
null
null
src/test_workflow/test_result/test_result.py
Rishikesh1159/opensearch-build
9f402afe9c945c9b715a69e94cbf0137bfbcd8b7
[ "Apache-2.0" ]
null
null
null
import logging class TestResult: def __init__(self, component, config, status): self.component = component self.config = config self.status = status @property def __test_result(self): return "PASS" if self.status == 0 else "FAIL" def __str__(self): return '| {...
24.2
121
0.619835
import logging class TestResult: def __init__(self, component, config, status): self.component = component self.config = config self.status = status @property def __test_result(self): return "PASS" if self.status == 0 else "FAIL" def __str__(self): return '| {...
true
true
f759f4535b1ba9f519bbd9f6fb610445dd5487df
46
py
Python
pommerman/dqn/nets/__init__.py
patriciamdr/playground
f6116b492daac8dd25af1056033c6b8c3b8b2a5d
[ "Apache-2.0" ]
null
null
null
pommerman/dqn/nets/__init__.py
patriciamdr/playground
f6116b492daac8dd25af1056033c6b8c3b8b2a5d
[ "Apache-2.0" ]
null
null
null
pommerman/dqn/nets/__init__.py
patriciamdr/playground
f6116b492daac8dd25af1056033c6b8c3b8b2a5d
[ "Apache-2.0" ]
null
null
null
from . import recurrent_cnn from . import vdn
15.333333
27
0.782609
from . import recurrent_cnn from . import vdn
true
true
f759f45737a85d1abd96a0c857196f4618fdbcf0
296
py
Python
app.py
WillHK/Lambda-School-DS-Unit-2-Project
b3d8c88d5ce314fb45788d1c12a79aab9373aafb
[ "MIT" ]
null
null
null
app.py
WillHK/Lambda-School-DS-Unit-2-Project
b3d8c88d5ce314fb45788d1c12a79aab9373aafb
[ "MIT" ]
null
null
null
app.py
WillHK/Lambda-School-DS-Unit-2-Project
b3d8c88d5ce314fb45788d1c12a79aab9373aafb
[ "MIT" ]
1
2019-09-11T02:54:17.000Z
2019-09-11T02:54:17.000Z
from dotenv import load_dotenv import dash load_dotenv() external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css'] app = dash.Dash(__name__, external_stylesheets=external_stylesheets) app.config.suppress_callback_exceptions = True app.title = "Retirement Hunt" server = app.server
24.666667
69
0.807432
from dotenv import load_dotenv import dash load_dotenv() external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css'] app = dash.Dash(__name__, external_stylesheets=external_stylesheets) app.config.suppress_callback_exceptions = True app.title = "Retirement Hunt" server = app.server
true
true
f759f45b7a3428917790f552263efe7f685813eb
33,038
py
Python
src/cornode/transaction.py
Cornode/cornode.lib.py
866230123a62acc235ca8f46e7b59fe08655049b
[ "MIT" ]
null
null
null
src/cornode/transaction.py
Cornode/cornode.lib.py
866230123a62acc235ca8f46e7b59fe08655049b
[ "MIT" ]
null
null
null
src/cornode/transaction.py
Cornode/cornode.lib.py
866230123a62acc235ca8f46e7b59fe08655049b
[ "MIT" ]
null
null
null
# coding=utf-8 from __future__ import absolute_import, division, print_function, \ unicode_literals from calendar import timegm as unix_timestamp from datetime import datetime from operator import attrgetter from typing import Generator, Iterable, Iterator, List, MutableSequence, \ Optional, Sequence, Text, Tuple ...
29.524576
223
0.624523
from __future__ import absolute_import, division, print_function, \ unicode_literals from calendar import timegm as unix_timestamp from datetime import datetime from operator import attrgetter from typing import Generator, Iterable, Iterator, List, MutableSequence, \ Optional, Sequence, Text, Tuple from cornode i...
true
true
f759f4c32dde95328af8e40ae129e6651edcc819
54,238
py
Python
xarray/core/common.py
lukevolpatti/xarray
65ca92a5c0a4143d00dd7a822bcb1d49738717f1
[ "Apache-2.0" ]
1
2020-06-30T07:25:42.000Z
2020-06-30T07:25:42.000Z
xarray/core/common.py
lukevolpatti/xarray
65ca92a5c0a4143d00dd7a822bcb1d49738717f1
[ "Apache-2.0" ]
null
null
null
xarray/core/common.py
lukevolpatti/xarray
65ca92a5c0a4143d00dd7a822bcb1d49738717f1
[ "Apache-2.0" ]
null
null
null
import warnings from contextlib import suppress from html import escape from textwrap import dedent from typing import ( Any, Callable, Dict, Hashable, Iterable, Iterator, List, Mapping, Tuple, TypeVar, Union, ) import numpy as np import pandas as pd from . import dtypes, d...
33.983709
102
0.558317
import warnings from contextlib import suppress from html import escape from textwrap import dedent from typing import ( Any, Callable, Dict, Hashable, Iterable, Iterator, List, Mapping, Tuple, TypeVar, Union, ) import numpy as np import pandas as pd from . import dtypes, d...
true
true
f759f5287df2530ccdf6f53f2868dd2bbdec4f69
214,373
py
Python
swift-2.21.0/test/unit/container/test_server.py
scottwedge/OpenStack-Stein
7077d1f602031dace92916f14e36b124f474de15
[ "Apache-2.0" ]
null
null
null
swift-2.21.0/test/unit/container/test_server.py
scottwedge/OpenStack-Stein
7077d1f602031dace92916f14e36b124f474de15
[ "Apache-2.0" ]
5
2019-08-14T06:46:03.000Z
2021-12-13T20:01:25.000Z
swift-2.21.0/test/unit/container/test_server.py
scottwedge/OpenStack-Stein
7077d1f602031dace92916f14e36b124f474de15
[ "Apache-2.0" ]
2
2020-03-15T01:24:15.000Z
2020-07-22T20:34:26.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2010-2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
46.552226
79
0.563723
import operator import os import posix import mock import unittest import itertools from contextlib import contextmanager from shutil import rmtree from tempfile import mkdtemp from test.unit import make_timestamp_iter, mock_timestamp_now from time import gmtime from xml.dom import minidom import time import random f...
true
true
f759f6162db78a46fa76e45fe4791c7f4e25884c
11,932
py
Python
pyVmomi/Iso8601.py
virtdevninja/pyvmomi-ce
c14de2e0cdcb891dbaaf59cd4da5ebbdb05f5f9e
[ "Apache-2.0" ]
2
2015-09-09T16:31:26.000Z
2015-09-10T06:39:53.000Z
pyVmomi/Iso8601.py
virtdevninja/pyvmomi-ce
c14de2e0cdcb891dbaaf59cd4da5ebbdb05f5f9e
[ "Apache-2.0" ]
null
null
null
pyVmomi/Iso8601.py
virtdevninja/pyvmomi-ce
c14de2e0cdcb891dbaaf59cd4da5ebbdb05f5f9e
[ "Apache-2.0" ]
null
null
null
# VMware vSphere Python SDK # Copyright (c) 2008-2014 VMware, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
33.422969
92
0.550788
from __future__ import print_function __author__ = 'VMware, Inc.' from six import iteritems import time from datetime import datetime, timedelta, tzinfo import re _dtExpr = re.compile( r'(?P<year>-?\d{4})' \ r'(-(?P<month>(0[1-9]|1[0-2]))' \ r'(-(?P<day>(0[1-9]|[1-2]\d|3[01])))?)?' ...
true
true
f759f7676d3288017cf4e999bf84a8554632d8bf
15,419
py
Python
code/python/FactSetEntityReportBuilder/v1/fds/sdk/FactSetEntityReportBuilder/api/entity_structure_api.py
factset/enterprise-sdk
3fd4d1360756c515c9737a0c9a992c7451d7de7e
[ "Apache-2.0" ]
6
2022-02-07T16:34:18.000Z
2022-03-30T08:04:57.000Z
code/python/FactSetEntityReportBuilder/v1/fds/sdk/FactSetEntityReportBuilder/api/entity_structure_api.py
factset/enterprise-sdk
3fd4d1360756c515c9737a0c9a992c7451d7de7e
[ "Apache-2.0" ]
2
2022-02-07T05:25:57.000Z
2022-03-07T14:18:04.000Z
code/python/FactSetEntityReportBuilder/v1/fds/sdk/FactSetEntityReportBuilder/api/entity_structure_api.py
factset/enterprise-sdk
3fd4d1360756c515c9737a0c9a992c7451d7de7e
[ "Apache-2.0" ]
null
null
null
""" FactSet Entity Report Builder No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech """ import re # noqa: F401 import sys # noqa: F401 from...
48.949206
665
0.618069
import re import sys from multiprocessing.pool import ApplyResult import typing from fds.sdk.FactSetEntityReportBuilder.api_client import ApiClient, Endpoint as _Endpoint from fds.sdk.FactSetEntityReportBuilder.model_utils import ( check_allowed_values, check_validations, date, datetime, file_...
true
true
f759f8bc6df92381fa761610da57319782b7e6bf
4,326
py
Python
StockExchange_Daily_Process.py
waditya/Miscellaneous
50e7dd887028fd112b5d83de9c45c4ee96bac271
[ "BSD-2-Clause" ]
null
null
null
StockExchange_Daily_Process.py
waditya/Miscellaneous
50e7dd887028fd112b5d83de9c45c4ee96bac271
[ "BSD-2-Clause" ]
null
null
null
StockExchange_Daily_Process.py
waditya/Miscellaneous
50e7dd887028fd112b5d83de9c45c4ee96bac271
[ "BSD-2-Clause" ]
null
null
null
##Author : Aditya Wagholikar ##Date : 9/24/2017 import csv from math import floor from pandas.io.tests.parser import quoting stock_lst = [] flag = 0 counter = 0 code_t = "" max_time_gap_t=-999 volume_t = 0 max_trade_t = 0 weighted_avg_price_t = 0 class Stock: code = "" max_time_gap=0 prev_ts = 0 ...
36.352941
192
0.601479
import csv from math import floor from pandas.io.tests.parser import quoting stock_lst = [] flag = 0 counter = 0 code_t = "" max_time_gap_t=-999 volume_t = 0 max_trade_t = 0 weighted_avg_price_t = 0 class Stock: code = "" max_time_gap=0 prev_ts = 0 curr_ts = 0 volume = 0 max_trade = 0 ...
true
true
f759f90c6ef4e337cfa040c5f5efdc79f9554cf0
1,705
py
Python
Starcraft/DGN/test.py
jungwoohan72/DGN_pytorch
65fe7ab4df661d97725f2a72a1fdb49df1b2ea44
[ "MIT" ]
null
null
null
Starcraft/DGN/test.py
jungwoohan72/DGN_pytorch
65fe7ab4df661d97725f2a72a1fdb49df1b2ea44
[ "MIT" ]
null
null
null
Starcraft/DGN/test.py
jungwoohan72/DGN_pytorch
65fe7ab4df661d97725f2a72a1fdb49df1b2ea44
[ "MIT" ]
null
null
null
import os, sys import numpy as np from smac.env import StarCraft2Env from model import DGN from buffer import ReplayBuffer from config import * from utilis import * import torch import torch.optim as optim test_env = StarCraft2Env(map_name='25m') env_info = test_env.get_env_info() n_ant = env_info["n_agents"] n_action...
37.065217
106
0.683284
import os, sys import numpy as np from smac.env import StarCraft2Env from model import DGN from buffer import ReplayBuffer from config import * from utilis import * import torch import torch.optim as optim test_env = StarCraft2Env(map_name='25m') env_info = test_env.get_env_info() n_ant = env_info["n_agents"] n_action...
true
true
f759fa3e84c221b510f1a92437db85adf4ce53c7
1,746
py
Python
azure-mgmt-network/azure/mgmt/network/v2018_07_01/models/virtual_network_gateway_sku.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2021-09-07T18:36:04.000Z
2021-09-07T18:36:04.000Z
azure-mgmt-network/azure/mgmt/network/v2018_07_01/models/virtual_network_gateway_sku.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
2
2019-10-02T23:37:38.000Z
2020-10-02T01:17:31.000Z
azure-mgmt-network/azure/mgmt/network/v2018_07_01/models/virtual_network_gateway_sku.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2018-08-28T14:36:47.000Z
2018-08-28T14:36:47.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
38.8
76
0.607675
from msrest.serialization import Model class VirtualNetworkGatewaySku(Model): _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'tier': {'key': 'tier', 'type': 'str'}, 'capacity': {'key': 'capacity', 'type': 'int'}, } def __init__(self, **kwargs): super(VirtualN...
true
true
f759fd0fc8f7bfbe6688f08da46f0b5b834d0d3a
588
py
Python
env.py
alehander42/hypno
ba2b707f11162301c2607c367ee3f2dba55670f9
[ "MIT" ]
1
2019-04-14T20:27:01.000Z
2019-04-14T20:27:01.000Z
env.py
alehander42/hypno
ba2b707f11162301c2607c367ee3f2dba55670f9
[ "MIT" ]
null
null
null
env.py
alehander42/hypno
ba2b707f11162301c2607c367ee3f2dba55670f9
[ "MIT" ]
null
null
null
from errors import HypnoError class Env: def __init__(self, values=None, parent=None): self.values = values or {} self.parent = parent if parent is None: self.base_env = self else: self.base_env = parent.base_env def __getitem__(self, name): scop...
26.727273
49
0.573129
from errors import HypnoError class Env: def __init__(self, values=None, parent=None): self.values = values or {} self.parent = parent if parent is None: self.base_env = self else: self.base_env = parent.base_env def __getitem__(self, name): scop...
true
true
f759fd13a9635e6aaa870b2b1d3ae0b207ad484d
3,954
py
Python
get_obs_csv.py
alexjungaalto/nLassoExpFamPDSimulations
c07b441fff6473d7c650e511e210aaebf7fe061b
[ "MIT" ]
18
2016-10-04T18:51:56.000Z
2021-06-18T07:49:59.000Z
get_obs_csv.py
alexjungaalto/nLassoExpFamPDSimulations
c07b441fff6473d7c650e511e210aaebf7fe061b
[ "MIT" ]
4
2017-10-15T04:21:03.000Z
2020-11-30T07:31:30.000Z
get_obs_csv.py
alexjungaalto/nLassoExpFamPDSimulations
c07b441fff6473d7c650e511e210aaebf7fe061b
[ "MIT" ]
15
2016-10-04T18:55:52.000Z
2022-02-15T08:24:35.000Z
import requests import datetime as dt import xml.etree.ElementTree as ET import numpy as np import re import argparse def get_param_names(url): """ Get parameters metadata """ req = requests.get(url) params = {} if req.status_code == 200: xmlstring = req.content tree = ET.ElementTree(E...
32.409836
132
0.601669
import requests import datetime as dt import xml.etree.ElementTree as ET import numpy as np import re import argparse def get_param_names(url): req = requests.get(url) params = {} if req.status_code == 200: xmlstring = req.content tree = ET.ElementTree(ET.fromstring(xmlstring)) for...
true
true
f759fd587492c988cfe74449951e4736f5443630
4,684
py
Python
app/tests/test_utils.py
alexandrecorso/actraceroute
3d4889fd769f5801a9bf3ef49cf063c0e4a6b060
[ "MIT" ]
null
null
null
app/tests/test_utils.py
alexandrecorso/actraceroute
3d4889fd769f5801a9bf3ef49cf063c0e4a6b060
[ "MIT" ]
1
2021-05-10T10:32:29.000Z
2021-05-10T10:32:29.000Z
app/tests/test_utils.py
alexandrecorso/actraceroute
3d4889fd769f5801a9bf3ef49cf063c0e4a6b060
[ "MIT" ]
null
null
null
import unittest from app.tools import utils class TestResolveDomainIpv4(unittest.TestCase): def test_valid_resolver(self): self.assertEqual(utils.resolve_domain_to_ipv4("acorso.fr"), "45.12.184.4") self.assertEqual(utils.resolve_domain_to_ipv4("www.python.org"), "151.101.120.223") def test_...
39.694915
93
0.664816
import unittest from app.tools import utils class TestResolveDomainIpv4(unittest.TestCase): def test_valid_resolver(self): self.assertEqual(utils.resolve_domain_to_ipv4("acorso.fr"), "45.12.184.4") self.assertEqual(utils.resolve_domain_to_ipv4("www.python.org"), "151.101.120.223") def test_...
true
true
f759fd81f76dc0667e3b6bd4f8194b22528a8118
1,740
py
Python
scrapy/contrib/spiders/init.py
emschorsch/scrapy
acb7bad1ff4037b4a613ac94e2d3357bf92bdb8f
[ "BSD-3-Clause" ]
1
2016-01-01T14:58:12.000Z
2016-01-01T14:58:12.000Z
scrapy/contrib/spiders/init.py
emschorsch/scrapy
acb7bad1ff4037b4a613ac94e2d3357bf92bdb8f
[ "BSD-3-Clause" ]
null
null
null
scrapy/contrib/spiders/init.py
emschorsch/scrapy
acb7bad1ff4037b4a613ac94e2d3357bf92bdb8f
[ "BSD-3-Clause" ]
null
null
null
from scrapy.spider import BaseSpider class InitSpider(BaseSpider): """Base Spider with initialization facilities""" def __init__(self, *a, **kw): super(InitSpider, self).__init__(*a, **kw) self._postinit_reqs = [] self._init_complete = False self._init_started = False ...
38.666667
79
0.66954
from scrapy.spider import BaseSpider class InitSpider(BaseSpider): def __init__(self, *a, **kw): super(InitSpider, self).__init__(*a, **kw) self._postinit_reqs = [] self._init_complete = False self._init_started = False def make_requests_from_url(self, url): req = ...
true
true
f759ffeb329dd62dca3571a063fd105c16331325
22,558
py
Python
mypyc/irbuild/expression.py
kprzybyla/mypy
6e41508d3953d8ecb97218a263a1cc625400f477
[ "PSF-2.0" ]
null
null
null
mypyc/irbuild/expression.py
kprzybyla/mypy
6e41508d3953d8ecb97218a263a1cc625400f477
[ "PSF-2.0" ]
null
null
null
mypyc/irbuild/expression.py
kprzybyla/mypy
6e41508d3953d8ecb97218a263a1cc625400f477
[ "PSF-2.0" ]
null
null
null
"""Transform mypy expression ASTs to mypyc IR (Intermediate Representation). The top-level AST transformation logic is implemented in mypyc.irbuild.visitor and mypyc.irbuild.builder. """ from typing import List, Optional, Union from mypy.nodes import ( Expression, NameExpr, MemberExpr, SuperExpr, CallExpr, Unary...
38.826162
96
0.668588
from typing import List, Optional, Union from mypy.nodes import ( Expression, NameExpr, MemberExpr, SuperExpr, CallExpr, UnaryExpr, OpExpr, IndexExpr, ConditionalExpr, ComparisonExpr, IntExpr, FloatExpr, ComplexExpr, StrExpr, BytesExpr, EllipsisExpr, ListExpr, TupleExpr, DictExpr, SetExpr, ListComprehensi...
true
true
f75a0223be49ec0182a29264e4e86eeaea5845d3
152
py
Python
20211125_PwnIntro/1_no_rop/solution.py
alessandro-massarenti/Cybersec2021
3d6dcc4b255dd425b1be66d440df1d94d5ea5ac0
[ "BSD-3-Clause" ]
15
2021-10-01T16:10:48.000Z
2022-02-19T20:45:35.000Z
20211125_PwnIntro/1_no_rop/solution.py
alessandro-massarenti/Cybersec2021
3d6dcc4b255dd425b1be66d440df1d94d5ea5ac0
[ "BSD-3-Clause" ]
null
null
null
20211125_PwnIntro/1_no_rop/solution.py
alessandro-massarenti/Cybersec2021
3d6dcc4b255dd425b1be66d440df1d94d5ea5ac0
[ "BSD-3-Clause" ]
2
2021-11-06T08:32:41.000Z
2021-12-11T16:18:54.000Z
from pwn import * context.binary = "./no_rop" p = process() p.sendline(b"A" * 8 + p64(1)) log.success(p.recvline_regex(rb".*{.*}.*").decode("ascii"))
19
59
0.618421
from pwn import * context.binary = "./no_rop" p = process() p.sendline(b"A" * 8 + p64(1)) log.success(p.recvline_regex(rb".*{.*}.*").decode("ascii"))
true
true
f75a03041ba6029adb6cd39d4acfe0cd5eb77bc4
7,000
py
Python
sdk/python/pulumi_aws/ebs/encryption_by_default.py
alexbowers/pulumi-aws
7dbdb03b1e4f7c0d51d5b5d17233ff4465c3eff5
[ "ECL-2.0", "Apache-2.0" ]
260
2018-06-18T14:57:00.000Z
2022-03-29T11:41:03.000Z
sdk/python/pulumi_aws/ebs/encryption_by_default.py
alexbowers/pulumi-aws
7dbdb03b1e4f7c0d51d5b5d17233ff4465c3eff5
[ "ECL-2.0", "Apache-2.0" ]
1,154
2018-06-19T20:38:20.000Z
2022-03-31T19:48:16.000Z
sdk/python/pulumi_aws/ebs/encryption_by_default.py
alexbowers/pulumi-aws
7dbdb03b1e4f7c0d51d5b5d17233ff4465c3eff5
[ "ECL-2.0", "Apache-2.0" ]
115
2018-06-28T03:20:27.000Z
2022-03-29T11:41:06.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! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import...
41.176471
211
0.651857
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['EncryptionByDefaultArgs', 'EncryptionByDefault'] @pulumi.input_type class EncryptionByDefaultArgs: def __init__(__self__, *, enabled: Opt...
true
true
f75a030f3e42a44248ae7c8214f3b6d016966882
7,905
py
Python
airflow/hooks/http_hook.py
InigoSJ/airflow
8b97a387dc30d8c88390d500ec99333798c20f1c
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
1
2019-09-06T09:55:18.000Z
2019-09-06T09:55:18.000Z
airflow/hooks/http_hook.py
InigoSJ/airflow
8b97a387dc30d8c88390d500ec99333798c20f1c
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
1
2017-05-11T22:57:49.000Z
2017-05-11T22:57:49.000Z
airflow/hooks/http_hook.py
InigoSJ/airflow
8b97a387dc30d8c88390d500ec99333798c20f1c
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
1
2019-12-09T08:41:32.000Z
2019-12-09T08:41:32.000Z
# -*- coding: utf-8 -*- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the #...
37.287736
90
0.596331
import requests import tenacity from airflow.hooks.base_hook import BaseHook from airflow.exceptions import AirflowException class HttpHook(BaseHook): def __init__( self, method='POST', http_conn_id='http_default' ): self.http_conn_id = http_conn_id self.method = met...
true
true
f75a03e46d5daf1229f86ff31b080c692bb0d36b
1,724
py
Python
examples/neurospin/hierarchical_rois.py
yarikoptic/NiPy-OLD
8759b598ac72d3b9df7414642c7a662ad9c55ece
[ "BSD-3-Clause" ]
1
2015-08-22T16:14:45.000Z
2015-08-22T16:14:45.000Z
examples/neurospin/hierarchical_rois.py
yarikoptic/NiPy-OLD
8759b598ac72d3b9df7414642c7a662ad9c55ece
[ "BSD-3-Clause" ]
null
null
null
examples/neurospin/hierarchical_rois.py
yarikoptic/NiPy-OLD
8759b598ac72d3b9df7414642c7a662ad9c55ece
[ "BSD-3-Clause" ]
null
null
null
""" Example of a script that crates a 'hierarchical roi' structure from the blob model of an image fixme : redo it Used mainly for debugging at the moment (before unittests are created) This example is based on a (simplistic) simulated image. # Author : Bertrand Thirion, 2008-2009 """ import numpy as np import nip...
27.365079
78
0.674014
import numpy as np import nipy.neurospin.spatial_models.hroi as hroi import nipy.neurospin.utils.simul_2d_multisubject_fmri_dataset as simul import nipy.neurospin.graph.field as ff dimx = 60 dimy = 60 pos = 2*np.array([[6,7],[10,10],[15,10]]) ampli = np.array([3,4,4]) dataset = simul.make_surrogate_array(nbsubj=1,...
true
true
f75a05406d5c3521e46863ca80284a23428cfc5f
5,234
py
Python
cogs/admin.py
govern01/tutorial_discord_bot
7c83e1b51006c8aaa64cb7f8c8431ce7a6286264
[ "MIT" ]
2
2020-08-16T03:16:15.000Z
2020-09-28T19:28:06.000Z
cogs/admin.py
govern01/tutorial_discord_bot
7c83e1b51006c8aaa64cb7f8c8431ce7a6286264
[ "MIT" ]
null
null
null
cogs/admin.py
govern01/tutorial_discord_bot
7c83e1b51006c8aaa64cb7f8c8431ce7a6286264
[ "MIT" ]
null
null
null
from discord.ext import commands import checks.identities from checks.identities import is_owner import discord """===IMPORTANT NOTE=== discord.py can read docstrings and extrapolate information from them, if you run this tutorial bot and execute the help command you will see the ping command includes the brief from ...
43.983193
119
0.69125
from discord.ext import commands import checks.identities from checks.identities import is_owner import discord class AdminCog(commands.Cog, name="Admin"): def __init__(self): pass @commands.check(is_owner) @commands.group(name="admin_role", invoke_without_command=False) async def admin_role...
true
true
f75a05cfb70187274d9492393de25937bbfe2bc0
12,228
py
Python
zaza/openstack/utilities/openstack_upgrade.py
freyes/zaza-openstack-tests
c9834315f996966aaedd95d712a991df7a449eb8
[ "ECL-2.0", "Apache-2.0" ]
5
2019-08-09T02:39:12.000Z
2021-05-18T14:19:51.000Z
zaza/openstack/utilities/openstack_upgrade.py
freyes/zaza-openstack-tests
c9834315f996966aaedd95d712a991df7a449eb8
[ "ECL-2.0", "Apache-2.0" ]
350
2019-05-13T10:28:33.000Z
2022-03-30T13:35:16.000Z
zaza/openstack/utilities/openstack_upgrade.py
freyes/zaza-openstack-tests
c9834315f996966aaedd95d712a991df7a449eb8
[ "ECL-2.0", "Apache-2.0" ]
72
2019-04-18T06:05:01.000Z
2022-03-29T05:41:40.000Z
# Copyright 2019 Canonical Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
34.44507
79
0.680651
import logging import zaza.openstack.utilities.juju as juju_utils import zaza.model from zaza import sync_wrapper from zaza.openstack.utilities.upgrade_utils import ( get_upgrade_groups, ) async def async_pause_units(units, model_name=None): logging.info("Pausing {}".format(', '.join(units))) await zaza...
true
true
f75a0608f5b9f4f57d76271e7157c325c00db5cf
11,659
py
Python
python_modules/libraries/dagster-shell/dagster_shell/solids.py
dbatten5/dagster
d76e50295054ffe5a72f9b292ef57febae499528
[ "Apache-2.0" ]
4,606
2018-06-21T17:45:20.000Z
2022-03-31T23:39:42.000Z
python_modules/libraries/dagster-shell/dagster_shell/solids.py
dbatten5/dagster
d76e50295054ffe5a72f9b292ef57febae499528
[ "Apache-2.0" ]
6,221
2018-06-12T04:36:01.000Z
2022-03-31T21:43:05.000Z
python_modules/libraries/dagster-shell/dagster_shell/solids.py
dbatten5/dagster
d76e50295054ffe5a72f9b292ef57febae499528
[ "Apache-2.0" ]
619
2018-08-22T22:43:09.000Z
2022-03-31T22:48:06.000Z
import os from dagster import ( Enum, EnumValue, Failure, Field, InputDefinition, Noneable, Nothing, OutputDefinition, Permissive, check, op, solid, ) from .utils import execute, execute_script_file def shell_op_config(): return { "env": Field( ...
33.794203
131
0.658376
import os from dagster import ( Enum, EnumValue, Failure, Field, InputDefinition, Noneable, Nothing, OutputDefinition, Permissive, check, op, solid, ) from .utils import execute, execute_script_file def shell_op_config(): return { "env": Field( ...
true
true
f75a0712bf14a1fbc0fd82ae321f186b9884b89d
10,863
py
Python
src/problem4.py
L7907661/24-Exam3-201920
72c28b01177c735a4ff392e7843946fe26d5e460
[ "MIT" ]
null
null
null
src/problem4.py
L7907661/24-Exam3-201920
72c28b01177c735a4ff392e7843946fe26d5e460
[ "MIT" ]
null
null
null
src/problem4.py
L7907661/24-Exam3-201920
72c28b01177c735a4ff392e7843946fe26d5e460
[ "MIT" ]
null
null
null
""" Exam 3, problem 4. Authors: Vibha Alangar, Aaron Wilkin, David Mutchler, Dave Fisher, Matt Boutell, Amanda Stouder, their colleagues and Zeyu Liao. January 2019. """ # Done: 1. PUT YOUR NAME IN THE ABOVE LINE. import time import testing_helper def main(): """ Calls the TEST...
32.918182
80
0.490933
import time import testing_helper def main(): run_test_problem4() def is_prime(n): if n < 2: return False for k in range(2, (n // 2) + 1): if n % k == 0: return False return True def run_test_problem4(): print() print('-...
true
true
f75a0801c6fc6cd00cbcc809856ffb65145bd84a
522
py
Python
demo.py
pysmt/pyPicoSAT
6ec41c92320a48b7770f920d37d22199e6d35b4f
[ "Unlicense" ]
3
2019-10-17T03:18:34.000Z
2021-09-27T12:38:03.000Z
demo.py
pysmt/pyPicoSAT
6ec41c92320a48b7770f920d37d22199e6d35b4f
[ "Unlicense" ]
4
2015-10-22T13:47:21.000Z
2015-10-25T13:14:44.000Z
demo.py
pysmt/pyPicoSAT
6ec41c92320a48b7770f920d37d22199e6d35b4f
[ "Unlicense" ]
2
2015-10-26T18:16:52.000Z
2018-09-07T13:31:10.000Z
import picosat with open("/tmp/log", "w") as fout: p = picosat.picosat_init() picosat.picosat_set_verbosity(p, 100) f = picosat.picosat_set_output(p, fout) picosat.picosat_measure_all_calls(p) picosat.picosat_inc_max_var(p) picosat.picosat_add(p, 1) picosat.picosat_add(p, -1) picosat.pi...
30.705882
68
0.708812
import picosat with open("/tmp/log", "w") as fout: p = picosat.picosat_init() picosat.picosat_set_verbosity(p, 100) f = picosat.picosat_set_output(p, fout) picosat.picosat_measure_all_calls(p) picosat.picosat_inc_max_var(p) picosat.picosat_add(p, 1) picosat.picosat_add(p, -1) picosat.pi...
true
true
f75a09e9ae58d76bbf616b6410fe9d23da16020a
1,310
py
Python
checkov/terraform/checks/resource/azure/AzureInstancePassword.py
mgmt1pyro/Test-Theme
d3e20b62111636ecbe4267c5fff7c2820a9a892d
[ "Apache-2.0" ]
null
null
null
checkov/terraform/checks/resource/azure/AzureInstancePassword.py
mgmt1pyro/Test-Theme
d3e20b62111636ecbe4267c5fff7c2820a9a892d
[ "Apache-2.0" ]
null
null
null
checkov/terraform/checks/resource/azure/AzureInstancePassword.py
mgmt1pyro/Test-Theme
d3e20b62111636ecbe4267c5fff7c2820a9a892d
[ "Apache-2.0" ]
null
null
null
from checkov.terraform.models.enums import CheckResult, CheckCategories from checkov.terraform.checks.resource.base_check import BaseResourceCheck class AzureInstancePassword(BaseResourceCheck): def __init__(self): name = "Ensure Azure Instance does not use basic authentication(Use SSH Key Instead)" ...
43.666667
106
0.703817
from checkov.terraform.models.enums import CheckResult, CheckCategories from checkov.terraform.checks.resource.base_check import BaseResourceCheck class AzureInstancePassword(BaseResourceCheck): def __init__(self): name = "Ensure Azure Instance does not use basic authentication(Use SSH Key Instead)" ...
true
true
f75a0a7ea6fc0b581e9d4e0f4e0fec8d89071b83
828
py
Python
tests/structure/test_node.py
novaenext/ipipeline
c43e017ee8ab7464b946e871b6ee3b28cae6f2a9
[ "BSD-3-Clause" ]
null
null
null
tests/structure/test_node.py
novaenext/ipipeline
c43e017ee8ab7464b946e871b6ee3b28cae6f2a9
[ "BSD-3-Clause" ]
9
2021-11-08T15:39:28.000Z
2022-02-04T18:45:31.000Z
tests/structure/test_node.py
novaenext/ipipeline
c43e017ee8ab7464b946e871b6ee3b28cae6f2a9
[ "BSD-3-Clause" ]
null
null
null
from unittest import TestCase from ipipeline.structure.node import Node class TestNode(TestCase): def test_init(self) -> None: node = Node( 'n1', mock_task, inputs={'param1': 7}, outputs=['return1'], tags=['t1'] ) self.asser...
25.875
56
0.589372
from unittest import TestCase from ipipeline.structure.node import Node class TestNode(TestCase): def test_init(self) -> None: node = Node( 'n1', mock_task, inputs={'param1': 7}, outputs=['return1'], tags=['t1'] ) self.asser...
true
true
f75a0aa5db4ea8520697150dd855394cd672e7d9
1,275
py
Python
tests/resource_test.py
pce/contentful-management.py
4851ec3c3db3458586b9e1907d927aff97dda631
[ "MIT" ]
30
2017-04-13T20:58:22.000Z
2021-12-30T22:13:43.000Z
tests/resource_test.py
pce/contentful-management.py
4851ec3c3db3458586b9e1907d927aff97dda631
[ "MIT" ]
42
2017-04-15T02:10:48.000Z
2022-03-10T23:30:26.000Z
tests/resource_test.py
pce/contentful-management.py
4851ec3c3db3458586b9e1907d927aff97dda631
[ "MIT" ]
15
2017-06-02T12:57:48.000Z
2020-12-08T13:34:36.000Z
import vcr from copy import deepcopy from unittest import TestCase from .test_helper import CLIENT, PLAYGROUND_SPACE class ResourceTest(TestCase): @vcr.use_cassette('fixtures/resource/copy.yaml') def test_can_properly_deepcopy(self): entry = CLIENT.spaces().find(PLAYGROUND_SPACE).environments().find('...
34.459459
103
0.72
import vcr from copy import deepcopy from unittest import TestCase from .test_helper import CLIENT, PLAYGROUND_SPACE class ResourceTest(TestCase): @vcr.use_cassette('fixtures/resource/copy.yaml') def test_can_properly_deepcopy(self): entry = CLIENT.spaces().find(PLAYGROUND_SPACE).environments().find('...
true
true
f75a0c4574636dc216f6b6c0e34c6177c7f5ff25
1,785
py
Python
problem17.py
malienko/projecteuler_python
d04b4d39ed0b9c35f86e078e7df97a2025af694f
[ "MIT" ]
null
null
null
problem17.py
malienko/projecteuler_python
d04b4d39ed0b9c35f86e078e7df97a2025af694f
[ "MIT" ]
null
null
null
problem17.py
malienko/projecteuler_python
d04b4d39ed0b9c35f86e078e7df97a2025af694f
[ "MIT" ]
null
null
null
''' If the numbers 1 to 5 are written out in words: one, two, three, four, five, then there are 3 + 3 + 5 + 4 + 4 = 19 letters used in total. If all the numbers from 1 to 1000 (one thousand) inclusive were written out in words, how many letters would be used? NOTE: Do not count spaces or hyphens. For example, 342 (th...
48.243243
238
0.755182
one_through_nine = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine'] ten_through_nineteen = ['ten', 'eleven', 'twelve', 'thirteen', 'fourteen', 'fifteen', 'sixteen', 'seventeen', 'eighteen', 'nineteen'] tens = ['twenty', 'thirty', 'forty', 'fifty', 'sixty', 'seventy', 'eighty', 'ninety'] hund...
true
true
f75a0cbf08407b6921056e97f6645ea2f592cb4b
484
py
Python
regexlib/2021-5-15/python_re2_test_file/regexlib_2376.py
yetingli/ReDoS-Benchmarks
f5b5094d835649e957bf3fec6b8bd4f6efdb35fc
[ "MIT" ]
1
2022-01-24T14:43:23.000Z
2022-01-24T14:43:23.000Z
regexlib/python_re2_test_file/regexlib_2376.py
yetingli/ReDoS-Benchmarks
f5b5094d835649e957bf3fec6b8bd4f6efdb35fc
[ "MIT" ]
null
null
null
regexlib/python_re2_test_file/regexlib_2376.py
yetingli/ReDoS-Benchmarks
f5b5094d835649e957bf3fec6b8bd4f6efdb35fc
[ "MIT" ]
null
null
null
# 2376 # <([^\s>]*)(\s[^<]*)> # POLYNOMIAL # nums:5 # POLYNOMIAL AttackString:""+"<"*10000+"@1 _SLQ_2" import re2 as re from time import perf_counter regex = """<([^\s>]*)(\s[^<]*)>""" REGEX = re.compile(regex) for i in range(0, 150000): ATTACK = "" + "<" * i * 10000 + "@1 _SLQ_2" LEN = len(ATTACK) BEGIN ...
25.473684
50
0.572314
import re2 as re from time import perf_counter regex = """<([^\s>]*)(\s[^<]*)>""" REGEX = re.compile(regex) for i in range(0, 150000): ATTACK = "" + "<" * i * 10000 + "@1 _SLQ_2" LEN = len(ATTACK) BEGIN = perf_counter() m = REGEX.search(ATTACK) DURATION = perf_counter() - BEGIN print(f"{i ...
true
true
f75a0da6e2fe9ccd4b8f015a8057017df42a365e
3,776
py
Python
rosbag2_py/test/test_sequential_reader_multiple_files.py
lihui815/rosbag2
dc870ae44da68634b69ee1e828cc0c70bc178839
[ "Apache-2.0" ]
118
2018-04-27T10:48:44.000Z
2022-03-30T14:45:13.000Z
rosbag2_py/test/test_sequential_reader_multiple_files.py
lihui815/rosbag2
dc870ae44da68634b69ee1e828cc0c70bc178839
[ "Apache-2.0" ]
851
2018-05-16T19:11:49.000Z
2022-03-31T23:02:50.000Z
rosbag2_py/test/test_sequential_reader_multiple_files.py
RobotecAI/rosbag2
ef40da90d87ea3306b1e0806092e7bf28eb0ff71
[ "Apache-2.0" ]
147
2018-04-03T17:05:06.000Z
2022-03-24T06:05:42.000Z
# Copyright 2020 Open Source Robotics Foundation, 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...
26.780142
97
0.680085
import os from pathlib import Path import sys if os.environ.get('ROSBAG2_PY_TEST_WITH_RTLD_GLOBAL', None) is not None: sys.setdlopenflags(os.RTLD_GLOBAL | os.RTLD_LAZY) from common import get_rosbag_options import rosbag2_py def test_reset_filter(): bag_path = str(Path(__file__).parent.p...
true
true
f75a0dd77603782374fc2f0d4f4233d2cef6bf47
3,619
py
Python
MoinMoin/macro/NewPage.py
RealTimeWeb/wikisite
66a22c68c172f0ebb3c88a9885ccd33e2d59c3c5
[ "Apache-2.0" ]
1
2016-04-01T04:02:28.000Z
2016-04-01T04:02:28.000Z
Documentation/ManualSource/wikicmd/MoinMoin/macro/NewPage.py
sleyzerzon/soar
74a6f32ba1be3a7b3ed4eac0b44b0f4b2e981f71
[ "Unlicense" ]
3
2020-06-26T21:21:32.000Z
2020-06-26T21:21:36.000Z
Documentation/ManualSource/wikicmd/MoinMoin/macro/NewPage.py
sleyzerzon/soar
74a6f32ba1be3a7b3ed4eac0b44b0f4b2e981f71
[ "Unlicense" ]
2
2017-01-25T20:06:44.000Z
2021-03-25T18:39:55.000Z
# -*- coding: iso-8859-1 -*- """ MoinMoin - New Page macro Thanks to Jos Yule's "blogpost" action and his modified Form for giving me the pieces I needed to figure all this stuff out: MoinMoin:JosYule @copyright: 2004 Vito Miliano (vito_moinnewpagewithtemplate@perilith.com), 2004 by Ni...
35.831683
118
0.605416
from MoinMoin import wikiutil Dependencies = ["language"] class NewPage: def __init__(self, macro, template=u'', button_label=u'', parent_page=u'', name_template=u'%s'): self.macro = macro self.request = macro.request self.formatter = macro.formatter self.templat...
true
true
f75a0e525c8ce587c8bccf5b02ed9e8f87e10f53
5,403
py
Python
spacex_dash_app.py
attackgnome/SpaceX
1005f8a24bc44ee3d19cc4500d9674666f07621b
[ "Apache-2.0" ]
null
null
null
spacex_dash_app.py
attackgnome/SpaceX
1005f8a24bc44ee3d19cc4500d9674666f07621b
[ "Apache-2.0" ]
null
null
null
spacex_dash_app.py
attackgnome/SpaceX
1005f8a24bc44ee3d19cc4500d9674666f07621b
[ "Apache-2.0" ]
null
null
null
# Import required libraries import pandas as pd import dash import dash_html_components as html import dash_core_components as dcc from dash.dependencies import Input, Output import plotly.express as px # Read the airline data into pandas dataframe spacex_df = pd.read_csv("spacex_launch_dash.csv") max_payload = spacex...
45.788136
121
0.490283
import pandas as pd import dash import dash_html_components as html import dash_core_components as dcc from dash.dependencies import Input, Output import plotly.express as px spacex_df = pd.read_csv("spacex_launch_dash.csv") max_payload = spacex_df['Payload Mass (kg)'].max() min_payload = spacex_df['Payload Mass (kg)'...
true
true
f75a0f4db446801a45c5a3f60a615b5354d66e00
929
py
Python
miniworld/model/network/connections/NodeDictMixin.py
miniworld-project/miniworld_core
c591bad232b78eae99e8f55cb1b907c1e228484b
[ "MIT" ]
5
2019-05-11T14:57:15.000Z
2021-07-05T00:35:25.000Z
miniworld/model/network/connections/NodeDictMixin.py
miniworld-project/miniworld_core
c591bad232b78eae99e8f55cb1b907c1e228484b
[ "MIT" ]
27
2017-03-17T07:11:02.000Z
2019-05-26T23:36:56.000Z
miniworld/model/network/connections/NodeDictMixin.py
miniworld-project/miniworld_core
c591bad232b78eae99e8f55cb1b907c1e228484b
[ "MIT" ]
6
2017-05-03T12:11:33.000Z
2020-04-03T11:44:27.000Z
from collections import UserDict from miniworld.model.network.connections.JSONEncoder import JSONStrMixin # TODO: REMOVE class NodeDictMixin: """ """ ######################################### # Structure Converting ######################################### def to_ids(self): """ ...
25.805556
126
0.53606
from collections import UserDict from miniworld.model.network.connections.JSONEncoder import JSONStrMixin class NodeDictMixin: def to_ids(self): converted_to_ids = {(emu_node_x.id, emu_node_y.id): val_inner for (emu_node_x, emu_node_y), val_inner in self.items()} return self.__class...
true
true
f75a0fa177b2aeec75d4d446fcb2c8aab2d3d8e0
4,040
py
Python
Packs/ArcSightESM/Integrations/ArcSightESMv2/ArcSightESMv2_test.py
yyyogev/content
a4692b55873f900c4803f0cc020c1b1ad3e9e74c
[ "MIT" ]
1
2020-07-22T05:55:11.000Z
2020-07-22T05:55:11.000Z
Packs/ArcSightESM/Integrations/ArcSightESMv2/ArcSightESMv2_test.py
nicoloereni/content
ddb88044c5b39a17894dd13e7ae260d9854afc30
[ "MIT" ]
null
null
null
Packs/ArcSightESM/Integrations/ArcSightESMv2/ArcSightESMv2_test.py
nicoloereni/content
ddb88044c5b39a17894dd13e7ae260d9854afc30
[ "MIT" ]
2
2020-07-15T06:41:52.000Z
2020-07-19T18:45:23.000Z
import demistomock as demisto import pytest import requests_mock PARAMS = { 'server': 'https://server', 'credentials': {}, 'proxy': True} ARGS = {'ids': 'lastDateRange', 'lastDateRange': '2 hours'} def test_decode_ip(mocker): mocker.patch.object(demisto, 'getIntegrationContext', return_valu...
37.06422
113
0.674257
import demistomock as demisto import pytest import requests_mock PARAMS = { 'server': 'https://server', 'credentials': {}, 'proxy': True} ARGS = {'ids': 'lastDateRange', 'lastDateRange': '2 hours'} def test_decode_ip(mocker): mocker.patch.object(demisto, 'getIntegrationContext', return_valu...
true
true
f75a100ca92953e981e0c838ce0534132719d6c3
6,318
py
Python
bluebottle/payouts_dorado/tests/test_api.py
jayvdb/bluebottle
305fea238e6aa831598a8b227223a1a2f34c4fcc
[ "BSD-3-Clause" ]
null
null
null
bluebottle/payouts_dorado/tests/test_api.py
jayvdb/bluebottle
305fea238e6aa831598a8b227223a1a2f34c4fcc
[ "BSD-3-Clause" ]
null
null
null
bluebottle/payouts_dorado/tests/test_api.py
jayvdb/bluebottle
305fea238e6aa831598a8b227223a1a2f34c4fcc
[ "BSD-3-Clause" ]
null
null
null
import json from datetime import timedelta from django.contrib.auth.models import Group from django.core.urlresolvers import reverse from django.utils.timezone import now from moneyed import Money from rest_framework import status from rest_framework.authtoken.models import Token from bluebottle.funding.tests.factori...
34.151351
90
0.589744
import json from datetime import timedelta from django.contrib.auth.models import Group from django.core.urlresolvers import reverse from django.utils.timezone import now from moneyed import Money from rest_framework import status from rest_framework.authtoken.models import Token from bluebottle.funding.tests.factori...
true
true
f75a11e22b8fbf28d0c646b394cdca74b9ee1a2a
9,659
py
Python
const/sub_categories/life/housing.py
a1b2c3d4e5x/spider_iyp
d6ba97696a5870b5c103754a4de6f144f7f0b891
[ "MIT" ]
null
null
null
const/sub_categories/life/housing.py
a1b2c3d4e5x/spider_iyp
d6ba97696a5870b5c103754a4de6f144f7f0b891
[ "MIT" ]
null
null
null
const/sub_categories/life/housing.py
a1b2c3d4e5x/spider_iyp
d6ba97696a5870b5c103754a4de6f144f7f0b891
[ "MIT" ]
null
null
null
from typing import Dict from ..base_category import BaseCategory # 營建工程 construction-engineering class ConstructionEngineering(object): def construction_engineering() -> Dict[str, Dict[str, str]]: list = {} list['name'] = '營建工程' list['id'] = 'construction-engineering' construction_engineeri...
33.422145
108
0.65835
from typing import Dict from ..base_category import BaseCategory class ConstructionEngineering(object): def construction_engineering() -> Dict[str, Dict[str, str]]: list = {} list['name'] = '營建工程' list['id'] = 'construction-engineering' construction_engineering = {} construction_engin...
true
true
f75a1303efbf19e68be4b0f63a3c967dea535e9c
28,534
py
Python
lib/dataset/crowdpose.py
simonwey/DecoupleNet
3e9e09d512230cb0d95e9db98c5838ca9ff799da
[ "Apache-2.0" ]
null
null
null
lib/dataset/crowdpose.py
simonwey/DecoupleNet
3e9e09d512230cb0d95e9db98c5838ca9ff799da
[ "Apache-2.0" ]
null
null
null
lib/dataset/crowdpose.py
simonwey/DecoupleNet
3e9e09d512230cb0d95e9db98c5838ca9ff799da
[ "Apache-2.0" ]
null
null
null
# ------------------------------------------------------------------------------ # Copyright (c) Microsoft # Licensed under the MIT License. # Written by Bowen Cheng (bcheng9@illinois.edu) and Bin Xiao (leoxiaobin@gmail.com) # ------------------------------------------------------------------------------ from __future...
37.153646
127
0.53459
from __future__ import absolute_import from __future__ import division from __future__ import print_function from collections import defaultdict from collections import OrderedDict import logging import os import os.path import cv2 import json_tricks as json import numpy as np from torch.utils.data import Dataset f...
true
true
f75a149eb65abd973646e87cf021f0b5998165c1
976
py
Python
tests/app/config_paths_test.py
meeseeksmachine/voila
473e3a961783f808382f2bfa4ae9d5ca19a213a6
[ "BSD-3-Clause" ]
null
null
null
tests/app/config_paths_test.py
meeseeksmachine/voila
473e3a961783f808382f2bfa4ae9d5ca19a213a6
[ "BSD-3-Clause" ]
null
null
null
tests/app/config_paths_test.py
meeseeksmachine/voila
473e3a961783f808382f2bfa4ae9d5ca19a213a6
[ "BSD-3-Clause" ]
null
null
null
# test all objects that should be configurable import pytest import os BASE_DIR = os.path.dirname(__file__) @pytest.fixture def voila_config_file_paths_arg(): path = os.path.join(BASE_DIR, '..', 'configs', 'general') return '--VoilaTest.config_file_paths=[%r]' % path def test_config_app(voila_app): a...
27.885714
71
0.770492
import pytest import os BASE_DIR = os.path.dirname(__file__) @pytest.fixture def voila_config_file_paths_arg(): path = os.path.join(BASE_DIR, '..', 'configs', 'general') return '--VoilaTest.config_file_paths=[%r]' % path def test_config_app(voila_app): assert voila_app.voila_configuration.template ==...
true
true
f75a14e028379f1bbd2ed24d16195795ec270e15
19,897
py
Python
cloudbio/galaxy/applications.py
afgane/cloudbiolinux
34505624fa271e9b8ff8a6ab7a08f840e41747ce
[ "MIT" ]
1
2015-06-19T14:34:43.000Z
2015-06-19T14:34:43.000Z
cloudbio/galaxy/applications.py
afgane/cloudbiolinux
34505624fa271e9b8ff8a6ab7a08f840e41747ce
[ "MIT" ]
null
null
null
cloudbio/galaxy/applications.py
afgane/cloudbiolinux
34505624fa271e9b8ff8a6ab7a08f840e41747ce
[ "MIT" ]
null
null
null
""" This file is largely derived from a similar file in mi-deployment written Dr. Enis Afgan. https://bitbucket.org/afgane/mi-deployment/src/8cba95baf98f/tools_fabfile.py Long term it will be best to install these packages for Galaxy via the Tool Shed, however many of these tools are not yet in the tool shed and the ...
42.514957
186
0.641403
import os from fabric.api import sudo, run, cd from fabric.contrib.files import exists from cloudbio.custom.shared import _make_tmp_dir, _if_not_installed, _set_default_config from cloudbio.custom.shared import _get_install, _configure_make, _make_copy, _fetch_and_unpack @_if_not_installed(None) def install_fastx_t...
true
true
f75a160f0f68cf5c18b667df9fe939e20f38a4f9
810
py
Python
tests/python/gaia-ui-tests/gaiatest/tests/graphics/test_unlock_to_homescreen.py
TheoChevalier/gaia
803d04e3829fd4fe9261211aa0ddca6b79d4e328
[ "Apache-2.0" ]
3
2016-08-17T08:52:51.000Z
2020-03-29T04:56:45.000Z
tests/python/gaia-ui-tests/gaiatest/tests/graphics/test_unlock_to_homescreen.py
TheoChevalier/gaia
803d04e3829fd4fe9261211aa0ddca6b79d4e328
[ "Apache-2.0" ]
1
2017-02-21T21:36:12.000Z
2017-02-21T21:36:30.000Z
tests/python/gaia-ui-tests/gaiatest/tests/graphics/test_unlock_to_homescreen.py
TheoChevalier/gaia
803d04e3829fd4fe9261211aa0ddca6b79d4e328
[ "Apache-2.0" ]
1
2019-03-03T01:31:58.000Z
2019-03-03T01:31:58.000Z
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from marionette_driver import Wait from gaiatest.apps.lockscreen.app import LockScreen from gaiatest.gaia_graphics_test...
32.4
94
0.745679
from marionette_driver import Wait from gaiatest.apps.lockscreen.app import LockScreen from gaiatest.gaia_graphics_test import GaiaImageCompareTestCase class TestLockScreenAccessibility(GaiaImageCompareTestCase): def setUp(self): GaiaImageCompareTestCase.setUp(self) self.device.lock() def ...
true
true
f75a16430b77093fbac9367e705d0bbb584bd302
1,227
py
Python
bioinformatics/analysis/snp/replace_score.py
bioShaun/omsCabinet
741179a06cbd5200662cd03bc2e0115f4ad06917
[ "MIT" ]
null
null
null
bioinformatics/analysis/snp/replace_score.py
bioShaun/omsCabinet
741179a06cbd5200662cd03bc2e0115f4ad06917
[ "MIT" ]
null
null
null
bioinformatics/analysis/snp/replace_score.py
bioShaun/omsCabinet
741179a06cbd5200662cd03bc2e0115f4ad06917
[ "MIT" ]
null
null
null
import fire import gzip import pandas as pd from pathlib import PurePath def extract_vcf_header(vcf): if vcf.suffix == '.gz': vcf_inf = gzip.open(vcf) else: vcf_inf = open(vcf) prefix = '' for eachline in vcf_inf: if vcf.suffix == '.gz': eachline = eachline.decode()...
27.886364
62
0.581092
import fire import gzip import pandas as pd from pathlib import PurePath def extract_vcf_header(vcf): if vcf.suffix == '.gz': vcf_inf = gzip.open(vcf) else: vcf_inf = open(vcf) prefix = '' for eachline in vcf_inf: if vcf.suffix == '.gz': eachline = eachline.decode()...
true
true
f75a16661a87dbecc8cedd5e924beb9f4374fc34
2,159
py
Python
tests/test_restsession.py
nonstdout/dnacentersdk
dbbbc4baa5300aa9e5c9193f2ea71438018095f5
[ "MIT" ]
null
null
null
tests/test_restsession.py
nonstdout/dnacentersdk
dbbbc4baa5300aa9e5c9193f2ea71438018095f5
[ "MIT" ]
null
null
null
tests/test_restsession.py
nonstdout/dnacentersdk
dbbbc4baa5300aa9e5c9193f2ea71438018095f5
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """dnacentersdk/restsession.py Fixtures & Tests Copyright (c) 2019-2020 Cisco and/or its affiliates. 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, i...
34.269841
94
0.746642
import logging import warnings import pytest import dnacentersdk logging.captureWarnings(True) def rate_limit_detected(w): while w: if issubclass(w.pop().category, dnacentersdk.RateLimitWarning): return True return False @pytest.mark.ratelimit def test_rate_limit_retry(api): ...
true
true
f75a1689b4f57c41ff4d275a2ae5b8983686d6c0
7,400
py
Python
examples/lightning/label_dct.py
sunruina2/byol-pytorch
f53c16bfcb41a37c21064aa5ccb7c6f33354d034
[ "MIT" ]
null
null
null
examples/lightning/label_dct.py
sunruina2/byol-pytorch
f53c16bfcb41a37c21064aa5ccb7c6f33354d034
[ "MIT" ]
null
null
null
examples/lightning/label_dct.py
sunruina2/byol-pytorch
f53c16bfcb41a37c21064aa5ccb7c6f33354d034
[ "MIT" ]
null
null
null
# 由sql生成 labelname2cid_dct = { 'l1': {'yphl': 0, 'bad_l2': 1}, 'l2': {'优': 0, '普': 1, '封面昏暗或模糊': 2, '画质不佳': 3, '遮挡LOGO': 4, '严重卡顿': 5}, 'l2_combine': {'优': 0, '普': 1, '封面昏暗或模糊': 2, '画质不佳': 3, '遮挡LOGO': 4, '严重卡顿': 5}, 'l2_combine2': {'优': 0, '普': 0, '封面昏暗或模糊': 0, '画质不佳': 0, '遮挡LOGO': 1, '严重卡顿': 0}, '...
89.156627
107
0.554459
labelname2cid_dct = { 'l1': {'yphl': 0, 'bad_l2': 1}, 'l2': {'优': 0, '普': 1, '封面昏暗或模糊': 2, '画质不佳': 3, '遮挡LOGO': 4, '严重卡顿': 5}, 'l2_combine': {'优': 0, '普': 1, '封面昏暗或模糊': 2, '画质不佳': 3, '遮挡LOGO': 4, '严重卡顿': 5}, 'l2_combine2': {'优': 0, '普': 0, '封面昏暗或模糊': 0, '画质不佳': 0, '遮挡LOGO': 1, '严重卡顿': 0}, 'l2_combin...
true
true