content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
a = int(input("Enter a number: ")) b = int(input("Enter another number: ")) a = a+b b = a-b a = a-b print(a) print(b)
[ 64, 796, 493, 7, 15414, 7203, 17469, 257, 1271, 25, 366, 4008, 201, 198, 65, 796, 493, 7, 15414, 7203, 17469, 1194, 1271, 25, 366, 4008, 201, 198, 64, 796, 257, 10, 65, 201, 198, 65, 796, 257, 12, 65, 201, 198, 64, 796, 257, 1...
2.015873
63
import numpy as np from sklearn.ensemble import AdaBoostRegressor from sklearn.tree import DecisionTreeRegressor from sklearn import datasets from sklearn.metrics import mean_squared_error, explained_variance_score from sklearn.utils import shuffle import matplotlib.pyplot as plt if __name__ == '__main__': # Loa...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 1341, 35720, 13, 1072, 11306, 1330, 47395, 45686, 8081, 44292, 198, 6738, 1341, 35720, 13, 21048, 1330, 26423, 27660, 8081, 44292, 198, 6738, 1341, 35720, 1330, 40522, 198, 6738, 1341, 35720, 13, ...
2.71123
748
# Answer to exercise 3 in chapter 20 # # Exercise from: A Common-Sense Guide to Data Structures and Algorithms # Level Up Your Core Programming Skills # by Jay Wengrow and edited by Brian MacDonald import sys def greatest_profit(array: list): """given array return the maximum profit from one buy and sell the fo...
[ 2, 23998, 284, 5517, 513, 287, 6843, 1160, 220, 198, 2, 198, 2, 32900, 422, 25, 317, 8070, 12, 41166, 10005, 284, 6060, 32112, 942, 290, 978, 7727, 907, 220, 198, 2, 5684, 3205, 3406, 7231, 30297, 20389, 220, 198, 2, 416, 9180, 37...
2.988338
343
#!/usr/bin/python3 #filename:pickling.py #import cPickle as p import pickle as p shoplistfile=r'e:\test\shoplist.data' #the name of the file where we will store the object shoplist=['apple','-mango','-carrot'] #Write to the file fp=open(shoplistfile,'w') #p.dump(shoplist,fp) #dump the object to a file p.dump(shopl...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 2, 34345, 25, 27729, 1359, 13, 9078, 198, 198, 2, 11748, 269, 31686, 293, 355, 279, 198, 11748, 2298, 293, 355, 279, 198, 198, 24643, 4868, 7753, 28, 81, 6, 68, 7479, 9288, 59, 24643,...
2.629213
178
#!/pxrpythonsubst # # Copyright 2016 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: # ...
[ 2, 48443, 8416, 81, 79, 5272, 684, 549, 301, 198, 2, 198, 2, 15069, 1584, 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, ...
2.848084
1,435
# Test for the 'why do the frickin HTTPS certs not work?' issue. # See /etc/pki/tls/certs/how_to_add_a_cert.txt # Ok, so the default bundle is given by certifi: # python3 -m certifi # But this bundle does not have the cert I need for RT?? # The package is up-to-date. Well, I guess I need to keep manually overriding t...
[ 2, 6208, 329, 262, 705, 22850, 466, 262, 1216, 624, 259, 38288, 27802, 407, 670, 8348, 2071, 13, 198, 2, 4091, 1220, 14784, 14, 79, 4106, 14, 83, 7278, 14, 22583, 82, 14, 4919, 62, 1462, 62, 2860, 62, 64, 62, 22583, 13, 14116, 1...
2.796813
251
import sys, os sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) # from lib import timed # from lib import pytorch_knn_cuda
[ 11748, 25064, 11, 28686, 198, 17597, 13, 6978, 13, 28463, 7, 15, 11, 28686, 13, 6978, 13, 397, 2777, 776, 7, 418, 13, 6978, 13, 22179, 7, 418, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 828, 705, 492, 6, 22305, 198, 198, 2, ...
2.46875
64
function fp=der(a,x,h) % Calculates the derivate of a function numerically based % on the 5-pt Stencil % (c) 2011 Phillip Servio fp=(-feval(a,x+2*h)+8*feval(a,x+h)-8*feval(a,x-h)... +feval(a,x-2*h))/(12*h); end
[ 8818, 277, 79, 28, 1082, 7, 64, 11, 87, 11, 71, 8, 198, 4, 27131, 689, 262, 16124, 378, 286, 257, 2163, 5470, 1146, 1912, 198, 4, 319, 262, 642, 12, 457, 520, 268, 2856, 198, 4, 357, 66, 8, 2813, 29470, 3116, 952, 198, 46428, ...
2.047619
105
HTTP_REQUEST_ERROR = { "400": "Bad Request! 请求参数错误,请检查参数是否出现错误。", "401": "Unauthorized! 当前请求的用户需要验证,请检查是否包含响应相同的身份验证,如果已经包含,则服务器已经拒绝了这些证书。", "403": "Forbidden! 服务器拒绝请求", "404": "Not Found! 请求失败,页面不可用,资源找不到!", "405": "Method Not Allowed! 方法不允许,请检查使用请求方法!", } HTTP_REQUEST_SUCC = { "200...
[ 40717, 62, 2200, 35780, 62, 24908, 796, 1391, 201, 198, 220, 220, 220, 366, 7029, 1298, 366, 22069, 19390, 0, 5525, 107, 115, 162, 109, 224, 20998, 224, 46763, 108, 165, 242, 247, 46237, 107, 11, 46237, 115, 162, 96, 222, 162, 253, ...
0.905312
433
#!/usr/bin/env python #import lwipv6 #TODO doesn't even exist just yet #from ctypes import * #TODO only import stuff used from _pycolwipv6 import ffi from _pycolwipv6 import lib as lwipv6 from adapter import Adapter import os #class IP_ADDR(Structure): # _fields = [("addr", c_uint32 * 4)] #class lwip_stack(Struc...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 11748, 300, 86, 541, 85, 21, 1303, 51, 3727, 46, 1595, 470, 772, 2152, 655, 1865, 198, 2, 6738, 269, 19199, 1330, 1635, 1303, 51, 3727, 46, 691, 1330, 3404, 973, 198, 198, ...
2.557143
140
from abc import ABC from game.moves import MovementDirections from dataclasses import dataclass from events import Events from game.rules import MovementRule from game.moves import PlayerMovement from forseti.engine import CheatEngine, CheatEngineConfig from forseti.vote import Vote class Cheater(Player):...
[ 6738, 450, 66, 1330, 9738, 201, 198, 6738, 983, 13, 76, 5241, 1330, 15477, 13470, 507, 201, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 201, 198, 6738, 2995, 1330, 18715, 201, 198, 6738, 983, 13, 38785, 1330, 15477, 31929, 20...
3.161017
118
import os try: os.rename("teste.txt","teste.renomeado.txt") print("Arquivo renomeado!") except FileNotFoundError as erro: print("Arquivo inexistente") print("Descrição", erro) except PermissionError as erro: print("Sem permissão para acessar o arquivo") print("Descrição", erro) except FileExist...
[ 11748, 28686, 198, 198, 28311, 25, 198, 220, 220, 220, 28686, 13, 918, 480, 7203, 9288, 68, 13, 14116, 2430, 9288, 68, 13, 918, 462, 4533, 13, 14116, 4943, 198, 220, 220, 220, 3601, 7203, 3163, 421, 23593, 8851, 462, 4533, 2474, 8, ...
2.45
180
import tensorflow as tf
[ 11748, 11192, 273, 11125, 355, 48700, 198 ]
3.428571
7
""" discord.types ~~~~~~~~~~~~~~ Typings for the Discord API :copyright: (c) 2015-2021 Rapptz & (c) 2021-present Pycord Development :license: MIT, see LICENSE for more details. """
[ 37811, 198, 15410, 585, 13, 19199, 198, 15116, 8728, 4907, 198, 198, 31467, 654, 329, 262, 39462, 7824, 198, 198, 25, 22163, 4766, 25, 357, 66, 8, 1853, 12, 1238, 2481, 36962, 22877, 1222, 357, 66, 8, 33448, 12, 25579, 9485, 66, 585...
3.016393
61
import os import pytest import ucp
[ 11748, 28686, 198, 198, 11748, 12972, 9288, 198, 11748, 334, 13155, 628, 628, 628, 198 ]
2.8
15
from django.conf import settings from apiv1.serializers import CurrencySerializer from moneyed.localization import format_money from money import Money as Convert from moneyed import Money
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 2471, 452, 16, 13, 46911, 11341, 1330, 20113, 32634, 7509, 198, 6738, 1637, 276, 13, 12001, 1634, 1330, 5794, 62, 26316, 198, 198, 6738, 1637, 1330, 12911, 355, 38240, 198, 6738, 163...
4.222222
45
#!/usr/bin/env python2 import urllib2 import lxml.html import csv global url_list global visited global adjacency_lists global depth_list url_list = [] visited = [] adjacency_lists = {} depth_list = [] if __name__ == '__main__': find_all_links("https://www.cityofberkeley.info", 2) f = open('../data/url_list.txt...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 17, 198, 198, 11748, 2956, 297, 571, 17, 198, 11748, 300, 19875, 13, 6494, 198, 11748, 269, 21370, 628, 198, 20541, 19016, 62, 4868, 198, 20541, 8672, 198, 20541, 9224, 330, 1387, 62, 20713...
2.467925
265
from app import app from flask import render_template, jsonify, flash from utils import get_all_reminders, get_one_reminder, compress @app.route('/') @app.route('/r') @app.route('/r/<int:id>') @app.route('/dashboard')
[ 6738, 598, 1330, 598, 198, 6738, 42903, 1330, 8543, 62, 28243, 11, 33918, 1958, 11, 7644, 198, 6738, 3384, 4487, 1330, 651, 62, 439, 62, 2787, 29700, 11, 651, 62, 505, 62, 2787, 5540, 11, 27413, 198, 198, 31, 1324, 13, 38629, 10786,...
2.695122
82
from flask import Blueprint from flask import render_template, url_for, flash, redirect, request, abort from swim_log import db from swim_log.sessions.forms import LogSwim from swim_log.models import Session from flask_login import current_user, login_required sessions = Blueprint('sessions', __name__) @sessions.ro...
[ 6738, 42903, 1330, 39932, 198, 6738, 42903, 1330, 8543, 62, 28243, 11, 19016, 62, 1640, 11, 7644, 11, 18941, 11, 2581, 11, 15614, 198, 6738, 9422, 62, 6404, 1330, 20613, 198, 6738, 9422, 62, 6404, 13, 82, 6202, 13, 23914, 1330, 5972, ...
3.029557
203
from torch.autograd import Variable import torch, os from collections import Counter from batch import Batch from transformer import subsequentMask def rebatch(padIdx, batch): "fix order in torchtext to match ours" src, trg=batch.src.transpose(0,1), batch.trg.transpose(0,1) return Batch(src=src, trg=trg,...
[ 6738, 28034, 13, 2306, 519, 6335, 1330, 35748, 198, 11748, 28034, 11, 28686, 198, 6738, 17268, 1330, 15034, 198, 6738, 15458, 1330, 347, 963, 198, 6738, 47385, 1330, 8840, 45195, 628, 198, 198, 4299, 3405, 963, 7, 15636, 7390, 87, 11, ...
2.929825
114
import chainer import chainer.links as L import chainer.functions as F import argparse import cv2 import numpy as np from glob import glob import matplotlib.pyplot as plt num_classes = 2 img_height, img_width = 32, 32 out_height, out_width = 32, 32 channel = 3 GPU = -1 import pickle import os # train # test...
[ 11748, 6333, 263, 198, 11748, 6333, 263, 13, 28751, 355, 406, 198, 11748, 6333, 263, 13, 12543, 2733, 355, 376, 198, 11748, 1822, 29572, 198, 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 15095, 1330, 15095, 198, ...
2.505455
275
from typing import List, Tuple, Dict import numpy as np import tensorflow as tf
[ 6738, 19720, 1330, 7343, 11, 309, 29291, 11, 360, 713, 201, 198, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 11192, 273, 11125, 355, 48700, 201, 198, 201, 198 ]
2.806452
31
import numpy as np __all__ = ['variation1', 'variation2', 'elastic_net']
[ 11748, 299, 32152, 355, 45941, 628, 198, 834, 439, 834, 796, 37250, 25641, 341, 16, 3256, 705, 25641, 341, 17, 3256, 705, 417, 3477, 62, 3262, 20520, 628, 628 ]
2.689655
29
from olo.libs.compiler.prelude_names import PL_TRANS_FUNC from olo.libs.cache import LRUCache from olo.debug import debug code_cache = LRUCache(128)
[ 6738, 267, 5439, 13, 8019, 82, 13, 5589, 5329, 13, 79, 2411, 2507, 62, 14933, 1330, 9297, 62, 5446, 15037, 62, 42296, 34, 198, 6738, 267, 5439, 13, 8019, 82, 13, 23870, 1330, 37491, 9598, 4891, 198, 6738, 267, 5439, 13, 24442, 1330,...
2.655172
58
import torch import torch.nn as nn from torchvision import models from models.cifar_class import DeepNet from models.alexnet_truncated import alexnet_truncated
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 198, 6738, 28034, 10178, 1330, 4981, 198, 198, 6738, 4981, 13, 66, 361, 283, 62, 4871, 1330, 10766, 7934, 198, 198, 6738, 4981, 13, 1000, 87, 3262, 62, 2213, 19524, 515, ...
3.215686
51
import stripe class Subscription: """ all stripe subscription methods """ def get_subscription_list(self): """ subscription list all """ return stripe.Subscription.list() def get_subscription(self, id: str): """ get indivisual subscription detail """ return stripe.Subscri...
[ 11748, 39858, 628, 198, 4871, 3834, 33584, 25, 198, 220, 220, 220, 37227, 477, 39858, 14569, 5050, 37227, 628, 220, 220, 220, 825, 651, 62, 7266, 33584, 62, 4868, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 14569, 1...
2.973684
114
"""Constant for Plugwise component.""" DOMAIN = "plugwise" SENSOR_PLATFORMS = ["sensor", "switch"] PLATFORMS_GATEWAY = ["binary_sensor", "climate", "sensor", "switch"] PW_TYPE = "plugwise_type" GATEWAY = "gateway" # Sensor mapping SENSOR_MAP_DEVICE_CLASS = 2 SENSOR_MAP_ICON = 3 SENSOR_MAP_MODEL = 0 SENSOR_MAP_UOM = 1...
[ 37811, 3103, 18797, 329, 22689, 3083, 7515, 526, 15931, 198, 39170, 29833, 796, 366, 16875, 3083, 1, 198, 198, 50, 16938, 1581, 62, 6489, 1404, 13775, 5653, 796, 14631, 82, 22854, 1600, 366, 31943, 8973, 198, 6489, 1404, 13775, 5653, 62...
2.231687
587
from django.conf import settings from ledger.accounts.models import EmailUser, Address from ledger.address.models import Country from mooring.models import (MooringAreaPriceHistory, MooringsiteClassPriceHistory, Rate, Moorin...
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 37208, 13, 23317, 82, 13, 27530, 1330, 9570, 12982, 11, 17917, 198, 6738, 37208, 13, 21975, 13, 27530, 1330, 12946, 198, 6738, 285, 2675, 278, 13, 27530, 1330, 357, 44, 2675, 278, ...
2.085069
2,833
from asyncio import TimeoutError import os from typing import Union import aiohttp from discord import Member, Embed, Role, Guild, PublicUserFlags, Webhook, AsyncWebhookAdapter, errors from discord_slash import SlashContext, ContextMenuType, MenuContext from discord_slash.cog_ext import ( cog_slash as slash_comman...
[ 6738, 30351, 952, 1330, 3862, 448, 12331, 198, 11748, 28686, 198, 6738, 19720, 1330, 4479, 198, 198, 11748, 257, 952, 4023, 198, 6738, 36446, 1330, 10239, 11, 13302, 276, 11, 20934, 11, 16446, 11, 5094, 12982, 40053, 11, 5313, 25480, 11...
3.424658
219
# automatically generated by the FlatBuffers compiler, do not modify # namespace: FBOutput import tdw.flatbuffers
[ 2, 6338, 7560, 416, 262, 21939, 36474, 364, 17050, 11, 466, 407, 13096, 201, 198, 201, 198, 2, 25745, 25, 13186, 26410, 201, 198, 201, 198, 11748, 41560, 86, 13, 38568, 36873, 364, 201, 198 ]
3.457143
35
__author__ = 'Chetan' s = Singleton() ## class initialized, but object not created print("Object created", Singleton.getInstance()) ## Gets created here s1 = Singleton() ## instance already created
[ 834, 9800, 834, 796, 705, 34, 3202, 272, 6, 201, 198, 201, 198, 82, 796, 5573, 10565, 3419, 22492, 1398, 23224, 11, 475, 2134, 407, 2727, 201, 198, 4798, 7203, 10267, 2727, 1600, 5573, 10565, 13, 1136, 33384, 28955, 22492, 29620, 2727...
3.578947
57
import aiomysql import asyncio #from contextlib import asynccontextmanager import os from dotenv import load_dotenv load_dotenv() loop = asyncio.get_event_loop() #@asynccontextmanager django_loop = asyncio.get_event_loop()
[ 11748, 257, 29005, 893, 13976, 198, 11748, 30351, 952, 198, 2, 6738, 4732, 8019, 1330, 355, 2047, 535, 261, 5239, 37153, 198, 11748, 28686, 198, 6738, 16605, 24330, 1330, 3440, 62, 26518, 24330, 198, 2220, 62, 26518, 24330, 3419, 198, 1...
2.860759
79
#!/usr/bin/env python import numpy as np import math import tensorflow as tf distance_tf() # eof ##############################################################################
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 10688, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 198, 30246, 62, 27110, 3419, 198, 198, 2, 304, 1659, 198, 29113, 29113, 7804, 4242,...
4.162791
43
import os import sys import unittest from assertpy import assert_that import behave_restful._utils as br_utils if __name__ == "__main__": unittest.main()
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 555, 715, 395, 198, 198, 6738, 6818, 9078, 1330, 6818, 62, 5562, 198, 198, 11748, 17438, 62, 2118, 913, 13557, 26791, 355, 865, 62, 26791, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 8...
2.910714
56
from .generic_typeform import GenericTypeformFeedback # noqa from .user_generic_typeform import UserGenericTypeformFeedback # noqa
[ 6738, 764, 41357, 62, 4906, 687, 1330, 42044, 6030, 687, 18332, 1891, 220, 220, 1303, 645, 20402, 198, 6738, 764, 7220, 62, 41357, 62, 4906, 687, 1330, 11787, 46189, 6030, 687, 18332, 1891, 220, 220, 220, 220, 220, 1303, 645, 20402, 1...
3.285714
42
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2021, Myriota Pty Ltd, All Rights Reserved # SPDX-License-Identifier: BSD-3-Clause-Attribution # # This file is licensed under the BSD with attribution (the "License"); you # may not use these files except in compliance with the License. # # You may obtain ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 357, 66, 8, 33448, 11, 2011, 380, 4265, 350, 774, 12052, 11, 1439, 6923, 33876, 198, 2, 30628, 55, 12, 34...
2.650602
498
from .constants import * from .extractors import * from .parsers import * from .models import * from .recognizers_choice import *
[ 6738, 764, 9979, 1187, 1330, 1635, 198, 6738, 764, 2302, 974, 669, 1330, 1635, 198, 6738, 764, 79, 945, 364, 1330, 1635, 198, 6738, 764, 27530, 1330, 1635, 198, 6738, 764, 26243, 11341, 62, 25541, 1330, 1635, 198 ]
3.421053
38
#!/usr/bin/env python import numpy as np import matplotlib.pyplot as plt L = [1, 5, 10, 25, 50, 100] #rpi = [74.02, __, 72.76, __, 76.16] v = np.array([0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.75, 1]) rpi_v = np.array([100, 72.76, 56.99, 42.58, 31.65, 25.26, 13.59, 8]) correlation = np.load('correlation_qz.npz') no_correlatio...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 43, 796, 685, 16, 11, 642, 11, 838, 11, 1679, 11, 2026, 11, 1802, 60, 19...
2.155187
1,205
import math, random, re, tinted from . import nodes, talon
[ 11748, 10688, 11, 4738, 11, 302, 11, 34791, 276, 198, 6738, 764, 1330, 13760, 11, 3305, 261, 628, 628, 628, 198 ]
3.095238
21
from django import forms from .models import Order from shop.models import buyingList
[ 6738, 42625, 14208, 1330, 5107, 198, 198, 6738, 764, 27530, 1330, 8284, 198, 6738, 6128, 13, 27530, 1330, 7067, 8053 ]
4.3
20
import sys import os import copy import collections import hashlib import numpy as np import openmoc # For Python 2.X.X if sys.version_info[0] == 2: from log import py_printf import checkvalue as cv # For Python 3.X.X else: from openmoc.log import py_printf import openmoc.checkvalue as cv if sys.ver...
[ 11748, 25064, 198, 11748, 28686, 198, 11748, 4866, 198, 11748, 17268, 198, 11748, 12234, 8019, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 1280, 76, 420, 198, 198, 2, 1114, 11361, 362, 13, 55, 13, 55, 198, 361, 25064, 13...
2.257308
15,017
import json import boto3 from boto3.dynamodb.conditions import Key, Attr
[ 11748, 33918, 198, 11748, 275, 2069, 18, 198, 6738, 275, 2069, 18, 13, 67, 4989, 375, 65, 13, 17561, 1756, 1330, 7383, 11, 3460, 81 ]
2.88
25
import abc from ..protocols import types MAX_SUPPORTED_VERSION = types.APIVersion(2, 5) #: The maximum supported protocol API version in this release V2_MODULE_DEF_VERSION = types.APIVersion(2, 3) #: The first API version in which we prefer the v2 module defs
[ 11748, 450, 66, 198, 198, 6738, 11485, 11235, 4668, 82, 1330, 3858, 198, 198, 22921, 62, 40331, 15490, 1961, 62, 43717, 796, 3858, 13, 2969, 3824, 6900, 7, 17, 11, 642, 8, 198, 2, 25, 383, 5415, 4855, 8435, 7824, 2196, 287, 428, 2...
3.142857
84
from common.utils import crypt_utils from bright import settings row_data = [ { 'name': 'super', } ]
[ 6738, 2219, 13, 26791, 1330, 8194, 62, 26791, 198, 6738, 6016, 1330, 6460, 198, 198, 808, 62, 7890, 796, 685, 198, 220, 220, 220, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 705, 3672, 10354, 705, 16668, 3256, 198, 220, 220, 220, ...
2.510638
47
import re import os import pokepy from pyrogram import Client, filters from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton from pyrogram.types import InlineQueryResultArticle, InputTextMessageContent from pokemon import pokemon_text from moveset import moveset_text from locations import locations_te...
[ 11748, 302, 198, 11748, 28686, 198, 198, 11748, 22620, 9078, 198, 6738, 12972, 39529, 1330, 20985, 11, 16628, 198, 6738, 12972, 39529, 13, 19199, 1330, 554, 1370, 9218, 3526, 9704, 929, 11, 554, 1370, 9218, 3526, 21864, 198, 6738, 12972, ...
2.579869
457
# -*- coding: utf-8 -*- """ Copyright (c) 2019, Andreas Koenzen <akoenzen | uvic.ca> 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 not...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 15269, 357, 66, 8, 13130, 11, 33728, 49178, 4801, 1279, 461, 6571, 4801, 930, 334, 25531, 13, 6888, 29, 198, 3237, 2489, 10395, 13, 198, 198, 7738, 39...
3.085954
954
# -*- coding: utf-8 -*- """ This script creates the plot with the data downloaded by 'get_data.py' """ import numpy as np import yt.mods as ytm from tvtk.api import tvtk from mayavi import mlab from tvtk.util.ctf import PiecewiseFunction from tvtk.util.ctf import ColorTransferFunction from astropy.io import fits # py...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 1212, 4226, 8075, 262, 7110, 351, 262, 1366, 15680, 416, 705, 1136, 62, 7890, 13, 9078, 6, 198, 37811, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 331, ...
2.223737
2,494
import shutil from typing import Any, Dict, Optional, Tuple from faker import Faker from nig.endpoints import INPUT_ROOT from restapi.services.authentication import Role from restapi.tests import API_URI, BaseTests, FlaskClient
[ 11748, 4423, 346, 198, 6738, 19720, 1330, 4377, 11, 360, 713, 11, 32233, 11, 309, 29291, 198, 198, 6738, 277, 3110, 1330, 376, 3110, 198, 6738, 44873, 13, 437, 13033, 1330, 3268, 30076, 62, 13252, 2394, 198, 6738, 1334, 15042, 13, 304...
3.5
66
data = ( 'Xiao ', # 0x00 'Suo ', # 0x01 'Li ', # 0x02 'Zheng ', # 0x03 'Chu ', # 0x04 'Guo ', # 0x05 'Gao ', # 0x06 'Tie ', # 0x07 'Xiu ', # 0x08 'Cuo ', # 0x09 'Lue ', # 0x0a 'Feng ', # 0x0b 'Xin ', # 0x0c 'Liu ', # 0x0d 'Kai ', # 0x0e 'Jian ', # 0x0f 'Rui ', # 0x10 '...
[ 7890, 796, 357, 198, 6, 55, 13481, 46083, 220, 220, 220, 1303, 657, 87, 405, 198, 6, 5606, 78, 46083, 220, 220, 220, 1303, 657, 87, 486, 198, 6, 32304, 46083, 220, 220, 220, 1303, 657, 87, 2999, 198, 6, 57, 31753, 46083, 220, 22...
1.529662
3,051
from setuptools import setup setup(name='bankingapi', version='0.1.5', description='Banking API', url='http://github.com/IJustDev/BankingAPI', author='ijustdev', author_email='alexanderpanovi@yahoo.de', license='MIT', long_description=read_me(), packages=['bankingapi',...
[ 6738, 900, 37623, 10141, 1330, 9058, 628, 198, 198, 40406, 7, 3672, 11639, 65, 15230, 15042, 3256, 198, 220, 220, 220, 220, 220, 2196, 11639, 15, 13, 16, 13, 20, 3256, 198, 220, 220, 220, 220, 220, 6764, 11639, 33, 15230, 7824, 3256...
2.398876
178
# 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...
4.403101
129
import cv2 import math import numpy as np
[ 11748, 269, 85, 17, 198, 11748, 10688, 198, 11748, 299, 32152, 355, 45941 ]
3.153846
13
import argparse import os import warnings import pandas as pd import torch import tqdm from dataset import load_test_dataset from modeling import SiDClassifier, SiDConfig os.environ["TOKENIZERS_PARALLELISM"] = "false" warnings.filterwarnings("ignore") @torch.no_grad() if __name__ == "__main__": parser = argp...
[ 11748, 1822, 29572, 198, 11748, 28686, 198, 11748, 14601, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 28034, 198, 11748, 256, 80, 36020, 198, 198, 6738, 27039, 1330, 3440, 62, 9288, 62, 19608, 292, 316, 198, 6738, 21128, 1330...
2.826316
190
from __future__ import print_function import torch import torch.nn as nn import torch.nn.functional as F import torch.nn as nn import torch.optim as optim from torchvision import datasets, transforms from torch.utils.data import DataLoader from torchvision import models from torchsummary import summary from tqdm import...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 40085, ...
2.229831
1,475
# -*- coding: utf-8 -*- """ Created on Sun Mar 25 14:09:46 2018 @author: JSong """ import pandas as pd import numpy as np from scipy import stats from sklearn.utils.multiclass import type_of_target __all__=['WeightOfEvidence', 'chimerge', 'Discretization'] def check_array(X,ensure_DataFrame=True...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 3825, 1526, 1679, 1478, 25, 2931, 25, 3510, 2864, 198, 198, 31, 9800, 25, 26755, 506, 198, 37811, 198, 198, 11748, 19798, 292, 355, 279, 67, 19...
1.702096
4,008
import pytest import sqlalchemy as sa from sqlalchemy_utils import jsonb_sql @pytest.mark.usefixtures('postgresql_dsn')
[ 11748, 12972, 9288, 198, 11748, 44161, 282, 26599, 355, 473, 198, 198, 6738, 44161, 282, 26599, 62, 26791, 1330, 33918, 65, 62, 25410, 628, 198, 31, 9078, 9288, 13, 4102, 13, 1904, 69, 25506, 10786, 7353, 34239, 13976, 62, 9310, 77, 1...
2.860465
43
# Generated by Django 2.2 on 2020-06-21 14:20 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 319, 12131, 12, 3312, 12, 2481, 1478, 25, 1238, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.966667
30
import torch from torch import nn from ..utils import ReverseLayerF ##############################################################################################
[ 11748, 28034, 198, 6738, 28034, 1330, 299, 77, 198, 198, 6738, 11485, 26791, 1330, 31849, 49925, 37, 628, 198, 198, 29113, 29113, 14468, 7804, 4242, 2235, 220, 220 ]
6
28
from flask_bootstrap import Bootstrap bootstrap = Bootstrap()
[ 6738, 42903, 62, 18769, 26418, 1330, 18892, 26418, 628, 198, 18769, 26418, 796, 18892, 26418, 3419, 198 ]
3.764706
17
import re import time from pyhive import presto from pyhive.exc import DatabaseError from typing import Dict, List, Tuple from lib.query_executor.connection_string.helpers.common import ( split_hostport, random_choice, ) from lib.form import StructFormField, FormField from lib.metastore.base_metastore_loader i...
[ 11748, 302, 198, 11748, 640, 198, 6738, 12972, 71, 425, 1330, 16153, 78, 198, 6738, 12972, 71, 425, 13, 41194, 1330, 24047, 12331, 198, 6738, 19720, 1330, 360, 713, 11, 7343, 11, 309, 29291, 198, 198, 6738, 9195, 13, 22766, 62, 18558,...
2.362694
386
__version__ = '0.3.66' #from . import install, extend, _globals, core, examples, github, lumerical, scripts, utils, setup # from . import install, extend, _globals, core, examples, github, scripts, utils, setup from . import extend, _globals, core, examples, github, scripts, utils, setup, install
[ 834, 9641, 834, 796, 705, 15, 13, 18, 13, 2791, 6, 198, 2, 6738, 764, 1330, 2721, 11, 9117, 11, 4808, 4743, 672, 874, 11, 4755, 11, 6096, 11, 33084, 11, 300, 6975, 605, 11, 14750, 11, 3384, 4487, 11, 9058, 198, 2, 422, 764, 13...
3.215054
93
from rest_framework import permissions
[ 6738, 1334, 62, 30604, 1330, 21627, 628 ]
5.714286
7
# # Generated with WaveTimeSeriesBlueprint from dmt.blueprint import Blueprint from dmt.dimension import Dimension from dmt.attribute import Attribute from dmt.enum_attribute import EnumAttribute from dmt.blueprint_attribute import BlueprintAttribute from sima.sima.blueprints.moao import MOAOBlueprint class WaveTimeS...
[ 2, 220, 198, 2, 2980, 515, 351, 17084, 7575, 27996, 14573, 4798, 198, 6738, 288, 16762, 13, 17585, 4798, 1330, 39932, 198, 6738, 288, 16762, 13, 46156, 1330, 34024, 198, 6738, 288, 16762, 13, 42348, 1330, 3460, 4163, 198, 6738, 288, 1...
3.504854
103
DEFAULT_CONFIG = { "start_money" : 500, "start_lootboxes": 3, "lootbox_price": { "common": 100, "uncommon": 300, "rare": 500, "epic": 800, "outstanding": 1000 }, # for each lootbox rarety define number of loot it contain as a range (min, max) "l...
[ 7206, 38865, 62, 10943, 16254, 796, 1391, 201, 198, 220, 220, 220, 366, 9688, 62, 26316, 1, 1058, 5323, 11, 201, 198, 220, 220, 220, 366, 9688, 62, 75, 1025, 29305, 1298, 513, 11, 201, 198, 220, 220, 220, 366, 75, 1025, 3524, 62, ...
1.759048
2,017
#!/usr/bin/env python # Copyright 2016 RAPP # 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...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 628, 198, 2, 15069, 1584, 371, 24805, 198, 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, 2845, 287, ...
2.783357
697
# TEST ON CPU #import pandas as pd import numpy as np import scipy.optimize as opt import scipy.io as sio import torch from torch.autograd import Variable, grad from time import time size=256 # --- Dirac example---# data = sio.loadmat('./data/demo_toy7d_N' + str(size) + '.mat') im = data['imgs'] im = torch.tensor...
[ 2, 43001, 6177, 9135, 198, 198, 2, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 629, 541, 88, 13, 40085, 1096, 355, 2172, 198, 11748, 629, 541, 88, 13, 952, 355, 264, 952, 198, 198, 11748, ...
1.817124
1,203
from more_itertools import ilen from my.google import events from my.google.models import Location, AppInstall, LikedVideo, HtmlComment, HtmlEvent
[ 6738, 517, 62, 270, 861, 10141, 1330, 4229, 268, 198, 198, 6738, 616, 13, 13297, 1330, 2995, 198, 6738, 616, 13, 13297, 13, 27530, 1330, 13397, 11, 2034, 15798, 11, 406, 17951, 10798, 11, 367, 20369, 21357, 11, 367, 20369, 9237, 628 ]
3.547619
42
from django import template from django.utils.datastructures import SortedDict register = template.Library() @register.filter(name='sortcosts') listsort.is_safe = True
[ 6738, 42625, 14208, 1330, 11055, 198, 6738, 42625, 14208, 13, 26791, 13, 19608, 459, 1356, 942, 1330, 311, 9741, 35, 713, 198, 198, 30238, 796, 11055, 13, 23377, 3419, 198, 198, 31, 30238, 13, 24455, 7, 3672, 11639, 30619, 15805, 82, ...
3.269231
52
# preparation import pandas as pd emg_dataframe = ( pd.read_csv("../../data/emgs.csv") .query('filename == "12kg_H2_3"')["delt_ant"] .values ) # solution above_average = emg_dataframe[emg_dataframe > emg_dataframe.mean()] mu = above_average.mean() sigma = above_average.std() (above_average > mu + sigma).s...
[ 2, 11824, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 368, 70, 62, 7890, 14535, 796, 357, 198, 220, 220, 220, 279, 67, 13, 961, 62, 40664, 7203, 40720, 40720, 7890, 14, 368, 14542, 13, 40664, 4943, 198, 220, 220, 220, 764, 227...
2.462585
147
import sys from itertools import combinations if __name__ == '__main__': print(main())
[ 11748, 25064, 198, 6738, 340, 861, 10141, 1330, 17790, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 3601, 7, 12417, 28955, 198 ]
3.032258
31
"""Check whether base classifier prediction data is correctly formatted. Functions: - _check_rank_data: Throws error if data are not an ndarray or sample ranks - _check_binary_data: Throws error if data are not an ndarray or binary values [-1, 1]. """ import numpy as np def check_rank_data(data): """Test whether...
[ 37811, 9787, 1771, 2779, 1398, 7483, 17724, 1366, 318, 9380, 39559, 13, 198, 198, 24629, 2733, 25, 198, 12, 4808, 9122, 62, 43027, 62, 7890, 25, 536, 8516, 4049, 611, 1366, 389, 407, 281, 299, 67, 18747, 393, 6291, 9803, 198, 12, 48...
2.591709
796
#!/usr/bin/python2.7 #/**************************************************************************** #* * #* OpenNI 2.x Alpha * #* Copyright (C) 2012 PrimeSense Ltd. ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 17, 13, 22, 198, 198, 2, 14, 17174, 17174, 46068, 198, 2, 9, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 22...
2.15942
2,208
import configparser import json from fast_arrow import ( Client, Option, OptionChain, OptionOrder, Vertical, Stock ) import math print("----- running {}".format(__file__)) # # get auth_data (see https://github.com/westonplatter/fast_arrow_auth) # with open("fast_arrow_auth.json") as f: aut...
[ 11748, 4566, 48610, 198, 11748, 33918, 198, 6738, 3049, 62, 6018, 1330, 357, 198, 220, 220, 220, 20985, 11, 198, 220, 220, 220, 16018, 11, 198, 220, 220, 220, 16018, 35491, 11, 198, 220, 220, 220, 16018, 18743, 11, 198, 220, 220, 22...
2.645161
217
import logging from typing import cast from opentrons.config.feature_flags import enable_http_protocol_sessions from robot_server.service.session.errors import UnsupportedFeature, \ SessionCreationException from robot_server.service.session.models.session import SessionType, \ SessionDetails from robot_server...
[ 11748, 18931, 198, 6738, 19720, 1330, 3350, 198, 198, 6738, 1034, 298, 12212, 13, 11250, 13, 30053, 62, 33152, 1330, 7139, 62, 4023, 62, 11235, 4668, 62, 82, 6202, 198, 198, 6738, 9379, 62, 15388, 13, 15271, 13, 29891, 13, 48277, 1330...
3.729508
244
import asyncio from imapclient import IMAPClient import datetime from core.events.drivers import DriverOperCreate from .parsers import parse_body, parse_header from .config import LEGAL_SENDERS GATHER_POOL_SIZE = 8
[ 11748, 30351, 952, 198, 6738, 545, 499, 16366, 1330, 8959, 2969, 11792, 198, 11748, 4818, 8079, 198, 6738, 4755, 13, 31534, 13, 36702, 1330, 12434, 18843, 16447, 198, 6738, 764, 79, 945, 364, 1330, 21136, 62, 2618, 11, 21136, 62, 25677,...
3.348485
66
from flask import render_template from ..models.user import User from ..utils.sessions import get_session from ..utils.gravatar import Gravatar def main(useruid: str, number: str): """ 題目通過者畫面 """ user = User(useruid) session = get_session(useruid) question = session.get_question()[number] ...
[ 6738, 42903, 1330, 8543, 62, 28243, 198, 6738, 11485, 27530, 13, 7220, 1330, 11787, 198, 6738, 11485, 26791, 13, 82, 6202, 1330, 651, 62, 29891, 198, 6738, 11485, 26791, 13, 70, 4108, 9459, 1330, 32599, 9459, 628, 198, 4299, 1388, 7, ...
2.265583
738
from django.conf import settings from django.conf.urls import include, url from django.views.decorators.cache import cache_page from .feeds import ArticleFeed from .views import SourceSearchView, HomepageView, SlackMessageView from haystack.forms import SearchForm from haystack.query import SearchQuerySet from haystac...
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 2291, 11, 19016, 198, 6738, 42625, 14208, 13, 33571, 13, 12501, 273, 2024, 13, 23870, 1330, 12940, 62, 7700, 198, 198, 6738, 764, 12363, ...
2.182946
1,290
import math import numpy as np from scipy import signal def gaussianBeam(size_x, bmaj, bmin, bpa, size_y=None): """ Generate and return a 2D Gaussian function of dimensions (size_x,size_y). See Briggs PhD (Appendix B) for details. :param size_x: Size of first dimension [pixels]. :par...
[ 11748, 10688, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 1330, 6737, 628, 198, 4299, 31986, 31562, 3856, 321, 7, 7857, 62, 87, 11, 275, 76, 1228, 11, 275, 1084, 11, 275, 8957, 11, 2546, 62, 88, 28, 14202, 2599, 1...
2.2
690
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Jan 19 17:46:41 2021 @author: dopiwoo We are given an array containing 'n' objects. Each object, when created, was assigned a unique number from 1 to 'n' based on their creation sequence. This means that the object with sequence number '3' was created ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 30030, 2365, 678, 1596, 25, 3510, 25, 3901, 33448, 198, 198, 31, 9800, 25, 22340, 14246, ...
2.406302
603
from collections import deque # Ordered collection with ends import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from graduationmgm.lib.DDQN_train import DuelingTrain
[ 6738, 17268, 1330, 390, 4188, 220, 1303, 14230, 1068, 4947, 351, 5645, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 11748...
3.545455
66
#!/usr/bin/env python # -*- coding: utf-8 -*- # general requirements import unittest from .test_structure.server_control import Server from .test_structure.bayernluefter_mock_server import BayernLuftHandler, BayernLuftServer # For the server in this case import time # For the tests import aiohttp import asyncio from...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 2276, 5359, 198, 11748, 555, 715, 395, 198, 6738, 764, 9288, 62, 301, 5620, 13, 15388, 62, 13716, 1330, 9652,...
2.950311
161
""" # Copyright (c) 2018 Works Applications Co., Ltd. # # 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...
[ 37811, 198, 2, 15069, 357, 66, 8, 2864, 10933, 26622, 1766, 1539, 12052, 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, 2845, 287, 11...
3.759036
166
from __future__ import unicode_literals, absolute_import from django.contrib.contenttypes.models import ContentType from django.forms.models import model_to_dict from django.db import models from .default_settings import settings as audit_settings from .models import ModelChange from . import signals tracked_models...
[ 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 11, 4112, 62, 11748, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 11299, 19199, 13, 27530, 1330, 14041, 6030, 198, 6738, 42625, 14208, 13, 23914, 13, 27530, 1330, 2746, 62,...
3.35905
337
#!/usr/bin/env python import rospy from std_msgs.msg import String import time if __name__ == "__main__": rospy.init_node("rospy_udp_test") test_pub = rospy.Publisher("/chatter", String, queue_size=1) while not rospy.is_shutdown(): test_pub.publish("arm->nvidia") rospy.loginfo("published: ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 686, 2777, 88, 198, 6738, 14367, 62, 907, 14542, 13, 19662, 1330, 10903, 198, 11748, 640, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, ...
2.253165
158
from ..objects.base_object import BaseObject from .base_operator import BaseOperator
[ 6738, 11485, 48205, 13, 8692, 62, 15252, 1330, 7308, 10267, 198, 6738, 764, 8692, 62, 46616, 1330, 7308, 18843, 1352, 628 ]
4.095238
21
from django.urls import path from . import views # handler404 = views.handler404 # handler500 = views.handler500 # if settings.DEBUG: # urlpatterns += patterns('', # (r'^500/$', '500.html'), # # (r'^404/$', 'django.views.generic.simple.direct_to_template', {'template': '404.html'}), # ) urlp...
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 6738, 764, 1330, 5009, 198, 198, 2, 21360, 26429, 796, 5009, 13, 30281, 26429, 198, 2, 21360, 4059, 796, 5009, 13, 30281, 4059, 198, 198, 2, 611, 6460, 13, 30531, 25, 198, 2, 220, ...
2.513158
380
import asyncio import logging from launart.manager import Launart from launart.service import Service from launart.utilles import wait_fut from loguru import logger from uvicorn import Config, Server from graia.amnesia.builtins.common import ASGIHandlerProvider
[ 11748, 30351, 952, 198, 11748, 18931, 198, 198, 6738, 2698, 433, 13, 37153, 1330, 19826, 433, 198, 6738, 2698, 433, 13, 15271, 1330, 4809, 198, 6738, 2698, 433, 13, 315, 21718, 1330, 4043, 62, 69, 315, 198, 6738, 2604, 14717, 1330, 49...
3.760563
71
import requests import datetime import json from time import sleep from fake_useragent import UserAgent from win10toast import ToastNotifier temp_user_agent = UserAgent() browser_header = {'User-Agent': temp_user_agent.random} ### Variables ## Important Variables # 0 = Search entire state, 1 = Search only a single d...
[ 11748, 7007, 198, 11748, 4818, 8079, 198, 11748, 33918, 198, 6738, 640, 1330, 3993, 198, 6738, 8390, 62, 7220, 25781, 1330, 11787, 36772, 198, 6738, 1592, 940, 1462, 459, 1330, 46831, 3673, 7483, 198, 198, 29510, 62, 7220, 62, 25781, 79...
2.67031
549
# File: inheritance_triangle.py # Purpose: Inheritance is a tricky concept, so let's go through it step by step. # Programmer: Amal Shehu # Course: Codecademy # Date: Wednesday 31st August 2016, 10:29 AM class Shape(object): """Makes shapes!""" # Added inherited Triangle class below!
[ 2, 220, 9220, 25, 220, 220, 220, 220, 220, 220, 24155, 62, 28461, 9248, 13, 9078, 198, 2, 220, 32039, 25, 220, 220, 220, 47025, 42942, 318, 257, 17198, 3721, 11, 523, 1309, 338, 467, 832, 340, 2239, 416, 2239, 13, 198, 2, 220, 6...
2.837838
111
import tnetwork as tn import sklearn import sklearn.metrics import scipy import statistics import networkx as nx from tnetwork.DCD.analytics.onmi import onmi import numpy as np __all__ = ["longitudinal_similarity", "consecutive_sn_similarity", "similarity_at_each_step", "entropy_by_node","nb_node_change","quality_at_e...
[ 11748, 256, 27349, 355, 256, 77, 198, 11748, 1341, 35720, 198, 11748, 1341, 35720, 13, 4164, 10466, 198, 11748, 629, 541, 88, 198, 11748, 7869, 198, 11748, 3127, 87, 355, 299, 87, 198, 6738, 256, 27349, 13, 35, 8610, 13, 38200, 14094,...
2.530904
4,061
"""Implementation of the CART algorithm to train decision tree classifiers.""" import numpy as np import ray from sklearn import datasets, metrics import time import tempfile import os import json """Binary tree with decision tree semantics and ASCII visualization.""" class Node: """A decision tree node.""" ...
[ 37811, 3546, 32851, 286, 262, 327, 7227, 11862, 284, 4512, 2551, 5509, 1398, 13350, 526, 15931, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 26842, 198, 6738, 1341, 35720, 1330, 40522, 11, 20731, 198, 11748, 640, 198, 11748, 20218, 775...
2.267682
3,874
# Create your views here. from django.http import HttpResponse from django.utils import timezone from .models import coc from django.shortcuts import render # Create your views here.
[ 198, 198, 2, 13610, 534, 5009, 994, 13, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 198, 6738, 42625, 14208, 13, 26791, 1330, 640, 11340, 198, 6738, 764, 27530, 1330, 8954, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330...
3.647059
51
# -*- coding: utf-8 -*- """ transistor.schedulers.brokers ~~~~~~~~~~~~ This module implements classes, methods, and functions to enable Transistor to connect to a RabbitMQ message broker (queue manager) or else Redis. Helpful tutorials: https://www.cloudamqp.com/blog/2015-05-18-part1-rabbitmq-for-beginners-what-is-rab...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 7645, 32380, 13, 1416, 704, 377, 364, 13, 7957, 15949, 198, 15116, 8728, 198, 1212, 8265, 23986, 6097, 11, 5050, 11, 290, 5499, 284, 7139, 198, 8291, 32380, ...
3.078212
179
from __future__ import absolute_import from django.core.urlresolvers import reverse from sentry.models import AuditLogEntry, AuditLogEntryEvent, OrganizationMember from sentry.testutils import TestCase
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 6738, 42625, 14208, 13, 7295, 13, 6371, 411, 349, 690, 1330, 9575, 198, 198, 6738, 1908, 563, 13, 27530, 1330, 46450, 11187, 30150, 11, 46450, 11187, 30150, 9237, 11, 12275, 2760...
3.942308
52
# -*- coding: utf-8 -*- """ tsv === Module to handle Eurostat bulk-download TSV files. """ import numpy as np import pandas as pd def read(path, clean=True, format='long'): """Return the contents of `path` as a pandas DataFrame object. Parameters ========== path : string Path to input data...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 912, 85, 198, 18604, 198, 26796, 284, 5412, 1898, 14269, 11963, 12, 15002, 26136, 53, 3696, 13, 198, 198, 37811, 628, 198, 11748, 299, 32152, 355, 45941, 198...
2.522208
1,576
from __future__ import annotations import enum import json import logging import os import platform import pydantic from typing import Any, Optional, Union import aiofiles import asyncio import backoff import devtools import httpx import pydantic import servo import servo.api from servo.logging import InterceptHandl...
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 11748, 33829, 198, 11748, 33918, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 3859, 198, 11748, 279, 5173, 5109, 198, 6738, 19720, 1330, 4377, 11, 32233, 11, 4479, 198, 198, 11748, 257,...
3.071839
348
"""Routines that install Adventure commands for the Python prompt. Copyright 2010-2015 Brandon Rhodes. Licensed as free software under the Apache License, Version 2.0 as detailed in the accompanying README.txt. """ import inspect class ReprTriggeredPhrase(object): """Command that happens when Python calls repr(...
[ 37811, 49, 448, 1127, 326, 2721, 9553, 9729, 329, 262, 11361, 6152, 13, 198, 198, 15269, 3050, 12, 4626, 14328, 25656, 13, 220, 49962, 355, 1479, 3788, 739, 262, 198, 25189, 4891, 13789, 11, 10628, 362, 13, 15, 355, 6496, 287, 262, ...
2.878472
288
import pandas as pd from numpy import arange ## Question 1 # Step 1: Load data X = pd.read_csv('Datasets/parkinsons.data') # Step 2: splice state column and drop it out. Drop also the 'name' column y = X['status'] X = X.drop(labels=['name', 'status'], axis=1) # Step 3: Train&test splits from sklearn.model_selection...
[ 11748, 19798, 292, 355, 279, 67, 198, 6738, 299, 32152, 1330, 610, 858, 198, 198, 2235, 18233, 352, 198, 198, 2, 5012, 352, 25, 8778, 1366, 198, 55, 796, 279, 67, 13, 961, 62, 40664, 10786, 27354, 292, 1039, 14, 20928, 1040, 684, ...
2.288318
1,207
# -*- coding: utf-8 -*- """ Created on Tue Mar 5 10:49:48 2019 @author: Dell """ #Q.1 Write a function to display sum of all the integers if present in a string. x=input() sumofint(x) #take two argument from user arg1=string arg2=word,function covert that word to "pagal hai kya" a=input("En...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 41972, 319, 30030, 1526, 220, 642, 838, 25, 2920, 25, 2780, 13130, 201, 198, 201, 198, 31, 9800, 25, 23617, 201, 198, 37811, 201, 198, 201, 198, ...
2.415094
159
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function import numpy as np from urllib.parse import urlencode from io import BytesIO from astropy.utils.data import download_file from astropy import units as u from astropy.io import fits from astropy.coordinates import ICRS, Galactic, B...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 2956, 297, 571, 13, 29572, 1330, 2956, 11925...
2.366971
5,589