hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
f708ae9eeb4e2946f5143c922dd31621f9c88830
6,093
py
Python
test_model_images.py
Ambattz/Intelligent_Traffic_Management_System
51c3100ddb3479538d8a6accbcc0ea9f751481a7
[ "MIT" ]
null
null
null
test_model_images.py
Ambattz/Intelligent_Traffic_Management_System
51c3100ddb3479538d8a6accbcc0ea9f751481a7
[ "MIT" ]
null
null
null
test_model_images.py
Ambattz/Intelligent_Traffic_Management_System
51c3100ddb3479538d8a6accbcc0ea9f751481a7
[ "MIT" ]
null
null
null
import numpy as np import os import six.moves.urllib as urllib import sys import tarfile import tensorflow.compat.v1 as tf tf.disable_v2_behavior() import zipfile from collections import defaultdict from io import StringIO from matplotlib import pyplot as plt from PIL import Image from object_detection....
42.3125
280
0.702445
import numpy as np import os import six.moves.urllib as urllib import sys import tarfile import tensorflow.compat.v1 as tf tf.disable_v2_behavior() import zipfile from collections import defaultdict from io import StringIO from matplotlib import pyplot as plt from PIL import Image from object_detection....
true
true
f708af28ca60caeeae8f3a4f7d0f575926c07fb3
12,524
py
Python
vegnoveg/vegnonveg-fulltraining-nnframe.py
intel-analytics/WorldBankPoC
49c19268601ff1aa7e396ddc5a8a23abfe73880e
[ "Apache-2.0" ]
3
2018-07-05T14:15:07.000Z
2019-04-29T09:29:11.000Z
vegnoveg/vegnonveg-fulltraining-nnframe.py
intel-analytics/WorldBankPoC
49c19268601ff1aa7e396ddc5a8a23abfe73880e
[ "Apache-2.0" ]
null
null
null
vegnoveg/vegnonveg-fulltraining-nnframe.py
intel-analytics/WorldBankPoC
49c19268601ff1aa7e396ddc5a8a23abfe73880e
[ "Apache-2.0" ]
3
2018-06-19T13:58:12.000Z
2019-11-06T01:20:14.000Z
# Databricks notebook source import pandas as pd from os import listdir from os.path import join, basename import struct import pickle import json import os from scipy import misc import datetime as dt from pyspark.sql.types import * from pyspark.sql.functions import udf from pyspark.ml.evaluation import MulticlassCla...
35.478754
211
0.690913
import pandas as pd from os import listdir from os.path import join, basename import struct import pickle import json import os from scipy import misc import datetime as dt from pyspark.sql.types import * from pyspark.sql.functions import udf from pyspark.ml.evaluation import MulticlassClassificationEvaluator f...
true
true
f708b00b0a9edc4940fa8641402e3307b8e92005
21,917
py
Python
motion/components/structural.py
TUM-AAS/motron
2f8800d1d6e297fc4baab555ceb2d37f55841406
[ "MIT" ]
null
null
null
motion/components/structural.py
TUM-AAS/motron
2f8800d1d6e297fc4baab555ceb2d37f55841406
[ "MIT" ]
null
null
null
motion/components/structural.py
TUM-AAS/motron
2f8800d1d6e297fc4baab555ceb2d37f55841406
[ "MIT" ]
null
null
null
from typing import Tuple, Optional, List, Union import torch from torch.nn import * import math def gmm(x: torch.Tensor, w: torch.Tensor) -> torch.Tensor: return torch.einsum('ndo,bnd->bno', w, x) class GraphLinear(Module): def __init__(self, in_features: int, out_features: int): super().__init__() ...
42.067179
149
0.60793
from typing import Tuple, Optional, List, Union import torch from torch.nn import * import math def gmm(x: torch.Tensor, w: torch.Tensor) -> torch.Tensor: return torch.einsum('ndo,bnd->bno', w, x) class GraphLinear(Module): def __init__(self, in_features: int, out_features: int): super().__init__() ...
true
true
f708b0b4a2fca5c6fdf52063180014ee9d3f169f
3,060
py
Python
htmltreediff/test_util.py
PolicyStat/htmltreediff
8065e39653ac85647a2d8d1f4acf6e2fbb862b17
[ "BSD-3-Clause" ]
3
2015-04-04T20:35:17.000Z
2021-08-06T16:51:09.000Z
htmltreediff/test_util.py
tex/htmltreediff
ce5a94edd0cfb05ed5130aaed3f06c63668df127
[ "BSD-3-Clause" ]
14
2015-01-15T16:03:14.000Z
2020-03-23T16:29:02.000Z
htmltreediff/test_util.py
tex/htmltreediff
ce5a94edd0cfb05ed5130aaed3f06c63668df127
[ "BSD-3-Clause" ]
2
2017-05-16T04:17:46.000Z
2018-04-30T20:05:32.000Z
from htmltreediff.diff_core import Differ from htmltreediff.edit_script_runner import EditScriptRunner from htmltreediff.changes import ( split_text_nodes, sort_del_before_ins, _strip_changes_new, _strip_changes_old, ) from htmltreediff.util import ( minidom_tostring, node_compare, parse_min...
25.932203
79
0.658824
from htmltreediff.diff_core import Differ from htmltreediff.edit_script_runner import EditScriptRunner from htmltreediff.changes import ( split_text_nodes, sort_del_before_ins, _strip_changes_new, _strip_changes_old, ) from htmltreediff.util import ( minidom_tostring, node_compare, parse_min...
true
true
f708b1c76df52ba9d7f3092ae8e625da432ba56c
518
py
Python
SimPEG/electromagnetics/natural_source/__init__.py
ElliotCheung/simpeg
ce5bde154179ca63798a62a12787a7ec3535472c
[ "MIT" ]
1
2022-02-18T16:31:27.000Z
2022-02-18T16:31:27.000Z
SimPEG/electromagnetics/natural_source/__init__.py
ElliotCheung/simpeg
ce5bde154179ca63798a62a12787a7ec3535472c
[ "MIT" ]
null
null
null
SimPEG/electromagnetics/natural_source/__init__.py
ElliotCheung/simpeg
ce5bde154179ca63798a62a12787a7ec3535472c
[ "MIT" ]
null
null
null
""" module SimPEG.electromagnetics.natural_source SimPEG implementation of the natural source problem (including magenetotelluric, tipper and ZTEM) """ from . import utils from . import sources as Src from . import receivers as Rx from .survey import Survey, Data from .fields import Fields1DPrimarySecondary, Field...
27.263158
82
0.832046
from . import utils from . import sources as Src from . import receivers as Rx from .survey import Survey, Data from .fields import Fields1DPrimarySecondary, Fields3DPrimarySecondary from .simulation import Simulation1DPrimarySecondary, Simulation3DPrimarySecondary from . import sources from . import receivers from .s...
true
true
f708b24eec80e943958c6c09ca5f6ea763affe71
7,182
py
Python
uuv_teleop/scripts/vehicle_keyboard_teleop.py
pengzhi1998/uuv_simulator
42d276fd1cb4cd8ad3166b9d2b434543411c6fdd
[ "Apache-2.0", "BSD-3-Clause" ]
1
2021-10-20T09:20:34.000Z
2021-10-20T09:20:34.000Z
uuv_teleop/scripts/vehicle_keyboard_teleop.py
pengzhi1998/uuv_simulator
42d276fd1cb4cd8ad3166b9d2b434543411c6fdd
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
uuv_teleop/scripts/vehicle_keyboard_teleop.py
pengzhi1998/uuv_simulator
42d276fd1cb4cd8ad3166b9d2b434543411c6fdd
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # Copyright (c) 2016 The UUV Simulator 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...
35.91
106
0.584935
from __future__ import print_function import os import time import sys, select, termios, tty import rospy import numpy as np from std_msgs.msg import Bool from geometry_msgs.msg import Twist, Accel, Vector3 class KeyBoardVehicleTeleop: def __init__(self): self.settings = termios.tcg...
true
true
f708b3261f5463444587bbbdfaa6a90f62be1e27
4,101
py
Python
influxdb_client/domain/variable_links.py
MASIFAYUB/influxdb-client-python
a067fa5670a6fbc600db2ac4e54e29e1b7124998
[ "MIT" ]
null
null
null
influxdb_client/domain/variable_links.py
MASIFAYUB/influxdb-client-python
a067fa5670a6fbc600db2ac4e54e29e1b7124998
[ "MIT" ]
null
null
null
influxdb_client/domain/variable_links.py
MASIFAYUB/influxdb-client-python
a067fa5670a6fbc600db2ac4e54e29e1b7124998
[ "MIT" ]
null
null
null
# coding: utf-8 """ InfluxDB OSS API Service. The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa:...
26.288462
159
0.547671
import pprint import re import six class VariableLinks(object): openapi_types = { '_self': 'str', 'org': 'str', 'labels': 'str' } attribute_map = { '_self': 'self', 'org': 'org', 'labels': 'labels' } def __init__(self, _self=None, org=None,...
true
true
f708b3c0e401d3177d103ade90529035f7330ba6
97
py
Python
tests/run/default_types_fwrap_doctest.py
wilsonify/fwrap
f2e20eb55eaa3de72905e2ef28198da00eebe262
[ "BSD-3-Clause" ]
23
2015-02-25T00:24:15.000Z
2021-09-08T01:35:45.000Z
tests/run/default_types_fwrap_doctest.py
fwrap/fwrap
61a56f2d0050096b4973d88e5f11cfac2ef01a4b
[ "BSD-3-Clause" ]
1
2021-09-08T01:45:02.000Z
2021-09-08T01:45:02.000Z
tests/run/default_types_fwrap_doctest.py
fwrap/fwrap
61a56f2d0050096b4973d88e5f11cfac2ef01a4b
[ "BSD-3-Clause" ]
4
2015-03-22T01:33:39.000Z
2021-09-09T15:25:44.000Z
from default_types_fwrap import * __doc__ = u''' >>> bar(100,200,300) == (1, 2.0, 3.0) True '''
13.857143
37
0.597938
from default_types_fwrap import * __doc__ = u''' >>> bar(100,200,300) == (1, 2.0, 3.0) True '''
true
true
f708b3fb94966bcfac0627771309e72db45d4e20
1,538
py
Python
apps/common/models.py
kwanj-k/ctrim_api
e3ed4afcbcc138400f219f3637b51514e2696e5c
[ "MIT" ]
1
2018-03-11T06:08:13.000Z
2018-03-11T06:08:13.000Z
apps/common/models.py
kwanj-k/ctrim_api
e3ed4afcbcc138400f219f3637b51514e2696e5c
[ "MIT" ]
4
2019-07-22T14:19:35.000Z
2022-02-10T09:13:08.000Z
apps/common/models.py
kwanj-k/ctrim_api
e3ed4afcbcc138400f219f3637b51514e2696e5c
[ "MIT" ]
null
null
null
from django.db import models class CapitalizeField(models.CharField): def __init__(self, *args, **kwargs): super(CapitalizeField, self).__init__(*args, **kwargs) def pre_save(self, model_instance, add): value = getattr(model_instance, self.attname, None) if value: value =...
30.156863
83
0.650845
from django.db import models class CapitalizeField(models.CharField): def __init__(self, *args, **kwargs): super(CapitalizeField, self).__init__(*args, **kwargs) def pre_save(self, model_instance, add): value = getattr(model_instance, self.attname, None) if value: value =...
true
true
f708b425a838a4e43cb89ce3167062b2ad9a31d7
943
py
Python
convert/convert.py
qyp1997/leetcoder
4c01f11e5138cbb9aa12b4f6ef0c4a60d25b92c2
[ "MIT" ]
null
null
null
convert/convert.py
qyp1997/leetcoder
4c01f11e5138cbb9aa12b4f6ef0c4a60d25b92c2
[ "MIT" ]
null
null
null
convert/convert.py
qyp1997/leetcoder
4c01f11e5138cbb9aa12b4f6ef0c4a60d25b92c2
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ @Time : 2020/10/21 10:39 @Auth : Qi @IDE : PyCharm @Title: 6. Z 字形变换 @Link : https://leetcode-cn.com/problems/zigzag-conversion/ """ class Solution: def convert(self, s: str, numRows: int) -> str: if numRows <= 0: return '' if numRows == 1: retu...
24.179487
59
0.397667
class Solution: def convert(self, s: str, numRows: int) -> str: if numRows <= 0: return '' if numRows == 1: return s ret = '' for i in range(numRows): tmp = i time = numRows * 2 - 2 while tmp < len(s): if ...
true
true
f708b523234576243dd72acacbe4d452a5ad4554
3,430
py
Python
setup.py
stacybrock/nws-wx-client
9d557ccf2291e1ebbdb483dcb4fa11b926d5ff94
[ "Apache-2.0" ]
1
2019-12-08T16:18:16.000Z
2019-12-08T16:18:16.000Z
setup.py
stacybrock/nws-wx-client
9d557ccf2291e1ebbdb483dcb4fa11b926d5ff94
[ "Apache-2.0" ]
4
2020-03-24T16:44:22.000Z
2021-02-02T21:54:26.000Z
setup.py
stacybrock/nws-wx-client
9d557ccf2291e1ebbdb483dcb4fa11b926d5ff94
[ "Apache-2.0" ]
1
2019-03-26T03:01:02.000Z
2019-03-26T03:01:02.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # Based on Kenneth Reitz's setup.py: # https://github.com/kennethreitz/setup.py # 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...
27.007874
87
0.637609
# https://github.com/kennethreitz/setup.py # 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 = 'nwswx' DESCRIPTION = 'A Python 3 client ...
true
true
f708b53394c167baaaa7923247a193908ac67370
1,028
py
Python
python-client/onesaitplatform/mqttclient/utils.py
javieronsurbe/onesait-cloud-platform-clientlibraries
832cb058b3144cbe56b1ac2cb88a040573741d66
[ "Apache-2.0" ]
14
2019-05-14T13:23:35.000Z
2019-12-24T14:49:02.000Z
python-client/onesaitplatform/mqttclient/utils.py
javieronsurbe/onesait-cloud-platform-clientlibraries
832cb058b3144cbe56b1ac2cb88a040573741d66
[ "Apache-2.0" ]
7
2019-11-13T09:38:03.000Z
2021-04-07T16:24:14.000Z
python-client/onesaitplatform/mqttclient/utils.py
javieronsurbe/onesait-cloud-platform-clientlibraries
832cb058b3144cbe56b1ac2cb88a040573741d66
[ "Apache-2.0" ]
9
2019-04-09T15:38:28.000Z
2021-03-24T13:10:14.000Z
from threading import Event class Message: def __init__(self, timeout=10): self._ready = Event() self._timeout = timeout self._response = None @property def result(self): received = self._ready.wait(timeout=self._timeout) if not received: raise MqttErro...
25.073171
81
0.63035
from threading import Event class Message: def __init__(self, timeout=10): self._ready = Event() self._timeout = timeout self._response = None @property def result(self): received = self._ready.wait(timeout=self._timeout) if not received: raise MqttErro...
true
true
f708b5fba4d0b3640baa91f053179f9e31692cc9
671
py
Python
src/utils/preprocessor.py
EternalImmortal/Real-time-emotion-classifier-mini-Xception
161f295d4be511f7e4cc700399ca37c48ea81f6a
[ "MIT" ]
null
null
null
src/utils/preprocessor.py
EternalImmortal/Real-time-emotion-classifier-mini-Xception
161f295d4be511f7e4cc700399ca37c48ea81f6a
[ "MIT" ]
null
null
null
src/utils/preprocessor.py
EternalImmortal/Real-time-emotion-classifier-mini-Xception
161f295d4be511f7e4cc700399ca37c48ea81f6a
[ "MIT" ]
null
null
null
import numpy as np # from scipy.misc import imread, imresize from scipy import misc def preprocess_input(x, v2=True): x = x.astype('float32') x = x / 255.0 if v2: x = x - 0.5 x = x * 2.0 return x def _imread(image_name): return misc.imread(image_name) def _imresize(image_array,...
23.137931
62
0.692996
import numpy as np from scipy import misc def preprocess_input(x, v2=True): x = x.astype('float32') x = x / 255.0 if v2: x = x - 0.5 x = x * 2.0 return x def _imread(image_name): return misc.imread(image_name) def _imresize(image_array, size): return misc.imresize(image_ar...
true
true
f708b63569034b151cc8bc23cfe647bf20e52cb7
618
py
Python
var/spack/repos/builtin/packages/py-neurolab/package.py
jeanbez/spack
f4e51ce8f366c85bf5aa0eafe078677b42dae1ba
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
var/spack/repos/builtin/packages/py-neurolab/package.py
jeanbez/spack
f4e51ce8f366c85bf5aa0eafe078677b42dae1ba
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
8
2021-11-09T20:28:40.000Z
2022-03-15T03:26:33.000Z
var/spack/repos/builtin/packages/py-neurolab/package.py
jeanbez/spack
f4e51ce8f366c85bf5aa0eafe078677b42dae1ba
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
2
2019-02-08T20:37:20.000Z
2019-03-31T15:19:26.000Z
# Copyright 2013-2022 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.package import * class PyNeurolab(PythonPackage): """Simple and powerfull neural network library for pyth...
32.526316
95
0.731392
from spack.package import * class PyNeurolab(PythonPackage): homepage = "http://neurolab.googlecode.com/" pypi = "neurolab/neurolab-0.3.5.tar.gz" version('0.3.5', sha256='96ec311988383c63664f3325668f27c30561cf4349e3bc5420665c042a3b9191') depends_on('py-setuptools', type='build') depend...
true
true
f708b6dd3656aa570905a5bd46dc4d5ebef18b39
7,616
py
Python
conans/test/unittests/client/generators/pkg_config_test.py
sigmunjr/conan
ce173d25640d5c9cdd62b1c67598291be003633d
[ "MIT" ]
1
2020-11-07T21:25:57.000Z
2020-11-07T21:25:57.000Z
conans/test/unittests/client/generators/pkg_config_test.py
ttencate/conan
3dc4fb35cc3be9865f0ae480c89e6a58813d5076
[ "MIT" ]
null
null
null
conans/test/unittests/client/generators/pkg_config_test.py
ttencate/conan
3dc4fb35cc3be9865f0ae480c89e6a58813d5076
[ "MIT" ]
null
null
null
import unittest from conans.client.conf import get_default_settings_yml from conans.client.generators.pkg_config import PkgConfigGenerator from conans.model.build_info import CppInfo from conans.model.conan_file import ConanFile from conans.model.env_info import EnvValues from conans.model.ref import ConanFileReferenc...
36.266667
86
0.693015
import unittest from conans.client.conf import get_default_settings_yml from conans.client.generators.pkg_config import PkgConfigGenerator from conans.model.build_info import CppInfo from conans.model.conan_file import ConanFile from conans.model.env_info import EnvValues from conans.model.ref import ConanFileReferenc...
true
true
f708b85991c8dfcba354718ee1d392233e0b43f4
156
py
Python
src/decisionengine_modules/AWS/sources/BillingInfoSourceProxy.py
hyunwoo18/decisionengine_modules
a67462628c2074e768d0825edee4ee5d570030e0
[ "BSD-3-Clause" ]
null
null
null
src/decisionengine_modules/AWS/sources/BillingInfoSourceProxy.py
hyunwoo18/decisionengine_modules
a67462628c2074e768d0825edee4ee5d570030e0
[ "BSD-3-Clause" ]
null
null
null
src/decisionengine_modules/AWS/sources/BillingInfoSourceProxy.py
hyunwoo18/decisionengine_modules
a67462628c2074e768d0825edee4ee5d570030e0
[ "BSD-3-Clause" ]
null
null
null
from decisionengine.framework.modules import Source, SourceProxy BillingInfoSourceProxy = SourceProxy.SourceProxy Source.describe(BillingInfoSourceProxy)
26
64
0.878205
from decisionengine.framework.modules import Source, SourceProxy BillingInfoSourceProxy = SourceProxy.SourceProxy Source.describe(BillingInfoSourceProxy)
true
true
f708b96f67ceebcc32a1ac0dc93b639c6567d104
27
py
Python
search/serialize/tests/__init__.py
ID2797370/arxiv-search
889402e8eef9a2faaa8e900978cd27ff2784ce33
[ "MIT" ]
35
2018-12-18T02:51:09.000Z
2022-03-30T04:43:20.000Z
search/serialize/tests/__init__.py
ID2797370/arxiv-search
889402e8eef9a2faaa8e900978cd27ff2784ce33
[ "MIT" ]
172
2018-02-02T14:35:11.000Z
2018-12-04T15:35:30.000Z
search/serialize/tests/__init__.py
ID2797370/arxiv-search
889402e8eef9a2faaa8e900978cd27ff2784ce33
[ "MIT" ]
13
2019-01-10T22:01:48.000Z
2021-11-05T12:25:08.000Z
"""Serialization tests."""
13.5
26
0.666667
true
true
f708b9851df648db1d879ef81fdf4b02ee8f4efb
493
py
Python
output/models/ms_data/complex_type/ct_e008_xsd/ct_e008.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
1
2021-08-14T17:59:21.000Z
2021-08-14T17:59:21.000Z
output/models/ms_data/complex_type/ct_e008_xsd/ct_e008.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
4
2020-02-12T21:30:44.000Z
2020-04-15T20:06:46.000Z
output/models/ms_data/complex_type/ct_e008_xsd/ct_e008.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
null
null
null
from dataclasses import dataclass, field from typing import Dict @dataclass class FooType: class Meta: name = "fooType" value: str = field( default="", metadata={ "required": True, } ) any_attributes: Dict[str, str] = field( default_factory=dict, ...
17
43
0.527383
from dataclasses import dataclass, field from typing import Dict @dataclass class FooType: class Meta: name = "fooType" value: str = field( default="", metadata={ "required": True, } ) any_attributes: Dict[str, str] = field( default_factory=dict, ...
true
true
f708bab24562ef63a18b37d8b771cc69788e98b2
5,371
py
Python
pytorch_lightning/plugins/training_type/parallel.py
randommm/pytorch-lightning
10e87b7b7acbbad8fc12ec5c07638ed093547ef8
[ "Apache-2.0" ]
1
2021-07-22T14:06:43.000Z
2021-07-22T14:06:43.000Z
pytorch_lightning/plugins/training_type/parallel.py
randommm/pytorch-lightning
10e87b7b7acbbad8fc12ec5c07638ed093547ef8
[ "Apache-2.0" ]
null
null
null
pytorch_lightning/plugins/training_type/parallel.py
randommm/pytorch-lightning
10e87b7b7acbbad8fc12ec5c07638ed093547ef8
[ "Apache-2.0" ]
null
null
null
# Copyright The PyTorch Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
36.787671
118
0.707876
import os from abc import ABC, abstractmethod from contextlib import contextmanager from typing import Any, List, Optional import torch from torch.nn.parallel import DistributedDataParallel import pytorch_lightning as pl from pytorch_lightning.overrides.base import unwrap_lightning_module from pytorch_li...
true
true
f708bacf347d7ba9da3a06c0436000a3c9c5d36a
724
gyp
Python
binding.gyp
manishmalik/Modsecurity-nodejs
fe198394dd4b062b6404a7b7c4000f8888c9a580
[ "MIT" ]
15
2017-04-21T20:23:02.000Z
2020-12-21T11:56:53.000Z
binding.gyp
manishmalik/Modsecurity-nodejs
fe198394dd4b062b6404a7b7c4000f8888c9a580
[ "MIT" ]
1
2016-08-07T05:04:32.000Z
2016-08-09T10:36:09.000Z
binding.gyp
manishmalik/Modsecurity-nodejs
fe198394dd4b062b6404a7b7c4000f8888c9a580
[ "MIT" ]
4
2016-06-18T21:31:32.000Z
2018-11-13T22:40:24.000Z
{ "targets": [ { "target_name": "modsecurity", "sources": [ "modsecurity_wrap.cxx" ], "include_dirs": ['/usr/include/modsecurity/',], "libraries": ['/usr/lib/libmodsecurity.a', '/usr/lib/libmodsecurity.so', '/usr/lib/libmodsecurity.a', '/usr/lib/libmodsecurity.so.3.0.0', ...
32.909091
53
0.569061
{ "targets": [ { "target_name": "modsecurity", "sources": [ "modsecurity_wrap.cxx" ], "include_dirs": ['/usr/include/modsecurity/',], "libraries": ['/usr/lib/libmodsecurity.a', '/usr/lib/libmodsecurity.so', '/usr/lib/libmodsecurity.a', '/usr/lib/libmodsecurity.so.3.0.0', ...
true
true
f708bb067419da2a8f90d27a3e62ee93b9af35d0
2,044
py
Python
grab/captcha/backend/gui.py
brabadu/grab
92b1d68ceeece3087e053064520261a7aef3bd02
[ "MIT" ]
1
2021-05-10T16:03:24.000Z
2021-05-10T16:03:24.000Z
grab/captcha/backend/gui.py
brabadu/grab
92b1d68ceeece3087e053064520261a7aef3bd02
[ "MIT" ]
null
null
null
grab/captcha/backend/gui.py
brabadu/grab
92b1d68ceeece3087e053064520261a7aef3bd02
[ "MIT" ]
null
null
null
import tempfile import webbrowser import time import os import pygtk import gtk try: from StringIO import StringIO except ImportError: from io import StringIO from grab import Grab from .base import CaptchaBackend pygtk.require('2.0') class CaptchaWindow(object): def __init__(self, path, solution): ...
25.873418
53
0.606654
import tempfile import webbrowser import time import os import pygtk import gtk try: from StringIO import StringIO except ImportError: from io import StringIO from grab import Grab from .base import CaptchaBackend pygtk.require('2.0') class CaptchaWindow(object): def __init__(self, path, solution): ...
true
true
f708bb09bee3270dd8d3eb7e6cd9129f9c54f611
54
py
Python
constants.py
I-question-this/metame
a055afde75e15d97a53731a223bfe5e5ba29c5ee
[ "MIT" ]
484
2016-08-08T01:49:49.000Z
2022-03-06T05:20:37.000Z
constants.py
I-question-this/metame
a055afde75e15d97a53731a223bfe5e5ba29c5ee
[ "MIT" ]
15
2016-08-08T01:59:36.000Z
2021-02-01T05:27:54.000Z
constants.py
I-question-this/metame
a055afde75e15d97a53731a223bfe5e5ba29c5ee
[ "MIT" ]
94
2016-08-08T02:47:17.000Z
2022-02-01T17:44:27.000Z
supported_archs = ["x86"] supported_bits = [32, 64]
13.5
26
0.666667
supported_archs = ["x86"] supported_bits = [32, 64]
true
true
f708bb468e7ab709812ea009bdf654073360cd69
2,275
py
Python
code/processing/growth_rates/2021-08-14_r1_DoubleKO_acetate/analysis.py
cremerlab/useless_expression
a6020674f0ae73b4cc6173de60a0ea93016ee562
[ "MIT" ]
null
null
null
code/processing/growth_rates/2021-08-14_r1_DoubleKO_acetate/analysis.py
cremerlab/useless_expression
a6020674f0ae73b4cc6173de60a0ea93016ee562
[ "MIT" ]
null
null
null
code/processing/growth_rates/2021-08-14_r1_DoubleKO_acetate/analysis.py
cremerlab/useless_expression
a6020674f0ae73b4cc6173de60a0ea93016ee562
[ "MIT" ]
null
null
null
#%% import numpy as np import pandas as pd import futileprot.viz import altair as alt import altair_saver import scipy.stats colors, palette = futileprot.viz.altair_style() # Add metadata DATE = '2021-08-14' RUN_NO = 1 STRAINS = 'DoubleKO' MEDIUM = 'acetate' # Load the measurement data data = pd.read_csv(f'./output...
32.971014
89
0.551648
import numpy as np import pandas as pd import futileprot.viz import altair as alt import altair_saver import scipy.stats colors, palette = futileprot.viz.altair_style() DATE = '2021-08-14' RUN_NO = 1 STRAINS = 'DoubleKO' MEDIUM = 'acetate' data = pd.read_csv(f'./output/{DATE}_r{RUN_NO}_{STRAINS}_{MEDIUM}_exponen...
true
true
f708bc3b0e1b8efa4b672733fdae01f2f74c4bfb
142
py
Python
wxwork_hr_syncing/wizard/__init__.py
rainbow-studio-solution/wxwork
344a0a8f8f0ac364101a1bb4a98c132588118839
[ "MulanPSL-1.0" ]
9
2021-01-02T15:42:21.000Z
2021-08-13T08:09:16.000Z
wxwork_hr_syncing/wizard/__init__.py
rainbow-studio-solution/wxwork
344a0a8f8f0ac364101a1bb4a98c132588118839
[ "MulanPSL-1.0" ]
null
null
null
wxwork_hr_syncing/wizard/__init__.py
rainbow-studio-solution/wxwork
344a0a8f8f0ac364101a1bb4a98c132588118839
[ "MulanPSL-1.0" ]
4
2021-01-11T04:57:07.000Z
2021-05-21T06:01:55.000Z
# -*- coding: utf-8 -*- from . import wizard_wxwork_contacts_sync from . import wizard_wxwork_sync_tag from . import wizard_wxwork_sync_user
23.666667
41
0.788732
from . import wizard_wxwork_contacts_sync from . import wizard_wxwork_sync_tag from . import wizard_wxwork_sync_user
true
true
f708bcd4339a6533749a5be7215ccfd3de77d575
1,536
py
Python
rango/models.py
StandeBoerIsle/tango_with_django_project
bb2e3a54e7dbc10c3e6ab7832a53dc0c75121341
[ "MIT" ]
null
null
null
rango/models.py
StandeBoerIsle/tango_with_django_project
bb2e3a54e7dbc10c3e6ab7832a53dc0c75121341
[ "MIT" ]
null
null
null
rango/models.py
StandeBoerIsle/tango_with_django_project
bb2e3a54e7dbc10c3e6ab7832a53dc0c75121341
[ "MIT" ]
1
2018-02-20T15:46:10.000Z
2018-02-20T15:46:10.000Z
from __future__ import unicode_literals from django.db import models from django import forms from django.template.defaultfilters import slugify from django.contrib.auth.models import User from django.utils import timezone class Category(models.Model): name = models.CharField(max_length=128, unique=True) vie...
30.117647
75
0.71224
from __future__ import unicode_literals from django.db import models from django import forms from django.template.defaultfilters import slugify from django.contrib.auth.models import User from django.utils import timezone class Category(models.Model): name = models.CharField(max_length=128, unique=True) vie...
true
true
f708be84c637a1aff470e51a222399852d8dac30
3,127
py
Python
sensor_stick/src/sensor_stick/features.py
Fred159/3D-Perception
a23a42dc19d0a38e48beb5e7c0725e6d14c542f3
[ "MIT" ]
8
2018-12-05T06:18:25.000Z
2021-01-15T03:13:50.000Z
sensor_stick/src/sensor_stick/features.py
Fred159/3D-Perception
a23a42dc19d0a38e48beb5e7c0725e6d14c542f3
[ "MIT" ]
null
null
null
sensor_stick/src/sensor_stick/features.py
Fred159/3D-Perception
a23a42dc19d0a38e48beb5e7c0725e6d14c542f3
[ "MIT" ]
1
2020-05-11T02:30:31.000Z
2020-05-11T02:30:31.000Z
import matplotlib.colors import matplotlib.pyplot as plt import numpy as np from pcl_helper import * print('run features.py') def rgb_to_hsv(rgb_list): rgb_normalized = [1.0 * rgb_list[0] / 255, 1.0 * rgb_list[1] / 255, 1.0 * rgb_list[2] / 255] hsv_normalized = matplotlib.colors.rgb_to_hsv([[rgb_normalized]]...
39.0875
116
0.683722
import matplotlib.colors import matplotlib.pyplot as plt import numpy as np from pcl_helper import * print('run features.py') def rgb_to_hsv(rgb_list): rgb_normalized = [1.0 * rgb_list[0] / 255, 1.0 * rgb_list[1] / 255, 1.0 * rgb_list[2] / 255] hsv_normalized = matplotlib.colors.rgb_to_hsv([[rgb_normalized]]...
true
true
f708bf57521f7d9481aa81d8b11d1bb1fd26633a
2,945
py
Python
form_designer/views.py
LUKKIEN/django-form-designer
009e0870cae19e8570b9a480b6b64aee1dd38dfe
[ "BSD-3-Clause" ]
1
2015-03-03T20:37:07.000Z
2015-03-03T20:37:07.000Z
form_designer/views.py
piquadrat/django-form-designer
5ae7c3b00e538ada23d830d15424b557cac73017
[ "BSD-3-Clause" ]
null
null
null
form_designer/views.py
piquadrat/django-form-designer
5ae7c3b00e538ada23d830d15424b557cac73017
[ "BSD-3-Clause" ]
null
null
null
from django.shortcuts import get_object_or_404, render_to_response from django.template import RequestContext from django.utils.translation import ugettext as _ from django.http import HttpResponseRedirect from django.conf import settings from django.contrib import messages from django.core.context_processors import cs...
40.902778
109
0.70017
from django.shortcuts import get_object_or_404, render_to_response from django.template import RequestContext from django.utils.translation import ugettext as _ from django.http import HttpResponseRedirect from django.conf import settings from django.contrib import messages from django.core.context_processors import cs...
true
true
f708c3199d4231ae99a6c0e5aafc7662e7c6bc86
9,291
py
Python
test/functional/feature_part_usbdevice.py
dmuralov/particl-core
ac4dc00b7cd6293329ff4bf3acaa65636238910a
[ "MIT" ]
null
null
null
test/functional/feature_part_usbdevice.py
dmuralov/particl-core
ac4dc00b7cd6293329ff4bf3acaa65636238910a
[ "MIT" ]
null
null
null
test/functional/feature_part_usbdevice.py
dmuralov/particl-core
ac4dc00b7cd6293329ff4bf3acaa65636238910a
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2018-2020 The Particl Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. import os import json import configparser from test_framework.test_falcon import ( FalconTestFramewo...
38.7125
158
0.6347
import os import json import configparser from test_framework.test_falcon import ( FalconTestFramework, isclose, getIndexAtProperty, ) from test_framework.test_framework import SkipTest from test_framework.util import assert_raises_rpc_error from test_framework.authproxy import JSONRPCException clas...
true
true
f708c3bb5a529fe11a122490916ffbb446bcaccc
5,304
py
Python
submit.py
Complicateddd/Complicateddd-ROITransformer
2adfbf98892d569c460d100c6e2169c5fa3a9b82
[ "Apache-2.0" ]
null
null
null
submit.py
Complicateddd/Complicateddd-ROITransformer
2adfbf98892d569c460d100c6e2169c5fa3a9b82
[ "Apache-2.0" ]
null
null
null
submit.py
Complicateddd/Complicateddd-ROITransformer
2adfbf98892d569c460d100c6e2169c5fa3a9b82
[ "Apache-2.0" ]
1
2021-12-17T12:49:06.000Z
2021-12-17T12:49:06.000Z
from mmdet.apis import init_detector, inference_detector, show_result, draw_poly_detections import mmcv from mmcv import Config from mmdet.datasets import get_dataset import cv2 import os import numpy as np from tqdm import tqdm import DOTA_devkit.polyiou as polyiou import math import pdb def py_cpu_nms_poly_fast_np(d...
34
114
0.534691
from mmdet.apis import init_detector, inference_detector, show_result, draw_poly_detections import mmcv from mmcv import Config from mmdet.datasets import get_dataset import cv2 import os import numpy as np from tqdm import tqdm import DOTA_devkit.polyiou as polyiou import math import pdb def py_cpu_nms_poly_fast_np(d...
true
true
f708c565a30af39e3fe1c4a21b9dd18553b91c54
17,392
py
Python
nsot/api/serializers.py
narJH27/nsot
22e6a81c76147e55ab9a19eb55cdc741c5723fbc
[ "Apache-2.0" ]
null
null
null
nsot/api/serializers.py
narJH27/nsot
22e6a81c76147e55ab9a19eb55cdc741c5723fbc
[ "Apache-2.0" ]
null
null
null
nsot/api/serializers.py
narJH27/nsot
22e6a81c76147e55ab9a19eb55cdc741c5723fbc
[ "Apache-2.0" ]
null
null
null
from __future__ import unicode_literals import ast from collections import OrderedDict import json import logging from django.contrib.auth import get_user_model from rest_framework import fields, serializers from rest_framework_bulk import BulkSerializerMixin, BulkListSerializer from . import auth from .. import exc,...
30.673721
79
0.626437
from __future__ import unicode_literals import ast from collections import OrderedDict import json import logging from django.contrib.auth import get_user_model from rest_framework import fields, serializers from rest_framework_bulk import BulkSerializerMixin, BulkListSerializer from . import auth from .. import exc,...
true
true
f708c660e4e2ca50541d552931d0c6fba439a8f4
5,069
py
Python
stonesoup/predictor/tests/test_kalman.py
Isaac-JenkinsRA/Stone-Soup
54c9c7dca8162dadaa58e85933cf10a0f86ce1e1
[ "MIT" ]
1
2020-07-21T15:20:20.000Z
2020-07-21T15:20:20.000Z
stonesoup/predictor/tests/test_kalman.py
Isaac-JenkinsRA/Stone-Soup
54c9c7dca8162dadaa58e85933cf10a0f86ce1e1
[ "MIT" ]
null
null
null
stonesoup/predictor/tests/test_kalman.py
Isaac-JenkinsRA/Stone-Soup
54c9c7dca8162dadaa58e85933cf10a0f86ce1e1
[ "MIT" ]
null
null
null
# coding: utf-8 import datetime import pytest import numpy as np from ...models.transition.linear import ConstantVelocity from ...predictor.kalman import ( KalmanPredictor, ExtendedKalmanPredictor, UnscentedKalmanPredictor, SqrtKalmanPredictor) from ...types.prediction import GaussianStatePrediction from ...ty...
37.828358
95
0.655356
import datetime import pytest import numpy as np from ...models.transition.linear import ConstantVelocity from ...predictor.kalman import ( KalmanPredictor, ExtendedKalmanPredictor, UnscentedKalmanPredictor, SqrtKalmanPredictor) from ...types.prediction import GaussianStatePrediction from ...types.state impor...
true
true
f708c66d9c43e6918050056e64a62284c29ad04e
1,997
py
Python
changeDetection.py
jials/CS4243-project
100d7ed1cbd379de3b2e65c16e037bf4afec0fb1
[ "MIT" ]
null
null
null
changeDetection.py
jials/CS4243-project
100d7ed1cbd379de3b2e65c16e037bf4afec0fb1
[ "MIT" ]
null
null
null
changeDetection.py
jials/CS4243-project
100d7ed1cbd379de3b2e65c16e037bf4afec0fb1
[ "MIT" ]
null
null
null
import numpy as np import cv2 import imageMarker lucas_kanade_params = dict( winSize= (4, 4), maxLevel= 3, #level of pyramids used criteria= (cv2.TERM_CRITERIA_EPS | cv2.TERM_CRITERIA_COUNT, 10, 0.03) ) def mark_features_on_all_images(images, features_coordinates): marked_images = [] marked_frame_...
31.698413
119
0.632949
import numpy as np import cv2 import imageMarker lucas_kanade_params = dict( winSize= (4, 4), maxLevel= 3, criteria= (cv2.TERM_CRITERIA_EPS | cv2.TERM_CRITERIA_COUNT, 10, 0.03) ) def mark_features_on_all_images(images, features_coordinates): marked_images = [] marked_frame_coordinates = [] l...
true
true
f708c79acb0b72bf6f596c6e15d29009ca1ee58b
67,151
py
Python
Scripts/ANN_AllAnalysis_ClimateModels_v4-RandomNoise-TestWarmthGFDL.py
zmlabe/ModelBiasesANN
df28842a8594870db3282682b1261af5058af832
[ "MIT" ]
1
2022-02-12T11:56:54.000Z
2022-02-12T11:56:54.000Z
Scripts/ANN_AllAnalysis_ClimateModels_v4-RandomNoise-TestWarmthGFDL.py
zmlabe/ModelBiasesANN
df28842a8594870db3282682b1261af5058af832
[ "MIT" ]
null
null
null
Scripts/ANN_AllAnalysis_ClimateModels_v4-RandomNoise-TestWarmthGFDL.py
zmlabe/ModelBiasesANN
df28842a8594870db3282682b1261af5058af832
[ "MIT" ]
null
null
null
""" ANN for evaluating model biases, differences, and other thresholds using explainable AI (add warmth/cool GFDL-CM3 model only) Reference : Barnes et al. [2020, JAMES] Author : Zachary M. Labe Date : 20 July 2021 Version : 4 - subsamples random weight class (#8) for mmmean """ ### Import packages imp...
51.496166
355
0.420024
import matplotlib.pyplot as plt import numpy as np import keras.backend as K from keras.layers import Dense, Activation from keras import regularizers from keras import metrics from keras import optimizers from keras.models import Sequential import tensorflow.keras as keras import tensorflow as tf import pandas as pd...
true
true
f708c7fb5daa5795a1afe4d156b806022b4a3826
19,116
py
Python
ansible/modules/cloud/rackspace/rax_files_objects.py
EnjoyLifeFund/py36pkgs
0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2
[ "MIT", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
ansible/modules/cloud/rackspace/rax_files_objects.py
EnjoyLifeFund/py36pkgs
0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2
[ "MIT", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
ansible/modules/cloud/rackspace/rax_files_objects.py
EnjoyLifeFund/py36pkgs
0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2
[ "MIT", "BSD-2-Clause", "BSD-3-Clause" ]
1
2020-02-13T14:24:57.000Z
2020-02-13T14:24:57.000Z
#!/usr/bin/python # (c) 2013, Paul Durivage <paul.durivage@rackspace.com> # # This file is part of Ansible. # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (a...
30.43949
99
0.615191
ANSIBLE_METADATA = {'metadata_version': '1.0', 'status': ['preview'], 'supported_by': 'community'} DOCUMENTATION = ''' --- module: rax_files_objects short_description: Upload, download, and delete objects in Rackspace Cloud Files description: - Upload, do...
true
true
f708c8fa7db92a7a71d90a6a40b14f43250d1014
678
py
Python
ctypes_generation/extended_structs/_OBJECT_ATTRIBUTES.py
IMULMUL/PythonForWindows
61e027a678d5b87aa64fcf8a37a6661a86236589
[ "BSD-3-Clause" ]
479
2016-01-08T00:53:34.000Z
2022-03-22T10:28:19.000Z
ctypes_generation/extended_structs/_OBJECT_ATTRIBUTES.py
IMULMUL/PythonForWindows
61e027a678d5b87aa64fcf8a37a6661a86236589
[ "BSD-3-Clause" ]
38
2017-12-29T17:09:04.000Z
2022-01-31T08:27:47.000Z
ctypes_generation/extended_structs/_OBJECT_ATTRIBUTES.py
IMULMUL/PythonForWindows
61e027a678d5b87aa64fcf8a37a6661a86236589
[ "BSD-3-Clause" ]
103
2016-01-10T01:32:17.000Z
2021-12-24T17:21:06.000Z
class _OBJECT_ATTRIBUTES(_OBJECT_ATTRIBUTES): @classmethod def from_string(cls, path, attributes=OBJ_CASE_INSENSITIVE): # Directly on constructor ? self = cls() self.Length = ctypes.sizeof(self) self.RootDirectory = 0 self.ObjectName = ctypes.pointer(LSA_UNICODE_STRING.from_strin...
42.375
95
0.669617
class _OBJECT_ATTRIBUTES(_OBJECT_ATTRIBUTES): @classmethod def from_string(cls, path, attributes=OBJ_CASE_INSENSITIVE): self = cls() self.Length = ctypes.sizeof(self) self.RootDirectory = 0 self.ObjectName = ctypes.pointer(LSA_UNICODE_STRING.from_string(path)) self.Attri...
true
true
f708cb03dff9c74d69c541a4405a739d71ae3c40
860
py
Python
tests/lib/test_script.py
lucasan123/BitgesellX-server
99e184f5e829dad7901d4ed4e4490ac8ddc6c538
[ "MIT" ]
null
null
null
tests/lib/test_script.py
lucasan123/BitgesellX-server
99e184f5e829dad7901d4ed4e4490ac8ddc6c538
[ "MIT" ]
null
null
null
tests/lib/test_script.py
lucasan123/BitgesellX-server
99e184f5e829dad7901d4ed4e4490ac8ddc6c538
[ "MIT" ]
null
null
null
import pytest from bitgesellx.lib.script import OpCodes, is_unspendable_legacy, is_unspendable_genesis @pytest.mark.parametrize("script, iug", ( (bytes([OpCodes.OP_RETURN]), False), (bytes([OpCodes.OP_RETURN]) + bytes([2, 28, 50]), False), (bytes([OpCodes.OP_0, OpCodes.OP_RETURN]), True), (bytes([OpC...
31.851852
88
0.70814
import pytest from bitgesellx.lib.script import OpCodes, is_unspendable_legacy, is_unspendable_genesis @pytest.mark.parametrize("script, iug", ( (bytes([OpCodes.OP_RETURN]), False), (bytes([OpCodes.OP_RETURN]) + bytes([2, 28, 50]), False), (bytes([OpCodes.OP_0, OpCodes.OP_RETURN]), True), (bytes([OpC...
true
true
f708cbdb70c458a183de5c672f8e50b1773e3d2a
974
py
Python
tests/test_worker_aio.py
chainsquad/python-graphenelib
6df90dbc116d8333f2d3db830818d9f22934e33f
[ "MIT" ]
83
2015-09-04T13:49:55.000Z
2022-03-30T21:13:54.000Z
tests/test_worker_aio.py
chainsquad/python-graphenelib
6df90dbc116d8333f2d3db830818d9f22934e33f
[ "MIT" ]
146
2015-09-23T19:07:16.000Z
2021-07-01T01:39:15.000Z
tests/test_worker_aio.py
chainsquad/python-graphenelib
6df90dbc116d8333f2d3db830818d9f22934e33f
[ "MIT" ]
70
2015-09-23T18:43:37.000Z
2021-11-12T14:58:29.000Z
# -*- coding: utf-8 -*- import aiounittest from datetime import datetime from .fixtures_aio import fixture_data, Worker, Workers, Account from graphenecommon import exceptions class Testcases(aiounittest.AsyncTestCase): def setUp(self): fixture_data() async def test_worker(self): w = await Wo...
32.466667
72
0.678645
import aiounittest from datetime import datetime from .fixtures_aio import fixture_data, Worker, Workers, Account from graphenecommon import exceptions class Testcases(aiounittest.AsyncTestCase): def setUp(self): fixture_data() async def test_worker(self): w = await Worker("1.14.139") ...
true
true
f708cdb5883a2e4ef8a0b863ae08e582d5757825
2,436
py
Python
integration_tests/test_suites/celery-k8s-integration-test-suite/conftest.py
rpatil524/dagster
6f918d94cbd543ab752ab484a65e3a40fd441716
[ "Apache-2.0" ]
1
2021-01-31T19:16:29.000Z
2021-01-31T19:16:29.000Z
integration_tests/test_suites/celery-k8s-integration-test-suite/conftest.py
rpatil524/dagster
6f918d94cbd543ab752ab484a65e3a40fd441716
[ "Apache-2.0" ]
null
null
null
integration_tests/test_suites/celery-k8s-integration-test-suite/conftest.py
rpatil524/dagster
6f918d94cbd543ab752ab484a65e3a40fd441716
[ "Apache-2.0" ]
1
2019-09-11T03:02:27.000Z
2019-09-11T03:02:27.000Z
# pylint: disable=unused-import import os import docker import pytest from dagster_celery_k8s.launcher import CeleryK8sRunLauncher from dagster_k8s_test_infra.helm import TEST_AWS_CONFIGMAP_NAME from dagster_k8s_test_infra.integration_utils import image_pull_policy from dagster_test.test_project import build_and_tag_t...
32.052632
100
0.721675
import os import docker import pytest from dagster_celery_k8s.launcher import CeleryK8sRunLauncher from dagster_k8s_test_infra.helm import TEST_AWS_CONFIGMAP_NAME from dagster_k8s_test_infra.integration_utils import image_pull_policy from dagster_test.test_project import build_and_tag_test_image, get_test_project_doc...
true
true
f708cdc6ccb2bec72bbd500c4dbdbfa7b65f8e8d
1,633
py
Python
My_AutoML/_legacy/__init__.py
PanyiDong/AutoML
4d981b0287fa27d7a38f029e4b20b3a89e1de4f9
[ "MIT" ]
2
2022-03-03T16:24:08.000Z
2022-03-03T17:17:28.000Z
My_AutoML/_legacy/__init__.py
PanyiDong/My_AutoML
510727bd797e4f6fa213939c62d1d7601952e491
[ "MIT" ]
null
null
null
My_AutoML/_legacy/__init__.py
PanyiDong/My_AutoML
510727bd797e4f6fa213939c62d1d7601952e491
[ "MIT" ]
null
null
null
""" File: __init__.py Author: Panyi Dong GitHub: https://github.com/PanyiDong/ Mathematics Department, University of Illinois at Urbana-Champaign (UIUC) Project: My_AutoML Latest Version: 0.2.0 Relative Path: /My_AutoML/_legacy/__init__.py File Created: Thursday, 7th April 2022 3:59:55 pm Author: Panyi Dong (panyid2@i...
35.5
78
0.784446
from My_AutoML._hpo._legacy import ( AutoTabular, AutoTabularClassifier, AutoTabularRegressor, )
true
true
f708ce1cc05e059b422d58631ec18ea706b397a7
2,612
py
Python
bokeh_plot.py
ulrica221/used_car_playground
ff99ebc6bf256bb4d90be979c90cbd54479a9959
[ "MIT" ]
null
null
null
bokeh_plot.py
ulrica221/used_car_playground
ff99ebc6bf256bb4d90be979c90cbd54479a9959
[ "MIT" ]
null
null
null
bokeh_plot.py
ulrica221/used_car_playground
ff99ebc6bf256bb4d90be979c90cbd54479a9959
[ "MIT" ]
null
null
null
from bokeh.io import show, output_notebook from bokeh.models import (CDSView, ColorBar, ColumnDataSource, CustomJS, CustomJSFilter, GeoJSONDataSource, HoverTool, LinearColorMapper, Slider) from bokeh.layouts import column, row, widgetbox # p...
45.034483
112
0.517228
from bokeh.io import show, output_notebook from bokeh.models import (CDSView, ColorBar, ColumnDataSource, CustomJS, CustomJSFilter, GeoJSONDataSource, HoverTool, LinearColorMapper, Slider) from bokeh.layouts import column, row, widgetbox fr...
true
true
f708ce5f44d667ef8e7f39018776b1547561c78b
31,248
py
Python
kscore/serialize.py
WeiZhixiong/ksc-sdk-python
a93237ce376e107eaae644678ef6b99819a9f8eb
[ "Apache-2.0" ]
53
2016-09-21T15:52:14.000Z
2021-12-23T09:23:00.000Z
kscore/serialize.py
WeiZhixiong/ksc-sdk-python
a93237ce376e107eaae644678ef6b99819a9f8eb
[ "Apache-2.0" ]
27
2016-09-21T15:24:43.000Z
2021-11-18T08:38:38.000Z
kscore/serialize.py
WeiZhixiong/ksc-sdk-python
a93237ce376e107eaae644678ef6b99819a9f8eb
[ "Apache-2.0" ]
68
2016-09-06T10:33:09.000Z
2021-11-16T07:13:03.000Z
# Copyright 2014 ksyun.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license" fil...
40.476684
79
0.634633
import re import base64 from xml.etree import ElementTree import calendar from kscore.compat import six from kscore.compat import json, formatdate from kscore.utils import parse_to_aware_datetime from kscore.utils import percent_encode from kscore import validate DEFAULT_TIMESTAMP_FORMAT = 'iso8601' IS...
true
true
f708cecc49ed56d9057dcff2713d8f85cfda72a4
9,432
py
Python
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/aio/_compute_management_client_async.py
LianwMS/azure-sdk-for-python
612d7bca9de86ee1bd1fa59291d7bf897ba9213f
[ "MIT" ]
2
2019-05-17T21:24:53.000Z
2020-02-12T11:13:42.000Z
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/aio/_compute_management_client_async.py
LianwMS/azure-sdk-for-python
612d7bca9de86ee1bd1fa59291d7bf897ba9213f
[ "MIT" ]
15
2019-07-12T18:18:04.000Z
2019-07-25T20:55:51.000Z
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/aio/_compute_management_client_async.py
LianwMS/azure-sdk-for-python
612d7bca9de86ee1bd1fa59291d7bf897ba9213f
[ "MIT" ]
2
2020-05-21T22:51:22.000Z
2020-05-26T20:53:01.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 ...
63.302013
172
0.791031
from typing import Any, Optional, TYPE_CHECKING from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer if TYPE_CHECKING: from azure.core.credentials_async import AsyncTokenCredential from ._configuration_async import ComputeManagementClientConfiguration from ....
true
true
f708ceee9ccbcb860ce2b2f569a32b4453f38050
2,392
py
Python
custom/penn_state/models.py
johan--/commcare-hq
86ee99c54f55ee94e4c8f2f6f30fc44e10e69ebd
[ "BSD-3-Clause" ]
null
null
null
custom/penn_state/models.py
johan--/commcare-hq
86ee99c54f55ee94e4c8f2f6f30fc44e10e69ebd
[ "BSD-3-Clause" ]
1
2022-03-12T01:03:25.000Z
2022-03-12T01:03:25.000Z
custom/penn_state/models.py
johan--/commcare-hq
86ee99c54f55ee94e4c8f2f6f30fc44e10e69ebd
[ "BSD-3-Clause" ]
null
null
null
import datetime from dimagi.ext.couchdbkit import (Document, StringProperty, ListProperty, DictProperty, DateProperty) from corehq.apps.groups.models import Group from .constants import * class LegacyWeeklyReport(Document): """ This doc stores the aggregate weekly results per site. Example: ...
30.278481
75
0.539716
import datetime from dimagi.ext.couchdbkit import (Document, StringProperty, ListProperty, DictProperty, DateProperty) from corehq.apps.groups.models import Group from .constants import * class LegacyWeeklyReport(Document): domain = StringProperty() site = StringProperty() week_end_date = DatePrope...
true
true
f708cef5f660495ed8e57399503b12749a716007
121,273
py
Python
tests/unit/gapic/gaming_v1beta/test_game_server_clusters_service.py
LaudateCorpus1/python-game-servers
9e22e6dd4e2543d694e33eb1ec2c4f9a05d8b940
[ "Apache-2.0" ]
null
null
null
tests/unit/gapic/gaming_v1beta/test_game_server_clusters_service.py
LaudateCorpus1/python-game-servers
9e22e6dd4e2543d694e33eb1ec2c4f9a05d8b940
[ "Apache-2.0" ]
null
null
null
tests/unit/gapic/gaming_v1beta/test_game_server_clusters_service.py
LaudateCorpus1/python-game-servers
9e22e6dd4e2543d694e33eb1ec2c4f9a05d8b940
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
38.683573
143
0.698573
import os import mock import grpc from grpc.experimental import aio import math import pytest from proto.marshal.rules.dates import DurationRule, TimestampRule from google.api_core import client_options from google.api_core import exceptions as core_exceptions from google.api_core import future from g...
true
true
f708cf65433e09e25b9e03b6708df6923be84eac
168
py
Python
src/pydantic_vault/__init__.py
nymous/pydantic-vault
1d35885a9bb588d8f4d788d0a259a4894c207e8d
[ "MIT" ]
26
2020-03-13T10:13:15.000Z
2022-02-05T17:58:06.000Z
src/pydantic_vault/__init__.py
nymous/pydantic-vault
1d35885a9bb588d8f4d788d0a259a4894c207e8d
[ "MIT" ]
7
2020-03-21T14:24:57.000Z
2021-09-02T14:03:11.000Z
src/pydantic_vault/__init__.py
nymous/pydantic-vault
1d35885a9bb588d8f4d788d0a259a4894c207e8d
[ "MIT" ]
1
2021-06-06T20:53:02.000Z
2021-06-06T20:53:02.000Z
__version__ = "0.7.1" from .vault_settings import VaultParameterError, vault_config_settings_source __all__ = ["vault_config_settings_source", "VaultParameterError"]
28
77
0.827381
__version__ = "0.7.1" from .vault_settings import VaultParameterError, vault_config_settings_source __all__ = ["vault_config_settings_source", "VaultParameterError"]
true
true
f708cf955db7b4498d4f38ba6a115c6fb17aea00
7,505
py
Python
accelbyte_py_sdk/api/lobby/operations/notification/free_form_notification.py
encyphered/accelbyte-python-sdk
09c1e989d7251de308150fdcd3119d662ca2d205
[ "MIT" ]
null
null
null
accelbyte_py_sdk/api/lobby/operations/notification/free_form_notification.py
encyphered/accelbyte-python-sdk
09c1e989d7251de308150fdcd3119d662ca2d205
[ "MIT" ]
null
null
null
accelbyte_py_sdk/api/lobby/operations/notification/free_form_notification.py
encyphered/accelbyte-python-sdk
09c1e989d7251de308150fdcd3119d662ca2d205
[ "MIT" ]
null
null
null
# Auto-generated at 2021-09-27T17:01:26.691956+08:00 # from: Justice Lobby Service (1.33.0) # Copyright (c) 2018 - 2021 AccelByte Inc. All Rights Reserved. # This is licensed software from AccelByte Inc, for limitations # and restrictions contact your company contract manager. # pylint: disable=duplicate-code # pylin...
29.664032
148
0.64024
from __future__ import annotations from typing import Any, Dict, List, Optional, Tuple, Union from .....core import Operation from .....core import HttpResponse from ...models import ModelFreeFormNotificationRequest from ...models import RestapiErrorResponseBody class FreeFormNotification(Opera...
true
true
f708cfc7280e646718c5d5f20ecb8f4fc890797b
2,719
py
Python
Scripts/extract_cds.py
sivico26/Bioinfo_errands
5cea098f422e1134639e4d6d8aa76098a0c70551
[ "MIT" ]
1
2021-01-13T22:07:00.000Z
2021-01-13T22:07:00.000Z
Scripts/extract_cds.py
sivico26/Bioinfo_errands
5cea098f422e1134639e4d6d8aa76098a0c70551
[ "MIT" ]
null
null
null
Scripts/extract_cds.py
sivico26/Bioinfo_errands
5cea098f422e1134639e4d6d8aa76098a0c70551
[ "MIT" ]
null
null
null
#!/usr/bin/env python from Bio import SeqIO import argparse import pathlib def get_arguments(): parser = argparse.ArgumentParser(description='Extract CDS from a genbank to output a fasta', formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument('input', type=str, help='Path to input...
34.417722
250
0.598014
from Bio import SeqIO import argparse import pathlib def get_arguments(): parser = argparse.ArgumentParser(description='Extract CDS from a genbank to output a fasta', formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument('input', type=str, help='Path to input genbank file') p...
true
true
f708d0b021de0c328c38f3e3891f14b4ae0db94c
1,479
py
Python
backend/stock/workers/get_valuation_ratio.py
fengxia41103/stock
1bba08f77e9038ebdd3905fe734bb51e5fb1bdf1
[ "MIT" ]
1
2021-09-30T05:25:08.000Z
2021-09-30T05:25:08.000Z
backend/stock/workers/get_valuation_ratio.py
fengxia41103/stock
1bba08f77e9038ebdd3905fe734bb51e5fb1bdf1
[ "MIT" ]
8
2021-09-30T05:27:09.000Z
2021-12-03T23:02:24.000Z
backend/stock/workers/get_valuation_ratio.py
fengxia41103/stock
1bba08f77e9038ebdd3905fe734bb51e5fb1bdf1
[ "MIT" ]
3
2021-09-29T05:11:45.000Z
2021-10-31T07:26:31.000Z
import logging import pandas as pd from stock.models import MyStock from stock.models import ValuationRatio from yahooquery import Ticker logger = logging.getLogger("stock") class MyValuationRatio: def __init__(self, symbol): self.stock = MyStock.objects.get(symbol=symbol) def get(self): s...
26.410714
64
0.536173
import logging import pandas as pd from stock.models import MyStock from stock.models import ValuationRatio from yahooquery import Ticker logger = logging.getLogger("stock") class MyValuationRatio: def __init__(self, symbol): self.stock = MyStock.objects.get(symbol=symbol) def get(self): s...
true
true
f708d15462b81866e50f7f7ce288da9790a439e4
13,342
py
Python
slybot/slybot/utils.py
1583582847/-
11e10d5ffc0bf7f25534f5f444f59e9b792b42b8
[ "BSD-3-Clause" ]
1
2019-01-03T02:16:01.000Z
2019-01-03T02:16:01.000Z
slybot/slybot/utils.py
1583582847/-
11e10d5ffc0bf7f25534f5f444f59e9b792b42b8
[ "BSD-3-Clause" ]
null
null
null
slybot/slybot/utils.py
1583582847/-
11e10d5ffc0bf7f25534f5f444f59e9b792b42b8
[ "BSD-3-Clause" ]
null
null
null
from six.moves.urllib_parse import urlparse import chardet import itertools import json import os import re import six from collections import OrderedDict, namedtuple from itertools import chain from scrapely.htmlpage import HtmlPage, HtmlTagType from scrapy.utils.misc import load_object from w3lib.encoding import ht...
32.227053
79
0.590766
from six.moves.urllib_parse import urlparse import chardet import itertools import json import os import re import six from collections import OrderedDict, namedtuple from itertools import chain from scrapely.htmlpage import HtmlPage, HtmlTagType from scrapy.utils.misc import load_object from w3lib.encoding import ht...
true
true
f708d1cd931d1d693bf81474cd5bdb17ae3406f6
834
py
Python
shapenet/networks/utils.py
ss18/shapenet
5a605bee6b2750f3a586ca9a740165e66b5dd7d8
[ "BSD-2-Clause" ]
null
null
null
shapenet/networks/utils.py
ss18/shapenet
5a605bee6b2750f3a586ca9a740165e66b5dd7d8
[ "BSD-2-Clause" ]
null
null
null
shapenet/networks/utils.py
ss18/shapenet
5a605bee6b2750f3a586ca9a740165e66b5dd7d8
[ "BSD-2-Clause" ]
1
2020-09-25T08:55:12.000Z
2020-09-25T08:55:12.000Z
# author: Justus Schock (justus.schock@rwth-aachen.de) import torch class CustomGroupNorm(torch.nn.Module): """ Custom Group Norm which adds n_groups=2 as default parameter """ def __init__(self, n_features, n_groups=2): """ Parameters ---------- n_features : int ...
20.85
64
0.533573
import torch class CustomGroupNorm(torch.nn.Module): def __init__(self, n_features, n_groups=2): super().__init__() self.norm = torch.nn.GroupNorm(n_groups, n_features) def forward(self, x): return self.norm(x)
true
true
f708d1eeb45291c951a49f1eee98109cbc0c9f78
2,499
py
Python
hooks/charmhelpers/fetch/giturl.py
andreibacos/nova-compute-charm
09a27bf91b8b4ee9c1226f8bebc489a192549873
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
hooks/charmhelpers/fetch/giturl.py
andreibacos/nova-compute-charm
09a27bf91b8b4ee9c1226f8bebc489a192549873
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
hooks/charmhelpers/fetch/giturl.py
andreibacos/nova-compute-charm
09a27bf91b8b4ee9c1226f8bebc489a192549873
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# Copyright 2014-2015 Canonical Limited. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
36.217391
75
0.635054
import os from subprocess import check_call, CalledProcessError from charmhelpers.fetch import ( BaseFetchHandler, UnhandledSource, filter_installed_packages, apt_install, ) if filter_installed_packages(['git']) != []: apt_install(['git']) if filter_installed_packages(['git']) != ...
true
true
f708d2da1b61965d0523fb2dd82a2fff52ab6f66
2,098
py
Python
enb/tcall.py
AlysH/experiment-notebook
c6a40b1dd518814ccac50f83b3a09d59202b138e
[ "MIT" ]
null
null
null
enb/tcall.py
AlysH/experiment-notebook
c6a40b1dd518814ccac50f83b3a09d59202b138e
[ "MIT" ]
null
null
null
enb/tcall.py
AlysH/experiment-notebook
c6a40b1dd518814ccac50f83b3a09d59202b138e
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Timed calls to subprocess, so that real execution times can be obtained. """ __author__ = "Miguel Hernández Cabronero <miguel.hernandez@uab.cat>" __date__ = "23/05/2020" import os import subprocess import re import time import platform import shutil class InvocationE...
31.787879
108
0.661106
__author__ = "Miguel Hernández Cabronero <miguel.hernandez@uab.cat>" __date__ = "23/05/2020" import os import subprocess import re import time import platform import shutil class InvocationError(Exception): pass def get_status_output_time(invocation, expected_status_value=0, wall=False): if "Darwin" in ...
true
true
f708d313d84dcab7bba4a1676f1e38302853d437
1,000
py
Python
pyf/_close_.py
snoopyjc/pythonizer
6b3683084f41f0aa06b1b4e652a0f00b19cceac1
[ "Artistic-2.0" ]
1
2022-03-13T22:08:25.000Z
2022-03-13T22:08:25.000Z
pyf/_close_.py
snoopyjc/pythonizer
6b3683084f41f0aa06b1b4e652a0f00b19cceac1
[ "Artistic-2.0" ]
21
2022-03-17T16:53:04.000Z
2022-03-31T23:55:24.000Z
pyf/_close_.py
snoopyjc/pythonizer
6b3683084f41f0aa06b1b4e652a0f00b19cceac1
[ "Artistic-2.0" ]
null
null
null
def _close_(fh): """Implementation of perl close""" global AUTODIE, TRACEBACK, OS_ERROR, TRACE_RUN try: if hasattr(fh, '_sp'): # issue 72: subprocess fh.flush() fh._sp.communicate() if TRACE_RUN: sp = subprocess.CompletedProcess(f"op...
32.258065
89
0.518
def _close_(fh): global AUTODIE, TRACEBACK, OS_ERROR, TRACE_RUN try: if hasattr(fh, '_sp'): fh.flush() fh._sp.communicate() if TRACE_RUN: sp = subprocess.CompletedProcess(f"open({fh._file})", fh._sp.returncode) _carp(f'tr...
true
true
f708d3202e725236311e670212f40c058faa6dcf
3,055
py
Python
SiebelCOM/sa.py
komarov-sergey/py-siebel-com
3253c1380ba292234deac5def2c340bbb478f593
[ "MIT" ]
3
2018-04-04T17:29:42.000Z
2022-02-09T16:48:34.000Z
SiebelCOM/sa.py
KomarovSergei/py-siebel-com
3253c1380ba292234deac5def2c340bbb478f593
[ "MIT" ]
null
null
null
SiebelCOM/sa.py
KomarovSergei/py-siebel-com
3253c1380ba292234deac5def2c340bbb478f593
[ "MIT" ]
1
2021-05-06T06:03:34.000Z
2021-05-06T06:03:34.000Z
import win32com.client as wc from utils import vstr from utils import vshort from utils import vstrarr from utils import check_error from bc import SiebelBusObject from ps import SiebelPropertySet from bs import SiebelService PROGID = 'SiebelDataServer.ApplicationObject' class SiebelApplication(object): def __...
27.522523
78
0.646154
import win32com.client as wc from utils import vstr from utils import vshort from utils import vstrarr from utils import check_error from bc import SiebelBusObject from ps import SiebelPropertySet from bs import SiebelService PROGID = 'SiebelDataServer.ApplicationObject' class SiebelApplication(object): def __...
true
true
f708d38e4ada2c2472030b04a3af3bd0cb4f2dc2
413
py
Python
transfermarket.py
DaniilGumin/SiteParser
97aca6393141f5a3e8fba03745b01e8d4a918d2f
[ "MIT" ]
null
null
null
transfermarket.py
DaniilGumin/SiteParser
97aca6393141f5a3e8fba03745b01e8d4a918d2f
[ "MIT" ]
null
null
null
transfermarket.py
DaniilGumin/SiteParser
97aca6393141f5a3e8fba03745b01e8d4a918d2f
[ "MIT" ]
null
null
null
from lxml import html import requests url = 'https://www.transfermarkt.com/ac-mailand/transfers/verein/5/saison_id/2017' headers = { 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:45.0) Gecko/20100101 Firefox/45.0' } page = requests.get(url, headers=headers) tree = html.fromstring(page.content) pl...
27.533333
101
0.72155
from lxml import html import requests url = 'https://www.transfermarkt.com/ac-mailand/transfers/verein/5/saison_id/2017' headers = { 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:45.0) Gecko/20100101 Firefox/45.0' } page = requests.get(url, headers=headers) tree = html.fromstring(page.content) pl...
true
true
f708d555666b85db4bf67ef80495a4f682e089a3
753
py
Python
package/alphabets/capital_alphabets/O.py
venkateshvsn/patterns
7e1d1926b40695a65e04c370655c5d79dd63bf6e
[ "MIT" ]
null
null
null
package/alphabets/capital_alphabets/O.py
venkateshvsn/patterns
7e1d1926b40695a65e04c370655c5d79dd63bf6e
[ "MIT" ]
null
null
null
package/alphabets/capital_alphabets/O.py
venkateshvsn/patterns
7e1d1926b40695a65e04c370655c5d79dd63bf6e
[ "MIT" ]
null
null
null
def for_O(): """printing capital 'O' using for loop""" for row in range(5): for col in range(5): if col==0 and row not in(0,4) or col==4 and row not in(0,4) or row==0 and col in(1,2,3) or row==4 and col in(1,2,3) : print("*",end=" ") else: p...
28.961538
130
0.409031
def for_O(): for row in range(5): for col in range(5): if col==0 and row not in(0,4) or col==4 and row not in(0,4) or row==0 and col in(1,2,3) or row==4 and col in(1,2,3) : print("*",end=" ") else: print(" ",end=" ") print() def whi...
true
true
f708d6c9b4f981534604870130c87e1774584567
2,074
py
Python
plugins/hw_wallet/plugin.py
qupengcheng/btcnano-1.0
777733284a103c619ac15933cc0b8106642b9dca
[ "MIT" ]
3
2018-01-16T09:45:41.000Z
2018-01-27T04:07:10.000Z
plugins/hw_wallet/plugin.py
qupengcheng/btcnano-1.0
777733284a103c619ac15933cc0b8106642b9dca
[ "MIT" ]
null
null
null
plugins/hw_wallet/plugin.py
qupengcheng/btcnano-1.0
777733284a103c619ac15933cc0b8106642b9dca
[ "MIT" ]
null
null
null
#!/usr/bin/env python2 # -*- mode: python -*- # # Electrum - lightweight Bitcoin client # Copyright (C) 2016 The Electrum developers # # 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...
38.407407
73
0.737223
from bitcoinnano.plugins import BasePlugin, hook from bitcoinnano.i18n import _ class HW_PluginBase(BasePlugin): def __init__(self, parent, config, name): BasePlugin.__init__(self, parent, config, name) self.device = self.keystore_class.device ...
true
true
f708d6ec719c9d7fc6f27e40ee97ebb008dbadeb
9,417
py
Python
test_widerface.py
DevD1092/Retinaface_DLIB
455e393f1bd688cf2d1cc41960105af9ea8a26c6
[ "Apache-2.0" ]
3
2021-09-23T23:56:46.000Z
2022-03-25T16:15:33.000Z
test_widerface.py
DevD1092/Retinaface_DLIB
455e393f1bd688cf2d1cc41960105af9ea8a26c6
[ "Apache-2.0" ]
null
null
null
test_widerface.py
DevD1092/Retinaface_DLIB
455e393f1bd688cf2d1cc41960105af9ea8a26c6
[ "Apache-2.0" ]
null
null
null
from __future__ import print_function import os import sys import argparse import torch import torch.backends.cudnn as cudnn import numpy as np from data import cfg_mnet, cfg_re50 from layers.functions.prior_box import PriorBox from utils.nms.py_cpu_nms import py_cpu_nms import cv2 from models.retinaface import RetinaF...
41.484581
162
0.606456
from __future__ import print_function import os import sys import argparse import torch import torch.backends.cudnn as cudnn import numpy as np from data import cfg_mnet, cfg_re50 from layers.functions.prior_box import PriorBox from utils.nms.py_cpu_nms import py_cpu_nms import cv2 from models.retinaface import RetinaF...
true
true
f708d97eef5629065ace28e265a871b9fdfb1637
3,058
py
Python
projectlaika/addWindow.py
TheSgtPepper23/LaikaIA
fc73aa17f74462b211c4a4159b663ed7c3cdb1bd
[ "MIT" ]
null
null
null
projectlaika/addWindow.py
TheSgtPepper23/LaikaIA
fc73aa17f74462b211c4a4159b663ed7c3cdb1bd
[ "MIT" ]
null
null
null
projectlaika/addWindow.py
TheSgtPepper23/LaikaIA
fc73aa17f74462b211c4a4159b663ed7c3cdb1bd
[ "MIT" ]
null
null
null
import os import hashlib from PyQt5 import uic from PyQt5.QtWidgets import QMainWindow, QMessageBox from internationalization import LANGUAGE from logic import Hash from windows.message import Message from databaseAccess import DbMethods class AddWindow(QMainWindow): def __init__(self, lang): QMainWindow._...
46.333333
117
0.64225
import os import hashlib from PyQt5 import uic from PyQt5.QtWidgets import QMainWindow, QMessageBox from internationalization import LANGUAGE from logic import Hash from windows.message import Message from databaseAccess import DbMethods class AddWindow(QMainWindow): def __init__(self, lang): QMainWindow._...
true
true
f708d9f68089c5a0379aa93fd7e35b1682b87353
736
py
Python
h2o-py/tests/testdir_apis/H2O_Module/pyunit_h2oparse_raw.py
ahmedengu/h2o-3
ac2c0a6fbe7f8e18078278bf8a7d3483d41aca11
[ "Apache-2.0" ]
6,098
2015-05-22T02:46:12.000Z
2022-03-31T16:54:51.000Z
h2o-py/tests/testdir_apis/H2O_Module/pyunit_h2oparse_raw.py
ahmedengu/h2o-3
ac2c0a6fbe7f8e18078278bf8a7d3483d41aca11
[ "Apache-2.0" ]
2,517
2015-05-23T02:10:54.000Z
2022-03-30T17:03:39.000Z
h2o-py/tests/testdir_apis/H2O_Module/pyunit_h2oparse_raw.py
ahmedengu/h2o-3
ac2c0a6fbe7f8e18078278bf8a7d3483d41aca11
[ "Apache-2.0" ]
2,199
2015-05-22T04:09:55.000Z
2022-03-28T22:20:45.000Z
from __future__ import print_function import sys sys.path.insert(1,"../../../") from tests import pyunit_utils import h2o from h2o.utils.typechecks import assert_is_type from h2o.frame import H2OFrame def h2oparse_raw(): """ Python API test: h2o.parse_raw(setup, id=None, first_line_is_header=0) copied fro...
28.307692
92
0.743207
from __future__ import print_function import sys sys.path.insert(1,"../../../") from tests import pyunit_utils import h2o from h2o.utils.typechecks import assert_is_type from h2o.frame import H2OFrame def h2oparse_raw(): fraw = h2o.import_file(pyunit_utils.locate("smalldata/jira/hexdev_29.csv"), parse=False) a...
true
true
f708dc3f498afa726fef95d36981fa1fcc1f7c69
712
py
Python
backend/lambda-developer-endpoints/index.py
UBC-CIC/people-counting-with-aws-rekognition-Admin-Website
a635cfcf8acd7f66da761a2e03c99479b74d0b82
[ "Apache-1.1" ]
null
null
null
backend/lambda-developer-endpoints/index.py
UBC-CIC/people-counting-with-aws-rekognition-Admin-Website
a635cfcf8acd7f66da761a2e03c99479b74d0b82
[ "Apache-1.1" ]
null
null
null
backend/lambda-developer-endpoints/index.py
UBC-CIC/people-counting-with-aws-rekognition-Admin-Website
a635cfcf8acd7f66da761a2e03c99479b74d0b82
[ "Apache-1.1" ]
1
2021-06-04T00:17:51.000Z
2021-06-04T00:17:51.000Z
import json import boto3 import os client = boto3.client('dynamodb') CURRENT_COUNTS_TABLE_NAME = os.environ['CURRENT_COUNTS_TABLE_NAME'] AVERAGE_COUNTS_TABLE_NAME = os.environ['AVERAGE_COUNTS_TABLE_NAME'] def lambda_handler(event, context): if "getCurrentCounts" in event: response = client.scan(TableName=C...
28.48
67
0.640449
import json import boto3 import os client = boto3.client('dynamodb') CURRENT_COUNTS_TABLE_NAME = os.environ['CURRENT_COUNTS_TABLE_NAME'] AVERAGE_COUNTS_TABLE_NAME = os.environ['AVERAGE_COUNTS_TABLE_NAME'] def lambda_handler(event, context): if "getCurrentCounts" in event: response = client.scan(TableName=C...
true
true
f708dc7d41fdf5af19cb3cc6f93b7b6e31a65bbc
2,096
py
Python
archai/datasets/providers/svhn_provider.py
bluetyson/archai
b370a7397cb8703a052d82297ae748a35c6a49c7
[ "MIT" ]
344
2020-06-12T22:12:56.000Z
2022-03-29T06:48:20.000Z
archai/datasets/providers/svhn_provider.py
QPC-database/archai
50f70ccccf536466cc0370c8a63401e05dec33fd
[ "MIT" ]
29
2020-06-13T19:56:49.000Z
2022-03-30T20:26:48.000Z
archai/datasets/providers/svhn_provider.py
QPC-database/archai
50f70ccccf536466cc0370c8a63401e05dec33fd
[ "MIT" ]
68
2020-06-12T19:32:43.000Z
2022-03-05T06:58:40.000Z
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. from typing import List, Tuple, Union, Optional from overrides import overrides, EnforceOverrides from torch.utils.data.dataset import Dataset import torchvision from torchvision.transforms import transforms from torch.utils.data impo...
35.525424
107
0.670324
from typing import List, Tuple, Union, Optional from overrides import overrides, EnforceOverrides from torch.utils.data.dataset import Dataset import torchvision from torchvision.transforms import transforms from torch.utils.data import ConcatDataset from archai.datasets.dataset_provider import DatasetP...
true
true
f708df00d9857cd302b7ec9775cbf7aa234f50ba
49,006
py
Python
test/test_resources_site_shared_credential.py
pdeardorff-r7/vm-console-client-python
4bee83aa4db2b328ba6894cebac55743f922ce5a
[ "MIT" ]
null
null
null
test/test_resources_site_shared_credential.py
pdeardorff-r7/vm-console-client-python
4bee83aa4db2b328ba6894cebac55743f922ce5a
[ "MIT" ]
null
null
null
test/test_resources_site_shared_credential.py
pdeardorff-r7/vm-console-client-python
4bee83aa4db2b328ba6894cebac55743f922ce5a
[ "MIT" ]
null
null
null
# coding: utf-8 """ InsightVM API # Overview This guide documents the InsightVM Application Programming Interface (API) Version 3. This API supports the Representation State Transfer (REST) design pattern. Unless noted otherwise this API accepts and produces the `application/json` media type. This API uses ...
1,195.268293
48,043
0.491593
from __future__ import absolute_import import unittest import swagger_client from swagger_client.models.resources_site_shared_credential import ResourcesSiteSharedCredential from swagger_client.rest import ApiException class TestResourcesSiteSharedCredential(unittest.TestCase): def setUp(self): p...
true
true
f708df1e87b7c6f449fe4da943695469a8a37f7f
1,800
py
Python
setup.py
coderfi/rets
6d1a23d0356e41fbeaf5edeb5d40b516a9946a07
[ "MIT" ]
null
null
null
setup.py
coderfi/rets
6d1a23d0356e41fbeaf5edeb5d40b516a9946a07
[ "MIT" ]
null
null
null
setup.py
coderfi/rets
6d1a23d0356e41fbeaf5edeb5d40b516a9946a07
[ "MIT" ]
null
null
null
import sys from setuptools import setup if sys.version_info < (3, 5): print('rets requires Python 3.5 or later') sys.exit(1) long_desc = 'Python 3 client for the Real Estate Transaction Standard (RETS) Version 1.7.2' install_requires = [ 'requests>=2.12.3', 'requests-toolbelt>=0.7.0,!=0.9.0', '...
26.470588
91
0.618889
import sys from setuptools import setup if sys.version_info < (3, 5): print('rets requires Python 3.5 or later') sys.exit(1) long_desc = 'Python 3 client for the Real Estate Transaction Standard (RETS) Version 1.7.2' install_requires = [ 'requests>=2.12.3', 'requests-toolbelt>=0.7.0,!=0.9.0', '...
true
true
f708e019c4c06af383eb73f2545dc68cbdeaf8c3
6,534
py
Python
src/services/stream/crunchyroll.py
flipstables/holo
4e86ce74172318ab179fede29d849e34e92c7b0b
[ "MIT" ]
102
2016-01-07T21:54:42.000Z
2022-01-17T02:03:05.000Z
src/services/stream/crunchyroll.py
flipstables/holo
4e86ce74172318ab179fede29d849e34e92c7b0b
[ "MIT" ]
25
2016-01-10T11:46:40.000Z
2018-06-19T14:47:04.000Z
src/services/stream/crunchyroll.py
flipstables/holo
4e86ce74172318ab179fede29d849e34e92c7b0b
[ "MIT" ]
36
2016-02-18T17:37:17.000Z
2019-02-24T02:01:40.000Z
from logging import debug, info, warning, error, exception import re from datetime import datetime, timedelta from .. import AbstractServiceHandler from data.models import Episode, UnprocessedStream class ServiceHandler(AbstractServiceHandler): _show_url = "http://crunchyroll.com/{id}" _show_re = re.compile("crunch...
30.25
111
0.712274
from logging import debug, info, warning, error, exception import re from datetime import datetime, timedelta from .. import AbstractServiceHandler from data.models import Episode, UnprocessedStream class ServiceHandler(AbstractServiceHandler): _show_url = "http://crunchyroll.com/{id}" _show_re = re.compile("crunch...
true
true
f708e062dee09bdd223cf03577105bdf406b13fd
1,386
py
Python
var/spack/repos/builtin/packages/r-multcomp/package.py
kehw/spack
4f49b1a9301447a8cf880c99820cad65e5c2d7e3
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
2
2020-09-10T22:50:08.000Z
2021-01-12T22:18:54.000Z
var/spack/repos/builtin/packages/r-multcomp/package.py
kehw/spack
4f49b1a9301447a8cf880c99820cad65e5c2d7e3
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
11
2021-01-08T22:23:53.000Z
2022-03-30T11:08:17.000Z
var/spack/repos/builtin/packages/r-multcomp/package.py
kehw/spack
4f49b1a9301447a8cf880c99820cad65e5c2d7e3
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
# Copyright 2013-2021 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 RMultcomp(RPackage): """Simultaneous tests and confidence intervals for general linear ...
47.793103
96
0.727273
from spack import * class RMultcomp(RPackage): homepage = "http://multcomp.r-forge.r-project.org/" url = "https://cloud.r-project.org/src/contrib/multcomp_1.4-6.tar.gz" list_url = "https://cloud.r-project.org/src/contrib/Archive/multcomp" version('1.4-10', sha256='29bcc635c0262e304551b139c...
true
true
f708e0a2f1d6f3fbaa539ae288ad1af3bf9feb80
16,474
py
Python
model-optimizer/extensions/middle/Reduce_test.py
shinh/dldt
693ab4e79a428e0801f17f4511b129a3fa8f4a62
[ "Apache-2.0" ]
1
2021-02-20T21:48:36.000Z
2021-02-20T21:48:36.000Z
model-optimizer/extensions/middle/Reduce_test.py
erinpark33/dldt
edd86d090592f7779f4dbb2681546e1f4e81284f
[ "Apache-2.0" ]
null
null
null
model-optimizer/extensions/middle/Reduce_test.py
erinpark33/dldt
edd86d090592f7779f4dbb2681546e1f4e81284f
[ "Apache-2.0" ]
1
2018-12-14T07:52:51.000Z
2018-12-14T07:52:51.000Z
""" Copyright (c) 2018-2019 Intel 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 i...
51.320872
119
0.440452
import unittest import numpy as np from extensions.middle.Reduce import ReduceReplacer from mo.middle.passes.eliminate_test import build_graph from mo.middle.passes.fusing.fuse_linear_ops_test import compare_graphs nodes_attributes = { 'placeholder_1': {'shape': None, 'type': 'Placeholder', 'kind': 'op',...
true
true
f708e2172ca4f1c9b05cfd9786cb97914a8c95b9
110
py
Python
app/services/storage_service.py
jubbp/maker-hub
93bde3bcde7869c8454613061c50c0dcb3d2f573
[ "MIT" ]
4
2021-09-28T04:55:16.000Z
2021-12-11T03:33:01.000Z
app/services/storage_service.py
jubbp/maker-hub
93bde3bcde7869c8454613061c50c0dcb3d2f573
[ "MIT" ]
92
2021-03-18T07:26:43.000Z
2022-03-29T21:25:38.000Z
app/services/storage_service.py
jubbp/maker-hub
93bde3bcde7869c8454613061c50c0dcb3d2f573
[ "MIT" ]
4
2021-02-27T16:31:41.000Z
2021-07-25T02:20:09.000Z
async def get_location_count() -> int: return 234 async def get_locations_used() -> int: return 230
15.714286
38
0.690909
async def get_location_count() -> int: return 234 async def get_locations_used() -> int: return 230
true
true
f708e25637b6e36499a5b132a0d4cc72da1b4e4b
6,297
py
Python
discordSuperUtils/ban.py
Heapy1337/discord-super-utils
be9d65fbc957d017df534ac502457f387594a9c8
[ "MIT" ]
91
2021-07-14T13:01:31.000Z
2022-03-25T10:28:49.000Z
discordSuperUtils/ban.py
KortaPo/discord-super-utils
b8c1cd1a986bc5c78eaf472bb5caf44dd7b605e4
[ "MIT" ]
14
2021-08-13T14:23:54.000Z
2022-03-25T09:57:12.000Z
discordSuperUtils/ban.py
KortaPo/discord-super-utils
b8c1cd1a986bc5c78eaf472bb5caf44dd7b605e4
[ "MIT" ]
42
2021-08-02T00:27:24.000Z
2022-03-31T15:47:37.000Z
from __future__ import annotations import asyncio from datetime import datetime from typing import TYPE_CHECKING, Union, Optional, List, Dict, Any import discord from .base import DatabaseChecker from .punishments import Punisher if TYPE_CHECKING: from .punishments import Punishment from discord.ext import ...
29.018433
114
0.576147
from __future__ import annotations import asyncio from datetime import datetime from typing import TYPE_CHECKING, Union, Optional, List, Dict, Any import discord from .base import DatabaseChecker from .punishments import Punisher if TYPE_CHECKING: from .punishments import Punishment from discord.ext import ...
true
true
f708e2e806370b31b4b855475a4664b8918bfc13
4,694
py
Python
qa/rpc-tests/mempool_reorg.py
mirzaei-ce/core-javabit
bfc1f145268455ca788c8a0b70fb3f054e4287f9
[ "MIT" ]
null
null
null
qa/rpc-tests/mempool_reorg.py
mirzaei-ce/core-javabit
bfc1f145268455ca788c8a0b70fb3f054e4287f9
[ "MIT" ]
null
null
null
qa/rpc-tests/mempool_reorg.py
mirzaei-ce/core-javabit
bfc1f145268455ca788c8a0b70fb3f054e4287f9
[ "MIT" ]
null
null
null
#!/usr/bin/env python2 # Copyright (c) 2014-2015 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test re-org scenarios with a mempool that contains transactions # that spend (directly or indirectly)...
44.283019
119
0.684278
from test_framework.test_framework import JavabitTestFramework from test_framework.util import * class MempoolCoinbaseTest(JavabitTestFramework): alert_filename = None def setup_network(self): args = ["-checkmempool", "-debug=mempool"] self.nodes = [] self.nodes.append(st...
true
true
f708e3a9dcf1d33165f200c2aec241d065dd8605
2,906
py
Python
Homography/hw2-2/homography.py
Yfyangd/Computer_Vision_CS665
59dca3ce42f43b4aea446497a578f4a0eb93995d
[ "Apache-2.0" ]
2
2019-11-06T03:40:08.000Z
2019-11-06T03:40:19.000Z
Homography/hw2-2/homography.py
Yfyangd/Computer_Vision_CS665
59dca3ce42f43b4aea446497a578f4a0eb93995d
[ "Apache-2.0" ]
null
null
null
Homography/hw2-2/homography.py
Yfyangd/Computer_Vision_CS665
59dca3ce42f43b4aea446497a578f4a0eb93995d
[ "Apache-2.0" ]
2
2022-02-14T05:02:36.000Z
2022-02-21T16:02:23.000Z
# coding: utf-8 # In[1]: import numpy as np def get_homograph(u,v): A = np.array([[u[0][0], u[0][1], 1, 0, 0, 0, -1 * u[0][0] * v[0][0], -1 * u[0][1] * v[0][0]], [0, 0, 0, u[0][0], u[0][1], 1, -1 * u[0][0] * v[0][1], -1 * u[0][1] * v[0][1]], [u[1][0], u[1][1], 1, 0, 0, 0, -1 ...
38.746667
97
0.419133
import numpy as np def get_homograph(u,v): A = np.array([[u[0][0], u[0][1], 1, 0, 0, 0, -1 * u[0][0] * v[0][0], -1 * u[0][1] * v[0][0]], [0, 0, 0, u[0][0], u[0][1], 1, -1 * u[0][0] * v[0][1], -1 * u[0][1] * v[0][1]], [u[1][0], u[1][1], 1, 0, 0, 0, -1 * u[1][0] * v[1][0], -1...
true
true
f708e4a18c9e2a5f4a165c78f3009567fbd27a2d
10,365
py
Python
autotest/ogr/ogr_flatgeobuf.py
landam/gdal
0232dcf743829e23268a2ae0c4fd10aaaeb14b3c
[ "MIT" ]
null
null
null
autotest/ogr/ogr_flatgeobuf.py
landam/gdal
0232dcf743829e23268a2ae0c4fd10aaaeb14b3c
[ "MIT" ]
null
null
null
autotest/ogr/ogr_flatgeobuf.py
landam/gdal
0232dcf743829e23268a2ae0c4fd10aaaeb14b3c
[ "MIT" ]
null
null
null
#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id$ # # Project: GDAL/OGR Test Suite # Purpose: FlatGeobuf driver test suite. # Author: Björn Harrtell <bjorn@wololo.org> # ###############################################################...
32.904762
127
0.608394
true
true
f708e4e7c4120d37ff34dd3959cff2c61ac27f10
524
py
Python
venv/lib/python3.6/site-packages/Sastrawi/Morphology/Disambiguator/DisambiguatorPrefixRule7.py
purwnt/customer-service-chatbot-app
519caacc8557de04e1557456b852e66fea641ff4
[ "MIT" ]
null
null
null
venv/lib/python3.6/site-packages/Sastrawi/Morphology/Disambiguator/DisambiguatorPrefixRule7.py
purwnt/customer-service-chatbot-app
519caacc8557de04e1557456b852e66fea641ff4
[ "MIT" ]
1
2021-05-14T23:07:45.000Z
2021-05-14T23:07:45.000Z
venv/lib/python3.6/site-packages/Sastrawi/Morphology/Disambiguator/DisambiguatorPrefixRule7.py
purwnt/customer-service-chatbot-app
519caacc8557de04e1557456b852e66fea641ff4
[ "MIT" ]
null
null
null
import re class DisambiguatorPrefixRule7(object): """Disambiguate Prefix Rule 7 Rule 7 : terCerv -> ter-CerV where C != 'r' """ def disambiguate(self, word): """Disambiguate Prefix Rule 7 Rule 7 : terCerv -> ter-CerV where C != 'r' """ matches = re.match(...
30.823529
81
0.532443
import re class DisambiguatorPrefixRule7(object): def disambiguate(self, word): matches = re.match(r'^ter([bcdfghjklmnpqrstvwxyz])er([aiueo].*)$', word) if matches: if matches.group(1) == 'r': return return matches.group(1) + 'er' + matches.grou...
true
true
f708e50db1f4c3784cacecdfda9d99df22227d9f
2,340
py
Python
sp.py
The-SocialLion/Speech-Emotion-Recognition-using-MLP-Classifier
5c4101ebbe2b43db28dbb97f94dc3001bdf56ff8
[ "Apache-2.0" ]
null
null
null
sp.py
The-SocialLion/Speech-Emotion-Recognition-using-MLP-Classifier
5c4101ebbe2b43db28dbb97f94dc3001bdf56ff8
[ "Apache-2.0" ]
null
null
null
sp.py
The-SocialLion/Speech-Emotion-Recognition-using-MLP-Classifier
5c4101ebbe2b43db28dbb97f94dc3001bdf56ff8
[ "Apache-2.0" ]
null
null
null
import librosa import soundfile import os, glob, pickle import numpy as np from sklearn.model_selection import train_test_split from sklearn.neural_network import MLPClassifier from sklearn.metrics import accuracy_score def extract_feature(file_name, mfcc, chroma, mel): with soundfile.SoundFile(file_name)...
36
130
0.658974
import librosa import soundfile import os, glob, pickle import numpy as np from sklearn.model_selection import train_test_split from sklearn.neural_network import MLPClassifier from sklearn.metrics import accuracy_score def extract_feature(file_name, mfcc, chroma, mel): with soundfile.SoundFile(file_name)...
true
true
f708e557288c87be71ea0404a8bb00dc3767cf97
10,040
py
Python
src/transformers/tokenization_auto.py
mariamabarham/transformers
d490b5d5003654f104af3abd0556e598335b5650
[ "Apache-2.0" ]
6
2020-06-22T01:42:20.000Z
2021-12-24T02:55:51.000Z
src/transformers/tokenization_auto.py
mariamabarham/transformers
d490b5d5003654f104af3abd0556e598335b5650
[ "Apache-2.0" ]
3
2020-11-29T18:11:03.000Z
2021-06-11T10:04:30.000Z
src/transformers/tokenization_auto.py
mariamabarham/transformers
d490b5d5003654f104af3abd0556e598335b5650
[ "Apache-2.0" ]
1
2020-11-29T16:37:16.000Z
2020-11-29T16:37:16.000Z
# coding=utf-8 # Copyright 2018 The HuggingFace Inc. team. # # 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...
50.964467
372
0.697211
import logging from collections import OrderedDict from .configuration_auto import ( AlbertConfig, AutoConfig, BertConfig, CamembertConfig, CTRLConfig, DistilBertConfig, FlaubertConfig, GPT2Config, OpenAIGPTConfig, RobertaConfig, T5Config, TransfoXLConfig...
true
true
f708e5c068545992b18a1ec51e23cff6cfb0e647
1,422
py
Python
ifollow/wsgi.py
moe-szyslak/TheCondor
8066202cfe2d972ad643e4b7c179be5089dbcc65
[ "MIT" ]
1
2015-10-27T04:02:41.000Z
2015-10-27T04:02:41.000Z
ifollow/wsgi.py
moe-szyslak/TheCondor
8066202cfe2d972ad643e4b7c179be5089dbcc65
[ "MIT" ]
null
null
null
ifollow/wsgi.py
moe-szyslak/TheCondor
8066202cfe2d972ad643e4b7c179be5089dbcc65
[ "MIT" ]
null
null
null
""" WSGI config for ifollow project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION`` ...
43.090909
79
0.803094
import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ifollow.settings") # setting points here. from django.core.wsgi import get_wsgi_application application = get_wsgi_application() # Apply WSGI middleware here. # from helloworld.wsgi import HelloWorldApplication # application = HelloWorldApplication(app...
true
true
f708e5f4e21d0ec582297a904c5c3b950283833a
5,230
py
Python
examples/inverse/plot_lcmv_beamformer_volume.py
ragatti/mne-python
c6825a49c3452db616fc980d62d33f6dddf4cd65
[ "BSD-3-Clause" ]
1
2020-04-25T05:01:54.000Z
2020-04-25T05:01:54.000Z
examples/inverse/plot_lcmv_beamformer_volume.py
ragatti/mne-python
c6825a49c3452db616fc980d62d33f6dddf4cd65
[ "BSD-3-Clause" ]
null
null
null
examples/inverse/plot_lcmv_beamformer_volume.py
ragatti/mne-python
c6825a49c3452db616fc980d62d33f6dddf4cd65
[ "BSD-3-Clause" ]
null
null
null
""" ==================================================== Compute LCMV inverse solution in volume source space ==================================================== Compute LCMV beamformers on an auditory evoked dataset in a volume source space, and show activation on ``fsaverage``. """ # Author: Alexandre Gramfort <ale...
39.323308
79
0.630784
import mne from mne.datasets import sample, fetch_fsaverage from mne.beamformer import make_lcmv, apply_lcmv print(__doc__)
true
true
f708e6377e37447588e0d9fb8fda40d91bd7ea72
2,306
py
Python
Contents/scripts/animmemo/_lib.py
mochio326/AnimMemo
41cc0cd16056231a336d5e33fe7a6128fc11d50b
[ "MIT" ]
8
2018-01-08T02:38:13.000Z
2020-12-22T05:15:47.000Z
Contents/scripts/animmemo/_lib.py
mochio326/AnimMemo
41cc0cd16056231a336d5e33fe7a6128fc11d50b
[ "MIT" ]
null
null
null
Contents/scripts/animmemo/_lib.py
mochio326/AnimMemo
41cc0cd16056231a336d5e33fe7a6128fc11d50b
[ "MIT" ]
null
null
null
## -*- coding: utf-8 -*- from .vendor.Qt import QtCore, QtGui, QtWidgets import maya.cmds as cmds import maya.mel as mel import maya.OpenMayaUI as OpenMayaUI import maya.OpenMaya as OpenMaya import json import os def maya_version(): return int(cmds.about(v=True)[:4]) def maya_api_version(): return int(cmds.ab...
26.204545
83
0.561145
QtCore, QtGui, QtWidgets import maya.cmds as cmds import maya.mel as mel import maya.OpenMayaUI as OpenMayaUI import maya.OpenMaya as OpenMaya import json import os def maya_version(): return int(cmds.about(v=True)[:4]) def maya_api_version(): return int(cmds.about(api=True)) if 2017 <= maya_version(): ...
true
true
f708e7b5f388dd6c976262da9d55674a512e7986
897
py
Python
thumt/utils/distribute.py
THUNLP-MT/Copy4APE
2e341f1bb31d0e25d7ff46cc31521ac3632eb746
[ "BSD-3-Clause" ]
12
2019-09-06T14:36:55.000Z
2021-11-18T02:11:04.000Z
thumt/utils/distribute.py
THUNLP-MT/Copy4APE
2e341f1bb31d0e25d7ff46cc31521ac3632eb746
[ "BSD-3-Clause" ]
4
2019-10-10T15:49:12.000Z
2021-05-06T01:11:58.000Z
thumt/utils/distribute.py
THUNLP-MT/Copy4APE
2e341f1bb31d0e25d7ff46cc31521ac3632eb746
[ "BSD-3-Clause" ]
3
2020-01-03T07:53:02.000Z
2020-03-26T04:19:15.000Z
# coding=utf-8 # Copyright 2017-2019 The THUMT Authors from __future__ import absolute_import from __future__ import division from __future__ import print_function import sys _ENGINE = None def enable_distributed_training(): global _ENGINE try: import horovod.tensorflow as hvd _ENGINE = hvd...
19.085106
76
0.703456
from __future__ import absolute_import from __future__ import division from __future__ import print_function import sys _ENGINE = None def enable_distributed_training(): global _ENGINE try: import horovod.tensorflow as hvd _ENGINE = hvd hvd.init() except ImportError: s...
true
true
f708e804af34c7cabb6dba3ee78730930ad65f23
827
py
Python
tests/functional/dashboard/test_partner.py
iicc/django-oscar
67ebe6bc21c242e9b0750b9f306b2f46a2758199
[ "BSD-3-Clause" ]
2
2019-07-27T23:00:28.000Z
2021-09-08T14:25:30.000Z
tests/functional/dashboard/test_partner.py
iicc/django-oscar
67ebe6bc21c242e9b0750b9f306b2f46a2758199
[ "BSD-3-Clause" ]
11
2019-12-21T06:06:48.000Z
2022-01-13T01:41:33.000Z
tests/functional/dashboard/test_partner.py
iicc/django-oscar
67ebe6bc21c242e9b0750b9f306b2f46a2758199
[ "BSD-3-Clause" ]
3
2019-03-20T16:17:58.000Z
2022-02-25T09:38:38.000Z
from django.urls import reverse from oscar.test.testcases import WebTestCase from oscar.apps.partner import models class TestPartnerDashboard(WebTestCase): is_staff = True def test_allows_a_partner_user_to_be_created(self): partner = models.Partner.objects.create( name="Acme Ltd") ...
30.62963
65
0.649335
from django.urls import reverse from oscar.test.testcases import WebTestCase from oscar.apps.partner import models class TestPartnerDashboard(WebTestCase): is_staff = True def test_allows_a_partner_user_to_be_created(self): partner = models.Partner.objects.create( name="Acme Ltd") ...
true
true
f708e8920634dfa425f8e6c30f8e45d04837f031
65
py
Python
homedisplay/repeating_tasks/__init__.py
ojarva/home-info-display
873d022308732baff94d0dc2381cf9dc7dce23b7
[ "BSD-3-Clause" ]
1
2016-11-28T04:35:06.000Z
2016-11-28T04:35:06.000Z
homedisplay/repeating_tasks/__init__.py
ojarva/home-info-display
873d022308732baff94d0dc2381cf9dc7dce23b7
[ "BSD-3-Clause" ]
160
2015-01-01T20:59:29.000Z
2016-04-25T13:36:52.000Z
homedisplay/repeating_tasks/__init__.py
ojarva/home-info-display
873d022308732baff94d0dc2381cf9dc7dce23b7
[ "BSD-3-Clause" ]
1
2015-02-25T21:24:01.000Z
2015-02-25T21:24:01.000Z
default_app_config = 'repeating_tasks.apps.RepeatingTasksConfig'
32.5
64
0.876923
default_app_config = 'repeating_tasks.apps.RepeatingTasksConfig'
true
true
f708e90b495e842e0c6fdb21da7bd73edf90dfca
4,586
py
Python
cottonwood/core/layers/dense.py
brohrer/nn_methods
acf3d1369e240971e5ee05696610c59c4c993a30
[ "MIT" ]
73
2019-10-15T22:02:52.000Z
2022-03-18T20:33:58.000Z
cottonwood/core/layers/dense.py
brohrer/nn_methods
acf3d1369e240971e5ee05696610c59c4c993a30
[ "MIT" ]
7
2019-11-23T00:10:55.000Z
2021-05-29T03:50:42.000Z
cottonwood/core/layers/dense.py
brohrer/nn_methods
acf3d1369e240971e5ee05696610c59c4c993a30
[ "MIT" ]
14
2019-10-16T02:39:42.000Z
2019-12-08T07:02:07.000Z
import numpy as np from cottonwood.core.activation import Tanh from cottonwood.core.initializers import LSUV from cottonwood.core.layers.generic_layer import GenericLayer from cottonwood.core.optimizers import SGD import cottonwood.core.toolbox as tb class Dense(GenericLayer): def __init__( self, ...
32.295775
79
0.597907
import numpy as np from cottonwood.core.activation import Tanh from cottonwood.core.initializers import LSUV from cottonwood.core.layers.generic_layer import GenericLayer from cottonwood.core.optimizers import SGD import cottonwood.core.toolbox as tb class Dense(GenericLayer): def __init__( self, ...
true
true
f708e95a3c98b6a895028e81a6372e1ef21c132a
11,535
py
Python
pyActLearn/sensors/sensor2vec.py
TinghuiWang/pyActLearn
d858136e86324fac51b0943765ef60bd405e31d1
[ "BSD-3-Clause" ]
3
2017-03-15T03:42:57.000Z
2020-01-19T15:47:12.000Z
pyActLearn/sensors/sensor2vec.py
TinghuiWang/pyActLearn
d858136e86324fac51b0943765ef60bd405e31d1
[ "BSD-3-Clause" ]
2
2019-02-04T15:31:49.000Z
2020-01-26T17:49:22.000Z
pyActLearn/sensors/sensor2vec.py
TinghuiWang/pyActLearn
d858136e86324fac51b0943765ef60bd405e31d1
[ "BSD-3-Clause" ]
3
2019-02-02T19:36:17.000Z
2021-01-02T15:42:43.000Z
import math import numpy as np import tensorflow as tf from ..learning.nn.injectors import SkipGramInjector def sensor2vec(num_sensors, sensor_event_list, embedding_size=20, batch_size=128, num_skips=8, skip_window=5, num_neg_samples=64, learning_rate=1.0): """Sensor to Vector ""...
45.77381
93
0.604335
import math import numpy as np import tensorflow as tf from ..learning.nn.injectors import SkipGramInjector def sensor2vec(num_sensors, sensor_event_list, embedding_size=20, batch_size=128, num_skips=8, skip_window=5, num_neg_samples=64, learning_rate=1.0): if num_neg_samples > num_s...
true
true
f708e99111649f36ac940b6ac45ab557741cb43e
694
py
Python
week4_divide_and_conquer/2_majority_element/majority_element.py
sebas119/algorithmic-toolbox
8b7e4d66b04f95f9aa159544e96bbe8765abfa56
[ "MIT" ]
null
null
null
week4_divide_and_conquer/2_majority_element/majority_element.py
sebas119/algorithmic-toolbox
8b7e4d66b04f95f9aa159544e96bbe8765abfa56
[ "MIT" ]
null
null
null
week4_divide_and_conquer/2_majority_element/majority_element.py
sebas119/algorithmic-toolbox
8b7e4d66b04f95f9aa159544e96bbe8765abfa56
[ "MIT" ]
null
null
null
# Uses python3 import sys """ def get_majority_element(a, left, right): if left == right: return -1 if left + 1 == right: return a[left] #write your code here return -1 """ def get_majority_element_hash_approach(a, n): new = {} for e in a: if e not in new: ...
20.411765
52
0.520173
import sys def get_majority_element_hash_approach(a, n): new = {} for e in a: if e not in new: new[e] = 1 else: new[e] += 1 for keys, val in new.items(): if val > n / 2: return 1 return 0 if __name__ == '__main__': n = int(input()) ...
true
true
f708e9a4590e61d74102e1c7483f7e1fb43ae436
1,710
py
Python
button.py
qodzero/ukivy
d7179a83c2e6e357cf50113f53d24c780bf29789
[ "MIT" ]
null
null
null
button.py
qodzero/ukivy
d7179a83c2e6e357cf50113f53d24c780bf29789
[ "MIT" ]
null
null
null
button.py
qodzero/ukivy
d7179a83c2e6e357cf50113f53d24c780bf29789
[ "MIT" ]
null
null
null
from kivy.uix.button import Button from kivy.properties import StringProperty, BooleanProperty, NumericProperty, ObjectProperty from kivy.graphics import Color, Rectangle, RoundedRectangle, Ellipse from kivy.lang import Builder Builder.load_string(''' <FlatButton>: background_normal: '' background_color: [0,0,...
24.428571
92
0.623392
from kivy.uix.button import Button from kivy.properties import StringProperty, BooleanProperty, NumericProperty, ObjectProperty from kivy.graphics import Color, Rectangle, RoundedRectangle, Ellipse from kivy.lang import Builder Builder.load_string(''' <FlatButton>: background_normal: '' background_color: [0,0,...
true
true
f708ea3cdf88f21e1a5d732ac490535d1e427158
411
py
Python
reportsmanagement/asgi.py
saadhaxxan/Reports-Management-Django
9acbcaa89fa174b1bf7876eb40ccf5193eb9f653
[ "MIT" ]
null
null
null
reportsmanagement/asgi.py
saadhaxxan/Reports-Management-Django
9acbcaa89fa174b1bf7876eb40ccf5193eb9f653
[ "MIT" ]
null
null
null
reportsmanagement/asgi.py
saadhaxxan/Reports-Management-Django
9acbcaa89fa174b1bf7876eb40ccf5193eb9f653
[ "MIT" ]
1
2021-05-02T20:27:44.000Z
2021-05-02T20:27:44.000Z
""" ASGI config for reportsmanagement project. It exposes the ASGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/ """ import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJ...
24.176471
78
0.79562
import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'reportsmanagement.settings') application = get_asgi_application()
true
true
f708ea3dd9f5758a8498ae276155cf1d472e275f
3,230
py
Python
app/app/settings.py
elmaraliyevdev/recipe-api
c5b5e8ae1454e1b568971b71a308e3cec930c353
[ "MIT" ]
null
null
null
app/app/settings.py
elmaraliyevdev/recipe-api
c5b5e8ae1454e1b568971b71a308e3cec930c353
[ "MIT" ]
null
null
null
app/app/settings.py
elmaraliyevdev/recipe-api
c5b5e8ae1454e1b568971b71a308e3cec930c353
[ "MIT" ]
null
null
null
""" Django settings for app project. Generated by 'django-admin startproject' using Django 3.2.9. For more information on this file, see https://docs.djangoproject.com/en/3.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.2/ref/settings/ """ from pathlib imp...
25.634921
91
0.69969
from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = 'django-insecure-nao&q&bu0i4@-&!nep#b%6x=-_f@-4hu)tb!09w8nujq5nwma*' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contr...
true
true
f708ea805e770aa48410e49e530f2410137eb6dd
11,174
py
Python
isi_sdk_8_2_1/isi_sdk_8_2_1/models/cluster_node_drive_d_config.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
24
2018-06-22T14:13:23.000Z
2022-03-23T01:21:26.000Z
isi_sdk_8_2_1/isi_sdk_8_2_1/models/cluster_node_drive_d_config.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
46
2018-04-30T13:28:22.000Z
2022-03-21T21:11:07.000Z
isi_sdk_8_2_1/isi_sdk_8_2_1/models/cluster_node_drive_d_config.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
29
2018-06-19T00:14:04.000Z
2022-02-08T17:51:19.000Z
# coding: utf-8 """ Isilon SDK Isilon SDK - Language bindings for the OneFS API # noqa: E501 OpenAPI spec version: 8 Contact: sdk@isilon.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six from isi_sdk_8_2_1.models.node_dr...
34.91875
179
0.665205
import pprint import re import six from isi_sdk_8_2_1.models.node_driveconfig_node_alert import NodeDriveconfigNodeAlert from isi_sdk_8_2_1.models.node_driveconfig_node_allow import NodeDriveconfigNodeAllow from isi_sdk_8_2_1.models.node_driveconfig_node_automatic_replacement_recognition import NodeDrivecon...
true
true
f708eaec40c92aa56ad6fdfbd0430f325b24f5c8
10,137
py
Python
FlaskApp/blog.py
j2B237/FlaskJoblogueur
144b0ed8343e93cab715b034b6d477142ce9681a
[ "Apache-2.0" ]
null
null
null
FlaskApp/blog.py
j2B237/FlaskJoblogueur
144b0ed8343e93cab715b034b6d477142ce9681a
[ "Apache-2.0" ]
null
null
null
FlaskApp/blog.py
j2B237/FlaskJoblogueur
144b0ed8343e93cab715b034b6d477142ce9681a
[ "Apache-2.0" ]
null
null
null
# ******************* BLOG MODULE ****************************** # # ** Created by Yossep # ** github: https://github.com/j2B237/ # ** Project : Joblogueur # ** Description: # # Within this module we have many functions designed to help display posts # Methods such as : # display all posts # display posts per category ...
38.397727
229
0.555687
from flask import Blueprint, render_template, flash, request, redirect, url_for from flask_mail import Message from FlaskApp.models import Post, Category, Moderator, Comment from FlaskApp.forms import CommentForm from . import db, ext, mail bp = Blueprint('blog', __name__) fake_Category = [ ...
true
true
f708eb4171dc8694530ffc022c1cc83d3407d688
14,078
py
Python
comic_dl/honcho.py
PauuloG/comic-dl
6d8b70751b5ae3388f28264d5c1dd9d7fbfeda4b
[ "MIT" ]
null
null
null
comic_dl/honcho.py
PauuloG/comic-dl
6d8b70751b5ae3388f28264d5c1dd9d7fbfeda4b
[ "MIT" ]
null
null
null
comic_dl/honcho.py
PauuloG/comic-dl
6d8b70751b5ae3388f28264d5c1dd9d7fbfeda4b
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- try: from urllib.parse import urlparse except ImportError: from urlparse import urlparse import logging from sites import foolSlide from sites import readcomicOnlineto from sites import comicNaver from sites import mangaHere from sites import rawSenManga from sites...
58.903766
126
0.573022
try: from urllib.parse import urlparse except ImportError: from urlparse import urlparse import logging from sites import foolSlide from sites import readcomicOnlineto from sites import comicNaver from sites import mangaHere from sites import rawSenManga from sites import mangaFox from sites import omgBeauPe...
true
true
f708ebb2ee0deed992fca9ca8fb815c1304e74c9
1,065
py
Python
colossus/apps/subscribers/urls.py
Beracah-Group/colossus
7bce25039a223da7197cc8a969ec72ee26aeffa8
[ "MIT" ]
2
2018-08-14T14:06:54.000Z
2018-09-10T16:57:18.000Z
colossus/apps/subscribers/urls.py
Beracah-Group/colossus
7bce25039a223da7197cc8a969ec72ee26aeffa8
[ "MIT" ]
null
null
null
colossus/apps/subscribers/urls.py
Beracah-Group/colossus
7bce25039a223da7197cc8a969ec72ee26aeffa8
[ "MIT" ]
null
null
null
from django.urls import path from . import views app_name = 'subscribers' urlpatterns = [ path('', views.IndexView.as_view(), name='index'), path('manage/', views.manage, name='manage'), path('goodbye/<uuid:mailing_list_uuid>/', views.goodbye, name='goodbye'), path('subscribe/<uuid:mailing_list_uuid...
53.25
145
0.734272
from django.urls import path from . import views app_name = 'subscribers' urlpatterns = [ path('', views.IndexView.as_view(), name='index'), path('manage/', views.manage, name='manage'), path('goodbye/<uuid:mailing_list_uuid>/', views.goodbye, name='goodbye'), path('subscribe/<uuid:mailing_list_uuid...
true
true
f708ec0d4bcf6e7a2b03661fc934f58647505014
7,295
py
Python
Chapter03/03_atari_gan.py
Yelloooowww/Deep-Reinforcement-Learning-Hands-On
d1a3a1272d7ceff8796fe412deb4e4d5bd6665a5
[ "MIT" ]
null
null
null
Chapter03/03_atari_gan.py
Yelloooowww/Deep-Reinforcement-Learning-Hands-On
d1a3a1272d7ceff8796fe412deb4e4d5bd6665a5
[ "MIT" ]
null
null
null
Chapter03/03_atari_gan.py
Yelloooowww/Deep-Reinforcement-Learning-Hands-On
d1a3a1272d7ceff8796fe412deb4e4d5bd6665a5
[ "MIT" ]
null
null
null
#!/usr/bin/env python import random import argparse import cv2 import torch import torch.nn as nn import torch.optim as optim from tensorboardX import SummaryWriter import torchvision.utils as vutils import gym import gym.spaces import numpy as np log = gym.logger log.set_level(gym.logger.INFO) LATENT_VECTOR_SIZE...
38.193717
114
0.632625
import random import argparse import cv2 import torch import torch.nn as nn import torch.optim as optim from tensorboardX import SummaryWriter import torchvision.utils as vutils import gym import gym.spaces import numpy as np log = gym.logger log.set_level(gym.logger.INFO) LATENT_VECTOR_SIZE = 100 DISCR_FILTERS ...
true
true
f708ec7e3e680cdaf80ef8e90b01a7804d08b581
191
py
Python
configs/gfl/gfl_r50_fpn_2x_coco.py
ruiningTang/mmdetection
100b0b5e0edddc45af0812b9f1474493c61671ef
[ "Apache-2.0" ]
null
null
null
configs/gfl/gfl_r50_fpn_2x_coco.py
ruiningTang/mmdetection
100b0b5e0edddc45af0812b9f1474493c61671ef
[ "Apache-2.0" ]
null
null
null
configs/gfl/gfl_r50_fpn_2x_coco.py
ruiningTang/mmdetection
100b0b5e0edddc45af0812b9f1474493c61671ef
[ "Apache-2.0" ]
null
null
null
_base_ = './gfl_r50_fpn_1x_coco.py' # learning policy lr_config = dict(step=[16, 22]) runner = dict(type='EpochBasedRunner', max_epochs=24) work_dir = 'work_dirs/coco/gfl/gfl_r50_fpn_2x_coco'
38.2
53
0.769634
_base_ = './gfl_r50_fpn_1x_coco.py' lr_config = dict(step=[16, 22]) runner = dict(type='EpochBasedRunner', max_epochs=24) work_dir = 'work_dirs/coco/gfl/gfl_r50_fpn_2x_coco'
true
true
f708ecc2659e7dad9f641b77c908e306e5f808bc
3,029
py
Python
watcher_dashboard/utils/utils.py
openstack/watcher-dashboard
146e547da934c2464ec5f49326eabed0eecfda96
[ "Apache-2.0" ]
15
2016-02-12T07:33:42.000Z
2019-01-28T22:13:27.000Z
watcher_dashboard/utils/utils.py
openstack/watcher-dashboard
146e547da934c2464ec5f49326eabed0eecfda96
[ "Apache-2.0" ]
null
null
null
watcher_dashboard/utils/utils.py
openstack/watcher-dashboard
146e547da934c2464ec5f49326eabed0eecfda96
[ "Apache-2.0" ]
2
2017-08-11T02:25:37.000Z
2017-10-10T09:59:40.000Z
# -*- coding: utf8 -*- # # 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...
31.884211
78
0.621657
import re CAMEL_RE = re.compile(r'([A-Z][a-z]+|[A-Z]+(?=[A-Z\s]|$))') def de_camel_case(text): return ' '.join(w.strip() for w in CAMEL_RE.split(text) if w.strip()) def list_to_dict(object_list, key_attribute='id'): return dict((getattr(o, key_attribute), o) for o in object_list) def length(...
true
true
f708ecc7d0e54f2284d531ef1dd0316ffeddf396
6,204
py
Python
CAGG-NAS/tools/nn/nn_visualise.py
csjtx1021/CAGG
67fde2f1488ee6e2ff137e87860b5243c5b5fe7c
[ "MIT" ]
7
2020-09-05T01:50:06.000Z
2021-09-29T13:33:35.000Z
CAGG-NAS/tools/nn/nn_visualise.py
csjtx1021/CAND
67fde2f1488ee6e2ff137e87860b5243c5b5fe7c
[ "MIT" ]
null
null
null
CAGG-NAS/tools/nn/nn_visualise.py
csjtx1021/CAND
67fde2f1488ee6e2ff137e87860b5243c5b5fe7c
[ "MIT" ]
1
2021-12-07T03:16:24.000Z
2021-12-07T03:16:24.000Z
""" Harness for visualising a neural network. -- kandasamy@cs.cmu.edu """ # pylint: disable=invalid-name import functools import graphviz as gv import os import networkx as nx import numpy as np # Parameters for plotting _SAVE_FORMAT = 'eps' # _SAVE_FORMAT = 'png' _LAYER_SHAPE = 'rectangle' _IPOP_SHAPE = 'circle...
31.175879
153
0.629433
import functools import graphviz as gv import os import networkx as nx import numpy as np _SAVE_FORMAT = 'eps' _LAYER_SHAPE = 'rectangle' _IPOP_SHAPE = 'circle' _LAYER_FONT = 'DejaVuSans' _IPOP_FONT = 'Helvetica' _LAYER_FONTSIZE = '16' _FILLCOLOR = 'transparent' _IPOP_FONTSIZE = '12' _IPOP_FILLCOLOR = '#ffc0cb' _...
true
true
f708ed2fb34b2811477e4d2bb6b9fda638b2306e
814
py
Python
django_api/serializers.py
KrishnaChandrapati/django_api1
3ce95318301c8d1b885041a3de1fae3b1fe52a73
[ "MIT" ]
null
null
null
django_api/serializers.py
KrishnaChandrapati/django_api1
3ce95318301c8d1b885041a3de1fae3b1fe52a73
[ "MIT" ]
null
null
null
django_api/serializers.py
KrishnaChandrapati/django_api1
3ce95318301c8d1b885041a3de1fae3b1fe52a73
[ "MIT" ]
null
null
null
from django.contrib.auth.models import User, Group from rest_framework import serializers from .models import * class UserSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = User fields = ['url', 'username', 'email', 'groups'] class GroupSerializer(serializers.HyperlinkedMode...
23.941176
65
0.708845
from django.contrib.auth.models import User, Group from rest_framework import serializers from .models import * class UserSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = User fields = ['url', 'username', 'email', 'groups'] class GroupSerializer(serializers.HyperlinkedMode...
true
true
f708edcc42449148f4a71856e7c68b84c7f934c7
2,583
py
Python
bfg9000/path.py
Mattlk13/bfg9000
2d897db09ea81a0ffef0a52f2e06cb9cb4a70a02
[ "BSD-3-Clause" ]
72
2015-06-23T02:35:13.000Z
2021-12-08T01:47:40.000Z
bfg9000/path.py
jimporter/bfg9000
c206646ecfed0d1a510e993b93e6a15677f45a14
[ "BSD-3-Clause" ]
139
2015-03-01T18:48:17.000Z
2021-06-18T15:45:14.000Z
bfg9000/path.py
Mattlk13/bfg9000
2d897db09ea81a0ffef0a52f2e06cb9cb4a70a02
[ "BSD-3-Clause" ]
19
2015-12-23T21:24:33.000Z
2022-01-06T04:04:41.000Z
import functools import os from contextlib import contextmanager from .platforms.basepath import BasePath, Root, InstallRoot, DestDir # noqa from .platforms.host import platform_info Path = platform_info().Path def abspath(path, type=Path, **kwargs): return type.abspath(path, **kwargs) def commonprefix(paths...
23.916667
76
0.603562
import functools import os from contextlib import contextmanager from .platforms.basepath import BasePath, Root, InstallRoot, DestDir from .platforms.host import platform_info Path = platform_info().Path def abspath(path, type=Path, **kwargs): return type.abspath(path, **kwargs) def commonprefix(paths): ...
true
true
f708ede6397fe9c30873a9c8fdff9588cddf90dd
1,429
py
Python
tests/shell/test_basic_commands.py
hn04147/pytorch-project-template
4bbe17a61af8b2f47f7afa1c96e4ff347123bfb8
[ "MIT", "Unlicense" ]
2
2020-11-05T18:56:32.000Z
2020-11-12T22:38:32.000Z
tests/shell/test_basic_commands.py
hn04147/pytorch-project-template
4bbe17a61af8b2f47f7afa1c96e4ff347123bfb8
[ "MIT", "Unlicense" ]
19
2020-11-12T20:42:21.000Z
2020-11-29T15:14:04.000Z
tests/shell/test_basic_commands.py
hn04147/pytorch-project-template
4bbe17a61af8b2f47f7afa1c96e4ff347123bfb8
[ "MIT", "Unlicense" ]
1
2020-11-12T20:19:51.000Z
2020-11-12T20:19:51.000Z
import pytest from tests.helpers.run_command import run_command from tests.helpers.runif import RunIf """ A couple of sanity checks to make sure the model doesn't crash with different running options. """ def test_fast_dev_run(): """Test running for 1 train, val and test batch.""" command = ["train.py", "++...
24.220339
94
0.647306
import pytest from tests.helpers.run_command import run_command from tests.helpers.runif import RunIf def test_fast_dev_run(): command = ["train.py", "++trainer.fast_dev_run=true"] run_command(command) @pytest.mark.slow def test_cpu(): command = ["train.py", "++trainer.max_epochs=1", "++trainer.gpus=0...
true
true
f708ee95a7c0d97611564ac57312b30829517a80
4,323
py
Python
inkfish/cmds.py
alanefl/vdf-competition
84efc3aec180c43582c9421c6fb7fb2e22000635
[ "Apache-2.0" ]
97
2018-10-04T18:10:42.000Z
2021-08-23T10:37:06.000Z
inkfish/cmds.py
alanefl/vdf-competition
84efc3aec180c43582c9421c6fb7fb2e22000635
[ "Apache-2.0" ]
4
2018-10-04T18:20:49.000Z
2021-05-03T07:13:14.000Z
inkfish/cmds.py
alanefl/vdf-competition
84efc3aec180c43582c9421c6fb7fb2e22000635
[ "Apache-2.0" ]
17
2018-10-08T18:08:21.000Z
2022-01-12T00:54:32.000Z
import argparse import binascii import sys import time from inkfish.proof_of_time import (create_proof_of_time_wesolowski, create_proof_of_time_nwesolowski, create_proof_of_time_pietrzak, check_proof_of_time_wesolo...
41.970874
88
0.623178
import argparse import binascii import sys import time from inkfish.proof_of_time import (create_proof_of_time_wesolowski, create_proof_of_time_nwesolowski, create_proof_of_time_pietrzak, check_proof_of_time_wesolo...
true
true
f708eeacfbf6c4ebf00516f1ac9d10f8e5349ebe
1,546
py
Python
qhub/cli/validate.py
pierrotsmnrd/qhub
399684c79f331923444b4fe46fae38ee02bfa2ac
[ "BSD-3-Clause" ]
100
2020-05-06T14:36:51.000Z
2022-03-31T20:09:29.000Z
qhub/cli/validate.py
pierrotsmnrd/qhub
399684c79f331923444b4fe46fae38ee02bfa2ac
[ "BSD-3-Clause" ]
778
2020-04-08T06:28:29.000Z
2022-03-31T21:32:08.000Z
qhub/cli/validate.py
pierrotsmnrd/qhub
399684c79f331923444b4fe46fae38ee02bfa2ac
[ "BSD-3-Clause" ]
36
2020-08-19T21:03:32.000Z
2022-03-18T17:04:50.000Z
import pathlib from ruamel import yaml from qhub.schema import verify from qhub.provider.cicd.linter import comment_on_pr def create_validate_subcommand(subparser): subparser = subparser.add_parser("validate") subparser.add_argument( "configdeprecated", help="qhub configuration yaml file (dep...
30.92
128
0.674644
import pathlib from ruamel import yaml from qhub.schema import verify from qhub.provider.cicd.linter import comment_on_pr def create_validate_subcommand(subparser): subparser = subparser.add_parser("validate") subparser.add_argument( "configdeprecated", help="qhub configuration yaml file (dep...
true
true