content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
""" 725. Split Linked List in Parts Medium 0Given the head of a singly linked list and an integer k, split the linked list into k consecutive linked list parts. The length of each part should be as equal as possible: no two parts should have a size differing by more than one. This may lead to some parts being null. ...
[ 37811, 198, 198, 45151, 13, 27758, 7502, 276, 7343, 287, 22349, 198, 31205, 198, 198, 15, 15056, 262, 1182, 286, 257, 1702, 306, 6692, 1351, 290, 281, 18253, 479, 11, 6626, 262, 6692, 1351, 656, 479, 12785, 6692, 1351, 3354, 13, 198, ...
2.724691
810
import numpy as np import matplotlib.pyplot as plt import matplotlib """ def ecdf(sorted_views): for view, data in sorted_views.iteritems(): yvals = np.arange(len(data))/float(len(data)) plt.plot(data, yvals, label=view) plt.grid(True) plt.xlabel('jaccard') plt.ylabel('CDF') lgnd ...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 11748, 2603, 29487, 8019, 198, 198, 37811, 198, 4299, 9940, 7568, 7, 82, 9741, 62, 33571, 2599, 198, 220, 220, 220, 329, 1570, 11, ...
2.158537
246
import pystim bin_path = None # TODO correct. vec_path = None # TODO correct. trials_path = None # TODO correct. stimulus = pystim.stimuli.flashed_images.load(bin_path, vec_path, trials_path) print(stimulus.nb_frames) print(stimulus.nb_diplays) print(stimulus.nb_trials) print(stimulus.nb_conditions) print(stimulu...
[ 11748, 12972, 42003, 628, 198, 8800, 62, 6978, 796, 6045, 220, 1303, 16926, 46, 3376, 13, 198, 35138, 62, 6978, 796, 6045, 220, 1303, 16926, 46, 3376, 13, 198, 28461, 874, 62, 6978, 796, 6045, 220, 1303, 16926, 46, 3376, 13, 198, 42...
2.836334
611
#### neeed to make sure google still work for sure # this may have to run on non-python devs' boxes, try/catch an install of the requests lib to be SURE try: import requests except: import os os.sys('easy_install pip') os.sys('pip install requests') import requests #r = requests.get('http://www.go...
[ 4242, 497, 2308, 284, 787, 1654, 23645, 991, 670, 329, 1654, 198, 2, 428, 743, 423, 284, 1057, 319, 1729, 12, 29412, 41470, 6, 10559, 11, 1949, 14, 40198, 281, 2721, 286, 262, 7007, 9195, 284, 307, 311, 11335, 198, 198, 28311, 25, ...
2.924658
146
#!/usr/bin/env python # -*- coding: utf-8 -*- """Exercise 10.10 from Kane 1985.""" from __future__ import division from sympy import expand, solve, symbols, sin, cos, S from sympy.physics.mechanics import ReferenceFrame, RigidBody, Point from sympy.physics.mechanics import dot, dynamicsymbols, inertia, msprint from ut...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 3109, 23697, 838, 13, 940, 422, 20055, 12863, 526, 15931, 198, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 67...
1.93252
2,460
from unittest import TestCase from src.view import PairwiseView import numpy as np
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 6738, 12351, 13, 1177, 1330, 39645, 3083, 7680, 198, 11748, 299, 32152, 355, 45941, 628, 628, 198 ]
3.48
25
# prompt user to enter how much they weigh in pounds weight = int(input ("How much do you weigh (in pounds)? ")) # prompt user to enter their height in inches height = int(input ("What is your height (in inches)? ")) # this converts weight to kilograms weight_in_kg = weight / 2.2 # this converts height to c...
[ 2, 6152, 2836, 284, 3802, 703, 881, 484, 10164, 287, 8059, 201, 198, 6551, 796, 493, 7, 15414, 5855, 2437, 881, 466, 345, 10164, 357, 259, 8059, 19427, 366, 4008, 201, 198, 201, 198, 2, 6152, 2836, 284, 3802, 511, 6001, 287, 8331, ...
2.845506
356
# Day9 - 2021 Advent of code # source: https://adventofcode.com/2021/day/9 import os import numpy as np #let's start if __name__ == '__main__': clear_console() start_the_engine()
[ 2, 3596, 24, 532, 33448, 33732, 286, 2438, 198, 2, 2723, 25, 3740, 1378, 324, 1151, 1659, 8189, 13, 785, 14, 1238, 2481, 14, 820, 14, 24, 198, 198, 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 198, 2, 1616, 338, 923, 198...
2.611111
72
import discord from discord.ext import commands from datetime import date, datetime # Class handles commands related to console players # Add this class to the cog list def setup(bot): bot.add_cog(ConsoleCommands(bot))
[ 11748, 36446, 198, 6738, 36446, 13, 2302, 1330, 9729, 198, 6738, 4818, 8079, 1330, 3128, 11, 4818, 8079, 628, 198, 2, 5016, 17105, 9729, 3519, 284, 8624, 1938, 628, 198, 2, 3060, 428, 1398, 284, 262, 43072, 1351, 198, 4299, 9058, 7, ...
3.66129
62
R""" try to get the worksheet name from a worksheet run -pyf C:\Users\swharden\Documents\GitHub\PyOriginTools\documentation\demonstrations\abfFromWks.py """ import sys if False: # this code block will NEVER actually run sys.path.append('../') # helps my IDE autocomplete sys.path.append('../../') # helps my...
[ 49, 37811, 198, 28311, 284, 651, 262, 2499, 25473, 1438, 422, 257, 2499, 25473, 198, 5143, 532, 9078, 69, 327, 7479, 14490, 59, 82, 1929, 5872, 59, 38354, 59, 38, 270, 16066, 59, 20519, 39688, 33637, 59, 22897, 341, 59, 26567, 2536, ...
2.786611
239
# Generated by Django 3.1 on 2021-08-19 15:49 import django.db.models.deletion from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 319, 33448, 12, 2919, 12, 1129, 1315, 25, 2920, 198, 198, 11748, 42625, 14208, 13, 9945, 13, 27530, 13, 2934, 1616, 295, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.904762
42
from .features import * from .conditions import *
[ 6738, 764, 40890, 1330, 1635, 198, 6738, 764, 17561, 1756, 1330, 1635, 198 ]
3.846154
13
import numpy as np import h5py from datetime import datetime from geopy.distance import distance import argparse import pickle import json import os def coord_distance(coords): """return distance between two points geopy.distance.distance accept [lat, lon] input, while this dataset is [lon, lat] """...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 289, 20, 9078, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 4903, 11081, 13, 30246, 1330, 5253, 220, 198, 11748, 1822, 29572, 198, 11748, 2298, 293, 220, 198, 11748, 33918, 198, 11748, 2...
2.718147
518
from clawpack.petclaw.solution import Solution import matplotlib matplotlib.use('Agg') import matplotlib.pylab as pl from matplotlib import rc import numpy as np import os #
[ 6738, 26573, 8002, 13, 6449, 43143, 13, 82, 2122, 1330, 28186, 198, 11748, 2603, 29487, 8019, 198, 6759, 29487, 8019, 13, 1904, 10786, 46384, 11537, 198, 11748, 2603, 29487, 8019, 13, 79, 2645, 397, 355, 458, 198, 6738, 2603, 29487, 801...
3.163636
55
import torch from typing import List def kl_div(mu, sigma): """ KL-divergence between a diagonal multivariate normal, and a standard normal distribution (with zero mean and unit variance) """ sigma_2 = sigma * sigma kld = 0.5 * torch.mean(mu * mu + sigma_2 - torch.log(sigma_2) - 1.0) r...
[ 11748, 28034, 198, 6738, 19720, 1330, 7343, 628, 628, 628, 198, 4299, 479, 75, 62, 7146, 7, 30300, 11, 264, 13495, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 48253, 12, 67, 1428, 12745, 1022, 257, 40039, 1963, 42524, 3487, ...
2.486647
337
import os import json import numpy as np from numpy import log10, pi, sqrt import scipy.io.wavfile as wav from scipy.fftpack import * from src import ( FilterAnalyzePlot, WaveProcessor, ParametricEqualizer, GraphicalEqualizer, cvt_char2num, maker_logger, DEBUG, ) if DEBUG: PRINTER = ma...
[ 11748, 28686, 198, 11748, 33918, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 299, 32152, 1330, 2604, 940, 11, 31028, 11, 19862, 17034, 198, 11748, 629, 541, 88, 13, 952, 13, 45137, 7753, 355, 266, 615, 198, 6738, 629, 541, 88, 13, ...
1.874335
4,886
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import sys import re import json from datetime import datetime from alfred import * TIMESTAMP_SEC_RE = r'^\d{10}$' # 1643372599 TIMESTAMP_MSEC_RE = r'^\d{13}$' # 1643372599000 # 2022-01-28 10:00:00 DATETIME_LONG_STR = r'^[1-9]\d{3}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$' DATET...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 25064, 198, 11748, 302, 198, 11748, 33918, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 435, 391...
1.991758
364
import ursina app = ursina.Ursina(init_showbase=True)
[ 11748, 220, 1834, 1437, 198, 198, 1324, 796, 220, 1834, 1437, 13, 52, 3808, 1437, 7, 15003, 62, 12860, 8692, 28, 17821, 8, 198 ]
2.291667
24
import logging from functools import wraps import psutil from telegram import InlineKeyboardMarkup, InlineKeyboardButton, ForceReply, ParseMode from telegram.ext import CommandHandler, CallbackQueryHandler, MessageHandler, Filters from ravager.bot.helpers.constants import * from ravager.bot.helpers.timeout import Con...
[ 11748, 18931, 198, 6738, 1257, 310, 10141, 1330, 27521, 198, 198, 11748, 26692, 22602, 198, 6738, 573, 30536, 1330, 554, 1370, 9218, 3526, 9704, 929, 11, 554, 1370, 9218, 3526, 21864, 11, 5221, 36875, 11, 2547, 325, 19076, 198, 6738, 57...
2.108537
1,511
############################################################# # .doc # Githubhttps://github.com/idocx/WHULibSeatReservation ############################################################# from PyQt5 import QtCore qt_resource_data = b"\ \x00\x00\x03\xac\ \x00\ \x00\x67\xf6\x78\x9c\xed\x9...
[ 29113, 14468, 7804, 4242, 2, 201, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 764, 15390, 201, 198, 2, 38994, 5450, 1378, 12567, 13, 785, 14, 312, 42...
1.266719
7,686
import random import six.moves.urllib.parse as urlparse
[ 11748, 4738, 198, 11748, 2237, 13, 76, 5241, 13, 333, 297, 571, 13, 29572, 355, 19016, 29572, 198 ]
3.111111
18
# 9.1. Putting a Wrapper Around a Function #region # import time # from functools import wraps # def timethis(func): # ''' # Decorator that reports the execution time. # ''' # @wraps(func) # def wrapper(*args, **kwargs): # start = time.time() # result = func(*args, **kwargs) # ...
[ 2, 860, 13, 16, 13, 39956, 257, 27323, 2848, 16824, 257, 15553, 198, 2, 36996, 198, 2, 1330, 640, 198, 2, 422, 1257, 310, 10141, 1330, 27521, 628, 198, 2, 825, 4628, 2788, 271, 7, 20786, 2599, 198, 2, 220, 220, 220, 220, 705, 70...
2.294589
998
import numpy as np import torch torch.manual_seed(0) # PRE-PROCESSING RAVDESS_DSET_PATH = "C:\\Users\\***\\Downloads\\RAVDESS\\" TESS_DSET_PATH = "C:\\Users\\***\\Downloads\\TESS\\" N_WORKERS = 15 # DATASET emote_id = { "01" : "neutral", "03" : "happy", "04" : "sad", "05" : "angry"} emote_idn = ...
[ 11748, 299, 32152, 355, 45941, 198, 198, 11748, 28034, 198, 13165, 354, 13, 805, 723, 62, 28826, 7, 15, 8, 198, 198, 2, 22814, 12, 4805, 4503, 7597, 2751, 198, 3861, 8898, 7597, 62, 5258, 2767, 62, 34219, 796, 366, 34, 25, 6852, 1...
2.0625
368
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: vdp/pipeline/v1alpha/pipeline_service.proto """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 262, 8435, 11876, 17050, 13, 220, 8410, 5626, 48483, 0, 198, 2, 2723, 25, 410, 26059, 14, 79, 541, 4470, 14, 85, 16, 26591, 14, 79, 541, 4470, 6...
2.184893
3,548
__author__ = "SilentJungle399" __version__ = "1.0.0" from .client import * from .models import * from .enums import *
[ 834, 9800, 834, 796, 366, 15086, 298, 41, 13687, 28771, 1, 198, 834, 9641, 834, 796, 366, 16, 13, 15, 13, 15, 1, 198, 198, 6738, 764, 16366, 1330, 1635, 198, 6738, 764, 27530, 1330, 1635, 198, 6738, 764, 268, 5700, 1330, 1635, 198...
2.704545
44
from .abstractanalyzer import AbstractAnalyzer from textblob import TextBlob
[ 6738, 764, 397, 8709, 38200, 9107, 1330, 27741, 37702, 9107, 198, 198, 6738, 2420, 2436, 672, 1330, 8255, 3629, 672, 628 ]
3.761905
21
"""3/1 adventofcode""" with open("input.txt", "r", encoding="UTF-8") as i_file: data = i_file.read().splitlines() columns = [[row[i] for row in data] for i in range(len(data[0]))] def binlst_to_int(values) -> int: """Returns int values of binary in list form""" values = values[::-1] total = 0...
[ 37811, 18, 14, 16, 19980, 1659, 8189, 37811, 201, 198, 201, 198, 4480, 1280, 7203, 15414, 13, 14116, 1600, 366, 81, 1600, 21004, 2625, 48504, 12, 23, 4943, 355, 1312, 62, 7753, 25, 201, 198, 220, 220, 220, 1366, 796, 1312, 62, 7753,...
2.552553
333
from braces.views import AnonymousRequiredMixin from django.views.generic import TemplateView
[ 6738, 47241, 13, 33571, 1330, 19200, 37374, 35608, 259, 198, 6738, 42625, 14208, 13, 33571, 13, 41357, 1330, 37350, 7680, 198 ]
4.47619
21
#!/usr/bin/python3 from functools import partial from datetime import datetime import pandas as pd from joblib import parallel_backend import random import numpy as np from sklearn.calibration import CalibratedClassifierCV import shutil import pathlib import os import math import random from matplotlib import pyplot ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 6738, 1257, 310, 10141, 1330, 13027, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 1693, 8019, 1330, 10730, 62, 1891, 437, 198, 11748, 473...
2.956409
1,537
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import numpy as np from scipy import optimize, sparse from .AbstractDistanceAlg import AbstractDistanceAlg
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 1330, 27183, 11, 29877, 198, 6738, 764, 23839, 45767, 2348,...
3.039216
51
from collections.abc import Sequence from .filter import Filter
[ 6738, 17268, 13, 39305, 1330, 45835, 198, 198, 6738, 764, 24455, 1330, 25853, 628 ]
4.714286
14
""" :copyright: Nick Hale :license: MIT, see LICENSE for more details. """ __version__ = '0.0.1'
[ 37811, 198, 25, 22163, 4766, 25, 8047, 35056, 198, 25, 43085, 25, 17168, 11, 766, 38559, 24290, 329, 517, 3307, 13, 198, 37811, 198, 834, 9641, 834, 796, 705, 15, 13, 15, 13, 16, 6, 198 ]
2.694444
36
from google.protobuf import text_format from pomagma.io import protobuf_test_pb2 from pomagma.io.protobuf import InFile, OutFile from pomagma.util import in_temp_dir from pomagma.util.testing import for_each EXAMPLES = [ parse(''), parse(''' optional_string: 'test' '''), parse(''' re...
[ 6738, 23645, 13, 11235, 672, 3046, 1330, 2420, 62, 18982, 198, 198, 6738, 279, 296, 363, 2611, 13, 952, 1330, 1237, 672, 3046, 62, 9288, 62, 40842, 17, 198, 6738, 279, 296, 363, 2611, 13, 952, 13, 11235, 672, 3046, 1330, 554, 8979, ...
1.934498
458
""" Copyright 2020 The OneFlow Authors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable l...
[ 37811, 201, 198, 15269, 12131, 383, 1881, 37535, 46665, 13, 1439, 2489, 10395, 13, 201, 198, 201, 198, 26656, 15385, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 201, 198, 5832, 743, 407, 779, 428, 239...
3.278626
262
import re from django.template import Library, Node, TemplateSyntaxError from django.template.base import token_kwargs from django.urls import Resolver404, resolve from django.utils.html import format_html register = Library()
[ 11748, 302, 198, 198, 6738, 42625, 14208, 13, 28243, 1330, 10074, 11, 19081, 11, 37350, 13940, 41641, 12331, 198, 6738, 42625, 14208, 13, 28243, 13, 8692, 1330, 11241, 62, 46265, 22046, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 1874, ...
3.609375
64
""" Log initializer """ from __future__ import absolute_import, division, print_function, unicode_literals import itertools import logging import sys import os from logging.handlers import RotatingFileHandler from rich.logging import RichHandler from typing import List DEBUG = logging.DEBUG INFO = logging.INFO ERROR ...
[ 37811, 5972, 4238, 7509, 37227, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 11, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 340, 861, 10141, 198, 11748, 18931, 198, 11748, 25064, 198, 11748, 2868...
2.652833
1,253
import argparse from pathlib import Path import torch import torch.nn.functional as F from sklearn.metrics import precision_recall_fscore_support, roc_curve, auc import matplotlib.pyplot as plt import numpy as np from data.data_loader import ActivDataset, loader from models.focal_loss import FocalLoss from models.ete_...
[ 11748, 1822, 29572, 198, 6738, 3108, 8019, 1330, 10644, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 6738, 1341, 35720, 13, 4164, 10466, 1330, 15440, 62, 8344, 439, 62, 69, 26675, 62, 11284, 11, 686, 66, ...
2.913644
579
from structure_helper_class import structure_helper from model_train_helper_class import model_train_helper import matplotlib.pyplot as plt import pandas as pd from tabulate import tabulate
[ 6738, 4645, 62, 2978, 525, 62, 4871, 1330, 4645, 62, 2978, 525, 198, 6738, 2746, 62, 27432, 62, 2978, 525, 62, 4871, 1330, 2746, 62, 27432, 62, 2978, 525, 198, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748...
3.213115
61
# <<BEGIN-copyright>> # Copyright 2021, Lawrence Livermore National Security, LLC. # See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: BSD-3-Clause # <<END-copyright>> """ Store and report warnings and errors in a PoPs database. PoPs.check() returns a nested list of warning objects: >>> ...
[ 2, 9959, 33, 43312, 12, 22163, 4766, 4211, 198, 2, 15069, 33448, 11, 13914, 45036, 3549, 2351, 4765, 11, 11419, 13, 198, 2, 4091, 262, 1353, 12, 5715, 27975, 38162, 9947, 2393, 329, 3307, 13, 198, 2, 220, 198, 2, 30628, 55, 12, 34...
3.603239
247
from canoser import Struct, Uint8, bytes_to_int_list, hex_to_int_list from libra.transaction.transaction_argument import TransactionArgument, normalize_public_key from libra.bytecode import bytecodes from libra.account_address import Address
[ 6738, 460, 13416, 1330, 32112, 11, 471, 600, 23, 11, 9881, 62, 1462, 62, 600, 62, 4868, 11, 17910, 62, 1462, 62, 600, 62, 4868, 201, 198, 6738, 9195, 430, 13, 7645, 2673, 13, 7645, 2673, 62, 49140, 1330, 45389, 28100, 1713, 11, 34...
3.337838
74
from Calculators.Division import division
[ 6738, 27131, 2024, 13, 24095, 1166, 1330, 7297, 628 ]
4.777778
9
from collections import defaultdict N, M, T = read_line_to_list() candies_ = [read_line_to_list() for _ in range(N)] collector = CollectCandies(N, M, T, candies_) print collector.get_max_sum()
[ 6738, 17268, 1330, 4277, 11600, 628, 198, 198, 45, 11, 337, 11, 309, 796, 1100, 62, 1370, 62, 1462, 62, 4868, 3419, 198, 46188, 444, 62, 796, 685, 961, 62, 1370, 62, 1462, 62, 4868, 3419, 329, 4808, 287, 2837, 7, 45, 15437, 628, ...
2.689189
74
# ---------------------------------------------------------------------- # | # | __init__.py # | # | David Brownell <db@DavidBrownell.com> # | 2018-02-18 14:37:39 # | # ---------------------------------------------------------------------- # | # | Copyright David Brownell 2018. # | Distribute...
[ 2, 16529, 23031, 201, 198, 2, 930, 220, 220, 201, 198, 2, 930, 220, 11593, 15003, 834, 13, 9078, 201, 198, 2, 930, 220, 220, 201, 198, 2, 930, 220, 3271, 4373, 695, 1279, 9945, 31, 11006, 20644, 695, 13, 785, 29, 201, 198, 2, ...
2.402404
3,827
# Databricks notebook source exported at Mon, 14 Mar 2016 03:21:05 UTC # MAGIC %md # MAGIC **SOURCE:** This is from the Community Edition of databricks and has been added to this databricks shard at [/#workspace/scalable-data-science/xtraResources/edXBigDataSeries2015/CS100-1x](/#workspace/scalable-data-science/xtraRes...
[ 2, 16092, 397, 23706, 20922, 2723, 29050, 379, 2892, 11, 1478, 1526, 1584, 7643, 25, 2481, 25, 2713, 18119, 198, 2, 28263, 2149, 4064, 9132, 198, 2, 28263, 2149, 12429, 47690, 25, 1174, 770, 318, 422, 262, 8108, 5061, 286, 4818, 397, ...
2.7
1,190
from unittest import mock import astropy.units as u import matplotlib as mpl import matplotlib.pyplot as plt import numpy as np import pytest from einsteinpy.coordinates import SphericalDifferential from einsteinpy.plotting import StaticGeodesicPlotter def test_plot_calls_draw_attractor_Manualscale(dummy_data):...
[ 6738, 555, 715, 395, 1330, 15290, 198, 198, 11748, 6468, 28338, 13, 41667, 355, 334, 198, 11748, 2603, 29487, 8019, 355, 285, 489, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, ...
2.597444
313
#from inv_ind.py import inverted_index import search
[ 2, 6738, 800, 62, 521, 13, 9078, 1330, 37204, 62, 9630, 198, 198, 11748, 2989, 628 ]
3.4375
16
from enum import Enum import typer from fasta_reader import read_fasta from deciphon_cli.core import ScanPost, SeqPost from deciphon_cli.requests import get_json, get_plain, post_json __all__ = ["app"] app = typer.Typer()
[ 6738, 33829, 1330, 2039, 388, 198, 198, 11748, 1259, 525, 198, 6738, 3049, 64, 62, 46862, 1330, 1100, 62, 7217, 64, 198, 198, 6738, 875, 13323, 261, 62, 44506, 13, 7295, 1330, 20937, 6307, 11, 1001, 80, 6307, 198, 6738, 875, 13323, ...
2.788235
85
import torch import torch.nn as nn from torch.hub import load_state_dict_from_url
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 6738, 28034, 13, 40140, 1330, 3440, 62, 5219, 62, 11600, 62, 6738, 62, 6371, 628, 198 ]
3.111111
27
from portfolio.models import Transaction, Security, Price, Account from portfolio.models import PriceTracker from django.contrib import admin admin.site.register(Transaction) admin.site.register(Security) admin.site.register(Price) admin.site.register(PriceTracker) admin.site.register(Account)
[ 6738, 15320, 13, 27530, 1330, 45389, 11, 4765, 11, 7886, 11, 10781, 198, 6738, 15320, 13, 27530, 1330, 7886, 35694, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 198, 28482, 13, 15654, 13, 30238, 7, 48720, 8, 198, 28482, 1...
3.844156
77
import os import shutil
[ 11748, 28686, 198, 11748, 4423, 346, 628 ]
3.571429
7
""" The components module has all optical components that are used in optics """
[ 37811, 383, 6805, 8265, 468, 477, 18480, 6805, 326, 389, 973, 287, 36237, 198, 198, 37811, 628, 198, 220, 220, 220, 220, 198, 220, 220, 220, 220, 198 ]
3.357143
28
from twisted.internet.defer import succeed from twisted.internet.task import Clock from twisted.trial.unittest import TestCase from txraft import Entry, RaftNode, MockRPC, STATE from txraft.commands import AppendEntriesCommand, RequestVotesCommand
[ 6738, 19074, 13, 37675, 13, 4299, 263, 1330, 6758, 198, 6738, 19074, 13, 37675, 13, 35943, 1330, 21328, 198, 6738, 19074, 13, 45994, 13, 403, 715, 395, 1330, 6208, 20448, 198, 198, 6738, 27765, 1617, 1330, 220, 21617, 11, 7567, 701, 1...
3.657143
70
import os, sys sys.path.append(os.path.expanduser("~/workspace/")) from pyutils.common import * if __name__ == "__main__": BASE_DIR = "/nvme/log/p/2021-02-01/" # load_all_fe_metrics(f"{BASE_DIR}/0124/aws_CDN_akamai2_expLatency_unavail0_1000G/", system="CDN") # load_all_fe_metrics(f"{BASE_DIR}/0124...
[ 198, 198, 11748, 28686, 11, 25064, 198, 17597, 13, 6978, 13, 33295, 7, 418, 13, 6978, 13, 11201, 392, 7220, 7203, 93, 14, 5225, 10223, 30487, 4008, 198, 6738, 12972, 26791, 13, 11321, 1330, 1635, 220, 628, 628, 198, 198, 361, 11593, ...
1.920313
640
""" Django settings for ToDo project. Generated by 'django-admin startproject' using Django 1.11. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ """ import os # ...
[ 37811, 198, 35, 73, 14208, 6460, 329, 1675, 5211, 1628, 13, 198, 198, 8645, 515, 416, 705, 28241, 14208, 12, 28482, 923, 16302, 6, 1262, 37770, 352, 13, 1157, 13, 198, 198, 1890, 517, 1321, 319, 428, 2393, 11, 766, 198, 5450, 1378, ...
2.330691
1,766
from . import ( canopy, evapotranspiration, radiation, snow, soil, )
[ 6738, 764, 1330, 357, 198, 220, 220, 220, 39418, 11, 198, 220, 220, 220, 819, 499, 313, 26084, 10514, 11, 198, 220, 220, 220, 11881, 11, 198, 220, 220, 220, 6729, 11, 198, 220, 220, 220, 9260, 11, 198, 8, 198 ]
2.170732
41
from django.urls import path from django_security_headers_example.core.views import LandingPageView urlpatterns = [ path("", view=LandingPageView.as_view(), name="landing_page"), ]
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 198, 6738, 42625, 14208, 62, 12961, 62, 50145, 62, 20688, 13, 7295, 13, 33571, 1330, 29689, 9876, 7680, 628, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 3108, 7203, 1600, 1570...
3.032258
62
from __future__ import absolute_import import mock import pytest import pandas as pd from collections import OrderedDict from sagemaker.analytics import ExperimentAnalytics
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 11748, 15290, 198, 11748, 12972, 9288, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 198, 6738, 45229, 32174, 13, 38200, 14094, 13...
3.72
50
# Generated by Django 2.1.7 on 2019-04-04 12:15 from django.conf import settings from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 362, 13, 16, 13, 22, 319, 13130, 12, 3023, 12, 3023, 1105, 25, 1314, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14...
3.019231
52
# coding:utf-8 import torch import torch.nn as nn from torch.autograd import Variable from torch.nn.utils import clip_grad_norm_ from torch.utils.data import DataLoader from tqdm import tqdm import numpy as np import math import re import sys from Vocab import Vocab from Dataset import Dataset from RNN_RNN import RNN_R...
[ 2, 19617, 25, 40477, 12, 23, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 6738, 28034, 13, 2306, 519, 6335, 1330, 35748, 198, 6738, 28034, 13, 20471, 13, 26791, 1330, 10651, 62, 9744, 62, 27237, 62, 198, 6738, ...
2.689655
957
import os from random import shuffle import pascalvoc_to_yolo
[ 11748, 28686, 198, 6738, 4738, 1330, 36273, 198, 198, 11748, 279, 27747, 18893, 62, 1462, 62, 88, 14057, 198 ]
3.315789
19
# -*- coding: utf-8 -*- # Generated by Django 1.11.29 on 2020-05-18 21:36 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, 1959, 319, 12131, 12, 2713, 12, 1507, 2310, 25, 2623, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198...
2.753623
69
#!/usr/bin/python3 import os import sys import syslog # FIXME: use systemd.journal.send()? import gi gi.require_version('Notify', '0.7') import gi.repository.Notify # noqa: E402 __doc__ = """ an ersatz xterm that says "No!" and quits """ # Tell the central server. # FIXME: ends up in user journ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 25064, 6404, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 44855, 11682, 25, 779, 31490, 1...
2.85567
485
#! /usr/bin/env nix-shell #! nix-shell -i python3 -p "[python3] ++ (with pkgs.python37Packages; [ requests future ws4py pytest pylint coveralls twine wheel ])" # <<END Extended Shebang>> import json from pywebostv.discovery import * from pywebostv.connection import * from pywebostv.controls import * with open('/home/...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 299, 844, 12, 29149, 198, 2, 0, 299, 844, 12, 29149, 532, 72, 21015, 18, 532, 79, 12878, 29412, 18, 60, 19969, 357, 4480, 279, 10025, 82, 13, 29412, 2718, 11869, 1095, 26, 685, 7007, 2003, ...
2.890411
292
#!/usr/bin/python import realog.debug as debug import lutin.tools as tools
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 11748, 1103, 519, 13, 24442, 355, 14257, 198, 11748, 300, 315, 259, 13, 31391, 355, 4899, 628, 628, 198 ]
2.925926
27
import pandas import pytest from covid_model_seiir_pipeline.lib.io import RegressionRoot from covid_model_seiir_pipeline.lib.io.marshall import ( CSVMarshall, ParquetMarshall, )
[ 11748, 19798, 292, 198, 11748, 12972, 9288, 198, 198, 6738, 39849, 312, 62, 19849, 62, 36455, 343, 62, 79, 541, 4470, 13, 8019, 13, 952, 1330, 3310, 2234, 30016, 198, 6738, 39849, 312, 62, 19849, 62, 36455, 343, 62, 79, 541, 4470, 1...
2.567568
74
from telegram import Update from telegram.ext import CallbackContext, CommandHandler from bot.settings import settings from bot.utils import get_log from ._utils import require_owner log = get_log(__name__) handler = CommandHandler('settings', command)
[ 6738, 573, 30536, 1330, 10133, 198, 6738, 573, 30536, 13, 2302, 1330, 4889, 1891, 21947, 11, 9455, 25060, 198, 198, 6738, 10214, 13, 33692, 1330, 6460, 198, 6738, 10214, 13, 26791, 1330, 651, 62, 6404, 198, 198, 6738, 47540, 26791, 1330...
3.768116
69
import telegram from telegram.ext import CommandHandler, ConversationHandler, MessageHandler, \ Filters from civbot.commands.cmd_cancel import cancel_all from civbot.models import User, Subscription SELECT = 1 # noinspection PyUnusedLocal
[ 11748, 573, 30536, 198, 6738, 573, 30536, 13, 2302, 1330, 9455, 25060, 11, 42427, 25060, 11, 16000, 25060, 11, 3467, 198, 220, 220, 220, 7066, 1010, 198, 198, 6738, 36317, 13645, 13, 9503, 1746, 13, 28758, 62, 66, 21130, 1330, 14241, ...
3.507042
71
# Rule nomad_run generates a runner script to execute nomad run with the given # job file. # # NOTE(kfeng): This rule currently assumes that the nomad executable is # installed on the host machine, and is in one of the directories listed in # the PATH environment variable. In the future, this project may fetch # the n...
[ 2, 14330, 4515, 324, 62, 5143, 18616, 257, 17490, 4226, 284, 12260, 4515, 324, 1057, 351, 262, 1813, 198, 2, 1693, 2393, 13, 198, 2, 198, 2, 24550, 7, 74, 69, 1516, 2599, 770, 3896, 3058, 18533, 326, 262, 4515, 324, 28883, 318, 19...
3.035176
199
def rmsprop_update(loss, params, grad_sq, lr=1e-1, alpha=0.8): """Perform an RMSprop update on a collection of parameters Args: loss (tensor): A scalar tensor containing the loss whose gradient will be computed params (iterable): Collection of parameters with respect to which we compute gradients grad_...
[ 4299, 374, 907, 22930, 62, 19119, 7, 22462, 11, 42287, 11, 3915, 62, 31166, 11, 300, 81, 28, 16, 68, 12, 16, 11, 17130, 28, 15, 13, 23, 2599, 198, 220, 37227, 5990, 687, 281, 371, 5653, 22930, 4296, 319, 257, 4947, 286, 10007, 6...
2.99117
453
import logging from urllib.parse import urljoin import requests from thomas import Item, StreamerBase, router from unplugged import Schema, fields from twisted.internet import threads from ...exceptions import NotModifiedException, PathNotFoundException from ...plugins import InputPlugin from ...stream import Stream...
[ 11748, 18931, 198, 6738, 2956, 297, 571, 13, 29572, 1330, 19016, 22179, 198, 198, 11748, 7007, 198, 6738, 294, 16911, 1330, 9097, 11, 13860, 263, 14881, 11, 20264, 198, 6738, 555, 16875, 2004, 1330, 10011, 2611, 11, 7032, 198, 198, 6738...
3.934783
92
from api import get_secret, get_tweepy_api, TwitterApiSecret import json SECRET_NAME = "TwitterAPIKeys"
[ 6738, 40391, 1330, 651, 62, 21078, 11, 651, 62, 83, 732, 538, 88, 62, 15042, 11, 3009, 32, 14415, 23725, 198, 11748, 33918, 198, 198, 23683, 26087, 62, 20608, 796, 366, 14254, 17614, 40729, 1, 198 ]
2.916667
36
# Copyright 2013-present Barefoot Networks, 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 agr...
[ 2, 15069, 2211, 12, 25579, 38234, 5898, 27862, 11, 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, 1...
3.669856
209
from flask import Flask, request, jsonify from flask_sqlalchemy import SQLAlchemy from model.exp_model import Experience, ExperienceSchema
[ 6738, 42903, 1330, 46947, 11, 2581, 11, 33918, 1958, 198, 6738, 42903, 62, 25410, 282, 26599, 1330, 16363, 2348, 26599, 198, 6738, 2746, 13, 11201, 62, 19849, 1330, 16386, 11, 16386, 27054, 2611 ]
4.181818
33
""" Code for turning a GAE Search query into a SOLR query. """ import logging import sys from constants import INDEX_NAME_FIELD, INDEX_LOCALE_FIELD from appscale.common.unpackaged import APPSCALE_PYTHON_APPSERVER sys.path.append(APPSCALE_PYTHON_APPSERVER) from google.appengine.api.search import query_parser from goo...
[ 37811, 6127, 329, 6225, 257, 402, 14242, 11140, 12405, 656, 257, 36817, 49, 12405, 13, 37227, 198, 11748, 18931, 198, 11748, 25064, 198, 198, 6738, 38491, 1330, 24413, 6369, 62, 20608, 62, 44603, 11, 24413, 6369, 62, 29701, 21358, 62, 4...
2.80303
1,716
import sys import pickle if __name__ == "__main__": create_evaluable_CAG(sys.argv[1], sys.argv[2])
[ 11748, 25064, 198, 11748, 2298, 293, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 2251, 62, 18206, 7153, 62, 34, 4760, 7, 17597, 13, 853, 85, 58, 16, 4357, 25064, 13, 853, 85, 58, 17, 12962, 19...
2.340909
44
byt = open("xor_key.bin", "rb").read() final = "\x00\x00\x00\x00\x6A\x00\x6A\x00\x68".encode() final = [e for e in final] final.append(0x26) final.append(0xFC) final.append(0x19) final.append(0x00) final.append(0x6A) final.append(0x00) final = [e for e in final] final.append(0xB8) final.append(0xC8) final.append(0x59) ...
[ 1525, 83, 796, 1280, 7203, 87, 273, 62, 2539, 13, 8800, 1600, 366, 26145, 11074, 961, 3419, 198, 20311, 796, 37082, 87, 405, 59, 87, 405, 59, 87, 405, 59, 87, 405, 59, 87, 21, 32, 59, 87, 405, 59, 87, 21, 32, 59, 87, 405, 59...
2.097561
369
''' Incremental-Classifier Learning Authors : Khurram Javed, Muhammad Talha Paracha Maintainer : Khurram Javed Lab : TUKL-SEECS R&D Lab Email : 14besekjaved@seecs.edu.pk ''' import math import torch import torch.nn as nn import torch.nn.functional as F from torch.nn import init def resnet_rebuffi(n=5): r...
[ 7061, 6, 10791, 37098, 12, 9487, 7483, 18252, 198, 46665, 1058, 5311, 333, 859, 449, 9586, 11, 15870, 7193, 3099, 2547, 34518, 198, 337, 2913, 10613, 1058, 5311, 333, 859, 449, 9586, 198, 3498, 1058, 309, 15039, 43, 12, 5188, 2943, 50...
2.658915
129
# -*- coding: utf-8 -*- """ IO ~~~~~~~~~~~~~~~~~~~ A Python module for Input and Ouput interactions :copyright: (c) 2020 Killian Mah :license: MIT, see LICENSE for more details. """ __title__ = 'io' __author__ = 'Killian Mah' __license__ = 'MIT' __copyright__ = 'Copyright 2020 Killian Mah' __version__ = '0.0.1' f...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 9399, 198, 27156, 4907, 93, 198, 198, 32, 11361, 8265, 329, 23412, 290, 440, 929, 315, 12213, 198, 198, 25, 22163, 4766, 25, 357, 66, 8, 12131, 12265,...
2.963235
136
''' Tools for dealing with multithreaded programs. ''' from concurrent.futures import ThreadPoolExecutor, as_completed from nlplib.general.iterate import chunked __all__ = ['simultaneously'] if __name__ == '__main__' : from nlplib.general.unittest import UnitTest __test__(UnitTest()) __demo__()
[ 7061, 6, 20003, 329, 7219, 351, 1963, 342, 961, 276, 4056, 13, 705, 7061, 628, 198, 6738, 24580, 13, 69, 315, 942, 1330, 14122, 27201, 23002, 38409, 11, 355, 62, 785, 16838, 198, 198, 6738, 299, 75, 489, 571, 13, 24622, 13, 2676, ...
2.854545
110
# Generated by Django 2.2.5 on 2019-09-28 19:25 from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 20, 319, 13130, 12, 2931, 12, 2078, 678, 25, 1495, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, 9945, 13, 27530, 13, 2934, 1616, 295, ...
2.818182
44
inp=input("Enter a string: ") rev=0 while (inp>0): dig=inp%10 rev=rev*10+dig inp=inp//10 print(rev)
[ 259, 79, 28, 15414, 7203, 17469, 257, 4731, 25, 366, 8, 201, 198, 18218, 28, 15, 201, 198, 4514, 357, 259, 79, 29, 15, 2599, 201, 198, 197, 12894, 28, 259, 79, 4, 940, 201, 198, 197, 18218, 28, 18218, 9, 940, 10, 12894, 201, 1...
1.8
60
import globals
[ 11748, 15095, 874, 628 ]
4
4
# -*- coding: utf-8 -*- from django.db import models from apps.registro.models.Anexo import Anexo from django.core.exceptions import ValidationError import datetime
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 6725, 13, 2301, 396, 305, 13, 27530, 13, 32, 12413, 78, 1330, 317, 12413, 78, 198, 6738, 42625, 14208, 13, 7295, 1...
2.964286
56
import os import unittest from rosie import Rosie from rosie import DocumentNotFound # from test import create # create(100)
[ 11748, 28686, 198, 11748, 555, 715, 395, 198, 198, 6738, 686, 44524, 1330, 10018, 494, 198, 6738, 686, 44524, 1330, 16854, 3673, 21077, 198, 198, 2, 422, 1332, 1330, 2251, 198, 2, 2251, 7, 3064, 8, 198 ]
3.432432
37
# @file # # FadZmaq Project # Professional Computing. Semester 2 2019 # # Copyright FadZmaq 2019 All rights reserved. # @author Lachlan Russell 22414249@student.uwa.edu.au # @author Jordan Russell jordanrussell@live.com import json # Tests that the server is up at all. # Not implemented # N...
[ 2, 2488, 7753, 198, 2, 198, 2, 376, 324, 57, 2611, 80, 4935, 198, 2, 18612, 38589, 13, 12449, 7834, 362, 13130, 198, 2, 198, 2, 15069, 376, 324, 57, 2611, 80, 220, 13130, 220, 220, 220, 220, 220, 1439, 2489, 10395, 13, 198, 2, ...
3.026846
149
import inspect import subprocess import tempfile from copy import copy from weakref import WeakKeyDictionary import piexif import pyheif from cffi import FFI from PIL import Image, ImageFile from pyheif.error import HeifError ffi = FFI() _keep_refs = WeakKeyDictionary() pyheif_supports_transformations = ( 'trans...
[ 11748, 10104, 198, 11748, 850, 14681, 198, 11748, 20218, 7753, 198, 6738, 4866, 1330, 4866, 198, 6738, 4939, 5420, 1330, 28788, 9218, 35, 14188, 198, 198, 11748, 2508, 87, 361, 198, 11748, 12972, 258, 361, 198, 6738, 269, 487, 72, 1330,...
2.606904
898
from cloc import grp, cmd, opt, arg, mixins from cloc.types import Choices """Test Code ->""" class UserCmds(mixins.List, mixins.Echo): u = UserCmds(users=['user1', 'user2']) user2 = UserCmds(users=['user1', 'user2', 'user3']) perms = PermissionCmds(roles=['admin', 'user', 'dev'], services=['test_service1']) cli...
[ 6738, 537, 420, 1330, 1036, 79, 11, 23991, 11, 2172, 11, 1822, 11, 5022, 1040, 198, 6738, 537, 420, 13, 19199, 1330, 10031, 1063, 198, 198, 37811, 14402, 220, 6127, 4613, 37811, 198, 198, 4871, 11787, 40109, 82, 7, 19816, 1040, 13, ...
2.471698
212
#!/usr/bin/env python3 import os os.system("openocd -f wukong.cfg -c 'init; pld load 0 build/top.bit; exit' ")
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 28686, 198, 418, 13, 10057, 7203, 9654, 420, 67, 532, 69, 266, 46654, 13, 37581, 532, 66, 705, 15003, 26, 279, 335, 3440, 657, 1382, 14, 4852, 13, 2545, 26, 8420, 6, 366...
2.413043
46
import json import time from utils.helper import RedisClient from paho.mqtt.client import MQTT_ERR_SUCCESS import paho.mqtt.client as mqtt from utils.date_time import TimeMeasure import tasks as tasks_mqtt from utils.message import MsgShadowGet, MsgShadowUpdate import logging logger = logging.getLogger() logger.setL...
[ 11748, 33918, 198, 11748, 640, 198, 6738, 3384, 4487, 13, 2978, 525, 1330, 2297, 271, 11792, 198, 198, 6738, 279, 17108, 13, 76, 80, 926, 13, 16366, 1330, 337, 48, 15751, 62, 1137, 49, 62, 12564, 4093, 7597, 198, 11748, 279, 17108, ...
2.91453
117
# simple servo test for PCA9685 with HS422 from servo.servo import * from time import sleep pca = PCA9685() pca.setZero(0) sleep(2) for a in xrange(-67,67,1): pca.setAngle(0,a) sleep(0.05) for a in xrange(67,0,-1): pca.setAngle(0,a) sleep(0.05)
[ 2, 2829, 1113, 78, 1332, 329, 4217, 32, 24, 35978, 351, 18070, 44361, 198, 6738, 1113, 78, 13, 3168, 78, 1330, 1635, 198, 6738, 640, 1330, 3993, 198, 198, 79, 6888, 796, 4217, 32, 24, 35978, 3419, 220, 198, 79, 6888, 13, 2617, 286...
2.107438
121
items = input().split("|") # items to buy budged = int(input()) profit = 0 profit_price_list = [] profit_list = [] profit_price = 0 for index in items: profit = 0 profit_price = 0 separator = index.split("->") if separator[0] == "Clothes": if not 0 < float(separator[1]) <= 50: co...
[ 23814, 796, 5128, 22446, 35312, 7203, 91, 4943, 220, 220, 220, 220, 1303, 3709, 284, 2822, 198, 65, 463, 2004, 796, 493, 7, 15414, 28955, 198, 9183, 796, 657, 198, 9183, 62, 20888, 62, 4868, 796, 17635, 198, 9183, 62, 4868, 796, 176...
2.448763
566
from rest_framework import viewsets from rest_framework.serializers import ValidationError from .models import Address from .serializers import AddressSerializer from lims.permissions.permissions import IsAddressOwner, IsAddressOwnerFilter from lims.shared.mixins import AuditTrailViewMixin
[ 6738, 1334, 62, 30604, 1330, 5009, 1039, 198, 6738, 1334, 62, 30604, 13, 46911, 11341, 1330, 3254, 24765, 12331, 198, 198, 6738, 764, 27530, 1330, 17917, 198, 6738, 764, 46911, 11341, 1330, 17917, 32634, 7509, 198, 198, 6738, 1761, 82, ...
4.083333
72
''' Created on Sep 8, 2018 Use autocropFaces() to crop out the material around faces in an image, where the faces are automatically detected. See the bottom for an example use script. Used this as a starting reference point: https://docs.opencv.org/3.3.0/d7/d8b/tutorial_py_face_detection.html @author: tmahrt ''' i...
[ 7061, 6, 198, 41972, 319, 8621, 807, 11, 2864, 198, 198, 11041, 1960, 420, 1773, 37, 2114, 3419, 284, 13833, 503, 262, 2587, 1088, 6698, 287, 281, 2939, 11, 198, 3003, 262, 6698, 389, 6338, 12326, 13, 198, 198, 6214, 262, 4220, 329,...
2.229367
3,126
# -*- coding: utf-8 -*- """MultistageDdecWorkChain workchain""" from __future__ import absolute_import from aiida.plugins import CalculationFactory, DataFactory, WorkflowFactory from aiida.common import AttributeDict from aiida.engine import WorkChain, ToContext # import sub-workchains Cp2kMultistageWorkChain = Work...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 15205, 396, 496, 35, 12501, 12468, 35491, 670, 7983, 37811, 198, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 6738, 257, 72, 3755, 13, 37390, 13...
2.963636
220
''' 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 "License"); you may not use this ...
[ 7061, 6, 198, 26656, 15385, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 198, 273, 517, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 198, 17080, 6169, 351, 428, 670, 329, 3224, 1321, 198, 2301, 13493, 6634, 9238, ...
3.194004
567
import sys import time from itertools import chain from pathlib import Path import nbformat import notedown if __name__ == "__main__": assert len(sys.argv) >= 2, "usage: input.md" here = Path(".") files = list(chain.from_iterable(map(here.glob, sys.argv[1:]))) for file in files: convert(f...
[ 11748, 25064, 198, 11748, 640, 198, 6738, 340, 861, 10141, 1330, 6333, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 11748, 299, 65, 18982, 198, 11748, 4367, 593, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, ...
2.620968
124
from .tu_simple_lane import TusimpleLane
[ 6738, 764, 28047, 62, 36439, 62, 33533, 1330, 46233, 320, 1154, 43, 1531 ]
3.076923
13
import turtle as t n = 50 t. bgcolor("black") t. color("green") t. speed(0) for x in range(n): t. circle(80) t. lt(360/n)
[ 11748, 28699, 355, 256, 628, 198, 77, 796, 2026, 198, 83, 13, 275, 70, 8043, 7203, 13424, 4943, 198, 83, 13, 3124, 7203, 14809, 4943, 198, 83, 13, 2866, 7, 15, 8, 198, 198, 1640, 2124, 287, 2837, 7, 77, 2599, 198, 220, 220, 220,...
1.860759
79
from .dashboard_menu import *
[ 6738, 764, 42460, 3526, 62, 26272, 1330, 1635 ]
3.625
8
# The 3-Clause BSD License # Copyright (C) 2019, KessK, all rights reserved. # Copyright (C) 2019, Kison.Y, all rights reserved. # Redistribution and use in source and binary forms, with or without modification, are permitted provided that the # following conditions are met:Redistribution and use in source and binary ...
[ 2, 383, 513, 12, 2601, 682, 347, 10305, 13789, 198, 2, 15069, 357, 34, 8, 13130, 11, 509, 408, 42, 11, 477, 2489, 10395, 13, 198, 2, 15069, 357, 34, 8, 13130, 11, 509, 1653, 13, 56, 11, 477, 2489, 10395, 13, 198, 198, 2, 2297,...
2.370694
5,371