hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
304b8b9594f4e1bb2aaa5b3d57cf13f6031133c3 | 480 | py | Python | mdl_scrapper/models/Search.py | dragneelfps/mdl_scrapper | cf9f8892d36e82713ee24b9727a728cf7a63faac | [
"MIT"
] | 1 | 2020-04-30T13:27:43.000Z | 2020-04-30T13:27:43.000Z | mdl_scrapper/models/Search.py | dragneelfps/mdl_scrapper | cf9f8892d36e82713ee24b9727a728cf7a63faac | [
"MIT"
] | null | null | null | mdl_scrapper/models/Search.py | dragneelfps/mdl_scrapper | cf9f8892d36e82713ee24b9727a728cf7a63faac | [
"MIT"
] | null | null | null | from dataclasses import dataclass
from datetime import datetime
from typing import List, Optional
@dataclass
class SearchDrama:
id: int
title: str
cover_url: str
ranking: Optional[int]
score: Optional[float]
description: str
@dataclass
class SearchResult:
url: str
dramas: List[Search... | 17.777778 | 40 | 0.68125 |
77156a00d78d9568e8209ccfa2e1293a4d6611e8 | 5,281 | py | Python | scripts/add_comp_self.py | shaunstoltz/kunlun | 3974857ff88418db0ccc30284f67438d590546d1 | [
"PostgreSQL",
"Apache-2.0"
] | null | null | null | scripts/add_comp_self.py | shaunstoltz/kunlun | 3974857ff88418db0ccc30284f67438d590546d1 | [
"PostgreSQL",
"Apache-2.0"
] | null | null | null | scripts/add_comp_self.py | shaunstoltz/kunlun | 3974857ff88418db0ccc30284f67438d590546d1 | [
"PostgreSQL",
"Apache-2.0"
] | null | null | null | # Copyright (c) 2019 ZettaDB inc. All rights reserved.
# This source code is licensed under Apache 2.0 License,
# combined with Common Clause Condition 1.0, as detailed in the NOTICE file.
# add one or more computing nodes
import os
import os.path
import mysql.connector
import argparse
import json
import common
impor... | 40.623077 | 164 | 0.666162 |
9cdce11ca44b41ac1ae1ca8acca27c66d63d769b | 1,393 | py | Python | snacks/test/test_nutriment.py | NicolasFlandrois/Pure-Beurre | b64db344e3eabed8b123a6127fe0d038da53ff6e | [
"MIT"
] | null | null | null | snacks/test/test_nutriment.py | NicolasFlandrois/Pure-Beurre | b64db344e3eabed8b123a6127fe0d038da53ff6e | [
"MIT"
] | 7 | 2020-02-12T03:27:56.000Z | 2022-03-12T00:12:09.000Z | snacks/test/test_nutriment.py | NicolasFlandrois/PurBeurre-LinuxDeploy | de0a6677647fd6df5f4856dc6ac42275dae6aff4 | [
"MIT"
] | 2 | 2020-01-17T11:23:27.000Z | 2021-02-15T10:54:19.000Z | #!/usr/bin/python3.7
# UTF8
# Date:
# Author: Nicolas Flandrois
import json
import urllib.request
from io import BytesIO
from snacks.nutriment import nutriments
# Mock Testing Json API Open Food Facts
def test_nutriments(monkeypatch):
results = {"product":
{"nutriments": {
"su... | 28.428571 | 68 | 0.470208 |
d5228f3d01182dd44e6d2a8a4e01af9a2e060943 | 11,918 | py | Python | posthog/api/dashboard.py | alx-a/posthog | a76959bb2a7640ca8cf367a4d3a0e4ca67f65a5e | [
"MIT"
] | null | null | null | posthog/api/dashboard.py | alx-a/posthog | a76959bb2a7640ca8cf367a4d3a0e4ca67f65a5e | [
"MIT"
] | null | null | null | posthog/api/dashboard.py | alx-a/posthog | a76959bb2a7640ca8cf367a4d3a0e4ca67f65a5e | [
"MIT"
] | null | null | null | import secrets
from typing import Any, Dict, Optional
import posthoganalytics
from django.db.models import Model, Prefetch, QuerySet
from django.db.models.query_utils import Q
from django.http import HttpRequest
from django.shortcuts import get_object_or_404
from django.utils.timezone import now
from django.views.deco... | 40.675768 | 119 | 0.663031 |
d707507a091303ce0392fb98cf16d6d15cc75e07 | 13,428 | py | Python | wavepal/timefreq_analysis_prelims.py | metegenez/WAVEPAL | fa2bb91e2c7e63681ae4592929215c96bc523597 | [
"MIT"
] | 22 | 2017-03-09T20:46:31.000Z | 2022-02-16T08:18:30.000Z | wavepal/timefreq_analysis_prelims.py | metegenez/WAVEPAL | fa2bb91e2c7e63681ae4592929215c96bc523597 | [
"MIT"
] | 6 | 2017-03-19T20:22:33.000Z | 2021-01-05T11:41:31.000Z | wavepal/timefreq_analysis_prelims.py | metegenez/WAVEPAL | fa2bb91e2c7e63681ae4592929215c96bc523597 | [
"MIT"
] | 9 | 2017-11-06T18:00:31.000Z | 2021-07-21T19:20:09.000Z | import numpy as np
from tqdm import trange
from dt_central import dt_central
import copy
def timefreq_analysis_prelims(time,tau,scale,w0,gauss_spread,eps,dt_GCD,shannonnyquistexclusionzone,weighted_CWT,smoothing_coeff,smoothing_type):
""" timefreq_analysis_prelims returns some variables for the time-frequency analys... | 47.957143 | 443 | 0.725573 |
fd8f527b50d298fdffebd4917eb84703639dddbb | 3,206 | py | Python | nikola/plugins/task/tagcloud.py | vault-the/nikola | c7a556b587004df442fdc9127c07997715556265 | [
"MIT"
] | 1 | 2021-01-03T01:54:37.000Z | 2021-01-03T01:54:37.000Z | nikola/plugins/task/tagcloud.py | vault-the/nikola | c7a556b587004df442fdc9127c07997715556265 | [
"MIT"
] | 13 | 2021-01-21T04:54:51.000Z | 2022-03-21T04:15:56.000Z | nikola/plugins/task/tagcloud.py | vault-the/nikola | c7a556b587004df442fdc9127c07997715556265 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright © 2012-2018 Roberto Alsina and others.
# 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 t... | 40.582278 | 112 | 0.620711 |
c762fdb9bc53742643ba4cd3dc217fe009af4d8c | 4,390 | py | Python | seapy/couplings/couplingsurfaceplateacoustical.py | FRidh/seapy | de63acdb3722c2558fc1ad1e1eca92abdd027932 | [
"BSD-3-Clause"
] | 8 | 2015-07-02T13:34:06.000Z | 2021-05-17T21:34:07.000Z | seapy/couplings/couplingsurfaceplateacoustical.py | FRidh/seapy | de63acdb3722c2558fc1ad1e1eca92abdd027932 | [
"BSD-3-Clause"
] | 2 | 2015-11-09T17:16:07.000Z | 2020-02-19T14:00:20.000Z | seapy/couplings/couplingsurfaceplateacoustical.py | FRidh/seapy | de63acdb3722c2558fc1ad1e1eca92abdd027932 | [
"BSD-3-Clause"
] | 2 | 2021-02-03T08:56:10.000Z | 2022-01-22T02:21:43.000Z | import numpy as np
from .coupling import Coupling
def radiation_efficiency(coupling, component):
"""
Radiation efficiency of a plate to a cavity and vice versa.
Where:
* area of plate :math:`S = L_x L_y`
* circumference of plate :math:`U = 2 (L_x + L_y)`
* :math:`\\alpha = \\sq... | 27.78481 | 161 | 0.569248 |
8a087ddd3b369759e6f991f6d256278369f48fa7 | 1,970 | py | Python | features/steps/picture.py | just4jc/python-pptx | ec433085d84d48b5539c379e52eb3c279ab2cbc0 | [
"MIT"
] | 1 | 2019-01-24T11:50:05.000Z | 2019-01-24T11:50:05.000Z | features/steps/picture.py | just4jc/python-pptx | ec433085d84d48b5539c379e52eb3c279ab2cbc0 | [
"MIT"
] | 4 | 2021-03-18T20:28:17.000Z | 2022-03-11T23:18:51.000Z | features/steps/picture.py | just4jc/python-pptx | ec433085d84d48b5539c379e52eb3c279ab2cbc0 | [
"MIT"
] | 2 | 2016-02-11T20:12:33.000Z | 2016-02-11T20:50:03.000Z | # encoding: utf-8
"""
Gherkin step implementations for picture-related features.
"""
from __future__ import absolute_import
from behave import given, when, then
from pptx import Presentation
from pptx.compat import BytesIO
from pptx.package import Package
from pptx.util import Inches
from helpers import saved_pptx... | 31.774194 | 78 | 0.683756 |
f6298b954d59ba2b3b924307468efe27e4705e59 | 1,661 | py | Python | comparison/compare_sORF.py | Sung-Huan/ANNOgesic | af3de26f6c5ff9d2218f18a84bbc863a1bb95550 | [
"0BSD"
] | 26 | 2016-02-25T19:27:55.000Z | 2022-01-22T09:54:59.000Z | comparison/compare_sORF.py | Sung-Huan/ANNOgesic | af3de26f6c5ff9d2218f18a84bbc863a1bb95550 | [
"0BSD"
] | 28 | 2018-11-22T19:51:06.000Z | 2022-03-20T23:02:13.000Z | comparison/compare_sORF.py | Sung-Huan/ANNOgesic | af3de26f6c5ff9d2218f18a84bbc863a1bb95550 | [
"0BSD"
] | 18 | 2016-06-01T11:53:45.000Z | 2021-12-27T03:41:03.000Z | #!/usr/bin/python
import os
import sys
import csv
import argparse
from gff3 import Gff3Parser
__author__ = "Sung-Huan Yu <sung-huan.yu@uni-wuerzburg.de>"
__email__ = "sung-huan.yu@uni-wuerzburg.de"
parser = argparse.ArgumentParser()
parser.add_argument("-k","--benchmark_file",help="the benchmarking set of sORF")
par... | 33.22 | 88 | 0.551475 |
60c1a18a03c2400c7a2fb81e76cd31900e92a194 | 4,412 | py | Python | mh4.py | hanjae1122/Boggle | 0921ac2ab916652fa176037c96c981625211e038 | [
"MIT"
] | null | null | null | mh4.py | hanjae1122/Boggle | 0921ac2ab916652fa176037c96c981625211e038 | [
"MIT"
] | null | null | null | mh4.py | hanjae1122/Boggle | 0921ac2ab916652fa176037c96c981625211e038 | [
"MIT"
] | null | null | null | import sys
import re
import random
import numpy as np
import time
DIM = 4
DICE = 'rifobx ifehey denows utoknd hmsrao lupets acitoa ylgkue qbmjoa \
ehispn vetign baliyt ezavnd ralesc uwilrg pacemd'.split()
ALL_WORDS = []
DATAPATH = 'data/words_alpha.txt'
# DATAPATH = 'data/new_dictionary.txt'
try:
TRIALS = int(sy... | 28.101911 | 73 | 0.513826 |
664dc6d0aff4ffd0c6626424ce015c7f14dbc7b2 | 21,642 | py | Python | test/functional/test_framework/util.py | badrkarni/saudicoin | 18c221ef1eb576d52bec53dcd449d2c6766684a2 | [
"MIT"
] | 17 | 2018-01-17T01:39:21.000Z | 2021-12-23T10:23:38.000Z | test/functional/test_framework/util.py | badrkarni/saudicoin | 18c221ef1eb576d52bec53dcd449d2c6766684a2 | [
"MIT"
] | 4 | 2015-09-22T03:51:39.000Z | 2017-12-28T21:03:49.000Z | test/functional/test_framework/util.py | badrkarni/saudicoin | 18c221ef1eb576d52bec53dcd449d2c6766684a2 | [
"MIT"
] | 5 | 2016-06-25T10:13:37.000Z | 2021-02-19T15:37:06.000Z | #!/usr/bin/env python3
# Copyright (c) 2014-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.
"""Helpful routines for regression testing."""
from base64 import b64encode
from binascii import hexlify,... | 38.035149 | 119 | 0.650818 |
6b285890452b336c5e167cef2dd4926d1425af55 | 1,450 | py | Python | vsutillib/vsutillib-media/setup.py | akai10tsuki/vsutillib | 6d623171cc2a5c66a94fb508bfc312abeab49ff2 | [
"MIT"
] | null | null | null | vsutillib/vsutillib-media/setup.py | akai10tsuki/vsutillib | 6d623171cc2a5c66a94fb508bfc312abeab49ff2 | [
"MIT"
] | null | null | null | vsutillib/vsutillib-media/setup.py | akai10tsuki/vsutillib | 6d623171cc2a5c66a94fb508bfc312abeab49ff2 | [
"MIT"
] | null | null | null | """
setup for vsutillib-media
"""
import io
import os
import shutil
import sys
from pathlib import Path
from setuptools import setup
from vsutillib import config
sys.path.insert(0, os.path.abspath("../.."))
ROOT = os.path.abspath(os.path.dirname(__file__))
PACKAGE = "media"
def removeTmpDirs():
"""
delet... | 23.770492 | 84 | 0.653793 |
02c7e260c64622b87b0cfc88669da2e31bce7fe1 | 5,066 | py | Python | tests/toranj/test-009-insecure-traffic-join.py | JeffreyHayes/openthread | 0dde90edcb0aafef5f4b5fc3d30e19f756e27ee4 | [
"BSD-3-Clause"
] | 2 | 2018-08-24T05:14:27.000Z | 2018-09-25T03:02:36.000Z | tests/toranj/test-009-insecure-traffic-join.py | JeffreyHayes/openthread | 0dde90edcb0aafef5f4b5fc3d30e19f756e27ee4 | [
"BSD-3-Clause"
] | 4 | 2016-09-09T17:10:04.000Z | 2016-09-29T05:18:09.000Z | tests/toranj/test-009-insecure-traffic-join.py | turon/openthread | 20145cb42fca90d791c4918475db28b7b91290d6 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
#
# Copyright (c) 2018, The OpenThread Authors.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright
# ... | 38.090226 | 121 | 0.656139 |
2590a825306e38455546da346a2aa06f48352c75 | 585 | py | Python | 13. group_by/group_by.py | jeury301/python-morsels | fdbe0b1c80120e2d1388808816538fea5dab8892 | [
"MIT"
] | 2 | 2018-08-21T10:29:57.000Z | 2019-04-17T07:05:17.000Z | 13. group_by/group_by.py | jeury301/python-morsels | fdbe0b1c80120e2d1388808816538fea5dab8892 | [
"MIT"
] | null | null | null | 13. group_by/group_by.py | jeury301/python-morsels | fdbe0b1c80120e2d1388808816538fea5dab8892 | [
"MIT"
] | null | null | null | def default(n):
return n
def group_by(numbers, key_func=default):
"""Return a dict-like object containing items in the list grouped by key.
Args:
numbers (iterator): items to group by key
key_func (function): function to group items by
Returns:
Dictionary of numbers grouped by... | 25.434783 | 77 | 0.639316 |
e0d90dea5d8b95c3b844f22be12409961876d024 | 293 | py | Python | recaptcha-python-2/mysite/core/models.py | sibtc/simple-recaptcha | 224ef3994a398b04f9405bcdaeef339af31c7305 | [
"MIT"
] | 16 | 2017-02-21T13:57:26.000Z | 2021-03-17T15:25:16.000Z | recaptcha-python-3/mysite/core/models.py | Cleyson/simple-recaptcha | 224ef3994a398b04f9405bcdaeef339af31c7305 | [
"MIT"
] | null | null | null | recaptcha-python-3/mysite/core/models.py | Cleyson/simple-recaptcha | 224ef3994a398b04f9405bcdaeef339af31c7305 | [
"MIT"
] | 8 | 2018-03-21T04:11:52.000Z | 2021-08-23T17:04:16.000Z | from __future__ import unicode_literals
from django.db import models
class Comment(models.Model):
text = models.TextField(max_length=1000)
created_at = models.DateTimeField(auto_now_add=True)
class Meta:
verbose_name = 'comment'
verbose_name_plural = 'comments' | 24.416667 | 56 | 0.737201 |
3febdbed2cceee5ffe77784387590de0447f0839 | 1,475 | py | Python | src/probnum/diffeq/perturbed/step/_perturbedstepsolution.py | treid5/probnum | fabb51243d0952fbd35e542aeb5c2dc9a449ec81 | [
"MIT"
] | 1 | 2021-04-16T14:45:26.000Z | 2021-04-16T14:45:26.000Z | src/probnum/diffeq/perturbed/step/_perturbedstepsolution.py | simeoncarstens/probnum | b69587b07e2fffbdcd4c850acc98bb3de97a6e0b | [
"MIT"
] | 42 | 2021-03-08T07:20:40.000Z | 2022-03-28T05:04:48.000Z | src/probnum/diffeq/perturbed/step/_perturbedstepsolution.py | JonathanWenger/probnum | 1c5499883672cfa029c12045848ea04491c69e08 | [
"MIT"
] | null | null | null | """Output of PerturbedStepSolver."""
from typing import List, Optional
import numpy as np
from scipy.integrate._ivp import rk
from probnum import randvars
from probnum.diffeq import _odesolution
from probnum.typing import FloatArgType
class PerturbedStepSolution(_odesolution.ODESolution):
"""Probabilistic ODE ... | 31.382979 | 87 | 0.648814 |
94c70ca440553f23d2b57a652e2a3bae54cb0a39 | 3,105 | py | Python | sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_namespace.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 8 | 2021-01-13T23:44:08.000Z | 2021-03-17T10:13:36.000Z | sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_namespace.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 226 | 2019-07-24T07:57:21.000Z | 2019-10-15T01:07:24.000Z | sdk/servicebus/azure-mgmt-servicebus/azure/mgmt/servicebus/models/sb_namespace.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 2 | 2020-05-21T22:51:22.000Z | 2020-05-26T20:53:01.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 ... | 37.865854 | 88 | 0.603865 |
712331465a4a56407fea5b488c35beb2415ee02f | 24,197 | py | Python | horizon/horizon/base.py | citrix-openstack/horizon | 7987e68f135895728f891c2377b589f701d8106e | [
"Apache-2.0"
] | 2 | 2015-05-18T13:50:21.000Z | 2015-05-18T14:47:47.000Z | horizon/horizon/base.py | andrewsmedina/horizon | 6892653c0573a6a55f359cce6c1796053ef65cbf | [
"Apache-2.0"
] | null | null | null | horizon/horizon/base.py | andrewsmedina/horizon | 6892653c0573a6a55f359cce6c1796053ef65cbf | [
"Apache-2.0"
] | null | null | null | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 Nebula, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... | 36.773556 | 79 | 0.616481 |
9d9a5b6d966a834ecdf85bf14d043892172391e8 | 4,745 | py | Python | test_end_to_end_diff_text.py | jayantabh/Real-Time-Voice-Cloning | 503f866c01a42feedad20ce7afa1a9f32abf8c31 | [
"MIT"
] | null | null | null | test_end_to_end_diff_text.py | jayantabh/Real-Time-Voice-Cloning | 503f866c01a42feedad20ce7afa1a9f32abf8c31 | [
"MIT"
] | null | null | null | test_end_to_end_diff_text.py | jayantabh/Real-Time-Voice-Cloning | 503f866c01a42feedad20ce7afa1a9f32abf8c31 | [
"MIT"
] | null | null | null | from synthesizer.inference import Synthesizer
from encoder import inference as encoder
from vocoder import inference as vocoder
from pathlib import Path
import numpy as np
import librosa
from tqdm import tqdm
import os
import pickle
import torch
from Trained_Models.model import Network
from sklearn.metrics import accur... | 37.362205 | 220 | 0.577871 |
847e08af317a561fa921458c0937f885e375b73b | 10,059 | py | Python | mecc/apps/utils/documents_generator/models/preview_mecc.py | unistra/eva | 9f7bd8c44edbca05eb45b36cb5b8e658e53bc3c0 | [
"Apache-2.0"
] | null | null | null | mecc/apps/utils/documents_generator/models/preview_mecc.py | unistra/eva | 9f7bd8c44edbca05eb45b36cb5b8e658e53bc3c0 | [
"Apache-2.0"
] | 3 | 2021-03-19T10:36:10.000Z | 2021-09-08T01:37:47.000Z | mecc/apps/utils/documents_generator/models/preview_mecc.py | unistra/eva | 9f7bd8c44edbca05eb45b36cb5b8e658e53bc3c0 | [
"Apache-2.0"
] | null | null | null | import re
from django.db.models import Q
from reportlab.lib import colors
from reportlab.lib.enums import TA_CENTER, TA_JUSTIFY
from reportlab.lib.styles import ParagraphStyle
from reportlab.lib.units import cm
from reportlab.platypus import Paragraph, Table, CondPageBreak
from mecc.apps.rules.models import Rule
from... | 40.236 | 102 | 0.435729 |
a781d77b7ecfd3c85b1653b281d14c4c1b29125c | 2,455 | py | Python | influxdb_client/domain/xy_geom.py | Rajpratik71/influxdb-client-python | ae537018b638600552b3ac11f1b070c048719910 | [
"MIT"
] | null | null | null | influxdb_client/domain/xy_geom.py | Rajpratik71/influxdb-client-python | ae537018b638600552b3ac11f1b070c048719910 | [
"MIT"
] | null | null | null | influxdb_client/domain/xy_geom.py | Rajpratik71/influxdb-client-python | ae537018b638600552b3ac11f1b070c048719910 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Influx API Service.
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: 0.1.0
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
class XYGeom(object):
... | 26.117021 | 120 | 0.550713 |
3244b045194193b124f57ca4278cb005038d6b3b | 5,331 | py | Python | cisco-ios-xr/ydk/models/cisco_ios_xr/Cisco_IOS_XR_ppp_ma_ssrp_cfg.py | Maikor/ydk-py | b86c4a7c570ae3b2c5557d098420446df5de4929 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | cisco-ios-xr/ydk/models/cisco_ios_xr/Cisco_IOS_XR_ppp_ma_ssrp_cfg.py | Maikor/ydk-py | b86c4a7c570ae3b2c5557d098420446df5de4929 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | cisco-ios-xr/ydk/models/cisco_ios_xr/Cisco_IOS_XR_ppp_ma_ssrp_cfg.py | Maikor/ydk-py | b86c4a7c570ae3b2c5557d098420446df5de4929 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | """ Cisco_IOS_XR_ppp_ma_ssrp_cfg
This module contains a collection of YANG definitions
for Cisco IOS\-XR ppp\-ma\-ssrp package configuration.
This module contains definitions
for the following management objects\:
ssrp\: Shared plane SSRP configuration data
This YANG module augments the
Cisco\-IOS\-XR\-config\-... | 32.705521 | 177 | 0.561433 |
9e6b461323d942e40f831c38a8163856c696185a | 252 | py | Python | src/apps/search/views.py | snicoper/snicoper.com | 22c17b5ead6096227a3415770c0cbd2923f2f14a | [
"MIT"
] | 2 | 2017-04-22T11:35:21.000Z | 2017-09-01T19:49:59.000Z | src/apps/search/views.py | snicoper/snicoper.com | 22c17b5ead6096227a3415770c0cbd2923f2f14a | [
"MIT"
] | null | null | null | src/apps/search/views.py | snicoper/snicoper.com | 22c17b5ead6096227a3415770c0cbd2923f2f14a | [
"MIT"
] | null | null | null | from haystack.generic_views import SearchView
from haystack.query import SearchQuerySet
class ArticleSearchView(SearchView):
template_name = 'search/search_article.html'
queryset = SearchQuerySet().order_by('-create_at')
paginate_by = 10
| 28 | 54 | 0.789683 |
8d9f11f2d6136cc94ddbd690ac99c4fb28ba63a8 | 4,407 | py | Python | sts_wrldom/utils.py | BigBossAnwer/STS-Pipeline | 952d2c577dd4b8a66c99b80a24589a98e20c2e60 | [
"MIT"
] | null | null | null | sts_wrldom/utils.py | BigBossAnwer/STS-Pipeline | 952d2c577dd4b8a66c99b80a24589a98e20c2e60 | [
"MIT"
] | null | null | null | sts_wrldom/utils.py | BigBossAnwer/STS-Pipeline | 952d2c577dd4b8a66c99b80a24589a98e20c2e60 | [
"MIT"
] | null | null | null | import sys
from pathlib import Path
import numpy as np
import pandas as pd
def log_frame(df, name, tag):
"""Logs a dataframe as a .csv to $cwd/log
Args:
df: dataframe to log
name (str): the name of the logged .csv
tag (str): the tag of the logged .csv
"""
try:
Pat... | 30.818182 | 89 | 0.561833 |
645ab4c0295f939b3b914e8132c093916b82f6d4 | 13,506 | py | Python | python/ccxt/async_support/base/exchange.py | chiragmatkar/ccxt | d04a286a802fa1a59048a51eb91913bedd0dfdc6 | [
"MIT"
] | null | null | null | python/ccxt/async_support/base/exchange.py | chiragmatkar/ccxt | d04a286a802fa1a59048a51eb91913bedd0dfdc6 | [
"MIT"
] | null | null | null | python/ccxt/async_support/base/exchange.py | chiragmatkar/ccxt | d04a286a802fa1a59048a51eb91913bedd0dfdc6 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
__version__ = '1.34.5'
# -----------------------------------------------------------------------------
import asyncio
import concurrent
import socket
import certifi
import aiohttp
import ssl
import sys
import yar... | 42.471698 | 355 | 0.619725 |
ebaf6935a513a784b5d5b2c2f1a680b651f64d21 | 15,142 | py | Python | goose/extractors/images.py | chyt/gisty-goose | b1ac57a8d859d3f34fec6d8e5062f9601cdf0fda | [
"Apache-2.0",
"MIT"
] | 1 | 2021-12-13T18:14:02.000Z | 2021-12-13T18:14:02.000Z | goose/extractors/images.py | chyt/gisty-goose | b1ac57a8d859d3f34fec6d8e5062f9601cdf0fda | [
"Apache-2.0",
"MIT"
] | null | null | null | goose/extractors/images.py | chyt/gisty-goose | b1ac57a8d859d3f34fec6d8e5062f9601cdf0fda | [
"Apache-2.0",
"MIT"
] | 1 | 2021-12-13T18:14:17.000Z | 2021-12-13T18:14:17.000Z | # -*- coding: utf-8 -*-
"""\
This is a python port of "Goose" orignialy licensed to Gravity.com
under one or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.
Python port was written by Xavier Grangier for Recrutae
Gravity.co... | 36.138425 | 96 | 0.592128 |
13a5047e089e6ae401f20aaae852d450fb4928d3 | 135,485 | py | Python | salt/state.py | diego-treitos/salt | d2aec156ff2ef48ac21b4db211efb43220c6465c | [
"Apache-2.0"
] | 1 | 2020-10-19T11:49:49.000Z | 2020-10-19T11:49:49.000Z | salt/state.py | diego-treitos/salt | d2aec156ff2ef48ac21b4db211efb43220c6465c | [
"Apache-2.0"
] | null | null | null | salt/state.py | diego-treitos/salt | d2aec156ff2ef48ac21b4db211efb43220c6465c | [
"Apache-2.0"
] | 1 | 2020-10-19T11:49:50.000Z | 2020-10-19T11:49:50.000Z | # -*- coding: utf-8 -*-
'''
The module used to execute states in salt. A state is unlike a module
execution in that instead of just executing a command it ensure that a
certain state is present on the system.
The data sent to the state calls is as follows:
{ 'state': '<state module name>',
'fun': '<state fun... | 42.352298 | 132 | 0.429516 |
c9cdaea928d556d5bb4a188c3f7a08ca162b5e63 | 882 | py | Python | data.py | hossainsadman/lstm-stock-predictor | 6d91acac3054d5b870142cae8db0ae4f8e3810d3 | [
"MIT"
] | null | null | null | data.py | hossainsadman/lstm-stock-predictor | 6d91acac3054d5b870142cae8db0ae4f8e3810d3 | [
"MIT"
] | null | null | null | data.py | hossainsadman/lstm-stock-predictor | 6d91acac3054d5b870142cae8db0ae4f8e3810d3 | [
"MIT"
] | null | null | null | import os
from dotenv import load_dotenv
import urllib.request
import json
import pandas as pd
import datetime
load_dotenv()
ALPHA_API_KEY = os.getenv('ALPHA_API_KEY')
TICKER = 'QCOM'
url = "https://www.alphavantage.co/query?function=TIME_SERIES_DAILY&symbol=%s&outputsize=full&apikey=%s" %(TICKER, ALPHA_API_KEY)
data... | 31.5 | 129 | 0.663265 |
6a9f3d628d7b9f1d9b737302c3dbe2ccc6bb3760 | 476 | py | Python | tests/models/test_projects.py | onaio/tasking | 5faff50a2f3575f0df91a6b20afe37d43a592381 | [
"Apache-2.0"
] | 6 | 2018-05-07T14:40:26.000Z | 2020-02-26T11:41:58.000Z | tests/models/test_projects.py | onaio/tasking | 5faff50a2f3575f0df91a6b20afe37d43a592381 | [
"Apache-2.0"
] | 95 | 2018-05-08T08:34:23.000Z | 2020-01-24T08:36:13.000Z | tests/models/test_projects.py | onaio/tasking | 5faff50a2f3575f0df91a6b20afe37d43a592381 | [
"Apache-2.0"
] | 2 | 2018-06-15T02:17:53.000Z | 2018-09-28T06:04:37.000Z | """
Test for Project model
"""
from django.test import TestCase
from model_mommy import mommy
class TestProject(TestCase):
"""
Test class for TaskProject models
"""
def test_project_model_str(self):
"""
Test __str__ method of Project model
"""
livestock_task_list = m... | 21.636364 | 83 | 0.665966 |
1145f97734923b9ab12e913cb72982c2e5a536fb | 1,612 | py | Python | API/src/main/resources/Lib/robot/reporting/stringcache.py | TagExpress/SikuliX1 | de9da11794dd94b3821eddc5c01b534d3f2fe828 | [
"MIT"
] | null | null | null | API/src/main/resources/Lib/robot/reporting/stringcache.py | TagExpress/SikuliX1 | de9da11794dd94b3821eddc5c01b534d3f2fe828 | [
"MIT"
] | null | null | null | API/src/main/resources/Lib/robot/reporting/stringcache.py | TagExpress/SikuliX1 | de9da11794dd94b3821eddc5c01b534d3f2fe828 | [
"MIT"
] | null | null | null | # Copyright (c) 2010-2020, sikuli.org, sikulix.com - MIT license
#
# 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 b... | 29.851852 | 75 | 0.673697 |
5ac3be6178eb2fed901a3dc5818e30b8e4364dd7 | 676 | py | Python | sigtrac/devices/models.py | nyaruka/sigtrac | edee5851047f6159d61c541e41848ff2b4bb58b1 | [
"MIT"
] | null | null | null | sigtrac/devices/models.py | nyaruka/sigtrac | edee5851047f6159d61c541e41848ff2b4bb58b1 | [
"MIT"
] | null | null | null | sigtrac/devices/models.py | nyaruka/sigtrac | edee5851047f6159d61c541e41848ff2b4bb58b1 | [
"MIT"
] | null | null | null | from django.db import models
from smartmin.models import SmartModel
DEVICE_CHOICES = (('WEB', "Web Browser"),
('AND', "Android Phone"),
('IOS', "iPhone"))
class Device(models.Model):
device_type = models.CharField(max_length=16, choices=DEVICE_CHOICES,
... | 35.578947 | 79 | 0.58432 |
26a19ed7a6df66264afab1f5f526bb740c36e6f6 | 2,285 | py | Python | GoogleCodeJam/SpeakingInTongues_2012_Qualification/Decoder.py | otkaverappa/AdventureOfCode | a2c3f08f5deadca70a998b43b341eb31def7fa8f | [
"Apache-2.0"
] | null | null | null | GoogleCodeJam/SpeakingInTongues_2012_Qualification/Decoder.py | otkaverappa/AdventureOfCode | a2c3f08f5deadca70a998b43b341eb31def7fa8f | [
"Apache-2.0"
] | null | null | null | GoogleCodeJam/SpeakingInTongues_2012_Qualification/Decoder.py | otkaverappa/AdventureOfCode | a2c3f08f5deadca70a998b43b341eb31def7fa8f | [
"Apache-2.0"
] | null | null | null | import unittest
import string
class Decoder:
def __init__( self, ioSampleList ):
self.decoderMap = dict()
for sourceList, targetList in ioSampleList:
assert len( sourceList ) == len( targetList )
for i in range( len( sourceList ) ):
S, T = sourceList[ i ], targetList[ i ]
if S.isspace():
asser... | 35.703125 | 121 | 0.674836 |
53d620b41031ca6c845551d0f00c2902702d669a | 23,376 | py | Python | sklearn/tests/test_calibration.py | emarkou/scikit-learn | d73822f84f2832dcc25f0ff58769f60871a78025 | [
"BSD-3-Clause"
] | 3 | 2019-11-18T13:47:42.000Z | 2021-08-22T23:37:47.000Z | sklearn/tests/test_calibration.py | emarkou/scikit-learn | d73822f84f2832dcc25f0ff58769f60871a78025 | [
"BSD-3-Clause"
] | 12 | 2021-03-06T23:42:46.000Z | 2021-04-04T00:10:42.000Z | sklearn/tests/test_calibration.py | emarkou/scikit-learn | d73822f84f2832dcc25f0ff58769f60871a78025 | [
"BSD-3-Clause"
] | 2 | 2017-06-27T12:40:35.000Z | 2021-08-22T23:37:35.000Z | # Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>
# License: BSD 3 clause
import pytest
import numpy as np
from numpy.testing import assert_allclose
from scipy import sparse
from sklearn.base import BaseEstimator
from sklearn.dummy import DummyClassifier
from sklearn.model_selection import Leave... | 38.321311 | 79 | 0.678046 |
798947b492027e7e927b2f35dad5f62b5a8b5411 | 3,586 | py | Python | google/cloud/secretmanager/v1/secretmanager-v1-py/noxfile.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 7 | 2021-02-21T10:39:41.000Z | 2021-12-07T07:31:28.000Z | google/cloud/secretmanager/v1/secretmanager-v1-py/noxfile.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 6 | 2021-02-02T23:46:11.000Z | 2021-11-15T01:46:02.000Z | google/cloud/secretmanager/v1/secretmanager-v1-py/noxfile.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 4 | 2021-01-28T23:25:45.000Z | 2021-08-30T01:55:16.000Z | # -*- 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... | 26.962406 | 96 | 0.62744 |
17bd310ab2fb9541b92d2e10dc784049f6c950b4 | 4,735 | py | Python | jax_dft/jax_dft/losses_test.py | deepneuralmachine/google-research | d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231 | [
"Apache-2.0"
] | 23,901 | 2018-10-04T19:48:53.000Z | 2022-03-31T21:27:42.000Z | jax_dft/jax_dft/losses_test.py | deepneuralmachine/google-research | d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231 | [
"Apache-2.0"
] | 891 | 2018-11-10T06:16:13.000Z | 2022-03-31T10:42:34.000Z | jax_dft/jax_dft/losses_test.py | deepneuralmachine/google-research | d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231 | [
"Apache-2.0"
] | 6,047 | 2018-10-12T06:31:02.000Z | 2022-03-31T13:59:28.000Z | # coding=utf-8
# Copyright 2021 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 34.064748 | 78 | 0.485744 |
47f63d016686121879c41568357ea79c17f4566a | 5,509 | py | Python | example/example/settings.py | stenius/django-hunger | 712684dd6ff8b776db6c3245ec0a134e9cd7a66b | [
"BSD-3-Clause"
] | 37 | 2015-01-05T16:07:20.000Z | 2021-08-09T18:01:12.000Z | example/example/settings.py | stenius/django-hunger | 712684dd6ff8b776db6c3245ec0a134e9cd7a66b | [
"BSD-3-Clause"
] | 16 | 2015-01-02T14:58:29.000Z | 2021-06-10T17:30:49.000Z | example/example/settings.py | stenius/django-hunger | 712684dd6ff8b776db6c3245ec0a134e9cd7a66b | [
"BSD-3-Clause"
] | 12 | 2015-01-02T15:04:16.000Z | 2020-06-07T13:02:36.000Z | # Django settings for example project.
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'exampl... | 32.791667 | 108 | 0.691051 |
6a616fa066cd931ee6fa8fd30af51848c2e98180 | 4,191 | py | Python | alien/collection.py | palexandremello/GPyM | 10daa25e4d68d527c799f6bf99225b4992e43319 | [
"MIT"
] | 1 | 2021-03-08T15:47:52.000Z | 2021-03-08T15:47:52.000Z | build/lib/GPyM/alien/collection.py | palexandremello/GPyM | 10daa25e4d68d527c799f6bf99225b4992e43319 | [
"MIT"
] | 1 | 2019-01-08T17:56:27.000Z | 2019-01-08T17:56:27.000Z | build/lib/GPyM/alien/collection.py | palexandremello/GPyM | 10daa25e4d68d527c799f6bf99225b4992e43319 | [
"MIT"
] | null | null | null | #! /usr/bin/python
import os,sys
from io import StringIO
from numpy import load, save, array
from numpy.lib.format import open_memmap
#def cached(mode='normal',cacheName=None,cacheDir='./cached',compress='lz4'):
def cached(name=None, cdir='./cached', compress=False, mode='cached', verbose=T... | 29.723404 | 107 | 0.524457 |
0289bad5728f65310e0e375e28fdc85258bae863 | 1,309 | py | Python | SayuBot/helper/mongo_connect.py | TaprisSugarbell/SayUbot | 8c8beea35af3229d24cdbdd7b03063e9c52a4346 | [
"MIT"
] | null | null | null | SayuBot/helper/mongo_connect.py | TaprisSugarbell/SayUbot | 8c8beea35af3229d24cdbdd7b03063e9c52a4346 | [
"MIT"
] | null | null | null | SayuBot/helper/mongo_connect.py | TaprisSugarbell/SayUbot | 8c8beea35af3229d24cdbdd7b03063e9c52a4346 | [
"MIT"
] | null | null | null | import os
from dotenv import load_dotenv
from .mongo_db import *
# Variables
load_dotenv()
URI = os.getenv("URI")
async def confirm(user_db, data=None):
if data is None:
data = {}
return user_db.find(data)
async def add_(user_db, data=None):
if data is None:
data = {}
return user_db... | 19.833333 | 57 | 0.644003 |
d95609461e5c7bec13a9db646f0fec586a4e130f | 1,646 | py | Python | src/data_utils/utils.py | NoOneUST/COMP5212 | 171b564f08841e426545f58e3b52870c0e090586 | [
"MIT"
] | 3 | 2020-04-05T06:50:46.000Z | 2020-04-05T08:20:33.000Z | src/data_utils/utils.py | NoOneUST/COMP5212Project | 171b564f08841e426545f58e3b52870c0e090586 | [
"MIT"
] | 2 | 2021-05-21T16:24:54.000Z | 2022-02-10T01:21:54.000Z | src/data_utils/utils.py | NoOneUST/COMP5212Project | 171b564f08841e426545f58e3b52870c0e090586 | [
"MIT"
] | 1 | 2020-06-15T16:22:20.000Z | 2020-06-15T16:22:20.000Z | # This file is for all utility functions
import os
import pickle
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
def save(toBeSaved, filename, mode='wb'):
dirname = os.path.dirname(filename)
if not os.path.exists(dirname):
os.makedirs(dirname)
file = open(fil... | 26.983607 | 117 | 0.648846 |
ad1c2678690b6d50f0643b1acbca097ffe30ae5d | 1,581 | py | Python | estimated_demo/plot_spec.py | IPCV/VocaLiST | 57d8df6252e1badeb00874591aa2cb9111557468 | [
"MIT"
] | null | null | null | estimated_demo/plot_spec.py | IPCV/VocaLiST | 57d8df6252e1badeb00874591aa2cb9111557468 | [
"MIT"
] | null | null | null | estimated_demo/plot_spec.py | IPCV/VocaLiST | 57d8df6252e1badeb00874591aa2cb9111557468 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import matplotlib.image as mpimg
import numpy as np
import librosa
import librosa.display
import os
import pydub
from pathlib import Path
NFFT = 1022
HOP_LENGTH = 256
TARGET_SAMPLING_RATE = 16384
wav_files = Path('.').rglob('*.wav')
for file in wav_files:
file_path = file.as_posix(... | 36.767442 | 110 | 0.635674 |
cad4dc2f6dadc96da099c0329e57d4c624316ba0 | 10,255 | py | Python | src/twisted/plugins/cowrie_plugin.py | GreyNoise-Intelligence/cowrie | d2a9b30f5fd23428baf32e2de1d24e944cf8cde7 | [
"BSD-3-Clause"
] | null | null | null | src/twisted/plugins/cowrie_plugin.py | GreyNoise-Intelligence/cowrie | d2a9b30f5fd23428baf32e2de1d24e944cf8cde7 | [
"BSD-3-Clause"
] | null | null | null | src/twisted/plugins/cowrie_plugin.py | GreyNoise-Intelligence/cowrie | d2a9b30f5fd23428baf32e2de1d24e944cf8cde7 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2015 Michel Oosterhof <michel@oosterhof.net>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, th... | 37.981481 | 110 | 0.637933 |
9ece9ebf1ab707d374708beae2a7622c7536124a | 571 | py | Python | example.py | lijielife/carp | 376e1a03da6594a567ddf15dde76008a4b126647 | [
"MIT"
] | 1 | 2021-03-02T15:48:57.000Z | 2021-03-02T15:48:57.000Z | example.py | lijielife/carp | 376e1a03da6594a567ddf15dde76008a4b126647 | [
"MIT"
] | null | null | null | example.py | lijielife/carp | 376e1a03da6594a567ddf15dde76008a4b126647 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from carp import context
from carp import util
from carp import render
## sync 数据
context.sync_history_bar()
## 获取stocks list
symbols = context.get_stock_list()
print(symbols)
basic = context.get_basic()
print(context.get_date_bars('000002', '2015-11-11', '2018-05-... | 19.033333 | 88 | 0.711033 |
4352a944808cc79870e942f94f656d843fa960bc | 806 | py | Python | plotly/validators/scatter/_unselected.py | gnestor/plotly.py | a8ae062795ddbf9867b8578fe6d9e244948c15ff | [
"MIT"
] | 12 | 2020-04-18T18:10:22.000Z | 2021-12-06T10:11:15.000Z | plotly/validators/scatter/_unselected.py | Vesauza/plotly.py | e53e626d59495d440341751f60aeff73ff365c28 | [
"MIT"
] | 27 | 2020-04-28T21:23:12.000Z | 2021-06-25T15:36:38.000Z | plotly/validators/scatter/_unselected.py | Vesauza/plotly.py | e53e626d59495d440341751f60aeff73ff365c28 | [
"MIT"
] | 6 | 2020-04-18T23:07:08.000Z | 2021-11-18T07:53:06.000Z | import _plotly_utils.basevalidators
class UnselectedValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(
self, plotly_name='unselected', parent_name='scatter', **kwargs
):
super(UnselectedValidator, self).__init__(
plotly_name=plotly_name,
parent_na... | 32.24 | 74 | 0.609181 |
7b7b18a8ae64666710395926c57ec74abb88bd2f | 386 | py | Python | src/DocClustering/heuristics/pubmed.py | jd-s/DocClustering | a7d4acff8464f960558cf9cc6d03de78d07d56bf | [
"Apache-2.0"
] | null | null | null | src/DocClustering/heuristics/pubmed.py | jd-s/DocClustering | a7d4acff8464f960558cf9cc6d03de78d07d56bf | [
"Apache-2.0"
] | null | null | null | src/DocClustering/heuristics/pubmed.py | jd-s/DocClustering | a7d4acff8464f960558cf9cc6d03de78d07d56bf | [
"Apache-2.0"
] | null | null | null | from bs4 import BeautifulSoup
import requests
def get_year(id):
r = requests.get('https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?db=pubmed&id='+str(id))
html = r.text
# Setup the BeautifulSoup Parser
soup = BeautifulSoup(html, 'html.parser')
year = soup.findAll(attrs={"name" : "PubDate"})
value = "0... | 27.571429 | 102 | 0.712435 |
3f27c92ef40a5bd0e612a1feeebd853238c49340 | 745 | py | Python | notifier/grabbers/crwle.py | thejeshpr/notifier | c9c8df0bea1e772a7f5f72cd8d67ac67bd3803ca | [
"MIT"
] | null | null | null | notifier/grabbers/crwle.py | thejeshpr/notifier | c9c8df0bea1e772a7f5f72cd8d67ac67bd3803ca | [
"MIT"
] | null | null | null | notifier/grabbers/crwle.py | thejeshpr/notifier | c9c8df0bea1e772a7f5f72cd8d67ac67bd3803ca | [
"MIT"
] | null | null | null | import urllib.parse
from notifier.grabbers.base import Base, Internet
class Crwle(object):
@staticmethod
def sync(obj: Base, *args, **kwargs):
soup = Internet.get_soup_phjs(obj.sync_type.base_url)
links = soup.find_all('a', {'class':'o-eZTujG o-fyWCgU'})
for a in link... | 29.8 | 80 | 0.448322 |
aefff09fae62f37955948fc01028a260336e4d33 | 8,069 | py | Python | python/ray/tests/test_cancel.py | 77loopin/ray | 9322f6aab53f4ca5baf5a3573e1ffde12feae519 | [
"Apache-2.0"
] | 39 | 2021-02-02T23:09:31.000Z | 2022-03-28T16:39:12.000Z | python/ray/tests/test_cancel.py | 77loopin/ray | 9322f6aab53f4ca5baf5a3573e1ffde12feae519 | [
"Apache-2.0"
] | 84 | 2021-03-06T08:02:56.000Z | 2022-03-05T08:07:19.000Z | python/ray/tests/test_cancel.py | 77loopin/ray | 9322f6aab53f4ca5baf5a3573e1ffde12feae519 | [
"Apache-2.0"
] | 20 | 2021-02-05T05:51:39.000Z | 2022-03-04T21:13:24.000Z | import random
import sys
import time
import pytest
import ray
from ray.exceptions import TaskCancelledError, RayTaskError, \
GetTimeoutError, WorkerCrashedError, \
ObjectLostError
from ray.test_utils import SignalActor
def valid_exceptions(use_force):
if use... | 26.283388 | 77 | 0.629446 |
5b349a0a5c079357a78fed800a07cc4451658207 | 55,135 | py | Python | src/azure-cli/azure/cli/command_modules/storage/_help.py | dyna-dot/azure-cli | 47d67e6e47a574a82b53c181084b29479aa92d51 | [
"MIT"
] | 1 | 2019-10-01T10:29:15.000Z | 2019-10-01T10:29:15.000Z | src/azure-cli/azure/cli/command_modules/storage/_help.py | dyna-dot/azure-cli | 47d67e6e47a574a82b53c181084b29479aa92d51 | [
"MIT"
] | null | null | null | src/azure-cli/azure/cli/command_modules/storage/_help.py | dyna-dot/azure-cli | 47d67e6e47a574a82b53c181084b29479aa92d51 | [
"MIT"
] | 1 | 2019-11-25T19:33:05.000Z | 2019-11-25T19:33:05.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.
# -----------------------------------------------------... | 46.883503 | 417 | 0.730716 |
edf4c2fd0ecfec983c06c0451053401dec89d98f | 7,002 | py | Python | asteroid/data/whamr_dataset.py | groadabike/asteroid | 276d98346ab791d904fbfe79b9b8e374392dd128 | [
"MIT"
] | 1 | 2020-12-18T02:42:23.000Z | 2020-12-18T02:42:23.000Z | asteroid/data/whamr_dataset.py | groadabike/asteroid | 276d98346ab791d904fbfe79b9b8e374392dd128 | [
"MIT"
] | null | null | null | asteroid/data/whamr_dataset.py | groadabike/asteroid | 276d98346ab791d904fbfe79b9b8e374392dd128 | [
"MIT"
] | null | null | null | import torch
from torch.utils import data
import json
import os
import numpy as np
import soundfile as sf
from .wsj0_mix import wsj0_license
from .wham_dataset import wham_noise_license
DATASET = "WHAMR"
# WHAMR tasks
# Many tasks can be considered with this dataset, we only consider the 4 core
# separation tasks pre... | 35.543147 | 92 | 0.583262 |
f639caba89cbeed027f38e18461415ec704e813a | 216 | py | Python | htmlBuilds/htmlSupport.py | skylarkgit/sql2phpclass | a79e7f3cfda8cb41ba00e8cbba0de33e9be759d6 | [
"MIT"
] | null | null | null | htmlBuilds/htmlSupport.py | skylarkgit/sql2phpclass | a79e7f3cfda8cb41ba00e8cbba0de33e9be759d6 | [
"MIT"
] | null | null | null | htmlBuilds/htmlSupport.py | skylarkgit/sql2phpclass | a79e7f3cfda8cb41ba00e8cbba0de33e9be759d6 | [
"MIT"
] | null | null | null | import sys
sys.path.append("..")
from htmlBuilds.htmlTemplates import *
from htmlBuilds.mytemplate import *
from lib.fileOps import *
def wrapForm(code):
return TAG('div',code,ATTR('class','archonFormWrapper'))
| 24 | 60 | 0.75 |
49165010a7b6f79eb946882978a1277348ab638a | 909 | py | Python | setup.py | llamm-de/miraculix | 61fb1e533ea83a746c86f6c91720886e856a84cc | [
"MIT"
] | null | null | null | setup.py | llamm-de/miraculix | 61fb1e533ea83a746c86f6c91720886e856a84cc | [
"MIT"
] | null | null | null | setup.py | llamm-de/miraculix | 61fb1e533ea83a746c86f6c91720886e856a84cc | [
"MIT"
] | null | null | null | import setuptools
with open("README.md", "r") as file:
long_description = file.read()
setuptools.setup(
name='Miraculix',
version='0.0.1',
author='Lukas Lamm',
author_email='lukas.lamm@ifam.rwth-aachen.de',
url='https://www.ifam.rwth-aachen.de',
packages=setuptools.find_packages(),
scr... | 29.322581 | 83 | 0.641364 |
4646be50a9300508c569d1195e588979715dc78e | 445 | py | Python | tests/test_storage_redis.py | alvistack/ionrock-cachecontrol | 09992a140edca2602cf8230370fc8b28566a069b | [
"Apache-2.0"
] | null | null | null | tests/test_storage_redis.py | alvistack/ionrock-cachecontrol | 09992a140edca2602cf8230370fc8b28566a069b | [
"Apache-2.0"
] | null | null | null | tests/test_storage_redis.py | alvistack/ionrock-cachecontrol | 09992a140edca2602cf8230370fc8b28566a069b | [
"Apache-2.0"
] | null | null | null | # SPDX-FileCopyrightText: 2015 Eric Larson
#
# SPDX-License-Identifier: Apache-2.0
from datetime import datetime
from mock import Mock
from cachecontrol.caches import RedisCache
class TestRedisCache(object):
def setup(self):
self.conn = Mock()
self.cache = RedisCache(self.conn)
def test_se... | 22.25 | 66 | 0.701124 |
a443057dd78efef1b4abad99a0c0a45af42596e1 | 11,801 | py | Python | src/genome.py | snowyukischnee/simple-neat-implementation | 335bbd1e47af792e5b3fd773d44b141db244d5e3 | [
"MIT"
] | null | null | null | src/genome.py | snowyukischnee/simple-neat-implementation | 335bbd1e47af792e5b3fd773d44b141db244d5e3 | [
"MIT"
] | null | null | null | src/genome.py | snowyukischnee/simple-neat-implementation | 335bbd1e47af792e5b3fd773d44b141db244d5e3 | [
"MIT"
] | null | null | null | from typing import Any, Dict, Tuple
from genes import DefaultNodeGene, DefaultConnectionGene, NeuralNodeGene, NeuralConnectionGene, BaseGene
import activation_functions
import aggregation_functions
import random
class DefaultGenome(object):
def __init__(self, key: Any):
self.key: Any = key
self.no... | 41.847518 | 148 | 0.630116 |
87a18129f2bf51406f39ab0b632921c0f51782e1 | 627 | py | Python | app/constants.py | nashahzad/jira-scraper | a42705e3e2055d21728e5fadfc8fd93e378c4c89 | [
"Apache-2.0"
] | 12 | 2021-07-07T17:19:29.000Z | 2021-09-26T17:29:05.000Z | app/constants.py | nashahzad/jira-sprint-analytics | a42705e3e2055d21728e5fadfc8fd93e378c4c89 | [
"Apache-2.0"
] | null | null | null | app/constants.py | nashahzad/jira-sprint-analytics | a42705e3e2055d21728e5fadfc8fd93e378c4c89 | [
"Apache-2.0"
] | null | null | null | from enum import Enum
class SprintStates(Enum):
ACTIVE = "ACTIVE"
CLOSED = "CLOSED"
FUTURE = "FUTURE"
class IssueTypeEnum(Enum):
STORY = "Story"
TASK = "Task"
BUG = "Bug"
REPORT_COLUMNS = [
"Sprint",
"Commitment",
"Completed",
"4-Sprint Average",
"Scope Change",
"Pl... | 17.914286 | 53 | 0.629984 |
13c082c48fb4689c0dff47a8a54be20e79da1fd9 | 1,809 | py | Python | strawberryfields/circuitspecs/fock.py | egbQuantum/strawberryfields | 674e4fe2de5e5dd791a77f1cd219009120dcbbbf | [
"Apache-2.0"
] | null | null | null | strawberryfields/circuitspecs/fock.py | egbQuantum/strawberryfields | 674e4fe2de5e5dd791a77f1cd219009120dcbbbf | [
"Apache-2.0"
] | 5 | 2020-09-26T01:27:24.000Z | 2022-02-10T02:13:49.000Z | strawberryfields/circuitspecs/fock.py | egbQuantum/strawberryfields | 674e4fe2de5e5dd791a77f1cd219009120dcbbbf | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Xanadu Quantum Technologies Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agre... | 25.125 | 74 | 0.572692 |
7b7538852c508cf21af68c1077f003cbc7b28433 | 2,974 | py | Python | app.py | mehulmakwana97/react-crud | 95d23d05ba0e80fc6724c851a8b9a9eafdd26891 | [
"Apache-2.0"
] | null | null | null | app.py | mehulmakwana97/react-crud | 95d23d05ba0e80fc6724c851a8b9a9eafdd26891 | [
"Apache-2.0"
] | null | null | null | app.py | mehulmakwana97/react-crud | 95d23d05ba0e80fc6724c851a8b9a9eafdd26891 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env /usr/local/bin/python2
from flask import Flask, render_template, jsonify, make_response, request, current_app
from datetime import timedelta
from functools import update_wrapper
app = Flask(__name__, static_folder='build', static_url_path='')
@app.route('/')
def root():
return app.send_static_file('... | 22.530303 | 86 | 0.528917 |
1c1791f47d749fa394e08d5d6b0755274f9c57c1 | 1,989 | py | Python | test/test_storage_volume_utilization_ref.py | sdnit-se/intersight-python | 551f7685c0f76bb8af60ec83ffb6f9672d49a4ae | [
"Apache-2.0"
] | 21 | 2018-03-29T14:20:35.000Z | 2021-10-13T05:11:41.000Z | test/test_storage_volume_utilization_ref.py | sdnit-se/intersight-python | 551f7685c0f76bb8af60ec83ffb6f9672d49a4ae | [
"Apache-2.0"
] | 14 | 2018-01-30T15:45:46.000Z | 2022-02-23T14:23:21.000Z | test/test_storage_volume_utilization_ref.py | sdnit-se/intersight-python | 551f7685c0f76bb8af60ec83ffb6f9672d49a4ae | [
"Apache-2.0"
] | 18 | 2018-01-03T15:09:56.000Z | 2021-07-16T02:21:54.000Z | # coding: utf-8
"""
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 environmen... | 52.342105 | 1,052 | 0.788336 |
cc105445751504aeb7dc13364485212f86e1d24b | 319 | py | Python | src/kuas_api/kuas/__init__.py | JohnSounder/AP-API | 9e1fa4d7de1d844b453cd6b86faefba8bf051c3c | [
"MIT"
] | 1 | 2015-07-19T04:18:37.000Z | 2015-07-19T04:18:37.000Z | src/kuas_api/kuas/__init__.py | JohnSounder/AP-API | 9e1fa4d7de1d844b453cd6b86faefba8bf051c3c | [
"MIT"
] | 18 | 2015-09-05T11:14:17.000Z | 2015-10-18T08:09:33.000Z | src/kuas_api/kuas/__init__.py | JohnSounder/AP-API | 9e1fa4d7de1d844b453cd6b86faefba8bf051c3c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""This module provide three kuas online system api.
AP system, bus system, and leave system.
Module AP
=========
.. automodule:: kuas_api.kuas.ap
:members:
Module Bus
==========
.. automodule:: kuas_api.kuas.bus
:members:
"""
__license__ = "MIT"
__docformat__ = "reStructuredText"
| 15.95 | 52 | 0.642633 |
183d1a37e1b08cfab545f0373942ac143972d479 | 34,860 | py | Python | test/unit/test_parser.py | sethwoodworth/dbt | 68babfb4bbd016e198bb09ac8dfd5dc71760ef7e | [
"Apache-2.0"
] | 1 | 2020-10-25T00:13:50.000Z | 2020-10-25T00:13:50.000Z | test/unit/test_parser.py | azhard/dbt | 9cd7cbc9e35e5a7c8c4f17a3d113263f4421ab55 | [
"Apache-2.0"
] | null | null | null | test/unit/test_parser.py | azhard/dbt | 9cd7cbc9e35e5a7c8c4f17a3d113263f4421ab55 | [
"Apache-2.0"
] | null | null | null | import unittest
from unittest import mock
import os
import yaml
import dbt.flags
import dbt.parser
from dbt.exceptions import CompilationException
from dbt.parser import (
ModelParser, MacroParser, DataTestParser, SchemaParser, ParseResult,
SnapshotParser, AnalysisParser
)
from dbt.parser.schemas import (
... | 40.487805 | 150 | 0.611044 |
6355544d3660c7c7411af12bc1ea0b5d84b39cbb | 2,700 | py | Python | demo_train.py | shubham0704/MeshCNN | 0085e06ab6b06402344130af4e25f0038918bb73 | [
"MIT"
] | null | null | null | demo_train.py | shubham0704/MeshCNN | 0085e06ab6b06402344130af4e25f0038918bb73 | [
"MIT"
] | null | null | null | demo_train.py | shubham0704/MeshCNN | 0085e06ab6b06402344130af4e25f0038918bb73 | [
"MIT"
] | null | null | null | import time
from options.demo_train_options import TrainOptions
from data import DataLoader
from models import create_model
from util.writer import Writer
from test import run_test
import pdb
from torch.profiler import profile, record_function, ProfilerActivity
if __name__ == '__main__':
opt = TrainOptions().pars... | 36.486486 | 107 | 0.612593 |
8306ee39baa9c41d5b790a15dc36c675b8aa992c | 1,461 | py | Python | linkpath.py | riceissa/ea-forum-reader | c340db63705ee2eb1dc64281fd6d2701451372b5 | [
"CC0-1.0"
] | 8 | 2018-11-10T19:52:55.000Z | 2022-01-19T20:43:15.000Z | linkpath.py | riceissa/ea-forum-reader | c340db63705ee2eb1dc64281fd6d2701451372b5 | [
"CC0-1.0"
] | 40 | 2018-11-23T22:19:05.000Z | 2021-08-03T17:02:33.000Z | linkpath.py | riceissa/ea-forum-reader | c340db63705ee2eb1dc64281fd6d2701451372b5 | [
"CC0-1.0"
] | 3 | 2018-11-24T06:04:28.000Z | 2020-05-23T09:28:40.000Z | #!/usr/bin/env python3
import config
PATH_STYLE = config.PATH_STYLE
def posts(postid, postslug="", display_format="html"):
if postid is None:
postid = ""
if PATH_STYLE == "localhost":
if display_format == "html":
return "./posts.php?id=" + postid
else:
return ... | 32.466667 | 115 | 0.569473 |
95a2660524516838445794f92b484267e4d12378 | 2,570 | py | Python | evodcinv/_io/_helpers.py | keurfonluu/evodcinv | d7059ebdbdea00a1819dfdcdd5820387c72d0125 | [
"BSD-3-Clause"
] | 9 | 2021-12-11T09:48:33.000Z | 2022-03-20T10:32:25.000Z | evodcinv/_io/_helpers.py | keurfonluu/evodcinv | d7059ebdbdea00a1819dfdcdd5820387c72d0125 | [
"BSD-3-Clause"
] | 2 | 2021-12-13T00:14:24.000Z | 2021-12-16T09:11:11.000Z | evodcinv/_io/_helpers.py | keurfonluu/evodcinv | d7059ebdbdea00a1819dfdcdd5820387c72d0125 | [
"BSD-3-Clause"
] | 2 | 2021-12-21T07:36:39.000Z | 2022-02-25T13:12:52.000Z | import os
_extension_to_filetype = {}
_reader_map = {}
_writer_map = {}
def register(file_format, extensions, reader, writer=None):
"""
Register a new input format.
Parameters
----------
file_format : str
File format to register.
extensions : array_like
List of extensions to ... | 24.951456 | 110 | 0.636576 |
31e7c706ec9c73c20a63dbaa86e441ee1db8cc8a | 4,170 | py | Python | tests/components/vera/common.py | SmarthomeNinja/core | f4b8a95205ea7d4126fc5e704da532cd8eed937e | [
"Apache-2.0"
] | 6 | 2020-07-18T16:33:25.000Z | 2021-09-26T09:52:04.000Z | tests/components/vera/common.py | SmarthomeNinja/core | f4b8a95205ea7d4126fc5e704da532cd8eed937e | [
"Apache-2.0"
] | 47 | 2020-07-23T07:14:33.000Z | 2022-03-31T06:01:46.000Z | tests/components/vera/common.py | SmarthomeNinja/core | f4b8a95205ea7d4126fc5e704da532cd8eed937e | [
"Apache-2.0"
] | 5 | 2020-03-29T00:29:13.000Z | 2021-09-06T20:58:40.000Z | """Common code for tests."""
from typing import Callable, Dict, NamedTuple, Tuple
import pyvera as pv
from homeassistant.components.vera.const import CONF_CONTROLLER, DOMAIN
from homeassistant.core import HomeAssistant
from homeassistant.setup import async_setup_component
from tests.async_mock import MagicMock
from... | 31.590909 | 83 | 0.682974 |
5af29fabd129e5cb6d8074754e3d59018c81251b | 1,719 | py | Python | nncf/tensorflow/pruning/callbacks.py | vshampor/nncf | 4916668308f6a151794b1953fa759d0154ba16ef | [
"Apache-2.0"
] | null | null | null | nncf/tensorflow/pruning/callbacks.py | vshampor/nncf | 4916668308f6a151794b1953fa759d0154ba16ef | [
"Apache-2.0"
] | null | null | null | nncf/tensorflow/pruning/callbacks.py | vshampor/nncf | 4916668308f6a151794b1953fa759d0154ba16ef | [
"Apache-2.0"
] | null | null | null | """
Copyright (c) 2021 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writin... | 42.975 | 100 | 0.749273 |
5e71d3b0054d9368519bff71d526a585a50693b9 | 68 | py | Python | sheetwork/__init__.py | bastienboutonnet/sheetwork | 7aa757ed12375ddd2c56502b721d91146d22b7ea | [
"MIT"
] | 9 | 2020-12-10T12:12:42.000Z | 2021-11-24T20:56:36.000Z | sheetwork/__init__.py | bastienboutonnet/sheetwork | 7aa757ed12375ddd2c56502b721d91146d22b7ea | [
"MIT"
] | 266 | 2020-04-19T10:50:19.000Z | 2022-03-14T22:12:43.000Z | sheetwork/__init__.py | bastienboutonnet/sheetwork | 7aa757ed12375ddd2c56502b721d91146d22b7ea | [
"MIT"
] | 3 | 2020-04-25T18:11:20.000Z | 2020-12-21T09:36:34.000Z | """Version module and init for sheetwork."""
__version__ = "1.0.7"
| 17 | 44 | 0.676471 |
935560a67bf01e97bb10abaa9d69053eb6f960dc | 2,532 | py | Python | app/tests/test_b1_get_github_urls.py | OmarThinks/Gemography-Challenge-1 | 79da3c6f1a79a8d9834d302be4bbafd2b4190a8c | [
"MIT"
] | null | null | null | app/tests/test_b1_get_github_urls.py | OmarThinks/Gemography-Challenge-1 | 79da3c6f1a79a8d9834d302be4bbafd2b4190a8c | [
"MIT"
] | null | null | null | app/tests/test_b1_get_github_urls.py | OmarThinks/Gemography-Challenge-1 | 79da3c6f1a79a8d9834d302be4bbafd2b4190a8c | [
"MIT"
] | null | null | null | import unittest
from rest_api.serializers import GithubSearchRepoSerializer
"""
Here we will test the queries builder
"""
"""
To run the tests
pytest
pytest -rP
pytest -rP --junitxml=test-reports/junit.xml --html=test-reports/pytest_report.html --self-contained-html
"""
class QueriesBuilderTestCase(unittest.Test... | 28.133333 | 153 | 0.691943 |
b5b23767bc452d1d161330f945974af76c7faa29 | 3,337 | py | Python | tronx/modules/group.py | TronUb/Tron | 55b5067a34cf2849913647533d7d035cab64568e | [
"MIT"
] | 4 | 2022-03-07T07:27:04.000Z | 2022-03-29T05:59:57.000Z | tronx/modules/group.py | TronUb/Tron | 55b5067a34cf2849913647533d7d035cab64568e | [
"MIT"
] | null | null | null | tronx/modules/group.py | TronUb/Tron | 55b5067a34cf2849913647533d7d035cab64568e | [
"MIT"
] | 3 | 2022-03-05T15:24:51.000Z | 2022-03-14T08:48:05.000Z | import asyncio
from pyrogram.raw import functions
from pyrogram.types import Message
from tronx import app, gen
app.CMD_HELP.update(
{"group" : (
"group",
{
"bgroup [group name]" : "Creates a basic group.",
"sgroup [group name]" : "Creates a super group.",
"unread" : "Mark a chat as unread in your tele... | 26.275591 | 145 | 0.66407 |
cb30e36d51b5be1b53857d2833cb520e7a706a79 | 2,233 | py | Python | data/detection/total_text.py | JinGyeSetBirdsFree/FudanOCR | e6b18b0eefaf832b2eb7198f5df79e00bd4cee36 | [
"MIT"
] | 25 | 2020-02-29T12:14:10.000Z | 2020-04-24T07:56:06.000Z | data/detection/total_text.py | dun933/FudanOCR | fd79b679044ea23fd9eb30691453ed0805d2e98b | [
"MIT"
] | 33 | 2020-12-10T19:15:39.000Z | 2022-03-12T00:17:30.000Z | data/detection/total_text.py | dun933/FudanOCR | fd79b679044ea23fd9eb30691453ed0805d2e98b | [
"MIT"
] | 4 | 2020-02-29T12:14:18.000Z | 2020-04-12T12:26:50.000Z | import scipy.io as io
import numpy as np
import os
import copy
from model.detection_model.TextSnake_pytorch.dataset.data_util import pil_load_img
from model.detection_model.TextSnake_pytorch.dataset.dataload import TextDataset, TextInstance
from model.detection_model.TextSnake_pytorch.dataset.read_json import read_jso... | 39.875 | 111 | 0.675325 |
45f51594865128c08e49b37d5c555864470bda1c | 555 | py | Python | peeper/config/amk.py | raceup/peeper | 95005b279bf94c2e6435c6a0e0db3c456b971861 | [
"MIT"
] | 1 | 2019-05-13T02:47:14.000Z | 2019-05-13T02:47:14.000Z | peeper/config/amk.py | raceup/peeper | 95005b279bf94c2e6435c6a0e0db3c456b971861 | [
"MIT"
] | null | null | null | peeper/config/amk.py | raceup/peeper | 95005b279bf94c2e6435c6a0e0db3c456b971861 | [
"MIT"
] | null | null | null | from enum import Enum
class Motors(Enum):
FL = 3
FR = 2
RL = 1
RR = 0
AMK_VALUES_1_CAN_IDS = ['283', '284', '287', '288']
AMK_VALUES_2_CAN_IDS = ['285', '286', '289', '28a']
AMK_SETPOINTS_CAN_IDS = ['184', '185', '188', '189']
AMK_VALUES_1 = {
motor: AMK_VALUES_1_CAN_IDS[motor.value]
for mo... | 19.137931 | 52 | 0.636036 |
2a7cb2046853778cd21b61291cf80b384b7cf40a | 518 | py | Python | lexlib/__init__.py | cranndarach/wordutils | f1e2288df1924a12e6d018786e9797dabec2656a | [
"MIT"
] | 4 | 2017-03-03T00:36:13.000Z | 2020-03-10T18:58:18.000Z | lexlib/__init__.py | cranndarach/wordutils | f1e2288df1924a12e6d018786e9797dabec2656a | [
"MIT"
] | 3 | 2016-12-30T02:47:45.000Z | 2018-08-14T22:43:06.000Z | lexlib/__init__.py | cranndarach/wordutils | f1e2288df1924a12e6d018786e9797dabec2656a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""
Set of utilities for research involving words.
"""
# copyright: 2016-2019 R. Steiner
# license: MIT License
from .io import *
from .neighbors import *
from .structure import *
from .utilities import *
__all__ = ["check_neighbors", "get_words", "clusters", "clusters_word",
"get_... | 27.263158 | 75 | 0.69305 |
da6bb512fea156a72ded3134302fb2739d27dcde | 1,690 | py | Python | src/rabbitmq/RabbitSpider.py | gendobr/scrapy-boilerplate | 5695e5310ac27be35b76a20593cb987d51eccd28 | [
"MIT"
] | null | null | null | src/rabbitmq/RabbitSpider.py | gendobr/scrapy-boilerplate | 5695e5310ac27be35b76a20593cb987d51eccd28 | [
"MIT"
] | null | null | null | src/rabbitmq/RabbitSpider.py | gendobr/scrapy-boilerplate | 5695e5310ac27be35b76a20593cb987d51eccd28 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import json
import logging
import os
import re
import sys
import time
import pika
import scrapy
from scrapy.utils.project import get_project_settings
class RabbitSpider:
def __init__(self, *args, **kwargs):
settings = get_project_settings()
self.rabbitmq_connect(settings)
... | 30.727273 | 79 | 0.628994 |
59f922033600c7c4d9d83dab9324f431101daa2d | 2,088 | py | Python | operators/crossplane/python/pulumi_pulumi_kubernetes_crds_operators_crossplane/provider.py | pulumi/pulumi-kubernetes-crds | 372c4c0182f6b899af82d6edaad521aa14f22150 | [
"Apache-2.0"
] | null | null | null | operators/crossplane/python/pulumi_pulumi_kubernetes_crds_operators_crossplane/provider.py | pulumi/pulumi-kubernetes-crds | 372c4c0182f6b899af82d6edaad521aa14f22150 | [
"Apache-2.0"
] | 2 | 2020-09-18T17:12:23.000Z | 2020-12-30T19:40:56.000Z | operators/crossplane/python/pulumi_pulumi_kubernetes_crds_operators_crossplane/provider.py | pulumi/pulumi-kubernetes-crds | 372c4c0182f6b899af82d6edaad521aa14f22150 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by crd2pulumi. ***
# *** 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
__all__ = ['Provide... | 37.963636 | 134 | 0.645594 |
25235c8b7ae203face175993654de2903237b787 | 25,651 | py | Python | python/cucim/src/cucim/skimage/filters/edges.py | aasthajh/cucim | a95cc5c4ab25beffeac42d642dea8cb1bbf21408 | [
"Apache-2.0"
] | 131 | 2021-04-09T19:02:10.000Z | 2022-03-25T08:49:11.000Z | python/cucim/src/cucim/skimage/filters/edges.py | aasthajh/cucim | a95cc5c4ab25beffeac42d642dea8cb1bbf21408 | [
"Apache-2.0"
] | 222 | 2021-04-12T07:15:14.000Z | 2022-03-31T20:01:01.000Z | python/cucim/src/cucim/skimage/filters/edges.py | aasthajh/cucim | a95cc5c4ab25beffeac42d642dea8cb1bbf21408 | [
"Apache-2.0"
] | 34 | 2021-04-09T18:54:13.000Z | 2022-03-29T12:59:26.000Z | """
Sobel and Prewitt filters originally part of CellProfiler, code licensed under
both GPL and BSD licenses.
Website: http://www.cellprofiler.org
Copyright (c) 2003-2009 Massachusetts Institute of Technology
Copyright (c) 2009-2011 Broad Institute
All rights reserved.
Original author: Lee Kamentsky
"""
import math
... | 29.89627 | 93 | 0.625629 |
7436cf3a18ce2abbc2b2acfc30e00db33568c8f2 | 3,283 | py | Python | team_9/cocos/cocos/audio/pygame/__init__.py | Donnyvdm/dojo19 | 3cf043a84e3ad6d3c4d59cd9c50b160e1ff03400 | [
"BSD-3-Clause"
] | 1 | 2019-09-15T18:59:49.000Z | 2019-09-15T18:59:49.000Z | team_9/cocos/cocos/audio/pygame/__init__.py | Donnyvdm/dojo19 | 3cf043a84e3ad6d3c4d59cd9c50b160e1ff03400 | [
"BSD-3-Clause"
] | null | null | null | team_9/cocos/cocos/audio/pygame/__init__.py | Donnyvdm/dojo19 | 3cf043a84e3ad6d3c4d59cd9c50b160e1ff03400 | [
"BSD-3-Clause"
] | null | null | null | # pygame - Python Game Library
# Copyright (C) 2000-2001 Pete Shinners
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later... | 30.682243 | 75 | 0.68413 |
84d4e45fa77dd01254666fbf8e6759229c3f8c9b | 4,411 | py | Python | lib/ayeaye/connectors/json_connector.py | Aye-Aye-Dev/AyeAye | 8fd7c6cdb4313fffce9d0c21dd02391821c512da | [
"Apache-2.0"
] | 5 | 2020-02-04T12:54:15.000Z | 2022-02-15T11:14:35.000Z | lib/ayeaye/connectors/json_connector.py | Aye-Aye-Dev/AyeAye | 8fd7c6cdb4313fffce9d0c21dd02391821c512da | [
"Apache-2.0"
] | null | null | null | lib/ayeaye/connectors/json_connector.py | Aye-Aye-Dev/AyeAye | 8fd7c6cdb4313fffce9d0c21dd02391821c512da | [
"Apache-2.0"
] | 1 | 2020-11-09T08:47:34.000Z | 2020-11-09T08:47:34.000Z | """
Created on 15 Apr 2020
@author: si
"""
import json
import os
from ayeaye.connectors.base import DataConnector, AccessMode
from ayeaye.pinnate import Pinnate
class JsonConnector(DataConnector):
engine_type = "json://"
def __init__(self, *args, **kwargs):
"""
Single JSON file loaded into ... | 31.963768 | 129 | 0.614827 |
1a0da544c4dfc429aede6343c02d17cb5cd52d6a | 19,024 | py | Python | main.py | LiYingwei/CondenseNet | 8a86cdb755a8667e4096698bdc2859ae4487c979 | [
"MIT"
] | null | null | null | main.py | LiYingwei/CondenseNet | 8a86cdb755a8667e4096698bdc2859ae4487c979 | [
"MIT"
] | null | null | null | main.py | LiYingwei/CondenseNet | 8a86cdb755a8667e4096698bdc2859ae4487c979 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
import argparse
import os
import shutil
import time
import math
import warnings
import models
from utils import convert_model, measure_model
parser = argparse.ArgumentPa... | 39.305785 | 95 | 0.587731 |
09a3b7aed9428f560b9c0e8a358c4809a490cffc | 9,220 | py | Python | tests/components/energy/test_websocket_api.py | basicpail/core | 5cc54618c5af3f75c08314bf2375cc7ac40d2b7e | [
"Apache-2.0"
] | 7 | 2019-08-15T13:36:58.000Z | 2020-03-18T10:46:29.000Z | tests/components/energy/test_websocket_api.py | basicpail/core | 5cc54618c5af3f75c08314bf2375cc7ac40d2b7e | [
"Apache-2.0"
] | 87 | 2020-07-06T22:22:54.000Z | 2022-03-31T06:01:46.000Z | tests/components/energy/test_websocket_api.py | winning1120xx/home-assistant | 53d4c0ce2d374b5e97bbdc37742656c27adf8eea | [
"Apache-2.0"
] | 11 | 2020-12-16T13:48:14.000Z | 2022-02-01T00:28:05.000Z | """Test the Energy websocket API."""
from unittest.mock import AsyncMock, Mock
import pytest
from homeassistant.components.energy import data, is_configured
from homeassistant.setup import async_setup_component
from tests.common import MockConfigEntry, flush_store, mock_platform
@pytest.fixture(autouse=True)
async... | 31.575342 | 90 | 0.526139 |
3d87fa55617200f65337dab0221e0c5dd72d9f6d | 1,952 | py | Python | var/spack/repos/builtin/packages/folly/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 3 | 2021-09-29T02:14:40.000Z | 2022-01-27T20:50:36.000Z | var/spack/repos/builtin/packages/folly/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 6 | 2022-01-08T08:41:11.000Z | 2022-03-14T19:28:07.000Z | var/spack/repos/builtin/packages/folly/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | # Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Folly(CMakePackage):
"""Folly (acronymed loosely after Facebook Open Source Library) is a... | 39.836735 | 130 | 0.724898 |
4ae4aa56e63181f6bed66154b5e62f3507c0a7eb | 391,250 | py | Python | nbdev_scipy/_modidx.py | fastai/nbdev-index | 6fb8e36160d88b71c6e1f86562f741274558c74f | [
"Apache-2.0"
] | 2 | 2020-11-12T03:47:24.000Z | 2021-01-17T01:02:10.000Z | nbdev_scipy/_modidx.py | fastai/nbdev-index | 6fb8e36160d88b71c6e1f86562f741274558c74f | [
"Apache-2.0"
] | 28 | 2021-02-15T08:40:38.000Z | 2022-03-20T03:07:28.000Z | nbdev_scipy/_modidx.py | fastai/nbdev-index | 6fb8e36160d88b71c6e1f86562f741274558c74f | [
"Apache-2.0"
] | 2 | 2020-12-03T16:50:55.000Z | 2021-02-19T05:47:08.000Z | # Autogenerated by get_module_idx.py
d = { 'syms': { 'scipy': { 'scipy.cluster': 'https://docs.scipy.org/doc/scipy/reference/cluster.html#module-scipy.cluster',
'scipy.constants': 'https://docs.scipy.org/doc/scipy/reference/constants.html#module-scipy.constants',
'scipy.ff... | 185.514462 | 302 | 0.681224 |
71c55f66f473fe60da7f556a02120b7fdc8316c0 | 6,286 | py | Python | cmake/templates/_setup_util.py | po1/catkin | 85556d6776337e9cb1970f0f1733687dbbcb8a42 | [
"BSD-3-Clause"
] | null | null | null | cmake/templates/_setup_util.py | po1/catkin | 85556d6776337e9cb1970f0f1733687dbbcb8a42 | [
"BSD-3-Clause"
] | null | null | null | cmake/templates/_setup_util.py | po1/catkin | 85556d6776337e9cb1970f0f1733687dbbcb8a42 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# Software License Agreement (BSD License)
#
# Copyright (c) 2012, Willow Garage, 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 cod... | 44.58156 | 158 | 0.719695 |
c4b84cb644212b613cbded9e818199120821c78c | 6,140 | py | Python | Test/MakingText.py | shpkc/DailyBigdata | 66fe0fa7b73d054e8b14975a655fdb40b11be014 | [
"Apache-2.0"
] | null | null | null | Test/MakingText.py | shpkc/DailyBigdata | 66fe0fa7b73d054e8b14975a655fdb40b11be014 | [
"Apache-2.0"
] | 16 | 2020-01-28T22:54:04.000Z | 2022-03-11T23:53:56.000Z | Test/MakingText.py | shpkc/DailyBigdata | 66fe0fa7b73d054e8b14975a655fdb40b11be014 | [
"Apache-2.0"
] | null | null | null | def Text():
import pandas as pd
from datetime import timedelta,date
import os
today = int(date.today().strftime('%Y%m%d'))
yesterday = date.today() - timedelta(1)
yesterday = int(yesterday.strftime('%Y%m%d'))
month = int(date.today().strftime('%m'))
day = int(date.today().strftime('%d... | 25.061224 | 111 | 0.516938 |
1557cd0d2497af89771497ea109c453a92cf22db | 11,532 | py | Python | privex/helpers/setuppy/bump.py | Privex/python-helpers | 1c976ce5b0e2c5241ea0bdf330bd6701b5e31153 | [
"X11"
] | 12 | 2019-06-18T11:17:41.000Z | 2021-09-13T23:00:21.000Z | privex/helpers/setuppy/bump.py | Privex/python-helpers | 1c976ce5b0e2c5241ea0bdf330bd6701b5e31153 | [
"X11"
] | 1 | 2019-10-13T07:34:44.000Z | 2019-10-13T07:34:44.000Z | privex/helpers/setuppy/bump.py | Privex/python-helpers | 1c976ce5b0e2c5241ea0bdf330bd6701b5e31153 | [
"X11"
] | 4 | 2019-10-10T10:15:09.000Z | 2021-05-16T01:55:48.000Z | """
Automated Python package version bumping
Summary
-------
Included is a standalone function :py:func:`.bump_version` - which when called, loads the file
:py:attr:`.settings.VERSION_FILE` , extracts the current version, bumps the requested part of the version,
then replaces the version line inside of the file so th... | 40.749117 | 118 | 0.681495 |
9ffa53f322962c61cd4104b4de552e87188b6a42 | 2,907 | py | Python | pyzoo/zoo/examples/tensorflow/tfpark/tf_optimizer/train_lenet.py | respecteverything/analytics-zoo | a8843c73c24b5026d93d46fa9268eb41a958cf6d | [
"Apache-2.0"
] | null | null | null | pyzoo/zoo/examples/tensorflow/tfpark/tf_optimizer/train_lenet.py | respecteverything/analytics-zoo | a8843c73c24b5026d93d46fa9268eb41a958cf6d | [
"Apache-2.0"
] | null | null | null | pyzoo/zoo/examples/tensorflow/tfpark/tf_optimizer/train_lenet.py | respecteverything/analytics-zoo | a8843c73c24b5026d93d46fa9268eb41a958cf6d | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2018 Analytics Zoo Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 35.024096 | 96 | 0.632267 |
c0c3218d0657d99331263bbd770e36ce83c68438 | 201 | py | Python | siteforms/__init__.py | idlesign/django-siteforms | 86661d6f899e842c32802511ac0a13db1eed671d | [
"BSD-3-Clause"
] | 16 | 2020-06-23T19:41:35.000Z | 2020-08-15T14:34:21.000Z | siteforms/__init__.py | idlesign/django-siteforms | 86661d6f899e842c32802511ac0a13db1eed671d | [
"BSD-3-Clause"
] | null | null | null | siteforms/__init__.py | idlesign/django-siteforms | 86661d6f899e842c32802511ac0a13db1eed671d | [
"BSD-3-Clause"
] | null | null | null |
VERSION = (0, 9, 1)
"""Application version number tuple."""
VERSION_STR = '.'.join(map(str, VERSION))
"""Application version number string."""
default_app_config = 'siteforms.apps.SiteformsConfig' | 20.1 | 53 | 0.711443 |
c2367d086225c9deb31a3de5b85f100c466e3e59 | 1,709 | py | Python | server/gists.py | macobo/grader-webapp | 2d5c5511472792d21f864de47267e33ddbd17c90 | [
"MIT"
] | 1 | 2021-11-02T16:38:29.000Z | 2021-11-02T16:38:29.000Z | server/gists.py | macobo/grader-webapp | 2d5c5511472792d21f864de47267e33ddbd17c90 | [
"MIT"
] | null | null | null | server/gists.py | macobo/grader-webapp | 2d5c5511472792d21f864de47267e33ddbd17c90 | [
"MIT"
] | null | null | null | from server import app, db
from flask import Blueprint, request, jsonify, abort
from .utils import dump_json
mod = Blueprint('gists', __name__)
import string
import random
def id_generator(size=8, chars=string.ascii_uppercase + string.digits):
return ''.join(random.choice(chars) for _ in range(size))
def free_na... | 29.982456 | 83 | 0.627267 |
beb09787ec93c789daf795e01d19d0edd395647b | 3,893 | py | Python | tests/unit/s3/test_lifecycle.py | ChimeraCoder/boto | fa886a95e0f2c09b15e0f10c7244a9b02df9007d | [
"MIT"
] | 1 | 2021-08-13T09:07:07.000Z | 2021-08-13T09:07:07.000Z | tests/unit/s3/test_lifecycle.py | ChimeraCoder/boto | fa886a95e0f2c09b15e0f10c7244a9b02df9007d | [
"MIT"
] | null | null | null | tests/unit/s3/test_lifecycle.py | ChimeraCoder/boto | fa886a95e0f2c09b15e0f10c7244a9b02df9007d | [
"MIT"
] | null | null | null | # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved
#
# 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 ... | 40.134021 | 78 | 0.653994 |
85b54e94e86ccf7d9c76c326e191c3bc4de9fa8c | 3,505 | py | Python | sly/apps/shrink/tests/test_forms.py | ppolle/sly | 3458b5c58a75c65fdc72b91430e56ec37d2060e0 | [
"MIT"
] | null | null | null | sly/apps/shrink/tests/test_forms.py | ppolle/sly | 3458b5c58a75c65fdc72b91430e56ec37d2060e0 | [
"MIT"
] | 3 | 2021-03-19T23:38:19.000Z | 2021-06-10T23:02:29.000Z | sly/apps/shrink/tests/test_forms.py | ppolle/sly | 3458b5c58a75c65fdc72b91430e56ec37d2060e0 | [
"MIT"
] | null | null | null | from django.test import TestCase
from sly.apps.shrink.forms import UrlForm, RegisterUserForm, UserAuthForm
# Create your tests here.
class UrlFormTests(TestCase):
def test_valid_form(self):
data = {
'url': 'https://www.nation.co.ke/lifestyle/1190-1190-5p56avz/index.html',
'short_code':'weifbwie'
}
form = Ur... | 26.353383 | 117 | 0.692725 |
8132157b345baf58142efc8ec4f98b590c18473f | 1,625 | py | Python | backintime/candles_providers/timeframe_dump/timeframe_dump.py | akim-mukhtarov/backtesting | 2d0491b919885eeddd62c4079c9c7292381cb4f9 | [
"MIT"
] | null | null | null | backintime/candles_providers/timeframe_dump/timeframe_dump.py | akim-mukhtarov/backtesting | 2d0491b919885eeddd62c4079c9c7292381cb4f9 | [
"MIT"
] | null | null | null | backintime/candles_providers/timeframe_dump/timeframe_dump.py | akim-mukhtarov/backtesting | 2d0491b919885eeddd62c4079c9c7292381cb4f9 | [
"MIT"
] | null | null | null | from .timeframe_dump_scheme import TimeframeDumpScheme
from .utils import to_candle
from ..candles_provider import CandlesProvider
from ...timeframes import Timeframes
import pandas as pd
import datetime
class TimeframeDump(CandlesProvider):
def __init__(
self,
filename: str... | 30.660377 | 87 | 0.606769 |
cf2610e897d3ed060d971132dfa54b8cc97e7eb2 | 23,401 | py | Python | bansync/bansync.py | jack1142/SinbadCogs-1 | e0f24c0dbc3f845aa7a37ca96d00ee59494911ca | [
"BSD-Source-Code"
] | null | null | null | bansync/bansync.py | jack1142/SinbadCogs-1 | e0f24c0dbc3f845aa7a37ca96d00ee59494911ca | [
"BSD-Source-Code"
] | null | null | null | bansync/bansync.py | jack1142/SinbadCogs-1 | e0f24c0dbc3f845aa7a37ca96d00ee59494911ca | [
"BSD-Source-Code"
] | null | null | null | from __future__ import annotations
import asyncio
import io
import json
import logging
from datetime import datetime
from typing import (
AsyncIterator,
Collection,
Dict,
Generator,
List,
Optional,
Set,
Tuple,
Union,
cast,
)
import discord
from discord.ext.commands import Greed... | 31.665765 | 98 | 0.559421 |
dae43a42eb15816cf6cd611868e1746cbb365fae | 42 | py | Python | pdip/integrator/connection/types/sql/dialects/oracle/__init__.py | ahmetcagriakca/pdip | c4c16d5666a740154cabdc6762cd44d98b7bdde8 | [
"MIT"
] | 2 | 2021-12-09T21:07:46.000Z | 2021-12-11T22:18:01.000Z | pdip/integrator/connection/types/sql/dialects/oracle/__init__.py | PythonDataIntegrator/pdip | c4c16d5666a740154cabdc6762cd44d98b7bdde8 | [
"MIT"
] | null | null | null | pdip/integrator/connection/types/sql/dialects/oracle/__init__.py | PythonDataIntegrator/pdip | c4c16d5666a740154cabdc6762cd44d98b7bdde8 | [
"MIT"
] | 3 | 2021-11-15T00:47:00.000Z | 2021-12-17T11:35:45.000Z | from .oracle_dialect import OracleDialect
| 21 | 41 | 0.880952 |
381b50cf2a4cabf03c93428f21fb58bb95b5316e | 1,135 | py | Python | classgrade/gradapp/migrations/0004_auto_20160921_2150.py | classgrade/classgrade | 144dcfc9579e6858ff4aa79835c76b9611ed73b2 | [
"MIT"
] | 5 | 2016-11-15T17:46:27.000Z | 2022-01-10T08:06:17.000Z | classgrade/gradapp/migrations/0004_auto_20160921_2150.py | classgrade/classgrade | 144dcfc9579e6858ff4aa79835c76b9611ed73b2 | [
"MIT"
] | 21 | 2016-11-07T14:58:22.000Z | 2021-02-02T21:41:12.000Z | classgrade/gradapp/migrations/0004_auto_20160921_2150.py | classgrade/classgrade | 144dcfc9579e6858ff4aa79835c76b9611ed73b2 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.1 on 2016-09-21 21:50
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('gradapp', '0003_assignmentype_title'),
]
operations = [
migrations.RemoveFi... | 28.375 | 72 | 0.577093 |
0fdadc5b5bfe8c596acdef7379a4f49c6522a956 | 4,441 | py | Python | dependencies/pystache/pystache/loader.py | charlesmchen/typefacet | 8c6db26d0c599ece16f3704696811275120a4044 | [
"Apache-2.0"
] | 21 | 2015-01-16T05:10:02.000Z | 2021-06-11T20:48:15.000Z | dependencies/pystache/pystache/loader.py | charlesmchen/typefacet | 8c6db26d0c599ece16f3704696811275120a4044 | [
"Apache-2.0"
] | 1 | 2019-09-09T12:10:27.000Z | 2020-05-22T10:12:14.000Z | dependencies/pystache/pystache/loader.py | charlesmchen/typefacet | 8c6db26d0c599ece16f3704696811275120a4044 | [
"Apache-2.0"
] | 2 | 2015-05-03T04:51:08.000Z | 2018-08-24T08:28:53.000Z | # coding: utf-8
"""
This module provides a Loader class for locating and reading templates.
"""
import os
import sys
from pystache import common
from pystache import defaults
from pystache.locator import Locator
# We make a function so that the current defaults take effect.
# TODO: revisit whether this is necessa... | 28.286624 | 79 | 0.635217 |
958e682d3c5e0e5b185d17731f0bf798d4a38e12 | 682 | py | Python | kyu6/tests/test_autocomplete.py | juanshishido/codewars | d50d4ac07ddcc00fa2f7c367ec39cdb5e274d8da | [
"MIT"
] | null | null | null | kyu6/tests/test_autocomplete.py | juanshishido/codewars | d50d4ac07ddcc00fa2f7c367ec39cdb5e274d8da | [
"MIT"
] | null | null | null | kyu6/tests/test_autocomplete.py | juanshishido/codewars | d50d4ac07ddcc00fa2f7c367ec39cdb5e274d8da | [
"MIT"
] | null | null | null | import unittest
from kyu6.autocomplete import autocomplete
class TestAutocomplete(unittest.TestCase):
dictionary = ['abnormal', 'arm-wrestling', 'absolute', 'airplane',
'airport', 'amazing', 'apple', 'ball' ]
def test_ai(self):
self.assertEquals(['airplane', 'airport'],
... | 31 | 74 | 0.582111 |
ad75c375d5ac63e18266769c3c87c3959c776c9b | 858 | py | Python | Server/Server/Captcha/Util.py | mythsman/CatpchaRecognition | 445985cd4df6147657a3b52ae38552016a771c7a | [
"MIT"
] | 7 | 2017-03-02T09:08:37.000Z | 2022-02-26T22:14:59.000Z | Server/Server/Captcha/Util.py | mythsman/CatpchaRecognition | 445985cd4df6147657a3b52ae38552016a771c7a | [
"MIT"
] | null | null | null | Server/Server/Captcha/Util.py | mythsman/CatpchaRecognition | 445985cd4df6147657a3b52ae38552016a771c7a | [
"MIT"
] | null | null | null | '''
Created on Jul 16, 2016
@author: myths
'''
import matplotlib.pyplot as plt
import cv2, numpy as np
def showImage(img):
plt.imshow(img)
plt.show()
def otsu(img):
_, im = cv2.threshold(img, 0, 255, cv2.THRESH_BINARY + cv2.THRESH_OTSU)
return im
def resize(img, width, height):
return cv2.resiz... | 26.8125 | 107 | 0.710956 |
026bcf7f72396bfd75c236f0a18927b6f512b537 | 1,038 | py | Python | Dangerous/Golismero/tools/sqlmap/plugins/dbms/sybase/takeover.py | JeyZeta/Dangerous- | 824ea6b571eda98bb855f176361e9b35dfda578e | [
"MIT"
] | null | null | null | Dangerous/Golismero/tools/sqlmap/plugins/dbms/sybase/takeover.py | JeyZeta/Dangerous- | 824ea6b571eda98bb855f176361e9b35dfda578e | [
"MIT"
] | null | null | null | Dangerous/Golismero/tools/sqlmap/plugins/dbms/sybase/takeover.py | JeyZeta/Dangerous- | 824ea6b571eda98bb855f176361e9b35dfda578e | [
"MIT"
] | 1 | 2018-07-04T18:35:16.000Z | 2018-07-04T18:35:16.000Z | #!/usr/bin/env python
"""
Copyright (c) 2006-2013 sqlmap developers (http://sqlmap.org/)
See the file 'doc/COPYING' for copying permission
"""
from lib.core.exception import SqlmapUnsupportedFeatureException
from plugins.generic.takeover import Takeover as GenericTakeover
class Takeover(GenericTakeover):
def __i... | 32.4375 | 67 | 0.712909 |
5daca6e3bd1c44a4f22e0d4b5ca5098e546032c5 | 798 | py | Python | backend/app.py | obdura/Connecting-React-Frontend-to-a-Flask-Backend | 9287fdf9a82b7238f65e46335b1adf2d05cfcd41 | [
"MIT"
] | 10 | 2021-09-03T06:34:10.000Z | 2022-03-16T05:30:40.000Z | backend/app.py | obdura/Connecting-React-Frontend-to-a-Flask-Backend | 9287fdf9a82b7238f65e46335b1adf2d05cfcd41 | [
"MIT"
] | null | null | null | backend/app.py | obdura/Connecting-React-Frontend-to-a-Flask-Backend | 9287fdf9a82b7238f65e46335b1adf2d05cfcd41 | [
"MIT"
] | 10 | 2021-09-03T06:34:19.000Z | 2022-03-31T12:56:20.000Z | # Import the required libraries
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_migrate import Migrate
from flask_marshmallow import Marshmallow
from flask_cors import CORS
# Create various application instances
# Order matters: Initialize SQLAlchemy before Marshmallow
db = SQLAlchemy()
mig... | 25.741935 | 78 | 0.75188 |
bbeff265b8d713035b422ad7c5663caaa24e1a95 | 404 | py | Python | sdk/python/pulumi_google_native/storage/__init__.py | AaronFriel/pulumi-google-native | 75d1cda425e33d4610348972cd70bddf35f1770d | [
"Apache-2.0"
] | 44 | 2021-04-18T23:00:48.000Z | 2022-02-14T17:43:15.000Z | sdk/python/pulumi_google_native/storage/__init__.py | AaronFriel/pulumi-google-native | 75d1cda425e33d4610348972cd70bddf35f1770d | [
"Apache-2.0"
] | 354 | 2021-04-16T16:48:39.000Z | 2022-03-31T17:16:39.000Z | sdk/python/pulumi_google_native/storage/__init__.py | AaronFriel/pulumi-google-native | 75d1cda425e33d4610348972cd70bddf35f1770d | [
"Apache-2.0"
] | 8 | 2021-04-24T17:46:51.000Z | 2022-01-05T10:40:21.000Z | # 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! ***
from .. import _utilities
import typing
# Make subpackages available:
if typing.TYPE_CHECKING:
import pulumi_google_native.storage.v1 as __v1
... | 26.933333 | 80 | 0.730198 |
66606be3dc63805a74d475a2db8d5e4a91c76863 | 4,360 | py | Python | lib/galaxy_test/api/test_groups.py | rhpvorderman/galaxy | 178015f8eff0b0c7a59c0d6756658f6428222837 | [
"CC-BY-3.0"
] | 1 | 2021-05-18T02:20:43.000Z | 2021-05-18T02:20:43.000Z | lib/galaxy_test/api/test_groups.py | rhpvorderman/galaxy | 178015f8eff0b0c7a59c0d6756658f6428222837 | [
"CC-BY-3.0"
] | null | null | null | lib/galaxy_test/api/test_groups.py | rhpvorderman/galaxy | 178015f8eff0b0c7a59c0d6756658f6428222837 | [
"CC-BY-3.0"
] | null | null | null | import json
from galaxy_test.base.populators import DatasetPopulator
from ._framework import ApiTestCase
class GroupsApiTestCase(ApiTestCase):
def setUp(self):
super().setUp()
self.dataset_populator = DatasetPopulator(self.galaxy_interactor)
def test_create_valid(self, group_name: str = Non... | 36.949153 | 92 | 0.662156 |
4c0a51b9f0547b54fef80a0add8076eec0045f8f | 5,061 | py | Python | untypy/impl/generator.py | CodeSteak/untypy | b24c7e1a6e41cc86663e2f546508b21f8cbd719a | [
"MIT"
] | 1 | 2021-09-14T15:06:24.000Z | 2021-09-14T15:06:24.000Z | untypy/impl/generator.py | CodeSteak/untypy | b24c7e1a6e41cc86663e2f546508b21f8cbd719a | [
"MIT"
] | null | null | null | untypy/impl/generator.py | CodeSteak/untypy | b24c7e1a6e41cc86663e2f546508b21f8cbd719a | [
"MIT"
] | 1 | 2021-09-14T15:06:29.000Z | 2021-09-14T15:06:29.000Z | import collections.abc
import inspect
import sys
from collections import Generator
from typing import Any, Optional
from typing import Generator as OtherGenerator
from untypy.error import UntypyTypeError, UntypyAttributeError, Location
from untypy.interfaces import TypeChecker, TypeCheckerFactory, CreationContext, Exe... | 39.232558 | 126 | 0.659751 |
8077eab42f3064c246e80589bf687e989553355d | 28,620 | py | Python | app/weixin_utils/client.py | w940853815/weixin-robot | 73b7b447241c1a74a14b21c6c11fc652b30f7ebb | [
"Apache-2.0"
] | 12 | 2017-06-24T02:13:22.000Z | 2021-03-16T02:43:40.000Z | app/weixin_utils/client.py | w940853815/weixin-robot | 73b7b447241c1a74a14b21c6c11fc652b30f7ebb | [
"Apache-2.0"
] | 7 | 2017-04-08T07:45:19.000Z | 2020-01-06T05:50:30.000Z | app/weixin_utils/client.py | w940853815/weixin-robot | 73b7b447241c1a74a14b21c6c11fc652b30f7ebb | [
"Apache-2.0"
] | 1 | 2017-07-31T01:09:27.000Z | 2017-07-31T01:09:27.000Z | # -*- coding: utf-8 -*-
# coding=utf-8
__author__ = 'ruidong.wang@tsingdata.com'
import time
import six
import requests
from requests.compat import json as _json
from config_web import WEI_XIN_APP_ID, WEI_XIN_APP_SECRET
import sys
reload(sys)
sys.setdefaultencoding('utf8')
class ClientException(Exception):
pass
d... | 28.003914 | 98 | 0.4471 |
737e6b4782c9dde363de803b8f50217d86852815 | 5,111 | py | Python | gocd_tools/defaults.py | rasmunk/gocd-tools | 2567756d993d1b323bde2b2903457df598f19dc6 | [
"MIT"
] | null | null | null | gocd_tools/defaults.py | rasmunk/gocd-tools | 2567756d993d1b323bde2b2903457df598f19dc6 | [
"MIT"
] | null | null | null | gocd_tools/defaults.py | rasmunk/gocd-tools | 2567756d993d1b323bde2b2903457df598f19dc6 | [
"MIT"
] | null | null | null | import os
from gocd_tools.utils import is_env_set
PACKAGE_NAME = "gocd-tools"
# API Request Defaults
CONTENT_TYPE = "application/json"
JSON_HEADER = {"Content-Type": CONTENT_TYPE}
API_VERSION_1 = "application/vnd.go.cd.v1+json"
API_VERSION_2 = "application/vnd.go.cd.v2+json"
API_VERSION_3 = "application/vnd.go.cd.v3... | 30.975758 | 87 | 0.741734 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.