content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
from distutils.core import setup import versioneer version = versioneer.get_version() setup(name='papers-cli', version=version, cmdclass = versioneer.get_cmdclass(), author='Mahe Perrette', author_email='mahe.perrette@gmail.com', description='utilities to keep your PDF library organized'...
[ 6738, 1233, 26791, 13, 7295, 1330, 9058, 198, 11748, 2196, 28153, 198, 198, 9641, 796, 2196, 28153, 13, 1136, 62, 9641, 3419, 198, 198, 40406, 7, 3672, 11639, 40491, 12, 44506, 3256, 198, 220, 220, 220, 220, 220, 2196, 28, 9641, 11, ...
2.651452
241
from pygears.core.gear import alternative, gear from pygears.typing import Queue, Tuple, typeof from pygears.common.shred import shred from pygears.common.ccat import ccat from pygears.util.utils import quiter_async from pygears import module @gear(enablement=b'len(din) == 2') @alternative(cart) @gear # TODO: L...
[ 6738, 12972, 70, 4127, 13, 7295, 13, 31763, 1330, 5559, 11, 7733, 198, 6738, 12972, 70, 4127, 13, 774, 13886, 1330, 4670, 518, 11, 309, 29291, 11, 2099, 1659, 198, 6738, 12972, 70, 4127, 13, 11321, 13, 1477, 445, 1330, 21163, 198, 6...
2.864706
170
import pandas as pd import requests import io import numpy as np #Goal: go through daily reports of JHU to get data for # Texas, Travis, Harris, Dallas baseurl = 'https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_daily_reports/' #Start from March 1 #March 1 to March ...
[ 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 7007, 198, 11748, 33245, 198, 11748, 299, 32152, 355, 45941, 198, 198, 2, 49045, 25, 467, 832, 4445, 3136, 286, 449, 39, 52, 284, 651, 1366, 329, 198, 2, 3936, 11, 19804, 11, 10026, ...
1.980672
1,190
from typing import Callable from torchvision import transforms as tf from . import TRANSFORM_REGISTRY __all__ = ['ManyTimes', 'Twice'] @TRANSFORM_REGISTRY.register class IdentityAndManyTimes: """ This class changes an image to a normalized tensor image and a series of augmented image. Args: tra...
[ 6738, 19720, 1330, 4889, 540, 198, 6738, 28034, 10178, 1330, 31408, 355, 48700, 198, 6738, 764, 1330, 44069, 21389, 62, 31553, 1797, 40405, 628, 198, 834, 439, 834, 796, 37250, 7085, 28595, 3256, 705, 5080, 501, 20520, 628, 198, 31, 544...
2.741273
487
from src.protocol import anonymous_transmission if __name__ == "__main__": main()
[ 6738, 12351, 13, 11235, 4668, 1330, 11614, 62, 7645, 3411, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1388, 3419, 198 ]
2.966667
30
# -*- coding: utf-8 -*- from collections.abc import Mapping import re import pytest from scipy import sparse from sklearn.feature_extraction.text import strip_tags from sklearn.feature_extraction.text import strip_accents_unicode from sklearn.feature_extraction.text import strip_accents_ascii from sklearn.feature_ex...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 17268, 13, 39305, 1330, 337, 5912, 198, 11748, 302, 198, 198, 11748, 12972, 9288, 198, 6738, 629, 541, 88, 1330, 29877, 198, 198, 6738, 1341, 35720, 13, 30053, 62,...
2.261734
4,730
""" __author__ = HackPrinceton 2017 Best Team __description__ = Initializes files for extraction module """
[ 37811, 198, 834, 9800, 834, 796, 18281, 42904, 18483, 2177, 6705, 4816, 198, 834, 11213, 834, 796, 20768, 4340, 3696, 329, 22236, 8265, 198, 37811, 198 ]
4.153846
26
# 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 # distribu...
[ 2, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 220, 220, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 220, 220, 921, 743, 7330, 257, 4866,...
1.766381
2,915
import base64 import json import struct from collections import abc from enum import Enum from os import environ as env from time import sleep, time from typing import cast, Any, Dict, Iterable, Iterator, List, Optional, \ Tuple, TypeVar, Union import pyarrow as pa from pyarrow.lib import ArrowKeyError, RecordBatc...
[ 11748, 2779, 2414, 198, 11748, 33918, 198, 11748, 2878, 198, 6738, 17268, 1330, 450, 66, 198, 6738, 33829, 1330, 2039, 388, 198, 6738, 28686, 1330, 551, 2268, 355, 17365, 198, 6738, 640, 1330, 3993, 11, 640, 198, 6738, 19720, 1330, 3350...
2.231233
7,966
print(type(5)) my_dict = {} print(type(my_dict)) my_list = [] print(type(my_list))
[ 4798, 7, 4906, 7, 20, 4008, 198, 198, 1820, 62, 11600, 796, 23884, 198, 198, 4798, 7, 4906, 7, 1820, 62, 11600, 4008, 198, 198, 1820, 62, 4868, 796, 17635, 198, 198, 4798, 7, 4906, 7, 1820, 62, 4868, 4008 ]
2.15
40
import json import datetime import numpy as np import unittest import great_expectations as ge if __name__ == "__main__": unittest.main()
[ 11748, 33918, 198, 11748, 4818, 8079, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 555, 715, 395, 198, 198, 11748, 1049, 62, 1069, 806, 602, 355, 4903, 628, 628, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 129...
2.865385
52
# -*- coding: utf-8 -*- """ @author: Zheng Fang """ from numba import cuda import numpy as np n = int(2e4) # this is not to exceed 10^7 # supply data data = np.random.normal(size=n, loc=0, scale=1).astype('float64') # define convenience function #============================================...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 31, 9800, 25, 44583, 24468, 201, 198, 37811, 201, 198, 201, 198, 201, 198, 6738, 997, 7012, 1330, 269, 15339, 201, 198, 11748, 299, 32152, 355, 4...
2.604938
162
"""Collections of objects and collection helper functions.""" __all__ = [ 'BiDict', 'DictBuilder', 'DictView', 'LoadingDict', 'LruCache', 'NamedTuple', 'SingletonMeta', 'Symbols', 'Trie', 'collect', 'collect_pairs', 'group', 'is_ordered', 'unique', ] import oper...
[ 37811, 5216, 26448, 286, 5563, 290, 4947, 31904, 5499, 526, 15931, 198, 198, 834, 439, 834, 796, 685, 198, 220, 220, 220, 705, 23286, 35, 713, 3256, 198, 220, 220, 220, 705, 35, 713, 32875, 3256, 198, 220, 220, 220, 705, 35, 713, ...
2.43565
1,453
""" Inverse chi-square distribution ------------------------------- The probability density function for the inverse chi-square distribution is f(x, nu) = 2**(-nu/2) / Gamma(nu/2) * x**(-nu/2 - 1) * exp(-1/(2*x)) See the Wikipedia article `"Inverse-chi-squared distribution" <https://en.wikipedia.org/wiki/Inverse...
[ 37811, 198, 818, 4399, 33166, 12, 23415, 6082, 198, 1783, 24305, 198, 198, 464, 12867, 12109, 2163, 329, 262, 34062, 33166, 12, 23415, 198, 17080, 3890, 318, 628, 220, 220, 220, 277, 7, 87, 11, 14364, 8, 796, 362, 1174, 32590, 28803, ...
1.998932
1,873
#!/usr/bin/python import psutil import subprocess import simplejson import time import random import multiprocessing as mp procs_id = 0 procs = {} procs_data = [] url_num = 0 # Define an output queue output = mp.Queue() MAX_THREAD_NUM = 500 #proxy_url='10.0.0.204:80' proxy_url='' urls = [ 'http://drbd.linbit.c...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 11748, 26692, 22602, 198, 11748, 850, 14681, 198, 11748, 2829, 17752, 198, 11748, 640, 198, 11748, 4738, 198, 11748, 18540, 305, 919, 278, 355, 29034, 198, 198, 1676, 6359, 62, 312, 796, 657, ...
2.439633
762
from bs4 import BeautifulSoup as soup import os output_filename = "output_files/slideshow/app_info/app_info.csv" output_file = open(output_filename, "a") headers = "title, subtitle, publisher, country, year, last_month_downloads, last_month_revenue\n" output_file.write(headers) for filename in os.listdir(os.getcwd...
[ 6738, 275, 82, 19, 1330, 23762, 50, 10486, 355, 17141, 198, 11748, 28686, 628, 198, 22915, 62, 34345, 796, 366, 22915, 62, 16624, 14, 6649, 42286, 14, 1324, 62, 10951, 14, 1324, 62, 10951, 13, 40664, 1, 198, 22915, 62, 7753, 796, 12...
2.370224
759
from linty.linty import lint_text
[ 6738, 300, 600, 88, 13, 75, 600, 88, 1330, 300, 600, 62, 5239 ]
2.538462
13
# coding: utf-8 __version__ = '0.1.0' import logging import math import struct import time from typing import Union from netaddr import IPSet MMDBType = Union[dict, list, str, bytes, int, bool] logger = logging.getLogger(__name__) METADATA_MAGIC = b'\xab\xcd\xefMaxMind.com'
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 834, 9641, 834, 796, 705, 15, 13, 16, 13, 15, 6, 198, 198, 11748, 18931, 198, 11748, 10688, 198, 11748, 2878, 198, 11748, 640, 198, 6738, 19720, 1330, 4479, 198, 198, 6738, 2010, 29851, 1330, 3...
2.623853
109
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
[ 2, 16529, 1783, 10541, 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, 5964, 1321, 13, 198, 2, 16529, 1783, 10541, 198,...
3.034848
660
import os from dotenv import load_dotenv load_dotenv() TOKEN = os.getenv("TOKEN") COMMAND_PREFIX = os.getenv("PREFIX") OWNER = os.getenv("OWNER") ANNOUNCEMENTS_CHANNEL = os.getenv("ANNOUNCEMENTS") SECURITY_CHANNEL = os.getenv("SECURITY") SWEAR_WORDS_LIST = os.getenv("BANNEDWORDS").split(",")
[ 11748, 28686, 198, 198, 6738, 16605, 24330, 1330, 3440, 62, 26518, 24330, 198, 198, 2220, 62, 26518, 24330, 3419, 198, 198, 10468, 43959, 796, 28686, 13, 1136, 24330, 7203, 10468, 43959, 4943, 198, 9858, 44, 6981, 62, 47, 31688, 10426, ...
2.3125
128
#! /usr/bin/env python """run and initiate nltk.download('all') """ import nltk # setup or argparse PERMISSION = input("Would you like to continue and install all nltk dependanies? [Y/n] ") if PERMISSION == 'Y': try: nltk.download('all') COMPLETE = """We have completed the initial setup for ntl...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 37811, 5143, 290, 22118, 299, 2528, 74, 13, 15002, 10786, 439, 11537, 37227, 198, 198, 11748, 299, 2528, 74, 198, 198, 2, 9058, 393, 1822, 29572, 198, 198, 18973, 44, 40373, 7...
2.604167
240
from django.contrib import admin from employee.models import Department, Employee, Room admin.site.register(Department) admin.site.register(Employee) admin.site.register(Room)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 198, 6738, 6538, 13, 27530, 1330, 2732, 11, 36824, 11, 10096, 198, 198, 28482, 13, 15654, 13, 30238, 7, 36261, 8, 198, 28482, 13, 15654, 13, 30238, 7, 29733, 1453, 8, 198, 28482, ...
3.56
50
import os from moviepy.editor import VideoFileClip, concatenate_videoclips, CompositeVideoClip, TextClip import random import numpy as np import time from video_facial_landmarks_minmax import calculate_distance from face_embedding import calculate_euclidean_distance import cv2 import subprocess ONE_FRAME_SEC = 0.0333...
[ 11748, 28686, 198, 6738, 3807, 9078, 13, 35352, 1330, 7623, 8979, 2601, 541, 11, 1673, 36686, 378, 62, 85, 485, 38679, 2419, 11, 49355, 10798, 2601, 541, 11, 8255, 2601, 541, 198, 11748, 4738, 198, 11748, 299, 32152, 355, 45941, 198, ...
1.103995
1,577
#!/usr/bin/env python from __future__ import print_function from collections import namedtuple from common import config from common.response import text_response, populate_html, redirect import os import cgi import hashlib import MySQLdb import Cookie try: process_input() except: cgi.print_exception()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 198, 6738, 2219, 1330, 4566, 198, 6738, 2219, 13, 26209, 1330, 2420, 62, 26209, 11, 48...
3.393617
94
from gi.repository import Gtk
[ 6738, 308, 72, 13, 260, 1930, 37765, 1330, 402, 30488, 628 ]
2.818182
11
#! /usr/bin/env python # # Copyright (C) 2007-2009 Cournapeau David <cournape@gmail.com> # 2010 Fabian Pedregosa <fabian.pedregosa@inria.fr> # License: 3-clause BSD import sys import os import platform import shutil # We need to import setuptools before because it monkey-patches distutils import setupto...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 2, 15069, 357, 34, 8, 4343, 12, 10531, 327, 1798, 1758, 559, 3271, 1279, 66, 1798, 1758, 31, 14816, 13, 785, 29, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
2.724961
1,927
import textwrap from functools import partial import click import tqdm from wasabi import Printer, MESSAGES from wasabi.util import ICONS msg = Printer() success = partial(msg.text, color=MESSAGES.GOOD, icon=MESSAGES.GOOD) info = partial(msg.text, color=MESSAGES.INFO, icon=MESSAGES.INFO) error = partial(msg.text, co...
[ 11748, 2420, 37150, 198, 6738, 1257, 310, 10141, 1330, 13027, 198, 198, 11748, 3904, 198, 11748, 256, 80, 36020, 198, 6738, 373, 17914, 1330, 1736, 3849, 11, 337, 1546, 4090, 48075, 198, 6738, 373, 17914, 13, 22602, 1330, 314, 10943, 50...
2.599251
267
import sqlite3 import json import uuid
[ 11748, 44161, 578, 18, 198, 11748, 33918, 198, 11748, 334, 27112 ]
3.454545
11
s = 'ORnPBPMgArCaCaCaSiThCaCaSiThCaCaPBSiRnFArRnFArCaCaSiThCaCaSiThCaCaCaCaCaCaSiRnFYFArSiRnMgArCaSiRnPTiTiBFYPBFArSiRnCaSiRnTiRnFArSiAlArPTiBPTiRnCaSiAlArCaPTiTiBPMgYFArPTiRnFArSiRnCaCaFArRnCaFArCaSiRnSiRnMgArFYCaSiRnMgArCaCaSiThPRnFArPBCaSiRnMgArCaCaSiThCaSiRnTiMgArFArSiThSiThCaCaSiRnMgArCaCaSiRnFArTiBPTiRnCaSiAlArCa...
[ 82, 796, 705, 1581, 77, 49079, 5868, 70, 3163, 24334, 24334, 24334, 42801, 817, 24334, 24334, 42801, 817, 24334, 24334, 47, 4462, 72, 49, 77, 37, 3163, 49, 77, 37, 3163, 24334, 24334, 42801, 817, 24334, 24334, 42801, 817, 24334, 24334, ...
1.824377
763
import urllib.parse, urllib.request, json CompareDocs(""" All human beings are born free and equal in dignity and rights. They are endowed with reason and conscience and should act towards one another in a spirit of brotherhood. Everyone is entitled to all the rights and freedoms set forth in th...
[ 11748, 2956, 297, 571, 13, 29572, 11, 2956, 297, 571, 13, 25927, 11, 33918, 198, 198, 41488, 23579, 82, 7203, 15931, 198, 220, 220, 220, 1439, 1692, 9791, 389, 4642, 1479, 290, 4961, 287, 16247, 290, 2489, 13, 220, 198, 220, 220, 22...
2.754358
631
from . import FixtureTest
[ 6738, 764, 1330, 376, 9602, 14402, 628 ]
3.857143
7
# Copyright lowRISC contributors. # Licensed under the Apache License, Version 2.0, see LICENSE for details. # SPDX-License-Identifier: Apache-2.0 import random from typing import Optional, Tuple from shared.insn_yaml import Insn, InsnsFile from shared.lsu_desc import LSUDesc from shared.operand import ImmOperandType...
[ 2, 15069, 1877, 49, 37719, 20420, 13, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 11, 766, 38559, 24290, 329, 3307, 13, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 198, 198, 11748, ...
1.998407
3,139
# from django.http import request # import pytest # from django.contrib.auth.models import AnonymousUser # from django.http.response import Http404, HttpResponse # from django.shortcuts import get_object_or_404 # from django.test import RequestFactory # from shortit.shortener.models import ShortUrl # from shortit.shor...
[ 2, 422, 42625, 14208, 13, 4023, 1330, 2581, 198, 2, 1330, 12972, 9288, 198, 2, 422, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 19200, 12982, 198, 2, 422, 42625, 14208, 13, 4023, 13, 26209, 1330, 367, 29281, 26429, 11, ...
2.639752
322
# -*- coding: utf-8 -*- #============================================================================== # Copyright: Hybrid Labs # Licence: See LICENSE #============================================================================== """ Python to Javascript compiler """ from .compiler import js_compi...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 2, 23926, 25609, 855, 201, 198, 2, 15069, 25, 220, 220, 220, 29481, 23500, 201, 198, 2, 10483, 594, 25, 220, 220, 220, 220, 220, 4091, 38559, 24290, 201, 198, 2...
4.059524
84
from conans.model.ref import ConanFileReference, PackageReference
[ 6738, 369, 504, 13, 19849, 13, 5420, 1330, 31634, 8979, 26687, 11, 15717, 26687, 628 ]
4.466667
15
import multiprocessing pool = None
[ 11748, 18540, 305, 919, 278, 198, 198, 7742, 796, 6045, 628, 198 ]
3.166667
12
# Copyright 2015 Florian Ludwig # # 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, s...
[ 2, 15069, 1853, 4432, 666, 44476, 198, 2, 198, 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, 1...
2.4753
749
gen = genPrimes() print gen.next() print gen.next() print gen.next() print gen.next()
[ 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198, 5235, 796, 2429, 6836, 999, 3419, 198, 4798, 2429, 13, 19545, 3419, 198, 4798, 2429, 13, 19545, 3419, 198, 4798, 2429, 13, 19545, 3419, 198, 4798, 2429, 13, 19545, 341...
2.27907
43
# Generated by Django 3.1.2 on 2020-11-15 11:40 import django.contrib.auth.models import django.contrib.postgres.fields.jsonb from django.conf import settings from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 17, 319, 12131, 12, 1157, 12, 1314, 1367, 25, 1821, 198, 198, 11748, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 198, 11748, 42625, 14208, 13, 3642, 822, 13, 7353, 34239, 13, 25747, ...
3.012821
78
import fire from pi_camera_capture.app import main if __name__ == "__main__": cli()
[ 11748, 2046, 198, 6738, 31028, 62, 25695, 62, 27144, 495, 13, 1324, 1330, 1388, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 537, 72, 3419, 198 ]
2.6
35
# Word list for hangman words = ["aback", "abaft", "abandoned", "abashed", "aberrant", "abhorrent", "abiding", "abject", "ablaze", "able", "abnormal", "aboard", "aboriginal", "abortive", "abounding", "abrasive", "abrupt", "absent", "absorbed", "absorbing", "abstracted", "absurd", "abundant", "abusive...
[ 2, 9678, 1351, 329, 8181, 805, 201, 198, 10879, 796, 14631, 397, 441, 1600, 366, 397, 14940, 1600, 366, 397, 5063, 276, 1600, 366, 397, 5263, 1600, 366, 27359, 5250, 1600, 366, 397, 17899, 1156, 1600, 366, 43056, 1600, 366, 397, 752, ...
2.365854
11,521
import os train_src="../dynet_nmt/data/train.de-en.de.wmixerprep" train_tgt="../dynet_nmt/data/train.de-en.en.wmixerprep" dev_src="../dynet_nmt/data/valid.de-en.de" dev_tgt="../dynet_nmt/data/valid.de-en.en" test_src="../dynet_nmt/data/test.de-en.de" test_tgt="../dynet_nmt/data/test.de-en.en" for temp in [0.6, 0.8]: ...
[ 11748, 28686, 198, 198, 27432, 62, 10677, 2625, 40720, 67, 2047, 316, 62, 77, 16762, 14, 7890, 14, 27432, 13, 2934, 12, 268, 13, 2934, 13, 86, 19816, 263, 46012, 1, 198, 27432, 62, 83, 13655, 2625, 40720, 67, 2047, 316, 62, 77, 16...
2.039173
919
import numpy as np def calculate_probs(predicted_classes, num_classes): ''' This function is to calculate the probabilities for each class given the softmax output :param predicted_classes: matrix num_datapoints X num_ensembles (or dropout_iterations) :param num_classes: :return: For each datapoin...
[ 11748, 299, 32152, 355, 45941, 628, 198, 4299, 15284, 62, 1676, 1443, 7, 28764, 5722, 62, 37724, 11, 997, 62, 37724, 2599, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 770, 2163, 318, 284, 15284, 262, 39522, 329, 1123, 1398, 1...
3.189189
148
from __future__ import unicode_literals from django.db import models import datetime as dt from django.contrib.auth.mixins import LoginRequiredMixin from django.dispatch import receiver from django.db.models.signals import (post_save,pre_save,) # from PIL import Image from django.core.files import File from django.disp...
[ 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 11748, 4818, 8079, 355, 288, 83, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 19816, 1040, 1330, 23093, 37374, 356...
3.489011
182
import torchvision from torch import nn def deeplabv3_resnet50_features(pretrained=False, **kwargs): """Constructs a ResNet-50 model. Args: pretrained (bool): If True, returns a model pre-trained on Coco """ model = torchvision.models.segmentation.deeplabv3_resnet50(pretrained=pretrained) ...
[ 11748, 28034, 10178, 198, 6738, 28034, 1330, 299, 77, 628, 198, 198, 4299, 390, 68, 489, 397, 85, 18, 62, 411, 3262, 1120, 62, 40890, 7, 5310, 13363, 28, 25101, 11, 12429, 46265, 22046, 2599, 198, 220, 220, 220, 37227, 42316, 82, 25...
2.663102
187
import abc from typing import Any, Callable, Dict, Iterable, Iterator, List, Optional from globus_sdk.response import GlobusHTTPResponse class Paginator(Iterable[GlobusHTTPResponse], metaclass=abc.ABCMeta): """ Base class for all paginators. This guarantees is that they have generator methods named ``pag...
[ 11748, 450, 66, 198, 6738, 19720, 1330, 4377, 11, 4889, 540, 11, 360, 713, 11, 40806, 540, 11, 40806, 1352, 11, 7343, 11, 32233, 198, 198, 6738, 15095, 385, 62, 21282, 74, 13, 26209, 1330, 40713, 385, 6535, 51, 4805, 9774, 2591, 628...
2.755208
768
# -*- coding: utf-8 -*- """Top-level package for pysurf.""" __author__ = """Maximilian F.S.J. Menger, Johannes Ehrmaier""" __email__ = 'menger.maximilian@gmail.com' __version__ = '0.1.0' # import os # from colt import PluginLoader from .spp.spp import SurfacePointProvider from .spp import AbinitioBase, Model, Inter...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 9126, 12, 5715, 5301, 329, 279, 893, 333, 69, 526, 15931, 198, 198, 834, 9800, 834, 796, 37227, 11518, 26641, 666, 376, 13, 50, 13, 41, 13, 6065, 1362, 1...
2.793991
233
""" This holds functionality to get commands, and parse commands """ from quick_netmiko import QuickNetmiko from pyats_genie_command_parse import GenieCommandParse def command_parse(python_dict, fifo_queue, thread_lock): # pylint: disable=inconsistent-return-statements """Function to get and parse commands from...
[ 37811, 198, 1212, 6622, 11244, 284, 651, 9729, 11, 290, 21136, 9729, 198, 198, 37811, 198, 6738, 2068, 62, 3262, 76, 12125, 1330, 12029, 7934, 76, 12125, 198, 6738, 12972, 1381, 62, 5235, 494, 62, 21812, 62, 29572, 1330, 49405, 21575, ...
2.636364
517
import math import torch from torch import nn from torch.nn import Parameter, Linear from modules.commons.layers import LayerNorm, Embedding from utils.nn.seq_utils import get_incremental_state, set_incremental_state, softmax, make_positions import torch.nn.functional as F DEFAULT_MAX_SOURCE_POSITIONS = 2000 DEFAULT_M...
[ 11748, 10688, 198, 11748, 28034, 198, 6738, 28034, 1330, 299, 77, 198, 6738, 28034, 13, 20471, 1330, 25139, 2357, 11, 44800, 198, 6738, 13103, 13, 9503, 684, 13, 75, 6962, 1330, 34398, 35393, 11, 13302, 6048, 278, 198, 6738, 3384, 4487,...
2.413346
1,079
import numpy as np from geometer import ( Point, Line, Plane, PointCollection, LineCollection, PlaneCollection, join, meet, is_perpendicular, translation, rotation, )
[ 11748, 299, 32152, 355, 45941, 198, 6738, 4903, 15635, 1330, 357, 198, 220, 220, 220, 6252, 11, 198, 220, 220, 220, 6910, 11, 198, 220, 220, 220, 36829, 11, 198, 220, 220, 220, 6252, 36307, 11, 198, 220, 220, 220, 6910, 36307, 11, ...
2.41573
89
from logging import getLogger MPIO_BUS_DRIVER_INSTANCE_ID = u"Root\\MPIO\\0000".lower() logger = getLogger(__name__)
[ 6738, 18931, 1330, 651, 11187, 1362, 198, 198, 7378, 9399, 62, 45346, 62, 7707, 38757, 62, 38604, 19240, 62, 2389, 796, 334, 1, 30016, 6852, 7378, 9399, 6852, 2388, 1911, 21037, 3419, 198, 6404, 1362, 796, 651, 11187, 1362, 7, 834, 36...
2.595745
47
# extra processing after fmriprep, for all tasks import os, json import sys, glob import re import numpy as np import pandas as pd from utils import * #import script to use relevante functions # define participant number and open json parameter file if len(sys.argv)<2: raise NameError('Please add subject num...
[ 198, 2, 3131, 7587, 706, 277, 76, 380, 46012, 11, 329, 477, 8861, 198, 198, 11748, 28686, 11, 33918, 198, 11748, 25064, 11, 15095, 198, 11748, 302, 220, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, ...
2.071247
1,965
from django.contrib import admin from .models import Profile, FriendRequest admin.site.register(Profile) admin.site.register(FriendRequest)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 764, 27530, 1330, 13118, 11, 9182, 18453, 198, 198, 28482, 13, 15654, 13, 30238, 7, 37046, 8, 198, 28482, 13, 15654, 13, 30238, 7, 23331, 18453, 8, 198 ]
3.710526
38
# Copyright 2021 D-Wave Systems Inc. # # 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 w...
[ 2, 15069, 33448, 360, 12, 39709, 11998, 3457, 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, 13789, 13, 1...
3.080597
335
#encode:utf-8 from __future__ import unicode_literals import re import os from wapiti import Model from genius.trie import TrieTree from genius.word import Word here = os.path.abspath(os.path.dirname(__file__)) library_path = os.path.join(here, 'library')
[ 2, 268, 8189, 25, 40477, 12, 23, 198, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 302, 198, 11748, 28686, 198, 6738, 266, 499, 8846, 1330, 9104, 198, 6738, 15632, 13, 83, 5034, 1330, 309, 5034, ...
2.888889
90
import urllib.request import urllib.parse def search(parsmeters) data = urllib.parse.urlencode(parameters) print(data) request_ = urllib.request.Request(url='http://www.baidu.com/s?'+data ,method="GET") response = urllib.request.urlopen(request_) print(response.url) HTML=response.read().decode() print(HTML) with o...
[ 11748, 2956, 297, 571, 13, 25927, 198, 11748, 2956, 297, 571, 13, 29572, 198, 198, 4299, 2989, 7, 79, 945, 4164, 364, 8, 198, 198, 7890, 796, 220, 2956, 297, 571, 13, 29572, 13, 6371, 268, 8189, 7, 17143, 7307, 8, 198, 4798, 7, ...
2.315789
190
""" Copyright 2017-present Airbnb, Inc. 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, sof...
[ 37811, 198, 15269, 2177, 12, 25579, 35079, 11, 3457, 13, 198, 198, 26656, 15385, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 5832, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13,...
2.526521
5,128
""" Actions for Ruby dependency resolution with Bundler """ import logging from aws_lambda_builders.actions import BaseAction, Purpose, ActionFailedError from .bundler import BundlerExecutionError LOG = logging.getLogger(__name__) class RubyBundlerInstallAction(BaseAction): """ A Lambda Builder Action whic...
[ 37811, 198, 32, 2733, 329, 10888, 20203, 6323, 351, 13319, 1754, 198, 37811, 198, 198, 11748, 18931, 198, 198, 6738, 3253, 82, 62, 50033, 62, 50034, 13, 4658, 1330, 7308, 12502, 11, 32039, 11, 7561, 37, 6255, 12331, 198, 6738, 764, 65...
3.298755
241
# -*- coding:utf-8 -*- # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "Li...
[ 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 201, 198, 198, 2, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 393, 517, 198, 2, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 9387, 351, 198, 2, ...
2.084668
4,122
from random import randint n =int(input("n = ")) A =[] B =[] for i in range (n): A.append(randint(1,20)) B.append(randint(1,20)) print(A,B) dist=0 for i in range (n): if A[i] != B[i]: dist+=1 print(dist)
[ 6738, 4738, 1330, 43720, 600, 198, 77, 796, 600, 7, 15414, 7203, 77, 796, 366, 4008, 198, 32, 796, 21737, 198, 33, 796, 21737, 198, 1640, 1312, 287, 2837, 357, 77, 2599, 198, 220, 220, 220, 317, 13, 33295, 7, 25192, 600, 7, 16, ...
2
112
import platform # method copied from STL, not original work of author
[ 11748, 3859, 198, 198, 2, 2446, 18984, 422, 37269, 11, 407, 2656, 670, 286, 1772, 198 ]
4.4375
16
# Copyright (C) 2011 Nippon Telegraph and Telephone 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 appli...
[ 2, 15069, 357, 34, 8, 2813, 399, 3974, 261, 21821, 290, 44735, 10501, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846...
2.759223
515
# Este exemplo carrega a base Wine da UCI, treina uma Arvore de decisao usando # holdout e outra usando validacao cruzada com 10 pastas. # Importa bibliotecas necessarias import numpy as np import urllib from sklearn import tree from sklearn import model_selection from sklearn.metrics import confusion_matrix from ...
[ 2, 412, 4169, 21433, 78, 1097, 2301, 64, 257, 2779, 20447, 12379, 14417, 40, 11, 2054, 1437, 334, 2611, 943, 85, 382, 390, 875, 271, 5488, 514, 25440, 220, 198, 2, 1745, 448, 304, 503, 430, 514, 25440, 4938, 330, 5488, 4630, 89, 4...
2.636893
1,030
# Copyright 2018-2022 Xanadu Quantum Technologies Inc. # 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...
[ 2, 15069, 2864, 12, 1238, 1828, 47482, 324, 84, 29082, 21852, 3457, 13, 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, 11846, 351, ...
3.570934
289
from aiogram import types from app.modules.base.templates import choice_student_text, choice_teacher_text from app.modules.schedule.consts import query_type
[ 6738, 257, 72, 21857, 1330, 3858, 198, 198, 6738, 598, 13, 18170, 13, 8692, 13, 11498, 17041, 1330, 3572, 62, 50139, 62, 5239, 11, 3572, 62, 660, 3493, 62, 5239, 198, 6738, 598, 13, 18170, 13, 15952, 5950, 13, 1102, 6448, 1330, 1240...
3.456522
46
import json from airone.lib.acl import ACLType from airone.lib.test import AironeViewTest from airone.lib.types import AttrTypeStr from airone.lib.types import AttrTypeArrStr, AttrTypeArrObj from airone.lib.types import AttrTypeValue from django.urls import reverse from entity.models import Entity, EntityAttr from e...
[ 11748, 33918, 198, 198, 6738, 1633, 505, 13, 8019, 13, 37779, 1330, 17382, 6030, 198, 6738, 1633, 505, 13, 8019, 13, 9288, 1330, 3701, 505, 7680, 14402, 198, 6738, 1633, 505, 13, 8019, 13, 19199, 1330, 3460, 81, 6030, 13290, 198, 6738...
2.003211
5,295
from django.shortcuts import render from rest_framework import viewsets from rest_framework.response import Response from rest_framework.authentication import TokenAuthentication from rest_framework.authtoken.serializers import AuthTokenSerializer from rest_framework.authtoken.views import ObtainAuthToken from rest...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 198, 6738, 1334, 62, 30604, 1330, 5009, 1039, 220, 198, 6738, 1334, 62, 30604, 13, 26209, 1330, 18261, 198, 198, 6738, 1334, 62, 30604, 13, 41299, 3299, 1330, 29130, 47649, 3299, 19...
4.168142
113
from matplotlib import pyplot as plt axes_pars = {'axes.labelpad': 5, 'axes.titlepad': 5, 'axes.titlesize': 'small', 'axes.grid': False, 'axes.xmargin': 0, 'axes.ymargin': 0} plt.rcParams.update(axes_pars)
[ 6738, 2603, 29487, 8019, 1330, 12972, 29487, 355, 458, 83, 198, 198, 897, 274, 62, 79, 945, 796, 1391, 6, 897, 274, 13, 18242, 15636, 10354, 642, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 897, 274, ...
1.732484
157
import config as C from servers import app if __name__ == '__main__': app_run = app.init() app_run.run(host='0.0.0.0', port=C.API_PORT)
[ 11748, 4566, 355, 327, 198, 6738, 9597, 1330, 598, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 598, 62, 5143, 796, 598, 13, 15003, 3419, 198, 220, 220, 220, 598, 62, 5143, 13, 5143, 7, 4...
2.377049
61
import tensorflow as tf import numpy as np from cossmo.output_networks import BalancedOutputNetwork, RaggedOutputNetwork
[ 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 269, 793, 5908, 13, 22915, 62, 3262, 5225, 1330, 38984, 26410, 26245, 11, 371, 14655, 26410, 26245, 628, 198 ]
3.727273
33
import os import json from nltk.tokenize import word_tokenize from nltk.corpus import stopwords import string from collections import defaultdict import re from vaderSentiment.vaderSentiment import SentimentIntensityAnalyzer analyser = SentimentIntensityAnalyzer() if __name__ == '__main__': os.remove("tweets1234....
[ 11748, 28686, 198, 11748, 33918, 198, 6738, 299, 2528, 74, 13, 30001, 1096, 1330, 1573, 62, 30001, 1096, 198, 6738, 299, 2528, 74, 13, 10215, 79, 385, 1330, 2245, 10879, 198, 11748, 4731, 198, 6738, 17268, 1330, 4277, 11600, 198, 11748,...
2.143646
905
import os, errno import pandas as pd first_file = str(input('First Country: ')) second_file = str(input('Second Country: ')) file_path = str(input('Path:(year/month) ')) find_files(first_file, second_file, file_path)
[ 11748, 28686, 11, 11454, 3919, 201, 198, 11748, 19798, 292, 355, 279, 67, 201, 198, 201, 198, 201, 198, 201, 198, 11085, 62, 7753, 796, 965, 7, 15414, 10786, 5962, 12946, 25, 705, 4008, 201, 198, 12227, 62, 7753, 796, 965, 7, 15414,...
2.595506
89
import pygame from board import Grid from player import Player, Stats from enum import Enum, auto import os os.environ['SDL_VIDEO_WINDOW_POS'] = "%d,%d" % (400,100) surface = pygame.display.set_mode((1200, 900)) pygame.display.set_caption('Minesweeper') state = States.running player = Player() grid = Grid(player) ...
[ 11748, 12972, 6057, 198, 6738, 3096, 1330, 24846, 198, 6738, 2137, 1330, 7853, 11, 20595, 198, 6738, 33829, 1330, 2039, 388, 11, 8295, 198, 198, 11748, 28686, 198, 418, 13, 268, 2268, 17816, 10305, 43, 62, 42937, 62, 28929, 3913, 62, ...
2.245238
840
"""grouping module""" from __future__ import absolute_import, division, print_function, unicode_literals from builtins import * import itertools import numpy as np from numpy_indexed.index import as_index import numpy_indexed as npi __author__ = "Eelco Hoogendoorn" __license__ = "LGPL" __email__ = "hoogendoorn.eelco...
[ 37811, 8094, 278, 8265, 37811, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 11, 28000, 1098, 62, 17201, 874, 198, 6738, 3170, 1040, 1330, 1635, 198, 198, 11748, 340, 861, 10141, 198, 198, 11748, 2...
2.400198
8,076
# -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # # Copyright 2021-2022 Valory AG # Copyright 2018-2019 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License....
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 16529, 26171, 198, 2, 198, 2, 220, 220, 15069, 33448, 12, 1238, 1828, 3254, 652, 13077, 198, 2, 220, 220, 15069, 2864, 12, 23344, 376, 7569, 13, 20185, 15302, 198, ...
2.530756
2,406
# TODO: Turn this into a more general class which can subscribe and unsubscribe from # TODO: anything, with a context manager interface. from library.domain.events import subscribe, unsubscribe, DomainEvent
[ 198, 198, 2, 16926, 46, 25, 6756, 428, 656, 257, 517, 2276, 1398, 543, 460, 12383, 290, 32793, 12522, 422, 198, 2, 16926, 46, 25, 1997, 11, 351, 257, 4732, 4706, 7071, 13, 198, 6738, 5888, 13, 27830, 13, 31534, 1330, 12383, 11, 32...
4.285714
49
import os from typing import Optional
[ 11748, 28686, 198, 6738, 19720, 1330, 32233, 628 ]
4.875
8
import pandas as pd from sklearn import preprocessing import nltk nltk.download('punkt') dataset_structure = None TIMESTAMP_FEATURES = { "timestamp": True, "day_of_week": True, "day_of_month": True, "month": True, "hour": True, "minute": True, "year": True } def preprocess(filename, tra...
[ 11748, 19798, 292, 355, 279, 67, 198, 6738, 1341, 35720, 1330, 662, 36948, 198, 11748, 299, 2528, 74, 198, 198, 77, 2528, 74, 13, 15002, 10786, 30354, 83, 11537, 198, 198, 19608, 292, 316, 62, 301, 5620, 796, 6045, 198, 198, 51, 395...
2.307576
1,980
# Generated by Django 2.2.11 on 2020-08-13 09:21 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 1157, 319, 12131, 12, 2919, 12, 1485, 7769, 25, 2481, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.875
32
#! /usr/bin/env python # # Copyright (c) 2011 SEOmoz # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, mer...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 2, 15069, 357, 66, 8, 2813, 30850, 5908, 89, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 198, 2, 257, 4866, 286, 428, ...
2.428817
2,325
from flask import Flask from flask_iniconfig import INIConfig from flask_sqlalchemy import SQLAlchemy from ConfigParser import SafeConfigParser, NoSectionError app = Flask(__name__) parser = SafeConfigParser() parser.read('../gateConfigs.ini') app.config['Testing'] = True app.config['DEBUG'] = True app.config['WT...
[ 6738, 42903, 1330, 46947, 198, 6738, 42903, 62, 259, 4749, 5647, 1330, 3268, 2149, 261, 5647, 198, 6738, 42903, 62, 25410, 282, 26599, 1330, 16363, 2348, 26599, 198, 198, 6738, 17056, 46677, 1330, 19978, 16934, 46677, 11, 1400, 16375, 123...
2.752577
291
from django.conf.urls import patterns, url from talks.users.views import (manage_collections, list_public_collections, browse_public_collections, view_collection, add_collection, edit_collection, delete_collection, my_talks) urlpatterns = patterns('', url(r'^lists$', manage_collections, name='manage-lists'), ...
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 7572, 11, 19016, 198, 198, 6738, 6130, 13, 18417, 13, 33571, 1330, 357, 805, 496, 62, 4033, 26448, 11, 1351, 62, 11377, 62, 4033, 26448, 11, 25675, 62, 11377, 62, 4033, 26448, 11, 1...
2.695652
322
""" Serialize data to/from JSON """ import datetime from StringIO import StringIO from django.core.serializers.python import Serializer as PythonSerializer from django.core.serializers.python import Deserializer as PythonDeserializer from django.utils import datetime_safe from django.utils import simplejson try: ...
[ 37811, 198, 32634, 1096, 1366, 284, 14, 6738, 19449, 198, 37811, 198, 198, 11748, 4818, 8079, 198, 6738, 10903, 9399, 1330, 10903, 9399, 198, 198, 6738, 42625, 14208, 13, 7295, 13, 46911, 11341, 13, 29412, 1330, 23283, 7509, 355, 11361, ...
2.957921
404
#!/usr/bin/env python # Copyright 2018 Nils Bore (nbore@kth.se) # # Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this list of conditions and th...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 15069, 2864, 399, 4487, 45409, 357, 46803, 382, 31, 74, 400, 13, 325, 8, 198, 2, 198, 2, 2297, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, 11, 351, 393, 1231, 17613, ...
3.607372
624
import requests from st2actions.runners.pythonrunner import Action
[ 11748, 7007, 198, 6738, 336, 17, 4658, 13, 36740, 13, 29412, 16737, 1330, 7561, 628 ]
4.533333
15
import copy from vyper import ( ast as vy_ast, ) from vyper.exceptions import ( StructureException, TypeMismatch, VariableDeclarationException, ) from vyper.parser.context import ( Context, ) from vyper.parser.expr import ( Expr, ) from vyper.parser.memory_allocator import ( MemoryAllocator...
[ 11748, 4866, 198, 198, 6738, 410, 88, 525, 1330, 357, 198, 220, 220, 220, 6468, 355, 410, 88, 62, 459, 11, 198, 8, 198, 6738, 410, 88, 525, 13, 1069, 11755, 1330, 357, 198, 220, 220, 220, 32522, 16922, 11, 198, 220, 220, 220, 59...
2.522222
180
#!/usr/bin/python # vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4 """ A helper script to copy SIP related files. """ from __future__ import print_function import os import shutil import sys import plistlib def get_version(): '''Obtain system version info from the disk version plist''' SYSTEM_VERSION = ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 43907, 25, 7400, 11338, 28, 23, 4292, 8658, 6482, 10394, 28, 19, 2705, 8658, 11338, 28, 19, 198, 37811, 198, 32, 31904, 4226, 284, 4866, 311, 4061, 3519, 3696, 13, 198, 37811, 198, 198, ...
2.444094
635
#!/usr/bin/python # coding: utf-8 # # HeapViewer - by @danigargu # import os
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 2, 198, 2, 679, 499, 7680, 263, 532, 416, 2488, 25604, 328, 853, 84, 198, 2, 198, 198, 11748, 28686, 628, 198 ]
2.105263
38
import numpy as np from sklearn.datasets import load_svmlight_file as lsf from autosklearn.pipeline.components.classification import add_classifier from autosklearn.data import competition_data_manager as askdata import autosklearn.automl as autosk from component import DeepFeedNet aad_dataset_dir = '../datasets/datas...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 1341, 35720, 13, 19608, 292, 1039, 1330, 3440, 62, 82, 14761, 2971, 62, 7753, 355, 300, 28202, 198, 6738, 44619, 74, 35720, 13, 79, 541, 4470, 13, 5589, 3906, 13, 4871, 2649, 1330, 751, 62, ...
2.240135
887
import tensorflow as tf def parse_mot_record(serialized_example): """Parse serialized example of TfRecord and extract dictionary of all the information """ features = tf.io.parse_single_example( serialized_example, features={ 'video_name': tf.io.FixedLenFeature([], tf.string), ...
[ 11748, 11192, 273, 11125, 355, 48700, 628, 198, 4299, 21136, 62, 27926, 62, 22105, 7, 46911, 1143, 62, 20688, 2599, 198, 220, 220, 220, 37227, 10044, 325, 11389, 1143, 1672, 286, 309, 69, 23739, 290, 7925, 22155, 286, 477, 262, 1321, ...
2.200815
981
# Copyright 2020 Erik Härkönen. All rights reserved. # This file is licensed to you 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, 12131, 22722, 367, 11033, 81, 74, 9101, 38572, 13, 1439, 2489, 10395, 13, 198, 2, 770, 2393, 318, 11971, 284, 345, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, ...
3.492857
420
from unittest import TestCase import boto3 from moto import mock_ec2 from altimeter.aws.resource.ec2.vpc import VPCResourceSpec from altimeter.aws.scan.aws_accessor import AWSAccessor
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 198, 11748, 275, 2069, 18, 198, 6738, 285, 2069, 1330, 15290, 62, 721, 17, 198, 198, 6738, 5988, 16912, 13, 8356, 13, 31092, 13, 721, 17, 13, 85, 14751, 1330, 569, 5662, 26198, 22882, 198...
3.065574
61
import aiohttp apiUrl = "https://api2.hiveos.farm/api/v2"
[ 11748, 257, 952, 4023, 198, 198, 15042, 28165, 796, 366, 5450, 1378, 15042, 17, 13, 71, 425, 418, 13, 43323, 14, 15042, 14, 85, 17, 1, 628 ]
2.222222
27
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.response.AlipayResponse import AlipayResponse from alipay.aop.api.domain.CreditPayRefuseVO import CreditPayRefuseVO
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 33918, 198, 198, 6738, 435, 541, 323, 13, 64, 404, 13, 15042, 13, 26209, 13, 2348, 541, 323, 31077, 1330, 978,...
2.684932
73
#!/usr/bin/env python """ See LICENSE.txt file for copyright and license details. """ """ A plot that shows when break even is reached. """ import numpy as np import matplotlib.pyplot as plt from decimal import Decimal import sys x_array = [] y_array = [] def load_data(): """ Load data """ ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 198, 220, 220, 220, 4091, 38559, 24290, 13, 14116, 2393, 329, 6634, 290, 5964, 3307, 13, 198, 37811, 628, 198, 37811, 198, 220, 220, 220, 317, 7110, 326, 2523, 618, 2270, 772, ...
2.332192
292
from moai.nn.utils.instantiate import instantiate from moai.nn.utils.itertools import repeat __all__ = [ "instantiate", "repeat", ]
[ 6738, 6941, 1872, 13, 20471, 13, 26791, 13, 8625, 415, 9386, 1330, 9113, 9386, 198, 6738, 6941, 1872, 13, 20471, 13, 26791, 13, 270, 861, 10141, 1330, 9585, 198, 198, 834, 439, 834, 796, 685, 198, 220, 220, 220, 366, 8625, 415, 9386...
2.641509
53
# # @lc app=leetcode id=938 lang=python # # [938] Range Sum of BST # # https://leetcode.com/problems/range-sum-of-bst/description/ # # algorithms # Easy (78.13%) # Likes: 448 # Dislikes: 85 # Total Accepted: 83.4K # Total Submissions: 106.7K # Testcase Example: '[10,5,15,3,7,null,18]\n7\n15' # # Given the root n...
[ 2, 198, 2, 2488, 44601, 598, 28, 293, 316, 8189, 4686, 28, 24, 2548, 42392, 28, 29412, 198, 2, 198, 2, 685, 24, 2548, 60, 13667, 5060, 286, 44992, 198, 2, 198, 2, 3740, 1378, 293, 316, 8189, 13, 785, 14, 1676, 22143, 14, 9521, ...
2.345845
373
# Databricks notebook source dbutils.notebook.run("notebook_workflow", 0, {'action':'landing_load','job':'ytb_videoCat','mode':'dbfs','tbl':'ytb_videoCat'}) # COMMAND ---------- dbutils.notebook.run("notebook_workflow", 0, {'action':'staging_load_videoCat','job':'ytb_videoCat','mode':'dbfs','tbl':'ytb_videoCat'}) # ...
[ 2, 16092, 397, 23706, 20922, 2723, 198, 67, 4360, 4487, 13, 11295, 2070, 13, 5143, 7203, 11295, 2070, 62, 1818, 11125, 1600, 657, 11, 1391, 6, 2673, 10354, 6, 1044, 278, 62, 2220, 41707, 21858, 10354, 6, 20760, 65, 62, 15588, 21979, ...
2.507538
199
#!/usr/bin/env python3 import sys nums = list(sorted([0] + [int(line.rstrip()) for line in sys.stdin])) nums.append(nums[-1] + 3) dp = [1] while len(dp) < len(nums): cur = len(dp) i = cur-1 cum = 0 while i >= 0 and nums[cur]-nums[i] <= 3: cum += dp[i] i -= 1 dp.append(cum) print...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 25064, 198, 198, 77, 5700, 796, 1351, 7, 82, 9741, 26933, 15, 60, 1343, 685, 600, 7, 1370, 13, 81, 36311, 28955, 329, 1627, 287, 25064, 13, 19282, 259, 60, 4008, 19...
1.912791
172
#!/usr/bin/env python3 import pandas as pd import numpy as np import scipy.stats as ss import fire import logging logger = logging.getLogger() logger.setLevel(logging.INFO) stream_handler = logging.StreamHandler() # messages show up in terminal formatter = logging.Formatter('%(asctime)s %(levelname)s :: %(message)s...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 629, 541, 88, 13, 34242, 355, 37786, 198, 11748, 2046, 198, 11748, 18931, 628, 198, 6404, 1362...
2.1542
2,393