hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 248 | max_issues_repo_name stringlengths 5 125 | max_issues_repo_head_hexsha stringlengths 40 78 | 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 3 248 | max_forks_repo_name stringlengths 5 125 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
a63d599dea6045877e02b25d4ad286249a4128fc | 624 | py | Python | racket_stringer/settings/development.py | rbennett91/racket_stringer | 37cc583003ea924294955a6331bf82d60783c709 | [
"PostgreSQL"
] | null | null | null | racket_stringer/settings/development.py | rbennett91/racket_stringer | 37cc583003ea924294955a6331bf82d60783c709 | [
"PostgreSQL"
] | 6 | 2021-03-31T19:45:30.000Z | 2022-02-10T11:58:21.000Z | racket_stringer/settings/development.py | rbennett91/racket_stringer | 37cc583003ea924294955a6331bf82d60783c709 | [
"PostgreSQL"
] | null | null | null | from .base import *
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = os.environ['SECRET_KEY']
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ALLOWED_HOSTS = [os.environ['ALLOWED_HOSTS']]
# Database
# https://docs.djangoproject.com/en/2.2/ref/settings/#... | 26 | 66 | 0.647436 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 362 | 0.580128 |
a64256e4855190c8d496f99dade4331c334760ed | 7,159 | py | Python | tests/test_training.py | Jimmy2027/MMVAE_mnist_svhn_text | e6e74059bd5feefc0af088f7b1abc31b0e9f2ab7 | [
"MIT"
] | null | null | null | tests/test_training.py | Jimmy2027/MMVAE_mnist_svhn_text | e6e74059bd5feefc0af088f7b1abc31b0e9f2ab7 | [
"MIT"
] | 24 | 2021-11-15T14:22:08.000Z | 2022-02-28T14:30:23.000Z | tests/test_training.py | Jimmy2027/MMVAE_mnist_svhn_text | e6e74059bd5feefc0af088f7b1abc31b0e9f2ab7 | [
"MIT"
] | null | null | null | import tempfile
from pathlib import Path
import pytest
from norby.utils import get_readable_elapsed_time
from mmvae_hub.celeba.CelebaTrainer import CelebaTrainer
from mmvae_hub.evaluation.eval_metrics.coherence import test_generation
from mmvae_hub.mimic.MimicTrainer import MimicTrainer
from mmvae_hub.mnistsvhntext.m... | 46.187097 | 118 | 0.564744 | 0 | 0 | 0 | 0 | 1,712 | 0.23914 | 0 | 0 | 2,724 | 0.3805 |
a6430c564af2fe8b504ab18c9fbc24d3c163cb63 | 41,339 | py | Python | src/api/datahub/access/deploy_plan_views.py | Chromico/bk-base | be822d9bbee544a958bed4831348185a75604791 | [
"MIT"
] | 84 | 2021-06-30T06:20:23.000Z | 2022-03-22T03:05:49.000Z | src/api/datahub/access/deploy_plan_views.py | Chromico/bk-base | be822d9bbee544a958bed4831348185a75604791 | [
"MIT"
] | 7 | 2021-06-30T06:21:16.000Z | 2022-03-29T07:36:13.000Z | src/api/datahub/access/deploy_plan_views.py | Chromico/bk-base | be822d9bbee544a958bed4831348185a75604791 | [
"MIT"
] | 40 | 2021-06-30T06:21:26.000Z | 2022-03-29T12:42:26.000Z | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making BK-BASE 蓝鲸基础平台 available.
Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
BK-BASE 蓝鲸基础平台 is licensed under the MIT License.
License for BK-BASE 蓝鲸基础平台:
------------------------------------------... | 38.419145 | 120 | 0.497037 | 44,957 | 0.952701 | 0 | 0 | 12,695 | 0.269025 | 0 | 0 | 40,498 | 0.858208 |
a64342d6282acb3e5c3a1da43389d3370a406889 | 17,804 | py | Python | venv/lib/python3.8/site-packages/azureml/_restclient/operations/assets_operations.py | amcclead7336/Enterprise_Data_Science_Final | ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28 | [
"Unlicense",
"MIT"
] | null | null | null | venv/lib/python3.8/site-packages/azureml/_restclient/operations/assets_operations.py | amcclead7336/Enterprise_Data_Science_Final | ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28 | [
"Unlicense",
"MIT"
] | null | null | null | venv/lib/python3.8/site-packages/azureml/_restclient/operations/assets_operations.py | amcclead7336/Enterprise_Data_Science_Final | ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28 | [
"Unlicense",
"MIT"
] | 2 | 2021-05-23T16:46:31.000Z | 2021-05-26T23:51:09.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 2.3.3... | 44.621554 | 242 | 0.645024 | 17,233 | 0.967929 | 0 | 0 | 0 | 0 | 0 | 0 | 9,736 | 0.546843 |
a643b7cb05c62d6f05038a65215f5b01cb85f51d | 1,284 | py | Python | histomicstk/features/__init__.py | basanto/HistomicsTK | f3dbd93a7f31c7825574f9ccf0b86e09e9fee360 | [
"Apache-2.0"
] | 249 | 2016-04-04T12:00:54.000Z | 2022-03-31T15:46:50.000Z | histomicstk/features/__init__.py | basanto/HistomicsTK | f3dbd93a7f31c7825574f9ccf0b86e09e9fee360 | [
"Apache-2.0"
] | 616 | 2016-01-13T21:06:01.000Z | 2022-03-19T00:06:28.000Z | histomicstk/features/__init__.py | basanto/HistomicsTK | f3dbd93a7f31c7825574f9ccf0b86e09e9fee360 | [
"Apache-2.0"
] | 109 | 2016-01-21T16:14:34.000Z | 2022-03-10T00:59:06.000Z | """
This package contains functions to computing a variety of image-based features
that quantify the appearance and/or morphology of an objects/regions in the
image. These are needed for classifying objects (e.g. nuclei) and
regions (e.g. tissues) found in histopathology images.
"""
# make functions available at the p... | 38.909091 | 82 | 0.82866 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 697 | 0.542835 |
a643c170360fd65c1fce02757aabe7bff1085035 | 1,532 | py | Python | combined.py | witchOfTheEast/tkinter_tutorial | aeff45ce01cfca88795ec3b9c1be5835553cd907 | [
"MIT"
] | null | null | null | combined.py | witchOfTheEast/tkinter_tutorial | aeff45ce01cfca88795ec3b9c1be5835553cd907 | [
"MIT"
] | null | null | null | combined.py | witchOfTheEast/tkinter_tutorial | aeff45ce01cfca88795ec3b9c1be5835553cd907 | [
"MIT"
] | null | null | null | from Tkinter import *
import tkMessageBox
def callback():
print 'called the callback!'
def setStatus():
myBar.set("%s", 'STATUS BAR INFO')
def exitNow():
exit()
def confirmExit():
if tkMessageBox.askyesno('Exit dialog', 'Really exit?'):
exitNow()
root = Tk()
# create a menu
menu = Menu... | 23.569231 | 88 | 0.686684 | 427 | 0.278721 | 0 | 0 | 0 | 0 | 0 | 0 | 211 | 0.137728 |
a64617babb2bab4f4378a4b38e453efba462a25c | 8,000 | py | Python | phipkit/score.py | openvax/phipkit | 267a9b0bb3b79b3ff416e07ce390e43b84a02be4 | [
"Apache-2.0"
] | null | null | null | phipkit/score.py | openvax/phipkit | 267a9b0bb3b79b3ff416e07ce390e43b84a02be4 | [
"Apache-2.0"
] | null | null | null | phipkit/score.py | openvax/phipkit | 267a9b0bb3b79b3ff416e07ce390e43b84a02be4 | [
"Apache-2.0"
] | null | null | null | '''
Analyze PHiP-seq read counts matrix to generate enrichment-over-beads-only scores.
Algorithm sketch:
[I] For each bead-only sample:
[1] Bin the read counts across clones into some number of bins (default 50).
[2] For each set of clones c associated with each bin:
For each other sample s:
... | 34.934498 | 100 | 0.628375 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,727 | 0.340875 |
a6468c6cb1584d9d4b7819179d568755b90ea133 | 619 | py | Python | ciphers/password_encryption.py | sulochanaviji/Python | 441d6fc1b0b50b04e3947cdab0384de09965eee1 | [
"MIT"
] | null | null | null | ciphers/password_encryption.py | sulochanaviji/Python | 441d6fc1b0b50b04e3947cdab0384de09965eee1 | [
"MIT"
] | null | null | null | ciphers/password_encryption.py | sulochanaviji/Python | 441d6fc1b0b50b04e3947cdab0384de09965eee1 | [
"MIT"
] | null | null | null | from passlib.context import CryptContext
#importing cryptcontext from passlib
pwd_context = CryptContext(
schemes=["pbkdf2_sha256"],
default="pbkdf2_sha256",
pbkdf2_sha256__default_rounds=30000
)
#A round is a part of the algorithm that runs many times in order to reduce "crackability".
def ... | 26.913043 | 91 | 0.780291 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 179 | 0.289176 |
a64902e3f8f932d8557295852469583d5b782d2c | 233 | py | Python | src/basestation/const.py | jariz/basestation | 090acf2880e10a08667de85feab0fc3bdb375ada | [
"MIT"
] | 2 | 2021-07-04T11:39:44.000Z | 2022-01-20T18:57:53.000Z | src/basestation/const.py | jariz/basestation | 090acf2880e10a08667de85feab0fc3bdb375ada | [
"MIT"
] | null | null | null | src/basestation/const.py | jariz/basestation | 090acf2880e10a08667de85feab0fc3bdb375ada | [
"MIT"
] | null | null | null | SERVICE = "00001523-1212-efde-1523-785feabcd124"
PWR_CHARACTERISTIC = "00001525-1212-EFDE-1523-785FEABCD124"
IDENTIFY_CHARACTERISTIC = "00008421-1212-EFDE-1523-785FEABCD124"
PWR_ON = b"\x01"
PWR_STANDBY = b"\x00"
NAME_SUFFIX = "LHB-" | 38.833333 | 64 | 0.785408 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 134 | 0.575107 |
a649eb74dba0e4238520088fa3858aec2514206f | 2,264 | py | Python | j.py | thatch/cloudmesh-iu | 903b897e8234904ea4637f6783e6c53fb9a3c7a8 | [
"Apache-2.0"
] | null | null | null | j.py | thatch/cloudmesh-iu | 903b897e8234904ea4637f6783e6c53fb9a3c7a8 | [
"Apache-2.0"
] | null | null | null | j.py | thatch/cloudmesh-iu | 903b897e8234904ea4637f6783e6c53fb9a3c7a8 | [
"Apache-2.0"
] | null | null | null | from cloudmesh.common.Shell import Shell
import subprocess
import asyncio
import sys
from subprocess import PIPE, Popen
import threading
from queue import Queue, Empty
import time
import os
import shlex
host = "r-003"
port = 9010
command = f'ssh juliet "ssh {host} ./ENV3/bin/jupyter-lab --ip localhost --port {port}"'
... | 29.789474 | 104 | 0.618816 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,089 | 0.481007 |
a64ac3cbe97a0aa5dc2fd09b5e46340c1b456133 | 171 | py | Python | 12.HTM_Content/main.py | sarincr/Introduction-to-Flask-Web-framework | 69a703b3533b6b12f07712a5473b31176c25c9c7 | [
"MIT"
] | null | null | null | 12.HTM_Content/main.py | sarincr/Introduction-to-Flask-Web-framework | 69a703b3533b6b12f07712a5473b31176c25c9c7 | [
"MIT"
] | null | null | null | 12.HTM_Content/main.py | sarincr/Introduction-to-Flask-Web-framework | 69a703b3533b6b12f07712a5473b31176c25c9c7 | [
"MIT"
] | null | null | null | from flask import *
app = Flask(__name__)
@app.route('/<X>')
def message(X):
return render_template('index.html', Y = X)
if __name__ == '__main__':
app.run()
| 15.545455 | 47 | 0.625731 | 0 | 0 | 0 | 0 | 82 | 0.479532 | 0 | 0 | 28 | 0.163743 |
a64bbe192a36abeb0640fa965fed32d5ef6bad50 | 297 | py | Python | lib/data_coll/source_file.py | KentWangYQ/server-migration | 82b0eaac42db3eb697fd53b79d64bd0d39024842 | [
"MIT"
] | null | null | null | lib/data_coll/source_file.py | KentWangYQ/server-migration | 82b0eaac42db3eb697fd53b79d64bd0d39024842 | [
"MIT"
] | null | null | null | lib/data_coll/source_file.py | KentWangYQ/server-migration | 82b0eaac42db3eb697fd53b79d64bd0d39024842 | [
"MIT"
] | null | null | null | import os
import config
def walk():
"""
遍历源文件目录
:return: Generator
"""
for root in config.Source.include:
for path, _, files in os.walk(root):
if path not in config.Source.exclude:
for file in files:
yield (path, file)
| 19.8 | 49 | 0.535354 | 0 | 0 | 284 | 0.913183 | 0 | 0 | 0 | 0 | 60 | 0.192926 |
a6517756a3a14e9acb42f1ecdbdc81a9baa0b501 | 888 | py | Python | utils.py | TobyBoyne/gogen-solver | 59f74591fe48bede8d7cff8f6460cfb74b8e3ebd | [
"MIT"
] | null | null | null | utils.py | TobyBoyne/gogen-solver | 59f74591fe48bede8d7cff8f6460cfb74b8e3ebd | [
"MIT"
] | null | null | null | utils.py | TobyBoyne/gogen-solver | 59f74591fe48bede8d7cff8f6460cfb74b8e3ebd | [
"MIT"
] | null | null | null | from string import ascii_lowercase
from itertools import product
# the letter z is not found in gogen puzzles
lowercase_letters = ascii_lowercase[:-1]
def get_connections(word_list):
"""Returns a dictionary of each letter in the alphabet, where the value is
a set of all the letters that are linked to it based on a... | 31.714286 | 75 | 0.727477 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 371 | 0.417793 |
a6533118b46e76f56bec90a679a74b2a3469e5cd | 2,728 | py | Python | Utilities/MS_UT_Stack2Dir.py | JaneliaSciComp/MetaSegmenter | 6db3e8e26677b49be999773daee6ea475985df55 | [
"Unlicense"
] | null | null | null | Utilities/MS_UT_Stack2Dir.py | JaneliaSciComp/MetaSegmenter | 6db3e8e26677b49be999773daee6ea475985df55 | [
"Unlicense"
] | null | null | null | Utilities/MS_UT_Stack2Dir.py | JaneliaSciComp/MetaSegmenter | 6db3e8e26677b49be999773daee6ea475985df55 | [
"Unlicense"
] | null | null | null | #! /usr/local/python-2.7.6/bin/python
#
# Copyright (C) 2015 by Howard Hughes Medical Institute.
#
# Purpose: given a segmentation stack,
# produce a directory of RGB files
import os, sys, re, h5py
import tifffile as tiff
import numpy
from skimage.morphology import label
from scipy.ndimage import measurements
from sk... | 35.894737 | 100 | 0.603006 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 639 | 0.234238 |
a6544ccff7f22122adea74703d79ead395520358 | 5,371 | py | Python | qa/L0_custom_legacy/custom_legacy_test.py | wiggin66/server | d32e253244be8539a087ba59fee5ab63f9f6a040 | [
"BSD-3-Clause"
] | 4 | 2021-06-02T02:37:53.000Z | 2022-01-20T19:32:57.000Z | qa/L0_custom_legacy/custom_legacy_test.py | wiggin66/server | d32e253244be8539a087ba59fee5ab63f9f6a040 | [
"BSD-3-Clause"
] | null | null | null | qa/L0_custom_legacy/custom_legacy_test.py | wiggin66/server | d32e253244be8539a087ba59fee5ab63f9f6a040 | [
"BSD-3-Clause"
] | 1 | 2021-12-17T03:07:54.000Z | 2021-12-17T03:07:54.000Z | #!/bin/bash
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of ... | 40.383459 | 83 | 0.633402 | 3,267 | 0.608267 | 0 | 0 | 0 | 0 | 0 | 0 | 1,994 | 0.371253 |
a6551b4d98c72a4734c14321b779357ef66e0ea1 | 811 | py | Python | testsuite/sesstion_test.py | olegvg/telebot | e37bce862518a1addaf1db4624a62eaf9dfc4afa | [
"MIT"
] | null | null | null | testsuite/sesstion_test.py | olegvg/telebot | e37bce862518a1addaf1db4624a62eaf9dfc4afa | [
"MIT"
] | null | null | null | testsuite/sesstion_test.py | olegvg/telebot | e37bce862518a1addaf1db4624a62eaf9dfc4afa | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import unittest
from telebot.storage import EphemeralStorage
class TestEphemeralSession(unittest.TestCase):
def setUp(self):
from telebot.logger import init_root_logger
init_root_logger()
def test_session_storage_singleton(self):
session1 = EphemeralStorage()... | 23.852941 | 51 | 0.664612 | 722 | 0.890259 | 0 | 0 | 0 | 0 | 0 | 0 | 23 | 0.02836 |
a65643a5cfe26a75ee90de2f3f498ab27ada61a1 | 1,856 | py | Python | logger.py | SoPudge/lib.py | 7e8e6cb76a1838c2af969bd1f3b7cf5ce6cb0441 | [
"MIT"
] | null | null | null | logger.py | SoPudge/lib.py | 7e8e6cb76a1838c2af969bd1f3b7cf5ce6cb0441 | [
"MIT"
] | null | null | null | logger.py | SoPudge/lib.py | 7e8e6cb76a1838c2af969bd1f3b7cf5ce6cb0441 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import logging
class Logger(object):
def __init__(self,logger,**kw):
'''
creat a logger class,port from default loggin module
Description:
对于不传入**kw参数的调用,为旧式调用,用于一些旧式程序
对于传输**kw的掉用,则支持如下功能
... | 26.898551 | 93 | 0.579741 | 1,791 | 0.877941 | 0 | 0 | 0 | 0 | 0 | 0 | 809 | 0.396569 |
a656d2bce16963a39c156a75a1c47bd702c5f92a | 965 | py | Python | monitor.py | TheRevanchist/rcnn_for_relab | c51dcb464f5485278cdecbe413b9e03819be0a12 | [
"MIT"
] | null | null | null | monitor.py | TheRevanchist/rcnn_for_relab | c51dcb464f5485278cdecbe413b9e03819be0a12 | [
"MIT"
] | null | null | null | monitor.py | TheRevanchist/rcnn_for_relab | c51dcb464f5485278cdecbe413b9e03819be0a12 | [
"MIT"
] | null | null | null | import numpy as np
class AccuracyChecker:
def __init__(self, n_labels):
self.confusion = np.zeros((n_labels, n_labels))
# batch_accuracies = np.zeros((n_batches, max_epoch))
def update(self, real, predicted):
if predicted.ndim == 2 and real.ndim == 2:
predicted = np.argmax... | 29.242424 | 69 | 0.619689 | 944 | 0.978238 | 0 | 0 | 0 | 0 | 0 | 0 | 113 | 0.117098 |
a656dc09ee6ec9003928f2504f93fd239a261cd0 | 1,287 | py | Python | docs/examples/config_manager_test.py | tbeckham/DeploymentManager | c1b2ba47d1732859ff458eb934da671fb0dad37f | [
"Apache-2.0"
] | null | null | null | docs/examples/config_manager_test.py | tbeckham/DeploymentManager | c1b2ba47d1732859ff458eb934da671fb0dad37f | [
"Apache-2.0"
] | null | null | null | docs/examples/config_manager_test.py | tbeckham/DeploymentManager | c1b2ba47d1732859ff458eb934da671fb0dad37f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
from config_manager.eucalyptus import Eucalyptus
from config_manager.eucalyptus.enterprise import Enterprise
from config_manager.eucalyptus.topology import Topology
from config_manager.eucalyptus.topology.cluster import Cluster
from config_manager.eucalyptus.topology.cluster.nodecontroller import ... | 35.75 | 84 | 0.742813 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 656 | 0.509713 |
a657192a2a6097dd374a729b11c2e62a804c6b55 | 6,581 | py | Python | bin/postprocess-exe.py | ktanidis2/Modified_CosmoSIS_for_galaxy_number_count_angular_power_spectra | 07e5d308c6a8641a369a3e0b8d13c4104988cd2b | [
"BSD-2-Clause"
] | 1 | 2021-09-15T10:10:26.000Z | 2021-09-15T10:10:26.000Z | bin/postprocess-exe.py | ktanidis2/Modified_CosmoSIS_for_galaxy_number_count_angular_power_spectra | 07e5d308c6a8641a369a3e0b8d13c4104988cd2b | [
"BSD-2-Clause"
] | null | null | null | bin/postprocess-exe.py | ktanidis2/Modified_CosmoSIS_for_galaxy_number_count_angular_power_spectra | 07e5d308c6a8641a369a3e0b8d13c4104988cd2b | [
"BSD-2-Clause"
] | 1 | 2021-06-11T15:29:43.000Z | 2021-06-11T15:29:43.000Z | #!/usr/bin/env python
from __future__ import print_function
from cosmosis.postprocessing.postprocess import postprocessor_for_sampler
from cosmosis.postprocessing.inputs import read_input
from cosmosis.postprocessing.plots import Tweaks
from cosmosis.runtime.utils import mkdir
import sys
import argparse
import os
par... | 53.072581 | 183 | 0.752925 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,480 | 0.528795 |
a6571d51ba20f89c596630ca6b73cb59f6d6f6e4 | 224 | py | Python | Task 3.py | IsSveshuD/lab_10 | 7b6c6f69e9ee272e95300f325b1f1a251b3b07b6 | [
"MIT"
] | null | null | null | Task 3.py | IsSveshuD/lab_10 | 7b6c6f69e9ee272e95300f325b1f1a251b3b07b6 | [
"MIT"
] | null | null | null | Task 3.py | IsSveshuD/lab_10 | 7b6c6f69e9ee272e95300f325b1f1a251b3b07b6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding^ utf-8 -*-
def t():
r = 1
while 1:
ch = int(input())
if not ch: break
r *= ch
print(r)
return (r)
if __name__ == '__main__':
print(t())
| 13.176471 | 26 | 0.446429 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 55 | 0.245536 |
a658fb18c246abf8c825b53218e1569f28081bc2 | 2,592 | py | Python | MyPython/wifi-scanner.py | LairdStreak/MyPyPlayGround | e999cfd179d457a6d17c81bf1bacaa7c90e3e1dc | [
"MIT"
] | null | null | null | MyPython/wifi-scanner.py | LairdStreak/MyPyPlayGround | e999cfd179d457a6d17c81bf1bacaa7c90e3e1dc | [
"MIT"
] | null | null | null | MyPython/wifi-scanner.py | LairdStreak/MyPyPlayGround | e999cfd179d457a6d17c81bf1bacaa7c90e3e1dc | [
"MIT"
] | null | null | null | #!/usr/bin/python
from scapy.all import *
import sys
import signal
import os
#Function to handle Crtl+C
def signal_handler(signal, frame):
print('\n=================')
print('Execution aborted')
print('=================')
os.system("kill -9 " + str(os.getpid()))
sys.exit(1)
def signal_exit(signal, frame):
prin... | 24 | 100 | 0.629244 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 630 | 0.243056 |
a6592e64bf1d5f88b19a5726eb07a0d0e13e1847 | 1,715 | py | Python | setup.py | AmineSoukara/PyAnime4Up | 495c6123a60e28e8a447da4152793c9201729e6a | [
"MIT"
] | 2 | 2021-10-01T20:51:20.000Z | 2021-11-12T04:45:16.000Z | setup.py | AmineSoukara/PyAnime4Up | 495c6123a60e28e8a447da4152793c9201729e6a | [
"MIT"
] | null | null | null | setup.py | AmineSoukara/PyAnime4Up | 495c6123a60e28e8a447da4152793c9201729e6a | [
"MIT"
] | null | null | null | """
PyAnime4Up
~~~~~~~~~
:Copyright: (c) 2021 By Amine Soukara <https://github.com/AmineSoukara>.
:License: MIT, See LICENSE For More Details.
:Description: A Selenium-less Python Anime4Up Library
"""
from setuptools import find_packages, setup
AUTHOR = "AmineSoukara"
EMAIL = "AmineSoukara@gmail.com"
URL = "https://g... | 30.625 | 77 | 0.653061 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,061 | 0.618659 |
a659c422f6fefeb24b335ffa862836f6bd0ada52 | 1,032 | py | Python | test/test_middleware.py | sunhailin-Leo/fastapi_apollo_middleware | 32351406141dbd87254efd4516288a556adbe72a | [
"MIT"
] | 2 | 2021-03-26T03:54:43.000Z | 2021-03-28T10:51:19.000Z | test/test_middleware.py | sunhailin-Leo/fastapi_apollo_middleware | 32351406141dbd87254efd4516288a556adbe72a | [
"MIT"
] | null | null | null | test/test_middleware.py | sunhailin-Leo/fastapi_apollo_middleware | 32351406141dbd87254efd4516288a556adbe72a | [
"MIT"
] | null | null | null | import time
import pytest
from fastapi import FastAPI
from fastapi.testclient import TestClient
from fastapi_apollo_middleware.middleware import (
FastAPIApolloMiddleware,
startup_apollo_cycle_task,
)
@pytest.fixture(name="test_middleware")
def test_middleware():
def _test_middleware(**profiler_kwargs)... | 23.454545 | 71 | 0.669574 | 251 | 0.243217 | 0 | 0 | 663 | 0.642442 | 188 | 0.182171 | 114 | 0.110465 |
a65b05d80f7724fcec88f7d9e34cf1ea27153013 | 545 | py | Python | metadata-ingestion/src/datahub/ingestion/source/bigquery.py | qumingxing/datahub | 1b96cd8c2665f17fbda1c523ea55f9db0c4ae77b | [
"Apache-2.0"
] | null | null | null | metadata-ingestion/src/datahub/ingestion/source/bigquery.py | qumingxing/datahub | 1b96cd8c2665f17fbda1c523ea55f9db0c4ae77b | [
"Apache-2.0"
] | null | null | null | metadata-ingestion/src/datahub/ingestion/source/bigquery.py | qumingxing/datahub | 1b96cd8c2665f17fbda1c523ea55f9db0c4ae77b | [
"Apache-2.0"
] | null | null | null | from typing import Optional
from .sql_common import SQLAlchemyConfig, SQLAlchemySource
class BigQueryConfig(SQLAlchemyConfig):
scheme = "bigquery"
project_id: Optional[str]
def get_sql_alchemy_url(self):
return f"{self.scheme}://{self.project_id}"
class BigQuerySource(SQLAlchemySource):
de... | 24.772727 | 58 | 0.710092 | 451 | 0.827523 | 0 | 0 | 138 | 0.253211 | 0 | 0 | 56 | 0.102752 |
a65cc33c30371070823025c24bcfdcb3d64f61dc | 655 | py | Python | HW/final/test/preprocess.py | houzeyu2683/IRRHW | c44298ad14c468eff36bc75ebc63abdc9ba24d55 | [
"Apache-2.0"
] | null | null | null | HW/final/test/preprocess.py | houzeyu2683/IRRHW | c44298ad14c468eff36bc75ebc63abdc9ba24d55 | [
"Apache-2.0"
] | null | null | null | HW/final/test/preprocess.py | houzeyu2683/IRRHW | c44298ad14c468eff36bc75ebc63abdc9ba24d55 | [
"Apache-2.0"
] | 1 | 2022-01-16T03:40:34.000Z | 2022-01-16T03:40:34.000Z |
import pandas
'''
根據文本資料,建構 term document matrix 矩陣,
存放在指定的位置。
'''
information = pandas.read_csv("csv/information.csv")
import text
vocabulary = text.vocabulary()
vocabulary.build(content = information['abstract'], title=information['title_e'])
matrix = pandas.DataFrame(vocabulary.frequency, dtype='int')
matrix.i... | 22.586207 | 89 | 0.757252 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 264 | 0.36214 |
a65d8a9e5583c81d0cc550a14888526c903f8d10 | 5,039 | py | Python | fai/files.py | st31ny/pyfai | e81aa4b6a62bb4b5f27b5dc7e83dc2fa93862846 | [
"MIT"
] | 2 | 2021-12-20T00:47:06.000Z | 2021-12-21T15:04:42.000Z | fai/files.py | st31ny/pyfai | e81aa4b6a62bb4b5f27b5dc7e83dc2fa93862846 | [
"MIT"
] | null | null | null | fai/files.py | st31ny/pyfai | e81aa4b6a62bb4b5f27b5dc7e83dc2fa93862846 | [
"MIT"
] | null | null | null | """ File Handling
=============
Pyfai strictly differentiates between virtual paths in the target system
(:any:`TargetPath`) and physical paths in the installer system
(:any:`InstallerPath`). While the former are always rooted in the target
system's filesystem root, only the latter can be resolved ... | 33.593333 | 86 | 0.670173 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,226 | 0.640206 |
a65e4a75490f93c29d34c895001bf593d4b147ba | 1,595 | py | Python | libs/openldap/openldap.py | wrobelda/craft-blueprints-kde | 366f460cecd5baebdf3a695696767c8c0e5e7c7e | [
"BSD-2-Clause"
] | 14 | 2017-09-04T09:01:03.000Z | 2022-01-04T20:09:00.000Z | libs/openldap/openldap.py | wrobelda/craft-blueprints-kde | 366f460cecd5baebdf3a695696767c8c0e5e7c7e | [
"BSD-2-Clause"
] | 14 | 2017-12-15T08:11:22.000Z | 2020-12-29T19:11:13.000Z | libs/openldap/openldap.py | wrobelda/craft-blueprints-kde | 366f460cecd5baebdf3a695696767c8c0e5e7c7e | [
"BSD-2-Clause"
] | 19 | 2017-09-05T19:16:21.000Z | 2020-10-18T12:46:06.000Z | import info
class subinfo(info.infoclass):
def setTargets(self):
for ver in ['2.4.28', '2.4.33', '2.4.36', '2.4.45']:
self.targets[ver] = ('ftp://ftp.openldap.org/pub/OpenLDAP/'
'openldap-release/openldap-' + ver + '.tgz')
self.targetInstSrc[ver] = ... | 43.108108 | 103 | 0.64326 | 1,459 | 0.914734 | 0 | 0 | 0 | 0 | 0 | 0 | 706 | 0.442633 |
a65e59791dc58d5a43721bf93a162bd5c1d59c87 | 4,610 | py | Python | cogs/fun/cog.py | uselessvevo/bonny-biboni-bot | ad6d0dc9e688dc9264638103bd07c8a95c2aaa56 | [
"MIT"
] | null | null | null | cogs/fun/cog.py | uselessvevo/bonny-biboni-bot | ad6d0dc9e688dc9264638103bd07c8a95c2aaa56 | [
"MIT"
] | null | null | null | cogs/fun/cog.py | uselessvevo/bonny-biboni-bot | ad6d0dc9e688dc9264638103bd07c8a95c2aaa56 | [
"MIT"
] | null | null | null | """
Description: Old fun module. Will be rewritten
Version: 0620/prototype
Author: useless_vevo
"""
# Standard library
import os
import hashlib
import requests
from io import BytesIO
# Discord
import discord
from discord.ext import commands
# Pillow/PIL
from PIL import Image
from PIL import ImageFont
from PIL import... | 35.736434 | 92 | 0.565727 | 4,161 | 0.902603 | 0 | 0 | 3,388 | 0.734924 | 3,270 | 0.709328 | 611 | 0.132538 |
a65ef392a6bb4a69f0aea268aa1ebea4dbe1f81a | 2,271 | py | Python | download/gnosis/xml/pickle/test/test_paranoia.py | DavidMertz/gnosis-web | df5ab0d470a02ed6c51c971f2b40f1dcdc7d7350 | [
"CC0-1.0"
] | null | null | null | download/gnosis/xml/pickle/test/test_paranoia.py | DavidMertz/gnosis-web | df5ab0d470a02ed6c51c971f2b40f1dcdc7d7350 | [
"CC0-1.0"
] | null | null | null | download/gnosis/xml/pickle/test/test_paranoia.py | DavidMertz/gnosis-web | df5ab0d470a02ed6c51c971f2b40f1dcdc7d7350 | [
"CC0-1.0"
] | null | null | null | "Test that the PARANOIA setting works --fpm"
import gnosis.xml.pickle as xml_pickle
from gnosis.xml.pickle.util import \
setParanoia, getParanoia, add_class_to_store
import funcs
funcs.set_parser()
ud_xml = """<?xml version="1.0"?>
<!DOCTYPE PyObject SYSTEM "PyObjects.dtd">
<PyObject module="UserDict" class="Us... | 19.747826 | 60 | 0.660942 | 28 | 0.012329 | 0 | 0 | 0 | 0 | 0 | 0 | 1,286 | 0.56627 |
a6641926389cb84ab0fd992f95aedcd6c3ef503b | 1,079 | py | Python | tests/test_regions.py | luigialberti/pytriangle | 99ecafc299a692ef0f33e262bc7a1c912d3aa694 | [
"MIT"
] | null | null | null | tests/test_regions.py | luigialberti/pytriangle | 99ecafc299a692ef0f33e262bc7a1c912d3aa694 | [
"MIT"
] | null | null | null | tests/test_regions.py | luigialberti/pytriangle | 99ecafc299a692ef0f33e262bc7a1c912d3aa694 | [
"MIT"
] | null | null | null | import math
import triangle
import numpy
pointBoundary = [ (-1, -1),
(-1, 1.0),
( 0, 1.0),
( 0, -1),
( 1, 1),
( 1, -3)]
points = pointBoundary
segs = [(0, 1),(1, 2),(2, 3),(3, 0), (2, 4), (4, 5), (5, 3)]
# these are ph... | 22.957447 | 77 | 0.586654 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 465 | 0.430955 |
a66424d83bcda18d8f44b788187e695f8de567b5 | 183 | py | Python | utilities/colormap/prepare_arduino_colormap.py | gauravmm/Remote-Temperature-Monitor | e3695a44dc30e5c013871e303ae8f6fdf481bf04 | [
"MIT"
] | null | null | null | utilities/colormap/prepare_arduino_colormap.py | gauravmm/Remote-Temperature-Monitor | e3695a44dc30e5c013871e303ae8f6fdf481bf04 | [
"MIT"
] | null | null | null | utilities/colormap/prepare_arduino_colormap.py | gauravmm/Remote-Temperature-Monitor | e3695a44dc30e5c013871e303ae8f6fdf481bf04 | [
"MIT"
] | null | null | null | import colormaps as cmaps
cmap = cmaps._inferno_data;
for i,r in enumerate(cmap):
if i % 2 == 0:
print "{%s}," % ",\t".join(str(int(round(v * 255))) for v in r);
| 22.875 | 73 | 0.557377 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 0.065574 |
a665215b275a48c5f84ca29a35c2258cf294cefc | 4,703 | py | Python | src/Tester.py | ujjawalmisra/json-ws-test | bece383d414c12b8827afc59da5c7a98d4c46b0f | [
"MIT"
] | 1 | 2017-02-09T14:52:25.000Z | 2017-02-09T14:52:25.000Z | src/Tester.py | ujjawalmisra/json-ws-test | bece383d414c12b8827afc59da5c7a98d4c46b0f | [
"MIT"
] | null | null | null | src/Tester.py | ujjawalmisra/json-ws-test | bece383d414c12b8827afc59da5c7a98d4c46b0f | [
"MIT"
] | null | null | null | import argparse
import json
import pprint
import Logger
from executors.EndLoopExecutor import EndLoopExecutor
from executors.ExecutorFactory import ExecutorFactory
from DictUtils import DictUtils
class Tester:
__LOGGER = Logger.getLogger('Tester')
def __init__(self, configFilePath):
Tester.... | 37.624 | 94 | 0.51818 | 4,252 | 0.904104 | 0 | 0 | 0 | 0 | 0 | 0 | 887 | 0.188603 |
a6656df6119176760b7920afa00e05c68143461d | 6,448 | py | Python | herald.py | z33kz33k/warriors | 7730557a0770058419b7b8d36888d9b5d883e066 | [
"MIT"
] | null | null | null | herald.py | z33kz33k/warriors | 7730557a0770058419b7b8d36888d9b5d883e066 | [
"MIT"
] | null | null | null | herald.py | z33kz33k/warriors | 7730557a0770058419b7b8d36888d9b5d883e066 | [
"MIT"
] | null | null | null | """
Functions bundled in this module make various announcements about the current game state to the standard output
"""
import math
def introduce_battle(attacker, defender):
print()
print("********* BATTLE *********")
print("Two brave warriors came to fight today:")
print(str(attacker))
print(str... | 45.408451 | 299 | 0.623604 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,825 | 0.283033 |
a6663eeb6a9d4fc56840a93b4bd7b39452405d4b | 68 | py | Python | AKDSFramework/__init__.py | DeepNet-Research/AKDSFramework | a0b9fc2466b228ea6053b9f03e1d497462567a96 | [
"MIT"
] | 13 | 2020-11-03T00:07:43.000Z | 2021-12-31T04:18:03.000Z | AKDSFramework/__init__.py | DeepNet-Research/AKDSFramework | a0b9fc2466b228ea6053b9f03e1d497462567a96 | [
"MIT"
] | 2 | 2021-03-06T12:20:33.000Z | 2021-03-07T04:26:29.000Z | AKDSFramework/__init__.py | DeepNet-Research/AKDSFramework | a0b9fc2466b228ea6053b9f03e1d497462567a96 | [
"MIT"
] | 2 | 2020-11-03T23:13:53.000Z | 2021-02-24T13:16:02.000Z | from . import structure, applications, error
__version__ = '1.0.0'
| 17 | 44 | 0.735294 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | 0.102941 |
a666a0e5f19e2e19dcb19fdfde8d96921a4a61f8 | 9,912 | py | Python | tests/test_as_json_p.py | malexer/flask-json | ef7c20f9f5e9bc82f13243290df1eddb3733738c | [
"BSD-3-Clause"
] | 41 | 2015-04-23T21:33:26.000Z | 2021-12-10T01:25:16.000Z | tests/test_as_json_p.py | malexer/flask-json | ef7c20f9f5e9bc82f13243290df1eddb3733738c | [
"BSD-3-Clause"
] | 7 | 2015-09-27T06:34:12.000Z | 2021-11-21T04:44:33.000Z | tests/test_as_json_p.py | malexer/flask-json | ef7c20f9f5e9bc82f13243290df1eddb3733738c | [
"BSD-3-Clause"
] | 18 | 2015-09-26T12:11:20.000Z | 2021-07-02T16:21:22.000Z | """
This module provides tests for @as_json_p() decorator.
"""
import sys
import pytest
from werkzeug.exceptions import BadRequest
from flask import Response, json
from flask_json import json_response, _json_p_handler, as_json_p
@pytest.fixture
def theapp(app):
# Disable pretty print to have smaller result string... | 39.177866 | 79 | 0.55801 | 9,045 | 0.91253 | 0 | 0 | 2,841 | 0.286622 | 0 | 0 | 3,011 | 0.303773 |
a666e2b483e7e338818d32db2cd3f68b92fb8795 | 7,504 | py | Python | tests/L0/run_transformer/run_gpt_minimal_test.py | jpool-nv/apex | d36397d2b8ce5c8854997e4ec2828e056e8fda89 | [
"BSD-3-Clause"
] | null | null | null | tests/L0/run_transformer/run_gpt_minimal_test.py | jpool-nv/apex | d36397d2b8ce5c8854997e4ec2828e056e8fda89 | [
"BSD-3-Clause"
] | null | null | null | tests/L0/run_transformer/run_gpt_minimal_test.py | jpool-nv/apex | d36397d2b8ce5c8854997e4ec2828e056e8fda89 | [
"BSD-3-Clause"
] | 1 | 2021-12-20T00:49:01.000Z | 2021-12-20T00:49:01.000Z | from functools import partial
from typing import List
import time
import torch
from apex.transformer import parallel_state
from apex.transformer.tensor_parallel import model_parallel_cuda_manual_seed
from apex.transformer.pipeline_parallel.utils import setup_microbatch_calculator
from apex.transformer.pipeli... | 38.482051 | 244 | 0.678971 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,112 | 0.148188 |
a667624b7f6ad6a76fa1c32f9b8be7619f67e985 | 92 | py | Python | test.py | towarischtsch/siproll | e3efd5f874d8ccb2c89a2947418759e447403861 | [
"MIT"
] | 1 | 2020-08-07T00:32:21.000Z | 2020-08-07T00:32:21.000Z | test.py | towarischtsch/siproll | e3efd5f874d8ccb2c89a2947418759e447403861 | [
"MIT"
] | null | null | null | test.py | towarischtsch/siproll | e3efd5f874d8ccb2c89a2947418759e447403861 | [
"MIT"
] | null | null | null | import siproll
import sys
siproll.do_call("sip:"+ sys.argv[1] + "@voip.eventphone.de", 60)
| 18.4 | 64 | 0.706522 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 27 | 0.293478 |
a6686f130b7b18b5246514e791fb407dc6aced56 | 8,143 | py | Python | src/04/bayes.py | LittleNewton/Data_Mining_Report | 4f91c238cdb2faa733af0de332beea0964cc2caf | [
"Apache-2.0"
] | 1 | 2020-10-29T13:33:57.000Z | 2020-10-29T13:33:57.000Z | src/04/bayes.py | LittleNewton/Data_Mining_Report | 4f91c238cdb2faa733af0de332beea0964cc2caf | [
"Apache-2.0"
] | null | null | null | src/04/bayes.py | LittleNewton/Data_Mining_Report | 4f91c238cdb2faa733af0de332beea0964cc2caf | [
"Apache-2.0"
] | null | null | null | # Load libraries
import pandas
import numpy as np
import scipy.stats as stats
import matplotlib.pyplot as plt
from sklearn import model_selection # 模型比较和选择包
from sklearn.naive_bayes import GaussianNB
class Bayes_Test():
# 读取样本 数据集
def load_dataset(self):
url = 'Iris.csv'
names = ['sepal-lengt... | 31.319231 | 91 | 0.518728 | 868 | 0.094822 | 0 | 0 | 0 | 0 | 0 | 0 | 2,221 | 0.242626 |
a66b9ccf2bf348065b63a0f36a81c1cbb5d98f94 | 2,175 | py | Python | SampleFunctionAPI/services/dummy_data.py | ms-us-rcg-app-innovation/secure-retail-chat-bot | 486c35ca1a0e63dfcbf8f1ad46081f7f3ffc9f44 | [
"MIT"
] | null | null | null | SampleFunctionAPI/services/dummy_data.py | ms-us-rcg-app-innovation/secure-retail-chat-bot | 486c35ca1a0e63dfcbf8f1ad46081f7f3ffc9f44 | [
"MIT"
] | null | null | null | SampleFunctionAPI/services/dummy_data.py | ms-us-rcg-app-innovation/secure-retail-chat-bot | 486c35ca1a0e63dfcbf8f1ad46081f7f3ffc9f44 | [
"MIT"
] | null | null | null | data = {
"recent_sales": [
{
"id": 1,
"item": 'shirt',
"size": 'large',
"color": 'blue',
"price": '13.99'
},
{
"id": 2,
"item": 'shirt',
"size": 'large',
"color": 'orange',
"price": '15.99'
},
{
"i... | 19.419643 | 49 | 0.388046 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 729 | 0.335172 |
a66b9f7d8fd4fa6e0e8466e1fbc8a8bfb48006d8 | 1,695 | py | Python | tests/unit/test_binary_tree.py | ali92hm/data-structure-implementation | c0b0bd7d711db3085312565dc509c6d8efad03fa | [
"MIT"
] | null | null | null | tests/unit/test_binary_tree.py | ali92hm/data-structure-implementation | c0b0bd7d711db3085312565dc509c6d8efad03fa | [
"MIT"
] | null | null | null | tests/unit/test_binary_tree.py | ali92hm/data-structure-implementation | c0b0bd7d711db3085312565dc509c6d8efad03fa | [
"MIT"
] | null | null | null | import pytest
from data_structure_implementation.binary_tree import BinaryTree, BinaryTreeNode
class TestBinaryTree:
@pytest.fixture
def gen_tree(self) -> BinaryTree[int]:
root = BinaryTreeNode(
25,
BinaryTreeNode(
15,
BinaryTreeNode(10, Binary... | 36.847826 | 82 | 0.639528 | 1,596 | 0.941593 | 0 | 0 | 931 | 0.549263 | 0 | 0 | 21 | 0.012389 |
a66d35e9c6f79553a73555c39661a31163d7a94c | 16,851 | py | Python | src/auth/wxapi/wechat_api.py | zeroleo12345/authen | 700e5b6842aecc61c0a3f96bd5ef480fbeecbc46 | [
"MIT"
] | null | null | null | src/auth/wxapi/wechat_api.py | zeroleo12345/authen | 700e5b6842aecc61c0a3f96bd5ef480fbeecbc46 | [
"MIT"
] | null | null | null | src/auth/wxapi/wechat_api.py | zeroleo12345/authen | 700e5b6842aecc61c0a3f96bd5ef480fbeecbc46 | [
"MIT"
] | 1 | 2019-11-13T05:59:35.000Z | 2019-11-13T05:59:35.000Z | #coding:utf-8
import sys
import traceback
import time
import datetime
import pytz
import base64
import binascii
import hashlib
# 第三方库
from flask import Flask, request, redirect, jsonify, session, abort, render_template, Response
from decouple import config
# 自己的库
from mybase.mylog3 import log
from mybase.myencrypt2 im... | 46.808333 | 499 | 0.600142 | 12,886 | 0.74147 | 0 | 0 | 16,009 | 0.921169 | 0 | 0 | 6,321 | 0.363715 |
a66da1cf042e3419a188397e4e43b785aa423282 | 935 | py | Python | main.py | TheRockerfly/weather_app | 60e9dd8e535c0dfc318c8064bce6b31492943e93 | [
"MIT"
] | null | null | null | main.py | TheRockerfly/weather_app | 60e9dd8e535c0dfc318c8064bce6b31492943e93 | [
"MIT"
] | 1 | 2021-06-02T01:44:04.000Z | 2021-06-02T01:44:04.000Z | main.py | TheRockerfly/weather_app | 60e9dd8e535c0dfc318c8064bce6b31492943e93 | [
"MIT"
] | null | null | null | from pprint import pprint as pp
from flask import Flask, render_template, request
from module.weather import query_api
app = Flask(__name__)
@app.route('/')
def index():
return render_template(
'weather.html',
data=[{'name': 'Toronto'}, {'name': 'Montreal'}, {'name': 'Calgary'},
{'n... | 25.27027 | 80 | 0.571123 | 0 | 0 | 0 | 0 | 734 | 0.785027 | 0 | 0 | 262 | 0.280214 |
a66e33c225390d6454c298d14ea6a0904b017ead | 426 | py | Python | challengenews/migrations/0005_alter_articles_slug.py | scpaes/jungledevs-challenge | 188bc7a4aacbb278a9486c57685db53be0477d51 | [
"MIT"
] | null | null | null | challengenews/migrations/0005_alter_articles_slug.py | scpaes/jungledevs-challenge | 188bc7a4aacbb278a9486c57685db53be0477d51 | [
"MIT"
] | 6 | 2021-08-10T02:19:35.000Z | 2021-08-10T02:24:05.000Z | challengenews/migrations/0005_alter_articles_slug.py | scpaes/jungledevs-challenge | 188bc7a4aacbb278a9486c57685db53be0477d51 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.6 on 2021-08-15 04:36
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('challengenews', '0004_articles_slug'),
]
operations = [
migrations.AlterField(
model_name='articles',
name='slug',
... | 22.421053 | 89 | 0.610329 | 333 | 0.78169 | 0 | 0 | 0 | 0 | 0 | 0 | 112 | 0.262911 |
a66f409d426b89c09b0d5bd141819f3ea9e8e14f | 5,094 | py | Python | gocardless_pro/services/customer_bank_accounts_service.py | gdvalderrama/gocardless-pro-python | 0ff8001f5bba11673c4fa0f30d26eca61a1219ba | [
"MIT"
] | null | null | null | gocardless_pro/services/customer_bank_accounts_service.py | gdvalderrama/gocardless-pro-python | 0ff8001f5bba11673c4fa0f30d26eca61a1219ba | [
"MIT"
] | null | null | null | gocardless_pro/services/customer_bank_accounts_service.py | gdvalderrama/gocardless-pro-python | 0ff8001f5bba11673c4fa0f30d26eca61a1219ba | [
"MIT"
] | null | null | null | # WARNING: Do not edit by hand, this file was generated by Crank:
#
# https://github.com/gocardless/crank
#
from . import base_service
from .. import resources
from ..paginator import Paginator
from .. import errors
class CustomerBankAccountsService(base_service.BaseService):
"""Service class that provides acce... | 31.060976 | 90 | 0.586965 | 4,870 | 0.956027 | 0 | 0 | 0 | 0 | 0 | 0 | 2,650 | 0.52022 |
a66ffc143e72f7f83e2cb123a1a619264f32be49 | 295 | py | Python | datasets/mmdet_tusimple/mmdet/core/bbox/iou_calculators/__init__.py | Jinming-Su/SGNet | fcf35edaf332c1a4e2713acad5a0fc0e21509c3e | [
"MIT"
] | 13 | 2021-10-15T15:14:45.000Z | 2022-03-09T00:22:55.000Z | datasets/mmdet_tusimple/mmdet/core/bbox/iou_calculators/__init__.py | Jinming-Su/SGNet | fcf35edaf332c1a4e2713acad5a0fc0e21509c3e | [
"MIT"
] | 4 | 2021-10-17T09:04:20.000Z | 2022-03-25T06:43:00.000Z | datasets/mmdet_tusimple/mmdet/core/bbox/iou_calculators/__init__.py | Jinming-Su/SGNet | fcf35edaf332c1a4e2713acad5a0fc0e21509c3e | [
"MIT"
] | 2 | 2021-11-17T11:31:35.000Z | 2021-11-29T06:50:35.000Z | from .builder import build_iou_calculator
from .iou2d_calculator import BboxOverlaps2D, bbox_overlaps
from .dis_calculator import Dis, bbox_dis
from .riou_calculator import RboxOverlaps2D
__all__ = ['build_iou_calculator', 'BboxOverlaps2D', 'bbox_overlaps', 'Dis', 'bbox_dis', 'RboxOverlaps2D']
| 49.166667 | 106 | 0.823729 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 84 | 0.284746 |
a67191887ff2e4cbe5a722f8867e0bdf2eaf5490 | 1,256 | py | Python | audio/tests/backends/base.py | jerryuhoo/PaddleSpeech | 1eec7b5e042da294c7524af92f0fae4c32a71aa3 | [
"Apache-2.0"
] | 1,379 | 2021-11-10T02:42:21.000Z | 2022-03-31T13:34:25.000Z | audio/tests/backends/base.py | jerryuhoo/PaddleSpeech | 1eec7b5e042da294c7524af92f0fae4c32a71aa3 | [
"Apache-2.0"
] | 268 | 2021-11-10T14:07:34.000Z | 2022-03-31T02:25:20.000Z | audio/tests/backends/base.py | jerryuhoo/PaddleSpeech | 1eec7b5e042da294c7524af92f0fae4c32a71aa3 | [
"Apache-2.0"
] | 296 | 2021-11-15T02:37:11.000Z | 2022-03-31T12:14:46.000Z | # Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 35.885714 | 77 | 0.725318 | 441 | 0.351115 | 0 | 0 | 0 | 0 | 0 | 0 | 708 | 0.563694 |
a671fe0e76961bcf5c4e0d73d1fd01eb4c998058 | 6,091 | py | Python | 07keras/09fasttext_multi_classification.py | KEVINYZY/python-tutorial | ae43536908eb8af56c34865f52a6e8644edc4fa3 | [
"Apache-2.0"
] | 2 | 2021-01-04T10:44:44.000Z | 2022-02-13T07:53:41.000Z | 07keras/09fasttext_multi_classification.py | zm79287/python-tutorial | d0f7348e1da4ff954e3add66e1aae55d599283ee | [
"Apache-2.0"
] | null | null | null | 07keras/09fasttext_multi_classification.py | zm79287/python-tutorial | d0f7348e1da4ff954e3add66e1aae55d599283ee | [
"Apache-2.0"
] | 2 | 2020-11-23T08:58:51.000Z | 2022-02-13T07:53:42.000Z | # -*- coding: utf-8 -*-
# Author: XuMing <xuming624@qq.com>
# Brief: This example demonstrates the use of fasttext for text classification
# Bi-gram : 0.9056 test accuracy after 5 epochs.
import os
import keras
import numpy as np
from keras.layers import Dense
from keras.layers import Embedding
from keras.layers impor... | 34.805714 | 102 | 0.67099 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,796 | 0.294861 |
a673b3a3ead6195386323a5ae506ff90585ffcf7 | 529 | py | Python | tests/deployment/test_deployment.py | ChristianHinge/ml_ops_project_lectures | 34c8cd222526d1af0db3998bfc993fbdccef5b16 | [
"MIT"
] | null | null | null | tests/deployment/test_deployment.py | ChristianHinge/ml_ops_project_lectures | 34c8cd222526d1af0db3998bfc993fbdccef5b16 | [
"MIT"
] | null | null | null | tests/deployment/test_deployment.py | ChristianHinge/ml_ops_project_lectures | 34c8cd222526d1af0db3998bfc993fbdccef5b16 | [
"MIT"
] | null | null | null | import requests
import json
import torch
import numpy as np
x_new = np.zeros((1,1,28,28))
# Convert the array to a serializable list in a JSON document
input_json = json.dumps({"data": x_new.tolist()})
# Set the content type
headers = { 'Content-Type':'application/json' }
predictions = requests.post("http://127.0.0.... | 29.388889 | 89 | 0.727788 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 162 | 0.306238 |
a67495135f219838eddc7cc161b252690978c0c7 | 3,943 | py | Python | app.py | yeojin-dev/leo | 20e4bd7dbd409bee8ff26a713f83cfb3d0a443ba | [
"MIT"
] | null | null | null | app.py | yeojin-dev/leo | 20e4bd7dbd409bee8ff26a713f83cfb3d0a443ba | [
"MIT"
] | null | null | null | app.py | yeojin-dev/leo | 20e4bd7dbd409bee8ff26a713f83cfb3d0a443ba | [
"MIT"
] | null | null | null | import datetime
import os
import uuid
from urllib.parse import urlparse
import slack
from flask import (
Flask,
jsonify,
render_template,
request,
send_from_directory,
)
from flask.cli import load_dotenv
from pymongo import MongoClient
from pytz import timezone
app = Flask(__name__)
load_dotenv()
... | 33.134454 | 103 | 0.67512 | 0 | 0 | 0 | 0 | 2,797 | 0.6847 | 0 | 0 | 1,149 | 0.281273 |
a675137fe059ab035f6c8c74928e31aa79eec616 | 961 | py | Python | scrapy_store_project/goods/tasks.py | MaksNech/pylab2018_ht_22 | 5c862b23203e93bf4cbdf5f1e5777f29052f2f69 | [
"MIT"
] | null | null | null | scrapy_store_project/goods/tasks.py | MaksNech/pylab2018_ht_22 | 5c862b23203e93bf4cbdf5f1e5777f29052f2f69 | [
"MIT"
] | 10 | 2020-02-11T23:54:49.000Z | 2022-03-11T23:42:36.000Z | scrapy_store_project/goods/tasks.py | MaksNech/pylab2018_ht_22 | 5c862b23203e93bf4cbdf5f1e5777f29052f2f69 | [
"MIT"
] | 1 | 2020-12-02T09:32:19.000Z | 2020-12-02T09:32:19.000Z | import requests
import tempfile
from celery.task import task
from django.core import files
from celery.utils.log import get_task_logger
from .models import Bag
logger = get_task_logger(__name__)
@task(
name="save_goods_to_db"
)
def save_goods_to_db(items_list):
for item in items_list:
bag = Bag(
... | 24.025 | 58 | 0.591051 | 0 | 0 | 0 | 0 | 761 | 0.791883 | 0 | 0 | 82 | 0.085328 |
a6753cc917302d9905a242a41ec0d71e8e1a5d5d | 1,408 | py | Python | core/migrations/0002_foodweight.py | MakuZo/nutrigo | e50e10d497bcf9e01294565d42012d777f5c98d0 | [
"MIT"
] | 30 | 2019-03-28T18:01:58.000Z | 2022-02-26T02:19:28.000Z | core/migrations/0002_foodweight.py | MakuZo/nutrigo | e50e10d497bcf9e01294565d42012d777f5c98d0 | [
"MIT"
] | 8 | 2019-06-06T19:33:08.000Z | 2022-02-10T13:10:34.000Z | core/migrations/0002_foodweight.py | MakuZo/nutrigo | e50e10d497bcf9e01294565d42012d777f5c98d0 | [
"MIT"
] | 10 | 2019-04-04T19:19:28.000Z | 2021-06-05T05:29:40.000Z | # Generated by Django 2.1.5 on 2019-02-09 18:55
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [("core", "0001_initial")]
operations = [
migrations.CreateModel(
name="FoodWeight",
fields=[
... | 32 | 83 | 0.440341 | 1,282 | 0.910511 | 0 | 0 | 0 | 0 | 0 | 0 | 155 | 0.110085 |
a67579557fd6c58769b6d554c5405a8d2d779881 | 236 | py | Python | tests/unit/cli/conftest.py | trainML/trainml-cli | 3065ed4cacf415964bcfc8c3854dd8acbc3729c5 | [
"MIT"
] | 1 | 2021-02-11T16:08:05.000Z | 2021-02-11T16:08:05.000Z | tests/unit/cli/conftest.py | trainML/trainml-cli | 3065ed4cacf415964bcfc8c3854dd8acbc3729c5 | [
"MIT"
] | 1 | 2021-05-04T00:20:28.000Z | 2021-07-07T16:21:35.000Z | tests/unit/cli/conftest.py | trainML/trainml-cli | 3065ed4cacf415964bcfc8c3854dd8acbc3729c5 | [
"MIT"
] | null | null | null | from click.testing import CliRunner
from pytest import fixture, mark
from unittest.mock import Mock, AsyncMock, patch, create_autospec
pytestmark = [mark.cli,mark.unit]
@fixture
def runner():
runner = CliRunner()
yield runner | 21.454545 | 65 | 0.762712 | 0 | 0 | 55 | 0.233051 | 64 | 0.271186 | 0 | 0 | 0 | 0 |
a6762cb2023d77e741f45f1530edf25cc49e8843 | 2,835 | py | Python | bokeh-app/main.py | jdkent/hrfViz | ab9cf3587cd8387388550f3bef3086ff866a7559 | [
"BSD-3-Clause"
] | null | null | null | bokeh-app/main.py | jdkent/hrfViz | ab9cf3587cd8387388550f3bef3086ff866a7559 | [
"BSD-3-Clause"
] | null | null | null | bokeh-app/main.py | jdkent/hrfViz | ab9cf3587cd8387388550f3bef3086ff866a7559 | [
"BSD-3-Clause"
] | null | null | null | ''' Present an interactive function explorer with slider widgets.
Scrub the sliders to change the properties of the ``hrf`` curve, or
type into the title text box to update the title of the plot.
Use the ``bokeh serve`` command to run the example by executing:
bokeh serve sliders.py
at your command prompt. Then nav... | 33.75 | 96 | 0.699824 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 718 | 0.253263 |
a67778c67ef1eefa67194e04daebceb9183fd006 | 682 | py | Python | python-leetcode/laozhang/tree/leetcode_814_.py | sweeneycai/cs-summary-reflection | c4220b153baa6b1b93a11c7e5637d42e3429481f | [
"Apache-2.0"
] | 227 | 2019-04-09T00:36:00.000Z | 2022-03-29T05:05:03.000Z | python-leetcode/laozhang/tree/leetcode_814_.py | sweeneycai/cs-summary-reflection | c4220b153baa6b1b93a11c7e5637d42e3429481f | [
"Apache-2.0"
] | 139 | 2019-06-14T01:53:11.000Z | 2022-02-16T11:08:40.000Z | python-leetcode/laozhang/tree/leetcode_814_.py | sweeneycai/cs-summary-reflection | c4220b153baa6b1b93a11c7e5637d42e3429481f | [
"Apache-2.0"
] | 89 | 2019-04-10T07:00:54.000Z | 2022-03-23T01:36:03.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# coding=utf-8
"""
814. 二叉树剪枝
"""
from laozhang import TreeNode
class Solution:
def pruneTree(self, root: TreeNode) -> TreeNode:
def helper(root: TreeNode) -> TreeNode:
if root:
helper(root.left)
helper(root.right)... | 28.416667 | 107 | 0.530792 | 568 | 0.820809 | 0 | 0 | 0 | 0 | 0 | 0 | 87 | 0.125723 |
a6777a5db732418a0a72fdae43c10c8041048b60 | 4,816 | py | Python | .pyinstaller/run_astropy_tests.py | lmichel/astropy | 67f944f6145ae4899e7bf6e335ffcb24c9493ac3 | [
"BSD-3-Clause"
] | null | null | null | .pyinstaller/run_astropy_tests.py | lmichel/astropy | 67f944f6145ae4899e7bf6e335ffcb24c9493ac3 | [
"BSD-3-Clause"
] | null | null | null | .pyinstaller/run_astropy_tests.py | lmichel/astropy | 67f944f6145ae4899e7bf6e335ffcb24c9493ac3 | [
"BSD-3-Clause"
] | null | null | null | import os
import shutil
import sys
import erfa # noqa
import pytest
import astropy # noqa
if len(sys.argv) == 3 and sys.argv[1] == '--astropy-root':
ROOT = sys.argv[2]
else:
# Make sure we don't allow any arguments to be passed - some tests call
# sys.executable which becomes this script when producing... | 44.592593 | 95 | 0.648463 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,763 | 0.573713 |
a67b1d8de6adb0040480f42eafab24154419c297 | 425 | py | Python | encrypt_decrypt_app/migrations/0019_auto_20200727_0833.py | Chika-Jinanwa/chikas-cipher | 91e7139f11132c885bd8872d705ffe3d0ca51b7d | [
"MIT"
] | null | null | null | encrypt_decrypt_app/migrations/0019_auto_20200727_0833.py | Chika-Jinanwa/chikas-cipher | 91e7139f11132c885bd8872d705ffe3d0ca51b7d | [
"MIT"
] | 9 | 2021-03-30T14:05:43.000Z | 2022-03-12T00:44:58.000Z | encrypt_decrypt_app/migrations/0019_auto_20200727_0833.py | Chika-Jinanwa/chikas-cipher | 91e7139f11132c885bd8872d705ffe3d0ca51b7d | [
"MIT"
] | null | null | null | # Generated by Django 3.0.8 on 2020-07-27 15:33
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('encrypt_decrypt_app', '0018_ciphergame_solved'),
]
operations = [
migrations.AlterField(
model_name='ciphergame',
na... | 22.368421 | 74 | 0.616471 | 332 | 0.781176 | 0 | 0 | 0 | 0 | 0 | 0 | 118 | 0.277647 |
a67cead0877f8b98f05986d181f9f977da542551 | 333 | py | Python | analyzer/migrations/0006_remove_attachment_added_by.py | JackShen1/sentimento-web | 19d1973c555fe7d8b745d5ce23555c0fd8c479e2 | [
"MIT"
] | 1 | 2021-04-02T10:00:28.000Z | 2021-04-02T10:00:28.000Z | analyzer/migrations/0006_remove_attachment_added_by.py | JackShen1/sentimento-web | 19d1973c555fe7d8b745d5ce23555c0fd8c479e2 | [
"MIT"
] | null | null | null | analyzer/migrations/0006_remove_attachment_added_by.py | JackShen1/sentimento-web | 19d1973c555fe7d8b745d5ce23555c0fd8c479e2 | [
"MIT"
] | null | null | null | # Generated by Django 3.2 on 2021-04-26 10:27
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('analyzer', '0005_auto_20210425_2245'),
]
operations = [
migrations.RemoveField(
model_name='attachment',
name='added_by',
... | 18.5 | 48 | 0.600601 | 250 | 0.750751 | 0 | 0 | 0 | 0 | 0 | 0 | 102 | 0.306306 |
a680b15fd060d64cf9e6fa6cd3e6835e870e01ee | 5,109 | py | Python | DataManagements/UserCatesDBManagement.py | CHUht/Hangout_Recommendations | 477752da8259e821bb58487cdb9d483a6b208a3f | [
"MIT"
] | 2 | 2020-02-03T22:08:15.000Z | 2021-03-11T18:37:47.000Z | DataManagements/UserCatesDBManagement.py | CHUht/Hangout_Recommendations_Back_End | 477752da8259e821bb58487cdb9d483a6b208a3f | [
"MIT"
] | null | null | null | DataManagements/UserCatesDBManagement.py | CHUht/Hangout_Recommendations_Back_End | 477752da8259e821bb58487cdb9d483a6b208a3f | [
"MIT"
] | null | null | null | import sqlite3
from DataManagements.BackendAPIStaticList import singleton
from DataManagements.BackendAPIStaticList import cate_map
@singleton
class UserCatesManager:
def __init__(self):
pass
def dbconnect(self):
"""
connect to the database
:return: None
"""
sel... | 30.963636 | 83 | 0.562145 | 4,475 | 0.875905 | 0 | 0 | 4,486 | 0.878058 | 0 | 0 | 2,150 | 0.420826 |
a683a3c1e348a3f60fd5ed371539e1911665f6e6 | 2,255 | py | Python | pupillae/fons/generator/dice_roller.py | chomouri/pupillae | 7c178eee78e5bff224c8982ca0a3674ea8830e55 | [
"MIT"
] | null | null | null | pupillae/fons/generator/dice_roller.py | chomouri/pupillae | 7c178eee78e5bff224c8982ca0a3674ea8830e55 | [
"MIT"
] | null | null | null | pupillae/fons/generator/dice_roller.py | chomouri/pupillae | 7c178eee78e5bff224c8982ca0a3674ea8830e55 | [
"MIT"
] | null | null | null | import random
import re
# Third-party modules:
# Local modules:
# Function WAI:
def roll_3d6():
"""Rolls 3d6"""
total = 0
for i in range(3):
roll = random.randint(1, 6)
# print(f"Rolling 1d6: {roll}")
total += roll
return total
# Function WAI:
def roll_4d6d():
"""Rolls 4d6... | 27.5 | 77 | 0.536585 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 570 | 0.252772 |
a684db8114e6f751f36ca0a1f53bcfc8192318de | 3,088 | py | Python | tests/test_swaplink.py | aratz-lasa/py-swaplink | a1821953704215648749ccde65d6c4d9201998af | [
"MIT"
] | 1 | 2019-10-21T08:54:32.000Z | 2019-10-21T08:54:32.000Z | tests/test_swaplink.py | aratz-lasa/py-swaplink | a1821953704215648749ccde65d6c4d9201998af | [
"MIT"
] | 1 | 2021-06-02T00:33:01.000Z | 2021-06-02T00:33:01.000Z | tests/test_swaplink.py | aratz-lasa/py-swaplink | a1821953704215648749ccde65d6c4d9201998af | [
"MIT"
] | null | null | null | import asyncio
import random
from asyncio import Event
from typing import List, Any
import pytest
from swaplink import defaults
from tests.utils import setup_network_by_relative_loads
# for speeding up tests
defaults.HBEAT_SEND_FREQUENCY *= 0.3
defaults.HBEAT_CHECK_FREQUENCY *= 0.3
defaults.RPC_TIMEOUT *= 0.3
@pyt... | 29.692308 | 82 | 0.731865 | 0 | 0 | 0 | 0 | 2,762 | 0.89443 | 2,678 | 0.867228 | 146 | 0.04728 |
a685097fe33f7cb01421c71457d5d7a015032c99 | 110 | py | Python | Python/Curos_Python_curemvid/Exercicios_dos_videos/Ex005.py | Jhonattan-rocha/Meus-primeiros-programas | f5971b66c0afd049b5d0493e8b7a116b391d058e | [
"MIT"
] | null | null | null | Python/Curos_Python_curemvid/Exercicios_dos_videos/Ex005.py | Jhonattan-rocha/Meus-primeiros-programas | f5971b66c0afd049b5d0493e8b7a116b391d058e | [
"MIT"
] | null | null | null | Python/Curos_Python_curemvid/Exercicios_dos_videos/Ex005.py | Jhonattan-rocha/Meus-primeiros-programas | f5971b66c0afd049b5d0493e8b7a116b391d058e | [
"MIT"
] | null | null | null | n = int(input("Digite um número: "))
print("O anecessor do número é {} e o sucessor é {} ".format(n-1, n+1))
| 27.5 | 71 | 0.618182 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 71 | 0.622807 |
a6850dc67dbc459d1feab97522a0718104e78923 | 846 | py | Python | opening_window.py | m3hrab/Snake-and-ladder-game | bc69d280eb893eb658701218b7b42e321e5c41f3 | [
"MIT"
] | 1 | 2021-10-04T04:01:49.000Z | 2021-10-04T04:01:49.000Z | opening_window.py | m3hrab/Snake-and-Ladder-game | bc69d280eb893eb658701218b7b42e321e5c41f3 | [
"MIT"
] | null | null | null | opening_window.py | m3hrab/Snake-and-Ladder-game | bc69d280eb893eb658701218b7b42e321e5c41f3 | [
"MIT"
] | null | null | null | import pygame
import time
class Intro():
"""
A class that represent opening window of the game
and this window hold the play button, music button,
game sound button
"""
def __init__(self,screen):
self.screen = screen
def show_open_window(self):
# load the i... | 24.171429 | 60 | 0.599291 | 794 | 0.938534 | 0 | 0 | 0 | 0 | 0 | 0 | 307 | 0.362884 |
a68586830537b4c7d2e69cd8efe90faed5602e2b | 13,741 | py | Python | gewittergefahr/scripts/deep_learning_helper.py | dopplerchase/GewitterGefahr | 4415b08dd64f37eba5b1b9e8cc5aa9af24f96593 | [
"MIT"
] | 26 | 2018-10-04T01:07:35.000Z | 2022-01-29T08:49:32.000Z | gewittergefahr/scripts/deep_learning_helper.py | liuximarcus/GewitterGefahr | d819874d616f98a25187bfd3091073a2e6d5279e | [
"MIT"
] | 4 | 2017-12-25T02:01:08.000Z | 2018-12-19T01:54:21.000Z | gewittergefahr/scripts/deep_learning_helper.py | liuximarcus/GewitterGefahr | d819874d616f98a25187bfd3091073a2e6d5279e | [
"MIT"
] | 11 | 2017-12-10T23:05:29.000Z | 2022-01-29T08:49:33.000Z | """Handles input args for training deep-learning models."""
import numpy
from gewittergefahr.gg_utils import soundings
from gewittergefahr.deep_learning import cnn
from gewittergefahr.deep_learning import deep_learning_utils as dl_utils
TIME_FORMAT = '%Y-%m-%d-%H%M%S'
SOUNDING_HEIGHTS_M_AGL = soundings.DEFAULT_HEIGHT... | 40.414706 | 80 | 0.755695 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,881 | 0.355214 |
a6864cff30190d27e7138fb69ceaf1b96919cb06 | 1,859 | py | Python | custom_components/rinnaitouch/__init__.py | funtastix/rinnaitouch | 272b3a4dcd8bcb66a9656c3f9ca497a74a7244b6 | [
"MIT"
] | 4 | 2022-02-17T22:26:14.000Z | 2022-03-31T05:45:53.000Z | custom_components/rinnaitouch/__init__.py | funtastix/rinnaitouch | 272b3a4dcd8bcb66a9656c3f9ca497a74a7244b6 | [
"MIT"
] | 8 | 2022-02-19T01:37:16.000Z | 2022-03-29T21:12:29.000Z | custom_components/rinnaitouch/__init__.py | funtastix/rinnaitouch | 272b3a4dcd8bcb66a9656c3f9ca497a74a7244b6 | [
"MIT"
] | null | null | null | """Set up main entity."""
# pylint: disable=duplicate-code
import logging
from dataclasses import dataclass
from homeassistant.config_entries import ConfigEntry
from homeassistant.exceptions import ConfigEntryNotReady
from homeassistant.const import CONF_HOST
from homeassistant.core import HomeAssistant
from homeassis... | 26.942029 | 95 | 0.731038 | 197 | 0.105971 | 0 | 0 | 120 | 0.064551 | 991 | 0.533082 | 279 | 0.150081 |
a686bc5588bf96d2912d72d16b95f0e69f7601c3 | 4,238 | py | Python | python/pydiffx/dom/writer.py | beanbaginc/diffx | d913b4c94fa91bdabd8083882bd1acbe451ed5f8 | [
"MIT"
] | null | null | null | python/pydiffx/dom/writer.py | beanbaginc/diffx | d913b4c94fa91bdabd8083882bd1acbe451ed5f8 | [
"MIT"
] | null | null | null | python/pydiffx/dom/writer.py | beanbaginc/diffx | d913b4c94fa91bdabd8083882bd1acbe451ed5f8 | [
"MIT"
] | 1 | 2022-02-20T16:29:08.000Z | 2022-02-20T16:29:08.000Z | """Writer for generating a DiffX file from DOM objects."""
from __future__ import unicode_literals
import six
from pydiffx.writer import DiffXWriter
from pydiffx.sections import CONTENT_SECTIONS
class DiffXDOMWriter(object):
"""A writer for generating a DiffX file from DOM objects.
This will write a :py:c... | 30.271429 | 77 | 0.596272 | 4,037 | 0.952572 | 0 | 0 | 0 | 0 | 0 | 0 | 2,301 | 0.542945 |
a687d7feca22a1b98095bff58c06be97ab2cb464 | 1,540 | py | Python | L3_numpy_pandas_2D/A_2D_data.py | angelmtenor/IDAFC | 9d23746fd02e4eda2569d75b3c7a1383277e6e78 | [
"MIT"
] | null | null | null | L3_numpy_pandas_2D/A_2D_data.py | angelmtenor/IDAFC | 9d23746fd02e4eda2569d75b3c7a1383277e6e78 | [
"MIT"
] | null | null | null | L3_numpy_pandas_2D/A_2D_data.py | angelmtenor/IDAFC | 9d23746fd02e4eda2569d75b3c7a1383277e6e78 | [
"MIT"
] | null | null | null | import numpy as np
# Subway ridership for 5 stations on 10 different days
ridership = np.array([
[0, 0, 2, 5, 0],
[1478, 3877, 3674, 2328, 2539],
[1613, 4088, 3991, 6461, 2691],
[1560, 3392, 3826, 4787, 2613],
[1608, 4802, 3932, 4477, 2705],
[1576, 3933, 3909, 4979, 2685],
[95, 229, 255, 49... | 28 | 76 | 0.63961 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 565 | 0.366883 |
a688464b1c3891545d1f144a4ff2e40f465e7ddf | 1,158 | py | Python | tests/init/feature.py | Carsten-Leue/ReduxPY | 3ca633c4d4d8a53418ee1049d571d1094feb14be | [
"MIT"
] | 13 | 2020-04-30T15:06:45.000Z | 2021-11-28T20:57:34.000Z | tests/init/feature.py | Carsten-Leue/ReduxPY | 3ca633c4d4d8a53418ee1049d571d1094feb14be | [
"MIT"
] | 4 | 2020-04-29T19:43:10.000Z | 2021-02-04T15:19:44.000Z | tests/init/feature.py | Carsten-Leue/ReduxPY | 3ca633c4d4d8a53418ee1049d571d1094feb14be | [
"MIT"
] | 4 | 2021-02-13T01:18:11.000Z | 2022-02-03T08:04:16.000Z | from typing import Any
from rx import Observable, pipe
from rx.operators import do_action, filter, map, ignore_elements
from redux import (
Epic,
Reducer,
ReduxFeatureModule,
combine_epics,
create_action,
create_feature_module,
handle_actions,
of_init_feature,
of_type,
select_ac... | 23.632653 | 78 | 0.736615 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 88 | 0.075993 |
a68903c183ba83fb6d52c10e82e9219b6946fa95 | 323 | py | Python | mac_random.py | therealedsheenan/public-spoofify | fab1c6f1dad1a1364268cbe79e55a3675470fe5c | [
"MIT"
] | null | null | null | mac_random.py | therealedsheenan/public-spoofify | fab1c6f1dad1a1364268cbe79e55a3675470fe5c | [
"MIT"
] | 4 | 2020-02-11T23:39:49.000Z | 2022-01-13T00:40:48.000Z | mac_random.py | therealedsheenan/public-spoofify | fab1c6f1dad1a1364268cbe79e55a3675470fe5c | [
"MIT"
] | null | null | null | import random
def randomMAC():
return [ 0x00, 0x16, 0x3e,
random.randint(0x00, 0x7f),
random.randint(0x00, 0xff),
random.randint(0x00, 0xff) ]
def MACprettyprint(mac):
return ':'.join(map(lambda x: "%02x" % x, mac))
def randomize():
return MACprettyprint(randomMAC()... | 21.533333 | 51 | 0.597523 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9 | 0.027864 |
a68a71c2d5af7592d3f37e6fb0303698943d7a06 | 1,698 | py | Python | lms_app/urls.py | sashanight/LMS | 8290805d9c3fd2b7ae50896ba75ee112b50619e3 | [
"MIT"
] | null | null | null | lms_app/urls.py | sashanight/LMS | 8290805d9c3fd2b7ae50896ba75ee112b50619e3 | [
"MIT"
] | null | null | null | lms_app/urls.py | sashanight/LMS | 8290805d9c3fd2b7ae50896ba75ee112b50619e3 | [
"MIT"
] | null | null | null | from django.conf.urls import url
from . import views
app_name = 'lms_app'
urlpatterns = [
url(r'^$', views.index, name='index'),
url(r'^authentication$', views.auth, name='authentication'),
url(r'^registration$', views.registration, name='registration'),
url(r'^my_profile$', views.my_profile_request,... | 58.551724 | 115 | 0.677856 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 967 | 0.569494 |
a68ae2307a359f7e47d9b87116672f1fc3da5cfb | 909 | py | Python | backend/backend/urls.py | Zhiwei1996/Todoist | c260ac051e909243395c98e8b4f45a42abb548ea | [
"MIT"
] | null | null | null | backend/backend/urls.py | Zhiwei1996/Todoist | c260ac051e909243395c98e8b4f45a42abb548ea | [
"MIT"
] | null | null | null | backend/backend/urls.py | Zhiwei1996/Todoist | c260ac051e909243395c98e8b4f45a42abb548ea | [
"MIT"
] | null | null | null | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""backend URL Configuration
"""
from django.conf.urls import include, url
from django.contrib import admin
from rest_framework.schemas import get_schema_view
from rest_framework.documentation import include_docs_urls
from todoist import views
API_TITLE = 'Todoist API'... | 31.344828 | 88 | 0.665567 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 275 | 0.30253 |
a68b28a50be4156d9050576bd63538c505309d28 | 342 | py | Python | pyvis/PIMCPy/TestRepulsive.py | b3sigma/fourd | 8df1300d9820ffa65e0df4519ce3795f1b2e7c9c | [
"MIT"
] | 20 | 2015-05-15T20:46:40.000Z | 2022-02-26T14:30:37.000Z | pyvis/PIMCPy/TestRepulsive.py | b3sigma/fourd | 8df1300d9820ffa65e0df4519ce3795f1b2e7c9c | [
"MIT"
] | null | null | null | pyvis/PIMCPy/TestRepulsive.py | b3sigma/fourd | 8df1300d9820ffa65e0df4519ce3795f1b2e7c9c | [
"MIT"
] | 3 | 2016-08-13T09:44:49.000Z | 2018-07-29T16:52:41.000Z | #!/bin/env python
import numpy
#import pylab
#import stats
from VMCHelp import *
import random
import numpy
from PIMC5 import *
numParticles=2
numTimeSlices=10
tau=0.1
lam=0.5
Path=PathClass(numParticles,numTimeSlices,tau,lam)
Path.SetCouplingConstant(1.0)
Path.SetPotential(HarmonicOscillator)
print PIMC(10000,Path,... | 17.1 | 50 | 0.815789 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 43 | 0.125731 |
a68c75b3fe9c052bf3c96144a5e5dab51f6f733d | 139 | py | Python | .ycm_extra_conf.py | jaccovanschaik/Into | 1292c913957fdcbebf291e82ee3896b1b9883e51 | [
"MIT"
] | null | null | null | .ycm_extra_conf.py | jaccovanschaik/Into | 1292c913957fdcbebf291e82ee3896b1b9883e51 | [
"MIT"
] | null | null | null | .ycm_extra_conf.py | jaccovanschaik/Into | 1292c913957fdcbebf291e82ee3896b1b9883e51 | [
"MIT"
] | null | null | null | import os
def FlagsForFile(filename, **kwargs):
return {
'flags': [
'-x', 'c11',
'-Wall', '-Wpointer-arith',
],
}
| 13.9 | 37 | 0.496403 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 40 | 0.28777 |
a68c82f5f2c8691b5638188a847f6e4c2977e2f2 | 731 | py | Python | zingkd/zingkd/models/notes.py | brukhabtu/zingk | 517bad148b39c4961885908a287cb1c7bd8b65c2 | [
"MIT"
] | null | null | null | zingkd/zingkd/models/notes.py | brukhabtu/zingk | 517bad148b39c4961885908a287cb1c7bd8b65c2 | [
"MIT"
] | 3 | 2016-07-09T22:03:40.000Z | 2016-07-28T21:15:14.000Z | zingkd/zingkd/models/notes.py | brukhabtu/zingk | 517bad148b39c4961885908a287cb1c7bd8b65c2 | [
"MIT"
] | null | null | null |
from zingkd.models.meta import Base
from sqlalchemy import Column, func
from sqlalchemy.types import Unicode, Integer, DateTime, Boolean, UnicodeText
from sqlalchemy.orm import relationship, backref
class Note(Base):
__tablename__ = 'notes'
__table_args__ = {'schema': 'zingk'}
note_id = Column(Integer,... | 34.809524 | 77 | 0.746922 | 527 | 0.72093 | 0 | 0 | 0 | 0 | 0 | 0 | 95 | 0.129959 |
a68cf4ecb5b81e1cac7d631028ac2e152c08518b | 1,192 | py | Python | secs_to_time.py | bonny1992/oneplus-notificator-fixed | 2e47d8b21b3100332f2a59b95d79b49e0d680bae | [
"Apache-2.0"
] | null | null | null | secs_to_time.py | bonny1992/oneplus-notificator-fixed | 2e47d8b21b3100332f2a59b95d79b49e0d680bae | [
"Apache-2.0"
] | null | null | null | secs_to_time.py | bonny1992/oneplus-notificator-fixed | 2e47d8b21b3100332f2a59b95d79b49e0d680bae | [
"Apache-2.0"
] | null | null | null | import math
def secs_to_time(seconds):
if seconds < 60:
return "{seconds} secondi".format(
seconds = seconds
)
else:
if int(seconds / 60 / 60 / 24) > 0:
days = seconds / 60 / 60 / 24
return "{days} giorni, {hours} ore, {minutes} minuti, {seconds} secondi".... | 37.25 | 92 | 0.494128 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 171 | 0.143456 |
a6909423f35884be1c89cea4b72e30e85d038b38 | 425 | py | Python | accounts/migrations/0005_auto_20190819_1447.py | jacobfelknor/sterling | aa4e7a22feb47814e5fae12078f4d9a849d17642 | [
"MIT"
] | null | null | null | accounts/migrations/0005_auto_20190819_1447.py | jacobfelknor/sterling | aa4e7a22feb47814e5fae12078f4d9a849d17642 | [
"MIT"
] | 22 | 2019-09-02T18:03:08.000Z | 2021-06-10T18:38:30.000Z | accounts/migrations/0005_auto_20190819_1447.py | jacobfelknor/sterling | aa4e7a22feb47814e5fae12078f4d9a849d17642 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.4 on 2019-08-19 20:47
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('accounts', '0004_auto_20190819_1441'),
]
operations = [
migrations.AlterField(
model_name='account',
n... | 22.368421 | 70 | 0.585882 | 326 | 0.767059 | 0 | 0 | 0 | 0 | 0 | 0 | 116 | 0.272941 |
a6916c2562bc34fa77693f0eed4d20bec95c048f | 140 | py | Python | hook-ctypes.macholib.py | RayFV/yuntech_netflow_check | da30a336cac24e738d5ee5bc20401e198a3b2ce7 | [
"MIT"
] | null | null | null | hook-ctypes.macholib.py | RayFV/yuntech_netflow_check | da30a336cac24e738d5ee5bc20401e198a3b2ce7 | [
"MIT"
] | null | null | null | hook-ctypes.macholib.py | RayFV/yuntech_netflow_check | da30a336cac24e738d5ee5bc20401e198a3b2ce7 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from PyInstaller.utils.hooks import copy_metadata
datas = copy_metadata('apscheduler') | 23.333333 | 50 | 0.707143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 60 | 0.428571 |
a6929cee90954c7741a45c1aea4c6b9d650cee79 | 2,042 | py | Python | backend/jobs/tests.py | k3ndr1c/ML-Platform | 35af599602f94b386f13c9ba2c0fa2b678a54375 | [
"MIT"
] | null | null | null | backend/jobs/tests.py | k3ndr1c/ML-Platform | 35af599602f94b386f13c9ba2c0fa2b678a54375 | [
"MIT"
] | null | null | null | backend/jobs/tests.py | k3ndr1c/ML-Platform | 35af599602f94b386f13c9ba2c0fa2b678a54375 | [
"MIT"
] | null | null | null | from django.contrib.auth import get_user_model
from django.test import TestCase
from django.urls import reverse
from rest_framework import status
from rest_framework.test import APIClient
from .models import Job, Prediction
from .serializers import JobSerializer, PredictionSerializer
CREATE_JOB_URL = reverse('jobs... | 30.029412 | 69 | 0.677767 | 1,447 | 0.708619 | 0 | 0 | 0 | 0 | 0 | 0 | 396 | 0.193928 |
a692ae98327126c3e0a8986910c448aaa4cdb03b | 283 | py | Python | Darlington/phase2/Data Structure/day 59 solution/qtn7.py | CodedLadiesInnovateTech/-python-challenge-solutions | 430cd3eb84a2905a286819eef384ee484d8eb9e7 | [
"MIT"
] | 6 | 2020-05-23T19:53:25.000Z | 2021-05-08T20:21:30.000Z | Darlington/phase2/Data Structure/day 59 solution/qtn7.py | CodedLadiesInnovateTech/-python-challenge-solutions | 430cd3eb84a2905a286819eef384ee484d8eb9e7 | [
"MIT"
] | 8 | 2020-05-14T18:53:12.000Z | 2020-07-03T00:06:20.000Z | Darlington/phase2/Data Structure/day 59 solution/qtn7.py | CodedLadiesInnovateTech/-python-challenge-solutions | 430cd3eb84a2905a286819eef384ee484d8eb9e7 | [
"MIT"
] | 39 | 2020-05-10T20:55:02.000Z | 2020-09-12T17:40:59.000Z | #program to convert an array to an array of machine values and return the bytes representation.
import array
import binascii
a = array.array('i', [1,2,3,4,5,6])
print("Original array:")
print('A1:', a)
bytes_array = a.tobytes()
print('Array of bytes:', binascii.hexlify(bytes_array)) | 35.375 | 95 | 0.738516 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 137 | 0.484099 |
a693893f40cf33adad9c304b0df64f4d022f6bf1 | 22,949 | py | Python | swords/__init__.py | p-lambda/swords | 04ca75370d0ce098a7f4db68240fc8e79a4f7b3b | [
"CC-BY-3.0"
] | 25 | 2021-05-24T06:54:45.000Z | 2022-03-18T15:30:39.000Z | swords/__init__.py | p-lambda/swords | 04ca75370d0ce098a7f4db68240fc8e79a4f7b3b | [
"CC-BY-3.0"
] | 2 | 2021-06-11T02:39:47.000Z | 2021-09-20T15:06:46.000Z | swords/__init__.py | p-lambda/swords | 04ca75370d0ce098a7f4db68240fc8e79a4f7b3b | [
"CC-BY-3.0"
] | 2 | 2021-11-19T09:06:30.000Z | 2022-03-24T18:31:40.000Z | from collections import defaultdict
import copy
from enum import Enum
import hashlib
import json
# From UD v2: https://universaldependencies.org/u/pos/
class Pos(Enum):
UNKNOWN = 0
# Open class
ADJ = 1
ADV = 2
INTJ = 3
NOUN = 4
PROPN = 5
VERB = 6
# Closed class
ADP = 7
AUX = 8
CCONJ = 9
DET =... | 31.610193 | 137 | 0.657066 | 21,386 | 0.931892 | 856 | 0.0373 | 6,893 | 0.300362 | 0 | 0 | 4,628 | 0.201665 |
a69603d25cb114ace361699985f470a1488e41a6 | 7,239 | py | Python | src/gumbel_social_transformer/st_model_tcn.py | tedhuang96/gst | ac300d34e17fa2d6639c1df329ac1e8f80bccaec | [
"MIT"
] | 8 | 2021-11-28T21:16:27.000Z | 2022-03-22T06:56:16.000Z | src/gumbel_social_transformer/st_model_tcn.py | tedhuang96/gst | ac300d34e17fa2d6639c1df329ac1e8f80bccaec | [
"MIT"
] | null | null | null | src/gumbel_social_transformer/st_model_tcn.py | tedhuang96/gst | ac300d34e17fa2d6639c1df329ac1e8f80bccaec | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
from src.gumbel_social_transformer.gumbel_social_transformer import GumbelSocialTransformer
from src.gumbel_social_transformer.temporal_convolution_net import TemporalConvolutionNet
def offset_error_square_full_partial(x_pred, x_target, loss_mask_ped, loss_mask_pred_seq):
assert... | 49.924138 | 166 | 0.644426 | 5,961 | 0.823456 | 0 | 0 | 0 | 0 | 0 | 0 | 487 | 0.067274 |
a69669d6bb96032de0f69b7cc74ce536e85ea475 | 7,598 | py | Python | my_source/__myglobal.py | IBNBlank/Shooting_Stars | 38a642ab5a6d1cd59c480f11ae8eea9c86192a46 | [
"MIT"
] | 3 | 2018-07-28T15:00:16.000Z | 2021-07-15T12:21:58.000Z | my_source/__myglobal.py | IBNBlank/Shooting_Stars | 38a642ab5a6d1cd59c480f11ae8eea9c86192a46 | [
"MIT"
] | null | null | null | my_source/__myglobal.py | IBNBlank/Shooting_Stars | 38a642ab5a6d1cd59c480f11ae8eea9c86192a46 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# @Author: IBNBlank
# @Date: 2018-07-22 19:56:30
# @Last Modified by: IBNBlank
# @Last Modified time: 2018-07-28 22:19:12
import pygame
from os import path
##### Color Define #####
COLOR = {
"BLACK": (0,0,0),
"WHITE": (255,255,255),
"RED": (255,0,0),
"YELLOW": (255,255,0),
... | 39.572917 | 91 | 0.672809 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,177 | 0.286523 |
a69710ab18965d75ae34f2d798ed7836b803b1f0 | 922 | py | Python | mpf/tests/test_SegmentMappings.py | Scottacus64/mpf | fcfb6c5698b9c7d8bf0eb64b021aaa389ea6478a | [
"MIT"
] | 163 | 2015-01-25T02:19:50.000Z | 2022-03-26T12:00:28.000Z | mpf/tests/test_SegmentMappings.py | Scottacus64/mpf | fcfb6c5698b9c7d8bf0eb64b021aaa389ea6478a | [
"MIT"
] | 1,086 | 2015-03-23T19:53:17.000Z | 2022-03-24T20:46:11.000Z | mpf/tests/test_SegmentMappings.py | Scottacus64/mpf | fcfb6c5698b9c7d8bf0eb64b021aaa389ea6478a | [
"MIT"
] | 148 | 2015-01-28T02:31:39.000Z | 2022-03-22T13:54:01.000Z | import unittest
from mpf.core.segment_mappings import TextToSegmentMapper, BCD_SEGMENTS
class TestSegmentDisplay(unittest.TestCase):
def test_text_to_mapping(self):
mapping = TextToSegmentMapper.map_text_to_segments("1337.23", 10, BCD_SEGMENTS, embed_dots=True)
self.assertEqual(
[BCD... | 40.086957 | 105 | 0.651844 | 830 | 0.900217 | 0 | 0 | 0 | 0 | 0 | 0 | 48 | 0.052061 |
a69754150f6815f08c8e7d520f80806f794c55ac | 1,845 | py | Python | python/example.py | LenakeTech/crowdin-hybrid-sso-examples | 7da0868f6537d6abb2f6004f428e15002535eb8d | [
"Apache-2.0"
] | 1 | 2021-06-08T14:29:53.000Z | 2021-06-08T14:29:53.000Z | python/example.py | LenakeTech/crowdin-hybrid-sso-examples | 7da0868f6537d6abb2f6004f428e15002535eb8d | [
"Apache-2.0"
] | null | null | null | python/example.py | LenakeTech/crowdin-hybrid-sso-examples | 7da0868f6537d6abb2f6004f428e15002535eb8d | [
"Apache-2.0"
] | 2 | 2021-03-31T02:59:45.000Z | 2021-09-08T10:54:19.000Z | # Copyright 2019 Crowdin
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software... | 30.245902 | 97 | 0.692683 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 934 | 0.506233 |
a69792fc01aa5b8cfd3d5c9274c48d77d86db356 | 6,928 | py | Python | chrischan-master/chrischan-master/main.py | b9king/Discord-Bots | e6b08eeeb8de0952726883cfce0717d4866eacc9 | [
"MIT"
] | null | null | null | chrischan-master/chrischan-master/main.py | b9king/Discord-Bots | e6b08eeeb8de0952726883cfce0717d4866eacc9 | [
"MIT"
] | null | null | null | chrischan-master/chrischan-master/main.py | b9king/Discord-Bots | e6b08eeeb8de0952726883cfce0717d4866eacc9 | [
"MIT"
] | null | null | null |
import discord
import helper
from helper import *
client=discord.Client()
@client.event
async def on_ready():
print('logged in as')
print(client.user.name)
print(client.user.id)
print('-----')
@client.event
async def on_guild_join(guild):
name = "**<:Png:590089990780878848> Christian Westo... | 34.81407 | 200 | 0.604648 | 0 | 0 | 0 | 0 | 6,734 | 0.969898 | 6,692 | 0.963848 | 3,012 | 0.433818 |
a697f19eca0e1bf447aac534db1c805ae86bf32e | 4,095 | py | Python | python/api/config/serializers.py | dimuha-rs/adcm | 0f49cc9ece16c1e257be12375a64b65a34b3a3ae | [
"Apache-2.0"
] | null | null | null | python/api/config/serializers.py | dimuha-rs/adcm | 0f49cc9ece16c1e257be12375a64b65a34b3a3ae | [
"Apache-2.0"
] | null | null | null | python/api/config/serializers.py | dimuha-rs/adcm | 0f49cc9ece16c1e257be12375a64b65a34b3a3ae | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | 38.271028 | 80 | 0.723077 | 3,169 | 0.773871 | 0 | 0 | 0 | 0 | 0 | 0 | 795 | 0.194139 |
a6985ed0535d74a9aa8aab737b5e80423499a130 | 6,433 | py | Python | qtvscodestyle/vscode/color_registry_manager.py | Greatness7/QtVSCodeStyle | 2654ca967c7ae5db3ce3fb46657ace9f1104f6b9 | [
"MIT"
] | 8 | 2021-10-04T00:21:25.000Z | 2022-03-14T19:57:03.000Z | qtvscodestyle/vscode/color_registry_manager.py | Greatness7/QtVSCodeStyle | 2654ca967c7ae5db3ce3fb46657ace9f1104f6b9 | [
"MIT"
] | null | null | null | qtvscodestyle/vscode/color_registry_manager.py | Greatness7/QtVSCodeStyle | 2654ca967c7ae5db3ce3fb46657ace9f1104f6b9 | [
"MIT"
] | 3 | 2021-11-15T23:58:33.000Z | 2022-02-01T18:50:01.000Z | # =============================================================================================
# QtVSCodeStyle.
#
# Copyright (c) 2015- Microsoft Corporation
# Copyright (c) 2021- Yunosuke Ohsugi
#
# Distributed under the terms of the MIT License.
# See https://github.com/microsoft/vscode/blob/main/LICENSE.txt
#
#... | 41.237179 | 113 | 0.645733 | 4,411 | 0.685683 | 0 | 0 | 427 | 0.066376 | 0 | 0 | 994 | 0.154516 |
a6998e877e1ced03d03d52f574560425b5d5faf2 | 181 | py | Python | src/Model/MetaCommand.py | anthonyf996/ChessApp | 614f72bc641793681fd5ad7040d6a4c407c9ae9e | [
"MIT"
] | null | null | null | src/Model/MetaCommand.py | anthonyf996/ChessApp | 614f72bc641793681fd5ad7040d6a4c407c9ae9e | [
"MIT"
] | null | null | null | src/Model/MetaCommand.py | anthonyf996/ChessApp | 614f72bc641793681fd5ad7040d6a4c407c9ae9e | [
"MIT"
] | null | null | null | class MetaCommand:
def __init__(self, commands):
self.commands = commands
def execute(self):
raise NotImplementedError
def undo(self):
raise NotImplementedError
| 18.1 | 31 | 0.729282 | 180 | 0.994475 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a69a0ad61363ec1a9cf3a9af6dcd2a95de3f22fa | 495 | py | Python | python/test_region.py | csd2022fuchuang/yolov5-opencv-cpp-python | 5b52dbffed6733a1353bd27a0001c09821ee0714 | [
"MIT"
] | null | null | null | python/test_region.py | csd2022fuchuang/yolov5-opencv-cpp-python | 5b52dbffed6733a1353bd27a0001c09821ee0714 | [
"MIT"
] | null | null | null | python/test_region.py | csd2022fuchuang/yolov5-opencv-cpp-python | 5b52dbffed6733a1353bd27a0001c09821ee0714 | [
"MIT"
] | 1 | 2022-03-24T09:01:45.000Z | 2022-03-24T09:01:45.000Z | from shapely.geometry import Polygon
import cv2
image = cv2.imread("a.png")
window_name = 'Image'
# Center coordinates
center_coordinates = (120, 50)
# Radius of circle
radius = 20
# Blue color in BGR
color = (255, 0, 0)
# Line thickness of 2 px
thickness = 2
# Using cv2.circle() method
# Draw a circle with blue l... | 19.8 | 71 | 0.739394 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 203 | 0.410101 |
a69c4256c8120424bda3b8934dfaa52b9fbb2738 | 326 | py | Python | testes/test_polinomios.py | DiegoAscanio/matriztdd | eabd8b2bc05e20a062f8b2a23b032637d88bbbeb | [
"MIT"
] | null | null | null | testes/test_polinomios.py | DiegoAscanio/matriztdd | eabd8b2bc05e20a062f8b2a23b032637d88bbbeb | [
"MIT"
] | 6 | 2021-04-06T18:22:48.000Z | 2022-03-12T00:52:18.000Z | testes/test_polinomios.py | DiegoAscanio/matriztdd | eabd8b2bc05e20a062f8b2a23b032637d88bbbeb | [
"MIT"
] | null | null | null | from polinomios.polinomios import p_de_A
import numpy as np
def test_p_de_A():
A = np.array([[-1, 4], [2, 1]])
p = [1, 0, -9]
assert np.allclose(p_de_A(p, A), np.zeros((2,2)))
def test_q_de_A():
A = np.array([[-1, 4], [2, 1]])
q = [2, 3]
assert np.allclose(p_de_A(q, A), np.array([[1, 8], [4, 5... | 23.285714 | 64 | 0.546012 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a69c769295af960c87c6100c3fb68c7509427ad5 | 1,045 | py | Python | reverse number.py | TheVishwajeetJagtap/Python-Day-4-Assignments-05-03-21- | e26a95bbc4ce07a369bef44fa15281e5d0e398ec | [
"MIT"
] | null | null | null | reverse number.py | TheVishwajeetJagtap/Python-Day-4-Assignments-05-03-21- | e26a95bbc4ce07a369bef44fa15281e5d0e398ec | [
"MIT"
] | null | null | null | reverse number.py | TheVishwajeetJagtap/Python-Day-4-Assignments-05-03-21- | e26a95bbc4ce07a369bef44fa15281e5d0e398ec | [
"MIT"
] | null | null | null | #wirte a program to read number from keyboard and print it in reverse
number=input("Enter the number")
reverse=0
for i in range(len(number)):
reminder = int(number) % 10
reverse = (reverse * 10) + reminder
number = int(number) / 10
print(reverse)
#********************************using slice************... | 26.794872 | 100 | 0.453589 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 571 | 0.546411 |
a69d50893a1048337e98b47e928f156375ca87ed | 8,247 | py | Python | pyNastran/converters/cart3d/test_cart3d.py | jtran10/pyNastran | 4aed8e05b91576c2b50ee835f0497a9aad1d2cb0 | [
"BSD-3-Clause"
] | null | null | null | pyNastran/converters/cart3d/test_cart3d.py | jtran10/pyNastran | 4aed8e05b91576c2b50ee835f0497a9aad1d2cb0 | [
"BSD-3-Clause"
] | null | null | null | pyNastran/converters/cart3d/test_cart3d.py | jtran10/pyNastran | 4aed8e05b91576c2b50ee835f0497a9aad1d2cb0 | [
"BSD-3-Clause"
] | null | null | null | """tests non-gui related Cart3d class/interface"""
from __future__ import print_function
import os
import unittest
from numpy import array_equal, allclose
import pyNastran
from pyNastran.converters.cart3d.cart3d import read_cart3d
from pyNastran.converters.cart3d.cart3d_to_nastran import cart3d_to_nastran_filename, ca... | 38.900943 | 111 | 0.600946 | 6,695 | 0.81181 | 0 | 0 | 0 | 0 | 0 | 0 | 2,039 | 0.247241 |
a69e048cd19a312e36e054eaafec0943cd70d41a | 118 | py | Python | day1.py | marawat/PyManish | fad4cf042f907c8921c2675fda2a555f38e1f7ef | [
"Apache-2.0"
] | null | null | null | day1.py | marawat/PyManish | fad4cf042f907c8921c2675fda2a555f38e1f7ef | [
"Apache-2.0"
] | null | null | null | day1.py | marawat/PyManish | fad4cf042f907c8921c2675fda2a555f38e1f7ef | [
"Apache-2.0"
] | null | null | null | #! /usr/bin/python3
x = ("Hello")
y = "day 1 python"
z= "good going"
print(y)
print (z)
print(x)
print (x,y,z)
| 7.866667 | 20 | 0.559322 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 53 | 0.449153 |
a69e23253f289cfbf526d1538461b44447ecb128 | 2,260 | py | Python | python/evolution_reader.py | hzla/Pokeweb | 203f8449179a5a0aeb4fa5d48e483048f09b24d1 | [
"MIT"
] | 3 | 2021-03-30T22:07:40.000Z | 2021-06-11T02:32:06.000Z | python/evolution_reader.py | hzla/Pokeweb | 203f8449179a5a0aeb4fa5d48e483048f09b24d1 | [
"MIT"
] | 2 | 2021-07-03T18:04:09.000Z | 2022-01-12T18:02:30.000Z | python/evolution_reader.py | hzla/Pokeweb | 203f8449179a5a0aeb4fa5d48e483048f09b24d1 | [
"MIT"
] | 1 | 2021-09-06T18:20:23.000Z | 2021-09-06T18:20:23.000Z | import ndspy
import ndspy.rom
import code
import io
import os
import os.path
from os import path
import json
import copy
def set_global_vars():
global ROM_NAME, NARC_FORMAT, POKEDEX, METHODS, ITEMS, MOVES
with open(f'session_settings.json', "r") as outfile:
settings = json.load(outfile)
ROM_NAME = setting... | 25.681818 | 81 | 0.684071 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 642 | 0.284071 |
a6a017b54a214e79dd2139fbb9e101b8d4539ba6 | 609 | py | Python | Python/797.py | JWang169/LintCodeJava | b75b06fa1551f5e4d8a559ef64e1ac29db79c083 | [
"CNRI-Python"
] | 1 | 2020-12-10T05:36:15.000Z | 2020-12-10T05:36:15.000Z | Python/797.py | JWang169/LintCodeJava | b75b06fa1551f5e4d8a559ef64e1ac29db79c083 | [
"CNRI-Python"
] | null | null | null | Python/797.py | JWang169/LintCodeJava | b75b06fa1551f5e4d8a559ef64e1ac29db79c083 | [
"CNRI-Python"
] | 3 | 2020-04-06T05:55:08.000Z | 2021-08-29T14:26:54.000Z | class Solution:
def allPathsSourceTarget(self, graph: List[List[int]]) -> List[List[int]]:
N = len(graph) - 1
mappings = {}
for i, nodes in enumerate(graph):
mappings[i] = nodes
result = []
queue = deque([[0]])
while queue:
path = queu... | 27.681818 | 78 | 0.438424 | 577 | 0.947455 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a6a02d8b5ce16766be107720170a139dd7634fa9 | 661 | py | Python | day-07/part-2/div.py | lypnol/adventofcode-2021 | 8ba277d698e8c59ca9cd554acc135473f5964b87 | [
"MIT"
] | 6 | 2021-11-29T15:32:27.000Z | 2021-12-10T12:24:26.000Z | day-07/part-2/div.py | lypnol/adventofcode-2021 | 8ba277d698e8c59ca9cd554acc135473f5964b87 | [
"MIT"
] | 9 | 2021-11-29T15:38:04.000Z | 2021-12-13T14:54:16.000Z | day-07/part-2/div.py | lypnol/adventofcode-2021 | 8ba277d698e8c59ca9cd554acc135473f5964b87 | [
"MIT"
] | 3 | 2021-12-02T19:11:44.000Z | 2021-12-22T20:52:47.000Z | from tool.runners.python import SubmissionPy
class DivSubmission(SubmissionPy):
def run(self, s):
"""
:param s: input in string format
:return: solution flag
"""
# Your code goes here
positions = [int(x) for x in s.split(",")]
min_pos, max_pos = min(position... | 23.607143 | 110 | 0.547655 | 402 | 0.608169 | 0 | 0 | 0 | 0 | 0 | 0 | 203 | 0.30711 |
a6a05141e02ec09a3368291709071af8ba627d0b | 1,698 | py | Python | test/coreneuron/test_psolve.py | niltonlk/nrn | 464541abbf72fe58de77b16bf0e1df425a280b89 | [
"BSD-3-Clause"
] | null | null | null | test/coreneuron/test_psolve.py | niltonlk/nrn | 464541abbf72fe58de77b16bf0e1df425a280b89 | [
"BSD-3-Clause"
] | 1 | 2021-04-13T09:19:55.000Z | 2021-04-13T09:19:55.000Z | test/coreneuron/test_psolve.py | niltonlk/nrn | 464541abbf72fe58de77b16bf0e1df425a280b89 | [
"BSD-3-Clause"
] | null | null | null | import os
import pytest
import sys
import traceback
enable_gpu = bool(os.environ.get("CORENRN_ENABLE_GPU", ""))
from neuron import h, gui
pc = h.ParallelContext()
def model():
pc.gid_clear()
for s in h.allsec():
h.delete_section(sec=s)
s = h.Section()
s.L = 10
s.diam = 10
s.insert("... | 22.64 | 72 | 0.567727 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 256 | 0.150766 |
a6a1b27bb26aacef5997572d868b16e29265fa5b | 138 | wsgi | Python | vagrant/catalog/app.wsgi | jcarter62/udacity-fs-p5 | e4760085d93c5ee71fd182c9d118c1d9b258c2b2 | [
"MIT"
] | null | null | null | vagrant/catalog/app.wsgi | jcarter62/udacity-fs-p5 | e4760085d93c5ee71fd182c9d118c1d9b258c2b2 | [
"MIT"
] | null | null | null | vagrant/catalog/app.wsgi | jcarter62/udacity-fs-p5 | e4760085d93c5ee71fd182c9d118c1d9b258c2b2 | [
"MIT"
] | null | null | null | #!/user/bin/python
import os
import sys
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
from app import app as application
| 23 | 62 | 0.775362 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 18 | 0.130435 |
a6a1b8a6a8be457c8cc3f0ac959f22dbed709405 | 247 | py | Python | facialrecognition/accounts/models.py | Moran98/facial-recognition | da4711c5d0fb77d77a5dffb20d85bfa9072f7933 | [
"MIT"
] | 34 | 2020-01-27T15:07:25.000Z | 2021-09-25T17:07:37.000Z | facialrecognition/accounts/models.py | Moran98/facial-recognition | da4711c5d0fb77d77a5dffb20d85bfa9072f7933 | [
"MIT"
] | 26 | 2020-01-29T12:24:42.000Z | 2022-03-12T00:16:44.000Z | facialrecognition/accounts/models.py | Moran98/facial-recognition | da4711c5d0fb77d77a5dffb20d85bfa9072f7933 | [
"MIT"
] | 7 | 2020-01-27T11:42:11.000Z | 2021-04-05T04:42:22.000Z | from django.db import models
class UserProfile(models.Model):
title = models.CharField(max_length=25, default='NULL USER')
img = models.ImageField(upload_to="images/", default='null.jpg')
def __str__(self):
return self.title | 27.444444 | 68 | 0.708502 | 217 | 0.878543 | 0 | 0 | 0 | 0 | 0 | 0 | 30 | 0.121457 |
a6a2e757449885213e04fced8e6ceed98541f40d | 431 | py | Python | docs/make_tutorials.py | jonholdship/SpectralRadex | 2c38e136b963aac43ec2b17101da56a83c9884e4 | [
"MIT"
] | 1 | 2020-09-23T10:57:03.000Z | 2020-09-23T10:57:03.000Z | docs/make_tutorials.py | jonholdship/SpectralRadex | 2c38e136b963aac43ec2b17101da56a83c9884e4 | [
"MIT"
] | null | null | null | docs/make_tutorials.py | jonholdship/SpectralRadex | 2c38e136b963aac43ec2b17101da56a83c9884e4 | [
"MIT"
] | null | null | null | import subprocess
import glob
import os
# Convert the tutorials
for fn in glob.glob("../examples/*.ipynb"):
name = os.path.splitext(os.path.split(fn)[1])[0]
outfn = os.path.join("tutorials", name + ".rst")
print("Building {0}...".format(name))
subprocess.check_call(
"jupyter nbconvert --templat... | 30.785714 | 76 | 0.63109 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 171 | 0.396752 |