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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
27274806c04272edad8da89e3616218937ff0c8b | 18,630 | py | Python | isi_sdk_7_2/isi_sdk_7_2/models/storagepool_settings_extended.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 24 | 2018-06-22T14:13:23.000Z | 2022-03-23T01:21:26.000Z | isi_sdk_7_2/isi_sdk_7_2/models/storagepool_settings_extended.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 46 | 2018-04-30T13:28:22.000Z | 2022-03-21T21:11:07.000Z | isi_sdk_7_2/isi_sdk_7_2/models/storagepool_settings_extended.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 29 | 2018-06-19T00:14:04.000Z | 2022-02-08T17:51:19.000Z | # coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 2
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
from isi_sdk_7_2.models.storagepo... | 44.676259 | 433 | 0.720344 |
11b79395c1788c6813924d4c024d2f5478febe09 | 7,042 | py | Python | parcelhubPOS/commons.py | ngcw/parcelhubpos | 25404f9e944fd48fc8b19504d3e19e3beaa3e801 | [
"MIT"
] | null | null | null | parcelhubPOS/commons.py | ngcw/parcelhubpos | 25404f9e944fd48fc8b19504d3e19e3beaa3e801 | [
"MIT"
] | null | null | null | parcelhubPOS/commons.py | ngcw/parcelhubpos | 25404f9e944fd48fc8b19504d3e19e3beaa3e801 | [
"MIT"
] | null | null | null | from .models import User, Branch, UserBranchAccess, Terminal
from django.http import HttpResponse, HttpResponseRedirect
from django.contrib.sessions.models import Session
from django.utils import timezone
from django.contrib.auth import login
CONST_branchid = 'branchid'
CONST_terminalid = 'terminalid'
CONST_username = ... | 47.904762 | 148 | 0.625959 |
662678d9e8bb08e399a3f42b3f3cf064b7f9d7fe | 13,467 | py | Python | test/functional/decodescript.py | wolfoxonly/fpc | bf372369fbbc271330527b5fb83d6285a865332c | [
"MIT"
] | null | null | null | test/functional/decodescript.py | wolfoxonly/fpc | bf372369fbbc271330527b5fb83d6285a865332c | [
"MIT"
] | null | null | null | test/functional/decodescript.py | wolfoxonly/fpc | bf372369fbbc271330527b5fb83d6285a865332c | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2015-2017 The Flashpaychain Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test decoding scripts via decodescript RPC command."""
from test_framework.test_framework import... | 74.816667 | 761 | 0.775451 |
a514180f4bd738e5500319fa8efc14f62919df06 | 201 | py | Python | run.py | chunbo777/RINAproject | 0488ab7d8b3cd9dfc7bcd1d9a4ed08066e000fbd | [
"Apache-2.0"
] | null | null | null | run.py | chunbo777/RINAproject | 0488ab7d8b3cd9dfc7bcd1d9a4ed08066e000fbd | [
"Apache-2.0"
] | null | null | null | run.py | chunbo777/RINAproject | 0488ab7d8b3cd9dfc7bcd1d9a4ed08066e000fbd | [
"Apache-2.0"
] | null | null | null | import os
from scrapy.cmdline import execute
os.chdir(os.path.dirname(os.path.realpath(__file__)))
try:
execute(
["scrapy", "crawl", "rinawine"]
)
except SystemExit:
pass | 16.75 | 53 | 0.641791 |
1f5218e157e0df0311281c9de0898b9adde13b16 | 265 | py | Python | webminer/entities/domain_model.py | asysc2020/Youth-Sports-Booster-Community | 14535ab0f596d747a6a84357b826d4009406a67a | [
"MIT"
] | 38 | 2018-12-09T10:33:53.000Z | 2022-01-01T05:59:44.000Z | webminer/entities/domain_model.py | asysc2020/Youth-Sports-Booster-Community | 14535ab0f596d747a6a84357b826d4009406a67a | [
"MIT"
] | 50 | 2018-07-21T13:22:35.000Z | 2019-09-17T08:31:47.000Z | webminer/entities/domain_model.py | asysc2020/Youth-Sports-Booster-Community | 14535ab0f596d747a6a84357b826d4009406a67a | [
"MIT"
] | 16 | 2018-10-02T17:06:27.000Z | 2022-03-16T22:12:30.000Z | """ Create a DomainModel providing a metaclass"""
from abc import ABCMeta
class DomainModel(metaclass=ABCMeta):
"""An ABC can be subclassed directly, and then acts as a mix-in class
metaclass (class, optional): Defaults to ABCMeta.
"""
pass
| 22.083333 | 73 | 0.69434 |
9f6d8b11676fbef04ddc1b18bdcff6cd84581f56 | 615 | py | Python | tests/test_query.py | JoowonYun/hdacpy | 3107bcc38c06c9b79d9cd4fea046fd8ea435d3e9 | [
"MIT"
] | null | null | null | tests/test_query.py | JoowonYun/hdacpy | 3107bcc38c06c9b79d9cd4fea046fd8ea435d3e9 | [
"MIT"
] | null | null | null | tests/test_query.py | JoowonYun/hdacpy | 3107bcc38c06c9b79d9cd4fea046fd8ea435d3e9 | [
"MIT"
] | null | null | null | import json
from unittest.mock import Mock
import pytest
from hdacpy.transaction import Transaction
@pytest.mark.skip(reason="only works if RESTful server runs in local")
def test_balance():
tx = Transaction(
host="http://localhost:1317",
privkey="26d167d549a4b2b66f766b0d3f2bdbe1cd92708818c338ff45... | 30.75 | 83 | 0.712195 |
cc120e517c34d0a37972a2596a9aedc0cd1edb65 | 5,013 | py | Python | tacotron-2/tacotron/models/custom_decoder.py | bongsang/wavenet_generator | 3484d81d95161703ab3337e7abffd09571aa45c1 | [
"MIT"
] | null | null | null | tacotron-2/tacotron/models/custom_decoder.py | bongsang/wavenet_generator | 3484d81d95161703ab3337e7abffd09571aa45c1 | [
"MIT"
] | null | null | null | tacotron-2/tacotron/models/custom_decoder.py | bongsang/wavenet_generator | 3484d81d95161703ab3337e7abffd09571aa45c1 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import collections
import tensorflow as tf
from tensorflow.contrib.seq2seq.python.ops import decoder
from tensorflow.contrib.seq2seq.python.ops import helper as helper_py
from tensorflow.python.framework impor... | 36.064748 | 101 | 0.754837 |
74134b2fd4c8655f3f033ba4ebea579d27f8c637 | 163 | py | Python | POP1/worksheets/three/ex10/code.py | silvafj/BBK-MSCCS-2017-18 | d97b0f8e7434d19a1a4006989c32c4c1deb93842 | [
"MIT"
] | 1 | 2021-12-29T19:38:56.000Z | 2021-12-29T19:38:56.000Z | POP1/worksheets/three/ex10/code.py | silvafj/BBK-MSCCS-2017-18 | d97b0f8e7434d19a1a4006989c32c4c1deb93842 | [
"MIT"
] | null | null | null | POP1/worksheets/three/ex10/code.py | silvafj/BBK-MSCCS-2017-18 | d97b0f8e7434d19a1a4006989c32c4c1deb93842 | [
"MIT"
] | 2 | 2021-04-08T22:58:03.000Z | 2021-04-09T01:16:51.000Z | words = {}
for _ in range(int(input())):
for w in input().split():
words[w] = words.get(w, 0) + 1
print(*sorted(words, key=lambda w: (-words[w], w)))
| 23.285714 | 51 | 0.552147 |
289931cbe82d6a09a06a1e0c6f00d61e4418e03f | 1,564 | py | Python | setup.py | nagesh4193/django-treebeard | 15a567b8eb20dc1f1b0db0a527bc749f20327820 | [
"Apache-2.0"
] | null | null | null | setup.py | nagesh4193/django-treebeard | 15a567b8eb20dc1f1b0db0a527bc749f20327820 | [
"Apache-2.0"
] | null | null | null | setup.py | nagesh4193/django-treebeard | 15a567b8eb20dc1f1b0db0a527bc749f20327820 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from setuptools import setup, find_packages
from treebeard import __version__
import codecs
def root_dir():
try:
return os.path.dirname(__file__)
except NameError:
return '.'
setup_args = dict(
name='django-treebeard',
version=_... | 31.28 | 98 | 0.628517 |
22a9d9cbb07e53451dc738b51b0a0c6b276cc41a | 842 | py | Python | Softuni Assignments/exam 11 March/lecture_cdn_tests.py | peter-stoyanov/Python | 52ddb70537c05caa0d87740493b7b1f974191984 | [
"MIT"
] | null | null | null | Softuni Assignments/exam 11 March/lecture_cdn_tests.py | peter-stoyanov/Python | 52ddb70537c05caa0d87740493b7b1f974191984 | [
"MIT"
] | null | null | null | Softuni Assignments/exam 11 March/lecture_cdn_tests.py | peter-stoyanov/Python | 52ddb70537c05caa0d87740493b7b1f974191984 | [
"MIT"
] | null | null | null | import unittest
# import io
# import sys
import lecture_cdn as sut
class TestLectureCDN(unittest.TestCase):
def test_get_tokens(self):
tokens = sut.extract_tokens('trainer:housey;course:csharp-oop-basics;lecture:polymorphism;duration:3h05m')
self.assertSequenceEqual(
sorted(['polymorph... | 33.68 | 114 | 0.680523 |
c70f38cdaf4023de01e7ea7b17e832e2fff22225 | 7,096 | py | Python | sumo/plotting/__init__.py | mkrack/sumo | e885844de07e03bde552f9e38e2230edd73b10da | [
"MIT"
] | null | null | null | sumo/plotting/__init__.py | mkrack/sumo | e885844de07e03bde552f9e38e2230edd73b10da | [
"MIT"
] | null | null | null | sumo/plotting/__init__.py | mkrack/sumo | e885844de07e03bde552f9e38e2230edd73b10da | [
"MIT"
] | null | null | null | # coding: utf-8
# Copyright (c) Scanlon Materials Theory Group
# Distributed under the terms of the MIT License.
"""
Subpackage providing helper functions for generating publication ready plots.
"""
from functools import wraps
import numpy as np
import matplotlib.pyplot
from matplotlib.collections import LineCollect... | 35.128713 | 78 | 0.590333 |
1aab62441fd92d02832602ed85c7a4f74df90cd0 | 93,765 | py | Python | pyidf/humidifiers_and_dehumidifiers.py | marcelosalles/pyidf | c2f744211572b5e14e29522aac1421ba88addb0e | [
"Apache-2.0"
] | 19 | 2015-12-08T23:33:51.000Z | 2022-01-31T04:41:10.000Z | pyidf/humidifiers_and_dehumidifiers.py | marcelosalles/pyidf | c2f744211572b5e14e29522aac1421ba88addb0e | [
"Apache-2.0"
] | 2 | 2019-10-04T10:57:00.000Z | 2021-10-01T06:46:17.000Z | pyidf/humidifiers_and_dehumidifiers.py | marcelosalles/pyidf | c2f744211572b5e14e29522aac1421ba88addb0e | [
"Apache-2.0"
] | 7 | 2015-11-04T02:25:01.000Z | 2021-12-08T03:14:28.000Z | """ Data objects in group "Humidifiers and Dehumidifiers"
"""
from collections import OrderedDict
import logging
from pyidf.helper import DataObject
logger = logging.getLogger("pyidf")
logger.addHandler(logging.NullHandler())
class HumidifierSteamElectric(DataObject):
""" Corresponds to IDD object `Humidifier... | 42.350949 | 135 | 0.513049 |
6b2a14f521612f3206484e1440e215292b1b9cf4 | 120 | py | Python | abc/196/B.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | 2 | 2022-01-22T07:56:58.000Z | 2022-01-24T00:29:37.000Z | abc/196/B.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | abc/196/B.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | import sys
input = sys.stdin.readline()
S = input
if S.count(".") == 0:
print(S)
else:
print(S.split(".")[0])
| 12 | 28 | 0.558333 |
444fb0a597e84bd2bad47b29c6fe93368fc93336 | 7,757 | py | Python | novice_stakes/periodic/quadrature_rs.py | nedlrichards/novice_stakes | 23038da6ee14ad8861938f7307e33b65e3835626 | [
"MIT"
] | null | null | null | novice_stakes/periodic/quadrature_rs.py | nedlrichards/novice_stakes | 23038da6ee14ad8861938f7307e33b65e3835626 | [
"MIT"
] | null | null | null | novice_stakes/periodic/quadrature_rs.py | nedlrichards/novice_stakes | 23038da6ee14ad8861938f7307e33b65e3835626 | [
"MIT"
] | null | null | null | """
===================================================
Solve for with Fourier coefficents of scatter field
===================================================
Reflection coefficents for a general periodic surface.
"""
import numpy as np
from scipy.special import jv
from scipy.linalg import solve
import numexpr as ne
f... | 37.839024 | 80 | 0.559108 |
b9c6e8f45946fcc2196c43d9275ba1b74c47fab1 | 12,449 | py | Python | FEP/analysis/harmonic_rest_correction.py | vvoelz/covid-FAH-CPU | 1b22f0ac046d37fdcbf7c2b1b476abd35eb162c5 | [
"MIT"
] | 1 | 2020-04-16T05:10:33.000Z | 2020-04-16T05:10:33.000Z | FEP/analysis/harmonic_rest_correction.py | vvoelz/covid-FAH-CPU | 1b22f0ac046d37fdcbf7c2b1b476abd35eb162c5 | [
"MIT"
] | 7 | 2020-03-16T16:14:28.000Z | 2020-05-16T16:05:18.000Z | FEP/analysis/harmonic_rest_correction.py | vvoelz/covid-FAH-CPU | 1b22f0ac046d37fdcbf7c2b1b476abd35eb162c5 | [
"MIT"
] | null | null | null | import os, sys, glob
import numpy as np
import xvg_tools
sys.path.append('../scripts')
from expanded_v3 import *
import argparse, textwrap
import pymbar # multistate Bennett acceptance ratio
from pymbar import timeseries # timeseries analysis
def calc_dG_rest(run_clone_datadir, mdp_file, outdir=None, maxlastgens=... | 39.025078 | 176 | 0.634669 |
9442e23a6d4681ce4a1b2e57984b386392d9ff71 | 12,417 | py | Python | intersight/model/niatelemetry_smart_license.py | CiscoDevNet/intersight-python | 04b721f37c3044646a91c185c7259edfb991557a | [
"Apache-2.0"
] | 5 | 2021-12-16T15:13:32.000Z | 2022-03-29T16:09:54.000Z | intersight/model/niatelemetry_smart_license.py | CiscoDevNet/intersight-python | 04b721f37c3044646a91c185c7259edfb991557a | [
"Apache-2.0"
] | 4 | 2022-01-25T19:05:51.000Z | 2022-03-29T20:18:37.000Z | intersight/model/niatelemetry_smart_license.py | CiscoDevNet/intersight-python | 04b721f37c3044646a91c185c7259edfb991557a | [
"Apache-2.0"
] | 2 | 2020-07-07T15:01:08.000Z | 2022-01-31T04:27:35.000Z | """
Cisco Intersight
Cisco Intersight is a management platform delivered as a service with embedded analytics for your Cisco and 3rd party IT infrastructure. This platform offers an intelligent level of management that enables IT organizations to analyze, simplify, and automate their environments in more advan... | 48.694118 | 1,678 | 0.634694 |
6d89ca4b77321eb0d29a7967449463f8e186d1fb | 3,136 | py | Python | Lib/test/test_msilib.py | livioso/cpython | 077061a7b24917aaf31057885c69919c5a553c88 | [
"PSF-2.0"
] | 18 | 2016-03-04T15:44:24.000Z | 2021-12-31T11:06:25.000Z | Lib/test/test_msilib.py | livioso/cpython | 077061a7b24917aaf31057885c69919c5a553c88 | [
"PSF-2.0"
] | 49 | 2016-02-29T17:59:52.000Z | 2019-05-05T04:59:26.000Z | Lib/test/test_msilib.py | livioso/cpython | 077061a7b24917aaf31057885c69919c5a553c88 | [
"PSF-2.0"
] | 5 | 2018-02-21T02:13:36.000Z | 2019-10-07T02:01:32.000Z | """ Test suite for the code in msilib """
import os.path
import unittest
from test.support import TESTFN, import_module, unlink
msilib = import_module('msilib')
import msilib.schema
def init_database():
path = TESTFN + '.msi'
db = msilib.init_database(
path,
msilib.schema,
'Python Test... | 31.049505 | 78 | 0.608099 |
abffae8bce8d84d4d75263261a8083dadb160cc1 | 11,739 | py | Python | dmipy/tissue_response/three_tissue_response.py | weningerleon/dmipy | 6eeb4cf803722ba8c7910c67974bff6a6a01a14e | [
"MIT"
] | null | null | null | dmipy/tissue_response/three_tissue_response.py | weningerleon/dmipy | 6eeb4cf803722ba8c7910c67974bff6a6a01a14e | [
"MIT"
] | null | null | null | dmipy/tissue_response/three_tissue_response.py | weningerleon/dmipy | 6eeb4cf803722ba8c7910c67974bff6a6a01a14e | [
"MIT"
] | null | null | null | import warnings
from scipy.optimize import brute
from scipy.stats import pearsonr
import numpy as np
from dipy.reconst import dti
from ..core.acquisition_scheme import gtab_dmipy2dipy
from dipy.segment.mask import median_otsu
from . import white_matter_response
from ..signal_models.tissue_response_models import (
e... | 42.226619 | 79 | 0.693841 |
e79b1211632cd8e094970b8d8075096aa182b77a | 164 | py | Python | dict.py | NickYxy/JustPractice | d8b6eacf12da2bef2b3ff4e1f8bc8b53c00bb619 | [
"MIT"
] | null | null | null | dict.py | NickYxy/JustPractice | d8b6eacf12da2bef2b3ff4e1f8bc8b53c00bb619 | [
"MIT"
] | null | null | null | dict.py | NickYxy/JustPractice | d8b6eacf12da2bef2b3ff4e1f8bc8b53c00bb619 | [
"MIT"
] | null | null | null | __author__ = 'nickyuan'
dict = [{'a':'a','b':'b'}]
print(dict[0]['a'])
c = [('course_pic', '<FileStorage: 4e6fefdc79b4ee5186fd5534366d7a0b_hd.jpg')]
print(c[0]) | 18.222222 | 77 | 0.634146 |
d1cbcd2b36756164b3430cfa02c202c71d6f7d49 | 469 | py | Python | crop.py | cyitianyou/KingOfGlory-Scripts-IOS | 91d7a7f75e53505515fa24e0bc3fe21df1443ed9 | [
"Apache-2.0"
] | 1 | 2018-09-18T05:11:51.000Z | 2018-09-18T05:11:51.000Z | crop.py | cyitianyou/KingOfGlory-Scripts-IOS | 91d7a7f75e53505515fa24e0bc3fe21df1443ed9 | [
"Apache-2.0"
] | null | null | null | crop.py | cyitianyou/KingOfGlory-Scripts-IOS | 91d7a7f75e53505515fa24e0bc3fe21df1443ed9 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from PIL import Image
if __name__ == '__main__':
name = '6'
img = Image.open('images/bg/{}.png'.format(name))
# region = (920, 80, 1112, 150)
# region = (1180, 680, 1310, 720)
# region = (1220, 697, 1270, 745)
# region = (575, 30, 758, 60)
# region = (1020, 35, 1200... | 23.45 | 53 | 0.552239 |
1af6e8c030cfbd929c1262ef410abec286f3a029 | 7,365 | py | Python | kitsune/users/tests/test_forms.py | turtleloveshoes/kitsune | 7e5524644eab7f608a44c44c63d242cda3aef7f0 | [
"BSD-3-Clause"
] | 1 | 2015-03-09T05:48:58.000Z | 2015-03-09T05:48:58.000Z | kitsune/users/tests/test_forms.py | rlr/kitsune | 591e996a3a115a7b235cbca19f5dec58fc9b6249 | [
"BSD-3-Clause"
] | 1 | 2021-04-30T20:33:35.000Z | 2021-04-30T20:33:35.000Z | kitsune/users/tests/test_forms.py | rlr/kitsune | 591e996a3a115a7b235cbca19f5dec58fc9b6249 | [
"BSD-3-Clause"
] | null | null | null | import re
from django.forms import ValidationError
from nose.tools import eq_
from pyquery import PyQuery as pq
from kitsune.users.forms import (
AuthenticationForm, ProfileForm, RegisterForm, SetPasswordForm,
ForgotUsernameForm, username_allowed)
from kitsune.sumo.tests import TestCase
from kitsune.users.tes... | 34.740566 | 78 | 0.559403 |
87303ff5e203384ab11184b2441011b85f26cc4b | 2,352 | py | Python | Regression/AllAtOnce/power.py | vnc-edu/machine-learning | 5a212ae303c5db319c0474077a13eb663aff2c54 | [
"Apache-2.0"
] | null | null | null | Regression/AllAtOnce/power.py | vnc-edu/machine-learning | 5a212ae303c5db319c0474077a13eb663aff2c54 | [
"Apache-2.0"
] | null | null | null | Regression/AllAtOnce/power.py | vnc-edu/machine-learning | 5a212ae303c5db319c0474077a13eb663aff2c54 | [
"Apache-2.0"
] | null | null | null | # import libraries
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from sklearn.ensemble import RandomForestRegressor
from sklearn.model_selection import train_test_split
from sklearn.linear_model import LinearRegression
from sklearn.metrics import r2_score
# Importing the dataset
from sklearn.p... | 27.670588 | 93 | 0.796344 |
f214fee22e2cc79f15b3993afe7f035646af25fe | 7,926 | py | Python | google/cloud/compute_v1/services/autoscalers/transports/base.py | georgiyekkert/python-compute | d128efbb3bf10af9b41e55b20aaa8080b3221e77 | [
"Apache-2.0"
] | null | null | null | google/cloud/compute_v1/services/autoscalers/transports/base.py | georgiyekkert/python-compute | d128efbb3bf10af9b41e55b20aaa8080b3221e77 | [
"Apache-2.0"
] | null | null | null | google/cloud/compute_v1/services/autoscalers/transports/base.py | georgiyekkert/python-compute | d128efbb3bf10af9b41e55b20aaa8080b3221e77 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 35.226667 | 101 | 0.643452 |
d845b03f152430d6be5980ff8186838a3b203abd | 330 | py | Python | ridecost_cal.py | Tusar6701/python1.0 | 22dbdba3693597e3cc61a585a348702461567ee1 | [
"Apache-2.0"
] | null | null | null | ridecost_cal.py | Tusar6701/python1.0 | 22dbdba3693597e3cc61a585a348702461567ee1 | [
"Apache-2.0"
] | null | null | null | ridecost_cal.py | Tusar6701/python1.0 | 22dbdba3693597e3cc61a585a348702461567ee1 | [
"Apache-2.0"
] | null | null | null | dist = input("Enter the distance travelled by youto and fro in kms : ")
f_avg = input("Enter the fuel average in your area [km/litre]: ")
cost_of_diesel = input("Enter the cost of diesel [int INR]: ")
f_cons = float(dist) / float(f_avg)
cost = float(f_cons) * float(cost_of_diesel)
print("The cost of travel is : ... | 41.25 | 72 | 0.690909 |
f2ed0f0a8530c78d7f19a5f9b6a1c8a0f0db7a59 | 1,799 | py | Python | cnnlstm.py | chaudharyhimanshu/Violence-Detection | 728931fff012463f71b3011c697741a154aeed42 | [
"MIT"
] | null | null | null | cnnlstm.py | chaudharyhimanshu/Violence-Detection | 728931fff012463f71b3011c697741a154aeed42 | [
"MIT"
] | null | null | null | cnnlstm.py | chaudharyhimanshu/Violence-Detection | 728931fff012463f71b3011c697741a154aeed42 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Fri Nov 6 16:03:26 2019
@author: Himanshu
"""
from keras.models import Sequential
from keras.layers import Flatten, Conv3D
from keras.layers.normalization import BatchNormalization
from keras.layers.convolutional_recurrent import ConvLSTM2D
from keras.layers import MaxPooling3... | 33.314815 | 99 | 0.675931 |
a53d310401f0fd065c0f5de63a7417dfae0364e7 | 1,099 | py | Python | src/modules/IcmpFilter.py | olivervbk/inactmon | 5ef2c0795f2e146db2311e6ec3f8aed231bfb6cc | [
"RSA-MD"
] | null | null | null | src/modules/IcmpFilter.py | olivervbk/inactmon | 5ef2c0795f2e146db2311e6ec3f8aed231bfb6cc | [
"RSA-MD"
] | null | null | null | src/modules/IcmpFilter.py | olivervbk/inactmon | 5ef2c0795f2e146db2311e6ec3f8aed231bfb6cc | [
"RSA-MD"
] | null | null | null | from impacket import ImpactDecoder
class IcmpFilter():
attributes = None
myIpAddresses = None
logger = None
def __init__(self, attributes, logger, myIpAddresses):
self.attributes = attributes
self.logger = logger
self.myIpAddresses = myIpAddresses
def rule(self):
rule = "icmp[icmptype] == icmp-echo"
#... | 21.54902 | 60 | 0.675159 |
6b5046e42a27c05fffcf9cc0239f069983b935ec | 2,556 | py | Python | exercise/tests/test_email_thread.py | jugraj/phishtray | 1fa3cec7c34bcaead8f524fc9cbb2b9bf737eff6 | [
"MIT"
] | null | null | null | exercise/tests/test_email_thread.py | jugraj/phishtray | 1fa3cec7c34bcaead8f524fc9cbb2b9bf737eff6 | [
"MIT"
] | null | null | null | exercise/tests/test_email_thread.py | jugraj/phishtray | 1fa3cec7c34bcaead8f524fc9cbb2b9bf737eff6 | [
"MIT"
] | null | null | null | from django.test import TestCase
from exercise.models import *
from exercise.tests.helpers.assert_emal_response import *
class ExerciseEmailThreadTests(TestCase):
def test_exercise_email_thread_not_found(self):
response = self.client.get('/exercise/thread/1/')
self.assertEqual(response.status_cod... | 34.540541 | 80 | 0.622066 |
851909a6bbce97dbe2eeda27c9ffe459e25e9b2c | 465 | py | Python | recipes/jsoncpp/all/test_package/conanfile.py | marcvilletard/conan-center-index | e8ed6467021c025702ebf3b529972ce39285a650 | [
"MIT"
] | null | null | null | recipes/jsoncpp/all/test_package/conanfile.py | marcvilletard/conan-center-index | e8ed6467021c025702ebf3b529972ce39285a650 | [
"MIT"
] | null | null | null | recipes/jsoncpp/all/test_package/conanfile.py | marcvilletard/conan-center-index | e8ed6467021c025702ebf3b529972ce39285a650 | [
"MIT"
] | null | null | null | from conans import ConanFile, CMake, tools
import os
class TestPackageConan(ConanFile):
settings = "os", "compiler", "build_type", "arch"
generators = "cmake_find_package"
def build(self):
cmake = CMake(self)
cmake.configure()
cmake.build()
def test(self):
if not tool... | 25.833333 | 58 | 0.63871 |
9a6dbd011a9339d6de3a8aace0649a4b1e9bc943 | 1,924 | py | Python | test1.py | stableShip/photo_analysis | 0759df88f95cdc45eaf0e68b9bddb7950a765e6c | [
"MIT"
] | 1 | 2016-08-30T15:15:04.000Z | 2016-08-30T15:15:04.000Z | test1.py | stableShip/photo_analysis | 0759df88f95cdc45eaf0e68b9bddb7950a765e6c | [
"MIT"
] | null | null | null | test1.py | stableShip/photo_analysis | 0759df88f95cdc45eaf0e68b9bddb7950a765e6c | [
"MIT"
] | null | null | null | #coding:utf-8
import sys,os
from PIL import Image,ImageDraw
import pytesseract
#二值判断,如果确认是噪声,用改点的上面一个点的灰度进行替换
#该函数也可以改成RGB判断的,具体看需求如何
def getPixel(image,x,y,G,N):
L = image.getpixel((x,y))
if L > G:
L = True
else:
L = False
nearDots = 0
if L == (image.getpi... | 25.653333 | 78 | 0.50104 |
acd73155fa9dc941edd06f2c4099a739a61fda98 | 6,374 | py | Python | fm.py | kn45/FactorizatioMachine | 02df4075aaeb7afb36fdc616f3c4346ded40a881 | [
"MIT"
] | 9 | 2018-06-06T08:38:49.000Z | 2019-07-15T02:04:37.000Z | fm.py | kn45/FactorizatioMachine | 02df4075aaeb7afb36fdc616f3c4346ded40a881 | [
"MIT"
] | null | null | null | fm.py | kn45/FactorizatioMachine | 02df4075aaeb7afb36fdc616f3c4346ded40a881 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import tensorflow as tf
class FMCore(object):
"""Factorization Machine Core
"""
def _sparse_mul(self, sp_x, w):
"""dense_res = sparse_x * dense_w
return dense matrix
"""
# this could achieve sparse gradient
return tf.sparse_tensor_dense_matmul(... | 40.08805 | 99 | 0.597741 |
c2009c3b492f2bd4f6be0ae976e7e2ca410baf92 | 4,107 | py | Python | dist.py | opendxl/opendxl-openc2-client-python | ce80246526d49cc8fdbe134e87aa725456d6a376 | [
"Apache-2.0"
] | 1 | 2020-12-22T17:35:17.000Z | 2020-12-22T17:35:17.000Z | dist.py | opendxl/opendxl-openc2-client-python | ce80246526d49cc8fdbe134e87aa725456d6a376 | [
"Apache-2.0"
] | null | null | null | dist.py | opendxl/opendxl-openc2-client-python | ce80246526d49cc8fdbe134e87aa725456d6a376 | [
"Apache-2.0"
] | 1 | 2021-02-02T17:08:09.000Z | 2021-02-02T17:08:09.000Z | from __future__ import absolute_import
from __future__ import print_function
import os
import subprocess
from tempfile import mkstemp
from shutil import move
from distutils.dir_util import copy_tree, remove_tree
from distutils.file_util import copy_file, move_file
from distutils.core import run_setup
from distutils.arc... | 34.805085 | 86 | 0.689311 |
110881a4ade0d28cbd7fb304d8086ee0f64590c1 | 568 | py | Python | doc/test_example1.py | tmarktaylor/phmdoctest | 6974c95f8019aeea7e99a0cd7cafb06846291a35 | [
"MIT"
] | 16 | 2020-06-01T21:50:04.000Z | 2022-03-10T00:47:47.000Z | doc/test_example1.py | Borda/phmdoctest | 36b657fae364b5a6dcf59f8b4d92e5fb6dd713bd | [
"MIT"
] | 18 | 2020-06-01T22:08:59.000Z | 2022-03-30T15:26:10.000Z | doc/test_example1.py | Borda/phmdoctest | 36b657fae364b5a6dcf59f8b4d92e5fb6dd713bd | [
"MIT"
] | 3 | 2020-06-23T02:04:25.000Z | 2022-02-10T21:32:19.000Z | """pytest file built from doc/example1.md"""
from phmdoctest.functions import _phm_compare_exact
def session_00001_line_6():
r"""
>>> print("Hello World!")
Hello World!
"""
def test_code_14_output_28(capsys):
from enum import Enum
class Floats(Enum):
APPLES = 1
CIDER = 2
... | 18.322581 | 70 | 0.653169 |
79f8bf69cbcecc57c80afc259f70e24d533de352 | 18,516 | py | Python | finance_datareader_py/_version.py | GuQiangJS/finance-datareader-py | 4b9307b5ad9ed07907d5188d753d908ec3998316 | [
"Apache-2.0"
] | 7 | 2018-12-04T02:11:01.000Z | 2022-02-22T06:11:27.000Z | finance_datareader_py/_version.py | GuQiangJS/finance-datareader-py | 4b9307b5ad9ed07907d5188d753d908ec3998316 | [
"Apache-2.0"
] | 2 | 2018-07-12T08:34:07.000Z | 2018-07-12T15:06:59.000Z | finance_datareader_py/_version.py | GuQiangJS/finance-datareader-py | 4b9307b5ad9ed07907d5188d753d908ec3998316 | [
"Apache-2.0"
] | null | null | null | # This file helps to compute a version number in source trees obtained from
# git-archive tarball (such as those provided by githubs download-from-tag
# feature). Distribution tarballs (built by setup.py sdist) and build
# directories (produced by setup.py build) will contain a much shorter file
# that just contains th... | 35.471264 | 79 | 0.585062 |
aac561c4934023a1db8912322be9e0d32399ceb6 | 2,756 | py | Python | reverse_search.py | Shinpachi8/passiveDomain | e69a933365a216eaa849293b0f786418361c7d61 | [
"Apache-2.0"
] | null | null | null | reverse_search.py | Shinpachi8/passiveDomain | e69a933365a216eaa849293b0f786418361c7d61 | [
"Apache-2.0"
] | null | null | null | reverse_search.py | Shinpachi8/passiveDomain | e69a933365a216eaa849293b0f786418361c7d61 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# coding=utf-8
import os
import json
import time
import sys
FPATH = '/mnt/e/2 tools/5 dnsdata/fdns_a.sort.txt'
MAXLINESIZE = 500
WALKBYTES = 10000
LIMIT = {
'MaxScan': 100,
'MaxOutputLines': 100000
}
def get_string(f, offset):
try:
f.seek(offset, 0)
line = f.read(... | 22.77686 | 60 | 0.560958 |
fe65c32f6421f0b4291964a9de414aa6aab9f539 | 1,559 | py | Python | pymote/tests/test_network.py | darbula/pymote | fd581cc12fcd10beec7e4d72e90bf6250ac17699 | [
"BSD-3-Clause"
] | 16 | 2015-01-22T11:52:48.000Z | 2021-01-31T23:30:45.000Z | pymote/tests/test_network.py | nkitic/pymote | 84d852c922b39afc64950e967b8309ccd8faf6a5 | [
"BSD-3-Clause"
] | 5 | 2015-10-30T10:45:04.000Z | 2017-06-28T17:42:04.000Z | pymote/tests/test_network.py | nkitic/pymote | 84d852c922b39afc64950e967b8309ccd8faf6a5 | [
"BSD-3-Clause"
] | 17 | 2015-06-14T08:53:55.000Z | 2021-08-25T00:53:07.000Z | import unittest
from pymote.network import Network
from pymote.node import Node
from pymote.environment import Environment2D
from pymote.channeltype import ChannelType
from pymote.conf import settings
class TestNetworkCreation(unittest.TestCase):
def setUp(self):
self.net = Network()
... | 39.974359 | 74 | 0.583066 |
00cdb768f52307fc907a0ed4e501a925a132b5a8 | 11,270 | py | Python | tests/test_andata.py | CHIMEFRB/ch_util | 37b2f2510ba39def44ecce0e8cb729e2ea108603 | [
"MIT"
] | 1 | 2021-02-16T15:59:08.000Z | 2021-02-16T15:59:08.000Z | tests/test_andata.py | CHIMEFRB/ch_util | 37b2f2510ba39def44ecce0e8cb729e2ea108603 | [
"MIT"
] | 20 | 2021-01-22T01:43:14.000Z | 2022-02-15T05:08:30.000Z | tests/test_andata.py | CHIMEFRB/ch_util | 37b2f2510ba39def44ecce0e8cb729e2ea108603 | [
"MIT"
] | 2 | 2021-03-10T00:47:09.000Z | 2021-06-03T18:51:23.000Z | """Unit tests for analysis data format."""
from functools import wraps
import h5py
import numpy as np
import os
import pytest
import warnings
from ch_util import andata
from caput.memh5 import MemGroup
import data_paths
# All the test data file names.
acq_fname_list = data_paths.paths1_0
acq_fname = acq_fname_list... | 31.218837 | 84 | 0.687578 |
89fb02ecce1dc458aa5cc83d0191920b51358fd2 | 370 | py | Python | pyamg/krylov/setup.py | rsmedleystevenson/pyamg | 72c3b43e0d14223e3849cb7e5f0bc8817b342373 | [
"MIT"
] | null | null | null | pyamg/krylov/setup.py | rsmedleystevenson/pyamg | 72c3b43e0d14223e3849cb7e5f0bc8817b342373 | [
"MIT"
] | null | null | null | pyamg/krylov/setup.py | rsmedleystevenson/pyamg | 72c3b43e0d14223e3849cb7e5f0bc8817b342373 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
def configuration(parent_package='', top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('krylov', parent_package, top_path)
config.add_data_dir('tests')
return config
if __name__ == '__main__':
from numpy.distutils.core import setup... | 23.125 | 62 | 0.724324 |
f55ed85cd6fca22d1f5b9b13ea30d41ea6d9e1db | 116,481 | py | Python | python/ccxt/async_support/huobi.py | dedeisep/ccxt | b45680acf521f2881733a29161b40d457c935b80 | [
"MIT"
] | null | null | null | python/ccxt/async_support/huobi.py | dedeisep/ccxt | b45680acf521f2881733a29161b40d457c935b80 | [
"MIT"
] | null | null | null | python/ccxt/async_support/huobi.py | dedeisep/ccxt | b45680acf521f2881733a29161b40d457c935b80 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.async_support.base.exchange import Exchange
# -----------------------------------------------------------------------------
try... | 48.655388 | 355 | 0.46927 |
1adefcc5e91479526668e6c42a9429fb644d613e | 4,969 | py | Python | aioyoutube/exceptions.py | PlasticStrawActivist/aioyoutube.py | 08f00cc8f7921c3a2b42c80b932e39287e07ae6b | [
"MIT"
] | 3 | 2021-02-25T14:30:17.000Z | 2021-10-30T03:37:21.000Z | aioyoutube/exceptions.py | PlasticStrawActivist/aioyoutube.py | 08f00cc8f7921c3a2b42c80b932e39287e07ae6b | [
"MIT"
] | 2 | 2021-02-21T19:17:22.000Z | 2021-03-11T01:01:22.000Z | aioyoutube/exceptions.py | PlasticStrawActivist/aioyoutube.py | 08f00cc8f7921c3a2b42c80b932e39287e07ae6b | [
"MIT"
] | 1 | 2021-10-04T08:15:09.000Z | 2021-10-04T08:15:09.000Z | """
The MIT License (MIT)
Copyright (c) 2021 im-mde
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, publ... | 25.880208 | 83 | 0.64842 |
74e197f9a6b768508f7c720c40294c0ae939c25b | 3,400 | py | Python | configs/topologies/BaseTopology.py | caihuayi/gem5 | 96fce476785a834f102ae69a895e661cf08e47cd | [
"BSD-3-Clause"
] | 16 | 2020-09-24T00:17:36.000Z | 2021-08-12T06:11:52.000Z | configs/topologies/BaseTopology.py | caihuayi/gem5 | 96fce476785a834f102ae69a895e661cf08e47cd | [
"BSD-3-Clause"
] | 5 | 2021-01-27T23:09:06.000Z | 2022-01-07T03:19:39.000Z | configs/topologies/BaseTopology.py | caihuayi/gem5 | 96fce476785a834f102ae69a895e661cf08e47cd | [
"BSD-3-Clause"
] | 15 | 2020-11-18T00:15:28.000Z | 2021-12-12T03:18:34.000Z | # Copyright (c) 2012 Advanced Micro Devices, Inc.
# 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 copyright
# notice, this list of conditions... | 44.155844 | 77 | 0.722941 |
90b7ee00807ee696610a121f93f81c2f352de845 | 774 | py | Python | chat_app/main/helpers.py | Jaygaur99/WebChatApp | 35f5e51de0b51a2fecf9e26d12edc1f987304458 | [
"MIT"
] | 1 | 2021-09-20T16:44:27.000Z | 2021-09-20T16:44:27.000Z | chat_app/main/helpers.py | Jaygaur99/WebChatApp | 35f5e51de0b51a2fecf9e26d12edc1f987304458 | [
"MIT"
] | 1 | 2021-10-05T15:49:09.000Z | 2021-10-05T15:49:09.000Z | chat_app/main/helpers.py | Jaygaur99/WebChatApp | 35f5e51de0b51a2fecf9e26d12edc1f987304458 | [
"MIT"
] | null | null | null | import random
from django.core.mail import send_mail
from django.conf import settings
def generate_otp():
otp = random.randint(100000, 999999)
return otp
def generate_otp_mail_fields(otp, fname):
subject = "Password Change OTP"
message = f"""Hey {fname}
We noticed that you are trying to change your p... | 29.769231 | 73 | 0.74031 |
b81a284cf86b842e769ea7ce0b61fddb5b6ab183 | 7,005 | py | Python | sites/google_codejam/2019/4_DatBae/local_testing_tool.py | NoelBird/chocochip | 7ab9477b9e4153927805c9473ee44a15d809b549 | [
"MIT"
] | null | null | null | sites/google_codejam/2019/4_DatBae/local_testing_tool.py | NoelBird/chocochip | 7ab9477b9e4153927805c9473ee44a15d809b549 | [
"MIT"
] | null | null | null | sites/google_codejam/2019/4_DatBae/local_testing_tool.py | NoelBird/chocochip | 7ab9477b9e4153927805c9473ee44a15d809b549 | [
"MIT"
] | null | null | null | # Usage: `testing_tool.py test_number`, where the argument test_number
# is 0 for Test Set 1 or 1 for Test Set 2.
from __future__ import print_function
import random
import sys
import re
# Use raw_input in Python2.
try:
input = raw_input
except NameError:
pass
_ERROR_MSG_EXTRA_NEW_LINES = "Input has extra newlin... | 33.042453 | 79 | 0.676089 |
7028e0f1a23d4a7b751d347988e6d940b044f4de | 1,787 | py | Python | desktop/libs/indexer/src/indexer/urls.py | vsosrc/hue | d8bc236d8d622759fa5988ff32246e4c750e7503 | [
"Apache-2.0"
] | null | null | null | desktop/libs/indexer/src/indexer/urls.py | vsosrc/hue | d8bc236d8d622759fa5988ff32246e4c750e7503 | [
"Apache-2.0"
] | null | null | null | desktop/libs/indexer/src/indexer/urls.py | vsosrc/hue | d8bc236d8d622759fa5988ff32246e4c750e7503 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... | 51.057143 | 109 | 0.745943 |
ffc2a04334ffcf004cb1903bdc48df7ea7feff5f | 6,872 | py | Python | pandas/tests/tseries/offsets/test_business_day.py | hvardhan20/pandas | fa28c61e63a887aee303380be914286a3aad711a | [
"BSD-3-Clause"
] | 2 | 2021-11-16T06:33:42.000Z | 2021-11-16T06:33:47.000Z | pandas/tests/tseries/offsets/test_business_day.py | yuquanl/pandas | 700be617eb567fb4ab82aa8151d5c4ee02c22b95 | [
"BSD-3-Clause"
] | null | null | null | pandas/tests/tseries/offsets/test_business_day.py | yuquanl/pandas | 700be617eb567fb4ab82aa8151d5c4ee02c22b95 | [
"BSD-3-Clause"
] | 1 | 2021-11-17T06:32:30.000Z | 2021-11-17T06:32:30.000Z | """
Tests for offsets.BDay
"""
from datetime import (
date,
datetime,
timedelta,
)
import numpy as np
import pytest
from pandas._libs.tslibs.offsets import (
ApplyTypeError,
BDay,
BMonthEnd,
)
from pandas import (
DatetimeIndex,
Timedelta,
_testing as tm,
)
from pandas.tests.tseri... | 29.748918 | 81 | 0.535943 |
c95a5165c7cf83b45f498395d82ce2582162c034 | 830 | py | Python | INOl1402.py | anudeep586/Codechef_hackerrank_codeforces1 | 39a536d6ad6d670e0bce2ba8657cf5715b0037e0 | [
"0BSD"
] | null | null | null | INOl1402.py | anudeep586/Codechef_hackerrank_codeforces1 | 39a536d6ad6d670e0bce2ba8657cf5715b0037e0 | [
"0BSD"
] | null | null | null | INOl1402.py | anudeep586/Codechef_hackerrank_codeforces1 | 39a536d6ad6d670e0bce2ba8657cf5715b0037e0 | [
"0BSD"
] | null | null | null | final_destination,tests=[int(x) for x in input().split(" ")]
z=[]
for i in range(tests):
x,y,z1=[int(x) for x in input().split(" ")]
z.append([x,y,z1])
p=0
source=1
for imz in range(len(z)):
k=[]
if source!=final_destination:
for i in range(len(z)):
if z[i][0]==source:
... | 26.774194 | 61 | 0.363855 |
b6f2caa300e56937bc5ca55e0c0e140842c8358d | 4,555 | py | Python | libs/applus/applus/tests/test_environ.py | cnicgpaul123/killNCP | aa153919389784354d1efa0c9669393a7ffe7cf7 | [
"MulanPSL-1.0"
] | 5 | 2020-02-24T06:29:08.000Z | 2021-03-07T06:46:26.000Z | libs/applus/applus/tests/test_environ.py | cnicgpaul123/killNCP | aa153919389784354d1efa0c9669393a7ffe7cf7 | [
"MulanPSL-1.0"
] | 3 | 2020-06-06T01:21:19.000Z | 2021-06-10T22:36:13.000Z | libs/applus/applus/tests/test_environ.py | cnicgpaul123/killNCP | aa153919389784354d1efa0c9669393a7ffe7cf7 | [
"MulanPSL-1.0"
] | null | null | null | # -*- coding: utf-8 -*-
# pylint: disable=missing-docstring
import os
import urllib
import unittest
from applus import environ
__all__ = ['TestEnviron']
class TestEnviron(unittest.TestCase):
def test_environ(self):
gef = environ.get_envfunc()
# read default
self.assertEqual(gef("SECRET_... | 38.277311 | 90 | 0.58573 |
798e9eedbbc6a8880cbe73e583d9638f82245e80 | 4,559 | py | Python | protoboard/settings.py | mariosky/protoboard | e715db9aaa9af8dba31ac7ab775c555cec2973b5 | [
"Apache-2.0"
] | 4 | 2016-02-27T18:22:29.000Z | 2019-01-30T15:01:37.000Z | protoboard/settings.py | mariosky/protoboard | e715db9aaa9af8dba31ac7ab775c555cec2973b5 | [
"Apache-2.0"
] | 37 | 2015-08-17T08:09:39.000Z | 2022-03-11T23:15:10.000Z | protoboard/settings.py | mariosky/protoboard | e715db9aaa9af8dba31ac7ab775c555cec2973b5 | [
"Apache-2.0"
] | 7 | 2015-03-27T19:15:07.000Z | 2021-04-08T00:33:23.000Z | # -*- coding: utf-8 -*-
"""
Django settings for protoboard project.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""
# Build paths inside the project like this: os.... | 22.909548 | 91 | 0.670322 |
f55578e1759b3e4e826b33f61c38f0cd109c120d | 1,667 | py | Python | joulescope_ui/widgets/waveform/axis_item_patch.py | sophiekovalevsky/pyjoulescope_ui | 740cb4883795212c4e6b1ee962babf893372f2fb | [
"Apache-2.0"
] | 31 | 2018-12-13T16:13:02.000Z | 2021-09-28T09:57:50.000Z | joulescope_ui/widgets/waveform/axis_item_patch.py | sophiekovalevsky/pyjoulescope_ui | 740cb4883795212c4e6b1ee962babf893372f2fb | [
"Apache-2.0"
] | 144 | 2019-02-12T14:58:02.000Z | 2022-03-24T12:06:17.000Z | joulescope_ui/widgets/waveform/axis_item_patch.py | sophiekovalevsky/pyjoulescope_ui | 740cb4883795212c4e6b1ee962babf893372f2fb | [
"Apache-2.0"
] | 7 | 2019-07-04T16:34:54.000Z | 2021-03-24T16:25:06.000Z | # Copyright 2020 Jetperch LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | 32.686275 | 75 | 0.656269 |
e67bece00650c220e1467e735dcc25a8a8d3f504 | 810 | py | Python | bias-detect/bias_backend/bias_backend/bias_backend/bias_backend/urls.py | zcabjwu/react-django-ml-app | 7fc39f39c68653279e103aca5b942672d030405f | [
"MIT"
] | null | null | null | bias-detect/bias_backend/bias_backend/bias_backend/bias_backend/urls.py | zcabjwu/react-django-ml-app | 7fc39f39c68653279e103aca5b942672d030405f | [
"MIT"
] | null | null | null | bias-detect/bias_backend/bias_backend/bias_backend/bias_backend/urls.py | zcabjwu/react-django-ml-app | 7fc39f39c68653279e103aca5b942672d030405f | [
"MIT"
] | null | null | null | """bias_backend URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-... | 35.217391 | 77 | 0.708642 |
00c0a7128b34366083728c899759fb31ed922217 | 3,374 | py | Python | cassiopeia/datastores/kernel/thirdpartycode.py | mikaeldui/cassiopeia | fb22e0dd2c71ae5e14c046379e49c8a44215e79d | [
"MIT"
] | null | null | null | cassiopeia/datastores/kernel/thirdpartycode.py | mikaeldui/cassiopeia | fb22e0dd2c71ae5e14c046379e49c8a44215e79d | [
"MIT"
] | null | null | null | cassiopeia/datastores/kernel/thirdpartycode.py | mikaeldui/cassiopeia | fb22e0dd2c71ae5e14c046379e49c8a44215e79d | [
"MIT"
] | null | null | null | from typing import Type, TypeVar, MutableMapping, Any, Iterable, Generator
from datapipelines import (
DataSource,
PipelineContext,
Query,
NotFoundError,
validate_query,
)
from .common import KernelSource, APINotFoundError
from ...data import Platform
from ...dto.thirdpartycode import VerificationS... | 33.405941 | 88 | 0.62626 |
f2d8a1b2524f5071c686f50842e8ff75a2fdfb9c | 347,561 | py | Python | tests/python/unittest/test_operator.py | UtileFuzzball/mxnet_test | 153d2f4bf9611c9d4a8d2d1abaa17732b6e9038a | [
"Apache-2.0"
] | null | null | null | tests/python/unittest/test_operator.py | UtileFuzzball/mxnet_test | 153d2f4bf9611c9d4a8d2d1abaa17732b6e9038a | [
"Apache-2.0"
] | 6 | 2021-03-18T23:54:21.000Z | 2022-01-13T01:11:51.000Z | tests/python/unittest/test_operator.py | UtileFuzzball/mxnet_test | 153d2f4bf9611c9d4a8d2d1abaa17732b6e9038a | [
"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 u... | 42.898173 | 173 | 0.574503 |
d4415074a3f48391fe831be61e3802b9477e2dba | 1,536 | py | Python | plangym/box_2d/env.py | Guillemdb/plangym | 60913bea3aaab23c8ec5caad5b9b65bf74969f44 | [
"MIT"
] | 8 | 2019-02-05T15:03:04.000Z | 2020-02-12T20:43:52.000Z | plangym/box_2d/env.py | Guillemdb/plangym | 60913bea3aaab23c8ec5caad5b9b65bf74969f44 | [
"MIT"
] | 2 | 2020-03-07T16:47:32.000Z | 2020-03-07T19:19:44.000Z | plangym/box_2d/env.py | Guillemdb/plangym | 60913bea3aaab23c8ec5caad5b9b65bf74969f44 | [
"MIT"
] | 3 | 2019-02-05T19:58:40.000Z | 2020-03-07T16:41:08.000Z | import copy
from typing import Union
import pickle
import numpy
from Box2D.Box2D import b2Vec2, b2Transform
from plangym.core import GymEnvironment
import copy
class Box2DEnv(GymEnvironment):
def get_state(self) -> numpy.array:
"""
Recover the internal state of the simulation.
An state... | 28.444444 | 88 | 0.619792 |
54fd287df7f6ee1ebc65a8a4a8e55a5fec3ed20f | 5,643 | py | Python | test/functional/p2p-leaktests.py | Palem1988/ion_old | 2c2b532abf61e2a06231c1d3b4d9b2bd0cdb469a | [
"MIT"
] | 2 | 2017-01-16T13:42:19.000Z | 2017-01-16T17:14:59.000Z | test/functional/p2p-leaktests.py | ionomy/ion_new | 759071e12ba2ab889221bf91d99bb052a3b98303 | [
"MIT"
] | 18 | 2017-01-19T09:19:48.000Z | 2017-01-27T01:59:30.000Z | test/functional/p2p-leaktests.py | ionomy/ion_new | 759071e12ba2ab889221bf91d99bb052a3b98303 | [
"MIT"
] | 10 | 2017-01-17T19:54:55.000Z | 2017-02-11T19:26:43.000Z | #!/usr/bin/env python3
# Copyright (c) 2017 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 message sending before handshake completion.
A node should never send anything other than VERSION/VERA... | 42.11194 | 118 | 0.716817 |
5d4286a80b77522efdea83cf9c051a2b843c098a | 21,388 | py | Python | edk2toollib/uefi/authenticated_variables_structure_support.py | joschock/edk2-pytool-library | 7281a7c5cff7b0ed273b89717cd1304c3db73e50 | [
"BSD-2-Clause-Patent"
] | null | null | null | edk2toollib/uefi/authenticated_variables_structure_support.py | joschock/edk2-pytool-library | 7281a7c5cff7b0ed273b89717cd1304c3db73e50 | [
"BSD-2-Clause-Patent"
] | null | null | null | edk2toollib/uefi/authenticated_variables_structure_support.py | joschock/edk2-pytool-library | 7281a7c5cff7b0ed273b89717cd1304c3db73e50 | [
"BSD-2-Clause-Patent"
] | null | null | null | ##
# UEFI Authenticated Variable Structure Support Library
#
# Copyright (c) Microsoft Corporation
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
import logging
import datetime
import struct
import hashlib
import uuid
from edk2toollib.uefi.wincert import WinCert, WinCertUefiGuid
from edk2toollib.utility_functions... | 38.816697 | 138 | 0.640453 |
b2ef7b7fff26c049c0881359c0d262af732a22e1 | 358 | py | Python | ThumkiStores/admin.py | Ashwin-Dev-P/Thumki-Final-Hosting | fcfe40000b688d419513831ece5400cb32caaa69 | [
"MIT"
] | 1 | 2022-01-09T10:23:22.000Z | 2022-01-09T10:23:22.000Z | ThumkiStores/admin.py | Ashwin-Dev-P/dev-stores | fcfe40000b688d419513831ece5400cb32caaa69 | [
"MIT"
] | null | null | null | ThumkiStores/admin.py | Ashwin-Dev-P/dev-stores | fcfe40000b688d419513831ece5400cb32caaa69 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import *
# Register your models here.
admin.site.register(Dress)
admin.site.register(Category)
admin.site.register(Customer_review)
admin.site.register(Messages)
admin.site.register(FAQ)
admin.site.register(Subscription)
admin.site.register(Profile)
admin.site.register(Gen... | 25.571429 | 36 | 0.821229 |
4839e27af44ea72fb6ea43aac20cf9833ba8430d | 6,592 | py | Python | fblldbbase.py | zddd/chisel | 7782bdde3062e15ccbdc5f617aa3a8f096b6751b | [
"MIT"
] | 1 | 2020-03-04T20:24:33.000Z | 2020-03-04T20:24:33.000Z | fblldbbase.py | zddd/chisel | 7782bdde3062e15ccbdc5f617aa3a8f096b6751b | [
"MIT"
] | null | null | null | fblldbbase.py | zddd/chisel | 7782bdde3062e15ccbdc5f617aa3a8f096b6751b | [
"MIT"
] | null | null | null | #!/usr/bin/python
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import lldb
import json
import shlex
class FBCommandArgument:
def __init__(self, short='', long='', ... | 34.694737 | 125 | 0.718902 |
01afd7cdf803b08f3bb537ea966695ff8583771a | 7,446 | py | Python | python/ncnn/model_zoo/rfcn.py | fzyzcjy/ncnn | 42e71609508fde1bd54d9d9de6ca5522ee3bcf37 | [
"BSD-3-Clause"
] | 14,886 | 2017-07-24T02:58:35.000Z | 2022-03-31T18:17:04.000Z | python/ncnn/model_zoo/rfcn.py | fzyzcjy/ncnn | 42e71609508fde1bd54d9d9de6ca5522ee3bcf37 | [
"BSD-3-Clause"
] | 3,361 | 2017-07-24T05:56:31.000Z | 2022-03-31T13:26:35.000Z | python/ncnn/model_zoo/rfcn.py | fzyzcjy/ncnn | 42e71609508fde1bd54d9d9de6ca5522ee3bcf37 | [
"BSD-3-Clause"
] | 3,786 | 2017-07-24T03:09:15.000Z | 2022-03-31T16:56:40.000Z | # Tencent is pleased to support the open source community by making ncnn available.
#
# Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved.
#
# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except
# in compliance with the License. You may obtain a copy of the... | 30.641975 | 124 | 0.536127 |
98bae88b63690b4f013f1b4a5dbee685c9b15080 | 1,343 | py | Python | plugin_office_crypto.py | bidhata/maldissect | b09cca953342657ada9ff4644013d449c52646e6 | [
"Apache-2.0"
] | null | null | null | plugin_office_crypto.py | bidhata/maldissect | b09cca953342657ada9ff4644013d449c52646e6 | [
"Apache-2.0"
] | null | null | null | plugin_office_crypto.py | bidhata/maldissect | b09cca953342657ada9ff4644013d449c52646e6 | [
"Apache-2.0"
] | 1 | 2020-09-17T23:17:16.000Z | 2020-09-17T23:17:16.000Z | #!/usr/bin/env python
__description__ = 'Office crypto plugin for oledump.py'
__author__ = 'Didier Stevens'
__version__ = '0.0.1'
__date__ = '2018/05/06'
"""
Source code put in public domain by Didier Stevens, no Copyright
https://DidierStevens.com
Use at your own risk
History:
2018/05/06: start
Todo:
"""
impor... | 27.979167 | 209 | 0.619509 |
e0bc5da1209fde5f3e09e3f9c3261ec2e1648f03 | 4,520 | py | Python | Game.py | mbrookes1304/Dudo | b71ad58032d74dc27e166121bfc3adb416143077 | [
"MIT"
] | 1 | 2016-04-23T06:53:41.000Z | 2016-04-23T06:53:41.000Z | Game.py | mbrookes1304/Dudo | b71ad58032d74dc27e166121bfc3adb416143077 | [
"MIT"
] | null | null | null | Game.py | mbrookes1304/Dudo | b71ad58032d74dc27e166121bfc3adb416143077 | [
"MIT"
] | null | null | null | from ComputerPlayer import ComputerPlayer
from HumanPlayer import HumanPlayer
from Dice import Dice
from queue import Queue
class Game(object):
'''Represents a game of Dudo.'''
def __init__(self, playername):
# Create a list of players, one human and four computer
self._playerList = [HumanPlay... | 37.666667 | 79 | 0.582301 |
d0267c6c552c192001abbdc4d33ee6f85a1bedad | 2,089 | py | Python | pyftpd/app/run_pyftpd.py | xaled/rpi4-docker | 5e1f0f68c9b7f4b77211052864e13caa6030cd24 | [
"MIT"
] | null | null | null | pyftpd/app/run_pyftpd.py | xaled/rpi4-docker | 5e1f0f68c9b7f4b77211052864e13caa6030cd24 | [
"MIT"
] | null | null | null | pyftpd/app/run_pyftpd.py | xaled/rpi4-docker | 5e1f0f68c9b7f4b77211052864e13caa6030cd24 | [
"MIT"
] | null | null | null | import os
import logging
from logging.handlers import RotatingFileHandler
from pyftpdlib.authorizers import DummyAuthorizer
from pyftpdlib.handlers import FTPHandler
from pyftpdlib.servers import FTPServer
HOME_DIR = "/data"
BIND_ADDRESS = "0.0.0.0"
LISTEN_PORT = 21
PASSIVE_PORTS = list(range(21100, 21111))
LOG_PATH =... | 34.816667 | 105 | 0.672092 |
476841da8db3c984dcd7801e03b476cf97e312b6 | 2,376 | py | Python | src/media_player.py | Siroj42/wasp-companion | d915c49308dd5c4bef47469c7735d0892e012b86 | [
"MIT"
] | 1 | 2021-09-01T15:54:19.000Z | 2021-09-01T15:54:19.000Z | src/media_player.py | Siroj42/wasp-companion | d915c49308dd5c4bef47469c7735d0892e012b86 | [
"MIT"
] | 4 | 2021-09-20T20:03:56.000Z | 2021-12-24T20:15:14.000Z | src/media_player.py | Siroj42/wasp-companion | d915c49308dd5c4bef47469c7735d0892e012b86 | [
"MIT"
] | 1 | 2021-09-20T18:25:24.000Z | 2021-09-20T18:25:24.000Z | import threading
import gi
import time
gi.require_version('Playerctl', '2.0')
from gi.repository import Playerctl, GLib
pc_music_commands = {
"play": 'GB({"t":"musicstate","state":"play"})',
"pause": 'GB({"t":"musicstate","state":"pause"})',
"info": 'GB({{"t":"musicinfo","artist":"{artist}","track":"{track}"}})'
}... | 30.857143 | 125 | 0.738215 |
30d0f908d95f7b057533d1970d769142c54cccb4 | 90 | py | Python | main.py | automationlogic/default-service | 3b64db086f98d17e71b36291afdcdd554fc7a0e8 | [
"MIT"
] | 1 | 2020-01-16T17:19:32.000Z | 2020-01-16T17:19:32.000Z | main.py | automationlogic/default-service | 3b64db086f98d17e71b36291afdcdd554fc7a0e8 | [
"MIT"
] | 6 | 2020-01-28T23:08:27.000Z | 2022-02-10T00:36:11.000Z | main.py | automationlogic/default-service | 3b64db086f98d17e71b36291afdcdd554fc7a0e8 | [
"MIT"
] | 1 | 2020-05-13T12:27:09.000Z | 2020-05-13T12:27:09.000Z | from flask import Flask
app = Flask(__name__)
@app.route('/')
def ok():
return 'ok'
| 11.25 | 23 | 0.633333 |
bff7865b83b0ff6c1e2202fb5f69efb95382061e | 10,717 | py | Python | nodepool/driver/fake/provider.py | leki75/nodepool | 1f971b03eff582051e6f638fbd2343ced3052b8e | [
"Apache-2.0"
] | null | null | null | nodepool/driver/fake/provider.py | leki75/nodepool | 1f971b03eff582051e6f638fbd2343ced3052b8e | [
"Apache-2.0"
] | null | null | null | nodepool/driver/fake/provider.py | leki75/nodepool | 1f971b03eff582051e6f638fbd2343ced3052b8e | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2011-2013 OpenStack Foundation
#
# 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 agree... | 34.349359 | 79 | 0.584119 |
f44b5068a01c0ebf75e367b9e88407629691ee7a | 3,095 | py | Python | services/mls/mls/settings.py | PXMYH/mls-scrapy | 57a102fd8f70a3a2251d8a15cfebcd60d1af0c44 | [
"MIT"
] | 1 | 2020-01-03T17:35:29.000Z | 2020-01-03T17:35:29.000Z | services/mls/mls/settings.py | PXMYH/mls-scrapy | 57a102fd8f70a3a2251d8a15cfebcd60d1af0c44 | [
"MIT"
] | 167 | 2018-10-20T15:51:04.000Z | 2021-06-25T15:18:54.000Z | services/mls/mls/settings.py | PXMYH/mls-scrapy | 57a102fd8f70a3a2251d8a15cfebcd60d1af0c44 | [
"MIT"
] | 3 | 2019-04-23T15:16:17.000Z | 2019-10-29T01:43:28.000Z | # -*- coding: utf-8 -*-
# Scrapy settings for mls project
#
# For simplicity, this file contains only settings considered important or
# commonly used. You can find more settings consulting the documentation:
#
# http://doc.scrapy.org/en/latest/topics/settings.html
# http://scrapy.readthedocs.org/en/latest/top... | 34.010989 | 109 | 0.775444 |
059f9560fc470e43c3d83760184714e2354f4a33 | 934 | py | Python | my_site/views/course.py | sch841466053/shangchunhong | a2d54373350c7b2cf9fe8dadf4e393e74cd3f620 | [
"MIT"
] | null | null | null | my_site/views/course.py | sch841466053/shangchunhong | a2d54373350c7b2cf9fe8dadf4e393e74cd3f620 | [
"MIT"
] | 1 | 2021-06-10T20:54:27.000Z | 2021-06-10T20:54:27.000Z | my_site/views/course.py | sch841466053/django-rest-framework- | 67a7aa61b39c1ef492479134a5cbbd9957513129 | [
"MIT"
] | null | null | null | from rest_framework.views import APIView
from rest_framework.response import Response
from my_site import models
from my_site.serializers.course_serializer import FreeCourseSerializer, SeniorCourseSerializer
from utils.auth import Auth
from django_redis import get_redis_connection
class GetFreeCourseList(APIView):
... | 29.1875 | 94 | 0.703426 |
5f69f983d42077863f7a4036364ea2b37a5e97db | 3,672 | py | Python | python_by_contract_corpus/correct/aoc2020/day_16_ticket_translation.py | mristin/python-by-contract-corpus | c96ed00389c3811d7d63560ac665d410a7ee8493 | [
"MIT"
] | 8 | 2021-05-07T17:37:37.000Z | 2022-02-26T15:08:42.000Z | python_by_contract_corpus/correct/aoc2020/day_16_ticket_translation.py | mristin/python-by-contract-corpus | c96ed00389c3811d7d63560ac665d410a7ee8493 | [
"MIT"
] | 22 | 2021-04-28T21:55:48.000Z | 2022-03-04T07:41:37.000Z | python_by_contract_corpus/correct/aoc2020/day_16_ticket_translation.py | mristin/aocdbc | c96ed00389c3811d7d63560ac665d410a7ee8493 | [
"MIT"
] | 3 | 2021-03-26T22:29:12.000Z | 2021-04-11T20:45:45.000Z | import re
from typing import List, Tuple, Final
from icontract import require, ensure, DBC
# crosshair: on
from python_by_contract_corpus.common import Lines
class RuleParsing:
"""Represent a rule which is not constrained by pre-conditions."""
identifier: Final[str] #: Identifier of the field
ranges: ... | 27.402985 | 87 | 0.614107 |
412b49985db6dc28cab9cf3fc1ebef7a3cf1cfbb | 20,001 | py | Python | statsmodels/tsa/varma_process.py | nikhase/statsmodels | e1822d4513f442002816bb898ca5794785f35c32 | [
"BSD-3-Clause"
] | 15 | 2015-03-03T09:47:42.000Z | 2022-01-05T18:28:31.000Z | statsmodels/tsa/varma_process.py | nikhase/statsmodels | e1822d4513f442002816bb898ca5794785f35c32 | [
"BSD-3-Clause"
] | 7 | 2015-11-20T08:33:04.000Z | 2020-07-24T19:34:39.000Z | statsmodels/tsa/varma_process.py | nikhase/statsmodels | e1822d4513f442002816bb898ca5794785f35c32 | [
"BSD-3-Clause"
] | 14 | 2015-01-06T22:08:34.000Z | 2021-01-01T16:33:23.000Z | # -*- coding: utf-8 -*-
""" Helper and filter functions for VAR and VARMA, and basic VAR class
Created on Mon Jan 11 11:04:23 2010
Author: josef-pktd
License: BSD
This is a new version, I didn't look at the old version again, but similar
ideas.
not copied/cleaned yet:
* fftn based filtering, creating samples with f... | 27.702216 | 90 | 0.515074 |
66a93f50ffa97cd0c1aa0e28bf88e25e2c8bdf00 | 1,291 | py | Python | setup.py | jakebriggs/mopidy-rnz | 5361f115ab5cffdd6a4bdaefe35f84023923d2f3 | [
"Apache-2.0"
] | null | null | null | setup.py | jakebriggs/mopidy-rnz | 5361f115ab5cffdd6a4bdaefe35f84023923d2f3 | [
"Apache-2.0"
] | null | null | null | setup.py | jakebriggs/mopidy-rnz | 5361f115ab5cffdd6a4bdaefe35f84023923d2f3 | [
"Apache-2.0"
] | null | null | null |
import re
from setuptools import find_packages, setup
def get_version(filename):
with open(filename) as fh:
metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", fh.read()))
return metadata['version']
setup(
name='Mopidy-RNZ',
version=get_version('mopidy_rnz/__init__.py'),
url='ht... | 28.065217 | 74 | 0.594113 |
38afdc6fe79d25494b4fb9bc18a5465944fc18d0 | 75,724 | py | Python | kayobe/cli/commands.py | kcl-eresearch/kayobe | 2445ec740e3445f813ba6b23c086bf113c5d96cf | [
"Apache-2.0"
] | 1 | 2021-06-29T12:56:22.000Z | 2021-06-29T12:56:22.000Z | kayobe/cli/commands.py | kcl-eresearch/kayobe | 2445ec740e3445f813ba6b23c086bf113c5d96cf | [
"Apache-2.0"
] | null | null | null | kayobe/cli/commands.py | kcl-eresearch/kayobe | 2445ec740e3445f813ba6b23c086bf113c5d96cf | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2017 StackHPC 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 wr... | 42.685457 | 79 | 0.64887 |
0830f1d84477d4ad8126f1719d7a647b6faccde0 | 1,325 | py | Python | benchmarks/benchmark.py | yarray/hpdbscan | c01f7a2657e91365fb846bbb492d5b66434160e8 | [
"MIT"
] | 20 | 2020-01-17T09:39:52.000Z | 2022-01-11T05:00:58.000Z | benchmarks/benchmark.py | yarray/hpdbscan | c01f7a2657e91365fb846bbb492d5b66434160e8 | [
"MIT"
] | 3 | 2020-03-24T09:17:37.000Z | 2021-07-14T19:40:38.000Z | benchmarks/benchmark.py | yarray/hpdbscan | c01f7a2657e91365fb846bbb492d5b66434160e8 | [
"MIT"
] | 3 | 2021-08-09T14:44:26.000Z | 2022-03-29T02:23:42.000Z | #!/usr/bin/env python
import numpy as np
import subprocess
import sys
import time
DATASET_PARAMETERS = {# eps, min_points
#'bremen_small.h5': (100, 312),
'iris.h5': (0.32, 3),
#'twitter_small.h5': (0.01, 40),
}
TRIALS = 10
def run_benchmark(command, log_path):
sys_stdout, sys_stderr = sy... | 31.547619 | 154 | 0.632453 |
d14279175ca353e6e9a56577e034a22deb30b0fd | 6,160 | py | Python | hydrus/core/HydrusRatingArchive.py | thatfuckingbird/hydrus-websocket-server | b55454740dca5101448bf92224432f8bdbec7e77 | [
"WTFPL"
] | 1,417 | 2015-01-22T00:50:30.000Z | 2022-03-30T18:44:55.000Z | hydrus/core/HydrusRatingArchive.py | thatfuckingbird/hydrus-websocket-server | b55454740dca5101448bf92224432f8bdbec7e77 | [
"WTFPL"
] | 975 | 2015-01-05T01:41:40.000Z | 2022-03-31T06:01:50.000Z | hydrus/core/HydrusRatingArchive.py | thatfuckingbird/hydrus-websocket-server | b55454740dca5101448bf92224432f8bdbec7e77 | [
"WTFPL"
] | 163 | 2015-02-04T13:09:35.000Z | 2022-03-23T01:00:05.000Z | import os
import sqlite3
HASH_TYPE_MD5 = 0 # 16 bytes long
HASH_TYPE_SHA1 = 1 # 20 bytes long
HASH_TYPE_SHA256 = 2 # 32 bytes long
HASH_TYPE_SHA512 = 3 # 64 bytes long
# Please feel free to use this file however you wish.
# None of this is thread-safe, though, so don't try to do anything clever.
# A rating for hydru... | 29.333333 | 136 | 0.548539 |
9fa7f9ee236b04eb8bf55d3b72cf365ab1ed7181 | 3,814 | py | Python | eval.py | Aralas/icassp19 | 5f54e7d6b9818fabf63e87be22786a45c6b2c9fc | [
"MIT"
] | 93 | 2018-12-08T06:11:48.000Z | 2022-03-31T08:02:32.000Z | eval.py | DiegoOrtego/icassp19 | 3d7ed3e58c99d4da1e1690401018ee227886d162 | [
"MIT"
] | 2 | 2019-07-11T14:18:25.000Z | 2019-08-05T04:20:41.000Z | eval.py | DiegoOrtego/icassp19 | 3d7ed3e58c99d4da1e1690401018ee227886d162 | [
"MIT"
] | 27 | 2019-02-27T13:36:31.000Z | 2021-11-30T22:59:52.000Z |
import numpy as np
def get_accuracy(actual=None, predicted=None):
"""Computes accuracy, done with strings"""
if predicted == actual:
return 1.0
else:
return 0.0
class Evaluator (object):
def __init__(self, gt=None, predictions=None, list_labels=None, params_ctrl=None, params_files=... | 41.912088 | 120 | 0.509963 |
8fbd20af865117290482fc8ccb3c07dd1b3dd109 | 410 | py | Python | dlive/errors.py | A-Trash-Coder/dlive.py | 17246194e326566b47f1d4258e9acf658ef6ea08 | [
"MIT"
] | 4 | 2020-09-14T09:27:39.000Z | 2021-07-01T05:33:09.000Z | dlive/errors.py | A-Trash-Coder/dlive.py | 17246194e326566b47f1d4258e9acf658ef6ea08 | [
"MIT"
] | null | null | null | dlive/errors.py | A-Trash-Coder/dlive.py | 17246194e326566b47f1d4258e9acf658ef6ea08 | [
"MIT"
] | null | null | null | class DLivePyException(BaseException):
pass
class ConnectionError(DLivePyException):
pass
class HttpException(DLivePyException):
pass
class Forbidden(DLivePyException):
pass
class CommandError(DLivePyException):
pass
class MissingRequiredArgument(DLivePyException):
pass
class BadArgu... | 13.666667 | 48 | 0.773171 |
c97d8026b58a90a9b2f533e19fa5ce64006a0fa0 | 11,972 | py | Python | aesara/d3viz/formatting.py | sagartomar/aesara | 477f4e5dd757b1ccd3deaf59bf75fc27d7ab9cf6 | [
"BSD-3-Clause"
] | 1 | 2021-12-30T00:44:32.000Z | 2021-12-30T00:44:32.000Z | aesara/d3viz/formatting.py | sagartomar/aesara | 477f4e5dd757b1ccd3deaf59bf75fc27d7ab9cf6 | [
"BSD-3-Clause"
] | null | null | null | aesara/d3viz/formatting.py | sagartomar/aesara | 477f4e5dd757b1ccd3deaf59bf75fc27d7ab9cf6 | [
"BSD-3-Clause"
] | null | null | null | """Functions for formatting Aesara compute graphs.
Author: Christof Angermueller <cangermueller@gmail.com>
"""
import os
from functools import reduce
import numpy as np
import aesara
from aesara.compile import Function, builders
from aesara.graph.basic import Apply, Constant, Variable, graph_inputs
from aesara.graph... | 32.269542 | 87 | 0.520214 |
596fffb4ada77ad3b96a3a02ff70535b32174100 | 12,464 | py | Python | appengine/findit/findit_v2/services/analysis/compile_failure/compile_analysis_api.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | appengine/findit/findit_v2/services/analysis/compile_failure/compile_analysis_api.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | appengine/findit/findit_v2/services/analysis/compile_failure/compile_analysis_api.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2019 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Special logic of pre compile analysis.
Build with compile failures will be pre-processed to determine if a new compile
analysis is needed or not.
"""
impo... | 41.546667 | 80 | 0.730263 |
e26bd903f28ba37dbbf8629ad1b697cb6e9bfc3f | 29,733 | py | Python | xcs/bitstrings.py | crim-ca/xcs | 53304d234f667628a1cc4f1a982f9a1cb9b7d401 | [
"BSD-3-Clause"
] | null | null | null | xcs/bitstrings.py | crim-ca/xcs | 53304d234f667628a1cc4f1a982f9a1cb9b7d401 | [
"BSD-3-Clause"
] | null | null | null | xcs/bitstrings.py | crim-ca/xcs | 53304d234f667628a1cc4f1a982f9a1cb9b7d401 | [
"BSD-3-Clause"
] | 1 | 2019-02-08T07:48:28.000Z | 2019-02-08T07:48:28.000Z | # -*- coding: utf-8 -*-
# -------------------------------------------------------------------------
# xcs
# ---
# Accuracy-based Classifier Systems for Python 3
#
# http://hosford42.github.io/xcs/
#
# (c) Aaron Hosford 2015, all rights reserved
# Revised (3 Clause) BSD License
#
# Implements the XCS (Accuracy-based Cla... | 36.935404 | 127 | 0.637675 |
c228861ecfbbd889147310e811e1bb42f4962098 | 60,385 | py | Python | PyFlow/UI/Canvas/UINodeBase.py | hellobiek/PyFlow | cde924f3bd1613f36f9312e7313e036ae68a0e34 | [
"Apache-2.0"
] | null | null | null | PyFlow/UI/Canvas/UINodeBase.py | hellobiek/PyFlow | cde924f3bd1613f36f9312e7313e036ae68a0e34 | [
"Apache-2.0"
] | null | null | null | PyFlow/UI/Canvas/UINodeBase.py | hellobiek/PyFlow | cde924f3bd1613f36f9312e7313e036ae68a0e34 | [
"Apache-2.0"
] | null | null | null | ## Copyright 2015-2019 Ilgar Lunin, Pedro Cabrera
## 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... | 39.160182 | 166 | 0.617057 |
b47712b4c603bfdd1d92e3a2e807eab94361be86 | 2,136 | py | Python | model-optimizer/extensions/front/mxnet/ssd_pattern_remove_transpose.py | monroid/openvino | 8272b3857ef5be0aaa8abbf7bd0d5d5615dc40b6 | [
"Apache-2.0"
] | 2,406 | 2020-04-22T15:47:54.000Z | 2022-03-31T10:27:37.000Z | model-optimizer/extensions/front/mxnet/ssd_pattern_remove_transpose.py | thomas-yanxin/openvino | 031e998a15ec738c64cc2379d7f30fb73087c272 | [
"Apache-2.0"
] | 4,948 | 2020-04-22T15:12:39.000Z | 2022-03-31T18:45:42.000Z | model-optimizer/extensions/front/mxnet/ssd_pattern_remove_transpose.py | thomas-yanxin/openvino | 031e998a15ec738c64cc2379d7f30fb73087c272 | [
"Apache-2.0"
] | 991 | 2020-04-23T18:21:09.000Z | 2022-03-31T18:40:57.000Z | # Copyright (C) 2018-2021 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
from extensions.front.mxnet.ssd_pattern_flatten_softmax_activation import SsdPatternFlattenSoftmaxActivation
from extensions.front.mxnet.ssd_pattern_remove_flatten import SsdPatternRemoveFlatten
from extensions.front.mxnet.ssd_pattern_re... | 40.301887 | 108 | 0.685393 |
3224544515d65192fba57bbfb73bb3200a0d500e | 23,769 | py | Python | test/functional/test_framework/test_framework.py | krewshul/Auroracoin | e0e3323e992b631606dd7bd8b75edb068dad76a9 | [
"MIT"
] | 1 | 2021-04-05T20:07:32.000Z | 2021-04-05T20:07:32.000Z | test/functional/test_framework/test_framework.py | krewshul/Auroracoin | e0e3323e992b631606dd7bd8b75edb068dad76a9 | [
"MIT"
] | null | null | null | test/functional/test_framework/test_framework.py | krewshul/Auroracoin | e0e3323e992b631606dd7bd8b75edb068dad76a9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2009-2019 The Bitcoin Core developers
# Copyright (c) 2014-2019 The DigiByte Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Base class for RPC testing."""
import configpar... | 41.409408 | 312 | 0.62144 |
18343ff0759e4173734193d8fad780c280807cc1 | 1,894 | py | Python | components/handlers/star_modules.py | nus-mtp/another-cs-study-planner | 02b52871a34f580b779ede08750f2d4e887bcf65 | [
"MIT"
] | 1 | 2017-04-30T17:59:08.000Z | 2017-04-30T17:59:08.000Z | components/handlers/star_modules.py | nus-mtp/another-cs-study-planner | 02b52871a34f580b779ede08750f2d4e887bcf65 | [
"MIT"
] | 87 | 2017-02-13T09:06:13.000Z | 2017-04-14T09:23:08.000Z | components/handlers/star_modules.py | nus-mtp/another-cs-study-planner | 02b52871a34f580b779ede08750f2d4e887bcf65 | [
"MIT"
] | 1 | 2017-04-11T05:26:00.000Z | 2017-04-11T05:26:00.000Z | '''
This module handles starring of modules.
'''
import web
from app import RENDER
from components import model, session
class StarModule(object):
'''
Class handles starring and unstarring of modules.
'''
def GET(self):
'''
This function is called when /starModule is acce... | 33.22807 | 90 | 0.594509 |
14264dde075d2904ecf683831238b50bac31c5b3 | 11,668 | py | Python | gym_cooking/environment/cooking_zoo.py | Adelynrayne/gym-cooking | 0219259b39419712d6616b6733eb98f789c8a5f6 | [
"MIT"
] | null | null | null | gym_cooking/environment/cooking_zoo.py | Adelynrayne/gym-cooking | 0219259b39419712d6616b6733eb98f789c8a5f6 | [
"MIT"
] | null | null | null | gym_cooking/environment/cooking_zoo.py | Adelynrayne/gym-cooking | 0219259b39419712d6616b6733eb98f789c8a5f6 | [
"MIT"
] | null | null | null | # Other core modules
import copy
from gym_cooking.cooking_world.cooking_world import CookingWorld
from gym_cooking.cooking_world.world_objects import *
from gym_cooking.cooking_book.recipe_drawer import RECIPES, NUM_GOALS
import numpy as np
from collections import namedtuple, defaultdict
from pettingzoo import AECEnv... | 43.700375 | 118 | 0.634128 |
5f10a276c43fd747e05834367becdb437c106f81 | 475 | py | Python | arachne/hdl/xilinx/ps8/resources/uart.py | shrine-maiden-heavy-industries/arachne | 1d0320bf6e77653656f8ce1874900743452dbac4 | [
"BSD-3-Clause"
] | 3 | 2021-09-13T20:23:42.000Z | 2022-01-19T13:12:32.000Z | arachne/hdl/xilinx/ps8/resources/uart.py | shrine-maiden-heavy-industries/arachne | 1d0320bf6e77653656f8ce1874900743452dbac4 | [
"BSD-3-Clause"
] | null | null | null | arachne/hdl/xilinx/ps8/resources/uart.py | shrine-maiden-heavy-industries/arachne | 1d0320bf6e77653656f8ce1874900743452dbac4 | [
"BSD-3-Clause"
] | null | null | null | # SPDX-License-Identifier: BSD-3-Clause
from amaranth import *
from amaranth.build import *
from .common import PS8Resource, MIOSet
__all__ = (
'UARTResource',
)
class UARTResource(PS8Resource):
name = 'uart'
claimable_mio = [ ]
def __init__(self, num, mio_set):
super().__init__(num, 1, mio_set, ... | 19.791667 | 46 | 0.703158 |
7bbe1493d10cd833b901d5e3efb852b3eaf807ea | 7,437 | py | Python | h/presenters/document_html.py | bibliotechie/h | 16e275f79ef7d1086971bd30ef403501c6b93beb | [
"BSD-2-Clause"
] | null | null | null | h/presenters/document_html.py | bibliotechie/h | 16e275f79ef7d1086971bd30ef403501c6b93beb | [
"BSD-2-Clause"
] | null | null | null | h/presenters/document_html.py | bibliotechie/h | 16e275f79ef7d1086971bd30ef403501c6b93beb | [
"BSD-2-Clause"
] | null | null | null | from urllib.parse import unquote, urlparse
import jinja2
class DocumentHTMLPresenter:
"""Wraps Document model objects and adds some HTML properties."""
def __init__(self, document):
self.document = document
@property
def filename(self):
"""
Return the filename of this docume... | 32.056034 | 87 | 0.622159 |
58e40d3e26a6257895e3b3e365885a7d9a9d7b24 | 1,183 | py | Python | utils/parsers/calendar_parser.py | Imperat/ADFS_managers | 10bedae2be3c443d141941c710f05a8a60c3cdfd | [
"Apache-2.0"
] | 11 | 2017-07-05T20:03:00.000Z | 2018-09-19T17:18:26.000Z | utils/parsers/calendar_parser.py | Imperat/ADFS_managers | 10bedae2be3c443d141941c710f05a8a60c3cdfd | [
"Apache-2.0"
] | 50 | 2016-07-15T16:21:03.000Z | 2018-04-17T11:18:06.000Z | utils/parsers/calendar_parser.py | Imperat/ADFS_managers | 10bedae2be3c443d141941c710f05a8a60c3cdfd | [
"Apache-2.0"
] | 6 | 2017-06-23T14:53:38.000Z | 2022-01-03T12:38:46.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
def parse_calendar(filename):
calendar = open('./utils/parsers/datas/primary_2014.txt', 'r')
tour,res = 0, []
for line in calendar:
if 'тур' in line:
tour = line.split(' ')[0]
teams = line.split(' - ')
if len(teams) > 1:
... | 28.166667 | 75 | 0.530008 |
cbf1adec42fb6c5c7162726c8b23e48063413a2d | 647 | py | Python | examples/pybullet/gym/pybullet_utils/examples/multipleScenes.py | felipeek/bullet3 | 6a59241074720e9df119f2f86bc01765917feb1e | [
"Zlib"
] | 9,136 | 2015-01-02T00:41:45.000Z | 2022-03-31T15:30:02.000Z | examples/pybullet/gym/pybullet_utils/examples/multipleScenes.py | felipeek/bullet3 | 6a59241074720e9df119f2f86bc01765917feb1e | [
"Zlib"
] | 2,424 | 2015-01-05T08:55:58.000Z | 2022-03-30T19:34:55.000Z | examples/pybullet/gym/pybullet_utils/examples/multipleScenes.py | felipeek/bullet3 | 6a59241074720e9df119f2f86bc01765917feb1e | [
"Zlib"
] | 2,921 | 2015-01-02T10:19:30.000Z | 2022-03-31T02:48:42.000Z | from pybullet_utils import bullet_client as bc
import pybullet
import pybullet_data
p0 = bc.BulletClient(connection_mode=pybullet.DIRECT)
p0.setAdditionalSearchPath(pybullet_data.getDataPath())
p1 = bc.BulletClient(connection_mode=pybullet.DIRECT)
p1.setAdditionalSearchPath(pybullet_data.getDataPath())
#can also con... | 32.35 | 103 | 0.806801 |
6b13b8ed379ebc23a594ed9827ef41cc397cc923 | 137 | py | Python | python/testData/intentions/PyInvertIfConditionIntentionTest/commentsMultilineNoElseIf.py | Tasemo/intellij-community | 50aeaf729b7073e91c7c77487a1f155e0dfe3fcd | [
"Apache-2.0"
] | 2 | 2019-04-28T07:48:50.000Z | 2020-12-11T14:18:08.000Z | python/testData/intentions/PyInvertIfConditionIntentionTest/commentsMultilineNoElseIf.py | Tasemo/intellij-community | 50aeaf729b7073e91c7c77487a1f155e0dfe3fcd | [
"Apache-2.0"
] | null | null | null | python/testData/intentions/PyInvertIfConditionIntentionTest/commentsMultilineNoElseIf.py | Tasemo/intellij-community | 50aeaf729b7073e91c7c77487a1f155e0dfe3fcd | [
"Apache-2.0"
] | null | null | null | def func():
value = "not-none"
# Is none
# If it's none
<caret>if value is None:
print("None")
print(value) | 15.222222 | 28 | 0.518248 |
e9636e2ff528d536df6f49ea831e2345a0d8c8cc | 133 | py | Python | src/frog_of_the_week/__init__.py | rlipperts/frog-of-the-week | 7794da564ad1ee5be57d386012ce1c1e4557a4f8 | [
"MIT"
] | null | null | null | src/frog_of_the_week/__init__.py | rlipperts/frog-of-the-week | 7794da564ad1ee5be57d386012ce1c1e4557a4f8 | [
"MIT"
] | null | null | null | src/frog_of_the_week/__init__.py | rlipperts/frog-of-the-week | 7794da564ad1ee5be57d386012ce1c1e4557a4f8 | [
"MIT"
] | null | null | null | """
Import the module data, that you want to have externally accessible here.
"""
from frog_of_the_week.bot import run # NOQA: F401
| 26.6 | 73 | 0.75188 |
18d5b8c37265880ab635a0b39023e2f836ac99a8 | 491 | py | Python | ger/TTP/SV4/S3/3740.py | aLagoG/kygerand | 0991cf5d5c3d49f4602b6992d4e3bdec8e27898e | [
"MIT"
] | 1 | 2017-09-16T04:05:31.000Z | 2017-09-16T04:05:31.000Z | ger/TTP/SV4/S3/3740.py | aLagoG/kygerand | 0991cf5d5c3d49f4602b6992d4e3bdec8e27898e | [
"MIT"
] | 9 | 2017-01-25T19:34:38.000Z | 2020-07-27T17:02:09.000Z | ger/TTP/SV4/S3/3740.py | aLagoG/kygerand | 0991cf5d5c3d49f4602b6992d4e3bdec8e27898e | [
"MIT"
] | null | null | null | def nxt(i): return 0 if i == n-1 else i+1
def prev(i): return n-1 if i == 0 else i-1
for t in xrange(input()):
flipped = 0
line = [int(i) for i in raw_input().split()]
n = line[0]
line = line[1:]
one = 0
for i in xrange(n):
if line[i] == 1:
if line[prev(i)] == 2:
one = prev(i)
elif line[nxt(i)] =... | 16.931034 | 45 | 0.533605 |
d1ad9f70acfe6b2a128a5b393b4236a9461d0260 | 579 | py | Python | padinfo/view_state/common.py | loopdeer/pad-cogs | a71e737dc3cc805885c5a99b7ee175711e614734 | [
"MIT"
] | null | null | null | padinfo/view_state/common.py | loopdeer/pad-cogs | a71e737dc3cc805885c5a99b7ee175711e614734 | [
"MIT"
] | null | null | null | padinfo/view_state/common.py | loopdeer/pad-cogs | a71e737dc3cc805885c5a99b7ee175711e614734 | [
"MIT"
] | null | null | null | from padinfo.common.config import UserConfig
from padinfo.core.find_monster import findMonsterCustom2
async def get_monster_from_ims(dgcog, user_config: UserConfig, ims: dict):
query = ims.get('query') or ims['raw_query']
resolved_monster_id_str = ims.get('resolved_monster_id')
resolved_monster_id = int(... | 41.357143 | 91 | 0.787565 |
95178d9626e2386c66ce527013c34d4ede9e8172 | 1,302 | py | Python | tests/flatpages_tests/test_models.py | jpmallarino/django | 659d2421c7adbbcd205604002d521d82d6b0b465 | [
"BSD-3-Clause",
"0BSD"
] | 16 | 2019-08-10T12:24:06.000Z | 2020-05-21T09:11:14.000Z | tests/flatpages_tests/test_models.py | jpmallarino/django | 659d2421c7adbbcd205604002d521d82d6b0b465 | [
"BSD-3-Clause",
"0BSD"
] | 12 | 2019-08-10T11:55:29.000Z | 2020-05-21T04:46:30.000Z | tests/flatpages_tests/test_models.py | jpmallarino/django | 659d2421c7adbbcd205604002d521d82d6b0b465 | [
"BSD-3-Clause",
"0BSD"
] | 3 | 2019-08-20T13:29:34.000Z | 2020-01-30T22:05:10.000Z | from django.contrib.flatpages.models import FlatPage
from django.test import SimpleTestCase, override_settings
from django.test.utils import override_script_prefix
class FlatpageModelTests(SimpleTestCase):
def setUp(self):
self.page = FlatPage(title="Café!", url="/café/")
def test_get_absolute_url_ur... | 40.6875 | 83 | 0.739631 |
d2e738c37ae742394b21aa40912fca669c8044a1 | 4,830 | py | Python | parser/AMRGraph.py | mrdrozdov/AMR-gs | 9d76a3449ec91ec6bd2d47c43de61f6960010d94 | [
"MIT"
] | 72 | 2020-04-14T04:03:27.000Z | 2022-03-17T09:00:44.000Z | parser/AMRGraph.py | mrdrozdov/AMR-gs | 9d76a3449ec91ec6bd2d47c43de61f6960010d94 | [
"MIT"
] | 19 | 2020-04-23T03:17:15.000Z | 2022-03-25T16:56:37.000Z | parser/AMRGraph.py | mrdrozdov/AMR-gs | 9d76a3449ec91ec6bd2d47c43de61f6960010d94 | [
"MIT"
] | 21 | 2020-04-22T18:10:07.000Z | 2021-12-06T06:57:18.000Z | # encoding=utf8
import re
import random
number_regexp = re.compile(r'^-?(\d)+(\.\d+)?$')
abstract_regexp0 = re.compile(r'^([A-Z]+_)+\d+$')
abstract_regexp1 = re.compile(r'^\d0*$')
discard_regexp = re.compile(r'^n(\d+)?$')
attr_value_set = set(['-', '+', 'interrogative', 'imperative', 'expressive'])
def _is_attr_form... | 39.590164 | 145 | 0.567909 |
61115dbb2abdf4a54f9fad8c6ad3c39b9e63c05b | 2,956 | py | Python | auth0/v3/management/resource_servers.py | meatbody/auth0-python | 5f9373f520f7eb5cf8572dfc835f075d81681f55 | [
"MIT"
] | null | null | null | auth0/v3/management/resource_servers.py | meatbody/auth0-python | 5f9373f520f7eb5cf8572dfc835f075d81681f55 | [
"MIT"
] | null | null | null | auth0/v3/management/resource_servers.py | meatbody/auth0-python | 5f9373f520f7eb5cf8572dfc835f075d81681f55 | [
"MIT"
] | null | null | null | from .rest import RestClient
class ResourceServers(object):
"""Auth0 resource servers endpoints
Args:
domain (str): Your Auth0 domain, e.g: 'username.auth0.com'
token (str): Management API v2 Token
telemetry (bool, optional): Enable or disable Telemetry
(defaults to Tru... | 30.474227 | 107 | 0.609946 |
5abe9398a21e8a7202a4f5b199fa6702fbc4ca36 | 522 | py | Python | tests/test_builtins/it/test_italy_spec.py | Shanmugapriya03/mimesis | 649253fef05c6b5c362805000c1d7a99898aa0fe | [
"MIT"
] | 3 | 2020-08-20T10:27:13.000Z | 2021-11-02T20:28:16.000Z | tests/test_builtins/it/test_italy_spec.py | Shanmugapriya03/mimesis | 649253fef05c6b5c362805000c1d7a99898aa0fe | [
"MIT"
] | 1 | 2020-06-05T10:34:20.000Z | 2020-08-08T08:45:18.000Z | tests/test_builtins/it/test_italy_spec.py | Shanmugapriya03/mimesis | 649253fef05c6b5c362805000c1d7a99898aa0fe | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import re
import pytest
from mimesis.builtins import ItalySpecProvider
from mimesis.enums import Gender
@pytest.fixture
def italy():
return ItalySpecProvider()
def test_noun(italy):
result = italy.fiscal_code(gender=Gender.MALE)
assert re.fullmatch(
r'^[A-Z]{6}\d{2}[A-... | 21.75 | 74 | 0.649425 |
fc589fdc5acd94f94f668ce5f6c78ed8ccee3076 | 3,085 | py | Python | config/settings.py | faisalnazik/Django-React-Project-Rest-Framework | 55b1d333c969804350235513fca811d00f3e52a6 | [
"MIT"
] | 2 | 2021-03-01T10:04:30.000Z | 2021-07-17T16:20:44.000Z | config/settings.py | faisalnazik/Django-React-Project-Rest-Framework | 55b1d333c969804350235513fca811d00f3e52a6 | [
"MIT"
] | null | null | null | config/settings.py | faisalnazik/Django-React-Project-Rest-Framework | 55b1d333c969804350235513fca811d00f3e52a6 | [
"MIT"
] | null | null | null | """
Django settings for config project.
Generated by 'django-admin startproject' using Django 3.1.7.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.1/ref/settings/
"""
from pathlib ... | 25.286885 | 91 | 0.694652 |
126bdb971a80a05fd5451a61045a8857a65c5469 | 1,197 | py | Python | aliyun-python-sdk-cms/aliyunsdkcms/request/v20190101/DisableHostAvailabilityRequest.py | sdk-team/aliyun-openapi-python-sdk | 384730d707e6720d1676ccb8f552e6a7b330ec86 | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-cms/aliyunsdkcms/request/v20190101/DisableHostAvailabilityRequest.py | sdk-team/aliyun-openapi-python-sdk | 384730d707e6720d1676ccb8f552e6a7b330ec86 | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-cms/aliyunsdkcms/request/v20190101/DisableHostAvailabilityRequest.py | sdk-team/aliyun-openapi-python-sdk | 384730d707e6720d1676ccb8f552e6a7b330ec86 | [
"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 u... | 37.40625 | 82 | 0.744361 |
7897adada1ac9fe4bb674fcaa68ef76279dfdf72 | 3,429 | py | Python | Utils/pgConnector.py | lionick/rciam-metrics-script | 3b9019f8455cee92d7a0b1c7927d98e6f684830d | [
"Apache-2.0"
] | null | null | null | Utils/pgConnector.py | lionick/rciam-metrics-script | 3b9019f8455cee92d7a0b1c7927d98e6f684830d | [
"Apache-2.0"
] | null | null | null | Utils/pgConnector.py | lionick/rciam-metrics-script | 3b9019f8455cee92d7a0b1c7927d98e6f684830d | [
"Apache-2.0"
] | 1 | 2021-09-28T06:27:22.000Z | 2021-09-28T06:27:22.000Z | from configparser import ConfigParser
import sys
import psycopg2
# import the error handling libraries for psycopg2
from psycopg2 import OperationalError, errorcodes, errors
from Logger import log
def singleton(theClass):
""" decorator for a class to make a singleton out of it """
classInstances = {}
def ... | 29.059322 | 90 | 0.666958 |
70e04b578af7faa27f44eaaa29abbe4b78d7d889 | 1,742 | py | Python | setup.py | WarrenWeckesser/numpngw | f6b5f25bdab939ed75cac62c78f7d3a22bc3348b | [
"BSD-2-Clause"
] | 50 | 2015-10-28T12:46:20.000Z | 2022-03-09T23:37:38.000Z | setup.py | WarrenWeckesser/numpngw | f6b5f25bdab939ed75cac62c78f7d3a22bc3348b | [
"BSD-2-Clause"
] | 7 | 2015-12-29T23:09:29.000Z | 2019-12-26T18:41:09.000Z | setup.py | WarrenWeckesser/pngw | 264fb53b12b2f7d5b60688d005fbbf81052a0c4c | [
"BSD-2-Clause"
] | 7 | 2015-10-28T13:33:05.000Z | 2020-11-12T12:37:30.000Z | from setuptools import setup
from os import path
def get_numpngw_version():
"""
Find the value assigned to __version__ in numpngw.py.
This function assumes that there is a line of the form
__version__ = "version-string"
in numpngw.py. It returns the string version-string, or None if such a... | 31.107143 | 75 | 0.608496 |
6f472c656cd6d6cfa7c6f19afb8f5bd10735b719 | 141,011 | py | Python | tests/unit/modules/test_virt.py | srg91/salt | 9e5df06af0f2ff4810bb88db82fe59dc4f3e1a96 | [
"Apache-2.0"
] | null | null | null | tests/unit/modules/test_virt.py | srg91/salt | 9e5df06af0f2ff4810bb88db82fe59dc4f3e1a96 | [
"Apache-2.0"
] | null | null | null | tests/unit/modules/test_virt.py | srg91/salt | 9e5df06af0f2ff4810bb88db82fe59dc4f3e1a96 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
virt execution module unit tests
'''
# pylint: disable=3rd-party-module-not-gated
# Import python libs
from __future__ import absolute_import, print_function, unicode_literals
import os
import re
import datetime
import shutil
# Import Salt Testing libs
from tests.support.mixins import Loa... | 39.833616 | 120 | 0.486863 |
5a9dbbff520ae9071f4068c9f234663fd86a8619 | 2,264 | py | Python | aliyun-python-sdk-domain/aliyunsdkdomain/request/v20180129/SaveTaskForSubmittingDomainRealNameVerificationByRegistrantProfileIDRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 1,001 | 2015-07-24T01:32:41.000Z | 2022-03-25T01:28:18.000Z | aliyun-python-sdk-domain/aliyunsdkdomain/request/v20180129/SaveTaskForSubmittingDomainRealNameVerificationByRegistrantProfileIDRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 363 | 2015-10-20T03:15:00.000Z | 2022-03-08T12:26:19.000Z | aliyun-python-sdk-domain/aliyunsdkdomain/request/v20180129/SaveTaskForSubmittingDomainRealNameVerificationByRegistrantProfileIDRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 682 | 2015-09-22T07:19:02.000Z | 2022-03-22T09:51:46.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 36.516129 | 124 | 0.779594 |
7bfd4cc30e2b646f8613dd574634210f40fac44f | 5,248 | py | Python | keras_extra/generator.py | klauscc/keras-extra | a0536e1ec08c5a44f973da11ab7ce45d38193e8d | [
"Apache-2.0"
] | null | null | null | keras_extra/generator.py | klauscc/keras-extra | a0536e1ec08c5a44f973da11ab7ce45d38193e8d | [
"Apache-2.0"
] | null | null | null | keras_extra/generator.py | klauscc/keras-extra | a0536e1ec08c5a44f973da11ab7ce45d38193e8d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#================================================================
# God Bless You.
#
# file name: generator.py
# author: klaus
# email: klaus.cheng@qq.com
# created date: 2018/01/04
# description:
#
#==============================================================... | 29.318436 | 135 | 0.556784 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.