hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
1c3d851cd9c71be09e0a6c57c8a32fceaf1783d2
12,793
py
Python
structuretimers/admin.py
buahaha/aa-structuretimers
fbc2752d442795c0803aa419a58ebd1cfd33c66d
[ "MIT" ]
null
null
null
structuretimers/admin.py
buahaha/aa-structuretimers
fbc2752d442795c0803aa419a58ebd1cfd33c66d
[ "MIT" ]
null
null
null
structuretimers/admin.py
buahaha/aa-structuretimers
fbc2752d442795c0803aa419a58ebd1cfd33c66d
[ "MIT" ]
null
null
null
from typing import Any, Dict, Optional from django import forms from django.contrib import admin from django.core.exceptions import ValidationError from django.db.models.functions import Lower from django.utils.safestring import mark_safe from django.utils.timezone import now from allianceauth.eveonline.models import...
34.575676
88
0.60197
from typing import Any, Dict, Optional from django import forms from django.contrib import admin from django.core.exceptions import ValidationError from django.db.models.functions import Lower from django.utils.safestring import mark_safe from django.utils.timezone import now from allianceauth.eveonline.models import...
true
true
1c3d8549aff24f6a3c86faef3f9cac68eda59f26
931
py
Python
setup.py
rajbhutoria/homework-csci046
97090aef7311b2669a626d98e7f8a5210d0f57a0
[ "MIT" ]
null
null
null
setup.py
rajbhutoria/homework-csci046
97090aef7311b2669a626d98e7f8a5210d0f57a0
[ "MIT" ]
null
null
null
setup.py
rajbhutoria/homework-csci046
97090aef7311b2669a626d98e7f8a5210d0f57a0
[ "MIT" ]
1
2021-04-19T08:05:56.000Z
2021-04-19T08:05:56.000Z
import pathlib from setuptools import setup, find_packages # The directory containing this file HERE = pathlib.Path(__file__).parent # The text of the README file README = (HERE / "README.md").read_text() # This call to setup() does all the work setup( name="cmc_csci046_Bhutoria", version="1.0.0", descri...
31.033333
97
0.692803
import pathlib from setuptools import setup, find_packages HERE = pathlib.Path(__file__).parent README = (HERE / "README.md").read_text() setup( name="cmc_csci046_Bhutoria", version="1.0.0", description="A collection of data structures and classes by R. Bhutoria in CMC CSCI046 SP21", long_descript...
true
true
1c3d859ae28e80d0d58e9dbc5ecfff154142ab2d
7,491
py
Python
tests/unit/network/GenericNetworkTest.py
halotudio/openPNM-copy2
d400ec65e9421256a531f6d22a38255b002d5dcb
[ "MIT" ]
1
2021-05-01T11:10:43.000Z
2021-05-01T11:10:43.000Z
tests/unit/network/GenericNetworkTest.py
halotudio/openPNM-copy2
d400ec65e9421256a531f6d22a38255b002d5dcb
[ "MIT" ]
2
2020-06-26T19:58:23.000Z
2021-12-14T07:16:41.000Z
tests/unit/network/GenericNetworkTest.py
halotudio/openPNM-copy2
d400ec65e9421256a531f6d22a38255b002d5dcb
[ "MIT" ]
null
null
null
import numpy as np import openpnm as op class GenericNetworkTest: def setup_class(self): self.net = op.network.Cubic(shape=[10, 10, 10]) def teardown_class(self): ws = op.Workspace() ws.clear() def test_find_connected_pores_numeric_not_flattend(self): a = self.net.find_co...
40.934426
76
0.595248
import numpy as np import openpnm as op class GenericNetworkTest: def setup_class(self): self.net = op.network.Cubic(shape=[10, 10, 10]) def teardown_class(self): ws = op.Workspace() ws.clear() def test_find_connected_pores_numeric_not_flattend(self): a = self.net.find_co...
true
true
1c3d85ca8eb7bd996d2442a399dae87a1eb08406
22,304
py
Python
testing/unit/test_schemas.py
nanome-ai/nanome
7777a782168fe4e68f58c42f01cff9e66f3675aa
[ "MIT" ]
1
2020-04-10T09:47:54.000Z
2020-04-10T09:47:54.000Z
testing/unit/test_schemas.py
nanome-ai/nanome
7777a782168fe4e68f58c42f01cff9e66f3675aa
[ "MIT" ]
10
2019-05-30T18:29:10.000Z
2020-02-15T02:16:42.000Z
testing/unit/test_schemas.py
nanome-ai/nanome
7777a782168fe4e68f58c42f01cff9e66f3675aa
[ "MIT" ]
2
2020-02-04T02:56:21.000Z
2020-04-25T20:05:16.000Z
import json import os import sys import tempfile import unittest from nanome.api import structure, ui, shapes, streams from nanome.util import Vector3, enums, Color if sys.version_info.major >= 3: from unittest.mock import MagicMock, patch else: # Python 2.7 way of getting magicmock. Requires pip install mock...
56.040201
135
0.708348
import json import os import sys import tempfile import unittest from nanome.api import structure, ui, shapes, streams from nanome.util import Vector3, enums, Color if sys.version_info.major >= 3: from unittest.mock import MagicMock, patch else: from mock import MagicMock, patch reqs_installed = True t...
true
true
1c3d89980930181dc95e1131b83e0f6c7cf686cc
10,069
py
Python
docs/source/conf.py
abdulelahsm/ignite
b932b13d0f1afd118e1dd806a9f6ba9015d9e16a
[ "BSD-3-Clause" ]
null
null
null
docs/source/conf.py
abdulelahsm/ignite
b932b13d0f1afd118e1dd806a9f6ba9015d9e16a
[ "BSD-3-Clause" ]
null
null
null
docs/source/conf.py
abdulelahsm/ignite
b932b13d0f1afd118e1dd806a9f6ba9015d9e16a
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/stable/config # -- Path setup ------------------------------------------------------------...
32.691558
119
0.608601
import os import sys sys.path.insert(0, os.path.abspath("../..")) import ignite import pytorch_sphinx_theme project = "ignite" copyright = "2020, PyTorch-Ignite Contributors" author = "PyTorch-Ignite Contributors" try: version = os.environ["code_version"] if "master" in version: vers...
true
true
1c3d8b1891a29ee98f60a1880ff9f53cdca70c15
1,614
py
Python
api/src/opentrons/hardware_control/__init__.py
anuwrag/opentrons
28c8d76a19e367c6bd38f5290faaa32abf378715
[ "Apache-2.0" ]
2
2015-11-10T17:49:51.000Z
2016-01-15T04:43:37.000Z
api/src/opentrons/hardware_control/__init__.py
anuwrag/opentrons
28c8d76a19e367c6bd38f5290faaa32abf378715
[ "Apache-2.0" ]
null
null
null
api/src/opentrons/hardware_control/__init__.py
anuwrag/opentrons
28c8d76a19e367c6bd38f5290faaa32abf378715
[ "Apache-2.0" ]
null
null
null
""" hardware_control: The sole authority for controlling the hardware of an OT2. The hardware_control module presents a unified api for the lowest level of hardware command that takes into account the robot as a whole. For instance, it presents an API for moving a specific pipette mount (not a specific motor or axis) ...
29.888889
76
0.777571
from .adapters import SynchronousAdapter from .api import API from .pause_manager import PauseManager from .backends import Controller, Simulator from .pipette import Pipette from .types import ( CriticalPoint, NoTipAttachedError, TipAttachedError, ExecutionState, ExecutionCancelledError, ) from .c...
true
true
1c3d8b56a76803c8c51cc4377df46032420e58b6
191
py
Python
applied_python/applied_python/lib/python2.7/site-packages/pylint/test/input/func_noerror_exception.py
mith1979/ansible_automation
013dfa67c6d91720b787fadb21de574b6e023a26
[ "Apache-2.0" ]
35
2016-09-22T22:53:14.000Z
2020-02-13T15:12:21.000Z
sdks/python/.tox/lint/lib/python2.7/site-packages/pylint/test/input/func_noerror_exception.py
axbaretto/presto
f137d2709db42b5c3e4d43a631832a8f74853065
[ "Apache-2.0" ]
28
2020-03-04T22:01:48.000Z
2022-03-12T00:59:47.000Z
sdks/python/.tox/lint/lib/python2.7/site-packages/pylint/test/input/func_noerror_exception.py
axbaretto/presto
f137d2709db42b5c3e4d43a631832a8f74853065
[ "Apache-2.0" ]
88
2016-11-27T02:16:11.000Z
2020-02-28T05:10:26.000Z
""" module doc """ __revision__ = '' class MyException(Exception): """a custom exception with its *own* __init__ !!""" def __init__(self, msg): Exception.__init__(self, msg)
23.875
55
0.638743
__revision__ = '' class MyException(Exception): def __init__(self, msg): Exception.__init__(self, msg)
true
true
1c3d8baf5caca59e8979a0b74b6db34b27729af1
628
py
Python
Pyton_Codes/Using Python to Access Web Data/6.HTML/capitulo 12.2.py
Bombjack88/Python-for-Everybody--PY4E-
0dee57e015ed0c773bdb11e841ed4b2b639b5eca
[ "MIT" ]
null
null
null
Pyton_Codes/Using Python to Access Web Data/6.HTML/capitulo 12.2.py
Bombjack88/Python-for-Everybody--PY4E-
0dee57e015ed0c773bdb11e841ed4b2b639b5eca
[ "MIT" ]
null
null
null
Pyton_Codes/Using Python to Access Web Data/6.HTML/capitulo 12.2.py
Bombjack88/Python-for-Everybody--PY4E-
0dee57e015ed0c773bdb11e841ed4b2b639b5eca
[ "MIT" ]
null
null
null
# To run this, download the BeautifulSoup zip file # http://www.py4e.com/code3/bs4.zip # and unzip it in the same directory as this file import urllib.request, urllib.parse, urllib.error from bs4 import BeautifulSoup import ssl # Ignore SSL certificate errors ctx = ssl.create_default_context() ctx.check_hostname = Fa...
28.545455
71
0.746815
import urllib.request, urllib.parse, urllib.error from bs4 import BeautifulSoup import ssl ctx = ssl.create_default_context() ctx.check_hostname = False ctx.verify_mode = ssl.CERT_NONE url = input('Enter - ') html = urllib.request.urlopen(url, context=ctx).read() soup = BeautifulSoup(html, 'html.parser') tags...
true
true
1c3d8dc95d1fae655e5759671bf3deb8b104cc95
20,831
py
Python
reademptionlib/genewisequanti.py
foerstner-lab/READemption
a2d698fc52567837953780eb31c461dd576f26af
[ "0BSD" ]
5
2020-02-14T14:56:23.000Z
2021-10-05T09:08:42.000Z
reademptionlib/genewisequanti.py
foerstner-lab/READemption
a2d698fc52567837953780eb31c461dd576f26af
[ "0BSD" ]
22
2019-07-16T05:36:53.000Z
2022-03-28T10:19:29.000Z
reademptionlib/genewisequanti.py
foerstner-lab/READemption
a2d698fc52567837953780eb31c461dd576f26af
[ "0BSD" ]
7
2020-04-10T02:48:30.000Z
2021-11-14T01:25:17.000Z
import csv from reademptionlib.gff3 import Gff3Parser import pysam import pandas as pd class GeneWiseQuantification(object): def __init__( self, min_overlap=1, read_region="global", clip_length=11, norm_by_alignment_freq=True, norm_by_overlap_freq=True, allo...
35.487223
104
0.529883
import csv from reademptionlib.gff3 import Gff3Parser import pysam import pandas as pd class GeneWiseQuantification(object): def __init__( self, min_overlap=1, read_region="global", clip_length=11, norm_by_alignment_freq=True, norm_by_overlap_freq=True, allo...
true
true
1c3d8dd32360aae66c3a76b4826696b9a880150d
10,875
py
Python
tools/NeoPredPipe/neopredpipe_tests.py
Xiaohuaniu0032/NeoPred
feb628359f4545f1ecbc2eb1797e2cf25c9b80cf
[ "MIT" ]
1
2021-02-04T01:29:57.000Z
2021-02-04T01:29:57.000Z
tools/NeoPredPipe/neopredpipe_tests.py
Xiaohuaniu0032/NeoPred
feb628359f4545f1ecbc2eb1797e2cf25c9b80cf
[ "MIT" ]
null
null
null
tools/NeoPredPipe/neopredpipe_tests.py
Xiaohuaniu0032/NeoPred
feb628359f4545f1ecbc2eb1797e2cf25c9b80cf
[ "MIT" ]
null
null
null
''' @author: Eszter Lakatos ''' import unittest import subprocess import os from postprocessing import DefineGenotypeFormat, ProcessPepmatch from process_expression import BuildGeneIDTable from hla_preprocess import processHLAminerFile, readInHLA2hlaminer, readInHLA2hlahd, composeHLA2File, ConstructAlleles, Construct...
66.310976
460
0.640644
import unittest import subprocess import os from postprocessing import DefineGenotypeFormat, ProcessPepmatch from process_expression import BuildGeneIDTable from hla_preprocess import processHLAminerFile, readInHLA2hlaminer, readInHLA2hlahd, composeHLA2File, ConstructAlleles, ConstructAlleles_typeII class MyTestCase...
true
true
1c3d8e7a0db36b46f51a3cfd2f149034a483ff47
582
py
Python
Ben_Manuscripts/transport/figures/tortuosity.py
shirtsgroup/LLC_Membranes
e94694f298909352d7e9d912625314a1e46aa5b6
[ "MIT" ]
4
2019-06-18T15:26:49.000Z
2021-08-11T18:57:39.000Z
Ben_Manuscripts/transport/figures/tortuosity.py
shirtsgroup/LLC_Membranes
e94694f298909352d7e9d912625314a1e46aa5b6
[ "MIT" ]
2
2019-08-22T20:11:46.000Z
2019-08-22T22:35:17.000Z
Ben_Manuscripts/transport/supporting_figures/tortuosity.py
shirtsgroup/LLC_Membranes
e94694f298909352d7e9d912625314a1e46aa5b6
[ "MIT" ]
4
2019-07-06T15:41:53.000Z
2021-01-27T17:59:13.000Z
#!/usr/bin/env python from LLC_Membranes.analysis.spline import Spline from LLC_Membranes.llclib import file_rw import numpy as np wt = 5 res = ['ACH', 'ACN', 'ATO', 'BUT', 'DMF', 'DMP', 'DMS', 'EAC', 'ETH', 'GCL', 'GLY', 'MET', 'PCB', 'PG', 'PR', 'RIB', 'SOH', 'TET', 'THF', 'URE'] path = '/home/bcoscia/Documents/G...
32.333333
144
0.639175
from LLC_Membranes.analysis.spline import Spline from LLC_Membranes.llclib import file_rw import numpy as np wt = 5 res = ['ACH', 'ACN', 'ATO', 'BUT', 'DMF', 'DMP', 'DMS', 'EAC', 'ETH', 'GCL', 'GLY', 'MET', 'PCB', 'PG', 'PR', 'RIB', 'SOH', 'TET', 'THF', 'URE'] path = '/home/bcoscia/Documents/Gromacs/Transport/NaGA...
true
true
1c3d9013d346717321088ec3f409de19e8934a79
1,262
py
Python
boom/__main__.py
TomGrozev/flask-boom
e6008823e198742f6f4acc5e2ca395fc4004f402
[ "MIT" ]
null
null
null
boom/__main__.py
TomGrozev/flask-boom
e6008823e198742f6f4acc5e2ca395fc4004f402
[ "MIT" ]
null
null
null
boom/__main__.py
TomGrozev/flask-boom
e6008823e198742f6f4acc5e2ca395fc4004f402
[ "MIT" ]
null
null
null
import os import click from boom.utils.title_helper import get_title commands_folder = os.path.join(os.path.dirname(__file__), 'commands') class BaseGroup(click.Group): def list_commands(self, ctx): rv = [] for filename in os.listdir(commands_folder): if filename.endswith('.py'): ...
25.24
86
0.581616
import os import click from boom.utils.title_helper import get_title commands_folder = os.path.join(os.path.dirname(__file__), 'commands') class BaseGroup(click.Group): def list_commands(self, ctx): rv = [] for filename in os.listdir(commands_folder): if filename.endswith('.py'): ...
true
true
1c3d909d46d84b02d3e02761151bd44c5e705337
295
py
Python
AlgorithmProblems/0766. Toeplitz Matrix/766.Toeplitz-Matrix.py
lynnli92/leetcode-group-solution
b497eaf29fb820648366b44e27c918503936b167
[ "MIT" ]
4
2021-12-31T00:53:32.000Z
2022-01-22T21:28:46.000Z
AlgorithmProblems/0766. Toeplitz Matrix/766.Toeplitz-Matrix.py
lynnli92/leetcode-group-solution
b497eaf29fb820648366b44e27c918503936b167
[ "MIT" ]
1
2021-12-31T00:40:34.000Z
2021-12-31T00:40:34.000Z
AlgorithmProblems/0766. Toeplitz Matrix/766.Toeplitz-Matrix.py
lynnli92/leetcode-group-solution
b497eaf29fb820648366b44e27c918503936b167
[ "MIT" ]
5
2021-12-31T00:28:40.000Z
2022-03-22T21:01:40.000Z
from typing import List class Solution: def isToeplitzMatrix(self, matrix: List[List[int]]) -> bool: for i in range(len(matrix)-1): for j in range(len(matrix[0])-1): if matrix[i][j] != matrix[i+1][j+1]: return False return True
36.875
64
0.545763
from typing import List class Solution: def isToeplitzMatrix(self, matrix: List[List[int]]) -> bool: for i in range(len(matrix)-1): for j in range(len(matrix[0])-1): if matrix[i][j] != matrix[i+1][j+1]: return False return True
true
true
1c3d90a8de764db41939bdf1a895d44ac0742f9f
1,025
py
Python
aqt/jax_legacy/jax/imagenet/configs/resnet50_w4_init8_dense8.py
ychzhang/aqt
54427ea65120af980b8f2540e94ebe2db1dd3ccd
[ "Apache-2.0" ]
2
2022-01-13T06:34:00.000Z
2022-03-30T17:08:55.000Z
aqt/jax_legacy/jax/imagenet/configs/resnet50_w4_init8_dense8.py
ychzhang/aqt
54427ea65120af980b8f2540e94ebe2db1dd3ccd
[ "Apache-2.0" ]
3
2022-03-30T19:48:22.000Z
2022-03-31T20:47:30.000Z
aqt/jax_legacy/jax/imagenet/configs/resnet50_w4_init8_dense8.py
ychzhang/aqt
54427ea65120af980b8f2540e94ebe2db1dd3ccd
[ "Apache-2.0" ]
3
2022-01-13T00:10:17.000Z
2022-03-29T17:31:16.000Z
# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
36.607143
74
0.776585
from aqt.jax_legacy.jax.imagenet.configs import base_config def get_config(quant_target=base_config.QuantTarget.WEIGHTS_ONLY): config = base_config.get_config( imagenet_type=base_config.ImagenetType.RESNET50, quant_target=quant_target) config.weight_prec = 4 config.model_hparams.conv_...
true
true
1c3d9155ca5de18317299fea9b595898b82a1d7f
33,140
py
Python
bestiary/models/artifacts.py
Itori/swarfarm
7192e2d8bca093b4254023bbec42b6a2b1887547
[ "Apache-2.0" ]
66
2017-09-11T04:46:00.000Z
2021-03-13T00:02:42.000Z
bestiary/models/artifacts.py
Itori/swarfarm
7192e2d8bca093b4254023bbec42b6a2b1887547
[ "Apache-2.0" ]
133
2017-09-24T21:28:59.000Z
2021-04-02T10:35:31.000Z
bestiary/models/artifacts.py
Itori/swarfarm
7192e2d8bca093b4254023bbec42b6a2b1887547
[ "Apache-2.0" ]
28
2017-08-30T19:04:32.000Z
2020-11-16T04:09:00.000Z
from math import floor from django.contrib.postgres.fields import ArrayField from django.core.exceptions import ValidationError from django.core.validators import MinValueValidator, MaxValueValidator from django.db import models from . import base class ArtifactObjectBase(models.Model, base.Quality, base.Archetype,...
45.963939
119
0.617049
from math import floor from django.contrib.postgres.fields import ArrayField from django.core.exceptions import ValidationError from django.core.validators import MinValueValidator, MaxValueValidator from django.db import models from . import base class ArtifactObjectBase(models.Model, base.Quality, base.Archetype,...
true
true
1c3d9175db6c3f93d885d0e8e64f4b703dd0942c
192
py
Python
sympy/series/__init__.py
matthew-brett/sympy
7b87b62144c28f2e734e9106897c72806b99d181
[ "BSD-3-Clause" ]
null
null
null
sympy/series/__init__.py
matthew-brett/sympy
7b87b62144c28f2e734e9106897c72806b99d181
[ "BSD-3-Clause" ]
null
null
null
sympy/series/__init__.py
matthew-brett/sympy
7b87b62144c28f2e734e9106897c72806b99d181
[ "BSD-3-Clause" ]
1
2021-11-10T06:39:41.000Z
2021-11-10T06:39:41.000Z
"""A module that handles series: find a limit, order the series etc. """ from order import Order from limits import limit, Limit from gruntz import gruntz from series import series O = Order
21.333333
68
0.765625
from order import Order from limits import limit, Limit from gruntz import gruntz from series import series O = Order
true
true
1c3d926376808d7e820feb0632aa3f11db3eb3e6
3,953
py
Python
openmdao/devtools/dotgraph.py
colinxs/OpenMDAO
a9a52be29281a23a102c64b577066ee5fc70f4b4
[ "Apache-2.0" ]
17
2018-01-11T20:13:59.000Z
2022-03-22T03:46:05.000Z
openmdao/devtools/dotgraph.py
colinxs/OpenMDAO
a9a52be29281a23a102c64b577066ee5fc70f4b4
[ "Apache-2.0" ]
6
2017-10-19T23:14:14.000Z
2020-11-22T17:30:57.000Z
openmdao/devtools/dotgraph.py
colinxs/OpenMDAO
a9a52be29281a23a102c64b577066ee5fc70f4b4
[ "Apache-2.0" ]
10
2018-04-12T22:13:33.000Z
2020-05-07T10:02:59.000Z
import os import sys import webbrowser from six import itertools import networkx as nx from openmdao.core.parallel_group import ParallelGroup from openmdao.core.group import Group from openmdao.util.string_util import nearest_child from six import itervalues def plot_sys_tree(system, outfile=None, fmt='pdf'): ...
25.668831
76
0.606375
import os import sys import webbrowser from six import itertools import networkx as nx from openmdao.core.parallel_group import ParallelGroup from openmdao.core.group import Group from openmdao.util.string_util import nearest_child from six import itervalues def plot_sys_tree(system, outfile=None, fmt='pdf'): ...
true
true
1c3d92bdbe42ff67856a11992ad09ddc9a7234ab
724
py
Python
machine_vision/median.py
cyrus07424/M5stickV-playground
9c1447078bebb279684bf9fc4b485c1aae1c8b12
[ "MIT" ]
3
2020-03-17T16:20:14.000Z
2021-03-21T09:12:20.000Z
machine_vision/median.py
cyrus07424/M5stickV-playground
9c1447078bebb279684bf9fc4b485c1aae1c8b12
[ "MIT" ]
null
null
null
machine_vision/median.py
cyrus07424/M5stickV-playground
9c1447078bebb279684bf9fc4b485c1aae1c8b12
[ "MIT" ]
2
2020-04-17T01:35:36.000Z
2020-10-31T00:54:45.000Z
# # 中央値フィルタ. # ################################################## # import ################################################## import lcd import sensor ################################################## # initialize ################################################## # LCDを初期化 lcd.init() # LCDの方向を設定 lcd...
20.685714
51
0.367403
true
true
1c3d9435ab7a896c410873e3b7a791c68d73bd9a
12,259
py
Python
dragonfire/utilities.py
Booteille/Dragonfire
17d67c89d46a0f29cee99239109fddfccc5e6ab3
[ "MIT" ]
1
2019-07-11T05:48:43.000Z
2019-07-11T05:48:43.000Z
dragonfire/utilities.py
AzureMentor/Dragonfire
a3c034ab672b14329ed465dc39d944a6ec42872f
[ "MIT" ]
2
2022-02-10T06:30:37.000Z
2022-02-10T06:50:22.000Z
dragonfire/utilities.py
Allyn69/Dragonfire
4c0e873e0bee3553bf14dfb1dded85e7fa515434
[ "MIT" ]
null
null
null
#!/usr/bin/python3 # -*- coding: utf-8 -*- """ .. module:: utilities :platform: Unix :synopsis: the top-level submodule of Dragonfire that provides various utility tools for different kind of tasks. .. moduleauthor:: Mehmet Mert Yıldıran <mert.yildiran@bil.omu.edu.tr> """ import inspect # Inspect live objec...
40.193443
202
0.566441
import inspect import os import subprocess import time from multiprocessing import Pool from sys import stdout from random import randint import contextlib try: import cStringIO except ImportError: import io as cStringIO import sys import realhud from tweepy.error import TweepError...
true
true
1c3d948e2cd7cffe37c13b7bc7280311643d4f2e
3,135
py
Python
src/datasets/filesystems/hffilesystem.py
WojciechKusa/datasets
1406a04c3e911cec2680d8bc513653e0cafcaaa4
[ "Apache-2.0" ]
10,608
2020-09-10T15:47:50.000Z
2022-03-31T22:51:47.000Z
src/datasets/filesystems/hffilesystem.py
realChainLife/datasets
98261e8b0b7be4dbaaa71ae188b950f7fbe51bbd
[ "Apache-2.0" ]
2,396
2020-09-10T14:55:31.000Z
2022-03-31T19:41:04.000Z
src/datasets/filesystems/hffilesystem.py
realChainLife/datasets
98261e8b0b7be4dbaaa71ae188b950f7fbe51bbd
[ "Apache-2.0" ]
1,530
2020-09-10T21:43:10.000Z
2022-03-31T01:59:12.000Z
from pathlib import PurePath from typing import Optional import fsspec from fsspec import AbstractFileSystem from huggingface_hub.hf_api import DatasetInfo from ..utils.file_utils import get_authentication_headers_for_url, hf_hub_url class HfFileSystem(AbstractFileSystem): """Interface to files in a Hugging fac...
34.833333
119
0.589793
from pathlib import PurePath from typing import Optional import fsspec from fsspec import AbstractFileSystem from huggingface_hub.hf_api import DatasetInfo from ..utils.file_utils import get_authentication_headers_for_url, hf_hub_url class HfFileSystem(AbstractFileSystem): root_marker = "" protocol = "hf" ...
true
true
1c3d956b990d23110cf1225d4aac9ddcc643d612
10,820
py
Python
tutorials/05-dcr/plot_inv_1_dcr_sounding_irls.py
JKutt/simpeg
a0d9cf88e4551bfbfda3792521f4c85724686103
[ "MIT" ]
null
null
null
tutorials/05-dcr/plot_inv_1_dcr_sounding_irls.py
JKutt/simpeg
a0d9cf88e4551bfbfda3792521f4c85724686103
[ "MIT" ]
null
null
null
tutorials/05-dcr/plot_inv_1_dcr_sounding_irls.py
JKutt/simpeg
a0d9cf88e4551bfbfda3792521f4c85724686103
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Sparse 1D Inversion of Sounding Data ==================================== Here we use the module *SimPEG.electromangetics.static.resistivity* to invert DC resistivity sounding data and recover a 1D electrical resistivity model. In this tutorial, we focus on the following: - How to defi...
33.292308
91
0.677357
true
true
1c3d9572b6f1834a1f4954e65c96394cf825a045
112
py
Python
src/ged4py/__init__.py
cthoyt/ged4py
ab7940dd5bcd9eadf35e670f2c5313cf23b3d4c4
[ "MIT" ]
null
null
null
src/ged4py/__init__.py
cthoyt/ged4py
ab7940dd5bcd9eadf35e670f2c5313cf23b3d4c4
[ "MIT" ]
null
null
null
src/ged4py/__init__.py
cthoyt/ged4py
ab7940dd5bcd9eadf35e670f2c5313cf23b3d4c4
[ "MIT" ]
null
null
null
# -*- coding: UTF-8 -*- from .graph_edit_dist import GraphEditDistance __all__ = [ 'GraphEditDistance', ]
14
46
0.678571
from .graph_edit_dist import GraphEditDistance __all__ = [ 'GraphEditDistance', ]
true
true
1c3d9574e83f9fd728caedd59d802fdb589e4f74
19,748
py
Python
codes/models/archs/EDVR_arch.py
IanYeung/mangogogo
d0bbed28116257a64518140ba6a1320bf1f50904
[ "Apache-2.0" ]
null
null
null
codes/models/archs/EDVR_arch.py
IanYeung/mangogogo
d0bbed28116257a64518140ba6a1320bf1f50904
[ "Apache-2.0" ]
null
null
null
codes/models/archs/EDVR_arch.py
IanYeung/mangogogo
d0bbed28116257a64518140ba6a1320bf1f50904
[ "Apache-2.0" ]
null
null
null
''' network architecture for EDVR ''' import functools import torch import torch.nn as nn import torch.nn.functional as F import models.archs.arch_util as arch_util try: from models.archs.dcn.deform_conv import ModulatedDeformConvPack as DCN except ImportError: raise ImportError('Failed to import DCNv2 module.'...
44.178971
100
0.587351
import functools import torch import torch.nn as nn import torch.nn.functional as F import models.archs.arch_util as arch_util try: from models.archs.dcn.deform_conv import ModulatedDeformConvPack as DCN except ImportError: raise ImportError('Failed to import DCNv2 module.') class Predeblur_ResNet_Pyramid(nn....
true
true
1c3d9679ceb918896cd00b5b1bbd4efa0648710c
8,158
py
Python
src/python/zensols/deepnlp/transformer/resource.py
plandes/deepnlp
49820084ccf797d59535d5920559ab768bf2ec73
[ "MIT" ]
7
2020-05-11T07:13:56.000Z
2021-09-27T13:03:46.000Z
src/python/zensols/deepnlp/transformer/resource.py
plandes/deepnlp
49820084ccf797d59535d5920559ab768bf2ec73
[ "MIT" ]
null
null
null
src/python/zensols/deepnlp/transformer/resource.py
plandes/deepnlp
49820084ccf797d59535d5920559ab768bf2ec73
[ "MIT" ]
1
2022-02-12T00:22:26.000Z
2022-02-12T00:22:26.000Z
"""Provide BERT embeddings on a per sentence level. """ __author__ = 'Paul Landes' from typing import Dict, Any, Type, Tuple from dataclasses import dataclass, field, InitVar import logging import collections from io import TextIOBase from functools import reduce from pathlib import Path from torch import Tensor from...
33.850622
91
0.641824
__author__ = 'Paul Landes' from typing import Dict, Any, Type, Tuple from dataclasses import dataclass, field, InitVar import logging import collections from io import TextIOBase from functools import reduce from pathlib import Path from torch import Tensor from transformers import PreTrainedTokenizer, PreTrainedModel...
true
true
1c3d9725b285b65e39ff2d1802229357ff15407d
111,760
py
Python
python/pyspark/sql/functions.py
fushengxu/spark
27b5a7c8f49d59ec5f7d1f0332651c2fede32bec
[ "Apache-2.0" ]
null
null
null
python/pyspark/sql/functions.py
fushengxu/spark
27b5a7c8f49d59ec5f7d1f0332651c2fede32bec
[ "Apache-2.0" ]
1
2018-09-26T08:10:44.000Z
2018-09-26T08:10:44.000Z
python/pyspark/sql/functions.py
fushengxu/spark
27b5a7c8f49d59ec5f7d1f0332651c2fede32bec
[ "Apache-2.0" ]
null
null
null
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
37.453083
100
0.632731
import sys import functools import warnings if sys.version < "3": from itertools import imap as map from pyspark import since, SparkContext from pyspark.rdd import ignore_unicode_prefix, PythonEvalType from pyspark.sql.column import Column, _to_java_column, _to_seq from pyspark.sql.dataframe impo...
true
true
1c3d97af56dc880f8ba62d5e573a543dfb207fd0
1,656
py
Python
2_AddTwoNumbers.py
zoubohao/LeetCodes
e1a96958de7a1a9d3b1d6e6674f15c4aa0b30f85
[ "MIT" ]
null
null
null
2_AddTwoNumbers.py
zoubohao/LeetCodes
e1a96958de7a1a9d3b1d6e6674f15c4aa0b30f85
[ "MIT" ]
null
null
null
2_AddTwoNumbers.py
zoubohao/LeetCodes
e1a96958de7a1a9d3b1d6e6674f15c4aa0b30f85
[ "MIT" ]
null
null
null
class ListNode(object): def __init__(self, val=0, next=None): self.val = val self.next= next class Solution(object): def addTwoNumbers(self, l1, l2): """ :type l1: ListNode :type l2: ListNode :rtype: ListNode """ currentL1String = "" curr...
25.090909
59
0.51872
class ListNode(object): def __init__(self, val=0, next=None): self.val = val self.next= next class Solution(object): def addTwoNumbers(self, l1, l2): currentL1String = "" currentL2String = "" while l1.next is not None: currentL1String = str(l1.val) + current...
true
true
1c3d9869b3258ab93ec568871e4b34f51777d212
2,472
py
Python
virtex/core/queue.py
chrislarson1/virtex
36eb47d1ace297951cae36edc8a00544b85fed79
[ "Apache-2.0" ]
5
2020-06-17T06:22:32.000Z
2022-03-04T09:25:31.000Z
virtex/core/queue.py
virtexlabs/virtex
36eb47d1ace297951cae36edc8a00544b85fed79
[ "Apache-2.0" ]
null
null
null
virtex/core/queue.py
virtexlabs/virtex
36eb47d1ace297951cae36edc8a00544b85fed79
[ "Apache-2.0" ]
null
null
null
# ------------------------------------------------------------------- # Copyright 2021 Virtex 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....
24
69
0.553803
from queue import Queue from uuid import uuid4 from typing import Any, List from virtex.core.task import Task __all__ = ['WAIT_KEY', 'RequestQueue', 'ResponseQueue'] WAIT_KEY = uuid4() class RequestQueue(Queue): def __init__(self, max_pop: int): super().__init__() self.max_p...
true
true
1c3d98a532ec8d1cca2d7cb9d727c60954170e02
7,978
py
Python
alipay/aop/api/domain/PosDiscountDetail.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
213
2018-08-27T16:49:32.000Z
2021-12-29T04:34:12.000Z
alipay/aop/api/domain/PosDiscountDetail.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
29
2018-09-29T06:43:00.000Z
2021-09-02T03:27:32.000Z
alipay/aop/api/domain/PosDiscountDetail.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
59
2018-08-27T16:59:26.000Z
2022-03-25T10:08:15.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import * class PosDiscountDetail(object): def __init__(self): self._activity_id = None self._activity_type = None self._discount_name = None self._discount_type = None se...
33.805085
97
0.615693
import json from alipay.aop.api.constant.ParamConstants import * class PosDiscountDetail(object): def __init__(self): self._activity_id = None self._activity_type = None self._discount_name = None self._discount_type = None self._dish_id = None self._dish_main_o...
true
true
1c3d98a7442abf93bb6fe9415a2c078b9e7a4ef4
855
py
Python
src/anyconfig/ioinfo/__init__.py
ssato/python-anyconfig
09af1950f3226759932f5168d52f5e06ab88815c
[ "MIT" ]
213
2015-01-14T22:09:20.000Z
2022-02-02T17:23:41.000Z
src/anyconfig/ioinfo/__init__.py
ssato/python-anyconfig
09af1950f3226759932f5168d52f5e06ab88815c
[ "MIT" ]
120
2015-03-13T15:47:43.000Z
2022-03-31T01:55:34.000Z
src/anyconfig/ioinfo/__init__.py
ssato/python-anyconfig
09af1950f3226759932f5168d52f5e06ab88815c
[ "MIT" ]
34
2015-01-12T05:03:30.000Z
2021-09-09T14:40:56.000Z
# # Copyright (C) 2021 Satoru SATOH <satoru.satoh@gmail.com> # SPDX-License-Identifier: MIT # r"""ioinfo module to provide functions to create IOInfo objects wrap pathlib.Path and io objects. .. versionchanged:: 0.12.0 - Restructure and migrate some utility functions in .utils into this module. .. versionchanged:: 0...
25.147059
78
0.730994
from .datatypes import IOInfo, PathOrIOInfoT from .detectors import is_stream from .factory import make, makes __all__ = [ 'IOInfo', 'PathOrIOInfoT', 'is_stream', 'make', 'makes', ]
true
true
1c3d98ce138948644b1eb4c78424f0d6d6ca48b6
589
py
Python
setup.py
manaakiwhenua/local-outlier-factor-plugin
cb2d95c8d8f03703b5fb48ff85a3a955f7b2d090
[ "CC-BY-4.0" ]
null
null
null
setup.py
manaakiwhenua/local-outlier-factor-plugin
cb2d95c8d8f03703b5fb48ff85a3a955f7b2d090
[ "CC-BY-4.0" ]
null
null
null
setup.py
manaakiwhenua/local-outlier-factor-plugin
cb2d95c8d8f03703b5fb48ff85a3a955f7b2d090
[ "CC-BY-4.0" ]
1
2021-05-18T23:49:02.000Z
2021-05-18T23:49:02.000Z
from setuptools import setup setup(name='local_outlier_factor_plugin', version='1.1.0', description='pygeoapi plugin that wraps sklearn.neighbors.LocalOutlierFactor for doing outlier/novelty detection on geospatial (point) datasets', url='https://github.com/manaakiwhenua/local-outlier-factor-plugin', a...
32.722222
149
0.697793
from setuptools import setup setup(name='local_outlier_factor_plugin', version='1.1.0', description='pygeoapi plugin that wraps sklearn.neighbors.LocalOutlierFactor for doing outlier/novelty detection on geospatial (point) datasets', url='https://github.com/manaakiwhenua/local-outlier-factor-plugin', a...
true
true
1c3d98cf91360733cd220e6e513c92c794f16061
536
py
Python
tests/test_parameters.py
compose-x/troposphere
9a94a8fafd8b4da1cd1f4239be0e7aa0681fd8d4
[ "BSD-2-Clause" ]
4,573
2015-01-02T20:31:04.000Z
2022-03-31T17:15:32.000Z
tests/test_parameters.py
compose-x/troposphere
9a94a8fafd8b4da1cd1f4239be0e7aa0681fd8d4
[ "BSD-2-Clause" ]
1,730
2015-01-02T19:24:47.000Z
2022-03-31T23:22:52.000Z
tests/test_parameters.py
compose-x/troposphere
9a94a8fafd8b4da1cd1f4239be0e7aa0681fd8d4
[ "BSD-2-Clause" ]
1,753
2015-01-01T01:24:12.000Z
2022-03-27T05:36:17.000Z
import unittest from troposphere import Parameter, Ref class TestInitArguments(unittest.TestCase): def test_title_max_length(self): title = "i" * 256 with self.assertRaises(ValueError): Parameter(title, Type="String") def test_ref_can_be_requested(self): param = Parameter...
24.363636
62
0.664179
import unittest from troposphere import Parameter, Ref class TestInitArguments(unittest.TestCase): def test_title_max_length(self): title = "i" * 256 with self.assertRaises(ValueError): Parameter(title, Type="String") def test_ref_can_be_requested(self): param = Parameter...
true
true
1c3d99103cc759d6cf9b47af97ef467ac6d197d9
811
py
Python
CodeSignal/shiftLinkedList.py
johanaluna/DataScience_summary
a365728b81a38f31a28e97666252910a23732936
[ "MIT" ]
null
null
null
CodeSignal/shiftLinkedList.py
johanaluna/DataScience_summary
a365728b81a38f31a28e97666252910a23732936
[ "MIT" ]
null
null
null
CodeSignal/shiftLinkedList.py
johanaluna/DataScience_summary
a365728b81a38f31a28e97666252910a23732936
[ "MIT" ]
null
null
null
def shiftLinkedList(head, k): # Write your code here. def backward(head , p1, p2): while p1.next: p1 = p1.next p2 = p2.next p3 = p2.next p2.next = None p1.next = head head = p3 return head def forward(head , p1, p2): p3 = p1 while p2.next != p1: p2 = p2.next while p3.next: p3...
14.745455
32
0.567201
def shiftLinkedList(head, k): def backward(head , p1, p2): while p1.next: p1 = p1.next p2 = p2.next p3 = p2.next p2.next = None p1.next = head head = p3 return head def forward(head , p1, p2): p3 = p1 while p2.next != p1: p2 = p2.next while p3.next: p3 = p3.next p2.nex...
false
true
1c3d9a5ed90a244bd410e9ad5bb8592800016419
1,494
py
Python
tests/__init__.py
cleinias/FIT-to-TCX
f8525b4ca17f0c5c9941ada649f1e315be17d999
[ "MIT" ]
null
null
null
tests/__init__.py
cleinias/FIT-to-TCX
f8525b4ca17f0c5c9941ada649f1e315be17d999
[ "MIT" ]
null
null
null
tests/__init__.py
cleinias/FIT-to-TCX
f8525b4ca17f0c5c9941ada649f1e315be17d999
[ "MIT" ]
null
null
null
# FIT to TCX tests # # Copyright (c) 2012, Gustav Tiger <gustav@tiger.name> # # 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...
41.5
77
0.76573
from __future__ import absolute_import, division, print_function import fittotcx.program as f2t import unittest import gzip class Simple(unittest.TestCase): def test_convert(self): converted = f2t.documenttostring(f2t.convert("tests/test.fit")) result = gzip.open("tests/tes...
true
true
1c3d9bffcd1318ddf3390f10e3ba01628b98a843
71
py
Python
ebu_tt_live/bindings/_ebuttm.py
bbc/ebu-tt-live-toolkit
2d0d6e655f83c29453220abf59c213b4c2a9fc02
[ "BSD-3-Clause" ]
1
2016-05-26T13:42:37.000Z
2016-05-26T13:42:37.000Z
ebu_tt_live/bindings/_ebuttm.py
bbc/ebu-tt-live-toolkit
2d0d6e655f83c29453220abf59c213b4c2a9fc02
[ "BSD-3-Clause" ]
43
2016-04-20T14:36:06.000Z
2021-11-29T11:22:40.000Z
ebu_tt_live/bindings/_ebuttm.py
bbc/ebu-tt-live-toolkit
2d0d6e655f83c29453220abf59c213b4c2a9fc02
[ "BSD-3-Clause" ]
5
2016-04-28T10:21:29.000Z
2020-10-12T18:20:58.000Z
# -*- coding: utf-8 -*- from ebu_tt_live.bindings.raw._ebuttm import *
23.666667
46
0.690141
from ebu_tt_live.bindings.raw._ebuttm import *
true
true
1c3d9c651f59bc1a32c1a8023c5cca963e49bab4
4,090
py
Python
app.py
accup/Vyjit
b7fc04625348eed04fc076950f7fabc99007eed8
[ "MIT" ]
null
null
null
app.py
accup/Vyjit
b7fc04625348eed04fc076950f7fabc99007eed8
[ "MIT" ]
null
null
null
app.py
accup/Vyjit
b7fc04625348eed04fc076950f7fabc99007eed8
[ "MIT" ]
null
null
null
import sys import asyncio import sounddevice as sd import _lib.coroutine as coroutine from argparse import ArgumentParser, Namespace, ArgumentDefaultsHelpFormatter from typing import Optional, Sequence def get_input_devices(): return [ (device_id, device_dict) for device_id, dev...
32.983871
80
0.535452
import sys import asyncio import sounddevice as sd import _lib.coroutine as coroutine from argparse import ArgumentParser, Namespace, ArgumentDefaultsHelpFormatter from typing import Optional, Sequence def get_input_devices(): return [ (device_id, device_dict) for device_id, dev...
true
true
1c3d9c6bd6cca059d9f3766ca931b1345eddf4d5
6,821
py
Python
iknowjp_fetcher.py
daigakulounge/nihongo-wa-jouzu-desu-ne
8247fb14d30f33eb54b3be7c5b9213429c771831
[ "Unlicense" ]
3
2019-11-15T13:42:26.000Z
2022-02-03T07:13:24.000Z
iknowjp_fetcher.py
daigakulounge/nihongo-wa-jouzu-desu-ne
8247fb14d30f33eb54b3be7c5b9213429c771831
[ "Unlicense" ]
null
null
null
iknowjp_fetcher.py
daigakulounge/nihongo-wa-jouzu-desu-ne
8247fb14d30f33eb54b3be7c5b9213429c771831
[ "Unlicense" ]
null
null
null
import requests import json from openpyxl import Workbook, load_workbook from tools import deserial, xlsx_to_csv, downloader, make_json_list, resize_aspect_fit from random import randint import os, sys from random import shuffle isfetched = True #Have json files been downloaded? download_bool = True # To download med...
53.289063
410
0.697112
import requests import json from openpyxl import Workbook, load_workbook from tools import deserial, xlsx_to_csv, downloader, make_json_list, resize_aspect_fit from random import randint import os, sys from random import shuffle isfetched = True download_bool = True do_all_cores = False path = ".//files//" final_...
true
true
1c3d9d98d0b9cfe0fd8496f1a64621177181d918
253
py
Python
image_classifier/ml/device.py
sarrrrry/ImageClassifier
0c491a64ef31b74bc3228bb9bc49cbbe23e32b0e
[ "MIT" ]
null
null
null
image_classifier/ml/device.py
sarrrrry/ImageClassifier
0c491a64ef31b74bc3228bb9bc49cbbe23e32b0e
[ "MIT" ]
null
null
null
image_classifier/ml/device.py
sarrrrry/ImageClassifier
0c491a64ef31b74bc3228bb9bc49cbbe23e32b0e
[ "MIT" ]
null
null
null
import torch class Device: def __init__(self) -> None: self.device = torch.device("cpu") def __call__(self) -> torch.device: return self.device @property def is_cuda(self) -> bool: return self.device == "cuda"
19.461538
41
0.604743
import torch class Device: def __init__(self) -> None: self.device = torch.device("cpu") def __call__(self) -> torch.device: return self.device @property def is_cuda(self) -> bool: return self.device == "cuda"
true
true
1c3d9f21cd8b359f626503d515a007a07201ebdf
1,821
py
Python
bin/Package/MaybeVirtualPackageBase.py
juergenhoetzel/craft
9d3fe6dc07f2307e8f8212c8981b980a9d2d28fd
[ "BSD-2-Clause" ]
null
null
null
bin/Package/MaybeVirtualPackageBase.py
juergenhoetzel/craft
9d3fe6dc07f2307e8f8212c8981b980a9d2d28fd
[ "BSD-2-Clause" ]
null
null
null
bin/Package/MaybeVirtualPackageBase.py
juergenhoetzel/craft
9d3fe6dc07f2307e8f8212c8981b980a9d2d28fd
[ "BSD-2-Clause" ]
null
null
null
from Package.VirtualPackageBase import * from Blueprints.CraftVersion import CraftVersion import Utils.CraftCache class MaybeVirtualPackageBase(object): def __init__(self, condition, classA, classB=VirtualPackageBase): if condition: self.baseClass = classA else: self.baseCl...
41.386364
125
0.667765
from Package.VirtualPackageBase import * from Blueprints.CraftVersion import CraftVersion import Utils.CraftCache class MaybeVirtualPackageBase(object): def __init__(self, condition, classA, classB=VirtualPackageBase): if condition: self.baseClass = classA else: self.baseCl...
true
true
1c3da0e1e6962e9d19d29fb3156605d4fc739fc6
5,980
py
Python
dev/release/download_rc_binaries.py
stspyder/arrow
16b2a44be2b71bc1a7c95df70795664b4d450b6d
[ "Apache-2.0" ]
2
2020-12-18T20:40:06.000Z
2021-01-19T15:55:58.000Z
dev/release/download_rc_binaries.py
stspyder/arrow
16b2a44be2b71bc1a7c95df70795664b4d450b6d
[ "Apache-2.0" ]
14
2021-01-11T19:35:56.000Z
2021-06-29T06:54:06.000Z
dev/release/download_rc_binaries.py
stspyder/arrow
16b2a44be2b71bc1a7c95df70795664b4d450b6d
[ "Apache-2.0" ]
3
2020-11-23T14:34:30.000Z
2020-11-23T14:34:54.000Z
#!/usr/bin/env python # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "Li...
35.808383
79
0.612207
import re import argparse import concurrent.futures as cf import functools import hashlib import json import os import subprocess import urllib.request BINTRAY_API_ROOT = "https://bintray.com/api/v1" BINTRAY_DL_ROOT = "https://dl.bintray.com" BINTRAY_REPO = os.getenv('BINTRAY_REPOSITORY', 'apache/...
true
true
1c3da0fa2da760e0752080869ac022a2f9cc3ac0
787
py
Python
var/spack/repos/builtin.mock/packages/py-extension3/package.py
kkauder/spack
6ae8d5c380c1f42094b05d38be26b03650aafb39
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
2
2019-02-10T13:47:48.000Z
2019-04-17T13:05:17.000Z
var/spack/repos/builtin.mock/packages/py-extension3/package.py
kkauder/spack
6ae8d5c380c1f42094b05d38be26b03650aafb39
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
32
2020-12-15T17:29:20.000Z
2022-03-21T15:08:31.000Z
var/spack/repos/builtin.mock/packages/py-extension3/package.py
kkauder/spack
6ae8d5c380c1f42094b05d38be26b03650aafb39
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
2
2021-07-19T20:31:27.000Z
2021-07-19T21:14:14.000Z
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) class PyExtension3(Package): """Package with a dependency whose presence is conditional to the version of Python be...
35.772727
77
0.668361
class PyExtension3(Package): homepage = "http://www.example.com" url = "http://www.example.com/extension3-1.0.tar.gz" depends_on("python") depends_on('py-extension1', type=('build', 'run'), when='^python@:2.8.0') depends_on('patchelf@0.9', when='@1.0:1.1 ^python@:2') depends_on('patchelf@...
true
true
1c3da21d5b117f3287bebf014c8f9fd7715b3d06
1,191
py
Python
foamyguy_displayio_inflater.py
FoamyGuy/Foamyguy_CircuitPython_DisplayIO_Inflater
c86d50c8727b4912d94c56226b58a35ccddb815d
[ "MIT", "MIT-0", "Unlicense" ]
null
null
null
foamyguy_displayio_inflater.py
FoamyGuy/Foamyguy_CircuitPython_DisplayIO_Inflater
c86d50c8727b4912d94c56226b58a35ccddb815d
[ "MIT", "MIT-0", "Unlicense" ]
null
null
null
foamyguy_displayio_inflater.py
FoamyGuy/Foamyguy_CircuitPython_DisplayIO_Inflater
c86d50c8727b4912d94c56226b58a35ccddb815d
[ "MIT", "MIT-0", "Unlicense" ]
null
null
null
# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries # SPDX-FileCopyrightText: Copyright (c) 2021 Tim Cocks for foamyguy # # SPDX-License-Identifier: MIT """ `foamyguy_displayio_inflater` ================================================================================ Consumes JSON layout co...
31.342105
95
0.707809
__version__ = "0.0.0-auto.0" __repo__ = "https://github.com/foamyguy/Foamyguy_CircuitPython_DisplayIO_Inflater.git"
true
true
1c3da24779a9a219954dfc9fc8a10b576b9351da
44,624
py
Python
habitat/tasks/nav/nav.py
sparisi/habitat-lab
9126cccc26e352135b8273ddfc167a9bec4b43fd
[ "MIT" ]
null
null
null
habitat/tasks/nav/nav.py
sparisi/habitat-lab
9126cccc26e352135b8273ddfc167a9bec4b43fd
[ "MIT" ]
null
null
null
habitat/tasks/nav/nav.py
sparisi/habitat-lab
9126cccc26e352135b8273ddfc167a9bec4b43fd
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # TODO, lots of typing errors in here from typing import Any, List, Optional, Tuple import attr import numpy as np imp...
34.592248
120
0.613101
from typing import Any, List, Optional, Tuple import attr import numpy as np import quaternion from gym import spaces from habitat.config import Config from habitat.core.dataset import Dataset, Episode from habitat.core.embodied_task import ( EmbodiedTask, Measure, SimulatorTaskAction, ) from habi...
true
true
1c3da2661db24200db89d6da7e5c91c1f6d733d6
1,291
py
Python
air_hockey/game/scripting/draw_striker_action.py
Nemo3003/cse210-06
30ecefac7f23927be904f48b29492bb2220262a8
[ "Apache-2.0" ]
null
null
null
air_hockey/game/scripting/draw_striker_action.py
Nemo3003/cse210-06
30ecefac7f23927be904f48b29492bb2220262a8
[ "Apache-2.0" ]
null
null
null
air_hockey/game/scripting/draw_striker_action.py
Nemo3003/cse210-06
30ecefac7f23927be904f48b29492bb2220262a8
[ "Apache-2.0" ]
null
null
null
from constants import * from game.scripting.action import Action """ This is it! you need to control what the striker is doing? well, this bad boy can do it! """ class DrawStrikerAction(Action): def __init__(self, video_service): self._video_service = video_service def execute(self, cast...
30.738095
92
0.649884
from constants import * from game.scripting.action import Action class DrawStrikerAction(Action): def __init__(self, video_service): self._video_service = video_service def execute(self, cast, script, callback): striker = cast.get_first_actor(STRIKER_GROUP) body = striker.ge...
true
true
1c3da378ab54d8ab2f6d587bc0bfe333d4a26b69
178
py
Python
PSP01/programaTeste.py
clodoaldoBasaglia/personalSoftwareProcess
c60e16d0694a5fa8a4bfa5515fbe95b70cba2091
[ "Apache-2.0" ]
null
null
null
PSP01/programaTeste.py
clodoaldoBasaglia/personalSoftwareProcess
c60e16d0694a5fa8a4bfa5515fbe95b70cba2091
[ "Apache-2.0" ]
null
null
null
PSP01/programaTeste.py
clodoaldoBasaglia/personalSoftwareProcess
c60e16d0694a5fa8a4bfa5515fbe95b70cba2091
[ "Apache-2.0" ]
null
null
null
#Linha comentada def outraFuncao(): print("essa funcao so existe para printar isso") #outra linha comentada def main(): print("i got you homie") outraFuncao() main()
19.777778
52
0.696629
def outraFuncao(): print("essa funcao so existe para printar isso") def main(): print("i got you homie") outraFuncao() main()
true
true
1c3da41ab3cd76deb6bd1788ac5e105c0e2b9c17
1,981
py
Python
setup.py
iexg/dbt-mysql
253d9705c583025b4a82c9b7f00fecf0952815fa
[ "Apache-2.0" ]
1
2021-05-17T20:35:22.000Z
2021-05-17T20:35:22.000Z
setup.py
iexg/dbt-mysql
253d9705c583025b4a82c9b7f00fecf0952815fa
[ "Apache-2.0" ]
null
null
null
setup.py
iexg/dbt-mysql
253d9705c583025b4a82c9b7f00fecf0952815fa
[ "Apache-2.0" ]
2
2021-06-18T08:21:15.000Z
2021-06-18T08:40:14.000Z
#!/usr/bin/env python import os import sys from setuptools import setup if sys.version_info < (3, 6, 2): print('Error: dbt-mysql does not support this version of Python.') print('Please upgrade to Python 3.6.2 or higher.') sys.exit(1) this_directory = os.path.abspath(os.path.dirname(__file__)) with ope...
26.413333
70
0.594649
import os import sys from setuptools import setup if sys.version_info < (3, 6, 2): print('Error: dbt-mysql does not support this version of Python.') print('Please upgrade to Python 3.6.2 or higher.') sys.exit(1) this_directory = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(this_d...
true
true
1c3da41b4b1285992d11e744a873f300196a58a7
3,307
py
Python
bokeh/protocol/messages/error.py
ArchaeotheriumSapienter/bokeh
08bfae97a91db5bdc989c6ab33ec6a5125ed0d01
[ "BSD-3-Clause" ]
null
null
null
bokeh/protocol/messages/error.py
ArchaeotheriumSapienter/bokeh
08bfae97a91db5bdc989c6ab33ec6a5125ed0d01
[ "BSD-3-Clause" ]
null
null
null
bokeh/protocol/messages/error.py
ArchaeotheriumSapienter/bokeh
08bfae97a91db5bdc989c6ab33ec6a5125ed0d01
[ "BSD-3-Clause" ]
null
null
null
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. #-------------------------------------------------------------------...
31.798077
83
0.382522
from __future__ import annotations import logging log = logging.getLogger(__name__) import sys from traceback import format_exception from typing import Any, TypedDict from ...core.types import ID from ..message import Message __all__ = ( 'error', ) class Error(TypedDict): text...
true
true
1c3da4d2afc5ddc61aab27e9304514dfb248537e
8,942
py
Python
tests/media_utils/test_youtube.py
vkWeb/ricecooker
fc25d157bb48c3ec9ffa1132a79a2f9381c305b4
[ "MIT" ]
null
null
null
tests/media_utils/test_youtube.py
vkWeb/ricecooker
fc25d157bb48c3ec9ffa1132a79a2f9381c305b4
[ "MIT" ]
null
null
null
tests/media_utils/test_youtube.py
vkWeb/ricecooker
fc25d157bb48c3ec9ffa1132a79a2f9381c305b4
[ "MIT" ]
null
null
null
import os import shutil import tempfile import pytest from le_utils.constants import file_formats from ricecooker.utils import utils from ricecooker.utils import youtube trees = {} yt_resources = {} USE_PROXY_FOR_TESTS = False cc_playlist = "https://www.youtube.com/playlist?list=PL7m903CwFUgntbjkVMwts89fZq0INCtVS" ...
36.202429
115
0.680385
import os import shutil import tempfile import pytest from le_utils.constants import file_formats from ricecooker.utils import utils from ricecooker.utils import youtube trees = {} yt_resources = {} USE_PROXY_FOR_TESTS = False cc_playlist = "https://www.youtube.com/playlist?list=PL7m903CwFUgntbjkVMwts89fZq0INCtVS" ...
true
true
1c3da59d7e02ceca2be34497abe13b0df45e6cb0
5,958
py
Python
soc/hps_proto2_platform.py
ggangliu/CFU-Playground
27b8fd235ca9d42954e252fd01c2c0461d53b6ae
[ "Apache-2.0" ]
null
null
null
soc/hps_proto2_platform.py
ggangliu/CFU-Playground
27b8fd235ca9d42954e252fd01c2c0461d53b6ae
[ "Apache-2.0" ]
null
null
null
soc/hps_proto2_platform.py
ggangliu/CFU-Playground
27b8fd235ca9d42954e252fd01c2c0461d53b6ae
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from migen import Module, ClockDomain, Signal, If, log2_int from migen.genlib.resetsync import AsyncResetSynchronizer from litex.build.generic_platform im...
37.006211
94
0.628399
from migen import Module, ClockDomain, Signal, If, log2_int from migen.genlib.resetsync import AsyncResetSynchronizer from litex.build.generic_platform import Pins, Subsignal, IOStandard, Misc from litex.build.lattice import LatticePlatform, oxide from litex.build.lattice.programmer import LatticeProgrammer from li...
true
true
1c3da73d6c6130102a6d7245a6fc93c8755113b3
40,643
py
Python
automon/common_coordinator.py
hsivan/automon
222b17651533bdb2abce7de36a80156ab7b9cc21
[ "BSD-3-Clause" ]
1
2022-02-25T17:50:32.000Z
2022-02-25T17:50:32.000Z
automon/common_coordinator.py
hsivan/automon
222b17651533bdb2abce7de36a80156ab7b9cc21
[ "BSD-3-Clause" ]
null
null
null
automon/common_coordinator.py
hsivan/automon
222b17651533bdb2abce7de36a80156ab7b9cc21
[ "BSD-3-Clause" ]
1
2022-03-12T08:12:37.000Z
2022-03-12T08:12:37.000Z
import enum import numpy as np import logging from timeit import default_timer as timer import threading from automon.common_messages import MessageType, ViolationOrigin, parse_message_violation, parse_message_local_vector_info, \ prepare_message_sync, prepare_message_lazy_sync, prepare_message_get_local_vector, me...
58.902899
289
0.694412
import enum import numpy as np import logging from timeit import default_timer as timer import threading from automon.common_messages import MessageType, ViolationOrigin, parse_message_violation, parse_message_local_vector_info, \ prepare_message_sync, prepare_message_lazy_sync, prepare_message_get_local_vector, me...
true
true
1c3da756f8b5600056d989b716b806468e19b27d
6,810
py
Python
bindings/python/ensmallen_graph/datasets/string/leptolyngbyasppcc7375.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
bindings/python/ensmallen_graph/datasets/string/leptolyngbyasppcc7375.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
bindings/python/ensmallen_graph/datasets/string/leptolyngbyasppcc7375.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
""" This file offers the methods to automatically retrieve the graph Leptolyngbya sp. PCC7375. The graph is automatically retrieved from the STRING repository. Report --------------------- At the time of rendering these methods (please see datetime below), the graph had the following characteristics: Datetime: 20...
35.65445
223
0.707489
from typing import Dict from ..automatic_graph_retrieval import AutomaticallyRetrievedGraph from ...ensmallen_graph import EnsmallenGraph def LeptolyngbyaSpPcc7375( directed: bool = False, verbose: int = 2, cache_path: str = "graphs/string", **additional_graph_kwargs: Dict ) -> EnsmallenGraph: ...
true
true
1c3da75e85d599a487bcb82e43af8d7249fafef1
1,455
py
Python
peerreviews/serializers.py
SSJohns/peerreview_backend_django
0ac033bf03183ecb8991bfcb0b383d1d538ba789
[ "MIT" ]
null
null
null
peerreviews/serializers.py
SSJohns/peerreview_backend_django
0ac033bf03183ecb8991bfcb0b383d1d538ba789
[ "MIT" ]
null
null
null
peerreviews/serializers.py
SSJohns/peerreview_backend_django
0ac033bf03183ecb8991bfcb0b383d1d538ba789
[ "MIT" ]
null
null
null
from rest_framework import serializers from models import Reviewer, Author, Submission class ReviewerSerializer(serializers.ModelSerializer): class Meta: model = Reviewer fields = ('name', 'affiliation', 'email', 'bio', 'research', 'website', 'member_date', 'number_reviews') def create(self, ...
41.571429
112
0.692096
from rest_framework import serializers from models import Reviewer, Author, Submission class ReviewerSerializer(serializers.ModelSerializer): class Meta: model = Reviewer fields = ('name', 'affiliation', 'email', 'bio', 'research', 'website', 'member_date', 'number_reviews') def create(self, ...
true
true
1c3da8789de3e851b6ffc9ee4f51ae044b5a861a
31,950
py
Python
sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/models/_models.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
1
2021-06-02T08:01:35.000Z
2021-06-02T08:01:35.000Z
sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/models/_models.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
226
2019-07-24T07:57:21.000Z
2019-10-15T01:07:24.000Z
sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/models/_models.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
1
2019-06-17T22:18:23.000Z
2019-06-17T22:18:23.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
37.588235
139
0.648138
from msrest.serialization import Model from msrest.exceptions import HttpOperationError class ActionGroupPatchBody(Model): _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, } def __init__(self, **kwargs): ...
true
true
1c3da8f6e9c88e157e0302ce9b52ec275d0ac187
9,653
py
Python
posthog/api/test/test_event_definition.py
rightlyip/posthog
c00ad7a2b02df68930ca332675fc04ce4ed83a60
[ "MIT" ]
null
null
null
posthog/api/test/test_event_definition.py
rightlyip/posthog
c00ad7a2b02df68930ca332675fc04ce4ed83a60
[ "MIT" ]
null
null
null
posthog/api/test/test_event_definition.py
rightlyip/posthog
c00ad7a2b02df68930ca332675fc04ce4ed83a60
[ "MIT" ]
null
null
null
import dataclasses from datetime import datetime from typing import Any, Dict, List from uuid import uuid4 from django.conf import settings from freezegun.api import freeze_time from rest_framework import status from posthog.models import Event, EventDefinition, Organization, Team from posthog.models.user import User...
43.09375
120
0.667254
import dataclasses from datetime import datetime from typing import Any, Dict, List from uuid import uuid4 from django.conf import settings from freezegun.api import freeze_time from rest_framework import status from posthog.models import Event, EventDefinition, Organization, Team from posthog.models.user import User...
true
true
1c3da9dc46bc98a026e30e41689455499c8db299
354
py
Python
Python/DP/coins.py
qiaw99/selflerning
c6d78b41770670057dc79f1146f638948b7a1e46
[ "MIT" ]
1
2019-09-23T08:05:45.000Z
2019-09-23T08:05:45.000Z
Python/DP/coins.py
qiaw99/selflerning
c6d78b41770670057dc79f1146f638948b7a1e46
[ "MIT" ]
1
2019-09-07T13:20:43.000Z
2019-09-07T13:20:43.000Z
Python/DP/coins.py
qiaw99/selflerning
c6d78b41770670057dc79f1146f638948b7a1e46
[ "MIT" ]
null
null
null
class Solution: def coinChange(self, coins: List[int], amount: int) -> int: dp = [float("inf") for _ in range(amount + 1)] dp[0] = 0 for i in range(1, amount + 1): for j in range(len(coins)): if(coins[j] <= i): dp[i] = min(dp[i], dp[i - coins[j...
35.4
63
0.468927
class Solution: def coinChange(self, coins: List[int], amount: int) -> int: dp = [float("inf") for _ in range(amount + 1)] dp[0] = 0 for i in range(1, amount + 1): for j in range(len(coins)): if(coins[j] <= i): dp[i] = min(dp[i], dp[i - coins[j...
true
true
1c3daa448a9b6efb19e45f06ddbcc4a18f03d10d
1,861
py
Python
operations/operations/migrations/0011_serviceprovider.py
kaizer88/emps
2669b32c46befcf1a19390fb25013817e6b00980
[ "MIT" ]
null
null
null
operations/operations/migrations/0011_serviceprovider.py
kaizer88/emps
2669b32c46befcf1a19390fb25013817e6b00980
[ "MIT" ]
null
null
null
operations/operations/migrations/0011_serviceprovider.py
kaizer88/emps
2669b32c46befcf1a19390fb25013817e6b00980
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.7 on 2018-02-22 08:31 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion import lib.fields class Migration(migrations.Migration): dependencies = [ ('operatio...
50.297297
203
0.669533
from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion import lib.fields class Migration(migrations.Migration): dependencies = [ ('operations', '0010_auto_20180206_1336'), ] operations = [ migr...
true
true
1c3daa66a67a5997d5b5976ca17d876569a08e0a
657
py
Python
ocdskingfisherprocess/maindatabase/migrations/versions/0a8ab8b2756f_delete_indexes.py
matiasSanabria/kingfisher-process
88cb768aaa562714c8bd53e05717639faf041501
[ "BSD-3-Clause" ]
1
2019-04-11T10:17:32.000Z
2019-04-11T10:17:32.000Z
ocdskingfisherprocess/maindatabase/migrations/versions/0a8ab8b2756f_delete_indexes.py
matiasSanabria/kingfisher-process
88cb768aaa562714c8bd53e05717639faf041501
[ "BSD-3-Clause" ]
282
2018-12-20T16:49:22.000Z
2022-02-01T00:48:10.000Z
ocdskingfisherprocess/maindatabase/migrations/versions/0a8ab8b2756f_delete_indexes.py
matiasSanabria/kingfisher-process
88cb768aaa562714c8bd53e05717639faf041501
[ "BSD-3-Clause" ]
7
2019-04-15T13:36:18.000Z
2021-03-02T16:25:41.000Z
"""delete-indexes Revision ID: 0a8ab8b2756f Revises: d8a32a738af4 Create Date: 2019-09-12 15:37:47.306066 """ from alembic import op # revision identifiers, used by Alembic. revision = '0a8ab8b2756f' down_revision = 'd8a32a738af4' branch_labels = None depends_on = None def upgrade(): op.create_index('release_d...
24.333333
84
0.747336
from alembic import op revision = '0a8ab8b2756f' down_revision = 'd8a32a738af4' branch_labels = None depends_on = None def upgrade(): op.create_index('release_data_id_idx', 'release', ['data_id']) op.create_index('record_data_id_idx', 'record', ['data_id']) op.create_index('compiled_release_data_id_idx'...
true
true
1c3daa685ff4c7a67d36b6f5298ec9dd00d2f81e
5,951
py
Python
manuscript/elements/work.py
anterokangas/ManuscriptManagerOld
194bc6c7b899bb4ab61966af3ba1e619fc74c20c
[ "MIT" ]
null
null
null
manuscript/elements/work.py
anterokangas/ManuscriptManagerOld
194bc6c7b899bb4ab61966af3ba1e619fc74c20c
[ "MIT" ]
null
null
null
manuscript/elements/work.py
anterokangas/ManuscriptManagerOld
194bc6c7b899bb4ab61966af3ba1e619fc74c20c
[ "MIT" ]
null
null
null
from tqdm import tqdm import copy from manuscript.elements.definition import Definition from manuscript.elements.role import Role from manuscript.elements.wait import Wait from manuscript.elements.sound import Sound from manuscript.elements.group import Group from manuscript.elements.settings import Settings from man...
34.80117
93
0.612334
from tqdm import tqdm import copy from manuscript.elements.definition import Definition from manuscript.elements.role import Role from manuscript.elements.wait import Wait from manuscript.elements.sound import Sound from manuscript.elements.group import Group from manuscript.elements.settings import Settings from man...
true
true
1c3daafc0a0f31e950df1922cf552d6dd19d8f40
5,815
py
Python
brats/utils/train/config_bak.py
vuhoangminh/medical-segmentation
4a2a663d1f2d6de5c78bc521f6ed2aa1681a8804
[ "MIT" ]
1
2018-12-06T09:17:26.000Z
2018-12-06T09:17:26.000Z
brats/utils/train/config_bak.py
vuhoangminh/medical-segmentation
4a2a663d1f2d6de5c78bc521f6ed2aa1681a8804
[ "MIT" ]
null
null
null
brats/utils/train/config_bak.py
vuhoangminh/medical-segmentation
4a2a663d1f2d6de5c78bc521f6ed2aa1681a8804
[ "MIT" ]
2
2019-05-07T10:07:33.000Z
2019-05-20T12:50:37.000Z
config = dict() config["env"] = "SERVER" # change this to "FULL" if you want to run full # config["mode"] = "TEST" # change this to "FULL" if you want to run full config["mode"] = "FULL" # change this to "FULL" if you want to run full config["data_folders"] = ["data_train", "data_valid"] # change this if you want to...
45.429688
117
0.712984
config = dict() config["env"] = "SERVER" "] = ["data_train", "data_valid"] config["all_modalities"] = ["t1", "t1ce", "flair", "t2"] config["training_modalities"] = config["all_modalities"] config["nb_channels"] = len(config["training_modalities"]) config["truth_old"] = ["seg"] config["truth"] = ["truth"] config["gro...
true
true
1c3dabc2c87ce10fddca2998ea36cd2738739918
4,582
py
Python
homeassistant/components/recollect_waste/sensor.py
amatas/home-assistant-core
bdbb4f939f34682b2eca993bb041cfb21214015c
[ "Apache-2.0" ]
1
2021-03-23T07:20:03.000Z
2021-03-23T07:20:03.000Z
homeassistant/components/recollect_waste/sensor.py
amatas/home-assistant-core
bdbb4f939f34682b2eca993bb041cfb21214015c
[ "Apache-2.0" ]
30
2021-04-19T09:52:11.000Z
2022-03-31T06:09:38.000Z
homeassistant/components/recollect_waste/sensor.py
amatas/home-assistant-core
bdbb4f939f34682b2eca993bb041cfb21214015c
[ "Apache-2.0" ]
null
null
null
"""Support for ReCollect Waste sensors.""" from __future__ import annotations from typing import Callable from aiorecollect.client import PickupType import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA, SensorEntity from homeassistant.config_entries import SOURCE_IMPORT, ConfigEntry f...
31.383562
87
0.683981
from __future__ import annotations from typing import Callable from aiorecollect.client import PickupType import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA, SensorEntity from homeassistant.config_entries import SOURCE_IMPORT, ConfigEntry from homeassistant.const import ATTR_ATTRIBU...
true
true
1c3dacf07717cc6fa11d6da8b1a8e47b081bbc6b
3,676
py
Python
sympycore/physics/sysbio/utils.py
radovankavicky/pymaclab
21da758f64ed0b62969c9289576f677e977cfd98
[ "Apache-2.0" ]
96
2015-01-25T05:59:56.000Z
2021-12-29T14:05:22.000Z
sympycore/physics/sysbio/utils.py
1zinnur9/pymaclab
21da758f64ed0b62969c9289576f677e977cfd98
[ "Apache-2.0" ]
3
2015-12-17T19:25:46.000Z
2018-06-19T07:05:20.000Z
sympycore/physics/sysbio/utils.py
1zinnur9/pymaclab
21da758f64ed0b62969c9289576f677e977cfd98
[ "Apache-2.0" ]
36
2016-01-31T15:22:01.000Z
2021-03-29T07:03:07.000Z
import types import sympycore def objsize(obj): """ Recursively compute memory size of the object in bytes. Returns ------- size : int Number of bytes that the object consumes in memory. """ import numpy if obj is None: return 0 # because None is singleton if isinstance (...
26.637681
89
0.534276
import types import sympycore def objsize(obj): import numpy if obj is None: return 0 if isinstance (obj, numpy.ndarray): return 100+obj.nbytes if isinstance (obj, (int, float, bool)): return 24 if isinstance (obj, (long,complex)): return 32 if isinstance (obj...
true
true
1c3dae304f052abb7a0b30cd33f4055e33fcd96f
1,778
py
Python
splunk_add_on_ucc_framework/app_conf.py
artemrys/addonfactory-ucc-generator
6d2ffc3f46d67fd136dbbb009bb7e7d50aecbbd9
[ "Apache-2.0" ]
null
null
null
splunk_add_on_ucc_framework/app_conf.py
artemrys/addonfactory-ucc-generator
6d2ffc3f46d67fd136dbbb009bb7e7d50aecbbd9
[ "Apache-2.0" ]
null
null
null
splunk_add_on_ucc_framework/app_conf.py
artemrys/addonfactory-ucc-generator
6d2ffc3f46d67fd136dbbb009bb7e7d50aecbbd9
[ "Apache-2.0" ]
null
null
null
# # Copyright 2021 Splunk Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, so...
35.56
84
0.671541
import time from typing import IO import addonfactory_splunk_conf_parser_lib as conf_parser class AppConf: def __init__(self): self._app_conf = conf_parser.TABConfigParser() def read(self, path: str) -> None: self._app_conf.read(path) def update(self, version: str, name: ...
true
true
1c3dae8c823fdfbc97c3ac70b3afa24bc16aa51a
813
py
Python
python/ray/serve/examples/doc/snippet_custom_metric.py
jacobowitz/ray
a69f2c7bf759b35fa6573329ec244a60f4d56a2a
[ "Apache-2.0" ]
1
2021-03-13T08:18:36.000Z
2021-03-13T08:18:36.000Z
python/ray/serve/examples/doc/snippet_custom_metric.py
jacobowitz/ray
a69f2c7bf759b35fa6573329ec244a60f4d56a2a
[ "Apache-2.0" ]
3
2021-12-25T08:13:51.000Z
2022-03-12T08:10:28.000Z
python/ray/serve/examples/doc/snippet_custom_metric.py
jacobowitz/ray
a69f2c7bf759b35fa6573329ec244a60f4d56a2a
[ "Apache-2.0" ]
null
null
null
import ray from ray import serve from ray.util import metrics import time ray.init(address="auto") client = serve.start() class MyBackendClass: def __init__(self): self.my_counter = metrics.Counter( "my_counter", description=("The number of excellent requests to this backend."), ...
24.636364
78
0.671587
import ray from ray import serve from ray.util import metrics import time ray.init(address="auto") client = serve.start() class MyBackendClass: def __init__(self): self.my_counter = metrics.Counter( "my_counter", description=("The number of excellent requests to this backend."), ...
true
true
1c3daf5c7a77c06a857b2f4796246d3de678aa47
1,302
py
Python
python/easy/942_DI_String_Match.py
JackWang0107/leetcode
c02932190b639ef87a8d0fcd07d9cd6ec7344a67
[ "MIT" ]
1
2021-05-22T03:27:33.000Z
2021-05-22T03:27:33.000Z
python/easy/942_DI_String_Match.py
JackWang0107/leetcode
c02932190b639ef87a8d0fcd07d9cd6ec7344a67
[ "MIT" ]
null
null
null
python/easy/942_DI_String_Match.py
JackWang0107/leetcode
c02932190b639ef87a8d0fcd07d9cd6ec7344a67
[ "MIT" ]
null
null
null
from typing import * class Solution: # 6308 ms, faster than 5.02% of Python3 online submissions for DI String Match. # 15.5 MB, less than 6.53% of Python3 online submissions for DI String Match. def diStringMatch(self, s: str) -> List[int]: ans = [] rangelist = [i for i in range(0,len(s)+1)]...
33.384615
83
0.542243
from typing import * class Solution: def diStringMatch(self, s: str) -> List[int]: ans = [] rangelist = [i for i in range(0,len(s)+1)] for char in s: if char=='I': ans.append(min(rangelist)) rangelist.remove(min(rangelist)) el...
true
true
1c3db04c117dccc9ffc9194e5213cd07bd818e7e
404
py
Python
timeline/urls.py
asrashley/ieee-802-11-timeline
b4375dbde023dee214642e18c09318e9383a2bcf
[ "Apache-2.0" ]
null
null
null
timeline/urls.py
asrashley/ieee-802-11-timeline
b4375dbde023dee214642e18c09318e9383a2bcf
[ "Apache-2.0" ]
null
null
null
timeline/urls.py
asrashley/ieee-802-11-timeline
b4375dbde023dee214642e18c09318e9383a2bcf
[ "Apache-2.0" ]
1
2020-06-01T07:46:12.000Z
2020-06-01T07:46:12.000Z
from django.conf.urls import patterns urlpatterns = patterns('timeline.views', (r'^timeline.html$', 'main_page', {'export':'html'}), (r'^timeline.shtml$', 'main_page', {'export':'shtml'}), (r'^dn/status.json', 'backlog_poll'), ...
44.888889
79
0.450495
from django.conf.urls import patterns urlpatterns = patterns('timeline.views', (r'^timeline.html$', 'main_page', {'export':'html'}), (r'^timeline.shtml$', 'main_page', {'export':'shtml'}), (r'^dn/status.json', 'backlog_poll'), ...
true
true
1c3db062c4dbf77b79b85474ac206aec6b78f65b
72,095
py
Python
pysd/py_backend/functions.py
JamesPHoughton/pysd
5885d622144dd81af96e3c875bac74c51ddba62f
[ "MIT" ]
240
2015-01-10T21:32:27.000Z
2022-03-18T07:55:55.000Z
pysd/py_backend/functions.py
JamesPHoughton/pysd
5885d622144dd81af96e3c875bac74c51ddba62f
[ "MIT" ]
304
2015-01-20T18:51:06.000Z
2022-03-25T10:54:45.000Z
pysd/py_backend/functions.py
JamesPHoughton/pysd
5885d622144dd81af96e3c875bac74c51ddba62f
[ "MIT" ]
72
2015-05-14T21:15:58.000Z
2022-02-04T16:33:31.000Z
""" These functions have no direct analog in the standard python data analytics stack, or require information about the internal state of the system beyond what is present in the function call. We provide them in a structure that makes it easy for the model elements to call. """ import inspect import os import re impo...
32.815203
97
0.575449
import inspect import os import re import pickle import random import warnings from importlib.machinery import SourceFileLoader import numpy as np import pandas as pd import xarray as xr import scipy.stats as stats from . import utils from .external import External, Excels from pysd._version import __version__ sm...
true
true
1c3db0ad2a5a1302789e7b3d71ca6e8e88d09208
7,497
py
Python
natto/node.py
himkt/natto-py
018fe004c47c45c66bdf2e03fe24e981ae089b76
[ "BSD-2-Clause" ]
null
null
null
natto/node.py
himkt/natto-py
018fe004c47c45c66bdf2e03fe24e981ae089b76
[ "BSD-2-Clause" ]
null
null
null
natto/node.py
himkt/natto-py
018fe004c47c45c66bdf2e03fe24e981ae089b76
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- '''Wrapper for MeCab node.''' class MeCabNode(object): '''Representation of a MeCab Node struct. A list of MeCab nodes is returned when parsing a string of Japanese with as_nodes=True. Each node will contain detailed information about the morpheme encompassed. :ivar ptr: T...
36.75
80
0.598639
class MeCabNode(object): _REPR_FMT = '<{}.{} node={}, stat={}, surface="{}", feature="{}">' NOR_NODE = 0 UNK_NODE = 1 BOS_NODE = 2 EOS_NODE = 3 EON_NODE = 4 def __init__(self, nptr, surface, feature): self.ptr = nptr self.prev = nptr.prev ...
true
true
1c3db15f9323b4a6dcb67bdd7d1e1ee456db16ba
540
py
Python
mysite/search/filters.py
borlinio/simple-django-filter
c0ccc283a1eaee2f0f3d640a9f4cd3e31bfd8ee0
[ "MIT" ]
19
2016-12-01T12:16:53.000Z
2021-02-01T21:32:08.000Z
mysite/search/filters.py
borlinio/simple-django-filter
c0ccc283a1eaee2f0f3d640a9f4cd3e31bfd8ee0
[ "MIT" ]
1
2019-11-06T21:38:12.000Z
2019-11-15T18:35:11.000Z
mysite/search/filters.py
borlinio/simple-django-filter
c0ccc283a1eaee2f0f3d640a9f4cd3e31bfd8ee0
[ "MIT" ]
24
2017-07-10T01:59:36.000Z
2021-06-16T22:41:09.000Z
from django import forms from django.contrib.auth.models import User, Group import django_filters class UserFilter(django_filters.FilterSet): first_name = django_filters.CharFilter(lookup_expr='icontains') year_joined = django_filters.NumberFilter(name='date_joined', lookup_expr='year') groups = django_f...
36
120
0.761111
from django import forms from django.contrib.auth.models import User, Group import django_filters class UserFilter(django_filters.FilterSet): first_name = django_filters.CharFilter(lookup_expr='icontains') year_joined = django_filters.NumberFilter(name='date_joined', lookup_expr='year') groups = django_f...
true
true
1c3db18ac002b81a9fc2a5f90e438235341f4483
2,213
py
Python
mayan/apps/storage/model_mixins.py
atitaya1412/Mayan-EDMS
bda9302ba4b743e7d829ad118b8b836221888172
[ "Apache-2.0" ]
343
2015-01-05T14:19:35.000Z
2018-12-10T19:07:48.000Z
mayan/apps/storage/model_mixins.py
atitaya1412/Mayan-EDMS
bda9302ba4b743e7d829ad118b8b836221888172
[ "Apache-2.0" ]
191
2015-01-03T00:48:19.000Z
2018-11-30T09:10:25.000Z
mayan/apps/storage/model_mixins.py
atitaya1412/Mayan-EDMS
bda9302ba4b743e7d829ad118b8b836221888172
[ "Apache-2.0" ]
257
2019-05-14T10:26:37.000Z
2022-03-30T03:37:36.000Z
import logging from django.core.files.base import ContentFile from django.db import models from django.utils.encoding import force_text from django.utils.translation import ugettext_lazy as _, ugettext logger = logging.getLogger(name=__name__) class DatabaseFileModelMixin(models.Model): filename = models.CharFi...
29.506667
77
0.601446
import logging from django.core.files.base import ContentFile from django.db import models from django.utils.encoding import force_text from django.utils.translation import ugettext_lazy as _, ugettext logger = logging.getLogger(name=__name__) class DatabaseFileModelMixin(models.Model): filename = models.CharFi...
true
true
1c3db1e4bc987ed76c30371e9797a577ada36b11
10,562
py
Python
src/fast_dbox_test.py
rotemmairon/DeepBox
23ee1e0bb9a78267fe38dbea303ff9c4d424d773
[ "MIT" ]
152
2015-10-08T22:57:39.000Z
2020-12-31T03:08:57.000Z
src/fast_dbox_test.py
rotemmairon/DeepBox
23ee1e0bb9a78267fe38dbea303ff9c4d424d773
[ "MIT" ]
11
2015-10-24T11:06:01.000Z
2021-07-11T07:04:48.000Z
src/fast_dbox_test.py
rotemmairon/DeepBox
23ee1e0bb9a78267fe38dbea303ff9c4d424d773
[ "MIT" ]
70
2015-10-09T08:13:45.000Z
2020-09-11T09:40:43.000Z
# -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick # -------------------------------------------------------- # -------------------------------------------------------- # Fast DeepBo...
35.56229
103
0.57527
from fast_dbox_config import cfg, get_output_path import argparse from utils.timer import Timer import numpy as np import cv2 import caffe import cPickle import heapq import utils.blob import os import pdb import scipy.io as sio def _get_image_blob(im): im_pyra = [] im_orig = im.astype(np.float32,...
false
true
1c3db42727b95e5944269a235d0fe689c2721695
1,250
py
Python
userbot/modules/help.py
bangagung/Belegung-WP
dd49fb25b3d67cd62d2219c5070f2d35beb6db32
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
userbot/modules/help.py
bangagung/Belegung-WP
dd49fb25b3d67cd62d2219c5070f2d35beb6db32
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
userbot/modules/help.py
bangagung/Belegung-WP
dd49fb25b3d67cd62d2219c5070f2d35beb6db32
[ "Naumen", "Condor-1.1", "MS-PL" ]
2
2021-03-12T12:28:08.000Z
2021-07-27T15:42:06.000Z
# Copyright (C) 2019 The Raphielscape Company LLC. # # Licensed under the Raphielscape Public License, Version 1.d (the "License"); # you may not use this file except in compliance with the License. # """ Userbot help command """ from userbot import CMD_HELP from userbot.events import register modules = CMD_HELP @r...
32.894737
78
0.4896
from userbot import CMD_HELP from userbot.events import register modules = CMD_HELP @register(outgoing=True, pattern=r"^\.help(?: |$)(.*)") async def help_handler(event): args = event.pattern_match.group(1).lower() if args: if args in CMD_HELP: await event.edit(str(CMD_HELP[args])) ...
true
true
1c3db5131393d3884468d34cbc91018b02c26c76
2,140
py
Python
testCode.py
ParthPatel-ES/Quantized_PoolNet
926ab290e68f3564a456d69d00665a5615fe20da
[ "MIT" ]
1
2020-10-02T09:53:03.000Z
2020-10-02T09:53:03.000Z
testCode.py
ParthPatel-ES/Quantized_PoolNet
926ab290e68f3564a456d69d00665a5615fe20da
[ "MIT" ]
null
null
null
testCode.py
ParthPatel-ES/Quantized_PoolNet
926ab290e68f3564a456d69d00665a5615fe20da
[ "MIT" ]
null
null
null
from PIL import Image import torchvision.transforms as T import torchvision import os from PIL import Image import cv2 import torch from torch.utils import data from torchvision import transforms from torchvision.transforms import functional as F import numbers import numpy as np import random img_path = '/content/tes...
27.792208
102
0.678505
from PIL import Image import torchvision.transforms as T import torchvision import os from PIL import Image import cv2 import torch from torch.utils import data from torchvision import transforms from torchvision.transforms import functional as F import numbers import numpy as np import random img_path = '/content/tes...
true
true
1c3db5c3ad3848ab6c5f6b1d8faf74541031df5e
395
py
Python
lognotif/alertmgmt/migrations/0011_newassignment_loglist.py
subhamoykarmakar224/Django-LiveLogNotifier
15f36048f3eb8d43d9b58b04c660bcb7fa005451
[ "MIT" ]
null
null
null
lognotif/alertmgmt/migrations/0011_newassignment_loglist.py
subhamoykarmakar224/Django-LiveLogNotifier
15f36048f3eb8d43d9b58b04c660bcb7fa005451
[ "MIT" ]
null
null
null
lognotif/alertmgmt/migrations/0011_newassignment_loglist.py
subhamoykarmakar224/Django-LiveLogNotifier
15f36048f3eb8d43d9b58b04c660bcb7fa005451
[ "MIT" ]
null
null
null
# Generated by Django 2.2.12 on 2020-05-06 13:20 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('alertmgmt', '0010_auto_20200506_1229'), ] operations = [ migrations.AddField( model_name='newassignment', name='log...
20.789474
50
0.602532
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('alertmgmt', '0010_auto_20200506_1229'), ] operations = [ migrations.AddField( model_name='newassignment', name='loglist', field=models.TextField(defaul...
true
true
1c3db5ca64ea6d662dd3a8f6f5694b02a2c3abd4
11,360
py
Python
mindspore/numpy/utils.py
taroxd/mindspore
9bb620ff2caaac7f1c53c4b104935f22352cb88f
[ "Apache-2.0" ]
null
null
null
mindspore/numpy/utils.py
taroxd/mindspore
9bb620ff2caaac7f1c53c4b104935f22352cb88f
[ "Apache-2.0" ]
null
null
null
mindspore/numpy/utils.py
taroxd/mindspore
9bb620ff2caaac7f1c53c4b104935f22352cb88f
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
32
104
0.643926
from functools import partial import numpy as onp import mindspore.context as context from ..common import Tensor from ..ops import operations as P from ..ops import functional as F from ..ops.primitive import constexpr from ..common import dtype as mstype from .dtypes import dtype_tuple, all_types, dt...
true
true
1c3db692291c2f0be5ab349914a812b58691efd0
39,443
py
Python
voltha/core/adapter_agent.py
jonohart/voltha
87314cd53cb4c61e7e62b0ed3fc6da94603cc507
[ "Apache-2.0" ]
null
null
null
voltha/core/adapter_agent.py
jonohart/voltha
87314cd53cb4c61e7e62b0ed3fc6da94603cc507
[ "Apache-2.0" ]
null
null
null
voltha/core/adapter_agent.py
jonohart/voltha
87314cd53cb4c61e7e62b0ed3fc6da94603cc507
[ "Apache-2.0" ]
null
null
null
# # Copyright 2017 the original author or 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 or...
40.247959
86
0.632761
""" Agent to play gateway between CORE and an individual adapter. """ from uuid import uuid4 import arrow import structlog from google.protobuf.json_format import MessageToJson from scapy.packet import Packet from twisted.internet.defer import inlineCallbacks, returnValue from zope.interface import imp...
false
true
1c3dba68aa9d39003e184e76efb5696f2541c572
843
py
Python
tsa/science/text.py
chbrown/topic-sentiment-authorship
e8cacf11b06583d9ed85ff790e1d5322e59f2fd6
[ "MIT" ]
null
null
null
tsa/science/text.py
chbrown/topic-sentiment-authorship
e8cacf11b06583d9ed85ff790e1d5322e59f2fd6
[ "MIT" ]
null
null
null
tsa/science/text.py
chbrown/topic-sentiment-authorship
e8cacf11b06583d9ed85ff790e1d5322e59f2fd6
[ "MIT" ]
null
null
null
import re import string determiners = {'a', 'an', 'the'} conjunctions = {'and', 'or', 'but'} prepositions = {'for', 'to', 'in', 'at', 'as'} pronouns = {'you', 'this', 'it', 'your'} punctuation = {'-', 'http', '>>'} stopwords = determiners | conjunctions | prepositions | pronouns | punctuation | {'be'} punctuation2spa...
31.222222
87
0.614472
import re import string determiners = {'a', 'an', 'the'} conjunctions = {'and', 'or', 'but'} prepositions = {'for', 'to', 'in', 'at', 'as'} pronouns = {'you', 'this', 'it', 'your'} punctuation = {'-', 'http', '>>'} stopwords = determiners | conjunctions | prepositions | pronouns | punctuation | {'be'} punctuation2spa...
true
true
1c3dba7c3a9c8faeac3974d5e4f144924d971307
2,350
py
Python
tcp/ex1/cliente/cliente.py
alanrps/socketTcp
69ab44b7f1be009449a1bff14b34aa6b1e7dfaf0
[ "MIT" ]
null
null
null
tcp/ex1/cliente/cliente.py
alanrps/socketTcp
69ab44b7f1be009449a1bff14b34aa6b1e7dfaf0
[ "MIT" ]
null
null
null
tcp/ex1/cliente/cliente.py
alanrps/socketTcp
69ab44b7f1be009449a1bff14b34aa6b1e7dfaf0
[ "MIT" ]
null
null
null
import socket import time import tqdm import os import re BUFFER_SIZE = 4096 SEPARATOR = "<SEPARATOR>" class Client: def __init__(self, ip): self.ip = ip #ip da conexão self.port = 7000 def getIp(self): return self.ip def getMensagem(self): return self.mensagem ...
24.736842
116
0.553191
import socket import time import tqdm import os import re BUFFER_SIZE = 4096 SEPARATOR = "<SEPARATOR>" class Client: def __init__(self, ip): self.ip = ip self.port = 7000 def getIp(self): return self.ip def getMensagem(self): return self.mensagem def getPort(s...
true
true
1c3dbb561440066ade9bae4d560e0e3864b7178e
7,862
py
Python
pyscf/cc/test/test_ccsd_t.py
robert-anderson/pyscf
cdc56e168cb15f47e8cdc791a92d689fa9b655af
[ "Apache-2.0" ]
7
2020-03-06T15:14:17.000Z
2021-04-05T04:52:21.000Z
pyscf/cc/test/test_ccsd_t.py
robert-anderson/pyscf
cdc56e168cb15f47e8cdc791a92d689fa9b655af
[ "Apache-2.0" ]
36
2018-08-22T19:44:03.000Z
2020-05-09T10:02:36.000Z
pyscf/cc/test/test_ccsd_t.py
robert-anderson/pyscf
cdc56e168cb15f47e8cdc791a92d689fa9b655af
[ "Apache-2.0" ]
4
2018-02-14T16:28:28.000Z
2019-08-12T16:40:30.000Z
#!/usr/bin/env python # Copyright 2014-2018 The PySCF Developers. 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 # # U...
39.908629
100
0.595523
import unittest import numpy from functools import reduce from pyscf import gto, scf, lib, symm from pyscf import cc from pyscf.cc import ccsd_t from pyscf.cc import gccsd, gccsd_t mol = gto.Mole() mol.atom = [ [8 , (0. , 0. , 0.)], [1 , (0. , -.757 , .587)], [1 , (0. , .757 , .587)]] ...
true
true
1c3dbc3a08da2d27738c5da2361244dfe08f66a3
25,105
py
Python
skimage/restoration/_denoise.py
silverneko/scikit-image
1f8c74f69e0f9e72c59f180b2fc96d311659c609
[ "BSD-3-Clause" ]
null
null
null
skimage/restoration/_denoise.py
silverneko/scikit-image
1f8c74f69e0f9e72c59f180b2fc96d311659c609
[ "BSD-3-Clause" ]
5
2016-05-23T22:14:40.000Z
2022-02-25T21:10:23.000Z
skimage/restoration/_denoise.py
silverneko/scikit-image
1f8c74f69e0f9e72c59f180b2fc96d311659c609
[ "BSD-3-Clause" ]
2
2016-05-23T08:44:29.000Z
2021-06-23T00:26:23.000Z
# coding: utf-8 import scipy.stats import numpy as np from math import ceil from .. import img_as_float from ..restoration._denoise_cy import _denoise_bilateral, _denoise_tv_bregman from .._shared.utils import skimage_deprecation, warn import pywt import skimage.color as color import numbers def denoise_bilateral(ima...
39.104361
92
0.611153
import scipy.stats import numpy as np from math import ceil from .. import img_as_float from ..restoration._denoise_cy import _denoise_bilateral, _denoise_tv_bregman from .._shared.utils import skimage_deprecation, warn import pywt import skimage.color as color import numbers def denoise_bilateral(image, win_size=No...
true
true
1c3dbc776041290bf2ec5da0c9507ad110fa9307
1,033
py
Python
corehq/apps/ivr/tasks.py
dslowikowski/commcare-hq
ad8885cf8dab69dc85cb64f37aeaf06106124797
[ "BSD-3-Clause" ]
1
2015-02-10T23:26:39.000Z
2015-02-10T23:26:39.000Z
corehq/apps/ivr/tasks.py
SEL-Columbia/commcare-hq
992ee34a679c37f063f86200e6df5a197d5e3ff6
[ "BSD-3-Clause" ]
null
null
null
corehq/apps/ivr/tasks.py
SEL-Columbia/commcare-hq
992ee34a679c37f063f86200e6df5a197d5e3ff6
[ "BSD-3-Clause" ]
null
null
null
import logging from celery.task import task from corehq.apps.ivr import api from django.conf import settings from dimagi.utils.logging import notify_exception DEFAULT_OUTBOUND_RETRY_INTERVAL = 5 DEFAULT_OUTBOUND_RETRIES = 2 OUTBOUND_RETRIES = getattr(settings, "IVR_OUTBOUND_RETRIES", DEFAULT_OUTBOUND_RETRIES) OU...
31.30303
74
0.715392
import logging from celery.task import task from corehq.apps.ivr import api from django.conf import settings from dimagi.utils.logging import notify_exception DEFAULT_OUTBOUND_RETRY_INTERVAL = 5 DEFAULT_OUTBOUND_RETRIES = 2 OUTBOUND_RETRIES = getattr(settings, "IVR_OUTBOUND_RETRIES", DEFAULT_OUTBOUND_RETRIES) OU...
true
true
1c3dbd27e010da9735556af24fe03f2610ca6a9d
7,001
py
Python
1dmodel/train.py
zenanz/ChemTables
050eb5eb7ace73862352b759cc2b597fdfe1bfe1
[ "Apache-2.0" ]
4
2021-12-12T12:59:23.000Z
2022-01-29T12:32:53.000Z
1dmodel/train.py
zenanz/ChemTables
050eb5eb7ace73862352b759cc2b597fdfe1bfe1
[ "Apache-2.0" ]
null
null
null
1dmodel/train.py
zenanz/ChemTables
050eb5eb7ace73862352b759cc2b597fdfe1bfe1
[ "Apache-2.0" ]
2
2021-12-12T20:19:25.000Z
2022-01-29T12:32:53.000Z
from tqdm import tqdm import os import sys import pickle import logging import numpy as np import random import torch import json from torch.utils.data import DataLoader from torch.nn import CrossEntropyLoss from transformers import AdamW, get_linear_schedule_with_warmup # from pytorch_transformers import XLNetConfig, ...
33.985437
159
0.675046
from tqdm import tqdm import os import sys import pickle import logging import numpy as np import random import torch import json from torch.utils.data import DataLoader from torch.nn import CrossEntropyLoss from transformers import AdamW, get_linear_schedule_with_warmup from transformers import BertConfig, BertForSeq...
true
true
1c3dbd72acd820093f2fcf26fecddefd4e0c6b4e
10,251
py
Python
ucscentralsdk/mometa/adaptor/AdaptorMenloFcErrorStats.py
ragupta-git/ucscentralsdk
2678008b5fb6b0fafafec388d0874147e95a1086
[ "Apache-2.0" ]
null
null
null
ucscentralsdk/mometa/adaptor/AdaptorMenloFcErrorStats.py
ragupta-git/ucscentralsdk
2678008b5fb6b0fafafec388d0874147e95a1086
[ "Apache-2.0" ]
null
null
null
ucscentralsdk/mometa/adaptor/AdaptorMenloFcErrorStats.py
ragupta-git/ucscentralsdk
2678008b5fb6b0fafafec388d0874147e95a1086
[ "Apache-2.0" ]
null
null
null
"""This module contains the general information for AdaptorMenloFcErrorStats ManagedObject.""" from ...ucscentralmo import ManagedObject from ...ucscentralcoremeta import UcsCentralVersion, MoPropertyMeta, MoMeta from ...ucscentralmeta import VersionMeta class AdaptorMenloFcErrorStatsConsts(): MENLO_FC_INDEX_0 =...
75.933333
273
0.698566
from ...ucscentralmo import ManagedObject from ...ucscentralcoremeta import UcsCentralVersion, MoPropertyMeta, MoMeta from ...ucscentralmeta import VersionMeta class AdaptorMenloFcErrorStatsConsts(): MENLO_FC_INDEX_0 = "0" MENLO_FC_INDEX_0_A = "0_A" MENLO_FC_INDEX_0_B = "0_B" MENLO_FC_INDEX_1 = "1" ...
true
true
1c3dc10a93852becc9a2d73f52db695d503174cd
1,776
py
Python
loss_functions.py
jeffyangchen/src
cc41189d9a3e7f1b308fe04660c8c276d579805d
[ "MIT" ]
null
null
null
loss_functions.py
jeffyangchen/src
cc41189d9a3e7f1b308fe04660c8c276d579805d
[ "MIT" ]
null
null
null
loss_functions.py
jeffyangchen/src
cc41189d9a3e7f1b308fe04660c8c276d579805d
[ "MIT" ]
null
null
null
import numpy as np class Loss(object): def loss(self,y_true,y_pred): return NotImplementedError() def gradient(self,y,y_pred): return NotImplementedError() def acc(selfself,y,y_pred): return 0 class L2(Loss): def __init(self): pass def loss(self,y_true,y_pred): r...
29.114754
73
0.581644
import numpy as np class Loss(object): def loss(self,y_true,y_pred): return NotImplementedError() def gradient(self,y,y_pred): return NotImplementedError() def acc(selfself,y,y_pred): return 0 class L2(Loss): def __init(self): pass def loss(self,y_true,y_pred): r...
true
true
1c3dc14a326ce97b16c80f4d897ee3cbe390aed4
1,777
py
Python
Algorithms/t(G)_n-k/Correctness/testsVisualization.py
lucaskeiler/AlgoritmosTCC
eccf14c2c872acb9e0728eb8948eee121b274f2e
[ "MIT" ]
null
null
null
Algorithms/t(G)_n-k/Correctness/testsVisualization.py
lucaskeiler/AlgoritmosTCC
eccf14c2c872acb9e0728eb8948eee121b274f2e
[ "MIT" ]
null
null
null
Algorithms/t(G)_n-k/Correctness/testsVisualization.py
lucaskeiler/AlgoritmosTCC
eccf14c2c872acb9e0728eb8948eee121b274f2e
[ "MIT" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt from scipy import interpolate def loadFile(fileName): totalTestsList = [] correctTestsList = [] with open(fileName) as file: line = file.readline() while line: s = line.split(' ') total = int(s[0]) correc...
28.66129
82
0.575689
import numpy as np import matplotlib.pyplot as plt from scipy import interpolate def loadFile(fileName): totalTestsList = [] correctTestsList = [] with open(fileName) as file: line = file.readline() while line: s = line.split(' ') total = int(s[0]) correc...
true
true
1c3dc191fb647866a5d63c940ab2aa79fbbc2b4c
1,037
py
Python
diplomacy_research/models/self_play/advantages/__init__.py
wwongkamjan/dipnet_press
787263c1b9484698904f525c8d78d0e333e1c0d9
[ "MIT" ]
39
2019-09-06T13:42:24.000Z
2022-03-18T18:38:43.000Z
diplomacy_research/models/self_play/advantages/__init__.py
wwongkamjan/dipnet_press
787263c1b9484698904f525c8d78d0e333e1c0d9
[ "MIT" ]
9
2019-09-19T22:35:32.000Z
2022-02-24T18:04:57.000Z
diplomacy_research/models/self_play/advantages/__init__.py
wwongkamjan/dipnet_press
787263c1b9484698904f525c8d78d0e333e1c0d9
[ "MIT" ]
8
2019-10-16T21:09:14.000Z
2022-02-23T05:20:37.000Z
# ============================================================================== # Copyright 2019 - Philip Paquette # # NOTICE: 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 rest...
49.380952
97
0.639344
from .gae import GAE from .monte_carlo import MonteCarlo from .n_step import NStep from .v_trace import VTrace
true
true
1c3dc1b4d178f6b317ae75cf9b20c56b78054e07
5,064
py
Python
tests/unit/test_time_util.py
fatelei/python-driver
3bddef6185f2691e1713dfe51d1fa26d1555724c
[ "Apache-2.0" ]
null
null
null
tests/unit/test_time_util.py
fatelei/python-driver
3bddef6185f2691e1713dfe51d1fa26d1555724c
[ "Apache-2.0" ]
null
null
null
tests/unit/test_time_util.py
fatelei/python-driver
3bddef6185f2691e1713dfe51d1fa26d1555724c
[ "Apache-2.0" ]
null
null
null
# Copyright 2013-2015 DataStax, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
41.85124
113
0.594787
try: import unittest2 as unittest except ImportError: import unittest from cassandra import marshal from cassandra import util import calendar import datetime import time import uuid class TimeUtilTest(unittest.TestCase): def test_datetime_from_timestamp(self): self.assertEqual(ut...
true
true
1c3dc2d54e9f444d5cbf9ab17efc015c51af922d
637
py
Python
push/modules/utils.py
nnsnodnb/djabaas
788cea2c26e7e2afc9b7ceb6ddc4934560201c7a
[ "Apache-2.0" ]
3
2017-12-27T09:04:33.000Z
2019-08-29T13:44:53.000Z
push/modules/utils.py
nnsnodnb/djabaas
788cea2c26e7e2afc9b7ceb6ddc4934560201c7a
[ "Apache-2.0" ]
1
2018-07-30T04:42:24.000Z
2018-07-30T04:42:24.000Z
push/modules/utils.py
nnsnodnb/djabaas
788cea2c26e7e2afc9b7ceb6ddc4934560201c7a
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 from push.models import DeviceTokenModel, NotificationModel from push.modules import push_notification def convert_float_os_version(os_version): try: return float(os_version['os_version']) except Exception as e: os_version_arrays = os_version.split('.') tmp_string = os_v...
31.85
70
0.747253
from push.models import DeviceTokenModel, NotificationModel from push.modules import push_notification def convert_float_os_version(os_version): try: return float(os_version['os_version']) except Exception as e: os_version_arrays = os_version.split('.') tmp_string = os_version_arrays[...
true
true
1c3dc323619c25dd154d002793bf3bd141e73a2c
1,029
py
Python
mercedes/mercedes/urls.py
andriiglukhyi/django-mercedes
43edbb68243435341dc4a95a59a2d39a73cfc11c
[ "MIT" ]
null
null
null
mercedes/mercedes/urls.py
andriiglukhyi/django-mercedes
43edbb68243435341dc4a95a59a2d39a73cfc11c
[ "MIT" ]
null
null
null
mercedes/mercedes/urls.py
andriiglukhyi/django-mercedes
43edbb68243435341dc4a95a59a2d39a73cfc11c
[ "MIT" ]
null
null
null
"""mercedes URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.0/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-base...
36.75
77
0.713314
from django.contrib import admin from django.urls import path, include from .views import HomeView from django.conf import settings from django.conf.urls.static import static urlpatterns = [ path('admin/', admin.site.urls), path('', HomeView.as_view(), name='home'), path('accounts/', include('registration....
true
true
1c3dc4419ec91de5cdd54efc2490480904641a23
354
py
Python
catalog/migrations/0002_auto_20201206_1223.py
pythonsway/library-manager
bd89d74573b76aae79b73a27b1b067f32e315b79
[ "MIT" ]
null
null
null
catalog/migrations/0002_auto_20201206_1223.py
pythonsway/library-manager
bd89d74573b76aae79b73a27b1b067f32e315b79
[ "MIT" ]
null
null
null
catalog/migrations/0002_auto_20201206_1223.py
pythonsway/library-manager
bd89d74573b76aae79b73a27b1b067f32e315b79
[ "MIT" ]
null
null
null
# Generated by Django 3.1.3 on 2020-12-06 11:23 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('catalog', '0001_initial'), ] operations = [ migrations.AlterModelOptions( name='language', options={'ordering'...
19.666667
48
0.548023
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('catalog', '0001_initial'), ] operations = [ migrations.AlterModelOptions( name='language', options={'ordering': ('name',)}, ), ]
true
true
1c3dc5ec28a61a6f38b2e454544c5644fe6691f6
40
py
Python
tests/integration/actions/templar/__init__.py
alisonlhart/ansible-navigator
006db536ef1ea5b38a195a21ae7c0729d995bebc
[ "Apache-2.0" ]
null
null
null
tests/integration/actions/templar/__init__.py
alisonlhart/ansible-navigator
006db536ef1ea5b38a195a21ae7c0729d995bebc
[ "Apache-2.0" ]
8
2021-12-13T20:56:47.000Z
2022-03-10T14:53:04.000Z
tests/integration/actions/templar/__init__.py
alisonlhart/ansible-navigator
006db536ef1ea5b38a195a21ae7c0729d995bebc
[ "Apache-2.0" ]
null
null
null
"""Tests for the templar subcommand."""
20
39
0.7
true
true
1c3dc7012a74767db1930d6584b4c76e6571ecca
2,224
py
Python
test/programytest/parser/template/node_tests/test_uppercase.py
cdoebler1/AIML2
ee692ec5ea3794cd1bc4cc8ec2a6b5e5c20a0d6a
[ "MIT" ]
345
2016-11-23T22:37:04.000Z
2022-03-30T20:44:44.000Z
test/programytest/parser/template/node_tests/test_uppercase.py
MikeyBeez/program-y
00d7a0c7d50062f18f0ab6f4a041068e119ef7f0
[ "MIT" ]
275
2016-12-07T10:30:28.000Z
2022-02-08T21:28:33.000Z
test/programytest/parser/template/node_tests/test_uppercase.py
VProgramMist/modified-program-y
f32efcafafd773683b3fe30054d5485fe9002b7d
[ "MIT" ]
159
2016-11-28T18:59:30.000Z
2022-03-20T18:02:44.000Z
import xml.etree.ElementTree as ET from programy.parser.template.nodes.base import TemplateNode from programy.parser.template.nodes.uppercase import TemplateUppercaseNode from programy.parser.template.nodes.word import TemplateWordNode from programytest.parser.base import ParserTestsBaseClass class MockTemplateUpper...
31.771429
85
0.686601
import xml.etree.ElementTree as ET from programy.parser.template.nodes.base import TemplateNode from programy.parser.template.nodes.uppercase import TemplateUppercaseNode from programy.parser.template.nodes.word import TemplateWordNode from programytest.parser.base import ParserTestsBaseClass class MockTemplateUpper...
true
true
1c3dc8105f618bff96a43e7f96734d096c9d4039
20,455
py
Python
pytils/test/test_numeral.py
smartdec/pytils
c5c875959c02a607a9adb1aa7841e8be26952ca0
[ "MIT" ]
null
null
null
pytils/test/test_numeral.py
smartdec/pytils
c5c875959c02a607a9adb1aa7841e8be26952ca0
[ "MIT" ]
null
null
null
pytils/test/test_numeral.py
smartdec/pytils
c5c875959c02a607a9adb1aa7841e8be26952ca0
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Unit-tests for pytils.numeral """ import unittest import decimal import pytils class ChoosePluralTestCase(unittest.TestCase): """ Test case for pytils.numeral.choose_plural """ def setUp(self): """ Setting up environment for tests """ self.v...
41.830266
110
0.570667
""" Unit-tests for pytils.numeral """ import unittest import decimal import pytils class ChoosePluralTestCase(unittest.TestCase): """ Test case for pytils.numeral.choose_plural """ def setUp(self): """ Setting up environment for tests """ self.variants = (u"гвоздь", u...
false
true
1c3dc8c42b1bc0fb260c28754554308f5adc94e5
1,056
py
Python
warehouse/warehouse/customModels/migrations/0004_inventorymodel.py
perivision/BAPPE
20b01b0aee6977ddc28d09b8fd667d2ec30486b6
[ "MIT" ]
1
2020-04-16T21:40:27.000Z
2020-04-16T21:40:27.000Z
warehouse/warehouse/customModels/migrations/0004_inventorymodel.py
perivision/BAPPE
20b01b0aee6977ddc28d09b8fd667d2ec30486b6
[ "MIT" ]
null
null
null
warehouse/warehouse/customModels/migrations/0004_inventorymodel.py
perivision/BAPPE
20b01b0aee6977ddc28d09b8fd667d2ec30486b6
[ "MIT" ]
null
null
null
# Generated by Django 3.0.5 on 2020-04-16 12:10 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('customModels', '0003_auto_20200416_0318'), ] operations = [ migrations.CreateModel( name='InventoryModel', fields=[ ...
36.413793
81
0.589015
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('customModels', '0003_auto_20200416_0318'), ] operations = [ migrations.CreateModel( name='InventoryModel', fields=[ ('item_id', models.AutoField(pr...
true
true
1c3dc9afe6d06db0ef16c2cb845861dada9e17a6
101
py
Python
sodp/requestdemo/apps.py
ElHombreMorado8/sodp
e4a05620b633d261b22025af1d488cf767ba2e30
[ "Apache-2.0" ]
null
null
null
sodp/requestdemo/apps.py
ElHombreMorado8/sodp
e4a05620b633d261b22025af1d488cf767ba2e30
[ "Apache-2.0" ]
2
2021-07-15T10:13:58.000Z
2022-03-30T14:20:03.000Z
sodp/requestdemo/apps.py
ElHombreMorado8/sodp
e4a05620b633d261b22025af1d488cf767ba2e30
[ "Apache-2.0" ]
3
2021-07-03T07:13:48.000Z
2021-08-10T19:28:20.000Z
from django.apps import AppConfig class requestdemoConfig(AppConfig): name = "sodp.requestdemo"
20.2
35
0.782178
from django.apps import AppConfig class requestdemoConfig(AppConfig): name = "sodp.requestdemo"
true
true
1c3dca399610f4969955ae50899ecd2773ce695e
9,639
py
Python
tests/benchmark/test_gof.py
aksarkar/scmodes
a05a81d69a1e4b2b21ee072c3cf0bcef65360f33
[ "MIT" ]
3
2020-05-04T19:50:26.000Z
2021-03-01T06:30:48.000Z
tests/benchmark/test_gof.py
aksarkar/scmodes
a05a81d69a1e4b2b21ee072c3cf0bcef65360f33
[ "MIT" ]
null
null
null
tests/benchmark/test_gof.py
aksarkar/scmodes
a05a81d69a1e4b2b21ee072c3cf0bcef65360f33
[ "MIT" ]
null
null
null
import anndata import multiprocessing as mp import numpy as np import os import pandas as pd import pytest import rpy2.robjects.packages import rpy2.robjects.pandas2ri import scipy.sparse as ss import scipy.stats as st import scmodes import scmodes.benchmark.gof from .fixtures import test_data ashr = rpy2.robjects.pa...
31.093548
106
0.671335
import anndata import multiprocessing as mp import numpy as np import os import pandas as pd import pytest import rpy2.robjects.packages import rpy2.robjects.pandas2ri import scipy.sparse as ss import scipy.stats as st import scmodes import scmodes.benchmark.gof from .fixtures import test_data ashr = rpy2.robjects.pa...
true
true
1c3dca3e5afc0d2e12ae8a8a9d4d7ff7eb1bb2d5
23,069
py
Python
pyquil/tests/test_quil.py
Strikeskids/pyquil
369c944f22d00d987b0099012a9292243781906a
[ "Apache-2.0" ]
null
null
null
pyquil/tests/test_quil.py
Strikeskids/pyquil
369c944f22d00d987b0099012a9292243781906a
[ "Apache-2.0" ]
null
null
null
pyquil/tests/test_quil.py
Strikeskids/pyquil
369c944f22d00d987b0099012a9292243781906a
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python ############################################################################## # Copyright 2016-2017 Rigetti Computing # # 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 ...
28.621588
125
0.53288
0\nI 0\n' p = Program().inst(PHASE(pi, 0), RX(pi, 0), RY(pi, 0), RZ(pi, 0), CPHASE(pi, 0, 1), CPHASE00(pi, 0, 1), CPHASE01(pi, 0, 1), CPHASE10(pi, 0, 1), PSWAP(pi, 0, 1)) assert p.dagger().out() == 'PSWAP(-pi) 0 1\n' \ ...
true
true
1c3dcb02bc6f00599cad7a0e438cb3975d04a3fd
5,068
py
Python
nova/api/openstack/compute/fping.py
cloud-zuiwanyuan/nova
0b59a2d9dc22e4fb172810019dba5ece09bb4526
[ "Apache-2.0" ]
null
null
null
nova/api/openstack/compute/fping.py
cloud-zuiwanyuan/nova
0b59a2d9dc22e4fb172810019dba5ece09bb4526
[ "Apache-2.0" ]
1
2016-04-04T18:41:59.000Z
2016-04-04T18:41:59.000Z
nova/api/openstack/compute/fping.py
cloud-zuiwanyuan/nova
0b59a2d9dc22e4fb172810019dba5ece09bb4526
[ "Apache-2.0" ]
2
2015-12-04T23:51:46.000Z
2016-06-07T20:01:59.000Z
# Copyright 2011 Grid Dynamics # Copyright 2011 OpenStack Foundation # 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...
32.909091
79
0.609116
import itertools import os import six from webob import exc from nova.api.openstack.api_version_request \ import MAX_PROXY_API_SUPPORT_VERSION from nova.api.openstack import common from nova.api.openstack import extensions from nova.api.openstack import wsgi from nova import compute import nova.co...
true
true
1c3dcd593599230cc63d7a2a4518c88a2ca3394e
1,031
py
Python
findmeteors.py
robsinexcfe/close_meteors
6418c00417418c9cec89008ba6900e390c479e39
[ "CC0-1.0" ]
null
null
null
findmeteors.py
robsinexcfe/close_meteors
6418c00417418c9cec89008ba6900e390c479e39
[ "CC0-1.0" ]
null
null
null
findmeteors.py
robsinexcfe/close_meteors
6418c00417418c9cec89008ba6900e390c479e39
[ "CC0-1.0" ]
null
null
null
import math import requests def calc_dist(lat1, lon1, lat2, lon2): lat1 = math.radians(lat1) lon1 = math.radians(lon1) lat2 = math.radians(lat2) lon2 = math.radians(lon2) h = math.sin((lat2 - lat1) / 2) ** 2 + \ math.cos(lat1) * \ math.cos(lat2) * \ math.sin((lon2 - lon1) ...
27.131579
79
0.555771
import math import requests def calc_dist(lat1, lon1, lat2, lon2): lat1 = math.radians(lat1) lon1 = math.radians(lon1) lat2 = math.radians(lat2) lon2 = math.radians(lon2) h = math.sin((lat2 - lat1) / 2) ** 2 + \ math.cos(lat1) * \ math.cos(lat2) * \ math.sin((lon2 - lon1) ...
false
true
1c3dcdd7ac0efa24c1d050a93c9fad404efceee0
586
py
Python
src/byro/plugins/sepa/migrations/0002_auto_20171013_1436.py
uescher/byro
e43d646dc8e833591c82b2ea1711c70b9ce7e0b2
[ "Apache-2.0" ]
null
null
null
src/byro/plugins/sepa/migrations/0002_auto_20171013_1436.py
uescher/byro
e43d646dc8e833591c82b2ea1711c70b9ce7e0b2
[ "Apache-2.0" ]
null
null
null
src/byro/plugins/sepa/migrations/0002_auto_20171013_1436.py
uescher/byro
e43d646dc8e833591c82b2ea1711c70b9ce7e0b2
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.6 on 2017-10-13 14:36 from __future__ import unicode_literals import annoying.fields from django.db import migrations import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('sepa', '0001_initial'), ] operation...
25.478261
147
0.667235
from __future__ import unicode_literals import annoying.fields from django.db import migrations import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('sepa', '0001_initial'), ] operations = [ migrations.AlterField( model_name='membersepa...
true
true
1c3dcddc848289ad1c388de3e3bd08107c539e6b
1,844
py
Python
lab_operator/models.py
sajib-w3b-d3v/PACS_HIS_RIS
4ced716734cc6704d4fdd0818c78ea540ab87085
[ "MIT" ]
null
null
null
lab_operator/models.py
sajib-w3b-d3v/PACS_HIS_RIS
4ced716734cc6704d4fdd0818c78ea540ab87085
[ "MIT" ]
null
null
null
lab_operator/models.py
sajib-w3b-d3v/PACS_HIS_RIS
4ced716734cc6704d4fdd0818c78ea540ab87085
[ "MIT" ]
null
null
null
from django.db import models from accounts.models import User from django.urls import reverse from datetime import datetime,date import os import uuid import random def user_directory_path(instance, filename): # Get Current Date todays_date = datetime.now() path = "dicom/{}/{}/{}/".format(todays_date.year...
36.156863
125
0.736443
from django.db import models from accounts.models import User from django.urls import reverse from datetime import datetime,date import os import uuid import random def user_directory_path(instance, filename): todays_date = datetime.now() path = "dicom/{}/{}/{}/".format(todays_date.year, todays_date.mont...
true
true
1c3dce93679668c1253b5b3e8c6020a5550d0768
4,424
py
Python
nuxeo-tools-hooks/nxtools/hooks/endpoints/webhook/github_hook.py
nuxeo/nuxeo-tools-hooks
96746372ff088def02cf710d74a186e2fa8e1aa9
[ "Apache-2.0" ]
1
2020-06-26T13:42:56.000Z
2020-06-26T13:42:56.000Z
nuxeo-tools-hooks/nxtools/hooks/endpoints/webhook/github_hook.py
nuxeo/nuxeo-tools-hooks
96746372ff088def02cf710d74a186e2fa8e1aa9
[ "Apache-2.0" ]
16
2016-10-17T09:25:55.000Z
2021-12-13T19:35:39.000Z
nuxeo-tools-hooks/nxtools/hooks/endpoints/webhook/github_hook.py
nuxeo/nuxeo-tools-hooks
96746372ff088def02cf710d74a186e2fa8e1aa9
[ "Apache-2.0" ]
2
2016-08-22T12:25:09.000Z
2020-08-15T21:09:59.000Z
# coding=UTF-8 """ (C) Copyright 2016 Nuxeo SA (http://nuxeo.com/) and contributors. 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...
34.294574
122
0.667043
""" (C) Copyright 2016 Nuxeo SA (http://nuxeo.com/) and contributors. 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...
false
true