content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
from unittest import mock import unittest import requests from requests.exceptions import HTTPError def google_query(query): """ trivial function that does a GET request against google, checks the status of the result and returns the raw content """ url = "https://www.google.com" params = {...
[ 6738, 555, 715, 395, 1330, 15290, 198, 11748, 555, 715, 395, 198, 11748, 7007, 198, 6738, 7007, 13, 1069, 11755, 1330, 14626, 12331, 198, 198, 4299, 23645, 62, 22766, 7, 22766, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 2086...
2.4
780
import psycopg2 import sqlite3 import pandas as pd conn = sqlite3.connect('titanic.sqlite3') curs = conn.cursor() curs.execute('CREATE TABLE titanic (Survived, Pclass, Name, Sex, Age, Siblings_Spouses_Aboard, Parents_Children_Aboard, Fare)') conn.commit() df = pd.read_csv('/Users/bradbrauser/unit3/DS-Unit-3-Sprin...
[ 11748, 17331, 22163, 70, 17, 198, 11748, 44161, 578, 18, 198, 11748, 19798, 292, 355, 279, 67, 628, 198, 37043, 796, 44161, 578, 18, 13, 8443, 10786, 83, 18642, 291, 13, 25410, 578, 18, 11537, 198, 66, 1834, 796, 48260, 13, 66, 2147...
2.575581
172
#!/usr/bin/env python # -*- coding: utf-8 -*- import pytest import sys import warnings import pandas as pd import mbf_genomes from pypipegraph import FileGeneratingJob, MultiFileGeneratingJob from mvariants import VarScan, OptionHandler, Mutect2 from pathlib import Path __author__ = "MarcoMernberger" __copyright__ = ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 12972, 9288, 198, 11748, 25064, 198, 11748, 14601, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 285, 19881, ...
2.852349
149
import sys sys.path.insert(0, './yolov5') from yolov5.utils.datasets import LoadImages, LoadStreams,LoadWebcam,LoadRealsense from yolov5.utils.general import check_img_size, non_max_suppression, scale_coords from yolov5.utils.torch_utils import select_device, time_synchronized from deep_sort_pytorch.utils.parser impor...
[ 11748, 25064, 198, 17597, 13, 6978, 13, 28463, 7, 15, 11, 705, 19571, 88, 349, 709, 20, 11537, 198, 198, 6738, 331, 349, 709, 20, 13, 26791, 13, 19608, 292, 1039, 1330, 8778, 29398, 11, 8778, 12124, 82, 11, 8912, 13908, 20991, 11, ...
2.205635
1,668
import numpy as np import pandas as pd from scipy.stats import norm import unittest from context import grama as gr from context import models, data ## Marginals function tests ################################################## # --------------------------------------------------
[ 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 629, 541, 88, 13, 34242, 1330, 2593, 198, 11748, 555, 715, 395, 198, 198, 6738, 4732, 1330, 14599, 64, 355, 1036, 198, 6738, 4732, 1330, 4981, 11, 1366, ...
4.733333
60
import sys, builtins, importlib safe_modules = ["numpy","math","random","scipy","cmath","decimal","fractions","time", "numbers", "itertools", "operator", "numba","zlib","pickle","awkward","uproot_methods", "cloudpickle", "uproot", "fnal_column_analysis_tools" ] safe_modules = {m:importlib.import_module(m) for m ...
[ 11748, 25064, 11, 3170, 1040, 11, 1330, 8019, 198, 198, 21230, 62, 18170, 796, 14631, 77, 32152, 2430, 11018, 2430, 25120, 2430, 1416, 541, 88, 2430, 66, 11018, 2430, 12501, 4402, 2430, 69, 37810, 2430, 2435, 1600, 198, 220, 220, 220, ...
2.735955
178
# Copyright 2020,2021 Sony Corporation. # Copyright 2021 Sony Group Corporation. # # 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 ...
[ 2, 15069, 12131, 11, 1238, 2481, 10184, 10501, 13, 198, 2, 15069, 33448, 10184, 4912, 10501, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, ...
3.660099
203
import requests def captcha_check(captcha_url='http://localhost:8080/verify_captcha'): """爬取过程中可能会触发知乎反爬验证码,请求验证码服务""" return requests.get(url=captcha_url).json() if __name__ == '__main__': res = captcha_check() print(res)
[ 11748, 7007, 628, 198, 4299, 48972, 62, 9122, 7, 27144, 11693, 62, 6371, 11639, 4023, 1378, 36750, 25, 1795, 1795, 14, 332, 1958, 62, 27144, 11693, 6, 2599, 198, 220, 220, 220, 37227, 163, 230, 105, 20998, 244, 32573, 229, 163, 101, ...
1.699301
143
import subprocess import os from ruamel.yaml import YAML from datetime import datetime if __name__ == '__main__': results = subprocess.run(['git', 'diff-tree', '--no-commit-id', '--name-only', '-r', 'HEAD'], cwd='./', capture_output=True) modified_files = results.stdout.decode('utf-8').rstrip().split('\n') ...
[ 11748, 850, 14681, 198, 11748, 28686, 198, 6738, 7422, 17983, 13, 88, 43695, 1330, 575, 2390, 43, 198, 6738, 4818, 8079, 1330, 4818, 8079, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 24...
2.450495
202
from dagster import check, lambda_solid
[ 6738, 48924, 1706, 1330, 2198, 11, 37456, 62, 39390, 628 ]
4.1
10
# -*- coding: utf-8 -*- # @Time : 2020/9/18 11:33 # @Author : Hui Wang # @Email : hui.wang@ruc.edu.cn """ SASRec ################################################ Reference: Wang-Cheng Kang et al. "Self-Attentive Sequential Recommendation." in ICDM 2018. Reference: https://github.com/kang205/SASRec """...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2488, 7575, 220, 220, 220, 1058, 12131, 14, 24, 14, 1507, 1367, 25, 2091, 198, 2, 2488, 13838, 220, 1058, 367, 9019, 15233, 198, 2, 2488, 15333, 220, 220, 1058, 2...
2.349724
1,993
from settings import GENIUS_BASE_URL, LYRICAL_KEY import requests from bs4 import BeautifulSoup import logging
[ 6738, 6460, 1330, 24700, 40, 2937, 62, 33, 11159, 62, 21886, 11, 406, 38162, 20151, 62, 20373, 198, 11748, 7007, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 11748, 18931 ]
3.4375
32
"""This file is used to store the access details for the Twitter API access. You will need to fill in your own access details that you receive after successfully applying for Twitter API access. """ Twitter = { "consumer_key":"xyz", "consumer_secret":"xyz", "access_token":"xyz", "access_token_sec...
[ 37811, 1212, 2393, 318, 973, 284, 3650, 262, 1895, 3307, 329, 262, 3009, 7824, 1895, 13, 198, 220, 220, 921, 481, 761, 284, 6070, 287, 534, 898, 1895, 3307, 326, 345, 3328, 706, 198, 220, 220, 7675, 11524, 329, 3009, 7824, 1895, 13,...
3.242718
103
import math
[ 11748, 10688, 628 ]
4.333333
3
#!/usr/bin/env python # coding=utf-8 ''' Author: John Email: johnjim0816@gmail.com Date: 2021-03-29 10:37:32 LastEditor: John LastEditTime: 2021-05-04 22:35:56 Discription: Environment: ''' import sys import os curr_path = os.path.dirname(os.path.abspath(__file__)) # 当前文件所在绝对路径 parent_path = os.path.dirname(curr_pat...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 28, 40477, 12, 23, 198, 7061, 6, 198, 13838, 25, 1757, 198, 15333, 25, 45610, 73, 320, 2919, 1433, 31, 14816, 13, 785, 198, 10430, 25, 33448, 12, 3070, 12, 1959, 838, 25,...
1.887839
847
from typing import Callable import demistomock as demisto from CommonServerPython import * ''' IMPORTS ''' import json import requests import traceback from dateutil.parser import parse # Disable insecure warnings requests.packages.urllib3.disable_warnings() ''' GLOBALS ''' IS_VERSION_2_1: bool ''' HELPER FUNCT...
[ 6738, 19720, 1330, 4889, 540, 198, 198, 11748, 1357, 396, 296, 735, 355, 1357, 396, 78, 198, 6738, 8070, 10697, 37906, 1330, 1635, 198, 198, 7061, 6, 30023, 33002, 705, 7061, 198, 198, 11748, 33918, 198, 11748, 7007, 198, 11748, 12854, ...
2.447484
14,367
from pkg_resources import get_distribution, DistributionNotFound version = get_distribution(__name__).version from .core import DBManager, AuthenticationError from .tools import StreamDS, CLBMap
[ 6738, 279, 10025, 62, 37540, 1330, 651, 62, 17080, 3890, 11, 27484, 3673, 21077, 198, 198, 9641, 796, 651, 62, 17080, 3890, 7, 834, 3672, 834, 737, 9641, 628, 198, 6738, 764, 7295, 1330, 20137, 13511, 11, 48191, 12331, 198, 6738, 764,...
3.882353
51
#!/usr/bin/python # # Copyright 2002-2021 Barcelona Supercomputing Center (www.bsc.es) # # 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 ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 198, 2, 220, 15069, 6244, 12, 1238, 2481, 15142, 3115, 785, 48074, 3337, 357, 2503, 13, 65, 1416, 13, 274, 8, 198, 2, 198, 2, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, ...
2.405478
5,184
import abc import json import six import time from io import StringIO from twisted.internet import reactor from config import setupcfg from hpedockerplugin import exception from hpedockerplugin import hpe_storage_api as api import test.setup_mock as setup_mock class HpeDockerUnitTestExecutor(object): """ ...
[ 11748, 450, 66, 198, 11748, 33918, 198, 11748, 2237, 198, 11748, 640, 198, 198, 6738, 33245, 1330, 10903, 9399, 198, 6738, 19074, 13, 37675, 1330, 21905, 628, 198, 6738, 4566, 1330, 9058, 37581, 198, 6738, 289, 9124, 12721, 33803, 1330, ...
2.601556
2,314
__version__ = '0.1.0.dev1' __author__ = 'John Thorvald Wodder II' __author_email__ = 'statjson@varonathe.org' __license__ = 'MIT' __url__ = 'https://github.com/jwodder/statjson'
[ 834, 9641, 834, 220, 220, 220, 220, 220, 796, 705, 15, 13, 16, 13, 15, 13, 7959, 16, 6, 198, 834, 9800, 834, 220, 220, 220, 220, 220, 220, 796, 705, 7554, 13002, 85, 1940, 370, 35346, 2873, 6, 198, 834, 9800, 62, 12888, 834, 7...
2.071429
98
import matplotlib.pyplot as plt import os list_zero_shot = [ ('rte', "can we infer", 'validation'), ('copa', "choose", 'validation'), ('wic', "same_sense", 'validation'), ('winogrande', "fill in the blank", 'validation'), ('hellaswag', "__RANDOM__", 'validation'), ('anli', "__RANDOM__", 'tes...
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 28686, 198, 198, 4868, 62, 22570, 62, 9442, 796, 685, 198, 220, 220, 220, 19203, 81, 660, 3256, 366, 5171, 356, 13249, 1600, 705, 12102, 341, 33809, 220, 198, 220, ...
2.274038
208
"""Parse and return mrunner gin-config and set-up Neptune.""" import atexit import datetime import functools import os import pickle import cloudpickle import neptune from alpacka import metric_logging from alpacka.batch_steppers import worker_utils def get_configuration(spec_path): """Get mrunner experiment s...
[ 37811, 10044, 325, 290, 1441, 285, 16737, 39733, 12, 11250, 290, 900, 12, 929, 26461, 526, 15931, 198, 198, 11748, 379, 37023, 198, 11748, 4818, 8079, 198, 11748, 1257, 310, 10141, 198, 11748, 28686, 198, 11748, 2298, 293, 198, 198, 117...
2.376126
1,332
"""The tests for the LG webOS media player platform.""" import sys import pytest from homeassistant.components import media_player from homeassistant.components.media_player.const import ( ATTR_INPUT_SOURCE, ATTR_MEDIA_VOLUME_MUTED, SERVICE_SELECT_SOURCE, ) from homeassistant.components.webostv import DOM...
[ 37811, 464, 5254, 329, 262, 17370, 3992, 2640, 2056, 2137, 3859, 526, 15931, 198, 11748, 25064, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 1363, 562, 10167, 13, 5589, 3906, 1330, 2056, 62, 7829, 198, 6738, 1363, 562, 10167, 13, 5589,...
2.502433
822
import apache_beam as beam from apache_beam.options.pipeline_options import PipelineOptions if __name__ == '__main__': in_file = 'news.txt' out_file = 'processed' options = PipelineOptions() with beam.Pipeline(options=PipelineOptions()) as p: r = ( p | beam.io.ReadFromText(in_fi...
[ 11748, 2471, 4891, 62, 40045, 355, 15584, 198, 6738, 2471, 4891, 62, 40045, 13, 25811, 13, 79, 541, 4470, 62, 25811, 1330, 37709, 29046, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 287,...
2.168103
232
import pytest from rdflib import Graph, Literal, URIRef """ For graphs with multiple rdf reification statements i.e. multiple Embedded triples """ rdf_graph = """ PREFIX ex:<http://example.org/> PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX foaf:<http://xmlns.com/foaf/0.1/> PREFIX d...
[ 11748, 12972, 9288, 198, 6738, 374, 67, 2704, 571, 1330, 29681, 11, 25659, 1691, 11, 37902, 4663, 891, 198, 198, 37811, 198, 1890, 28770, 351, 3294, 374, 7568, 302, 2649, 6299, 1312, 13, 68, 13, 3294, 13302, 47238, 1333, 2374, 198, 37...
2.093525
1,251
from django import template from django.utils.safestring import mark_safe register = template.Library() # register 名字是固定的,不可改变 # 自定义filter @register.filter def filter_multi(x,y): """最多传一个参数,x是默认的 想传多个值,传一个列表就可以 """ return x*y # 自定义标签,可以传多个值 @register.simple_tag
[ 6738, 42625, 14208, 1330, 11055, 198, 6738, 42625, 14208, 13, 26791, 13, 49585, 395, 1806, 1330, 1317, 62, 21230, 198, 30238, 796, 11055, 13, 23377, 3419, 220, 1303, 7881, 10263, 238, 235, 27764, 245, 42468, 32368, 118, 22522, 248, 21410,...
1.524324
185
import sys import glob import serial import serial.tools.list_ports # conver input data # Function code area
[ 11748, 25064, 198, 11748, 15095, 198, 11748, 11389, 198, 11748, 11389, 13, 31391, 13, 4868, 62, 3742, 628, 628, 198, 198, 2, 6718, 5128, 1366, 628, 198, 2, 15553, 2438, 1989, 628, 628 ]
3.606061
33
#pylint: disable=W0703, E1101,W0105 ''' Copyright 2014 eBay Software Foundation 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 ap...
[ 2, 79, 2645, 600, 25, 15560, 28, 54, 15, 36809, 11, 412, 1157, 486, 11, 54, 486, 2713, 198, 7061, 6, 198, 15269, 1946, 21698, 10442, 5693, 198, 198, 26656, 15385, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 341...
2.533037
1,574
import numpy as np from mshr import * from dolfin import * # Import flags specifying dataset parameters from setup_flags import getFlags # Import mesh generation function from mesh import gen_mesh if __name__ == '__main__': FLAGS = getFlags() gen_mesh(FLAGS.resolution, FLAGS.mesh_resolution, FLAGS.mesh_dir,...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 285, 36007, 1330, 1635, 198, 6738, 288, 4024, 259, 1330, 1635, 198, 198, 2, 17267, 9701, 31577, 27039, 10007, 198, 6738, 9058, 62, 33152, 1330, 651, 40053, 198, 198, 2, 17267, 19609, 5270, 2163,...
3.028037
107
# -*- coding: utf-8 -*- # Copyright (c) 2008 Martin Scharrer <martin@scharrer-online.de> # This is Free Software under the GPLv3 or BSD license. # # $Id: parseargs.py 8541 2010-08-30 21:57:20Z martin_s $ # __url__ = ur"$URL: http://trac-hacks.org/svn/advparseargsplugin/0.11/tracadvparseargs/parseargs.py $"[6...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 2, 15069, 357, 66, 8, 3648, 5780, 3059, 9624, 81, 1279, 13822, 259, 31, 20601, 9624, 81, 12, 25119, 13, 2934, 29, 201, 198, 2, 770, 318, 3232, 10442, 739, 262, ...
2.339577
2,082
# Copyright (c) 2019, Danish Technological Institute. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. # -*- coding: utf-8 -*- """ Helper functions for parsing python scripts through AST and executing them as...
[ 2, 15069, 357, 66, 8, 13130, 11, 20849, 5429, 2770, 5136, 13, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 770, 2723, 2438, 318, 11971, 739, 262, 347, 10305, 12, 7635, 5964, 1043, 287, 262, 198, 2, 38559, 24290, 2393, 287, 262, ...
3.167203
311
# # MIT License # # Copyright (c) 2020 Airbyte # # 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, pu...
[ 2, 198, 2, 17168, 13789, 198, 2, 198, 2, 15069, 357, 66, 8, 12131, 3701, 26327, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 198, 2, 286, 428, 3788, 290, 3917, 10314, 3...
2.899451
2,914
import os import json import argparse #import pybreaker # Provide the File Size configdata = None #db_breaker = pybreaker.CircuitBreaker(fail_max=5, reset_timeout=60) # Open the JSOn configuration file and Fetch Data # Get Command line arguments if not configdata: configdata = readJsonData()
[ 11748, 28686, 198, 11748, 33918, 198, 11748, 1822, 29572, 198, 2, 11748, 12972, 25766, 198, 198, 2, 44290, 262, 9220, 12849, 198, 198, 11250, 7890, 796, 6045, 198, 2, 9945, 62, 25766, 796, 12972, 25766, 13, 31560, 5013, 12679, 3110, 7, ...
3.258065
93
from django.contrib import admin # Register your models here. from .models import Movie @admin.register(Movie)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 198, 2, 17296, 534, 4981, 994, 13, 198, 6738, 764, 27530, 1330, 15875, 198, 198, 31, 28482, 13, 30238, 7, 25097, 8 ]
3.612903
31
import logging from pydbus import SessionBus from gi.repository import GLib from hid import enumerate, Device from drivers.reddragon import RedDragon from drivers.fakekeyboard import FakeKeyboard from interfaces import * VID = 0x0c45 PID = 0x5004 if __name__ == '__main__': daemon = KbDaemon() daemon.start...
[ 11748, 18931, 198, 198, 6738, 279, 5173, 10885, 1330, 23575, 16286, 198, 6738, 308, 72, 13, 260, 1930, 37765, 1330, 10188, 571, 198, 6738, 24519, 1330, 27056, 378, 11, 16232, 198, 198, 6738, 6643, 13, 445, 14844, 1330, 2297, 17808, 198,...
3.04717
106
"""VerifyFrontendRule To make sure that no one maliciously or by accident tries to publish their app on certain urls, this step checks the published url against a blacklist and stops the pipeline if the url is considered invalid.""" __author__ = 'tinglev@kth.se' import re from modules.steps.base_pipeline_step import...
[ 37811, 13414, 1958, 25886, 437, 31929, 198, 198, 2514, 787, 1654, 326, 645, 530, 17412, 306, 393, 416, 5778, 8404, 284, 7715, 198, 24571, 598, 319, 1728, 2956, 7278, 11, 428, 2239, 8794, 262, 3199, 19016, 1028, 198, 64, 38810, 290, 99...
3.770992
131
from accounts.models.customer import Customer from django.shortcuts import render, redirect from django.contrib.auth.forms import UserCreationForm from ..forms.CreateUserForm import CreateUserForm from django.contrib import messages from ..decorators import unauthenticated_user from django.contrib.auth.models import Gr...
[ 6738, 5504, 13, 27530, 13, 23144, 263, 1330, 22092, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 18941, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 23914, 1330, 11787, 12443, 341, 8479, 198, 6738, 11485, 23914, ...
3.808511
94
import unittest from typing import Set import icontract_hypothesis from icontract import require from correct_programs.ethz_eprog_2019.exercise_08 import problem_03 if __name__ == "__main__": unittest.main()
[ 11748, 555, 715, 395, 198, 6738, 19720, 1330, 5345, 198, 198, 11748, 14158, 756, 974, 62, 36362, 313, 8497, 198, 6738, 14158, 756, 974, 1330, 2421, 198, 198, 6738, 3376, 62, 23065, 82, 13, 2788, 89, 62, 538, 3828, 62, 23344, 13, 106...
2.932432
74
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Monkeypatch initialisation functions """ try: from collections import OrderedDict except ImportError: # pragma: no-cover from ordereddict import OrderedDict # pylint:disable=import-error from rebulk.match import Match def monkeypatch_rebulk(): """Monke...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 9069, 2539, 17147, 4238, 5612, 5499, 198, 37811, 198, 198, 28311, 25, 198, 220, 220, 220, 422, 17268, 1330,...
2.382353
306
#!/usr/bin/env python # Copyright 2015 gRPC 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 o...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 15069, 1853, 308, 49, 5662, 7035, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393,...
3.06525
659
# -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2017-05-08 13:04 from __future__ import unicode_literals from django.db import migrations, models
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 940, 13, 19, 319, 2177, 12, 2713, 12, 2919, 1511, 25, 3023, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, ...
2.736842
57
# MIT License # # Copyright (c) 2018 Airthings AS # # 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,...
[ 2, 17168, 13789, 198, 2, 198, 2, 15069, 357, 66, 8, 2864, 317, 3333, 654, 7054, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 198, 2, 286, 428, 3788, 290, 3917, 10314, 3...
2.635314
1,212
def print_rectangles(rectangles): ''' For loop to print all objects from Rectangle(). :param rectangles :return: ''' counter = 0 for rectangle in rectangles: counter = counter + 1 print("*" * 30) print("Rectangle", counter) rectangle.print() print("*" * ...
[ 198, 198, 4299, 3601, 62, 2554, 27787, 7, 2554, 27787, 2599, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 1114, 9052, 284, 3601, 477, 5563, 422, 48599, 9248, 22446, 198, 220, 220, 220, 1058, 17143, 13621, 27787, 198, 220, 220, ...
2.372549
153
from utils.conversion import * from utils.pprint import * PC1 = [57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18, 10, 2, 59, 51, 43, 35, 27, 19, 11, 3, 60, 52, 44, 36, 63, 55, 47, 39, 31, 23, 15, 7, 62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 28, ...
[ 6738, 3384, 4487, 13, 1102, 9641, 1330, 1635, 198, 6738, 3384, 4487, 13, 381, 22272, 1330, 1635, 198, 198, 5662, 16, 796, 685, 3553, 11, 5125, 11, 6073, 11, 4747, 11, 1679, 11, 1596, 11, 860, 11, 198, 220, 220, 220, 220, 220, 220,...
1.596284
2,368
''' ############################################################################### Two-Photon States ############################################################################### Quantum Optics and Quantum Information Group Written by Jean-Philippe MacLean: jpmaclean@uwaterloo.ca Functions...
[ 7061, 6, 198, 29113, 29113, 7804, 4242, 21017, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4930, 12, 2725, 18970, 1829, 220, 198, 29113, 29113, 7804, 4242, ...
1.889694
1,931
import subprocess import os import glob if __name__ == '__main__': midis = glob.glob('rawmidis/*') for song in midis: convert2abc(song)
[ 11748, 850, 14681, 198, 11748, 28686, 198, 11748, 15095, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 3095, 271, 796, 15095, 13, 4743, 672, 10786, 1831, 13602, 271, 15211, 11537, 198, 220,...
2.421875
64
from dataclasses import dataclass from server.api.StatusCode import StatusCode from utils.Serializable import Serializable @dataclass
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 198, 6738, 4382, 13, 15042, 13, 19580, 10669, 1330, 12678, 10669, 198, 6738, 3384, 4487, 13, 32634, 13821, 1330, 23283, 13821, 628, 198, 31, 19608, 330, 31172, 198 ]
3.702703
37
from __future__ import print_function # BatchTextToPDF.py # Convert a batch of text files to a single PDF. # Each text file's content starts on a new page in the PDF file. # Requires: # - xtopdf: https://bitbucket.org/vasudevram/xtopdf # - ReportLab: https://www.reportlab.com/ftp/reportlab-1.21.1.tar.gz # Author: Vasu...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 2, 347, 963, 8206, 2514, 20456, 13, 9078, 198, 2, 38240, 257, 15458, 286, 2420, 3696, 284, 257, 2060, 12960, 13, 198, 2, 5501, 2420, 2393, 338, 2695, 4940, 319, 257, 649, 2443...
2.890547
201
from tinydb import Query
[ 6738, 7009, 9945, 1330, 43301, 628 ]
4.333333
6
import mock import unittest from labs.lab01 import example as l1_example if __name__ == '__main__': unittest.main()
[ 11748, 15290, 198, 11748, 555, 715, 395, 198, 198, 6738, 27887, 13, 23912, 486, 1330, 1672, 355, 300, 16, 62, 20688, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715, 395, 13, 124...
2.777778
45
import struct import numpy import pickle debug_level = 0
[ 11748, 2878, 198, 11748, 299, 32152, 198, 11748, 2298, 293, 198, 198, 24442, 62, 5715, 796, 657, 198 ]
3.222222
18
from wagtail.core import hooks class FeatureRegistry: """ A central store of information about optional features that can be enabled in rich text editors by passing a ``features`` list to the RichTextField, such as how to whitelist / convert HTML tags, and how to enable the feature on various editors....
[ 6738, 266, 363, 13199, 13, 7295, 1330, 26569, 628, 198, 4871, 27018, 8081, 4592, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 317, 4318, 3650, 286, 1321, 546, 11902, 3033, 326, 460, 307, 9343, 287, 5527, 2420, 198, 220, 220, 2...
2.974359
351
# flake8: noqa: F401 """Init file for enums""" from meliora.enums.mode import REAL_MODES, RunMode from meliora.enums.state import State from meliora.enums.msg_type import MsgType from meliora.enums.exchanges import Exchange from meliora.enums.fiat import Fiat from meliora.enums.cli_options import CLIOptions from melio...
[ 2, 781, 539, 23, 25, 645, 20402, 25, 376, 21844, 198, 37811, 31768, 2393, 329, 551, 5700, 37811, 198, 198, 6738, 7758, 1504, 64, 13, 268, 5700, 13, 14171, 1330, 32744, 62, 33365, 1546, 11, 5660, 19076, 198, 6738, 7758, 1504, 64, 13,...
3.065359
153
def fizz_buzz(num): """ return 'Fizz', 'Buzz', 'FizzBuzz', or the argument it receives, all depending on the argument of the function, a number that is divisible by, 3, 5, or both 3 and 5, respectively. """ if not isinstance(num, int): raise TypeError("Expected integer ...
[ 198, 198, 4299, 277, 6457, 62, 65, 4715, 7, 22510, 2599, 628, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 705, 37, 6457, 3256, 705, 48230, 3256, 705, 37, 6457, 48230, 3256, 393, 262, 4578, 340, 11583, 11, 1...
2.350427
234
""" usage: spli-c code_obj_file [i:int_arg s:s_arg ...] """ import sys, autopath, os from pypy.jit.tl.spli import execution, serializer, objects from pypy.rlib.streamio import open_file_as_stream def jitpolicy(driver): """Returns the JIT policy to use when translating.""" from pypy.jit.codewriter.policy imp...
[ 198, 37811, 8748, 25, 4328, 72, 12, 66, 2438, 62, 26801, 62, 7753, 685, 72, 25, 600, 62, 853, 264, 25, 82, 62, 853, 2644, 60, 198, 37811, 198, 198, 11748, 25064, 11, 1960, 18569, 11, 28686, 198, 6738, 279, 4464, 88, 13, 45051, 1...
2.651613
155
# coding = utf-8 # using namespace std import sqlite3 from os import system from os import getcwd from os import chdir """ """ class DatabaseConnection(object): """""" connection_db = sqlite3.connect("./datacore/main-db.db") cursor = connection_db.cursor() got_data = False class PackagesDatabase(D...
[ 2, 19617, 796, 3384, 69, 12, 23, 198, 2, 1262, 25745, 14367, 198, 11748, 44161, 578, 18, 198, 6738, 28686, 1330, 1080, 198, 6738, 28686, 1330, 651, 66, 16993, 198, 6738, 28686, 1330, 442, 15908, 198, 198, 37811, 198, 37811, 628, 198, ...
2.036406
3,461
# -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible @python_2_unicode_compatible
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 3601, 62, 8818, 11, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625...
3.060976
82
""" Solve a problem with SLOPE and compare to R """ from __future__ import print_function import numpy as np import nose.tools as nt try: import rpy2.robjects as rpy rpy2_available = True import rpy2.robjects.numpy2ri from rpy2.robjects.packages import importr from rpy2 import robjects except Imp...
[ 37811, 198, 50, 6442, 257, 1917, 351, 12419, 32135, 290, 8996, 284, 371, 198, 37811, 198, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 9686, 13, 31391, 355, 299, 83, 198, 198...
2.628472
288
import gdsfactory as gf if __name__ == "__main__": c = gf.c.straight(length=0.5e-3) c.show()
[ 11748, 308, 9310, 69, 9548, 355, 308, 69, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 269, 796, 308, 69, 13, 66, 13, 42729, 7, 13664, 28, 15, 13, 20, 68, 12, 18, 8, 198, 220, 220...
2
52
import math import os import socket import struct import seqfold
[ 11748, 10688, 198, 11748, 28686, 198, 11748, 17802, 198, 11748, 2878, 198, 11748, 33756, 11379, 628 ]
4.125
16
from pymongo import MongoClient if __name__ == '__main__': query_document() delete_item() query_document()
[ 6738, 279, 4948, 25162, 1330, 42591, 11792, 628, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 12405, 62, 22897, 3419, 198, 220, 220, 220, 12233, 62, 9186, 3419, 198, 220, 220, 220, 12405...
2.695652
46
#!usr/bin/python from tweepy.streaming import StreamListener from tweepy import OAuthHandler from tweepy import Stream from textblob import TextBlob import json import ConfigParser import datetime import re import time import processText as pt import plotlySetup import connectSQL config = ConfigParser.ConfigParser() ...
[ 2, 0, 14629, 14, 8800, 14, 29412, 198, 6738, 4184, 538, 88, 13, 5532, 278, 1330, 13860, 33252, 198, 6738, 4184, 538, 88, 1330, 440, 30515, 25060, 198, 6738, 4184, 538, 88, 1330, 13860, 198, 6738, 2420, 2436, 672, 1330, 8255, 3629, 6...
3.29156
391
from __future__ import division import os import re import socket import time from subprocess import Popen, PIPE from vendor.munin import MuninPlugin space_re = re.compile(r"\s+")
[ 6738, 11593, 37443, 834, 1330, 7297, 198, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 17802, 198, 11748, 640, 198, 6738, 850, 14681, 1330, 8099, 268, 11, 350, 4061, 36, 198, 198, 6738, 18371, 13, 6199, 259, 1330, 12107, 259, 37233, ...
3.101695
59
# Copyright (c) 2021 Qualcomm Technologies, Inc. # All Rights Reserved. from collections import OrderedDict import torch DEFAULT_BATCH_SIZE = 1 DEFAULT_INPUT_CHANNELS = 3 DEFAULT_RESOLUTION = [224, 224] DEFAULT_INPUT_SHAPE = [DEFAULT_BATCH_SIZE, DEFAULT_INPUT_CHANNELS] + DEFAULT_RESOLUTION class GraphInspector(o...
[ 2, 15069, 357, 66, 8, 33448, 32903, 21852, 11, 3457, 13, 198, 2, 1439, 6923, 33876, 13, 628, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 11748, 28034, 628, 198, 7206, 38865, 62, 33, 11417, 62, 33489, 796, 352, 198, 7206, 3886...
2.475862
1,450
import brownie import sha3
[ 11748, 7586, 494, 198, 11748, 427, 64, 18, 628 ]
3.111111
9
__version__ = "0.6.24" __project__ = "liquepy" __author__ = "Maxim Millen and Julieth Quintero" __license__ = "MIT"
[ 834, 9641, 834, 796, 366, 15, 13, 21, 13, 1731, 1, 198, 834, 16302, 834, 796, 366, 75, 1557, 538, 88, 1, 198, 834, 9800, 834, 796, 366, 11518, 320, 9212, 268, 290, 5979, 19235, 2264, 3849, 78, 1, 198, 834, 43085, 834, 796, 366, ...
2.416667
48
# -*- coding: utf-8 -*- """ Created on Thu May 13 10:02:29 2021 @author: Borja Souto Prego (borja.souto), Nina López Laudenbach (nina.laudenbach) """ import random import string import datetime from datetime import date def createDNI(): """ Creates a random DNI""" dni = '' for i in range(8...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 41972, 319, 26223, 1737, 1511, 838, 25, 2999, 25, 1959, 33448, 201, 198, 201, 198, 31, 9800, 25, 12182, 6592, 311, 448, 78, 3771, 2188, 357, 2865...
2.263231
718
import unittest, random, sys, time sys.path.extend(['.','..','../..','py']) import h2o2 as h2o import h2o_browse as h2b, h2o_exec as h2e, h2o_import as h2i funsList = [ '(def anon {x} (, ((- x x ) )))', '(def anon {x} (, ((- (abs (- (* %x %x) (* (* %x #5) %x))) )) ))', '(def anon {x} (, ((- (abs (- ...
[ 11748, 555, 715, 395, 11, 4738, 11, 25064, 11, 640, 198, 17597, 13, 6978, 13, 2302, 437, 7, 17816, 2637, 4032, 492, 41707, 40720, 492, 41707, 9078, 6, 12962, 198, 11748, 289, 17, 78, 17, 355, 289, 17, 78, 198, 11748, 289, 17, 78, ...
2.125362
1,037
# -*- coding: utf-8 -*- """bootstrap_py.tests.test_commands.""" import unittest import argparse import os import shlex import shutil import sys import tempfile import six from bootstrap_py import commands, __version__ from bootstrap_py.tests.stub import stub_request_metadata class CommandsTests(unittest.TestCase): ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 18769, 26418, 62, 9078, 13, 41989, 13, 9288, 62, 9503, 1746, 526, 15931, 198, 11748, 555, 715, 395, 198, 11748, 1822, 29572, 198, 11748, 28686, 198, 11748, 427, 2...
2.155647
2,178
from androidemu.java.classes.executable import Executable from androidemu.java.java_class_def import JavaClassDef from androidemu.java.java_field_def import JavaFieldDef from androidemu.java.java_method_def import JavaMethodDef
[ 6738, 19286, 368, 84, 13, 12355, 13, 37724, 13, 18558, 18187, 1330, 8393, 18187, 198, 6738, 19286, 368, 84, 13, 12355, 13, 12355, 62, 4871, 62, 4299, 1330, 7349, 9487, 7469, 198, 6738, 19286, 368, 84, 13, 12355, 13, 12355, 62, 3245, ...
3.454545
66
{ "targets": [ { "target_name": "nogdb_js", "cflags_cc": [ "-std=c++11", "-Wall", "-fexceptions" ], "sources": [ "src/init_module.cc", "src/classFilter.cc", "src/co...
[ 90, 198, 220, 220, 220, 366, 83, 853, 1039, 1298, 685, 198, 220, 220, 220, 220, 220, 220, 220, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 16793, 62, 3672, 1298, 366, 77, 519, 9945, 62, 8457, 1600, 198...
1.412481
657
import numpy as np
[ 11748, 299, 32152, 355, 45941, 628, 628 ]
3.142857
7
#!/usr/bin/env python # Copyright (C) 2015 UCSC Computational Genomics Lab # # 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 requi...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 15069, 357, 34, 8, 1853, 14417, 6173, 22476, 864, 5215, 31994, 3498, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198,...
2.814035
855
#! /usr/bin/python3 import colorama from colorama import Fore import os art = """ .__ _____ .__ .__ .___ ____ | | _/ ____\_____ | | ____ | |__ __| _/ ____ ___ __ _/ __ \ | | \ __\ \__ \ | | _/ __ \ | | \ / __ | _/ __ \ \ \/ / \ ...
[ 2, 0, 1220, 14629, 14, 8800, 14, 29412, 18, 220, 198, 11748, 3124, 1689, 198, 6738, 3124, 1689, 1330, 4558, 198, 11748, 28686, 198, 198, 433, 796, 37227, 198, 220, 220, 220, 220, 220, 220, 764, 834, 220, 220, 220, 220, 220, 29343, ...
1.598916
369
import unittest from lesson_02_arrays.cyclic_rotation import solution # Command to execute the test: # python -m unittest -v if __name__ == '__main__': unittest.main
[ 11748, 555, 715, 395, 198, 6738, 11483, 62, 2999, 62, 3258, 592, 13, 15539, 291, 62, 10599, 341, 1330, 4610, 198, 198, 2, 9455, 284, 12260, 262, 1332, 25, 198, 2, 21015, 532, 76, 555, 715, 395, 532, 85, 198, 198, 361, 11593, 3672,...
2.819672
61
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 16529, 35937, 198, 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 17168, 13789, 13, 4091, 13789, 13, 14116, 287, 262, 1628, 6808, 329, 198, 2, 5964, 1321...
2.720514
8,165
"""Contains the class :py:class:`.RightClickMenu`, a menu to open in the :py:class:`editorcontainer.editor.editor.Editor`.""" from kivy.uix.popup import Popup from kivy.properties import ObjectProperty from kivy.uix.widget import Widget from kivy.uix.bubble import Bubble class RightClickMenu(Bubble): """Right cli...
[ 37811, 4264, 1299, 262, 1398, 1058, 9078, 25, 4871, 25, 44646, 11028, 8164, 23381, 47671, 257, 6859, 284, 1280, 287, 262, 198, 25, 9078, 25, 4871, 25, 63, 35352, 34924, 13, 35352, 13, 35352, 13, 17171, 63, 526, 15931, 198, 198, 6738, ...
2.301956
818
from pprint import pprint from silk import Silk from functools import partial from silk.meta import meta, validator pprint(Coordinate.schema) c = Coordinate() c.validate() c = Coordinate(3) pprint(c.schema) print(c.unsilk) c.a = 10 print(c.aa()) print(c.a2) c.a2 = 1002 c.validate() print(c.a.unsilk) c.validate() c.a =...
[ 6738, 279, 4798, 1330, 279, 4798, 198, 6738, 23938, 1330, 26006, 198, 6738, 1257, 310, 10141, 1330, 13027, 198, 6738, 23938, 13, 28961, 1330, 13634, 11, 4938, 1352, 198, 198, 381, 22272, 7, 7222, 45480, 13, 15952, 2611, 8, 198, 66, 79...
2.439716
141
input = """36000000""" import math house = 1 target = int(input) while True: count = num_presents(house) if count > target: print(house) break house += 1
[ 15414, 796, 37227, 2623, 10535, 37811, 198, 198, 11748, 10688, 628, 198, 4803, 796, 352, 198, 16793, 796, 493, 7, 15414, 8, 198, 4514, 6407, 25, 198, 220, 220, 220, 954, 796, 997, 62, 79, 6629, 7, 4803, 8, 198, 220, 220, 220, 611,...
2.415584
77
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file '/Users/charles/PycharmProjects/gifviewer/gifviewer/gui/_qtdesignerforms/mainview_ui.ui' # # Created by: PyQt5 UI code generator 5.15.2 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit th...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 5178, 7822, 7560, 422, 3555, 334, 72, 2393, 31051, 14490, 14, 10641, 829, 14, 20519, 354, 1670, 16775, 82, 14, 27908, 1177, 263, 14, 27908, 1177, 263, 14, 4831...
2.928571
140
"""Query cassandra by RA and dec. The coords variable should be RA and dec, comma separated with NO SPACE. (To facilitate negative declinations.) Usage: %s <configFile> <coords> [--radius=<radius>] [--coordsfromfile] [--saveresults] [--resultslocation=<resultslocation>] [--number=<number>] [--table=<table>] [--namec...
[ 37811, 20746, 30606, 15918, 416, 17926, 290, 875, 13, 383, 763, 3669, 7885, 815, 307, 17926, 290, 875, 11, 39650, 11266, 351, 8005, 37253, 13, 357, 2514, 15570, 4633, 2377, 7352, 2014, 198, 198, 28350, 25, 198, 220, 4064, 82, 1279, 11...
2.565167
1,711
#/usr/bin/env python from paramiko import SSHClient from scp import SCPClient import os import getpass import py7zr import argparse import subprocess parser = argparse.ArgumentParser("7z folders and scp the resulting archives to a backup server") parser.add_argument('folders', metavar='folder', type=str, nargs='+', ...
[ 2, 14, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 5772, 12125, 1330, 33825, 11792, 198, 6738, 629, 79, 1330, 17527, 11792, 198, 11748, 28686, 198, 11748, 651, 6603, 198, 11748, 12972, 22, 89, 81, 198, 11748, 1822, 29572, 198, ...
3.059273
523
import numpy as np import matplotlib.pyplot as plt from sklearn.datasets import make_classification import typing def plot_binary_logistic_boundary(logreg, X, y, xlim, ylim): """Plots the boundary given by the trained logistic regressor :param logreg: Logistic Regrssor model :type logreg: logistic_re...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 1341, 35720, 13, 19608, 292, 1039, 1330, 787, 62, 4871, 2649, 198, 11748, 19720, 628, 198, 4299, 7110, 62, 39491, 62, 6404, 2569, ...
2.140741
1,080
from __future__ import absolute_import import os import glob import numpy as np from siamfc import TrackerFDSiamFC if __name__ == '__main__': # demo video, you can copy any video sequences from OTB dataset and put it into videos folder as the demo video. seq_dir = os.path.expanduser(r'../videos/Basketball/'...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 11748, 28686, 198, 11748, 15095, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 264, 1789, 16072, 1330, 26885, 37, 5258, 1789, 4851, 628, 198, 361, 11593, 3672, 834, 6624, 7...
2.674812
532
""" Cog for handling crosspost-style spam. """ import logging from futaba.str_builder import StringBuilder from ..abc import AbstractCog from collections import OrderedDict from discord import MessageType from binascii import crc32 logger = logging.getLogger(__name__) __all__ = ["Crosspost"] class LRUDict(Ordere...
[ 37811, 198, 34, 519, 329, 9041, 3272, 7353, 12, 7635, 18084, 13, 198, 37811, 198, 198, 11748, 18931, 198, 198, 6738, 13294, 15498, 13, 2536, 62, 38272, 1330, 10903, 32875, 198, 6738, 11485, 39305, 1330, 27741, 34, 519, 198, 6738, 17268,...
3.289256
121
#! /bin/python __author__ = "glender" __copyright__ = "Copyright (c) 2018 glender" __credits__ = [ "glender" ] __license__ = "MIT" __version__ = "0.1" __maintainer__ = "glender" __email__ = "None" __status__ = "Production" # Elliptic curve class # Init class # Get the Z_value # Determine if point is on curve ...
[ 2, 0, 1220, 8800, 14, 29412, 198, 834, 9800, 834, 796, 366, 4743, 2194, 1, 198, 834, 22163, 4766, 834, 796, 366, 15269, 357, 66, 8, 2864, 1278, 2194, 1, 198, 834, 66, 20696, 834, 796, 685, 366, 4743, 2194, 1, 2361, 198, 834, 430...
2.303333
300
import os import numpy as np ''' 图片文件重命名 格式: Acadian_Flycatcher/Acadian_Flycatcher_1.jpg Acadian_Flycatcher/Acadian_Flycatcher_2.jpg ... ''' def reName(dirname): ''' 实现将所有类别中的所有文件重新命名 ''' # 该文件夹下所有的文件(包括文件夹) for category in os.listdir(dirname): # print(category) ...
[ 11748, 28686, 201, 198, 11748, 299, 32152, 355, 45941, 220, 201, 198, 201, 198, 7061, 6, 201, 198, 32368, 122, 31965, 229, 23877, 229, 20015, 114, 34932, 235, 37772, 121, 28938, 235, 201, 198, 43718, 120, 28156, 237, 171, 120, 248, 20...
1.471396
874
#!/usr/bin/env python3 ## True, если указанный символ - пробельный символ или спецсимвол(';', '.', ')' и т.д.)
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2235, 6407, 11, 12466, 113, 21727, 30143, 18849, 220, 35072, 31583, 16142, 140, 115, 16142, 22177, 22177, 45035, 140, 117, 220, 21727, 18849, 43108, 38857, 25443, 119, 532, 12466,...
1.230769
91
''' Copyright (c) 2008, appengine-utilities project All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the ...
[ 7061, 6, 198, 15269, 357, 66, 8, 3648, 11, 598, 18392, 12, 315, 2410, 1628, 198, 3237, 2489, 10395, 13, 198, 198, 7738, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, 11, 351, 393, 1231, 17613, 11, 389, 10431, 2810, 326, 262, 1...
3.819149
470
''' program: cross_dimensional_monte_carlo.py created: 2016-07-13 -- 19:30 CEST author: tc ''' import random import cPickle from probability_distributions import prob as P # Parameters for the a-priori distributions xmin = 0.0 xmax = 10.0 def apriori_prob(nold, nnew, x): ''' Return the *normalized* a-prio...
[ 7061, 6, 198, 23065, 25, 3272, 62, 19577, 62, 2144, 660, 62, 7718, 5439, 13, 9078, 198, 25598, 25, 1584, 12, 2998, 12, 1485, 1377, 678, 25, 1270, 327, 6465, 198, 9800, 25, 37096, 198, 7061, 6, 198, 198, 11748, 4738, 198, 11748, 26...
2.19363
1,193
import tensorflow as tf import time import numpy as np import pickle from tensorflow.contrib.rnn import LSTMCell, MultiRNNCell, DropoutWrapper from tensorflow.contrib.layers import xavier_initializer from tensorflow.python import debug as tf_debug from tensorflow.contrib.rnn import LSTMStateTuple from sru_layer impo...
[ 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 640, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2298, 293, 198, 198, 6738, 11192, 273, 11125, 13, 3642, 822, 13, 81, 20471, 1330, 406, 2257, 9655, 695, 11, 15237, 49, 6144, 28780, ...
3.072727
110
""" Shared settings IMPORTANT NOTE: These settings are described with docstrings for the purpose of automated documentation. You may find reading some of the docstrings easier to understand or read in the documentation itself. http://earthgecko-skyline.readthedocs.io/en/latest/skyline.html#module-settings """ RED...
[ 37811, 198, 2484, 1144, 6460, 198, 198, 3955, 15490, 8643, 24550, 25, 198, 198, 4711, 6460, 389, 3417, 351, 2205, 37336, 329, 262, 4007, 286, 16359, 198, 22897, 341, 13, 220, 921, 743, 1064, 3555, 617, 286, 262, 2205, 37336, 4577, 284...
2.959357
22,464
from pyAudioAnalysis import audioSegmentation as aS inputWavFile = "data/meeting-021219/part-1-nosilence.wav" gtFile = inputWavFile.replace(".wav", ".segments") [flagsInd, classesAll, acc, CM] = aS.mtFileClassification(inputWavFile, "data/knnSpeakerFemaleMale", "knn", plot_results=False, gt_file=gtFile) print('flagsI...
[ 6738, 12972, 21206, 32750, 1330, 6597, 41030, 14374, 355, 257, 50, 198, 198, 15414, 54, 615, 8979, 796, 366, 7890, 14, 1326, 13629, 12, 2999, 1065, 1129, 14, 3911, 12, 16, 12, 39369, 346, 594, 13, 45137, 1, 198, 13655, 8979, 796, 51...
2.581818
165
__author__ = 'Patrick' import csv b= open('eggs.csv','a') a=csv.writer(b) data=[["hello","thisworks"]] a.writerows(data) data=[["hello","thisworks2"]] a.writerows(data) b.close()
[ 834, 9800, 834, 796, 705, 32718, 6, 201, 198, 11748, 269, 21370, 201, 198, 65, 28, 1280, 10786, 33856, 82, 13, 40664, 41707, 64, 11537, 201, 198, 64, 28, 40664, 13, 16002, 7, 65, 8, 201, 198, 7890, 41888, 14692, 31373, 2430, 5661, ...
2.268293
82
import http.client import os import sys from datetime import datetime, timedelta import platform import docker import psutil version = '0.1.3.43' # color scheme c_black = '\033[30m' # black c_red = '\033[31m' # red c_green = '\033[32m' # green c_yellow = '\033[33m' # yellow c_blue = '\033[34m' # blue c_magenta =...
[ 11748, 2638, 13, 16366, 198, 11748, 28686, 198, 11748, 25064, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 11748, 3859, 198, 11748, 36253, 198, 11748, 26692, 22602, 198, 198, 9641, 796, 705, 15, 13, 16, 13, 18, 13, ...
1.854478
536
import logging from dataclasses import dataclass from python_testcontainers_smtp_example.mail_util import send ALARM_CANDY = "No more candy!!!" MAIL_MESSAGE_BODY = "Oh no! No more candy..." logger = logging.getLogger(__name__) @dataclass class Dashboard: """ Dashboard is generic class responsible to noti...
[ 11748, 18931, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 198, 6738, 21015, 62, 9288, 3642, 50221, 62, 5796, 34788, 62, 20688, 13, 4529, 62, 22602, 1330, 3758, 198, 198, 1847, 33456, 62, 34, 6981, 56, 796, 366, 2949, 517...
3.265823
237
from dyson.cli import CLI
[ 6738, 13147, 261, 13, 44506, 1330, 43749, 628 ]
3.375
8
# -*- coding: utf-8 -*- from __future__ import unicode_literals try: from django.core.urlresolvers import reverse, NoReverseMatch except ImportError: # Django 2.0 from django.urls import reverse, NoReverseMatch from django.db import models from django.contrib.postgres.fields import JSONField from django.u...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 28311, 25, 198, 220, 220, 220, 422, 42625, 14208, 13, 7295, 13, 6371, 411, 349, 690, 1330, 9...
3.244898
392
#!/usr/bin/env python3 # # Copyright 2016 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Input log file plugin. Repeatedly reads lines from a set of log files. Truncates each file when the maximum size has been re...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 198, 2, 15069, 1584, 383, 18255, 1505, 7294, 46665, 13, 1439, 2489, 10395, 13, 198, 2, 5765, 286, 428, 2723, 2438, 318, 21825, 416, 257, 347, 10305, 12, 7635, 5964, 326, 460, ...
2.66364
2,423
# Copyright (C) 2012 Hewlett-Packard Development Company, L.P. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICEN...
[ 2, 15069, 357, 34, 8, 2321, 30446, 15503, 12, 11869, 446, 7712, 5834, 11, 406, 13, 47, 13, 198, 2, 1439, 6923, 33876, 13, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 3415...
2.528684
1,778