content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
__author__ = 'Rachum'
[ 834, 9800, 834, 796, 705, 49, 620, 388, 6, 198 ]
2.2
10
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals from __future__ import absolute_import import unicodedata import re, os import logging from django.utils.translation import ugettext_lazy as _ from django.db import models from django.template.loader import render_to_string from djang...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 1...
2.555728
646
# -*- coding: utf-8 -*- from unittest import TestCase from flask_login import login_user from flask_wtf import FlaskForm from wtforms import StringField from wtforms import ValidationError from app import create_app from app import db from app.configuration import TestConfiguration from app.localization import get_l...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 555, 715, 395, 1330, 6208, 20448, 198, 198, 6738, 42903, 62, 38235, 1330, 17594, 62, 7220, 198, 6738, 42903, 62, 86, 27110, 1330, 46947, 8479, 198, 6738, 266,...
3.705426
129
# Generated by Django 3.1.1 on 2020-11-10 03:16 import django.core.validators from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 16, 319, 12131, 12, 1157, 12, 940, 7643, 25, 1433, 201, 198, 201, 198, 11748, 42625, 14208, 13, 7295, 13, 12102, 2024, 201, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, ...
2.680851
47
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'About.ui' # # Created by: PyQt5 UI code generator 5.11.3 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 5178, 7822, 7560, 422, 3555, 334, 72, 2393, 705, 8585, 13, 9019, 6, 198, 2, 198, 2, 15622, 416, 25, 9485, 48, 83, 20, 12454, 2438, 17301, 642, 13, 1157, 13...
2.833333
84
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models from django.conf import settings
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 6738, 42625, 14208, 13, 10414, 1330, ...
3.111111
45
import pymysql conexao = pymysql.connect( host='localhost', user='root', password='admin1234', db='ex_01') cursor = conexao.cursor(pymysql.cursors.DictCursor)
[ 11748, 279, 4948, 893, 13976, 201, 198, 201, 198, 49180, 87, 5488, 796, 279, 4948, 893, 13976, 13, 8443, 7, 201, 198, 220, 220, 220, 2583, 11639, 36750, 3256, 201, 198, 220, 220, 220, 2836, 11639, 15763, 3256, 201, 198, 220, 220, 22...
2
96
#!/usr/bin/python """downsample Author: Christoph Hahn (christoph.hahn@uni-graz.at) February 2017 Extract a random subsample of ~ x % reads from fastq data. The choice is based on a random number generator. For each fastq read, a random number between 1-100 will be generated. If the random number is smaller than t...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 628, 198, 37811, 30371, 1403, 198, 198, 13838, 25, 1951, 2522, 367, 15386, 357, 43533, 2522, 13, 71, 15386, 31, 35657, 12, 70, 3247, 13, 265, 8, 198, 21816, 2177, 198, 198, 11627, 974, 257, 4738...
3.327434
565
""" Your task is to construct a building which will be a pile of n cubes. The cube at the bottom will have a volume of n^3, the cube above will have volume of (n-1)^3 and so on until the top which will have a volume of 1^3. You are given the total volume m of the building. Being given m can you find the number n of cub...
[ 37811, 198, 7120, 4876, 318, 284, 5678, 257, 2615, 543, 481, 307, 257, 14540, 286, 299, 34896, 13, 198, 464, 23441, 379, 262, 4220, 481, 423, 257, 6115, 286, 299, 61, 18, 11, 262, 23441, 2029, 481, 423, 6115, 286, 357, 77, 12, 16,...
3.307692
169
"""Class to handle iterating through tweets in real time.""" import json import os import pandas as pd # Said this was unused. # from bluebird import BlueBird from bluebird.scraper import BlueBird from sentiment import PoliticalClassification from train import TrainingML col_names32 = "created_at,id,id_str,full_tex...
[ 37811, 9487, 284, 5412, 11629, 803, 832, 12665, 287, 1103, 640, 526, 15931, 198, 198, 11748, 33918, 198, 11748, 28686, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 2, 23885, 428, 373, 21958, 13, 198, 2, 422, 4171, 16944, 1330, 4518...
2.179706
2,109
#!/usr/bin/env python3 import aws_cdk.aws_iam as iam import aws_cdk.aws_s3 as s3 from aws_cdk import core app = core.App() export = ExportingStack(app, "export") ImportingStack( app, "import", role_a=export.exported_role_a, role_b=export.exported_role_b ) app.synth()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 3253, 82, 62, 10210, 74, 13, 8356, 62, 1789, 355, 1312, 321, 198, 11748, 3253, 82, 62, 10210, 74, 13, 8356, 62, 82, 18, 355, 264, 18, 198, 198, 6738, 3253, 82, 62...
2.212121
132
# -*- coding: utf-8 -*- # vim:fenc=utf-8 import pytest import trustpaylib try: unicode py3 = False except NameError: py3 = True unicode = lambda s: s
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 43907, 25, 69, 12685, 28, 40477, 12, 23, 628, 198, 11748, 12972, 9288, 198, 198, 11748, 3774, 15577, 8019, 198, 198, 28311, 25, 198, 220, 220, 220, 28000, 1098, 198...
2.220779
77
inputfile = open('inputDay01.txt', 'r') values = [int(i) for i in inputfile.readlines()] #PART1 #PART2 print("Part1:",aoc01(values,2020)) print("Part2:",aoc02(values,2020)) inputfile.close()
[ 15414, 7753, 796, 1280, 10786, 15414, 12393, 486, 13, 14116, 3256, 705, 81, 11537, 198, 27160, 796, 685, 600, 7, 72, 8, 329, 1312, 287, 5128, 7753, 13, 961, 6615, 3419, 60, 198, 2, 30709, 16, 198, 198, 2, 30709, 17, 198, 198, 4798...
2.443038
79
import logging from flask import request from flask_restplus import Resource, Namespace, fields from ..managers import auth_manager from ..managers.auth_manager import token_required from ..exceptions import HTTP_EXCEPTION api = Namespace('auth', description='Authentication related operations') dto = api.model('au...
[ 11748, 18931, 198, 198, 6738, 42903, 1330, 2581, 198, 6738, 42903, 62, 2118, 9541, 1330, 20857, 11, 28531, 10223, 11, 7032, 198, 198, 6738, 11485, 805, 10321, 1330, 6284, 62, 37153, 198, 6738, 11485, 805, 10321, 13, 18439, 62, 37153, 13...
3.75
132
from abc import ABC, abstractmethod, abstractproperty from typing import Dict __all__ = ["AbstractAlgorithm"] def analyze_comparison(self, res1: Dict, res2: Dict, comp_res: Dict, acc): """ . . :param res1: AbstractAlgorithm.preprocess :type re...
[ 6738, 450, 66, 1330, 9738, 11, 12531, 24396, 11, 12531, 26745, 198, 6738, 19720, 1330, 360, 713, 628, 198, 834, 439, 834, 796, 14631, 23839, 2348, 42289, 8973, 628, 198, 220, 220, 220, 825, 16602, 62, 785, 1845, 1653, 7, 944, 11, 58...
1.901361
588
#!/usr/bin/python3 from cffi import FFI source = open("libsec.h", "r").read() header = """ #include <secp256k1.h> #include <secp256k1_extrakeys.h> #include <secp256k1_schnorrsig.h> """ ffi = FFI() ffi.cdef(source) ffi.set_source("_libsec", header, libraries=["secp256k1"]) ffi.compile(verbose=True)
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 6738, 269, 487, 72, 1330, 376, 11674, 628, 198, 10459, 796, 1280, 7203, 8019, 2363, 13, 71, 1600, 366, 81, 11074, 961, 3419, 198, 198, 25677, 796, 37227, 198, 2, 17256, 1279, 2363,...
2.18705
139
from kafka import KafkaConsumer, KafkaProducer import json
[ 6738, 479, 1878, 4914, 1330, 46906, 49106, 11, 46906, 11547, 2189, 198, 11748, 33918 ]
4.142857
14
import psycopg2 import sys from nltk.tokenize import sent_tokenize import re import csv import os # pmid {16300001 - 16400000} try: # starting_pmid = 16300001 # intermediate_pmid = 16400000 starting_pmid = 100001 intermediate_pmid = 200000 ending_pmid = 32078260 while 1: if interme...
[ 11748, 17331, 22163, 70, 17, 198, 11748, 25064, 198, 6738, 299, 2528, 74, 13, 30001, 1096, 1330, 1908, 62, 30001, 1096, 220, 198, 11748, 302, 198, 11748, 269, 21370, 198, 11748, 28686, 628, 198, 198, 2, 9114, 312, 1391, 24136, 2388, 1...
2.048241
995
#! /usr/bin/env python3 # -*- coding: utf-8 -*- import utility ################### ## main ################### if __name__=='__main__': import argparse parser = argparse.ArgumentParser() parser.add_argument("-m", "--model", help="the path to the model file") args = parser.parse_args() p...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 10361, 198, 198, 14468, 21017, 198, 2235, 1388, 198, 14468, 21017, 198, 198, 361, 11593, 3672, 834, ...
2.74375
160
import json from collections.abc import Callable from typing import Optional import numpy as np from PIL import Image from volcengine_ml_platform.datasets.dataset import _Dataset from volcengine_ml_platform.io.tos_dataset import TorchTOSDataset
[ 11748, 33918, 198, 6738, 17268, 13, 39305, 1330, 4889, 540, 198, 6738, 19720, 1330, 32233, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 350, 4146, 1330, 7412, 198, 198, 6738, 2322, 66, 18392, 62, 4029, 62, 24254, 13, 19608, 292, ...
3.220779
77
# Copyright 2020 TrueMLGPro # 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, soft...
[ 2, 15069, 12131, 6407, 5805, 38, 2964, 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, 262, 13789, 13, 198, 2, 921, 74...
3.128009
914
import os, glob from tasks import task, TaskError, get, sh, SHResult
[ 11748, 28686, 11, 15095, 198, 6738, 8861, 1330, 4876, 11, 15941, 12331, 11, 651, 11, 427, 11, 6006, 23004, 198 ]
3.45
20
from dataclasses import dataclass from typing import List, Dict, Any
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 6738, 19720, 1330, 7343, 11, 360, 713, 11, 4377, 628 ]
3.684211
19
# Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. # Inspired from https://github.com/rwightman/pytorch-image-models from contextlib import contextmanager import torch from...
[ 2, 15069, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 770, 2723, 2438, 318, 11971, 739, 262, 5964, 1043, 287, 262, 198, 2, 38559, 24290, 2393, 287, 262, 6808, 8619, 286, 42...
3.824176
91
import os import fnmatch import deep_learning tests = [file for file in os.listdir(os.getcwd()) if fnmatch.fnmatch(file, 'test_*.py')] tests.remove('test_all.py') for test in tests: print '---------- '+test+' ----------' execfile(test)
[ 11748, 28686, 201, 198, 11748, 24714, 15699, 201, 198, 11748, 2769, 62, 40684, 201, 198, 201, 198, 41989, 796, 685, 7753, 329, 2393, 287, 28686, 13, 4868, 15908, 7, 418, 13, 1136, 66, 16993, 28955, 611, 24714, 15699, 13, 22184, 15699, ...
2.604167
96
import warnings import argparse import os import logging import lib.metadata as metadata import lib.model as model import lib.text as text import lib.website as website warnings.filterwarnings('ignore') logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) ####################################...
[ 11748, 14601, 198, 11748, 1822, 29572, 198, 11748, 28686, 198, 11748, 18931, 198, 11748, 9195, 13, 38993, 355, 20150, 198, 11748, 9195, 13, 19849, 355, 2746, 198, 11748, 9195, 13, 5239, 355, 2420, 198, 11748, 9195, 13, 732, 12485, 355, ...
3.94294
2,401
from abc import ABC, abstractmethod from collections.abc import MutableSequence from datetime import datetime from typing import NamedTuple, Any, Optional, Iterator from .encoders import ENCODERS, string_encode, default_encoder, datetime_encode, blob_encode
[ 6738, 450, 66, 1330, 9738, 11, 12531, 24396, 198, 6738, 17268, 13, 39305, 1330, 13859, 540, 44015, 594, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 19720, 1330, 34441, 51, 29291, 11, 4377, 11, 32233, 11, 40806, 1352, 198, 198, ...
3.547945
73
from django.shortcuts import get_object_or_404, render from django.http import HttpResponse from django.template import RequestContext, loader from Organizer.models import Department from Organizer.models import Advisor from Organizer.models import Student from Organizer.models import Course from Organizer.models impor...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 651, 62, 15252, 62, 273, 62, 26429, 11, 8543, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 198, 6738, 42625, 14208, 13, 28243, 1330, 19390, 21947, 11, 40213, 198, 6738, 7221, 75...
4.166667
138
import numpy as np matrixA = np.loadtxt('./mat-A-32.txt') matrixB = np.loadtxt('./mat-B-32.txt') checking = np.loadtxt('./out32.txt') result = np.dot(matrixA, matrixB) diff = result - checking print(checking) print(result) print(diff) np.absolute(diff) print(np.max(diff)) [rows, cols] = diff.shape with open ('./out20...
[ 11748, 299, 32152, 355, 45941, 198, 198, 6759, 8609, 32, 796, 45941, 13, 2220, 14116, 7, 4458, 14, 6759, 12, 32, 12, 2624, 13, 14116, 11537, 198, 6759, 8609, 33, 796, 45941, 13, 2220, 14116, 7, 4458, 14, 6759, 12, 33, 12, 2624, 13...
2.179245
212
import re from collections import defaultdict from util import * input1="""sesenwnenenewseeswwswswwnenewsewsw neeenesenwnwwswnenewnwwsewnenwseswesw seswneswswsenwwnwse nwnwneseeswswnenewneswwnewseswneseene swweswneswnenwsewnwneneseenw eesenwseswswnenwswnwnwsewwnwsene sewnenenenesenwsewnenwwwse wenwwweseeeweswwwnwwe ws...
[ 11748, 302, 198, 6738, 17268, 1330, 4277, 11600, 198, 6738, 7736, 1330, 1635, 198, 198, 15414, 16, 2625, 15931, 8448, 268, 675, 268, 268, 413, 325, 274, 1383, 2032, 2032, 675, 268, 413, 325, 86, 2032, 198, 710, 6429, 274, 268, 675, ...
1.982069
7,975
#!/usr/bin/env python3 import argparse import sys import re import subprocess import os import glob import copy import aff3ct_help_parser as ahp # read all the lines from the given file and set them in a list of string lines with striped \n \r if __name__ == "__main__": parser = argparse.ArgumentParser() parser.a...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 1822, 29572, 198, 11748, 25064, 198, 11748, 302, 198, 11748, 850, 14681, 198, 11748, 28686, 198, 11748, 15095, 198, 11748, 4866, 198, 198, 11748, 1527, 18, 310, 62, 16794...
2.894737
266
from todoster.file_operations import load_projects from todoster.output_formatter import format_string
[ 6738, 284, 67, 6197, 13, 7753, 62, 3575, 602, 1330, 3440, 62, 42068, 198, 6738, 284, 67, 6197, 13, 22915, 62, 687, 1436, 1330, 5794, 62, 8841, 198 ]
3.678571
28
#!/usr/bin/env python __author__ = 'Tomas Novacik' import unittest2 from game import Game from board import Board, PlayerType, Move # eof
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 834, 9800, 834, 796, 705, 13787, 292, 5267, 330, 1134, 6, 628, 198, 11748, 555, 715, 395, 17, 198, 198, 6738, 983, 1330, 3776, 198, 6738, 3096, 1330, 5926, 11, 7853, 6030, 11, ...
2.86
50
""" Functions to mask sentences of undesirable words (stopwords, punctuation etc). Used in get_sentence_embeddings.py to process sentences before finding embeddings. """ import re from skills_taxonomy_v2.pipeline.skills_extraction.cleaning_sentences import ( separate_camel_case, ) def is_token_word(token, token_...
[ 37811, 198, 24629, 2733, 284, 9335, 13439, 286, 38117, 2456, 357, 11338, 10879, 11, 21025, 2288, 3503, 737, 198, 38052, 287, 651, 62, 34086, 594, 62, 20521, 67, 654, 13, 9078, 284, 1429, 13439, 878, 4917, 11525, 67, 654, 13, 198, 3781...
2.037313
938
"""destinations Revision ID: 033809bcaf32 Revises: 4a77b8fb792a Create Date: 2017-08-24 05:56:45.166590 """ from alembic import op import sqlalchemy as sa import geoalchemy2 # revision identifiers, used by Alembic. revision = '033809bcaf32' down_revision = '4a77b8fb792a' branch_labels = None depends_on = None
[ 37811, 16520, 7352, 198, 198, 18009, 1166, 4522, 25, 657, 2091, 34583, 15630, 1878, 2624, 198, 18009, 2696, 25, 604, 64, 3324, 65, 23, 21855, 48156, 64, 198, 16447, 7536, 25, 2177, 12, 2919, 12, 1731, 8870, 25, 3980, 25, 2231, 13, 1...
2.556452
124
from tkinter import simpledialog from porcupine import actions, get_tab_manager, tabs
[ 6738, 256, 74, 3849, 1330, 7106, 276, 498, 519, 198, 198, 6738, 16964, 25244, 500, 1330, 4028, 11, 651, 62, 8658, 62, 37153, 11, 22524, 628, 198 ]
3.296296
27
import os import pickle import sys import warnings from collections import OrderedDict import biosppy.signals.tools as st import numpy as np import wfdb from biosppy.signals.ecg import correct_rpeaks, hamilton_segmenter from hrv.classical import frequency_domain, time_domain from scipy.signal import medfilt...
[ 11748, 28686, 201, 198, 11748, 2298, 293, 201, 198, 11748, 25064, 201, 198, 11748, 14601, 201, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 201, 198, 201, 198, 11748, 37140, 14097, 13, 12683, 874, 13, 31391, 355, 336, 201, 198, 11748, ...
2.082677
1,016
""" Subclass of tiddlywebplugins.openid2 to support tiddlyweb_secondary_user cookie. """ import urlparse from tiddlyweb.web.util import server_host_url, make_cookie from tiddlywebplugins.openid2 import Challenger as OpenID FRAGMENT_PREFIX = 'auth:OpenID:'
[ 37811, 198, 7004, 4871, 286, 256, 1638, 306, 12384, 37390, 13, 9654, 312, 17, 284, 1104, 198, 83, 1638, 306, 12384, 62, 38238, 62, 7220, 19751, 13, 198, 37811, 628, 198, 11748, 19016, 29572, 198, 198, 6738, 256, 1638, 306, 12384, 13, ...
2.955056
89
from datetime import datetime import freezegun # Initialize freezegun to avoid freezegun being reinitialized which is expensive initialize_freezegun = freezegun.freeze_time(datetime(2021, 1, 1)) initialize_freezegun.start()
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 11748, 1479, 89, 1533, 403, 198, 198, 2, 20768, 1096, 1479, 89, 1533, 403, 284, 3368, 1479, 89, 1533, 403, 852, 6865, 13562, 543, 318, 5789, 198, 36733, 1096, 62, 5787, 89, 1533, 403, 79...
3.013333
75
''' Created on Apr 2, 2015 @author: tmahrt ''' import os from os.path import join import math import copy from pyacoustics.morph.morph_utils import common from pyacoustics.morph.morph_utils import plot_morphed_data from pyacoustics.utilities import utils from pyacoustics.utilities import sequences from pyacoustics....
[ 7061, 6, 198, 41972, 319, 2758, 362, 11, 1853, 198, 198, 31, 9800, 25, 256, 76, 993, 17034, 198, 7061, 6, 198, 198, 11748, 28686, 198, 6738, 28686, 13, 6978, 1330, 4654, 198, 198, 11748, 10688, 198, 11748, 4866, 198, 198, 6738, 1297...
2.217436
1,950
import numpy as np
[ 11748, 299, 32152, 355, 45941 ]
3.6
5
from typing import TYPE_CHECKING from sqlalchemy import Boolean, Column, Integer, String from sqlalchemy.orm import relationship from app.db.base_class import Base if TYPE_CHECKING: from .pet import Pet # noqa: F401
[ 6738, 19720, 1330, 41876, 62, 50084, 2751, 198, 6738, 44161, 282, 26599, 1330, 41146, 11, 29201, 11, 34142, 11, 10903, 198, 6738, 44161, 282, 26599, 13, 579, 1330, 2776, 198, 6738, 598, 13, 9945, 13, 8692, 62, 4871, 1330, 7308, 198, 1...
3.430769
65
from django.contrib import admin from django.utils.html import format_html from . import get_user_model
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 42625, 14208, 13, 26791, 13, 6494, 1330, 5794, 62, 6494, 198, 198, 6738, 764, 1330, 651, 62, 7220, 62, 19849, 628 ]
3.419355
31
# -*- coding: utf-8 -*- # Generated by Django 1.11.15 on 2019-04-24 14:53 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 1157, 13, 1314, 319, 13130, 12, 3023, 12, 1731, 1478, 25, 4310, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198...
2.753623
69
#!/usr/bin/env python from flask import Flask, render_template, request, redirect, jsonify, url_for, flash from sqlalchemy import create_engine, asc from sqlalchemy.orm import sessionmaker from database_setup import Base, Category, Item, User from flask import session as login_session import random import string impor...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 42903, 1330, 46947, 11, 8543, 62, 28243, 11, 2581, 11, 18941, 11, 33918, 1958, 11, 19016, 62, 1640, 11, 7644, 198, 6738, 44161, 282, 26599, 1330, 2251, 62, 18392, 11, 10570,...
3.255144
486
import os from setuptools import setup version = os.getenv('VERSION', '1.10.1') setup( name='tensorflow-autodetect', version=version, url='https://github.com/commaai/tensorflow-autodetect', author='comma.ai', author_email='', license='MIT', long_description='Auto-detect tensorflow or tenso...
[ 11748, 28686, 198, 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 9641, 796, 28686, 13, 1136, 24330, 10786, 43717, 3256, 705, 16, 13, 940, 13, 16, 11537, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 11639, 83, 22854, 11125, 12, 2306,...
2.638686
274
from rest_framework import permissions from django.shortcuts import get_object_or_404 from django.contrib.auth.models import User from intask_api.projects.models import Project
[ 6738, 1334, 62, 30604, 1330, 21627, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 651, 62, 15252, 62, 273, 62, 26429, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 6738, 493, 2093, 62, 15042, 13, 4...
3.68
50
'''3. Write a Python program to split a list into different variables. ''' universalList = [(1, 2, 3), ('w', 'e', 's')] lst1, lst2 = universalList print(lst1) print(lst2)
[ 7061, 6, 18, 13, 19430, 257, 11361, 1430, 284, 6626, 257, 1351, 656, 1180, 9633, 13, 705, 7061, 198, 198, 40082, 8053, 796, 47527, 16, 11, 362, 11, 513, 828, 19203, 86, 3256, 705, 68, 3256, 705, 82, 11537, 60, 198, 75, 301, 16, ...
2.630769
65
# Python3 from solution1 import checkParticipants as f qa = [ ([0, 1, 1, 5, 4, 8], [2]), ([0, 1, 2, 3, 4, 5], []), ([6], []), ([3, 3, 3, 3, 3, 3, 3, 3], [4, 5, 6, 7]), ([0, 0, 1, 5, 5, 4, 5, 4, 10, 8], [1, 2, 5, 6, 7, 9]) ] for *q, a in qa: for i, e in enumerate(q): ...
[ 2, 11361, 18, 198, 198, 6738, 4610, 16, 1330, 2198, 34363, 1187, 355, 277, 198, 198, 20402, 796, 685, 198, 220, 220, 220, 29565, 15, 11, 352, 11, 352, 11, 642, 11, 604, 11, 807, 4357, 198, 220, 220, 220, 220, 685, 17, 46570, 198...
1.75076
329
from models.base_model import BaseModel from models.classifier import BertClassifier from models.sequence_labeling import BertSequenceLabeling from models.sequence_embedding import BertSequenceEmbedding
[ 6738, 4981, 13, 8692, 62, 19849, 1330, 7308, 17633, 198, 6738, 4981, 13, 4871, 7483, 1330, 22108, 9487, 7483, 198, 6738, 4981, 13, 43167, 62, 18242, 278, 1330, 22108, 44015, 594, 33986, 278, 198, 6738, 4981, 13, 43167, 62, 20521, 12083,...
4.208333
48
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # python3 -m pip install --force -U --user PlexAPI import json import time import logging import plexapi import plexapi.video import plexapi.myplex import plexapi.server import plexapi.library import plexapi.exceptions PLEX_URL = "" PLEX_TOKEN = "" WATCHED_HISTORY =...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 628, 198, 2, 21015, 18, 532, 76, 7347, 2721, 1377, 3174, 532, 52, 1377, 7220, 47176, 17614, 628, 198, 11748, 33918, 19...
2.299213
381
import os import sys import time import exceptions import uuid import logging ''' @author: msune,lbergesio,omoya,CarolinaFernandez @organization: i2CAT, OFELIA FP7 PolicyEngine Rule class Encapsulates logic of a simple Rule ''' from django_thermostat.pypelib.Condition import Condition from django_thermo...
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 640, 198, 11748, 13269, 198, 11748, 334, 27112, 198, 11748, 18931, 198, 198, 7061, 6, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9800, 25, 13845, 1726, 11, 75, 527, 3212, 952, 11, 296, ...
3
149
from birds.display_utils import geo_plot from birds.pann import load_pretrained_model, read_audio_fast, get_model_predictions_for_clip, BIRDS
[ 6738, 10087, 13, 13812, 62, 26791, 1330, 40087, 62, 29487, 198, 6738, 10087, 13, 79, 1236, 1330, 3440, 62, 5310, 13363, 62, 19849, 11, 1100, 62, 24051, 62, 7217, 11, 651, 62, 19849, 62, 28764, 9278, 62, 1640, 62, 15036, 11, 347, 466...
3.130435
46
#!/bin/python import subprocess import os import sys import maps import time import logging logging.basicConfig(filename = "LetsHPC_Team_CodeRunner.log", level = logging.INFO) logger = logging.getLogger(__name__) ####################################################################################################...
[ 2, 48443, 8800, 14, 29412, 198, 198, 11748, 850, 14681, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 8739, 198, 11748, 640, 198, 11748, 18931, 628, 628, 198, 198, 6404, 2667, 13, 35487, 16934, 7, 34345, 796, 366, 43, 1039, 39, 56...
2.382687
2,553
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' ***************************************** Author: zhlinh Email: zhlinhng@gmail.com Version: 0.0.1 Created Time: 2016-03-24 Last_modify: 2016-03-24 ****************************************** ''' ''' Given two strings s and t, determine if th...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 7061, 6, 198, 17174, 4557, 9, 198, 13838, 25, 220, 220, 220, 220, 220, 220, 220, 220, 1976, 71, 2815, 71, 198, 1533...
3.163347
251
import pymongo ## local ## from dotenv import load_dotenv import os import pytz import datetime import itertools from uuid import uuid4 from collections import defaultdict # ObjectId from bson.objectid import ObjectId """ RDBMS Mongo DB Database Database Table Collection Row Document Index Index...
[ 11748, 279, 4948, 25162, 198, 2235, 1957, 220, 22492, 198, 6738, 16605, 24330, 1330, 3440, 62, 26518, 24330, 198, 11748, 28686, 198, 11748, 12972, 22877, 198, 11748, 4818, 8079, 198, 11748, 340, 861, 10141, 198, 6738, 334, 27112, 1330, 33...
2.755952
168
import numpy as np import cv2 as cv import os import sys
[ 11748, 299, 32152, 355, 45941, 201, 198, 11748, 269, 85, 17, 355, 269, 85, 201, 198, 11748, 28686, 201, 198, 11748, 25064, 201, 198, 201, 198, 201, 198 ]
2.321429
28
# -*- coding: utf-8 from django.apps import AppConfig
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 198, 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
2.75
20
if __name__ == '__main__': str_ = input() stack = Stack() for i in str_: stack.push(i) for j in range(len(stack)): print(stack.pop(), end='') print()
[ 201, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 201, 198, 220, 220, 220, 965, 62, 796, 5128, 3419, 201, 198, 220, 220, 220, 8931, 796, 23881, 3419, 201, 198, 220, 220, 220, 329, 1312, 287, 965, 62, 25, 201, 198...
1.941176
102
from utils.db import connection, print_version import pandas as pd table = 'data/tables/postcode_coordinates.csv' add_table(table, 'Postcode_coordinates', connection) cur = connection.cursor() cur.execute('''SELECT * FROM Postcode_coordinates''') data = cur.fetchmany(5) print(data)
[ 6738, 3384, 4487, 13, 9945, 1330, 4637, 11, 3601, 62, 9641, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 11487, 796, 705, 7890, 14, 83, 2977, 14, 7353, 8189, 62, 37652, 17540, 13, 40664, 6, 198, 198, 2860, 62, 11487, 7, 11487, ...
2.743119
109
import runpy runpy._run_module_as_main('SeeMee')
[ 11748, 1057, 9078, 198, 5143, 9078, 13557, 5143, 62, 21412, 62, 292, 62, 12417, 10786, 6214, 44, 1453, 11537 ]
2.526316
19
from .name2idx import parameters as C
[ 6738, 764, 3672, 17, 312, 87, 1330, 10007, 355, 327 ]
3.7
10
import os import datetime import click from flask.cli import with_appcontext from werkzeug.security import generate_password_hash
[ 11748, 28686, 198, 11748, 4818, 8079, 198, 198, 11748, 3904, 198, 6738, 42903, 13, 44506, 1330, 351, 62, 1324, 22866, 198, 6738, 266, 9587, 2736, 1018, 13, 12961, 1330, 7716, 62, 28712, 62, 17831, 628, 628, 628 ]
3.675676
37
with open('./logs/test.log', 'r') as f1: data = f1.readlines() formatted = [x.replace('.pdf', '') for x in data] with open('./logs/test2.log', 'r') as f1: f1.writelines(formatted)
[ 4480, 1280, 7, 4458, 14, 6404, 82, 14, 9288, 13, 6404, 3256, 705, 81, 11537, 355, 277, 16, 25, 198, 220, 220, 220, 1366, 796, 277, 16, 13, 961, 6615, 3419, 198, 198, 687, 16898, 796, 685, 87, 13, 33491, 7, 4458, 12315, 3256, 101...
2.195402
87
import argparse import json from pyhmy import ( get_all_validator_addresses, get_validator_information ) if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument("--start", required=True, type=int, help="First block") parser.add_argument("--end", required=True, type=int, h...
[ 11748, 1822, 29572, 198, 11748, 33918, 198, 198, 6738, 12972, 71, 1820, 1330, 357, 198, 220, 220, 220, 651, 62, 439, 62, 12102, 1352, 62, 2860, 16746, 11, 198, 220, 220, 220, 651, 62, 12102, 1352, 62, 17018, 198, 8, 198, 198, 361, ...
2.421667
600
import re valid = ['hcl', 'iyr', 'pid', 'ecl', 'hgt','eyr', 'byr' ] #part1() part2()
[ 11748, 302, 198, 12102, 796, 37250, 71, 565, 3256, 705, 72, 2417, 3256, 705, 35317, 3256, 705, 68, 565, 3256, 705, 71, 13655, 41707, 68, 2417, 3256, 705, 1525, 81, 6, 2361, 628, 628, 198, 2, 3911, 16, 3419, 198, 3911, 17, 3419 ]
2.046512
43
from django.db import models from django.contrib.auth import get_user_model from django.contrib.postgres.fields import ArrayField from utils.model_utils import default_1d_array_of_strings
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 651, 62, 7220, 62, 19849, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 7353, 34239, 13, 25747, 1330, 15690, 15878, 198, 198, 6738, 3384, ...
3.275862
58
''' symmetrical-synthesis Copyright (c) 2020-present NAVER Corp. MIT license ''' import os import time import glob import cv2 import random import numpy as np import tensorflow as tf import random try: import data_util except ImportError: from dataset import data_util tf.app.flags.DEFINE_boolean('random_resize...
[ 7061, 6, 198, 1837, 3020, 34546, 12, 1837, 429, 8497, 198, 15269, 357, 66, 8, 12131, 12, 25579, 11746, 5959, 11421, 13, 198, 36393, 5964, 198, 7061, 6, 198, 11748, 28686, 198, 11748, 640, 198, 11748, 15095, 198, 11748, 269, 85, 17, ...
2.10122
1,640
# -*- coding: utf-8 -*- """ Created on Sat Jun 17 20:55:53 2019 @author: Parikshith.H """ import sqlite3 conn=sqlite3.connect('music.sqlite') cur=conn.cursor() cur.execute('DROP TABLE IF EXISTS Tracks') cur.execute('CREATE TABLE Tracks(title TEXT,plays INTEGER)') cur.execute('''INSERT INTO Tracks(title,plays) VALUES...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 7031, 7653, 1596, 1160, 25, 2816, 25, 4310, 13130, 198, 198, 31, 9800, 25, 2547, 72, 50133, 342, 13, 39, 198, 37811, 198, 198, 11748, 44161, 57...
3.067642
547
#!/usr/bin/python from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.externalpkg import extmod if __name__ == '__main__': main()
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 6738, 9093, 856, 13, 21412, 62, 26791, 13, 35487, 1330, 28038, 856, 26796, 198, 6738, 9093, 856, 13, 21412, 62, 26791, 13, 22615, 35339, 1330, 1070, 4666, 198, 198, 361, 11593, 3672, 834...
2.963636
55
from ..grammar import * from .Metalanguage import Metalanguage
[ 6738, 11485, 4546, 3876, 1330, 1635, 198, 6738, 764, 36790, 9000, 1330, 12136, 9000, 628, 628, 628, 198 ]
3.833333
18
from sqlalchemy.orm import Session from db.crud.jobs import create_new_job, retrieve_job from schemas.jobs import JobCreate from tests.utils.users import create_random_owner from tests.utils.jobs import create_sample_job def test_retrieve_job_by_id(db_session: Session): """Test retrieving job from db""" owner...
[ 6738, 44161, 282, 26599, 13, 579, 1330, 23575, 198, 6738, 20613, 13, 6098, 463, 13, 43863, 1330, 2251, 62, 3605, 62, 21858, 11, 19818, 62, 21858, 198, 6738, 3897, 5356, 13, 43863, 1330, 15768, 16447, 198, 6738, 5254, 13, 26791, 13, 18...
3.060109
183
from __future__ import unicode_literals import pytest import spacy import os try: xrange except NameError: xrange = range def test_get_and_set_string_views_and_flags(nlp, token): assert token.shape_ == 'Xxxxx' for lexeme in nlp.vocab: if lexeme.is_alpha: lexeme.shape_ = 'W' ...
[ 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 11748, 12972, 9288, 198, 11748, 599, 1590, 198, 11748, 28686, 628, 198, 28311, 25, 198, 220, 220, 220, 2124, 9521, 198, 16341, 6530, 12331, 25, 198, 220, 220, 220, 2124, ...
2.139935
929
import os from copy import deepcopy import matplotlib.pyplot as plt import numpy as np from bridge_sim import model, sim, temperature, traffic, plot, util from bridge_sim.model import Config, Point, Bridge from bridge_sim.plot.util import equal_lims from bridge_sim.sim.responses import without from bridge_sim.util im...
[ 11748, 28686, 198, 6738, 4866, 1330, 2769, 30073, 198, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 7696, 62, 14323, 1330, 2746, 11, 985, 11, 5951, 11, 4979, 11, 711...
2.204698
1,192
#%% import json import requests from io import StringIO import pandas as pd # %% with open("../db_pass", "r") as f: token = json.load(f)['token'] # %% data = { 'token': token, 'content': 'record', 'format': 'csv', 'type': 'flat', 'csvDelimiter': '', 'rawOrLabel': 'raw', 'rawOrLabelHead...
[ 2, 16626, 198, 11748, 33918, 198, 11748, 7007, 198, 6738, 33245, 1330, 10903, 9399, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 2, 43313, 198, 4480, 1280, 7203, 40720, 9945, 62, 6603, 1600, 366, 81, 4943, 355, 277, 25, 198, 220, ...
2.345865
399
""" Sequence statistics: Count, length, bounding boxes size. """ import os from glob import glob import pickle from tqdm import tqdm if __name__ == "__main__": # Parse program arguments import argparse parser = argparse.ArgumentParser('detections2sequences') parser.add_argument('input', metavar='DIR...
[ 37811, 198, 44015, 594, 7869, 25, 2764, 11, 4129, 11, 5421, 278, 10559, 2546, 13, 198, 37811, 198, 11748, 28686, 198, 6738, 15095, 1330, 15095, 198, 11748, 2298, 293, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 628, 628, 198, 361...
2.515254
295
# Generated by Django 3.0.7 on 2020-07-04 04:05 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 22, 319, 12131, 12, 2998, 12, 3023, 8702, 25, 2713, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.766667
30
import datetime from tkapi.util import queries from tkapi.zaak import Zaak, ZaakSoort from tkapi.dossier import Dossier, DossierWetsvoorstel from tkapi.document import Document from .core import TKApiTestCase
[ 11748, 4818, 8079, 198, 198, 6738, 256, 74, 15042, 13, 22602, 1330, 20743, 198, 6738, 256, 74, 15042, 13, 4496, 461, 1330, 44210, 461, 11, 44210, 461, 2396, 419, 198, 6738, 256, 74, 15042, 13, 67, 30087, 1330, 360, 30087, 11, 360, 3...
3
72
""" This library contains several functions designed to help with the illustration of hexagonal grids Functions: plot_hexagaons : plots a specified data vector over a 2-D hexagon grid. create_alpha_mask : creates an alpha shape (a concave hull), which is required for plotting contou...
[ 37811, 201, 198, 1212, 5888, 4909, 1811, 5499, 3562, 284, 1037, 351, 262, 20936, 286, 17910, 27923, 50000, 201, 198, 201, 198, 24629, 2733, 25, 201, 198, 220, 220, 220, 7110, 62, 33095, 8126, 684, 220, 220, 220, 220, 220, 220, 220, ...
2.091459
13,219
''' self_concepts_test This module serves as the unit test for self_concepts ''' import argparse, sys sys.path.append('../../source/python') from self_concepts import Concept from self_concepts import Property from self_concepts import Relationship from self_concepts import Ontology from self_concepts import Blackb...
[ 7061, 6, 198, 944, 62, 43169, 82, 62, 9288, 198, 198, 1212, 8265, 9179, 355, 262, 4326, 1332, 329, 2116, 62, 43169, 82, 198, 7061, 6, 198, 198, 11748, 1822, 29572, 11, 25064, 198, 198, 17597, 13, 6978, 13, 33295, 10786, 40720, 40720...
2.71323
1,353
''' Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may complete at most two transactions. Note: You may not engage in multiple transactions at the same time (i.e., you must sell the stock before you buy again). Example 1...
[ 7061, 6, 198, 197, 25515, 345, 423, 281, 7177, 329, 543, 262, 340, 71, 5002, 318, 262, 2756, 286, 257, 1813, 4283, 319, 1110, 1312, 13, 628, 197, 23067, 281, 11862, 284, 1064, 262, 5415, 7630, 13, 921, 743, 1844, 379, 749, 734, 89...
2.94086
186
import json from package.query_db import query from package.dictionary_to_list import dictionary_to_list from package.lambda_exception import LambdaException from boto3 import client as boto3_client
[ 11748, 33918, 198, 6738, 5301, 13, 22766, 62, 9945, 1330, 12405, 198, 6738, 5301, 13, 67, 14188, 62, 1462, 62, 4868, 1330, 22155, 62, 1462, 62, 4868, 198, 6738, 5301, 13, 50033, 62, 1069, 4516, 1330, 21114, 6814, 16922, 198, 6738, 275...
3.773585
53
#!/usr/bin/env python3 """ Created on September 21 2019 @author: Melchior du Lac @description: Wrap rp2paths into a docker """ import argparse import tempfile import os import logging import shutil import docker import glob def main(rp_pathways, rp2paths_pathways, rp2paths_compounds, timeout=30, max_steps=0, max_pa...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 37811, 198, 41972, 319, 2693, 2310, 13130, 198, 198, 31, 9800, 25, 5616, 354, 1504, 7043, 23115, 198, 31, 11213, 25, 41028, 374, 79, 17, 6978, 82, 656, 257, 36253, 198, 198, 3781...
2.064668
2,335
import pytest from framework.services.booker_client import BookerClient booker_client = BookerClient()
[ 11748, 12972, 9288, 198, 6738, 9355, 13, 30416, 13, 2070, 263, 62, 16366, 1330, 31004, 11792, 198, 198, 2070, 263, 62, 16366, 796, 31004, 11792, 3419, 628 ]
3.888889
27
spiFile = open('spiflash.bin','wb') # 128KB is reserved for bitstream bitFile = open('../bitstream/mf8a18_rv32i.bin','rb') bitData = bitFile.read(0x20000) riscvFile = open('riscv.bin','rb') riscvData = riscvFile.read(32768) spiFile.write(bitData) spiFile.seek(0x20000) spiFile.write(riscvData) nullData = bytearray...
[ 198, 2777, 72, 8979, 796, 1280, 10786, 2777, 361, 17055, 13, 8800, 41707, 39346, 11537, 198, 198, 2, 13108, 22764, 318, 10395, 329, 1643, 5532, 198, 2545, 8979, 796, 1280, 10786, 40720, 2545, 5532, 14, 76, 69, 23, 64, 1507, 62, 81, ...
2.233333
180
"""Options for saving user prefences, etc. """ import json import os import pyvista # The options rcParams = RcParams( dark_mode=False, ) # Load user prefences from last session if none exist, save defaults try: rcParams.load() except: rcParams.save()
[ 37811, 29046, 329, 8914, 2836, 7694, 3007, 11, 3503, 13, 198, 37811, 198, 11748, 33918, 198, 11748, 28686, 198, 198, 11748, 12972, 85, 12523, 628, 198, 2, 383, 3689, 198, 6015, 10044, 4105, 796, 371, 66, 10044, 4105, 7, 198, 220, 220,...
2.851064
94
"""This script validates an ArcGIS Enterprise deployment to ensure it is configured properly with all the required components such as Portal for ArcGIS, ArcGIS Server, ArcGIS Data Store and the associated configuration. Designed for ArcGIS Enterprise 10.5 and higher.""" # Author: Philip Heede <pheede@esri.com> # Last...
[ 37811, 1212, 4226, 4938, 689, 281, 10173, 38, 1797, 14973, 14833, 284, 4155, 340, 318, 198, 11250, 1522, 6105, 351, 477, 262, 2672, 6805, 884, 355, 25663, 329, 10173, 38, 1797, 11, 198, 24021, 38, 1797, 9652, 11, 10173, 38, 1797, 6060...
3.207729
207
import itertools import re import math from typing import List, Tuple def ints(text: str) -> Tuple[int, ...]: "Return a tuple of all ints in a string" return tuple(map(int, re.findall(r'-?\b\d+\b', text))) def powerset(iterable): "powerset([1,2,3]) --> () (1,) (2,) (3,) (1,2) (1,3) (2,3) (1,2,3)" s ...
[ 11748, 340, 861, 10141, 198, 11748, 302, 198, 11748, 10688, 198, 6738, 19720, 1330, 7343, 11, 309, 29291, 628, 198, 4299, 493, 82, 7, 5239, 25, 965, 8, 4613, 309, 29291, 58, 600, 11, 2644, 5974, 198, 220, 220, 220, 366, 13615, 257, ...
2.026279
2,131
import math import time from max30105 import MAX30105, HeartRate import smbus from bme280 import BME280 import socket #from matplotlib import pyplot as plt dev = Device() dev.setup_sensors() dev.setup_network() for i in range(2): dev.update() while True: try: dev.update() dev.uplo...
[ 11748, 10688, 198, 11748, 640, 198, 6738, 3509, 18938, 2713, 1330, 25882, 18938, 2713, 11, 8894, 32184, 198, 11748, 895, 10885, 198, 6738, 275, 1326, 21033, 1330, 347, 11682, 21033, 198, 11748, 17802, 198, 2, 6738, 2603, 29487, 8019, 1330...
2.372093
172
from .client_http import HttpClient from .client_tcp import TcpClient from .client_udp import UdpClient from .client import Client
[ 6738, 764, 16366, 62, 4023, 1330, 367, 29281, 11792, 198, 6738, 764, 16366, 62, 83, 13155, 1330, 309, 13155, 11792, 198, 6738, 764, 16366, 62, 463, 79, 1330, 471, 26059, 11792, 198, 6738, 764, 16366, 1330, 20985, 628 ]
3.473684
38
import scrapy ''' <ul class="pager"> <li class="next"> <a href="/page/2/">Next <span aria-hidden="true">&rarr;</span></a> </li> </ul> shell >>> response.css('li.next a').extract_first() '<a href="/page/2/">Next <span aria-hidden="true"></span></a>' hrefScrapyCSS >>> response.css('li.next a::attr(...
[ 11748, 15881, 88, 198, 7061, 6, 628, 198, 198, 27, 377, 1398, 2625, 79, 3536, 5320, 198, 220, 220, 220, 1279, 4528, 1398, 2625, 19545, 5320, 198, 220, 220, 220, 220, 220, 220, 220, 1279, 64, 13291, 35922, 7700, 14, 17, 14, 5320, 1...
2.231884
207
import pytest import numpy as np import pandas as pd from scipy.special import binom import os import sys sys.path.insert(0, "..") from autogenes import objectives as ga_objectives
[ 11748, 12972, 9288, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 629, 541, 88, 13, 20887, 1330, 9874, 296, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 17597, 13, 6978, 13, 28463, 7...
3.032787
61
# -*- coding: utf-8 -*- # Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved. import os import flask from flask_wtf import FlaskForm import wtforms from wtforms import validators from digits.config import config_value from digits.device_query import get_device, get_nvml_info from digits import utils f...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 357, 66, 8, 1946, 12, 5539, 11, 15127, 23929, 44680, 6234, 13, 220, 1439, 2489, 10395, 13, 198, 198, 11748, 28686, 198, 198, 11748, 42903, 198, 6738, 42903, ...
3.453237
139
# encoding: utf-8 # usando python 3 # Afinao - Alberto toca violo e programador. # Precisando afinar o violo e sem diapaso por perto, # resolveu fazer um programa para ajud-lo. # O que ele queria era a nota L soando sem parar at que ele conseguisse afinar a # respectiva corda do violo; as demais cordas ele poderi...
[ 2, 21004, 25, 3384, 69, 12, 23, 220, 198, 2, 514, 25440, 21015, 513, 198, 2, 2483, 1437, 78, 532, 40649, 284, 6888, 1935, 78, 304, 220, 1430, 7079, 13, 220, 198, 2, 28737, 271, 25440, 6580, 22050, 267, 1935, 78, 304, 5026, 2566, ...
2.96114
386
fav_beer = {'Julian': 'White Rabbit Dark Ale', 'Bob': 'Some sort of light beer I assume', 'Mike': 'Oregano Beer'}
[ 69, 615, 62, 42428, 796, 1391, 6, 16980, 666, 10354, 705, 12256, 25498, 3801, 9300, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 18861, 10354, 705, 4366, 3297, 286, 1657, 6099, 314, 7048, 3256, 198, 220, 22...
2.190476
63
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Actual WSGI app instantiations used from app.yaml. Extracted to a separate module to avoid calling 'initialize' in unit tests during module loading time....
[ 2, 15069, 1946, 383, 18255, 1505, 46665, 13, 1439, 2489, 10395, 13, 198, 2, 5765, 286, 428, 2723, 2438, 318, 21825, 416, 257, 347, 10305, 12, 7635, 5964, 326, 460, 307, 198, 2, 1043, 287, 262, 38559, 24290, 2393, 13, 198, 198, 37811...
3.261905
168
"""Layer classes.""" from __future__ import absolute_import import abc import six import tensorflow as tf
[ 37811, 49925, 6097, 526, 15931, 198, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 11748, 450, 66, 198, 11748, 2237, 198, 11748, 11192, 273, 11125, 355, 48700, 628, 628, 628, 198 ]
3.352941
34
import unittest from malcolm.core import call_with_params from malcolm.modules.builtin.parts import GroupPart
[ 11748, 555, 715, 395, 198, 198, 6738, 6428, 18414, 13, 7295, 1330, 869, 62, 4480, 62, 37266, 198, 6738, 6428, 18414, 13, 18170, 13, 18780, 259, 13, 42632, 1330, 4912, 7841, 628 ]
3.5
32
import os from jose import jwt from datetime import datetime, timedelta JWT_SECRET = 'secret' JWT_ALGORITHM = 'HS256' JWT_EXP_DELTA_SECONDS = 31556952 # year
[ 11748, 28686, 198, 198, 6738, 474, 577, 1330, 474, 46569, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 198, 41, 39386, 62, 23683, 26087, 796, 705, 21078, 6, 198, 41, 39386, 62, 1847, 38, 1581, 10554, 44, 796, 705, ...
2.397059
68
import os from django.db import models from ai4all_api.detection_items import DETECTION_ITEMS from ai4all_api.notification_types import NOTIFICATION_TYPES
[ 11748, 28686, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 198, 6738, 257, 72, 19, 439, 62, 15042, 13, 15255, 3213, 62, 23814, 1330, 38267, 24565, 62, 2043, 39201, 198, 6738, 257, 72, 19, 439, 62, 15042, 13, 1662, 2649, ...
2.981132
53