hexsha
stringlengths
40
40
size
int64
10
805k
ext
stringclasses
6 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
176
max_stars_repo_name
stringlengths
7
114
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
176
max_issues_repo_name
stringlengths
7
114
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
48.5k
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
176
max_forks_repo_name
stringlengths
7
114
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
10
805k
avg_line_length
float64
5.53
11k
max_line_length
int64
10
129k
alphanum_fraction
float64
0.13
0.93
content_no_comment
stringlengths
0
449k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f701484ff1010bdc4f884896a66c7ea8a865748d
601
py
Python
pywick/modules/stn.py
achaiah/pywick
9d663faf0c1660a9b8359a6472c164f658dfc8cb
[ "MIT" ]
408
2019-05-16T16:12:41.000Z
2022-03-26T17:27:12.000Z
pywick/modules/stn.py
ashishpatel26/pywick
1afffd1c21c2b188836d3599e802146182757bb5
[ "MIT" ]
13
2019-05-17T05:47:06.000Z
2021-06-21T19:02:30.000Z
pywick/modules/stn.py
ashishpatel26/pywick
1afffd1c21c2b188836d3599e802146182757bb5
[ "MIT" ]
42
2019-05-16T19:57:12.000Z
2022-03-06T15:23:18.000Z
import torch.nn as nn from ..functions import F_affine2d, F_affine3d class STN2d(nn.Module): def __init__(self, local_net): super(STN2d, self).__init__() self.local_net = local_net def forward(self, x): params = self.local_net(x) x_transformed = F_affine2d(x[0], params.view...
20.724138
58
0.643927
import torch.nn as nn from ..functions import F_affine2d, F_affine3d class STN2d(nn.Module): def __init__(self, local_net): super(STN2d, self).__init__() self.local_net = local_net def forward(self, x): params = self.local_net(x) x_transformed = F_affine2d(x[0], params.view...
true
true
f701488543d3d264fbb47120a1375c3f6be920eb
243
py
Python
linkograph/runTests.py
mikiec84/linkshop
72959ceca0003be226edeca6496f915502831596
[ "Apache-2.0" ]
6
2017-07-18T15:28:33.000Z
2020-03-03T14:45:45.000Z
linkograph/runTests.py
mikiec84/linkshop
72959ceca0003be226edeca6496f915502831596
[ "Apache-2.0" ]
null
null
null
linkograph/runTests.py
mikiec84/linkshop
72959ceca0003be226edeca6496f915502831596
[ "Apache-2.0" ]
3
2017-09-09T00:36:48.000Z
2020-03-03T14:45:49.000Z
#!/usr/bin/env python3 """Set up file for running tests.""" import unittest def test(): loader = unittest.TestLoader() testSuite = loader.discover('linkograph.tests') runner = unittest.TextTestRunner() runner.run(testSuite)
20.25
51
0.695473
import unittest def test(): loader = unittest.TestLoader() testSuite = loader.discover('linkograph.tests') runner = unittest.TextTestRunner() runner.run(testSuite)
true
true
f70149861134d92cda0cf61e5ac81b2b7020e4b1
315
py
Python
frazzl/services/sandbox_app2/sandbox_app2/app.py
jimtheplant/qraphql-booster
cc905310ca19c32e8c555c54069a0ac5b127d505
[ "Apache-2.0" ]
2
2019-11-20T16:18:53.000Z
2020-05-25T11:00:58.000Z
frazzl/services/sandbox_app2/sandbox_app2/app.py
jimtheplant/qraphql-booster
cc905310ca19c32e8c555c54069a0ac5b127d505
[ "Apache-2.0" ]
null
null
null
frazzl/services/sandbox_app2/sandbox_app2/app.py
jimtheplant/qraphql-booster
cc905310ca19c32e8c555c54069a0ac5b127d505
[ "Apache-2.0" ]
null
null
null
from frazzl import Service from ariadne import QueryType schema = """ type Query { getTest2: Test2 } type Test2 { test1: String } """ query = QueryType() def resolve_getTest2(*args, **kwargs): return query.set_field("getTest2", resolve_getTest2) testService = Service("testService2", schema, query)
15.75
52
0.714286
from frazzl import Service from ariadne import QueryType schema = """ type Query { getTest2: Test2 } type Test2 { test1: String } """ query = QueryType() def resolve_getTest2(*args, **kwargs): return query.set_field("getTest2", resolve_getTest2) testService = Service("testService2", schema, query)
true
true
f7014a6bc748d2a3d40bca567ad4da305840869e
5,520
py
Python
azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_py3.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
null
null
null
azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_py3.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
null
null
null
azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/virtual_machine_scale_set_py3.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
null
null
null
# 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 ...
47.179487
294
0.666304
from .resource_py3 import Resource class VirtualMachineScaleSet(Resource): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, 'location': {'required': True}, 'provisioning_state': {'readonly': True}, 'unique...
true
true
f7014b607675c6e0abeb3819fa28752a7938ea79
836
py
Python
setup.py
arthurzam/pkgdev
cd0890d04544f913802210c94e03c79bedd8336a
[ "BSD-3-Clause" ]
8
2021-02-27T11:14:12.000Z
2022-03-24T14:56:38.000Z
setup.py
arthurzam/pkgdev
cd0890d04544f913802210c94e03c79bedd8336a
[ "BSD-3-Clause" ]
55
2021-02-27T11:16:43.000Z
2022-03-29T12:19:30.000Z
setup.py
arthurzam/pkgdev
cd0890d04544f913802210c94e03c79bedd8336a
[ "BSD-3-Clause" ]
4
2021-03-05T22:34:45.000Z
2022-03-21T21:36:09.000Z
#!/usr/bin/env python3 from itertools import chain from setuptools import setup from snakeoil.dist import distutils_extensions as pkgdist pkgdist_setup, pkgdist_cmds = pkgdist.setup() setup(**dict( pkgdist_setup, license='BSD', author='Tim Harder', author_email='radhermit@gmail.com', descriptio...
28.827586
85
0.673445
from itertools import chain from setuptools import setup from snakeoil.dist import distutils_extensions as pkgdist pkgdist_setup, pkgdist_cmds = pkgdist.setup() setup(**dict( pkgdist_setup, license='BSD', author='Tim Harder', author_email='radhermit@gmail.com', description='collection of tools...
true
true
f7014cf013e416c1756bd9afde14cf6f88db909a
8,039
py
Python
src/settings.py
shaniaki/f2dot
7a2c1e47e884cc699a111ed7bf8711cea3e86ee6
[ "BSD-3-Clause" ]
null
null
null
src/settings.py
shaniaki/f2dot
7a2c1e47e884cc699a111ed7bf8711cea3e86ee6
[ "BSD-3-Clause" ]
null
null
null
src/settings.py
shaniaki/f2dot
7a2c1e47e884cc699a111ed7bf8711cea3e86ee6
[ "BSD-3-Clause" ]
null
null
null
''' * File: settings.py * Author: George Ungureanu <ugeorge@kth.se> * Purpose: This file contains methods for collecting configuration options and initialize the settings object which holds the parameters throughout the program execution. * License: BSD3 ''' ''' Copyright (...
37.919811
121
0.69735
import __init__ import os import re import utils import logging logger = logging.getLogger('f2dot.settings') self.logger.debug('Configuring the runtime execution...') self.runPath = os.path.dirname(os.path.abspath(__file__)) self.configFileName = args.mode + '.conf' if args.generate_config: path = ar...
true
true
f7014f0ab9504f09ce22fbb6c71a0bd07efbbf8c
4,095
py
Python
flaskish.py
baverman/telenot
5b6e3a0ffc78b3a1eef2bb0ebf90244fb2b1ce1e
[ "MIT" ]
null
null
null
flaskish.py
baverman/telenot
5b6e3a0ffc78b3a1eef2bb0ebf90244fb2b1ce1e
[ "MIT" ]
null
null
null
flaskish.py
baverman/telenot
5b6e3a0ffc78b3a1eef2bb0ebf90244fb2b1ce1e
[ "MIT" ]
1
2020-09-21T14:22:10.000Z
2020-09-21T14:22:10.000Z
from __future__ import print_function from functools import wraps import logging try: import ujson as json except ImportError: import json from flask import Flask as _Flask from flask.globals import _request_ctx_stack from werkzeug.wrappers import Response from werkzeug.datastructures import Headers from werk...
30.559701
88
0.588767
from __future__ import print_function from functools import wraps import logging try: import ujson as json except ImportError: import json from flask import Flask as _Flask from flask.globals import _request_ctx_stack from werkzeug.wrappers import Response from werkzeug.datastructures import Headers from werk...
true
true
f7014fea1b031c06902ccaa5d7500866eec73713
14,152
py
Python
pp-cdmx/public_account/public_account_mixins/cleaner_mix.py
rickrebel/race-history
be93b88cf4658fd2c5ec409d8f422b2960d1ae60
[ "MIT" ]
1
2020-08-31T21:08:54.000Z
2020-08-31T21:08:54.000Z
pp-cdmx/public_account/public_account_mixins/cleaner_mix.py
rickrebel/race-history
be93b88cf4658fd2c5ec409d8f422b2960d1ae60
[ "MIT" ]
1
2021-06-10T23:09:45.000Z
2021-06-10T23:09:45.000Z
pp-cdmx/public_account/public_account_mixins/cleaner_mix.py
rickrebel/race-history
be93b88cf4658fd2c5ec409d8f422b2960d1ae60
[ "MIT" ]
1
2021-07-16T19:32:04.000Z
2021-07-16T19:32:04.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals import json import re from scripts.data_cleaner import set_new_error #from scripts.data_cleaner_v2 import calculateNumber class PublicAccountCleanerMix: # cleaning def column_formatter_v3(self, reset=False, image_num=None): from public...
38.772603
79
0.577162
from __future__ import unicode_literals import json import re from scripts.data_cleaner import set_new_error class PublicAccountCleanerMix: def column_formatter_v3(self, reset=False, image_num=None): from public_account.models import PPImage, Row print print print "----Cu...
false
true
f701516e4b0f9d00ae62ff939cc7915f776b8f29
158
py
Python
modelsClasswork/NewbalanceApp/views.py
cs-fullstack-2019-spring/django-models-cw-EnrickaM
23b080ac8d1e5eea2fb8cf5dbd394f81b8f468ed
[ "Apache-2.0" ]
null
null
null
modelsClasswork/NewbalanceApp/views.py
cs-fullstack-2019-spring/django-models-cw-EnrickaM
23b080ac8d1e5eea2fb8cf5dbd394f81b8f468ed
[ "Apache-2.0" ]
null
null
null
modelsClasswork/NewbalanceApp/views.py
cs-fullstack-2019-spring/django-models-cw-EnrickaM
23b080ac8d1e5eea2fb8cf5dbd394f81b8f468ed
[ "Apache-2.0" ]
null
null
null
from django.shortcuts import render # Create your views here. from django.http import HttpResponse def index(request): return HttpResponse('TEST URL')
17.555556
36
0.772152
from django.shortcuts import render from django.http import HttpResponse def index(request): return HttpResponse('TEST URL')
true
true
f70152ced9356e1baea309fb033c05892d0f39af
2,813
py
Python
tests/test_correlations.py
energyinpython/pre-pyrepo
92e44594e12d1110247f011e51734e5ce1fe0b8e
[ "MIT" ]
null
null
null
tests/test_correlations.py
energyinpython/pre-pyrepo
92e44594e12d1110247f011e51734e5ce1fe0b8e
[ "MIT" ]
null
null
null
tests/test_correlations.py
energyinpython/pre-pyrepo
92e44594e12d1110247f011e51734e5ce1fe0b8e
[ "MIT" ]
null
null
null
from pyrepo import correlations as corrs from scipy.stats import pearsonr import unittest import numpy as np # Test for Spearman rank correlation coefficient class Test_Spearman(unittest.TestCase): def test_spearman(self): """Test based on paper Sałabun, W., & Urbaniak, K. (2020, June). A new coefficient...
34.304878
114
0.666193
from pyrepo import correlations as corrs from scipy.stats import pearsonr import unittest import numpy as np class Test_Spearman(unittest.TestCase): def test_spearman(self): R = np.array([1, 2, 3, 4, 5]) Q = np.array([1, 3, 2, 4, 5]) test_result = corrs.spearman(R, Q) real_resul...
true
true
f70153728cb260c3c86bc652b2c6fedfd73c3c53
4,548
py
Python
core/assembly_system.py
YifanQie/Deep_Learning_for_Manufacturing
9ba19e41f69c561b04b8573ab9c52c0969f45bfd
[ "MIT" ]
27
2019-10-31T15:16:13.000Z
2022-03-29T03:56:57.000Z
core/assembly_system.py
YifanQie/Deep_Learning_for_Manufacturing
9ba19e41f69c561b04b8573ab9c52c0969f45bfd
[ "MIT" ]
4
2020-03-25T14:18:04.000Z
2022-02-10T00:34:58.000Z
core/assembly_system.py
YifanQie/Deep_Learning_for_Manufacturing
9ba19e41f69c561b04b8573ab9c52c0969f45bfd
[ "MIT" ]
7
2020-02-23T22:12:37.000Z
2021-12-08T20:14:41.000Z
import numpy as np import pandas as pd """ Contains core classes and methods for initializing a Assembly System, the inputs are provided in assemblyconfig file in utilities""" class AssemblySystem: """Assembly System Class :param assembly_type: Type of assembly Single-Station/Multi-Station :type assembly_system:...
39.547826
230
0.776165
import numpy as np import pandas as pd class AssemblySystem: def __init__(self,assembly_type,assembly_kccs,assembly_kpis): self.assembly_type=assembly_type self.assembly_kccs=assembly_kccs self.assembly_kpis=assembly_kpis class PartType(AssemblySystem): def __init__(self,assembly_type,assembly_kccs,assembly_k...
true
true
f701539473089962a5184dad3b593c3ad907b062
870
py
Python
tests/namespace_test/NamespaceA/SecondTableInA.py
shivvis/flatbuffers
791c83aa7e3bfee37ff592cb80910caead5f625c
[ "Apache-2.0" ]
24
2016-06-06T09:17:29.000Z
2021-01-31T11:14:18.000Z
tests/namespace_test/NamespaceA/SecondTableInA.py
shivvis/flatbuffers
791c83aa7e3bfee37ff592cb80910caead5f625c
[ "Apache-2.0" ]
1
2016-09-25T11:20:30.000Z
2016-09-25T11:20:30.000Z
tests/namespace_test/NamespaceA/SecondTableInA.py
shivvis/flatbuffers
791c83aa7e3bfee37ff592cb80910caead5f625c
[ "Apache-2.0" ]
11
2016-08-18T17:57:28.000Z
2019-09-10T07:30:19.000Z
# automatically generated, do not modify # namespace: NamespaceA import flatbuffers class SecondTableInA(object): __slots__ = ['_tab'] # SecondTableInA def Init(self, buf, pos): self._tab = flatbuffers.table.Table(buf, pos) # SecondTableInA def ReferToC(self): o = flatbuffers.nu...
31.071429
149
0.687356
import flatbuffers class SecondTableInA(object): __slots__ = ['_tab'] def Init(self, buf, pos): self._tab = flatbuffers.table.Table(buf, pos) def ReferToC(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) if o != 0: x = self._...
true
true
f7015476aad1aa9cc35eb49f95af082697d8246d
1,084
py
Python
dialogos/build/w3lib/setup.py
bertucho/epic-movie-quotes-quiz
09e4ec58a441ab74c1ce6e0fde4e71b08a4d7250
[ "MIT" ]
null
null
null
dialogos/build/w3lib/setup.py
bertucho/epic-movie-quotes-quiz
09e4ec58a441ab74c1ce6e0fde4e71b08a4d7250
[ "MIT" ]
null
null
null
dialogos/build/w3lib/setup.py
bertucho/epic-movie-quotes-quiz
09e4ec58a441ab74c1ce6e0fde4e71b08a4d7250
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages setup( name='w3lib', version='1.12.0', license='BSD', description='Library of web-related functions', author='Scrapy project', author_email='info@scrapy.org', url='https://github.com/scrapy/w3lib', packages=find_packages(exclude=('tests', 'te...
33.875
70
0.609779
from setuptools import setup, find_packages setup( name='w3lib', version='1.12.0', license='BSD', description='Library of web-related functions', author='Scrapy project', author_email='info@scrapy.org', url='https://github.com/scrapy/w3lib', packages=find_packages(exclude=('tests', 'te...
true
true
f70154ae8605b52640bf200ccaaa8bf6ad001bf5
1,106
py
Python
Module3/assignment2.py
dipdeb/DAT210x
9103844fa7f76052bdcc5a4ec60e8afbc91a9f6b
[ "MIT" ]
null
null
null
Module3/assignment2.py
dipdeb/DAT210x
9103844fa7f76052bdcc5a4ec60e8afbc91a9f6b
[ "MIT" ]
null
null
null
Module3/assignment2.py
dipdeb/DAT210x
9103844fa7f76052bdcc5a4ec60e8afbc91a9f6b
[ "MIT" ]
null
null
null
import pandas as pd import matplotlib.pyplot as plt import matplotlib # Look pretty... # matplotlib.style.use('ggplot') plt.style.use('ggplot') # # TODO: Load up the Seeds Dataset into a Dataframe # It's located at 'Datasets/wheat.data' # wheat_df = pd.read_csv('/home/dipanjan/DAT210x/Module3/Datasets/wheat.data', ...
22.571429
90
0.712477
import pandas as pd import matplotlib.pyplot as plt import matplotlib plt.style.use('ggplot') # wheat_df = pd.read_csv('/home/dipanjan/DAT210x/Module3/Datasets/wheat.data', index_col=0); # # TODO: Create a 2d scatter plot that graphs the # area and perimeter features # # .. your code here .. wheat_df.plot.s...
true
true
f70155c72d7ad130cb57d825accdfa6901578200
4,547
py
Python
scf/scf_utils.py
hongzhouye/sigma-SCF
62e2dce538d1e68c4dc3c72fdf27beb1911e544f
[ "BSD-3-Clause" ]
4
2016-07-30T22:02:50.000Z
2018-08-02T23:46:15.000Z
scf/scf_utils.py
hongzhouye/sigma-SCF
62e2dce538d1e68c4dc3c72fdf27beb1911e544f
[ "BSD-3-Clause" ]
11
2017-08-04T20:34:04.000Z
2017-08-08T23:07:42.000Z
scf/scf_utils.py
hongzhouye/sigma-SCF
62e2dce538d1e68c4dc3c72fdf27beb1911e544f
[ "BSD-3-Clause" ]
null
null
null
import numpy as np import os, sys sys.path.append(os.path.dirname(__file__)) from diis_solver import diis_solver, diis_solver_uhf sys.path.pop() import jk import xform def homo_lumo_mix(C, nocc, beta): """ Mix a portion of LUMO to HOMO. Used when generating spin-unrestricted guess. """ if beta < 0...
25.982857
83
0.533978
import numpy as np import os, sys sys.path.append(os.path.dirname(__file__)) from diis_solver import diis_solver, diis_solver_uhf sys.path.pop() import jk import xform def homo_lumo_mix(C, nocc, beta): if beta < 0. or beta > 1.: raise Exception("Mixing beta must be in [0, 1]") Cb = C.copy() homo =...
true
true
f701560ac0a3a86c789a437ba0a2eed06d2ca194
1,250
py
Python
tests/schema/test_schema.py
simonsobs/acondbs
6ca11c2889d827ecdb2b54d0cf3b94b8cdd281e6
[ "MIT" ]
null
null
null
tests/schema/test_schema.py
simonsobs/acondbs
6ca11c2889d827ecdb2b54d0cf3b94b8cdd281e6
[ "MIT" ]
24
2020-04-02T19:29:07.000Z
2022-03-08T03:05:43.000Z
tests/schema/test_schema.py
simonsobs/acondbs
6ca11c2889d827ecdb2b54d0cf3b94b8cdd281e6
[ "MIT" ]
1
2020-04-08T15:48:28.000Z
2020-04-08T15:48:28.000Z
import pytest from .funcs import assert_query QUERY = ''' { __schema { types { kind name fields { name } } queryType { fields { name } } mutationType { fields { name } } subscriptionType { fields { name...
18.656716
77
0.5896
import pytest from .funcs import assert_query QUERY = ''' { __schema { types { kind name fields { name } } queryType { fields { name } } mutationType { fields { name } } subscriptionType { fields { name...
true
true
f70156a3a2fcf8fcc48c436b8d608cbe337dddd0
2,062
py
Python
setup.py
hannes-holey/hans
9604eedd70d54f3d4e2058fbc5b911e92e005e4f
[ "MIT" ]
1
2022-02-03T09:31:24.000Z
2022-02-03T09:31:24.000Z
setup.py
hannes-holey/hans
9604eedd70d54f3d4e2058fbc5b911e92e005e4f
[ "MIT" ]
6
2022-02-03T09:24:24.000Z
2022-02-07T09:25:16.000Z
setup.py
hannes-holey/hans
9604eedd70d54f3d4e2058fbc5b911e92e005e4f
[ "MIT" ]
null
null
null
""" MIT License Copyright 2021 Hannes Holey Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, dist...
38.185185
92
0.70805
from setuptools import setup, find_packages with open("requirements.txt", "r") as fh: requirements = [line.strip() for line in fh] setup(name='hans', description='Height-Averaged Navier-Stokes (HANS) solver for 2D lubrication problems', author='Hannes Holey', author_email='hannes.holey@kit.edu...
true
true
f701581069cfd8be095c0662247dab35763588a4
4,161
py
Python
tools/accuracy_checker/accuracy_checker/annotation_converters/cvat_multilabel_recognition.py
APrigarina/open_model_zoo
b1ff98b64a6222cf6b5f3838dc0271422250de95
[ "Apache-2.0" ]
1,031
2020-07-16T08:30:57.000Z
2022-03-30T19:42:52.000Z
tools/accuracy_checker/accuracy_checker/annotation_converters/cvat_multilabel_recognition.py
APrigarina/open_model_zoo
b1ff98b64a6222cf6b5f3838dc0271422250de95
[ "Apache-2.0" ]
966
2020-07-16T08:13:00.000Z
2022-03-31T18:09:18.000Z
tools/accuracy_checker/accuracy_checker/annotation_converters/cvat_multilabel_recognition.py
APrigarina/open_model_zoo
b1ff98b64a6222cf6b5f3838dc0271422250de95
[ "Apache-2.0" ]
440
2020-07-16T12:52:50.000Z
2022-03-31T14:21:41.000Z
""" Copyright (c) 2018-2021 Intel Corporation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in wri...
46.233333
113
0.670031
import numpy as np from .format_converter import FileBasedAnnotationConverter, ConverterReturn from ..representation import MultiLabelRecognitionAnnotation from ..utils import read_xml, check_file_existence from ..config import StringField, PathField, ConfigError class CVATMultilabelAttributesRecognitionConverter(Fi...
true
true
f701593506fcf4f739f92e926ff4b2ac42373413
15,435
py
Python
bin/awscli/customizations/history/show.py
iilness2/bash-lambda-layer-custom
0b054d4ccb0623460354ba1f58059258c095a494
[ "MIT" ]
399
2018-12-09T14:38:30.000Z
2022-03-31T19:34:05.000Z
bin/awscli/customizations/history/show.py
iilness2/bash-lambda-layer-custom
0b054d4ccb0623460354ba1f58059258c095a494
[ "MIT" ]
64
2018-12-10T01:34:46.000Z
2022-01-13T14:04:34.000Z
bin/awscli/customizations/history/show.py
iilness2/bash-lambda-layer-custom
0b054d4ccb0623460354ba1f58059258c095a494
[ "MIT" ]
80
2018-12-10T10:36:53.000Z
2022-03-22T13:40:32.000Z
# Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file acc...
37.554745
79
0.586718
import datetime import json import sys import xml.parsers.expat import xml.dom.minidom import colorama from awscli.compat import six from awscli.customizations.history.commands import HistorySubcommand from awscli.customizations.history.filters import RegexFilter class Formatter(object): def __init_...
true
true
f70159d65a5bfff918de93d5a0e04e7f23f300b0
1,711
py
Python
Python/venv/lib/python3.7/site-packages/prometheus_client/platform_collector.py
HenriqueBuzin/TCC
5fb9db42e97e28131bff97da3252a9ee33b3684e
[ "Unlicense" ]
69
2019-02-18T12:07:35.000Z
2022-03-12T10:38:32.000Z
Python/venv/lib/python3.7/site-packages/prometheus_client/platform_collector.py
HenriqueBuzin/TCC
5fb9db42e97e28131bff97da3252a9ee33b3684e
[ "Unlicense" ]
12
2018-12-06T22:06:49.000Z
2022-02-25T17:40:44.000Z
Python/venv/lib/python3.7/site-packages/prometheus_client/platform_collector.py
HenriqueBuzin/TCC
5fb9db42e97e28131bff97da3252a9ee33b3684e
[ "Unlicense" ]
28
2019-03-22T01:07:13.000Z
2022-02-21T16:38:27.000Z
#!/usr/bin/env python # -*- coding: utf-8 from __future__ import unicode_literals import platform as pf from . import core class PlatformCollector(object): """Collector for python platform information""" def __init__(self, registry=core.REGISTRY, platform=None): self._platform = pf if platform is N...
29
80
0.613676
from __future__ import unicode_literals import platform as pf from . import core class PlatformCollector(object): def __init__(self, registry=core.REGISTRY, platform=None): self._platform = pf if platform is None else platform info = self._info() system = self._platform.system() ...
true
true
f70159fa731ebd5131cfc64b025fdad8ba885564
222
py
Python
client codes/client v2/node_free.py
nathaniel-security/Localhost-distributed-computing-engine
4643c22f563a969ccaf1062da17696819e00ab9a
[ "MIT" ]
null
null
null
client codes/client v2/node_free.py
nathaniel-security/Localhost-distributed-computing-engine
4643c22f563a969ccaf1062da17696819e00ab9a
[ "MIT" ]
null
null
null
client codes/client v2/node_free.py
nathaniel-security/Localhost-distributed-computing-engine
4643c22f563a969ccaf1062da17696819e00ab9a
[ "MIT" ]
null
null
null
from client_database_connection import mycursor import os sql = "INSERT INTO free_node (node_id) VALUES (%s)" val = (node_id) mycursor.execute(sql, val) command = 'python get_code_when_free.py' os.system(command)
24.666667
52
0.752252
from client_database_connection import mycursor import os sql = "INSERT INTO free_node (node_id) VALUES (%s)" val = (node_id) mycursor.execute(sql, val) command = 'python get_code_when_free.py' os.system(command)
true
true
f7015a05765804fec4cfa4d48e357987ad3578a0
114,236
py
Python
research/object_detection/meta_architectures/faster_rcnn_meta_arch_override_RPN.py
AXATechLab/models
c39ac760cfa6ce2339f5781f2a78d70db3ea5bb2
[ "Apache-2.0" ]
null
null
null
research/object_detection/meta_architectures/faster_rcnn_meta_arch_override_RPN.py
AXATechLab/models
c39ac760cfa6ce2339f5781f2a78d70db3ea5bb2
[ "Apache-2.0" ]
null
null
null
research/object_detection/meta_architectures/faster_rcnn_meta_arch_override_RPN.py
AXATechLab/models
c39ac760cfa6ce2339f5781f2a78d70db3ea5bb2
[ "Apache-2.0" ]
null
null
null
# 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...
48.860565
181
0.713033
from abc import abstractmethod from functools import partial import tensorflow as tf import json import numpy as np from object_detection.anchor_generators import grid_anchor_generator from object_detection.builders import box_predictor_builder from object_detection.core import box_list from object_detec...
true
true
f7015aaa826888850cd8fe4abef03d3587111370
643
py
Python
manage.py
lievertom/2020.2-Projeto-Kokama-Traducao
c9c164ec69a3eba58fcbe0a74a43601346e57755
[ "MIT" ]
1
2021-03-13T02:44:27.000Z
2021-03-13T02:44:27.000Z
manage.py
luisgaboardi/2020.2-Projeto-Kokama-Traducao
c14edf0611f6dcc7dc6de3249018de9c5cf71604
[ "MIT" ]
21
2021-03-14T01:51:11.000Z
2021-05-25T02:04:23.000Z
manage.py
lievertom/2020.2-Projeto-Kokama-Traducao
c9c164ec69a3eba58fcbe0a74a43601346e57755
[ "MIT" ]
3
2021-04-02T11:06:33.000Z
2021-05-12T21:30:34.000Z
"""Django's command-line utility for administrative tasks.""" import os import sys def main(): """Run administrative tasks.""" os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'translate.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: ...
29.227273
73
0.679627
import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'translate.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure it's installed and " ...
true
true
f7015abd02d2e91af592e552a6b9c0a139f233d9
9,314
py
Python
monero_glue_test/test_crypto.py
ph4r05/monero-agent
0bac0e6f33142b2bb885565bfd1ef8ac04559280
[ "MIT" ]
20
2018-04-05T22:06:10.000Z
2021-09-18T10:43:44.000Z
monero_glue_test/test_crypto.py
ph4r05/monero-agent
0bac0e6f33142b2bb885565bfd1ef8ac04559280
[ "MIT" ]
null
null
null
monero_glue_test/test_crypto.py
ph4r05/monero-agent
0bac0e6f33142b2bb885565bfd1ef8ac04559280
[ "MIT" ]
5
2018-08-06T15:06:04.000Z
2021-07-16T01:58:43.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # Author: Dusan Klinec, ph4r05, 2018 import binascii from binascii import unhexlify import unittest import aiounittest from monero_glue.xmr import common, crypto from monero_glue.xmr.core import ec_py class CryptoTest(aiounittest.AsyncTestCase): """Simple tests""" ...
35.280303
88
0.613915
import binascii from binascii import unhexlify import unittest import aiounittest from monero_glue.xmr import common, crypto from monero_glue.xmr.core import ec_py class CryptoTest(aiounittest.AsyncTestCase): def __init__(self, *args, **kwargs): super(CryptoTest, self).__init__(*args, **kwargs) ...
true
true
f7015b1b5a99de73f33b4f3d76ad8353923e1995
175,051
py
Python
python/ccxt/async_support/gateio.py
ttodua/ccxt-2
d23db0c44288b3fc0313e798912a1c52c5b42f97
[ "MIT" ]
null
null
null
python/ccxt/async_support/gateio.py
ttodua/ccxt-2
d23db0c44288b3fc0313e798912a1c52c5b42f97
[ "MIT" ]
null
null
null
python/ccxt/async_support/gateio.py
ttodua/ccxt-2
d23db0c44288b3fc0313e798912a1c52c5b42f97
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.async_support.base.exchange import Exchange import hashlib from ccxt.base.errors import ExchangeError from ccxt.base.errors impor...
43.971615
283
0.472485
rt.base.exchange import Exchange import hashlib from ccxt.base.errors import ExchangeError from ccxt.base.errors import AuthenticationError from ccxt.base.errors import PermissionDenied from ccxt.base.errors import AccountNotEnabled from ccxt.base.errors import AccountSuspended from ccxt.base.errors import Arguments...
true
true
f7015b2afba0129d69363926d5d8ce7086ff8751
715
py
Python
asyncworker/metrics/registry.py
async-worker/async-worker
9025d8f14d3fe6e1a2b1373c84abf41de575b359
[ "MIT" ]
7
2021-05-02T19:26:14.000Z
2022-02-08T15:12:10.000Z
asyncworker/metrics/registry.py
async-worker/async-worker
9025d8f14d3fe6e1a2b1373c84abf41de575b359
[ "MIT" ]
10
2021-05-02T15:37:55.000Z
2021-09-11T10:58:32.000Z
asyncworker/metrics/registry.py
async-worker/async-worker
9025d8f14d3fe6e1a2b1373c84abf41de575b359
[ "MIT" ]
null
null
null
from prometheus_client import CollectorRegistry from asyncworker.conf import settings from asyncworker.metrics.collectors.gc import GCCollector from asyncworker.metrics.collectors.platform import PlatformCollector from asyncworker.metrics.collectors.process import ProcessCollector NAMESPACE = ( f"{settings.METRIC...
35.75
78
0.846154
from prometheus_client import CollectorRegistry from asyncworker.conf import settings from asyncworker.metrics.collectors.gc import GCCollector from asyncworker.metrics.collectors.platform import PlatformCollector from asyncworker.metrics.collectors.process import ProcessCollector NAMESPACE = ( f"{settings.METRIC...
true
true
f7015b5c72fd870e0de08b32abce1f336bb097ab
2,324
py
Python
src/graphql/validation/rules/unique_operation_types.py
hspedro/graphql-core
2b27e641d51789f532f989d3e125e04b33d24564
[ "MIT" ]
null
null
null
src/graphql/validation/rules/unique_operation_types.py
hspedro/graphql-core
2b27e641d51789f532f989d3e125e04b33d24564
[ "MIT" ]
null
null
null
src/graphql/validation/rules/unique_operation_types.py
hspedro/graphql-core
2b27e641d51789f532f989d3e125e04b33d24564
[ "MIT" ]
null
null
null
from typing import Dict, Optional, Union from ...error import GraphQLError from ...language import ( OperationTypeDefinitionNode, OperationType, SchemaDefinitionNode, SchemaExtensionNode, ) from ...type import GraphQLObjectType from . import SDLValidationContext, SDLValidationRule __all__ = ["UniqueOp...
34.176471
88
0.609725
from typing import Dict, Optional, Union from ...error import GraphQLError from ...language import ( OperationTypeDefinitionNode, OperationType, SchemaDefinitionNode, SchemaExtensionNode, ) from ...type import GraphQLObjectType from . import SDLValidationContext, SDLValidationRule __all__ = ["UniqueOp...
true
true
f7015b8ac1c781333bd97a91af3d7a190b0a0877
754
py
Python
sdk/python/pulumi_azure_native/costmanagement/v20200301preview/_enums.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
31
2020-09-21T09:41:01.000Z
2021-02-26T13:21:59.000Z
sdk/python/pulumi_azure_native/costmanagement/v20200301preview/_enums.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
231
2020-09-21T09:38:45.000Z
2021-03-01T11:16:03.000Z
sdk/python/pulumi_azure_native/costmanagement/v20200301preview/_enums.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
4
2020-09-29T14:14:59.000Z
2021-02-10T20:38:16.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** from enum import Enum __all__ = [ 'CostAllocationPolicyType', 'CostAllocationResourceType', 'RuleStatus', ] class CostAllocationPolicyTy...
20.944444
80
0.659151
from enum import Enum __all__ = [ 'CostAllocationPolicyType', 'CostAllocationResourceType', 'RuleStatus', ] class CostAllocationPolicyType(str, Enum): FIXED_PROPORTION = "FixedProportion" class CostAllocationResourceType(str, Enum): DIMENSION = "Dimension" TAG = "Tag" class RuleStatus...
true
true
f7015bc8d1aae686fe1efb7e3d9e149f9f981a3e
12,289
py
Python
tools/train_eval.py
Sakura176/PointRCNN
a7fbb25e931609a39c32cb821a7c98a326e8b0c0
[ "MIT" ]
null
null
null
tools/train_eval.py
Sakura176/PointRCNN
a7fbb25e931609a39c32cb821a7c98a326e8b0c0
[ "MIT" ]
null
null
null
tools/train_eval.py
Sakura176/PointRCNN
a7fbb25e931609a39c32cb821a7c98a326e8b0c0
[ "MIT" ]
null
null
null
import os import numpy as np import torch import torch.nn.functional as F from lib.utils.bbox_transform import decode_bbox_target from tools.kitti_object_eval_python.evaluate import evaluate as kitti_evaluate from lib.config import cfg import lib.utils.kitti_utils as kitti_utils import lib.utils.iou3d.iou3d_utils as i...
43.733096
115
0.582391
import os import numpy as np import torch import torch.nn.functional as F from lib.utils.bbox_transform import decode_bbox_target from tools.kitti_object_eval_python.evaluate import evaluate as kitti_evaluate from lib.config import cfg import lib.utils.kitti_utils as kitti_utils import lib.utils.iou3d.iou3d_utils as i...
true
true
f7015cc43d31242d7bc3480085b9a95866ebf963
7,532
py
Python
parallel_esn/bo.py
zblanks/parallel_esn
25a979d0863ce54a4a588f4216dc473d4e9c5e8a
[ "BSD-2-Clause" ]
7
2019-05-06T00:32:24.000Z
2021-06-03T14:49:23.000Z
parallel_esn/bo.py
zblanks/parallel_esn
25a979d0863ce54a4a588f4216dc473d4e9c5e8a
[ "BSD-2-Clause" ]
8
2019-04-20T04:51:38.000Z
2020-02-25T22:25:34.000Z
parallel_esn/bo.py
zblanks/parallel_esn
25a979d0863ce54a4a588f4216dc473d4e9c5e8a
[ "BSD-2-Clause" ]
2
2019-04-19T11:05:51.000Z
2020-10-15T20:40:26.000Z
from math import log10 from sklearn.gaussian_process import GaussianProcessRegressor from sklearn.gaussian_process.kernels import Matern import numpy as np from .utils import create_rng class BO: """ Bayesian Optimization framework """ def __init__(self, k, hidden_dim=(100, 10000), s...
35.196262
79
0.556957
from math import log10 from sklearn.gaussian_process import GaussianProcessRegressor from sklearn.gaussian_process.kernels import Matern import numpy as np from .utils import create_rng class BO: def __init__(self, k, hidden_dim=(100, 10000), spectral_radius=(.9, 1.3), p=(0, 1), ...
true
true
f7015d2b3830806be972d5bfd60bcbe4ef3a2efc
1,924
py
Python
model/encoder/model_export_test.py
hjonnala/deeplab2
1868757c4333ec5287cc0bf0a6bbf38fbbe34c2e
[ "Apache-2.0" ]
null
null
null
model/encoder/model_export_test.py
hjonnala/deeplab2
1868757c4333ec5287cc0bf0a6bbf38fbbe34c2e
[ "Apache-2.0" ]
null
null
null
model/encoder/model_export_test.py
hjonnala/deeplab2
1868757c4333ec5287cc0bf0a6bbf38fbbe34c2e
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2022 The Deeplab2 Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
31.032258
74
0.701663
import os from absl import flags from absl.testing import parameterized import tensorflow as tf from deeplab2.model.encoder import axial_resnet_instances FLAGS = flags.FLAGS class ModelExportTest(tf.test.TestCase, parameterized.TestCase): @parameterized.parameters( ('resnet50',), ('r...
true
true
f7015e1fbd223d4d58916cb28639860f971d3ab0
519
py
Python
114_sdoc7/run.py
sunlightlabs/senate_disbursements
3e5989d075a91271c581e32c69f7ee9beb7eebad
[ "BSD-2-Clause" ]
2
2017-06-12T18:09:10.000Z
2021-04-18T17:11:06.000Z
114_sdoc7/run.py
dwillis/senate_disbursements
3e5989d075a91271c581e32c69f7ee9beb7eebad
[ "BSD-2-Clause" ]
1
2017-10-03T14:18:00.000Z
2017-10-03T14:50:35.000Z
114_sdoc7/run.py
dwillis/senate_disbursements
3e5989d075a91271c581e32c69f7ee9beb7eebad
[ "BSD-2-Clause" ]
5
2016-09-20T23:42:34.000Z
2017-10-05T19:23:13.000Z
from rip_pages import rip_pages from read_pages import read_pages from format_csv import format_csv # STEP 1: CONFIG VARIABLES SOURCE_DOC = '114sdoc7' FILE_NAME = "GPO-CDOC-" + SOURCE_DOC + ".pdf" OUT_FILE = 'senate_data.csv' MISSING_FILE = 'missing_data.json' START_PAGE = 17 END_PAGE = 2259 # STEP 2: Rip text, read ...
23.590909
56
0.782274
from rip_pages import rip_pages from read_pages import read_pages from format_csv import format_csv SOURCE_DOC = '114sdoc7' FILE_NAME = "GPO-CDOC-" + SOURCE_DOC + ".pdf" OUT_FILE = 'senate_data.csv' MISSING_FILE = 'missing_data.json' START_PAGE = 17 END_PAGE = 2259 rip_pages(FILE_NAME, START_PAGE, END_PAGE) read_pa...
true
true
f7015e22936fea6cb9c989e8330ff91377b8db69
557
py
Python
Fundamentals/Dictionaries/Lect_Demo..py
LuGeorgiev/PythonSelfLearning
db8fcff2c2df8946d6acf2a2e5677eccf2bbe5dc
[ "MIT" ]
null
null
null
Fundamentals/Dictionaries/Lect_Demo..py
LuGeorgiev/PythonSelfLearning
db8fcff2c2df8946d6acf2a2e5677eccf2bbe5dc
[ "MIT" ]
null
null
null
Fundamentals/Dictionaries/Lect_Demo..py
LuGeorgiev/PythonSelfLearning
db8fcff2c2df8946d6acf2a2e5677eccf2bbe5dc
[ "MIT" ]
null
null
null
my_list = [1, 2, 2, 4, 6] #print reverse print(my_list[::-1]) student = {'user': 'Lubo', 'pass': 'admin', 'course': ['C# Fundamentals', 'C# ASP', 'Algorithms']} for key in student: print(key) for kvp in student.items(): print(f'the key is: {kvp[0]}, and values are: {kvp[1]} ') print(s...
19.206897
65
0.603232
my_list = [1, 2, 2, 4, 6] print(my_list[::-1]) student = {'user': 'Lubo', 'pass': 'admin', 'course': ['C# Fundamentals', 'C# ASP', 'Algorithms']} for key in student: print(key) for kvp in student.items(): print(f'the key is: {kvp[0]}, and values are: {kvp[1]} ') print(student['pass']...
true
true
f7015eff97146dcc90e0d346cf7013c167c3b070
748
py
Python
datas/exameUltrassom.py
mdietterle/aulas
b289a7252c2c8f7dfb4ee5482326a94e7d87ee45
[ "Apache-2.0" ]
null
null
null
datas/exameUltrassom.py
mdietterle/aulas
b289a7252c2c8f7dfb4ee5482326a94e7d87ee45
[ "Apache-2.0" ]
null
null
null
datas/exameUltrassom.py
mdietterle/aulas
b289a7252c2c8f7dfb4ee5482326a94e7d87ee45
[ "Apache-2.0" ]
null
null
null
import datetime from dateutil.relativedelta import relativedelta print("Programa para calcular o prazo de exame de ultrassom...\nO mesmo deve ser feito entre 22 e 24 semanas de gestação") print("você deverá informar com quantas semanasa de gestação a paciente se encontra, no formato aaaa/mm/dd") semanas = int(input("C...
53.428571
122
0.778075
import datetime from dateutil.relativedelta import relativedelta print("Programa para calcular o prazo de exame de ultrassom...\nO mesmo deve ser feito entre 22 e 24 semanas de gestação") print("você deverá informar com quantas semanasa de gestação a paciente se encontra, no formato aaaa/mm/dd") semanas = int(input("C...
true
true
f701614adbe0c289b89493a7ae3140602778980b
2,333
py
Python
jp.atcoder/abc012/abc012_4/21865313.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
1
2022-02-09T03:06:25.000Z
2022-02-09T03:06:25.000Z
jp.atcoder/abc012/abc012_4/21865313.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
1
2022-02-05T22:53:18.000Z
2022-02-09T01:29:30.000Z
jp.atcoder/abc012/abc012_4/21865313.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
null
null
null
from __future__ import annotations from typing import Generator, NoReturn class StdReader: def __init__( self, ) -> NoReturn: import sys self.buf = sys.stdin.buffer self.lines = self.async_readlines() self.chunks: Generator def async_readlines( self, ...
17.80916
48
0.479211
from __future__ import annotations from typing import Generator, NoReturn class StdReader: def __init__( self, ) -> NoReturn: import sys self.buf = sys.stdin.buffer self.lines = self.async_readlines() self.chunks: Generator def async_readlines( self, ...
true
true
f70162a1e21c7e1848d4431d52ef94aa63177e6a
3,991
py
Python
tests/test_reducers_utils.py
jonathansick/astropy-librarian
f6a7cbd42ce0323b6d62f842a67eeeb7c31160b2
[ "BSD-3-Clause" ]
null
null
null
tests/test_reducers_utils.py
jonathansick/astropy-librarian
f6a7cbd42ce0323b6d62f842a67eeeb7c31160b2
[ "BSD-3-Clause" ]
14
2020-03-30T17:25:17.000Z
2022-02-10T15:15:55.000Z
tests/test_reducers_utils.py
jonathansick/astropy-librarian
f6a7cbd42ce0323b6d62f842a67eeeb7c31160b2
[ "BSD-3-Clause" ]
1
2021-05-01T21:32:09.000Z
2021-05-01T21:32:09.000Z
# Licensed under a 3-clause BSD style license - see LICENSE.rst """Tests for the astropylibrarian.reducers.utils module. """ from __future__ import annotations from typing import TYPE_CHECKING from astropylibrarian.reducers.utils import iter_sphinx_sections if TYPE_CHECKING: from .conftest import HtmlTestData ...
32.713115
78
0.656477
from __future__ import annotations from typing import TYPE_CHECKING from astropylibrarian.reducers.utils import iter_sphinx_sections if TYPE_CHECKING: from .conftest import HtmlTestData def test_iter_sphinx_sections(color_excess_tutorial: HtmlTestData) -> None: doc = color_excess_tutorial.parse() roo...
true
true
f701631c5afbc2b367db071f5ff121b16ced9907
4,821
py
Python
tests/pbbs/maximalIndependentSet/run_omprace_small.py
rutgers-apl/omp-racer
a8a32e186950997b8eee7864f766819129a5ee06
[ "BSD-2-Clause" ]
2
2020-09-17T15:18:49.000Z
2021-03-06T10:21:23.000Z
tests/pbbs/maximalIndependentSet/run_omprace_small.py
rutgers-apl/omp-racer
a8a32e186950997b8eee7864f766819129a5ee06
[ "BSD-2-Clause" ]
1
2020-09-08T18:36:24.000Z
2020-09-17T15:18:27.000Z
tests/pbbs/maximalIndependentSet/run_omprace_small.py
rutgers-apl/omp-racer
a8a32e186950997b8eee7864f766819129a5ee06
[ "BSD-2-Clause" ]
1
2021-01-19T15:28:15.000Z
2021-01-19T15:28:15.000Z
#!/usr/bin/python import sys, string, os, popen2, shutil, platform, subprocess, pprint, time import util, commands, csv from math import sqrt #clean up the src do_clean = True #build the src do_build = True #clean, build, and run the benchmarks do_run = True #collect data to plot #do_collect_data = True if do_cl...
33.950704
156
0.500933
import sys, string, os, popen2, shutil, platform, subprocess, pprint, time import util, commands, csv from math import sqrt do_clean = True do_build = True do_run = True if do_clean and not do_build: print "Clean - true and build - false not allowed" exit(0) configs = [] entry = { "NAME" : "RUN_A...
false
true
f70163d595617592249268b64bea9e62fee7ad0e
48,246
py
Python
jd_beauty_plant.py
21945764/Absinthe
9bc101d49fcd4e53d64dd6065fad8315543c4f17
[ "MIT" ]
320
2022-02-07T11:50:19.000Z
2022-03-31T10:07:55.000Z
jd_beauty_plant.py
21945764/Absinthe
9bc101d49fcd4e53d64dd6065fad8315543c4f17
[ "MIT" ]
25
2022-02-08T00:40:00.000Z
2022-03-31T06:18:08.000Z
jd_beauty_plant.py
21945764/Absinthe
9bc101d49fcd4e53d64dd6065fad8315543c4f17
[ "MIT" ]
274
2022-02-07T11:35:01.000Z
2022-03-31T15:07:18.000Z
#!/bin/env python3 # -*- coding: utf-8 -* ''' 感谢Curtin提供的其他脚本供我参考 感谢aburd ch大佬的指导 项目名称:xF_jd_beauty_plant.py Author: 一风一扬 功能:健康社区-种植园自动任务 Date: 2022-1-4 cron: 10 9,11,15,21 * * * jd_beauty_plant.py new Env('化妆馆-种植园自动任务'); 活动入口:25:/¥2EaeU74Gz07gJ% 教程:该活动与京东的ck通用,所以只需要填写第几个号运行改脚本就行了。 青龙变量填写export plant_cookie="1",代表京...
48.197802
1,343
0.613046
5k9kW4ArJEU3lfLhxBqw%3D%22%2C%22version%22%3A%221.0.3%22%2C%22appname%22%3A%22com.360buy.jdmobile%22%2C%22ridx%22%3A-1%7D&ext=%7B%22prstate%22%3A%220%22%2C%22pvcStu%22%3A%221%22%7D&isBackground=N&joycious=88&lang=zh_CN&networkType=wifi&networklibtype=JDNetworkBaseAF&partner=apple&rfs=0000&scope=01&sign=946db60626658...
true
true
f701647c2b297015f025eb53bd191a1a8c54ec62
18,209
py
Python
tensorflow/contrib/layers/python/kernel_tests/sparse_feature_cross_op_test.py
AlexChrisF/udacity
b7f85a74058fc63ccb7601c418450ab934ef5953
[ "Apache-2.0" ]
522
2016-06-08T02:15:50.000Z
2022-03-02T05:30:36.000Z
tensorflow/contrib/layers/python/kernel_tests/sparse_feature_cross_op_test.py
AlexChrisF/udacity
b7f85a74058fc63ccb7601c418450ab934ef5953
[ "Apache-2.0" ]
48
2016-07-26T00:11:55.000Z
2022-02-23T13:36:33.000Z
tensorflow/contrib/layers/python/kernel_tests/sparse_feature_cross_op_test.py
AlexChrisF/udacity
b7f85a74058fc63ccb7601c418450ab934ef5953
[ "Apache-2.0" ]
108
2016-06-16T15:34:05.000Z
2022-03-12T13:23:11.000Z
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
41.573059
80
0.649953
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy from tensorflow.contrib import layers from tensorflow.contrib.layers.python.ops import sparse_feature_cross_op from tensorflow.python.client import session from tensorflow.python.fr...
true
true
f70164867ee92c37dd1f5df7f9995e1f24766eff
4,105
py
Python
pyunity/scenes/runner.py
rayzchen/PyUnity
8ed436eca7a84f05190c1fa275c58da5c6059926
[ "MIT" ]
null
null
null
pyunity/scenes/runner.py
rayzchen/PyUnity
8ed436eca7a84f05190c1fa275c58da5c6059926
[ "MIT" ]
null
null
null
pyunity/scenes/runner.py
rayzchen/PyUnity
8ed436eca7a84f05190c1fa275c58da5c6059926
[ "MIT" ]
null
null
null
__all__ = ["ChangeScene", "Runner", "WindowRunner", "NonInteractiveRunner", "newRunner"] from .. import config, render, Logger from ..events import EventLoopManager, WaitForUpdate, WaitForFixedUpdate, WaitForRender from ..errors import PyUnityException import copy import os class ChangeScene(Exception): pass cla...
31.098485
98
0.625335
__all__ = ["ChangeScene", "Runner", "WindowRunner", "NonInteractiveRunner", "newRunner"] from .. import config, render, Logger from ..events import EventLoopManager, WaitForUpdate, WaitForFixedUpdate, WaitForRender from ..errors import PyUnityException import copy import os class ChangeScene(Exception): pass cla...
true
true
f7016532b37838aa17bbc7b1b1e0324a6363051f
2,571
py
Python
docs/_ext/rapidsmsdocs.py
datamade/rapidsms
052766eca9d5a79ccc4d1d3b5956c1c34c0d99cb
[ "BSD-3-Clause" ]
null
null
null
docs/_ext/rapidsmsdocs.py
datamade/rapidsms
052766eca9d5a79ccc4d1d3b5956c1c34c0d99cb
[ "BSD-3-Clause" ]
2
2018-08-03T18:48:09.000Z
2019-01-02T19:33:23.000Z
docs/_ext/rapidsmsdocs.py
datamade/rapidsms
052766eca9d5a79ccc4d1d3b5956c1c34c0d99cb
[ "BSD-3-Clause" ]
null
null
null
""" Sphinx plugins for RapidSMS documentation. """ try: import json except ImportError: try: import simplejson as json except ImportError: try: from django.utils import simplejson as json except ImportError: json = None from sphinx import addnodes, roles fro...
31.740741
82
0.56515
try: import json except ImportError: try: import simplejson as json except ImportError: try: from django.utils import simplejson as json except ImportError: json = None from sphinx import addnodes, roles from docutils.parsers.rst import Directive def setup...
true
true
f70165831b1a0ae798b12f7c6cfd6eaade682b3b
1,528
py
Python
src/11.py
vulpicastor/advent-of-code-2021
12aaf84091604caf88acf3b4f7a118d866c33f5f
[ "MIT" ]
null
null
null
src/11.py
vulpicastor/advent-of-code-2021
12aaf84091604caf88acf3b4f7a118d866c33f5f
[ "MIT" ]
null
null
null
src/11.py
vulpicastor/advent-of-code-2021
12aaf84091604caf88acf3b4f7a118d866c33f5f
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # pylint: disable=unused-import import collections import functools import io import itertools import operator as op import re import timeit import numpy as np import aocd YEAR = 2021 DAY = 11 def step(grid): grid += 1 flash = np.zeros_like(grid, dtype=bool) while np.any(grid[~fl...
20.931507
68
0.578534
import collections import functools import io import itertools import operator as op import re import timeit import numpy as np import aocd YEAR = 2021 DAY = 11 def step(grid): grid += 1 flash = np.zeros_like(grid, dtype=bool) while np.any(grid[~flash] > 9): new_flash = (grid > 9) ^ flash ...
true
true
f70165a3a17fd920644947b39c3f7192a33d8c30
5,864
py
Python
tests/rest/test_connection.py
lforesta/openeo-python-client
d6cfc17f9693f6f6bf4a2ce60eac180ee9576543
[ "Apache-2.0" ]
null
null
null
tests/rest/test_connection.py
lforesta/openeo-python-client
d6cfc17f9693f6f6bf4a2ce60eac180ee9576543
[ "Apache-2.0" ]
null
null
null
tests/rest/test_connection.py
lforesta/openeo-python-client
d6cfc17f9693f6f6bf4a2ce60eac180ee9576543
[ "Apache-2.0" ]
null
null
null
import unittest.mock as mock import pytest import requests_mock from openeo.rest.auth.auth import NullAuth, BearerAuth from openeo.rest.connection import Connection, RestApiConnection, connect, OpenEoApiError API_URL = "https://oeo.net/" @pytest.mark.parametrize( ["base", "paths", "expected_path"], [ ...
38.834437
105
0.657913
import unittest.mock as mock import pytest import requests_mock from openeo.rest.auth.auth import NullAuth, BearerAuth from openeo.rest.connection import Connection, RestApiConnection, connect, OpenEoApiError API_URL = "https://oeo.net/" @pytest.mark.parametrize( ["base", "paths", "expected_path"], [ ...
true
true
f701678d9565d7ea82674dde93f7d7ccdabe6c52
10,194
py
Python
yufuquantsdk/clients.py
We-Hack-Studio/nuts-sdk
54ea379156b9f3c36a3ec05ba3d161b16ef43fc4
[ "MIT" ]
1
2021-04-11T03:48:17.000Z
2021-04-11T03:48:17.000Z
yufuquantsdk/clients.py
We-Hack-Studio/nuts-sdk
54ea379156b9f3c36a3ec05ba3d161b16ef43fc4
[ "MIT" ]
null
null
null
yufuquantsdk/clients.py
We-Hack-Studio/nuts-sdk
54ea379156b9f3c36a3ec05ba3d161b16ef43fc4
[ "MIT" ]
3
2021-04-17T22:52:05.000Z
2022-01-05T01:30:57.000Z
import asyncio import json import logging from datetime import datetime from typing import Any, Dict, Iterable, List, Optional, Set, Union import httpx import websockets from websockets import exceptions logger = logging.getLogger("yufuquantsdk") class WebsocketAPIClient: def __init__(self, uri: str, ws: websoc...
35.151724
88
0.572101
import asyncio import json import logging from datetime import datetime from typing import Any, Dict, Iterable, List, Optional, Set, Union import httpx import websockets from websockets import exceptions logger = logging.getLogger("yufuquantsdk") class WebsocketAPIClient: def __init__(self, uri: str, ws: websoc...
true
true
f7016aa5a1922d65f259e33893ab7489e6d9026d
436
py
Python
main.py
flaviopangracio/ort_music
604e4d918d3057ee7ea3716bd3dfb77072e81ba3
[ "MIT" ]
null
null
null
main.py
flaviopangracio/ort_music
604e4d918d3057ee7ea3716bd3dfb77072e81ba3
[ "MIT" ]
null
null
null
main.py
flaviopangracio/ort_music
604e4d918d3057ee7ea3716bd3dfb77072e81ba3
[ "MIT" ]
null
null
null
import discord from discord.ext import commands import os intents = discord.Intents.default() intents.members = True testing = False client = commands.Bot(command_prefix = "-", case_insensitive = True, intents=intents) client.remove_command('help') for filename in os.listdir('./cogs'): if filenam...
24.222222
86
0.697248
import discord from discord.ext import commands import os intents = discord.Intents.default() intents.members = True testing = False client = commands.Bot(command_prefix = "-", case_insensitive = True, intents=intents) client.remove_command('help') for filename in os.listdir('./cogs'): if filenam...
true
true
f7016acf98feae99af9da1775ed115b17df2200d
8,965
py
Python
jack/train_reader.py
elyase/jack
a4f43a4012a540d55d2e05d8a904e6f8cc3002f1
[ "MIT" ]
192
2017-10-19T18:04:56.000Z
2019-09-21T23:29:03.000Z
jack/train_reader.py
elyase/jack
a4f43a4012a540d55d2e05d8a904e6f8cc3002f1
[ "MIT" ]
120
2017-10-16T09:46:07.000Z
2019-06-20T18:34:24.000Z
jack/train_reader.py
elyase/jack
a4f43a4012a540d55d2e05d8a904e6f8cc3002f1
[ "MIT" ]
50
2017-10-19T09:57:45.000Z
2019-07-24T13:46:26.000Z
# -*- coding: utf-8 -*- import logging import math import os import random import shutil import tensorflow as tf from jack import readers from jack.core.tensorflow import TFReader from jack.eval import evaluate_reader, pretty_print_results from jack.util.hooks import LossHook, ExamplesPerSecHook, ETAHook logger = l...
40.201794
114
0.695482
import logging import math import os import random import shutil import tensorflow as tf from jack import readers from jack.core.tensorflow import TFReader from jack.eval import evaluate_reader, pretty_print_results from jack.util.hooks import LossHook, ExamplesPerSecHook, ETAHook logger = logging.getLogger(__name...
true
true
f7016b5152ebd061fcd29b371db0ceded5c080ba
23,671
py
Python
utils/batchnorm_layer.py
limberc/hypercl
ad098a3b18cf2a2ae6e3ecd28a2b7af698f7b807
[ "Apache-2.0" ]
null
null
null
utils/batchnorm_layer.py
limberc/hypercl
ad098a3b18cf2a2ae6e3ecd28a2b7af698f7b807
[ "Apache-2.0" ]
null
null
null
utils/batchnorm_layer.py
limberc/hypercl
ad098a3b18cf2a2ae6e3ecd28a2b7af698f7b807
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # Copyright 2019 Christian Henning # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
44.080074
138
0.567023
from warnings import warn import torch import torch.nn as nn import torch.nn.functional as F class BatchNormLayer(nn.Module): def __init__(self, num_features, momentum=0.1, affine=True, track_running_stats=True, frozen_stats=False, learnable_stats=False): ...
true
true
f7016c5c21cf950aa7d4520f766ef05b3aa9a22c
14,028
py
Python
tensorflow/contrib/learn/python/learn/estimators/linear.py
calebchoo/modulabs
10fbaf0581700641fc9b38b1bd722044bfb7c638
[ "Apache-2.0" ]
null
null
null
tensorflow/contrib/learn/python/learn/estimators/linear.py
calebchoo/modulabs
10fbaf0581700641fc9b38b1bd722044bfb7c638
[ "Apache-2.0" ]
null
null
null
tensorflow/contrib/learn/python/learn/estimators/linear.py
calebchoo/modulabs
10fbaf0581700641fc9b38b1bd722044bfb7c638
[ "Apache-2.0" ]
1
2020-03-26T00:09:00.000Z
2020-03-26T00:09:00.000Z
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
39.294118
82
0.71008
from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.contrib import layers from tensorflow.contrib.framework.python.ops import variables as contrib_variables from tensorflow.contrib.learn.python.learn.estimators import _sklearn fro...
true
true
f7016c7c0c3a67ee7989e59320e22bece5f09791
9,486
py
Python
py/trtorch/_compile_spec.py
peri044/TRTorch
62c9830b24552651abbff611515114cbcaca8b7b
[ "BSD-3-Clause" ]
1
2021-06-18T17:26:58.000Z
2021-06-18T17:26:58.000Z
py/trtorch/_compile_spec.py
peri044/TRTorch
62c9830b24552651abbff611515114cbcaca8b7b
[ "BSD-3-Clause" ]
null
null
null
py/trtorch/_compile_spec.py
peri044/TRTorch
62c9830b24552651abbff611515114cbcaca8b7b
[ "BSD-3-Clause" ]
null
null
null
from typing import List, Dict, Any import torch import trtorch._C from trtorch import _types def _supported_input_size_type(input_size: Any) -> bool: if isinstance(input_size, torch.Size): return True elif isinstance(input_size, tuple): return True elif isinstance(input_size, list): ...
42.16
145
0.630824
from typing import List, Dict, Any import torch import trtorch._C from trtorch import _types def _supported_input_size_type(input_size: Any) -> bool: if isinstance(input_size, torch.Size): return True elif isinstance(input_size, tuple): return True elif isinstance(input_size, list): ...
true
true
f7016cf80f2cf98c95ee5e74713188d48fa48077
295
py
Python
appointment_booking_drchrono/appointments/urls.py
TimothyBest/Appointment_Booking_drchrono
279faf13724e768a6712d2f9911fe32399e4544c
[ "MIT" ]
null
null
null
appointment_booking_drchrono/appointments/urls.py
TimothyBest/Appointment_Booking_drchrono
279faf13724e768a6712d2f9911fe32399e4544c
[ "MIT" ]
null
null
null
appointment_booking_drchrono/appointments/urls.py
TimothyBest/Appointment_Booking_drchrono
279faf13724e768a6712d2f9911fe32399e4544c
[ "MIT" ]
null
null
null
from django.conf.urls import patterns, url urlpatterns = patterns('appointments.views', url(r'^appointment/(?P<practice_id>\d+)/$', 'appointment_form', name='appointment_form'), url(r'^appointment/created/(?P<practice_id>\d+)/$', 'appointment_created', name='appointment_created'), )
32.777778
107
0.718644
from django.conf.urls import patterns, url urlpatterns = patterns('appointments.views', url(r'^appointment/(?P<practice_id>\d+)/$', 'appointment_form', name='appointment_form'), url(r'^appointment/created/(?P<practice_id>\d+)/$', 'appointment_created', name='appointment_created'), )
true
true
f7016d30d5f6e38ed75c2e93258d83dff26db920
2,848
py
Python
menu.py
applefreak/europi
6ad531c72e148fd1c5f75ee82e588b886ef330a4
[ "MIT" ]
1
2021-01-11T01:36:07.000Z
2021-01-11T01:36:07.000Z
menu.py
applefreak/europi
6ad531c72e148fd1c5f75ee82e588b886ef330a4
[ "MIT" ]
null
null
null
menu.py
applefreak/europi
6ad531c72e148fd1c5f75ee82e588b886ef330a4
[ "MIT" ]
null
null
null
from PIL import Image from PIL import ImageDraw from PIL import ImageFont from rotary_class import RotaryEncoder class Display(): def __init__(self, disp): self.disp = disp self.dimensions = (disp.width, disp.height) self.image = Image.new('1', self.dimensions) self.draw = ImageDraw...
32
129
0.542837
from PIL import Image from PIL import ImageDraw from PIL import ImageFont from rotary_class import RotaryEncoder class Display(): def __init__(self, disp): self.disp = disp self.dimensions = (disp.width, disp.height) self.image = Image.new('1', self.dimensions) self.draw = ImageDraw...
true
true
f7016dd197dc84aeab737877e938c7ecfc8970b5
5,276
py
Python
tests/analyzer/test_as_import.py
CAM-Gerlach/unimport
acaebf547274a95a33816e47ec22bb73d8456b17
[ "MIT" ]
147
2019-09-19T15:43:06.000Z
2022-03-25T16:42:08.000Z
tests/analyzer/test_as_import.py
CAM-Gerlach/unimport
acaebf547274a95a33816e47ec22bb73d8456b17
[ "MIT" ]
154
2019-10-31T19:50:18.000Z
2022-03-29T12:43:00.000Z
tests/analyzer/test_as_import.py
CAM-Gerlach/unimport
acaebf547274a95a33816e47ec22bb73d8456b17
[ "MIT" ]
28
2019-10-31T18:11:13.000Z
2021-09-06T08:24:14.000Z
from tests.analyzer.utils import UnusedTestCase from unimport.statement import Import, ImportFrom class AsImportTestCase(UnusedTestCase): def test_as_import_all_unused_all_cases(self): self.assertSourceAfterScanningEqualToExpected( """\ from x import y as z import x ...
29.311111
60
0.288855
from tests.analyzer.utils import UnusedTestCase from unimport.statement import Import, ImportFrom class AsImportTestCase(UnusedTestCase): def test_as_import_all_unused_all_cases(self): self.assertSourceAfterScanningEqualToExpected( """\ from x import y as z import x ...
true
true
f7016f34f904942762b689e2683eb61c1e3e3a29
2,470
py
Python
modules/Google_Takeout/modules/utils/takeout_case.py
dfrc-korea/carpe
9afa8b624948fd462bb19c90cbc811228fd52c21
[ "Apache-2.0" ]
56
2019-02-07T06:21:45.000Z
2022-03-21T08:19:24.000Z
modules/Google_Takeout/modules/utils/takeout_case.py
dfrc-korea/carpe
9afa8b624948fd462bb19c90cbc811228fd52c21
[ "Apache-2.0" ]
5
2020-05-25T17:29:00.000Z
2021-12-13T20:49:08.000Z
modules/Google_Takeout/modules/utils/takeout_case.py
dfrc-korea/carpe
9afa8b624948fd462bb19c90cbc811228fd52c21
[ "Apache-2.0" ]
31
2019-03-13T10:23:49.000Z
2021-11-04T12:14:58.000Z
import os from .takeout_sqlite3 import SQLite3 import multiprocessing CONTACTS = 'Contacts' + os.sep + 'All Contacts' + os.sep + 'All Contacts.vcf' DRIVE = 'Drive' MY_ACTIVITY_ASSISTANT_PATH = 'My Activity' + os.sep + 'Assistant' + os.sep + 'MyActivity.html' MY_ACTIVITY_GMAIL_PATH = 'My Activity' + os.sep + 'Gmail' +...
53.695652
113
0.773684
import os from .takeout_sqlite3 import SQLite3 import multiprocessing CONTACTS = 'Contacts' + os.sep + 'All Contacts' + os.sep + 'All Contacts.vcf' DRIVE = 'Drive' MY_ACTIVITY_ASSISTANT_PATH = 'My Activity' + os.sep + 'Assistant' + os.sep + 'MyActivity.html' MY_ACTIVITY_GMAIL_PATH = 'My Activity' + os.sep + 'Gmail' +...
true
true
f7016f7ed1a12ccf8abe398fe979b5e78fb5499f
2,938
py
Python
gym_puyopuyo/test-feedforward-smallenv.py
brnor/dipl
db516610aecffb10825e899fb5aa9f2902093b6e
[ "MIT" ]
null
null
null
gym_puyopuyo/test-feedforward-smallenv.py
brnor/dipl
db516610aecffb10825e899fb5aa9f2902093b6e
[ "MIT" ]
null
null
null
gym_puyopuyo/test-feedforward-smallenv.py
brnor/dipl
db516610aecffb10825e899fb5aa9f2902093b6e
[ "MIT" ]
null
null
null
from __future__ import print_function import os import pickle import time from gym_puyopuyo import register import gym import numpy as np import neat import visualize piece_shape = (3, 2) DRAW_NETS = False NUM_COLORS = 3.0 # 3 colors in the small env mode # TODO: could probably read color number from observation da...
28.803922
77
0.591559
from __future__ import print_function import os import pickle import time from gym_puyopuyo import register import gym import numpy as np import neat import visualize piece_shape = (3, 2) DRAW_NETS = False NUM_COLORS = 3.0 fn_results = "feedforward-small" def multiplyMatrices(pieces, field, norm = True): pie...
true
true
f7016fdcb57fb610e943f783ffeb624675e41126
2,021
py
Python
app/dao/broadcast_message_dao.py
tlwr/notifications-api
88a6b7729edb9be41ce3e7c027f1452b7b6d00d2
[ "MIT" ]
null
null
null
app/dao/broadcast_message_dao.py
tlwr/notifications-api
88a6b7729edb9be41ce3e7c027f1452b7b6d00d2
[ "MIT" ]
null
null
null
app/dao/broadcast_message_dao.py
tlwr/notifications-api
88a6b7729edb9be41ce3e7c027f1452b7b6d00d2
[ "MIT" ]
null
null
null
import uuid from app import db from app.dao.dao_utils import transactional from app.models import ( BroadcastMessage, BroadcastEvent, BroadcastProvider, BroadcastProviderMessage, BroadcastProviderMessageNumber, BroadcastProviderMessageStatus ) def dao_get_broadcast_message_by_id_and_service_i...
31.578125
85
0.764473
import uuid from app import db from app.dao.dao_utils import transactional from app.models import ( BroadcastMessage, BroadcastEvent, BroadcastProvider, BroadcastProviderMessage, BroadcastProviderMessageNumber, BroadcastProviderMessageStatus ) def dao_get_broadcast_message_by_id_and_service_i...
true
true
f7016fe4e649e0defe4ee246bb7a91d3d39ef94e
1,706
py
Python
python/open3d/ml/torch/pipelines.py
xkaraman/Open3D
a1d65eca537a2b099fc3b6d08edb26e45b717e40
[ "MIT" ]
2
2020-12-08T15:38:34.000Z
2021-04-10T02:58:15.000Z
python/open3d/ml/torch/pipelines.py
moonwonlee/Open3D
dda9b3a0129fa6c60f913672a70ff02483dcd0f3
[ "MIT" ]
null
null
null
python/open3d/ml/torch/pipelines.py
moonwonlee/Open3D
dda9b3a0129fa6c60f913672a70ff02483dcd0f3
[ "MIT" ]
1
2021-11-05T01:16:13.000Z
2021-11-05T01:16:13.000Z
# ---------------------------------------------------------------------------- # - Open3D: www.open3d.org - # ---------------------------------------------------------------------------- # The MIT License (MIT) # # Copyright (c) 2020 www.open3d.org # # Permission is her...
44.894737
79
0.631301
import os as _os from open3d import _build_config if _build_config['BUNDLE_OPEN3D_ML']: if 'OPEN3D_ML_ROOT' in _os.environ: from ml3d.torch.pipelines import * else: from open3d._ml3d.torch.pipelines import *
true
true
f7016fee3d19733d380e1f4199f8769b9529e54f
722
py
Python
{{cookiecutter.project_name}}/core/deployment/gunicorn_conf.py
ProjectTemplates/django-webpack-app
50081d009162503042840a904e25c4b32d606cf5
[ "MIT" ]
2
2020-11-10T10:16:48.000Z
2021-02-05T13:21:11.000Z
{{cookiecutter.project_name}}/core/deployment/gunicorn_conf.py
ProjectTemplates/django-webpack-app
50081d009162503042840a904e25c4b32d606cf5
[ "MIT" ]
null
null
null
{{cookiecutter.project_name}}/core/deployment/gunicorn_conf.py
ProjectTemplates/django-webpack-app
50081d009162503042840a904e25c4b32d606cf5
[ "MIT" ]
1
2021-02-05T11:37:18.000Z
2021-02-05T11:37:18.000Z
import os def to_bool(value): return ( value is True or (isinstance(value, str) and value.lower() in ['true', 'yes']) or (isinstance(value, (int, float)) and value > 0) ) bind = '0.0.0.0:{}'.format(os.getenv('GUNICORN_PORT', '8000')) max_requests = int(os.getenv('GUNICORN_MAX_REQUEST...
27.769231
75
0.671745
import os def to_bool(value): return ( value is True or (isinstance(value, str) and value.lower() in ['true', 'yes']) or (isinstance(value, (int, float)) and value > 0) ) bind = '0.0.0.0:{}'.format(os.getenv('GUNICORN_PORT', '8000')) max_requests = int(os.getenv('GUNICORN_MAX_REQUEST...
true
true
f701701a180004073de4f335fee9153105be7e42
584
py
Python
tests/test_pin_num_name.py
arjenroodselaar/skidl
0bf801bd3b74e6ef94bd9aa1b68eef756b568276
[ "MIT" ]
2
2022-02-27T14:31:52.000Z
2022-02-27T14:31:56.000Z
tests/test_pin_num_name.py
arjenroodselaar/skidl
0bf801bd3b74e6ef94bd9aa1b68eef756b568276
[ "MIT" ]
null
null
null
tests/test_pin_num_name.py
arjenroodselaar/skidl
0bf801bd3b74e6ef94bd9aa1b68eef756b568276
[ "MIT" ]
1
2020-09-21T23:31:41.000Z
2020-09-21T23:31:41.000Z
import pytest from skidl import * from .setup_teardown import * def test_pin_names_1(): codec = Part("xess.lib", "ak4520a") assert codec["ain"] == codec.n["ain"] assert codec[1:4] == codec.p[1:4] def test_pin_names_2(): codec = Part("xess.lib", "ak4520a") codec[4].name = "A1" codec[8].name...
23.36
41
0.599315
import pytest from skidl import * from .setup_teardown import * def test_pin_names_1(): codec = Part("xess.lib", "ak4520a") assert codec["ain"] == codec.n["ain"] assert codec[1:4] == codec.p[1:4] def test_pin_names_2(): codec = Part("xess.lib", "ak4520a") codec[4].name = "A1" codec[8].name...
true
true
f701701fc0217b14ad2a52b62b79d747b1021bdd
5,395
py
Python
asynction/types.py
pedrohbtp/asynction
939f9b3fdf09f8bf89da9a8c5222234c07594d22
[ "MIT" ]
null
null
null
asynction/types.py
pedrohbtp/asynction
939f9b3fdf09f8bf89da9a8c5222234c07594d22
[ "MIT" ]
null
null
null
asynction/types.py
pedrohbtp/asynction
939f9b3fdf09f8bf89da9a8c5222234c07594d22
[ "MIT" ]
null
null
null
from dataclasses import dataclass from dataclasses import field from typing import Any from typing import Callable from typing import Mapping from typing import Optional from typing import Sequence from typing import Type from svarog import forge from svarog import register_forge from svarog.types import Forge JSONMa...
29.005376
88
0.67785
from dataclasses import dataclass from dataclasses import field from typing import Any from typing import Callable from typing import Mapping from typing import Optional from typing import Sequence from typing import Type from svarog import forge from svarog import register_forge from svarog.types import Forge JSONMa...
true
true
f70170a2d31c03ce7897bd9581ae37e1f9d43725
415
py
Python
Equities/AHTable/ah_image.py
GSam/OCR-Pipelines
ca26d34d2e8271f014e53e4c90a58310790d2bee
[ "MIT" ]
null
null
null
Equities/AHTable/ah_image.py
GSam/OCR-Pipelines
ca26d34d2e8271f014e53e4c90a58310790d2bee
[ "MIT" ]
null
null
null
Equities/AHTable/ah_image.py
GSam/OCR-Pipelines
ca26d34d2e8271f014e53e4c90a58310790d2bee
[ "MIT" ]
null
null
null
import subprocess def process_image(filename, scale=1.0): output, _ = subprocess.Popen(['./Capture2Text_CLI', '-platform', 'offscreen', '-i', filename, '--blacklist', '~|\\V', '--scale-factor', str(scale)], stdout...
37.727273
88
0.513253
import subprocess def process_image(filename, scale=1.0): output, _ = subprocess.Popen(['./Capture2Text_CLI', '-platform', 'offscreen', '-i', filename, '--blacklist', '~|\\V', '--scale-factor', str(scale)], stdout...
false
true
f701720dc66511da8b41f4c16f88ff2e260dada6
408
py
Python
ia870/iaframe.py
rdenadai/ia870p3
c4823efc4b8e5f187a64f8a4e9962e328bf86967
[ "BSD-2-Clause" ]
5
2018-10-15T12:02:03.000Z
2022-02-11T12:47:12.000Z
ia870/iaframe.py
rdenadai/ia870p3
c4823efc4b8e5f187a64f8a4e9962e328bf86967
[ "BSD-2-Clause" ]
1
2018-10-15T12:04:36.000Z
2019-01-25T12:04:35.000Z
ia870/iaframe.py
rdenadai/ia870p3
c4823efc4b8e5f187a64f8a4e9962e328bf86967
[ "BSD-2-Clause" ]
4
2019-01-25T11:13:48.000Z
2020-12-20T01:42:33.000Z
# -*- encoding: utf-8 -*- # Module iaframe from numpy import * def iaframe(f, WT=1, HT=1, DT=0, k1=None, k2=None): from ia870 import iaunion, iaintersec,ialimits if k1 is None: k1 = ialimits(f)[1] if k2 is None: k2 = ialimits(f)[0] assert len(f.shape)==2,'Supports 2D only' y = iaintersec(f,k2) ...
21.473684
51
0.561275
from numpy import * def iaframe(f, WT=1, HT=1, DT=0, k1=None, k2=None): from ia870 import iaunion, iaintersec,ialimits if k1 is None: k1 = ialimits(f)[1] if k2 is None: k2 = ialimits(f)[0] assert len(f.shape)==2,'Supports 2D only' y = iaintersec(f,k2) y[:,0:WT] = k1 y[:,-WT:] = k1 y...
true
true
f701723f59060b992caf1d8a7d57f53a6176b3ab
731
py
Python
aula4-factory/lifetime.py
eduardofagnoni/curso-flask
65e7d78380910a65f3c18bdda7604875c38d4e6b
[ "Unlicense" ]
null
null
null
aula4-factory/lifetime.py
eduardofagnoni/curso-flask
65e7d78380910a65f3c18bdda7604875c38d4e6b
[ "Unlicense" ]
null
null
null
aula4-factory/lifetime.py
eduardofagnoni/curso-flask
65e7d78380910a65f3c18bdda7604875c38d4e6b
[ "Unlicense" ]
null
null
null
#contextos from flask import Flask import flask app = Flask(__name__) ## 1 Configuração ### Add configuração app.config["DEBUG"] = True app.config["SQLALCHEMY_DB_URI"] = "mysql://" ### Registrar Rotas @app.route("/path") def funcao(): pass # ou app.add_url_rule("/path", funcao) ### Inicializar extensões #fro...
13.537037
44
0.689466
from flask import Flask import flask app = Flask(__name__) DB_URI"] = "mysql://" pass app.add_url_rule("/path", funcao)
false
true
f7017311d918b6323937deb442372097cda94beb
3,713
py
Python
tests/common.py
lucmichalski/saraki
74c11f70b4e7bdedfd33984cb96944c27a4eebbf
[ "MIT" ]
3
2020-07-01T17:34:39.000Z
2021-05-04T17:53:01.000Z
tests/common.py
lucmichalski/saraki
74c11f70b4e7bdedfd33984cb96944c27a4eebbf
[ "MIT" ]
25
2018-01-25T00:56:18.000Z
2021-06-12T04:29:00.000Z
tests/common.py
lucmichalski/saraki
74c11f70b4e7bdedfd33984cb96944c27a4eebbf
[ "MIT" ]
4
2020-04-19T21:24:34.000Z
2021-01-23T19:04:27.000Z
import jwt from contextlib import contextmanager from datetime import datetime, timedelta from sqlalchemy import Column, Integer, String, DateTime, Boolean from sqlalchemy import ForeignKey, func from sqlalchemy.orm import relationship from saraki.auth import _request_ctx_stack, User, Org from saraki.model import Bas...
24.267974
88
0.693509
import jwt from contextlib import contextmanager from datetime import datetime, timedelta from sqlalchemy import Column, Integer, String, DateTime, Boolean from sqlalchemy import ForeignKey, func from sqlalchemy.orm import relationship from saraki.auth import _request_ctx_stack, User, Org from saraki.model import Bas...
true
true
f70173d8b3c5468c29206b1fd97bf8bc365f64be
3,104
py
Python
basic/string2.py
Ifo0/google-dev-course
c96d688ad4d50ec63e02b9edd671334dcd2d2811
[ "Apache-2.0" ]
null
null
null
basic/string2.py
Ifo0/google-dev-course
c96d688ad4d50ec63e02b9edd671334dcd2d2811
[ "Apache-2.0" ]
null
null
null
basic/string2.py
Ifo0/google-dev-course
c96d688ad4d50ec63e02b9edd671334dcd2d2811
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python2.4 -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ # Additional basic string exercises # D. verbing # Given a string, if its length is a...
30.431373
77
0.641108
# http://code.google.com/edu/languages/google-python-class/ # Additional basic string exercises # D. verbing # Given a string, if its length is at least 3, # add 'ing' to its end. # Unless it already ends in 'ing', in which case # add 'ly' instead. # If the string length is less than 3, leave it unchanged. # Re...
false
true
f70173db91482b779289e981d3527cf4fdf8b6bc
1,990
py
Python
do_trim.py
eric-haibin-lin/text-proc
f84e2d6f802302fef5f20a2cb4b7583a57dd15c3
[ "Apache-2.0" ]
9
2019-07-16T21:30:01.000Z
2022-01-26T02:32:26.000Z
do_trim.py
eric-haibin-lin/text-proc
f84e2d6f802302fef5f20a2cb4b7583a57dd15c3
[ "Apache-2.0" ]
null
null
null
do_trim.py
eric-haibin-lin/text-proc
f84e2d6f802302fef5f20a2cb4b7583a57dd15c3
[ "Apache-2.0" ]
2
2020-02-29T13:21:26.000Z
2020-08-19T09:27:29.000Z
from multiprocessing import Pool import argparse import glob import os import io import time import logging import gluonnlp as nlp import tokenizer as tokenization parser = argparse.ArgumentParser(description='BERT tokenizer') parser.add_argument('--input_files', type=str, default='wiki_*.doc', hel...
32.622951
91
0.59799
from multiprocessing import Pool import argparse import glob import os import io import time import logging import gluonnlp as nlp import tokenizer as tokenization parser = argparse.ArgumentParser(description='BERT tokenizer') parser.add_argument('--input_files', type=str, default='wiki_*.doc', hel...
true
true
f701749353fbb9936ba4dc99198030f7ba70dc97
6,952
py
Python
_scripts/image_slicer/main.py
deniskolokol/soma
88cf7d9e19c5c66e98d48798658ac67737b6ff89
[ "MIT" ]
null
null
null
_scripts/image_slicer/main.py
deniskolokol/soma
88cf7d9e19c5c66e98d48798658ac67737b6ff89
[ "MIT" ]
null
null
null
_scripts/image_slicer/main.py
deniskolokol/soma
88cf7d9e19c5c66e98d48798658ac67737b6ff89
[ "MIT" ]
null
null
null
''' Main functionality of ``image_slicer``. ''' import os import time import optparse from math import sqrt, ceil, floor from PIL import Image from helpers import get_basename class Tile(object): """Represents a single tile.""" def __init__(self, image, number, position, coords, filename=None): sel...
32.485981
86
0.584292
''' Main functionality of ``image_slicer``. ''' import os import time import optparse from math import sqrt, ceil, floor from PIL import Image from helpers import get_basename class Tile(object): """Represents a single tile.""" def __init__(self, image, number, position, coords, filename=None): sel...
false
true
f7017509f204ca09eefcaa0814db20be4363c56d
445
py
Python
d9b.py
jogloran/advent-of-code-2020
9804f1eb8d94c991d9aa3348f01f4bf65c195849
[ "MIT" ]
null
null
null
d9b.py
jogloran/advent-of-code-2020
9804f1eb8d94c991d9aa3348f01f4bf65c195849
[ "MIT" ]
null
null
null
d9b.py
jogloran/advent-of-code-2020
9804f1eb8d94c991d9aa3348f01f4bf65c195849
[ "MIT" ]
null
null
null
import sys; from more_itertools import windowed, first_true orig_data = list(map(int, open('d9.txt'))) data = orig_data[:] target = 32321523 for i, e in enumerate(data): if i == 0: continue data[i] = data[i - 1] + data[i] for i in range(len(data)): for j in range(i): if data[i] - data[j] == target:...
31.785714
64
0.58427
import sys; from more_itertools import windowed, first_true orig_data = list(map(int, open('d9.txt'))) data = orig_data[:] target = 32321523 for i, e in enumerate(data): if i == 0: continue data[i] = data[i - 1] + data[i] for i in range(len(data)): for j in range(i): if data[i] - data[j] == target:...
true
true
f70175903618b46cbc2465f247c1e2539656a5a4
6,355
py
Python
zhaquirks/xiaomi/aqara/remote_b186acn01.py
sylvaing/zha-device-handlers
61dedab318a8986b2b0a7bffe5116bbc40bed214
[ "Apache-2.0" ]
null
null
null
zhaquirks/xiaomi/aqara/remote_b186acn01.py
sylvaing/zha-device-handlers
61dedab318a8986b2b0a7bffe5116bbc40bed214
[ "Apache-2.0" ]
null
null
null
zhaquirks/xiaomi/aqara/remote_b186acn01.py
sylvaing/zha-device-handlers
61dedab318a8986b2b0a7bffe5116bbc40bed214
[ "Apache-2.0" ]
null
null
null
"""Xiaomi aqara single key switch device.""" import logging from zigpy.profiles import zha from zigpy.zcl.clusters.general import ( AnalogInput, Basic, Groups, Identify, MultistateInput, OnOff, Ota, Scenes, ) from .. import ( LUMI, XIAOMI_NODE_DESC, BasicCluster, Xiaomi...
31.305419
84
0.51786
import logging from zigpy.profiles import zha from zigpy.zcl.clusters.general import ( AnalogInput, Basic, Groups, Identify, MultistateInput, OnOff, Ota, Scenes, ) from .. import ( LUMI, XIAOMI_NODE_DESC, BasicCluster, XiaomiPowerConfiguration, XiaomiQuickInitDevice...
true
true
f701763c784e49214fd9a7e52a90d440b81882b8
28,284
py
Python
vscode/extensions/ms-python.python-2022.4.1/pythonFiles/lib/python/debugpy/adapter/clients.py
despresj/dotfiles
1c76fc4efcc125f74aa5ebdc4aa521277a360379
[ "MIT" ]
null
null
null
vscode/extensions/ms-python.python-2022.4.1/pythonFiles/lib/python/debugpy/adapter/clients.py
despresj/dotfiles
1c76fc4efcc125f74aa5ebdc4aa521277a360379
[ "MIT" ]
null
null
null
vscode/extensions/ms-python.python-2022.4.1/pythonFiles/lib/python/debugpy/adapter/clients.py
despresj/dotfiles
1c76fc4efcc125f74aa5ebdc4aa521277a360379
[ "MIT" ]
null
null
null
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See LICENSE in the project root # for license information. from __future__ import absolute_import, division, print_function, unicode_literals import atexit import os import sys import debugpy from debugpy import ...
41.110465
96
0.554306
from __future__ import absolute_import, division, print_function, unicode_literals import atexit import os import sys import debugpy from debugpy import adapter, common, launcher from debugpy.common import compat, fmt, json, log, messaging, sockets from debugpy.common.compat import unicode from debugpy...
true
true
f701767e7eb4bd50bad3cd14a4cce3b563d834a2
510
py
Python
p03.2/double_letters.py
LukeBriggsDev/GCSE-Code-Tasks
ed696873f6f9980e32b85ab7850cef8e75d52604
[ "MIT" ]
null
null
null
p03.2/double_letters.py
LukeBriggsDev/GCSE-Code-Tasks
ed696873f6f9980e32b85ab7850cef8e75d52604
[ "MIT" ]
null
null
null
p03.2/double_letters.py
LukeBriggsDev/GCSE-Code-Tasks
ed696873f6f9980e32b85ab7850cef8e75d52604
[ "MIT" ]
null
null
null
""" Problem: The function 'doubler' takes a word as input. It should create and print a string, where each character in the string is doubled, for example: "test" -> "tteesstt" Tests: >>> doubler("test") tteesstt >>> doubler("original") oorriiggiinnaall >>> doubler("hihihi") hhiihhi...
15
69
0.65098
import doctest def run_tests(): doctest.testmod(verbose=True) def doubler(word): print(''.join([char + char for char in word])) if __name__ == "__main__": run_tests()
true
true
f70176d180413d27094964996f759d35f158b8ae
1,328
py
Python
idread.py
sdwhturbosun/pn532_spi4student
72af24e3e7a72811589fbc225f231330d470acad
[ "MIT" ]
null
null
null
idread.py
sdwhturbosun/pn532_spi4student
72af24e3e7a72811589fbc225f231330d470acad
[ "MIT" ]
null
null
null
idread.py
sdwhturbosun/pn532_spi4student
72af24e3e7a72811589fbc225f231330d470acad
[ "MIT" ]
null
null
null
import binascii import sys import Adafruit_PN532 as PN532 # Setup how the PN532 is connected to the Raspbery Pi/BeagleBone Black. # It is recommended to use a software SPI connection with 4 digital GPIO pins. # Configuration for a Raspberry Pi: CS = 8 #pn532_nss----->rpi_ce0:8 MOSI = 9 #pn532_mosi---->rpi__m...
26.039216
78
0.700301
import binascii import sys import Adafruit_PN532 as PN532 CS = 8 MOSI = 9 MISO = 10 SCLK = 11 pn532 = PN532.PN532(cs=CS, sclk=SCLK, mosi=MOSI, miso=MISO) pn532.begin() ic, ver, rev, support = pn532.get_firmware_version() print('Found PN532 with firmware version: {0}.{1}'.format(ver, rev...
true
true
f70177f8792e21fd19853261c7c4d9f5f44b972b
79
py
Python
tests/test_cli.py
pbujold/macaqueModules
3f55ec45f691972e40cc8bd98071b7934ae24349
[ "MIT" ]
1
2021-08-25T08:45:52.000Z
2021-08-25T08:45:52.000Z
tests/test_cli.py
pbujold/macaqueModules
3f55ec45f691972e40cc8bd98071b7934ae24349
[ "MIT" ]
null
null
null
tests/test_cli.py
pbujold/macaqueModules
3f55ec45f691972e40cc8bd98071b7934ae24349
[ "MIT" ]
null
null
null
from macaque import cli def test_cli_template(): assert cli.cli() is None
15.8
28
0.734177
from macaque import cli def test_cli_template(): assert cli.cli() is None
true
true
f7017816f2ca3a9c790e346ca4d93eb29edd1df0
262
py
Python
17.05.2022/POO/parte3/webBonus/meu_site.py
N0N4T0/python-codes
ac2b884f86749a8b179ff972cdb316ec4e005b32
[ "MIT" ]
null
null
null
17.05.2022/POO/parte3/webBonus/meu_site.py
N0N4T0/python-codes
ac2b884f86749a8b179ff972cdb316ec4e005b32
[ "MIT" ]
null
null
null
17.05.2022/POO/parte3/webBonus/meu_site.py
N0N4T0/python-codes
ac2b884f86749a8b179ff972cdb316ec4e005b32
[ "MIT" ]
null
null
null
# Antes de mais nada install o flask = pip install flask from flask import Flask app = Flask(__name__) @app.route('/') def homepage(): return 'Essa é minha HomePage' @app.route('/contatos') def contatos(): return 'Essa são os meus contatos' app.run()
18.714286
56
0.694656
from flask import Flask app = Flask(__name__) @app.route('/') def homepage(): return 'Essa é minha HomePage' @app.route('/contatos') def contatos(): return 'Essa são os meus contatos' app.run()
true
true
f70178817daa3868f8cf3f8e570980b45d7a7bd8
1,183
py
Python
unjabberlib/formatters.py
adsr303/unjabber
159f5fc8468e51c885a97c215196241c63b42a1e
[ "MIT" ]
null
null
null
unjabberlib/formatters.py
adsr303/unjabber
159f5fc8468e51c885a97c215196241c63b42a1e
[ "MIT" ]
null
null
null
unjabberlib/formatters.py
adsr303/unjabber
159f5fc8468e51c885a97c215196241c63b42a1e
[ "MIT" ]
null
null
null
from itertools import zip_longest DAY = 'day' HOUR = 'hour' NAME = 'name' class Formatter: def __init__(self, indent=5 * ' '): self.indent = indent def append(self, text, tag=None): raise NotImplementedError('Must override append() in derived class') def println(self, *args): se...
26.288889
80
0.50634
from itertools import zip_longest DAY = 'day' HOUR = 'hour' NAME = 'name' class Formatter: def __init__(self, indent=5 * ' '): self.indent = indent def append(self, text, tag=None): raise NotImplementedError('Must override append() in derived class') def println(self, *args): se...
true
true
f70178a47dec7e27f047d239baba69c6694baf37
1,910
py
Python
src/prototypes/prototypes.py
kprzybyla/prototypes
e4a8eb05071a1df62ed59fd5d4e69510a9db8e8a
[ "MIT" ]
null
null
null
src/prototypes/prototypes.py
kprzybyla/prototypes
e4a8eb05071a1df62ed59fd5d4e69510a9db8e8a
[ "MIT" ]
null
null
null
src/prototypes/prototypes.py
kprzybyla/prototypes
e4a8eb05071a1df62ed59fd5d4e69510a9db8e8a
[ "MIT" ]
null
null
null
__all__ = [ "prototype", ] import sys from inspect import ( signature, ) from typing import ( TypeVar, Callable, ) from .exceptions import ( PrototypeError, ) if sys.version_info >= (3, 10): from typing import ParamSpec else: from typing_extensions import ParamSpec # pragma: no cover ...
27.681159
97
0.704712
__all__ = [ "prototype", ] import sys from inspect import ( signature, ) from typing import ( TypeVar, Callable, ) from .exceptions import ( PrototypeError, ) if sys.version_info >= (3, 10): from typing import ParamSpec else: from typing_extensions import ParamSpec Parameters = Param...
true
true
f70178cbf4ef5105a30edcd3a5daa6e7f179211c
571
py
Python
chapter9_Computer-Vision/Deep-Dream/util.py
kumi123/pytorch-learning
29f5b4d53f4e72b95b3fab979b1bc496ef23674c
[ "MIT" ]
null
null
null
chapter9_Computer-Vision/Deep-Dream/util.py
kumi123/pytorch-learning
29f5b4d53f4e72b95b3fab979b1bc496ef23674c
[ "MIT" ]
null
null
null
chapter9_Computer-Vision/Deep-Dream/util.py
kumi123/pytorch-learning
29f5b4d53f4e72b95b3fab979b1bc496ef23674c
[ "MIT" ]
null
null
null
import PIL.Image from io import BytesIO from IPython.display import clear_output, Image, display import numpy as np def showarray(a, fmt='jpeg'): a = np.uint8(np.clip(a, 0, 255)) f = BytesIO() PIL.Image.fromarray(a).save(f, fmt) display(Image(data=f.getvalue())) def showtensor(a): mean = np.arra...
24.826087
61
0.607706
import PIL.Image from io import BytesIO from IPython.display import clear_output, Image, display import numpy as np def showarray(a, fmt='jpeg'): a = np.uint8(np.clip(a, 0, 255)) f = BytesIO() PIL.Image.fromarray(a).save(f, fmt) display(Image(data=f.getvalue())) def showtensor(a): mean = np.arra...
true
true
f70179383f15ccce81946c10265dbb68c2fdd06a
2,084
py
Python
novelsave/settings.py
damare01/novelsave
7896e8393c944e169e3cb52a33ab81ae396dff9f
[ "Apache-2.0" ]
12
2021-08-25T04:37:53.000Z
2022-01-28T03:06:17.000Z
novelsave/settings.py
damare01/novelsave
7896e8393c944e169e3cb52a33ab81ae396dff9f
[ "Apache-2.0" ]
18
2021-08-24T20:02:16.000Z
2022-03-29T06:55:53.000Z
novelsave/settings.py
damare01/novelsave
7896e8393c944e169e3cb52a33ab81ae396dff9f
[ "Apache-2.0" ]
6
2021-10-03T11:31:08.000Z
2022-03-29T07:28:49.000Z
import mimetypes from pathlib import Path from appdirs import user_config_dir from tqdm import tqdm NAME = "novelsave" AUTHOR = "Mensch272" # base project directory BASE_DIR = Path(__file__).resolve().parent.parent STATIC_DIR = BASE_DIR / "novelsave/resources" # operating system specific configuration file # confi...
23.41573
77
0.580134
import mimetypes from pathlib import Path from appdirs import user_config_dir from tqdm import tqdm NAME = "novelsave" AUTHOR = "Mensch272" BASE_DIR = Path(__file__).resolve().parent.parent STATIC_DIR = BASE_DIR / "novelsave/resources" CONFIG_DIR = Path(user_config_dir(NAME, AUTHOR)) CONFIG_FILE = CONFIG_DIR / ...
true
true
f70179c22847bf238ffe9a36a60ad35690b1309c
1,775
py
Python
newschimp/core.py
sputnikus/newschimp
8de77e4eb8054ea599b73f9c99fb494818736445
[ "MIT" ]
2
2016-03-11T01:14:27.000Z
2016-09-13T16:49:15.000Z
newschimp/core.py
sputnikus/newschimp
8de77e4eb8054ea599b73f9c99fb494818736445
[ "MIT" ]
3
2021-03-22T17:12:24.000Z
2021-12-13T19:39:41.000Z
newschimp/core.py
sputnikus/newschimp
8de77e4eb8054ea599b73f9c99fb494818736445
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import logging import os import sys import click from newschimp import renderer, sender from newschimp.social import fb, gg, lanyrd from newschimp.cli import cli_group from newschimp.utils import ComplexCLI, load_settings LOGGER = logging.getLogger(__name__) def create...
31.696429
77
0.71662
import logging import os import sys import click from newschimp import renderer, sender from newschimp.social import fb, gg, lanyrd from newschimp.cli import cli_group from newschimp.utils import ComplexCLI, load_settings LOGGER = logging.getLogger(__name__) def create_newsletter(settings): context = {} ...
true
true
f70179f8b9a5ed39f8e3e2daa4c9d420a7b278e5
1,044
py
Python
setup.py
vladiscripts/flightaware
bc3d25667475c8efbf6603cd93151e7e03b6d1b4
[ "MIT" ]
1
2016-09-28T12:56:06.000Z
2016-09-28T12:56:06.000Z
setup.py
vladiscripts/flightaware
bc3d25667475c8efbf6603cd93151e7e03b6d1b4
[ "MIT" ]
null
null
null
setup.py
vladiscripts/flightaware
bc3d25667475c8efbf6603cd93151e7e03b6d1b4
[ "MIT" ]
1
2020-06-23T06:15:52.000Z
2020-06-23T06:15:52.000Z
try: from setuptools import setup except ImportError: from distutils.core import setup PACKAGE = "flightaware" NAME = "flightaware" DESCRIPTION = "A python REST interface for flightaware data" AUTHOR = "Fred Palmer" AUTHOR_EMAIL = "fred.palmer@gmail.com" URL = "https://github.com/fredpalmer/flightaware" confi...
26.1
80
0.62069
try: from setuptools import setup except ImportError: from distutils.core import setup PACKAGE = "flightaware" NAME = "flightaware" DESCRIPTION = "A python REST interface for flightaware data" AUTHOR = "Fred Palmer" AUTHOR_EMAIL = "fred.palmer@gmail.com" URL = "https://github.com/fredpalmer/flightaware" confi...
true
true
f7017a0b4139dd7ff8f485a857901a8d0d68104d
268
py
Python
tests/artificial/transf_Quantization/trend_Lag1Trend/cycle_30/ar_12/test_artificial_32_Quantization_Lag1Trend_30_12_20.py
shaido987/pyaf
b9afd089557bed6b90b246d3712c481ae26a1957
[ "BSD-3-Clause" ]
377
2016-10-13T20:52:44.000Z
2022-03-29T18:04:14.000Z
tests/artificial/transf_Quantization/trend_Lag1Trend/cycle_30/ar_12/test_artificial_32_Quantization_Lag1Trend_30_12_20.py
ysdede/pyaf
b5541b8249d5a1cfdc01f27fdfd99b6580ed680b
[ "BSD-3-Clause" ]
160
2016-10-13T16:11:53.000Z
2022-03-28T04:21:34.000Z
tests/artificial/transf_Quantization/trend_Lag1Trend/cycle_30/ar_12/test_artificial_32_Quantization_Lag1Trend_30_12_20.py
ysdede/pyaf
b5541b8249d5a1cfdc01f27fdfd99b6580ed680b
[ "BSD-3-Clause" ]
63
2017-03-09T14:51:18.000Z
2022-03-27T20:52:57.000Z
import pyaf.Bench.TS_datasets as tsds import tests.artificial.process_artificial_dataset as art art.process_dataset(N = 32 , FREQ = 'D', seed = 0, trendtype = "Lag1Trend", cycle_length = 30, transform = "Quantization", sigma = 0.0, exog_count = 20, ar_order = 12);
38.285714
168
0.735075
import pyaf.Bench.TS_datasets as tsds import tests.artificial.process_artificial_dataset as art art.process_dataset(N = 32 , FREQ = 'D', seed = 0, trendtype = "Lag1Trend", cycle_length = 30, transform = "Quantization", sigma = 0.0, exog_count = 20, ar_order = 12);
true
true
f7017af6c3cdf3b84c5e4f104a6d25cb9b08d77a
9,779
py
Python
lithops/storage/backends/swift/swift.py
Damian-MG/lithops
d2d2a83527671d64a445411bc47843b308095b87
[ "Apache-2.0" ]
55
2018-04-23T09:58:56.000Z
2020-09-09T11:47:16.000Z
lithops/storage/backends/swift/swift.py
Damian-MG/lithops
d2d2a83527671d64a445411bc47843b308095b87
[ "Apache-2.0" ]
256
2018-05-20T13:01:51.000Z
2020-09-16T09:09:54.000Z
lithops/storage/backends/swift/swift.py
Damian-MG/lithops
d2d2a83527671d64a445411bc47843b308095b87
[ "Apache-2.0" ]
35
2018-04-23T09:07:57.000Z
2020-08-12T13:43:06.000Z
# # (C) Copyright IBM Corp. 2020 # # 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 writi...
36.901887
109
0.583495
import os import json import shutil import logging import requests from lithops.storage.utils import StorageNoSuchKeyError from lithops.utils import sizeof_fmt from lithops.constants import STORAGE_CLI_MSG logger = logging.getLogger(__name__) class StorageBackend: def __init__(self, swift_config...
true
true
f7017b8db9e3fad17b386ca08b520a4ce52d409f
7,307
py
Python
rpcore/render_stage.py
serkkz/RenderPipeline
cecd14632150f607c0a89401287f74c68d77b15d
[ "MIT" ]
null
null
null
rpcore/render_stage.py
serkkz/RenderPipeline
cecd14632150f607c0a89401287f74c68d77b15d
[ "MIT" ]
null
null
null
rpcore/render_stage.py
serkkz/RenderPipeline
cecd14632150f607c0a89401287f74c68d77b15d
[ "MIT" ]
null
null
null
""" RenderPipeline Copyright (c) 2014-2016 tobspr <tobias.springer1@gmail.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use...
41.517045
84
0.66799
from rpcore.render_target import RenderTarget from rpcore.loader import RPLoader class RenderStage(): required_inputs = [] required_pipes = [] produced_inputs = {} produced_pipes = {} produced_defines = {} disabled = False def __init__(self, pipeline): self.stage_id = self.__...
true
true
f7017bfdb0cd9b92d160e04e3ef909806fba71cd
5,304
py
Python
tests/integration/actions/inventory/base.py
LaudateCorpus1/ansible-navigator
28cdea13dba3e9039382eb993989db4b3e61b237
[ "Apache-2.0" ]
null
null
null
tests/integration/actions/inventory/base.py
LaudateCorpus1/ansible-navigator
28cdea13dba3e9039382eb993989db4b3e61b237
[ "Apache-2.0" ]
null
null
null
tests/integration/actions/inventory/base.py
LaudateCorpus1/ansible-navigator
28cdea13dba3e9039382eb993989db4b3e61b237
[ "Apache-2.0" ]
null
null
null
"""Base class for inventory interactive/stdout tests. """ import difflib import json import os import pytest from ....defaults import FIXTURES_DIR from ..._common import fixture_path_from_request from ..._common import update_fixtures from ..._interactions import SearchFor from ..._interactions import Step from ..._t...
41.76378
100
0.651584
import difflib import json import os import pytest from ....defaults import FIXTURES_DIR from ..._common import fixture_path_from_request from ..._common import update_fixtures from ..._interactions import SearchFor from ..._interactions import Step from ..._tmux_session import TmuxSession TEST_FIXTURE_DIR = os.pat...
true
true
f7017f4f4ad299560711cdd1fb4c0b007148e3da
5,747
py
Python
salt/states/libcloud_loadbalancer.py
yuriks/salt
d2a5bd8adddb98ec1718d79384aa13b4f37e8028
[ "Apache-2.0", "MIT" ]
5
2017-02-07T05:39:29.000Z
2020-06-13T02:07:33.000Z
salt/states/libcloud_loadbalancer.py
yuriks/salt
d2a5bd8adddb98ec1718d79384aa13b4f37e8028
[ "Apache-2.0", "MIT" ]
86
2017-01-27T11:54:46.000Z
2020-05-20T06:25:26.000Z
salt/states/libcloud_loadbalancer.py
yuriks/salt
d2a5bd8adddb98ec1718d79384aa13b4f37e8028
[ "Apache-2.0", "MIT" ]
11
2017-01-26T19:36:29.000Z
2021-12-11T07:54:16.000Z
# -*- coding: utf-8 -*- ''' Apache Libcloud Load Balancer State =================================== Manage load balancers using libcloud :codeauthor: ``Anthony Shaw <anthonyshaw@apache.org>`` Apache Libcloud load balancer management for a full list of supported clouds, see http://libcloud.readthedocs.io/en/lates...
31.576923
132
0.65669
from __future__ import absolute_import, unicode_literals, print_function import logging import salt.utils.compat log = logging.getLogger(__name__) def __virtual__(): return True def __init__(opts): salt.utils.compat.pack_dunder(__name__) def state_result(result, message, name, changes=None): if ...
true
true
f7017fa3cd00892a2d9a04db6d620ac61486f985
7,245
py
Python
silex_client/utils/parameter_types.py
ArtFXDev/silex_client
657d594dcfec79e7c8f4053df9d4a5dbc0c9ac50
[ "MIT" ]
10
2021-09-21T03:26:45.000Z
2022-03-19T00:30:03.000Z
silex_client/utils/parameter_types.py
ArtFXDev/silex_dcc
657d594dcfec79e7c8f4053df9d4a5dbc0c9ac50
[ "MIT" ]
66
2021-09-17T09:54:23.000Z
2022-03-29T23:31:17.000Z
silex_client/utils/parameter_types.py
ArtFXDev/silex_dcc
657d594dcfec79e7c8f4053df9d4a5dbc0c9ac50
[ "MIT" ]
null
null
null
import pathlib from silex_client.utils.log import logger class AnyParameter(object): def __new__(cls, value): return value class CommandParameterMeta(type): def __new__(cls, name: str, bases: tuple, dct: dict): def serialize(): return { "name": "parameter", ...
26.25
113
0.557902
import pathlib from silex_client.utils.log import logger class AnyParameter(object): def __new__(cls, value): return value class CommandParameterMeta(type): def __new__(cls, name: str, bases: tuple, dct: dict): def serialize(): return { "name": "parameter", ...
true
true
f701801fce4e0791e2126e82c19b415fb5f428d4
761
py
Python
atcoder/abc/abc154_e.py
knuu/competitive-programming
16bc68fdaedd6f96ae24310d697585ca8836ab6e
[ "MIT" ]
1
2018-11-12T15:18:55.000Z
2018-11-12T15:18:55.000Z
atcoder/abc/abc154_e.py
knuu/competitive-programming
16bc68fdaedd6f96ae24310d697585ca8836ab6e
[ "MIT" ]
null
null
null
atcoder/abc/abc154_e.py
knuu/competitive-programming
16bc68fdaedd6f96ae24310d697585ca8836ab6e
[ "MIT" ]
null
null
null
N = input() L = len(N) K = int(input()) dp = [[[0] * 2 for _ in range(K + 1)] for _ in range(L + 1)] dp[0][0][1] = 1 for i, x in zip(range(L), map(int, N)): for k in range(K): dp[i+1][k][0] += dp[i][k][0] # d == 0 if x == 0: dp[i+1][k][1] += dp[i][k][1] elif x > 0: d...
29.269231
60
0.341656
N = input() L = len(N) K = int(input()) dp = [[[0] * 2 for _ in range(K + 1)] for _ in range(L + 1)] dp[0][0][1] = 1 for i, x in zip(range(L), map(int, N)): for k in range(K): dp[i+1][k][0] += dp[i][k][0] if x == 0: dp[i+1][k][1] += dp[i][k][1] elif x > 0: dp[i+1][k...
true
true
f70180b809d83d1f2352aa742abe4ed55f91163a
58
py
Python
config.py
marcelom/slask
5125d7e74932d5d0151323e935d9586cbc037f8f
[ "MIT" ]
1
2015-01-28T06:05:56.000Z
2015-01-28T06:05:56.000Z
config.py
marcelom/slask
5125d7e74932d5d0151323e935d9586cbc037f8f
[ "MIT" ]
null
null
null
config.py
marcelom/slask
5125d7e74932d5d0151323e935d9586cbc037f8f
[ "MIT" ]
null
null
null
config = { "username": 'slask', "icon": ":poop:", }
11.6
23
0.465517
config = { "username": 'slask', "icon": ":poop:", }
true
true
f70180bffd70b17aea765e77dc37db1f7c18cbc5
12,388
py
Python
fudge/patcher.py
priya1puresoftware/fudge
ab5822901cde23618f0f9ab21ff82a077ea7718b
[ "MIT" ]
null
null
null
fudge/patcher.py
priya1puresoftware/fudge
ab5822901cde23618f0f9ab21ff82a077ea7718b
[ "MIT" ]
null
null
null
fudge/patcher.py
priya1puresoftware/fudge
ab5822901cde23618f0f9ab21ff82a077ea7718b
[ "MIT" ]
null
null
null
"""Patching utilities for working with fake objects. See :ref:`using-fudge` for common scenarios. """ __all__ = ['patch_object', 'with_patched_object', 'PatchHandler', 'patched_context', 'patch'] import sys import fudge from fudge.util import wraps class patch(object): """A test decorator that patc...
33.663043
179
0.544479
"""Patching utilities for working with fake objects. See :ref:`using-fudge` for common scenarios. """ __all__ = ['patch_object', 'with_patched_object', 'PatchHandler', 'patched_context', 'patch'] import sys import fudge from fudge.util import wraps class patch(object): """A test decorator that patc...
false
true
f7018100d9e5b0dbbe8bcdafc3c55ae95bd3df34
5,553
py
Python
datasets/vqa_v2.py
TopCoder2K/mdetr
aedfd63f550ae36d1477484c489a2aa438d10aa3
[ "Apache-2.0" ]
2
2022-02-22T05:11:00.000Z
2022-03-30T18:59:50.000Z
datasets/vqa_v2.py
TopCoder2K/mdetr
aedfd63f550ae36d1477484c489a2aa438d10aa3
[ "Apache-2.0" ]
null
null
null
datasets/vqa_v2.py
TopCoder2K/mdetr
aedfd63f550ae36d1477484c489a2aa438d10aa3
[ "Apache-2.0" ]
null
null
null
# Copyright (c) Aishwarya Kamath & Nicolas Carion. Licensed under the Apache License 2.0. All Rights Reserved """ COCO dataset which returns image_id for evaluation. Mostly copy-paste from https://github.com/ashkamath/mdetr/blob/main/datasets/gqa.py """ import json from pathlib import Path import torch import torchvi...
39.664286
109
0.60886
import json from pathlib import Path import torch import torchvision from transformers import RobertaTokenizerFast from .coco import ConvertCocoPolysToMask, ModulatedDetection, make_coco_transforms class VQAv2Detection(ModulatedDetection): pass class VQAv2QuestionAnswering(torchvision.datasets.CocoDetection): ...
true
true
f701820b9d872f8eac52d86e40473c2034a80a09
2,240
py
Python
tests/commands/test_admin.py
TheGoodlike13/sahyun-bot
8ebc3d4e58a0acf9bde3c9ea8339145abcc53fcb
[ "MIT" ]
1
2022-02-21T18:55:34.000Z
2022-02-21T18:55:34.000Z
tests/commands/test_admin.py
TheGoodlike13/sahyun-bot
8ebc3d4e58a0acf9bde3c9ea8339145abcc53fcb
[ "MIT" ]
null
null
null
tests/commands/test_admin.py
TheGoodlike13/sahyun-bot
8ebc3d4e58a0acf9bde3c9ea8339145abcc53fcb
[ "MIT" ]
null
null
null
from assertpy import assert_that from httmock import HTTMock from sahyun_bot.commands.admin import Index, Rank from sahyun_bot.users_settings import UserRank from tests.mock_customsforge import customsforge def test_require_admin(commander, hook): for command in ['!lock', '!index', '!rank']: with command...
34.461538
96
0.710714
from assertpy import assert_that from httmock import HTTMock from sahyun_bot.commands.admin import Index, Rank from sahyun_bot.users_settings import UserRank from tests.mock_customsforge import customsforge def test_require_admin(commander, hook): for command in ['!lock', '!index', '!rank']: with command...
true
true
f701836e504ea4264dcd26c30d57e1b8dca9025b
3,075
py
Python
gogamechen3/api/rpc/taskflow/__init__.py
lolizeppelin/gogamechen3
4ff06f9042f1bb0cc22e1cc0b342967a829ae0f8
[ "MIT" ]
null
null
null
gogamechen3/api/rpc/taskflow/__init__.py
lolizeppelin/gogamechen3
4ff06f9042f1bb0cc22e1cc0b342967a829ae0f8
[ "MIT" ]
null
null
null
gogamechen3/api/rpc/taskflow/__init__.py
lolizeppelin/gogamechen3
4ff06f9042f1bb0cc22e1cc0b342967a829ae0f8
[ "MIT" ]
null
null
null
import os import base64 from simpleutil.utils import digestutils from goperation.filemanager import LocalFile from goperation.manager.rpc.agent.application.taskflow.middleware import EntityMiddleware from goperation.manager.rpc.agent.application.taskflow.database import Database from goperation.manager.rpc.agent.appl...
35.344828
100
0.626992
import os import base64 from simpleutil.utils import digestutils from goperation.filemanager import LocalFile from goperation.manager.rpc.agent.application.taskflow.middleware import EntityMiddleware from goperation.manager.rpc.agent.application.taskflow.database import Database from goperation.manager.rpc.agent.appl...
true
true
f7018457af97cde20bee525c029ee91da68c58d8
2,647
py
Python
Libraries/XML.py
CoolCat467/MineOS-Python3-Port
39a6b4c1fcca7165501c8c2c77c5e10b208830d8
[ "MIT" ]
null
null
null
Libraries/XML.py
CoolCat467/MineOS-Python3-Port
39a6b4c1fcca7165501c8c2c77c5e10b208830d8
[ "MIT" ]
null
null
null
Libraries/XML.py
CoolCat467/MineOS-Python3-Port
39a6b4c1fcca7165501c8c2c77c5e10b208830d8
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # XML API, for dealing with XML strings # -*- coding: utf-8 -*- __all__ = ['parseargs', 'collect'] '<users>\n\t<user>\n\t\t<id>1</id>\n\t\t<name>Fred</name>\n\t\t<salary>500000</salary>\n\t</user>\n\t<user>\n\t\t<id>1</id>\n\t\t<name>ScienceCat</name>\n\t\t<salary>500000</salary>\n\t</user>\n\t...
28.771739
291
0.491878
__all__ = ['parseargs', 'collect'] xmlex = '<users>\n<user>\n<id>1</id>\n<name>Fred</name>\n<salary>500000</salary>\n</user>\n<user>\n<id>1</id>\n<name>ScienceCat</name>\n<salary>500000</salary>\n</user>\n<user>\n<id>1</id>\n<name>Bob</name>\n<salary>500000</salary>\n</user>\n</users>' argex = 'cats="True and Sand...
true
true
f70184ed31796ae9bea068a1768eac058c99e2d0
3,165
py
Python
scripts/local_test_http_function.py
sanserg/fun-anomaly
8b07f3f393cd60dbcff3f3fa0bebe11ced5f6a5d
[ "Apache-2.0" ]
null
null
null
scripts/local_test_http_function.py
sanserg/fun-anomaly
8b07f3f393cd60dbcff3f3fa0bebe11ced5f6a5d
[ "Apache-2.0" ]
null
null
null
scripts/local_test_http_function.py
sanserg/fun-anomaly
8b07f3f393cd60dbcff3f3fa0bebe11ced5f6a5d
[ "Apache-2.0" ]
null
null
null
import json import logging from sqlalchemy import Column, Integer, String, Float, DateTime, Boolean, func from iotfunctions import bif from ai.functions import SimpleAnomaly from iotfunctions.metadata import EntityType from iotfunctions.db import Database from iotfunctions.enginelog import EngineLogging from custom imp...
36.37931
110
0.68752
import json import logging from sqlalchemy import Column, Integer, String, Float, DateTime, Boolean, func from iotfunctions import bif from ai.functions import SimpleAnomaly from iotfunctions.metadata import EntityType from iotfunctions.db import Database from iotfunctions.enginelog import EngineLogging from custom imp...
true
true
f70184f57fcc71d87ff6ce78f33efc207b7ef96b
4,810
py
Python
modoboa_amavis/factories.py
modoboa/modoboa-amavis
18e5a210ac2eb007ce28d70675f4188d93e1b822
[ "MIT" ]
22
2015-05-01T09:09:11.000Z
2021-03-20T03:11:49.000Z
modoboa_amavis/factories.py
modoboa/modoboa-amavis
18e5a210ac2eb007ce28d70675f4188d93e1b822
[ "MIT" ]
138
2015-04-30T16:59:47.000Z
2022-03-13T13:46:28.000Z
modoboa_amavis/factories.py
modoboa/modoboa-amavis
18e5a210ac2eb007ce28d70675f4188d93e1b822
[ "MIT" ]
18
2015-05-05T10:27:23.000Z
2021-09-19T23:58:59.000Z
# -*- coding: utf-8 -*- """Amavis factories.""" from __future__ import unicode_literals import datetime import time import factory from . import models from .utils import smart_bytes SPAM_BODY = """X-Envelope-To: <{rcpt}> X-Envelope-To-Blocked: <{rcpt}> X-Quarantine-ID: <nq6ekd4wtXZg> X-Spam-Flag: YES X-Spam-Scor...
28.802395
78
0.685863
from __future__ import unicode_literals import datetime import time import factory from . import models from .utils import smart_bytes SPAM_BODY = """X-Envelope-To: <{rcpt}> X-Envelope-To-Blocked: <{rcpt}> X-Quarantine-ID: <nq6ekd4wtXZg> X-Spam-Flag: YES X-Spam-Score: 1000.985 X-Spam-Level: *********************...
true
true
f701858d90987f1f596d9d74d126ce475a127ae0
2,414
py
Python
scripts/mkgti.py
ZaynabGhazi/NICERsoft
c1e467b807226f091e82cd0e3ab0ce6b7a476610
[ "MIT" ]
null
null
null
scripts/mkgti.py
ZaynabGhazi/NICERsoft
c1e467b807226f091e82cd0e3ab0ce6b7a476610
[ "MIT" ]
null
null
null
scripts/mkgti.py
ZaynabGhazi/NICERsoft
c1e467b807226f091e82cd0e3ab0ce6b7a476610
[ "MIT" ]
null
null
null
#!/usr/bin/env python from __future__ import print_function, division import os, sys import matplotlib.pyplot as plt import numpy as np import argparse from astropy import log from os import path from glob import glob from subprocess import check_call import shutil from astropy.table import Table from astropy.io import...
35.5
131
0.677713
from __future__ import print_function, division import os, sys import matplotlib.pyplot as plt import numpy as np import argparse from astropy import log from os import path from glob import glob from subprocess import check_call import shutil from astropy.table import Table from astropy.io import fits from nicer.val...
true
true
f70185a7b8ced19854c2172d3abd8153b1d14a41
4,268
py
Python
deplatformr/views/filecoin_views.py
deplatformer/prototype
d755624ef2828a9c4b99cad53cc6013e4572e4d2
[ "MIT" ]
null
null
null
deplatformr/views/filecoin_views.py
deplatformer/prototype
d755624ef2828a9c4b99cad53cc6013e4572e4d2
[ "MIT" ]
1
2021-02-10T02:26:02.000Z
2021-02-10T02:26:02.000Z
deplatformr/views/filecoin_views.py
deplatformer/prototype
d755624ef2828a9c4b99cad53cc6013e4572e4d2
[ "MIT" ]
1
2021-06-28T14:42:56.000Z
2021-06-28T14:42:56.000Z
import os from datetime import datetime from flask import Flask, render_template, flash, safe_join, send_file from flask_user import login_required, current_user from werkzeug.utils import secure_filename from pygate_grpc.client import PowerGateClient from deplatformr.models.filecoin_models import Ffs, Files, Logs from...
33.873016
111
0.646204
import os from datetime import datetime from flask import Flask, render_template, flash, safe_join, send_file from flask_user import login_required, current_user from werkzeug.utils import secure_filename from pygate_grpc.client import PowerGateClient from deplatformr.models.filecoin_models import Ffs, Files, Logs from...
true
true
f70185ea6fa1e1036a31fb85275e059609151a59
787
py
Python
setup.py
charles-marceau/msnexport
9a130f83652824c27fde48cc28d7d0dc8da831d7
[ "MIT" ]
null
null
null
setup.py
charles-marceau/msnexport
9a130f83652824c27fde48cc28d7d0dc8da831d7
[ "MIT" ]
null
null
null
setup.py
charles-marceau/msnexport
9a130f83652824c27fde48cc28d7d0dc8da831d7
[ "MIT" ]
null
null
null
from setuptools import find_packages, setup with open("README.md", "r") as fh: long_description = fh.read() setup( name='msnexport', version='0.1', license="MIT", classifiers=["Programming Language :: Python :: 3.7"], author='Charles Marceau', author_email='charlesmarceau3@gmail.com', ...
26.233333
58
0.651842
from setuptools import find_packages, setup with open("README.md", "r") as fh: long_description = fh.read() setup( name='msnexport', version='0.1', license="MIT", classifiers=["Programming Language :: Python :: 3.7"], author='Charles Marceau', author_email='charlesmarceau3@gmail.com', ...
true
true
f7018712ee7626943f710f00b08771e4841e72e4
3,983
py
Python
Payload_Type/apollo/mythic/agent_functions/inject.py
n0pe-sled/Apollo
cfc5804d163e1b47f6614321434a717b2bd2066f
[ "BSD-3-Clause" ]
null
null
null
Payload_Type/apollo/mythic/agent_functions/inject.py
n0pe-sled/Apollo
cfc5804d163e1b47f6614321434a717b2bd2066f
[ "BSD-3-Clause" ]
null
null
null
Payload_Type/apollo/mythic/agent_functions/inject.py
n0pe-sled/Apollo
cfc5804d163e1b47f6614321434a717b2bd2066f
[ "BSD-3-Clause" ]
null
null
null
from mythic_payloadtype_container.MythicCommandBase import * import json from mythic_payloadtype_container.MythicRPC import * import base64 class InjectArguments(TaskArguments): def __init__(self, command_line): super().__init__(command_line) self.args = { "template": CommandParameter(...
49.17284
198
0.581471
from mythic_payloadtype_container.MythicCommandBase import * import json from mythic_payloadtype_container.MythicRPC import * import base64 class InjectArguments(TaskArguments): def __init__(self, command_line): super().__init__(command_line) self.args = { "template": CommandParameter(...
true
true
f7018880849f101375cb5c61af38b6fbdabcf866
1,045
py
Python
src/data/gbm.py
imanolperez/optimal-double-execution
b380087765925043b01fe2f1066e5e2d1d850cf9
[ "MIT" ]
4
2020-05-20T13:56:36.000Z
2021-01-05T12:41:47.000Z
src/data/gbm.py
imanolperez/optimal-double-execution
b380087765925043b01fe2f1066e5e2d1d850cf9
[ "MIT" ]
null
null
null
src/data/gbm.py
imanolperez/optimal-double-execution
b380087765925043b01fe2f1066e5e2d1d850cf9
[ "MIT" ]
3
2020-07-02T17:52:05.000Z
2022-03-15T14:07:08.000Z
import numpy as np from .base import Price class GBM(Price): """Brownian motion.""" def __init__(self, T=1., sigma1=0.02, sigma2=0.01, s1=1., s2=1., drift1=0., drift2=0., n=100): self.sigma1 = sigma1 self.sigma2 = sigma2 self.drift1 = drift1 self.drift2 = drift...
30.735294
106
0.507177
import numpy as np from .base import Price class GBM(Price): def __init__(self, T=1., sigma1=0.02, sigma2=0.01, s1=1., s2=1., drift1=0., drift2=0., n=100): self.sigma1 = sigma1 self.sigma2 = sigma2 self.drift1 = drift1 self.drift2 = drift2 self.n = n ...
true
true
f7018a32efde0c031de2107c39d92c396f5cf009
5,530
py
Python
example.py
ms2300/multiplayer-elo
ee5e0899e8ff513af336589876abd4cd89ed922b
[ "BSD-3-Clause" ]
6
2016-09-19T04:04:43.000Z
2022-02-14T22:22:14.000Z
example.py
ms2300/multiplayer-elo
ee5e0899e8ff513af336589876abd4cd89ed922b
[ "BSD-3-Clause" ]
null
null
null
example.py
ms2300/multiplayer-elo
ee5e0899e8ff513af336589876abd4cd89ed922b
[ "BSD-3-Clause" ]
1
2017-08-19T08:49:06.000Z
2017-08-19T08:49:06.000Z
# Copyright (c) 2016 by Matt Sewall. # All rights reserved. import math import csv import json import os import shutil from sys import argv from datetime import datetime from django.utils.encoding import smart_str, smart_unicode from operator import itemgetter from elo_classes import * from elo import * # Elos dicti...
32.529412
76
0.547016
import math import csv import json import os import shutil from sys import argv from datetime import datetime from django.utils.encoding import smart_str, smart_unicode from operator import itemgetter from elo_classes import * from elo import * elos_boys = {} elos_girls = {} entries_boys = {} entries_girls = {}...
false
true