hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
⌀
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
⌀
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
⌀
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
⌀
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
⌀
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
⌀
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
⌀
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
⌀
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
⌀
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f75b738655685e93ed875a145546c130f6aecbe0
4,376
py
Python
jax/numpy/__init__.py
Vaibhavs10/jax
c9d8acd2e921efdbc01b2208fa9f790a9c312933
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
jax/numpy/__init__.py
Vaibhavs10/jax
c9d8acd2e921efdbc01b2208fa9f790a9c312933
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
jax/numpy/__init__.py
Vaibhavs10/jax
c9d8acd2e921efdbc01b2208fa9f790a9c312933
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# Copyright 2018 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
54.024691
114
0.744059
from . import fft from . import linalg from ..interpreters.xla import DeviceArray from .lax_numpy import ( ComplexWarning, NINF, NZERO, PZERO, abs, absolute, add, all, allclose, alltrue, amax, amin, angle, any, append, arange, arccos, arccosh, arcsin, arcsinh, arctan, arctan2, arctanh, argmax, argmin, ar...
true
true
f75b748fc3bee2ca4eb2e0fadbec0df7fd0ffec1
21,048
py
Python
src/ralph_assets/tests/functional/tests_search.py
kula1922/ralph_assets
613d9ae716a51cdfc76669f2b1e3391073b77da2
[ "Apache-2.0" ]
null
null
null
src/ralph_assets/tests/functional/tests_search.py
kula1922/ralph_assets
613d9ae716a51cdfc76669f2b1e3391073b77da2
[ "Apache-2.0" ]
null
null
null
src/ralph_assets/tests/functional/tests_search.py
kula1922/ralph_assets
613d9ae716a51cdfc76669f2b1e3391073b77da2
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from django.test import TestCase import datetime from ralph_assets.tests.util import create_asset, create_model, create_category from ralph_ass...
37.451957
79
0.639206
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from django.test import TestCase import datetime from ralph_assets.tests.util import create_asset, create_model, create_category from ralph_assets.models_assets import...
true
true
f75b74bab2a7d06c1845e82e9bd82a5d70a5e2a4
11,278
py
Python
inferelator/distributed/dask_functions.py
meichenfang/inferelator
47f8ebcc5f303264a75814897c52026b47c57aef
[ "BSD-2-Clause" ]
null
null
null
inferelator/distributed/dask_functions.py
meichenfang/inferelator
47f8ebcc5f303264a75814897c52026b47c57aef
[ "BSD-2-Clause" ]
null
null
null
inferelator/distributed/dask_functions.py
meichenfang/inferelator
47f8ebcc5f303264a75814897c52026b47c57aef
[ "BSD-2-Clause" ]
null
null
null
from inferelator.distributed.inferelator_mp import MPControl from inferelator.regression import base_regression from inferelator import utils import copy import numpy as np import scipy.sparse as sps from dask import distributed """ This package contains the dask-specific multiprocessing functions (these are used in ...
37.344371
118
0.667672
from inferelator.distributed.inferelator_mp import MPControl from inferelator.regression import base_regression from inferelator import utils import copy import numpy as np import scipy.sparse as sps from dask import distributed DASK_SCATTER_TIMEOUT = 120 def amusr_regress_dask(X, Y, priors, prior_weight, n_tasks,...
true
true
f75b75674f870d483732f5e9a67530a6af8c8a40
21,038
py
Python
airflow/utils/dag_processing.py
mr-mcox/incubator-airflow
3f1bfd38cd5a1c9c58045004390a6a766bec5e8d
[ "Apache-2.0" ]
null
null
null
airflow/utils/dag_processing.py
mr-mcox/incubator-airflow
3f1bfd38cd5a1c9c58045004390a6a766bec5e8d
[ "Apache-2.0" ]
2
2017-03-18T21:22:03.000Z
2017-03-19T18:57:51.000Z
airflow/utils/dag_processing.py
mr-mcox/incubator-airflow
3f1bfd38cd5a1c9c58045004390a6a766bec5e8d
[ "Apache-2.0" ]
1
2018-04-19T11:55:21.000Z
2018-04-19T11:55:21.000Z
# -*- coding: utf-8 -*- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the #...
35.417508
103
0.603242
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import os import re import time import zipfile from abc import ABCMeta, abstractmethod from collections import defaultdict from airflow.dag.base_dag import BaseDag, Base...
true
true
f75b75b1f40b5267c3b86b2273a55d01a5f19c3c
154
py
Python
examples/no_main_call.py
personal-army-of-4o/nyanMigen
205e114d47495a3c7c885556ffa0ebe386e9b9fc
[ "BSD-3-Clause" ]
4
2021-02-26T17:20:44.000Z
2021-04-15T07:41:31.000Z
examples/no_main_call.py
personal-army-of-4o/nyanMigen
205e114d47495a3c7c885556ffa0ebe386e9b9fc
[ "BSD-3-Clause" ]
121
2021-02-18T07:24:22.000Z
2021-07-19T14:24:51.000Z
examples/no_main_call.py
personal-army-of-4o/nyanMigen
205e114d47495a3c7c885556ffa0ebe386e9b9fc
[ "BSD-3-Clause" ]
null
null
null
from nyanMigen import nyanify @nyanify() class no_main_call: def elaborate(self, platform): a = Signal() b = Signal() b = a
15.4
34
0.584416
from nyanMigen import nyanify @nyanify() class no_main_call: def elaborate(self, platform): a = Signal() b = Signal() b = a
true
true
f75b76cacac24699561c893cd157576b14e21f40
527
py
Python
Trakttv.bundle/Contents/Libraries/Shared/oem_core/models/__init__.py
disrupted/Trakttv.bundle
24712216c71f3b22fd58cb5dd89dad5bb798ed60
[ "RSA-MD" ]
1,346
2015-01-01T14:52:24.000Z
2022-03-28T12:50:48.000Z
Trakttv.bundle/Contents/Libraries/Shared/oem_core/models/__init__.py
alcroito/Plex-Trakt-Scrobbler
4f83fb0860dcb91f860d7c11bc7df568913c82a6
[ "RSA-MD" ]
474
2015-01-01T10:27:46.000Z
2022-03-21T12:26:16.000Z
Trakttv.bundle/Contents/Libraries/Shared/oem_core/models/__init__.py
alcroito/Plex-Trakt-Scrobbler
4f83fb0860dcb91f860d7c11bc7df568913c82a6
[ "RSA-MD" ]
191
2015-01-02T18:27:22.000Z
2022-03-29T10:49:48.000Z
from oem_framework.models import ( Item, Range, Movie, Show, Season, SeasonMapping, Episode, EpisodeMapping ) from oem_core.models.collection import Collection from oem_core.models.database import Database from oem_core.models.index import Index from oem_core.models.metadata import Met...
15.5
49
0.647059
from oem_framework.models import ( Item, Range, Movie, Show, Season, SeasonMapping, Episode, EpisodeMapping ) from oem_core.models.collection import Collection from oem_core.models.database import Database from oem_core.models.index import Index from oem_core.models.metadata import Met...
true
true
f75b7789f4633eaa90936b2eb7a6a7fca1b59c96
18,363
py
Python
twilio/rest/studio/v1/flow/execution/__init__.py
timgates42/twilio-python
ef29d03a4857b62b616df4a8f4f2b7c294afbb99
[ "MIT" ]
1
2021-01-07T11:41:11.000Z
2021-01-07T11:41:11.000Z
venv/Lib/site-packages/twilio/rest/studio/v1/flow/execution/__init__.py
syt1209/PythonProjects
0409dbd3c0b0ddf00debc38875059c828eb31dec
[ "MIT" ]
null
null
null
venv/Lib/site-packages/twilio/rest/studio/v1/flow/execution/__init__.py
syt1209/PythonProjects
0409dbd3c0b0ddf00debc38875059c828eb31dec
[ "MIT" ]
4
2021-03-25T09:00:08.000Z
2021-08-05T06:54:23.000Z
# coding=utf-8 r""" This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from twilio.base import deserialize from twilio.base import serialize from twilio.base import values from twilio.base.instance_context import InstanceContext from twilio.base.instance_resource import...
34.323364
119
0.631487
from twilio.base import deserialize from twilio.base import serialize from twilio.base import values from twilio.base.instance_context import InstanceContext from twilio.base.instance_resource import InstanceResource from twilio.base.list_resource import ListResource from twilio.base.page import Page from twilio.rest....
true
true
f75b7831d91120eea0556ec40d796267c83db5a0
15,780
py
Python
coordio/sky.py
sdss/coordio
61f5c962b8e3f335259168c9f8e872b4d3fe25d8
[ "BSD-3-Clause" ]
null
null
null
coordio/sky.py
sdss/coordio
61f5c962b8e3f335259168c9f8e872b4d3fe25d8
[ "BSD-3-Clause" ]
9
2021-02-04T00:01:30.000Z
2021-11-14T22:42:49.000Z
coordio/sky.py
sdss/coordio
61f5c962b8e3f335259168c9f8e872b4d3fe25d8
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # # @Author: José Sánchez-Gallego (gallegoj@uw.edu) # @Date: 2020-08-17 # @Filename: sky.py # @License: BSD 3-clause (http://www.opensource.org/licenses/BSD-3-Clause) # IAU-defined sky coordinate systems and transformations. import ctypes import numpy from . import sofa...
34.379085
83
0.571356
import ctypes import numpy from . import sofa from .coordinate import Coordinate, Coordinate2D, verifySite, verifyWavelength from .exceptions import CoordinateError, CoordIOError from .time import Time from .site import Site from . import defaults from . import conv __all__ = ['ICRS', 'Observed'] class ICRS(Coo...
true
true
f75b786eeba0d581000260d58f40ae16f76220ce
15,677
py
Python
sympy/combinatorics/subsets.py
pbrady/sympy
7163137e22fbefbb645147a15147b26dad220d49
[ "BSD-3-Clause" ]
null
null
null
sympy/combinatorics/subsets.py
pbrady/sympy
7163137e22fbefbb645147a15147b26dad220d49
[ "BSD-3-Clause" ]
null
null
null
sympy/combinatorics/subsets.py
pbrady/sympy
7163137e22fbefbb645147a15147b26dad220d49
[ "BSD-3-Clause" ]
null
null
null
from __future__ import print_function, division from itertools import combinations from sympy.core import Basic from sympy.combinatorics.graycode import GrayCode from sympy.core.compatibility import range class Subset(Basic): """ Represents a basic subset object. We generate subsets using essentially t...
26.571186
114
0.495375
from __future__ import print_function, division from itertools import combinations from sympy.core import Basic from sympy.combinatorics.graycode import GrayCode from sympy.core.compatibility import range class Subset(Basic): _rank_binary = None _rank_lex = None _rank_graycode = None _subset = None...
true
true
f75b79feb4e6c31e5e9aa95cf5ac5b1439f627ca
14,732
py
Python
elasticsearch/py-venv-2.7/lib64/python2.7/site-packages/elasticsearch/_async/transport.py
bosserbosser/codetest
987563900d912e891b53eeda8e2cf36f3c769430
[ "Apache-2.0" ]
4
2021-05-31T19:34:27.000Z
2021-06-01T18:14:31.000Z
elasticsearch/py-venv-2.7/lib64/python2.7/site-packages/elasticsearch/_async/transport.py
bosserbosser/codetest
987563900d912e891b53eeda8e2cf36f3c769430
[ "Apache-2.0" ]
3
2021-09-17T16:47:19.000Z
2021-10-07T22:33:32.000Z
elasticsearch/py-venv-2.7/lib64/python2.7/site-packages/elasticsearch/_async/transport.py
bosserbosser/codetest
987563900d912e891b53eeda8e2cf36f3c769430
[ "Apache-2.0" ]
1
2021-04-07T01:37:57.000Z
2021-04-07T01:37:57.000Z
# Licensed to Elasticsearch B.V. under one or more contributor # license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright # ownership. Elasticsearch B.V. licenses this file to you under # the Apache License, Version 2.0 (the "License"); you may # not use ...
41.498592
94
0.616753
import asyncio import logging import sys from itertools import chain from ..exceptions import ( ConnectionError, ConnectionTimeout, SerializationError, TransportError, ) from ..transport import Transport from .compat import get_running_loop from .http_aiohttp import AIOHttpConnection logger = logging...
true
true
f75b7a0454ca7f185899bb28b04cdf5eeaae3a84
170
py
Python
test_oneLib/test_eta.py
gaoyuanhezhihao/pyLib
ecc517d12c4125deafa7b7fe09c63afa3349aaac
[ "MIT" ]
null
null
null
test_oneLib/test_eta.py
gaoyuanhezhihao/pyLib
ecc517d12c4125deafa7b7fe09c63afa3349aaac
[ "MIT" ]
null
null
null
test_oneLib/test_eta.py
gaoyuanhezhihao/pyLib
ecc517d12c4125deafa7b7fe09c63afa3349aaac
[ "MIT" ]
null
null
null
from __future__ import print_function from OneLib.Time.ETA import Timer import time tm = Timer(10) tm.start() for i in range(10): time.sleep(1) print(tm.eta())
15.454545
37
0.711765
from __future__ import print_function from OneLib.Time.ETA import Timer import time tm = Timer(10) tm.start() for i in range(10): time.sleep(1) print(tm.eta())
true
true
f75b7b65b95ceb84acffacb24690f54a0acaabc6
208
py
Python
tests/smoke.py
jschwinger23/coroutine
7c78a4d3b794f107a2e2d1f28eb6176d48795921
[ "MIT" ]
1
2019-04-21T11:30:31.000Z
2019-04-21T11:30:31.000Z
tests/smoke.py
jschwinger23/coroutine
7c78a4d3b794f107a2e2d1f28eb6176d48795921
[ "MIT" ]
null
null
null
tests/smoke.py
jschwinger23/coroutine
7c78a4d3b794f107a2e2d1f28eb6176d48795921
[ "MIT" ]
null
null
null
import coroutine def f(x): print(12) coroutine.sleep(x) print(34) if __name__ == '__main__': coro = coroutine.Coroutine(target=f, args=(2,)) coro.start() print(56) coro.join()
13.866667
51
0.600962
import coroutine def f(x): print(12) coroutine.sleep(x) print(34) if __name__ == '__main__': coro = coroutine.Coroutine(target=f, args=(2,)) coro.start() print(56) coro.join()
true
true
f75b7d1384de238246f0b888fc9608e303e27629
1,080
py
Python
api/users/urls.py
Juangr1803/Foro-AgrodatAI
a8f23afd32d2ec60d25a03c97f5f353fd0ef5e0b
[ "MIT" ]
1
2021-04-19T16:13:39.000Z
2021-04-19T16:13:39.000Z
api/users/urls.py
Juangr1803/Foro-AgrodatAI
a8f23afd32d2ec60d25a03c97f5f353fd0ef5e0b
[ "MIT" ]
null
null
null
api/users/urls.py
Juangr1803/Foro-AgrodatAI
a8f23afd32d2ec60d25a03c97f5f353fd0ef5e0b
[ "MIT" ]
null
null
null
from django.urls import path, include from rest_framework.urlpatterns import format_suffix_patterns from django.urls import path, include from rest_framework.routers import DefaultRouter from users import views from django.conf import settings from django.conf.urls.static import static from users.views import Profil...
24
65
0.709259
from django.urls import path, include from rest_framework.urlpatterns import format_suffix_patterns from django.urls import path, include from rest_framework.routers import DefaultRouter from users import views from django.conf import settings from django.conf.urls.static import static from users.views import Profil...
true
true
f75b7e36552c17838de93a630b174a52e1a58a22
830
py
Python
graff/Factor.py
nicrip/graff_py
3ad390fb88f75e07ad3f07db50fc30f9e61672da
[ "MIT" ]
2
2019-04-07T02:10:16.000Z
2019-04-07T23:41:35.000Z
graff/Factor.py
nicrip/graff_py
3ad390fb88f75e07ad3f07db50fc30f9e61672da
[ "MIT" ]
null
null
null
graff/Factor.py
nicrip/graff_py
3ad390fb88f75e07ad3f07db50fc30f9e61672da
[ "MIT" ]
null
null
null
class Factor(object): def __init__(self, factorType, variables, measurement): """ Initialize the factor object factorType - the factor type (e.g. Pose3Pose3) variables - a list of the variables affected by the factor measurement - the distribution describing the measurement ...
30.740741
69
0.587952
class Factor(object): def __init__(self, factorType, variables, measurement): self.factorType = factorType self.variables = variables self.measurement = measurement def dict(self): d = {} d['factorType'] = self.factorType d['variables'] = self.variables d...
true
true
f75b7e8a40e4238a7ae061283198faa07f685fb3
20,990
py
Python
mmaction/models/tenons/backbones/resnet_s3d.py
arpanmangal/coinaction
579c1cc48ee55814584c92691a9a0c64f98a539f
[ "Apache-2.0" ]
1,929
2019-06-18T18:16:28.000Z
2022-03-29T14:41:26.000Z
mmaction/models/tenons/backbones/resnet_s3d.py
yysijie/mmaction
488eb4fea833ecf5df65acdf12e55592099efc93
[ "Apache-2.0" ]
207
2019-06-20T05:29:01.000Z
2022-03-31T08:12:24.000Z
mmaction/models/tenons/backbones/resnet_s3d.py
yysijie/mmaction
488eb4fea833ecf5df65acdf12e55592099efc93
[ "Apache-2.0" ]
423
2019-06-19T00:56:53.000Z
2022-03-29T08:34:42.000Z
import logging import torch import torch.nn as nn import torch.utils.checkpoint as cp from ....utils.misc import rgetattr, rhasattr from .resnet import ResNet from mmcv.cnn import constant_init, kaiming_init from mmcv.runner import load_checkpoint from ....ops.trajectory_conv_package.traj_conv import TrajConv from ...
38.372943
151
0.554312
import logging import torch import torch.nn as nn import torch.utils.checkpoint as cp from ....utils.misc import rgetattr, rhasattr from .resnet import ResNet from mmcv.cnn import constant_init, kaiming_init from mmcv.runner import load_checkpoint from ....ops.trajectory_conv_package.traj_conv import TrajConv from ...
true
true
f75b7ebe1e7f04e730dbe05d28e393850da42957
515
py
Python
convert_to_maxcut.py
knshnb/MQLib
66495e135f7bba3e84fb6836b03eb5f13a6ca7cf
[ "MIT" ]
null
null
null
convert_to_maxcut.py
knshnb/MQLib
66495e135f7bba3e84fb6836b03eb5f13a6ca7cf
[ "MIT" ]
null
null
null
convert_to_maxcut.py
knshnb/MQLib
66495e135f7bba3e84fb6836b03eb5f13a6ca7cf
[ "MIT" ]
null
null
null
import os def write_maxcut_file(filename): with open(os.path.join("data", filename)) as f: lines = f.readlines() with open(os.path.join("maxcut", filename), mode='w') as f: f.write(lines[0]) for line in lines[1::]: u, v = map(int, line.split()) f.write("{} {} 1\...
28.611111
63
0.565049
import os def write_maxcut_file(filename): with open(os.path.join("data", filename)) as f: lines = f.readlines() with open(os.path.join("maxcut", filename), mode='w') as f: f.write(lines[0]) for line in lines[1::]: u, v = map(int, line.split()) f.write("{} {} 1\...
true
true
f75b8038374bf6cef68504ba6cdb4571de021a9a
5,058
py
Python
benchmarks/f3_wrong_hints/scaling_software_termination/8-2Nested_false-termination_22.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
3
2021-04-23T23:29:26.000Z
2022-03-23T10:00:30.000Z
benchmarks/f3_wrong_hints/scaling_software_termination/8-2Nested_false-termination_22.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
null
null
null
benchmarks/f3_wrong_hints/scaling_software_termination/8-2Nested_false-termination_22.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
1
2021-11-17T22:02:56.000Z
2021-11-17T22:02:56.000Z
from typing import Tuple, FrozenSet from pysmt.environment import Environment as PysmtEnv from pysmt.fnode import FNode import pysmt.typing as types from utils import symb_to_next from hint import Hint, Location def transition_system(env: PysmtEnv) -> Tuple[FrozenSet[FNode], FNode, FNode, ...
29.406977
77
0.575919
from typing import Tuple, FrozenSet from pysmt.environment import Environment as PysmtEnv from pysmt.fnode import FNode import pysmt.typing as types from utils import symb_to_next from hint import Hint, Location def transition_system(env: PysmtEnv) -> Tuple[FrozenSet[FNode], FNode, FNode, ...
true
true
f75b81f29097caa6728fe36bab4fe5d702ce3e81
1,770
py
Python
pipeline/builder/flow/gateway.py
ZhuoZhuoCrayon/bk-nodeman
76cb71fcc971c2a0c2be161fcbd6b019d4a7a8ab
[ "MIT" ]
31
2021-07-28T13:06:11.000Z
2022-03-10T12:16:44.000Z
pipeline/builder/flow/gateway.py
ZhuoZhuoCrayon/bk-nodeman
76cb71fcc971c2a0c2be161fcbd6b019d4a7a8ab
[ "MIT" ]
483
2021-07-29T03:17:44.000Z
2022-03-31T13:03:04.000Z
pipeline/builder/flow/gateway.py
ZhuoZhuoCrayon/bk-nodeman
76cb71fcc971c2a0c2be161fcbd6b019d4a7a8ab
[ "MIT" ]
29
2021-07-28T13:06:21.000Z
2022-03-25T06:18:18.000Z
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available. Copyright (C) 2017-2019 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in co...
33.396226
115
0.734463
from pipeline.builder.flow.base import * __all__ = ["ParallelGateway", "ExclusiveGateway", "ConvergeGateway", "ConditionalParallelGateway"] class ParallelGateway(Element): def type(self): return PE.ParallelGateway class ConditionGateway(Element): def __init__(self, conditions=None, *args, **kwarg...
true
true
f75b8221dfe4663abfb46b6fe082dcf2bfafab28
4,762
py
Python
venv/lib/python3.6/site-packages/Crypto/Hash/SHAKE256.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
13
2021-11-02T03:35:39.000Z
2022-03-30T03:34:55.000Z
venv/lib/python3.6/site-packages/Crypto/Hash/SHAKE256.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
12
2020-02-21T07:24:52.000Z
2020-04-14T09:54:32.000Z
venv/lib/python3.6/site-packages/Crypto/Hash/SHAKE256.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
2
2021-12-06T00:45:20.000Z
2022-02-19T15:50:56.000Z
# =================================================================== # # Copyright (c) 2015, Legrandin <helderijs@gmail.com> # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributio...
36.351145
97
0.582528
from Crypto.Util.py3compat import bord from Crypto.Util._raw_api import (load_pycryptodome_raw_lib, VoidPointer, SmartPointer, create_string_buffer, get_raw_buffer, c_size_t, c_uint8...
true
true
f75b82e810c9cbab0b7df5b520b1d13759d4fc17
5,839
py
Python
orpheus/dataset.py
RJPenic/Orpheus
1a795fa732a10d4f16b48cf00808a125548e00d5
[ "MIT" ]
null
null
null
orpheus/dataset.py
RJPenic/Orpheus
1a795fa732a10d4f16b48cf00808a125548e00d5
[ "MIT" ]
null
null
null
orpheus/dataset.py
RJPenic/Orpheus
1a795fa732a10d4f16b48cf00808a125548e00d5
[ "MIT" ]
null
null
null
import torch from dataclasses import dataclass, field from typing import List from torch import nn from torch.utils.data import DataLoader from torch.nn.utils.rnn import pad_sequence import csv from nltk.corpus import stopwords import random from tqdm import tqdm @dataclass class Instance: label : int text :...
32.620112
170
0.599418
import torch from dataclasses import dataclass, field from typing import List from torch import nn from torch.utils.data import DataLoader from torch.nn.utils.rnn import pad_sequence import csv from nltk.corpus import stopwords import random from tqdm import tqdm @dataclass class Instance: label : int text :...
true
true
f75b85056d9c11fa92b0e873970050b496879914
1,076
py
Python
AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_binhex.py
CEOALT1/RefindPlusUDK
116b957ad735f96fbb6d80a0ba582046960ba164
[ "BSD-2-Clause" ]
2,757
2018-04-28T21:41:36.000Z
2022-03-29T06:33:36.000Z
AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_binhex.py
CEOALT1/RefindPlusUDK
116b957ad735f96fbb6d80a0ba582046960ba164
[ "BSD-2-Clause" ]
20
2019-07-23T15:29:32.000Z
2022-01-21T12:53:04.000Z
AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_binhex.py
CEOALT1/RefindPlusUDK
116b957ad735f96fbb6d80a0ba582046960ba164
[ "BSD-2-Clause" ]
449
2018-05-09T05:54:05.000Z
2022-03-30T14:54:18.000Z
#! /usr/bin/env python """Test script for the binhex C module Uses the mechanism of the python binhex module Based on an original test by Roger E. Masse. """ import binhex import os import unittest from test import test_support class BinHexTestCase(unittest.TestCase): def setUp(self): ...
21.52
50
0.604089
import binhex import os import unittest from test import test_support class BinHexTestCase(unittest.TestCase): def setUp(self): self.fname1 = test_support.TESTFN + "1" self.fname2 = test_support.TESTFN + "2" def tearDown(self): try: os.unlink(self.fname1) except...
true
true
f75b867623ec04e8047dc33e3baf4055740aea52
3,070
py
Python
tempest/api/database/flavors/test_flavors.py
xavpaice/tempest
958bd694df27511e0346d799876fe49331b8145c
[ "Apache-2.0" ]
3
2016-07-15T12:27:23.000Z
2021-04-23T04:41:10.000Z
tempest/api/database/flavors/test_flavors.py
LIS/lis-tempest
8e6403b2d6de81c5d18ed867b4977385c8278b75
[ "Apache-2.0" ]
null
null
null
tempest/api/database/flavors/test_flavors.py
LIS/lis-tempest
8e6403b2d6de81c5d18ed867b4977385c8278b75
[ "Apache-2.0" ]
12
2016-07-14T18:13:05.000Z
2017-07-08T18:45:42.000Z
# Copyright 2014 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
41.486486
79
0.632899
from tempest.api.database import base from tempest import test class DatabaseFlavorsTest(base.BaseDatabaseTest): @classmethod def setup_clients(cls): super(DatabaseFlavorsTest, cls).setup_clients() cls.client = cls.database_flavors_client @test.attr(type='smoke') @test.idempotent_id...
true
true
f75b86dbd0040ab393fea664067d99f60cb753de
3,011
py
Python
python/testServer.py
cschellberg/EdgeGateway
e79ad09e4190e36c4b9d90583e31e4010c18d501
[ "CNRI-Python" ]
1
2018-08-23T07:45:28.000Z
2018-08-23T07:45:28.000Z
python/testServer.py
cschellberg/EdgeGateway
e79ad09e4190e36c4b9d90583e31e4010c18d501
[ "CNRI-Python" ]
null
null
null
python/testServer.py
cschellberg/EdgeGateway
e79ad09e4190e36c4b9d90583e31e4010c18d501
[ "CNRI-Python" ]
null
null
null
import cherrypy import threading import time import requests import datetime import json class MessagePuller(object): def pullMessages(self): data='{"thingName":"TestRemoteThing","action":"pullMessages"}' response = requests.post("http://localhost:8080/EdgeGateway/", data=data, headers = ...
36.719512
169
0.583195
import cherrypy import threading import time import requests import datetime import json class MessagePuller(object): def pullMessages(self): data='{"thingName":"TestRemoteThing","action":"pullMessages"}' response = requests.post("http://localhost:8080/EdgeGateway/", data=data, headers = ...
true
true
f75b86f9703a61ed0a8c61e1822aec6f179373b7
4,314
py
Python
django/views/static.py
jommerce/django
baf9604ed8fed3e6e7ddfaca2d83c377c81399ae
[ "BSD-3-Clause", "0BSD" ]
16
2019-08-10T12:24:06.000Z
2020-05-21T09:11:14.000Z
django/views/static.py
jommerce/django
baf9604ed8fed3e6e7ddfaca2d83c377c81399ae
[ "BSD-3-Clause", "0BSD" ]
12
2019-08-10T11:55:29.000Z
2020-05-21T04:46:30.000Z
django/views/static.py
jommerce/django
baf9604ed8fed3e6e7ddfaca2d83c377c81399ae
[ "BSD-3-Clause", "0BSD" ]
3
2019-08-20T13:29:34.000Z
2020-01-30T22:05:10.000Z
""" Views and functions for serving static files. These are only to be used during development, and SHOULD NOT be used in a production setting. """ import mimetypes import posixpath from pathlib import Path from django.http import FileResponse, Http404, HttpResponse, HttpResponseNotModified from django.template import...
32.43609
86
0.640936
import mimetypes import posixpath from pathlib import Path from django.http import FileResponse, Http404, HttpResponse, HttpResponseNotModified from django.template import Context, Engine, TemplateDoesNotExist, loader from django.utils._os import safe_join from django.utils.http import http_date, parse_http_date from ...
true
true
f75b87300f7e7198f5ef433c787db99680ebd8a3
304
py
Python
ft_server/__main__.py
adfi/fasttext-server
72fddc915db9370a46710aeac55e00407012a3d5
[ "MIT" ]
25
2017-12-06T13:29:56.000Z
2020-12-20T11:20:44.000Z
ft_server/__main__.py
adfi/fasttext-server
72fddc915db9370a46710aeac55e00407012a3d5
[ "MIT" ]
6
2018-03-16T14:19:16.000Z
2021-04-03T08:40:43.000Z
ft_server/__main__.py
adfi/fasttext-server
72fddc915db9370a46710aeac55e00407012a3d5
[ "MIT" ]
8
2017-12-15T20:38:13.000Z
2021-03-16T07:48:34.000Z
import click from flask import g import fastText from .server import app @click.command() @click.argument('model', type=click.Path(exists=True)) def cli(model): app.config["FT_SERVER_MODEL_PATH"] = model app.run(host=app.config["HOST"], port=app.config["PORT"], debug=app.config["DEBUG"]) cli()
25.333333
88
0.723684
import click from flask import g import fastText from .server import app @click.command() @click.argument('model', type=click.Path(exists=True)) def cli(model): app.config["FT_SERVER_MODEL_PATH"] = model app.run(host=app.config["HOST"], port=app.config["PORT"], debug=app.config["DEBUG"]) cli()
true
true
f75b8780be65d99dfb881ee257902d6c1590f11e
11,907
py
Python
pypy/module/_rawffi/alt/interp_struct.py
yxzoro/pypy
6e47b3d3e5513d9639a21554963a6ace172ccfee
[ "Apache-2.0", "OpenSSL" ]
1
2021-06-02T23:02:09.000Z
2021-06-02T23:02:09.000Z
pypy/module/_rawffi/alt/interp_struct.py
yxzoro/pypy
6e47b3d3e5513d9639a21554963a6ace172ccfee
[ "Apache-2.0", "OpenSSL" ]
1
2021-03-30T18:08:41.000Z
2021-03-30T18:08:41.000Z
pypy/module/_rawffi/alt/interp_struct.py
yxzoro/pypy
6e47b3d3e5513d9639a21554963a6ace172ccfee
[ "Apache-2.0", "OpenSSL" ]
null
null
null
from rpython.rtyper.lltypesystem import lltype, rffi from rpython.rlib import clibffi from rpython.rlib import libffi from rpython.rlib import jit from rpython.rlib.rgc import must_be_light_finalizer from rpython.rlib.rarithmetic import r_uint, r_ulonglong, intmask from pypy.interpreter.baseobjspace import W_Root from ...
37.093458
93
0.64693
from rpython.rtyper.lltypesystem import lltype, rffi from rpython.rlib import clibffi from rpython.rlib import libffi from rpython.rlib import jit from rpython.rlib.rgc import must_be_light_finalizer from rpython.rlib.rarithmetic import r_uint, r_ulonglong, intmask from pypy.interpreter.baseobjspace import W_Root from ...
true
true
f75b8780ed0639da166d4c14c726815b02b2261c
900
py
Python
JJE_Standings/utils/jje_standings_functions.py
namur007/JJE_App
7765953455133f33a5dcc4a2f3a99ffb38eae71f
[ "MIT" ]
2
2017-05-05T14:02:37.000Z
2017-07-21T13:19:31.000Z
JJE_Standings/utils/jje_standings_functions.py
namur007/JJE_App
7765953455133f33a5dcc4a2f3a99ffb38eae71f
[ "MIT" ]
7
2018-01-31T13:28:12.000Z
2020-02-19T01:57:55.000Z
JJE_Standings/utils/jje_standings_functions.py
namur007/JJE_App
7765953455133f33a5dcc4a2f3a99ffb38eae71f
[ "MIT" ]
null
null
null
from JJE_Standings.models import YahooStanding def get_overclaim_teams(team_list): team_standings = YahooStanding.objects.filter(current_standings=True).filter(yahoo_team_id__in=team_list) if len(team_standings) == 0: return [] max_rank = max([t.rank for t in team_standings]) overclaim_teams =...
30
109
0.712222
from JJE_Standings.models import YahooStanding def get_overclaim_teams(team_list): team_standings = YahooStanding.objects.filter(current_standings=True).filter(yahoo_team_id__in=team_list) if len(team_standings) == 0: return [] max_rank = max([t.rank for t in team_standings]) overclaim_teams =...
true
true
f75b889c0884f0f87b025775427ec033600dae73
5,834
py
Python
tests/en/test_format_little_endian.py
wanasit/chrono-python
2e3bb44f876fc381a73050d9dda58de296306dc0
[ "MIT" ]
20
2016-07-21T11:27:46.000Z
2022-01-30T16:12:46.000Z
tests/en/test_format_little_endian.py
wanasit/chrono-python
2e3bb44f876fc381a73050d9dda58de296306dc0
[ "MIT" ]
2
2016-11-21T05:46:19.000Z
2019-03-23T06:41:21.000Z
tests/en/test_format_little_endian.py
wanasit/chrono-python
2e3bb44f876fc381a73050d9dda58de296306dc0
[ "MIT" ]
5
2015-06-28T07:21:31.000Z
2020-07-28T19:54:29.000Z
import unittest import chrono from datetime import datetime class LittleEndianFormatTest(unittest.TestCase): def setUp(self): pass def test_little_endian(self): results = chrono.parse('Test : 24 March 2013') self.assertEqual(len(results), 1) result = results[0] se...
39.418919
91
0.6277
import unittest import chrono from datetime import datetime class LittleEndianFormatTest(unittest.TestCase): def setUp(self): pass def test_little_endian(self): results = chrono.parse('Test : 24 March 2013') self.assertEqual(len(results), 1) result = results[0] se...
true
true
f75b8b0a0594a8dc0386cd48fbf800edb186991d
1,320
py
Python
SiteHandler.py
mathee92/unirentalz
803c58628ebda002e2c127db11fbaddf181ef394
[ "MIT" ]
null
null
null
SiteHandler.py
mathee92/unirentalz
803c58628ebda002e2c127db11fbaddf181ef394
[ "MIT" ]
null
null
null
SiteHandler.py
mathee92/unirentalz
803c58628ebda002e2c127db11fbaddf181ef394
[ "MIT" ]
null
null
null
''' FILE: BaseHandler.py PURPOSE: Defines the base for rendering HTML files MODIFIED: 6 March 2014 AUTHOR: Mathee Sivananthan ''' # IMPORT STATEMENTS import webapp2 import jinja2 import urllib2 import logging import time import json import os import sys import re from xml.dom import minidom from string import l...
26.4
96
0.753788
import webapp2 import jinja2 import urllib2 import logging import time import json import os import sys import re from xml.dom import minidom from string import letters from bs4 import BeautifulSoup from DataStore import * from google.appengine.api import urlfetch from google.appengine.api import images from googl...
true
true
f75b8d9d39cddc633df141d41917ba4bf30fc46f
1,906
py
Python
aldryn_faq/forms.py
liip-forks/aldryn-faq
1e9d5c8d410f955b8082bd20ea7a4d85d4c5e0f7
[ "BSD-3-Clause" ]
null
null
null
aldryn_faq/forms.py
liip-forks/aldryn-faq
1e9d5c8d410f955b8082bd20ea7a4d85d4c5e0f7
[ "BSD-3-Clause" ]
null
null
null
aldryn_faq/forms.py
liip-forks/aldryn-faq
1e9d5c8d410f955b8082bd20ea7a4d85d4c5e0f7
[ "BSD-3-Clause" ]
null
null
null
from django import forms from django.utils.translation import ugettext_lazy as _ from aldryn_apphooks_config.utils import setup_config from app_data import AppDataForm from parler.forms import TranslatableModelForm from sortedm2m.forms import SortedMultipleChoiceField from .models import Category, QuestionListPlu...
27.623188
77
0.665268
from django import forms from django.utils.translation import ugettext_lazy as _ from aldryn_apphooks_config.utils import setup_config from app_data import AppDataForm from parler.forms import TranslatableModelForm from sortedm2m.forms import SortedMultipleChoiceField from .models import Category, QuestionListPlu...
true
true
f75b8deec4f23475a710177a23855525c3265188
7,992
py
Python
tests/test_composition.py
glichtner/fhir.resources
94896d8f8a0b7dd69253762aab968f4fd6eb69a0
[ "BSD-3-Clause" ]
null
null
null
tests/test_composition.py
glichtner/fhir.resources
94896d8f8a0b7dd69253762aab968f4fd6eb69a0
[ "BSD-3-Clause" ]
null
null
null
tests/test_composition.py
glichtner/fhir.resources
94896d8f8a0b7dd69253762aab968f4fd6eb69a0
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ Profile: http://hl7.org/fhir/StructureDefinition/Composition Release: R5 Version: 4.5.0 Build ID: 0d95498 Last updated: 2021-04-03T00:34:11.075+00:00 """ from pydantic.validators import bytes_validator # noqa: F401 from fhir.resources import fhirtypes # noqa: F401 from fhir.resources impor...
45.931034
88
0.689314
from pydantic.validators import bytes_validator from fhir.resources import fhirtypes from fhir.resources import composition def impl_composition_1(inst): assert inst.attester[0].mode == "legal" assert inst.attester[0].party.display == "Harold Hippocrates, MD" assert inst.attester[0].party.reference == "...
true
true
f75b8e11ec2fcf103e4fa4fd68391dd1723f8193
3,862
py
Python
PRESUBMIT.py
UNIVERSAL-IT-SYSTEMS/depot_tools
4f4e76fce524016999d1b5e73ca21b4202d288bb
[ "BSD-3-Clause" ]
45
2015-10-12T10:02:11.000Z
2021-12-14T07:10:47.000Z
PRESUBMIT.py
vrosnet/depot_tools
4f4e76fce524016999d1b5e73ca21b4202d288bb
[ "BSD-3-Clause" ]
null
null
null
PRESUBMIT.py
vrosnet/depot_tools
4f4e76fce524016999d1b5e73ca21b4202d288bb
[ "BSD-3-Clause" ]
38
2016-06-25T05:57:35.000Z
2021-12-30T04:58:10.000Z
# Copyright (c) 2012 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. """Top-level presubmit script for depot tools. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for details on the presubmit ...
34.176991
80
0.668566
"""Top-level presubmit script for depot tools. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for details on the presubmit API built into depot_tools. """ def CommonChecks(input_api, output_api, tests_to_black_list): results = [] results.extend(input_api.canned_checks.CheckOwners(in...
false
true
f75b8eb413e5bcab2946035847ea7f92ce09bf3c
10,527
py
Python
train_classification.py
jdailey/solarpanelcount
39643e97d628c9317aca398d28e37ed25472a7f6
[ "MIT" ]
197
2018-04-09T02:11:23.000Z
2022-03-28T15:15:33.000Z
train_classification.py
jdailey/solarpanelcount
39643e97d628c9317aca398d28e37ed25472a7f6
[ "MIT" ]
23
2018-12-20T01:14:31.000Z
2021-12-05T13:36:31.000Z
train_classification.py
jdailey/solarpanelcount
39643e97d628c9317aca398d28e37ed25472a7f6
[ "MIT" ]
70
2018-12-19T23:10:39.000Z
2022-03-20T06:30:34.000Z
"""Train the inception-v3 model on Solar Panel Identification dataset.""" from datetime import datetime import os.path import time import sys import numpy as np import tensorflow as tf import skimage import skimage.io import skimage.transform import random import pickle from collections import deque from inception i...
40.026616
114
0.61936
from datetime import datetime import os.path import time import sys import numpy as np import tensorflow as tf import skimage import skimage.io import skimage.transform import random import pickle from collections import deque from inception import inception_model as inception from inception.slim import slim FLAGS ...
true
true
f75b8f98efe6645f7d5d4bb4b4c33b95f62117c4
602
py
Python
samples/subscription_plans_create.py
burakkaraceylan/iyzipay-python
68c95a4cd0859be9d35619aed7ec6bb37f5b650d
[ "MIT" ]
null
null
null
samples/subscription_plans_create.py
burakkaraceylan/iyzipay-python
68c95a4cd0859be9d35619aed7ec6bb37f5b650d
[ "MIT" ]
null
null
null
samples/subscription_plans_create.py
burakkaraceylan/iyzipay-python
68c95a4cd0859be9d35619aed7ec6bb37f5b650d
[ "MIT" ]
2
2021-08-20T12:50:18.000Z
2022-01-31T14:03:49.000Z
# coding=utf-8 import iyzipay options = { 'api_key': iyzipay.api_key, 'secret_key': iyzipay.secret_key, 'base_url': iyzipay.base_url } request = { 'locale': 'tr', 'conversationId': 1234, 'name': 'Premium Monthly', 'price': 500, 'currencyCode': 'USD', 'paymentInterval': 'MONTHLY', ...
22.296296
60
0.656146
import iyzipay options = { 'api_key': iyzipay.api_key, 'secret_key': iyzipay.secret_key, 'base_url': iyzipay.base_url } request = { 'locale': 'tr', 'conversationId': 1234, 'name': 'Premium Monthly', 'price': 500, 'currencyCode': 'USD', 'paymentInterval': 'MONTHLY', 'paymentInt...
true
true
f75b8ffe4c4b31c40d5c4338fbb154c3ed14491b
1,563
py
Python
bakery_lint/tests/downstream/test_check_font_tables.py
lowks/fontbakery-cli
514cc010c1118bbcef078aeb64a87add05322c4a
[ "Apache-2.0" ]
1
2020-06-17T04:44:42.000Z
2020-06-17T04:44:42.000Z
bakery_lint/tests/downstream/test_check_font_tables.py
lowks/fontbakery-cli
514cc010c1118bbcef078aeb64a87add05322c4a
[ "Apache-2.0" ]
null
null
null
bakery_lint/tests/downstream/test_check_font_tables.py
lowks/fontbakery-cli
514cc010c1118bbcef078aeb64a87add05322c4a
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # Copyright 2013 The Font Bakery 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 re...
30.057692
74
0.670505
from bakery_lint.base import BakeryTestCase as TestCase from bakery_cli.ttfont import Font class CheckFontHasDsigTable(TestCase): path = '.' name = __name__ targets = ['result'] tool = 'lint' def test_check_font_has_dsig_table(self): font = Font.get_ttfont(self.path) try: ...
true
true
f75b9088fedf0d2b021e86c7f9f8f483c68411ff
34,520
py
Python
desktop/libs/hadoop/src/hadoop/fs/hadoopfs.py
mapr/hue
84390cf8649feb34d74c574e771ea19410ecb970
[ "Apache-2.0" ]
null
null
null
desktop/libs/hadoop/src/hadoop/fs/hadoopfs.py
mapr/hue
84390cf8649feb34d74c574e771ea19410ecb970
[ "Apache-2.0" ]
null
null
null
desktop/libs/hadoop/src/hadoop/fs/hadoopfs.py
mapr/hue
84390cf8649feb34d74c574e771ea19410ecb970
[ "Apache-2.0" ]
4
2015-02-23T23:59:52.000Z
2018-01-03T06:59:26.000Z
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
32.111628
106
0.66883
""" Deprecated! Use WebHdfs instead. Only some utils and Hdfs are still used. Interfaces for Hadoop filesystem access via the HADOOP-4707 Thrift APIs. """ import errno import logging import os import posixpath import random import stat as statconsts import subprocess import urlparse import threading from thrift.tra...
false
true
f75b91766c6ca575b20a5025a432c793bfe7209b
1,447
py
Python
setup.py
linathedog/rciam-federation-registry-agent
4905f3e500ecc421a791b6f63448eba94ff16d03
[ "Apache-2.0" ]
3
2021-02-10T13:38:40.000Z
2021-12-16T12:26:20.000Z
setup.py
linathedog/rciam-federation-registry-agent
4905f3e500ecc421a791b6f63448eba94ff16d03
[ "Apache-2.0" ]
4
2020-12-22T21:52:36.000Z
2021-06-24T08:08:46.000Z
setup.py
linathedog/rciam-federation-registry-agent
4905f3e500ecc421a791b6f63448eba94ff16d03
[ "Apache-2.0" ]
4
2020-10-15T13:03:17.000Z
2022-01-13T13:29:53.000Z
from codecs import open from os import path from setuptools import setup, find_packages here = path.abspath(path.dirname(__file__)) # Get the long description from the README file with open(path.join(here, 'README.md'), encoding='utf-8') as f: long_description = f.read() # get the dependencies and installs with ...
35.292683
103
0.683483
from codecs import open from os import path from setuptools import setup, find_packages here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'README.md'), encoding='utf-8') as f: long_description = f.read() with open(path.join(here, 'requirements.txt'), encoding='utf-8') as f: all_reqs = f.r...
true
true
f75b92d1071499fc31b2187f2da8b758f5958d6d
9,573
py
Python
sdk/python/core/tests/test_entity_diff.py
xulleon/ydk-gen
2a6e8bd89e3cdae4287297a3d02cdeaa838744bc
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/core/tests/test_entity_diff.py
xulleon/ydk-gen
2a6e8bd89e3cdae4287297a3d02cdeaa838744bc
[ "ECL-2.0", "Apache-2.0" ]
2
2021-03-09T16:30:36.000Z
2021-08-31T11:22:53.000Z
sdk/python/core/tests/test_entity_diff.py
xulleon/ydk-gen
2a6e8bd89e3cdae4287297a3d02cdeaa838744bc
[ "ECL-2.0", "Apache-2.0" ]
1
2021-02-18T13:33:21.000Z
2021-02-18T13:33:21.000Z
# ---------------------------------------------------------------- # Copyright 2019 Cisco Systems # # 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/LICENS...
37.249027
124
0.628748
from __future__ import print_function import unittest from ydk.types import entity_to_dict, entity_diff, path_to_entity from ydk.models.ydktest import ydktest_sanity as ysanity def check_empty_str_value(v): if isinstance(v, str) and v.__len__() == 0: v = 'exists' return v def print_dictionary(...
true
true
f75b92fa03bdde8f5ba21092adc207898a2ce730
2,320
py
Python
mla/metrics/tests/test_metrics.py
maheshacherrypick/MLAlgorithms
12e7c8770e7f9ed0d3bb29f2b1ae957029c454cf
[ "MIT" ]
4
2017-02-18T15:40:31.000Z
2018-04-23T07:41:58.000Z
mla/metrics/tests/test_metrics.py
zhenghuangcheng/ML_Algorithms
829c74cf7d79307fc6ca1d849e65b959fb10e5de
[ "MIT" ]
1
2021-06-25T15:40:35.000Z
2021-06-25T15:40:35.000Z
mla/metrics/tests/test_metrics.py
zhenghuangcheng/ML_Algorithms
829c74cf7d79307fc6ca1d849e65b959fb10e5de
[ "MIT" ]
3
2017-06-27T20:42:00.000Z
2019-09-14T10:50:10.000Z
from __future__ import division import numpy as np import pytest from numpy.testing import assert_almost_equal from mla.metrics.base import check_data, validate_input from mla.metrics.metrics import get_metric def test_data_validation(): with pytest.raises(ValueError): check_data([], 1) with pytest...
26.067416
72
0.568103
from __future__ import division import numpy as np import pytest from numpy.testing import assert_almost_equal from mla.metrics.base import check_data, validate_input from mla.metrics.metrics import get_metric def test_data_validation(): with pytest.raises(ValueError): check_data([], 1) with pytest...
true
true
f75b93e77c30c291d3a0c4a393b47942ebc5e30d
302
py
Python
invenio_dm_tugraz/mappings/v7/__init__.py
freelion93/invenio-dm-tugraz
7812168a53d8279d819fde75c27ee4b260928734
[ "MIT" ]
null
null
null
invenio_dm_tugraz/mappings/v7/__init__.py
freelion93/invenio-dm-tugraz
7812168a53d8279d819fde75c27ee4b260928734
[ "MIT" ]
null
null
null
invenio_dm_tugraz/mappings/v7/__init__.py
freelion93/invenio-dm-tugraz
7812168a53d8279d819fde75c27ee4b260928734
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright (C) 2020 CERN. # # invenio-dm-tugraz is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """Mappings for Elasticsearch 7.x.""" from __future__ import absolute_import, print_function
27.454545
78
0.731788
from __future__ import absolute_import, print_function
true
true
f75b95a029d4024af2c7bbe319810adb0338b3d0
8,196
py
Python
twisted/mail/test/test_options.py
sxamit/twisted
30f6966329c857c3631c60aeb420d84d7828e01e
[ "MIT", "Unlicense" ]
1
2017-08-07T14:52:02.000Z
2017-08-07T14:52:02.000Z
Lib/site-packages/twisted/mail/test/test_options.py
adzhou/Python27
a7113b69d54a04cc780143241c2f1fe81939ad3a
[ "bzip2-1.0.6" ]
null
null
null
Lib/site-packages/twisted/mail/test/test_options.py
adzhou/Python27
a7113b69d54a04cc780143241c2f1fe81939ad3a
[ "bzip2-1.0.6" ]
1
2018-11-07T12:52:07.000Z
2018-11-07T12:52:07.000Z
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.mail.tap}. """ from twisted.trial.unittest import TestCase from twisted.python.usage import UsageError from twisted.mail import protocols from twisted.mail.tap import Options, makeService from twisted.python.filepath impo...
33.317073
80
0.627989
from twisted.trial.unittest import TestCase from twisted.python.usage import UsageError from twisted.mail import protocols from twisted.mail.tap import Options, makeService from twisted.python.filepath import FilePath from twisted.python.reflect import requireModule from twisted.internet import endpoints, defer if ...
true
true
f75b96c40623387be1f9ec38d376757b0b7c9339
9,844
py
Python
nltk/sem/util.py
joelgrondman/nltk205sslfix
ca141115a2a4d11da62b43f204285bcc74bcbda6
[ "Apache-2.0" ]
137
2015-03-14T06:16:37.000Z
2022-03-27T08:32:38.000Z
nltk/sem/util.py
shareablee/nltk-2.0.5
f0c0862c4bcc726bc635d7e1a34e714ac35753ca
[ "Apache-2.0" ]
2
2020-08-09T17:03:47.000Z
2020-08-19T06:45:17.000Z
nltk/sem/util.py
shareablee/nltk-2.0.5
f0c0862c4bcc726bc635d7e1a34e714ac35753ca
[ "Apache-2.0" ]
57
2015-01-06T14:18:27.000Z
2021-12-26T09:37:30.000Z
# Natural Language Toolkit: Semantic Interpretation # # Author: Ewan Klein <ewan@inf.ed.ac.uk> # # Copyright (C) 2001-2012 NLTK Project # URL: <http://www.nltk.org/> # For license information, see LICENSE.TXT """ Utility functions for batch-processing sentences: parsing and extraction of the semantic representation of...
32.169935
117
0.578423
""" Utility functions for batch-processing sentences: parsing and extraction of the semantic representation of the root node of the the syntax tree, followed by evaluation of the semantic representation in a first-order model. """ import evaluate import re def batch_parse(inputs, grammar, trace=0): """ Con...
false
true
f75b98564bb5b3dbd67314573125a83ca579baf8
1,257
py
Python
Configuration/Generator/python/QCD_Pt_1800_2400_14TeV_TuneCP5_cfi.py
Purva-Chaudhari/cmssw
32e5cbfe54c4d809d60022586cf200b7c3020bcf
[ "Apache-2.0" ]
852
2015-01-11T21:03:51.000Z
2022-03-25T21:14:00.000Z
Configuration/Generator/python/QCD_Pt_1800_2400_14TeV_TuneCP5_cfi.py
Purva-Chaudhari/cmssw
32e5cbfe54c4d809d60022586cf200b7c3020bcf
[ "Apache-2.0" ]
30,371
2015-01-02T00:14:40.000Z
2022-03-31T23:26:05.000Z
Configuration/Generator/python/QCD_Pt_1800_2400_14TeV_TuneCP5_cfi.py
Purva-Chaudhari/cmssw
32e5cbfe54c4d809d60022586cf200b7c3020bcf
[ "Apache-2.0" ]
3,240
2015-01-02T05:53:18.000Z
2022-03-31T17:24:21.000Z
import FWCore.ParameterSet.Config as cms from Configuration.Generator.Pythia8CommonSettings_cfi import * from Configuration.Generator.MCTunes2017.PythiaCP5Settings_cfi import * generator = cms.EDFilter("Pythia8ConcurrentGeneratorFilter", pythiaHepMCVerbosity = cms.untracked.bool(False), ...
46.555556
89
0.546539
import FWCore.ParameterSet.Config as cms from Configuration.Generator.Pythia8CommonSettings_cfi import * from Configuration.Generator.MCTunes2017.PythiaCP5Settings_cfi import * generator = cms.EDFilter("Pythia8ConcurrentGeneratorFilter", pythiaHepMCVerbosity = cms.untracked.bool(False), ...
true
true
f75b995222f5546c36705dec64647e6afea6f8c6
4,457
py
Python
day2/tf2-dvc-cnn-evaluate.py
wikfeldt/intro-to-dl
7fb1fb6c520941143000c5e1b46c48c95db17ed6
[ "MIT" ]
null
null
null
day2/tf2-dvc-cnn-evaluate.py
wikfeldt/intro-to-dl
7fb1fb6c520941143000c5e1b46c48c95db17ed6
[ "MIT" ]
null
null
null
day2/tf2-dvc-cnn-evaluate.py
wikfeldt/intro-to-dl
7fb1fb6c520941143000c5e1b46c48c95db17ed6
[ "MIT" ]
null
null
null
# coding: utf-8 # # Dogs-vs-cats classification with CNNs # # In this notebook, we'll train a convolutional neural network (CNN, # ConvNet) to classify images of dogs from images of cats using # TensorFlow 2.0 / Keras. This notebook is largely based on the blog # post [Building powerful image classification models u...
31.609929
112
0.695086
# ConvNet) to classify images of dogs from images of cats using # TensorFlow 2.0 / Keras. This notebook is largely based on the blog # post [Building powerful image classification models using very # little data] # (https://blog.keras.io/building-powerful-image-classification-models-using-very-little-data.html) # by ...
true
true
f75b99772702998a33670eb0f92f858aaa8ac01c
5,105
py
Python
entity/export_spell.py
wenhr/lushi_script
b067e811b0179654046ba0e3b947795f31b44e5e
[ "MIT" ]
null
null
null
entity/export_spell.py
wenhr/lushi_script
b067e811b0179654046ba0e3b947795f31b44e5e
[ "MIT" ]
null
null
null
entity/export_spell.py
wenhr/lushi_script
b067e811b0179654046ba0e3b947795f31b44e5e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import json import os import re from tqdm import tqdm from mercenaries import MERCENARIES from hearthstone.mercenaryxml import load import requests dbfData = {} def loadjson(): # file_list = requests.get("https://api.hearthstonejson.com/v1/").text # ver_list = list(map(int, re.finda...
27.744565
89
0.513222
import json import os import re from tqdm import tqdm from mercenaries import MERCENARIES from hearthstone.mercenaryxml import load import requests dbfData = {} def loadjson(): cardJson_File = '124497.json' with open(cardJs...
true
true
f75b9a482fc9bce6c9f94e076477c5358dd57f41
25,295
py
Python
pyglet/window/cocoa/__init__.py
qbektrix/pyglet
ab3f73dfd37abf75041e86310416b18138c34c33
[ "BSD-3-Clause" ]
2
2015-06-02T19:14:37.000Z
2017-09-17T03:49:19.000Z
pyglet/window/cocoa/__init__.py
qbektrix/pyglet
ab3f73dfd37abf75041e86310416b18138c34c33
[ "BSD-3-Clause" ]
1
2018-08-27T22:31:16.000Z
2018-08-27T22:31:16.000Z
pyglet/window/cocoa/__init__.py
qbektrix/pyglet
ab3f73dfd37abf75041e86310416b18138c34c33
[ "BSD-3-Clause" ]
2
2016-07-28T18:45:57.000Z
2020-12-05T06:13:00.000Z
# ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2008 Alex Holkner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistribu...
41.809917
99
0.633999
__docformat__ = 'restructuredtext' __version__ = '$Id: $' from ctypes import * import pyglet from pyglet.window import BaseWindow, WindowException from pyglet.window import MouseCursor, DefaultMouseCursor from pyglet.event import EventDispatcher from pyglet.canvas.cocoa import CocoaCanvas from pyglet.libs.darwin....
true
true
f75b9a79c6c9c5d3087d916d792b3a319656ea1b
185
py
Python
src/sibling/run_sibling.py
valhuber/inheritance
f2bfa5bf99a0c8daf790fc0da8e2d1b7cab3ea7d
[ "BSD-3-Clause" ]
null
null
null
src/sibling/run_sibling.py
valhuber/inheritance
f2bfa5bf99a0c8daf790fc0da8e2d1b7cab3ea7d
[ "BSD-3-Clause" ]
null
null
null
src/sibling/run_sibling.py
valhuber/inheritance
f2bfa5bf99a0c8daf790fc0da8e2d1b7cab3ea7d
[ "BSD-3-Clause" ]
null
null
null
import src.inheritance_pkg.sub as sub # works PyC, FAILS vsc in sub.py print("running from sibling of target code, ala https://github.com/valhuber/fab-quickstart") my_sub = sub.Sub()
37
92
0.756757
import src.inheritance_pkg.sub as sub print("running from sibling of target code, ala https://github.com/valhuber/fab-quickstart") my_sub = sub.Sub()
true
true
f75b9abfce6b9d6fafa1363911b57ef31ad012af
1,934
py
Python
dynamic_dynamodb/test_scaling_metrics.py
Afterverse/dynamic-dynamodb
bfd0ca806b1c3301e724696de90ef0f973410493
[ "Apache-2.0" ]
518
2015-01-23T01:00:35.000Z
2022-03-28T07:36:02.000Z
dynamic_dynamodb/test_scaling_metrics.py
Afterverse/dynamic-dynamodb
bfd0ca806b1c3301e724696de90ef0f973410493
[ "Apache-2.0" ]
114
2015-01-07T14:44:03.000Z
2022-02-08T12:52:14.000Z
dynamic_dynamodb/test_scaling_metrics.py
Afterverse/dynamic-dynamodb
bfd0ca806b1c3301e724696de90ef0f973410493
[ "Apache-2.0" ]
121
2015-01-29T08:13:32.000Z
2022-02-08T19:40:30.000Z
# -*- coding: utf-8 -*- """ Testing the Dynamic DynamoDB scaling methods """ import unittest from dynamic_dynamodb.core.table import scale_reader class TestScaleReader(unittest.TestCase): """ Test the scale reader method """ def __init__(self): self.value = {0: 0, 0.25: 5, 0.5: 10, 1: 20, 2: 50, 5: ...
31.704918
70
0.643226
import unittest from dynamic_dynamodb.core.table import scale_reader class TestScaleReader(unittest.TestCase): def __init__(self): self.value = {0: 0, 0.25: 5, 0.5: 10, 1: 20, 2: 50, 5: 100} def test_scale_reader_zero(self): result = scale_reader(self.value, 0, 80) self.assertEqual(...
true
true
f75b9b45b553bf1c5fb14930c2a80a78d220233e
600
py
Python
grove/tests/jordan_gradient/test_gradient_utils.py
msohaibalam/grove
8c27a5d12923d6ace57956db6a249e8d01e33f35
[ "Apache-2.0" ]
1
2020-07-15T15:40:49.000Z
2020-07-15T15:40:49.000Z
grove/tests/jordan_gradient/test_gradient_utils.py
msohaibalam/grove
8c27a5d12923d6ace57956db6a249e8d01e33f35
[ "Apache-2.0" ]
null
null
null
grove/tests/jordan_gradient/test_gradient_utils.py
msohaibalam/grove
8c27a5d12923d6ace57956db6a249e8d01e33f35
[ "Apache-2.0" ]
1
2021-11-27T16:20:00.000Z
2021-11-27T16:20:00.000Z
import numpy as np from grove.alpha.jordan_gradient.gradient_utils import binary_to_real, \ measurements_to_bf def test_binary_to_real(): for sign in [1, -1]: decimal_rep = sign * 0.345703125 binary_rep = str(sign * 0.010110001) decimal_convert = binary_to_real(binary_rep) a...
25
72
0.688333
import numpy as np from grove.alpha.jordan_gradient.gradient_utils import binary_to_real, \ measurements_to_bf def test_binary_to_real(): for sign in [1, -1]: decimal_rep = sign * 0.345703125 binary_rep = str(sign * 0.010110001) decimal_convert = binary_to_real(binary_rep) a...
true
true
f75b9b9647005c21e38a99bf926273af8a143343
814
py
Python
tests/test_cli.py
brunobord/static-markdown
7d9d7f3b76068087b3754cf15d2ae4d2dc2a5531
[ "MIT" ]
5
2019-06-14T10:10:07.000Z
2021-12-20T17:46:53.000Z
tests/test_cli.py
brunobord/static-markdown
7d9d7f3b76068087b3754cf15d2ae4d2dc2a5531
[ "MIT" ]
13
2019-06-13T21:00:58.000Z
2021-05-12T19:35:40.000Z
tests/test_cli.py
brunobord/static-markdown
7d9d7f3b76068087b3754cf15d2ae4d2dc2a5531
[ "MIT" ]
null
null
null
from unittest.mock import MagicMock, patch from static_markdown.server import main def test_main_regular_call(): with patch("argparse.ArgumentParser.parse_args") as argument_mock: argument_mock.return_value = MagicMock(version=False, root=".", port=9999) with patch("http.server.HTTPServer.serve_f...
37
82
0.701474
from unittest.mock import MagicMock, patch from static_markdown.server import main def test_main_regular_call(): with patch("argparse.ArgumentParser.parse_args") as argument_mock: argument_mock.return_value = MagicMock(version=False, root=".", port=9999) with patch("http.server.HTTPServer.serve_f...
true
true
f75b9d3ac6d3365348e85add200c9a1797c56001
4,674
py
Python
LNCE/python/INCS.py
spatialucr/lne
951df7334c1495a133f6fc982eaa1d366f08a68b
[ "BSD-3-Clause" ]
null
null
null
LNCE/python/INCS.py
spatialucr/lne
951df7334c1495a133f6fc982eaa1d366f08a68b
[ "BSD-3-Clause" ]
1
2019-06-05T21:56:14.000Z
2019-06-05T21:56:14.000Z
LNCE/python/INCS.py
spatialucr/lne
951df7334c1495a133f6fc982eaa1d366f08a68b
[ "BSD-3-Clause" ]
2
2018-12-20T23:11:17.000Z
2019-06-05T21:36:56.000Z
""" Indicators of Neighborhood Change """ from collections import defaultdict import numpy as np def _labels_to_neighborhoods(labels): """Convert a list of labels to neighborhoods dictionary Arguments --------- labels: list of neighborhood labels Returns ------- neighborhoods: dictionary ...
35.142857
95
0.539153
from collections import defaultdict import numpy as np def _labels_to_neighborhoods(labels): neighborhoods = defaultdict(list) for i, label in enumerate(labels): neighborhoods[label].append(i) return neighborhoods def linc(labels_sequence): ltn = _labels_to_neighborhoods neig...
true
true
f75b9d43ef33af6db834669ac108cd81a82925a3
5,939
py
Python
dashboard.py
justinpak13/Watch-Analysis
a7ce05c4fef859d66675d801e8a05f3f7e8e8d4e
[ "MIT" ]
null
null
null
dashboard.py
justinpak13/Watch-Analysis
a7ce05c4fef859d66675d801e8a05f3f7e8e8d4e
[ "MIT" ]
null
null
null
dashboard.py
justinpak13/Watch-Analysis
a7ce05c4fef859d66675d801e8a05f3f7e8e8d4e
[ "MIT" ]
null
null
null
import dash from dash.dependencies import Input, Output from dash import dash_table from dash import dcc from dash import html import pandas as pd # Import data into pandas df = pd.read_csv("data.csv") df["Condition"] = df["Condition Category"] df = df.drop(["Condition Category", "Missed Prices", "Index", "SKU"], axis...
31.590426
86
0.450918
import dash from dash.dependencies import Input, Output from dash import dash_table from dash import dcc from dash import html import pandas as pd df = pd.read_csv("data.csv") df["Condition"] = df["Condition Category"] df = df.drop(["Condition Category", "Missed Prices", "Index", "SKU"], axis=1) df = df[ [ ...
true
true
f75ba00d5230cda25fb4fb86ac7bfae6aadda677
6,873
py
Python
policy_value_net.py
xsir317/AlphaRenju
d5fdcf8d1442e4e43661a4cee88c95d5c25fd45a
[ "MIT" ]
6
2019-02-22T17:47:15.000Z
2020-08-28T18:46:05.000Z
policy_value_net.py
xsir317/AlphaRenju
d5fdcf8d1442e4e43661a4cee88c95d5c25fd45a
[ "MIT" ]
null
null
null
policy_value_net.py
xsir317/AlphaRenju
d5fdcf8d1442e4e43661a4cee88c95d5c25fd45a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ An implementation of the policyValueNet in Tensorflow Tested in Tensorflow 1.4 and 1.5 @author: Xiang Zhong """ import numpy as np import tensorflow as tf class PolicyValueNet(): def __init__(self, model_file=None): self.model_file = model_file self.loss_weight = [1.0...
45.82
136
0.557835
import numpy as np import tensorflow as tf class PolicyValueNet(): def __init__(self, model_file=None): self.model_file = model_file self.loss_weight = [1.0,0.1] self.input_states = tf.placeholder( tf.float32, shape=[None, 3, 15, 15]) self....
true
true
f75ba048348160d9a556d711adf79144a574bf0a
6,099
py
Python
tools/lib/uobjnew.py
mrks/bcc
321c9c979889abce48d0844b3d539ec9a01e6f3c
[ "Apache-2.0" ]
2
2020-08-14T16:41:10.000Z
2021-07-07T15:10:33.000Z
tools/lib/uobjnew.py
mrks/bcc
321c9c979889abce48d0844b3d539ec9a01e6f3c
[ "Apache-2.0" ]
9
2021-07-29T21:15:28.000Z
2022-02-16T18:17:49.000Z
tools/lib/uobjnew.py
mrks/bcc
321c9c979889abce48d0844b3d539ec9a01e6f3c
[ "Apache-2.0" ]
3
2016-09-16T12:09:38.000Z
2022-03-26T22:45:56.000Z
#!/usr/bin/python # @lint-avoid-python-3-compatibility-imports # # uobjnew Summarize object allocations in high-level languages. # For Linux, uses BCC, eBPF. # # USAGE: uobjnew [-h] [-T TOP] [-v] {c,java,ruby,tcl} pid [interval] # # Copyright 2016 Sasha Goldshtein # Licensed under the Apache License, Version ...
28.905213
78
0.627152
from __future__ import print_function import argparse from bcc import BPF, USDT, utils from time import sleep import os languages = ["c", "java", "ruby", "tcl"] examples = """examples: ./uobjnew -l java 145 # summarize Java allocations in process 145 ./uobjnew -l c 2020 1 # grab malloc() size...
true
true
f75ba07b5b28c452cc03c74482f21cbdd17a28fb
174
py
Python
catalog/urls.py
Rezakarimpy/SUS
0cbb262a699326a412d46a81a32771bfcf48cc51
[ "Apache-2.0" ]
null
null
null
catalog/urls.py
Rezakarimpy/SUS
0cbb262a699326a412d46a81a32771bfcf48cc51
[ "Apache-2.0" ]
null
null
null
catalog/urls.py
Rezakarimpy/SUS
0cbb262a699326a412d46a81a32771bfcf48cc51
[ "Apache-2.0" ]
null
null
null
from django.urls import path from . import views urlpatterns = [ path('', views.index, name='index'), path('books/', views.BookListView.as_view(), name='books'), ]
24.857143
63
0.66092
from django.urls import path from . import views urlpatterns = [ path('', views.index, name='index'), path('books/', views.BookListView.as_view(), name='books'), ]
true
true
f75ba180ecdfbd31a3fd793113149d2c21d996a2
4,336
py
Python
multiagent/scenarios/simple_push.py
enikon/MACP
2de004d4eaf09f3b02dde3b7041ce6d693d0c25c
[ "MIT" ]
null
null
null
multiagent/scenarios/simple_push.py
enikon/MACP
2de004d4eaf09f3b02dde3b7041ce6d693d0c25c
[ "MIT" ]
null
null
null
multiagent/scenarios/simple_push.py
enikon/MACP
2de004d4eaf09f3b02dde3b7041ce6d693d0c25c
[ "MIT" ]
null
null
null
import numpy as np from multiagent.core import World, Agent, Landmark from multiagent import BaseScenario class Scenario(BaseScenario): def make_world(self): world = World() # set any world properties first world.dim_c = 2 num_agents = 2 num_adversaries = 1 num_landm...
44.701031
159
0.609779
import numpy as np from multiagent.core import World, Agent, Landmark from multiagent import BaseScenario class Scenario(BaseScenario): def make_world(self): world = World() world.dim_c = 2 num_agents = 2 num_adversaries = 1 num_landmarks = 2 world.ag...
true
true
f75ba23771b83aaa8ca070e38427a4bc8563931b
375
py
Python
array/subsetsWithDup.py
saai/LeetcodePythonSolutions
201f2054dda3f303ae6a376b40cbc7f98688322c
[ "MIT" ]
null
null
null
array/subsetsWithDup.py
saai/LeetcodePythonSolutions
201f2054dda3f303ae6a376b40cbc7f98688322c
[ "MIT" ]
null
null
null
array/subsetsWithDup.py
saai/LeetcodePythonSolutions
201f2054dda3f303ae6a376b40cbc7f98688322c
[ "MIT" ]
null
null
null
class Solution: # @param {integer[]} nums # @return {integer[][]} def subsetsWithDup(self, nums): res = [[]] nums.sort() for num in nums: temp = [] for ans in res: l = ans + [num] if l not in res: temp.ap...
26.785714
35
0.416
class Solution: def subsetsWithDup(self, nums): res = [[]] nums.sort() for num in nums: temp = [] for ans in res: l = ans + [num] if l not in res: temp.append(l) res.extend(temp) retur...
true
true
f75ba258cde83850ba269f95677cd45130cbf2bf
66
py
Python
src/devlog/_version.py
zgoda/devlog
60f366c644f18a47d625e2dd55260e0f6ee79f9f
[ "MIT" ]
1
2019-04-15T13:11:39.000Z
2019-04-15T13:11:39.000Z
src/devlog/_version.py
zgoda/devlog
60f366c644f18a47d625e2dd55260e0f6ee79f9f
[ "MIT" ]
12
2019-03-11T23:16:12.000Z
2022-02-25T20:07:13.000Z
src/devlog/_version.py
zgoda/devlog
60f366c644f18a47d625e2dd55260e0f6ee79f9f
[ "MIT" ]
null
null
null
__version__ = '0.8.0' def get_version(): return __version__
11
22
0.681818
__version__ = '0.8.0' def get_version(): return __version__
true
true
f75ba41bee5e06a61d6168f53bd5e9fc556fcdbf
527
py
Python
supriya/osc/__init__.py
butayama/supriya
0c197324ecee4232381221880d1f40e109bb756c
[ "MIT" ]
191
2015-11-13T02:28:42.000Z
2022-03-29T10:26:44.000Z
supriya/osc/__init__.py
butayama/supriya
0c197324ecee4232381221880d1f40e109bb756c
[ "MIT" ]
130
2016-01-04T16:59:02.000Z
2022-02-26T15:37:20.000Z
supriya/osc/__init__.py
butayama/supriya
0c197324ecee4232381221880d1f40e109bb756c
[ "MIT" ]
22
2016-05-04T10:32:16.000Z
2022-02-26T19:22:45.000Z
""" Tools for sending, receiving and handling OSC messages. """ from .captures import Capture, CaptureEntry from .messages import OscBundle, OscMessage from .protocols import ( AsyncOscProtocol, HealthCheck, OscCallback, OscProtocol, ThreadedOscProtocol, ) from .utils import find_free_port __all__...
18.821429
55
0.688805
from .captures import Capture, CaptureEntry from .messages import OscBundle, OscMessage from .protocols import ( AsyncOscProtocol, HealthCheck, OscCallback, OscProtocol, ThreadedOscProtocol, ) from .utils import find_free_port __all__ = [ "AsyncOscProtocol", "Capture", "CaptureEntry", ...
true
true
f75ba446d2142f30cbf959cf37f9751c97616388
3,291
py
Python
bindings/python/ensmallen/datasets/networkrepository/techroutersrf.py
AnacletoLAB/ensmallen_graph
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
5
2021-02-17T00:44:45.000Z
2021-08-09T16:41:47.000Z
bindings/python/ensmallen/datasets/networkrepository/techroutersrf.py
AnacletoLAB/ensmallen_graph
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
18
2021-01-07T16:47:39.000Z
2021-08-12T21:51:32.000Z
bindings/python/ensmallen/datasets/networkrepository/techroutersrf.py
AnacletoLAB/ensmallen
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
3
2021-01-14T02:20:59.000Z
2021-08-04T19:09:52.000Z
""" This file offers the methods to automatically retrieve the graph tech-routers-rf. The graph is automatically retrieved from the NetworkRepository repository. References --------------------- Please cite the following if you use the data: ```bib @inproceedings{nr, title = {The Network Data Repository with I...
28.617391
94
0.639319
from typing import Dict from ..automatic_graph_retrieval import AutomaticallyRetrievedGraph from ...ensmallen import Graph def TechRoutersRf( directed: bool = False, preprocess: bool = True, load_nodes: bool = True, verbose: int = 2, cache: bool = True, cache_path: str = "graphs/networkrepos...
true
true
f75ba525e8e110e4831b54a2d2a902640c0b4c7c
1,455
py
Python
submit/Task3.py
billgavin/udacity-python
843b984ed44d80e2bbfd0d295afa6321cf93773b
[ "MIT" ]
null
null
null
submit/Task3.py
billgavin/udacity-python
843b984ed44d80e2bbfd0d295afa6321cf93773b
[ "MIT" ]
null
null
null
submit/Task3.py
billgavin/udacity-python
843b984ed44d80e2bbfd0d295afa6321cf93773b
[ "MIT" ]
null
null
null
#encoding:utf-8 """ 下面的文件将会从csv文件中读取读取短信与电话记录, 你将在以后的课程中了解更多有关读取文件的知识。 """ import csv with open('texts.csv', 'r') as f: reader = csv.reader(f) texts = list(reader) with open('calls.csv', 'r') as f: reader = csv.reader(f) calls = list(reader) """ 任务3: (080)是班加罗尔的固定电话区号。 固定电话号码包含括号, 所以班加罗尔地区的电话号码的格式为(0...
24.661017
120
0.709278
import csv with open('texts.csv', 'r') as f: reader = csv.reader(f) texts = list(reader) with open('calls.csv', 'r') as f: reader = csv.reader(f) calls = list(reader) bang_calls = {} for i in calls: incomming = i[0] answer = i[1] if not incomming.startswith('(080)'): continue ...
true
true
f75ba5b841cf58e6c22cdffcf467ff5d4d48dcf3
673
py
Python
textattack/transformations/word_deletion.py
bouhoula/TextAttack
10309a32deb9b7daeafa3434b4a3bfea990f442b
[ "MIT" ]
1,980
2020-04-17T23:43:55.000Z
2022-03-31T19:22:17.000Z
textattack/transformations/word_deletion.py
bouhoula/TextAttack
10309a32deb9b7daeafa3434b4a3bfea990f442b
[ "MIT" ]
350
2020-04-23T22:34:04.000Z
2022-03-29T20:57:22.000Z
textattack/transformations/word_deletion.py
bouhoula/TextAttack
10309a32deb9b7daeafa3434b4a3bfea990f442b
[ "MIT" ]
267
2020-04-30T16:55:36.000Z
2022-03-31T18:59:46.000Z
""" word deletion Transformation ============================================ """ from .transformation import Transformation class WordDeletion(Transformation): """An abstract class that takes a sentence and transforms it by deleting a single word. letters_to_insert (string): letters allowed for insert...
28.041667
78
0.656761
from .transformation import Transformation class WordDeletion(Transformation): def _get_transformations(self, current_text, indices_to_modify): transformed_texts = [] if len(current_text.words) > 1: for i in indices_to_modify: transformed_texts.append(current_...
true
true
f75ba6280719eb8858664f19e4b0627d4bd26dba
3,034
py
Python
rockAtlas/tests/test_database.py
thespacedoctor/rockAtlas
c7dadd9240e1155c652e7f1e3c924ab2ce8b3a21
[ "MIT" ]
3
2018-09-25T09:54:52.000Z
2020-05-09T11:25:38.000Z
rockAtlas/tests/test_database.py
thespacedoctor/rockAtlas
c7dadd9240e1155c652e7f1e3c924ab2ce8b3a21
[ "MIT" ]
8
2018-01-24T11:15:19.000Z
2019-07-19T13:48:09.000Z
rockAtlas/tests/test_database.py
thespacedoctor/rockAtlas
c7dadd9240e1155c652e7f1e3c924ab2ce8b3a21
[ "MIT" ]
null
null
null
import os import nose import shutil import yaml import unittest from rockAtlas import database, cl_utils from rockAtlas.utKit import utKit from fundamentals import tools su = tools( arguments={"settingsFile": None}, docString=__doc__, logLevel="DEBUG", options_first=False, projectName="rockAtlas" ...
24.079365
66
0.611734
import os import nose import shutil import yaml import unittest from rockAtlas import database, cl_utils from rockAtlas.utKit import utKit from fundamentals import tools su = tools( arguments={"settingsFile": None}, docString=__doc__, logLevel="DEBUG", options_first=False, projectName="rockAtlas" ...
false
true
f75ba79751e6702c4a69108ec478a252f68cbd3d
1,033
py
Python
mat/mat/modules/android/static/secretcodes.py
minkione/mat
8aaec2c9abbc1b837749e5fb084df4665e7ec35c
[ "BSD-3-Clause" ]
null
null
null
mat/mat/modules/android/static/secretcodes.py
minkione/mat
8aaec2c9abbc1b837749e5fb084df4665e7ec35c
[ "BSD-3-Clause" ]
null
null
null
mat/mat/modules/android/static/secretcodes.py
minkione/mat
8aaec2c9abbc1b837749e5fb084df4665e7ec35c
[ "BSD-3-Clause" ]
1
2019-09-21T16:12:04.000Z
2019-09-21T16:12:04.000Z
from mat.utils.utils import Issue class Issue(Issue): TITLE = 'Secret Codes Search Check' DESCRIPTION = 'Looks for secret codes in the application' ID = 'secret-codes' ISSUE_TITLE = 'Application Has Secret Codes' FINDINGS = 'The Team found the following secret codes associated w...
36.892857
172
0.642788
from mat.utils.utils import Issue class Issue(Issue): TITLE = 'Secret Codes Search Check' DESCRIPTION = 'Looks for secret codes in the application' ID = 'secret-codes' ISSUE_TITLE = 'Application Has Secret Codes' FINDINGS = 'The Team found the following secret codes associated w...
true
true
f75ba7a55b37f17aadc72f93d321748efc8b7c38
20,582
py
Python
cwltool/builder.py
PlatformedTasks/PLAS-cwl-tes
5e66a5f9309906d1e8caa0f7148b8517a17f840d
[ "Apache-2.0" ]
null
null
null
cwltool/builder.py
PlatformedTasks/PLAS-cwl-tes
5e66a5f9309906d1e8caa0f7148b8517a17f840d
[ "Apache-2.0" ]
null
null
null
cwltool/builder.py
PlatformedTasks/PLAS-cwl-tes
5e66a5f9309906d1e8caa0f7148b8517a17f840d
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import import copy import os import logging from typing import (Any, Callable, Dict, List, MutableMapping, MutableSequence, Optional, Set, Tuple, Union) from typing_extensions import Text, Type, TYPE_CHECKING # pylint: disable=unused-import # move to a regular typi...
45.535398
165
0.541347
from __future__ import absolute_import import copy import os import logging from typing import (Any, Callable, Dict, List, MutableMapping, MutableSequence, Optional, Set, Tuple, Union) from typing_extensions import Text, Type, TYPE_CHECKING from rdflib import Graph, URIRef from rdflib.namespace...
true
true
f75ba7d5088188e103864d83b3c0aab64aa20b1a
34,762
py
Python
tests/integration/test_sns.py
zonywhoop/localstack
673e1a23374362c64606fb36c0746ee29cbf5553
[ "Apache-2.0" ]
2
2021-02-06T10:07:22.000Z
2021-03-27T02:08:11.000Z
tests/integration/test_sns.py
zonywhoop/localstack
673e1a23374362c64606fb36c0746ee29cbf5553
[ "Apache-2.0" ]
1
2021-03-01T13:55:42.000Z
2021-03-01T13:55:42.000Z
tests/integration/test_sns.py
zonywhoop/localstack
673e1a23374362c64606fb36c0746ee29cbf5553
[ "Apache-2.0" ]
1
2021-01-10T03:21:47.000Z
2021-01-10T03:21:47.000Z
# -*- coding: utf-8 -*- import json import os import requests import time import unittest from botocore.exceptions import ClientError from localstack import config from localstack.utils import testutil from localstack.config import external_service_url from localstack.constants import TEST_AWS_ACCOUNT_ID from localsta...
43.506884
118
0.651602
import json import os import requests import time import unittest from botocore.exceptions import ClientError from localstack import config from localstack.utils import testutil from localstack.config import external_service_url from localstack.constants import TEST_AWS_ACCOUNT_ID from localstack.utils.aws import aws_...
true
true
f75ba8fcc31e18267a800445537075f8e521c3b9
32,198
py
Python
script/MergeBrain.py
lsb-riken/CUBIC-informatics
e7982072bb5d892f55e86cdf671376ab379b9b29
[ "MIT" ]
6
2019-11-23T18:45:19.000Z
2021-03-24T16:02:06.000Z
script/MergeBrain.py
lsb-riken/CUBIC-informatics
e7982072bb5d892f55e86cdf671376ab379b9b29
[ "MIT" ]
5
2020-01-30T18:04:29.000Z
2021-10-22T01:50:24.000Z
script/MergeBrain.py
lsb-riken/CUBIC-informatics
e7982072bb5d892f55e86cdf671376ab379b9b29
[ "MIT" ]
1
2019-09-12T07:57:07.000Z
2019-09-12T07:57:07.000Z
#!/usr/bin/env python #-*- coding:utf-8 -*- """Overview: Downscale images & cells for altas mapping Usage: MergeBrain.py images PARAM_FILE [-p NUM_CPUS] [--exec <path>] MergeBrain.py cells PARAM_FILE MergeBrain.py full PARAM_FILE [-p NUM_CPUS] [--exec <path>] Options: -h --help Show this screen. -...
50.946203
229
0.615349
import json, glob, os.path, shutil import tifffile import functools from docopt import docopt import joblib import subprocess as sp import pandas as pd import numpy as np from HalfBrainCells import HalfBrainCells from HalfBrainImages import HalfBrainImages dt_scalemerged = np.dtype([ ('scaled_x','f4'), ('scale...
true
true
f75ba92f1f1f6656d7f9a2b87243ff26be52a4e1
7,184
py
Python
xnmt/models/retrievers.py
neulab/xnmt
d93f8f3710f986f36eb54e9ff3976a6b683da2a4
[ "Apache-2.0" ]
195
2017-05-27T11:23:40.000Z
2021-09-28T06:03:24.000Z
xnmt/models/retrievers.py
neulab/xnmt
d93f8f3710f986f36eb54e9ff3976a6b683da2a4
[ "Apache-2.0" ]
386
2017-05-25T23:22:19.000Z
2020-05-03T13:57:28.000Z
xnmt/models/retrievers.py
neulab/xnmt
d93f8f3710f986f36eb54e9ff3976a6b683da2a4
[ "Apache-2.0" ]
53
2017-05-23T17:45:18.000Z
2021-04-18T12:36:37.000Z
import numpy as np from xnmt.settings import settings import xnmt from xnmt import batchers, expression_seqs from xnmt.models import base as models from xnmt.persistence import serializable_init, Serializable if xnmt.backend_dynet: import dynet as dy ##### A class for retrieval databases # This file contains datab...
37.222798
139
0.703508
import numpy as np from xnmt.settings import settings import xnmt from xnmt import batchers, expression_seqs from xnmt.models import base as models from xnmt.persistence import serializable_init, Serializable if xnmt.backend_dynet: import dynet as dy class StandardRetrievalDatabase(Serializable): yaml_tag = "!...
true
true
f75ba9942dca11af1f6071c68f9afc91fa4ace4c
650
py
Python
Examen2.py
JOSELIN-CONDORI/Examen-Joselin
af3392996c7f65a0bde36d1a9d81cbcee9a6dd79
[ "Apache-2.0" ]
null
null
null
Examen2.py
JOSELIN-CONDORI/Examen-Joselin
af3392996c7f65a0bde36d1a9d81cbcee9a6dd79
[ "Apache-2.0" ]
null
null
null
Examen2.py
JOSELIN-CONDORI/Examen-Joselin
af3392996c7f65a0bde36d1a9d81cbcee9a6dd79
[ "Apache-2.0" ]
null
null
null
def problema2(): #Definir variable y otros print("ingrese sus datos:") bonoObtenidoJMCT=0.0 #Datos de Entrada salarioMinimoJMCT=float(input("Ingrese el salario:")) puntuacionObtenidaJMCT=float(input("Ingrese la puntuación:")) #Proceso if puntuacionObtenidaJMCT<=100 and puntuacionObtenidaJMCT>=50: bo...
36.111111
68
0.781538
def problema2(): print("ingrese sus datos:") bonoObtenidoJMCT=0.0 salarioMinimoJMCT=float(input("Ingrese el salario:")) puntuacionObtenidaJMCT=float(input("Ingrese la puntuación:")) if puntuacionObtenidaJMCT<=100 and puntuacionObtenidaJMCT>=50: bonoObtenidoJMCT=salarioMinimoJMCT*10/100 elif puntua...
true
true
f75baa430d3476cbac1655372dcde5c7e6dfba58
1,901
py
Python
jupyterops.py
bipinKrishnan/jupyterops
58689e99caeaa247a9814ed026a61976dcb21887
[ "MIT" ]
null
null
null
jupyterops.py
bipinKrishnan/jupyterops
58689e99caeaa247a9814ed026a61976dcb21887
[ "MIT" ]
null
null
null
jupyterops.py
bipinKrishnan/jupyterops
58689e99caeaa247a9814ed026a61976dcb21887
[ "MIT" ]
null
null
null
import io import nbformat as nbf import os from typer import run from shutil import copyfile class JupyterOps: def extract_code(self, ipynb_name): ipynb_path = os.path.join(os.getcwd(), ipynb_name) save_file_path = 'extras' if os.path.exists(save_file_path): os.remove(save_file_path) with io...
27.955882
85
0.633877
import io import nbformat as nbf import os from typer import run from shutil import copyfile class JupyterOps: def extract_code(self, ipynb_name): ipynb_path = os.path.join(os.getcwd(), ipynb_name) save_file_path = 'extras' if os.path.exists(save_file_path): os.remove(save_file_path) with io...
true
true
f75baad97c465494eb3bd84e6c86cabed21dded5
430
py
Python
setup_db.py
gwynethbradbury/itdb
0664100b00ed8cf7d4565a0b2b90e089ad528733
[ "BSD-3-Clause" ]
null
null
null
setup_db.py
gwynethbradbury/itdb
0664100b00ed8cf7d4565a0b2b90e089ad528733
[ "BSD-3-Clause" ]
null
null
null
setup_db.py
gwynethbradbury/itdb
0664100b00ed8cf7d4565a0b2b90e089ad528733
[ "BSD-3-Clause" ]
null
null
null
import main.iaas.iaas as iaas iaas.db.create_all() d=[] d.append(iaas.DatabaseEngine('mysql+pymysql','MySQL')) d.append(iaas.DatabaseEngine('postgresql','PostgreSQL')) d.append(iaas.Group('all_users','All Users')) d.append(iaas.Group('superusers','Superuser')) d.append(iaas.Group('it_user','IT')) d.append(iaas.Gr...
21.5
60
0.723256
import main.iaas.iaas as iaas iaas.db.create_all() d=[] d.append(iaas.DatabaseEngine('mysql+pymysql','MySQL')) d.append(iaas.DatabaseEngine('postgresql','PostgreSQL')) d.append(iaas.Group('all_users','All Users')) d.append(iaas.Group('superusers','Superuser')) d.append(iaas.Group('it_user','IT')) d.append(iaas.Gr...
true
true
f75baaf58331ca957d8de94d2ee3bee1449d0ed4
5,128
py
Python
Fast Style Transfer/TensorFlow/train_fast_style_transfer.py
VamshikShetty/Neural-Style
44806accdfb9bb98aa15d3145563bf6759e9e604
[ "MIT" ]
1
2020-08-14T00:00:49.000Z
2020-08-14T00:00:49.000Z
Fast Style Transfer/TensorFlow/train_fast_style_transfer.py
VamshikShetty/Neural-Style
44806accdfb9bb98aa15d3145563bf6759e9e604
[ "MIT" ]
null
null
null
Fast Style Transfer/TensorFlow/train_fast_style_transfer.py
VamshikShetty/Neural-Style
44806accdfb9bb98aa15d3145563bf6759e9e604
[ "MIT" ]
null
null
null
import tensorflow as tf tf.reset_default_graph() from keras.applications.vgg19 import VGG19 import os from tensorflow.python.keras.preprocessing import image as kp_image from keras.models import Model from keras.layers import Dense, BatchNormalization,Dropout,concatenate from keras import backend as K from keras...
28.488889
163
0.702418
import tensorflow as tf tf.reset_default_graph() from keras.applications.vgg19 import VGG19 import os from tensorflow.python.keras.preprocessing import image as kp_image from keras.models import Model from keras.layers import Dense, BatchNormalization,Dropout,concatenate from keras import backend as K from keras...
true
true
f75bac2250f5e879ef4ca18984b5dd54ea2c93e1
882
py
Python
Revether/revether/ui/ui.py
Revether/Revether
06c6e1e9cc4578cc01ea57481087eaf69ae099d7
[ "BSD-3-Clause" ]
1
2019-10-01T18:43:39.000Z
2019-10-01T18:43:39.000Z
Revether/revether/ui/ui.py
Revether/Revether
06c6e1e9cc4578cc01ea57481087eaf69ae099d7
[ "BSD-3-Clause" ]
2
2019-10-01T09:04:28.000Z
2019-10-04T11:29:06.000Z
Revether/revether/ui/ui.py
Revether/Revether
06c6e1e9cc4578cc01ea57481087eaf69ae099d7
[ "BSD-3-Clause" ]
null
null
null
from PyQt5.QtWidgets import qApp, QMainWindow from save import SaveMenuAction, SaveMenuActionHandler from status_widget import StatusWidget class Ui(object): def __init__(self, plugin): plugin.logger.debug('Initating the plugin UI') # we need to find the ida main window in order to add #...
31.5
77
0.687075
from PyQt5.QtWidgets import qApp, QMainWindow from save import SaveMenuAction, SaveMenuActionHandler from status_widget import StatusWidget class Ui(object): def __init__(self, plugin): plugin.logger.debug('Initating the plugin UI') for widget in qApp.topLevelWidgets(): ...
true
true
f75bac316d3af29c6929066353243d38fff25b3c
682
py
Python
pyinpy/inject.py
leegohi/pyinpy
edbf4c35af1b07ad092c21e99cb78517a857fab9
[ "MIT" ]
1
2022-03-02T04:44:13.000Z
2022-03-02T04:44:13.000Z
pyinpy/inject.py
leegohi/pyinpy
edbf4c35af1b07ad092c21e99cb78517a857fab9
[ "MIT" ]
null
null
null
pyinpy/inject.py
leegohi/pyinpy
edbf4c35af1b07ad092c21e99cb78517a857fab9
[ "MIT" ]
null
null
null
from hypno import inject_py import sys import shutil from pathlib import Path class Injector: def __init__(self,pid,code_path): self.pid=pid self.code=code_path def __pre_run(self): pass def __check_env(self): pass def do_inject(self): inject_code="""import sys;sy...
32.47619
95
0.662757
from hypno import inject_py import sys import shutil from pathlib import Path class Injector: def __init__(self,pid,code_path): self.pid=pid self.code=code_path def __pre_run(self): pass def __check_env(self): pass def do_inject(self): inject_code="""import sys;sy...
true
true
f75bac3682a3c8426c5488adcb169b0514217183
2,337
py
Python
bootcamp/settings.py
cloudway/django-bootcamp
9d7eac8814d45094a849ce90dfe3709bead69c5a
[ "MIT" ]
null
null
null
bootcamp/settings.py
cloudway/django-bootcamp
9d7eac8814d45094a849ce90dfe3709bead69c5a
[ "MIT" ]
null
null
null
bootcamp/settings.py
cloudway/django-bootcamp
9d7eac8814d45094a849ce90dfe3709bead69c5a
[ "MIT" ]
null
null
null
import os from unipath import Path from decouple import config import dj_database_url PROJECT_DIR = Path(__file__).parent # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/1.6/howto/deployment/checklist/ SECRET_KEY = config('SECRET_KEY') # SECURITY WARNING: don'...
22.68932
71
0.723577
import os from unipath import Path from decouple import config import dj_database_url PROJECT_DIR = Path(__file__).parent SECRET_KEY = config('SECRET_KEY') DEBUG = config('DEBUG', default=False, cast=bool) TEMPLATE_DEBUG = DEBUG DATABASES = { 'default': dj_database_url.config(default=config('DJANGO_DB_URL')) ...
false
true
f75bad8beebef167f004cc0da05bcb222ac2a3d9
2,539
py
Python
recipes/heatshrink/all/conanfile.py
rockandsalt/conan-center-index
d739adcec3e4dd4c250eff559ceb738e420673dd
[ "MIT" ]
1
2020-01-31T22:47:14.000Z
2020-01-31T22:47:14.000Z
recipes/heatshrink/all/conanfile.py
rockandsalt/conan-center-index
d739adcec3e4dd4c250eff559ceb738e420673dd
[ "MIT" ]
3
2020-05-05T11:27:44.000Z
2022-02-28T20:19:50.000Z
recipes/heatshrink/all/conanfile.py
rockandsalt/conan-center-index
d739adcec3e4dd4c250eff559ceb738e420673dd
[ "MIT" ]
1
2020-10-12T10:45:13.000Z
2020-10-12T10:45:13.000Z
import os from conans import ConanFile, CMake, tools required_conan_version = ">=1.36.0" class HeatshrinkConan(ConanFile): name = "heatshrink" license = "ISC" url = "https://github.com/conan-io/conan-center-index" description = "data compression library for embedded/real-time systems" topics = ("...
30.590361
114
0.617172
import os from conans import ConanFile, CMake, tools required_conan_version = ">=1.36.0" class HeatshrinkConan(ConanFile): name = "heatshrink" license = "ISC" url = "https://github.com/conan-io/conan-center-index" description = "data compression library for embedded/real-time systems" topics = ("...
true
true
f75bae27426edefb8b0d60e9b1a7cb765f02f080
1,514
py
Python
receive.py
Sam1808/secret_chat
e0fce0564e3163b5b32869e1e21eab37bd7a94d1
[ "MIT" ]
null
null
null
receive.py
Sam1808/secret_chat
e0fce0564e3163b5b32869e1e21eab37bd7a94d1
[ "MIT" ]
null
null
null
receive.py
Sam1808/secret_chat
e0fce0564e3163b5b32869e1e21eab37bd7a94d1
[ "MIT" ]
null
null
null
import asyncio import aiofiles import configargparse import datetime async def fetch_chat_messages(chat_url, receive_port, history_filename): while True: try: reader, _ = await asyncio.open_connection(chat_url, receive_port,) encoded_message = await reader.readline() no...
26.561404
78
0.629458
import asyncio import aiofiles import configargparse import datetime async def fetch_chat_messages(chat_url, receive_port, history_filename): while True: try: reader, _ = await asyncio.open_connection(chat_url, receive_port,) encoded_message = await reader.readline() no...
true
true
f75bae292489ee9c858ec6107c7da21f69d520fd
2,466
py
Python
test/functional/forknotify.py
HuntCoinDeveloper/huntcoin
99198152d21b58ce598f46783074b64113cc5e64
[ "MIT" ]
2
2019-05-13T02:10:08.000Z
2019-05-26T14:47:29.000Z
test/functional/forknotify.py
HuntCoinDeveloper/huntcoin
99198152d21b58ce598f46783074b64113cc5e64
[ "MIT" ]
null
null
null
test/functional/forknotify.py
HuntCoinDeveloper/huntcoin
99198152d21b58ce598f46783074b64113cc5e64
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the -alertnotify option.""" import os import time from test_framework.test_framework import Huntc...
35.228571
108
0.621249
import os import time from test_framework.test_framework import HuntcoinTestFramework from test_framework.util import * class ForkNotifyTest(HuntcoinTestFramework): def __init__(self): super().__init__() self.num_nodes = 2 self.setup_clean_chain = False def setup_network(self): ...
true
true
f75baf9bd305d5618fe2e7713bab092bacaadca1
338
py
Python
audio_test1.py
chintan02/autism-aid
fae417c5b363e775a8d2046e51ecdb60740d01cc
[ "MIT" ]
null
null
null
audio_test1.py
chintan02/autism-aid
fae417c5b363e775a8d2046e51ecdb60740d01cc
[ "MIT" ]
null
null
null
audio_test1.py
chintan02/autism-aid
fae417c5b363e775a8d2046e51ecdb60740d01cc
[ "MIT" ]
null
null
null
import speech_recognition as sr import pyaudio r=sr.Recognizer() #Microphone(device_index=i, sample_rate=48000) with sr.Microphone( sample_rate=48000) as source: print("Say Something!") audio=r.listen(source) print("Time over") try: print("text: "+r.recognize_google(audio)) except: ...
22.533333
51
0.683432
import speech_recognition as sr import pyaudio r=sr.Recognizer() with sr.Microphone( sample_rate=48000) as source: print("Say Something!") audio=r.listen(source) print("Time over") try: print("text: "+r.recognize_google(audio)) except: print("Error")
true
true
f75bb094128c52728fb53e317a8d11d0fb8e532b
8,645
py
Python
src/lyth/compiler/lexer.py
gmantelet/python-lyth
80d467066c578308ecb5c3f274ae0da63e09693c
[ "BSD-2-Clause" ]
null
null
null
src/lyth/compiler/lexer.py
gmantelet/python-lyth
80d467066c578308ecb5c3f274ae0da63e09693c
[ "BSD-2-Clause" ]
null
null
null
src/lyth/compiler/lexer.py
gmantelet/python-lyth
80d467066c578308ecb5c3f274ae0da63e09693c
[ "BSD-2-Clause" ]
null
null
null
""" This module contains the lexer. The Lexer is the second stage of the lexical analysis. It uses its first stage, the Scanner, to get its characters one by one. The scanner keeps track of line and column numbering. The Lexer produces Tokens from the characters returned by the Scanner. """ from __future__ import anno...
39.83871
101
0.554309
from __future__ import annotations from typing import Generator from lyth.compiler.error import LythError from lyth.compiler.error import LythSyntaxError from lyth.compiler.scanner import Scanner from lyth.compiler.token import Literal from lyth.compiler.token import Symbol from lyth.compiler.token import Token cla...
true
true
f75bb1ea3768b8ec3b7821ddccd1a95d0223f643
4,863
py
Python
polls/tests.py
Etuloser/mysite
d7e50749581d186f74c30744dfd70ce4bf96524a
[ "BSD-3-Clause" ]
null
null
null
polls/tests.py
Etuloser/mysite
d7e50749581d186f74c30744dfd70ce4bf96524a
[ "BSD-3-Clause" ]
null
null
null
polls/tests.py
Etuloser/mysite
d7e50749581d186f74c30744dfd70ce4bf96524a
[ "BSD-3-Clause" ]
null
null
null
import datetime from django.utils import timezone from django.test import TestCase from .models import Question from django.urls import reverse class QuestionModelTests(TestCase): def test_was_published_recently_with_future_question(self): """ was_published_recently() returns False for questions ...
38.904
93
0.666872
import datetime from django.utils import timezone from django.test import TestCase from .models import Question from django.urls import reverse class QuestionModelTests(TestCase): def test_was_published_recently_with_future_question(self): time = timezone.now() + datetime.timedelta(days=30) futur...
true
true
f75bb25a851da07845c60cb95d0def7d25e33568
847
py
Python
python/tests/testgeodata/__init__.py
rodgar-nvkz/python-phonenumbers
4c7c4892211dbc9bc328bc3356b03853eaf993dc
[ "Apache-2.0" ]
null
null
null
python/tests/testgeodata/__init__.py
rodgar-nvkz/python-phonenumbers
4c7c4892211dbc9bc328bc3356b03853eaf993dc
[ "Apache-2.0" ]
null
null
null
python/tests/testgeodata/__init__.py
rodgar-nvkz/python-phonenumbers
4c7c4892211dbc9bc328bc3356b03853eaf993dc
[ "Apache-2.0" ]
1
2018-10-24T20:48:56.000Z
2018-10-24T20:48:56.000Z
"""Per-prefix data, mapping each prefix to a dict of locale:name. Auto-generated file, do not edit by hand. """ from phonenumbers.util import u # Copyright (C) 2011-2020 The Libphonenumber Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with...
32.576923
74
0.766234
from phonenumbers.util import u GEOCODE_DATA = {} from .data0 import data GEOCODE_DATA.update(data) del data GEOCODE_LONGEST_PREFIX = 7
true
true
f75bb288fd51b28ede2b1255d66ad8925f832b0f
5,567
py
Python
homestayAdmin/FinancialForecasting.py
Aarthif-Nawaz/Home3Circuit
3e2d71fe7a839a7fd820d18fbef9bb31fde608e0
[ "MIT" ]
null
null
null
homestayAdmin/FinancialForecasting.py
Aarthif-Nawaz/Home3Circuit
3e2d71fe7a839a7fd820d18fbef9bb31fde608e0
[ "MIT" ]
null
null
null
homestayAdmin/FinancialForecasting.py
Aarthif-Nawaz/Home3Circuit
3e2d71fe7a839a7fd820d18fbef9bb31fde608e0
[ "MIT" ]
null
null
null
import pickle import warnings import itertools import numpy as np import matplotlib.pyplot as plt warnings.filterwarnings("ignore") plt.style.use('fivethirtyeight') import pandas as pd import statsmodels.api as sm import matplotlib import mysql.connector import os import sys matplotlib.rcParams['axes.lab...
31.994253
146
0.65511
import pickle import warnings import itertools import numpy as np import matplotlib.pyplot as plt warnings.filterwarnings("ignore") plt.style.use('fivethirtyeight') import pandas as pd import statsmodels.api as sm import matplotlib import mysql.connector import os import sys matplotlib.rcParams['axes.lab...
true
true
f75bb2ab11a2cd070835df7b329217446a307c16
4,404
py
Python
python/oxford_asl/gui/dist_corr_tab.py
pauldmccarthy/oxford_asl
112ca520e974e6aca74fedf5a4befd1ce8bd6816
[ "Apache-2.0" ]
6
2017-06-27T18:59:59.000Z
2019-12-30T08:27:47.000Z
python/oxford_asl/gui/dist_corr_tab.py
pauldmccarthy/oxford_asl
112ca520e974e6aca74fedf5a4befd1ce8bd6816
[ "Apache-2.0" ]
14
2017-08-22T12:09:11.000Z
2020-12-16T22:32:07.000Z
python/oxford_asl/gui/dist_corr_tab.py
pauldmccarthy/oxford_asl
112ca520e974e6aca74fedf5a4befd1ce8bd6816
[ "Apache-2.0" ]
6
2018-05-03T14:44:54.000Z
2020-08-26T10:31:22.000Z
""" BASIL GUI for Oxford ASL - Calibration options Copyright (C) 2020 University of Oxford """ from .widgets import TabPage class DistCorrTab(TabPage): """ Tab page containing distortion correction options """ # Distortion correction choices FIELDMAP, CALIB_IMAGE = 0, 1 DISTCORR_CHOICES = ["...
40.40367
121
0.628065
from .widgets import TabPage class DistCorrTab(TabPage): FIELDMAP, CALIB_IMAGE = 0, 1 DISTCORR_CHOICES = ["Fieldmap", "Calibration image"] def __init__(self, app, parent, idx, n): TabPage.__init__(self, app, parent, "Distortion Correction", idx, n, name="distcorr") self.section("Dis...
true
true
f75bb2d1eee8731016a9462354b1613767468a1c
2,141
py
Python
scrapers/management/commands/grab_senate_hearings.py
sunlightlabs/realtimecongress-server-old
885a1bc87f87afb9bfcd35b53c1585f73ba78f51
[ "BSD-3-Clause" ]
null
null
null
scrapers/management/commands/grab_senate_hearings.py
sunlightlabs/realtimecongress-server-old
885a1bc87f87afb9bfcd35b53c1585f73ba78f51
[ "BSD-3-Clause" ]
null
null
null
scrapers/management/commands/grab_senate_hearings.py
sunlightlabs/realtimecongress-server-old
885a1bc87f87afb9bfcd35b53c1585f73ba78f51
[ "BSD-3-Clause" ]
null
null
null
from BeautifulSoup import BeautifulStoneSoup from django.core.management.base import NoArgsCommand #from rtc.mobile.models import CommitteeMeeting import datetime, time import memcache import urllib2 class Command(NoArgsCommand): def handle_noargs(self, **options): def flush_cache(): ...
41.980392
120
0.571695
from BeautifulSoup import BeautifulStoneSoup from django.core.management.base import NoArgsCommand import datetime, time import memcache import urllib2 class Command(NoArgsCommand): def handle_noargs(self, **options): def flush_cache(): memc = memcache.Client(['127.0.0.1:11211']) ...
false
true
f75bb2ebb534b4c2357215cf74cf1bdb147a106c
1,371
py
Python
omnidata_annotator/scripts/profiler.py
EPFL-VILAB/omnidata
a1e31eb26172ecf8a3e49ba8a5c82ab3038a9c01
[ "CC-BY-4.0" ]
11
2021-10-15T20:32:36.000Z
2022-03-23T05:42:19.000Z
omnidata_annotator/scripts/profiler.py
EPFL-VILAB/omnidata
a1e31eb26172ecf8a3e49ba8a5c82ab3038a9c01
[ "CC-BY-4.0" ]
8
2021-12-20T22:01:00.000Z
2022-03-10T02:23:35.000Z
omnidata_annotator/scripts/profiler.py
EPFL-VILAB/omnidata
a1e31eb26172ecf8a3e49ba8a5c82ab3038a9c01
[ "CC-BY-4.0" ]
2
2021-11-30T02:07:59.000Z
2022-03-07T13:16:46.000Z
''' A simple profiler for logging ''' import logging import time class Profiler(object): def __init__(self, name, logger=None, level=logging.INFO): self.name = name self.logger = logger self.level = level def step(self, name): """ Returns the duration and stepname since last s...
36.078947
120
0.595186
import logging import time class Profiler(object): def __init__(self, name, logger=None, level=logging.INFO): self.name = name self.logger = logger self.level = level def step(self, name): duration = self.summarize_step(start=self.step_start, step_name=name, level=self.level) ...
true
true
f75bb316c12d48ae61546f33eb9de555a251e5c5
2,560
py
Python
configs/lane_detection/baseline/swin-tiny_culane.py
Pyten/pytorch-auto-drive
fabc82252918ddeb8e9518964c97e905241daaf7
[ "BSD-3-Clause" ]
1
2022-03-25T02:26:31.000Z
2022-03-25T02:26:31.000Z
configs/lane_detection/baseline/swin-tiny_culane.py
Pyten/pytorch-auto-drive
fabc82252918ddeb8e9518964c97e905241daaf7
[ "BSD-3-Clause" ]
null
null
null
configs/lane_detection/baseline/swin-tiny_culane.py
Pyten/pytorch-auto-drive
fabc82252918ddeb8e9518964c97e905241daaf7
[ "BSD-3-Clause" ]
null
null
null
# Data pipeline from configs.lane_detection.common.datasets.culane_seg import dataset from configs.lane_detection.common.datasets.train_level0_288 import train_augmentation from configs.lane_detection.common.datasets.test_288 import test_augmentation # Optimization pipeline from configs.lane_detection.common.optims.se...
25.346535
86
0.646484
from configs.lane_detection.common.datasets.culane_seg import dataset from configs.lane_detection.common.datasets.train_level0_288 import train_augmentation from configs.lane_detection.common.datasets.test_288 import test_augmentation from configs.lane_detection.common.optims.segloss_5class import loss from configs.la...
true
true
f75bb4f4c321af6370e988b39f68bc605c544426
703
py
Python
A1014280203/15/15.py
saurabh896/python-1
f8d3aedf4c0fe6e24dfa3269ea7e642c9f7dd9b7
[ "MIT" ]
3,976
2015-01-01T15:49:39.000Z
2022-03-31T03:47:56.000Z
A1014280203/15/15.py
oyesam7/python-1
220734af09fa09a6f615d4f1b4612a0ab75d91d1
[ "MIT" ]
97
2015-01-11T02:59:46.000Z
2022-03-16T14:01:56.000Z
A1014280203/15/15.py
oyesam7/python-1
220734af09fa09a6f615d4f1b4612a0ab75d91d1
[ "MIT" ]
3,533
2015-01-01T06:19:30.000Z
2022-03-28T13:14:54.000Z
import xlwt with open('city.txt', 'r', encoding='utf-8') as f: data = f.read() _city = eval(data) city = list() for i in range(1, 4): info = _city[str(i)] city.append(i) city.append(info) row = len(city)//len(_city) def horz_left(x, y, data): algnt = xlwt...
25.107143
51
0.55761
import xlwt with open('city.txt', 'r', encoding='utf-8') as f: data = f.read() _city = eval(data) city = list() for i in range(1, 4): info = _city[str(i)] city.append(i) city.append(info) row = len(city)//len(_city) def horz_left(x, y, data): algnt = xlwt...
true
true
f75bb65996c0940d32b2f8dbd0c51209be544e04
6,124
py
Python
components/aws/sagemaker/batch_transform/src/batch_transform.py
cclauss/pipelines
2592307cceb72fdb61be2673f67d7b4a4bd12023
[ "Apache-2.0" ]
null
null
null
components/aws/sagemaker/batch_transform/src/batch_transform.py
cclauss/pipelines
2592307cceb72fdb61be2673f67d7b4a4bd12023
[ "Apache-2.0" ]
null
null
null
components/aws/sagemaker/batch_transform/src/batch_transform.py
cclauss/pipelines
2592307cceb72fdb61be2673f67d7b4a4bd12023
[ "Apache-2.0" ]
null
null
null
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the Li...
94.215385
244
0.75147
import argparse import logging from pathlib2 import Path from common import _utils def main(argv=None): parser = argparse.ArgumentParser(description='SageMaker Batch Transformation Job') parser.add_argument('--region', type=str.strip, required=True, help='The region where the cluster launches.') parser.add_arg...
true
true
f75bb6fc2e5aac5e98f2f5c648e29e00c12a4fa5
23,319
py
Python
anim_utils/motion_editing/fabrik_chain.py
eherr/anim_utils
2274b86ff410c8f6feb588626cbf83664382abca
[ "MIT" ]
10
2020-02-24T06:32:46.000Z
2021-08-17T07:36:04.000Z
anim_utils/motion_editing/fabrik_chain.py
eherr/anim_utils
2274b86ff410c8f6feb588626cbf83664382abca
[ "MIT" ]
6
2020-03-19T12:11:59.000Z
2022-02-21T15:44:30.000Z
anim_utils/motion_editing/fabrik_chain.py
eherr/anim_utils
2274b86ff410c8f6feb588626cbf83664382abca
[ "MIT" ]
6
2020-02-24T06:35:33.000Z
2021-05-28T14:26:05.000Z
#!/usr/bin/env python # # Copyright 2019 DFKI GmbH. # # 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, merg...
42.244565
175
0.633689
import math import numpy as np from transformations import quaternion_inverse, quaternion_multiply, quaternion_from_matrix, euler_from_quaternion from .analytical_inverse_kinematics import calculate_limb_joint_rotation, calculate_limb_root_rotation, to_local_coordinate_system def sign(x): return 1 if x >= 0 else -...
true
true
f75bb84dbf79c89d6f7dd28d5f9cbb4f00e66514
697
py
Python
monero_glue/messages/CosiCommit.py
ph4r05/monero-agent
0bac0e6f33142b2bb885565bfd1ef8ac04559280
[ "MIT" ]
20
2018-04-05T22:06:10.000Z
2021-09-18T10:43:44.000Z
monero_glue/messages/CosiCommit.py
ph4r05/monero-agent
0bac0e6f33142b2bb885565bfd1ef8ac04559280
[ "MIT" ]
null
null
null
monero_glue/messages/CosiCommit.py
ph4r05/monero-agent
0bac0e6f33142b2bb885565bfd1ef8ac04559280
[ "MIT" ]
5
2018-08-06T15:06:04.000Z
2021-07-16T01:58:43.000Z
# Automatically generated by pb2py # fmt: off from .. import protobuf as p if __debug__: try: from typing import Dict, List # noqa: F401 from typing_extensions import Literal # noqa: F401 except ImportError: pass class CosiCommit(p.MessageType): MESSAGE_WIRE_TYPE = 71 def _...
23.233333
67
0.588235
from .. import protobuf as p if __debug__: try: from typing import Dict, List from typing_extensions import Literal except ImportError: pass class CosiCommit(p.MessageType): MESSAGE_WIRE_TYPE = 71 def __init__( self, address_n: List[int] = None, data...
true
true
f75bb8f23e5410f9c17cc6a4a0c5e2cb1234900c
609
py
Python
OverApp/migrations/0008_auto_20160627_1327.py
sheissage/overnightasiasg
83351e51b26a0ff3759030d5165cc87e987ff07d
[ "Apache-2.0" ]
null
null
null
OverApp/migrations/0008_auto_20160627_1327.py
sheissage/overnightasiasg
83351e51b26a0ff3759030d5165cc87e987ff07d
[ "Apache-2.0" ]
null
null
null
OverApp/migrations/0008_auto_20160627_1327.py
sheissage/overnightasiasg
83351e51b26a0ff3759030d5165cc87e987ff07d
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.9.2 on 2016-06-27 13:27 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('OverApp', '0007_auto_20160619_0651'), ] operations = [ migrations.AddField( ...
23.423077
53
0.592775
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('OverApp', '0007_auto_20160619_0651'), ] operations = [ migrations.AddField( model_name='roominfo', name='is_available', ...
true
true
f75bb95852a6e466ca38137fe0e5dcd0915e242b
887
py
Python
tests/test_color.py
zostera/python-makiwich
01e501ab3e1e1de5ae21d7599de35b412102fb1c
[ "0BSD" ]
null
null
null
tests/test_color.py
zostera/python-makiwich
01e501ab3e1e1de5ae21d7599de35b412102fb1c
[ "0BSD" ]
null
null
null
tests/test_color.py
zostera/python-makiwich
01e501ab3e1e1de5ae21d7599de35b412102fb1c
[ "0BSD" ]
null
null
null
from unittest import TestCase from maki.color import Color class ColorTest(TestCase): def test_is_light(self): self.assertTrue(Color.from_hex("#ffffff").is_light) self.assertTrue(Color.from_hex("#fff").is_light) self.assertFalse(Color.from_hex("#000").is_light) def test_invalid_hex(s...
32.851852
73
0.662909
from unittest import TestCase from maki.color import Color class ColorTest(TestCase): def test_is_light(self): self.assertTrue(Color.from_hex("#ffffff").is_light) self.assertTrue(Color.from_hex("#fff").is_light) self.assertFalse(Color.from_hex("#000").is_light) def test_invalid_hex(s...
true
true
f75bb97a196b33e93281401a1780d340547d771b
864
py
Python
error_tracker/flask/defaults.py
Laneglos/error-tracker
b07366e94199fc5157ddc5623fa12c8c0d07c483
[ "BSD-3-Clause" ]
16
2019-12-17T10:57:43.000Z
2022-01-30T13:03:53.000Z
error_tracker/flask/defaults.py
Laneglos/error-tracker
b07366e94199fc5157ddc5623fa12c8c0d07c483
[ "BSD-3-Clause" ]
15
2020-01-08T12:08:32.000Z
2022-01-28T13:16:48.000Z
error_tracker/flask/defaults.py
Laneglos/error-tracker
b07366e94199fc5157ddc5623fa12c8c0d07c483
[ "BSD-3-Clause" ]
8
2020-01-08T14:10:14.000Z
2021-01-31T22:26:07.000Z
# -*- coding: utf-8 -*- # # Error tracker flasks plugins default value # # :copyright: 2019 Sonu Kumar # :license: BSD-3-Clause # # Whether notification should be send or not APP_ERROR_SEND_NOTIFICATION = False # List of email recipients, these users would be send an email APP_ERROR_RECIPIENT_EMAIL = None # E...
33.230769
84
0.759259
APP_ERROR_SEND_NOTIFICATION = False APP_ERROR_RECIPIENT_EMAIL = None APP_ERROR_SUBJECT_PREFIX = "" APP_ERROR_MASK_WITH = "**************" APP_ERROR_MASKED_KEY_HAS = ("password", "secret") APP_ERROR_URL_PREFIX = "/dev/error" APP_ERROR_EMAIL_SENDER = None # In Exceptions listing page, number of entry should be displayed...
true
true
f75bba90f0bc3a083e0bc57a718eff1697f3a318
3,336
py
Python
Summary_DynamicIV.py
apayeur/GIF-Ca
7ba9e715d79aa3a733f417f7dfce81842041e7ec
[ "MIT" ]
1
2020-06-05T15:34:34.000Z
2020-06-05T15:34:34.000Z
Summary_DynamicIV.py
apayeur/GIF-Ca
7ba9e715d79aa3a733f417f7dfce81842041e7ec
[ "MIT" ]
null
null
null
Summary_DynamicIV.py
apayeur/GIF-Ca
7ba9e715d79aa3a733f417f7dfce81842041e7ec
[ "MIT" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt import os # List separate experiments in separate folder # data_folders_for_separate_experiments = ['tenth_set'] data_folders_for_separate_experiments = ['seventh_set', 'eighth_set', 'ninth_set', 'tenth_set'] # For all experiments, extract the cell names CellNames = ...
41.185185
119
0.678058
import numpy as np import matplotlib.pyplot as plt import os data_folders_for_separate_experiments = ['seventh_set', 'eighth_set', 'ninth_set', 'tenth_set'] CellNames = {} for experiment_folder in data_folders_for_separate_experiments: folder_path = './' + experiment_folder + '/' CellNames[experiment_folder] ...
true
true
f75bbaa8dd40ebc833a7c83da9be16ea4ce3ec5a
392
py
Python
.eggs/py2app-0.14-py3.6.egg/py2app/recipes/pyzmq.py
stfbnc/mtsa_py
0dd14f0e51e3251f10b3da781867fbc7173608eb
[ "MIT" ]
17
2018-08-28T04:40:07.000Z
2021-12-15T06:19:31.000Z
.eggs/py2app-0.14-py3.6.egg/py2app/recipes/pyzmq.py
stfbnc/mtsa_py
0dd14f0e51e3251f10b3da781867fbc7173608eb
[ "MIT" ]
4
2019-05-17T09:35:30.000Z
2022-03-13T03:50:20.000Z
.eggs/py2app-0.14-py3.6.egg/py2app/recipes/pyzmq.py
stfbnc/mtsa_py
0dd14f0e51e3251f10b3da781867fbc7173608eb
[ "MIT" ]
3
2019-01-15T07:13:53.000Z
2020-03-29T00:48:39.000Z
def check(cmd, mf): m = mf.findNode('zmq') if m is None or m.filename is None: return None # PyZMQ is a package that contains # a shared library. This recipe # is mostly a workaround for a bug # in py2app: it copies the dylib into # the site-packages zipfile and builds # a non-f...
26.133333
42
0.627551
def check(cmd, mf): m = mf.findNode('zmq') if m is None or m.filename is None: return None return dict( packages=['zmq'] )
true
true
f75bbbbd4e53e37152971b92e817f74577fe9f5f
569
py
Python
djweb/dj_comp_hist/views.py
cminsky/computation_hist
46726575687dcf72c7ca1191874e7354595f03de
[ "BSD-3-Clause" ]
null
null
null
djweb/dj_comp_hist/views.py
cminsky/computation_hist
46726575687dcf72c7ca1191874e7354595f03de
[ "BSD-3-Clause" ]
null
null
null
djweb/dj_comp_hist/views.py
cminsky/computation_hist
46726575687dcf72c7ca1191874e7354595f03de
[ "BSD-3-Clause" ]
null
null
null
from django.shortcuts import render, get_object_or_404 from .models import Person # Create your views here. from django.http import HttpResponse def index(request): return HttpResponse("Hello, world. You're at Computation History project.") def person(request, person_id): person_obj = get_object_or_404(P...
24.73913
79
0.746924
from django.shortcuts import render, get_object_or_404 from .models import Person from django.http import HttpResponse def index(request): return HttpResponse("Hello, world. You're at Computation History project.") def person(request, person_id): person_obj = get_object_or_404(Person, pk=person_id) #...
true
true
f75bbc3f4c7077e6b2c29d5ed138ca70ba7195ab
2,880
py
Python
p0002_add_two_numbers.py
felixchr/leetcode
51dd41c5e6fdb96af65ac8c7069f4216ed078547
[ "Apache-2.0" ]
null
null
null
p0002_add_two_numbers.py
felixchr/leetcode
51dd41c5e6fdb96af65ac8c7069f4216ed078547
[ "Apache-2.0" ]
null
null
null
p0002_add_two_numbers.py
felixchr/leetcode
51dd41c5e6fdb96af65ac8c7069f4216ed078547
[ "Apache-2.0" ]
null
null
null
# Definition for singly-linked list. from lib_singly_nodelist import ListNode, create_node_list class Solution: def addTwoNumbers(self, l1: ListNode, l2: ListNode) -> ListNode: new_head = ListNode() ptr = new_head carry = 0 while l1 and l2: s = l1.val + l2.val + carry ...
32
118
0.452083
from lib_singly_nodelist import ListNode, create_node_list class Solution: def addTwoNumbers(self, l1: ListNode, l2: ListNode) -> ListNode: new_head = ListNode() ptr = new_head carry = 0 while l1 and l2: s = l1.val + l2.val + carry if s > 9: c...
true
true
f75bbda9d25d15b4747c35922e7c29599e99874b
3,171
py
Python
silver/migrations/0008_auto_20150430_1804.py
overcastsoftware/silver
f0da52c8e848ec01229d9479171c325eaff79d35
[ "Apache-2.0" ]
null
null
null
silver/migrations/0008_auto_20150430_1804.py
overcastsoftware/silver
f0da52c8e848ec01229d9479171c325eaff79d35
[ "Apache-2.0" ]
null
null
null
silver/migrations/0008_auto_20150430_1804.py
overcastsoftware/silver
f0da52c8e848ec01229d9479171c325eaff79d35
[ "Apache-2.0" ]
1
2018-12-27T05:05:01.000Z
2018-12-27T05:05:01.000Z
# Copyright (c) 2015 Presslabs SRL # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
35.233333
107
0.594134
from django.db import models, migrations import django.core.validators class Migration(migrations.Migration): dependencies = [ ('silver', '0007_auto_20150430_1549'), ] operations = [ migrations.AlterField( model_name='documententry', name='quantity', ...
true
true
f75bbe51f9178ebe6d61d060d23a7a67fbfa55ea
16,475
py
Python
lib/image_readers.py
aaronfinke/fast_dp
23ceb72e79f9c45df1d97bf535477e9749582c93
[ "Apache-2.0" ]
null
null
null
lib/image_readers.py
aaronfinke/fast_dp
23ceb72e79f9c45df1d97bf535477e9749582c93
[ "Apache-2.0" ]
null
null
null
lib/image_readers.py
aaronfinke/fast_dp
23ceb72e79f9c45df1d97bf535477e9749582c93
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import, print_function, division import sys import time import os from logger import write from image_names import image2template_directory, find_matching_images, \ template_directory_number2image from run_job import run_job from dxtbx.serialize import xds from dxtbx.datablock imp...
34.251559
93
0.565584
from __future__ import absolute_import, print_function, division import sys import time import os from logger import write from image_names import image2template_directory, find_matching_images, \ template_directory_number2image from run_job import run_job from dxtbx.serialize import xds from dxtbx.datablock imp...
true
true