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
1c49d71f05cafc9fa6e61f1005654be4254a0bd8
1,339
py
Python
transcribe/scribe_modules/yum_repos.py
aakarshg/scribe
0ae48546f9d461f9421305d0902ed73b81c0f112
[ "Apache-2.0" ]
null
null
null
transcribe/scribe_modules/yum_repos.py
aakarshg/scribe
0ae48546f9d461f9421305d0902ed73b81c0f112
[ "Apache-2.0" ]
null
null
null
transcribe/scribe_modules/yum_repos.py
aakarshg/scribe
0ae48546f9d461f9421305d0902ed73b81c0f112
[ "Apache-2.0" ]
null
null
null
from . import ScribeModuleBaseClass from . lib.util import format_url base_url = "http://mirror.centos.org/centos/$releasever/{}/$basearch/" # object_dict = {} class Yum_repos(ScribeModuleBaseClass): def __init__(self, input_dict=None, module_name=None, host_name=None, input_type=None, scribe_...
38.257143
76
0.589246
from . import ScribeModuleBaseClass from . lib.util import format_url base_url = "http://mirror.centos.org/centos/$releasever/{}/$basearch/" class Yum_repos(ScribeModuleBaseClass): def __init__(self, input_dict=None, module_name=None, host_name=None, input_type=None, scribe_uuid=None): ...
true
true
1c49d7dd71ba7d729f7fdaf9ace0f3e50bc1f6c4
4,730
py
Python
src/v5.3/resources/swagger_client/models/tpdm_credential_student_academic_record.py
xmarcosx/edfi-notebook
0564ebdf1d0f45a9d25056e7e61369f0a837534d
[ "Apache-2.0" ]
2
2021-04-27T17:18:17.000Z
2021-04-27T19:14:39.000Z
src/v5.1/resources/swagger_client/models/tpdm_credential_student_academic_record.py
xmarcosx/edfi-notebook
0564ebdf1d0f45a9d25056e7e61369f0a837534d
[ "Apache-2.0" ]
null
null
null
src/v5.1/resources/swagger_client/models/tpdm_credential_student_academic_record.py
xmarcosx/edfi-notebook
0564ebdf1d0f45a9d25056e7e61369f0a837534d
[ "Apache-2.0" ]
1
2022-01-06T09:43:11.000Z
2022-01-06T09:43:11.000Z
# coding: utf-8 """ Ed-Fi Operational Data Store API The Ed-Fi ODS / API enables applications to read and write education data stored in an Ed-Fi ODS through a secure REST interface. *** > *Note: Consumers of ODS / API information should sanitize all data for display and storage. The ODS / API provides reas...
37.84
482
0.664482
import pprint import re import six from swagger_client.configuration import Configuration class TpdmCredentialStudentAcademicRecord(object): swagger_types = { 'student_academic_record_reference': 'EdFiStudentAcademicRecordReference' } attribute_map = { 'student_academic_record_refe...
true
true
1c49d846d74671fb13187159a9661e0807baa518
4,859
py
Python
SecML/src/secml/ml/kernels/c_kernel_poly.py
dsolanno/Poisoning-Attacks-on-Algorithmic-Fairness
77698340906fd0ec68d857315283d849e236ebd7
[ "MIT" ]
5
2020-07-09T13:03:34.000Z
2021-02-16T17:15:26.000Z
SecML/src/secml/ml/kernels/c_kernel_poly.py
dsolanno/Poisoning-Attacks-on-Algorithmic-Fairness
77698340906fd0ec68d857315283d849e236ebd7
[ "MIT" ]
1
2021-12-30T21:11:50.000Z
2021-12-30T21:11:50.000Z
SecML/src/secml/ml/kernels/c_kernel_poly.py
dsolanno/Poisoning-Attacks-on-Algorithmic-Fairness
77698340906fd0ec68d857315283d849e236ebd7
[ "MIT" ]
2
2021-03-22T19:22:56.000Z
2021-09-19T20:07:10.000Z
""" .. module:: CKernelPoly :synopsis: Polynomial kernel .. moduleauthor:: Battista Biggio <battista.biggio@unica.it> .. moduleauthor:: Marco Melis <marco.melis@unica.it> """ from sklearn import metrics from secml.array import CArray from secml.ml.kernels import CKernel class CKernelPoly(CKernel): """Polyno...
27.297753
110
0.570076
from sklearn import metrics from secml.array import CArray from secml.ml.kernels import CKernel class CKernelPoly(CKernel): __class_type = 'poly' def __init__(self, degree=2, gamma=1.0, coef0=1.0): self.degree = degree self.gamma = gamma self.coef0 = coef0 super(CKer...
true
true
1c49d916365ec2c44186d26762ebf015bff76d09
246
py
Python
setup.py
dartmouthrobotics/gds_tools
35b26b32b0d59fccf08050014bd60fd8b97fd5aa
[ "MIT" ]
null
null
null
setup.py
dartmouthrobotics/gds_tools
35b26b32b0d59fccf08050014bd60fd8b97fd5aa
[ "MIT" ]
null
null
null
setup.py
dartmouthrobotics/gds_tools
35b26b32b0d59fccf08050014bd60fd8b97fd5aa
[ "MIT" ]
null
null
null
from distutils.core import setup from catkin_pkg.python_setup import generate_distutils_setup # fetch values from package.xml setup_args = generate_distutils_setup( packages=['gds_tools'], package_dir={'': 'src'}, ) setup(**setup_args)
22.363636
60
0.768293
from distutils.core import setup from catkin_pkg.python_setup import generate_distutils_setup setup_args = generate_distutils_setup( packages=['gds_tools'], package_dir={'': 'src'}, ) setup(**setup_args)
true
true
1c49da5e3caa5cc5693ed524f38852b909517aba
19,014
py
Python
nova/network/security_group/quantum_driver.py
bopopescu/Nova-31
cabc3f7a905ea982cf9d2832a3990ae8e061d963
[ "Apache-2.0" ]
1
2021-04-08T10:13:03.000Z
2021-04-08T10:13:03.000Z
nova/network/security_group/quantum_driver.py
bopopescu/Nova-31
cabc3f7a905ea982cf9d2832a3990ae8e061d963
[ "Apache-2.0" ]
null
null
null
nova/network/security_group/quantum_driver.py
bopopescu/Nova-31
cabc3f7a905ea982cf9d2832a3990ae8e061d963
[ "Apache-2.0" ]
1
2020-07-24T08:19:18.000Z
2020-07-24T08:19:18.000Z
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 Nicira, Inc. # All Rights Reserved # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/lic...
43.610092
79
0.592879
from oslo.config import cfg from quantumclient.common import exceptions as q_exc from quantumclient.quantum import v2_0 as quantumv20 from webob import exc from nova.compute import api as compute_api from nova import exception from nova.network import quantumv2 from nova.network.security_group import security_group_...
true
true
1c49db13db2a6633c33e03c70a86b0802f23aadc
734
py
Python
dashboard/migrations/0003_auto_20210922_0014.py
scholarsportal/sp_ask_admin_dashboard
0aa99197a74d30f6b2634ce4d4e9a4654828e2ba
[ "MIT" ]
1
2021-06-30T09:23:07.000Z
2021-06-30T09:23:07.000Z
dashboard/migrations/0003_auto_20210922_0014.py
scholarsportal/sp_ask_admin_dashboard
0aa99197a74d30f6b2634ce4d4e9a4654828e2ba
[ "MIT" ]
9
2021-07-02T04:09:23.000Z
2021-07-06T07:06:38.000Z
dashboard/migrations/0003_auto_20210922_0014.py
scholarsportal/sp_ask_admin_dashboard
0aa99197a74d30f6b2634ce4d4e9a4654828e2ba
[ "MIT" ]
1
2021-11-30T20:47:56.000Z
2021-11-30T20:47:56.000Z
# Generated by Django 2.2.19 on 2021-09-22 04:14 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('dashboard', '0002_auto_20210922_0012'), ] operations = [ migrations.RenameModel( old_name='Chat', new_name='ChatLig...
28.230769
103
0.621253
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('dashboard', '0002_auto_20210922_0012'), ] operations = [ migrations.RenameModel( old_name='Chat', new_name='ChatLightAssessment', ), migrations.AddI...
true
true
1c49e00453cdcd61b12b653597c4d0488629ad01
14,791
py
Python
tests/tests/test_compressor.py
karlwnw/django-pipeline
eeb92660c18d969b955e0115ab909a64fb16d92e
[ "MIT" ]
598
2015-12-18T01:25:23.000Z
2022-03-31T13:57:01.000Z
tests/tests/test_compressor.py
karlwnw/django-pipeline
eeb92660c18d969b955e0115ab909a64fb16d92e
[ "MIT" ]
288
2015-12-18T01:30:20.000Z
2022-02-22T16:02:12.000Z
tests/tests/test_compressor.py
karlwnw/django-pipeline
eeb92660c18d969b955e0115ab909a64fb16d92e
[ "MIT" ]
178
2015-12-20T06:58:57.000Z
2022-03-04T21:53:43.000Z
import base64 import io import os import sys try: from mock import patch except ImportError: from unittest.mock import patch # noqa from unittest import skipIf, skipUnless from django.conf import settings from django.test import TestCase from django.test.client import RequestFactory from pipeline.compresso...
51.898246
1,213
0.685687
import base64 import io import os import sys try: from mock import patch except ImportError: from unittest.mock import patch from unittest import skipIf, skipUnless from django.conf import settings from django.test import TestCase from django.test.client import RequestFactory from pipeline.compressors impo...
true
true
1c49e18ac0e8dba6da218abdc4c6d3a737ca47f4
34,988
py
Python
flask_backend/anime_env/Lib/site-packages/gevent/tests/test__socket_dns.py
shafqatshad/AnmieRecommenderSystem
f58d6ab2b3614aa81208ec844ef99963c988c69d
[ "Apache-2.0" ]
null
null
null
flask_backend/anime_env/Lib/site-packages/gevent/tests/test__socket_dns.py
shafqatshad/AnmieRecommenderSystem
f58d6ab2b3614aa81208ec844ef99963c988c69d
[ "Apache-2.0" ]
null
null
null
flask_backend/anime_env/Lib/site-packages/gevent/tests/test__socket_dns.py
shafqatshad/AnmieRecommenderSystem
f58d6ab2b3614aa81208ec844ef99963c988c69d
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import print_function from __future__ import absolute_import from __future__ import division import gevent from gevent import monkey import os import re import unittest import socket from time import time import traceback import gevent.socket as gevent_socket...
37.865801
110
0.636933
from __future__ import print_function from __future__ import absolute_import from __future__ import division import gevent from gevent import monkey import os import re import unittest import socket from time import time import traceback import gevent.socket as gevent_socket import gevent.testing as greentest from ...
true
true
1c49e25c6e75fd9b0b06b279779a858490d11a7e
9,520
py
Python
nova/api/openstack/placement/microversion.py
viveknandavanam/nova
556377b6915936467436c9d5bb33bc0e22244e1e
[ "Apache-2.0" ]
1
2015-11-30T19:44:00.000Z
2015-11-30T19:44:00.000Z
nova/api/openstack/placement/microversion.py
viveknandavanam/nova
556377b6915936467436c9d5bb33bc0e22244e1e
[ "Apache-2.0" ]
5
2018-04-12T16:44:34.000Z
2018-05-08T13:33:05.000Z
nova/api/openstack/placement/microversion.py
viveknandavanam/nova
556377b6915936467436c9d5bb33bc0e22244e1e
[ "Apache-2.0" ]
3
2018-04-04T15:15:01.000Z
2018-04-19T18:14:25.000Z
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the...
35.522388
78
0.67542
import collections import inspect import microversion_parse import webob import nova.api.openstack.placement.util from nova.i18n import _ SERVICE_TYPE = 'placement' MICROVERSION_ENVIRON = '%s.microversion' % SERVICE_TYPE VERSIONED_METHODS = collections.defaultdict(list) VERSIONS = [ '1.0', '1.1', '1...
true
true
1c49e3447e6cad31e2cefda415baed1335d3fa12
16,213
py
Python
homeassistant/const.py
84KaliPleXon3/home-assistant-core
7194b74580535395b5f100de98643e029bd0f1b6
[ "Apache-2.0" ]
2
2021-09-13T21:44:02.000Z
2021-12-17T21:20:51.000Z
homeassistant/const.py
84KaliPleXon3/home-assistant-core
7194b74580535395b5f100de98643e029bd0f1b6
[ "Apache-2.0" ]
4
2021-02-08T20:47:39.000Z
2022-03-12T00:33:22.000Z
homeassistant/const.py
84KaliPleXon3/home-assistant-core
7194b74580535395b5f100de98643e029bd0f1b6
[ "Apache-2.0" ]
2
2020-11-04T07:40:01.000Z
2021-09-13T21:44:03.000Z
"""Constants used by Home Assistant components.""" MAJOR_VERSION = 0 MINOR_VERSION = 110 PATCH_VERSION = "4" __short_version__ = f"{MAJOR_VERSION}.{MINOR_VERSION}" __version__ = f"{__short_version__}.{PATCH_VERSION}" REQUIRED_PYTHON_VER = (3, 7, 0) # Truthy date string triggers showing related deprecation warning messa...
27.479661
85
0.784247
MAJOR_VERSION = 0 MINOR_VERSION = 110 PATCH_VERSION = "4" __short_version__ = f"{MAJOR_VERSION}.{MINOR_VERSION}" __version__ = f"{__short_version__}.{PATCH_VERSION}" REQUIRED_PYTHON_VER = (3, 7, 0) REQUIRED_NEXT_PYTHON_VER = (3, 8, 0) REQUIRED_NEXT_PYTHON_DATE = "" PLATFORM_FORMAT = "{platform}.{domain}" MATCH_ALL = ...
true
true
1c49e547ddbba557b3ea3778bdb44456db6149f8
10,716
py
Python
astromodels/sources/extended_source.py
abtinshahidi/astromodels
580e972ccc69f4fad57e22030923ee27f9d59ee3
[ "BSD-3-Clause" ]
1
2019-07-05T18:36:59.000Z
2019-07-05T18:36:59.000Z
astromodels/sources/extended_source.py
abtinshahidi/astromodels
580e972ccc69f4fad57e22030923ee27f9d59ee3
[ "BSD-3-Clause" ]
null
null
null
astromodels/sources/extended_source.py
abtinshahidi/astromodels
580e972ccc69f4fad57e22030923ee27f9d59ee3
[ "BSD-3-Clause" ]
null
null
null
import collections import astropy.units as u import numpy as np from astromodels.core.spectral_component import SpectralComponent from astromodels.core.tree import Node from astromodels.core.units import get_units from astromodels.functions.functions import Constant from astromodels.sources.source import Source, EXTE...
32.871166
145
0.60713
import collections import astropy.units as u import numpy as np from astromodels.core.spectral_component import SpectralComponent from astromodels.core.tree import Node from astromodels.core.units import get_units from astromodels.functions.functions import Constant from astromodels.sources.source import Source, EXTE...
true
true
1c49e550917e878195d1309e7b174aba630d18ef
714
py
Python
setup.py
M69k65y/endpoint-logger
96aa2513271ad984bf015c959300f31f6c2acd52
[ "MIT" ]
null
null
null
setup.py
M69k65y/endpoint-logger
96aa2513271ad984bf015c959300f31f6c2acd52
[ "MIT" ]
null
null
null
setup.py
M69k65y/endpoint-logger
96aa2513271ad984bf015c959300f31f6c2acd52
[ "MIT" ]
null
null
null
from setuptools import setup def readme(): with open("readme.md") as f: return f.read() setup( name = "endpoint-logger", version = "1.0.1", description = "A Python package used to track Flask API endpoint access. (Built in Python 3)", url = "https://github.com/M69k65y/endpoint-logger", author = "M69k65y", ...
23.8
95
0.680672
from setuptools import setup def readme(): with open("readme.md") as f: return f.read() setup( name = "endpoint-logger", version = "1.0.1", description = "A Python package used to track Flask API endpoint access. (Built in Python 3)", url = "https://github.com/M69k65y/endpoint-logger", author = "M69k65y", ...
true
true
1c49e68ee19ec34fdae4c2bd75976597c975284e
1,683
py
Python
pype/modules/deadline/plugins/publish/validate_deadline_connection.py
simonebarbieri/pype
a6dc83aa1300738749cbe8e5e2e6d2d1794e0289
[ "MIT" ]
null
null
null
pype/modules/deadline/plugins/publish/validate_deadline_connection.py
simonebarbieri/pype
a6dc83aa1300738749cbe8e5e2e6d2d1794e0289
[ "MIT" ]
null
null
null
pype/modules/deadline/plugins/publish/validate_deadline_connection.py
simonebarbieri/pype
a6dc83aa1300738749cbe8e5e2e6d2d1794e0289
[ "MIT" ]
null
null
null
import pyblish.api from avalon.vendor import requests from pype.plugin import contextplugin_should_run import os class ValidateDeadlineConnection(pyblish.api.ContextPlugin): """Validate Deadline Web Service is running""" label = "Validate Deadline Web Service" order = pyblish.api.ValidatorOrder host...
34.346939
97
0.648247
import pyblish.api from avalon.vendor import requests from pype.plugin import contextplugin_should_run import os class ValidateDeadlineConnection(pyblish.api.ContextPlugin): label = "Validate Deadline Web Service" order = pyblish.api.ValidatorOrder hosts = ["maya", "nuke"] families = ["renderlayer"]...
true
true
1c49e6c1969a6fefd977839e22d2106128182e9a
1,684
py
Python
waipawama/dag/taxdoo.py
elcolumbio/waipawama
6ca23c3a2f35ba07762fb68d6ce115ff8f826903
[ "MIT" ]
null
null
null
waipawama/dag/taxdoo.py
elcolumbio/waipawama
6ca23c3a2f35ba07762fb68d6ce115ff8f826903
[ "MIT" ]
null
null
null
waipawama/dag/taxdoo.py
elcolumbio/waipawama
6ca23c3a2f35ba07762fb68d6ce115ff8f826903
[ "MIT" ]
null
null
null
from airflow.decorators import dag, task from airflow.operators.python import get_current_context from airflow.operators.bash_operator import BashOperator import datetime from waipawama.models.taxdoo import TaxdooMeta def get_timespan() -> str: """This is our main parameter in our monthly pipeline.""" context...
30.071429
73
0.665677
from airflow.decorators import dag, task from airflow.operators.python import get_current_context from airflow.operators.bash_operator import BashOperator import datetime from waipawama.models.taxdoo import TaxdooMeta def get_timespan() -> str: context = get_current_context() year_month = '-'.join(context['ds...
true
true
1c49e712be10de6dccb1f07fa13fd2281c8ef4d7
29,322
py
Python
pytorch/pytorchcv/models/resnet.py
oliviaweng/imgclsmob
80fffbb46f986614b162c725b21f3d208597ac77
[ "MIT" ]
null
null
null
pytorch/pytorchcv/models/resnet.py
oliviaweng/imgclsmob
80fffbb46f986614b162c725b21f3d208597ac77
[ "MIT" ]
null
null
null
pytorch/pytorchcv/models/resnet.py
oliviaweng/imgclsmob
80fffbb46f986614b162c725b21f3d208597ac77
[ "MIT" ]
null
null
null
""" ResNet for ImageNet-1K, implemented in PyTorch. Original paper: 'Deep Residual Learning for Image Recognition,' https://arxiv.org/abs/1512.03385. """ __all__ = ['ResNet', 'resnet10', 'resnet12', 'resnet14', 'resnetbc14b', 'resnet16', 'resnet18_wd4', 'resnet18_wd2', 'resnet18_w3d4', 'resnet18', '...
32.4
120
0.606405
__all__ = ['ResNet', 'resnet10', 'resnet12', 'resnet14', 'resnetbc14b', 'resnet16', 'resnet18_wd4', 'resnet18_wd2', 'resnet18_w3d4', 'resnet18', 'resnet26', 'resnetbc26b', 'resnet34', 'resnetbc38b', 'resnet50', 'resnet50b', 'resnet101', 'resnet101b', 'resnet152', 'resnet152b', 'resnet200', 'resne...
true
true
1c49e72eda40b3456987582ab05a77a3b7b4b840
318
py
Python
pajbot/tests/modules/test_two_word_variations.py
UVClay/SkookumBot
69679c78475662e2b7948fe63d529a755c47fc80
[ "MIT" ]
1
2021-10-02T10:19:38.000Z
2021-10-02T10:19:38.000Z
pajbot/tests/modules/test_two_word_variations.py
UVClay/SkookumBot
69679c78475662e2b7948fe63d529a755c47fc80
[ "MIT" ]
64
2021-01-09T21:28:05.000Z
2022-03-31T10:07:05.000Z
pajbot/tests/modules/test_two_word_variations.py
UVClay/SkookumBot
69679c78475662e2b7948fe63d529a755c47fc80
[ "MIT" ]
1
2020-03-11T19:37:10.000Z
2020-03-11T19:37:10.000Z
from pajbot.modules.bingo import two_word_variations def test_two_word_variations(): assert two_word_variations("abc", "def", "KKona") == { "abc-def": "KKona", "abc_def": "KKona", "abcdef": "KKona", "def-abc": "KKona", "def_abc": "KKona", "defabc": "KKona", }
24.461538
58
0.559748
from pajbot.modules.bingo import two_word_variations def test_two_word_variations(): assert two_word_variations("abc", "def", "KKona") == { "abc-def": "KKona", "abc_def": "KKona", "abcdef": "KKona", "def-abc": "KKona", "def_abc": "KKona", "defabc": "KKona", }
true
true
1c49e7d519f97f97ba1df092341baac9cd9535c8
61,625
py
Python
nltk/parse/chart.py
addisonblanda/Plato
cebd522dfe4b21f8c965f0e56637c15744817474
[ "MIT" ]
6
2017-01-22T03:15:01.000Z
2019-12-01T16:19:36.000Z
nltk/parse/chart.py
addisonblanda/Plato
cebd522dfe4b21f8c965f0e56637c15744817474
[ "MIT" ]
3
2020-03-24T15:38:23.000Z
2021-02-02T21:44:18.000Z
nltk/parse/chart.py
addisonblanda/Plato
cebd522dfe4b21f8c965f0e56637c15744817474
[ "MIT" ]
6
2017-01-19T21:49:55.000Z
2021-04-14T09:57:17.000Z
# -*- coding: utf-8 -*- # Natural Language Toolkit: A Chart Parser # # Copyright (C) 2001-2017 NLTK Project # Author: Edward Loper <edloper@gmail.com> # Steven Bird <stevenbird1@gmail.com> # Jean Mark Gawron <gawron@mail.sdsu.edu> # Peter Ljunglöf <peter.ljunglof@heatherleaf.se> # URL: <http://n...
36.637931
90
0.567675
from __future__ import print_function, division, unicode_literals import itertools import re import warnings from nltk import compat from nltk.tree import Tree from nltk.grammar import PCFG, is_nonterminal, is_terminal from nltk.util import OrderedDict from nltk.internals import raise_unorderable_types from nltk.com...
true
true
1c49e8c673c464665b7013997bb5ecdb23c0b915
642
py
Python
tests/objects/message/__init__.py
mjneff2/Pincer
a11bc3e4bad319fdf927d913c58c933576ec7c99
[ "MIT" ]
null
null
null
tests/objects/message/__init__.py
mjneff2/Pincer
a11bc3e4bad319fdf927d913c58c933576ec7c99
[ "MIT" ]
null
null
null
tests/objects/message/__init__.py
mjneff2/Pincer
a11bc3e4bad319fdf927d913c58c933576ec7c99
[ "MIT" ]
null
null
null
from pincer.objects import Embed print(Embed( title="Pincer - 0.6.4", description=( "🚀 An asynchronous python API wrapper meant to replace" " discord.py\n> Snappy discord api wrapper written " "with aiohttp & websockets" ) ).add_field( name="**Gi...
32.1
67
0.579439
from pincer.objects import Embed print(Embed( title="Pincer - 0.6.4", description=( "🚀 An asynchronous python API wrapper meant to replace" " discord.py\n> Snappy discord api wrapper written " "with aiohttp & websockets" ) ).add_field( name="**Gi...
true
true
1c49e8d16ca5be1232c4449dc3a9df00edfe575b
1,186
py
Python
setup.py
deone/requestor
9af13ebc90861d37dc2db4e1b1375aa445655868
[ "MIT" ]
null
null
null
setup.py
deone/requestor
9af13ebc90861d37dc2db4e1b1375aa445655868
[ "MIT" ]
null
null
null
setup.py
deone/requestor
9af13ebc90861d37dc2db4e1b1375aa445655868
[ "MIT" ]
null
null
null
# Always prefer setuptools over distutils from setuptools import setup # To use a consistent encoding from codecs import open from os import path here = path.abspath(path.dirname(__file__)) # Get the long description from the README file with open(path.join(here, 'README.rst'), encoding='utf-8') as f: long_descri...
33.885714
122
0.676223
from setuptools import setup from codecs import open from os import path here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'README.rst'), encoding='utf-8') as f: long_description = f.read() setup( name='requestor', version='0.1.1', description='Use this package to make HTTP post c...
true
true
1c49e9bafda8707fe36fdbba4d19f3bf3c46ee9e
43,586
py
Python
codalab/apps/web/migrations/0063_CompetitionDump.py
AIMultimediaLab/AI4Media-EaaS-prototype-Py2-public
64cd6ac9a56a4e2d40d93608d4289b1a0e50cce7
[ "Apache-2.0" ]
333
2015-12-29T22:49:40.000Z
2022-03-27T12:01:57.000Z
codalab/apps/web/migrations/0063_CompetitionDump.py
AIMultimediaLab/AI4Media-EaaS-prototype-Py2-public
64cd6ac9a56a4e2d40d93608d4289b1a0e50cce7
[ "Apache-2.0" ]
1,572
2015-12-28T21:54:00.000Z
2022-03-31T13:00:32.000Z
codalab/apps/web/migrations/0063_CompetitionDump.py
AIMultimediaLab/AI4Media-EaaS-prototype-Py2-public
64cd6ac9a56a4e2d40d93608d4289b1a0e50cce7
[ "Apache-2.0" ]
107
2016-01-08T03:46:07.000Z
2022-03-16T08:43:57.000Z
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'CompetitionDump' db.create_table(u'web_competitiondump', ...
91.76
260
0.576079
from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): db.create_table(u'web_competitiondump', ( (u'id', self.gf('django.db.models.fields.Au...
true
true
1c49ea49846f00cd469bd4230329f98ec6de0734
3,872
py
Python
tensorflow/python/autograph/tests/basic_list_test.py
Stevanus-Christian/tensorflow
d44afcf5ca16c5d704c66f891b99eac804e7cd14
[ "Apache-2.0" ]
3
2022-03-09T01:39:56.000Z
2022-03-30T23:17:58.000Z
tensorflow/python/autograph/tests/basic_list_test.py
Stevanus-Christian/tensorflow
d44afcf5ca16c5d704c66f891b99eac804e7cd14
[ "Apache-2.0" ]
1
2020-08-01T05:40:12.000Z
2020-08-01T05:40:12.000Z
tensorflow/python/autograph/tests/basic_list_test.py
Stevanus-Christian/tensorflow
d44afcf5ca16c5d704c66f891b99eac804e7cd14
[ "Apache-2.0" ]
1
2022-03-22T00:45:15.000Z
2022-03-22T00:45:15.000Z
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
27.267606
80
0.685692
import tensorflow as tf from tensorflow.python import autograph as ag from tensorflow.python.autograph.tests import reference_test_base def type_not_annotated(n): l = [] for i in range(n): l.append(i) return ag.stack(l, strict=False) def element_access(): l = [] l.append(1) l.append(2) l.appen...
true
true
1c49ea6e4d435b59d0f0cb4c10b9268eb44ceb65
2,196
py
Python
python_example/python_example.py
markbentzjr/TroyBot
3be3afa6ae05b889c505f7ab2cc140cc368d1c05
[ "MIT" ]
1
2018-11-24T12:50:51.000Z
2018-11-24T12:50:51.000Z
python_example/python_example.py
markbentzjr/TroyBot
3be3afa6ae05b889c505f7ab2cc140cc368d1c05
[ "MIT" ]
null
null
null
python_example/python_example.py
markbentzjr/TroyBot
3be3afa6ae05b889c505f7ab2cc140cc368d1c05
[ "MIT" ]
null
null
null
import math from rlbot.agents.base_agent import BaseAgent, SimpleControllerState from rlbot.utils.structures.game_data_struct import GameTickPacket class PythonExample(BaseAgent): def initialize_agent(self): #This runs once before the bot starts up self.controller_state = SimpleControllerState()...
30.929577
105
0.656193
import math from rlbot.agents.base_agent import BaseAgent, SimpleControllerState from rlbot.utils.structures.game_data_struct import GameTickPacket class PythonExample(BaseAgent): def initialize_agent(self): self.controller_state = SimpleControllerState() def get_output(self, packet: GameTi...
true
true
1c49eae527f808a327985c9ccfa493755d812372
2,038
py
Python
util/log.py
brunomateus/open_source_android_apps
143deea78ff125b4dd5e88b89f48dc3a9e8bcdfa
[ "MIT" ]
2
2019-11-18T18:01:27.000Z
2021-05-13T18:16:17.000Z
util/log.py
brunomateus/open_source_android_apps
143deea78ff125b4dd5e88b89f48dc3a9e8bcdfa
[ "MIT" ]
null
null
null
util/log.py
brunomateus/open_source_android_apps
143deea78ff125b4dd5e88b89f48dc3a9e8bcdfa
[ "MIT" ]
3
2019-07-18T19:33:04.000Z
2021-01-13T21:13:29.000Z
"""Maintain a global logger instance.""" import logging from typing import IO, Text import github3 import urllib3 import neo4j LOG_LEVEL = logging.WARNING LOG_FORMAT = '%(asctime)s | [%(levelname)s] %(name)s: %(message)s' LEVELS = [ logging.NOTSET, logging.DEBUG, logging.INFO, logging.WARNING, logging.ERROR, ...
30.41791
79
0.683023
import logging from typing import IO, Text import github3 import urllib3 import neo4j LOG_LEVEL = logging.WARNING LOG_FORMAT = '%(asctime)s | [%(levelname)s] %(name)s: %(message)s' LEVELS = [ logging.NOTSET, logging.DEBUG, logging.INFO, logging.WARNING, logging.ERROR, logging.CRITICAL] def compute_level(ver...
true
true
1c49eb7bdb4418c37bc8952b6d14fa22f15819b6
1,033
py
Python
authen/views.py
ozcanyarimdunya/django_authen
fdb48a65d6f4ac4bb2fc09e3b7f024b3a41dd71b
[ "MIT" ]
null
null
null
authen/views.py
ozcanyarimdunya/django_authen
fdb48a65d6f4ac4bb2fc09e3b7f024b3a41dd71b
[ "MIT" ]
2
2020-02-11T23:05:32.000Z
2020-06-05T18:43:16.000Z
authen/views.py
ozcanyarimdunya/django_authen
fdb48a65d6f4ac4bb2fc09e3b7f024b3a41dd71b
[ "MIT" ]
null
null
null
from django.contrib.auth.mixins import LoginRequiredMixin from django.contrib.auth.views import LoginView, LogoutView from django.conf import settings class Login(LoginView): template_name = "authen/login.html" def get_success_url(self): return "/" def get_context_data(self, **kwargs): c...
32.28125
81
0.684414
from django.contrib.auth.mixins import LoginRequiredMixin from django.contrib.auth.views import LoginView, LogoutView from django.conf import settings class Login(LoginView): template_name = "authen/login.html" def get_success_url(self): return "/" def get_context_data(self, **kwargs): c...
true
true
1c49ecb6fa75797648420f768e466984724c7b7a
782
py
Python
scripts/beam_pairs.py
RolT/ZRTools
47aa156b660224fd123582c832bb5e5525c262d8
[ "BSD-3-Clause" ]
25
2015-08-06T20:15:30.000Z
2021-08-30T15:12:42.000Z
scripts/beam_pairs.py
RolT/ZRTools
47aa156b660224fd123582c832bb5e5525c262d8
[ "BSD-3-Clause" ]
2
2017-07-21T11:06:35.000Z
2020-02-27T13:20:34.000Z
scripts/beam_pairs.py
RolT/ZRTools
47aa156b660224fd123582c832bb5e5525c262d8
[ "BSD-3-Clause" ]
16
2015-08-06T21:16:55.000Z
2020-07-09T08:05:50.000Z
#!/usr/bin/env python # # Copyright 2011-2012 Johns Hopkins University (Author: Aren Jansen) # from __future__ import division import sys import os import re import string import random beamwidth = int(sys.argv[1]) baselist = [] for line in sys.stdin: base = line.strip() baselist.append(base) if beamwidt...
21.135135
69
0.621483
from __future__ import division import sys import os import re import string import random beamwidth = int(sys.argv[1]) baselist = [] for line in sys.stdin: base = line.strip() baselist.append(base) if beamwidth == 0: random.shuffle(baselist) for n in range(len(baselist)): for m in range(n...
true
true
1c49ed056770080f895f299b51a9ce278a83c276
309
py
Python
oommfc/tests/test_stt.py
gamdow/oommfc
de33ae2a8348ca78d9e16fe18bc562393703c215
[ "BSD-3-Clause" ]
null
null
null
oommfc/tests/test_stt.py
gamdow/oommfc
de33ae2a8348ca78d9e16fe18bc562393703c215
[ "BSD-3-Clause" ]
null
null
null
oommfc/tests/test_stt.py
gamdow/oommfc
de33ae2a8348ca78d9e16fe18bc562393703c215
[ "BSD-3-Clause" ]
null
null
null
import pytest import oommfc as oc import micromagneticmodel.tests as mmt class TestSTT(mmt.TestSTT): def test_script(self): for arg in self.valid_args: u, beta = arg stt = oc.STT(u, beta) with pytest.raises(NotImplementedError): stt._script()
23.769231
52
0.614887
import pytest import oommfc as oc import micromagneticmodel.tests as mmt class TestSTT(mmt.TestSTT): def test_script(self): for arg in self.valid_args: u, beta = arg stt = oc.STT(u, beta) with pytest.raises(NotImplementedError): stt._script()
true
true
1c49ede342e3b5381a8d05e606d45887e3cb7caf
569
py
Python
src/Lexer/token_types.py
Sword-And-Rose/Simple-Interpreter
471b962e385ade5b18e1b1b785cd0d7529011144
[ "MIT" ]
1
2019-07-19T16:27:31.000Z
2019-07-19T16:27:31.000Z
src/Lexer/token_types.py
HorizonFTT/Simple-Interpreter
471b962e385ade5b18e1b1b785cd0d7529011144
[ "MIT" ]
null
null
null
src/Lexer/token_types.py
HorizonFTT/Simple-Interpreter
471b962e385ade5b18e1b1b785cd0d7529011144
[ "MIT" ]
null
null
null
INTEGER = 'INTEGER' REAL = 'REAL' INTEGER_CONST = 'INTEGER_CONST' REAL_CONST = 'REAL_CONST' STRING = 'STRING' STRING_CONST = 'STRING_CONST' PLUS = '+' MINUS = '-' MUL = '*' INTEGER_DIV = 'DIV' FLOAT_DIV = '/' LESS_THAN = '<' GREATER_THAN = '>' EQUAL = '=' LPAREN = '(' RPAREN = ')' ID = 'ID' ASSIGN = ':=' BEGIN = 'BEGIN...
14.973684
31
0.58348
INTEGER = 'INTEGER' REAL = 'REAL' INTEGER_CONST = 'INTEGER_CONST' REAL_CONST = 'REAL_CONST' STRING = 'STRING' STRING_CONST = 'STRING_CONST' PLUS = '+' MINUS = '-' MUL = '*' INTEGER_DIV = 'DIV' FLOAT_DIV = '/' LESS_THAN = '<' GREATER_THAN = '>' EQUAL = '=' LPAREN = '(' RPAREN = ')' ID = 'ID' ASSIGN = ':=' BEGIN = 'BEGIN...
true
true
1c49eea08a2dfc05dfb02ffb03ad6b610d781514
248
py
Python
idm/commands/bind_chat.py
Ruslan21473/IDM2
27adc319e753173e63b1d790caec993b920f2823
[ "MIT" ]
null
null
null
idm/commands/bind_chat.py
Ruslan21473/IDM2
27adc319e753173e63b1d790caec993b920f2823
[ "MIT" ]
null
null
null
idm/commands/bind_chat.py
Ruslan21473/IDM2
27adc319e753173e63b1d790caec993b920f2823
[ "MIT" ]
null
null
null
from ..objects import dp, Event from ..utils import new_message @dp.event_handle(dp.Methods.BIND_CHAT) def bind_chat(event: Event) -> str: new_message(event.api, event.chat.peer_id, message=f"✅ Беседа распознана.") return "ok"
31
47
0.701613
from ..objects import dp, Event from ..utils import new_message @dp.event_handle(dp.Methods.BIND_CHAT) def bind_chat(event: Event) -> str: new_message(event.api, event.chat.peer_id, message=f"✅ Беседа распознана.") return "ok"
true
true
1c49efc05a3a126007cf12dd6346fb8bbdb8cd2f
898
py
Python
simanalysis.py
EndyLab/spaceballs
331ce388674a4b01b56b36dfb3dda26729b107e6
[ "MIT" ]
1
2017-10-19T07:41:26.000Z
2017-10-19T07:41:26.000Z
simanalysis.py
EndyLab/spaceballs
331ce388674a4b01b56b36dfb3dda26729b107e6
[ "MIT" ]
1
2017-10-19T07:42:12.000Z
2017-10-19T07:42:12.000Z
simanalysis.py
EndyLab/spaceballs
331ce388674a4b01b56b36dfb3dda26729b107e6
[ "MIT" ]
null
null
null
""" Created by Akshay Maheshwari 09/05/2017 Produces analysis figures from experiment data """ from simanalysis_methods import * import matplotlib.pyplot as plt import time; start_time=time.time() expt_name = "171018_2219" outputlist = loadOutputList(expt_name,'molpos') histlistpklpath = combinePkls(expt_name,outputl...
44.9
214
0.752784
from simanalysis_methods import * import matplotlib.pyplot as plt import time; start_time=time.time() expt_name = "171018_2219" outputlist = loadOutputList(expt_name,'molpos') histlistpklpath = combinePkls(expt_name,outputlist,covertime=True) fig = plotHist(histlistpklpath,expt_name,diameter=0.1, graphs="all", logscal...
true
true
1c49f0117ce0749903b3f36e283ae1b91cd3b22f
825
py
Python
GameMenu.py
KRHS-GameProgramming-2015/King-of-the-Pile
1368c97ba8124e27f74c6f8aae8e1f8362126934
[ "BSD-2-Clause" ]
1
2015-12-15T17:39:08.000Z
2015-12-15T17:39:08.000Z
GameMenu.py
KRHS-GameProgramming-2015/King-of-the-Pile
1368c97ba8124e27f74c6f8aae8e1f8362126934
[ "BSD-2-Clause" ]
4
2015-12-21T17:06:51.000Z
2016-02-10T16:50:57.000Z
GameMenu.py
KRHS-GameProgramming-2015/King-of-the-Pile
1368c97ba8124e27f74c6f8aae8e1f8362126934
[ "BSD-2-Clause" ]
null
null
null
import sys, pygame, math, random from Button import * class Menu(): def __init__(self, images): self.images = [] for image in images: #print image self.images += [pygame.image.load(image)] self.image = self.images[0] self.rect = self.image.get_rect() ...
21.153846
56
0.466667
import sys, pygame, math, random from Button import * class Menu(): def __init__(self, images): self.images = [] for image in images: self.images += [pygame.image.load(image)] self.image = self.images[0] self.rect = self.image.get_rect() self.origin...
true
true
1c49f01f22cbc23cfecb70fb36d3a72ff0991e5f
8,685
py
Python
python/paddle_serving_app/local_predict.py
hysunflower/Serving
50d0c2900f3385b049f76b91e38cc69d8e8a102d
[ "Apache-2.0" ]
null
null
null
python/paddle_serving_app/local_predict.py
hysunflower/Serving
50d0c2900f3385b049f76b91e38cc69d8e8a102d
[ "Apache-2.0" ]
null
null
null
python/paddle_serving_app/local_predict.py
hysunflower/Serving
50d0c2900f3385b049f76b91e38cc69d8e8a102d
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ # Copyright (c) 2020 PaddlePaddle 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 ...
38.092105
81
0.595855
import os import google.protobuf.text_format import numpy as np import argparse import paddle.fluid as fluid import paddle.inference as inference from .proto import general_model_config_pb2 as m_config from paddle.fluid.core import PaddleTensor from paddle.fluid.core import AnalysisConfig from paddle.fluid.core import...
true
true
1c49f06dffa7d3da20a9bd4b1507a6abb441f68a
98
py
Python
src/sports_halls/apps.py
codacy-badger/hbscorez
215e4d2617ac9be91bb9d561bbfc552349cd4781
[ "MIT" ]
12
2018-03-20T21:38:53.000Z
2021-10-31T10:00:12.000Z
src/sports_halls/apps.py
codacy-badger/hbscorez
215e4d2617ac9be91bb9d561bbfc552349cd4781
[ "MIT" ]
79
2018-03-18T14:26:47.000Z
2022-03-01T15:51:40.000Z
src/sports_halls/apps.py
codacy-badger/hbscorez
215e4d2617ac9be91bb9d561bbfc552349cd4781
[ "MIT" ]
4
2018-05-18T15:39:56.000Z
2020-10-29T09:28:41.000Z
from django.apps import AppConfig class SportsHallsConfig(AppConfig): name = 'sports_halls'
16.333333
35
0.77551
from django.apps import AppConfig class SportsHallsConfig(AppConfig): name = 'sports_halls'
true
true
1c49f0af27c73266029ce93f22052346da2d9b95
5,439
py
Python
zerver/lib/bugdown/api_code_examples.py
fearless0307/zulip
378d14af7ea73a9a83c7245706cd918bec5a37bf
[ "Apache-2.0" ]
4
2019-06-04T09:06:53.000Z
2019-06-04T09:07:47.000Z
zerver/lib/bugdown/api_code_examples.py
fearless0307/zulip
378d14af7ea73a9a83c7245706cd918bec5a37bf
[ "Apache-2.0" ]
10
2019-02-26T11:10:42.000Z
2019-02-26T14:30:24.000Z
zerver/lib/bugdown/api_code_examples.py
fearless0307/zulip
378d14af7ea73a9a83c7245706cd918bec5a37bf
[ "Apache-2.0" ]
1
2020-01-07T15:49:54.000Z
2020-01-07T15:49:54.000Z
import re import json import inspect from markdown.extensions import Extension from markdown.preprocessors import Preprocessor from typing import Any, Dict, Optional, List import markdown import zerver.lib.api_test_helpers from zerver.lib.openapi import get_openapi_fixture MACRO_REGEXP = re.compile(r'\{generate_code...
33.99375
116
0.596249
import re import json import inspect from markdown.extensions import Extension from markdown.preprocessors import Preprocessor from typing import Any, Dict, Optional, List import markdown import zerver.lib.api_test_helpers from zerver.lib.openapi import get_openapi_fixture MACRO_REGEXP = re.compile(r'\{generate_code...
true
true
1c49f0b92cb9d9dcfa236360b7e8067165742279
15,373
py
Python
tests/test_absorption_spectrum.py
foggie-sims/trident
c5902a066ed87dc760f620d502c3e644bf93d450
[ "BSD-3-Clause-Clear" ]
null
null
null
tests/test_absorption_spectrum.py
foggie-sims/trident
c5902a066ed87dc760f620d502c3e644bf93d450
[ "BSD-3-Clause-Clear" ]
5
2020-11-18T11:58:08.000Z
2022-02-24T10:40:50.000Z
tests/test_absorption_spectrum.py
foggie-sims/trident
c5902a066ed87dc760f620d502c3e644bf93d450
[ "BSD-3-Clause-Clear" ]
1
2022-03-29T17:44:56.000Z
2022-03-29T17:44:56.000Z
""" Unit test for the AbsorptionSpectrum analysis module """ #----------------------------------------------------------------------------- # Copyright (c) 2014-2017, yt Development Team. # Copyright (c) 2017, Trident Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license i...
36.34279
83
0.564366
import numpy as np import os from yt.loaders import load from yt.testing import \ assert_allclose_units, \ assert_almost_equal from trident.absorption_spectrum.absorption_line import \ voigt from trident.absorption_spectrum.absorption_spectrum import \ AbsorptionSpectrum from trident.light_ray import...
true
true
1c49f0f3bf54c9438b56d4e5b82e5dc16b9dd8e7
4,982
py
Python
tests/unit/test_models/test_full_battery_models/test_lithium_ion/test_dfn.py
NunoEdgarGFlowHub/PyBaMM
4e4e1ab8c488b0c0a6efdb9934c5ac59e947a190
[ "BSD-3-Clause" ]
null
null
null
tests/unit/test_models/test_full_battery_models/test_lithium_ion/test_dfn.py
NunoEdgarGFlowHub/PyBaMM
4e4e1ab8c488b0c0a6efdb9934c5ac59e947a190
[ "BSD-3-Clause" ]
null
null
null
tests/unit/test_models/test_full_battery_models/test_lithium_ion/test_dfn.py
NunoEdgarGFlowHub/PyBaMM
4e4e1ab8c488b0c0a6efdb9934c5ac59e947a190
[ "BSD-3-Clause" ]
null
null
null
# # Tests for the lithium-ion DFN model # import pybamm import unittest class TestDFN(unittest.TestCase): def test_well_posed(self): options = {"thermal": "isothermal"} model = pybamm.lithium_ion.DFN(options) model.check_well_posedness() def test_well_posed_2plus1D(self): opti...
32.776316
79
0.633681
import pybamm import unittest class TestDFN(unittest.TestCase): def test_well_posed(self): options = {"thermal": "isothermal"} model = pybamm.lithium_ion.DFN(options) model.check_well_posedness() def test_well_posed_2plus1D(self): options = {"current collector": "potential pai...
true
true
1c49f156253c1ee5a0762a2795736557c9bddbfb
3,641
py
Python
engine/account/forms.py
NamoxLabs/BlogEngine
741549e78b58bbc857e9dcecd88034de49d73304
[ "BSD-3-Clause" ]
1
2018-12-28T04:57:41.000Z
2018-12-28T04:57:41.000Z
engine/account/forms.py
NamoxLabs/BlogEngine
741549e78b58bbc857e9dcecd88034de49d73304
[ "BSD-3-Clause" ]
null
null
null
engine/account/forms.py
NamoxLabs/BlogEngine
741549e78b58bbc857e9dcecd88034de49d73304
[ "BSD-3-Clause" ]
2
2019-01-25T04:34:55.000Z
2020-04-11T09:01:24.000Z
#from captcha.fields import ReCaptchaField from django import forms from django.conf import settings from django.contrib.auth import forms as django_forms, update_session_auth_hash from django.utils.translation import pgettext, pgettext_lazy #from . import models(User) from . import models """ class FormWithReCaptcha...
36.777778
86
0.675639
from django import forms from django.conf import settings from django.contrib.auth import forms as django_forms, update_session_auth_hash from django.utils.translation import pgettext, pgettext_lazy from . import models class ChangePasswordForm(django_forms.PasswordChangeForm): def __init__(self, *args, **kwargs...
true
true
1c49f162a350f2ebbca239c540dffc96e43e2bae
2,574
py
Python
src/pages/gallery/awesome_panel_express_tests/test_markdown.py
jlstevens/awesome-panel
c67b0f4529a3ce6a8517648f49fef8358e2e2c8b
[ "Apache-2.0" ]
null
null
null
src/pages/gallery/awesome_panel_express_tests/test_markdown.py
jlstevens/awesome-panel
c67b0f4529a3ce6a8517648f49fef8358e2e2c8b
[ "Apache-2.0" ]
null
null
null
src/pages/gallery/awesome_panel_express_tests/test_markdown.py
jlstevens/awesome-panel
c67b0f4529a3ce6a8517648f49fef8358e2e2c8b
[ "Apache-2.0" ]
null
null
null
"""In this module we test the `Markdown` functionality of `awesome_panel.express` The `Markdown` functionality of Panel is limited as it does not support - One liners for using Markdown from files - Code blocks - Indented Markdown text as is often what is used in Editors like VS Code. Please note you need to run `Co...
25.74
97
0.688423
import pathlib import panel as pn import awesome_panel.express as pnx from awesome_panel.express.testing import TestApp TEST_MD_FILE = pathlib.Path(__file__).parent / "data" / "test.md" pnx.Code.extend() def test_markdown(): return TestApp( test_markdown, pnx.Markdown("# Header", name="basic",...
true
true
1c49f2142861df2d045a482002a519a24cbcd848
2,022
py
Python
tests/nuodb_crypt_test.py
jgetto/nuodb-python
3a22260e801d8f9d9bd33f911a694e8caeba7282
[ "BSD-3-Clause" ]
null
null
null
tests/nuodb_crypt_test.py
jgetto/nuodb-python
3a22260e801d8f9d9bd33f911a694e8caeba7282
[ "BSD-3-Clause" ]
null
null
null
tests/nuodb_crypt_test.py
jgetto/nuodb-python
3a22260e801d8f9d9bd33f911a694e8caeba7282
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python import pynuodb import unittest from nuodb_base import NuoBase class NuoDBBasicTest(unittest.TestCase): def test_toByteString(self): self.assertEqual(pynuodb.crypt.toSignedByteString(1), '01'.decode('hex')) self.assertEqual(pynuodb.crypt.toSignedByteString(127), '7F'.dec...
54.648649
106
0.720574
import pynuodb import unittest from nuodb_base import NuoBase class NuoDBBasicTest(unittest.TestCase): def test_toByteString(self): self.assertEqual(pynuodb.crypt.toSignedByteString(1), '01'.decode('hex')) self.assertEqual(pynuodb.crypt.toSignedByteString(127), '7F'.decode('hex')) se...
true
true
1c49f2b7d071ce1ebf896fca28a137a5869de6d1
4,909
py
Python
DQMOffline/Configuration/python/DQMOfflineCosmics_SecondStep_cff.py
vjmastra/cmssw
de96df37dbaf3543daef67339179e074bde9e858
[ "Apache-2.0" ]
1
2019-02-06T13:19:54.000Z
2019-02-06T13:19:54.000Z
DQMOffline/Configuration/python/DQMOfflineCosmics_SecondStep_cff.py
dellaric/cmssw
cd7470dc554972076740dde7523f311c43f248d3
[ "Apache-2.0" ]
null
null
null
DQMOffline/Configuration/python/DQMOfflineCosmics_SecondStep_cff.py
dellaric/cmssw
cd7470dc554972076740dde7523f311c43f248d3
[ "Apache-2.0" ]
null
null
null
import FWCore.ParameterSet.Config as cms from DQMServices.Components.DQMMessageLoggerClient_cff import * from DQMServices.Components.DQMFastTimerServiceClient_cfi import * from DQMOffline.Ecal.ecal_dqm_client_offline_cosmic_cff import * from DQM.EcalPreshowerMonitorClient.es_dqm_client_offline_cosmic_cff import * fro...
52.223404
107
0.695457
import FWCore.ParameterSet.Config as cms from DQMServices.Components.DQMMessageLoggerClient_cff import * from DQMServices.Components.DQMFastTimerServiceClient_cfi import * from DQMOffline.Ecal.ecal_dqm_client_offline_cosmic_cff import * from DQM.EcalPreshowerMonitorClient.es_dqm_client_offline_cosmic_cff import * fro...
true
true
1c49f324acb2a047c20500c33a13ef6f0f53f559
73
py
Python
pvpc/__init__.py
David-Lor/python-pvpc
a5aac6f32a6eaf464ee374fd7da32a79fbbd18ba
[ "ISC" ]
null
null
null
pvpc/__init__.py
David-Lor/python-pvpc
a5aac6f32a6eaf464ee374fd7da32a79fbbd18ba
[ "ISC" ]
null
null
null
pvpc/__init__.py
David-Lor/python-pvpc
a5aac6f32a6eaf464ee374fd7da32a79fbbd18ba
[ "ISC" ]
null
null
null
from .models import * from .requester import * from .exceptions import *
18.25
25
0.753425
from .models import * from .requester import * from .exceptions import *
true
true
1c49f39ec3628b8aaf020ff4bb77d86834de746f
1,407
py
Python
kicad_cicd/plotter.py
sillevl/pcbops_template
68107607412245df168acdab978447ab82da33f7
[ "MIT" ]
10
2019-04-30T22:14:20.000Z
2021-02-24T13:51:57.000Z
kicad_cicd/plotter.py
sillevl/pcbops_template
68107607412245df168acdab978447ab82da33f7
[ "MIT" ]
2
2019-05-09T13:59:39.000Z
2019-09-25T14:07:25.000Z
kicad_cicd/plotter.py
sillevl/pcbops_template
68107607412245df168acdab978447ab82da33f7
[ "MIT" ]
3
2019-04-29T10:01:48.000Z
2020-06-04T10:14:26.000Z
import sys import os import pcbnew from pcbnew import * file_name = os.path.abspath(sys.argv[1]) output_dir = os.path.abspath(sys.argv[2]) print("Running KiCAD Plotter CI/CD Script on %s output to %s"%(file_name, output_dir,)) try: os.makedirs(output_dir) except OSError: pass board = pcbnew.LoadBoard(file...
24.684211
87
0.721393
import sys import os import pcbnew from pcbnew import * file_name = os.path.abspath(sys.argv[1]) output_dir = os.path.abspath(sys.argv[2]) print("Running KiCAD Plotter CI/CD Script on %s output to %s"%(file_name, output_dir,)) try: os.makedirs(output_dir) except OSError: pass board = pcbnew.LoadBoard(file...
true
true
1c49f3bd8d21302a83182466fe1ef519c82625f3
49,318
py
Python
python_modules/dagster/dagster_tests/core_tests/storage_tests/utils/run_storage.py
cvb/dagster
6c735708790febe79ffe727225a4445c033ab79d
[ "Apache-2.0" ]
null
null
null
python_modules/dagster/dagster_tests/core_tests/storage_tests/utils/run_storage.py
cvb/dagster
6c735708790febe79ffe727225a4445c033ab79d
[ "Apache-2.0" ]
null
null
null
python_modules/dagster/dagster_tests/core_tests/storage_tests/utils/run_storage.py
cvb/dagster
6c735708790febe79ffe727225a4445c033ab79d
[ "Apache-2.0" ]
null
null
null
import sys import tempfile from datetime import datetime import pendulum import pytest from dagster import job, op, seven from dagster.core.definitions import PipelineDefinition from dagster.core.errors import ( DagsterRunAlreadyExists, DagsterRunNotFoundError, DagsterSnapshotDoesNotExist, ) from dagster.c...
36.209985
100
0.611278
import sys import tempfile from datetime import datetime import pendulum import pytest from dagster import job, op, seven from dagster.core.definitions import PipelineDefinition from dagster.core.errors import ( DagsterRunAlreadyExists, DagsterRunNotFoundError, DagsterSnapshotDoesNotExist, ) from dagster.c...
true
true
1c49f411229f1de6a15db374752a524ef0e0ee0b
12,639
py
Python
rnn/train_search.py
cclauss/darts
b6d4fe1692a67d81adaa3d4bfd7c13e3dcb1d443
[ "Apache-2.0" ]
1
2018-07-26T01:16:31.000Z
2018-07-26T01:16:31.000Z
rnn/train_search.py
wangxinchina/darts
77a461b62edb232406891028645b2331a24a8b4d
[ "Apache-2.0" ]
null
null
null
rnn/train_search.py
wangxinchina/darts
77a461b62edb232406891028645b2331a24a8b4d
[ "Apache-2.0" ]
1
2019-06-18T05:53:16.000Z
2019-06-18T05:53:16.000Z
import argparse import os, sys, glob import time import math import numpy as np import torch import logging import torch.nn as nn import torch.nn.functional as F import torch.backends.cudnn as cudnn from architect import Architect import gc import data import model_search as model from utils import batchify, get_bat...
44.038328
132
0.652742
import argparse import os, sys, glob import time import math import numpy as np import torch import logging import torch.nn as nn import torch.nn.functional as F import torch.backends.cudnn as cudnn from architect import Architect import gc import data import model_search as model from utils import batchify, get_bat...
true
true
1c49f5c305ab49c62a991b94780ce7e3479571cc
4,046
py
Python
codejobs/settings.py
amanfojnr/open-jobs-api
e70aa2c0d5031981cd571c50753fa5b28f5dce07
[ "MIT" ]
null
null
null
codejobs/settings.py
amanfojnr/open-jobs-api
e70aa2c0d5031981cd571c50753fa5b28f5dce07
[ "MIT" ]
null
null
null
codejobs/settings.py
amanfojnr/open-jobs-api
e70aa2c0d5031981cd571c50753fa5b28f5dce07
[ "MIT" ]
null
null
null
""" Django settings for codejobs project. Generated by 'django-admin startproject' using Django 1.11.7. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ """ import o...
24.227545
91
0.674246
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = 'b(=fum!6g93&xfvwmd^8#bz-2t8nqxbuum!9_ke!t$d&f@hztp' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes...
true
true
1c49f7108d5c141fdd81026bb117e58efba5174b
1,394
py
Python
AutomationFramework/tests/network_instance/test_ni_protocol_instances.py
sbarguil/Testing-framework
f3ef69f1c4f0aeafd02e222d846162c711783b15
[ "Apache-2.0" ]
1
2020-04-23T15:22:16.000Z
2020-04-23T15:22:16.000Z
AutomationFramework/tests/network_instance/test_ni_protocol_instances.py
sbarguil/Testing-framework
f3ef69f1c4f0aeafd02e222d846162c711783b15
[ "Apache-2.0" ]
44
2020-08-13T19:35:41.000Z
2021-03-01T09:08:00.000Z
AutomationFramework/tests/network_instance/test_ni_protocol_instances.py
sbarguil/Testing-framework
f3ef69f1c4f0aeafd02e222d846162c711783b15
[ "Apache-2.0" ]
6
2020-04-23T15:29:38.000Z
2022-03-03T14:23:38.000Z
import pytest from AutomationFramework.page_objects.network_instance.network_intance import NetworkInstance from AutomationFramework.tests.base_test import BaseTest class TestNetworkInstanceProtocolInstances(BaseTest): test_case_file = 'ni_protocol_instances.yml' @pytest.mark.parametrize('create_page_object_...
63.363636
117
0.700861
import pytest from AutomationFramework.page_objects.network_instance.network_intance import NetworkInstance from AutomationFramework.tests.base_test import BaseTest class TestNetworkInstanceProtocolInstances(BaseTest): test_case_file = 'ni_protocol_instances.yml' @pytest.mark.parametrize('create_page_object_...
true
true
1c49f76aea09c7aaa661dfbbe91e896bbb4e690a
844
py
Python
Python/AWS_Scripts/moveFile.py
CharvyJain/Rotten-Scripts
c9b8f7dde378620e4a82eae7aacec53f1eeea3c5
[ "MIT" ]
3
2021-02-06T16:16:46.000Z
2021-08-20T03:19:01.000Z
Python/Aws/moveFile.py
SKAUL05/Rotten-Scripts
c44e69754bbecb8a547fe2cc3a29be5acf97c46a
[ "MIT" ]
null
null
null
Python/Aws/moveFile.py
SKAUL05/Rotten-Scripts
c44e69754bbecb8a547fe2cc3a29be5acf97c46a
[ "MIT" ]
1
2021-08-08T16:03:40.000Z
2021-08-08T16:03:40.000Z
import boto3 awsAccessKeyId = "" awsSecretAccessKey = "" bucketName= "" directoryName = "" s3 = boto3.resource( 's3', aws_access_key_id=awsAccessKeyId, aws_secret_access_key=awsSecretAccessKey ) myBucket = s3.Bucket(bucketName) def moveFile(): try: for objectSummary in myBucket.objects...
30.142857
79
0.631517
import boto3 awsAccessKeyId = "" awsSecretAccessKey = "" bucketName= "" directoryName = "" s3 = boto3.resource( 's3', aws_access_key_id=awsAccessKeyId, aws_secret_access_key=awsSecretAccessKey ) myBucket = s3.Bucket(bucketName) def moveFile(): try: for objectSummary in myBucket.objects...
true
true
1c49f7929e2a520d2bfeebebc3d0b9896156a77e
2,768
py
Python
starfish/image/_filter/scale_by_percentile.py
vipulsinghal02/starfish
c3d347954ad40a7a4be9a50d89974f5fbbc2919d
[ "MIT" ]
null
null
null
starfish/image/_filter/scale_by_percentile.py
vipulsinghal02/starfish
c3d347954ad40a7a4be9a50d89974f5fbbc2919d
[ "MIT" ]
null
null
null
starfish/image/_filter/scale_by_percentile.py
vipulsinghal02/starfish
c3d347954ad40a7a4be9a50d89974f5fbbc2919d
[ "MIT" ]
null
null
null
from functools import partial from typing import Optional import numpy as np from starfish.imagestack.imagestack import ImageStack from ._base import FilterAlgorithmBase from .util import preserve_float_range class ScaleByPercentile(FilterAlgorithmBase): def __init__(self, p: int=0, is_volume: bool=False, **kw...
29.136842
100
0.595737
from functools import partial from typing import Optional import numpy as np from starfish.imagestack.imagestack import ImageStack from ._base import FilterAlgorithmBase from .util import preserve_float_range class ScaleByPercentile(FilterAlgorithmBase): def __init__(self, p: int=0, is_volume: bool=False, **kw...
true
true
1c49f7f555a1957609cf19ef4517fb9da15f2e1a
688
py
Python
mogan/image/__init__.py
GURUIFENG9139/rocky-mogan
6008c1d12b00e70d2cc651f7bd5d47968fc3aec7
[ "Apache-2.0" ]
null
null
null
mogan/image/__init__.py
GURUIFENG9139/rocky-mogan
6008c1d12b00e70d2cc651f7bd5d47968fc3aec7
[ "Apache-2.0" ]
null
null
null
mogan/image/__init__.py
GURUIFENG9139/rocky-mogan
6008c1d12b00e70d2cc651f7bd5d47968fc3aec7
[ "Apache-2.0" ]
null
null
null
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
38.222222
78
0.715116
def API(): import mogan.image.api return mogan.image.api.API()
true
true
1c49fa29619138af962a51bbcd48f42a98d3cb02
1,274
py
Python
perfkitbenchmarker/linux_packages/nfs_server.py
msidana/PerfKitBenchmarker
2784642d3e6b20b3f474c4e27edb1ef163804f66
[ "Apache-2.0" ]
2
2021-01-15T09:40:28.000Z
2021-01-15T09:40:36.000Z
perfkitbenchmarker/linux_packages/nfs_server.py
msidana/PerfKitBenchmarker
2784642d3e6b20b3f474c4e27edb1ef163804f66
[ "Apache-2.0" ]
1
2021-02-23T12:07:44.000Z
2021-02-23T12:07:44.000Z
perfkitbenchmarker/linux_packages/nfs_server.py
msidana/PerfKitBenchmarker
2784642d3e6b20b3f474c4e27edb1ef163804f66
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 PerfKitBenchmarker Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
32.666667
79
0.787284
from __future__ import absolute_import from __future__ import division from __future__ import print_function PACKAGE_NAME = 'nfs_server' def YumInstall(vm): vm.InstallPackages('nfs-utils') def AptInstall(vm): vm.InstallPackages('nfs-kernel-server')
true
true
1c49fa7a717d7e4d70535ca92cd54ab0fc3c3e50
19,387
py
Python
speech/utils/textgrid.py
dzubke/speech-lite
65f83ac2b7551650820f079ce5152741f2a6fdb8
[ "Apache-2.0" ]
null
null
null
speech/utils/textgrid.py
dzubke/speech-lite
65f83ac2b7551650820f079ce5152741f2a6fdb8
[ "Apache-2.0" ]
null
null
null
speech/utils/textgrid.py
dzubke/speech-lite
65f83ac2b7551650820f079ce5152741f2a6fdb8
[ "Apache-2.0" ]
null
null
null
# Natural Language Toolkit: TextGrid analysis # # Copyright (C) 2001-2011 NLTK Project # Author: Margaret Mitchell <itallow@gmail.com> # Steven Bird <sb@csse.unimelb.edu.au> (revisions) # URL: <http://www.nltk.org> # For license information, see LICENSE.TXT # """ Tools for reading TextGrid files, the format us...
30.104037
129
0.516429
import sys import re TEXTTIER = "TextTier" INTERVALTIER = "IntervalTier" OOTEXTFILE = re.compile(r"""(?x) xmin\ =\ (.*)[\r\n]+ xmax\ =\ (.*)[\r\n]+ [\s\S]+?size\ =\ (.*)[\r\n]+ """) CHRONTEXTFILE = re.compile(r"""(?x) [\r\n]+(\S+)\ (\S+)\ +!\ Time\ dom...
true
true
1c49fb41d87bacb2885b8521921dc64905ec5e5d
25,423
py
Python
utils/data_generator.py
qiuqiangkong/dcase2019_task2
62575c8cdd4723cfdf497b290b6dddcce316c60b
[ "MIT" ]
36
2019-04-13T02:04:04.000Z
2020-10-27T15:54:24.000Z
utils/data_generator.py
qiuqiangkong/dcase2019_task2
62575c8cdd4723cfdf497b290b6dddcce316c60b
[ "MIT" ]
2
2019-04-14T08:08:26.000Z
2019-04-18T19:29:38.000Z
utils/data_generator.py
qiuqiangkong/dcase2019_task2
62575c8cdd4723cfdf497b290b6dddcce316c60b
[ "MIT" ]
16
2019-04-13T23:01:32.000Z
2021-01-10T05:20:15.000Z
import numpy as np import h5py import csv import time import logging import os import glob import matplotlib.pyplot as plt import logging import pandas as pd from utilities import scale import config class Base(object): def __init__(self): '''Base class for train, validate and test data generator. ...
39.476708
84
0.556858
import numpy as np import h5py import csv import time import logging import os import glob import matplotlib.pyplot as plt import logging import pandas as pd from utilities import scale import config class Base(object): def __init__(self): pass def load_hdf5(self, hdf5_path, cross_validation...
true
true
1c49fb45dc43ea2b8aafb011957f27effda703a7
1,190
py
Python
all_tests/it10.py
shushantkumar/ci_edit_final
3b13c7a39b2112ed8daaa70bc4f0f50d67909494
[ "Apache-2.0" ]
null
null
null
all_tests/it10.py
shushantkumar/ci_edit_final
3b13c7a39b2112ed8daaa70bc4f0f50d67909494
[ "Apache-2.0" ]
null
null
null
all_tests/it10.py
shushantkumar/ci_edit_final
3b13c7a39b2112ed8daaa70bc4f0f50d67909494
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import from __future__ import division from __future__ import print_function import unittest from app.curses_util import * import app.fake_curses_testing class it10(app.fake_curses_testing.FakeCursesTestCase): def setUp(self): app.fake_curses_testing.FakeCursesTestCase.se...
38.387097
74
0.653782
from __future__ import absolute_import from __future__ import division from __future__ import print_function import unittest from app.curses_util import * import app.fake_curses_testing class it10(app.fake_curses_testing.FakeCursesTestCase): def setUp(self): app.fake_curses_testing.FakeCursesTestCase.se...
true
true
1c49fb62426836b9756f2971c833979c6b552fae
2,657
py
Python
tests/test_cdtw.py
dizcza/cdtw-python
a83fffd6fc222a1691f07421fd4dbf46dc19e0aa
[ "MIT" ]
null
null
null
tests/test_cdtw.py
dizcza/cdtw-python
a83fffd6fc222a1691f07421fd4dbf46dc19e0aa
[ "MIT" ]
null
null
null
tests/test_cdtw.py
dizcza/cdtw-python
a83fffd6fc222a1691f07421fd4dbf46dc19e0aa
[ "MIT" ]
null
null
null
import unittest import math import numpy as np from cdtw.dtw import * from numpy.testing import assert_array_equal, assert_array_almost_equal try: import dtaidistance DTAIDISTANCE_INSTALLED = True except ImportError: DTAIDISTANCE_INSTALLED = False class TestCDTW(unittest.TestCase): def test_empty(s...
33.2125
78
0.596161
import unittest import math import numpy as np from cdtw.dtw import * from numpy.testing import assert_array_equal, assert_array_almost_equal try: import dtaidistance DTAIDISTANCE_INSTALLED = True except ImportError: DTAIDISTANCE_INSTALLED = False class TestCDTW(unittest.TestCase): def test_empty(s...
true
true
1c49fd605d161c98160f7a93f5883987a5cf6858
2,476
py
Python
samsungctl/interactive.py
jakubpas/samsungctl
adda11c55038e2a3d057edf515ee44a2fd950949
[ "MIT" ]
4
2021-03-01T01:49:23.000Z
2022-02-08T16:18:37.000Z
samsungctl/interactive.py
jakubpas/samsungctl
adda11c55038e2a3d057edf515ee44a2fd950949
[ "MIT" ]
null
null
null
samsungctl/interactive.py
jakubpas/samsungctl
adda11c55038e2a3d057edf515ee44a2fd950949
[ "MIT" ]
1
2021-06-23T20:42:05.000Z
2021-06-23T20:42:05.000Z
import curses _wake_on_lan = '44:5C:E9:51:C8:29' _mappings = [ ["p", "KEY_POWER", "P", "Power off"], ["h", "KEY_HOME", "H", "Home"], ["KEY_UP", "KEY_UP", "Up", "Up"], ["KEY_DOWN", "KEY_DOWN", "Down", "D...
37.515152
74
0.421648
import curses _wake_on_lan = '44:5C:E9:51:C8:29' _mappings = [ ["p", "KEY_POWER", "P", "Power off"], ["h", "KEY_HOME", "H", "Home"], ["KEY_UP", "KEY_UP", "Up", "Up"], ["KEY_DOWN", "KEY_DOWN", "Down", "D...
true
true
1c49fd615acaec331d8b1875e666820618016ac8
4,988
py
Python
attention.py
huajianjiu/ANSMESC
76323a46f638c717e23388cf529734081a70eeee
[ "Apache-2.0" ]
1
2021-08-09T03:45:36.000Z
2021-08-09T03:45:36.000Z
attention.py
huajianjiu/ANSMESC
76323a46f638c717e23388cf529734081a70eeee
[ "Apache-2.0" ]
2
2021-08-09T07:40:19.000Z
2021-08-10T12:34:04.000Z
attention.py
yuanzhiKe/ANSMESC
76323a46f638c717e23388cf529734081a70eeee
[ "Apache-2.0" ]
null
null
null
# author - Richard Liao # Dec 26 2016 # Attention GRU network from keras import backend as K from keras.engine.topology import Layer from keras import initializers, regularizers, constraints class AttentionWithContext(Layer): """ Attention operation, with a context/query vector, for temporal data. ...
39.587302
102
0.594226
from keras import backend as K from keras.engine.topology import Layer from keras import initializers, regularizers, constraints class AttentionWithContext(Layer): def __init__(self, W_regularizer=None, u_regularizer=None, b_regularizer=None, W_constraint=None, u_constraint=Non...
true
true
1c49fdbc6de8e0fa0905400b281525d8cbffcdac
2,739
py
Python
tests/test_client.py
nicolaskenner/jira
5c27f6ddafffc6110be1db4749fa67025852bcb6
[ "BSD-2-Clause" ]
1
2021-03-04T08:06:37.000Z
2021-03-04T08:06:37.000Z
tests/test_client.py
nicolaskenner/jira
5c27f6ddafffc6110be1db4749fa67025852bcb6
[ "BSD-2-Clause" ]
1
2020-08-25T15:50:27.000Z
2020-08-25T15:50:27.000Z
tests/test_client.py
nicolaskenner/jira
5c27f6ddafffc6110be1db4749fa67025852bcb6
[ "BSD-2-Clause" ]
1
2022-01-18T20:17:48.000Z
2022-01-18T20:17:48.000Z
# -*- coding: utf-8 -*- import getpass import pytest # from tenacity import retry # from tenacity import wait_incrementing from tests import get_unique_project_name from tests import JiraTestManager from jira import Role, Issue, JIRA, JIRAError, Project # noqa import jira.client @pytest.fixture() def prep(): p...
20.75
80
0.68054
import getpass import pytest from tests import get_unique_project_name from tests import JiraTestManager from jira import Role, Issue, JIRA, JIRAError, Project import jira.client @pytest.fixture() def prep(): pass @pytest.fixture(scope="module") def test_manager(): return JiraTestManager() @pytest.fixt...
true
true
1c49fdc0256ccd65c716e03f0e803a5cd3cf8ffb
2,151
py
Python
google_oauth/__init__.py
martialo12/flask-google-login
592043ed8cf8fddcaab7536c1911d654013b5e4f
[ "MIT" ]
null
null
null
google_oauth/__init__.py
martialo12/flask-google-login
592043ed8cf8fddcaab7536c1911d654013b5e4f
[ "MIT" ]
null
null
null
google_oauth/__init__.py
martialo12/flask-google-login
592043ed8cf8fddcaab7536c1911d654013b5e4f
[ "MIT" ]
null
null
null
# python standard libraries from pathlib import Path import logging.config # third party libraries from flask import Flask from flask_login import LoginManager from oauthlib.oauth2 import WebApplicationClient from flask_bootstrap import Bootstrap from flask_sqlalchemy import SQLAlchemy import yaml # logging path_to_c...
22.40625
78
0.76662
from pathlib import Path import logging.config from flask import Flask from flask_login import LoginManager from oauthlib.oauth2 import WebApplicationClient from flask_bootstrap import Bootstrap from flask_sqlalchemy import SQLAlchemy import yaml path_to_config_file = Path(__file__).parent / "config/config.yaml" logg...
true
true
1c49fe277718b141c1da5f42a448b8e3c088d5a0
3,987
py
Python
python/basics/chapter_6_dictionaries/exercises_6.py
gabriel-miglioranza/python_crash_course
57db9d6b17b225a6aaa5451c3a3b567ffc426b37
[ "MIT" ]
null
null
null
python/basics/chapter_6_dictionaries/exercises_6.py
gabriel-miglioranza/python_crash_course
57db9d6b17b225a6aaa5451c3a3b567ffc426b37
[ "MIT" ]
null
null
null
python/basics/chapter_6_dictionaries/exercises_6.py
gabriel-miglioranza/python_crash_course
57db9d6b17b225a6aaa5451c3a3b567ffc426b37
[ "MIT" ]
null
null
null
# Chapter 6 exercises from the book Python Crash Course: A Hands-On, Project-Based Introduction to Programming. # 6-1. Person person = { 'first_name': 'sean', 'last_name': 'carroll', 'city': 'los angeles' } print(person) # 6-2. Favorite Numbers favorite_numbers = { 'cris': 23, 'bian...
24.163636
112
0.562328
person = { 'first_name': 'sean', 'last_name': 'carroll', 'city': 'los angeles' } print(person) favorite_numbers = { 'cris': 23, 'bianca': 133, 'monica': 42 } print("Monica's favorite number is " + str(favorite_numbers['monica']) + ".") print("Cris' favorite number is " + str(...
true
true
1c49ffe311feb2c993cc12b7b475ef5d345533e4
222,005
py
Python
SigProfilerTopography/source/plotting/TranscriptionReplicationStrandBiasFigures.py
AlexandrovLab/SigProfilerTopography
34c7cf24392bc77953370038a520ffc8d0bdee50
[ "BSD-2-Clause" ]
5
2021-04-02T14:03:45.000Z
2022-02-21T12:54:52.000Z
SigProfilerTopography/source/plotting/TranscriptionReplicationStrandBiasFigures.py
AlexandrovLab/SigProfilerTopography
34c7cf24392bc77953370038a520ffc8d0bdee50
[ "BSD-2-Clause" ]
null
null
null
SigProfilerTopography/source/plotting/TranscriptionReplicationStrandBiasFigures.py
AlexandrovLab/SigProfilerTopography
34c7cf24392bc77953370038a520ffc8d0bdee50
[ "BSD-2-Clause" ]
1
2022-01-22T06:27:49.000Z
2022-01-22T06:27:49.000Z
# This source code file is a part of SigProfilerTopography # SigProfilerTopography is a tool included as part of the SigProfiler # computational framework for comprehensive analysis of mutational # signatures from next-generation sequencing of cancer genomes. # SigProfilerTopography provides the downstream data analysi...
64.015283
398
0.615946
import os import numpy as np import statsmodels.stats.multitest from matplotlib import pyplot as plt from matplotlib.lines import Line2D from matplotlib import gridspec import pandas as pd from SigProfilerTopography.source.commons.TopographyCommons import natural_key from SigProfilerTopography.source.commons.Topo...
true
true
1c4a0071eef9fbd124ada34ed39dfb7abd9d10cb
5,376
py
Python
models/face_parsing/modules/bn.py
soumik12345/Barbershop
971be31afca55499287e97a7034a59a66b871ba8
[ "MIT" ]
null
null
null
models/face_parsing/modules/bn.py
soumik12345/Barbershop
971be31afca55499287e97a7034a59a66b871ba8
[ "MIT" ]
2
2022-03-30T17:49:03.000Z
2022-03-30T19:20:28.000Z
models/face_parsing/modules/bn.py
soumik12345/Barbershop
971be31afca55499287e97a7034a59a66b871ba8
[ "MIT" ]
null
null
null
import torch import torch.nn as nn import torch.nn.functional as functional try: from queue import Queue except ImportError: from Queue import Queue from .functions import * class ABN(nn.Module): """Activated Batch Normalization This gathers a `BatchNorm2d` and an activation function in a single mo...
30.03352
116
0.570499
import torch import torch.nn as nn import torch.nn.functional as functional try: from queue import Queue except ImportError: from Queue import Queue from .functions import * class ABN(nn.Module): def __init__( self, num_features, eps=1e-5, momentum=0.1, affine=Tr...
true
true
1c4a00a6ef4dd2fe7cdd0c9ca505b8fd1ccc0977
14,574
py
Python
QEBATangentAttack/utils.py
machanic/TangentAttack
17c1a8e93f9bbd03e209e8650631af744a0ff6b8
[ "Apache-2.0" ]
4
2021-11-12T04:06:32.000Z
2022-01-27T09:01:41.000Z
QEBATangentAttack/utils.py
machanic/TangentAttack
17c1a8e93f9bbd03e209e8650631af744a0ff6b8
[ "Apache-2.0" ]
1
2022-02-22T14:00:59.000Z
2022-02-25T08:57:29.000Z
QEBATangentAttack/utils.py
machanic/TangentAttack
17c1a8e93f9bbd03e209e8650631af744a0ff6b8
[ "Apache-2.0" ]
null
null
null
""" Provides classes to measure the distance between inputs. Distances --------- .. autosummary:: :nosignatures: MeanSquaredDistance MeanAbsoluteDistance Linfinity L0 Aliases ------- .. autosummary:: :nosignatures: MSE MAE Linf Base class ---------- To implement a new distance, simply...
25.97861
93
0.645327
from __future__ import division import sys import abc import torch abstractmethod = abc.abstractmethod if sys.version_info >= (3, 4): ABC = abc.ABC else: ABC = abc.ABCMeta('ABC', (), {}) import functools from numbers import Number from torch.nn import functional as F import numpy as np @functools.total_o...
true
true
1c4a01f57bcc1a7f20369f01c8316e7174a4aa93
2,789
py
Python
src/data_upload/batch.py
yourtrading-ai/py_yourtrading_ai
b69424f2afc40fe258c7ddae2fb47acc383ecbe5
[ "MIT" ]
null
null
null
src/data_upload/batch.py
yourtrading-ai/py_yourtrading_ai
b69424f2afc40fe258c7ddae2fb47acc383ecbe5
[ "MIT" ]
null
null
null
src/data_upload/batch.py
yourtrading-ai/py_yourtrading_ai
b69424f2afc40fe258c7ddae2fb47acc383ecbe5
[ "MIT" ]
null
null
null
import asyncio import io import ssl import aiohttp import aleph_client.asynchronous import certifi import pandas as pd from data_upload.data_utils import clean_time_duplicates def get_download_url(symbol, interval="hourly"): if interval == "daily": interval = "d" elif interval == "hourly": i...
39.842857
113
0.627106
import asyncio import io import ssl import aiohttp import aleph_client.asynchronous import certifi import pandas as pd from data_upload.data_utils import clean_time_duplicates def get_download_url(symbol, interval="hourly"): if interval == "daily": interval = "d" elif interval == "hourly": i...
true
true
1c4a02071d1bd4dc5a2bf4caa5a4ce0f0c07ce3f
3,426
py
Python
ansible/venv/lib/python2.7/site-packages/ansible/module_utils/facts/virtual/sysctl.py
gvashchenkolineate/gvashchenkolineate_infra_trytravis
0fb18850afe0d8609693ba4b23f29c7cda17d97f
[ "MIT" ]
17
2017-06-07T23:15:01.000Z
2021-08-30T14:32:36.000Z
ansible/venv/lib/python2.7/site-packages/ansible/module_utils/facts/virtual/sysctl.py
gvashchenkolineate/gvashchenkolineate_infra_trytravis
0fb18850afe0d8609693ba4b23f29c7cda17d97f
[ "MIT" ]
9
2017-06-25T03:31:52.000Z
2021-05-17T23:43:12.000Z
ansible/venv/lib/python2.7/site-packages/ansible/module_utils/facts/virtual/sysctl.py
gvashchenkolineate/gvashchenkolineate_infra_trytravis
0fb18850afe0d8609693ba4b23f29c7cda17d97f
[ "MIT" ]
3
2018-05-26T21:31:22.000Z
2019-09-28T17:00:45.000Z
# 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 # (at your option) any later version. # # Ansible is distributed in the hope that ...
47.583333
88
0.620257
from __future__ import (absolute_import, division, print_function) __metaclass__ = type import re class VirtualSysctlDetectionMixin(object): def detect_sysctl(self): self.sysctl_path = self.module.get_bin_path('sysctl') def detect_virt_product(self, key): virtual_product_facts = {} ...
true
true
1c4a02c8305edf5419beb0b9ec01a9f4757b6f61
728
py
Python
app/test/test4.py
saint816/fishbook
80a4b563a05086c85eb347286d28bb0e6258ff1c
[ "MIT" ]
null
null
null
app/test/test4.py
saint816/fishbook
80a4b563a05086c85eb347286d28bb0e6258ff1c
[ "MIT" ]
null
null
null
app/test/test4.py
saint816/fishbook
80a4b563a05086c85eb347286d28bb0e6258ff1c
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ ------------------------------------------------- File Name: test4 Description : LocalStack线程隔离特性 Author : pengsheng date: 2019-04-21 ------------------------------------------------- """ import threading import time from werkzeug.local import LocalStack my...
23.483871
67
0.582418
import threading import time from werkzeug.local import LocalStack my_stack = LocalStack() my_stack.push(1) print('main after push: ' + str(my_stack.top)) def worker(): print('child thread before push: ' + str(my_stack.top)) my_stack.push(2) print('child thread after push: ' + str(my_stack.top)) child...
true
true
1c4a03d70ff26f631a6d41a2c5e4ca7dcb12136c
3,778
py
Python
generate_cloth_img.py
otsubo/CIFAR-ConvolutionalAutoEncoder-Chainer
bbda81dc7b52f42e07e9daaff38ce7453b24e008
[ "MIT" ]
null
null
null
generate_cloth_img.py
otsubo/CIFAR-ConvolutionalAutoEncoder-Chainer
bbda81dc7b52f42e07e9daaff38ce7453b24e008
[ "MIT" ]
null
null
null
generate_cloth_img.py
otsubo/CIFAR-ConvolutionalAutoEncoder-Chainer
bbda81dc7b52f42e07e9daaff38ce7453b24e008
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Sat Jul 21 08:51:18 2018 @author: user """ import argparse import os import os.path as osp import numpy as np import matplotlib.pyplot as plt from tqdm import tqdm import chainer from chainer import cuda from chainer.datasets import get_cifar10 from chainer import dataset fro...
28.839695
83
0.588936
import argparse import os import os.path as osp import numpy as np import matplotlib.pyplot as plt from tqdm import tqdm import chainer from chainer import cuda from chainer.datasets import get_cifar10 from chainer import dataset from chainer import Variable from chainer import serializers import chainer.functions ...
true
true
1c4a0522b17523bfaff0ea4d0aee5f56a95b355e
496
py
Python
bookmarks/models.py
justinborek/djorg
f6aa9cb23f0476c032ac5250045879962cc11072
[ "MIT" ]
null
null
null
bookmarks/models.py
justinborek/djorg
f6aa9cb23f0476c032ac5250045879962cc11072
[ "MIT" ]
null
null
null
bookmarks/models.py
justinborek/djorg
f6aa9cb23f0476c032ac5250045879962cc11072
[ "MIT" ]
null
null
null
from uuid import uuid4 from datetime import datetime from django.db import models class Bookmark(models.Model): id = models.UUIDField(primary_key=True, default=uuid4, editable=False) url = models.URLField('URL', unique=True) name = models.CharField(max_length=200) notes = models.TextField(blank=True) ...
33.066667
74
0.743952
from uuid import uuid4 from datetime import datetime from django.db import models class Bookmark(models.Model): id = models.UUIDField(primary_key=True, default=uuid4, editable=False) url = models.URLField('URL', unique=True) name = models.CharField(max_length=200) notes = models.TextField(blank=True) ...
true
true
1c4a0541e9c6f3dabd3305439a3287d532a147dd
1,361
py
Python
app/core/tests/test_admin.py
kim-sun/recipe-app-api
c0c598f2188c42c820178ea7910c34ccdf641393
[ "MIT" ]
null
null
null
app/core/tests/test_admin.py
kim-sun/recipe-app-api
c0c598f2188c42c820178ea7910c34ccdf641393
[ "MIT" ]
null
null
null
app/core/tests/test_admin.py
kim-sun/recipe-app-api
c0c598f2188c42c820178ea7910c34ccdf641393
[ "MIT" ]
null
null
null
from django.test import TestCase, Client from django.contrib.auth import get_user_model from django.urls import reverse class AdminSiteTests(TestCase): def setUp(self): self.client = Client() self.admin_user = get_user_model().objects.create_superuser( email='admin@gmail.com', ...
31.651163
68
0.635562
from django.test import TestCase, Client from django.contrib.auth import get_user_model from django.urls import reverse class AdminSiteTests(TestCase): def setUp(self): self.client = Client() self.admin_user = get_user_model().objects.create_superuser( email='admin@gmail.com', ...
true
true
1c4a0676208607006d811b2a23a60b460dd13518
2,403
py
Python
tests/api_tests/abstrac_api_test.py
kirillskor/dedoc
7793a1be2220a26e7520521306351dfc0a9c8d98
[ "Apache-2.0" ]
null
null
null
tests/api_tests/abstrac_api_test.py
kirillskor/dedoc
7793a1be2220a26e7520521306351dfc0a9c8d98
[ "Apache-2.0" ]
null
null
null
tests/api_tests/abstrac_api_test.py
kirillskor/dedoc
7793a1be2220a26e7520521306351dfc0a9c8d98
[ "Apache-2.0" ]
null
null
null
import json import os import requests import unittest class AbstractTestApiDocReader(unittest.TestCase): data_directory_path = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "data")) def _check_metainfo(self, metainfo, actual_type: str, actual_name: str): self.assertEqual(metainfo['fi...
34.826087
113
0.62422
import json import os import requests import unittest class AbstractTestApiDocReader(unittest.TestCase): data_directory_path = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "data")) def _check_metainfo(self, metainfo, actual_type: str, actual_name: str): self.assertEqual(metainfo['fi...
true
true
1c4a074100935fa59bbb9f0995aad8db11245ba3
6,180
py
Python
mne/io/array/tests/test_array.py
fmamashli/mne-python
52f064415e7c9fa8fe243d22108dcdf3d86505b9
[ "BSD-3-Clause" ]
1
2019-12-11T05:07:08.000Z
2019-12-11T05:07:08.000Z
mne/io/array/tests/test_array.py
fmamashli/mne-python
52f064415e7c9fa8fe243d22108dcdf3d86505b9
[ "BSD-3-Clause" ]
23
2017-09-12T11:08:26.000Z
2019-10-04T11:11:29.000Z
mne/io/array/tests/test_array.py
fmamashli/mne-python
52f064415e7c9fa8fe243d22108dcdf3d86505b9
[ "BSD-3-Clause" ]
3
2019-01-28T13:48:00.000Z
2019-07-10T16:02:11.000Z
# Author: Eric Larson <larson.eric.d@gmail.com> # # License: BSD (3-clause) import os.path as op import numpy as np from numpy.testing import (assert_array_almost_equal, assert_allclose, assert_equal) import pytest import matplotlib.pyplot as plt from mne import find_events, Epochs, pick_t...
34.719101
79
0.637379
import os.path as op import numpy as np from numpy.testing import (assert_array_almost_equal, assert_allclose, assert_equal) import pytest import matplotlib.pyplot as plt from mne import find_events, Epochs, pick_types from mne.io import read_raw_fif from mne.io.array import RawArray from ...
true
true
1c4a0802008b790d1c97611c1cf3739497f6082d
1,992
py
Python
scraping/norcleanser1.py
Asyikin98/SkinFerm
72fd1ad6339c96adf5ec154bde566de9eb1472c3
[ "MIT" ]
null
null
null
scraping/norcleanser1.py
Asyikin98/SkinFerm
72fd1ad6339c96adf5ec154bde566de9eb1472c3
[ "MIT" ]
2
2021-02-03T01:55:13.000Z
2021-04-30T12:46:33.000Z
scraping/norcleanser1.py
Asyikin98/SkinFerm
72fd1ad6339c96adf5ec154bde566de9eb1472c3
[ "MIT" ]
null
null
null
import urllib.request import random from bs4 import BeautifulSoup from requests import get import mysql.connector conn = mysql.connector.connect(user="root", passwd="",host="localhost", database="product") cursor = conn.cursor() sql = """INSERT INTO norcleanser (image, name, price, rating) VALUES (%s, %s, %s, %s)"""...
43.304348
370
0.681727
import urllib.request import random from bs4 import BeautifulSoup from requests import get import mysql.connector conn = mysql.connector.connect(user="root", passwd="",host="localhost", database="product") cursor = conn.cursor() sql = """INSERT INTO norcleanser (image, name, price, rating) VALUES (%s, %s, %s, %s)"""...
true
true
1c4a085e1b8dce8dacaca64ca275241b95642545
396
py
Python
Easy/1475 Final Prices With a Special Discount in a Shop.py
raj713335/LeetCode
e60e145d90f45d37e148e8307a3d97f5f0741de0
[ "Apache-2.0" ]
null
null
null
Easy/1475 Final Prices With a Special Discount in a Shop.py
raj713335/LeetCode
e60e145d90f45d37e148e8307a3d97f5f0741de0
[ "Apache-2.0" ]
null
null
null
Easy/1475 Final Prices With a Special Discount in a Shop.py
raj713335/LeetCode
e60e145d90f45d37e148e8307a3d97f5f0741de0
[ "Apache-2.0" ]
null
null
null
# https://leetcode.com/problems/final-prices-with-a-special-discount-in-a-shop/ class Solution: def finalPrices(self, prices: List[int]) -> List[int]: for i in range(0, len(prices)-1): for j in range(i+1, len(prices)): if prices[i] >= prices[j]: pric...
30.461538
79
0.515152
class Solution: def finalPrices(self, prices: List[int]) -> List[int]: for i in range(0, len(prices)-1): for j in range(i+1, len(prices)): if prices[i] >= prices[j]: prices[i] -= prices[j] break return prices
true
true
1c4a08af26630f0f1eb8dd09eb2a7c42527d7a98
994
py
Python
azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/apply_artifacts_request.py
SUSE/azure-sdk-for-python
324f99d26dd6f4ee9793b9bf1d4d5f928e4b6c2f
[ "MIT" ]
2
2020-07-29T14:22:17.000Z
2020-11-06T18:47:40.000Z
azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/apply_artifacts_request.py
SUSE/azure-sdk-for-python
324f99d26dd6f4ee9793b9bf1d4d5f928e4b6c2f
[ "MIT" ]
1
2016-08-01T07:37:04.000Z
2016-08-01T07:37:04.000Z
azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/apply_artifacts_request.py
SUSE/azure-sdk-for-python
324f99d26dd6f4ee9793b9bf1d4d5f928e4b6c2f
[ "MIT" ]
1
2020-12-12T21:04:41.000Z
2020-12-12T21:04:41.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 ...
34.275862
81
0.615694
from msrest.serialization import Model class ApplyArtifactsRequest(Model): _attribute_map = { 'artifacts': {'key': 'artifacts', 'type': '[ArtifactInstallProperties]'}, } def __init__(self, artifacts=None): self.artifacts = artifacts
true
true
1c4a08b855151a6840c0b86aa222ceed3a904014
4,712
py
Python
SVS/model/archive/preprocessing/ch_asr/local/data_prep.py
Kirinel/SVS_system
261b80d69578bc3c407bc927750d64858c42a24c
[ "Apache-2.0" ]
null
null
null
SVS/model/archive/preprocessing/ch_asr/local/data_prep.py
Kirinel/SVS_system
261b80d69578bc3c407bc927750d64858c42a24c
[ "Apache-2.0" ]
null
null
null
SVS/model/archive/preprocessing/ch_asr/local/data_prep.py
Kirinel/SVS_system
261b80d69578bc3c407bc927750d64858c42a24c
[ "Apache-2.0" ]
null
null
null
"""Copyright [2020] [Jiatong Shi & Shuai Guo]. 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 writ...
26.772727
79
0.503608
import argparse import os import re def add_zero(number, size): out = str(number) for i in range(size - len(out)): out = "0" + out return out single_pron = [ "a", "ai", "ao", "an", "ang", "o", "ou", "ong", "e", "ei", "er", "en", "eng", ] doubl...
true
true
1c4a0a16894c5126858c0aa112f30b01f145fbcf
4,964
py
Python
src/tstoolbox/functions/expanding_window.py
timcera/tstoolbox
a32fa399d96082f01b7eedfd6c8893bdb881845c
[ "BSD-3-Clause" ]
5
2016-10-13T18:06:41.000Z
2021-06-29T19:47:36.000Z
src/tstoolbox/functions/expanding_window.py
timcera/tstoolbox
a32fa399d96082f01b7eedfd6c8893bdb881845c
[ "BSD-3-Clause" ]
21
2016-04-28T16:48:03.000Z
2021-12-16T18:07:07.000Z
src/tstoolbox/functions/expanding_window.py
timcera/tstoolbox
a32fa399d96082f01b7eedfd6c8893bdb881845c
[ "BSD-3-Clause" ]
3
2018-03-21T21:07:52.000Z
2021-01-22T20:07:49.000Z
# -*- coding: utf-8 -*- """Collection of functions for the manipulation of time series.""" from __future__ import absolute_import, division, print_function from typing import List, Optional import mando import pandas as pd import typic from mando.rst_text_formatter import RSTHelpFormatter from .. import tsutils tr...
24.453202
85
0.471394
from __future__ import absolute_import, division, print_function from typing import List, Optional import mando import pandas as pd import typic from mando.rst_text_formatter import RSTHelpFormatter from .. import tsutils try: from typing import Literal except ImportError: from typing_extensions import Lit...
true
true
1c4a0c8f83c03c4ee8d31d036c9293db10cf3d62
1,215
bzl
Python
deps.bzl
abrisco/cargo-bazel
1bb0b7f295e89441b5b7e90898c8b9abdab38402
[ "MIT" ]
4
2021-11-08T14:53:23.000Z
2022-02-25T03:32:32.000Z
deps.bzl
abrisco/cargo-bazel
1bb0b7f295e89441b5b7e90898c8b9abdab38402
[ "MIT" ]
23
2021-10-13T18:53:05.000Z
2022-03-07T00:57:25.000Z
deps.bzl
abrisco/cargo-bazel
1bb0b7f295e89441b5b7e90898c8b9abdab38402
[ "MIT" ]
1
2021-12-09T17:11:39.000Z
2021-12-09T17:11:39.000Z
"""Dependencies required by the `cargo-bazel` rules""" load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") load("//3rdparty:third_party_deps.bzl", "third_party_deps") load("//private:vendor_utils.bzl", "crates_vendor_deps") def cargo_baze...
36.818182
126
0.681481
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") load("//3rdparty:third_party_deps.bzl", "third_party_deps") load("//private:vendor_utils.bzl", "crates_vendor_deps") def cargo_bazel_deps(): maybe( http_archive, name...
true
true
1c4a0cbe390bf014cfe06f318b4c150143ca2c65
8,847
py
Python
ezblog/blog/views.py
zeropol2/ezblog
a43d231d454b32be35f5811a6ca63d17d654f59d
[ "Apache-2.0" ]
4
2016-08-04T04:30:53.000Z
2016-08-31T08:51:30.000Z
ezblog/blog/views.py
zeropol2/ezblog
a43d231d454b32be35f5811a6ca63d17d654f59d
[ "Apache-2.0" ]
null
null
null
ezblog/blog/views.py
zeropol2/ezblog
a43d231d454b32be35f5811a6ca63d17d654f59d
[ "Apache-2.0" ]
null
null
null
from django.contrib.auth.decorators import login_required from django.core.paginator import Paginator, PageNotAnInteger, EmptyPage from django.core.urlresolvers import reverse from django.db.models import Q from django.http import Http404, HttpResponse from django.shortcuts import render, redirect, get_object_or_404 f...
27.646875
111
0.61648
from django.contrib.auth.decorators import login_required from django.core.paginator import Paginator, PageNotAnInteger, EmptyPage from django.core.urlresolvers import reverse from django.db.models import Q from django.http import Http404, HttpResponse from django.shortcuts import render, redirect, get_object_or_404 f...
true
true
1c4a0cde0a499635d87048fe9f94b9177b5680fc
5,529
py
Python
cms/utils/i18n.py
360youlun/django-cms
bc1240fd46de4c04f3b5402be99a81728a4a324c
[ "BSD-3-Clause" ]
1
2019-04-15T10:28:46.000Z
2019-04-15T10:28:46.000Z
cms/utils/i18n.py
damianmoore/django-cms
2d3e10a01e792ec7da5c1418811c1be5ac84e5e2
[ "BSD-3-Clause" ]
5
2021-03-19T15:39:27.000Z
2021-09-08T02:47:21.000Z
cms/utils/i18n.py
Acidburn0zzz/django-cms
5a105a1c75eeb4c8a4c1c34301d93855e6724407
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from contextlib import contextmanager from django.core.urlresolvers import get_resolver, LocaleRegexURLResolver from django.conf import settings from django.utils import translation from django.utils.translation import ugettext_lazy as _ from cms.exceptions import LanguageError from cms.utils....
28.647668
121
0.691988
from contextlib import contextmanager from django.core.urlresolvers import get_resolver, LocaleRegexURLResolver from django.conf import settings from django.utils import translation from django.utils.translation import ugettext_lazy as _ from cms.exceptions import LanguageError from cms.utils.conf import get_cms_sett...
true
true
1c4a0d26b1b1f83eea8c7a0005822c6d1ced6f53
36,374
py
Python
adafruit_minimqtt/adafruit_minimqtt.py
Eason010212/Adafruit_CircuitPython_MiniMQTT
eccc36f41c973c3155bd633716670e1925d51bae
[ "MIT", "Unlicense" ]
null
null
null
adafruit_minimqtt/adafruit_minimqtt.py
Eason010212/Adafruit_CircuitPython_MiniMQTT
eccc36f41c973c3155bd633716670e1925d51bae
[ "MIT", "Unlicense" ]
null
null
null
adafruit_minimqtt/adafruit_minimqtt.py
Eason010212/Adafruit_CircuitPython_MiniMQTT
eccc36f41c973c3155bd633716670e1925d51bae
[ "MIT", "Unlicense" ]
null
null
null
# SPDX-FileCopyrightText: 2019-2021 Brent Rubell for Adafruit Industries # # SPDX-License-Identifier: MIT # Original Work Copyright (c) 2016 Paul Sokolovsky, uMQTT # Modified Work Copyright (c) 2019 Bradley Beach, esp32spi_mqtt # Modified Work Copyright (c) 2012-2019 Roger Light and others, Paho MQTT Python """ `adaf...
37.38335
108
0.583274
import errno import struct import time from random import randint from micropython import const from .matcher import MQTTMatcher __version__ = "0.0.0-auto.0" __repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_MiniMQTT.git" MQTT_MSG_MAX_SZ = const(268435455) MQTT_MSG_SZ_LIM = const(10000000) MQTT_TOPIC_L...
true
true
1c4a0fbb4cfee7ec85a999391bf78a422dea764f
1,513
py
Python
get_image_from_video.py
matiji66/face-card-machine
bb466a4e06815869ff801ae50f044bf29e53f20d
[ "Apache-2.0" ]
39
2018-09-29T02:57:09.000Z
2021-04-12T13:45:21.000Z
get_image_from_video.py
a543713743/face-attendance-machine
bb466a4e06815869ff801ae50f044bf29e53f20d
[ "Apache-2.0" ]
2
2019-03-26T13:50:29.000Z
2021-03-23T09:49:43.000Z
get_image_from_video.py
a543713743/face-attendance-machine
bb466a4e06815869ff801ae50f044bf29e53f20d
[ "Apache-2.0" ]
20
2018-06-27T13:55:12.000Z
2022-03-26T15:08:01.000Z
import cv2 # This is a demo of running face recognition on a video file and saving the results to a new video file. # # PLEASE NOTE: This example requires OpenCV (the `cv2` library) to be installed only to read from your webcam. # OpenCV is *not* required to use the face_recognition library. It's only required if you ...
38.794872
110
0.702578
import cv2 # specific demo. If you have trouble installing it, try any of the other demos that don't require it instead. import os files = [path for path in os.listdir("./videos") if os.path.isfile(path) and path.endswith(".avi")] frame_number = 0 for avi in files: input_movie = cv2.VideoCapture(avi) leng...
true
true
1c4a0fd0c26a592c12df47d7e444bcfc3897cded
37,709
py
Python
sympy/functions/combinatorial/factorials.py
jainachal03/sympy
7dbc2f49370b31ac6960524ea7e5444e2e5a50d5
[ "BSD-3-Clause" ]
1
2018-11-20T11:40:30.000Z
2018-11-20T11:40:30.000Z
sympy/functions/combinatorial/factorials.py
jainachal03/sympy
7dbc2f49370b31ac6960524ea7e5444e2e5a50d5
[ "BSD-3-Clause" ]
14
2018-02-08T10:11:03.000Z
2019-04-16T10:32:46.000Z
sympy/functions/combinatorial/factorials.py
jainachal03/sympy
7dbc2f49370b31ac6960524ea7e5444e2e5a50d5
[ "BSD-3-Clause" ]
1
2020-09-09T20:41:34.000Z
2020-09-09T20:41:34.000Z
from typing import List from functools import reduce from sympy.core import S, sympify, Dummy, Mod from sympy.core.cache import cacheit from sympy.core.function import Function, ArgumentIndexError, PoleError from sympy.core.logic import fuzzy_and from sympy.core.numbers import Integer, pi, I from sympy.core.relational...
33.972072
106
0.497971
from typing import List from functools import reduce from sympy.core import S, sympify, Dummy, Mod from sympy.core.cache import cacheit from sympy.core.function import Function, ArgumentIndexError, PoleError from sympy.core.logic import fuzzy_and from sympy.core.numbers import Integer, pi, I from sympy.core.relational...
true
true
1c4a104cf5b6c4c66a2d343c800f0bc19b3712c1
1,120
py
Python
src/infi/pyutils/misc.py
jasonjorge/infi.asi
78a4c34a421102f99b959a659cf7303804627d9b
[ "BSD-3-Clause" ]
1
2022-02-12T20:30:55.000Z
2022-02-12T20:30:55.000Z
src/infi/pyutils/misc.py
jasonjorge/infi.asi
78a4c34a421102f99b959a659cf7303804627d9b
[ "BSD-3-Clause" ]
5
2015-11-08T14:50:42.000Z
2020-06-23T14:42:33.000Z
src/infi/pyutils/misc.py
jasonjorge/infi.asi
78a4c34a421102f99b959a659cf7303804627d9b
[ "BSD-3-Clause" ]
4
2015-02-22T09:06:59.000Z
2022-02-12T20:30:55.000Z
_NOTHING = object() def recursive_getattr(obj, attr, default=_NOTHING): for subattr in attr.split("."): obj = getattr(obj, subattr, _NOTHING) if obj is _NOTHING: if default is not _NOTHING: return default raise AttributeError(attr) return obj class Repri...
32.941176
62
0.621429
_NOTHING = object() def recursive_getattr(obj, attr, default=_NOTHING): for subattr in attr.split("."): obj = getattr(obj, subattr, _NOTHING) if obj is _NOTHING: if default is not _NOTHING: return default raise AttributeError(attr) return obj class Repri...
true
true
1c4a10aa8c31765be89abb6d09a8c8e18a6945b0
5,744
py
Python
qiskit/test/decorators.py
EnriqueL8/qiskit-terra
08b801f1f8598c4e44680b4a75c232ed92db0262
[ "Apache-2.0" ]
2
2019-06-28T19:58:42.000Z
2019-07-26T05:04:02.000Z
qiskit/test/decorators.py
EnriqueL8/qiskit-terra
08b801f1f8598c4e44680b4a75c232ed92db0262
[ "Apache-2.0" ]
null
null
null
qiskit/test/decorators.py
EnriqueL8/qiskit-terra
08b801f1f8598c4e44680b4a75c232ed92db0262
[ "Apache-2.0" ]
1
2020-01-24T21:01:06.000Z
2020-01-24T21:01:06.000Z
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2017, 2018. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any...
31.56044
82
0.657556
import functools import os import sys import unittest from warnings import warn from qiskit.util import _has_connection from .testing_options import get_test_options HAS_NET_CONNECTION = None def is_aer_provider_available(): if sys.platform == 'darwin': return False try: import qiskit...
true
true
1c4a1166d51808988f81418c99b6254b81daae63
4,071
py
Python
alipay/aop/api/request/KoubeiServindustryPortfolioDataCreateRequest.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/request/KoubeiServindustryPortfolioDataCreateRequest.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/request/KoubeiServindustryPortfolioDataCreateRequest.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import simplejson as json from alipay.aop.api.FileItem import FileItem from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.KoubeiServindustryPortfolioDataCreateModel import KoubeiServindustryPortfolioDataCreateModel class KoubeiServindustryP...
28.075862
166
0.651437
import simplejson as json from alipay.aop.api.FileItem import FileItem from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.KoubeiServindustryPortfolioDataCreateModel import KoubeiServindustryPortfolioDataCreateModel class KoubeiServindustryPortfolioDataCreateRequest(object): def __...
true
true
1c4a11f4340a879dad3ddc6e9c05271e621cc0f4
4,416
py
Python
scripts/table4_run.py
nataliepopescu/osdi21-artifact
6a268c90a8ce449256b5c290caeb7e0e3b9d7e5c
[ "MIT" ]
null
null
null
scripts/table4_run.py
nataliepopescu/osdi21-artifact
6a268c90a8ce449256b5c290caeb7e0e3b9d7e5c
[ "MIT" ]
null
null
null
scripts/table4_run.py
nataliepopescu/osdi21-artifact
6a268c90a8ce449256b5c290caeb7e0e3b9d7e5c
[ "MIT" ]
null
null
null
import os import subprocess import re import time from numpy import average from ExpStats import runExpWithName ROOT_PATH = os.path.dirname(os.path.realpath(__file__)) def parseThroughput(out): try: m = re.search(r'Requests/sec: ([0-9,.]+)', out) # m = re.search(r'([0-9,]+) ns/iter', out) ...
35.328
118
0.64538
import os import subprocess import re import time from numpy import average from ExpStats import runExpWithName ROOT_PATH = os.path.dirname(os.path.realpath(__file__)) def parseThroughput(out): try: m = re.search(r'Requests/sec: ([0-9,.]+)', out) s = m.group(1) result = float(s.s...
true
true
1c4a1240142afa6606892ba452cdab5d9517361e
396
py
Python
apps/goods/migrations/0013_auto_20181010_1629.py
lianxiaopang/camel-store-api
b8021250bf3d8cf7adc566deebdba55225148316
[ "Apache-2.0" ]
12
2020-02-01T01:52:01.000Z
2021-04-28T15:06:43.000Z
apps/goods/migrations/0013_auto_20181010_1629.py
lianxiaopang/camel-store-api
b8021250bf3d8cf7adc566deebdba55225148316
[ "Apache-2.0" ]
5
2020-02-06T08:07:58.000Z
2020-06-02T13:03:45.000Z
apps/goods/migrations/0013_auto_20181010_1629.py
lianxiaopang/camel-store-api
b8021250bf3d8cf7adc566deebdba55225148316
[ "Apache-2.0" ]
11
2020-02-03T13:07:46.000Z
2020-11-29T01:44:06.000Z
# Generated by Django 2.1.2 on 2018-10-10 08:29 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('goods', '0012_auto_20181010_1558'), ] operations = [ migrations.AlterModelOptions( name='goods', options={'ordering': ('stat...
22
97
0.598485
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('goods', '0012_auto_20181010_1558'), ] operations = [ migrations.AlterModelOptions( name='goods', options={'ordering': ('status',), 'verbose_name': '商品', 'verbose_name_plura...
true
true
1c4a12fad6dad46559aac33e6d98b82995bb2863
4,099
py
Python
src/one_stack.py
noemiefedon/RELAY
1bf9c27ee1bcf1be0a7652fcca0ea38dd47b14b8
[ "MIT" ]
1
2020-12-07T22:18:22.000Z
2020-12-07T22:18:22.000Z
src/one_stack.py
noemiefedon/RELAY
1bf9c27ee1bcf1be0a7652fcca0ea38dd47b14b8
[ "MIT" ]
null
null
null
src/one_stack.py
noemiefedon/RELAY
1bf9c27ee1bcf1be0a7652fcca0ea38dd47b14b8
[ "MIT" ]
1
2021-12-02T22:19:02.000Z
2021-12-02T22:19:02.000Z
# -*- coding: utf-8 -*- """ Functions to check a design manufacturability - check_ss_manufacturability checks the manufacturability of a stacking sequence list """ __version__ = '1.0' __author__ = 'Noemie Fedon' import sys import numpy as np sys.path.append(r'C:\RELAY') from src.contiguity import is_contig from s...
42.257732
1,024
0.56648
__version__ = '1.0' __author__ = 'Noemie Fedon' import sys import numpy as np sys.path.append(r'C:\RELAY') from src.contiguity import is_contig from src.disorientation import is_diso_ss from src.balance import is_balanced from src.dam_tol import is_dam_tol from src.ten_percent_rule import is_ten_percent_rule from src....
true
true
1c4a1315d41ea7313fba33ea72615b897facc135
2,937
py
Python
bayesian/__init__.py
prashbnair/fabric8-analytics-server
af1f71018b82ebafae7701a443412eed34de5a15
[ "Apache-2.0" ]
null
null
null
bayesian/__init__.py
prashbnair/fabric8-analytics-server
af1f71018b82ebafae7701a443412eed34de5a15
[ "Apache-2.0" ]
null
null
null
bayesian/__init__.py
prashbnair/fabric8-analytics-server
af1f71018b82ebafae7701a443412eed34de5a15
[ "Apache-2.0" ]
null
null
null
"""Module with the declaration of web application and its basic endpoints.""" import logging import os from f8a_worker.setup_celery import init_selinon from flask import Flask from flask import g from flask import redirect from flask import url_for from flask_appconfig import AppConfig from flask_cache import Cache f...
31.244681
96
0.712632
import logging import os from f8a_worker.setup_celery import init_selinon from flask import Flask from flask import g from flask import redirect from flask import url_for from flask_appconfig import AppConfig from flask_cache import Cache from flask_sqlalchemy import SQLAlchemy from raven.contrib.flask import Sentry ...
true
true
1c4a13f112efc10a3c692c96f72757500976a370
688
py
Python
leetcode/122/122.best-time-to-buy-and-sell-stock-ii.py
Yu-Ren-NEU/Leetcode
e82bc2734680606f676fe867dbcb9b9e71635bf5
[ "MIT" ]
1
2020-01-06T06:54:22.000Z
2020-01-06T06:54:22.000Z
leetcode/122/122.best-time-to-buy-and-sell-stock-ii.py
Yu-Ren-NEU/Leetcode
e82bc2734680606f676fe867dbcb9b9e71635bf5
[ "MIT" ]
1
2020-01-07T02:22:06.000Z
2020-01-07T02:22:06.000Z
leetcode/122/122.best-time-to-buy-and-sell-stock-ii.py
Yu-Ren-NEU/Leetcode
e82bc2734680606f676fe867dbcb9b9e71635bf5
[ "MIT" ]
2
2020-01-06T20:04:04.000Z
2020-01-10T08:24:01.000Z
# # @lc app=leetcode id=122 lang=python3 # # [122] Best Time to Buy and Sell Stock II # # @lc code=start class Solution: def maxProfit(self, prices: []) -> int: # 我们将数值画到x-y坐标系里 # 其实要求的就是单调上升的曲线, 找到相应的波峰 if not prices or len(prices) == 1: return 0 result = 0 ...
20.848485
50
0.52907
class Solution: def maxProfit(self, prices: []) -> int: if not prices or len(prices) == 1: return 0 result = 0 for i in range(1, len(prices)): if prices[i] > prices[i-1]: result += prices[i] - prices[i-1] return res...
true
true
1c4a14c58058bc5cfda3413c3de34fb336ef5ce8
1,418
py
Python
sw/scripts/jlink.py
alvarop/chaac
a86d3c71acf3f87584ba260cbfe207b3a09213ad
[ "MIT" ]
21
2019-01-27T03:15:27.000Z
2021-07-03T06:40:40.000Z
sw/scripts/jlink.py
alvarop/chaac
a86d3c71acf3f87584ba260cbfe207b3a09213ad
[ "MIT" ]
1
2021-07-08T04:46:42.000Z
2021-07-08T04:46:42.000Z
sw/scripts/jlink.py
alvarop/chaac
a86d3c71acf3f87584ba260cbfe207b3a09213ad
[ "MIT" ]
3
2019-02-19T19:57:30.000Z
2020-07-11T11:27:51.000Z
#!/usr/bin/env python import argparse import os import sys import time import tempfile import subprocess JLINK_PATH = "/usr/bin/JLinkExe" parser = argparse.ArgumentParser() parser.add_argument("--dump", action="store_true") parser.add_argument("--erase", action="store_true") parser.add_argument("--device", default=...
25.781818
77
0.665021
import argparse import os import sys import time import tempfile import subprocess JLINK_PATH = "/usr/bin/JLinkExe" parser = argparse.ArgumentParser() parser.add_argument("--dump", action="store_true") parser.add_argument("--erase", action="store_true") parser.add_argument("--device", default="stm32l432kc", help="d...
true
true
1c4a14e406aa1e3b330cf49b14434163e125ec06
78,955
py
Python
futu/quote/open_quote_context.py
postpascal/py-futu-api
cb274d5ab5387dca190b739d161f2bc8eabe073d
[ "Apache-2.0" ]
1
2019-09-01T08:49:46.000Z
2019-09-01T08:49:46.000Z
futu/quote/open_quote_context.py
faruto/py-futu-api
cb274d5ab5387dca190b739d161f2bc8eabe073d
[ "Apache-2.0" ]
null
null
null
futu/quote/open_quote_context.py
faruto/py-futu-api
cb274d5ab5387dca190b739d161f2bc8eabe073d
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Market quote and trade context setting """ import datetime import math from time import sleep import pandas as pd from futu.common.open_context_base import OpenContextBase, ContextStatus from futu.quote.quote_query import * class OpenQuoteContext(OpenContextBase): """行情上下文对象类""" ...
41.841547
184
0.45184
import datetime import math from time import sleep import pandas as pd from futu.common.open_context_base import OpenContextBase, ContextStatus from futu.quote.quote_query import * class OpenQuoteContext(OpenContextBase): def __init__(self, host='127.0.0.1', port=11111): self._ctx_subscribe = {} ...
true
true
1c4a1518d68c3a0ac4df0c03d4e9484fa9bf6c93
4,468
py
Python
autocomplete_light/tests/autocomplete/generic.py
andybak/django-autocomplete-light
19e46261a01a578d73bfae02bf772bc4d81984f9
[ "MIT" ]
null
null
null
autocomplete_light/tests/autocomplete/generic.py
andybak/django-autocomplete-light
19e46261a01a578d73bfae02bf772bc4d81984f9
[ "MIT" ]
null
null
null
autocomplete_light/tests/autocomplete/generic.py
andybak/django-autocomplete-light
19e46261a01a578d73bfae02bf772bc4d81984f9
[ "MIT" ]
null
null
null
from __future__ import unicode_literals from .case import * from django.contrib.contenttypes.models import ContentType from django.contrib.auth.models import Permission from ...example_apps.autocomplete_test_case_app.models import User, Group class AutocompleteGenericMock(autocomplete_light.AutocompleteGenericBase...
30.60274
77
0.456356
from __future__ import unicode_literals from .case import * from django.contrib.contenttypes.models import ContentType from django.contrib.auth.models import Permission from ...example_apps.autocomplete_test_case_app.models import User, Group class AutocompleteGenericMock(autocomplete_light.AutocompleteGenericBase...
true
true
1c4a1587700058c4fc116b57e305bc04604cf101
168
py
Python
cemm/exceptions.py
klaasnicolaas/python-cemm
fa1d9787bdf4d41e1850015e4d9df833d0b97b07
[ "MIT" ]
1
2022-02-20T17:26:02.000Z
2022-02-20T17:26:02.000Z
cemm/exceptions.py
klaasnicolaas/python-cemm
fa1d9787bdf4d41e1850015e4d9df833d0b97b07
[ "MIT" ]
109
2021-10-02T02:55:42.000Z
2022-03-30T04:32:25.000Z
cemm/exceptions.py
klaasnicolaas/python-cemm
fa1d9787bdf4d41e1850015e4d9df833d0b97b07
[ "MIT" ]
null
null
null
"""Exceptions for CEMM.""" class CEMMError(Exception): """General CEMM exception.""" class CEMMConnectionError(CEMMError): """CEMM connection exception."""
16.8
37
0.690476
class CEMMError(Exception): class CEMMConnectionError(CEMMError):
true
true
1c4a15ad041bcfb763454dea5efe21d533781450
2,980
py
Python
tests/unit/test_common.py
HemangChothani/google-resumable-media-python
7dc40de34533e4474240fc831b79cee2baa82c6e
[ "Apache-2.0" ]
1
2019-07-30T14:24:08.000Z
2019-07-30T14:24:08.000Z
tests/unit/test_common.py
HemangChothani/google-resumable-media-python
7dc40de34533e4474240fc831b79cee2baa82c6e
[ "Apache-2.0" ]
3
2019-07-07T17:55:56.000Z
2019-08-05T01:13:27.000Z
tests/unit/test_common.py
HemangChothani/google-resumable-media-python
7dc40de34533e4474240fc831b79cee2baa82c6e
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
37.25
79
0.72349
import mock import pytest from google.resumable_media import common class TestInvalidResponse(object): def test_constructor(self): response = mock.sentinel.response error = common.InvalidResponse( response, 1, u'a', [b'm'], True) assert error.response is response as...
true
true
1c4a160721a6fe7cb7d9b89d16df5a107e587737
1,182
py
Python
ckanext/harvest/logic/auth/__init__.py
alphagov-mirror/ckanext-harvest
be4d134cf2e4d4548c67dc2f61b200948f0f74e0
[ "PostgreSQL" ]
86
2015-01-09T19:21:20.000Z
2022-03-23T07:17:27.000Z
ckanext/harvest/logic/auth/__init__.py
alphagov-mirror/ckanext-harvest
be4d134cf2e4d4548c67dc2f61b200948f0f74e0
[ "PostgreSQL" ]
319
2015-01-13T13:40:08.000Z
2022-03-24T12:13:42.000Z
ckanext/harvest/logic/auth/__init__.py
alphagov-mirror/ckanext-harvest
be4d134cf2e4d4548c67dc2f61b200948f0f74e0
[ "PostgreSQL" ]
154
2015-01-13T21:06:03.000Z
2022-03-15T12:10:57.000Z
from ckan.plugins import toolkit as pt from ckanext.harvest import model as harvest_model def user_is_sysadmin(context): ''' Checks if the user defined in the context is a sysadmin rtype: boolean ''' model = context['model'] user = context['user'] user_obj = model.User.get(user) ...
26.266667
75
0.665821
from ckan.plugins import toolkit as pt from ckanext.harvest import model as harvest_model def user_is_sysadmin(context): model = context['model'] user = context['user'] user_obj = model.User.get(user) if not user_obj: raise pt.Objectpt.ObjectNotFound('User {0} not found').format(user) ret...
true
true
1c4a165fe953944a991af628f8e92d4c59b8d672
1,549
py
Python
ml3d/torch/utils/roipool3d/roipool3d_utils.py
krshrimali/Open3D-ML
e6352ee84d38a4b90c71dd7f376f5570fe849537
[ "MIT" ]
447
2020-10-14T23:16:41.000Z
2021-07-27T06:57:45.000Z
ml3d/torch/utils/roipool3d/roipool3d_utils.py
krshrimali/Open3D-ML
e6352ee84d38a4b90c71dd7f376f5570fe849537
[ "MIT" ]
179
2021-07-27T15:32:33.000Z
2022-03-30T14:32:53.000Z
ml3d/torch/utils/roipool3d/roipool3d_utils.py
krshrimali/Open3D-ML
e6352ee84d38a4b90c71dd7f376f5570fe849537
[ "MIT" ]
92
2021-07-28T13:50:52.000Z
2022-03-30T09:24:33.000Z
import torch import open3d if open3d.core.cuda.device_count() > 0: from open3d.ml.torch.ops import roi_pool import numpy as np def enlarge_box3d(boxes3d, extra_width): """Enlarge 3D box. Args: boxes3d: (N, 7) [x, y, z, h, w, l, ry] extra_width: extra width """ if isinstance(boxes3...
28.163636
78
0.542285
import torch import open3d if open3d.core.cuda.device_count() > 0: from open3d.ml.torch.ops import roi_pool import numpy as np def enlarge_box3d(boxes3d, extra_width): if isinstance(boxes3d, np.ndarray): large_boxes3d = boxes3d.copy() else: large_boxes3d = boxes3d.clone() large_boxes3d...
true
true
1c4a18579c83b46e8f6e2e84863af984b6e3501c
2,335
py
Python
apricotlib/raptorx_secstr.py
malvikasharan/APRICOT
529afadfb99fa8249fa4ecfb07253eab892c7a8e
[ "0BSD" ]
5
2016-05-25T12:30:02.000Z
2021-04-11T14:55:32.000Z
apricotlib/raptorx_secstr.py
malvikasharan/APRICOT
529afadfb99fa8249fa4ecfb07253eab892c7a8e
[ "0BSD" ]
1
2017-05-20T07:19:25.000Z
2018-02-05T22:14:12.000Z
apricotlib/raptorx_secstr.py
malvikasharan/APRICOT
529afadfb99fa8249fa4ecfb07253eab892c7a8e
[ "0BSD" ]
6
2016-05-18T07:08:49.000Z
2021-02-20T14:28:55.000Z
#!/usr/bin/env python # Description = Predict 3 or 8 state secondary structure using RaptorX import os import subprocess class RaptorxSecstrAnalysis(object): def __init__(self, selected_proteins, raptorx_path, fasta_path, outpath): self._selected_proteins = selected_proteins self...
40.258621
78
0.568737
import os import subprocess class RaptorxSecstrAnalysis(object): def __init__(self, selected_proteins, raptorx_path, fasta_path, outpath): self._selected_proteins = selected_proteins self._raptorx_path = raptorx_path self._fasta_path = fasta_path self._outpath = o...
true
true
1c4a18e8aea20d95df3d8fe117a47346ed852aa9
357
py
Python
tutorial/gallery.py
bricakeld/dash-docs
a79f52ac88c6ebff10a5b2e0af43e89410372dd4
[ "MIT" ]
null
null
null
tutorial/gallery.py
bricakeld/dash-docs
a79f52ac88c6ebff10a5b2e0af43e89410372dd4
[ "MIT" ]
3
2021-03-31T19:16:27.000Z
2021-12-13T20:27:16.000Z
tutorial/gallery.py
bricakeld/dash-docs
a79f52ac88c6ebff10a5b2e0af43e89410372dd4
[ "MIT" ]
1
2022-03-18T09:41:34.000Z
2022-03-18T09:41:34.000Z
# -*- coding: utf-8 -*- import dash_html_components as html import dash_core_components as dcc from textwrap import dedent layout = html.Div(className='gallery', children=[ dcc.Markdown(dedent(''' ## The Dash App Gallery has moved! It is now at [https://dash-gallery.plotly.host/Portal/](https://dash-galle...
27.461538
101
0.697479
import dash_html_components as html import dash_core_components as dcc from textwrap import dedent layout = html.Div(className='gallery', children=[ dcc.Markdown(dedent(''' ## The Dash App Gallery has moved! It is now at [https://dash-gallery.plotly.host/Portal/](https://dash-gallery.plotly.host/Portal/) ...
true
true
1c4a1ab1f277c42ed8aa39fecf9d2cbfe95ad12c
1,883
py
Python
examples/ramps.py
plecto/motorway
ce42b77a9a2d48cf1a9fd2f3bc405accb98030df
[ "Apache-2.0" ]
166
2015-01-19T05:39:24.000Z
2022-02-26T15:09:34.000Z
examples/ramps.py
plecto/motorway
ce42b77a9a2d48cf1a9fd2f3bc405accb98030df
[ "Apache-2.0" ]
17
2016-07-29T10:23:24.000Z
2022-01-04T10:09:01.000Z
examples/ramps.py
plecto/motorway
ce42b77a9a2d48cf1a9fd2f3bc405accb98030df
[ "Apache-2.0" ]
21
2016-09-08T12:26:50.000Z
2021-07-08T09:54:16.000Z
import time import uuid from motorway.contrib.amazon_kinesis.ramps import KinesisRamp from motorway.contrib.amazon_kinesis.intersections import KinesisInsertIntersection from motorway.contrib.amazon_sqs.ramps import SQSRamp from motorway.messages import Message from motorway.ramp import Ramp import random class WordR...
30.868852
100
0.659586
import time import uuid from motorway.contrib.amazon_kinesis.ramps import KinesisRamp from motorway.contrib.amazon_kinesis.intersections import KinesisInsertIntersection from motorway.contrib.amazon_sqs.ramps import SQSRamp from motorway.messages import Message from motorway.ramp import Ramp import random class WordR...
true
true
1c4a1e994f54a55d96dde9d569cf6f8d99b2a79c
13,569
py
Python
src/main/python/ui/batch.py
bmiller/beqdesigner
36d0c780507a564536038e2c9fc3b03b75dedaf4
[ "MIT" ]
16
2019-04-12T00:04:56.000Z
2022-03-15T14:26:56.000Z
src/main/python/ui/batch.py
bmiller/beqdesigner
36d0c780507a564536038e2c9fc3b03b75dedaf4
[ "MIT" ]
400
2018-08-27T10:04:00.000Z
2022-03-15T21:32:33.000Z
src/main/python/ui/batch.py
bmiller/beqdesigner
36d0c780507a564536038e2c9fc3b03b75dedaf4
[ "MIT" ]
6
2018-09-19T21:02:27.000Z
2020-10-18T04:11:01.000Z
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'batch.ui' # # Created by: PyQt5 UI code generator 5.15.2 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. from PyQt5 import QtCore, QtGui,...
57.012605
147
0.72614
from PyQt5 import QtCore, QtGui, QtWidgets class Ui_batchExtractDialog(object): def setupUi(self, batchExtractDialog): batchExtractDialog.setObjectName("batchExtractDialog") batchExtractDialog.resize(1727, 925) self.verticalLayout = QtWidgets.QVBoxLayout(batchExtractDialog) self...
true
true
1c4a200a2dc8929dcf29774d5051e237b10a7a33
69,048
py
Python
tensorflow/python/ops/math_ops.py
seyoung-hyun/tensorflow
2ac978d2532dd359dd7ebbd27ac13dfa147d755d
[ "Apache-2.0" ]
1
2018-10-16T07:59:09.000Z
2018-10-16T07:59:09.000Z
tensorflow/python/ops/math_ops.py
seyoung-hyun/tensorflow
2ac978d2532dd359dd7ebbd27ac13dfa147d755d
[ "Apache-2.0" ]
null
null
null
tensorflow/python/ops/math_ops.py
seyoung-hyun/tensorflow
2ac978d2532dd359dd7ebbd27ac13dfa147d755d
[ "Apache-2.0" ]
1
2018-10-16T07:58:38.000Z
2018-10-16T07:58:38.000Z
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
33.930221
86
0.683119
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np from tensorflow.python.framework import common_shapes from tensorflow.python.framework import constant_op from tensorflow.python.framework import dtypes from tensorflow.python.framework imp...
true
true