hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | 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 209 | max_issues_repo_name stringlengths 5 121 | 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 209 | max_forks_repo_name stringlengths 5 121 | 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 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
39e2fbc58c67309d887b23832e6d9f2d13f072db | 48,174 | py | Python | main.py | ShareASmile/car-locator | 765d26ad414ab86e4d93bc5338868769e8b3e90f | [
"MIT"
] | 21 | 2020-09-08T21:03:25.000Z | 2022-02-15T07:08:04.000Z | main.py | ShareASmile/car-locator | 765d26ad414ab86e4d93bc5338868769e8b3e90f | [
"MIT"
] | 3 | 2021-04-13T09:40:20.000Z | 2021-05-28T20:53:07.000Z | main.py | ShareASmile/car-locator | 765d26ad414ab86e4d93bc5338868769e8b3e90f | [
"MIT"
] | 9 | 2020-12-11T09:01:42.000Z | 2022-03-28T00:55:59.000Z | """Find my car"""
__author__ = 'Ady Wizard'
from functools import partial
from random import choice
from datetime import datetime, date
import os
import glob
import json
from kivymd.color_definitions import colors
from kivymd.uix.floatlayout import MDFloatLayout
from kivymd.app import MDApp
from kivymd... | 32.793737 | 79 | 0.553763 |
4f7817d3107dba6a65c4d295ad7046e34399ccda | 401 | py | Python | backend/sphear_28505/wsgi.py | crowdbotics-apps/sphear-28505 | cc0c83748186b84602bb945eae5ccc7ea19958dd | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/sphear_28505/wsgi.py | crowdbotics-apps/sphear-28505 | cc0c83748186b84602bb945eae5ccc7ea19958dd | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/sphear_28505/wsgi.py | crowdbotics-apps/sphear-28505 | cc0c83748186b84602bb945eae5ccc7ea19958dd | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | """
WSGI config for sphear_28505 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/2.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_... | 23.588235 | 78 | 0.790524 |
1379b0fa1fbc69180ef4a2968bfa31b92d9c4c00 | 8,259 | py | Python | train.py | nknowlton/yolov3-tf2 | 4a26a38bbe0bc9d43d35e784c931d8ceb0e0f801 | [
"MIT"
] | null | null | null | train.py | nknowlton/yolov3-tf2 | 4a26a38bbe0bc9d43d35e784c931d8ceb0e0f801 | [
"MIT"
] | null | null | null | train.py | nknowlton/yolov3-tf2 | 4a26a38bbe0bc9d43d35e784c931d8ceb0e0f801 | [
"MIT"
] | 1 | 2020-07-13T00:31:11.000Z | 2020-07-13T00:31:11.000Z | from absl import app, flags, logging
from absl.flags import FLAGS
import tensorflow as tf
import numpy as np
import cv2
from tensorflow.keras.callbacks import (
ReduceLROnPlateau,
EarlyStopping,
ModelCheckpoint,
TensorBoard
)
from yolov3_tf2.models import (
YoloV3, YoloV3Tiny, YoloLoss,
yolo_an... | 41.923858 | 103 | 0.619567 |
8e992d27b5de7d479b5ace43649ff0956b9b25a8 | 9,793 | py | Python | venv/Lib/site-packages/pymongo/errors.py | arnoyu-hub/COMP0016miemie | 59af664dcf190eab4f93cefb8471908717415fea | [
"MIT"
] | 22 | 2015-05-18T07:04:36.000Z | 2021-08-02T03:01:43.000Z | onboarding/Lib/site-packages/pymongo/errors.py | USPCodeLabSanca/on.boarding-2021.2---Filtro-de-Receitas | 273c0f852c66ecec840dc8db4bd3894ef727beb0 | [
"MIT"
] | 16 | 2022-02-01T06:06:00.000Z | 2022-02-01T06:21:40.000Z | onboarding/Lib/site-packages/pymongo/errors.py | USPCodeLabSanca/on.boarding-2021.2---Filtro-de-Receitas | 273c0f852c66ecec840dc8db4bd3894ef727beb0 | [
"MIT"
] | 6 | 2015-06-06T07:16:12.000Z | 2021-07-06T13:45:56.000Z | # Copyright 2009-present MongoDB, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | 30.795597 | 79 | 0.691821 |
68b663b47f931c48fa52e204c6315cc8a9540409 | 6,997 | py | Python | geotrek/tourism/tests/test_sync.py | fossabot/Geotrek-admin | ea2c873511ad724c742c64d81cbf31f37dbe3093 | [
"BSD-2-Clause"
] | null | null | null | geotrek/tourism/tests/test_sync.py | fossabot/Geotrek-admin | ea2c873511ad724c742c64d81cbf31f37dbe3093 | [
"BSD-2-Clause"
] | null | null | null | geotrek/tourism/tests/test_sync.py | fossabot/Geotrek-admin | ea2c873511ad724c742c64d81cbf31f37dbe3093 | [
"BSD-2-Clause"
] | null | null | null | # -*- encoding: UTF-8 -*-
import json
import os
import mock
from zipfile import ZipFile
from django.conf import settings
from django.core import management
from django.test import TestCase
from django.utils import translation
from geotrek.common.factories import RecordSourceFactory, TargetPortalFactory
from geotrek.... | 50.338129 | 121 | 0.535229 |
377879de374ebb2503a6011cba6538adfc59ebff | 5,692 | py | Python | tests/test_middleware.py | hoopit/dj-stripe | 726853081cd95be86777492c23fb61de5d35a72a | [
"MIT"
] | 2 | 2020-09-01T20:05:28.000Z | 2021-07-22T08:20:42.000Z | tests/test_middleware.py | hoopit/dj-stripe | 726853081cd95be86777492c23fb61de5d35a72a | [
"MIT"
] | 1 | 2021-02-24T15:01:41.000Z | 2021-03-25T20:44:53.000Z | tests/test_middleware.py | hoopit/dj-stripe | 726853081cd95be86777492c23fb61de5d35a72a | [
"MIT"
] | 2 | 2020-01-31T14:26:09.000Z | 2020-07-14T04:24:15.000Z | """
dj-stripe Middleware Tests.
"""
from copy import deepcopy
from unittest.mock import patch
from django.contrib.auth import get_user_model
from django.contrib.auth.models import AnonymousUser
from django.test import TestCase
from django.test.client import RequestFactory
from django.test.utils import modify_settings,... | 32.158192 | 113 | 0.673226 |
c1dd85a64b53dea0c32cbb62eaa738fb177bbbc5 | 1,040 | py | Python | public-engines/product-classifier-engine/marvin_product_classifier_engine/data_handler/acquisitor_and_cleaner.py | tallandroid/incubator-marvin | 2ff33b26d5d362b6541125a400146ccf6153f83b | [
"Apache-2.0"
] | 101 | 2018-10-12T20:33:43.000Z | 2022-03-04T08:48:08.000Z | public-engines/product-classifier-engine/marvin_product_classifier_engine/data_handler/acquisitor_and_cleaner.py | tallandroid/incubator-marvin | 2ff33b26d5d362b6541125a400146ccf6153f83b | [
"Apache-2.0"
] | 54 | 2018-11-05T23:39:59.000Z | 2022-01-18T01:16:12.000Z | public-engines/product-classifier-engine/marvin_product_classifier_engine/data_handler/acquisitor_and_cleaner.py | tallandroid/incubator-marvin | 2ff33b26d5d362b6541125a400146ccf6153f83b | [
"Apache-2.0"
] | 69 | 2018-10-17T06:02:25.000Z | 2022-03-04T08:48:09.000Z | #!/usr/bin/env python
# coding=utf-8
"""AcquisitorAndCleaner engine action.
Use this module to add the project main code.
"""
from .._compatibility import six
from .._logging import get_logger
from marvin_python_toolbox.common.data import MarvinData
import pandas as pd
from marvin_python_toolbox.engine_base import E... | 29.714286 | 152 | 0.744231 |
f974ed324984f072b0cc827a0f41fe6b846c4889 | 484 | py | Python | python/web/wsgi.py | wjiec/packages | 4ccaf8f717265a1f8a9af533f9a998b935efb32a | [
"MIT"
] | null | null | null | python/web/wsgi.py | wjiec/packages | 4ccaf8f717265a1f8a9af533f9a998b935efb32a | [
"MIT"
] | 1 | 2016-09-15T07:06:15.000Z | 2016-09-15T07:06:15.000Z | python/web/wsgi.py | wjiec/packages | 4ccaf8f717265a1f8a9af533f9a998b935efb32a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from wsgiref.simple_server import make_server
def application(environ, start_response):
print('get request:', environ)
start_response('200 OK', [('Content-Type', 'text/html')])
return [('<h1>Hello %s!</h1>' % (environ['USERNAME'])).encode('utf-8'), (environ.__str__().encode('ut... | 32.266667 | 113 | 0.646694 |
dc3d890a429819e62a90f5135397568adbbfa457 | 2,475 | py | Python | Software/qlocktoo/snake/snake_model.py | tfeldmann/QlockToo | 778a955ac84348342db036b1989931c6d9be9242 | [
"MIT"
] | 1 | 2019-10-12T16:26:25.000Z | 2019-10-12T16:26:25.000Z | Software/qlocktoo/snake/snake_model.py | tfeldmann/QlockToo | 778a955ac84348342db036b1989931c6d9be9242 | [
"MIT"
] | null | null | null | Software/qlocktoo/snake/snake_model.py | tfeldmann/QlockToo | 778a955ac84348342db036b1989931c6d9be9242 | [
"MIT"
] | 1 | 2020-02-02T23:42:55.000Z | 2020-02-02T23:42:55.000Z | import random
class SnakeModel(object):
"""
Model for a snake-like game.
"""
def __init__(self, width, height,
gameover_callback, atefood_callback):
"""
Initializes the game
gameover_callback and atefood_callback are callback functions. They
are pass... | 28.77907 | 79 | 0.562424 |
1af594e946909fad2d3b20c2f2f41c4d282d627b | 17,458 | py | Python | problem14/solver.py | jacor-/TuentiChallenge5 | 65351692bc0bd3a32b20c72c643648d1bc6edcb0 | [
"MIT"
] | 1 | 2015-08-01T07:47:05.000Z | 2015-08-01T07:47:05.000Z | problem14/solver.py | jacor-/TuentiChallenge5 | 65351692bc0bd3a32b20c72c643648d1bc6edcb0 | [
"MIT"
] | null | null | null | problem14/solver.py | jacor-/TuentiChallenge5 | 65351692bc0bd3a32b20c72c643648d1bc6edcb0 | [
"MIT"
] | null | null | null | import numpy
import fileinput
import time
'''
This function tell us if a point is inside a given polygon
'''
def point_in_poly(x,y,poly):
n = len(poly)
inside = False
p1x,p1y = poly[0]
for i in range(n+1):
p2x,p2y = poly[i % n]
if y > min(p1y,p2y):
if y <= max(p1y,p2y):
... | 43 | 159 | 0.643945 |
24e5fe31b5f5605e4474d9288f5c14ec22c9f538 | 1,064 | py | Python | scraper/storage_spiders/solarvvn.py | chongiadung/choinho | d2a216fe7a5064d73cdee3e928a7beef7f511fd1 | [
"MIT"
] | null | null | null | scraper/storage_spiders/solarvvn.py | chongiadung/choinho | d2a216fe7a5064d73cdee3e928a7beef7f511fd1 | [
"MIT"
] | 10 | 2020-02-11T23:34:28.000Z | 2022-03-11T23:16:12.000Z | scraper/storage_spiders/solarvvn.py | chongiadung/choinho | d2a216fe7a5064d73cdee3e928a7beef7f511fd1 | [
"MIT"
] | 3 | 2018-08-05T14:54:25.000Z | 2021-06-07T01:49:59.000Z | # Auto generated by generator.py. Delete this line if you make modification.
from scrapy.spiders import Rule
from scrapy.linkextractors import LinkExtractor
XPATH = {
'name' : "//div[@class='header_layer_2']/h1[@class='header headline']/span/label",
'price' : "//div[@class='chitiet_sanpham_bangchia_cell_thong... | 39.407407 | 143 | 0.650376 |
dc508b614a03e0217098088884863acec12b20c2 | 40,845 | py | Python | tests/unit/test_utils.py | NinjaIntheBronx/pip | f46550831d46fd66879d7d8a2a0eb6060efdeb67 | [
"MIT"
] | null | null | null | tests/unit/test_utils.py | NinjaIntheBronx/pip | f46550831d46fd66879d7d8a2a0eb6060efdeb67 | [
"MIT"
] | null | null | null | tests/unit/test_utils.py | NinjaIntheBronx/pip | f46550831d46fd66879d7d8a2a0eb6060efdeb67 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
util tests
"""
import codecs
import itertools
import os
import shutil
import stat
import sys
import tempfile
import time
import warnings
from io import BytesIO
from logging import DEBUG, ERROR, INFO, WARNING
import pytest
from mock import Mock, patch
from pip._internal.exceptions import ... | 38.316135 | 79 | 0.620468 |
6545993914f15b09a329b2cfb83def393f34b9fe | 10,357 | py | Python | Lib/test/test_builtin_jy.py | jeff5/jython-whinchat | 65d8e5268189f8197295ff2d91be3decb1ee0081 | [
"CNRI-Jython"
] | 577 | 2020-06-04T16:34:44.000Z | 2022-03-31T11:46:07.000Z | Lib/test/test_builtin_jy.py | jeff5/jython-whinchat | 65d8e5268189f8197295ff2d91be3decb1ee0081 | [
"CNRI-Jython"
] | 174 | 2015-01-08T20:37:09.000Z | 2020-06-03T16:48:59.000Z | Lib/test/test_builtin_jy.py | jeff5/jython-whinchat | 65d8e5268189f8197295ff2d91be3decb1ee0081 | [
"CNRI-Jython"
] | 162 | 2015-02-07T02:14:38.000Z | 2020-05-30T16:42:03.000Z | # -*- coding: utf-8 -*-
import test.test_support, unittest
from test.test_support import TESTFN, unlink
import sys, UserDict
from codecs import BOM_UTF8
class BuiltinTest(unittest.TestCase):
def test_in_sys_modules(self):
self.assert_("__builtin__" in sys.modules,
"__builtin__ not found in s... | 30.824405 | 81 | 0.520421 |
164ce92aac249ce91d27bddc2c45fa16b7bbd0e3 | 1,684 | py | Python | py/test/plugin/pytest_iocapture.py | woodrow/pyoac | b5dc59e6a38e7912db47f26fb23ffa4764a3c0e7 | [
"MIT"
] | 1 | 2019-05-27T00:58:46.000Z | 2019-05-27T00:58:46.000Z | py/test/plugin/pytest_iocapture.py | woodrow/pyoac | b5dc59e6a38e7912db47f26fb23ffa4764a3c0e7 | [
"MIT"
] | null | null | null | py/test/plugin/pytest_iocapture.py | woodrow/pyoac | b5dc59e6a38e7912db47f26fb23ffa4764a3c0e7 | [
"MIT"
] | null | null | null | import py
class IocapturePlugin:
""" capture sys.stdout/sys.stderr / fd1/fd2. """
def pytest_funcarg__stdcapture(self, pyfuncitem):
capture = Capture(py.io.StdCapture)
pyfuncitem.addfinalizer(capture.finalize)
return capture
def pytest_funcarg__stdcapturefd(self, pyfuncitem):
... | 30.618182 | 55 | 0.606295 |
4915ace4b8d2edf2c9dbb45ddd2438fedd4f3d99 | 1,741 | py | Python | time_patricia.py | fnl/patricia-trie | a47f0b7698fe60a6a3a657ca899fbd89d17c0c09 | [
"Apache-2.0"
] | 26 | 2015-02-07T10:13:07.000Z | 2021-08-24T13:49:44.000Z | time_patricia.py | fnl/patricia-trie | a47f0b7698fe60a6a3a657ca899fbd89d17c0c09 | [
"Apache-2.0"
] | 2 | 2015-05-13T15:53:06.000Z | 2015-12-14T09:07:30.000Z | time_patricia.py | fnl/patricia-trie | a47f0b7698fe60a6a3a657ca899fbd89d17c0c09 | [
"Apache-2.0"
] | 7 | 2016-03-18T13:32:31.000Z | 2020-08-21T08:24:40.000Z | from patricia import trie
TEXT = """
On the seventh of November, the two boys went on a sixty day long trip to
twenty-three different capitals of the twelve continents.
Their eighteen pets were, together, two-hundred-and-fourteen years old.
"""
S1 = (1, TEXT.index('.') + 1)
S2 = (S1[1] + 1, TEXT.rindex('.') + 1)
... | 32.849057 | 78 | 0.545089 |
4d9fc806fc1f8c34904baffd7df9f1f8d0459936 | 7,213 | py | Python | nautobot/virtualization/filters.py | susanhooks/nautobot | bc3ef5958f0d5decb0be763342c790f26ff1e20e | [
"Apache-2.0"
] | null | null | null | nautobot/virtualization/filters.py | susanhooks/nautobot | bc3ef5958f0d5decb0be763342c790f26ff1e20e | [
"Apache-2.0"
] | null | null | null | nautobot/virtualization/filters.py | susanhooks/nautobot | bc3ef5958f0d5decb0be763342c790f26ff1e20e | [
"Apache-2.0"
] | null | null | null | import django_filters
from django.db.models import Q
from nautobot.dcim.models import DeviceRole, Platform, Region, Site
from nautobot.extras.filters import (
CustomFieldModelFilterSet,
LocalContextFilterSet,
NautobotFilterSet,
StatusModelFilterSetMixin,
)
from nautobot.tenancy.filters import TenancyFi... | 31.36087 | 117 | 0.656176 |
0d5685372227ee9bb94fd7364e7b1a20ea775fd1 | 389 | py | Python | pac_backup/migrations/0012_auto_20190717_0136.py | jakariapervez/cmis6 | de279e5c586a77745ddd3d471599784606d50d15 | [
"MIT"
] | null | null | null | pac_backup/migrations/0012_auto_20190717_0136.py | jakariapervez/cmis6 | de279e5c586a77745ddd3d471599784606d50d15 | [
"MIT"
] | 7 | 2021-06-04T23:45:15.000Z | 2022-03-12T00:44:14.000Z | pac_backup/migrations/0012_auto_20190717_0136.py | jakariapervez/cmis6 | de279e5c586a77745ddd3d471599784606d50d15 | [
"MIT"
] | null | null | null | # Generated by Django 2.0.3 on 2019-07-16 19:36
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('pac', '0011_auto_20190715_2238'),
]
operations = [
migrations.RenameField(
model_name='budget_allocation',
old_name='Dpp_all... | 20.473684 | 47 | 0.611825 |
b31c550006518618ee361215b82204f6a6078a74 | 1,044 | py | Python | tests/test_storage.py | docker-swing/swing-server | 48ee777f1464b45cfb9d316f728b4b84a64ecd3d | [
"Apache-2.0"
] | 1 | 2021-06-06T11:56:49.000Z | 2021-06-06T11:56:49.000Z | tests/test_storage.py | docker-swing/swing-server | 48ee777f1464b45cfb9d316f728b4b84a64ecd3d | [
"Apache-2.0"
] | null | null | null | tests/test_storage.py | docker-swing/swing-server | 48ee777f1464b45cfb9d316f728b4b84a64ecd3d | [
"Apache-2.0"
] | null | null | null | import unittest
from werkzeug.datastructures import FileStorage
from swing_server.storage import LocalStorage
from helpers import create_test_zip, get_fixtures_path
class StorgeTestCase(unittest.TestCase):
storage = None
release_id = 15
@classmethod
def setUpClass(cls):
cls.storage = LocalSt... | 28.216216 | 67 | 0.70977 |
0851212da03eed2b1d59aeb9e90310f83027b4a0 | 717 | py | Python | appengine/cr-buildbucket/tokens.py | xswz8015/infra | f956b78ce4c39cc76acdda47601b86794ae0c1ba | [
"BSD-3-Clause"
] | null | null | null | appengine/cr-buildbucket/tokens.py | xswz8015/infra | f956b78ce4c39cc76acdda47601b86794ae0c1ba | [
"BSD-3-Clause"
] | 4 | 2022-03-17T18:58:21.000Z | 2022-03-17T18:58:22.000Z | appengine/cr-buildbucket/tokens.py | xswz8015/infra | f956b78ce4c39cc76acdda47601b86794ae0c1ba | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2018 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.
"""Provides functions for handling tokens."""
import os
from components.auth import b64
from go.chromium.org.luci.buildbucket.proto import token_pb2
def g... | 29.875 | 72 | 0.754533 |
3969360358228723848deae46e6ffe89a7233775 | 11,639 | py | Python | optimize_images/argument_parser.py | Serempre/optimize-images | e64176fa2d09d6cfee6eed5ef46de9a8a5f3332f | [
"MIT"
] | null | null | null | optimize_images/argument_parser.py | Serempre/optimize-images | e64176fa2d09d6cfee6eed5ef46de9a8a5f3332f | [
"MIT"
] | null | null | null | optimize_images/argument_parser.py | Serempre/optimize-images | e64176fa2d09d6cfee6eed5ef46de9a8a5f3332f | [
"MIT"
] | null | null | null | # encoding: utf-8
import os
import platform
import re
import sys
from argparse import ArgumentParser
import PIL # it exists, was checked on main
import piexif
from optimize_images import __version__
from optimize_images.constants import DEFAULT_QUALITY, SUPPORTED_FORMATS
def get_version_info() -> str:
""" Get ... | 45.643137 | 87 | 0.619899 |
3b80250e0aecd83f6bf9815d3ee42adb8c202c7e | 75 | py | Python | traptor/version.py | istresearch/traptor | 8aad9e5045d24a5e73c3d5d99cf300f88b930d17 | [
"MIT"
] | 26 | 2015-12-10T16:32:41.000Z | 2021-03-27T18:28:03.000Z | traptor/version.py | istresearch/traptor | 8aad9e5045d24a5e73c3d5d99cf300f88b930d17 | [
"MIT"
] | 42 | 2015-12-10T17:29:24.000Z | 2021-03-25T14:37:34.000Z | traptor/version.py | istresearch/traptor | 8aad9e5045d24a5e73c3d5d99cf300f88b930d17 | [
"MIT"
] | 4 | 2015-12-27T12:31:31.000Z | 2019-11-11T16:58:35.000Z | __version__ = '4.0.11'
if __name__ == '__main__':
print(__version__)
| 12.5 | 26 | 0.653333 |
bb049a9d58ee15b787f14639306fa8dcef7f4515 | 7,527 | py | Python | devbox/etc/.vim/bundle/jedi-vim/jedi/test/test_api/test_call_signatures.py | turiphro/dockerfiles | d87bcadde7f2e284da3edad891112e4ec59e29df | [
"MIT"
] | 1 | 2015-11-06T02:36:26.000Z | 2015-11-06T02:36:26.000Z | test/test_api/test_call_signatures.py | idobatter/jedi | e66f2d8f4b5fef2f304957c7936884455d2b3433 | [
"MIT"
] | null | null | null | test/test_api/test_call_signatures.py | idobatter/jedi | e66f2d8f4b5fef2f304957c7936884455d2b3433 | [
"MIT"
] | null | null | null | from textwrap import dedent
import inspect
from ..helpers import TestCase
from jedi import Script
from jedi import cache
from jedi._compatibility import is_py33
class TestCallSignatures(TestCase):
def _run(self, source, expected_name, expected_index=0, line=None, column=None):
signatures = Script(source,... | 28.95 | 84 | 0.534874 |
9652df4e7d6524e0437936f23a54caa25270ce14 | 2,029 | py | Python | handy/hack/video2txt.py | Al3xChen/handy | a4af40fad2e75876ecd1b5918f7ca5c325ae281c | [
"MIT"
] | 5 | 2018-04-03T10:24:04.000Z | 2020-01-16T08:04:12.000Z | handy/hack/video2txt.py | deep2cv/handy | a4af40fad2e75876ecd1b5918f7ca5c325ae281c | [
"MIT"
] | 1 | 2021-03-19T10:32:17.000Z | 2021-03-19T10:32:17.000Z | handy/hack/video2txt.py | Al3xChen/handy | a4af40fad2e75876ecd1b5918f7ca5c325ae281c | [
"MIT"
] | 1 | 2020-07-20T02:09:12.000Z | 2020-07-20T02:09:12.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# created by yaochao at 2019/3/28
# https://www.geeksforgeeks.org/extract-images-from-video-in-python/
import cv2
from PIL import Image
import numpy as np
import time
import sys
import os
abc = '@MWNHB8$06XFVYZ27>1jli!;:,. '
l = 256 / len(abc)
def remove_transparency(im... | 24.154762 | 83 | 0.576639 |
9c1489c678c20796dc1ee845c26a9e523333f9d7 | 1,963 | py | Python | plugins/recorded_future/komand_recorded_future/actions/lookup_entity_list/schema.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | 46 | 2019-06-05T20:47:58.000Z | 2022-03-29T10:18:01.000Z | plugins/recorded_future/komand_recorded_future/actions/lookup_entity_list/schema.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | 386 | 2019-06-07T20:20:39.000Z | 2022-03-30T17:35:01.000Z | plugins/recorded_future/komand_recorded_future/actions/lookup_entity_list/schema.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | 43 | 2019-07-09T14:13:58.000Z | 2022-03-28T12:04:46.000Z | # GENERATED BY KOMAND SDK - DO NOT EDIT
import insightconnect_plugin_runtime
import json
class Component:
DESCRIPTION = "This action is used to fetch a specified entity list by ID"
class Input:
ENTITY_LIST_ID = "entity_list_id"
class Output:
ENTITIES = "entities"
class LookupEntityListInput(... | 20.237113 | 86 | 0.512481 |
0543e5621cfeeab65aa596bbb6f0e9138af4f80f | 5,260 | py | Python | netbox/wireless/models.py | cybarox/netbox | ea197eff5f4fe925bb354d1375912decd81752bd | [
"Apache-2.0"
] | null | null | null | netbox/wireless/models.py | cybarox/netbox | ea197eff5f4fe925bb354d1375912decd81752bd | [
"Apache-2.0"
] | null | null | null | netbox/wireless/models.py | cybarox/netbox | ea197eff5f4fe925bb354d1375912decd81752bd | [
"Apache-2.0"
] | null | null | null | from django.core.exceptions import ValidationError
from django.db import models
from django.urls import reverse
from mptt.models import MPTTModel, TreeForeignKey
from dcim.choices import LinkStatusChoices
from dcim.constants import WIRELESS_IFACE_TYPES
from netbox.models import NestedGroupModel, NetBoxModel
from .choi... | 26.039604 | 110 | 0.629087 |
aafa515302049dde1246a1679888c7454bcd2838 | 8,100 | py | Python | auto/python/mapping.py | ACLeighner/AirSim | a4852eb01772c6bef45e481754e8b84fd32caef6 | [
"MIT"
] | null | null | null | auto/python/mapping.py | ACLeighner/AirSim | a4852eb01772c6bef45e481754e8b84fd32caef6 | [
"MIT"
] | null | null | null | auto/python/mapping.py | ACLeighner/AirSim | a4852eb01772c6bef45e481754e8b84fd32caef6 | [
"MIT"
] | null | null | null | import rospy
import tf2_ros
import tf2_geometry_msgs
import cv2
import numpy as np
import math
import struct
from cv_bridge import CvBridge
from sensor_msgs.msg import Image, CameraInfo, PointCloud2, PointField
from sensor_msgs import point_cloud2
from tf2_msgs.msg import TFMessage
from geometry_msgs.msg import PoseSt... | 35.526316 | 142 | 0.729506 |
516c0b650239743addea5928d3257bf39545173a | 1,449 | py | Python | Auto-Fill-Google-Forms/test.py | Aayush-hub/Amazing-Python-Scripts | 5488454b16fa969d32ad7a56618e62e64291c052 | [
"MIT"
] | 3 | 2021-01-14T13:54:22.000Z | 2021-11-15T11:26:51.000Z | Auto-Fill-Google-Forms/test.py | Aayush-hub/Amazing-Python-Scripts | 5488454b16fa969d32ad7a56618e62e64291c052 | [
"MIT"
] | 1 | 2021-02-24T02:06:21.000Z | 2021-02-24T02:06:21.000Z | Auto-Fill-Google-Forms/test.py | Aayush-hub/Amazing-Python-Scripts | 5488454b16fa969d32ad7a56618e62e64291c052 | [
"MIT"
] | 1 | 2021-02-22T18:47:39.000Z | 2021-02-22T18:47:39.000Z | import csv
import time
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
inputName = '/html/body/div/div[2]/form/div[2]/div/div[2]/div[1]/div/div/div[2]/div/div[1]/div/div[1]/input'
inputEmailID = '/html/body/div/div[2]/form/div[2]/div/div[2]/div[2]/div/div/div[2]/div/div[1]/div/div[1]/in... | 32.2 | 115 | 0.694962 |
fc8292457be8a240f4b55e8c50212385853abb73 | 1,190 | py | Python | profiles_api/serializersCustom.py | HutahCode/django-rest-api | 98a312dfd96868caebc681a1530e0f36e2b929c5 | [
"MIT"
] | null | null | null | profiles_api/serializersCustom.py | HutahCode/django-rest-api | 98a312dfd96868caebc681a1530e0f36e2b929c5 | [
"MIT"
] | 6 | 2020-06-06T01:01:11.000Z | 2021-06-10T19:37:22.000Z | profiles_api/serializersCustom.py | HutahCode/django-rest-api | 98a312dfd96868caebc681a1530e0f36e2b929c5 | [
"MIT"
] | null | null | null | from rest_framework import serializers
from profiles_api import models
class HelloSerializer(serializers.Serializer):
"""Serializers a name field for testing our APIView"""
name = serializers.CharField(max_length=10)
class UserProfileSerializer(serializers.ModelSerializer):
"""Serializes a user profile... | 27.674419 | 68 | 0.62521 |
502f62fa21b037997e2cf61197097fdf04dcff11 | 607 | py | Python | collectors/pubmed/pmid_extractor.py | OpenScienceFramework/citations | 3679ef4a1746a287061186078ce4b9144afe9083 | [
"Apache-2.0"
] | 4 | 2015-05-20T15:48:35.000Z | 2021-06-24T17:04:51.000Z | collectors/pubmed/pmid_extractor.py | OpenScienceFramework/citations | 3679ef4a1746a287061186078ce4b9144afe9083 | [
"Apache-2.0"
] | null | null | null | collectors/pubmed/pmid_extractor.py | OpenScienceFramework/citations | 3679ef4a1746a287061186078ce4b9144afe9083 | [
"Apache-2.0"
] | 1 | 2015-01-10T13:02:45.000Z | 2015-01-10T13:02:45.000Z | # script for grabbing PMID's from Pubmed's open access articles in .nxml format
import glob
from lxml import etree
# grab every article in every journal directory
# @todo: modularize the path
articles = glob.glob('/path/to/journals/*/*.nxml')
# for every article found, write pmids to pmid_list.txt
# @todo: modularize ... | 40.466667 | 79 | 0.672158 |
12d915e133640a37e775ad7d84a4c05b0eee2709 | 543 | py | Python | app/streamy/views/home.py | carbn/streamy | 59f3b2ccc04589c25d9e3fddbb36da6a9284df07 | [
"MIT"
] | 2 | 2021-09-18T10:50:44.000Z | 2021-09-18T13:39:08.000Z | app/streamy/views/home.py | carbn/streamy | 59f3b2ccc04589c25d9e3fddbb36da6a9284df07 | [
"MIT"
] | 5 | 2019-12-06T15:04:47.000Z | 2021-06-09T17:36:52.000Z | app/streamy/views/home.py | carbn/streamy | 59f3b2ccc04589c25d9e3fddbb36da6a9284df07 | [
"MIT"
] | null | null | null | from datetime import timedelta
from django.http import HttpResponse, HttpResponseServerError
from django.shortcuts import render
from django.utils import timezone
from ..models import Stream
def view(request):
# todo: should not duplicate this filter in the stream model
live_streams = Stream.objects.filter(... | 33.9375 | 137 | 0.769797 |
c570a7889a6e53b2b63dff125fe433a971431fc1 | 16,276 | py | Python | yolov3/test.py | kpzaolod6000/wfm | f20fb81f5ac0210818ff073f197ad187340d70d5 | [
"MIT"
] | 3 | 2022-01-14T07:54:52.000Z | 2022-02-08T19:55:00.000Z | yolov3/test.py | kpzaolod6000/wfm | f20fb81f5ac0210818ff073f197ad187340d70d5 | [
"MIT"
] | null | null | null | yolov3/test.py | kpzaolod6000/wfm | f20fb81f5ac0210818ff073f197ad187340d70d5 | [
"MIT"
] | 3 | 2021-12-26T03:05:06.000Z | 2022-01-14T07:54:56.000Z | import argparse
import json
import os
from pathlib import Path
from threading import Thread
import numpy as np
import torch
import yaml
from tqdm import tqdm
from models.experimental import attempt_load
from utils.datasets import create_dataloader
from utils.general import coco80_to_coco91_class, check_dataset, check... | 48.296736 | 120 | 0.571762 |
80ac0f149a5b88eca4fe5137bf607392f29bc925 | 17,833 | py | Python | rpatool.py | xTrayambak/Doki-Doki-Modding-Tool | 9812a8674c64c08d2cdd0bb982b52d961e56169b | [
"MIT"
] | null | null | null | rpatool.py | xTrayambak/Doki-Doki-Modding-Tool | 9812a8674c64c08d2cdd0bb982b52d961e56169b | [
"MIT"
] | null | null | null | rpatool.py | xTrayambak/Doki-Doki-Modding-Tool | 9812a8674c64c08d2cdd0bb982b52d961e56169b | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from __future__ import print_function
import sys
import os
import codecs
import pickle
import errno
import random
if sys.version_info[0] >= 3:
def _unicode(text):
return text
def _printable(text):
return text
def _unmangle(data):
return data.encode('latin1'... | 39.628889 | 227 | 0.605282 |
326da99c35be9fa61e09b77651556a78d6a8a5d6 | 9,742 | py | Python | pyconde/accounts/tests.py | EuroPython/djep | afcccbdda483e5f6962ac97f0dc4c4c5ea67fd21 | [
"BSD-3-Clause"
] | 5 | 2015-01-02T14:33:14.000Z | 2021-08-03T10:19:07.000Z | pyconde/accounts/tests.py | EuroPython/djep | afcccbdda483e5f6962ac97f0dc4c4c5ea67fd21 | [
"BSD-3-Clause"
] | null | null | null | pyconde/accounts/tests.py | EuroPython/djep | afcccbdda483e5f6962ac97f0dc4c4c5ea67fd21 | [
"BSD-3-Clause"
] | 3 | 2015-08-30T09:45:03.000Z | 2017-04-08T12:15:22.000Z | from __future__ import print_function
import json
from django import template
from django.contrib.auth.models import User
from django.core.exceptions import ValidationError
from django.test import TestCase, TransactionTestCase
from .templatetags import account_tags
from . import forms
from . import models
from . imp... | 36.62406 | 145 | 0.641244 |
f45d9de2c367e08cbee80963d56dd2356f73baf1 | 224 | py | Python | akashrajput25/Some_py_prog/str_rep.py | TechGirl007/Hacktoberfest-2024 | 5d7cbfc8552dd6fb0eebbdc7353c699748b1b51d | [
"MIT"
] | 40 | 2021-09-25T04:50:35.000Z | 2021-11-08T12:47:52.000Z | akashrajput25/Some_py_prog/str_rep.py | TechGirl007/Hacktoberfest-2024 | 5d7cbfc8552dd6fb0eebbdc7353c699748b1b51d | [
"MIT"
] | 18 | 2021-09-26T05:50:29.000Z | 2021-10-05T07:03:22.000Z | akashrajput25/Some_py_prog/str_rep.py | TechGirl007/Hacktoberfest-2024 | 5d7cbfc8552dd6fb0eebbdc7353c699748b1b51d | [
"MIT"
] | 213 | 2021-09-24T06:27:35.000Z | 2021-10-31T17:59:38.000Z | string="He is a good boy and he is doing coding"
#print(string.replace(" ",""))
#print(string.replace("is","'s",2))
print(string.find("is",5))
print(string.center(len(string)+6 ,"*"))
str2="string"
str2+="jhon"
print(str2 )
| 24.888889 | 48 | 0.660714 |
f2ed522db701560c3160a38dd3ece99b8add02d7 | 4,921 | py | Python | policyhandler/pdp_api/policy_utils.py | alex-sh2020/dcaegen2-platform-policy-handler | e969b079e331cc32b1ca361c49ee7b56e43900a7 | [
"Apache-2.0",
"CC-BY-4.0"
] | 2 | 2020-07-14T18:54:07.000Z | 2020-07-14T19:16:06.000Z | policyhandler/pdp_api/policy_utils.py | alex-sh2020/dcaegen2-platform-policy-handler | e969b079e331cc32b1ca361c49ee7b56e43900a7 | [
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | policyhandler/pdp_api/policy_utils.py | alex-sh2020/dcaegen2-platform-policy-handler | e969b079e331cc32b1ca361c49ee7b56e43900a7 | [
"Apache-2.0",
"CC-BY-4.0"
] | 2 | 2020-07-14T18:53:46.000Z | 2021-10-15T16:55:54.000Z | # ================================================================================
# Copyright (c) 2019-2020 AT&T Intellectual Property. All rights reserved.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not... | 37.853846 | 98 | 0.518391 |
cd2ee7b81c89226857cc9f799a87ba3e97137275 | 3,256 | py | Python | lib/pybtex-0.19/pybtex/database/input/__init__.py | cabeen/bibfmt | a2607506f15249f8e0ee900db103d57afec7dec8 | [
"MIT"
] | 1 | 2021-02-20T19:53:48.000Z | 2021-02-20T19:53:48.000Z | lib/pybtex-0.19/pybtex/database/input/__init__.py | cabeen/bibfmt | a2607506f15249f8e0ee900db103d57afec7dec8 | [
"MIT"
] | null | null | null | lib/pybtex-0.19/pybtex/database/input/__init__.py | cabeen/bibfmt | a2607506f15249f8e0ee900db103d57afec7dec8 | [
"MIT"
] | null | null | null | # Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Andrey Golovizin
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to ... | 39.707317 | 110 | 0.701781 |
e3bca82ebe561b3cc4059f6b51f628bffedc2f2c | 863 | py | Python | grandpybot_app/rhetoric.py | screw-pack/grandpybot | 68b0094427ee89d15ec2488ad36a712bd0a95ecb | [
"MIT"
] | null | null | null | grandpybot_app/rhetoric.py | screw-pack/grandpybot | 68b0094427ee89d15ec2488ad36a712bd0a95ecb | [
"MIT"
] | null | null | null | grandpybot_app/rhetoric.py | screw-pack/grandpybot | 68b0094427ee89d15ec2488ad36a712bd0a95ecb | [
"MIT"
] | null | null | null | import re
import json
from random import choice
class Rhetoric():
@staticmethod
def parse_entry(entry):
"""Parses a string to isolate keywords"""
with open('grandpybot_app/data/unwanted.json') as data:
unwanted = json.load(data)
entry = re.split(r'\W+|\d+', entry.lower())
... | 28.766667 | 67 | 0.584009 |
bb6a2b0a2b2c676367d67830d833897440fd3d52 | 13,266 | py | Python | nova-19.0.1/nova/tests/unit/api/openstack/compute/test_availability_zone.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 1 | 2016-07-18T22:05:01.000Z | 2016-07-18T22:05:01.000Z | nova-19.0.1/nova/tests/unit/api/openstack/compute/test_availability_zone.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 5 | 2019-08-14T06:46:03.000Z | 2021-12-13T20:01:25.000Z | nova-19.0.1/nova/tests/unit/api/openstack/compute/test_availability_zone.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 2 | 2020-03-15T01:24:15.000Z | 2020-07-22T20:34:26.000Z | # Copyright 2012 IBM Corp.
#
# 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 t... | 42.248408 | 79 | 0.548621 |
be2bf0f8a47e5be59cf19823c6152d6353f181e2 | 266 | py | Python | tosh/commands/exit.py | javitonino/tosh | e096ee435264849ab644c6b27d643352446d2b2a | [
"BSD-3-Clause"
] | 1 | 2017-09-23T09:30:49.000Z | 2017-09-23T09:30:49.000Z | tosh/commands/exit.py | javitonino/tosh | e096ee435264849ab644c6b27d643352446d2b2a | [
"BSD-3-Clause"
] | null | null | null | tosh/commands/exit.py | javitonino/tosh | e096ee435264849ab644c6b27d643352446d2b2a | [
"BSD-3-Clause"
] | null | null | null | """Command to open standby connections to servers in all clouds."""
import sys
from ..command import Command
class ExitCommand(Command):
"""Closes tosh."""
title = 'Bye bye'
command = 'exit'
async def _run(self):
self._tosh._cli.exit()
| 16.625 | 67 | 0.646617 |
ffa462e4b8b324e7daac54ae608de08f1d52ca3a | 409 | py | Python | tests/test_misc_usage.py | kerri-hicks/proselint | 12efe888042703ba409b51de660ed423622b2ad2 | [
"BSD-3-Clause"
] | 1 | 2018-10-25T22:39:32.000Z | 2018-10-25T22:39:32.000Z | tests/test_misc_usage.py | kerri-hicks/proselint | 12efe888042703ba409b51de660ed423622b2ad2 | [
"BSD-3-Clause"
] | 50 | 2021-05-19T17:00:56.000Z | 2022-03-28T11:06:11.000Z | tests/test_misc_usage.py | carlsmedstad/proselint | ae2161b5cf0a521819eba48206aafdff32522862 | [
"BSD-3-Clause"
] | null | null | null | """Tests for misc.usage check."""
from __future__ import absolute_import
from .check import Check
from proselint.checks.misc import usage as chk
class TestCheck(Check):
"""The test class for misc.usage."""
__test__ = True
@property
def this_check(self):
"""Boilerplate."""
return ch... | 18.590909 | 46 | 0.643032 |
a8ede825617087a3312729678b09ba57130d68e2 | 4,549 | py | Python | ui_tests/exporter/pages/f680_additional_information_page.py | django-doctor/lite-frontend | 330ff9575fd22d7c4c42698ac2d653244e6180d6 | [
"MIT"
] | 1 | 2021-10-16T16:36:58.000Z | 2021-10-16T16:36:58.000Z | ui_tests/exporter/pages/f680_additional_information_page.py | django-doctor/lite-frontend | 330ff9575fd22d7c4c42698ac2d653244e6180d6 | [
"MIT"
] | 45 | 2020-08-11T14:37:46.000Z | 2022-03-29T17:03:02.000Z | ui_tests/exporter/pages/f680_additional_information_page.py | django-doctor/lite-frontend | 330ff9575fd22d7c4c42698ac2d653244e6180d6 | [
"MIT"
] | 3 | 2021-02-01T06:26:19.000Z | 2022-02-21T23:02:46.000Z | from selenium.webdriver.remote.webdriver import WebDriver
from tests_common import functions
from ui_tests.exporter.pages.BasePage import BasePage
class F680AdditionalInformationPage(BasePage):
DATE_DAY_ID = "day"
DATE_MONTH_ID = "month"
DATE_YEAR_ID = "year"
# Summary list buttons
EXPEDITED_ID =... | 47.884211 | 118 | 0.773796 |
2458b63d09e90def01cc02c74c023d0da1a071cb | 6,925 | py | Python | intern/service/boss/v1/tests/test_metadata.py | neurodata-dev/intern | 8a685dda17f6bb9420395f80ce012d8b3a04e0dc | [
"Apache-2.0"
] | 15 | 2017-01-13T23:06:38.000Z | 2021-09-22T11:33:02.000Z | intern/service/boss/v1/tests/test_metadata.py | neurodata-dev/intern | 8a685dda17f6bb9420395f80ce012d8b3a04e0dc | [
"Apache-2.0"
] | 49 | 2017-04-26T13:21:26.000Z | 2021-11-16T14:03:58.000Z | intern/service/boss/v1/tests/test_metadata.py | neurodata-dev/intern | 8a685dda17f6bb9420395f80ce012d8b3a04e0dc | [
"Apache-2.0"
] | 18 | 2017-02-17T23:12:37.000Z | 2021-09-27T08:53:32.000Z | # Copyright 2016 The Johns Hopkins University Applied Physics Laboratory
#
# 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... | 35.880829 | 101 | 0.673502 |
810e9f8aa2b955d6da85772b0f45fa732e2328f9 | 17,422 | py | Python | HLTrigger/Configuration/test/OnLine_HLT_Fake2.py | WilliamKorcari/cmssw | c9e2d2d6575971954ce80966542cc5e95e4a8a77 | [
"Apache-2.0"
] | null | null | null | HLTrigger/Configuration/test/OnLine_HLT_Fake2.py | WilliamKorcari/cmssw | c9e2d2d6575971954ce80966542cc5e95e4a8a77 | [
"Apache-2.0"
] | null | null | null | HLTrigger/Configuration/test/OnLine_HLT_Fake2.py | WilliamKorcari/cmssw | c9e2d2d6575971954ce80966542cc5e95e4a8a77 | [
"Apache-2.0"
] | 1 | 2020-11-06T14:49:52.000Z | 2020-11-06T14:49:52.000Z | # hltGetConfiguration --full --data /dev/CMSSW_11_3_0/Fake2 --type Fake2 --unprescale --process HLTFake2 --globaltag auto:run2_hlt_Fake2 --input file:RelVal_Raw_Fake2_DATA.root
# /dev/CMSSW_11_3_0/Fake2/V4 (CMSSW_11_3_0_pre1)
import FWCore.ParameterSet.Config as cms
process = cms.Process( "HLTFake2" )
process.HLTCo... | 42.596577 | 231 | 0.723051 |
77ab8e2c3b8a913bad32cb7ee8548af8079a6ea1 | 1,270 | py | Python | examples/ibm.py | VirtueQuantumCloud/projectqX | fa484fe037a3a1772127bbd00fe4628ddba34611 | [
"Apache-2.0"
] | null | null | null | examples/ibm.py | VirtueQuantumCloud/projectqX | fa484fe037a3a1772127bbd00fe4628ddba34611 | [
"Apache-2.0"
] | null | null | null | examples/ibm.py | VirtueQuantumCloud/projectqX | fa484fe037a3a1772127bbd00fe4628ddba34611 | [
"Apache-2.0"
] | null | null | null | import projectq.setups.ibm
from projectq.backends import IBMBackend
from projectq.ops import Measure, Entangle
from projectq import MainEngine
def run_entangle(eng, num_qubits=5):
"""
Runs an entangling operation on the provided compiler engine.
Args:
eng (MainEngine): Main compiler engine to use... | 28.222222 | 71 | 0.673228 |
f64c6ab7f6e36bf7679b8e6652f68eaedb1efce2 | 3,237 | py | Python | source/tests/lineFollow_color_test.py | nikhilrj/CARDS | 509815f23c11881e6444308fa1014aed6a1af358 | [
"MIT"
] | null | null | null | source/tests/lineFollow_color_test.py | nikhilrj/CARDS | 509815f23c11881e6444308fa1014aed6a1af358 | [
"MIT"
] | null | null | null | source/tests/lineFollow_color_test.py | nikhilrj/CARDS | 509815f23c11881e6444308fa1014aed6a1af358 | [
"MIT"
] | null | null | null | import RPi.GPIO as GPIO
import sys,tty,termios,time
from Adafruit_MotorHAT import Adafruit_MotorHAT, Adafruit_DCMotor
import atexit
import os
# create a default object, no changes to I2C address or frequency
mh = Adafruit_MotorHAT(addr=0x60)
# recommended for auto-disabling motors on shutdown!
def turnOffMotors():
m... | 23.121429 | 120 | 0.697868 |
c349509acd2ee544ae7b494aecf35b0cba689852 | 3,885 | py | Python | tests/test_train.py | pmichel31415/fairseq | a73f3c46dafdc15c1b893798e43b846506db97a2 | [
"BSD-3-Clause"
] | 6 | 2019-05-29T05:38:04.000Z | 2021-06-16T08:14:14.000Z | tests/test_train.py | pmichel31415/fairseq | a73f3c46dafdc15c1b893798e43b846506db97a2 | [
"BSD-3-Clause"
] | null | null | null | tests/test_train.py | pmichel31415/fairseq | a73f3c46dafdc15c1b893798e43b846506db97a2 | [
"BSD-3-Clause"
] | 4 | 2020-04-09T09:53:06.000Z | 2022-03-31T06:00:14.000Z | # Copyright (c) 2017-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the license found in the LICENSE file in
# the root directory of this source tree. An additional grant of patent rights
# can be found in the PATENTS file in the same directory.
import contextlib
from io import S... | 34.078947 | 87 | 0.665637 |
f5b42f937db7ea633d9016f2100bfd1d257eb6e1 | 1,856 | py | Python | extrator.py | ianribas/extrator-an | 29d1d165e51b17492333c74f0bb4abb60e99782f | [
"MIT"
] | null | null | null | extrator.py | ianribas/extrator-an | 29d1d165e51b17492333c74f0bb4abb60e99782f | [
"MIT"
] | null | null | null | extrator.py | ianribas/extrator-an | 29d1d165e51b17492333c74f0bb4abb60e99782f | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: UTF-8
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
import bs4
import requests
import re
import urlparse
import os.path
import urllib
import sys
pat_d = re.compile("(\d\d)?/?(\d\d)?/?(\d\d\d\d)")
def format_date(string):
m = pat_d.search(string)
ret = ""
if m:... | 29.460317 | 155 | 0.58944 |
f24475190e24151d52f9be7ce726b6f326ddb18d | 4,800 | py | Python | manticore/abitypes.py | Srinivas11789/manticore | af3c6aada811833864efaccef7477f14e9b5e0dd | [
"Apache-2.0"
] | null | null | null | manticore/abitypes.py | Srinivas11789/manticore | af3c6aada811833864efaccef7477f14e9b5e0dd | [
"Apache-2.0"
] | null | null | null | manticore/abitypes.py | Srinivas11789/manticore | af3c6aada811833864efaccef7477f14e9b5e0dd | [
"Apache-2.0"
] | null | null | null | # Minimal ethereum type signature parser.
# This parses the signature and types used to calculate the function hash
import ply.yacc as yacc
# Lexer
# ------------------------------------------------------------
import ply.lex as lex
import re
# List of token names. This is always required
tokens = (
'COMMA',
... | 20.600858 | 372 | 0.56 |
6c9014ed612773ec70ec28b6cab786191259fab3 | 37 | py | Python | echopy/__init__.py | bas-acoustics/echopy | 21beba83537c60136c78925efa77f9c17e8a31be | [
"MIT"
] | 7 | 2019-05-22T05:51:28.000Z | 2021-01-14T11:20:19.000Z | echopy/__init__.py | bas-acoustics/echopy | 21beba83537c60136c78925efa77f9c17e8a31be | [
"MIT"
] | null | null | null | echopy/__init__.py | bas-acoustics/echopy | 21beba83537c60136c78925efa77f9c17e8a31be | [
"MIT"
] | 4 | 2020-12-11T15:34:11.000Z | 2021-01-08T15:19:48.000Z | name = "echopy"
__version__ = "0.0.2" | 18.5 | 21 | 0.648649 |
18da0587047d0476c42037860b663f3f5859401d | 33 | py | Python | tobii_calibration/__init__.py | tzolnai/tobii_calibration | 768ff4e672186840c8de655799a6b943daf35ea7 | [
"Apache-2.0"
] | null | null | null | tobii_calibration/__init__.py | tzolnai/tobii_calibration | 768ff4e672186840c8de655799a6b943daf35ea7 | [
"Apache-2.0"
] | null | null | null | tobii_calibration/__init__.py | tzolnai/tobii_calibration | 768ff4e672186840c8de655799a6b943daf35ea7 | [
"Apache-2.0"
] | null | null | null | from .tobii_calibration import *
| 16.5 | 32 | 0.818182 |
26628d462ee015937338ce0aacbc8d066a1ebcab | 2,919 | py | Python | bot.py | exante/telegram-bot-with-md-api | c7b535a1545cc390ecd87fcbd6d741af22ff0bfb | [
"MIT"
] | 11 | 2016-12-23T09:45:38.000Z | 2021-08-14T06:56:34.000Z | bot.py | exante/telegram-bot-with-md-api | c7b535a1545cc390ecd87fcbd6d741af22ff0bfb | [
"MIT"
] | null | null | null | bot.py | exante/telegram-bot-with-md-api | c7b535a1545cc390ecd87fcbd6d741af22ff0bfb | [
"MIT"
] | 11 | 2016-12-23T15:13:47.000Z | 2021-05-03T12:56:28.000Z | # -*- coding:utf-8 -*-
import re
from sys import path
from decimal import Decimal
from configparser import ConfigParser
from telegram import ParseMode, Emoji
from telegram.ext import Updater, CommandHandler, MessageHandler, Filters
from telegram.ext.dispatcher import run_async
from mdapi import DataStorage, MDApiCo... | 28.339806 | 96 | 0.643371 |
f114c5de633986353be8855340045945a9b9d907 | 1,568 | py | Python | nautobot/extras/apps.py | Kircheneer/nautobot | 2d305a2edaebd590b1d0e8c09394e123b8f7b61f | [
"Apache-2.0"
] | null | null | null | nautobot/extras/apps.py | Kircheneer/nautobot | 2d305a2edaebd590b1d0e8c09394e123b8f7b61f | [
"Apache-2.0"
] | null | null | null | nautobot/extras/apps.py | Kircheneer/nautobot | 2d305a2edaebd590b1d0e8c09394e123b8f7b61f | [
"Apache-2.0"
] | null | null | null | import logging
from django.db.utils import ProgrammingError
import graphene
from health_check.plugins import plugin_dir
from nautobot.core.apps import NautobotConfig
logger = logging.getLogger("nautobot.extras.apps")
class ExtrasConfig(NautobotConfig):
name = "nautobot.extras"
def ready(self):
s... | 33.361702 | 89 | 0.698342 |
c4386e34c008a7ef78e0b74000e1a7aab53f933c | 6,724 | py | Python | tests/test_async_tx_legacy.py | mkniewallner/edgedb-python | 2086b866d3c87c215eecf644b2393ddd857457e0 | [
"Apache-2.0"
] | 214 | 2019-01-19T03:56:10.000Z | 2022-03-31T01:37:33.000Z | tests/test_async_tx_legacy.py | mkniewallner/edgedb-python | 2086b866d3c87c215eecf644b2393ddd857457e0 | [
"Apache-2.0"
] | 120 | 2019-03-19T23:01:52.000Z | 2022-03-14T08:41:27.000Z | tests/test_async_tx_legacy.py | mkniewallner/edgedb-python | 2086b866d3c87c215eecf644b2393ddd857457e0 | [
"Apache-2.0"
] | 24 | 2019-04-29T22:41:10.000Z | 2021-11-15T00:28:01.000Z | #
# This source file is part of the EdgeDB open source project.
#
# Copyright 2016-present MagicStack Inc. and the EdgeDB 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... | 33.788945 | 77 | 0.542534 |
52bf5cec65e7d37799b7983fbec3668c9bca94d5 | 5,542 | py | Python | momepy/weights.py | PratyushTripathy/momepy | eac89eaff63dd6cb35dfd9a736981723ec77f496 | [
"MIT"
] | null | null | null | momepy/weights.py | PratyushTripathy/momepy | eac89eaff63dd6cb35dfd9a736981723ec77f496 | [
"MIT"
] | null | null | null | momepy/weights.py | PratyushTripathy/momepy | eac89eaff63dd6cb35dfd9a736981723ec77f496 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from distutils.version import LooseVersion
import libpysal
import numpy as np
import geopandas as gpd
GPD_08 = str(gpd.__version__) >= LooseVersion("0.8.0")
__all__ = ["DistanceBand", "sw_high"]
class DistanceBand:
"""
On demand distance-based spatial weights-l... | 32.792899 | 94 | 0.616925 |
2b4b066a92431ed2c83437af8d087124d3fd93a2 | 1,155 | py | Python | HttpTrigger/__init__.py | ruben69695/avengersofindra-azure-function | d62c83c23a45e17f33fbd96be0d3833e9fbf4d7d | [
"MIT"
] | 1 | 2021-06-24T07:07:20.000Z | 2021-06-24T07:07:20.000Z | HttpTrigger/__init__.py | ruben69695/avengersofindra-azure-function | d62c83c23a45e17f33fbd96be0d3833e9fbf4d7d | [
"MIT"
] | 6 | 2020-09-09T20:18:28.000Z | 2022-03-02T05:45:01.000Z | HttpTrigger/__init__.py | ruben69695/avengersofindra-azure-function | d62c83c23a45e17f33fbd96be0d3833e9fbf4d7d | [
"MIT"
] | null | null | null | import logging
import azure.functions as func
def main(req: func.HttpRequest) -> func.HttpResponse:
logging.info('Python HTTP trigger function processed a request. It returns an avenger')
superheroes = {
'esteban': 'La massa Esteban',
'ruben': 'Capitan Arrebola',
'javi'... | 29.615385 | 92 | 0.561905 |
0a4e932cd3e0c98c94284ee0310e6ecf881ceb76 | 3,203 | py | Python | test/parallel/test_mxnet1.py | Infi-zc/horovod | 94cd8561a21d449fc8c80c8fef422025b84dfc22 | [
"Apache-2.0"
] | 7,676 | 2019-02-12T02:57:22.000Z | 2022-03-31T21:05:40.000Z | test/parallel/test_mxnet1.py | Infi-zc/horovod | 94cd8561a21d449fc8c80c8fef422025b84dfc22 | [
"Apache-2.0"
] | 2,431 | 2019-02-12T01:34:21.000Z | 2022-03-31T21:43:38.000Z | test/parallel/test_mxnet1.py | Infi-zc/horovod | 94cd8561a21d449fc8c80c8fef422025b84dfc22 | [
"Apache-2.0"
] | 1,557 | 2019-02-12T07:52:15.000Z | 2022-03-31T21:05:43.000Z | # Copyright 2018 Uber Technologies, Inc. All Rights Reserved.
# Modifications copyright (C) 2020, NVIDIA CORPORATION. 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
#
# ... | 42.144737 | 101 | 0.705589 |
53ee791a4efc6d6e2563160e52fdb26f692ef713 | 16,755 | py | Python | build/lib/experiments/nmt/segment.py | neozhangthe1/coverage_model | 8717e0a1fdd67af16a279e6b9aecf562f31bcdce | [
"BSD-3-Clause"
] | null | null | null | build/lib/experiments/nmt/segment.py | neozhangthe1/coverage_model | 8717e0a1fdd67af16a279e6b9aecf562f31bcdce | [
"BSD-3-Clause"
] | null | null | null | build/lib/experiments/nmt/segment.py | neozhangthe1/coverage_model | 8717e0a1fdd67af16a279e6b9aecf562f31bcdce | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# coding=<utf-8>
import os
import sys
import argparse
import pickle
import traceback
import logging
import numpy
import time
from itertools import product
from experiments.nmt import RNNEncoderDecoder, prototype_state, parse_input, create_padded_batch
from experiments.nmt.sample import BeamSearc... | 38.428899 | 104 | 0.605073 |
1db420f7bd5d9047124261e4014cc5549b72d005 | 10,742 | py | Python | scripts/aviatrix_controller.py | jorgebonilla/quickstart-aviatrix-nextgentransithub | dd44733e0715bb06cd692c6b4817fd74e10ad2ee | [
"Apache-2.0"
] | null | null | null | scripts/aviatrix_controller.py | jorgebonilla/quickstart-aviatrix-nextgentransithub | dd44733e0715bb06cd692c6b4817fd74e10ad2ee | [
"Apache-2.0"
] | null | null | null | scripts/aviatrix_controller.py | jorgebonilla/quickstart-aviatrix-nextgentransithub | dd44733e0715bb06cd692c6b4817fd74e10ad2ee | [
"Apache-2.0"
] | null | null | null | import os, sys
import boto3
import json
import logging
from urllib.request import urlopen, URLError
from urllib.parse import urlencode
#Needed to load Aviatrix Python API.
from aviatrix3 import Aviatrix
#Needed for Lambda Custom call
import cfnresponse
import time
#logging configuration
logger = logging.getLogger()
lo... | 41.797665 | 381 | 0.670825 |
918ddf41b8590b39465b193846b788dae9f8ffcc | 2,014 | py | Python | py/src/datacentric/platform/logging/log.py | datacentricorg/datacentric | b9e2dedfac35759ea09bb5653095daba5861512e | [
"Apache-2.0"
] | 1 | 2019-08-08T01:27:47.000Z | 2019-08-08T01:27:47.000Z | py/src/datacentric/platform/logging/log.py | datacentricorg/datacentric | b9e2dedfac35759ea09bb5653095daba5861512e | [
"Apache-2.0"
] | null | null | null | py/src/datacentric/platform/logging/log.py | datacentricorg/datacentric | b9e2dedfac35759ea09bb5653095daba5861512e | [
"Apache-2.0"
] | null | null | null | from abc import ABC, abstractmethod
from typing import Optional
from datacentric.platform.logging.log_entry_type import LogEntryType
class Log(ABC):
verbosity: LogEntryType
"""Log verbosity is the highest log entry type displayed.
Verbosity can be modified at runtime to provide different levels of
ve... | 38 | 102 | 0.680238 |
1addd935a664891d45b878ec55dcf2c9e1e472a4 | 7,943 | py | Python | modin/experimental/engines/omnisci_on_ray/frame/partition_manager.py | ckw017/modin | e6efaab24f133d6999901fecd8b7414fce3e7f31 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | modin/experimental/engines/omnisci_on_ray/frame/partition_manager.py | ckw017/modin | e6efaab24f133d6999901fecd8b7414fce3e7f31 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | modin/experimental/engines/omnisci_on_ray/frame/partition_manager.py | ckw017/modin | e6efaab24f133d6999901fecd8b7414fce3e7f31 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Licensed to Modin Development Team under one or more contributor license agreements.
# See the NOTICE file distributed with this work for additional information regarding
# copyright ownership. The Modin Development Team licenses this file to you under the
# Apache License, Version 2.0 (the "License"); you may not u... | 37.29108 | 94 | 0.62596 |
3bb8254528cd8e7364f68a9a22e8d2e02591326e | 35,046 | py | Python | datalad/plugin/addurls.py | nicholsn/datalad | 6908a01d84a672ddd593550eb9680b389d46514f | [
"MIT"
] | null | null | null | datalad/plugin/addurls.py | nicholsn/datalad | 6908a01d84a672ddd593550eb9680b389d46514f | [
"MIT"
] | null | null | null | datalad/plugin/addurls.py | nicholsn/datalad | 6908a01d84a672ddd593550eb9680b389d46514f | [
"MIT"
] | null | null | null | # emacs: -*- mode: python; py-indent-offset: 4; tab-width: 4; indent-tabs-mode: nil -*-
# ex: set sts=4 ts=4 sw=4 noet:
# ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
#
# See COPYING file distributed along with the datalad package for the
# copyright and license terms.
#
# ## ### ##... | 37.362473 | 87 | 0.575472 |
08258bacf955034d9f6ecf67391d68bff83478c2 | 18,532 | py | Python | sdk/python/pulumi_aws/mediaconvert/queue.py | aamir-locus/pulumi-aws | 3e234b050129bde35d8e072a88bd608562f02142 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/mediaconvert/queue.py | aamir-locus/pulumi-aws | 3e234b050129bde35d8e072a88bd608562f02142 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/mediaconvert/queue.py | aamir-locus/pulumi-aws | 3e234b050129bde35d8e072a88bd608562f02142 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import... | 41.458613 | 189 | 0.638517 |
1aa728b515759aa307394f4a78a2af3bc66a0bd5 | 320 | py | Python | lib/stl/__about__.py | hdo/bCNC | c0c6489c80265f95b554e6566835874497cf969d | [
"MIT",
"BSD-3-Clause"
] | null | null | null | lib/stl/__about__.py | hdo/bCNC | c0c6489c80265f95b554e6566835874497cf969d | [
"MIT",
"BSD-3-Clause"
] | null | null | null | lib/stl/__about__.py | hdo/bCNC | c0c6489c80265f95b554e6566835874497cf969d | [
"MIT",
"BSD-3-Clause"
] | null | null | null | __package_name__ = 'numpy-stl'
__import_name__ = 'stl'
__version__ = '2.7.0'
__author__ = 'Rick van Hattem'
__author_email__ = 'Wolph@Wol.ph'
__description__ = ' '.join('''
Library to make reading, writing and modifying both binary and ascii STL files
easy.
'''.split())
__url__ = 'https://github.com/WoLpH/numpy-stl/'
| 26.666667 | 78 | 0.725 |
bacb707fd6393c1e992240237642bdd04415977b | 2,264 | py | Python | aiowintest/tests/protocol_test.py | hin/aiowintest | 6979033e0e27d0445af56c5729bd989c6aeb62c0 | [
"BSD-2-Clause"
] | 1 | 2020-08-15T19:21:33.000Z | 2020-08-15T19:21:33.000Z | aiowintest/tests/protocol_test.py | hin/aiowintest | 6979033e0e27d0445af56c5729bd989c6aeb62c0 | [
"BSD-2-Clause"
] | null | null | null | aiowintest/tests/protocol_test.py | hin/aiowintest | 6979033e0e27d0445af56c5729bd989c6aeb62c0 | [
"BSD-2-Clause"
] | null | null | null | import asynctest
from asynctest.mock import Mock
import pytest
from ..protocol import *
# Reuse test data from packet_test.py
from aiowintest.tests.packet_test import summary
class TestWintestProtocol(asynctest.TestCase):
def make_wintest(self):
loop = asyncio.get_event_loop()
wt = WintestProtoco... | 38.372881 | 104 | 0.493375 |
3917adaff80791516fabe294846d7c952c65d23d | 658 | py | Python | alerts/beam/__init__.py | isabella232/mirandum | 758286dfef5801747cade7902bc234d14b85de52 | [
"Apache-2.0"
] | 14 | 2016-04-30T00:00:02.000Z | 2022-03-31T14:52:37.000Z | alerts/beam/__init__.py | google/mirandum | 758286dfef5801747cade7902bc234d14b85de52 | [
"Apache-2.0"
] | 9 | 2016-05-03T12:30:09.000Z | 2018-09-10T01:46:02.000Z | alerts/beam/__init__.py | isabella232/mirandum | 758286dfef5801747cade7902bc234d14b85de52 | [
"Apache-2.0"
] | 11 | 2016-04-30T08:12:07.000Z | 2021-10-21T04:25:41.000Z | # Copyright 2016 Google 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 applica... | 41.125 | 75 | 0.746201 |
ff298ce59a508e76f2da0c74fe9587dbfe2b9caa | 40,266 | py | Python | plaid/models/__init__.py | Aky87/plaid-python | af56d445a9e0178b33fb0443f8399dd51c024fe1 | [
"MIT"
] | null | null | null | plaid/models/__init__.py | Aky87/plaid-python | af56d445a9e0178b33fb0443f8399dd51c024fe1 | [
"MIT"
] | null | null | null | plaid/models/__init__.py | Aky87/plaid-python | af56d445a9e0178b33fb0443f8399dd51c024fe1 | [
"MIT"
] | null | null | null | # flake8: noqa
# import all models into this package
# if you have many models here with many references from one model to another this may
# raise a RecursionError
# to avoid this, import only the models that you directly need like:
# from from plaid.model.pet import Pet
# or import this package, but before doing it,... | 74.705009 | 131 | 0.919312 |
7b5a3304140c8fbc006a590f26a516ee90cbf2a1 | 87 | py | Python | AsBuilts/meraki/apps.py | j-sulliman/meraki | 21fc6a63bc4c4c88fba37447c6d0aa99f7f05b99 | [
"BSD-3-Clause"
] | 1 | 2021-01-27T17:27:01.000Z | 2021-01-27T17:27:01.000Z | AsBuilts/meraki/apps.py | j-sulliman/meraki | 21fc6a63bc4c4c88fba37447c6d0aa99f7f05b99 | [
"BSD-3-Clause"
] | 1 | 2021-12-13T20:13:44.000Z | 2021-12-13T20:13:44.000Z | AsBuilts/meraki/apps.py | j-sulliman/meraki | 21fc6a63bc4c4c88fba37447c6d0aa99f7f05b99 | [
"BSD-3-Clause"
] | null | null | null | from django.apps import AppConfig
class MerakiConfig(AppConfig):
name = 'meraki'
| 14.5 | 33 | 0.747126 |
f53876fe689418205a44b20e8ebd8662eb434818 | 2,516 | py | Python | easylog.py | blm849/simplepersonallogging | 33dda410012c62cba6e184d880a085e41fb91067 | [
"MIT"
] | null | null | null | easylog.py | blm849/simplepersonallogging | 33dda410012c62cba6e184d880a085e41fb91067 | [
"MIT"
] | null | null | null | easylog.py | blm849/simplepersonallogging | 33dda410012c62cba6e184d880a085e41fb91067 | [
"MIT"
] | null | null | null | #############################################################################
#
# easylog.py
#
# Description:
#
# This program logs into an XLSX file
#
# History:
#
# 2020.02.16 Initial implementation. (BLM)
#
# Examples:
#
# To call the program, enter: pyt... | 28.590909 | 175 | 0.596979 |
72318fcd8faf3c9bedc77c0f535e9226ac88cd4a | 144 | py | Python | rick_db/conn/pg/json.py | oddbit-project/rick_db | 02910c071f3ad58fdd88b2a27bfdd2bc61497d42 | [
"MIT"
] | null | null | null | rick_db/conn/pg/json.py | oddbit-project/rick_db | 02910c071f3ad58fdd88b2a27bfdd2bc61497d42 | [
"MIT"
] | null | null | null | rick_db/conn/pg/json.py | oddbit-project/rick_db | 02910c071f3ad58fdd88b2a27bfdd2bc61497d42 | [
"MIT"
] | null | null | null | from psycopg2._json import Json
from psycopg2.extensions import register_adapter
# Enable dict-to-json conversion
register_adapter(dict, Json)
| 24 | 48 | 0.840278 |
20558bcbc8907385a67a61a8d1d408175e516c2a | 6,340 | py | Python | userbot/plugins/afk.py | userbotformadaragey/HardcoreUserbot | 2088c9978e08eec60a97e1faecbb7835759554c0 | [
"MIT"
] | null | null | null | userbot/plugins/afk.py | userbotformadaragey/HardcoreUserbot | 2088c9978e08eec60a97e1faecbb7835759554c0 | [
"MIT"
] | null | null | null | userbot/plugins/afk.py | userbotformadaragey/HardcoreUserbot | 2088c9978e08eec60a97e1faecbb7835759554c0 | [
"MIT"
] | null | null | null | """AFK Plugin for @UniBorg
Syntax: .afk REASON"""
import asyncio
import datetime
from datetime import datetime
from telethon import events
from telethon.tl import functions, types
global USER_AFK # pylint:disable=E0602
global afk_time # pylint:disable=E0602
global last_afk_message # pylint:disable=E0602
global afk... | 40.382166 | 177 | 0.608202 |
cf7c187134d516b777f9364cd9df512b5f5457a7 | 402 | py | Python | authors/apps/articles/migrations/0014_auto_20190121_1631.py | andela/Ah-backend-guardians | cc84c18f7c222bc69cf4a263a1c2296b6d335c8b | [
"BSD-3-Clause"
] | null | null | null | authors/apps/articles/migrations/0014_auto_20190121_1631.py | andela/Ah-backend-guardians | cc84c18f7c222bc69cf4a263a1c2296b6d335c8b | [
"BSD-3-Clause"
] | 32 | 2019-01-09T07:52:32.000Z | 2022-01-13T01:01:55.000Z | authors/apps/articles/migrations/0014_auto_20190121_1631.py | andela/Ah-backend-guardians | cc84c18f7c222bc69cf4a263a1c2296b6d335c8b | [
"BSD-3-Clause"
] | 3 | 2019-01-03T12:05:53.000Z | 2019-09-24T11:41:14.000Z | # Generated by Django 2.1.5 on 2019-01-21 16:31
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('articles', '0013_merge_20190121_1622'),
]
operations = [
migrations.AlterField(
model_name='article',
name='images',... | 21.157895 | 63 | 0.606965 |
36068bb5952fef29e3832263b328457777c97db8 | 333 | py | Python | 03032020/2.py | Daniil-C/prac | 0478db22651ede0c2b996d70a8fe588eb690c1e2 | [
"Apache-2.0"
] | null | null | null | 03032020/2.py | Daniil-C/prac | 0478db22651ede0c2b996d70a8fe588eb690c1e2 | [
"Apache-2.0"
] | null | null | null | 03032020/2.py | Daniil-C/prac | 0478db22651ede0c2b996d70a8fe588eb690c1e2 | [
"Apache-2.0"
] | null | null | null | from tkinter import *
F = Frame()
F.master.columnconfigure(0, weight=1)
F.master.rowconfigure(0, weight=1)
F.columnconfigure(0, weight=1)
F.columnconfigure(1, weight=2)
F.grid()
B1 = Button(master=F, text="Button1")
B2 = Button(master=F, text="Button2")
B1.grid(sticky="NEWS")
B2.grid(sticky="NEWS", column=1, row=0)... | 18.5 | 39 | 0.708709 |
b3ea1885100063bd47eff39369d0328514316563 | 897 | py | Python | jsoncommands.py | romanzabaleta/Azure-Ratecard-REST-API-Calls | 2fe76004938b2060b1e12b8c855abdc181f83d76 | [
"MIT"
] | null | null | null | jsoncommands.py | romanzabaleta/Azure-Ratecard-REST-API-Calls | 2fe76004938b2060b1e12b8c855abdc181f83d76 | [
"MIT"
] | null | null | null | jsoncommands.py | romanzabaleta/Azure-Ratecard-REST-API-Calls | 2fe76004938b2060b1e12b8c855abdc181f83d76 | [
"MIT"
] | null | null | null | import json
import subprocess
class jsoncmd():
def json(self):
output = str(subprocess.check_output(self, stderr=subprocess.STDOUT, shell=True))
output = output[output.find("{"):]
output = output[:output.rfind("}") + 1]
output = output.replace("\\r\\n", "")
output = output.... | 28.935484 | 89 | 0.567447 |
3637f6411c1e9b3d789d00ff013bf50dd3165498 | 6,375 | py | Python | var/spack/repos/builtin/packages/gmt/package.py | LiamBindle/spack | e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2,360 | 2017-11-06T08:47:01.000Z | 2022-03-31T14:45:33.000Z | var/spack/repos/builtin/packages/gmt/package.py | LiamBindle/spack | e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 13,838 | 2017-11-04T07:49:45.000Z | 2022-03-31T23:38:39.000Z | var/spack/repos/builtin/packages/gmt/package.py | LiamBindle/spack | e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1,793 | 2017-11-04T07:45:50.000Z | 2022-03-30T14:31:53.000Z | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Gmt(Package):
"""GMT (Generic Mapping Tools) is an open source collection of about 80
... | 40.605096 | 111 | 0.608941 |
0fe609b83770e124a654ab31099ebae63c52d0d2 | 2,357 | py | Python | real_time_signal.py | nekopuni/realtime_sound_plot | c7358869a349710dcd5b7b3b23dda7b24ee5a063 | [
"MIT"
] | 1 | 2019-09-15T10:36:17.000Z | 2019-09-15T10:36:17.000Z | real_time_signal.py | nekopuni/realtime_sound_plot | c7358869a349710dcd5b7b3b23dda7b24ee5a063 | [
"MIT"
] | null | null | null | real_time_signal.py | nekopuni/realtime_sound_plot | c7358869a349710dcd5b7b3b23dda7b24ee5a063 | [
"MIT"
] | null | null | null | import queue
from matplotlib.animation import FuncAnimation
import matplotlib.pyplot as plt
import numpy as np
import sounddevice as sd
from log import get_logger
logger = get_logger(__name__)
# TODO: should this be LIFO to reflect the latest state?
q = queue.Queue() # infinite FIFO queue
downsample = 10
window =... | 27.406977 | 76 | 0.616886 |
e29fdeb45e213a9a8debd457b914fb15e9f17ab5 | 599 | py | Python | AoC2019/02_1202_program_alarm/test_aoc201902.py | lustraka/puzzles | 6895050737976e8c566bc5076a979c17d4736537 | [
"Unlicense"
] | null | null | null | AoC2019/02_1202_program_alarm/test_aoc201902.py | lustraka/puzzles | 6895050737976e8c566bc5076a979c17d4736537 | [
"Unlicense"
] | null | null | null | AoC2019/02_1202_program_alarm/test_aoc201902.py | lustraka/puzzles | 6895050737976e8c566bc5076a979c17d4736537 | [
"Unlicense"
] | null | null | null | import pathlib
import pytest
import aoc201902 as aoc
PUZZLE_DIR = pathlib.Path(__file__).parent
@pytest.fixture
def example():
return aoc.parse('example.txt')
@pytest.fixture
def input():
return aoc.parse('input.txt', 12, 2)
def test_parse_example1(example):
"""Test that input is parsed properly"""
... | 23.96 | 64 | 0.686144 |
132115c62bf54a629784066d2727b09ee991bc66 | 4,170 | py | Python | backend/benefit/terms/api/v1/serializers.py | City-of-Helsinki/kesaseteli | 964f801c2dba72c4105b6e436b12b821b199d6d2 | [
"MIT"
] | 2 | 2021-05-10T09:28:35.000Z | 2021-05-17T12:15:34.000Z | backend/benefit/terms/api/v1/serializers.py | City-of-Helsinki/yjdh | 1c07576b456d2be9c3171363450ed46de2c1bbcb | [
"MIT"
] | 931 | 2021-05-21T15:24:35.000Z | 2022-03-31T20:07:40.000Z | backend/benefit/terms/api/v1/serializers.py | City-of-Helsinki/yjdh | 1c07576b456d2be9c3171363450ed46de2c1bbcb | [
"MIT"
] | 6 | 2021-07-06T11:07:02.000Z | 2022-02-07T12:42:21.000Z | from django.utils.translation import gettext_lazy as _
from rest_framework import serializers
from terms.models import (
ApplicantConsent,
ApplicantTermsApproval,
Terms,
TermsOfServiceApproval,
)
class ApplicantConsentSerializer(serializers.ModelSerializer):
class Meta:
model = ApplicantCo... | 32.578125 | 116 | 0.629976 |
557db66be3a1c47dccd1eb2384b1978a3d0678cb | 33,372 | py | Python | doc/ws_main.py | harshitgupta1337/trex-measure-killer-us | 7d0ca9cb33220384dd4341567ef47bb2b8d5c477 | [
"Apache-2.0"
] | null | null | null | doc/ws_main.py | harshitgupta1337/trex-measure-killer-us | 7d0ca9cb33220384dd4341567ef47bb2b8d5c477 | [
"Apache-2.0"
] | null | null | null | doc/ws_main.py | harshitgupta1337/trex-measure-killer-us | 7d0ca9cb33220384dd4341567ef47bb2b8d5c477 | [
"Apache-2.0"
] | null | null | null | #! /usr/bin/env python
# encoding: utf-8
# hhaim, 2014 (IL) base on WAF book
"""
call 'waf --targets=waf.pdf' or use 'waf list' to see the targets available
"""
VERSION='0.0.1'
APPNAME='wafdocs'
import os, re, shutil
import sys
import shlex
import subprocess
import json
import re
import tempfile
from waflib import L... | 34.690229 | 172 | 0.610512 |
7846ca864325ac7cf5a0a4781076a62258bda73d | 1,698 | py | Python | python/vowpalwabbit/__init__.py | Ark-kun/vowpal_wabbit | d811c93fa6adbb513729698202984e3662a3d8df | [
"BSD-3-Clause"
] | 4,332 | 2015-01-01T10:26:51.000Z | 2018-10-01T14:05:43.000Z | python/vowpalwabbit/__init__.py | chrinide/vowpal_wabbit | 40e1fef676ca6a461d71cf0631ab5c63d1af5d8a | [
"BSD-3-Clause"
] | 1,004 | 2015-01-01T12:00:54.000Z | 2018-09-30T22:13:42.000Z | python/vowpalwabbit/__init__.py | chrinide/vowpal_wabbit | 40e1fef676ca6a461d71cf0631ab5c63d1af5d8a | [
"BSD-3-Clause"
] | 1,182 | 2015-01-02T20:38:55.000Z | 2018-09-26T02:47:37.000Z | # -*- coding: utf-8 -*-
"""Python interfaces for VW"""
import importlib as _importlib
import warnings as _warnings
__all__ = [
"AbstractLabel",
"ActionScore",
"CBContinuousLabel",
"CBContinuousLabelElement",
"CBEvalLabel",
"CBLabel",
"CBLabelElement",
"CCBLabel",
"CCBLabelType",
... | 22.64 | 132 | 0.660188 |
83f35ba6d74ca09eabec0535bcfb17a4ab058e5c | 4,337 | py | Python | atom3d/datasets/msp/process.py | bfabiandev/atom3d | b2499ff743be2e851c286cabf64696682abffa44 | [
"MIT"
] | null | null | null | atom3d/datasets/msp/process.py | bfabiandev/atom3d | b2499ff743be2e851c286cabf64696682abffa44 | [
"MIT"
] | null | null | null | atom3d/datasets/msp/process.py | bfabiandev/atom3d | b2499ff743be2e851c286cabf64696682abffa44 | [
"MIT"
] | null | null | null | import csv
import os
import sys
from collections import defaultdict
import pymol as py
#Functions that filter data
#==========================
#Get rid of duplicate pdb, mut
def filter_dup_lines(lines):
new_lines = []
done = set()
for i in range(len(lines)):
if tuple(lines[i][:3]) in done:
... | 30.118056 | 105 | 0.584505 |
47f6df8a48c1705ad8dde9beb9dc5a0cc10e4177 | 15,408 | py | Python | torchspn/distributions.py | steven-lang/torchspn | 2f07b5b4a717f11642ee0e18be3f2a3362595169 | [
"MIT"
] | 7 | 2019-08-12T16:41:13.000Z | 2021-12-19T14:57:45.000Z | torchspn/distributions.py | steven-lang/torchspn | 2f07b5b4a717f11642ee0e18be3f2a3362595169 | [
"MIT"
] | null | null | null | torchspn/distributions.py | steven-lang/torchspn | 2f07b5b4a717f11642ee0e18be3f2a3362595169 | [
"MIT"
] | null | null | null | """
Module that contains a set of distributions with learnable parameters.
"""
from abc import ABC
import logging
import torch
import numpy as np
from torch import nn
from torch import distributions as dist
from torch.nn import functional as F
logger = logging.getLogger(__name__)
def dist_forward(distribution, x):
... | 33.064378 | 161 | 0.618575 |
1ba23da8263eea0173d22c9119f730e665f62be3 | 12,408 | py | Python | mmdet/core/bbox/assigners/max_kld_assigner.py | liuyanyi/mmdetection | d2003536af6f08cb9bd7a75e0444eef03ace4bb3 | [
"Apache-2.0"
] | null | null | null | mmdet/core/bbox/assigners/max_kld_assigner.py | liuyanyi/mmdetection | d2003536af6f08cb9bd7a75e0444eef03ace4bb3 | [
"Apache-2.0"
] | null | null | null | mmdet/core/bbox/assigners/max_kld_assigner.py | liuyanyi/mmdetection | d2003536af6f08cb9bd7a75e0444eef03ace4bb3 | [
"Apache-2.0"
] | null | null | null | from multiprocessing import Pool
import torch
from ..builder import BBOX_ASSIGNERS
from ..iou_calculators import build_iou_calculator
from .assign_result import AssignResult
from .base_assigner import BaseAssigner
@BBOX_ASSIGNERS.register_module()
class MaxKLDAssigner(BaseAssigner):
"""Assign a corresponding gt... | 42.348123 | 117 | 0.58833 |
1c817915fc49a2b9b8858479f8a0d286c4355a7c | 735 | py | Python | individ_1.py | karrrakotov/lab_9 | 9493431ddc43f90e4113be6dbb0ffb6ea9bc762f | [
"MIT"
] | null | null | null | individ_1.py | karrrakotov/lab_9 | 9493431ddc43f90e4113be6dbb0ffb6ea9bc762f | [
"MIT"
] | null | null | null | individ_1.py | karrrakotov/lab_9 | 9493431ddc43f90e4113be6dbb0ffb6ea9bc762f | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Написать программу, которая считывает текст из файла и определяет, сколько в нем слов,
# состоящих из не менее чем семи букв.
if __name__ == '__main__':
with open('individ_1.txt', 'r') as f:
text = f.read()
text = text.replace(".", " ")
text = t... | 29.4 | 90 | 0.559184 |
8a439a1b46421ebe76cf0d448379b9ea5bb84ccd | 30,017 | py | Python | tests/contrib/django/tests.py | jarus/raven-python | 54c5f2ab4874a34168aa95a85f161dfe8cef4778 | [
"BSD-3-Clause"
] | null | null | null | tests/contrib/django/tests.py | jarus/raven-python | 54c5f2ab4874a34168aa95a85f161dfe8cef4778 | [
"BSD-3-Clause"
] | null | null | null | tests/contrib/django/tests.py | jarus/raven-python | 54c5f2ab4874a34168aa95a85f161dfe8cef4778 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import with_statement
from __future__ import unicode_literals
import datetime
import django
import logging
import mock
import pytest
import re
import sys # NOQA
from exam import fixture
from celery.tests.utils import with_eager_tasks
fro... | 39.757616 | 113 | 0.666922 |
b30d4f437d66b5da4d8947686e326f8ecb30f97d | 10,339 | py | Python | src/kolibri_gnome/kolibri_webview.py | endlessm/kolibri-installer-gnome | 2cc0800269a998774a60abb71455a72eb360b18c | [
"MIT"
] | null | null | null | src/kolibri_gnome/kolibri_webview.py | endlessm/kolibri-installer-gnome | 2cc0800269a998774a60abb71455a72eb360b18c | [
"MIT"
] | 2 | 2021-12-23T14:54:16.000Z | 2022-03-22T00:36:06.000Z | src/kolibri_gnome/kolibri_webview.py | endlessm/kolibri-installer-gnome | 2cc0800269a998774a60abb71455a72eb360b18c | [
"MIT"
] | null | null | null | from __future__ import annotations
import typing
from gi.repository import Gdk
from gi.repository import GObject
from gi.repository import Gtk
from gi.repository import WebKit2
from kolibri_app.globals import KOLIBRI_APP_DEVELOPER_EXTRAS
from .kolibri_context import KolibriContext
from .utils import bubble_signal
... | 33.787582 | 83 | 0.674727 |
50d57e7e7d0d69d3a7a7dc1fdc324e4fb5924119 | 23,297 | py | Python | actions.py | faubiguy/Mercatores-AutoModerator | b2390d3fcc0008bbf9dbd0fd29f901b0dcda889a | [
"MIT"
] | null | null | null | actions.py | faubiguy/Mercatores-AutoModerator | b2390d3fcc0008bbf9dbd0fd29f901b0dcda889a | [
"MIT"
] | null | null | null | actions.py | faubiguy/Mercatores-AutoModerator | b2390d3fcc0008bbf9dbd0fd29f901b0dcda889a | [
"MIT"
] | null | null | null | import re, util
from collections import Counter
def get_actions(cursor):
actions = [] #[(regex, function)]
def action(regex):
regex = re.sub(r'\{(.*?)}', lambda m:r'(?P<{0}>.*?)'.format(m.group(1)), regex) + r'\.?$'
compiled_regex = re.compile(regex, flags=re.IGNORECASE)
re... | 56.002404 | 177 | 0.61759 |
4721887b41cd8dc29030dafc488179b619b4d7d8 | 108 | py | Python | app.py | LonelyProgrammer/python-docs-hello-world | bbde0b0f105fbcb3ca8b9aec2a674739f67f6aef | [
"MIT"
] | null | null | null | app.py | LonelyProgrammer/python-docs-hello-world | bbde0b0f105fbcb3ca8b9aec2a674739f67f6aef | [
"MIT"
] | null | null | null | app.py | LonelyProgrammer/python-docs-hello-world | bbde0b0f105fbcb3ca8b9aec2a674739f67f6aef | [
"MIT"
] | null | null | null | from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello():
return "Hello, KBPN World!"
| 15.428571 | 31 | 0.666667 |
bd69eb6aed017ba7228590785b8a47d9bb82b662 | 803 | py | Python | tests/unit/test_repository.py | be-rock/coin-flipper | bf9f5b25101fd6032ed334d18022e0eea87c3097 | [
"Apache-2.0"
] | 1 | 2021-02-11T01:51:54.000Z | 2021-02-11T01:51:54.000Z | tests/unit/test_repository.py | be-rock/coin-flipper | bf9f5b25101fd6032ed334d18022e0eea87c3097 | [
"Apache-2.0"
] | null | null | null | tests/unit/test_repository.py | be-rock/coin-flipper | bf9f5b25101fd6032ed334d18022e0eea87c3097 | [
"Apache-2.0"
] | null | null | null | def test_repository_add_items(fake_repository_fixture, coin_fixture):
repo = fake_repository_fixture
number_of_flips = 10
results = coin_fixture.flip(number_of_flips=number_of_flips)
repo.add(item=results)
assert len(repo.items) == 1
def test_repository_delete_items(fake_repository_fixture, coin_f... | 32.12 | 72 | 0.743462 |
ea642c5542be8b215f087448d61d1198ed24e969 | 12,895 | py | Python | code/python/QuotesAPIforDigitalPortals/v3/fds/sdk/QuotesAPIforDigitalPortals/model/attributes_member.py | factset/enterprise-sdk | 3fd4d1360756c515c9737a0c9a992c7451d7de7e | [
"Apache-2.0"
] | 6 | 2022-02-07T16:34:18.000Z | 2022-03-30T08:04:57.000Z | code/python/QuotesAPIforDigitalPortals/v3/fds/sdk/QuotesAPIforDigitalPortals/model/attributes_member.py | factset/enterprise-sdk | 3fd4d1360756c515c9737a0c9a992c7451d7de7e | [
"Apache-2.0"
] | 2 | 2022-02-07T05:25:57.000Z | 2022-03-07T14:18:04.000Z | code/python/QuotesAPIforDigitalPortals/v3/fds/sdk/QuotesAPIforDigitalPortals/model/attributes_member.py | factset/enterprise-sdk | 3fd4d1360756c515c9737a0c9a992c7451d7de7e | [
"Apache-2.0"
] | null | null | null | """
Quotes API For Digital Portals
The quotes API combines endpoints for retrieving security end-of-day, delayed, and realtime prices with performance key figures and basic reference data on the security and market level. The API supports over 20 different price types for each quote and comes with basic searc... | 45.72695 | 1,302 | 0.586274 |
2a4957b49bc15a21f27b2d6c7fab5928cd9ab4b5 | 11,868 | py | Python | python/cugraph/tests/test_bfs.py | codereport/cugraph | 32575bbeb77782e62b3077fb50400fbc5e8990fa | [
"Apache-2.0"
] | null | null | null | python/cugraph/tests/test_bfs.py | codereport/cugraph | 32575bbeb77782e62b3077fb50400fbc5e8990fa | [
"Apache-2.0"
] | null | null | null | python/cugraph/tests/test_bfs.py | codereport/cugraph | 32575bbeb77782e62b3077fb50400fbc5e8990fa | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2019-2020, NVIDIA 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... | 43.472527 | 79 | 0.615774 |
c24ab7069cbc634ad25f84a5ac31746191c724d7 | 65,260 | py | Python | src/_pytest/fixtures.py | plammens/pytest | ce206ae462f0ec47c3e6d5c1eb19ed84d217afe0 | [
"MIT"
] | null | null | null | src/_pytest/fixtures.py | plammens/pytest | ce206ae462f0ec47c3e6d5c1eb19ed84d217afe0 | [
"MIT"
] | 61 | 2020-10-12T13:34:56.000Z | 2022-03-28T03:02:21.000Z | src/_pytest/fixtures.py | gnikonorov/pytest | f14ab08de3d3ed840d111d111bd56122baa4224e | [
"MIT"
] | 1 | 2020-12-09T02:24:06.000Z | 2020-12-09T02:24:06.000Z | import functools
import inspect
import os
import sys
import warnings
from collections import defaultdict
from collections import deque
from types import TracebackType
from typing import Any
from typing import Callable
from typing import cast
from typing import Dict
from typing import Generator
from typing import Generi... | 38.799049 | 118 | 0.629605 |
9904a9beadc16f8d9c6d74abf474e374d0b684ac | 20,900 | py | Python | landlab/graph/structured_quad/structured_quad.py | amanaster2/landlab | ea17f8314eb12e3fc76df66c9b6ff32078caa75c | [
"MIT"
] | 257 | 2015-01-13T16:01:21.000Z | 2022-03-29T22:37:43.000Z | landlab/graph/structured_quad/structured_quad.py | amanaster2/landlab | ea17f8314eb12e3fc76df66c9b6ff32078caa75c | [
"MIT"
] | 1,222 | 2015-02-05T21:36:53.000Z | 2022-03-31T17:53:49.000Z | landlab/graph/structured_quad/structured_quad.py | amanaster2/landlab | ea17f8314eb12e3fc76df66c9b6ff32078caa75c | [
"MIT"
] | 274 | 2015-02-11T19:56:08.000Z | 2022-03-28T23:31:07.000Z | from abc import ABC, abstractmethod
from functools import lru_cache
import numpy as np
from ...utils.decorators import read_only_array
from ..graph import Graph
class StructuredQuadLayout(ABC):
@staticmethod
def corner_nodes(shape):
n_rows, n_cols = shape
return (n_rows * n_cols - 1, (n_rows... | 31.008902 | 96 | 0.574928 |
144482229553d31fbcda6a6b8c32cc8af1a378fb | 5,268 | py | Python | 04_consolidate_indications.py | finncatling/lap-risk | afda480bfa42bae0ce25c12129031971e517545f | [
"MIT"
] | 1 | 2020-12-17T09:52:16.000Z | 2020-12-17T09:52:16.000Z | 04_consolidate_indications.py | finncatling/lap-risk | afda480bfa42bae0ce25c12129031971e517545f | [
"MIT"
] | 18 | 2020-12-17T09:06:46.000Z | 2021-11-29T10:20:57.000Z | 04_consolidate_indications.py | finncatling/lap-risk | afda480bfa42bae0ce25c12129031971e517545f | [
"MIT"
] | null | null | null | import os
import numpy as np
import pandas as pd
from pprint import PrettyPrinter
from utils.constants import DATA_DIR, STATS_OUTPUT_DIR
from utils.data_check import load_nela_data_and_sanity_check
from utils.io import save_object
from utils.indications import (
INDICATION_PREFIX,
MISSING_IND_CATEGORY,
ge... | 29.762712 | 79 | 0.729499 |
4ee7494896e80958aa083407a609eec6b1edcdd9 | 545 | py | Python | 801-900/836.rectangle-overlap.py | guangxu-li/leetcode-in-python | 8a5a373b32351500342705c141591a1a8f5f1cb1 | [
"MIT"
] | null | null | null | 801-900/836.rectangle-overlap.py | guangxu-li/leetcode-in-python | 8a5a373b32351500342705c141591a1a8f5f1cb1 | [
"MIT"
] | null | null | null | 801-900/836.rectangle-overlap.py | guangxu-li/leetcode-in-python | 8a5a373b32351500342705c141591a1a8f5f1cb1 | [
"MIT"
] | null | null | null | #
# @lc app=leetcode id=836 lang=python3
#
# [836] Rectangle Overlap
#
# @lc code=start
class Solution:
def isRectangleOverlap(self, rec1: List[int], rec2: List[int]) -> bool:
overlap = lambda a, b: a[0] < b[1] and a[1] > b[0]
return (
rec1[0] < rec1[2]
and rec1[1] < rec1[3... | 23.695652 | 75 | 0.500917 |
ae4467519e2c438079dc9a2d751e083b1a17a350 | 163 | py | Python | Code/main.py | IshanKuchroo/SuperStore_Sales_Forecast | 533378ef9cfbd784e5f9d430435962144c993462 | [
"Apache-2.0"
] | null | null | null | Code/main.py | IshanKuchroo/SuperStore_Sales_Forecast | 533378ef9cfbd784e5f9d430435962144c993462 | [
"Apache-2.0"
] | null | null | null | Code/main.py | IshanKuchroo/SuperStore_Sales_Forecast | 533378ef9cfbd784e5f9d430435962144c993462 | [
"Apache-2.0"
] | null | null | null | from toolbox import *
from PreProcessing import *
from Base_Models_and_MLR import *
from ARMA import *
from Auto_ARIMA import *
from Grid_Search_SARIMA import *
| 18.111111 | 33 | 0.803681 |
12d1223a727e9ebaae4d78c644e79c4e5dd07bf3 | 10,028 | py | Python | var/spack/repos/builtin/packages/metis/package.py | TiffanyAnn/spack | 667fee0703799fc78606d0628ff42b0f5a318f2c | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 1 | 2021-02-22T18:04:31.000Z | 2021-02-22T18:04:31.000Z | var/spack/repos/builtin/packages/metis/package.py | danlipsa/spack | 699ae50ebf13ee425a482988ccbd4c3c994ab5e6 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | null | null | null | var/spack/repos/builtin/packages/metis/package.py | danlipsa/spack | 699ae50ebf13ee425a482988ccbd4c3c994ab5e6 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | null | null | null | # Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
import glob
import sys
import os
class Metis(Package):
"""METIS is a set of serial programs for... | 44.176211 | 99 | 0.595931 |
611ce920c5279ba7029ccbcbe64b73976b547b14 | 768 | py | Python | owlbot.py | renovate-bot/google-auth-library-python | a4cf9b1bf461a3fb35432e42f4d8bc1a8ff7bc97 | [
"Apache-2.0"
] | 348 | 2018-10-14T17:48:33.000Z | 2022-03-22T06:53:03.000Z | owlbot.py | renovate-bot/google-auth-library-python | a4cf9b1bf461a3fb35432e42f4d8bc1a8ff7bc97 | [
"Apache-2.0"
] | 485 | 2018-10-23T19:07:47.000Z | 2022-03-31T13:59:03.000Z | owlbot.py | renovate-bot/google-auth-library-python | a4cf9b1bf461a3fb35432e42f4d8bc1a8ff7bc97 | [
"Apache-2.0"
] | 229 | 2018-10-17T20:10:03.000Z | 2022-02-25T22:47:49.000Z | import synthtool as s
from synthtool import gcp
common = gcp.CommonTemplates()
# ----------------------------------------------------------------------------
# Add templated files
# ----------------------------------------------------------------------------
templated_files = common.py_library(unit_cov_level=100, cov... | 23.272727 | 78 | 0.516927 |
08ae6ac4b94660e4a83bef91b245ecffb26efbc3 | 34,654 | py | Python | lib/sinkhorn_algorithms.py | wokas36/RWK | c44d3d650f0704af49fe41969de0848563e63f65 | [
"MIT"
] | 3 | 2021-11-25T01:34:28.000Z | 2022-01-11T11:41:57.000Z | lib/sinkhorn_algorithms.py | wokas36/RWK | c44d3d650f0704af49fe41969de0848563e63f65 | [
"MIT"
] | null | null | null | lib/sinkhorn_algorithms.py | wokas36/RWK | c44d3d650f0704af49fe41969de0848563e63f65 | [
"MIT"
] | null | null | null | import numpy as np
class NanInDualError(Exception):
pass
def sinkhorn(a, b, M, reg, method='sinkhorn', numItermax=1000, stopThr=1e-9, verbose=False, log=False, **kwargs):
"""
Solve the entropic regularization optimal transport problem and return the OT matrix
The function solves the following optimiza... | 34.758275 | 226 | 0.558406 |
bbd48b4aa659ef8d2d5b6c95cd9d5743d4215408 | 2,007 | py | Python | benchmark/startPyquil907.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startPyquil907.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startPyquil907.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=5
# total number=41
import pyquil
from pyquil.api import local_forest_runtime, QVMConnection
from pyquil import Program, get_qc
from pyquil.gates import *
import numpy as np
conn = QVMConnection()
def make_circuit()-> Program:
prog = Program() # circuit begin
prog += H(0) # number=3
pr... | 24.777778 | 64 | 0.551071 |
2fd5b9597e60f780907045430ae3e3fbdccda462 | 1,024 | py | Python | create_ebook.py | AkaHitsuji/wuxiaworld_trawler | c42f82f8b4b66cf8c68504b51182b1d46c5cf49d | [
"MIT"
] | null | null | null | create_ebook.py | AkaHitsuji/wuxiaworld_trawler | c42f82f8b4b66cf8c68504b51182b1d46c5cf49d | [
"MIT"
] | null | null | null | create_ebook.py | AkaHitsuji/wuxiaworld_trawler | c42f82f8b4b66cf8c68504b51182b1d46c5cf49d | [
"MIT"
] | null | null | null | import os
import ebook_functions as ef
import argparse
help_text = 'This is a program to convert downloaded folders into ebooks. Please download ebook with download.py prior to using this programme.'
# initiate the parser
parser = argparse.ArgumentParser(description = help_text)
parser.add_argument("-V", "--version", ... | 32 | 144 | 0.712891 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.