hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 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
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f7f92036ba670d7510d7a2dcce65254cc45e98b5
392
py
Python
solutions/pe00009.py
Derick7/projectEulerSolutions
586c5bd4d29885906aa469f27113c7ebbb0b0050
[ "MIT" ]
null
null
null
solutions/pe00009.py
Derick7/projectEulerSolutions
586c5bd4d29885906aa469f27113c7ebbb0b0050
[ "MIT" ]
null
null
null
solutions/pe00009.py
Derick7/projectEulerSolutions
586c5bd4d29885906aa469f27113c7ebbb0b0050
[ "MIT" ]
null
null
null
def sqrt(n): return int(n**0.5) abcSum = 1000 abcPdt = 0 searchRange = [x for x in range(abcSum/2,0,-1)] for i in searchRange: for j in [x for x in searchRange if x<i]: k = 1000 - (i + j) if k in searchRange and k<j: if (i**2) == ((j**2)+(k**2)): abcPdt = i*j*k ...
21.777778
60
0.477041
def sqrt(n): return int(n**0.5) abcSum = 1000 abcPdt = 0 searchRange = [x for x in range(abcSum/2,0,-1)] for i in searchRange: for j in [x for x in searchRange if x<i]: k = 1000 - (i + j) if k in searchRange and k<j: if (i**2) == ((j**2)+(k**2)): abcPdt = i*j*k ...
false
true
f7f921a6b4db6cf121eee3a94fa22d3e6bc9143c
574
py
Python
saleor/graphql/order/tests/benchmark/fixtures.py
hereischen/saleor
26bd271ac32312a415b0c5e1987e92fe939b3cb5
[ "CC-BY-4.0" ]
null
null
null
saleor/graphql/order/tests/benchmark/fixtures.py
hereischen/saleor
26bd271ac32312a415b0c5e1987e92fe939b3cb5
[ "CC-BY-4.0" ]
null
null
null
saleor/graphql/order/tests/benchmark/fixtures.py
hereischen/saleor
26bd271ac32312a415b0c5e1987e92fe939b3cb5
[ "CC-BY-4.0" ]
null
null
null
import uuid import pytest from prices import Money, TaxedMoney from .....order.models import Order @pytest.fixture def orders_for_benchmarks(channel_USD, address, customer_user): orders = [ Order( token=str(uuid.uuid4()), channel=channel_USD, billing_address=address.g...
24.956522
73
0.627178
import uuid import pytest from prices import Money, TaxedMoney from .....order.models import Order @pytest.fixture def orders_for_benchmarks(channel_USD, address, customer_user): orders = [ Order( token=str(uuid.uuid4()), channel=channel_USD, billing_address=address.g...
true
true
f7f922da71d5b0b3cd3455181465feb7dfb1351d
3,511
py
Python
scripts/test-omw-cili-db.py
sehqlr/OMW
008bd8a96c7bd054b7284a407dc8e12167ec8832
[ "MIT" ]
33
2016-08-18T02:42:16.000Z
2021-07-07T02:38:55.000Z
scripts/test-omw-cili-db.py
sehqlr/OMW
008bd8a96c7bd054b7284a407dc8e12167ec8832
[ "MIT" ]
82
2016-12-05T11:40:41.000Z
2021-03-17T08:44:40.000Z
scripts/test-omw-cili-db.py
sehqlr/OMW
008bd8a96c7bd054b7284a407dc8e12167ec8832
[ "MIT" ]
12
2016-08-01T01:54:06.000Z
2020-10-03T09:48:48.000Z
import sqlite3 import sys, time dbfile = "omw.db" con = sqlite3.connect(dbfile) curs = con.cursor() print("\nYou should be testing over an empty table!") print("Failure to comply will result in foreverness... \n") commandlist = [ ("""PRAGMA foreign_keys = 1;""", """Activating foreign key constraints"""), ("""INSER...
24.552448
73
0.603817
import sqlite3 import sys, time dbfile = "omw.db" con = sqlite3.connect(dbfile) curs = con.cursor() print("\nYou should be testing over an empty table!") print("Failure to comply will result in foreverness... \n") commandlist = [ ("""PRAGMA foreign_keys = 1;""", """Activating foreign key constraints"""), ("""INSER...
true
true
f7f9233d897360bac62ea4d7b7be7ffcec670b27
22,498
py
Python
photutils/psf/tests/test_photometry.py
fdeugenio/photutils
33c8b15cbbda85dc11c86a73217422dcb61398b7
[ "BSD-3-Clause" ]
null
null
null
photutils/psf/tests/test_photometry.py
fdeugenio/photutils
33c8b15cbbda85dc11c86a73217422dcb61398b7
[ "BSD-3-Clause" ]
null
null
null
photutils/psf/tests/test_photometry.py
fdeugenio/photutils
33c8b15cbbda85dc11c86a73217422dcb61398b7
[ "BSD-3-Clause" ]
null
null
null
# Licensed under a 3-clause BSD style license - see LICENSE.rst import pytest import numpy as np from numpy.testing import assert_allclose, assert_array_equal, assert_equal from astropy.convolution.utils import discretize_model from astropy.modeling import Parameter, Fittable2DModel from astropy.modeling.fitting impo...
37.496667
79
0.622189
import pytest import numpy as np from numpy.testing import assert_allclose, assert_array_equal, assert_equal from astropy.convolution.utils import discretize_model from astropy.modeling import Parameter, Fittable2DModel from astropy.modeling.fitting import LevMarLSQFitter from astropy.modeling.models import Gaussian...
true
true
f7f923ba2aef1be38b7b79a65357cb7ea026281c
16,018
py
Python
tests/contrib/gp/test_models.py
gavincangan/pyro
d9115a6da7edd7e3fecd6b89a850cc137d7e7e9a
[ "MIT" ]
null
null
null
tests/contrib/gp/test_models.py
gavincangan/pyro
d9115a6da7edd7e3fecd6b89a850cc137d7e7e9a
[ "MIT" ]
4
2019-01-31T17:54:03.000Z
2019-02-07T07:09:51.000Z
tests/contrib/gp/test_models.py
gavincangan/pyro
d9115a6da7edd7e3fecd6b89a850cc137d7e7e9a
[ "MIT" ]
null
null
null
from __future__ import absolute_import, division, print_function import logging from collections import defaultdict, namedtuple import pytest import torch import pyro.distributions as dist from pyro.contrib.gp.kernels import Cosine, Matern32, RBF, WhiteNoise from pyro.contrib.gp.likelihoods import Gaussian from pyro...
34.973799
94
0.648021
from __future__ import absolute_import, division, print_function import logging from collections import defaultdict, namedtuple import pytest import torch import pyro.distributions as dist from pyro.contrib.gp.kernels import Cosine, Matern32, RBF, WhiteNoise from pyro.contrib.gp.likelihoods import Gaussian from pyro...
true
true
f7f924ad1810a0c8444d100e2966267673bb8db2
58
py
Python
HAFTA-3/DERS-8/for_string.py
aydan08/Python-Kursu-15.02.21
a1463501df47cacbd7ddd8c6f3aeb93abf1436f6
[ "MIT" ]
1
2021-03-08T16:16:35.000Z
2021-03-08T16:16:35.000Z
HAFTA-3/DERS-8/for_string.py
aydan08/Python-Kursu-15.02.21
a1463501df47cacbd7ddd8c6f3aeb93abf1436f6
[ "MIT" ]
null
null
null
HAFTA-3/DERS-8/for_string.py
aydan08/Python-Kursu-15.02.21
a1463501df47cacbd7ddd8c6f3aeb93abf1436f6
[ "MIT" ]
null
null
null
for karakter in "Arhavi Halk Eğitim": print(karakter)
29
38
0.724138
for karakter in "Arhavi Halk Eğitim": print(karakter)
true
true
f7f92575fe8831a6bc80d1edb600f2a04ffecd01
722
py
Python
pythia/opal/content/Style.py
willic3/pythia
2657b95a0c07fd3c914ab6b5f7ec89a8edba004c
[ "BSD-3-Clause" ]
1
2015-11-30T08:01:39.000Z
2015-11-30T08:01:39.000Z
pythia/opal/content/Style.py
willic3/pythia
2657b95a0c07fd3c914ab6b5f7ec89a8edba004c
[ "BSD-3-Clause" ]
27
2018-05-24T18:31:25.000Z
2021-10-16T03:57:52.000Z
pythia/opal/content/Style.py
willic3/pythia
2657b95a0c07fd3c914ab6b5f7ec89a8edba004c
[ "BSD-3-Clause" ]
7
2019-07-19T02:30:56.000Z
2021-06-02T22:00:01.000Z
#!/usr/bin/env python # # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # # Michael A.G. Aivazis # California Institute of Technology # (C) 1998-2005 All Rights Reserved # # {LicenseText} # # ~~~~~~~~~~~~~~~~~~~~~~~~...
20.628571
80
0.429363
from .Element import Element class Style(Element): def identify(self, inspector): return inspector.onStyle(self) def __init__(self, **kwds): Element.__init__(self, 'style', **kwds) self.style = [] return __id__ = "$Id: Style.py,v 1.1 2005/03/20 07:22:58 aiv...
true
true
f7f92649f6a7e136179d208d352aa824ff4cae2a
2,013
py
Python
rlkit/envs/mujoco/ant.py
Asap7772/railrl_evalsawyer
baba8ce634d32a48c7dfe4dc03b123e18e96e0a3
[ "MIT" ]
1
2020-10-23T14:40:09.000Z
2020-10-23T14:40:09.000Z
rlkit/envs/mujoco/ant.py
Asap7772/railrl_evalsawyer
baba8ce634d32a48c7dfe4dc03b123e18e96e0a3
[ "MIT" ]
null
null
null
rlkit/envs/mujoco/ant.py
Asap7772/railrl_evalsawyer
baba8ce634d32a48c7dfe4dc03b123e18e96e0a3
[ "MIT" ]
1
2021-05-27T20:38:45.000Z
2021-05-27T20:38:45.000Z
""" Exact same as gym env, except that the gear ratio is 30 rather than 150. """ import numpy as np from gym.envs.mujoco import MujocoEnv from rlkit.envs.env_utils import get_asset_full_path class AntEnv(MujocoEnv): def __init__(self, use_low_gear_ratio=True): if use_low_gear_ratio: xml_path...
33.55
92
0.614506
import numpy as np from gym.envs.mujoco import MujocoEnv from rlkit.envs.env_utils import get_asset_full_path class AntEnv(MujocoEnv): def __init__(self, use_low_gear_ratio=True): if use_low_gear_ratio: xml_path = 'low_gear_ratio_ant.xml' else: xml_path = 'normal_gear_rat...
true
true
f7f9266919d061fe61748360909c290f275d7b13
45,365
py
Python
Lib/fontTools/ttLib/tables/_c_m_a_p.py
ctrlcctrlv/fonttools
81d0042a9ee35d4ac91a9b4525db665f204c06e0
[ "Apache-2.0", "MIT" ]
2
2021-04-07T16:47:04.000Z
2022-01-15T04:01:01.000Z
Lib/fontTools/ttLib/tables/_c_m_a_p.py
ctrlcctrlv/fonttools
81d0042a9ee35d4ac91a9b4525db665f204c06e0
[ "Apache-2.0", "MIT" ]
74
2020-01-30T07:27:54.000Z
2021-08-03T05:47:17.000Z
Lib/fontTools/ttLib/tables/_c_m_a_p.py
ctrlcctrlv/fonttools
81d0042a9ee35d4ac91a9b4525db665f204c06e0
[ "Apache-2.0", "MIT" ]
1
2020-01-22T20:06:09.000Z
2020-01-22T20:06:09.000Z
from fontTools.misc.py23 import * from fontTools.misc.textTools import safeEval, readHex from fontTools.misc.encodingTools import getEncoding from fontTools.ttLib import getSearchRange from fontTools.unicode import Unicode from . import DefaultTable import sys import struct import array import logging log = logging.g...
34.78911
191
0.696308
from fontTools.misc.py23 import * from fontTools.misc.textTools import safeEval, readHex from fontTools.misc.encodingTools import getEncoding from fontTools.ttLib import getSearchRange from fontTools.unicode import Unicode from . import DefaultTable import sys import struct import array import logging log = logging.g...
true
true
f7f926ed34066ddacdcd3afe5880a5e521b52bc1
480
py
Python
OpenCV2/Image_Processing/Canny_Edge_Detection.py
siddharth-143/Python
293f4643a3a13e3b82d23fd8922db54dbb0f12bc
[ "MIT" ]
null
null
null
OpenCV2/Image_Processing/Canny_Edge_Detection.py
siddharth-143/Python
293f4643a3a13e3b82d23fd8922db54dbb0f12bc
[ "MIT" ]
null
null
null
OpenCV2/Image_Processing/Canny_Edge_Detection.py
siddharth-143/Python
293f4643a3a13e3b82d23fd8922db54dbb0f12bc
[ "MIT" ]
null
null
null
""" OpenCV Canny Edge Detection : Edge detection is term where identify the boundary of object in image. """ # importing module import cv2 import numpy as np # image path img = cv2.imread("../images/1.jpeg") # canny edge detection edges = cv2.Canny(img, 100, 200) # display the image cv2.imshow("Edge detecti...
19.2
74
0.725
import cv2 import numpy as np img = cv2.imread("../images/1.jpeg") edges = cv2.Canny(img, 100, 200) cv2.imshow("Edge detection image", edges) cv2.imshow("Original image", img) cv2.waitKey(0) cv2.destroyAllWindows()
true
true
f7f92756d4144e78fb3424cd6acd0c6a581225e4
1,209
py
Python
desktopmagic/scripts/screengrab_torture_test.py
p3rd1x/Desktopmagic
906cbe16f4e6c5fea7121c186ff8c6e7c997b2f7
[ "MIT" ]
49
2015-05-20T08:19:42.000Z
2021-11-12T17:20:40.000Z
desktopmagic/scripts/screengrab_torture_test.py
p3rd1x/Desktopmagic
906cbe16f4e6c5fea7121c186ff8c6e7c997b2f7
[ "MIT" ]
9
2015-06-17T22:47:21.000Z
2022-03-15T09:00:28.000Z
desktopmagic/scripts/screengrab_torture_test.py
p3rd1x/Desktopmagic
906cbe16f4e6c5fea7121c186ff8c6e7c997b2f7
[ "MIT" ]
16
2015-12-13T18:34:45.000Z
2021-02-17T13:50:17.000Z
from __future__ import print_function import sys from desktopmagic.screengrab_win32 import GrabFailed, getScreenAsImage, getDisplaysAsImages, getRectAsImage def main(): print("""\ This program helps you test whether screengrab_win32 has memory leaks and other problems. It takes a screenshot repeatedly and discards...
24.18
107
0.732837
from __future__ import print_function import sys from desktopmagic.screengrab_win32 import GrabFailed, getScreenAsImage, getDisplaysAsImages, getRectAsImage def main(): print("""\ This program helps you test whether screengrab_win32 has memory leaks and other problems. It takes a screenshot repeatedly and discards...
true
true
f7f927d5ac30fab3f5f2adddff8da39245dd8131
998
py
Python
flaskr/__init__.py
iJKENNEDY/template_flask
9810d2ab5750ec3603203a12004d21aed3bc61be
[ "MIT" ]
null
null
null
flaskr/__init__.py
iJKENNEDY/template_flask
9810d2ab5750ec3603203a12004d21aed3bc61be
[ "MIT" ]
null
null
null
flaskr/__init__.py
iJKENNEDY/template_flask
9810d2ab5750ec3603203a12004d21aed3bc61be
[ "MIT" ]
null
null
null
import os from flask import Flask def create_app(test_config=None): # create and configure the app app = Flask(__name__, instance_relative_config=True) app.config.from_mapping( SECRET_KEY='dev', DATABASE=os.path.join(app.instance_path, 'flaskr.sqlite'), ) if test_config is None: ...
23.761905
66
0.650301
import os from flask import Flask def create_app(test_config=None): app = Flask(__name__, instance_relative_config=True) app.config.from_mapping( SECRET_KEY='dev', DATABASE=os.path.join(app.instance_path, 'flaskr.sqlite'), ) if test_config is None: app.config.fr...
true
true
f7f9284e0b60183c0350cf42a0c81e48b3757b0c
201
py
Python
nbds_colab/ensemble1.py
hallmx/nbds_colab
77e5cab5805a95cc1c80f7ee3ca9429c94e1876a
[ "Apache-2.0" ]
null
null
null
nbds_colab/ensemble1.py
hallmx/nbds_colab
77e5cab5805a95cc1c80f7ee3ca9429c94e1876a
[ "Apache-2.0" ]
2
2021-09-28T00:53:05.000Z
2022-02-26T06:41:34.000Z
nbds_colab/ensemble1.py
hallmx/nbds_colab
77e5cab5805a95cc1c80f7ee3ca9429c94e1876a
[ "Apache-2.0" ]
null
null
null
# AUTOGENERATED! DO NOT EDIT! File to edit: 08_ensemble1.ipynb (unless otherwise specified). __all__ = ['ensemble1_test'] # Cell def ensemble1_test(test_msg): "Function ensemble1" return test_msg
25.125
92
0.766169
__all__ = ['ensemble1_test'] def ensemble1_test(test_msg): return test_msg
true
true
f7f929eec1c39bd6596a57c691c9257c4fac1c2b
2,402
py
Python
sdk/python/pulumi_azure_nextgen/azurestack/latest/get_registration_activation_key.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_nextgen/azurestack/latest/get_registration_activation_key.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_nextgen/azurestack/latest/get_registration_activation_key.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables __a...
36.953846
166
0.710241
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables __all__ = [ 'GetRegistrationActivationKeyResult', 'AwaitableGetRegistrationActivationKeyResult', 'get_registration_activation_key', ] @pulumi.output_type c...
true
true
f7f92a15a8847696c90342e9eaf5928425147312
20,984
py
Python
tensorflow/contrib/tensor_forest/client/random_forest.py
wunlung/tensorflow
e2b05608125d66716ada95433850b3ce8405c1e4
[ "Apache-2.0" ]
1
2021-04-14T07:48:21.000Z
2021-04-14T07:48:21.000Z
tensorflow/contrib/tensor_forest/client/random_forest.py
ggaziv/tensorflow
e2b05608125d66716ada95433850b3ce8405c1e4
[ "Apache-2.0" ]
null
null
null
tensorflow/contrib/tensor_forest/client/random_forest.py
ggaziv/tensorflow
e2b05608125d66716ada95433850b3ce8405c1e4
[ "Apache-2.0" ]
1
2018-03-16T05:49:15.000Z
2018-03-16T05:49:15.000Z
# Copyright 2016 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...
39.07635
85
0.697674
from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.contrib import framework as contrib_framework from tensorflow.contrib.learn.python.learn.estimators import estimator from tensorflow.contrib.learn.python.learn.estimators import h...
true
true
f7f92a9a5709c2b464a4d05e569d5f8996fbcf5b
6,372
py
Python
airbyte-integrations/connectors/source-file/integration_tests/conftest.py
golf-canada/airbyte
a81b183a6b62d6bb4256347aaf39a3ada061aabe
[ "MIT" ]
null
null
null
airbyte-integrations/connectors/source-file/integration_tests/conftest.py
golf-canada/airbyte
a81b183a6b62d6bb4256347aaf39a3ada061aabe
[ "MIT" ]
null
null
null
airbyte-integrations/connectors/source-file/integration_tests/conftest.py
golf-canada/airbyte
a81b183a6b62d6bb4256347aaf39a3ada061aabe
[ "MIT" ]
null
null
null
""" MIT License Copyright (c) 2020 Airbyte Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distr...
34.258065
132
0.719083
import json import os import socket import tempfile import uuid from pathlib import Path from typing import Mapping import boto3 import pandas import pytest from botocore.errorfactory import ClientError from google.api_core.exceptions import Conflict from google.cloud import storage from paramiko.client import AutoA...
true
true
f7f92ac258f92ba7447035ac1330134b91ddfd9d
21,250
py
Python
src/bin/calc_rec-cycrec-gv_gru-cycle-mcepvae-laplace_noar.py
entn-at/cyclevae-vc-neuralvoco
e0188457fe6d16e53b91066600dfe6fd5a9f8c23
[ "Apache-2.0" ]
null
null
null
src/bin/calc_rec-cycrec-gv_gru-cycle-mcepvae-laplace_noar.py
entn-at/cyclevae-vc-neuralvoco
e0188457fe6d16e53b91066600dfe6fd5a9f8c23
[ "Apache-2.0" ]
null
null
null
src/bin/calc_rec-cycrec-gv_gru-cycle-mcepvae-laplace_noar.py
entn-at/cyclevae-vc-neuralvoco
e0188457fe6d16e53b91066600dfe6fd5a9f8c23
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2020 Patrick Lumban Tobing (Nagoya University) # Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) from __future__ import division import argparse import logging import math import os import sys import numpy as np import torch import torch.multiproce...
52.339901
146
0.559059
from __future__ import division import argparse import logging import math import os import sys import numpy as np import torch import torch.multiprocessing as mp from vcneuvoco import GRU_VAE_ENCODER, GRU_SPEC_DECODER from utils import find_files, read_hdf5, read_txt, write_hdf5, check_hdf5 from dtw_c import...
true
true
f7f92b3d5ade59f2c089c5df9977c0f9a575a74e
13,383
py
Python
athena/models/speech_transformer.py
hyx100e/athena-1
2668de7acdd51a6d12a2768a57351b666b4edbf3
[ "Apache-2.0" ]
1
2019-12-25T06:38:03.000Z
2019-12-25T06:38:03.000Z
athena/models/speech_transformer.py
cookingbear/athena
2ff02d5f54070563c6a600199ae9e8d3ca3c66dd
[ "Apache-2.0" ]
null
null
null
athena/models/speech_transformer.py
cookingbear/athena
2ff02d5f54070563c6a600199ae9e8d3ca3c66dd
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright (C) 2019 ATHENA AUTHORS; Xiangang Li; Dongwei Jiang; Xiaoning Lei # 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.o...
41.305556
104
0.62826
from absl import logging import tensorflow as tf from .base import BaseModel from ..loss import Seq2SeqSparseCategoricalCrossentropy from ..metrics import Seq2SeqSparseCategoricalAccuracy from ..utils.misc import generate_square_subsequent_mask, insert_sos_in_labels from ..layers.commons import Pos...
true
true
f7f92b8f50b0af5bf26719bffb221c20f87f5a30
510
py
Python
IRIS_data_download/IRIS_download_support/obspy/io/scardec/tests/__init__.py
earthinversion/Fnet_IRIS_data_automated_download
09a6e0c992662feac95744935e038d1c68539fa1
[ "MIT" ]
2
2020-03-05T01:03:01.000Z
2020-12-17T05:04:07.000Z
IRIS_data_download/IRIS_download_support/obspy/io/scardec/tests/__init__.py
earthinversion/Fnet_IRIS_data_automated_download
09a6e0c992662feac95744935e038d1c68539fa1
[ "MIT" ]
4
2021-03-31T19:25:55.000Z
2021-12-13T20:32:46.000Z
IRIS_data_download/IRIS_download_support/obspy/io/scardec/tests/__init__.py
earthinversion/Fnet_IRIS_data_automated_download
09a6e0c992662feac95744935e038d1c68539fa1
[ "MIT" ]
2
2020-09-08T19:33:40.000Z
2021-04-05T09:47:50.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function, unicode_literals) from future.builtins import * # NOQA import unittest from obspy.core.util import add_doctests, add_unittests MODULE_NAME = "obspy.io.scardec" def suite(): ...
21.25
66
0.7
from __future__ import (absolute_import, division, print_function, unicode_literals) from future.builtins import * import unittest from obspy.core.util import add_doctests, add_unittests MODULE_NAME = "obspy.io.scardec" def suite(): suite = unittest.TestSuite() add_doctests(sui...
true
true
f7f92c5acea418b4e2d911fc0bb0bf005281d9ac
18,818
py
Python
TME 11. MADDPG/utils.py
hanouticelina/reinforcement-learning
c7c6765486ea9546bbd8ce75e6032a408a1410cf
[ "MIT" ]
null
null
null
TME 11. MADDPG/utils.py
hanouticelina/reinforcement-learning
c7c6765486ea9546bbd8ce75e6032a408a1410cf
[ "MIT" ]
null
null
null
TME 11. MADDPG/utils.py
hanouticelina/reinforcement-learning
c7c6765486ea9546bbd8ce75e6032a408a1410cf
[ "MIT" ]
null
null
null
import time import subprocess from collections import namedtuple,defaultdict import logging import json import os import yaml import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import sys import threading import numpy as np import gym from collections import deque import random import...
31.052805
145
0.587416
import time import subprocess from collections import namedtuple,defaultdict import logging import json import os import yaml import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import sys import threading import numpy as np import gym from collections import deque import random import...
true
true
f7f92ced61d900672394cb62f5631ec72b8361a7
660
py
Python
examples/web_counter/tdmf_components.py
cmdimkpa/test-driven-modular-framework
3006557ddc5a9e52c59fb492f5d01a130ab1c759
[ "MIT" ]
null
null
null
examples/web_counter/tdmf_components.py
cmdimkpa/test-driven-modular-framework
3006557ddc5a9e52c59fb492f5d01a130ab1c759
[ "MIT" ]
null
null
null
examples/web_counter/tdmf_components.py
cmdimkpa/test-driven-modular-framework
3006557ddc5a9e52c59fb492f5d01a130ab1c759
[ "MIT" ]
null
null
null
def download_webpage(package): ''' Grab HTML from a webpage ''' func_name = "download_webpage" output = [] try: # package is an array with a single url url = package[0] # grab HTML html = http.get(url).content.decode() # update byte_coun...
24.444444
71
0.560606
def download_webpage(package): func_name = "download_webpage" output = [] try: url = package[0] html = http.get(url).content.decode() byte_counter = flags.get("byte_counter") byte_counter += len(html) flags.set("byte_counter", by...
true
true
f7f92d2a185da5e809f82b907637b43fff531049
31,958
py
Python
msal/application.py
dsanghan/microsoft-authentication-library-for-python
9e122eeb4cd1224132eb06001f9d88939a996f8e
[ "MIT" ]
null
null
null
msal/application.py
dsanghan/microsoft-authentication-library-for-python
9e122eeb4cd1224132eb06001f9d88939a996f8e
[ "MIT" ]
null
null
null
msal/application.py
dsanghan/microsoft-authentication-library-for-python
9e122eeb4cd1224132eb06001f9d88939a996f8e
[ "MIT" ]
null
null
null
import time try: # Python 2 from urlparse import urljoin except: # Python 3 from urllib.parse import urljoin import logging import sys import warnings import requests from .oauth2cli import Client, JwtAssertionCreator from .authority import Authority from .mex import send_request as mex_send_request from .w...
49.547287
175
0.632486
import time try: from urlparse import urljoin except: from urllib.parse import urljoin import logging import sys import warnings import requests from .oauth2cli import Client, JwtAssertionCreator from .authority import Authority from .mex import send_request as mex_send_request from .wstrust_request impor...
true
true
f7f92d7bbc0ba48633b173e01370fd92e948128d
2,487
py
Python
paver/path.py
timgates42/paver
62fb3d8e32c3727777b3ff7d75ba1b9b75703027
[ "BSD-3-Clause" ]
270
2015-01-10T01:00:09.000Z
2022-03-13T21:05:27.000Z
paver/path.py
timgates42/paver
62fb3d8e32c3727777b3ff7d75ba1b9b75703027
[ "BSD-3-Clause" ]
84
2015-02-10T18:45:25.000Z
2021-06-21T14:55:33.000Z
paver/path.py
timgates42/paver
62fb3d8e32c3727777b3ff7d75ba1b9b75703027
[ "BSD-3-Clause" ]
37
2015-03-26T14:05:33.000Z
2022-03-22T12:32:19.000Z
""" Wrapper around path.py to add dry run support and other paver integration. """ import functools import os from contextlib import contextmanager import sys if sys.version_info[0] == 3: from paver.deps.path3 import path as _orig_path else: from paver.deps.path2 import path as _orig_path from paver import ta...
29.258824
79
0.6538
import functools import os from contextlib import contextmanager import sys if sys.version_info[0] == 3: from paver.deps.path3 import path as _orig_path else: from paver.deps.path2 import path as _orig_path from paver import tasks __all__ = ['path', 'pushd'] @contextmanager def pushd(dir): old_dir = os...
true
true
f7f92f16a0d81de0c0ec408c6ec977683965b962
116
py
Python
todo/tasks/admin.py
vijay0707/ToDo-List-Django
388b338bc1394b46fc826c737c58b5977ccc6716
[ "MIT" ]
null
null
null
todo/tasks/admin.py
vijay0707/ToDo-List-Django
388b338bc1394b46fc826c737c58b5977ccc6716
[ "MIT" ]
null
null
null
todo/tasks/admin.py
vijay0707/ToDo-List-Django
388b338bc1394b46fc826c737c58b5977ccc6716
[ "MIT" ]
null
null
null
from django.contrib import admin # Register your models here. from .models import * admin.site.register(Taskmodel)
19.333333
32
0.793103
from django.contrib import admin from .models import * admin.site.register(Taskmodel)
true
true
f7f92f6cb89c32d1d993c838e48103ec401169d0
2,764
py
Python
DQM/TrackingMonitorClient/python/TrackingClientConfig_Tier0_Cosmic_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
6
2017-09-08T14:12:56.000Z
2022-03-09T23:57:01.000Z
DQM/TrackingMonitorClient/python/TrackingClientConfig_Tier0_Cosmic_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
545
2017-09-19T17:10:19.000Z
2022-03-07T16:55:27.000Z
DQM/TrackingMonitorClient/python/TrackingClientConfig_Tier0_Cosmic_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
14
2017-10-04T09:47:21.000Z
2019-10-23T18:04:45.000Z
import FWCore.ParameterSet.Config as cms from DQMServices.Core.DQMEDHarvester import DQMEDHarvester # TrackingOfflineDQM (for Tier0 Harvesting Step) #### trackingOfflineAnalyser = DQMEDHarvester("TrackingOfflineDQM", GlobalStatusFilling = cms.untracked.int32(2), UsedWithEDMtoMEConverter = cms.untrack...
42.523077
117
0.591172
import FWCore.ParameterSet.Config as cms from DQMServices.Core.DQMEDHarvester import DQMEDHarvester fflineAnalyser = DQMEDHarvester("TrackingOfflineDQM", GlobalStatusFilling = cms.untracked.int32(2), UsedWithEDMtoMEConverter = cms.untracked.bool(True), TopFolderName = cms.untracked.st...
true
true
f7f930962fb927dd80bf6bf81062fcff9591a9df
3,586
py
Python
setupext.py
matthewturk/yt_astro_analysis
84689a6e3495938b2a2da98d1589ce79410f6393
[ "BSD-3-Clause-Clear" ]
null
null
null
setupext.py
matthewturk/yt_astro_analysis
84689a6e3495938b2a2da98d1589ce79410f6393
[ "BSD-3-Clause-Clear" ]
null
null
null
setupext.py
matthewturk/yt_astro_analysis
84689a6e3495938b2a2da98d1589ce79410f6393
[ "BSD-3-Clause-Clear" ]
null
null
null
import contextlib import glob import os import subprocess import sys import tempfile from distutils import log from distutils.ccompiler import new_compiler from distutils.sysconfig import customize_compiler from distutils.errors import CompileError, LinkError CCODE = """ #include <omp.h> #include <stdio.h> int main(...
29.393443
74
0.621584
import contextlib import glob import os import subprocess import sys import tempfile from distutils import log from distutils.ccompiler import new_compiler from distutils.sysconfig import customize_compiler from distutils.errors import CompileError, LinkError CCODE = """ #include <omp.h> #include <stdio.h> int main(...
true
true
f7f930c810d1f3ae8287bd83a4ffe65d1eff6ff1
23,888
py
Python
odps/df/backends/odpssql/codegen.py
jhhjwei/aliyun-odps-python-sdk
9372024ef358674b17253ef716d50ad02c2af23e
[ "Apache-2.0" ]
null
null
null
odps/df/backends/odpssql/codegen.py
jhhjwei/aliyun-odps-python-sdk
9372024ef358674b17253ef716d50ad02c2af23e
[ "Apache-2.0" ]
null
null
null
odps/df/backends/odpssql/codegen.py
jhhjwei/aliyun-odps-python-sdk
9372024ef358674b17253ef716d50ad02c2af23e
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 1999-2017 Alibaba Group Holding Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENS...
36.470229
119
0.59712
import base64 import os import sys import platform import uuid from .types import df_type_to_odps_type from ...expr.collections import RowAppliedCollectionExpr from ...expr.element import MappedExpr from ...expr.reduction import Aggregation, GroupedAggregation from ...expr.utils import get_executed_col...
true
true
f7f931130714c0aaaf7b480273806ac1243916e2
55,531
py
Python
Lib/test/test_warnings/__init__.py
eendebakpt/cpython
474fdbe9e4a2ff90ef39e8748da644c86a200981
[ "0BSD" ]
1
2020-09-28T16:41:16.000Z
2020-09-28T16:41:16.000Z
Lib/test/test_warnings/__init__.py
eendebakpt/cpython
474fdbe9e4a2ff90ef39e8748da644c86a200981
[ "0BSD" ]
2
2022-03-10T15:56:35.000Z
2022-03-10T15:56:43.000Z
Lib/test/test_warnings/__init__.py
eendebakpt/cpython
474fdbe9e4a2ff90ef39e8748da644c86a200981
[ "0BSD" ]
null
null
null
from contextlib import contextmanager import linecache import os from io import StringIO import re import sys import textwrap import unittest from test import support from test.support import import_helper from test.support import os_helper from test.support import warnings_helper from test.support.script_helper import...
42.100834
101
0.597936
from contextlib import contextmanager import linecache import os from io import StringIO import re import sys import textwrap import unittest from test import support from test.support import import_helper from test.support import os_helper from test.support import warnings_helper from test.support.script_helper import...
true
true
f7f9321352b170d5736d58318b4db4e396c74ccd
1,030
py
Python
Exercicios/ex085.py
vincytarsis/Python
f98005917486bc191c85c971ec8e2c71fb9dd4c7
[ "MIT" ]
null
null
null
Exercicios/ex085.py
vincytarsis/Python
f98005917486bc191c85c971ec8e2c71fb9dd4c7
[ "MIT" ]
null
null
null
Exercicios/ex085.py
vincytarsis/Python
f98005917486bc191c85c971ec8e2c71fb9dd4c7
[ "MIT" ]
null
null
null
""" Crie um programa onde o usuário possa digitar sete valores numéricos e cadastre-os em uma lista única que mantenha separados os valores pares e impares. No final, mostre os valores pares e ímpares em ordem crescente. """ '''princ = [] par = [] imp = [] #Ler 7 valores numéricos for c in range(1, 8): n = int(inp...
22.888889
93
0.615534
num = [[], []] valor = 0 for c in range(1, 8): valor = int(input(f'Digite {c}° o valor')) if valor % 2 == 0: num[0].append(valor) else: num[1].append(valor) num[0].sort() num[1].sort() print(f'Os valores pares digitados foram {num[0]}') print(f'Os valores impares digitados foram {num[1]}'...
true
true
f7f932cf1cd9224ccb32b68b38b9ae5edee94239
1,174
py
Python
app/models/campaign.py
chiatk/tforty-api
8b2a2f32389201303208b8f2a7711dbcd73c8569
[ "Apache-2.0" ]
null
null
null
app/models/campaign.py
chiatk/tforty-api
8b2a2f32389201303208b8f2a7711dbcd73c8569
[ "Apache-2.0" ]
null
null
null
app/models/campaign.py
chiatk/tforty-api
8b2a2f32389201303208b8f2a7711dbcd73c8569
[ "Apache-2.0" ]
null
null
null
from re import T from sqlalchemy import Column, Table, ForeignKey from sqlalchemy.sql.sqltypes import Integer, String, DateTime, Boolean from sqlalchemy.sql.functions import func from ..database.connection_mysql import meta campaigns = Table( "campaigns", meta, Column( "id", Integer, primary_key=True ), ...
39.133333
76
0.67121
from re import T from sqlalchemy import Column, Table, ForeignKey from sqlalchemy.sql.sqltypes import Integer, String, DateTime, Boolean from sqlalchemy.sql.functions import func from ..database.connection_mysql import meta campaigns = Table( "campaigns", meta, Column( "id", Integer, primary_key=True ), ...
true
true
f7f9334d06b2ed9e4fbcf3f0d4789d12ed9cc1ef
255
py
Python
dump-glyphs-rules.py
simoncozens/nastaliq-engineering
4785bbfd115d9a11fb90a48546e2e2a9c758fecf
[ "Apache-2.0" ]
5
2020-10-16T17:49:39.000Z
2021-03-09T13:18:14.000Z
dump-glyphs-rules.py
simoncozens/nastaliq-engineering
4785bbfd115d9a11fb90a48546e2e2a9c758fecf
[ "Apache-2.0" ]
null
null
null
dump-glyphs-rules.py
simoncozens/nastaliq-engineering
4785bbfd115d9a11fb90a48546e2e2a9c758fecf
[ "Apache-2.0" ]
null
null
null
import csv from glyphsLib import GSFont import sys font = GSFont(sys.argv[1]) conn = font.userData["nastaliqConnections"] with open('rules.csv', 'w') as outcsv: w = csv.DictWriter(outcsv,conn["colnames"]) w.writeheader() w.writerows(conn["rows"])
21.25
45
0.717647
import csv from glyphsLib import GSFont import sys font = GSFont(sys.argv[1]) conn = font.userData["nastaliqConnections"] with open('rules.csv', 'w') as outcsv: w = csv.DictWriter(outcsv,conn["colnames"]) w.writeheader() w.writerows(conn["rows"])
true
true
f7f933a059433dd754baad8c39b4d0e83e5203c5
7,854
py
Python
integration_tests/test_upgrade.py
tomtau/chain-main
b45fdbbfa25e9f266098f920f3d5ef2cb5742091
[ "Apache-2.0" ]
null
null
null
integration_tests/test_upgrade.py
tomtau/chain-main
b45fdbbfa25e9f266098f920f3d5ef2cb5742091
[ "Apache-2.0" ]
null
null
null
integration_tests/test_upgrade.py
tomtau/chain-main
b45fdbbfa25e9f266098f920f3d5ef2cb5742091
[ "Apache-2.0" ]
null
null
null
import configparser import json import re import subprocess import time from datetime import datetime, timedelta, timezone from pathlib import Path import pytest from dateutil.parser import isoparse from pystarport.cluster import SUPERVISOR_CONFIG_FILE from pystarport.ports import rpc_port from .utils import ( cl...
29.863118
88
0.622995
import configparser import json import re import subprocess import time from datetime import datetime, timedelta, timezone from pathlib import Path import pytest from dateutil.parser import isoparse from pystarport.cluster import SUPERVISOR_CONFIG_FILE from pystarport.ports import rpc_port from .utils import ( cl...
true
true
f7f933c87fdfd9fadc2004166a7c0687c5ea3056
21,418
py
Python
tutorials/declarative_tutorial.py
Matze77/MetPy
23c01414dd4141b0a83f5aa51b6e92db2c6d0fb6
[ "BSD-3-Clause" ]
3
2016-03-03T07:51:22.000Z
2022-02-22T01:22:02.000Z
tutorials/declarative_tutorial.py
Matze77/MetPy
23c01414dd4141b0a83f5aa51b6e92db2c6d0fb6
[ "BSD-3-Clause" ]
188
2020-09-10T19:13:48.000Z
2022-03-30T20:03:34.000Z
tutorials/declarative_tutorial.py
Matze77/MetPy
23c01414dd4141b0a83f5aa51b6e92db2c6d0fb6
[ "BSD-3-Clause" ]
2
2016-10-13T22:37:16.000Z
2020-08-18T17:44:49.000Z
# Copyright (c) 2018 MetPy Developers. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause """ MetPy Declarative Syntax Tutorial ================================= The declarative syntax that is a part of the MetPy packaged is designed to aid in simple data exploration and...
35.996639
95
0.647866
true
true
f7f933cc70c654fc0df7d7861af76d16032ed0f5
3,468
py
Python
app/app/settings.py
ndizihiwesimon/recipe-app-api
52f00837abc3c6e2952db9baafe600a7af17b322
[ "MIT" ]
null
null
null
app/app/settings.py
ndizihiwesimon/recipe-app-api
52f00837abc3c6e2952db9baafe600a7af17b322
[ "MIT" ]
null
null
null
app/app/settings.py
ndizihiwesimon/recipe-app-api
52f00837abc3c6e2952db9baafe600a7af17b322
[ "MIT" ]
null
null
null
""" Django settings for app project. Generated by 'django-admin startproject' using Django 4.0.1. For more information on this file, see https://docs.djangoproject.com/en/4.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/4.0/ref/settings/ """ import os from p...
26.075188
91
0.693772
import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = 'django-insecure-+g=^5wpckkb07&t_8@5yu@v6tqi*@wsy$5oop3#ki#y50mqnnn' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'dj...
true
true
f7f934032d3eddc7d56b2f1f053d4bb02dbcb3cf
2,508
py
Python
frontend/util/session.py
EPC-MSU/uRPC
cd3c386a8320542052834ca28791a3ea2b57c54f
[ "CC0-1.0" ]
1
2022-03-11T04:29:53.000Z
2022-03-11T04:29:53.000Z
frontend/util/session.py
EPC-MSU/uRPC
cd3c386a8320542052834ca28791a3ea2b57c54f
[ "CC0-1.0" ]
null
null
null
frontend/util/session.py
EPC-MSU/uRPC
cd3c386a8320542052834ca28791a3ea2b57c54f
[ "CC0-1.0" ]
1
2021-06-15T21:56:26.000Z
2021-06-15T21:56:26.000Z
from collections import Container from os import sep, access, R_OK from os.path import join, isfile from uuid import UUID from tornado.ioloop import IOLoop from urpc.ast import Protocol from urpc.storage.json import JsonStorage try: from settings import temp_dir except ImportError: temp_dir = join(sep, "tmp"...
32.153846
92
0.637161
from collections import Container from os import sep, access, R_OK from os.path import join, isfile from uuid import UUID from tornado.ioloop import IOLoop from urpc.ast import Protocol from urpc.storage.json import JsonStorage try: from settings import temp_dir except ImportError: temp_dir = join(sep, "tmp"...
true
true
f7f93415a321fe5f7c6093662ae097ed6941f512
8,248
py
Python
zenml/steps/trainer/pytorch_trainers/torch_ff_trainer.py
ORG-MARS/zenml
8ee9a9264397d4e24a34c906e34a443782b189d3
[ "Apache-2.0" ]
1
2021-08-13T03:07:53.000Z
2021-08-13T03:07:53.000Z
zenml/steps/trainer/pytorch_trainers/torch_ff_trainer.py
ORG-MARS/zenml
8ee9a9264397d4e24a34c906e34a443782b189d3
[ "Apache-2.0" ]
null
null
null
zenml/steps/trainer/pytorch_trainers/torch_ff_trainer.py
ORG-MARS/zenml
8ee9a9264397d4e24a34c906e34a443782b189d3
[ "Apache-2.0" ]
null
null
null
# Copyright (c) maiot GmbH 2020. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at: # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
35.551724
84
0.579777
import os from typing import List, Text, Dict import torch import torch.nn as nn import torch.optim as optim import torch.utils.data as data from torch.utils.tensorboard import SummaryWriter from zenml.steps.trainer import TorchBaseTrainerStep from zenml.steps.trainer import utils from zenml.steps.trai...
true
true
f7f9343f8fae9608efa12d605fa88dcc017fb121
6,207
py
Python
classes/DomainSegmentor.py
egurapha/prot_domain_segmentor
407ae9f5ff37ae20a32f07dd46b85ef8201659e1
[ "MIT" ]
9
2018-09-20T02:45:08.000Z
2022-02-21T02:50:08.000Z
classes/DomainSegmentor.py
egurapha/prot_domain_segmentor
407ae9f5ff37ae20a32f07dd46b85ef8201659e1
[ "MIT" ]
null
null
null
classes/DomainSegmentor.py
egurapha/prot_domain_segmentor
407ae9f5ff37ae20a32f07dd46b85ef8201659e1
[ "MIT" ]
1
2021-04-26T00:15:28.000Z
2021-04-26T00:15:28.000Z
import os, sys sys.path.insert(0, 'model') from segmentor_model_v2 import * from segmentor_utils import * import torch from torch.autograd import Variable import numpy as np import torch.nn.functional as F import scipy.stats idx_to_class = {0: 'Unassigned (Loop)', 1: 'Orthogonal Bundle', ...
43.104167
225
0.586596
import os, sys sys.path.insert(0, 'model') from segmentor_model_v2 import * from segmentor_utils import * import torch from torch.autograd import Variable import numpy as np import torch.nn.functional as F import scipy.stats idx_to_class = {0: 'Unassigned (Loop)', 1: 'Orthogonal Bundle', ...
true
true
f7f935cfce095d6cc6f392874cf37d9947cd761d
1,791
py
Python
ward/tests/test_util.py
mkuyper/ward
526d582128db159959f40a123002f614ed31349b
[ "MIT" ]
null
null
null
ward/tests/test_util.py
mkuyper/ward
526d582128db159959f40a123002f614ed31349b
[ "MIT" ]
null
null
null
ward/tests/test_util.py
mkuyper/ward
526d582128db159959f40a123002f614ed31349b
[ "MIT" ]
null
null
null
import os from pathlib import Path from ward.tests.utilities import make_project from ward import test, using, fixture from ward.testing import each from ward.util import ( truncate, find_project_root, group_by, ) @fixture def s(): return "hello world" @test("truncate('{input}', num_chars={num_char...
22.961538
86
0.629816
import os from pathlib import Path from ward.tests.utilities import make_project from ward import test, using, fixture from ward.testing import each from ward.util import ( truncate, find_project_root, group_by, ) @fixture def s(): return "hello world" @test("truncate('{input}', num_chars={num_char...
true
true
f7f936d29596bc6308c69005269b9fca8bf3c209
3,835
py
Python
jase_im/jase_im/logger.py
chenomg/blog.jase.im_v0.1
41e77fae1435f2c16701d982bd71fddbd399508e
[ "MIT" ]
2
2019-02-22T16:09:35.000Z
2019-11-27T10:22:49.000Z
jase_im/jase_im/logger.py
chenomg/blog.jase.im_v0.1
41e77fae1435f2c16701d982bd71fddbd399508e
[ "MIT" ]
3
2018-12-22T13:40:15.000Z
2020-06-05T19:26:48.000Z
jase_im/jase_im/logger.py
chenomg/blog.jase.im_v0.1
41e77fae1435f2c16701d982bd71fddbd399508e
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os import re BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) BASE_LOG_DIR = os.path.join(BASE_DIR, "logs") find_connectionpool = re.compile(r'connectionpool') def set_connectionpool_debug(record): # 设置日志过滤器 if record.exc_info: ...
32.226891
76
0.504302
import os import re BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) BASE_LOG_DIR = os.path.join(BASE_DIR, "logs") find_connectionpool = re.compile(r'connectionpool') def set_connectionpool_debug(record): if record.exc_info: exc_type, exc_value = record.exc_info[:2] ...
true
true
f7f93704e822608575b10511e26a82120c9c5b7a
2,632
py
Python
test/testQListWidget.py
WuNull/findmovie
29d3ef6fe2282f48be57780f5e8366de1d3479a6
[ "Apache-2.0" ]
1
2019-11-26T07:03:06.000Z
2019-11-26T07:03:06.000Z
test/testQListWidget.py
WuNull/findmovie
29d3ef6fe2282f48be57780f5e8366de1d3479a6
[ "Apache-2.0" ]
null
null
null
test/testQListWidget.py
WuNull/findmovie
29d3ef6fe2282f48be57780f5e8366de1d3479a6
[ "Apache-2.0" ]
null
null
null
import sys import json from PyQt5.QtWidgets import * from PyQt5.QtGui import * from PyQt5.QtCore import * from PyQt5 import QtCore, QtGui, QtWidgets class Ui_MainWindow(object): """ 自动生成的代码, 请不要修改 """ def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") Mai...
36.555556
107
0.639058
import sys import json from PyQt5.QtWidgets import * from PyQt5.QtGui import * from PyQt5.QtCore import * from PyQt5 import QtCore, QtGui, QtWidgets class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(455, 357) self...
true
true
f7f937e853eeb1035d79856c7ab46c6aced76acd
5,511
py
Python
serve_db/vizapi.py
IBM/covid19-india-data
e2be04e74e753fbd1b1580f62856bf7335b95d33
[ "MIT" ]
20
2021-08-15T19:00:57.000Z
2022-03-28T21:23:28.000Z
serve_db/vizapi.py
IBM/covid19-india-data
e2be04e74e753fbd1b1580f62856bf7335b95d33
[ "MIT" ]
78
2021-08-17T22:34:39.000Z
2022-01-06T02:49:30.000Z
serve_db/vizapi.py
IBM/covid19-india-data
e2be04e74e753fbd1b1580f62856bf7335b95d33
[ "MIT" ]
8
2021-08-30T19:35:27.000Z
2022-02-08T14:07:10.000Z
import sqlite3 import pandas as pd import json def get_queries(): CONFIGPATH = './configs/visualization.sql.json' with open(CONFIGPATH, 'r') as f: queries = json.load(f) return queries def get_generic_query_result(db_uri, queryid, return_csv=True): queries = get_queries() query = querie...
30.447514
120
0.65215
import sqlite3 import pandas as pd import json def get_queries(): CONFIGPATH = './configs/visualization.sql.json' with open(CONFIGPATH, 'r') as f: queries = json.load(f) return queries def get_generic_query_result(db_uri, queryid, return_csv=True): queries = get_queries() query = querie...
true
true
f7f9387f465eb1d8b8faca50add2f091dad1ce73
711
py
Python
.history/postImages/index_20201006185606.py
Lambda-School-Labs/Labs27-C-Bridges-To-Prosperity-BE
9a8289d8550115362c46dea3ed8570b789c09a10
[ "MIT" ]
2
2020-10-21T22:14:15.000Z
2020-10-21T22:14:16.000Z
.history/postImages/index_20201006185606.py
Lambda-School-Labs/Labs27-C-Bridges-To-Prosperity-BE
9a8289d8550115362c46dea3ed8570b789c09a10
[ "MIT" ]
null
null
null
.history/postImages/index_20201006185606.py
Lambda-School-Labs/Labs27-C-Bridges-To-Prosperity-BE
9a8289d8550115362c46dea3ed8570b789c09a10
[ "MIT" ]
null
null
null
import csv import requests df = open("bridgeData3.csv",'r').readlines() fin = open('final.csv','r').readlines() finCsv = fin[1:] # url = https://b2ptc.herokuapp.com/bridges finalCsv = df[1:] obj = {} for i in finalCsv: x = i.split(',') obj[x[1]] = {'bridge_name':x[0],'proj_code':x[1],'before_img':x[2],'after_im...
29.625
97
0.637131
import csv import requests df = open("bridgeData3.csv",'r').readlines() fin = open('final.csv','r').readlines() finCsv = fin[1:] finalCsv = df[1:] obj = {} for i in finalCsv: x = i.split(',') obj[x[1]] = {'bridge_name':x[0],'proj_code':x[1],'before_img':x[2],'after_img':x[3]} print(finCsv[0]) for i in finCs...
true
true
f7f939cd9e9e7cce717c5d8c9b17638fa7af00fe
8,915
py
Python
histogram.py
mcm7f/thesis
412f35de9b1ce25ed4447d077a2a5292a57063f9
[ "MIT" ]
1
2015-07-24T04:26:45.000Z
2015-07-24T04:26:45.000Z
histogram.py
mcm7f/thesis
412f35de9b1ce25ed4447d077a2a5292a57063f9
[ "MIT" ]
null
null
null
histogram.py
mcm7f/thesis
412f35de9b1ce25ed4447d077a2a5292a57063f9
[ "MIT" ]
null
null
null
# Need to parse .csv log files, process them, and plot results # in an organize fashion. # Thesis work # Michael C. Murphy # Code started: March 1, 2016 import sys import numpy as np import matplotlib.pyplot as plt import matplotlib.image as mpimg import matplotlib.mlab as mlab # what is this? from math import log...
30.118243
157
0.599663
import sys import numpy as np import matplotlib.pyplot as plt import matplotlib.image as mpimg import matplotlib.mlab as mlab from math import log from statistics import variance import time def main(): print( "Detected", len(sys.argv), "arguments") x = [] y = [] ...
true
true
f7f939dbed1408a7a84c24d2e2225ab404aee461
3,655
py
Python
datahub/search/omis/models.py
Staberinde/data-hub-api
3d0467dbceaf62a47158eea412a3dba827073300
[ "MIT" ]
null
null
null
datahub/search/omis/models.py
Staberinde/data-hub-api
3d0467dbceaf62a47158eea412a3dba827073300
[ "MIT" ]
4
2021-06-30T10:34:50.000Z
2021-06-30T10:34:51.000Z
datahub/search/omis/models.py
Staberinde/data-hub-api
3d0467dbceaf62a47158eea412a3dba827073300
[ "MIT" ]
null
null
null
from elasticsearch_dsl import Boolean, Date, Integer, Keyword, Text from datahub.search import dict_utils from datahub.search import fields from datahub.search.models import BaseESModel class Order(BaseESModel): """Elasticsearch representation of Order model.""" id = Keyword() reference = fields.Normali...
34.481132
99
0.681532
from elasticsearch_dsl import Boolean, Date, Integer, Keyword, Text from datahub.search import dict_utils from datahub.search import fields from datahub.search.models import BaseESModel class Order(BaseESModel): id = Keyword() reference = fields.NormalizedKeyword( fields={ 'trigram': fie...
true
true
f7f939dcb0a5a76dbe6ecd96c79470376e34207d
5,110
py
Python
python_experiments/data_analysis/figures_icde19/opt_gpu.py
mexuaz/AccTrussDecomposition
15a9e8fd2f123f5acace5f3b40b94f1a74eb17d4
[ "MIT" ]
9
2020-03-30T13:00:15.000Z
2022-03-17T13:40:17.000Z
python_experiments/data_analysis/figures_icde19/opt_gpu.py
mexuaz/AccTrussDecomposition
15a9e8fd2f123f5acace5f3b40b94f1a74eb17d4
[ "MIT" ]
null
null
null
python_experiments/data_analysis/figures_icde19/opt_gpu.py
mexuaz/AccTrussDecomposition
15a9e8fd2f123f5acace5f3b40b94f1a74eb17d4
[ "MIT" ]
2
2020-08-17T10:05:51.000Z
2020-08-30T22:57:55.000Z
import json import matplotlib import matplotlib.pyplot as plt import numpy as np from data_analysis.figures_icde19.general_config import * from data_analysis.figures_icde19.parse_overall.parse_gpu_results import varying_gpu_tag, summary_tag, \ off_tc_tag, off_cpu_iep_tag, off_gpu_iep_tag, off_iep_total_tag, confi...
35.985915
108
0.683366
import json import matplotlib import matplotlib.pyplot as plt import numpy as np from data_analysis.figures_icde19.general_config import * from data_analysis.figures_icde19.parse_overall.parse_gpu_results import varying_gpu_tag, summary_tag, \ off_tc_tag, off_cpu_iep_tag, off_gpu_iep_tag, off_iep_total_tag, confi...
true
true
f7f93aac7b9d793ef23c38a97b1f3ca8216eaa8d
24,348
py
Python
samples/python/efficientdet/create_onnx.py
L-Net-1992/TensorRT
34b664d404001bd724cb56b52a6e0e05e1fd97f2
[ "Apache-2.0" ]
null
null
null
samples/python/efficientdet/create_onnx.py
L-Net-1992/TensorRT
34b664d404001bd724cb56b52a6e0e05e1fd97f2
[ "Apache-2.0" ]
null
null
null
samples/python/efficientdet/create_onnx.py
L-Net-1992/TensorRT
34b664d404001bd724cb56b52a6e0e05e1fd97f2
[ "Apache-2.0" ]
null
null
null
# # SPDX-FileCopyrightText: Copyright (c) 1993-2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # # 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...
53.986696
122
0.619065
import os import sys import argparse import logging import tensorflow as tf import onnx_graphsurgeon as gs import numpy as np import onnx from onnx import shape_inference from tf2onnx import tfonnx, optimizer, tf_loader import onnx_utils logging.basicConfig(level=logging.INFO) logging.getLogger("Eff...
true
true
f7f93b1f00383659b470b49241c9a0c547bacbf6
1,605
py
Python
test/vanilla/low-level/AcceptanceTests/utils.py
cfculhane/autorest.python
8cbca95faee88d933a58bbbd17b76834faa8d387
[ "MIT" ]
35
2018-04-03T12:15:53.000Z
2022-03-11T14:03:34.000Z
test/vanilla/low-level/AcceptanceTests/utils.py
cfculhane/autorest.python
8cbca95faee88d933a58bbbd17b76834faa8d387
[ "MIT" ]
652
2017-08-28T22:44:41.000Z
2022-03-31T21:20:31.000Z
test/vanilla/low-level/AcceptanceTests/utils.py
cfculhane/autorest.python
8cbca95faee88d933a58bbbd17b76834faa8d387
[ "MIT" ]
29
2017-08-28T20:57:01.000Z
2022-03-11T14:03:38.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. # # The MIT License (MIT) # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the ...
41.153846
78
0.686604
import json try: JSON_DECODE_ERROR = json.decoder.JSONDecodeError except: JSON_DECODE_ERROR = ValueError def dicts_equal(dict_one, dict_two): assert set(dict_one.keys()) == set(dict_two.keys()) for key in dict_one.keys(): assert dict_one[key] == dict_two[key]
true
true
f7f93b2b0e2d59856c9592423223414faa95744e
356
py
Python
mushroom_rl/environments/mujoco_envs/humanoid_gait/reward_goals/__init__.py
PuzeLiu/mushroom-rl
99942b425e66b4ddcc26009d7105dde23841e95d
[ "MIT" ]
344
2020-01-10T09:45:02.000Z
2022-03-30T09:48:28.000Z
mushroom_rl/environments/mujoco_envs/humanoid_gait/reward_goals/__init__.py
AmmarFahmy/mushroom-rl
2625ee7f64d5613b3b9fba00f0b7a39fece88ca5
[ "MIT" ]
44
2020-01-23T03:00:56.000Z
2022-03-25T17:14:22.000Z
mushroom_rl/environments/mujoco_envs/humanoid_gait/reward_goals/__init__.py
AmmarFahmy/mushroom-rl
2625ee7f64d5613b3b9fba00f0b7a39fece88ca5
[ "MIT" ]
93
2020-01-10T21:17:58.000Z
2022-03-31T17:58:52.000Z
from .reward import NoGoalReward, MaxVelocityReward, \ VelocityProfileReward, CompleteTrajectoryReward from .trajectory import HumanoidTrajectory from .velocity_profile import VelocityProfile, PeriodicVelocityProfile,\ SinVelocityProfile, ConstantVelocityProfile, RandomConstantVelocityProfile,\ SquareWave...
39.555556
80
0.853933
from .reward import NoGoalReward, MaxVelocityReward, \ VelocityProfileReward, CompleteTrajectoryReward from .trajectory import HumanoidTrajectory from .velocity_profile import VelocityProfile, PeriodicVelocityProfile,\ SinVelocityProfile, ConstantVelocityProfile, RandomConstantVelocityProfile,\ SquareWave...
true
true
f7f93b72d7a3d33d74baf1209fc7fd13fb46c029
2,409
py
Python
tabcmd/commands/extracts/create_extracts_command.py
tableau/tabcmd
a6a44795b2568933505dfc8c443ee16542c9e4c0
[ "MIT" ]
3
2022-02-15T03:07:51.000Z
2022-03-09T13:14:52.000Z
tabcmd/commands/extracts/create_extracts_command.py
tableau/tabcmd
a6a44795b2568933505dfc8c443ee16542c9e4c0
[ "MIT" ]
57
2022-01-31T22:33:17.000Z
2022-03-28T22:05:53.000Z
tabcmd/commands/extracts/create_extracts_command.py
tableau/tabcmd
a6a44795b2568933505dfc8c443ee16542c9e4c0
[ "MIT" ]
2
2022-02-23T23:05:35.000Z
2022-03-03T21:32:53.000Z
import tableauserverclient as TSC from tabcmd.commands.auth.session import Session from tabcmd.commands.constants import Errors from tabcmd.commands.server import Server from tabcmd.execution.global_options import * from tabcmd.execution.localize import _ from tabcmd.execution.logger_config import log class CreateEx...
39.491803
95
0.669157
import tableauserverclient as TSC from tabcmd.commands.auth.session import Session from tabcmd.commands.constants import Errors from tabcmd.commands.server import Server from tabcmd.execution.global_options import * from tabcmd.execution.localize import _ from tabcmd.execution.logger_config import log class CreateEx...
true
true
f7f93bad412e1d38fd7994b3fe862a4715f992ee
833
py
Python
record_audio.py
noorkhokhar99/24_hours_recoding
d6718966af8bf4584d15bb290ed07cc5f132ecbe
[ "MIT" ]
1
2021-05-05T12:39:17.000Z
2021-05-05T12:39:17.000Z
record_audio.py
noorkhokhar99/24_hours_recoding
d6718966af8bf4584d15bb290ed07cc5f132ecbe
[ "MIT" ]
null
null
null
record_audio.py
noorkhokhar99/24_hours_recoding
d6718966af8bf4584d15bb290ed07cc5f132ecbe
[ "MIT" ]
null
null
null
import pyaudio import wave filename = "record.wav" chunk = 1024 FORMAT = pyaudio.paInt16 channels = 1 sample_rate = 44100 record_seconds = 86400 # print(record_seconds) p = pyaudio.PyAudio() # print(p) stream = p.open(format=FORMAT, channels=channels, rate=sample_rate,...
19.372093
49
0.630252
import pyaudio import wave filename = "record.wav" chunk = 1024 FORMAT = pyaudio.paInt16 channels = 1 sample_rate = 44100 record_seconds = 86400 p = pyaudio.PyAudio() stream = p.open(format=FORMAT, channels=channels, rate=sample_rate, input=True, ...
true
true
f7f93bc06a539571f1cd61f2a7aba9ee08ba5996
11,835
py
Python
hsjang/saitest/testListFeature.py
harrisonjang/testapp
f363dab1a480c788ca925ed42e7830e626e8c0de
[ "Apache-2.0" ]
null
null
null
hsjang/saitest/testListFeature.py
harrisonjang/testapp
f363dab1a480c788ca925ed42e7830e626e8c0de
[ "Apache-2.0" ]
null
null
null
hsjang/saitest/testListFeature.py
harrisonjang/testapp
f363dab1a480c788ca925ed42e7830e626e8c0de
[ "Apache-2.0" ]
null
null
null
#Contains List of tests test_featureRegressionUT = [ 'saiQosEgressFlowPolicer', 'saiQosEgressFlowPolicer', ] crm_featureRegressionUT = [ 'saiCrmFdbStaticTest', #FIXME: ac5p 'saiCrmFdbDynamicTest_1', 'saiCrmFdbDynamicTest_2', 'saiCrmFdbDynamicTest_3', 'saiCrmAclTableTest', 'saiCrmAclCounter', 'saiCrmAclGroup', 'saiCrmA...
27.144495
84
0.845289
test_featureRegressionUT = [ 'saiQosEgressFlowPolicer', 'saiQosEgressFlowPolicer', ] crm_featureRegressionUT = [ 'saiCrmFdbStaticTest', 'saiCrmFdbDynamicTest_1', 'saiCrmFdbDynamicTest_2', 'saiCrmFdbDynamicTest_3', 'saiCrmAclTableTest', 'saiCrmAclCounter', 'saiCrmAclGroup', 'saiCrmAclTableEntry', 'saiCrmIpv4RouteTest...
true
true
f7f93d2d56c2073e4cb0f9350377c52ec8f41ad7
26,058
py
Python
sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_diagnostic_operations.py
mohamedshabanofficial/azure-sdk-for-python
81c585f310cd2ec23d2ad145173958914a075a58
[ "MIT" ]
2
2021-03-24T06:26:11.000Z
2021-04-18T15:55:59.000Z
sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_diagnostic_operations.py
mohamedshabanofficial/azure-sdk-for-python
81c585f310cd2ec23d2ad145173958914a075a58
[ "MIT" ]
2
2021-11-03T06:10:36.000Z
2021-12-01T06:29:39.000Z
sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_diagnostic_operations.py
mohamedshabanofficial/azure-sdk-for-python
81c585f310cd2ec23d2ad145173958914a075a58
[ "MIT" ]
1
2021-05-19T02:55:10.000Z
2021-05-19T02:55:10.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
51.498024
208
0.657341
from typing import TYPE_CHECKING import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport impor...
true
true
f7f93dd897f60ba55b61ad8da80c4ef1c2949a55
2,782
py
Python
benchmark/lsh_benchmark_plot.py
yrik/datasketch
82d9639bc0011932a952bbae1d4b5bd5ac03c7c8
[ "MIT" ]
1
2019-06-05T15:06:08.000Z
2019-06-05T15:06:08.000Z
benchmark/lsh_benchmark_plot.py
yrik/datasketch
82d9639bc0011932a952bbae1d4b5bd5ac03c7c8
[ "MIT" ]
null
null
null
benchmark/lsh_benchmark_plot.py
yrik/datasketch
82d9639bc0011932a952bbae1d4b5bd5ac03c7c8
[ "MIT" ]
2
2018-11-12T18:00:52.000Z
2022-03-21T05:36:20.000Z
import json, sys, argparse import numpy as np import matplotlib matplotlib.use("Agg") import matplotlib.pyplot as plt def get_precision_recall(found, reference): reference = set(reference) intersect = sum(1 for i in found if i in reference) if len(found) == 0: precision = 0.0 else: pre...
37.594595
89
0.663911
import json, sys, argparse import numpy as np import matplotlib matplotlib.use("Agg") import matplotlib.pyplot as plt def get_precision_recall(found, reference): reference = set(reference) intersect = sum(1 for i in found if i in reference) if len(found) == 0: precision = 0.0 else: pre...
true
true
f7f93f56302e4afd3d3981bed46985d9836be30c
1,529
py
Python
diagnostics/AE_time_loop_grad.py
scheng1992/Data_Assimilation
b4d43895229205ee2cd16b15ee20beccb33b71d6
[ "MIT" ]
1
2021-11-25T12:46:48.000Z
2021-11-25T12:46:48.000Z
diagnostics/AE_time_loop_grad.py
bugsuse/Data_Assimilation
2965ccf78951df11f8686282cd6814bae18afde5
[ "MIT" ]
null
null
null
diagnostics/AE_time_loop_grad.py
bugsuse/Data_Assimilation
2965ccf78951df11f8686282cd6814bae18afde5
[ "MIT" ]
2
2021-03-02T13:29:34.000Z
2022-03-12T11:01:08.000Z
import torch import sys, os sys.path.append(os.getcwd()) #to import pipeline from pipeline.utils import ML_utils as ML from pipeline.AutoEncoders import ToyAE from pipeline import utils import time import matplotlib.pyplot as plt def plot_time_w_output(outputs, inn, hidden, batch_sz, loop=True, no_batch=False): ...
24.269841
94
0.603009
import torch import sys, os sys.path.append(os.getcwd()) from pipeline.utils import ML_utils as ML from pipeline.AutoEncoders import ToyAE from pipeline import utils import time import matplotlib.pyplot as plt def plot_time_w_output(outputs, inn, hidden, batch_sz, loop=True, no_batch=False): T_2s = [] T_1...
true
true
f7f93f796fa58111d4b3534adb7af35b1ee8eead
1,123
py
Python
malaya_speech/train/model/pix2pix/discriminator.py
ishine/malaya-speech
fd34afc7107af1656dff4b3201fa51dda54fde18
[ "MIT" ]
111
2020-08-31T04:58:54.000Z
2022-03-29T15:44:18.000Z
malaya_speech/train/model/pix2pix/discriminator.py
ishine/malaya-speech
fd34afc7107af1656dff4b3201fa51dda54fde18
[ "MIT" ]
14
2020-12-16T07:27:22.000Z
2022-03-15T17:39:01.000Z
malaya_speech/train/model/pix2pix/discriminator.py
ishine/malaya-speech
fd34afc7107af1656dff4b3201fa51dda54fde18
[ "MIT" ]
29
2021-02-09T08:57:15.000Z
2022-03-12T14:09:19.000Z
import tensorflow as tf from .layer import * class Discriminator: def __init__(self, inputs, targets, ndf=64): n_layers = 3 layers = [] input = tf.concat([inputs, targets], axis=3) with tf.variable_scope('layer_1'): convolved = discrim_conv(input, ndf, stride=2) ...
36.225806
73
0.548531
import tensorflow as tf from .layer import * class Discriminator: def __init__(self, inputs, targets, ndf=64): n_layers = 3 layers = [] input = tf.concat([inputs, targets], axis=3) with tf.variable_scope('layer_1'): convolved = discrim_conv(input, ndf, stride=2) ...
true
true
f7f93fbcc5d69ad0e6a57642ce60898248c5b51e
4,181
py
Python
swig/python/gdal-utils/osgeo_utils/samples/get_soundg.py
gajgeospatial/gdal-3.4.1
808ab4e7ffb8a2a1517557ac9fccf933f7479c4e
[ "Apache-2.0" ]
null
null
null
swig/python/gdal-utils/osgeo_utils/samples/get_soundg.py
gajgeospatial/gdal-3.4.1
808ab4e7ffb8a2a1517557ac9fccf933f7479c4e
[ "Apache-2.0" ]
null
null
null
swig/python/gdal-utils/osgeo_utils/samples/get_soundg.py
gajgeospatial/gdal-3.4.1
808ab4e7ffb8a2a1517557ac9fccf933f7479c4e
[ "Apache-2.0" ]
1
2022-03-17T16:01:01.000Z
2022-03-17T16:01:01.000Z
#!/usr/bin/env python3 ############################################################################### # $Id: get_soundg.py e4fe7cc06270e5f38dfe78e6785a6bcca4e39e29 2021-04-01 21:02:04 +0300 Idan Miara $ # # Project: OGR Python samples # Purpose: Extract SOUNDGings from an S-57 dataset, and write them to # ...
32.664063
100
0.609663
true
true
f7f93fe0777d750e8f8b5be60ef838282cfbdd79
13,227
py
Python
src/train.py
Omkar-Ranadive/Fine-Tuning-BERT
b046092ec4007a4a59e1a478576cca7557c18d76
[ "Apache-2.0" ]
1
2020-05-24T03:21:25.000Z
2020-05-24T03:21:25.000Z
src/train.py
Omkar-Ranadive/Fine-Tuning-BERT
b046092ec4007a4a59e1a478576cca7557c18d76
[ "Apache-2.0" ]
null
null
null
src/train.py
Omkar-Ranadive/Fine-Tuning-BERT
b046092ec4007a4a59e1a478576cca7557c18d76
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """ Main training workflow """ from __future__ import division import argparse import glob import os import random import signal import time import torch from pytorch_pretrained_bert import BertConfig import distributed from models import data_loader, model_builder from models.data_loader i...
36.946927
148
0.631889
from __future__ import division import argparse import glob import os import random import signal import time import torch from pytorch_pretrained_bert import BertConfig import distributed from models import data_loader, model_builder from models.data_loader import load_dataset from models.model_builder import Summ...
true
true
f7f940cd5dd89ae570d03c068b44b22dfe6b1f45
7,344
py
Python
app/modules/ui_functions/functions.py
SurfonL/Crest
5f457e9d2290e52b3a6f70f6abc0c29e07c11e78
[ "MIT" ]
null
null
null
app/modules/ui_functions/functions.py
SurfonL/Crest
5f457e9d2290e52b3a6f70f6abc0c29e07c11e78
[ "MIT" ]
null
null
null
app/modules/ui_functions/functions.py
SurfonL/Crest
5f457e9d2290e52b3a6f70f6abc0c29e07c11e78
[ "MIT" ]
null
null
null
# /////////////////////////////////////////////////////////////// # # BY: WANDERSON M.PIMENTA # PROJECT MADE WITH: Qt Designer and PySide6 # V: 1.0.0 # # This project can be used freely for all uses, as long as they maintain the # respective credits only in the Python scripts, any information in the visual # interface ...
41.727273
136
0.565087
from app.packages.pyside_or_pyqt import * from app.packages.widgets import * from app.uis.main_window.ui_main import Ui_MainWindow from app.modules.app_settings.settings import * _is_maximized = False class UiFunctions: def __init__(self): super(UiFunctions, self).__init__() ...
true
true
f7f942d875fe01b9d5785d51436c41ed2e79286d
8,194
py
Python
specutils/io/registers.py
aragilar/specutils
f3b5862fd0ea18fb9fe9973355e4169669c0675f
[ "BSD-3-Clause" ]
null
null
null
specutils/io/registers.py
aragilar/specutils
f3b5862fd0ea18fb9fe9973355e4169669c0675f
[ "BSD-3-Clause" ]
null
null
null
specutils/io/registers.py
aragilar/specutils
f3b5862fd0ea18fb9fe9973355e4169669c0675f
[ "BSD-3-Clause" ]
null
null
null
""" A module containing the mechanics of the specutils io registry. """ import os import pathlib import sys from functools import wraps import logging from astropy.io import registry as io_registry from ..spectra import Spectrum1D, SpectrumList, SpectrumCollection __all__ = ['data_loader', 'custom_writer', 'get_load...
36.580357
98
0.619722
import os import pathlib import sys from functools import wraps import logging from astropy.io import registry as io_registry from ..spectra import Spectrum1D, SpectrumList, SpectrumCollection __all__ = ['data_loader', 'custom_writer', 'get_loaders_by_extension', 'identify_spectrum_format'] log = logging.getLogger(...
true
true
f7f9439c7b0c7375a65ae91f38df3d64c0a1d626
6,056
py
Python
tests/libtests/feassemble/data/obsolete/feutils.py
Grant-Block/pylith
f6338261b17551eba879da998a5aaf2d91f5f658
[ "MIT" ]
93
2015-01-08T16:41:22.000Z
2022-02-25T13:40:02.000Z
tests/libtests/feassemble/data/obsolete/feutils.py
Grant-Block/pylith
f6338261b17551eba879da998a5aaf2d91f5f658
[ "MIT" ]
277
2015-02-20T16:27:35.000Z
2022-03-30T21:13:09.000Z
tests/libtests/feassemble/data/obsolete/feutils.py
Grant-Block/pylith
f6338261b17551eba879da998a5aaf2d91f5f658
[ "MIT" ]
71
2015-03-24T12:11:08.000Z
2022-03-03T04:26:02.000Z
#!/usr/bin/env python # # ---------------------------------------------------------------------- # # Brad T. Aagaard, U.S. Geological Survey # Charles A. Williams, GNS Science # Matthew G. Knepley, University of Chicago # # This code was developed as part of the Computational Infrastructure # for Geodynamics (http://ge...
38.08805
83
0.537318
adPts = quadrature.numQuadPts cellDim = quadrature.cellDim spaceDim = quadrature.spaceDim numBasis = quadrature.numBasis jacobian = numpy.zeros( (numQuadPts, spaceDim, cellDim), dtype=numpy.float64) jacobianInv = numpy.zeros( (numQuadPts, cellDim, spaceDim), ...
true
true
f7f943f22faaa0fb7ddc145d36a51a8a2f138736
12,870
py
Python
utils/video_renderer.py
truongnhat-ryo/fsgan
6d074c553a4b2d4ea8c4bc586e25f13486e2301b
[ "CC0-1.0" ]
null
null
null
utils/video_renderer.py
truongnhat-ryo/fsgan
6d074c553a4b2d4ea8c4bc586e25f13486e2301b
[ "CC0-1.0" ]
null
null
null
utils/video_renderer.py
truongnhat-ryo/fsgan
6d074c553a4b2d4ea8c4bc586e25f13486e2301b
[ "CC0-1.0" ]
null
null
null
import numpy as np import cv2 import torch import torch.multiprocessing as mp from fsgan.utils.img_utils import tensor2bgr from fsgan.utils.bbox_utils import crop2img, scale_bbox, crop2img_smooth_version from fsgan.face_enhance.retinaface.retinaface_detection import RetinaFaceDetection from fsgan.face_enhance.face_mod...
43.187919
133
0.627972
import numpy as np import cv2 import torch import torch.multiprocessing as mp from fsgan.utils.img_utils import tensor2bgr from fsgan.utils.bbox_utils import crop2img, scale_bbox, crop2img_smooth_version from fsgan.face_enhance.retinaface.retinaface_detection import RetinaFaceDetection from fsgan.face_enhance.face_mod...
true
true
f7f94412ee93788a4449bdd3bb4f5358d5c9bb5e
997
py
Python
var/spack/repos/builtin/packages/py-google-auth/package.py
RemoteConnectionManager/spack
f2967b6c16effd26ce007cf86cadbb645c574f50
[ "ECL-2.0", "Apache-2.0", "MIT" ]
2
2020-10-15T01:08:42.000Z
2021-10-18T01:28:18.000Z
var/spack/repos/builtin/packages/py-google-auth/package.py
openbiox/spack
bb6ec7fb40c14b37e094a860e3625af53f633174
[ "ECL-2.0", "Apache-2.0", "MIT" ]
17
2018-09-20T18:32:50.000Z
2019-12-04T16:58:12.000Z
var/spack/repos/builtin/packages/py-google-auth/package.py
openbiox/spack
bb6ec7fb40c14b37e094a860e3625af53f633174
[ "ECL-2.0", "Apache-2.0", "MIT" ]
5
2019-07-30T09:42:14.000Z
2021-01-25T05:39:20.000Z
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyGoogleAuth(PythonPackage): """This library simplifies using Google's various server-to-s...
41.541667
95
0.7001
from spack import * class PyGoogleAuth(PythonPackage): homepage = "https://github.com/GoogleCloudPlatform/google-auth-library-python" url = "https://pypi.io/packages/source/g/google-auth/google-auth-1.6.3.tar.gz" version('1.6.3', sha256='0f7c6a64927d34c1a474da92cfc59e552a5d3b940d3266606c6a28b7...
true
true
f7f945b2cd620314831ac01ca2aeb2da1577cb10
156
py
Python
src/libsncompress/__init__.py
congma/libsncompress
ef0c8ee36b8a53b6106ade675d5210fa6e4d5409
[ "BSD-3-Clause" ]
1
2018-03-12T14:40:08.000Z
2018-03-12T14:40:08.000Z
src/libsncompress/__init__.py
congma/libsncompress
ef0c8ee36b8a53b6106ade675d5210fa6e4d5409
[ "BSD-3-Clause" ]
null
null
null
src/libsncompress/__init__.py
congma/libsncompress
ef0c8ee36b8a53b6106ade675d5210fa6e4d5409
[ "BSD-3-Clause" ]
null
null
null
from .base import BinnedSN from .binning import BinCollection from .evaluator import CovEvaluator __all__ = ["BinnedSN", "BinCollection", "CovEvaluator"]
22.285714
55
0.788462
from .base import BinnedSN from .binning import BinCollection from .evaluator import CovEvaluator __all__ = ["BinnedSN", "BinCollection", "CovEvaluator"]
true
true
f7f94653905413c88a1a6e46ea4abeaa4215b711
21,395
py
Python
lib/googlecloudsdk/third_party/apis/tpu/v1alpha1/tpu_v1alpha1_client.py
bopopescu/Google-Cloud-SDK-1
c4683bacb2f6192d8a816932e438a0493085469b
[ "Apache-2.0" ]
null
null
null
lib/googlecloudsdk/third_party/apis/tpu/v1alpha1/tpu_v1alpha1_client.py
bopopescu/Google-Cloud-SDK-1
c4683bacb2f6192d8a816932e438a0493085469b
[ "Apache-2.0" ]
null
null
null
lib/googlecloudsdk/third_party/apis/tpu/v1alpha1/tpu_v1alpha1_client.py
bopopescu/Google-Cloud-SDK-1
c4683bacb2f6192d8a816932e438a0493085469b
[ "Apache-2.0" ]
1
2020-07-24T20:13:29.000Z
2020-07-24T20:13:29.000Z
"""Generated client library for tpu version v1alpha1.""" # NOTE: This file is autogenerated and should not be edited by hand. from apitools.base.py import base_api from googlecloudsdk.third_party.apis.tpu.v1alpha1 import tpu_v1alpha1_messages as messages class TpuV1alpha1(base_api.BaseApiClient): """Generated clien...
39.113346
118
0.694882
from apitools.base.py import base_api from googlecloudsdk.third_party.apis.tpu.v1alpha1 import tpu_v1alpha1_messages as messages class TpuV1alpha1(base_api.BaseApiClient): MESSAGES_MODULE = messages BASE_URL = u'https://tpu.googleapis.com/' _PACKAGE = u'tpu' _SCOPES = [u'https://www.googleapis.com/auth/clo...
true
true
f7f94685094d6f2510a1731fd8a684fc2dc7f096
2,036
py
Python
src/sqapi/messaging/brokers/kafka.py
mabruras/sqapi
e4fa8d800b57a5017b5a48f7cf459d171e69946d
[ "MIT" ]
3
2019-06-25T05:55:06.000Z
2020-06-21T03:30:53.000Z
src/sqapi/messaging/brokers/kafka.py
mabruras/sqapi
e4fa8d800b57a5017b5a48f7cf459d171e69946d
[ "MIT" ]
null
null
null
src/sqapi/messaging/brokers/kafka.py
mabruras/sqapi
e4fa8d800b57a5017b5a48f7cf459d171e69946d
[ "MIT" ]
null
null
null
#! /usr/bin/env python import logging import time from kafka import KafkaConsumer log = logging.getLogger(__name__) class Listener: def __init__(self, config: dict, process_message): self.config = config if config else dict() self.pm_callback = process_message log.info('Loading Kafka') ...
33.933333
102
0.600196
import logging import time from kafka import KafkaConsumer log = logging.getLogger(__name__) class Listener: def __init__(self, config: dict, process_message): self.config = config if config else dict() self.pm_callback = process_message log.info('Loading Kafka') self.retry_in...
true
true
f7f947668d87730d6af70415ef3b6ce7ca2134f5
85
py
Python
library-scrapper/views/InductionCoil.py
mir3z/life.js
b6936a881ec5f7d425ef5419daea3049d4c24df7
[ "MIT" ]
1
2021-07-13T11:06:50.000Z
2021-07-13T11:06:50.000Z
library-scrapper/views/InductionCoil.py
mir3z/life.js
b6936a881ec5f7d425ef5419daea3049d4c24df7
[ "MIT" ]
2
2021-03-09T09:46:10.000Z
2021-05-09T13:54:07.000Z
library-scrapper/views/InductionCoil.py
mir3z/life.js
b6936a881ec5f7d425ef5419daea3049d4c24df7
[ "MIT" ]
1
2021-03-03T09:31:55.000Z
2021-03-03T09:31:55.000Z
from .View import View class InductionCoilView(View): type = "Induction Coil"
12.142857
30
0.717647
from .View import View class InductionCoilView(View): type = "Induction Coil"
true
true
f7f947f9095a297f23dbc9159b08a10b3643369f
25,238
py
Python
python/graphscope/nx/generators/random_graphs.py
haoxins/GraphScope
e1e22a425b5c33bed0dea930f8722e6159484153
[ "Apache-2.0" ]
2
2021-04-07T07:57:13.000Z
2021-11-19T09:44:01.000Z
python/graphscope/nx/generators/random_graphs.py
haoxins/GraphScope
e1e22a425b5c33bed0dea930f8722e6159484153
[ "Apache-2.0" ]
16
2021-12-22T09:19:25.000Z
2022-03-29T02:43:34.000Z
python/graphscope/nx/generators/random_graphs.py
haoxins/GraphScope
e1e22a425b5c33bed0dea930f8722e6159484153
[ "Apache-2.0" ]
2
2022-01-25T10:16:51.000Z
2022-02-07T11:51:20.000Z
# -*- coding: utf-8 -*- # # This file random_graphs.py is referred and derived from project NetworkX, # # https://github.com/networkx/networkx/blob/master/networkx/generators/random_graphs.py # # which has the following license: # # Copyright (C) 2004-2020, NetworkX Developers # Aric Hagberg <hagberg@lanl.gov> # Dan S...
34.059379
88
0.57881
import itertools import math from collections import defaultdict import networkx as nxa from networkx.utils import powerlaw_sequence from networkx.utils import py_random_state from graphscope import nx from graphscope.nx.generators.classic import complete_graph from graphscope.nx.generators.classi...
true
true
f7f94890a02109456d0629c13468f3a396acc4c1
3,001
py
Python
src/tensorforce/tensorforce/core/models/constant_model.py
linus87/drl_shape_optimization
39e6b66bd5b70dfce07e145aafe815071bc1b6fe
[ "MIT" ]
17
2020-12-28T16:25:47.000Z
2022-03-27T18:28:44.000Z
src/tensorforce/tensorforce/core/models/constant_model.py
linus87/drl_shape_optimization
39e6b66bd5b70dfce07e145aafe815071bc1b6fe
[ "MIT" ]
2
2021-04-18T03:40:02.000Z
2022-01-24T08:40:10.000Z
src/tensorforce/tensorforce/core/models/constant_model.py
linus87/drl_shape_optimization
39e6b66bd5b70dfce07e145aafe815071bc1b6fe
[ "MIT" ]
8
2020-12-23T05:59:52.000Z
2022-03-28T12:06:35.000Z
# Copyright 2018 Tensorforce Team. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
38.474359
96
0.639787
from collections import OrderedDict import tensorflow as tf from tensorforce import util from tensorforce.core.models import Model class ConstantModel(Model): def __init__( self, states, actions, scope, device, saver, summarizer, execution, parallel_interactions, ...
true
true
f7f948d092d21a5b4a27d8252472b7d1a151aa20
1,605
py
Python
detailsScrape/commaskd/commaskd20.py
Asyikin98/SkinFerm
72fd1ad6339c96adf5ec154bde566de9eb1472c3
[ "MIT" ]
null
null
null
detailsScrape/commaskd/commaskd20.py
Asyikin98/SkinFerm
72fd1ad6339c96adf5ec154bde566de9eb1472c3
[ "MIT" ]
2
2021-02-03T01:55:13.000Z
2021-04-30T12:46:33.000Z
detailsScrape/commaskd/commaskd20.py
Asyikin98/SkinFerm
72fd1ad6339c96adf5ec154bde566de9eb1472c3
[ "MIT" ]
null
null
null
import urllib.request import random from bs4 import BeautifulSoup from requests import get import mysql.connector conn = mysql.connector.connect(user="root", passwd="",host="localhost", database="product") cursor = conn.cursor() sql = """INSERT INTO commaskd (about, rate, top, comment, dari) VALUES (%s, %s, %s, %s, ...
35.666667
148
0.624299
import urllib.request import random from bs4 import BeautifulSoup from requests import get import mysql.connector conn = mysql.connector.connect(user="root", passwd="",host="localhost", database="product") cursor = conn.cursor() sql = """INSERT INTO commaskd (about, rate, top, comment, dari) VALUES (%s, %s, %s, %s, ...
true
true
f7f94a71a63aa4fcb0b46f82fae4fee4dd45441f
1,296
py
Python
src/waldur_openstack/openstack_tenant/migrations/0034_immutable_default_json.py
opennode/waldur-openstack
8a4170c09bdb8367493441016ef06081250fddb8
[ "MIT" ]
1
2017-11-07T19:53:57.000Z
2017-11-07T19:53:57.000Z
src/waldur_openstack/openstack_tenant/migrations/0034_immutable_default_json.py
opennode/waldur-openstack
8a4170c09bdb8367493441016ef06081250fddb8
[ "MIT" ]
null
null
null
src/waldur_openstack/openstack_tenant/migrations/0034_immutable_default_json.py
opennode/waldur-openstack
8a4170c09bdb8367493441016ef06081250fddb8
[ "MIT" ]
3
2017-09-24T03:11:19.000Z
2018-08-12T07:43:13.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.11.7 on 2018-07-03 17:09 from __future__ import unicode_literals from django.db import migrations import waldur_core.core.fields class Migration(migrations.Migration): dependencies = [ ('openstack_tenant', '0033_unique_instance_backend_id'), ] ope...
30.857143
132
0.614969
from __future__ import unicode_literals from django.db import migrations import waldur_core.core.fields class Migration(migrations.Migration): dependencies = [ ('openstack_tenant', '0033_unique_instance_backend_id'), ] operations = [ migrations.AlterField( model_name='inst...
true
true
f7f94ac3f31089c24b0d2beee5188d6442c953c4
2,501
py
Python
setup.py
molssi-seamm/loop_step
847da7f69a6fffaefc4655cb05ecf043f4adf64e
[ "BSD-3-Clause" ]
null
null
null
setup.py
molssi-seamm/loop_step
847da7f69a6fffaefc4655cb05ecf043f4adf64e
[ "BSD-3-Clause" ]
13
2019-08-21T13:34:02.000Z
2021-12-21T22:38:46.000Z
setup.py
molssi-seamm/loop_step
847da7f69a6fffaefc4655cb05ecf043f4adf64e
[ "BSD-3-Clause" ]
1
2022-01-16T11:40:19.000Z
2022-01-16T11:40:19.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """loop_step A SEAMM plug-in which provides loops in flowcharts. """ import sys from setuptools import setup, find_packages import versioneer short_description = __doc__.splitlines()[1] # from https://github.com/pytest-dev/pytest-runner#conditional-requirement needs_pyt...
28.101124
74
0.643743
import sys from setuptools import setup, find_packages import versioneer short_description = __doc__.splitlines()[1] ', 'test', 'ptr'}.intersection(sys.argv) pytest_runner = ['pytest-runner'] if needs_pytest else [] with open('README.rst') as readme_file: readme = readme_file.read() with open('HISTORY.rst')...
true
true
f7f94b6efd460bf8cf1b140206b0c56c8c6bdf68
9,716
py
Python
src/scripts/tests/test_suricata_alert_watcher.py
obsrvbl/ona
c0a3d464e1a53a41d1bc39c3595addf801b8b8ba
[ "Apache-2.0" ]
12
2018-03-20T21:39:10.000Z
2021-04-13T04:32:43.000Z
src/scripts/tests/test_suricata_alert_watcher.py
obsrvbl/ona
c0a3d464e1a53a41d1bc39c3595addf801b8b8ba
[ "Apache-2.0" ]
2
2018-09-18T16:35:36.000Z
2021-04-13T13:41:40.000Z
src/scripts/tests/test_suricata_alert_watcher.py
obsrvbl/ona
c0a3d464e1a53a41d1bc39c3595addf801b8b8ba
[ "Apache-2.0" ]
11
2017-07-24T12:51:40.000Z
2021-08-23T05:06:18.000Z
# Copyright 2015 Observable Networks # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
36.389513
75
0.656237
from datetime import datetime from glob import glob from os import path, rename from subprocess import CalledProcessError from tempfile import TemporaryDirectory from unittest import TestCase from unittest.mock import call, MagicMock, patch from ona_service.suricata_alert_watcher import ( _compress_lo...
true
true
f7f94bbe72953ace702554472502a6d69589d097
11,859
py
Python
jams/str2tex.py
MuellerSeb/jams_python
1bca04557da79d8f8a4c447f5ccc517c40ab7dfc
[ "MIT" ]
9
2019-06-03T03:24:16.000Z
2021-12-03T07:14:00.000Z
jams/str2tex.py
MuellerSeb/jams_python
1bca04557da79d8f8a4c447f5ccc517c40ab7dfc
[ "MIT" ]
6
2020-03-25T21:56:59.000Z
2021-11-08T14:58:27.000Z
jams/str2tex.py
MuellerSeb/jams_python
1bca04557da79d8f8a4c447f5ccc517c40ab7dfc
[ "MIT" ]
5
2019-10-17T12:04:33.000Z
2021-09-28T07:45:07.000Z
#!/usr/bin/env python from __future__ import division, absolute_import, print_function import numpy as np __all__ = ['str2tex'] def str2tex(strin, space2linebreak=False, bold=False, italic=False, usetex=True): """ Convert strings to LaTeX strings in math environement used by matplotlib's usetex. ...
53.904545
380
0.511089
from __future__ import division, absolute_import, print_function import numpy as np __all__ = ['str2tex'] def str2tex(strin, space2linebreak=False, bold=False, italic=False, usetex=True): if isinstance(strin, list): from copy import copy istrin = copy(strin) elif isinstance(strin, tupl...
true
true
f7f94c320e40536edc61fa1ee46b772e690b3986
3,880
py
Python
instaproject/settings.py
Michellemukami/the-hood
0a1aea481065bb3187ec6a74f09761a4332389fe
[ "MIT" ]
null
null
null
instaproject/settings.py
Michellemukami/the-hood
0a1aea481065bb3187ec6a74f09761a4332389fe
[ "MIT" ]
4
2020-06-05T22:57:54.000Z
2021-09-08T01:19:22.000Z
instaproject/settings.py
Michellemukami/the-hood
0a1aea481065bb3187ec6a74f09761a4332389fe
[ "MIT" ]
null
null
null
""" Django settings for instaproject project. Generated by 'django-admin startproject' using Django 1.11. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ """ import...
26.758621
91
0.703093
import os import django_heroku from decouple import config BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = '=yf(p_f0ad1-aab7lxq_bx^fgsx^p0hj2_v4_qg$1###81x*j*' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', '...
true
true
f7f94c44669ee262bc44ac23bd7ba4b5a217f8ed
1,933
py
Python
src/tests/transform/test_grayscale_transform.py
allanchua101/ipynta
861c36b1c2d675611fcd5ed478d658f8180d03af
[ "MIT" ]
null
null
null
src/tests/transform/test_grayscale_transform.py
allanchua101/ipynta
861c36b1c2d675611fcd5ed478d658f8180d03af
[ "MIT" ]
null
null
null
src/tests/transform/test_grayscale_transform.py
allanchua101/ipynta
861c36b1c2d675611fcd5ed478d658f8180d03af
[ "MIT" ]
null
null
null
from ipynta.sourcing import DirectorySniffer from ipynta.loaders import PillowLoader from ipynta.transform import GrayscaleTransform from os import path import pytest SAMPLES_DIR = path.dirname(path.abspath(__file__)) + "/sample_images/grayscale" @pytest.fixture def sample_images(): img_list = DirectorySn...
28.426471
80
0.722193
from ipynta.sourcing import DirectorySniffer from ipynta.loaders import PillowLoader from ipynta.transform import GrayscaleTransform from os import path import pytest SAMPLES_DIR = path.dirname(path.abspath(__file__)) + "/sample_images/grayscale" @pytest.fixture def sample_images(): img_list = DirectorySn...
true
true
f7f94c456f7d954581afe1af1e91b9e011152a8d
352
py
Python
vnpy/app/fcoin_clean_order/__init__.py
xiaoxiaoleo/fmexminer
cf4ff2aa041f749e8b2c73607dcf2f50199a81c2
[ "Apache-2.0" ]
16
2019-10-31T03:15:24.000Z
2021-11-07T20:27:54.000Z
vnpy/app/fmex_miner_guadan/__init__.py
xiaoxiaoleo/fmexminer
cf4ff2aa041f749e8b2c73607dcf2f50199a81c2
[ "Apache-2.0" ]
2
2019-10-31T03:16:37.000Z
2019-12-03T07:55:28.000Z
vnpy/app/fcoin_clean_order/__init__.py
xiaoxiaoleo/fmexminer
cf4ff2aa041f749e8b2c73607dcf2f50199a81c2
[ "Apache-2.0" ]
7
2019-11-24T04:24:48.000Z
2022-01-29T16:21:03.000Z
from pathlib import Path from vnpy.trader.app import BaseApp from .engine import AlgoEngine, APP_NAME class AlgoTradingApp(BaseApp): """""" app_name = APP_NAME app_module = __module__ app_path = Path(__file__).parent display_name = "算法交易" engine_class = AlgoEngine widget_name = "AlgoMana...
20.705882
40
0.707386
from pathlib import Path from vnpy.trader.app import BaseApp from .engine import AlgoEngine, APP_NAME class AlgoTradingApp(BaseApp): app_name = APP_NAME app_module = __module__ app_path = Path(__file__).parent display_name = "算法交易" engine_class = AlgoEngine widget_name = "AlgoManager" ic...
true
true
f7f94c822c2ac221ef5668e02438174dc4634e03
10,565
py
Python
pandapower/test/consistency_checks.py
hmaschke/pandapower-1
2e93969050d3d468ce57f73d358e97fabc6e5141
[ "BSD-3-Clause" ]
2
2019-11-01T11:01:41.000Z
2022-02-07T12:55:55.000Z
pandapower/test/consistency_checks.py
hmaschke/pandapower-1
2e93969050d3d468ce57f73d358e97fabc6e5141
[ "BSD-3-Clause" ]
null
null
null
pandapower/test/consistency_checks.py
hmaschke/pandapower-1
2e93969050d3d468ce57f73d358e97fabc6e5141
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2016-2022 by University of Kassel and Fraunhofer Institute for Energy Economics # and Energy System Technology (IEE), Kassel. All rights reserved. import pandas as pd from numpy import allclose, isclose from pandapower.pf.runpp_3ph import runpp_3ph from pandapower.res...
47.59009
158
0.671084
import pandas as pd from numpy import allclose, isclose from pandapower.pf.runpp_3ph import runpp_3ph from pandapower.results import get_relevant_elements import pandapower as pp def runpp_with_consistency_checks(net, **kwargs): pp.runpp(net, **kwargs) consistency_checks(net) return Tru...
true
true
f7f94cf84b12d34d0ba08564cdc90359b65d98b5
767
py
Python
logging/api-client/list_logs_test.py
baditaflorin/python-docs-samples
f122cbc13f20336d15409b5bd9820377dcb65464
[ "Apache-2.0" ]
2
2017-09-23T04:23:46.000Z
2021-06-11T01:23:06.000Z
logging/api-client/list_logs_test.py
baditaflorin/python-docs-samples
f122cbc13f20336d15409b5bd9820377dcb65464
[ "Apache-2.0" ]
2
2021-06-10T23:54:32.000Z
2021-06-10T23:54:33.000Z
logging/api-client/list_logs_test.py
baditaflorin/python-docs-samples
f122cbc13f20336d15409b5bd9820377dcb65464
[ "Apache-2.0" ]
2
2019-11-27T00:13:37.000Z
2021-03-24T00:05:36.000Z
# Copyright 2015, Google, Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
33.347826
74
0.747066
import re import list_logs def test_main(cloud_config, capsys): list_logs.main(cloud_config.project) out, _ = capsys.readouterr() assert re.search(re.compile(r'.*', re.S), out)
true
true
f7f94d8192588fb7c74ab6fde66cca6320e60c50
13,339
py
Python
binho/interfaces/gpio.py
pixelfelon/binho-python-package
92f4898722f0578973cb672d1387fbea6cb7bb3d
[ "BSD-3-Clause" ]
null
null
null
binho/interfaces/gpio.py
pixelfelon/binho-python-package
92f4898722f0578973cb672d1387fbea6cb7bb3d
[ "BSD-3-Clause" ]
null
null
null
binho/interfaces/gpio.py
pixelfelon/binho-python-package
92f4898722f0578973cb672d1387fbea6cb7bb3d
[ "BSD-3-Clause" ]
null
null
null
from ..interface import binhoInterface # TODOs: # - XXX: Overhaul the GPIO(Collection) class to be more efficient # - More cleanup to use the GPIOPin model. # - Support ranges of pins from the same port (GPIOPort objects?) # - Implement a release function so if e.g. an I2C device is no longer in use # it releas...
34.736979
102
0.61144
from ..interface import binhoInterface class ioPinModes: digitalInput = "DIN" digitalOutput = "DOUT" analogInput = "AIN" analogOutput = "AOUT" pwmOutput = "PWM" class GPIOProvider(binhoInterface): FIXED_GPIO_PINS = {} # pins ALLOW_EXTERNAL_REGISTRATION = True ...
true
true
f7f94daa11128cdff4f10775cd966ab747f37169
2,971
py
Python
sdcflows/conftest.py
madisoth/sdcflows
c2f01e4f9b19dbd89ac1b54e3cfb0643fc3fd4f2
[ "Apache-2.0" ]
16
2020-02-25T17:47:10.000Z
2022-03-07T02:54:51.000Z
sdcflows/conftest.py
madisoth/sdcflows
c2f01e4f9b19dbd89ac1b54e3cfb0643fc3fd4f2
[ "Apache-2.0" ]
175
2020-02-15T00:52:28.000Z
2022-03-29T21:42:31.000Z
sdcflows/conftest.py
madisoth/sdcflows
c2f01e4f9b19dbd89ac1b54e3cfb0643fc3fd4f2
[ "Apache-2.0" ]
8
2020-02-15T23:47:22.000Z
2021-11-26T01:40:41.000Z
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: # # Copyright 2021 The NiPreps Developers <nipreps@gmail.com> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may...
27.509259
97
0.71794
import os from pathlib import Path import numpy import nibabel import pytest from bids.layout import BIDSLayout test_data_env = os.getenv("TEST_DATA_HOME", str(Path.home() / "sdcflows-tests")) test_output_dir = os.getenv("TEST_OUTPUT_DIR") test_workdir = os.getenv("TEST_WORK_DIR") _sloppy_mode = ...
true
true
f7f94e28aa841fa20d6c7d1e139080d89a9b8735
537
py
Python
Python_ABC/2-19autoGUI/2mouseNow.py
Chandler-Song/Python_Awesome
a44b8b79de7b429a00ac5798e7ecdc26c79a09ed
[ "MIT" ]
null
null
null
Python_ABC/2-19autoGUI/2mouseNow.py
Chandler-Song/Python_Awesome
a44b8b79de7b429a00ac5798e7ecdc26c79a09ed
[ "MIT" ]
null
null
null
Python_ABC/2-19autoGUI/2mouseNow.py
Chandler-Song/Python_Awesome
a44b8b79de7b429a00ac5798e7ecdc26c79a09ed
[ "MIT" ]
null
null
null
# mouseNow.py - Displays the mouse cursor's current position. import pyautogui import time print('Press fn+command+F2(Mac) or Ctrl+C(windows) to quit.') positionStr = '' try: while True: time.sleep(3) # Get and print the mouse coordinates. x, y = pyautogui.position() ...
22.375
75
0.60149
import pyautogui import time print('Press fn+command+F2(Mac) or Ctrl+C(windows) to quit.') positionStr = '' try: while True: time.sleep(3) # Get and print the mouse coordinates. x, y = pyautogui.position() pixelColor = pyautogui.screenshot().getpixel((x, y)) ...
true
true
f7f9501600e1599aaa470dabe3cfc9f313bd705e
6,845
py
Python
foundryapp/foundryapp/report/sales_order/sales_order.py
umaepoch/foundryapp
75e20cb399b114d416d3bdd286edd8c5a4690c75
[ "MIT" ]
null
null
null
foundryapp/foundryapp/report/sales_order/sales_order.py
umaepoch/foundryapp
75e20cb399b114d416d3bdd286edd8c5a4690c75
[ "MIT" ]
null
null
null
foundryapp/foundryapp/report/sales_order/sales_order.py
umaepoch/foundryapp
75e20cb399b114d416d3bdd286edd8c5a4690c75
[ "MIT" ]
null
null
null
# Copyright (c) 2013, yashwanth and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe import datetime def execute(filters=None): columns = get_columns(filters) sor_data = [] data = [] week = "" day_of_week = {'Sunday': '1', 'Monday': '2', 'Tuesd...
40.264706
148
0.662089
from __future__ import unicode_literals import frappe import datetime def execute(filters=None): columns = get_columns(filters) sor_data = [] data = [] week = "" day_of_week = {'Sunday': '1', 'Monday': '2', 'Tuesday': '3', 'Wednesday': '4', 'Thursday': '5', 'Friday': '6', 'Saturday': '7'} foundry_setti...
true
true
f7f9506ecb7f7d0534f72c555c8854226aff2d09
6,792
py
Python
ros/src/tl_detector/tl_detector.py
1560800/CarND-Capstone
ec0cb8e99042e5002370f4cd62847d3d61586533
[ "MIT" ]
1
2019-12-13T11:04:59.000Z
2019-12-13T11:04:59.000Z
ros/src/tl_detector/tl_detector.py
1560800/CarND-Capstone
ec0cb8e99042e5002370f4cd62847d3d61586533
[ "MIT" ]
null
null
null
ros/src/tl_detector/tl_detector.py
1560800/CarND-Capstone
ec0cb8e99042e5002370f4cd62847d3d61586533
[ "MIT" ]
4
2019-12-16T08:35:27.000Z
2019-12-18T07:23:28.000Z
#!/usr/bin/env python import rospy from std_msgs.msg import Int32 from geometry_msgs.msg import PoseStamped, Pose from styx_msgs.msg import TrafficLightArray, TrafficLight from styx_msgs.msg import Lane from sensor_msgs.msg import Image from cv_bridge import CvBridge from light_classification.tl_classifier import TLCla...
36.913043
132
0.671378
import rospy from std_msgs.msg import Int32 from geometry_msgs.msg import PoseStamped, Pose from styx_msgs.msg import TrafficLightArray, TrafficLight from styx_msgs.msg import Lane from sensor_msgs.msg import Image from cv_bridge import CvBridge from light_classification.tl_classifier import TLClassifier import tf imp...
false
true
f7f9507910c13fb5948d92afaef10421278324ff
4,040
py
Python
src/tortuga/scripts/commonSpotInstanceCli.py
tprestegard/tortuga-kit-awsadapter
cde0a35befa8e5e65929a950fae597cd4adb37b7
[ "Apache-2.0" ]
3
2018-03-03T15:43:51.000Z
2019-08-15T11:37:12.000Z
src/tortuga/scripts/commonSpotInstanceCli.py
tprestegard/tortuga-kit-awsadapter
cde0a35befa8e5e65929a950fae597cd4adb37b7
[ "Apache-2.0" ]
56
2018-03-02T20:24:17.000Z
2020-11-21T00:29:20.000Z
src/tortuga/scripts/commonSpotInstanceCli.py
tprestegard/tortuga-kit-awsadapter
cde0a35befa8e5e65929a950fae597cd4adb37b7
[ "Apache-2.0" ]
11
2018-03-03T14:32:13.000Z
2020-11-18T15:05:30.000Z
# Copyright 2008-2018 Univa Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
33.114754
99
0.648267
import json from typing import Generator, List, Optional, Tuple, Dict from tortuga.cli.tortugaCli import TortugaCli from tortuga.wsapi.metadataWsApi import MetadataWsApi from tortuga.wsapi.resourceAdapterConfigurationWsApi import \ ResourceAdapterConfigurationWsApi from .spot_common import SpotInsta...
true
true
f7f951cb3e510cfefab6b6099260d453a2eaf7d7
4,760
py
Python
genetic_algorithm/models/zoo/preprocess_c.py
JacobARose/genetic_algorithm
de4c52637f6b928b96c0306b7da59a054322b56c
[ "Apache-2.0" ]
null
null
null
genetic_algorithm/models/zoo/preprocess_c.py
JacobARose/genetic_algorithm
de4c52637f6b928b96c0306b7da59a054322b56c
[ "Apache-2.0" ]
null
null
null
genetic_algorithm/models/zoo/preprocess_c.py
JacobARose/genetic_algorithm
de4c52637f6b928b96c0306b7da59a054322b56c
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
37.777778
135
0.669328
import tensorflow as tf from tensorflow.keras import Sequential, Model, Input from tensorflow.keras import layers from tensorflow.keras.layers import ReLU, Dense, Conv2D, Conv2DTranspose from tensorflow.keras.layers import DepthwiseConv2D, SeparableConv2D, Dropout from tensorflow.keras.layers import Globa...
true
true
f7f951d12a4b67f49be963a01a11b78e12557fc9
3,517
py
Python
setup.py
ObsidianProtocol/obsidian-rpc-python
1f977f06af37c871e7257e04fb81a06eaf7bca32
[ "MIT" ]
null
null
null
setup.py
ObsidianProtocol/obsidian-rpc-python
1f977f06af37c871e7257e04fb81a06eaf7bca32
[ "MIT" ]
null
null
null
setup.py
ObsidianProtocol/obsidian-rpc-python
1f977f06af37c871e7257e04fb81a06eaf7bca32
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # Note: To use the 'upload' functionality of this file, you must: # $ pip install twine import io import os import sys from shutil import rmtree from setuptools import find_packages, setup, Command # Package meta-data. NAME = 'obsidian' DESCRIPTION = 'A Python wrapper...
28.362903
86
0.639181
import io import os import sys from shutil import rmtree from setuptools import find_packages, setup, Command NAME = 'obsidian' DESCRIPTION = 'A Python wrapper for the obsidian JSON-RPC interface' URL = 'https://github.com/arthurk/obsidian-python/' EMAIL = 'arthur@arthurkoziel.com' AUTHOR = 'Arthur Koziel' REQ...
true
true
f7f95228e55ecf40da724ea9666d239bc69011ea
28,042
py
Python
dwave_networkx/algorithms/elimination_ordering.py
CatherineCMcGeoch/dwave_networkx
126731c516d31e7bf0491f3034ccecdb79d648fb
[ "Apache-2.0" ]
1
2022-02-01T14:40:05.000Z
2022-02-01T14:40:05.000Z
dwave_networkx/algorithms/elimination_ordering.py
CatherineCMcGeoch/dwave_networkx
126731c516d31e7bf0491f3034ccecdb79d648fb
[ "Apache-2.0" ]
null
null
null
dwave_networkx/algorithms/elimination_ordering.py
CatherineCMcGeoch/dwave_networkx
126731c516d31e7bf0491f3034ccecdb79d648fb
[ "Apache-2.0" ]
1
2022-02-01T14:40:31.000Z
2022-02-01T14:40:31.000Z
# Copyright 2018 D-Wave Systems 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...
30.381365
108
0.610334
import itertools from random import random, sample import networkx as nx from dwave_networkx.generators.pegasus import pegasus_coordinates __all__ = ['is_almost_simplicial', 'is_simplicial', 'chimera_elimination_order', 'pegasus_elimination_order', 'max_card...
true
true
f7f9542766d370aadcc641d0b88390b4139552f2
360
py
Python
hospitals_api/urls.py
API-Imperfect/geodjango-hospitals-api-home
69f8773e8904bdb6ba6f8c4f0d1547e9a4edc21d
[ "MIT" ]
null
null
null
hospitals_api/urls.py
API-Imperfect/geodjango-hospitals-api-home
69f8773e8904bdb6ba6f8c4f0d1547e9a4edc21d
[ "MIT" ]
null
null
null
hospitals_api/urls.py
API-Imperfect/geodjango-hospitals-api-home
69f8773e8904bdb6ba6f8c4f0d1547e9a4edc21d
[ "MIT" ]
null
null
null
from django.contrib import admin from django.urls import include, path urlpatterns = [ path("admin/", admin.site.urls), path("", include("hospitals.urls")), path("", include("boundaries.urls")), ] admin.site.site_header = "Hospitals Admin" admin.site.site_title = "Rwanda GIS Admin Portal" admin.site.index...
27.692308
55
0.716667
from django.contrib import admin from django.urls import include, path urlpatterns = [ path("admin/", admin.site.urls), path("", include("hospitals.urls")), path("", include("boundaries.urls")), ] admin.site.site_header = "Hospitals Admin" admin.site.site_title = "Rwanda GIS Admin Portal" admin.site.index...
true
true
f7f9554ee75dee8f114eb50d9b2c895996982f61
341
py
Python
decorators.py
caseyr003/catalog
b729515e1ff92ea019520e54ed6079a078d538f9
[ "MIT" ]
null
null
null
decorators.py
caseyr003/catalog
b729515e1ff92ea019520e54ed6079a078d538f9
[ "MIT" ]
null
null
null
decorators.py
caseyr003/catalog
b729515e1ff92ea019520e54ed6079a078d538f9
[ "MIT" ]
null
null
null
from functools import wraps from flask import redirect, session as login_session def logged_in(function): @wraps(function) def wrapper(*a, **kw): # If not logged in redirect to login page if 'username' not in login_session: return redirect('/login') return function(*a, **kw...
26.230769
52
0.656891
from functools import wraps from flask import redirect, session as login_session def logged_in(function): @wraps(function) def wrapper(*a, **kw): if 'username' not in login_session: return redirect('/login') return function(*a, **kw) return wrapper
true
true
f7f9567922528dd6970210457c964e9ee21a1480
768
py
Python
shblog/spiders/shblog_sitemap.py
malberts/scrapy-demo
686b853b9ef7b49e085d23af346c8c7b6291cea0
[ "BSD-3-Clause" ]
null
null
null
shblog/spiders/shblog_sitemap.py
malberts/scrapy-demo
686b853b9ef7b49e085d23af346c8c7b6291cea0
[ "BSD-3-Clause" ]
null
null
null
shblog/spiders/shblog_sitemap.py
malberts/scrapy-demo
686b853b9ef7b49e085d23af346c8c7b6291cea0
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from scrapy.spiders import SitemapSpider from .shblog_base import SHBlogBaseSpider class SHBlogSitemapSpider(SHBlogBaseSpider, SitemapSpider): name = "shblog_sitemap" user_agent = "shblog_sitemap (+https://github.com/malberts/scrapy-demo/)" allowed_domains = ["blog.scrapinghub.com...
32
77
0.678385
from scrapy.spiders import SitemapSpider from .shblog_base import SHBlogBaseSpider class SHBlogSitemapSpider(SHBlogBaseSpider, SitemapSpider): name = "shblog_sitemap" user_agent = "shblog_sitemap (+https://github.com/malberts/scrapy-demo/)" allowed_domains = ["blog.scrapinghub.com"] sitemap_urls = [...
true
true
f7f956a16ac611e290129975927452000a373e50
5,452
py
Python
swift3/etree.py
AymericDu/swift3
a64be4ed9c6657fc5471e87e08e6c7465b7bd444
[ "Apache-2.0" ]
10
2017-04-21T13:56:48.000Z
2022-03-29T17:15:40.000Z
swift3/etree.py
AymericDu/swift3
a64be4ed9c6657fc5471e87e08e6c7465b7bd444
[ "Apache-2.0" ]
12
2017-05-04T16:23:35.000Z
2021-09-08T16:42:58.000Z
swift3/etree.py
AymericDu/swift3
a64be4ed9c6657fc5471e87e08e6c7465b7bd444
[ "Apache-2.0" ]
10
2017-05-10T14:00:42.000Z
2019-10-28T13:24:57.000Z
# Copyright (c) 2014 OpenStack Foundation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
33.243902
78
0.644534
import lxml.etree from copy import deepcopy from pkg_resources import resource_stream from six.moves.urllib.parse import quote from swift3.exception import S3Exception from swift3.utils import LOGGER, camel_to_snake, utf8encode, utf8decode XMLNS_S3 = 'http://s3.amazonaws.com/doc/2006-03-01/' XMLNS_XS...
true
true
f7f9583ea98785181b96028c049795d2ea989b1a
3,795
py
Python
ptgaze/common/visualizer.py
martinhoang11/pytorch_mpiigaze_demo
26f9cd0c4278041ceb905ebb1ccbe5825f822d6f
[ "MIT" ]
null
null
null
ptgaze/common/visualizer.py
martinhoang11/pytorch_mpiigaze_demo
26f9cd0c4278041ceb905ebb1ccbe5825f822d6f
[ "MIT" ]
null
null
null
ptgaze/common/visualizer.py
martinhoang11/pytorch_mpiigaze_demo
26f9cd0c4278041ceb905ebb1ccbe5825f822d6f
[ "MIT" ]
null
null
null
from typing import Optional, Tuple import cv2 import numpy as np from scipy.spatial.transform import Rotation from .camera import Camera from .face import Face AXIS_COLORS = [(0, 0, 255), (0, 255, 0), (255, 0, 0)] class Visualizer: def __init__(self, camera: Camera, center_point_index: int): self._came...
40.806452
109
0.570224
from typing import Optional, Tuple import cv2 import numpy as np from scipy.spatial.transform import Rotation from .camera import Camera from .face import Face AXIS_COLORS = [(0, 0, 255), (0, 255, 0), (255, 0, 0)] class Visualizer: def __init__(self, camera: Camera, center_point_index: int): self._came...
true
true
f7f958dc52beb1d93c8e1733dc266a29eaaabf1c
3,162
py
Python
examples/vision/caltech101.py
erip/data
9c6e5ddfcdf1061e3968ed5cd9d55754cc713965
[ "BSD-3-Clause" ]
null
null
null
examples/vision/caltech101.py
erip/data
9c6e5ddfcdf1061e3968ed5cd9d55754cc713965
[ "BSD-3-Clause" ]
null
null
null
examples/vision/caltech101.py
erip/data
9c6e5ddfcdf1061e3968ed5cd9d55754cc713965
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. import os.path import re import torch from torch.utils.data.datapipes.utils.decoder import imagehandler, mathandler from torchdata.datapipes.iter import ( FileOpener, Filter, IterableWrapper, IterKeyZipper, Mapper, RoutedDecoder, TarArchive...
28.232143
100
0.705882
import os.path import re import torch from torch.utils.data.datapipes.utils.decoder import imagehandler, mathandler from torchdata.datapipes.iter import ( FileOpener, Filter, IterableWrapper, IterKeyZipper, Mapper, RoutedDecoder, TarArchiveReader, ) URL = { "images": "http://www.vis...
true
true
f7f95c9052d568304e8639c61338929d28fefd0d
3,289
py
Python
geotrek/feedback/migrations/0007_auto_20200407_0728.py
pierreloicq/Geotrek-admin
00cd29f29843f2cc25e5a3c7372fcccf14956887
[ "BSD-2-Clause" ]
50
2016-10-19T23:01:21.000Z
2022-03-28T08:28:34.000Z
geotrek/feedback/migrations/0007_auto_20200407_0728.py
pierreloicq/Geotrek-admin
00cd29f29843f2cc25e5a3c7372fcccf14956887
[ "BSD-2-Clause" ]
1,422
2016-10-27T10:39:40.000Z
2022-03-31T13:37:10.000Z
geotrek/feedback/migrations/0007_auto_20200407_0728.py
pierreloicq/Geotrek-admin
00cd29f29843f2cc25e5a3c7372fcccf14956887
[ "BSD-2-Clause" ]
46
2016-10-27T10:59:10.000Z
2022-03-22T15:55:56.000Z
# Generated by Django 2.0.13 on 2020-04-07 07:28 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('feedback', '0006_auto_20200406_1408'), ] operations = [ migrations.CreateModel( name='ReportAc...
41.1125
177
0.588629
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('feedback', '0006_auto_20200406_1408'), ] operations = [ migrations.CreateModel( name='ReportActivity', fields=[ ('...
true
true
f7f95d6729901524e560552c813dab4c6f2153e7
6,812
py
Python
perfkitbenchmarker/linux_benchmarks/cluster_boot_benchmark.py
srelf-ukcloud/PerfKitBenchmarker
8ebdf1c90a34a4af33d08283198aaafc5f6e5099
[ "Apache-2.0" ]
null
null
null
perfkitbenchmarker/linux_benchmarks/cluster_boot_benchmark.py
srelf-ukcloud/PerfKitBenchmarker
8ebdf1c90a34a4af33d08283198aaafc5f6e5099
[ "Apache-2.0" ]
null
null
null
perfkitbenchmarker/linux_benchmarks/cluster_boot_benchmark.py
srelf-ukcloud/PerfKitBenchmarker
8ebdf1c90a34a4af33d08283198aaafc5f6e5099
[ "Apache-2.0" ]
null
null
null
# Copyright 2014 PerfKitBenchmarker 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 appli...
32.75
104
0.69539
import logging import time from absl import flags from perfkitbenchmarker import configs from perfkitbenchmarker import sample from perfkitbenchmarker import vm_util BENCHMARK_NAME = 'cluster_boot' BENCHMARK_CONFIG = """ cluster_boot: description: > Create a cluster, record all times to boot. ...
true
true
f7f95df184761194dfdaba42ea0b3b9622834b12
3,387
py
Python
tests/utils.py
pcanas/vissl
d293b8295f03a4caeaebd25f3e5ed38866dd4d10
[ "MIT" ]
3
2021-07-08T15:06:49.000Z
2021-08-13T18:55:02.000Z
tests/utils.py
pcanas/vissl
d293b8295f03a4caeaebd25f3e5ed38866dd4d10
[ "MIT" ]
2
2021-07-25T15:46:07.000Z
2021-08-11T10:08:53.000Z
tests/utils.py
pcanas/vissl
d293b8295f03a4caeaebd25f3e5ed38866dd4d10
[ "MIT" ]
2
2021-07-08T15:15:55.000Z
2021-08-25T14:16:01.000Z
# Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import logging import re import sys from typing import Any, List import pkg_resources from hydra.experimental import compose, initialize_confi...
29.452174
86
0.700325
import logging import re import sys from typing import Any, List import pkg_resources from hydra.experimental import compose, initialize_config_module from omegaconf import OmegaConf logger = logging.getLogger("vissl") def list_config_files(dir_path, exclude_folders): resource_name = "configs" assert...
true
true
f7f95e5f3975a2d20a6f117ebaf8890415be9a32
47,103
py
Python
bentoml/_internal/yatai_client/proto/deployment_pb2.py
jmc529/BentoML
96c1ec9e486d98930e24bbbac5b2991a6d416f97
[ "Apache-2.0" ]
null
null
null
bentoml/_internal/yatai_client/proto/deployment_pb2.py
jmc529/BentoML
96c1ec9e486d98930e24bbbac5b2991a6d416f97
[ "Apache-2.0" ]
null
null
null
bentoml/_internal/yatai_client/proto/deployment_pb2.py
jmc529/BentoML
96c1ec9e486d98930e24bbbac5b2991a6d416f97
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: deployment.proto """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.prot...
43.452952
4,030
0.770715
from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database _sym_db = _symbol_database.Default() from google.protobuf import struct_pb2 as google_dot_pro...
true
true
f7f95ef5199af6ab40f535296b13b96fc365a5da
1,498
py
Python
ceilometer/cmd/storage.py
vmturbo/ceilometer
f856d3c915b738a64bce14967ba8114fe923c1af
[ "Apache-2.0" ]
null
null
null
ceilometer/cmd/storage.py
vmturbo/ceilometer
f856d3c915b738a64bce14967ba8114fe923c1af
[ "Apache-2.0" ]
null
null
null
ceilometer/cmd/storage.py
vmturbo/ceilometer
f856d3c915b738a64bce14967ba8114fe923c1af
[ "Apache-2.0" ]
1
2019-09-16T02:11:41.000Z
2019-09-16T02:11:41.000Z
# -*- encoding: utf-8 -*- # # Copyright 2014 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
32.565217
75
0.731642
import logging from oslo.config import cfg from ceilometer import service from ceilometer import storage cfg.CONF.import_opt('time_to_live', 'ceilometer.storage', group='database') LOG = logging.getLogger(__name__) def dbsync(): service.prepare_service() storage.get_con...
true
true
f7f95efe4638a4b6abd0ebed0b02dd838996c6ef
542
py
Python
packages/python/plotly/plotly/validators/pie/_insidetextorientation.py
mastermind88/plotly.py
efa70710df1af22958e1be080e105130042f1839
[ "MIT" ]
null
null
null
packages/python/plotly/plotly/validators/pie/_insidetextorientation.py
mastermind88/plotly.py
efa70710df1af22958e1be080e105130042f1839
[ "MIT" ]
null
null
null
packages/python/plotly/plotly/validators/pie/_insidetextorientation.py
mastermind88/plotly.py
efa70710df1af22958e1be080e105130042f1839
[ "MIT" ]
null
null
null
import _plotly_utils.basevalidators class InsidetextorientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="insidetextorientation", parent_name="pie", **kwargs ): super(InsidetextorientationValidator, self).__init__( plotly_name=plot...
36.133333
88
0.664207
import _plotly_utils.basevalidators class InsidetextorientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="insidetextorientation", parent_name="pie", **kwargs ): super(InsidetextorientationValidator, self).__init__( plotly_name=plot...
true
true
f7f95f5962303bd2f2a3a4349c065d7e7f872a13
856
py
Python
Packs/Ransomware/Scripts/RansomwareHostWidget/RansomwareHostWidget.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/Ransomware/Scripts/RansomwareHostWidget/RansomwareHostWidget.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/Ransomware/Scripts/RansomwareHostWidget/RansomwareHostWidget.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import demistomock as demisto # noqa: F401 from CommonServerPython import * # noqa: F401 incident = demisto.incidents() data = { "Type": 17, "ContentsFormat": "number", "Contents": { "stats": int(incident[0].get('CustomFields', {}).get('ransomwareapproximatenumberofencryptedendpoints', 0)), ...
25.939394
116
0.384346
import demistomock as demisto from CommonServerPython import * incident = demisto.incidents() data = { "Type": 17, "ContentsFormat": "number", "Contents": { "stats": int(incident[0].get('CustomFields', {}).get('ransomwareapproximatenumberofencryptedendpoints', 0)), "params": { ...
true
true