hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c4e5f3b6efb09bc6b81073641f19b9fbde164302 | 2,969 | py | Python | rsvis/utils/rsioobject.py | Tom-Hirschberger/DataVisualization | 1aec6a85e2af7ba62ba47e6ee93dc9a7d99c6221 | [
"MIT"
] | null | null | null | rsvis/utils/rsioobject.py | Tom-Hirschberger/DataVisualization | 1aec6a85e2af7ba62ba47e6ee93dc9a7d99c6221 | [
"MIT"
] | 4 | 2020-04-28T11:53:24.000Z | 2022-03-12T00:15:30.000Z | rsvis/utils/rsioobject.py | Tom-Hirschberger/DataVisualization | 1aec6a85e2af7ba62ba47e6ee93dc9a7d99c6221 | [
"MIT"
] | 2 | 2020-07-01T15:35:29.000Z | 2021-03-11T17:53:23.000Z | # ===========================================================================
# rsio.py -----------------------------------------------------------------
# ===========================================================================
# import ------------------------------------------------------------------
# -----... | 44.313433 | 77 | 0.333446 |
c4b4bb26acba5581b2f18c5bcb4a154aa4f2932b | 135 | py | Python | alfred/src/notion_api.py | martyns0n/alfred-add-note-to-notion | 902e26f2ee9019223b20a866cd4bc7995cf00186 | [
"MIT"
] | 9 | 2021-05-27T15:14:33.000Z | 2021-12-29T06:51:41.000Z | alfred/src/notion_api.py | martyns0n/alfred-fast-note-to-notion | 902e26f2ee9019223b20a866cd4bc7995cf00186 | [
"MIT"
] | null | null | null | alfred/src/notion_api.py | martyns0n/alfred-fast-note-to-notion | 902e26f2ee9019223b20a866cd4bc7995cf00186 | [
"MIT"
] | null | null | null | from notionscripts.notion_api import NotionApi
from config import Config
notion_api = NotionApi(Config())
config = notion_api.config
| 19.285714 | 46 | 0.822222 |
47c1f6e7e4cbfd1186f4d53ae900e06a8ef3efe0 | 10,472 | py | Python | POINTNET2/train_layer.py | ada-shen/utility | 6bc9520951276d3d1460796509022704323d9fca | [
"MIT"
] | 2 | 2021-07-16T10:30:08.000Z | 2021-12-28T03:35:27.000Z | POINTNET2/train_layer.py | ada-shen/utility | 6bc9520951276d3d1460796509022704323d9fca | [
"MIT"
] | null | null | null | POINTNET2/train_layer.py | ada-shen/utility | 6bc9520951276d3d1460796509022704323d9fca | [
"MIT"
] | null | null | null | import os
import sys
import time
import argparse
import numpy as np
import importlib
import tensorflow as tf
import provider
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
sys.path.append(BASE_DIR)
sys.path.append(os.path.join(BASE_DIR, 'models/Pointnet2'))
# sys.path.append(os.path.join(BASE_DIR, 'utils'))
... | 42.225806 | 176 | 0.667303 |
357bf6231924c413328062ed6f68c109c5086547 | 872 | py | Python | setup.py | jacsice/python-weixin | cad5bf9e49787ae91445a9082c5b4ede0c804ddf | [
"BSD-3-Clause"
] | null | null | null | setup.py | jacsice/python-weixin | cad5bf9e49787ae91445a9082c5b4ede0c804ddf | [
"BSD-3-Clause"
] | null | null | null | setup.py | jacsice/python-weixin | cad5bf9e49787ae91445a9082c5b4ede0c804ddf | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
from io import open
from setuptools import setup, find_packages
with open("README.md", "r", encoding='utf-8') as fh:
long_description = fh.read()
with open('requirements.txt') as f:
requirements = [l for l in f.read().splitlines() if l]
setup(name="python-weixin",
version="0.4.2"... | 33.538462 | 80 | 0.680046 |
c468892790a04fe6c3b73cf4e7a0e64ef3e5b9b8 | 1,888 | py | Python | aerosandbox/dynamics/point_mass/point_1D/vertical.py | msberk/AeroSandbox | 552a4f116655a2ba6ce6e44da0a78fec5519e35e | [
"MIT"
] | 1 | 2021-11-01T22:48:12.000Z | 2021-11-01T22:48:12.000Z | aerosandbox/dynamics/point_mass/point_1D/vertical.py | msberk/AeroSandbox | 552a4f116655a2ba6ce6e44da0a78fec5519e35e | [
"MIT"
] | null | null | null | aerosandbox/dynamics/point_mass/point_1D/vertical.py | msberk/AeroSandbox | 552a4f116655a2ba6ce6e44da0a78fec5519e35e | [
"MIT"
] | null | null | null | from aerosandbox.dynamics.point_mass.point_3D.cartesian import DynamicsPointMass3DCartesian
from aerosandbox.weights.mass_properties import MassProperties
import aerosandbox.numpy as np
from typing import Union, Dict, Tuple
class DynamicsPointMass1DVertical(DynamicsPointMass3DCartesian):
"""
Dynamics instance... | 27.764706 | 91 | 0.59428 |
862aa835d09459ad2f3cbd4fe60cf55fb31f0a06 | 5,691 | py | Python | futu/common/pb/Qot_UpdateOrderDetail_pb2.py | wsdgshzx/futu-api-wsdgs | e71ce0bdb9fe026ade74277ac6bca62265a4be5a | [
"Apache-2.0"
] | 2 | 2020-12-19T11:06:03.000Z | 2021-01-31T13:47:12.000Z | futu/common/pb/Qot_UpdateOrderDetail_pb2.py | faruto/py-futu-api | cb274d5ab5387dca190b739d161f2bc8eabe073d | [
"Apache-2.0"
] | null | null | null | futu/common/pb/Qot_UpdateOrderDetail_pb2.py | faruto/py-futu-api | cb274d5ab5387dca190b739d161f2bc8eabe073d | [
"Apache-2.0"
] | 1 | 2022-03-26T08:59:12.000Z | 2022-03-26T08:59:12.000Z | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: Qot_UpdateOrderDetail.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflec... | 37.688742 | 573 | 0.755403 |
3b3209672ded161e645746afde93f4e7b22427ac | 5,880 | py | Python | utils/remoter.py | hoyping/deploy | c1c1f582063d5ea84cbacbabaf25a497319e82c5 | [
"Apache-2.0"
] | null | null | null | utils/remoter.py | hoyping/deploy | c1c1f582063d5ea84cbacbabaf25a497319e82c5 | [
"Apache-2.0"
] | null | null | null | utils/remoter.py | hoyping/deploy | c1c1f582063d5ea84cbacbabaf25a497319e82c5 | [
"Apache-2.0"
] | null | null | null | # 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 distributed in the hope that it will be useful,
# bu... | 33.409091 | 79 | 0.563095 |
03d24c3ba21590852d50478165e538ca7e54a785 | 2,367 | py | Python | pythonAnimations/pyOpenGLChess/engineDirectory/oglc-env/lib/python2.7/site-packages/OpenGLContext/shadow/shadowcontext.py | alexus37/AugmentedRealityChess | 7f600ad153270feff12aa7aa86d7ed0a49ebc71c | [
"MIT"
] | 1 | 2015-07-12T07:24:17.000Z | 2015-07-12T07:24:17.000Z | pythonAnimations/pyOpenGLChess/engineDirectory/oglc-env/lib/python2.7/site-packages/OpenGLContext/shadow/shadowcontext.py | alexus37/AugmentedRealityChess | 7f600ad153270feff12aa7aa86d7ed0a49ebc71c | [
"MIT"
] | null | null | null | pythonAnimations/pyOpenGLChess/engineDirectory/oglc-env/lib/python2.7/site-packages/OpenGLContext/shadow/shadowcontext.py | alexus37/AugmentedRealityChess | 7f600ad153270feff12aa7aa86d7ed0a49ebc71c | [
"MIT"
] | 1 | 2016-02-19T21:55:53.000Z | 2016-02-19T21:55:53.000Z | """Context mix-in providing support for shadow rendering algorithm
"""
from OpenGL.GL import *
from math import pi
from OpenGLContext.move import viewplatform
from OpenGLContext.shadow import pinfperspective, passes
from OpenGLContext.arrays import negative
RADTODEG = 180/pi
### support classes...
class InfViewPlatfor... | 37.571429 | 73 | 0.694128 |
6802b41e079cc73e0070fd71c6f040fa74339b21 | 80,760 | py | Python | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_12_01/operations/_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_12_01/operations/_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_12_01/operations/_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # pylint: disable=too-many-lines
# 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) AutoRe... | 40.562531 | 281 | 0.665404 |
5dd9adc75f659f7ccb30a6c06b1815409e960661 | 10,988 | py | Python | AI_Project.py | eshuenglish/Tower-of-Hanoi-using-A-star | d064808a21d400ae0cc4bb5ec8da06a096b9aed1 | [
"MIT"
] | null | null | null | AI_Project.py | eshuenglish/Tower-of-Hanoi-using-A-star | d064808a21d400ae0cc4bb5ec8da06a096b9aed1 | [
"MIT"
] | null | null | null | AI_Project.py | eshuenglish/Tower-of-Hanoi-using-A-star | d064808a21d400ae0cc4bb5ec8da06a096b9aed1 | [
"MIT"
] | null | null | null | """
Team: Yi-Ling(100958447), Eshant(100943729)
"""
import numpy as np
import math
import time
start_time = time.time()
class Peg(object):
def __init__(self, disks=[], max_disks=0):
if len(disks) > 0:
self.disks = disks
else:
self.disks = [i for i in range(max_disks, 0, -1)... | 34.88254 | 186 | 0.553695 |
cebb5b50facb57af096fa95ad27867537a4017d1 | 128 | py | Python | CS48101/mzrimsek/Assignment6/run_neural_net.py | mzrimsek/school | d8791e3b94e883a771d0546b3729f3cbd18921c0 | [
"MIT"
] | null | null | null | CS48101/mzrimsek/Assignment6/run_neural_net.py | mzrimsek/school | d8791e3b94e883a771d0546b3729f3cbd18921c0 | [
"MIT"
] | 2 | 2015-01-30T17:49:32.000Z | 2015-02-04T02:17:17.000Z | CS48101/mzrimsek/Assignment6/run_neural_net.py | mzrimsek/School | d8791e3b94e883a771d0546b3729f3cbd18921c0 | [
"MIT"
] | null | null | null | import os
import sys
neural_src = os.getenv('NEURAL_SRC')
sys.path.append(neural_src);
os.chdir(neural_src)
import mnist_loader | 18.285714 | 36 | 0.804688 |
b85f4841d84e93f9c6b52b4e12144e9dceb87bba | 4,879 | py | Python | migrator/ArtifactoryUserAccess.py | reallyinsane/docker2artifactory | eb184982d65971c43f57a1a873fbeebf049799b4 | [
"Apache-2.0"
] | 27 | 2018-06-14T16:16:33.000Z | 2022-02-26T09:02:30.000Z | migrator/ArtifactoryUserAccess.py | reallyinsane/docker2artifactory | eb184982d65971c43f57a1a873fbeebf049799b4 | [
"Apache-2.0"
] | 14 | 2018-11-19T23:08:11.000Z | 2021-05-14T11:36:39.000Z | migrator/ArtifactoryUserAccess.py | reallyinsane/docker2artifactory | eb184982d65971c43f57a1a873fbeebf049799b4 | [
"Apache-2.0"
] | 15 | 2018-06-11T10:01:47.000Z | 2021-07-09T06:53:59.000Z | from ArtifactoryBaseAccess import ArtifactoryBaseAccess
import urllib
import logging
'''
Simple API for user, group and permission creation in Artifactory
* Uses basic AUTH (not tokens)
* Limited
'''
class ArtifactoryUserAccess(ArtifactoryBaseAccess):
def __init__(self, url, username=None, password=Non... | 40.322314 | 127 | 0.608116 |
a939aad3df88a14e2ee0243c51728e6cecc0f8aa | 1,175 | py | Python | coretemp/coretemp_constants.py | mmcbride1/python-coretemp | cfde0032b013df469beadb8d4d7995881ac9d06d | [
"MIT"
] | 3 | 2016-12-19T06:12:31.000Z | 2019-07-18T13:46:42.000Z | coretemp/coretemp_constants.py | mmcbride1/python-coretemp | cfde0032b013df469beadb8d4d7995881ac9d06d | [
"MIT"
] | null | null | null | coretemp/coretemp_constants.py | mmcbride1/python-coretemp | cfde0032b013df469beadb8d4d7995881ac9d06d | [
"MIT"
] | null | null | null | import subprocess as x
from subprocess import Popen, PIPE
def cpu_info():
"""
Get the CPU name
and additional info
"""
info = '/proc/cpuinfo'
cpu = ""
x_ = x.Popen(['cat',info],stdout=x.PIPE)
out,err = x_.communicate()
if err:
return "System Default CPU"
cmd = iter(out.splitlines... | 23.5 | 161 | 0.660426 |
c651cbbc556ca498d24ab5cef5ffe3a3608afcfe | 1,914 | py | Python | grafana_backup/save_datasources.py | evelinabut/grafana-backup-tool | 8fd5603d0ef7ed3969d6b624b1a58208b675ce82 | [
"MIT"
] | null | null | null | grafana_backup/save_datasources.py | evelinabut/grafana-backup-tool | 8fd5603d0ef7ed3969d6b624b1a58208b675ce82 | [
"MIT"
] | null | null | null | grafana_backup/save_datasources.py | evelinabut/grafana-backup-tool | 8fd5603d0ef7ed3969d6b624b1a58208b675ce82 | [
"MIT"
] | null | null | null | import os
import json
from grafana_backup.dashboardApi import search_datasource
from grafana_backup.commons import print_horizontal_line, save_json
def main(args, settings):
backup_dir = settings.get('BACKUP_DIR')
timestamp = settings.get('TIMESTAMP')
grafana_url = settings.get('GRAFANA_URL')
http_get... | 44.511628 | 136 | 0.722571 |
0fb41c3a3a659fbb4d7d492132c035839f81e031 | 6,468 | py | Python | sysinv/cgts-client/cgts-client/cgtsclient/v1/helm_shell.py | albailey/config | 40ebe63d7dfc6a0a03216ebe55ed3ec9cf5410b9 | [
"Apache-2.0"
] | 10 | 2020-02-07T18:57:44.000Z | 2021-09-11T10:29:34.000Z | sysinv/cgts-client/cgts-client/cgtsclient/v1/helm_shell.py | albailey/config | 40ebe63d7dfc6a0a03216ebe55ed3ec9cf5410b9 | [
"Apache-2.0"
] | 1 | 2021-01-14T12:01:55.000Z | 2021-01-14T12:01:55.000Z | sysinv/cgts-client/cgts-client/cgtsclient/v1/helm_shell.py | albailey/config | 40ebe63d7dfc6a0a03216ebe55ed3ec9cf5410b9 | [
"Apache-2.0"
] | 10 | 2020-10-13T08:37:46.000Z | 2022-02-09T00:21:25.000Z | # vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright (c) 2018 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
from collections import OrderedDict
import yaml
from cgtsclient.common import utils
from cgtsclient import exc
from cgtsclient.v1 import app as app_utils
def _print_helm_chart(chart)... | 34.404255 | 81 | 0.622294 |
c063a0cf799e40439bbf8235e6a3961e49aed034 | 132 | py | Python | webSys/dbweb/main/__init__.py | Qiumy/FIF | 8c9c58504ecab510dc0a96944f0031a3fd513d74 | [
"Apache-2.0"
] | 2 | 2018-12-21T02:01:03.000Z | 2019-10-17T08:07:04.000Z | webSys/dbweb/main/__init__.py | Qiumy/FIF | 8c9c58504ecab510dc0a96944f0031a3fd513d74 | [
"Apache-2.0"
] | null | null | null | webSys/dbweb/main/__init__.py | Qiumy/FIF | 8c9c58504ecab510dc0a96944f0031a3fd513d74 | [
"Apache-2.0"
] | 1 | 2018-06-01T07:56:09.000Z | 2018-06-01T07:56:09.000Z | #! /usr/bin/env python
# -*- coding: utf-8 -*-
from flask import Blueprint
main = Blueprint('main', __name__)
from . import views
| 16.5 | 34 | 0.674242 |
4dfb20204ed74d17a48a8d8eee704d32dbf165d9 | 1,154 | py | Python | keynet/cupy.py | visym/keynet | 7e3aeb0fd35955ef7ca7499170a337f261655f6e | [
"MIT"
] | 13 | 2020-09-14T22:33:00.000Z | 2021-12-06T01:34:17.000Z | keynet/cupy.py | visym/keynet | 7e3aeb0fd35955ef7ca7499170a337f261655f6e | [
"MIT"
] | 3 | 2020-10-22T23:37:47.000Z | 2020-11-20T00:36:51.000Z | keynet/cupy.py | visym/keynet | 7e3aeb0fd35955ef7ca7499170a337f261655f6e | [
"MIT"
] | 4 | 2020-09-15T01:13:30.000Z | 2021-11-26T05:04:22.000Z | import cupyx
import cupy
from torch.utils.dlpack import to_dlpack
from torch.utils.dlpack import from_dlpack
import keynet.sparse
class SparseMatrix(keynet.sparse.SparseMatrix):
def __init__(self, A):
assert self.is_cupy_sparse(A), "Invalid input"
super(SparseMatrixTorch, self).__init__()... | 24.041667 | 91 | 0.617851 |
be4b0f3cbdb083342f6e6a40b262169ab299df1b | 5,050 | py | Python | firebase_admin/_http_client.py | xxbinxx/firebase-admin-python | f319de6a5328b1de6fe96eb17009032adec9bc35 | [
"Apache-2.0"
] | null | null | null | firebase_admin/_http_client.py | xxbinxx/firebase-admin-python | f319de6a5328b1de6fe96eb17009032adec9bc35 | [
"Apache-2.0"
] | null | null | null | firebase_admin/_http_client.py | xxbinxx/firebase-admin-python | f319de6a5328b1de6fe96eb17009032adec9bc35 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 36.861314 | 98 | 0.679802 |
5ce5a735253176901c3f58de2b63db8181df462c | 939 | py | Python | 07_py-csv/standard.py | KarlWithK/chernandez10 | 86432460d51112fd69a85443c1ed0a433a6dacbb | [
"MIT"
] | null | null | null | 07_py-csv/standard.py | KarlWithK/chernandez10 | 86432460d51112fd69a85443c1ed0a433a6dacbb | [
"MIT"
] | null | null | null | 07_py-csv/standard.py | KarlWithK/chernandez10 | 86432460d51112fd69a85443c1ed0a433a6dacbb | [
"MIT"
] | 1 | 2021-01-12T19:57:55.000Z | 2021-01-12T19:57:55.000Z | #!/usr/bin/env python
# Carlos "Karl" Hernandez
# SoftDev
# K07 -- Aim: Worked with standard io in python
# 2020-09-30
# Team TLK: Matthew Hui, Yi Ling Wu, and Carlos "Karl" Hernandez
import csv
from random import choices
def get_random_occupations():
# need to open file
with open("./occupations.csv", "r", ne... | 33.535714 | 82 | 0.633653 |
29ff1970f147883966348f697691ab8ced098077 | 7,378 | py | Python | twisted/test/test_protocols.py | hawkowl/twisted | c413aac3888dea2202c0dc26f978d7f88b4b837a | [
"Unlicense",
"MIT"
] | null | null | null | twisted/test/test_protocols.py | hawkowl/twisted | c413aac3888dea2202c0dc26f978d7f88b4b837a | [
"Unlicense",
"MIT"
] | null | null | null | twisted/test/test_protocols.py | hawkowl/twisted | c413aac3888dea2202c0dc26f978d7f88b4b837a | [
"Unlicense",
"MIT"
] | null | null | null | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Test cases for twisted.protocols package.
"""
from twisted.trial import unittest
from twisted.protocols import wire, portforward
from twisted.internet import reactor, defer, address, protocol
from twisted.test import proto_helpers
class Wir... | 31.130802 | 79 | 0.634318 |
8eb48958e3777793e0b2240168b62303d32e4adf | 7,084 | py | Python | spira/yevon/vmodel/virtual.py | JCoetzee123/spira | dae08feba1578ecc8745b45109f4fb7bef374546 | [
"MIT"
] | null | null | null | spira/yevon/vmodel/virtual.py | JCoetzee123/spira | dae08feba1578ecc8745b45109f4fb7bef374546 | [
"MIT"
] | null | null | null | spira/yevon/vmodel/virtual.py | JCoetzee123/spira | dae08feba1578ecc8745b45109f4fb7bef374546 | [
"MIT"
] | null | null | null | import spira.all as spira
from copy import deepcopy
from spira.yevon import filters
from spira.yevon import constants
from spira.log import SPIRA_LOG as LOG
from spira.yevon.vmodel.derived import get_derived_elements
from spira.yevon.filters.layer_filter import LayerFilterAllow
from spira.core.parameters.initializer i... | 38.5 | 105 | 0.612507 |
aff291e442ee77c50c66451e2cd732467ddcfe01 | 8,880 | py | Python | plugins/commands.py | omindadelshan/Unlimited-Filter-Bot-1 | 271fe14ad6f95fa85aac467d4031311138bb250f | [
"MIT"
] | null | null | null | plugins/commands.py | omindadelshan/Unlimited-Filter-Bot-1 | 271fe14ad6f95fa85aac467d4031311138bb250f | [
"MIT"
] | null | null | null | plugins/commands.py | omindadelshan/Unlimited-Filter-Bot-1 | 271fe14ad6f95fa85aac467d4031311138bb250f | [
"MIT"
] | null | null | null | import os
import math
import json
import time
import shutil
import heroku3
import requests
from pyrogram import filters
from pyrogram import Client as trojanz
from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton
if bool(os.environ.get("WEBHOOK", False)):
from sample_config import Config
else:
... | 32.057762 | 98 | 0.554167 |
0ddaa41a336755b90c39578ed5d5f4cf081c22ea | 5,626 | py | Python | docs/source/conf.py | lumbric/gee_tools | 4fa88e8fe122a781ff94c345c32b365e65fc27aa | [
"MIT"
] | 13 | 2017-10-12T01:36:43.000Z | 2018-07-18T01:43:40.000Z | docs/source/conf.py | lumbric/gee_tools | 4fa88e8fe122a781ff94c345c32b365e65fc27aa | [
"MIT"
] | 4 | 2021-04-30T21:21:17.000Z | 2022-01-13T03:01:35.000Z | docs/source/conf.py | lumbric/gee_tools | 4fa88e8fe122a781ff94c345c32b365e65fc27aa | [
"MIT"
] | 3 | 2017-10-12T01:36:52.000Z | 2018-06-26T18:46:45.000Z | # -*- coding: utf-8 -*-
#
# geetools documentation build configuration file, created by
# sphinx-quickstart on Wed Nov 15 09:28:15 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# ... | 30.576087 | 79 | 0.680768 |
dd43afde988095b97d3d668084796e66de331257 | 1,967 | py | Python | acme/losses/huber.py | owenshen24/acme | 71434dffd3449236f9b8aaf7a53ceab515e75a2a | [
"Apache-2.0"
] | 1 | 2020-06-03T18:33:40.000Z | 2020-06-03T18:33:40.000Z | acme/losses/huber.py | owenshen24/acme | 71434dffd3449236f9b8aaf7a53ceab515e75a2a | [
"Apache-2.0"
] | null | null | null | acme/losses/huber.py | owenshen24/acme | 71434dffd3449236f9b8aaf7a53ceab515e75a2a | [
"Apache-2.0"
] | 1 | 2021-11-26T22:51:55.000Z | 2021-11-26T22:51:55.000Z | # python3
# Copyright 2018 DeepMind Technologies Limited. 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 re... | 33.913793 | 78 | 0.70971 |
07cd2840601d29d51a973c08fcac04b7bb6f837d | 8,572 | py | Python | p2_continuous-control/ddpg_agent.py | pabloppp/deep-reinforcement-learning | 3e55829a803ddd094d52592a67398518e1d3544e | [
"MIT"
] | null | null | null | p2_continuous-control/ddpg_agent.py | pabloppp/deep-reinforcement-learning | 3e55829a803ddd094d52592a67398518e1d3544e | [
"MIT"
] | null | null | null | p2_continuous-control/ddpg_agent.py | pabloppp/deep-reinforcement-learning | 3e55829a803ddd094d52592a67398518e1d3544e | [
"MIT"
] | null | null | null | import numpy as np
import random
import copy
from collections import namedtuple, deque
from model import Actor, Critic
import torch
import torch.nn.functional as F
import torch.optim as optim
BUFFER_SIZE = int(1e6) # replay buffer size
BATCH_SIZE = 128 # minibatch size
GAMMA = 0.99 # discount fact... | 40.819048 | 127 | 0.622259 |
dd243c8ebf390cfa52ef6090f990c441afaec834 | 5,615 | py | Python | GasBotty/models/detection/transform.py | GreenCUBIC/GasBotty | 158f5991201c80bf4cbbbb9deabc9954ff19bbb1 | [
"MIT"
] | null | null | null | GasBotty/models/detection/transform.py | GreenCUBIC/GasBotty | 158f5991201c80bf4cbbbb9deabc9954ff19bbb1 | [
"MIT"
] | null | null | null | GasBotty/models/detection/transform.py | GreenCUBIC/GasBotty | 158f5991201c80bf4cbbbb9deabc9954ff19bbb1 | [
"MIT"
] | null | null | null | import random
import math
import torch
from torch import nn
from torchvision.ops import misc as misc_nn_ops
from .image_list import ImageList
from .roi_heads import paste_masks_in_image
class GeneralizedRCNNTransform(nn.Module):
"""
Performs input / target transformation before feeding the data t... | 39.265734 | 100 | 0.599288 |
0fb164863ad92e1060fb6b914e6facd523100b01 | 1,871 | py | Python | migrations/versions/3f8599f1ba77_.py | ionrock/dadd | 5ad893f90f7193589aa1876018c5020083f2b56a | [
"BSD-3-Clause"
] | 1 | 2016-05-10T05:56:08.000Z | 2016-05-10T05:56:08.000Z | migrations/versions/3f8599f1ba77_.py | ionrock/dadd | 5ad893f90f7193589aa1876018c5020083f2b56a | [
"BSD-3-Clause"
] | null | null | null | migrations/versions/3f8599f1ba77_.py | ionrock/dadd | 5ad893f90f7193589aa1876018c5020083f2b56a | [
"BSD-3-Clause"
] | null | null | null | """Initial database.
Revision ID: 3f8599f1ba77
Revises: None
Create Date: 2014-12-18 21:47:50.840534
"""
# revision identifiers, used by Alembic.
revision = '3f8599f1ba77'
down_revision = None
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
def upgrade():
### commands... | 31.711864 | 78 | 0.61892 |
db6c2255b78fb03a98cf2435efe79def62f49da4 | 3,563 | py | Python | api/dailymed/tests/test_db.py | coderxio/dailymed-api | 90fe5f8b40a854ff7543ec9b8c4fc0232fdd0dfc | [
"MIT"
] | 10 | 2020-09-23T14:13:35.000Z | 2022-03-01T17:39:23.000Z | api/dailymed/tests/test_db.py | coderxio/dailymed-api | 90fe5f8b40a854ff7543ec9b8c4fc0232fdd0dfc | [
"MIT"
] | 30 | 2020-09-04T14:43:35.000Z | 2021-01-24T01:17:08.000Z | api/dailymed/tests/test_db.py | coderxio/dailymed-api | 90fe5f8b40a854ff7543ec9b8c4fc0232fdd0dfc | [
"MIT"
] | 3 | 2020-12-22T01:49:32.000Z | 2022-02-10T01:56:05.000Z | from django.test import TestCase
from dailymed.models import Set, Spl, Product, InactiveIngredient, Package
import json
from pathlib import Path
class DatabaseTest(TestCase):
"""Test database creation and structure"""
def setUp(self):
"""Creates sample data to load into database"""
cwd = Pa... | 36.357143 | 78 | 0.581532 |
ecac47145b714dc464368a1fe083607acb4118be | 6,307 | py | Python | skl2onnx/operator_converters/gaussian_process.py | m3at/sklearn-onnx | 080b6231cad09b8ada9e1901aa9262e44db0fb74 | [
"MIT"
] | 1 | 2021-04-12T12:38:20.000Z | 2021-04-12T12:38:20.000Z | skl2onnx/operator_converters/gaussian_process.py | m3at/sklearn-onnx | 080b6231cad09b8ada9e1901aa9262e44db0fb74 | [
"MIT"
] | null | null | null | skl2onnx/operator_converters/gaussian_process.py | m3at/sklearn-onnx | 080b6231cad09b8ada9e1901aa9262e44db0fb74 | [
"MIT"
] | null | null | null | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
import num... | 40.171975 | 79 | 0.572538 |
5599b3de09cf15e25934d6099436d4d09104d89d | 5,185 | py | Python | bids/reports/report.py | KirstieJane/pybids | 4d4115311bf4d7042bfef23007b8e8a33972d88e | [
"MIT"
] | null | null | null | bids/reports/report.py | KirstieJane/pybids | 4d4115311bf4d7042bfef23007b8e8a33972d88e | [
"MIT"
] | null | null | null | bids/reports/report.py | KirstieJane/pybids | 4d4115311bf4d7042bfef23007b8e8a33972d88e | [
"MIT"
] | null | null | null | """Generate publication-quality data acquisition methods section from BIDS dataset.
"""
from __future__ import print_function
import json
from os.path import dirname
from os.path import abspath
from os.path import join as pathjoin
from collections import Counter
from bids.reports import utils
from bids.reports import ... | 38.125 | 93 | 0.599036 |
0fa13621356aa8cdeb7362839dc682fdb7b79935 | 654 | py | Python | session-01-basics/code/project-01-rps/rock_paper_scissors.py | cctechwiz-teaching/python-code-camp | 1453bebe44d66f27558eb6204fbf4d5f08cc756e | [
"MIT"
] | 2 | 2019-06-22T17:13:16.000Z | 2019-06-22T17:13:17.000Z | session-01-basics/code/project-01-rps/rock_paper_scissors.py | cctechwiz-teaching/python-code-camp | 1453bebe44d66f27558eb6204fbf4d5f08cc756e | [
"MIT"
] | null | null | null | session-01-basics/code/project-01-rps/rock_paper_scissors.py | cctechwiz-teaching/python-code-camp | 1453bebe44d66f27558eb6204fbf4d5f08cc756e | [
"MIT"
] | null | null | null | player1 = input('Player 1 name: ')
player2 = input('Player 2 name: ')
print('Choose r, p, or s')
p1 = input('Player 1 choice: ')
p2 = input('Player 2 choice: ')
if p1 == p2:
print('tie')
if p1 == 'r':
if p2 == 'p':
print(f'{player2} beats rock with paper')
if p2 == 's':
print(f'{player1} ... | 26.16 | 53 | 0.547401 |
e54dc418036a061b51ea3dc1622a0ca590ecb1aa | 1,457 | py | Python | easyneuron/_testutils/logger.py | neuron-ai/easyNeuron | 15454f342092729765ed3428f8b54ec7d0e5e626 | [
"Apache-2.0"
] | 1 | 2021-12-11T14:04:04.000Z | 2021-12-11T14:04:04.000Z | easyneuron/_testutils/logger.py | neuron-ai/easyNeuron | 15454f342092729765ed3428f8b54ec7d0e5e626 | [
"Apache-2.0"
] | null | null | null | easyneuron/_testutils/logger.py | neuron-ai/easyNeuron | 15454f342092729765ed3428f8b54ec7d0e5e626 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Neuron-AI GitHub 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 ... | 41.628571 | 96 | 0.595058 |
baec19d0b5f45bc875f25e6b0d0946446f51254a | 413 | py | Python | App/Kill Background Processes.py | danielgamage/Mekkablue-Scripts | 0b0b4468ec938f8c669b3552e2fa429080b65bf1 | [
"Apache-2.0"
] | null | null | null | App/Kill Background Processes.py | danielgamage/Mekkablue-Scripts | 0b0b4468ec938f8c669b3552e2fa429080b65bf1 | [
"Apache-2.0"
] | null | null | null | App/Kill Background Processes.py | danielgamage/Mekkablue-Scripts | 0b0b4468ec938f8c669b3552e2fa429080b65bf1 | [
"Apache-2.0"
] | null | null | null | #MenuTitle: Kill Background Processes
# -*- coding: utf-8 -*-
__doc__="""
Terminates all makeotfGlyphs processes. If your fan keeps screaming after exporting a font, or after cancelling a font export, then run this script and see if it helps.
"""
import os
terminalCommand = 'killall makeotfGlyphs'
terminalCommandResult... | 37.545455 | 168 | 0.765133 |
430b3ae6ca3ebc22b7b507e910fa374d08da30fe | 2,260 | py | Python | azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/iteration_performance.py | bulentelmaci/azure-sdk-for-python | 9723d1baf6dde51c069e172ff0f21eb925d362f1 | [
"MIT"
] | null | null | null | azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/iteration_performance.py | bulentelmaci/azure-sdk-for-python | 9723d1baf6dde51c069e172ff0f21eb925d362f1 | [
"MIT"
] | null | null | null | azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/iteration_performance.py | bulentelmaci/azure-sdk-for-python | 9723d1baf6dde51c069e172ff0f21eb925d362f1 | [
"MIT"
] | null | null | null | # 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 ... | 38.305085 | 88 | 0.64115 |
e6c8b32405441ebc41014c56b5b9cb50ac0a510e | 618 | py | Python | borrow/migrations/0002_auto_20190401_1619.py | PainterPuppets/GlamorganBookStore | 86bd0c86005f66c83c3389effc8da6f65297df1e | [
"Apache-2.0"
] | null | null | null | borrow/migrations/0002_auto_20190401_1619.py | PainterPuppets/GlamorganBookStore | 86bd0c86005f66c83c3389effc8da6f65297df1e | [
"Apache-2.0"
] | null | null | null | borrow/migrations/0002_auto_20190401_1619.py | PainterPuppets/GlamorganBookStore | 86bd0c86005f66c83c3389effc8da6f65297df1e | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9.13 on 2019-04-01 08:19
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('borrow', '0001_initial'),
]
operations = [
migrations.AlterField(
... | 23.769231 | 62 | 0.593851 |
83b58271a4e1ab7d1db988e26710e0de04382cba | 1,864 | py | Python | examples/ppo/test_episodes.py | cleichner/flax | f1a1be119942444d564ad112bf0ea38145271ae9 | [
"Apache-2.0"
] | null | null | null | examples/ppo/test_episodes.py | cleichner/flax | f1a1be119942444d564ad112bf0ea38145271ae9 | [
"Apache-2.0"
] | null | null | null | examples/ppo/test_episodes.py | cleichner/flax | f1a1be119942444d564ad112bf0ea38145271ae9 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 The Flax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | 32.137931 | 78 | 0.709764 |
e5e95acc76d62b50733d6048e29c1e629ae4f903 | 114 | py | Python | file_receiver/admin.py | MartinMa28/Cloud-Disk-Server | 31d6dfda2c608bdaab351c9fe8c22a9da927cd1d | [
"MIT"
] | 1 | 2020-04-25T02:21:08.000Z | 2020-04-25T02:21:08.000Z | file_receiver/admin.py | MartinMa28/Cloud-Disk-Server | 31d6dfda2c608bdaab351c9fe8c22a9da927cd1d | [
"MIT"
] | 2 | 2021-03-30T13:10:00.000Z | 2021-06-10T18:57:26.000Z | file_receiver/admin.py | MartinMa28/Cloud-Disk-Server | 31d6dfda2c608bdaab351c9fe8c22a9da927cd1d | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import File
# Register your models here.
admin.site.register(File) | 19 | 32 | 0.798246 |
395e41460cce97303306f3b6819d271296568118 | 5,748 | py | Python | ray-crash-course/pi_calc.py | aksakalli/academy | 75b05da0be4a657856a2dc7bd7dc49bbbcf2dd08 | [
"Apache-2.0"
] | 342 | 2020-04-10T22:38:44.000Z | 2022-03-30T08:04:16.000Z | ray-crash-course/pi_calc.py | aksakalli/academy | 75b05da0be4a657856a2dc7bd7dc49bbbcf2dd08 | [
"Apache-2.0"
] | 33 | 2020-06-08T06:12:07.000Z | 2021-12-24T19:49:05.000Z | ray-crash-course/pi_calc.py | aksakalli/academy | 75b05da0be4a657856a2dc7bd7dc49bbbcf2dd08 | [
"Apache-2.0"
] | 139 | 2020-05-11T17:48:30.000Z | 2022-03-26T04:04:41.000Z | #!/usr/bin/env python
# Tools for the Monte Carlo computation of Pi.
import math, statistics, random, time, sys, locale
import ray
import numpy as np
def estimate_pi(num_samples, return_points=False):
"""
Monte Carlo estimation of Pi, using ``num_samples`` random points.
Args:
num_samples: How m... | 37.324675 | 108 | 0.653271 |
303be43a9e4e987bad72d81510c52147129a3b9c | 4,330 | py | Python | py_bipartite_matching/biparite_sample.py | FranciscoMoretti/PyBipartiteMatching | 1edc1b2867c0c2d221fb1deedd1a28ad905b674e | [
"MIT"
] | 1 | 2022-02-24T18:30:48.000Z | 2022-02-24T18:30:48.000Z | py_bipartite_matching/biparite_sample.py | FranciscoMoretti/PyBipartiteMatching | 1edc1b2867c0c2d221fb1deedd1a28ad905b674e | [
"MIT"
] | 1 | 2021-02-14T15:16:17.000Z | 2021-02-14T15:23:49.000Z | py_bipartite_matching/biparite_sample.py | FranciscoMoretti/py_bipartite_matching | 1edc1b2867c0c2d221fb1deedd1a28ad905b674e | [
"MIT"
] | null | null | null | import networkx as nx
def davis_southern_women_graph() -> nx.Graph:
"""Returns Davis Southern women social network.
This is a bipartite graph.
References
----------
.. [1] A. Davis, Gardner, B. B., Gardner, M. R., 1941. Deep South.
University of Chicago Press, Chicago, IL.
"""
G ... | 29.060403 | 70 | 0.459815 |
1303e7610024ca11f1fd5d738162995fd6d4a1c9 | 7,055 | py | Python | Code/tg_fit_split_cond.py | fmott/two_goal_task | b2a7948ced432b48566d8d00e97e83a65fba7ca5 | [
"MIT"
] | null | null | null | Code/tg_fit_split_cond.py | fmott/two_goal_task | b2a7948ced432b48566d8d00e97e83a65fba7ca5 | [
"MIT"
] | null | null | null | Code/tg_fit_split_cond.py | fmott/two_goal_task | b2a7948ced432b48566d8d00e97e83a65fba7ca5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Tue Oct 8 10:55:39 2019
@author: ott
"""
import time as time
import torch
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from agents import Informed
from inference import Inferrer
from helpers import offer_state_mapping
zeros = torch.zeros
ones = torch.... | 34.414634 | 168 | 0.633451 |
384247a46d31e45bdd647f30574301ab26fb3167 | 3,582 | py | Python | Cogs/Face.py | holgern/CommunityUpvoteBot | b9af069749707ae03936f8015a42a4af57aef57f | [
"MIT"
] | 5 | 2018-06-27T07:59:42.000Z | 2018-07-05T20:35:24.000Z | Cogs/Face.py | holgern/BeemBot.py | b9af069749707ae03936f8015a42a4af57aef57f | [
"MIT"
] | null | null | null | Cogs/Face.py | holgern/BeemBot.py | b9af069749707ae03936f8015a42a4af57aef57f | [
"MIT"
] | null | null | null | import asyncio
import discord
from discord.ext import commands
from Cogs import Settings
from Cogs import DisplayName
from Cogs import Nullify
def setup(bot):
# Add the bot and deps
settings = bot.get_cog("Settings")
bot.add_cog(Face(bot, settings))
# This is the Face module. It sends ... | 36.181818 | 118 | 0.589894 |
ab3d1fe2658d9ef8f6462e37a4ad33a9644b3b4a | 8,837 | py | Python | profiling/numIntSet_timing/unbinned_scaling2_e_scaling_overhead_outfiles_opt.py | NLeSC/parallel-roofit-scripts | 70de07edfd8e400650af4cb34789dbb8b8fc9574 | [
"Apache-2.0"
] | 1 | 2017-11-21T10:24:51.000Z | 2017-11-21T10:24:51.000Z | profiling/numIntSet_timing/unbinned_scaling2_e_scaling_overhead_outfiles_opt.py | NLeSC/parallel-roofit-scripts | 70de07edfd8e400650af4cb34789dbb8b8fc9574 | [
"Apache-2.0"
] | 2 | 2017-07-02T12:51:57.000Z | 2017-09-07T14:35:43.000Z | profiling/numIntSet_timing/unbinned_scaling2_e_scaling_overhead_outfiles_opt.py | roofit-dev/parallel-roofit-scripts | 70de07edfd8e400650af4cb34789dbb8b8fc9574 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @Author: Patrick Bos
# @Date: 2016-11-16 16:23:55
# @Last Modified by: E. G. Patrick Bos
# @Last Modified time: 2017-05-30 17:38:00
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import seaborn as sns
from pathlib import Path
import itertool... | 47.510753 | 227 | 0.749802 |
20935e09886e0b36448d06caa847d93f37f7e69c | 3,485 | py | Python | lib/termineter/modules/get_local_display_info.py | jayaram24/Termineter-Modified | 2cab514ff1640809337c6fe17f24433bcdec2260 | [
"MIT"
] | 185 | 2015-03-20T02:16:32.000Z | 2020-04-07T23:58:46.000Z | lib/termineter/modules/get_local_display_info.py | pascal1989/termineter | d657d25d97c7739e650b951c396404e857e56625 | [
"BSD-3-Clause"
] | 7 | 2015-06-18T15:27:12.000Z | 2018-03-18T20:30:06.000Z | lib/termineter/modules/get_local_display_info.py | pascal1989/termineter | d657d25d97c7739e650b951c396404e857e56625 | [
"BSD-3-Clause"
] | 80 | 2015-03-10T18:37:19.000Z | 2020-04-01T00:24:26.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# termineter/modules/get_local_display_info.py
#
# 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
... | 46.466667 | 147 | 0.736298 |
78719d69735242d55a732086b3eef46ae5a2c489 | 9,504 | py | Python | huaweicloud-sdk-apig/huaweicloudsdkapig/v2/model/update_special_throttling_configuration_v2_response.py | githubmilesma/huaweicloud-sdk-python-v3 | 9d9449ed68a609ca65f0aa50b5b2a1c28445bf03 | [
"Apache-2.0"
] | 1 | 2021-04-16T07:59:28.000Z | 2021-04-16T07:59:28.000Z | huaweicloud-sdk-apig/huaweicloudsdkapig/v2/model/update_special_throttling_configuration_v2_response.py | Lencof/huaweicloud-sdk-python-v3 | d13dc4e2830a83e295be6e4de021999b3376e34e | [
"Apache-2.0"
] | null | null | null | huaweicloud-sdk-apig/huaweicloudsdkapig/v2/model/update_special_throttling_configuration_v2_response.py | Lencof/huaweicloud-sdk-python-v3 | d13dc4e2830a83e295be6e4de021999b3376e34e | [
"Apache-2.0"
] | 1 | 2022-01-17T02:24:18.000Z | 2022-01-17T02:24:18.000Z | # coding: utf-8
import pprint
import re
import six
from huaweicloudsdkcore.sdk_response import SdkResponse
class UpdateSpecialThrottlingConfigurationV2Response(SdkResponse):
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.... | 29.06422 | 165 | 0.628262 |
dfab371c806c75e2e6bb009262caa6cd1082f80b | 1,460 | py | Python | main.py | lioumin1/easy12306 | b0c9aafe157732ee38ca2b948d87cf9f536fa167 | [
"Artistic-2.0"
] | 2,882 | 2015-03-24T02:32:53.000Z | 2022-03-31T06:46:06.000Z | main.py | git-ztx/easy12306 | 4b94bf83a4acf0c85d4d176a14ce22a4f68b7b81 | [
"Artistic-2.0"
] | 28 | 2016-11-19T13:49:32.000Z | 2021-04-06T03:57:57.000Z | main.py | git-ztx/easy12306 | 4b94bf83a4acf0c85d4d176a14ce22a4f68b7b81 | [
"Artistic-2.0"
] | 768 | 2015-07-17T02:48:00.000Z | 2022-03-19T02:05:00.000Z | # coding: utf-8
import sys
import cv2
import numpy as np
from keras import models
import pretreatment
from mlearn_for_image import preprocess_input
def get_text(img, offset=0):
text = pretreatment.get_text(img, offset)
text = cv2.cvtColor(text, cv2.COLOR_BGR2GRAY)
text = text / 255.0
... | 23.934426 | 55 | 0.589726 |
286a5f0c6015625c34b1756fdd6c1f18567f8ccd | 1,020 | py | Python | tests/sample_program/running_text_original.py | zevtyardt/no-strint | 47583d55e3c4cd12f00f46902d2fd7d5138c3275 | [
"MIT"
] | 13 | 2019-03-13T04:14:45.000Z | 2020-04-05T09:13:21.000Z | tests/sample_program/running_text_original.py | zevtyardt/no-strint | 47583d55e3c4cd12f00f46902d2fd7d5138c3275 | [
"MIT"
] | null | null | null | tests/sample_program/running_text_original.py | zevtyardt/no-strint | 47583d55e3c4cd12f00f46902d2fd7d5138c3275 | [
"MIT"
] | 6 | 2019-03-22T04:48:59.000Z | 2020-08-07T17:09:20.000Z | import sys, time
def run(text, lenght=20, sleep=0.2):
lenght = len(text) + 5 if lenght < len(text) else lenght
F = '\r\t[ \x1b[36m{0:>%s}\x1b[0m ] @ zvtyrdt.id ' % lenght
num = 1
while True:
axl = lenght
while True:
letters = text[0:num]
if num > len(text) if le... | 32.903226 | 87 | 0.463725 |
b03fdc17b234935e199aad0b51296929341c14b7 | 801 | py | Python | mysite/classroom/migrations/0008_auto_20200525_0326.py | anishmo99/Classrooom-Django-Web-App | 255703d696040fa762f97119b2e7381b4a5e91c3 | [
"MIT"
] | 1 | 2021-02-04T12:55:18.000Z | 2021-02-04T12:55:18.000Z | mysite/classroom/migrations/0008_auto_20200525_0326.py | anishmo99/Classrooom-Django-Web-App | 255703d696040fa762f97119b2e7381b4a5e91c3 | [
"MIT"
] | null | null | null | mysite/classroom/migrations/0008_auto_20200525_0326.py | anishmo99/Classrooom-Django-Web-App | 255703d696040fa762f97119b2e7381b4a5e91c3 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.5 on 2020-05-25 03:26
import datetime
from django.db import migrations, models
from django.utils.timezone import utc
class Migration(migrations.Migration):
dependencies = [
('classroom', '0007_auto_20200524_1748'),
]
operations = [
migrations.AlterField(
... | 30.807692 | 141 | 0.642946 |
a2e2b4de63ab2277e11d21110231a74b2c41c43e | 12,999 | py | Python | holoviews/tests/plotting/bokeh/testlayoutplot.py | arabidopsis/holoviews | 5bd1cc5d12b77f9fbb2b783356020859f60bcb28 | [
"BSD-3-Clause"
] | null | null | null | holoviews/tests/plotting/bokeh/testlayoutplot.py | arabidopsis/holoviews | 5bd1cc5d12b77f9fbb2b783356020859f60bcb28 | [
"BSD-3-Clause"
] | null | null | null | holoviews/tests/plotting/bokeh/testlayoutplot.py | arabidopsis/holoviews | 5bd1cc5d12b77f9fbb2b783356020859f60bcb28 | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
from holoviews.core import (HoloMap, GridSpace, Layout, Empty, Dataset,
NdOverlay, DynamicMap, Dimension)
from holoviews.element import Curve, Image, Points
from holoviews.streams import Stream
from .testplot import TestBokehPlot, bokeh_renderer
try:
from bokeh.layo... | 47.441606 | 104 | 0.621125 |
bd1240bc0c3968cfa91118a354539cfeb0ae15f6 | 1,053 | py | Python | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/lib/adafruit_seesaw/analoginput.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 47 | 2021-02-15T23:02:36.000Z | 2022-03-04T21:30:03.000Z | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/lib/adafruit_seesaw/analoginput.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 7 | 2021-02-19T20:00:08.000Z | 2022-01-14T10:51:12.000Z | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/lib/adafruit_seesaw/analoginput.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 14 | 2021-02-20T17:40:56.000Z | 2022-01-01T19:53:38.000Z | # SPDX-FileCopyrightText: 2017 Dean Miller for Adafruit Industries
#
# SPDX-License-Identifier: MIT
# pylint: disable=missing-docstring,invalid-name,too-many-public-methods
"""
`adafruit_seesaw.analoginput`
====================================================
"""
__version__ = "1.7.1"
__repo__ = "https://github.com/... | 26.325 | 90 | 0.65717 |
fda65cd783882c2ef579c1299b0ca89d2a119731 | 355 | py | Python | example/sam/data/MSSpecies.py | eons-dev/esam | 269b12ba634ab46d865a9c8da5a2ca43a2462203 | [
"MIT"
] | null | null | null | example/sam/data/MSSpecies.py | eons-dev/esam | 269b12ba634ab46d865a9c8da5a2ca43a2462203 | [
"MIT"
] | null | null | null | example/sam/data/MSSpecies.py | eons-dev/esam | 269b12ba634ab46d865a9c8da5a2ca43a2462203 | [
"MIT"
] | null | null | null | import eons, esam
class MSSpecies(esam.Datum):
def __init__(self, name=eons.INVALID_NAME()):
super().__init__()
#Absolute time at measurement is set as self.uniqueId
self.mass = 0
self.runtime = 0
self.analog = 0
self.digital = 0
self.sc... | 25.357143 | 62 | 0.55493 |
a41e4cd8c2eb780c7be0c19fba6552b89f5eeb70 | 1,852 | py | Python | mxnetseg/models/eprnet.py | BebDong/MXNetSeg | 58bf1f27d827f1b34f8ddeead3f9714ee2289a4a | [
"Apache-2.0"
] | 26 | 2020-06-14T10:13:52.000Z | 2022-03-15T10:38:44.000Z | mxnetseg/models/eprnet.py | BebDong/MXNetSeg | 58bf1f27d827f1b34f8ddeead3f9714ee2289a4a | [
"Apache-2.0"
] | 1 | 2021-05-08T09:10:43.000Z | 2021-05-09T11:49:01.000Z | mxnetseg/models/eprnet.py | BebDong/MXNetSeg | 58bf1f27d827f1b34f8ddeead3f9714ee2289a4a | [
"Apache-2.0"
] | 4 | 2020-06-14T10:13:55.000Z | 2021-09-21T00:54:29.000Z | # coding=utf-8
from mxnet.gluon import nn
from .base import SegBaseModel
from .backbone import eprnet_cls, eprnet_cls_light
from mxnetseg.utils import MODELS
from mxnetseg.nn import FCNHead
@MODELS.add_component
class EPRNet(SegBaseModel):
def __init__(self, nclass, height=None, width=None, base_size=... | 39.404255 | 95 | 0.602592 |
99c46d8f6cdbdfdaaec108c868043c03bddde79a | 455 | py | Python | sdk/python/pulumi_kubernetes/storage/v1beta1/__init__.py | kulado/kulado-kubernetes | ecb72f9b25f6dbbae41f00c82388b1ca32329cc7 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_kubernetes/storage/v1beta1/__init__.py | kulado/kulado-kubernetes | ecb72f9b25f6dbbae41f00c82388b1ca32329cc7 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_kubernetes/storage/v1beta1/__init__.py | kulado/kulado-kubernetes | ecb72f9b25f6dbbae41f00c82388b1ca32329cc7 | [
"Apache-2.0"
] | 1 | 2019-08-20T22:51:57.000Z | 2019-08-20T22:51:57.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Kulado Kubernetes codegen tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
# Export this package's modules as members:
from .CSIDriver import *
from .CSIDriverList import *
from .CSINode import *
from .CSINodeList im... | 32.5 | 81 | 0.751648 |
925d38a62c3f49185c51c46fbac3fc743fe9d9a7 | 12,782 | py | Python | AP/views.py | luizfreinoso/mvlibras | 3d934dcde545885371d1629b956314ca5947d9e9 | [
"MIT"
] | null | null | null | AP/views.py | luizfreinoso/mvlibras | 3d934dcde545885371d1629b956314ca5947d9e9 | [
"MIT"
] | null | null | null | AP/views.py | luizfreinoso/mvlibras | 3d934dcde545885371d1629b956314ca5947d9e9 | [
"MIT"
] | null | null | null | from django.shortcuts import render, get_object_or_404, get_list_or_404, HttpResponseRedirect, HttpResponse
from django.contrib.auth.decorators import login_required, user_passes_test
from models import AP, APConfiguracao, APDados, APListaRecursos
from django.core.urlresolvers import reverse
from django.utils import ti... | 34.639566 | 109 | 0.571194 |
77972fa193a4e564128c6fb0d9f50742a6a58dc9 | 918 | py | Python | src/dbms/test_main.py | ojjy/dbmsValCheck | ffb2f6151a2b5719158fe83730929f4cbfdfdcc2 | [
"MIT"
] | null | null | null | src/dbms/test_main.py | ojjy/dbmsValCheck | ffb2f6151a2b5719158fe83730929f4cbfdfdcc2 | [
"MIT"
] | null | null | null | src/dbms/test_main.py | ojjy/dbmsValCheck | ffb2f6151a2b5719158fe83730929f4cbfdfdcc2 | [
"MIT"
] | null | null | null | from dbms.mysql_con import MYSQLdb
from dbms.sf_con import Snowflakedb
from dbms.postgres_con import Postgredb
import json
if __name__ == "__main__":
with open("dbinfo.json") as con:
dbinfo = json.loads(con.read())
print(dbinfo)
MYSQLdb.validate(user=dbinfo['MYSQL_USER'], pwd=dbinfo['MYSQL_PWD'],... | 51 | 149 | 0.696078 |
10ad2db53b649e433956811c0a393019c21d621e | 283 | py | Python | slash/plugins/registration_info.py | kbh2o/slash | 532b7e3acdf46103ece5b86f21c29f9b58587289 | [
"BSD-3-Clause"
] | 70 | 2015-12-05T12:33:10.000Z | 2022-03-03T04:56:58.000Z | slash/plugins/registration_info.py | kbh2o/slash | 532b7e3acdf46103ece5b86f21c29f9b58587289 | [
"BSD-3-Clause"
] | 711 | 2015-10-06T11:01:48.000Z | 2022-02-09T12:40:47.000Z | slash/plugins/registration_info.py | kbh2o/slash | 532b7e3acdf46103ece5b86f21c29f9b58587289 | [
"BSD-3-Clause"
] | 37 | 2015-10-13T11:00:51.000Z | 2022-02-08T07:28:11.000Z | class RegistrationInfo(object):
def __init__(self, hook_name, expect_exists, register_kwargs=None):
assert isinstance(expect_exists, bool)
self.hook_name = hook_name
self.expect_exists = expect_exists
self.register_kwargs = register_kwargs or {}
| 35.375 | 71 | 0.720848 |
d2e5578a0d4ec18eca9b927e97457fc56275b746 | 3,375 | py | Python | test/functional/test_framework/coverage.py | pandagrows/sssed2need-silo-coin | 393c5cd4b3a82b4049d869104158838f9fcdce9e | [
"MIT"
] | 3 | 2020-06-09T16:29:25.000Z | 2021-01-01T22:48:58.000Z | test/functional/test_framework/coverage.py | pandagrows/sssed2need-silo-coin | 393c5cd4b3a82b4049d869104158838f9fcdce9e | [
"MIT"
] | null | null | null | test/functional/test_framework/coverage.py | pandagrows/sssed2need-silo-coin | 393c5cd4b3a82b4049d869104158838f9fcdce9e | [
"MIT"
] | 4 | 2019-11-21T21:51:05.000Z | 2020-06-13T00:25:32.000Z | #!/usr/bin/env python3
# Copyright (c) 2015-2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Utilities for doing coverage analysis on the RPC interface.
Provides a way to track which RPC commands... | 30.681818 | 87 | 0.661333 |
af757bdf2526188af574d843c11fbc48dcb1553f | 1,500 | py | Python | src/algoritmia/datastructures/lists/interfaces.py | DavidLlorens/algoritmia | 40ca0a89ea6de9b633fa5f697f0a28cae70816a2 | [
"MIT"
] | 6 | 2018-09-15T15:09:10.000Z | 2022-02-27T01:23:11.000Z | src/algoritmia/datastructures/lists/interfaces.py | DavidLlorens/algoritmia | 40ca0a89ea6de9b633fa5f697f0a28cae70816a2 | [
"MIT"
] | null | null | null | src/algoritmia/datastructures/lists/interfaces.py | DavidLlorens/algoritmia | 40ca0a89ea6de9b633fa5f697f0a28cae70816a2 | [
"MIT"
] | 5 | 2018-07-10T20:19:55.000Z | 2021-03-31T03:32:22.000Z | from collections.abc import Container, Iterable, Sized
from abc import abstractmethod
class IList(Sized, Iterable, Container): #[ilist
@abstractmethod
def __getitem__(self, index: "int") -> "T": pass
@abstractmethod
def __setitem__(self, index: "int") -> "T": pass
@abstractmethod
d... | 28.301887 | 78 | 0.523333 |
0ad813fccdfb46f98b4675880a6e64a71f60ae77 | 418 | py | Python | restapi/migrations/0007_auto_20180805_1822.py | AymenQ/tarteel.io | a72150bca90b5244580daf172d5f8d738ba98c1b | [
"MIT"
] | null | null | null | restapi/migrations/0007_auto_20180805_1822.py | AymenQ/tarteel.io | a72150bca90b5244580daf172d5f8d738ba98c1b | [
"MIT"
] | null | null | null | restapi/migrations/0007_auto_20180805_1822.py | AymenQ/tarteel.io | a72150bca90b5244580daf172d5f8d738ba98c1b | [
"MIT"
] | null | null | null | # Generated by Django 2.0.1 on 2018-08-06 01:22
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('restapi', '0006_auto_20180805_1813'),
]
operations = [
migrations.AlterField(
model_name='demographicinformation',
n... | 22 | 62 | 0.62201 |
abb9a450a1fc1eb62c060b71e434b43265987ce4 | 5,104 | py | Python | tethysext/atcore/tests/unit_tests/services/model_database_base.py | Aquaveo/tethysext-atcore | 7a83ccea24fdbbe806f12154f938554dd6c8015f | [
"BSD-3-Clause"
] | 3 | 2020-11-05T23:50:47.000Z | 2021-02-26T21:43:29.000Z | tethysext/atcore/tests/unit_tests/services/model_database_base.py | Aquaveo/tethysext-atcore | 7a83ccea24fdbbe806f12154f938554dd6c8015f | [
"BSD-3-Clause"
] | 7 | 2020-10-29T16:53:49.000Z | 2021-05-07T19:46:47.000Z | tethysext/atcore/tests/unit_tests/services/model_database_base.py | Aquaveo/tethysext-atcore | 7a83ccea24fdbbe806f12154f938554dd6c8015f | [
"BSD-3-Clause"
] | null | null | null | """
********************************************************************************
* Name: model_database
* Author: nswain
* Created On: June 07, 2018
* Copyright: (c) Aquaveo 2018
********************************************************************************
"""
import unittest
from unittest import mock
from tethy... | 27.44086 | 91 | 0.613245 |
e792e6f8d0c31f001f2e486cab154e3e4c059e7e | 22,059 | py | Python | codes/utils/data.py | koustuvsinha/hier-class | 6ee2702bc228e9c94b42a32a6a78dc27159fefb8 | [
"MIT"
] | 24 | 2019-03-07T07:34:25.000Z | 2022-03-28T16:35:55.000Z | codes/utils/data.py | koustuvsinha/hier-class | 6ee2702bc228e9c94b42a32a6a78dc27159fefb8 | [
"MIT"
] | 3 | 2019-05-11T19:06:50.000Z | 2020-04-16T07:10:27.000Z | codes/utils/data.py | koustuvsinha/hier-class | 6ee2702bc228e9c94b42a32a6a78dc27159fefb8 | [
"MIT"
] | 8 | 2019-03-05T11:14:31.000Z | 2021-03-27T05:59:45.000Z | ## Data loader
## Read and prepare data for training.
## TODO: Use torch.DataLoader for efficient batch representations
import torch
import torch.utils.data as data
from torch.autograd import Variable
import os
from os.path import dirname, abspath
from tqdm import tqdm
from nltk.tokenize import word_tokenize
import js... | 38.836268 | 106 | 0.563534 |
16b9c225f44b8163a7639ec085b9a19c12fe30a0 | 5,765 | py | Python | sandbox/lib/jumpscale/JumpScale9Lib/clients/zero_os/sal/healthcheck.py | Jumpscale/sandbox_linux | 2aacd36b467ef30ac83718abfa82c6883b67a02f | [
"Apache-2.0"
] | 2 | 2017-06-07T08:11:47.000Z | 2017-11-10T02:19:48.000Z | JumpScale9Lib/clients/zero_os/sal/healthcheck.py | Jumpscale/lib9 | 82224784ef2a7071faeb48349007211c367bc673 | [
"Apache-2.0"
] | 188 | 2017-06-21T06:16:13.000Z | 2020-06-17T14:20:24.000Z | sandbox/lib/jumpscale/JumpScale9Lib/clients/zero_os/sal/healthcheck.py | Jumpscale/sandbox_linux | 2aacd36b467ef30ac83718abfa82c6883b67a02f | [
"Apache-2.0"
] | 3 | 2018-06-12T05:18:28.000Z | 2019-09-24T06:49:17.000Z | import hashlib
import json
import os
import traceback
from js9 import j
class HealthCheckObject():
def __init__(self, id, name, category, resource):
self.id = id
self.name = name
self.category = category
self._messages = []
self.resource = resource
self.stacktrac... | 32.027778 | 116 | 0.623764 |
d0cc38db8fc7bd6d32e878d831e80300bfe1fa4d | 1,032 | py | Python | misc/check-python-version.py | brenordv/python-snippets | aa69d4d64f7b9cea958ad852248210f4e869fe50 | [
"MIT"
] | 2 | 2020-04-10T21:20:22.000Z | 2021-01-17T19:28:32.000Z | misc/check-python-version.py | brenordv/python-snippets | aa69d4d64f7b9cea958ad852248210f4e869fe50 | [
"MIT"
] | null | null | null | misc/check-python-version.py | brenordv/python-snippets | aa69d4d64f7b9cea958ad852248210f4e869fe50 | [
"MIT"
] | 2 | 2020-07-20T20:24:01.000Z | 2022-02-27T15:40:40.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
check-python-version.py: Simple way to check your Python version during runtime.
"""
__author__ = "Breno RdV"
__copyright__ = "Breno RdV @ raccoon.ninja"
__contact__ = "http://raccoon.ninja"
__license__ = "MIT"
__version__ = "01.000"
__maintainer__ ... | 25.8 | 80 | 0.679264 |
8a15103a5f08545b88256f300d5fe763aa29846f | 381 | wsgi | Python | everything_else/apache/djfrontend.wsgi | timgates42/tweetmotif | 1b0b1e3a941745cd5a26eba01f554688b7c4b27e | [
"Apache-2.0"
] | 91 | 2015-01-05T01:10:51.000Z | 2021-09-26T18:01:53.000Z | everything_else/apache/djfrontend.wsgi | Ceos333/tweetmotif | 1b0b1e3a941745cd5a26eba01f554688b7c4b27e | [
"Apache-2.0"
] | null | null | null | everything_else/apache/djfrontend.wsgi | Ceos333/tweetmotif | 1b0b1e3a941745cd5a26eba01f554688b7c4b27e | [
"Apache-2.0"
] | 32 | 2015-04-03T04:29:45.000Z | 2021-09-14T21:36:02.000Z | import os,sys
dotdot = os.path.join(os.path.dirname(sys.modules[__name__].__file__), '..')
os.chdir(dotdot)
sys.path.insert(0,'')
sys.stderr = open('log/djfrontend.log','a',0)
sys.stdout = sys.stderr
os.environ['DJANGO_SETTINGS_MODULE'] = 'djfrontend.settings'
sys.path.insert(0,'djfrontend')
import django.core.handler... | 31.75 | 76 | 0.753281 |
c03cc203f723a5114b3f77e8325fd84ea101fcac | 5,724 | py | Python | webook/runserver.py | jancr/webook | d1e7e290f5eb3d576874625b9c258d494e8ca6ba | [
"MIT"
] | null | null | null | webook/runserver.py | jancr/webook | d1e7e290f5eb3d576874625b9c258d494e8ca6ba | [
"MIT"
] | null | null | null | webook/runserver.py | jancr/webook | d1e7e290f5eb3d576874625b9c258d494e8ca6ba | [
"MIT"
] | 1 | 2020-04-14T06:37:19.000Z | 2020-04-14T06:37:19.000Z | #!/usr/bin/env python
# core imports
import os
from os.path import join as pjoin
import sys
import hashlib
import time
import tempfile
import base64
# Setup for flask
import flask
from flask import (render_template, request, send_file, after_this_request,
Response, jsonify)
# local imports
from w... | 31.624309 | 83 | 0.582635 |
f8082e2c4cb81ced122a9cb30f743710e1a55bfb | 475 | py | Python | python_boilerplate/__main__.py | johnnymillergh/python_boilerplate | 6128932d95d0d8366592622c445f0f85e1755342 | [
"Apache-2.0"
] | null | null | null | python_boilerplate/__main__.py | johnnymillergh/python_boilerplate | 6128932d95d0d8366592622c445f0f85e1755342 | [
"Apache-2.0"
] | null | null | null | python_boilerplate/__main__.py | johnnymillergh/python_boilerplate | 6128932d95d0d8366592622c445f0f85e1755342 | [
"Apache-2.0"
] | null | null | null | import logging
import sys
from python_boilerplate.function.python_boilerplate_function import fib
log = logging.getLogger("rotatingFileLogger")
if __name__ == "__main__":
log.info(f"len(sys.argv) = {len(sys.argv)}, sys.argv: {sys.argv}")
if len(sys.argv) == 1:
log.warning("Arguments not provided, set... | 27.941176 | 71 | 0.627368 |
ac637d2cd24944da355c2092cb439abd3923f01f | 4,510 | py | Python | score_example.py | gpleiss/catrank | fc574a89b9e388ef34ee52dc602f129b39bb4c0a | [
"MIT"
] | null | null | null | score_example.py | gpleiss/catrank | fc574a89b9e388ef34ee52dc602f129b39bb4c0a | [
"MIT"
] | null | null | null | score_example.py | gpleiss/catrank | fc574a89b9e388ef34ee52dc602f129b39bb4c0a | [
"MIT"
] | null | null | null | '''
Script for scoring images with pre-trained models
by Jack Hessel
https://github.com/jmhessel/catrank
'''
from __future__ import print_function
import argparse
from utils import *
from keras.applications.resnet50 import ResNet50
from keras.models import Sequential, Model
from keras.layers import Flatten
from numpy.... | 39.217391 | 230 | 0.62816 |
72dca247d3553d1732858449a2bba6f9eaf2252a | 568 | py | Python | com/LimePencil/Q2606/Main.py | LimePencil/baekjoonProblems | 61eeeeb875585d165d9e39ecdb3d905b4ba6aa87 | [
"MIT"
] | 2 | 2021-07-17T13:05:42.000Z | 2021-09-12T09:14:24.000Z | com/LimePencil/Q2606/Main.py | LimePencil/baekjoonProblems | 61eeeeb875585d165d9e39ecdb3d905b4ba6aa87 | [
"MIT"
] | null | null | null | com/LimePencil/Q2606/Main.py | LimePencil/baekjoonProblems | 61eeeeb875585d165d9e39ecdb3d905b4ba6aa87 | [
"MIT"
] | null | null | null | import sys
n = int(sys.stdin.readline().strip("\n"))
m = int(sys.stdin.readline().strip("\n"))
graph = [[] * n for _ in range(n+1)]
for i in range(m):
a, b = list(map(int,sys.stdin.readline().strip("\n").split(" ")))
graph[a].append(b)
graph[b].append(a)
graph[a].sort()
graph[b].sort()
visited = [... | 21.846154 | 69 | 0.552817 |
d0c94754e3abbd04a07f96e0baf86195768d0b05 | 42,813 | py | Python | cinder/utils.py | inspur-storage/cinder | c41a2f05c3e01133746ca2cb4eaa480cc581cbdf | [
"Apache-2.0"
] | 1 | 2019-01-22T05:37:38.000Z | 2019-01-22T05:37:38.000Z | cinder/utils.py | inspur-storage/cinder | c41a2f05c3e01133746ca2cb4eaa480cc581cbdf | [
"Apache-2.0"
] | null | null | null | cinder/utils.py | inspur-storage/cinder | c41a2f05c3e01133746ca2cb4eaa480cc581cbdf | [
"Apache-2.0"
] | null | null | null | # Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# Copyright 2011 Justin Santa Barbara
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance wi... | 35.441225 | 79 | 0.619088 |
adb9bd5c84b542e1050359f80ccca3c73438626e | 581 | py | Python | facegram/utils/fgtesting/response.py | mabdullahadeel/facegram | f0eaa42008e876ae892b50f9f621a25b17cc70d5 | [
"MIT"
] | 1 | 2021-09-26T13:37:22.000Z | 2021-09-26T13:37:22.000Z | facegram/utils/fgtesting/response.py | mabdullahadeel/facegram | f0eaa42008e876ae892b50f9f621a25b17cc70d5 | [
"MIT"
] | 1 | 2021-08-08T22:04:39.000Z | 2021-08-08T22:04:39.000Z | facegram/utils/fgtesting/response.py | mabdullahadeel/facegram | f0eaa42008e876ae892b50f9f621a25b17cc70d5 | [
"MIT"
] | null | null | null | from typing import Dict, Optional
class TestAPIResponse:
@staticmethod
def success(data=[], message="success") -> Dict:
return {
"data": data,
"message": message,
"error": False,
}
@staticmethod
def error(data=[], message="Something ... | 24.208333 | 99 | 0.48537 |
6cdf98b2ba558168beb78f22375cb79a9bcd9015 | 3,059 | py | Python | parse_python_to_json.py | tiagoCMatias/python-parse-to-json | 5a6e560f75b1bbb5e65e9fcb46deeceb9c06d3dd | [
"MIT"
] | 1 | 2021-07-21T02:15:06.000Z | 2021-07-21T02:15:06.000Z | parse_python_to_json.py | tiagoCMatias/python-parse-to-json | 5a6e560f75b1bbb5e65e9fcb46deeceb9c06d3dd | [
"MIT"
] | null | null | null | parse_python_to_json.py | tiagoCMatias/python-parse-to-json | 5a6e560f75b1bbb5e65e9fcb46deeceb9c06d3dd | [
"MIT"
] | null | null | null | '''
Parses a Python source file into an AST in JSON format. can be viewed
online in a viewer like: http://jsonviewer.stack.hu/
Usage:
python parse_python_to_json.py --pyfile=test.py # pass in code within a file
python parse_python_to_json.py 'print "Hello world"' # pass in code as a string
Try running on its o... | 30.287129 | 98 | 0.571755 |
aeec982c70274b71d40ef6215d1a490869529433 | 20,708 | py | Python | benchmarks/layers.py | facebookresearch/opacus | 5cc574ff877b0be5634dde8fdd5130b7090491a6 | [
"Apache-2.0"
] | 195 | 2019-12-11T23:55:47.000Z | 2020-08-27T04:17:29.000Z | benchmarks/layers.py | facebookresearch/opacus | 5cc574ff877b0be5634dde8fdd5130b7090491a6 | [
"Apache-2.0"
] | 35 | 2020-01-21T11:04:29.000Z | 2020-08-27T05:30:57.000Z | benchmarks/layers.py | facebookresearch/opacus | 5cc574ff877b0be5634dde8fdd5130b7090491a6 | [
"Apache-2.0"
] | 39 | 2020-01-04T20:05:20.000Z | 2020-08-25T23:09:38.000Z | # Copyright (c) Meta Platforms, Inc. and affiliates.
#
# 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 o... | 34.059211 | 88 | 0.606674 |
32812990c3b5bc5c9204c9366e43996d706e38a0 | 10,247 | py | Python | venv/lib/python3.6/site-packages/numpy/lib/tests/test__datasource.py | Seifar/ChitAnalysis | 0580802c78b11766ba21e3929b8fa96f8f6a17f0 | [
"MIT"
] | 4 | 2019-03-18T02:39:00.000Z | 2021-12-15T20:39:15.000Z | venv/lib/python3.6/site-packages/numpy/lib/tests/test__datasource.py | Seifar/ChitAnalysis | 0580802c78b11766ba21e3929b8fa96f8f6a17f0 | [
"MIT"
] | 5 | 2021-03-18T22:49:37.000Z | 2022-03-11T23:41:59.000Z | venv/lib/python3.6/site-packages/numpy/lib/tests/test__datasource.py | Seifar/ChitAnalysis | 0580802c78b11766ba21e3929b8fa96f8f6a17f0 | [
"MIT"
] | 2 | 2020-07-23T08:19:50.000Z | 2021-09-06T20:10:00.000Z | from __future__ import division, absolute_import, print_function
import os
import sys
from tempfile import mkdtemp, mkstemp, NamedTemporaryFile
from shutil import rmtree
from numpy.testing import assert_, assert_equal, assert_raises, SkipTest
import numpy.lib._datasource as datasource
if sys.version_info[0] >= 3:
... | 29.874636 | 78 | 0.642822 |
d970e1d3d312df93d20cf392d1a3c442a30b152e | 4,825 | py | Python | servicex/transformer/tests/test_servicex_adapter.py | zorache/ServiceX_transformer | 39e64262439da4a6688aea5df027c998a248171e | [
"BSD-3-Clause"
] | 4 | 2019-09-11T17:17:45.000Z | 2019-12-31T06:43:58.000Z | servicex/transformer/tests/test_servicex_adapter.py | zorache/ServiceX_transformer | 39e64262439da4a6688aea5df027c998a248171e | [
"BSD-3-Clause"
] | 28 | 2019-04-23T21:19:16.000Z | 2022-01-20T17:29:03.000Z | servicex/transformer/tests/test_servicex_adapter.py | zorache/ServiceX_transformer | 39e64262439da4a6688aea5df027c998a248171e | [
"BSD-3-Clause"
] | 6 | 2019-12-09T12:47:28.000Z | 2021-05-27T03:22:36.000Z | # Copyright (c) 2019, IRIS-HEP
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# list of conditions and the foll... | 43.468468 | 94 | 0.688705 |
3e56180d9ce7832fdb86dd98d65d1948b90dade2 | 3,447 | py | Python | tests/conftest.py | jpmn/sqlalchemy-imageattach | 4d965bba348e62026df442099cebcf2b856f769e | [
"MIT"
] | null | null | null | tests/conftest.py | jpmn/sqlalchemy-imageattach | 4d965bba348e62026df442099cebcf2b856f769e | [
"MIT"
] | 1 | 2020-08-07T14:40:27.000Z | 2020-08-07T14:40:27.000Z | tests/conftest.py | jpmn/sqlalchemy-imageattach | 4d965bba348e62026df442099cebcf2b856f769e | [
"MIT"
] | null | null | null | import os
import os.path
from pytest import fixture
from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
from sqlalchemy.pool import NullPool, StaticPool
try:
from psycopg2ct.compat import register
except ImportError:
pass
else:
... | 34.818182 | 77 | 0.640847 |
1d704c64e6f33075e1bcde1188ca50f3cf805207 | 476 | py | Python | setup.py | adityakamble49/office-timer | eff7928c7c0b084d89aad33d9ce31f866dcec295 | [
"Apache-2.0"
] | 1 | 2020-12-30T14:42:13.000Z | 2020-12-30T14:42:13.000Z | setup.py | adityakamble49/office-timer | eff7928c7c0b084d89aad33d9ce31f866dcec295 | [
"Apache-2.0"
] | null | null | null | setup.py | adityakamble49/office-timer | eff7928c7c0b084d89aad33d9ce31f866dcec295 | [
"Apache-2.0"
] | null | null | null | from setuptools import setup, find_packages
setup(
name='officetimer',
version='0.2.1',
packages=find_packages(),
url='https://github.com/adityakamble49/office-timer',
license='Apache-2.0',
author='adityakamble49',
author_email='adityakamble49@gmail.com',
description='Office Timer - Man... | 26.444444 | 63 | 0.655462 |
b8153d0144c1cac1f4646d9099e0ace27d3ccbf2 | 15,383 | py | Python | gazoo_device/base_classes/raspbian_device.py | dedsec-9/gazoo-device | 5ed2867c258da80e53b6aae07ec7a65efe473a28 | [
"Apache-2.0"
] | 14 | 2020-11-05T23:23:32.000Z | 2022-03-01T18:59:29.000Z | gazoo_device/base_classes/raspbian_device.py | dedsec-9/gazoo-device | 5ed2867c258da80e53b6aae07ec7a65efe473a28 | [
"Apache-2.0"
] | null | null | null | gazoo_device/base_classes/raspbian_device.py | dedsec-9/gazoo-device | 5ed2867c258da80e53b6aae07ec7a65efe473a28 | [
"Apache-2.0"
] | 5 | 2021-05-20T22:52:51.000Z | 2022-02-21T08:46:21.000Z | # Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 34.260579 | 88 | 0.66203 |
a5d528a916a642f441bcd0a191348c817b905515 | 498 | py | Python | data/scripts/templates/object/installation/battlefield/destructible/shared_bfield_target_power_transformer_01.py | obi-two/GameServer | 7d37024e2291a97d49522610cd8f1dbe5666afc2 | [
"MIT"
] | 20 | 2015-02-23T15:11:56.000Z | 2022-03-18T20:56:48.000Z | data/scripts/templates/object/installation/battlefield/destructible/shared_bfield_target_power_transformer_01.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | null | null | null | data/scripts/templates/object/installation/battlefield/destructible/shared_bfield_target_power_transformer_01.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | 20 | 2015-04-04T16:35:59.000Z | 2022-03-24T14:54:37.000Z | #### NOTICE: THIS FILE IS AUTOGENERATED
#### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY
#### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES
from swgpy.object import *
def create(kernel):
result = Installation()
result.template = "object/installation/battlefield/destructible/shared_bfield_target_power_transfor... | 29.294118 | 111 | 0.753012 |
f0f7739b06e3a58baa1412f7e58b857e8f128d5d | 4,380 | py | Python | pyro/distributions/relaxed_straight_through.py | fluffybird2323/pyro | 9e74e499dbda76c28f12528235dac25bd17f0b1b | [
"MIT"
] | 2 | 2019-01-26T01:53:31.000Z | 2020-02-26T17:39:17.000Z | pyro/distributions/relaxed_straight_through.py | fluffybird2323/pyro | 9e74e499dbda76c28f12528235dac25bd17f0b1b | [
"MIT"
] | null | null | null | pyro/distributions/relaxed_straight_through.py | fluffybird2323/pyro | 9e74e499dbda76c28f12528235dac25bd17f0b1b | [
"MIT"
] | 1 | 2018-10-02T18:50:33.000Z | 2018-10-02T18:50:33.000Z | from __future__ import absolute_import, division, print_function
import torch
from pyro.distributions.torch import RelaxedOneHotCategorical, RelaxedBernoulli
from pyro.distributions.util import copy_docs_from
from torch.distributions.utils import clamp_probs
@copy_docs_from(RelaxedOneHotCategorical)
class RelaxedOn... | 40.183486 | 113 | 0.720776 |
8dbcd0271c66fc23e6a930cf3eb29a93d54ca327 | 416 | py | Python | tm.py | chlds/extra | 8cd97eeca7b30d2ebe46cd2c19ecd5fb4400cff7 | [
"MIT"
] | null | null | null | tm.py | chlds/extra | 8cd97eeca7b30d2ebe46cd2c19ecd5fb4400cff7 | [
"MIT"
] | null | null | null | tm.py | chlds/extra | 8cd97eeca7b30d2ebe46cd2c19ecd5fb4400cff7 | [
"MIT"
] | null | null | null | import hashlib
import time
def main():
print("time.localtime():",time.localtime())
print("time.mktime(time.localtime()):",time.mktime(time.localtime()))
print("time.gmtime():",time.gmtime())
print("time.ctime():",time.ctime())
print("time.time():",time.time())
t = time.localtime()
print(f"Current: {t.tm_hour}:... | 26 | 88 | 0.661058 |
950ec7d9d090bf18c1e49d4926009da5a99309fe | 2,300 | py | Python | setup.py | sflems/django-constance | e177292c74cbf158c7218d8818d5d6c34b17eee1 | [
"BSD-3-Clause"
] | 899 | 2015-12-17T09:24:11.000Z | 2022-03-31T15:57:53.000Z | setup.py | sflems/django-constance | e177292c74cbf158c7218d8818d5d6c34b17eee1 | [
"BSD-3-Clause"
] | 342 | 2015-12-27T11:07:44.000Z | 2022-03-24T13:34:46.000Z | setup.py | sflems/django-constance | e177292c74cbf158c7218d8818d5d6c34b17eee1 | [
"BSD-3-Clause"
] | 213 | 2015-12-23T00:32:34.000Z | 2022-03-17T17:04:57.000Z | import os
import re
import codecs
from setuptools import setup, find_packages
def read(*parts):
filename = os.path.join(os.path.dirname(__file__), *parts)
with codecs.open(filename, encoding='utf-8') as fp:
return fp.read()
def find_version(*file_paths):
version_file = read(*file_paths)
vers... | 33.333333 | 81 | 0.604348 |
88822551aec8471998d315cf7dce6c898739c4e9 | 1,058 | py | Python | app/forms/forms.py | AcrobaticPanicc/stocks-manager | f8411c13ce049583bd4fa5b18a9266919f222edd | [
"MIT"
] | 93 | 2020-07-09T23:15:44.000Z | 2022-03-30T22:14:22.000Z | app/forms/forms.py | AcrobaticPanicc/stocks-manager | f8411c13ce049583bd4fa5b18a9266919f222edd | [
"MIT"
] | 1 | 2021-12-07T03:17:05.000Z | 2021-12-07T03:17:05.000Z | app/forms/forms.py | AcrobaticPanicc/stocks-manager | f8411c13ce049583bd4fa5b18a9266919f222edd | [
"MIT"
] | 16 | 2020-07-10T03:44:07.000Z | 2022-03-30T22:14:27.000Z | from flask_wtf import FlaskForm
from wtforms.validators import InputRequired, ValidationError
from wtforms import StringField, SubmitField, IntegerField, Form, TextField
from app.models.stock_info import StockInfo
def validate_stock_symbol(form, field):
if field.data.upper() not in [stock['symbol'] for stock in S... | 39.185185 | 88 | 0.694707 |
5456173f9db7387e9936b0e6217eb42ffa25298f | 125 | py | Python | examples/http_server_HTTPServer.py | lyvd/bandit4mal | b1ca9eb773ebed84d04cfeb589d028af532d1d11 | [
"Apache-2.0"
] | null | null | null | examples/http_server_HTTPServer.py | lyvd/bandit4mal | b1ca9eb773ebed84d04cfeb589d028af532d1d11 | [
"Apache-2.0"
] | null | null | null | examples/http_server_HTTPServer.py | lyvd/bandit4mal | b1ca9eb773ebed84d04cfeb589d028af532d1d11 | [
"Apache-2.0"
] | null | null | null | from http.server import HTTPServer, BaseHTTPRequestHandler
httpd = HTTPServer(('localhost', 4443), BaseHTTPRequestHandler)
| 25 | 63 | 0.816 |
3b3eaf773bf8880c83e6eb4e940e7ac1d2af9042 | 1,605 | py | Python | WEEKS/CD_Sata-Structures/_MISC/misc-examples/python3-book-examples/contextlib/contextlib_context_managers.py | webdevhub42/Lambda | b04b84fb5b82fe7c8b12680149e25ae0d27a0960 | [
"MIT"
] | null | null | null | WEEKS/CD_Sata-Structures/_MISC/misc-examples/python3-book-examples/contextlib/contextlib_context_managers.py | webdevhub42/Lambda | b04b84fb5b82fe7c8b12680149e25ae0d27a0960 | [
"MIT"
] | null | null | null | WEEKS/CD_Sata-Structures/_MISC/misc-examples/python3-book-examples/contextlib/contextlib_context_managers.py | webdevhub42/Lambda | b04b84fb5b82fe7c8b12680149e25ae0d27a0960 | [
"MIT"
] | null | null | null | # Copyright (c) 2015 Doug Hellmann. All rights reserved.
"""
"""
# end_pymotw_header
import contextlib
class Tracker:
"Base class for noisy context managers."
def __init__(self, i):
self.i = i
def msg(self, s):
print(" {}({}): {}".format(self.__class__.__name__, self.i, s))
def __... | 25.47619 | 72 | 0.633645 |
99b59f047c85cfcb4cddd2ea6ac2271fca98c911 | 166 | py | Python | admin/_copy.py | giadram/twisted | 4771b1340b822d20d0664bb7d8334e8fb7e52863 | [
"MIT",
"Unlicense"
] | 1 | 2020-12-18T06:32:58.000Z | 2020-12-18T06:32:58.000Z | admin/_copy.py | giadram/twisted | 4771b1340b822d20d0664bb7d8334e8fb7e52863 | [
"MIT",
"Unlicense"
] | 3 | 2015-08-20T09:05:57.000Z | 2015-11-10T08:30:51.000Z | admin/_copy.py | giadram/twisted | 4771b1340b822d20d0664bb7d8334e8fb7e52863 | [
"MIT",
"Unlicense"
] | 1 | 2019-10-02T18:36:25.000Z | 2019-10-02T18:36:25.000Z | """
A cross-platform copying tool that supports globbing.
"""
import sys
import glob
import shutil
for f in glob.glob(sys.argv[1]):
shutil.copy(f, sys.argv[2])
| 15.090909 | 53 | 0.704819 |
ae36d82c72888c4634d4b6ae564ec92587e4b31a | 3,646 | py | Python | train.py | capepoint/WeaklyLesionLocalisation | 6eeefb3db66113e03854e625c25c28448baed683 | [
"Apache-2.0"
] | null | null | null | train.py | capepoint/WeaklyLesionLocalisation | 6eeefb3db66113e03854e625c25c28448baed683 | [
"Apache-2.0"
] | null | null | null | train.py | capepoint/WeaklyLesionLocalisation | 6eeefb3db66113e03854e625c25c28448baed683 | [
"Apache-2.0"
] | null | null | null | import argparse
import sys
import torch
import os
sys.path.append('./')
from u_d import *
os.environ["CUDA_VISIBLE_DEVICES"] = "0"
def parse_args():
parser = argparse.ArgumentParser(description='Training Custom Defined Model')
parser.add_argument('--training_strategies', '-ts', default='update_... | 56.092308 | 119 | 0.662918 |
8b71490bb1f2ab57da4c5d43bad80d6e5121bc8e | 1,516 | py | Python | plugins/sentinelone/komand_sentinelone/actions/agents_reload/schema.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | 46 | 2019-06-05T20:47:58.000Z | 2022-03-29T10:18:01.000Z | plugins/sentinelone/komand_sentinelone/actions/agents_reload/schema.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | 386 | 2019-06-07T20:20:39.000Z | 2022-03-30T17:35:01.000Z | plugins/sentinelone/komand_sentinelone/actions/agents_reload/schema.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | 43 | 2019-07-09T14:13:58.000Z | 2022-03-28T12:04:46.000Z | # GENERATED BY KOMAND SDK - DO NOT EDIT
import insightconnect_plugin_runtime
import json
class Component:
DESCRIPTION = "Reload an agent module (applies to Windows agents only)"
class Input:
FILTER = "filter"
MODULE = "module"
class Output:
AFFECTED = "affected"
class AgentsReloadInput(i... | 20.767123 | 159 | 0.58971 |
846193211d5def069ed919117cfc1d3abbe12f93 | 242 | py | Python | aulas_exemplos/aula014.py | AlberVini/exp_regulares | 40ba02a15d76a66b47b2a7d656d18723729a2349 | [
"MIT"
] | null | null | null | aulas_exemplos/aula014.py | AlberVini/exp_regulares | 40ba02a15d76a66b47b2a7d656d18723729a2349 | [
"MIT"
] | null | null | null | aulas_exemplos/aula014.py | AlberVini/exp_regulares | 40ba02a15d76a66b47b2a7d656d18723729a2349 | [
"MIT"
] | null | null | null | import re
emails = '''
example@s.example.br
a@a.com.br
mailhost!username@example.org
user%example.com@example.org
email@example.com
'''
regex = re.compile(r'^\w+(?:[.\-+!%]\w+)*@\w+(?:[.\-]\w+)+$', flags=re.M)
print(regex.findall(emails))
| 17.285714 | 73 | 0.632231 |
723a101662aa17e22fb94a34b3a2904de7521a0b | 8,397 | py | Python | tests/test_butterfly.py | iclr-anonymous/kaleidoscope | 2ad84d2da9c007b2774e2ba048ce4ca40d56b29a | [
"Apache-2.0"
] | 5 | 2019-11-08T03:56:24.000Z | 2020-02-08T00:36:37.000Z | tests/test_butterfly.py | iclr-anonymous/kaleidoscope | 2ad84d2da9c007b2774e2ba048ce4ca40d56b29a | [
"Apache-2.0"
] | null | null | null | tests/test_butterfly.py | iclr-anonymous/kaleidoscope | 2ad84d2da9c007b2774e2ba048ce4ca40d56b29a | [
"Apache-2.0"
] | 1 | 2019-10-15T08:16:16.000Z | 2019-10-15T08:16:16.000Z | import os, sys
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
import math
import unittest
import numpy as np
import torch
from butterfly import Butterfly
from butterfly.butterfly import ButterflyBmm
from butterfly.butterfly_multiply import butterfly_ortho_mult_tied
class Butterfl... | 71.769231 | 199 | 0.429558 |
017630a60bfaa79b641a6ae25aa4f2f5af43f88e | 4,663 | py | Python | src/robotide/namespace/cache.py | hoteltianya/RIDE | dcdccfec631517743d24c8e31fc6687fd29338a0 | [
"ECL-2.0",
"Apache-2.0"
] | 11 | 2017-09-30T05:47:28.000Z | 2019-04-15T11:58:40.000Z | src/robotide/namespace/cache.py | hoteltianya/RIDE | dcdccfec631517743d24c8e31fc6687fd29338a0 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/robotide/namespace/cache.py | hoteltianya/RIDE | dcdccfec631517743d24c8e31fc6687fd29338a0 | [
"ECL-2.0",
"Apache-2.0"
] | 7 | 2018-02-13T10:22:39.000Z | 2019-07-04T07:39:28.000Z | # Copyright 2008-2015 Nokia Solutions and Networks
#
# 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 l... | 34.036496 | 80 | 0.648295 |
83d358ff98eb48b04a3462928c45a138384a4e23 | 2,399 | py | Python | libqtile/widget/sep.py | kiniou/qtile | da482ad27a9d14ef881b246ca11e4bf1c67368b2 | [
"MIT"
] | 1 | 2015-07-18T09:10:17.000Z | 2015-07-18T09:10:17.000Z | libqtile/widget/sep.py | kiniou/qtile | da482ad27a9d14ef881b246ca11e4bf1c67368b2 | [
"MIT"
] | null | null | null | libqtile/widget/sep.py | kiniou/qtile | da482ad27a9d14ef881b246ca11e4bf1c67368b2 | [
"MIT"
] | null | null | null | # Copyright (c) 2010 Aldo Cortesi
# Copyright (c) 2011 Mounier Florian
# Copyright (c) 2012, 2015 Tycho Andersen
# Copyright (c) 2012 Craig Barnes
# Copyright (c) 2013 Tao Sauvage
# Copyright (c) 2014 Sean Vig
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associ... | 38.693548 | 79 | 0.670279 |
df56b20ffd4e1d1fff8c1fd4c3fa3c196154d4fd | 87 | py | Python | 6KYU/sortme.py | yaznasivasai/python_codewars | 25493591dde4649dc9c1ec3bece8191a3bed6818 | [
"MIT"
] | 4 | 2021-07-17T22:48:03.000Z | 2022-03-25T14:10:58.000Z | 6KYU/sortme.py | yaznasivasai/python_codewars | 25493591dde4649dc9c1ec3bece8191a3bed6818 | [
"MIT"
] | null | null | null | 6KYU/sortme.py | yaznasivasai/python_codewars | 25493591dde4649dc9c1ec3bece8191a3bed6818 | [
"MIT"
] | 3 | 2021-06-14T14:18:16.000Z | 2022-03-16T06:02:02.000Z | def sortme(words: list) -> list:
return sorted(words, key=lambda x: x.lower())
| 29 | 49 | 0.632184 |
f3ff23493a3189e8488bd5b11aef21235e861da5 | 3,241 | py | Python | Model/Searcher/Wikipedia.py | nevoit/Information-Retrieval | fd7199e04d2a8ff67045b63f4cc43ac469776f3a | [
"MIT"
] | 1 | 2018-07-24T18:02:57.000Z | 2018-07-24T18:02:57.000Z | Model/Searcher/Wikipedia.py | nevoit/Information-Retrieval | fd7199e04d2a8ff67045b63f4cc43ac469776f3a | [
"MIT"
] | null | null | null | Model/Searcher/Wikipedia.py | nevoit/Information-Retrieval | fd7199e04d2a8ff67045b63f4cc43ac469776f3a | [
"MIT"
] | 2 | 2019-11-05T09:24:25.000Z | 2019-11-15T10:32:09.000Z | import wikipediaapi
from Model.Parser import Parser
from collections import Counter
from Model.Stemmer import Stemmer
number_of_results = 5 # Number of results we want to return
def print_sections(sections):
line = ''
for s in sections:
line += s.title + s.text[0:100]
return line
... | 43.213333 | 114 | 0.571429 |
7d632bda5ba2a4c6fd4f1190d0ba69c16b5dab58 | 957 | py | Python | swagger_client_test/test_option_contract.py | kovacicek/fiddleoptions | 43e3517046fb4c47d3284d357e75099e81f861b7 | [
"MIT"
] | null | null | null | swagger_client_test/test_option_contract.py | kovacicek/fiddleoptions | 43e3517046fb4c47d3284d357e75099e81f861b7 | [
"MIT"
] | null | null | null | swagger_client_test/test_option_contract.py | kovacicek/fiddleoptions | 43e3517046fb4c47d3284d357e75099e81f861b7 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Fiddle Options Platform
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: 1.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
... | 23.341463 | 119 | 0.713689 |
4041b0ca69411ccec3d027d21a40309fcf1cc827 | 340 | py | Python | src/pyside/server/__init__.py | ptphp/PyLib | 07ac99cf2deb725475f5771b123b9ea1375f5e65 | [
"Apache-2.0"
] | 1 | 2020-02-17T08:18:29.000Z | 2020-02-17T08:18:29.000Z | src/pyside/server/__init__.py | ptphp/PyLib | 07ac99cf2deb725475f5771b123b9ea1375f5e65 | [
"Apache-2.0"
] | null | null | null | src/pyside/server/__init__.py | ptphp/PyLib | 07ac99cf2deb725475f5771b123b9ea1375f5e65 | [
"Apache-2.0"
] | null | null | null | import BaseHTTPServer
from SimpleHTTPServer import SimpleHTTPRequestHandler
HandlerClass = SimpleHTTPRequestHandler
ServerClass = BaseHTTPServer.HTTPServer
server_address = ('127.0.0.1', 8000)
HandlerClass.protocol_version = "HTTP/1.0"
httpd = ServerClass(server_address, HandlerClass)
sa = httpd.socket.getsockname()
h... | 37.777778 | 53 | 0.832353 |
5f824dcca5447abbe42e6664dfee8cf2b8e14877 | 2,906 | py | Python | chaos5.py | jnisula/Math-fun | 352708c081dc2f7eaa192046be23db3ab615ce07 | [
"CC0-1.0"
] | null | null | null | chaos5.py | jnisula/Math-fun | 352708c081dc2f7eaa192046be23db3ab615ce07 | [
"CC0-1.0"
] | null | null | null | chaos5.py | jnisula/Math-fun | 352708c081dc2f7eaa192046be23db3ab615ce07 | [
"CC0-1.0"
] | null | null | null | from math import *
from graphics import *
from operator import *
def drawPoint2(point, win, n):
if (n==0):
colno = "black"
elif (n==1):
colno = "gray"
elif (n==2):
colno = "blue"
elif (n==3):
colno = "green"
elif (n==4):
colno = "lightblue"
elif (n==5... | 26.66055 | 64 | 0.409498 |
e521c9f54a1248683a9af07e89514c9a0e9d1917 | 4,845 | py | Python | discordbot.py | tundra0/Project-SUI- | 3ed5a3b8eaed81858cb2bb32addc1c6b06fc6f59 | [
"MIT"
] | 1 | 2020-03-19T08:24:08.000Z | 2020-03-19T08:24:08.000Z | discordbot.py | tundra0/Project-SUI- | 3ed5a3b8eaed81858cb2bb32addc1c6b06fc6f59 | [
"MIT"
] | null | null | null | discordbot.py | tundra0/Project-SUI- | 3ed5a3b8eaed81858cb2bb32addc1c6b06fc6f59 | [
"MIT"
] | null | null | null | #インストールしたdiscord.pyの読み込み
import discord
import os
#randomモジュールの読み込み
import random
#reライブラリの読み込み
import re
#datetimeの読み込み
import datetime
#翠のトークン
TOKEN = os.environ['DISCORD_BOT_TOKEN']
#接続に必要なオブジェクトを生成
client = discord.Client()
#起動時に動作する処理
@client.event
async def on_ready():
print('Hello World,プログラム「Project-SUI... | 31.666667 | 121 | 0.637771 |
3f0fcd49e94b38917a2a0dea12a2941e27d7b7f2 | 10,597 | py | Python | fabfile.py | skillz/card.io-iOS-source | a0de5f928eefe96db028eeba2a740491ec28413c | [
"MIT"
] | null | null | null | fabfile.py | skillz/card.io-iOS-source | a0de5f928eefe96db028eeba2a740491ec28413c | [
"MIT"
] | null | null | null | fabfile.py | skillz/card.io-iOS-source | a0de5f928eefe96db028eeba2a740491ec28413c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import atexit
import glob
import os
import re
import shutil
import sys
import tempfile
import textwrap
from fabric.api import env, local, hide
from fabric.context_managers import lcd, settings, shell_env
from fabric.contrib.console import confirm
from fabric.contrib.files import exists
from fabr... | 44.52521 | 211 | 0.61357 |
0206d6d98d7f5f9f017fb5028b415b26ea7d8ddf | 21,468 | py | Python | premailer/premailer.py | bogdal/premailer | b3a3b1888c153e758e37cc5ba8abe20dcaca6f03 | [
"BSD-3-Clause"
] | null | null | null | premailer/premailer.py | bogdal/premailer | b3a3b1888c153e758e37cc5ba8abe20dcaca6f03 | [
"BSD-3-Clause"
] | null | null | null | premailer/premailer.py | bogdal/premailer | b3a3b1888c153e758e37cc5ba8abe20dcaca6f03 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import, unicode_literals, print_function
from io import BytesIO # Yes, there is an io module in Python 2
import cgi
import codecs
import gzip
import operator
import os
import re
import warnings
try:
from collections import OrderedDict
except ImportError: # pragma: no cover
# so... | 36.634812 | 79 | 0.537032 |
8d45a4c9f58aa98690a366e704cfc33e2eaf6c34 | 2,237 | py | Python | library/manage_jenkins_plugin_mailer.py | Temelio/ansible-role-jenkins | 9506d9a007c47c674a7d3f80d71ecc83ff8cc004 | [
"MIT"
] | null | null | null | library/manage_jenkins_plugin_mailer.py | Temelio/ansible-role-jenkins | 9506d9a007c47c674a7d3f80d71ecc83ff8cc004 | [
"MIT"
] | null | null | null | library/manage_jenkins_plugin_mailer.py | Temelio/ansible-role-jenkins | 9506d9a007c47c674a7d3f80d71ecc83ff8cc004 | [
"MIT"
] | 1 | 2022-02-21T09:32:38.000Z | 2022-02-21T09:32:38.000Z | #!/usr/bin/python
from ansible.module_utils.basic import * # NOQA
import json
from os.path import basename
def main():
module = AnsibleModule(
argument_spec=dict(
charset=dict(
type='str',
required=False,
default='UTF-8'),
default... | 28.316456 | 68 | 0.466249 |
0b4369c9f8af22116bfdacc387a5561acf8ab21f | 5,611 | py | Python | open_spiel/python/examples/mcts.py | alexminnaar/open_spiel | c17a390f8a007ccc309f76cb0cfa29f06dc5d2c9 | [
"Apache-2.0"
] | 1 | 2020-08-14T23:53:32.000Z | 2020-08-14T23:53:32.000Z | open_spiel/python/examples/mcts.py | alexminnaar/open_spiel | c17a390f8a007ccc309f76cb0cfa29f06dc5d2c9 | [
"Apache-2.0"
] | null | null | null | open_spiel/python/examples/mcts.py | alexminnaar/open_spiel | c17a390f8a007ccc309f76cb0cfa29f06dc5d2c9 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 DeepMind Technologies Ltd. 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 appl... | 34.006061 | 80 | 0.698449 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.