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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
bc1bb8524481d0a5248f75317737be37aaced6a0 | 758 | py | Python | Projects/FindPiToTheNthDigit.py | pycoder2000/Fun-Python-Projects | bfd6e5f696b7887e9f99af45cbb35f3d10ee807e | [
"MIT"
] | null | null | null | Projects/FindPiToTheNthDigit.py | pycoder2000/Fun-Python-Projects | bfd6e5f696b7887e9f99af45cbb35f3d10ee807e | [
"MIT"
] | null | null | null | Projects/FindPiToTheNthDigit.py | pycoder2000/Fun-Python-Projects | bfd6e5f696b7887e9f99af45cbb35f3d10ee807e | [
"MIT"
] | null | null | null | __author__ = ['[Parth Desai](https://github.com/pycoder2000)']
__copyright__ = "Copyright (C) 2020 Parth Desai"
__credits__ = ["Parth Desai"]
__license__ = "MIT"
__version__ = "1.0"
__maintainer__ = "Parth Desai"
__email__ = "desaiparth2000@gmail.com"
__status__ = "Production"
"""
Enter a number and have the program ... | 25.266667 | 127 | 0.691293 |
a896be417c50edd33e02a79fd337b7e803a3a536 | 90 | py | Python | hdp-doc-gen/__init__.py | nabeelhdp/hdp-doc-gen | f283035b94edf677d0d4424415bae4c2944658b2 | [
"Apache-2.0"
] | null | null | null | hdp-doc-gen/__init__.py | nabeelhdp/hdp-doc-gen | f283035b94edf677d0d4424415bae4c2944658b2 | [
"Apache-2.0"
] | null | null | null | hdp-doc-gen/__init__.py | nabeelhdp/hdp-doc-gen | f283035b94edf677d0d4424415bae4c2944658b2 | [
"Apache-2.0"
] | null | null | null | __all__ = [
'configmapping',
'connectionchecks',
'docgen',
'readconfig'
]
| 12.857143 | 23 | 0.577778 |
7bd7f4ab0431a48b5f5fe54fe047c7a664a5b508 | 2,265 | py | Python | numpoly/array_function/subtract.py | jonathf/npoly | 9df4bd2a3b134e8a196e24389c0ad84c26da9662 | [
"BSD-2-Clause"
] | 8 | 2019-12-13T23:54:33.000Z | 2021-11-08T22:44:25.000Z | numpoly/array_function/subtract.py | jonathf/npoly | 9df4bd2a3b134e8a196e24389c0ad84c26da9662 | [
"BSD-2-Clause"
] | 54 | 2019-08-25T20:03:10.000Z | 2021-08-09T08:59:27.000Z | numpoly/array_function/subtract.py | jonathf/npoly | 9df4bd2a3b134e8a196e24389c0ad84c26da9662 | [
"BSD-2-Clause"
] | 2 | 2020-03-05T12:03:28.000Z | 2021-03-07T16:56:09.000Z | """Subtract arguments, element-wise."""
from __future__ import annotations
from typing import Any, Optional
import numpy
import numpy.typing
from ..baseclass import ndpoly, PolyLike
from ..dispatch import implements, simple_dispatch
@implements(numpy.subtract)
def subtract(
x1: PolyLike,
x2: PolyLike,
o... | 33.80597 | 79 | 0.596026 |
9680a52828c55c9a5642ffa6c7e0b6d94ef0f9d3 | 45,047 | py | Python | vnpy/api/xspeed/pyscript/xspeed_struct.py | black0144/vnpy | 0d0ea30dad14a0150f7500ff9a62528030321426 | [
"MIT"
] | 77 | 2017-02-28T08:18:53.000Z | 2021-12-27T09:47:49.000Z | vnpy/api/xspeed/pyscript/xspeed_struct.py | black0144/vnpy | 0d0ea30dad14a0150f7500ff9a62528030321426 | [
"MIT"
] | 1 | 2016-08-18T14:00:25.000Z | 2016-08-18T14:00:25.000Z | vnpy/api/xspeed/pyscript/xspeed_struct.py | black0144/vnpy | 0d0ea30dad14a0150f7500ff9a62528030321426 | [
"MIT"
] | 41 | 2017-03-27T12:42:04.000Z | 2022-03-20T01:37:20.000Z | # encoding: UTF-8
structDict = {}
#心跳包
DFITCTimeOutField = {}
DFITCTimeOutField["lRequestID"] = "long"
structDict['DFITCTimeOutField'] = DFITCTimeOutField
#请求报单数据类型(基本报单)
DFITCInsertOrderField = {}
DFITCInsertOrderField["accountID"] = "string"
DFITCInsertOrderField["localOrderID"] = "long"
DFITCIns... | 36.593826 | 81 | 0.796723 |
4d4c6f7de86c9bf7f971e735202d70651ad55252 | 2,034 | py | Python | pastepwn/analyzers/tests/adobekeyanalyzer_test.py | DaRuudii/pastepwn | f21e82f703c6c5e9bd8b3dbc5d75d4d90583fa63 | [
"MIT"
] | null | null | null | pastepwn/analyzers/tests/adobekeyanalyzer_test.py | DaRuudii/pastepwn | f21e82f703c6c5e9bd8b3dbc5d75d4d90583fa63 | [
"MIT"
] | null | null | null | pastepwn/analyzers/tests/adobekeyanalyzer_test.py | DaRuudii/pastepwn | f21e82f703c6c5e9bd8b3dbc5d75d4d90583fa63 | [
"MIT"
] | 1 | 2019-10-09T13:09:17.000Z | 2019-10-09T13:09:17.000Z | # -*- coding: utf-8 -*-
import unittest
from unittest import mock
from pastepwn.analyzers.adobekeyanalyzer import AdobeKeyAnalyzer
class TestAdobeKeyAnalyzer(unittest.TestCase):
def setUp(self):
self.analyzer = AdobeKeyAnalyzer(None)
self.paste = mock.Mock()
def test_match_positive(self):
... | 33.344262 | 91 | 0.658309 |
0734ef44fc85fef593531157b7a608cfbf9ee937 | 4,092 | py | Python | setup.py | vidartf/ipydatawidgets | da6db7a9f9ace74c87583e633b22c3634526520e | [
"BSD-3-Clause"
] | 29 | 2017-08-15T11:56:06.000Z | 2022-03-18T19:24:47.000Z | setup.py | vidartf/ipydatawidgets | da6db7a9f9ace74c87583e633b22c3634526520e | [
"BSD-3-Clause"
] | 21 | 2017-08-15T13:00:07.000Z | 2021-12-27T21:38:01.000Z | setup.py | vidartf/ipydatawidgets | da6db7a9f9ace74c87583e633b22c3634526520e | [
"BSD-3-Clause"
] | 8 | 2017-09-18T08:14:22.000Z | 2021-08-05T20:21:14.000Z | #!/usr/bin/env python
# coding: utf-8
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
from __future__ import print_function
# the name of the project
name = 'ipydatawidgets'
#-----------------------------------------------------------------------------
# Minimal ... | 29.652174 | 99 | 0.56696 |
288654c964997f557d1e537e6ac02c0bb3bc46a7 | 755 | py | Python | tpdatasrc/tpgamefiles/scr/Spell391 - Remove Curse.py | edoipi/TemplePlus | f0e552289822fea908f16daa379fa568b1bd286d | [
"MIT"
] | 69 | 2015-05-05T14:09:25.000Z | 2022-02-15T06:13:04.000Z | tpdatasrc/tpgamefiles/scr/Spell391 - Remove Curse.py | edoipi/TemplePlus | f0e552289822fea908f16daa379fa568b1bd286d | [
"MIT"
] | 457 | 2015-05-01T22:07:45.000Z | 2022-03-31T02:19:10.000Z | tpdatasrc/tpgamefiles/scr/Spell391 - Remove Curse.py | edoipi/TemplePlus | f0e552289822fea908f16daa379fa568b1bd286d | [
"MIT"
] | 25 | 2016-02-04T21:19:53.000Z | 2021-11-15T23:14:51.000Z | from toee import *
def OnBeginSpellCast( spell ):
print "Remove Curse OnBeginSpellCast"
print "spell.target_list=", spell.target_list
print "spell.caster=", spell.caster, " caster.level= ", spell.caster_level
game.particles( "sp-abjuration-conjure", spell.caster )
def OnSpellEffect ( spell ):
print "Remove Curse... | 27.962963 | 85 | 0.749669 |
90f6bfaef038e84b133cc8c61e3ec0e3bcfa43c2 | 17,628 | py | Python | webStorm-APICloud/python_tools/Lib/ntpath.py | zzr925028429/androidyianyan | 8967fdba92473e8e65ee222515dfc54cdae5bb0b | [
"MIT"
] | null | null | null | webStorm-APICloud/python_tools/Lib/ntpath.py | zzr925028429/androidyianyan | 8967fdba92473e8e65ee222515dfc54cdae5bb0b | [
"MIT"
] | null | null | null | webStorm-APICloud/python_tools/Lib/ntpath.py | zzr925028429/androidyianyan | 8967fdba92473e8e65ee222515dfc54cdae5bb0b | [
"MIT"
] | null | null | null | # Module 'ntpath' -- common operations on WinNT/Win95 pathnames
"""Common pathname manipulations, WindowsNT/95 version.
Instead of importing this module directly, import os and refer to this
module as os.path.
"""
import os
import sys
import stat
import genericpath
import warnings
from genericpath impor... | 35.39759 | 81 | 0.537157 |
b899d52606c290a2a8d0b48a7c2519873deba04f | 10,722 | py | Python | main_pretrain.py | jkhu29/SoCo | 1cef465ce5bdc975a72d3d869147ebeb6031781d | [
"MIT"
] | null | null | null | main_pretrain.py | jkhu29/SoCo | 1cef465ce5bdc975a72d3d869147ebeb6031781d | [
"MIT"
] | null | null | null | main_pretrain.py | jkhu29/SoCo | 1cef465ce5bdc975a72d3d869147ebeb6031781d | [
"MIT"
] | null | null | null | # --------------------------------------------------------
# SoCo
# Copyright (c) 2021 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Written by Yue Gao
# --------------------------------------------------------
import json
import math
import os
import time
from shutil import copyfile
import ... | 35.979866 | 144 | 0.649879 |
601cb4c5fafc34037963802c974d4e75b39002ec | 117 | py | Python | learn-to-code-with-python/04-Variables/multiple-variable-assignments.py | MaciejZurek/python_practicing | 0a426f2aed151573e1f8678e0239ff596d92bbde | [
"MIT"
] | null | null | null | learn-to-code-with-python/04-Variables/multiple-variable-assignments.py | MaciejZurek/python_practicing | 0a426f2aed151573e1f8678e0239ff596d92bbde | [
"MIT"
] | null | null | null | learn-to-code-with-python/04-Variables/multiple-variable-assignments.py | MaciejZurek/python_practicing | 0a426f2aed151573e1f8678e0239ff596d92bbde | [
"MIT"
] | null | null | null | a = 5
b = 5
a = b = 5
b = 1
print(b)
print(a)
a = 5
b = 10
a, b = 5, 10
print(a,b)
a, b, c = 5, 10, 11
print(c) | 6.5 | 19 | 0.444444 |
9cd890100bbcb49a43f1569312ab1ec089afd1f5 | 13,599 | py | Python | discretezoo/discretezoo_main.py | googleinterns/adversarial-0th-order-optimization | aacdc8c88cc11f57456b989da0832f2e0ad89178 | [
"Apache-2.0"
] | null | null | null | discretezoo/discretezoo_main.py | googleinterns/adversarial-0th-order-optimization | aacdc8c88cc11f57456b989da0832f2e0ad89178 | [
"Apache-2.0"
] | null | null | null | discretezoo/discretezoo_main.py | googleinterns/adversarial-0th-order-optimization | aacdc8c88cc11f57456b989da0832f2e0ad89178 | [
"Apache-2.0"
] | null | null | null | """
Copyright 2020 Google LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
d... | 41.587156 | 80 | 0.697698 |
8d74fde922023b2a83f22e8cdc5c7ce91157bd77 | 353 | py | Python | wafw00f/plugins/cachefly.py | 84KaliPleXon3/EnableSecurity-wafw00f | 7fb9d5c9ddd222377a935724c66977e2e9c97c78 | [
"BSD-3-Clause"
] | 3,069 | 2016-05-23T16:08:31.000Z | 2022-03-31T16:27:40.000Z | wafw00f/plugins/cachefly.py | marcelovff/wafw00f | e3e6147d5d0dbb89030a9902e47170f15e95dd31 | [
"BSD-3-Clause"
] | 98 | 2016-06-06T16:43:54.000Z | 2022-03-18T12:30:19.000Z | wafw00f/plugins/cachefly.py | marcelovff/wafw00f | e3e6147d5d0dbb89030a9902e47170f15e95dd31 | [
"BSD-3-Clause"
] | 734 | 2016-05-25T02:17:46.000Z | 2022-03-31T11:43:37.000Z | #!/usr/bin/env python
'''
Copyright (C) 2020, WAFW00F Developers.
See the LICENSE file for copying permission.
'''
NAME = 'CacheFly CDN (CacheFly)'
def is_waf(self):
schemes = [
self.matchHeader(('BestCDN', r'Cachefly')),
self.matchCookie(r'^cfly_req.*=')
]
if any(i for i in schemes):
... | 20.764706 | 51 | 0.626062 |
4491c1daee94d8d8c149175d69931c3055d3ca65 | 5,393 | py | Python | docs/source/conf.py | Shynixn/BlockBall | 696e51c71c4c84a1d1974fc13243d67705e6ae57 | [
"Apache-2.0"
] | 50 | 2017-01-13T17:17:46.000Z | 2022-03-08T19:26:50.000Z | docs/source/conf.py | Shynixn/BlockBall | 696e51c71c4c84a1d1974fc13243d67705e6ae57 | [
"Apache-2.0"
] | 316 | 2017-01-26T09:42:37.000Z | 2022-03-15T08:46:34.000Z | docs/source/conf.py | Shynixn/BlockBall | 696e51c71c4c84a1d1974fc13243d67705e6ae57 | [
"Apache-2.0"
] | 32 | 2017-01-14T19:57:40.000Z | 2022-03-15T13:10:44.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# BlockBall documentation build configuration file, created by
# sphinx-quickstart on Sat Nov 25 12:11:16 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# ... | 30.128492 | 79 | 0.681624 |
83dd71f7292f62544550388116c5d2c608a0e768 | 104 | py | Python | app/main/__init__.py | sboerwinkle/SocialDeduction | fc86ffe779ae5ec3641012b664c67aba748821b0 | [
"MIT"
] | null | null | null | app/main/__init__.py | sboerwinkle/SocialDeduction | fc86ffe779ae5ec3641012b664c67aba748821b0 | [
"MIT"
] | null | null | null | app/main/__init__.py | sboerwinkle/SocialDeduction | fc86ffe779ae5ec3641012b664c67aba748821b0 | [
"MIT"
] | null | null | null | from flask import Blueprint
main = Blueprint('main', __name__)
from . import routes, events, games_db
| 17.333333 | 38 | 0.759615 |
dfbfa0bce949cf7d412fbd1ec7fa699b775ee1ed | 499 | py | Python | notebooks/solutions/load_iris.py | lampsonnguyen/ml-training-intro | e9d01104853c2b35932fbcc8f00738af2a0f2cb7 | [
"MIT"
] | 218 | 2017-05-01T15:01:28.000Z | 2021-11-19T10:25:56.000Z | notebooks/solutions/load_iris.py | skirmer/ml-training-intro | 2259a9ea4a3a7bc85ad328b3190c1676e283f5d3 | [
"MIT"
] | 3 | 2017-05-03T10:26:20.000Z | 2019-03-27T14:51:52.000Z | notebooks/solutions/load_iris.py | skirmer/ml-training-intro | 2259a9ea4a3a7bc85ad328b3190c1676e283f5d3 | [
"MIT"
] | 152 | 2017-05-02T13:50:58.000Z | 2022-03-30T09:15:36.000Z | import numpy as np
import matplotlib.pyplot as plt
from sklearn.datasets import load_iris
from sklearn.model_selection import train_test_split
iris = load_iris()
X, y = iris.data, iris.target
print("Dataset size: %d number of features: %d number of classes: %d"
% (X.shape[0], X.shape[1], len(np.unique(y))))
... | 27.722222 | 71 | 0.709419 |
9b9fc24d341505c96b5292fac28d046b75ba321f | 6,392 | py | Python | mmdet/apis/train.py | surajkothawade/mmdetection | a148d8a9079c6d88ad6eddee929d577388c8182c | [
"Apache-2.0"
] | null | null | null | mmdet/apis/train.py | surajkothawade/mmdetection | a148d8a9079c6d88ad6eddee929d577388c8182c | [
"Apache-2.0"
] | null | null | null | mmdet/apis/train.py | surajkothawade/mmdetection | a148d8a9079c6d88ad6eddee929d577388c8182c | [
"Apache-2.0"
] | null | null | null | import random
import warnings
import numpy as np
import torch
from mmcv.parallel import MMDataParallel, MMDistributedDataParallel
from mmcv.runner import (HOOKS, DistSamplerSeedHook, EpochBasedRunner,
Fp16OptimizerHook, OptimizerHook, build_optimizer,
build_runner)
fro... | 37.162791 | 79 | 0.62281 |
0860482c02bcea94e13e55009a5d14bad9540ee7 | 2,191 | py | Python | generator.py | JiroShimaya/RomajiDict | 586b6a6d6848d603a52b7fe826df2f22642e51fa | [
"MIT"
] | null | null | null | generator.py | JiroShimaya/RomajiDict | 586b6a6d6848d603a52b7fe826df2f22642e51fa | [
"MIT"
] | null | null | null | generator.py | JiroShimaya/RomajiDict | 586b6a6d6848d603a52b7fe826df2f22642e51fa | [
"MIT"
] | null | null | null | import json
def generate():
obj = {}
kana = {
"k":"カキクケコ",
"ky":["キ"+v for v in "ャ/ィ/ュ/ェ/ョ".split("/")],
"kw":["ク"+v for v in "ヮ/ィ/ゥ/ェ/ォ".split("/")],
"s":"サシスセソ",
"sy":["シ"+v for v in "ャ//ュ/ェ/ョ".split("/")],
"sh":["シ"+v for v in "ャ//ュ/ェ/ョ".split("/")],
"sw":["ス"+v for v in "ヮ/ィ/ゥ/ェ/ォ".... | 32.701493 | 52 | 0.429484 |
aff79e656f5a5cb2ceb716638a8793851a82553c | 3,175 | py | Python | firstu_rewards/firstu_rewards/doctype/fuel_payment/fuel_payment.py | fadilsiddique/firstu_rewards | 3df54cfc9f43ef6f4df97aa09320a096c534f446 | [
"MIT"
] | null | null | null | firstu_rewards/firstu_rewards/doctype/fuel_payment/fuel_payment.py | fadilsiddique/firstu_rewards | 3df54cfc9f43ef6f4df97aa09320a096c534f446 | [
"MIT"
] | null | null | null | firstu_rewards/firstu_rewards/doctype/fuel_payment/fuel_payment.py | fadilsiddique/firstu_rewards | 3df54cfc9f43ef6f4df97aa09320a096c534f446 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2020, Tridz and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class FuelPayment(Document):
def validate(self):
self.customer_doc = frappe.get_doc('Customer', sel... | 39.197531 | 143 | 0.747402 |
29acbde45481e099ba802a6195f5d5a3f43323fc | 4,276 | py | Python | beemgraphenebase/objects.py | abitmore/beem | 2026833a836007e45f16395a9ca3b31d02e98f87 | [
"MIT"
] | 118 | 2018-03-06T07:26:19.000Z | 2022-03-21T20:16:04.000Z | beemgraphenebase/objects.py | abitmore/beem | 2026833a836007e45f16395a9ca3b31d02e98f87 | [
"MIT"
] | 248 | 2018-03-20T18:03:39.000Z | 2022-03-28T16:38:09.000Z | beemgraphenebase/objects.py | abitmore/beem | 2026833a836007e45f16395a9ca3b31d02e98f87 | [
"MIT"
] | 81 | 2018-04-27T15:27:52.000Z | 2021-10-31T06:14:25.000Z | # -*- coding: utf-8 -*-
from collections import OrderedDict
import json
from beemgraphenebase.types import (
Uint8, Int16, Uint16, Uint32, Uint64,
Varint32, Int64, String, Bytes, Void,
Array, PointInTime, Signature, Bool,
Set, Fixed_array, Optional, Static_variant,
Map, Id, JsonObj
)
from .py23 impo... | 32.892308 | 83 | 0.55753 |
4a7f9fcf80c7052639639ca510ac98a7dccee15d | 4,063 | py | Python | data_utils/speech.py | WinderWL/PaddlePaddle-DeepSpeech | 3611de2d7c5dd9ece304f1694a77b2fae6f69ccd | [
"Apache-2.0"
] | 314 | 2020-05-28T09:44:45.000Z | 2022-03-31T08:48:59.000Z | data_utils/speech.py | WinderWL/PaddlePaddle-DeepSpeech | 3611de2d7c5dd9ece304f1694a77b2fae6f69ccd | [
"Apache-2.0"
] | 135 | 2020-05-24T05:56:20.000Z | 2022-03-24T05:54:10.000Z | data_utils/speech.py | WinderWL/PaddlePaddle-DeepSpeech | 3611de2d7c5dd9ece304f1694a77b2fae6f69ccd | [
"Apache-2.0"
] | 79 | 2020-06-27T05:58:53.000Z | 2022-03-30T14:24:37.000Z | """Contains the speech segment class."""
import numpy as np
from data_utils.audio import AudioSegment
class SpeechSegment(AudioSegment):
"""语音片段抽象是音频片段的一个子类,附加文字记录。
:param samples: Audio samples [num_samples x num_channels].
:type samples: ndarray.float32
:param sample_rate: 训练数据的采样率
:type sampl... | 31.742188 | 73 | 0.639675 |
47b45e6d6f04b30bdb3536b9e7a1c2756dba2318 | 2,318 | py | Python | src/game.py | jadmz/pygame-box2d-template | cd5ef75940b1c919aade5acb11924cbfba8e7c60 | [
"MIT"
] | null | null | null | src/game.py | jadmz/pygame-box2d-template | cd5ef75940b1c919aade5acb11924cbfba8e7c60 | [
"MIT"
] | null | null | null | src/game.py | jadmz/pygame-box2d-template | cd5ef75940b1c919aade5acb11924cbfba8e7c60 | [
"MIT"
] | 1 | 2020-03-22T18:20:54.000Z | 2020-03-22T18:20:54.000Z | import sys
import warnings
try:
import pygame_sdl2
except ImportError:
if sys.platform in ('darwin', ):
warnings.warn('OSX has major issues with pygame/SDL 1.2 when used '
'inside a virtualenv. If this affects you, try '
'installing the updated pygame_sdl2 li... | 28.268293 | 82 | 0.622951 |
ac415b33b47725235143094128da879a648bffaf | 44 | py | Python | c_cpp_with_python/use_cython/src/cpython_module/test_primes.py | QAlexBall/Learning_Py | 8a5987946928a9d86f6807555ed435ac604b2c44 | [
"MIT"
] | 2 | 2019-01-24T15:06:59.000Z | 2019-01-25T07:34:45.000Z | c_cpp_with_python/use_cython/src/cpython_module/test_primes.py | QAlexBall/Learning_Py | 8a5987946928a9d86f6807555ed435ac604b2c44 | [
"MIT"
] | 1 | 2019-12-23T09:45:11.000Z | 2019-12-23T09:45:11.000Z | c_cpp_with_python/use_cython/src/cpython_module/test_primes.py | QAlexBall/Learning_Py | 8a5987946928a9d86f6807555ed435ac604b2c44 | [
"MIT"
] | 1 | 2019-07-18T14:21:35.000Z | 2019-07-18T14:21:35.000Z | import primes
print(primes.primes(100000))
| 11 | 28 | 0.795455 |
09cb8496e6d97876cc6627238db737f4234d3340 | 3,222 | py | Python | tests/test_transport.py | blueyed/core-api-python-client | e0eca9d075f1af376e004e5625f1002763046bb0 | [
"Unlicense"
] | null | null | null | tests/test_transport.py | blueyed/core-api-python-client | e0eca9d075f1af376e004e5625f1002763046bb0 | [
"Unlicense"
] | null | null | null | tests/test_transport.py | blueyed/core-api-python-client | e0eca9d075f1af376e004e5625f1002763046bb0 | [
"Unlicense"
] | null | null | null | # coding: utf-8
from coreapi import Document, Link, Field
from coreapi.codecs import CoreJSONCodec
from coreapi.compat import force_text
from coreapi.exceptions import NetworkError
from coreapi.transports import HTTPTransport
from coreapi.utils import determine_transport
import pytest
import requests
import json
deco... | 28.017391 | 76 | 0.665115 |
b75ce399fa50138c427710dd55f8e57a5a578109 | 6,052 | py | Python | acs/acs/Device/Model/AndroidDevice/Agent/AcsAgentLegacy.py | wangji1/test-framework-and-suites-for-android | 59564f826f205fe7fab64f45b88b1a6dde6900af | [
"Apache-2.0"
] | null | null | null | acs/acs/Device/Model/AndroidDevice/Agent/AcsAgentLegacy.py | wangji1/test-framework-and-suites-for-android | 59564f826f205fe7fab64f45b88b1a6dde6900af | [
"Apache-2.0"
] | null | null | null | acs/acs/Device/Model/AndroidDevice/Agent/AcsAgentLegacy.py | wangji1/test-framework-and-suites-for-android | 59564f826f205fe7fab64f45b88b1a6dde6900af | [
"Apache-2.0"
] | null | null | null | """
:copyright: (c)Copyright 2013, Intel Corporation All Rights Reserved.
The source code contained or described here in and all documents related
to the source code ("Material") are owned by Intel Corporation or its
suppliers or licensors. Title to the Material remains with Intel Corporation
or its suppliers and licen... | 39.298701 | 110 | 0.660773 |
4be28f9e06e90b0f72437d76997f6cf59ec018e5 | 842 | py | Python | Python/798.py | GeneralLi95/leetcode | f42392f2283e19ec76273d81b2912944f9039568 | [
"MIT"
] | null | null | null | Python/798.py | GeneralLi95/leetcode | f42392f2283e19ec76273d81b2912944f9039568 | [
"MIT"
] | null | null | null | Python/798.py | GeneralLi95/leetcode | f42392f2283e19ec76273d81b2912944f9039568 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# @Date : 2022/3/9
# @Filename : 798.py
# @Tag :
# @Autor : LI YAO
# @Difficulty :
from heapq import *
from typing import List, Optional
from collections import defaultdict, deque, Counter
from itertools import product,combinations,permutations,accumulate
from random import... | 22.157895 | 66 | 0.597387 |
4b096ebd49d103e7c9a20f49b06f8519c14b1a8e | 3,515 | py | Python | test/functional/feature_loadblock.py | ruvcoindev/ruvchain | 9c7c17823b1efb612e0adeb92f0cb1c62859f840 | [
"MIT"
] | 1 | 2022-03-18T17:26:58.000Z | 2022-03-18T17:26:58.000Z | test/functional/feature_loadblock.py | ruvcoindev/ruvchain | 9c7c17823b1efb612e0adeb92f0cb1c62859f840 | [
"MIT"
] | null | null | null | test/functional/feature_loadblock.py | ruvcoindev/ruvchain | 9c7c17823b1efb612e0adeb92f0cb1c62859f840 | [
"MIT"
] | 1 | 2022-01-17T09:17:52.000Z | 2022-01-17T09:17:52.000Z | #!/usr/bin/env python3
# Copyright (c) 2017-2020 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 loadblock option
Test the option to start a node with the option loadblock which loads
a serializ... | 42.349398 | 116 | 0.646373 |
8a3c1d8f23c2707a21e7cc3245b95e791ce75491 | 35,402 | py | Python | tensorflow2_implementations/CIFAR_crossentropy/federated_learning_keras_consensus_FL_threads_CIFAR_crossentropy_gradients_exchange.py | KoalaYan/federated | f69bd74c164172da24a6b5866c3f0687604d5501 | [
"MIT"
] | 12 | 2019-12-01T13:17:18.000Z | 2021-08-23T07:25:59.000Z | tensorflow2_implementations/CIFAR_crossentropy/federated_learning_keras_consensus_FL_threads_CIFAR_crossentropy_gradients_exchange.py | KoalaYan/federated | f69bd74c164172da24a6b5866c3f0687604d5501 | [
"MIT"
] | 3 | 2020-03-30T06:04:15.000Z | 2020-06-19T10:18:33.000Z | tensorflow2_implementations/CIFAR_crossentropy/federated_learning_keras_consensus_FL_threads_CIFAR_crossentropy_gradients_exchange.py | KoalaYan/federated | f69bd74c164172da24a6b5866c3f0687604d5501 | [
"MIT"
] | 6 | 2020-05-06T15:24:26.000Z | 2022-03-28T10:02:46.000Z | from DataSets import CIFARData
from DataSets_task import CIFARData_task
from consensus.consensus_v4 import CFA_process
from consensus.parameter_server_v2 import Parameter_Server
# use only for consensus , PS only for energy efficiency
# from ReplayMemory import ReplayMemory
import numpy as np
import os
import tensorflo... | 52.447407 | 204 | 0.630077 |
a72c29bad345cfac120ac6f04f850d968023e88f | 2,462 | py | Python | macros/util.py | pedromorgan/mkdocs_macros_plugin | 7615f29fccf1f85daa22c4000e5ffaa584ea3a08 | [
"MIT"
] | null | null | null | macros/util.py | pedromorgan/mkdocs_macros_plugin | 7615f29fccf1f85daa22c4000e5ffaa584ea3a08 | [
"MIT"
] | null | null | null | macros/util.py | pedromorgan/mkdocs_macros_plugin | 7615f29fccf1f85daa22c4000e5ffaa584ea3a08 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# ------------------------------------------
# Utilities
# ------------------------------------------
from termcolor import colored
from copy import deepcopy
def trace(*args, **kwargs):
"General purpose print function, with first item emphasized (color)"
COLOR = 'green'
first = arg... | 25.122449 | 72 | 0.506093 |
7cbbfd0801d6f6cf7848d7359812f162d6d984d5 | 282 | py | Python | blog/migrations/0009_delete_profile.py | ShagiakhmedovA/OilCalculator | 66c658428916c4b76dd30a685f82c529d877190d | [
"bzip2-1.0.6"
] | null | null | null | blog/migrations/0009_delete_profile.py | ShagiakhmedovA/OilCalculator | 66c658428916c4b76dd30a685f82c529d877190d | [
"bzip2-1.0.6"
] | 7 | 2021-03-19T09:54:35.000Z | 2022-03-12T00:23:26.000Z | blog/migrations/0009_delete_profile.py | ShagiakhmedovA/demoblog | 66c658428916c4b76dd30a685f82c529d877190d | [
"bzip2-1.0.6"
] | null | null | null | # Generated by Django 2.2.7 on 2020-03-16 19:57
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('blog', '0008_profile'),
]
operations = [
migrations.DeleteModel(
name='Profile',
),
]
| 16.588235 | 47 | 0.585106 |
d7fa3e43501d8cb595378d3cbf9187f4270b3425 | 11,635 | py | Python | plugins/Config/plugin.py | ircpuzzles/competitionbot | 19333dd93a1394dc6dce329f947cabe6697b4a99 | [
"BSD-3-Clause"
] | 1 | 2020-04-01T21:53:47.000Z | 2020-04-01T21:53:47.000Z | plugins/Config/plugin.py | ircpuzzles/competitionbot | 19333dd93a1394dc6dce329f947cabe6697b4a99 | [
"BSD-3-Clause"
] | null | null | null | plugins/Config/plugin.py | ircpuzzles/competitionbot | 19333dd93a1394dc6dce329f947cabe6697b4a99 | [
"BSD-3-Clause"
] | null | null | null | ###
# Copyright (c) 2002-2005, Jeremiah Fincher
# Copyright (c) 2009, James McCoy
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyr... | 38.783333 | 80 | 0.629136 |
350368ea01e9833164637f37b5811a40dc3b6162 | 231 | py | Python | iCTRL/var/mobile/pentest/exploits/iCTRL/IOSPLOIT/modules/commands/macOS/macos_cd.py | CydiaRepoArchiver/noahlittle.github.io | 3ff35ad0d49ccdd9c3691beb43c393e06d1e309a | [
"Apache-2.0"
] | null | null | null | iCTRL/var/mobile/pentest/exploits/iCTRL/IOSPLOIT/modules/commands/macOS/macos_cd.py | CydiaRepoArchiver/noahlittle.github.io | 3ff35ad0d49ccdd9c3691beb43c393e06d1e309a | [
"Apache-2.0"
] | null | null | null | iCTRL/var/mobile/pentest/exploits/iCTRL/IOSPLOIT/modules/commands/macOS/macos_cd.py | CydiaRepoArchiver/noahlittle.github.io | 3ff35ad0d49ccdd9c3691beb43c393e06d1e309a | [
"Apache-2.0"
] | 1 | 2021-01-29T21:46:40.000Z | 2021-01-29T21:46:40.000Z | class payload:
def __init__(self):
self.name = "cd"
self.description = "change directories"
self.type = "native"
self.id = 100
def run(self,session,server,command):
return self.name
| 23.1 | 47 | 0.588745 |
df7ff7a5d7553d1e21afe14daf2fbc0a94332b07 | 186 | py | Python | server/app/settings.py | josenava/meal-calendar | d5182f9b9ee30c02efc8bd22e79bb7a53e778919 | [
"MIT"
] | null | null | null | server/app/settings.py | josenava/meal-calendar | d5182f9b9ee30c02efc8bd22e79bb7a53e778919 | [
"MIT"
] | 5 | 2020-07-24T14:45:31.000Z | 2022-02-27T09:49:55.000Z | server/app/settings.py | josenava/meal-calendar | d5182f9b9ee30c02efc8bd22e79bb7a53e778919 | [
"MIT"
] | null | null | null | import os
SQLALCHEMY_DATABASE_URL = os.getenv("POSTGRES_URL", "")
# auth
SECRET_KEY = os.getenv("SECRET_KEY", "not_super_secret")
AUTH_ALGORITHM = os.getenv("AUTH_ALGORITHM", "HS256")
| 23.25 | 56 | 0.752688 |
27bf3173b563b47a3e23b2514dfad68ec66d5fab | 11,322 | py | Python | ahrs/filters/oleq.py | FedericoCeratto/ahrs | 3a03638841741fb4a13f92f81532ac394e422b67 | [
"MIT"
] | 184 | 2019-09-06T07:58:52.000Z | 2022-03-31T04:27:09.000Z | ahrs/filters/oleq.py | geoKinga/ahrs | 87f9210cfcf6c545d86ae8588a93f012020164ee | [
"MIT"
] | 48 | 2019-11-13T15:42:46.000Z | 2022-03-31T23:53:53.000Z | ahrs/filters/oleq.py | geoKinga/ahrs | 87f9210cfcf6c545d86ae8588a93f012020164ee | [
"MIT"
] | 34 | 2019-12-19T16:22:00.000Z | 2022-03-14T09:51:50.000Z | # -*- coding: utf-8 -*-
"""
Optimal Linear Estimator of Quaternion
======================================
Considering an attitude determination model from a pair of vector observations:
.. math::
\\mathbf{D}^b = \\mathbf{CD}^r
where :math:`\\mathbf{D}_i^b=\\begin{bmatrix}D_{x,i}^b & D_{y,i}^b & D_{z,i}^b\\end{bm... | 36.405145 | 127 | 0.561208 |
1965d64ee2bffd1af2fd92233c46021e18e31e05 | 913 | py | Python | setup.py | raileanu/playground | 5c46b9f1823d4ef7c64b5128328ce1c717b0e043 | [
"Apache-2.0"
] | null | null | null | setup.py | raileanu/playground | 5c46b9f1823d4ef7c64b5128328ce1c717b0e043 | [
"Apache-2.0"
] | null | null | null | setup.py | raileanu/playground | 5c46b9f1823d4ef7c64b5128328ce1c717b0e043 | [
"Apache-2.0"
] | null | null | null | from setuptools import setup, find_packages
with open('requirements.txt', 'r') as f:
install_requires = f.readlines()
with open('requirements_extra.txt', 'r') as f:
extras_require = f.readlines()
with open('VERSION') as f:
version = f.read().strip()
setup(name='pommerman',
version=version,
d... | 29.451613 | 70 | 0.649507 |
d8dd8bed551a2da26ed0c3ad64e8e4c5aa330f15 | 4,181 | py | Python | examples/mechanics/JointsTests/spring_damper_pivot.py | siconos/siconos-tutorials | 821365a6ce679fc3d606b272ff069134e3c6aa4b | [
"Apache-2.0"
] | 6 | 2017-01-12T23:09:28.000Z | 2021-03-20T17:03:58.000Z | examples/mechanics/JointsTests/spring_damper_pivot.py | siconos/siconos-tutorials | 821365a6ce679fc3d606b272ff069134e3c6aa4b | [
"Apache-2.0"
] | 3 | 2019-01-14T13:44:51.000Z | 2021-05-17T13:57:27.000Z | examples/mechanics/JointsTests/spring_damper_pivot.py | siconos/siconos-tutorials | 821365a6ce679fc3d606b272ff069134e3c6aa4b | [
"Apache-2.0"
] | 2 | 2019-10-22T13:30:39.000Z | 2020-10-06T10:19:57.000Z |
from __future__ import print_function
import os,sys
import numpy as np
import math
import siconos.kernel as Kernel
np.set_printoptions(precision=3)
from siconos.mechanics.collision.tools import Contactor
from siconos.mechanics.joints import cast_PivotJointR
from siconos.io.mechanics_run import MechanicsHdf5Runner
fro... | 37.666667 | 82 | 0.67137 |
22718d84211b58aa472bca265f2b965f96be188d | 6,869 | py | Python | week02/week02_project.py | AnaRita93/spiced_projects | 64f0caec4008cc9ccb528e71ec16afba78728b8e | [
"MIT"
] | null | null | null | week02/week02_project.py | AnaRita93/spiced_projects | 64f0caec4008cc9ccb528e71ec16afba78728b8e | [
"MIT"
] | null | null | null | week02/week02_project.py | AnaRita93/spiced_projects | 64f0caec4008cc9ccb528e71ec16afba78728b8e | [
"MIT"
] | null | null | null |
"""
WEEK 02:Classification Project with Titatnic Data
This program will run a set of steps to calculate the survival predictions of Titanic passengers using Classification Models
For more details on EDA and model selection, please check the jupyter notebook version of this program (week02_project.ipynb).
###Ste... | 39.477011 | 128 | 0.727035 |
b5792f140bbd09840ce3765f0f7fc9e5dbdc3d30 | 1,712 | py | Python | app/user/serializers.py | joaofranca13/recipe-app-api | 2216447939e7283fcfd9a4679659985a390777f1 | [
"MIT"
] | null | null | null | app/user/serializers.py | joaofranca13/recipe-app-api | 2216447939e7283fcfd9a4679659985a390777f1 | [
"MIT"
] | null | null | null | app/user/serializers.py | joaofranca13/recipe-app-api | 2216447939e7283fcfd9a4679659985a390777f1 | [
"MIT"
] | null | null | null | from django.contrib.auth import authenticate, get_user_model
from django.utils.translation import ugettext_lazy as _
from rest_framework import serializers
class UserSerializer(serializers.ModelSerializer):
"""Serializer for the users object"""
class Meta:
model = get_user_model()
fields = ('... | 32.301887 | 74 | 0.64486 |
f67c14a0073772ba1196f961dd3d9a97e28d3c6e | 2,639 | py | Python | cliente_GUI.py | Solid-Red/Pychat-GUI-version | d5caf9befe7686c6304c1f6555e67c25d7afa26f | [
"MIT"
] | null | null | null | cliente_GUI.py | Solid-Red/Pychat-GUI-version | d5caf9befe7686c6304c1f6555e67c25d7afa26f | [
"MIT"
] | null | null | null | cliente_GUI.py | Solid-Red/Pychat-GUI-version | d5caf9befe7686c6304c1f6555e67c25d7afa26f | [
"MIT"
] | null | null | null | import tkinter
from tkinter import *
import socket
import sys
import threading
import time
#crea ventana
ventana=tkinter.Tk()
ventana.geometry("563x432")
#icono para la ventana grafica
#ventana.iconbitmap("otacon.ico")
#------------no funciona por alguna razon --------------
#titulo de la ventana
ventana.ti... | 19.123188 | 101 | 0.731717 |
c122afaec29516461af8d05ff7ede080ed94e117 | 14,548 | py | Python | tools/upgrade/errors.py | GreyElaina/pyre-check | abcb5daa64c38a25aed9ab238bb61290444ab06c | [
"MIT"
] | null | null | null | tools/upgrade/errors.py | GreyElaina/pyre-check | abcb5daa64c38a25aed9ab238bb61290444ab06c | [
"MIT"
] | null | null | null | tools/upgrade/errors.py | GreyElaina/pyre-check | abcb5daa64c38a25aed9ab238bb61290444ab06c | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import itertools
import json
import logging
import re
import subprocess
import sys
from collections import defaultdict
from pathlib import Pat... | 35.744472 | 97 | 0.584479 |
51ba14dd096049c58930f392d9e8c4da8f56c8e8 | 9,993 | py | Python | scrapy/tests/test_utils_url.py | dominikszabo/scrapy | e7de00a8f043f710d7dda38f0ba803bb89f55ad9 | [
"BSD-3-Clause"
] | 1 | 2022-03-04T06:18:22.000Z | 2022-03-04T06:18:22.000Z | scrapy/tests/test_utils_url.py | dominikszabo/scrapy | e7de00a8f043f710d7dda38f0ba803bb89f55ad9 | [
"BSD-3-Clause"
] | null | null | null | scrapy/tests/test_utils_url.py | dominikszabo/scrapy | e7de00a8f043f710d7dda38f0ba803bb89f55ad9 | [
"BSD-3-Clause"
] | null | null | null | import unittest
from scrapy.spider import BaseSpider
from scrapy.utils.url import url_is_from_any_domain, url_is_from_spider, canonicalize_url, url_has_any_extension
from scrapy.linkextractor import IGNORED_EXTENSIONS
__doctests__ = ['scrapy.utils.url']
class UrlUtilsTest(unittest.TestCase):
def test_url_is_from... | 60.563636 | 150 | 0.611528 |
17dd50bc53a5334b1532c03ce93981d9020ccaf2 | 6,629 | py | Python | docker/test/integration/minifi/core/SingleNodeDockerCluster.py | tomhollingworth/nifi-minifi-cpp | 65fad0d02d04463181470b21c8ea290ddd61c52a | [
"Apache-2.0"
] | null | null | null | docker/test/integration/minifi/core/SingleNodeDockerCluster.py | tomhollingworth/nifi-minifi-cpp | 65fad0d02d04463181470b21c8ea290ddd61c52a | [
"Apache-2.0"
] | null | null | null | docker/test/integration/minifi/core/SingleNodeDockerCluster.py | tomhollingworth/nifi-minifi-cpp | 65fad0d02d04463181470b21c8ea290ddd61c52a | [
"Apache-2.0"
] | null | null | null | # 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 use ... | 51.387597 | 188 | 0.718208 |
3033d8ab776e44e4dea8feddd44ba42587b6c539 | 1,867 | py | Python | include/aavm/cli/commands/stop.py | afdaniele/aavm | b67106c15b68f98366c88a5e4a44f2287a37bac4 | [
"MIT"
] | null | null | null | include/aavm/cli/commands/stop.py | afdaniele/aavm | b67106c15b68f98366c88a5e4a44f2287a37bac4 | [
"MIT"
] | null | null | null | include/aavm/cli/commands/stop.py | afdaniele/aavm | b67106c15b68f98366c88a5e4a44f2287a37bac4 | [
"MIT"
] | null | null | null | import argparse
import time
from typing import Optional
from cpk.types import Machine
from .. import AbstractCLICommand
from ..logger import aavmlogger
from ... import aavmconfig
from ...types import Arguments
class CLIStopCommand(AbstractCLICommand):
KEY = 'stop'
@staticmethod
def parser(parent: Optio... | 32.189655 | 96 | 0.598286 |
1255c91699c45f17edf704615cc6d2b2950237b4 | 3,062 | py | Python | categories/admin.py | s1n4/django-categories | 6af6d815e214bddbaac572c19e9c738ef1f752d6 | [
"Apache-2.0"
] | 1 | 2019-02-06T14:23:55.000Z | 2019-02-06T14:23:55.000Z | categories/admin.py | s1n4/django-categories | 6af6d815e214bddbaac572c19e9c738ef1f752d6 | [
"Apache-2.0"
] | null | null | null | categories/admin.py | s1n4/django-categories | 6af6d815e214bddbaac572c19e9c738ef1f752d6 | [
"Apache-2.0"
] | null | null | null | from django.contrib import admin
from django import forms
from django.utils.translation import ugettext_lazy as _
from .genericcollection import GenericCollectionTabularInline
from .settings import RELATION_MODELS, JAVASCRIPT_URL, REGISTER_ADMIN
from .models import Category
from .base import CategoryBaseAdminForm, Cat... | 35.195402 | 94 | 0.627041 |
6a808b6f1a1df40904bd7090b9d3a4749abee511 | 762 | py | Python | test/runner.py | firodj/ascigram | 83bf7cab0a3cd27f5e8d8843b3df62f857db437d | [
"MIT"
] | null | null | null | test/runner.py | firodj/ascigram | 83bf7cab0a3cd27f5e8d8843b3df62f857db437d | [
"MIT"
] | null | null | null | test/runner.py | firodj/ascigram | 83bf7cab0a3cd27f5e8d8843b3df62f857db437d | [
"MIT"
] | null | null | null | import os
import subprocess
TEST_ROOT = os.path.dirname(__file__)
PROJECT_ROOT = os.path.dirname(TEST_ROOT)
ASCIGRAM = [os.path.abspath(os.path.join(PROJECT_ROOT, 'ascigram'))]
tests = []
def collect_tests():
for file in os.listdir(TEST_ROOT):
if '.svg' in file:
name = file.rsplit('.', 1)[0]
... | 23.090909 | 73 | 0.624672 |
1fa182f907fadc10bd41c5765a758a9aee685765 | 6,628 | py | Python | django_harmonization/HeartData/report_extraction.py | chrisroederucdenver/Kao-Harmonization-Release | 1a90db58cd378244a8aba138e27f049376045729 | [
"Apache-2.0"
] | null | null | null | django_harmonization/HeartData/report_extraction.py | chrisroederucdenver/Kao-Harmonization-Release | 1a90db58cd378244a8aba138e27f049376045729 | [
"Apache-2.0"
] | null | null | null | django_harmonization/HeartData/report_extraction.py | chrisroederucdenver/Kao-Harmonization-Release | 1a90db58cd378244a8aba138e27f049376045729 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
'''
Copyright 2017 The Regents of the University of Colorado
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
... | 36.822222 | 181 | 0.638654 |
51bde9f4a06b63b5538bfd95bb7e880e7955f149 | 4,579 | py | Python | salt/utils/atomicfile.py | mimianddaniel/booksalt | 248c2349fd9a6edc30d48d11673ab72bed4583ce | [
"Apache-2.0"
] | 1 | 2022-02-18T05:30:18.000Z | 2022-02-18T05:30:18.000Z | salt/utils/atomicfile.py | mimianddaniel/booksalt | 248c2349fd9a6edc30d48d11673ab72bed4583ce | [
"Apache-2.0"
] | null | null | null | salt/utils/atomicfile.py | mimianddaniel/booksalt | 248c2349fd9a6edc30d48d11673ab72bed4583ce | [
"Apache-2.0"
] | null | null | null | '''
A module written originally by Armin Ronacher to manage file transfers in an
atomic way
'''
# Import python libs
import os
import tempfile
import sys
import errno
import time
import random
can_rename_open_file = False
if os.name == 'nt': # pragma: no cover
_rename = lambda src, dst: False
_rename_atomic... | 30.939189 | 76 | 0.533741 |
9b3350c35439e691527728ec10f7d533aac29aff | 13,270 | py | Python | sagemaker/01-train/source/test.py | nwcd-samples/NWCD-Industry-Customized-OCR-Solution | 5d995bb9297a0d125df541da4c9a594f8ca23f3f | [
"MIT"
] | 17 | 2020-08-07T15:38:37.000Z | 2021-11-18T00:25:31.000Z | sagemaker/01-train/source/test.py | nwcd-samples/sagemaker-ocr-chinese | 3f9c25d89e012e0376466ece7493c50b2ff727e4 | [
"MIT"
] | 2 | 2020-09-09T09:39:04.000Z | 2020-12-03T09:27:52.000Z | sagemaker/01-train/source/test.py | nwcd-samples/sagemaker-ocr-chinese | 3f9c25d89e012e0376466ece7493c50b2ff727e4 | [
"MIT"
] | 3 | 2020-08-28T07:22:07.000Z | 2021-08-25T08:36:21.000Z | import os
import time
import string
import argparse
import re
import torch
import torch.backends.cudnn as cudnn
import torch.utils.data
import torch.nn.functional as F
import numpy as np
from nltk.metrics.distance import edit_distance
from utils import CTCLabelConverter, AttnLabelConverter, Averager
from dataset impo... | 46.890459 | 142 | 0.663527 |
f272e40bb0c6bd3f551d244905460bd5570305ae | 1,441 | py | Python | python_modules/libraries/dagster-aws/dagster_aws_tests/s3_tests/test_s3_file_cache.py | bitdotioinc/dagster | 4fe395a37b206b1a48b956fa5dd72bf698104cca | [
"Apache-2.0"
] | 2 | 2021-06-21T17:50:26.000Z | 2021-06-21T19:14:23.000Z | python_modules/libraries/dagster-aws/dagster_aws_tests/s3_tests/test_s3_file_cache.py | bitdotioinc/dagster | 4fe395a37b206b1a48b956fa5dd72bf698104cca | [
"Apache-2.0"
] | 7 | 2022-03-16T06:55:04.000Z | 2022-03-18T07:03:25.000Z | python_modules/libraries/dagster-aws/dagster_aws_tests/s3_tests/test_s3_file_cache.py | bitdotioinc/dagster | 4fe395a37b206b1a48b956fa5dd72bf698104cca | [
"Apache-2.0"
] | 1 | 2021-08-18T17:21:57.000Z | 2021-08-18T17:21:57.000Z | import io
import boto3
from dagster_aws.s3 import S3FileCache, S3FileHandle
from moto import mock_s3
@mock_s3
def test_s3_file_cache_file_not_present():
s3 = boto3.client("s3")
s3.create_bucket(Bucket="some-bucket")
file_store = S3FileCache(
s3_bucket="some-bucket", s3_key="some-key", s3_session=... | 26.2 | 82 | 0.713393 |
8c5a00b638836bede662af571beae2b0b7b9bf06 | 9,683 | py | Python | tests/snuba/api/endpoints/test_organization_event_details.py | viteksafronov/sentry | 37dc9190737f4a754b3c58447497a57b8a82ca55 | [
"BSD-3-Clause"
] | null | null | null | tests/snuba/api/endpoints/test_organization_event_details.py | viteksafronov/sentry | 37dc9190737f4a754b3c58447497a57b8a82ca55 | [
"BSD-3-Clause"
] | null | null | null | tests/snuba/api/endpoints/test_organization_event_details.py | viteksafronov/sentry | 37dc9190737f4a754b3c58447497a57b8a82ca55 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
from django.core.urlresolvers import reverse
from sentry.testutils import APITestCase, SnubaTestCase
from sentry.testutils.helpers.datetime import iso_format, before_now
from sentry.models import Group
class OrganizationEventDetailsEndpointTest(APITestCase, SnubaTestCase):
... | 39.361789 | 100 | 0.546938 |
b8246522287e610e78d8a0d141e21a075d4a4246 | 5,403 | py | Python | manage.py | eaudeweb/natura2000db | cdf40495a708d0dc080913198d41b592609c17ba | [
"BSD-3-Clause"
] | 1 | 2021-09-22T01:13:12.000Z | 2021-09-22T01:13:12.000Z | manage.py | eaudeweb/natura2000db | cdf40495a708d0dc080913198d41b592609c17ba | [
"BSD-3-Clause"
] | null | null | null | manage.py | eaudeweb/natura2000db | cdf40495a708d0dc080913198d41b592609c17ba | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
import sys
import os
import logging
from path import path
import flask
import flaskext.script
import jinja2
import babel.support
import naturasites.schema
import naturasites.views
from naturasites.storage import get_db
import tinygis.views
import auth
default_config = {
'DEBUG': False,
... | 30.525424 | 96 | 0.6402 |
9cd649fc77d3f309047d80422a075edf39d6883a | 1,011 | py | Python | Day_59/singly_link_list_search.py | kiranrraj/100Days_Of_Coding | ab75d83be9be87fb7bc83a3f3b72a4638dab22a1 | [
"MIT"
] | null | null | null | Day_59/singly_link_list_search.py | kiranrraj/100Days_Of_Coding | ab75d83be9be87fb7bc83a3f3b72a4638dab22a1 | [
"MIT"
] | null | null | null | Day_59/singly_link_list_search.py | kiranrraj/100Days_Of_Coding | ab75d83be9be87fb7bc83a3f3b72a4638dab22a1 | [
"MIT"
] | null | null | null | # Title : Linked list implementation in python with search
# Author : Kiran raj R.
# Date : 30:10:2020
class Node:
"""Create a node with value provided, the pointer to next is set to None"""
def __init__(self, value):
self.value = value
self.next = None
class Simply_linked_list:
"""cr... | 21.0625 | 79 | 0.598417 |
86d3eae112c9bbf5c6d1cec371c2694ceacf088f | 25,329 | py | Python | sympy/core/tests/test_sympify.py | shilpiprd/sympy | 556e9c61b31d0d5f101cd56b43e843fbf3bcf121 | [
"BSD-3-Clause"
] | null | null | null | sympy/core/tests/test_sympify.py | shilpiprd/sympy | 556e9c61b31d0d5f101cd56b43e843fbf3bcf121 | [
"BSD-3-Clause"
] | null | null | null | sympy/core/tests/test_sympify.py | shilpiprd/sympy | 556e9c61b31d0d5f101cd56b43e843fbf3bcf121 | [
"BSD-3-Clause"
] | null | null | null | from sympy import (Symbol, exp, Integer, Float, sin, cos, Poly, Lambda,
Function, I, S, sqrt, srepr, Rational, Tuple, Matrix, Interval, Add, Mul,
Pow, Or, true, false, Abs, pi, Range, Xor)
from sympy.abc import x, y
from sympy.core.sympify import (sympify, _sympify, SympifyError, kernS,
CantSympify)
from sy... | 32.021492 | 121 | 0.593746 |
a2e67f15e6ebc7dbd20c73ec5e716cce9917d3ab | 10,777 | py | Python | autoarray/mock/mock_grid.py | caoxiaoyue/PyAutoArray | e10d3d6a5b8dd031f2ad277486bd539bd5858b2a | [
"MIT"
] | null | null | null | autoarray/mock/mock_grid.py | caoxiaoyue/PyAutoArray | e10d3d6a5b8dd031f2ad277486bd539bd5858b2a | [
"MIT"
] | null | null | null | autoarray/mock/mock_grid.py | caoxiaoyue/PyAutoArray | e10d3d6a5b8dd031f2ad277486bd539bd5858b2a | [
"MIT"
] | null | null | null | import numpy as np
from autoarray.inversion.mappers.abstract import AbstractMapper
from autoarray.structures.grids import grid_decorators
from autoarray.structures.grids.two_d.grid_2d_pixelization import PixelNeighbors
### Grids ###
def grid_to_grid_radii(grid):
return np.sqrt(np.add(np.square(gri... | 36.16443 | 117 | 0.628097 |
d62a466b95a610f12a05baee299e341a34d152c1 | 4,221 | py | Python | azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaa_svm_container.py | v-Ajnava/azure-sdk-for-python | a1f6f80eb5869c5b710e8bfb66146546697e2a6f | [
"MIT"
] | 4 | 2016-06-17T23:25:29.000Z | 2022-03-30T22:37:45.000Z | azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaa_svm_container.py | v-Ajnava/azure-sdk-for-python | a1f6f80eb5869c5b710e8bfb66146546697e2a6f | [
"MIT"
] | 54 | 2016-03-25T17:25:01.000Z | 2018-10-22T17:27:54.000Z | azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaa_svm_container.py | v-Ajnava/azure-sdk-for-python | a1f6f80eb5869c5b710e8bfb66146546697e2a6f | [
"MIT"
] | 3 | 2016-05-03T20:49:46.000Z | 2017-10-05T21:05:27.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 51.47561 | 194 | 0.706705 |
46273000fd5aa170d3687ffe04060656d7f77c90 | 16,005 | py | Python | examples/prostate/pt/learners/supervised_learner.py | ArnovanHilten/NVFlare | bb45e7d606849c6bc8f7542347459c6ba1be00c4 | [
"Apache-2.0"
] | 2 | 2021-12-01T15:56:19.000Z | 2021-12-02T09:00:07.000Z | examples/prostate/pt/learners/supervised_learner.py | ArnovanHilten/NVFlare | bb45e7d606849c6bc8f7542347459c6ba1be00c4 | [
"Apache-2.0"
] | null | null | null | examples/prostate/pt/learners/supervised_learner.py | ArnovanHilten/NVFlare | bb45e7d606849c6bc8f7542347459c6ba1be00c4 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021-2022, 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | 42.007874 | 119 | 0.639238 |
0e4805c546f30242d12ec71e8fb1b7eb151e3c1e | 270 | py | Python | main.py | fivecountry/QupyRibbon | c5ed71ca94e07a243e758f3980aedb5fa4f3e3b1 | [
"MIT"
] | 18 | 2018-04-24T13:31:57.000Z | 2021-07-15T16:58:55.000Z | main.py | fivecountry/QupyRibbon | c5ed71ca94e07a243e758f3980aedb5fa4f3e3b1 | [
"MIT"
] | 1 | 2019-04-20T06:16:09.000Z | 2019-04-20T06:16:09.000Z | main.py | fivecountry/QupyRibbon | c5ed71ca94e07a243e758f3980aedb5fa4f3e3b1 | [
"MIT"
] | 12 | 2017-11-03T13:21:15.000Z | 2021-12-09T20:09:59.000Z | import sys
from PyQt5.QtWidgets import *
from GUI.MainWindow import MainWindow
__author__ = 'mamj'
def main():
a = QApplication(sys.argv)
a.setQuitOnLastWindowClosed(True)
main_window = MainWindow()
main_window.show()
sys.exit(a.exec_())
main()
| 15.882353 | 37 | 0.703704 |
0cdddd8e4ebcd0a10cefb4c5b01a8b8906835adb | 10,286 | py | Python | research/object_detection/core/standard_fields.py | matsavage/models | 634309ac537bbfc5198197b92096a59b52b0bb45 | [
"Apache-2.0"
] | 3 | 2018-10-31T02:16:47.000Z | 2018-11-06T09:11:37.000Z | research/object_detection/core/standard_fields.py | John618/models | 42f98218d7b0ee54077d4e07658442bc7ae0e661 | [
"Apache-2.0"
] | 1 | 2019-01-16T08:23:08.000Z | 2019-01-16T08:23:08.000Z | research/object_detection/core/standard_fields.py | John618/models | 42f98218d7b0ee54077d4e07658442bc7ae0e661 | [
"Apache-2.0"
] | 6 | 2019-07-01T00:03:08.000Z | 2022-03-26T19:00:32.000Z | # 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... | 44.145923 | 80 | 0.765604 |
9a54e07c38ce57de6b9a0435f60c4354b432c26a | 19 | py | Python | realtime_redis_backup/__init__.py | cr0hn/realtime-redis-backup | fb6237f0dfc7f8add0f378fb9002383d4895fa3e | [
"BSD-3-Clause"
] | 10 | 2020-05-13T13:05:38.000Z | 2020-07-01T06:46:06.000Z | realtime_redis_backup/__init__.py | cr0hn/realtime-redis-backup | fb6237f0dfc7f8add0f378fb9002383d4895fa3e | [
"BSD-3-Clause"
] | null | null | null | realtime_redis_backup/__init__.py | cr0hn/realtime-redis-backup | fb6237f0dfc7f8add0f378fb9002383d4895fa3e | [
"BSD-3-Clause"
] | 1 | 2021-03-30T14:55:02.000Z | 2021-03-30T14:55:02.000Z | from .rrb import *
| 9.5 | 18 | 0.684211 |
21259ec90e23baf720d2e6508b32d1394de31356 | 366 | py | Python | cursopython/pythonteste/aula19c.py | AtilaCosta87/Python | b4eea7885d16df80feecc4c699a8348ca13a80c2 | [
"MIT"
] | null | null | null | cursopython/pythonteste/aula19c.py | AtilaCosta87/Python | b4eea7885d16df80feecc4c699a8348ca13a80c2 | [
"MIT"
] | null | null | null | cursopython/pythonteste/aula19c.py | AtilaCosta87/Python | b4eea7885d16df80feecc4c699a8348ca13a80c2 | [
"MIT"
] | null | null | null | estado = dict()
brasil = list()
for c in range(0, 3):
estado['uf'] = str(input('Unidade Federativa: '))
estado['sigla'] = str(input('Sigla do Estado: '))
brasil.append(estado.copy())
#for e in brasil:
# for k, v in e.items():
# print(f'O campo {k} tem valor {v}')
for e in brasil:
for v in e.va... | 26.142857 | 53 | 0.562842 |
a7ff954785941d3e7598f19cf599dde13a923e8b | 5,340 | py | Python | src/pyronn_torch/parallel.py | maxrohleder/pyronn-torch | 16874724258557c670cb815d3a85d6d9ce7aeabf | [
"MIT"
] | null | null | null | src/pyronn_torch/parallel.py | maxrohleder/pyronn-torch | 16874724258557c670cb815d3a85d6d9ce7aeabf | [
"MIT"
] | 1 | 2021-06-12T16:00:06.000Z | 2021-06-12T16:00:06.000Z | src/pyronn_torch/parallel.py | maxrohleder/pyronn-torch | 16874724258557c670cb815d3a85d6d9ce7aeabf | [
"MIT"
] | null | null | null | #
# Copyright © 2021 Mayank Patwari <mayank.patwari@fau.de>
#
# Distributed under terms of the GPLv3 license.
"""
"""
import numpy as np
import pyronn_torch
import torch
class State:
def __init__(self, detector_origin, detector_spacing, projection_shape, ray_vectors,
volume_origin, volume_shape,... | 34.230769 | 106 | 0.602809 |
b95c940baf4f3add10c6d14429354082c6000b6b | 964 | py | Python | freshdesk/v1/tests/test_api_class.py | xtof2all/python-freshdesk | 7753aec9408f1d48542497d0cf192a82758caee6 | [
"BSD-2-Clause"
] | 62 | 2016-03-13T16:05:23.000Z | 2021-12-22T00:35:01.000Z | freshdesk/v1/tests/test_api_class.py | xtof2all/python-freshdesk | 7753aec9408f1d48542497d0cf192a82758caee6 | [
"BSD-2-Clause"
] | 74 | 2015-01-08T09:20:23.000Z | 2022-01-07T15:34:25.000Z | freshdesk/v1/tests/test_api_class.py | xtof2all/python-freshdesk | 7753aec9408f1d48542497d0cf192a82758caee6 | [
"BSD-2-Clause"
] | 65 | 2015-07-06T07:13:41.000Z | 2022-02-16T09:54:07.000Z | import pytest
import responses
from freshdesk.v1.api import API
from freshdesk.v1.tests.conftest import DOMAIN
def test_api_prefix():
api = API("test_domain", "test_key")
assert api._api_prefix == "https://test_domain/"
api = API("test_domain/", "test_key")
assert api._api_prefix == "https://test_dom... | 26.777778 | 101 | 0.71473 |
c8b90b50c55faa5bed482de1b1ba0782bc9410b4 | 4,854 | py | Python | samples/RoadStress/sample_3.py | KossBoii/Object-Detection-Metrics | 0536dc6ef2ae65a757962fe68931ddf7199d5f67 | [
"MIT"
] | null | null | null | samples/RoadStress/sample_3.py | KossBoii/Object-Detection-Metrics | 0536dc6ef2ae65a757962fe68931ddf7199d5f67 | [
"MIT"
] | null | null | null | samples/RoadStress/sample_3.py | KossBoii/Object-Detection-Metrics | 0536dc6ef2ae65a757962fe68931ddf7199d5f67 | [
"MIT"
] | null | null | null | import _init_paths
from BoundingBox import BoundingBox
from BoundingBoxes import BoundingBoxes
from Evaluator import *
from utils import *
import argparse
import numpy as np
import cv2
import glob
import os
def get_boxes(dir, allBoundingBoxes, dataset_type, bb_type):
result = allBoundingBoxes.clone()
for file... | 44.53211 | 168 | 0.555624 |
f2ae161af10c9b62f524f0d6bf1f4beb833047d8 | 1,163 | py | Python | test.py | 3KUdelta/Orange-Pi-H2-H3-Hardware-PWM-Fan | ee497b8bb7517afc1a7e5278594a3d550b532635 | [
"MIT"
] | null | null | null | test.py | 3KUdelta/Orange-Pi-H2-H3-Hardware-PWM-Fan | ee497b8bb7517afc1a7e5278594a3d550b532635 | [
"MIT"
] | null | null | null | test.py | 3KUdelta/Orange-Pi-H2-H3-Hardware-PWM-Fan | ee497b8bb7517afc1a7e5278594a3d550b532635 | [
"MIT"
] | null | null | null | import OPi.GPIO as GPIO
if __name__ == "__main__":
PWM_chip = 0
PWM_pin = 0
frequency_Hz = 3800
Duty_Cycle_Percent = 100
p = GPIO.PWM(PWM_chip, PWM_pin, frequency_Hz, Duty_Cycle_Percent) # new PWM on channel=LED_gpio frequency=38KHz
print("turn on pwm by pressing button")
input()
... | 24.744681 | 118 | 0.66638 |
bc327ea74e770ba02da97556f3d1991368fda00f | 1,155 | py | Python | talk_resources/example_scansion.py | krimkus/pyambic-pentameter | f2355f78a9c073a27acaff23398da2511ac95a42 | [
"MIT"
] | 14 | 2020-01-09T03:19:18.000Z | 2021-10-02T00:34:14.000Z | talk_resources/example_scansion.py | krimkus/pyambic-pentameter | f2355f78a9c073a27acaff23398da2511ac95a42 | [
"MIT"
] | 7 | 2020-01-15T21:24:24.000Z | 2021-09-19T10:05:55.000Z | talk_resources/example_scansion.py | krimkus/pyambic-pentameter | f2355f78a9c073a27acaff23398da2511ac95a42 | [
"MIT"
] | 7 | 2020-01-15T18:25:35.000Z | 2020-05-25T17:04:43.000Z | from generate.syllables import syllable_fingerprint, scansion_matches
from generate.generator import PoemMaker
import random
pm = PoemMaker()
pm.setup()
d, rev_d, seeds = pm.text_sources['poem']
def valid(words, desired_meter):
fps = ''.join([syllable_fingerprint(word) for word in words])
return len(fps) <= ... | 27.5 | 93 | 0.669264 |
d4d27a6be51a16c9885ccaa13be5ef9dbaa568c8 | 4,702 | py | Python | onmt/ape/utils/report_manager.py | aeceou/OpenNAPE-py | 9ee9126f85be40b3e83c58ebd58ea56aeaa06a4d | [
"MIT"
] | 1 | 2021-09-17T05:33:37.000Z | 2021-09-17T05:33:37.000Z | onmt/ape/utils/report_manager.py | aeceou/OpenNAPE-py | 9ee9126f85be40b3e83c58ebd58ea56aeaa06a4d | [
"MIT"
] | null | null | null | onmt/ape/utils/report_manager.py | aeceou/OpenNAPE-py | 9ee9126f85be40b3e83c58ebd58ea56aeaa06a4d | [
"MIT"
] | null | null | null | """ Report manager utility """
from __future__ import print_function
import time
from datetime import datetime
import onmt
from onmt.utils.logging import logger
from onmt.ape.utils.statistics import StatisticsForAPE
from onmt.utils.report_manager import ReportMgrBase
def build_report_manager(opt, gpu_rank):
if ... | 35.621212 | 78 | 0.587835 |
33772da7966801ce75bdeabde9e7f4a53635cd25 | 743 | py | Python | blog/migrations/0001_initial.py | eadpearce/blog-archiver | a99a24dd7d5c2dcaf08f7b3973853a2049f5c991 | [
"CNRI-Python"
] | null | null | null | blog/migrations/0001_initial.py | eadpearce/blog-archiver | a99a24dd7d5c2dcaf08f7b3973853a2049f5c991 | [
"CNRI-Python"
] | null | null | null | blog/migrations/0001_initial.py | eadpearce/blog-archiver | a99a24dd7d5c2dcaf08f7b3973853a2049f5c991 | [
"CNRI-Python"
] | null | null | null | # Generated by Django 3.1.4 on 2020-12-03 13:20
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Blog',
fields=[
('avatar', models.JSONField... | 27.518519 | 110 | 0.54105 |
b3779909f5a04cd092e6f028decd1ea1bd5c9ebe | 2,075 | py | Python | api/itchatemail.py | strongit/NewhostInit | 7684878186cec6063e96fe2bf8caabbd85b518ee | [
"Apache-2.0"
] | 2 | 2017-03-02T06:40:39.000Z | 2019-02-15T11:28:31.000Z | api/itchatemail.py | strongit/NewhostInit | 7684878186cec6063e96fe2bf8caabbd85b518ee | [
"Apache-2.0"
] | 1 | 2016-07-25T02:19:50.000Z | 2016-07-25T02:55:17.000Z | api/itchatemail.py | strongit/NewhostInit | 7684878186cec6063e96fe2bf8caabbd85b518ee | [
"Apache-2.0"
] | 2 | 2017-02-28T13:06:56.000Z | 2018-07-02T12:40:51.000Z | # -*- coding:utf-8 -*-
"""
https://github.com/littlecodersh/ItChat
根据itchat编写微信报警机器人
"""
import itchat
import email
import imaplib
from email.parser import Parser
from HTMLParser import HTMLParser
reload(sys)
sys.setdefaultencoding('utf8')
imapserver = "your imap and port"
username = "your username"
password = "your p... | 27.302632 | 84 | 0.631325 |
fce68563ebf79188dcdced2458866b1760856efa | 66,036 | py | Python | sabnzbd/api.py | smilers/sabnzbd | ed0e5bbf9b963113f4962e7aec297266f19d6615 | [
"MIT",
"PSF-2.0",
"0BSD"
] | 2 | 2022-01-04T18:26:12.000Z | 2022-01-04T18:26:13.000Z | sabnzbd/api.py | smilers/sabnzbd | ed0e5bbf9b963113f4962e7aec297266f19d6615 | [
"MIT",
"PSF-2.0",
"0BSD"
] | 19 | 2022-02-08T12:23:06.000Z | 2022-03-27T00:21:00.000Z | sabnzbd/api.py | smilers/sabnzbd | ed0e5bbf9b963113f4962e7aec297266f19d6615 | [
"MIT",
"PSF-2.0",
"0BSD"
] | null | null | null | #!/usr/bin/python3 -OO
# Copyright 2007-2021 The SABnzbd-Team <team@sabnzbd.org>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any late... | 33.864615 | 178 | 0.616527 |
08dc95f8957eb3c547db756c792694967388e8a6 | 2,178 | py | Python | passbook/providers/saml/forms.py | fossabot/passbook | cba17f6659404445ac3025f11657d89368cc8b4f | [
"MIT"
] | null | null | null | passbook/providers/saml/forms.py | fossabot/passbook | cba17f6659404445ac3025f11657d89368cc8b4f | [
"MIT"
] | null | null | null | passbook/providers/saml/forms.py | fossabot/passbook | cba17f6659404445ac3025f11657d89368cc8b4f | [
"MIT"
] | null | null | null | """passbook SAML IDP Forms"""
from django import forms
from django.contrib.admin.widgets import FilteredSelectMultiple
from django.utils.translation import gettext as _
from passbook.providers.saml.models import (
SAMLPropertyMapping,
SAMLProvider,
get_provider_choices,
)
from passbook.providers.saml.util... | 29.835616 | 87 | 0.615702 |
1af38fdb37df0ad2366a990f6a76aaa8c7772228 | 1,358 | py | Python | remote/simulator.py | Ganben/iot-bi | f85c2402a4222ee37c6eb24632f7979b00f0ac24 | [
"Apache-2.0"
] | null | null | null | remote/simulator.py | Ganben/iot-bi | f85c2402a4222ee37c6eb24632f7979b00f0ac24 | [
"Apache-2.0"
] | 9 | 2020-09-05T04:55:53.000Z | 2022-03-02T02:50:02.000Z | remote/simulator.py | Ganben/iot-bi | f85c2402a4222ee37c6eb24632f7979b00f0ac24 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# for simulation of the iot remote unit
# ganben
import sys
import struct
from paho.mqtt import (
client,
publish,
)
# def connect to local web mqtt
def on_connect(client, userdata, flag_dict, rc):
#
print("connected with result code: %s" % str(rc))
# client.subscribe("sh... | 26.627451 | 98 | 0.623711 |
8a73b8905b7395c837f3b3aff904f33a540bf8a0 | 411 | py | Python | products/migrations/0010_auto_20210711_0608.py | kevin-ci/janeric2 | df07508a76ad8194a63be7786d8b84a905b3d2e9 | [
"MIT"
] | 1 | 2021-02-28T11:54:14.000Z | 2021-02-28T11:54:14.000Z | products/migrations/0010_auto_20210711_0608.py | kevin-ci/janeric2 | df07508a76ad8194a63be7786d8b84a905b3d2e9 | [
"MIT"
] | 6 | 2021-12-01T11:39:03.000Z | 2021-12-04T22:28:57.000Z | products/migrations/0010_auto_20210711_0608.py | kevin-ci/janeric2 | df07508a76ad8194a63be7786d8b84a905b3d2e9 | [
"MIT"
] | 1 | 2021-12-21T16:20:49.000Z | 2021-12-21T16:20:49.000Z | # Generated by Django 3.1.5 on 2021-07-11 06:08
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('products', '0009_auto_20210704_1252'),
]
operations = [
migrations.AlterModelOptions(
name='product',
options={'ordering': [... | 22.833333 | 107 | 0.625304 |
5f04df00c954a047738ceab8f896434374919d94 | 5,827 | py | Python | rnnt/transforms.py | entn-at/Online-Speech-Recognition | 75680cef38c57d0ac60f5e23c90d24bb3046e4e7 | [
"Apache-2.0"
] | null | null | null | rnnt/transforms.py | entn-at/Online-Speech-Recognition | 75680cef38c57d0ac60f5e23c90d24bb3046e4e7 | [
"Apache-2.0"
] | null | null | null | rnnt/transforms.py | entn-at/Online-Speech-Recognition | 75680cef38c57d0ac60f5e23c90d24bb3046e4e7 | [
"Apache-2.0"
] | 1 | 2021-07-23T07:23:04.000Z | 2021-07-23T07:23:04.000Z | import random
import torch
import torchaudio
from torchaudio.transforms import MFCC, MelSpectrogram
from rnnt.features import FilterbankFeatures
class CatDeltas(torch.nn.Module):
@torch.no_grad()
def forward(self, feat):
d1 = torchaudio.functional.compute_deltas(feat)
d2 = torchaudio.functio... | 30.994681 | 77 | 0.593616 |
6b193ffcc4f2c358a2661635ac0fb6ee51d40118 | 5,970 | py | Python | scripts/main.py | Cyprus-hy/TRSOSNet | 9466b21ec6b82f31777fe0ed680f14fd87de2f43 | [
"MIT"
] | null | null | null | scripts/main.py | Cyprus-hy/TRSOSNet | 9466b21ec6b82f31777fe0ed680f14fd87de2f43 | [
"MIT"
] | null | null | null | scripts/main.py | Cyprus-hy/TRSOSNet | 9466b21ec6b82f31777fe0ed680f14fd87de2f43 | [
"MIT"
] | null | null | null | import sys
import time
import os.path as osp
import argparse
import torch
import torch.nn as nn
import torchreid
from torchreid.utils import (
Logger, check_isfile, set_random_seed, collect_env_info,
resume_from_checkpoint, load_pretrained_weights, compute_model_complexity
)
from default_config import (
i... | 30.615385 | 81 | 0.618425 |
0fd2beb6eea886ea0370de9ecff8ba8d0b319b97 | 4,395 | py | Python | tests/test_structures.py | jframos/sdklib | 0cc1126e94b823fad6cc47e6a00549cad6d2f771 | [
"BSD-2-Clause"
] | 3 | 2016-12-15T15:54:37.000Z | 2021-08-10T03:16:18.000Z | tests/test_structures.py | jframos/sdklib | 0cc1126e94b823fad6cc47e6a00549cad6d2f771 | [
"BSD-2-Clause"
] | 44 | 2016-04-13T08:19:45.000Z | 2022-01-14T12:58:44.000Z | tests/test_structures.py | jframos/sdklib | 0cc1126e94b823fad6cc47e6a00549cad6d2f771 | [
"BSD-2-Clause"
] | 5 | 2016-11-22T11:23:28.000Z | 2020-01-28T12:26:10.000Z | import unittest
from sdklib.util.structures import get_dict_from_list, to_key_val_dict, to_key_val_list, CaseInsensitiveDict
class TestStructures(unittest.TestCase):
def test_to_key_val_list(self):
test_list = {'key1': 'val1', 'key0': 'val0'}
res = to_key_val_list(test_list)
self.assertT... | 38.893805 | 119 | 0.584755 |
4ea9b99f6c1ac10ba81df42ac2c13aec9b3b26ad | 789 | py | Python | virtual/lib/python3.6/site-packages/registration/backends/default/views.py | Ruterana/clone_instagram | a068587ef1d1a93ec8d1c08086bf11c0fb274b83 | [
"MIT"
] | 33 | 2018-10-07T21:50:44.000Z | 2022-02-16T18:16:56.000Z | virtual/lib/python3.6/site-packages/registration/backends/default/views.py | Ruterana/clone_instagram | a068587ef1d1a93ec8d1c08086bf11c0fb274b83 | [
"MIT"
] | 13 | 2020-01-12T13:03:07.000Z | 2022-02-10T13:44:28.000Z | virtual/lib/python3.6/site-packages/registration/backends/default/views.py | amiinegal/Awwards | dd667a1ffbd3fa9b90c8282d44d497b3a9d0c1ed | [
"MIT",
"Unlicense"
] | 12 | 2018-11-24T16:39:12.000Z | 2022-03-02T21:05:59.000Z | """
Backwards-compatible support for importing the model-based activation
workflow's views.
The new location for those views is
registration.backends.model_activation.views. Importing from
registration.backends.default will raise deprecation warnings, and
support for it will be removed in a future release.
"""
impor... | 25.451613 | 72 | 0.78327 |
5df2984f2f0b2e8fe277fb3b190ab59c5588e7a9 | 2,329 | py | Python | model_zoo/official/cv/inceptionv4/src/callback.py | GuoSuiming/mindspore | 48afc4cfa53d970c0b20eedfb46e039db2a133d5 | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | model_zoo/official/cv/inceptionv4/src/callback.py | forwhat461/mindspore | 59a277756eb4faad9ac9afcc7fd526e8277d4994 | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | model_zoo/official/cv/inceptionv4/src/callback.py | forwhat461/mindspore | 59a277756eb4faad9ac9afcc7fd526e8277d4994 | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 54.162791 | 116 | 0.537999 |
c4874e6956df2a57913b467591881760162c5d74 | 3,619 | py | Python | plugin/core/registry.py | kaste/LSP | aaab8145652821e45838b199b9e1eb2a95b7ad15 | [
"MIT"
] | null | null | null | plugin/core/registry.py | kaste/LSP | aaab8145652821e45838b199b9e1eb2a95b7ad15 | [
"MIT"
] | null | null | null | plugin/core/registry.py | kaste/LSP | aaab8145652821e45838b199b9e1eb2a95b7ad15 | [
"MIT"
] | null | null | null | from .configurations import ConfigManager
from .sessions import Session
from .settings import client_configs
from .typing import Optional, Any, Generator, Iterable
from .windows import WindowRegistry
import sublime
import sublime_plugin
def sessions_for_view(view: sublime.View, capability: Optional[str] = None) -> Ge... | 36.928571 | 116 | 0.68693 |
0ca3d9ccfac049fc7beb14758a0e79cfd51b7053 | 21,499 | py | Python | django/contrib/auth/tests/test_forms.py | dnozay/django | 5dcdbe95c749d36072f527e120a8cb463199ae0d | [
"BSD-3-Clause"
] | 1 | 2019-03-24T18:05:43.000Z | 2019-03-24T18:05:43.000Z | django/contrib/auth/tests/test_forms.py | dnozay/django | 5dcdbe95c749d36072f527e120a8cb463199ae0d | [
"BSD-3-Clause"
] | null | null | null | django/contrib/auth/tests/test_forms.py | dnozay/django | 5dcdbe95c749d36072f527e120a8cb463199ae0d | [
"BSD-3-Clause"
] | null | null | null | from __future__ import unicode_literals
import os
import re
from django import forms
from django.contrib.auth.models import User
from django.contrib.auth.forms import (UserCreationForm, AuthenticationForm,
PasswordChangeForm, SetPasswordForm, UserChangeForm, PasswordResetForm,
ReadOnlyPasswordHashField, ReadO... | 40.035382 | 143 | 0.638402 |
0f07d0ce320b1d3c01e5e9f132d08927edec7df5 | 2,485 | py | Python | graph.py | ucsb-cs48-w19/6pm-stock-trading | daf70b684c15182753d8ca9b820238cf9cd5b75c | [
"MIT"
] | 1 | 2019-04-06T15:44:07.000Z | 2019-04-06T15:44:07.000Z | graph.py | ucsb-cs48-w19/6pm-stock-trading | daf70b684c15182753d8ca9b820238cf9cd5b75c | [
"MIT"
] | 35 | 2019-03-07T22:29:04.000Z | 2021-12-13T19:55:51.000Z | graph.py | ucsb-cs48-w19/6pm-stock-trading | daf70b684c15182753d8ca9b820238cf9cd5b75c | [
"MIT"
] | 1 | 2019-12-18T23:06:37.000Z | 2019-12-18T23:06:37.000Z | from pandas_datareader import data
import pandas as pd
import datetime as dt
import matplotlib.pyplot as plt
import io
import base64
#from datetime import datetime
tickers = ['^NDX']
def getTempPath():
filePath = 'static/plot.png'
return filePath
# In[31]:
def graphMaker():
#filePath = 'static/plot.png... | 27.01087 | 103 | 0.632998 |
a5b5be4fce0a85329a0e2edacde64dbd211ad1e1 | 89 | py | Python | src/France/apps.py | IFB-ElixirFr/nCOV_genome_stats | b6cd7264722439492602bc824bb13cc012e26bb8 | [
"BSD-3-Clause"
] | null | null | null | src/France/apps.py | IFB-ElixirFr/nCOV_genome_stats | b6cd7264722439492602bc824bb13cc012e26bb8 | [
"BSD-3-Clause"
] | null | null | null | src/France/apps.py | IFB-ElixirFr/nCOV_genome_stats | b6cd7264722439492602bc824bb13cc012e26bb8 | [
"BSD-3-Clause"
] | null | null | null | from django.apps import AppConfig
class VaccinsConfig(AppConfig):
name = 'vaccins'
| 14.833333 | 33 | 0.752809 |
b89fdb6c8a9d19b7e3cf73051d77e7ddc81023e8 | 13,413 | py | Python | sdk/python/pulumi_azure_native/network/v20200801/packet_capture.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/network/v20200801/packet_capture.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/network/v20200801/packet_capture.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** 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
from ... import _utilities, _tables
from... | 65.75 | 4,480 | 0.711996 |
c44a2e4fa6eeae05ee17f248f63adbc24b761eee | 19,068 | py | Python | models/rank/bst/net.py | windstamp/PaddleRec | 0267e5b25703519429d160525df2fa5633d6a3b9 | [
"Apache-2.0"
] | null | null | null | models/rank/bst/net.py | windstamp/PaddleRec | 0267e5b25703519429d160525df2fa5633d6a3b9 | [
"Apache-2.0"
] | null | null | null | models/rank/bst/net.py | windstamp/PaddleRec | 0267e5b25703519429d160525df2fa5633d6a3b9 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020 PaddlePaddle 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 appli... | 41.633188 | 83 | 0.5912 |
7d5e2794ee572ecc4d01dd5e16732f08e5e84624 | 5,765 | py | Python | setup.py | gemsouls/scalene | 15722c9c3e101bce9bc7c1fb2cd7727f0d7d7662 | [
"Apache-2.0"
] | null | null | null | setup.py | gemsouls/scalene | 15722c9c3e101bce9bc7c1fb2cd7727f0d7d7662 | [
"Apache-2.0"
] | null | null | null | setup.py | gemsouls/scalene | 15722c9c3e101bce9bc7c1fb2cd7727f0d7d7662 | [
"Apache-2.0"
] | null | null | null | from setuptools import setup, find_packages
from setuptools.extension import Extension
from scalene.scalene_version import scalene_version
from os import path, environ
import sys
if sys.platform == 'darwin':
import sysconfig
mdt = 'MACOSX_DEPLOYMENT_TARGET'
target = environ[mdt] if mdt in environ else sysc... | 39.486301 | 103 | 0.644926 |
1f2ef02debc24584ee9badc1f20840af28b26341 | 1,235 | py | Python | Bugscan_exploits-master/exp_list/exp-2629.py | csadsl/poc_exp | e3146262e7403f19f49ee2db56338fa3f8e119c9 | [
"MIT"
] | 11 | 2020-05-30T13:53:49.000Z | 2021-03-17T03:20:59.000Z | Bugscan_exploits-master/exp_list/exp-2629.py | csadsl/poc_exp | e3146262e7403f19f49ee2db56338fa3f8e119c9 | [
"MIT"
] | 6 | 2020-05-13T03:25:18.000Z | 2020-07-21T06:24:16.000Z | Bugscan_exploits-master/exp_list/exp-2629.py | csadsl/poc_exp | e3146262e7403f19f49ee2db56338fa3f8e119c9 | [
"MIT"
] | 6 | 2020-05-30T13:53:51.000Z | 2020-12-01T21:44:26.000Z | #!/usr/bin/evn python
#-*-:coding:utf-8 -*-
#Author:404
#Name:璐华通用企业版OA系统SQL注入4处(完美绕过感谢林)4
#Refer:http://www.wooyun.org/bugs/wooyun-2010-0104430
def assign(service,arg):
if service=="ruvar_oa":
return True,arg
def audit(arg):
ps=[
"OnlineChat/chat_show.aspx?id=char(71)%2B... | 39.83871 | 136 | 0.634008 |
742a4e2f83a3c81dc674061192644b1130dd6b34 | 1,798 | py | Python | zabbix-proxy/molecule/default/tests/test_default.py | danielcastropalomares/ansible | f2e93f24841f12f3c7ec9d2e812a752000809f80 | [
"MIT"
] | null | null | null | zabbix-proxy/molecule/default/tests/test_default.py | danielcastropalomares/ansible | f2e93f24841f12f3c7ec9d2e812a752000809f80 | [
"MIT"
] | null | null | null | zabbix-proxy/molecule/default/tests/test_default.py | danielcastropalomares/ansible | f2e93f24841f12f3c7ec9d2e812a752000809f80 | [
"MIT"
] | null | null | null | import os
import pytest
import testinfra.utils.ansible_runner
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
def test_zabbixproxy_running_and_enabled(Service, SystemInfo):
zabbix = Service("zabbix-proxy")
# assert zabbix.is_enabled... | 31.54386 | 70 | 0.722469 |
5a5fb91e4a1c825c2059594622e275f20eed09ed | 8,564 | py | Python | replicator-schema-translation/docs/conf.py | mailnavn/examples | 01932d208287c8fc2594402c844ee6b311ac6632 | [
"Apache-2.0"
] | null | null | null | replicator-schema-translation/docs/conf.py | mailnavn/examples | 01932d208287c8fc2594402c844ee6b311ac6632 | [
"Apache-2.0"
] | 1 | 2021-05-11T11:07:00.000Z | 2021-05-11T11:07:00.000Z | replicator-schema-translation/docs/conf.py | mailnavn/examples | 01932d208287c8fc2594402c844ee6b311ac6632 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# CP Demo documentation build configuration file, created by
# sphinx-quickstart on Wed Dec 17 14:17:15 2014.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# A... | 32.074906 | 79 | 0.71894 |
33b8a287a3d0fb95f16a6582da1ca4310ae65948 | 22,419 | py | Python | scripts/reader/train.py | tyzoh/DrQA-SHINRA | b9bac9e2c4b1d4481c4ecad8ac11d8ae5354269f | [
"BSD-3-Clause"
] | 5 | 2019-06-24T06:35:54.000Z | 2021-06-07T04:38:38.000Z | scripts/reader/train.py | tyzoh/DrQA-SHINRA | b9bac9e2c4b1d4481c4ecad8ac11d8ae5354269f | [
"BSD-3-Clause"
] | 1 | 2020-06-02T08:15:49.000Z | 2020-07-27T07:05:49.000Z | scripts/reader/train.py | tyzoh/DrQA-SHINRA | b9bac9e2c4b1d4481c4ecad8ac11d8ae5354269f | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# Copyright 2017-present, Facebook, Inc.
# All rights reserved.
# Copyright 2019 Nihon Unisys, Ltd.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
"""Main DrQA reader training script."""
import argparse
import torch
impo... | 39.891459 | 89 | 0.579062 |
942dbaff2c5f82057471a36878dbecf2f128b5b2 | 2,285 | py | Python | shelf/shelf/model.py | bitsandsalsa/shelf | b39ab893ccb42890121ce6820934e3e1e80e83d7 | [
"BSD-3-Clause"
] | null | null | null | shelf/shelf/model.py | bitsandsalsa/shelf | b39ab893ccb42890121ce6820934e3e1e80e83d7 | [
"BSD-3-Clause"
] | null | null | null | shelf/shelf/model.py | bitsandsalsa/shelf | b39ab893ccb42890121ce6820934e3e1e80e83d7 | [
"BSD-3-Clause"
] | null | null | null | from flask_sqlalchemy import SQLAlchemy
from shelf import app
db = SQLAlchemy(app)
def init_db():
"""Initializes the database."""
db.create_all()
db.session.add_all([
Status('done'),
Status('pending'),
Status('unread'),
Format('conference paper'),
Format('confere... | 29.294872 | 88 | 0.647265 |
76690576c0a4c8334a2286961461d784413092bd | 10,162 | py | Python | src/complementary_filter.py | 30sectomars/psas_testbot | 06954927c1d11be2e49359515c0b8f57f6960fd5 | [
"MIT"
] | 1 | 2020-02-26T07:29:17.000Z | 2020-02-26T07:29:17.000Z | src/complementary_filter.py | 30sectomars/psas_testbot | 06954927c1d11be2e49359515c0b8f57f6960fd5 | [
"MIT"
] | null | null | null | src/complementary_filter.py | 30sectomars/psas_testbot | 06954927c1d11be2e49359515c0b8f57f6960fd5 | [
"MIT"
] | 1 | 2020-02-26T07:25:46.000Z | 2020-02-26T07:25:46.000Z | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Thu Aug 2 08:20:41 2018
@author: nschweizer
"""
# Python libs
import math
import numpy as np
from quaternion import quaternion
# Ros libraries
import rospy
# Ros Messages
from sensor_msgs.msg import Imu
from std_msgs.msg import Float64
from std_msgs.msg... | 38.059925 | 152 | 0.546841 |
e0c3e77355fc87d38fa7fa2bfe3a4c0f8f5442a7 | 128 | py | Python | thinkpad_tools_assets/__main__.py | devksingh4/thinkpad-tools | 437585f8fbff3ef1deeb75f5de42c83ee8c6d984 | [
"BSD-3-Clause"
] | 207 | 2019-04-15T01:28:10.000Z | 2022-02-08T13:25:52.000Z | thinkpad_tools_assets/__main__.py | devksingh4/thinkpad-tools | 437585f8fbff3ef1deeb75f5de42c83ee8c6d984 | [
"BSD-3-Clause"
] | 11 | 2019-04-15T17:35:20.000Z | 2020-07-30T16:16:44.000Z | thinkpad_tools_assets/__main__.py | devksingh4/thinkpad-tools | 437585f8fbff3ef1deeb75f5de42c83ee8c6d984 | [
"BSD-3-Clause"
] | 7 | 2019-04-15T04:07:49.000Z | 2020-05-24T04:17:28.000Z | # __main__.py
import sys
from .cmd import commandline_parser
if __name__ == '__main__':
commandline_parser(sys.argv[1:])
| 14.222222 | 36 | 0.734375 |
6e4cf91377befb098b2b3ed07cb827f8ef4fc205 | 2,576 | py | Python | donkeycar/parts/cv.py | danielhj07/donkey | 54bf793b6f112c0bf38ddfefc53b007790593157 | [
"MIT"
] | 7 | 2018-01-17T15:39:58.000Z | 2020-01-23T10:13:55.000Z | donkeycar/parts/cv.py | danielhj07/donkey | 54bf793b6f112c0bf38ddfefc53b007790593157 | [
"MIT"
] | 1 | 2018-11-25T01:07:28.000Z | 2018-11-26T14:29:57.000Z | donkeycar/parts/cv.py | danielhj07/donkey | 54bf793b6f112c0bf38ddfefc53b007790593157 | [
"MIT"
] | 9 | 2018-01-15T13:09:51.000Z | 2020-12-02T07:46:53.000Z | import cv2
import numpy as np
class ImgGreyscale():
def run(self, img_arr):
img_arr = cv2.cvtColor(img_arr, cv2.COLOR_RGB2GRAY)
return img_arr
class ImgCanny():
def __init__(self, low_threshold=60, high_threshold=110):
self.low_threshold = low_threshold
self.high_threshold ... | 26.285714 | 94 | 0.561335 |
3287d78ad97674c6e864b854068ccbcb7c2899c2 | 1,859 | py | Python | machine_learning/methods/k_nearest_neighbors/kdtree.py | thundergolfer/uni | e604d1edd8e5085f0ae1c0211015db38c07fc926 | [
"MIT"
] | 1 | 2022-01-06T04:50:09.000Z | 2022-01-06T04:50:09.000Z | machine_learning/methods/k_nearest_neighbors/kdtree.py | thundergolfer/uni | e604d1edd8e5085f0ae1c0211015db38c07fc926 | [
"MIT"
] | 1 | 2022-01-23T06:09:21.000Z | 2022-01-23T06:14:17.000Z | machine_learning/methods/k_nearest_neighbors/kdtree.py | thundergolfer/uni | e604d1edd8e5085f0ae1c0211015db38c07fc926 | [
"MIT"
] | null | null | null | import operator
import pprint
import unittest
from typing import Optional, NamedTuple, Protocol, Tuple
Vector = Tuple[int, ...]
# Somewhat strange technique to handle circular references in types.
# See: https://www.youtube.com/watch?v=QjFChmQHJxk.
class _BinaryTreeNode(Protocol):
@property
def location(sel... | 25.819444 | 69 | 0.618612 |
e4f80fc8c190db84907ecdd2030e9ef1229e9dba | 913 | py | Python | helpers/event_handling.py | bdemin/M113_Visualization | bf863af9dfc2902ae9123afeae8d5bd413a4bedb | [
"MIT"
] | null | null | null | helpers/event_handling.py | bdemin/M113_Visualization | bf863af9dfc2902ae9123afeae8d5bd413a4bedb | [
"MIT"
] | null | null | null | helpers/event_handling.py | bdemin/M113_Visualization | bf863af9dfc2902ae9123afeae8d5bd413a4bedb | [
"MIT"
] | null | null | null | def keyboard_events(obj, pause, camera_flag, camera_distance, view, timer):
key = obj.GetKeySym()
# print(key)
if key == 'o' and pause == False:
pause = True
elif key == 'o':
pause = False
if key == 'i' and camera_flag:
camera_flag = False
elif key == 'i':
... | 21.738095 | 75 | 0.496166 |
3549b26c3cea438bd1416734adc4d3ce0a3fd599 | 864 | py | Python | _run_scripts/run_intkmeans.py | simonharris/pykmeans | 256e0c6c7284182aae9c10783cf50778af120514 | [
"MIT"
] | 1 | 2021-12-30T01:25:03.000Z | 2021-12-30T01:25:03.000Z | _run_scripts/run_intkmeans.py | simonharris/pycluster | 4d47eb12a2bbaf1b05d7ccfd0cfc9ccf78ddf86d | [
"MIT"
] | 3 | 2020-11-12T12:36:00.000Z | 2021-06-18T12:46:59.000Z | _run_scripts/run_intkmeans.py | simonharris/pycluster | 4d47eb12a2bbaf1b05d7ccfd0cfc9ccf78ddf86d | [
"MIT"
] | 1 | 2021-12-30T01:32:32.000Z | 2021-12-30T01:32:32.000Z | """Temp bootstrap file to run Intelligent K-Means"""
import os
import sys
sys.path.insert(1, os.path.join(sys.path[0], '..'))
from datasets import testloader
from initialisations import ikmeans_card as alg
# Finds 91 centroids
# dataset = testloader._load_local('20_1000_1000_r_1.5_025')
# num_clusters = 20
# Finds ... | 24.685714 | 60 | 0.756944 |
ccf0e9d8b7a8e46a0d1a7ca2a106ed1dc3d709aa | 54,897 | py | Python | py/dynesty/bounding.py | vishalbelsare/dynesty | 2c5f1bbe5a0745c6625876f23ec6aa710c845fd4 | [
"MIT"
] | null | null | null | py/dynesty/bounding.py | vishalbelsare/dynesty | 2c5f1bbe5a0745c6625876f23ec6aa710c845fd4 | [
"MIT"
] | null | null | null | py/dynesty/bounding.py | vishalbelsare/dynesty | 2c5f1bbe5a0745c6625876f23ec6aa710c845fd4 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Bounding classes used when proposing new live points, along with a number of
useful helper functions. Bounding objects include:
UnitCube:
The unit N-cube (unconstrained draws from the prior).
Ellipsoid:
Bounding ellipsoid.
MultiEllipsoid:
... | 34.07635 | 79 | 0.575441 |
3d0baf36499475546ff1f631eb01d23560e1fc15 | 3,033 | py | Python | cfgov/ask_cfpb/tests/test_hooks.py | higs4281/cfgov-refresh | a02b193fb2373d443265c21845adf8a196e05675 | [
"CC0-1.0"
] | null | null | null | cfgov/ask_cfpb/tests/test_hooks.py | higs4281/cfgov-refresh | a02b193fb2373d443265c21845adf8a196e05675 | [
"CC0-1.0"
] | null | null | null | cfgov/ask_cfpb/tests/test_hooks.py | higs4281/cfgov-refresh | a02b193fb2373d443265c21845adf8a196e05675 | [
"CC0-1.0"
] | null | null | null | from __future__ import unicode_literals
from django.contrib.auth.models import User
from django.http import HttpRequest
from django.test import TestCase
from wagtail.wagtailcore.models import Page, Site
from ask_cfpb.models import (
Answer, AnswerLandingPage, AnswerPage, Category, SubCategory
)
from ask_cfpb.wag... | 40.44 | 76 | 0.697659 |
b14835594714544fb38e339bfad4ebdcda654a8d | 1,445 | py | Python | src/downloader.py | stevenlio88/Bank_Marketing_Prediction | d4c567cfe262fb3eb4e68a4c4629cd8fc1343c2e | [
"MIT"
] | null | null | null | src/downloader.py | stevenlio88/Bank_Marketing_Prediction | d4c567cfe262fb3eb4e68a4c4629cd8fc1343c2e | [
"MIT"
] | 12 | 2021-11-20T08:34:51.000Z | 2021-12-18T19:03:53.000Z | src/downloader.py | stevenlio88/Bank_Marketing_Prediction | d4c567cfe262fb3eb4e68a4c4629cd8fc1343c2e | [
"MIT"
] | 3 | 2021-11-18T01:01:53.000Z | 2021-11-18T22:31:03.000Z | # author: Melisa Maidana, Steven Lio, Zheren Xu
# date: 2021-11-19
'''This script downloads zip data from given URL, writes both zipped and
unzipped it to local directory.
This script takes a URL arg and an optional local directory path arg.
Usage: downloader.py <url> [--path=PATH]
Options:
<url> ... | 23.688525 | 95 | 0.617301 |
fa0f41d812423c856e81b486e0fef6dbae4d80dc | 1,972 | py | Python | data/level/level10401.py | levelupai/match3-level-similarity | cc9b28b8741b41bea1273c8bc9b4d265d79a1dca | [
"Apache-2.0"
] | null | null | null | data/level/level10401.py | levelupai/match3-level-similarity | cc9b28b8741b41bea1273c8bc9b4d265d79a1dca | [
"Apache-2.0"
] | 6 | 2020-07-04T02:53:08.000Z | 2022-03-11T23:53:14.000Z | data/level/level10401.py | levelupai/match3-level-similarity | cc9b28b8741b41bea1273c8bc9b4d265d79a1dca | [
"Apache-2.0"
] | 3 | 2019-12-31T11:42:59.000Z | 2021-03-28T20:06:13.000Z | data = {'level_index': 10401, 'move_count': '26',
'board_info': {(1, 5): {'base': (6, 1)}, (1, 4): {'base': (5, 1)}, (1, 3): {'base': (1, 1)},
(2, 6): {'base': (6, 1)}, (2, 5): {'base': (2, 1)}, (2, 4): {'base': (6, 1)},
(2, 3): {'base': (4, 1)}, (2, 2): {'base': (2... | 89.636364 | 112 | 0.263692 |
ae53dd2b37f35b45c52e3c59703c40a276398ca6 | 675 | bzl | Python | source/bazel/deps/xkbcommon/get.bzl | luxe/CodeLang-compiler | 78837d90bdd09c4b5aabbf0586a5d8f8f0c1e76a | [
"MIT"
] | 1 | 2019-01-06T08:45:46.000Z | 2019-01-06T08:45:46.000Z | source/bazel/deps/xkbcommon/get.bzl | luxe/CodeLang-compiler | 78837d90bdd09c4b5aabbf0586a5d8f8f0c1e76a | [
"MIT"
] | 264 | 2015-11-30T08:34:00.000Z | 2018-06-26T02:28:41.000Z | source/bazel/deps/xkbcommon/get.bzl | UniLang/compiler | c338ee92994600af801033a37dfb2f1a0c9ca897 | [
"MIT"
] | null | null | null | # Do not edit this file directly.
# It was auto-generated by: code/programs/reflexivity/reflexive_refresh
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file")
def xkbcommon():
http_archive(
name = "xkbcommon",
build_... | 39.705882 | 110 | 0.72 |
e54b3e3ba3590d4eeb2048adbc9e7ab154fe0877 | 31,216 | py | Python | qiskit/mapper/_mapping.py | NickyBar/QIP | 11747b40beb38d41faa297fb2b53f28c6519c753 | [
"Apache-2.0"
] | 1 | 2017-07-12T02:04:53.000Z | 2017-07-12T02:04:53.000Z | qiskit/mapper/_mapping.py | NickyBar/QIP | 11747b40beb38d41faa297fb2b53f28c6519c753 | [
"Apache-2.0"
] | null | null | null | qiskit/mapper/_mapping.py | NickyBar/QIP | 11747b40beb38d41faa297fb2b53f28c6519c753 | [
"Apache-2.0"
] | 6 | 2018-05-27T10:52:02.000Z | 2021-04-02T19:20:11.000Z | # -*- coding: utf-8 -*-
# Copyright 2017 IBM RESEARCH. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | 46.245926 | 80 | 0.515377 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.