hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 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
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f7f6a9c5bd9533b4b4280d4516c823495f0b1ee3
17,283
py
Python
neutron/tests/fullstack/test_l3_agent.py
knodir/neutron
ac4e28478ac8a8a0c9f5c5785f6a6bcf532c66b8
[ "Apache-2.0" ]
null
null
null
neutron/tests/fullstack/test_l3_agent.py
knodir/neutron
ac4e28478ac8a8a0c9f5c5785f6a6bcf532c66b8
[ "Apache-2.0" ]
5
2019-08-14T06:46:03.000Z
2021-12-13T20:01:25.000Z
neutron/tests/fullstack/test_l3_agent.py
knodir/neutron
ac4e28478ac8a8a0c9f5c5785f6a6bcf532c66b8
[ "Apache-2.0" ]
2
2020-03-15T01:24:15.000Z
2020-07-22T20:34:26.000Z
# Copyright 2015 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
41.545673
79
0.652259
import functools import os import time import netaddr from neutron_lib import constants from oslo_utils import uuidutils from neutron.agent.l3 import ha_router from neutron.agent.l3 import namespaces from neutron.agent.linux import ip_lib from neutron.common import utils as common_utils from neutron.tes...
true
true
f7f6a9e3917944234292a4fcb928c3120028b8b7
1,631
py
Python
mistral/actions/generator_factory.py
soda-research/mistral
550a3de9c2defc7ce26336cb705d9c8d87bbaddd
[ "Apache-2.0" ]
null
null
null
mistral/actions/generator_factory.py
soda-research/mistral
550a3de9c2defc7ce26336cb705d9c8d87bbaddd
[ "Apache-2.0" ]
5
2019-08-14T06:46:03.000Z
2021-12-13T20:01:25.000Z
mistral/actions/generator_factory.py
soda-research/mistral
550a3de9c2defc7ce26336cb705d9c8d87bbaddd
[ "Apache-2.0" ]
2
2020-03-15T01:24:15.000Z
2020-07-22T20:34:26.000Z
# Copyright 2014 - Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
37.068182
79
0.661557
from oslo_utils import importutils from mistral.actions.openstack.action_generator import base SUPPORTED_MODULES = [ 'Nova', 'Glance', 'Keystone', 'Heat', 'Neutron', 'Cinder', 'Trove', 'Ironic', 'Baremetal Introspection', 'Swift', 'SwiftService', 'Zaqar', 'Barbican', 'Mistral', 'Designate',...
true
true
f7f6aa204c34e2de8f37ef87b7845cea3d0004ac
8,467
py
Python
usim/py/resources/base.py
AndreiBarsan/usim
c0ebaeef3c10bc7d50f983133ad346aeb9c3a6a1
[ "MIT" ]
10
2019-04-26T14:58:54.000Z
2022-02-02T10:21:37.000Z
usim/py/resources/base.py
AndreiBarsan/usim
c0ebaeef3c10bc7d50f983133ad346aeb9c3a6a1
[ "MIT" ]
97
2019-04-04T15:22:12.000Z
2022-02-28T11:23:22.000Z
usim/py/resources/base.py
AndreiBarsan/usim
c0ebaeef3c10bc7d50f983133ad346aeb9c3a6a1
[ "MIT" ]
3
2020-07-25T11:30:40.000Z
2021-05-14T17:36:44.000Z
from typing import Sequence, ClassVar, Type, TypeVar, Generic from itertools import takewhile from ..core import Environment from ..events import Event __all__ = ['Put', 'Get', 'BaseResource'] # Implementation Note # We take some liberty in interpreting SimPy's API. Several parts # are loosely specified - e.g. Base...
36.973799
88
0.644266
from typing import Sequence, ClassVar, Type, TypeVar, Generic from itertools import takewhile from ..core import Environment from ..events import Event __all__ = ['Put', 'Get', 'BaseResource'] # are loosely specified - e.g. BaseResource.GetQueue has to satisfy # different specs for ``BaseResource`` and ``Request`...
true
true
f7f6aab62dcc90e16391be7604ce93ccb372b1ac
2,051
py
Python
benchmarks/osb/extensions/util.py
martin-gaievski/k-NN
77353512c1f15e0dc996428a982941a7ee3036fb
[ "Apache-2.0" ]
1
2021-12-29T02:09:12.000Z
2021-12-29T02:09:12.000Z
benchmarks/osb/extensions/util.py
martin-gaievski/k-NN
77353512c1f15e0dc996428a982941a7ee3036fb
[ "Apache-2.0" ]
null
null
null
benchmarks/osb/extensions/util.py
martin-gaievski/k-NN
77353512c1f15e0dc996428a982941a7ee3036fb
[ "Apache-2.0" ]
null
null
null
# SPDX-License-Identifier: Apache-2.0 # # The OpenSearch Contributors require contributions made to # this file be licensed under the Apache-2.0 license or a # compatible open source license. import numpy as np from typing import List from typing import Dict from typing import Any def bulk_transform(partition: np.nd...
28.486111
79
0.643588
import numpy as np from typing import List from typing import Dict from typing import Any def bulk_transform(partition: np.ndarray, field_name: str, action, offset: int) -> List[Dict[str, Any]]: actions = [] _ = [ actions.extend([action(i + offset), None]) for i in ran...
true
true
f7f6ab3cf534ed9585a57726fc4caab9d54408da
596
py
Python
travelling/migrations/0038_auto_20190223_1748.py
HerbyDE/jagdreisencheck-webapp
9af5deda2423b787da88a0c893f3c474d8e4f73f
[ "BSD-3-Clause" ]
null
null
null
travelling/migrations/0038_auto_20190223_1748.py
HerbyDE/jagdreisencheck-webapp
9af5deda2423b787da88a0c893f3c474d8e4f73f
[ "BSD-3-Clause" ]
null
null
null
travelling/migrations/0038_auto_20190223_1748.py
HerbyDE/jagdreisencheck-webapp
9af5deda2423b787da88a0c893f3c474d8e4f73f
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.16 on 2019-02-23 16:48 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('travelling', '0037_auto_20190223_1748'), ] operat...
27.090909
153
0.669463
from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('travelling', '0037_auto_20190223_1748'), ] operations = [ migrations.AlterField( model_name='ratingre...
true
true
f7f6ac461b14578ff50a93e859ee54529f66b8e7
109
py
Python
main.py
QuickyDev/QuickyNote
796e1c20b7fce988d86dc977b4b4f3b16de8e529
[ "MIT" ]
null
null
null
main.py
QuickyDev/QuickyNote
796e1c20b7fce988d86dc977b4b4f3b16de8e529
[ "MIT" ]
3
2021-03-23T10:07:43.000Z
2021-03-23T20:28:56.000Z
main.py
Yste1000/github-slideshow
c5420242d4da54cc52b74b3c8438c374869b0a4d
[ "MIT" ]
null
null
null
from website import create_app app = create_app() if __name__ == '__main__': app.run(debug=True)
15.571429
31
0.669725
from website import create_app app = create_app() if __name__ == '__main__': app.run(debug=True)
true
true
f7f6ac552ec4b90993ff3b0a690f648d34eda552
1,283
py
Python
tests/ev3dev/geometry/matrix.py
cschlack/pybricks-micropython
0abfd2918267a4e6e7a04062976ac1bb3da1f4b1
[ "MIT" ]
115
2020-06-15T16:43:14.000Z
2022-03-21T21:11:57.000Z
tests/ev3dev/geometry/matrix.py
cschlack/pybricks-micropython
0abfd2918267a4e6e7a04062976ac1bb3da1f4b1
[ "MIT" ]
83
2020-06-17T17:19:29.000Z
2022-03-08T18:50:35.000Z
tests/ev3dev/geometry/matrix.py
BertLindeman/pybricks-micropython
8f22a99551100e66ddf08d014d9f442f22b33b4d
[ "MIT" ]
40
2020-06-15T18:36:39.000Z
2022-03-28T13:22:43.000Z
from pybricks.geometry import Matrix, vector # Basic matrix algebra A = Matrix( [ [1, 2, 3], [4, 5, 6], [7, 8, 9], ] ) B = -A C = A - A.T print("A =", A) print("B = -A =", B) print("A.T =", A.T) print("A + B =", A + B) print("C = A - A.T =", C) print("C + C.T =", C + C.T) print("A * A....
18.328571
55
0.478566
from pybricks.geometry import Matrix, vector A = Matrix( [ [1, 2, 3], [4, 5, 6], [7, 8, 9], ] ) B = -A C = A - A.T print("A =", A) print("B = -A =", B) print("A.T =", A.T) print("A + B =", A + B) print("C = A - A.T =", C) print("C + C.T =", C + C.T) print("A * A.T =", A * A.T) print("...
true
true
f7f6adbc34d6db52b35714a0256acbd53402fab1
1,952
py
Python
scripts/show_regions.py
higex/qpath
0377f2fdadad6e02ecde8ba2557fe9b957280fa1
[ "MIT" ]
6
2017-03-18T19:17:42.000Z
2019-05-05T14:57:31.000Z
WSItk/tools/show_regions.py
vladpopovici/WSItk
02db9dbf1148106a576d7b4dd7965c73607efdae
[ "MIT" ]
null
null
null
WSItk/tools/show_regions.py
vladpopovici/WSItk
02db9dbf1148106a576d7b4dd7965c73607efdae
[ "MIT" ]
4
2015-11-29T14:47:25.000Z
2019-11-28T03:16:39.000Z
# -*- coding: utf-8 -*- """ SHOW_REGIONS Emphasizes some regions in the image, by decreasing the importance of the rest. @author: vlad """ from __future__ import (absolute_import, division, print_function, unicode_literals) from builtins import * import argparse as opt import skimage.io from util.visualization imp...
30.5
95
0.641906
from __future__ import (absolute_import, division, print_function, unicode_literals) from builtins import * import argparse as opt import skimage.io from util.visualization import enhance_patches __author__ = 'vlad' __version__ = 0.1 def main(): p = opt.ArgumentParser(description=""" Emphasizes some regi...
true
true
f7f6add8b56d91dfe1d32605c705a2daf81c9fb4
6,527
py
Python
advanced/13_profiling.py
duckherder/python-reminders
23f650142b0745dbd7a51445aba186d85933300b
[ "MIT" ]
null
null
null
advanced/13_profiling.py
duckherder/python-reminders
23f650142b0745dbd7a51445aba186d85933300b
[ "MIT" ]
null
null
null
advanced/13_profiling.py
duckherder/python-reminders
23f650142b0745dbd7a51445aba186d85933300b
[ "MIT" ]
null
null
null
"""Profiling CPU and memory with Python.""" import time import timeit import statistics # in standard library since Python 3.4/PEP450 import sys from pympler import asizeof import tracemalloc from memory_profiler import profile import objgraph from guppy import hpy print("########## timing code ############") ...
34.903743
117
0.68546
import time import timeit import statistics import sys from pympler import asizeof import tracemalloc from memory_profiler import profile import objgraph from guppy import hpy print("########## timing code ############") def is_prime_fn1(x): for i in range(2, x-1): if x % i == 0: retur...
true
true
f7f6ae9a938a96047beabf2295f81d82aafa8c50
198
py
Python
models/en_fl/__init__.py
redperiabras/FILIPINEU
833fd8d44c9d4de94d3433ca810a4a17831343ff
[ "MIT" ]
null
null
null
models/en_fl/__init__.py
redperiabras/FILIPINEU
833fd8d44c9d4de94d3433ca810a4a17831343ff
[ "MIT" ]
1
2017-10-30T12:02:44.000Z
2017-10-30T12:02:44.000Z
models/en_fl/__init__.py
redperiabras/FILIPINEU
833fd8d44c9d4de94d3433ca810a4a17831343ff
[ "MIT" ]
1
2020-11-16T07:56:58.000Z
2020-11-16T07:56:58.000Z
import os import pickle from modules.model import NMT with open(os.getcwd()+'/models/en_fl/en-fl.nlm', 'rb') as f: config = pickle.load(f) model = NMT('fl-en', config) model.load(f) f.close()
18
60
0.681818
import os import pickle from modules.model import NMT with open(os.getcwd()+'/models/en_fl/en-fl.nlm', 'rb') as f: config = pickle.load(f) model = NMT('fl-en', config) model.load(f) f.close()
true
true
f7f6aee013739de8f7a041ed680167ba11ba985c
1,349
py
Python
synthesize.py
HappyBall/asr_guided_tacotron
be36f0895b81e338c5c51a7ab6d421fbf3aa055b
[ "MIT" ]
5
2018-08-02T13:44:11.000Z
2020-04-27T23:48:21.000Z
synthesize.py
HappyBall/asr_guided_tacotron
be36f0895b81e338c5c51a7ab6d421fbf3aa055b
[ "MIT" ]
1
2019-08-19T06:47:26.000Z
2020-05-24T01:18:22.000Z
synthesize.py
HappyBall/asr_guided_tacotron
be36f0895b81e338c5c51a7ab6d421fbf3aa055b
[ "MIT" ]
5
2019-02-18T16:39:47.000Z
2021-08-19T14:10:43.000Z
''' modified from https://www.github.com/kyubyong/tacotron ''' from hyperparams import Hyperparams as hp import tqdm from data_load import load_data import tensorflow as tf from train import Graph from utils import spectrogram2wav from scipy.io.wavfile import write import os import numpy as np def synthesize(): ...
28.702128
99
0.670867
from hyperparams import Hyperparams as hp import tqdm from data_load import load_data import tensorflow as tf from train import Graph from utils import spectrogram2wav from scipy.io.wavfile import write import os import numpy as np def synthesize(): if not os.path.exists(hp.taco_sampledir): os.mkdir(hp.taco_samp...
true
true
f7f6b1eb297796bd265d1e6ed82032bf7688277d
9,079
py
Python
sdk/python/pulumi_azure/mssql/server_vulnerability_assessment.py
apollo2030/pulumi-azure
034665c61665f4dc7e291b8813747012d34fa044
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure/mssql/server_vulnerability_assessment.py
apollo2030/pulumi-azure
034665c61665f4dc7e291b8813747012d34fa044
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure/mssql/server_vulnerability_assessment.py
apollo2030/pulumi-azure
034665c61665f4dc7e291b8813747012d34fa044
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import json import warnings import pulumi import pulumi.runtime from typing import Union from .. import utilities, tables class Server...
70.379845
278
0.734883
import json import warnings import pulumi import pulumi.runtime from typing import Union from .. import utilities, tables class ServerVulnerabilityAssessment(pulumi.CustomResource): recurring_scans: pulumi.Output[dict] server_security_alert_policy_id: pulumi.Output[str] storage_account_access_key: pulu...
true
true
f7f6b2786502a423291fd8144b0198c45ce02efc
1,684
py
Python
BookClub/management/commands/importuserstargeted.py
amir-rahim/BookClubSocialNetwork
b69a07cd33592f700214252a64c7c1c53845625d
[ "MIT" ]
4
2022-02-04T02:11:48.000Z
2022-03-12T21:38:01.000Z
BookClub/management/commands/importuserstargeted.py
amir-rahim/BookClubSocialNetwork
b69a07cd33592f700214252a64c7c1c53845625d
[ "MIT" ]
51
2022-02-01T18:56:23.000Z
2022-03-31T15:35:37.000Z
BookClub/management/commands/importuserstargeted.py
amir-rahim/BookClubSocialNetwork
b69a07cd33592f700214252a64c7c1c53845625d
[ "MIT" ]
null
null
null
from django.core.management.base import BaseCommand import random from faker import Faker import pandas as pd from pandas import DataFrame import time from BookClub.management.commands.helper import get_top_n_books, get_top_n_users_who_have_rated_xyz_books, get_top_n_books_shifted from BookClub.models.user import User...
31.773585
130
0.637767
from django.core.management.base import BaseCommand import random from faker import Faker import pandas as pd from pandas import DataFrame import time from BookClub.management.commands.helper import get_top_n_books, get_top_n_users_who_have_rated_xyz_books, get_top_n_books_shifted from BookClub.models.user import User...
true
true
f7f6b2a89736e3b92a223108452ac6a9411b3e07
3,330
py
Python
trading/models.py
cgajagon/Trading-App
10ffbea9dec3deca94489bf62d9f79e22f5ebebc
[ "MIT" ]
null
null
null
trading/models.py
cgajagon/Trading-App
10ffbea9dec3deca94489bf62d9f79e22f5ebebc
[ "MIT" ]
11
2020-02-21T20:57:13.000Z
2022-02-10T19:27:01.000Z
trading/models.py
cgajagon/Trading-App
10ffbea9dec3deca94489bf62d9f79e22f5ebebc
[ "MIT" ]
null
null
null
from django.db import models from django.urls import reverse, reverse_lazy import datetime class Symbols(models.Model): AD = 'ADR' RE = 'REIT' CE = 'Closed end fund' SI = 'Secondary Issue' LP = 'Limited Partnerships' CS = 'Common Stock' ET = 'ETF' TYPE = [ (AD, 'ADR'), (...
41.111111
134
0.710511
from django.db import models from django.urls import reverse, reverse_lazy import datetime class Symbols(models.Model): AD = 'ADR' RE = 'REIT' CE = 'Closed end fund' SI = 'Secondary Issue' LP = 'Limited Partnerships' CS = 'Common Stock' ET = 'ETF' TYPE = [ (AD, 'ADR'), (...
true
true
f7f6b30c0db72e839b28d0a9f70a0532357f7a53
1,128
py
Python
tests/test_migen_fsmgen.py
cactorium/fsm-gen-migen
9a177088d412ceff25a40848e95c133b524e2cf4
[ "MIT" ]
null
null
null
tests/test_migen_fsmgen.py
cactorium/fsm-gen-migen
9a177088d412ceff25a40848e95c133b524e2cf4
[ "MIT" ]
null
null
null
tests/test_migen_fsmgen.py
cactorium/fsm-gen-migen
9a177088d412ceff25a40848e95c133b524e2cf4
[ "MIT" ]
null
null
null
from migen import * from migen.fhdl import verilog # TODO get this working right from .context import migen_fsmgen class Foo(Module): def __init__(self): self.s = Signal() self.counter = Signal(8) x = Array(Signal(name="a") for i in range(7)) self.submodules += self.test_fsm(self.counter, self.coun...
19.789474
64
0.600177
from migen import * from migen.fhdl import verilog from .context import migen_fsmgen class Foo(Module): def __init__(self): self.s = Signal() self.counter = Signal(8) x = Array(Signal(name="a") for i in range(7)) self.submodules += self.test_fsm(self.counter, self.counter) @fsmgen(True) def t...
true
true
f7f6b31288268de01e1635fa60cd094441226754
2,018
py
Python
girder/test_girder/girder_utilities.py
naglepuff/large_image
4e928166f228fe894c38e4b01af5370e72f7229c
[ "Apache-2.0" ]
null
null
null
girder/test_girder/girder_utilities.py
naglepuff/large_image
4e928166f228fe894c38e4b01af5370e72f7229c
[ "Apache-2.0" ]
null
null
null
girder/test_girder/girder_utilities.py
naglepuff/large_image
4e928166f228fe894c38e4b01af5370e72f7229c
[ "Apache-2.0" ]
null
null
null
import os from test.datastore import datastore from test.utilities import BigTIFFHeader, JFIFHeader, JPEGHeader, PNGHeader, TIFFHeader # noqa try: from girder.models.folder import Folder from girder.models.upload import Upload except ImportError: # Make it easier to test without girder pass def name...
32.031746
100
0.684341
import os from test.datastore import datastore from test.utilities import BigTIFFHeader, JFIFHeader, JPEGHeader, PNGHeader, TIFFHeader try: from girder.models.folder import Folder from girder.models.upload import Upload except ImportError: pass def namedFolder(user, folderName='Public'): retur...
true
true
f7f6b3ad2f358cd2bd2a52177bb7bd548c0b3c86
110
py
Python
blipy/Postmasters/__init__.py
liviaalmeida/blipy
95b3cebd2d28900a81d288122d90305b9bf72d4e
[ "MIT" ]
null
null
null
blipy/Postmasters/__init__.py
liviaalmeida/blipy
95b3cebd2d28900a81d288122d90305b9bf72d4e
[ "MIT" ]
null
null
null
blipy/Postmasters/__init__.py
liviaalmeida/blipy
95b3cebd2d28900a81d288122d90305b9bf72d4e
[ "MIT" ]
null
null
null
from blipy.Postmasters.__AI import AIPostmaster from blipy.Postmasters.__Analytics import AnalyticsPostmaster
36.666667
61
0.890909
from blipy.Postmasters.__AI import AIPostmaster from blipy.Postmasters.__Analytics import AnalyticsPostmaster
true
true
f7f6b4f0461aec76c26d492fdf434de0b7e98ece
6,515
py
Python
src/test/python/twitter/aurora/config/test_thrift.py
isomer/incubator-aurora
5f54d4de25413bb18acec16120eb18f3e08c6bf0
[ "Apache-2.0" ]
null
null
null
src/test/python/twitter/aurora/config/test_thrift.py
isomer/incubator-aurora
5f54d4de25413bb18acec16120eb18f3e08c6bf0
[ "Apache-2.0" ]
null
null
null
src/test/python/twitter/aurora/config/test_thrift.py
isomer/incubator-aurora
5f54d4de25413bb18acec16120eb18f3e08c6bf0
[ "Apache-2.0" ]
null
null
null
import getpass import re from twitter.aurora.config import AuroraConfig from twitter.aurora.config.schema.base import Job, SimpleTask from twitter.aurora.config.thrift import ( convert as convert_pystachio_to_thrift, InvalidConfig, task_instance_from_job, ) from twitter.thermos.config.schema import ( P...
30.023041
92
0.702686
import getpass import re from twitter.aurora.config import AuroraConfig from twitter.aurora.config.schema.base import Job, SimpleTask from twitter.aurora.config.thrift import ( convert as convert_pystachio_to_thrift, InvalidConfig, task_instance_from_job, ) from twitter.thermos.config.schema import ( P...
true
true
f7f6b5a8f70adbced21c4a3644fffbb128022d07
948
py
Python
bot/database/video.py
TupaBan-Dev/jdan734-bot
891238591477e81ab8bda3f29bb4bc10424f1588
[ "MIT" ]
null
null
null
bot/database/video.py
TupaBan-Dev/jdan734-bot
891238591477e81ab8bda3f29bb4bc10424f1588
[ "MIT" ]
null
null
null
bot/database/video.py
TupaBan-Dev/jdan734-bot
891238591477e81ab8bda3f29bb4bc10424f1588
[ "MIT" ]
null
null
null
import json from .connection import db, manager from peewee import * class Video(Model): channelid = CharField() link = CharField() class Meta: db_table = "videos" database = db primary_key = False async def save(channelid, link): links = list(await manager.execute(...
23.121951
57
0.511603
import json from .connection import db, manager from peewee import * class Video(Model): channelid = CharField() link = CharField() class Meta: db_table = "videos" database = db primary_key = False async def save(channelid, link): links = list(await manager.execute(...
true
true
f7f6b5c97f84d88ad8e10acea53d43063a3c9d24
3,086
py
Python
idfy_rest_client/controllers/languages_controller.py
dealflowteam/Idfy
fa3918a6c54ea0eedb9146578645b7eb1755b642
[ "MIT" ]
null
null
null
idfy_rest_client/controllers/languages_controller.py
dealflowteam/Idfy
fa3918a6c54ea0eedb9146578645b7eb1755b642
[ "MIT" ]
null
null
null
idfy_rest_client/controllers/languages_controller.py
dealflowteam/Idfy
fa3918a6c54ea0eedb9146578645b7eb1755b642
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ idfy_rest_client.controllers.languages_controller This file was automatically generated for Idfy by APIMATIC v2.0 ( https://apimatic.io ). """ from .base_controller import BaseController from ..api_helper import APIHelper from ..configuration import Configuration from ....
32.145833
99
0.623461
from .base_controller import BaseController from ..api_helper import APIHelper from ..configuration import Configuration from ..models.language_dto import LanguageDTO class LanguagesController(BaseController): def list_all_languages(self): _query_builder = Configuration.get_bas...
true
true
f7f6b5e6470d609a34700ddcbffd64fa5e01b0c3
6,361
py
Python
tests/test_utils_objects.py
Gallaecio/js2xml
d01b79e1a82de157deffcc1a22f4e0b6bfa07715
[ "MIT" ]
null
null
null
tests/test_utils_objects.py
Gallaecio/js2xml
d01b79e1a82de157deffcc1a22f4e0b6bfa07715
[ "MIT" ]
null
null
null
tests/test_utils_objects.py
Gallaecio/js2xml
d01b79e1a82de157deffcc1a22f4e0b6bfa07715
[ "MIT" ]
null
null
null
import js2xml from js2xml.utils.objects import findall, getall, make from nose.tools import * def test_json(): jscode_snippets = [ ( r""" var arr1 = ["a","b","c"]; var arr2 = ["d","e","f"]; """, [['a', 'b', 'c'], ['d', 'e', 'f']] ...
26.176955
88
0.394749
import js2xml from js2xml.utils.objects import findall, getall, make from nose.tools import * def test_json(): jscode_snippets = [ ( r""" var arr1 = ["a","b","c"]; var arr2 = ["d","e","f"]; """, [['a', 'b', 'c'], ['d', 'e', 'f']] ...
true
true
f7f6b617ea2ec3bd2e4b2852962c6b655eaf34c8
784
py
Python
tests/standardise/surface/test_glasgow_licor.py
openghg/openghg
9a05dd6fe3cee6123898b8f390cfaded08dbb408
[ "Apache-2.0" ]
5
2021-03-02T09:04:07.000Z
2022-01-25T09:58:16.000Z
tests/standardise/surface/test_glasgow_licor.py
openghg/openghg
9a05dd6fe3cee6123898b8f390cfaded08dbb408
[ "Apache-2.0" ]
229
2020-09-30T15:08:39.000Z
2022-03-31T14:23:55.000Z
tests/standardise/surface/test_glasgow_licor.py
openghg/openghg
9a05dd6fe3cee6123898b8f390cfaded08dbb408
[ "Apache-2.0" ]
null
null
null
from helpers import get_mobile_datapath from openghg.standardise.surface import parse_glasow_licor from pandas import Timestamp import pytest def test_glasgow_licor_read(): test_data = get_mobile_datapath(filename="glasgow_licor_sample.txt") data = parse_glasow_licor(filepath=test_data) ch4_data = data["...
35.636364
92
0.691327
from helpers import get_mobile_datapath from openghg.standardise.surface import parse_glasow_licor from pandas import Timestamp import pytest def test_glasgow_licor_read(): test_data = get_mobile_datapath(filename="glasgow_licor_sample.txt") data = parse_glasow_licor(filepath=test_data) ch4_data = data["...
true
true
f7f6b70fae9102a5808155e1b544ecf727dac1fd
394
py
Python
backend/users/migrations/0002_auto_20211031_1843.py
crowdbotics-apps/dot-31776
246413d282d3b6585e29c9580cb02a7adb8cde36
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/users/migrations/0002_auto_20211031_1843.py
crowdbotics-apps/dot-31776
246413d282d3b6585e29c9580cb02a7adb8cde36
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/users/migrations/0002_auto_20211031_1843.py
crowdbotics-apps/dot-31776
246413d282d3b6585e29c9580cb02a7adb8cde36
[ "FTL", "AML", "RSA-MD" ]
null
null
null
# Generated by Django 2.2.24 on 2021-10-31 18:43 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('users', '0001_initial'), ] operations = [ migrations.AlterField( model_name='user', name='name', field=...
20.736842
74
0.591371
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('users', '0001_initial'), ] operations = [ migrations.AlterField( model_name='user', name='name', field=models.CharField(blank=True, max_length=255, nul...
true
true
f7f6b73cd72e26ba9973d9dab40b2aa2be25f903
606
py
Python
6. Abstraccion.py
elviscruz45/POOAlgoritmoPython
c1f94a67d553c15f59a092030e880681c0300212
[ "MIT" ]
null
null
null
6. Abstraccion.py
elviscruz45/POOAlgoritmoPython
c1f94a67d553c15f59a092030e880681c0300212
[ "MIT" ]
null
null
null
6. Abstraccion.py
elviscruz45/POOAlgoritmoPython
c1f94a67d553c15f59a092030e880681c0300212
[ "MIT" ]
null
null
null
class Lavadora: def __init__(self): pass def lavar(self, temperatura='caliente'): self._llenar_tanque_de_agua(temperatura) self._anadir_jabon() self._lavar() self._centrifugar() def _llenar_tanque_de_agua(self, temperatura): print(f'Llenando el tanque con ag...
22.444444
59
0.632013
class Lavadora: def __init__(self): pass def lavar(self, temperatura='caliente'): self._llenar_tanque_de_agua(temperatura) self._anadir_jabon() self._lavar() self._centrifugar() def _llenar_tanque_de_agua(self, temperatura): print(f'Llenando el tanque con ag...
true
true
f7f6b7a9f33de22cda2d034228d41b68c51d1248
1,977
py
Python
tests/test_types.py
ddejohn/dork
6ff877c721086c1f1d98a4592b8959ef17cb934e
[ "MIT" ]
1
2021-07-28T21:23:53.000Z
2021-07-28T21:23:53.000Z
tests/test_types.py
fbabonoy/dork
6ff877c721086c1f1d98a4592b8959ef17cb934e
[ "MIT" ]
null
null
null
tests/test_types.py
fbabonoy/dork
6ff877c721086c1f1d98a4592b8959ef17cb934e
[ "MIT" ]
1
2021-06-09T03:09:06.000Z
2021-06-09T03:09:06.000Z
# -*- coding: utf-8 -*- """Basic tests for state and entity relationships in dork""" import dork.types as types import dork.game_utils.factory_data as factory_data # pylint: disable=protected-access def test_confirm_method_blank(capsys, mocker): """confirm should do things""" mocked_input = mocker.patch('b...
32.409836
74
0.687911
import dork.types as types import dork.game_utils.factory_data as factory_data def test_confirm_method_blank(capsys, mocker): mocked_input = mocker.patch('builtins.input') mocked_input.side_effect = ["bumblebee", "y", "tester"] types.Game._confirm() captured = capsys.readouterr() assert "\n!!...
true
true
f7f6b99a2247e4df84c6ad297716a2120ebc6b55
3,832
py
Python
cnn/genotypes.py
flymin/darts
05b942e3535bcb87ff4ce86f8098ba63c48840c6
[ "Apache-2.0" ]
1
2020-04-17T11:39:26.000Z
2020-04-17T11:39:26.000Z
cnn/genotypes.py
flymin/darts
05b942e3535bcb87ff4ce86f8098ba63c48840c6
[ "Apache-2.0" ]
null
null
null
cnn/genotypes.py
flymin/darts
05b942e3535bcb87ff4ce86f8098ba63c48840c6
[ "Apache-2.0" ]
null
null
null
from collections import namedtuple Genotype = namedtuple('Genotype', 'normal normal_concat reduce reduce_concat') PRIMITIVES = [ 'none', 'max_pool_3x3', 'avg_pool_3x3', 'skip_connect', 'sep_conv_3x3', 'sep_conv_5x5', 'dil_conv_3x3', 'dil_conv_5x5' ] NASNet = Genotype( normal = [ ...
43.545455
433
0.596294
from collections import namedtuple Genotype = namedtuple('Genotype', 'normal normal_concat reduce reduce_concat') PRIMITIVES = [ 'none', 'max_pool_3x3', 'avg_pool_3x3', 'skip_connect', 'sep_conv_3x3', 'sep_conv_5x5', 'dil_conv_3x3', 'dil_conv_5x5' ] NASNet = Genotype( normal = [ ...
true
true
f7f6ba0f25c86f470f20030f3ca111068509131c
9,579
py
Python
codes/projects/test_continuous_parameter/utils_project/prediction_and_plotting_routine_vaeiaf.py
hwangoh/uq-vae
382548e6f6dd7f9d72feff0e0752beec871db348
[ "MIT" ]
2
2021-07-28T16:47:18.000Z
2021-08-03T00:53:58.000Z
codes/projects/test_discrete_parameter/utils_project/prediction_and_plotting_routine_vaeiaf.py
HwanGoh/uq-vae
24a3d26987e2ec807d57601b14c68b22f3652a18
[ "MIT" ]
null
null
null
codes/projects/test_discrete_parameter/utils_project/prediction_and_plotting_routine_vaeiaf.py
HwanGoh/uq-vae
24a3d26987e2ec807d57601b14c68b22f3652a18
[ "MIT" ]
2
2021-09-29T08:31:46.000Z
2021-11-07T10:26:45.000Z
'''Prediction and plotting routine In preparation for prediction and plotting, this script will: 1) Load the obs_dimensions 2) Specify the input_dimensions and latent_dimensions 3) Instantiate the DataHandler class 4) Instantiate the neural network 5) Load the trained neural network weights 6) ...
40.079498
85
0.63587
import sys sys.path.append('../../../../..') import numpy as np import pandas as pd import matplotlib.pyplot as plt plt.ioff() from utils_data.data_handler import DataHandler from neural_networks.nn_vaeiaf import VAEIAF from utils_misc.positivity_constraints import positivity_constraint_log_exp from Finite_Elemen...
true
true
f7f6ba1394581664dde0de101e3300233906c804
1,160
py
Python
vocannotation.py
fwgg8547/deeplean_mc
1b858e59caf082df0cd4b1ca12dc21875fb00b26
[ "MIT" ]
null
null
null
vocannotation.py
fwgg8547/deeplean_mc
1b858e59caf082df0cd4b1ca12dc21875fb00b26
[ "MIT" ]
null
null
null
vocannotation.py
fwgg8547/deeplean_mc
1b858e59caf082df0cd4b1ca12dc21875fb00b26
[ "MIT" ]
null
null
null
import xml.etree.ElementTree as ET from os import getcwd sets = ['train', 'val'] classes = ["skeleton",] def convert_annotation(image_id, list_file): print(image_id) in_file = open('./data/mindata/Annotations/%s.xml'% image_id) tree=ET.parse(in_file) root = tree.getroot() for obj in root.iter...
33.142857
136
0.625
import xml.etree.ElementTree as ET from os import getcwd sets = ['train', 'val'] classes = ["skeleton",] def convert_annotation(image_id, list_file): print(image_id) in_file = open('./data/mindata/Annotations/%s.xml'% image_id) tree=ET.parse(in_file) root = tree.getroot() for obj in root.iter...
true
true
f7f6ba4a3242ab5fd3d0b25b52e8124848bf987b
27,483
py
Python
django_zero_downtime_migrations/backends/postgres/schema.py
getsentry/django-pg-zero-downtime-migrations
62dacf9888f0012ab6aaf77a7dca30168bdaba52
[ "MIT" ]
376
2018-08-21T07:05:20.000Z
2022-03-26T00:41:10.000Z
django_zero_downtime_migrations/backends/postgres/schema.py
getsentry/django-pg-zero-downtime-migrations
62dacf9888f0012ab6aaf77a7dca30168bdaba52
[ "MIT" ]
17
2018-10-23T19:44:13.000Z
2022-03-17T01:28:16.000Z
django_zero_downtime_migrations/backends/postgres/schema.py
getsentry/django-pg-zero-downtime-migrations
62dacf9888f0012ab6aaf77a7dca30168bdaba52
[ "MIT" ]
17
2018-09-06T10:06:54.000Z
2022-03-21T04:44:45.000Z
import re import warnings from contextlib import contextmanager import django from django.conf import settings from django.db.backends.ddl_references import Statement from django.db.backends.postgresql.schema import ( DatabaseSchemaEditor as PostgresDatabaseSchemaEditor ) from django.utils.functional import cached...
45.426446
116
0.6762
import re import warnings from contextlib import contextmanager import django from django.conf import settings from django.db.backends.ddl_references import Statement from django.db.backends.postgresql.schema import ( DatabaseSchemaEditor as PostgresDatabaseSchemaEditor ) from django.utils.functional import cached...
true
true
f7f6ba8b114e75d3fd7aaa887292d3e5794f03f9
10,916
py
Python
pandas/tests/arithmetic/test_object.py
ajspera/pandas
f38020f33052ea9029b410d7fae79bc8f249c0ac
[ "BSD-3-Clause" ]
5
2019-07-26T15:22:41.000Z
2021-09-28T09:22:17.000Z
pandas/tests/arithmetic/test_object.py
ajspera/pandas
f38020f33052ea9029b410d7fae79bc8f249c0ac
[ "BSD-3-Clause" ]
null
null
null
pandas/tests/arithmetic/test_object.py
ajspera/pandas
f38020f33052ea9029b410d7fae79bc8f249c0ac
[ "BSD-3-Clause" ]
3
2019-07-26T10:47:23.000Z
2020-08-10T12:40:32.000Z
# Arithmetic tests for DataFrame/Series/Index/Array classes that should # behave identically. # Specifically for object dtype from decimal import Decimal import operator import numpy as np import pytest import pandas as pd from pandas import Series, Timestamp from pandas.core import ops import pandas.util.testing as ...
31.825073
88
0.561378
from decimal import Decimal import operator import numpy as np import pytest import pandas as pd from pandas import Series, Timestamp from pandas.core import ops import pandas.util.testing as tm class TestObjectComparisons: def test_comparison_object_numeric_nas(self): ser = Series(np.random.randn...
true
true
f7f6bace4333575ee395f8c94362a447c8d67e98
44,055
py
Python
isort/_future/_dataclasses.py
honnix/isort
6b8f57b8f64676ce2125e5b3c7bb7590539287c7
[ "MIT" ]
null
null
null
isort/_future/_dataclasses.py
honnix/isort
6b8f57b8f64676ce2125e5b3c7bb7590539287c7
[ "MIT" ]
null
null
null
isort/_future/_dataclasses.py
honnix/isort
6b8f57b8f64676ce2125e5b3c7bb7590539287c7
[ "MIT" ]
null
null
null
# type: ignore # flake8: noqa """Backport of Python3.7 dataclasses Library Taken directly from here: https://github.com/ericvsmith/dataclasses Licensed under the Apache License: https://github.com/ericvsmith/dataclasses/blob/master/LICENSE.txt Needed due to isorts strict no non-optional requirements stance. TODO: Re...
36.529851
100
0.605902
import copy import inspect import keyword import re import sys import types __all__ = [ "dataclass", "field", "Field", "FrozenInstanceError", "InitVar", "MISSING", "fields", "asdict", "astuple", "make_dataclass", "replace", "is_dataclass", ] # referring to the...
true
true
f7f6baff27102aeff0ebb938d362e6f28d09e521
4,635
py
Python
docs/_exts/nir.py
SoftReaper/Mesa-Renoir-deb
8d1de1f66058d62b41fe55d36522efea2bdf996d
[ "MIT" ]
null
null
null
docs/_exts/nir.py
SoftReaper/Mesa-Renoir-deb
8d1de1f66058d62b41fe55d36522efea2bdf996d
[ "MIT" ]
null
null
null
docs/_exts/nir.py
SoftReaper/Mesa-Renoir-deb
8d1de1f66058d62b41fe55d36522efea2bdf996d
[ "MIT" ]
null
null
null
# Copyright © 2021 Intel Corporation # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # d...
30.493421
91
0.670982
import docutils.nodes import mako.template import os import sphinx from sphinx.directives import SphinxDirective from sphinx.domains import Domain from sphinx.util.nodes import make_refnode import sys import textwrap THIS_DIR = os.path.dirname(os.path.abspath(__file__)) MESA_DIR = os.path.join(TH...
true
true
f7f6bb9ab02584f13d1d76dd26b94737c5267f1a
597
gyp
Python
build/linux/unbundle/libxslt.gyp
TwistedCore/external_v8
c6725dab9be251fbfc6fd7d53c3513a23e78c36c
[ "BSD-3-Clause" ]
231
2015-01-08T09:04:44.000Z
2021-12-30T03:03:10.000Z
build/linux/unbundle/libxslt.gyp
TwistedCore/external_v8
c6725dab9be251fbfc6fd7d53c3513a23e78c36c
[ "BSD-3-Clause" ]
8
2015-08-31T06:39:59.000Z
2021-12-04T14:53:28.000Z
build/linux/unbundle/libxslt.gyp
TwistedCore/external_v8
c6725dab9be251fbfc6fd7d53c3513a23e78c36c
[ "BSD-3-Clause" ]
268
2015-01-21T05:53:28.000Z
2022-03-25T22:09:01.000Z
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. { 'targets': [ { 'target_name': 'libxslt', 'type': 'none', 'direct_dependent_settings': { 'cflags': [ '<!@(pkg-conf...
22.961538
72
0.507538
{ 'targets': [ { 'target_name': 'libxslt', 'type': 'none', 'direct_dependent_settings': { 'cflags': [ '<!@(pkg-config --cflags libxslt)', ], }, 'link_settings': { 'ldflags': [ '<!@(pkg-config --libs-only-L --libs-only-other libxslt)', ...
true
true
f7f6bcc22044281e719b7f092f39612e6900217a
565
py
Python
resotolib/test/test_baseresources.py
MrMarvin/cloudkeeper
cdca21c1a3b945da6e53a5dbb37a437e1d46f557
[ "Apache-2.0" ]
316
2021-07-08T12:54:19.000Z
2022-01-12T18:50:17.000Z
resotolib/test/test_baseresources.py
MrMarvin/cloudkeeper
cdca21c1a3b945da6e53a5dbb37a437e1d46f557
[ "Apache-2.0" ]
110
2022-01-13T22:27:55.000Z
2022-03-30T22:26:50.000Z
resotolib/test/test_baseresources.py
MrMarvin/cloudkeeper
cdca21c1a3b945da6e53a5dbb37a437e1d46f557
[ "Apache-2.0" ]
14
2021-08-23T08:29:29.000Z
2022-01-08T04:42:28.000Z
from typing import ClassVar from dataclasses import dataclass from resotolib.baseresources import BaseResource @dataclass(eq=False) class SomeTestResource(BaseResource): kind: ClassVar[str] = "some_test_resource" def delete(self, graph) -> bool: return False def test_resource(): r = SomeTestRes...
24.565217
48
0.670796
from typing import ClassVar from dataclasses import dataclass from resotolib.baseresources import BaseResource @dataclass(eq=False) class SomeTestResource(BaseResource): kind: ClassVar[str] = "some_test_resource" def delete(self, graph) -> bool: return False def test_resource(): r = SomeTestRes...
true
true
f7f6bcfda437fc75023abe3c83af757d71434e93
1,680
py
Python
tests/integrations/test_experimental.py
renedlog/determined
7b1f2b1a845e4def17d489a5ad7592a2eaef0608
[ "Apache-2.0" ]
null
null
null
tests/integrations/test_experimental.py
renedlog/determined
7b1f2b1a845e4def17d489a5ad7592a2eaef0608
[ "Apache-2.0" ]
1
2022-02-10T07:31:44.000Z
2022-02-10T07:31:44.000Z
tests/integrations/test_experimental.py
renedlog/determined
7b1f2b1a845e4def17d489a5ad7592a2eaef0608
[ "Apache-2.0" ]
null
null
null
import pytest from tests.integrations import config as conf from tests.integrations import experiment as exp @pytest.mark.nightly # type: ignore def test_nas_search() -> None: config = conf.load_config(conf.experimental_path("nas_search/train_one_arch.yaml")) config = conf.set_max_steps(config, 2) exp....
35
99
0.7625
import pytest from tests.integrations import config as conf from tests.integrations import experiment as exp @pytest.mark.nightly def test_nas_search() -> None: config = conf.load_config(conf.experimental_path("nas_search/train_one_arch.yaml")) config = conf.set_max_steps(config, 2) exp.run_basic_test...
true
true
f7f6bd4107da458d05f0c5465d5447e4b20815d3
659
py
Python
visorspass/visor/migrations/0007_auto_20210814_0009.py
RobertoMarroquin/spass
7afa348f72f036a230a3bbe068a9716cd068adf1
[ "MIT" ]
null
null
null
visorspass/visor/migrations/0007_auto_20210814_0009.py
RobertoMarroquin/spass
7afa348f72f036a230a3bbe068a9716cd068adf1
[ "MIT" ]
null
null
null
visorspass/visor/migrations/0007_auto_20210814_0009.py
RobertoMarroquin/spass
7afa348f72f036a230a3bbe068a9716cd068adf1
[ "MIT" ]
null
null
null
# Generated by Django 3.2.5 on 2021-08-14 00:09 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('visor', '0006_auto_20210814_0007'), ] operations = [ migrations.RemoveField( model_name='unidad...
26.36
145
0.622155
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('visor', '0006_auto_20210814_0007'), ] operations = [ migrations.RemoveField( model_name='unidadmedida', name='variable', )...
true
true
f7f6bd6cc598329151b502560f8bbb935e81faa2
904
py
Python
python/taichi/scoping/transform_scope.py
willFederer/taichi
59b37adf83fba5a06583dcf6b9bf2a74a985fe3e
[ "MIT" ]
1
2021-02-04T13:59:59.000Z
2021-02-04T13:59:59.000Z
python/taichi/scoping/transform_scope.py
willFederer/taichi
59b37adf83fba5a06583dcf6b9bf2a74a985fe3e
[ "MIT" ]
null
null
null
python/taichi/scoping/transform_scope.py
willFederer/taichi
59b37adf83fba5a06583dcf6b9bf2a74a985fe3e
[ "MIT" ]
null
null
null
from taichi.core import tc_core from taichi.tools.transform import Transform from taichi.misc.util import * import traceback current_transform = [tc_core.Matrix4(1.0)] class TransformScope: def __init__(self, transform=None, translate=None, rotation=None, scale=None): self.transform = Transform(transform...
27.393939
86
0.740044
from taichi.core import tc_core from taichi.tools.transform import Transform from taichi.misc.util import * import traceback current_transform = [tc_core.Matrix4(1.0)] class TransformScope: def __init__(self, transform=None, translate=None, rotation=None, scale=None): self.transform = Transform(transform...
true
true
f7f6be4308f616eb254a1324b1214ceef731bf35
6,861
py
Python
ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/protocols/instruction_0379cfa9d0d64cb1c14d9f8a669dcb24.py
OpenIxia/ixnetwork_restpy
f628db450573a104f327cf3c737ca25586e067ae
[ "MIT" ]
20
2019-05-07T01:59:14.000Z
2022-02-11T05:24:47.000Z
ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/protocols/instruction_0379cfa9d0d64cb1c14d9f8a669dcb24.py
OpenIxia/ixnetwork_restpy
f628db450573a104f327cf3c737ca25586e067ae
[ "MIT" ]
60
2019-04-03T18:59:35.000Z
2022-02-22T12:05:05.000Z
ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/protocols/instruction_0379cfa9d0d64cb1c14d9f8a669dcb24.py
OpenIxia/ixnetwork_restpy
f628db450573a104f327cf3c737ca25586e067ae
[ "MIT" ]
13
2019-05-20T10:48:31.000Z
2021-10-06T07:45:44.000Z
# MIT LICENSE # # Copyright 1997 - 2020 by IXIA Keysight # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify,...
37.288043
198
0.670893
from ixnetwork_restpy.base import Base from ixnetwork_restpy.files import Files from typing import List, Any, Union class Instruction(Base): __slots__ = () _SDM_NAME = 'instruction' _SDM_ATT_MAP = { 'ExperimenterData': 'experimenterData', 'ExperimenterDataLength': 'ex...
true
true
f7f6be4a73d0d4303360c24d28b5ebeff728367f
2,063
py
Python
configman/config_exceptions.py
peterbe/configman
724d80b25a0ebbb2e75ad69e92a6611494cd68b4
[ "BSD-3-Clause" ]
null
null
null
configman/config_exceptions.py
peterbe/configman
724d80b25a0ebbb2e75ad69e92a6611494cd68b4
[ "BSD-3-Clause" ]
null
null
null
configman/config_exceptions.py
peterbe/configman
724d80b25a0ebbb2e75ad69e92a6611494cd68b4
[ "BSD-3-Clause" ]
null
null
null
# ***** BEGIN LICENSE BLOCK ***** # Version: MPL 1.1/GPL 2.0/LGPL 2.1 # # The contents of this file are subject to the Mozilla Public License Version # 1.1 (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.mozilla.org/MPL/ # # Softwa...
33.274194
77
0.752787
class ConfigmanException(Exception): pass class ConfigFileMissingError(IOError, ConfigmanException): pass class ConfigFileOptionNameMissingError(ConfigmanException): pass class NotAnOptionError(ConfigmanException): pass class OptionError(ConfigmanException)...
true
true
f7f6be6ccca469c361d7bad78eeb684cc6275f20
163
py
Python
scripts/list_graphs.py
knshnb/MQLib
66495e135f7bba3e84fb6836b03eb5f13a6ca7cf
[ "MIT" ]
1
2021-08-09T17:13:32.000Z
2021-08-09T17:13:32.000Z
scripts/list_graphs.py
knshnb/MQLib
66495e135f7bba3e84fb6836b03eb5f13a6ca7cf
[ "MIT" ]
null
null
null
scripts/list_graphs.py
knshnb/MQLib
66495e135f7bba3e84fb6836b03eb5f13a6ca7cf
[ "MIT" ]
1
2020-02-18T10:55:02.000Z
2020-02-18T10:55:02.000Z
import boto import os import sys conn = boto.connect_s3(anon=True) b = conn.get_bucket("mqlibinstances", validate=False) for key in b.list(): print key.name
16.3
53
0.736196
import boto import os import sys conn = boto.connect_s3(anon=True) b = conn.get_bucket("mqlibinstances", validate=False) for key in b.list(): print key.name
false
true
f7f6beb209251bddef33548c6ab0a8bd40b8fa12
1,261
py
Python
1D_example.py
AndrewWangJZ/pyfem
8e7df6aa69c1c761bb8ec67302847e30a83190b4
[ "MIT" ]
1
2022-03-10T17:22:53.000Z
2022-03-10T17:22:53.000Z
1D_example.py
AndrewWangJZ/pyfem
8e7df6aa69c1c761bb8ec67302847e30a83190b4
[ "MIT" ]
null
null
null
1D_example.py
AndrewWangJZ/pyfem
8e7df6aa69c1c761bb8ec67302847e30a83190b4
[ "MIT" ]
2
2022-03-10T12:47:34.000Z
2022-03-10T13:25:18.000Z
import numpy as np import scipy.integrate.quadrature as integrator """ An 1-dimensional linear problem is used to describe the FEM process reference: [1] https://www.youtube.com/watch?v=rdaZuKFK-4k """ class OneDimensionalProblem: def __init__(self): self.Nod...
30.756098
130
0.605075
import numpy as np import scipy.integrate.quadrature as integrator class OneDimensionalProblem: def __init__(self): self.NodeNum = 5 self.elementNum = 4 self.nodeCoordinate = np.linspace(0, 1, 5) self.element = [[i, i+1] for i in range(self.NodeNum-1)] self.gaussionNorm = ...
true
true
f7f6bfc9b23c7e1df4edc3c0a4c01fad3b28ea52
1,162
py
Python
appenlight_client/timing/timing_urllib3.py
atomekk/appenlight-client-python
e5fd8a39b983343f23c0aa8ceaea0892a77d38c0
[ "BSD-3-Clause" ]
22
2015-03-09T15:00:56.000Z
2018-09-27T06:57:39.000Z
appenlight_client/timing/timing_urllib3.py
atomekk/appenlight-client-python
e5fd8a39b983343f23c0aa8ceaea0892a77d38c0
[ "BSD-3-Clause" ]
31
2015-02-13T08:45:35.000Z
2019-06-22T21:56:58.000Z
appenlight_client/timing/timing_urllib3.py
atomekk/appenlight-client-python
e5fd8a39b983343f23c0aa8ceaea0892a77d38c0
[ "BSD-3-Clause" ]
17
2015-02-12T20:40:36.000Z
2020-04-22T02:43:57.000Z
from appenlight_client.utils import import_module, deco_func_or_method from appenlight_client.timing import time_trace ignore_set = frozenset(['remote', 'nosql']) def add_timing(min_duration=3): module = import_module('urllib3') if not module: return def gather_args_url(r, m, url, *args, **kwarg...
37.483871
89
0.638554
from appenlight_client.utils import import_module, deco_func_or_method from appenlight_client.timing import time_trace ignore_set = frozenset(['remote', 'nosql']) def add_timing(min_duration=3): module = import_module('urllib3') if not module: return def gather_args_url(r, m, url, *args, **kwarg...
true
true
f7f6c05baee01152e649e022449e228c4baa192a
72
py
Python
notebooks/_solutions/pandas_06_groupby_operations3.py
jonasvdd/DS-python-data-analysis
835226f562ee0b0631d70e48a17c4526ff58a538
[ "BSD-3-Clause" ]
65
2017-03-21T09:15:40.000Z
2022-02-01T23:43:08.000Z
notebooks/_solutions/pandas_06_groupby_operations3.py
jonasvdd/DS-python-data-analysis
835226f562ee0b0631d70e48a17c4526ff58a538
[ "BSD-3-Clause" ]
100
2016-12-15T03:44:06.000Z
2022-03-07T08:14:07.000Z
notebooks/_solutions/pandas_06_groupby_operations3.py
jonasvdd/DS-python-data-analysis
835226f562ee0b0631d70e48a17c4526ff58a538
[ "BSD-3-Clause" ]
52
2016-12-19T07:48:52.000Z
2022-02-19T17:53:48.000Z
df25 = df[df['Age'] < 25] df25['Survived'].sum() / len(df25['Survived'])
36
46
0.597222
df25 = df[df['Age'] < 25] df25['Survived'].sum() / len(df25['Survived'])
true
true
f7f6c0780f7b3708ec596f3795143e043ec616a6
233
py
Python
tests/conftest.py
thiagohk/bank_process
1738bfd638def0f7114a94966e260314f2d14ccd
[ "MIT" ]
null
null
null
tests/conftest.py
thiagohk/bank_process
1738bfd638def0f7114a94966e260314f2d14ccd
[ "MIT" ]
null
null
null
tests/conftest.py
thiagohk/bank_process
1738bfd638def0f7114a94966e260314f2d14ccd
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Dummy conftest.py for bank_process. If you don't know what this is for, just leave it empty. Read more about conftest.py under: https://pytest.org/latest/plugins.html """ # import pytest
21.181818
60
0.656652
true
true
f7f6c0a4c17a1bd88a9a059a831b3cb56e947e26
1,220
py
Python
python/check_docker.py
cookish/deeptile
159275b4d63286dd6ad08010a4e457ba9af9ae2d
[ "MIT" ]
null
null
null
python/check_docker.py
cookish/deeptile
159275b4d63286dd6ad08010a4e457ba9af9ae2d
[ "MIT" ]
6
2018-12-04T22:33:59.000Z
2018-12-07T23:07:35.000Z
python/check_docker.py
cookish/deeptile
159275b4d63286dd6ad08010a4e457ba9af9ae2d
[ "MIT" ]
null
null
null
import requests import numpy as np import json import include.board_utilities as board_utilities host = 'localhost' port = '8503' test_boards = np.empty(shape=1000, dtype="uint64") for i in range(1000): test_boards[i] = 0xfedcba9876543210 + i test_board_arr = board_utilities.int_to_arr(test_boards) board_utilit...
27.727273
105
0.694262
import requests import numpy as np import json import include.board_utilities as board_utilities host = 'localhost' port = '8503' test_boards = np.empty(shape=1000, dtype="uint64") for i in range(1000): test_boards[i] = 0xfedcba9876543210 + i test_board_arr = board_utilities.int_to_arr(test_boards) board_utilit...
true
true
f7f6c15c821bcbe7cf610da9b7858ffc606cd0f5
226
py
Python
tests/test_app/models/author.py
5783354/awokado
9454067f005fd8905409902fb955de664ba3d5b6
[ "MIT" ]
6
2019-02-08T16:21:24.000Z
2019-03-13T13:00:05.000Z
tests/test_app/models/author.py
5783354/awokado
9454067f005fd8905409902fb955de664ba3d5b6
[ "MIT" ]
10
2019-05-21T10:29:16.000Z
2021-05-21T12:09:49.000Z
tests/test_app/models/author.py
5783354/awokado
9454067f005fd8905409902fb955de664ba3d5b6
[ "MIT" ]
1
2020-02-26T06:47:41.000Z
2020-02-26T06:47:41.000Z
import sqlalchemy as sa from .base import Model class Author(Model): __tablename__ = "authors" id = Model.PK() first_name = sa.Column(sa.Text, nullable=False) last_name = sa.Column(sa.Text, nullable=False)
18.833333
51
0.69469
import sqlalchemy as sa from .base import Model class Author(Model): __tablename__ = "authors" id = Model.PK() first_name = sa.Column(sa.Text, nullable=False) last_name = sa.Column(sa.Text, nullable=False)
true
true
f7f6c2bf51d80214d42b4c539d82d7cd3f01bb13
134,883
py
Python
Python/Matlab.py
Spectavi/video-diff
4ad28aea48877937f6b5b25f374f9c14eaf79212
[ "BSD-3-Clause" ]
1
2021-04-18T21:24:42.000Z
2021-04-18T21:24:42.000Z
Python/Matlab.py
Spectavi/video-diff
4ad28aea48877937f6b5b25f374f9c14eaf79212
[ "BSD-3-Clause" ]
null
null
null
Python/Matlab.py
Spectavi/video-diff
4ad28aea48877937f6b5b25f374f9c14eaf79212
[ "BSD-3-Clause" ]
null
null
null
#import cv import cv2 import math import numpy as np from numpy import linalg as npla import sys import scipy.interpolate import scipy.sparse import weave import unittest import common import config def CompareMatricesWithNanElements(M1, M2): assert M1.shape == M2.shape; assert M1.ndim == 2; for r in r...
36.327229
292
0.511732
import cv2 import math import numpy as np from numpy import linalg as npla import sys import scipy.interpolate import scipy.sparse import weave import unittest import common import config def CompareMatricesWithNanElements(M1, M2): assert M1.shape == M2.shape; assert M1.ndim == 2; for r in range(M1.sh...
false
true
f7f6c322fd3a70cf309ceed53f2bfc38a4df9bef
12,369
py
Python
hassio/snapshots/__init__.py
luca-simonetti/hassio
53dab4ee450f321a60b9ae818d1bc80dbb8ee78b
[ "Apache-2.0" ]
null
null
null
hassio/snapshots/__init__.py
luca-simonetti/hassio
53dab4ee450f321a60b9ae818d1bc80dbb8ee78b
[ "Apache-2.0" ]
null
null
null
hassio/snapshots/__init__.py
luca-simonetti/hassio
53dab4ee450f321a60b9ae818d1bc80dbb8ee78b
[ "Apache-2.0" ]
null
null
null
"""Snapshot system control.""" import asyncio import logging from pathlib import Path from .snapshot import Snapshot from .utils import create_slug from ..const import ( FOLDER_HOMEASSISTANT, SNAPSHOT_FULL, SNAPSHOT_PARTIAL) from ..coresys import CoreSysAttributes from ..utils.dt import utcnow _LOGGER = logging.g...
35.239316
79
0.565608
import asyncio import logging from pathlib import Path from .snapshot import Snapshot from .utils import create_slug from ..const import ( FOLDER_HOMEASSISTANT, SNAPSHOT_FULL, SNAPSHOT_PARTIAL) from ..coresys import CoreSysAttributes from ..utils.dt import utcnow _LOGGER = logging.getLogger(__name__) class Snap...
true
true
f7f6c324bbd19d2ced992119d04f69dab735fa1c
2,794
py
Python
tests/test_functional.py
m4rc1e/fontdiffenator
1c49ead4e6e16e3aa4c227ceea8c1aa2de92f3a7
[ "Apache-2.0" ]
59
2017-10-14T11:17:44.000Z
2022-03-19T17:46:02.000Z
tests/test_functional.py
m4rc1e/fontdiffenator
1c49ead4e6e16e3aa4c227ceea8c1aa2de92f3a7
[ "Apache-2.0" ]
57
2017-10-31T03:40:40.000Z
2022-01-14T19:02:28.000Z
tests/test_functional.py
m4rc1e/fontdiffenator
1c49ead4e6e16e3aa4c227ceea8c1aa2de92f3a7
[ "Apache-2.0" ]
11
2017-10-12T18:13:36.000Z
2020-07-21T15:28:46.000Z
"""Functional tests Test will produce the following tuple of all path permutations paths = ['path/to/font_a', 'path/to/font_b'] [ (path/to/font_a, path/to/font_b), (path/to/font_b, path/to/font_a), ] This test is slow and should be run on challenging fonts. """ from diffenator import CHOICES from itertools ...
31.044444
98
0.58733
from diffenator import CHOICES from itertools import permutations import subprocess from glob import glob import os import unittest import tempfile import shutil class TestFunctionality(unittest.TestCase): def setUp(self): self._path = os.path.dirname(__file__) font_paths = glob(os.path.join(self....
true
true
f7f6c34cc7803fffa8cbb3f06f263cc3bcdc9485
989
py
Python
em_pe/models/__init__.py
markoris/EM_PE
d65811e269e4befec94429387bdef0bc76cfb8cf
[ "MIT" ]
2
2019-06-14T20:59:47.000Z
2021-06-22T14:15:59.000Z
em_pe/models/__init__.py
markoris/EM_PE
d65811e269e4befec94429387bdef0bc76cfb8cf
[ "MIT" ]
null
null
null
em_pe/models/__init__.py
markoris/EM_PE
d65811e269e4befec94429387bdef0bc76cfb8cf
[ "MIT" ]
4
2021-06-14T00:18:25.000Z
2021-11-02T20:41:42.000Z
from .interpolated_model import * from .kilonova import * from .kilonova_3c import * from .kn_interp import * from .kn_interp_angle import * from .parameters import * model_dict = { "interpolated":interpolated, "kilonova":kilonova, "kilonova_3c":kilonova_3c, "kn_interp":kn_interp, ...
26.026316
42
0.632963
from .interpolated_model import * from .kilonova import * from .kilonova_3c import * from .kn_interp import * from .kn_interp_angle import * from .parameters import * model_dict = { "interpolated":interpolated, "kilonova":kilonova, "kilonova_3c":kilonova_3c, "kn_interp":kn_interp, ...
true
true
f7f6c372646958e537fb2ce7a160783f2f418999
22,400
py
Python
napari/layers/image/image.py
shanaxel42/napari
d182b3694deb185afcf8b6ae2e87cccb78d7f82b
[ "BSD-3-Clause" ]
null
null
null
napari/layers/image/image.py
shanaxel42/napari
d182b3694deb185afcf8b6ae2e87cccb78d7f82b
[ "BSD-3-Clause" ]
1
2020-06-19T21:38:50.000Z
2020-06-20T19:57:39.000Z
napari/layers/image/image.py
shanaxel42/napari
d182b3694deb185afcf8b6ae2e87cccb78d7f82b
[ "BSD-3-Clause" ]
null
null
null
import types import warnings from base64 import b64encode from xml.etree.ElementTree import Element import numpy as np from imageio import imwrite from scipy import ndimage as ndi from ...utils.colormaps import AVAILABLE_COLORMAPS from ...utils.event import Event from ...utils.status_messages import format_float from...
35.84
79
0.588661
import types import warnings from base64 import b64encode from xml.etree.ElementTree import Element import numpy as np from imageio import imwrite from scipy import ndimage as ndi from ...utils.colormaps import AVAILABLE_COLORMAPS from ...utils.event import Event from ...utils.status_messages import format_float from...
true
true
f7f6c390b7d7bbb8fca2e648af804e8194a7f300
3,487
py
Python
setup.py
auvipy/django-vanilla-views
26cc09258bcd3d8be3f11d91b11077092f627218
[ "BSD-2-Clause" ]
null
null
null
setup.py
auvipy/django-vanilla-views
26cc09258bcd3d8be3f11d91b11077092f627218
[ "BSD-2-Clause" ]
null
null
null
setup.py
auvipy/django-vanilla-views
26cc09258bcd3d8be3f11d91b11077092f627218
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function from setuptools import setup import re import os import sys name = 'django-vanilla-views' package = 'vanilla' description = 'Beautifully simple class based views.' url = 'http://django-vanilla-views.org' author = 'Tom Christie' autho...
31.414414
171
0.65271
from __future__ import print_function from setuptools import setup import re import os import sys name = 'django-vanilla-views' package = 'vanilla' description = 'Beautifully simple class based views.' url = 'http://django-vanilla-views.org' author = 'Tom Christie' author_email = 'tom@tomchristie.com' license = 'B...
true
true
f7f6c45ae21eb8b93a278267acc1dacabe838435
415
py
Python
trove_dashboard/dashboard.py
rmyers/trove-dashboard
94089c8eeb1a5ae41a89e0955d0eabbdfcccda51
[ "Apache-2.0" ]
null
null
null
trove_dashboard/dashboard.py
rmyers/trove-dashboard
94089c8eeb1a5ae41a89e0955d0eabbdfcccda51
[ "Apache-2.0" ]
null
null
null
trove_dashboard/dashboard.py
rmyers/trove-dashboard
94089c8eeb1a5ae41a89e0955d0eabbdfcccda51
[ "Apache-2.0" ]
null
null
null
from django.utils.translation import ugettext_lazy as _ import horizon class TrovePanels(horizon.PanelGroup): slug = "database" name = _("Manage Databases") panels = ['databases', 'database_backups', 'empty'] class Dbaas(horizon.Dashboard): name = _("Databases") slug = "database" panels = [...
19.761905
55
0.696386
from django.utils.translation import ugettext_lazy as _ import horizon class TrovePanels(horizon.PanelGroup): slug = "database" name = _("Manage Databases") panels = ['databases', 'database_backups', 'empty'] class Dbaas(horizon.Dashboard): name = _("Databases") slug = "database" panels = [...
true
true
f7f6c5ad402d0c22f5b95dbf41ba373bf71eff97
8,707
py
Python
amqtt/mqtt/protocol/broker_handler.py
FlyingDiver/amqtt
09ac98d39a711dcff0d8f22686916e1c2495144b
[ "MIT" ]
null
null
null
amqtt/mqtt/protocol/broker_handler.py
FlyingDiver/amqtt
09ac98d39a711dcff0d8f22686916e1c2495144b
[ "MIT" ]
null
null
null
amqtt/mqtt/protocol/broker_handler.py
FlyingDiver/amqtt
09ac98d39a711dcff0d8f22686916e1c2495144b
[ "MIT" ]
null
null
null
# Copyright (c) 2015 Nicolas JOUANIN # # See the file license.txt for copying permission. from asyncio import futures, Queue from amqtt.mqtt.protocol.handler import ProtocolHandler from amqtt.mqtt.connack import ( CONNECTION_ACCEPTED, UNACCEPTABLE_PROTOCOL_VERSION, IDENTIFIER_REJECTED, BAD_USERNAME_PASS...
41.265403
118
0.676238
from asyncio import futures, Queue from amqtt.mqtt.protocol.handler import ProtocolHandler from amqtt.mqtt.connack import ( CONNECTION_ACCEPTED, UNACCEPTABLE_PROTOCOL_VERSION, IDENTIFIER_REJECTED, BAD_USERNAME_PASSWORD, NOT_AUTHORIZED, ConnackPacket, ) from amqtt.mqtt.connect import ConnectPa...
true
true
f7f6c5cf445890674eedaeff97274259e6b8b73a
3,991
py
Python
.history/my_classes/FirstClassFunctions/reducing_functions_20210707183124.py
minefarmer/deep-Dive-1
b0675b853180c5b5781888266ea63a3793b8d855
[ "Unlicense" ]
null
null
null
.history/my_classes/FirstClassFunctions/reducing_functions_20210707183124.py
minefarmer/deep-Dive-1
b0675b853180c5b5781888266ea63a3793b8d855
[ "Unlicense" ]
null
null
null
.history/my_classes/FirstClassFunctions/reducing_functions_20210707183124.py
minefarmer/deep-Dive-1
b0675b853180c5b5781888266ea63a3793b8d855
[ "Unlicense" ]
null
null
null
"""Reducing Functions in Python These are functions that recombine an iterable recursively, ending up with a single return value Also called accumulators, aggregators, or folding functions Example: Finding the maximum value in an iterable a0, a1, a2, ...,, aN-1 max(a, b) _> maximum of a and b result =a0 r...
25.748387
105
0.482085
"""Reducing Functions in Python These are functions that recombine an iterable recursively, ending up with a single return value Also called accumulators, aggregators, or folding functions Example: Finding the maximum value in an iterable a0, a1, a2, ...,, aN-1 max(a, b) _> maximum of a and b result =a0 r...
false
true
f7f6c6a331bc7bd58aa72b2e88dde06462ff7a26
94
py
Python
petisco/__init__.py
jlamoso/petisco
bd71d28a5c0ba6ea789fa7c1529e7a2d108da53f
[ "MIT" ]
null
null
null
petisco/__init__.py
jlamoso/petisco
bd71d28a5c0ba6ea789fa7c1529e7a2d108da53f
[ "MIT" ]
null
null
null
petisco/__init__.py
jlamoso/petisco
bd71d28a5c0ba6ea789fa7c1529e7a2d108da53f
[ "MIT" ]
null
null
null
from petisco.public_api import * from petisco import public_api __all__ = public_api.__all__
18.8
32
0.829787
from petisco.public_api import * from petisco import public_api __all__ = public_api.__all__
true
true
f7f6c8a904e43536e57b6317a1ee0247677d3e6c
2,033
py
Python
Unidad_6/informe_funciones.py
bloisejuli/curso_python_UNSAM
cfb6e6a8368ce239b5ff0ba0236dbf8c79772374
[ "MIT" ]
null
null
null
Unidad_6/informe_funciones.py
bloisejuli/curso_python_UNSAM
cfb6e6a8368ce239b5ff0ba0236dbf8c79772374
[ "MIT" ]
null
null
null
Unidad_6/informe_funciones.py
bloisejuli/curso_python_UNSAM
cfb6e6a8368ce239b5ff0ba0236dbf8c79772374
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Sep 13 11:30:06 2021 @author: bloisejuli """ # informe_funciones #%% # Ejercicio 6.11: # Modificá este programa informe_funciones.py del Ejercicio 6.5 de modo que todo el procesamiento de archivos de entrada de datos se # haga usando funciones del m...
29.897059
133
0.681751
import fileparse def hacer_informe(camion, precios): lista = [] diccionario_precios = dict(precios) for lote in camion: precio_venta = diccionario_precios[lote['nombre']] cambio = precio_venta - lote['precio'] t = (lote['nombre'], lote['cajones'], precio_venta, cambio) ...
true
true
f7f6c92aa86566efa77bdcc908152fdc1e659e38
4,202
py
Python
_build/jupyter_execute/Score_LendingClub.py
Strabes/h2o-prod
2bfd4c87302c2ca3219b0bc313f13c9e787d84ad
[ "MIT" ]
null
null
null
_build/jupyter_execute/Score_LendingClub.py
Strabes/h2o-prod
2bfd4c87302c2ca3219b0bc313f13c9e787d84ad
[ "MIT" ]
null
null
null
_build/jupyter_execute/Score_LendingClub.py
Strabes/h2o-prod
2bfd4c87302c2ca3219b0bc313f13c9e787d84ad
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # # MOJO Scoring: Two Approaches # # Now we will use the model we built on the Lending Club data to score the test cases we pickled. To mimick the scoring performance we would experience if the model were implemented in a real-time environment, we will score the records one at a ...
25.779141
543
0.730604
o approaches will show that the second approach is far faster than the first approach. On my machine, the first approach takes more than 300 *milliseconds* per record whereas the second approach takes less than 100 *microseconds* per record. For many real-time production applications, the difference between the seco...
true
true
f7f6c989ff519dba14d2c18b438ca455be92fccb
2,584
py
Python
rssynergia/base_diagnostics/write_bunch.py
radiasoft/rs_synergia
b43509de7f4a938354dc127762d8e723463e0e95
[ "Apache-2.0" ]
null
null
null
rssynergia/base_diagnostics/write_bunch.py
radiasoft/rs_synergia
b43509de7f4a938354dc127762d8e723463e0e95
[ "Apache-2.0" ]
null
null
null
rssynergia/base_diagnostics/write_bunch.py
radiasoft/rs_synergia
b43509de7f4a938354dc127762d8e723463e0e95
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """? :copyright: Copyright (c) 2020 RadiaSoft LLC. All Rights Reserved. :license: http://www.apache.org/licenses/LICENSE-2.0.html """ from __future__ import absolute_import, division, print_function import synergia import numpy as np import h5py def write_bunch(bunch, file_name = 'particles....
35.39726
124
0.684598
from __future__ import absolute_import, division, print_function import synergia import numpy as np import h5py def write_bunch(bunch, file_name = 'particles.h5' , reference_particle = None, txt = False): particles = bunch.get_local_particles() num_particles = particles.shape[0] if reference_...
true
true
f7f6c98e0c53caad5004c87b6ef0eb722f38a59a
257,660
py
Python
instances/passenger_demand/pas-20210422-1717-int12e/38.py
LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure
bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11
[ "BSD-3-Clause" ]
null
null
null
instances/passenger_demand/pas-20210422-1717-int12e/38.py
LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure
bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11
[ "BSD-3-Clause" ]
null
null
null
instances/passenger_demand/pas-20210422-1717-int12e/38.py
LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure
bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11
[ "BSD-3-Clause" ]
null
null
null
""" PASSENGERS """ numPassengers = 22850 passenger_arriving = ( (6, 7, 10, 5, 3, 2, 1, 1, 4, 1, 1, 0, 0, 4, 6, 6, 2, 4, 0, 3, 0, 1, 2, 0, 0, 0), # 0 (8, 8, 6, 3, 2, 2, 2, 4, 3, 0, 0, 1, 0, 9, 8, 7, 1, 1, 5, 3, 0, 2, 2, 2, 1, 0), # 1 (8, 8, 12, 3, 3, 2, 1, 1, 0, 1, 2, 0, 0, 5, 7, 2, 2, 8, 3, 3, 2, 2, 0, 1, 0, 0)...
275.572193
493
0.768982
numPassengers = 22850 passenger_arriving = ( (6, 7, 10, 5, 3, 2, 1, 1, 4, 1, 1, 0, 0, 4, 6, 6, 2, 4, 0, 3, 0, 1, 2, 0, 0, 0), (8, 8, 6, 3, 2, 2, 2, 4, 3, 0, 0, 1, 0, 9, 8, 7, 1, 1, 5, 3, 0, 2, 2, 2, 1, 0), (8, 8, 12, 3, 3, 2, 1, 1, 0, 1, 2, 0, 0, 5, 7, 2, 2, 8, 3, 3, 2, 2, 0, 1, 0, 0), (6, 4, 4, 9, 4, 3, 0, 1...
true
true
f7f6ca3d940008955346754a5a0651e2c5a556da
446
py
Python
project/Support/Code/Sheets/for_project.py
fael07/Django-Helper
bcc9de58f0453452b017b2e219130fbf5a3d48d7
[ "MIT" ]
null
null
null
project/Support/Code/Sheets/for_project.py
fael07/Django-Helper
bcc9de58f0453452b017b2e219130fbf5a3d48d7
[ "MIT" ]
null
null
null
project/Support/Code/Sheets/for_project.py
fael07/Django-Helper
bcc9de58f0453452b017b2e219130fbf5a3d48d7
[ "MIT" ]
null
null
null
from models.eraser import * from models.project import * from models.editor import Editor from time import sleep bp = r'C:\Users\G-fire\OneDrive\Documentos\Django\TESTE\project' # base_path project_name = 'TESTAGEM' project = DjangoProject(bp, project_name) #* APÓS CRIAÇÃO # delete_comments_by_folder(bp, project_nam...
24.777778
76
0.775785
from models.eraser import * from models.project import * from models.editor import Editor from time import sleep bp = r'C:\Users\G-fire\OneDrive\Documentos\Django\TESTE\project' project_name = 'TESTAGEM' project = DjangoProject(bp, project_name)
true
true
f7f6ca8c00e797acf12df6f0b376bddf69c35cdb
158
py
Python
encuestas/apps.py
jjmartinr01/gauss3
1c71c44430e0f15fb2f3f83d32ad66bb1b7e3e94
[ "MIT" ]
null
null
null
encuestas/apps.py
jjmartinr01/gauss3
1c71c44430e0f15fb2f3f83d32ad66bb1b7e3e94
[ "MIT" ]
null
null
null
encuestas/apps.py
jjmartinr01/gauss3
1c71c44430e0f15fb2f3f83d32ad66bb1b7e3e94
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.apps import AppConfig class EncuestasConfig(AppConfig): name = 'encuestas'
17.555556
39
0.740506
from __future__ import unicode_literals from django.apps import AppConfig class EncuestasConfig(AppConfig): name = 'encuestas'
true
true
f7f6cae6323a7b5de6bd3040ce4efd5c06b261f8
432
py
Python
day_25/day_25.py
GuillaumeGandon/advent-of-code-2015
ff4201a9a27d1ca7f687a613eeec72dd12fe1487
[ "MIT" ]
null
null
null
day_25/day_25.py
GuillaumeGandon/advent-of-code-2015
ff4201a9a27d1ca7f687a613eeec72dd12fe1487
[ "MIT" ]
null
null
null
day_25/day_25.py
GuillaumeGandon/advent-of-code-2015
ff4201a9a27d1ca7f687a613eeec72dd12fe1487
[ "MIT" ]
null
null
null
import re FIRST_CODE = 20151125 MULTIPLIER = 252533 DIVIDER = 33554393 targeted_row, targeted_col = map(int, re.findall(r'\d+', open('input').read())) row, col = 1, 1 tmp = FIRST_CODE while 1: if row == 1: row, col = col + 1, 1 else: row -= 1 col += 1 tmp = tmp * MULTIPLIER % DIV...
19.636364
79
0.583333
import re FIRST_CODE = 20151125 MULTIPLIER = 252533 DIVIDER = 33554393 targeted_row, targeted_col = map(int, re.findall(r'\d+', open('input').read())) row, col = 1, 1 tmp = FIRST_CODE while 1: if row == 1: row, col = col + 1, 1 else: row -= 1 col += 1 tmp = tmp * MULTIPLIER % DIV...
true
true
f7f6cbc40c5863876a5cae50579ed294c83da538
45,079
py
Python
cogs/reportsupport.py
GabrielFS1/sloth-bot
1e606f1f3a998ee94a0c83ac343eac3a420a085c
[ "MIT" ]
null
null
null
cogs/reportsupport.py
GabrielFS1/sloth-bot
1e606f1f3a998ee94a0c83ac343eac3a420a085c
[ "MIT" ]
null
null
null
cogs/reportsupport.py
GabrielFS1/sloth-bot
1e606f1f3a998ee94a0c83ac343eac3a420a085c
[ "MIT" ]
1
2021-05-28T21:34:42.000Z
2021-05-28T21:34:42.000Z
import discord from discord import member from discord.ext import commands from mysqldb import * import asyncio from extra.useful_variables import list_of_commands from extra.prompt.menu import Confirm from extra.view import ReportSupportView from typing import List, Dict, Optional import os case_cat_id = int(os.geten...
44.899402
465
0.629473
import discord from discord import member from discord.ext import commands from mysqldb import * import asyncio from extra.useful_variables import list_of_commands from extra.prompt.menu import Confirm from extra.view import ReportSupportView from typing import List, Dict, Optional import os case_cat_id = int(os.geten...
true
true
f7f6cc4c4d028ea869bdd4efeda508d0bb804297
3,037
py
Python
rasa/nlu/utils/hugging_face/registry.py
tienhoang1994/rasa
a977a8f1fb2308bebe7becd2c024765528296bd6
[ "Apache-2.0" ]
3,603
2017-05-21T18:34:55.000Z
2019-04-16T11:58:09.000Z
rasa/nlu/utils/hugging_face/registry.py
tienhoang1994/rasa
a977a8f1fb2308bebe7becd2c024765528296bd6
[ "Apache-2.0" ]
2,782
2017-05-21T20:36:15.000Z
2019-04-16T14:35:20.000Z
rasa/nlu/utils/hugging_face/registry.py
tienhoang1994/rasa
a977a8f1fb2308bebe7becd2c024765528296bd6
[ "Apache-2.0" ]
1,337
2017-05-21T18:10:33.000Z
2019-04-16T09:14:42.000Z
import logging from typing import Dict, Text, Type # Explicitly set logging level for this module before any import # because otherwise it logs tensorflow/pytorch versions logging.getLogger("transformers.file_utils").setLevel(logging.WARNING) from transformers import ( # noqa: F401, E402 TFPreTrainedModel, T...
30.37
100
0.731643
import logging from typing import Dict, Text, Type logging.getLogger("transformers.file_utils").setLevel(logging.WARNING) from transformers import ( TFPreTrainedModel, TFBertModel, TFOpenAIGPTModel, TFGPT2Model, TFXLNetModel, TFDistilBertModel, TFRobertaModel, PreTrainedTokeni...
true
true
f7f6cc6e8791eb239b3360a4cd1522a216954415
891
bzl
Python
google/cloud/storage/benchmarks/storage_benchmarks_unit_tests.bzl
utgarda/google-cloud-cpp
c4fd446d2c9e1428bcec10917f269f8e5c0a8bc0
[ "Apache-2.0" ]
1
2020-10-30T09:05:17.000Z
2020-10-30T09:05:17.000Z
google/cloud/storage/benchmarks/storage_benchmarks_unit_tests.bzl
utgarda/google-cloud-cpp
c4fd446d2c9e1428bcec10917f269f8e5c0a8bc0
[ "Apache-2.0" ]
2
2020-10-06T15:50:06.000Z
2020-11-24T16:21:28.000Z
google/cloud/storage/benchmarks/storage_benchmarks_unit_tests.bzl
utgarda/google-cloud-cpp
c4fd446d2c9e1428bcec10917f269f8e5c0a8bc0
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
35.64
79
0.751964
storage_benchmarks_unit_tests = [ "benchmark_make_random_test.cc", "benchmark_parser_test.cc", "throughput_options_test.cc", "throughput_result_test.cc", ]
true
true
f7f6cca04cfde110b554b151101dcbf51385de3d
1,595
py
Python
environment/fake_gym/fake_gym.py
id9502/RLFrame
a6fe99c6578e74f74767720b9212365e10f0cefd
[ "MIT" ]
8
2020-02-09T03:33:50.000Z
2022-01-05T06:35:28.000Z
environment/fake_gym/fake_gym.py
id9502/RLFrame
a6fe99c6578e74f74767720b9212365e10f0cefd
[ "MIT" ]
null
null
null
environment/fake_gym/fake_gym.py
id9502/RLFrame
a6fe99c6578e74f74767720b9212365e10f0cefd
[ "MIT" ]
2
2020-02-10T03:21:31.000Z
2020-03-22T15:40:37.000Z
import gym from core.common.types import StepDict from core.environment.environment import Environment class FakeGymEnv(Environment): def __init__(self, task_name: str): super(FakeGymEnv, self).__init__(task_name) self._render = False self._env = gym.make(task_name) self._info["a...
33.229167
70
0.616301
import gym from core.common.types import StepDict from core.environment.environment import Environment class FakeGymEnv(Environment): def __init__(self, task_name: str): super(FakeGymEnv, self).__init__(task_name) self._render = False self._env = gym.make(task_name) self._info["a...
true
true
f7f6ceda5d7240a774e782f3a92e9b21c1cb00bf
4,468
py
Python
v3/GetReleasePackage.py
Onevizion/api-samples
24a43d12f1a5be9f51f35cdd3b644a867d77419f
[ "MIT" ]
null
null
null
v3/GetReleasePackage.py
Onevizion/api-samples
24a43d12f1a5be9f51f35cdd3b644a867d77419f
[ "MIT" ]
null
null
null
v3/GetReleasePackage.py
Onevizion/api-samples
24a43d12f1a5be9f51f35cdd3b644a867d77419f
[ "MIT" ]
null
null
null
#!/usr/bin/env python import pysftp import onevizion import json import os import operator from collections import OrderedDict # Handle command arguments import argparse Description="""Compiles a complete upgrade package for getting a OneVizion system from a given current version to a desired New version. It does so...
31.027778
238
0.760967
import pysftp import onevizion import json import os import operator from collections import OrderedDict import argparse Description="""Compiles a complete upgrade package for getting a OneVizion system from a given current version to a desired New version. It does so by using the OneVizion Releases SFTP site give...
true
true
f7f6cef86a6f4bc309971d1eace5ce21af7ea457
18,342
py
Python
ftp_server.py
g04630910/pythonftpserver
9771cd9b6ed8a8c3b0f56eee4758debb82dea958
[ "Apache-2.0" ]
3
2020-07-17T09:37:50.000Z
2020-07-18T11:23:24.000Z
ftp_server.py
g04630910/pythonftpserver
9771cd9b6ed8a8c3b0f56eee4758debb82dea958
[ "Apache-2.0" ]
null
null
null
ftp_server.py
g04630910/pythonftpserver
9771cd9b6ed8a8c3b0f56eee4758debb82dea958
[ "Apache-2.0" ]
2
2020-07-18T00:17:22.000Z
2020-07-18T04:55:45.000Z
#-*-coding:utf-8-*- import socket, threading, os, sys, time, datetime import hashlib, platform, stat from os.path import join, getsize listen_ip = "0.0.0.0" listen_port = 21 conn_list = [] root_dir = "C://Autodesk" if sys.version_info < (3, 0): root_dir = root_dir.decode('utf-8').encode('gb2312')#目录 windows目...
34.156425
107
0.522735
import socket, threading, os, sys, time, datetime import hashlib, platform, stat from os.path import join, getsize listen_ip = "0.0.0.0" listen_port = 21 conn_list = [] root_dir = "C://Autodesk" if sys.version_info < (3, 0): root_dir = root_dir.decode('utf-8').encode('gb2312') = 500 conn_timeout = 120 ...
true
true
f7f6cf472459aa536ed7e9c4a984ef860a11181b
888
py
Python
django_quote_service/users/tests/test_urls.py
andrlik/django_quote_service
c114537789523db88fe68f75f4de8c29b2b90bd9
[ "BSD-3-Clause" ]
1
2022-02-13T02:25:23.000Z
2022-02-13T02:25:23.000Z
django_quote_service/users/tests/test_urls.py
andrlik/django_quote_service
c114537789523db88fe68f75f4de8c29b2b90bd9
[ "BSD-3-Clause" ]
38
2022-02-09T22:37:46.000Z
2022-03-28T15:28:05.000Z
django_quote_service/users/tests/test_urls.py
andrlik/django_quote_service
c114537789523db88fe68f75f4de8c29b2b90bd9
[ "BSD-3-Clause" ]
null
null
null
import pytest from django.urls import resolve, reverse pytestmark = pytest.mark.django_db def test_detail(user, client): assert ( reverse("users:detail", kwargs={"username": user.username}) == f"/users/{user.username}/" ) assert resolve(f"/users/{user.username}/").view_name == "users:deta...
30.62069
79
0.673423
import pytest from django.urls import resolve, reverse pytestmark = pytest.mark.django_db def test_detail(user, client): assert ( reverse("users:detail", kwargs={"username": user.username}) == f"/users/{user.username}/" ) assert resolve(f"/users/{user.username}/").view_name == "users:deta...
true
true
f7f6d2eac0f1fd225391459eed084fb49ff92141
1,785
py
Python
profiles_api/migrations/0001_initial.py
preacher2041/mythmaker-api
cb7025ac6f171b48457655e7087731142ecc5ab9
[ "MIT" ]
null
null
null
profiles_api/migrations/0001_initial.py
preacher2041/mythmaker-api
cb7025ac6f171b48457655e7087731142ecc5ab9
[ "MIT" ]
null
null
null
profiles_api/migrations/0001_initial.py
preacher2041/mythmaker-api
cb7025ac6f171b48457655e7087731142ecc5ab9
[ "MIT" ]
null
null
null
# Generated by Django 2.2 on 2022-03-14 10:59 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0011_update_proxy_permissions'), ] operations = [ migrations.CreateModel( name='UserProfile', ...
51
266
0.637535
from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0011_update_proxy_permissions'), ] operations = [ migrations.CreateModel( name='UserProfile', fields=[ ('id', models.Au...
true
true
f7f6d37b92d625b023b0779d675637286e39833e
345
py
Python
flask/app/utils.py
sreejeet/ams-api
c8df3a550734fcf5796197dc2016630e7f218754
[ "MIT" ]
3
2019-06-08T07:13:03.000Z
2019-06-09T08:02:52.000Z
flask/app/utils.py
sreejeet/ams-api
c8df3a550734fcf5796197dc2016630e7f218754
[ "MIT" ]
null
null
null
flask/app/utils.py
sreejeet/ams-api
c8df3a550734fcf5796197dc2016630e7f218754
[ "MIT" ]
null
null
null
import re import datetime def convertToDate(date:str): return datetime.datetime.strptime(date, '%Y-%m-%d') def convertFromDate(date:datetime.date): return date.strftime('%Y-%m-%d') def checkBatch(batch:str): if re.match('\d\d\d\d[-]\d\d\d\d',batch): return batch raise ValueError('Invalid batc...
26.538462
59
0.681159
import re import datetime def convertToDate(date:str): return datetime.datetime.strptime(date, '%Y-%m-%d') def convertFromDate(date:datetime.date): return date.strftime('%Y-%m-%d') def checkBatch(batch:str): if re.match('\d\d\d\d[-]\d\d\d\d',batch): return batch raise ValueError('Invalid batc...
true
true
f7f6d42a446f9f5dcac9e420e7d213d987dd69c2
807
py
Python
tests/core.py
myusuf3/octogit
4eebd844e44c4b8da3f49bac0e70fc12375c2f94
[ "MIT" ]
41
2015-02-17T22:48:59.000Z
2021-10-17T14:15:29.000Z
tests/core.py
myusuf3/octogit
4eebd844e44c4b8da3f49bac0e70fc12375c2f94
[ "MIT" ]
7
2017-03-02T09:02:21.000Z
2018-10-24T18:59:03.000Z
tests/core.py
myusuf3/octogit
4eebd844e44c4b8da3f49bac0e70fc12375c2f94
[ "MIT" ]
9
2015-06-09T17:00:15.000Z
2018-10-03T04:38:16.000Z
""" This file demonstrates writing tests using the unittest module. These will pass when you run "manage.py test". Replace this with more appropriate tests for your application. """ import unittest from octogit.core import get_single_issue class UTF8Support(unittest.TestCase): def assertNotRaises(self, exceptio...
26.9
79
0.664188
import unittest from octogit.core import get_single_issue class UTF8Support(unittest.TestCase): def assertNotRaises(self, exception_type, called_func, kwargs): try: called_func(**kwargs) except Exception as e: if isinstance(e, exception_type): self.fail(e) ...
true
true
f7f6d457253fd2e89e3664981e2246817a4f2804
5,467
py
Python
squidpy/im/_process.py
marcovarrone/squidpy
fb68a913db0e0daaabeab69df308461ecaba1268
[ "BSD-3-Clause" ]
1
2021-07-27T07:01:00.000Z
2021-07-27T07:01:00.000Z
squidpy/im/_process.py
marcovarrone/squidpy
fb68a913db0e0daaabeab69df308461ecaba1268
[ "BSD-3-Clause" ]
null
null
null
squidpy/im/_process.py
marcovarrone/squidpy
fb68a913db0e0daaabeab69df308461ecaba1268
[ "BSD-3-Clause" ]
null
null
null
from types import MappingProxyType from typing import Any, Union, Mapping, Callable, Optional, Sequence from scanpy import logging as logg from dask import delayed from scipy.ndimage.filters import gaussian_filter as scipy_gf import numpy as np import dask.array as da from skimage.color import rgb2gray from skimage....
34.821656
115
0.645875
from types import MappingProxyType from typing import Any, Union, Mapping, Callable, Optional, Sequence from scanpy import logging as logg from dask import delayed from scipy.ndimage.filters import gaussian_filter as scipy_gf import numpy as np import dask.array as da from skimage.color import rgb2gray from skimage....
true
true
f7f6d55b30743e7f725f4ec15b9157b07eb682ad
2,812
py
Python
knoepfe/key.py
lnqs/knoepfe
0136775e23536e95d49efc5a21806f83a490c45f
[ "Apache-2.0" ]
null
null
null
knoepfe/key.py
lnqs/knoepfe
0136775e23536e95d49efc5a21806f83a490c45f
[ "Apache-2.0" ]
null
null
null
knoepfe/key.py
lnqs/knoepfe
0136775e23536e95d49efc5a21806f83a490c45f
[ "Apache-2.0" ]
null
null
null
from contextlib import contextmanager from pathlib import Path from typing import Iterator, Literal, Tuple from PIL import Image, ImageDraw, ImageFont from PIL.ImageFont import FreeTypeFont from StreamDeck.Devices import StreamDeck from StreamDeck.ImageHelpers import PILHelper Align = Literal["left", "center", "right...
30.565217
88
0.598862
from contextlib import contextmanager from pathlib import Path from typing import Iterator, Literal, Tuple from PIL import Image, ImageDraw, ImageFont from PIL.ImageFont import FreeTypeFont from StreamDeck.Devices import StreamDeck from StreamDeck.ImageHelpers import PILHelper Align = Literal["left", "center", "right...
true
true
f7f6d5e3d840a89de5a37387e28c31f1b32c67db
2,575
py
Python
var/spack/repos/builtin/packages/mrcpp/package.py
MiddelkoopT/spack
4d94c4c4600f42a7a3bb3d06ec879140bc259304
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
9
2018-04-18T07:51:40.000Z
2021-09-10T03:56:57.000Z
var/spack/repos/builtin/packages/mrcpp/package.py
abouteiller/spack
95f54195021d3d32dec75bed6d8dbbaeac3d921f
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
907
2018-04-18T11:17:57.000Z
2022-03-31T13:20:25.000Z
var/spack/repos/builtin/packages/mrcpp/package.py
abouteiller/spack
95f54195021d3d32dec75bed6d8dbbaeac3d921f
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
29
2018-11-05T16:14:23.000Z
2022-02-03T16:07:09.000Z
# Copyright 2013-2020 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 Mrcpp(CMakePackage): """The MultiResolution Computation Program Package (MRCPP) is a gener...
42.213115
86
0.699417
from spack import * class Mrcpp(CMakePackage): homepage = "https://mrcpp.readthedocs.io/en/latest/" url = "https://github.com/MRChemSoft/mrcpp/archive/v1.3.6.tar.gz" maintainers = ["robertodr", "stigrj", "ilfreddy"] version('1.3.6', sha256='2502e71f086a8bb5ea635d0c6b86e7ff60220a455...
true
true
f7f6d61310e547d67f40fd655c0777975ed2e29c
366
py
Python
admin_offices/migrations/0004_remove_adminoffice_job_title.py
SteveWaweru/mfl_api
695001fb48cb1b15661cd480831ae33fe6374532
[ "MIT" ]
null
null
null
admin_offices/migrations/0004_remove_adminoffice_job_title.py
SteveWaweru/mfl_api
695001fb48cb1b15661cd480831ae33fe6374532
[ "MIT" ]
null
null
null
admin_offices/migrations/0004_remove_adminoffice_job_title.py
SteveWaweru/mfl_api
695001fb48cb1b15661cd480831ae33fe6374532
[ "MIT" ]
4
2017-09-04T09:04:35.000Z
2022-02-14T23:59:28.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('admin_offices', '0003_auto_20160520_0757'), ] operations = [ migrations.RemoveField( model_name='adminoffice', ...
19.263158
53
0.617486
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('admin_offices', '0003_auto_20160520_0757'), ] operations = [ migrations.RemoveField( model_name='adminoffice', name='job_ti...
true
true
f7f6d634755557a9833d700e4688d2d70a838e34
6,259
py
Python
evmscript_parser/core/ABI/provider.py
DmitIv/EVMScriptParser
2a565cffb9cd890b9ded1978727364270150a72a
[ "MIT" ]
null
null
null
evmscript_parser/core/ABI/provider.py
DmitIv/EVMScriptParser
2a565cffb9cd890b9ded1978727364270150a72a
[ "MIT" ]
null
null
null
evmscript_parser/core/ABI/provider.py
DmitIv/EVMScriptParser
2a565cffb9cd890b9ded1978727364270150a72a
[ "MIT" ]
null
null
null
""" Base class for ABI hierarchy. """ import logging from abc import ABC, abstractmethod from typing import Tuple from evmscript_parser.core.exceptions import ( ABILocalFileNotExisted, ABIEtherscanNetworkError, ABIEtherscanStatusCode ) from .storage import ( ABIKey, ABI, CachedStorage ) from .utilities.eth...
29.663507
78
0.598019
import logging from abc import ABC, abstractmethod from typing import Tuple from evmscript_parser.core.exceptions import ( ABILocalFileNotExisted, ABIEtherscanNetworkError, ABIEtherscanStatusCode ) from .storage import ( ABIKey, ABI, CachedStorage ) from .utilities.etherscan import ( get_abi, get_imple...
true
true
f7f6d63bbef3de8049e7d0b06f2f285a54ea9b5a
17,590
py
Python
venv/lib/python3.6/site-packages/sqlalchemy/testing/assertions.py
aitoehigie/britecore_flask
eef1873dbe6b2cc21f770bc6dec783007ae4493b
[ "MIT" ]
null
null
null
venv/lib/python3.6/site-packages/sqlalchemy/testing/assertions.py
aitoehigie/britecore_flask
eef1873dbe6b2cc21f770bc6dec783007ae4493b
[ "MIT" ]
1
2021-06-01T23:32:38.000Z
2021-06-01T23:32:38.000Z
venv/lib/python3.6/site-packages/sqlalchemy/testing/assertions.py
aitoehigie/britecore_flask
eef1873dbe6b2cc21f770bc6dec783007ae4493b
[ "MIT" ]
null
null
null
# testing/assertions.py # Copyright (C) 2005-2018 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php from __future__ import absolute_import from . import util as testutil from sq...
31.808318
86
0.599147
from __future__ import absolute_import from . import util as testutil from sqlalchemy import pool, orm, util from sqlalchemy.engine import default, url from sqlalchemy.util import decorator, compat from sqlalchemy import types as sqltypes, schema, exc as sa_exc import warnings import re from .exclusions import ...
true
true
f7f6d6a17f7bb8d45a8f9163f3ce1655635202fd
3,076
py
Python
mototour/mototour/settings.py
andersonnrc/desafio-oncase
d92873b15636ef6c73330480d41e29e2d94afe2c
[ "MIT" ]
null
null
null
mototour/mototour/settings.py
andersonnrc/desafio-oncase
d92873b15636ef6c73330480d41e29e2d94afe2c
[ "MIT" ]
null
null
null
mototour/mototour/settings.py
andersonnrc/desafio-oncase
d92873b15636ef6c73330480d41e29e2d94afe2c
[ "MIT" ]
null
null
null
# Scrapy settings for mototour project # # For simplicity, this file contains only settings considered important or # commonly used. You can find more settings consulting the documentation: # # https://docs.scrapy.org/en/latest/topics/settings.html # https://docs.scrapy.org/en/latest/topics/downloader-middlewar...
34.561798
103
0.778609
BOT_NAME = 'mototour' SPIDER_MODULES = ['mototour.spiders'] NEWSPIDER_MODULE = 'mototour.spiders' ROBOTSTXT_OBEY = True ITEM_PIPELINES = { 'mototour.pipelines.MototourPipeline': 300, }
true
true
f7f6d7309de07b524ec57805dc8338422f8d65c1
538
py
Python
DS&Algo Programs in Python/vowelcounter.py
prathimacode-hub/HacktoberFest-2020
c18bbb42a5e78f6a7dbfc15fbafd127e738f53f7
[ "MIT" ]
386
2020-05-08T16:05:16.000Z
2021-10-05T17:39:14.000Z
DS&Algo Programs in Python/vowelcounter.py
prathimacode-hub/HacktoberFest-2020
c18bbb42a5e78f6a7dbfc15fbafd127e738f53f7
[ "MIT" ]
830
2020-08-31T17:16:45.000Z
2021-10-06T14:14:23.000Z
DS&Algo Programs in Python/vowelcounter.py
prathimacode-hub/HacktoberFest-2020
c18bbb42a5e78f6a7dbfc15fbafd127e738f53f7
[ "MIT" ]
923
2020-05-29T15:04:29.000Z
2021-10-06T15:18:01.000Z
def countVowels(S): total_size = len(S) vowels = 0 for char in S: if char in 'aeiouAEIOU': vowels = vowels + 1 consonants = total_size - vowels if vowels > consonants: print('There are more vowels than consonants in the string ' + S) elif vowels == consonants: ...
26.9
73
0.626394
def countVowels(S): total_size = len(S) vowels = 0 for char in S: if char in 'aeiouAEIOU': vowels = vowels + 1 consonants = total_size - vowels if vowels > consonants: print('There are more vowels than consonants in the string ' + S) elif vowels == consonants: ...
true
true
f7f6d7d1fffc8c378a542755772e1b0be9fae9ab
23,104
py
Python
python_modules/dagster/dagster/core/execution/results.py
asamoal/dagster
08fad28e4b608608ce090ce2e8a52c2cf9dd1b64
[ "Apache-2.0" ]
null
null
null
python_modules/dagster/dagster/core/execution/results.py
asamoal/dagster
08fad28e4b608608ce090ce2e8a52c2cf9dd1b64
[ "Apache-2.0" ]
null
null
null
python_modules/dagster/dagster/core/execution/results.py
asamoal/dagster
08fad28e4b608608ce090ce2e8a52c2cf9dd1b64
[ "Apache-2.0" ]
null
null
null
from collections import defaultdict import dagster._check as check from dagster.core.definitions import GraphDefinition, Node, NodeHandle, PipelineDefinition from dagster.core.definitions.utils import DEFAULT_OUTPUT from dagster.core.errors import DagsterInvariantViolationError from dagster.core.events import DagsterE...
39.426621
101
0.639673
from collections import defaultdict import dagster._check as check from dagster.core.definitions import GraphDefinition, Node, NodeHandle, PipelineDefinition from dagster.core.definitions.utils import DEFAULT_OUTPUT from dagster.core.errors import DagsterInvariantViolationError from dagster.core.events import DagsterE...
true
true
f7f6d8e7fd959f789b5934802eca42d7c19b3bc8
716
py
Python
guitarfan/__init__.py
timgates42/GuitarFan
1a6d6bcc7708cbb214648e7f5657728f6c27c48a
[ "MIT" ]
48
2015-02-02T02:25:07.000Z
2022-03-11T12:39:39.000Z
guitarfan/__init__.py
timgates42/GuitarFan
1a6d6bcc7708cbb214648e7f5657728f6c27c48a
[ "MIT" ]
2
2015-09-13T14:00:41.000Z
2021-08-04T16:28:25.000Z
guitarfan/__init__.py
timgates42/GuitarFan
1a6d6bcc7708cbb214648e7f5657728f6c27c48a
[ "MIT" ]
16
2015-01-09T08:15:13.000Z
2020-06-20T11:07:49.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- from flask import Flask def create_app(config): # init Flask application object app = Flask(__name__) app.config.from_object(config) # init flask-login from guitarfan.extensions.flasklogin import login_manager login_manager.init_app(app) # in...
24.689655
87
0.72067
from flask import Flask def create_app(config): app = Flask(__name__) app.config.from_object(config) from guitarfan.extensions.flasklogin import login_manager login_manager.init_app(app) from guitarfan.extensions.flasksqlalchemy import db db.app = app db.init_app(app) ...
true
true
f7f6d93bc2c5a101572a4ef4baa16802cd9cb9bd
1,886
py
Python
engine/parser/knowledgeParser.py
ariyo21/Expert-System
75a76940f9ad12c45a51b4cd34df361857a2a741
[ "MIT" ]
5
2020-11-07T14:41:16.000Z
2022-01-18T19:50:52.000Z
engine/parser/knowledgeParser.py
ariyo21/Expert-System
75a76940f9ad12c45a51b4cd34df361857a2a741
[ "MIT" ]
null
null
null
engine/parser/knowledgeParser.py
ariyo21/Expert-System
75a76940f9ad12c45a51b4cd34df361857a2a741
[ "MIT" ]
4
2020-11-19T11:24:44.000Z
2021-05-11T11:16:59.000Z
""" This file will parse the input text file and get important knowledge from it and create a database known as Knowledge Base """ import json import os from engine.components.knowledge import Knowledge from engine.logger.logger import Log class KnowledgeBaseParser: """ Class the parse the file and create t...
25.835616
88
0.572641
import json import os from engine.components.knowledge import Knowledge from engine.logger.logger import Log class KnowledgeBaseParser: def __init__(self): self.__knowledgeBase = list() def __parseInputFile(self, inputFile): if os.path.isfile(inputFile) is False: Log.e...
true
true
f7f6d971b09ead6fa597d2f35d468e7a5cb1af79
1,127
py
Python
build-2048-in-python/colors.py
dapopov-st/python-youtube-code
770c9291988898f259ad28bbab5989acee8fb830
[ "MIT" ]
262
2020-03-17T03:24:35.000Z
2022-03-22T12:50:02.000Z
build-2048-in-python/colors.py
dapopov-st/python-youtube-code
770c9291988898f259ad28bbab5989acee8fb830
[ "MIT" ]
14
2020-07-12T14:17:36.000Z
2022-03-21T09:38:45.000Z
build-2048-in-python/colors.py
dapopov-st/python-youtube-code
770c9291988898f259ad28bbab5989acee8fb830
[ "MIT" ]
583
2020-02-12T17:54:21.000Z
2022-03-30T03:59:21.000Z
GRID_COLOR = "#a39489" EMPTY_CELL_COLOR = "#c2b3a9" SCORE_LABEL_FONT = ("Verdana", 20) SCORE_FONT = ("Helvetica", 32, "bold") GAME_OVER_FONT = ("Helvetica", 48, "bold") GAME_OVER_FONT_COLOR = "#ffffff" WINNER_BG = "#ffcc00" LOSER_BG = "#a39489" CELL_COLORS = { 2: "#fcefe6", 4: "#f2e8cb", 8: "#f5b682", ...
22.098039
42
0.526176
GRID_COLOR = "#a39489" EMPTY_CELL_COLOR = "#c2b3a9" SCORE_LABEL_FONT = ("Verdana", 20) SCORE_FONT = ("Helvetica", 32, "bold") GAME_OVER_FONT = ("Helvetica", 48, "bold") GAME_OVER_FONT_COLOR = "#ffffff" WINNER_BG = "#ffcc00" LOSER_BG = "#a39489" CELL_COLORS = { 2: "#fcefe6", 4: "#f2e8cb", 8: "#f5b682", ...
true
true
f7f6dace762cd8a557e4b3fcbafd764ea20e3d96
9,953
py
Python
networkx/readwrite/tests/test_shp.py
armando1793/networkx
48326e1761c08d7a073aec53f7a644baf2249ef6
[ "BSD-3-Clause" ]
445
2019-01-26T13:50:26.000Z
2022-03-18T05:17:38.000Z
networkx/readwrite/tests/test_shp.py
armando1793/networkx
48326e1761c08d7a073aec53f7a644baf2249ef6
[ "BSD-3-Clause" ]
242
2019-01-29T15:48:27.000Z
2022-03-31T22:09:21.000Z
networkx/readwrite/tests/test_shp.py
armando1793/networkx
48326e1761c08d7a073aec53f7a644baf2249ef6
[ "BSD-3-Clause" ]
31
2019-03-10T09:51:27.000Z
2022-02-14T23:11:12.000Z
"""Unit tests for shp. """ import os import tempfile from nose import SkipTest from nose.tools import assert_equal from nose.tools import raises import networkx as nx class TestShp(object): @classmethod def setupClass(cls): global ogr try: from osgeo import ogr except Imp...
31.103125
77
0.560233
import os import tempfile from nose import SkipTest from nose.tools import assert_equal from nose.tools import raises import networkx as nx class TestShp(object): @classmethod def setupClass(cls): global ogr try: from osgeo import ogr except ImportError: raise...
true
true
f7f6dad6661895a8beb7329860e3f672e76293c7
1,648
py
Python
ch_7/Heaviside_class2.py
ProhardONE/python_primer
211e37c1f2fd169269fc4f3c08e8b7e5225f2ad0
[ "MIT" ]
51
2016-04-05T16:56:11.000Z
2022-02-08T00:08:47.000Z
ch_7/Heaviside_class2.py
zhangxiao921207/python_primer
211e37c1f2fd169269fc4f3c08e8b7e5225f2ad0
[ "MIT" ]
null
null
null
ch_7/Heaviside_class2.py
zhangxiao921207/python_primer
211e37c1f2fd169269fc4f3c08e8b7e5225f2ad0
[ "MIT" ]
47
2016-05-02T07:51:37.000Z
2022-02-08T01:28:15.000Z
# Exercise 7.20 # Author: Noah Waterfield Price import numpy as np import operator class Heaviside: def __init__(self, eps=None): self.eps = eps def __call__(self, x): if isinstance(x, (float, int)): return self.heaviside_scalar(x, self.eps) else: return self...
24.235294
68
0.453883
import numpy as np import operator class Heaviside: def __init__(self, eps=None): self.eps = eps def __call__(self, x): if isinstance(x, (float, int)): return self.heaviside_scalar(x, self.eps) else: return self.heaviside_vec(x, self.eps) @staticmethod...
false
true
f7f6dbf48233d0c348e94c8a5fa3f1b1e624e66e
3,892
py
Python
Trabalho LSTM/trabalho_LSTM.py
Jovioluiz/IA
35247c782747a972e73a723608e71faa70cb6916
[ "MIT" ]
null
null
null
Trabalho LSTM/trabalho_LSTM.py
Jovioluiz/IA
35247c782747a972e73a723608e71faa70cb6916
[ "MIT" ]
null
null
null
Trabalho LSTM/trabalho_LSTM.py
Jovioluiz/IA
35247c782747a972e73a723608e71faa70cb6916
[ "MIT" ]
null
null
null
import pandas as pd from tensorflow import keras from keras.models import Sequential from keras.layers import Dense, Dropout, LSTM import plotly.graph_objects as go import numpy as np import matplotlib.pyplot as plt import seaborn as sns # %matplotlib inline DataSet=pd.read_csv('cotacao_ouro_teste.csv') f...
29.484848
109
0.715057
import pandas as pd from tensorflow import keras from keras.models import Sequential from keras.layers import Dense, Dropout, LSTM import plotly.graph_objects as go import numpy as np import matplotlib.pyplot as plt import seaborn as sns DataSet=pd.read_csv('cotacao_ouro_teste.csv') fig = go.Figure(data=[...
true
true
f7f6dbf5fe7cad837dc8c7956be0493f3d25aa71
247
py
Python
openstack_dashboard/enabled/ossobv_alter_project_default.py
ossobv/horizon
d3f498137d1586f9cfc26961262fdc11b866293f
[ "Apache-2.0" ]
null
null
null
openstack_dashboard/enabled/ossobv_alter_project_default.py
ossobv/horizon
d3f498137d1586f9cfc26961262fdc11b866293f
[ "Apache-2.0" ]
2
2019-11-20T11:45:44.000Z
2020-02-24T08:40:08.000Z
openstack_dashboard/enabled/ossobv_alter_project_default.py
ossobv/horizon
d3f498137d1586f9cfc26961262fdc11b866293f
[ "Apache-2.0" ]
null
null
null
# Panel settings: /project/<default>/api_access PANEL_DASHBOARD = 'project' PANEL_GROUP = 'default' PANEL = 'api_access' # The default _was_ "overview", but that gives 403s. # Make this the default in this dashboard. DEFAULT_PANEL = 'api_access'
27.444444
52
0.757085
PANEL_DASHBOARD = 'project' PANEL_GROUP = 'default' PANEL = 'api_access' DEFAULT_PANEL = 'api_access'
true
true
f7f6dd037627972b6b332ba032ce417fe74e1c56
1,317
py
Python
theapplication/migrations/0031_auto_20181223_2334.py
uncommonhacks/reg
0906bc293899eae6e2b3637a99761703444175af
[ "MIT" ]
null
null
null
theapplication/migrations/0031_auto_20181223_2334.py
uncommonhacks/reg
0906bc293899eae6e2b3637a99761703444175af
[ "MIT" ]
23
2018-09-06T14:26:37.000Z
2020-06-05T19:10:38.000Z
theapplication/migrations/0031_auto_20181223_2334.py
uncommonhacks/reg
0906bc293899eae6e2b3637a99761703444175af
[ "MIT" ]
null
null
null
# Generated by Django 2.1.2 on 2018-12-23 23:34 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("theapplication", "0030_auto_20181223_2100")] operations = [ migrations.AlterField( model_name="confirmation", name="dietary_restr...
29.266667
104
0.463933
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("theapplication", "0030_auto_20181223_2100")] operations = [ migrations.AlterField( model_name="confirmation", name="dietary_restrictions", field=models.CharField( ...
true
true
f7f6dd67b6a1640ac93ee0f56304231641c4c068
5,418
py
Python
recipes/pulseaudio/all/conanfile.py
Elnee/conan-center-index
b926bc4896fc3dee917e4543e4f50d6526e710e7
[ "MIT" ]
1
2022-02-08T23:30:18.000Z
2022-02-08T23:30:18.000Z
recipes/pulseaudio/all/conanfile.py
Elnee/conan-center-index
b926bc4896fc3dee917e4543e4f50d6526e710e7
[ "MIT" ]
3
2019-11-18T18:42:06.000Z
2021-08-16T14:34:05.000Z
recipes/pulseaudio/all/conanfile.py
Elnee/conan-center-index
b926bc4896fc3dee917e4543e4f50d6526e710e7
[ "MIT" ]
null
null
null
from conans import ConanFile, tools, AutoToolsBuildEnvironment from conans.errors import ConanInvalidConfiguration import os required_conan_version = ">=1.32.0" class PulseAudioConan(ConanFile): name = "pulseaudio" description = "PulseAudio is a sound system for POSIX OSes, meaning that it is a proxy for sou...
40.432836
115
0.605943
from conans import ConanFile, tools, AutoToolsBuildEnvironment from conans.errors import ConanInvalidConfiguration import os required_conan_version = ">=1.32.0" class PulseAudioConan(ConanFile): name = "pulseaudio" description = "PulseAudio is a sound system for POSIX OSes, meaning that it is a proxy for sou...
true
true
f7f6ddb8b76814137c734ecfff942fe96e26f769
295
py
Python
src/auth/authorization.py
Guria/script-server
851effb3dd92092ea3bc34a65d9ece541bf4f9cb
[ "Apache-2.0", "CC0-1.0" ]
null
null
null
src/auth/authorization.py
Guria/script-server
851effb3dd92092ea3bc34a65d9ece541bf4f9cb
[ "Apache-2.0", "CC0-1.0" ]
null
null
null
src/auth/authorization.py
Guria/script-server
851effb3dd92092ea3bc34a65d9ece541bf4f9cb
[ "Apache-2.0", "CC0-1.0" ]
null
null
null
class ListBasedAuthorizer: def __init__(self, allowed_users) -> None: self.allowed_users = allowed_users def is_allowed(self, username): return username in self.allowed_users class AnyUserAuthorizer: @staticmethod def is_allowed(username): return True
22.692308
46
0.708475
class ListBasedAuthorizer: def __init__(self, allowed_users) -> None: self.allowed_users = allowed_users def is_allowed(self, username): return username in self.allowed_users class AnyUserAuthorizer: @staticmethod def is_allowed(username): return True
true
true
f7f6e0bd8609c6075ef48c48b6b4f696fdded0e3
179,978
py
Python
pandapower/create.py
hmaschke/pandapower-1
2e93969050d3d468ce57f73d358e97fabc6e5141
[ "BSD-3-Clause" ]
2
2019-11-01T11:01:41.000Z
2022-02-07T12:55:55.000Z
pandapower/create.py
hmaschke/pandapower-1
2e93969050d3d468ce57f73d358e97fabc6e5141
[ "BSD-3-Clause" ]
null
null
null
pandapower/create.py
hmaschke/pandapower-1
2e93969050d3d468ce57f73d358e97fabc6e5141
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2016-2022 by University of Kassel and Fraunhofer Institute for Energy Economics # and Energy System Technology (IEE), Kassel. All rights reserved. from operator import itemgetter import pandas as pd from numpy import nan, isnan, arange, dtype, isin, any as np_any, zeros, arra...
45.186543
180
0.599734
from operator import itemgetter import pandas as pd from numpy import nan, isnan, arange, dtype, isin, any as np_any, zeros, array, bool_, \ all as np_all, float64, intersect1d from packaging import version from pandapower import __version__ from pandapower.auxiliary import pandapowerNet, get_free_id, _pres...
true
true
f7f6e0bf5f26f32ffb30d75a580e53010f249db8
3,973
py
Python
drfpasswordless/settings.py
git-athul/django-rest-framework-passwordless
3eef7a56a03be64dc133c180b96700e7b43185e1
[ "MIT" ]
1
2020-10-11T10:17:54.000Z
2020-10-11T10:17:54.000Z
drfpasswordless/settings.py
git-athul/django-rest-framework-passwordless
3eef7a56a03be64dc133c180b96700e7b43185e1
[ "MIT" ]
null
null
null
drfpasswordless/settings.py
git-athul/django-rest-framework-passwordless
3eef7a56a03be64dc133c180b96700e7b43185e1
[ "MIT" ]
null
null
null
from django.conf import settings from rest_framework.settings import APISettings USER_SETTINGS = getattr(settings, 'PASSWORDLESS_AUTH', None) DEFAULTS = { # Allowed auth types, can be EMAIL, MOBILE, or both. 'PASSWORDLESS_AUTH_TYPES': ['EMAIL'], # URL Prefix for Authentication Endpoints 'PASSWORDLES...
39.73
117
0.766172
from django.conf import settings from rest_framework.settings import APISettings USER_SETTINGS = getattr(settings, 'PASSWORDLESS_AUTH', None) DEFAULTS = { 'PASSWORDLESS_AUTH_TYPES': ['EMAIL'], 'PASSWORDLESS_AUTH_PREFIX': 'auth/', 'PASSWORDLESS_VERIFY_PREFIX': 'auth/verify/', 'P...
true
true
f7f6e1f1aac678a00617e0693847b4346604a1ab
5,708
py
Python
python/paddle/fluid/tests/unittests/test_multiply.py
donproc/Paddle
23261ff44ba46a507e72e2da7c83f7fede3486f7
[ "Apache-2.0" ]
1
2020-05-27T05:21:42.000Z
2020-05-27T05:21:42.000Z
python/paddle/fluid/tests/unittests/test_multiply.py
randytli/Paddle
75dadd586996c71cf5b088b6141b94705561773f
[ "Apache-2.0" ]
null
null
null
python/paddle/fluid/tests/unittests/test_multiply.py
randytli/Paddle
75dadd586996c71cf5b088b6141b94705561773f
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
40.48227
80
0.644359
from __future__ import print_function import paddle import paddle.tensor as tensor import paddle.fluid as fluid from paddle.fluid import Program, program_guard import numpy as np import unittest class TestMultiplyAPI(unittest.TestCase): def __run_static_graph_case(self, x_data, y_data, axis=-1): ...
true
true
f7f6e328446f45c4f66d5d598ec7961f03289976
1,442
py
Python
v2.5.7/toontown/minigame/RingTrack.py
TTOFFLINE-LEAK/ttoffline
bb0e91704a755d34983e94288d50288e46b68380
[ "MIT" ]
4
2019-07-01T15:46:43.000Z
2021-07-23T16:26:48.000Z
v1.0.0.test/toontown/minigame/RingTrack.py
TTOFFLINE-LEAK/ttoffline
bb0e91704a755d34983e94288d50288e46b68380
[ "MIT" ]
1
2019-06-29T03:40:05.000Z
2021-06-13T01:15:16.000Z
v1.0.0.test/toontown/minigame/RingTrack.py
TTOFFLINE-LEAK/ttoffline
bb0e91704a755d34983e94288d50288e46b68380
[ "MIT" ]
4
2019-07-28T21:18:46.000Z
2021-02-25T06:37:25.000Z
from direct.directnotify import DirectNotifyGlobal import RingAction class RingTrack: notify = DirectNotifyGlobal.directNotify.newCategory('RingTrack') def __init__(self, actions, actionDurations=None, reverseFlag=0): if actionDurations == None: actionDurations = [ 1.0 / float...
36.974359
109
0.588072
from direct.directnotify import DirectNotifyGlobal import RingAction class RingTrack: notify = DirectNotifyGlobal.directNotify.newCategory('RingTrack') def __init__(self, actions, actionDurations=None, reverseFlag=0): if actionDurations == None: actionDurations = [ 1.0 / float...
true
true
f7f6e633dc0da02b64b4131dd1214559ad8cf299
12,021
py
Python
hitch/key.py
hitchdev/seleniumdirector
bd108f22d5b9e0d18e9966cee0cff60ef82a609a
[ "MIT" ]
5
2018-05-02T15:01:46.000Z
2021-11-05T20:26:56.000Z
hitch/key.py
hitchdev/seleniumdirector
bd108f22d5b9e0d18e9966cee0cff60ef82a609a
[ "MIT" ]
null
null
null
hitch/key.py
hitchdev/seleniumdirector
bd108f22d5b9e0d18e9966cee0cff60ef82a609a
[ "MIT" ]
1
2020-02-09T11:43:06.000Z
2020-02-09T11:43:06.000Z
from hitchstory import StoryCollection, BaseEngine, HitchStoryException from hitchstory import validate from hitchstory import GivenDefinition, GivenProperty, InfoDefinition, InfoProperty from hitchrun import expected from commandlib import Command, CommandError, python from strictyaml import Str, Map, MapPattern, Bool...
30.823077
88
0.593461
from hitchstory import StoryCollection, BaseEngine, HitchStoryException from hitchstory import validate from hitchstory import GivenDefinition, GivenProperty, InfoDefinition, InfoProperty from hitchrun import expected from commandlib import Command, CommandError, python from strictyaml import Str, Map, MapPattern, Bool...
true
true
f7f6e6a650033f4a55d0f8aacd11b378b26c60f7
913
py
Python
tests/loader/test_COGNETLoader.py
jinzhuoran/CogKGE
b0e819a1d34cf61a7d70c33808da3377b73c8fd6
[ "MIT" ]
18
2022-01-22T09:52:57.000Z
2022-03-22T15:02:12.000Z
tests/loader/test_COGNETLoader.py
CogNLP/CogKGE
70d851d6489600c1e90eb25b0388a3ceba2f078c
[ "MIT" ]
null
null
null
tests/loader/test_COGNETLoader.py
CogNLP/CogKGE
70d851d6489600c1e90eb25b0388a3ceba2f078c
[ "MIT" ]
null
null
null
from cogkge import * import time print("Testing COGNET680K dataloader...") loader = COGNET680KLoader(dataset_path='/home/hongbang/CogKTR/dataset/', download=True, ) start_time = time.time() train_data, valid_data, test_data = loader.load_all_data() node_lut,relati...
28.53125
73
0.62103
from cogkge import * import time print("Testing COGNET680K dataloader...") loader = COGNET680KLoader(dataset_path='/home/hongbang/CogKTR/dataset/', download=True, ) start_time = time.time() train_data, valid_data, test_data = loader.load_all_data() node_lut,relati...
true
true
f7f6e7a20caa1ba14899725c88f742d47a249690
79,843
py
Python
swift/proxy/controllers/base.py
notmyname/swift
340014ed224d506be5019fb4097eec9dedf3e5e1
[ "Apache-2.0" ]
null
null
null
swift/proxy/controllers/base.py
notmyname/swift
340014ed224d506be5019fb4097eec9dedf3e5e1
[ "Apache-2.0" ]
null
null
null
swift/proxy/controllers/base.py
notmyname/swift
340014ed224d506be5019fb4097eec9dedf3e5e1
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2010-2016 OpenStack Foundation # # 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 agree...
41.241219
79
0.585311
# source bufferedhttp connection of whatever it is attached to. # It is used when early termination of reading from the connection should # happen, such as when a range request is satisfied but there's still more the from six.moves.urllib.parse import quote import os import time import functoo...
true
true
f7f6e7de81ec1c076099b4d303b1801c57ff1cb0
52
py
Python
teme/constants.py
MDS-PBSCB/teme
f750713801246bda523d372d3c953b3c2bed2e6c
[ "MIT" ]
null
null
null
teme/constants.py
MDS-PBSCB/teme
f750713801246bda523d372d3c953b3c2bed2e6c
[ "MIT" ]
null
null
null
teme/constants.py
MDS-PBSCB/teme
f750713801246bda523d372d3c953b3c2bed2e6c
[ "MIT" ]
null
null
null
MIN_RATING_STAR_VALUE = 1 MAX_RATING_STAR_VALUE = 5
17.333333
25
0.846154
MIN_RATING_STAR_VALUE = 1 MAX_RATING_STAR_VALUE = 5
true
true