hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
1c28d61dbc05e81253d94819c75360a0851d7bec
27
py
Python
snippets/credit-reverse.py
timgates42/balanced-python
1df86b45c36a97ec2e214480c6806c4df3c79860
[ "MIT" ]
12
2015-04-12T06:18:33.000Z
2021-03-03T23:54:19.000Z
snippets/credit-reverse.py
takwas/balanced-python
1df86b45c36a97ec2e214480c6806c4df3c79860
[ "MIT" ]
1
2021-11-24T20:10:19.000Z
2021-11-24T20:10:19.000Z
snippets/credit-reverse.py
takwas/balanced-python
1df86b45c36a97ec2e214480c6806c4df3c79860
[ "MIT" ]
14
2015-03-23T17:52:06.000Z
2021-11-24T11:04:15.000Z
reversal = credit.reverse()
27
27
0.777778
reversal = credit.reverse()
true
true
1c28d6c0c89123bbb2ea2e23f1b00871ecf364c5
7,992
py
Python
batch/batch/cloud/gcp/resources.py
daniel-goldstein/hail
88d7f312882eaf22d16c9d58c1223e5469c98cab
[ "MIT" ]
null
null
null
batch/batch/cloud/gcp/resources.py
daniel-goldstein/hail
88d7f312882eaf22d16c9d58c1223e5469c98cab
[ "MIT" ]
19
2022-03-03T20:11:41.000Z
2022-03-30T20:31:57.000Z
batch/batch/cloud/gcp/resources.py
pwc2/hail
edeb70bc789c881dffa0724ddd11fcb25e689b67
[ "MIT" ]
null
null
null
import abc from typing import Dict, Any, Optional from ...driver.billing_manager import ProductVersions from ...resources import (Resource, StaticSizedDiskResourceMixin, ComputeResourceMixin, MemoryResourceMixin, IPFeeResourceMixin, ServiceFeeResourceMixin, DynamicSizedDiskResourceMixin, Quan...
33.3
153
0.659284
import abc from typing import Dict, Any, Optional from ...driver.billing_manager import ProductVersions from ...resources import (Resource, StaticSizedDiskResourceMixin, ComputeResourceMixin, MemoryResourceMixin, IPFeeResourceMixin, ServiceFeeResourceMixin, DynamicSizedDiskResourceMixin, Quan...
true
true
1c28d7e7735264731f56049937d3a80168662c6f
346
py
Python
cartography/intel/aws/ec2/__init__.py
ryohare/cartography
3829a97289bc2b28d041e6d7860678e2375dcee1
[ "Apache-2.0" ]
2,322
2019-03-02T01:07:20.000Z
2022-03-31T20:39:12.000Z
cartography/intel/aws/ec2/__init__.py
ryohare/cartography
3829a97289bc2b28d041e6d7860678e2375dcee1
[ "Apache-2.0" ]
462
2019-03-07T18:38:11.000Z
2022-03-31T14:55:20.000Z
cartography/intel/aws/ec2/__init__.py
ryohare/cartography
3829a97289bc2b28d041e6d7860678e2375dcee1
[ "Apache-2.0" ]
246
2019-03-03T02:39:23.000Z
2022-02-24T09:46:38.000Z
import logging from typing import List import boto3 from cartography.util import timeit logger = logging.getLogger(__name__) @timeit def get_ec2_regions(boto3_session: boto3.session.Session) -> List[str]: client = boto3_session.client('ec2') result = client.describe_regions() return [r['RegionName'] fo...
21.625
71
0.751445
import logging from typing import List import boto3 from cartography.util import timeit logger = logging.getLogger(__name__) @timeit def get_ec2_regions(boto3_session: boto3.session.Session) -> List[str]: client = boto3_session.client('ec2') result = client.describe_regions() return [r['RegionName'] fo...
true
true
1c28d8e6f6653716430cf9eaa373461fe1df32a8
8,275
py
Python
src/python/collision_approx_fourier.py
thibnoel/solo-collisions
87bf492266578b7bfd04a6657675b1477d27b314
[ "BSD-2-Clause" ]
null
null
null
src/python/collision_approx_fourier.py
thibnoel/solo-collisions
87bf492266578b7bfd04a6657675b1477d27b314
[ "BSD-2-Clause" ]
null
null
null
src/python/collision_approx_fourier.py
thibnoel/solo-collisions
87bf492266578b7bfd04a6657675b1477d27b314
[ "BSD-2-Clause" ]
1
2022-03-04T07:49:28.000Z
2022-03-04T07:49:28.000Z
import numpy as np from scipy import signal import matplotlib.pyplot as plt from solo12_shoulder_collision_utils import followBoundary, colMapToDistField # Load the collision map from file res = 200 col_map_file = './npy_data/collision_map_centered_res{}.npy'.format(res) dist_field_file = './npy_data/updated_collisio...
34.623431
158
0.670816
import numpy as np from scipy import signal import matplotlib.pyplot as plt from solo12_shoulder_collision_utils import followBoundary, colMapToDistField res = 200 col_map_file = './npy_data/collision_map_centered_res{}.npy'.format(res) dist_field_file = './npy_data/updated_collision_map_distance_res{}.npy'.format(r...
true
true
1c28d8f1dd9ab6fea20d27f3a869995936a21e65
23,857
py
Python
granular_access/lambda_functions/granular_access_assets_govenance/granular_access_assets_govenance.py
DataChant/amazon-quicksight-sdk-proserve
98c8ceb1b603f7c5dd88357c49e8f71372cd3a1a
[ "MIT-0" ]
null
null
null
granular_access/lambda_functions/granular_access_assets_govenance/granular_access_assets_govenance.py
DataChant/amazon-quicksight-sdk-proserve
98c8ceb1b603f7c5dd88357c49e8f71372cd3a1a
[ "MIT-0" ]
null
null
null
granular_access/lambda_functions/granular_access_assets_govenance/granular_access_assets_govenance.py
DataChant/amazon-quicksight-sdk-proserve
98c8ceb1b603f7c5dd88357c49e8f71372cd3a1a
[ "MIT-0" ]
null
null
null
import json import boto3 import logging import csv import io import os import tempfile # import awswrangler as wr from typing import Any, Callable, Dict, List, Optional, Union import botocore def default_botocore_config() -> botocore.config.Config: """Botocore configuration.""" retries_config: Dict[str, Unio...
39.828047
118
0.472482
import json import boto3 import logging import csv import io import os import tempfile from typing import Any, Callable, Dict, List, Optional, Union import botocore def default_botocore_config() -> botocore.config.Config: retries_config: Dict[str, Union[str, int]] = { "max_attempts": int(os.getenv("AWS_...
true
true
1c28da05f18750e69a4499fd9b9574f15d267cee
1,726
py
Python
src/primaires/objet/types/clef.py
stormi/tsunami
bdc853229834b52b2ee8ed54a3161a1a3133d926
[ "BSD-3-Clause" ]
null
null
null
src/primaires/objet/types/clef.py
stormi/tsunami
bdc853229834b52b2ee8ed54a3161a1a3133d926
[ "BSD-3-Clause" ]
null
null
null
src/primaires/objet/types/clef.py
stormi/tsunami
bdc853229834b52b2ee8ed54a3161a1a3133d926
[ "BSD-3-Clause" ]
null
null
null
# -*-coding:Utf-8 -* # Copyright (c) 2010 LE GOFF Vincent # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, this # l...
41.095238
79
0.75956
from .base import BaseType class Clef(BaseType): nom_type = "clef"
true
true
1c28db9a9dfb3b11f3a3ad3cce50ebf20cfc11ad
6,101
py
Python
homeassistant/components/sensor/haveibeenpwned.py
EmitKiwi/home-assistant
0999e2ddc476f4bddf710005168b082f03a7cdc0
[ "Apache-2.0" ]
4
2019-05-14T20:33:43.000Z
2021-09-25T14:56:08.000Z
homeassistant/components/sensor/haveibeenpwned.py
EmitKiwi/home-assistant
0999e2ddc476f4bddf710005168b082f03a7cdc0
[ "Apache-2.0" ]
null
null
null
homeassistant/components/sensor/haveibeenpwned.py
EmitKiwi/home-assistant
0999e2ddc476f4bddf710005168b082f03a7cdc0
[ "Apache-2.0" ]
1
2020-08-26T20:54:14.000Z
2020-08-26T20:54:14.000Z
""" Support for haveibeenpwned (email breaches) sensor. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.haveibeenpwned/ """ from datetime import timedelta import logging import voluptuous as vol import requests from homeassistant.components.senso...
34.083799
78
0.636945
from datetime import timedelta import logging import voluptuous as vol import requests from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import (STATE_UNKNOWN, CONF_EMAIL) from homeassistant.helpers.entity import Entity import homeassistant.helpers.config_validation as cv from homea...
true
true
1c28dbe6c3bbd945ec608feb9baac9a60a0f82fc
1,573
py
Python
lib/spack/spack/util/string.py
whitfin/spack
aabd2be31a511d0e00c1017f7311a421659319d9
[ "ECL-2.0", "Apache-2.0", "MIT" ]
3
2019-06-27T13:26:50.000Z
2019-07-01T16:24:54.000Z
lib/spack/spack/util/string.py
openbiox/spack
bb6ec7fb40c14b37e094a860e3625af53f633174
[ "ECL-2.0", "Apache-2.0", "MIT" ]
75
2016-07-27T11:43:00.000Z
2020-12-08T15:56:53.000Z
lib/spack/spack/util/string.py
openbiox/spack
bb6ec7fb40c14b37e094a860e3625af53f633174
[ "ECL-2.0", "Apache-2.0", "MIT" ]
8
2015-10-16T13:51:49.000Z
2021-10-18T13:58:03.000Z
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) def comma_list(sequence, article=''): if type(sequence) != list: sequence = list(sequence) if not sequen...
27.12069
79
0.577241
def comma_list(sequence, article=''): if type(sequence) != list: sequence = list(sequence) if not sequence: return elif len(sequence) == 1: return sequence[0] else: out = ', '.join(str(s) for s in sequence[:-1]) if len(sequence) != 2: out += ','...
true
true
1c28dc4368194dea8544f92bce5cbc97249cc52d
25
py
Python
nephelae_utils/__init__.py
pnarvor/nephelae_base
d5f1abeae0b0473b895b4735f182ddae0516a1bd
[ "BSD-3-Clause" ]
null
null
null
nephelae_utils/__init__.py
pnarvor/nephelae_base
d5f1abeae0b0473b895b4735f182ddae0516a1bd
[ "BSD-3-Clause" ]
null
null
null
nephelae_utils/__init__.py
pnarvor/nephelae_base
d5f1abeae0b0473b895b4735f182ddae0516a1bd
[ "BSD-3-Clause" ]
null
null
null
from . import analysis
6.25
22
0.72
from . import analysis
true
true
1c28dc53c64a238cfb89fa0d26b51d014039b665
4,497
py
Python
python/ray/util/client/__init__.py
ChaceAshcraft/ray
a72237f1712e2805f6799de3489e326e2965d624
[ "Apache-2.0" ]
1
2021-01-29T12:24:02.000Z
2021-01-29T12:24:02.000Z
python/ray/util/client/__init__.py
ChaceAshcraft/ray
a72237f1712e2805f6799de3489e326e2965d624
[ "Apache-2.0" ]
8
2021-06-05T07:09:35.000Z
2022-02-19T08:06:20.000Z
python/ray/util/client/__init__.py
ChaceAshcraft/ray
a72237f1712e2805f6799de3489e326e2965d624
[ "Apache-2.0" ]
1
2021-01-29T12:24:05.000Z
2021-01-29T12:24:05.000Z
from typing import List, Tuple, Dict, Any import logging logger = logging.getLogger(__name__) class RayAPIStub: """This class stands in as the replacement API for the `import ray` module. Much like the ray module, this mostly delegates the work to the _client_worker. As parts of the ray API are covered...
35.690476
79
0.620414
from typing import List, Tuple, Dict, Any import logging logger = logging.getLogger(__name__) class RayAPIStub: def __init__(self): from ray.util.client.api import ClientAPI self.api = ClientAPI() self.client_worker = None self._server = None self._connected_with_init = ...
true
true
1c28e0ef5e0178f2a6b29c2098b158a63af7e914
3,076
py
Python
code/Attack/ParameterTypes/Port.py
TomasMadeja/ID2T
77f51c074d1ff83c7d648ae62ecaed3e5cfde80c
[ "MIT" ]
33
2018-11-21T12:50:52.000Z
2022-01-12T05:38:12.000Z
code/Attack/ParameterTypes/Port.py
TomasMadeja/ID2T
77f51c074d1ff83c7d648ae62ecaed3e5cfde80c
[ "MIT" ]
108
2018-11-21T12:33:47.000Z
2022-02-09T15:56:59.000Z
code/Attack/ParameterTypes/Port.py
TomasMadeja/ID2T
77f51c074d1ff83c7d648ae62ecaed3e5cfde80c
[ "MIT" ]
20
2018-11-22T13:03:20.000Z
2022-01-12T00:19:28.000Z
import re import typing as t import Attack.ParameterTypes.BaseType as BaseType class Port(BaseType.ParameterType): def __init__(self): super(Port, self).__init__() self.name = "Port" def validate(self, value: int) -> (bool, int): return Port._is_port(value) @staticmethod de...
38.936709
119
0.56827
import re import typing as t import Attack.ParameterTypes.BaseType as BaseType class Port(BaseType.ParameterType): def __init__(self): super(Port, self).__init__() self.name = "Port" def validate(self, value: int) -> (bool, int): return Port._is_port(value) @staticmethod de...
true
true
1c28e166f2238f1dbb0444bf95a576c4e46259a4
213
py
Python
main/urls.py
gureuso/turnthepage
f86f4e6e80e4a817b06cc5c777d733cf8171310e
[ "Apache-2.0" ]
1
2019-04-27T13:36:26.000Z
2019-04-27T13:36:26.000Z
main/urls.py
gureuso/turnthepage
f86f4e6e80e4a817b06cc5c777d733cf8171310e
[ "Apache-2.0" ]
7
2020-06-05T20:21:29.000Z
2022-03-11T23:44:41.000Z
main/urls.py
gureuso/turnthepage
f86f4e6e80e4a817b06cc5c777d733cf8171310e
[ "Apache-2.0" ]
null
null
null
from django.urls import path from . import views app_name = 'main' urlpatterns = [ path('', views.IndexView.as_view(), name='index'), path('favicon.ico', views.FaviconView.as_view(), name='favicon'), ]
19.363636
69
0.676056
from django.urls import path from . import views app_name = 'main' urlpatterns = [ path('', views.IndexView.as_view(), name='index'), path('favicon.ico', views.FaviconView.as_view(), name='favicon'), ]
true
true
1c28e168ae825e8f1dd49be18f9f919a5a26e5c5
19,390
py
Python
sympy/printing/codeprinter.py
STALKER2010/sympy-bleeding-edge
81233029a9a30866747f6da2c0e9604d1681d474
[ "BSD-3-Clause" ]
2
2018-12-05T02:30:43.000Z
2020-11-14T01:43:15.000Z
sympy/printing/codeprinter.py
STALKER2010/sympy-bleeding-edge
81233029a9a30866747f6da2c0e9604d1681d474
[ "BSD-3-Clause" ]
null
null
null
sympy/printing/codeprinter.py
STALKER2010/sympy-bleeding-edge
81233029a9a30866747f6da2c0e9604d1681d474
[ "BSD-3-Clause" ]
null
null
null
from __future__ import print_function, division from functools import wraps from sympy.core import Add, Mul, Pow, S, sympify, Float from sympy.core.basic import Basic from sympy.core.containers import Tuple from sympy.core.compatibility import default_sort_key, string_types from sympy.core.function import Lambda from...
39.171717
118
0.586127
from __future__ import print_function, division from functools import wraps from sympy.core import Add, Mul, Pow, S, sympify, Float from sympy.core.basic import Basic from sympy.core.containers import Tuple from sympy.core.compatibility import default_sort_key, string_types from sympy.core.function import Lambda from...
true
true
1c28e18ad10c4c28a7dd07b3acfa7409e8c816b1
3,576
py
Python
libs/fuel/fuel/converters/cifar100.py
dendisuhubdy/attention-lvcsr
598d487c118e66875fdd625baa84ed29d283b800
[ "MIT" ]
767
2015-05-21T03:32:01.000Z
2019-02-10T13:34:41.000Z
libs/fuel/fuel/converters/cifar100.py
shenshenzhanzhan/attention-lvcsr
598d487c118e66875fdd625baa84ed29d283b800
[ "MIT" ]
274
2015-05-16T19:18:45.000Z
2018-09-06T07:13:38.000Z
libs/fuel/fuel/converters/cifar100.py
shenshenzhanzhan/attention-lvcsr
598d487c118e66875fdd625baa84ed29d283b800
[ "MIT" ]
258
2015-05-21T04:55:25.000Z
2019-01-23T07:34:27.000Z
import os import tarfile import h5py import numpy import six from six.moves import cPickle from fuel.converters.base import fill_hdf5_file, check_exists DISTRIBUTION_FILE = 'cifar-100-python.tar.gz' @check_exists(required_files=[DISTRIBUTION_FILE]) def convert_cifar100(directory, output_directory, ...
33.111111
78
0.626957
import os import tarfile import h5py import numpy import six from six.moves import cPickle from fuel.converters.base import fill_hdf5_file, check_exists DISTRIBUTION_FILE = 'cifar-100-python.tar.gz' @check_exists(required_files=[DISTRIBUTION_FILE]) def convert_cifar100(directory, output_directory, ...
true
true
1c28e1f1c448bb5be57c32450b02224e8768b5d2
25,334
py
Python
pyscf/df/hessian/uhf.py
azag0/pyscf
1e3e27b61b3cfd22c9679d2c9851c13b3ebc5a1b
[ "Apache-2.0" ]
2
2021-09-17T06:10:17.000Z
2022-01-22T23:37:22.000Z
pyscf/df/hessian/uhf.py
azag0/pyscf
1e3e27b61b3cfd22c9679d2c9851c13b3ebc5a1b
[ "Apache-2.0" ]
null
null
null
pyscf/df/hessian/uhf.py
azag0/pyscf
1e3e27b61b3cfd22c9679d2c9851c13b3ebc5a1b
[ "Apache-2.0" ]
2
2020-06-01T05:31:38.000Z
2022-02-08T02:38:33.000Z
#!/usr/bin/env python # # This code was copied from the data generation program of Tencent Alchemy # project (https://github.com/tencent-alchemy). # # # # # # Copyright 2019 Tencent America LLC. All Rights Reserved. # # # # Licensed under the Apache License, Version 2.0 (the "License"); # # you may not use this file e...
44.367776
115
0.570656
ssobj, mo_energy=None, mo_coeff=None, mo_occ=None, atmlst=None, max_memory=4000, verbose=None, with_k=True): log = logger.new_logger(hessobj, verbose) time0 = t1 = (time.clock(), time.time()) mol = hessobj.mol mf = hessobj.base if mo_energy is None: mo_energy = mf.mo_ene...
true
true
1c28e22739393c68178febfae2562a0c2c9016c0
155
py
Python
tests/conftest.py
zaibon/js-ng
8b63c04757d1432ed4aa588500a113610701de14
[ "Apache-2.0" ]
2
2021-04-28T10:46:08.000Z
2021-12-22T12:33:34.000Z
tests/conftest.py
zaibon/js-ng
8b63c04757d1432ed4aa588500a113610701de14
[ "Apache-2.0" ]
321
2020-06-15T11:48:21.000Z
2022-03-29T22:13:33.000Z
tests/conftest.py
zaibon/js-ng
8b63c04757d1432ed4aa588500a113610701de14
[ "Apache-2.0" ]
4
2020-06-18T06:19:29.000Z
2021-07-14T12:54:47.000Z
def pytest_collection_modifyitems(items, config): for item in items: if not any(item.iter_markers()): item.add_marker("unittests")
31
49
0.670968
def pytest_collection_modifyitems(items, config): for item in items: if not any(item.iter_markers()): item.add_marker("unittests")
true
true
1c28e23e2f00d969b63b411d6ff7f2566e463277
4,234
py
Python
securify/solidity/utils.py
AlexandreH/securify2
2d2ba0e1c20cdda550120ecdc1a7164db9b90e3c
[ "Apache-2.0" ]
258
2020-01-23T16:58:38.000Z
2022-03-31T17:29:25.000Z
securify/solidity/utils.py
sirhashalot/securify2
6852707449577add14bafce8e304946b3490a977
[ "Apache-2.0" ]
34
2020-01-30T06:11:58.000Z
2022-02-27T07:53:17.000Z
securify/solidity/utils.py
sirhashalot/securify2
6852707449577add14bafce8e304946b3490a977
[ "Apache-2.0" ]
66
2020-01-28T09:23:05.000Z
2022-03-22T09:01:43.000Z
import itertools from dataclasses import dataclass from functools import lru_cache from io import StringIO from tokenize import generate_tokens from typing import List, Iterable, TypeVar, Callable, Type, Optional from securify.grammar.attributes.annotations3 import synthesized T = TypeVar("T") @dataclass class Unde...
23.392265
104
0.599906
import itertools from dataclasses import dataclass from functools import lru_cache from io import StringIO from tokenize import generate_tokens from typing import List, Iterable, TypeVar, Callable, Type, Optional from securify.grammar.attributes.annotations3 import synthesized T = TypeVar("T") @dataclass class Unde...
true
true
1c28e2753555bd55e815072b4f52e5ba9d63b78d
1,077
py
Python
gdc_fastq_splitter/__main__.py
kmhernan/gdc-fastq-splitter
cd1ad03e578638051b173b9ddf7e9861cb9c95ef
[ "Apache-2.0" ]
2
2018-03-27T00:58:35.000Z
2020-10-13T20:03:08.000Z
gdc_fastq_splitter/__main__.py
kmhernan/gdc-fastq-splitter
cd1ad03e578638051b173b9ddf7e9861cb9c95ef
[ "Apache-2.0" ]
1
2020-07-01T17:32:49.000Z
2020-07-02T18:38:39.000Z
gdc_fastq_splitter/__main__.py
kmhernan/gdc-fastq-splitter
cd1ad03e578638051b173b9ddf7e9861cb9c95ef
[ "Apache-2.0" ]
3
2019-06-07T18:15:15.000Z
2021-01-09T13:05:02.000Z
"""Main entrypoint for gdc-fastq-splitter CLI""" import argparse import time from signal import signal, SIGPIPE, SIG_DFL from gdc_fastq_splitter import VERSION from gdc_fastq_splitter.utils import get_logger from gdc_fastq_splitter.handler import main_handler signal(SIGPIPE, SIG_DFL) def main(args=None): """The...
26.925
78
0.685237
import argparse import time from signal import signal, SIGPIPE, SIG_DFL from gdc_fastq_splitter import VERSION from gdc_fastq_splitter.utils import get_logger from gdc_fastq_splitter.handler import main_handler signal(SIGPIPE, SIG_DFL) def main(args=None): start = time.time() logger = get_logger("gdc-fastq-...
true
true
1c28e2878e99a8e86114f181ff3a99e94a42a261
13,115
py
Python
homeassistant/helpers/event.py
dauden1184/home-assistant
f4c6d389b77d0efa86644e76604eaea5d21abdb5
[ "Apache-2.0" ]
1
2021-04-08T06:02:25.000Z
2021-04-08T06:02:25.000Z
homeassistant/helpers/event.py
dauden1184/home-assistant
f4c6d389b77d0efa86644e76604eaea5d21abdb5
[ "Apache-2.0" ]
5
2021-02-08T20:32:11.000Z
2022-01-13T01:19:23.000Z
homeassistant/helpers/event.py
dauden1184/home-assistant
f4c6d389b77d0efa86644e76604eaea5d21abdb5
[ "Apache-2.0" ]
1
2019-04-16T14:07:20.000Z
2019-04-16T14:07:20.000Z
"""Helpers for listening to events.""" from datetime import timedelta import functools as ft from homeassistant.loader import bind_hass from homeassistant.helpers.sun import get_astral_event_next from ..core import HomeAssistant, callback from ..const import ( ATTR_NOW, EVENT_STATE_CHANGED, EVENT_TIME_CHANGED, MAT...
32.302956
79
0.691041
from datetime import timedelta import functools as ft from homeassistant.loader import bind_hass from homeassistant.helpers.sun import get_astral_event_next from ..core import HomeAssistant, callback from ..const import ( ATTR_NOW, EVENT_STATE_CHANGED, EVENT_TIME_CHANGED, MATCH_ALL) from ..util import dt as dt_uti...
true
true
1c28e2a3e6e2ba27051a5531d417b9a6ee5aa25b
1,983
py
Python
tests/generation/modules/decoder_nets/stacked_self_attention_test.py
matt-peters/allennlp-models
cdd505ed539fdc2b82e4cc0a23eae4bfd3368e7e
[ "Apache-2.0" ]
402
2020-03-11T22:58:35.000Z
2022-03-29T09:05:27.000Z
tests/generation/modules/decoder_nets/stacked_self_attention_test.py
matt-peters/allennlp-models
cdd505ed539fdc2b82e4cc0a23eae4bfd3368e7e
[ "Apache-2.0" ]
116
2020-03-11T01:26:57.000Z
2022-03-25T13:03:56.000Z
tests/generation/modules/decoder_nets/stacked_self_attention_test.py
matt-peters/allennlp-models
cdd505ed539fdc2b82e4cc0a23eae4bfd3368e7e
[ "Apache-2.0" ]
140
2020-03-11T00:51:35.000Z
2022-03-29T09:05:36.000Z
import torch from allennlp.common.testing import AllenNlpTestCase from allennlp_models.generation import StackedSelfAttentionDecoderNet class TestStackedSelfAttentionDecoderNet(AllenNlpTestCase): def test_stacked_self_attention_decoder_net_init(self): decoder_inout_dim = 10 decoder_net = Stacked...
38.882353
96
0.683812
import torch from allennlp.common.testing import AllenNlpTestCase from allennlp_models.generation import StackedSelfAttentionDecoderNet class TestStackedSelfAttentionDecoderNet(AllenNlpTestCase): def test_stacked_self_attention_decoder_net_init(self): decoder_inout_dim = 10 decoder_net = Stacked...
true
true
1c28e2acd60fcbdac94b1687c546f3d8d4b375b2
200
py
Python
core/urls.py
PqES/forkuptool
ae7caf33642245618ff59cdc6ff7eb94ea125034
[ "MIT" ]
null
null
null
core/urls.py
PqES/forkuptool
ae7caf33642245618ff59cdc6ff7eb94ea125034
[ "MIT" ]
null
null
null
core/urls.py
PqES/forkuptool
ae7caf33642245618ff59cdc6ff7eb94ea125034
[ "MIT" ]
1
2021-03-17T17:25:37.000Z
2021-03-17T17:25:37.000Z
from django.conf.urls import url from . import views urlpatterns = [ url(r'^index/', views.index, name='index'), url(r'^index/', views.index, name='home'), url(r'^$', views.index, name='index'), ]
25
44
0.655
from django.conf.urls import url from . import views urlpatterns = [ url(r'^index/', views.index, name='index'), url(r'^index/', views.index, name='home'), url(r'^$', views.index, name='index'), ]
true
true
1c28e5041ed5aa0c648caa11b1f30e5c3638ac9e
5,665
py
Python
assignments/assignment1/knn.py
GusevMihail/dlcourse_ai
7f20c625e09f92f20f2da9304abb1a4edd4ae93c
[ "MIT" ]
null
null
null
assignments/assignment1/knn.py
GusevMihail/dlcourse_ai
7f20c625e09f92f20f2da9304abb1a4edd4ae93c
[ "MIT" ]
null
null
null
assignments/assignment1/knn.py
GusevMihail/dlcourse_ai
7f20c625e09f92f20f2da9304abb1a4edd4ae93c
[ "MIT" ]
null
null
null
import numpy as np class KNN: """ K-neariest-neighbor classifier using L1 loss """ def __init__(self, k=1): self.k = k def fit(self, X, y): self.train_X = X self.train_y = y def predict(self, X, num_loops=0): ''' Uses the KNN model to predict clases f...
35.186335
96
0.593469
import numpy as np class KNN: def __init__(self, k=1): self.k = k def fit(self, X, y): self.train_X = X self.train_y = y def predict(self, X, num_loops=0): if num_loops == 0: dists = self.compute_distances_no_loops(X) elif num_loops == 1: ...
true
true
1c28e555dbd199717795ab9432e956d14bd13e61
3,643
py
Python
datasets/mnist.py
rohitgirdhar/ActionVLAD
0d87b69d3069db3fe521923675e353f755c5d765
[ "Apache-2.0" ]
228
2017-05-08T04:50:49.000Z
2021-12-23T10:57:52.000Z
datasets/mnist.py
icyzhang0923/ActionVLAD
08d3d65301940991e0a0cdca2c0534edf6749f41
[ "Apache-2.0" ]
39
2017-05-12T05:23:46.000Z
2021-03-21T03:40:02.000Z
datasets/mnist.py
icyzhang0923/ActionVLAD
08d3d65301940991e0a0cdca2c0534edf6749f41
[ "Apache-2.0" ]
84
2017-05-08T01:11:25.000Z
2021-06-03T09:37:36.000Z
# ------------------------------------------------------------------------------ # ActionVLAD: Learning spatio-temporal aggregation for action classification # Copyright (c) 2017 Carnegie Mellon University and Adobe Systems Incorporated # Please see LICENSE on https://github.com/rohitgirdhar/ActionVLAD/ for details # -...
35.028846
80
0.693385
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import tensorflow as tf from datasets import dataset_utils slim = tf.contrib.slim _FILE_PATTERN = 'mnist_%s.tfrecord' _SPLITS_TO_SIZES = {'train': 60000, 'test': 10000} _NUM_C...
true
true
1c28e83259edda8b65fa317e5d0384c00899b62a
3,933
py
Python
test/MiscLib/tests/TestScanFiles.py
mkozuharov/DataStage
a61e67c901c2b43afa0fec6a99ef72152391a55f
[ "MIT" ]
8
2015-02-25T10:58:52.000Z
2020-04-17T03:11:48.000Z
test/MiscLib/tests/TestScanFiles.py
mkozuharov/DataStage
a61e67c901c2b43afa0fec6a99ef72152391a55f
[ "MIT" ]
null
null
null
test/MiscLib/tests/TestScanFiles.py
mkozuharov/DataStage
a61e67c901c2b43afa0fec6a99ef72152391a55f
[ "MIT" ]
7
2015-02-25T10:58:54.000Z
2019-11-04T16:19:22.000Z
# --------------------------------------------------------------------- # # Copyright (c) 2012 University of Oxford # # 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, incl...
39.727273
111
0.668955
import sys import unittest import re from os.path import normpath sys.path.append("../..") from MiscLib.ScanFiles import * from MiscLib.Functions import compareLists class TestScanFiles(unittest.TestCase): def setUp(self): self.testpath = "resources/" self.testpatt =...
true
true
1c28e8867cb298b05a45e4ad4e3868b665847d04
2,650
py
Python
opendbc/can/tests/test_packer_parser.py
919bot/Tessa
9b48ff9020e8fb6992fc78271f2720fd19e01093
[ "MIT" ]
85
2019-06-14T17:51:31.000Z
2022-02-09T22:18:20.000Z
opendbc/can/tests/test_packer_parser.py
919bot/Tessa
9b48ff9020e8fb6992fc78271f2720fd19e01093
[ "MIT" ]
4
2018-12-08T19:02:06.000Z
2019-09-01T13:54:26.000Z
opendbc/can/tests/test_packer_parser.py
919bot/Tessa
9b48ff9020e8fb6992fc78271f2720fd19e01093
[ "MIT" ]
73
2018-12-03T19:34:42.000Z
2020-07-27T05:10:23.000Z
#!/usr/bin/env python3 import unittest from opendbc.can.parser import CANParser from opendbc.can.packer import CANPacker import cereal.messaging as messaging # Python implementation so we don't have to depend on boardd def can_list_to_can_capnp(can_msgs, msgtype='can'): dat = messaging.new_message() dat.init(ms...
25
93
0.626038
import unittest from opendbc.can.parser import CANParser from opendbc.can.packer import CANPacker import cereal.messaging as messaging def can_list_to_can_capnp(can_msgs, msgtype='can'): dat = messaging.new_message() dat.init(msgtype, len(can_msgs)) for i, can_msg in enumerate(can_msgs): if msgtype == ...
true
true
1c28e88fd554392b7578028583827bb82f1fcb30
1,386
py
Python
tests/providers/google/cloud/operators/test_workflows_system.py
ChaseKnowlden/airflow
6b71eac1997a7c0db3b8e3aed6b4e65d01871440
[ "Apache-2.0" ]
15,947
2019-01-05T13:51:02.000Z
2022-03-31T23:33:16.000Z
tests/providers/google/cloud/operators/test_workflows_system.py
ChaseKnowlden/airflow
6b71eac1997a7c0db3b8e3aed6b4e65d01871440
[ "Apache-2.0" ]
14,603
2019-01-05T09:43:19.000Z
2022-03-31T23:11:59.000Z
tests/providers/google/cloud/operators/test_workflows_system.py
ChaseKnowlden/airflow
6b71eac1997a7c0db3b8e3aed6b4e65d01871440
[ "Apache-2.0" ]
8,429
2019-01-05T19:45:47.000Z
2022-03-31T22:13:01.000Z
# # 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...
38.5
103
0.779942
import pytest from tests.providers.google.cloud.utils.gcp_authenticator import GCP_WORKFLOWS_KEY from tests.test_utils.gcp_system_helpers import CLOUD_DAG_FOLDER, GoogleSystemTest, provide_gcp_context @pytest.mark.system("google.cloud") @pytest.mark.credential_file(GCP_WORKFLOWS_KEY) class CloudVisi...
true
true
1c28e8bcb12175bf9c70588b23a2f0811f1f9a91
17,078
py
Python
retopoflow/rftool_polystrips/polystrips_ops.py
Unnoen/retopoflow
73c7cfc10a0b58937198d60e308ba5248b446490
[ "OML" ]
1
2022-01-10T23:40:21.000Z
2022-01-10T23:40:21.000Z
retopoflow/rftool_polystrips/polystrips_ops.py
Unnoen/retopoflow
73c7cfc10a0b58937198d60e308ba5248b446490
[ "OML" ]
null
null
null
retopoflow/rftool_polystrips/polystrips_ops.py
Unnoen/retopoflow
73c7cfc10a0b58937198d60e308ba5248b446490
[ "OML" ]
null
null
null
''' Copyright (C) 2021 CG Cookie http://cgcookie.com hello@cgcookie.com Created by Jonathan Denning, Jonathan Williamson, and Patrick Moore This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation...
41.755501
128
0.549479
import math from mathutils import Vector from mathutils.geometry import intersect_point_tri_2d, intersect_point_tri_2d from ..rftool import RFTool from ...addon_common.common.bezier import CubicBezierSpline, CubicBezier from ...addon_common.common.debug import dprint from ...addon_common.common.drawing import Drawin...
true
true
1c28e920f88618a9674d2ff13cef322ba9f307f8
9,949
py
Python
sdk/python/pulumi_azure_nextgen/network/v20190701/get_inbound_nat_rule.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
31
2020-09-21T09:41:01.000Z
2021-02-26T13:21:59.000Z
sdk/python/pulumi_azure_nextgen/network/v20190701/get_inbound_nat_rule.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
231
2020-09-21T09:38:45.000Z
2021-03-01T11:16:03.000Z
sdk/python/pulumi_azure_nextgen/network/v20190701/get_inbound_nat_rule.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
4
2020-09-29T14:14:59.000Z
2021-02-10T20:38:16.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from...
43.445415
289
0.682883
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from . import outputs __all__ = [ 'GetInboundNatRuleResult', 'AwaitableGetInboundNatRuleResult', 'get_inbound_nat_rule', ] @pulumi.output_type class GetInb...
true
true
1c28eabf8a78b41e6a9d6a9092a0d6c638ec0182
8,684
py
Python
tests/test_check_config.py
tousix/faucet
63ec37f9007075afd154589464e99e463382f97b
[ "Apache-2.0" ]
null
null
null
tests/test_check_config.py
tousix/faucet
63ec37f9007075afd154589464e99e463382f97b
[ "Apache-2.0" ]
null
null
null
tests/test_check_config.py
tousix/faucet
63ec37f9007075afd154589464e99e463382f97b
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Copyright (C) 2015 Brad Cowie, Christopher Lorier and Joe Stringer. # Copyright (C) 2015 Research and Innovation Advanced Network New Zealand Ltd. # Copyright (C) 2015--2017 The Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except i...
25.391813
97
0.583372
import logging import os import shutil import tempfile import unittest import re from faucet import check_faucet_config class CheckConfigTestCase(unittest.TestCase): def setUp(self): self.tmpdir = tempfile.mkdtemp() def tearDown(self): shutil.rmtree(self.tmpdir) def r...
true
true
1c28ee2fc5f6f50b7369f2bf4b21b8351e37c5ee
3,639
py
Python
lib/geomet/util.py
davasqueza/eriskco_conector_CloudSQL
99304b5eed06e9bba3646535a82d7fc98b0838b7
[ "Apache-2.0" ]
null
null
null
lib/geomet/util.py
davasqueza/eriskco_conector_CloudSQL
99304b5eed06e9bba3646535a82d7fc98b0838b7
[ "Apache-2.0" ]
null
null
null
lib/geomet/util.py
davasqueza/eriskco_conector_CloudSQL
99304b5eed06e9bba3646535a82d7fc98b0838b7
[ "Apache-2.0" ]
null
null
null
# Copyright 2013 Lars Butler & individual 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 applicab...
32.491071
79
0.583402
import itertools import six def block_splitter(data, block_size): buf = [] for i, datum in enumerate(data): buf.append(datum) if len(buf) == block_size: yield buf buf = [] # yield it as well. if buf: yield buf def take(n, iterable): ...
true
true
1c28ee8c02c4f1aa38ae9f9684b8589cc9e3b1c4
2,111
py
Python
taggable/taggable_sequence.py
ville-k/taggable
d37ecdfba5bc09277f19ea51344ad2ea3ae100f2
[ "MIT" ]
null
null
null
taggable/taggable_sequence.py
ville-k/taggable
d37ecdfba5bc09277f19ea51344ad2ea3ae100f2
[ "MIT" ]
null
null
null
taggable/taggable_sequence.py
ville-k/taggable
d37ecdfba5bc09277f19ea51344ad2ea3ae100f2
[ "MIT" ]
null
null
null
class TaggedSegment(object): def __init__(self, start, end, name, tag): self.start_ = start self.end_ = end self.name_ = name self.tag_ = tag @property def start(self): """Starting offset of the segment""" return self.start_ @property def end(self): ...
25.433735
81
0.57603
class TaggedSegment(object): def __init__(self, start, end, name, tag): self.start_ = start self.end_ = end self.name_ = name self.tag_ = tag @property def start(self): return self.start_ @property def end(self): return self.end_ @property d...
true
true
1c28f1f90fb7d591507053a23011b216f8251c87
2,721
py
Python
scripts/BRC_microarray/USA/rank_clusters_without_GCN_and_local_modules.py
omarmaddouri/GCNCC_cross_validated
89576ad2c8459f065604656fd38a786d042f09e0
[ "MIT" ]
1
2022-03-12T13:34:34.000Z
2022-03-12T13:34:34.000Z
scripts/BRC_microarray/USA/rank_clusters_without_GCN_and_local_modules.py
omarmaddouri/GCNCC_cross_validated
89576ad2c8459f065604656fd38a786d042f09e0
[ "MIT" ]
3
2022-02-09T23:28:07.000Z
2022-02-11T19:08:53.000Z
scripts/BRC_microarray/USA/rank_clusters_without_GCN_and_local_modules.py
omarmaddouri/GCNCC_cross_validated
89576ad2c8459f065604656fd38a786d042f09e0
[ "MIT" ]
null
null
null
import sys from os.path import dirname, abspath sys.path.append(dirname(dirname(abspath(__file__)))) from BRC_microarray.USA.utils import * path="../../data/BRC_microarray/output/USA/" dataset="PPI" features = np.genfromtxt("{}{}.GE_Features.txt".format(path, dataset), dtype=np.dtype(np.float32)) labels = get_clinica...
42.515625
129
0.702683
import sys from os.path import dirname, abspath sys.path.append(dirname(dirname(abspath(__file__)))) from BRC_microarray.USA.utils import * path="../../data/BRC_microarray/output/USA/" dataset="PPI" features = np.genfromtxt("{}{}.GE_Features.txt".format(path, dataset), dtype=np.dtype(np.float32)) labels = get_clinica...
true
true
1c28f21017e2b15693be28d6fa6d86f690eacde0
9,107
py
Python
modoboa/core/api/v2/serializers.py
suryatmodulus/modoboa
f8164a9bbe1e5bfa7f1a1f8813a3790ebf3397ee
[ "ISC" ]
null
null
null
modoboa/core/api/v2/serializers.py
suryatmodulus/modoboa
f8164a9bbe1e5bfa7f1a1f8813a3790ebf3397ee
[ "ISC" ]
2
2022-03-02T10:35:51.000Z
2022-03-07T10:32:48.000Z
modoboa/core/api/v2/serializers.py
jammo-nl/modoboa
ccf926c1c5e079420f4bd6fe037f83782f842af5
[ "ISC" ]
null
null
null
"""Core API v2 serializers.""" from django.utils import formats from django.utils.translation import ugettext_lazy, ugettext as _ from django.contrib.auth import password_validation import django_otp from rest_framework import serializers from modoboa.lib import fields as lib_fields from ... import constants from ...
38.753191
80
0.681344
from django.utils import formats from django.utils.translation import ugettext_lazy, ugettext as _ from django.contrib.auth import password_validation import django_otp from rest_framework import serializers from modoboa.lib import fields as lib_fields from ... import constants from ... import models from ... impo...
true
true
1c28f23cd57f67e8bd5a73d261ce5f8aa234a8b4
7,891
py
Python
napari_plot/_qt/layer_controls/qt_region_controls.py
lukasz-migas/napari-1d
b0f081a8711ae941b3e4b5c58c3aea56bd0e3277
[ "BSD-3-Clause" ]
13
2021-08-27T23:01:09.000Z
2022-03-22T13:51:35.000Z
napari_plot/_qt/layer_controls/qt_region_controls.py
lukasz-migas/napari-1d
b0f081a8711ae941b3e4b5c58c3aea56bd0e3277
[ "BSD-3-Clause" ]
71
2021-08-28T13:29:17.000Z
2022-03-28T21:22:12.000Z
napari_plot/_qt/layer_controls/qt_region_controls.py
lukasz-migas/napari-1d
b0f081a8711ae941b3e4b5c58c3aea56bd0e3277
[ "BSD-3-Clause" ]
null
null
null
"""Scatter layer controls""" import typing as ty import numpy as np from napari._qt.utils import disable_with_opacity, qt_signals_blocked from napari._qt.widgets.qt_color_swatch import QColorSwatchEdit from qtpy.QtCore import Slot from qtpy.QtWidgets import QButtonGroup, QHBoxLayout from ...layers.region._region_cons...
38.871921
109
0.659105
import typing as ty import numpy as np from napari._qt.utils import disable_with_opacity, qt_signals_blocked from napari._qt.widgets.qt_color_swatch import QColorSwatchEdit from qtpy.QtCore import Slot from qtpy.QtWidgets import QButtonGroup, QHBoxLayout from ...layers.region._region_constants import Mode from .. imp...
true
true
1c28f2b7a5432dbab583604b0585d43515564b43
5,726
py
Python
selfdrive/controls/lib/longitudinal_planner.py
doudoune144/openpilot
25fbad410d51e48d9189d5b3ef8a05a6e75f037c
[ "MIT" ]
null
null
null
selfdrive/controls/lib/longitudinal_planner.py
doudoune144/openpilot
25fbad410d51e48d9189d5b3ef8a05a6e75f037c
[ "MIT" ]
null
null
null
selfdrive/controls/lib/longitudinal_planner.py
doudoune144/openpilot
25fbad410d51e48d9189d5b3ef8a05a6e75f037c
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import math import numpy as np from common.numpy_fast import interp import cereal.messaging as messaging from common.conversions import Conversions as CV from common.filter_simple import FirstOrderFilter from common.realtime import DT_MDL from selfdrive.modeld.constants import T_IDXS from selfdr...
39.763889
108
0.748865
import math import numpy as np from common.numpy_fast import interp import cereal.messaging as messaging from common.conversions import Conversions as CV from common.filter_simple import FirstOrderFilter from common.realtime import DT_MDL from selfdrive.modeld.constants import T_IDXS from selfdrive.controls.lib.longc...
true
true
1c28f2c1718bce4d19f1797cb71c8799354a58c9
984
py
Python
aiotdlib/api/functions/get_chat_available_message_senders.py
mostafa-arshadi/aiotdlib
59f430a65dfb424fc69d471a0d7bcd77ad7acf08
[ "MIT" ]
37
2021-05-04T10:41:41.000Z
2022-03-30T13:48:05.000Z
aiotdlib/api/functions/get_chat_available_message_senders.py
mostafa-arshadi/aiotdlib
59f430a65dfb424fc69d471a0d7bcd77ad7acf08
[ "MIT" ]
13
2021-07-17T19:54:51.000Z
2022-02-26T06:50:00.000Z
aiotdlib/api/functions/get_chat_available_message_senders.py
mostafa-arshadi/aiotdlib
59f430a65dfb424fc69d471a0d7bcd77ad7acf08
[ "MIT" ]
7
2021-09-22T21:27:11.000Z
2022-02-20T02:33:19.000Z
# =============================================================================== # # # # This file has been generated automatically!! Do not change this manually! # # ...
35.142857
92
0.473577
from __future__ import annotations from pydantic import Field from ..base_object import BaseObject class GetChatAvailableMessageSenders(BaseObject): ID: str = Field("getChatAvailableMessageSenders", alias="@type") chat_id: int @staticmethod def read(q: dict) -> GetChatAvailableMessageSenders: ...
true
true
1c28f3271abd22a7178ea74187915a2c5b4ee1d3
1,647
py
Python
lib/plot.py
Hser2bio/ViLight
e8c4179d13178fe61796e8f9ae264e697d599664
[ "MIT" ]
1
2021-06-08T20:06:34.000Z
2021-06-08T20:06:34.000Z
lib/plot.py
Hser2bio/ViLight
e8c4179d13178fe61796e8f9ae264e697d599664
[ "MIT" ]
6
2019-12-01T23:58:20.000Z
2020-07-24T17:30:10.000Z
lib/plot.py
Hser2bio/ViLight
e8c4179d13178fe61796e8f9ae264e697d599664
[ "MIT" ]
3
2020-01-09T08:17:25.000Z
2020-09-15T01:04:41.000Z
from PyQt5.QtGui import * from .i18n import _ import datetime from collections import defaultdict from .bitcoin import COIN import matplotlib matplotlib.use('Qt5Agg') import matplotlib.pyplot as plt import matplotlib.dates as md from matplotlib.patches import Ellipse from matplotlib.offsetbox import AnchoredOffsetbo...
31.075472
82
0.66606
from PyQt5.QtGui import * from .i18n import _ import datetime from collections import defaultdict from .bitcoin import COIN import matplotlib matplotlib.use('Qt5Agg') import matplotlib.pyplot as plt import matplotlib.dates as md from matplotlib.patches import Ellipse from matplotlib.offsetbox import AnchoredOffsetbo...
true
true
1c28f38d3a34816eab8dfd50f1ea367d5494f2ae
54
py
Python
armory/baseline_models/__init__.py
KyleBittner/armory
7e403d6aa9f8f60f34365de06cd990697a1c5b1c
[ "MIT" ]
93
2020-02-11T23:10:15.000Z
2022-03-29T23:28:24.000Z
armory/baseline_models/__init__.py
KyleBittner/armory
7e403d6aa9f8f60f34365de06cd990697a1c5b1c
[ "MIT" ]
834
2020-02-10T15:43:39.000Z
2022-03-31T17:57:41.000Z
armory/baseline_models/__init__.py
KyleBittner/armory
7e403d6aa9f8f60f34365de06cd990697a1c5b1c
[ "MIT" ]
57
2020-02-10T15:20:15.000Z
2022-03-18T04:32:21.000Z
""" Baseline models for use in the ARMORY system. """
13.5
45
0.685185
true
true
1c28f579c8a79bff36a33c83259ab8c21f7a25d8
672
py
Python
orm/__init__.py
theikkila/lopputili
25842e54a272f12ae6bdafeb98c676da396cddf2
[ "MIT" ]
null
null
null
orm/__init__.py
theikkila/lopputili
25842e54a272f12ae6bdafeb98c676da396cddf2
[ "MIT" ]
null
null
null
orm/__init__.py
theikkila/lopputili
25842e54a272f12ae6bdafeb98c676da396cddf2
[ "MIT" ]
null
null
null
import os from . import query from . import sql from sqlite3 import OperationalError from psycopg2 import ProgrammingError Database = sql.Database Query = query.Query class ORM: def __init__(self, dburi="sqlite://local.db"): self.models = [] self.nmodels = {} self.dburi = dburi self.db = Database(self.dbu...
19.764706
47
0.723214
import os from . import query from . import sql from sqlite3 import OperationalError from psycopg2 import ProgrammingError Database = sql.Database Query = query.Query class ORM: def __init__(self, dburi="sqlite://local.db"): self.models = [] self.nmodels = {} self.dburi = dburi self.db = Database(self.dbu...
true
true
1c28f606b3b20c8e8e1e291414b44c3095855346
561
py
Python
kwat/significance/get_p_value_and_q_value.py
KwatME/ccal
d96dfa811482eee067f346386a2181ec514625f4
[ "MIT" ]
5
2017-05-05T17:50:28.000Z
2019-01-30T19:23:02.000Z
kwat/significance/get_p_value_and_q_value.py
KwatME/ccal
d96dfa811482eee067f346386a2181ec514625f4
[ "MIT" ]
5
2017-05-05T01:52:31.000Z
2019-04-20T21:06:05.000Z
kwat/significance/get_p_value_and_q_value.py
KwatME/ccal
d96dfa811482eee067f346386a2181ec514625f4
[ "MIT" ]
5
2017-07-17T18:55:54.000Z
2019-02-02T04:46:19.000Z
from numpy import array, where from .get_p_value import get_p_value from .get_q_value import get_q_value def get_p_value_and_q_value(ve, ra_, di): if "<" in di: pl_ = array([get_p_value(nu, ra_, "<") for nu in ve]) ql_ = get_q_value(pl_) if ">" in di: pr_ = array([get_p_value(nu,...
17.53125
69
0.559715
from numpy import array, where from .get_p_value import get_p_value from .get_q_value import get_q_value def get_p_value_and_q_value(ve, ra_, di): if "<" in di: pl_ = array([get_p_value(nu, ra_, "<") for nu in ve]) ql_ = get_q_value(pl_) if ">" in di: pr_ = array([get_p_value(nu,...
true
true
1c28f6b12f7f6b5d94a6b3d3d64dd6f940a06ceb
614
py
Python
loesungen/chapter06/image_scaler.py
SaschaKersken/Daten-Prozessanalyse
370f07a75b9465329deb3671adbfbef8483f76f6
[ "Apache-2.0" ]
2
2021-09-20T06:16:41.000Z
2022-01-17T14:24:43.000Z
loesungen/chapter06/image_scaler.py
SaschaKersken/Daten-Prozessanalyse
370f07a75b9465329deb3671adbfbef8483f76f6
[ "Apache-2.0" ]
null
null
null
loesungen/chapter06/image_scaler.py
SaschaKersken/Daten-Prozessanalyse
370f07a75b9465329deb3671adbfbef8483f76f6
[ "Apache-2.0" ]
null
null
null
import matplotlib.pyplot as plt from skimage.io import imread, imshow from skimage.transform import resize from sys import argv, exit if len(argv) < 3: print(f"Verwendung: python3 {argv[0]} BILDDATEI PIXEL") exit() image = imread(argv[1], as_gray = True) height, width = image.shape if height > width: star...
27.909091
59
0.687296
import matplotlib.pyplot as plt from skimage.io import imread, imshow from skimage.transform import resize from sys import argv, exit if len(argv) < 3: print(f"Verwendung: python3 {argv[0]} BILDDATEI PIXEL") exit() image = imread(argv[1], as_gray = True) height, width = image.shape if height > width: star...
true
true
1c28f6b71ed7ee5ebae276d9dc9864a0698ab643
9,393
py
Python
sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_schema_registry_client.py
adriananeci/azure-sdk-for-python
b2bdfe659210998d6d479e73b133b6c51eb2c009
[ "MIT" ]
1
2021-09-16T02:33:52.000Z
2021-09-16T02:33:52.000Z
sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_schema_registry_client.py
adriananeci/azure-sdk-for-python
b2bdfe659210998d6d479e73b133b6c51eb2c009
[ "MIT" ]
null
null
null
sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_schema_registry_client.py
adriananeci/azure-sdk-for-python
b2bdfe659210998d6d479e73b133b6c51eb2c009
[ "MIT" ]
null
null
null
# -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. # # The MIT License (MIT) # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the ""Software""), ...
40.141026
111
0.650271
from typing import Any, TYPE_CHECKING, Union from ._common._constants import SerializationType from ._common._schema import Schema, SchemaProperties from ._common._response_handlers import ( _parse_response_schema, _parse_response_schema_properties, ) from ._generated._azure_schema_reg...
true
true
1c28f7120b6e6991f5d52c1a4d628b87c7601372
1,081
py
Python
frontends/pytorch/test/ivalue_import/list.py
raikonenfnu/mlir-npcomp
29e1b2fe89848d58c9bc07e7df7ce651850a5244
[ "Apache-2.0" ]
null
null
null
frontends/pytorch/test/ivalue_import/list.py
raikonenfnu/mlir-npcomp
29e1b2fe89848d58c9bc07e7df7ce651850a5244
[ "Apache-2.0" ]
null
null
null
frontends/pytorch/test/ivalue_import/list.py
raikonenfnu/mlir-npcomp
29e1b2fe89848d58c9bc07e7df7ce651850a5244
[ "Apache-2.0" ]
null
null
null
# -*- Python -*- # This file is licensed under a pytorch-style license # See frontends/pytorch/LICENSE for license information. import typing import torch import torch_mlir # RUN: %PYTHON %s | npcomp-opt | FileCheck %s mb = torch_mlir.ModuleBuilder() class TestModule(torch.nn.Module): def __init__(self): ...
31.794118
119
0.680851
import typing import torch import torch_mlir mb = torch_mlir.ModuleBuilder() class TestModule(torch.nn.Module): def __init__(self): super().__init__() self.l = [1, 2] test_module = TestModule() recursivescriptmodule = torch.jit.script(test_module) mb.import_module(recursivescrip...
true
true
1c28f72ac2d29f808b698a9ec04a65bc825beeb4
19,595
py
Python
vm_manager/vm_manager.py
dupremathieu/vm_manager
7301675e57e376617669d80e6994cf855e5054da
[ "Apache-2.0" ]
null
null
null
vm_manager/vm_manager.py
dupremathieu/vm_manager
7301675e57e376617669d80e6994cf855e5054da
[ "Apache-2.0" ]
null
null
null
vm_manager/vm_manager.py
dupremathieu/vm_manager
7301675e57e376617669d80e6994cf855e5054da
[ "Apache-2.0" ]
null
null
null
# Copyright (C) 2021, RTE (http://www.rte-france.com) # SPDX-License-Identifier: Apache-2.0 import os import logging import uuid import re import datetime from errno import ENOENT import xml.etree.ElementTree as ET from vm_manager.helpers.rbd_manager import RbdManager from vm_manager.helpers.pacemaker import Pacemake...
30.521807
78
0.604083
import os import logging import uuid import re import datetime from errno import ENOENT import xml.etree.ElementTree as ET from vm_manager.helpers.rbd_manager import RbdManager from vm_manager.helpers.pacemaker import Pacemaker from vm_manager.helpers.libvirt import LibVirtManager XML_PACEMAKER_PATH = "/etc/pacema...
true
true
1c28f77129fd6a7fe81e559198a0b7b7b48720e7
11,092
py
Python
tensorkit/distributions/categorical.py
lizeyan/tensorkit
2997a5914ec3c3ec72f91eb5906b5ee878fdc020
[ "MIT" ]
null
null
null
tensorkit/distributions/categorical.py
lizeyan/tensorkit
2997a5914ec3c3ec72f91eb5906b5ee878fdc020
[ "MIT" ]
null
null
null
tensorkit/distributions/categorical.py
lizeyan/tensorkit
2997a5914ec3c3ec72f91eb5906b5ee878fdc020
[ "MIT" ]
null
null
null
from typing import * from .. import tensor as T from ..stochastic import StochasticTensor from ..typing_ import * from .base import Distribution from .utils import copy_distribution, check_tensor_arg_types __all__ = ['BaseCategorical', 'Categorical', 'OneHotCategorical'] class BaseCategorical(Distribution): co...
37.6
84
0.577804
from typing import * from .. import tensor as T from ..stochastic import StochasticTensor from ..typing_ import * from .base import Distribution from .utils import copy_distribution, check_tensor_arg_types __all__ = ['BaseCategorical', 'Categorical', 'OneHotCategorical'] class BaseCategorical(Distribution): co...
true
true
1c28f88e50934dd0d15e6e82a50230d807d87ab6
28
py
Python
src/type_conflict.py
sverres/pana
ca78d319e6eef5aabd319bf5f7f6120d6e95ebe4
[ "MIT" ]
null
null
null
src/type_conflict.py
sverres/pana
ca78d319e6eef5aabd319bf5f7f6120d6e95ebe4
[ "MIT" ]
null
null
null
src/type_conflict.py
sverres/pana
ca78d319e6eef5aabd319bf5f7f6120d6e95ebe4
[ "MIT" ]
null
null
null
a = 1 b = 'B' print(a + b)
5.6
12
0.392857
a = 1 b = 'B' print(a + b)
true
true
1c28f8d8ab478d8a76cea7d142018e1718c54829
12,410
py
Python
docs/conf.py
LaudateCorpus1/python-analytics-admin
2ec0a0b648edcfb3b76bf847a4463cbb551e1997
[ "Apache-2.0" ]
10
2020-09-19T18:31:20.000Z
2022-03-07T22:45:53.000Z
docs/conf.py
LaudateCorpus1/python-analytics-admin
2ec0a0b648edcfb3b76bf847a4463cbb551e1997
[ "Apache-2.0" ]
63
2020-07-21T12:17:34.000Z
2022-03-07T17:30:51.000Z
docs/conf.py
LaudateCorpus1/python-analytics-admin
2ec0a0b648edcfb3b76bf847a4463cbb551e1997
[ "Apache-2.0" ]
6
2020-07-20T18:10:41.000Z
2022-03-24T20:23:44.000Z
# -*- coding: utf-8 -*- # Copyright 2021 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 agr...
32.486911
88
0.705157
import sys import os import shlex sys.path.insert(0, os.path.abspath("..")) sys.path.insert(0, os.path.abspath(".")) __version__ = "" needs_sphinx = "1.5.5" extensions = [ "sphinx.ext.autodoc", "sphinx.ext.autosummary", "sphinx.ext.intersphinx", "sphinx.ext.cove...
true
true
1c28f910bcc8fda0dacc431ef45914f6b87443d5
8,501
py
Python
heat/tests/test_dependencies.py
NeCTAR-RC/heat
b152817f192a7b46514793633ddc968c1fe1ebf8
[ "Apache-2.0" ]
1
2015-02-26T03:23:23.000Z
2015-02-26T03:23:23.000Z
heat/tests/test_dependencies.py
NeCTAR-RC/heat
b152817f192a7b46514793633ddc968c1fe1ebf8
[ "Apache-2.0" ]
null
null
null
heat/tests/test_dependencies.py
NeCTAR-RC/heat
b152817f192a7b46514793633ddc968c1fe1ebf8
[ "Apache-2.0" ]
null
null
null
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # ...
38.292793
79
0.493707
import testtools from heat.engine.dependencies import CircularDependencyException from heat.engine.dependencies import Dependencies class dependenciesTest(testtools.TestCase): def _dep_test(self, func, checkorder, deps): nodes = set.union(*[set(e) for e in deps]) d = Dependencies(...
true
true
1c28f9575d62cfd39da895618df13afe159a2850
1,973
py
Python
appscale/cloud_storage/config.py
AppScale/appscale-cloud-storage
2d19cf5555f8f38a66f8bb6b7ba2532a9f262ec4
[ "Apache-2.0" ]
6
2016-09-23T17:56:53.000Z
2022-02-02T08:33:08.000Z
appscale/cloud_storage/config.py
AppScale/appscale-cloud-storage
2d19cf5555f8f38a66f8bb6b7ba2532a9f262ec4
[ "Apache-2.0" ]
2
2019-08-16T15:43:38.000Z
2019-09-23T16:38:25.000Z
appscale/cloud_storage/config.py
AppScale/appscale-cloud-storage
2d19cf5555f8f38a66f8bb6b7ba2532a9f262ec4
[ "Apache-2.0" ]
6
2016-09-23T17:56:58.000Z
2021-06-08T09:44:12.000Z
import string # The number of characters in an access token. ACCESS_TOKEN_LENGTH = 77 # A reserved Riak KV bucket used for storing bucket metadata. METADATA_BUCKET = 'appscale-cloud-storage-bucket-metadata' # A reserved Riak KV bucket used for storing authentication tokens. TOKEN_BUCKET = 'appscale-cloud-storage-aut...
34.017241
78
0.776989
import string ACCESS_TOKEN_LENGTH = 77 METADATA_BUCKET = 'appscale-cloud-storage-bucket-metadata' TOKEN_BUCKET = 'appscale-cloud-storage-auth-tokens' UPLOAD_SESSION_BUCKET = 'appscale-cloud-storage-upload-ids' OBJECT_METADATA_BUCKET = 'appscale-cloud-storage-object-metadata' RIAK_KV_HOST = 'localhost' RIA...
true
true
1c28f9d2b182e60b509032c0af4c9618f66d15c5
3,262
py
Python
code/mean_var_bt.py
Rockysed/PSC_classification
1815b673ac9374d9d2abd08ba0f1f43597316dee
[ "MIT" ]
null
null
null
code/mean_var_bt.py
Rockysed/PSC_classification
1815b673ac9374d9d2abd08ba0f1f43597316dee
[ "MIT" ]
null
null
null
code/mean_var_bt.py
Rockysed/PSC_classification
1815b673ac9374d9d2abd08ba0f1f43597316dee
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Mon Feb 25 14:52:43 2019 @author: rocco """ import pandas as pd import h5py import numpy as np import os import matplotlib.pyplot as plt #load cdsdb new_file = h5py.File("../data/csdb_bt/csdb_bt.h5", "r") bt_csdb = new_file["bt"][:] new_file.close() #compute mean a...
31.365385
71
0.69252
import pandas as pd import h5py import numpy as np import os import matplotlib.pyplot as plt new_file = h5py.File("../data/csdb_bt/csdb_bt.h5", "r") bt_csdb = new_file["bt"][:] new_file.close() df_bt_csdb = pd.DataFrame(bt_csdb) mean_bt_csdb = df_bt_csdb.mean() var_bt_csdb = df_bt_csdb.var() directory =...
true
true
1c28f9dd3e0b345ab6529d91432a9f227c3fdb58
182
py
Python
sfswitch/__init__.py
dcs-dev/sfswitch
b45c6e34d23cb735327d591363e5f321e2f023da
[ "Unlicense" ]
null
null
null
sfswitch/__init__.py
dcs-dev/sfswitch
b45c6e34d23cb735327d591363e5f321e2f023da
[ "Unlicense" ]
null
null
null
sfswitch/__init__.py
dcs-dev/sfswitch
b45c6e34d23cb735327d591363e5f321e2f023da
[ "Unlicense" ]
null
null
null
# This will make sure the app is always imported when # Django starts so that shared_task will use this app. from celeryapp.celery import app as celery_app __all__ = ('celery_app',)
36.4
54
0.78022
from celeryapp.celery import app as celery_app __all__ = ('celery_app',)
true
true
1c28f9f41b08022e6fe5a03c3fc4cc7ffc287aac
2,388
py
Python
asyncspinner/__init__.py
Hegdahl/asyncspinner
d844494d6d38fdc8be5ed5da2bb007fdf47aa900
[ "MIT" ]
null
null
null
asyncspinner/__init__.py
Hegdahl/asyncspinner
d844494d6d38fdc8be5ed5da2bb007fdf47aa900
[ "MIT" ]
null
null
null
asyncspinner/__init__.py
Hegdahl/asyncspinner
d844494d6d38fdc8be5ed5da2bb007fdf47aa900
[ "MIT" ]
null
null
null
''' Little graphic to show user that something is waited for when a progress bar is overkill, or the progress is unknown. ''' import sys import asyncio import colorama import cursor colorama.init() from . import styles _DOTS = (' ', '. ', '.. ', '...') def _on_line_below(s): return f'\n{colorama.ansi.clear_li...
29.85
101
0.587521
import sys import asyncio import colorama import cursor colorama.init() from . import styles _DOTS = (' ', '. ', '.. ', '...') def _on_line_below(s): return f'\n{colorama.ansi.clear_line()}{s}{colorama.Cursor.UP(1)}\r\033[K' class Spinner: def __init__(self, message='', *, style=styles....
true
true
1c28fa966a0112b973099a4ea56afde9dceedc96
734
py
Python
teacher2.py
PRASAD-DANGARE/PYTHON
36214f7dc3762d327e5a29e40752edeb098249c8
[ "MIT" ]
1
2021-06-07T07:55:28.000Z
2021-06-07T07:55:28.000Z
teacher2.py
PRASAD-DANGARE/PYTHON
36214f7dc3762d327e5a29e40752edeb098249c8
[ "MIT" ]
null
null
null
teacher2.py
PRASAD-DANGARE/PYTHON
36214f7dc3762d327e5a29e40752edeb098249c8
[ "MIT" ]
null
null
null
# Python Program To Use The Teacher Class ''' Function Name : Using Teacher Class teacher.py In This Program teacher2.py Function Date : 18 Sep 2020 Function Author : Prasad Dangare Input : String Output : String ''' # Save This Code As teacher2.py # Using Teacher Class ...
21.588235
81
0.644414
from teacher import Teacher t = Teacher() t.setid(10) t.setname('Prasad') t.setaddress('Sanjuda Complex, 412308, Papadewasti, Pune ') t.setsalary(25000.50) print('\n Id = ', t.getid()) print('Name = ', t.getname()) print('Address = ', t.getaddress()) print('Salary = ', t.getsalary()) ...
true
true
1c28fb8376fed9b3f3efc0bf3824fa3864f6b27f
9,748
py
Python
listener.py
austinmroczek/pauser
4e81808be98d3495ad93c3270a8a43584b62b8cd
[ "MIT" ]
1
2019-06-30T08:33:34.000Z
2019-06-30T08:33:34.000Z
listener.py
austinmroczek/pauser
4e81808be98d3495ad93c3270a8a43584b62b8cd
[ "MIT" ]
null
null
null
listener.py
austinmroczek/pauser
4e81808be98d3495ad93c3270a8a43584b62b8cd
[ "MIT" ]
null
null
null
#import unicodedata class Listener: def __init__(self): import log self.myLog = log.Log('listener.log') # files and paths self.fileName = 'rectest.wav' # default file name import os if not os.path.isfile(self.fileName): file = open(self.fileName,'w') ...
36.784906
181
0.580529
class Listener: def __init__(self): import log self.myLog = log.Log('listener.log') self.fileName = 'rectest.wav' import os if not os.path.isfile(self.fileName): file = open(self.fileName,'w') file.write("") file.close() ...
true
true
1c28fc5e414bdd051ab3641712066443f6c9001c
518
py
Python
woodstock/content/event/models.py
allink/woodstock
afafecb7c4454f96e51c051044ed8ed74853c048
[ "BSD-3-Clause" ]
null
null
null
woodstock/content/event/models.py
allink/woodstock
afafecb7c4454f96e51c051044ed8ed74853c048
[ "BSD-3-Clause" ]
null
null
null
woodstock/content/event/models.py
allink/woodstock
afafecb7c4454f96e51c051044ed8ed74853c048
[ "BSD-3-Clause" ]
null
null
null
from django.db import models from django.template.loader import render_to_string from woodstock.models import Event class NextEventsContent(models.Model): count = models.IntegerField(default=5) class Meta: abstract = True verbose_name = 'Next Events Content' verbose_name_plural = 'Ne...
28.777778
89
0.714286
from django.db import models from django.template.loader import render_to_string from woodstock.models import Event class NextEventsContent(models.Model): count = models.IntegerField(default=5) class Meta: abstract = True verbose_name = 'Next Events Content' verbose_name_plural = 'Ne...
true
true
1c28fd93f5ad7ee5c0adc0decb7bd4d610de54d7
15,866
py
Python
checker.py
jingliu9/uu-checker
62ce0dc88b5e6ace72287ace3f64f80027f7fef1
[ "MIT" ]
null
null
null
checker.py
jingliu9/uu-checker
62ce0dc88b5e6ace72287ace3f64f80027f7fef1
[ "MIT" ]
null
null
null
checker.py
jingliu9/uu-checker
62ce0dc88b5e6ace72287ace3f64f80027f7fef1
[ "MIT" ]
1
2021-11-20T23:30:23.000Z
2021-11-20T23:30:23.000Z
#! /usr/bin/env python3 import logging import os import argparse import sys import subprocess import re import random import json from pathlib import Path import gscholar import time import bibtex_dblp.dblp_api as dblp_api import colorama colorama.init(autoreset=True) YELLOW = "\x1b[1;33;40m" class TexSourecFile(...
39.078818
110
0.511975
import logging import os import argparse import sys import subprocess import re import random import json from pathlib import Path import gscholar import time import bibtex_dblp.dblp_api as dblp_api import colorama colorama.init(autoreset=True) YELLOW = "\x1b[1;33;40m" class TexSourecFile(object): def __ini...
true
true
1c28fda9bf26d20d2dda4d5cbe9f293271e72b9d
8,000
py
Python
risk_managed/migrations/0001_initial.py
jteppinette/risk-managed
e559575e6104baade42b31cbbfcbe5d4ce64bceb
[ "BSD-2-Clause" ]
2
2019-02-13T07:50:23.000Z
2022-02-08T08:32:26.000Z
risk_managed/migrations/0001_initial.py
jteppinette/risk-managed
e559575e6104baade42b31cbbfcbe5d4ce64bceb
[ "BSD-2-Clause" ]
9
2020-02-11T23:39:02.000Z
2021-06-10T17:43:24.000Z
risk_managed/migrations/0001_initial.py
jteppinette/risk-managed
e559575e6104baade42b31cbbfcbe5d4ce64bceb
[ "BSD-2-Clause" ]
null
null
null
# Generated by Django 2.2.4 on 2019-08-15 00:27 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] ope...
64.516129
580
0.589875
from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( ...
true
true
1c28fdaacd58f64d415f69df0dee93838147489f
1,639
py
Python
tests/experiments/test_targeted_perf.py
suifengzhuliu/impala
611f4c6f3b18cfcddff3b2956cbb87c295a87655
[ "Apache-2.0" ]
1,523
2015-01-01T03:42:24.000Z
2022-02-06T22:24:04.000Z
tests/experiments/test_targeted_perf.py
suifengzhuliu/impala
611f4c6f3b18cfcddff3b2956cbb87c295a87655
[ "Apache-2.0" ]
10
2015-01-09T06:46:05.000Z
2022-03-29T21:57:57.000Z
tests/experiments/test_targeted_perf.py
suifengzhuliu/impala
611f4c6f3b18cfcddff3b2956cbb87c295a87655
[ "Apache-2.0" ]
647
2015-01-02T04:01:40.000Z
2022-03-30T15:57:35.000Z
# 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 u...
37.25
72
0.765101
from tests.common.impala_test_suite import ImpalaTestSuite class TestTargetedPerf(ImpalaTestSuite): @classmethod def get_workload(cls): return 'targeted-perf' @classmethod def add_test_dimensions(cls): super(TestTargetedPerf, cls).add_test_dimensions() cls.ImpalaTestMatrix.ad...
true
true
1c28fdd360633b1e25956178a65d622003ee2382
2,166
py
Python
calls/create_call_feedback_post_dial_delay.py
mickstevens/python3-twilio-sdkv6-examples
aac0403533b35fec4e8483de18d8fde2d783cfb2
[ "MIT" ]
1
2018-11-23T20:11:27.000Z
2018-11-23T20:11:27.000Z
calls/create_call_feedback_post_dial_delay.py
mickstevens/python3-twilio-sdkv6-examples
aac0403533b35fec4e8483de18d8fde2d783cfb2
[ "MIT" ]
null
null
null
calls/create_call_feedback_post_dial_delay.py
mickstevens/python3-twilio-sdkv6-examples
aac0403533b35fec4e8483de18d8fde2d783cfb2
[ "MIT" ]
null
null
null
# *** Create Call Feedback for Post Dial Delay *** # Code based on https://www.twilio.com/docs/voice/api/call-quality-feedback # Download Python 3 from https://www.python.org/downloads/ # Download the Twilio helper library from https://www.twilio.com/docs/python/install import os from twilio.rest import Client # from d...
45.125
109
0.702216
import os from twilio.rest import Client import logging logging.basicConfig(level=logging.DEBUG, format='%(asctime)s %(levelname)s %(message)s', filename='/usr/local/twilio/python3/sdkv6x/calls/logs/call_feedback.log', filemode='a') account_sid = os.en...
true
true
1c28fdf66d484992013b24d958cd3a9a32e5086d
10,276
py
Python
code/examples/scripts/21_ML_glacier_wise_weekly_jjas.py
hydrogo/FIT_ML
4c3f4abd707baf9eb83e061f84d183630264c96b
[ "MIT" ]
null
null
null
code/examples/scripts/21_ML_glacier_wise_weekly_jjas.py
hydrogo/FIT_ML
4c3f4abd707baf9eb83e061f84d183630264c96b
[ "MIT" ]
null
null
null
code/examples/scripts/21_ML_glacier_wise_weekly_jjas.py
hydrogo/FIT_ML
4c3f4abd707baf9eb83e061f84d183630264c96b
[ "MIT" ]
1
2020-09-01T14:52:42.000Z
2020-09-01T14:52:42.000Z
import numpy as np import pandas as pd from sklearn.ensemble import RandomForestRegressor from sklearn.model_selection import LeaveOneOut from sklearn.metrics import r2_score import pickle glacier_ids = np.load("../results/misc/glacier_ids_valid.npy") tsl_path = "../results/tsl_csv/" meteo_path = "../data/FIT_for...
31.618462
126
0.595854
import numpy as np import pandas as pd from sklearn.ensemble import RandomForestRegressor from sklearn.model_selection import LeaveOneOut from sklearn.metrics import r2_score import pickle glacier_ids = np.load("../results/misc/glacier_ids_valid.npy") tsl_path = "../results/tsl_csv/" meteo_path = "../data/FIT_for...
true
true
1c28ff6a7eb1ffc8e336db7b17181bc68ca6378f
742
py
Python
python3/tests/test_valid_number.py
qianbinbin/leetcode
915cecab0c940cd13847683ec55b17b77eb0f39b
[ "MIT" ]
4
2018-03-05T02:27:16.000Z
2021-03-15T14:19:44.000Z
python3/tests/test_valid_number.py
qianbinbin/leetcode
915cecab0c940cd13847683ec55b17b77eb0f39b
[ "MIT" ]
null
null
null
python3/tests/test_valid_number.py
qianbinbin/leetcode
915cecab0c940cd13847683ec55b17b77eb0f39b
[ "MIT" ]
2
2018-07-22T10:32:10.000Z
2018-10-20T03:14:28.000Z
from unittest import TestCase from leetcodepy.valid_number import * solution1 = Solution1() solution2 = Solution2() s1 = "0" s2 = " 0.1 " s3 = "abc" s4 = "1 a" s5 = "2e10" class TestValidNumber(TestCase): def test1(self): self.assertTrue(solution1.isNumber(s1)) self.assertTrue(solution1.is...
21.823529
48
0.67655
from unittest import TestCase from leetcodepy.valid_number import * solution1 = Solution1() solution2 = Solution2() s1 = "0" s2 = " 0.1 " s3 = "abc" s4 = "1 a" s5 = "2e10" class TestValidNumber(TestCase): def test1(self): self.assertTrue(solution1.isNumber(s1)) self.assertTrue(solution1.is...
true
true
1c28ff6f07fec8d29705c20fde8e9ec0f90428ac
560
py
Python
env/Lib/site-packages/plotly/validators/scattersmith/marker/colorbar/_showticksuffix.py
andresgreen-byte/Laboratorio-1--Inversion-de-Capital
8a4707301d19c3826c31026c4077930bcd6a8182
[ "MIT" ]
7
2022-01-16T12:28:16.000Z
2022-03-04T15:31:45.000Z
packages/python/plotly/plotly/validators/scattersmith/marker/colorbar/_showticksuffix.py
jiangrongbo/plotly.py
df19fc702b309586cc24e25373b87e8bdbb3ff60
[ "MIT" ]
14
2021-10-20T23:33:47.000Z
2021-12-21T04:50:37.000Z
packages/python/plotly/plotly/validators/scattersmith/marker/colorbar/_showticksuffix.py
jiangrongbo/plotly.py
df19fc702b309586cc24e25373b87e8bdbb3ff60
[ "MIT" ]
1
2021-11-29T22:55:05.000Z
2021-11-29T22:55:05.000Z
import _plotly_utils.basevalidators class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="scattersmith.marker.colorbar", **kwargs ): super(ShowticksuffixValidator, self).__init__( ...
31.111111
80
0.630357
import _plotly_utils.basevalidators class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="scattersmith.marker.colorbar", **kwargs ): super(ShowticksuffixValidator, self).__init__( ...
true
true
1c28ff824b16eb2c0e61e750c7d3c8e305b1d8a4
1,646
py
Python
setup.py
Datsmir/eris-calibration
3af4691b948fb076e2bb49bd1e367bd6315beae6
[ "Apache-2.0" ]
2
2020-09-22T16:41:42.000Z
2020-09-23T03:40:31.000Z
setup.py
Datsmir/eris-calibration
3af4691b948fb076e2bb49bd1e367bd6315beae6
[ "Apache-2.0" ]
null
null
null
setup.py
Datsmir/eris-calibration
3af4691b948fb076e2bb49bd1e367bd6315beae6
[ "Apache-2.0" ]
2
2021-02-04T11:38:18.000Z
2022-01-26T01:50:40.000Z
# Copyright 2020 Norwegian University of Science and Technology. # # 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 appl...
34.291667
81
0.6452
from skbuild import setup def main(): setup( name="eris", version="0.0.0", description="Hand-eye calibration", long_description=open("README.md").read(), long_description_content_type="text/markdown", url="", author="Lars Tingelstad", a...
true
true
1c28ff97ef23b70c936e39e11d13e5a91dac63c7
325
py
Python
EDGAR/Exercicios_Python2/exer5.py
ygorferreira4g/AulasPython
e582caea4468bf2bc5cabbf8bc7e4b9894d10c81
[ "MIT" ]
1
2020-08-23T19:41:38.000Z
2020-08-23T19:41:38.000Z
EDGAR/Exercicios_Python2/exer5.py
ygorferreira4g/AulasPython
e582caea4468bf2bc5cabbf8bc7e4b9894d10c81
[ "MIT" ]
2
2020-08-24T21:28:10.000Z
2020-08-28T01:43:33.000Z
EDGAR/Exercicios_Python2/exer5.py
ygorferreira4g/AulasPython
e582caea4468bf2bc5cabbf8bc7e4b9894d10c81
[ "MIT" ]
2
2020-08-24T21:17:00.000Z
2020-08-28T01:33:25.000Z
sl1 = float(250) sl2 = float(130) sl3 = float(540) tsl = (sl1 + sl2 + sl3) print ("total", tsl) msl = round( tsl/3,2) print("media", msl) psl1 = sl1*100/tsl print("Porcentagem 1: % {:.2f}".format(psl1)) psl2 = sl2*100/tsl print("Porcentagem 2: %.2f" % (psl2)) psl3 = sl3*100/tsl print("Porcentagem 3: %.2f" % (psl...
16.25
45
0.609231
sl1 = float(250) sl2 = float(130) sl3 = float(540) tsl = (sl1 + sl2 + sl3) print ("total", tsl) msl = round( tsl/3,2) print("media", msl) psl1 = sl1*100/tsl print("Porcentagem 1: % {:.2f}".format(psl1)) psl2 = sl2*100/tsl print("Porcentagem 2: %.2f" % (psl2)) psl3 = sl3*100/tsl print("Porcentagem 3: %.2f" % (psl...
true
true
1c2900cd84bf7cc5b098603e45ab6c07f061369b
159
py
Python
SEPT_22_2020/lat3_program_angka_depan_kali_angka_tengah_tambah_belakang.py
refeed/PAlgoritmaTRPLA
e0c79c1d57bee0869e2344651718e8cf053c035f
[ "MIT" ]
null
null
null
SEPT_22_2020/lat3_program_angka_depan_kali_angka_tengah_tambah_belakang.py
refeed/PAlgoritmaTRPLA
e0c79c1d57bee0869e2344651718e8cf053c035f
[ "MIT" ]
null
null
null
SEPT_22_2020/lat3_program_angka_depan_kali_angka_tengah_tambah_belakang.py
refeed/PAlgoritmaTRPLA
e0c79c1d57bee0869e2344651718e8cf053c035f
[ "MIT" ]
null
null
null
nomor = int(input('Masukan angka: ')) ratusan = nomor // 100 puluhan = nomor // 10 % 10 satuan = nomor % 10 hasil = ratusan * puluhan + satuan print(hasil)
15.9
37
0.654088
nomor = int(input('Masukan angka: ')) ratusan = nomor // 100 puluhan = nomor // 10 % 10 satuan = nomor % 10 hasil = ratusan * puluhan + satuan print(hasil)
true
true
1c290187ec258896df4b1e9729197603c3a9d6b8
17,923
py
Python
src/pudl/output/eia860.py
rousik/pudl
7dbaac8af6d3d760a7c918cd9a8488d076d2a150
[ "MIT" ]
3
2019-06-13T05:21:07.000Z
2020-11-15T20:02:13.000Z
src/pudl/output/eia860.py
kyleries/pudl
52db209ff83d1b2c8ef0f93d599a844f12a715ef
[ "MIT" ]
null
null
null
src/pudl/output/eia860.py
kyleries/pudl
52db209ff83d1b2c8ef0f93d599a844f12a715ef
[ "MIT" ]
null
null
null
"""Functions for pulling data primarily from the EIA's Form 860.""" # import datetime import pandas as pd import sqlalchemy as sa import pudl def utilities_eia860(pudl_engine, start_date=None, end_date=None): """Pull all fields from the EIA860 Utilities table. Args: pudl_engine (sqlalchemy.engine....
37.339583
79
0.648385
import pandas as pd import sqlalchemy as sa import pudl def utilities_eia860(pudl_engine, start_date=None, end_date=None): pt = pudl.output.pudltabl.get_table_meta(pudl_engine) utils_eia_tbl = pt['utilities_entity_eia'] utils_eia_select = sa.sql.select([utils_eia_tbl]) utils_eia_df = pd.read_...
true
true
1c29028cb4d3efb128efcf23acca7729705619b0
18,275
py
Python
AppServer/google/appengine/api/logservice/logservice_stub.py
isabella232/scale-safe
8b887726768106b6b67d7be6ea257bee5cd83f9a
[ "Apache-2.0" ]
null
null
null
AppServer/google/appengine/api/logservice/logservice_stub.py
isabella232/scale-safe
8b887726768106b6b67d7be6ea257bee5cd83f9a
[ "Apache-2.0" ]
1
2021-06-08T10:04:35.000Z
2021-06-08T10:04:35.000Z
AppServer/google/appengine/api/logservice/logservice_stub.py
isabella232/scale-safe
8b887726768106b6b67d7be6ea257bee5cd83f9a
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
32.692308
80
0.699371
import os import time from google.appengine.api import apiproxy_stub from google.appengine.api import datastore_errors from google.appengine.api import logservice from google.appengine.api import namespace_manager from google.appengine.api.logservice import log_service_pb from google.appengine....
true
true
1c29038ffba4ce826a2cfe31c6d1bf249f2e8222
524
py
Python
paggcerto/utils/make_enum_json_serializable.py
tassio/paggcerto-python
48c81d518a46bd06162c878179abcdfb6bdefc8b
[ "Apache-2.0" ]
null
null
null
paggcerto/utils/make_enum_json_serializable.py
tassio/paggcerto-python
48c81d518a46bd06162c878179abcdfb6bdefc8b
[ "Apache-2.0" ]
null
null
null
paggcerto/utils/make_enum_json_serializable.py
tassio/paggcerto-python
48c81d518a46bd06162c878179abcdfb6bdefc8b
[ "Apache-2.0" ]
null
null
null
""" Module that monkey-patches the json module when it's imported so JSONEncoder.default() automatically checks to see if the object being encoded is an Enum type and, if so, returns its name. """ from enum import Enum from json import JSONEncoder _saved_default = JSONEncoder().default # Save default method. def _ne...
32.75
77
0.742366
from enum import Enum from json import JSONEncoder _saved_default = JSONEncoder().default def _new_default(self, obj): if isinstance(obj, Enum): return obj.name else: return _saved_default JSONEncoder.default = _new_default
true
true
1c2903b866e8e6c406cb6bc06c8bd466f4b39373
2,534
py
Python
tests-ext/test_mysql.py
cpflat/amulog
b7a8c7478d2e5253158f0bce3a7f7109d23e40cb
[ "BSD-3-Clause" ]
5
2019-07-03T09:57:30.000Z
2021-02-13T13:15:47.000Z
tests-ext/test_mysql.py
cpflat/amulog
b7a8c7478d2e5253158f0bce3a7f7109d23e40cb
[ "BSD-3-Clause" ]
null
null
null
tests-ext/test_mysql.py
cpflat/amulog
b7a8c7478d2e5253158f0bce3a7f7109d23e40cb
[ "BSD-3-Clause" ]
1
2021-09-09T02:21:42.000Z
2021-09-09T02:21:42.000Z
#!/usr/bin/env python # coding: utf-8 import os import unittest import tempfile from amulog import config from amulog import log_db from amulog import manager from amulog import testutil class TestMysql(unittest.TestCase): _path_testlog = None _path_testdb = None _path_ltgendump = None @classmeth...
32.075949
72
0.619179
import os import unittest import tempfile from amulog import config from amulog import log_db from amulog import manager from amulog import testutil class TestMysql(unittest.TestCase): _path_testlog = None _path_testdb = None _path_ltgendump = None @classmethod def setUpClass(cls): ...
true
true
1c2905974779e87d3055a734d22e8a0e09552e71
1,735
py
Python
rrcforest/lagfeatures.py
josteinbf/rrcforest
239eb99f938409a004967624d7253d78f239102e
[ "MIT" ]
null
null
null
rrcforest/lagfeatures.py
josteinbf/rrcforest
239eb99f938409a004967624d7253d78f239102e
[ "MIT" ]
null
null
null
rrcforest/lagfeatures.py
josteinbf/rrcforest
239eb99f938409a004967624d7253d78f239102e
[ "MIT" ]
null
null
null
from typing import ( Sequence, Mapping, Deque, Iterable, Generator, Optional, TypeVar, Generic) import itertools from collections import deque T = TypeVar('T') class LagFeatures(Generic[T]): _buffer: Deque[Mapping[str, Optional[T]]] _columns: Sequence[str] def __init__(self, n_lags: int, columns: S...
28.442623
79
0.604611
from typing import ( Sequence, Mapping, Deque, Iterable, Generator, Optional, TypeVar, Generic) import itertools from collections import deque T = TypeVar('T') class LagFeatures(Generic[T]): _buffer: Deque[Mapping[str, Optional[T]]] _columns: Sequence[str] def __init__(self, n_lags: int, columns: S...
true
true
1c29063b790236837dee7c0be449084e1e19fcfd
331
py
Python
time.py
chirag043043/python-program
b5b568654632ab05596311af83a974add6a9d9a4
[ "bzip2-1.0.6" ]
null
null
null
time.py
chirag043043/python-program
b5b568654632ab05596311af83a974add6a9d9a4
[ "bzip2-1.0.6" ]
null
null
null
time.py
chirag043043/python-program
b5b568654632ab05596311af83a974add6a9d9a4
[ "bzip2-1.0.6" ]
null
null
null
import time import datetime ticks=time.time() print("no of ticks since 1 jan 1970",ticks) print(time.localtime()) localtime = time.localtime(time.time()) print ("Local current time :", localtime) localtime = time.asctime( time.localtime(time.time()) ) print ("Local current time :", localtime) d=datetime.date(2019,8,20)...
25.461538
55
0.73716
import time import datetime ticks=time.time() print("no of ticks since 1 jan 1970",ticks) print(time.localtime()) localtime = time.localtime(time.time()) print ("Local current time :", localtime) localtime = time.asctime( time.localtime(time.time()) ) print ("Local current time :", localtime) d=datetime.date(2019,8,20)...
true
true
1c2906e7a39f2dcd74ddea6230f2a05e1e2c9d81
153,147
py
Python
tests/queries/tests.py
benjaoming/django
6dbe979b4d9396e1b307c7d27388c97c13beb21c
[ "BSD-3-Clause" ]
1
2016-07-30T11:06:37.000Z
2016-07-30T11:06:37.000Z
tests/queries/tests.py
benjaoming/django
6dbe979b4d9396e1b307c7d27388c97c13beb21c
[ "BSD-3-Clause" ]
null
null
null
tests/queries/tests.py
benjaoming/django
6dbe979b4d9396e1b307c7d27388c97c13beb21c
[ "BSD-3-Clause" ]
null
null
null
from __future__ import unicode_literals from collections import OrderedDict import datetime from operator import attrgetter import pickle import unittest import warnings from django.core.exceptions import FieldError from django.db import connection, DEFAULT_DB_ALIAS from django.db.models import Count, F, Q from djang...
41.889223
159
0.616695
from __future__ import unicode_literals from collections import OrderedDict import datetime from operator import attrgetter import pickle import unittest import warnings from django.core.exceptions import FieldError from django.db import connection, DEFAULT_DB_ALIAS from django.db.models import Count, F, Q from djang...
true
true
1c29078746a98d58cbdbc10dabc2e3518bddfb1b
5,375
py
Python
pages/models.py
andywar65/projetc_repo
a318b36d601a15a1d5e4a9bbc65d7bcbb5ac02ef
[ "BSD-2-Clause" ]
null
null
null
pages/models.py
andywar65/projetc_repo
a318b36d601a15a1d5e4a9bbc65d7bcbb5ac02ef
[ "BSD-2-Clause" ]
2
2021-03-19T17:12:07.000Z
2021-03-19T17:12:08.000Z
pages/models.py
andywar65/projetc_repo
a318b36d601a15a1d5e4a9bbc65d7bcbb5ac02ef
[ "BSD-2-Clause" ]
null
null
null
import uuid import json from django.utils.timezone import now from django.utils.html import strip_tags from django.db import models from django.utils.translation import gettext as _ from django.urls import reverse from filebrowser.fields import FileBrowseField from treebeard.mp_tree import MP_Node from project.utils...
37.587413
81
0.628465
import uuid import json from django.utils.timezone import now from django.utils.html import strip_tags from django.db import models from django.utils.translation import gettext as _ from django.urls import reverse from filebrowser.fields import FileBrowseField from treebeard.mp_tree import MP_Node from project.utils...
true
true
1c29079a2d95418451c76718bdf0f2f8c5d5216f
65,605
py
Python
mne/minimum_norm/inverse.py
tangyisheng2/mne-python
740fcb89b9910ef2fa84cffe402a06b4da643374
[ "BSD-3-Clause" ]
3
2021-01-04T08:45:56.000Z
2021-05-19T12:25:59.000Z
mne/minimum_norm/inverse.py
tangyisheng2/mne-python
740fcb89b9910ef2fa84cffe402a06b4da643374
[ "BSD-3-Clause" ]
null
null
null
mne/minimum_norm/inverse.py
tangyisheng2/mne-python
740fcb89b9910ef2fa84cffe402a06b4da643374
[ "BSD-3-Clause" ]
2
2021-04-28T11:52:52.000Z
2021-05-05T02:36:32.000Z
# -*- coding: utf-8 -*- # Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Matti Hämäläinen <msh@nmr.mgh.harvard.edu> # Teon Brooks <teon.brooks@gmail.com> # # License: BSD (3-clause) from copy import deepcopy from math import sqrt import numpy as np from scipy import linalg from ._eloret...
37.639128
100
0.592546
from copy import deepcopy from math import sqrt import numpy as np from scipy import linalg from ._eloreta import _compute_eloreta from ..fixes import _safe_svd from ..io.base import BaseRaw from ..io.constants import FIFF from ..io.open import fiff_open from ..io.tag import find_tag from ..io.matrix import (_r...
true
true
1c290935ff2e8ea9401ec071e84684a33ae5355d
20,185
py
Python
tagging/models.py
gdub/django-tagging
aca1d92a5f5474a4b893ae7d200a20cef060fdc5
[ "BSD-3-Clause" ]
null
null
null
tagging/models.py
gdub/django-tagging
aca1d92a5f5474a4b893ae7d200a20cef060fdc5
[ "BSD-3-Clause" ]
null
null
null
tagging/models.py
gdub/django-tagging
aca1d92a5f5474a4b893ae7d200a20cef060fdc5
[ "BSD-3-Clause" ]
1
2015-07-28T09:28:58.000Z
2015-07-28T09:28:58.000Z
""" Models and managers for generic tagging. """ from __future__ import unicode_literals # Python 2.3 compatibility try: set except NameError: from sets import Set as set from django.contrib.contenttypes import generic from django.contrib.contenttypes.models import ContentType from django.db import connection,...
40.450902
119
0.601684
from __future__ import unicode_literals try: set except NameError: from sets import Set as set from django.contrib.contenttypes import generic from django.contrib.contenttypes.models import ContentType from django.db import connection, models from django.db.models.query import QuerySet from django.utils.encod...
true
true
1c2909bdac0f4395bf335f1e4bbe0d962410a850
660
py
Python
application/__init__.py
LandRegistry/register-meta-data
941c9440ab948d038ab2d476d4f3d711a675f764
[ "MIT" ]
null
null
null
application/__init__.py
LandRegistry/register-meta-data
941c9440ab948d038ab2d476d4f3d711a675f764
[ "MIT" ]
1
2015-08-17T09:26:15.000Z
2015-08-17T09:26:15.000Z
application/__init__.py
LandRegistry/register-metadata
941c9440ab948d038ab2d476d4f3d711a675f764
[ "MIT" ]
null
null
null
from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy import os app = Flask(__name__) db = SQLAlchemy(app) app.config.from_object(os.environ.get('SETTINGS')) from application import routes # Set up logging if application has not been started in debug mode if not app.debug: import logging impo...
23.571429
96
0.722727
from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy import os app = Flask(__name__) db = SQLAlchemy(app) app.config.from_object(os.environ.get('SETTINGS')) from application import routes if not app.debug: import logging import sys formatter = logging.Formatter('%(asctime)s [%(lev...
true
true
1c290a6e5f70de245baae6f10d28d7f2c37af08a
1,577
py
Python
mmdet3d/ops/gather_points/gather_points.py
maskjp/mmdetection3d
98f332372b1a4c82bc2d57588a5d764f4176c869
[ "Apache-2.0" ]
1
2022-03-04T19:29:42.000Z
2022-03-04T19:29:42.000Z
mmdet3d/ops/gather_points/gather_points.py
maskjp/mmdetection3d
98f332372b1a4c82bc2d57588a5d764f4176c869
[ "Apache-2.0" ]
null
null
null
mmdet3d/ops/gather_points/gather_points.py
maskjp/mmdetection3d
98f332372b1a4c82bc2d57588a5d764f4176c869
[ "Apache-2.0" ]
null
null
null
# Copyright (c) OpenMMLab. All rights reserved. import torch from torch.autograd import Function from . import gather_points_ext class GatherPoints(Function): """Gather Points. Gather points with given index. """ @staticmethod def forward(ctx, features: torch.Tensor, indices: to...
29.203704
74
0.568167
import torch from torch.autograd import Function from . import gather_points_ext class GatherPoints(Function): @staticmethod def forward(ctx, features: torch.Tensor, indices: torch.Tensor) -> torch.Tensor: assert features.is_contiguous() assert indices.is_contiguous() ...
true
true
1c290a754df8292c3d4ab1fa7db8426ca94fe1da
1,347
py
Python
tests/test_sync.py
nfitzen/python-anilist
8685098c8d53c3c80d1ffd78a1546d2c8eeaa1e0
[ "MIT" ]
9
2021-03-08T21:10:15.000Z
2022-03-28T03:24:46.000Z
tests/test_sync.py
nfitzen/python-anilist
8685098c8d53c3c80d1ffd78a1546d2c8eeaa1e0
[ "MIT" ]
5
2021-08-28T08:29:53.000Z
2022-01-18T19:18:37.000Z
tests/test_sync.py
nfitzen/python-anilist
8685098c8d53c3c80d1ffd78a1546d2c8eeaa1e0
[ "MIT" ]
4
2021-07-07T22:59:53.000Z
2022-01-05T17:41:47.000Z
# SPDX-License-Identifier: MIT # Copyright (C) 2021 Amano Team <https://amanoteam.com/> and the python-anilist contributors import pytest import anilist @pytest.mark.parametrize( "query, content_type", [ ("Bakemonogatari", "anime"), ("Bakemonogatari", "manga"), ("Senjougahara", "chara...
24.053571
92
0.604306
import pytest import anilist @pytest.mark.parametrize( "query, content_type", [ ("Bakemonogatari", "anime"), ("Bakemonogatari", "manga"), ("Senjougahara", "character"), ("Chiwa Saitou", "staff"), ("travis", "user"), ], ) def test_search(query, content_type): ...
true
true
1c290a95300451fd48c12d2b0a0f3d680726a023
52,333
py
Python
pylinac/field_analysis.py
alanphys/pylinac
9b2dabe85d3038a9ec922c77bbb943b4e06dbdda
[ "MIT" ]
null
null
null
pylinac/field_analysis.py
alanphys/pylinac
9b2dabe85d3038a9ec922c77bbb943b4e06dbdda
[ "MIT" ]
null
null
null
pylinac/field_analysis.py
alanphys/pylinac
9b2dabe85d3038a9ec922c77bbb943b4e06dbdda
[ "MIT" ]
null
null
null
"""Module for performing analysis of images or 2D arrays for parameters such as flatness and symmetry.""" import dataclasses import io import os.path as osp import warnings from dataclasses import dataclass from enum import Enum from math import floor, ceil from typing import Union, Optional, Tuple, BinaryIO import ma...
51.508858
170
0.638698
import dataclasses import io import os.path as osp import warnings from dataclasses import dataclass from enum import Enum from math import floor, ceil from typing import Union, Optional, Tuple, BinaryIO import matplotlib.pyplot as plt import numpy as np from pylinac.core.utilities import open_path, ResultBase from ....
true
true
1c290af739e624ed1c1bba05b486099b4b90e047
574
py
Python
product_of_max3.py
erjan/coding_exercises
53ba035be85f1e7a12b4d4dbf546863324740467
[ "Apache-2.0" ]
null
null
null
product_of_max3.py
erjan/coding_exercises
53ba035be85f1e7a12b4d4dbf546863324740467
[ "Apache-2.0" ]
null
null
null
product_of_max3.py
erjan/coding_exercises
53ba035be85f1e7a12b4d4dbf546863324740467
[ "Apache-2.0" ]
null
null
null
#Given an integer array, find three numbers whose product is maximum and output the maximum product. import math import functools class Solution: def maximumProduct(self, nums: List[int]) -> int: nums = sorted(nums) f1 = nums[-1] * nums[-2] * nums[-3] f2 = nums[-1] * nums[...
30.210526
126
0.627178
import math import functools class Solution: def maximumProduct(self, nums: List[int]) -> int: nums = sorted(nums) f1 = nums[-1] * nums[-2] * nums[-3] f2 = nums[-1] * nums[0] * nums[1] return max(f1,f2)
true
true
1c290b37854dae69ca504ef0d539e3feb65d1d2d
7,388
py
Python
utils.py
KoryakovDmitry/DewarpNet
6b5c687548d9db3b5bcfd1503b7a8997c875ea1f
[ "MIT" ]
307
2019-10-26T06:39:02.000Z
2022-03-20T11:18:00.000Z
utils.py
KoryakovDmitry/DewarpNet
6b5c687548d9db3b5bcfd1503b7a8997c875ea1f
[ "MIT" ]
41
2019-10-29T14:48:38.000Z
2022-03-23T15:05:19.000Z
utils.py
KoryakovDmitry/DewarpNet
6b5c687548d9db3b5bcfd1503b7a8997c875ea1f
[ "MIT" ]
85
2019-10-26T06:39:03.000Z
2022-02-28T12:11:37.000Z
''' Misc Utility functions ''' from collections import OrderedDict import os import numpy as np import torch import random import torchvision def recursive_glob(rootdir='.', suffix=''): """Performs recursive glob with given suffix and rootdir :param rootdir is the root directory :param suffix is t...
35.519231
130
0.652003
from collections import OrderedDict import os import numpy as np import torch import random import torchvision def recursive_glob(rootdir='.', suffix=''): return [os.path.join(looproot, filename) for looproot, _, filenames in os.walk(rootdir) for filename in filenames if filename.endswith(suffix)] ...
true
true
1c290d6579ef3ba3ddc70b4fcc3b615427ee515e
89
py
Python
tests/download_test.py
FrancescoCaracciolo/SentenceVectorization
b4fdd70f61aee25f6bd2d4f3c4f157f9d799ff63
[ "Apache-2.0" ]
1
2021-12-20T11:37:50.000Z
2021-12-20T11:37:50.000Z
tests/download_test.py
FrancescoCaracciolo/SentenceVectorization
b4fdd70f61aee25f6bd2d4f3c4f157f9d799ff63
[ "Apache-2.0" ]
null
null
null
tests/download_test.py
FrancescoCaracciolo/SentenceVectorization
b4fdd70f61aee25f6bd2d4f3c4f157f9d799ff63
[ "Apache-2.0" ]
null
null
null
import SentenceVectorization SentenceVectorization.download_model("glove.6B", "models")
22.25
58
0.842697
import SentenceVectorization SentenceVectorization.download_model("glove.6B", "models")
true
true
1c290e9d6fbc317663834233c0f3557bc21fc041
3,778
py
Python
tools/test_net.py
yuanxiangyuee/ins_seg_HRSIs
d716a5d7726bb016a4f6c1032ef3e3ad108d00bb
[ "MIT" ]
null
null
null
tools/test_net.py
yuanxiangyuee/ins_seg_HRSIs
d716a5d7726bb016a4f6c1032ef3e3ad108d00bb
[ "MIT" ]
null
null
null
tools/test_net.py
yuanxiangyuee/ins_seg_HRSIs
d716a5d7726bb016a4f6c1032ef3e3ad108d00bb
[ "MIT" ]
1
2021-11-08T11:04:23.000Z
2021-11-08T11:04:23.000Z
"""Perform inference on one or more datasets.""" import argparse import cv2 import os import pprint import sys import time import torch import _init_paths # pylint: disable=unused-import from core.config import cfg, merge_cfg_from_file, merge_cfg_from_list, assert_and_infer_cfg from core.test_engine import run_infe...
32.568966
91
0.671784
import argparse import cv2 import os import pprint import sys import time import torch import _init_paths from core.config import cfg, merge_cfg_from_file, merge_cfg_from_list, assert_and_infer_cfg from core.test_engine import run_inference import utils.logging # thread safe and causes unwanted GPU memory alloca...
true
true
1c290f082046572d3a3de527fd30bd3dad29b3a4
3,015
py
Python
src/clients/python/library/shm_utils_setup.py
kpedro88/triton-inference-server
37b3441e59bd0da314f428e1dcddf0a2f67d52e1
[ "BSD-3-Clause" ]
1
2021-09-22T13:23:23.000Z
2021-09-22T13:23:23.000Z
src/clients/python/library/shm_utils_setup.py
dhanainme/triton-inference-server
880db08b8a3a54caa51ae76387cdcea303807faf
[ "BSD-3-Clause" ]
null
null
null
src/clients/python/library/shm_utils_setup.py
dhanainme/triton-inference-server
880db08b8a3a54caa51ae76387cdcea303807faf
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # * Redistributions of source code must retain the above copyright # notice, this list of conditions a...
38.653846
130
0.713101
import os from setuptools import find_packages from setuptools import setup if 'VERSION' not in os.environ: raise Exception('envvar VERSION must be specified') VERSION = os.environ['VERSION'] REQUIRED = ['numpy'] try: from wheel.bdist_wheel import bdist_wheel as _bdist_wheel c...
true
true
1c290f960c59965d9045dbb08a07e8f43172f843
29,722
py
Python
cogs/draw.py
WitherredAway/Yeet.
669ef4a81eac1ced4e2361b1834b5ffa153208d3
[ "MIT" ]
4
2021-04-29T21:17:01.000Z
2022-03-06T07:09:16.000Z
cogs/draw.py
WitherredAway/Yeet.
669ef4a81eac1ced4e2361b1834b5ffa153208d3
[ "MIT" ]
2
2021-04-29T21:23:07.000Z
2022-03-17T05:26:20.000Z
cogs/draw.py
WitherredAway/Yeet.
669ef4a81eac1ced4e2361b1834b5ffa153208d3
[ "MIT" ]
1
2022-03-26T11:20:56.000Z
2022-03-26T11:20:56.000Z
import discord from discord.ext import commands, tasks from main import * import re import itertools import emojis import asyncio from typing import Optional, Union import copy row_alpha = [ "🇦", "🇧", "🇨", "🇩", "🇪", "🇫", "🇬", "🇭", "🇮", "🇯", "🇰", "🇱", "🇲"...
41.744382
184
0.535395
import discord from discord.ext import commands, tasks from main import * import re import itertools import emojis import asyncio from typing import Optional, Union import copy row_alpha = [ "🇦", "🇧", "🇨", "🇩", "🇪", "🇫", "🇬", "🇭", "🇮", "🇯", "🇰", "🇱", "🇲"...
true
true
1c290fdccd4a0608a0acbaa92d9f5897a339ab68
10,092
py
Python
tutorial/stats_utils.py
LarryShamalama/scikit-mobility
d58324c20d8a1651c97feb988619ce4405e78278
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
3
2021-01-09T06:50:52.000Z
2021-11-01T00:16:21.000Z
tutorial/stats_utils.py
LarryShamalama/scikit-mobility
d58324c20d8a1651c97feb988619ce4405e78278
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
tutorial/stats_utils.py
LarryShamalama/scikit-mobility
d58324c20d8a1651c97feb988619ce4405e78278
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
1
2021-03-16T13:45:12.000Z
2021-03-16T13:45:12.000Z
#!/usr/bin/env python # ciacia_stats.py # Filippo Simini # Created: 20131021 import sys,os import math import random #import mpmath import operator import csv import numpy as np import matplotlib.pyplot as plt import matplotlib.pylab as pyl import itertools import scipy as sp from scipy import stats from scipy import...
29.857988
128
0.505945
import sys,os import math import random import operator import csv import numpy as np import matplotlib.pyplot as plt import matplotlib.pylab as pyl import itertools import scipy as sp from scipy import stats from scipy import optimize from scipy.integrate import quad def segno(x): if x > 0.0: return 1...
true
true
1c2910b8301ca92a8e816eb180e4e0009b943982
25,270
py
Python
manage_cat.py
coolerking/caterpillar
f8d02d48963759118b6acfcf9b5d73a9f061a24b
[ "MIT" ]
null
null
null
manage_cat.py
coolerking/caterpillar
f8d02d48963759118b6acfcf9b5d73a9f061a24b
[ "MIT" ]
null
null
null
manage_cat.py
coolerking/caterpillar
f8d02d48963759118b6acfcf9b5d73a9f061a24b
[ "MIT" ]
1
2019-12-16T08:22:00.000Z
2019-12-16T08:22:00.000Z
# -*- coding: utf-8 -*- #!/usr/bin/env python3 """ Scripts to drive a donkey 2 car Usage: manage_cat.py (drive) [--model=<model>] [--js] [--type=(linear|categorical|rnn|imu|behavior|3d|localizer|latent)] [--camera=(single|stereo)] [--meta=<key:value> ...] [--debug] manage_cat.py (train) [--tub=<tub1,tub2,..tub...
38.876923
194
0.614563
import os import time from docopt import docopt import numpy as np import donkeycar as dk from donkeycar.parts.transform import Lambda, TriggeredCallback, DelayedTrigger from donkeycar.parts.datastore import TubHandler from donkeycar.parts.controller import LocalWebController, JoystickController from donkeycar.pa...
true
true
1c29120a3bb651498fbec8f9197b371c68880bad
181
py
Python
src/apispec/__init__.py
sripathivenky/apispec
f4cbef36b65d13c3206f25b90734119876a45379
[ "MIT" ]
null
null
null
src/apispec/__init__.py
sripathivenky/apispec
f4cbef36b65d13c3206f25b90734119876a45379
[ "MIT" ]
12
2021-10-12T10:21:26.000Z
2022-03-28T10:26:04.000Z
src/apispec/__init__.py
sripathivenky/apispec
f4cbef36b65d13c3206f25b90734119876a45379
[ "MIT" ]
null
null
null
"""Contains main apispec classes: `APISpec` and `BasePlugin`""" from .core import APISpec from .plugin import BasePlugin __version__ = "5.1.0" __all__ = ["APISpec", "BasePlugin"]
22.625
63
0.723757
from .core import APISpec from .plugin import BasePlugin __version__ = "5.1.0" __all__ = ["APISpec", "BasePlugin"]
true
true
1c2913342138167c017d4d18a66e026b0162aae1
7,772
py
Python
core_tools/GUI/virt_gate_matrix_qml/gui_controller.py
opietx/core_tools
d5bd2d4beed74791b80ff5bdabd67774403763ef
[ "BSD-2-Clause" ]
null
null
null
core_tools/GUI/virt_gate_matrix_qml/gui_controller.py
opietx/core_tools
d5bd2d4beed74791b80ff5bdabd67774403763ef
[ "BSD-2-Clause" ]
null
null
null
core_tools/GUI/virt_gate_matrix_qml/gui_controller.py
opietx/core_tools
d5bd2d4beed74791b80ff5bdabd67774403763ef
[ "BSD-2-Clause" ]
null
null
null
from core_tools.GUI.virt_gate_matrix_qml.models import attenuation_model, table_header_model, vg_matrix_model from core_tools.drivers.hardware.hardware import hardware from PyQt5 import QtCore, QtQuick, QtGui, QtWidgets, QtQml import core_tools.GUI.virt_gate_matrix_qml as qml_in import os, sys class virt_gate_matri...
74.019048
285
0.659676
from core_tools.GUI.virt_gate_matrix_qml.models import attenuation_model, table_header_model, vg_matrix_model from core_tools.drivers.hardware.hardware import hardware from PyQt5 import QtCore, QtQuick, QtGui, QtWidgets, QtQml import core_tools.GUI.virt_gate_matrix_qml as qml_in import os, sys class virt_gate_matri...
true
true
1c2913d42fe3bb6efd581f01b4fcc69c308fa15e
10,342
py
Python
userbot/plugins/upload.py
Aliensuniquebot/CatUserbot
93561a620fc1198c6fe6c259412088f4bc81d97b
[ "MIT" ]
1
2020-07-18T07:42:58.000Z
2020-07-18T07:42:58.000Z
userbot/plugins/upload.py
praveen368/CatUserbot
4b0cd970551ffaf86b9fdd5da584c1b3882821ff
[ "MIT" ]
null
null
null
userbot/plugins/upload.py
praveen368/CatUserbot
4b0cd970551ffaf86b9fdd5da584c1b3882821ff
[ "MIT" ]
null
null
null
import aiohttp import asyncio import os import time from datetime import datetime from telethon import events from telethon.tl.types import DocumentAttributeVideo import json import subprocess import math from pySmartDL import SmartDL from hachoir.metadata import extractMetadata from hachoir.parser import createParser ...
36.935714
83
0.512473
import aiohttp import asyncio import os import time from datetime import datetime from telethon import events from telethon.tl.types import DocumentAttributeVideo import json import subprocess import math from pySmartDL import SmartDL from hachoir.metadata import extractMetadata from hachoir.parser import createParser ...
true
true
1c291487f82ce378092da34e0978a4c13567b6ef
27,581
py
Python
record/3548/pre_main_short.py
xieyulai/MSP-STTN-BJ
d691a20e32963330a6024c77284fed6c00b68fed
[ "MIT" ]
null
null
null
record/3548/pre_main_short.py
xieyulai/MSP-STTN-BJ
d691a20e32963330a6024c77284fed6c00b68fed
[ "MIT" ]
null
null
null
record/3548/pre_main_short.py
xieyulai/MSP-STTN-BJ
d691a20e32963330a6024c77284fed6c00b68fed
[ "MIT" ]
null
null
null
import warnings warnings.filterwarnings('ignore') import pickle import numpy as np import time import sys import cv2 import random import torch import torch.optim as optim import torch.nn as nn import torch.nn.functional as F from torch.utils.data import Dataset, DataLoader, TensorDataset import argparse import os impo...
39.401429
207
0.533193
import warnings warnings.filterwarnings('ignore') import pickle import numpy as np import time import sys import cv2 import random import torch import torch.optim as optim import torch.nn as nn import torch.nn.functional as F from torch.utils.data import Dataset, DataLoader, TensorDataset import argparse import os impo...
true
true
1c2914ea0ac53da03c71cb2a0defc291e6634469
24,745
py
Python
contrib/libs/protobuf/python/google/protobuf/json_format.py
SitdikovRustam/CatBoost
39fb9dfddb24e977ed87efc71063b03cd4bc8f16
[ "Apache-2.0" ]
1
2017-08-27T20:55:56.000Z
2017-08-27T20:55:56.000Z
contrib/libs/protobuf/python/google/protobuf/json_format.py
dsferz/machinelearning_yandex
8fde8314c5c70299ece8b8f00075ddfcd5e07ddf
[ "Apache-2.0" ]
null
null
null
contrib/libs/protobuf/python/google/protobuf/json_format.py
dsferz/machinelearning_yandex
8fde8314c5c70299ece8b8f00075ddfcd5e07ddf
[ "Apache-2.0" ]
null
null
null
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redi...
37.210526
79
0.679855
# Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copy...
true
true
1c2914fb84a864947b7e53a8c4d7154344e8d5b4
6,304
py
Python
docs/source/conf.py
awalter-bnl/suitcase
26c665769dde4621ed20ce8306bdcba85ffe9853
[ "BSD-3-Clause" ]
null
null
null
docs/source/conf.py
awalter-bnl/suitcase
26c665769dde4621ed20ce8306bdcba85ffe9853
[ "BSD-3-Clause" ]
null
null
null
docs/source/conf.py
awalter-bnl/suitcase
26c665769dde4621ed20ce8306bdcba85ffe9853
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # suitcase documentation build configuration file, created by # sphinx-quickstart on Thu Jun 28 12:35:56 2018. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # a...
31.207921
135
0.69448
extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.autosummary', 'sphinx.ext.githubpages', 'sphinx.ext.intersphinx', 'sphinx.ext.mathjax', 'sphinx.ext.viewcode', 'IPython.sphinxext.ipython_directive', 'IPython.sphinxext.ipython_console_highlighting', 'm...
true
true
1c29157b6b0e74b8dfb711574b31c47c02f0964c
1,611
py
Python
var/spack/repos/builtin/packages/r-htmltable/package.py
kehw/spack
4f49b1a9301447a8cf880c99820cad65e5c2d7e3
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
2
2020-09-10T22:50:08.000Z
2021-01-12T22:18:54.000Z
var/spack/repos/builtin/packages/r-htmltable/package.py
kehw/spack
4f49b1a9301447a8cf880c99820cad65e5c2d7e3
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
11
2021-01-08T22:23:53.000Z
2022-03-30T11:08:17.000Z
var/spack/repos/builtin/packages/r-htmltable/package.py
kehw/spack
4f49b1a9301447a8cf880c99820cad65e5c2d7e3
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RHtmltable(RPackage): """Tables with state-of-the-art layout elements such as row span...
48.818182
96
0.717567
from spack import * class RHtmltable(RPackage): homepage = "https://cloud.r-project.org/package=htmlTable" url = "https://cloud.r-project.org/src/contrib/htmlTable_1.11.2.tar.gz" list_url = "https://cloud.r-project.org/src/contrib/Archive/htmlTable" version('1.13.1', sha256='689f32b65da6a5...
true
true
1c2915c7bf5d85d4edf79049b8ca7bce51d2b8ff
1,987
py
Python
huggingface/hybrid/models/hybrid/text_classification.py
yeahhhhhhhhhh/djl-demo
261b30541a966561fba9a91a3c6f7d5dca1f5e69
[ "Apache-2.0" ]
138
2019-11-29T22:03:12.000Z
2021-04-20T04:27:28.000Z
huggingface/hybrid/models/hybrid/text_classification.py
yeahhhhhhhhhh/djl-demo
261b30541a966561fba9a91a3c6f7d5dca1f5e69
[ "Apache-2.0" ]
19
2019-11-30T05:15:34.000Z
2021-04-11T01:59:26.000Z
huggingface/hybrid/models/hybrid/text_classification.py
AlexRogalskiy/djl-demo
261b30541a966561fba9a91a3c6f7d5dca1f5e69
[ "Apache-2.0" ]
57
2019-11-29T22:27:57.000Z
2021-04-18T16:57:43.000Z
#!/usr/bin/env python # # Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file # except in compliance with the License. A copy of the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the ...
35.482143
94
0.621037
import torch from djl_python import Input from djl_python import Output from transformers_model import BaseNLPModel class TextClassification(BaseNLPModel): def __init__(self): super().__init__("text_classification") def preprocess(self, data: Input): input_text = data.get_as_st...
true
true
1c2916846aa20b5c58015f3e80d0d0582271382c
69
py
Python
abc/abc174/abc174a.py
c-yan/atcoder
940e49d576e6a2d734288fadaf368e486480a948
[ "MIT" ]
1
2019-08-21T00:49:34.000Z
2019-08-21T00:49:34.000Z
abc/abc174/abc174a.py
c-yan/atcoder
940e49d576e6a2d734288fadaf368e486480a948
[ "MIT" ]
null
null
null
abc/abc174/abc174a.py
c-yan/atcoder
940e49d576e6a2d734288fadaf368e486480a948
[ "MIT" ]
null
null
null
X = int(input()) if X >= 30: print('Yes') else: print('No')
9.857143
16
0.478261
X = int(input()) if X >= 30: print('Yes') else: print('No')
true
true
1c29171ee9eadc9394ce3cdbb926bb792bad8a79
805
py
Python
the_things_I_buy/core/verify_key_word_valid.py
ZYKoleva/MyGroceries
b7ee720c66aa88993519d90617ad0a0e58950fbf
[ "MIT" ]
null
null
null
the_things_I_buy/core/verify_key_word_valid.py
ZYKoleva/MyGroceries
b7ee720c66aa88993519d90617ad0a0e58950fbf
[ "MIT" ]
null
null
null
the_things_I_buy/core/verify_key_word_valid.py
ZYKoleva/MyGroceries
b7ee720c66aa88993519d90617ad0a0e58950fbf
[ "MIT" ]
null
null
null
from django.contrib.auth.models import User from django.core.exceptions import ValidationError from the_things_I_buy_auth.models import UserKeyWord def verify_key_word_valid(current_user, key_word): if current_user: user_key_word = UserKeyWord.objects.get(user=current_user) if not user_key_word.k...
35
80
0.719255
from django.contrib.auth.models import User from django.core.exceptions import ValidationError from the_things_I_buy_auth.models import UserKeyWord def verify_key_word_valid(current_user, key_word): if current_user: user_key_word = UserKeyWord.objects.get(user=current_user) if not user_key_word.k...
true
true
1c29184775ae5ab3b58a9eae3d55f69ecc97200b
828
py
Python
app/models.py
alexomaset/News-Highlights
8f0349f0a455c28c0be863a39a4fa10ef54777e7
[ "MIT" ]
null
null
null
app/models.py
alexomaset/News-Highlights
8f0349f0a455c28c0be863a39a4fa10ef54777e7
[ "MIT" ]
null
null
null
app/models.py
alexomaset/News-Highlights
8f0349f0a455c28c0be863a39a4fa10ef54777e7
[ "MIT" ]
null
null
null
class Sources: ''' Sources class that defines source objects ''' def __init__(self,id,name,author,description,url,category,urlToImage,title): ''' Function that initiates the sources class ''' self.id = id self.name = name self.author = author self....
27.6
80
0.613527
class Sources: def __init__(self,id,name,author,description,url,category,urlToImage,title): self.id = id self.name = name self.author = author self.description = description self.url = url self.category = category self.urlToImage = urlToImage self.titl...
true
true
1c2918edefb762270c0868976eff8fb29af82946
6,572
py
Python
rasa/utils/common.py
dimthe/rasa
90f37c70d982cac0bad38ecd8a082041f813cc25
[ "Apache-2.0" ]
null
null
null
rasa/utils/common.py
dimthe/rasa
90f37c70d982cac0bad38ecd8a082041f813cc25
[ "Apache-2.0" ]
null
null
null
rasa/utils/common.py
dimthe/rasa
90f37c70d982cac0bad38ecd8a082041f813cc25
[ "Apache-2.0" ]
null
null
null
import logging import os from typing import Any, Callable, Dict, List, Text, Optional, Union import rasa.core.utils import rasa.utils.io from rasa.constants import ( GLOBAL_USER_CONFIG_PATH, DEFAULT_LOG_LEVEL, ENV_LOG_LEVEL, DEFAULT_LOG_LEVEL_LIBRARIES, ENV_LOG_LEVEL_LIBRARIES, ) logger = logging....
32.534653
88
0.701461
import logging import os from typing import Any, Callable, Dict, List, Text, Optional, Union import rasa.core.utils import rasa.utils.io from rasa.constants import ( GLOBAL_USER_CONFIG_PATH, DEFAULT_LOG_LEVEL, ENV_LOG_LEVEL, DEFAULT_LOG_LEVEL_LIBRARIES, ENV_LOG_LEVEL_LIBRARIES, ) logger = logging....
true
true
1c29190914e929cd8d50f58b5af67436b3049257
4,578
py
Python
cmsplugin_blog_language_publish/admin.py
bitmazk/cmsplugin-blog-language-publish
7eed9ac606c3e2ef8459b737245ceb215bccbd91
[ "MIT" ]
null
null
null
cmsplugin_blog_language_publish/admin.py
bitmazk/cmsplugin-blog-language-publish
7eed9ac606c3e2ef8459b737245ceb215bccbd91
[ "MIT" ]
3
2020-02-11T23:22:31.000Z
2021-06-10T18:45:51.000Z
cmsplugin_blog_language_publish/admin.py
bitmazk/cmsplugin-blog-language-publish
7eed9ac606c3e2ef8459b737245ceb215bccbd91
[ "MIT" ]
null
null
null
"""Admin classes for the ``cmsplugin_blog_language_publish`` app.""" from django.contrib import admin from django.core.exceptions import ObjectDoesNotExist from django.utils.translation import get_language from django.utils.translation import ugettext_lazy as _ from cmsplugin_blog.models import Entry from cmsplugin_bl...
33.911111
79
0.653997
from django.contrib import admin from django.core.exceptions import ObjectDoesNotExist from django.utils.translation import get_language from django.utils.translation import ugettext_lazy as _ from cmsplugin_blog.models import Entry from cmsplugin_blog.admin import EntryAdmin, EntryForm from simple_translation.transl...
true
true