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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ce7b85eb3abf1e1c019be4f8ffb8b841dcad021c | 4,178 | py | Python | aoc/day20.py | runfalk/advent-of-code-2019-py | 992ab28fc03a9944796688e96536d22b4541bf3f | [
"MIT"
] | null | null | null | aoc/day20.py | runfalk/advent-of-code-2019-py | 992ab28fc03a9944796688e96536d22b4541bf3f | [
"MIT"
] | null | null | null | aoc/day20.py | runfalk/advent-of-code-2019-py | 992ab28fc03a9944796688e96536d22b4541bf3f | [
"MIT"
] | null | null | null | from collections import deque, defaultdict
from dataclasses import dataclass, field
from operator import attrgetter
from .common import lines_from_file, PriorityQueue
from .plane import Coord
def find_label(tiles, coord):
# Only paths can have labels
if tiles[coord] != ".":
return None
for n in ... | 30.720588 | 87 | 0.618238 |
124c93656f317677f41e957659ece9c340992550 | 224 | py | Python | meridian/acupoints/qucha34.py | sinotradition/meridian | 8c6c1762b204b72346be4bbfb74dedd792ae3024 | [
"Apache-2.0"
] | 5 | 2015-12-14T15:14:23.000Z | 2022-02-09T10:15:33.000Z | meridian/acupoints/qucha34.py | sinotradition/meridian | 8c6c1762b204b72346be4bbfb74dedd792ae3024 | [
"Apache-2.0"
] | null | null | null | meridian/acupoints/qucha34.py | sinotradition/meridian | 8c6c1762b204b72346be4bbfb74dedd792ae3024 | [
"Apache-2.0"
] | 3 | 2015-11-27T05:23:49.000Z | 2020-11-28T09:01:56.000Z | #!/usr/bin/python
#coding=utf-8
'''
@author: sheng
@license:
'''
SPELL=u'qǔchà'
CN=u'曲差'
NAME=u'qucha34'
CHANNEL='bladder'
CHANNEL_FULLNAME='BladderChannelofFoot-Taiyang'
SEQ='BL4'
if __name__ == '__main__':
pass
| 10.666667 | 47 | 0.683036 |
10586d5207477930faeae21b23ada570b607fc2d | 2,252 | py | Python | rest_helpers/type_deserializers.py | WillFr/restlax | ec47617d915094137077f641427976f04acd8d47 | [
"Apache-2.0"
] | 1 | 2019-07-03T16:29:05.000Z | 2019-07-03T16:29:05.000Z | rest_helpers/type_deserializers.py | WillFr/restlax | ec47617d915094137077f641427976f04acd8d47 | [
"Apache-2.0"
] | null | null | null | rest_helpers/type_deserializers.py | WillFr/restlax | ec47617d915094137077f641427976f04acd8d47 | [
"Apache-2.0"
] | null | null | null | import functools
from decimal import Decimal
import datetime
from dateutil import parser
from schematics.models import Model
from schematics import types
def bool_deserializer(x):
"""
This is to be used to deserialize boolean : we consider that if
the value is "", then we should return true in order to be... | 33.117647 | 151 | 0.69627 |
8cd80503b6cefc9a49ad5be45d6c960661712be8 | 2,660 | py | Python | utest/test_shared_playwright_port.py | mkorpela/robotframework-playwright | bc0c739211a65948a2d075d066505ee868715012 | [
"Apache-2.0"
] | 219 | 2020-06-19T07:59:45.000Z | 2022-03-26T22:29:04.000Z | utest/test_shared_playwright_port.py | mkorpela/robotframework-playwright | bc0c739211a65948a2d075d066505ee868715012 | [
"Apache-2.0"
] | 777 | 2020-06-18T10:29:32.000Z | 2022-03-30T15:05:48.000Z | utest/test_shared_playwright_port.py | sthagen/robotframework-browser | 56091fea473ae6eab01fd631fee62624a8576152 | [
"Apache-2.0"
] | 61 | 2020-06-18T11:06:29.000Z | 2022-03-25T23:48:57.000Z | import pytest
import Browser
def test_separate_playwright_port():
browser = Browser.Browser()
browser.new_context()
browser2 = Browser.Browser()
browser.new_context()
assert browser.playwright.port != browser2.playwright.port
assert browser2.get_browser_catalog() != browser.get_browser_cata... | 32.439024 | 105 | 0.743985 |
45362f86da3c80bc5b43f95b3daa9afc56e6d90c | 2,481 | py | Python | core/models.py | Kamalpreet-3223/Axios-Sphere | 899000fec4fe1d9ad00c20a901030e578a2afe21 | [
"MIT"
] | null | null | null | core/models.py | Kamalpreet-3223/Axios-Sphere | 899000fec4fe1d9ad00c20a901030e578a2afe21 | [
"MIT"
] | null | null | null | core/models.py | Kamalpreet-3223/Axios-Sphere | 899000fec4fe1d9ad00c20a901030e578a2afe21 | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth.models import User
class complains(models.Model):
user = models.ForeignKey(User, on_delete=models.CASCADE)
name = models.CharField(max_length=50)
roomno = models.CharField(max_length=50)
phoneno = models.CharField(max_length=50)
complaint = mod... | 30.62963 | 79 | 0.719065 |
f56196d994067b48be53c5970c56f2a2e0befa29 | 5,598 | py | Python | src/sasctl/_services/data_sources.py | jameskochubasas/python-sasctl | 65107c2d4355390ca09e83eb89167c86506c9926 | [
"Apache-2.0"
] | 1 | 2021-06-15T08:22:18.000Z | 2021-06-15T08:22:18.000Z | src/sasctl/_services/data_sources.py | jameskochubasas/python-sasctl | 65107c2d4355390ca09e83eb89167c86506c9926 | [
"Apache-2.0"
] | 3 | 2019-07-12T02:09:15.000Z | 2019-07-13T14:48:04.000Z | src/sasctl/_services/data_sources.py | jameskochubasas/python-sasctl | 65107c2d4355390ca09e83eb89167c86506c9926 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
#
# Copyright © 2019, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
from ..core import PagedItemIterator
from .service import Service
class DataSources(Service):
"""Enables retrieval of data source metadata.
The Data So... | 28.130653 | 84 | 0.576635 |
483746a5606e3f53b9adb35d31d729b2bbd49fe5 | 20,844 | py | Python | src/ebay_rest/api/sell_marketing/models/create_report_task.py | craiga/ebay_rest | a0be2677c65a787e9566df848ffa3ad0c309a9d9 | [
"MIT"
] | null | null | null | src/ebay_rest/api/sell_marketing/models/create_report_task.py | craiga/ebay_rest | a0be2677c65a787e9566df848ffa3ad0c309a9d9 | [
"MIT"
] | null | null | null | src/ebay_rest/api/sell_marketing/models/create_report_task.py | craiga/ebay_rest | a0be2677c65a787e9566df848ffa3ad0c309a9d9 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Marketing API
<p>The <i>Marketing API </i> offers two platforms that sellers can use to promote and advertise their products:</p> <ul><li><b>Promoted Listings</b> is an eBay ad service that lets sellers set up <i>ad campaigns </i> for the products they want to promote. eBay displays the ad... | 57.106849 | 2,092 | 0.700825 |
83622bbf36c20d051f3136c661bca08e06bea779 | 4,659 | py | Python | setup.py | eldarion/django-trust | 937569e98edceccea1d68d6370eb41f2f8311883 | [
"BSD-3-Clause"
] | 2 | 2015-03-03T00:09:20.000Z | 2016-12-04T17:57:32.000Z | setup.py | eldarion/django-trust | 937569e98edceccea1d68d6370eb41f2f8311883 | [
"BSD-3-Clause"
] | null | null | null | setup.py | eldarion/django-trust | 937569e98edceccea1d68d6370eb41f2f8311883 | [
"BSD-3-Clause"
] | null | null | null | import codecs
import os
import sys
from distutils.util import convert_path
from fnmatch import fnmatchcase
from setuptools import setup, find_packages
def read(fname):
return codecs.open(os.path.join(os.path.dirname(__file__), fname)).read()
# Provided as an attribute, so you can append to these instead
# of r... | 34.768657 | 86 | 0.582099 |
9350c30547727e07311b68ad3c05df6f7cf39692 | 8,617 | py | Python | tests/test_json.py | themilkman/GitGutter | 355b4480e7e1507fe1f9ae1ad9eca9649400a76c | [
"MIT"
] | 1,866 | 2015-01-02T19:39:39.000Z | 2022-03-22T21:22:54.000Z | tests/test_json.py | themilkman/GitGutter | 355b4480e7e1507fe1f9ae1ad9eca9649400a76c | [
"MIT"
] | 354 | 2015-01-01T01:00:52.000Z | 2022-02-12T22:21:52.000Z | tests/test_json.py | themilkman/GitGutter | 355b4480e7e1507fe1f9ae1ad9eca9649400a76c | [
"MIT"
] | 188 | 2015-01-11T05:52:46.000Z | 2021-06-22T19:53:34.000Z | """
Validate JSON format.
Licensed under MIT
Copyright (c) 2012-2015 Isaac Muse <isaacmuse@gmail.com>
Some smaller fixes are applied by <deathaxe@gmail.com>
"""
import codecs
import fnmatch
import json
import os
import re
import unittest
RE_LINE_PRESERVE = re.compile(r'\r?\n', re.MULTILINE)
RE_COMMENT = re.compile(
... | 33.660156 | 79 | 0.521063 |
25a4d4b1025486fbb357c2bbca84f06cf6ed6d0d | 2,996 | py | Python | pycorrector/rnn_crf/train.py | zouning68/pycorrector | 4daaf13e566f2cecc724fb5a77db5d89f1f25203 | [
"Apache-2.0"
] | 1 | 2019-08-07T05:14:01.000Z | 2019-08-07T05:14:01.000Z | pycorrector/rnn_crf/train.py | zouning68/pycorrector | 4daaf13e566f2cecc724fb5a77db5d89f1f25203 | [
"Apache-2.0"
] | null | null | null | pycorrector/rnn_crf/train.py | zouning68/pycorrector | 4daaf13e566f2cecc724fb5a77db5d89f1f25203 | [
"Apache-2.0"
] | 1 | 2020-09-23T09:11:49.000Z | 2020-09-23T09:11:49.000Z | # -*- coding: utf-8 -*-
# Author: XuMing <xuming624@qq.com>
# Brief:
import sys
sys.path.append('../..')
import numpy as np
from pycorrector.rnn_crf.data_reader import build_dict
from pycorrector.rnn_crf.data_reader import load_dict
from pycorrector.rnn_crf.data_reader import pad_sequence
from pycorrector.rnn_crf.dat... | 33.662921 | 82 | 0.685247 |
a9633d3ff17de8e264a8dab9e364e50c6a9f352b | 37,851 | py | Python | arelle/plugin/validate/USBestPractices.py | hamscher/Arelle | 64c1beddcc7163e571011faf07a03d8ffe18bb78 | [
"Apache-2.0"
] | 292 | 2015-01-27T03:31:51.000Z | 2022-03-26T07:00:05.000Z | arelle/plugin/validate/USBestPractices.py | hamscher/Arelle | 64c1beddcc7163e571011faf07a03d8ffe18bb78 | [
"Apache-2.0"
] | 94 | 2015-04-18T23:03:00.000Z | 2022-03-28T17:24:55.000Z | arelle/plugin/validate/USBestPractices.py | hamscher/Arelle | 64c1beddcc7163e571011faf07a03d8ffe18bb78 | [
"Apache-2.0"
] | 200 | 2015-01-13T03:55:47.000Z | 2022-03-29T12:38:56.000Z | # changed from reporting locs to reporting relationships: HF 2020-06-23
from arelle import PluginManager
from arelle.ModelDtsObject import ModelConcept
from arelle.ModelValue import qname
from arelle.XmlValidate import UNVALIDATED, VALID
from arelle import Locale, ModelXbrl, XbrlConst
from arelle.FileSource import op... | 67.111702 | 186 | 0.581543 |
a7700ce8061a5cce9d17e7a0373591ce6f44a751 | 2,629 | py | Python | tests/model/bundle_model_test.py | millerjohnp/codalab-worksheets | d6fc37864e7a8966380fc9d73865b10e434d6678 | [
"Apache-2.0"
] | 1 | 2021-01-02T03:33:58.000Z | 2021-01-02T03:33:58.000Z | tests/model/bundle_model_test.py | millerjohnp/codalab-worksheets | d6fc37864e7a8966380fc9d73865b10e434d6678 | [
"Apache-2.0"
] | null | null | null | tests/model/bundle_model_test.py | millerjohnp/codalab-worksheets | d6fc37864e7a8966380fc9d73865b10e434d6678 | [
"Apache-2.0"
] | 1 | 2020-03-13T08:16:17.000Z | 2020-03-13T08:16:17.000Z | import mock
from sqlalchemy import create_engine
from sqlalchemy.engine.reflection import Inspector
import unittest
from codalab.model.bundle_model import BundleModel, db_metadata
def metadata_to_dicts(uuid, metadata):
return [
{'bundle_uuid': uuid, 'metadata_key': key, 'metadata_value': value}
f... | 32.060976 | 89 | 0.601369 |
70a446a784cd1f4f529a5002cc5f988cf2db6430 | 21 | py | Python | script/deal_time.py | difosschan/easy-sh-alias | 283e3e7a3966b2c3ebd98ca97e516ef73de04534 | [
"MIT"
] | 8 | 2018-09-25T07:51:12.000Z | 2021-06-09T04:51:18.000Z | script/deal_time.py | difosschan/easy-sh-alias | 283e3e7a3966b2c3ebd98ca97e516ef73de04534 | [
"MIT"
] | null | null | null | script/deal_time.py | difosschan/easy-sh-alias | 283e3e7a3966b2c3ebd98ca97e516ef73de04534 | [
"MIT"
] | 6 | 2018-08-03T11:48:00.000Z | 2021-06-09T04:51:13.000Z | #!/usr/env python3
| 5.25 | 18 | 0.619048 |
912a1c1778e519cb6970b1f13040cabae49fd76a | 38,317 | py | Python | mapping/tests/test_util.py | matthewgilbert/mapper | 24ea21acfe37a0ee273f63a273b5d24ea405e70d | [
"MIT"
] | 3 | 2018-11-21T04:12:39.000Z | 2020-08-02T02:22:48.000Z | mapping/tests/test_util.py | matthewgilbert/mapper | 24ea21acfe37a0ee273f63a273b5d24ea405e70d | [
"MIT"
] | 13 | 2018-02-19T16:39:54.000Z | 2022-03-12T19:07:33.000Z | mapping/tests/test_util.py | matthewgilbert/mapper | 24ea21acfe37a0ee273f63a273b5d24ea405e70d | [
"MIT"
] | 4 | 2019-03-22T16:12:45.000Z | 2021-08-10T13:15:47.000Z | import pytest
import os
from mapping import util
from pandas.util.testing import assert_frame_equal, assert_series_equal
import pandas as pd
from pandas import Timestamp as TS
import numpy as np
@pytest.fixture
def price_files():
cdir = os.path.dirname(__file__)
path = os.path.join(cdir, 'data/')
files = ... | 45.943645 | 75 | 0.464781 |
b93c0a0b76bbdf94daf370fc96e20717cf55ae7a | 686 | py | Python | src/OS/thread/thread_queue.py | liuguanglin/Learn_Python | ad7437c983dae3d3386162f51dd4259a8a6c475a | [
"MIT"
] | null | null | null | src/OS/thread/thread_queue.py | liuguanglin/Learn_Python | ad7437c983dae3d3386162f51dd4259a8a6c475a | [
"MIT"
] | null | null | null | src/OS/thread/thread_queue.py | liuguanglin/Learn_Python | ad7437c983dae3d3386162f51dd4259a8a6c475a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import threading
import queue
import time
import random
class MyThread(threading.Thread):
def __init__(self, q):
super().__init__()
self.q = q
def run(self):
get_q(self.q)
def get_q(q):
while not my_queue.empty():
print(f'{t... | 18.540541 | 63 | 0.634111 |
dac2f994f90c2de1dd274e2821dc215e50cfb1c5 | 15,221 | py | Python | src/tt_protocol/tt_protocol/protocol/diary_pb2.py | al-arz/the-tale | 542770257eb6ebd56a5ac44ea1ef93ff4ab19eb5 | [
"BSD-3-Clause"
] | 85 | 2017-11-21T12:22:02.000Z | 2022-03-27T23:07:17.000Z | src/tt_protocol/tt_protocol/protocol/diary_pb2.py | devapromix/the-tale | 2a10efd3270734f8cf482b4cfbc5353ef8f0494c | [
"BSD-3-Clause"
] | 545 | 2017-11-04T14:15:04.000Z | 2022-03-27T14:19:27.000Z | src/tt_protocol/tt_protocol/protocol/diary_pb2.py | devapromix/the-tale | 2a10efd3270734f8cf482b4cfbc5353ef8f0494c | [
"BSD-3-Clause"
] | 45 | 2017-11-11T12:36:30.000Z | 2022-02-25T06:10:44.000Z | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: diary.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflect... | 33.233624 | 1,118 | 0.735169 |
42f21b0dd916e16654375c7e8732ee7a26c00097 | 989 | py | Python | scripts/profiling/gaugeopt/bench_obj_fn.py | drewrisinger/pyGSTi | dd4ad669931c7f75e026456470cf33ac5b682d0d | [
"Apache-2.0"
] | 1 | 2021-12-19T15:11:09.000Z | 2021-12-19T15:11:09.000Z | scripts/profiling/gaugeopt/bench_obj_fn.py | drewrisinger/pyGSTi | dd4ad669931c7f75e026456470cf33ac5b682d0d | [
"Apache-2.0"
] | null | null | null | scripts/profiling/gaugeopt/bench_obj_fn.py | drewrisinger/pyGSTi | dd4ad669931c7f75e026456470cf33ac5b682d0d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import pygsti
from pygsti.algorithms.gaugeopt import create_objective_fn
from pygsti.tools.opttools import timed_block
import pickle
from functools import partial
def test_options(gs, gs_target, options, iterations=100):
objective_fn = create_objective_fn(gs, gs_target, **options)
... | 28.257143 | 64 | 0.661274 |
ea5b4f10803ddb539dcbc176d471dbf492dc60fb | 2,232 | py | Python | test/functional/mempool_spendcoinbase.py | GalacticFederation/blemflark | c349e5afc560fff581d431c0a343fff1a02c6e05 | [
"MIT"
] | 1 | 2017-12-20T16:37:47.000Z | 2017-12-20T16:37:47.000Z | test/functional/mempool_spendcoinbase.py | GalacticFederation/blemflark | c349e5afc560fff581d431c0a343fff1a02c6e05 | [
"MIT"
] | null | null | null | test/functional/mempool_spendcoinbase.py | GalacticFederation/blemflark | c349e5afc560fff581d431c0a343fff1a02c6e05 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test spending coinbase transactions.
The coinbase transaction in block N can appear in block
N+100... ... | 41.333333 | 124 | 0.705197 |
9e256e0d3c1a7c48b655f21b54b7ce393968e2ee | 6,085 | py | Python | packages/vaex-ml/vaex/ml/incubator/river.py | yohplala/vaex | ca7927a19d259576ca0403ee207a597aaef6adc2 | [
"MIT"
] | null | null | null | packages/vaex-ml/vaex/ml/incubator/river.py | yohplala/vaex | ca7927a19d259576ca0403ee207a597aaef6adc2 | [
"MIT"
] | null | null | null | packages/vaex-ml/vaex/ml/incubator/river.py | yohplala/vaex | ca7927a19d259576ca0403ee207a597aaef6adc2 | [
"MIT"
] | null | null | null | import warnings
import numpy as np
import pandas as pd
import traitlets
import vaex
import vaex.serialize
from vaex.ml import generate
from vaex.ml import state
from vaex.ml.state import serialize_pickle
@vaex.serialize.register
@generate.register
class RiverModel(state.HasState):
'''This class wraps River (gi... | 41.394558 | 150 | 0.642071 |
0d649621f5983d06adb32020e5dedbfe73c9ff2b | 7,602 | py | Python | electronics/vendors/great_scott_gadgets/hackrf-one/fm_receiver.py | qeedquan/misc_utilities | 94c6363388662ac8ebbf075b9c853ce6defbb5b3 | [
"MIT"
] | 8 | 2018-10-17T18:17:25.000Z | 2022-03-18T09:02:53.000Z | electronics/vendors/great_scott_gadgets/hackrf-one/fm_receiver.py | qeedquan/misc_utilities | 94c6363388662ac8ebbf075b9c853ce6defbb5b3 | [
"MIT"
] | null | null | null | electronics/vendors/great_scott_gadgets/hackrf-one/fm_receiver.py | qeedquan/misc_utilities | 94c6363388662ac8ebbf075b9c853ce6defbb5b3 | [
"MIT"
] | 3 | 2020-07-01T13:52:42.000Z | 2022-03-18T09:10:59.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# SPDX-License-Identifier: GPL-3.0
#
# GNU Radio Python Flow Graph
# Title: FM Receiver
# GNU Radio version: 3.8.2.0
from distutils.version import StrictVersion
if __name__ == '__main__':
import ctypes
import sys
if sys.platform.startswith('linux'):
... | 33.9375 | 122 | 0.624967 |
a7816e7f7f49db64009653d612b37c60d8937e39 | 14,397 | py | Python | Chapter09/chefbot_code/chefbot_bringup/scripts/bkup_working/arduino.py | AIHZP/ROS-Robotics-Projects-published-by-Packt | bb44f034d7bd14cb715c008f92cd835bb3753867 | [
"MIT"
] | 42 | 2018-02-04T17:20:53.000Z | 2022-03-07T14:44:09.000Z | Chapter09/chefbot_code/chefbot_bringup/scripts/bkup_working/arduino.py | AIHZP/ROS-Robotics-Projects-published-by-Packt | bb44f034d7bd14cb715c008f92cd835bb3753867 | [
"MIT"
] | 2 | 2018-05-17T02:30:37.000Z | 2019-03-21T19:03:20.000Z | Chapter09/chefbot_code/chefbot_bringup/scripts/bkup_working/arduino.py | AIHZP/ROS-Robotics-Projects-published-by-Packt | bb44f034d7bd14cb715c008f92cd835bb3753867 | [
"MIT"
] | 23 | 2018-05-07T07:39:46.000Z | 2021-08-19T03:24:29.000Z | #!/usr/bin/env python
'''
Created January, 2011
@author: Dr. Rainer Hessmer
arduino.py - gateway to Arduino based differential drive base
Copyright (c) 2011 Dr. Rainer Hessmer. All right reserved.
Borrowed heavily from Mike Feguson's ArbotiX base_controller.py code.
Redistribution and use in source and bina... | 31.85177 | 191 | 0.73175 |
5b2ee6a79f7bfca5e860ed42cbad966a02e9dafe | 3,092 | py | Python | parser/fase2/team09/reportes/reportesimbolos.py | Josue-Zea/tytus | f9e4be9a8c03eb698fade7a748972e4f52d46685 | [
"MIT"
] | 35 | 2020-12-07T03:11:43.000Z | 2021-04-15T17:38:16.000Z | parser/fase2/team09/reportes/reportesimbolos.py | Josue-Zea/tytus | f9e4be9a8c03eb698fade7a748972e4f52d46685 | [
"MIT"
] | 47 | 2020-12-09T01:29:09.000Z | 2021-01-13T05:37:50.000Z | parser/fase2/team09/reportes/reportesimbolos.py | Josue-Zea/tytus | f9e4be9a8c03eb698fade7a748972e4f52d46685 | [
"MIT"
] | 556 | 2020-12-07T03:13:31.000Z | 2021-06-17T17:41:10.000Z | import os.path
from os import path
import webbrowser
def crear_tabla(tabla):
filename = "TablaSimbolos.html"
file = open(filename,"w",encoding='utf-8')
file.write(reporte_tabla(tabla))
file.close()
webbrowser.open_new_tab(filename)
def reporte_tabla(tabla):
cadena = ''
cadena += "<html><he... | 37.707317 | 132 | 0.494179 |
7ae7948f9ac1c3621f11b414f029fe2c2b95c28b | 14,363 | py | Python | bot/venv/lib/python3.7/site-packages/aiohttp/tracing.py | manaccac/sc2_bot | 3aa8b3711378b71fd0a44662cdd7148846e39530 | [
"MIT"
] | 21 | 2021-03-29T05:49:35.000Z | 2022-03-18T09:02:34.000Z | bot/venv/lib/python3.7/site-packages/aiohttp/tracing.py | manaccac/sc2_bot | 3aa8b3711378b71fd0a44662cdd7148846e39530 | [
"MIT"
] | 107 | 2021-02-07T14:47:50.000Z | 2022-03-31T02:07:16.000Z | bot/venv/lib/python3.7/site-packages/aiohttp/tracing.py | manaccac/sc2_bot | 3aa8b3711378b71fd0a44662cdd7148846e39530 | [
"MIT"
] | 31 | 2021-03-29T05:54:57.000Z | 2022-03-22T16:58:57.000Z | from types import SimpleNamespace
from typing import TYPE_CHECKING, Awaitable, Optional, Type, TypeVar
import attr
from multidict import CIMultiDict
from yarl import URL
from .client_reqrep import ClientResponse
from .signals import Signal
if TYPE_CHECKING: # pragma: no cover
from typing_extensions import Proto... | 32.422122 | 87 | 0.693448 |
89c7f9a439e465fcb84fdfef4918ea298d319790 | 1,899 | py | Python | vistrails/db/versions/v0_9_5/translate/__init__.py | celiafish/VisTrails | d8cb575b8b121941de190fe608003ad1427ef9f6 | [
"BSD-3-Clause"
] | 1 | 2015-05-11T16:46:49.000Z | 2015-05-11T16:46:49.000Z | vistrails/db/versions/v0_9_5/translate/__init__.py | celiafish/VisTrails | d8cb575b8b121941de190fe608003ad1427ef9f6 | [
"BSD-3-Clause"
] | null | null | null | vistrails/db/versions/v0_9_5/translate/__init__.py | celiafish/VisTrails | d8cb575b8b121941de190fe608003ad1427ef9f6 | [
"BSD-3-Clause"
] | null | null | null | ###############################################################################
##
## Copyright (C) 2011-2014, NYU-Poly.
## Copyright (C) 2006-2011, University of Utah.
## All rights reserved.
## Contact: contact@vistrails.org
##
## This file is part of VisTrails.
##
## "Redistribution and use in source and binary for... | 51.324324 | 79 | 0.687204 |
7f97b97405120b74c730d8db88a63027a3ddc084 | 2,956 | py | Python | src/nti/externalization/_compat.py | NextThought/nti.externalization | 5a445b85fb809a7c27bf8dbe45c29032ece187d8 | [
"Apache-2.0"
] | null | null | null | src/nti/externalization/_compat.py | NextThought/nti.externalization | 5a445b85fb809a7c27bf8dbe45c29032ece187d8 | [
"Apache-2.0"
] | 78 | 2017-09-15T14:59:58.000Z | 2021-10-05T17:40:06.000Z | src/nti/externalization/_compat.py | NextThought/nti.externalization | 5a445b85fb809a7c27bf8dbe45c29032ece187d8 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
System spanning utilities.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import sys
from six import text_type
PY2 = sys.version_info[0] == 2
PY3 = sys.version_info[0] >= 3
PYPY = hasattr(sy... | 28.152381 | 82 | 0.648173 |
0aaf5c7443867c072a0942dc2f4b06b65f87c4fe | 1,212 | py | Python | sandbox/lib/jumpscale/JumpScale9Lib/clients/itsyouonline/generated/client/AuthorizationMap.py | Jumpscale/sandbox_linux | 2aacd36b467ef30ac83718abfa82c6883b67a02f | [
"Apache-2.0"
] | 2 | 2017-06-07T08:11:47.000Z | 2017-11-10T02:19:48.000Z | JumpScale9Lib/clients/itsyouonline/generated/client/AuthorizationMap.py | Jumpscale/lib9 | 82224784ef2a7071faeb48349007211c367bc673 | [
"Apache-2.0"
] | 188 | 2017-06-21T06:16:13.000Z | 2020-06-17T14:20:24.000Z | sandbox/lib/jumpscale/JumpScale9Lib/clients/itsyouonline/generated/client/AuthorizationMap.py | Jumpscale/sandbox_linux | 2aacd36b467ef30ac83718abfa82c6883b67a02f | [
"Apache-2.0"
] | 3 | 2018-06-12T05:18:28.000Z | 2019-09-24T06:49:17.000Z | """
Auto-generated class for AuthorizationMap
"""
from .Label import Label
from js9 import j
from . import client_support
class AuthorizationMap( ):
"""
auto-generated. don't touch.
"""
@staticmethod
def create(**kwargs):
"""
:type reallabel: Label
:type requestedlabel: ... | 24.734694 | 119 | 0.628713 |
8c11280fc4fa1a1f5cf0b54ef39c72d2dd65d7b4 | 7,824 | py | Python | clearKeys.py | kylephan/Utilities | 21b025a1cf71b4ced95243cc0cf1a8be4d316f5e | [
"MIT"
] | null | null | null | clearKeys.py | kylephan/Utilities | 21b025a1cf71b4ced95243cc0cf1a8be4d316f5e | [
"MIT"
] | null | null | null | clearKeys.py | kylephan/Utilities | 21b025a1cf71b4ced95243cc0cf1a8be4d316f5e | [
"MIT"
] | null | null | null | import maya.cmds as mc
def letsClear(*args):
obj = mc.ls(sl=True)
if all == True:
for o in obj:
clearTX(o)
clearTY(o)
clearTZ(o)
clearRX(o)
clearRY(o)
clearRZ(o)
else:
for o in obj: ... | 32.330579 | 107 | 0.484279 |
d37090caf7519f8975f29b5a3e4c6fa854f8d757 | 284 | py | Python | kemipy/mod_init.py | conatel-i-d/kamailio-playground | 2c71f127409be54ca9547a5fc0ead2f11b04d5fa | [
"MIT"
] | null | null | null | kemipy/mod_init.py | conatel-i-d/kamailio-playground | 2c71f127409be54ca9547a5fc0ead2f11b04d5fa | [
"MIT"
] | null | null | null | kemipy/mod_init.py | conatel-i-d/kamailio-playground | 2c71f127409be54ca9547a5fc0ead2f11b04d5fa | [
"MIT"
] | null | null | null | # Entry file for Kamailio configuration.
# Kamailio will call the mod_init function which should return
# a new object with the configuration inside
from utils import ksr_print
from Kamailio import Kamailio
def mod_init():
ksr_print('From python mod init')
return Kamailio() | 28.4 | 62 | 0.78169 |
8daa62a2840ff640d5940ce3f629704b8c25eba4 | 4,870 | py | Python | tests/test_init.py | sebasptsch/Home-Assistant-Mail-And-Packages | 479ab3cdde9c78c8996863f88fa1abe3f7d7f00c | [
"MIT"
] | null | null | null | tests/test_init.py | sebasptsch/Home-Assistant-Mail-And-Packages | 479ab3cdde9c78c8996863f88fa1abe3f7d7f00c | [
"MIT"
] | null | null | null | tests/test_init.py | sebasptsch/Home-Assistant-Mail-And-Packages | 479ab3cdde9c78c8996863f88fa1abe3f7d7f00c | [
"MIT"
] | null | null | null | """Tests for init."""
from unittest.mock import patch
import pytest
from homeassistant.components.sensor import DOMAIN as SENSOR_DOMAIN
from pytest_homeassistant_custom_component.common import MockConfigEntry
from custom_components.mail_and_packages.const import DOMAIN
from tests.const import (
FAKE_CONFIG_DATA,... | 26.612022 | 88 | 0.719713 |
7cd8ba6b14ff550b70e5dd6843b156b38c28b71a | 130 | py | Python | files/recursion/recursion_examples-master/gcd_iterative.py | multitudes/Python_am_Freitag | 189ce6ceee98b344292d14a7c82dfe18b7ede582 | [
"MIT"
] | null | null | null | files/recursion/recursion_examples-master/gcd_iterative.py | multitudes/Python_am_Freitag | 189ce6ceee98b344292d14a7c82dfe18b7ede582 | [
"MIT"
] | null | null | null | files/recursion/recursion_examples-master/gcd_iterative.py | multitudes/Python_am_Freitag | 189ce6ceee98b344292d14a7c82dfe18b7ede582 | [
"MIT"
] | null | null | null | def gcd(a, b):
while a != 0:
a, b = b % a, a
return b
print(gcd(42, 28))
print(gcd(28, 42))
print(gcd(345, 766))
| 14.444444 | 23 | 0.5 |
b1b4f288551a551657b81c6fda4c12bf759342a1 | 3,573 | py | Python | app/api/v1/models/deregcomments.py | Fozia-Zafar/Device-Registration-Subsystem | 7854dd314c2f5cb09d722d16ca0114c4cd9907b6 | [
"BSD-3-Clause-Clear"
] | null | null | null | app/api/v1/models/deregcomments.py | Fozia-Zafar/Device-Registration-Subsystem | 7854dd314c2f5cb09d722d16ca0114c4cd9907b6 | [
"BSD-3-Clause-Clear"
] | null | null | null | app/api/v1/models/deregcomments.py | Fozia-Zafar/Device-Registration-Subsystem | 7854dd314c2f5cb09d722d16ca0114c4cd9907b6 | [
"BSD-3-Clause-Clear"
] | null | null | null | """
DRS De-Registration Comments Model package.
Copyright (c) 2018 Qualcomm Technologies, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the
limitations in the disclaimer below) provided that the following conditions are met:
* Re... | 51.042857 | 118 | 0.738595 |
93f8ac1f917a0c42925032fdd817a6ec2dc41310 | 375 | py | Python | firstproject/mainapp/urls.py | daryalozhkina/lozhkina-django | 51a0dfa9be659b15874edb86567015925e7e851e | [
"Apache-2.0"
] | null | null | null | firstproject/mainapp/urls.py | daryalozhkina/lozhkina-django | 51a0dfa9be659b15874edb86567015925e7e851e | [
"Apache-2.0"
] | null | null | null | firstproject/mainapp/urls.py | daryalozhkina/lozhkina-django | 51a0dfa9be659b15874edb86567015925e7e851e | [
"Apache-2.0"
] | null | null | null | import mainapp.views as mainapp
from django.urls import path
app_name = 'mainapp'
urlpatterns = [
path('', mainapp.index, name='index'),
path('catalog/', mainapp.catalog, name='catalog'),
path('catalog/category/<int:category_pk>/', mainapp.catalog_page, name='catalog_page'),
path('catalog/books/<int:... | 28.846154 | 91 | 0.704 |
f59b17ac12df4dd9d5ccc17b8a766b403ff4066a | 247 | py | Python | examples/all_keywords.py | TheZoq2/golden-tests | 44349c45e074b7f8f20eeef049ac362316c217cc | [
"MIT"
] | 11 | 2020-07-04T16:34:25.000Z | 2022-02-07T00:24:10.000Z | examples/all_keywords.py | TheZoq2/golden-tests | 44349c45e074b7f8f20eeef049ac362316c217cc | [
"MIT"
] | 5 | 2020-08-03T21:53:03.000Z | 2021-05-30T13:59:18.000Z | examples/all_keywords.py | TheZoq2/golden-tests | 44349c45e074b7f8f20eeef049ac362316c217cc | [
"MIT"
] | 4 | 2020-07-10T15:53:51.000Z | 2021-05-29T13:05:36.000Z | from __future__ import print_function
import sys
print("error!", file=sys.stderr)
sys.exit(3)
# args: -c 'print("test"); exec(open("examples/all_keywords.py").read())'
# expected exit status: 3
# expected stdout: test
# expected stderr: error!
| 20.583333 | 73 | 0.720648 |
9b527de538b749756580604433d8da01f955199e | 619 | py | Python | One-to-One-Video/Agora-macOS-Tutorial-Objective-C-1to1/ci.env.py | 635342478/Basic-Video-Call | d4013342e176df268c7b5030bf8168f95cf664c2 | [
"MIT"
] | 666 | 2018-10-03T19:51:47.000Z | 2022-03-29T04:27:02.000Z | One-to-One-Video/Agora-macOS-Tutorial-Objective-C-1to1/ci.env.py | 635342478/Basic-Video-Call | d4013342e176df268c7b5030bf8168f95cf664c2 | [
"MIT"
] | 180 | 2018-10-09T23:17:10.000Z | 2022-03-31T13:21:42.000Z | One-to-One-Video/Agora-macOS-Tutorial-Objective-C-1to1/ci.env.py | 635342478/Basic-Video-Call | d4013342e176df268c7b5030bf8168f95cf664c2 | [
"MIT"
] | 1,128 | 2018-10-01T05:50:12.000Z | 2022-03-24T09:13:33.000Z | #!/usr/bin/python
# -*- coding: UTF-8 -*-
import re
import os
def main():
appId = ""
if "AGORA_APP_ID" in os.environ:
appId = os.environ["AGORA_APP_ID"]
token = ""
#if need reset
f = open("./Agora-Mac-Tutorial-Objective-C/AppID.m", 'r+')
content = f.read()
#if need reset
... | 21.344828 | 67 | 0.562197 |
0baafd7616898195409b8c526d25ea50d3fa6d34 | 16,415 | py | Python | open_spiel/python/mfg/games/predator_prey.py | ajain-23/open_spiel | a6a0f0129571bb6f0e6832e870e299663fb7cdd5 | [
"Apache-2.0"
] | 3,167 | 2019-08-27T06:50:30.000Z | 2022-03-31T22:33:48.000Z | open_spiel/python/mfg/games/predator_prey.py | AliBeikmohammadi/open_spiel | 38941dee3beb52ffdb134b66f420a758634d9a20 | [
"Apache-2.0"
] | 650 | 2019-08-27T16:24:09.000Z | 2022-03-30T19:41:09.000Z | open_spiel/python/mfg/games/predator_prey.py | AliBeikmohammadi/open_spiel | 38941dee3beb52ffdb134b66f420a758634d9a20 | [
"Apache-2.0"
] | 774 | 2019-08-27T10:36:04.000Z | 2022-03-29T15:44:42.000Z | # Copyright 2019 DeepMind Technologies Ltd. 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 appl... | 37.477169 | 80 | 0.683034 |
02b8617a1c2b1e90a05849f723982ce5233c6da1 | 118 | py | Python | models/__init__.py | pkudba/SCL | 78e85344a579075d3d07ed77eab8e13144321c6a | [
"MIT"
] | 7 | 2021-09-02T06:47:35.000Z | 2022-03-09T05:13:00.000Z | models/__init__.py | pkudba/SCL | 78e85344a579075d3d07ed77eab8e13144321c6a | [
"MIT"
] | null | null | null | models/__init__.py | pkudba/SCL | 78e85344a579075d3d07ed77eab8e13144321c6a | [
"MIT"
] | null | null | null | from models.layer import EdgeConvolution
from models.layer import Pooler
from models.layer import MultiEdgeConvolution | 39.333333 | 45 | 0.881356 |
81b92feb035cc456e7af13114043a60d483f97d0 | 2,124 | py | Python | oop_patterns_python/week_3/patern_decorator/hero_eff.py | assassinen/coursera_mfti_python | eee7b3c55256f391c1be32924fa1ad3364b307f2 | [
"Apache-2.0"
] | null | null | null | oop_patterns_python/week_3/patern_decorator/hero_eff.py | assassinen/coursera_mfti_python | eee7b3c55256f391c1be32924fa1ad3364b307f2 | [
"Apache-2.0"
] | null | null | null | oop_patterns_python/week_3/patern_decorator/hero_eff.py | assassinen/coursera_mfti_python | eee7b3c55256f391c1be32924fa1ad3364b307f2 | [
"Apache-2.0"
] | null | null | null | class AbstractEffect(Hero, ABC):
def __init__(self, base):
self.base = base
@abstractmethod
def get_stats(self):
return self.base.get_stats()
def get_positive_effects(self):
return self.base.get_positive_effects()
def get_negative_effects(self):
return self.base.ge... | 27.947368 | 50 | 0.591808 |
93d7e55262d0ca154858dd842c314c6e5a5c2518 | 8,167 | py | Python | contrib/verify-commits/verify-commits.py | KaSt/emircoin | 5d05003dfde81eb6cacc8505f55b2e6b816e698a | [
"MIT"
] | null | null | null | contrib/verify-commits/verify-commits.py | KaSt/emircoin | 5d05003dfde81eb6cacc8505f55b2e6b816e698a | [
"MIT"
] | null | null | null | contrib/verify-commits/verify-commits.py | KaSt/emircoin | 5d05003dfde81eb6cacc8505f55b2e6b816e698a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Verify commits against a trusted keys list."""
import argparse
import hashlib
import logging
import os
impor... | 49.198795 | 190 | 0.629729 |
9206a844b6dc78abf9af7e2d171c00ccba71b4e7 | 3,725 | py | Python | torchvision/prototype/features/_image.py | willfrey/vision | 56fb0bf5796ac374d4e353032e418236cd73c554 | [
"BSD-3-Clause"
] | 1 | 2022-01-07T11:30:24.000Z | 2022-01-07T11:30:24.000Z | torchvision/prototype/features/_image.py | willfrey/vision | 56fb0bf5796ac374d4e353032e418236cd73c554 | [
"BSD-3-Clause"
] | null | null | null | torchvision/prototype/features/_image.py | willfrey/vision | 56fb0bf5796ac374d4e353032e418236cd73c554 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import annotations
import warnings
from typing import Any, Optional, Union, Tuple, cast
import torch
from torchvision._utils import StrEnum
from torchvision.transforms.functional import to_pil_image
from torchvision.utils import draw_bounding_boxes
from torchvision.utils import make_grid
from ._bound... | 33.258929 | 116 | 0.631678 |
054c79783eb83d13b6967380a4d32202d42fc0f1 | 4,220 | py | Python | tests/app/api_v0/test_revision.py | kreelsama/server | b4179622761e6c1766a78838d0e1d0d444e8e8b0 | [
"BSD-3-Clause"
] | null | null | null | tests/app/api_v0/test_revision.py | kreelsama/server | b4179622761e6c1766a78838d0e1d0d444e8e8b0 | [
"BSD-3-Clause"
] | null | null | null | tests/app/api_v0/test_revision.py | kreelsama/server | b4179622761e6c1766a78838d0e1d0d444e8e8b0 | [
"BSD-3-Clause"
] | null | null | null | # TODO: split E2E test to unit test
import pytest
from starlette.testclient import TestClient
from tests.fixtures.mock_service import MockUserService
person_revisions_api_prefix = "/v0/revisions/persons"
@pytest.mark.env("e2e", "database")
def test_person_revision_basic(client: TestClient, mock_user_service: MockU... | 25.889571 | 87 | 0.640284 |
9ac5bad52e00207703c02e756a15b8a1b870479d | 1,101 | py | Python | roles/sos/files/citc.py | jtorrex/ansible-citc | e9099e2a9c58d8b53f1454524dafb0ab0184aa39 | [
"MIT"
] | null | null | null | roles/sos/files/citc.py | jtorrex/ansible-citc | e9099e2a9c58d8b53f1454524dafb0ab0184aa39 | [
"MIT"
] | null | null | null | roles/sos/files/citc.py | jtorrex/ansible-citc | e9099e2a9c58d8b53f1454524dafb0ab0184aa39 | [
"MIT"
] | 1 | 2020-12-09T14:53:38.000Z | 2020-12-09T14:53:38.000Z | # This file is part of the sos project: https://github.com/sosreport/sos
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions of
# version 2 of the GNU General Public License.
#
# See the LICENSE file in the source distribution ... | 28.973684 | 74 | 0.605813 |
01a773b57c88512613fc4f877c95a15569eb60e5 | 3,962 | py | Python | nanoCameras/PixelLink_nanoCam.py | hzg-wpi/p05nano | af13c97256e754e30512d4c9ef88c287f09dedaa | [
"MIT"
] | null | null | null | nanoCameras/PixelLink_nanoCam.py | hzg-wpi/p05nano | af13c97256e754e30512d4c9ef88c287f09dedaa | [
"MIT"
] | null | null | null | nanoCameras/PixelLink_nanoCam.py | hzg-wpi/p05nano | af13c97256e754e30512d4c9ef88c287f09dedaa | [
"MIT"
] | null | null | null | import time
import PyTango
import p05.common.PyTangoProxyConstants as proxies
import p05.tools.misc as misc
class PixelLink_nanoCam():
def __init__(self, tPixelLink=None, tTrigger=None, imageDir=None, exptime=None):
if tPixelLink == None:
self.tPixelLink = PyTango.DeviceProxy(proxies.camera_... | 32.743802 | 117 | 0.617617 |
804a4f0eaf46c95d325eb5367e461d2f468be2b1 | 1,315 | py | Python | moonfire_tokenomics/data/pgx.py | moonfire-ventures/tokenomics | 4152bfd0e831262139ce50c6baae2748f19af850 | [
"MIT"
] | 2 | 2022-03-30T17:12:03.000Z | 2022-03-30T17:14:20.000Z | moonfire_tokenomics/data/pgx.py | moonfire-ventures/tokenomics | 4152bfd0e831262139ce50c6baae2748f19af850 | [
"MIT"
] | null | null | null | moonfire_tokenomics/data/pgx.py | moonfire-ventures/tokenomics | 4152bfd0e831262139ce50c6baae2748f19af850 | [
"MIT"
] | null | null | null | from moonfire_tokenomics.data_types import Allocation, AllocationRecord, Blockchain, Category, CommonType, Sector, Token
pgx = Token(
name="PGX",
project="Pegaxy",
sector=Sector.GAMING,
blockchain=[Blockchain.ETH, Blockchain.POLY],
category=[Category.GOV],
capped=True,
allocations=[
... | 45.344828 | 132 | 0.662357 |
c6e214cd443958f10615cb767e1c2534bc37209e | 539 | py | Python | practises/test-addprice.py | m860/data-analysis-with-python | e96a5ae79913d7805383ea3dfb8dcc731c60681d | [
"MIT"
] | null | null | null | practises/test-addprice.py | m860/data-analysis-with-python | e96a5ae79913d7805383ea3dfb8dcc731c60681d | [
"MIT"
] | null | null | null | practises/test-addprice.py | m860/data-analysis-with-python | e96a5ae79913d7805383ea3dfb8dcc731c60681d | [
"MIT"
] | null | null | null | # -*- coding: UTF-8 -*-
from classes import Stock, format
import numpy as np
import os
format('original/SH#600000.txt', 'formated/SH#600000.json')
stock = Stock()
stock.load('formated/SH#600000.json')
print (len(stock.items))
last = stock.items.pop(-1)
print (last)
stock.addPrice({
'date': '2016/12/12',
'ope... | 21.56 | 59 | 0.64564 |
2a32b25fb149c1d8fd25dfefcf19abe3c52ea84c | 1,901 | py | Python | test/test_mission/test_start_time.py | theendsofinvention/elib_miz | 13111076ddb63b2582fe61b96b44998343b82464 | [
"MIT"
] | null | null | null | test/test_mission/test_start_time.py | theendsofinvention/elib_miz | 13111076ddb63b2582fe61b96b44998343b82464 | [
"MIT"
] | 6 | 2018-10-23T05:16:58.000Z | 2019-09-30T18:05:07.000Z | test/test_mission/test_start_time.py | etcher-be/elib_miz | 13111076ddb63b2582fe61b96b44998343b82464 | [
"MIT"
] | null | null | null | # coding=utf-8
"""
Tests start time
"""
import pytest
from hypothesis import given, settings, strategies as st
from elib_miz.miz import Miz
@given(time=st.integers(0, 86399))
@settings(max_examples=1)
def test_mission_start_time(time, mission):
assert mission.mission_start_time == 43200
assert mission.missi... | 34.563636 | 100 | 0.735402 |
9227bd524325accb51e1c79e38efbfa88bd7d4e9 | 4,186 | py | Python | Scripts/calc_MinEns_Maps.py | zmlabe/StratoVari | c5549f54482a2b05e89bded3e3b0b3c9faa686f3 | [
"MIT"
] | 4 | 2019-11-23T19:44:21.000Z | 2020-02-20T16:54:45.000Z | Scripts/calc_MinEns_Maps.py | zmlabe/StratoVari | c5549f54482a2b05e89bded3e3b0b3c9faa686f3 | [
"MIT"
] | null | null | null | Scripts/calc_MinEns_Maps.py | zmlabe/StratoVari | c5549f54482a2b05e89bded3e3b0b3c9faa686f3 | [
"MIT"
] | 2 | 2019-06-21T19:27:55.000Z | 2021-02-12T19:13:22.000Z | """
Functions to calculate minimum number of ensembles for 2d maps
Notes
-----
Author : Zachary Labe
Date : 27 June 2019
Usage
-----
[1] computeMean(datain,typemean)
[2] computeSTD(datain,df)
[3] computePooledSD(xstd,ystd,xn,yn)
[4] computeMinEns(future,climo,alpha)
"""
def computeMean(... | 35.176471 | 79 | 0.438127 |
6ff79d27038f0bd93f61249d38a978c2a6b2b345 | 119 | py | Python | subtypes/datetime_/__init__.py | matthewgdv/subtypes | 52caa785f2861c6a9b867ed9b6c3756f8015689b | [
"MIT"
] | 1 | 2019-11-20T00:25:45.000Z | 2019-11-20T00:25:45.000Z | subtypes/datetime_/__init__.py | matthewgdv/subtypes | 52caa785f2861c6a9b867ed9b6c3756f8015689b | [
"MIT"
] | null | null | null | subtypes/datetime_/__init__.py | matthewgdv/subtypes | 52caa785f2861c6a9b867ed9b6c3756f8015689b | [
"MIT"
] | null | null | null | __all__ = ["Time", "Date", "DateTime"]
from .time_ import Time
from .date import Date
from .datetime_ import DateTime
| 19.833333 | 38 | 0.731092 |
b8401b579d45a5d399378f448064f0970f0d95c8 | 3,291 | py | Python | modules/util.py | tzhaojustdoit/Lane-Detection | a9b4351c926d8355481143847462d5ef48f498f8 | [
"MIT"
] | null | null | null | modules/util.py | tzhaojustdoit/Lane-Detection | a9b4351c926d8355481143847462d5ef48f498f8 | [
"MIT"
] | null | null | null | modules/util.py | tzhaojustdoit/Lane-Detection | a9b4351c926d8355481143847462d5ef48f498f8 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import numpy as np
import cv2
def plot_side_by_side(images, names):
""" plot two images side by side """
f, (ax1, ax2) = plt.subplots(1, 2, figsize=(24, 9))
f.tight_layout()
ax1.imshow(images[0])
ax1.set_title(names[0], fontsize=25)
ax2.imshow(images[1])
ax2.s... | 40.134146 | 100 | 0.618353 |
2518dbbaa200b8dfb8841d35a499b2bf0accd23b | 150 | py | Python | 01 Python Basics/007_SingleOrDoubleQuotes.py | PawanRamaMali/Python | 278cb21e2c71399639fe7d34519d9dac36506a15 | [
"MIT"
] | 6 | 2021-09-23T10:34:48.000Z | 2022-02-26T06:52:36.000Z | 01_PythonTutorial/007_SingleOrDoubleQuotes.py | ChromeOwO/Python-Tutorial-W3Schools | 0f22be2eea493c7e331d15b72847a34a4b748884 | [
"MIT"
] | null | null | null | 01_PythonTutorial/007_SingleOrDoubleQuotes.py | ChromeOwO/Python-Tutorial-W3Schools | 0f22be2eea493c7e331d15b72847a34a4b748884 | [
"MIT"
] | 4 | 2021-06-04T20:23:48.000Z | 2022-01-23T05:48:19.000Z | #Single or Double Quotes?
#String variables can be declared either by using single or double quotes:
x = "John"
# is the same as
x = 'John'
print(x) | 18.75 | 74 | 0.72 |
185863ac56bb0cf68624de14f61b770c7b2e6ce4 | 2,220 | py | Python | predict.py | aswalin/squad-1 | 024cfc0c39e8e0c8d3306e11c5b42f370e7668f1 | [
"MIT"
] | 17 | 2017-08-18T01:10:53.000Z | 2020-04-11T08:07:39.000Z | predict.py | aswalin/squad-1 | 024cfc0c39e8e0c8d3306e11c5b42f370e7668f1 | [
"MIT"
] | 2 | 2018-07-05T00:02:45.000Z | 2019-05-05T10:34:39.000Z | predict.py | AnatoliiPotapov/squad | 024cfc0c39e8e0c8d3306e11c5b42f370e7668f1 | [
"MIT"
] | 8 | 2017-09-17T15:42:54.000Z | 2019-10-16T09:56:40.000Z | # from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
import numpy as np
import argparse
import json
import os
from tqdm import tqdm
from keras import backend as K
from keras.models import Model, load_model
from layers import Argmax
from data import BatchGen,... | 30 | 78 | 0.694144 |
a5922d897525553f18082bf14641c7d03943315d | 29,949 | py | Python | fastapi/applications.py | threfo/fastapi | 60531aab15fe15c6c3f55e38a9e48c17147889cd | [
"MIT"
] | null | null | null | fastapi/applications.py | threfo/fastapi | 60531aab15fe15c6c3f55e38a9e48c17147889cd | [
"MIT"
] | null | null | null | fastapi/applications.py | threfo/fastapi | 60531aab15fe15c6c3f55e38a9e48c17147889cd | [
"MIT"
] | null | null | null | from typing import Any, Callable, Dict, List, Optional, Sequence, Type, Union
from fastapi import routing
from fastapi.concurrency import AsyncExitStack
from fastapi.encoders import DictIntStrAny, SetIntStr
from fastapi.exception_handlers import (
http_exception_handler,
request_validation_exception_handler,
)... | 40.913934 | 88 | 0.636215 |
16f6f66a7f5fc4c9b1de1841d674cef1eb98594b | 7,219 | py | Python | preimutils/segmentations/voc/dataset.py | mrl-amrl/preimutils | e553d3a7ca768539f4ff7ca5fda75f0aa1a8b5c1 | [
"MIT"
] | 6 | 2020-02-17T18:54:48.000Z | 2022-01-30T09:05:28.000Z | preimutils/segmentations/voc/dataset.py | mrl-amrl/preimutils | e553d3a7ca768539f4ff7ca5fda75f0aa1a8b5c1 | [
"MIT"
] | null | null | null | preimutils/segmentations/voc/dataset.py | mrl-amrl/preimutils | e553d3a7ca768539f4ff7ca5fda75f0aa1a8b5c1 | [
"MIT"
] | 3 | 2022-01-09T16:58:34.000Z | 2022-03-10T07:10:51.000Z | import os
import random
from glob import glob
from tqdm import tqdm
from . import utils
class LabelMap:
"""A class on to work and handel labelmap.txt classes
Attributes:
None
Args:
label_map_path (:obj:`str`): you should have a txt file like this
object1:0,0,0::
... | 33.267281 | 164 | 0.581521 |
af4c9d7a693c1e321e33198c4eabf0ad5062f93a | 2,972 | py | Python | CIM16/CDPSM/Balanced/IEC61970/Wires/TapChanger.py | MaximeBaudette/PyCIM | d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14 | [
"MIT"
] | null | null | null | CIM16/CDPSM/Balanced/IEC61970/Wires/TapChanger.py | MaximeBaudette/PyCIM | d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14 | [
"MIT"
] | null | null | null | CIM16/CDPSM/Balanced/IEC61970/Wires/TapChanger.py | MaximeBaudette/PyCIM | d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14 | [
"MIT"
] | 1 | 2021-04-02T18:04:49.000Z | 2021-04-02T18:04:49.000Z | # Copyright (C) 2010-2011 Richard Lincoln
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish... | 49.533333 | 172 | 0.721063 |
b151f11e641a963f227e99d999eec86b1cb2268c | 4,016 | py | Python | dataprep/eda/report.py | kla55/dataprep | 75542cda64570f1fe3c4ac61e670cc0ce2febaa3 | [
"MIT"
] | null | null | null | dataprep/eda/report.py | kla55/dataprep | 75542cda64570f1fe3c4ac61e670cc0ce2febaa3 | [
"MIT"
] | null | null | null | dataprep/eda/report.py | kla55/dataprep | 75542cda64570f1fe3c4ac61e670cc0ce2febaa3 | [
"MIT"
] | null | null | null | """
This module implements the Report class.
"""
import sys
import webbrowser
from pathlib import Path
from tempfile import NamedTemporaryFile
from bokeh.io import save
from bokeh.io.notebook import load_notebook
from bokeh.embed.notebook import notebook_content
from bokeh.models import LayoutDOM
from bokeh.resou... | 29.748148 | 160 | 0.580428 |
6b5fa2ea7ddc2486ef9accf07df56e7323d5677f | 1,527 | py | Python | arpeggio/tests/regressions/test_memoization.py | pombredanne/Arpeggio | d7380ed4171663f2b027c356495a5ca352fc3fc8 | [
"MIT"
] | 127 | 2015-01-01T14:02:29.000Z | 2018-12-27T12:59:09.000Z | arpeggio/tests/regressions/test_memoization.py | pombredanne/Arpeggio | d7380ed4171663f2b027c356495a5ca352fc3fc8 | [
"MIT"
] | 46 | 2018-12-27T17:20:58.000Z | 2022-03-20T16:38:30.000Z | arpeggio/tests/regressions/test_memoization.py | pombredanne/Arpeggio | d7380ed4171663f2b027c356495a5ca352fc3fc8 | [
"MIT"
] | 30 | 2015-06-22T03:57:39.000Z | 2018-07-07T08:15:06.000Z | from __future__ import unicode_literals
import pytest
import sys
from arpeggio import ParserPython
def test_memoization_positive(capsys):
'''
Test that already matched rule is found in the cache on
subsequent matches.
Args:
capsys - pytest fixture for output capture
'''
def grammar():... | 28.811321 | 79 | 0.658153 |
acac04879758a05e77ce08e99eb6a0fa4317273c | 4,905 | py | Python | scripts/azurerm_management_lock.py | piotr-gbyliczek/py-az2tf | 67ba6de7128bfabd33db0fb707a9f9b9ee2b273d | [
"MIT"
] | 186 | 2019-05-30T23:57:02.000Z | 2022-03-25T21:45:12.000Z | scripts/azurerm_management_lock.py | piotr-gbyliczek/py-az2tf | 67ba6de7128bfabd33db0fb707a9f9b9ee2b273d | [
"MIT"
] | 56 | 2019-05-31T00:58:34.000Z | 2022-03-15T22:04:45.000Z | scripts/azurerm_management_lock.py | piotr-gbyliczek/py-az2tf | 67ba6de7128bfabd33db0fb707a9f9b9ee2b273d | [
"MIT"
] | 84 | 2019-05-31T00:01:23.000Z | 2022-03-14T13:40:34.000Z | import uuid
def azurerm_management_lock(crf,cde,crg,headers,requests,sub,json,az2tfmess,cldurl):
# management locks
tfp="azurerm_management_lock"
azr=""
if crf in tfp:
# REST
# # print "REST VNets"
url="https://" + cldurl + "/subscriptions/" + sub + "/providers/Microsoft.Aut... | 35.543478 | 102 | 0.416718 |
8cf836903209aa69ce39b4ac3070e771e1811d89 | 154 | py | Python | web/settings/__init__.py | nonapod/thunderhawk | ea16c6a0f3562126ee112a15383abc607a09a118 | [
"Apache-2.0"
] | 1 | 2021-09-06T07:43:16.000Z | 2021-09-06T07:43:16.000Z | web/settings/__init__.py | nonapod/thunderhawk | ea16c6a0f3562126ee112a15383abc607a09a118 | [
"Apache-2.0"
] | null | null | null | web/settings/__init__.py | nonapod/thunderhawk | ea16c6a0f3562126ee112a15383abc607a09a118 | [
"Apache-2.0"
] | null | null | null | from flask import Blueprint
settingsBlueprint = Blueprint("settings", __name__, template_folder="templates", url_prefix='/settings')
from . import views
| 30.8 | 104 | 0.798701 |
bcd343a9945d80af7ea14d69566c14d86094a9dc | 7,514 | py | Python | pkg/Python27/Lib/site-packages/Crypto/Hash/HMAC.py | jkolokotronis/ds_mod_tools | d9fd4def34f6adfd0e2b176d0a9bf2a3dfd43f93 | [
"MIT"
] | null | null | null | pkg/Python27/Lib/site-packages/Crypto/Hash/HMAC.py | jkolokotronis/ds_mod_tools | d9fd4def34f6adfd0e2b176d0a9bf2a3dfd43f93 | [
"MIT"
] | null | null | null | pkg/Python27/Lib/site-packages/Crypto/Hash/HMAC.py | jkolokotronis/ds_mod_tools | d9fd4def34f6adfd0e2b176d0a9bf2a3dfd43f93 | [
"MIT"
] | null | null | null | # HMAC.py - Implements the HMAC algorithm as described by RFC 2104.
#
# ===================================================================
# Portions Copyright (c) 2001, 2002, 2003 Python Software Foundation;
# All Rights Reserved
#
# This file contains code from the Python 2.2 hmac.py module (the
# "Original C... | 35.276995 | 85 | 0.615252 |
7a5419dfb0ac2601d023a2d5287d07237111fd56 | 2,157 | py | Python | src/oci/waf/models/web_app_firewall_collection.py | LaudateCorpus1/oci-python-sdk | b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | src/oci/waf/models/web_app_firewall_collection.py | LaudateCorpus1/oci-python-sdk | b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | src/oci/waf/models/web_app_firewall_collection.py | LaudateCorpus1/oci-python-sdk | b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | # coding: utf-8
# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c... | 30.380282 | 245 | 0.662958 |
c3899a4d59a8f00c8584dbbdaca5d9dbb7f71fed | 2,902 | py | Python | gremlin-python/src/main/python/tests/driver/test_driver_remote_connection_threaded.py | helpspace-co/tinkerpop | a31e8f402237de3491397d4f8bbd6a9761cd9068 | [
"Apache-2.0"
] | 1,425 | 2016-06-13T06:08:39.000Z | 2022-03-28T09:02:43.000Z | gremlin-python/src/main/python/tests/driver/test_driver_remote_connection_threaded.py | helpspace-co/tinkerpop | a31e8f402237de3491397d4f8bbd6a9761cd9068 | [
"Apache-2.0"
] | 1,049 | 2016-06-10T10:25:59.000Z | 2022-03-30T11:25:44.000Z | gremlin-python/src/main/python/tests/driver/test_driver_remote_connection_threaded.py | helpspace-co/tinkerpop | a31e8f402237de3491397d4f8bbd6a9761cd9068 | [
"Apache-2.0"
] | 732 | 2016-06-13T20:53:51.000Z | 2022-03-30T06:49:29.000Z | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | 29.917526 | 87 | 0.66816 |
0de65ad701c8eb597b3459f2dd9f2cbcbe56f86c | 1,974 | py | Python | staicoin/wallet/key_val_store.py | d00kSI/staicoin-blockchain | 5783a48271c8145c8eea93169df13a9ed32817ad | [
"Apache-2.0"
] | 1 | 2021-12-03T02:39:29.000Z | 2021-12-03T02:39:29.000Z | staicoin/wallet/key_val_store.py | d00kSI/staicoin-blockchain | 5783a48271c8145c8eea93169df13a9ed32817ad | [
"Apache-2.0"
] | null | null | null | staicoin/wallet/key_val_store.py | d00kSI/staicoin-blockchain | 5783a48271c8145c8eea93169df13a9ed32817ad | [
"Apache-2.0"
] | null | null | null | from typing import Any
import aiosqlite
from staicoin.util.byte_types import hexstr_to_bytes
from staicoin.util.db_wrapper import DBWrapper
from staicoin.util.streamable import Streamable
class KeyValStore:
"""
Multipurpose persistent key-value store
"""
db_connection: aiosqlite.Connection
db_w... | 30.369231 | 100 | 0.641337 |
df3ff8783716a479c8d197b39040b66fb84d9384 | 8,085 | py | Python | contrib/devtools/update-translations.py | wolfoxonly/scn | 21265f628420b8984b04dcbb05710ecc3ddd1666 | [
"MIT"
] | null | null | null | contrib/devtools/update-translations.py | wolfoxonly/scn | 21265f628420b8984b04dcbb05710ecc3ddd1666 | [
"MIT"
] | null | null | null | contrib/devtools/update-translations.py | wolfoxonly/scn | 21265f628420b8984b04dcbb05710ecc3ddd1666 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Copyright (c) 2014 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.
'''
Run this script from the root of the repository to update all translations from
transifex.
It will do the follo... | 38.684211 | 124 | 0.635993 |
81d29c5123554996118cd273519f3e61ec0eed4f | 14,421 | py | Python | ShanHang/Spider_ShanH_demo.py | penetest/AirPCrawler | 89a2a2f3f66d6693ba492fa79a47953057aaf888 | [
"MIT"
] | 3 | 2017-07-05T06:15:59.000Z | 2020-04-07T13:07:05.000Z | ShanHang/Spider_ShanH_demo.py | penetest/AirPCrawler | 89a2a2f3f66d6693ba492fa79a47953057aaf888 | [
"MIT"
] | null | null | null | ShanHang/Spider_ShanH_demo.py | penetest/AirPCrawler | 89a2a2f3f66d6693ba492fa79a47953057aaf888 | [
"MIT"
] | 3 | 2017-07-18T02:51:54.000Z | 2020-05-03T16:53:21.000Z | #! coding:utf-8
import requests
import sys
from bs4 import BeautifulSoup
import csv
import json
import time,datetime
import re
#from adsl import Adsl
import codecs
reload(sys)
sys.setdefaultencoding('utf8')
h1 = {'Accept':'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
'Accept-Enc... | 54.011236 | 1,409 | 0.580958 |
5346af945ff5e7d2cdfb6a54963e9be3047c0af3 | 8,621 | py | Python | tests/dashboards/superset_factory_util.py | psbsgic/rabbitai | 769e120ba605d56ac076f810a549c38dac410c8e | [
"Apache-2.0"
] | null | null | null | tests/dashboards/superset_factory_util.py | psbsgic/rabbitai | 769e120ba605d56ac076f810a549c38dac410c8e | [
"Apache-2.0"
] | null | null | null | tests/dashboards/superset_factory_util.py | psbsgic/rabbitai | 769e120ba605d56ac076f810a549c38dac410c8e | [
"Apache-2.0"
] | 1 | 2021-07-09T16:29:50.000Z | 2021-07-09T16:29:50.000Z | import logging
from typing import List, Optional
from flask_appbuilder import Model
from flask_appbuilder.security.sqla.models import User
from rabbitai import appbuilder
from rabbitai.connectors.sqla.models import SqlaTable, sqlatable_user
from rabbitai.models.core import Database
from rabbitai.models.dashboard impo... | 29.727586 | 88 | 0.674284 |
658eb97dfee4b39c9deee3f2e4a48e7f57a5e448 | 5,530 | py | Python | gamestonk_terminal/stocks/dark_pool_shorts/finra_view.py | elan17/GamestonkTerminal | f958f8275dc15ffaf30c1f0652f5b033725b7f10 | [
"MIT"
] | 1,835 | 2021-05-09T02:55:06.000Z | 2022-03-29T12:37:05.000Z | gamestonk_terminal/stocks/dark_pool_shorts/finra_view.py | elan17/GamestonkTerminal | f958f8275dc15ffaf30c1f0652f5b033725b7f10 | [
"MIT"
] | 569 | 2021-05-09T15:59:41.000Z | 2022-03-29T12:25:16.000Z | gamestonk_terminal/stocks/dark_pool_shorts/finra_view.py | elan17/GamestonkTerminal | f958f8275dc15ffaf30c1f0652f5b033725b7f10 | [
"MIT"
] | 268 | 2021-05-10T21:46:50.000Z | 2022-03-28T09:18:38.000Z | """ FINRA View """
__docformat__ = "numpy"
import os
from typing import List
import pandas as pd
from matplotlib import pyplot as plt
import matplotlib.dates as mdates
from gamestonk_terminal.stocks.dark_pool_shorts import finra_model
from gamestonk_terminal.config_plot import PLOT_DPI
from gamestonk_terminal import f... | 28.214286 | 92 | 0.607776 |
fad70edf84b391c3b352247a581255a6f15e47ce | 2,160 | py | Python | remedy/pagination.py | AllieDeford/radremedy | 8ef41fe150938a449ba3494efe0e954d2c03436f | [
"BSD-3-Clause"
] | null | null | null | remedy/pagination.py | AllieDeford/radremedy | 8ef41fe150938a449ba3494efe0e954d2c03436f | [
"BSD-3-Clause"
] | null | null | null | remedy/pagination.py | AllieDeford/radremedy | 8ef41fe150938a449ba3494efe0e954d2c03436f | [
"BSD-3-Clause"
] | null | null | null | """
pagination.py
Defines a basic pagination structure that can be used when displaying
a list of search results.
Based on http://flask.pocoo.org/snippets/44/
"""
from math import ceil
class Pagination(object):
"""
A basic pagination structure.
"""
def __init__(self, page, per_page, total_count):... | 27.341772 | 71 | 0.545833 |
449fe11ae3bd4288232855d3a258780aa5b7f242 | 16,692 | py | Python | sdk/python/pulumi_azure/network/ip_group.py | henriktao/pulumi-azure | f1cbcf100b42b916da36d8fe28be3a159abaf022 | [
"ECL-2.0",
"Apache-2.0"
] | 109 | 2018-06-18T00:19:44.000Z | 2022-02-20T05:32:57.000Z | sdk/python/pulumi_azure/network/ip_group.py | henriktao/pulumi-azure | f1cbcf100b42b916da36d8fe28be3a159abaf022 | [
"ECL-2.0",
"Apache-2.0"
] | 663 | 2018-06-18T21:08:46.000Z | 2022-03-31T20:10:11.000Z | sdk/python/pulumi_azure/network/ip_group.py | henriktao/pulumi-azure | f1cbcf100b42b916da36d8fe28be3a159abaf022 | [
"ECL-2.0",
"Apache-2.0"
] | 41 | 2018-07-19T22:37:38.000Z | 2022-03-14T10:56:26.000Z | # 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... | 42.473282 | 186 | 0.635274 |
28635d9dfc10b2b1bbb06b13b5f26f547914a510 | 1,120 | py | Python | manage.py | khangmach/fle-home | 42c376bc9aca5a440a09e78973ea1b48a0827e3c | [
"MIT"
] | null | null | null | manage.py | khangmach/fle-home | 42c376bc9aca5a440a09e78973ea1b48a0827e3c | [
"MIT"
] | null | null | null | manage.py | khangmach/fle-home | 42c376bc9aca5a440a09e78973ea1b48a0827e3c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import glob
import os
import sys
def setup():
"""Fake command for setting up fle_site"""
from django.core.management import call_command
PROJECT_PATH = os.path.realpath(os.path.join(os.path.dirname(__file__), "fle_site"))
print "Setting up static files..."
call_command('colle... | 30.27027 | 88 | 0.697321 |
888e31b53ae96ebd05031b0f7e4859e3e0955d03 | 3,070 | py | Python | src/test/lib/db/test_object_list_dao.py | kbinani/dxrip | ef170fd895c6d9bb6c05bc2026e9fa9bcd0b1908 | [
"MIT"
] | 4 | 2015-09-23T14:12:07.000Z | 2021-10-04T21:03:32.000Z | src/test/lib/db/test_object_list_dao.py | kbinani/dxrip | ef170fd895c6d9bb6c05bc2026e9fa9bcd0b1908 | [
"MIT"
] | null | null | null | src/test/lib/db/test_object_list_dao.py | kbinani/dxrip | ef170fd895c6d9bb6c05bc2026e9fa9bcd0b1908 | [
"MIT"
] | 2 | 2018-06-26T14:59:11.000Z | 2021-09-01T01:50:20.000Z | import unittest
import dxrip
import xmlrunner
import sqlite3
import os
import tempfile
class TestObjectListDao(unittest.TestCase):
def test_init(self):
test_repository = self.__create_test_repository()
config = dxrip.lib.Config(test_repository)
dao = dxrip.lib.db.ObjectListDao(co... | 42.638889 | 112 | 0.64658 |
66a27cfbf490afc06a0624af0dc7f69b34d7d95f | 7,547 | py | Python | src/tox_ansible/ansible/__init__.py | ansible-community/tox-ansible | 5024018f9e103a2fb84dc37b9fa92ec9649fac00 | [
"MIT"
] | 7 | 2020-10-10T13:58:39.000Z | 2021-04-17T14:57:59.000Z | src/tox_ansible/ansible/__init__.py | ansible-community/tox-ansible | 5024018f9e103a2fb84dc37b9fa92ec9649fac00 | [
"MIT"
] | 52 | 2020-08-19T16:44:08.000Z | 2021-08-31T13:34:02.000Z | src/tox_ansible/ansible/__init__.py | tox-dev/tox-ansible | 53e6e22c3047e50cb76d7076dee213b33387940b | [
"MIT"
] | 5 | 2020-08-19T19:02:03.000Z | 2021-04-14T04:17:44.000Z | import copy
import glob
import logging
import sys
from os import path
from typing import Any, Dict
from tox_ansible._yaml import load_yaml
from tox_ansible.tox_helper import Tox
from ..tox_ansible_test_case import ToxAnsibleTestCase
from ..tox_lint_case import ToxLintCase
from ..tox_molecule_case import ToxMoleculeCa... | 36.458937 | 81 | 0.572545 |
0fccbfa681312a0daf33957b12ad64946fcfc395 | 1,734 | py | Python | neuralnetworks/classifiers/classifier.py | v0lta/tfkaldi | 4772e881cc168439723c19f69a2425588f661060 | [
"MIT"
] | 57 | 2017-01-19T15:58:46.000Z | 2021-01-12T17:57:31.000Z | neuralnetworks/classifiers/classifier.py | v0lta/tfkaldi | 4772e881cc168439723c19f69a2425588f661060 | [
"MIT"
] | null | null | null | neuralnetworks/classifiers/classifier.py | v0lta/tfkaldi | 4772e881cc168439723c19f69a2425588f661060 | [
"MIT"
] | 15 | 2017-02-25T17:44:35.000Z | 2019-09-23T14:03:18.000Z | '''@file classifier.py
The abstract class for a neural network classifier'''
from abc import ABCMeta, abstractmethod
class Classifier(object):
'''This an abstract class defining a neural net classifier'''
__metaclass__ = ABCMeta
def __init__(self, output_dim):
'''classifier constructor'''
... | 38.533333 | 80 | 0.630911 |
438ef7200c533d381cd2a3cdfcad21533ca585d4 | 1,016 | py | Python | src/drugex/cli.py | cthoyt/DrugEx | 9e4d31adb2c65d0afc852948f502c79dcf8308a3 | [
"MIT"
] | 5 | 2020-05-29T13:19:04.000Z | 2022-03-09T12:54:58.000Z | src/drugex/cli.py | cthoyt/DrugEx | 9e4d31adb2c65d0afc852948f502c79dcf8308a3 | [
"MIT"
] | null | null | null | src/drugex/cli.py | cthoyt/DrugEx | 9e4d31adb2c65d0afc852948f502c79dcf8308a3 | [
"MIT"
] | 1 | 2020-05-20T13:15:42.000Z | 2020-05-20T13:15:42.000Z | # -*- coding: utf-8 -*-
"""The command line interface for ``drugex``.
Why does this file exist, and why not put this in ``__main__``?
You might be tempted to import things from ``__main__`` later, but that will cause
problems--the code will get executed twice:
- When you run `python3 -m drugex` python will execute
... | 26.051282 | 82 | 0.705709 |
25521f69c0d00aaa907fd301454b7dd37cea8ca1 | 7,736 | py | Python | train_atta_mnist.py | KyleSuchenkai/ATTA | 107fd6dc2549fb13e4f7720dfeeec8d968cc2733 | [
"MIT"
] | null | null | null | train_atta_mnist.py | KyleSuchenkai/ATTA | 107fd6dc2549fb13e4f7720dfeeec8d968cc2733 | [
"MIT"
] | null | null | null | train_atta_mnist.py | KyleSuchenkai/ATTA | 107fd6dc2549fb13e4f7720dfeeec8d968cc2733 | [
"MIT"
] | null | null | null | """
This file trains ATTA models on MNIST dataset.
"""
from __future__ import print_function
import os
import sys
import argparse
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from torchvision import datasets, transforms
import numpy as np
from torch.autograd import Vari... | 39.469388 | 127 | 0.633273 |
af2e1e7dcd7e52f4d3648009c8c0eeb8e71a3341 | 401 | py | Python | databaseProj/wsgi.py | Greko2017/kenda-travel-new | 9fc1fcbd160847a8d266a50345f2bda9a2da99de | [
"MIT"
] | 25 | 2019-01-16T16:24:08.000Z | 2022-03-03T04:43:29.000Z | databaseProj/wsgi.py | Greko2017/kenda-travel-new | 9fc1fcbd160847a8d266a50345f2bda9a2da99de | [
"MIT"
] | 3 | 2018-08-02T08:13:37.000Z | 2020-10-15T13:41:17.000Z | databaseProj/wsgi.py | Greko2017/kenda-travel-new | 9fc1fcbd160847a8d266a50345f2bda9a2da99de | [
"MIT"
] | 16 | 2019-03-25T11:19:49.000Z | 2021-12-03T10:04:17.000Z | """
WSGI config for databaseProj 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.0/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_... | 23.588235 | 78 | 0.790524 |
72b5d9442c8500483efc92849a062b66023cf0d1 | 1,025 | py | Python | examples/vhdl/coverage/run.py | olafvandenberg/vunit | 4f78fc4fa0f10b4cf50a6d377793d374ae19df64 | [
"Artistic-2.0",
"Apache-2.0"
] | null | null | null | examples/vhdl/coverage/run.py | olafvandenberg/vunit | 4f78fc4fa0f10b4cf50a6d377793d374ae19df64 | [
"Artistic-2.0",
"Apache-2.0"
] | 1 | 2021-09-05T19:34:01.000Z | 2021-09-05T19:34:01.000Z | examples/vhdl/coverage/run.py | olafvandenberg/vunit | 4f78fc4fa0f10b4cf50a6d377793d374ae19df64 | [
"Artistic-2.0",
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Copyright (c) 2014-2022, Lars Asplund lars.anders.asplund@gmail.com
from pathlib import Path... | 30.147059 | 75 | 0.737561 |
630bf15b74924c70ea00239c89a753dfa6315113 | 934 | py | Python | plugins/palo_alto_pan_os/komand_palo_alto_pan_os/actions/__init__.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | 46 | 2019-06-05T20:47:58.000Z | 2022-03-29T10:18:01.000Z | plugins/palo_alto_pan_os/komand_palo_alto_pan_os/actions/__init__.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | 386 | 2019-06-07T20:20:39.000Z | 2022-03-30T17:35:01.000Z | plugins/palo_alto_pan_os/komand_palo_alto_pan_os/actions/__init__.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
from .add_address_object_to_group.action import AddAddressObjectToGroup
from .add_external_dynamic_list.action import AddExternalDynamicList
from .add_to_policy.action import AddToPolicy
from .check_if_address_object_in_group.action import CheckIfAddressObjectInGroup
from .commit... | 46.7 | 81 | 0.872591 |
c3bc5ee1041026fbc26b80aed1cc676cd239f63b | 185 | py | Python | facilities/apps.py | ahoazure/aho-stage-datacapture | 7ca6aac242de1936e01a53f988ba9dbc3129a3ca | [
"MIT"
] | null | null | null | facilities/apps.py | ahoazure/aho-stage-datacapture | 7ca6aac242de1936e01a53f988ba9dbc3129a3ca | [
"MIT"
] | null | null | null | facilities/apps.py | ahoazure/aho-stage-datacapture | 7ca6aac242de1936e01a53f988ba9dbc3129a3ca | [
"MIT"
] | null | null | null | from django.apps import AppConfig
from django.utils.translation import ugettext_lazy as _
class FacilitiesConfig(AppConfig):
name = 'facilities'
verbose_name = _('facilities')
| 26.428571 | 55 | 0.778378 |
b3cd58fa8e7aa034fa89fa64607e199feb0c7fcd | 488 | py | Python | src/strategies/reinforce/HighestMpFromInventory.py | jgc128/crabada.py | cb50c9d4748786a6abedc822f2e1ee461d65e508 | [
"MIT"
] | 34 | 2022-02-07T10:11:06.000Z | 2022-03-25T01:14:09.000Z | src/strategies/reinforce/HighestMpFromInventory.py | Antuaaan/crabada.py | 7ffc97445b3034020784a6265679a841470e7893 | [
"MIT"
] | 26 | 2022-02-23T00:55:22.000Z | 2022-03-31T17:55:51.000Z | src/strategies/reinforce/HighestMpFromInventory.py | Antuaaan/crabada.py | 7ffc97445b3034020784a6265679a841470e7893 | [
"MIT"
] | 27 | 2022-02-01T09:56:32.000Z | 2022-03-30T07:16:54.000Z | from typing import List
from src.libs.CrabadaWeb2Client.types import CrabForLending, Game
from src.strategies.reinforce.FirstFromInventory import FirstFromInventory
class HighestMpFromInventory(FirstFromInventory):
"""
Reinforce with the highest-MP inventory crab available.
"""
def process(self, game... | 34.857143 | 87 | 0.745902 |
76f54bdb7b92cbe31ec4dd2767e7431eafb93901 | 2,679 | py | Python | src/aiortc/codecs/g711.py | thedilletante/aiortc | c0504b6962484ac26ba8ad065191794ac6f607a4 | [
"BSD-3-Clause"
] | 1,992 | 2019-01-31T11:06:12.000Z | 2022-03-31T19:12:13.000Z | src/aiortc/codecs/g711.py | thedilletante/aiortc | c0504b6962484ac26ba8ad065191794ac6f607a4 | [
"BSD-3-Clause"
] | 528 | 2019-01-29T16:29:06.000Z | 2022-03-31T20:49:23.000Z | src/aiortc/codecs/g711.py | thedilletante/aiortc | c0504b6962484ac26ba8ad065191794ac6f607a4 | [
"BSD-3-Clause"
] | 519 | 2019-02-01T05:31:49.000Z | 2022-03-29T15:08:05.000Z | import audioop
import fractions
from abc import ABC, abstractmethod
from typing import List, Optional, Tuple
from av import AudioFrame
from av.frame import Frame
from ..jitterbuffer import JitterFrame
from .base import Decoder, Encoder
SAMPLE_RATE = 8000
SAMPLE_WIDTH = 2
SAMPLES_PER_FRAME = 160
TIME_BASE = fractions... | 28.2 | 82 | 0.640911 |
f7908c3fb55c250bbf23318602c32b6ae576165a | 1,490 | py | Python | gbpservice/neutron/db/migration/alembic_migrations/versions/75aa8a37a8de_reuse_bd.py | ansao-aci/group-based-policy | d80a94dcb51bfce6994cd18339d3c79a7cb54bfe | [
"Apache-2.0"
] | 2 | 2017-12-13T10:33:28.000Z | 2019-07-03T19:01:42.000Z | gbpservice/neutron/db/migration/alembic_migrations/versions/75aa8a37a8de_reuse_bd.py | ansao-aci/group-based-policy | d80a94dcb51bfce6994cd18339d3c79a7cb54bfe | [
"Apache-2.0"
] | 4 | 2015-04-14T00:27:44.000Z | 2020-08-31T11:20:17.000Z | gbpservice/neutron/db/migration/alembic_migrations/versions/75aa8a37a8de_reuse_bd.py | ansao-aci/group-based-policy | d80a94dcb51bfce6994cd18339d3c79a7cb54bfe | [
"Apache-2.0"
] | 4 | 2015-04-10T16:03:47.000Z | 2020-08-31T06:06:32.000Z | # 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
# d... | 30.408163 | 78 | 0.687248 |
96d5789eb10e5b35462652b5888d80fa9f8f2034 | 7,465 | py | Python | core/dbt/task/generate.py | kevinsanz93/dbt | 452aec9484cdb89f69ae163496d6a86f9421815c | [
"Apache-2.0"
] | null | null | null | core/dbt/task/generate.py | kevinsanz93/dbt | 452aec9484cdb89f69ae163496d6a86f9421815c | [
"Apache-2.0"
] | null | null | null | core/dbt/task/generate.py | kevinsanz93/dbt | 452aec9484cdb89f69ae163496d6a86f9421815c | [
"Apache-2.0"
] | null | null | null | import json
import os
import shutil
from dbt.adapters.factory import get_adapter
from dbt.clients.system import write_json
from dbt.compat import bigint
from dbt.include.global_project import DOCS_INDEX_FILE_PATH
import dbt.ui.printer
import dbt.utils
import dbt.compilation
import dbt.exceptions
from dbt.task.base_ta... | 30.222672 | 79 | 0.564099 |
b2089e3803186b5a0b12e9423b1c452596adf3c6 | 710 | py | Python | ops/__init__.py | chris-sanders/operator | a3918e1db40edac88a5250c46d7ef3156e8853d3 | [
"Apache-2.0"
] | null | null | null | ops/__init__.py | chris-sanders/operator | a3918e1db40edac88a5250c46d7ef3156e8853d3 | [
"Apache-2.0"
] | null | null | null | ops/__init__.py | chris-sanders/operator | a3918e1db40edac88a5250c46d7ef3156e8853d3 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Canonical 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.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 37.368421 | 75 | 0.76338 |
dcfdbaca6aa3de5e28e649dde31458ac329c6f5c | 3,448 | py | Python | extra/papers_by_category_analysis.py | carolmb/viewing-profiles-of-scientific-articles | 6a9248ea0dc458488b7f1556f358692529d2faf6 | [
"Unlicense"
] | null | null | null | extra/papers_by_category_analysis.py | carolmb/viewing-profiles-of-scientific-articles | 6a9248ea0dc458488b7f1556f358692529d2faf6 | [
"Unlicense"
] | null | null | null | extra/papers_by_category_analysis.py | carolmb/viewing-profiles-of-scientific-articles | 6a9248ea0dc458488b7f1556f358692529d2faf6 | [
"Unlicense"
] | null | null | null | import numpy as np
import pandas as pd
from clusters import select_original_breakpoints, norm, plot_pca
import matplotlib.pyplot as plt
import json
def get_types_views():
f_input = open('others/papers_plos_data_time_series2_filtered_xml_pdf_html.json', 'r')
data = json.load(f_input)
html_dist = []
pdf... | 31.063063 | 98 | 0.594258 |
4a14ab71231651cb45ad32d8e548d7f58af34598 | 4,080 | py | Python | tensorboard/plugins/memoryutil/summary.py | venky-intel/tensorboard | 2c375b892e883240deadf3358414c283e52210be | [
"Apache-2.0"
] | null | null | null | tensorboard/plugins/memoryutil/summary.py | venky-intel/tensorboard | 2c375b892e883240deadf3358414c283e52210be | [
"Apache-2.0"
] | null | null | null | tensorboard/plugins/memoryutil/summary.py | venky-intel/tensorboard | 2c375b892e883240deadf3358414c283e52210be | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 The TensorFlow 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 applica... | 38.130841 | 80 | 0.701716 |
d1f25fabad588ffac2d7356e563a5a256fc26cd5 | 5,719 | py | Python | tests/scripts/thread-cert/Cert_5_3_03_AddressQuery.py | jjlee3/openthread | abba21bca6e1b07ca76b0241dfaf045e57396818 | [
"BSD-3-Clause"
] | 3 | 2018-06-20T11:13:33.000Z | 2020-12-08T15:15:10.000Z | tests/scripts/thread-cert/Cert_5_3_03_AddressQuery.py | jjlee3/openthread | abba21bca6e1b07ca76b0241dfaf045e57396818 | [
"BSD-3-Clause"
] | null | null | null | tests/scripts/thread-cert/Cert_5_3_03_AddressQuery.py | jjlee3/openthread | abba21bca6e1b07ca76b0241dfaf045e57396818 | [
"BSD-3-Clause"
] | 3 | 2017-08-29T01:31:57.000Z | 2020-05-07T22:56:52.000Z | #!/usr/bin/python
#
# Copyright (c) 2016, The OpenThread Authors.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright
# not... | 37.625 | 78 | 0.648715 |
6f8b85c84ce3c96d29c906b30f0d68d4e8cd8061 | 289 | py | Python | python/0121. maxProfit.py | whtahy/leetcode | a2955123d203b155455ceefe38514fd0077d6db9 | [
"CC0-1.0"
] | 1 | 2017-12-09T05:37:51.000Z | 2017-12-09T05:37:51.000Z | python/0121. maxProfit.py | whtahy/leetcode | a2955123d203b155455ceefe38514fd0077d6db9 | [
"CC0-1.0"
] | null | null | null | python/0121. maxProfit.py | whtahy/leetcode | a2955123d203b155455ceefe38514fd0077d6db9 | [
"CC0-1.0"
] | null | null | null | class Solution:
def maxProfit(self, prices: List[int]) -> int:
profit = 0
buy = math.inf
for price in prices:
if price < buy:
buy = price
elif (p := price - buy) > profit:
profit = p
return profit
| 26.272727 | 50 | 0.463668 |
3a65636129137247eec5bd36e9b8a2f92050991d | 4,003 | py | Python | alipay/aop/api/request/ZolozAuthenticationFaceSearchQueryRequest.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/request/ZolozAuthenticationFaceSearchQueryRequest.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/request/ZolozAuthenticationFaceSearchQueryRequest.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.ZolozAuthenticationFaceSearchQueryModel import ZolozAuthenticationFaceSearchQueryModel
class ZolozAuthenticationFaceSearchQueryReque... | 27.606897 | 148 | 0.647514 |
2845611bacd7a665c007d42b0e31e541fd3fefe3 | 149,013 | py | Python | all/emojitations/data/en_GB.py | idleberg/sublime-emojitations | b2b4e8ce2c33ed0f6b8d6db6085e21da4e8d895b | [
"MIT"
] | 6 | 2016-08-31T14:42:36.000Z | 2021-09-05T23:55:47.000Z | all/emojitations/data/en_GB.py | idleberg/sublime-emojitations | b2b4e8ce2c33ed0f6b8d6db6085e21da4e8d895b | [
"MIT"
] | 1 | 2016-10-20T10:52:06.000Z | 2016-10-20T18:47:19.000Z | all/emojitations/data/en_GB.py | idleberg/sublime-emojitations | b2b4e8ce2c33ed0f6b8d6db6085e21da4e8d895b | [
"MIT"
] | 5 | 2016-08-31T14:48:11.000Z | 2021-09-05T23:55:33.000Z | from emojitations.emojitypes import EmojiAnnotations
emoji = [
EmojiAnnotations(emoji='😀', codepoints=(128512,), name='grinning face', slug='grinning_face', annotations=frozenset({'grin', 'face'})),
EmojiAnnotations(emoji='😁', codepoints=(128513,), name='grinning face with smiling eyes', slug='grinning_face_with_... | 153.305556 | 255 | 0.706542 |
155d2c1dc15f32208d0c4660365499f418164f4d | 5,708 | py | Python | pygments/lexers/webassembly.py | jcmuel/pygments | 19291af13813e7d64b3141fe8f96fef5a080d6ea | [
"BSD-2-Clause"
] | null | null | null | pygments/lexers/webassembly.py | jcmuel/pygments | 19291af13813e7d64b3141fe8f96fef5a080d6ea | [
"BSD-2-Clause"
] | 1 | 2021-08-06T23:41:47.000Z | 2021-08-06T23:41:47.000Z | pygments/lexers/webassembly.py | jcmuel/pygments | 19291af13813e7d64b3141fe8f96fef5a080d6ea | [
"BSD-2-Clause"
] | null | null | null | """
pygments.lexers.webassembly
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lexers for the WebAssembly text format.
The grammar can be found at https://github.com/WebAssembly/spec/blob/master/interpreter/README.md
and https://webassembly.github.io/spec/core/text/.
:copyright: Copyright 2006-2021 by the Pygm... | 47.566667 | 133 | 0.525929 |
736ee4eb41ebaaab3c3319cd66e83f98e47cf78e | 1,109 | py | Python | discord/ext/music/equalizer/base.py | mansuf/discord-ext-music | 969b43e61f3e48a69a42f546fbeb3282ffba3a2b | [
"MIT"
] | 4 | 2021-08-11T18:03:43.000Z | 2022-03-07T06:46:04.000Z | discord/ext/music/equalizer/base.py | mansuf/discord-ext-music | 969b43e61f3e48a69a42f546fbeb3282ffba3a2b | [
"MIT"
] | null | null | null | discord/ext/music/equalizer/base.py | mansuf/discord-ext-music | 969b43e61f3e48a69a42f546fbeb3282ffba3a2b | [
"MIT"
] | 1 | 2021-12-10T16:19:54.000Z | 2021-12-10T16:19:54.000Z | import io
__all__ = ('Equalizer',)
class Equalizer:
"""Represent a equalizer for converting audio.
Sub-classes must implement this.
"""
def __init__(self):
self.__stream__ = None # type: io.BufferedIOBase
@property
def stream(self) -> io.BufferedIOBase:
""":class:`io.Buffered... | 27.725 | 70 | 0.598738 |
4472937826ec6d0a002a960081bac6ad4c79334d | 1,023 | py | Python | SfM/Traditional/matchesTrial.py | akathpal/ComputerVision-CMSC733 | f5fa21a0ada8ab8ea08a6c558f6df9676570a2df | [
"MIT"
] | 1 | 2019-09-26T02:06:17.000Z | 2019-09-26T02:06:17.000Z | SfM/Traditional/matchesTrial.py | akathpal/UMD-CMSC733-ComputerVision | f5fa21a0ada8ab8ea08a6c558f6df9676570a2df | [
"MIT"
] | null | null | null | SfM/Traditional/matchesTrial.py | akathpal/UMD-CMSC733-ComputerVision | f5fa21a0ada8ab8ea08a6c558f6df9676570a2df | [
"MIT"
] | 1 | 2022-03-30T05:03:09.000Z | 2022-03-30T05:03:09.000Z | import numpy as np
# import cv2
# from matplotlib import pyplot as plt
# MIN_MATCH_COUNT = 10s
# img1 = cv2.imread('box.png',0) # queryImage
# img2 = cv2.imread('box_in_scene.png',0) # trainImage
import numpy as np
import cv2
import matplotlib.pyplot as plt
# img1 = cv2.imread('/home/shar/home.jpg',0) ... | 25.575 | 66 | 0.699902 |
938e116c2945a7e10e587b5f42ef6ecd34d814a7 | 6,312 | py | Python | bchydro/api.py | Nebual/bchydro | 4db88308d6fa2f8a245fd7408b8572c062e5a75b | [
"MIT"
] | null | null | null | bchydro/api.py | Nebual/bchydro | 4db88308d6fa2f8a245fd7408b8572c062e5a75b | [
"MIT"
] | null | null | null | bchydro/api.py | Nebual/bchydro | 4db88308d6fa2f8a245fd7408b8572c062e5a75b | [
"MIT"
] | null | null | null | import aiohttp
import logging
import xml.etree.ElementTree as ET
from bs4 import BeautifulSoup
from .types import (
BCHydroAccount,
BCHydroInterval,
BCHydroRates,
BCHydroDailyElectricity,
BCHydroDailyUsage,
)
from .const import (
USER_AGENT,
URL_POST_LOGIN,
URL_GET_ACCOUNT_JSON,
UR... | 36.068571 | 94 | 0.520596 |
c9c47ee1c7830f80ee71660afb6d56f7d29c3fb8 | 1,626 | py | Python | scripts/algos.py | abhinav153/Football-Player-Tracking | dd642a1122fed284f66a3ac2387126a83f6a609e | [
"MIT"
] | 1 | 2021-08-18T20:32:19.000Z | 2021-08-18T20:32:19.000Z | scripts/algos.py | abhinav153/Football-Player-Tracking | dd642a1122fed284f66a3ac2387126a83f6a609e | [
"MIT"
] | null | null | null | scripts/algos.py | abhinav153/Football-Player-Tracking | dd642a1122fed284f66a3ac2387126a83f6a609e | [
"MIT"
] | null | null | null |
'''
This file will describe custom classes built on existing libraries to be used
for image processing
'''
import glob
import cv2
class Feature_matching:
@staticmethod
def initialize_sift():
return cv2.SIFT_create()
@staticmethod
def detect_kp_desc(sift,img):
return sift.detect... | 21.68 | 99 | 0.699262 |
ef8051ef12898a5990299a75f02f903e9a3480bb | 1,723 | py | Python | abl/c.py | nishio/atcoder | 8db36537b5d8580745d5f98312162506ad7d7ab4 | [
"MIT"
] | 1 | 2021-03-09T04:28:13.000Z | 2021-03-09T04:28:13.000Z | abl/c.py | nishio/atcoder | 8db36537b5d8580745d5f98312162506ad7d7ab4 | [
"MIT"
] | null | null | null | abl/c.py | nishio/atcoder | 8db36537b5d8580745d5f98312162506ad7d7ab4 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys
sys.setrecursionlimit(10**6)
INF = 10 ** 9 + 1 # sys.maxsize # float("inf")
MOD = 10 ** 9 + 7
def init_unionfind(N):
global parent, rank
parent = [-1] * N
rank = [0] * N
def find_root(x):
p = parent[x]
if p == -1:
return x
p2 = find_root(p)
pare... | 16.728155 | 59 | 0.536274 |
2368b8639272daba790c0cdb0325da966437da5f | 18,699 | py | Python | qiskit/providers/ibmq/ibmqbackendservice.py | stefan-woerner/qiskit-ibmq-provider | e678ac151d70296d186ad7deeb88961ec7bfa9f5 | [
"Apache-2.0"
] | 1 | 2020-07-14T20:09:30.000Z | 2020-07-14T20:09:30.000Z | qiskit/providers/ibmq/ibmqbackendservice.py | msac3471/qiskit-ibmq-provider | 2cd28da7c55a52e980693da1150e885117d0f6ad | [
"Apache-2.0"
] | null | null | null | qiskit/providers/ibmq/ibmqbackendservice.py | msac3471/qiskit-ibmq-provider | 2cd28da7c55a52e980693da1150e885117d0f6ad | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2019, 2020.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any... | 42.986207 | 101 | 0.598909 |
cf0bd5c0f92840ed22e3915a25296211e9fb62ea | 19,843 | py | Python | tests/test_parser.py | almaslov/m3u8 | 8a44cad5925697c73a543606112297ad8e401374 | [
"MIT"
] | null | null | null | tests/test_parser.py | almaslov/m3u8 | 8a44cad5925697c73a543606112297ad8e401374 | [
"MIT"
] | null | null | null | tests/test_parser.py | almaslov/m3u8 | 8a44cad5925697c73a543606112297ad8e401374 | [
"MIT"
] | null | null | null | # coding: utf-8
# Copyright 2014 Globo.com Player authors. All rights reserved.
# Use of this source code is governed by a MIT License
# license that can be found in the LICENSE file.
import m3u8
import playlists
import pytest
from m3u8.parser import cast_date_time, ParseError
def test_should_parse_simple_playlist_fr... | 47.585132 | 109 | 0.70957 |
d30b85e0ecb0729b6aaa782722f167e7fe683016 | 369 | py | Python | build_script/defs.py | mulova/commons | c36bd0b10de3500da464a34eae0af9e6f7a64585 | [
"MIT"
] | 1 | 2020-02-08T15:49:07.000Z | 2020-02-08T15:49:07.000Z | build_script/defs.py | mulova/commons | c36bd0b10de3500da464a34eae0af9e6f7a64585 | [
"MIT"
] | null | null | null | build_script/defs.py | mulova/commons | c36bd0b10de3500da464a34eae0af9e6f7a64585 | [
"MIT"
] | null | null | null | runtime_project='commons'
#editor_project='commons-Editor'
runtime_project_file='commons'
#editor_project_file='Assembly-CSharp-Editor'
MONO="/Applications/Unity/MonoDevelop.app/Contents/Frameworks/Mono.framework/Versions/Current/bin/mono"
MDTOOL="/Applications/Unity/MonoDevelop.app/Contents/MacOS/lib/monodevelop/bin/m... | 41 | 103 | 0.834688 |
9c900d7d19d28975782e18f1f0be36422302efdf | 744 | py | Python | rl/high-card-poker/tf-pfhc-rl/console_test.py | Simsso/Machine-Learning-Tinkering | 0a024aab0bb1ac5fbdd2f77380ab36d192278701 | [
"MIT"
] | 2 | 2020-02-19T16:30:04.000Z | 2020-03-13T02:22:29.000Z | rl/high-card-poker/tf-pfhc-rl/console_test.py | Simsso/Machine-Learning-Tinkering | 0a024aab0bb1ac5fbdd2f77380ab36d192278701 | [
"MIT"
] | 3 | 2021-02-17T14:00:33.000Z | 2022-02-10T03:05:35.000Z | rl/high-card-poker/tf-pfhc-rl/console_test.py | Simsso/Machine-Learning-Tinkering | 0a024aab0bb1ac5fbdd2f77380ab36d192278701 | [
"MIT"
] | null | null | null | from player import Player
from pfhc_game import PreFlopHighCardGame
p1 = Player("A", 100)
p2 = Player("B", 100)
game = PreFlopHighCardGame(p1, p2)
while not game.over:
print(str(game))
player_to_act = game.next_player
print("Next player " + player_to_act.name)
count_ba = game.round_count # round co... | 24 | 100 | 0.616935 |
d390120b1e4ba0d618dfe2da46272e800e891ee5 | 13,395 | py | Python | tools/test_lvis_tnorm.py | ydiller/BalancedGroupSoftmax | 6fecf9fbb8ed1f54540787188e212ab39cd2b501 | [
"Apache-2.0"
] | 333 | 2020-06-15T11:41:45.000Z | 2022-03-28T03:12:47.000Z | tools/test_lvis_tnorm.py | rongyue-tang/BalancedGroupSoftmax | 90e04fd8ccecd2bc61bbe6053a741ae708da2794 | [
"Apache-2.0"
] | 21 | 2020-06-17T08:04:07.000Z | 2022-03-01T17:12:43.000Z | tools/test_lvis_tnorm.py | rongyue-tang/BalancedGroupSoftmax | 90e04fd8ccecd2bc61bbe6053a741ae708da2794 | [
"Apache-2.0"
] | 61 | 2020-06-18T18:20:58.000Z | 2022-03-30T16:00:30.000Z | import argparse
import os
import os.path as osp
import shutil
import tempfile
import pdb
import numpy as np
import pickle
import mmcv
import torch
import torch.distributed as dist
from mmcv.parallel import MMDataParallel, MMDistributedDataParallel
from mmcv.runner import get_dist_info, load_checkpoint
from mmdet.apis... | 34.170918 | 82 | 0.584621 |
98dd92d2dd634a477546477da5052065d5d0bbba | 2,313 | py | Python | unittests/test_versioning.py | CLIP-HPC/reframe | eddf0b2508c2ba644e4c3aba5652e57fddfde106 | [
"BSD-3-Clause"
] | 167 | 2017-11-14T20:37:28.000Z | 2022-03-31T11:19:18.000Z | unittests/test_versioning.py | CLIP-HPC/reframe | eddf0b2508c2ba644e4c3aba5652e57fddfde106 | [
"BSD-3-Clause"
] | 2,190 | 2017-06-14T12:48:13.000Z | 2022-03-31T16:09:51.000Z | unittests/test_versioning.py | victorusu/reframe | e98078a990e31a47604b06d674e4ee730c22cd44 | [
"BSD-3-Clause"
] | 83 | 2017-05-29T19:12:16.000Z | 2022-03-18T09:49:21.000Z | # Copyright 2016-2021 Swiss National Supercomputing Centre (CSCS/ETH Zurich)
# ReFrame Project Developers. See the top-level LICENSE file for details.
#
# SPDX-License-Identifier: BSD-3-Clause
import pytest
import reframe.core.warnings as warnings
import reframe.utility.versioning as versioning
def test_version_vali... | 37.306452 | 76 | 0.645482 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.