content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
from django.db import models from django.contrib.auth.models import User
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 628 ]
3.52381
21
import torch import logging # Transformer version 4.9.1 - Newer versions may not work. from transformers import AutoTokenizer from trained_gpt_model import get_inference2 # if __name__ == "__main__": # review_text = "<answer> a fusional language <context> Typologically, Estonian represents a transitional form fr...
[ 198, 11748, 28034, 198, 11748, 18931, 198, 2, 3602, 16354, 2196, 604, 13, 24, 13, 16, 532, 968, 263, 6300, 743, 407, 670, 13, 198, 6738, 6121, 364, 1330, 11160, 30642, 7509, 198, 6738, 8776, 62, 70, 457, 62, 19849, 1330, 651, 62, ...
3.489051
137
# Copyright (c) 2017-present, Facebook, Inc. # 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. An additional grant # of patent rights can be found in the PATENTS file in the same directory. import os import sys import...
[ 2, 15069, 357, 66, 8, 2177, 12, 25579, 11, 3203, 11, 3457, 13, 198, 2, 1439, 2489, 10395, 13, 198, 2, 770, 2723, 2438, 318, 11971, 739, 262, 347, 10305, 12, 7635, 5964, 1043, 287, 262, 198, 2, 38559, 24290, 2393, 287, 262, 6808, ...
4.074074
81
#!/usr/bin/python # -*- coding: utf-8 -*- import os import sys reload(sys) sys.path.append("..") sys.setdefaultencoding('utf-8') from jinja2 import Environment from jinja2 import Template import re from sqlalchemy import schema, types from sqlalchemy.engine import create_engine import yyutil import CodeGen project_...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 628, 198, 11748, 28686, 198, 11748, 25064, 198, 260, 2220, 7, 17597, 8, 198, 17597, 13, 6978, 13, 33295, 7203, 492, 4943, 198, 17...
3.133121
1,570
Python 3.9.0 (tags/v3.9.0:9cf6752, Oct 5 2020, 15:34:40) [MSC v.1927 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license()" for more information. >>> import turtle >>> tao = turtle.Turtle() >>> tao.shape('turtle') >>> tao.forward(100) >>> tao.left(90) >>> tao.forward(100) >>> tao.left(90) ...
[ 37906, 513, 13, 24, 13, 15, 357, 31499, 14, 85, 18, 13, 24, 13, 15, 25, 24, 12993, 42444, 17, 11, 2556, 220, 642, 12131, 11, 1315, 25, 2682, 25, 1821, 8, 685, 5653, 34, 410, 13, 1129, 1983, 5598, 1643, 357, 28075, 2414, 15437, ...
1.996457
1,129
""" Pythonista3 app CodeMirror """ import pythonista.wkwebview as wkwebview import ui import pathlib uri = pathlib.Path('./main_index.html') _view = View() _view.present(style='fullscreen', orientations=['portrait'])
[ 37811, 198, 37906, 12523, 18, 598, 6127, 27453, 1472, 198, 37811, 198, 198, 11748, 21015, 12523, 13, 43021, 12384, 1177, 355, 266, 74, 12384, 1177, 198, 11748, 334, 72, 198, 11748, 3108, 8019, 198, 198, 9900, 796, 3108, 8019, 13, 15235,...
2.858974
78
import wrapper as w from multiprocessing import Process import atexit import time from queue import Queue ''' 8 Processes, 24 threads per process = 192 threads ''' NUM_PROCESSES = 8 workerList = [] # Worker processes queues = [] # Use seperate queues to avoid waiting for locks with open("data/all_news.txt", "r") as...
[ 11748, 29908, 355, 266, 198, 6738, 18540, 305, 919, 278, 1330, 10854, 198, 11748, 379, 37023, 198, 11748, 640, 198, 6738, 16834, 1330, 4670, 518, 198, 198, 7061, 6, 807, 10854, 274, 11, 1987, 14390, 583, 1429, 796, 17817, 14390, 705, ...
3.126016
246
from typing import Callable, Sequence, Any, Dict import functools import torch import torch.overrides from torch._prims.utils import torch_function_passthrough import torch._refs as refs import torch._refs import torch._refs.nn import torch._refs.nn.functional import torch._refs.special import torch._prims # TOD...
[ 6738, 19720, 1330, 4889, 540, 11, 45835, 11, 4377, 11, 360, 713, 198, 11748, 1257, 310, 10141, 628, 198, 11748, 28034, 198, 11748, 28034, 13, 2502, 81, 1460, 198, 198, 6738, 28034, 13557, 1050, 12078, 13, 26791, 1330, 28034, 62, 8818, ...
2.807198
389
from django.test import TestCase from search.read_similarities import build_manual_similarity_map from common.testhelpers.random_test_values import a_string, a_float
[ 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 2989, 13, 961, 62, 38610, 871, 1330, 1382, 62, 805, 723, 62, 38610, 414, 62, 8899, 198, 6738, 2219, 13, 9288, 16794, 364, 13, 25120, 62, 9288, 62, 27160, 1330, 257, 62, 884...
3.479167
48
""" Fortuna Python project to visualize uncertatinty in probabilistic exploration models. Created on 09/06/2018 @authors: Natalia Shchukina, Graham Brew, Marco van Veen, Behrooz Bashokooh, Tobias Stl, Robert Leckenby """ # Import libraries import numpy as np import glob from matplotlib import pyplot as plt import ...
[ 37811, 198, 37, 1922, 64, 198, 198, 37906, 1628, 284, 38350, 4591, 861, 265, 600, 88, 287, 1861, 14991, 2569, 13936, 4981, 13, 198, 198, 41972, 319, 7769, 14, 3312, 14, 7908, 198, 198, 31, 41617, 25, 14393, 9752, 911, 46019, 1437, 1...
3.188976
127
from PIL import Image # open an image file (.bmp,.jpg,.png,.gif) you have in the working folder # //imageFile = "03802.png" import os arr=os.listdir() for imageFile in arr: if "png" in imageFile: im1 = Image.open(imageFile) # adjust width and height to your needs width = 416 heigh...
[ 6738, 350, 4146, 1330, 7412, 198, 2, 1280, 281, 2939, 2393, 20262, 65, 3149, 38508, 9479, 38508, 11134, 38508, 27908, 8, 345, 423, 287, 262, 1762, 9483, 198, 2, 3373, 9060, 8979, 796, 366, 3070, 30863, 13, 11134, 1, 198, 198, 11748, ...
2.26694
487
#!/usr/bin/env python3 import argparse import bisect import csv import json import os from collections import defaultdict from functools import reduce from tqdm import tqdm if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("--scores-file", type=str) parser.add_argument(...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 1822, 29572, 198, 11748, 47457, 478, 198, 11748, 269, 21370, 198, 11748, 33918, 198, 11748, 28686, 198, 6738, 17268, 1330, 4277, 11600, 198, 6738, 1257, 310, 10141, 1330, ...
2.613793
290
from telegram.ext import CommandHandler, run_async from bot.gDrive import GoogleDriveHelper from bot.fs_utils import get_readable_file_size from bot import LOGGER, dispatcher, updater, bot from bot.config import BOT_TOKEN, OWNER_ID, GDRIVE_FOLDER_ID from bot.decorators import is_authorised, is_owner from telegram.error...
[ 6738, 573, 30536, 13, 2302, 1330, 9455, 25060, 11, 1057, 62, 292, 13361, 198, 6738, 10214, 13, 70, 24825, 1330, 3012, 24825, 47429, 198, 6738, 10214, 13, 9501, 62, 26791, 1330, 651, 62, 46155, 62, 7753, 62, 7857, 198, 6738, 10214, 133...
3.158879
214
import pandas as pd import numpy as np from portfoliolab.utils import RiskMetrics from portfoliolab.estimators import RiskEstimators from pypfopt import risk_models as risk_models_ """ Available covariance risk models in PortfolioLab library. https://hudson-and-thames-portfoliolab-pro.readthedocs-hosted.com/en/latest...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 2493, 9062, 1669, 397, 13, 26791, 1330, 19602, 9171, 10466, 198, 6738, 2493, 9062, 1669, 397, 13, 395, 320, 2024, 1330, 19602, 22362, 320, 2024, 198, 6738, ...
2.286833
3,577
import cv2 as cv import sys import numpy as np import random as r import os from PIL import Image as im img = cv.imread(cv.samples.findFile("3.png")) if img is None: sys.exit("Could not read the image.") else : width , height , depth = img.shape img_noisy = noisy("gauss",img) for kernal_size in rang...
[ 11748, 269, 85, 17, 355, 269, 85, 198, 11748, 25064, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 4738, 355, 374, 198, 11748, 28686, 220, 198, 6738, 350, 4146, 1330, 7412, 355, 545, 198, 198, 9600, 796, 269, 85, 13, 320, 961, 7, ...
2.086331
556
from citywok_ms.file.models import EmployeeFile, File import citywok_ms.employee.messages as employee_msg import citywok_ms.file.messages as file_msg from citywok_ms.employee.forms import EmployeeForm from citywok_ms.file.forms import FileForm from flask import Blueprint, flash, redirect, render_template, url_for from ...
[ 6738, 1748, 86, 482, 62, 907, 13, 7753, 13, 27530, 1330, 36824, 8979, 11, 9220, 198, 11748, 1748, 86, 482, 62, 907, 13, 7033, 1453, 13, 37348, 1095, 355, 6538, 62, 19662, 198, 11748, 1748, 86, 482, 62, 907, 13, 7753, 13, 37348, 10...
3.293233
133
import calendar from datetime import datetime, timedelta import json import logging import re import rfc822 from django.conf import settings from django.db.utils import IntegrityError import cronjobs from multidb.pinning import pin_this_thread from statsd import statsd from twython import Twython from kitsune.custom...
[ 11748, 11845, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 11748, 33918, 198, 11748, 18931, 198, 11748, 302, 198, 11748, 374, 16072, 23, 1828, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208...
2.508889
1,350
#!/usr/bin/env python from distutils.core import setup try: import setuptools except: pass setup( name='pdfrw', version='0.1', description='PDF file reader/writer library', long_description=''' pdfrw lets you read and write PDF files, including compositing multiple pages together (e.g. to do w...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 1233, 26791, 13, 7295, 1330, 9058, 198, 28311, 25, 198, 220, 220, 220, 1330, 900, 37623, 10141, 198, 16341, 25, 198, 220, 220, 220, 1208, 198, 198, 40406, 7, 198, 220, 220...
3.043379
438
import argparse import sys import cv2 import os import os.path as osp import numpy as np if sys.version_info[0] == 2: import xml.etree.cElementTree as ET else: import xml.etree.ElementTree as ET parser = argparse.ArgumentParser( description='Single Shot MultiBox Detector ...
[ 11748, 1822, 29572, 198, 11748, 25064, 198, 11748, 269, 85, 17, 198, 11748, 28686, 198, 198, 11748, 28686, 13, 6978, 220, 220, 220, 220, 220, 220, 220, 220, 220, 355, 267, 2777, 198, 11748, 299, 32152, 220, 220, 220, 220, 220, 220, ...
2.482143
504
# coding: utf-8 # Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 2, 15069, 357, 66, 8, 1584, 11, 33160, 11, 18650, 290, 14, 273, 663, 29116, 13, 220, 1439, 2489, 10395, 13, 198, 2, 770, 3788, 318, 10668, 12, 36612, 284, 345, 739, 262, 14499, 2448, 33532, 1...
3.097561
164
# -*- coding: utf-8 -*- # This file is part of convertdate. # http://github.com/fitnr/convertdate # Licensed under the MIT license: # http://opensource.org/licenses/MIT # Copyright (c) 2016, fitnr <fitnr@fakeisthenewreal> '''Convert to and from the Dublin day count''' from . import daycount EPOCH = 2415020 # Juli...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 770, 2393, 318, 636, 286, 10385, 4475, 13, 198, 2, 2638, 1378, 12567, 13, 785, 14, 11147, 48624, 14, 1102, 1851, 4475, 198, 198, 2, 49962, 739, 262, 17168, 5...
2.42963
270
from tensorhive.models.Group import Group from fixtures.controllers import API_URI as BASE_URI, HEADERS from http import HTTPStatus from importlib import reload import json import auth_patcher ENDPOINT = BASE_URI + '/groups' # POST /groups # PUT /groups/{id} # PUT /groups/{id} - nonexistent id # DELETE /grou...
[ 6738, 11192, 273, 71, 425, 13, 27530, 13, 13247, 1330, 4912, 198, 6738, 34609, 13, 3642, 36667, 1330, 7824, 62, 47269, 355, 49688, 62, 47269, 11, 39837, 4877, 198, 6738, 2638, 1330, 14626, 19580, 198, 6738, 1330, 8019, 1330, 18126, 198,...
2.639098
266
import os from os.path import join, isfile import re import numpy as np import pickle import argparse import skipthoughts import h5py if __name__ == '__main__': main()
[ 11748, 28686, 198, 6738, 28686, 13, 6978, 1330, 4654, 11, 318, 7753, 198, 11748, 302, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2298, 293, 198, 11748, 1822, 29572, 198, 11748, 14267, 2016, 912, 198, 11748, 289, 20, 9078, 198, 198,...
3.072727
55
"""Parsing responses from the difficulty command.""" from mcipc.rcon.functions import boolmap __all__ = ['parse'] SET = 'The difficulty has been set to (\\w+)' UNCHANGED = 'The difficulty did not change; it is already set to (\\w+)' def parse(text: str) -> bool: """Parses a boolean value from the text re...
[ 37811, 47, 945, 278, 9109, 422, 262, 8722, 3141, 526, 15931, 198, 198, 6738, 36650, 541, 66, 13, 81, 1102, 13, 12543, 2733, 1330, 20512, 8899, 628, 198, 834, 439, 834, 796, 37250, 29572, 20520, 628, 198, 28480, 796, 705, 464, 8722, ...
3.074074
135
from typing import ( Iterable, Tuple, ) from cytoolz import ( pipe ) from eth._utils import bls from eth._utils.bitfield import ( set_voted, ) from eth.beacon.enums import SignatureDomain from eth.beacon.typing import ( BLSPubkey, BLSSignature, Bitfield, CommitteeIndex, ) def verify_v...
[ 6738, 19720, 1330, 357, 198, 220, 220, 220, 40806, 540, 11, 198, 220, 220, 220, 309, 29291, 11, 198, 8, 198, 6738, 3075, 25981, 89, 1330, 357, 198, 220, 220, 220, 12656, 198, 8, 198, 198, 6738, 4555, 13557, 26791, 1330, 698, 82, 1...
2.389571
652
# Copyright 2021 Hewlett Packard Enterprise Development LP # # 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, modif...
[ 2, 15069, 33448, 30446, 15503, 6400, 446, 14973, 7712, 18470, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 198, 2, 4866, 286, 428, 3788, 290, 3917, 10314, 3696, 357, 1169, 366, 2...
3.131274
777
import unittest from find_x_in_listy import find_x_in_listy, Listy
[ 11748, 555, 715, 395, 198, 6738, 1064, 62, 87, 62, 259, 62, 4868, 88, 1330, 1064, 62, 87, 62, 259, 62, 4868, 88, 11, 7343, 88 ]
2.538462
26
from scipy.signal import butter,filtfilt from numba import jit import bisect # def butter_lowpass(cutoff, fs, order=5): # nyq = 0.5 * fs # normal_cutoff = cutoff / nyq # b, a = butter(order, normal_cutoff, btype='low', analog=False) # return b, a
[ 6738, 629, 541, 88, 13, 12683, 282, 1330, 9215, 11, 69, 2326, 69, 2326, 198, 198, 6738, 997, 7012, 1330, 474, 270, 198, 11748, 47457, 478, 198, 198, 2, 825, 9215, 62, 9319, 6603, 7, 8968, 2364, 11, 43458, 11, 1502, 28, 20, 2599, ...
2.333333
114
import asyncio from contextlib import asynccontextmanager import pytest from mitmproxy import exceptions from mitmproxy.addons.proxyserver import Proxyserver from mitmproxy.connection import Address from mitmproxy.proxy import layers, server_hooks from mitmproxy.proxy.layers.http import HTTPMode from mitmproxy.test i...
[ 11748, 30351, 952, 198, 6738, 4732, 8019, 1330, 355, 2047, 535, 261, 5239, 37153, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 10255, 76, 36436, 1330, 13269, 198, 6738, 10255, 76, 36436, 13, 39996, 13, 1676, 87, 893, 18497, 1330, 1041,...
2.641548
491
# Copyright 2021 The TensorFlow Probability 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, 15069, 33448, 383, 309, 22854, 37535, 30873, 1799, 46665, 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, 11846, 351, 262,...
2.643912
1,963
import datetime import httplib import urllib from datetime import timedelta #now = datetime.datetime.now(); #today = now.strftime('%Y-%m-%d') #print today today = datetime.date.today() one_day = timedelta(days=1); #start_day = datetime.date(2004, 2, 11); start_day = datetime.date(2010, 8, 21); print "Download from...
[ 11748, 4818, 8079, 198, 11748, 1841, 489, 571, 198, 11748, 2956, 297, 571, 198, 6738, 4818, 8079, 1330, 28805, 12514, 198, 198, 2, 2197, 796, 4818, 8079, 13, 19608, 8079, 13, 2197, 9783, 198, 2, 40838, 796, 783, 13, 2536, 31387, 10786...
2.482759
435
import copy import pandas as pd from decouple import config from heuristic.construction.construction import ConstructionHeuristic from config.construction_config import * from simulation.simulator import Simulator from heuristic.improvement.reopt.new_request_updater import NewRequestUpdater
[ 11748, 4866, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 875, 43846, 1330, 4566, 198, 6738, 339, 27915, 13, 9979, 2762, 13, 9979, 2762, 1330, 20395, 1544, 27915, 198, 6738, 4566, 13, 9979, 2762, 62, 11250, 1330, 1635, 198, 6738, ...
4.027397
73
# Generated by Django 2.2.6 on 2019-10-25 12:31 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 21, 319, 13130, 12, 940, 12, 1495, 1105, 25, 3132, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
# -*- coding: utf-8 -*- # # Copyright (c) 2016 - 2020 -- Lars Heuer # All rights reserved. # # License: BSD License # """\ Test against issue <https://github.com/pyqrcode/pyqrcodeNG/pull/13/>. The initial test was created by Mathieu <https://github.com/albatros69>, see the above mentioned pull request. Adapted for Se...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 357, 66, 8, 1584, 532, 12131, 1377, 31239, 679, 15573, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 13789, 25, 347, 10305, 13789, 198, 2, 198, ...
2.926966
178
# -*- coding: utf-8 -*- # Copyright 2019, IBM. # # This source code is licensed under the Apache License, Version 2.0 found in # the LICENSE.txt file in the root directory of this source tree. """Quantum Operators.""" from .operator import Operator from .unitary import Unitary from .pauli import Pauli, pauli_group f...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 15069, 13130, 11, 19764, 13, 198, 2, 198, 2, 770, 2723, 2438, 318, 11971, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 1043, 287, 198, 2, 262, 38559, 2429...
3.226891
119
from django.contrib import admin from django.urls import include, path from django.conf import settings from django.conf.urls.static import static urlpatterns = [ path('admin/', admin.site.urls), path('class/', include('classroom.urls')), path('assignment-api/', include('assignment.urls', namespace='assign...
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 2291, 11, 3108, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 13, 12708, 1330, 9037, 198, ...
2.946809
188
from src import app, db from .models import User, Role, RoleUsers from .security_admin import UserAdmin, RoleAdmin from flask_security import Security, SQLAlchemyUserDatastore, \ login_required, roles_accepted from flask_security.utils import encrypt_password # Setup Flask-Security user_datastore = SQLAlchemyUser...
[ 6738, 12351, 1330, 598, 11, 20613, 198, 6738, 764, 27530, 1330, 11787, 11, 20934, 11, 20934, 14490, 198, 6738, 764, 12961, 62, 28482, 1330, 11787, 46787, 11, 20934, 46787, 198, 6738, 42903, 62, 12961, 1330, 4765, 11, 16363, 2348, 26599, ...
3.480916
131
""" This file defines a series of constants that represent the values used in the API's "helper" tables. Rather than define the values in the db setup scripts and then make db calls to lookup the surrogate keys, we'll define everything here, in a file that can be used by the db setup scripts *and* the application code...
[ 37811, 198, 1212, 2393, 15738, 257, 2168, 286, 38491, 326, 2380, 262, 3815, 973, 287, 198, 1169, 7824, 338, 366, 2978, 525, 1, 8893, 13, 198, 198, 27202, 621, 8160, 262, 3815, 287, 262, 20613, 9058, 14750, 290, 788, 787, 20613, 3848, ...
2.58242
4,744
#!/bin/env python #-*-coding:utf-8-*- import os import sys import string import time import datetime import MySQLdb
[ 2, 48443, 8800, 14, 24330, 21015, 198, 2, 12, 9, 12, 66, 7656, 25, 40477, 12, 23, 12, 9, 12, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 4731, 198, 11748, 640, 198, 11748, 4818, 8079, 198, 11748, 33476, 9945, 198 ]
2.829268
41
import sqlite3 conn = sqlite3.connect("db") cur = conn.cursor() cur.execute("select * from CAR_ID limit 5;") results = cur.fetchall() print(results)
[ 11748, 44161, 578, 18, 198, 37043, 796, 44161, 578, 18, 13, 8443, 7203, 9945, 4943, 198, 22019, 796, 48260, 13, 66, 21471, 3419, 198, 22019, 13, 41049, 7203, 19738, 1635, 422, 17368, 62, 2389, 4179, 642, 26, 4943, 198, 43420, 796, 109...
2.811321
53
import time from jina.executors.crafters import BaseCrafter from .helper import foo
[ 11748, 640, 198, 6738, 474, 1437, 13, 18558, 315, 669, 13, 66, 430, 47131, 1330, 7308, 33800, 637, 198, 198, 6738, 764, 2978, 525, 1330, 22944, 628 ]
3.185185
27
import numpy as np import pandas as pd from scipy.stats import spearmanr from sklearn.metrics import f1_score, precision_score, recall_score from IPython.display import display, clear_output from sklearn.metrics import confusion_matrix import scipy.stats as st def continuous_to_categorical_with_quantiles(data: np.nda...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 629, 541, 88, 13, 34242, 1330, 17514, 805, 81, 198, 6738, 1341, 35720, 13, 4164, 10466, 1330, 277, 16, 62, 26675, 11, 15440, 62, 26675, 11, 10014, 62, 2...
2.195761
1,793
from collections import defaultdict from poloniex_apis.api_models.ticker_price import TickerData
[ 6738, 17268, 1330, 4277, 11600, 198, 198, 6738, 755, 261, 494, 87, 62, 499, 271, 13, 15042, 62, 27530, 13, 83, 15799, 62, 20888, 1330, 309, 15799, 6601, 628, 198 ]
3.333333
30
from datetime import datetime,timezone import sys import boto3 import json # Return the state from the event iff it's one of SUCCEEDED or FAILED # Return the execution summary for a given execution id # Return the execution summary for the most prior final execution before a given execution id if __name__ =...
[ 6738, 4818, 8079, 1330, 4818, 8079, 11, 2435, 11340, 198, 11748, 25064, 198, 11748, 275, 2069, 18, 198, 11748, 33918, 628, 198, 198, 2, 8229, 262, 1181, 422, 262, 1785, 611, 69, 340, 338, 530, 286, 13558, 4093, 41841, 1961, 393, 9677,...
3.623762
101
import discord import sqlite3 from discord.ext import commands conn= sqlite3.connect("dbs/main.db")
[ 11748, 36446, 198, 11748, 44161, 578, 18, 198, 6738, 36446, 13, 2302, 1330, 9729, 198, 198, 37043, 28, 44161, 578, 18, 13, 8443, 7203, 67, 1443, 14, 12417, 13, 9945, 4943, 628, 198 ]
3.121212
33
import hashlib import os import shutil import subprocess import sys import tarfile from functools import cmp_to_key from gzip import GzipFile try: from urllib.error import HTTPError from urllib.request import urlopen except ImportError: from urllib2 import HTTPError from urllib2 import urlopen from c...
[ 11748, 12234, 8019, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 11748, 850, 14681, 198, 11748, 25064, 198, 11748, 13422, 7753, 198, 198, 6738, 1257, 310, 10141, 1330, 269, 3149, 62, 1462, 62, 2539, 198, 6738, 308, 13344, 1330, 402, 1...
3.245902
122
from osp.corpus.syllabus import Syllabus from osp.test.utils import requires_tika def test_empty(mock_osp): """ Should return None if the file is empty. """ path = mock_osp.add_file(content='', ftype='plain') syllabus = Syllabus(path) assert syllabus.text == None def test_plaintext(mock...
[ 198, 198, 6738, 267, 2777, 13, 10215, 79, 385, 13, 1837, 297, 46844, 1330, 1632, 297, 46844, 198, 6738, 267, 2777, 13, 9288, 13, 26791, 1330, 4433, 62, 83, 9232, 628, 198, 4299, 1332, 62, 28920, 7, 76, 735, 62, 2117, 2599, 628, 22...
2.588076
369
from boa_test.tests.boa_test import BoaFixtureTest from boa.compiler import Compiler from neo.Core.TX.Transaction import Transaction from neo.Prompt.Commands.BuildNRun import TestBuild from neo.EventHub import events from neo.SmartContract.SmartContractEvent import SmartContractEvent, NotifyEvent from neo.Settings impo...
[ 6738, 1489, 64, 62, 9288, 13, 41989, 13, 48614, 62, 9288, 1330, 3248, 64, 37, 9602, 14402, 198, 6738, 1489, 64, 13, 5589, 5329, 1330, 3082, 5329, 198, 6738, 19102, 13, 14055, 13, 29551, 13, 48720, 1330, 45389, 198, 6738, 19102, 13, ...
3.481081
185
#!/usr/bin/python # -*- mode: python; -*- ## This file is part of Indian Language Converter ## Copyright (C) 2006 Vijay Lakshminarayanan <liyer.vijay@gmail.com> ## Indian Language Converter is free software; you can redistribute it ## and/or modify it under the terms of the GNU General Public License ## as published...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 4235, 25, 21015, 26, 532, 9, 12, 198, 198, 2235, 770, 2393, 318, 636, 286, 3942, 15417, 35602, 353, 198, 198, 2235, 15069, 357, 34, 8, 4793, 49219, 323, 47382, 1084, 283, ...
3.094033
553
import requests import crowdstrike_detection as crowdstrike import logging import click import urllib.parse import ConfigParser import os logging.basicConfig(level=logging.INFO, format='%(asctime)s %(name)-15s [%(levelname)-8s]: %(message)s', datefmt='%m/%d/%Y %I:%M:%S %p') logger = logging.get...
[ 11748, 7007, 198, 11748, 4315, 33069, 62, 15255, 3213, 355, 4315, 33069, 198, 11748, 18931, 198, 11748, 3904, 198, 11748, 2956, 297, 571, 13, 29572, 198, 11748, 17056, 46677, 198, 11748, 28686, 198, 198, 6404, 2667, 13, 35487, 16934, 7, ...
2.640625
256
FORM_CONTENT_TYPES = [ 'application/x-www-form-urlencoded', 'multipart/form-data' ]
[ 21389, 62, 37815, 3525, 62, 9936, 47, 1546, 796, 685, 198, 220, 220, 220, 705, 31438, 14, 87, 12, 2503, 12, 687, 12, 6371, 12685, 9043, 3256, 198, 220, 220, 220, 705, 16680, 541, 433, 14, 687, 12, 7890, 6, 198, 60, 198 ]
2.139535
43
import requests import json HEADERS = {"Authorization": "OAuth AgAAAAA00Se2AAW1W1yCegavqkretMXBGkoUUQk", "Accept": "*/*"} URL = "https://cloud-api.yandex.net:443/v1/disk/" def get_folder_info(folder_name_1, folder_name_2, url=None, headers=None): """ Args: folder_name_1: . folder_na...
[ 11748, 7007, 198, 11748, 33918, 628, 198, 37682, 4877, 796, 19779, 13838, 1634, 1298, 366, 23621, 1071, 2449, 17922, 32, 405, 4653, 17, 3838, 54, 16, 54, 16, 88, 34, 1533, 615, 80, 74, 1186, 43243, 40469, 7204, 30100, 48, 74, 1600, ...
2.166468
1,676
import os from collections import defaultdict from flask import render_template from flask_login import login_required from sqlalchemy import and_ from app import db from app.decorators import operator_required from app.models import Student, MonthNameList, Course, PaymentStatus, Payment, Teacher, Schedule from app.u...
[ 11748, 28686, 198, 6738, 17268, 1330, 4277, 11600, 198, 198, 6738, 42903, 1330, 8543, 62, 28243, 198, 6738, 42903, 62, 38235, 1330, 17594, 62, 35827, 198, 6738, 44161, 282, 26599, 1330, 290, 62, 198, 198, 6738, 598, 1330, 20613, 198, 67...
4.280488
82
# Copyright (c) 2017, John Skinner import abc import typing import bson import pymodm import pymodm.fields as fields import arvet.database.pymodm_abc as pymodm_abc from arvet.database.reference_list_field import ReferenceListField import arvet.core.trial_result def check_trial_collection(trial_results: typing.Itera...
[ 2, 15069, 357, 66, 8, 2177, 11, 1757, 42899, 198, 11748, 450, 66, 198, 11748, 19720, 198, 11748, 275, 1559, 198, 11748, 12972, 4666, 76, 198, 11748, 12972, 4666, 76, 13, 25747, 355, 7032, 198, 11748, 610, 16809, 13, 48806, 13, 9078, ...
2.752556
489
"""File access utils""" __author__ = 'thorwhalen' # from ut.datapath import datapath import pickle import os from ut.util.importing import get_environment_variable import pandas as pd import ut.pfile.to as file_to import ut.pfile.name as pfile_name import ut.pstr.to as pstr_to from ut.serialize.local import Local from...
[ 37811, 8979, 1895, 3384, 4487, 37811, 198, 834, 9800, 834, 796, 705, 400, 273, 1929, 282, 268, 6, 198, 198, 2, 422, 3384, 13, 19608, 499, 776, 1330, 4818, 499, 776, 198, 11748, 2298, 293, 198, 11748, 28686, 198, 6738, 3384, 13, 2260...
3.143519
864
import subprocess import git from os.path import dirname, join, abspath import pandas as pd from matplotlib import pyplot as plt import requests import io import zipfile import tempfile from datetime import timedelta FILENAME = join(dirname(__file__), "..", "thesis.tex") DISP_PAGESMAX = 80 DISP_WORDSMAX = 10000 ...
[ 11748, 850, 14681, 198, 11748, 17606, 198, 6738, 28686, 13, 6978, 1330, 26672, 3672, 11, 4654, 11, 2352, 6978, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 2603, 29487, 8019, 1330, 12972, 29487, 355, 458, 83, 198, 11748, 7007, 198, ...
2.449367
316
"""Installation instructions for enrich_pvalues.""" import os from setuptools import setup import enrich_pvalues # For version VERSION=enrich_pvalues.__version__ GITHUB='https://github.com/MikeDacre/enrich_pvalues' with open('requirements.txt') as fin: REQUIREMENTS = [ i[0] for i in [j.split('>=') for j...
[ 37811, 30838, 7729, 329, 22465, 62, 79, 27160, 526, 15931, 198, 11748, 28686, 198, 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 11748, 22465, 62, 79, 27160, 220, 1303, 1114, 2196, 198, 198, 43717, 28, 268, 7527, 62, 79, 27160, 13, 8...
2.504459
785
import datetime from homeschool.courses.tests.factories import ( CourseFactory, CourseTaskFactory, GradedWorkFactory, ) from homeschool.schools.tests.factories import GradeLevelFactory from homeschool.students.forms import CourseworkForm, EnrollmentForm, GradeForm from homeschool.students.models import Cou...
[ 11748, 4818, 8079, 198, 198, 6738, 5682, 1251, 13, 66, 39975, 13, 41989, 13, 22584, 1749, 1330, 357, 198, 220, 220, 220, 20537, 22810, 11, 198, 220, 220, 220, 20537, 25714, 22810, 11, 198, 220, 220, 220, 1902, 5286, 12468, 22810, 11, ...
3.384106
151
""" @Author Jchakra""" """ This code is to download project information using GitHub API (Following Amrit's Hero paper criteria of how to find good projects) """ from multiprocessing import Process,Lock import time import json import requests ## Downloading all the projects if __name__ == '__main__': ...
[ 37811, 2488, 13838, 449, 354, 38004, 37811, 198, 37811, 770, 2438, 318, 284, 4321, 1628, 1321, 1262, 21722, 7824, 357, 14291, 1703, 799, 338, 8757, 3348, 9987, 286, 703, 284, 1064, 922, 4493, 8, 37227, 198, 220, 198, 6738, 18540, 305, ...
2.680952
210
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
[ 2, 15069, 2177, 383, 309, 22854, 37535, 46665, 13, 1439, 6923, 33876, 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, 11846, ...
3.79845
258
""" Simulation parameters. """ SIMULATION_TIME_STEPS = 300
[ 37811, 198, 8890, 1741, 10007, 13, 198, 37811, 198, 198, 48913, 6239, 6234, 62, 34694, 62, 30516, 3705, 796, 5867, 198 ]
2.857143
21
import cv2 import numpy as np try: import scipy # scipy.ndimage cannot be accessed until explicitly imported from scipy import ndimage except ImportError: scipy = None def random_rotation(x, rg, row_axis=0, col_axis=1, channel_axis=2, fill_mode='nearest', cval=0., interpolation_o...
[ 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 198, 28311, 25, 198, 220, 220, 220, 1330, 629, 541, 88, 198, 220, 220, 220, 1303, 629, 541, 88, 13, 358, 9060, 2314, 307, 17535, 1566, 11777, 17392, 198, 220, 220, 220, ...
2.179298
4,328
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
[ 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 921, 743, 7330, 198, 2, 257, 4866, 286, 262, 13789, 379, 198, 2,...
3.813953
172
import functools
[ 11748, 1257, 310, 10141, 628, 628, 628, 628 ]
3
8
"""A module that provides functionality for accessing the Payments API.""" import enum import http import logging import requests from fastapi import Depends, Header, HTTPException from fastapi.security.http import HTTPAuthorizationCredentials import auth.authentication import config import schemas.payment logger ...
[ 37811, 32, 8265, 326, 3769, 11244, 329, 22534, 262, 41318, 7824, 526, 15931, 198, 198, 11748, 33829, 198, 11748, 2638, 198, 11748, 18931, 198, 198, 11748, 7007, 198, 6738, 3049, 15042, 1330, 2129, 2412, 11, 48900, 11, 14626, 16922, 198, ...
3.71
100
a = numb_of_char(str(input("Input the word please: "))) print(a)
[ 198, 64, 796, 35519, 62, 1659, 62, 10641, 7, 2536, 7, 15414, 7203, 20560, 262, 1573, 3387, 25, 366, 22305, 198, 4798, 7, 64, 8, 628 ]
2.576923
26
# Your Vector2D object will be instantiated and called as such: # obj = Vector2D(v) # param_1 = obj.next() # param_2 = obj.hasNext()
[ 198, 198, 2, 3406, 20650, 17, 35, 2134, 481, 307, 9113, 12931, 290, 1444, 355, 884, 25, 198, 2, 26181, 796, 20650, 17, 35, 7, 85, 8, 198, 2, 5772, 62, 16, 796, 26181, 13, 19545, 3419, 198, 2, 5772, 62, 17, 796, 26181, 13, 1013...
2.755102
49
from datetime import datetime import inspect
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 10104, 628, 198 ]
4.272727
11
from lf3py.di.di import DI # noqa F401
[ 6738, 300, 69, 18, 9078, 13, 10989, 13, 10989, 1330, 14766, 220, 1303, 645, 20402, 376, 21844, 198 ]
2.222222
18
import logging from django.utils.safestring import mark_safe from django_rq import job from inline_static.css import transform_css_urls logger = logging.getLogger(__name__)
[ 11748, 18931, 198, 198, 6738, 42625, 14208, 13, 26791, 13, 49585, 395, 1806, 1330, 1317, 62, 21230, 198, 6738, 42625, 14208, 62, 81, 80, 1330, 1693, 198, 6738, 26098, 62, 12708, 13, 25471, 1330, 6121, 62, 25471, 62, 6371, 82, 198, 198...
3.142857
56
#!/usr/bin/env python # coding=utf-8 """ This script tests the simulations of the experiments. """ import math from utils import coin_var, needle_var main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 28, 40477, 12, 23, 198, 198, 37811, 198, 1212, 4226, 5254, 262, 27785, 286, 262, 10256, 13, 198, 37811, 198, 198, 11748, 10688, 198, 198, 6738, 3384, 4487, 1330, 10752, 62, ...
3.137255
51
from addressing import * from instructions.base_instructions import SetBit, ClearBit from instructions.generic_instructions import Instruction from status import Status # set status instructions # clear status instructions
[ 6738, 13593, 1330, 1635, 198, 6738, 7729, 13, 8692, 62, 259, 7249, 507, 1330, 5345, 13128, 11, 11459, 13128, 198, 6738, 7729, 13, 41357, 62, 259, 7249, 507, 1330, 46486, 198, 6738, 3722, 1330, 12678, 628, 198, 2, 900, 3722, 7729, 628,...
4.538462
52
# # @lc app=leetcode id=530 lang=python3 # # [530] Minimum Absolute Difference in BST # # https://leetcode.com/problems/minimum-absolute-difference-in-bst/description/ # # algorithms # Easy (55.23%) # Total Accepted: 115.5K # Total Submissions: 209K # Testcase Example: '[4,2,6,1,3]' # # Given the root of a Binary S...
[ 2, 198, 2, 2488, 44601, 598, 28, 293, 316, 8189, 4686, 28, 38612, 42392, 28, 29412, 18, 198, 2, 198, 2, 685, 38612, 60, 26265, 36532, 43795, 287, 44992, 198, 2, 198, 2, 3740, 1378, 293, 316, 8189, 13, 785, 14, 1676, 22143, 14, 3...
2.541787
347
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
[ 2, 15069, 13130, 383, 309, 22854, 37535, 46665, 13, 1439, 6923, 33876, 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, 11846,...
2.795226
796
#!/usr/bin/env python3 # Copyright (c) 2015-2016 The Bitcoin Core developers # Copyright (c) 2017 The Bitcoin developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """ Test that the blockmaxsize and excessiveblocksize paramete...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 15069, 357, 66, 8, 1853, 12, 5304, 383, 6185, 7231, 6505, 198, 2, 15069, 357, 66, 8, 2177, 383, 6185, 6505, 198, 2, 4307, 6169, 739, 262, 17168, 3788, 5964, 11, 766, 262, ...
3.43956
182
#!/usr/bin/env python # Copyright 2015 ARM Limited # # Licensed under the Apache License, Version 2.0 # See LICENSE file for details. # standard library modules, , , import unittest # internal modules: from . import util from . import cli Test_Outdated = { 'module.json':'''{ "name": "test-outdated", "version": "...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 15069, 1853, 20359, 15302, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 198, 2, 4091, 38559, 24290, 2393, 329, 3307, 13, 198, 198, 2, 3210, 5888, 13103, ...
2.618132
364
from django.urls import path, include from django.contrib import admin from example.views import poi_list admin.autodiscover() urlpatterns = [ path('', poi_list), path('admin/', admin.site.urls), ]
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 11, 2291, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 1672, 13, 33571, 1330, 745, 72, 62, 4868, 198, 198, 28482, 13, 2306, 375, 29392, 3419, 198, 198, 6371, 33279, 82, ...
2.773333
75
import threading import tushare as ts import pandas as pd import datetime STOCK = {#'002594':[1,170.15], ## / '601012':[11,99.9], ## '002340':[12,8.72], ## '603259':[1,141.7], ## '002346':[10,10.68], ## #'600438':[9,42.96], ## #'002475':[3,5...
[ 11748, 4704, 278, 198, 11748, 256, 1530, 533, 355, 40379, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 4818, 8079, 198, 198, 2257, 11290, 796, 1391, 2, 6, 405, 1495, 5824, 10354, 58, 16, 11, 17279, 13, 1314, 4357, 220, 220, 224...
2.109735
1,130
from datetime import datetime from statement_renamer.extractors.etrade import ETradeDateExtractor as EXTRACTOR_UNDER_TEST from statement_renamer.extractors.factory import ExtractorFactory TESTDATA = ( """ PAGE 1 OF 6 February 1, 2019 - March 31, 2019AccountNumber:####-####AccountType:ROTH IRA PAGE 5 OF ...
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 6738, 2643, 62, 918, 2382, 13, 2302, 974, 669, 13, 21879, 671, 1330, 412, 35965, 10430, 11627, 40450, 355, 7788, 5446, 10659, 1581, 62, 4944, 14418, 62, 51, 6465, 198, 6738, 2643, 62, 918,...
3.021978
182
prod1 = float(input("Insira o valor do produto A: ")) prod2 = float(input("Insira o valor do produto B: ")) prod3 = float(input("Insira o valor do produto C: ")) if prod1 < prod2 and prod1 < prod3: print ("Escolha o produto A o mais barato") elif prod2 < prod1 and prod2 < prod3: print ("Escolha o produto B o...
[ 1676, 67, 16, 796, 12178, 7, 15414, 7203, 20376, 8704, 267, 1188, 273, 466, 40426, 9390, 317, 25, 366, 4008, 198, 1676, 67, 17, 796, 12178, 7, 15414, 7203, 20376, 8704, 267, 1188, 273, 466, 40426, 9390, 347, 25, 366, 4008, 198, 1676...
2.511905
168
# This file is MACHINE GENERATED! Do not edit. # Generated by: tensorflow/python/tools/api/generator/create_python_api.py script. """Public API for tf.train.experimental namespace. """ from __future__ import print_function as _print_function import sys as _sys from tensorflow.python.training.experimental.loss_scale ...
[ 2, 770, 2393, 318, 337, 16219, 8881, 24700, 1137, 11617, 0, 2141, 407, 4370, 13, 198, 2, 2980, 515, 416, 25, 11192, 273, 11125, 14, 29412, 14, 31391, 14, 15042, 14, 8612, 1352, 14, 17953, 62, 29412, 62, 15042, 13, 9078, 4226, 13, ...
3.478261
230
def plot_3D_Data( self, *arg_list, is_norm=False, unit="SI", component_list=None, save_path=None, x_min=None, x_max=None, y_min=None, y_max=None, z_min=None, z_max=None, z_range=None, is_auto_ticks=True, is_auto_range=False, is_2D_view=False, is_same_s...
[ 4299, 7110, 62, 18, 35, 62, 6601, 7, 198, 220, 220, 220, 2116, 11, 198, 220, 220, 220, 1635, 853, 62, 4868, 11, 198, 220, 220, 220, 318, 62, 27237, 28, 25101, 11, 198, 220, 220, 220, 4326, 2625, 11584, 1600, 198, 220, 220, 220, ...
2.05123
1,952
"""Collection of tests for :mod:`orion.plotting.backend_plotly`.""" import copy import numpy import pandas import plotly import pytest import orion.client from orion.analysis.partial_dependency_utils import partial_dependency_grid from orion.core.worker.experiment import Experiment from orion.plotting.base import ( ...
[ 37811, 36307, 286, 5254, 329, 1058, 4666, 25, 63, 273, 295, 13, 29487, 889, 13, 1891, 437, 62, 29487, 306, 63, 526, 15931, 198, 11748, 4866, 198, 198, 11748, 299, 32152, 198, 11748, 19798, 292, 198, 11748, 7110, 306, 198, 11748, 12972...
2.341229
1,351
import pdb import warnings from jax import custom_vjp # noinspection PyUnusedLocal debug_identity.defvjp(_debug_fwd, _debug_bwd)
[ 11748, 279, 9945, 198, 11748, 14601, 198, 198, 6738, 474, 897, 1330, 2183, 62, 85, 34523, 628, 628, 198, 2, 645, 1040, 14978, 9485, 3118, 1484, 14565, 628, 198, 24442, 62, 738, 414, 13, 4299, 85, 34523, 28264, 24442, 62, 69, 16993, ...
2.72
50
#!/usr/bin/env python # Some helpful links # https://docs.python.org/3/library/tkinter.html # https://www.python-course.eu/tkinter_entry_widgets.php import tkinter as tk app = Application(root=tk.Tk()) app.mainloop()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 201, 198, 201, 198, 2, 2773, 7613, 6117, 201, 198, 2, 3740, 1378, 31628, 13, 29412, 13, 2398, 14, 18, 14, 32016, 14, 30488, 3849, 13, 6494, 201, 198, 2, 3740, 1378, 2503, 13, 29412, 12,...
2.468085
94
def elo(winner_rank, loser_rank, weighting): """ :param winner: The Player that won the match. :param loser: The Player that lost the match. :param weighting: The weighting factor to suit your comp. :return: (winner_new_rank, loser_new_rank) Tuple. This follows the ELO ranking method. """ ...
[ 4299, 1288, 78, 7, 39791, 62, 43027, 11, 30256, 62, 43027, 11, 3463, 278, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1058, 17143, 8464, 25, 383, 7853, 326, 1839, 262, 2872, 13, 198, 220, 220, 220, 1058, 17143, 30256, 25, ...
2.922043
372
from __future__ import annotations from typing import Any, Callable, Optional, Union import numpy as np # import pandas as pd import statsmodels.api as sm from samplics.estimation.expansion import TaylorEstimator from samplics.utils.formats import dict_to_dataframe, fpc_as_dict, numpy_array, remove_nans from sampli...
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 6738, 19720, 1330, 4377, 11, 4889, 540, 11, 32233, 11, 4479, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 2, 1330, 19798, 292, 355, 279, 67, 198, 11748, 9756, 27530, 13, 15042, 355...
3.353982
113
#!/usr/bin/env python # -*- coding: utf-8 -*- """Tests for `scopes` package.""" import os print(os.getenv('PYTHONPATH')) import pytest from click.testing import CliRunner from scopes.tasks import tasks, bolt, spout, builder from scopes.graph import G, build, topological_sort, traverse from scopes import cli de...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 51, 3558, 329, 4600, 1416, 13920, 63, 5301, 526, 15931, 198, 198, 11748, 28686, 198, 198, 4798, 7, 418, 1...
2.665753
365
# -*- coding: utf-8 -*- __author__ = 'isee15' import LunarSolarConverter converter = LunarSolarConverter.LunarSolarConverter()
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 834, 9800, 834, 796, 705, 786, 68, 1314, 6, 198, 198, 11748, 31947, 38825, 3103, 332, 353, 198, 198, 1102, 332, 353, 796, 31947, 38825, 3103, 332, 353, 13, 43, 403, ...
2.462963
54
# Copyright (c) 2021, NVIDIA 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 required by applicable law or agreed to...
[ 2, 15069, 357, 66, 8, 33448, 11, 15127, 23929, 44680, 6234, 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, 11846, 351, 262...
3.441088
331
# MIT License # Copyright (c) 2020-2021 Chris Farris (https://www.chrisfarris.com) # 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 righ...
[ 2, 17168, 13789, 198, 198, 2, 15069, 357, 66, 8, 12131, 12, 1238, 2481, 5180, 6755, 2442, 357, 5450, 1378, 2503, 13, 354, 2442, 16370, 2442, 13, 785, 8, 198, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597,...
3.149211
697
""" State-Value Function Written by Patrick Coady (pat-coady.github.io) Modified by Tin-Yin Lai (wu6u3) into asynchronous version """ import tensorflow as tf import numpy as np from sklearn.utils import shuffle #import os
[ 37811, 198, 9012, 12, 11395, 15553, 198, 198, 25354, 416, 9925, 327, 1170, 88, 357, 8071, 12, 1073, 4597, 13, 12567, 13, 952, 8, 198, 198, 5841, 1431, 416, 22894, 12, 56, 259, 406, 1872, 357, 43812, 21, 84, 18, 8, 656, 39354, 2196...
3.067568
74
"""mdepub actions -- these modules do the actual work.""" import archive import clean import create import epub import extract import html import newid import version
[ 37811, 9132, 538, 549, 4028, 1377, 777, 13103, 466, 262, 4036, 670, 526, 15931, 198, 198, 11748, 15424, 198, 11748, 3424, 198, 11748, 2251, 198, 11748, 2462, 549, 198, 11748, 7925, 198, 11748, 27711, 198, 11748, 649, 312, 198, 11748, 21...
4
42
from django.views.generic import View from django.utils.decorators import method_decorator from django.contrib.auth.decorators import login_required from django.views.decorators.cache import never_cache from django.contrib import messages from django.http import HttpResponseRedirect from django.urls import reverse from...
[ 6738, 42625, 14208, 13, 33571, 13, 41357, 1330, 3582, 198, 6738, 42625, 14208, 13, 26791, 13, 12501, 273, 2024, 1330, 2446, 62, 12501, 273, 1352, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 12501, 273, 2024, 1330, 17594, 62, ...
2.846906
307
#!/usr/bin/env python # -*- coding: utf-8 -*- import time from collections import defaultdict from typing import List, Optional, Iterable, Dict import base62 from sqlalchemy import select, and_ from sqlalchemy.dialects.mysql import insert as mysql_insert from epicteller.core.model.character import Character from epi...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 640, 198, 6738, 17268, 1330, 4277, 11600, 198, 6738, 19720, 1330, 7343, 11, 32233, 11, 40806, 540, 11, 360,...
3.328859
149
#! -*- coding:utf-8 -*- # RoPE # https://github.com/ZhuiyiTechnology/roformer-v2 # pytorchhttps://github.com/JunnYu/RoFormer_pytorch from bert4torch.tokenizers import Tokenizer from bert4torch.models import build_transformer_model, BaseModel from bert4torch.snippets import sequence_padding, Callback, text_segmentate, ...
[ 2, 0, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 2, 5564, 11401, 198, 2, 3740, 1378, 12567, 13, 785, 14, 57, 13415, 7745, 72, 44893, 14, 305, 16354, 12, 85, 17, 198, 2, 12972, 13165, 354, 5450, 1378, 12567, 13, 785...
2.511204
714
# Copyright 2014-2018 The PySCF Developers. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
[ 2, 15069, 1946, 12, 7908, 383, 9485, 6173, 37, 34152, 13, 1439, 6923, 33876, 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...
3.675
200
''' graphtrue ABAB graphgraph[i]i0graph.length-1graph[i]igraph[i] 1: : [[1,3], [0,2], [1,3], [0,2]] : true : : 0----1 | | | | 3----2 : {0, 2} {1, 3} 2: : [[1,2,3], [0,2], [0,1,3], [0,2]] : false : : 0----1 | \ | | \ | 3----2 LeetCode https://leetcode-cn.com/problems/is-graph-bipartite '''
[ 7061, 6, 198, 34960, 7942, 198, 198, 32, 4339, 33, 198, 198, 34960, 34960, 58, 72, 60, 72, 15, 34960, 13, 13664, 12, 16, 34960, 58, 72, 60, 45920, 58, 72, 60, 628, 198, 352, 25, 198, 25, 16410, 16, 11, 18, 4357, 685, 15, 11, ...
1.688525
183
# -*- coding: utf-8 -*- """ Created on Tue Apr 17 06:44:47 2018 @author: Eleam Emmanuel """ import pandas as pd import numpy as np import matplotlib.pyplot as plt from sklearn.tree import DecisionTreeRegressor # importing the dataset dataset = pd.read_csv('Position_Salaries.csv') # take all the columns but leave the...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 30030, 2758, 1596, 9130, 25, 2598, 25, 2857, 2864, 198, 198, 31, 9800, 25, 15987, 321, 32390, 198, 37811, 198, 198, 11748, 19798, 292, 355, 279, ...
2.78937
508
from django.apps import AppConfig from django.conf import settings from django.core import checks from django.template import engines from django.template.backends.django import DjangoTemplates from django.utils.text import capfirst from django.utils.translation import gettext_lazy as _
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 7295, 1330, 8794, 198, 6738, 42625, 14208, 13, 28243, 1330, 11874, 198, 6738, 42625, 14208, 13, 28243, 13, 1891...
3.766234
77