content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
from flask import Flask import os # The __name__ variable passed to the Flask class is a Python predefined # variable, which is set to the name of the module in which it is used. app = Flask(__name__) from app import hello from app import getMessages from app import getMessage from app import addMessage from app impo...
[ 6738, 42903, 1330, 46947, 198, 11748, 28686, 198, 198, 2, 383, 11593, 3672, 834, 7885, 3804, 284, 262, 46947, 1398, 318, 257, 11361, 2747, 18156, 198, 2, 7885, 11, 543, 318, 900, 284, 262, 1438, 286, 262, 8265, 287, 543, 340, 318, 9...
4
84
import os import sys from PyQt5.QtWidgets import QMainWindow, QPushButton, QApplication, QLineEdit, QFileDialog, QMessageBox from new import report import argparse if __name__ == '__main__': grafic = argparse.ArgumentParser() grafic.add_argument('-link', help='Enter link to file from list families', type=str...
[ 11748, 28686, 198, 11748, 25064, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 54, 312, 11407, 1330, 1195, 13383, 27703, 11, 1195, 49222, 21864, 11, 1195, 23416, 11, 1195, 13949, 18378, 11, 1195, 8979, 44204, 11, 1195, 12837, 14253, 198, 6...
2.512438
201
# 编写ORM # 异步编程的一个原则:一旦决定使用异步,则系统每一层都必须是异步 # aiomysql 为mysql数据库提供了异步IO的驱动 # 1、创建连接池 # 创建一个全局的连接池,每个HTTP请求都可以从连接池中直接获取数据库连接 import logging; logging.basicConfig(level=logging.INFO) import asyncio ,aiomysql from aiohttp import web @asyncio.coroutine # select 语句 import syslog # size 获取多少条数据 如果传入size参数,就通过fetchman...
[ 198, 2, 13328, 120, 244, 37863, 247, 1581, 44, 198, 2, 10263, 120, 224, 29826, 98, 163, 120, 244, 163, 101, 233, 21410, 31660, 10310, 103, 43889, 253, 26344, 247, 171, 120, 248, 31660, 33768, 99, 37863, 111, 22522, 248, 45635, 18796, ...
1.034642
433
import pygame, sys, random from pygame.math import Vector2 pygame.init() # Cria a tela cellSize = 30 cellNum = 20 boardSize = cellNum * cellSize sc = pygame.display.set_mode((boardSize, boardSize)) clock = pygame.time.Clock() apple = pygame.image.load('images/apple.jpg').convert_alpha() mainGame = MA...
[ 11748, 12972, 6057, 11, 25064, 11, 4738, 198, 6738, 12972, 6057, 13, 11018, 1330, 20650, 17, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198, 9078, 6057, 13, 15003, 3419, 198, 198, 2, 327, 7496, 257, 256, 10304,...
1.988473
694
""" game.py - the exposed game system. """ from ast import literal_eval import configparser from configparser import DuplicateSectionError, DuplicateOptionError from keyplayer import KeyPlayer import sys import time class Label: """Label - helper class for on-screen labels""" def __init__(self, description, r...
[ 37811, 198, 6057, 13, 9078, 532, 262, 7362, 983, 1080, 13, 198, 37811, 198, 6738, 6468, 1330, 18875, 62, 18206, 198, 11748, 4566, 48610, 198, 6738, 4566, 48610, 1330, 49821, 5344, 16375, 12331, 11, 49821, 5344, 19722, 12331, 198, 6738, ...
2.14569
3,631
from torchvision import datasets, transforms from model_ops.lenet import LeNet, LeNetSplit from model_ops.resnet import * from model_ops.resnet_split import *
[ 6738, 28034, 10178, 1330, 40522, 11, 31408, 198, 198, 6738, 2746, 62, 2840, 13, 11925, 316, 1330, 1004, 7934, 11, 1004, 7934, 41205, 198, 6738, 2746, 62, 2840, 13, 411, 3262, 1330, 1635, 198, 6738, 2746, 62, 2840, 13, 411, 3262, 62, ...
3.533333
45
# from index import db # from dotenv import load_dotenv # import os # load_dotenv() # take environment variables from .env. # import pandas as pd # from augie_facts import augie_facts # def create_augie_facts_db(): # augie_facts_df = pd.DataFrame({ # 'Augie Facts': augie_facts # }) # augie_facts_...
[ 2, 422, 6376, 1330, 20613, 198, 2, 422, 16605, 24330, 1330, 3440, 62, 26518, 24330, 198, 2, 1330, 28686, 198, 2, 3440, 62, 26518, 24330, 3419, 220, 1303, 1011, 2858, 9633, 422, 764, 24330, 13, 198, 198, 2, 1330, 19798, 292, 355, 279...
2.42803
264
import mro.connection import mro.helpers import collections
[ 11748, 285, 305, 13, 38659, 198, 11748, 285, 305, 13, 16794, 364, 198, 11748, 17268, 628, 198 ]
3.647059
17
if __name__ == '__main__': from collections import Counter Cant_Zapatos= int(input("Ingrese cantidad de zapatillas en stock: ")) Talles_Zapatos= Counter(map(int, input("ingrese talle de zapatillas: ").split())) Cant_Clientes= int(input("ingrese cantidad de clientes: ")) Ganancia=0 for i in range(Can...
[ 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 422, 17268, 1330, 15034, 198, 220, 220, 198, 220, 16821, 62, 57, 499, 35492, 28, 493, 7, 15414, 7203, 27682, 260, 325, 18548, 32482, 390, 1976, 499, 265, 25314, 551, ...
2.293286
283
import torch import numpy as np import cv2 import matplotlib.pyplot as plt def draw_xywha(im, x, y, w, h, angle, color=(255,0,0), linewidth=5): ''' im: image numpy array, shape(h,w,3), RGB angle: degree ''' c, s = np.cos(angle/180*np.pi), np.sin(angle/180*np.pi) R = np.asarray([[c, s], [-s, c]...
[ 11748, 28034, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 269, 85, 17, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 628, 198, 4299, 3197, 62, 5431, 1929, 64, 7, 320, 11, 2124, 11, 331, 11, 266, 11, 289, 11, 98...
1.879545
1,760
#!/usr/bin/env python3 """ This module contains function to convert an alias config file an/or an alias into regular expressions for matching purposes""" from typing import Set, Text import re import sys def alias_set_from_config(config_file_name: Text) -> Set[Text]: """Read and parse a alias config file, add al...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 37811, 198, 1212, 8265, 4909, 2163, 284, 10385, 281, 16144, 4566, 2393, 281, 14, 273, 281, 16144, 656, 198, 16338, 14700, 329, 12336, 4959, 37811, 198, 198, 6738, 19720, 1330, 5345, ...
2.404346
2,117
#!/usr/bin/env python3 import os from divis.flows import PIPELINE_FLOWS_ROOT from divis.macros import read_macros skips = ["R1", "R2", "TUMOR_BAM", "NORMAL_BAM", "RG"] adds = ["NORMAL_R1", "NORMAL_R2", "TUMOR_R1", "TUMOR_R2", "PLATFORM"] if __name__ == "__main__": main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 28686, 198, 6738, 2659, 271, 13, 44041, 1330, 350, 4061, 3698, 8881, 62, 3697, 22845, 62, 13252, 2394, 198, 6738, 2659, 271, 13, 20285, 4951, 1330, 1100, 62, 20285, 4951, 19...
2.145038
131
import json from StringIO import StringIO from axiom.store import Store from eliot.testing import LoggedAction, assertContainsFields, capture_logging from twisted.trial.unittest import SynchronousTestCase from twisted.web import http from twisted.web.client import FileBodyProducer, readBody from fusion_index.logging ...
[ 11748, 33918, 198, 6738, 10903, 9399, 1330, 10903, 9399, 198, 198, 6738, 7877, 29005, 13, 8095, 1330, 9363, 198, 6738, 1288, 5151, 13, 33407, 1330, 50098, 12502, 11, 6818, 4264, 1299, 15878, 82, 11, 8006, 62, 6404, 2667, 198, 6738, 1907...
2.12719
8,161
import KratosMultiphysics import KratosMultiphysics.StructuralMechanicsApplication as StructuralMechanicsApplication from KratosMultiphysics.StructuralMechanicsApplication.structural_mechanics_analysis import StructuralMechanicsAnalysis import KratosMultiphysics.KratosUnittest as KratosUnittest try: import scipy ...
[ 11748, 509, 10366, 418, 15205, 13323, 23154, 198, 198, 11748, 509, 10366, 418, 15205, 13323, 23154, 13, 44909, 1523, 28452, 272, 873, 23416, 355, 32112, 1523, 28452, 272, 873, 23416, 198, 6738, 509, 10366, 418, 15205, 13323, 23154, 13, 44...
3.15261
249
# Copyright (c) 2019-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. # #TOFILL if __name__ == '__main__': param = [ ([4, 7, 19, 16],4,3), ([4,4,4,4,4],5,3), ([0,0,0,0,0,0,0,0,0,0,0,0,...
[ 2, 15069, 357, 66, 8, 13130, 12, 25579, 11, 3203, 11, 3457, 13, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 770, 2723, 2438, 318, 11971, 739, 262, 5964, 1043, 287, 262, 198, 2, 38559, 24290, 2393, 287, 262, 6808, 8619, 286, 4...
1.621477
745
# Copyright (c) 2013 Shotgun Software Inc. # # CONFIDENTIAL AND PROPRIETARY # # This work is provided "AS IS" and subject to the Shotgun Pipeline Toolkit # Source Code License included in this distribution package. See LICENSE. # By accessing, using, copying or modifying this work you indicate your # agreement to t...
[ 2, 15069, 357, 66, 8, 2211, 34198, 10442, 3457, 13, 198, 2, 220, 198, 2, 7102, 37, 25256, 12576, 5357, 4810, 3185, 7112, 2767, 13153, 198, 2, 220, 198, 2, 770, 670, 318, 2810, 366, 1921, 3180, 1, 290, 2426, 284, 262, 34198, 37709,...
2.226109
6,404
from flask import Flask, escape, redirect, render_template, request, url_for from zno import getInfo app = Flask(__name__) @app.route('/') @app.route('/search', methods=["GET", "POST"]) # TODO rebuild URL to correct title @app.route("/title/<title>") # TODO authenticate this @app.route('/api/title/<title>') ...
[ 6738, 42903, 1330, 46947, 11, 6654, 11, 18941, 11, 8543, 62, 28243, 11, 2581, 11, 19016, 62, 1640, 198, 198, 6738, 1976, 3919, 1330, 651, 12360, 198, 198, 1324, 796, 46947, 7, 834, 3672, 834, 8, 628, 198, 31, 1324, 13, 38629, 10786,...
2.842975
121
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="cilog", version="1.2.1", author="Shurui Gui", author_email="citrinegui@gmail.com", entry_points={ 'console_scripts': [ 'cilog=cilog.launcher:launcher' ...
[ 11748, 900, 37623, 10141, 201, 198, 201, 198, 4480, 1280, 7203, 15675, 11682, 13, 9132, 1600, 366, 81, 4943, 355, 277, 71, 25, 201, 198, 220, 220, 220, 890, 62, 11213, 796, 277, 71, 13, 961, 3419, 201, 198, 201, 198, 2617, 37623, ...
2.311295
363
""" *Repeat* """ import jax.numpy as jnp from ._operator import Manipulation __all__ = ["Pad"]
[ 37811, 628, 220, 220, 220, 1635, 40322, 9, 198, 198, 37811, 198, 198, 11748, 474, 897, 13, 77, 32152, 355, 474, 37659, 198, 198, 6738, 47540, 46616, 1330, 35045, 1741, 198, 198, 834, 439, 834, 796, 14631, 26114, 8973, 628 ]
2.625
40
#!/usr/bin/env python import sys from agate.data_types import Text from agate.table import Table def print_structure(self, max_rows=20, output=sys.stdout): """ Print the keys and row counts of each table in the tableset. :param max_rows: The maximum number of rows to display before truncating t...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 25064, 198, 198, 6738, 556, 378, 13, 7890, 62, 19199, 1330, 8255, 198, 6738, 556, 378, 13, 11487, 1330, 8655, 628, 198, 4299, 3601, 62, 301, 5620, 7, 944, 11, 3509, 62, ...
2.667647
340
""" Router for Deployment routes """ import json import shlex import subprocess from os import path, scandir from shutil import rmtree from typing import Any, Dict, Set from fastapi import APIRouter, Depends, status from fastapi.encoders import jsonable_encoder from fastapi.exceptions import HTTPException from starle...
[ 37811, 198, 49, 39605, 329, 34706, 434, 11926, 198, 37811, 198, 198, 11748, 33918, 198, 11748, 427, 2588, 198, 11748, 850, 14681, 198, 6738, 28686, 1330, 3108, 11, 629, 392, 343, 198, 6738, 4423, 346, 1330, 374, 16762, 631, 198, 6738, ...
2.297267
3,549
""" MIT License Copyright (c) 2019-2021 naoTimesdev 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, publi...
[ 37811, 198, 36393, 13789, 198, 198, 15269, 357, 66, 8, 13130, 12, 1238, 2481, 299, 5488, 28595, 7959, 198, 198, 5990, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 198, 1659, 428, 3788, 290, 3917, ...
3.694767
344
''' a = [1,2,3,4,5,6,6,7,7,8,9,10,11,12,136,4,14,15] a[4:5] ''' #concatenação de listas ''' a = [1, 2, 3, 4] b = [5, 6, 7, 8] print(a + b) print(a) print(b) ''' #fim do exemplo de concatenação ''' b = [5, 6, 7, 8] b_triplicado = b * 3 print(b_triplicado) ''' ''' car...
[ 7061, 6, 201, 198, 201, 198, 64, 796, 685, 16, 11, 17, 11, 18, 11, 19, 11, 20, 11, 21, 11, 21, 11, 22, 11, 22, 11, 23, 11, 24, 11, 940, 11, 1157, 11, 1065, 11, 20809, 11, 19, 11, 1415, 11, 1314, 60, 201, 198, 201, 198, ...
1.640777
412
import numpy as np import time import tensorflow as tf import cv2 from darkflow.net.build import TFNet config = tf.ConfigProto(log_device_placement=True) config.gpu_option.allow_growth=True with tf.Session(config=config) as sess: options = { 'model' : 'cfg/yolo.cfg', 'load' : 'cfg/yolo.weights', ...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 640, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 269, 85, 17, 198, 6738, 3223, 11125, 13, 3262, 13, 11249, 1330, 24958, 7934, 198, 198, 11250, 796, 48700, 13, 16934, 2964, 1462, 7, ...
2.095532
649
#!/usr/bin/python """ Script for compiling Qt Designer .ui files to .py """ import os, sys, subprocess, tempfile pyqtuic = 'pyuic4' pysideuic = 'pyside-uic' pyqt5uic = 'pyuic5' pyside2uic = 'pyside2-uic' usage = """Compile .ui files to .py for all supported pyqt/pyside versions. Usage: python rebuildUi.py [--fo...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 37811, 198, 7391, 329, 33393, 33734, 31716, 764, 9019, 3696, 284, 764, 9078, 628, 198, 198, 37811, 198, 11748, 28686, 11, 25064, 11, 850, 14681, 11, 20218, 7753, 198, 198, 9078, 80, 28047, 29...
2.089606
837
""" Copyright 2014-2016 University of Illinois 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 writ...
[ 37811, 198, 15269, 1946, 12, 5304, 2059, 286, 9486, 198, 198, 26656, 15385, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 5832, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198,...
3.764368
348
import torch.nn as nn import torch.nn.functional as F
[ 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198 ]
3.176471
17
import argparse from os import listdir, mkdir from os.path import join, isdir from subprocess import call import sys import datasets from shutil import which """ Script to use pdftoppm to turn the pdfs into single images per page """ if __name__ == "__main__": parser = argparse.ArgumentParser(description='Cache...
[ 11748, 1822, 29572, 198, 6738, 28686, 1330, 1351, 15908, 11, 33480, 15908, 198, 6738, 28686, 13, 6978, 1330, 4654, 11, 318, 15908, 198, 6738, 850, 14681, 1330, 869, 198, 11748, 25064, 198, 11748, 40522, 198, 6738, 4423, 346, 1330, 543, ...
2.654155
373
# coding: utf-8 from __future__ import unicode_literals import pandas as pd from dframcy import utils class DframCy(object): """ Dataframe integration with spaCy's linguistic annotations. """ def __init__(self, nlp_pipeline): """ :param nlp_pipeline: nlp pipeline to be used (i.e. la...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 288, 19298, 948, 1330, 3384, 4487, 628, 198, 4871, 360, 19298, 20418, 7, 152...
2.237665
2,655
from discord.ext import commands from discord.ext.commands import Context from bashbot.command import has_permission, session_exists from bashbot.terminal.sessions import sessions
[ 6738, 36446, 13, 2302, 1330, 9729, 198, 6738, 36446, 13, 2302, 13, 9503, 1746, 1330, 30532, 198, 198, 6738, 27334, 13645, 13, 21812, 1330, 468, 62, 525, 3411, 11, 6246, 62, 1069, 1023, 198, 6738, 27334, 13645, 13, 23705, 282, 13, 82, ...
3.956522
46
fob[1] = 2 fob.oar = 1 fob = 1 (fob) = 1 (fob, oar) = 1, 2 fob, oar = 1, 2 fob, oar = baz [fob, oar] = 1, 2 [fob, oar] = baz fob = oar = baz
[ 69, 672, 58, 16, 60, 796, 362, 198, 69, 672, 13, 78, 283, 796, 352, 198, 69, 672, 796, 352, 198, 7, 69, 672, 8, 796, 352, 198, 7, 69, 672, 11, 267, 283, 8, 796, 352, 11, 362, 198, 69, 672, 11, 267, 283, 796, 352, 11, 362...
1.549451
91
from z import get_z_values
[ 6738, 1976, 1330, 651, 62, 89, 62, 27160, 628, 628 ]
3
10
# -*- coding:utf-8 -*- # author: hpf # create time: 2020/6/5 10:32 # file: __init__.py # IDE: PyCharm import os import logging import click from flask import Flask from logging.handlers import TimedRotatingFileHandler from seagull.settings import config, basedir from seagull.extensions import db, migrate, ma from seag...
[ 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 2, 1772, 25, 27673, 69, 198, 2, 2251, 640, 25, 12131, 14, 21, 14, 20, 838, 25, 2624, 198, 2, 2393, 25, 11593, 15003, 834, 13, 9078, 198, 2, 33497, 25, 9485, 1925, 167...
2.91129
124
a = 1 print("hello world in docker container", s) l = ["apple", "banana"]
[ 64, 796, 352, 198, 4798, 7203, 31373, 995, 287, 36253, 9290, 1600, 264, 8, 198, 75, 796, 14631, 18040, 1600, 366, 3820, 2271, 8973, 628, 198 ]
2.923077
26
import multidict as multidict import numpy as np import os import lxml import re from PIL import Image from wordcloud import WordCloud import matplotlib.pyplot as plt import pandas as pd from flask import Flask, render_template, request import subprocess from bs4 import BeautifulSoup import csv import requests import t...
[ 11748, 1963, 312, 713, 355, 1963, 312, 713, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 11748, 300, 19875, 198, 11748, 302, 198, 6738, 350, 4146, 1330, 7412, 198, 6738, 1573, 17721, 1330, 9678, 18839, 198, 11748, 2603, 2...
2.749104
558
# Copyright (c) OpenMMLab. All rights reserved. from .deploy import MMPose, PoseDetection from .models import * # noqa: F401,F403 __all__ = ['MMPose', 'PoseDetection']
[ 2, 15069, 357, 66, 8, 4946, 44, 5805, 397, 13, 1439, 2489, 10395, 13, 198, 6738, 764, 2934, 1420, 1330, 337, 7378, 577, 11, 37557, 11242, 3213, 198, 6738, 764, 27530, 1330, 1635, 220, 1303, 645, 20402, 25, 376, 21844, 11, 37, 31552,...
2.786885
61
#!/bin/env python3 import os import settings if __name__ == '__main__': ZoneFileConverter().run() print("DONE")
[ 2, 48443, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 28686, 198, 198, 11748, 6460, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 13035, 8979, 3103, 332, 353, 22446, 5143, 3419, 198, 220...
2.5
50
#!/usr/bin/env # Problem: Finding A Maximum Sum Contiguous Sub Array From An Given List/Array.(Using Divide & Conquer) # Complexity, when "Divide & Conquer" method is used: O(n*log(n)) import math def max_crossing_subarray(given_array, start_index, mid_index, end_index): """Function To Calculate The Mid Crossing ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 198, 2, 20647, 25, 27063, 317, 22246, 5060, 2345, 29709, 3834, 15690, 3574, 1052, 11259, 7343, 14, 19182, 12195, 12814, 46894, 1222, 40963, 8, 198, 2, 19157, 414, 11, 618, 366, 24095, 485, 1222, 4...
2.576402
517
from typing import List from API.schema import SerializedSearchResult from django.http import HttpResponse, HttpResponseBadRequest, JsonResponse from .models import Wordform def click_in_text(request) -> HttpResponse: """ click-in-text api see SerializedSearchResult in schema.py for API specifications ...
[ 6738, 19720, 1330, 7343, 198, 198, 6738, 7824, 13, 15952, 2611, 1330, 23283, 1143, 18243, 23004, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 11, 367, 29281, 31077, 22069, 18453, 11, 449, 1559, 31077, 198, 6738, 764, 27530,...
3.017986
278
import argparse import datetime as dt import itertools import logging import sqlite3 import sys import time import typing as t import geocoder # Constants _LOGGER = logging.getLogger(__name__) # Location fetching # Database updating # Main # Script functionality if __name__ == '__main__': parser = _creat...
[ 11748, 1822, 29572, 198, 11748, 4818, 8079, 355, 288, 83, 198, 11748, 340, 861, 10141, 198, 11748, 18931, 198, 11748, 44161, 578, 18, 198, 11748, 25064, 198, 11748, 640, 198, 11748, 19720, 355, 256, 198, 198, 11748, 4903, 420, 12342, 19...
3.12234
188
#!/usr/bin/python3 import os, sys, re, requests, youtube_dl if __name__ == "__main__": if (len(sys.argv) < 2): exit("Enter url search query for download") url = sys.argv[1] save_path = '/'.join(os.getcwd().split('/')[:3]) + '/Music' ydl_opts = { 'format': 'bestaudio/best', 'postprocessors': [{...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 11748, 28686, 11, 25064, 11, 302, 11, 7007, 11, 35116, 62, 25404, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 611, 357, 11925, 7, 17597, 13, 853, ...
2.086076
395
from cliff.command import Command import call_server as server
[ 6738, 19516, 13, 21812, 1330, 9455, 198, 198, 11748, 869, 62, 15388, 355, 4382, 628 ]
4.333333
15
import csv from datetime import date school_list = [] number_of_schools = 4828 with open("csv/schoolsactivecovid.csv", "r", encoding = "ISO-8859-1") as data: data_reader = csv.reader(data) for row in data_reader: school = row[3] + "-" + row[2] if school not in school_list: school_l...
[ 11748, 269, 21370, 198, 6738, 4818, 8079, 1330, 3128, 198, 198, 14347, 62, 4868, 796, 17635, 198, 17618, 62, 1659, 62, 14347, 82, 796, 4764, 2078, 198, 198, 4480, 1280, 7203, 40664, 14, 14347, 82, 5275, 66, 709, 312, 13, 40664, 1600, ...
2.533074
257
from requests.auth import AuthBase # Provided by NewsCatcher: https://docs.newscatcherapi.com/api-docs/authentication
[ 6738, 7007, 13, 18439, 1330, 26828, 14881, 628, 220, 220, 220, 1303, 29750, 416, 3000, 21979, 2044, 25, 3740, 1378, 31628, 13, 3605, 1416, 34734, 15042, 13, 785, 14, 15042, 12, 31628, 14, 41299, 3299, 628 ]
3.444444
36
account = 100 interest_rate = 0.004 years = 3 print(f"Initial amount: {account}") counter = 1 while counter <= years: accrued_interest = account * interest_rate account += accrued_interest print(f"year {counter}: {account}") counter += 1
[ 23317, 796, 1802, 198, 9446, 62, 4873, 796, 657, 13, 22914, 198, 19002, 796, 513, 198, 198, 4798, 7, 69, 1, 24243, 2033, 25, 1391, 23317, 92, 4943, 198, 198, 24588, 796, 352, 198, 4514, 3753, 19841, 812, 25, 198, 220, 220, 220, 43...
3.035714
84
"""Extra classes for Bayesion optimization.""" import numpy as np import pandas as pd from bayes_opt import Events from bayes_opt.observer import _Tracker from sklearn.preprocessing import PowerTransformer class PandasLogger(_Tracker): """Logger for bayesian-optimization library.""" def __init__(self): ...
[ 37811, 27726, 6097, 329, 4696, 274, 295, 23989, 526, 15931, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 15489, 274, 62, 8738, 1330, 18715, 198, 6738, 15489, 274, 62, 8738, 13, 672, 15388, 1330, ...
2.04811
873
from django.core.management import BaseCommand from django.db import transaction from django.utils import translation from django.utils.module_loading import import_string from django.utils.timezone import now from django.utils.translation import ugettext as _ from monotonic import monotonic from poradnia.stats.models...
[ 6738, 42625, 14208, 13, 7295, 13, 27604, 1330, 7308, 21575, 198, 6738, 42625, 14208, 13, 9945, 1330, 8611, 198, 6738, 42625, 14208, 13, 26791, 1330, 11059, 198, 6738, 42625, 14208, 13, 26791, 13, 21412, 62, 25138, 1330, 1330, 62, 8841, ...
3.75
104
from selenium import webdriver # from selenium.webdriver.firefox.webdriver import WebDriver # from selenium.webdriver.chrome.webdriver import WebDriver from fixture.group import GroupHelper from fixture.session import SessionHelper from fixture.contact import ContactHelper # from fixture.new_user import NewUserHelper ...
[ 6738, 384, 11925, 1505, 1330, 3992, 26230, 198, 2, 422, 384, 11925, 1505, 13, 12384, 26230, 13, 6495, 12792, 13, 12384, 26230, 1330, 5313, 32103, 198, 2, 422, 384, 11925, 1505, 13, 12384, 26230, 13, 46659, 13, 12384, 26230, 1330, 5313, ...
3.613861
101
import sys input = sys.stdin.readline sys.setrecursionlimit(10 ** 7) x1, y1, x2, y2 = map(int, input().split()) x3 = x2 - (y2 - y1) y3 = y2 + (x2 - x1) x4 = x3 - (x2 - x1) y4 = y3 - (y2 - y1) print(x3, y3, x4, y4)
[ 11748, 25064, 198, 15414, 796, 25064, 13, 19282, 259, 13, 961, 1370, 198, 17597, 13, 2617, 8344, 24197, 32374, 7, 940, 12429, 767, 8, 198, 198, 87, 16, 11, 331, 16, 11, 2124, 17, 11, 331, 17, 796, 3975, 7, 600, 11, 5128, 22446, ...
1.815126
119
from settings import Direction, width from settings import walls_acceleration_coefficient, car_acceleration_coefficient class Receiver: """ Обработка принимаемых сообщений """
[ 6738, 6460, 1330, 41837, 11, 9647, 198, 6738, 6460, 1330, 7714, 62, 330, 7015, 341, 62, 1073, 16814, 11, 1097, 62, 330, 7015, 341, 62, 1073, 16814, 628, 198, 4871, 39106, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 12466, 252...
2.261905
84
# -*- coding: utf-8 -*- # 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 "Lic...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 393, 517, 198, 2, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 9387, 351, 198, 2, 428, 67...
3.801402
428
from .reaction import ReactionGateway
[ 6738, 764, 260, 2673, 1330, 39912, 22628, 1014 ]
4.625
8
import os import numpy as np import pandas as pd from shutil import copyfile from keras.preprocessing.image import load_img import PIL color_mode = "grayscale" classes = ["NORMAL","PNEUMONIA"] for class_ in classes: folder_orig = "."+os.sep+class_ folder_resiszed = "."+os.sep+class_+"_res" if ...
[ 11748, 28686, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 19798, 292, 355, 279, 67, 201, 198, 6738, 4423, 346, 1330, 4866, 7753, 201, 198, 6738, 41927, 292, 13, 3866, 36948, 13, 9060, 1330, 3440, 62, 9600, 201, 198, 1174...
2.222841
359
# -*- coding: utf-8 -*- # # Copyright (C) 2010-2016 PPMessage. # Guijin Ding, dingguijin@gmail.com # # All rights reserved # from ppmessage.db.models import FileInfo from ppmessage.core.redis import hash_row from tornado.web import StaticFileHandler import logging
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 357, 34, 8, 3050, 12, 5304, 350, 5868, 7589, 13, 198, 2, 1962, 2926, 259, 46980, 11, 44852, 5162, 2926, 259, 31, 14816, 13, 785, 198, 2, 198, 2, ...
2.923913
92
# Copyright 2021, Kay Hayen, mailto:kay.hayen@gmail.com # # Part of "Nuitka", an optimizing Python compiler that is compatible and # integrates with CPython, but also works on its own. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in complianc...
[ 2, 220, 220, 220, 220, 15069, 33448, 11, 17356, 9075, 268, 11, 6920, 1462, 25, 5568, 13, 71, 323, 268, 31, 14816, 13, 785, 198, 2, 198, 2, 220, 220, 220, 220, 2142, 286, 366, 45, 5013, 4914, 1600, 281, 45780, 11361, 17050, 326, ...
2.874106
699
import datetime import numpy as np from django.test import TestCase from standards_review.models import Molecule, Standard, Dataset, Adduct, Xic, FragmentationSpectrum # Create your tests here.
[ 11748, 4818, 8079, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 198, 6738, 5423, 62, 19023, 13, 27530, 1330, 25726, 23172, 11, 8997, 11, 16092, 292, 316, 11, 1215, 2359, 11, 1395, ...
3.457627
59
""" UIBezierPathGenerator """ from source.parser import Parser from source.point import Point, CoordinateSystem class WrongCoordinateSystem(Exception): """Exception for wrongs coordinate system being passed""" class UIBezierPathGenerator: """Generates swift code for UIBezierPath""" # Public methods ...
[ 37811, 198, 10080, 3856, 89, 959, 15235, 8645, 1352, 198, 37811, 198, 198, 6738, 2723, 13, 48610, 1330, 23042, 263, 198, 6738, 2723, 13, 4122, 1330, 6252, 11, 22819, 4559, 11964, 628, 198, 4871, 28843, 7222, 45480, 11964, 7, 16922, 2599...
2.274523
4,455
"""Represents executable entrypoint for `article` application.""" import os from dataclasses import dataclass from article import application @dataclass class Server: """A server entrypoint setup.""" host: str = "0.0.0.0" port: int = int(os.environ.get("PORT", 5001)) debug: bool = True def easyrun(...
[ 37811, 6207, 6629, 28883, 5726, 4122, 329, 4600, 20205, 63, 3586, 526, 15931, 198, 11748, 28686, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 6738, 2708, 1330, 3586, 628, 198, 31, 19608, 330, 31172, 198, 4871, 9652, 25, 198...
2.824121
199
# # Copyright 2017 Pixar # # Licensed under the Apache License, Version 2.0 (the "Apache License") # with the following modification; you may not use this file except in # compliance with the Apache License and the following modification to it: # Section 6. Trademarks. is deleted and replaced with: # # 6. Trademarks. T...
[ 2, 198, 2, 15069, 2177, 46706, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 25189, 4891, 13789, 4943, 198, 2, 351, 262, 1708, 17613, 26, 345, 743, 407, 779, 428, 2393, 2845, 287, 198, 2, ...
2.445164
2,161
from peerplays.instance import BlockchainInstance from .exceptions import BettingMarketDoesNotExistException from .blockchainobject import BlockchainObject, BlockchainObjects class BettingMarket(BlockchainObject): """ Read data about a Betting Market on the chain :param str identifier: Identifier ...
[ 6738, 12720, 26024, 13, 39098, 1330, 29724, 33384, 198, 6738, 764, 1069, 11755, 1330, 5147, 889, 27470, 13921, 3673, 3109, 396, 16922, 198, 6738, 764, 9967, 7983, 15252, 1330, 29724, 10267, 11, 29724, 10267, 82, 628, 198, 4871, 5147, 889,...
3.216749
203
from flask import ( Blueprint, render_template, url_for, session, request, make_response, redirect, flash ) from Telingo.auth import login_required from .db import Admin, Language, database, User home = Blueprint("home", __name__) @home.route('/') @home.route('/profile/<username>') #@login_required @home.rout...
[ 6738, 42903, 1330, 357, 198, 220, 220, 220, 39932, 11, 8543, 62, 28243, 11, 19016, 62, 1640, 11, 6246, 11, 2581, 11, 787, 62, 26209, 11, 18941, 11, 7644, 198, 8, 198, 198, 6738, 309, 10809, 78, 13, 18439, 1330, 17594, 62, 35827, 1...
3.07377
122
from color import get_color_from_screen_pixel,set_color_board from . import utils
[ 6738, 3124, 1330, 651, 62, 8043, 62, 6738, 62, 9612, 62, 32515, 11, 2617, 62, 8043, 62, 3526, 198, 6738, 764, 1330, 3384, 4487, 198 ]
3.28
25
# SPDX-License-Identifier: BSD-3-Clause from pathlib import Path from pytest import fixture, raises from twisted.cred.error import UnauthorizedLogin from softfab.timelib import setTime from softfab.tokens import ( Token, TokenDB, TokenRole, authenticateToken, resetTokenPassword ) from softfab.users import Creden...
[ 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 347, 10305, 12, 18, 12, 2601, 682, 198, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 6738, 12972, 9288, 1330, 29220, 11, 12073, 198, 6738, 19074, 13, 66, 445, 13, 18224, 1330, 791, 1972...
2.782007
867
from handlers import AdminAuthenticatedTemplateHandler import webapp2 from google.appengine.api import memcache, app_identity, users app = webapp2.WSGIApplication([ ('/tests', MainHandler), ('/tests/', MainHandler), ], debug=True)
[ 6738, 32847, 1330, 32053, 47649, 3474, 30800, 25060, 198, 11748, 3992, 1324, 17, 198, 6738, 23645, 13, 1324, 18392, 13, 15042, 1330, 1066, 23870, 11, 598, 62, 738, 414, 11, 2985, 198, 198, 1324, 796, 3992, 1324, 17, 13, 19416, 38, 353...
3.2
75
# -*- coding: utf-8 -*- import functools import logging import traceback import sys def only_one(function=None, key="", timeout=None): """Enforce only one celery task at a time.""" def _dec(run_func): """Decorator.""" def _caller(*args, **kwargs): """Caller.""" ret_v...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 1257, 310, 10141, 198, 11748, 18931, 198, 11748, 12854, 1891, 198, 11748, 25064, 628, 198, 4299, 691, 62, 505, 7, 8818, 28, 14202, 11, 1994, 2625, 1600, 2682...
2.238235
680
""" These functions are used to generate time series. """ import numpy as np from typing import Union, List, Optional import tensorflow as tf from keras.backend import floatx from ..utils import range_dims def random_ts( n_steps: int = 100, trend_degree: int = 2, periods: List[int] = [10], fourier_...
[ 37811, 198, 4711, 5499, 389, 973, 284, 7716, 640, 2168, 13, 198, 37811, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 19720, 1330, 4479, 11, 7343, 11, 32233, 198, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 41927, 292, ...
2.346349
1,972
txt = "Quick brown fox" mlist = [1, 2, 3, 9] # TODO move add to my utilities module
[ 14116, 796, 366, 21063, 7586, 21831, 1, 198, 4029, 396, 796, 685, 16, 11, 362, 11, 513, 11, 860, 60, 198, 198, 2, 16926, 46, 1445, 751, 284, 616, 20081, 8265, 628 ]
2.6875
32
from setuptools import setup, find_packages setup( name='fastotp', version='0.2.0', packages=find_packages(include=[ 'fastotp', ]) )
[ 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 201, 198, 201, 198, 40406, 7, 201, 198, 220, 220, 220, 1438, 11639, 7217, 313, 79, 3256, 201, 198, 220, 220, 220, 2196, 11639, 15, 13, 17, 13, 15, 3256, 201, 198, 220, 220,...
2.157895
76
import os import re import socket from contextlib import closing import logbook import pytest UNIX_SOCKET = "/tmp/__unixsock_logbook.test" DELIMITERS = { socket.AF_INET: '\n' } TO_TEST = [ (socket.AF_INET, socket.SOCK_DGRAM, ('127.0.0.1', 0)), (socket.AF_INET, socket.SOCK_STREAM, ('127.0.0.1', 0)), ] U...
[ 11748, 28686, 198, 11748, 302, 198, 11748, 17802, 198, 6738, 4732, 8019, 1330, 9605, 198, 198, 11748, 2604, 2070, 198, 11748, 12972, 9288, 198, 198, 4944, 10426, 62, 50, 11290, 2767, 796, 12813, 22065, 14, 834, 403, 844, 82, 735, 62, ...
2.152648
321
import asyncio import os from datetime import datetime from lib.ipc import async_rpc_server class Manager: """Manages shards. assigns shard nodes their ids and checks if they are alive""" async def register(self): """Returns the next shard id that needs to be filled as well as the total shards""" ...
[ 11748, 30351, 952, 198, 11748, 28686, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 6738, 9195, 13, 541, 66, 1330, 30351, 62, 81, 14751, 62, 15388, 628, 198, 4871, 9142, 25, 198, 220, 220, 220, 37227, 5124, 1095, 39991, 13, 220, ...
2.499363
785
from kornia.augmentation.augmentations import * __all__ = ["random_hflip", "RandomHorizontalFlip", "color_jitter", "ColorJitter"]
[ 6738, 479, 3317, 13, 559, 5154, 341, 13, 559, 5154, 602, 1330, 1635, 198, 198, 834, 439, 834, 796, 14631, 25120, 62, 71, 2704, 541, 1600, 366, 29531, 27991, 38342, 7414, 541, 1600, 366, 8043, 62, 73, 1967, 1600, 366, 10258, 41, 1967...
2.911111
45
# coding: utf-8 import sys, re, copy, pickle, os callConvertion = {"AERO_FP_CALL_CDECL" : "c_call", "AERO_FP_CALL_STDCALL" : "std_call", "AERO_FP_CALL_FASTCALL" : "fast_call", "" : "native_call"} if __name__ == "__main__": amount = int(sys.argv[1]) for cv in callConvertion: fn = callConvertion[cv] ...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 11748, 25064, 11, 302, 11, 4866, 11, 2298, 293, 11, 28686, 628, 198, 13345, 3103, 1851, 295, 796, 19779, 32, 34812, 62, 5837, 62, 34, 7036, 62, 8610, 2943, 43, 1, 1058, 366, 66, 62, 1334...
2.040359
223
import torch # import torch.nn as nn # import torch.nn.functional as F import numpy as np from torch.autograd import Variable # import torchwordemb import torch.optim as optim import sys import time import gc import pickle import os import models2 as m import enc_model as m3 # import pandas as pd # from util import *...
[ 11748, 28034, 198, 2, 1330, 28034, 13, 20471, 355, 299, 77, 198, 2, 1330, 28034, 13, 20471, 13, 45124, 355, 376, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 28034, 13, 2306, 519, 6335, 1330, 35748, 198, 2, 1330, 28034, 4775, 24419,...
2.214949
4,094
import numpy as np from src.utilities.imageAnalysis.pixelsRainStrengthConverter import PixelsRainStrengthConverter import os
[ 11748, 299, 32152, 355, 45941, 198, 198, 6738, 12351, 13, 315, 2410, 13, 9060, 32750, 13, 79, 14810, 31443, 45027, 3103, 332, 353, 1330, 350, 14810, 31443, 45027, 3103, 332, 353, 198, 11748, 28686, 198 ]
3.6
35
import tensorflow as tf from Keras import config_keras # local module import config # Deep learning # Keras-related imports from keras.models import Sequential from keras.layers import Lambda, Dense, Dropout, Activation, Flatten, LSTM from keras.layers import Convolution1D, MaxPooling2D, Convolution2D from keras import...
[ 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 17337, 292, 1330, 4566, 62, 6122, 292, 1303, 1957, 8265, 198, 11748, 4566, 198, 2, 10766, 4673, 198, 2, 17337, 292, 12, 5363, 17944, 198, 6738, 41927, 292, 13, 27530, 1330, 24604, 1843, ...
2.699507
812
#! /usr/bin/env python3 # -*- coding: utf-8 -*- # File : in.py # Author : Jiayuan Mao # Email : maojiayuan@gmail.com # Date : 02/03/2017 # # This file is part of Jacinle. # Distributed under terms of the MIT license. import time from jacinle.comm.distrib import DistribInputPipe, control from jacinle.utils.printi...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 9220, 220, 220, 1058, 287, 13, 9078, 198, 2, 6434, 1058, 29380, 323, 7258, 22828, 198, 2, 9570, 220, 1058,...
2.560811
148
from old.JsonConvert import JsonConvert, Formulae
[ 6738, 1468, 13, 41, 1559, 3103, 1851, 1330, 449, 1559, 3103, 1851, 11, 5178, 377, 3609, 198 ]
2.941176
17
from __future__ import absolute_import from __future__ import unicode_literals from django.utils.translation import ugettext as _ from couchdbkit import ResourceNotFound from corehq.apps.casegroups.models import CommCareCaseGroup from corehq.apps.hqcase.utils import get_case_by_identifier from corehq.form_processor.int...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 334, 1136, 5239, 355, 4808, 198, 6738, 18507, 9945, 15813, 1330, 20857, ...
3.570175
114
""" Module for exposing a (virtual) sensor to KNX bus. It provides functionality for * push local state changes to KNX bus * KNX devices may read local values via GROUP READ. (A typical example for using this class is the outside temperature read from e.g. an internet serviceand exposed to ths KNX bus. KNX devices m...
[ 37811, 198, 26796, 329, 21294, 257, 357, 32844, 8, 12694, 284, 22466, 55, 1323, 13, 198, 198, 1026, 3769, 11244, 329, 198, 198, 9, 4574, 1957, 1181, 2458, 284, 22466, 55, 1323, 198, 9, 22466, 55, 4410, 743, 1100, 1957, 3815, 2884, 4...
2.396375
1,269
# ----------------------- Base API functionality ----------------------- # ----------------------- Helper functions -----------------------
[ 198, 220, 220, 220, 1303, 41436, 6329, 7308, 7824, 11244, 41436, 6329, 220, 628, 220, 220, 220, 1303, 41436, 6329, 5053, 525, 5499, 41436, 6329, 220, 198 ]
5.62963
27
# Run this app with `python app.py` and # visit http://127.0.0.1:8050/ in your web browser. import dash from dash import dcc from dash import html from dash.dependencies import Input, Output import plotly.express as px import pandas as pd import numpy as np from visualize import value_per_year, value_per_ward, value_p...
[ 2, 5660, 428, 598, 351, 4600, 29412, 598, 13, 9078, 63, 290, 198, 2, 3187, 2638, 1378, 16799, 13, 15, 13, 15, 13, 16, 25, 1795, 1120, 14, 287, 534, 3992, 6444, 13, 198, 198, 11748, 14470, 198, 6738, 14470, 1330, 288, 535, 198, 6...
2.14624
1,436
""" convert English text to owo-speak! references: https://www.reddit.com/r/furry/comments/9v3snn/how_to_speak_in_owo_talk/ """ from functools import reduce REPLACEMENTS = { "l": "w", "r": "w", "na": "nya", "ne": "nye", "ni": "nyi", "no": "nyo", "nu": "nyu", "ove": "uv" } def owoify(t...
[ 37811, 198, 1102, 1851, 3594, 2420, 284, 12334, 78, 12, 47350, 0, 198, 198, 5420, 4972, 25, 198, 5450, 1378, 2503, 13, 10748, 13, 785, 14, 81, 14, 69, 16682, 14, 15944, 14, 24, 85, 18, 16184, 77, 14, 4919, 62, 1462, 62, 47350, 6...
2.117048
393
#!/usr/bin/env python """ Test queries with ClinVar data indexed with MongoDB """ import unittest from nosqlbiosets.variation.qryclinvar import QueryClinVar qry = QueryClinVar("MongoDB", "biosets", "clinvarvariation") if __name__ == '__main__': unittest.main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 6208, 20743, 351, 11834, 19852, 1366, 41497, 351, 42591, 11012, 37227, 198, 198, 11748, 555, 715, 395, 198, 198, 6738, 43630, 13976, 65, 4267, 1039, 13, 25641, 341, 13, 80, 563, ...
2.737374
99
from jumpscale import j import unittest import uuid import requests from github import Github from testconfig import config
[ 6738, 18045, 38765, 1330, 474, 198, 11748, 555, 715, 395, 198, 11748, 334, 27112, 198, 11748, 7007, 198, 6738, 33084, 1330, 38994, 198, 6738, 1332, 11250, 1330, 4566, 628 ]
4.310345
29
from unittest.mock import MagicMock, patch import pytest # If mock_fifolock is imported in a test.py, # then every test in it will be run with this mock applied @pytest.fixture(autouse=True)
[ 6738, 555, 715, 395, 13, 76, 735, 1330, 6139, 44, 735, 11, 8529, 198, 198, 11748, 12972, 9288, 628, 198, 198, 2, 1002, 15290, 62, 32041, 349, 735, 318, 17392, 287, 257, 1332, 13, 9078, 11, 198, 2, 788, 790, 1332, 287, 340, 481, ...
3.046875
64
"""Do a one-time build of default.png""" # Copyright (c) 2001-2009 ElevenCraft Inc. # See LICENSE for details. if __name__ == '__main__': f = file('default.png', 'rb') default_png = f.read() f.close() f = file('_default_png.py', 'wU') f.write('DEFAULT_PNG = %r\n' % default_png) f.close()
[ 37811, 5211, 257, 530, 12, 2435, 1382, 286, 4277, 13, 11134, 37811, 198, 198, 2, 15069, 357, 66, 8, 5878, 12, 10531, 37339, 14467, 3457, 13, 198, 2, 4091, 38559, 24290, 329, 3307, 13, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834,...
2.37594
133
import io import lxml.objectify from abc import ABC, abstractmethod from construct import Construct from typing import Optional, Tuple, Type, TypeVar, Dict, Any, BinaryIO from .config import TypeLoadConfig from .. import reader, utils from .. import config as global_config from ..errors import TypeAlreadyLoadedError ...
[ 11748, 33245, 198, 11748, 300, 19875, 13, 15252, 1958, 198, 6738, 450, 66, 1330, 9738, 11, 12531, 24396, 198, 6738, 5678, 1330, 28407, 198, 6738, 19720, 1330, 32233, 11, 309, 29291, 11, 5994, 11, 5994, 19852, 11, 360, 713, 11, 4377, 1...
3.595588
136
#!/usr/bin/env python3 import numpy as np one_hot = __import__('3-one_hot').one_hot load_model = __import__('9-model').load_model test_model = __import__('12-test').test_model if __name__ == '__main__': datasets = np.load('../data/MNIST.npz') X_test = datasets['X_test'] X_test = X_test.reshape(X_test.sha...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 299, 32152, 355, 45941, 198, 505, 62, 8940, 796, 11593, 11748, 834, 10786, 18, 12, 505, 62, 8940, 27691, 505, 62, 8940, 198, 2220, 62, 19849, 796, 11593, 11748, 834, ...
2.336538
208
#!/usr/bin/env python # Copyright 2019 Pascal Audet & Helen Janiszewski # # This file is part of OBStools. # # 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 wi...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 15069, 13130, 35163, 7591, 316, 1222, 22695, 2365, 271, 89, 46151, 198, 2, 198, 2, 770, 2393, 318, 636, 286, 25334, 1273, 10141, 13, 198, 2, 198, 2, 2448, 3411, 318, 29376, ...
2.583181
2,188
import sys import time import math import numpy as np import matplotlib.pyplot as plt
[ 11748, 25064, 198, 11748, 640, 198, 11748, 10688, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 628 ]
3.259259
27
"""Standard Report Generator.""" import pandas as pd from tabulate import tabulate from gitlog_stat.reports.report_base import ReportBase class Standard(ReportBase): """Standard Report Generator.""" def build(self, df, print_rpt=False): """Build a report. Args: df (DataFrame): D...
[ 37811, 23615, 6358, 35986, 526, 15931, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 7400, 5039, 1330, 7400, 5039, 198, 198, 6738, 17606, 6404, 62, 14269, 13, 48922, 13, 13116, 62, 8692, 1330, 6358, 14881, 628, 198, 4871, 8997, 7, ...
2.045659
1,336
from cyder.cydhcp.network.models import Network from cyder.cydhcp.range.models import Range
[ 6738, 3075, 1082, 13, 948, 34985, 13155, 13, 27349, 13, 27530, 1330, 7311, 198, 6738, 3075, 1082, 13, 948, 34985, 13155, 13, 9521, 13, 27530, 1330, 13667, 628, 628, 628, 198 ]
3.16129
31
# Copyright 2019 Lukas Jendele and Ondrej Skopek. # Adapted from The TensorFlow Authors, under the ASL 2.0. # # 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/licen...
[ 2, 15069, 13130, 28102, 292, 449, 437, 11129, 290, 440, 358, 260, 73, 3661, 404, 988, 13, 198, 2, 30019, 276, 422, 383, 309, 22854, 37535, 46665, 11, 739, 262, 7054, 43, 362, 13, 15, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 1...
2.711962
1,045
from selenium.webdriver.support.ui import WebDriverWait from selenium.common.exceptions import TimeoutException """ This class wait for element with specified time, If not getting it throws exception """
[ 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 11284, 13, 9019, 1330, 5313, 32103, 21321, 198, 6738, 384, 11925, 1505, 13, 11321, 13, 1069, 11755, 1330, 3862, 448, 16922, 198, 198, 37811, 198, 1212, 1398, 4043, 329, 5002, 351, 7368, 640,...
4.039216
51
from scripts.variables.localvars import *
[ 6738, 14750, 13, 25641, 2977, 13, 12001, 85, 945, 1330, 1635, 628, 198 ]
3.384615
13
# # PySNMP MIB module CISCO-DOT11-CONTEXT-SERVICES-MANAGER-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-DOT11-CONTEXT-SERVICES-MANAGER-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 17:38:18 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davw...
[ 2, 198, 2, 9485, 15571, 7378, 337, 9865, 8265, 36159, 8220, 12, 35, 2394, 1157, 12, 10943, 32541, 12, 35009, 53, 34444, 12, 10725, 4760, 1137, 12, 8895, 33, 357, 4023, 1378, 16184, 76, 489, 8937, 13, 785, 14, 79, 893, 11632, 8, 19...
2.344698
2,933
import requests import json import time param = {#ajax请求的参数 'vmid': '1', 'jsonp':'jsonp', } param2 = {#ajax请求的参数 'mid': '1', 'jsonp':'jsonp', } headers = { 'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.63 Safari/537.36', } i = 2...
[ 11748, 7007, 198, 11748, 33918, 198, 11748, 640, 628, 198, 17143, 796, 1391, 2, 1228, 897, 46237, 115, 162, 109, 224, 21410, 20998, 224, 46763, 108, 198, 220, 220, 220, 705, 85, 13602, 10354, 705, 16, 3256, 198, 220, 220, 220, 705, ...
1.945985
685
from distutils.core import setup import setuptools with open('README.md', 'r', encoding='utf8') as f: readme = f.read() setup( name='matplotvideo', version='0.0.2', author='Koen Vossen', author_email='info@koenvossen.nl', url="https://github.com/PySport/matplotvideo", packages=setuptools....
[ 6738, 1233, 26791, 13, 7295, 1330, 9058, 198, 198, 11748, 900, 37623, 10141, 198, 198, 4480, 1280, 10786, 15675, 11682, 13, 9132, 3256, 705, 81, 3256, 21004, 11639, 40477, 23, 11537, 355, 277, 25, 198, 220, 220, 220, 1100, 1326, 796, ...
2.577236
369
from workflower.plugins.tableau_document.title import Title class LayoutOptions: """ Layout Options class. """ @property @classmethod
[ 6738, 670, 25547, 13, 37390, 13, 11487, 559, 62, 22897, 13, 7839, 1330, 11851, 628, 198, 198, 4871, 47639, 29046, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 47639, 18634, 1398, 13, 198, 220, 220, 220, 37227, 628, 220, 220, 2...
3
53
from tkinter import messagebox import numpy as np import random import base64 from src.helper.file import File from src.helper.cipher import encrypt_vigenere Wc = np.indices((8, 8)).sum(axis=0) % 2
[ 6738, 256, 74, 3849, 1330, 3275, 3524, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 4738, 198, 11748, 2779, 2414, 198, 198, 6738, 12351, 13, 2978, 525, 13, 7753, 1330, 9220, 198, 6738, 12351, 13, 2978, 525, 13, 66, 10803, 1330...
2.885714
70