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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
fca689ff842187573cc5c9f59e5be60936d82444 | 861 | py | Python | setup.py | IAmTheBlurr/TotalRecall | 52e5018059f9d7f1b758984cbf0d57f2f1202272 | [
"MIT"
] | null | null | null | setup.py | IAmTheBlurr/TotalRecall | 52e5018059f9d7f1b758984cbf0d57f2f1202272 | [
"MIT"
] | 2 | 2019-09-26T18:40:12.000Z | 2019-09-28T08:17:59.000Z | setup.py | IAmTheBlurr/TotalRecall | 52e5018059f9d7f1b758984cbf0d57f2f1202272 | [
"MIT"
] | 1 | 2019-10-03T17:24:28.000Z | 2019-10-03T17:24:28.000Z | import setuptools
with open("README.md", "r") as file:
long_description = file.read()
setuptools.setup(
name='Chronomancy',
version='0.0.2',
author='Jonathan Craig',
author_email='blurr@iamtheblurr.com',
description="The power of Time itself, for Python",
long_description=long_description,... | 31.888889 | 70 | 0.650407 |
758129989550e7f4799c6f188cf8582869c237ed | 1,612 | py | Python | scripts/plot_results.py | callaunchpad/emergence | b5da3697fa08202c23302c2ed628d24af3af4940 | [
"MIT"
] | null | null | null | scripts/plot_results.py | callaunchpad/emergence | b5da3697fa08202c23302c2ed628d24af3af4940 | [
"MIT"
] | null | null | null | scripts/plot_results.py | callaunchpad/emergence | b5da3697fa08202c23302c2ed628d24af3af4940 | [
"MIT"
] | null | null | null | from stable_baselines import results_plotter
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
plt.rcParams['svg.fonttype'] = 'none'
X_TIMESTEPS = 'timesteps'
X_EPISODES = 'episodes'
X_WALLTIME = 'walltime_hrs'
POSSIBLE_X_AXES = [X_TIMESTEPS, X_EPISODES, X_WALLTIME]
EPISODES_WINDOW = 100
COLORS = ... | 36.636364 | 95 | 0.692928 |
e5ac8f5d9a520c52a18b5bc2264b4fac7c01babc | 2,817 | py | Python | web3/utils/threads.py | voBits/web3 | 947e252124f04b33ac5f96179dccd1a3476b3936 | [
"MIT"
] | 326 | 2016-04-29T21:51:06.000Z | 2022-03-31T03:20:54.000Z | web3/utils/threads.py | voBits/web3 | 947e252124f04b33ac5f96179dccd1a3476b3936 | [
"MIT"
] | 283 | 2016-04-15T16:41:31.000Z | 2017-11-28T16:41:36.000Z | web3/utils/threads.py | voBits/web3 | 947e252124f04b33ac5f96179dccd1a3476b3936 | [
"MIT"
] | 146 | 2016-04-14T16:27:54.000Z | 2021-10-03T13:31:07.000Z | """
A minimal implementation of the various gevent APIs used within this codebase.
"""
import time
import threading
class Timeout(Exception):
"""
A limited subset of the `gevent.Timeout` context manager.
"""
seconds = None
exception = None
begun_at = None
is_running = None
def __init_... | 27.617647 | 94 | 0.601704 |
c380b45bf852cdeab6da334d75c48533073d0360 | 1,586 | py | Python | src/web/modules/finance/migrations/0008_auto_20160725_1510.py | fossabot/SIStema | 1427dda2082688a9482c117d0e24ad380fdc26a6 | [
"MIT"
] | 5 | 2018-03-08T17:22:27.000Z | 2018-03-11T14:20:53.000Z | src/web/modules/finance/migrations/0008_auto_20160725_1510.py | fossabot/SIStema | 1427dda2082688a9482c117d0e24ad380fdc26a6 | [
"MIT"
] | 263 | 2018-03-08T18:05:12.000Z | 2022-03-11T23:26:20.000Z | src/web/modules/finance/migrations/0008_auto_20160725_1510.py | fossabot/SIStema | 1427dda2082688a9482c117d0e24ad380fdc26a6 | [
"MIT"
] | 6 | 2018-03-12T19:48:19.000Z | 2022-01-14T04:58:52.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2016-07-25 12:10
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('finance', '0007_auto_20160531_0315'),
]
operations = [
migrations.RenameField(
... | 26.881356 | 60 | 0.534048 |
68be34c4fbebd434c73ecf1cf4699108c00590fb | 3,876 | py | Python | S2SRL/SymbolicExecutor/transform_util.py | gokasiko/NS-CQA-1 | 96399928c9c1ee30521ea5defd3257fff27bfa74 | [
"MIT"
] | 9 | 2020-04-29T00:49:59.000Z | 2022-01-15T08:56:28.000Z | S2SRL/SymbolicExecutor/transform_util.py | gokasiko/NS-CQA-1 | 96399928c9c1ee30521ea5defd3257fff27bfa74 | [
"MIT"
] | 1 | 2020-07-19T09:04:47.000Z | 2020-10-08T12:23:03.000Z | S2SRL/SymbolicExecutor/transform_util.py | gokasiko/NS-CQA-1 | 96399928c9c1ee30521ea5defd3257fff27bfa74 | [
"MIT"
] | 6 | 2020-07-19T09:01:05.000Z | 2021-11-11T07:58:07.000Z | # -*- coding: utf-8 -*-
# @Time : 2019/9/1 23:36
# @Author : Devin Hua
# Function: transforming.
# Transform boolean results into string format.
def transformBooleanToString(list):
temp_set = set()
if len(list) == 0:
return ''
else:
for i, item in enumerate(list):
if item ==... | 34.300885 | 165 | 0.45743 |
0c7b0486613e2145e4acf0b596f92345458cfd42 | 3,431 | py | Python | 3_Deep_Double_Q_Learning_Atari_Games/plot.py | vamshikumarkurva/DeepReinforcementLearning | e3c123ba60620dfdfb1514ca99f5f86c813984d1 | [
"MIT"
] | 8 | 2018-06-11T18:26:58.000Z | 2021-05-12T07:57:54.000Z | 3_Deep_Double_Q_Learning_Atari_Games/plot.py | vamshikumarkurva/DeepReinforcementLearning | e3c123ba60620dfdfb1514ca99f5f86c813984d1 | [
"MIT"
] | 2 | 2018-06-21T15:17:57.000Z | 2018-07-12T14:42:05.000Z | 3_Deep_Double_Q_Learning_Atari_Games/plot.py | vamshikumarkurva/DeepReinforcementLearning | e3c123ba60620dfdfb1514ca99f5f86c813984d1 | [
"MIT"
] | 3 | 2018-07-10T10:16:22.000Z | 2020-09-02T10:48:32.000Z | import seaborn as sns
import pandas as pd
import matplotlib.pyplot as plt
import json
import os
"""
Using the plotter:
Call it from the command line, and supply it with logdirs to experiments.
Suppose you ran an experiment with name 'test', and you ran 'test' for 10
random seeds. The runner code stored it in the dir... | 28.355372 | 92 | 0.629554 |
bde2ac3f710d3e398bd53893c4acd0b9164d93be | 3,637 | py | Python | kubernetes_asyncio/client/models/v1_container_state_running.py | playground-julia/kubernetes_asyncio | 91b2c41eedd282d9ebc059377fb7f207e220133d | [
"Apache-2.0"
] | null | null | null | kubernetes_asyncio/client/models/v1_container_state_running.py | playground-julia/kubernetes_asyncio | 91b2c41eedd282d9ebc059377fb7f207e220133d | [
"Apache-2.0"
] | null | null | null | kubernetes_asyncio/client/models/v1_container_state_running.py | playground-julia/kubernetes_asyncio | 91b2c41eedd282d9ebc059377fb7f207e220133d | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: v1.15.9
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
fr... | 29.569106 | 124 | 0.598295 |
b50b0242fd3422d8333e80a40a09fd8ce1e4c6bb | 372 | py | Python | data.py | abc1763613206/UniversalTGChatBot | 13d8144f71f4c9326b344a8697baa5fa72005e21 | [
"MIT"
] | null | null | null | data.py | abc1763613206/UniversalTGChatBot | 13d8144f71f4c9326b344a8697baa5fa72005e21 | [
"MIT"
] | 41 | 2019-12-05T21:16:22.000Z | 2021-07-27T21:14:47.000Z | data.py | abc1763613206/UniversalTGChatBot | 13d8144f71f4c9326b344a8697baa5fa72005e21 | [
"MIT"
] | null | null | null | comment = {
'welcome_msg' : '用户发送 /start 或 /help 时的欢迎消息',
'text_not_supported' : '用户发送非文字时的回复',
'data_saved' : '保存数据后的回复',
'demo_mode_on' : '开启演示模式的回复',
'demo_mode_off' : '关闭演示模式的回复',
'not_admin' : '用户权限不足时的回复',
'quotes' : '(请勿使用该选项设置)语录库',
'texts' : '(请勿使用该选项设置)语录无法匹配时的随机库',
'admins... | 33.818182 | 61 | 0.637097 |
f50106826a79986acacf743a46b511c03fb23e3d | 3,363 | py | Python | torrent_name_analyzer/name_parser/patterns.py | opacam/torrent-name-analyzer | 3d6a8c05577925c4d8017a8151f725d9752771d7 | [
"MIT"
] | 1 | 2020-07-08T14:01:36.000Z | 2020-07-08T14:01:36.000Z | torrent_name_analyzer/name_parser/patterns.py | opacam/torrent-name-analyzer | 3d6a8c05577925c4d8017a8151f725d9752771d7 | [
"MIT"
] | null | null | null | torrent_name_analyzer/name_parser/patterns.py | opacam/torrent-name-analyzer | 3d6a8c05577925c4d8017a8151f725d9752771d7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
delimiters = r'[\.\s\-\+_\/]'
langs = (
r'rus|(?:True)?fr(?:ench)?|e?n(?:g(?:lish)?)?|vost(?:fr)?|ita(?:liano)?|'
r'castellano|swedish|spanish|dk|german|multi|nordic|exyu|chs|hindi|polish'
r'|mandarin'
)
producers = 'ATVP|AMZN|NF|NICK|RED|DSNP'
season_range_pattern = (
r'(?:Com... | 38.655172 | 150 | 0.460898 |
456f0509d21782762e2f0fe95a0b373606af3094 | 99 | py | Python | eventsrouter/apps.py | The-Politico/django-slack-events-router | a838d94a55f7be7afeafa19dad093c29e77ebe67 | [
"MIT"
] | null | null | null | eventsrouter/apps.py | The-Politico/django-slack-events-router | a838d94a55f7be7afeafa19dad093c29e77ebe67 | [
"MIT"
] | 6 | 2019-12-05T00:43:05.000Z | 2021-06-09T18:39:48.000Z | eventsrouter/apps.py | The-Politico/django-slack-events-router | a838d94a55f7be7afeafa19dad093c29e77ebe67 | [
"MIT"
] | 1 | 2021-05-30T15:00:36.000Z | 2021-05-30T15:00:36.000Z | from django.apps import AppConfig
class EventsrouterConfig(AppConfig):
name = "eventsrouter"
| 16.5 | 36 | 0.777778 |
b90f6d3d8627004bd32a830d8f8e54420beaa4d4 | 217 | py | Python | src/saml2/profile/samlec.py | skanct/pysaml2 | 0c1e26a6dd8759962857a30ebd67f63fe9e881ee | [
"Apache-2.0"
] | 5,079 | 2015-01-01T03:39:46.000Z | 2022-03-31T07:38:22.000Z | src/saml2/profile/samlec.py | skanct/pysaml2 | 0c1e26a6dd8759962857a30ebd67f63fe9e881ee | [
"Apache-2.0"
] | 1,623 | 2015-01-01T08:06:24.000Z | 2022-03-30T19:48:52.000Z | src/saml2/profile/samlec.py | skanct/pysaml2 | 0c1e26a6dd8759962857a30ebd67f63fe9e881ee | [
"Apache-2.0"
] | 2,033 | 2015-01-04T07:18:02.000Z | 2022-03-28T19:55:47.000Z | from saml2 import SamlBase
NAMESPACE = 'urn:ietf:params:xml:ns:samlec'
class GeneratedKey(SamlBase):
c_tag = 'GeneratedKey'
c_namespace = NAMESPACE
ELEMENT_BY_TAG = {
'GeneratedKey': GeneratedKey,
}
| 14.466667 | 43 | 0.718894 |
2450114b0e61dcd27df850da14fe58d0e68c4a21 | 2,959 | py | Python | src/chatbot/chatbot.py | PYTHONBOY/carhood-garage-chatbot | bfa1dfd8ddfaa6bdc847861fa72fcb60a5a3defd | [
"Unlicense",
"MIT"
] | null | null | null | src/chatbot/chatbot.py | PYTHONBOY/carhood-garage-chatbot | bfa1dfd8ddfaa6bdc847861fa72fcb60a5a3defd | [
"Unlicense",
"MIT"
] | null | null | null | src/chatbot/chatbot.py | PYTHONBOY/carhood-garage-chatbot | bfa1dfd8ddfaa6bdc847861fa72fcb60a5a3defd | [
"Unlicense",
"MIT"
] | null | null | null |
#Meet Robo: your friend
#import necessary libraries
import io
import random
import string # to process standard python strings
import warnings
import numpy as np
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.metrics.pairwise import cosine_similarity
import warnings
warnings.filterwarnings('... | 31.478723 | 105 | 0.690098 |
378c63eddf7e07f5b65538e9e858f1d56951a586 | 1,189 | py | Python | src/updatedb.py | 510908220/django-backend-template | 77c6a789e86654885616334b4a3590934026b07e | [
"MIT"
] | 1 | 2017-01-22T09:24:20.000Z | 2017-01-22T09:24:20.000Z | src/updatedb.py | 510908220/django-backend-template | 77c6a789e86654885616334b4a3590934026b07e | [
"MIT"
] | null | null | null | src/updatedb.py | 510908220/django-backend-template | 77c6a789e86654885616334b4a3590934026b07e | [
"MIT"
] | null | null | null | # -*- encoding: utf-8 -*-
"""
业务监控升级脚本
"""
import subprocess
import os
import MySQLdb
import time
import traceback
import stat
ROOT_DIR = os.path.abspath(os.path.dirname(__file__))
def wait_db_ok():
def test_db():
db = MySQLdb.connect("db","root",os.environ['DB_PASSWORD'],os.environ['DB_NAME'] )
... | 22.433962 | 90 | 0.618167 |
3a1c3a1cb678c56447f8b21bdd262bde1a3d8f0f | 1,416 | py | Python | summarizer/sentence_handler.py | FrontMage/bert-extractive-summarizer | 317da7c92c33ed103d7e2e4a35ef10538ce034d6 | [
"MIT"
] | null | null | null | summarizer/sentence_handler.py | FrontMage/bert-extractive-summarizer | 317da7c92c33ed103d7e2e4a35ef10538ce034d6 | [
"MIT"
] | null | null | null | summarizer/sentence_handler.py | FrontMage/bert-extractive-summarizer | 317da7c92c33ed103d7e2e4a35ef10538ce034d6 | [
"MIT"
] | 1 | 2021-06-05T19:10:44.000Z | 2021-06-05T19:10:44.000Z | from typing import List
from spacy.lang.zh import Chinese
class SentenceHandler(object):
def __init__(self, language=Chinese):
self.nlp = language()
try:
self.nlp.add_pipe(self.nlp.create_pipe('sentencizer'))
self.is_spacy_3 = False
except:
self.nlp.ad... | 32.181818 | 92 | 0.605226 |
216b40f57de57ce47aabf8e82042a38dd81901f1 | 192 | py | Python | Python2 Tutorials/pythonIntermediateTutorial/Tutorial6 - Modulating/package/subpackage/__init__.py | DrapsTV/DrapsTV_Materials | 1aee31df2d622a312b0d3f4eb2d29080a8043828 | [
"MIT"
] | 20 | 2016-06-16T12:05:45.000Z | 2020-11-25T06:31:53.000Z | Python3 Tutorials/python3IntermediateTutorial/Tutorial6 - Modulating/package/subpackage/__init__.py | AyushLalShrestha/DrapsTV_Materials | 1aee31df2d622a312b0d3f4eb2d29080a8043828 | [
"MIT"
] | null | null | null | Python3 Tutorials/python3IntermediateTutorial/Tutorial6 - Modulating/package/subpackage/__init__.py | AyushLalShrestha/DrapsTV_Materials | 1aee31df2d622a312b0d3f4eb2d29080a8043828 | [
"MIT"
] | 22 | 2016-05-02T10:16:17.000Z | 2020-12-30T13:02:25.000Z | # This initalizes the subpackage folder.
# the __all__ special variable indicates what modules to load then the * star
# is used for importing.
__all__ = ['mySubModule', 'myOtherSubModule']
| 27.428571 | 77 | 0.765625 |
8d480c37c53a201107eb76160984d7c3ec3f1d35 | 1,741 | py | Python | docs/examples/qc_set_next_step.py | AvroNelson/s4-clarity-lib | af6f2ec77cdb7f942f5ea3990a61950aa2a1b3a4 | [
"MIT"
] | 11 | 2019-04-11T16:29:36.000Z | 2022-01-31T18:32:27.000Z | docs/examples/qc_set_next_step.py | AvroNelson/s4-clarity-lib | af6f2ec77cdb7f942f5ea3990a61950aa2a1b3a4 | [
"MIT"
] | 9 | 2019-04-13T17:08:39.000Z | 2021-12-07T23:31:01.000Z | docs/examples/qc_set_next_step.py | AvroNelson/s4-clarity-lib | af6f2ec77cdb7f942f5ea3990a61950aa2a1b3a4 | [
"MIT"
] | 10 | 2019-04-13T14:29:43.000Z | 2021-04-01T01:35:51.000Z | # Copyright 2019 Semaphore Solutions, Inc.
# ---------------------------------------------------------------------------
import logging
from s4.clarity.artifact import Artifact
from s4.clarity.scripts import TriggeredStepEPP
log = logging.getLogger(__name__)
class QCSetNextStep(TriggeredStepEPP):
def should_r... | 32.240741 | 114 | 0.622631 |
f8f1af4c3da51ca5fcaf5a216c48ebd573192679 | 3,586 | py | Python | pandas/tests/arrays/boolean/test_arithmetic.py | k-fillmore/pandas | 67d4cae17bec45e84b9cf51bcf4fb5bbe293b26f | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 28,899 | 2016-10-13T03:32:12.000Z | 2022-03-31T21:39:05.000Z | pandas/tests/arrays/boolean/test_arithmetic.py | k-fillmore/pandas | 67d4cae17bec45e84b9cf51bcf4fb5bbe293b26f | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 31,004 | 2016-10-12T23:22:27.000Z | 2022-03-31T23:17:38.000Z | pandas/tests/arrays/boolean/test_arithmetic.py | k-fillmore/pandas | 67d4cae17bec45e84b9cf51bcf4fb5bbe293b26f | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 15,149 | 2016-10-13T03:21:31.000Z | 2022-03-31T18:46:47.000Z | import operator
import numpy as np
import pytest
import pandas as pd
import pandas._testing as tm
from pandas.arrays import FloatingArray
@pytest.fixture
def data():
return pd.array(
[True, False] * 4 + [np.nan] + [True, False] * 44 + [np.nan] + [True, False],
dtype="boolean",
)
@pytest.fi... | 29.393443 | 88 | 0.607641 |
3ee3d28b59182aec404758656033a51d13bede2a | 6,833 | py | Python | worldview.py | Berserker66/omnitool | 6bf88ba86a7c68a968f8c8db569b57e6ba836e8e | [
"MIT"
] | 40 | 2015-03-15T14:38:24.000Z | 2021-12-18T04:30:39.000Z | worldview.py | Berserker66/omnitool | 6bf88ba86a7c68a968f8c8db569b57e6ba836e8e | [
"MIT"
] | 31 | 2015-03-14T12:12:14.000Z | 2022-02-27T17:50:56.000Z | worldview.py | Berserker66/omnitool | 6bf88ba86a7c68a968f8c8db569b57e6ba836e8e | [
"MIT"
] | 13 | 2015-07-31T11:40:41.000Z | 2021-04-09T14:36:07.000Z | from __future__ import with_statement
import time
import sys
from multiprocessing import *
from tlib import get_tile_buffered
from tinterface import get_header, get_pointers
is_exe = hasattr(sys, "frozen")
try:
import pygame._view
except ImportError:
pass
try:
import pygame
except:
raise RuntimeError... | 35.041026 | 116 | 0.480755 |
8f14569c2661671486a7626e3f7326bf77796283 | 541 | py | Python | gui/build/bdist.win32/python2.7-standalone/app/temp/wx/_misc_.py | stvnrhodes/CNCAirbrush | 9ad9721573130d601276ca9f0447132fd8cdde90 | [
"MIT"
] | 1 | 2018-06-20T07:30:12.000Z | 2018-06-20T07:30:12.000Z | gui/build/bdist.win32/python2.7-standalone/app/temp/wx/_misc_.py | stvnrhodes/CNCAirbrush | 9ad9721573130d601276ca9f0447132fd8cdde90 | [
"MIT"
] | null | null | null | gui/build/bdist.win32/python2.7-standalone/app/temp/wx/_misc_.py | stvnrhodes/CNCAirbrush | 9ad9721573130d601276ca9f0447132fd8cdde90 | [
"MIT"
] | null | null | null |
def __load():
import imp, os, sys
ext = 'wx\\_misc_.pyd'
for path in sys.path:
if not path.endswith('lib-dynload'):
continue
ext = os.path.join(path, ext)
if os.path.exists(ext):
#print "py2app extension module", __name__, "->", ext
mod = imp.load... | 27.05 | 65 | 0.543438 |
67f68b4c400a701ecf98158ba429403cdac38134 | 14,343 | py | Python | dialogflow_ros/dialogflow_client.py | hypothe/dialogflow_ros | 9e804acf31c384286ebf15e666a952740e2341d9 | [
"MIT"
] | null | null | null | dialogflow_ros/dialogflow_client.py | hypothe/dialogflow_ros | 9e804acf31c384286ebf15e666a952740e2341d9 | [
"MIT"
] | null | null | null | dialogflow_ros/dialogflow_client.py | hypothe/dialogflow_ros | 9e804acf31c384286ebf15e666a952740e2341d9 | [
"MIT"
] | 2 | 2021-09-09T07:33:27.000Z | 2021-09-09T07:37:28.000Z | #!/usr/bin/env python
# Dialogflow
import dialogflow_v2beta1
from dialogflow_v2beta1.types import Context, EventInput, InputAudioConfig, \
OutputAudioConfig, QueryInput, QueryParameters, \
StreamingDetectIntentRequest, TextInput
from dialogflow_v2beta1.gapic.enums import AudioEncoding, OutputAudioEncoding
impo... | 40.631728 | 93 | 0.604894 |
73bfb5a327909f46039ad5066a57b6c22f8ab5d3 | 1,314 | py | Python | container/web/rest_api.py | pureelk/pureelk | cd4bbc369379da4b8dcf42d20e26f31c3314b170 | [
"Apache-2.0"
] | 14 | 2015-10-15T21:57:17.000Z | 2018-04-13T23:30:16.000Z | container/web/rest_api.py | gary-yang/PureElk | e87fdb58c29ad406b089226ca65a65ba1b4fb0eb | [
"Apache-2.0"
] | 9 | 2016-03-01T21:40:59.000Z | 2017-01-30T20:00:47.000Z | container/web/rest_api.py | gary-yang/PureElk | e87fdb58c29ad406b089226ca65a65ba1b4fb0eb | [
"Apache-2.0"
] | 11 | 2015-09-24T14:48:16.000Z | 2019-03-08T15:36:52.000Z | import flask
from flask import request, make_response, current_app
from errorcodes import ErrorCodes
import json
from functools import wraps
def rest_api(f):
"""
A decorator for rest API
:param f:
:return:
"""
@wraps(f)
def decorator(*args, **kwargs):
json_object = None
i... | 26.816327 | 109 | 0.622527 |
af9faf21b79e0c8973f7dc742f7fec3f230fb0eb | 6,954 | py | Python | homeassistant/components/nanoleaf/light.py | JeffersonBledsoe/core | 3825f80a2dd087ae70654079cd9f3071289b8423 | [
"Apache-2.0"
] | 3 | 2021-11-05T13:24:19.000Z | 2022-01-08T12:17:09.000Z | homeassistant/components/nanoleaf/light.py | JeffersonBledsoe/core | 3825f80a2dd087ae70654079cd9f3071289b8423 | [
"Apache-2.0"
] | 87 | 2020-07-06T22:22:54.000Z | 2022-03-31T06:01:46.000Z | homeassistant/components/nanoleaf/light.py | JeffersonBledsoe/core | 3825f80a2dd087ae70654079cd9f3071289b8423 | [
"Apache-2.0"
] | 3 | 2021-05-31T15:32:08.000Z | 2021-08-10T22:08:42.000Z | """Support for Nanoleaf Lights."""
from __future__ import annotations
import logging
import math
from typing import Any
from aionanoleaf import Nanoleaf, Unavailable
import voluptuous as vol
from homeassistant.components.light import (
ATTR_BRIGHTNESS,
ATTR_COLOR_TEMP,
ATTR_EFFECT,
ATTR_HS_COLOR,
... | 34.77 | 88 | 0.658326 |
70629854deac753fafb41a0850d3fefc2764edf2 | 1,332 | py | Python | homeassistant/components/devolo_home_control/devolo_multi_level_switch.py | csseal/core | 5802d65ef71697e6627b82e1677894d13d0f16d7 | [
"Apache-2.0"
] | 6 | 2016-11-25T06:36:27.000Z | 2021-11-16T11:20:23.000Z | homeassistant/components/devolo_home_control/devolo_multi_level_switch.py | SicAriuSx83/core | 162c39258e68ae42fe4e1560ae91ed54f5662409 | [
"Apache-2.0"
] | 45 | 2020-07-23T07:13:34.000Z | 2022-03-31T06:01:55.000Z | homeassistant/components/devolo_home_control/devolo_multi_level_switch.py | SicAriuSx83/core | 162c39258e68ae42fe4e1560ae91ed54f5662409 | [
"Apache-2.0"
] | 2 | 2020-05-11T00:38:26.000Z | 2021-01-15T13:23:44.000Z | """Base class for multi level switches in devolo Home Control."""
import logging
from .devolo_device import DevoloDeviceEntity
_LOGGER = logging.getLogger(__name__)
class DevoloMultiLevelSwitchDeviceEntity(DevoloDeviceEntity):
"""Representation of a multi level switch device within devolo Home Control. Somethin... | 37 | 124 | 0.683183 |
7e02c097c79d1ccffbd9bb3129c8c9d831a01316 | 848 | py | Python | dectauth/urls.py | stefanw/eventphoauth | bd5678297e998bc4c16892aeff0ce712925f073b | [
"MIT"
] | 2 | 2019-08-25T15:18:11.000Z | 2019-09-06T19:51:10.000Z | dectauth/urls.py | stefanw/eventphoauth | bd5678297e998bc4c16892aeff0ce712925f073b | [
"MIT"
] | null | null | null | dectauth/urls.py | stefanw/eventphoauth | bd5678297e998bc4c16892aeff0ce712925f073b | [
"MIT"
] | null | null | null | from django.conf.urls import url
from oauth2_provider.views import (
AuthorizationView, TokenView,
)
from .api_views import ProfileView
from .views import start, challenge
from .callout_views import challenge_voice_response, challenge_gather_input
app_name = 'dectauth'
urlpatterns = [
url(r'^$', start, name=... | 35.333333 | 80 | 0.692217 |
2ae2c4adae2c9b8eb32c1ef29941cc19d45e5e1d | 498 | py | Python | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2017_06_01/version.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 4 | 2016-06-17T23:25:29.000Z | 2022-03-30T22:37:45.000Z | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2017_06_01/version.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 226 | 2019-07-24T07:57:21.000Z | 2019-10-15T01:07:24.000Z | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2017_06_01/version.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 3 | 2016-05-03T20:49:46.000Z | 2017-10-05T21:05:27.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 35.571429 | 76 | 0.524096 |
1d29d126f1a167d3ba2539b7d84fd1229213fdfe | 103 | py | Python | DeepRTS/__init__.py | Yigit-Arisoy/deep-rts | a5ed2c29b76789830df9f7075480c7229ccf0f4d | [
"MIT"
] | null | null | null | DeepRTS/__init__.py | Yigit-Arisoy/deep-rts | a5ed2c29b76789830df9f7075480c7229ccf0f4d | [
"MIT"
] | null | null | null | DeepRTS/__init__.py | Yigit-Arisoy/deep-rts | a5ed2c29b76789830df9f7075480c7229ccf0f4d | [
"MIT"
] | null | null | null | try:
from DeepRTS import Engine
except ImportError:
import Engine
from DeepRTS import python
| 12.875 | 30 | 0.757282 |
6b8de90a198da52445bd6fea40e2ccf6ca24edd6 | 2,143 | py | Python | token/ERC20/ERC20.q.py | ghiliweld/Quetz | 50d052779e67e7bf9457e565b011cc7287863576 | [
"MIT"
] | 3 | 2018-01-22T01:52:53.000Z | 2018-01-26T09:31:04.000Z | token/ERC20/ERC20.q.py | ghiliweld/Quetz | 50d052779e67e7bf9457e565b011cc7287863576 | [
"MIT"
] | 1 | 2018-01-25T02:58:16.000Z | 2018-01-25T02:58:16.000Z | token/ERC20/ERC20.q.py | ghiliweld/Quetz | 50d052779e67e7bf9457e565b011cc7287863576 | [
"MIT"
] | null | null | null | Contract: ERC20
QZ: 0.0.1 # Quetz compiler version, will be important in case the standard changes as time goes on
# Hashtags are used for commenting
# Events of the token.
Event: Transfer logs a from{address}, a to{address}, a value{num}
# Variables of the token.
# Watch how variables are declared
# _variableName_... | 46.586957 | 166 | 0.761549 |
4e8263674995b3d652c2907e0b107740d1a423fb | 562 | py | Python | music/migrations/0015_auto_20200127_1203.py | realsifocopypaste333/sifo-player-binary | fc4f9f9534a2ea64b09b3b4ba51832d3823c3b64 | [
"MIT"
] | 3 | 2020-02-08T16:55:03.000Z | 2021-03-28T06:37:10.000Z | music/migrations/0015_auto_20200127_1203.py | AshkanGanj/Music-django-app | 64d9c6557bc9bba212c828f8ca06fbdede38780f | [
"MIT"
] | 1 | 2021-11-27T03:35:11.000Z | 2021-11-27T03:35:11.000Z | music/migrations/0015_auto_20200127_1203.py | AshkanGanj/Music-django-app | 64d9c6557bc9bba212c828f8ca06fbdede38780f | [
"MIT"
] | null | null | null | # Generated by Django 3.0.2 on 2020-01-27 08:33
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('music', '0014_auto_20200113_1100'),
]
operations = [
migrations.RemoveField(
model_name='song',
name='is_favorite',
... | 24.434783 | 118 | 0.581851 |
639188b3e8e69e379d0d834b6bf5ffaa8fd7bc1e | 5,122 | py | Python | frappe/website/utils.py | gangadhar-kadam/helpdesk-frappe | d50cc423258401ddcc89fb6607d11e5bb6ad8c25 | [
"MIT"
] | null | null | null | frappe/website/utils.py | gangadhar-kadam/helpdesk-frappe | d50cc423258401ddcc89fb6607d11e5bb6ad8c25 | [
"MIT"
] | null | null | null | frappe/website/utils.py | gangadhar-kadam/helpdesk-frappe | d50cc423258401ddcc89fb6607d11e5bb6ad8c25 | [
"MIT"
] | 1 | 2018-03-21T19:27:17.000Z | 2018-03-21T19:27:17.000Z | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import frappe, re, os
def delete_page_cache(path):
cache = frappe.cache()
groups = ("page_context", "website_page", "sitemap_options")
if path:
for name in groups:
cache.... | 25.738693 | 104 | 0.671417 |
68beb4211e37917caf2c613ece89fd1790e86701 | 1,560 | py | Python | app/fields.py | galyeshua/Index | 96e1630efc51d2c03f2d80889dfa1d117155e2ee | [
"MIT"
] | null | null | null | app/fields.py | galyeshua/Index | 96e1630efc51d2c03f2d80889dfa1d117155e2ee | [
"MIT"
] | null | null | null | app/fields.py | galyeshua/Index | 96e1630efc51d2c03f2d80889dfa1d117155e2ee | [
"MIT"
] | null | null | null | from wtforms import FieldList
from wtforms.utils import unset_value
# override process func of FieldList to make it unordered
class UnorderedFieldList(FieldList):
def process(self, formdata, data=unset_value, extra_filters=None):
if extra_filters:
raise TypeError(
"FieldList do... | 30.588235 | 89 | 0.557051 |
eff5d765fe0855b9e2d3d1f90bd49b4d4ceb206c | 445 | py | Python | pywttr_models/vi.py | monosans/pywttr-models | da0b257b720b9604d0ed3db68e4f93c9b69e573c | [
"MIT"
] | 4 | 2021-12-13T04:56:16.000Z | 2021-12-25T11:40:29.000Z | pywttr_models/vi.py | monosans/pywttr-models | da0b257b720b9604d0ed3db68e4f93c9b69e573c | [
"MIT"
] | null | null | null | pywttr_models/vi.py | monosans/pywttr-models | da0b257b720b9604d0ed3db68e4f93c9b69e573c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from typing import List as _List
from pywttr_models import base as _base
class CurrentConditionItem(_base.CurrentConditionItem):
lang_vi: _List[_base.LangItem]
class HourlyItem(_base.HourlyItem):
lang_vi: _List[_base.LangItem]
class WeatherItem(_base.WeatherItem):
hourly: _Lis... | 20.227273 | 55 | 0.761798 |
b1f33cd1b32e0700f4e51cf182ed80e0455b8dd4 | 1,584 | py | Python | Examples/GraphOperator/Ising/ising.py | tvieijra/netket | ef3ff32b242f25b6a6ae0f08db1aada85775a2ea | [
"Apache-2.0"
] | 10 | 2019-11-29T02:51:53.000Z | 2021-08-14T18:52:33.000Z | Examples/GraphOperator/Ising/ising.py | tvieijra/netket | ef3ff32b242f25b6a6ae0f08db1aada85775a2ea | [
"Apache-2.0"
] | 2 | 2018-11-04T14:38:01.000Z | 2018-11-08T16:56:10.000Z | Examples/GraphOperator/Ising/ising.py | tvieijra/netket | ef3ff32b242f25b6a6ae0f08db1aada85775a2ea | [
"Apache-2.0"
] | 6 | 2019-12-02T07:29:01.000Z | 2021-04-04T21:55:21.000Z | # Copyright 2018 The Simons Foundation, Inc. - All Rights Reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by appli... | 27.310345 | 80 | 0.737374 |
343629237d655fae627ea5d747d8381314f484ef | 1,226 | py | Python | code/phase_plot.py | jstac/cycles_moral_hazard | ff4881b8b27f6738edfc526ead98579bc801c834 | [
"BSD-3-Clause"
] | 2 | 2018-01-29T19:39:14.000Z | 2018-08-24T03:36:25.000Z | code/phase_plot.py | jstac/cycles_moral_hazard | ff4881b8b27f6738edfc526ead98579bc801c834 | [
"BSD-3-Clause"
] | null | null | null | code/phase_plot.py | jstac/cycles_moral_hazard | ff4881b8b27f6738edfc526ead98579bc801c834 | [
"BSD-3-Clause"
] | 3 | 2018-04-14T19:33:56.000Z | 2019-12-27T17:24:55.000Z |
import numpy as np
def phase_plot(ax, g, h, xmin, xmax, ymin, ymax, gridsize=100):
"""
Plots the phase diagram for the system x' = g(x,y), y' = h(x,y)
over the square [xmin, xmax] times [ymin, ymax].
"""
ax.set_xlim(xmin, xmax)
ax.set_ylim(ymin, ymax)
delta_g = np.vectorize(lambda x, y: ... | 28.511628 | 67 | 0.519576 |
081c4869991b6c5d68bb10453d44fae6204dfd56 | 2,864 | py | Python | python/moneysocket/protocol/rendezvous/incoming_nexus.py | drschwabe/prototype | 7948727443d5d3255b317fc94cebf03c128a58d3 | [
"MIT"
] | null | null | null | python/moneysocket/protocol/rendezvous/incoming_nexus.py | drschwabe/prototype | 7948727443d5d3255b317fc94cebf03c128a58d3 | [
"MIT"
] | null | null | null | python/moneysocket/protocol/rendezvous/incoming_nexus.py | drschwabe/prototype | 7948727443d5d3255b317fc94cebf03c128a58d3 | [
"MIT"
] | null | null | null | # Copyright (c) 2020 Jarret Dyrbye
# Distributed under the MIT software license, see the accompanying
# file LICENSE or http://www.opensource.org/licenses/mit-license.php
import uuid
import logging
from moneysocket.protocol.nexus import ProtocolNexus
from moneysocket.message.notification.rendezvous import NotifyRend... | 36.717949 | 79 | 0.644204 |
369898f8e42e30bf1d9593aa89bb902de60445ae | 3,526 | py | Python | dtx/notify.py | qzed/linux-surfacegen5-dtx-daemon | 1b48933a4e8666d8b63b9e4f7a314d4a9bd7c8f8 | [
"MIT"
] | 1 | 2019-03-22T19:47:14.000Z | 2019-03-22T19:47:14.000Z | dtx/notify.py | qzed/linux-surfacegen5-dtx-daemon | 1b48933a4e8666d8b63b9e4f7a314d4a9bd7c8f8 | [
"MIT"
] | 2 | 2019-04-08T01:19:44.000Z | 2019-04-20T19:50:53.000Z | dtx/notify.py | qzed/linux-surfacegen5-dtx-daemon | 1b48933a4e8666d8b63b9e4f7a314d4a9bd7c8f8 | [
"MIT"
] | null | null | null | """
dBus System Notifications.
Allows processes running as root to send notifications to all users.
"""
import dbus
import os
def get_user_paths(bus, clss='user'):
"""Get all dBus `User` object paths of class `clss`."""
user_paths = set()
logind = bus.get_object('org.freedesktop.login1', '/org/freedesk... | 31.20354 | 100 | 0.64776 |
aa49033fcca30e24e21386a120abea03161c5942 | 1,129 | py | Python | json_2_yolo.py | souvik0306/auairdataset | 1f9a5fc4835feb49acf8df34b97f0348bdacf910 | [
"MIT"
] | null | null | null | json_2_yolo.py | souvik0306/auairdataset | 1f9a5fc4835feb49acf8df34b97f0348bdacf910 | [
"MIT"
] | null | null | null | json_2_yolo.py | souvik0306/auairdataset | 1f9a5fc4835feb49acf8df34b97f0348bdacf910 | [
"MIT"
] | null | null | null | # This script can convert your AU-AIR annotations to YOLO Format
import json
data = open(r'annotations.json') #Pass in the path for AU-AIR annotation file
ann_file = json.load(data)
ann_list = ann_file['annotations']
b = [i.get('bbox') for i in ann_list] #b is a list which contains the bbox parameters for YOLO Conversi... | 33.205882 | 105 | 0.585474 |
cad446320eae72fe9dfb800dd34ee6d9e2c314c2 | 391 | py | Python | python/python-algorithm-intervew/23-dynamic-programing/85-fibonacci-number-2.py | bum12ark/algorithm | b6e262b0c29a8b5fb551db5a177a40feebc411b4 | [
"MIT"
] | 1 | 2022-03-06T03:49:31.000Z | 2022-03-06T03:49:31.000Z | python/python-algorithm-intervew/23-dynamic-programing/85-fibonacci-number-2.py | bum12ark/algorithm | b6e262b0c29a8b5fb551db5a177a40feebc411b4 | [
"MIT"
] | null | null | null | python/python-algorithm-intervew/23-dynamic-programing/85-fibonacci-number-2.py | bum12ark/algorithm | b6e262b0c29a8b5fb551db5a177a40feebc411b4 | [
"MIT"
] | null | null | null | """
* 피보나치 수
피보나치 수를 구하라.
"""
import collections
class Solution:
dp = collections.defaultdict(int)
# 메모이제이션 (하향식)
def fib(self, n: int) -> int:
if n <= 1:
return n
if self.dp[n]:
return self.dp[n]
self.dp[n] = self.fib(n - 1) + self.fib(n - 2)
retu... | 17 | 54 | 0.519182 |
2774d1cd1ccd3c0b1e9083cb6784afa7c6243496 | 11,087 | py | Python | source/astroNS/astroNS.py | pyastroNS/astroNS | 35687267179467e4cb7ea59ac119c5f0f182107f | [
"MIT"
] | null | null | null | source/astroNS/astroNS.py | pyastroNS/astroNS | 35687267179467e4cb7ea59ac119c5f0f182107f | [
"MIT"
] | null | null | null | source/astroNS/astroNS.py | pyastroNS/astroNS | 35687267179467e4cb7ea59ac119c5f0f182107f | [
"MIT"
] | null | null | null | #! /usr/bin/env python3
"""
astroNS simulator
"""
import simpy
import argparse
import pandas as pd
import datetime
import pytz
import random
import uuid
import os
import sys
import json
from multiprocessing import Queue, Process
from collections import namedtuple
from contextlib import redirect_stdout
from typing ... | 29.884097 | 160 | 0.634617 |
46036e877174ef89ec2bedc6c9e54f20b059e5e2 | 11,982 | py | Python | tests/test_graphql.py | ammogcoder/saleor | e4160652b68de002b51708a775050c95bfd1a3a5 | [
"BSD-3-Clause"
] | null | null | null | tests/test_graphql.py | ammogcoder/saleor | e4160652b68de002b51708a775050c95bfd1a3a5 | [
"BSD-3-Clause"
] | 1 | 2022-02-10T12:53:30.000Z | 2022-02-10T12:53:30.000Z | tests/test_graphql.py | ammogcoder/saleor | e4160652b68de002b51708a775050c95bfd1a3a5 | [
"BSD-3-Clause"
] | 1 | 2020-04-15T08:36:47.000Z | 2020-04-15T08:36:47.000Z | import json
import graphene
import pytest
from django.shortcuts import reverse
from saleor.product.models import Category, Product, ProductAttribute
from .utils import get_graphql_content
def test_category_query(client, product_in_stock):
category = Category.objects.first()
query = '''
query {
... | 28.393365 | 138 | 0.485144 |
df2e1558ca112a954b404856950bfe5297402869 | 7,436 | py | Python | gpvdm_gui/gui/gl_mesh.py | roderickmackenzie/gpvdm | 914fd2ee93e7202339853acaec1d61d59b789987 | [
"BSD-3-Clause"
] | 12 | 2016-09-13T08:58:13.000Z | 2022-01-17T07:04:52.000Z | gpvdm_gui/gui/gl_mesh.py | roderickmackenzie/gpvdm | 914fd2ee93e7202339853acaec1d61d59b789987 | [
"BSD-3-Clause"
] | 3 | 2017-11-11T12:33:02.000Z | 2019-03-08T00:48:08.000Z | gpvdm_gui/gui/gl_mesh.py | roderickmackenzie/gpvdm | 914fd2ee93e7202339853acaec1d61d59b789987 | [
"BSD-3-Clause"
] | 6 | 2019-01-03T06:17:12.000Z | 2022-01-01T15:59:00.000Z | #
# General-purpose Photovoltaic Device Model - a drift diffusion base/Shockley-Read-Hall
# model for 1st, 2nd and 3rd generation solar cells.
# Copyright (C) 2008-2022 Roderick C. I. MacKenzie r.c.i.mackenzie at googlemail.com
#
# https://www.gpvdm.com
#
# This program is free software; you can redist... | 24.142857 | 112 | 0.666891 |
daecbcc325dd2460b18cdc548a030152904b1bae | 3,295 | py | Python | opentech/apply/funds/management/commands/migrate_fellowship_proposals.py | JakabGy/hypha | 32634080ba1cb369f07f27f6616041e4eca8dbf2 | [
"BSD-3-Clause"
] | null | null | null | opentech/apply/funds/management/commands/migrate_fellowship_proposals.py | JakabGy/hypha | 32634080ba1cb369f07f27f6616041e4eca8dbf2 | [
"BSD-3-Clause"
] | null | null | null | opentech/apply/funds/management/commands/migrate_fellowship_proposals.py | JakabGy/hypha | 32634080ba1cb369f07f27f6616041e4eca8dbf2 | [
"BSD-3-Clause"
] | null | null | null | from opentech.apply.funds.management.commands.migration_base import MigrateCommand
class Command(MigrateCommand):
CONTENT_TYPE = "fund"
FUND_NAME = "Fellowship (archive fund)"
ROUND_NAME = "Fellowship (archive round)"
APPLICATION_TYPE = "proposal"
STREAMFIELD_MAP = {
"title": {
... | 40.679012 | 173 | 0.579059 |
804cd0c6674e7b320e0e78c5fa8f8cedf105514a | 1,872 | py | Python | setup.py | benevpi/CIRCUITPYTHON_ifttt | ec8851c16b2a3bacde02654a104842b6bc1fe3ed | [
"MIT"
] | null | null | null | setup.py | benevpi/CIRCUITPYTHON_ifttt | ec8851c16b2a3bacde02654a104842b6bc1fe3ed | [
"MIT"
] | null | null | null | setup.py | benevpi/CIRCUITPYTHON_ifttt | ec8851c16b2a3bacde02654a104842b6bc1fe3ed | [
"MIT"
] | 1 | 2020-12-07T13:35:40.000Z | 2020-12-07T13:35:40.000Z | """A setuptools based setup module.
See:
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
# Get the lon... | 29.25 | 72 | 0.674145 |
90873cb905284fd68f19e61070028890ef086897 | 23,972 | py | Python | mediagoblin/tests/test_api.py | saksham1115/mediagoblin | 41302ad2b622b340caeb13339338ab3a5d0f7e6b | [
"CC0-1.0"
] | null | null | null | mediagoblin/tests/test_api.py | saksham1115/mediagoblin | 41302ad2b622b340caeb13339338ab3a5d0f7e6b | [
"CC0-1.0"
] | null | null | null | mediagoblin/tests/test_api.py | saksham1115/mediagoblin | 41302ad2b622b340caeb13339338ab3a5d0f7e6b | [
"CC0-1.0"
] | null | null | null | # GNU MediaGoblin -- federated, autonomous media hosting
# Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either versio... | 35.886228 | 93 | 0.584766 |
4a3648742bf60264b163a477fc1b74b0c0dc8e60 | 4,516 | py | Python | benchmark/startQiskit1802.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startQiskit1802.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startQiskit1802.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=5
# total number=60
import cirq
import qiskit
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister
from qiskit import BasicAer, execute, transpile
from pprint import pprint
from qiskit.test.mock import FakeVigo
from math import log2,floor, sqrt, pi
import numpy as np
import networkx as ... | 32.489209 | 82 | 0.614925 |
613e5a61b14f569b04c926da6c8a8dca3dd36e2b | 2,569 | py | Python | src/deduplicate.py | hiyoung123/NewWordDetection | 21f685c15ea2e2bb744ba5e8b6ee10bae00e854d | [
"MIT"
] | 6 | 2021-06-24T03:58:32.000Z | 2022-01-21T11:55:36.000Z | src/deduplicate.py | hiyoung123/NewWordDetection | 21f685c15ea2e2bb744ba5e8b6ee10bae00e854d | [
"MIT"
] | null | null | null | src/deduplicate.py | hiyoung123/NewWordDetection | 21f685c15ea2e2bb744ba5e8b6ee10bae00e854d | [
"MIT"
] | 1 | 2021-06-24T05:19:34.000Z | 2021-06-24T05:19:34.000Z | #!usr/bin/env python
#-*- coding:utf-8 -*-
from src.simhash import SimHash
class DuplicateRemove:
def __init__(self, hash_size, block_num, dict_file='../data/dict.txt', stopwords=[]):
self.hash_size = hash_size
self.block_num = block_num
self.block_size = hash_size/block_num
self... | 31.329268 | 89 | 0.591281 |
b942ff3dafb5c886434a478e8bfb0592e83afd1c | 6,215 | bzl | Python | antlir/bzl/image_layer.bzl | zeroxoneb/antlir | 811d88965610d16a5c85d831d317f087797ca732 | [
"MIT"
] | 28 | 2020-08-11T16:22:46.000Z | 2022-03-04T15:41:52.000Z | antlir/bzl/image_layer.bzl | zeroxoneb/antlir | 811d88965610d16a5c85d831d317f087797ca732 | [
"MIT"
] | 137 | 2020-08-11T16:07:49.000Z | 2022-02-27T10:59:05.000Z | antlir/bzl/image_layer.bzl | zeroxoneb/antlir | 811d88965610d16a5c85d831d317f087797ca732 | [
"MIT"
] | 10 | 2020-09-10T00:01:28.000Z | 2022-03-08T18:00:28.000Z | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
"""
An `image.layer` is a set of `feature` with some additional parameters. Its
purpose to materialize those `feature`s as a btrfs subvolume ... | 44.078014 | 79 | 0.740628 |
c1cf6547ed7bfd50ae90d81a89e64888002ed05c | 654 | py | Python | data/transcoder_evaluation_gfg/python/PROGRAM_FOR_FACTORIAL_OF_A_NUMBER_2.py | mxl1n/CodeGen | e5101dd5c5e9c3720c70c80f78b18f13e118335a | [
"MIT"
] | 241 | 2021-07-20T08:35:20.000Z | 2022-03-31T02:39:08.000Z | data/transcoder_evaluation_gfg/python/PROGRAM_FOR_FACTORIAL_OF_A_NUMBER_2.py | mxl1n/CodeGen | e5101dd5c5e9c3720c70c80f78b18f13e118335a | [
"MIT"
] | 49 | 2021-07-22T23:18:42.000Z | 2022-03-24T09:15:26.000Z | data/transcoder_evaluation_gfg/python/PROGRAM_FOR_FACTORIAL_OF_A_NUMBER_2.py | mxl1n/CodeGen | e5101dd5c5e9c3720c70c80f78b18f13e118335a | [
"MIT"
] | 71 | 2021-07-21T05:17:52.000Z | 2022-03-29T23:49:28.000Z | # Copyright (c) 2019-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
#
def f_gold ( n ) :
return 1 if ( n == 1 or n == 0 ) else n * f_gold ( n - 1 )
#TOFILL
if __name__ == '__main__':
para... | 21.8 | 64 | 0.547401 |
d4c01cd0edc8d2153f80658f1a0ab4766c122f46 | 867 | py | Python | other/pom.py | bartekpacia/python-training | 00a1047f70ab44cc5afed8619eb4eac0e406f3e3 | [
"MIT"
] | null | null | null | other/pom.py | bartekpacia/python-training | 00a1047f70ab44cc5afed8619eb4eac0e406f3e3 | [
"MIT"
] | null | null | null | other/pom.py | bartekpacia/python-training | 00a1047f70ab44cc5afed8619eb4eac0e406f3e3 | [
"MIT"
] | null | null | null | t = int(input("podaj t: "))
wszystkie_liczby = []
for i in range(0, t):
liczby = input("podaj A B k: ")
wszystkie_liczby.append(liczby.split())
print(wszystkie_liczby)
for i in range(0, len(wszystkie_liczby)):
A = wszystkie_liczby[i][0]
B = wszystkie_liczby[i][1]
k = int(wszystkie_liczby[i][2])
... | 28.9 | 65 | 0.54902 |
d611b79120e6d156e719663d34b598736a9cef39 | 287 | py | Python | plugins/raid/db/raid.py | dwieland/carnibot | 83d660cac151739b524c6f11e8e7fe0b068869d7 | [
"Apache-2.0"
] | 1 | 2018-08-02T06:27:37.000Z | 2018-08-02T06:27:37.000Z | plugins/raid/db/raid.py | dwieland/carnibot | 83d660cac151739b524c6f11e8e7fe0b068869d7 | [
"Apache-2.0"
] | 4 | 2018-08-02T06:35:07.000Z | 2018-08-02T06:37:14.000Z | plugins/raid/db/raid.py | dwieland/carnibot | 83d660cac151739b524c6f11e8e7fe0b068869d7 | [
"Apache-2.0"
] | null | null | null | from sqlalchemy import Column, Integer, DateTime, String
from plugins.raid.db import Base
class Raid(Base):
__tablename__ = "RAID"
id = Column(Integer, primary_key=True)
date = Column(DateTime, unique=True)
message_id = Column(String(32))
color = Column(Integer)
| 22.076923 | 56 | 0.710801 |
db9083a55bc6370222cc6fbe21804a38add57a37 | 946 | py | Python | pyEpiabm/pyEpiabm/sweep/queue_sweep.py | Saketkr21/epiabm | 3ec0dcbc78d3fd4114ed3c6bdd78ef39f0013d2f | [
"BSD-3-Clause"
] | 11 | 2021-12-02T15:24:02.000Z | 2022-03-10T14:02:13.000Z | pyEpiabm/pyEpiabm/sweep/queue_sweep.py | Saketkr21/epiabm | 3ec0dcbc78d3fd4114ed3c6bdd78ef39f0013d2f | [
"BSD-3-Clause"
] | 119 | 2021-11-24T13:56:48.000Z | 2022-03-30T11:52:07.000Z | pyEpiabm/pyEpiabm/sweep/queue_sweep.py | SABS-R3-Epidemiology/epiabm | 8eb83fd2de84104f6f77929e3771095f7b033ddc | [
"BSD-3-Clause"
] | 3 | 2022-01-13T03:05:19.000Z | 2022-03-11T22:00:17.000Z | #
# Sweeps for enqueued persons to update infection status
#
from pyEpiabm.property import InfectionStatus
from .abstract_sweep import AbstractSweep
class QueueSweep(AbstractSweep):
"""Class to sweep through the enqueued persons
in each cell and update their infection status.
"""
def __call__(self,... | 29.5625 | 77 | 0.627907 |
63c960cd6723083ac7223a2993f19dda5fb19182 | 3,762 | py | Python | data/base_dataset.py | Uha661/instagan | 4b49eb85ee1b0ef9c21ca3187604bf9933e0042b | [
"BSD-3-Clause"
] | null | null | null | data/base_dataset.py | Uha661/instagan | 4b49eb85ee1b0ef9c21ca3187604bf9933e0042b | [
"BSD-3-Clause"
] | null | null | null | data/base_dataset.py | Uha661/instagan | 4b49eb85ee1b0ef9c21ca3187604bf9933e0042b | [
"BSD-3-Clause"
] | null | null | null | import torch.utils.data as data
from PIL import Image
import torchvision.transforms as transforms
class BaseDataset(data.Dataset):
def __init__(self):
super(BaseDataset, self).__init__()
def name(self):
return 'BaseDataset'
@staticmethod
def modify_commandline_options(parser, is_trai... | 34.2 | 91 | 0.639288 |
3a3e3e25b79c4b70a9cf9c813684e40159e3515c | 7,884 | py | Python | models/Strategy.py | Vashiru/pycryptobot | a4cf67cbb7467acc1d4aa7aab17cd65e8dbb80fe | [
"Apache-2.0"
] | 1 | 2021-06-14T18:21:49.000Z | 2021-06-14T18:21:49.000Z | models/Strategy.py | Vashiru/pycryptobot | a4cf67cbb7467acc1d4aa7aab17cd65e8dbb80fe | [
"Apache-2.0"
] | null | null | null | models/Strategy.py | Vashiru/pycryptobot | a4cf67cbb7467acc1d4aa7aab17cd65e8dbb80fe | [
"Apache-2.0"
] | null | null | null | from datetime import datetime
from pandas import DataFrame
from models.PyCryptoBot import PyCryptoBot
from models.AppState import AppState
from models.helper.LogHelper import Logger
class Strategy():
def __init__(self, app: PyCryptoBot=None, state: AppState=AppState, df: DataFrame=DataFrame, iterations: int=0) -> ... | 51.529412 | 209 | 0.622146 |
dcb3a903d6323b772ed3f8765d19bdc1a890ffc4 | 543 | py | Python | phunspell/tests/test__es.py | dvwright/phunspell | 818bbd081f84c570ec304fdc235ca112f9abd869 | [
"MIT"
] | null | null | null | phunspell/tests/test__es.py | dvwright/phunspell | 818bbd081f84c570ec304fdc235ca112f9abd869 | [
"MIT"
] | 1 | 2021-04-19T13:14:24.000Z | 2021-05-16T04:43:24.000Z | phunspell/tests/test__es.py | dvwright/phunspell | 818bbd081f84c570ec304fdc235ca112f9abd869 | [
"MIT"
] | null | null | null | import phunspell
import inspect
import unittest
class TestES(unittest.TestCase):
pspell = phunspell.Phunspell('es')
def test_word_found(self):
self.assertTrue(self.pspell.lookup("pianista"))
def test_word_not_found(self):
self.assertFalse(self.pspell.lookup("phunspell"))
def test_lo... | 22.625 | 65 | 0.674033 |
1abd108bb22953377a0b8bd40f37ac8a5b5f5abf | 3,158 | py | Python | dags/scripts/spark/algorand_price_lin_regression.py | Tcfocus/ml_price_prediction_airflow_pysparkml_emr | 735f4432398c48e1486715bea4eaf7b620dd1298 | [
"Apache-2.0"
] | null | null | null | dags/scripts/spark/algorand_price_lin_regression.py | Tcfocus/ml_price_prediction_airflow_pysparkml_emr | 735f4432398c48e1486715bea4eaf7b620dd1298 | [
"Apache-2.0"
] | null | null | null | dags/scripts/spark/algorand_price_lin_regression.py | Tcfocus/ml_price_prediction_airflow_pysparkml_emr | 735f4432398c48e1486715bea4eaf7b620dd1298 | [
"Apache-2.0"
] | null | null | null | # pyspark
import argparse
from pyspark.sql import SparkSession
from pyspark.sql.functions import *
from pyspark.sql.types import *
from pyspark.ml.feature import VectorAssembler
from pyspark.ml.regression import LinearRegression
from pyspark.sql.window import Window
import pandas as pd
import ta
# function for calcul... | 40.487179 | 120 | 0.722926 |
0e31edc5db0cd67f8a3dd74eecaca5c7baa139e6 | 14,705 | py | Python | bin/automated_detection_testing/ci/detection_testing_batch/modules/validate_args.py | kirtankhatana-crest/security_content | cc63c0d635cb56f4756e209b02e13fd839f1e383 | [
"Apache-2.0"
] | null | null | null | bin/automated_detection_testing/ci/detection_testing_batch/modules/validate_args.py | kirtankhatana-crest/security_content | cc63c0d635cb56f4756e209b02e13fd839f1e383 | [
"Apache-2.0"
] | null | null | null | bin/automated_detection_testing/ci/detection_testing_batch/modules/validate_args.py | kirtankhatana-crest/security_content | cc63c0d635cb56f4756e209b02e13fd839f1e383 | [
"Apache-2.0"
] | 1 | 2022-01-27T05:29:43.000Z | 2022-01-27T05:29:43.000Z | import argparse
import copy
import io
import json
import modules.jsonschema_errorprinter as jsonschema_errorprinter
import sys
from typing import Union
# If we want, we can easily add a description field to any of the objects here!
ES_APP_NAME = "SPLUNK_ES_CONTENT_UPDATE"
setup_schema = {
"type": "object",
"p... | 39.636119 | 207 | 0.521863 |
5c939586932a641c82633706d42d5d43e9f5f1d0 | 37,308 | py | Python | numpy/distutils/fcompiler/__init__.py | numpy/numpy-refactor | 6de313865ec3f49bcdd06ccbc879f27e65acf818 | [
"BSD-3-Clause"
] | 15 | 2015-03-23T09:40:07.000Z | 2020-04-19T15:14:49.000Z | numpy/distutils/fcompiler/__init__.py | numpy/numpy-refactor | 6de313865ec3f49bcdd06ccbc879f27e65acf818 | [
"BSD-3-Clause"
] | 5 | 2016-07-02T15:34:00.000Z | 2020-09-01T06:45:13.000Z | numpy/distutils/fcompiler/__init__.py | numpy/numpy-refactor | 6de313865ec3f49bcdd06ccbc879f27e65acf818 | [
"BSD-3-Clause"
] | 17 | 2015-02-12T21:33:40.000Z | 2021-02-23T06:53:03.000Z | """numpy.distutils.fcompiler
Contains FCompiler, an abstract base class that defines the interface
for the numpy.distutils Fortran compiler abstraction model.
Terminology:
To be consistent, where the term 'executable' is used, it means the single
file, like 'gcc', that is executed, and should be a string. In contras... | 38.701245 | 112 | 0.592715 |
5a34c47c4ada998bb1cd75a98c48136412d8322f | 2,718 | py | Python | PLC/Methods/GetSliceTicket.py | dreibh/planetlab-lxc-plcapi | 065dfc54a2b668e99eab343d113f1a31fb154b13 | [
"BSD-3-Clause"
] | null | null | null | PLC/Methods/GetSliceTicket.py | dreibh/planetlab-lxc-plcapi | 065dfc54a2b668e99eab343d113f1a31fb154b13 | [
"BSD-3-Clause"
] | null | null | null | PLC/Methods/GetSliceTicket.py | dreibh/planetlab-lxc-plcapi | 065dfc54a2b668e99eab343d113f1a31fb154b13 | [
"BSD-3-Clause"
] | null | null | null | import time
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
from PLC.Slices import Slice, Slices
from PLC.Auth import Auth
from PLC.GPG import gpg_sign, gpg_verify
from PLC.InitScripts import InitScript, InitScripts
from PLC.Methods.GetSlivers import get_slivers
clas... | 34.846154 | 105 | 0.632082 |
6a3289f903f123d63fe70c39d4e66eaba78c75a6 | 8,148 | py | Python | python/viz/motifs.py | icdm-extract/extract | 18d6e8509f2f35719535e1de6c88874ec533cfb9 | [
"MIT"
] | 1 | 2019-03-05T01:17:05.000Z | 2019-03-05T01:17:05.000Z | python/viz/motifs.py | icdm-extract/extract | 18d6e8509f2f35719535e1de6c88874ec533cfb9 | [
"MIT"
] | null | null | null | python/viz/motifs.py | icdm-extract/extract | 18d6e8509f2f35719535e1de6c88874ec533cfb9 | [
"MIT"
] | null | null | null | #!/bin/env/python
import numpy as np
import matplotlib.pyplot as plt
from sklearn.decomposition import TruncatedSVD
from ..algo.motif import findMotif, findAllMotifInstances
from ..utils.subseq import simMatFromDistTensor
from viz_utils import plotRect, plotRanges
def findAndPlotMotif(seq, lengths, **kwargs):
moti... | 30.402985 | 87 | 0.695508 |
10aa41e19a171f1a075c8c7ccbde004092fa3e9c | 3,235 | py | Python | validator/schemas/specs.py | ChauffeurPrive/nestor-api | 364b5f034eeb929932a5a8c3f3b00d1275a7ae5b | [
"Apache-2.0"
] | 2 | 2020-08-17T09:59:03.000Z | 2020-08-17T09:59:23.000Z | validator/schemas/specs.py | ChauffeurPrive/nestor-api | 364b5f034eeb929932a5a8c3f3b00d1275a7ae5b | [
"Apache-2.0"
] | 83 | 2020-06-12T14:37:35.000Z | 2022-01-26T14:10:10.000Z | validator/schemas/specs.py | ChauffeurPrive/nestor-api | 364b5f034eeb929932a5a8c3f3b00d1275a7ae5b | [
"Apache-2.0"
] | 1 | 2020-07-02T14:33:45.000Z | 2020-07-02T14:33:45.000Z | """Schemas managed by Nestor"""
SPECS = {
"variables": {
"confSubObjects": {"type": "object", "patternProperties": {"": {"type": "string",},},},
"subObjectSecrets": {
"type": "object",
"patternProperties": {
"": {
"type": "object",
... | 34.414894 | 100 | 0.374652 |
2e9b99a9f3b2a8cc525aa4db5abc3f2b3b943010 | 13,922 | py | Python | waad/utils/indicators.py | ANSSI-FR/WAAD | 276820be3e1aa45c52351b481105ab95a069b3e0 | [
"BSD-2-Clause"
] | 13 | 2021-04-08T15:59:57.000Z | 2022-03-28T14:04:23.000Z | waad/utils/indicators.py | ANSSI-FR/WAAD | 276820be3e1aa45c52351b481105ab95a069b3e0 | [
"BSD-2-Clause"
] | null | null | null | waad/utils/indicators.py | ANSSI-FR/WAAD | 276820be3e1aa45c52351b481105ab95a069b3e0 | [
"BSD-2-Clause"
] | 1 | 2022-03-08T19:50:36.000Z | 2022-03-08T19:50:36.000Z | """This module implements the computation of some indicators on assets."""
import bisect
from datetime import datetime, timedelta
from enum import Enum
from functools import partial
import numpy as np
import pandas as pd
from tqdm import tqdm
from typing import Any, Callable, Dict, List, Optional
from waad.utils.as... | 50.810219 | 171 | 0.690418 |
a4f2d798b1b1b426e04a125f35f8f5ba51c419ad | 23,477 | py | Python | mypy/test/data.py | aghast/mypy | 13ae58ffe8bedb7da9f4c657297f0d61e681d671 | [
"PSF-2.0"
] | 1 | 2021-01-19T09:59:44.000Z | 2021-01-19T09:59:44.000Z | mypy/test/data.py | aghast/mypy | 13ae58ffe8bedb7da9f4c657297f0d61e681d671 | [
"PSF-2.0"
] | 1 | 2020-10-24T15:04:11.000Z | 2020-10-24T15:04:11.000Z | mypy/test/data.py | aghast/mypy | 13ae58ffe8bedb7da9f4c657297f0d61e681d671 | [
"PSF-2.0"
] | 1 | 2020-12-22T10:18:11.000Z | 2020-12-22T10:18:11.000Z | """Utilities for processing .test files containing test case descriptions."""
import os.path
import os
import tempfile
import posixpath
import re
import shutil
from abc import abstractmethod
import sys
import pytest
from typing import List, Tuple, Set, Optional, Iterator, Any, Dict, NamedTuple, Union
from mypy.test.... | 37.988673 | 98 | 0.579972 |
3a425bf3275d325bab05c4e255cdf8dccbba3cb0 | 518 | py | Python | test/test_edit_contact.py | Physic67/python_training | a19206b8dc2fc642f0cd29781eb8431122501630 | [
"Apache-2.0"
] | null | null | null | test/test_edit_contact.py | Physic67/python_training | a19206b8dc2fc642f0cd29781eb8431122501630 | [
"Apache-2.0"
] | null | null | null | test/test_edit_contact.py | Physic67/python_training | a19206b8dc2fc642f0cd29781eb8431122501630 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from model.contact import Contact
def test_edit_first_contact(app):
if app.contact.count() == 0:
app.contact.add_new_contact(Contact(firstname="Edward", middlename="Vampire", lastname="Kallen", address="Forks, Washington", homephone="495-1234567", mobilephone="901-1234567", email="... | 57.555556 | 208 | 0.727799 |
fe7068afc5aec7d30790d1569645ee0bf22a0ebe | 17,651 | py | Python | release/scripts/modules/bl_keymap_utils/keymap_from_toolbar.py | atlantic-crypto/blender | 65fdf6f0ed592082ead87c76ea9be46cd54dba26 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | release/scripts/modules/bl_keymap_utils/keymap_from_toolbar.py | atlantic-crypto/blender | 65fdf6f0ed592082ead87c76ea9be46cd54dba26 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | release/scripts/modules/bl_keymap_utils/keymap_from_toolbar.py | atlantic-crypto/blender | 65fdf6f0ed592082ead87c76ea9be46cd54dba26 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 1 | 2019-10-23T12:02:29.000Z | 2019-10-23T12:02:29.000Z | # ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distrib... | 38.708333 | 111 | 0.560365 |
02007ba86cb5579cf788732d1ea362c37d877f41 | 28 | py | Python | mercadopago/__init__.py | amarisi/sdk-python | c22edfb19a48e0862e4317a34fff919528824546 | [
"MIT"
] | null | null | null | mercadopago/__init__.py | amarisi/sdk-python | c22edfb19a48e0862e4317a34fff919528824546 | [
"MIT"
] | null | null | null | mercadopago/__init__.py | amarisi/sdk-python | c22edfb19a48e0862e4317a34fff919528824546 | [
"MIT"
] | null | null | null | from .mercadopago import MP
| 14 | 27 | 0.821429 |
41675f266c2fac2d598d962d5082d7a9df551ab9 | 942 | py | Python | isi_sdk_8_2_0/test/test_storagepool_nodepools.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 24 | 2018-06-22T14:13:23.000Z | 2022-03-23T01:21:26.000Z | isi_sdk_8_2_0/test/test_storagepool_nodepools.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 46 | 2018-04-30T13:28:22.000Z | 2022-03-21T21:11:07.000Z | isi_sdk_8_2_0/test/test_storagepool_nodepools.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: 7
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import isi_sdk_8_2_0
from i... | 22.97561 | 97 | 0.717622 |
574deb50a852e77e676763ecf9e8b742c4618002 | 4,641 | py | Python | readthedocs/builds/views.py | Hiroshi18/readthedocs.org | 95c00d0adec1b3b935ba49068c89375cc129238e | [
"MIT"
] | 1 | 2021-07-01T01:31:58.000Z | 2021-07-01T01:31:58.000Z | readthedocs/builds/views.py | Hiroshi18/readthedocs.org | 95c00d0adec1b3b935ba49068c89375cc129238e | [
"MIT"
] | null | null | null | readthedocs/builds/views.py | Hiroshi18/readthedocs.org | 95c00d0adec1b3b935ba49068c89375cc129238e | [
"MIT"
] | null | null | null | """Views for builds app."""
import logging
import textwrap
from urllib.parse import urlparse
from django.contrib import messages
from django.contrib.auth.decorators import login_required
from django.http import (
HttpResponseForbidden,
HttpResponseRedirect,
)
from django.shortcuts import get_object_or_404
fro... | 30.136364 | 96 | 0.636716 |
26857ba235e4fe13904ca4f1334f4662a795f8a8 | 31,754 | py | Python | tensorflow/contrib/timeseries/python/timeseries/state_space_models/state_space_model_test.py | PaulWang1905/tensorflow | ebf12d22b4801fb8dab5034cc94562bf7cc33fa0 | [
"Apache-2.0"
] | 848 | 2019-12-03T00:16:17.000Z | 2022-03-31T22:53:17.000Z | tensorflow/contrib/timeseries/python/timeseries/state_space_models/state_space_model_test.py | PaulWang1905/tensorflow | ebf12d22b4801fb8dab5034cc94562bf7cc33fa0 | [
"Apache-2.0"
] | 656 | 2019-12-03T00:48:46.000Z | 2022-03-31T18:41:54.000Z | tensorflow/contrib/timeseries/python/timeseries/state_space_models/state_space_model_test.py | PaulWang1905/tensorflow | ebf12d22b4801fb8dab5034cc94562bf7cc33fa0 | [
"Apache-2.0"
] | 506 | 2019-12-03T00:46:26.000Z | 2022-03-30T10:34:56.000Z | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 42.002646 | 96 | 0.692196 |
a05b8c2457a0177569eaa6eb7ee34f15a128436c | 1,017 | py | Python | view/workspace.py | LianGee/zed | 0838eec03733a26705126d96dfb59af6bdf19a9e | [
"MIT"
] | null | null | null | view/workspace.py | LianGee/zed | 0838eec03733a26705126d96dfb59af6bdf19a9e | [
"MIT"
] | null | null | null | view/workspace.py | LianGee/zed | 0838eec03733a26705126d96dfb59af6bdf19a9e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @File : workspace.py
# @Author: zaoshu
# @Date : 2020-03-04
# @Desc :
from flask import Blueprint, request, g
from common.loged import log_this
from common.login import login_required
from common.response import Response
from service.workspace_service import Workspace... | 24.804878 | 71 | 0.72763 |
52f6f9985bd28239334335b092ab3cfc5dceee78 | 1,058 | py | Python | setup.py | mechaphish/meister | d115688f1a994984748a7d0dee31162ce2b3627f | [
"BSD-2-Clause"
] | 9 | 2016-08-20T23:39:45.000Z | 2020-11-06T23:10:04.000Z | setup.py | mechaphish/meister | d115688f1a994984748a7d0dee31162ce2b3627f | [
"BSD-2-Clause"
] | 1 | 2016-11-14T07:16:27.000Z | 2017-10-24T01:36:46.000Z | setup.py | mechaphish/meister | d115688f1a994984748a7d0dee31162ce2b3627f | [
"BSD-2-Clause"
] | 8 | 2016-08-21T13:13:51.000Z | 2020-11-06T23:10:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Distutil setup scripts for meister and its requirements."""
# pylint: disable=import-error,no-name-in-module
import os
import os.path
import shutil
from distutils.core import setup
REQUIREMENTS, DEPENDENCIES = [], []
with open('requirements.txt', 'r') as req_file:
... | 28.594595 | 74 | 0.625709 |
d994e9a11094147ac6efb378b9b0dc5725c9344b | 2,042 | py | Python | grr/server/grr_response_server/databases/mysql_artifacts.py | oueldz4/grr | 8c60d9198cc0875a8ea80b90237eb0a8272082ff | [
"Apache-2.0"
] | null | null | null | grr/server/grr_response_server/databases/mysql_artifacts.py | oueldz4/grr | 8c60d9198cc0875a8ea80b90237eb0a8272082ff | [
"Apache-2.0"
] | null | null | null | grr/server/grr_response_server/databases/mysql_artifacts.py | oueldz4/grr | 8c60d9198cc0875a8ea80b90237eb0a8272082ff | [
"Apache-2.0"
] | 1 | 2020-07-09T01:08:48.000Z | 2020-07-09T01:08:48.000Z | #!/usr/bin/env python
"""The MySQL database methods for handling artifacts."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
import MySQLdb
from MySQLdb.constants import ER as mysql_error_constants
from typing import Text
from grr_response_core.lib.rdfv... | 32.935484 | 80 | 0.733105 |
61d270fe1a630d504b6900531a9e5c922e1e56f3 | 301 | py | Python | 7_funktionen/1_drawBotFunktionen.py | Coding-for-the-Arts/drawbot-samples | e37994f3497aca252312431100b53548b4573f15 | [
"CC0-1.0"
] | null | null | null | 7_funktionen/1_drawBotFunktionen.py | Coding-for-the-Arts/drawbot-samples | e37994f3497aca252312431100b53548b4573f15 | [
"CC0-1.0"
] | null | null | null | 7_funktionen/1_drawBotFunktionen.py | Coding-for-the-Arts/drawbot-samples | e37994f3497aca252312431100b53548b4573f15 | [
"CC0-1.0"
] | null | null | null | """
DrawBot-Funktionen
"""
newPage("1000, 1000")
oval(200, 200, 600, 600)
saveImage("~/Desktop/myImage.pdf")
"""
Dies sind Beispiele für Funktionen, die nur in DrawBot
existieren, aber nicht in Python.
Informationen zu ihnen findest du in der DrawBot-Dokumentation.
https://www.drawbot.com/
""" | 17.705882 | 64 | 0.724252 |
edc2bb9df188e52f787cdb79f68c203be8241f6a | 45,345 | py | Python | patsy/build.py | neurodebian/patsy | de8d1633f8db42a9c68507a7da0a32d62866a283 | [
"PSF-2.0"
] | null | null | null | patsy/build.py | neurodebian/patsy | de8d1633f8db42a9c68507a7da0a32d62866a283 | [
"PSF-2.0"
] | null | null | null | patsy/build.py | neurodebian/patsy | de8d1633f8db42a9c68507a7da0a32d62866a283 | [
"PSF-2.0"
] | null | null | null | # This file is part of Patsy
# Copyright (C) 2011-2013 Nathaniel Smith <njs@pobox.com>
# See file LICENSE.txt for license information.
# This file defines the core design matrix building functions.
# These are made available in the patsy.* namespace
__all__ = ["design_matrix_builders", "DesignMatrixBuilder",
... | 44.368885 | 88 | 0.581145 |
623e4190969b5f361d088a7c2e809afcc439139f | 507 | py | Python | ch04/fig04-01_onboard-led.py | ricelee-com/pico-starter-kit | f8286fab0bdd868e8fbe9def1dae23bd5d88215c | [
"BSD-3-Clause"
] | null | null | null | ch04/fig04-01_onboard-led.py | ricelee-com/pico-starter-kit | f8286fab0bdd868e8fbe9def1dae23bd5d88215c | [
"BSD-3-Clause"
] | null | null | null | ch04/fig04-01_onboard-led.py | ricelee-com/pico-starter-kit | f8286fab0bdd868e8fbe9def1dae23bd5d88215c | [
"BSD-3-Clause"
] | 3 | 2021-03-28T15:54:13.000Z | 2021-03-31T16:08:54.000Z | #!/usr/bin/python3
#+-+-+-+-+-+-+-+-+-+-+-+
#|R|i|c|e|L|e|e|.|c|o|m|
#+-+-+-+-+-+-+-+-+-+-+-+
# Copyright (c) 2021, ricelee.com
# All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# Origin: p48 at https://hackspace.raspberrypi.org/books/micropyt... | 23.045455 | 73 | 0.641026 |
0b3c7500de5fe0a02bfe5e22c21ec8d3f3454166 | 223 | py | Python | tests/settings.py | codesankalp/django-swappable-models | 82f3bcda94b5c0b3bd028f2c4c03aecf4fc34e04 | [
"MIT"
] | null | null | null | tests/settings.py | codesankalp/django-swappable-models | 82f3bcda94b5c0b3bd028f2c4c03aecf4fc34e04 | [
"MIT"
] | null | null | null | tests/settings.py | codesankalp/django-swappable-models | 82f3bcda94b5c0b3bd028f2c4c03aecf4fc34e04 | [
"MIT"
] | null | null | null | SECRET_KEY = '1234'
INSTALLED_APPS = (
'tests.default_app',
)
MIDDLEWARE_CLASSES = tuple()
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
}
SWAP = False
| 17.153846 | 47 | 0.587444 |
a3f27f48e7b564a096deb9d2a5b3f01814ff1e46 | 16,023 | py | Python | cep_price_console/unified_upload/view.py | zanebclark/cep_price_console | 2f0e0a487a02a1eeceab9bc326d4cef153bd6781 | [
"MIT"
] | null | null | null | cep_price_console/unified_upload/view.py | zanebclark/cep_price_console | 2f0e0a487a02a1eeceab9bc326d4cef153bd6781 | [
"MIT"
] | 5 | 2021-03-31T19:27:48.000Z | 2022-01-13T01:57:46.000Z | cep_price_console/unified_upload/view.py | zanebclark/cep_price_console | 2f0e0a487a02a1eeceab9bc326d4cef153bd6781 | [
"MIT"
] | null | null | null | from cep_price_console.utils.log_utils import CustomAdapter, debug
from cep_price_console.utils import config
from cep_price_console.utils.gui_utils import center_window
from cep_price_console.unified_upload.view_1_file_selection import FileSelection
from cep_price_console.unified_upload.view_2_worksheet_selection impo... | 42.957105 | 120 | 0.565312 |
326398b3a4041d233b390d4364ffc68e2793bf4a | 20,474 | py | Python | python/ray/tune/ray_trial_executor.py | vladfi1/ray | 3b141b26cd4af491b3c1fb8ce4dbb00265246b1e | [
"Apache-2.0"
] | 2 | 2019-03-26T12:40:26.000Z | 2020-07-23T13:45:39.000Z | python/ray/tune/ray_trial_executor.py | vladfi1/ray | 3b141b26cd4af491b3c1fb8ce4dbb00265246b1e | [
"Apache-2.0"
] | null | null | null | python/ray/tune/ray_trial_executor.py | vladfi1/ray | 3b141b26cd4af491b3c1fb8ce4dbb00265246b1e | [
"Apache-2.0"
] | 2 | 2019-04-09T12:30:24.000Z | 2020-07-23T13:45:40.000Z | # coding: utf-8
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import logging
import os
import random
import time
import traceback
import ray
from ray.tune.error import TuneError, AbortTrialExecution
from ray.tune.logger import NoopLogger
from ray.tune.tri... | 39.601547 | 79 | 0.605744 |
765e4527947fe9e37849daff30ab175fb2c01db7 | 550 | py | Python | 202-happy-number/happy_number.py | cnluocj/leetcode | 5b870a63ba1aab3db1e05421c91f404a9aabc489 | [
"MIT"
] | null | null | null | 202-happy-number/happy_number.py | cnluocj/leetcode | 5b870a63ba1aab3db1e05421c91f404a9aabc489 | [
"MIT"
] | null | null | null | 202-happy-number/happy_number.py | cnluocj/leetcode | 5b870a63ba1aab3db1e05421c91f404a9aabc489 | [
"MIT"
] | null | null | null | """
70.49%
"""
class Solution(object):
def isHappy(self, n):
"""
:type n: int
:rtype: bool
"""
if n == 0 or n == 1:
return True
x = [n]
curr = n
ishappy = False
while True:
digits = list(str(curr))
curr = 0
... | 19.642857 | 36 | 0.370909 |
bc1ddea700b49d9bf2b707a5c7ced44846e158e3 | 577 | py | Python | trees/bstser.py | dhruvsharma1999/data-structures | f3b51ebca2f6e28eee3dcb5692f92d2f7f3533e5 | [
"MIT"
] | null | null | null | trees/bstser.py | dhruvsharma1999/data-structures | f3b51ebca2f6e28eee3dcb5692f92d2f7f3533e5 | [
"MIT"
] | null | null | null | trees/bstser.py | dhruvsharma1999/data-structures | f3b51ebca2f6e28eee3dcb5692f92d2f7f3533e5 | [
"MIT"
] | null | null | null | #implementing bst search operation using python 3
#Node class
class Node:
def __init__(self,key):
self.right = None
self.left = None
self.val = key
#Utility function to search a given key in BST
def search(root, key):
#base case is root is NULL or key is present at the root
... | 25.086957 | 64 | 0.608319 |
ad228972520e6ef5fe24c9739ecf0cec3daa0122 | 2,239 | py | Python | skater/core/visualizer/image_relevance_visualizer.py | RPUTHUMA/Skater | 317460b88065b41eebe6790e9efdbb0595cbe450 | [
"UPL-1.0"
] | 718 | 2017-05-19T22:49:40.000Z | 2019-03-27T06:40:54.000Z | skater/core/visualizer/image_relevance_visualizer.py | quant1729/Skater | b46a4abe3465ddc7b19ffc762ad45d1414b060a6 | [
"UPL-1.0"
] | 114 | 2017-05-24T16:55:59.000Z | 2019-03-27T12:48:18.000Z | skater/core/visualizer/image_relevance_visualizer.py | quant1729/Skater | b46a4abe3465ddc7b19ffc762ad45d1414b060a6 | [
"UPL-1.0"
] | 121 | 2017-05-22T17:20:19.000Z | 2019-03-21T15:06:19.000Z | # -*- coding: UTF-8 -*-
from skimage.filters import roberts, sobel
import numpy as np
from skater.util.exceptions import MatplotlibUnavailableError
try:
import matplotlib.pyplot as plt
except ImportError:
raise (MatplotlibUnavailableError("Matplotlib is required but unavailable on your system."))
from skater.... | 41.462963 | 111 | 0.72711 |
38d1cf4c1414cf7c200d72497d11fd3c0e463ea8 | 2,334 | py | Python | test/test_task_callbacks_api.py | nodeum-io/nodeum-sdk-python | 205536491bff507dea7be44af46202c17e7121d9 | [
"MIT"
] | null | null | null | test/test_task_callbacks_api.py | nodeum-io/nodeum-sdk-python | 205536491bff507dea7be44af46202c17e7121d9 | [
"MIT"
] | null | null | null | test/test_task_callbacks_api.py | nodeum-io/nodeum-sdk-python | 205536491bff507dea7be44af46202c17e7121d9 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Nodeum API
# About This document describes the Nodeum API version 2: If you are looking for any information about the product itself, reach the product website https://www.nodeum.io. You can also contact us at this email address : info@nodeum.io # Filter parameters When browsing a list ... | 33.826087 | 876 | 0.668809 |
d28a2d764f2fd5496af214b347faac1ebe81578e | 31,018 | py | Python | scripts/bot.py | parimple/zagadka | 1cad1af657d9a621e6c42e3a66fb4dac10770810 | [
"MIT"
] | null | null | null | scripts/bot.py | parimple/zagadka | 1cad1af657d9a621e6c42e3a66fb4dac10770810 | [
"MIT"
] | null | null | null | scripts/bot.py | parimple/zagadka | 1cad1af657d9a621e6c42e3a66fb4dac10770810 | [
"MIT"
] | null | null | null | import asyncio
from datetime import datetime, timedelta
import discord
from datasources.queries import *
import inspect
import datasources.models as models
import datasources.queries as queries
from mappings import BOT, GUILD, COMMANDS, MUSIC_PREFIX, MUSIC_COMMANDS
from datasources import session, engine
from random i... | 47.211568 | 157 | 0.536173 |
550ad1d4a3a8dc2ba0d0b2f552a896950c473d5d | 326 | py | Python | portfolio/migrations/0025_remove_data_hits.py | ElmanTr/simple-django-web | 07f9b938e42ade4b515cbb8b41364089a5f9f2b1 | [
"MIT"
] | 1 | 2020-10-07T14:03:13.000Z | 2020-10-07T14:03:13.000Z | portfolio/migrations/0025_remove_data_hits.py | ElmanTr/simple-django-web | 07f9b938e42ade4b515cbb8b41364089a5f9f2b1 | [
"MIT"
] | null | null | null | portfolio/migrations/0025_remove_data_hits.py | ElmanTr/simple-django-web | 07f9b938e42ade4b515cbb8b41364089a5f9f2b1 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.2 on 2020-11-22 12:57
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('portfolio', '0024_auto_20201115_1919'),
]
operations = [
migrations.RemoveField(
model_name='data',
name='hits',
),
... | 18.111111 | 49 | 0.588957 |
efa1ecf696ba58ce944e26cc3a9ac3069b8628d9 | 898 | py | Python | azure-keyvault/azure/keyvault/models/deleted_key_item_paged.py | v-Ajnava/azure-sdk-for-python | a1f6f80eb5869c5b710e8bfb66146546697e2a6f | [
"MIT"
] | 4 | 2016-06-17T23:25:29.000Z | 2022-03-30T22:37:45.000Z | azure/keyvault/models/deleted_key_item_paged.py | EnjoyLifeFund/Debian_py36_packages | 1985d4c73fabd5f08f54b922e73a9306e09c77a5 | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | 54 | 2016-03-25T17:25:01.000Z | 2018-10-22T17:27:54.000Z | azure/keyvault/models/deleted_key_item_paged.py | EnjoyLifeFund/Debian_py36_packages | 1985d4c73fabd5f08f54b922e73a9306e09c77a5 | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | 3 | 2016-05-03T20:49:46.000Z | 2017-10-05T21:05:27.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 32.071429 | 76 | 0.569042 |
292fc2dba5da6be1968db15edb858c98bf0c8afe | 178 | py | Python | kuwala/common/python_utils/src/error_handler.py | SamDuan/kuwala | b417444493b3efcde33747e201b5d0bf13f8e14a | [
"Apache-2.0"
] | null | null | null | kuwala/common/python_utils/src/error_handler.py | SamDuan/kuwala | b417444493b3efcde33747e201b5d0bf13f8e14a | [
"Apache-2.0"
] | null | null | null | kuwala/common/python_utils/src/error_handler.py | SamDuan/kuwala | b417444493b3efcde33747e201b5d0bf13f8e14a | [
"Apache-2.0"
] | null | null | null | from quart import jsonify
def general_error(error):
return (
jsonify({"success": False, "error": {"message": error.description}}),
error.status_code,
)
| 19.777778 | 77 | 0.629213 |
2a30357973cd0fcb2a9e8dbb88984bfc75364b0d | 213 | py | Python | tests/src/__init__.py | char-lie/software_design | 8784cc5f4dea1e1290f8e3ea0425677d1cbeb273 | [
"MIT"
] | null | null | null | tests/src/__init__.py | char-lie/software_design | 8784cc5f4dea1e1290f8e3ea0425677d1cbeb273 | [
"MIT"
] | 4 | 2016-02-23T14:27:43.000Z | 2016-02-24T19:08:46.000Z | tests/src/__init__.py | char-lie/software_design | 8784cc5f4dea1e1290f8e3ea0425677d1cbeb273 | [
"MIT"
] | null | null | null | from unittest import defaultTestLoader
from TransactionManager import TransactionManagerBase
test_cases = [TransactionManagerBase]
tests = [defaultTestLoader.loadTestsFromTestCase(test) for test in test_cases]
| 26.625 | 78 | 0.859155 |
ca3c2a8823ade1d2385c16ae7794f178282abe61 | 407 | py | Python | torch/distributed/pipeline/sync/__init__.py | MagiaSN/pytorch | 7513455c743d3d644b45a804902c1a0d14b69f45 | [
"Intel"
] | 7 | 2021-05-29T16:31:51.000Z | 2022-02-21T18:52:25.000Z | torch/distributed/pipeline/sync/__init__.py | MagiaSN/pytorch | 7513455c743d3d644b45a804902c1a0d14b69f45 | [
"Intel"
] | 1 | 2022-01-18T12:17:29.000Z | 2022-01-18T12:17:29.000Z | torch/distributed/pipeline/sync/__init__.py | MagiaSN/pytorch | 7513455c743d3d644b45a804902c1a0d14b69f45 | [
"Intel"
] | 2 | 2021-07-02T10:18:21.000Z | 2021-08-18T10:10:28.000Z | # Copyright 2019 Kakao Brain
#
# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
#
# This source code is licensed under the BSD license found in the
# LICENSE file in the root directory of this source tree.
"""A Pipe implementation in PyTorch."""
from .checkpoint import is_checkpointing, is_recomp... | 33.916667 | 71 | 0.764128 |
21913d1641940905c07a6732a1068b272a202e65 | 774 | py | Python | get_baseline_auc.py | helmersl/patent_similarity_search | 8d6833607a58257a4e4b2c2c0ce58472d248805a | [
"CC-BY-4.0"
] | 36 | 2018-12-10T08:08:21.000Z | 2022-03-12T21:55:43.000Z | get_baseline_auc.py | helmersl/patent_similarity_search | 8d6833607a58257a4e4b2c2c0ce58472d248805a | [
"CC-BY-4.0"
] | 3 | 2019-07-18T05:01:02.000Z | 2021-04-20T14:58:16.000Z | get_baseline_auc.py | helmersl/patent_similarity_search | 8d6833607a58257a4e4b2c2c0ce58472d248805a | [
"CC-BY-4.0"
] | 10 | 2018-08-09T05:10:19.000Z | 2021-12-23T05:40:28.000Z | import numpy as np
from plot_utils import plot_score_distr, group_combis, calc_auc
binary_label_pairs = np.load('human_eval/corpus_info/binary_label_pairs.npy').item()
human_label_pairs = np.load('human_eval/corpus_info/human_label_pairs.npy').item()
combis = np.load('human_eval/corpus_info/combis.npy')
human_sim_com... | 55.285714 | 84 | 0.760982 |
34c3574c5179689640e3901e226c4b79f06968db | 2,257 | py | Python | tests/unit_testing/test_argument.py | pengzhengyi/Streamlined | 59743f44e349318e51e1db4e72c7d1b5992f25be | [
"MIT"
] | null | null | null | tests/unit_testing/test_argument.py | pengzhengyi/Streamlined | 59743f44e349318e51e1db4e72c7d1b5992f25be | [
"MIT"
] | 5 | 2021-09-11T07:46:55.000Z | 2022-03-12T02:03:54.000Z | tests/unit_testing/test_argument.py | pengzhengyi/Streamlined | 59743f44e349318e51e1db4e72c7d1b5992f25be | [
"MIT"
] | null | null | null | from unittest.mock import Mock
import pytest
from streamlined.common import TYPE, VALUE
from streamlined.middlewares import (
ARGPARSE,
ARGS,
ARGTYPE,
ARGUMENT,
ARGUMENTS,
CLEANUP,
NAME,
SKIP,
Argument,
Arguments,
)
@pytest.mark.asyncio
async def test_argument_set_in_scope(si... | 25.359551 | 96 | 0.648206 |
06d6ceb93d922c8230fd50384732f9651b40abd3 | 10,987 | py | Python | basil/web/oauth2.py | stmobo/BasilBot | 96497786dc9ad6604ade47cac1ad101084da2346 | [
"MIT"
] | null | null | null | basil/web/oauth2.py | stmobo/BasilBot | 96497786dc9ad6604ade47cac1ad101084da2346 | [
"MIT"
] | null | null | null | basil/web/oauth2.py | stmobo/BasilBot | 96497786dc9ad6604ade47cac1ad101084da2346 | [
"MIT"
] | null | null | null | from __future__ import annotations
from aiohttp import ClientSession, ClientResponse, ClientResponseError
from aioredis import Redis, RedisError
import logging
import secrets
import time
from typing import Optional, Dict, Iterable, Union, Tuple
from urllib.parse import urljoin, urlencode
from sanic import Sanic
from ... | 34.01548 | 87 | 0.572859 |
d354efd0fbdfa0802f732396a8841b6eccb09145 | 320 | py | Python | 2_viewing_chain.py | gadsater/blockchain | c22ced0a8b1f5ff01cd928c4e79191f773684238 | [
"MIT"
] | 2 | 2018-10-16T10:15:57.000Z | 2019-03-24T05:45:00.000Z | 2_viewing_chain.py | sudar-coder321/BlockChain_For_TKnow | 278e5d7ea9d34e7acfe795c561fc5fa906c9c8c0 | [
"MIT"
] | 1 | 2018-10-16T10:33:47.000Z | 2018-10-16T10:33:47.000Z | 2_viewing_chain.py | sudar-coder321/BlockChain_For_TKnow | 278e5d7ea9d34e7acfe795c561fc5fa906c9c8c0 | [
"MIT"
] | 1 | 2018-10-14T16:03:05.000Z | 2018-10-14T16:03:05.000Z | from blockchain import Blockchain
if __name__ == '__main__':
testchain = Blockchain()
for i in range(5):
proof = testchain.proof_of_work(testchain.last_block)
hashval = testchain.hash(testchain.last_block)
block = testchain.new_block(proof,hashval)
print (*testchain.chain,sep="\n")
| 32 | 61 | 0.69375 |
6bc162cb1a22247d03e3efa9d9b015db7d994fbd | 9,779 | py | Python | stubs.min/System/Windows/Media/__init___parts/SkewTransform.py | ricardyn/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | 1 | 2021-02-02T13:39:16.000Z | 2021-02-02T13:39:16.000Z | stubs.min/System/Windows/Media/__init___parts/SkewTransform.py | hdm-dt-fb/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | null | null | null | stubs.min/System/Windows/Media/__init___parts/SkewTransform.py | hdm-dt-fb/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | null | null | null | class SkewTransform(Transform,ISealable,IAnimatable,IResource,IFormattable):
"""
Represents a 2-D�skew.
SkewTransform()
SkewTransform(angleX: float,angleY: float)
SkewTransform(angleX: float,angleY: float,centerX: float,centerY: float)
"""
def Clone(self):
"""
Clone(self: SkewTransform) -> Sk... | 38.199219 | 215 | 0.722262 |
151479260ee96c8163f1b3916b969be1b6582bd4 | 56,278 | py | Python | components/isceobj/Alos2Proc/Alos2ProcPublic.py | yuankailiu/isce2 | c2567a33b3f96cc264f49972682c869fa36b9054 | [
"ECL-2.0",
"Apache-2.0"
] | 1,133 | 2022-01-07T21:24:57.000Z | 2022-01-07T21:33:08.000Z | components/isceobj/Alos2Proc/Alos2ProcPublic.py | yuankailiu/isce2 | c2567a33b3f96cc264f49972682c869fa36b9054 | [
"ECL-2.0",
"Apache-2.0"
] | 276 | 2019-02-10T07:18:28.000Z | 2022-03-31T21:45:55.000Z | components/isceobj/Alos2Proc/Alos2ProcPublic.py | yuankailiu/isce2 | c2567a33b3f96cc264f49972682c869fa36b9054 | [
"ECL-2.0",
"Apache-2.0"
] | 235 | 2019-02-10T05:00:53.000Z | 2022-03-18T07:37:24.000Z | #!/usr/bin/env python3
#
# Author: Cunren Liang
# Copyright 2015-present, NASA-JPL/Caltech
#
def runCmd(cmd, silent=0):
import os
if silent == 0:
print("{}".format(cmd))
status = os.system(cmd)
if status != 0:
raise Exception('error when running:\n{}\n'.format(cmd))
def find_vrt_ke... | 38.362645 | 220 | 0.588187 |
53d04637c56f193d7be9471a32e495d1b4383694 | 1,693 | py | Python | data/p2DJ/New/R2/benchmark/startCirq63.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p2DJ/New/R2/benchmark/startCirq63.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p2DJ/New/R2/benchmark/startCirq63.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 5/15/20 4:49 PM
# @File : grover.py
# qubit number=2
# total number=9
import cirq
import cirq.google as cg
from typing import Optional
import sys
from math import log2
import numpy as np
#thatsNoCode
from cirq.contrib.svg import SVGCircuit
# Symbols for ... | 27.306452 | 77 | 0.694625 |
7881c3d3f282e4d8b1baaad205eabb2cbc17501e | 1,165 | py | Python | limite/telaMonstro.py | Castagnna/dungeons-and-dragons | 9821a47febb0669ff0a073585e53f286fe27bf0a | [
"CC0-1.0"
] | null | null | null | limite/telaMonstro.py | Castagnna/dungeons-and-dragons | 9821a47febb0669ff0a073585e53f286fe27bf0a | [
"CC0-1.0"
] | null | null | null | limite/telaMonstro.py | Castagnna/dungeons-and-dragons | 9821a47febb0669ff0a073585e53f286fe27bf0a | [
"CC0-1.0"
] | null | null | null | from limite.telaGenerica import TelaGenerica
import PySimpleGUI as sg
class TelaMonstro(TelaGenerica):
def __init__(self, controlador):
super(TelaMonstro, self).__init__(controlador)
self.init_components()
def init_components(self):
sg.ChangeLookAndFeel('Reddit')
layout = [
... | 44.807692 | 87 | 0.639485 |
fb1fd41ff3b393911c9b94ef3462a9fa9a0721b1 | 880 | py | Python | практика/K1/numb1.py | Tamerlanchiques/usb | a6f5dd74a6209363bdfc820774509104e708700f | [
"MIT"
] | null | null | null | практика/K1/numb1.py | Tamerlanchiques/usb | a6f5dd74a6209363bdfc820774509104e708700f | [
"MIT"
] | null | null | null | практика/K1/numb1.py | Tamerlanchiques/usb | a6f5dd74a6209363bdfc820774509104e708700f | [
"MIT"
] | null | null | null | print('')
print('Добро пожаловать в мой мир, сдесь мы с тобой сыграем в игру "угадай число"')
print('Введи случайное число от 1 до 100')
print('')
mas = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,... | 51.764706 | 302 | 0.578409 |
cc05d40cc2423afdbaa7166fbe005035acefd191 | 287 | py | Python | PicoCTF 2019/Forensics/WhitePages/solve.py | p-g-krish/CTF-Writeups | 05ad6a9ecbc19ceb8890f4581dfee36f16d164aa | [
"MIT"
] | 51 | 2018-06-26T09:49:42.000Z | 2019-09-14T00:06:35.000Z | PicoCTF 2019/Forensics/WhitePages/solve.py | p-g-krish/CTF-Writeups | 05ad6a9ecbc19ceb8890f4581dfee36f16d164aa | [
"MIT"
] | 1 | 2018-06-29T18:40:59.000Z | 2018-07-09T20:29:41.000Z | PicoCTF 2019/Forensics/WhitePages/solve.py | p-g-krish/CTF-Writeups | 05ad6a9ecbc19ceb8890f4581dfee36f16d164aa | [
"MIT"
] | 22 | 2019-10-03T14:52:43.000Z | 2022-01-17T08:55:10.000Z | #!/usr/bin/env python3
from Cryptodome.Util.number import long_to_bytes
f = open('whitepages.txt','rb').read()
out = ""
i = 0
while i < len(f):
if f[i:i+1] == b'\x20':
out+="1"
elif f[i:i+3] == b'\xe2\x80\x83':
out+="0"
i+=2
i+=1
print(long_to_bytes(int(out,2)).decode('utf-8')) | 22.076923 | 48 | 0.602787 |
53221fe74dfb3f8d887863e6244d048a8f18ef47 | 1,241 | py | Python | tests/conftest.py | m1009d/scrapli_cfg | 0d967f22be802ba57446f83b02a0703606546ec7 | [
"MIT"
] | 15 | 2021-03-14T18:27:15.000Z | 2022-02-08T17:05:33.000Z | tests/conftest.py | m1009d/scrapli_cfg | 0d967f22be802ba57446f83b02a0703606546ec7 | [
"MIT"
] | 21 | 2021-05-23T13:58:40.000Z | 2022-03-02T14:38:00.000Z | tests/conftest.py | m1009d/scrapli_cfg | 0d967f22be802ba57446f83b02a0703606546ec7 | [
"MIT"
] | 1 | 2021-10-04T12:48:14.000Z | 2021-10-04T12:48:14.000Z | from pathlib import Path
import pytest
from devices import CONFIG_REPLACER, DEVICES
import scrapli_cfg
TEST_DATA_PATH = f"{Path(scrapli_cfg.__file__).parents[1]}/tests/test_data"
@pytest.fixture(scope="session")
def test_data_path():
"""Fixture to provide path to test data files"""
return TEST_DATA_PATH
... | 27.577778 | 81 | 0.714746 |
a2d2ba6abea83b3492e08e6698a7c86663780e66 | 11,495 | py | Python | src/packagedcode/pubspec.py | Siddhant-K-code/scancode-toolkit | d1e725d3603a8f96c25f7e3f7595c68999b92a67 | [
"Apache-2.0",
"CC-BY-4.0"
] | 1,511 | 2015-07-01T15:29:03.000Z | 2022-03-30T13:40:05.000Z | src/packagedcode/pubspec.py | Siddhant-K-code/scancode-toolkit | d1e725d3603a8f96c25f7e3f7595c68999b92a67 | [
"Apache-2.0",
"CC-BY-4.0"
] | 2,695 | 2015-07-01T16:01:35.000Z | 2022-03-31T19:17:44.000Z | src/packagedcode/pubspec.py | Siddhant-K-code/scancode-toolkit | d1e725d3603a8f96c25f7e3f7595c68999b92a67 | [
"Apache-2.0",
"CC-BY-4.0"
] | 540 | 2015-07-01T15:08:19.000Z | 2022-03-31T12:13:11.000Z | #
# Copyright (c) nexB Inc. and others. All rights reserved.
# ScanCode is a trademark of nexB Inc.
# SPDX-License-Identifier: Apache-2.0
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
# See https://github.com/nexB/scancode-toolkit for support or download.
# See https://aboutcode.org for more in... | 29.474359 | 128 | 0.639321 |
31a235f6b095da37ba59015335d956eb2b8c258e | 12,259 | py | Python | QS-AD/old/Visualization_sunburst_v.0.9.py | miguelbarretosanz/QS-AgregartorDashboard | 59a317e16e771b190e3d27e2aff0a3da9a553aea | [
"MIT"
] | null | null | null | QS-AD/old/Visualization_sunburst_v.0.9.py | miguelbarretosanz/QS-AgregartorDashboard | 59a317e16e771b190e3d27e2aff0a3da9a553aea | [
"MIT"
] | null | null | null | QS-AD/old/Visualization_sunburst_v.0.9.py | miguelbarretosanz/QS-AgregartorDashboard | 59a317e16e771b190e3d27e2aff0a3da9a553aea | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Mar 21 07:16:35 2018
@author: MiguelArturo
"""
__author__ = "Miguel Barreto Sanz"
__copyright__ = "Copyright 2018, Miguel Barreto Sanz"
__credits__ = ["Miguel Barreto Sanz"]
__license__ = "MIT"
__version__ = "0.0.9"
__maintainer__ = "Miguel Barreto Sanz... | 42.272414 | 163 | 0.669549 |
22d8b41a9d71f01b3c6fc17684ebc2eef9c41ba8 | 1,446 | bzl | Python | packer/deps.bzl | zacker330/bazel-distribution | 148f7052f6b63cdfa035e95f8a140a2844696112 | [
"Apache-2.0"
] | 97 | 2019-02-12T12:56:55.000Z | 2021-04-10T13:15:50.000Z | packer/deps.bzl | zacker330/bazel-distribution | 148f7052f6b63cdfa035e95f8a140a2844696112 | [
"Apache-2.0"
] | 110 | 2019-01-18T12:57:19.000Z | 2021-04-12T19:53:23.000Z | packer/deps.bzl | zacker330/bazel-distribution | 148f7052f6b63cdfa035e95f8a140a2844696112 | [
"Apache-2.0"
] | 29 | 2019-07-15T16:48:17.000Z | 2021-04-09T16:11:19.000Z | load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
#
# 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 yo... | 40.166667 | 90 | 0.733057 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.