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
f70fa6b243087d007e8f52414d27fa83ded92b20
2,335
py
Python
venv/Lib/site-packages/IPython/html/widgets/widget_container.py
Tyranicangel/dtrans
a5e23d200a310701bb357bff09e35a5629a3f7a3
[ "BSD-3-Clause" ]
8
2021-12-14T21:30:01.000Z
2022-02-14T11:30:03.000Z
IPython/html/widgets/widget_container.py
khinsen/ipython
dfd5cb1d3e34048593ba537dacdbef08fe766624
[ "BSD-3-Clause-Clear" ]
1
2021-09-11T14:30:32.000Z
2021-09-11T14:30:32.000Z
IPython/html/widgets/widget_container.py
khinsen/ipython
dfd5cb1d3e34048593ba537dacdbef08fe766624
[ "BSD-3-Clause-Clear" ]
2
2016-12-19T02:27:46.000Z
2019-07-29T02:53:54.000Z
"""ContainerWidget class. Represents a container that can be used to group other widgets. """ #----------------------------------------------------------------------------- # Copyright (c) 2013, the IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the ...
37.063492
82
0.544325
from .widget import DOMWidget from IPython.utils.traitlets import Unicode, Tuple, TraitError class ContainerWidget(DOMWidget): _view_name = Unicode('ContainerView', sync=True) children = Tuple() _children = Tuple(sync=True) def __init__(self, **kwargs): super(Co...
true
true
f70fa6ee938b2345b273950c3d615a8cb65e74f1
3,036
py
Python
inst/CnaAnnotator.py
jalavery/gnomeR
b0031bd5eb1c8c5636910d0b779a8808947245f5
[ "MIT" ]
15
2020-02-20T18:20:15.000Z
2021-12-23T08:49:09.000Z
inst/CnaAnnotator.py
jalavery/gnomeR
b0031bd5eb1c8c5636910d0b779a8808947245f5
[ "MIT" ]
36
2020-02-21T20:23:41.000Z
2022-03-04T21:12:44.000Z
inst/CnaAnnotator.py
MSKCC-Epi-Bio/gnomeR
4f165774eb3c5f442881a915ee70e18a5f33b387
[ "MIT" ]
9
2020-02-17T23:43:35.000Z
2022-03-21T12:01:36.000Z
import argparse # from AnnotatorCore import * import sys import csv import requests import os.path import logging import re import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt from datetime import date import logging logging.basicConfig(level=logging.INFO) log = logging.getLogger('CnaAnnotator') d...
44.647059
239
0.693676
import argparse import sys import csv import requests import os.path import logging import re import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt from datetime import date import logging logging.basicConfig(level=logging.INFO) log = logging.getLogger('CnaAnnotator') def main(argv): if argv.he...
true
true
f70fa803280ab9f216b7ca2a38b01efb67cd1f5e
3,693
py
Python
tmot/matching.py
JunweiLiang/Object_Detection_Tracking
f86caaec97669a6da56f1b402cca4e179a85d2f0
[ "MIT" ]
328
2019-05-27T03:09:02.000Z
2022-03-31T05:12:04.000Z
tmot/matching.py
AnjaliPC/Object_Detection_Tracking
f86caaec97669a6da56f1b402cca4e179a85d2f0
[ "MIT" ]
43
2019-06-05T14:04:09.000Z
2022-01-25T03:16:39.000Z
tmot/matching.py
AnjaliPC/Object_Detection_Tracking
f86caaec97669a6da56f1b402cca4e179a85d2f0
[ "MIT" ]
107
2019-05-27T06:26:38.000Z
2022-03-25T03:32:58.000Z
import numpy as np import scipy from scipy.spatial.distance import cdist import lap # 0.4.0 from cython_bbox import bbox_overlaps as bbox_ious from . import kalman_filter def merge_matches(m1, m2, shape): O,P,Q = shape m1 = np.asarray(m1) m2 = np.asarray(m2) M1 = scipy.sparse.coo_matrix...
33.572727
125
0.638776
import numpy as np import scipy from scipy.spatial.distance import cdist import lap from cython_bbox import bbox_overlaps as bbox_ious from . import kalman_filter def merge_matches(m1, m2, shape): O,P,Q = shape m1 = np.asarray(m1) m2 = np.asarray(m2) M1 = scipy.sparse.coo_matrix((np.one...
true
true
f70fa88268e7f2a8c55619f7c4dd3c7747d1770a
149
py
Python
tardis/io/setup_package.py
chvogl/tardis
e444ffeebef92811165ec982a5c23785932a7f8e
[ "BSD-3-Clause" ]
1
2016-03-24T13:14:25.000Z
2016-03-24T13:14:25.000Z
tardis/io/setup_package.py
chvogl/tardis
e444ffeebef92811165ec982a5c23785932a7f8e
[ "BSD-3-Clause" ]
6
2015-03-16T10:31:40.000Z
2019-02-21T17:56:55.000Z
tardis/io/setup_package.py
chvogl/tardis
e444ffeebef92811165ec982a5c23785932a7f8e
[ "BSD-3-Clause" ]
5
2015-03-17T18:56:20.000Z
2019-02-12T12:53:15.000Z
# Licensed under a 3-clause BSD style license - see LICENSE.rst def get_package_data(): return {'tardis.io.tests':['data/*.dat', 'data/*.yml']}
29.8
63
0.677852
def get_package_data(): return {'tardis.io.tests':['data/*.dat', 'data/*.yml']}
true
true
f70fa8b722e119309bc970211e06b4c03d657183
1,320
py
Python
tests/test_stat.py
cailab-tamu/scTenifoldXct
d25ded8dfb7f2951217a30ab71eccd6b060178f6
[ "MIT" ]
null
null
null
tests/test_stat.py
cailab-tamu/scTenifoldXct
d25ded8dfb7f2951217a30ab71eccd6b060178f6
[ "MIT" ]
null
null
null
tests/test_stat.py
cailab-tamu/scTenifoldXct
d25ded8dfb7f2951217a30ab71eccd6b060178f6
[ "MIT" ]
null
null
null
import pytest import itertools import pandas as pd import numpy as np from scTenifoldXct.core import null_test def generate_fake_df_nn(n_ligand=3000, n_receptors=3000, n_cands=200): gene_names = [f"GENE{i}" for i in range(max(n_ligand, n_receptors))] iteration = itertools.product(gene_names, gene_names) ...
34.736842
100
0.666667
import pytest import itertools import pandas as pd import numpy as np from scTenifoldXct.core import null_test def generate_fake_df_nn(n_ligand=3000, n_receptors=3000, n_cands=200): gene_names = [f"GENE{i}" for i in range(max(n_ligand, n_receptors))] iteration = itertools.product(gene_names, gene_names) ...
true
true
f70fa8cb9d7f1e49ef9b56b7615433e16e26661d
852
py
Python
dataExtractor.py
bdburak/AmazonReviewSentimentAnalysis
8e68d27f5ecd6c5e1b0c153f79c8b3ea1767ea50
[ "MIT" ]
null
null
null
dataExtractor.py
bdburak/AmazonReviewSentimentAnalysis
8e68d27f5ecd6c5e1b0c153f79c8b3ea1767ea50
[ "MIT" ]
1
2021-04-28T18:26:41.000Z
2021-04-28T18:26:41.000Z
dataExtractor.py
bdburak/AmazonReviewSentimentAnalysis
8e68d27f5ecd6c5e1b0c153f79c8b3ea1767ea50
[ "MIT" ]
null
null
null
#Review Seperator def reviewToList(strDataLocation): #reviewToList(str_DataLocation) file = open(strDataLocation) listFile=(file.readlines()) firstReviewItem=0 lastReviewItem=0 listReviews = [] reviewText ="" for item in range(len(listFile)): if('<review_text>\n'==listFile[item]): ...
25.818182
84
0.564554
def reviewToList(strDataLocation): file = open(strDataLocation) listFile=(file.readlines()) firstReviewItem=0 lastReviewItem=0 listReviews = [] reviewText ="" for item in range(len(listFile)): if('<review_text>\n'==listFile[item]): firstReviewItem = item+1 if('<...
true
true
f70fa8ec2ca8e6448f8e67c80257b049471e9c70
6,343
py
Python
lab_4/main.py
SoullessDark/2020-2-level-labs
9555eb5a86a0f330b2f99e991928b0337f519b7a
[ "MIT" ]
null
null
null
lab_4/main.py
SoullessDark/2020-2-level-labs
9555eb5a86a0f330b2f99e991928b0337f519b7a
[ "MIT" ]
null
null
null
lab_4/main.py
SoullessDark/2020-2-level-labs
9555eb5a86a0f330b2f99e991928b0337f519b7a
[ "MIT" ]
null
null
null
""" Lab 4 """ import re from ngrams.ngram_trie import NGramTrie def tokenize_by_sentence(text: str) -> tuple: if not isinstance(text, str): raise ValueError sents = re.split(r'[.?!]', text) tokenized_sent = [] for sent in sents: tokens = re.sub(r'[^a-z \n]', '', sent.lower()).split()...
29.365741
108
0.612329
import re from ngrams.ngram_trie import NGramTrie def tokenize_by_sentence(text: str) -> tuple: if not isinstance(text, str): raise ValueError sents = re.split(r'[.?!]', text) tokenized_sent = [] for sent in sents: tokens = re.sub(r'[^a-z \n]', '', sent.lower()).split() if t...
true
true
f70fa93743ec576b39568159579d16544248a1ec
83
py
Python
conf/apps.py
invernoa/Conferences
9e821948311dc9c28323ede8a26764899fc05255
[ "MIT" ]
41
2019-01-02T09:36:54.000Z
2022-02-20T13:13:05.000Z
conf/apps.py
invernoa/Conferences
9e821948311dc9c28323ede8a26764899fc05255
[ "MIT" ]
15
2019-09-30T05:40:20.000Z
2022-02-17T19:28:41.000Z
conf/apps.py
invernoa/Conferences
9e821948311dc9c28323ede8a26764899fc05255
[ "MIT" ]
23
2019-02-18T10:50:10.000Z
2022-01-06T07:53:18.000Z
from django.apps import AppConfig class ConfConfig(AppConfig): name = 'conf'
13.833333
33
0.73494
from django.apps import AppConfig class ConfConfig(AppConfig): name = 'conf'
true
true
f70fac18582ddbd19ae27fc96110256eb9794224
794
py
Python
fvtr/gdb/hello-gdb.py
Cherbot/advance-toolchain
f39722a536157b1dc96a59a84ff3d6dc969523f3
[ "Apache-2.0" ]
null
null
null
fvtr/gdb/hello-gdb.py
Cherbot/advance-toolchain
f39722a536157b1dc96a59a84ff3d6dc969523f3
[ "Apache-2.0" ]
null
null
null
fvtr/gdb/hello-gdb.py
Cherbot/advance-toolchain
f39722a536157b1dc96a59a84ff3d6dc969523f3
[ "Apache-2.0" ]
1
2019-09-02T15:35:09.000Z
2019-09-02T15:35:09.000Z
# Copyright 2017 IBM Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
31.76
74
0.746851
import gdb class HelloGdb(gdb.Command): def __init__ (self): super (HelloGdb, self).__init__("hello-gdb", gdb.COMMAND_USER) def invoke(self, arg, from_tty): print "Hello GDB from Python!" HelloGdb()
false
true
f70facb47d95871efcad46d686499cc18bc105f0
937
py
Python
Rendering/Core/Testing/Python/TestCgShader.py
collects/VTK
004944f0d54df673c38b3d4016a4bee74fa7d813
[ "BSD-3-Clause" ]
null
null
null
Rendering/Core/Testing/Python/TestCgShader.py
collects/VTK
004944f0d54df673c38b3d4016a4bee74fa7d813
[ "BSD-3-Clause" ]
null
null
null
Rendering/Core/Testing/Python/TestCgShader.py
collects/VTK
004944f0d54df673c38b3d4016a4bee74fa7d813
[ "BSD-3-Clause" ]
2
2019-09-09T22:42:12.000Z
2020-10-22T07:10:08.000Z
#!/usr/bin/env python renWin = vtk.vtkRenderWindow() iren = vtk.vtkRenderWindowInteractor() iren.SetRenderWindow(renWin) renderer = vtk.vtkRenderer() renWin.AddRenderer(renderer) src1 = vtk.vtkSphereSource() src1.SetRadius(5) src1.SetPhiResolution(20) src1.SetThetaResolution(20) mapper = vtk.vtkPolyDataMapper() mapper...
31.233333
52
0.781217
renWin = vtk.vtkRenderWindow() iren = vtk.vtkRenderWindowInteractor() iren.SetRenderWindow(renWin) renderer = vtk.vtkRenderer() renWin.AddRenderer(renderer) src1 = vtk.vtkSphereSource() src1.SetRadius(5) src1.SetPhiResolution(20) src1.SetThetaResolution(20) mapper = vtk.vtkPolyDataMapper() mapper.SetInputConnection(s...
true
true
f70facd08177cb7dc67b2eebe51ba102c9830811
510
py
Python
Demo/scripts/makedir.py
cemeyer/tauthon
2c3328c5272cffa2a544542217181c5828afa7ed
[ "PSF-2.0" ]
2,293
2015-01-02T12:46:10.000Z
2022-03-29T09:45:43.000Z
python/src/Demo/scripts/makedir.py
weiqiangzheng/sl4a
d3c17dca978cbeee545e12ea240a9dbf2a6999e9
[ "Apache-2.0" ]
315
2015-05-31T11:55:46.000Z
2022-01-12T08:36:37.000Z
python/src/Demo/scripts/makedir.py
weiqiangzheng/sl4a
d3c17dca978cbeee545e12ea240a9dbf2a6999e9
[ "Apache-2.0" ]
1,033
2015-01-04T07:48:40.000Z
2022-03-24T09:34:37.000Z
#! /usr/bin/env python # Like mkdir, but also make intermediate directories if necessary. # It is not an error if the given directory already exists (as long # as it is a directory). # Errors are not treated specially -- you just get a Python exception. import sys, os def main(): for p in sys.argv[1:]: m...
23.181818
70
0.64902
import sys, os def main(): for p in sys.argv[1:]: makedirs(p) def makedirs(p): if p and not os.path.isdir(p): head, tail = os.path.split(p) makedirs(head) os.mkdir(p, 0777) if __name__ == "__main__": main()
false
true
f70fad1a401b33614f837e3bfd9c10fa8a5570aa
1,451
py
Python
tests/lib/utils.py
booneng/mobly
539788309c7631c20fa5381937e10f9cd997e2d0
[ "Apache-2.0" ]
532
2016-11-07T22:01:00.000Z
2022-03-30T17:11:40.000Z
tests/lib/utils.py
booneng/mobly
539788309c7631c20fa5381937e10f9cd997e2d0
[ "Apache-2.0" ]
528
2016-11-22T01:42:19.000Z
2022-03-24T02:27:15.000Z
tests/lib/utils.py
booneng/mobly
539788309c7631c20fa5381937e10f9cd997e2d0
[ "Apache-2.0" ]
169
2016-11-18T15:12:26.000Z
2022-03-24T01:22:08.000Z
# Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
36.275
78
0.731909
from mobly import records def validate_test_result(result): buckets = [ (result.passed, records.TestResultEnums.TEST_RESULT_PASS), (result.failed, records.TestResultEnums.TEST_RESULT_FAIL), (result.error, records.TestResultEnums.TEST_RESULT_ERROR), (result.skipped, records.Te...
true
true
f70fad449b902120499a1dec1a4d6c495074a31f
607
py
Python
venv/Lib/site-packages/tensorflow/python/keras/api/_v2/keras/applications/resnet/__init__.py
rexliu3/StockTradingBotCloud
46b732b9c05f73bc0e856a3c4a16854b6d12e18e
[ "MIT" ]
null
null
null
venv/Lib/site-packages/tensorflow/python/keras/api/_v2/keras/applications/resnet/__init__.py
rexliu3/StockTradingBotCloud
46b732b9c05f73bc0e856a3c4a16854b6d12e18e
[ "MIT" ]
null
null
null
venv/Lib/site-packages/tensorflow/python/keras/api/_v2/keras/applications/resnet/__init__.py
rexliu3/StockTradingBotCloud
46b732b9c05f73bc0e856a3c4a16854b6d12e18e
[ "MIT" ]
1
2020-06-28T11:47:47.000Z
2020-06-28T11:47:47.000Z
# This file is MACHINE GENERATED! Do not edit. # Generated by: tensorflow/python/tools/api/generator/create_python_api.py script. """ResNet models for Keras. """ from __future__ import print_function as _print_function import sys as _sys from tensorflow.python.keras.applications.resnet import ResNet101 from tensorfl...
35.705882
82
0.84514
from __future__ import print_function as _print_function import sys as _sys from tensorflow.python.keras.applications.resnet import ResNet101 from tensorflow.python.keras.applications.resnet import ResNet152 from tensorflow.python.keras.applications.resnet import ResNet50 from tensorflow.python.keras.applications....
true
true
f70faf3f1a8e372280b0a707e88d882149db4909
3,167
py
Python
batch_netmeta.py
gesiscss/Homophilic_Directed_ScaleFree_Networks
a0d27b44eaafdda46b6d3379859fa428398ef476
[ "Apache-2.0" ]
1
2022-03-23T15:34:38.000Z
2022-03-23T15:34:38.000Z
batch_netmeta.py
gesiscss/Homophilic_Directed_ScaleFree_Networks
a0d27b44eaafdda46b6d3379859fa428398ef476
[ "Apache-2.0" ]
2
2019-02-02T13:54:53.000Z
2019-02-04T09:15:51.000Z
batch_netmeta.py
gesiscss/Homophilic_Directed_ScaleFree_Networks
a0d27b44eaafdda46b6d3379859fa428398ef476
[ "Apache-2.0" ]
null
null
null
################################################################ # System's dependencies ################################################################ import os import sys import time import argparse ################################################################ # Local dependencies ##############################...
43.383562
128
0.487843
MM), str(hmm), str(_N), str(_d), str(_mindiff)]) path = os.path.join(output,dataset,"network_metadata.csv") io.save_text("{}\n{}".format(t1,t2), path) ################################################################ # Main ################################################################ if __name__ == "__m...
true
true
f70fb01bb8bfa089b4844ff0143d97c5770f6f22
2,502
py
Python
scripts/rpc/__init__.py
kacperg/spdk
4906323d47b1bf5290152e85b9a6fac1970cdfed
[ "BSD-3-Clause" ]
null
null
null
scripts/rpc/__init__.py
kacperg/spdk
4906323d47b1bf5290152e85b9a6fac1970cdfed
[ "BSD-3-Clause" ]
null
null
null
scripts/rpc/__init__.py
kacperg/spdk
4906323d47b1bf5290152e85b9a6fac1970cdfed
[ "BSD-3-Clause" ]
null
null
null
import json import sys from . import app from . import bdev from . import iscsi from . import log from . import lvol from . import nbd from . import net from . import nvmf from . import pmem from . import subsystem from . import vhost def start_subsystem_init(client): return client.call('start_subsystem_init') ...
26.903226
102
0.593525
import json import sys from . import app from . import bdev from . import iscsi from . import log from . import lvol from . import nbd from . import net from . import nvmf from . import pmem from . import subsystem from . import vhost def start_subsystem_init(client): return client.call('start_subsystem_init') ...
true
true
f70fb0261784177b0d3669369a858adf97f9b9a9
5,250
py
Python
practices/week6/assignment_exercise_3.py
andreyyec/Texas_Tech_AI
e4e8e41c65b41a1a684f1f65d21cf5427abdb046
[ "MIT" ]
null
null
null
practices/week6/assignment_exercise_3.py
andreyyec/Texas_Tech_AI
e4e8e41c65b41a1a684f1f65d21cf5427abdb046
[ "MIT" ]
5
2020-01-28T22:57:31.000Z
2022-02-10T00:37:58.000Z
practices/week6/assignment_exercise_3.py
andreyyec/Texas_Tech_AI
e4e8e41c65b41a1a684f1f65d21cf5427abdb046
[ "MIT" ]
null
null
null
import numpy as np import pandas as pd import pickle import tensorflow as tf import sklearn.metrics import matplotlib.pyplot as plt # Load the training and test data from the Pickle file with open("../datasets/credit_card_default_dataset.pickle", "rb") as f: train_data, train_labels, test_data, test_labels = pic...
35
127
0.719238
import numpy as np import pandas as pd import pickle import tensorflow as tf import sklearn.metrics import matplotlib.pyplot as plt with open("../datasets/credit_card_default_dataset.pickle", "rb") as f: train_data, train_labels, test_data, test_labels = pickle.load(f) n_inputs = train_data.shape[1] nsamples ...
true
true
f70fb188e60fc3f2ee8fa90f4379d87b3fd93cae
169
py
Python
src/user/views/__init__.py
ResearchHub/ResearchHub-Backend-Open
d36dca33afae2d442690694bb2ab17180d84bcd3
[ "MIT" ]
18
2021-05-20T13:20:16.000Z
2022-02-11T02:40:18.000Z
src/user/views/__init__.py
ResearchHub/ResearchHub-Backend-Open
d36dca33afae2d442690694bb2ab17180d84bcd3
[ "MIT" ]
109
2021-05-21T20:14:23.000Z
2022-03-31T20:56:10.000Z
src/user/views/__init__.py
ResearchHub/ResearchHub-Backend-Open
d36dca33afae2d442690694bb2ab17180d84bcd3
[ "MIT" ]
4
2021-05-17T13:47:53.000Z
2022-02-12T10:48:21.000Z
# flake8: noqa from user.views.user_views import * from user.views.gatekeeper_view import GatekeeperViewSet from user.views.organization_view import OrganizationViewSet
33.8
60
0.857988
from user.views.user_views import * from user.views.gatekeeper_view import GatekeeperViewSet from user.views.organization_view import OrganizationViewSet
true
true
f70fb191003034cfa869b208b1b4a32aa36da6d7
4,198
py
Python
python_modules/dagster/dagster_tests/core_tests/config_types_tests/test_config_spec.py
JPeer264/dagster-fork
32cc87a36134be7c442fa85d6867eb1d3301aea0
[ "Apache-2.0" ]
1
2020-09-19T16:35:59.000Z
2020-09-19T16:35:59.000Z
python_modules/dagster/dagster_tests/core_tests/config_types_tests/test_config_spec.py
JPeer264/dagster-fork
32cc87a36134be7c442fa85d6867eb1d3301aea0
[ "Apache-2.0" ]
null
null
null
python_modules/dagster/dagster_tests/core_tests/config_types_tests/test_config_spec.py
JPeer264/dagster-fork
32cc87a36134be7c442fa85d6867eb1d3301aea0
[ "Apache-2.0" ]
null
null
null
import pytest from dagster import DagsterInvalidConfigDefinitionError, Noneable, Selector, execute_solid, solid def test_kitchen_sink(): @solid( config_schema={ 'str_field': str, 'int_field': int, 'list_int': [int], 'list_list_int': [[int]], 'di...
32.045802
97
0.610052
import pytest from dagster import DagsterInvalidConfigDefinitionError, Noneable, Selector, execute_solid, solid def test_kitchen_sink(): @solid( config_schema={ 'str_field': str, 'int_field': int, 'list_int': [int], 'list_list_int': [[int]], 'di...
true
true
f70fb27cfab9dd0b2e6b5adae0010670d24a0187
1,579
py
Python
test_Calculator/testing/test_cal_plus.py
XuXuClassMate/My_Test_PyProject
5822455af47f5855d1db4c388c2c973c440a4d3f
[ "Apache-2.0" ]
null
null
null
test_Calculator/testing/test_cal_plus.py
XuXuClassMate/My_Test_PyProject
5822455af47f5855d1db4c388c2c973c440a4d3f
[ "Apache-2.0" ]
null
null
null
test_Calculator/testing/test_cal_plus.py
XuXuClassMate/My_Test_PyProject
5822455af47f5855d1db4c388c2c973c440a4d3f
[ "Apache-2.0" ]
null
null
null
""" 1、case顺序:加-除-减-乘 2、fixture方法在case前打印【开始计算】,结束后打印【计算结束】 3、fixture方法存在在conftest.py,设置scope=module 4、控制case只执行顺序为:加-减-乘-除 5、结合allure生成本地测试报告 """ import allure import pytest import yaml from test_Calculator.src.calculator import Calculator def get_data(): with open('./data.yml') as data_x: data = yaml.saf...
27.701754
89
0.645345
import allure import pytest import yaml from test_Calculator.src.calculator import Calculator def get_data(): with open('./data.yml') as data_x: data = yaml.safe_load(data_x) data_data = data['datas'] data_name = data['ids'] return [data_data, data_name] data = get_data() get_ca...
true
true
f70fb2c5d6c94d72c11d58d67c3da8ca3e2648c3
2,641
py
Python
siamesenetwork/siamesePreTrainedEmbeddings.py
pengfei99/openfood
2b65af02ce34bf8193d357ef3661da749d2d9671
[ "MIT" ]
2
2021-09-13T14:46:24.000Z
2021-09-13T14:46:35.000Z
siamesenetwork/siamesePreTrainedEmbeddings.py
pengfei99/openfood
2b65af02ce34bf8193d357ef3661da749d2d9671
[ "MIT" ]
null
null
null
siamesenetwork/siamesePreTrainedEmbeddings.py
pengfei99/openfood
2b65af02ce34bf8193d357ef3661da749d2d9671
[ "MIT" ]
null
null
null
# !/usr/bin/env python3 # -*- coding: utf-8 -*- """ Define the siamese network for one-shot learning, for french short labels 02/06/2021 @author: milena-git, from jeremylhour courtesy """ import torch import torch.nn as nn def _createEmbeddingLayer(weights_matrix, non_trainable=False): """ _createEmbeddingLay...
33.43038
105
0.658463
import torch import torch.nn as nn def _createEmbeddingLayer(weights_matrix, non_trainable=False): weights_matrix = torch.tensor(weights_matrix) num_embeddings, embedding_dim = weights_matrix.size() emb_layer = nn.Embedding(num_embeddings, embedding_dim) emb_layer.load_state_dict({'weight': weights_...
true
true
f70fb3476d36e16a6599d538e8c7c982416ef57c
2,165
py
Python
test/PR_test/unit_test/op/numpyop/univariate/test_autocontrast.py
DwijayDS/fastestimator
9b288cb2bd870f971ec4cee09d0b3205e1316a94
[ "Apache-2.0" ]
57
2019-05-21T21:29:26.000Z
2022-02-23T05:55:21.000Z
test/PR_test/unit_test/op/numpyop/univariate/test_autocontrast.py
vbvg2008/fastestimator
6061a4fbbeb62a2194ef82ba8017f651710d0c65
[ "Apache-2.0" ]
93
2019-05-23T18:36:07.000Z
2022-03-23T17:15:55.000Z
test/PR_test/unit_test/op/numpyop/univariate/test_autocontrast.py
vbvg2008/fastestimator
6061a4fbbeb62a2194ef82ba8017f651710d0c65
[ "Apache-2.0" ]
47
2019-05-09T15:41:37.000Z
2022-03-26T17:00:08.000Z
# Copyright 2021 The FastEstimator Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
42.45098
89
0.655427
import unittest import numpy as np from fastestimator.op.numpyop.univariate import AutoContrast class TestAutoContrast(unittest.TestCase): @classmethod def setUpClass(cls): cls.single_input = [np.random.randint(0, 256, size=(28, 28, 3)).astype(np.uint8)] cls.single_output_shape...
true
true
f70fb44b8b726f2718970f214122633936106d39
3,774
py
Python
pythonsdk/face/face_pb2_grpc.py
jjrobotcn/andy4
4a0cb57aa5f318a3099fbfe6198620555b3a45af
[ "MIT" ]
null
null
null
pythonsdk/face/face_pb2_grpc.py
jjrobotcn/andy4
4a0cb57aa5f318a3099fbfe6198620555b3a45af
[ "MIT" ]
null
null
null
pythonsdk/face/face_pb2_grpc.py
jjrobotcn/andy4
4a0cb57aa5f318a3099fbfe6198620555b3a45af
[ "MIT" ]
null
null
null
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc from . import face_pb2 as face__pb2 class FaceServiceStub(object): """faceRecognition.FaceService 人脸服务 """ def __init__(self, channel): """Constructor. Args: channel: A grpc.Channel. ""...
35.271028
101
0.645999
import grpc from . import face_pb2 as face__pb2 class FaceServiceStub(object): def __init__(self, channel): self.Compare = channel.unary_unary( '/faceRecognition.FaceService/Compare', request_serializer=face__pb2.CompareRequest.SerializeToString, response...
true
true
f70fb47f91fd9a5618daafe068d611e8a5784530
1,876
py
Python
setup.py
wbogen/cardio
b8826295b7e27168441e2595e9592aff77cf7722
[ "Apache-2.0" ]
250
2017-11-22T14:41:57.000Z
2022-02-02T22:41:28.000Z
setup.py
supertime1/cardio
58087b21295ebe18fb5a5dfbb68479b39ddb4971
[ "Apache-2.0" ]
34
2017-11-23T18:27:20.000Z
2020-09-10T11:55:16.000Z
setup.py
supertime1/cardio
58087b21295ebe18fb5a5dfbb68479b39ddb4971
[ "Apache-2.0" ]
85
2017-11-23T13:07:31.000Z
2021-11-24T08:34:07.000Z
""" CardIO is a library that works with electrocardiograms. Documentation - https://analysiscenter.github.io/cardio/ """ from setuptools import setup, find_packages import re with open('cardio/__init__.py', 'r') as f: version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', f.read(), re.MULTILINE).group(1) ...
30.258065
99
0.584755
from setuptools import setup, find_packages import re with open('cardio/__init__.py', 'r') as f: version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', f.read(), re.MULTILINE).group(1) with open('docs/index.rst', 'r') as f: long_description = f.read() setup( name='cardio', packages=find_pa...
true
true
f70fb4b707686268baecdf75a4c2e0bd818d3206
15,820
py
Python
Password-Locker/run.py
HASSAN1A/Password-Locker
bea88438936fa9ffa174d6f9c7941046d713092b
[ "MIT" ]
2
2021-05-19T12:58:21.000Z
2021-05-28T14:03:02.000Z
Password-Locker/run.py
HASSAN1A/Password-Locker
bea88438936fa9ffa174d6f9c7941046d713092b
[ "MIT" ]
null
null
null
Password-Locker/run.py
HASSAN1A/Password-Locker
bea88438936fa9ffa174d6f9c7941046d713092b
[ "MIT" ]
null
null
null
#!/usr/bin/env python3.8 from account import Account from credential import Credential from termcolor import colored, cprint import os import time import pickle # Functions that implement the behaviours in account class. def create_account(username, fname, lname, p_word): ''' Function to create new account ...
38.77451
123
0.468078
from account import Account from credential import Credential from termcolor import colored, cprint import os import time import pickle def create_account(username, fname, lname, p_word): new_account = Account(username, fname, lname, p_word) return new_account def save_account(account): account.save_...
true
true
f70fb5030be554ad24d7c738e890f3d047427e38
4,209
py
Python
config/jobs/kubernetes/kops/build-pipeline.py
celestehorgan/test-infra
3a4d5a94f214381ecca8146aef354bba29b0ac67
[ "Apache-2.0" ]
null
null
null
config/jobs/kubernetes/kops/build-pipeline.py
celestehorgan/test-infra
3a4d5a94f214381ecca8146aef354bba29b0ac67
[ "Apache-2.0" ]
null
null
null
config/jobs/kubernetes/kops/build-pipeline.py
celestehorgan/test-infra
3a4d5a94f214381ecca8146aef354bba29b0ac67
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
32.376923
117
0.628415
import json template = """ # Verify the latest-ci version from the {{branch}} branch of kops # Runs a small subset of the e2e tests. # Publishes the version to latest-ci-updown-green on success. - interval: 60m name: {{name}} decorate: true decoration_config: timeout: 45m labels: preset-s...
true
true
f70fb6a161b5ea492c9c47948d6ae0810e774828
828
py
Python
src/utils/api/permissions.py
jsmesami/naovoce
235c6e05ef37be23d3b9bd0b76d80080c58617a0
[ "BSD-3-Clause" ]
18
2016-02-23T15:34:58.000Z
2022-02-28T08:15:30.000Z
src/utils/api/permissions.py
jsmesami/naovoce
235c6e05ef37be23d3b9bd0b76d80080c58617a0
[ "BSD-3-Clause" ]
66
2016-03-15T19:59:09.000Z
2022-03-11T23:25:41.000Z
src/utils/api/permissions.py
jsmesami/naovoce
235c6e05ef37be23d3b9bd0b76d80080c58617a0
[ "BSD-3-Clause" ]
7
2016-03-24T09:13:07.000Z
2018-09-16T17:04:50.000Z
from rest_framework import permissions class IsAuthenticated(permissions.BasePermission): def has_permission(self, request, view): return ( request.user and request.user.is_authenticated and request.user.is_email_verified ) class IsAuthenticatedOrReadOnly(perm...
27.6
60
0.678744
from rest_framework import permissions class IsAuthenticated(permissions.BasePermission): def has_permission(self, request, view): return ( request.user and request.user.is_authenticated and request.user.is_email_verified ) class IsAuthenticatedOrReadOnly(perm...
true
true
f70fb71ce3042a4cc28deea40be606cfe703d92d
11,029
py
Python
ncappzoo/tensorflow/topcoder_andresduque/supporting/inferences.py
yockgen/movidius
cc32f1951a4d00d2250bb0d2b9000c5f2435b41a
[ "MIT" ]
1
2018-11-23T01:48:59.000Z
2018-11-23T01:48:59.000Z
ncappzoo/tensorflow/topcoder_andresduque/supporting/inferences.py
yockgen/movidius
cc32f1951a4d00d2250bb0d2b9000c5f2435b41a
[ "MIT" ]
null
null
null
ncappzoo/tensorflow/topcoder_andresduque/supporting/inferences.py
yockgen/movidius
cc32f1951a4d00d2250bb0d2b9000c5f2435b41a
[ "MIT" ]
1
2020-10-01T15:38:04.000Z
2020-10-01T15:38:04.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # #~ The MIT License (MIT) #~ Copyright 2018 ©klo86min #~ Permission is hereby granted, free of charge, to any person obtaining a copy #~ of this software and associated documentation files (the "Software"), to deal #~ in the Software without restriction, including with...
33.625
140
0.602684
import argparse import csv import cv2 import mvnc.mvncapi as mvnc import numpy as np import os.path IMAGE_DIM = 299
true
true
f70fb7c77d935e9a4bdb46140f8bc3e6d53a17ee
2,501
py
Python
radio_bridge/tests/unit/test_dtmf_decoder.py
Kami/raspberry-pi-ham-radio
7ff9180e3a4d645b92e07ce92cbcbf73c7a0a628
[ "Apache-2.0" ]
2
2020-10-26T06:16:52.000Z
2021-11-15T11:05:29.000Z
radio_bridge/tests/unit/test_dtmf_decoder.py
Kami/raspberry-pi-ham-radio
7ff9180e3a4d645b92e07ce92cbcbf73c7a0a628
[ "Apache-2.0" ]
null
null
null
radio_bridge/tests/unit/test_dtmf_decoder.py
Kami/raspberry-pi-ham-radio
7ff9180e3a4d645b92e07ce92cbcbf73c7a0a628
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2020 Tomaz Muraus # # 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 ...
36.246377
79
0.594562
import os import unittest from radio_bridge.dtmf import FFTDTMFDecoderImplementation __all__ = ["TestFFTDTMFDecoder"] BASE_DIR = os.path.dirname(os.path.abspath(__file__)) FIXTURES_DIR = os.path.abspath(os.path.join(BASE_DIR, "../fixtures/dtmf")) class TestFFTDTMFDecoder(unittest.TestCase): def ...
true
true
f70fb837d095c7afa802c8994d156aba293785e2
4,084
py
Python
sharinator/settings.py
Technikradio/sharinator
3aa72d01d3829520c9627320d044af14fda913b8
[ "BSD-3-Clause" ]
null
null
null
sharinator/settings.py
Technikradio/sharinator
3aa72d01d3829520c9627320d044af14fda913b8
[ "BSD-3-Clause" ]
9
2020-05-31T16:24:49.000Z
2020-06-19T17:42:56.000Z
sharinator/settings.py
Technikradio/sharinator
3aa72d01d3829520c9627320d044af14fda913b8
[ "BSD-3-Clause" ]
null
null
null
""" Django settings for sharinator project. Generated by 'django-admin startproject' using Django 2.2.4. For more information on this file, see https://docs.djangoproject.com/en/2.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.2/ref/settings/ """ import os...
26.012739
91
0.698335
import os from django.contrib.messages import constants as messages BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = 'ofj2gu)@$2xahppvk%25217+y!-1d4#@1-*#)c6zssk%&s87ai' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.adm...
true
true
f70fb89aca0288cdc68dc3bcc49697d7f2d22348
2,530
py
Python
tests/py3/test_property_map.py
agarwalrounak/qmt
6fb8ee55fb9d544b72f6dc0c275000914e03af06
[ "MIT" ]
1
2018-09-30T00:45:53.000Z
2018-09-30T00:45:53.000Z
tests/py3/test_property_map.py
imagineagents/qmt
5e8a7001cc020979636e492448abcfd894396038
[ "MIT" ]
null
null
null
tests/py3/test_property_map.py
imagineagents/qmt
5e8a7001cc020979636e492448abcfd894396038
[ "MIT" ]
null
null
null
import numpy as np from qmt.geometry import PropertyMap, MaterialPropertyMap from qmt.materials import Materials class DummyPartMap: def __init__(self, part_ids): assert len(part_ids) == 2 self.partIds = part_ids def __call__(self, x): assert np.ndim(x) >= 1 x = np.asanyarray...
40.15873
99
0.608696
import numpy as np from qmt.geometry import PropertyMap, MaterialPropertyMap from qmt.materials import Materials class DummyPartMap: def __init__(self, part_ids): assert len(part_ids) == 2 self.partIds = part_ids def __call__(self, x): assert np.ndim(x) >= 1 x = np.asanyarray...
true
true
f70fb93da9d51c1f9838f67977dbbd4aef65562e
4,576
py
Python
tensorflow/python/kernel_tests/batch_scatter_ops_test.py
abhaikollara/tensorflow
4f96df3659696990cb34d0ad07dc67843c4225a9
[ "Apache-2.0" ]
848
2019-12-03T00:16:17.000Z
2022-03-31T22:53:17.000Z
tensorflow/python/kernel_tests/batch_scatter_ops_test.py
abhaikollara/tensorflow
4f96df3659696990cb34d0ad07dc67843c4225a9
[ "Apache-2.0" ]
656
2019-12-03T00:48:46.000Z
2022-03-31T18:41:54.000Z
tensorflow/python/kernel_tests/batch_scatter_ops_test.py
abhaikollara/tensorflow
4f96df3659696990cb34d0ad07dc67843c4225a9
[ "Apache-2.0" ]
506
2019-12-03T00:46:26.000Z
2022-03-30T10:34:56.000Z
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
35.472868
80
0.644231
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np from tensorflow.python.framework import constant_op from tensorflow.python.framework import dtypes from tensorflow.python.framework import ops from tensorflow.python.framework...
true
true
f70fb9ac8a380f47eb700eb0aa4f64af7b5fd5bd
2,144
py
Python
nova/scheduler/filters/retry_filter.py
teresa-ho/stx-nova
1f82323439da2449edbbaed2fe1c8414a550c86f
[ "Apache-2.0" ]
null
null
null
nova/scheduler/filters/retry_filter.py
teresa-ho/stx-nova
1f82323439da2449edbbaed2fe1c8414a550c86f
[ "Apache-2.0" ]
null
null
null
nova/scheduler/filters/retry_filter.py
teresa-ho/stx-nova
1f82323439da2449edbbaed2fe1c8414a550c86f
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
35.147541
78
0.661381
from oslo_log import log as logging from nova.i18n import _LI from nova.scheduler import filters LOG = logging.getLogger(__name__) class RetryFilter(filters.BaseHostFilter): RUN_ON_REBUILD = False def host_passes(self, host_state, spec_obj): retry = spec_obj.retry ...
true
true
f70fb9ca8e2cc531992c308148f77617cc1fff51
10,495
py
Python
server/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/tests/identifier_completer_test.py
hkdb/sysconf
99d334f7309657647059c4b37f25e33dffc81fc3
[ "MIT" ]
10
2020-07-21T21:59:54.000Z
2021-07-19T11:01:47.000Z
server/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/tests/identifier_completer_test.py
hkdb/sysconf
99d334f7309657647059c4b37f25e33dffc81fc3
[ "MIT" ]
null
null
null
server/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/tests/identifier_completer_test.py
hkdb/sysconf
99d334f7309657647059c4b37f25e33dffc81fc3
[ "MIT" ]
1
2021-01-30T18:17:01.000Z
2021-01-30T18:17:01.000Z
# Copyright (C) 2020 ycmd contributors # # This file is part of ycmd. # # ycmd is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # ycmd...
34.409836
80
0.536541
import os from hamcrest import assert_that, empty, equal_to, contains_exactly from ycmd.user_options_store import DefaultOptions from ycmd.completers.all import identifier_completer as ic from ycmd.completers.all.identifier_completer import IdentifierCompleter from ycmd.request_wrap import RequestWrap ...
true
true
f70fba585f35db352b62ef695402806501bee0cf
5,147
py
Python
models/eweights.py
RemiBe/Crack
334df92c5598f2a3249cae022e570ab32068ba79
[ "Apache-2.0" ]
1
2021-09-16T01:13:51.000Z
2021-09-16T01:13:51.000Z
models/eweights.py
RemiBe/crack
334df92c5598f2a3249cae022e570ab32068ba79
[ "Apache-2.0" ]
null
null
null
models/eweights.py
RemiBe/crack
334df92c5598f2a3249cae022e570ab32068ba79
[ "Apache-2.0" ]
null
null
null
"""Edge weights. """ __author__ = "Rémi Barat" __version__ = "1.0" import math import random from crack.models.weights import condition_models, format_crit ##################################################### ### Format the models for init_EWeights functions ### ##################################################...
30.099415
172
0.592967
__author__ = "Rémi Barat" __version__ = "1.0" import math import random from crack.models.weights import condition_models, format_crit
true
true
f70fbb21c94acb9d07d8e2e1ca75454e92d0eaf5
28,076
py
Python
game_client.py
wenlianglaw/Tetris-in-Python
d4f0a22c4827e7eeb44c55def3f024e0c6932ebe
[ "MIT" ]
1
2021-06-25T20:43:19.000Z
2021-06-25T20:43:19.000Z
game_client.py
wenlianglaw/Tetris-in-Python
d4f0a22c4827e7eeb44c55def3f024e0c6932ebe
[ "MIT" ]
null
null
null
game_client.py
wenlianglaw/Tetris-in-Python
d4f0a22c4827e7eeb44c55def3f024e0c6932ebe
[ "MIT" ]
null
null
null
# This file defines the back end of the Tetris game # # GameState is the base class of GameClient. # # GameClient.Run() will start two threads: # - _ProcessActions: Process the action list every x seconds # - _AutoDrop: Auto drops the current piece. # # GameClient: # - current piece # - held piece # - piece list...
32.799065
123
0.63036
import copy import queue import threading import time from threading import Lock from typing import Tuple, List import numpy as np import actions import shape DEFAULT_LENGTH = 20 DEFAULT_WIDTH = 10 MAP_PADDING_SIZE = 4 REFILL_THRESHOLD = 5 MAXIMUM_LOCK_TIME = 4 INCREMENTAL_LOCK_TIME = ...
true
true
f70fbca22444735116bd75ce3ae9235a748316d7
1,348
py
Python
exx.py
JaeGyu/PythonEx_1
e67053db6ca7431c3dd66351c190c53229e3f141
[ "MIT" ]
null
null
null
exx.py
JaeGyu/PythonEx_1
e67053db6ca7431c3dd66351c190c53229e3f141
[ "MIT" ]
null
null
null
exx.py
JaeGyu/PythonEx_1
e67053db6ca7431c3dd66351c190c53229e3f141
[ "MIT" ]
null
null
null
#_*_ coding: utf-8 _*_ def needsclap(x): return x==2 or x==3 or x==5 or x==7 for i in range(1,101): one = needsclap(i%10) ten = needsclap(i/10) if one and ten: print i,"짝짝" elif one or ten: print i,"짝" else: print i print [1,2,3] + ["ff"] print [1,2] * 3 a = [1,2,3,4,5,6,7,8,9] a[1] = 5 print a[-2] print a[3:...
17.282051
44
0.594955
def needsclap(x): return x==2 or x==3 or x==5 or x==7 for i in range(1,101): one = needsclap(i%10) ten = needsclap(i/10) if one and ten: print i,"짝짝" elif one or ten: print i,"짝" else: print i print [1,2,3] + ["ff"] print [1,2] * 3 a = [1,2,3,4,5,6,7,8,9] a[1] = 5 print a[-2] print a[3:5] print a[::-1] bir...
false
true
f70fbcc4d201ff1d88c227e27e1344dec0d9a084
5,208
py
Python
homeassistant/components/upnp/__init__.py
Juggler00/home-assistant
3f87d413813de84935ea67b5212c55348524447f
[ "Apache-2.0" ]
1
2021-04-08T06:02:25.000Z
2021-04-08T06:02:25.000Z
homeassistant/components/upnp/__init__.py
ayonix/home-assistant
8fda70537736db9a73c0a863800d6bb4df67f5fc
[ "Apache-2.0" ]
null
null
null
homeassistant/components/upnp/__init__.py
ayonix/home-assistant
8fda70537736db9a73c0a863800d6bb4df67f5fc
[ "Apache-2.0" ]
null
null
null
""" Will open a port in your router for Home Assistant and provide statistics. For more details about this component, please refer to the documentation at https://home-assistant.io/components/upnp/ """ import asyncio from ipaddress import ip_address import aiohttp import voluptuous as vol from homeassistant.config_e...
30.635294
79
0.699117
import asyncio from ipaddress import ip_address import aiohttp import voluptuous as vol from homeassistant.config_entries import ConfigEntry from homeassistant.const import EVENT_HOMEASSISTANT_STOP from homeassistant.helpers import config_validation as cv from homeassistant.helpers import dispatcher from homeassistan...
true
true
f70fbcdfcc1d45f5ca92376a915b19a073966d04
8,295
py
Python
components/diagnostics/diagnose_me/component.py
areshytko/pipelines
9e818e9d13569614b7188a7bff47770ae449827c
[ "Apache-2.0" ]
null
null
null
components/diagnostics/diagnose_me/component.py
areshytko/pipelines
9e818e9d13569614b7188a7bff47770ae449827c
[ "Apache-2.0" ]
null
null
null
components/diagnostics/diagnose_me/component.py
areshytko/pipelines
9e818e9d13569614b7188a7bff47770ae449827c
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
35.75431
98
0.642917
from typing import Any, List, NamedTuple, Optional def run_diagnose_me( bucket: str, execution_mode: str, project_id: str, target_apis: str, quota_check: Optional[List[Any]] = None, ) -> NamedTuple('Outputs', [('bucket', str), ('project_id', str)]): import subprocess subpr...
true
true
f70fbd594ac7cc796d70fbf753d9788864624349
135,700
py
Python
test/test_binary_ufuncs.py
ZackPashkin/pytorch
5b1f5c8f17ec4067dc9f9df98bbcc6757ab24444
[ "Intel" ]
1
2022-01-25T15:48:31.000Z
2022-01-25T15:48:31.000Z
test/test_binary_ufuncs.py
ZackPashkin/pytorch
5b1f5c8f17ec4067dc9f9df98bbcc6757ab24444
[ "Intel" ]
null
null
null
test/test_binary_ufuncs.py
ZackPashkin/pytorch
5b1f5c8f17ec4067dc9f9df98bbcc6757ab24444
[ "Intel" ]
null
null
null
import torch import numpy as np import itertools from itertools import product import math import random import unittest import warnings import operator from functools import partial from torch._six import inf, nan from torch.testing._internal.common_utils import ( TestCase, iter_indices, TEST_WITH_ASAN, run_test...
46.203609
131
0.584753
import torch import numpy as np import itertools from itertools import product import math import random import unittest import warnings import operator from functools import partial from torch._six import inf, nan from torch.testing._internal.common_utils import ( TestCase, iter_indices, TEST_WITH_ASAN, run_test...
true
true
f70fbd91114f85dd58aec1ae1d0e5b97858e7d13
1,429
py
Python
helpers.py
rkeulemans/exercise_public
5f8020198b8b234169eea4d5e08c98344438de5d
[ "MIT" ]
null
null
null
helpers.py
rkeulemans/exercise_public
5f8020198b8b234169eea4d5e08c98344438de5d
[ "MIT" ]
null
null
null
helpers.py
rkeulemans/exercise_public
5f8020198b8b234169eea4d5e08c98344438de5d
[ "MIT" ]
null
null
null
from sympy import Rational, Symbol, latex, UnevaluatedExpr import sympy as sp import numpy as np u = lambda x : UnevaluatedExpr(x) # Helper functions def explain_add(a, b): assert(np.shape(a) == np.shape(b)) rows, columns = np.shape(a) return sp.Matrix([[Symbol(f"({latex(u(a[i,j]))} + {latex(u(b[i,j]))})"...
39.694444
123
0.577327
from sympy import Rational, Symbol, latex, UnevaluatedExpr import sympy as sp import numpy as np u = lambda x : UnevaluatedExpr(x) def explain_add(a, b): assert(np.shape(a) == np.shape(b)) rows, columns = np.shape(a) return sp.Matrix([[Symbol(f"({latex(u(a[i,j]))} + {latex(u(b[i,j]))})") for j in range(c...
true
true
f70fbf815f40c2d553b7ff2f423ff855c4ec22d7
5,650
py
Python
space/station.py
galactics/space-command
496b054883c6464bcd8d73d72c8145ae80606336
[ "MIT" ]
14
2019-03-22T08:12:39.000Z
2022-01-25T17:45:26.000Z
space/station.py
galactics/space-command
496b054883c6464bcd8d73d72c8145ae80606336
[ "MIT" ]
3
2019-11-07T09:34:14.000Z
2019-12-29T14:38:17.000Z
space/station.py
galactics/space-command
496b054883c6464bcd8d73d72c8145ae80606336
[ "MIT" ]
1
2019-12-12T00:48:39.000Z
2019-12-12T00:48:39.000Z
import logging from numpy import degrees, pi, radians from beyond.frames import get_frame, create_station from beyond.errors import UnknownFrameError from .wspace import ws from .utils import dms2deg, deg2dms log = logging.getLogger(__name__) class StationDb: def __new__(cls): if not hasattr(cls, "_i...
28.25
82
0.507965
import logging from numpy import degrees, pi, radians from beyond.frames import get_frame, create_station from beyond.errors import UnknownFrameError from .wspace import ws from .utils import dms2deg, deg2dms log = logging.getLogger(__name__) class StationDb: def __new__(cls): if not hasattr(cls, "_i...
true
true
f70fbff6ebbce086af0b72f88cdfefd2aaa4e033
2,561
py
Python
fieldbook/client.py
CSIS-iLab/fieldbook-python
7dc5c26eab9675b4b3421ef1c943668d0616372e
[ "0BSD" ]
null
null
null
fieldbook/client.py
CSIS-iLab/fieldbook-python
7dc5c26eab9675b4b3421ef1c943668d0616372e
[ "0BSD" ]
null
null
null
fieldbook/client.py
CSIS-iLab/fieldbook-python
7dc5c26eab9675b4b3421ef1c943668d0616372e
[ "0BSD" ]
1
2021-04-15T17:14:19.000Z
2021-04-15T17:14:19.000Z
# -*- coding: utf-8 -*- import requests from urllib.parse import urljoin from os import getenv import types class Fieldbook(object): """ Client for Fieldbook API: https://github.com/fieldbook/api-docs Initialize with a fieldbook_id and optionally the api key (name) and secret. """ BASE_UR...
36.070423
109
0.627099
import requests from urllib.parse import urljoin from os import getenv import types class Fieldbook(object): BASE_URL = "https://api.fieldbook.com" API_VERSION = "v1" def __init__(self, book_id, key=None, secret=None): super(Fieldbook, self).__init__() self._key = key if key else getenv...
true
true
f70fc008f539426def15dab6f35c0b85e1508550
17,667
py
Python
preprocess/funsd/preprocess_2nd.py
clovaai/bros
eb3aa51ad7348444bafb06be64c4604182275edd
[ "Apache-2.0" ]
36
2021-12-15T04:02:14.000Z
2022-03-24T01:21:00.000Z
preprocess/funsd/preprocess_2nd.py
clovaai/bros
eb3aa51ad7348444bafb06be64c4604182275edd
[ "Apache-2.0" ]
6
2022-01-20T11:18:08.000Z
2022-03-30T00:19:17.000Z
preprocess/funsd/preprocess_2nd.py
clovaai/bros
eb3aa51ad7348444bafb06be64c4604182275edd
[ "Apache-2.0" ]
2
2022-01-29T01:55:58.000Z
2022-02-09T07:10:42.000Z
""" BROS Copyright 2022-present NAVER Corp. Apache License v2.0 Do 2nd preprocess on top of the result of the 'preprocess.sh' file. Reference: https://github.com/microsoft/unilm/blob/master/layoutlm/deprecated/examples/seq_labeling/run_seq_labeling.py """ import json import os from collections import Counter from t...
37.993548
144
0.574291
import json import os from collections import Counter from tqdm import tqdm from transformers import BertTokenizer MAX_SEQ_LENGTH = 512 MODEL_TYPE = "bert" VOCA = "bert-base-uncased" INPUT_PATH = "./data" OUTPUT_PATH = "../../datasets/funsd" os.makedirs(OUTPUT_PATH, exist_ok=True) os.makedirs(os.path.join(OUTPUT_P...
true
true
f70fc144d0d4dade68af5d8aa612fa32ea819049
683
py
Python
tests/ast/nodes/test_evaluate_subscript.py
andrelfpinto/vyper
d9b73846aa14a6019faa4126ec7608acd05e480d
[ "Apache-2.0" ]
1
2020-07-04T01:47:26.000Z
2020-07-04T01:47:26.000Z
tests/ast/nodes/test_evaluate_subscript.py
erdnaag/vyper
22bef3a4b4161db18c7831041e20b917984cff83
[ "Apache-2.0" ]
null
null
null
tests/ast/nodes/test_evaluate_subscript.py
erdnaag/vyper
22bef3a4b4161db18c7831041e20b917984cff83
[ "Apache-2.0" ]
null
null
null
import pytest from hypothesis import given, settings from hypothesis import strategies as st from vyper import ast as vy_ast @pytest.mark.fuzzing @settings(max_examples=50, deadline=1000) @given( idx=st.integers(min_value=0, max_value=9), array=st.lists(st.integers(), min_size=10, max_size=10), ) def test_su...
25.296296
60
0.710102
import pytest from hypothesis import given, settings from hypothesis import strategies as st from vyper import ast as vy_ast @pytest.mark.fuzzing @settings(max_examples=50, deadline=1000) @given( idx=st.integers(min_value=0, max_value=9), array=st.lists(st.integers(), min_size=10, max_size=10), ) def test_su...
true
true
f70fc1a9600cd747693c17cbde32cc3ac240198d
1,331
py
Python
emsm/plugins/__init__.py
KronK0321/emsm
2d8882003ff6d688cd4074dcce17f3171f99a69f
[ "MIT" ]
82
2015-02-17T19:26:51.000Z
2022-03-30T20:13:43.000Z
emsm/plugins/__init__.py
KronK0321/emsm
2d8882003ff6d688cd4074dcce17f3171f99a69f
[ "MIT" ]
55
2015-01-01T19:49:25.000Z
2021-06-11T19:45:26.000Z
emsm/plugins/__init__.py
SilkAndSlug/emsm
2c1cdb305205942e797fdf47fd030c87080d19f9
[ "MIT" ]
32
2015-01-15T11:47:04.000Z
2021-12-19T21:49:20.000Z
#!/usr/bin/env python3 # The MIT License (MIT) # # Copyright (c) 2014-2018 <see AUTHORS.txt> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitati...
42.935484
79
0.768595
true
true
f70fc1dc9ee615d56c2134545b978940d5fda68c
267
py
Python
wk1/printyamljson.py
LinuxFlyGuy/PFNE
eb0506926ece193415cf5c4882a8990c41211667
[ "MIT" ]
null
null
null
wk1/printyamljson.py
LinuxFlyGuy/PFNE
eb0506926ece193415cf5c4882a8990c41211667
[ "MIT" ]
null
null
null
wk1/printyamljson.py
LinuxFlyGuy/PFNE
eb0506926ece193415cf5c4882a8990c41211667
[ "MIT" ]
null
null
null
#!/usr/bin/env python import yaml, json with open("testlist.yml", "r") as f: y = yaml.load(f) print "Here's the pretty YAML:" print yaml.dump(y) with open("testlist.json", "r") as f: j = json.load(f) print "Here's the pretty JSON:" print json.dumps(j, indent=4)
20.538462
37
0.666667
import yaml, json with open("testlist.yml", "r") as f: y = yaml.load(f) print "Here's the pretty YAML:" print yaml.dump(y) with open("testlist.json", "r") as f: j = json.load(f) print "Here's the pretty JSON:" print json.dumps(j, indent=4)
false
true
f70fc1dd54c95480d8d9cf4c427a8b9c598266f9
6,345
py
Python
grow/translations/locales.py
matthiasrohmer/grow
88fae5026040ad0f7dd9260ee290cebbe49b39d7
[ "MIT" ]
1
2019-01-25T17:00:42.000Z
2019-01-25T17:00:42.000Z
grow/translations/locales.py
kmcnellis/grow
4787f5a01681ef0800e9b4388a56cdbc48209368
[ "MIT" ]
null
null
null
grow/translations/locales.py
kmcnellis/grow
4787f5a01681ef0800e9b4388a56cdbc48209368
[ "MIT" ]
null
null
null
from babel import localedata from grow.pods import errors from grow.pods import messages import pickle import os import babel import re class Locales(object): def __init__(self, pod): self.pod = pod def list_groups(self): if 'locales' not in self.pod.yaml: return [] retur...
35.446927
83
0.622695
from babel import localedata from grow.pods import errors from grow.pods import messages import pickle import os import babel import re class Locales(object): def __init__(self, pod): self.pod = pod def list_groups(self): if 'locales' not in self.pod.yaml: return [] retur...
true
true
f70fc2ab84b8b81bc5e39c5a740166c588e6362f
7,625
py
Python
examples/pwr_run/checkpointing/final/final4_new2/job51.py
boringlee24/keras_old
1e1176c45c4952ba1b9b9e58e9cc4df027ab111d
[ "MIT" ]
null
null
null
examples/pwr_run/checkpointing/final/final4_new2/job51.py
boringlee24/keras_old
1e1176c45c4952ba1b9b9e58e9cc4df027ab111d
[ "MIT" ]
null
null
null
examples/pwr_run/checkpointing/final/final4_new2/job51.py
boringlee24/keras_old
1e1176c45c4952ba1b9b9e58e9cc4df027ab111d
[ "MIT" ]
null
null
null
""" #Trains a ResNet on the CIFAR10 dataset. """ from __future__ import print_function import keras from keras.layers import Dense, Conv2D, BatchNormalization, Activation from keras.layers import AveragePooling2D, Input, Flatten from keras.optimizers import Adam from keras.callbacks import ModelCheckpoint, LearningRa...
32.725322
118
0.693377
from __future__ import print_function import keras from keras.layers import Dense, Conv2D, BatchNormalization, Activation from keras.layers import AveragePooling2D, Input, Flatten from keras.optimizers import Adam from keras.callbacks import ModelCheckpoint, LearningRateScheduler from keras.callbacks import ReduceLROn...
true
true
f70fc307d1ca7708b58118c2e04d529c472e7d00
6,329
py
Python
patches/multiworld.py
kbranch/LADXR
21e795daecf90fa48f19e051a2977fffb71ade5c
[ "MIT" ]
null
null
null
patches/multiworld.py
kbranch/LADXR
21e795daecf90fa48f19e051a2977fffb71ade5c
[ "MIT" ]
null
null
null
patches/multiworld.py
kbranch/LADXR
21e795daecf90fa48f19e051a2977fffb71ade5c
[ "MIT" ]
null
null
null
from assembler import ASM from roomEditor import RoomEditor import entityData def addMultiworldShop(rom): # Make a copy of the shop into GrandpaUlrira house shop_room = RoomEditor(rom, 0x2A1) re = RoomEditor(rom, 0x2A9) re.objects = [obj for obj in shop_room.objects if obj.x is not None and obj.type_i...
21.674658
112
0.557592
from assembler import ASM from roomEditor import RoomEditor import entityData def addMultiworldShop(rom): shop_room = RoomEditor(rom, 0x2A1) re = RoomEditor(rom, 0x2A9) re.objects = [obj for obj in shop_room.objects if obj.x is not None and obj.type_id != 0xCE] + re.getWarps() re.entities = [(1, ...
true
true
f70fc3e33f50cffe0c707d86a267aec3f37ec6a4
4,449
py
Python
turbinia/state_manager_test.py
youjitwo/turbinia
aae3c41cf72f08347c119f0734d1ce74f57df831
[ "Apache-2.0" ]
null
null
null
turbinia/state_manager_test.py
youjitwo/turbinia
aae3c41cf72f08347c119f0734d1ce74f57df831
[ "Apache-2.0" ]
null
null
null
turbinia/state_manager_test.py
youjitwo/turbinia
aae3c41cf72f08347c119f0734d1ce74f57df831
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
38.353448
80
0.733423
from __future__ import unicode_literals import copy import os import tempfile import unittest from unittest import mock from turbinia import config from turbinia.workers import TurbiniaTask from turbinia.workers import TurbiniaTaskResult from turbinia import state_manager class TestPSQStateManager(u...
true
true
f70fc40e9143f9c3f8ffb69f403f565a54f0c2b4
1,049
bzl
Python
hack/repo-infra/defs/build.bzl
linxiulei/cri-tools
17484cda811c93b69e61448835db9559c7f3ab9c
[ "Apache-2.0" ]
777
2018-09-09T18:10:30.000Z
2022-03-31T15:29:00.000Z
hack/repo-infra/defs/build.bzl
linxiulei/cri-tools
17484cda811c93b69e61448835db9559c7f3ab9c
[ "Apache-2.0" ]
553
2018-09-07T02:36:56.000Z
2022-03-30T02:13:57.000Z
hack/repo-infra/defs/build.bzl
linxiulei/cri-tools
17484cda811c93b69e61448835db9559c7f3ab9c
[ "Apache-2.0" ]
217
2018-09-19T13:47:36.000Z
2022-03-25T13:58:12.000Z
def _gcs_upload_impl(ctx): targets = [] for target in ctx.files.data: targets.append(target.short_path) ctx.file_action( output = ctx.outputs.targets, content = "\n".join(targets), ) ctx.file_action( content = "%s --manifest %s --root $PWD -- $@" % ( ctx.attr.uploader.files_...
23.840909
63
0.554814
def _gcs_upload_impl(ctx): targets = [] for target in ctx.files.data: targets.append(target.short_path) ctx.file_action( output = ctx.outputs.targets, content = "\n".join(targets), ) ctx.file_action( content = "%s --manifest %s --root $PWD -- $@" % ( ctx.attr.uploader.files_...
true
true
f70fc42e1bdd3e9182fc5cb7fe03ea0f0092441a
34,760
py
Python
.history/neuroformer/model_perceiver_20220116213408.py
woanderer/neuroformer
df3462d55977b6c9adcb6753e7c474b8b76e8021
[ "MIT" ]
null
null
null
.history/neuroformer/model_perceiver_20220116213408.py
woanderer/neuroformer
df3462d55977b6c9adcb6753e7c474b8b76e8021
[ "MIT" ]
null
null
null
.history/neuroformer/model_perceiver_20220116213408.py
woanderer/neuroformer
df3462d55977b6c9adcb6753e7c474b8b76e8021
[ "MIT" ]
null
null
null
# from code.transformer_vid.utils import convert_weights # import rotary_embedding_torch from torch.nn.modules.activation import GELU, ReLU # from data.OneCombo3.trainer import TrainerConfig import math import numpy as np import itertools import logging import torch import torch.nn as nn from torch.nn import functiona...
39.232506
139
0.581761
from torch.nn.modules.activation import GELU, ReLU import math import numpy as np import itertools import logging import torch import torch.nn as nn from torch.nn import functional as F from torch.autograd import Variable from torchvision.models.video import r3d_18 from scipy.optimize import linear_sum_assignment...
true
true
f70fc4b75705f42bbe31c2e4b05c351f37b97eeb
2,243
py
Python
driller/prioritization_techniques/unique.py
ruaronicola/driller
9f581dee0fa0365c0738d947428d0d9462290c5e
[ "BSD-2-Clause" ]
null
null
null
driller/prioritization_techniques/unique.py
ruaronicola/driller
9f581dee0fa0365c0738d947428d0d9462290c5e
[ "BSD-2-Clause" ]
null
null
null
driller/prioritization_techniques/unique.py
ruaronicola/driller
9f581dee0fa0365c0738d947428d0d9462290c5e
[ "BSD-2-Clause" ]
null
null
null
from . import PrioritizationTechnique from collections import Counter class UniqueSearch(PrioritizationTechnique): def __init__(self, binary, target_os, target_arch, similarity_func=None): super(UniqueSearch, self).__init__(binary=binary, target_os=target_os, target_arch=target_arch) self...
39.350877
105
0.607222
from . import PrioritizationTechnique from collections import Counter class UniqueSearch(PrioritizationTechnique): def __init__(self, binary, target_os, target_arch, similarity_func=None): super(UniqueSearch, self).__init__(binary=binary, target_os=target_os, target_arch=target_arch) self...
true
true
f70fc4d24cffa26af63c6d398dd5b0f208d70f01
7,543
py
Python
pymultifracs/simul/mrw.py
agramfort/pymultifracs
3a8896f3f26180b05ccecb4a905b05a3ebc0308b
[ "MIT" ]
9
2019-03-29T05:28:42.000Z
2019-12-29T12:41:15.000Z
pymultifracs/simul/mrw.py
agramfort/pymultifracs
3a8896f3f26180b05ccecb4a905b05a3ebc0308b
[ "MIT" ]
4
2021-01-20T14:58:03.000Z
2021-03-01T11:52:09.000Z
pymultifracs/simul/mrw.py
agramfort/pymultifracs
3a8896f3f26180b05ccecb4a905b05a3ebc0308b
[ "MIT" ]
6
2021-02-08T15:23:39.000Z
2022-03-28T13:30:46.000Z
# Synthesis of multifractal random walk and derived processes. # # Roberto Fabio Leonarduzzi # January, 2019 import numpy as np from .fbm import fgn from .pzutils import gaussian_cme, gaussian_chol from numpy.fft import fft, ifft # import math # import matplotlib.pyplot as plt def mrw(shape, H, lam, L, sigma=1, meth...
25.832192
79
0.561978
import numpy as np from .fbm import fgn from .pzutils import gaussian_cme, gaussian_chol from numpy.fft import fft, ifft def mrw(shape, H, lam, L, sigma=1, method='cme', z0=(None, None)): try: N, R = shape do_squeeze = False except TypeError: N, R = shape, 1 do_squeez...
true
true
f70fc5015c78a597d0e8b3f39a7c892676afd6d0
1,296
py
Python
tests/pyregex/test_file_ext.py
BrianLusina/PyCharm
144dd4f6b2d254507237f46c8ee175c407fe053d
[ "Apache-2.0", "MIT" ]
null
null
null
tests/pyregex/test_file_ext.py
BrianLusina/PyCharm
144dd4f6b2d254507237f46c8ee175c407fe053d
[ "Apache-2.0", "MIT" ]
null
null
null
tests/pyregex/test_file_ext.py
BrianLusina/PyCharm
144dd4f6b2d254507237f46c8ee175c407fe053d
[ "Apache-2.0", "MIT" ]
null
null
null
import unittest from pyregex.file_extensions import is_audio, is_img class FileExtTests(unittest.TestCase): def test_1(self): self.assertEqual(is_audio("Nothing Else Matters.mp3"), False) def test_2(self): self.assertEqual(is_audio("NothingElseMatters.mp3"), True) def test_3(self): ...
24.923077
69
0.655093
import unittest from pyregex.file_extensions import is_audio, is_img class FileExtTests(unittest.TestCase): def test_1(self): self.assertEqual(is_audio("Nothing Else Matters.mp3"), False) def test_2(self): self.assertEqual(is_audio("NothingElseMatters.mp3"), True) def test_3(self): ...
true
true
f70fc52500dca37eb444c1562ccc361d0506ca18
2,151
py
Python
aide_validation/lfom_validation.py
AguaClara/aide_validation
997b9da8077d1f560d4aa9ccb236b21580da4808
[ "MIT" ]
null
null
null
aide_validation/lfom_validation.py
AguaClara/aide_validation
997b9da8077d1f560d4aa9ccb236b21580da4808
[ "MIT" ]
3
2021-01-28T02:30:34.000Z
2021-03-30T16:57:21.000Z
aide_validation/lfom_validation.py
AguaClara/aide_validation
997b9da8077d1f560d4aa9ccb236b21580da4808
[ "MIT" ]
null
null
null
"""Helper functions for validating LFOM. Created on September 18, 2020 @author: jcs528@cornell.edu """ from aguaclara.core.units import u import aguaclara.core.physchem as pc import aguaclara.core.constants as con def flow_lfom_vert(height, d_ori, h_ori, n_oris): """Returns the flow through the LFOM as a functi...
30.728571
85
0.641562
from aguaclara.core.units import u import aguaclara.core.physchem as pc import aguaclara.core.constants as con def flow_lfom_vert(height, d_ori, h_ori, n_oris): flow = pc.flow_orifice_vert(d_ori, height - h_ori, con.VC_ORIFICE_RATIO) * n_oris return (sum(flow)).to(u.L / u.s) def check_flow_lfom_vert( d...
true
true
f70fc536e34579924ddaa83ede4401b79ce9f249
2,796
py
Python
script popolamento DB/env/lib/python3.7/site-packages/pip/_internal/__init__.py
2dadsgn/Smart-vase-webapp-flask-
0714d960ec21c77be069dd07b1bc8407f33e0b72
[ "Apache-2.0" ]
null
null
null
script popolamento DB/env/lib/python3.7/site-packages/pip/_internal/__init__.py
2dadsgn/Smart-vase-webapp-flask-
0714d960ec21c77be069dd07b1bc8407f33e0b72
[ "Apache-2.0" ]
null
null
null
script popolamento DB/env/lib/python3.7/site-packages/pip/_internal/__init__.py
2dadsgn/Smart-vase-webapp-flask-
0714d960ec21c77be069dd07b1bc8407f33e0b72
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python from __future__ import absolute_import import locale import logging import os import sys import warnings # 2016-06-17 barry@debian.org: urllib3 1.14 added optional support for socks, # but if invoked (i.e. imported), it will issue a warning to stderr if socks # isn't available. requests uncondi...
35.846154
79
0.741059
from __future__ import absolute_import import locale import logging import os import sys import warnings # to add socks as yet another dependency for pip, nor do I want to allow-stder # in the DEP-8 tests, so just suppress the warning. pdb tells me this has to # be done before the import of pip.vcs. from pip._...
true
true
f70fc6b477776e6e8c300af6054a006f420fbd61
13,684
py
Python
venv/lib/python3.7/site-packages/rqdatac/services/stock_status.py
CatTiger/vnpy
7901a0fb80a5b44d6fc752bd4b2b64ec62c8f84b
[ "MIT" ]
null
null
null
venv/lib/python3.7/site-packages/rqdatac/services/stock_status.py
CatTiger/vnpy
7901a0fb80a5b44d6fc752bd4b2b64ec62c8f84b
[ "MIT" ]
1
2020-04-21T02:42:32.000Z
2020-04-21T02:42:32.000Z
venv/lib/python3.7/site-packages/rqdatac/services/stock_status.py
CatTiger/vnpy
7901a0fb80a5b44d6fc752bd4b2b64ec62c8f84b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import datetime import warnings import pandas as pd import numpy as np from rqdatac.utils import to_datetime, to_date from rqdatac.validators import ( ensure_date_range, ensure_date_or_today_int, ensure_list_of_string, check_items_in_container, ensure_order, ensure_orde...
36.297082
106
0.668372
import datetime import warnings import pandas as pd import numpy as np from rqdatac.utils import to_datetime, to_date from rqdatac.validators import ( ensure_date_range, ensure_date_or_today_int, ensure_list_of_string, check_items_in_container, ensure_order, ensure_order_book_id, ensure_o...
true
true
f70fc6f681ce167e1c1f5581804480dafb4f6607
3,118
py
Python
backend/apps/endpoints/models.py
alcibiadesBustillo/ml_service
99417531e2dbd43f212b5b0a397307f31c8131ca
[ "MIT" ]
null
null
null
backend/apps/endpoints/models.py
alcibiadesBustillo/ml_service
99417531e2dbd43f212b5b0a397307f31c8131ca
[ "MIT" ]
null
null
null
backend/apps/endpoints/models.py
alcibiadesBustillo/ml_service
99417531e2dbd43f212b5b0a397307f31c8131ca
[ "MIT" ]
null
null
null
from django.db import models # Create your models here. class Endpoint(models.Model): """ The Endpoint object represents ML API endpoints Attributes: name: The name of the endpoints, it will be used in API URL, owner: The string with owner name, created_at: The date when endpoint w...
41.573333
106
0.724182
from django.db import models class Endpoint(models.Model): name = models.CharField(max_length=128) owner = models.CharField(max_length=128) created_at = models.DateTimeField(auto_now_add=True, blank=True) class MLAlgorithm(models.Model): name = models.CharField(max_length=128) description = mod...
true
true
f70fc7967c36f339b881f758de114c8b5641438b
162
py
Python
tests/model_control/detailed/transf_Difference/model_control_one_enabled_Difference_PolyTrend_Seasonal_Hour_MLP.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
null
null
null
tests/model_control/detailed/transf_Difference/model_control_one_enabled_Difference_PolyTrend_Seasonal_Hour_MLP.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
1
2019-11-30T23:39:38.000Z
2019-12-01T04:34:35.000Z
tests/model_control/detailed/transf_Difference/model_control_one_enabled_Difference_PolyTrend_Seasonal_Hour_MLP.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
null
null
null
import pyaf.tests.model_control.test_ozone_custom_models_enabled as testmod testmod.build_model( ['Difference'] , ['PolyTrend'] , ['Seasonal_Hour'] , ['MLP'] );
40.5
84
0.753086
import pyaf.tests.model_control.test_ozone_custom_models_enabled as testmod testmod.build_model( ['Difference'] , ['PolyTrend'] , ['Seasonal_Hour'] , ['MLP'] );
true
true
f70fc914b27823d8d36316353c43270277541831
4,591
py
Python
u24_lymphocyte/third_party/treeano/sandbox/nodes/randomized_relu.py
ALSM-PhD/quip_classification
7347bfaa5cf11ae2d7a528fbcc43322a12c795d3
[ "BSD-3-Clause" ]
45
2015-04-26T04:45:51.000Z
2022-01-24T15:03:55.000Z
u24_lymphocyte/third_party/treeano/sandbox/nodes/randomized_relu.py
ALSM-PhD/quip_classification
7347bfaa5cf11ae2d7a528fbcc43322a12c795d3
[ "BSD-3-Clause" ]
8
2018-07-20T20:54:51.000Z
2020-06-12T05:36:04.000Z
u24_lymphocyte/third_party/treeano/sandbox/nodes/randomized_relu.py
ALSM-PhD/quip_classification
7347bfaa5cf11ae2d7a528fbcc43322a12c795d3
[ "BSD-3-Clause" ]
22
2018-05-21T23:57:20.000Z
2022-02-21T00:48:32.000Z
import numpy as np import theano import theano.tensor as T import treeano import treeano.nodes as tn from theano.sandbox.rng_mrg import MRG_RandomStreams @treeano.register_node("randomized_relu") class RandomizedReLUNode(treeano.NodeImpl): """ from "Empirical Evaluation of Rectified Activations in Convolutio...
33.268116
76
0.544544
import numpy as np import theano import theano.tensor as T import treeano import treeano.nodes as tn from theano.sandbox.rng_mrg import MRG_RandomStreams @treeano.register_node("randomized_relu") class RandomizedReLUNode(treeano.NodeImpl): hyperparameter_names = ("alpha_lower", "alpha...
true
true
f70fca0643f281fccf3a6c2b02a8457d15910cb5
930
py
Python
abrv/db.py
shwnchpl/abrv
762a96a408104c5cd0623387bf0b6163f7367ca6
[ "MIT" ]
null
null
null
abrv/db.py
shwnchpl/abrv
762a96a408104c5cd0623387bf0b6163f7367ca6
[ "MIT" ]
1
2021-03-20T05:30:27.000Z
2021-03-20T05:30:27.000Z
abrv/db.py
shwnchpl/abrv.io
762a96a408104c5cd0623387bf0b6163f7367ca6
[ "MIT" ]
null
null
null
import click import psycopg2 as pg2 from flask import current_app, g from flask.cli import with_appcontext from psycopg2.extras import DictCursor def get_db(): if 'db' not in g: g.db = pg2.connect( **current_app.config['DATABASE'], ) g.db.cursor_factory = DictCursor retu...
18.979592
56
0.648387
import click import psycopg2 as pg2 from flask import current_app, g from flask.cli import with_appcontext from psycopg2.extras import DictCursor def get_db(): if 'db' not in g: g.db = pg2.connect( **current_app.config['DATABASE'], ) g.db.cursor_factory = DictCursor retu...
true
true
f70fca09f62c53b1a4b27f6e0b1daad65396083a
17,810
py
Python
twilio/rest/sync/v1/service/sync_list/__init__.py
ethan-schaffer/MassMessenger
3042ed98864d012a7276a6a365f81690431d5157
[ "MIT" ]
1
2019-02-08T01:13:38.000Z
2019-02-08T01:13:38.000Z
twilio/rest/sync/v1/service/sync_list/__init__.py
kkrlee/twilio-python
260de9df17c5a1440d9c037a971e2182da7f4ced
[ "MIT" ]
2
2019-09-20T19:08:16.000Z
2021-04-02T13:28:29.000Z
twilio/rest/sync/v1/service/sync_list/__init__.py
kkrlee/twilio-python
260de9df17c5a1440d9c037a971e2182da7f4ced
[ "MIT" ]
null
null
null
# coding=utf-8 """ This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from twilio.base import deserialize from twilio.base import values from twilio.base.instance_context import InstanceContext from twilio.base.instance_resource import InstanceResource from twilio.base....
33.54049
106
0.626727
from twilio.base import deserialize from twilio.base import values from twilio.base.instance_context import InstanceContext from twilio.base.instance_resource import InstanceResource from twilio.base.list_resource import ListResource from twilio.base.page import Page from twilio.rest.sync.v1.service.sync_list.sync_li...
true
true
f70fca2a46b2b6b5b759453f5fa1bf80d9210bfe
4,988
py
Python
var/spack/repos/builtin/packages/phist/package.py
mrzv/spack
a0fb2838ea60f020179f480a2db1438da9d2e2ab
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
var/spack/repos/builtin/packages/phist/package.py
mrzv/spack
a0fb2838ea60f020179f480a2db1438da9d2e2ab
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
var/spack/repos/builtin/packages/phist/package.py
mrzv/spack
a0fb2838ea60f020179f480a2db1438da9d2e2ab
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
# Copyright 2013-2018 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Phist(CMakePackage): """The Pipelined, Hybrid-parallel Iterative Solver Toolkit provides ...
42.632479
95
0.611668
from spack import * class Phist(CMakePackage): homepage = "https://bitbucket.org/essex/phist/" url = "https://bitbucket.org/essex/phist/get/phist-1.4.3.tar.gz" git = "https://bitbucket.org/essex/phist/phist.git" version('develop', branch='devel') version('master', branch='master'...
true
true
f70fcc7c9b6afb7fa04d950423206f73b11a9bb8
1,385
py
Python
bin/exp_len.py
gaofeng21cn/IDP-fusion
052ac4f868fd416e10165ef4891804d25edc8862
[ "Apache-2.0" ]
5
2017-09-18T18:21:26.000Z
2020-05-01T23:29:26.000Z
bin/exp_len.py
gaofeng21cn/IDP-fusion
052ac4f868fd416e10165ef4891804d25edc8862
[ "Apache-2.0" ]
3
2018-11-26T16:35:12.000Z
2021-11-22T07:16:51.000Z
bin/exp_len.py
gaofeng21cn/IDP-fusion
052ac4f868fd416e10165ef4891804d25edc8862
[ "Apache-2.0" ]
4
2018-01-02T13:06:39.000Z
2020-04-14T13:20:52.000Z
#!/usr/bin/python import sys import os if len(sys.argv) >= 3 : filename = sys.argv[1] refFlat_filename = sys.argv[2] else: print("usage: python exp_len.py refSeq_MLE_output.tab known.gpd") print("or ./exp_len.py refSeq_MLE_output.tab known.gpd") sys.exit(1) ########################################...
27.7
104
0.490975
import sys import os if len(sys.argv) >= 3 : filename = sys.argv[1] refFlat_filename = sys.argv[2] else: print("usage: python exp_len.py refSeq_MLE_output.tab known.gpd") print("or ./exp_len.py refSeq_MLE_output.tab known.gpd") sys.exit(1)
false
true
f70fcd603a54e94391c4758ae07ce19fce6dcb4f
6,385
py
Python
src/bindings/python/tests/test_ngraph/test_ops_binary.py
pazamelin/openvino
b7e8ef910d7ed8e52326d14dc6fd53b71d16ed48
[ "Apache-2.0" ]
1
2019-09-22T01:05:07.000Z
2019-09-22T01:05:07.000Z
src/bindings/python/tests/test_ngraph/test_ops_binary.py
pazamelin/openvino
b7e8ef910d7ed8e52326d14dc6fd53b71d16ed48
[ "Apache-2.0" ]
58
2020-11-06T12:13:45.000Z
2022-03-28T13:20:11.000Z
src/bindings/python/tests/test_ngraph/test_ops_binary.py
pazamelin/openvino
b7e8ef910d7ed8e52326d14dc6fd53b71d16ed48
[ "Apache-2.0" ]
2
2021-07-14T07:40:50.000Z
2021-07-27T01:40:03.000Z
# Copyright (C) 2018-2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 import operator import numpy as np import pytest import openvino.runtime.opset8 as ov from tests.runtime import get_runtime from tests.test_ngraph.util import run_op_node @pytest.mark.parametrize( "ng_api_helper,numpy_function", ...
30.404762
105
0.649021
import operator import numpy as np import pytest import openvino.runtime.opset8 as ov from tests.runtime import get_runtime from tests.test_ngraph.util import run_op_node @pytest.mark.parametrize( "ng_api_helper,numpy_function", [ (ov.add, np.add), (ov.divide, np.divide), (ov.mult...
true
true
f70fcd9fc74db1c3ee037f4d11c4ff2fdad8ae4a
1,015
py
Python
autoindex.py
langsci/91
bca083ed2f5f30dd4c2d6587366e8e0f649285c3
[ "CC-BY-4.0" ]
null
null
null
autoindex.py
langsci/91
bca083ed2f5f30dd4c2d6587366e8e0f649285c3
[ "CC-BY-4.0" ]
null
null
null
autoindex.py
langsci/91
bca083ed2f5f30dd4c2d6587366e8e0f649285c3
[ "CC-BY-4.0" ]
null
null
null
#!/usr/bin/python3 import glob import re lgs=open("locallanguages.txt").read().split('\n') terms=open("localsubjectterms.txt").read().split('\n')[::-1]#reverse to avoid double indexing print("found %i language names for autoindexing" % len(lgs)) print("found %i subject terms for autoindexing" % len(terms)) files = g...
28.194444
103
0.595074
import glob import re lgs=open("locallanguages.txt").read().split('\n') terms=open("localsubjectterms.txt").read().split('\n')[::-1] print("found %i language names for autoindexing" % len(lgs)) print("found %i subject terms for autoindexing" % len(terms)) files = glob.glob('chapters/*tex') for f in files: print("...
true
true
f70fcdc4a7591387a0e661b787c802ae0ddafa4c
3,137
py
Python
mir/qualia/comment.py
darkfeline/qualia
28ccb419dd82b75878c2f52227f291b249b489d7
[ "Apache-2.0" ]
23
2017-01-18T13:53:05.000Z
2020-05-30T10:41:56.000Z
mir/qualia/comment.py
project-mir/mir.qualia
28ccb419dd82b75878c2f52227f291b249b489d7
[ "Apache-2.0" ]
4
2016-10-16T00:19:15.000Z
2017-10-25T13:28:05.000Z
mir/qualia/comment.py
project-mir/mir.qualia
28ccb419dd82b75878c2f52227f291b249b489d7
[ "Apache-2.0" ]
5
2016-10-16T00:07:38.000Z
2022-03-30T13:11:30.000Z
# Copyright (C) 2016 Allen Li # # 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,...
32.340206
75
0.63277
import re from mir.qualia.indent import common_indent class CommentPrefix: def __init__(self, comment_prefix): self._comment_prefix = comment_prefix self._prefix_pattern = re.compile( fr'^(?P<indent>\s*){re.escape(comment_prefix)}') def __repr__(self): cl...
true
true
f70fcec201aadc2ae8017ed9ede79957d301a8d7
1,785
py
Python
eloquent/query/processors/mysql_processor.py
KarthickNamakkalKrishnan/eloquent
0638b688d5fd0c1a46b7471dd465eeb4c2f84666
[ "MIT" ]
47
2015-03-19T02:11:36.000Z
2022-03-29T07:16:42.000Z
eloquent/query/processors/mysql_processor.py
KarthickNamakkalKrishnan/eloquent
0638b688d5fd0c1a46b7471dd465eeb4c2f84666
[ "MIT" ]
20
2015-03-16T02:56:51.000Z
2015-05-24T17:51:29.000Z
eloquent/query/processors/mysql_processor.py
sdispater/eloquent
0638b688d5fd0c1a46b7471dd465eeb4c2f84666
[ "MIT" ]
4
2018-08-29T13:42:50.000Z
2021-03-14T11:28:31.000Z
# -*- coding: utf-8 -*- from .processor import QueryProcessor class MySqlQueryProcessor(QueryProcessor): def process_insert_get_id(self, query, sql, values, sequence=None): """ Process an "insert get ID" query. :param query: A QueryBuilder instance :type query: QueryBuilder ...
27.890625
84
0.568067
from .processor import QueryProcessor class MySqlQueryProcessor(QueryProcessor): def process_insert_get_id(self, query, sql, values, sequence=None): if not query.get_connection().transaction_level(): with query.get_connection().transaction(): query.get_connection().insert(sq...
true
true
f70fcef80f20ce380e02798f1200de49413bc6f2
202
py
Python
src/simmate/toolkit/creators/vector/__init__.py
sionab/simmate
6dedea7310829aae425bf3393e7923e454a0129f
[ "BSD-3-Clause" ]
null
null
null
src/simmate/toolkit/creators/vector/__init__.py
sionab/simmate
6dedea7310829aae425bf3393e7923e454a0129f
[ "BSD-3-Clause" ]
null
null
null
src/simmate/toolkit/creators/vector/__init__.py
sionab/simmate
6dedea7310829aae425bf3393e7923e454a0129f
[ "BSD-3-Clause" ]
null
null
null
from simmate.toolkit.creators.vector.uniform_distribution import ( UniformlyDistributedVectors, ) from simmate.toolkit.creators.vector.normal_distribution import ( NormallyDistributedVectors, )
28.857143
66
0.831683
from simmate.toolkit.creators.vector.uniform_distribution import ( UniformlyDistributedVectors, ) from simmate.toolkit.creators.vector.normal_distribution import ( NormallyDistributedVectors, )
true
true
f70fcf41f7c218d9425b0cdbb130c4b7ef454437
3,403
py
Python
pepys_admin/maintenance/dialogs/progress_dialog.py
debrief/pepys-import
12d29c0e0f69e1119400334983947893e7679b6b
[ "Apache-2.0" ]
4
2021-05-14T08:22:47.000Z
2022-02-04T19:48:25.000Z
pepys_admin/maintenance/dialogs/progress_dialog.py
debrief/pepys-import
12d29c0e0f69e1119400334983947893e7679b6b
[ "Apache-2.0" ]
1,083
2019-11-06T17:01:07.000Z
2022-03-25T10:26:51.000Z
pepys_admin/maintenance/dialogs/progress_dialog.py
debrief/pepys-import
12d29c0e0f69e1119400334983947893e7679b6b
[ "Apache-2.0" ]
4
2019-11-06T12:00:45.000Z
2021-06-09T04:18:28.000Z
import asyncio from asyncio import Future from asyncio.tasks import ensure_future from functools import partial from prompt_toolkit.application.current import get_app from prompt_toolkit.layout.containers import HSplit from prompt_toolkit.layout.dimension import D from prompt_toolkit.widgets import Button, Label, Prog...
38.235955
88
0.628563
import asyncio from asyncio import Future from asyncio.tasks import ensure_future from functools import partial from prompt_toolkit.application.current import get_app from prompt_toolkit.layout.containers import HSplit from prompt_toolkit.layout.dimension import D from prompt_toolkit.widgets import Button, Label, Prog...
true
true
f70fcf542f3210fc83f2ec7cfff75251815ab90f
5,071
py
Python
python/configuration.py
robertosilviu/differential_evolution_bridge
dc9e7692d4e88aaca6d6db38f52926286879efb6
[ "MIT" ]
1
2020-06-10T05:59:34.000Z
2020-06-10T05:59:34.000Z
python/configuration.py
robertosilviu/differential_evolution_bridge
dc9e7692d4e88aaca6d6db38f52926286879efb6
[ "MIT" ]
null
null
null
python/configuration.py
robertosilviu/differential_evolution_bridge
dc9e7692d4e88aaca6d6db38f52926286879efb6
[ "MIT" ]
2
2020-02-26T02:10:58.000Z
2021-07-02T08:24:42.000Z
import json class Configuration(): # class to organize Netlogo simulation parameters def __init__(self): # costants self.constants={ 'strategy?' : 3, 'drone.radius': 0.2, 'drone.speedMax': 8.5, 'drone.cruisingSpeed': 2, 'drone.acceleration...
35.964539
63
0.549399
import json class Configuration(): def __init__(self): self.constants={ 'strategy?' : 3, 'drone.radius': 0.2, 'drone.speedMax': 8.5, 'drone.cruisingSpeed': 2, 'drone.acceleration': 2, 'drone.deceleration': -2, 'dr...
true
true
f70fd0b4258ce75e8178e9428e3b7a835b135324
1,925
py
Python
docs-source/source/conf.py
bengranett/synmock
def8f73792d1b756feb2203c1e03e71ce9326d9b
[ "MIT" ]
1
2020-03-18T15:16:50.000Z
2020-03-18T15:16:50.000Z
docs-source/source/conf.py
bengranett/synmock
def8f73792d1b756feb2203c1e03e71ce9326d9b
[ "MIT" ]
null
null
null
docs-source/source/conf.py
bengranett/synmock
def8f73792d1b756feb2203c1e03e71ce9326d9b
[ "MIT" ]
null
null
null
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
37.019231
79
0.661299
project = 'Synmock' copyright = '2020, Ben Granett' author = 'Ben Granett' extensions = ['sphinx.ext.autodoc', 'sphinx.ext.napoleon', 'sphinx.ext.githubpages', 'sphinx.ext.viewcode'] templates_path = ['_templates'] exclude_patterns = [] html_theme = 'alabaster' h...
true
true
f70fd182757e69c7390c6872baa160b5dc484126
378
py
Python
dictances/intersection_squared_variation.py
DavidBerdik/dictances
7b804b62032bbdecc8e73946cf74b171681fe4f5
[ "MIT" ]
30
2018-08-30T16:00:14.000Z
2022-03-14T14:36:17.000Z
dictances/intersection_squared_variation.py
DavidBerdik/dictances
7b804b62032bbdecc8e73946cf74b171681fe4f5
[ "MIT" ]
6
2019-06-18T15:37:23.000Z
2021-04-15T12:40:42.000Z
dictances/intersection_squared_variation.py
DavidBerdik/dictances
7b804b62032bbdecc8e73946cf74b171681fe4f5
[ "MIT" ]
6
2019-02-10T23:22:25.000Z
2020-10-01T16:25:40.000Z
"""Return the squared distance beetween the intersection of a and b.""" from .intersection_nth_variation import intersection_nth_variation from typing import Dict def intersection_squared_variation(a: Dict, b: Dict, overlap: bool=False)->float: """Return the squared distance beetween the intersection of a and b.""...
47.25
81
0.783069
from .intersection_nth_variation import intersection_nth_variation from typing import Dict def intersection_squared_variation(a: Dict, b: Dict, overlap: bool=False)->float: return intersection_nth_variation(a, b, 2, overlap)
true
true
f70fd192b0b86d4d1b0220c841fb600a1a2d7002
503
py
Python
generated-libraries/python/netapp/exports/security_flavor.py
radekg/netapp-ontap-lib-get
6445ebb071ec147ea82a486fbe9f094c56c5c40d
[ "MIT" ]
2
2017-03-28T15:31:26.000Z
2018-08-16T22:15:18.000Z
generated-libraries/python/netapp/exports/security_flavor.py
radekg/netapp-ontap-lib-get
6445ebb071ec147ea82a486fbe9f094c56c5c40d
[ "MIT" ]
null
null
null
generated-libraries/python/netapp/exports/security_flavor.py
radekg/netapp-ontap-lib-get
6445ebb071ec147ea82a486fbe9f094c56c5c40d
[ "MIT" ]
null
null
null
class SecurityFlavor(basestring): """ any|none|never|krb5|ntlm|sys Possible values: <ul> <li> "any" - Any, <li> "none" - Anonymous Access Allowed If Security Type Not Already Listed, <li> "never" - Never, <li> "krb5" - Kerberos 5 Authentication, <li> "ntlm" - ...
23.952381
63
0.540755
class SecurityFlavor(basestring): @staticmethod def get_api_name(): return "security-flavor"
true
true
f70fd19c066bebb0ed59dbe39549e05e6dbe3832
19,393
py
Python
powderBot.py
JordanGoodridge/Weather-Discord-Bot
5fd0056a38e753fc6de5eb3d9af428cf6e244fb8
[ "MIT" ]
null
null
null
powderBot.py
JordanGoodridge/Weather-Discord-Bot
5fd0056a38e753fc6de5eb3d9af428cf6e244fb8
[ "MIT" ]
null
null
null
powderBot.py
JordanGoodridge/Weather-Discord-Bot
5fd0056a38e753fc6de5eb3d9af428cf6e244fb8
[ "MIT" ]
null
null
null
#Weather #Functions TODO # precip accumilation works well hourly # sign up for storm alert per IKON or EPIC resort # timer to check the 3 day for storms # highest winter in state from datetime import datetime, timedelta from dateutil import tz import discord import googlemaps import aiohttp import as...
48.726131
233
0.640437
from datetime import datetime, timedelta from dateutil import tz import discord import googlemaps import aiohttp import asyncio from PIL import Image, ImageDraw, ImageFont client = discord.Client() gmaps_key = '' api_key = '' gmaps = googlemaps.Client(key=gmaps_key) latitude = 0 longitude ...
true
true
f70fd1d2052388cfe0df232571e7e732dc7273e5
3,702
py
Python
PythonClient/Framework/CmdRotate.py
SweetShot/AirSim
d43269f9387fdac03298d14416ecf6af43b6fd12
[ "MIT" ]
null
null
null
PythonClient/Framework/CmdRotate.py
SweetShot/AirSim
d43269f9387fdac03298d14416ecf6af43b6fd12
[ "MIT" ]
null
null
null
PythonClient/Framework/CmdRotate.py
SweetShot/AirSim
d43269f9387fdac03298d14416ecf6af43b6fd12
[ "MIT" ]
2
2018-03-07T18:23:42.000Z
2020-02-12T19:58:32.000Z
from CmdBase import * from PersistentModules import * # Cmd # turn left deg # turn right deg # turn to deg # turn rate deg class CmdRotate(CmdBase): def __init__(self, controller, line, engage_object = None): super().__init__(controller, line, engage_object) def start(self): self.mystate_mo...
44.071429
123
0.555105
from CmdBase import * from PersistentModules import * class CmdRotate(CmdBase): def __init__(self, controller, line, engage_object = None): super().__init__(controller, line, engage_object) def start(self): self.mystate_module = self.get_persistent_module('mystate') self.consta...
true
true
f70fd24934cbde2839dbd458ccd8f3b8b099a413
4,017
py
Python
tests/model/test_priors.py
ihmeuw/cascade-at
a5b1b5da1698163fd3bbafc6288968dd9c398096
[ "MIT" ]
1
2019-10-14T23:18:04.000Z
2019-10-14T23:18:04.000Z
tests/model/test_priors.py
ihmeuw/cascade
a5b1b5da1698163fd3bbafc6288968dd9c398096
[ "MIT" ]
35
2018-07-17T18:37:33.000Z
2020-03-06T13:31:35.000Z
tests/model/test_priors.py
ihmeuw/cascade
a5b1b5da1698163fd3bbafc6288968dd9c398096
[ "MIT" ]
4
2018-07-13T00:01:35.000Z
2019-09-02T23:56:11.000Z
import pytest import numpy as np from numpy import isclose from numpy.random import RandomState from cascade_at.model.priors import ( Constant, Gaussian, Uniform, Laplace, StudentsT, LogGaussian, LogLaplace, LogStudentsT, PriorError, ) def test_happy_construction(): Uniform(-1...
25.916129
85
0.618123
import pytest import numpy as np from numpy import isclose from numpy.random import RandomState from cascade_at.model.priors import ( Constant, Gaussian, Uniform, Laplace, StudentsT, LogGaussian, LogLaplace, LogStudentsT, PriorError, ) def test_happy_construction(): Uniform(-1...
true
true
f70fd2fa94d673fff6f6c9d257ae2d677caba319
13,298
py
Python
models/rcnn.py
jiangbestone/DetectRccn
fb30491201f8c64d5ca75298d52aa1a20c4bc6e3
[ "MIT" ]
null
null
null
models/rcnn.py
jiangbestone/DetectRccn
fb30491201f8c64d5ca75298d52aa1a20c4bc6e3
[ "MIT" ]
null
null
null
models/rcnn.py
jiangbestone/DetectRccn
fb30491201f8c64d5ca75298d52aa1a20c4bc6e3
[ "MIT" ]
null
null
null
from torch.autograd import Variable from models.proposal_target_layer_cascade import * import torchvision.models as models from models.proposal import * #bocknet class ResNet(nn.Module): def __init__(self, block, layers, num_classes=1000,dropout_prob=0.2): self.inplanes = 64 super(ResNet, self).__i...
37.2493
138
0.563769
from torch.autograd import Variable from models.proposal_target_layer_cascade import * import torchvision.models as models from models.proposal import * class ResNet(nn.Module): def __init__(self, block, layers, num_classes=1000,dropout_prob=0.2): self.inplanes = 64 super(ResNet, self).__init__() ...
true
true
f70fd34fcef7070d01158e4acd65734d35826d88
678
py
Python
world/load.py
Eoin-Irwin/wmap-geodjango-tutorial-master
f441567d5c9e6059e7192ee5f2d00a51e3d832d8
[ "MIT" ]
null
null
null
world/load.py
Eoin-Irwin/wmap-geodjango-tutorial-master
f441567d5c9e6059e7192ee5f2d00a51e3d832d8
[ "MIT" ]
null
null
null
world/load.py
Eoin-Irwin/wmap-geodjango-tutorial-master
f441567d5c9e6059e7192ee5f2d00a51e3d832d8
[ "MIT" ]
null
null
null
import os from django.contrib.gis.utils import LayerMapping from .models import WorldBorder world_mapping = { 'fips': 'FIPS', 'iso2': 'ISO2', 'iso3': 'ISO3', 'un': 'UN', 'name': 'NAME', 'area': 'AREA', 'pop2005': 'POP2005', 'region': 'REGION', 'subregion': 'SUBREGION', 'lon': 'L...
21.870968
80
0.60472
import os from django.contrib.gis.utils import LayerMapping from .models import WorldBorder world_mapping = { 'fips': 'FIPS', 'iso2': 'ISO2', 'iso3': 'ISO3', 'un': 'UN', 'name': 'NAME', 'area': 'AREA', 'pop2005': 'POP2005', 'region': 'REGION', 'subregion': 'SUBREGION', 'lon': 'L...
true
true
f70fd35d3f0c8c6b1837e551460d92a1bc63db21
6,306
py
Python
service/views.py
zingbretsen/diplomacy
e4c8d2c89540c0e2ea1929879fd303a170d0a723
[ "MIT" ]
null
null
null
service/views.py
zingbretsen/diplomacy
e4c8d2c89540c0e2ea1929879fd303a170d0a723
[ "MIT" ]
null
null
null
service/views.py
zingbretsen/diplomacy
e4c8d2c89540c0e2ea1929879fd303a170d0a723
[ "MIT" ]
null
null
null
from django.shortcuts import get_object_or_404 from django_filters.rest_framework import DjangoFilterBackend from rest_framework import filters, generics, views, exceptions from rest_framework.response import Response from core import models from core.models.base import GameStatus from service import serializers from ...
30.317308
75
0.664605
from django.shortcuts import get_object_or_404 from django_filters.rest_framework import DjangoFilterBackend from rest_framework import filters, generics, views, exceptions from rest_framework.response import Response from core import models from core.models.base import GameStatus from service import serializers from ...
true
true
f70fd38f695b4de489bb91ad4acb68243448e994
6,573
py
Python
tests/ut/python/dataset/test_rgb_hsv.py
httpsgithu/mindspore
c29d6bb764e233b427319cb89ba79e420f1e2c64
[ "Apache-2.0" ]
1
2022-03-30T03:43:29.000Z
2022-03-30T03:43:29.000Z
tests/ut/python/dataset/test_rgb_hsv.py
949144093/mindspore
c29d6bb764e233b427319cb89ba79e420f1e2c64
[ "Apache-2.0" ]
null
null
null
tests/ut/python/dataset/test_rgb_hsv.py
949144093/mindspore
c29d6bb764e233b427319cb89ba79e420f1e2c64
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
38.215116
119
0.66621
import colorsys import numpy as np from numpy.testing import assert_allclose import mindspore.dataset as ds import mindspore.dataset.transforms.transforms import mindspore.dataset.vision.transforms as vision import mindspore.dataset.vision.py_transforms_util as util DATA_DIR = ["../data/dataset/test_tf...
true
true
f70fd4d19e6dc7edc35f39b372064e31f3be0c68
2,521
py
Python
algorithms/agents/intrinsic.py
rtloftin/strategically_efficient_rl
85a702b9361211d345a58cc60696e4e851d48ec4
[ "MIT" ]
7
2021-08-02T14:28:33.000Z
2021-12-27T03:30:47.000Z
algorithms/agents/intrinsic.py
rtloftin/strategically_efficient_rl
85a702b9361211d345a58cc60696e4e851d48ec4
[ "MIT" ]
3
2021-08-02T17:35:52.000Z
2022-02-10T04:42:17.000Z
algorithms/agents/intrinsic.py
rtloftin/strategically_efficient_rl
85a702b9361211d345a58cc60696e4e851d48ec4
[ "MIT" ]
2
2021-08-02T17:30:05.000Z
2021-09-13T12:16:29.000Z
import numpy as np import scipy.signal from ray.rllib.policy.sample_batch import SampleBatch from ray.rllib.evaluation.postprocessing import Postprocessing from algorithms.curiosity import INTRINSIC_REWARD INTRINSIC_VALUE_TARGETS = "intrinsic_value_targets" INTRINSIC_VF_PREDS = "intrinsic_vf_preds" def discount(x, ...
38.784615
115
0.685839
import numpy as np import scipy.signal from ray.rllib.policy.sample_batch import SampleBatch from ray.rllib.evaluation.postprocessing import Postprocessing from algorithms.curiosity import INTRINSIC_REWARD INTRINSIC_VALUE_TARGETS = "intrinsic_value_targets" INTRINSIC_VF_PREDS = "intrinsic_vf_preds" def discount(x, ...
true
true
f70fd5a77b2b7e1d279a9781bf732832a587791e
12,829
py
Python
maskrcnn_benchmark/modeling/roi_heads/relation_head/model_transformer.py
KaihuaTang/scene-graph-benchmark.pytorch
45cd54f7465b81d3154e94fcab2b554a09637f6f
[ "MIT" ]
16
2021-08-18T02:51:02.000Z
2022-03-19T12:43:27.000Z
maskrcnn_benchmark/modeling/roi_heads/relation_head/model_transformer.py
KaihuaTang/scene-graph-benchmark.pytorch
45cd54f7465b81d3154e94fcab2b554a09637f6f
[ "MIT" ]
4
2021-09-23T11:04:57.000Z
2022-02-21T01:57:30.000Z
maskrcnn_benchmark/modeling/roi_heads/relation_head/model_transformer.py
KaihuaTang/scene-graph-benchmark.pytorch
45cd54f7465b81d3154e94fcab2b554a09637f6f
[ "MIT" ]
2
2022-03-22T01:28:10.000Z
2022-03-28T13:26:25.000Z
""" Based on the implementation of https://github.com/jadore801120/attention-is-all-you-need-pytorch """ import torch import torch.nn as nn import torch.nn.functional as F import numpy as np from maskrcnn_benchmark.modeling.utils import cat from .utils_motifs import obj_edge_vectors, to_onehot, nms_overlaps, encode_box...
41.924837
165
0.626159
import torch import torch.nn as nn import torch.nn.functional as F import numpy as np from maskrcnn_benchmark.modeling.utils import cat from .utils_motifs import obj_edge_vectors, to_onehot, nms_overlaps, encode_box_info class ScaledDotProductAttention(nn.Module): def __init__(self, temperature, attn_dropout=0.1):...
true
true
f70fd62b300ff414f3f9d7f1839393e9f800dd25
2,666
py
Python
scripts/train.py
lenna-project/birds-plugin
c548790dcb0593b80ea6da4605e7aa32e3f141ae
[ "MIT" ]
null
null
null
scripts/train.py
lenna-project/birds-plugin
c548790dcb0593b80ea6da4605e7aa32e3f141ae
[ "MIT" ]
null
null
null
scripts/train.py
lenna-project/birds-plugin
c548790dcb0593b80ea6da4605e7aa32e3f141ae
[ "MIT" ]
null
null
null
import logging import numpy as np import os import PIL import PIL.Image import tensorflow as tf from tensorflow.keras.layers import Layer, Conv2D, MaxPool2D, Dense, Flatten, Dropout, GlobalAveragePooling2D from tensorflow.keras.applications import MobileNetV2 from tensorflow.keras import layers from tensorflow.keras i...
26.137255
109
0.716429
import logging import numpy as np import os import PIL import PIL.Image import tensorflow as tf from tensorflow.keras.layers import Layer, Conv2D, MaxPool2D, Dense, Flatten, Dropout, GlobalAveragePooling2D from tensorflow.keras.applications import MobileNetV2 from tensorflow.keras import layers from tensorflow.keras i...
true
true
f70fd6ce4c9506385e733ceaf337664ae0b4ab6f
1,198
py
Python
learn_pipe/model/lstm.py
tpimentelms/meaning2form
624b3947b3ac2a7a521cf35c762fb56508236f74
[ "MIT" ]
1
2021-07-11T09:27:13.000Z
2021-07-11T09:27:13.000Z
learn_pipe/model/lstm.py
tpimentelms/meaning2form
624b3947b3ac2a7a521cf35c762fb56508236f74
[ "MIT" ]
2
2021-09-08T01:04:05.000Z
2022-03-11T23:50:19.000Z
learn_pipe/model/lstm.py
tpimentelms/meaning2form
624b3947b3ac2a7a521cf35c762fb56508236f74
[ "MIT" ]
1
2019-10-22T14:22:53.000Z
2019-10-22T14:22:53.000Z
import torch.nn as nn from .base import BaseLM class IpaLM(BaseLM): name = 'lstm' def __init__(self, vocab_size, hidden_size, nlayers=1, dropout=0.1, embedding_size=None, **kwargs): super().__init__( vocab_size, hidden_size, nlayers=nlayers, dropout=dropout, embedding_size=embedding_size...
33.277778
113
0.649416
import torch.nn as nn from .base import BaseLM class IpaLM(BaseLM): name = 'lstm' def __init__(self, vocab_size, hidden_size, nlayers=1, dropout=0.1, embedding_size=None, **kwargs): super().__init__( vocab_size, hidden_size, nlayers=nlayers, dropout=dropout, embedding_size=embedding_size...
true
true
f70fd8904b39f8d1a6fff3821f6d106d8fd7a3e2
6,582
py
Python
tests/lax_numpy_einsum_test.py
j-towns/jax
49f3f991d4faae22fcd9d8248f3d36575b5004f6
[ "ECL-2.0", "Apache-2.0" ]
3
2019-02-11T16:44:26.000Z
2019-12-21T06:17:36.000Z
tests/lax_numpy_einsum_test.py
j-towns/jax
49f3f991d4faae22fcd9d8248f3d36575b5004f6
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
tests/lax_numpy_einsum_test.py
j-towns/jax
49f3f991d4faae22fcd9d8248f3d36575b5004f6
[ "ECL-2.0", "Apache-2.0" ]
1
2020-10-13T13:25:49.000Z
2020-10-13T13:25:49.000Z
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
23.257951
77
0.55272
from __future__ import absolute_import from __future__ import division from __future__ import print_function from collections import defaultdict import itertools import numpy as onp from absl.testing import absltest from absl.testing import parameterized import jax.numpy as np import jax.test_util as j...
true
true
f70fd8bf2d8002f88cdec8c2042ed6b8aebfceb0
20,088
py
Python
pysnmp-with-texts/SW-STRCTURE-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
8
2019-05-09T17:04:00.000Z
2021-06-09T06:50:51.000Z
pysnmp-with-texts/SW-STRCTURE-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
4
2019-05-31T16:42:59.000Z
2020-01-31T21:57:17.000Z
pysnmp-with-texts/SW-STRCTURE-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module SW-STRCTURE-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/SW-STRCTURE-MIB # Produced by pysmi-0.3.4 at Wed May 1 15:12:42 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27...
133.033113
2,170
0.759359
Integer, OctetString, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "Integer", "OctetString", "ObjectIdentifier") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueSizeConstraint, SingleValueConstraint, ConstraintsIntersection, ValueRangeConstraint, ConstraintsUnion = mibBuild...
true
true
f70fda2462f589a62308e52704ddeabc6bfe0104
21,792
py
Python
my_utils/my_geometry.py
cigar666/my_manim_projects
64d02fb829ce5befd75d91327be465902fabb9c1
[ "MIT" ]
159
2020-02-17T06:45:25.000Z
2022-03-24T06:11:00.000Z
my_utils/my_geometry.py
cigar666/my_manim_projects
64d02fb829ce5befd75d91327be465902fabb9c1
[ "MIT" ]
1
2020-08-06T02:01:29.000Z
2020-08-06T03:05:25.000Z
my_utils/my_geometry.py
cigar666/my_manim_projects
64d02fb829ce5befd75d91327be465902fabb9c1
[ "MIT" ]
53
2020-02-21T03:13:49.000Z
2022-03-14T09:03:59.000Z
from manimlib.constants import * from manimlib.mobject.types.vectorized_mobject import VMobject, VGroup from manimlib.mobject.geometry import Arc, Line, Dot, Polygon, Sector, Circle from manimlib.utils.color import color_gradient from manimlib.mobject.number_line import DecimalNumber from manimlib.mobject.svg.tex_mobje...
41.116981
193
0.583058
from manimlib.constants import * from manimlib.mobject.types.vectorized_mobject import VMobject, VGroup from manimlib.mobject.geometry import Arc, Line, Dot, Polygon, Sector, Circle from manimlib.utils.color import color_gradient from manimlib.mobject.number_line import DecimalNumber from manimlib.mobject.svg.tex_mobje...
true
true
f70fdb71a02ce4ac6ec40e53c2beb666b9b2d2c5
1,884
py
Python
image_augmentation/callbacks/extra_eval.py
tanzhenyu/image_augmentation
d1f8cc35cf25438556e7934e8e6c78827819ea9d
[ "Apache-2.0" ]
6
2020-08-26T18:54:42.000Z
2020-11-22T02:45:37.000Z
image_augmentation/callbacks/extra_eval.py
tanzhenyu/image_augmentation
d1f8cc35cf25438556e7934e8e6c78827819ea9d
[ "Apache-2.0" ]
3
2020-07-13T13:44:09.000Z
2022-02-10T02:12:46.000Z
image_augmentation/callbacks/extra_eval.py
tanzhenyu/image_augmentation
d1f8cc35cf25438556e7934e8e6c78827819ea9d
[ "Apache-2.0" ]
1
2021-03-24T09:51:22.000Z
2021-03-24T09:51:22.000Z
import tensorflow as tf from tensorflow.keras.callbacks import Callback class ExtraValidation(Callback): """Log evaluation metrics of an extra validation set. This callback is useful for model training scenarios where multiple validation sets are used for evaluation (as Keras by default, provides function...
42.818182
86
0.684713
import tensorflow as tf from tensorflow.keras.callbacks import Callback class ExtraValidation(Callback): def __init__(self, validation_data, tensorboard_path, validation_freq=1): super(ExtraValidation, self).__init__() self.validation_data = validation_data self.tensorboard_path = tensorb...
true
true
f70fdbec7fdf36e212bd081759f1a760efe641e0
31
py
Python
anoflows/__init__.py
rom1mouret/anoflows
42381c06b8897e4510e73cda87ea97ea3f4a5579
[ "Apache-2.0" ]
null
null
null
anoflows/__init__.py
rom1mouret/anoflows
42381c06b8897e4510e73cda87ea97ea3f4a5579
[ "Apache-2.0" ]
null
null
null
anoflows/__init__.py
rom1mouret/anoflows
42381c06b8897e4510e73cda87ea97ea3f4a5579
[ "Apache-2.0" ]
null
null
null
from .anoflows import AnoFlows
15.5
30
0.83871
from .anoflows import AnoFlows
true
true
f70fdce8d4dc8ca30480e127bc4ef4d7f2e0fe06
585
py
Python
flask_unchained/bundles/security/admins/role_admin.py
briancappello/flask-unchained
bff296b5c808f5b1db10f7dddb81054600545749
[ "MIT" ]
69
2018-10-10T01:59:11.000Z
2022-03-29T17:29:30.000Z
flask_unchained/bundles/security/admins/role_admin.py
briancappello/flask-unchained
bff296b5c808f5b1db10f7dddb81054600545749
[ "MIT" ]
18
2018-11-17T12:42:02.000Z
2021-05-22T18:45:27.000Z
flask_unchained/bundles/security/admins/role_admin.py
briancappello/flask-unchained
bff296b5c808f5b1db10f7dddb81054600545749
[ "MIT" ]
7
2018-10-12T16:20:25.000Z
2021-10-06T12:18:21.000Z
from flask_unchained.bundles.admin import ModelAdmin from flask_unchained.bundles.admin.templates import details_link, edit_link from ..models import Role class RoleAdmin(ModelAdmin): model = Role name = 'Roles' category_name = 'Security' menu_icon_value = 'fa fa-check' column_searchable_list =...
25.434783
75
0.71453
from flask_unchained.bundles.admin import ModelAdmin from flask_unchained.bundles.admin.templates import details_link, edit_link from ..models import Role class RoleAdmin(ModelAdmin): model = Role name = 'Roles' category_name = 'Security' menu_icon_value = 'fa fa-check' column_searchable_list =...
true
true
f70fdd0c46e28d30b6201db991e8334f76ba47d6
762
py
Python
image_optimizer_demo/image_optimizer_demo/urls.py
agusmakmun/django-tinypng
30fe24d2f9bd8767133ee8c0f418fd6c58fdd1be
[ "MIT" ]
17
2018-08-15T21:38:21.000Z
2021-08-17T04:31:10.000Z
image_optimizer_demo/image_optimizer_demo/urls.py
agusmakmun/django-tinypng
30fe24d2f9bd8767133ee8c0f418fd6c58fdd1be
[ "MIT" ]
6
2019-02-17T03:07:46.000Z
2022-03-29T06:35:01.000Z
image_optimizer_demo/image_optimizer_demo/urls.py
agusmakmun/django-tinypng
30fe24d2f9bd8767133ee8c0f418fd6c58fdd1be
[ "MIT" ]
9
2019-02-16T16:54:38.000Z
2022-01-14T18:29:56.000Z
"""image_optimizer_demo URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.0/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home'...
34.636364
77
0.713911
from django.contrib import admin from django.urls import path urlpatterns = [ path('admin/', admin.site.urls), ]
true
true
f70fdd11036b90d4d4b1ae1d474d715bf5351817
11,113
py
Python
3-extract-data/cablegatedata.py
paul-mathieu/cablegate-cia-analysis
89ea4570319c29df5f2b105384ff9e7eb408f2f9
[ "MIT" ]
null
null
null
3-extract-data/cablegatedata.py
paul-mathieu/cablegate-cia-analysis
89ea4570319c29df5f2b105384ff9e7eb408f2f9
[ "MIT" ]
null
null
null
3-extract-data/cablegatedata.py
paul-mathieu/cablegate-cia-analysis
89ea4570319c29df5f2b105384ff9e7eb408f2f9
[ "MIT" ]
null
null
null
countries = ["Afghanistan", "Albania", "Algeria", "Andorra", "Angola", "Antigua and Barbuda", "Argentina", "Armenia", "Australia", "Austria", "Azerbaijan", "Bahamas", "Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium", "Belize", "Benin", "Bhutan", "Bolivia", "Bosnia and Herzegovina", "B...
101.954128
120
0.454513
countries = ["Afghanistan", "Albania", "Algeria", "Andorra", "Angola", "Antigua and Barbuda", "Argentina", "Armenia", "Australia", "Austria", "Azerbaijan", "Bahamas", "Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium", "Belize", "Benin", "Bhutan", "Bolivia", "Bosnia and Herzegovina", "B...
true
true
f70fde141679c582c523cb438ef6db740de8e4b1
1,649
py
Python
0001-0050/0018-4Sum/4Sum.py
Sun-Zhen/leetcode
57fe0de95881255393e0d6817e75bfae8f5744dc
[ "Apache-2.0" ]
3
2018-04-12T05:13:52.000Z
2018-04-15T05:11:51.000Z
0001-0050/0018-4Sum/4Sum.py
Sun-Zhen/leetcode
57fe0de95881255393e0d6817e75bfae8f5744dc
[ "Apache-2.0" ]
null
null
null
0001-0050/0018-4Sum/4Sum.py
Sun-Zhen/leetcode
57fe0de95881255393e0d6817e75bfae8f5744dc
[ "Apache-2.0" ]
null
null
null
# -*- coding:utf-8 -*- """ @author: Alden @email: sunzhenhy@gmail.com @date: 2018/4/5 @version: 1.0.0.0 """ class Solution(object): def fourSum(self, nums, target): """ :type nums: List[int] :type target: int :rtype: List[List[int]] """ nums = sorted(nums) s...
34.354167
147
0.455428
""" @author: Alden @email: sunzhenhy@gmail.com @date: 2018/4/5 @version: 1.0.0.0 """ class Solution(object): def fourSum(self, nums, target): """ :type nums: List[int] :type target: int :rtype: List[List[int]] """ nums = sorted(nums) sum_dict = dict() ...
false
true
f70fdeff79e60faf504d841cb0cc6b0f273c78c8
4,314
py
Python
controller/topo.py
netx-repo/netchain-p4
b0f759e55b7d27805b2047266ecd05dd8789228b
[ "Apache-2.0" ]
8
2018-10-29T22:42:56.000Z
2021-04-27T08:40:49.000Z
controller/topo.py
netx-repo/netchain-p4
b0f759e55b7d27805b2047266ecd05dd8789228b
[ "Apache-2.0" ]
1
2020-04-07T16:16:51.000Z
2020-04-07T16:16:51.000Z
controller/topo.py
netx-repo/netchain-p4
b0f759e55b7d27805b2047266ecd05dd8789228b
[ "Apache-2.0" ]
2
2018-11-22T06:40:25.000Z
2019-03-13T13:00:47.000Z
import os, logging, sys, subprocess, argparse, time from mininet.net import Mininet from mininet.topo import Topo from mininet.log import setLogLevel, info from mininet.cli import CLI from mininet.node import CPULimitedHost from mininet.link import TCLink from p4_mininet import P4Switch, P4Host from nc_config import ...
33.703125
118
0.560037
import os, logging, sys, subprocess, argparse, time from mininet.net import Mininet from mininet.topo import Topo from mininet.log import setLogLevel, info from mininet.cli import CLI from mininet.node import CPULimitedHost from mininet.link import TCLink from p4_mininet import P4Switch, P4Host from nc_config import ...
false
true
f70fdf440a5e9d6267be85dd22467b253cd43fb7
42,685
py
Python
httpx/models.py
pereile/httpx
31730e709597baaa7b2364fee041dfa985169789
[ "BSD-3-Clause" ]
null
null
null
httpx/models.py
pereile/httpx
31730e709597baaa7b2364fee041dfa985169789
[ "BSD-3-Clause" ]
null
null
null
httpx/models.py
pereile/httpx
31730e709597baaa7b2364fee041dfa985169789
[ "BSD-3-Clause" ]
null
null
null
import cgi import datetime import email.message import json as jsonlib import typing import urllib.request from collections.abc import MutableMapping from http.cookiejar import Cookie, CookieJar from urllib.parse import parse_qsl, urlencode import chardet import rfc3986 from .config import USER_AGENT from .decoders i...
32.2882
88
0.579806
import cgi import datetime import email.message import json as jsonlib import typing import urllib.request from collections.abc import MutableMapping from http.cookiejar import Cookie, CookieJar from urllib.parse import parse_qsl, urlencode import chardet import rfc3986 from .config import USER_AGENT from .decoders i...
true
true
f70fdfa9f2c0a52362c0e1de74f04cebad41b2f6
13,269
py
Python
framework/CodeInterfaces/MAMMOTH/MAMMOTHInterface.py
milljm/raven
5f29fe81b75e2ffbeb54a55aa63647e7b2f6457b
[ "Apache-2.0" ]
null
null
null
framework/CodeInterfaces/MAMMOTH/MAMMOTHInterface.py
milljm/raven
5f29fe81b75e2ffbeb54a55aa63647e7b2f6457b
[ "Apache-2.0" ]
null
null
null
framework/CodeInterfaces/MAMMOTH/MAMMOTHInterface.py
milljm/raven
5f29fe81b75e2ffbeb54a55aa63647e7b2f6457b
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 Battelle Energy Alliance, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
52.240157
130
0.692064
from __future__ import division, print_function, unicode_literals, absolute_import import warnings warnings.simplefilter('default',DeprecationWarning) import os import copy from subprocess import Popen from CodeInterfaceBaseClass import CodeInterfaceBase from MooseBasedAppInterface import MooseBasedApp fr...
true
true
f70fe063edbc04be9bbe4375c8b98151415f3e24
514
py
Python
1. Python/1. Getting Started with Python/27.explicite_type_conversion.py
theparitoshkumar/Data-Structures-Algorithms-using-python
445b9dee56bca637f21267114cc1686d333ea4c4
[ "Apache-2.0" ]
1
2021-12-05T18:02:15.000Z
2021-12-05T18:02:15.000Z
1. Python/1. Getting Started with Python/27.explicite_type_conversion.py
theparitoshkumar/Data-Structures-Algorithms-using-python
445b9dee56bca637f21267114cc1686d333ea4c4
[ "Apache-2.0" ]
null
null
null
1. Python/1. Getting Started with Python/27.explicite_type_conversion.py
theparitoshkumar/Data-Structures-Algorithms-using-python
445b9dee56bca637f21267114cc1686d333ea4c4
[ "Apache-2.0" ]
null
null
null
#Explicit type conversion from int to float num1 = 10 num2 = 20 num3 = num1 + num2 print(num3) print(type(num3)) num4 = float(num1 + num2) print(num4) print(type(num4)) #Explicit type conversion from float to int num1 = 10.2 num2 = 20.6 num3 = (num1 + num2) print(num3) print(type(num3)) num4 = int(num1 + num2) print(n...
19.037037
44
0.727626
num1 = 10 num2 = 20 num3 = num1 + num2 print(num3) print(type(num3)) num4 = float(num1 + num2) print(num4) print(type(num4)) num1 = 10.2 num2 = 20.6 num3 = (num1 + num2) print(num3) print(type(num3)) num4 = int(num1 + num2) print(num4) print(type(num4)) priceIcecream = 25 priceBrownie = 45 totalPrice = priceIcecre...
true
true
f70fe0a01bae4cc23cfd544120436709046c362b
10,820
py
Python
backend/workers/tasks/data.py
uwer/coco-annotator
03f33aee2f1bb00c3b5f93b299f7c45dd7ab36d4
[ "MIT" ]
null
null
null
backend/workers/tasks/data.py
uwer/coco-annotator
03f33aee2f1bb00c3b5f93b299f7c45dd7ab36d4
[ "MIT" ]
null
null
null
backend/workers/tasks/data.py
uwer/coco-annotator
03f33aee2f1bb00c3b5f93b299f7c45dd7ab36d4
[ "MIT" ]
null
null
null
from database import ( fix_ids, ImageModel, CategoryModel, AnnotationModel, DatasetModel, TaskModel, ExportModel ) # import pycocotools.mask as mask import numpy as np import time import json import os from celery import shared_task from ..socket import create_socket from mongoengine impo...
32.492492
109
0.614325
from database import ( fix_ids, ImageModel, CategoryModel, AnnotationModel, DatasetModel, TaskModel, ExportModel ) import numpy as np import time import json import os from celery import shared_task from ..socket import create_socket from mongoengine import Q from config import Config fr...
true
true