hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f71ab63c599cebc6ea849c3b34a83ddb2a9b964d
1,266
py
Python
tests/test_experimental.py
daoluan/pandaSDMX
2efcb5a429a5306efd89bed4cd55946d1ad5067b
[ "Apache-2.0" ]
null
null
null
tests/test_experimental.py
daoluan/pandaSDMX
2efcb5a429a5306efd89bed4cd55946d1ad5067b
[ "Apache-2.0" ]
null
null
null
tests/test_experimental.py
daoluan/pandaSDMX
2efcb5a429a5306efd89bed4cd55946d1ad5067b
[ "Apache-2.0" ]
null
null
null
"""Tests for experimental code using pandas objects for internal storage. See pandasdmx.experimental for more information. """ from pandasdmx.experimental import DataSet as PandasDataSet from pandasdmx.model import ( AttributeValue, DataAttribute, DataSet, Key, Observation, ) import pytest pyt...
31.65
77
0.690363
from pandasdmx.experimental import DataSet as PandasDataSet from pandasdmx.model import ( AttributeValue, DataAttribute, DataSet, Key, Observation, ) import pytest pytestmark = pytest.mark.experimental @pytest.mark.parametrize('DataSetType', [DataSet, PandasDataSet]) def test_add_obs(DataSe...
true
true
f71ab6ca83c0cccdc98f7bc0e6a9815f90dc10b0
4,878
py
Python
bamboo/unit_tests/test_unit_layer_gather.py
steffi7574/lbann
6a6b86d3cbcf4ca50730c652a5014f7cb3afa5e6
[ "Apache-2.0" ]
null
null
null
bamboo/unit_tests/test_unit_layer_gather.py
steffi7574/lbann
6a6b86d3cbcf4ca50730c652a5014f7cb3afa5e6
[ "Apache-2.0" ]
5
2021-07-15T20:51:21.000Z
2022-01-01T03:18:05.000Z
bamboo/unit_tests/test_unit_layer_gather.py
ekmixon/lbann
665797a112dc96d15bd1d958de61f48bf5d3d21f
[ "Apache-2.0" ]
null
null
null
import functools import operator import os import os.path import sys import numpy as np # Bamboo utilities current_file = os.path.realpath(__file__) current_dir = os.path.dirname(current_file) sys.path.insert(0, os.path.join(os.path.dirname(current_dir), 'common_python')) import tools # ==============================...
27.715909
80
0.593276
import functools import operator import os import os.path import sys import numpy as np current_file = os.path.realpath(__file__) current_dir = os.path.dirname(current_file) sys.path.insert(0, os.path.join(os.path.dirname(current_dir), 'common_python')) import tools input_size = 23 output_size = 15 seed = 202...
true
true
f71ab703aedaaca8057f1f775130036f5d78f355
1,470
py
Python
datasets/imagename_dataset.py
bigvideoresearch/SCC
f26cdb6aaf248b5112812dbdac1f1b5086aebccc
[ "MIT" ]
5
2021-09-15T21:48:55.000Z
2022-03-22T11:21:58.000Z
datasets/imagename_dataset.py
bigvideoresearch/SCC
f26cdb6aaf248b5112812dbdac1f1b5086aebccc
[ "MIT" ]
null
null
null
datasets/imagename_dataset.py
bigvideoresearch/SCC
f26cdb6aaf248b5112812dbdac1f1b5086aebccc
[ "MIT" ]
1
2021-08-20T08:40:15.000Z
2021-08-20T08:40:15.000Z
from runner_master import runner import os import io import torch import logging from PIL import Image, ImageFile from runner_master.runner.data import datasets # to fix "OSError: image file is truncated" ImageFile.LOAD_TRUNCATED_IMAGES = True class ImagenameDataset(datasets.ImglistDatasetV2): def getitem(self, i...
35
79
0.612245
from runner_master import runner import os import io import torch import logging from PIL import Image, ImageFile from runner_master.runner.data import datasets ImageFile.LOAD_TRUNCATED_IMAGES = True class ImagenameDataset(datasets.ImglistDatasetV2): def getitem(self, index): line = self.imglist[index].s...
true
true
f71ab7463ba7c30d460e7f06958ca0812996c4f2
1,439
py
Python
setup.py
genevera/slack-backup
0ffb9f940608c364249d027c0f96ecf08dd7e59a
[ "BSD-3-Clause" ]
null
null
null
setup.py
genevera/slack-backup
0ffb9f940608c364249d027c0f96ecf08dd7e59a
[ "BSD-3-Clause" ]
null
null
null
setup.py
genevera/slack-backup
0ffb9f940608c364249d027c0f96ecf08dd7e59a
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 """ Setup for the slack-backup project """ try: from setuptools import setup except ImportError: from distutils.core import setup setup(name="slack-backup", packages=["slack_backup"], version="0.7", description="Make copy of slack converstaions", author="Roman Do...
38.891892
65
0.551077
try: from setuptools import setup except ImportError: from distutils.core import setup setup(name="slack-backup", packages=["slack_backup"], version="0.7", description="Make copy of slack converstaions", author="Roman Dobosz", author_email="gryf73@gmail.com", url="https://...
true
true
f71ab74bbb37c06ec87292445a3616dd3669f146
7,850
py
Python
openprompt/prompts/one2one_verbalizer.py
hlzhang109/OpenPrompt
8a1ec1ceac3805a11b09dda9b96ad7406d222f26
[ "Apache-2.0" ]
null
null
null
openprompt/prompts/one2one_verbalizer.py
hlzhang109/OpenPrompt
8a1ec1ceac3805a11b09dda9b96ad7406d222f26
[ "Apache-2.0" ]
null
null
null
openprompt/prompts/one2one_verbalizer.py
hlzhang109/OpenPrompt
8a1ec1ceac3805a11b09dda9b96ad7406d222f26
[ "Apache-2.0" ]
null
null
null
import json from transformers.tokenization_utils import PreTrainedTokenizer from yacs.config import CfgNode from openprompt.data_utils.data_utils import InputFeatures import re from openprompt import Verbalizer from typing import * import torch import torch.nn as nn import torch.nn.functional as F from openprompt.utils...
44.101124
183
0.643057
import json from transformers.tokenization_utils import PreTrainedTokenizer from yacs.config import CfgNode from openprompt.data_utils.data_utils import InputFeatures import re from openprompt import Verbalizer from typing import * import torch import torch.nn as nn import torch.nn.functional as F from openprompt.utils...
true
true
f71ab83062ace9e091517b08758d3a356d00ee8f
643
py
Python
CPSC362_Project1/migrations/versions/57642bbc5015_add_price.py
KonechyJ/CPSC-362_Project1
c338f2e0e8e621e2fb1846277dcc0c1caaf1e41a
[ "MIT" ]
null
null
null
CPSC362_Project1/migrations/versions/57642bbc5015_add_price.py
KonechyJ/CPSC-362_Project1
c338f2e0e8e621e2fb1846277dcc0c1caaf1e41a
[ "MIT" ]
null
null
null
CPSC362_Project1/migrations/versions/57642bbc5015_add_price.py
KonechyJ/CPSC-362_Project1
c338f2e0e8e621e2fb1846277dcc0c1caaf1e41a
[ "MIT" ]
2
2021-09-10T03:47:29.000Z
2021-12-23T06:16:34.000Z
"""Add price Revision ID: 57642bbc5015 Revises: 6b66b7cc2f1f Create Date: 2021-11-18 17:58:58.263480 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '57642bbc5015' down_revision = '6b66b7cc2f1f' branch_labels = None depends_on = None def upgrade(): # ### ...
22.172414
75
0.685848
from alembic import op import sqlalchemy as sa revision = '57642bbc5015' down_revision = '6b66b7cc2f1f' branch_labels = None depends_on = None def upgrade():
true
true
f71ab8ed89dcd84727dfd18c9a588273b4b1ffe5
476
py
Python
tests/container/elements.py
nadirhamid/protean
d31bc634e05c9221e82136bf18c2ceaa0982c1c8
[ "BSD-3-Clause" ]
null
null
null
tests/container/elements.py
nadirhamid/protean
d31bc634e05c9221e82136bf18c2ceaa0982c1c8
[ "BSD-3-Clause" ]
null
null
null
tests/container/elements.py
nadirhamid/protean
d31bc634e05c9221e82136bf18c2ceaa0982c1c8
[ "BSD-3-Clause" ]
null
null
null
# Protean from protean.core.field.basic import String from protean.utils.container import BaseContainer class CustomBaseContainer(BaseContainer): def __new__(cls, *args, **kwargs): if cls is CustomBaseContainer: raise TypeError("CustomBaseContainer cannot be instantiated") return super...
29.75
73
0.741597
from protean.core.field.basic import String from protean.utils.container import BaseContainer class CustomBaseContainer(BaseContainer): def __new__(cls, *args, **kwargs): if cls is CustomBaseContainer: raise TypeError("CustomBaseContainer cannot be instantiated") return super().__new_...
true
true
f71ab9c19de52f584719fbedb002bf798830562d
544
py
Python
py_pdf_term/endtoend/_endtoend/mappers/caches/xml.py
kumachan-mis/py-pdf-term
282505826ce8c626003e753068d15738d772ce46
[ "MIT" ]
null
null
null
py_pdf_term/endtoend/_endtoend/mappers/caches/xml.py
kumachan-mis/py-pdf-term
282505826ce8c626003e753068d15738d772ce46
[ "MIT" ]
1
2021-08-02T13:02:12.000Z
2021-08-02T13:02:12.000Z
py_pdf_term/endtoend/_endtoend/mappers/caches/xml.py
kumachan-mis/py-pdf-term
282505826ce8c626003e753068d15738d772ce46
[ "MIT" ]
null
null
null
from typing import Type from ...caches import BaseXMLLayerCache, XMLLayerFileCache, XMLLayerNoCache from ..base import BaseMapper from ..consts import PACKAGE_NAME class XMLLayerCacheMapper(BaseMapper[Type[BaseXMLLayerCache]]): @classmethod def default_mapper(cls) -> "XMLLayerCacheMapper": default_ma...
30.222222
81
0.740809
from typing import Type from ...caches import BaseXMLLayerCache, XMLLayerFileCache, XMLLayerNoCache from ..base import BaseMapper from ..consts import PACKAGE_NAME class XMLLayerCacheMapper(BaseMapper[Type[BaseXMLLayerCache]]): @classmethod def default_mapper(cls) -> "XMLLayerCacheMapper": default_ma...
true
true
f71aba11c3ef384c490f493c022cda6fbf1433c8
3,220
py
Python
rafter/blueprints.py
olivier-m/rafter
aafcf8fd019f24abcf519307c4484cc6b4697c04
[ "MIT" ]
1
2018-09-10T14:04:22.000Z
2018-09-10T14:04:22.000Z
rafter/blueprints.py
olivier-m/rafter
aafcf8fd019f24abcf519307c4484cc6b4697c04
[ "MIT" ]
null
null
null
rafter/blueprints.py
olivier-m/rafter
aafcf8fd019f24abcf519307c4484cc6b4697c04
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ .. autoclass:: Blueprint """ from sanic.blueprints import Blueprint as BaseBlueprint, FutureRoute __all__ = ('Blueprint',) class Blueprint(BaseBlueprint): """Create a new blueprint. :param name: unique name of the blueprint :param url_prefix: URL to be prefixed before all ro...
34.623656
77
0.591925
from sanic.blueprints import Blueprint as BaseBlueprint, FutureRoute __all__ = ('Blueprint',) class Blueprint(BaseBlueprint): def __init__(self, *args, **kwargs): super(Blueprint, self).__init__(*args, **kwargs) self.resources = [] def register(self, app, options): super(Blueprin...
true
true
f71aba25d68cbd1b1da66df6ca5eaabc6b86db83
1,244
py
Python
setup.py
vtunr/VTun
f82b23945e95a3610e9bb7c54e62d0c51cac23a7
[ "MIT" ]
2
2020-04-14T19:14:07.000Z
2022-02-14T14:49:44.000Z
setup.py
vtunr/VTun
f82b23945e95a3610e9bb7c54e62d0c51cac23a7
[ "MIT" ]
16
2020-01-20T10:19:17.000Z
2022-01-15T18:05:55.000Z
setup.py
vtunr/VTunit
f82b23945e95a3610e9bb7c54e62d0c51cac23a7
[ "MIT" ]
null
null
null
import setuptools import subprocess with open("README.md", "r") as fh: long_description = fh.read() packages = [dep.rstrip('\n') for dep in open("requirements.txt", "r")] def get_git_version(): return subprocess.check_output(['git', 'describe','--dirty', '--tags']).strip() setuptools.setup( name="VTunit"...
36.588235
96
0.653537
import setuptools import subprocess with open("README.md", "r") as fh: long_description = fh.read() packages = [dep.rstrip('\n') for dep in open("requirements.txt", "r")] def get_git_version(): return subprocess.check_output(['git', 'describe','--dirty', '--tags']).strip() setuptools.setup( name="VTunit"...
true
true
f71abb077d128f03c4fd2fe2aa978ca83223d79e
6,608
py
Python
built-in/PyTorch/Official/cv/image_classification/Gluon_ResNet50_v1d_for_PyTorch/timm/optim/radam.py
Ascend/modelzoo
f018cfed33dbb1cc2110b9ea2e233333f71cc509
[ "Apache-2.0" ]
12
2020-12-13T08:34:24.000Z
2022-03-20T15:17:17.000Z
built-in/PyTorch/Official/cv/image_classification/Gluon_ResNet50_v1d_for_PyTorch/timm/optim/radam.py
Ascend/modelzoo
f018cfed33dbb1cc2110b9ea2e233333f71cc509
[ "Apache-2.0" ]
1
2022-01-20T03:11:05.000Z
2022-01-20T06:53:39.000Z
built-in/PyTorch/Official/cv/image_classification/Gluon_ResNet50_v1d_for_PyTorch/timm/optim/radam.py
Ascend/modelzoo
f018cfed33dbb1cc2110b9ea2e233333f71cc509
[ "Apache-2.0" ]
2
2021-07-10T12:40:46.000Z
2021-12-17T07:55:15.000Z
# Copyright [yyyy] [name of copyright owner] # Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.or...
39.100592
111
0.525272
import math import torch from torch.optim.optimizer import Optimizer, required class RAdam(Optimizer): def __init__(self, params, lr=1e-3, betas=(0.9, 0.999), eps=1e-8, weight_decay=0): defaults = dict(lr=lr, betas=betas, eps=eps, weight_decay=weight_decay) self.buffer = [[None, N...
true
true
f71abbabdf4197e4dad1e27bc472d450790c4613
44,512
py
Python
theano/gof/graph.py
MarcCote/Theano
f0d293161a624ccf10c60ee8405a92e7d321151a
[ "BSD-3-Clause" ]
null
null
null
theano/gof/graph.py
MarcCote/Theano
f0d293161a624ccf10c60ee8405a92e7d321151a
[ "BSD-3-Clause" ]
null
null
null
theano/gof/graph.py
MarcCote/Theano
f0d293161a624ccf10c60ee8405a92e7d321151a
[ "BSD-3-Clause" ]
1
2019-09-09T18:31:41.000Z
2019-09-09T18:31:41.000Z
""" Node classes (`Apply`, `Variable`) and expression graph algorithms. """ from __future__ import absolute_import, print_function, division from collections import deque from copy import copy from itertools import count import theano from theano import config from theano.gof import utils from six import string_types...
32.898744
129
0.596671
from __future__ import absolute_import, print_function, division from collections import deque from copy import copy from itertools import count import theano from theano import config from theano.gof import utils from six import string_types, integer_types, iteritems from theano.misc.ordered_set import OrderedSet _...
true
true
f71abc3456290bc451a8706a0ce886a5e488584f
5,121
py
Python
main.py
maxime-tournier/lcpy
1419901a089cd088edd078397958b47c25cc2f4f
[ "MIT" ]
null
null
null
main.py
maxime-tournier/lcpy
1419901a089cd088edd078397958b47c25cc2f4f
[ "MIT" ]
null
null
null
main.py
maxime-tournier/lcpy
1419901a089cd088edd078397958b47c25cc2f4f
[ "MIT" ]
null
null
null
#!/usr/bin/env python import krylov import splitting import tool import numpy as np import math import metric import accel def parse_args(): """command line arguments""" import argparse parser = argparse.ArgumentParser(description='benchmark LCP solvers') parser.add_argument('filenames', nargs=...
25.477612
92
0.495411
import krylov import splitting import tool import numpy as np import math import metric import accel def parse_args(): """command line arguments""" import argparse parser = argparse.ArgumentParser(description='benchmark LCP solvers') parser.add_argument('filenames', nargs='+', help='filename f...
false
true
f71abc41fa2bd110c77062474f73a192caded073
2,015
py
Python
tools/perf/page_sets/intl_ja_zh.py
kjthegod/chromium
cf940f7f418436b77e15b1ea23e6fa100ca1c91a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
1
2019-11-28T10:46:52.000Z
2019-11-28T10:46:52.000Z
tools/perf/page_sets/intl_ja_zh.py
kjthegod/chromium
cf940f7f418436b77e15b1ea23e6fa100ca1c91a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
tools/perf/page_sets/intl_ja_zh.py
kjthegod/chromium
cf940f7f418436b77e15b1ea23e6fa100ca1c91a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
2
2015-03-27T11:15:39.000Z
2016-08-17T14:19:56.000Z
# Copyright 2014 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. from telemetry.page import page as page_module from telemetry.page import page_set as page_set_module class IntlJaZhPage(page_module.Page): def __init__(...
31
84
0.63871
from telemetry.page import page as page_module from telemetry.page import page_set as page_set_module class IntlJaZhPage(page_module.Page): def __init__(self, url, page_set): super(IntlJaZhPage, self).__init__(url=url, page_set=page_set) self.user_agent_type = 'desktop' self.archive_data_file = 'dat...
true
true
f71abc4360294fb27af4d518e22ffc96882ac8b4
1,646
py
Python
src/util/losses.py
anglixjtu/MeshCNN_
83826e66d8989ed4967047c2ed6d099568c5781c
[ "MIT" ]
2
2021-08-02T05:39:43.000Z
2021-08-04T04:15:02.000Z
src/util/losses.py
anglixjtu/MeshCNN_
83826e66d8989ed4967047c2ed6d099568c5781c
[ "MIT" ]
null
null
null
src/util/losses.py
anglixjtu/MeshCNN_
83826e66d8989ed4967047c2ed6d099568c5781c
[ "MIT" ]
null
null
null
import torch import torch.nn as nn class ChamferLoss(nn.Module): def __init__(self): super(ChamferLoss, self).__init__() self.use_cuda = torch.cuda.is_available() def forward(self, preds, gts, reverse=True, bidirectional=True): def compute_loss(preds, gts): P = self.batch...
35.021277
69
0.572904
import torch import torch.nn as nn class ChamferLoss(nn.Module): def __init__(self): super(ChamferLoss, self).__init__() self.use_cuda = torch.cuda.is_available() def forward(self, preds, gts, reverse=True, bidirectional=True): def compute_loss(preds, gts): P = self.batch...
true
true
f71abc9fb39ef5fd0daeb69a86632bd9e5ed8709
5,028
py
Python
pytorch_toolkit/nncf/examples/object_detection/layers/modules/multibox_loss.py
morkovka1337/openvino_training_extensions
846db45c264d6b061505213f51763520b9432ba9
[ "Apache-2.0" ]
3
2020-12-29T02:47:32.000Z
2021-11-12T08:12:51.000Z
pytorch_toolkit/nncf/examples/object_detection/layers/modules/multibox_loss.py
morkovka1337/openvino_training_extensions
846db45c264d6b061505213f51763520b9432ba9
[ "Apache-2.0" ]
23
2020-09-25T22:41:48.000Z
2021-12-13T20:43:37.000Z
pytorch_toolkit/nncf/examples/object_detection/layers/modules/multibox_loss.py
morkovka1337/openvino_training_extensions
846db45c264d6b061505213f51763520b9432ba9
[ "Apache-2.0" ]
1
2021-03-12T10:08:44.000Z
2021-03-12T10:08:44.000Z
""" Copyright (c) 2019 Intel Corporation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writin...
42.610169
90
0.646181
import torch import torch.nn as nn import torch.nn.functional as F from ..box_utils import match, log_sum_exp class MultiBoxLoss(nn.Module): def __init__(self, cfg, num_classes, overlap_thresh, prior_for_matching, bkg_label, neg_mining, neg_pos, neg_overlap, encode_target, device=None): ...
true
true
f71abcf577a388a4d364848c076ea89cef2f516f
6,184
py
Python
code/shared/pca/pca.py
amarallab/waldo
e38d23d9474a0bcb7a94e685545edb0115b12af4
[ "MIT" ]
null
null
null
code/shared/pca/pca.py
amarallab/waldo
e38d23d9474a0bcb7a94e685545edb0115b12af4
[ "MIT" ]
null
null
null
code/shared/pca/pca.py
amarallab/waldo
e38d23d9474a0bcb7a94e685545edb0115b12af4
[ "MIT" ]
null
null
null
#!/usr/bin/env python """ a small class for Principal Component Analysis Usage: p = PCA( A, fraction=0.90 ) In: A: an array of e.g. 1000 observations x 20 variables, 1000 rows x 20 columns fraction: use principal components that account for e.g. 90 % of the total variance Out: p.U, p.d, p.Vt: f...
33.608696
85
0.537516
""" a small class for Principal Component Analysis Usage: p = PCA( A, fraction=0.90 ) In: A: an array of e.g. 1000 observations x 20 variables, 1000 rows x 20 columns fraction: use principal components that account for e.g. 90 % of the total variance Out: p.U, p.d, p.Vt: from numpy.linalg.svd,...
false
true
f71abd4fc53838f6ee6c2abce3c48015aa6d6d6c
1,513
py
Python
src/gluonts/transform/dataset.py
lfywork/gluon-ts
399dbad20f6e78685b707a30817b3a2f97925f8a
[ "Apache-2.0" ]
1
2021-08-22T19:42:55.000Z
2021-08-22T19:42:55.000Z
src/gluonts/transform/dataset.py
lfywork/gluon-ts
399dbad20f6e78685b707a30817b3a2f97925f8a
[ "Apache-2.0" ]
null
null
null
src/gluonts/transform/dataset.py
lfywork/gluon-ts
399dbad20f6e78685b707a30817b3a2f97925f8a
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). # You may not use this file except in compliance with the License. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
31.520833
76
0.723067
from typing import Iterator, List from gluonts.dataset.common import DataEntry, Dataset from gluonts.transform import Chain, Transformation class TransformedDataset(Dataset): def __init__( self, base_dataset: Dataset, transformations: List[Transformation] ) -> None: self.base_d...
true
true
f71abea7e87d7a468b3566906416d9861f1ed252
2,585
py
Python
db.py
tunir27/Attendr-Hardware-Scripts
cdc9293157d1810c2a9c8af0318b04203a8b2bf5
[ "Apache-2.0" ]
1
2018-08-15T06:27:53.000Z
2018-08-15T06:27:53.000Z
db.py
tunir27/Attendr-Hardware-Scripts
cdc9293157d1810c2a9c8af0318b04203a8b2bf5
[ "Apache-2.0" ]
null
null
null
db.py
tunir27/Attendr-Hardware-Scripts
cdc9293157d1810c2a9c8af0318b04203a8b2bf5
[ "Apache-2.0" ]
null
null
null
import sqlite3 import datetime import time #import Read1 #import sync #from datetime import datetime conn = sqlite3.connect('att.db') c = conn.cursor() def db(sid): #conn = sqlite3.connect('att.db') #c = conn.cursor() start_time = time.time() c.execute('''CREATE TABLE IF NOT EXISTS attendance(ID intege...
33.141026
192
0.630174
import sqlite3 import datetime import time conn = sqlite3.connect('att.db') c = conn.cursor() def db(sid): start_time = time.time() c.execute('''CREATE TABLE IF NOT EXISTS attendance(ID integer PRIMARY KEY,std_id varchar2,entry_date varchar2,entry_time varchar2,leave_time varchar2,duration varchar...
true
true
f71abeab574e7cf7dd44a881bb82f87cfbfbc051
2,915
py
Python
__init__.py
LevinJac/viseme-mqtt-skill-mycroft
5f2feb4336bfff1f2a293daf5f6feb43f7d98988
[ "Apache-2.0" ]
null
null
null
__init__.py
LevinJac/viseme-mqtt-skill-mycroft
5f2feb4336bfff1f2a293daf5f6feb43f7d98988
[ "Apache-2.0" ]
null
null
null
__init__.py
LevinJac/viseme-mqtt-skill-mycroft
5f2feb4336bfff1f2a293daf5f6feb43f7d98988
[ "Apache-2.0" ]
null
null
null
from mycroft import MycroftSkill from mycroft.messagebus import Message import json from .lib import MqttService class MessageListener(MycroftSkill): # Initializing the skill def initialize(self): self.log.info("Initializing Skill MessageListener") self.add_event('speak', self.handler_...
41.642857
145
0.67753
from mycroft import MycroftSkill from mycroft.messagebus import Message import json from .lib import MqttService class MessageListener(MycroftSkill): def initialize(self): self.log.info("Initializing Skill MessageListener") self.add_event('speak', self.handler_speak) self.add_...
true
true
f71abf4ef891fb18baa38ab3843f5a02e2198d3b
297
py
Python
src/example_d/trade/get_position.py
Han1018/Cryptocurrency-Automated-Trading
52a5b6d15eb9b2a3a69cc53bd159f6eec073614d
[ "MIT" ]
1
2020-11-24T20:01:37.000Z
2020-11-24T20:01:37.000Z
example_d/trade/get_position.py
vanshwassan/binance-python-futures
f5a1664ef1e18bc8a53479fab3fd6d5e512dba07
[ "MIT" ]
1
2021-07-20T15:25:11.000Z
2021-07-20T15:25:11.000Z
example_d/trade/get_position.py
vanshwassan/binance-python-futures
f5a1664ef1e18bc8a53479fab3fd6d5e512dba07
[ "MIT" ]
1
2021-12-14T02:39:04.000Z
2021-12-14T02:39:04.000Z
from binance_d import RequestClient from binance_d.constant.test import * from binance_d.base.printobject import * from binance_d.model.constant import * request_client = RequestClient(api_key=g_api_key, secret_key=g_secret_key) result = request_client.get_position() PrintMix.print_data(result)
33
74
0.841751
from binance_d import RequestClient from binance_d.constant.test import * from binance_d.base.printobject import * from binance_d.model.constant import * request_client = RequestClient(api_key=g_api_key, secret_key=g_secret_key) result = request_client.get_position() PrintMix.print_data(result)
true
true
f71abf924989b3e0fac8c1f6862cb9ab2a3fcdff
266
py
Python
spectra/__init__.py
jevandezande/spectra
95cf4aa7599c30183263740c88f94714d55e1d0a
[ "MIT" ]
16
2019-10-03T21:30:45.000Z
2022-03-09T22:18:44.000Z
spectra/__init__.py
jevandezande/spectra
95cf4aa7599c30183263740c88f94714d55e1d0a
[ "MIT" ]
8
2021-03-15T20:45:32.000Z
2022-03-03T15:17:42.000Z
spectra/__init__.py
jevandezande/spectra
95cf4aa7599c30183263740c88f94714d55e1d0a
[ "MIT" ]
1
2021-07-26T18:50:06.000Z
2021-07-26T18:50:06.000Z
"""Top-level package for spectra.""" from .conv_spectrum import ConvSpectrum from .sticks_spectrum import SticksSpectrum __author__ = """Jonathon Vandezande""" __email__ = "jevandezande@gmail.com" __version__ = "0.4.0" __all__ = ["ConvSpectrum", "SticksSpectrum"]
26.6
44
0.763158
from .conv_spectrum import ConvSpectrum from .sticks_spectrum import SticksSpectrum __author__ = """Jonathon Vandezande""" __email__ = "jevandezande@gmail.com" __version__ = "0.4.0" __all__ = ["ConvSpectrum", "SticksSpectrum"]
true
true
f71ac12590c5ba69a6a44f3ffa552f4ea88234a3
17,149
py
Python
aslam_offline_calibration/kalibr/python/kalibr_camera_calibration/CameraIntializers.py
CORAL-CMU/kalibr
ebd759286944f156c3ae6202c27fe47667929744
[ "BSD-4-Clause" ]
null
null
null
aslam_offline_calibration/kalibr/python/kalibr_camera_calibration/CameraIntializers.py
CORAL-CMU/kalibr
ebd759286944f156c3ae6202c27fe47667929744
[ "BSD-4-Clause" ]
null
null
null
aslam_offline_calibration/kalibr/python/kalibr_camera_calibration/CameraIntializers.py
CORAL-CMU/kalibr
ebd759286944f156c3ae6202c27fe47667929744
[ "BSD-4-Clause" ]
null
null
null
import sm import aslam_backend as aopt import aslam_cv as cv import numpy as np def addPoseDesignVariable(problem, T0=sm.Transformation()): q_Dv = aopt.RotationQuaternionDv( T0.q() ) q_Dv.setActive( True ) problem.addDesignVariable(q_Dv) t_Dv = aopt.EuclideanPointDv( T0.t() ) t_Dv.setActive( True )...
44.542857
141
0.623068
import sm import aslam_backend as aopt import aslam_cv as cv import numpy as np def addPoseDesignVariable(problem, T0=sm.Transformation()): q_Dv = aopt.RotationQuaternionDv( T0.q() ) q_Dv.setActive( True ) problem.addDesignVariable(q_Dv) t_Dv = aopt.EuclideanPointDv( T0.t() ) t_Dv.setActive( True )...
true
true
f71ac13fb53339858ca85e2c4cb872952d99c45f
41,090
py
Python
clusterdock_centos_7-master/clusterdock/topologies/cdh/cm_api/endpoints/types.py
J0nathan12/clusterdock_centos_7
e8dabbab82111a4a61ff27b6d7f529552c682c3e
[ "Apache-2.0" ]
77
2016-08-02T17:16:59.000Z
2021-12-30T02:21:09.000Z
clusterdock/topologies/cdh/cm_api/endpoints/types.py
cloudera/clusterdock
222ac2d5a9aa2fef7b84b3cf704f9ee54c0cc5d2
[ "Apache-2.0" ]
41
2016-08-01T20:31:50.000Z
2022-03-24T00:52:32.000Z
clusterdock/topologies/cdh/cm_api/endpoints/types.py
J0nathan12/clusterdock_jdock
e32978e51738d652d7bc73d5f4b71d2766e008ac
[ "Apache-2.0" ]
77
2016-08-03T03:55:58.000Z
2022-01-05T07:13:51.000Z
# 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 may not use this file ex...
31.951788
117
0.634485
try: import json except ImportError: import simplejson as json import copy import datetime import time __docformat__ = "epytext" class Attr(object): """ Encapsulates information about an attribute in the JSON encoding of the object. It identifies properties of the attribute such as whether ...
false
true
f71ac1809f6473acb6bd2afca69ff45e16538c2b
12,263
py
Python
tests/python/unittest/test_gluon_rnn.py
ymaxgit/mxnet
01ae629c6593e0352fd30979bccd0196854ef882
[ "Apache-2.0" ]
1
2022-03-03T18:36:42.000Z
2022-03-03T18:36:42.000Z
tests/python/unittest/test_gluon_rnn.py
ymaxgit/mxnet
01ae629c6593e0352fd30979bccd0196854ef882
[ "Apache-2.0" ]
1
2022-02-28T21:23:12.000Z
2022-03-03T18:33:42.000Z
tests/python/unittest/test_gluon_rnn.py
ymaxgit/mxnet
01ae629c6593e0352fd30979bccd0196854ef882
[ "Apache-2.0" ]
1
2022-03-03T18:36:37.000Z
2022-03-03T18:36:37.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
43.640569
124
0.643562
import mxnet as mx from mxnet import gluon import numpy as np from numpy.testing import assert_allclose import unittest from mxnet.test_utils import almost_equal def test_rnn(): cell = gluon.rnn.RNNCell(100, prefix='rnn_') inputs = [mx.sym.Variable('rnn_t%d_data'%i) for i in range(3)] out...
true
true
f71ac220110425c4090ee4f6700cf2ea38162317
2,372
py
Python
foxlink/me_zrl_bound_evolvers.py
lamsoa729/FoXlink
3c061b02968cdab1def752d5c145a6df4615504b
[ "BSD-3-Clause" ]
null
null
null
foxlink/me_zrl_bound_evolvers.py
lamsoa729/FoXlink
3c061b02968cdab1def752d5c145a6df4615504b
[ "BSD-3-Clause" ]
null
null
null
foxlink/me_zrl_bound_evolvers.py
lamsoa729/FoXlink
3c061b02968cdab1def752d5c145a6df4615504b
[ "BSD-3-Clause" ]
2
2019-06-18T16:48:03.000Z
2019-06-20T23:50:02.000Z
#!/usr/bin/env python """@package docstring File: me_zrl_bound_evolvers.py Author: Adam Lamson Email: adam.lamson@colorado.edu Description: """ import numpy as np # from scipy.integrate import dblquad from .me_helpers import dr_dt, convert_sol_to_geom from .me_zrl_odes import (rod_geom_derivs_zrl, calc_moment_derivs_...
35.939394
82
0.660624
import numpy as np from .me_helpers import dr_dt, convert_sol_to_geom from .me_zrl_odes import (rod_geom_derivs_zrl, calc_moment_derivs_zrl, calc_moment_derivs_zrl_B_terms, calc_boundary_derivs_zrl) from .me_zrl_helpers import (avg_force_zrl, ...
true
true
f71ac5ae55c84dae849e3d0cc87c208a05d7bfcc
264
py
Python
antipetros_discordbot/engine/replacements/command_replacements/__init__.py
official-antistasi-community/Antipetros_Discord_Bot
1b5c8b61c09e61cdff671e259f0478d343a50c8d
[ "MIT" ]
null
null
null
antipetros_discordbot/engine/replacements/command_replacements/__init__.py
official-antistasi-community/Antipetros_Discord_Bot
1b5c8b61c09e61cdff671e259f0478d343a50c8d
[ "MIT" ]
null
null
null
antipetros_discordbot/engine/replacements/command_replacements/__init__.py
official-antistasi-community/Antipetros_Discord_Bot
1b5c8b61c09e61cdff671e259f0478d343a50c8d
[ "MIT" ]
1
2021-02-12T01:10:51.000Z
2021-02-12T01:10:51.000Z
from .base_command import AntiPetrosBaseCommand from .flag_command import AntiPetrosFlagCommand from .creation_decorators import auto_meta_info_command, auto_meta_info_group from .base_group import AntiPetrosBaseGroup from .command_category import CommandCategory
44
77
0.897727
from .base_command import AntiPetrosBaseCommand from .flag_command import AntiPetrosFlagCommand from .creation_decorators import auto_meta_info_command, auto_meta_info_group from .base_group import AntiPetrosBaseGroup from .command_category import CommandCategory
true
true
f71ac7200feac49fd738de102b33055f7d33fc8f
1,793
py
Python
setup.py
endreszabo/py-radix
2efbefb87d278be5c33166ca108e3cdcd28637b9
[ "BSD-4-Clause-UC" ]
null
null
null
setup.py
endreszabo/py-radix
2efbefb87d278be5c33166ca108e3cdcd28637b9
[ "BSD-4-Clause-UC" ]
null
null
null
setup.py
endreszabo/py-radix
2efbefb87d278be5c33166ca108e3cdcd28637b9
[ "BSD-4-Clause-UC" ]
null
null
null
#!/usr/bin/env python # Copyright (c) 2004 Damien Miller <djm@mindrot.org> # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED ...
35.156863
77
0.727273
import platform import sys from distutils.core import setup, Extension VERSION = "0.5" if __name__ == '__main__': libs = [] src = [ 'radix.c', 'radix_python.c' ] if sys.platform == 'win32': libs += [ 'ws2_32' ] src += [ 'strlcpy.c' ] if platform.version() < '6.0': src += [ 'inet_ntop.c'...
true
true
f71ac8c34ec504c775b0e08c86a5e168fd54c6a6
842
py
Python
code/preprocessing/download_wordvecs.py
theblind/squad_challenge
3cc81be6ca73e7160abffcc47dde6e188cd02fbb
[ "Apache-2.0" ]
null
null
null
code/preprocessing/download_wordvecs.py
theblind/squad_challenge
3cc81be6ca73e7160abffcc47dde6e188cd02fbb
[ "Apache-2.0" ]
null
null
null
code/preprocessing/download_wordvecs.py
theblind/squad_challenge
3cc81be6ca73e7160abffcc47dde6e188cd02fbb
[ "Apache-2.0" ]
null
null
null
import zipfile import argparse import os from squad_preprocess import maybe_download def setup_args(): parser = argparse.ArgumentParser() parser.add_argument("--download_dir", required=True) # where to put the downloaded glove files return parser.parse_args() def main(): args = setup_args() glove...
27.16129
98
0.731591
import zipfile import argparse import os from squad_preprocess import maybe_download def setup_args(): parser = argparse.ArgumentParser() parser.add_argument("--download_dir", required=True) return parser.parse_args() def main(): args = setup_args() glove_base_url = "http://nlp.stanford.edu/data...
true
true
f71ac992ef0211e206b3d27bddfec1270d1c095f
6,545
py
Python
data_clean/preprocessing.py
shuishoudage/music_generator
7c17ef5bb3a5d872bff5ac8e1664f57f5b4ea08f
[ "MIT" ]
null
null
null
data_clean/preprocessing.py
shuishoudage/music_generator
7c17ef5bb3a5d872bff5ac8e1664f57f5b4ea08f
[ "MIT" ]
null
null
null
data_clean/preprocessing.py
shuishoudage/music_generator
7c17ef5bb3a5d872bff5ac8e1664f57f5b4ea08f
[ "MIT" ]
1
2019-10-14T11:48:23.000Z
2019-10-14T11:48:23.000Z
from typing import List, Tuple, Dict, Any from collections import Counter import pretty_midi import matplotlib.pyplot as plt import librosa.display import os from os import listdir, walk from os.path import isfile, isdir, join from sys import argv import traceback import logging import numpy as np from shutil import co...
35.570652
98
0.59343
from typing import List, Tuple, Dict, Any from collections import Counter import pretty_midi import matplotlib.pyplot as plt import librosa.display import os from os import listdir, walk from os.path import isfile, isdir, join from sys import argv import traceback import logging import numpy as np from shutil import co...
true
true
f71aca40733f04d9dbf52d3494976b80319f27ac
1,059
py
Python
installer/core/providers/aws/boto3/cloudwatch_event.py
dabest1/pacbot
83189006905f7d43f48d416166490773edd89cb1
[ "Apache-2.0" ]
null
null
null
installer/core/providers/aws/boto3/cloudwatch_event.py
dabest1/pacbot
83189006905f7d43f48d416166490773edd89cb1
[ "Apache-2.0" ]
null
null
null
installer/core/providers/aws/boto3/cloudwatch_event.py
dabest1/pacbot
83189006905f7d43f48d416166490773edd89cb1
[ "Apache-2.0" ]
1
2019-06-11T11:14:05.000Z
2019-06-11T11:14:05.000Z
import boto3 def get_event_client(access_key, secret_key, region): """ Returns the client object for AWS Events Args: access_key (str): AWS Access Key secret_key (str): AWS Secret Key region (str): AWS Region Returns: obj: AWS Cloudwatch Event Client Obj """ r...
25.214286
72
0.648725
import boto3 def get_event_client(access_key, secret_key, region): return boto3.client( "events", region_name=region, aws_access_key_id=access_key, aws_secret_access_key=secret_key) def check_rule_exists(rule_name, access_key, secret_key, region): client = get_event_client(ac...
true
true
f71aca5cb50d6e0d40cf7342ca3cded4cb68b824
1,870
py
Python
finorch/sessions/cit/session.py
ADACS-Australia/SS2021B-DBrown
67b93b316e6f9ab09e3bd5105edbbc71108e0723
[ "MIT" ]
null
null
null
finorch/sessions/cit/session.py
ADACS-Australia/SS2021B-DBrown
67b93b316e6f9ab09e3bd5105edbbc71108e0723
[ "MIT" ]
null
null
null
finorch/sessions/cit/session.py
ADACS-Australia/SS2021B-DBrown
67b93b316e6f9ab09e3bd5105edbbc71108e0723
[ "MIT" ]
null
null
null
import logging from finorch.config.config import api_config_manager from finorch.sessions.cit.client import CITClient from finorch.sessions.abstract_session import AbstractSession from finorch.sessions.cit.wrapper import CITWrapper from finorch.transport.ssh import SshTransport class CITSession(AbstractSession): ...
32.807018
115
0.667914
import logging from finorch.config.config import api_config_manager from finorch.sessions.cit.client import CITClient from finorch.sessions.abstract_session import AbstractSession from finorch.sessions.cit.wrapper import CITWrapper from finorch.transport.ssh import SshTransport class CITSession(AbstractSession): ...
true
true
f71acbda8152b39dcd69a9518aee969805ce1605
4,092
py
Python
plotly/validators/scattergeo/marker/_line.py
fcollonval/plotly.py
5c7f100db1af8c82bb740a38ef684955a8ed6d0e
[ "MIT" ]
2
2020-03-24T11:41:14.000Z
2021-01-14T07:59:43.000Z
plotly/validators/scattergeo/marker/_line.py
fcollonval/plotly.py
5c7f100db1af8c82bb740a38ef684955a8ed6d0e
[ "MIT" ]
null
null
null
plotly/validators/scattergeo/marker/_line.py
fcollonval/plotly.py
5c7f100db1af8c82bb740a38ef684955a8ed6d0e
[ "MIT" ]
4
2019-06-03T14:49:12.000Z
2022-01-06T01:05:12.000Z
import _plotly_utils.basevalidators class LineValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__( self, plotly_name='line', parent_name='scattergeo.marker', **kwargs ): super(LineValidator, self).__init__( plotly_name=plotly_name, parent_name=paren...
47.034483
75
0.554497
import _plotly_utils.basevalidators class LineValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__( self, plotly_name='line', parent_name='scattergeo.marker', **kwargs ): super(LineValidator, self).__init__( plotly_name=plotly_name, parent_name=paren...
true
true
f71acbff3ef602966bb7796ad13e0aeba23cd1e4
203,023
py
Python
gmusicapi/protocol/locker_pb2.py
siebert/Unofficial-Google-Music-API
8222d566f5048c03f14beee031632fa80e3c0794
[ "BSD-3-Clause" ]
2
2016-09-06T07:32:06.000Z
2019-11-20T22:22:39.000Z
gmusicapi/protocol/locker_pb2.py
siebert/Unofficial-Google-Music-API
8222d566f5048c03f14beee031632fa80e3c0794
[ "BSD-3-Clause" ]
null
null
null
gmusicapi/protocol/locker_pb2.py
siebert/Unofficial-Google-Music-API
8222d566f5048c03f14beee031632fa80e3c0794
[ "BSD-3-Clause" ]
1
2019-11-20T22:22:41.000Z
2019-11-20T22:22:41.000Z
# Generated by the protocol buffer compiler. DO NOT EDIT! from google.protobuf import descriptor from google.protobuf import message from google.protobuf import reflection from google.protobuf import descriptor_pb2 # @@protoc_insertion_point(imports) import uits_pb2 DESCRIPTOR = descriptor.FileDescriptor( name='...
40.620848
23,106
0.745915
from google.protobuf import descriptor from google.protobuf import message from google.protobuf import reflection from google.protobuf import descriptor_pb2 import uits_pb2 DESCRIPTOR = descriptor.FileDescriptor( name='locker.proto', package='', serialized_pb='\n\x0clocker.proto\x1a\nuits.proto\"\xf8\x01\n\...
true
true
f71acc6d33db887796f3bf9b80851bc5ea533057
1,180
py
Python
deeplmodel/source/wer.py
Haftom2323/AMH-STT
b0292a6c704b3b94eff7a536a4da04f905cb42fb
[ "MIT" ]
1
2022-03-13T19:49:39.000Z
2022-03-13T19:49:39.000Z
deeplmodel/source/wer.py
eyerus21/AMH-STT
b0292a6c704b3b94eff7a536a4da04f905cb42fb
[ "MIT" ]
null
null
null
deeplmodel/source/wer.py
eyerus21/AMH-STT
b0292a6c704b3b94eff7a536a4da04f905cb42fb
[ "MIT" ]
11
2021-08-02T19:29:47.000Z
2022-03-13T17:25:17.000Z
def wer(r, h): """ Calculation of WER with Levenshtein distance. Works only for iterables up to 254 elements (uint8). O(nm) time ans space complexity. Parameters ---------- r : list h : list Returns ------- int Examples -------- >>> wer("who is there".split(),...
24.583333
64
0.440678
def wer(r, h): import numpy d = numpy.zeros((len(r)+1)*(len(h)+1), dtype=numpy.uint8) d = d.reshape((len(r)+1, len(h)+1)) for i in range(len(r)+1): for j in range(len(h)+1): if i == 0: d[0][j] = j elif j == 0: d[i][0] = i for...
true
true
f71acdd0b906e1300a3decc62a833ed0cf01a8fa
7,182
py
Python
club_crm/club_crm/report/fitness_commission_summary/fitness_commission_summary.py
VivekChamp/clubcrm
82036360d867d3dc5406bc71445a98841b5bffbf
[ "MIT" ]
null
null
null
club_crm/club_crm/report/fitness_commission_summary/fitness_commission_summary.py
VivekChamp/clubcrm
82036360d867d3dc5406bc71445a98841b5bffbf
[ "MIT" ]
null
null
null
club_crm/club_crm/report/fitness_commission_summary/fitness_commission_summary.py
VivekChamp/clubcrm
82036360d867d3dc5406bc71445a98841b5bffbf
[ "MIT" ]
null
null
null
# Copyright (c) 2013, Blue Lynx and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe import _ import math from frappe.utils import getdate, get_time, flt from datetime import datetime, timedelta, date, time import calendar def execute(fil...
31.778761
346
0.690058
from __future__ import unicode_literals import frappe from frappe import _ import math from frappe.utils import getdate, get_time, flt from datetime import datetime, timedelta, date, time import calendar def execute(filters=None): columns, data = [], [] if filters: columns = get_column() data = get_data(filte...
true
true
f71ace2a9df90effa5053c4c417c48be91c319fc
1,241
py
Python
setup.py
larsrollik/serial_weighing_scale
312218cbbb6b84b011d83980b3df6e0e99b36e50
[ "BSD-3-Clause" ]
null
null
null
setup.py
larsrollik/serial_weighing_scale
312218cbbb6b84b011d83980b3df6e0e99b36e50
[ "BSD-3-Clause" ]
null
null
null
setup.py
larsrollik/serial_weighing_scale
312218cbbb6b84b011d83980b3df6e0e99b36e50
[ "BSD-3-Clause" ]
null
null
null
from os import path from setuptools import find_packages from setuptools import setup this_directory = path.abspath(path.dirname(__file__)) with open(path.join(this_directory, "README.md")) as f: long_description = f.read() with open(path.join(this_directory, "LICENSE")) as f: license_text = f.read() setu...
24.82
76
0.611604
from os import path from setuptools import find_packages from setuptools import setup this_directory = path.abspath(path.dirname(__file__)) with open(path.join(this_directory, "README.md")) as f: long_description = f.read() with open(path.join(this_directory, "LICENSE")) as f: license_text = f.read() setu...
true
true
f71ace2c76abb44e4261efab937f353dece55020
418
py
Python
mrp_system/migrations/0037_billofmaterials_amount.py
mgeorge8/django_time
f75a442941b0ebbb6cc46a6d18e42b91695b7e57
[ "MIT" ]
1
2018-11-09T02:09:14.000Z
2018-11-09T02:09:14.000Z
mrp_system/migrations/0037_billofmaterials_amount.py
mgeorge8/django_time
f75a442941b0ebbb6cc46a6d18e42b91695b7e57
[ "MIT" ]
null
null
null
mrp_system/migrations/0037_billofmaterials_amount.py
mgeorge8/django_time
f75a442941b0ebbb6cc46a6d18e42b91695b7e57
[ "MIT" ]
null
null
null
# Generated by Django 2.1.2 on 2019-01-11 14:48 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('mrp_system', '0036_auto_20190111_1357'), ] operations = [ migrations.AddField( model_name='billofmaterials', name='a...
22
72
0.614833
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('mrp_system', '0036_auto_20190111_1357'), ] operations = [ migrations.AddField( model_name='billofmaterials', name='amount', field=models.IntegerField(b...
true
true
f71acf1492f4b14baf2359d08fc5b2e0b4e5994f
56,230
py
Python
src/transformers/modeling_t5.py
kushalj001/transformers
0538820737bd8fb9ba1eb3a772412c6bbe2433ab
[ "Apache-2.0" ]
1
2020-10-30T09:05:17.000Z
2020-10-30T09:05:17.000Z
src/transformers/modeling_t5.py
kushalj001/transformers
0538820737bd8fb9ba1eb3a772412c6bbe2433ab
[ "Apache-2.0" ]
null
null
null
src/transformers/modeling_t5.py
kushalj001/transformers
0538820737bd8fb9ba1eb3a772412c6bbe2433ab
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2018 Mesh TensorFlow authors, T5 Authors and HuggingFace Inc. team. # # 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...
44.205975
213
0.650542
import copy import math import os import warnings import torch import torch.nn.functional as F from torch import nn from torch.nn import CrossEntropyLoss from .configuration_t5 import T5Config from .file_utils import ( DUMMY_INPUTS, DUMMY_MASK, add_start_docstrings, add_start_docstring...
true
true
f71acf41bdacbcba980d2fbc41eeab24cc7554c3
1,140
py
Python
pytanga/components/config.py
renatoalmeidaoliveira/Pytanga
aa02f1c0f2573da1330d1d246ab780fa3be336a5
[ "MIT" ]
null
null
null
pytanga/components/config.py
renatoalmeidaoliveira/Pytanga
aa02f1c0f2573da1330d1d246ab780fa3be336a5
[ "MIT" ]
null
null
null
pytanga/components/config.py
renatoalmeidaoliveira/Pytanga
aa02f1c0f2573da1330d1d246ab780fa3be336a5
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Config component. This module defines the config Component. <config> </config> """ from . import AbstractComponent class configComponent(AbstractComponent): def __init__(self): self._xmlns = {} self.attributes = {} self.parent_xmlns = {} self._childre...
21.923077
61
0.60614
from . import AbstractComponent class configComponent(AbstractComponent): def __init__(self): self._xmlns = {} self.attributes = {} self.parent_xmlns = {} self._children: List[AbstractComponent] = [] self.childrenData = [] self.tag = 'config' @property de...
true
true
f71acfeb35f54faa88ad90bc14c98d37cd3bbfd8
97
py
Python
InvoiceBook_website/backend/InvoiceBook/apps.py
HumbertMeyers/InvoiceBook
99af326a529566bdcff5c9c4015f2d89d5df2752
[ "MIT" ]
null
null
null
InvoiceBook_website/backend/InvoiceBook/apps.py
HumbertMeyers/InvoiceBook
99af326a529566bdcff5c9c4015f2d89d5df2752
[ "MIT" ]
null
null
null
InvoiceBook_website/backend/InvoiceBook/apps.py
HumbertMeyers/InvoiceBook
99af326a529566bdcff5c9c4015f2d89d5df2752
[ "MIT" ]
null
null
null
from django.apps import AppConfig class InvoicebookConfig(AppConfig): name = 'InvoiceBook'
16.166667
35
0.773196
from django.apps import AppConfig class InvoicebookConfig(AppConfig): name = 'InvoiceBook'
true
true
f71ad0247ebf714503f6f8492d0d47f17da35091
623
py
Python
course4/week3-ungraded-labs/C4_W3_Lab_4_Github_Actions/app/main.py
sepam/machine-learning-engineering-for-production-public
cd6053459eee9b7f30bf86da63104b3f1381383a
[ "Apache-2.0" ]
null
null
null
course4/week3-ungraded-labs/C4_W3_Lab_4_Github_Actions/app/main.py
sepam/machine-learning-engineering-for-production-public
cd6053459eee9b7f30bf86da63104b3f1381383a
[ "Apache-2.0" ]
null
null
null
course4/week3-ungraded-labs/C4_W3_Lab_4_Github_Actions/app/main.py
sepam/machine-learning-engineering-for-production-public
cd6053459eee9b7f30bf86da63104b3f1381383a
[ "Apache-2.0" ]
null
null
null
import pickle import numpy as np from typing import List from fastapi import FastAPI from pydantic import BaseModel, conlist app = FastAPI(title="Predicting Wine Class with batching") # Open classifier in global scope with open("models/wine-95-fixed.pkl", "rb") as file: clf = pickle.load(file) class Wine(Base...
23.074074
71
0.731942
import pickle import numpy as np from typing import List from fastapi import FastAPI from pydantic import BaseModel, conlist app = FastAPI(title="Predicting Wine Class with batching") with open("models/wine-95-fixed.pkl", "rb") as file: clf = pickle.load(file) class Wine(BaseModel): batches: List[conlist...
true
true
f71ad074c1c6f98c66a9513ea45897d958bd392f
1,461
py
Python
python/config_default_48k.py
entn-at/GlottDNN
b7db669d7f34da92ab34742d75a8ba3c70763a65
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
python/config_default_48k.py
entn-at/GlottDNN
b7db669d7f34da92ab34742d75a8ba3c70763a65
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
python/config_default_48k.py
entn-at/GlottDNN
b7db669d7f34da92ab34742d75a8ba3c70763a65
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# run flags make_dirs = True make_scp = True do_sptk_pitch_analysis = False do_reaper_pitch_analysis = False do_glott_vocoder_analysis = False make_dnn_train_data = False make_dnn_infofile = False do_dnn_training = False do_glott_vocoder_synthesis = True # directories prjdir = '/l/CODE/GlottDNN' # add your own local i...
26.563636
110
0.713895
make_dirs = True make_scp = True do_sptk_pitch_analysis = False do_reaper_pitch_analysis = False do_glott_vocoder_analysis = False make_dnn_train_data = False make_dnn_infofile = False do_dnn_training = False do_glott_vocoder_synthesis = True prjdir = '/l/CODE/GlottDNN' datadir = prjdir + '/data/ansyn_jenny' samp...
true
true
f71ad0e03a1f64c0b8808cee586a271e9c91b997
950
py
Python
clif/testing/python/non_raising_test.py
wangxf123456/clif
9bff8a28f5d266d6ea4f4bb0dc1d9c9a0c9ee5b1
[ "Apache-2.0" ]
966
2017-04-18T04:14:04.000Z
2022-03-03T21:22:44.000Z
clif/testing/python/non_raising_test.py
wangxf123456/clif
9bff8a28f5d266d6ea4f4bb0dc1d9c9a0c9ee5b1
[ "Apache-2.0" ]
48
2017-05-02T23:51:29.000Z
2021-12-06T19:10:11.000Z
clif/testing/python/non_raising_test.py
wangxf123456/clif
9bff8a28f5d266d6ea4f4bb0dc1d9c9a0c9ee5b1
[ "Apache-2.0" ]
135
2017-04-26T06:15:30.000Z
2022-01-07T02:17:20.000Z
# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
28.787879
74
0.753684
from absl.testing import absltest from clif.testing.python import non_raising class NonRaisingTest(absltest.TestCase): def testPlain(self): num = non_raising.MakeTestNonRaisingPlain() self.assertEqual(num, 1) def testMarked(self): num = non_raising.MakeTestNonRaisingMarked() self....
true
true
f71ad1078d00053f655a55288594e5cc3c29cabe
6,120
py
Python
custom_components/pandora_cas/binary_sensor.py
alryaz/hass-pandora-cas
684e9d5e95c89fcf5ac9ede75df3e18c05c03452
[ "MIT" ]
15
2020-09-15T01:05:05.000Z
2022-03-15T11:18:07.000Z
custom_components/pandora_cas/binary_sensor.py
alryaz/hass-pandora-cas
684e9d5e95c89fcf5ac9ede75df3e18c05c03452
[ "MIT" ]
12
2020-09-13T13:22:27.000Z
2022-03-15T12:03:45.000Z
custom_components/pandora_cas/binary_sensor.py
alryaz/hass-pandora-cas
684e9d5e95c89fcf5ac9ede75df3e18c05c03452
[ "MIT" ]
2
2021-06-03T16:32:22.000Z
2021-10-01T20:53:50.000Z
"""Binary sensor platform for Pandora Car Alarm System.""" __all__ = ["ENTITY_TYPES", "async_setup_entry"] import logging from functools import partial from typing import Any, Dict import attr from homeassistant.components.binary_sensor import ( DEVICE_CLASS_CONNECTIVITY, DEVICE_CLASS_DOOR, DEVICE_CLASS_M...
31.709845
87
0.662745
__all__ = ["ENTITY_TYPES", "async_setup_entry"] import logging from functools import partial from typing import Any, Dict import attr from homeassistant.components.binary_sensor import ( DEVICE_CLASS_CONNECTIVITY, DEVICE_CLASS_DOOR, DEVICE_CLASS_MOTION, DOMAIN as PLATFORM_DOMAIN, BinarySensorEntit...
true
true
f71ad2d57334e5b52814c0e8d8c40e1550a4d52b
1,141
py
Python
assignment_seven_2021_09_14/cycle_sort.py
Soyvolon/CISS_380
81ba41ef45ba8f4a4cfc55f9e20b87c5feddba08
[ "Unlicense" ]
null
null
null
assignment_seven_2021_09_14/cycle_sort.py
Soyvolon/CISS_380
81ba41ef45ba8f4a4cfc55f9e20b87c5feddba08
[ "Unlicense" ]
null
null
null
assignment_seven_2021_09_14/cycle_sort.py
Soyvolon/CISS_380
81ba41ef45ba8f4a4cfc55f9e20b87c5feddba08
[ "Unlicense" ]
null
null
null
def cycle_sort(data: list): cap = len(data) for start in range(0, cap - 1): # get item item = data[start] # get new pos for said item pos = start for i in range(start + 1, cap): if data[i] < item: pos += 1 # if there isnt a new pos, ski...
31.694444
62
0.473269
def cycle_sort(data: list): cap = len(data) for start in range(0, cap - 1): item = data[start] pos = start for i in range(start + 1, cap): if data[i] < item: pos += 1 if start == pos: continue # skip past ...
true
true
f71ad48e5cbbd6870f5adadbf55d52267e89621a
5,044
py
Python
options.py
Kunalmighty/BlueJaysGame
76936cea8a57542bf7ea3d546f851f9f9771931f
[ "MIT" ]
null
null
null
options.py
Kunalmighty/BlueJaysGame
76936cea8a57542bf7ea3d546f851f9f9771931f
[ "MIT" ]
null
null
null
options.py
Kunalmighty/BlueJaysGame
76936cea8a57542bf7ea3d546f851f9f9771931f
[ "MIT" ]
null
null
null
""" #EmbraceTheS's options menu state. """ import state import menu import globes import pygame import joystick import volume class Options(state.State): """ Option menu state with the options to clear high scores, and adjust brightness/volume (not yet implemented) """ TEXT = [] BACKGROUND = Non...
45.035714
79
0.490682
import state import menu import globes import pygame import joystick import volume class Options(state.State): TEXT = [] BACKGROUND = None LEFT_MARGIN = None HEIGHTS = None def __init__(self, sound=False, option=0): state.State.__init__(self) if not sound: globes.pla...
true
true
f71ad5d930f9670c92bb44ed061e73d50e006900
1,532
py
Python
tests/functional/test_lock.py
box/etcdb
0f27846a0ca13efff9750b97a38939f66172debc
[ "Apache-2.0" ]
12
2016-10-25T18:03:49.000Z
2019-06-27T13:20:22.000Z
tests/functional/test_lock.py
box/etcdb
0f27846a0ca13efff9750b97a38939f66172debc
[ "Apache-2.0" ]
30
2016-10-20T23:27:09.000Z
2018-12-06T17:23:59.000Z
tests/functional/test_lock.py
box/etcdb
0f27846a0ca13efff9750b97a38939f66172debc
[ "Apache-2.0" ]
4
2016-10-20T23:24:48.000Z
2022-03-01T09:59:29.000Z
import pytest from etcdb import OperationalError from etcdb.lock import Lock, ReadLock, WriteLock def test_readers(etcdb_connection): cur = etcdb_connection.cursor() cur.execute('CREATE TABLE bar(id int not null PRIMARY KEY)') lock = ReadLock(etcdb_connection.client, 'foo', 'bar') lock.acquire(ttl=0)...
30.039216
64
0.679504
import pytest from etcdb import OperationalError from etcdb.lock import Lock, ReadLock, WriteLock def test_readers(etcdb_connection): cur = etcdb_connection.cursor() cur.execute('CREATE TABLE bar(id int not null PRIMARY KEY)') lock = ReadLock(etcdb_connection.client, 'foo', 'bar') lock.acquire(ttl=0)...
true
true
f71ad6efb1b2752e5513922cac67d1c668226597
6,403
py
Python
django_mako_plus/uid.py
knowsuchagency/django-mako-plus
e737be6a2db6e9e897cc804c660494415c4ea180
[ "Apache-2.0" ]
null
null
null
django_mako_plus/uid.py
knowsuchagency/django-mako-plus
e737be6a2db6e9e897cc804c660494415c4ea180
[ "Apache-2.0" ]
null
null
null
django_mako_plus/uid.py
knowsuchagency/django-mako-plus
e737be6a2db6e9e897cc804c660494415c4ea180
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 ''' Created by Conan Albrecht <doconix@gmail.com> Apache open source license. November, 2017 ''' ################################################## ### Unique id generator. Similar to uuid1() but ### also includes the process id. ### ### Note that upping the counter requires a global lock. #...
25.109804
144
0.558176
true
true
f71ad714eec52284cdcd59b0da289a9e2213538e
646
py
Python
data_source.py
ReimuYk/aws-line-counter
ce6131b8a2f3c9b9e70b8496e3f9ce1cfdd64804
[ "MIT" ]
null
null
null
data_source.py
ReimuYk/aws-line-counter
ce6131b8a2f3c9b9e70b8496e3f9ce1cfdd64804
[ "MIT" ]
null
null
null
data_source.py
ReimuYk/aws-line-counter
ce6131b8a2f3c9b9e70b8496e3f9ce1cfdd64804
[ "MIT" ]
null
null
null
import requests import os import time def get_page(i): url = r'https://shr32taah3.execute-api.us-east-1.amazonaws.com/Prod/applications/browse?pageSize=12&pageNumber=%d&searchText=&category=&runtime=&verified=&sortFields=' page = requests.get(url%i) return eval(page.text.replace("true", "True").replace("fa...
32.3
171
0.645511
import requests import os import time def get_page(i): url = r'https://shr32taah3.execute-api.us-east-1.amazonaws.com/Prod/applications/browse?pageSize=12&pageNumber=%d&searchText=&category=&runtime=&verified=&sortFields=' page = requests.get(url%i) return eval(page.text.replace("true", "True").replace("fa...
true
true
f71ad7b7135ea8f54cdfded058aa8b21c4b24595
762
py
Python
learntools/core/multiproblem.py
bkmalayC/learntools
c739a1ee131caebcb9bbd8b138d51cff75152f3a
[ "Apache-2.0" ]
1
2020-06-24T18:25:31.000Z
2020-06-24T18:25:31.000Z
learntools/core/multiproblem.py
bkmalayC/learntools
c739a1ee131caebcb9bbd8b138d51cff75152f3a
[ "Apache-2.0" ]
null
null
null
learntools/core/multiproblem.py
bkmalayC/learntools
c739a1ee131caebcb9bbd8b138d51cff75152f3a
[ "Apache-2.0" ]
null
null
null
class MultipartProblem: """A container for multiple related Problems grouped together in one question. If q1 is a MPP, its subquestions are accessed as q1.a, q1.b, etc. """ def __init__(self, *probs): self.problems = probs # TODO: This should be ordered. self._prob_map = {}...
34.636364
85
0.616798
class MultipartProblem: def __init__(self, *probs): self.problems = probs self._prob_map = {} def _repr_markdown_(self): return repr(self) def __repr__(self): varname = self._varname part_names = ['`{}.{}`'.format(varname, letter) for letter in self._p...
true
true
f71ad7f78f34b02d7d0b0895dc72b58d6a84bcbe
1,775
py
Python
{{cookiecutter.repo_name}}/python/{{cookiecutter.package_name}}/api/__init__.py
havok2063/cookiecutter-marvin
3e64169b865012c5a6099e71a91789770222e5b5
[ "BSD-3-Clause" ]
null
null
null
{{cookiecutter.repo_name}}/python/{{cookiecutter.package_name}}/api/__init__.py
havok2063/cookiecutter-marvin
3e64169b865012c5a6099e71a91789770222e5b5
[ "BSD-3-Clause" ]
null
null
null
{{cookiecutter.repo_name}}/python/{{cookiecutter.package_name}}/api/__init__.py
havok2063/cookiecutter-marvin
3e64169b865012c5a6099e71a91789770222e5b5
[ "BSD-3-Clause" ]
null
null
null
# !usr/bin/env python # -*- coding: utf-8 -*- # # Licensed under a 3-clause BSD license. # from __future__ import print_function, division, absolute_import from flask import request def process_request(request=None, as_dict=None, param=None): '''Generally process the request for POST or GET, and build a form dic...
30.603448
98
0.579155
from __future__ import print_function, division, absolute_import from flask import request def process_request(request=None, as_dict=None, param=None): if request.method == 'POST': if not request.form: data = request.get_json() else: da...
true
true
f71ad891414e822ed9504c04e3c021fb01b0b6e5
13,313
py
Python
negative_inline_editor/templatetags/negative_inline_edit.py
negative-space/negative-inline-editor
dde28b9ada65b81cb996bb9197826df45b67c48b
[ "MIT" ]
null
null
null
negative_inline_editor/templatetags/negative_inline_edit.py
negative-space/negative-inline-editor
dde28b9ada65b81cb996bb9197826df45b67c48b
[ "MIT" ]
null
null
null
negative_inline_editor/templatetags/negative_inline_edit.py
negative-space/negative-inline-editor
dde28b9ada65b81cb996bb9197826df45b67c48b
[ "MIT" ]
null
null
null
import os import re from django import template from django.conf import settings from django.contrib import admin from django.contrib.contenttypes.models import ContentType from django.core.exceptions import MultipleObjectsReturned from django.urls import reverse from django.db.models import Model from django.template...
32.234867
189
0.621948
import os import re from django import template from django.conf import settings from django.contrib import admin from django.contrib.contenttypes.models import ContentType from django.core.exceptions import MultipleObjectsReturned from django.urls import reverse from django.db.models import Model from django.template...
true
true
f71ad930fc472c80200a4a8c8b4190aa61e62059
675
py
Python
components/app/App_tpl.py
bitbuit/billterm
553bf2afb6ff2c1e15becbe1b4ab59346e5a87b5
[ "MIT" ]
null
null
null
components/app/App_tpl.py
bitbuit/billterm
553bf2afb6ff2c1e15becbe1b4ab59346e5a87b5
[ "MIT" ]
null
null
null
components/app/App_tpl.py
bitbuit/billterm
553bf2afb6ff2c1e15becbe1b4ab59346e5a87b5
[ "MIT" ]
null
null
null
from libs.Screen import * class App_tpl(object): @staticmethod def hello(): print(" _ _ _ _ _ ") print(" | |__(_) | | |_ ___ _ _ _ __ ") print(" | '_ \ | | | _/ -_) '_| ' \ ") print("__|_.__/_|_|_|\__\___|_| |_|_|_|_...
30.681818
109
0.459259
from libs.Screen import * class App_tpl(object): @staticmethod def hello(): print(" _ _ _ _ _ ") print(" | |__(_) | | |_ ___ _ _ _ __ ") print(" | '_ \ | | | _/ -_) '_| ' \ ") print("__|_.__/_|_|_|\__\___|_| |_|_|_|_...
true
true
f71adab4390632d131f94912e04795cf9ddfadd8
408
py
Python
tbx/people/migrations/0009_personpage_alt_short_intro.py
arush15june/wagtail-torchbox
c4d06e096c72bd8007975dc016133024f9d27fab
[ "MIT" ]
null
null
null
tbx/people/migrations/0009_personpage_alt_short_intro.py
arush15june/wagtail-torchbox
c4d06e096c72bd8007975dc016133024f9d27fab
[ "MIT" ]
null
null
null
tbx/people/migrations/0009_personpage_alt_short_intro.py
arush15june/wagtail-torchbox
c4d06e096c72bd8007975dc016133024f9d27fab
[ "MIT" ]
null
null
null
# Generated by Django 2.1.5 on 2019-02-16 07:42 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('people', '0008_personpage_short_intro'), ] operations = [ migrations.AddField( model_name='personpage', name='alt_sh...
21.473684
58
0.612745
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('people', '0008_personpage_short_intro'), ] operations = [ migrations.AddField( model_name='personpage', name='alt_short_intro', field=models.TextField(...
true
true
f71adb37c06a58da63ac0e0d5a07fe9ff030a284
2,941
py
Python
southwest-headers.py
WGriffing/southwest-headers
0dd4ac4e2ea50872638499b5b14673aa4b5fa60b
[ "MIT" ]
12
2021-12-09T16:04:52.000Z
2022-03-25T01:03:58.000Z
southwest-headers.py
WGriffing/southwest-headers
0dd4ac4e2ea50872638499b5b14673aa4b5fa60b
[ "MIT" ]
3
2021-12-13T00:04:53.000Z
2022-01-02T06:37:13.000Z
southwest-headers.py
WGriffing/southwest-headers
0dd4ac4e2ea50872638499b5b14673aa4b5fa60b
[ "MIT" ]
2
2021-12-20T16:36:41.000Z
2021-12-28T06:51:17.000Z
# this code is based on original work by @jasonwbarnett. # https://github.com/pyro2927/SouthwestCheckin/issues/70#issuecomment-921166994 import json import time import re import os import random import string import sys from pathlib import Path from seleniumwire import webdriver from selenium.webdriver.chrome.options ...
43.895522
177
0.782387
me import re import os import random import string import sys from pathlib import Path from seleniumwire import webdriver from selenium.webdriver.chrome.options import Options from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expe...
true
true
f71adbc103a2cba26d96345692d6ef2e185b7c56
5,133
py
Python
part_14/setfirmware.py
zcutlip/broken_abandoned
76f2f8577de3c1a570e28f081349e6f22fb33a34
[ "MIT" ]
28
2015-05-02T22:19:26.000Z
2021-04-26T20:01:00.000Z
part_14/setfirmware.py
zcutlip/broken_abandoned
76f2f8577de3c1a570e28f081349e6f22fb33a34
[ "MIT" ]
null
null
null
part_14/setfirmware.py
zcutlip/broken_abandoned
76f2f8577de3c1a570e28f081349e6f22fb33a34
[ "MIT" ]
6
2015-11-03T08:12:43.000Z
2018-08-19T21:48:18.000Z
#!/usr/bin/env python # Copyright (c) 2015 # - Zachary Cutlip <uid000()gmail.com> # # See LICENSE for more details. # import sys import socket import time import base64 from bowcaster.common import Logging HOST="10.12.34.1" #HOST="192.168.127.141" class SetFirmwareRequest(object): """ Generate a "SetFir...
32.903846
90
0.633742
import sys import socket import time import base64 from bowcaster.common import Logging HOST="10.12.34.1" class SetFirmwareRequest(object): MIN_CONTENT_LENGTH=102401 def __init__(self,firmware_file=None,logger=None): b64encode=True if not logger: logger=Logging(max_level...
true
true
f71adbd3d7f37d3e3cf4898f63bddfd194187306
4,593
py
Python
DQMOffline/L1Trigger/test/runDQMOffline_step1_L1TStage2CaloLayer2_cfg.py
nistefan/cmssw
ea13af97f7f2117a4f590a5e654e06ecd9825a5b
[ "Apache-2.0" ]
1
2019-08-09T08:42:11.000Z
2019-08-09T08:42:11.000Z
DQMOffline/L1Trigger/test/runDQMOffline_step1_L1TStage2CaloLayer2_cfg.py
nistefan/cmssw
ea13af97f7f2117a4f590a5e654e06ecd9825a5b
[ "Apache-2.0" ]
null
null
null
DQMOffline/L1Trigger/test/runDQMOffline_step1_L1TStage2CaloLayer2_cfg.py
nistefan/cmssw
ea13af97f7f2117a4f590a5e654e06ecd9825a5b
[ "Apache-2.0" ]
1
2019-04-03T19:23:27.000Z
2019-04-03T19:23:27.000Z
import os import FWCore.ParameterSet.Config as cms from FWCore.ParameterSet.VarParsing import VarParsing from Configuration.StandardSequences.Eras import eras def get_root_files(path): files = os.listdir(path) root_files = [f for f in files if f.endswith(".root")] full_paths = [os.path.join(path, f) for f...
32.34507
119
0.775963
import os import FWCore.ParameterSet.Config as cms from FWCore.ParameterSet.VarParsing import VarParsing from Configuration.StandardSequences.Eras import eras def get_root_files(path): files = os.listdir(path) root_files = [f for f in files if f.endswith(".root")] full_paths = [os.path.join(path, f) for f...
true
true
f71ade1259b4cf0d7e2485e0b9af1fdc780966f1
4,862
py
Python
tests/core/test_tracker_stores.py
vinit134/rasa
58c122fbf459c587fd947d48af5c76ae30bf39be
[ "Apache-2.0" ]
3
2020-02-04T08:44:02.000Z
2021-05-25T19:46:55.000Z
tests/core/test_tracker_stores.py
vinit134/rasa
58c122fbf459c587fd947d48af5c76ae30bf39be
[ "Apache-2.0" ]
21
2019-12-16T17:37:54.000Z
2020-07-06T06:19:04.000Z
tests/core/test_tracker_stores.py
zijiannc/RASA_NLU
4ffafb62b7414cabae07149533e01afe5fc26c14
[ "Apache-2.0" ]
1
2021-03-08T15:04:09.000Z
2021-03-08T15:04:09.000Z
import pytest from rasa.core.channels.channel import UserMessage from rasa.core.domain import Domain from rasa.core.events import SlotSet, ActionExecuted, Restarted from rasa.core.tracker_store import ( TrackerStore, InMemoryTrackerStore, RedisTrackerStore, SQLTrackerStore, ) from rasa.utils.endpoints ...
29.646341
88
0.719663
import pytest from rasa.core.channels.channel import UserMessage from rasa.core.domain import Domain from rasa.core.events import SlotSet, ActionExecuted, Restarted from rasa.core.tracker_store import ( TrackerStore, InMemoryTrackerStore, RedisTrackerStore, SQLTrackerStore, ) from rasa.utils.endpoints ...
true
true
f71adf5f0868af6fbec61be245b281682e33dcf5
3,884
py
Python
configs/top_down/resnext/coco/resnext101_coco_256x192.py
ssumin6/buob
4fb4537423a993cd2894f54cb12f5f3b3fb73141
[ "Apache-2.0" ]
5
2022-01-13T15:06:45.000Z
2022-01-28T19:39:54.000Z
configs/top_down/resnext/coco/resnext101_coco_256x192.py
ssumin6/buob
4fb4537423a993cd2894f54cb12f5f3b3fb73141
[ "Apache-2.0" ]
null
null
null
configs/top_down/resnext/coco/resnext101_coco_256x192.py
ssumin6/buob
4fb4537423a993cd2894f54cb12f5f3b3fb73141
[ "Apache-2.0" ]
1
2021-06-17T13:56:23.000Z
2021-06-17T13:56:23.000Z
log_level = 'INFO' load_from = None resume_from = None dist_params = dict(backend='nccl') workflow = [('train', 1)] checkpoint_config = dict(interval=10) evaluation = dict(interval=10, metric='mAP', key_indicator='AP') optimizer = dict( type='Adam', lr=5e-4, ) optimizer_config = dict(grad_clip=None) # learning...
27.742857
79
0.627703
log_level = 'INFO' load_from = None resume_from = None dist_params = dict(backend='nccl') workflow = [('train', 1)] checkpoint_config = dict(interval=10) evaluation = dict(interval=10, metric='mAP', key_indicator='AP') optimizer = dict( type='Adam', lr=5e-4, ) optimizer_config = dict(grad_clip=None) lr_config...
true
true
f71adf69a610b566f88a21e94d9a8d804f8523db
7,872
py
Python
sdk/ml/azure-ai-ml/azure/ai/ml/entities/_assets/_artifacts/model.py
dubiety/azure-sdk-for-python
62ffa839f5d753594cf0fe63668f454a9d87a346
[ "MIT" ]
1
2022-02-01T18:50:12.000Z
2022-02-01T18:50:12.000Z
sdk/ml/azure-ai-ml/azure/ai/ml/entities/_assets/_artifacts/model.py
ellhe-blaster/azure-sdk-for-python
82193ba5e81cc5e5e5a5239bba58abe62e86f469
[ "MIT" ]
null
null
null
sdk/ml/azure-ai-ml/azure/ai/ml/entities/_assets/_artifacts/model.py
ellhe-blaster/azure-sdk-for-python
82193ba5e81cc5e5e5a5239bba58abe62e86f469
[ "MIT" ]
null
null
null
# --------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # --------------------------------------------------------- from os import PathLike from pathlib import Path from typing import Any, Dict, Union from azure.ai.ml.constants import BASE_PATH_CONTEXT_KE...
38.778325
144
0.650788
from os import PathLike from pathlib import Path from typing import Any, Dict, Union from azure.ai.ml.constants import BASE_PATH_CONTEXT_KEY, PARAMS_OVERRIDE_KEY, ArmConstants, LONG_URI_FORMAT, AssetTypes from azure.ai.ml._restclient.v2022_05_01.models import ( ModelContainerData, ModelVersionDetails, M...
true
true
f71adf72ecef2e4ad8d1dacf64125bbdfd663a2d
3,023
py
Python
pixelsort/argparams.py
jackylu97/pixelsort
24e36518f21636c201ad8624c831e08462a25414
[ "MIT" ]
570
2015-03-01T16:16:42.000Z
2022-03-28T23:12:11.000Z
pixelsort/argparams.py
ebanaut/pixelsort
c4a823c8363e27fb0aebd4f8738ee82dc636f6a8
[ "MIT" ]
20
2016-03-25T16:28:16.000Z
2021-11-11T21:39:28.000Z
pixelsort/argparams.py
ebanaut/pixelsort
c4a823c8363e27fb0aebd4f8738ee82dc636f6a8
[ "MIT" ]
79
2015-03-16T20:14:22.000Z
2022-02-01T17:05:02.000Z
import argparse import logging from pixelsort.interval import choices as interval_choices from pixelsort.sorting import choices as sorting_choices from pixelsort.constants import DEFAULTS def parse_args(): parser = argparse.ArgumentParser(description="Pixel mangle an image.") parser.add_argument("image", help...
33.966292
74
0.585511
import argparse import logging from pixelsort.interval import choices as interval_choices from pixelsort.sorting import choices as sorting_choices from pixelsort.constants import DEFAULTS def parse_args(): parser = argparse.ArgumentParser(description="Pixel mangle an image.") parser.add_argument("image", help...
true
true
f71ae016370c3402b30ac0827d01b9242344e952
1,491
py
Python
example/blog/admin2.py
montiniz/django-admin2
eb3ba7e98a68686f80af80c5c3b8c9c10296fe7a
[ "BSD-3-Clause" ]
1
2015-01-16T23:00:09.000Z
2015-01-16T23:00:09.000Z
example/blog/admin2.py
montiniz/django-admin2
eb3ba7e98a68686f80af80c5c3b8c9c10296fe7a
[ "BSD-3-Clause" ]
null
null
null
example/blog/admin2.py
montiniz/django-admin2
eb3ba7e98a68686f80af80c5c3b8c9c10296fe7a
[ "BSD-3-Clause" ]
1
2017-01-18T08:27:21.000Z
2017-01-18T08:27:21.000Z
# -*- coding: utf-8 -*- from __future__ import division, absolute_import, unicode_literals from django.utils.translation import ugettext_lazy import djadmin2 from djadmin2 import renderers from djadmin2.actions import DeleteSelectedAction # Import your custom models from .actions import (CustomPublishAction, Publish...
27.611111
68
0.729041
from __future__ import division, absolute_import, unicode_literals from django.utils.translation import ugettext_lazy import djadmin2 from djadmin2 import renderers from djadmin2.actions import DeleteSelectedAction from .actions import (CustomPublishAction, PublishAllItemsAction, unpublish_it...
true
true
f71ae15d38428c33a761ff30c5fe22e701f6415c
28,827
py
Python
electrum/lnsweep.py
roth-a/electrum
b6a5f6f2fc11b94bc863d2ccd43f166091badda9
[ "MIT" ]
null
null
null
electrum/lnsweep.py
roth-a/electrum
b6a5f6f2fc11b94bc863d2ccd43f166091badda9
[ "MIT" ]
1
2020-01-31T17:11:07.000Z
2020-01-31T17:11:07.000Z
electrum/lnsweep.py
roth-a/electrum
b6a5f6f2fc11b94bc863d2ccd43f166091badda9
[ "MIT" ]
null
null
null
# Copyright (C) 2018 The Electrum developers # Distributed under the MIT software license, see the accompanying # file LICENCE or http://www.opensource.org/licenses/mit-license.php from typing import Optional, Dict, List, Tuple, TYPE_CHECKING, NamedTuple, Callable from enum import Enum, auto from .util import bfh, bh...
52.034296
132
0.648073
from typing import Optional, Dict, List, Tuple, TYPE_CHECKING, NamedTuple, Callable from enum import Enum, auto from .util import bfh, bh2u from .bitcoin import redeem_script_to_address, dust_threshold from . import ecc from .lnutil import (make_commitment_output_to_remote_address, make_commitment_output_to_local_...
true
true
f71ae1ea2aec311b4f7e6cd58d35f326af88dcb8
892
py
Python
python/projeto02/meusite/urls.py
WilliamDeveloper/udemy_cursos
f592bafbe3d2a5d631458f8c42151c880aadef17
[ "MIT" ]
null
null
null
python/projeto02/meusite/urls.py
WilliamDeveloper/udemy_cursos
f592bafbe3d2a5d631458f8c42151c880aadef17
[ "MIT" ]
null
null
null
python/projeto02/meusite/urls.py
WilliamDeveloper/udemy_cursos
f592bafbe3d2a5d631458f8c42151c880aadef17
[ "MIT" ]
null
null
null
"""meusite URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based...
34.307692
77
0.693946
from django.contrib import admin from django.urls import path, include from home import views urlpatterns = [ path('', views.index), path('admin/', admin.site.urls), path('blog/', include('blog.urls')), path('sobre/', include('sobre.urls')), ]
true
true
f71ae28487a6c137bf0a9c98196c4d1383a39139
489
py
Python
nnwordembed.py
GLaDO8/pytorch_playground
3623de18881a37ce413c92d8a63ea9ba1cc401a5
[ "MIT" ]
2
2019-02-06T18:07:47.000Z
2020-08-12T21:56:50.000Z
nnwordembed.py
GLaDO8/pytorch_playground
3623de18881a37ce413c92d8a63ea9ba1cc401a5
[ "MIT" ]
null
null
null
nnwordembed.py
GLaDO8/pytorch_playground
3623de18881a37ce413c92d8a63ea9ba1cc401a5
[ "MIT" ]
null
null
null
import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim torch.manual_seed(1) word_to_ix = {"hello": 0, "world": 1} #first argument is the size of the embedded matrix. The second argument is the dimension of each word embedding. embeds = nn.Embedding(2, 5) # 2 words in vocab, 5...
37.615385
113
0.766871
import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim torch.manual_seed(1) word_to_ix = {"hello": 0, "world": 1} embeds = nn.Embedding(2, 5) lookup_tensor = torch.tensor([word_to_ix["hello"], word_to_ix["world"]], dtype=torch.long) hello_embed = embeds(lookup_tensor) print(...
true
true
f71ae39173f45a9863447511633a81e7b7687552
1,529
py
Python
Admin-Scripts/Video2.py
vijayshankarrealdeal/Java
2dff1a79c91782bf2aeb1bee057b19c41cafd2a1
[ "MIT" ]
3
2021-03-07T16:29:35.000Z
2021-03-22T07:41:04.000Z
Admin-Scripts/Video2.py
vijayshankarrealdeal/Java
2dff1a79c91782bf2aeb1bee057b19c41cafd2a1
[ "MIT" ]
null
null
null
Admin-Scripts/Video2.py
vijayshankarrealdeal/Java
2dff1a79c91782bf2aeb1bee057b19c41cafd2a1
[ "MIT" ]
2
2021-03-08T06:12:52.000Z
2021-03-14T05:01:19.000Z
import firebase_admin from firebase_admin import credentials,firestore from firebase_admin import storage cred = credentials.Certificate("./adminKey.json") firebase_admin.initialize_app(cred, { 'storageBucket': 'women-e598c.appspot.com' }) #Database Methods db = firestore.client() #discrip = "" title = "GenderEq...
40.236842
264
0.737083
import firebase_admin from firebase_admin import credentials,firestore from firebase_admin import storage cred = credentials.Certificate("./adminKey.json") firebase_admin.initialize_app(cred, { 'storageBucket': 'women-e598c.appspot.com' }) db = firestore.client() title = "GenderEquality" cloudStorageLink = "ht...
true
true
f71ae3b9a7a99ffd6aec250a1fe54db87c9201ae
15,356
py
Python
src/python/analyzer_executor/src/analyzer_executor_lib/analyzer_executor.py
inickles/grapl
f906aba74b2249c9c7d7b1afe6fc540551cdee8b
[ "Apache-2.0" ]
313
2018-10-15T05:58:39.000Z
2020-04-21T20:31:39.000Z
src/python/analyzer_executor/src/analyzer_executor_lib/analyzer_executor.py
graplsec/grapl
68386b425c8e9e34f7380a078279b67b316fe2a0
[ "Apache-2.0" ]
33
2018-10-16T00:47:10.000Z
2020-03-16T22:32:45.000Z
src/python/analyzer_executor/src/analyzer_executor_lib/analyzer_executor.py
graplsec/grapl
68386b425c8e9e34f7380a078279b67b316fe2a0
[ "Apache-2.0" ]
29
2018-11-18T08:39:14.000Z
2020-04-09T20:59:15.000Z
from __future__ import annotations import base64 import hashlib import inspect import json import os import sys import traceback from collections import defaultdict from logging import Logger from multiprocessing import Pipe, Process from multiprocessing.connection import Connection from multiprocessing.pool import Th...
34.276786
93
0.604259
from __future__ import annotations import base64 import hashlib import inspect import json import os import sys import traceback from collections import defaultdict from logging import Logger from multiprocessing import Pipe, Process from multiprocessing.connection import Connection from multiprocessing.pool import Th...
true
true
f71ae3c9f30e5074c6179b84ba1638c42566b5fa
6,730
py
Python
randomdest.py
gbowerman/random-destination
88f6a6a6e6cf971cb9d4bea477b093a4b0eef84e
[ "MIT" ]
null
null
null
randomdest.py
gbowerman/random-destination
88f6a6a6e6cf971cb9d4bea477b093a4b0eef84e
[ "MIT" ]
null
null
null
randomdest.py
gbowerman/random-destination
88f6a6a6e6cf971cb9d4bea477b093a4b0eef84e
[ "MIT" ]
null
null
null
"""randomdest.py - dearpygui app to plot random destinations""" import math import os import random import requests from dotenv import load_dotenv from dearpygui.core import * from dearpygui.simple import * # globals/constants EARTH_RADIUS = 6378.1 MAX_DIST = 16 # destination radius in KM maps_key = "" BASE_URL = "...
32.990196
188
0.673254
import math import os import random import requests from dotenv import load_dotenv from dearpygui.core import * from dearpygui.simple import * EARTH_RADIUS = 6378.1 MAX_DIST = 16 maps_key = "" BASE_URL = "https://dev.virtualearth.net/REST/v1/Imagery/Map/AerialWithLabels/" zoom = "18" distance = MAX_DIST img_size_...
true
true
f71ae3f98733e595da1ffdd6566812f756e6d03b
3,576
py
Python
metadata-ingestion/src/datahub/ingestion/transformer/add_dataset_schema_tags.py
ShubhamThakre/datahub
08a5fcfd017d4a2903a7b637f1e2129b9d7793ea
[ "Apache-2.0" ]
1,603
2016-03-03T17:21:03.000Z
2020-01-22T22:12:02.000Z
metadata-ingestion/src/datahub/ingestion/transformer/add_dataset_schema_tags.py
ShubhamThakre/datahub
08a5fcfd017d4a2903a7b637f1e2129b9d7793ea
[ "Apache-2.0" ]
1,157
2016-03-03T19:29:22.000Z
2020-01-20T14:41:59.000Z
metadata-ingestion/src/datahub/ingestion/transformer/add_dataset_schema_tags.py
ShubhamThakre/datahub
08a5fcfd017d4a2903a7b637f1e2129b9d7793ea
[ "Apache-2.0" ]
570
2016-03-03T17:21:05.000Z
2020-01-21T06:54:10.000Z
from typing import Callable, List, Optional, Union import datahub.emitter.mce_builder as builder from datahub.configuration.common import ConfigModel, KeyValuePattern from datahub.configuration.import_resolver import pydantic_resolve_key from datahub.ingestion.api.common import PipelineContext from datahub.ingestion.t...
33.735849
108
0.699105
from typing import Callable, List, Optional, Union import datahub.emitter.mce_builder as builder from datahub.configuration.common import ConfigModel, KeyValuePattern from datahub.configuration.import_resolver import pydantic_resolve_key from datahub.ingestion.api.common import PipelineContext from datahub.ingestion.t...
true
true
f71ae4f35d601be11c164199f86811680f877aef
8,965
py
Python
teambition/api/works.py
jxtech/teambition-api
a15b845fa029d56c084fe134bd082ee8ba25d534
[ "MIT" ]
47
2015-06-18T15:26:39.000Z
2022-02-22T08:01:58.000Z
teambition/api/works.py
messense/teambition-api
a15b845fa029d56c084fe134bd082ee8ba25d534
[ "MIT" ]
5
2015-07-07T11:09:36.000Z
2020-02-17T08:38:22.000Z
teambition/api/works.py
jxtech/teambition-api
a15b845fa029d56c084fe134bd082ee8ba25d534
[ "MIT" ]
13
2015-06-18T10:07:04.000Z
2021-09-22T03:36:05.000Z
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from optionaldict import optionaldict from teambition.api.base import TeambitionAPI class Works(TeambitionAPI): def get(self, id=None, parent_id=None, page=None, count=None, all=None): """ 获取文件信息 详情请参考 ...
25.112045
79
0.530508
from __future__ import absolute_import, unicode_literals from optionaldict import optionaldict from teambition.api.base import TeambitionAPI class Works(TeambitionAPI): def get(self, id=None, parent_id=None, page=None, count=None, all=None): assert id or parent_id params = optionaldict( ...
true
true
f71ae4fea4b81b1609ed48e653382c873a175421
1,514
py
Python
kicad_to_digikey_bom.py
bradgrantham/circuit_cad_tools
78521453849c3fcfdfa2a7d1916079283ad546c9
[ "Apache-2.0" ]
1
2022-03-13T19:44:24.000Z
2022-03-13T19:44:24.000Z
kicad_to_digikey_bom.py
bradgrantham/circuit_cad_tools
78521453849c3fcfdfa2a7d1916079283ad546c9
[ "Apache-2.0" ]
null
null
null
kicad_to_digikey_bom.py
bradgrantham/circuit_cad_tools
78521453849c3fcfdfa2a7d1916079283ad546c9
[ "Apache-2.0" ]
1
2020-10-29T11:10:44.000Z
2020-10-29T11:10:44.000Z
import csv import sys bom = {} reader = csv.reader(sys.stdin) header = next(reader) columns = {} for (column_name, column_number) in zip(header, range(0, len(header))): columns[column_name.strip()] = column_number # Digikey ignores the headers and makes one map columns, so this # is unnecessary and also annoyin...
36.926829
155
0.624174
import csv import sys bom = {} reader = csv.reader(sys.stdin) header = next(reader) columns = {} for (column_name, column_number) in zip(header, range(0, len(header))): columns[column_name.strip()] = column_number for row in reader: entry = {} for (column_name, column_number) in columns.iteritems():...
false
true
f71ae63d4807be5163417cadc8694e164fd2ab08
145
py
Python
example/list.py
LunaNode/lndynamic-ap
7ffbc17742b7595b7e36cbef7213fc5dee18c50d
[ "MIT" ]
null
null
null
example/list.py
LunaNode/lndynamic-ap
7ffbc17742b7595b7e36cbef7213fc5dee18c50d
[ "MIT" ]
1
2016-05-15T20:10:52.000Z
2016-05-15T20:10:52.000Z
example/list.py
LunaNode/lndynamic-ap
7ffbc17742b7595b7e36cbef7213fc5dee18c50d
[ "MIT" ]
12
2016-04-30T21:02:03.000Z
2022-03-25T06:47:12.000Z
from lndynamic import LNDynamic api_id = 'YOUR API ID' api_key = 'YOUR API KEY' api = LNDynamic(api_id, api_key) print api.request('vm', 'list')
24.166667
32
0.731034
from lndynamic import LNDynamic api_id = 'YOUR API ID' api_key = 'YOUR API KEY' api = LNDynamic(api_id, api_key) print api.request('vm', 'list')
false
true
f71ae8cf1533e7bd8ad8fa5b8cf9a24021f79424
623
py
Python
example/your_app/app.py
keyloguer/flask_middleware
38d01d7f87484f85aaeb7bb6deaa0f1055497c1a
[ "Apache-2.0" ]
21
2019-10-09T18:50:57.000Z
2020-10-14T20:49:57.000Z
example/your_app/app.py
keyloguer/flask_middleware
38d01d7f87484f85aaeb7bb6deaa0f1055497c1a
[ "Apache-2.0" ]
null
null
null
example/your_app/app.py
keyloguer/flask_middleware
38d01d7f87484f85aaeb7bb6deaa0f1055497c1a
[ "Apache-2.0" ]
null
null
null
from flask import Flask from flask_middleware_jwt import Middleware, middleware_jwt_required app = Flask(__name__) app.config['MIDDLEWARE_URL_IDENTITY'] = 'http://0.0.0.0:5000' app.config['MIDDLEWARE_VERIFY_ENDPOINT'] = '/token/verify' app.config['MIDDLEWARE_BEARER'] = True app.config['MIDDLEWARE_VERIF...
28.318182
68
0.693419
from flask import Flask from flask_middleware_jwt import Middleware, middleware_jwt_required app = Flask(__name__) app.config['MIDDLEWARE_URL_IDENTITY'] = 'http://0.0.0.0:5000' app.config['MIDDLEWARE_VERIFY_ENDPOINT'] = '/token/verify' app.config['MIDDLEWARE_BEARER'] = True app.config['MIDDLEWARE_VERIF...
true
true
f71ae8eb0aa5e13e7033134268ddae1c0ba1dd97
6,344
py
Python
modules/pulse/pulse_sim.py
timsnow/PandABlocks-FPGA
7df03a7a4415c5c9e02c80dc80c3d377ab480e5c
[ "Apache-2.0" ]
null
null
null
modules/pulse/pulse_sim.py
timsnow/PandABlocks-FPGA
7df03a7a4415c5c9e02c80dc80c3d377ab480e5c
[ "Apache-2.0" ]
null
null
null
modules/pulse/pulse_sim.py
timsnow/PandABlocks-FPGA
7df03a7a4415c5c9e02c80dc80c3d377ab480e5c
[ "Apache-2.0" ]
null
null
null
from common.python.simulations import BlockSimulation, properties_from_ini from collections import deque # max queue size MAX_QUEUE = 1023 # min FPGA deadtime between queued pulses MIN_QUEUE_DELTA = 4 # time taken to clear queue QUEUE_CLEAR_TIME = 4 NAMES, PROPERTIES = properties_from_ini(__file__, "pulse.block.in...
36.45977
79
0.565889
from common.python.simulations import BlockSimulation, properties_from_ini from collections import deque MAX_QUEUE = 1023 MIN_QUEUE_DELTA = 4 QUEUE_CLEAR_TIME = 4 NAMES, PROPERTIES = properties_from_ini(__file__, "pulse.block.ini") class PulseSimulation(BlockSimulation): ENABLE, TRIG, DELAY_L, DELAY_H, WI...
true
true
f71ae95e60037316cd6d37acc29a87db6cdf90d0
25,177
py
Python
Lib/fontTools/ttLib/tables/E_B_L_C_.py
ViktorRubenko/fonttools
522c32547c569d655feafd475987284bc0dabed1
[ "MIT", "BSD-3-Clause" ]
1
2020-05-07T16:29:02.000Z
2020-05-07T16:29:02.000Z
Lib/fontTools/ttLib/tables/E_B_L_C_.py
ViktorRubenko/fonttools
522c32547c569d655feafd475987284bc0dabed1
[ "MIT", "BSD-3-Clause" ]
null
null
null
Lib/fontTools/ttLib/tables/E_B_L_C_.py
ViktorRubenko/fonttools
522c32547c569d655feafd475987284bc0dabed1
[ "MIT", "BSD-3-Clause" ]
null
null
null
from fontTools.misc.py23 import * from fontTools.misc import sstruct from . import DefaultTable from fontTools.misc.textTools import safeEval from .BitmapGlyphMetrics import BigGlyphMetrics, bigGlyphMetricsFormat, SmallGlyphMetrics, smallGlyphMetricsFormat import struct import itertools from collections import deque im...
40.154705
139
0.743059
from fontTools.misc.py23 import * from fontTools.misc import sstruct from . import DefaultTable from fontTools.misc.textTools import safeEval from .BitmapGlyphMetrics import BigGlyphMetrics, bigGlyphMetricsFormat, SmallGlyphMetrics, smallGlyphMetricsFormat import struct import itertools from collections import deque im...
true
true
f71ae98a1105d01fa234bdf25931e02f5302919f
1,327
py
Python
interface/gaussian.py
R-Laurent/detection
66823e8664b66caadef2ee35ee197fd9a5066f56
[ "MIT" ]
null
null
null
interface/gaussian.py
R-Laurent/detection
66823e8664b66caadef2ee35ee197fd9a5066f56
[ "MIT" ]
null
null
null
interface/gaussian.py
R-Laurent/detection
66823e8664b66caadef2ee35ee197fd9a5066f56
[ "MIT" ]
null
null
null
def generate_gaussianFile(geom, grid, logger, outdir="./", igrid=0, maxbq=200): gaussianfile = outdir + \ "input_batch_{:05d}.com".format(igrid) f = open(gaussianfile, "w") # f.write("%OldChk=/home/aartigas/chk/molecule_spe.chk\n".format()) f.write("%nproc=8\n".format()) f.write("%mem=1000MB\...
39.029412
144
0.553881
def generate_gaussianFile(geom, grid, logger, outdir="./", igrid=0, maxbq=200): gaussianfile = outdir + \ "input_batch_{:05d}.com".format(igrid) f = open(gaussianfile, "w") f.write("%nproc=8\n".format()) f.write("%mem=1000MB\n".format()) f.write("#P b3lyp/6-311++G(d,p) SCF(Tight) CPHF(Sepa...
true
true
f71aea3701b57a737d5aa551497f3aa64313bab4
6,197
py
Python
mmdet/models/dense_heads/pisa_retinanet_head.py
zactodd/mmdetection
9596b9a4c916ae601f9a8a641c3a0ea47265abec
[ "Apache-2.0" ]
549
2020-01-02T05:14:57.000Z
2022-03-29T18:34:12.000Z
mmdet/models/dense_heads/pisa_retinanet_head.py
wondervictor/lvis-mmdet
68532eb6f4643ddf0179a4384c8c9e004a2c1d07
[ "Apache-2.0" ]
136
2021-07-11T11:26:54.000Z
2022-03-31T02:45:34.000Z
mmdet/models/dense_heads/pisa_retinanet_head.py
wondervictor/lvis-mmdet
68532eb6f4643ddf0179a4384c8c9e004a2c1d07
[ "Apache-2.0" ]
233
2020-01-18T03:46:27.000Z
2022-03-19T03:17:47.000Z
import torch from mmdet.core import force_fp32, images_to_levels from ..builder import HEADS from ..losses import carl_loss, isr_p from .retina_head import RetinaHead @HEADS.register_module() class PISARetinaHead(RetinaHead): """PISA Retinanet Head. The head owns the same structure with Retinanet Head, but ...
40.24026
79
0.598031
import torch from mmdet.core import force_fp32, images_to_levels from ..builder import HEADS from ..losses import carl_loss, isr_p from .retina_head import RetinaHead @HEADS.register_module() class PISARetinaHead(RetinaHead): @force_fp32(apply_to=('cls_scores', 'bbox_preds')) def loss(self, cls...
true
true
f71aebb3c6779bbbbac6736bbbca965e3ddbbe88
4,718
py
Python
diff_representation/model/edit_encoder/bag_of_edits_change_encoder.py
microsoft/iclr2019-learning-to-represent-edits
e5777d6aa6cdeda500cf076646177c48d1cb4622
[ "MIT" ]
8
2021-03-15T18:57:18.000Z
2021-08-23T11:28:22.000Z
diff_representation/model/edit_encoder/bag_of_edits_change_encoder.py
microsoft/iclr2019-learning-to-represent-edits
e5777d6aa6cdeda500cf076646177c48d1cb4622
[ "MIT" ]
null
null
null
diff_representation/model/edit_encoder/bag_of_edits_change_encoder.py
microsoft/iclr2019-learning-to-represent-edits
e5777d6aa6cdeda500cf076646177c48d1cb4622
[ "MIT" ]
4
2021-03-27T14:19:09.000Z
2021-09-13T12:35:31.000Z
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. from itertools import chain import numpy as np import torch from torch import nn as nn from torch.autograd import Variable from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence from tqdm import tqdm import sys from diff_repres...
42.504505
167
0.636922
from itertools import chain import numpy as np import torch from torch import nn as nn from torch.autograd import Variable from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence from tqdm import tqdm import sys from diff_representation.change_entry import ChangeExample from diff_representation.mod...
true
true
f71aebc2afaca9f74e0aad77ccea915a36978cb2
1,995
py
Python
examples/classify_capture.py
tbeatty/edgetpu
14237f65ba07b7b1d8287e9f60dd20c88562871a
[ "Apache-2.0" ]
10
2019-04-12T08:02:12.000Z
2020-12-27T13:53:37.000Z
examples/classify_capture.py
tbeatty/edgetpu
14237f65ba07b7b1d8287e9f60dd20c88562871a
[ "Apache-2.0" ]
1
2019-04-03T12:22:55.000Z
2019-04-04T10:42:35.000Z
examples/classify_capture.py
tbeatty/edgetpu
14237f65ba07b7b1d8287e9f60dd20c88562871a
[ "Apache-2.0" ]
3
2019-04-25T13:44:36.000Z
2021-02-17T06:00:56.000Z
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
33.25
80
0.702757
import argparse import io import time from edgetpu.classification.engine import ClassificationEngine from edgetpu.utils import dataset_utils import numpy as np import picamera def main(): parser = argparse.ArgumentParser() parser.add_argument( '--model', help='File path of Tflite model.', req...
true
true
f71aec18d787da6ff5ca5c22add4823da1992bf0
718
py
Python
Solution/0081.Search_in_Rotated_Sorted_Array_II/0081.Search_in_Rotated_Sorted_Array_II.py
xleslie/LeetCode
0af08817b3922e1bbc558091963fd4ff65a506ea
[ "MIT" ]
null
null
null
Solution/0081.Search_in_Rotated_Sorted_Array_II/0081.Search_in_Rotated_Sorted_Array_II.py
xleslie/LeetCode
0af08817b3922e1bbc558091963fd4ff65a506ea
[ "MIT" ]
null
null
null
Solution/0081.Search_in_Rotated_Sorted_Array_II/0081.Search_in_Rotated_Sorted_Array_II.py
xleslie/LeetCode
0af08817b3922e1bbc558091963fd4ff65a506ea
[ "MIT" ]
null
null
null
class Solution: def search(self, nums: List[int], target: int) -> bool: i,j=0,len(nums) while i<j: m=i+(j-i)//2 if nums[m]==target: return True if nums[m]>nums[i]: if target>=nums[i] and target<nums[m]: j=m else:...
31.217391
59
0.367688
class Solution: def search(self, nums: List[int], target: int) -> bool: i,j=0,len(nums) while i<j: m=i+(j-i)//2 if nums[m]==target: return True if nums[m]>nums[i]: if target>=nums[i] and target<nums[m]: j=m else:...
true
true
f71aedc6bc7df22a8c1ea544a471fb0c4efcfc27
1,844
py
Python
tvm_test/run_simple_mod_op2_pth.py
junarwohn/tvm
96c2e06cd063a695b3b485f2bdf8875df55fff1a
[ "Zlib", "Unlicense", "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0" ]
null
null
null
tvm_test/run_simple_mod_op2_pth.py
junarwohn/tvm
96c2e06cd063a695b3b485f2bdf8875df55fff1a
[ "Zlib", "Unlicense", "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0" ]
null
null
null
tvm_test/run_simple_mod_op2_pth.py
junarwohn/tvm
96c2e06cd063a695b3b485f2bdf8875df55fff1a
[ "Zlib", "Unlicense", "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0" ]
null
null
null
import tvm from tvm import relay from tvm import relay from tvm.runtime.vm import VirtualMachine from tvm.contrib.download import download_testdata from SimpleModel import Net import numpy as np import cv2 # PyTorch imports import torch import torchvision # Time library for speed check import time in_size = 32 inpu...
25.260274
98
0.741323
import tvm from tvm import relay from tvm import relay from tvm.runtime.vm import VirtualMachine from tvm.contrib.download import download_testdata from SimpleModel import Net import numpy as np import cv2 import torch import torchvision import time in_size = 32 input_shape = (1, 3, in_size, in_size) def do_tra...
true
true
f71aeff53f61023328ab2b142760b44cd1843c8c
6,750
py
Python
tests/test_etdrk4fxcy.py
liuyxpp/chebpy
05a9492d0d78591a39923e4a85a0f24bcc79ae4f
[ "BSD-3-Clause" ]
null
null
null
tests/test_etdrk4fxcy.py
liuyxpp/chebpy
05a9492d0d78591a39923e4a85a0f24bcc79ae4f
[ "BSD-3-Clause" ]
null
null
null
tests/test_etdrk4fxcy.py
liuyxpp/chebpy
05a9492d0d78591a39923e4a85a0f24bcc79ae4f
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- #/usr/bin/env python import numpy as np import matplotlib.pylab as plt from timer import Timer from chebpy import ETDRK4FxCy, ETDRK4FxCy2, BC, ETDRK4 from chebpy import ROBIN, DIRICHLET def test_etdrk4fxcy(): ''' The test function is u = e^[f(x,y) - t] where ...
30.681818
79
0.493333
import numpy as np import matplotlib.pylab as plt from timer import Timer from chebpy import ETDRK4FxCy, ETDRK4FxCy2, BC, ETDRK4 from chebpy import ROBIN, DIRICHLET def test_etdrk4fxcy(): ''' The test function is u = e^[f(x,y) - t] where f(x,y) = h(x) + g(y) Assume it is th...
false
true
f71af005c4808726491024543d12346686c50421
3,691
py
Python
travel_time_visualization/server.py
rogerfitz/tutorials
dae6470bad63b71e755caaff0b69893f5c9a1d63
[ "MIT" ]
45
2017-07-13T23:20:54.000Z
2022-02-25T16:48:52.000Z
flask_viz_server/server.py
rogerfitz/tutorials
dae6470bad63b71e755caaff0b69893f5c9a1d63
[ "MIT" ]
51
2017-07-28T13:48:26.000Z
2021-11-29T06:37:41.000Z
flask_viz_server/server.py
rogerfitz/tutorials
dae6470bad63b71e755caaff0b69893f5c9a1d63
[ "MIT" ]
38
2017-07-13T15:48:30.000Z
2022-02-26T04:12:06.000Z
from flask import Flask, jsonify,render_template,request from config import API_KEY import datetime from collections import defaultdict import requests import pandas as pd import sys import logging from itertools import repeat app = Flask(__name__) gunicorn_error_logger = logging.getLogger('gunicorn.error') app.logger...
35.490385
145
0.715253
from flask import Flask, jsonify,render_template,request from config import API_KEY import datetime from collections import defaultdict import requests import pandas as pd import sys import logging from itertools import repeat app = Flask(__name__) gunicorn_error_logger = logging.getLogger('gunicorn.error') app.logger...
true
true
f71af0636d15e0878c031743b0f73cf871004237
19,689
py
Python
paddlenlp/transformers/bert/tokenizer.py
Leedoo/PaddleNLP
ac3a6165e5eb6d638a4165709fd6cf91c11077c7
[ "Apache-2.0" ]
3
2021-09-06T11:27:49.000Z
2021-11-09T08:19:00.000Z
paddlenlp/transformers/bert/tokenizer.py
narrowser/PaddleNLP
fd740cb7a9d83b91116d3ad9cf6b4e3a683481f4
[ "Apache-2.0" ]
null
null
null
paddlenlp/transformers/bert/tokenizer.py
narrowser/PaddleNLP
fd740cb7a9d83b91116d3ad9cf6b4e3a683481f4
[ "Apache-2.0" ]
4
2021-08-23T07:46:06.000Z
2021-09-23T08:37:03.000Z
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # # 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 Licens...
37.863462
121
0.565646
import copy import io import json import os import six import unicodedata from .. import PretrainedTokenizer from ..tokenizer_utils import convert_to_unicode, whitespace_tokenize, _is_whitespace, _is_control, _is_punctuation __all__ = ['BasicTokenizer', 'BertTokenizer', 'WordpieceTokenizer'] class Ba...
true
true
f71af1cd54d5851bd4030703d9d6a0bb37011f59
8,309
py
Python
src/mission_node/src/intersection_detector.py
mommy79/AuDi-GIT-turtlebot3_autorace
fd1382246f1ee74ee70857006563184d672a6666
[ "Apache-2.0" ]
1
2021-06-13T06:20:15.000Z
2021-06-13T06:20:15.000Z
src/mission_node/src/intersection_detector.py
taening/AuDi-GIT-turtlebot3_autorace
fd1382246f1ee74ee70857006563184d672a6666
[ "Apache-2.0" ]
null
null
null
src/mission_node/src/intersection_detector.py
taening/AuDi-GIT-turtlebot3_autorace
fd1382246f1ee74ee70857006563184d672a6666
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import numpy as np import cv2 import math class IntersectionDetector: def __init__(self): self.lower_blue = np.array([85, 90, 120], np.uint8) self.upper_blue = np.array([115, 255, 255], np.uint8) def fn_find_intersection_line(self, img_trans): ...
54.664474
197
0.603562
import numpy as np import cv2 import math class IntersectionDetector: def __init__(self): self.lower_blue = np.array([85, 90, 120], np.uint8) self.upper_blue = np.array([115, 255, 255], np.uint8) def fn_find_intersection_line(self, img_trans): pers_height, pers_width = img_...
true
true
f71af1f582d2aaa6d4011db4c3ff8c3821e87e34
32,935
py
Python
numpyro/distributions/transforms.py
ahoho/numpyro
64e94e346c51a6c0c1ba51aa7b608e73513f158f
[ "Apache-2.0" ]
null
null
null
numpyro/distributions/transforms.py
ahoho/numpyro
64e94e346c51a6c0c1ba51aa7b608e73513f158f
[ "Apache-2.0" ]
null
null
null
numpyro/distributions/transforms.py
ahoho/numpyro
64e94e346c51a6c0c1ba51aa7b608e73513f158f
[ "Apache-2.0" ]
null
null
null
# Copyright Contributors to the Pyro project. # SPDX-License-Identifier: Apache-2.0 import math import warnings import weakref import numpy as np from jax import lax, ops, tree_flatten, tree_map, vmap from jax.flatten_util import ravel_pytree from jax.nn import softplus import jax.numpy as jnp from jax.scipy.linalg ...
34.851852
120
0.637559
import math import warnings import weakref import numpy as np from jax import lax, ops, tree_flatten, tree_map, vmap from jax.flatten_util import ravel_pytree from jax.nn import softplus import jax.numpy as jnp from jax.scipy.linalg import solve_triangular from jax.scipy.special import expit, logit from numpyro.d...
true
true
f71af30647e8b3464f41ad8052f431bd92a2243e
2,623
py
Python
christmas_lights/Sprite1d.py
rec/christmas_lights
da72b3941b097b6854ba1ba999c0a6cf9b029b0f
[ "MIT" ]
1
2019-05-26T15:10:04.000Z
2019-05-26T15:10:04.000Z
christmas_lights/Sprite1d.py
rec/christmas_lights
da72b3941b097b6854ba1ba999c0a6cf9b029b0f
[ "MIT" ]
null
null
null
christmas_lights/Sprite1d.py
rec/christmas_lights
da72b3941b097b6854ba1ba999c0a6cf9b029b0f
[ "MIT" ]
null
null
null
import numbers, random class Sprite1d: """A one-dimensional sprite with subpixel positioning.""" def __init__(self, icon, color_list, speed=0, acceleration=0, bound=(0, 1), position=0, center=None): self.color_list = color_list if hasattr(color_list, 'dtype'): self...
33.202532
79
0.576439
import numbers, random class Sprite1d: def __init__(self, icon, color_list, speed=0, acceleration=0, bound=(0, 1), position=0, center=None): self.color_list = color_list if hasattr(color_list, 'dtype'): self._combine = self._combine_numpy self.icon = icon ...
true
true
f71af32c0f552806810683bb603031e425d1a879
95
py
Python
core/response/__init__.py
ryanolee/pager-duty-sync
1fd88634e461b5db647d856bc6b59f990944685e
[ "MIT" ]
null
null
null
core/response/__init__.py
ryanolee/pager-duty-sync
1fd88634e461b5db647d856bc6b59f990944685e
[ "MIT" ]
2
2020-09-27T18:19:17.000Z
2021-06-29T09:21:04.000Z
core/response/__init__.py
ryanolee/pager-duty-sync
1fd88634e461b5db647d856bc6b59f990944685e
[ "MIT" ]
null
null
null
from .response import get_response from .lambda_proxy_response import get_lambda_proxy_response
47.5
60
0.905263
from .response import get_response from .lambda_proxy_response import get_lambda_proxy_response
true
true
f71af42134cc4cc0f0fd59f5b0ef650eed03bbb9
2,051
py
Python
pagarmecoreapi/models/list_customers_response.py
pagarme/pagarme-core-api-python
c7b11ca78ab3e7e896e5b75048e6f72b511db00e
[ "MIT" ]
6
2021-09-02T19:55:04.000Z
2022-03-16T14:06:15.000Z
pagarmecoreapi/models/list_customers_response.py
pagarme/pagarme-core-api-python
c7b11ca78ab3e7e896e5b75048e6f72b511db00e
[ "MIT" ]
2
2021-10-11T22:48:15.000Z
2022-01-24T18:24:23.000Z
pagarmecoreapi/models/list_customers_response.py
pagarme/pagarme-core-api-python
c7b11ca78ab3e7e896e5b75048e6f72b511db00e
[ "MIT" ]
2
2021-09-12T21:43:32.000Z
2022-03-07T16:58:54.000Z
# -*- coding: utf-8 -*- """ pagarmecoreapi This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). """ import pagarmecoreapi.models.get_customer_response import pagarmecoreapi.models.paging_response class ListCustomersResponse(object): """Implementation of the 'List...
29.3
150
0.611409
import pagarmecoreapi.models.get_customer_response import pagarmecoreapi.models.paging_response class ListCustomersResponse(object): _names = { "data":'data', "paging":'paging' } def __init__(self, data=None, paging=None): ...
true
true
f71af554f8fb983c51ebf2f5979bbb45ab0484fa
1,434
py
Python
services/web/server/src/simcore_service_webserver/log.py
colinRawlings/osparc-simcore
bf2f18d5bc1e574d5f4c238d08ad15156184c310
[ "MIT" ]
25
2018-04-13T12:44:12.000Z
2022-03-12T15:01:17.000Z
services/web/server/src/simcore_service_webserver/log.py
colinRawlings/osparc-simcore
bf2f18d5bc1e574d5f4c238d08ad15156184c310
[ "MIT" ]
2,553
2018-01-18T17:11:55.000Z
2022-03-31T16:26:40.000Z
services/web/server/src/simcore_service_webserver/log.py
odeimaiz/osparc-simcore
71c2fc58dcfe067487dcd75cb70298a4d6237e97
[ "MIT" ]
20
2018-01-18T19:45:33.000Z
2022-03-29T07:08:47.000Z
""" Configuration and utilities for service logging """ import logging from typing import Optional, Union from aiodebug import log_slow_callbacks from aiohttp.log import access_logger from servicelib.logging_utils import config_all_loggers LOG_LEVEL_STEP = logging.CRITICAL - logging.ERROR def setup_logging(*, lev...
30.510638
111
0.739191
import logging from typing import Optional, Union from aiodebug import log_slow_callbacks from aiohttp.log import access_logger from servicelib.logging_utils import config_all_loggers LOG_LEVEL_STEP = logging.CRITICAL - logging.ERROR def setup_logging(*, level: Union[str, int], slow_duration: Optional[float] = Non...
true
true
f71af6b92295f3372a61cc87a1cb4e7b3810469d
336
py
Python
Algorithms/Sort Array By Parity.py
KushRabadia/Leetcode
f6af5bf0b9ef8daf9870570b52012297128aa9e1
[ "MIT" ]
null
null
null
Algorithms/Sort Array By Parity.py
KushRabadia/Leetcode
f6af5bf0b9ef8daf9870570b52012297128aa9e1
[ "MIT" ]
null
null
null
Algorithms/Sort Array By Parity.py
KushRabadia/Leetcode
f6af5bf0b9ef8daf9870570b52012297128aa9e1
[ "MIT" ]
null
null
null
class Solution(object): def sortArrayByParity(self, A): """ :type A: List[int] :rtype: List[int] """ result = [] for i in A: if i%2 == 0: result.insert(0,i) else: result.append(i) ...
21
35
0.383929
class Solution(object): def sortArrayByParity(self, A): result = [] for i in A: if i%2 == 0: result.insert(0,i) else: result.append(i) return result
true
true
f71af7240c9eccec7c0e6d401d254719234a7b2b
1,119
py
Python
pyunity/examples/example6/__init__.py
rayzchen/PyUnity
8ed436eca7a84f05190c1fa275c58da5c6059926
[ "MIT" ]
null
null
null
pyunity/examples/example6/__init__.py
rayzchen/PyUnity
8ed436eca7a84f05190c1fa275c58da5c6059926
[ "MIT" ]
null
null
null
pyunity/examples/example6/__init__.py
rayzchen/PyUnity
8ed436eca7a84f05190c1fa275c58da5c6059926
[ "MIT" ]
null
null
null
# Copyright (c) 2020-2022 The PyUnity Team # This file is licensed under the MIT License. # See https://docs.pyunity.x10.bz/en/latest/license.html from pyunity import Behaviour, GameObject, SceneManager, Material, RGB, Mesh, Vector3, MeshRenderer, WaitForSeconds class Switch(Behaviour): async def Start(sel...
31.971429
116
0.680965
from pyunity import Behaviour, GameObject, SceneManager, Material, RGB, Mesh, Vector3, MeshRenderer, WaitForSeconds class Switch(Behaviour): async def Start(self): await WaitForSeconds(3) SceneManager.LoadSceneByIndex(1) def main(): scene = SceneManager.AddScene("Scene") scen...
true
true
f71af7bed48f507c7621116150709b5c2b26365b
2,239
py
Python
setup.py
fmarco76/DiscourseSSO
97d3318c6ebe9cb10af3d5aeaff4da1b60472ff8
[ "Apache-2.0" ]
14
2015-06-03T09:32:16.000Z
2021-04-28T13:39:40.000Z
setup.py
fmarco76/DiscourseSSO
97d3318c6ebe9cb10af3d5aeaff4da1b60472ff8
[ "Apache-2.0" ]
3
2015-06-03T09:45:04.000Z
2018-02-21T07:25:47.000Z
setup.py
fmarco76/DiscourseSSO
97d3318c6ebe9cb10af3d5aeaff4da1b60472ff8
[ "Apache-2.0" ]
5
2015-05-29T11:23:20.000Z
2019-09-15T23:54:48.000Z
#!/usr/bin/env python # -*- encoding: utf-8 -*- from __future__ import absolute_import, print_function import io import re from glob import glob from os.path import basename from os.path import dirname from os.path import join from os.path import splitext from setuptools import find_packages from setuptools import se...
31.985714
113
0.618133
from __future__ import absolute_import, print_function import io import re from glob import glob from os.path import basename from os.path import dirname from os.path import join from os.path import splitext from setuptools import find_packages from setuptools import setup def read(*names, **kwargs): return io...
true
true
f71af8d2ec295f87bf614c74aa31266459b19da0
3,373
py
Python
stactools_cgls_lc100/stactools/cgls_lc100/stac.py
jonas-eberle/stactools
ce82450343caf71c08f04d2a4a16590285585735
[ "Apache-2.0" ]
null
null
null
stactools_cgls_lc100/stactools/cgls_lc100/stac.py
jonas-eberle/stactools
ce82450343caf71c08f04d2a4a16590285585735
[ "Apache-2.0" ]
2
2021-08-12T17:54:36.000Z
2021-08-12T18:21:28.000Z
src/stactools/cgls_lc100/stac.py
stactools-packages/stactools-cgls_lc100
9cc863336cd946d0e8651c1a3670cfc9c866f54c
[ "Apache-2.0" ]
null
null
null
import os import pystac from pystac.utils import str_to_datetime import rasterio as rio from shapely.geometry import box, mapping, shape from stactools.cgls_lc100.constants import ( PROVIDER_NAME, ITEM_TIF_IMAGE_NAME, DISCRETE_CLASSIFICATION_CLASS_NAMES, DISCRETE_CLASSIFICATION_CLASS_PALETTE) def create_ite...
34.070707
92
0.602728
import os import pystac from pystac.utils import str_to_datetime import rasterio as rio from shapely.geometry import box, mapping, shape from stactools.cgls_lc100.constants import ( PROVIDER_NAME, ITEM_TIF_IMAGE_NAME, DISCRETE_CLASSIFICATION_CLASS_NAMES, DISCRETE_CLASSIFICATION_CLASS_PALETTE) def create_ite...
true
true
f71af958c9c9d5d07c4709793698bfeea578307a
2,917
py
Python
tests/unit/test_requester.py
HKLM/sync-connect-sdk
16ec0fecd31042970ee29146011250a74f4742ae
[ "MIT" ]
null
null
null
tests/unit/test_requester.py
HKLM/sync-connect-sdk
16ec0fecd31042970ee29146011250a74f4742ae
[ "MIT" ]
null
null
null
tests/unit/test_requester.py
HKLM/sync-connect-sdk
16ec0fecd31042970ee29146011250a74f4742ae
[ "MIT" ]
null
null
null
import syncconnect import responses import unittest class TestRequester(unittest.TestCase): EXPECTED = 'expected' URL = 'http://ford.url' def queue(self, status_code, **kwargs): """ queue fake responses with passed status code """ if not kwargs: json = {'message': self.EXPECT...
28.881188
71
0.637299
import syncconnect import responses import unittest class TestRequester(unittest.TestCase): EXPECTED = 'expected' URL = 'http://ford.url' def queue(self, status_code, **kwargs): if not kwargs: json = {'message': self.EXPECTED} else: json = kwargs response...
true
true
f71af9645244b8b41948a3f0545272ecb692549e
2,122
py
Python
lib/CollectionCheckerDIF.py
joser1945/cmr-metadata-review
df0bb24dd06f981af907569f1a97966753053a99
[ "Apache-2.0" ]
15
2018-06-26T19:58:44.000Z
2022-03-01T21:19:34.000Z
lib/CollectionCheckerDIF.py
joser1945/cmr-metadata-review
df0bb24dd06f981af907569f1a97966753053a99
[ "Apache-2.0" ]
61
2018-06-27T15:15:41.000Z
2022-03-08T15:39:32.000Z
lib/CollectionCheckerDIF.py
joser1945/cmr-metadata-review
df0bb24dd06f981af907569f1a97966753053a99
[ "Apache-2.0" ]
9
2019-01-22T15:48:48.000Z
2021-10-01T18:38:30.000Z
''' Copyright 2016, United States Government, as represented by the Administrator of the National Aeronautics and Space Administration. All rights reserved. The "pyCMR" platform is licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may ...
33.15625
88
0.661169
import json import sys from CheckerDIF import checkerRules from CSVDIF import DIFOutputCSV from JsonDIF import DIFOutputJSON class Checker(): def __init__(self): self.checkerRules = checkerRules() self.DIFOutputCSV = DIFOutputCSV(self.checkerRules,self.wrap) self.DIFOutputJSON = DIFOutput...
true
true
f71afa37b95ab3440c489490d28114d5823b2630
409
py
Python
job_extract/jobs/impl/indeed_cursor.py
evbarnett/job_extract
dafa4d69a5daca83d337192617b244c89e4b5ae6
[ "MIT" ]
null
null
null
job_extract/jobs/impl/indeed_cursor.py
evbarnett/job_extract
dafa4d69a5daca83d337192617b244c89e4b5ae6
[ "MIT" ]
null
null
null
job_extract/jobs/impl/indeed_cursor.py
evbarnett/job_extract
dafa4d69a5daca83d337192617b244c89e4b5ae6
[ "MIT" ]
null
null
null
class IndeedCursor(JobCursor): def __init__(self, title: str, location: str, radius: int = 25): base_url = "https://www.indeed.com/jobs?" self._title = title self._location = location title_esc = ul.quote(self._title, safe='') location_esc = ul.quote(self._location, safe='')...
37.181818
72
0.611247
class IndeedCursor(JobCursor): def __init__(self, title: str, location: str, radius: int = 25): base_url = "https://www.indeed.com/jobs?" self._title = title self._location = location title_esc = ul.quote(self._title, safe='') location_esc = ul.quote(self._location, safe='')...
true
true
f71afacc656469a5f59aa99865a3ea05cae6a31d
6,053
py
Python
Test/Machine/rbm.py
tvieijra/netket
ef3ff32b242f25b6a6ae0f08db1aada85775a2ea
[ "Apache-2.0" ]
10
2019-11-29T02:51:53.000Z
2021-08-14T18:52:33.000Z
Test/Machine/rbm.py
tvieijra/netket
ef3ff32b242f25b6a6ae0f08db1aada85775a2ea
[ "Apache-2.0" ]
2
2020-03-03T11:12:00.000Z
2020-05-01T17:04:41.000Z
Test/Machine/rbm.py
tvieijra/netket
ef3ff32b242f25b6a6ae0f08db1aada85775a2ea
[ "Apache-2.0" ]
6
2019-12-02T07:29:01.000Z
2021-04-04T21:55:21.000Z
# Copyright 2019 The Simons Foundation, Inc. - All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
33.815642
82
0.587973
import netket import numpy as _np __all__ = ["PyRbm"] class PyRbm(netket.machine.CxxMachine): def __init__( self, hilbert, alpha=None, use_visible_bias=True, use_hidden_bias=True ): super(PyRbm, self).__init__(hilbert) n = hilbert.size if alpha < 0: ...
true
true
f71afb68427e72653aff0696997abed27acca654
2,058
py
Python
aioradio/jira.py
nrccua/aioradio
2437c2a7fcad81c2e410002c685f587df2fcd76c
[ "MIT" ]
9
2021-01-04T13:13:03.000Z
2021-04-30T18:41:08.000Z
aioradio/jira.py
nrccua/aioradio
2437c2a7fcad81c2e410002c685f587df2fcd76c
[ "MIT" ]
null
null
null
aioradio/jira.py
nrccua/aioradio
2437c2a7fcad81c2e410002c685f587df2fcd76c
[ "MIT" ]
null
null
null
"""Generic functions related to Jira.""" from typing import Any, Dict import httpx async def post_jira_issue(url: str, jira_user: str, jira_token: str, payload: Dict[str, Any]) -> Dict[str, Any]: """Post payload to create jira issue. Args: url (str): url jira_user (str): jira username ...
30.264706
112
0.651118
from typing import Any, Dict import httpx async def post_jira_issue(url: str, jira_user: str, jira_token: str, payload: Dict[str, Any]) -> Dict[str, Any]: headers = {'Content-Type': 'application/json'} auth = (jira_user, jira_token) async with httpx.AsyncClient() as client: return await client....
true
true