hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5fcb7b1968cffdcd52a127bb68734601e916ae09 | 7,120 | py | Python | RSA/main.py | pengj97/leaf | f4a12c5da2afec9cde9ed41351e1719a4e6d087c | [
"BSD-2-Clause"
] | null | null | null | RSA/main.py | pengj97/leaf | f4a12c5da2afec9cde9ed41351e1719a4e6d087c | [
"BSD-2-Clause"
] | null | null | null | RSA/main.py | pengj97/leaf | f4a12c5da2afec9cde9ed41351e1719a4e6d087c | [
"BSD-2-Clause"
] | null | null | null | """Script to run the baselines."""
import argparse
import importlib
import numpy as np
import os
import sys
import random
import tensorflow.compat.v1 as tf
import metrics.writer as metrics_writer
from baseline_constants import MAIN_PARAMS, MODEL_PARAMS, regular, byzantine
from client import Client
from server import ... | 36.701031 | 129 | 0.685955 |
8ad3880916c35d6299a438bf9f4db3bbc17b6a3e | 1,703 | py | Python | addon.py | leopheard/MerseysideSkeptics | 3c27d077cee6d0329abaabb06e24b9315f83bf9f | [
"MIT"
] | null | null | null | addon.py | leopheard/MerseysideSkeptics | 3c27d077cee6d0329abaabb06e24b9315f83bf9f | [
"MIT"
] | null | null | null | addon.py | leopheard/MerseysideSkeptics | 3c27d077cee6d0329abaabb06e24b9315f83bf9f | [
"MIT"
] | null | null | null | from xbmcswift2 import Plugin, xbmcgui
from resources.lib import mainaddon
plugin = Plugin()
url1 = "https://feeds.feedburner.com/swak"
url2 = "https://feeds.feedburner.com/inkredulous"
url3 = "https://feeds.feedburner.com/reasonablepod"
@plugin.route('/')
def main_menu():
items = [
{
... | 34.755102 | 101 | 0.664122 |
e463a54ade84f8710e1c08b0d527c9d16ed58e56 | 1,340 | py | Python | gene2word/getArticle.py | valerebinet-NIA/Textrous | 6d20ff1ca7b94ef4815f76a0eb8a807a718f30d3 | [
"CC0-1.0"
] | null | null | null | gene2word/getArticle.py | valerebinet-NIA/Textrous | 6d20ff1ca7b94ef4815f76a0eb8a807a718f30d3 | [
"CC0-1.0"
] | 4 | 2021-02-24T23:18:46.000Z | 2021-02-25T07:31:34.000Z | gene2word/getArticle.py | valerebinet-NIA/Textrous | 6d20ff1ca7b94ef4815f76a0eb8a807a718f30d3 | [
"CC0-1.0"
] | 2 | 2021-02-24T23:01:59.000Z | 2021-03-30T16:53:13.000Z | import pickle
import re
import urllib2
import zlib
import socket
gene2id = pickle.load(open("gene2pubmed_filtered.pkl"))
def getArticle(phrase, genes):
pmids = []
for gene in genes:
try:
pmids += gene2id[gene]
except:
pass
print pmids
pmids = list(set(pmids))
pmids = "%20".join(pmids)
query = pmids +... | 27.916667 | 77 | 0.502985 |
c57f89a91b1338ab163665bac34c97f792ee996f | 6,967 | py | Python | app.py | streamlit-badge-bot/secure | d8f2f5b04ef8f4f84a3c307829d41c0f599601f9 | [
"MIT"
] | null | null | null | app.py | streamlit-badge-bot/secure | d8f2f5b04ef8f4f84a3c307829d41c0f599601f9 | [
"MIT"
] | null | null | null | app.py | streamlit-badge-bot/secure | d8f2f5b04ef8f4f84a3c307829d41c0f599601f9 | [
"MIT"
] | 1 | 2020-11-28T19:23:40.000Z | 2020-11-28T19:23:40.000Z | import streamlit as st
import numpy as np
import pandas as pd
from PIL import Image
import streamlit.components.v1 as components
import random
import string
import hashlib
import os
from cryptography.fernet import Fernet
def main():
st.title('Secure it !')
st.write("\n")
st.write("\n")
... | 30.030172 | 108 | 0.461748 |
66b92e98840c304e62fc1399564da6014f16e423 | 4,577 | py | Python | dtuotg/settings.py | dtu-otg/backend | 6478cda56baec8950eca68fb569c86f307199d60 | [
"MIT"
] | null | null | null | dtuotg/settings.py | dtu-otg/backend | 6478cda56baec8950eca68fb569c86f307199d60 | [
"MIT"
] | null | null | null | dtuotg/settings.py | dtu-otg/backend | 6478cda56baec8950eca68fb569c86f307199d60 | [
"MIT"
] | null | null | null | """
Django settings for dtuotg project.
Generated by 'django-admin startproject' using Django 3.1.7.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.1/ref/settings/
"""
from pathlib ... | 24.475936 | 91 | 0.669653 |
934adccc48b84122655908090bb757c0ca3de9c4 | 2,460 | py | Python | intego_rw/hooks.py | africlouds/intego_rw | fe9881c3d5ca6863a00997b0e4d4035647fc4e36 | [
"MIT"
] | 1 | 2020-11-26T15:25:58.000Z | 2020-11-26T15:25:58.000Z | intego_rw/hooks.py | africlouds/intego_rw | fe9881c3d5ca6863a00997b0e4d4035647fc4e36 | [
"MIT"
] | null | null | null | intego_rw/hooks.py | africlouds/intego_rw | fe9881c3d5ca6863a00997b0e4d4035647fc4e36 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from . import __version__ as app_version
app_name = "intego_rw"
app_title = "Intego"
app_publisher = "Africlouds Ltd"
app_description = "ERP for SMEs"
app_icon = "octicon octicon-file-directory"
app_color = "grey"
app_email = "arwema@gmail.com"
app_licens... | 21.578947 | 78 | 0.664634 |
0dfee5c983c15db4ad8b0feab7380cab9237031f | 669 | py | Python | hypha/reset_network/reset_network_resources/migrations/0002_auto_20200302_1131.py | dan-mi-sun/apply-app | c0ffeda27cb45e08f3a00052b6f0b2f6895fc18a | [
"BSD-3-Clause"
] | 1 | 2020-05-13T06:39:25.000Z | 2020-05-13T06:39:25.000Z | hypha/reset_network/reset_network_resources/migrations/0002_auto_20200302_1131.py | DigitalFutureFund/apply-app | a5f998b8a6c3059f31373f5c4aa700d1a563d844 | [
"BSD-3-Clause"
] | 109 | 2020-01-20T21:12:49.000Z | 2021-10-30T07:18:54.000Z | hypha/reset_network/reset_network_resources/migrations/0002_auto_20200302_1131.py | DigitalFutureFund/apply-app | a5f998b8a6c3059f31373f5c4aa700d1a563d844 | [
"BSD-3-Clause"
] | 4 | 2020-03-25T17:16:56.000Z | 2020-07-02T00:30:13.000Z | # Generated by Django 2.2.9 on 2020-03-02 11:31
from django.db import migrations
import wagtail.core.blocks
import wagtail.core.fields
import wagtail.embeds.blocks
import wagtail.images.blocks
class Migration(migrations.Migration):
dependencies = [
('reset_network_resources', '0001_initial'),
]
... | 29.086957 | 200 | 0.687593 |
35766bffe0004a593b63c1aac2a7e8c00bad917d | 2,483 | py | Python | iiwa_control/src/iiwa_teleop.py | RVMI/iiwa_stack | c7c988969c35ccd96ac3d4a53daa8ae2babb9914 | [
"BSD-2-Clause"
] | 1 | 2019-04-16T12:57:39.000Z | 2019-04-16T12:57:39.000Z | iiwa_control/src/iiwa_teleop.py | RVMI/iiwa_stack | c7c988969c35ccd96ac3d4a53daa8ae2babb9914 | [
"BSD-2-Clause"
] | 1 | 2019-06-04T16:37:49.000Z | 2019-06-04T16:37:49.000Z | iiwa_control/src/iiwa_teleop.py | RVMI/iiwa_stack | c7c988969c35ccd96ac3d4a53daa8ae2babb9914 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
import rospy
import sys, select, termios, tty
from std_msgs.msg import String, Header, Float64
from rospy import init_node, get_param, loginfo, Publisher, Time
from geometry_msgs.msg import PoseStamped, TransformStamped
from low_level_logics.compact_utilities import CompactTransform
from numpy i... | 28.215909 | 100 | 0.55296 |
48585cbe1c7add02c925c20c0a6184efadf54074 | 3,463 | py | Python | lib/cherrypy/tutorial/tut09_files.py | 0x20Man/Watcher3 | 4656b42bc5879a3741bb95f534b7c6612a25264d | [
"Apache-2.0"
] | 1,822 | 2015-01-24T07:12:31.000Z | 2022-03-31T15:45:09.000Z | lib/cherrypy/tutorial/tut09_files.py | 0x20Man/Watcher3 | 4656b42bc5879a3741bb95f534b7c6612a25264d | [
"Apache-2.0"
] | 622 | 2015-08-29T12:42:23.000Z | 2022-03-29T20:54:33.000Z | lib/cherrypy/tutorial/tut09_files.py | 0x20Man/Watcher3 | 4656b42bc5879a3741bb95f534b7c6612a25264d | [
"Apache-2.0"
] | 503 | 2015-02-10T07:24:46.000Z | 2022-03-17T05:29:57.000Z | """
Tutorial: File upload and download
Uploads
-------
When a client uploads a file to a CherryPy application, it's placed
on disk immediately. CherryPy will pass it to your exposed method
as an argument (see "myFile" below); that arg will have a "file"
attribute, which is a handle to the temporary uploaded file.
If... | 32.669811 | 78 | 0.660988 |
eadb43f534eb94367cca74da33c30372dbe60b16 | 264 | py | Python | tests/artificial/transf_BoxCox/trend_Lag1Trend/cycle_0/ar_12/test_artificial_1024_BoxCox_Lag1Trend_0_12_100.py | shaido987/pyaf | b9afd089557bed6b90b246d3712c481ae26a1957 | [
"BSD-3-Clause"
] | 377 | 2016-10-13T20:52:44.000Z | 2022-03-29T18:04:14.000Z | tests/artificial/transf_BoxCox/trend_Lag1Trend/cycle_0/ar_12/test_artificial_1024_BoxCox_Lag1Trend_0_12_100.py | ysdede/pyaf | b5541b8249d5a1cfdc01f27fdfd99b6580ed680b | [
"BSD-3-Clause"
] | 160 | 2016-10-13T16:11:53.000Z | 2022-03-28T04:21:34.000Z | tests/artificial/transf_BoxCox/trend_Lag1Trend/cycle_0/ar_12/test_artificial_1024_BoxCox_Lag1Trend_0_12_100.py | ysdede/pyaf | b5541b8249d5a1cfdc01f27fdfd99b6580ed680b | [
"BSD-3-Clause"
] | 63 | 2017-03-09T14:51:18.000Z | 2022-03-27T20:52:57.000Z | import pyaf.Bench.TS_datasets as tsds
import tests.artificial.process_artificial_dataset as art
art.process_dataset(N = 1024 , FREQ = 'D', seed = 0, trendtype = "Lag1Trend", cycle_length = 0, transform = "BoxCox", sigma = 0.0, exog_count = 100, ar_order = 12); | 37.714286 | 164 | 0.731061 |
90acf0375a19c9631ac26c55d7c318d3490a865c | 6,113 | py | Python | flower/events.py | ojefimow/flower | bf4088c4938918304e43a9ef992c54578fb595ea | [
"BSD-3-Clause"
] | null | null | null | flower/events.py | ojefimow/flower | bf4088c4938918304e43a9ef992c54578fb595ea | [
"BSD-3-Clause"
] | null | null | null | flower/events.py | ojefimow/flower | bf4088c4938918304e43a9ef992c54578fb595ea | [
"BSD-3-Clause"
] | null | null | null | import time
import shelve
import logging
import threading
import collections
from functools import partial
from tornado.ioloop import IOLoop
from tornado.ioloop import PeriodicCallback
from celery.events import EventReceiver
from celery.events.state import State
from . import api
from collections import Counter
f... | 34.342697 | 129 | 0.598724 |
d4f379b3e849babfb836a1be11d2e05b640f77c0 | 17,267 | py | Python | docs/mxdoc.py | srochel/incubator-mxnet | 1f151fbbc00751a590ec2377377003b421c45dec | [
"Apache-2.0"
] | null | null | null | docs/mxdoc.py | srochel/incubator-mxnet | 1f151fbbc00751a590ec2377377003b421c45dec | [
"Apache-2.0"
] | null | null | null | docs/mxdoc.py | srochel/incubator-mxnet | 1f151fbbc00751a590ec2377377003b421c45dec | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 36.895299 | 134 | 0.565298 |
f7f53f6b03374d1e9d565a2959e40987c1c55cf8 | 9,980 | py | Python | core/argParser.py | AmberLJC/FedScale | 45dfda70820e071ea36b0741837419311d9bddaf | [
"Apache-2.0"
] | 1 | 2022-03-28T22:05:31.000Z | 2022-03-28T22:05:31.000Z | core/argParser.py | AmberLJC/FedScale | 45dfda70820e071ea36b0741837419311d9bddaf | [
"Apache-2.0"
] | null | null | null | core/argParser.py | AmberLJC/FedScale | 45dfda70820e071ea36b0741837419311d9bddaf | [
"Apache-2.0"
] | null | null | null | import argparse
parser = argparse.ArgumentParser()
parser.add_argument('--job_name', type=str, default='kuiper_job')
parser.add_argument('--log_path', type=str, default='../', help="default path is ../log")
# The basic configuration of the cluster
parser.add_argument('--ps_ip', type=str, default='127.0.0.1')
parser.a... | 50.659898 | 118 | 0.734369 |
ef74590e6758c016a72bdbf331eb4aa1b7496afc | 1,404 | py | Python | misc/poc2.py | 0vercl0k/zenith | 52e7a133d012253f1d14572c1e6f5e353aa235e2 | [
"MIT"
] | 71 | 2022-02-18T17:32:29.000Z | 2022-03-22T09:44:06.000Z | misc/poc2.py | 0vercl0k/zenith | 52e7a133d012253f1d14572c1e6f5e353aa235e2 | [
"MIT"
] | null | null | null | misc/poc2.py | 0vercl0k/zenith | 52e7a133d012253f1d14572c1e6f5e353aa235e2 | [
"MIT"
] | 16 | 2022-02-18T17:15:32.000Z | 2022-03-24T01:48:27.000Z | from Crypto.Cipher import AES
import socket
import struct
import argparse
le8 = lambda i: struct.pack('=B', i)
le32 = lambda i: struct.pack('<I', i)
netusb_port = 20005
def send_handshake(s, aes_ctx):
# Version
s.send(b'\x56\x04')
# Send random data
s.send(aes_ctx.encrypt(b'a' * 16))
_ = s.recv(16)
# Rec... | 27 | 67 | 0.69943 |
b352bdcfa8e868260f57d50f06d1948de378478e | 3,538 | py | Python | nvidia_original/src/cocogan_train.py | lgraesser/im2im2im | 835d84b782921f6c40d8cc4416c3fc492187eb58 | [
"MIT"
] | 7 | 2018-04-17T09:56:37.000Z | 2021-08-28T10:03:22.000Z | nvidia_original/src/cocogan_train.py | lgraesser/im2im2im | 835d84b782921f6c40d8cc4416c3fc492187eb58 | [
"MIT"
] | null | null | null | nvidia_original/src/cocogan_train.py | lgraesser/im2im2im | 835d84b782921f6c40d8cc4416c3fc492187eb58 | [
"MIT"
] | 2 | 2018-03-03T20:39:49.000Z | 2018-04-17T03:48:23.000Z | #!/usr/bin/env python
"""
Copyright (C) 2017 NVIDIA Corporation. All rights reserved.
Licensed under the CC BY-NC-ND 4.0 license (https://creativecommons.org/licenses/by-nc-nd/4.0/legalcode).
"""
import sys
from tools import *
from trainers import *
from datasets import *
import torchvision
import itertools
from comm... | 39.311111 | 139 | 0.690503 |
48c8a5cef685781a5eedd93316284ef8c2964d42 | 341 | py | Python | Domains/Python/03 - Strings/String Formatting/solution.py | abhinavgunwant/hackerrank-solutions | e016366cb6a9fac562a754d2b230fef907080733 | [
"MIT"
] | 1 | 2019-06-09T00:04:56.000Z | 2019-06-09T00:04:56.000Z | Domains/Python/03 - Strings/String Formatting/solution.py | abhinavgunwant/hackerrank-solutions | e016366cb6a9fac562a754d2b230fef907080733 | [
"MIT"
] | 19 | 2019-06-09T14:45:52.000Z | 2019-06-17T18:52:53.000Z | Domains/Python/03 - Strings/String Formatting/solution.py | abhinavgunwant/hackerrank-solutions | e016366cb6a9fac562a754d2b230fef907080733 | [
"MIT"
] | null | null | null | def print_formatted(number):
dec = []
octal = []
hexa = []
biny = []
width = len('{:b}'.format(number))
for i in range(1, number+1):
print(str(i).rjust(width, ' ') + ' ' + ('{:o}'.format(i)).rjust(width, ' ') + ' ' + ('{:X}'.format(i)).rjust(width, ' ') + ' ' + ('{:b}'.format(i... | 34.1 | 174 | 0.44868 |
859666a457703fc170426c0da75a4eb61e75ee70 | 67 | py | Python | lomond/__init__.py | smarkets/dataplicity-lomond | 6d16b28a3ff37c45d28317fecdba7b8fefd36bc1 | [
"BSD-3-Clause"
] | null | null | null | lomond/__init__.py | smarkets/dataplicity-lomond | 6d16b28a3ff37c45d28317fecdba7b8fefd36bc1 | [
"BSD-3-Clause"
] | null | null | null | lomond/__init__.py | smarkets/dataplicity-lomond | 6d16b28a3ff37c45d28317fecdba7b8fefd36bc1 | [
"BSD-3-Clause"
] | 1 | 2022-03-26T12:13:36.000Z | 2022-03-26T12:13:36.000Z | from ._version import __version__
from .websocket import WebSocket | 22.333333 | 33 | 0.850746 |
ddb0bd0992dcb0cb2a26da53589419e41025d214 | 6,229 | py | Python | gnosis/safe/multi_send.py | vaporyorg/gnosis-py | 1ca17db54806d6968157b41613ad9e5165893f81 | [
"MIT"
] | null | null | null | gnosis/safe/multi_send.py | vaporyorg/gnosis-py | 1ca17db54806d6968157b41613ad9e5165893f81 | [
"MIT"
] | null | null | null | gnosis/safe/multi_send.py | vaporyorg/gnosis-py | 1ca17db54806d6968157b41613ad9e5165893f81 | [
"MIT"
] | null | null | null | from enum import Enum
from logging import getLogger
from typing import List, Union
from eth_account.signers.local import LocalAccount
from hexbytes import HexBytes
from web3 import Web3
from gnosis.eth import EthereumClient
from gnosis.eth.contracts import get_multi_send_contract
from gnosis.eth.ethereum_client impor... | 39.424051 | 118 | 0.654519 |
58e52292a1bcf16b11152226c7c056c423cdaeba | 5,370 | py | Python | docs/conf.py | Ojaybee/geemap | 77fe2fc705c970ad9047f8e59f78e58e0b58ec09 | [
"MIT"
] | 3 | 2020-09-26T16:58:40.000Z | 2021-11-08T09:31:06.000Z | docs/conf.py | Ojaybee/geemap | 77fe2fc705c970ad9047f8e59f78e58e0b58ec09 | [
"MIT"
] | null | null | null | docs/conf.py | Ojaybee/geemap | 77fe2fc705c970ad9047f8e59f78e58e0b58ec09 | [
"MIT"
] | 1 | 2020-04-16T19:54:13.000Z | 2020-04-16T19:54:13.000Z | #!/usr/bin/env python
#
# geemap documentation build configuration file, created by
# sphinx-quickstart on Fri Jun 9 13:47:02 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.
#
# All ... | 29.344262 | 78 | 0.675605 |
2abd849950cfe942fc401a80cc46b864f9965667 | 266 | py | Python | scripts/create_book.py | vsiivola/vesamusictraining | eed77a9276fe0f32d38aefa449d361894712400e | [
"BSD-3-Clause"
] | 2 | 2016-01-08T02:59:20.000Z | 2016-10-24T17:37:08.000Z | scripts/create_book.py | vsiivola/vesamusictraining | eed77a9276fe0f32d38aefa449d361894712400e | [
"BSD-3-Clause"
] | null | null | null | scripts/create_book.py | vsiivola/vesamusictraining | eed77a9276fe0f32d38aefa449d361894712400e | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
"""Creates the media files and database fixtures for Vesa's
Music Trainer."""
import os
import sys
sys.path.append(os.path.join(os.path.dirname(__file__), "..", "lib"))
from content_creator import main
if __name__ == "__main__":
main()
| 20.461538 | 69 | 0.714286 |
1e4bca5333ef8f703306b27d2bcba7403ace5596 | 831 | py | Python | setup.py | d3ck-org/pyd3ckbase | bcc5e338aaeed41ff898e997635d5fbf8572b4a5 | [
"MIT"
] | null | null | null | setup.py | d3ck-org/pyd3ckbase | bcc5e338aaeed41ff898e997635d5fbf8572b4a5 | [
"MIT"
] | null | null | null | setup.py | d3ck-org/pyd3ckbase | bcc5e338aaeed41ff898e997635d5fbf8572b4a5 | [
"MIT"
] | null | null | null | # https://python-packaging.readthedocs.io/en/latest/minimal.html
# https://marthall.github.io/blog/how-to-package-a-python-app/
# https://github.com/pypa/sampleproject
# https://stackoverflow.com/a/20234833
# https://mike.zwobble.org/2013/05/adding-git-or-hg-or-svn-dependencies-in-setup-py/
# https://setuptools.readthe... | 41.55 | 88 | 0.719615 |
056ba18718ddddc4a8041eb0a7983a4c63c5d7e0 | 4,976 | py | Python | pepys_import/core/store/postgres_db.py | BarisSari/pepys-import | d3eb27ad28b7b929c8fc336316f5e3abf7728e3a | [
"Apache-2.0"
] | null | null | null | pepys_import/core/store/postgres_db.py | BarisSari/pepys-import | d3eb27ad28b7b929c8fc336316f5e3abf7728e3a | [
"Apache-2.0"
] | null | null | null | pepys_import/core/store/postgres_db.py | BarisSari/pepys-import | d3eb27ad28b7b929c8fc336316f5e3abf7728e3a | [
"Apache-2.0"
] | null | null | null | from sqlalchemy import Column, Integer, String, Boolean, FetchedValue
from sqlalchemy.dialects.postgresql import UUID
from sqlalchemy.dialects.postgresql import TIME
from sqlalchemy.dialects.postgresql import DOUBLE_PRECISION
from .db_base import base_postgres as base
from .db_status import TableTypes
def map_uuid_t... | 32.522876 | 89 | 0.721463 |
18c043c4c6ededa346b8bdf1e1b3784316154aaf | 458 | py | Python | cellphonedb/src/core/database/sqlalchemy_models/db_model_gene.py | BioTuring-Notebooks/CellphoneDB | 9ab48d8888f11259bb3030c8d149d7bc7cdaf6e1 | [
"MIT"
] | 278 | 2018-10-03T22:12:09.000Z | 2022-03-28T15:33:17.000Z | cellphonedb/src/core/database/sqlalchemy_models/db_model_gene.py | BioTuring-Notebooks/CellphoneDB | 9ab48d8888f11259bb3030c8d149d7bc7cdaf6e1 | [
"MIT"
] | 263 | 2018-11-16T14:41:31.000Z | 2022-03-30T08:38:26.000Z | cellphonedb/src/core/database/sqlalchemy_models/db_model_gene.py | BioTuring-Notebooks/CellphoneDB | 9ab48d8888f11259bb3030c8d149d7bc7cdaf6e1 | [
"MIT"
] | 106 | 2018-10-18T15:11:57.000Z | 2022-03-14T19:50:27.000Z | from sqlalchemy import Column, Integer, String, ForeignKey
from cellphonedb.src.core.database.sqlalchemy_models import Base
class Gene(Base):
__tablename__ = 'gene_table'
id_gene = Column(Integer, nullable=False, primary_key=True)
ensembl = Column(String, nullable=False)
gene_name = Column(String, n... | 30.533333 | 88 | 0.759825 |
2a6465bc1842f5d14c14ecaaf2a39dc8a28f90b1 | 251 | py | Python | deepvoice3_pytorch/frontend/ko/__init__.py | stefantaubert/deepvoice3_pytorch | 0b9a65757446c2fb54db199612752e0a1a58a9d2 | [
"MIT"
] | 1,745 | 2017-10-31T13:02:36.000Z | 2022-03-21T21:17:52.000Z | deepvoice3_pytorch/frontend/ko/__init__.py | stefantaubert/deepvoice3_pytorch | 0b9a65757446c2fb54db199612752e0a1a58a9d2 | [
"MIT"
] | 216 | 2017-10-31T12:42:32.000Z | 2022-03-22T15:19:45.000Z | deepvoice3_pytorch/frontend/ko/__init__.py | stefantaubert/deepvoice3_pytorch | 0b9a65757446c2fb54db199612752e0a1a58a9d2 | [
"MIT"
] | 466 | 2017-11-08T18:13:03.000Z | 2022-03-11T15:29:27.000Z | # coding: utf-8
from random import random
n_vocab = 0xffff
_eos = 1
_pad = 0
_tagger = None
def text_to_sequence(text, p=0.0):
return [ord(c) for c in text] + [_eos] # EOS
def sequence_to_text(seq):
return "".join(chr(n) for n in seq)
| 13.944444 | 49 | 0.653386 |
646ef09a128aaab1cc8812cde08d12d31699c628 | 260 | py | Python | spiketoolkit/postprocessing/postprocessinglist.py | llobetv/spiketoolkit | 51f35be4811638f786d4e2586bcb9cd444e2642f | [
"MIT"
] | null | null | null | spiketoolkit/postprocessing/postprocessinglist.py | llobetv/spiketoolkit | 51f35be4811638f786d4e2586bcb9cd444e2642f | [
"MIT"
] | null | null | null | spiketoolkit/postprocessing/postprocessinglist.py | llobetv/spiketoolkit | 51f35be4811638f786d4e2586bcb9cd444e2642f | [
"MIT"
] | null | null | null | from .postprocessing_tools import get_unit_waveforms, get_unit_templates, get_unit_max_channels, get_unit_amplitudes,\
compute_unit_pca_scores, export_to_phy, set_unit_properties_by_max_channel_properties, get_amplitudes_params, \
get_waveforms_params
| 65 | 118 | 0.876923 |
61a30f171e50ff9efd804cb44f4e97f177d51b72 | 699 | py | Python | write_fake_file_for_curing.py | bacintom/WowFileTools | b5fe4b184acde3ba082738d322e77a01e4d95150 | [
"MIT"
] | 2 | 2018-12-28T17:59:18.000Z | 2019-11-11T16:38:45.000Z | write_fake_file_for_curing.py | bacintom/WowFileTools | b5fe4b184acde3ba082738d322e77a01e4d95150 | [
"MIT"
] | null | null | null | write_fake_file_for_curing.py | bacintom/WowFileTools | b5fe4b184acde3ba082738d322e77a01e4d95150 | [
"MIT"
] | null | null | null | """writes a forged .wow file that turns on the UV for one hour and that's all.
Basically, it turns the Sparkmaker into a UV print curer.
WARNING : use at your own risks
WARNING : Be careful not to damage your eyes & skin! Put on the lid, and add another protective layer that blocks UVs (I use aluminium foil).
WARNING :... | 22.548387 | 141 | 0.686695 |
524c304e17943211dc52397d350cb32b8f5e11c7 | 4,693 | py | Python | scripts/extract_omnipage.py | Fedioun/flair | 5504bdc6ec4232e3321483c9611bc929c9557175 | [
"MIT"
] | null | null | null | scripts/extract_omnipage.py | Fedioun/flair | 5504bdc6ec4232e3321483c9611bc929c9557175 | [
"MIT"
] | null | null | null | scripts/extract_omnipage.py | Fedioun/flair | 5504bdc6ec4232e3321483c9611bc929c9557175 | [
"MIT"
] | null | null | null |
import xml.etree.ElementTree as ET
import time
import json
import string
xml_out = "xml_out.txt"
xo = open(xml_out, "w", encoding="utf8")
json_file_path = "/home/nosmoth/Documents/Datasets/desfosses_omnipage_et_jsonSimon/desfosses sample/1962_T2_T_0722_with-tags.json"
file = open(json_file_path)
data = json.load(file... | 29.149068 | 130 | 0.436821 |
13ed636b13f0c0a8adc01dfa49a3bfdbf6e425d1 | 90,179 | py | Python | setup.py | jmroot/cpython | d2b55b07d2b503dcd3b5c0e2753efa835cff8e8f | [
"0BSD"
] | null | null | null | setup.py | jmroot/cpython | d2b55b07d2b503dcd3b5c0e2753efa835cff8e8f | [
"0BSD"
] | 11 | 2021-02-01T05:39:50.000Z | 2022-03-06T00:42:31.000Z | setup.py | jmroot/cpython | d2b55b07d2b503dcd3b5c0e2753efa835cff8e8f | [
"0BSD"
] | null | null | null | # Autodetecting setup.py script for building the Python extensions
import argparse
import importlib._bootstrap
import importlib.machinery
import importlib.util
import logging
import os
import re
import shlex
import sys
import sysconfig
import warnings
from glob import glob, escape
import _osx_support
try:
import... | 41.083827 | 115 | 0.581898 |
2689a7cdf3029aa7fe120c0ab7a8cd421ee101cc | 13,639 | py | Python | test/functional/abc-finalize-block.py | stamhe/bitcoin-abc | a1ba303c6b4f164ae94612e83b824e564405a96e | [
"MIT"
] | 1,266 | 2017-05-02T07:02:29.000Z | 2022-03-31T17:15:44.000Z | test/functional/abc-finalize-block.py | EGYVOICE/bitcoin-abc-avalanche | e0f1fe857e1fc85f01903f1c323c2d5c54aecc1c | [
"MIT"
] | 426 | 2017-05-07T12:40:52.000Z | 2022-03-29T18:12:01.000Z | test/functional/abc-finalize-block.py | EGYVOICE/bitcoin-abc-avalanche | e0f1fe857e1fc85f01903f1c323c2d5c54aecc1c | [
"MIT"
] | 721 | 2017-05-07T10:36:11.000Z | 2022-03-15T09:07:48.000Z | #!/usr/bin/env python3
# Copyright (c) 2018 The Bitcoin developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the finalizeblock RPC calls."""
import time
from test_framework.test_framework import BitcoinTestFramework... | 41.081325 | 105 | 0.543368 |
708f0332bedbaf96a581a77a9ae4c1bae4a86188 | 3,966 | py | Python | modules/unit_tests/s3/s3cfg.py | PeterDaveHello/eden | 26174a9dde2f19cd3bc879694f373ad5f765b6ed | [
"MIT"
] | 1 | 2015-01-24T04:31:51.000Z | 2015-01-24T04:31:51.000Z | modules/unit_tests/s3/s3cfg.py | PeterDaveHello/eden | 26174a9dde2f19cd3bc879694f373ad5f765b6ed | [
"MIT"
] | null | null | null | modules/unit_tests/s3/s3cfg.py | PeterDaveHello/eden | 26174a9dde2f19cd3bc879694f373ad5f765b6ed | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# S3CFG Unit Tests
#
# To run this script use:
# python web2py.py -S eden -M -R applications/eden/modules/unit_tests/s3/s3cfg.py
#
import unittest
from gluon import current
# =============================================================================
class S3ConfigTests(unittest.TestCase):
... | 35.72973 | 88 | 0.592537 |
3635d29ed7983391e228e2af05ab7ab73fa63822 | 6,228 | py | Python | tests/testcases.py | m0dd0/voxler | 1bba505113472bbebde5430c741dbd6475e4a33c | [
"MIT"
] | null | null | null | tests/testcases.py | m0dd0/voxler | 1bba505113472bbebde5430c741dbd6475e4a33c | [
"MIT"
] | null | null | null | tests/testcases.py | m0dd0/voxler | 1bba505113472bbebde5430c741dbd6475e4a33c | [
"MIT"
] | null | null | null | import traceback
from collections import defaultdict
from time import perf_counter
from typing import List, Callable
from uuid import uuid4
import adsk.core, adsk.fusion
from .. import voxler as vox
app = adsk.core.Application.get()
ui = app.userInterface
design = adsk.fusion.Design.cast(app.activeProduct)
root = de... | 36.421053 | 86 | 0.603565 |
0e1520835fc7e141cce8a05860ebde26b0a463cf | 12,234 | py | Python | bin/libsw/bind.py | Rondore/sitewrangler | a67a140262281c1f6be48c55f86544e476d7d7b4 | [
"MIT"
] | null | null | null | bin/libsw/bind.py | Rondore/sitewrangler | a67a140262281c1f6be48c55f86544e476d7d7b4 | [
"MIT"
] | null | null | null | bin/libsw/bind.py | Rondore/sitewrangler | a67a140262281c1f6be48c55f86544e476d7d7b4 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import subprocess
import re
import datetime
import glob
import dateutil.parser
import inquirer
import os
from libsw import file_filter, email, settings, input_util, service
zone_folder = '/etc/bind/zones/'
class SetSoa(file_filter.FileFilter):
"""
SetSoa is a class that will filter tho... | 33.983333 | 157 | 0.629557 |
fd8c630df8101f231b84207de807ef79fa9cbfa7 | 3,324 | py | Python | md_davis/gui/sequence_panel.py | djmaity/md-davis | 5ddc446a31366ca242b81a603ff4d09b4368f0f2 | [
"MIT"
] | null | null | null | md_davis/gui/sequence_panel.py | djmaity/md-davis | 5ddc446a31366ca242b81a603ff4d09b4368f0f2 | [
"MIT"
] | null | null | null | md_davis/gui/sequence_panel.py | djmaity/md-davis | 5ddc446a31366ca242b81a603ff4d09b4368f0f2 | [
"MIT"
] | null | null | null | import wx
import md_davis
class SequencePanel(wx.Panel):
def __init__(self, parent):
super().__init__(parent)
self.panel_sizer = wx.BoxSizer(orient=wx.VERTICAL)
self.file_picker_sizer = wx.BoxSizer(orient=wx.HORIZONTAL)
self.panel_sizer.Add(self.file_picker_sizer, 0, wx.EXPAND, ... | 41.037037 | 97 | 0.62515 |
96bef7b8ab7b761643224ec1628958c209bcaa97 | 1,395 | py | Python | script.py | shot4free/uptimerobot-problem-reporter | 1b3247de48bf1e0d307f7294b07418d597d26fbe | [
"Apache-2.0"
] | null | null | null | script.py | shot4free/uptimerobot-problem-reporter | 1b3247de48bf1e0d307f7294b07418d597d26fbe | [
"Apache-2.0"
] | null | null | null | script.py | shot4free/uptimerobot-problem-reporter | 1b3247de48bf1e0d307f7294b07418d597d26fbe | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3
import http.client
import json
import ast
from gtts import gTTS
import subprocess
language = 'pl'
dup = "dup"
def pp_json(json_string):
# print(json.dumps(json.loads(json_string), sort_keys=False, indent=4))
return
conn = http.client.HTTPSConnection("api.uptimerobot.com")
payload = "api_ke... | 25.833333 | 87 | 0.627957 |
f3f14325d011bfbe51b016a95c678a085632a9c9 | 1,535 | py | Python | GenerateFontList.py | cr4ckp0t/ElvUI_AdditionalFonts | 5db9e1fbbba131b016c6d747433d9429a75e1cbe | [
"MIT"
] | 2 | 2020-06-14T17:51:32.000Z | 2022-03-11T17:19:59.000Z | GenerateFontList.py | cr4ckp0t/ElvUI_AdditionalFonts | 5db9e1fbbba131b016c6d747433d9429a75e1cbe | [
"MIT"
] | 5 | 2020-12-17T18:43:16.000Z | 2022-03-08T14:45:33.000Z | GenerateFontList.py | cr4ckp0t/ElvUI_AdditionalFonts | 5db9e1fbbba131b016c6d747433d9429a75e1cbe | [
"MIT"
] | null | null | null | # Generate Font List for LibSharedMedia
# By: Adam K.
import os, sys
# return the scripts path so we know where to work from
def getScriptPath():
return os.path.dirname(os.path.realpath(sys.argv[0]))
fileFormat = '''-------------------------------------------------------------------------------
-- ElvUI Additional F... | 32.659574 | 106 | 0.615635 |
dfbc6ef55fb39c584e2b32c30dea1a3af3dd97b9 | 2,591 | py | Python | ssn/trainer/inference.py | amithjkamath/stochastic_segmentation_networks | 295f9322f78e4407ad13438ed6e93b77e3ff2496 | [
"MIT"
] | 47 | 2020-06-26T11:03:29.000Z | 2022-03-07T13:23:00.000Z | ssn/trainer/inference.py | amithjkamath/stochastic_segmentation_networks | 295f9322f78e4407ad13438ed6e93b77e3ff2496 | [
"MIT"
] | 5 | 2020-10-21T23:50:05.000Z | 2022-02-12T02:38:00.000Z | ssn/trainer/inference.py | amithjkamath/stochastic_segmentation_networks | 295f9322f78e4407ad13438ed6e93b77e3ff2496 | [
"MIT"
] | 10 | 2020-06-26T20:17:49.000Z | 2022-01-14T02:52:44.000Z | import torch
import time
from tqdm import tqdm
from .logger import get_logger
from .model_trainer import task_predict_fn_dict
class ModelInference(object):
def __init__(self, job_dir, device, model, saver, saved_model_path, task):
self.job_dir = job_dir
self.device = device
self.model = mo... | 43.183333 | 112 | 0.63875 |
31ea5c11f5bd14e60119be7beaf69ff5ae27a409 | 155,547 | py | Python | pandas/tests/test_window.py | zhezherun/pandas | 36c1104b7ad9761e020f7e8198eb60da4045d169 | [
"BSD-3-Clause"
] | 1 | 2018-11-11T22:18:13.000Z | 2018-11-11T22:18:13.000Z | pandas/tests/test_window.py | dkenward/pandas | 1f02bf240c3d0d3da338af868d056bfc169b28c2 | [
"BSD-3-Clause"
] | null | null | null | pandas/tests/test_window.py | dkenward/pandas | 1f02bf240c3d0d3da338af868d056bfc169b28c2 | [
"BSD-3-Clause"
] | 1 | 2021-06-21T07:51:29.000Z | 2021-06-21T07:51:29.000Z | from collections import OrderedDict
from itertools import product
import pytest
import warnings
from warnings import catch_warnings
from datetime import datetime, timedelta
from numpy.random import randn
import numpy as np
import pandas as pd
from pandas import (Series, DataFrame, bdate_range,
isn... | 38.378238 | 79 | 0.519926 |
9ea2656be60822f5e88d1956bc81da896bafbc27 | 1,604 | py | Python | src/feedmark/formats/atom.py | catseye/Feedmark | 4fc7668f7baf40870661fe7f01a2065d6c010005 | [
"MIT"
] | null | null | null | src/feedmark/formats/atom.py | catseye/Feedmark | 4fc7668f7baf40870661fe7f01a2065d6c010005 | [
"MIT"
] | null | null | null | src/feedmark/formats/atom.py | catseye/Feedmark | 4fc7668f7baf40870661fe7f01a2065d6c010005 | [
"MIT"
] | 1 | 2020-05-14T08:01:39.000Z | 2020-05-14T08:01:39.000Z | from __future__ import absolute_import
from datetime import datetime
import atomize
from feedmark.feeds import extract_feed_properties, extract_sections, construct_entry_url
from feedmark.formats.markdown import markdown_to_html5
def convert_section_to_entry(section, properties, markdown_links_base=None):
gui... | 27.655172 | 89 | 0.700125 |
f7f91e3af56179c30d291b22ea147491cd6e61e3 | 1,287 | py | Python | 107 Binary Tree Level Order Traversal II.py | scorpionpd/LeetCode-all | 0d65494f37d093d650b83b93409e874c041f3abe | [
"MIT"
] | null | null | null | 107 Binary Tree Level Order Traversal II.py | scorpionpd/LeetCode-all | 0d65494f37d093d650b83b93409e874c041f3abe | [
"MIT"
] | null | null | null | 107 Binary Tree Level Order Traversal II.py | scorpionpd/LeetCode-all | 0d65494f37d093d650b83b93409e874c041f3abe | [
"MIT"
] | null | null | null | """
Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by
level from leaf to root).
For example:
Given binary tree {3,9,20,#,#,15,7},
3
/ \
9 20
/ \
15 7
return its bottom-up level order traversal as:
[
[15,7],
[9,20],
[3]
]
""... | 20.758065 | 140 | 0.566434 |
3ec09c9e1ff4cd82d49dbc7b50251b12e29183e8 | 35,928 | py | Python | test/functional/rpc_psbt.py | criptolot/bsvcoin | 125fc951c1bb5a87b706c5a3821a1e3252f45a3d | [
"MIT"
] | null | null | null | test/functional/rpc_psbt.py | criptolot/bsvcoin | 125fc951c1bb5a87b706c5a3821a1e3252f45a3d | [
"MIT"
] | null | null | null | test/functional/rpc_psbt.py | criptolot/bsvcoin | 125fc951c1bb5a87b706c5a3821a1e3252f45a3d | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2018-2020 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the Partially Signed Transaction RPCs.
"""
from decimal import Decimal
from test_framework.test_f... | 61.206133 | 584 | 0.676102 |
3e6e8b71a6beb25b4692a59b0a65aee6ad2917a2 | 16,888 | py | Python | rdk/template/runtime/python3.6/rule_code.py | rafihm/aws-config-rdk | 8e70f8d82e72a09a82652f49db7c5b9469f81a38 | [
"Apache-2.0"
] | null | null | null | rdk/template/runtime/python3.6/rule_code.py | rafihm/aws-config-rdk | 8e70f8d82e72a09a82652f49db7c5b9469f81a38 | [
"Apache-2.0"
] | null | null | null | rdk/template/runtime/python3.6/rule_code.py | rafihm/aws-config-rdk | 8e70f8d82e72a09a82652f49db7c5b9469f81a38 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017-2018 Amazon.com, Inc. or its affiliates. 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. A copy of the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "lice... | 47.571831 | 183 | 0.707425 |
523094724bdd2616b5e78b0788dc256133bf095f | 2,588 | py | Python | hard-gists/3295631/snippet.py | jjhenkel/dockerizeme | eaa4fe5366f6b9adf74399eab01c712cacaeb279 | [
"Apache-2.0"
] | 21 | 2019-07-08T08:26:45.000Z | 2022-01-24T23:53:25.000Z | hard-gists/3295631/snippet.py | jjhenkel/dockerizeme | eaa4fe5366f6b9adf74399eab01c712cacaeb279 | [
"Apache-2.0"
] | 5 | 2019-06-15T14:47:47.000Z | 2022-02-26T05:02:56.000Z | hard-gists/3295631/snippet.py | jjhenkel/dockerizeme | eaa4fe5366f6b9adf74399eab01c712cacaeb279 | [
"Apache-2.0"
] | 17 | 2019-05-16T03:50:34.000Z | 2021-01-14T14:35:12.000Z | import cv2
import numpy as np
import itertools
lk_params = dict( winSize = (10, 10),
maxLevel = 5,
criteria = (cv2.TERM_CRITERIA_EPS | cv2.TERM_CRITERIA_COUNT, 10, 0.03))
feature_params = dict( maxCorners = 3000,
qualityLevel = 0.5,
... | 34.052632 | 94 | 0.478362 |
ecc8b679bd2a84057e923efd4e9c1a407d1464f5 | 5,647 | py | Python | update_manager.py | Kairn/laser-bees | 79ea5d38bab22486bd0261a51771f06b6c3f88fb | [
"MIT"
] | null | null | null | update_manager.py | Kairn/laser-bees | 79ea5d38bab22486bd0261a51771f06b6c3f88fb | [
"MIT"
] | null | null | null | update_manager.py | Kairn/laser-bees | 79ea5d38bab22486bd0261a51771f06b6c3f88fb | [
"MIT"
] | null | null | null | # update_manager.py #
# ============================================================================
# DEFINE FUNCTIONS FOR UPDATING THE STATUS OF ALL IN-GAME OBJECTS FOR THE
# GAME TO DRAW THEM PROPERLY ON THE SCREEN FOR EACH FRAME.
#
import random
from characters import PlayerAmmo, Enemy, EnemyAmmo
def update_pla... | 34.224242 | 78 | 0.594298 |
cd266240a9d6c8d57f92b7c1e0477edc91d060b1 | 3,684 | py | Python | mlrun/frameworks/mlbase/mlrun_interface.py | Hedingber/mlrun | e2269718fcc7caa7e1aa379ac28495830b45f9da | [
"Apache-2.0"
] | null | null | null | mlrun/frameworks/mlbase/mlrun_interface.py | Hedingber/mlrun | e2269718fcc7caa7e1aa379ac28495830b45f9da | [
"Apache-2.0"
] | null | null | null | mlrun/frameworks/mlbase/mlrun_interface.py | Hedingber/mlrun | e2269718fcc7caa7e1aa379ac28495830b45f9da | [
"Apache-2.0"
] | null | null | null | import pandas as pd
from cloudpickle import dumps
from mlrun.frameworks._common import MLRunInterface
from mlrun.frameworks._common.plots import eval_model_v2
class MLBaseMLRunInterface(MLRunInterface):
"""
Wraps the original .fit() method of the passed model enabling auto-logging.
"""
@classmethod
... | 38.375 | 110 | 0.546145 |
dbdf0772a3a8b41fda06cf2762d46fc1b83e75c3 | 2,666 | py | Python | scripts/clean.py | msikma/Complete-Fire-Red-Upgrade | 6a15ece5c180b9d98e1f8cc78e7e8f62f5e48708 | [
"WTFPL"
] | null | null | null | scripts/clean.py | msikma/Complete-Fire-Red-Upgrade | 6a15ece5c180b9d98e1f8cc78e7e8f62f5e48708 | [
"WTFPL"
] | null | null | null | scripts/clean.py | msikma/Complete-Fire-Red-Upgrade | 6a15ece5c180b9d98e1f8cc78e7e8f62f5e48708 | [
"WTFPL"
] | null | null | null | #!/usr/bin/env python3
import os
import sys
import shutil
import hashlib
import glob, os.path
ROM_NAME = "test.gba"
SRC = './src'
GRAPHICS = './graphics'
ASSEMBLY = './assembly'
STRINGS = './strings'
BUILD = './build'
def PutFileNameInRightFormat(filename):
filename = filename.split('/')
newFileName = ""
if fil... | 23.803571 | 77 | 0.652663 |
d133dd829794a4706a5d9ce51e63249335f653cd | 1,034 | py | Python | humpack/__init__.py | felixludos/HumPack | f47d73e8bd21f35c2ef6f53593c8c6f18a588ead | [
"MIT"
] | 1 | 2020-02-13T17:58:32.000Z | 2020-02-13T17:58:32.000Z | humpack/__init__.py | felixludos/HumPack | f47d73e8bd21f35c2ef6f53593c8c6f18a588ead | [
"MIT"
] | null | null | null | humpack/__init__.py | felixludos/HumPack | f47d73e8bd21f35c2ef6f53593c8c6f18a588ead | [
"MIT"
] | null | null | null |
from .packing import Packable, primitive, PRIMITIVE, SERIALIZABLE, JSONABLE, pack, unpack, pack_member, unpack_member
from .packing import save_pack, load_pack, json_pack, json_unpack
from .transactions import Transactionable, AbortTransaction
from .hashing import Hashable
# from .wrappers import ObjectWrappe... | 34.466667 | 118 | 0.760155 |
bba33b3fc55d99a28f0c18a9602e56b96af9cbcf | 5,426 | py | Python | loco_main.py | Ashwin068/loco-trivia-Google-webhook- | 9bf77f197766de49b0c40d56648dc59cf49cf3f6 | [
"MIT"
] | null | null | null | loco_main.py | Ashwin068/loco-trivia-Google-webhook- | 9bf77f197766de49b0c40d56648dc59cf49cf3f6 | [
"MIT"
] | null | null | null | loco_main.py | Ashwin068/loco-trivia-Google-webhook- | 9bf77f197766de49b0c40d56648dc59cf49cf3f6 | [
"MIT"
] | null | null | null | import requests
import json
import asyncio
from dhooks import Webhook, Embed
from datetime import datetime
from pytz import timezone
import pytz
import time
indianist = timezone('Asia/Kolkata')
global oldata
oldata = None
# input all datas
loco_bearer_token = "put_loco_barear_token"
webhook_url = "put_... | 53.196078 | 167 | 0.610763 |
6b0ded3fc3a8a287c5a4ad2ea4a6ce3fa5fb5db5 | 26,295 | py | Python | masci_tools/io/fleur_inpgen.py | JuDFTteam/masci-tools | f08f004bf9db99b687a3c67d6c82e628a9231634 | [
"MIT"
] | 15 | 2018-11-07T10:04:46.000Z | 2021-11-08T20:51:08.000Z | masci_tools/io/fleur_inpgen.py | JuDFTteam/masci-tools | f08f004bf9db99b687a3c67d6c82e628a9231634 | [
"MIT"
] | 120 | 2020-02-04T15:37:42.000Z | 2022-03-17T10:49:40.000Z | masci_tools/io/fleur_inpgen.py | JuDFTteam/masci-tools | f08f004bf9db99b687a3c67d6c82e628a9231634 | [
"MIT"
] | 11 | 2018-10-18T08:09:07.000Z | 2022-02-22T15:45:21.000Z | # -*- coding: utf-8 -*-
###############################################################################
# Copyright (c), Forschungszentrum Jülich GmbH, IAS-1/PGI-1, Germany. #
# All rights reserved. #
# This file is part of the Masci-tools package. ... | 42.686688 | 139 | 0.588857 |
476736f551750f248da724054c8989191aa1ca55 | 937 | py | Python | mailgun/handlers/default_handler.py | diskovod/mailgun_beta | 5a595704c1eb887f87ad72b900c1e6fb613412a1 | [
"MIT"
] | null | null | null | mailgun/handlers/default_handler.py | diskovod/mailgun_beta | 5a595704c1eb887f87ad72b900c1e6fb613412a1 | [
"MIT"
] | null | null | null | mailgun/handlers/default_handler.py | diskovod/mailgun_beta | 5a595704c1eb887f87ad72b900c1e6fb613412a1 | [
"MIT"
] | null | null | null | """
DEFAULT HANDLER
Events doc: https://documentation.mailgun.com/en/latest/api-events.html
Messages doc: https://documentation.mailgun.com/en/latest/api-sending.html
Stats doc: https://documentation.mailgun.com/en/latest/api-stats.html
"""
from os import path
from .error_handler import ApiError
def handle_default(ur... | 30.225806 | 82 | 0.693703 |
888e7b0a4b53525e50f083e7cb300a5d6e0986e9 | 14,916 | py | Python | src/menten_gcn/decorators/geometry.py | MentenAI/menten_gcn | bcc7642cb32ab4e60a97687de17c1aa2dc4b5421 | [
"MIT"
] | 11 | 2020-12-15T15:36:47.000Z | 2022-03-10T19:23:36.000Z | src/menten_gcn/decorators/geometry.py | MentenAI/menten_gcn | bcc7642cb32ab4e60a97687de17c1aa2dc4b5421 | [
"MIT"
] | 2 | 2021-01-14T15:04:59.000Z | 2021-01-14T19:24:00.000Z | src/menten_gcn/decorators/geometry.py | MentenAI/menten_gcn | bcc7642cb32ab4e60a97687de17c1aa2dc4b5421 | [
"MIT"
] | null | null | null | import numpy as np
import math
from menten_gcn.decorators.base import *
def angle_rad(a, b, c):
# https://stackoverflow.com/questions/35176451/python-code-to-calculate-angle-between-three-point-using-their-3d-coordinates
ba = a - b
bc = c - b
cosine_angle = np.dot(ba, bc) / (np.linalg.norm(ba) * np.l... | 31.803838 | 128 | 0.605189 |
934e9b17c0aa03b6ceee356053891cf3e622236e | 4,061 | py | Python | fantastico/rendering/tests/test_fantastico_urlinternalinvoker.py | bopopescu/fantastico | 7c95f244f0cf0239ac5408146612dd72f88d35ea | [
"MIT"
] | 2 | 2016-12-18T02:42:25.000Z | 2018-01-30T16:32:29.000Z | fantastico/rendering/tests/test_fantastico_urlinternalinvoker.py | bopopescu/fantastico | 7c95f244f0cf0239ac5408146612dd72f88d35ea | [
"MIT"
] | 1 | 2020-07-28T07:16:35.000Z | 2020-07-28T07:16:35.000Z | fantastico/rendering/tests/test_fantastico_urlinternalinvoker.py | bopopescu/fantastico | 7c95f244f0cf0239ac5408146612dd72f88d35ea | [
"MIT"
] | 1 | 2020-07-24T05:55:28.000Z | 2020-07-24T05:55:28.000Z | '''
Copyright 2013 Cosnita Radu Viorel
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute... | 43.202128 | 126 | 0.743413 |
8942b7de914039cc7c3512e708af17349d9b40b5 | 2,435 | py | Python | src/pymortests/demos.py | ftalbrecht/pymor | 0d02e866f224c03a945599e0d95db6c3b9f5d707 | [
"Unlicense"
] | null | null | null | src/pymortests/demos.py | ftalbrecht/pymor | 0d02e866f224c03a945599e0d95db6c3b9f5d707 | [
"Unlicense"
] | null | null | null | src/pymortests/demos.py | ftalbrecht/pymor | 0d02e866f224c03a945599e0d95db6c3b9f5d707 | [
"Unlicense"
] | null | null | null | # This file is part of the pyMOR project (http://www.pymor.org).
# Copyright Holders: Rene Milk, Stephan Rave, Felix Schindler
# License: BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause)
from __future__ import absolute_import, division, print_function
import pkgutil
import pymordemos
import runpy
im... | 36.343284 | 114 | 0.638193 |
688489e061938865102fc5a0e02dbb26f605ca0d | 640 | py | Python | src/Current.py | Unknown15082/Weather-API | d52bc0500c035cd224d709830e5b1cfd5ad70a65 | [
"MIT"
] | null | null | null | src/Current.py | Unknown15082/Weather-API | d52bc0500c035cd224d709830e5b1cfd5ad70a65 | [
"MIT"
] | null | null | null | src/Current.py | Unknown15082/Weather-API | d52bc0500c035cd224d709830e5b1cfd5ad70a65 | [
"MIT"
] | null | null | null | import requests
from dotenv import load_dotenv
import os
def getcurrent(location, lang = "en"):
"""
Syntax: getcurrent((<latitude>, <longitude>), <language = "en">)
Get the data of the current weather at the specified location.
"""
load_dotenv()
KEY = os.environ["APIKEY"]
parameters ... | 21.333333 | 68 | 0.629688 |
cb14ec7d67cac8da9a6a1d038e6be9a3d60f1b34 | 492 | py | Python | expenses/forms.py | maths22/daily-expenses | 1c01d3c82d925e5dc846c849d1dcc548719fb77b | [
"BSD-2-Clause"
] | null | null | null | expenses/forms.py | maths22/daily-expenses | 1c01d3c82d925e5dc846c849d1dcc548719fb77b | [
"BSD-2-Clause"
] | null | null | null | expenses/forms.py | maths22/daily-expenses | 1c01d3c82d925e5dc846c849d1dcc548719fb77b | [
"BSD-2-Clause"
] | null | null | null | from django import forms
from django.forms import ModelForm
from expenses.models import Expense
from datetime import date
#Primary form for entering an expense
class ExpenseForm(ModelForm):
item = forms.CharField(label='Item', max_length=200)
price = forms.DecimalField(label='Price', min_value=0, max_digits=... | 30.75 | 111 | 0.729675 |
38e06b6cfe5c19cb15ccb0555e035080877da2cc | 47,580 | py | Python | tests/test_autogen_diffs.py | yoyowallet/alembic | 6eceffe0601f0ec025101bc3d6a16d0739485230 | [
"MIT"
] | null | null | null | tests/test_autogen_diffs.py | yoyowallet/alembic | 6eceffe0601f0ec025101bc3d6a16d0739485230 | [
"MIT"
] | null | null | null | tests/test_autogen_diffs.py | yoyowallet/alembic | 6eceffe0601f0ec025101bc3d6a16d0739485230 | [
"MIT"
] | null | null | null | import sys
from sqlalchemy import MetaData, Column, Table, Integer, String, Text, \
Numeric, CHAR, ForeignKey, INTEGER, Index, UniqueConstraint, \
TypeDecorator, CheckConstraint, text, PrimaryKeyConstraint, \
ForeignKeyConstraint, VARCHAR, DECIMAL, DateTime, BigInteger, BIGINT, \
SmallInteger
from sqla... | 30.676983 | 79 | 0.561181 |
2a7dd194073f40ffdb5c6e2a183ef0cbb57f53cb | 10,418 | py | Python | prep_scripts/prep_sanger_wgs_clinical.py | dfci/hotspot_logreg | fbd5585e69b39c54637ac240d23f974c5ae6e996 | [
"MIT"
] | null | null | null | prep_scripts/prep_sanger_wgs_clinical.py | dfci/hotspot_logreg | fbd5585e69b39c54637ac240d23f974c5ae6e996 | [
"MIT"
] | null | null | null | prep_scripts/prep_sanger_wgs_clinical.py | dfci/hotspot_logreg | fbd5585e69b39c54637ac240d23f974c5ae6e996 | [
"MIT"
] | null | null | null | #!/usr/bin/env python2
"""
SYNOPSIS
Prepare the Sanger Institute WGS Breast Cancer Clinical data into a format
that is suitable for input into the Hotspots 'Mutation_Counts' pipeline.
NOTES
EXAMPLES
./prep_sanger_wgs_clinical.py \
--in_clinical ../public/clinical/raw/sanger_wgs/nature17676-s3/Su... | 41.34127 | 148 | 0.67393 |
97d1341e1d9d470a44bb7c9666ec975ea7124537 | 2,546 | py | Python | 2020/04.py | IsaacG/Advent-of-Code | 1e970c6a4abc4a2025f7c70323e70aee64d0bc21 | [
"MIT"
] | 3 | 2020-12-19T09:01:03.000Z | 2021-12-16T13:05:03.000Z | 2020/04.py | IsaacG/Advent-of-Code | 1e970c6a4abc4a2025f7c70323e70aee64d0bc21 | [
"MIT"
] | null | null | null | 2020/04.py | IsaacG/Advent-of-Code | 1e970c6a4abc4a2025f7c70323e70aee64d0bc21 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Walrus operator not supported by python3."""
import typer
import re
from typing import List
from lib import aoc
REQUIRED_FIELDS = {
'byr',
'iyr',
'eyr',
'hgt',
'hcl',
'ecl',
'pid',
# 'cid',
}
YEAR_CHECKS = {
('byr', 1920, 2002),
('iyr', 2010, 2020),
('eyr', 2020, 2030)... | 24.018868 | 73 | 0.629222 |
9c57de32fe6f934c740070697001a09a2f5b95a9 | 607 | py | Python | netharn/criterions/__init__.py | angiemsu/netharn | 728cb40aad299baf62c689430d07b29c67d8cf21 | [
"Apache-2.0"
] | null | null | null | netharn/criterions/__init__.py | angiemsu/netharn | 728cb40aad299baf62c689430d07b29c67d8cf21 | [
"Apache-2.0"
] | null | null | null | netharn/criterions/__init__.py | angiemsu/netharn | 728cb40aad299baf62c689430d07b29c67d8cf21 | [
"Apache-2.0"
] | null | null | null | """
mkinit netharn.criterions
"""
# flake8: noqa
from torch.nn.modules.loss import CrossEntropyLoss, MSELoss, TripletMarginLoss
__DYNAMIC__ = False
if __DYNAMIC__:
from mkinit import dynamic_init
exec(dynamic_init(__name__))
else:
# <AUTOGEN_INIT>
from netharn.criterions import contrastive_loss
fro... | 31.947368 | 78 | 0.784185 |
9d88a6e3926de8a4a62bbb03accfc3928c075b08 | 16,422 | py | Python | dev-utils/test-patch.py | jgu1/myKafka | 75a7db637e970ccf7d4438d09fc4b78324b07b1e | [
"Apache-2.0"
] | null | null | null | dev-utils/test-patch.py | jgu1/myKafka | 75a7db637e970ccf7d4438d09fc4b78324b07b1e | [
"Apache-2.0"
] | null | null | null | dev-utils/test-patch.py | jgu1/myKafka | 75a7db637e970ccf7d4438d09fc4b78324b07b1e | [
"Apache-2.0"
] | 1 | 2020-06-19T01:55:03.000Z | 2020-06-19T01:55:03.000Z | #!/usr/bin/env python
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "... | 35.855895 | 201 | 0.67982 |
67bdce09941635a2ed3f52b92a5df831ec6ee5fb | 3,958 | py | Python | koocook_core/tests/test_profile.py | KooCook/koocook-dj | 33bfaf48e8363013ddd083d5d8542496c50fd5d3 | [
"BSD-3-Clause"
] | 1 | 2020-10-19T04:44:49.000Z | 2020-10-19T04:44:49.000Z | koocook_core/tests/test_profile.py | KooCook/koocook-dj | 33bfaf48e8363013ddd083d5d8542496c50fd5d3 | [
"BSD-3-Clause"
] | 26 | 2019-11-11T03:37:03.000Z | 2019-12-15T23:18:18.000Z | koocook_core/tests/test_profile.py | KooCook/koocook-dj | 33bfaf48e8363013ddd083d5d8542496c50fd5d3 | [
"BSD-3-Clause"
] | 1 | 2020-11-08T14:36:21.000Z | 2020-11-08T14:36:21.000Z | import json
from django.test import TestCase
from django.shortcuts import reverse
from django.contrib.auth.models import User
from .base import AuthTestCase
from ..support import PreferenceManager, TaggingPreference
class PreferencesTest(TestCase):
def setUp(self) -> None:
self.username = "testuser"
... | 46.023256 | 114 | 0.665993 |
0c5353d55cb4e2d5ee5dcf6a4af4506bf74c7775 | 6,717 | py | Python | sdk/python/pulumi_gcp/secretmanager/get_secret.py | sisisin/pulumi-gcp | af6681d70ea457843409110c1324817fe55f68ad | [
"ECL-2.0",
"Apache-2.0"
] | 121 | 2018-06-18T19:16:42.000Z | 2022-03-31T06:06:48.000Z | sdk/python/pulumi_gcp/secretmanager/get_secret.py | sisisin/pulumi-gcp | af6681d70ea457843409110c1324817fe55f68ad | [
"ECL-2.0",
"Apache-2.0"
] | 492 | 2018-06-22T19:41:03.000Z | 2022-03-31T15:33:53.000Z | sdk/python/pulumi_gcp/secretmanager/get_secret.py | sisisin/pulumi-gcp | af6681d70ea457843409110c1324817fe55f68ad | [
"ECL-2.0",
"Apache-2.0"
] | 43 | 2018-06-19T01:43:13.000Z | 2022-03-23T22:43:37.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import... | 33.585 | 184 | 0.647908 |
ad0d2dc84c33888b3f3326fc6fe4f64e005848f4 | 38,455 | py | Python | train.py | gmftbyGMFTBY/MultiTurnDialogZoo | d5bed26c13f4125f380e0e5337eb492acaa9c38f | [
"MIT"
] | 145 | 2020-02-13T02:59:08.000Z | 2022-03-31T06:09:16.000Z | train.py | Biqing-Qi/MultiTurnDialogZoo | d5bed26c13f4125f380e0e5337eb492acaa9c38f | [
"MIT"
] | 14 | 2020-02-19T09:32:45.000Z | 2022-03-22T19:18:30.000Z | train.py | Biqing-Qi/MultiTurnDialogZoo | d5bed26c13f4125f380e0e5337eb492acaa9c38f | [
"MIT"
] | 28 | 2020-02-19T02:47:22.000Z | 2022-03-25T06:11:31.000Z | #!/usr/bin/python3
# Author: GMFTBY
# Time: 2019.9.15
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn.utils import clip_grad_norm_
from torch.optim import lr_scheduler
import torch.optim as optim
import random
import numpy as np
import argparse
import math
import pickle
from tqdm impor... | 48.86277 | 233 | 0.527994 |
3314c09dc5f09a69e6917f7ee96498a88391ce60 | 134 | py | Python | projects/code_combat/4_Backwoods_Forest/107-Ogre_Encampment/ogre.py | only-romano/junkyard | b60a25b2643f429cdafee438d20f9966178d6f36 | [
"MIT"
] | null | null | null | projects/code_combat/4_Backwoods_Forest/107-Ogre_Encampment/ogre.py | only-romano/junkyard | b60a25b2643f429cdafee438d20f9966178d6f36 | [
"MIT"
] | null | null | null | projects/code_combat/4_Backwoods_Forest/107-Ogre_Encampment/ogre.py | only-romano/junkyard | b60a25b2643f429cdafee438d20f9966178d6f36 | [
"MIT"
] | null | null | null | while True:
enemy = hero.findNearestEnemy()
if enemy:
hero.attack(enemy)
else:
hero.attack("Chest")
| 19.142857 | 36 | 0.559701 |
1b4b8e346e2db5836a89c76e01b86a2542b0828e | 3,897 | py | Python | TCC/cenario_mqtt_sn/eficiencia_energetica/coletar_energia.py | AbimaelSB/TCC2_ABIMAEL | 164d008f0544dca09b1695839abc8e9204edfeba | [
"MIT"
] | 1 | 2021-02-03T22:27:31.000Z | 2021-02-03T22:27:31.000Z | TCC/cenario_mqtt_sn/eficiencia_energetica/coletar_energia.py | AbimaelSB/TCC2_ABIMAEL | 164d008f0544dca09b1695839abc8e9204edfeba | [
"MIT"
] | 2 | 2021-05-10T18:58:17.000Z | 2021-05-10T19:16:15.000Z | TCC/cenario_mqtt_sn/eficiencia_energetica/coletar_energia.py | AbimaelSB/TCC2_ABIMAEL | 164d008f0544dca09b1695839abc8e9204edfeba | [
"MIT"
] | null | null | null |
# -*- coding: UTF-8 -*-
import pandas as pd
from glob import glob
import matplotlib.pyplot as plt
import matplotlib.patches as mpatches
import numpy as np
import sys
data = pd.read_csv(glob("cpu_lpm_rx_tx_mqtt_sn.txt")[0], sep=" ", header=None)
data.columns = ["cpu", "lpm", "rx", "tx"]
data.sort_values(by=['cpu'], in... | 32.206612 | 78 | 0.625353 |
20b734d6a73159990781af3bff8ec6fb7552014d | 13,924 | py | Python | log_casp_inh/model_596.py | LoLab-VU/Bayesian_Inference_of_Network_Dynamics | 54a5ef7e868be34289836bbbb024a2963c0c9c86 | [
"MIT"
] | null | null | null | log_casp_inh/model_596.py | LoLab-VU/Bayesian_Inference_of_Network_Dynamics | 54a5ef7e868be34289836bbbb024a2963c0c9c86 | [
"MIT"
] | null | null | null | log_casp_inh/model_596.py | LoLab-VU/Bayesian_Inference_of_Network_Dynamics | 54a5ef7e868be34289836bbbb024a2963c0c9c86 | [
"MIT"
] | null | null | null | # exported from PySB model 'model'
from pysb import Model, Monomer, Parameter, Expression, Compartment, Rule, Observable, Initial, MatchOnce, Annotation, ANY, WILD
Model()
Monomer('C6A', ['C8pro'])
Monomer('BaxA', ['BaxM', 'BaxA_1', 'BaxA_2', 'SmacM'])
Monomer('Ligand', ['Receptor'])
Monomer('C6pro', ['C3A'])
Monome... | 85.423313 | 598 | 0.808532 |
23bac397db5cc8efb8867376566675f4b68f0a9c | 13,368 | py | Python | glm/glm.py | cscherrer/py-glm | d719d29fb5cc71c2cb5e728db36c6230a69292d8 | [
"BSD-3-Clause"
] | 1 | 2019-08-05T15:08:22.000Z | 2019-08-05T15:08:22.000Z | glm/glm.py | cscherrer/py-glm | d719d29fb5cc71c2cb5e728db36c6230a69292d8 | [
"BSD-3-Clause"
] | null | null | null | glm/glm.py | cscherrer/py-glm | d719d29fb5cc71c2cb5e728db36c6230a69292d8 | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
import scipy.stats as sts
import patsy as pt
from .utils import (check_types, check_commensurate, check_intercept,
check_offset, check_sample_weights, has_converged,
default_X_names, default_y_name)
from .families import Gaussian
class GLM:
"""A generali... | 36.032345 | 87 | 0.610787 |
5a2774050900cc425d929e3cdc2cf51db69b287f | 38,590 | py | Python | vispy/color/colormap.py | sevas/vispy | 572158619c04809a26993e808b7af25b2b426ba1 | [
"BSD-3-Clause"
] | null | null | null | vispy/color/colormap.py | sevas/vispy | 572158619c04809a26993e808b7af25b2b426ba1 | [
"BSD-3-Clause"
] | null | null | null | vispy/color/colormap.py | sevas/vispy | 572158619c04809a26993e808b7af25b2b426ba1 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2015, Vispy Development Team.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
from __future__ import division # just to be safe...
import inspect
import numpy as np
from .color_array import ColorArray
from ..ext.six import string_types
from ..ext.cub... | 37.796278 | 100 | 0.532003 |
c0a9a8af4d7750e14e5f2fdda48c1e0faf49bb27 | 2,007 | py | Python | realsense_pointcloud.py | yiyangd/SummerResearch2021 | 5ace4b06a3e4ae68d8962e7074e361a9df96fe7b | [
"MIT"
] | null | null | null | realsense_pointcloud.py | yiyangd/SummerResearch2021 | 5ace4b06a3e4ae68d8962e7074e361a9df96fe7b | [
"MIT"
] | null | null | null | realsense_pointcloud.py | yiyangd/SummerResearch2021 | 5ace4b06a3e4ae68d8962e7074e361a9df96fe7b | [
"MIT"
] | null | null | null | import pyrealsense2 as rs
# https://intelrealsense.github.io/librealsense/python_docs/
import numpy as np
class DepthCamera:
def __init__(self):
# Configure depth and color streams
self.pipeline = rs.pipeline()
config = rs.config()
# Get device product line for setting a supportin... | 35.210526 | 79 | 0.652715 |
6e5d74f01b1039fc80380457d1a1afed263f4f4a | 1,978 | py | Python | tests/llvm/download_llvm_test.py | thecoblack/CompilerGym | ade54e2f1829cf41722decb0942a4d6fd3102c2c | [
"MIT"
] | 562 | 2020-12-21T14:10:20.000Z | 2022-03-31T21:23:55.000Z | tests/llvm/download_llvm_test.py | thecoblack/CompilerGym | ade54e2f1829cf41722decb0942a4d6fd3102c2c | [
"MIT"
] | 433 | 2020-12-22T03:40:41.000Z | 2022-03-31T18:16:17.000Z | tests/llvm/download_llvm_test.py | thecoblack/CompilerGym | ade54e2f1829cf41722decb0942a4d6fd3102c2c | [
"MIT"
] | 88 | 2020-12-22T08:22:00.000Z | 2022-03-20T19:00:40.000Z | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import os
from concurrent.futures import ThreadPoolExecutor
from pathlib import Path
from compiler_gym.third_party import llvm
from compiler_g... | 35.321429 | 82 | 0.718908 |
345638c8adf9210a449b0775ebf0b6114784e4f0 | 4,637 | py | Python | prediction_service_pb2.py | PogpogPapaya/prediction-api | 3627355069702bd1fb65068cf757947700931153 | [
"MIT"
] | null | null | null | prediction_service_pb2.py | PogpogPapaya/prediction-api | 3627355069702bd1fb65068cf757947700931153 | [
"MIT"
] | null | null | null | prediction_service_pb2.py | PogpogPapaya/prediction-api | 3627355069702bd1fb65068cf757947700931153 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: prediction-service.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from goo... | 31.97931 | 335 | 0.767738 |
fbb47b526190f95cdbb932b5c8fa10cd2fd508e9 | 1,733 | py | Python | nets/SBMs_node_classification/load_net.py | nnzhan/AutoGCN | 22c1062152a67581b310c371dfc5a5e27f79dddb | [
"MIT"
] | 5 | 2021-07-13T14:16:22.000Z | 2022-03-07T10:41:21.000Z | nets/SBMs_node_classification/load_net.py | nnzhan/AutoGCN | 22c1062152a67581b310c371dfc5a5e27f79dddb | [
"MIT"
] | null | null | null | nets/SBMs_node_classification/load_net.py | nnzhan/AutoGCN | 22c1062152a67581b310c371dfc5a5e27f79dddb | [
"MIT"
] | 1 | 2021-07-26T03:59:48.000Z | 2021-07-26T03:59:48.000Z | """
Utility file to select GraphNN model as
selected by the user
"""
from nets.SBMs_node_classification.gated_gcn_net import GatedGCNNet
from nets.SBMs_node_classification.gcn_net import GCNNet
from nets.SBMs_node_classification.gat_net import GATNet
from nets.SBMs_node_classification.graphsage_net import Grap... | 26.257576 | 68 | 0.743797 |
ebebbde5b329f2eb4f26bac5bd6fea2663464135 | 1,080 | py | Python | logmymessages/api/log.py | zedach/python-tutorial | 85cfb511356c06c5a9d6daacaf10f07dd71bf14e | [
"MIT"
] | 1 | 2020-10-07T19:03:48.000Z | 2020-10-07T19:03:48.000Z | logmymessages/api/log.py | zedach/python-tutorial | 85cfb511356c06c5a9d6daacaf10f07dd71bf14e | [
"MIT"
] | null | null | null | logmymessages/api/log.py | zedach/python-tutorial | 85cfb511356c06c5a9d6daacaf10f07dd71bf14e | [
"MIT"
] | 1 | 2020-10-10T10:23:53.000Z | 2020-10-10T10:23:53.000Z | from datetime import datetime
def write(message):
# GET JSON object attributes
sender = message['sender']
message = message['message']
# Write attributes to file
with open("log.txt", "a") as logfile:
logfile.write("[%s][%s] : %s\n" % (
datetime.now().strftime('%Y%m%d-%H%M%S'), ... | 30.857143 | 71 | 0.512037 |
c102ef39b4c83977cdc881b6b6ccd01de5e5423d | 534 | py | Python | classification/serializers.py | SACGF/variantgrid | 515195e2f03a0da3a3e5f2919d8e0431babfd9c9 | [
"RSA-MD"
] | 5 | 2021-01-14T03:34:42.000Z | 2022-03-07T15:34:18.000Z | classification/serializers.py | SACGF/variantgrid | 515195e2f03a0da3a3e5f2919d8e0431babfd9c9 | [
"RSA-MD"
] | 551 | 2020-10-19T00:02:38.000Z | 2022-03-30T02:18:22.000Z | classification/serializers.py | SACGF/variantgrid | 515195e2f03a0da3a3e5f2919d8e0431babfd9c9 | [
"RSA-MD"
] | null | null | null | from rest_framework import serializers
from classification.models import Classification
from snpdb.serializers import VariantSerializer
# Is this used?
class ClassificationSerializer(serializers.ModelSerializer):
variant = VariantSerializer()
clinical_significance = serializers.SerializerMethodField()
la... | 28.105263 | 63 | 0.775281 |
e6eb6081dd25256641475072c55115e5251de0b6 | 10,592 | py | Python | corpus/parse_wikipedia.py | yuka1369/TaxoRL | 4a1d63b1efde9842acb8f544c192df79b084a9f2 | [
"MIT"
] | 68 | 2018-05-11T23:07:45.000Z | 2022-02-11T18:36:58.000Z | corpus/parse_wikipedia.py | yuka1369/TaxoRL | 4a1d63b1efde9842acb8f544c192df79b084a9f2 | [
"MIT"
] | 11 | 2018-07-06T07:49:44.000Z | 2021-12-23T03:41:50.000Z | corpus/parse_wikipedia.py | yuka1369/TaxoRL | 4a1d63b1efde9842acb8f544c192df79b084a9f2 | [
"MIT"
] | 16 | 2018-05-15T01:40:35.000Z | 2021-12-20T12:18:36.000Z | import codecs
from docopt import docopt
from spacy.en import English
from collections import defaultdict
def main():
"""
Creates a "knowledge resource" from triplets file
"""
# Get the arguments
args = docopt("""Parse the Wikipedia dump and create a triplets file, each line is formatted as follo... | 32.09697 | 120 | 0.583931 |
0b7330647f1a981087102d82689ce128a0a3d2e1 | 441 | py | Python | apps/alvo/migrations/0002_alter_alvo_data_expiracao.py | dahn94/django_map | df0a292c954076fc45aa05d75c956e7e531d5d86 | [
"MIT"
] | null | null | null | apps/alvo/migrations/0002_alter_alvo_data_expiracao.py | dahn94/django_map | df0a292c954076fc45aa05d75c956e7e531d5d86 | [
"MIT"
] | null | null | null | apps/alvo/migrations/0002_alter_alvo_data_expiracao.py | dahn94/django_map | df0a292c954076fc45aa05d75c956e7e531d5d86 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.8 on 2021-10-17 00:40
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('alvo', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='alvo',
name='data_expiracao',
... | 23.210526 | 113 | 0.612245 |
06f1074bbea743c63319764630fab0065b5bdd7c | 353 | py | Python | Python Developer/Lesson122.py | gabrielajachs/courses | b96d7c3bad974b24213af0b37ae35e58145a559c | [
"MIT"
] | null | null | null | Python Developer/Lesson122.py | gabrielajachs/courses | b96d7c3bad974b24213af0b37ae35e58145a559c | [
"MIT"
] | null | null | null | Python Developer/Lesson122.py | gabrielajachs/courses | b96d7c3bad974b24213af0b37ae35e58145a559c | [
"MIT"
] | null | null | null | class PlayerCharacter:
def __init__(self, name, age):
self._name = name
self._age = age
def run(self):
print('run')
def speak(self):
print(f"My name is {self._name}, and I am {self._age} years old")
player1 = PlayerCharacter('andrei', 100)
player1.name = '!!!'
player1.spea... | 22.0625 | 73 | 0.614731 |
a58cedbcb3376a15afc920bcbe2d5d4b555d0de4 | 2,143 | py | Python | data_acquisition/RPI_serial_to_opcUA.py | lefair96/wj-monitor | fe16b8266e48ad6a912e87f29d65bf44a0effcc7 | [
"MIT"
] | null | null | null | data_acquisition/RPI_serial_to_opcUA.py | lefair96/wj-monitor | fe16b8266e48ad6a912e87f29d65bf44a0effcc7 | [
"MIT"
] | null | null | null | data_acquisition/RPI_serial_to_opcUA.py | lefair96/wj-monitor | fe16b8266e48ad6a912e87f29d65bf44a0effcc7 | [
"MIT"
] | null | null | null | import sys
import serial
import serial.tools.list_ports
from opcua import ua, Server
sys.path.insert(0, "..")
document = {}
keys = []
setoutput = 0
i = 0
arduino_port = "/dev/ttyACM0" # serial port of Arduino
baud = 115200 # arduino uno runs at 9600 baud
ser = serial.Serial(arduino_port, baud)
print("Connected to... | 30.183099 | 77 | 0.55623 |
4a9ff5208b1a3ee31ec774f5e8cb73cd4e345612 | 38,764 | py | Python | trax/data/inputs.py | piotrekp1/trax | 568d0862c47a8f7a1b36cedacc0a0b99f607869f | [
"Apache-2.0"
] | null | null | null | trax/data/inputs.py | piotrekp1/trax | 568d0862c47a8f7a1b36cedacc0a0b99f607869f | [
"Apache-2.0"
] | null | null | null | trax/data/inputs.py | piotrekp1/trax | 568d0862c47a8f7a1b36cedacc0a0b99f607869f | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2021 The Trax 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 a... | 39.314402 | 81 | 0.693066 |
3474ede8446fe4aed959d378830b3b0f8dfddca9 | 1,225 | py | Python | src/shipment_tracker/providers/bring.py | SEQUOIIA/shipment-tracker | 9a2b9fdf672a0b123c162cb57d11fbf35c7ac08b | [
"MIT"
] | 1 | 2020-01-03T15:31:38.000Z | 2020-01-03T15:31:38.000Z | src/shipment_tracker/providers/bring.py | SEQUOIIA/shipment-tracker | 9a2b9fdf672a0b123c162cb57d11fbf35c7ac08b | [
"MIT"
] | 1 | 2019-01-06T23:37:51.000Z | 2019-02-03T15:45:58.000Z | src/shipment_tracker/providers/bring.py | SEQUOIIA/shipment-tracker | 9a2b9fdf672a0b123c162cb57d11fbf35c7ac08b | [
"MIT"
] | null | null | null | from shipment_tracker.provider.provider import Provider, ShipmentProgress
import requests, time
class Bring(Provider):
@staticmethod
def getProgress(shippingCode):
req = requests.Request('GET', 'https://tracking.bring.dk/tracking/api/fetch/{trackingnumber}?lang=da'.format(trackingnumber=shippingCode),
... | 42.241379 | 146 | 0.608163 |
ef833c7491ed03d4f42379fe17f9aa50b24616fc | 4,704 | py | Python | experiments/GTNC_visualize_cmc_compare_reward_envs.py | automl/learning_environments | c1c7cec4506ba140b19c215f4bf7a8bd222b32a0 | [
"MIT"
] | 11 | 2021-02-06T15:26:12.000Z | 2022-03-05T11:24:17.000Z | experiments/GTNC_visualize_cmc_compare_reward_envs.py | automl/learning_environments | c1c7cec4506ba140b19c215f4bf7a8bd222b32a0 | [
"MIT"
] | 2 | 2022-02-10T00:01:37.000Z | 2022-03-12T01:07:59.000Z | experiments/GTNC_visualize_cmc_compare_reward_envs.py | automl/learning_environments | c1c7cec4506ba140b19c215f4bf7a8bd222b32a0 | [
"MIT"
] | 1 | 2022-03-14T02:37:48.000Z | 2022-03-14T02:37:48.000Z | import os
import matplotlib.pyplot as plt
import numpy as np
import torch
AUC = True
if AUC:
LOG_FILES = [
'../results/3_rn_auc/cmc_compare_reward_envs/best1.pt',
'../results/3_rn_auc/cmc_compare_reward_envs/best2.pt',
'../results/3_rn_auc/cmc_compare_reward_envs/best5.pt',
... | 33.361702 | 107 | 0.641369 |
5e4264a824b8b767132c14ace0ab1f54f6a867cc | 440 | py | Python | src/data/download_data.py | juliahammes/ambev_estudos_ISL | d94f0519427a6a96096c41976d8ad2b3c6fbfe19 | [
"MIT"
] | 3 | 2020-04-22T12:30:45.000Z | 2021-02-19T20:48:32.000Z | src/data/download_data.py | juliahammes/ambev_estudos_ISL | d94f0519427a6a96096c41976d8ad2b3c6fbfe19 | [
"MIT"
] | 1 | 2020-07-08T16:42:06.000Z | 2020-07-08T16:42:06.000Z | src/data/download_data.py | juliahammes/ambev_estudos_ISL | d94f0519427a6a96096c41976d8ad2b3c6fbfe19 | [
"MIT"
] | 7 | 2020-05-06T11:53:05.000Z | 2021-06-07T21:54:50.000Z | import requests
def download_all(input_path='../../data/raw/urls.csv', output_path='../../data/raw/'):
with open(input_path) as f:
urls = f.read().splitlines()
for url in urls:
req = requests.get(url)
url_content = req.content
csv_file = open(output_path+url.split("/")[-1].lowe... | 25.882353 | 86 | 0.606818 |
a50e20876f26c23c1792ed7f1d017ff63c4dec96 | 2,789 | py | Python | packages/w3af/w3af/plugins/tests/grep/test_file_upload.py | ZooAtmosphereGroup/HelloPackages | 0ccffd33bf927b13d28c8f715ed35004c33465d9 | [
"Apache-2.0"
] | 3 | 2019-04-09T22:59:33.000Z | 2019-06-14T09:23:24.000Z | tools/w3af/w3af/plugins/tests/grep/test_file_upload.py | sravani-m/Web-Application-Security-Framework | d9f71538f5cba6fe1d8eabcb26c557565472f6a6 | [
"MIT"
] | null | null | null | tools/w3af/w3af/plugins/tests/grep/test_file_upload.py | sravani-m/Web-Application-Security-Framework | d9f71538f5cba6fe1d8eabcb26c557565472f6a6 | [
"MIT"
] | null | null | null | """
test_file_upload.py
Copyright 2012 Andres Riancho
This file is part of w3af, http://w3af.org/ .
w3af 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 version 2 of the License.
w3af is distributed in the hope... | 37.689189 | 74 | 0.682682 |
110e7934a979ff24753092f590f86af68e274f75 | 554 | py | Python | map-and-lambda-expression.py | nabin-info/hackerrank.com | da66a470d2e97a093821bfe41eb233d51784b9cc | [
"MIT"
] | null | null | null | map-and-lambda-expression.py | nabin-info/hackerrank.com | da66a470d2e97a093821bfe41eb233d51784b9cc | [
"MIT"
] | null | null | null | map-and-lambda-expression.py | nabin-info/hackerrank.com | da66a470d2e97a093821bfe41eb233d51784b9cc | [
"MIT"
] | null | null | null | #!/usr/bin/python
import sys
def fib_recursive(n):
if n < 2: return n
else: return fib(n-2) + fib(n-1)
def fib_generator():
n2, n1 = 0, 1
while True:
yield n2
n2, n1 = n1, n2+n1
N = int(raw_input().strip())
fib = fib_generator()
cube = lambda x: x ** 3
fibs = map(lambda x: fib.next... | 14.972973 | 44 | 0.523466 |
5144a6a46e4dcf56585063cc88729f5c6901e296 | 1,035 | py | Python | django_auto_filter/filter_for_models.py | weijia/django-auto-filter | 9265c350ff09b39d9343a77d7b70ed5270b0acdf | [
"BSD-3-Clause"
] | null | null | null | django_auto_filter/filter_for_models.py | weijia/django-auto-filter | 9265c350ff09b39d9343a77d7b70ed5270b0acdf | [
"BSD-3-Clause"
] | null | null | null | django_auto_filter/filter_for_models.py | weijia/django-auto-filter | 9265c350ff09b39d9343a77d7b70ed5270b0acdf | [
"BSD-3-Clause"
] | null | null | null | from django.conf.urls import patterns, url
from django.contrib.auth.decorators import login_required
from django_auto_filter.views_django_auto_filter import DjangoAutoFilter
from djangoautoconf.model_utils.model_attr_utils import model_enumerator
from ufs_tools.string_tools import class_name_to_low_case
def add_filt... | 39.807692 | 96 | 0.711111 |
34c2d238f433ba0c9f02eae2753f5fce93293554 | 144,635 | py | Python | pyftpdlib/handlers.py | cclauss/pyftpdlib | b2f078cabe3b6a9ca0129dada516c1396c8477b9 | [
"MIT"
] | 69 | 2015-12-28T07:02:51.000Z | 2022-03-31T13:36:42.000Z | pyftpdlib/handlers.py | cclauss/pyftpdlib | b2f078cabe3b6a9ca0129dada516c1396c8477b9 | [
"MIT"
] | 23 | 2016-03-04T10:43:24.000Z | 2021-03-17T09:58:19.000Z | pyftpdlib/handlers.py | cclauss/pyftpdlib | b2f078cabe3b6a9ca0129dada516c1396c8477b9 | [
"MIT"
] | 24 | 2016-02-29T11:45:47.000Z | 2021-12-24T08:41:37.000Z | # Copyright (C) 2007 Giampaolo Rodola' <g.rodola@gmail.com>.
# Use of this source code is governed by MIT license that can be
# found in the LICENSE file.
import asynchat
import contextlib
import errno
import glob
import logging
import os
import random
import socket
import sys
import time
import traceback
import warni... | 39.636887 | 79 | 0.562962 |
8ced51f25bde4ec3ad5b0500693bb43ad47bd75a | 4,891 | py | Python | BaseTools/Source/Python/Ecc/CodeFragment.py | nicklela/edk2 | dfafa8e45382939fb5dc78e9d37b97b500a43613 | [
"Python-2.0",
"Zlib",
"BSD-2-Clause",
"MIT",
"BSD-2-Clause-Patent",
"BSD-3-Clause"
] | 3,861 | 2019-09-04T10:10:11.000Z | 2022-03-31T15:46:28.000Z | BaseTools/Source/Python/Ecc/CodeFragment.py | nicklela/edk2 | dfafa8e45382939fb5dc78e9d37b97b500a43613 | [
"Python-2.0",
"Zlib",
"BSD-2-Clause",
"MIT",
"BSD-2-Clause-Patent",
"BSD-3-Clause"
] | 1,199 | 2015-01-12T08:00:01.000Z | 2022-03-29T18:14:42.000Z | BaseTools/Source/Python/Ecc/CodeFragment.py | nicklela/edk2 | dfafa8e45382939fb5dc78e9d37b97b500a43613 | [
"Python-2.0",
"Zlib",
"BSD-2-Clause",
"MIT",
"BSD-2-Clause-Patent",
"BSD-3-Clause"
] | 1,850 | 2015-01-01T11:28:12.000Z | 2022-03-31T18:10:59.000Z | ## @file
# fragments of source file
#
# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
## The description of comment contents and start & end position
#
#
class Comment :
## The constructor
#
# @param self ... | 30.56875 | 95 | 0.576978 |
6f86ec3d2536cd7e22e34d49bc2eee7c9eaeee7e | 1,813 | py | Python | qtconsole/kernel_mixins.py | KDAB/qtconsole | 89ea72e419e3fe28138a43d1820c3b23a88b5778 | [
"BSD-3-Clause"
] | 603 | 2020-12-23T13:49:32.000Z | 2022-03-31T23:38:03.000Z | qtconsole/kernel_mixins.py | KDAB/qtconsole | 89ea72e419e3fe28138a43d1820c3b23a88b5778 | [
"BSD-3-Clause"
] | 444 | 2015-05-07T22:48:51.000Z | 2022-03-31T07:30:39.000Z | qtconsole/kernel_mixins.py | KDAB/qtconsole | 89ea72e419e3fe28138a43d1820c3b23a88b5778 | [
"BSD-3-Clause"
] | 200 | 2015-05-08T23:25:26.000Z | 2022-03-29T18:36:25.000Z | """Defines a KernelManager that provides signals and slots."""
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
from qtpy import QtCore
from traitlets import HasTraits, Type
from .util import MetaQObjectHasTraits, SuperQObject
from .comms import CommManager
class... | 31.807018 | 93 | 0.608384 |
d70ca5c9f2b7623154ead5622b48c78bc732121e | 60 | py | Python | wifipumpkin3/_version.py | DuyTiger/nh | 39dc6fe29646e196a6dc136073c9cd47c7fd48eb | [
"Apache-2.0"
] | 35 | 2021-01-07T12:46:55.000Z | 2022-03-28T11:36:33.000Z | wifipumpkin3/_version.py | 5l1v3r1/wifi-pumpkin-v3.0 | 039601eabbbec18ffeb6f44e40b2bcab2d40502b | [
"Apache-2.0"
] | null | null | null | wifipumpkin3/_version.py | 5l1v3r1/wifi-pumpkin-v3.0 | 039601eabbbec18ffeb6f44e40b2bcab2d40502b | [
"Apache-2.0"
] | 11 | 2021-02-08T18:32:04.000Z | 2022-03-06T11:01:44.000Z | __version__ = "1.0.8"
__codename__ = "JACI"
__branch__ = ""
| 15 | 21 | 0.666667 |
ed7be58383d8e6cff9f0e039f9f829b27dcf305f | 1,400 | py | Python | plotting.py | dusansimic/analiza-melanoma | f3566fddaa0906773b25df0c0d9a771dc8075f9f | [
"MIT"
] | null | null | null | plotting.py | dusansimic/analiza-melanoma | f3566fddaa0906773b25df0c0d9a771dc8075f9f | [
"MIT"
] | null | null | null | plotting.py | dusansimic/analiza-melanoma | f3566fddaa0906773b25df0c0d9a771dc8075f9f | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import numpy as np
from lister import *
def plotDataBar(dataList, title):
resultsLabels = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
y_pos, resultsList = getResultsList(dataList)
plt.bar(y_pos, resultsList, align='center')
plt.xticks(y_pos, resultsList)
plt.ylabel('Amount')
plt.title(title... | 26.415094 | 82 | 0.714286 |
ead65ddd697e9a9bd280e07ed35488486c4894a0 | 4,560 | py | Python | docs/examples/plot_pipeline_lightgbm.py | terrorizer1980/sklearn-onnx | 05b9e2a0f7309fb8a51ac409fe04b40ca3b45de0 | [
"MIT"
] | 1 | 2021-04-12T12:38:20.000Z | 2021-04-12T12:38:20.000Z | docs/examples/plot_pipeline_lightgbm.py | terrorizer1980/sklearn-onnx | 05b9e2a0f7309fb8a51ac409fe04b40ca3b45de0 | [
"MIT"
] | null | null | null | docs/examples/plot_pipeline_lightgbm.py | terrorizer1980/sklearn-onnx | 05b9e2a0f7309fb8a51ac409fe04b40ca3b45de0 | [
"MIT"
] | null | null | null | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
"""
.. _example-lightgbm:
Convert a pipeline with a LightGbm model
========================================
.. index:: LightGbm
*sklearn-onnx* only converts *scikit-learn* models into *ONNX*
but many libraries implement *s... | 30.198675 | 94 | 0.679386 |
a493b41d73b9ec26c43630ec37ec6943d9d74df6 | 3,010 | py | Python | tests/unit/modules/test_pw_group.py | markgras/salt | d66cd3c935533c63870b83228b978ce43e0ef70d | [
"Apache-2.0"
] | 3 | 2015-08-30T04:23:47.000Z | 2018-07-15T00:35:23.000Z | tests/unit/modules/test_pw_group.py | markgras/salt | d66cd3c935533c63870b83228b978ce43e0ef70d | [
"Apache-2.0"
] | 1 | 2017-07-10T21:44:39.000Z | 2017-07-10T21:44:39.000Z | tests/unit/modules/test_pw_group.py | markgras/salt | d66cd3c935533c63870b83228b978ce43e0ef70d | [
"Apache-2.0"
] | 1 | 2021-09-09T21:25:28.000Z | 2021-09-09T21:25:28.000Z | """
:codeauthor: Rupesh Tare <rupesht@saltstack.com>
"""
import salt.modules.pw_group as pw_group
import salt.utils.platform
from tests.support.mixins import LoaderModuleMockMixin
from tests.support.mock import MagicMock, patch
from tests.support.unit import TestCase, skipIf
class PwGroupTestCase(TestCase, Load... | 33.820225 | 79 | 0.583721 |
dcdbcaec45f436a19b20b32ed6eac0ffea71e508 | 1,321 | py | Python | tests/parsers/c_parser/include_tests.py | mehrdad-shokri/retdec-regression-tests-framework | 9c3edcd0a7bc292a0d5b5cbfb4315010c78d3bc3 | [
"MIT"
] | 21 | 2017-12-12T20:38:43.000Z | 2019-04-14T12:46:10.000Z | tests/parsers/c_parser/include_tests.py | mehrdad-shokri/retdec-regression-tests-framework | 9c3edcd0a7bc292a0d5b5cbfb4315010c78d3bc3 | [
"MIT"
] | 6 | 2018-01-06T13:32:23.000Z | 2018-09-14T15:09:11.000Z | tests/parsers/c_parser/include_tests.py | mehrdad-shokri/retdec-regression-tests-framework | 9c3edcd0a7bc292a0d5b5cbfb4315010c78d3bc3 | [
"MIT"
] | 11 | 2017-12-12T20:38:46.000Z | 2018-07-19T03:12:03.000Z | """
Tests for the :module`regression_tests.parsers.c_parser.include` module.
"""
import unittest
from regression_tests.parsers.c_parser.include import Include
class IncludeTests(unittest.TestCase):
"""Tests for `Include`."""
def test_whitespace_before_and_after_include_is_stripped(self):
includ... | 34.763158 | 76 | 0.693414 |
c78900e6eecab078f321438c2b99f49a7c3f9637 | 1,034 | py | Python | setup.py | Myfanily123456/DecryptLogin | bf11dde3430b3b64ed59d3487803baac48685d4d | [
"MIT"
] | 1 | 2022-02-23T11:58:57.000Z | 2022-02-23T11:58:57.000Z | setup.py | Myfanily123456/DecryptLogin | bf11dde3430b3b64ed59d3487803baac48685d4d | [
"MIT"
] | null | null | null | setup.py | Myfanily123456/DecryptLogin | bf11dde3430b3b64ed59d3487803baac48685d4d | [
"MIT"
] | null | null | null | '''
Function:
setup
Author:
Charles
微信公众号:
Charles的皮卡丘
GitHub:
https://github.com/CharlesPikachu
更新日期:
2022-02-08
'''
import DecryptLogin
from setuptools import setup, find_packages
'''readme'''
with open('README.md', 'r', encoding='utf-8') as f:
long_description = f.read()
'''setup'''
setup... | 24.046512 | 69 | 0.693424 |
11304222aa5d5a463d03b6a9048a9d685121981a | 580 | py | Python | blog/migrations/0005_auto_20200229_1657.py | zxins/dblog | 8fe92cc6bec628c2e8869ab625e14b8c3da547f1 | [
"MIT"
] | null | null | null | blog/migrations/0005_auto_20200229_1657.py | zxins/dblog | 8fe92cc6bec628c2e8869ab625e14b8c3da547f1 | [
"MIT"
] | 6 | 2020-02-27T04:34:13.000Z | 2022-02-10T10:26:19.000Z | blog/migrations/0005_auto_20200229_1657.py | zxins/dblog | 8fe92cc6bec628c2e8869ab625e14b8c3da547f1 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.10 on 2020-02-29 16:57
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('blog', '0004_auto_20200227_1703'),
]
operations = [
migrations.AlterModelOptions(
name='post',
options={'ordering':... | 25.217391 | 103 | 0.587931 |
e2779f5e0977aef5361315a0fdede25103b5755e | 5,376 | py | Python | Pytorch/Scratch CNN and Pytorch/part2-pytorch/models/resnet.py | Kuga23/Deep-Learning | 86980338208c702b6bfcbcfffdb18498e389a56b | [
"MIT"
] | 3 | 2022-01-16T14:46:57.000Z | 2022-02-20T22:40:16.000Z | Pytorch/Scratch CNN and Pytorch/part2-pytorch/models/resnet.py | Kuga23/Deep-Learning | 86980338208c702b6bfcbcfffdb18498e389a56b | [
"MIT"
] | null | null | null | Pytorch/Scratch CNN and Pytorch/part2-pytorch/models/resnet.py | Kuga23/Deep-Learning | 86980338208c702b6bfcbcfffdb18498e389a56b | [
"MIT"
] | 6 | 2021-09-29T11:42:37.000Z | 2022-02-02T02:33:51.000Z | '''
Properly implemented ResNet for CIFAR10 as described in paper [1].
The implementation and structure of this file is hugely influenced by [2]
which is implemented for ImageNet and doesn't have option A for identity.
Moreover, most of the implementations on the web is copy-paste from
torchvision's resnet and has wron... | 32.780488 | 120 | 0.630394 |
4e023453555e2966058e6e7e2f0996acc79ba356 | 2,747 | py | Python | src/topos-theme/topos-theme/conf.py | mgeier/sphinx-themes.org | 5c057b569e4084ac061692f0bae3685fc4267c80 | [
"BSD-2-Clause"
] | null | null | null | src/topos-theme/topos-theme/conf.py | mgeier/sphinx-themes.org | 5c057b569e4084ac061692f0bae3685fc4267c80 | [
"BSD-2-Clause"
] | null | null | null | src/topos-theme/topos-theme/conf.py | mgeier/sphinx-themes.org | 5c057b569e4084ac061692f0bae3685fc4267c80 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))
# -- Project information -----------------------------------------------------
project = 'Sphinx-Themes template'
copyright = '2018, sphinx-themes.org'
author = 'sphinx-themes.org'
# The short X.Y version
version = ''
# Th... | 30.522222 | 78 | 0.689115 |
293c63d9603c7988540b1187fbc86effb2413187 | 342 | py | Python | leetcode/count-the-number-of-consistent-strings.py | gat786/coding-practice | 6c647d9d7b71c70818bbb7e175a7c6e3e3663084 | [
"MIT"
] | 1 | 2021-11-09T10:25:12.000Z | 2021-11-09T10:25:12.000Z | leetcode/count-the-number-of-consistent-strings.py | gat786/coding-practice | 6c647d9d7b71c70818bbb7e175a7c6e3e3663084 | [
"MIT"
] | null | null | null | leetcode/count-the-number-of-consistent-strings.py | gat786/coding-practice | 6c647d9d7b71c70818bbb7e175a7c6e3e3663084 | [
"MIT"
] | null | null | null | class Solution:
def countConsistentStrings(self, allowed: str, words: List[str]) -> int:
allowedSet = set([x for x in allowed])
wordsSetList = [set([x for x in word]) for word in words]
count = 0
for i in wordsSetList:
if i - allowedSet == set():
count += ... | 38 | 76 | 0.55848 |
9b0cd4c4e4b46a2cabad466cb5f8776b3b29256e | 3,998 | py | Python | kubernetes_asyncio/client/api/admissionregistration_api.py | aK0nshin/kubernetes_asyncio | aef9edcc1f8671a5b1bba9f4684bde890176b19c | [
"Apache-2.0"
] | null | null | null | kubernetes_asyncio/client/api/admissionregistration_api.py | aK0nshin/kubernetes_asyncio | aef9edcc1f8671a5b1bba9f4684bde890176b19c | [
"Apache-2.0"
] | null | null | null | kubernetes_asyncio/client/api/admissionregistration_api.py | aK0nshin/kubernetes_asyncio | aef9edcc1f8671a5b1bba9f4684bde890176b19c | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: v1.14.7
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import re # noqa: F401
# p... | 32.770492 | 124 | 0.624562 |
9c455cfa2cd608c1b1f99ac3cfa6e551ca6ec8d6 | 2,635 | py | Python | alttprbot_srl/racebot.py | floresmatthew/sahasrahbot | a3fcc2aba9cd204331ce612ecf269d8a48a1ebc4 | [
"MIT"
] | null | null | null | alttprbot_srl/racebot.py | floresmatthew/sahasrahbot | a3fcc2aba9cd204331ce612ecf269d8a48a1ebc4 | [
"MIT"
] | null | null | null | alttprbot_srl/racebot.py | floresmatthew/sahasrahbot | a3fcc2aba9cd204331ce612ecf269d8a48a1ebc4 | [
"MIT"
] | null | null | null | import asyncio
import re
import logging
from alttprbot.database import srl_races
# from alttprbot.tournament import league
from alttprbot.util.srl import srl_race_id
from config import Config as c
starting = re.compile(
"\\x034\\x02The race will begin in 10 seconds!\\x03\\x02")
go = re.compile("\\x034\\x02GO!\\x0... | 34.220779 | 200 | 0.650854 |
c24b0dab2a4fc5ad6f6f8b01a0b583d7b9609647 | 3,444 | py | Python | bot.py | Ghostbird/BUKrc20-telegram-bot | 771daf8608b962e33c968461783aa58ed5177b7e | [
"MIT"
] | 24 | 2020-12-30T11:12:49.000Z | 2022-03-28T11:10:04.000Z | bot.py | Ghostbird/BUKrc20-telegram-bot | 771daf8608b962e33c968461783aa58ed5177b7e | [
"MIT"
] | 1 | 2021-09-20T09:39:51.000Z | 2021-09-23T08:03:47.000Z | bot.py | Ghostbird/BUKrc20-telegram-bot | 771daf8608b962e33c968461783aa58ed5177b7e | [
"MIT"
] | 10 | 2021-01-24T15:06:12.000Z | 2022-01-03T10:43:23.000Z | #!/usr/bin/env python3
import re
import os
from telegram import Update, InlineKeyboardButton, InlineKeyboardMarkup
from telegram.ext import Updater, CommandHandler, CallbackContext, MessageHandler, Filters, CallbackQueryHandler, PicklePersistence
# This function replies with 'Hello <user.first_name>'
def hello(update:... | 42 | 131 | 0.720964 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.