hexsha
stringlengths
40
40
size
int64
3
1.03M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
3
972
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
78
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
3
972
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
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
3
972
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
78
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
3
1.03M
avg_line_length
float64
1.13
941k
max_line_length
int64
2
941k
alphanum_fraction
float64
0
1
f53792904c91e5d7cd3980d8c43aef9503813fb4
1,761
py
Python
check_sap_shortdumps.py
kmodric/check_sap_shortdumps.py
4e6a46b6e6f9022abf4f5bdc14906b0ae3d371e4
[ "MIT" ]
null
null
null
check_sap_shortdumps.py
kmodric/check_sap_shortdumps.py
4e6a46b6e6f9022abf4f5bdc14906b0ae3d371e4
[ "MIT" ]
null
null
null
check_sap_shortdumps.py
kmodric/check_sap_shortdumps.py
4e6a46b6e6f9022abf4f5bdc14906b0ae3d371e4
[ "MIT" ]
null
null
null
#!/usr/bin/python import os os.chdir('/tmp') #sapnwrfc - A Python interface to SAP NetWeaver R/3 systems using the RFC protocol #SAP RFC Connector using the SAP NW RFC SDK for Python http://www.piersharding.com/blog/ #https://github.com/piersharding/python-sapnwrfc import sapnwrfc import sys import json if len(sys.a...
30.894737
114
0.642249
e8bac25e6b9cb3cec37dd4d2a44cd17a5e5fd140
283
py
Python
sandbox/rocky/tf/spaces/box.py
RussellM2020/maml_gps
631560dfd4e23dc2da9bfbbd2e3c5252aa9775c5
[ "MIT" ]
26
2019-04-02T16:19:10.000Z
2019-11-13T13:18:06.000Z
sandbox/rocky/tf/spaces/box.py
RussellM2020/maml_gps
631560dfd4e23dc2da9bfbbd2e3c5252aa9775c5
[ "MIT" ]
1
2019-04-24T14:01:14.000Z
2019-04-25T14:16:25.000Z
sandbox/rocky/tf/spaces/box.py
RussellM2020/maml_gps
631560dfd4e23dc2da9bfbbd2e3c5252aa9775c5
[ "MIT" ]
8
2019-12-17T09:11:58.000Z
2021-07-02T06:55:31.000Z
from rllab.spaces.box import Box as TheanoBox import tensorflow as tf class Box(TheanoBox): def new_tensor_variable(self, name, extra_dims, add_to_flat_dim=0): return tf.placeholder(tf.float32, shape=[None] * extra_dims + [self.flat_dim+add_to_flat_dim], name=name)
25.727273
113
0.75265
359b43c10e56b673021ef42ad4fc6c65875f08b6
401
py
Python
urlshortener/wsgi.py
vikaschandak/urlshortener
de0fad8dbfe031f553efcf95c3b6a985a97b97e5
[ "MIT" ]
2
2021-04-02T15:46:52.000Z
2021-04-02T20:05:56.000Z
urlshortener/wsgi.py
vikaschandak/urlshortener
de0fad8dbfe031f553efcf95c3b6a985a97b97e5
[ "MIT" ]
null
null
null
urlshortener/wsgi.py
vikaschandak/urlshortener
de0fad8dbfe031f553efcf95c3b6a985a97b97e5
[ "MIT" ]
2
2020-09-30T15:53:35.000Z
2020-09-30T16:38:47.000Z
""" WSGI config for urlshortener project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_...
23.588235
78
0.790524
1673d68325bf8de993ca041d671c343255ad019d
8,489
py
Python
symphony/cli/pyinventory/api/property_type.py
idoshveki/magma
8022267bd8b8d94913fbb9a0836880361d785446
[ "BSD-3-Clause" ]
null
null
null
symphony/cli/pyinventory/api/property_type.py
idoshveki/magma
8022267bd8b8d94913fbb9a0836880361d785446
[ "BSD-3-Clause" ]
null
null
null
symphony/cli/pyinventory/api/property_type.py
idoshveki/magma
8022267bd8b8d94913fbb9a0836880361d785446
[ "BSD-3-Clause" ]
1
2021-05-18T06:54:58.000Z
2021-05-18T06:54:58.000Z
#!/usr/bin/env python3 # Copyright (c) 2004-present Facebook All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. from typing import List, Sequence from pysymphony import SymphonyClient from .._utils import format_property_definitions, get_propert...
36.433476
145
0.671457
560b145db1bbd2da69d9e678b2822124d1995b5b
1,583
py
Python
binary_search.py
gsuryalss/searching
25f4ed7df411a0af657b5763e55bf42c1168d6d7
[ "MIT" ]
null
null
null
binary_search.py
gsuryalss/searching
25f4ed7df411a0af657b5763e55bf42c1168d6d7
[ "MIT" ]
null
null
null
binary_search.py
gsuryalss/searching
25f4ed7df411a0af657b5763e55bf42c1168d6d7
[ "MIT" ]
null
null
null
""" Binary search is used on a collection of sorted items. It relies on the technique of repeatedly dividing the input into half until it finds the search value. * Divide the array element into half & find the median value (//2) * check the median element, if it is equal return it * if the median element is...
29.314815
108
0.679722
db42fa58dda8b65448ed7c100210974cc1d21937
3,551
py
Python
cogs/game/minigames/game_of_life/functions.py
FellowHashbrown/omega-psi-py
4ea33cdbef15ffaa537f2c9e382de508c58093fc
[ "MIT" ]
4
2018-12-23T08:49:40.000Z
2021-03-25T16:51:43.000Z
cogs/game/minigames/game_of_life/functions.py
FellowHashbrown/omega-psi-py
4ea33cdbef15ffaa537f2c9e382de508c58093fc
[ "MIT" ]
23
2020-11-03T17:40:40.000Z
2022-02-01T17:12:59.000Z
cogs/game/minigames/game_of_life/functions.py
FellowHashbrown/omega-psi-py
4ea33cdbef15ffaa537f2c9e382de508c58093fc
[ "MIT" ]
1
2019-07-11T23:40:13.000Z
2019-07-11T23:40:13.000Z
from random import choice def choose_house(player, *, buy = True, house_one = None, house_two = None): """Has the AI intelligently choose a house depending on the purchase prices and the sell prices :param player: The player object that must choose between two houses :param buy: Whether or not to deci...
42.27381
88
0.604618
ddcf189d16247230172843d2da786dfc39eebba5
2,339
py
Python
deletetweets/__main__.py
theandrebass/delete-tweets
308053df8221f0a8ddd56456e12ada233f3b1525
[ "0BSD" ]
null
null
null
deletetweets/__main__.py
theandrebass/delete-tweets
308053df8221f0a8ddd56456e12ada233f3b1525
[ "0BSD" ]
null
null
null
deletetweets/__main__.py
theandrebass/delete-tweets
308053df8221f0a8ddd56456e12ada233f3b1525
[ "0BSD" ]
null
null
null
#!/usr/bin/env python import argparse import os import sys from deletetweets import deletetweets __author__ = "Koen Rouwhorst" __version__ = "1.0.6" def main(): parser = argparse.ArgumentParser(description="Delete old tweets.") parser.add_argument("--since", dest="since_date", help="Delete tweets since thi...
39.644068
102
0.645575
5ba5c8395dcd246376056a1c767d60bb8579c3c9
42,075
py
Python
zhaquirks/xiaomi/aqara/opple_remote.py
guirem/zha-device-handlers
9dc8a68d43e064b8c4ba7dfd29a4b4382e030a05
[ "Apache-2.0" ]
null
null
null
zhaquirks/xiaomi/aqara/opple_remote.py
guirem/zha-device-handlers
9dc8a68d43e064b8c4ba7dfd29a4b4382e030a05
[ "Apache-2.0" ]
null
null
null
zhaquirks/xiaomi/aqara/opple_remote.py
guirem/zha-device-handlers
9dc8a68d43e064b8c4ba7dfd29a4b4382e030a05
[ "Apache-2.0" ]
null
null
null
"""Xiaomi aqara opple remote devices.""" import logging from zigpy.profiles import zha import zigpy.types as types from zigpy.zcl.clusters.general import ( Basic, Identify, LevelControl, MultistateInput, OnOff, ) from zigpy.zcl.clusters.lighting import Color from zigpy.zdo.types import NodeDescript...
35.150376
87
0.528913
ad052808a0ac0e54d6820b3d6e38f64f1483fe4a
44,565
py
Python
python/ccxt/async_support/digifinex.py
orikalinski/ccxt_new
318caa4f8db7ffb719edab2c060a0989d2a9cd28
[ "MIT" ]
1
2019-09-26T09:16:37.000Z
2019-09-26T09:16:37.000Z
python/ccxt/async_support/digifinex.py
orikalinski/ccxt_new
318caa4f8db7ffb719edab2c060a0989d2a9cd28
[ "MIT" ]
1
2020-09-03T10:11:29.000Z
2020-09-03T10:11:29.000Z
python/ccxt/async_support/digifinex.py
orikalinski/ccxt_new
318caa4f8db7ffb719edab2c060a0989d2a9cd28
[ "MIT" ]
3
2019-09-26T09:17:26.000Z
2021-02-01T11:51:49.000Z
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.async_support.base.exchange import Exchange from ccxt.base.errors import ExchangeError from ccxt.base.errors import Authenticatio...
38.319003
224
0.459598
9009e68767d4ad906e1933878fa8648230201d72
2,443
py
Python
soft/lib.nntest/customize.py
G4V/ck-nntest
0c1a52cfe2c6634f0edae3f14911fa43838a17f6
[ "BSD-3-Clause" ]
9
2018-08-08T03:17:06.000Z
2021-01-03T13:24:40.000Z
soft/lib.nntest/customize.py
G4V/ck-nntest
0c1a52cfe2c6634f0edae3f14911fa43838a17f6
[ "BSD-3-Clause" ]
9
2018-07-12T09:32:14.000Z
2020-06-30T13:35:01.000Z
soft/lib.nntest/customize.py
G4V/ck-nntest
0c1a52cfe2c6634f0edae3f14911fa43838a17f6
[ "BSD-3-Clause" ]
4
2018-07-31T13:12:31.000Z
2020-08-09T19:25:37.000Z
# # Copyright (c) 2017 cTuning foundation. # See CK COPYRIGHT.txt for copyright details. # # SPDX-License-Identifier: BSD-3-Clause. # See CK LICENSE.txt for licensing details. # # Collective Knowledge (individual environment - setup) # # Developer: Grigori Fursin, Grigori.Fursin@cTuning.org, http://fursin.net # ######...
27.144444
78
0.513713
0098ec7de6358061e4a726139dfdcca6b7921da7
9,271
py
Python
master/python_games_sweigart/python_games_sweigart/reversegam.py
AlexRogalskiy/DevArtifacts
931aabb8cbf27656151c54856eb2ea7d1153203a
[ "MIT" ]
4
2018-09-07T15:35:24.000Z
2019-03-27T09:48:12.000Z
master/python_games_sweigart/python_games_sweigart/reversegam.py
AlexRogalskiy/DevArtifacts
931aabb8cbf27656151c54856eb2ea7d1153203a
[ "MIT" ]
371
2020-03-04T21:51:56.000Z
2022-03-31T20:59:11.000Z
master/python_games_sweigart/python_games_sweigart/reversegam.py
AlexRogalskiy/DevArtifacts
931aabb8cbf27656151c54856eb2ea7d1153203a
[ "MIT" ]
3
2019-06-18T19:57:17.000Z
2020-11-06T03:55:08.000Z
# "Реверси": клон "Отелло". import random import sys WIDTH = 8 # Игровое поле содержит 8 клеток по ширине. HEIGHT = 8 # Игровое поле содержит 8 клеток по высоте. def drawBoard(board): # Вывести игровое поле, переданное этой функции. Ничего не возвращать. print(' 12345678') print(' +--------+') for y i...
35.657692
152
0.594758
d0b5eeb2fddf6054e343b702c4a2c92cf97abc76
7,070
py
Python
built-in/PyTorch/Official/cv/image_classification/Gluon_ResNet50_v1d_for_PyTorch/timm/models/layers/eca.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/models/layers/eca.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/models/layers/eca.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...
43.641975
108
0.68727
2375f135e6b8ec09a00b6715e99018c53e729d65
2,491
py
Python
tests/test_newsitem.py
erwinelling/wagtailnews
90b2a1b9b9fd9e9e365165ff757d10cbfd1b24fe
[ "BSD-2-Clause" ]
35
2019-02-24T15:04:54.000Z
2022-02-28T09:34:35.000Z
tests/test_newsitem.py
erwinelling/wagtailnews
90b2a1b9b9fd9e9e365165ff757d10cbfd1b24fe
[ "BSD-2-Clause" ]
10
2019-04-25T08:43:57.000Z
2021-09-12T23:57:24.000Z
tests/test_newsitem.py
erwinelling/wagtailnews
90b2a1b9b9fd9e9e365165ff757d10cbfd1b24fe
[ "BSD-2-Clause" ]
14
2019-02-25T10:56:33.000Z
2021-07-22T06:33:11.000Z
# -*- coding: utf8 -*- from __future__ import absolute_import, unicode_literals import datetime from django.test import TestCase from django.utils import timezone from django.utils.http import urlquote from wagtail.core.models import Site from wagtail.tests.utils import WagtailTestUtils from tests.app.models import ...
34.123288
79
0.638298
ed9167acca9cad61b695e4b526bdf372c25e155c
5,769
py
Python
tensorflow_probability/python/bijectors/cholesky_to_inv_cholesky_test.py
brianwa84/probability
6f8e78d859ac41170be5147c8c7bde54cc5aa83e
[ "Apache-2.0" ]
2
2020-12-17T20:43:24.000Z
2021-06-11T22:09:16.000Z
tensorflow_probability/python/bijectors/cholesky_to_inv_cholesky_test.py
brianwa84/probability
6f8e78d859ac41170be5147c8c7bde54cc5aa83e
[ "Apache-2.0" ]
2
2021-08-25T16:14:51.000Z
2022-02-10T04:47:11.000Z
tensorflow_probability/python/bijectors/cholesky_to_inv_cholesky_test.py
brianwa84/probability
6f8e78d859ac41170be5147c8c7bde54cc5aa83e
[ "Apache-2.0" ]
1
2020-12-19T13:05:15.000Z
2020-12-19T13:05:15.000Z
# Copyright 2018 The TensorFlow Probability Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
41.503597
80
0.627318
a0e92b03b6599d22dbd5579d261e8240f11a17ae
6,292
py
Python
google/cloud/forseti/scanner/scanners/audit_logging_scanner.py
mcunha/forseti-security
cbf25f6173c1a25d4e43a9738eca73f927361cb8
[ "Apache-2.0" ]
1
2018-10-06T23:16:59.000Z
2018-10-06T23:16:59.000Z
google/cloud/forseti/scanner/scanners/audit_logging_scanner.py
mcunha/forseti-security
cbf25f6173c1a25d4e43a9738eca73f927361cb8
[ "Apache-2.0" ]
null
null
null
google/cloud/forseti/scanner/scanners/audit_logging_scanner.py
mcunha/forseti-security
cbf25f6173c1a25d4e43a9738eca73f927361cb8
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 The Forseti Security Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
38.839506
80
0.63398
324aae1cf0b2eeaf8b973beda2c374bdf2660784
1,241
py
Python
urls.py
Lornatang/opencv201907
777b11780cdef4cd5656f8bb9bdef8b461dd55ab
[ "Apache-2.0" ]
4
2019-08-11T04:43:23.000Z
2020-04-10T00:31:56.000Z
urls.py
Lornatang/opencv201907
777b11780cdef4cd5656f8bb9bdef8b461dd55ab
[ "Apache-2.0" ]
null
null
null
urls.py
Lornatang/opencv201907
777b11780cdef4cd5656f8bb9bdef8b461dd55ab
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 DayHR Authors. All Rights Reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
37.606061
80
0.609186
7f35e518be03e89a29f95dba06e3016816872ea7
518
py
Python
bnlp/bengali_fasttext.py
aaloman/bnlp
de7d58b7ce7e4e92386e0edd40f5845cae0bd5e5
[ "MIT" ]
null
null
null
bnlp/bengali_fasttext.py
aaloman/bnlp
de7d58b7ce7e4e92386e0edd40f5845cae0bd5e5
[ "MIT" ]
null
null
null
bnlp/bengali_fasttext.py
aaloman/bnlp
de7d58b7ce7e4e92386e0edd40f5845cae0bd5e5
[ "MIT" ]
null
null
null
import fasttext class Bengali_Fasttext(object): def __init__(self, is_train=False): self.is_train = is_train def train_fasttext(self, data, model_name, epoch): if self.is_train: model = fasttext.train_unsupervised(data, model='skipgram', minCount=1, epoch=epoch) model....
25.9
96
0.667954
29e3e067b14856d2b102ff489ac6c3cab4939c00
668
py
Python
ocr/celery.py
radtomas/simple-web-ocr
4b2dcca918ebf6117d6fa025ba8b32d1fde0b288
[ "MIT" ]
null
null
null
ocr/celery.py
radtomas/simple-web-ocr
4b2dcca918ebf6117d6fa025ba8b32d1fde0b288
[ "MIT" ]
3
2021-06-09T18:05:45.000Z
2022-02-10T09:30:41.000Z
ocr/celery.py
radtomas/simple-web-ocr-backend
4b2dcca918ebf6117d6fa025ba8b32d1fde0b288
[ "MIT" ]
null
null
null
from __future__ import absolute_import, unicode_literals import os from celery import Celery # set the default Django settings module for the 'celery' program. from django.conf import settings os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ocr.settings') app = Celery('ocr') app.conf.update( result_backend=set...
24.740741
66
0.732036
7efa52bc670826a2e9479e7700fe9ce22fe29290
4,328
py
Python
contrib/seeds/generate-seeds.py
iexcoin/Iex
3a80d2f241228c3ff7687301f6a59e1d34babd31
[ "MIT" ]
null
null
null
contrib/seeds/generate-seeds.py
iexcoin/Iex
3a80d2f241228c3ff7687301f6a59e1d34babd31
[ "MIT" ]
null
null
null
contrib/seeds/generate-seeds.py
iexcoin/Iex
3a80d2f241228c3ff7687301f6a59e1d34babd31
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2014-2017 Wladimir J. van der Laan # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Script to generate list of seed nodes for chainparams.cpp. This script expects two text files in the dir...
31.362319
98
0.581562
719b417ab6a812e3afff9da3106a372cd7ac6682
30,246
py
Python
astropy/units/tests/test_equivalencies.py
gpdf/astropy
c487542611276a3361a38d6c4b3954dcd637f847
[ "BSD-3-Clause" ]
null
null
null
astropy/units/tests/test_equivalencies.py
gpdf/astropy
c487542611276a3361a38d6c4b3954dcd637f847
[ "BSD-3-Clause" ]
null
null
null
astropy/units/tests/test_equivalencies.py
gpdf/astropy
c487542611276a3361a38d6c4b3954dcd637f847
[ "BSD-3-Clause" ]
null
null
null
# coding: utf-8 # Licensed under a 3-clause BSD style license - see LICENSE.rst """Separate tests specifically for equivalencies.""" # THIRD-PARTY import pytest import numpy as np from numpy.testing import assert_allclose # LOCAL from astropy import units as u from astropy.units.equivalencies import Equivalency from ...
37.386897
93
0.645308
a62529091a2c8d24d9d2c256440e6ab7deb2c173
800
py
Python
Python/get_attitude.py
BonaDrone/Bonadrone-demos
beaf3187bc8bca5b9cfc4acdf278ffbe2c46176a
[ "MIT" ]
null
null
null
Python/get_attitude.py
BonaDrone/Bonadrone-demos
beaf3187bc8bca5b9cfc4acdf278ffbe2c46176a
[ "MIT" ]
null
null
null
Python/get_attitude.py
BonaDrone/Bonadrone-demos
beaf3187bc8bca5b9cfc4acdf278ffbe2c46176a
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Author: Juan Gallostra, jgallostra<at>bonadrone.com # Date: 12-20-2018 import sys # Add parent folder to path so that the API can be imported. # This shouldn't be required if the package has been installed via pip sys.path.insert(0, '../') sys.path.insert(0, '../mosqu...
22.857143
70
0.71125
fe69d50839bfb2fefc2deb8ef235b52a877d9b15
438
py
Python
starsbridge.py/setup.py
IMSS-PhotonFactory/STARS-Core
208b4c7530b391febc1fb41224ad6b7ff396873b
[ "MIT" ]
null
null
null
starsbridge.py/setup.py
IMSS-PhotonFactory/STARS-Core
208b4c7530b391febc1fb41224ad6b7ff396873b
[ "MIT" ]
null
null
null
starsbridge.py/setup.py
IMSS-PhotonFactory/STARS-Core
208b4c7530b391febc1fb41224ad6b7ff396873b
[ "MIT" ]
null
null
null
import sys #from distutils.core import setup from cx_Freeze import setup, Executable from starsbridge import __version__ base = None # Comment if console application #if sys.platform == 'win32' : base = 'Win32GUI' # define python filename to exeutable exe = Executable(script='starsbridge.py', base=base) # Setup set...
20.857143
52
0.726027
2dba992875d880f9800c40d3906bd81db560d48b
6,589
py
Python
shop/models.py
abhishekmandloi/django-product-management-system
e89138e77c53b2ed51599e43e5d74bdf8671ae9e
[ "MIT" ]
null
null
null
shop/models.py
abhishekmandloi/django-product-management-system
e89138e77c53b2ed51599e43e5d74bdf8671ae9e
[ "MIT" ]
null
null
null
shop/models.py
abhishekmandloi/django-product-management-system
e89138e77c53b2ed51599e43e5d74bdf8671ae9e
[ "MIT" ]
1
2021-07-02T04:18:17.000Z
2021-07-02T04:18:17.000Z
from django.db import models # Create your models here. class Ingredient(models.Model): ingredient = models.CharField(max_length=300) def __str__(self): return self.ingredient class HSNCode(models.Model): hsn_code = models.CharField(max_length=50) rate = models.FloatField(default=1...
43.635762
116
0.714372
8e0b1a6e6c86e7e6357f9e7a1e0771b5cb32bf79
221
py
Python
As_util.py
a2gs/AsWallet
dcfd660f8b66ea93ae7589c9bd633db917f985dd
[ "MIT" ]
1
2019-12-11T12:55:51.000Z
2019-12-11T12:55:51.000Z
As_util.py
a2gs/AsWallet
dcfd660f8b66ea93ae7589c9bd633db917f985dd
[ "MIT" ]
3
2021-06-02T00:47:45.000Z
2022-03-12T00:08:07.000Z
As_util.py
a2gs/AsWallet
dcfd660f8b66ea93ae7589c9bd633db917f985dd
[ "MIT" ]
1
2019-12-11T12:55:55.000Z
2019-12-11T12:55:55.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Andre Augusto Giannotti Scota (https://sites.google.com/view/a2gs/) VERSION = float(0.1) BTCLIB_DB_PATH = str('') HOME_DIR = str('') SCREENBAR = str('') MSGBAR = str('')
20.090909
69
0.642534
00867c92675c0b70b825781a0b0de3dc8fe16f39
267
py
Python
tests/artificial/transf_BoxCox/trend_MovingAverage/cycle_12/ar_/test_artificial_1024_BoxCox_MovingAverage_12__20.py
shaido987/pyaf
b9afd089557bed6b90b246d3712c481ae26a1957
[ "BSD-3-Clause" ]
377
2016-10-13T20:52:44.000Z
2022-03-29T18:04:14.000Z
tests/artificial/transf_BoxCox/trend_MovingAverage/cycle_12/ar_/test_artificial_1024_BoxCox_MovingAverage_12__20.py
ysdede/pyaf
b5541b8249d5a1cfdc01f27fdfd99b6580ed680b
[ "BSD-3-Clause" ]
160
2016-10-13T16:11:53.000Z
2022-03-28T04:21:34.000Z
tests/artificial/transf_BoxCox/trend_MovingAverage/cycle_12/ar_/test_artificial_1024_BoxCox_MovingAverage_12__20.py
ysdede/pyaf
b5541b8249d5a1cfdc01f27fdfd99b6580ed680b
[ "BSD-3-Clause" ]
63
2017-03-09T14:51:18.000Z
2022-03-27T20:52:57.000Z
import pyaf.Bench.TS_datasets as tsds import tests.artificial.process_artificial_dataset as art art.process_dataset(N = 1024 , FREQ = 'D', seed = 0, trendtype = "MovingAverage", cycle_length = 12, transform = "BoxCox", sigma = 0.0, exog_count = 20, ar_order = 0);
38.142857
167
0.734082
9a24fe65b435f9854fd6233e5aa2e1e2067b8891
95
py
Python
glance/mathematics/defaults.py
filonik/glance
053e5e9567c76774b56597dfa854fd29efaf48fd
[ "MIT" ]
null
null
null
glance/mathematics/defaults.py
filonik/glance
053e5e9567c76774b56597dfa854fd29efaf48fd
[ "MIT" ]
null
null
null
glance/mathematics/defaults.py
filonik/glance
053e5e9567c76774b56597dfa854fd29efaf48fd
[ "MIT" ]
null
null
null
import numpy as np CHUNK_SIZE = 4 DEFAULT_N = 3 DEFAULT_M = 4 DEFAULT_DTYPE = np.float32
7.916667
26
0.715789
65febf5627a5660c27eee148843daedd69501ab0
2,630
py
Python
tests/schemas/test_calc.py
arosen93/HT-ASE
a76542e7a2bc5bf6e7382d8f1387374eb2abc713
[ "BSD-3-Clause-LBNL" ]
9
2022-02-08T08:31:30.000Z
2022-03-30T21:37:35.000Z
tests/schemas/test_calc.py
arosen93/HT-ASE
a76542e7a2bc5bf6e7382d8f1387374eb2abc713
[ "BSD-3-Clause-LBNL" ]
5
2022-02-02T21:47:59.000Z
2022-03-18T21:28:52.000Z
tests/schemas/test_calc.py
arosen93/HT-ASE
a76542e7a2bc5bf6e7382d8f1387374eb2abc713
[ "BSD-3-Clause-LBNL" ]
3
2022-02-23T12:00:57.000Z
2022-03-24T23:54:22.000Z
import os from pathlib import Path import pytest from ase.build import bulk from ase.io import read from monty.json import MontyDecoder, jsanitize from quacc.schemas.calc import summarize_run FILE_DIR = Path(__file__).resolve().parent run1 = os.path.join(FILE_DIR, "vasp_run1") def test_summarize_run(): # Mak...
34.155844
88
0.670342
2c0f370ec5fb0a169239ced59b33d86866b7d278
936
py
Python
creating_classes.py
flavian-anselmo/Object_Oriented_Programming
3f4f06bdaa0bfcc1f6bdf55ea63be12a1f539923
[ "MIT" ]
1
2021-02-04T11:29:33.000Z
2021-02-04T11:29:33.000Z
creating_classes.py
flavian-anselmo/Object_Oriented_Programming
3f4f06bdaa0bfcc1f6bdf55ea63be12a1f539923
[ "MIT" ]
null
null
null
creating_classes.py
flavian-anselmo/Object_Oriented_Programming
3f4f06bdaa0bfcc1f6bdf55ea63be12a1f539923
[ "MIT" ]
null
null
null
#why use classes class employee: #instance variables """contains data that is unique to each instance """ emp_one=employee() emp_two=employee() print(emp_one) print(emp_two) emp_one.first='anselmo' emp_one.last='flavian' emp_one.email='anselmo@gmail.com' emp_two.first='leon' emp_two.last='otieno' emp_...
23.4
71
0.757479
49f0d4e4308c7afc66cf90bd34f170546c805eb3
4,215
py
Python
lte/gateway/python/magma/kernsnoopd/snooper.py
Aitend/magma
74fe7b437335728219dfbe54733955bdd652eb60
[ "BSD-3-Clause" ]
1
2021-06-02T13:01:54.000Z
2021-06-02T13:01:54.000Z
lte/gateway/python/magma/kernsnoopd/snooper.py
Aitend/magma
74fe7b437335728219dfbe54733955bdd652eb60
[ "BSD-3-Clause" ]
55
2021-08-12T14:02:48.000Z
2022-03-29T11:27:35.000Z
lte/gateway/python/magma/kernsnoopd/snooper.py
Aitend/magma
74fe7b437335728219dfbe54733955bdd652eb60
[ "BSD-3-Clause" ]
2
2020-12-25T08:14:12.000Z
2022-03-14T13:58:56.000Z
""" Copyright 2020 The Magma Authors. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES O...
33.72
79
0.651957
17f923dc81b92795c6803bc5e2e21aa37923fa07
6,183
py
Python
mffpy/mffdir.py
BEL-Public/mffpy
8515824d89a77cf10f7c36bb405f61d338b6f5fe
[ "Apache-2.0" ]
7
2019-09-24T07:05:56.000Z
2021-12-12T12:10:08.000Z
mffpy/mffdir.py
BEL-Public/mffpy
8515824d89a77cf10f7c36bb405f61d338b6f5fe
[ "Apache-2.0" ]
44
2019-09-24T21:30:55.000Z
2022-02-10T17:47:14.000Z
mffpy/mffdir.py
BEL-Public/mffpy
8515824d89a77cf10f7c36bb405f61d338b6f5fe
[ "Apache-2.0" ]
4
2019-09-24T07:06:04.000Z
2021-11-08T20:25:18.000Z
""" Copyright 2019 Brain Electrophysiology Laboratory Company LLC Licensed under the ApacheLicense, Version 2.0(the "License"); you may not use this module 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 ...
33.241935
79
0.614427
63efc6273bc06bb3c5c2bea8ef708ea5104e20d1
15,041
py
Python
python/ccxt/__init__.py
utila/ccxt
502b89aa3f54b3363ad628f1ab5e30ea80d9b3b0
[ "MIT" ]
null
null
null
python/ccxt/__init__.py
utila/ccxt
502b89aa3f54b3363ad628f1ab5e30ea80d9b3b0
[ "MIT" ]
null
null
null
python/ccxt/__init__.py
utila/ccxt
502b89aa3f54b3363ad628f1ab5e30ea80d9b3b0
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """CCXT: CryptoCurrency eXchange Trading Library""" # MIT License # Copyright (c) 2017 Igor Kroitor # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restricti...
45.996942
80
0.53281
34466876f8514d012422e065c962742323b5842f
2,022
py
Python
src/quickviz.py
azeey/quickviz
b3b78d8937fb68adbb7cf24d8b001774d1185637
[ "MIT" ]
2
2015-10-31T14:55:51.000Z
2021-06-09T16:29:11.000Z
src/quickviz.py
azeey/quickviz
b3b78d8937fb68adbb7cf24d8b001774d1185637
[ "MIT" ]
null
null
null
src/quickviz.py
azeey/quickviz
b3b78d8937fb68adbb7cf24d8b001774d1185637
[ "MIT" ]
null
null
null
#!/usr/bin/env python # encoding: utf-8 import serial from pyqtgraph.Qt import QtGui, QtCore import numpy as np import pyqtgraph as pg from collections import deque app = QtGui.QApplication([]) port, baud = '/dev/ttyACM0', 1000000 ser = serial.Serial(port, baud) win = pg.GraphicsWindow(title="Basic plotting examp...
21.978261
74
0.687933
bcf00f65bcb6019d1dceda066d01fbaba0cfcfe6
17,583
py
Python
slicematrixIO/manifolds.py
tynano/slicematrixIO-python
d53070e7d55503625f278c99c35475cf42bfcd0f
[ "MIT" ]
7
2017-02-28T00:47:14.000Z
2022-03-11T15:59:21.000Z
slicematrixIO/manifolds.py
tynano/slicematrixIO-python
d53070e7d55503625f278c99c35475cf42bfcd0f
[ "MIT" ]
null
null
null
slicematrixIO/manifolds.py
tynano/slicematrixIO-python
d53070e7d55503625f278c99c35475cf42bfcd0f
[ "MIT" ]
4
2018-02-01T18:52:38.000Z
2020-12-07T11:09:07.000Z
from core import BasePipeline from utils import rando_name from uuid import uuid4 import pandas as pd ################################################################################################################################################################# class KernelPCAPipeline(BasePipeline): def __init__...
40.42069
161
0.469772
e0465243aab0fbb9f381bb1378894d2c2c58b184
5,644
py
Python
drugpy/fetch_similar/blast.py
labimm/pymol-labimm
7df8e82fbcd68718ed14627427531b4b87cec07d
[ "MIT" ]
2
2021-09-16T13:46:30.000Z
2021-10-05T18:21:05.000Z
drugpy/fetch_similar/blast.py
labimm/pymol-labimm
7df8e82fbcd68718ed14627427531b4b87cec07d
[ "MIT" ]
null
null
null
drugpy/fetch_similar/blast.py
labimm/pymol-labimm
7df8e82fbcd68718ed14627427531b4b87cec07d
[ "MIT" ]
null
null
null
import webbrowser from ftplib import FTP from functools import lru_cache import requests from pymol import cmd as pm from ..commons import rscript, PLUGIN_DATA_DIR @pm.extend def fetch_similar_blast_update(): """ The cluster database needs to be updated before the first use of the fetch_similar_blast fe...
29.243523
89
0.585046
99507b799c6b0c9bdbd9faa162e34c5b1c490ad5
117
py
Python
examples/keyboard/drivers/drivers.py
Breq16/vibrance_ctrl
93247f686b4e5e42d5f36b9d592fe9cd8322069e
[ "MIT" ]
null
null
null
examples/keyboard/drivers/drivers.py
Breq16/vibrance_ctrl
93247f686b4e5e42d5f36b9d592fe9cd8322069e
[ "MIT" ]
null
null
null
examples/keyboard/drivers/drivers.py
Breq16/vibrance_ctrl
93247f686b4e5e42d5f36b9d592fe9cd8322069e
[ "MIT" ]
null
null
null
import vibrance.driver.pygame_if drivers = [] drivers.append(vibrance.driver.pygame_if.PyGameDriver("PyGame Demo"))
23.4
69
0.803419
1b4889e85d60a37929140c933388e504274338b5
3,542
py
Python
bindings/python/ensmallen/datasets/string/rhizobiumleguminosarumviciae248.py
AnacletoLAB/ensmallen_graph
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
5
2021-02-17T00:44:45.000Z
2021-08-09T16:41:47.000Z
bindings/python/ensmallen/datasets/string/rhizobiumleguminosarumviciae248.py
AnacletoLAB/ensmallen_graph
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
18
2021-01-07T16:47:39.000Z
2021-08-12T21:51:32.000Z
bindings/python/ensmallen/datasets/string/rhizobiumleguminosarumviciae248.py
AnacletoLAB/ensmallen
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
3
2021-01-14T02:20:59.000Z
2021-08-04T19:09:52.000Z
""" This file offers the methods to automatically retrieve the graph Rhizobium leguminosarum viciae 248. The graph is automatically retrieved from the STRING repository. References --------------------- Please cite the following if you use the data: ```bib @article{szklarczyk2019string, title={STRING v11: prot...
33.733333
223
0.682383
eb493963ab8d503cbb0bc6355c7ee8ed8768cb0d
1,384
py
Python
sample_code/Python_NLP/nlp-5-2-pos_concordance.py
ice-melt/python-lib
345e34fff7386d91acbb03a01fd4127c5dfed037
[ "MIT" ]
null
null
null
sample_code/Python_NLP/nlp-5-2-pos_concordance.py
ice-melt/python-lib
345e34fff7386d91acbb03a01fd4127c5dfed037
[ "MIT" ]
null
null
null
sample_code/Python_NLP/nlp-5-2-pos_concordance.py
ice-melt/python-lib
345e34fff7386d91acbb03a01fd4127c5dfed037
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding:utf-8 -*- """ @Author : ice-melt @File : nlp-5-2-pos_concordance.py @Time : 2019/4/19 15:03 @Version : 1.0 @Desc : None """ import nltk from nltk.corpus import brown # 研究一个词(比如 often ),看看它是如何使用,可以试着观察often后面的词 brown_learned_text = brown.words(categories='lear...
27.137255
89
0.658237
ce62546ec97ac652bdd2db0761c12aafb4a3711a
722
py
Python
data_loader/modules/Text_Image_Augmentation_python/__init__.py
WenmuZhou/crnn.pytorch
bf7a7c62376eee93943ca7c68e88e3d563c09aa8
[ "Apache-2.0" ]
46
2018-05-29T08:01:10.000Z
2022-02-14T21:47:40.000Z
data_loader/modules/Text_Image_Augmentation_python/__init__.py
WenmuZhou/crnn.pytorch
bf7a7c62376eee93943ca7c68e88e3d563c09aa8
[ "Apache-2.0" ]
null
null
null
data_loader/modules/Text_Image_Augmentation_python/__init__.py
WenmuZhou/crnn.pytorch
bf7a7c62376eee93943ca7c68e88e3d563c09aa8
[ "Apache-2.0" ]
17
2018-11-14T09:17:00.000Z
2021-08-06T04:05:07.000Z
# -*- coding: utf-8 -*- # @Time : 2020/4/27 11:28 # @Author : zhoujun import numpy as np from .augment import distort, stretch, perspective __all__ = ['RandomAug'] class RandomAug: def __init__(self): pass def __call__(self, img): if np.random.randn() > 0.3: img = distort(img...
21.235294
50
0.574792
f08860df1685a6cd0b97bae686788bf640e4352f
2,696
py
Python
AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/tests/test_version.py
CEOALT1/RefindPlusUDK
116b957ad735f96fbb6d80a0ba582046960ba164
[ "BSD-2-Clause" ]
2,757
2018-04-28T21:41:36.000Z
2022-03-29T06:33:36.000Z
AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/tests/test_version.py
CEOALT1/RefindPlusUDK
116b957ad735f96fbb6d80a0ba582046960ba164
[ "BSD-2-Clause" ]
20
2019-07-23T15:29:32.000Z
2022-01-21T12:53:04.000Z
AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/tests/test_version.py
CEOALT1/RefindPlusUDK
116b957ad735f96fbb6d80a0ba582046960ba164
[ "BSD-2-Clause" ]
449
2018-05-09T05:54:05.000Z
2022-03-30T14:54:18.000Z
"""Tests for distutils.version.""" import unittest from distutils.version import LooseVersion from distutils.version import StrictVersion from test.test_support import run_unittest class VersionTestCase(unittest.TestCase): def test_prerelease(self): version = StrictVersion('1.2.3a1') sel...
37.444444
72
0.405045
8403713dbdf781af8acd9ea5d692485e1e819fed
5,005
py
Python
Src/Tests/test_privateBinding.py
Enerccio/ironpython26-fixed
e302db14f05396a378adb438565a829e66acbf94
[ "MS-PL" ]
1
2020-02-11T06:02:40.000Z
2020-02-11T06:02:40.000Z
Src/Languages/IronPython/Tests/test_privateBinding.py
rudimk/dlr-dotnet
71d11769f99d6ff1516ddbaed091a359eb46c670
[ "MS-PL" ]
null
null
null
Src/Languages/IronPython/Tests/test_privateBinding.py
rudimk/dlr-dotnet
71d11769f99d6ff1516ddbaed091a359eb46c670
[ "MS-PL" ]
1
2018-11-21T04:10:23.000Z
2018-11-21T04:10:23.000Z
##################################################################################### # # Copyright (c) Microsoft Corporation. All rights reserved. # # This source code is subject to terms and conditions of the Microsoft Public License. A # copy of the license can be found in the License.html file at the root of this ...
37.074074
109
0.668531
eeb5fa5f27e0b647a79e43416ecef3b674be20e1
518
py
Python
.history/ClassFiles/Control Flow/ForLoopRangeFunc_20210101224215.py
minefarmer/Comprehensive-Python
f97b9b83ec328fc4e4815607e6a65de90bb8de66
[ "Unlicense" ]
null
null
null
.history/ClassFiles/Control Flow/ForLoopRangeFunc_20210101224215.py
minefarmer/Comprehensive-Python
f97b9b83ec328fc4e4815607e6a65de90bb8de66
[ "Unlicense" ]
null
null
null
.history/ClassFiles/Control Flow/ForLoopRangeFunc_20210101224215.py
minefarmer/Comprehensive-Python
f97b9b83ec328fc4e4815607e6a65de90bb8de66
[ "Unlicense" ]
null
null
null
''' Range Function range() function is a builtin function of python The range() function generates the integer numbers between the given start integer to the stop integer, which generally used to iterate over with a for loop. The range() function returns a sequence of numbers starting from zero by def...
25.9
157
0.57529
12c8fafd9c96e3ebd4413aed430dfc5f6cea679f
2,868
py
Python
parrot/parser.py
au5ton/parrot
9e233f5e405f29b14e8fca242f2040dda50b2eeb
[ "MIT" ]
null
null
null
parrot/parser.py
au5ton/parrot
9e233f5e405f29b14e8fca242f2040dda50b2eeb
[ "MIT" ]
null
null
null
parrot/parser.py
au5ton/parrot
9e233f5e405f29b14e8fca242f2040dda50b2eeb
[ "MIT" ]
null
null
null
import re import json import string from parrot.driver import node ''' There are 0 of a max 20 players online: There are 1 of a max 20 players online: auston There are 2 of a max 20 players online: auston, valleytoro ''' def listPlayers(raw: str): x = raw.split(' ') x.reverse() for i in range(0, len(x)): if...
47.016393
1,263
0.673291
3b52b677c8044930f2d71547e88909dc05b079b5
145
py
Python
extract_results.py
goodman1204/birank
87db456a304882ca4e4f1ac4759740989ef49af7
[ "MIT" ]
null
null
null
extract_results.py
goodman1204/birank
87db456a304882ca4e4f1ac4759740989ef49af7
[ "MIT" ]
null
null
null
extract_results.py
goodman1204/birank
87db456a304882ca4e4f1ac4759740989ef49af7
[ "MIT" ]
null
null
null
dataset=["gossipcop_fake" "gossipcop_real" "politifact_fake" "politifact_real" "Aminer"] methods=["proposed" "HITS" "CoHITS" "BGRM" "BiRank"]
24.166667
88
0.731034
55e71d0f89f8963aa2d14e1cc82dfa5e519e9b57
1,835
py
Python
flumewater_exporter/collector.py
huagangxie/flumewater_exporter
bc24f8b243202ad16bdfe0161317f80699fddfbf
[ "MIT" ]
1
2021-10-05T22:52:01.000Z
2021-10-05T22:52:01.000Z
flumewater_exporter/collector.py
huagangxie/flumewater_exporter
bc24f8b243202ad16bdfe0161317f80699fddfbf
[ "MIT" ]
null
null
null
flumewater_exporter/collector.py
huagangxie/flumewater_exporter
bc24f8b243202ad16bdfe0161317f80699fddfbf
[ "MIT" ]
null
null
null
import prometheus_client.core class FlumewaterCollector(object): def __init__(self, api): self.api = api self._prefix = "flumewater_" self.api.credentials() self.api.userid() self._devices = self.api.device_list() def make_metric(self, _is_counter, _name, _documen...
33.363636
82
0.549864
90525da23d94307618b966859b6e24bed753dbf3
2,934
py
Python
src/rnn_class/lstm.py
JouniVatanen/NLP-and-Deep-Learning
2fddcc2c39787713d33d17e80565de4ed073ca60
[ "MIT" ]
1
2020-05-24T06:55:31.000Z
2020-05-24T06:55:31.000Z
Machine Learning/rnn_class/lstm.py
Ashleshk/Machine-Learning-Data-Science-Deep-Learning
03357ab98155bf73b8f1d2fd53255cc16bea2333
[ "MIT" ]
null
null
null
Machine Learning/rnn_class/lstm.py
Ashleshk/Machine-Learning-Data-Science-Deep-Learning
03357ab98155bf73b8f1d2fd53255cc16bea2333
[ "MIT" ]
1
2020-03-16T13:11:14.000Z
2020-03-16T13:11:14.000Z
# https://deeplearningcourses.com/c/deep-learning-recurrent-neural-networks-in-python # https://udemy.com/deep-learning-recurrent-neural-networks-in-pythonfrom __future__ import print_function, division from builtins import range # Note: you may need to update your version of future # sudo pip install -U future impor...
30.5625
116
0.541241
b2fcea547a816596e5ece1e1ef169d8be84e9097
191
py
Python
Basics/ecommerce/app.py
caseysalvador/Python
19bc762a123e98ebbac427c69ce58925e507b045
[ "MIT" ]
null
null
null
Basics/ecommerce/app.py
caseysalvador/Python
19bc762a123e98ebbac427c69ce58925e507b045
[ "MIT" ]
null
null
null
Basics/ecommerce/app.py
caseysalvador/Python
19bc762a123e98ebbac427c69ce58925e507b045
[ "MIT" ]
null
null
null
#from ecommerce.shipping import calc_shipping # first example of import from ecommerce import shipping #ecommerce.shipping.calc_shipping() # first example of import shipping.calc_shipping
31.833333
72
0.827225
da1c0b06726cbb8d758ab4c2b040b8326cbbcf45
4,763
py
Python
kubernetes/test/test_io_xk8s_cluster_bootstrap_v1alpha3_kubeadm_config_spec_join_configuration.py
mariusgheorghies/python
68ac7e168963d8b5a81dc493b1973d29e903a15b
[ "Apache-2.0" ]
null
null
null
kubernetes/test/test_io_xk8s_cluster_bootstrap_v1alpha3_kubeadm_config_spec_join_configuration.py
mariusgheorghies/python
68ac7e168963d8b5a81dc493b1973d29e903a15b
[ "Apache-2.0" ]
null
null
null
kubernetes/test/test_io_xk8s_cluster_bootstrap_v1alpha3_kubeadm_config_spec_join_configuration.py
mariusgheorghies/python
68ac7e168963d8b5a81dc493b1973d29e903a15b
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: v1.20.7 Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import unitte...
56.702381
277
0.702288
42c7cb39216e64cbab35c7a0df901423074624e9
952
py
Python
actions/ship.py
Mymineplays/ExtendedKawaii-DiscordBot
4f9304e45414a9cb99492f7aafa31c9bd6730486
[ "MIT" ]
1
2020-04-28T16:17:04.000Z
2020-04-28T16:17:04.000Z
actions/ship.py
Mymineplays/ExtendedKawaii-DiscordBot
4f9304e45414a9cb99492f7aafa31c9bd6730486
[ "MIT" ]
2
2020-08-06T05:10:48.000Z
2020-11-29T00:16:18.000Z
actions/ship.py
Mymineplays/ExtendedKawaii-DiscordBot
4f9304e45414a9cb99492f7aafa31c9bd6730486
[ "MIT" ]
3
2020-05-20T20:47:58.000Z
2022-03-03T20:27:22.000Z
import discord from helpers import get_gif import random commands = ["schiff", "couple"] requires_mention = True accepts_mention = True description = "Menschen ~~verschiffen~~ shippen" async def execute(message: discord.Message): if len(message.mentions) != 2: await message.channel.send("Wen denn? o.O\n(...
32.827586
87
0.677521
ec5e9a1ec071dd51e43014d72dbaee1b867f8097
2,247
py
Python
migrations/versions/d9668f6a80fe_deployment.py
washucode/pitches
001c185822a7b80549a81723218c82d7d0003d76
[ "MIT" ]
null
null
null
migrations/versions/d9668f6a80fe_deployment.py
washucode/pitches
001c185822a7b80549a81723218c82d7d0003d76
[ "MIT" ]
null
null
null
migrations/versions/d9668f6a80fe_deployment.py
washucode/pitches
001c185822a7b80549a81723218c82d7d0003d76
[ "MIT" ]
1
2019-09-23T20:11:30.000Z
2019-09-23T20:11:30.000Z
"""deployment Revision ID: d9668f6a80fe Revises: 86c4a8a7356a Create Date: 2019-09-18 16:05:13.827708 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'd9668f6a80fe' down_revision = '86c4a8a7356a' branch_labels = None depends_on = None def upgrade(): # ###...
35.109375
67
0.668002
8719cd73e9e525b96514db8ea3846382ddfaeb98
10,790
py
Python
facebook/preprocessing.py
alexcrist/russian-propaganda
eaf12231013f7afbea368e04a43eca958da9248f
[ "MIT" ]
null
null
null
facebook/preprocessing.py
alexcrist/russian-propaganda
eaf12231013f7afbea368e04a43eca958da9248f
[ "MIT" ]
null
null
null
facebook/preprocessing.py
alexcrist/russian-propaganda
eaf12231013f7afbea368e04a43eca958da9248f
[ "MIT" ]
null
null
null
import numpy as np import pandas as pd import os import re import us from collections import OrderedDict from tqdm import tqdm, tqdm_notebook state_names = [state.name for state in us.states.STATES_AND_TERRITORIES] state_names.remove('Orleans') def read_all_files(in_path): """Read all the files and put the data...
39.094203
79
0.546895
ada82bb7b8fdb0ca7ebdecfbf7155e2a9e067a88
470
py
Python
data/scripts/templates/object/draft_schematic/droid/component/shared_personality_module_stupid.py
obi-two/GameServer
7d37024e2291a97d49522610cd8f1dbe5666afc2
[ "MIT" ]
20
2015-02-23T15:11:56.000Z
2022-03-18T20:56:48.000Z
data/scripts/templates/object/draft_schematic/droid/component/shared_personality_module_stupid.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
null
null
null
data/scripts/templates/object/draft_schematic/droid/component/shared_personality_module_stupid.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
20
2015-04-04T16:35:59.000Z
2022-03-24T14:54:37.000Z
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Intangible() result.template = "object/draft_schematic/droid/component/shared_personality_module_stupid.iff" resu...
27.647059
96
0.738298
7747abebceb38857d4e6fbd84bddad8ff85bb53d
5,254
py
Python
DQM/L1TMonitorClient/python/L1TStage2uGMTClient_cff.py
PKUfudawei/cmssw
8fbb5ce74398269c8a32956d7c7943766770c093
[ "Apache-2.0" ]
1
2021-11-30T16:24:46.000Z
2021-11-30T16:24:46.000Z
DQM/L1TMonitorClient/python/L1TStage2uGMTClient_cff.py
PKUfudawei/cmssw
8fbb5ce74398269c8a32956d7c7943766770c093
[ "Apache-2.0" ]
4
2021-11-29T13:57:56.000Z
2022-03-29T06:28:36.000Z
DQM/L1TMonitorClient/python/L1TStage2uGMTClient_cff.py
PKUfudawei/cmssw
8fbb5ce74398269c8a32956d7c7943766770c093
[ "Apache-2.0" ]
1
2022-02-27T06:12:26.000Z
2022-02-27T06:12:26.000Z
import FWCore.ParameterSet.Config as cms from DQMServices.Core.DQMEDHarvester import DQMEDHarvester from DQM.L1TMonitor.L1TStage2uGMT_cff import ignoreBins # directory path shortening ugmtDqmDir = 'L1T/L1TStage2uGMT' ugmtMuCpyDqmDir = ugmtDqmDir+'/uGMTMuonCopies' ugmtZSDqmDir = ugmtDqmDir+'/zeroSuppression' # input hi...
47.333333
107
0.792729
2c0e103b213a5d47efa9f4830d27a55830bb9699
574
py
Python
tests/unit/v0x04/test_controller2switch/test_role_reply.py
josemauro/python-openflow
0537c626f3aeb4c53995b65e0783f09ad5e63101
[ "MIT" ]
48
2016-06-09T14:36:22.000Z
2021-11-11T16:05:19.000Z
tests/unit/v0x04/test_controller2switch/test_role_reply.py
josemauro/python-openflow
0537c626f3aeb4c53995b65e0783f09ad5e63101
[ "MIT" ]
338
2016-05-06T18:42:36.000Z
2021-04-29T17:57:09.000Z
tests/unit/v0x04/test_controller2switch/test_role_reply.py
josemauro/python-openflow
0537c626f3aeb4c53995b65e0783f09ad5e63101
[ "MIT" ]
46
2016-05-24T15:32:56.000Z
2021-06-01T12:16:17.000Z
"""RoleReply message tests.""" from pyof.v0x04.controller2switch.role_reply import RoleReply from tests.unit.test_struct import TestStruct class TestRoleReply(TestStruct): """Test the RoleReply message.""" @classmethod def setUpClass(cls): """Configure raw file and its object in parent class (Tes...
33.764706
75
0.660279
ee15ff6899878f7d4bc8aab9efac3e1067fe2c2e
9,744
py
Python
orchestra/contrib/domains/admin.py
udm88/django-orchestra
49c84f13a8f92427b01231615136549fb5be3a78
[ "Unlicense" ]
68
2015-02-09T10:28:44.000Z
2022-03-12T11:08:36.000Z
orchestra/contrib/domains/admin.py
ferminhg/django-orchestra
49c84f13a8f92427b01231615136549fb5be3a78
[ "Unlicense" ]
17
2015-05-01T18:10:03.000Z
2021-03-19T21:52:55.000Z
orchestra/contrib/domains/admin.py
ferminhg/django-orchestra
49c84f13a8f92427b01231615136549fb5be3a78
[ "Unlicense" ]
29
2015-03-31T04:51:03.000Z
2022-02-17T02:58:50.000Z
from django.contrib import admin from django.core.urlresolvers import reverse from django.db import models from django.db.models.functions import Concat, Coalesce from django.templatetags.static import static from django.utils.translation import ugettext, ugettext_lazy as _ from orchestra.admin import ExtendedModelAdm...
42.736842
100
0.603038
1b6164e03ab202642513de1d626a1e1ed4e16b7b
4,890
py
Python
boa3/model/builtin/method/isinstancemethod.py
DanPopa46/neo3-boa
e4ef340744b5bd25ade26f847eac50789b97f3e9
[ "Apache-2.0" ]
null
null
null
boa3/model/builtin/method/isinstancemethod.py
DanPopa46/neo3-boa
e4ef340744b5bd25ade26f847eac50789b97f3e9
[ "Apache-2.0" ]
null
null
null
boa3/model/builtin/method/isinstancemethod.py
DanPopa46/neo3-boa
e4ef340744b5bd25ade26f847eac50789b97f3e9
[ "Apache-2.0" ]
null
null
null
from typing import Any, Dict, List, Optional, Tuple, Union from boa3.model.builtin.method.builtinmethod import IBuiltinMethod from boa3.model.expression import IExpression from boa3.model.type.itype import IType from boa3.model.variable import Variable from boa3.neo.vm.opcode.Opcode import Opcode class IsInstanceMet...
35.693431
108
0.594479
83ada63b8ebb346679f33b7c9bd8b9bc6ee20574
2,637
py
Python
tests/formatter/test_tox_section.py
Julian/tox-ini-fmt
2d251f349d5f30fe62a55a38e119347a182d4cf4
[ "MIT" ]
null
null
null
tests/formatter/test_tox_section.py
Julian/tox-ini-fmt
2d251f349d5f30fe62a55a38e119347a182d4cf4
[ "MIT" ]
null
null
null
tests/formatter/test_tox_section.py
Julian/tox-ini-fmt
2d251f349d5f30fe62a55a38e119347a182d4cf4
[ "MIT" ]
null
null
null
import pytest from tox_ini_fmt.formatter import format_tox_ini from tox_ini_fmt.formatter.tox_section import order_env_list def test_no_tox_section(tox_ini): tox_ini.write_text("") assert format_tox_ini(tox_ini) == "\n" def test_format_envlist_simple(tox_ini): tox_ini.write_text("[tox]\nenvlist=py39,py...
31.771084
117
0.61168
a207113b6d8d2a2de7d57d9bc79f2b4b5d963f0f
4,168
py
Python
lnbits/extensions/satspay/views_api.py
blackcoffeexbt/lnbits-legend
a9f2877af77ea56d1900e2b5bc1c21b9b7ac2f64
[ "MIT" ]
null
null
null
lnbits/extensions/satspay/views_api.py
blackcoffeexbt/lnbits-legend
a9f2877af77ea56d1900e2b5bc1c21b9b7ac2f64
[ "MIT" ]
null
null
null
lnbits/extensions/satspay/views_api.py
blackcoffeexbt/lnbits-legend
a9f2877af77ea56d1900e2b5bc1c21b9b7ac2f64
[ "MIT" ]
null
null
null
from http import HTTPStatus import httpx from fastapi import Query from fastapi.params import Depends from starlette.exceptions import HTTPException from lnbits.decorators import WalletTypeInfo, get_key_type, require_admin_key from lnbits.extensions.satspay import satspay_ext from .crud import ( check_address_ba...
29.771429
87
0.599568
449240175d70a5d1fb34bc53bd86918f80fca4c0
3,837
py
Python
geneparse/index/__main__.py
legaultmarc/geneparse
5a844df77ded5adc765a086a8d346fce6ba01f3d
[ "MIT" ]
4
2018-11-09T11:10:24.000Z
2021-07-23T22:17:58.000Z
geneparse/index/__main__.py
legaultmarc/geneparse
5a844df77ded5adc765a086a8d346fce6ba01f3d
[ "MIT" ]
5
2017-05-02T15:28:01.000Z
2018-04-16T18:29:15.000Z
geneparse/index/__main__.py
legaultmarc/geneparse
5a844df77ded5adc765a086a8d346fce6ba01f3d
[ "MIT" ]
1
2017-05-12T17:58:32.000Z
2017-05-12T17:58:32.000Z
"""Simple script to index genotype files of different format.""" # This file is part of geneparse. # # The MIT License (MIT) # # Copyright (c) 2017 Pharmacogenomics Centre # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Softw...
29.744186
79
0.658327
cc6d2b8302bbbf06df69ee4c4ad7d77c90460b3f
354
py
Python
nidaqmx_examples/ci_count_edges.py
stafak/nidaqmx-python
f354d7971b21074c120c6f298dbbf4a5e0e4f4f4
[ "MIT" ]
252
2017-03-22T02:43:16.000Z
2022-03-27T14:44:44.000Z
nidaqmx_examples/ci_count_edges.py
stafak/nidaqmx-python
f354d7971b21074c120c6f298dbbf4a5e0e4f4f4
[ "MIT" ]
133
2017-03-21T20:57:59.000Z
2022-03-31T16:08:12.000Z
nidaqmx_examples/ci_count_edges.py
stafak/nidaqmx-python
f354d7971b21074c120c6f298dbbf4a5e0e4f4f4
[ "MIT" ]
124
2017-04-01T18:35:24.000Z
2022-03-25T06:30:00.000Z
import nidaqmx import pprint pp = pprint.PrettyPrinter(indent=4) with nidaqmx.Task() as task: task.ci_channels.add_ci_count_edges_chan("Dev1/ctr0") print('1 Channel 1 Sample Read: ') data = task.read() pp.pprint(data) print('1 Channel N Samples Read: ') data = task.read(number_of_samples_...
20.823529
57
0.69774
484fddc2bb5f74a8b2793d6df08fb5bf51084fda
1,156
py
Python
.history/my_classes/FirstClassFunctions/LambdaExpressions_20210704151550.py
minefarmer/deep-Dive-1
b0675b853180c5b5781888266ea63a3793b8d855
[ "Unlicense" ]
null
null
null
.history/my_classes/FirstClassFunctions/LambdaExpressions_20210704151550.py
minefarmer/deep-Dive-1
b0675b853180c5b5781888266ea63a3793b8d855
[ "Unlicense" ]
null
null
null
.history/my_classes/FirstClassFunctions/LambdaExpressions_20210704151550.py
minefarmer/deep-Dive-1
b0675b853180c5b5781888266ea63a3793b8d855
[ "Unlicense" ]
null
null
null
"""[Lambda Expressions] Lambda expressions are simply another way to create functions anonymous functions keyword \ parameter list optional \ \ the : is required, even for zero arguments \ \ / / this expression is evaluated and returned when the lamb...
19.931034
161
0.628893
1c8b2a839fa5f9141fc650631ea5f05ad4921f2e
529
py
Python
slu/slu/utils/decorators.py
Vernacular-ai/slu-service
c61af67ead471e47202036779eeda124e57d9850
[ "MIT" ]
4
2021-09-07T12:15:34.000Z
2022-03-18T03:39:08.000Z
slu/slu/utils/decorators.py
Vernacular-ai/slu-service
c61af67ead471e47202036779eeda124e57d9850
[ "MIT" ]
28
2021-04-13T09:08:25.000Z
2021-07-28T17:17:04.000Z
slu/slu/utils/decorators.py
skit-ai/dialogy-template-simple-transformers
82748f49f63212ab578c199545122091d19e6939
[ "MIT" ]
4
2021-03-10T08:34:27.000Z
2021-08-04T06:21:35.000Z
import functools from slu import constants as const def task_guard(func): def wrapper(self, task_name: str, *args, **kwargs): supported_tasks = {const.CLASSIFICATION, const.NER} if task_name not in supported_tasks: raise ValueError(f"Task should be one of {supported_tasks}") ...
24.045455
72
0.63138
a3f185ca9131bda81241d1bd083349fd53ba3374
4,296
py
Python
virtac/mirror_objects.py
dls-controls/atip
7d3f79a9ca23abb94b5348142aa0d7f8d6094ca3
[ "Apache-2.0" ]
null
null
null
virtac/mirror_objects.py
dls-controls/atip
7d3f79a9ca23abb94b5348142aa0d7f8d6094ca3
[ "Apache-2.0" ]
14
2019-06-10T17:23:37.000Z
2021-09-20T13:09:14.000Z
virtac/mirror_objects.py
dls-controls/atip
7d3f79a9ca23abb94b5348142aa0d7f8d6094ca3
[ "Apache-2.0" ]
1
2019-06-10T12:14:14.000Z
2019-06-10T12:14:14.000Z
import numpy class summate(object): """This class is designed to be passed instead of a mirror record, when its set method is then called it takes the sum of all the input records and sets it to the output record. """ def __init__(self, input_records, output_record): """ Args: ...
38.357143
79
0.612197
e33ec8f606c139beab30fbe3c3d90983dff476c4
5,711
py
Python
siuba/sql/dialects/sqlite.py
Techzune/siuba
575bffe016c40ccd4045d800f1c542e43a77aa50
[ "MIT" ]
null
null
null
siuba/sql/dialects/sqlite.py
Techzune/siuba
575bffe016c40ccd4045d800f1c542e43a77aa50
[ "MIT" ]
null
null
null
siuba/sql/dialects/sqlite.py
Techzune/siuba
575bffe016c40ccd4045d800f1c542e43a77aa50
[ "MIT" ]
null
null
null
# sqlvariant, allow defining 3 namespaces to override defaults from ..translate import ( SqlColumn, SqlColumnAgg, extend_base, SqlTranslator, sql_not_impl, win_cumul, win_agg, annotate, wrap_annotate ) from .base import base_nowin #from .postgresql import...
31.727778
91
0.629312
dd910dee5d666326c88ae6f4e84a202cdb23ec49
1,355
py
Python
tests/hazmat/primitives/test_constant_time.py
glyph/cryptography
43cf688e885668198bc966b1cf3a4a425a60f1a6
[ "Apache-2.0" ]
1
2020-08-26T01:36:57.000Z
2020-08-26T01:36:57.000Z
tests/hazmat/primitives/test_constant_time.py
Lukasa/cryptography
9341ddca88aebdd04f07adfefaa2ef8133ce2bca
[ "Apache-2.0" ]
4
2021-03-22T02:00:19.000Z
2021-04-07T07:40:19.000Z
tests/hazmat/primitives/test_constant_time.py
majacQ/cryptography
add8bec357f09aba6609af16577111addec07ef7
[ "Apache-2.0" ]
null
null
null
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the Li...
32.261905
69
0.717343
7e84d63c45f9b78429a504a9f8a2e1d84f1c1621
6,233
py
Python
deploy_config_generator/template.py
ApplauseAQI/applause-deploy-config-generator
46f957fbfe991677f920d5db74b0670385b6e505
[ "MIT" ]
null
null
null
deploy_config_generator/template.py
ApplauseAQI/applause-deploy-config-generator
46f957fbfe991677f920d5db74b0670385b6e505
[ "MIT" ]
null
null
null
deploy_config_generator/template.py
ApplauseAQI/applause-deploy-config-generator
46f957fbfe991677f920d5db74b0670385b6e505
[ "MIT" ]
null
null
null
import jinja2 import json import re from deploy_config_generator.errors import TemplateUndefinedError OMIT_TOKEN = '__OMIT__TOKEN__' class UnsafeText(str): __UNSAFE__ = True # The name of the decorator changed in 3.x, so this allows us to support both if hasattr(jinja2, 'contextfunction'): jinja2_context...
33.691892
124
0.623937
cec3e744b9011bded06e5803982058a5cc76e1c7
120
py
Python
funboost/factories/__init__.py
DJMIN/funboost
7570ca2909bb0b44a1080f5f98aa96c86d3da9d4
[ "Apache-2.0" ]
333
2019-08-08T10:25:27.000Z
2022-03-30T07:32:04.000Z
funboost/factories/__init__.py
mooti-barry/funboost
2cd9530e2c4e5a52fc921070d243d402adbc3a0e
[ "Apache-2.0" ]
38
2020-04-24T01:47:51.000Z
2021-12-20T07:22:15.000Z
funboost/factories/__init__.py
mooti-barry/funboost
2cd9530e2c4e5a52fc921070d243d402adbc3a0e
[ "Apache-2.0" ]
84
2019-08-09T11:51:14.000Z
2022-03-02T06:29:09.000Z
# -*- coding: utf-8 -*- # @Author : ydf # @Time : 2019/8/8 0008 13:17 """ 工厂模式,通过broker_kind来生成不同中间件类型的消费者和发布者。 """
17.142857
37
0.6
bb95cf8c5f03b060cb9c48e709808c33c92016ac
2,438
py
Python
Python OOP Retake Exam - 19 Dec 2020/problem1/bunker.py
DiyanKalaydzhiev23/OOP---Python
7ac424d5fb08a6bd28dc36593e45d949b3ac0cd0
[ "MIT" ]
null
null
null
Python OOP Retake Exam - 19 Dec 2020/problem1/bunker.py
DiyanKalaydzhiev23/OOP---Python
7ac424d5fb08a6bd28dc36593e45d949b3ac0cd0
[ "MIT" ]
null
null
null
Python OOP Retake Exam - 19 Dec 2020/problem1/bunker.py
DiyanKalaydzhiev23/OOP---Python
7ac424d5fb08a6bd28dc36593e45d949b3ac0cd0
[ "MIT" ]
null
null
null
class Bunker: def __init__(self): self.survivors = [] self.supplies = [] self.medicine = [] @property def food(self): food_supplies = [f for f in self.supplies if f.__name__ == "FoodSupply"] if not food_supplies: raise IndexError("There are no food suppl...
34.828571
91
0.611567
956c3546b55ad7f90fdd723d12e32d27ed3536e7
1,190
py
Python
pylearn2/sandbox/rnn/scripts/wordModel.py
capybaralet/pylearn2
78d78a99bc6114616a22a4d798c7fedfe4489c58
[ "BSD-3-Clause" ]
null
null
null
pylearn2/sandbox/rnn/scripts/wordModel.py
capybaralet/pylearn2
78d78a99bc6114616a22a4d798c7fedfe4489c58
[ "BSD-3-Clause" ]
null
null
null
pylearn2/sandbox/rnn/scripts/wordModel.py
capybaralet/pylearn2
78d78a99bc6114616a22a4d798c7fedfe4489c58
[ "BSD-3-Clause" ]
null
null
null
import numpy as np import theano as t from scipy.spatial.distance import cosine class WordModel(): def __init__(self, model, word_dict, embeddings): self.embeddings = embeddings self.word_dict = word_dict self.iword_dict = {v:k for k,v in word_dict.iteritems()} def closest(self, vec, n): ...
27.674419
74
0.626891
fe6d2d3abe42abbef05b826d85eb3561665fa27a
2,378
py
Python
src/swarm_rescue/solutions/my_drone_random.py
filliat/swarm-rescue
ce323c90ccb4a25216c63abccd09d3f31eea1189
[ "MIT" ]
5
2021-11-11T12:19:00.000Z
2022-03-09T08:47:37.000Z
src/swarm_rescue/solutions/my_drone_random.py
filliat/swarm-rescue
ce323c90ccb4a25216c63abccd09d3f31eea1189
[ "MIT" ]
4
2021-11-06T17:19:11.000Z
2022-02-16T11:46:54.000Z
src/swarm_rescue/solutions/my_drone_random.py
filliat/swarm-rescue
ce323c90ccb4a25216c63abccd09d3f31eea1189
[ "MIT" ]
3
2021-11-10T17:14:55.000Z
2021-11-22T16:32:17.000Z
""" Simple random controller The Drone will move forward and turn for a random angle when an obstacle is hit """ import random import math from typing import Optional from spg_overlay.drone_abstract import DroneAbstract from spg_overlay.misc_data import MiscData from spg_overlay.utils import normalize_angle class M...
30.101266
87
0.565601
1d828556d4934bfd395252f23350666340286512
1,012
py
Python
Lib/site-packages/asn1crypto/_errors.py
ldepaula3/TextAnalyticsApp
cd87f2017cf301266a82355d4c781de67b9c6ac9
[ "bzip2-1.0.6" ]
null
null
null
Lib/site-packages/asn1crypto/_errors.py
ldepaula3/TextAnalyticsApp
cd87f2017cf301266a82355d4c781de67b9c6ac9
[ "bzip2-1.0.6" ]
null
null
null
Lib/site-packages/asn1crypto/_errors.py
ldepaula3/TextAnalyticsApp
cd87f2017cf301266a82355d4c781de67b9c6ac9
[ "bzip2-1.0.6" ]
null
null
null
# coding: utf-8 """ Helper for formatting exception messages. Exports the following items: - unwrap() """ from __future__ import unicode_literals, division, absolute_import, print_function import re import textwrap def unwrap(string, *params): """ Takes a multi-line string and does the fo...
22
83
0.613636
130aa8597f404e035a48ce476abcfed0fb45a7dd
456
py
Python
plotly/validators/layout/angularaxis/_endpadding.py
faezs/plotly.py
6009b5b9c746e5d2a2849ad255a4eb234b551ed7
[ "MIT" ]
2
2020-03-24T11:41:14.000Z
2021-01-14T07:59:43.000Z
plotly/validators/layout/angularaxis/_endpadding.py
faezs/plotly.py
6009b5b9c746e5d2a2849ad255a4eb234b551ed7
[ "MIT" ]
null
null
null
plotly/validators/layout/angularaxis/_endpadding.py
faezs/plotly.py
6009b5b9c746e5d2a2849ad255a4eb234b551ed7
[ "MIT" ]
4
2019-06-03T14:49:12.000Z
2022-01-06T01:05:12.000Z
import _plotly_utils.basevalidators class EndpaddingValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name='endpadding', parent_name='layout.angularaxis', **kwargs ): super(EndpaddingValidator, self).__init__( plotly_name=p...
24
72
0.607456
d4e0c4b0a4ea353d3e07b393f58d2cb651c89e55
1,907
py
Python
juriscraper/opinions/united_states/state/me.py
mmantel/juriscraper
a6e4b8cfb6f69d728196664a9a47e1a0cf3e3d25
[ "BSD-2-Clause" ]
null
null
null
juriscraper/opinions/united_states/state/me.py
mmantel/juriscraper
a6e4b8cfb6f69d728196664a9a47e1a0cf3e3d25
[ "BSD-2-Clause" ]
null
null
null
juriscraper/opinions/united_states/state/me.py
mmantel/juriscraper
a6e4b8cfb6f69d728196664a9a47e1a0cf3e3d25
[ "BSD-2-Clause" ]
null
null
null
"""Scraper for Supreme Court of Maine CourtID: me Court Short Name: Me. Author: Brian W. Carver Date created: June 20, 2014 History: 2014-06-25 (est): Added code for additional date formats. 2014-07-02: Was receiving InsanityException and tweaked date code to get some missing dates. 2014-12-15: Fix...
33.45614
79
0.64237
31191a14afeac5dbe1ef211cc9e8baec2fbeb83f
3,107
py
Python
Python/FaceRecognition.py
vermayash7980/Hacktoberfest2021
66e190608c5e3f9ad983ba8f707e499ca5bc6da0
[ "MIT" ]
39
2021-10-03T05:40:26.000Z
2021-10-31T18:09:23.000Z
Python/FaceRecognition.py
vermayash7980/Hacktoberfest2021
66e190608c5e3f9ad983ba8f707e499ca5bc6da0
[ "MIT" ]
26
2021-10-03T04:50:47.000Z
2021-10-16T07:39:22.000Z
Python/FaceRecognition.py
vermayash7980/Hacktoberfest2021
66e190608c5e3f9ad983ba8f707e499ca5bc6da0
[ "MIT" ]
215
2021-10-03T04:35:47.000Z
2021-10-31T17:37:42.000Z
import face_recognition import cv2 import numpy as np # Get a reference to webcam #0 (the default one) video_capture = cv2.VideoCapture(0) # Load a sample picture and learn how to recognize it. j_image = face_recognition.load_image_file("add_path_to_your_image") j_face_encoding = face_recognition.face_encodings(j_im...
34.142857
101
0.671709
be4b22ea4b1403a01a9c2e52b5a7f1d21edd9f8e
16,935
py
Python
magenta/music/midi_io_test.py
fanzhiyan/magenta
622c47c19bb84c6f57b286ed03b738516b2f27d6
[ "Apache-2.0" ]
2
2019-10-19T00:21:16.000Z
2019-10-19T00:21:36.000Z
magenta/music/midi_io_test.py
fanzhiyan/magenta
622c47c19bb84c6f57b286ed03b738516b2f27d6
[ "Apache-2.0" ]
1
2019-09-29T22:41:54.000Z
2019-09-29T22:41:54.000Z
magenta/music/midi_io_test.py
fanzhiyan/magenta
622c47c19bb84c6f57b286ed03b738516b2f27d6
[ "Apache-2.0" ]
1
2019-10-05T02:04:09.000Z
2019-10-05T02:04:09.000Z
# Copyright 2019 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
44.683377
80
0.755536
5727a1731e1a69d842b0afa13e7bec33397820c6
1,113
py
Python
robosuite/__init__.py
melfm/robosuite
f66801a5f4cc5ef4ce6f517e805122e8bddba3dc
[ "MIT" ]
null
null
null
robosuite/__init__.py
melfm/robosuite
f66801a5f4cc5ef4ce6f517e805122e8bddba3dc
[ "MIT" ]
null
null
null
robosuite/__init__.py
melfm/robosuite
f66801a5f4cc5ef4ce6f517e805122e8bddba3dc
[ "MIT" ]
null
null
null
from robosuite.environments.base import make # Manipulation environments from robosuite.environments.manipulation.reach import Reach from robosuite.environments.manipulation.lift import Lift from robosuite.environments.manipulation.stack import Stack from robosuite.environments.manipulation.nut_assembly import NutAsse...
41.222222
83
0.799641
8b35b579d3c5377e3779e62bf1ada71d93e975f8
1,759
py
Python
mayan/apps/django_gpg/links.py
prezi/mayan-edms
e9bc10a056c3379b57115c6e83022f48c6298e1d
[ "Apache-2.0" ]
4
2019-02-17T08:35:42.000Z
2019-03-28T06:02:11.000Z
mayan/apps/django_gpg/links.py
zhoubear/mayan-edms
e9bc10a056c3379b57115c6e83022f48c6298e1d
[ "Apache-2.0" ]
1
2018-10-11T13:01:34.000Z
2018-10-11T13:01:34.000Z
mayan/apps/django_gpg/links.py
prezi/mayan-edms
e9bc10a056c3379b57115c6e83022f48c6298e1d
[ "Apache-2.0" ]
3
2019-01-29T13:21:57.000Z
2019-10-27T03:20:15.000Z
from __future__ import unicode_literals from django.utils.translation import ugettext_lazy as _ from navigation import Link from .icons import icon_key_setup, icon_key_upload, icon_keyserver_search from .permissions import ( permission_key_delete, permission_key_download, permission_key_receive, permission_k...
34.490196
75
0.761228
46d29be69700e8d57a2560311a03b8dd61b46421
1,483
py
Python
stubs/micropython-pyboard-1_13-95/os.py
RonaldHiemstra/micropython-stubs
d97f879b01f6687baaebef1c7e26a80909c3cff3
[ "MIT" ]
38
2020-10-18T21:59:44.000Z
2022-03-17T03:03:28.000Z
stubs/micropython-pyboard-1_13-95/os.py
RonaldHiemstra/micropython-stubs
d97f879b01f6687baaebef1c7e26a80909c3cff3
[ "MIT" ]
176
2020-10-18T14:31:03.000Z
2022-03-30T23:22:39.000Z
stubs/micropython-pyboard-1_13-95/os.py
RonaldHiemstra/micropython-stubs
d97f879b01f6687baaebef1c7e26a80909c3cff3
[ "MIT" ]
6
2020-12-28T21:11:12.000Z
2022-02-06T04:07:50.000Z
""" Module: 'os' on pyboard 1.13.0-95 """ # MCU: (sysname='pyboard', nodename='pyboard', release='1.13.0', version='v1.13-95-g0fff2e03f on 2020-10-03', machine='PYBv1.1 with STM32F405RG') # Stubber: 1.3.4 class VfsFat: '' def chdir(): pass def getcwd(): pass def ilistdir(): pa...
10.443662
145
0.475388
934ad576305543f6c76d5bf5739c4e4248c4aea1
5,894
py
Python
dns/rrset.py
liyongyue/dnsspider
ab29fb240c45bf16e146e96acff41aea29591f51
[ "0BSD" ]
null
null
null
dns/rrset.py
liyongyue/dnsspider
ab29fb240c45bf16e146e96acff41aea29591f51
[ "0BSD" ]
null
null
null
dns/rrset.py
liyongyue/dnsspider
ab29fb240c45bf16e146e96acff41aea29591f51
[ "0BSD" ]
null
null
null
# Copyright (C) 2003-2005 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation 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 "AS IS" AND ...
33.488636
78
0.63149
c3319360008b388b322269d636fda398aa9315a4
7,084
py
Python
HTML/style.py
alexandratutino/Style-2
769d1b49fe96fb89162acde20e448ec905fd0b6f
[ "Apache-2.0" ]
null
null
null
HTML/style.py
alexandratutino/Style-2
769d1b49fe96fb89162acde20e448ec905fd0b6f
[ "Apache-2.0" ]
null
null
null
HTML/style.py
alexandratutino/Style-2
769d1b49fe96fb89162acde20e448ec905fd0b6f
[ "Apache-2.0" ]
null
null
null
#!flask/bin/python from flask import Flask, render_template, request, redirect, url_for app = Flask(__name__) @app.route("/steinbeck") def steinbeck(): return render_template("steinbeck.html", awl=request.args.get("awl"), asl=request.args.get("asl"), nr=request.args.get("nr"),...
47.543624
114
0.539526
9fe625030b2993cf97f255b1d20b5726be2bc457
1,357
py
Python
migrations/versions/5b1c342f1989_move_language_col_from_user_to_.py
Amaimersion/yandex-disk-telegram-bot
d9735d288c12b3961dc8143f50328434dc2069e4
[ "MIT" ]
15
2020-05-12T23:23:38.000Z
2022-02-22T00:44:06.000Z
migrations/versions/5b1c342f1989_move_language_col_from_user_to_.py
zYxDevs/yandex-disk-telegram-bot
d9735d288c12b3961dc8143f50328434dc2069e4
[ "MIT" ]
5
2020-08-03T08:57:37.000Z
2022-01-31T08:30:03.000Z
migrations/versions/5b1c342f1989_move_language_col_from_user_to_.py
zYxDevs/yandex-disk-telegram-bot
d9735d288c12b3961dc8143f50328434dc2069e4
[ "MIT" ]
7
2020-08-15T20:24:56.000Z
2021-09-26T21:43:46.000Z
"""Move Language col from User to UserSettings Revision ID: 5b1c342f1989 Revises: 2806d4dc492a Create Date: 2021-06-24 10:51:58.562458 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '5b1c342f1989' down_revision = '2806d4dc492a' branch_labels = None depends_on ...
28.87234
144
0.694915
a62ef6d8b50db964cb8b80b2e17f64fa885fe18d
5,051
py
Python
src/genie/libs/parser/nxos/tests/ShowIpStaticRoute/cli/equal/golden_output_1_expected.py
balmasea/genieparser
d1e71a96dfb081e0a8591707b9d4872decd5d9d3
[ "Apache-2.0" ]
204
2018-06-27T00:55:27.000Z
2022-03-06T21:12:18.000Z
src/genie/libs/parser/nxos/tests/ShowIpStaticRoute/cli/equal/golden_output_1_expected.py
balmasea/genieparser
d1e71a96dfb081e0a8591707b9d4872decd5d9d3
[ "Apache-2.0" ]
468
2018-06-19T00:33:18.000Z
2022-03-31T23:23:35.000Z
src/genie/libs/parser/nxos/tests/ShowIpStaticRoute/cli/equal/golden_output_1_expected.py
balmasea/genieparser
d1e71a96dfb081e0a8591707b9d4872decd5d9d3
[ "Apache-2.0" ]
309
2019-01-16T20:21:07.000Z
2022-03-30T12:56:41.000Z
expected_output = { 'vrf':{ 'default':{ 'address_family': { 'ipv4': { 'routes': { '10.4.1.1/32': { 'route': '10.4.1.1/32', 'next_hop': { 'next_hop_...
44.699115
77
0.179172
1d270389293a3b4776beb9edccc810ae35af3ad5
3,782
py
Python
src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_40.py
robszewczyk/openweave-core
f452cc55859daea83b3ce7af158c8e78b05cc3bc
[ "Apache-2.0" ]
249
2017-09-18T17:48:34.000Z
2022-02-02T06:46:21.000Z
src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_40.py
robszewczyk/openweave-core
f452cc55859daea83b3ce7af158c8e78b05cc3bc
[ "Apache-2.0" ]
501
2017-11-10T11:25:32.000Z
2022-02-01T10:43:13.000Z
src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_40.py
robszewczyk/openweave-core
f452cc55859daea83b3ce7af158c8e78b05cc3bc
[ "Apache-2.0" ]
116
2017-09-20T07:06:55.000Z
2022-01-08T13:41:15.000Z
#!/usr/bin/env python3 # # Copyright (c) 2016-2017 Nest Labs, 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/lic...
50.426667
173
0.655473
81bc892a9f17d1bf3012da6f92ea0cb874b711b7
897
py
Python
_0_download_to_csv/_1_to_csv.py
JesseAldridge/github_quality
a5730338d6aeaf16d869c78ae7cb3c60b27d368c
[ "MIT" ]
1
2015-10-26T17:54:30.000Z
2015-10-26T17:54:30.000Z
_0_download_to_csv/_1_to_csv.py
JesseAldridge/github_quality
a5730338d6aeaf16d869c78ae7cb3c60b27d368c
[ "MIT" ]
null
null
null
_0_download_to_csv/_1_to_csv.py
JesseAldridge/github_quality
a5730338d6aeaf16d869c78ae7cb3c60b27d368c
[ "MIT" ]
null
null
null
import json, csv, glob, os download_dir_path = os.path.expanduser('~/repoq-downloads') column_labels = [ 'full_name', 'disabled', 'has_projects', 'stargazers_count', 'subscribers_count', 'self_issue_count', 'pushed_at', 'pull_count', 'network_count', 'forks', 'watchers', 'open_issues', '...
19.933333
69
0.661093
84dd33719c4b2ff1fc5e7e3f4563071d11c5e2aa
5,078
py
Python
final/listview/listview_container.py
JosuX/Albie
417bb0065139e118bfacd45c58ac0272ee37ea90
[ "MIT" ]
null
null
null
final/listview/listview_container.py
JosuX/Albie
417bb0065139e118bfacd45c58ac0272ee37ea90
[ "MIT" ]
null
null
null
final/listview/listview_container.py
JosuX/Albie
417bb0065139e118bfacd45c58ac0272ee37ea90
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'listview_container.ui' # # Created by: PyQt5 UI code generator 5.15.1 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. from PyQt5 import Q...
44.938053
177
0.706774
80addb330ca7dca0fad59b279b0a30b3edaef161
2,117
py
Python
test/integration/src/py/hand_setup.py
emeseight/sifnode
cf52c0cf622fd5113c0a1a8f704e5f62ef3ae4c3
[ "Apache-2.0" ]
85
2020-10-24T07:35:55.000Z
2022-03-27T10:27:55.000Z
test/integration/src/py/hand_setup.py
emeseight/sifnode
cf52c0cf622fd5113c0a1a8f704e5f62ef3ae4c3
[ "Apache-2.0" ]
1,760
2020-10-24T07:37:17.000Z
2022-03-31T17:59:44.000Z
test/integration/src/py/hand_setup.py
emeseight/sifnode
cf52c0cf622fd5113c0a1a8f704e5f62ef3ae4c3
[ "Apache-2.0" ]
115
2020-10-31T07:32:38.000Z
2022-03-29T21:12:25.000Z
import logging import os import sys import burn_lock_functions import test_utilities from burn_lock_functions import EthereumToSifchainTransferRequest from integration_env_credentials import sifchain_cli_credentials_for_test from test_utilities import get_required_env_var, SifchaincliCredentials, get_optional_env_var,...
38.490909
128
0.787435
9c53983c39a7afc87490acd44a1f8d705b74cda0
2,537
py
Python
src/Object/obj_converter.py
hegedenes/shader-combinators
61a483e259e86f556fc642a13e5067b48be5e676
[ "BSD-3-Clause" ]
null
null
null
src/Object/obj_converter.py
hegedenes/shader-combinators
61a483e259e86f556fc642a13e5067b48be5e676
[ "BSD-3-Clause" ]
null
null
null
src/Object/obj_converter.py
hegedenes/shader-combinators
61a483e259e86f556fc642a13e5067b48be5e676
[ "BSD-3-Clause" ]
null
null
null
import sys import os name = sys.argv[1] def from_f(f): x = f.split('/') #return '('+name.lower()+'Vertices !! ('+x[0]+'-1), '+name.lower()+'TexCoords !! ('+x[1]+'-1), '+name.lower()+'Normals !! ('+x[2]+'-1))' return [int(x[0]), int(x[1]), int(x[2])] def to_str(line): if line[0] in ['v','vn']: return 'V3 ...
19.075188
138
0.552621
d6310d81ab87f7334e767668217d51054439a89c
25,893
py
Python
pandas/io/json.py
springcoil/pandas
945075ad78cef652039feb50d60092b0580604e6
[ "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
pandas/io/json.py
springcoil/pandas
945075ad78cef652039feb50d60092b0580604e6
[ "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
pandas/io/json.py
springcoil/pandas
945075ad78cef652039feb50d60092b0580604e6
[ "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
# pylint: disable-msg=E1101,W0613,W0603 import os import copy from collections import defaultdict import numpy as np import pandas.json as _json from pandas.tslib import iNaT from pandas.compat import long, u from pandas import compat, isnull from pandas import Series, DataFrame, to_datetime from pandas.io.common imp...
33.281491
79
0.543351
2bcca943fbd5e23655352bac497913ac5109a5ff
1,150
py
Python
cortical_breach_detection/metrics.py
benjamindkilleen/SPIE-2022_cortical-breach-anticipation
0238bf8242d3957ab6f840601138f94df722e8c0
[ "MIT" ]
2
2022-02-25T07:08:57.000Z
2022-02-27T16:50:45.000Z
cortical_breach_detection/metrics.py
benjamindkilleen/SPIE-2022_cortical-breach-anticipation
0238bf8242d3957ab6f840601138f94df722e8c0
[ "MIT" ]
null
null
null
cortical_breach_detection/metrics.py
benjamindkilleen/SPIE-2022_cortical-breach-anticipation
0238bf8242d3957ab6f840601138f94df722e8c0
[ "MIT" ]
null
null
null
import logging import torch import torchmetrics from torch import nn log = logging.getLogger(__name__) class AggregateMetrics(nn.Module): def __init__(self, *metrics): super().__init__() self.trues = [] self.preds = [] self.metrics = metrics def forward(self, y_pred, y_true,...
26.744186
82
0.482609
c5b0f278af3f34bdb545f3c5c17232450f0191f8
353
py
Python
Eager/apimgt/adaptor_factory.py
UCSB-CS-RACELab/eager-appscale
d58fe64bb867ef58af19c1d84a5e1ec68ecddd3d
[ "Apache-2.0" ]
3
2016-06-12T01:18:49.000Z
2018-07-16T18:20:23.000Z
Eager/apimgt/adaptor_factory.py
UCSB-CS-RACELab/eager-appscale
d58fe64bb867ef58af19c1d84a5e1ec68ecddd3d
[ "Apache-2.0" ]
null
null
null
Eager/apimgt/adaptor_factory.py
UCSB-CS-RACELab/eager-appscale
d58fe64bb867ef58af19c1d84a5e1ec68ecddd3d
[ "Apache-2.0" ]
1
2020-05-25T02:59:15.000Z
2020-05-25T02:59:15.000Z
from apimgt.wso2am_14 import WSO2APIManager14Adaptor CONF_AM = 'api_manager' CONF_AM_PROVIDER = 'provider' def get_adaptor(conf): provider_name = conf[CONF_AM][CONF_AM_PROVIDER] if provider_name == 'wso2am1.4': return WSO2APIManager14Adaptor(conf[CONF_AM]) else: raise Exception('Unknown API Manager prov...
32.090909
78
0.776204
ce674cd52f34bd02677715cbd6b4e8b331a7bcac
14,528
py
Python
skimage/filters/tests/test_thresholding.py
portugueslab/scikit-image
0fa3bcb118bb208a0cc7d3e8b96cd96c1ce7a75b
[ "BSD-3-Clause" ]
null
null
null
skimage/filters/tests/test_thresholding.py
portugueslab/scikit-image
0fa3bcb118bb208a0cc7d3e8b96cd96c1ce7a75b
[ "BSD-3-Clause" ]
null
null
null
skimage/filters/tests/test_thresholding.py
portugueslab/scikit-image
0fa3bcb118bb208a0cc7d3e8b96cd96c1ce7a75b
[ "BSD-3-Clause" ]
null
null
null
import numpy as np from scipy import ndimage as ndi import skimage from skimage import data from skimage._shared._warnings import expected_warnings from skimage.filters.thresholding import (threshold_local, threshold_adaptive, threshol...
34.264151
79
0.598293
53fc0cc7b8a1e19b2603e5919fe50cbdb09d740e
306
py
Python
src/wai/common/_functions.py
waikato-datamining/wai-common
bf3d7ae6e01bcb7ffe9f5c2b5d10a05908a68c34
[ "MIT" ]
null
null
null
src/wai/common/_functions.py
waikato-datamining/wai-common
bf3d7ae6e01bcb7ffe9f5c2b5d10a05908a68c34
[ "MIT" ]
8
2020-07-01T02:11:31.000Z
2020-12-17T01:57:17.000Z
src/wai/common/_functions.py
waikato-datamining/wai-common
bf3d7ae6e01bcb7ffe9f5c2b5d10a05908a68c34
[ "MIT" ]
null
null
null
from collections import Hashable from typing import Any def is_hashable(obj: Any) -> bool: """ Checks if the given object is hashable. :param obj: The object to check. :return: True if the object is hashable, False if not. """ return isinstance(obj, Hashable)
21.857143
47
0.640523
11151ef7666dcaec889aa6e610e2442d73e2ccf0
356
py
Python
frappe/www/error.py
ssuda777/frappe
d3f3df2ce15154aecc1d9d6d07d947e72c2e8c6e
[ "MIT" ]
1
2021-12-18T18:37:29.000Z
2021-12-18T18:37:29.000Z
frappe/www/error.py
JMBodz/frappe
eb218a06d1cbfc3a8f1cc00ba8dac2c927d2f71d
[ "MIT" ]
3
2021-02-27T11:50:14.000Z
2021-05-03T06:48:49.000Z
frappe/www/error.py
JMBodz/frappe
eb218a06d1cbfc3a8f1cc00ba8dac2c927d2f71d
[ "MIT" ]
2
2021-09-02T09:51:55.000Z
2021-09-07T04:55:42.000Z
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt import frappe no_cache = 1 def get_context(context): if frappe.flags.in_migrate: return context.http_status_code = 500 print(frappe.get_traceback().encode("utf-8")) return {"error": frappe.get_traceback().replace(...
27.384615
84
0.716292
af05a20138af62725e604eac325f44cbd995fb4f
398
py
Python
lib/appengine-ndb-experiment/appengine_config.py
ortiz1605/webapp-improved
0e6218dcd3ba2e0ba0c6a6c87ba4fbe1eab287c4
[ "Apache-2.0" ]
15
2015-01-18T17:30:31.000Z
2019-10-25T17:14:41.000Z
lib/appengine-ndb-experiment/appengine_config.py
ortiz1605/webapp-improved
0e6218dcd3ba2e0ba0c6a6c87ba4fbe1eab287c4
[ "Apache-2.0" ]
null
null
null
lib/appengine-ndb-experiment/appengine_config.py
ortiz1605/webapp-improved
0e6218dcd3ba2e0ba0c6a6c87ba4fbe1eab287c4
[ "Apache-2.0" ]
2
2015-06-17T23:01:13.000Z
2015-07-08T23:10:19.000Z
def webapp_add_wsgi_middleware(app): try: from google.appengine.ext.appstats import recording except ImportError, err: logging.info('Failed to import recording: %s', err) else: app = recording.appstats_wsgi_middleware(app) return app appstats_KEY_DISTANCE = 10 appstats_MAX_REPR = 1000 appstats_MAX_...
23.411765
55
0.736181
b5d1f82c2954a7ef35fe4f5376f76c4161679982
8,817
py
Python
stactools_threedep/stactools/threedep/metadata.py
jamesvrt/stactools
99c2ae556aad61cb854bd0edd8000a7ac42cfa06
[ "Apache-2.0" ]
null
null
null
stactools_threedep/stactools/threedep/metadata.py
jamesvrt/stactools
99c2ae556aad61cb854bd0edd8000a7ac42cfa06
[ "Apache-2.0" ]
null
null
null
stactools_threedep/stactools/threedep/metadata.py
jamesvrt/stactools
99c2ae556aad61cb854bd0edd8000a7ac42cfa06
[ "Apache-2.0" ]
null
null
null
from __future__ import annotations import datetime from typing import Union, Optional from xml.etree import ElementTree from xml.etree.ElementTree import Element from shapely.geometry import box, mapping from pystac import Asset, MediaType, Link from stactools.core import io from stactools.core.io import ReadHrefModi...
36.891213
87
0.540887
b7051989265ca6e31c438b2a00e63e339e49efc8
2,445
py
Python
homeassistant/components/tradfri/switch.py
DoctorU/core
5b218d7e1c4164e32d41473977459cbaf23adf42
[ "Apache-2.0" ]
5
2017-01-26T16:33:09.000Z
2018-07-20T13:50:47.000Z
homeassistant/components/tradfri/switch.py
DoctorU/core
5b218d7e1c4164e32d41473977459cbaf23adf42
[ "Apache-2.0" ]
87
2020-07-06T22:22:54.000Z
2022-03-31T06:01:46.000Z
homeassistant/components/tradfri/switch.py
DoctorU/core
5b218d7e1c4164e32d41473977459cbaf23adf42
[ "Apache-2.0" ]
3
2021-05-31T15:32:08.000Z
2021-08-10T22:08:42.000Z
"""Support for IKEA Tradfri switches.""" from __future__ import annotations from collections.abc import Callable from typing import Any, cast from pytradfri.command import Command from homeassistant.components.switch import SwitchEntity from homeassistant.config_entries import ConfigEntry from homeassistant.core imp...
32.6
73
0.689571
4b8e951228e4274e022d776fb35c1aca15ee861b
7,141
py
Python
easy_postgres/connection.py
natiiix/postgresql
aaa9e4b7229df6fee30ac3e83c5cc3501d5c0f4c
[ "MIT" ]
null
null
null
easy_postgres/connection.py
natiiix/postgresql
aaa9e4b7229df6fee30ac3e83c5cc3501d5c0f4c
[ "MIT" ]
1
2019-09-30T09:55:52.000Z
2019-09-30T10:16:21.000Z
easy_postgres/connection.py
natiiix/postgresql
aaa9e4b7229df6fee30ac3e83c5cc3501d5c0f4c
[ "MIT" ]
null
null
null
"""Module containing the Connection class.""" import psycopg2 from .dictionary import Dictionary from .transaction import Transaction class Connection: """ Hopefully an easier-to-use wrapper for the psycopg2 Connection class. Single-item tuples are replaced with the value of the only item. This appl...
31.047826
91
0.61728
8b8d9e6c4e4eee6e9b9960ae45f09503a0b1e600
1,054
py
Python
setuptools/tests/test_test.py
eacheson/setuptools
247de8a2fbb2d1c34369ee83588100dbbe5f82a2
[ "MIT" ]
null
null
null
setuptools/tests/test_test.py
eacheson/setuptools
247de8a2fbb2d1c34369ee83588100dbbe5f82a2
[ "MIT" ]
null
null
null
setuptools/tests/test_test.py
eacheson/setuptools
247de8a2fbb2d1c34369ee83588100dbbe5f82a2
[ "MIT" ]
null
null
null
import pytest from jaraco import path from setuptools.command.test import test from setuptools.dist import Distribution from .textwrap import DALS @pytest.mark.usefixtures('tmpdir_cwd') def test_tests_are_run_once(capfd): params = dict( name='foo', packages=['dummy'], ) files = { ...
25.095238
69
0.520873
e612e308787acddfb4ed9cbb0807701a19c04748
42
py
Python
gonzo/webapp/tests.py
paulcwatts/1hph
407337955121c3f59b4621acb392e6c23b57ae8e
[ "BSD-3-Clause" ]
1
2016-10-03T05:29:12.000Z
2016-10-03T05:29:12.000Z
gonzo/webapp/tests.py
paulcwatts/1hph
407337955121c3f59b4621acb392e6c23b57ae8e
[ "BSD-3-Clause" ]
null
null
null
gonzo/webapp/tests.py
paulcwatts/1hph
407337955121c3f59b4621acb392e6c23b57ae8e
[ "BSD-3-Clause" ]
null
null
null
from gonzo.webapp.account.tests import *
14
40
0.785714
ba8d8a5d33baecf2aafaee4cbdc1d9749392a289
1,062
py
Python
pdc/apps/changeset/migrations/0001_initial.py
tzhaoredhat/automation
a1867dc2d3591fdae1fa7f80d457c25f9705070e
[ "MIT" ]
18
2015-12-15T17:56:18.000Z
2021-04-10T13:49:48.000Z
pdc/apps/changeset/migrations/0001_initial.py
tzhaoredhat/automation
a1867dc2d3591fdae1fa7f80d457c25f9705070e
[ "MIT" ]
303
2015-11-18T07:37:06.000Z
2021-05-26T12:34:01.000Z
pdc/apps/changeset/migrations/0001_initial.py
tzhaoredhat/automation
a1867dc2d3591fdae1fa7f80d457c25f9705070e
[ "MIT" ]
27
2015-11-19T20:33:54.000Z
2021-03-25T08:15:28.000Z
# -*- coding: utf-8 -*- # # Copyright (c) 2015 Red Hat # Licensed under The MIT License (MIT) # http://opensource.org/licenses/MIT # from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migratio...
29.5
114
0.57533
6e958156c948203f569ad53856fb187f9ddb20ff
2,514
py
Python
Code/detectAndDisplay.py
ngbla/memoire_bigdata_face
dd9cf3d198f3921cd7fc183902732fd877473edf
[ "MIT" ]
null
null
null
Code/detectAndDisplay.py
ngbla/memoire_bigdata_face
dd9cf3d198f3921cd7fc183902732fd877473edf
[ "MIT" ]
null
null
null
Code/detectAndDisplay.py
ngbla/memoire_bigdata_face
dd9cf3d198f3921cd7fc183902732fd877473edf
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Jun 23 05:29:05 2021 @author: ngbla """ from __future__ import print_function import cv2 as cv import argparse # Begin fonction def detectAndDisplay(frame): #face_cascade = cv.CascadeClassifier('haarcascade_frontalface_default.xml') #face_cas...
41.213115
135
0.656325