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
f740db2442031b09471bd9af00e8eb99c7e91017
382
py
Python
cactus/full_node/signage_point.py
grayfallstown/cactus-blockchain
680d68d0bb7694bd4b99e4906b356e014bca7734
[ "Apache-2.0" ]
20
2021-07-16T18:08:13.000Z
2022-03-20T02:38:39.000Z
cactus/full_node/signage_point.py
grayfallstown/cactus-blockchain
680d68d0bb7694bd4b99e4906b356e014bca7734
[ "Apache-2.0" ]
29
2021-07-17T00:38:18.000Z
2022-03-29T19:11:48.000Z
cactus/full_node/signage_point.py
grayfallstown/cactus-blockchain
680d68d0bb7694bd4b99e4906b356e014bca7734
[ "Apache-2.0" ]
21
2021-07-17T02:18:57.000Z
2022-03-15T08:26:56.000Z
from dataclasses import dataclass from typing import Optional from cactus.types.blockchain_format.vdf import VDFInfo, VDFProof from cactus.util.streamable import Streamable, streamable @dataclass(frozen=True) @streamable class SignagePoint(Streamable): cc_vdf: Optional[VDFInfo] cc_proof: Optional[VDFProof] ...
25.466667
64
0.801047
from dataclasses import dataclass from typing import Optional from cactus.types.blockchain_format.vdf import VDFInfo, VDFProof from cactus.util.streamable import Streamable, streamable @dataclass(frozen=True) @streamable class SignagePoint(Streamable): cc_vdf: Optional[VDFInfo] cc_proof: Optional[VDFProof] ...
true
true
f740db9461bc2c504a31e010077bede52f850027
107
py
Python
CorePythonProg/ch02/p035.py
mallius/CppPrimer
0285fabe5934492dfed0a9cf67ba5650982a5f76
[ "MIT" ]
null
null
null
CorePythonProg/ch02/p035.py
mallius/CppPrimer
0285fabe5934492dfed0a9cf67ba5650982a5f76
[ "MIT" ]
null
null
null
CorePythonProg/ch02/p035.py
mallius/CppPrimer
0285fabe5934492dfed0a9cf67ba5650982a5f76
[ "MIT" ]
1
2022-01-25T15:51:34.000Z
2022-01-25T15:51:34.000Z
#!/usr/bin/env python import sys sys.stdout.write('Hello World!\n') print sys.platform print sys.version
15.285714
34
0.747664
import sys sys.stdout.write('Hello World!\n') print sys.platform print sys.version
false
true
f740dc306d80ceccd412592faa56a15fa47dd248
2,226
py
Python
opencv/sources/modules/objdetect/misc/python/test/test_qrcode_detect.py
vrushank-agrawal/opencv-x64-cmake
3f9486510d706c8ac579ac82f5d58f667f948124
[ "Apache-2.0" ]
null
null
null
opencv/sources/modules/objdetect/misc/python/test/test_qrcode_detect.py
vrushank-agrawal/opencv-x64-cmake
3f9486510d706c8ac579ac82f5d58f667f948124
[ "Apache-2.0" ]
null
null
null
opencv/sources/modules/objdetect/misc/python/test/test_qrcode_detect.py
vrushank-agrawal/opencv-x64-cmake
3f9486510d706c8ac579ac82f5d58f667f948124
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python ''' =============================================================================== QR code detect and decode pipeline. =============================================================================== ''' import os import numpy as np import cv2 as cv from tests_common import NewOpenCVTes...
42
98
0.61186
import os import numpy as np import cv2 as cv from tests_common import NewOpenCVTests class qrcode_detector_test(NewOpenCVTests): def test_detect(self): img = cv.imread(os.path.join(self.extraTestDataPath, 'cv/qrcode/link_ocv.jpg')) self.assertFalse(img is None) detector = cv....
true
true
f740dc335ed402ce121be83717faa206dce90513
13,309
py
Python
Deploy_Model.py
junaid340/AnomalyDetection-In-SurveillanceVideos
758cb507b8f106eb0d4366c3301ee7be355a40b3
[ "MIT" ]
5
2020-09-16T08:35:39.000Z
2022-01-27T09:22:38.000Z
Deploy_Model.py
junaid340/AnomalyDetection-In-SurveillanceVideos
758cb507b8f106eb0d4366c3301ee7be355a40b3
[ "MIT" ]
2
2021-07-27T07:08:23.000Z
2021-12-25T10:40:15.000Z
Deploy_Model.py
junaid340/AnomalyDetection-In-SurveillanceVideos
758cb507b8f106eb0d4366c3301ee7be355a40b3
[ "MIT" ]
1
2020-12-19T11:04:22.000Z
2020-12-19T11:04:22.000Z
# -*- coding: utf-8 -*- """ Created on Thu Apr 2 20:56:50 2020 @author: junaid """ import cv2 import Model_Wrapper as mp from tensorflow.keras.models import load_model from PreProcessing_V5 import Fit_Preprocessing, GlobalNormalization, ToJson from PreProcessing_V5 import ReadFileNames import numpy as np im...
39.847305
258
0.612368
import cv2 import Model_Wrapper as mp from tensorflow.keras.models import load_model from PreProcessing_V5 import Fit_Preprocessing, GlobalNormalization, ToJson from PreProcessing_V5 import ReadFileNames import numpy as np import tensorflow as tf print('\nTensorflow GPU installed: '+str(tf.test.is_built_wit...
true
true
f740dc4a4d301bd5c3281f79aab5265a2fcc2316
1,564
py
Python
setup.py
janpipek/conveiro
173b7f1cff99464e799750d84ba6583d2d226354
[ "Apache-2.0" ]
null
null
null
setup.py
janpipek/conveiro
173b7f1cff99464e799750d84ba6583d2d226354
[ "Apache-2.0" ]
null
null
null
setup.py
janpipek/conveiro
173b7f1cff99464e799750d84ba6583d2d226354
[ "Apache-2.0" ]
null
null
null
from setuptools import find_packages, setup import os import codecs from conveiro import __version__ with codecs.open(os.path.join(os.path.dirname(__file__), 'README.md'), 'r', encoding='utf-8') as f: description = f.read() setup( author='The ShowmaxLab & Showmax teams', author_email='oss+conveiro@showm...
32.583333
99
0.63491
from setuptools import find_packages, setup import os import codecs from conveiro import __version__ with codecs.open(os.path.join(os.path.dirname(__file__), 'README.md'), 'r', encoding='utf-8') as f: description = f.read() setup( author='The ShowmaxLab & Showmax teams', author_email='oss+conveiro@showm...
true
true
f740dc73930b197629a263c04d10099c9d72b0d6
1,225
py
Python
skia/tools/skp/page_sets/skia_capitalvolkswagen_mobile.py
jiangkang/renderer-dog
8081732e2b4dbdb97c8d1f5e23f9e52c6362ff85
[ "MIT" ]
null
null
null
skia/tools/skp/page_sets/skia_capitalvolkswagen_mobile.py
jiangkang/renderer-dog
8081732e2b4dbdb97c8d1f5e23f9e52c6362ff85
[ "MIT" ]
1
2020-09-13T11:08:17.000Z
2020-09-13T11:08:17.000Z
skia/tools/skp/page_sets/skia_capitalvolkswagen_mobile.py
jiangkang/renderer-dog
8081732e2b4dbdb97c8d1f5e23f9e52c6362ff85
[ "MIT" ]
null
null
null
# Copyright 2019 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # pylint: disable=W0401,W0614 from telemetry import story from telemetry.page import page as page_module from telemetry.page import shared_page_state clas...
29.878049
74
0.745306
from telemetry import story from telemetry.page import page as page_module from telemetry.page import shared_page_state class SkiaMobilePage(page_module.Page): def __init__(self, url, page_set): super(SkiaMobilePage, self).__init__( url=url, name=url, page_set=page_set, sh...
true
true
f740dd69898c5946389ea3aca0aa45d13cce9802
815
py
Python
plt.subplots2.py
shubhamtheds/charts-matplotlib
72bbcafbb5960d8af13c17b47b0379e5024a0d7d
[ "MIT" ]
null
null
null
plt.subplots2.py
shubhamtheds/charts-matplotlib
72bbcafbb5960d8af13c17b47b0379e5024a0d7d
[ "MIT" ]
null
null
null
plt.subplots2.py
shubhamtheds/charts-matplotlib
72bbcafbb5960d8af13c17b47b0379e5024a0d7d
[ "MIT" ]
null
null
null
# Create a figure and an array of axes: 2 rows, 1 column with shared y axis fig, ax = plt.subplots(2, 1, sharey=True) # Plot Seattle precipitation data in the top axes ax[0].plot(seattle_weather["MONTH"], seattle_weather["MLY-PRCP-NORMAL"], color = "b") ax[0].plot(seattle_weather["MONTH"], seattle_weather["MLY-PRCP-25...
58.214286
103
0.69816
fig, ax = plt.subplots(2, 1, sharey=True) ax[0].plot(seattle_weather["MONTH"], seattle_weather["MLY-PRCP-NORMAL"], color = "b") ax[0].plot(seattle_weather["MONTH"], seattle_weather["MLY-PRCP-25PCTL"], color = "b", linestyle = "--") ax[0].plot(seattle_weather["MONTH"], seattle_weather["MLY-PRCP-75PCTL"], color = "b",...
true
true
f740dd8b6c87603210727b82fd5935343f155abf
2,267
py
Python
test/test_train.py
giuseppefutia/PyTorch-BigGraph
8b7f1cdc4d488305624de99a9245a21432881144
[ "BSD-3-Clause" ]
null
null
null
test/test_train.py
giuseppefutia/PyTorch-BigGraph
8b7f1cdc4d488305624de99a9245a21432881144
[ "BSD-3-Clause" ]
null
null
null
test/test_train.py
giuseppefutia/PyTorch-BigGraph
8b7f1cdc4d488305624de99a9245a21432881144
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE.txt file in the root directory of this source tree. from itertools import product from unittest import TestCase, main from torchbiggraph...
34.348485
72
0.593736
from itertools import product from unittest import TestCase, main from torchbiggraph.train import IterationManager class TestIterationManager(TestCase): def test_full(self): im = IterationManager( num_epochs=2, edge_paths=["A", "B", "C"], num_edge_chunks=4) self.assertEqual(l...
true
true
f740de8c76e9af50df5dc4115805887719bc5694
2,090
py
Python
homog_gau_abc.py
utsav-akhaury/Computational-Electromagnetics-FDTD-Analysis
add2df141ba9c6414b19ac55d24c4251bbd05430
[ "MIT" ]
3
2021-06-22T10:33:08.000Z
2021-11-16T09:12:16.000Z
homog_gau_abc.py
utsav-akhaury/Computational-Electromagnetics-FDTD-Analysis
add2df141ba9c6414b19ac55d24c4251bbd05430
[ "MIT" ]
null
null
null
homog_gau_abc.py
utsav-akhaury/Computational-Electromagnetics-FDTD-Analysis
add2df141ba9c6414b19ac55d24c4251bbd05430
[ "MIT" ]
null
null
null
#------------------ Gaussian pulse propagation in a homogeneous medium terminated with Absorbing Boundary Condition (ABC) import numpy as np import matplotlib.pyplot as plt #----- Medium ---------- length = 2 eps0 = 8.854e-12 meu0 = 4*np.pi*1e-7 epsr = 1 meur = 1 eps = eps0*epsr meu = meu0*meu...
28.630137
122
0.455024
import numpy as np import matplotlib.pyplot as plt length = 2 eps0 = 8.854e-12 meu0 = 4*np.pi*1e-7 epsr = 1 meur = 1 eps = eps0*epsr meu = meu0*meur c = 3e8 v = c/np.sqrt(epsr*meur) freq = 3e9 lamda = v/freq dz = lamda/10 dt = dz/v N_cells = int(length/dz) Mid_cell = int(N_cells/...
true
true
f740df5af50c87927ee29ac4a46f9e8e06121095
1,587
py
Python
tasks/urls.py
tschelbs18/fruitful
66635cd521ffc0990275e32298419bfc2167b90b
[ "MIT" ]
null
null
null
tasks/urls.py
tschelbs18/fruitful
66635cd521ffc0990275e32298419bfc2167b90b
[ "MIT" ]
4
2020-06-04T14:20:33.000Z
2021-09-22T19:09:22.000Z
tasks/urls.py
tschelbs18/fruitful
66635cd521ffc0990275e32298419bfc2167b90b
[ "MIT" ]
null
null
null
from django.urls import path from . import views urlpatterns = [ path("", views.index, name="home"), path("register", views.register_view, name="register"), path("login", views.login_view, name="login"), path("logout", views.logout_view, name="logout"), path("error_report", views.error_view, name="error"), ...
52.9
111
0.73661
from django.urls import path from . import views urlpatterns = [ path("", views.index, name="home"), path("register", views.register_view, name="register"), path("login", views.login_view, name="login"), path("logout", views.logout_view, name="logout"), path("error_report", views.error_view, name="error"), ...
true
true
f740e0e1137cdcb52de487c72820c0e3089c36db
87
py
Python
assets/multiqc_plugins/multiqc_zymo/modules/__init__.py
laclac102/ampliseq
b3eb9e68840de925dffc956d51bf01359b4d4358
[ "MIT" ]
null
null
null
assets/multiqc_plugins/multiqc_zymo/modules/__init__.py
laclac102/ampliseq
b3eb9e68840de925dffc956d51bf01359b4d4358
[ "MIT" ]
null
null
null
assets/multiqc_plugins/multiqc_zymo/modules/__init__.py
laclac102/ampliseq
b3eb9e68840de925dffc956d51bf01359b4d4358
[ "MIT" ]
null
null
null
import os template_dir = os.path.dirname(__file__) template_fn = 'multiqc_report.html'
21.75
40
0.804598
import os template_dir = os.path.dirname(__file__) template_fn = 'multiqc_report.html'
true
true
f740e14daf60a930531566f6c63e551c6a10c997
889
py
Python
spyql/utils.py
alin23/spyql
41105b7c536ae21139d0d89cfb6b2a8b6deebf1e
[ "MIT" ]
432
2021-08-17T16:52:36.000Z
2022-03-30T15:33:26.000Z
spyql/utils.py
alin23/spyql
41105b7c536ae21139d0d89cfb6b2a8b6deebf1e
[ "MIT" ]
48
2021-07-27T17:18:05.000Z
2022-03-15T09:33:01.000Z
spyql/utils.py
alin23/spyql
41105b7c536ae21139d0d89cfb6b2a8b6deebf1e
[ "MIT" ]
16
2021-11-27T15:42:42.000Z
2022-02-16T11:36:37.000Z
import re def quote_ifstr(s): return f"'{s}'" if isinstance(s, str) else s def make_str_valid_varname(s): # remove invalid characters (except spaces in-between) s = re.sub(r"[^0-9a-zA-Z_\s]", " ", s).strip() # replace spaces by underscores (instead of dropping spaces) for readability s = re.sub...
25.4
84
0.642295
import re def quote_ifstr(s): return f"'{s}'" if isinstance(s, str) else s def make_str_valid_varname(s): s = re.sub(r"[^0-9a-zA-Z_\s]", " ", s).strip() s = re.sub(r"\s+", "_", s) if not re.match("^[a-zA-Z_]", s): s = "_" + s return s def try2eval(val, globals={}, loc...
true
true
f740e228e0b62bbe43064d535a1535d696803ad6
4,510
py
Python
avalanche/benchmarks/datasets/core50/core50.py
lebrice/avalanche
fe7e1e664ab20697343495fbe1328a20215feffb
[ "MIT" ]
1
2021-07-26T08:01:47.000Z
2021-07-26T08:01:47.000Z
avalanche/benchmarks/datasets/core50/core50.py
lebrice/avalanche
fe7e1e664ab20697343495fbe1328a20215feffb
[ "MIT" ]
null
null
null
avalanche/benchmarks/datasets/core50/core50.py
lebrice/avalanche
fe7e1e664ab20697343495fbe1328a20215feffb
[ "MIT" ]
1
2021-06-19T12:37:10.000Z
2021-06-19T12:37:10.000Z
################################################################################ # Copyright (c) 2021 ContinualAI. # # Copyrights licensed under the MIT License. # # See the accompanying LICENSE file for terms. ...
31.985816
80
0.524612
true
true
f740e258c6ddedd4d86ef898a743558536e30f67
411
py
Python
Rest_API_Beginner/wsgi.py
Moazam05/profiles-rest-api
e94b5c1c64eae08ba8853c3604d9b17ec2e8bcf3
[ "MIT" ]
null
null
null
Rest_API_Beginner/wsgi.py
Moazam05/profiles-rest-api
e94b5c1c64eae08ba8853c3604d9b17ec2e8bcf3
[ "MIT" ]
null
null
null
Rest_API_Beginner/wsgi.py
Moazam05/profiles-rest-api
e94b5c1c64eae08ba8853c3604d9b17ec2e8bcf3
[ "MIT" ]
null
null
null
""" WSGI config for Rest_API_Beginner project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.0/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJ...
24.176471
78
0.79562
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'Rest_API_Beginner.settings') application = get_wsgi_application()
true
true
f740e2608269080899f8f3837c5137340890037a
205
py
Python
src/robot_properties_solo/robot_properties_solo/__init__.py
Danfoa/robot_properties_solo
b0b9fb7025a343750b26b3c0e6d882794a4c61c1
[ "BSD-3-Clause" ]
25
2019-10-06T15:25:25.000Z
2022-01-03T20:38:45.000Z
src/robot_properties_solo/robot_properties_solo/__init__.py
Danfoa/robot_properties_solo
b0b9fb7025a343750b26b3c0e6d882794a4c61c1
[ "BSD-3-Clause" ]
23
2019-09-05T18:11:45.000Z
2022-02-11T10:04:51.000Z
src/robot_properties_solo/robot_properties_solo/__init__.py
Danfoa/robot_properties_solo
b0b9fb7025a343750b26b3c0e6d882794a4c61c1
[ "BSD-3-Clause" ]
17
2020-04-28T12:31:47.000Z
2022-02-17T22:33:36.000Z
"""__init__ License: BSD 3-Clause License Copyright (C) 2018-2019, New York University , Max Planck Gesellschaft Copyright note valid unless otherwise stated in individual files. All rights reserved. """
25.625
70
0.785366
true
true
f740e2f00e2358d6c09a7197a59a71a3b5b66924
296
py
Python
qcdb/driver/__init__.py
vivacebelles/qcdb
5bbdcb5c833277647a36bb0a5982abb56bf29b20
[ "BSD-3-Clause" ]
1
2019-02-20T20:18:02.000Z
2019-02-20T20:18:02.000Z
qcdb/driver/__init__.py
vivacebelles/qcdb
5bbdcb5c833277647a36bb0a5982abb56bf29b20
[ "BSD-3-Clause" ]
null
null
null
qcdb/driver/__init__.py
vivacebelles/qcdb
5bbdcb5c833277647a36bb0a5982abb56bf29b20
[ "BSD-3-Clause" ]
null
null
null
from .proc_table import procedures #from .driver import * from .energy import energy, properties from .gradient import gradient from .hessian import hessian, frequency from .optimize import optking, geometric #from .cbs_helpers import * #from .yaml import yaml_run #from .driver_helpers import *
29.6
40
0.804054
from .proc_table import procedures from .energy import energy, properties from .gradient import gradient from .hessian import hessian, frequency from .optimize import optking, geometric
true
true
f740e391b13769a418e4bb6b6b74e1d1678e41fd
2,944
py
Python
vas/gemfire/PendingApplicationCodes.py
appsuite/vas-python-api
c5df2b784d2d175034384eca368d78827fa8846b
[ "Apache-2.0" ]
1
2020-05-26T23:49:47.000Z
2020-05-26T23:49:47.000Z
vas/gemfire/PendingApplicationCodes.py
appsuite/vas-python-api
c5df2b784d2d175034384eca368d78827fa8846b
[ "Apache-2.0" ]
null
null
null
vas/gemfire/PendingApplicationCodes.py
appsuite/vas-python-api
c5df2b784d2d175034384eca368d78827fa8846b
[ "Apache-2.0" ]
1
2019-03-12T02:33:51.000Z
2019-03-12T02:33:51.000Z
# vFabric Administration Server API # Copyright (c) 2012 VMware, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0...
50.758621
120
0.563179
from vas.gemfire.ApplicationCode import ApplicationCode from vas.shared.Deletable import Deletable from vas.shared.MutableCollection import MutableCollection class PendingApplicationCodes(MutableCollection): def __init__(self, client, location): super(PendingApplicationCodes, self).__init_...
true
true
f740e46ebcfa2e7fa2c8b5c1c6a67768834069ea
50,990
py
Python
build/generator/gen_win_dependencies.py
markphip/subversion
b68ad49667ccd4a3fd3083c24909e6fcca4b8348
[ "Apache-2.0" ]
null
null
null
build/generator/gen_win_dependencies.py
markphip/subversion
b68ad49667ccd4a3fd3083c24909e6fcca4b8348
[ "Apache-2.0" ]
1
2016-09-14T18:22:43.000Z
2016-09-14T18:22:43.000Z
build/generator/gen_win_dependencies.py
markphip/subversion
b68ad49667ccd4a3fd3083c24909e6fcca4b8348
[ "Apache-2.0" ]
1
2020-11-04T07:25:49.000Z
2020-11-04T07:25:49.000Z
# # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may n...
34.948595
113
0.580957
import os import sys import fnmatch import re import subprocess import string if sys.version_info[0] >= 3: from io import StringIO else: try: from cStringIO import StringIO except ImportError: from StringIO import StringIO import gen_base import ezt class SVNCommonLibr...
true
true
f740e5cfaaa5bebce65b6a2af0a9f4d2f31598f7
58,473
py
Python
tensorflow/python/framework/function_test.py
LTHODAVDOPL/tensorflow
73083d29afe770870742a9d19555686886e76f6d
[ "Apache-2.0" ]
1
2018-10-28T11:12:12.000Z
2018-10-28T11:12:12.000Z
tensorflow/python/framework/function_test.py
LTHODAVDOPL/tensorflow
73083d29afe770870742a9d19555686886e76f6d
[ "Apache-2.0" ]
null
null
null
tensorflow/python/framework/function_test.py
LTHODAVDOPL/tensorflow
73083d29afe770870742a9d19555686886e76f6d
[ "Apache-2.0" ]
1
2021-05-24T06:16:56.000Z
2021-05-24T06:16: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...
31.848039
80
0.646999
from __future__ import absolute_import from __future__ import division from __future__ import print_function import re import sys import time import numpy as np from tensorflow.core.framework import function_pb2 from tensorflow.core.protobuf import config_pb2 from tensorflow.core.protobuf import rewri...
true
true
f740e5e58840bb10848c2f93a5ca4af0acf95de3
540
py
Python
wrapper.py
0rangeFox/easy-encryption
226e831d98c98a52252c485b0ef47714fa4570be
[ "MIT" ]
1
2022-02-12T04:15:24.000Z
2022-02-12T04:15:24.000Z
wrapper.py
0rangeFox/easy-encryption
226e831d98c98a52252c485b0ef47714fa4570be
[ "MIT" ]
null
null
null
wrapper.py
0rangeFox/easy-encryption
226e831d98c98a52252c485b0ef47714fa4570be
[ "MIT" ]
1
2022-02-12T04:15:25.000Z
2022-02-12T04:15:25.000Z
import subprocess def decrypt(message, key): return subprocess.check_output(['./application.out', message, key, "1"]).decode('utf8').strip() def encrypt(message, key): return subprocess.check_output(['./application.out', message, key, "0"]).decode('utf8').strip() if __name__ == '__main__': original_msg =...
33.75
99
0.675926
import subprocess def decrypt(message, key): return subprocess.check_output(['./application.out', message, key, "1"]).decode('utf8').strip() def encrypt(message, key): return subprocess.check_output(['./application.out', message, key, "0"]).decode('utf8').strip() if __name__ == '__main__': original_msg =...
true
true
f740e6f2ae1f6e95bcff7968463eebdef222c3ca
2,634
py
Python
JuliaSet/animation.py
DevelopedByET/PyFractals
ad5415cb47ddaad30e141bceb263ee0b25cf078e
[ "MIT" ]
null
null
null
JuliaSet/animation.py
DevelopedByET/PyFractals
ad5415cb47ddaad30e141bceb263ee0b25cf078e
[ "MIT" ]
null
null
null
JuliaSet/animation.py
DevelopedByET/PyFractals
ad5415cb47ddaad30e141bceb263ee0b25cf078e
[ "MIT" ]
null
null
null
# Native import os from math import * from cmath import * from time import time # Installed import cv2 as cv # Custom Modules from assets.utils import float_range from JuliaSet.core import JuliaSet class Animation: def __init__(self, range_from: float or int, range_to: float or int, range_step: f...
48.777778
190
0.625664
import os from math import * from cmath import * from time import time import cv2 as cv from assets.utils import float_range from JuliaSet.core import JuliaSet class Animation: def __init__(self, range_from: float or int, range_to: float or int, range_step: float, frames_folder: str = "out/JuliaS...
true
true
f740e7537bf56cb8d2a2220e6613977f052c84d4
2,187
py
Python
src/oci/logging/models/group_association_details.py
Manny27nyc/oci-python-sdk
de60b04e07a99826254f7255e992f41772902df7
[ "Apache-2.0", "BSD-3-Clause" ]
249
2017-09-11T22:06:05.000Z
2022-03-04T17:09:29.000Z
src/oci/logging/models/group_association_details.py
Manny27nyc/oci-python-sdk
de60b04e07a99826254f7255e992f41772902df7
[ "Apache-2.0", "BSD-3-Clause" ]
228
2017-09-11T23:07:26.000Z
2022-03-23T10:58:50.000Z
src/oci/logging/models/group_association_details.py
Manny27nyc/oci-python-sdk
de60b04e07a99826254f7255e992f41772902df7
[ "Apache-2.0", "BSD-3-Clause" ]
224
2017-09-27T07:32:43.000Z
2022-03-25T16:55:42.000Z
# coding: utf-8 # Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
30.802817
245
0.66941
from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel from oci.decorators import init_model_state_from_kwargs @init_model_state_from_kwargs class GroupAssociationDetails(object): def __init__(self, **kwargs): self.swagger_types = { 'group_list': '...
true
true
f740e77668b2a555b4dbadd3fc2bb0b7269717e7
2,651
py
Python
server/vision.py
CMDRLeon/giorgio
f0411bedb208f76d2fa869a370b7c9072ca5a412
[ "Apache-2.0" ]
509
2016-11-15T16:48:00.000Z
2022-02-24T13:57:23.000Z
server/vision.py
DalavanCloud/aiexperiments-giorgio-cam
f0411bedb208f76d2fa869a370b7c9072ca5a412
[ "Apache-2.0" ]
6
2016-12-28T00:42:19.000Z
2019-02-22T06:53:59.000Z
server/vision.py
DalavanCloud/aiexperiments-giorgio-cam
f0411bedb208f76d2fa869a370b7c9072ca5a412
[ "Apache-2.0" ]
135
2016-11-15T22:49:11.000Z
2022-03-28T15:50:21.000Z
#!/usr/bin/env python # # 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 o...
31.559524
103
0.64504
import webapp2 import urllib2 import json import base64 from google.appengine.ext import vendor vendor.add('server/lib') import re from googleapiclient import discovery from oauth2client.client import GoogleCredentials DISCOVERY_URL='https://{api}.googleapis.com/$discovery/rest?version={apiVersion...
false
true
f740e7b66648145db66b8dc5e661b1d33066d803
10,556
py
Python
google/ads/googleads/v7/services/services/detail_placement_view_service/transports/grpc.py
wxxlouisa/google-ads-python
f24137966f6bfcb765a9b1fae79f2d23041825fe
[ "Apache-2.0" ]
285
2018-10-05T16:47:58.000Z
2022-03-31T00:58:39.000Z
google/ads/googleads/v7/services/services/detail_placement_view_service/transports/grpc.py
wxxlouisa/google-ads-python
f24137966f6bfcb765a9b1fae79f2d23041825fe
[ "Apache-2.0" ]
425
2018-09-10T13:32:41.000Z
2022-03-31T14:50:05.000Z
google/ads/googleads/v7/services/services/detail_placement_view_service/transports/grpc.py
wxxlouisa/google-ads-python
f24137966f6bfcb765a9b1fae79f2d23041825fe
[ "Apache-2.0" ]
369
2018-11-28T07:01:00.000Z
2022-03-28T09:53:22.000Z
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
41.72332
105
0.625616
import warnings from typing import Callable, Dict, Optional, Sequence, Tuple from google.api_core import grpc_helpers from google.api_core import gapic_v1 from google import auth from google.auth import credentials from google.auth.transport.grpc import SslCredentials import grpc from goog...
true
true
f740e8cd0ed87ed33aa2ed3b93e06577b8990a19
1,013
py
Python
darksite/cms/test/models/test_info_panel_model.py
UNCDarkside/DarksiteAPI
a4bc1f4adee7ecfba840ad45da22513f88acbbd0
[ "MIT" ]
null
null
null
darksite/cms/test/models/test_info_panel_model.py
UNCDarkside/DarksiteAPI
a4bc1f4adee7ecfba840ad45da22513f88acbbd0
[ "MIT" ]
46
2018-12-19T06:53:37.000Z
2019-01-11T18:20:05.000Z
darksite/cms/test/models/test_info_panel_model.py
UNCDarkside/DarksiteAPI
a4bc1f4adee7ecfba840ad45da22513f88acbbd0
[ "MIT" ]
null
null
null
from cms import models def test_create_no_media(db): """ Test creating an info panel. """ models.InfoPanel.objects.create( text="The quick brown fox jumped over the lazy dog.", title="No Media" ) def test_ordering(info_panel_factory): """ Panels should be ordered by their ``order...
23.55814
78
0.655479
from cms import models def test_create_no_media(db): models.InfoPanel.objects.create( text="The quick brown fox jumped over the lazy dog.", title="No Media" ) def test_ordering(info_panel_factory): p1 = info_panel_factory(order=2) p2 = info_panel_factory(order=3) p3 = info_panel_factory(...
true
true
f740e913e06b43adf680ca078fb5256f93ca9461
1,433
py
Python
losses/classification_losses.py
visinf/deblur-devil
53cc4c72a4ddb9dcede5ee52dc53000c39ff5dab
[ "Apache-2.0" ]
18
2019-11-02T05:45:48.000Z
2021-09-12T10:03:08.000Z
losses/classification_losses.py
visinf/deblur-devil
53cc4c72a4ddb9dcede5ee52dc53000c39ff5dab
[ "Apache-2.0" ]
3
2019-12-10T07:52:24.000Z
2021-04-07T19:14:31.000Z
losses/classification_losses.py
visinf/deblur-devil
53cc4c72a4ddb9dcede5ee52dc53000c39ff5dab
[ "Apache-2.0" ]
3
2020-05-26T08:02:05.000Z
2020-09-26T21:25:10.000Z
# Author: Jochen Gast <jochen.gast@visinf.tu-darmstadt.de> import torch import torch.nn as nn from losses import factory class ClassificationLoss(nn.Module): def __init__(self, args, topk=(1, 2, 3), reduction='mean'): super().__init__() self.args = args self.cross_entropy = t...
31.844444
76
0.593859
import torch import torch.nn as nn from losses import factory class ClassificationLoss(nn.Module): def __init__(self, args, topk=(1, 2, 3), reduction='mean'): super().__init__() self.args = args self.cross_entropy = torch.nn.CrossEntropyLoss(reduction=reduction) self...
true
true
f740e9188e23989d7d8cb429eceb0134b86a65bd
194
py
Python
hallucinate/api.py
SySS-Research/hallucinate
f6dbeea0599e232707e6cf27c3fe592edba92f6f
[ "MIT" ]
199
2021-07-27T13:47:14.000Z
2022-03-05T09:18:56.000Z
hallucinate/api.py
avineshwar/hallucinate
f6dbeea0599e232707e6cf27c3fe592edba92f6f
[ "MIT" ]
1
2021-12-08T19:32:29.000Z
2021-12-08T19:32:29.000Z
hallucinate/api.py
avineshwar/hallucinate
f6dbeea0599e232707e6cf27c3fe592edba92f6f
[ "MIT" ]
13
2021-07-27T18:55:03.000Z
2021-08-09T06:15:35.000Z
class BaseHandler: def send(self, data, p): pass def recv(self, data, p): pass def shutdown(self, p, direction=2): pass def close(self): pass
13.857143
39
0.525773
class BaseHandler: def send(self, data, p): pass def recv(self, data, p): pass def shutdown(self, p, direction=2): pass def close(self): pass
true
true
f740ea68b269ffb8604d4ac5371e84be4c0343a0
7,387
py
Python
diofant/solvers/polysys.py
diofant/omg
72fd45f832240d1ded6f0a411e97bb9f7aa9f1d2
[ "BSD-3-Clause" ]
null
null
null
diofant/solvers/polysys.py
diofant/omg
72fd45f832240d1ded6f0a411e97bb9f7aa9f1d2
[ "BSD-3-Clause" ]
null
null
null
diofant/solvers/polysys.py
diofant/omg
72fd45f832240d1ded6f0a411e97bb9f7aa9f1d2
[ "BSD-3-Clause" ]
null
null
null
"""Solvers of systems of polynomial equations.""" import collections from ..core import expand_mul from ..domains import EX from ..matrices import Matrix from ..polys import (ComputationFailed, PolificationFailed, groebner, parallel_poly_from_expr) from ..polys.solvers import solve_lin_sys from ....
29.666667
81
0.569785
import collections from ..core import expand_mul from ..domains import EX from ..matrices import Matrix from ..polys import (ComputationFailed, PolificationFailed, groebner, parallel_poly_from_expr) from ..polys.solvers import solve_lin_sys from ..simplify.simplify import simplify from ..utilitie...
true
true
f740ea8839ee763a0b88c31e0182b5f1f8482e17
1,415
py
Python
pybot/plugins/api/endpoints.py
harikrishnana2021/operationcode-pybot
6e78e069c274281d50dcb71b98b9f485afb012fc
[ "MIT" ]
null
null
null
pybot/plugins/api/endpoints.py
harikrishnana2021/operationcode-pybot
6e78e069c274281d50dcb71b98b9f485afb012fc
[ "MIT" ]
null
null
null
pybot/plugins/api/endpoints.py
harikrishnana2021/operationcode-pybot
6e78e069c274281d50dcb71b98b9f485afb012fc
[ "MIT" ]
null
null
null
import asyncio import json import logging from aiohttp.web_response import Response from pybot.plugins.api.request import FailedVerification, SlackApiRequest logger = logging.getLogger(__name__) async def slack_api(request): api_plugin = request.app.plugins["api"] try: slack_request = SlackApiRequ...
26.698113
86
0.686219
import asyncio import json import logging from aiohttp.web_response import Response from pybot.plugins.api.request import FailedVerification, SlackApiRequest logger = logging.getLogger(__name__) async def slack_api(request): api_plugin = request.app.plugins["api"] try: slack_request = SlackApiRequ...
true
true
f740eaca88eb56ec04ca0a55415f0a43b3932bf4
5,560
py
Python
aleph/views/documents_api.py
gazeti/aleph
f6714c4be038471cfdc6408bfe88dc9e2ed28452
[ "MIT" ]
1
2017-07-28T12:54:09.000Z
2017-07-28T12:54:09.000Z
aleph/views/documents_api.py
gazeti/aleph
f6714c4be038471cfdc6408bfe88dc9e2ed28452
[ "MIT" ]
7
2017-08-16T12:49:23.000Z
2018-02-16T10:22:11.000Z
aleph/views/documents_api.py
gazeti/aleph
f6714c4be038471cfdc6408bfe88dc9e2ed28452
[ "MIT" ]
6
2017-07-26T12:29:53.000Z
2017-08-18T09:35:50.000Z
import logging from werkzeug.exceptions import BadRequest, NotFound from flask import Blueprint, redirect, send_file, request from apikit import jsonify, Pager, request_data from aleph.core import archive, url_for, db from aleph.model import Document, DocumentRecord, Entity, Reference from aleph.logic import update_do...
36.339869
79
0.690647
import logging from werkzeug.exceptions import BadRequest, NotFound from flask import Blueprint, redirect, send_file, request from apikit import jsonify, Pager, request_data from aleph.core import archive, url_for, db from aleph.model import Document, DocumentRecord, Entity, Reference from aleph.logic import update_do...
true
true
f740ed436ef2c2630723fe677b0528a372283095
193
py
Python
tests/urls.py
geelweb/geelweb-django-contactform
f4f83e285a77c38205b5097cc22aa1354e3b618d
[ "MIT" ]
2
2020-12-13T00:10:51.000Z
2021-03-07T10:35:08.000Z
tests/urls.py
geelweb/geelweb-django-contactform
f4f83e285a77c38205b5097cc22aa1354e3b618d
[ "MIT" ]
null
null
null
tests/urls.py
geelweb/geelweb-django-contactform
f4f83e285a77c38205b5097cc22aa1354e3b618d
[ "MIT" ]
2
2016-04-09T14:10:26.000Z
2016-10-30T00:40:53.000Z
from django.urls import include, path from . import views urlpatterns = [ path('', views.index), path('custom/', views.custom), path('contact/', include('contactform.urls')), ]
21.444444
51
0.647668
from django.urls import include, path from . import views urlpatterns = [ path('', views.index), path('custom/', views.custom), path('contact/', include('contactform.urls')), ]
true
true
f740ee10b4b1715be60825616bd8531eeee888e6
5,058
py
Python
server/onlineCAL/settings.py
ujjwal-raizada/lab-booking-system
4eed0941104d635d90ed74d31f30e2698474a9ea
[ "MIT" ]
null
null
null
server/onlineCAL/settings.py
ujjwal-raizada/lab-booking-system
4eed0941104d635d90ed74d31f30e2698474a9ea
[ "MIT" ]
5
2020-02-02T15:41:48.000Z
2020-12-15T08:43:25.000Z
server/onlineCAL/settings.py
ujjwal-raizada/lab-booking-system
4eed0941104d635d90ed74d31f30e2698474a9ea
[ "MIT" ]
5
2020-01-10T16:29:15.000Z
2022-01-07T05:30:19.000Z
""" Django settings for onlineCAL 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 ...
27.340541
91
0.696323
import os import os.path from dotenv import load_dotenv from django.contrib import messages BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) STATIC_ROOT = os.path.join(BASE_DIR, 'static') ENV_LOCATION = os.path.join(BASE_DIR, 'proj.env') if os.path.exists(ENV_LOCATION): load_dotenv(ENV_L...
true
true
f740eee90c469570104f2439b1d5521c644c5924
7,006
py
Python
Lib/test/test_compiler/test_static/decl_visitor.py
itamaro/cinder
a08198c185a255b59f85dc84183558370a0c5284
[ "CNRI-Python-GPL-Compatible" ]
null
null
null
Lib/test/test_compiler/test_static/decl_visitor.py
itamaro/cinder
a08198c185a255b59f85dc84183558370a0c5284
[ "CNRI-Python-GPL-Compatible" ]
null
null
null
Lib/test/test_compiler/test_static/decl_visitor.py
itamaro/cinder
a08198c185a255b59f85dc84183558370a0c5284
[ "CNRI-Python-GPL-Compatible" ]
null
null
null
import ast import re from compiler.static import StaticCodeGenerator from compiler.static.compiler import Compiler from compiler.static.module_table import ModuleTable from textwrap import dedent from .common import StaticTestBase, bad_ret_type class DeclarationVisitorTests(StaticTestBase): def test_cross_module...
29.686441
87
0.450614
import ast import re from compiler.static import StaticCodeGenerator from compiler.static.compiler import Compiler from compiler.static.module_table import ModuleTable from textwrap import dedent from .common import StaticTestBase, bad_ret_type class DeclarationVisitorTests(StaticTestBase): def test_cross_module...
true
true
f740efc841b24305ddc0869071927f1c8d9e6107
16,807
py
Python
edith_v0.1.py
TheForgotensoul/Edith-Virtual-Assistant
d77c37405aa59ab63acb1f7d8680582a0ef3f296
[ "MIT" ]
2
2020-07-02T11:55:58.000Z
2022-01-26T15:45:54.000Z
edith_v0.1.py
TheForgotensoul/Edith-Virtual-Assistant
d77c37405aa59ab63acb1f7d8680582a0ef3f296
[ "MIT" ]
null
null
null
edith_v0.1.py
TheForgotensoul/Edith-Virtual-Assistant
d77c37405aa59ab63acb1f7d8680582a0ef3f296
[ "MIT" ]
1
2021-04-01T18:15:41.000Z
2021-04-01T18:15:41.000Z
import pyttsx3 import datetime import time as t import smtplib import wikipedia import webbrowser as wb import os import string import wolframalpha import pyautogui import psutil import pyjokes import random from colored import fg, attr import speech_recognition as sr print(f"""{fg(226)}{attr(1)} ...
37.266075
126
0.450289
import pyttsx3 import datetime import time as t import smtplib import wikipedia import webbrowser as wb import os import string import wolframalpha import pyautogui import psutil import pyjokes import random from colored import fg, attr import speech_recognition as sr print(f"""{fg(226)}{attr(1)} ...
true
true
f740f0d695df4286edf457600cb1ea4cffda95b0
15,688
py
Python
class6/ANSIBLE/library/eos_purge.py
cdieken/python_class
7daf3600da7488baa3756ab454922824af8b711f
[ "Apache-2.0" ]
null
null
null
class6/ANSIBLE/library/eos_purge.py
cdieken/python_class
7daf3600da7488baa3756ab454922824af8b711f
[ "Apache-2.0" ]
null
null
null
class6/ANSIBLE/library/eos_purge.py
cdieken/python_class
7daf3600da7488baa3756ab454922824af8b711f
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # # Copyright (c) 2015, Arista Networks, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # Redistributions of source code must retain the above copyright notice, # t...
32.147541
86
0.624873
DOCUMENTATION = """ --- module: eos_purge short_description: Purges resources from an Arista EOS node description: - The eos_purge module will scan the current nodes running-configuration and purge resources of a specified type if the resource is not explicitly configured in th...
true
true
f740f17bf5f6b1ee0b660cbd87968c5e40a3fa1d
1,301
py
Python
examples/simple/stream_scene_camera_video.py
pupil-labs/realtime-python-api
1dc84f248cac07c30e83e6b857e779e7a30b5218
[ "MIT" ]
1
2021-12-17T09:41:38.000Z
2021-12-17T09:41:38.000Z
examples/simple/stream_scene_camera_video.py
pupil-labs/realtime-python-api
1dc84f248cac07c30e83e6b857e779e7a30b5218
[ "MIT" ]
2
2022-01-19T15:23:12.000Z
2022-01-25T09:26:54.000Z
examples/simple/stream_scene_camera_video.py
papr/realtime-api
89e6188ef097489d86218fbf5796163210ab03d6
[ "MIT" ]
null
null
null
import cv2 from pupil_labs.realtime_api.simple import discover_one_device def main(): # Look for devices. Returns as soon as it has found the first device. print("Looking for the next best device...") device = discover_one_device(max_search_duration_seconds=10) if device is None: print("No de...
25.019231
75
0.627978
import cv2 from pupil_labs.realtime_api.simple import discover_one_device def main(): print("Looking for the next best device...") device = discover_one_device(max_search_duration_seconds=10) if device is None: print("No device found.") raise SystemExit(-1) print(f"Connecting to...
true
true
f740f1a6c207e8dd2d134dcecde3d076952eba98
1,097
py
Python
bookmark/migrations/0001_initial.py
pietermarsman/startpage
8f9a2d6d0c5d78c4781019dd7491a40ea7699f2c
[ "Apache-2.0" ]
null
null
null
bookmark/migrations/0001_initial.py
pietermarsman/startpage
8f9a2d6d0c5d78c4781019dd7491a40ea7699f2c
[ "Apache-2.0" ]
24
2017-12-02T18:56:46.000Z
2018-03-31T16:56:02.000Z
bookmark/migrations/0001_initial.py
pietermarsman/startpage
8f9a2d6d0c5d78c4781019dd7491a40ea7699f2c
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.7 on 2017-12-02 19:03 from __future__ import unicode_literals import django.db.models.deletion from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.Creat...
29.648649
114
0.566089
from __future__ import unicode_literals import django.db.models.deletion from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Bookmark', fields=[ ...
true
true
f740f2ef727f4a5e7a691eea29bab538de4beda4
521
py
Python
openbook_posts/migrations/0063_auto_20191001_1302.py
TamaraAbells/okuna-api
f87d8e80d2f182c01dbce68155ded0078ee707e4
[ "MIT" ]
164
2019-07-29T17:59:06.000Z
2022-03-19T21:36:01.000Z
openbook_posts/migrations/0063_auto_20191001_1302.py
TamaraAbells/okuna-api
f87d8e80d2f182c01dbce68155ded0078ee707e4
[ "MIT" ]
188
2019-03-16T09:53:25.000Z
2019-07-25T14:57:24.000Z
openbook_posts/migrations/0063_auto_20191001_1302.py
TamaraAbells/okuna-api
f87d8e80d2f182c01dbce68155ded0078ee707e4
[ "MIT" ]
80
2019-08-03T17:49:08.000Z
2022-02-28T16:56:33.000Z
# Generated by Django 2.2.5 on 2019-10-01 11:02 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('openbook_posts', '0062_merge_20190920_1428'), ] operations = [ migrations.AlterField( model_nam...
26.05
145
0.658349
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('openbook_posts', '0062_merge_20190920_1428'), ] operations = [ migrations.AlterField( model_name='toppost', name='post', ...
true
true
f740f358508cf272368da36004bb5d30387b76e9
8,659
py
Python
mlagents/trainers/tests/test_ghost.py
kmakeev/RLs
c47e9b504db157731c26d7c881719a4fb54cc355
[ "Apache-2.0" ]
2
2020-12-01T20:46:13.000Z
2021-03-07T16:17:45.000Z
mlagents/trainers/tests/test_ghost.py
kmakeev/RLs
c47e9b504db157731c26d7c881719a4fb54cc355
[ "Apache-2.0" ]
null
null
null
mlagents/trainers/tests/test_ghost.py
kmakeev/RLs
c47e9b504db157731c26d7c881719a4fb54cc355
[ "Apache-2.0" ]
null
null
null
import pytest import numpy as np import yaml from mlagents.trainers.ghost.trainer import GhostTrainer from mlagents.trainers.ghost.controller import GhostController from mlagents.trainers.behavior_id_utils import BehaviorIdentifiers from mlagents.trainers.ppo.trainer import PPOTrainer from mlagents.trainers.brain im...
34.361111
87
0.722023
import pytest import numpy as np import yaml from mlagents.trainers.ghost.trainer import GhostTrainer from mlagents.trainers.ghost.controller import GhostController from mlagents.trainers.behavior_id_utils import BehaviorIdentifiers from mlagents.trainers.ppo.trainer import PPOTrainer from mlagents.trainers.brain im...
true
true
f740f4be54a19a8f370e3c6110f947762e6a87fe
10,687
py
Python
autotest/gcore/overviewds.py
trundev/gdal
d5777940975f2784980ef0b7561eeeb655fd0ab5
[ "MIT" ]
2
2018-03-22T22:31:00.000Z
2021-07-16T01:34:47.000Z
autotest/gcore/overviewds.py
trundev/gdal
d5777940975f2784980ef0b7561eeeb655fd0ab5
[ "MIT" ]
3
2019-02-27T00:43:06.000Z
2019-06-28T21:57:10.000Z
autotest/gcore/overviewds.py
trundev/gdal
d5777940975f2784980ef0b7561eeeb655fd0ab5
[ "MIT" ]
null
null
null
#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id$ # # Project: GDAL/OGR Test Suite # Purpose: Test GDALOverviewDataset # Author: Even Rouault <even dot rouault at spatialys.com> # #####################################################...
34.253205
113
0.599233
true
true
f740f56effb0a56f57e3cf705c3c074e7732db52
15,183
py
Python
colin-api/src/colin_api/models/business.py
bsnopek-freshworks/lear
e1c53e70b62bd3073d2e5210deb6b3658fd1b719
[ "Apache-2.0" ]
null
null
null
colin-api/src/colin_api/models/business.py
bsnopek-freshworks/lear
e1c53e70b62bd3073d2e5210deb6b3658fd1b719
[ "Apache-2.0" ]
null
null
null
colin-api/src/colin_api/models/business.py
bsnopek-freshworks/lear
e1c53e70b62bd3073d2e5210deb6b3658fd1b719
[ "Apache-2.0" ]
null
null
null
# Copyright © 2019 Province of British Columbia # # 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 agr...
44.394737
120
0.568926
from datetime import datetime from flask import current_app from colin_api.exceptions import BusinessNotFoundException from colin_api.resources.db import DB from colin_api.utils import convert_to_json_date, convert_to_json_datetime, stringify_list class Business: business = None def __init__(...
true
true
f740f77a0b62dc9cfcf9e23e582da867280ae9b6
285
py
Python
docs/manual/settings_local.py
asterisk/reviewboard
34eed26d1c2122e1b05953a40c6f4cd1e8caa70b
[ "MIT" ]
1
2018-10-14T15:12:19.000Z
2018-10-14T15:12:19.000Z
docs/manual/settings_local.py
asterisk/reviewboard
34eed26d1c2122e1b05953a40c6f4cd1e8caa70b
[ "MIT" ]
null
null
null
docs/manual/settings_local.py
asterisk/reviewboard
34eed26d1c2122e1b05953a40c6f4cd1e8caa70b
[ "MIT" ]
null
null
null
import os DATABASE_ENGINE = 'sqlite3' DATABASE_NAME = 'docs.db' SECRET_KEY = 'HASJFDYWQ98r6y2hesakjfhakjfy87eyr1hakjwfa' CACHE_BACKEND = 'locmem://' LOCAL_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), 'data')) ADMINS = [ ('Example Admin', 'admin@example.com'), ]
25.909091
77
0.736842
import os DATABASE_ENGINE = 'sqlite3' DATABASE_NAME = 'docs.db' SECRET_KEY = 'HASJFDYWQ98r6y2hesakjfhakjfy87eyr1hakjwfa' CACHE_BACKEND = 'locmem://' LOCAL_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), 'data')) ADMINS = [ ('Example Admin', 'admin@example.com'), ]
true
true
f740f77c0a4bbb3fed0fc05b3f31ce7b0b5a7425
54,659
py
Python
electrum/wallet_db.py
chuhi4Ai/electrum
cedd2baad753e7d9a96823114bdd737b8ddbaf89
[ "MIT" ]
1
2021-03-28T17:59:38.000Z
2021-03-28T17:59:38.000Z
electrum/wallet_db.py
chuhi4Ai/electrum
cedd2baad753e7d9a96823114bdd737b8ddbaf89
[ "MIT" ]
null
null
null
electrum/wallet_db.py
chuhi4Ai/electrum
cedd2baad753e7d9a96823114bdd737b8ddbaf89
[ "MIT" ]
null
null
null
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2015 Thomas Voegtlin # # 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...
40.160911
136
0.5806
import os import ast import json import copy import threading from collections import defaultdict from typing import Dict, Optional, List, Tuple, Set, Iterable, NamedTuple, Sequence, TYPE_CHECKING, Union import binascii from . import util, bitcoin from .util import profiler, WalletFileException...
true
true
f740f7d5fcd69432ac8296dd37e6f0b5888bcce2
22,168
py
Python
pyzoo/zoo/util/tf_graph_util.py
abdolence/analytics-zoo
364856abcbe9aff7f7b6cf9b9f8648d51e07ca64
[ "Apache-2.0" ]
null
null
null
pyzoo/zoo/util/tf_graph_util.py
abdolence/analytics-zoo
364856abcbe9aff7f7b6cf9b9f8648d51e07ca64
[ "Apache-2.0" ]
null
null
null
pyzoo/zoo/util/tf_graph_util.py
abdolence/analytics-zoo
364856abcbe9aff7f7b6cf9b9f8648d51e07ca64
[ "Apache-2.0" ]
null
null
null
# This file is adapted from https://github.com/tensorflow/tensorflow/blob/master # /tensorflow/python/framework/graph_util_impl.py # # Copyright 2015 The TensorFlow Authors, 2019 Analytics Zoo Authors. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file...
40.75
90
0.645751
from __future__ import absolute_import from __future__ import division from __future__ import print_function import copy import re import six from tensorflow.core.framework import attr_value_pb2 from tensorflow.core.framework import graph_pb2 from tensorflow.core.framework import node_def_pb2 from t...
true
true
f740f7e1edb9a966dbdbd060dc6c4ee70820917c
4,626
py
Python
tests/bugs/core_2729_test.py
reevespaul/firebird-qa
98f16f425aa9ab8ee63b86172f959d63a2d76f21
[ "MIT" ]
null
null
null
tests/bugs/core_2729_test.py
reevespaul/firebird-qa
98f16f425aa9ab8ee63b86172f959d63a2d76f21
[ "MIT" ]
null
null
null
tests/bugs/core_2729_test.py
reevespaul/firebird-qa
98f16f425aa9ab8ee63b86172f959d63a2d76f21
[ "MIT" ]
null
null
null
#coding:utf-8 # # id: bugs.core_2729 # title: Current connection may be used by EXECUTE STATEMENT instead of creation of new attachment # decription: # Checked on: # 4.0.0.1635 SS: 1.326s. # 4.0.0.1633 CS: 1.725s. # ...
33.766423
123
0.566364
import pytest from firebird.qa import db_factory, isql_act, Action substitutions_1 = [] init_script_1 = """""" db_1 = db_factory(sql_dialect=3, init=init_script_1) test_script_1 = """ -- Refactored 05-JAN-2016: removed dependency on recource 'test_user' because this lead to: -- UNTESTED...
true
true
f740f80ccea797f47ebe2d7da18d3157cdd0d36b
496
py
Python
data/scripts/templates/object/tangible/ship/components/booster/shared_bst_incom_intimidator_mk2.py
obi-two/GameServer
7d37024e2291a97d49522610cd8f1dbe5666afc2
[ "MIT" ]
20
2015-02-23T15:11:56.000Z
2022-03-18T20:56:48.000Z
data/scripts/templates/object/tangible/ship/components/booster/shared_bst_incom_intimidator_mk2.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
null
null
null
data/scripts/templates/object/tangible/ship/components/booster/shared_bst_incom_intimidator_mk2.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
20
2015-04-04T16:35:59.000Z
2022-03-24T14:54:37.000Z
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Tangible() result.template = "object/tangible/ship/components/booster/shared_bst_incom_intimidator_mk2.iff" resul...
29.176471
97
0.75
true
true
f740fa263ffd0fecb918bb3d728ade0807b7d999
3,188
py
Python
examples/users/users/settings.py
mazulo/django-mock-queries
ad89723e92d6e3c08e017a6147cc50498872bd86
[ "MIT" ]
235
2016-03-27T20:04:25.000Z
2022-03-23T01:39:49.000Z
examples/users/users/settings.py
mazulo/django-mock-queries
ad89723e92d6e3c08e017a6147cc50498872bd86
[ "MIT" ]
136
2016-03-30T13:10:43.000Z
2022-03-10T17:38:44.000Z
examples/users/users/settings.py
sdelements/django-mock-queries
0bab367c8a0553d1c52f2ca45cae7ead5bb24445
[ "MIT" ]
52
2016-05-30T23:00:59.000Z
2022-03-29T12:55:56.000Z
""" Django settings for users project. Generated by 'django-admin startproject' using Django 1.8.6. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Build paths ...
27.482759
73
0.694166
import os import django BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = '3sy3!6p&s&g2@t922(%@4z+(np+yc#amz0id80vyk03$x8&38$' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth', 'django.c...
true
true
f740fabb5a04d9846da0a4a5441b0105ae0fbf9f
807
py
Python
scripts/sequence_clusters/treefam/add_lengths_to_fam_file.py
mahajrod/MAVR
4db74dff7376a2ffe4426db720b241de9198f329
[ "MIT" ]
10
2015-04-28T14:15:04.000Z
2021-03-15T00:07:38.000Z
scripts/sequence_clusters/treefam/add_lengths_to_fam_file.py
mahajrod/MAVR
4db74dff7376a2ffe4426db720b241de9198f329
[ "MIT" ]
null
null
null
scripts/sequence_clusters/treefam/add_lengths_to_fam_file.py
mahajrod/MAVR
4db74dff7376a2ffe4426db720b241de9198f329
[ "MIT" ]
6
2017-03-16T22:38:41.000Z
2021-08-11T00:22:52.000Z
#!/usr/bin/env python __author__ = 'Sergei F. Kliver' import sys import argparse from RouToolPa.Routines import TreeFamRoutines parser = argparse.ArgumentParser() parser.add_argument("-i", "--fam_file", action="store", dest="fam_file", required=True, help="File with families") parser.add_argumen...
35.086957
112
0.695167
__author__ = 'Sergei F. Kliver' import sys import argparse from RouToolPa.Routines import TreeFamRoutines parser = argparse.ArgumentParser() parser.add_argument("-i", "--fam_file", action="store", dest="fam_file", required=True, help="File with families") parser.add_argument("-l", "--length_fil...
true
true
f740fb6cd3885f76396a865dabd0f14898ed8d87
3,240
py
Python
yatube/yatube/settings.py
xxxcuzme/yatube_project
d71e76ef6994e3bf11815bf6f21eca44fcaef487
[ "MIT" ]
null
null
null
yatube/yatube/settings.py
xxxcuzme/yatube_project
d71e76ef6994e3bf11815bf6f21eca44fcaef487
[ "MIT" ]
null
null
null
yatube/yatube/settings.py
xxxcuzme/yatube_project
d71e76ef6994e3bf11815bf6f21eca44fcaef487
[ "MIT" ]
null
null
null
""" Django settings for yatube project. Generated by 'django-admin startproject' using Django 2.2.19. 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 #...
25.92
91
0.698148
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) STATICFILES_DIRS = (os.path.join(BASE_DIR, 'static'),) SECRET_KEY = 'szx!&jiapx#&vo^8aw=ffsv9^+63hdzt!2)gf##751noj!tu73' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin',...
true
true
f740fc36a982c97fb094fd7080009a42d74da885
2,167
py
Python
thebookgarden/thebookgarden/views.py
ArsalanJamali/TheBookGarden
153bfa229cd897b19b9e0827acc06dbe63558174
[ "MIT" ]
null
null
null
thebookgarden/thebookgarden/views.py
ArsalanJamali/TheBookGarden
153bfa229cd897b19b9e0827acc06dbe63558174
[ "MIT" ]
null
null
null
thebookgarden/thebookgarden/views.py
ArsalanJamali/TheBookGarden
153bfa229cd897b19b9e0827acc06dbe63558174
[ "MIT" ]
null
null
null
from django.shortcuts import render from django.views.generic import TemplateView from django.utils.translation import ugettext as _ from django.core.mail import send_mail from django.contrib import messages from django.conf import settings import json from product_app.models import Book from .utils import get_new_cart...
29.684932
105
0.612829
from django.shortcuts import render from django.views.generic import TemplateView from django.utils.translation import ugettext as _ from django.core.mail import send_mail from django.contrib import messages from django.conf import settings import json from product_app.models import Book from .utils import get_new_cart...
true
true
f740fc88144601bfdf9391c6d3610da068731846
799
py
Python
web_app/tasks/tasks.py
MartykQ/flask-celery-postgres-template
808d00de77a878ac78442d2956fd54c09fe932f8
[ "MIT" ]
2
2022-02-01T08:03:53.000Z
2022-02-07T09:34:39.000Z
web_app/tasks/tasks.py
MartykQ/flask-celery-postgres-template
808d00de77a878ac78442d2956fd54c09fe932f8
[ "MIT" ]
null
null
null
web_app/tasks/tasks.py
MartykQ/flask-celery-postgres-template
808d00de77a878ac78442d2956fd54c09fe932f8
[ "MIT" ]
null
null
null
""" Definitions of tasks executed by Celery """ import logging from web_app.extensions import celery from web_app.extensions import db from web_app.models.example_table import ExampleTable from web_app.scheduled_tasks.scheduled_task import example_scheduled_task @celery.task(name="healthcheck_task") def healthcheck...
25.774194
73
0.765957
import logging from web_app.extensions import celery from web_app.extensions import db from web_app.models.example_table import ExampleTable from web_app.scheduled_tasks.scheduled_task import example_scheduled_task @celery.task(name="healthcheck_task") def healthcheck_task(): i = db.session.query(ExampleTable) ...
true
true
f740fdba9729fd19a221e6183d4f17f1bf87da07
7,745
py
Python
uliweb/form/template_layout.py
timgates42/uliweb
80c0459c5e5d257b665eb2e1d0b5f68ad55c42f1
[ "BSD-2-Clause" ]
202
2015-01-12T08:10:48.000Z
2021-11-08T09:04:32.000Z
uliweb/form/template_layout.py
timgates42/uliweb
80c0459c5e5d257b665eb2e1d0b5f68ad55c42f1
[ "BSD-2-Clause" ]
30
2015-01-01T09:07:17.000Z
2021-06-03T12:58:45.000Z
uliweb/form/template_layout.py
timgates42/uliweb
80c0459c5e5d257b665eb2e1d0b5f68ad55c42f1
[ "BSD-2-Clause" ]
58
2015-01-12T03:28:54.000Z
2022-01-14T01:58:08.000Z
from __future__ import with_statement from layout import Layout from uliweb.core import uaml from uliweb.core.html import Tag, begin_tag, end_tag, u_str class FormWriter(uaml.Writer): field_classes = { ('Text', 'Password', 'TextArea'):'type-text', ('Button', 'Submit', 'Reset'):'type-butto...
35.204545
130
0.521627
from __future__ import with_statement from layout import Layout from uliweb.core import uaml from uliweb.core.html import Tag, begin_tag, end_tag, u_str class FormWriter(uaml.Writer): field_classes = { ('Text', 'Password', 'TextArea'):'type-text', ('Button', 'Submit', 'Reset'):'type-butto...
true
true
f741003f8c1b2e34ce20886381b753ba1ddacaf1
2,597
py
Python
utils.py
uzck/tf_net_parser
5e9da1e8a317ef24c2f1577a56d6445e432b1f5d
[ "Apache-2.0" ]
null
null
null
utils.py
uzck/tf_net_parser
5e9da1e8a317ef24c2f1577a56d6445e432b1f5d
[ "Apache-2.0" ]
null
null
null
utils.py
uzck/tf_net_parser
5e9da1e8a317ef24c2f1577a56d6445e432b1f5d
[ "Apache-2.0" ]
null
null
null
import os import numpy as np import matplotlib.image as mpimg import matplotlib.pyplot as plt import cv2 import tensorflow as tf from PIL import Image def image_to_ndarray(image_path: str) -> np.ndarray: """ Args: image_path: 图片文件路径 """ pass def read_image(image_path: str): """ 读取图片 ...
27.052083
144
0.648441
import os import numpy as np import matplotlib.image as mpimg import matplotlib.pyplot as plt import cv2 import tensorflow as tf from PIL import Image def image_to_ndarray(image_path: str) -> np.ndarray: pass def read_image(image_path: str): if not os.path.exists(image_path): print('图片文件路径出错') im...
true
true
f741004276c2d3f5ad1e36378e0385939309e820
221
py
Python
Python/DataStructure/Anagram/Anagram.py
Rr1901/AlgorithmsAndDataStructure
b5606bbdc2a8e924a111e3757d02b3aeb780e053
[ "MIT" ]
195
2020-05-09T02:26:13.000Z
2022-03-30T06:12:07.000Z
Python/DataStructure/Anagram/Anagram.py
Trombokendu-dev/AlgorithmsAndDataStructure
acdef5145e53f71281e8ae353f90bda98b100063
[ "MIT" ]
31
2021-06-15T19:00:57.000Z
2022-02-02T15:51:25.000Z
Python/DataStructure/Anagram/Anagram.py
Trombokendu-dev/AlgorithmsAndDataStructure
acdef5145e53f71281e8ae353f90bda98b100063
[ "MIT" ]
64
2020-05-09T02:26:15.000Z
2022-02-23T16:02:01.000Z
# Checking if two words are anagrams or not # or without having to import anything def is_anagram(str1, str2): return sorted(str1) == sorted(str2) print(is_anagram('geek', 'eegk')) print(is_anagram('geek', 'peek'))
24.555556
43
0.714932
def is_anagram(str1, str2): return sorted(str1) == sorted(str2) print(is_anagram('geek', 'eegk')) print(is_anagram('geek', 'peek'))
true
true
f74100ac1dbd5701a96b7132c9c2e4722c5cacc3
728
py
Python
code/python_scripts/reverse.py
lukaschoebel/LUMOS
5d084e487d937957896a58ef3ab719f86074fa9a
[ "MIT" ]
null
null
null
code/python_scripts/reverse.py
lukaschoebel/LUMOS
5d084e487d937957896a58ef3ab719f86074fa9a
[ "MIT" ]
null
null
null
code/python_scripts/reverse.py
lukaschoebel/LUMOS
5d084e487d937957896a58ef3ab719f86074fa9a
[ "MIT" ]
null
null
null
import unittest def reverse(str) -> str: if len(str) < 2: return str else: result = '' for character in reversed(str): result += character return result class TestReverse(unittest.TestCase): def setUp(self): pass def test_string(self): ...
22.060606
81
0.585165
import unittest def reverse(str) -> str: if len(str) < 2: return str else: result = '' for character in reversed(str): result += character return result class TestReverse(unittest.TestCase): def setUp(self): pass def test_string(self): ...
true
true
f74100c13208dc5b8324ad662068f3d4b92f92e8
47
py
Python
09_Operator_plus/main.py
jmmedel/Python-Tutorials-
243ae9a6b51a4fce03dd90c02da13b859cbfbe5f
[ "MIT" ]
null
null
null
09_Operator_plus/main.py
jmmedel/Python-Tutorials-
243ae9a6b51a4fce03dd90c02da13b859cbfbe5f
[ "MIT" ]
null
null
null
09_Operator_plus/main.py
jmmedel/Python-Tutorials-
243ae9a6b51a4fce03dd90c02da13b859cbfbe5f
[ "MIT" ]
null
null
null
x = 1 y = 1 result = x + y print(result)
5.875
15
0.489362
x = 1 y = 1 result = x + y print(result)
true
true
f741012a7674f507f8c0ca0ca794cc81a327dc39
1,514
py
Python
controller/network_generator.py
demx8as6/network-topology-instance-generator
5dcdba9ad295de32a5a0986f6f39c36c5a4695db
[ "Apache-2.0" ]
null
null
null
controller/network_generator.py
demx8as6/network-topology-instance-generator
5dcdba9ad295de32a5a0986f6f39c36c5a4695db
[ "Apache-2.0" ]
null
null
null
controller/network_generator.py
demx8as6/network-topology-instance-generator
5dcdba9ad295de32a5a0986f6f39c36c5a4695db
[ "Apache-2.0" ]
null
null
null
# Copyright 2022 highstreet technologies GmbH # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
31.541667
75
0.712021
from model.python.tapi_common_context import TapiCommonContext class TopologyGenerator: __configuration: dict = {} def __init__(self, configuration: dict): self.__configuration = configuration def configuration(self) -> dict: return self.__configuration ...
true
true
f74102316e6c17c2a7757279b5fc73a1fd0e9e25
4,369
py
Python
qatrack/notifications/service_log_scheduling/admin.py
crcrewso/qatrackplus
b9da3bc542d9e3eca8b7291bb631d1c7255d528e
[ "MIT" ]
20
2021-03-11T18:37:32.000Z
2022-03-23T19:38:07.000Z
qatrack/notifications/service_log_scheduling/admin.py
crcrewso/qatrackplus
b9da3bc542d9e3eca8b7291bb631d1c7255d528e
[ "MIT" ]
75
2021-02-12T02:37:33.000Z
2022-03-29T20:56:16.000Z
qatrack/notifications/service_log_scheduling/admin.py
crcrewso/qatrackplus
b9da3bc542d9e3eca8b7291bb631d1c7255d528e
[ "MIT" ]
5
2021-04-07T15:46:53.000Z
2021-09-18T16:55:00.000Z
from django import forms from django.contrib import admin from django.utils.translation import gettext as _ from django.utils.translation import gettext_lazy as _l from qatrack.notifications import models from qatrack.qatrack_core.admin import BaseQATrackAdmin class ServiceEventSchedulingNoticeAdminForm(forms.ModelF...
34.401575
118
0.623255
from django import forms from django.contrib import admin from django.utils.translation import gettext as _ from django.utils.translation import gettext_lazy as _l from qatrack.notifications import models from qatrack.qatrack_core.admin import BaseQATrackAdmin class ServiceEventSchedulingNoticeAdminForm(forms.ModelF...
true
true
f74102324da513b12e04e16be5caf383e6295c80
10,335
py
Python
pennylane/circuit_drawer/tape_mpl.py
emildi/pennylane
64901ef2f920f42385b65c8da538941ff36da7be
[ "Apache-2.0" ]
1
2021-12-07T17:18:26.000Z
2021-12-07T17:18:26.000Z
pennylane/circuit_drawer/tape_mpl.py
emildi/pennylane
64901ef2f920f42385b65c8da538941ff36da7be
[ "Apache-2.0" ]
null
null
null
pennylane/circuit_drawer/tape_mpl.py
emildi/pennylane
64901ef2f920f42385b65c8da538941ff36da7be
[ "Apache-2.0" ]
1
2021-12-07T17:18:36.000Z
2021-12-07T17:18:36.000Z
# Copyright 2018-2021 Xanadu Quantum Technologies 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...
34.915541
122
0.641122
from pennylane import ops from pennylane.wires import Wires from .mpldrawer import MPLDrawer from .drawable_layers import drawable_layers from .utils import convert_wire_order pped_wires = [wire_map[w] for w in op.wires] specialfunc(drawer, layer, mapped_wires, op) else: ...
true
true
f74102928e259947f33fb24491fd27754c557cc2
476
py
Python
014-max.py
richardvecsey/python-basics
b66abef77bce2ddd6f2f39b631e1dd97a9aa2fac
[ "MIT" ]
3
2019-12-29T18:52:21.000Z
2020-02-20T09:18:08.000Z
014-max.py
richardvecsey/python-basics
b66abef77bce2ddd6f2f39b631e1dd97a9aa2fac
[ "MIT" ]
null
null
null
014-max.py
richardvecsey/python-basics
b66abef77bce2ddd6f2f39b631e1dd97a9aa2fac
[ "MIT" ]
2
2020-02-20T09:18:13.000Z
2020-06-04T04:51:44.000Z
""" Get the highest value from an iterable -------------------------------------- Input: iterable Return: highest value """ numbers = [6, 5, 2, -1, 0, 1, 2, 3, 4, 5] print('list: {}\n max: {}'.format(numbers, max(numbers))) floats = [6.0, 5.1, 2.0, -1.0, 0.5, 1.9, 2.8, 3.4, 4.6, 5.1] print('\nli...
29.75
61
0.495798
numbers = [6, 5, 2, -1, 0, 1, 2, 3, 4, 5] print('list: {}\n max: {}'.format(numbers, max(numbers))) floats = [6.0, 5.1, 2.0, -1.0, 0.5, 1.9, 2.8, 3.4, 4.6, 5.1] print('\nlist: {}\n max: {}'.format(floats, max(floats))) cars = ["Ford", "Audi", "BMW", "Chrysler", "Dodge"] print('\nlist: {}\n max: {}'.format(ca...
true
true
f74102ab2066203ee44afa3688c7f9b83ae05885
132
py
Python
standard_bisim/constants.py
SuperElephant/Bisimulation_fyp_2019
736f7e64dc9f381450c3539ec254ef23dae65c5b
[ "Apache-2.0" ]
1
2019-04-29T12:37:17.000Z
2019-04-29T12:37:17.000Z
standard_bisim/constants.py
SuperElephant/Bisimulation_fyp_2019
736f7e64dc9f381450c3539ec254ef23dae65c5b
[ "Apache-2.0" ]
7
2019-03-15T01:56:03.000Z
2022-02-10T00:06:36.000Z
standard_bisim/constants.py
SuperElephant/Bisimulation_fyp_2019
736f7e64dc9f381450c3539ec254ef23dae65c5b
[ "Apache-2.0" ]
null
null
null
# this file define all constant used in the project # visualization.py NODE_COLOR_SCHEME = "dark28" EDGE_COLOR_SCHEME = "paired12"
22
51
0.787879
NODE_COLOR_SCHEME = "dark28" EDGE_COLOR_SCHEME = "paired12"
true
true
f74102b921b1a3ec657ff99ede4ae6a62b84fd5c
21,564
py
Python
blender/addons/2.7/mira_tools/mi_curve_main.py
belzecue/mifthtools
4ac6d848ccaf118adc1a870b5bb9f9c01407baa3
[ "BSD-3-Clause" ]
730
2015-01-06T13:13:22.000Z
2022-03-30T09:47:56.000Z
blender/addons/2.7/mira_tools/mi_curve_main.py
belzecue/mifthtools
4ac6d848ccaf118adc1a870b5bb9f9c01407baa3
[ "BSD-3-Clause" ]
32
2015-02-17T03:09:58.000Z
2021-05-26T10:47:40.000Z
blender/addons/2.7/mira_tools/mi_curve_main.py
belzecue/mifthtools
4ac6d848ccaf118adc1a870b5bb9f9c01407baa3
[ "BSD-3-Clause" ]
126
2015-01-06T10:56:43.000Z
2022-03-20T13:46:48.000Z
# ***** BEGIN GPL LICENSE BLOCK ***** # # # This program 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 2 # of the License, or (at your option) any later version. # # This program is distribute...
35.006494
138
0.636709
import bpy import bgl import blf import string from bpy.props import * from bpy.types import Operator, AddonPreferences from bpy_extras import view3d_utils import math import mathutils as mathu import random from mathutils import Vector from . import mi_utils_base as ut_base ...
true
true
f74104225468f45c9407df69ec54498763326488
1,258
py
Python
backend/manage.py
dasdachs/flask-blog
d484026c1057e991a89df54d3fec20b43a507d1b
[ "MIT" ]
null
null
null
backend/manage.py
dasdachs/flask-blog
d484026c1057e991a89df54d3fec20b43a507d1b
[ "MIT" ]
null
null
null
backend/manage.py
dasdachs/flask-blog
d484026c1057e991a89df54d3fec20b43a507d1b
[ "MIT" ]
1
2020-04-08T17:48:34.000Z
2020-04-08T17:48:34.000Z
#!/usr/bin/env python3.4 import os import sys from subprocess import call from flask_script import Manager from flask_migrate import MigrateCommand from config import config from app import app_factory, db app = app_factory('development') # TODO implement env variables manager = Manager(app) # The migrate comand m...
26.208333
81
0.673291
import os import sys from subprocess import call from flask_script import Manager from flask_migrate import MigrateCommand from config import config from app import app_factory, db app = app_factory('development') manager = Manager(app) manager.add_command('db', MigrateCommand) @manager.command def test(): ...
true
true
f7410499d1122699b82ce6a7c68b6aaced6ae347
578
py
Python
lab/refactoring/replace_nested_conditional_with_guard_clauses.py
sprajjwal/spd2.3-Testing_and_Architecture
333e4e191d51eae3f8e84b2aca2f2f63731a22aa
[ "MIT" ]
null
null
null
lab/refactoring/replace_nested_conditional_with_guard_clauses.py
sprajjwal/spd2.3-Testing_and_Architecture
333e4e191d51eae3f8e84b2aca2f2f63731a22aa
[ "MIT" ]
null
null
null
lab/refactoring/replace_nested_conditional_with_guard_clauses.py
sprajjwal/spd2.3-Testing_and_Architecture
333e4e191d51eae3f8e84b2aca2f2f63731a22aa
[ "MIT" ]
null
null
null
# by Kami Bigdely # Replace nested conditional with guard clauses def extract_position(line): if line is not None and "x:" in line: start_index = line.find("x:") + 2 pos = line[start_index:] # from start_index to the end. else: pos = None return pos if __name__ == "...
28.9
85
0.640138
def extract_position(line): if line is not None and "x:" in line: start_index = line.find("x:") + 2 pos = line[start_index:] else: pos = None return pos if __name__ == "__main__": result1 = extract_position("|error| numerical calculations could not converge.") ...
true
true
f74105373cdd2d7cc2a1c4cfafa7abdd7842398a
4,119
py
Python
sunpy/tests/setup_command.py
Naman9639/sunpy
24c0cfbd9b03d7f9554bc86036fac2b78a5fcc56
[ "BSD-2-Clause" ]
null
null
null
sunpy/tests/setup_command.py
Naman9639/sunpy
24c0cfbd9b03d7f9554bc86036fac2b78a5fcc56
[ "BSD-2-Clause" ]
null
null
null
sunpy/tests/setup_command.py
Naman9639/sunpy
24c0cfbd9b03d7f9554bc86036fac2b78a5fcc56
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ This file is designed to be imported and ran only via setup.py, hence it's dependency on astropy_helpers which will be available in that context. """ import os import copy from astropy_helpers.commands.test import AstropyTest class SunPyTest(AstropyTest): description = 'Run the tests ...
38.858491
96
0.53144
import os import copy from astropy_helpers.commands.test import AstropyTest class SunPyTest(AstropyTest): description = 'Run the tests for this package' user_options = copy.copy(AstropyTest.user_options) user_options.remove(('remote-data=', 'R', 'Run tests that download remote...
true
true
f741060cc87ca9ddffdb3de329a246db1e669adf
12,088
py
Python
src/prefect/tasks/snowflake/snowflake.py
concreted/prefect
dd732f5990ee2b0f3d816adb285168fd63b239e4
[ "Apache-2.0" ]
2
2021-10-07T19:56:51.000Z
2021-11-09T10:47:01.000Z
src/prefect/tasks/snowflake/snowflake.py
concreted/prefect
dd732f5990ee2b0f3d816adb285168fd63b239e4
[ "Apache-2.0" ]
15
2021-12-18T09:11:34.000Z
2022-03-31T03:37:15.000Z
src/prefect/tasks/snowflake/snowflake.py
concreted/prefect
dd732f5990ee2b0f3d816adb285168fd63b239e4
[ "Apache-2.0" ]
1
2021-11-30T05:49:13.000Z
2021-11-30T05:49:13.000Z
from pathlib import Path import snowflake.connector as sf from snowflake.connector.cursor import SnowflakeCursor from prefect import Task from prefect.utilities.tasks import defaults_from_attrs class SnowflakeQuery(Task): """ Task for executing a query against a Snowflake database. Args: - accou...
36.519637
97
0.5886
from pathlib import Path import snowflake.connector as sf from snowflake.connector.cursor import SnowflakeCursor from prefect import Task from prefect.utilities.tasks import defaults_from_attrs class SnowflakeQuery(Task): def __init__( self, account: str = None, user: str = None, ...
true
true
f74107635e5229b83d83a4068496c8bb73f4a249
3,413
py
Python
app/app/settings.py
TxiviDavid/recipe-app-api
8c9b7402abe78bd04b65f7900914a3170266a8a1
[ "MIT" ]
null
null
null
app/app/settings.py
TxiviDavid/recipe-app-api
8c9b7402abe78bd04b65f7900914a3170266a8a1
[ "MIT" ]
null
null
null
app/app/settings.py
TxiviDavid/recipe-app-api
8c9b7402abe78bd04b65f7900914a3170266a8a1
[ "MIT" ]
null
null
null
""" Django settings for app project. Generated by 'django-admin startproject' using Django 2.1.15. For more information on this file, see https://docs.djangoproject.com/en/2.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.1/ref/settings/ """ import os # Bu...
25.281481
91
0.686786
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = 'h*a+l$fv=kzviydb68m@knh=6wh17c(e(tkdyq&fn4ht5lhrqt' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.content...
true
true
f74109dae63626a9507aa0b0c84537a357c1ae03
1,114
py
Python
client/models/status.py
onlineconvert/onlineconvert-api-sdk-python3
7541fa4cbc39dab226a2822fca3491f4ba1b6e69
[ "Apache-2.0" ]
null
null
null
client/models/status.py
onlineconvert/onlineconvert-api-sdk-python3
7541fa4cbc39dab226a2822fca3491f4ba1b6e69
[ "Apache-2.0" ]
null
null
null
client/models/status.py
onlineconvert/onlineconvert-api-sdk-python3
7541fa4cbc39dab226a2822fca3491f4ba1b6e69
[ "Apache-2.0" ]
2
2017-11-16T01:52:21.000Z
2019-05-07T22:43:43.000Z
#!/usr/bin/env python """ Copyright 2015 SmartBear Software Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by ap...
25.906977
80
0.608618
class Status: def __init__(self): self.swaggerTypes = { 'code': 'str', 'info': 'str' } self.code = None self.info = None
true
true
f7410aba28e5f187cf4008e5341018bd13f1434d
13,981
py
Python
frame_2D_alg/class_cluster.py
Kelvin-spacy/CogAlg
e0f44a8746ba33a07864505d6e2ae959859024b0
[ "MIT" ]
2
2021-05-11T00:52:38.000Z
2021-05-31T07:04:49.000Z
frame_2D_alg/class_cluster.py
Kelvin-spacy/CogAlg
e0f44a8746ba33a07864505d6e2ae959859024b0
[ "MIT" ]
null
null
null
frame_2D_alg/class_cluster.py
Kelvin-spacy/CogAlg
e0f44a8746ba33a07864505d6e2ae959859024b0
[ "MIT" ]
null
null
null
""" Provide a base class for cluster objects in CogAlg. Features: - Unique instance ids per class. - Instances are retrievable by ids via class. - Reduced memory usage compared to using dict. - Methods generated via string templates so overheads caused by differences in interfaces are mostly eliminated. - Can be extend...
37.583333
139
0.546527
import weakref from numbers import Number from inspect import isclass import numpy as np NoneType = type(None) _methods_template = ''' @property def id(self): return self._id def pack(self{pack_args}): """Pack all fields/params back into {typename}.""" {pack_assignments} def unpack(self): ...
true
true
f7410afe47b274ded292fa54e063b332cb417d51
6,989
py
Python
kinto/core/cache/testing.py
shivasheeshyadav/kinto
814c30c5dd745717b8ea50d708d9163a38d2a9ec
[ "Apache-2.0" ]
null
null
null
kinto/core/cache/testing.py
shivasheeshyadav/kinto
814c30c5dd745717b8ea50d708d9163a38d2a9ec
[ "Apache-2.0" ]
2
2019-11-06T11:45:41.000Z
2019-11-06T13:25:51.000Z
kinto/core/cache/testing.py
shivasheeshyadav/kinto
814c30c5dd745717b8ea50d708d9163a38d2a9ec
[ "Apache-2.0" ]
1
2021-02-14T05:59:37.000Z
2021-02-14T05:59:37.000Z
import time from unittest import mock import pytest from pyramid import testing from kinto.core.cache import heartbeat from kinto.core.storage import exceptions class CacheTest: backend = None settings = {} def setUp(self): super().setUp() self.cache = self.backend.load_from_config(self...
33.280952
89
0.641723
import time from unittest import mock import pytest from pyramid import testing from kinto.core.cache import heartbeat from kinto.core.storage import exceptions class CacheTest: backend = None settings = {} def setUp(self): super().setUp() self.cache = self.backend.load_from_config(self...
true
true
f7410b435039d25682a806dcb16c4cbcefc192a6
1,098
py
Python
hunkim/ml_lab_03_02.py
juvenilehex/ml2
57fa64660a87b2e432872c06414d1a86846ce380
[ "Apache-2.0" ]
33
2017-02-20T09:26:26.000Z
2021-03-17T15:15:21.000Z
hunkim/ml_lab_03_02.py
angelkim88/ml
57fa64660a87b2e432872c06414d1a86846ce380
[ "Apache-2.0" ]
null
null
null
hunkim/ml_lab_03_02.py
angelkim88/ml
57fa64660a87b2e432872c06414d1a86846ce380
[ "Apache-2.0" ]
58
2017-02-22T05:18:00.000Z
2021-06-08T08:41:17.000Z
# 참고자료 # 모두를 위한 머신러닝/딥러닝 강의 # 홍콩과기대 김성훈 # http://hunkim.github.io/ml import tensorflow as tf import matplotlib.pyplot as plt x_data = [1., 2., 3.] y_data = [1., 2., 3.] W = tf.Variable(tf.random_uniform([1], -10.0, 10.0)) X = tf.placeholder(tf.float32) Y = tf.placeholder(tf.float32) hypothesis = W * X cost = tf....
21.115385
73
0.656648
import tensorflow as tf import matplotlib.pyplot as plt x_data = [1., 2., 3.] y_data = [1., 2., 3.] W = tf.Variable(tf.random_uniform([1], -10.0, 10.0)) X = tf.placeholder(tf.float32) Y = tf.placeholder(tf.float32) hypothesis = W * X cost = tf.reduce_mean(tf.square(hypothesis - Y)) decent = W - tf.multiply...
true
true
f7410d46ea71ecd1d63b93f154cbb03e00be759a
1,487
py
Python
algorithms/bfs/maze_search.py
Heart-throb-Rajnish/algorithms
bc0b1d33aad8e07bc6f35c54d1b5ace01ea92a9e
[ "MIT" ]
22,426
2017-01-17T04:01:44.000Z
2022-03-31T12:06:16.000Z
algorithms/bfs/maze_search.py
khiemtran99/algorithms
e498d4e01619b85cd4db0b150e24508946ac32d7
[ "MIT" ]
523
2017-04-18T12:05:11.000Z
2022-03-20T11:10:41.000Z
algorithms/bfs/maze_search.py
khiemtran99/algorithms
e498d4e01619b85cd4db0b150e24508946ac32d7
[ "MIT" ]
4,900
2017-01-19T23:47:05.000Z
2022-03-31T10:00:47.000Z
from collections import deque ''' BFS time complexity : O(|E| + |V|) BFS space complexity : O(|E| + |V|) do BFS from (0,0) of the grid and get the minimum number of steps needed to get to the lower right column only step on the columns whose value is 1 if there is no path, it returns -1 Ex 1) If grid is [[1,0,1,1,...
21.867647
105
0.563551
from collections import deque def maze_search(maze): BLOCKED, ALLOWED = 0, 1 UNVISITED, VISITED = 0, 1 initial_x, initial_y = 0, 0 if maze[initial_x][initial_y] == BLOCKED: return -1 directions = [(0, -1), (0, 1), (-1, 0), (1, 0)] height, width = len(maze), len(maze[0]) ta...
true
true
f7410e81e0c4cbdf1ebe3997b9e1b1ee24151644
9,737
py
Python
lmctl/project/source/core.py
manojn97/lmctl
844925cb414722351efac90cb97f10c1185eef7a
[ "Apache-2.0" ]
3
2021-07-19T09:46:01.000Z
2022-03-07T13:51:25.000Z
lmctl/project/source/core.py
manojn97/lmctl
844925cb414722351efac90cb97f10c1185eef7a
[ "Apache-2.0" ]
43
2019-08-27T12:36:29.000Z
2020-08-27T14:50:40.000Z
lmctl/project/source/core.py
manojn97/lmctl
844925cb414722351efac90cb97f10c1185eef7a
[ "Apache-2.0" ]
7
2020-09-22T20:32:17.000Z
2022-03-29T12:25:51.000Z
import os import lmctl.files as files import yaml import lmctl.utils.descriptors as descriptor_utils import lmctl.project.source.config as project_configs import lmctl.project.journal as project_journal import lmctl.project.processes.validation as validation_exec import lmctl.project.processes.staging as stage_exec imp...
34.651246
191
0.689124
import os import lmctl.files as files import yaml import lmctl.utils.descriptors as descriptor_utils import lmctl.project.source.config as project_configs import lmctl.project.journal as project_journal import lmctl.project.processes.validation as validation_exec import lmctl.project.processes.staging as stage_exec imp...
true
true
f7410e91ed3a5be19acb4e96a3fa17dc762263c6
4,325
py
Python
distributed/mondrian/anonymization.py
stegianna/mondrian
2a96fdd68c1addfb5e153869e759fd8a3d8c4be3
[ "Apache-2.0" ]
10
2020-12-02T17:41:21.000Z
2022-01-18T15:40:54.000Z
distributed/mondrian/anonymization.py
stegianna/mondrian
2a96fdd68c1addfb5e153869e759fd8a3d8c4be3
[ "Apache-2.0" ]
null
null
null
distributed/mondrian/anonymization.py
stegianna/mondrian
2a96fdd68c1addfb5e153869e759fd8a3d8c4be3
[ "Apache-2.0" ]
3
2021-04-08T16:12:01.000Z
2022-03-10T11:45:39.000Z
# Copyright 2020 Unibg Seclab (https://seclab.unibg.it) # # 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 l...
37.284483
76
0.590289
import generalization as gnrlz from mondrian import partition_dataframe from validation import get_validation_function def join_column(ser, dtype, generalization=None): values = ser.unique() if len(values) == 1: return str(values[0]) try: if not generalization: ...
true
true
f7410f396056cc1b11a98ac616a4ffbb328e2886
2,932
py
Python
World-Wide-Covid19/automate_us_predictions.py
T-Cube-AI/Time-dependent-SEIRD-Model-API
6de58cba219ae35f3aeca50671373171d97a688e
[ "MIT" ]
null
null
null
World-Wide-Covid19/automate_us_predictions.py
T-Cube-AI/Time-dependent-SEIRD-Model-API
6de58cba219ae35f3aeca50671373171d97a688e
[ "MIT" ]
null
null
null
World-Wide-Covid19/automate_us_predictions.py
T-Cube-AI/Time-dependent-SEIRD-Model-API
6de58cba219ae35f3aeca50671373171d97a688e
[ "MIT" ]
null
null
null
#!/usr/bin/python3 from US_Model import SEIRD import re import json DATASETS_DIR = "./Datasets/US" PREDICTIONS_DIR = "./Predictions/US" INSIGHTS_DIR = "./Insights/US" usStatesPopulationFile = "./US-population.json" usStatesPopulation = json.load(open(usStatesPopulationFile)) stateToHeatFactorsMap = dict() usHeatFact...
27.660377
96
0.664052
from US_Model import SEIRD import re import json DATASETS_DIR = "./Datasets/US" PREDICTIONS_DIR = "./Predictions/US" INSIGHTS_DIR = "./Insights/US" usStatesPopulationFile = "./US-population.json" usStatesPopulation = json.load(open(usStatesPopulationFile)) stateToHeatFactorsMap = dict() usHeatFactorsFile = "./us_he...
true
true
f741107b3aaadf428cf75dcd861ba833921faa15
35
py
Python
python/Lib/test/test_import/data/circular_imports/from_cycle2.py
jasam/ciclo_vida_datos_scraping
3f7cffc944a0a0752a502dc7868cf43c4144f16c
[ "MIT" ]
1
2020-10-25T16:33:22.000Z
2020-10-25T16:33:22.000Z
python/Lib/test/test_import/data/circular_imports/from_cycle2.py
jasam/ciclo_vida_datos_scraping
3f7cffc944a0a0752a502dc7868cf43c4144f16c
[ "MIT" ]
1
2021-02-03T01:56:56.000Z
2021-02-03T01:56:56.000Z
python/Lib/test/test_import/data/circular_imports/from_cycle2.py
jasam/ciclo_vida_datos_scraping
3f7cffc944a0a0752a502dc7868cf43c4144f16c
[ "MIT" ]
1
2022-01-11T18:31:05.000Z
2022-01-11T18:31:05.000Z
from .from_cycle1 import b a = 1
11.666667
27
0.685714
from .from_cycle1 import b a = 1
true
true
f74110cbe6c0e76b09149fbe9d79dfd462f9a7ad
12,252
py
Python
apdcam_control/apdcam10g_channel_map.py
fusion-flap/flap_apdcam
fce208414044fb288328090ba697e8e2482e1c75
[ "MIT" ]
1
2019-09-16T11:45:37.000Z
2019-09-16T11:45:37.000Z
apdcam_control/apdcam10g_channel_map.py
fusion-flap/flap_apdcam
fce208414044fb288328090ba697e8e2482e1c75
[ "MIT" ]
1
2019-06-04T13:09:19.000Z
2019-06-05T08:26:31.000Z
apdcam_control/apdcam10g_channel_map.py
fusion-flap/flap_apdcam
fce208414044fb288328090ba697e8e2482e1c75
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Sun Feb 27 12:51:00 2022 @author: Zoletnik """ import numpy as np def apdcam10g_channel_map(camera_type=None,camera_version=1): """ Returns a 2D matrix with the ADC channel numbers as one looks onto the detector. Parameters ---------- camera_type : string ...
44.552727
119
0.328273
import numpy as np def apdcam10g_channel_map(camera_type=None,camera_version=1): if (camera_type == "4x32"): channel_map = np.ndarray((32,4),int) if (camera_version == 0): chmap = np.array([[ 20, 90, 75, 76], [ 18, 92, 1, 2], ...
true
true
f7411131d55a8cd69c027d53eeffdf57e2f2588d
870
py
Python
celerite/__init__.py
sczesla/celerite
ec6c5e39267c07df4aacd3ced70d3af24634e08c
[ "MIT" ]
null
null
null
celerite/__init__.py
sczesla/celerite
ec6c5e39267c07df4aacd3ced70d3af24634e08c
[ "MIT" ]
null
null
null
celerite/__init__.py
sczesla/celerite
ec6c5e39267c07df4aacd3ced70d3af24634e08c
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- __version__ = "0.3.0" __bibtex__ = """ @article{celerite, author = {{Foreman-Mackey}, D. and {Agol}, E. and {Angus}, R. and {Ambikasaran}, S.}, title = {Fast and scalable Gaussian process modeling with applications to astronomical time series}, year = ...
25.588235
69
0.614943
__version__ = "0.3.0" __bibtex__ = """ @article{celerite, author = {{Foreman-Mackey}, D. and {Agol}, E. and {Angus}, R. and {Ambikasaran}, S.}, title = {Fast and scalable Gaussian process modeling with applications to astronomical time series}, year = {2017}, journal = {A...
true
true
f741118e107455b149208868f1c8c79c3b3cbd9f
4,999
py
Python
neupre/cli.py
horvathpeter/neural_prediction
df053ebe60a1837f95532329201d4b95b8b8ffa3
[ "Apache-2.0" ]
null
null
null
neupre/cli.py
horvathpeter/neural_prediction
df053ebe60a1837f95532329201d4b95b8b8ffa3
[ "Apache-2.0" ]
null
null
null
neupre/cli.py
horvathpeter/neural_prediction
df053ebe60a1837f95532329201d4b95b8b8ffa3
[ "Apache-2.0" ]
null
null
null
""" neupre Usage: neupre staticmlp [--onestep --multistep --onestep96] [-f FILE] neupre staticrecurrent [--onestep --multistep --onestep96] [-f FILE] neupre onlinemlp --simsteps=<steps> [--buffsize=<days>] [-f FILE] neupre onlinerecurrent --simsteps=<steps> [--buffsize=<days>] [-f FILE] neupre -h | --help ...
32.888158
115
0.625725
from inspect import getmembers, isclass from docopt import docopt from . import __version__ as VERSION def main(): import instructions options = docopt(__doc__, version=VERSION) # with a pre-defined command class we've already created. for k, v in options.iteritems(): if hasattr(i...
true
true
f7411193c9e74da9972af45d8cd83b30e71b72c3
1,071
py
Python
scripts/genSplitPDBlists.py
demattox/lec_gly_binding
44a12445d3ed89029a21bed1c516a67bd86e0c68
[ "MIT" ]
null
null
null
scripts/genSplitPDBlists.py
demattox/lec_gly_binding
44a12445d3ed89029a21bed1c516a67bd86e0c68
[ "MIT" ]
null
null
null
scripts/genSplitPDBlists.py
demattox/lec_gly_binding
44a12445d3ed89029a21bed1c516a67bd86e0c68
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sat Aug 1 16:23:55 2020 @author: dmattox """ import os import dill import lec_gly as LecGly from bSiteResiFeatures import plipFile os.chdir(LecGly.homeDir) ########################## outDir = './data/structures/bsites/batchLists/' if not os.path.exists...
24.340909
136
0.61718
import os import dill import lec_gly as LecGly from bSiteResiFeatures import plipFile os.chdir(LecGly.homeDir)
true
true
f741121ea236150036c8713e6b64b057ec7cc89e
22,829
py
Python
tests/rest/admin/test_media.py
bradtgmurray/synapse
f42e4c4eb9b5b84bd1da80a4f3938c1c06305364
[ "Apache-2.0" ]
null
null
null
tests/rest/admin/test_media.py
bradtgmurray/synapse
f42e4c4eb9b5b84bd1da80a4f3938c1c06305364
[ "Apache-2.0" ]
null
null
null
tests/rest/admin/test_media.py
bradtgmurray/synapse
f42e4c4eb9b5b84bd1da80a4f3938c1c06305364
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Dirk Klimpel # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
34.381024
90
0.613562
import json import os from binascii import unhexlify from parameterized import parameterized import synapse.rest.admin from synapse.api.errors import Codes from synapse.rest.client.v1 import login, profile, room from synapse.rest.media.v1.filepath import MediaFilePaths from tests import unittest from t...
true
true
f7411321056f532b191b2b636447955a8298bf76
3,945
py
Python
reckon/client_test.py
Cjen1/Resolving-Consensus
04c4c0eb3aac9a6bab61d9172f40cc235be44a18
[ "MIT" ]
4
2020-10-29T10:33:57.000Z
2020-11-07T11:44:00.000Z
reckon/client_test.py
Cjen1/Resolving-Consensus
04c4c0eb3aac9a6bab61d9172f40cc235be44a18
[ "MIT" ]
8
2020-10-29T10:35:09.000Z
2020-12-16T14:07:15.000Z
reckon/client_test.py
Cjen1/Resolving-Consensus
04c4c0eb3aac9a6bab61d9172f40cc235be44a18
[ "MIT" ]
1
2020-10-30T22:06:04.000Z
2020-10-30T22:06:04.000Z
from typing import cast, IO, Tuple, List, Any, Union from threading import Thread import shlex import subprocess as sp import reckon.reckon_types as t import reckon.client_runner as cr def spawn(command: List[str]) -> Tuple[t.Client, sp.Popen[bytes]]: p = sp.Popen(command, stdin=sp.PIPE, stdout=sp.PIPE, stderr=...
29.007353
88
0.577947
from typing import cast, IO, Tuple, List, Any, Union from threading import Thread import shlex import subprocess as sp import reckon.reckon_types as t import reckon.client_runner as cr def spawn(command: List[str]) -> Tuple[t.Client, sp.Popen[bytes]]: p = sp.Popen(command, stdin=sp.PIPE, stdout=sp.PIPE, stderr=...
true
true
f74114abdf7cd2b8e5f585c8b679aa0828971a3d
3,716
py
Python
api/transports/http_production.py
djzelenak/espa-api
ebf347a4dd58008e3e9c368cf6086925e3bf12b7
[ "Unlicense" ]
null
null
null
api/transports/http_production.py
djzelenak/espa-api
ebf347a4dd58008e3e9c368cf6086925e3bf12b7
[ "Unlicense" ]
null
null
null
api/transports/http_production.py
djzelenak/espa-api
ebf347a4dd58008e3e9c368cf6086925e3bf12b7
[ "Unlicense" ]
null
null
null
from flask import request, make_response, jsonify from flask_restful import Resource from api.interfaces.production.version1 import API as APIv1 from api.domain import production_api_operations, default_error_message espa = APIv1() def whitelist(func): """ Provide a decorator to enact a white filter on an e...
30.459016
93
0.639935
from flask import request, make_response, jsonify from flask_restful import Resource from api.interfaces.production.version1 import API as APIv1 from api.domain import production_api_operations, default_error_message espa = APIv1() def whitelist(func): def decorated(*args, **kwargs): white_ls = espa.get...
true
true
f74114babff999e00ae5dde173a0c41ebb1d8e48
1,898
py
Python
pset6/ps6_recursion.py
ankgitk/6.001-pset-answers
4b5a51de2983e549ac6150b72db45b7bc2e88459
[ "MIT" ]
null
null
null
pset6/ps6_recursion.py
ankgitk/6.001-pset-answers
4b5a51de2983e549ac6150b72db45b7bc2e88459
[ "MIT" ]
null
null
null
pset6/ps6_recursion.py
ankgitk/6.001-pset-answers
4b5a51de2983e549ac6150b72db45b7bc2e88459
[ "MIT" ]
null
null
null
# 6.00x Problem Set 6 # # Part 2 - RECURSION # # Problem 3: Recursive String Reversal # def reverseString(aStr): """ Given a string, recursively returns a reversed copy of the string. For example, if the string is 'abc', the function returns 'cba'. The only string operations you are allowed to use are ...
26.361111
78
0.631191
def reverseString(aStr): if len(aStr) == 0: return '' return aStr[-1] + reverseString(aStr[0:-1]) def x_ian(x, word): # in word if len(x) == 0: return True # check if the next character can be found in rest of string pos_x_i = word.find(x[0]) if pos_...
true
true
f74114dbbf8f3cfe8d96934a1c757123dc30d02f
2,694
py
Python
Python/network/server_basic/example02_query.py
sug5806/TIL
2309d8a270e4a7b8961268a40b6492c5db317e37
[ "MIT" ]
null
null
null
Python/network/server_basic/example02_query.py
sug5806/TIL
2309d8a270e4a7b8961268a40b6492c5db317e37
[ "MIT" ]
102
2020-02-12T00:10:33.000Z
2022-03-11T23:58:41.000Z
Python/network/server_basic/example02_query.py
sug5806/TIL
2309d8a270e4a7b8961268a40b6492c5db317e37
[ "MIT" ]
null
null
null
from http.server import BaseHTTPRequestHandler, HTTPServer from urllib.parse import parse_qs, urlparse # 1. 코드를 보낸다 # 2. 코드를 읽는다 # 3. 분리한다 PORT = 8080 class Handler(BaseHTTPRequestHandler): # do_GET과 do_POST라는 이름은 바꾸면 안되며 고정이다 # 과제 # do_GET : 검색창 만들기 # do_POST : 검색 결과 보여주기 - 네이버에서 크롤링 def do_GE...
28.967742
72
0.569042
from http.server import BaseHTTPRequestHandler, HTTPServer from urllib.parse import parse_qs, urlparse PORT = 8080 class Handler(BaseHTTPRequestHandler): def do_GET(self): self.send_response(200) self.send_header('Content-type', 'text/html') self.end_headers() ...
true
true
f74114f938752f08d1ebc0f7f2abe12ee5e060bd
6,838
py
Python
scripts/evaluate.py
RulerOf/keras-yolo3
8d091cf42b2f126626ad8610adf31293225b7daa
[ "MIT" ]
37
2018-10-20T15:50:18.000Z
2021-06-18T14:31:50.000Z
scripts/evaluate.py
RulerOf/keras-yolo3
8d091cf42b2f126626ad8610adf31293225b7daa
[ "MIT" ]
34
2019-04-10T18:59:08.000Z
2021-03-24T11:08:36.000Z
scripts/evaluate.py
RulerOf/keras-yolo3
8d091cf42b2f126626ad8610adf31293225b7daa
[ "MIT" ]
13
2019-08-29T08:19:05.000Z
2021-09-20T10:13:31.000Z
""" Evaluation of predictions againsts given dataset (in TXT format the same as training). We expect that the predictions are in single folder and image names in dataset are the same python evaluate.py \ --path_dataset ../model_data/VOC_2007_train.txt \ --path_results ../results \ --confide...
40.223529
96
0.676221
import os import sys import argparse import logging from functools import partial from pathos.multiprocessing import ProcessPool import tqdm import pandas as pd sys.path += [os.path.abspath('.'), os.path.abspath('..')] from keras_yolo3.utils import check_params_path, nb_workers, image_open, update_path from keras_yo...
true
true
f74115099600e0d065030f72e87f6d658038e8ac
4,751
py
Python
contre/training.py
b2-hive/CONTRE
9176861400fcc5887d8a8944ee2c636ba09aa239
[ "MIT" ]
2
2020-06-16T13:53:46.000Z
2020-09-22T13:01:59.000Z
contre/training.py
b2-hive/CONTRE
9176861400fcc5887d8a8944ee2c636ba09aa239
[ "MIT" ]
2
2020-09-24T17:41:24.000Z
2020-11-03T16:51:45.000Z
contre/training.py
b2-hive/CONTRE
9176861400fcc5887d8a8944ee2c636ba09aa239
[ "MIT" ]
null
null
null
import root_pandas import basf2_mva import b2luigi import pandas as pd from sklearn.model_selection import train_test_split def split_sample( ntuple_file, train_size, test_size, random_seed=42): """Split rootfile and return dataframes. Select 0th candidate.""" df = root_pandas....
36.546154
79
0.661124
import root_pandas import basf2_mva import b2luigi import pandas as pd from sklearn.model_selection import train_test_split def split_sample( ntuple_file, train_size, test_size, random_seed=42): df = root_pandas.read_root(ntuple_file) try: train, test = train_test_split...
true
true
f741152e6797e6002dfe7c594d414c7dbc12b223
9,861
py
Python
MusicTager/ui/ui_source/ModifyDialog.py
Mai-icy/MusicTagger
210388f1830f8268717d892cc6ec318df1b731cf
[ "MIT" ]
3
2021-12-07T05:28:46.000Z
2022-03-10T04:26:42.000Z
MusicTager/ui/ui_source/ModifyDialog.py
Mai-icy/MusicTagger
210388f1830f8268717d892cc6ec318df1b731cf
[ "MIT" ]
null
null
null
MusicTager/ui/ui_source/ModifyDialog.py
Mai-icy/MusicTagger
210388f1830f8268717d892cc6ec318df1b731cf
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'ModifyDialogUI.ui' # # Created by: PyQt5 UI code generator 5.15.4 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. from PyQt5 import QtCor...
48.816832
115
0.708245
from PyQt5 import QtCore, QtGui, QtWidgets class Ui_ModifyDialog(object): def setupUi(self, ModifyDialog): ModifyDialog.setObjectName("ModifyDialog") ModifyDialog.resize(400, 300) font = QtGui.QFont() font.setFamily("微软雅黑") font.setPointSize(13) ModifyDial...
true
true
f741159a6f36d3ad590fd90dd24eafb61ab5af03
23,082
py
Python
ForgeUserStats/forgeuserstats/tests/test_model.py
lym/allura-git
b2b53d0c1ba8b1e48f176ad75cf64675b3545d69
[ "Apache-2.0" ]
1
2017-07-31T23:13:58.000Z
2017-07-31T23:13:58.000Z
ForgeUserStats/forgeuserstats/tests/test_model.py
lym/allura-git
b2b53d0c1ba8b1e48f176ad75cf64675b3545d69
[ "Apache-2.0" ]
null
null
null
ForgeUserStats/forgeuserstats/tests/test_model.py
lym/allura-git
b2b53d0c1ba8b1e48f176ad75cf64675b3545d69
[ "Apache-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (t...
47.493827
96
0.647648
import pkg_resources import unittest from datetime import datetime, timedelta from pylons import tmpl_context as c from tg import config import mock from alluratest.controller import setup_basic_test, setup_global_objects, setup_trove_categories from allura.tests import decorators as td from allura.m...
false
true
f741161985eae5e503974310987839f338a7b267
285
py
Python
mapa_de_obras/pipelines.py
alesservin/Datos-Abiertos---Obras-del-MOPC
9a9f27f70afa3e65c613de16e4d50ef3f25dbab3
[ "CC0-1.0" ]
null
null
null
mapa_de_obras/pipelines.py
alesservin/Datos-Abiertos---Obras-del-MOPC
9a9f27f70afa3e65c613de16e4d50ef3f25dbab3
[ "CC0-1.0" ]
null
null
null
mapa_de_obras/pipelines.py
alesservin/Datos-Abiertos---Obras-del-MOPC
9a9f27f70afa3e65c613de16e4d50ef3f25dbab3
[ "CC0-1.0" ]
null
null
null
# -*- coding: utf-8 -*- # Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: https://docs.scrapy.org/en/latest/topics/item-pipeline.html class MapaDeObrasPipeline: def process_item(self, item, spider): return item
23.75
66
0.715789
# See: https://docs.scrapy.org/en/latest/topics/item-pipeline.html class MapaDeObrasPipeline: def process_item(self, item, spider): return item
true
true
f741164fdc28f80f6d27571f50e67665926e3cf0
5,953
py
Python
Lv3_presto_candidates.py
masonng-astro/nicerpy_xrayanalysis
c21c7c9bc5570c63c986197fb363ae80691515d5
[ "MIT" ]
3
2020-01-13T20:13:14.000Z
2021-06-03T21:58:08.000Z
Lv3_presto_candidates.py
masonng-astro/nicerpy_xrayanalysis
c21c7c9bc5570c63c986197fb363ae80691515d5
[ "MIT" ]
null
null
null
Lv3_presto_candidates.py
masonng-astro/nicerpy_xrayanalysis
c21c7c9bc5570c63c986197fb363ae80691515d5
[ "MIT" ]
2
2020-01-15T15:08:40.000Z
2021-07-09T11:49:30.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Created on Fri Jul 5 1:28pm 2019 Script to automate getting pulsation candidates of a certain frequency range, and reporting other germane information? """ from __future__ import division, print_function import numpy as np from scipy import stats, signal from tqdm imp...
66.88764
335
0.632622
from __future__ import division, print_function import numpy as np from scipy import stats, signal from tqdm import tqdm import matplotlib.pyplot as plt from astropy.io import fits import glob import Lv0_dirs Lv0_dirs.global_par() def get_candidates(obsid,name_par_list,zmax,f1,f2): if type(obsid) != str: ...
true
true
f74117b9e6a4af129b4a8a8bb3aa89e905a96a35
3,324
py
Python
Python-Programs/Sorting Algorithms/insertionSort.py
naschwin/Simple-Programs
a06e62b7280890cc8e3b9d2dfac9b7fd90706af3
[ "MIT" ]
null
null
null
Python-Programs/Sorting Algorithms/insertionSort.py
naschwin/Simple-Programs
a06e62b7280890cc8e3b9d2dfac9b7fd90706af3
[ "MIT" ]
null
null
null
Python-Programs/Sorting Algorithms/insertionSort.py
naschwin/Simple-Programs
a06e62b7280890cc8e3b9d2dfac9b7fd90706af3
[ "MIT" ]
1
2021-10-09T09:51:22.000Z
2021-10-09T09:51:22.000Z
import pygame, sys, random WIDTH = 720 HEIGHT = 400 pygame.init() win = pygame.display.set_mode((WIDTH, HEIGHT)) pygame.display.set_caption('Insertion Sort') clock = pygame.time.Clock() # Bar Width n = 4 w = int(WIDTH/n) h_arr = [] def maps(num, in_min, in_max, out_min, out_max): return (num ...
13.85
116
0.453369
import pygame, sys, random WIDTH = 720 HEIGHT = 400 pygame.init() win = pygame.display.set_mode((WIDTH, HEIGHT)) pygame.display.set_caption('Insertion Sort') clock = pygame.time.Clock() n = 4 w = int(WIDTH/n) h_arr = [] def maps(num, in_min, in_max, out_min, out_max): return (num - in_min) * ...
true
true
f741180bc6158400c5aecb7b29dc929f1525de84
1,879
py
Python
leet code/014-Validate Binary Search Tree.py
boisde/Greed_Island
9c4f0195fb7bfaeb6c29e8e9638c7b0ffd9ad90b
[ "MIT" ]
null
null
null
leet code/014-Validate Binary Search Tree.py
boisde/Greed_Island
9c4f0195fb7bfaeb6c29e8e9638c7b0ffd9ad90b
[ "MIT" ]
null
null
null
leet code/014-Validate Binary Search Tree.py
boisde/Greed_Island
9c4f0195fb7bfaeb6c29e8e9638c7b0ffd9ad90b
[ "MIT" ]
2
2016-09-10T08:13:06.000Z
2021-05-12T18:57:05.000Z
""" Given a binary tree, determine if it is a valid binary search tree (BST). Assume a BST is defined as follows: The left subtree of a node contains only nodes with keys less than the node's key. The right subtree of a node contains only nodes with keys greater than the node's key. Both the left and right subtrees m...
26.842857
114
0.649282
""" Given a binary tree, determine if it is a valid binary search tree (BST). Assume a BST is defined as follows: The left subtree of a node contains only nodes with keys less than the node's key. The right subtree of a node contains only nodes with keys greater than the node's key. Both the left and right subtrees m...
false
true
f741182e10abddbb8b10adb3dbd7f45b204f71fd
3,729
py
Python
dq0/sdk/examples/newsgroups/_data/generate_preprocessed_dataset.py
gradientzero/dq0-sdk
90856dd5ac56216971ffe33004447fd037a21660
[ "0BSD" ]
2
2020-09-16T09:28:00.000Z
2021-03-18T21:26:29.000Z
dq0/sdk/examples/newsgroups/_data/generate_preprocessed_dataset.py
gradientzero/dq0-sdk
90856dd5ac56216971ffe33004447fd037a21660
[ "0BSD" ]
22
2020-04-15T10:19:33.000Z
2022-03-12T00:20:57.000Z
dq0/sdk/examples/newsgroups/_data/generate_preprocessed_dataset.py
gradientzero/dq0-sdk
90856dd5ac56216971ffe33004447fd037a21660
[ "0BSD" ]
null
null
null
# -*- coding: utf-8 -*- """20Newsgroups Data Source. This is a data source example known from the Scikit-learn API: https://scikit-learn.org/stable/datasets/index.html#the-20-newsgroups-text-dataset The 20 newsgroups dataset comprises around 18000 newsgroups posts on 20 topics split in two subsets: one for training (...
33.594595
82
0.699383
from pathlib import Path from dq0.sdk.data.preprocessing import preprocessing from dq0.sdk.data.utils import util from dq0.sdk.examples.newsgroups._data.dump_text_labels_to_df_csv import \ _dump_text_and_labels_to_csv import pandas as pd from sklearn.model_selection import train_test_split def _generate_prep...
true
true
f7411915b61c8b468563c54c4388026a0f6798e2
11,792
py
Python
swig/python/samples/ogr2vrt.py
gajgeospatial/gdal-3.2.2
f03032b8b734f611d5b3039c0e5cdbf81adc306e
[ "Apache-2.0" ]
null
null
null
swig/python/samples/ogr2vrt.py
gajgeospatial/gdal-3.2.2
f03032b8b734f611d5b3039c0e5cdbf81adc306e
[ "Apache-2.0" ]
null
null
null
swig/python/samples/ogr2vrt.py
gajgeospatial/gdal-3.2.2
f03032b8b734f611d5b3039c0e5cdbf81adc306e
[ "Apache-2.0" ]
1
2022-02-21T06:31:07.000Z
2022-02-21T06:31:07.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ############################################################################### # $Id: ogr2vrt.py a47364611c193ff14f084bade64d37c7e1443d3b 2020-05-30 17:04:38 +0200 Even Rouault $ # # Project: OGR Python samples # Purpose: Create OGR VRT from source datasource # Author: ...
35.2
99
0.517385
true
true
f7411a3eaa651e0137105fa37fd4d1ab8997d09a
3,283
py
Python
rdmo/projects/rules.py
dario-pilori/rdmo
d94e0f85f7a1cfedbfcbf40da1fcc8deb07e1a01
[ "Apache-2.0" ]
null
null
null
rdmo/projects/rules.py
dario-pilori/rdmo
d94e0f85f7a1cfedbfcbf40da1fcc8deb07e1a01
[ "Apache-2.0" ]
null
null
null
rdmo/projects/rules.py
dario-pilori/rdmo
d94e0f85f7a1cfedbfcbf40da1fcc8deb07e1a01
[ "Apache-2.0" ]
null
null
null
import rules @rules.predicate def is_project_member(user, project): return user in project.member @rules.predicate def is_project_owner(user, project): return user in project.owners @rules.predicate def is_project_manager(user, project): return user in project.managers @rules.predicate def is_projec...
46.9
123
0.83308
import rules @rules.predicate def is_project_member(user, project): return user in project.member @rules.predicate def is_project_owner(user, project): return user in project.owners @rules.predicate def is_project_manager(user, project): return user in project.managers @rules.predicate def is_projec...
true
true
f7411b9336abfde0d604ea30e3f2ff842b11aa5f
12,377
py
Python
sdl2/render.py
cmitu/py-sdl2
d178fe2a3c86e1cdfdf3cc77920b98b572d86a2d
[ "CC0-1.0" ]
222
2017-08-19T00:51:59.000Z
2022-02-05T19:39:33.000Z
sdl2/render.py
cmitu/py-sdl2
d178fe2a3c86e1cdfdf3cc77920b98b572d86a2d
[ "CC0-1.0" ]
103
2017-08-20T17:13:05.000Z
2022-02-05T20:20:01.000Z
sdl2/render.py
cmitu/py-sdl2
d178fe2a3c86e1cdfdf3cc77920b98b572d86a2d
[ "CC0-1.0" ]
54
2017-08-20T17:13:00.000Z
2022-01-14T23:51:13.000Z
from ctypes import Structure, POINTER, c_int, c_char_p, c_void_p, c_float, \ c_double from .dll import _bind from .stdinc import Uint8, Uint32, SDL_bool from .blendmode import SDL_BlendMode from .rect import SDL_Point, SDL_FPoint, SDL_Rect, SDL_FRect from .surface import SDL_Surface from .video import SDL_Window _...
66.187166
204
0.788075
from ctypes import Structure, POINTER, c_int, c_char_p, c_void_p, c_float, \ c_double from .dll import _bind from .stdinc import Uint8, Uint32, SDL_bool from .blendmode import SDL_BlendMode from .rect import SDL_Point, SDL_FPoint, SDL_Rect, SDL_FRect from .surface import SDL_Surface from .video import SDL_Window _...
true
true
f7411c61428fb52ad834d2f373b5dfe15f9c2f1c
4,622
py
Python
ai_challenge/methods/dqn.py
village-people/flying-pig
c86b589aadb02dbfd42a917a388c2b8488ecd338
[ "MIT" ]
72
2017-05-22T18:22:58.000Z
2019-03-11T22:49:00.000Z
ai_challenge/methods/dqn.py
village-people/flying-pig
c86b589aadb02dbfd42a917a388c2b8488ecd338
[ "MIT" ]
1
2017-06-09T05:26:43.000Z
2017-08-22T11:41:41.000Z
ai_challenge/methods/dqn.py
village-people/flying-pig
c86b589aadb02dbfd42a917a388c2b8488ecd338
[ "MIT" ]
3
2017-05-25T08:49:27.000Z
2019-09-09T18:41:54.000Z
""" Deep Q-Learning policy evaluation and improvement """ import torch from torch.autograd import Variable import torch.nn.functional as F import torch.optim as optim from termcolor import colored as clr class DQNPolicyImprovement(object): """ Deep Q-Learning training method. """ def __init__(self, policy, ...
34.75188
79
0.556253
import torch from torch.autograd import Variable import torch.nn.functional as F import torch.optim as optim from termcolor import colored as clr class DQNPolicyImprovement(object): def __init__(self, policy, target_policy, cfg, ddqn=False): self.name = "DQN-PI" self.policy = policy self...
true
true
f7411cab6af2026a634f9ccae284128e6f5002e7
10,643
py
Python
routeros_api.py
iprok/RouterOS_API
e414b9d1e386d749a59f1800a1b72adcd9ef73e2
[ "MIT" ]
1
2021-03-13T11:27:12.000Z
2021-03-13T11:27:12.000Z
routeros_api.py
iprok/RouterOS_API
e414b9d1e386d749a59f1800a1b72adcd9ef73e2
[ "MIT" ]
null
null
null
routeros_api.py
iprok/RouterOS_API
e414b9d1e386d749a59f1800a1b72adcd9ef73e2
[ "MIT" ]
null
null
null
# Author: Arturs Laizans import socket import ssl import hashlib import binascii from .verbose import Log # Constants - Define defaults PORT = 8728 SSL_PORT = 8729 USER = 'admin' PASSWORD = '' USE_SSL = False VERBOSE = False # Whether to print API conversation width the router. Useful for debugging VERBOSE_LOGIC ...
37.083624
118
0.57371
import socket import ssl import hashlib import binascii from .verbose import Log PORT = 8728 SSL_PORT = 8729 USER = 'admin' PASSWORD = '' USE_SSL = False VERBOSE = False VERBOSE_LOGIC = 'OR' VERBOSE_FILE_MODE = 'w' CONTEXT = ssl.create_default_context() CONTEXT.check_hostname = False CONTEXT.verify_mode...
true
true
f7411db8733c11550e350a271a14103f5930102c
507
py
Python
predict.py
BikesSaver/efficientdet-pytorch
c1e02484733cf2080ecb2ee57c184038a77a09e8
[ "MIT" ]
1
2020-09-17T00:51:38.000Z
2020-09-17T00:51:38.000Z
predict.py
BikesSaver/efficientdet-pytorch
c1e02484733cf2080ecb2ee57c184038a77a09e8
[ "MIT" ]
null
null
null
predict.py
BikesSaver/efficientdet-pytorch
c1e02484733cf2080ecb2ee57c184038a77a09e8
[ "MIT" ]
null
null
null
#-------------------------------------# # 对单张图片进行预测 #-------------------------------------# from efficientdet import EfficientDet from PIL import Image efficientdet = EfficientDet('./logs/Epoch29-Total_Loss0.7971-Val_Loss0.7432.pth') while True: img = input('Input image filename:') try: ...
26.684211
82
0.530572
rom efficientdet import EfficientDet from PIL import Image efficientdet = EfficientDet('./logs/Epoch29-Total_Loss0.7971-Val_Loss0.7432.pth') while True: img = input('Input image filename:') try: image = Image.open(img) except: print('Open Error! Try again!') continue ...
true
true