content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import os import unittest from conans.model.ref import ConanFileReference, PackageReference from conans.test.utils.tools import NO_SETTINGS_PACKAGE_ID, TestClient, TestServer from conans.util.files import save
[ 11748, 28686, 198, 11748, 555, 715, 395, 198, 198, 6738, 369, 504, 13, 19849, 13, 5420, 1330, 31634, 8979, 26687, 11, 15717, 26687, 198, 6738, 369, 504, 13, 9288, 13, 26791, 13, 31391, 1330, 8005, 62, 28480, 51, 20754, 62, 47, 8120, ...
3.419355
62
#!/usr/bin/env python3 """ AGILE BLINKT! An Octopus Agile and Energy Consumption Visualizer. This script is written to be used with the Pimoroni Blinkt LED board, Octopus Energy Agile price tariff, and a live power consumption/export feed (e.g. from Open Emon CMS). Of course, you could use other ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 37811, 198, 220, 220, 220, 13077, 41119, 9878, 17248, 51, 0, 628, 220, 220, 220, 1052, 2556, 25790, 2449, 576, 290, 6682, 42158, 15612, 7509, 13, 628, 220, 220, 220, 770, 42...
2.517483
3,718
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import os import urllib from pants.binaries.binary_tool import Script from pants.binaries.binary_util import BinaryToolUrlGenerator from pants.java.distribution.distribution import Distri...
[ 2, 15069, 1853, 41689, 1628, 20420, 357, 3826, 27342, 9865, 3843, 20673, 13, 9132, 737, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 3826, 38559, 24290, 737, 198, 198, 11748, 28686, 198, 11748, 2956, 297, 571, 1...
2.426689
607
import json from app.models.account import SignupWaitingModel from tests.views import TCBase
[ 11748, 33918, 198, 198, 6738, 598, 13, 27530, 13, 23317, 1330, 5865, 929, 33484, 1780, 17633, 198, 198, 6738, 5254, 13, 33571, 1330, 17283, 14881, 628 ]
3.692308
26
import caribou.agentgroups as agentgroups import caribou.agents as agents import unittest if __name__ == '__main__': unittest.main()
[ 11748, 1097, 571, 280, 13, 25781, 24432, 355, 5797, 24432, 198, 11748, 1097, 571, 280, 13, 49638, 355, 6554, 198, 11748, 555, 715, 395, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, ...
2.916667
48
#!/usr/bin/env python # -*- coding: utf-8 -*- if "action" in p: if p["action"]=="crearLibro": main_model.crearLibro("AsenZor - Guia del desarrollador",["Jesús Zerpa"]) if p["action"]=="guardarTema": introduccion=""" """ main_model.guardarTema("AsenZor - default","AsenZor - Guia del desarrollador","intr...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 361, 366, 2673, 1, 287, 279, 25, 198, 197, 361, 279, 14692, 2673, 8973, 855, 1, 7513, 283, 25835, 305, 1298, 1...
2.282759
145
from dataclasses import dataclass from weakref import ref, WeakMethod import asyncio import logging import asyncev try: from unittest import IsolatedAsyncioTestCase except ImportError: # python 3.7 or lower from aiounittest import AsyncTestCase as IsolatedAsyncioTestCase yield_for = 0.01 # how long to allow...
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 6738, 4939, 5420, 1330, 1006, 11, 28788, 17410, 198, 11748, 30351, 952, 198, 11748, 18931, 198, 11748, 355, 88, 1198, 85, 198, 198, 28311, 25, 198, 220, 220, 220, 422, 555, 715, 395...
3.171875
128
#!/usr/bin/env python3 """Script to perform the sample size analysis using Relevant Vector Machine on PCA data""" import argparse import random import warnings from math import sqrt from pathlib import Path import gc import nibabel as nib import numpy as np from nilearn.masking import apply_mask from scipy import stat...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 37811, 7391, 284, 1620, 262, 6291, 2546, 3781, 1262, 797, 14938, 20650, 10850, 319, 4217, 32, 1366, 37811, 198, 11748, 1822, 29572, 198, 11748, 4738, 198, 11748, 14601, 198, 6738, 10...
2.280591
948
from pyspark.sql.types import * from pyspark.sql import Row from helpers import get_citations from pyspark import SparkContext, SQLContext from pyspark.sql.functions import explode, col, split, trim, udf, lower, regexp_replace INPUT_DATA = 'hdfs:///user/harshdee/enwiki-latest-pages-articles-multistream.xml.bz2' OUTPU...
[ 6738, 279, 893, 20928, 13, 25410, 13, 19199, 1330, 1635, 198, 6738, 279, 893, 20928, 13, 25410, 1330, 11314, 198, 6738, 49385, 1330, 651, 62, 66, 20597, 198, 6738, 279, 893, 20928, 1330, 17732, 21947, 11, 16363, 21947, 198, 6738, 279, ...
2.676901
684
from .world import GameObject, WALL, EMPTY
[ 6738, 764, 6894, 1330, 3776, 10267, 11, 370, 7036, 11, 38144, 9936, 628 ]
3.384615
13
import networkx as nx from pymnet import * import random import matplotlib import cascade as cas import statistics import math import time import csv matplotlib.use('TkAgg') nodes = 500 layers = 3 intra_thres = 0.2 inter_thres = 0.2 attack_size = 10 attack_point = (0.5, 0.5) attack_type = "spatial_number" #...
[ 11748, 3127, 87, 355, 299, 87, 198, 6738, 279, 4948, 3262, 1330, 1635, 198, 11748, 4738, 198, 11748, 2603, 29487, 8019, 198, 11748, 44847, 355, 6124, 198, 11748, 7869, 198, 11748, 10688, 198, 11748, 640, 198, 11748, 269, 21370, 198, 675...
2.280542
3,618
# ========================================== # FIRST and FOLLOW sets from the dragon book # ========================================== from Skoarcery.langoids import Nonterminal, Production, Langoid FIRST = None FOLLOW = None #noinspection PyPep8Naming #noinspection PyPep8Naming
[ 2, 46111, 2559, 28, 198, 2, 31328, 290, 11895, 44765, 5621, 422, 262, 10441, 1492, 198, 2, 46111, 2559, 28, 198, 6738, 3661, 78, 5605, 1924, 13, 17204, 10994, 1330, 8504, 23705, 282, 11, 19174, 11, 16332, 1868, 198, 198, 39776, 2257, ...
3.74359
78
from base64 import b64encode import os import datetime import json from django.test import TestCase from django.utils import timezone from django.core.files.base import ContentFile from django.utils.six import text_type, BytesIO from django.utils import timezone from rest_framework import serializers from .. models ...
[ 6738, 2779, 2414, 1330, 275, 2414, 268, 8189, 198, 11748, 28686, 198, 11748, 4818, 8079, 198, 11748, 33918, 198, 198, 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 42625, 14208, 13, 26791, 1330, 640, 11340, 198, 6738, 42625,...
3.701493
134
import os import sys import json from hl import search from hl import hlist from hl import repo #TODO: write files in $TEMP, then atomically update #TODO: checkpoint every .save() as git commit #skeleton for HL DB class Db(object): """ Add json with template from path """
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 33918, 198, 6738, 289, 75, 1330, 2989, 198, 6738, 289, 75, 1330, 289, 4868, 198, 6738, 289, 75, 1330, 29924, 198, 198, 2, 51, 3727, 46, 25, 3551, 3696, 287, 720, 51, 39494, 11, 788, 22037...
2.93
100
import sys sys.path.insert(0, '../') import os import tensorflow as tf from gantools import utils from cosmotools.data import load from cosmotools.data import fmap from gantools.model import UpscalePatchWGAN from cosmotools.model import CosmoWGAN from gantools.gansystem import GANsystem from cosmotools.gansystem impor...
[ 11748, 25064, 198, 17597, 13, 6978, 13, 28463, 7, 15, 11, 705, 40720, 11537, 198, 11748, 28686, 198, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 308, 415, 10141, 1330, 3384, 4487, 198, 6738, 8615, 27926, 10141, 13, 7890, 1330,...
2.715859
1,362
#!/usr/bin/env python3 import os, sys import numpy as np from pprint import pprint import time from operator import itemgetter sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', '..')) from utils.timeit import timeit if __name__ == '__main__': # Parse args, parse number list ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 28686, 11, 25064, 198, 11748, 299, 32152, 355, 45941, 220, 198, 6738, 279, 4798, 1330, 279, 4798, 198, 11748, 640, 198, 6738, 10088, 1330, 2378, 1136, 353, 198, 198, 17597, ...
2.208955
335
# 316493758 # 4 import pandas as pd SPECIAL_WORD = "huji" def filter_numeric_column(df, col_name, num1, num2): """ Filter dataframe by the value of col_name (between num1, num2) :param df: Dataframe :param col_name: Column name :param num1: Number :...
[ 2, 34131, 2920, 22318, 23, 198, 2, 604, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 48451, 12576, 62, 54, 12532, 796, 366, 13415, 7285, 1, 628, 198, 4299, 8106, 62, 77, 39223, 62, 28665, 7, 7568, 11, 951, 62, 3672, 11, ...
2.176316
760
from nightshift.bmrb import get_bmrb_url, get_shifts, instant_search, open_website from nightshift.plotting import plot2D, plot3D from nightshift.selector import Selector, AmideSelector, MethylSelector, AdvancedSelector, GroupSelector
[ 6738, 1755, 30846, 13, 20475, 26145, 1330, 651, 62, 20475, 26145, 62, 6371, 11, 651, 62, 1477, 19265, 11, 9113, 62, 12947, 11, 1280, 62, 732, 12485, 198, 6738, 1755, 30846, 13, 29487, 889, 1330, 7110, 17, 35, 11, 7110, 18, 35, 198, ...
3.342857
70
from selenium import webdriver from time import sleep import platform from selenium.webdriver.chrome.options import Options options = Options() options.add_argument(" --incognito --start-maximized ") if platform.system() == "Linux": # get th...
[ 6738, 384, 11925, 1505, 1330, 3992, 26230, 201, 198, 6738, 640, 1330, 3993, 201, 198, 11748, 3859, 201, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 46659, 13, 25811, 1330, 18634, 201, 198, 25811, 796, 18634, 3419, 201, 198, 25811...
2.051926
597
from argparse import ArgumentParser import logging from .comment_reader import CommentReader from .downloader import Downloader from .labeller import Labeller
[ 6738, 1822, 29572, 1330, 45751, 46677, 198, 11748, 18931, 198, 198, 6738, 764, 23893, 62, 46862, 1330, 18957, 33634, 198, 6738, 764, 15002, 263, 1330, 10472, 263, 198, 6738, 764, 23912, 12368, 1330, 3498, 12368, 198 ]
4.444444
36
"""Creates a residual block with convolutional layers.""" import tensorflow as tf from tensorflow import keras class ConvResBlock(keras.layers.Layer): """Subclass the Keras Layer class.""" def __init__(self, n_inputs=128, num_filters=[8, 16, 32, 64], convlay...
[ 37811, 16719, 274, 257, 29598, 2512, 351, 3063, 2122, 282, 11685, 526, 15931, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 11192, 273, 11125, 1330, 41927, 292, 628, 198, 4871, 34872, 4965, 12235, 7, 6122, 292, 13, 75, 6962, 13,...
1.96608
1,592
import collections import scipy.sparse as sp_sparse import tables import sys CountMatrix = collections.namedtuple('CountMatrix', ['feature_ref', 'barcodes', 'matrix']) h5FileName = sys.argv[1] ret = get_matrix_from_h5(h5FileName) print(ret)
[ 11748, 17268, 198, 11748, 629, 541, 88, 13, 82, 29572, 355, 599, 62, 82, 29572, 198, 11748, 8893, 198, 11748, 25064, 198, 220, 198, 12332, 46912, 796, 17268, 13, 13190, 83, 29291, 10786, 12332, 46912, 3256, 37250, 30053, 62, 5420, 3256,...
2.722222
90
# # Copyright (c) 2020 Juniper Networks, Inc. All rights reserved. # import json from cfgm_common import _obj_serializer_all from cfgm_common import OVERLAY_LOOPBACK_FQ_PREFIX from cfgm_common.exceptions import HttpError from vnc_api.gen.resource_common import FabricNamespace from vnc_api.gen.resource_common import N...
[ 2, 198, 2, 15069, 357, 66, 8, 12131, 7653, 9346, 27862, 11, 3457, 13, 1439, 2489, 10395, 13, 198, 2, 198, 198, 11748, 33918, 198, 198, 6738, 30218, 39870, 62, 11321, 1330, 4808, 26801, 62, 46911, 7509, 62, 439, 198, 6738, 30218, 398...
3.049123
285
import sympy as sy import numpy as np from scipy.signal import cont2discrete
[ 11748, 10558, 88, 355, 827, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 13, 12683, 282, 1330, 542, 17, 15410, 8374, 198 ]
3.08
25
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import find_packages, setup with open('README.md', 'r') as fp: README = fp.read() setup( name='zerobounce', version='0.1.4', description='ZeroBounce Python API - https://www.zerobounce.net.', author='Tudor Aursulesei', author_email...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 900, 37623, 10141, 1330, 1064, 62, 43789, 11, 9058, 198, 198, 4480, 1280, 10786, 15675, 11682, 13, 9132, 325...
2.535176
398
s = "I love Paris!" f() print(s)
[ 198, 82, 796, 366, 40, 1842, 6342, 2474, 198, 69, 3419, 198, 4798, 7, 82, 8 ]
2.0625
16
# Prompt the user to enter three numbers number1 = eval(input("Enter the first number: ")) number2 = eval(input("Enter the second number: ")) number3 = eval(input("Enter the third number:")) # Compute average average = (number1 + number2 + number3) # Display result print("The average of", number1, number2, number3, "i...
[ 2, 45965, 262, 2836, 284, 3802, 1115, 3146, 198, 17618, 16, 796, 5418, 7, 15414, 7203, 17469, 262, 717, 1271, 25, 366, 4008, 198, 17618, 17, 796, 5418, 7, 15414, 7203, 17469, 262, 1218, 1271, 25, 366, 4008, 198, 17618, 18, 796, 5418...
3.43299
97
from obj_dict_tools import * from nose.tools import raises @dict_fields(['name', 'size']) @dict_fields(['first', 'second']) @raises(Exception)
[ 6738, 26181, 62, 11600, 62, 31391, 1330, 1635, 198, 6738, 9686, 13, 31391, 1330, 12073, 628, 198, 31, 11600, 62, 25747, 7, 17816, 3672, 3256, 705, 7857, 6, 12962, 628, 198, 31, 11600, 62, 25747, 7, 17816, 11085, 3256, 705, 12227, 6, ...
2.8
55
from django.db import DataError, IntegrityError from django.test import TestCase from cars.models import Manufacturer
[ 6738, 42625, 14208, 13, 9945, 1330, 6060, 12331, 11, 39348, 12331, 198, 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 198, 6738, 5006, 13, 27530, 1330, 40218, 628, 198 ]
4.033333
30
# coding: utf-8 # Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 2, 15069, 357, 66, 8, 1584, 11, 33448, 11, 18650, 290, 14, 273, 663, 29116, 13, 220, 1439, 2489, 10395, 13, 198, 2, 770, 3788, 318, 10668, 12, 36612, 284, 345, 739, 262, 14499, 2448, 33532, 1...
2.526928
7,390
############################################################################## # # Copyright (c) 2002 Zope Foundation and Contributors. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS I...
[ 29113, 29113, 7804, 4242, 2235, 198, 2, 198, 2, 15069, 357, 66, 8, 6244, 1168, 3008, 5693, 290, 25767, 669, 13, 198, 2, 198, 2, 770, 3788, 318, 2426, 284, 262, 8617, 286, 262, 1168, 3008, 5094, 13789, 11, 198, 2, 10628, 362, 13, ...
2.531382
2,836
from abc import abstractmethod from typing import Any, Dict, List, Optional from pydantic import BaseModel from obsei.workflow.base_store import BaseStore
[ 6738, 450, 66, 1330, 12531, 24396, 198, 6738, 19720, 1330, 4377, 11, 360, 713, 11, 7343, 11, 32233, 198, 198, 6738, 279, 5173, 5109, 1330, 7308, 17633, 198, 198, 6738, 909, 36455, 13, 1818, 11125, 13, 8692, 62, 8095, 1330, 7308, 22658...
3.577778
45
import sys import os import RPi.GPIO as GPIO import time import pygame DEBUG = False RUNNING = True GPIO.setwarnings(False) GPIO.setmode(GPIO.BCM) pygame.init() screen = pygame.display.set_mode([50,50]) ObjStep = 22 ObjDir = 27 SlideStep = 17 SlideDir = 4 LEDR = 24 LEDG = 18 LEDB = 23 #LEDRoll = 0 StepPause = 0.005 ...
[ 11748, 25064, 198, 11748, 28686, 198, 11748, 25812, 72, 13, 16960, 9399, 355, 50143, 198, 11748, 640, 198, 11748, 12972, 6057, 198, 198, 30531, 796, 10352, 198, 49, 4944, 15871, 796, 6407, 198, 16960, 9399, 13, 2617, 40539, 654, 7, 2510...
1.826087
1,334
#!/usr/bin/env python ############################################################################## # Written by: Cachen Chen <cachen@novell.com> # Date: 12/11/2008 # Description: Test accessibility of toolstriptextbox widget # Use the toolstriptextboxframe.py wrapper script # Test ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 29113, 29113, 7804, 4242, 2235, 198, 2, 22503, 416, 25, 220, 327, 330, 831, 12555, 1279, 66, 330, 831, 31, 77, 659, 297, 13, 785, 29, 198, 2, 7536, 25, 220, 220, 220, 220, 2...
2.656153
1,617
from django.contrib import admin from django.contrib import messages from django.contrib.auth.admin import UserAdmin as BaseUserAdmin from .models import User admin.site.register(User, UserAdmin)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 6218, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 28482, 1330, 11787, 46787, 355, 7308, 12982, 46787, 198, 198, 6738, 764, 27530, 1...
3.508772
57
from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy
[ 6738, 7110, 306, 13, 3106, 265, 265, 9497, 1330, 7308, 2898, 558, 6030, 355, 4808, 14881, 2898, 558, 6030, 198, 11748, 4866, 355, 4808, 30073, 628 ]
3.346154
26
from django.apps import AppConfig
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
3.888889
9
import requests import json import random import time
[ 11748, 7007, 201, 198, 11748, 33918, 201, 198, 11748, 4738, 201, 198, 11748, 640, 201, 198 ]
3.625
16
import cv2 if __name__ == "__main__": img = cv2.imread("../ARC_DATAS/arcKG00001_00048/arcKG00001.jpg") img = cv2.resize(img, (256, 256))
[ 11748, 269, 85, 17, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 33705, 796, 269, 85, 17, 13, 320, 961, 7203, 40720, 25793, 62, 35, 1404, 1921, 14, 5605, 42, 38, 2388, 16, 62, 830, ...
1.924051
79
# # @lc app=leetcode.cn id=284 lang=python3 # # [284] 顶端迭代器 # # https://leetcode-cn.com/problems/peeking-iterator/description/ # # algorithms # Medium (65.89%) # Total Accepted: 902 # Total Submissions: 1.4K # Testcase Example: '["PeekingIterator","next","peek","next","next","hasNext"]\n[[[1,2,3]],[],[],[],[],[]]' ...
[ 2, 198, 2, 2488, 44601, 598, 28, 293, 316, 8189, 13, 31522, 4686, 28, 30336, 42392, 28, 29412, 18, 198, 2, 198, 2, 685, 30336, 60, 16268, 94, 114, 44165, 107, 32573, 255, 47987, 161, 247, 101, 198, 2, 198, 2, 3740, 1378, 293, 31...
1.530208
960
datelist = [ '2020-01-25', '2020-01-26', '2020-01-27', '2020-01-28', '2020-01-29', '2020-01-30', '2020-01-31', '2020-02-01', '2020-02-02', '2020-02-03', '2020-02-04', '2020-02-05', '2020-02-06', '2020-02-07', '2020-02-08', '2020-02-09', '2020-02-10', '2020-02-11', '2020-02-12', '2020-02-13', '2020-0...
[ 4475, 4868, 796, 685, 198, 220, 220, 220, 705, 42334, 12, 486, 12, 1495, 3256, 705, 42334, 12, 486, 12, 2075, 3256, 705, 42334, 12, 486, 12, 1983, 3256, 705, 42334, 12, 486, 12, 2078, 3256, 705, 42334, 12, 486, 12, 1959, 3256, 198...
1.945917
1,849
import pandas as pd import numpy as np import cv2 import tensorflow as tf from tensorflow.keras import datasets, layers, models from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Dense, Conv2D, Flatten, Dropout, MaxPooling2D, BatchNormalization, ReLU from tensorflow.keras.preprocessing.i...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 269, 85, 17, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 11192, 273, 11125, 13, 6122, 292, 1330, 40522, 11, 11685, 11, 4981, 198, 6738, 11192, ...
2.621762
1,351
""" Unit tests for python ccuapi """ from unittest import TestCase from httmock import HTTMock, all_requests from .purge import PurgeRequest from .exceptions import AkamaiAuthorizationException from .exceptions import AkamaiArlPurgeWithoutUrls from .exceptions import AkamaiStatusRequestWithoutPurge from .exceptions...
[ 37811, 198, 26453, 5254, 329, 21015, 269, 27399, 15042, 198, 37811, 198, 198, 6738, 555, 715, 395, 1330, 6208, 20448, 198, 198, 6738, 1841, 76, 735, 1330, 7154, 15972, 735, 11, 477, 62, 8897, 3558, 198, 198, 6738, 764, 14225, 469, 133...
2.144144
4,662
#!/usr/bin/python3 # # ValidatePage.py # # This program presents an information page that can be used # to validate the correctness of information about a Bible. # It displays information about that Bible, and reports # any errors that it finds. # # This class should be in the cgi-bin directory of a website. # Where it...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 2, 198, 2, 3254, 20540, 9876, 13, 9078, 198, 2, 198, 2, 770, 1430, 10969, 281, 1321, 2443, 326, 460, 307, 973, 198, 2, 284, 26571, 262, 29409, 286, 1321, 546, 257, 9111, 13, 198, 2,...
2.625544
1,378
class GenericStringValidator(object): ''' This is an interface for create strategies for validate data '''
[ 4871, 42044, 10100, 47139, 1352, 7, 15252, 2599, 198, 220, 220, 220, 705, 7061, 770, 318, 281, 7071, 329, 2251, 10064, 329, 26571, 1366, 198, 220, 220, 220, 705, 7061, 198 ]
3.709677
31
#!/usr/bin/python # Run console version of Blast2G0 (b2g4pipe) # nohup time java -jar ~/blast2go/b2g4pipe/latest/pipeline/blast2go.jar -in blastp_nr.xml -out all_blastp_nr -prop blast2go.properties -annot -dat -v -ips interproscan/ -img -wiki ~/blast2go/b2g4pipe/latest/pipeline/wiki_arrayannot.txt > log.txt 2>&1 & i...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 2, 5660, 8624, 2196, 286, 20641, 17, 38, 15, 357, 65, 17, 70, 19, 34360, 8, 198, 198, 2, 645, 71, 929, 640, 20129, 532, 9491, 47795, 39806, 17, 2188, 14, 65, 17, 70, 19, 34360, 1...
2.644444
180
class Requirement: """A Python representation of a software requirement specification in the form of scenarios. Attributes: scenario (str): The title of the scenario. goal (str): The objective to achieve with the scenario. context (str): The prerequisites of the scenario. ac...
[ 4871, 9394, 24615, 25, 198, 220, 220, 220, 37227, 32, 11361, 10552, 286, 257, 3788, 9079, 20855, 198, 220, 220, 220, 287, 262, 1296, 286, 13858, 13, 628, 220, 220, 220, 49213, 25, 198, 220, 220, 220, 220, 220, 220, 220, 8883, 357, ...
3.010256
195
from random import Random import projectiles SCREEN_WIDTH = 512 SCREEN_HEIGHT = 740
[ 6738, 4738, 1330, 14534, 201, 198, 11748, 33281, 201, 198, 201, 198, 6173, 2200, 1677, 62, 54, 2389, 4221, 796, 22243, 201, 198, 6173, 2200, 1677, 62, 13909, 9947, 796, 767, 1821, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 20...
2.272727
44
import math
[ 11748, 10688, 198 ]
4
3
# -*- coding: utf-8 -*- """ Created on Tue Dec 02 23:17:43 2014 @author: Ehsan """ import json import os #import sys import pygame import closestpoint import pathfinder import copy LOGLEVEL = 0 LOG_GENERAL = 1 LOG_INTERSECT = 1.3 LOG_TREE = 2 LOG_GENERATE = 3 class QTree: 'Data Structure Used to Find T...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 30030, 4280, 7816, 2242, 25, 1558, 25, 3559, 1946, 198, 198, 31, 9800, 25, 412, 11994, 272, 198, 37811, 198, 11748, 33918, 198, 11748, 28686, 198...
2.016051
623
import pandas as pd from surprise import Dataset from surprise import Reader ratings_dict = { "item": [1, 2, 1, 2, 1, 2, 1, 2, 1], "user": ['A', 'A', 'B', 'B', 'C', 'C', 'D', 'D', 'E'], "rating": [1, 2, 2, 4, 2.5, 4, 4.5, 5, 3], } df = pd.DataFrame(ratings_dict) reader = Reader(rating_scale=(1, 5)) # Loa...
[ 11748, 19798, 292, 355, 279, 67, 198, 6738, 5975, 1330, 16092, 292, 316, 198, 6738, 5975, 1330, 25342, 198, 198, 10366, 654, 62, 11600, 796, 1391, 198, 220, 220, 220, 366, 9186, 1298, 685, 16, 11, 362, 11, 352, 11, 362, 11, 352, 1...
2.259259
216
import unittest import copy import os import modmesh from modmesh import D3DDECLTYPE, D3DDECLUSAGE import tests.mock_mesh as mock_mesh if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 11748, 4866, 198, 11748, 28686, 198, 198, 11748, 953, 76, 5069, 198, 6738, 953, 76, 5069, 1330, 360, 18, 16458, 2943, 43, 25216, 11, 360, 18, 16458, 2943, 43, 2937, 11879, 198, 198, 11748, 5254, 13, 76, 73...
2.247191
89
import fnmatch from conans.errors import ConanException class BuildMode(object): """ build_mode => ["*"] if user wrote "--build" => ["hello*", "bye*"] if user wrote "--build hello --build bye" => ["hello/0.1@foo/bar"] if user wrote "--build hello/0.1@foo/bar" ...
[ 11748, 24714, 15699, 198, 198, 6738, 369, 504, 13, 48277, 1330, 31634, 16922, 628, 198, 4871, 10934, 19076, 7, 15252, 2599, 198, 220, 220, 220, 37227, 1382, 62, 14171, 5218, 14631, 9, 8973, 611, 2836, 2630, 366, 438, 11249, 1, 198, 22...
2.201835
218
#Plansze try: height = int(input("Wprowadź wysokość: ")) width = int(input("Wprowadź szerokość: ")) list_of_lines = making_list(height) redirect_and_create(list_of_lines, width) except ValueError: print("Wproawdź poprawną liczbę kolumn i wierszy")
[ 2, 3646, 504, 2736, 198, 198, 28311, 25, 198, 220, 220, 220, 6001, 796, 493, 7, 15414, 7203, 54, 79, 808, 324, 129, 118, 266, 893, 16044, 129, 249, 38325, 25, 366, 4008, 198, 220, 220, 220, 9647, 796, 493, 7, 15414, 7203, 54, 79...
2.132813
128
# Copyright (c) 2019 UAVCAN Consortium # This software is distributed under the terms of the MIT License. # Author: Pavel Kirienko <pavel@uavcan.org> import sys import pickle import typing import shutil import logging import functools import importlib from pathlib import Path import pytest import pyuavcan.dsdl # Ple...
[ 2, 15069, 357, 66, 8, 13130, 471, 10116, 44565, 42727, 198, 2, 770, 3788, 318, 9387, 739, 262, 2846, 286, 262, 17168, 13789, 13, 198, 2, 6434, 25, 49612, 7385, 2013, 7204, 1279, 8957, 626, 31, 84, 615, 5171, 13, 2398, 29, 198, 198...
2.497687
1,081
import sys import os sys.path.append(os.path.dirname(__file__)) from pathplanner import Tree6Node, PathNode, Graph, RRTStar, R6Tree
[ 11748, 25064, 198, 11748, 28686, 198, 17597, 13, 6978, 13, 33295, 7, 418, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 4008, 198, 6738, 3108, 11578, 1008, 1330, 12200, 21, 19667, 11, 10644, 19667, 11, 29681, 11, 371, 14181, 8248, 11,...
2.869565
46
print(*[int(((x**2*(x**2-1))/2)-4*(x-1)*(x-2)) for x in range(1,int(input())+1)],sep='\n')
[ 4798, 46491, 58, 600, 19510, 7, 87, 1174, 17, 9, 7, 87, 1174, 17, 12, 16, 4008, 14, 17, 13219, 19, 9, 7, 87, 12, 16, 27493, 7, 87, 12, 17, 4008, 329, 2124, 287, 2837, 7, 16, 11, 600, 7, 15414, 28955, 10, 16, 8, 4357, 325, ...
1.672727
55
import asyncio from concurrent.futures import CancelledError from twisted.internet import defer
[ 11748, 30351, 952, 198, 6738, 24580, 13, 69, 315, 942, 1330, 43780, 3353, 12331, 198, 198, 6738, 19074, 13, 37675, 1330, 29135, 628 ]
4.26087
23
import pickle from model import BahdanauAttention, EncoderCNN, Decoder from vocab import Vocab_Builder import torch import torch.nn as nn import torch.optim as optim import torchvision.transforms as transforms import torch.nn.functional as F import torchvision.models as models from torch.utils.tensorboard import Summar...
[ 11748, 2298, 293, 198, 6738, 2746, 1330, 13081, 25604, 559, 8086, 1463, 11, 14711, 12342, 18474, 11, 34580, 198, 6738, 12776, 397, 1330, 47208, 397, 62, 32875, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 2...
2.871094
256
""" Computes behavioral comparisons, e.g. between weight/no-weight. @author: bartulem """ import os import sys import numpy as np import matplotlib.pyplot as plt from numba import njit from scipy.stats import sem import sessions2load import make_ratemaps @njit(parallel=False)
[ 37811, 198, 7293, 1769, 17211, 17909, 11, 304, 13, 70, 13, 1022, 3463, 14, 3919, 12, 6551, 13, 198, 31, 9800, 25, 30539, 2261, 76, 198, 37811, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 299, 32152, 355, 45941, 198, 11748, ...
3.087912
91
import collections import operator import time from ..base.message_parser_base import MessageParserBase from ...framework.utils import helper from ...framework.context import APP_CONTEXT from .rtk330l_packet_parser import ( match_command_handler, common_continuous_parser, other_output_parser) MSG_HEADER = [0x55, 0...
[ 11748, 17268, 198, 11748, 10088, 198, 11748, 640, 198, 6738, 11485, 8692, 13, 20500, 62, 48610, 62, 8692, 1330, 16000, 46677, 14881, 198, 6738, 2644, 30604, 13, 26791, 1330, 31904, 198, 6738, 2644, 30604, 13, 22866, 1330, 43504, 62, 10943...
1.886056
3,098
import argparse import json from collections import OrderedDict import os import torch from torch import nn, optim import torchvision from torchvision import transforms, datasets, models parser = argparse.ArgumentParser(description='Model Training') parser.add_argument('data_dir', type=str, help='data directory') par...
[ 11748, 1822, 29572, 198, 11748, 33918, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 11748, 28686, 198, 198, 11748, 28034, 198, 6738, 28034, 1330, 299, 77, 11, 6436, 198, 11748, 28034, 10178, 198, 6738, 28034, 10178, 1330, 31408, 11,...
2.622678
2,046
from operator import le, gt from typing import Callable, List, Mapping, Optional, Tuple import numpy as np from bartpy.errors import NoSplittableVariableException, NoPrunableNodeException from bartpy.mutation import TreeMutation, GrowMutation, PruneMutation, ChangeMutation from bartpy.node import LeafNode, DecisionNo...
[ 6738, 10088, 1330, 443, 11, 308, 83, 198, 6738, 19720, 1330, 4889, 540, 11, 7343, 11, 337, 5912, 11, 32233, 11, 309, 29291, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 30539, 9078, 13, 48277, 1330, 1400, 26568, 715, 540, ...
3.138107
782
# Keep track of the face state IDLE = 'blink' HAPPY = 'happy' SAD = 'sad' CRY = 'cry' SHOCK = 'shock' SLEEP = 'sleep' WINK = 'wink' CONFUSED = 'confused' SMIRK = 'smirk' DEAD = 'dead' ANGRY = 'angry' LAUGH = 'laugh' LOL = 'lol' BLUSH = 'blush' KISS = 'kiss' COOL = 'cool' WORRIED = '...
[ 2, 9175, 2610, 286, 262, 1986, 1181, 198, 198, 2389, 2538, 197, 197, 197, 28, 705, 2436, 676, 6, 198, 39, 24805, 56, 197, 197, 197, 28, 705, 34191, 6, 198, 50, 2885, 197, 197, 197, 197, 28, 705, 82, 324, 6, 198, 9419, 56, 197,...
1.696429
280
from misc.text import ( empty_output, repo_path, file_name, err_msg, shell_msg, not_admin, key_api, ) from telegram.ext import ConversationHandler, CommandHandler, MessageHandler, Filters from misc.invalid_msg import wrong_option from telegram import ForceReply import subprocess import threa...
[ 6738, 12747, 13, 5239, 1330, 357, 198, 220, 220, 220, 6565, 62, 22915, 11, 198, 220, 220, 220, 29924, 62, 6978, 11, 198, 220, 220, 220, 2393, 62, 3672, 11, 198, 220, 220, 220, 11454, 62, 19662, 11, 198, 220, 220, 220, 7582, 62, ...
3.121339
239
# coding: utf-8 """ ======= Presets ======= This notebook demonstrates how to use the `presets` package to change the default parameters for librosa. """ # Code source: Brian McFee # License: ISC ################################################## # We'll need numpy and matplotlib for this example from __future__ imp...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 37811, 198, 1421, 18604, 198, 25460, 1039, 198, 1421, 18604, 198, 198, 1212, 20922, 15687, 703, 284, 779, 262, 4600, 18302, 1039, 63, 5301, 284, 1487, 262, 198, 12286, 10007, 329, 9195, 4951, 64, ...
2.895264
1,098
from django.shortcuts import get_object_or_404 from cyder.base.views import cy_detail from cyder.cydhcp.interface.dynamic_intr.models import DynamicInterface
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 651, 62, 15252, 62, 273, 62, 26429, 198, 198, 6738, 3075, 1082, 13, 8692, 13, 33571, 1330, 3075, 62, 49170, 198, 6738, 3075, 1082, 13, 948, 34985, 13155, 13, 39994, 13, 67, 28995, 62, 600, ...
3.265306
49
""" Módulo responsável por ações de login e obtenção do token do usuário """ import hashlib from dotenv import load_dotenv from fastapi import APIRouter, Depends, HTTPException, Body from fastapi.security import OAuth2PasswordRequestForm, OAuth2PasswordBearer from fastapi_login.exceptions import InvalidCredentialsExcep...
[ 37811, 198, 44, 10205, 67, 43348, 2424, 6557, 626, 16964, 257, 16175, 127, 113, 274, 390, 17594, 304, 909, 1452, 16175, 28749, 466, 11241, 466, 514, 84, 6557, 27250, 198, 37811, 198, 11748, 12234, 8019, 198, 6738, 16605, 24330, 1330, 34...
2.278745
3,218
from django.core.management.base import BaseCommand from autotasks.tasks import remove_orphaned_win_tasks
[ 6738, 42625, 14208, 13, 7295, 13, 27604, 13, 8692, 1330, 7308, 21575, 198, 198, 6738, 1960, 313, 6791, 13, 83, 6791, 1330, 4781, 62, 13425, 22739, 62, 5404, 62, 83, 6791, 628 ]
3.375
32
import pymysql #database connection connection = pymysql.connect(host="localhost", user="root", passwd="", database="databaseName") cursor = connection.cursor() # queries for inserting values insert1 = "INSERT INTO Artists(NAME, TRACK) VALUES('Towang', 'Jazz' );" insert2 = "INSERT INTO Artists(NAME, TRACK) VALUES('Sa...
[ 11748, 279, 4948, 893, 13976, 198, 198, 2, 48806, 4637, 198, 38659, 796, 279, 4948, 893, 13976, 13, 8443, 7, 4774, 2625, 36750, 1600, 2836, 2625, 15763, 1600, 1208, 16993, 2625, 1600, 6831, 2625, 48806, 5376, 4943, 198, 66, 21471, 796, ...
3.062827
191
# __all__ = ['check_promotion'] from estudent.school import promotion_status # FAILED_GRADE = 1 _FAILED_GRADE = 1
[ 198, 2, 11593, 439, 834, 796, 37250, 9122, 62, 16963, 9650, 20520, 198, 198, 6738, 1556, 463, 298, 13, 14347, 1330, 12148, 62, 13376, 198, 198, 2, 9677, 4146, 1961, 62, 10761, 19266, 796, 352, 198, 62, 7708, 4146, 1961, 62, 10761, 1...
2.565217
46
from rest_framework import serializers from corehq.const import USER_DATETIME_FORMAT from custom.icds.data_management.const import DATA_MANAGEMENT_TASKS from custom.icds.data_management.models import DataManagementRequest
[ 6738, 1334, 62, 30604, 1330, 11389, 11341, 198, 198, 6738, 4755, 71, 80, 13, 9979, 1330, 1294, 1137, 62, 35, 1404, 2767, 12789, 62, 21389, 1404, 198, 6738, 2183, 13, 291, 9310, 13, 7890, 62, 27604, 13, 9979, 1330, 42865, 62, 10725, ...
3.446154
65
############################################################################### ## Tool name: Generate GTFS Route Shapes ## Step 1: Generate Shapes on Map ## Creator: Melinda Morang, Esri ## Last updated: 4 September 2019 ############################################################################### ''' This too...
[ 29113, 29113, 7804, 4242, 21017, 201, 198, 2235, 16984, 1438, 25, 2980, 378, 7963, 10652, 18956, 911, 7916, 201, 198, 2235, 5012, 352, 25, 2980, 378, 911, 7916, 319, 9347, 201, 198, 2235, 21038, 25, 5616, 22261, 3461, 648, 11, 8678, 3...
2.22338
27,930
from django.contrib import admin from .models import Worker # Register your models here. admin.site.register(Worker)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 198, 6738, 764, 27530, 1330, 35412, 198, 198, 2, 17296, 534, 4981, 994, 13, 198, 28482, 13, 15654, 13, 30238, 7, 12468, 263, 8, 198 ]
3.5
34
from annotations import auto_str @auto_str
[ 6738, 37647, 1330, 8295, 62, 2536, 628, 198, 31, 23736, 62, 2536, 198 ]
3.461538
13
from threading import Thread, Condition import time cond = Condition() MyThread1('Thread1').start() MyThread2('Thread2').start()
[ 6738, 4704, 278, 1330, 14122, 11, 24295, 198, 11748, 640, 198, 198, 17561, 796, 24295, 3419, 628, 628, 198, 3666, 16818, 16, 10786, 16818, 16, 27691, 9688, 3419, 198, 3666, 16818, 17, 10786, 16818, 17, 27691, 9688, 3419, 198 ]
3.435897
39
# Generated by Django 2.2.9 on 2020-01-16 11:24 from django.db import migrations, models import django.utils.timezone import django_extensions.db.fields.json import olympia.amo.models
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 24, 319, 12131, 12, 486, 12, 1433, 1367, 25, 1731, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, 26791, 13, 2435, 11340, 198, 11748, 4262...
2.952381
63
import queue import threading import os import compute vids_path = './videos' out = './processed' if __name__ == "__main__": main()
[ 11748, 16834, 198, 11748, 4704, 278, 198, 11748, 28686, 198, 11748, 24061, 198, 85, 2340, 62, 6978, 796, 705, 19571, 32861, 6, 198, 448, 796, 705, 19571, 14681, 276, 6, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298...
2.851064
47
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import logging from . import settings as cfg from . import tmux from .fzf import FZFFormatter logger = logging.getLogger(__name__) model = None def updateModel(): ''' steps: - reload config. - regenerate the model data - save model in `core.model` - comp...
[ 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, 18931, 198, 198, 6738, 764, 1330, 6460, 355, 30218, 70, 198, 6738, 764, 1330, 256, 76, 2821, 198, 673...
2.440449
445
import logging import click from sqlalchemy import and_, exc, select, update from banking.models import Employee, Session from banking.utils import split_name logger = logging.getLogger(__name__) @click.group(help="Employee operations") @employee.command() @click.option("--name", prompt="Employee name", ...
[ 11748, 18931, 198, 198, 11748, 3904, 198, 6738, 44161, 282, 26599, 1330, 290, 62, 11, 2859, 11, 2922, 11, 4296, 198, 198, 6738, 11754, 13, 27530, 1330, 36824, 11, 23575, 198, 6738, 11754, 13, 26791, 1330, 6626, 62, 3672, 198, 198, 640...
2.329344
2,256
#!/usr/bin/env python3 # Copyright 2018 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import unittest from unittest import mock from cros.factory.probe.functions import detachable_base if __name__ == '__main__': ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 15069, 2864, 383, 18255, 1505, 7294, 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...
3.209524
105
import pytest from awx.main.access import ( ProjectAccess, ) @pytest.mark.django_db @pytest.mark.parametrize("role", ["admin_role", "project_admin_role"])
[ 11748, 12972, 9288, 198, 198, 6738, 3253, 87, 13, 12417, 13, 15526, 1330, 357, 198, 220, 220, 220, 4935, 15457, 11, 198, 8, 628, 198, 31, 9078, 9288, 13, 4102, 13, 28241, 14208, 62, 9945, 198, 31, 9078, 9288, 13, 4102, 13, 17143, ...
2.571429
63
#! /usr/bin/env python # -*- coding: utf-8 -*- import collections from census_map_downloader.base import BaseStateDownloader, BaseStateListDownloader # Logging import logging logger = logging.getLogger(__name__) class StatePlacesDownloader(BaseStateDownloader): """ Download places for a single state. """...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 17268, 198, 6738, 21649, 62, 8899, 62, 15002, 263, 13, 8692, 1330, 7308, 9012, 10002, 263, 11, 7308, 9012, 8...
2.47861
374
import sys import requests import hashlib,json import requests host = sys.argv[1] port=sys.argv[2] username = sys.argv[3] passwd = sys.argv[4] url_login = "http://" + host + ":"+port+ "/login" url_reg= "http://"+host+":"+port+"/register" password = hashlib.md5(passwd.encode('utf8')).hexdigest() if __name__ == '__mai...
[ 11748, 25064, 198, 11748, 7007, 198, 11748, 12234, 8019, 11, 17752, 198, 11748, 7007, 198, 198, 4774, 796, 25064, 13, 853, 85, 58, 16, 60, 198, 634, 28, 17597, 13, 853, 85, 58, 17, 60, 198, 29460, 796, 25064, 13, 853, 85, 58, 18, ...
2.450704
142
# @l2g 1688 python3 # [1688] Count of Matches in Tournament # Difficulty: Easy # https://leetcode.com/problems/count-of-matches-in-tournament # # You are given an integer n, the number of teams in a tournament that has strange rules: # # If the current number of teams is even,each team gets paired with another team. # ...
[ 2, 2488, 75, 17, 70, 1467, 3459, 21015, 18, 198, 2, 685, 1433, 3459, 60, 2764, 286, 6550, 2052, 287, 9595, 198, 2, 27419, 25, 16789, 198, 2, 3740, 1378, 293, 316, 8189, 13, 785, 14, 1676, 22143, 14, 9127, 12, 1659, 12, 6759, 205...
3.064116
967
from devices.models import Device from notification.tasks import send_message from django.utils.translation import gettext as _
[ 6738, 4410, 13, 27530, 1330, 16232, 198, 6738, 14483, 13, 83, 6791, 1330, 3758, 62, 20500, 198, 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 651, 5239, 355, 4808, 628 ]
4.3
30
from ...commandModule import CommandModule import unittest import json import os class TestCaseWritingCorrectValuesToPIGOFile(unittest.TestCase): """ Test Case: Correct values written to PIGO file results in pass Methods to test: - set_gps_coordintes - set_ground_commands - set_gimbal_commands - set...
[ 6738, 2644, 21812, 26796, 1330, 9455, 26796, 198, 11748, 555, 715, 395, 198, 11748, 33918, 198, 11748, 28686, 198, 198, 4871, 6208, 20448, 33874, 42779, 40161, 2514, 47, 3528, 46, 8979, 7, 403, 715, 395, 13, 14402, 20448, 2599, 198, 220...
2.847826
138
import numpy as np import pylab as plt import matplotlib.cm as cm npzfile = np.load('output_sinc.npz') mx = npzfile['mx'] my = npzfile['my'] mz = npzfile['mz'] tsim = npzfile['tsim'] mx -= np.average(mx) my -= np.average(my) mz -= np.average(mz) spx = [] spy = [] spz = [] for i in range(mx.shape[0]): for j in r...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 279, 2645, 397, 355, 458, 83, 198, 11748, 2603, 29487, 8019, 13, 11215, 355, 12067, 198, 198, 37659, 89, 7753, 796, 45941, 13, 2220, 10786, 22915, 62, 82, 1939, 13, 37659, 89, 11537, 198, 368...
1.793763
994
"""Install docs.""" import os import argparse import shutil from docknv.utils.prompt import prompt_yes_no from docknv.logger import Logger html_docs = os.path.join("_build", "html") parser = argparse.ArgumentParser(description="install documentation to path") parser.add_argument("output_path") args = parser.parse_...
[ 37811, 15798, 34165, 526, 15931, 198, 198, 11748, 28686, 198, 11748, 1822, 29572, 198, 11748, 4423, 346, 198, 198, 6738, 23423, 48005, 13, 26791, 13, 16963, 457, 1330, 6152, 62, 8505, 62, 3919, 198, 6738, 23423, 48005, 13, 6404, 1362, 1...
2.73064
297
import torch import torchvision import torch.nn as nn import numpy as np import torch.utils.data as data import torchvision.transforms as transforms import torchvision.datasets as dsets from torch.autograd import Variable #========================== Table of Contents ==========================# # 1. Basic autograd e...
[ 11748, 28034, 220, 198, 11748, 28034, 10178, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 13, 26791, 13, 7890, 355, 1366, 198, 11748, 28034, 10178, 13, 7645, 23914, 355, 31408, 198, ...
2.56996
1,751
# -*- encoding: utf-8 -*- """ tests.vdr.eventing module """ import pytest from keri.app import habbing, keeping from keri.core import coring from keri.core import eventing as keventing from keri.core.coring import Versify, Serials, Ilks, MtrDex, Prefixer, Serder, Signer, Seqner from keri.db import basing from keri.db...
[ 2, 532, 9, 12, 21004, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41989, 13, 85, 7109, 13, 15596, 278, 8265, 198, 198, 37811, 198, 11748, 12972, 9288, 198, 198, 6738, 479, 33442, 13, 1324, 1330, 387, 65, 4623, 11, 5291, 1...
1.515125
7,868
from .TwoPhotonSeries import TwoPhotonSeries
[ 6738, 764, 7571, 2725, 18970, 27996, 1330, 4930, 2725, 18970, 27996 ]
4
11
# mengimport package pyTelegramBotAPI import telebot # inisialisasi Token Bot Kita bot = telebot.TeleBot('TOKENBOT') # Menghandle Pesan /start @bot.message_handler(commands=['start']) # Menghandle Pesan hai @bot.message_handler(regexp='hai') print('bot running!!!') bot.polling()
[ 2, 1450, 70, 11748, 5301, 12972, 6767, 30536, 20630, 17614, 198, 11748, 5735, 13645, 198, 198, 2, 287, 271, 498, 271, 17053, 29130, 18579, 509, 5350, 198, 13645, 796, 5735, 13645, 13, 31709, 20630, 10786, 10468, 43959, 33, 2394, 11537, ...
2.679245
106
# -*- coding: utf-8 -*- """ Script Name: Author: Do Trinh/Jimmy - 3D artist. Description: """ # ------------------------------------------------------------------------------------------------------------- """ Import """ # Python from math import ceil from .SplashProperty ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 198, 7391, 6530, 25, 220, 198, 13838, 25, 2141, 33822, 71, 14, 40335, 532, 513, 35, 6802, 13, 198, 198, 11828, 25, 628, 198, 37811, 198, 2, 16529, 3880, ...
3.551282
156
import unittest import importlib pairings = importlib.import_module('maximal-pairing-of-integers') if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 11748, 1330, 8019, 198, 24874, 654, 796, 1330, 8019, 13, 11748, 62, 21412, 10786, 9806, 4402, 12, 24874, 278, 12, 1659, 12, 18908, 364, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 22...
2.205128
78
import sqlparse import time import sys import multiprocessing import random import config from PredicateLock import PredicateLock
[ 11748, 44161, 29572, 198, 11748, 640, 198, 11748, 25064, 198, 11748, 18540, 305, 919, 278, 198, 11748, 4738, 198, 198, 11748, 4566, 198, 6738, 14322, 5344, 25392, 1330, 14322, 5344, 25392, 628 ]
4.125
32
from pyspark import SparkConf, SparkContext print("Starting Computation!!\n") conf = SparkConf().setMaster("local").setAppName("RatingsHistogram") sc = SparkContext(conf = conf) lines = sc.textFile("file:///spark_course/ml-100k/u.data") ratings = lines.map(lambda x: x.split()[2]) result = ratings.countByValue() ...
[ 6738, 279, 893, 20928, 1330, 17732, 18546, 11, 17732, 21947, 198, 198, 4798, 7203, 22851, 22476, 341, 3228, 59, 77, 4943, 198, 198, 10414, 796, 17732, 18546, 22446, 2617, 18254, 7203, 12001, 11074, 2617, 4677, 5376, 7203, 29665, 654, 1374...
2.920732
164
# -*- coding: utf-8 -*- """ 将beep谱(频率、持续时间)转换为循环次数 """ import json # 晶振频率(Hz) CRYSTAL_FREQUENCY = 11059200 # 计数周期(机器周期)(s) COUNT_PERIOD = 1 / (CRYSTAL_FREQUENCY / 12) # 一次循环几个机器周期,通过定时器实验得到 COUNT_PER_LOOP = 38 # 一次循环时间(ms) MS_PER_LOOP = COUNT_PERIOD * 1000 * COUNT_PER_LOOP if __name__ == '__main__': main()
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 49546, 1350, 538, 164, 108, 109, 171, 120, 230, 165, 95, 239, 163, 236, 229, 23513, 162, 234, 223, 163, 119, 255, 33768, 114, 29785, 112, 171, 120, 231, ...
1.164835
273
import os _lab_components = """from api2db.ingest import * CACHE=True # Caches API data so that only a single API call is made if True def import_target(): return None def pre_process(): return None def data_features(): return None def post_process(): return None if __name__ == "__main__": ...
[ 11748, 28686, 198, 198, 62, 23912, 62, 5589, 3906, 796, 37227, 6738, 40391, 17, 9945, 13, 278, 395, 1330, 1635, 198, 34, 2246, 13909, 28, 17821, 220, 220, 220, 220, 220, 1303, 327, 3694, 7824, 1366, 523, 326, 691, 257, 2060, 7824, 8...
1.565651
1,805
import numpy as np import scipy.misc import torch def logsumexp(values, dim=0, keepdim=False): """Logsumexp of a Tensor/Variable. See https://en.wikipedia.org/wiki/LogSumExp. input: values: Tensor/Variable [dim_1, ..., dim_N] dim: n output: result Tensor/Variable [dim_1, ......
[ 11748, 299, 32152, 355, 45941, 198, 11748, 629, 541, 88, 13, 44374, 198, 11748, 28034, 628, 198, 4299, 2604, 16345, 11201, 7, 27160, 11, 5391, 28, 15, 11, 1394, 27740, 28, 25101, 2599, 198, 220, 220, 220, 37227, 11187, 16345, 11201, 2...
2.1678
882