content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
# -*- coding: utf-8 -*- """HydraTK core event handling implementation class .. module:: core.eventhandler :platform: Unix :synopsis: HydraTK core event handling implementation class .. moduleauthor:: Petr Czaderna <pc@hydratk.org> """ from hydratk.core import hsignal
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 40436, 430, 51, 42, 4755, 1785, 9041, 7822, 1398, 198, 198, 492, 8265, 3712, 4755, 13, 15596, 30281, 198, 220, 220, 1058, 24254, 25, 33501, 198, 220, 220, 1058, ...
3.021739
92
" Charon: Context handler for saving an entity. " import logging import couchdb from . import constants from . import utils
[ 1, 3178, 261, 25, 30532, 21360, 329, 8914, 281, 9312, 13, 366, 198, 198, 11748, 18931, 198, 198, 11748, 18507, 9945, 198, 198, 6738, 764, 1330, 38491, 198, 6738, 764, 1330, 3384, 4487, 628, 628, 628, 628, 628 ]
3.578947
38
from django.contrib.auth import get_user_model from django.urls import reverse from django.test import TestCase from rest_framework import status from rest_framework.test import APIClient from core.models import PortfolioItem from projects.serializers import PortfolioItemSerializer PORTFOLIO_URL = reverse('project...
[ 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 651, 62, 7220, 62, 19849, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 198, 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 198, 6738, 1334, 62, 30604, 1330, 3722, 198, 6...
3.486111
144
# -*- coding: utf-8 -*- """ Created on: Sun May 21 05:09:40 2017 Author: Waldu Woensdregt Description: Code uses OpenWPM package to extract HTTPS responses from selected set of URLs (defined in GetListOfSiteURLsToExtract) and then splits the resulting data into individual ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 25, 220, 220, 220, 220, 3825, 1737, 2310, 8870, 25, 2931, 25, 1821, 2177, 198, 13838, 25, 220, 220, 220, 220, 220, 220, 220, 220, 6445, 646, ...
2.846479
710
import pandas as pd import datetime import geopandas as gpd import os from tqdm import tqdm from shapely import wkt from config import config import trackintel as ti def generate_Location(df, epsilon, user): """Cluster staypoints to locations, with different parameters and distinguish 'user' and 'dataset'""" ...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 4818, 8079, 198, 11748, 30324, 392, 292, 355, 27809, 67, 198, 11748, 28686, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 6738, 5485, 306, 1330, 266, 21841, 628, 198, 6738, 4566, 13...
2.376284
1,071
from EVBUS import EVBUS from sklearn.datasets import load_boston import sklearn.model_selection as xval boston = load_boston() Y = boston.data[:, 12] X = boston.data[:, 0:12] bos_X_train, bos_X_test, bos_y_train, bos_y_test = xval.train_test_split(X, Y, test_size=0.3) evbus = EVBUS.varU(bos_X_train, bos_y_train, bos_...
[ 6738, 8696, 45346, 1330, 8696, 45346, 198, 6738, 1341, 35720, 13, 19608, 292, 1039, 1330, 3440, 62, 65, 5744, 198, 11748, 1341, 35720, 13, 19849, 62, 49283, 355, 2124, 2100, 198, 198, 65, 5744, 796, 3440, 62, 65, 5744, 3419, 198, 56, ...
2.320755
159
from __future__ import absolute_import from __future__ import unicode_literals from django.contrib.auth import get_user_model from django.core.urlresolvers import reverse from django.test import TestCase from django.utils.translation import ugettext as _ from bazaar.listings.models import Listing from rest_framework...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 651, 62, 7220, 62, 19849, 198, 6738, 42625, 14208, 13, 7295, ...
3.782609
115
import json import requests from bs4 import BeautifulSoup PAGE_URL = 'https://olympics.com/tokyo-2020/olympic-games/en/results/all-sports/medal-standings.htm'
[ 11748, 33918, 198, 11748, 7007, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 198, 4537, 8264, 62, 21886, 796, 705, 5450, 1378, 3366, 3149, 873, 13, 785, 14, 83, 482, 8226, 12, 42334, 14, 3366, 3149, 291, 12, 19966, 14, 268, ...
2.711864
59
import queue import json import logging import threading from crawlers.core.flags import FLAGS
[ 11748, 16834, 198, 11748, 33918, 198, 11748, 18931, 198, 11748, 4704, 278, 198, 6738, 27784, 8116, 13, 7295, 13, 33152, 1330, 9977, 4760, 50, 628, 628, 198 ]
3.666667
27
from .sophie import SophieAI
[ 6738, 764, 82, 2522, 494, 1330, 35331, 20185, 628 ]
3.333333
9
#!/usr/bin/env python2.7 # # Take various CSV inputs and produce a read-to-import conference schedule. import pandas as pd from datetime import date if __name__ == '__main__': main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 17, 13, 22, 198, 2, 198, 2, 7214, 2972, 44189, 17311, 290, 4439, 257, 1100, 12, 1462, 12, 11748, 4495, 7269, 13, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 4818, 8079, 1330, ...
3
63
NUM_ROWS = 128 NUM_COLS = 8 """ Cool solution: https://github.com/tymofij/advent-of-code-2020/blob/master/05/seats.py Cool solution using str.translate: def seat_id(s, t=str.maketrans("FBLR", "0101")): return int(s.translate(t), 2) def max_seat_id(boarding_passes): return max(map(seat_id,...
[ 41359, 62, 49, 22845, 796, 13108, 198, 41359, 62, 25154, 50, 796, 807, 198, 198, 37811, 198, 34530, 4610, 25, 198, 220, 220, 220, 3740, 1378, 12567, 13, 785, 14, 774, 76, 1659, 2926, 14, 324, 1151, 12, 1659, 12, 8189, 12, 42334, 1...
2.211039
308
import os import cv2 import numpy as np import re path_regex = re.compile('^.+?/(.*)') imdir = '../Marsh_Images_BH/Row1_1_2748to2797' outdir = './image_resize_BH' for (dirpath, dirname, files) in os.walk(imdir, topdown='True'): for name in files: fullpath = os.path.join(dirpath,name) print(name) ...
[ 11748, 28686, 198, 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 302, 198, 198, 6978, 62, 260, 25636, 796, 302, 13, 5589, 576, 10786, 61, 13, 10, 30, 29006, 15885, 8, 11537, 628, 198, 320, 15908, 796, 705, 4072...
1.997423
388
from distutils.core import setup, Extension from numpy.distutils.misc_util import get_numpy_include_dirs setup(ext_modules=[Extension("arc_c_extensions", ["arc_c_extensions.c"], extra_compile_args = ['-Wall', '-O3'], include_dirs=get_numpy_include_dirs())])
[ 6738, 1233, 26791, 13, 7295, 1330, 9058, 11, 27995, 198, 6738, 299, 32152, 13, 17080, 26791, 13, 44374, 62, 22602, 1330, 651, 62, 77, 32152, 62, 17256, 62, 15908, 82, 198, 198, 40406, 7, 2302, 62, 18170, 41888, 11627, 3004, 7203, 5605...
2.314961
127
import sys import os import ttk import Tkinter as tk import tkMessageBox from ttkHyperlinkLabel import HyperlinkLabel from config import applongname, appversion import myNotebook as nb import json import requests import zlib import re import webbrowser this = sys.modules[__name__] this.apiURL = "http://factiongist.her...
[ 11748, 25064, 198, 11748, 28686, 198, 11748, 256, 30488, 198, 11748, 309, 74, 3849, 355, 256, 74, 198, 11748, 256, 74, 12837, 14253, 198, 6738, 256, 30488, 38197, 8726, 33986, 1330, 15079, 8726, 33986, 198, 6738, 4566, 1330, 3680, 506, ...
2.671795
390
import os from logging import getLogger from django.core.exceptions import ValidationError from django.db import models, transaction from django.template.defaultfilters import filesizeformat, pluralize from django.urls import reverse from django.utils import timezone from django.utils.translation import gettext_lazy a...
[ 11748, 28686, 198, 6738, 18931, 1330, 651, 11187, 1362, 198, 198, 6738, 42625, 14208, 13, 7295, 13, 1069, 11755, 1330, 3254, 24765, 12331, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 11, 8611, 198, 6738, 42625, 14208, 13, 28243, 13, ...
2.940722
388
# Operadores de identidade # serve para compara objetos no somente se eles sao iguais , mas sim se estao no mesmo local de memoria(na mesma variavel) x = ["apple", "banana"] y = ["apple", "banana"] z = x print(x is z) print(x is y) print(x == y) print(x is not z) print(x is not y) print(x != y)
[ 198, 2, 6564, 324, 2850, 390, 1852, 312, 671, 198, 2, 4691, 31215, 552, 3301, 26181, 316, 418, 645, 3870, 21872, 384, 304, 829, 473, 78, 45329, 6413, 271, 837, 12422, 985, 384, 1556, 5488, 645, 18842, 5908, 1957, 390, 1066, 7661, 7,...
2.459016
122
WINDOW_SIZE = 8000 KMER_SIZE = 6 UPPER_THRESHOLD = 0.75 LOWER_THRESHOLD = 0.5 TUNE_METRIC = 1000 MINIMUM_GI_SIZE = 10000
[ 28929, 3913, 62, 33489, 796, 38055, 198, 42, 29296, 62, 33489, 796, 718, 198, 8577, 18973, 62, 4221, 19535, 39, 15173, 796, 657, 13, 2425, 198, 43, 36048, 62, 4221, 19535, 39, 15173, 796, 657, 13, 20, 198, 51, 41884, 62, 47123, 4113...
2.160714
56
import moeda n = float(input('Digite o preo: R$')) print (f'O dobro de {moeda.moeda(n)} {moeda.dobro(n, True)}') print (f'A metade de {moeda.moeda(n)} {moeda.metade(n, True)}') print (f'O aumento de 10% de {moeda.moeda(n)} {moeda.aumento(n, 10, True)}') print (f'O desconto de 13% de {moeda.moeda(n)} {moeda.descont...
[ 11748, 6941, 18082, 198, 198, 77, 796, 12178, 7, 15414, 10786, 19511, 578, 267, 662, 78, 25, 371, 3, 6, 4008, 198, 4798, 357, 69, 6, 46, 466, 7957, 390, 1391, 5908, 18082, 13, 5908, 18082, 7, 77, 38165, 220, 1391, 5908, 18082, 13,...
2.1125
160
import vi.csp import collections import operator BacktrackStatistics = collections.namedtuple( 'BacktrackStatistics', ['calls', 'failures'])
[ 11748, 25357, 13, 66, 2777, 198, 198, 11748, 17268, 198, 11748, 10088, 198, 198, 7282, 11659, 48346, 796, 17268, 13, 13190, 83, 29291, 7, 198, 220, 220, 220, 705, 7282, 11659, 48346, 3256, 37250, 66, 5691, 3256, 705, 32165, 942, 6, 12...
3.418605
43
#! env python # coding: utf-8 # k-means import os import time import sys import cv2 from sklearn.cluster import KMeans from sklearn.decomposition import PCA from sklearn.externals import joblib if __name__ == '__main__': main()
[ 2, 0, 17365, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 2, 479, 12, 1326, 504, 198, 11748, 28686, 198, 11748, 640, 198, 11748, 25064, 198, 198, 11748, 269, 85, 17, 198, 6738, 1341, 35720, 13, 565, 5819, 1330, 509, 5308, 504,...
2.744186
86
import torch from torch.utils.data import Dataset import json import numpy as np import os from PIL import Image, ImageFilter from torchvision import transforms as T from models.camera import Camera from tqdm import tqdm from .ray_utils import *
[ 11748, 28034, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 16092, 292, 316, 198, 11748, 33918, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 6738, 350, 4146, 1330, 7412, 11, 7412, 22417, 198, 6738, 28034, 10178, 1330, 31408,...
3.671642
67
# # PySNMP MIB module RBN-ICR-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/RBN-ICR-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 20:44:25 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 0...
[ 2, 198, 2, 9485, 15571, 7378, 337, 9865, 8265, 371, 15766, 12, 2149, 49, 12, 8895, 33, 357, 4023, 1378, 16184, 76, 489, 8937, 13, 785, 14, 79, 893, 11632, 8, 198, 2, 7054, 45, 13, 16, 2723, 2393, 1378, 14, 14490, 14, 67, 615, ...
2.40638
4,326
#!/usr/bin/env python # coding: utf-8 # In[93]: import os from shutil import copyfile import json print("cwd = ", os.getcwd()) current_folder = os.getcwd() #extracted_train_data = os.path.join(current_folder, "extracted_train_data") extracted_train_data = "/dataset/training/" #annotations_dir = '/data/annotations'...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 554, 58, 6052, 5974, 628, 198, 11748, 28686, 198, 6738, 4423, 346, 1330, 4866, 7753, 198, 11748, 33918, 198, 198, 4798, 7203, 66, 16993, ...
2.228388
4,199
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'second_childwin.ui' # # Created by: PyQt5 UI code generator 5.15.0 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. from PyQt5 i...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 201, 198, 2, 5178, 7822, 7560, 422, 3555, 334, 72, 2393, 705, 12227, 62, 9410, 5404, 13, 9019, 6, 201, 198, 2, 201, 198, 2, 15622, 416, 25, 9485, 48, 83, 20, ...
2.809524
126
import os import matplotlib.pyplot as plt import numpy as np from models import models_util DIFFICULTY_LABEL = "Star Difficulty" BPM_LABEL = "BPM" LENGTH_LABEL = "Length" CS_LABEL = "Circle Size" DRAIN_LABEL = "HP Drain" ACCURACY_LABEL = "Accuracy" AR_LABEL = "Approach Rate" SAVE_FOLDER = "visualization/" # Data r...
[ 11748, 28686, 198, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 4981, 1330, 4981, 62, 22602, 198, 198, 35, 29267, 2149, 6239, 9936, 62, 48780, 3698, 796, 366, 8248, ...
2.475358
629
import unittest from unittest.mock import * from src.zad02.main import Subscriber
[ 11748, 555, 715, 395, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 1635, 198, 198, 6738, 12351, 13, 89, 324, 2999, 13, 12417, 1330, 3834, 1416, 24735, 628 ]
2.896552
29
# import some common libraries # import some common detectron2 utilities from detectron2.config import get_cfg from detectron2.data import ( build_detection_test_loader, build_detection_train_loader, ) from detectron2.engine import default_argument_parser, default_setup, launch, DefaultTrainer # import ADE ...
[ 2, 1330, 617, 2219, 12782, 198, 198, 2, 1330, 617, 2219, 4886, 1313, 17, 20081, 198, 6738, 4886, 1313, 17, 13, 11250, 1330, 651, 62, 37581, 198, 6738, 4886, 1313, 17, 13, 7890, 1330, 357, 198, 220, 220, 220, 1382, 62, 15255, 3213, ...
2.635438
491
# OpenWeatherMap API Key weather_api_key = "3796d9507516315ec2ebdc39473cc6ea" # Google API Key g_key = "AIzaSyDQ3DTH86ntlGML7QCVhKWSocZX8Cb4yBA"
[ 2, 4946, 41865, 13912, 7824, 7383, 198, 23563, 62, 15042, 62, 2539, 796, 366, 2718, 4846, 67, 31027, 2425, 24136, 1314, 721, 17, 1765, 17896, 2670, 37804, 535, 21, 18213, 1, 198, 198, 2, 3012, 7824, 7383, 198, 70, 62, 2539, 796, 366...
2.027778
72
PERMISSION_DENIED_MESSAGE: str = "***PERMISSION DENIED!*** \n" \ "You are not permitted to use this command. \n" \ "Please contact to your server master. \n." ERROR_OCCURRED_MESSAGE: str = "***ERROR OCCURRED!*** \n" \ "Error has occu...
[ 18973, 44, 40373, 62, 41819, 19767, 62, 44, 1546, 4090, 8264, 25, 965, 796, 366, 8162, 18973, 44, 40373, 37692, 19767, 0, 8162, 3467, 77, 1, 3467, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220...
1.95857
1,231
from pydicom.sr import _snomed_dict import os import re import pydicom.sr._snomed_dict folder = "E:\\work\\QIICR\\dcmqi" Out_Folder = "E:\\work\\QIICR\\renamed_dcmqi" dict = _snomed_dict.mapping["SCT"] details = [] # recursive_file_find(folder, all_files, "(.*\\.cpp$)|(.*\\.h$)|(.*\\.json$)") all_files = rec...
[ 6738, 279, 5173, 291, 296, 13, 27891, 1330, 4808, 16184, 12657, 62, 11600, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 279, 5173, 291, 296, 13, 27891, 13557, 16184, 12657, 62, 11600, 198, 198, 43551, 796, 366, 36, 25, 6852, 1818, ...
2.274008
781
# coding=utf-8 # Copyright 2018 The DisentanglementLib 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 # # Un...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 2864, 383, 3167, 298, 648, 1732, 25835, 46665, 13, 220, 1439, 2489, 10395, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2...
2.48608
3,125
# Created by Chenye Yang, Haokai Zhao, Zhuoyue Xing on 2019/10/13. # Copyright 2019 Chenye Yang, Haokai Zhao, Zhuoyue Xing . All rights reserved. from machine import Pin, I2C, RTC, Timer import socket import ssd1306 import time import network import urequests import json # ESP8266 connects to a router # Get Current...
[ 2, 15622, 416, 12555, 5948, 10998, 11, 9398, 482, 1872, 29436, 11, 33144, 726, 518, 1395, 278, 319, 13130, 14, 940, 14, 1485, 13, 198, 2, 15069, 220, 13130, 12555, 5948, 10998, 11, 9398, 482, 1872, 29436, 11, 33144, 726, 518, 1395, ...
2.883191
351
# ____ _ __ _ _ # # / ___|| | ___ _ / _| __ _| | | ___ _ __ # # \___ \| |/ / | | | |_ / _` | | |/ _ \ '_ \ # # ___) | <| |_| | _| (_| | | | __/ | | |# # |____/|_|\_\\__, |_| \__,_|_|_|\___|_| |_|# # |___/ ######### # ____ ____ ...
[ 2, 220, 220, 1427, 220, 4808, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 11593, 220, 220, 220, 220, 220, 220, 4808, 4808, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 198, 2, 1220, 46444, 15886, 930, 46444, ...
1.667149
691
from rdflib import Namespace, XSD from rdflib.namespace import DC, DCTERMS FHIRCAT_CORD = Namespace("http://fhircat.org/cord-19/") SSO = Namespace("http://semanticscholar.org/cv-research/") DOI = Namespace("https://doi.org/") PUBMED = Namespace("https://www.ncbi.nlm.nih.gov/pubmed/") PMC = Namespace("https://www.ncbi....
[ 6738, 374, 67, 2704, 571, 1330, 28531, 10223, 11, 1395, 10305, 198, 6738, 374, 67, 2704, 571, 13, 14933, 10223, 1330, 6257, 11, 360, 4177, 1137, 5653, 198, 198, 44602, 49060, 1404, 62, 34, 12532, 796, 28531, 10223, 7203, 4023, 1378, 6...
2.461957
184
import sys import os import argparse from types import MethodType from importlib import import_module from argparse import RawTextHelpFormatter # Note: this applies to all options, might not always be what we want... from pbutils.configs import get_config, get_config_from_data, to_dict, inject_opts, CP from .strings ...
[ 11748, 25064, 198, 11748, 28686, 198, 11748, 1822, 29572, 198, 6738, 3858, 1330, 11789, 6030, 198, 6738, 1330, 8019, 1330, 1330, 62, 21412, 198, 6738, 1822, 29572, 1330, 16089, 8206, 22087, 8479, 1436, 220, 1303, 5740, 25, 428, 8991, 284,...
2.454082
1,568
#!/usr/bin/env python3 import json from django.core.management.base import BaseCommand from api.models import User
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 33918, 198, 198, 6738, 42625, 14208, 13, 7295, 13, 27604, 13, 8692, 1330, 7308, 21575, 198, 198, 6738, 40391, 13, 27530, 1330, 11787, 628 ]
3.371429
35
import pytest from common import SCHEMAS_PATH, assert_yaml_header_and_footer, load_yaml from jsonschema import ValidationError
[ 11748, 12972, 9288, 198, 6738, 2219, 1330, 22374, 3620, 1921, 62, 34219, 11, 6818, 62, 88, 43695, 62, 25677, 62, 392, 62, 5898, 263, 11, 3440, 62, 88, 43695, 198, 6738, 44804, 684, 2395, 2611, 1330, 3254, 24765, 12331, 628, 198 ]
3.146341
41
import tensorflow as tf from retinanet.dataloader.anchor_generator import AnchorBoxGenerator from retinanet.dataloader.preprocessing_pipeline import PreprocessingPipeline from retinanet.dataloader.utils import compute_iou
[ 11748, 11192, 273, 11125, 355, 48700, 198, 198, 6738, 1005, 259, 272, 316, 13, 67, 10254, 1170, 263, 13, 3702, 273, 62, 8612, 1352, 1330, 29253, 273, 14253, 8645, 1352, 198, 6738, 1005, 259, 272, 316, 13, 67, 10254, 1170, 263, 13, 3...
3.068493
73
import unittest from model import Cell, Module, OutputType, CellType, Mux import random if __name__ == "__main__": unittest.main()
[ 11748, 555, 715, 395, 198, 6738, 2746, 1330, 12440, 11, 19937, 11, 25235, 6030, 11, 12440, 6030, 11, 337, 2821, 198, 11748, 4738, 220, 628, 198, 220, 220, 220, 220, 628, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 8...
2.754717
53
"""Test the smarttub config flow.""" from unittest.mock import patch from smarttub import LoginFailed from homeassistant import config_entries, data_entry_flow from homeassistant.components.smarttub.const import DOMAIN from homeassistant.const import CONF_EMAIL, CONF_PASSWORD from tests.common import MockConfigEntry...
[ 37811, 14402, 262, 4451, 37995, 4566, 5202, 526, 15931, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 8529, 198, 198, 6738, 4451, 37995, 1330, 23093, 37, 6255, 198, 198, 6738, 1363, 562, 10167, 1330, 4566, 62, 298, 1678, 11, 1366, 62, ...
3.457447
94
v1 = [1, 2, 3] v2 = [1, 2] try: with DefenerVector(v1) as dv: for i in range(len(dv)): dv[i] += v2[i] except Exception as e: print(e) print(v1)
[ 198, 85, 16, 796, 685, 16, 11, 362, 11, 513, 60, 198, 85, 17, 796, 685, 16, 11, 362, 60, 198, 28311, 25, 198, 220, 220, 220, 351, 2896, 877, 38469, 7, 85, 16, 8, 355, 288, 85, 25, 198, 220, 220, 220, 220, 220, 220, 220, 32...
1.70297
101
# Generated by Django 2.2.17 on 2021-01-10 12:35 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 1558, 319, 33448, 12, 486, 12, 940, 1105, 25, 2327, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628, 628 ]
2.774194
31
# built in libraries import unittest.mock from tempfile import TemporaryDirectory from os.path import join # tamcolors libraries from tamcolors.utils import identifier
[ 2, 3170, 287, 12782, 198, 11748, 555, 715, 395, 13, 76, 735, 198, 6738, 20218, 7753, 1330, 46042, 43055, 198, 6738, 28686, 13, 6978, 1330, 4654, 628, 198, 2, 21885, 4033, 669, 12782, 198, 6738, 21885, 4033, 669, 13, 26791, 1330, 27421...
3.976744
43
# start importing some modules # importing OpenCV import cv2 # using this module , we can process images and videos to identify objects, faces, or even handwriting of a human. # importing NumPy import numpy as np # NumPy is usually imported under the np alias. NumPy is a Python library used for working with arrays. I...
[ 2, 923, 33332, 617, 13103, 198, 198, 2, 33332, 4946, 33538, 198, 11748, 269, 85, 17, 198, 2, 1262, 428, 8265, 837, 356, 460, 1429, 4263, 290, 5861, 284, 5911, 5563, 11, 6698, 11, 393, 772, 44396, 286, 257, 1692, 13, 198, 198, 2, ...
3.231555
881
__version_info__ = ('0', '1', '1') __version__ = '.'.join(__version_info__) from keyvalues.keyvalues import KeyValues
[ 834, 9641, 62, 10951, 834, 796, 19203, 15, 3256, 705, 16, 3256, 705, 16, 11537, 198, 834, 9641, 834, 796, 705, 2637, 13, 22179, 7, 834, 9641, 62, 10951, 834, 8, 198, 198, 6738, 1994, 27160, 13, 2539, 27160, 1330, 7383, 40161, 198 ]
2.767442
43
from collections import deque from itertools import islice from .base import RollingObject
[ 6738, 17268, 1330, 390, 4188, 198, 6738, 340, 861, 10141, 1330, 318, 75, 501, 198, 198, 6738, 764, 8692, 1330, 21567, 10267, 628 ]
4.043478
23
from typing import List from discord import Role, Color, role from ..bunkbot import BunkBot from ..channel.channel_service import ChannelService from ..core.bunk_user import BunkUser from ..core.service import Service from ..db.database_service import DatabaseService
[ 6738, 19720, 1330, 7343, 201, 198, 6738, 36446, 1330, 20934, 11, 5315, 11, 2597, 201, 198, 201, 198, 6738, 11485, 65, 2954, 13645, 1330, 347, 2954, 20630, 201, 198, 6738, 11485, 17620, 13, 17620, 62, 15271, 1330, 11102, 16177, 201, 198,...
3.644737
76
from __future__ import annotations import abc import enum import pathlib import typing as t
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 11748, 450, 66, 198, 11748, 33829, 198, 11748, 3108, 8019, 198, 11748, 19720, 355, 256, 628, 198 ]
3.8
25
#python 3 from concurrent.futures import ThreadPoolExecutor import threading import random if __name__ == '__main__': main()
[ 2, 29412, 513, 198, 6738, 24580, 13, 69, 315, 942, 1330, 14122, 27201, 23002, 38409, 198, 11748, 4704, 278, 198, 11748, 4738, 198, 197, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419 ]
3.170732
41
from buildbot.buildslave import BuildSlave from buildbot.schedulers.basic import SingleBranchScheduler from buildbot.changes import filter from buildbot.config import BuilderConfig from buildbot.schedulers.forcesched import * from poclfactory import createPoclFactory # overrride the 'sample_slave' with a descriptive ...
[ 6738, 1382, 13645, 13, 11249, 36341, 1330, 10934, 11122, 1015, 198, 6738, 1382, 13645, 13, 1416, 704, 377, 364, 13, 35487, 220, 1330, 14206, 33, 25642, 50, 1740, 18173, 198, 6738, 1382, 13645, 13, 36653, 1330, 8106, 198, 6738, 1382, 136...
3.479167
192
from flask import Flask, url_for, request, session, abort import os import re import base64 pqr = Flask(__name__) # Determines the destination of the build. Only usefull if you're using # Frozen-Flask pqr.config['FREEZER_DESTINATION'] = os.path.dirname(os.path.abspath(__file__)) + '/../build' # Function to easily f...
[ 6738, 42903, 1330, 46947, 11, 19016, 62, 1640, 11, 2581, 11, 6246, 11, 15614, 198, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 2779, 2414, 198, 198, 79, 80, 81, 796, 46947, 7, 834, 3672, 834, 8, 198, 198, 2, 360, 13221, 274, 2...
3.444976
418
import json from urllib import request
[ 11748, 33918, 198, 6738, 2956, 297, 571, 1330, 2581, 628 ]
4
10
import collections.abc from typing import Union, Sequence, Optional from .primitives import Number from .units import Unit, UnitTypes _Value = Union[Unit, Number, float, int]
[ 11748, 17268, 13, 39305, 198, 6738, 19720, 1330, 4479, 11, 45835, 11, 32233, 198, 198, 6738, 764, 19795, 20288, 1330, 7913, 198, 6738, 764, 41667, 1330, 11801, 11, 11801, 31431, 628, 198, 62, 11395, 796, 4479, 58, 26453, 11, 7913, 11, ...
3.851064
47
from .binio import from_dword from .opcodes import Reg, mov_reg_imm, mov_acc_mem, mov_rm_reg, x0f_movups, Prefix
[ 6738, 764, 8800, 952, 1330, 422, 62, 67, 4775, 198, 6738, 764, 404, 40148, 1330, 3310, 11, 1409, 62, 2301, 62, 8608, 11, 1409, 62, 4134, 62, 11883, 11, 1409, 62, 26224, 62, 2301, 11, 2124, 15, 69, 62, 76, 709, 4739, 11, 3771, 13...
2.446809
47
from tests.testcase import TestCase from edmunds.database.db import db, mapper, relationship, backref from sqlalchemy.orm import mapper as sqlalchemy_mapper, relationship as sqlalchemy_relationship, backref as sqlalchemy_backref from edmunds.database.databasemanager import DatabaseManager from werkzeug.local import Lo...
[ 198, 6738, 5254, 13, 9288, 7442, 1330, 6208, 20448, 198, 6738, 1225, 20125, 82, 13, 48806, 13, 9945, 1330, 20613, 11, 285, 11463, 11, 2776, 11, 736, 5420, 198, 6738, 44161, 282, 26599, 13, 579, 1330, 285, 11463, 355, 44161, 282, 26599...
3.592233
103
import logging pvl_logger = logging.getLogger('pvlib') import datetime import numpy as np import pandas as pd from nose.tools import raises, assert_almost_equals from nose.plugins.skip import SkipTest from pandas.util.testing import assert_frame_equal from pvlib.location import Location from pvlib import solarposit...
[ 11748, 18931, 198, 79, 19279, 62, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 10786, 79, 85, 8019, 11537, 198, 198, 11748, 4818, 8079, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 9...
3.367925
106
from MemoryHandler import * from addresses import * from struct import *
[ 6738, 14059, 25060, 1330, 1635, 201, 198, 6738, 9405, 1330, 1635, 201, 198, 6738, 2878, 1330, 1635, 201, 198, 201, 198 ]
3.714286
21
# Copyright (c) 2020 Software AG, # Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, # and/or its subsidiaries and/or its affiliates and/or their licensors. # Use, reproduction, transfer, publication or disclosure is prohibited except # as specifically provided for in your License Agreement with Softwar...
[ 2, 15069, 357, 66, 8, 12131, 10442, 13077, 11, 198, 2, 360, 1670, 38863, 11, 4486, 290, 14, 273, 10442, 13077, 4916, 3457, 1539, 8324, 261, 11, 13753, 11, 4916, 11, 198, 2, 290, 14, 273, 663, 34943, 290, 14, 273, 663, 29116, 290, ...
2.448674
2,338
# # Copyright (c) 2020, Quantum Espresso Foundation and SISSA. # Internazionale Superiore di Studi Avanzati). All rights reserved. # This file is distributed under the terms of the BSD 3-Clause license. # See the file 'LICENSE' in the root directory of the present distribution, # or https://opensource.org/licenses/BSD-...
[ 2, 198, 2, 15069, 357, 66, 8, 12131, 11, 29082, 20386, 33852, 5693, 290, 311, 1797, 4090, 13, 198, 2, 2445, 1031, 295, 1000, 3115, 72, 382, 2566, 3604, 72, 5184, 35410, 7246, 737, 1439, 2489, 10395, 13, 198, 2, 770, 2393, 318, 938...
3.472727
110
"""Bright general tests""" from unittest import TestCase import nose from nose.tools import assert_equal, assert_not_equal, assert_raises, raises, \ assert_almost_equal, assert_true, assert_false, with_setup import os import warnings import tables as tb import numpy as np from pyne import nucname import bright...
[ 37811, 41267, 2276, 5254, 37811, 198, 198, 6738, 555, 715, 395, 1330, 6208, 20448, 198, 11748, 9686, 220, 198, 198, 6738, 9686, 13, 31391, 1330, 6818, 62, 40496, 11, 6818, 62, 1662, 62, 40496, 11, 6818, 62, 430, 2696, 11, 12073, 11, ...
2.864516
155
from django.apps import AppConfig
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
3.888889
9
import unittest from pathlib import Path import os import shutil import time from src.bt_utils.handle_sqlite import DatabaseHandler from src.bt_utils.get_content import content_dir from sqlite3 import IntegrityError if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 6738, 3108, 8019, 1330, 10644, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 11748, 640, 198, 198, 6738, 12351, 13, 18347, 62, 26791, 13, 28144, 62, 25410, 578, 1330, 24047, 25060, 198, 6738, 12351, 13, 18347...
3.216867
83
# load model and predicate import mxnet as mx import numpy as np # define test data batch_size = 1 num_batch = 1 filepath = 'frame-1.jpg' DEFAULT_INPUT_SHAPE = 300 # load model sym, arg_params, aux_params = mx.model.load_checkpoint("model/deploy_model_algo_1", 0) # load with net name and epoch num mod = mx.mod.Modul...
[ 2, 3440, 2746, 290, 44010, 198, 11748, 285, 87, 3262, 355, 285, 87, 198, 11748, 299, 32152, 355, 45941, 198, 198, 2, 8160, 1332, 1366, 198, 43501, 62, 7857, 796, 352, 198, 22510, 62, 43501, 796, 352, 198, 7753, 6978, 796, 705, 14535...
2.567919
692
from iconservice import *
[ 6738, 17149, 712, 501, 1330, 1635, 628, 198 ]
3.5
8
#!/usr/bin/python from setuptools import setup setup( name = "python-sentry", version = "1.0", author = "Josip Domsic", author_email = "josip.domsic+github@gmail.com", description = ("Pure Python CLI for sentry, as well as client library"), license = "MIT", keywords = "python Sentry CLI", ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 796, 366, 29412, 12, 82, 13000, 1600, 198, 220, 220, 220, 2196, 796, 366, 16, 13, 15, 1600, 198, 22...
2.295775
213
import json import os
[ 11748, 33918, 198, 11748, 28686, 628 ]
3.833333
6
# -*- coding: utf-8 -*- from django.test import SimpleTestCase from core.models import VisibilityMixin
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 42625, 14208, 13, 9288, 1330, 17427, 14402, 20448, 198, 198, 6738, 4755, 13, 27530, 1330, 6911, 2247, 35608, 259, 628 ]
3
35
import datetime import pandas import seaborn as sns import matplotlib.pyplot as plt import os import re import glob amean_err = [] astddev_err = [] amin_err = [] amax_err = [] rmean_err = [] rstddev_err = [] rmin_err = [] rmax_err = [] #loading the true and predicted tec maps for calculating the min/max error, mea...
[ 11748, 4818, 8079, 198, 11748, 19798, 292, 198, 11748, 384, 397, 1211, 355, 3013, 82, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 28686, 220, 198, 11748, 302, 198, 11748, 15095, 628, 198, 480, 272, 62, 80...
2.197439
2,421
#!/usr/bin/env python # coding: utf-8 # This notebook was prepared by [Donne Martin](https://github.com/donnemartin). Source and license info is on [GitHub](https://github.com/donnemartin/interactive-coding-challenges). # # Challenge Notebook # ## Problem: Sum of Two Integers (Subtraction Variant). # # See the [Lee...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 770, 20922, 373, 5597, 416, 685, 3987, 710, 5780, 16151, 5450, 1378, 12567, 13, 785, 14, 9099, 77, 368, 433, 259, 737, 8090, 290, 5964,...
2.772296
527
# encoding: utf-8 # Copyright 2011 California Institute of Technology. ALL RIGHTS # RESERVED. U.S. Government Sponsorship acknowledged. '''Curator: interface''' from zope.interface import Interface from zope import schema from ipdasite.services import ProjectMessageFactory as _
[ 2, 21004, 25, 3384, 69, 12, 23, 198, 2, 15069, 2813, 3442, 5136, 286, 8987, 13, 11096, 371, 34874, 198, 2, 15731, 1137, 53, 1961, 13, 471, 13, 50, 13, 5070, 18972, 11094, 10810, 13, 198, 198, 7061, 6, 26628, 1352, 25, 7071, 7061, ...
3.746667
75
from .Results import *
[ 6738, 764, 25468, 1330, 1635, 198 ]
3.833333
6
# Generated by Django 3.0.2 on 2020-01-20 10:43 from django.db import migrations, models import main.models
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 17, 319, 12131, 12, 486, 12, 1238, 838, 25, 3559, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 1388, 13, 27530, 628 ]
2.972973
37
############################################## # # # Ferdinand 0.40, Ian Thompson, LLNL # # # # gnd,endf,fresco,azure,hyrma # # # ######################################...
[ 29113, 7804, 4242, 2235, 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, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
1.635514
214
# -*- coding: utf-8 -*- from __future__ import print_function import numpy as np from ellalgo.oracles.chol_ext import chol_ext def test_chol1(): """[summary]""" l1 = [[25.0, 15.0, -5.0], [15.0, 18.0, 0.0], [-5.0, 0.0, 11.0]] m1 = np.array(l1) Q1 = chol_ext(len(m1)) assert Q1.factori...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 201, 198, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 201, 198, 6738, 30004, 282, 2188, 13, 273, 9928, 13, 3...
1.687656
1,604
#!/usr/bin/env python3 from TelloSDKPy.djitellopy.tello import Tello import cv2 import pygame import numpy as np import time if __name__== "__main__": main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 6738, 309, 11109, 10305, 42, 20519, 13, 28241, 578, 297, 11081, 13, 660, 18798, 1330, 309, 11109, 198, 11748, 269, 85, 17, 198, 11748, 12972, 6057, 198, 11748, 299, 32152, 355, 459...
2.538462
65
import os from copy import deepcopy import tqdm import torch import torch.nn.functional as F import colorful import numpy as np import networkx as nx from tensorboardX import SummaryWriter from .reservoir import reservoir from components import Net from utils import BetaMixture1D
[ 11748, 28686, 198, 6738, 4866, 1330, 2769, 30073, 198, 11748, 256, 80, 36020, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 11748, 20239, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 3127, 87, 355, 299, 8...
3.797297
74
# Copyright (c) 2020-2022 The PyUnity Team # This file is licensed under the MIT License. # See https://docs.pyunity.x10.bz/en/latest/license.html from pyunity import ( SceneManager, Component, Camera, AudioListener, Light, GameObject, Tag, Transform, GameObjectException, ComponentException, Canvas, PyUnit...
[ 2, 15069, 357, 66, 8, 12131, 12, 1238, 1828, 383, 9485, 35955, 4816, 198, 2, 770, 2393, 318, 11971, 739, 262, 17168, 13789, 13, 198, 2, 4091, 3740, 1378, 31628, 13, 9078, 9531, 13, 87, 940, 13, 65, 89, 14, 268, 14, 42861, 14, 43...
3.192857
140
import logging import os import alembic.command import alembic.config import cfnresponse from db.session import get_session, get_session_maker from retry import retry from sqlalchemy.exc import OperationalError def log(log_statement: str): """ Gets a Logger for the Lambda function with level logging.INFO and...
[ 11748, 18931, 198, 11748, 28686, 198, 198, 11748, 31341, 2022, 291, 13, 21812, 198, 11748, 31341, 2022, 291, 13, 11250, 198, 11748, 269, 22184, 26209, 198, 6738, 20613, 13, 29891, 1330, 651, 62, 29891, 11, 651, 62, 29891, 62, 10297, 198...
3.239583
192
from __future__ import unicode_literals import plumber from lxml import etree from datetime import datetime import pipeline
[ 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 458, 4494, 198, 198, 6738, 300, 19875, 1330, 2123, 631, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 11748, 11523, 628, 628, 628, 628, 628, 628, 628, 6...
3.295455
44
from LinkedList import LinkedList ll_a = LinkedList() ll_a.generate(4, 0, 9) ll_b = LinkedList() ll_b.generate(3, 0, 9) print(ll_a) print(ll_b) #print(sum_lists(ll_a, ll_b)) print(sum_lists_recursive(ll_a, ll_b)) #print(sum_lists_followup(ll_a, ll_b))
[ 6738, 7502, 276, 8053, 1330, 7502, 276, 8053, 628, 198, 198, 297, 62, 64, 796, 7502, 276, 8053, 3419, 198, 297, 62, 64, 13, 8612, 378, 7, 19, 11, 657, 11, 860, 8, 198, 297, 62, 65, 796, 7502, 276, 8053, 3419, 198, 297, 62, 65,...
2.065041
123
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2019/5/15 14:44 # @Author : Fred Yangxiaofei # @File : server_common.py # @Role : server, from models.server import Server, AssetErrorLog, ServerDetail from libs.db_context import DBContext from libs.web_logs import ins_log from libs.server.sync_public_...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2488, 7575, 220, 220, 220, 1058, 13130, 14, 20, 14, 1314, 1478, 25, 2598, 198, 2, 2488, 13838, 220, 1058, 8559, ...
1.827498
2,342
import unittest from src.main.serialization.codec.codec import Codec from src.main.serialization.codec.object.stringCodec import StringCodec from src.main.serialization.codec.primitive.shortCodec import ShortCodec from src.main.serialization.codec.utils.byteIo import ByteIo from src.main.serialization.codec.utils.byte...
[ 11748, 555, 715, 395, 198, 198, 6738, 12351, 13, 12417, 13, 46911, 1634, 13, 19815, 721, 13, 19815, 721, 1330, 39298, 198, 6738, 12351, 13, 12417, 13, 46911, 1634, 13, 19815, 721, 13, 15252, 13, 8841, 43806, 721, 1330, 10903, 43806, 7...
3.033784
148
# -*- coding: utf-8 -*- """ Created on Wed Jun 7 14:58:44 2017 @author: Jonas Lindemann """ import numpy as np import pyvtk as vtk print("Reading from uvw.dat...") xyzuvw = np.loadtxt('uvw.dat', skiprows=2) print("Converting to points and vectors") points = xyzuvw[:, 0:3].tolist() vectors = xyzuvw[:...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 41972, 319, 3300, 7653, 220, 767, 1478, 25, 3365, 25, 2598, 2177, 201, 198, 201, 198, 31, 9800, 25, 40458, 9329, 368, 1236, 201, 198, 37811, 201,...
2.25523
239
# Copyright 2014 Florian Ludwig # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
[ 2, 15069, 1946, 4432, 666, 44476, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 921, 743, 7330, 1...
3.81768
181
# Import important libraries import numpy as np import matplotlib.pyplot as plt import pandas as pd # Read the data set dataset = pd.read_csv('Salary_Data.csv') X = dataset.iloc[:,:-1].values y = dataset.iloc[:, 1].values # Splitting the dataset into the Training set and Test set from sklearn.model_selection import t...
[ 2, 17267, 1593, 12782, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 2, 4149, 262, 1366, 900, 198, 19608, 292, 316, 796, 279, 67, 13...
2.989451
474
# -*- coding: utf-8 -*- """Test for various sources Supported sources - Yahoo Finance - I3Investor - KLSe """ import datetime as dt import string import unittest from source import YahooFinanceSource, GoogleFinanceSource
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 14402, 329, 2972, 4237, 198, 198, 48181, 4237, 198, 12, 16551, 15007, 198, 12, 314, 18, 19070, 273, 532, 48253, 4653, 198, 198, 37811, 198, 198, 11748, 4818,...
3.197183
71
#!/usr/bin/env python3 from collections import namedtuple from itertools import combinations import knapsack Item = namedtuple("Item", ["index", "value", "weight"]) if __name__ == "__main__": import sys if len(sys.argv) > 1: file_location = sys.argv[1].strip() with open(file_location, ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 6738, 340, 861, 10141, 1330, 17790, 198, 198, 11748, 638, 1686, 441, 628, 628, 198, 7449, 796, 3706, 83, 29291, 7203, 7449, 1600, 1463...
2.261261
333
from django.conf import settings from api.task.internal import InternalTask from api.task.response import mgmt_task_response from vms.utils import AttrDict from vms.models import Vm from que import TG_DC_UNBOUND, TG_DC_BOUND # noinspection PyAbstractClass def get_mon_vms(sr=('dc',), order_by=('hostname',), **filt...
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 198, 6738, 40391, 13, 35943, 13, 32538, 1330, 18628, 25714, 198, 6738, 40391, 13, 35943, 13, 26209, 1330, 10527, 16762, 62, 35943, 62, 26209, 198, 6738, 410, 907, 13, 26791, 1330, 3460, 81...
2.213934
1,421
""" A modular, runtime re-loadable database package! A thin wrapper around the Mongo DB library 'motor' with helper functions to abstract away some more complex database operations. """ import sys as __sys import importlib as __importlib import motor.motor_asyncio import asyncio # names of the python modules/packag...
[ 37811, 198, 32, 26507, 11, 19124, 302, 12, 2220, 540, 6831, 5301, 0, 198, 198, 32, 7888, 29908, 1088, 262, 42591, 20137, 5888, 705, 76, 20965, 6, 351, 31904, 5499, 284, 12531, 1497, 198, 11246, 517, 3716, 6831, 4560, 13, 198, 37811, ...
3.821101
218
from helper import unittest, PillowTestCase, hopper from test_imageqt import PillowQtTestCase, PillowQPixmapTestCase from PIL import ImageQt if ImageQt.qt_is_installed: from PIL.ImageQt import QPixmap if __name__ == '__main__': unittest.main()
[ 6738, 31904, 1330, 555, 715, 395, 11, 19770, 322, 14402, 20448, 11, 8169, 2848, 198, 6738, 1332, 62, 9060, 39568, 1330, 19770, 322, 48, 83, 14402, 20448, 11, 19770, 322, 48, 47, 844, 8899, 14402, 20448, 198, 198, 6738, 350, 4146, 1330...
2.622449
98
from rest_framework import serializers from hood.models import UserProfile
[ 6738, 1334, 62, 30604, 1330, 11389, 11341, 198, 6738, 14263, 13, 27530, 1330, 11787, 37046 ]
4.933333
15
from .lexer import Lexer
[ 6738, 764, 2588, 263, 1330, 17210, 263 ]
3.428571
7
# Generated by Django 2.0.2 on 2018-08-20 14:44 import django.contrib.postgres.fields from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 15, 13, 17, 319, 2864, 12, 2919, 12, 1238, 1478, 25, 2598, 198, 198, 11748, 42625, 14208, 13, 3642, 822, 13, 7353, 34239, 13, 25747, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, ...
2.931818
44
import functools import math import operator
[ 11748, 1257, 310, 10141, 198, 11748, 10688, 198, 11748, 10088, 628 ]
4.181818
11
from os import environ from requests import post
[ 6738, 28686, 1330, 551, 2268, 198, 6738, 7007, 1330, 1281, 198 ]
4.454545
11
# coding=utf-8 import numpy as np from itertools import combinations_with_replacement from my_log import logging def load_transcription(transcription_file_name): """ :return: a list of tuple: [ (word: string, phones: list), (word: string, phones: list), ..., ...
[ 2, 19617, 28, 40477, 12, 23, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 6738, 340, 861, 10141, 1330, 17790, 62, 4480, 62, 35666, 5592, 201, 198, 6738, 616, 62, 6404, 1330, 18931, 201, 198, 201, 198, 201, 198, 4299, 3440, 62,...
2.138942
2,080
""" STAT 656 HW-10 @author:Lee Rainwater @heavy_lifting_by: Dr. Edward Jones @date: 2020-07-29 """ import pandas as pd # Classes provided from AdvancedAnalytics ver 1.25 from AdvancedAnalytics.Text import text_analysis from AdvancedAnalytics.Text import sentiment_analysis from sklearn.feature_extrac...
[ 37811, 198, 35744, 718, 3980, 44884, 12, 940, 198, 31, 9800, 25, 24338, 10301, 7050, 198, 31, 23701, 62, 30510, 62, 1525, 25, 1583, 13, 10443, 5437, 198, 31, 4475, 25, 12131, 12, 2998, 12, 1959, 198, 198, 37811, 198, 198, 11748, 197...
2.324489
2,789
from torch.utils.data import DataLoader from torch.utils.data.sampler import SubsetRandomSampler from meditorch.nn.models import UNetResNet from torchsummary import summary import torch.optim as optim from torch.optim import lr_scheduler from meditorch.nn import Trainer from meditorch.utils.plot import plot_image_truem...
[ 6738, 28034, 13, 26791, 13, 7890, 1330, 6060, 17401, 198, 6738, 28034, 13, 26791, 13, 7890, 13, 37687, 20053, 1330, 3834, 2617, 29531, 16305, 20053, 198, 6738, 1117, 2072, 354, 13, 20471, 13, 27530, 1330, 4725, 316, 4965, 7934, 198, 673...
3.239437
142
"""Query Object for all read-only queries to the Real Property table """ import os import logging from time import time from typing import List import asyncio import aiohttp import aiofiles import databases from PIL import Image import sqlalchemy from sqlalchemy.sql import select, func import geoapi.common.spatial_uti...
[ 37811, 20746, 9515, 329, 477, 1100, 12, 8807, 20743, 284, 262, 6416, 14161, 3084, 198, 37811, 198, 198, 11748, 28686, 198, 11748, 18931, 198, 6738, 640, 1330, 640, 198, 6738, 19720, 1330, 7343, 198, 11748, 30351, 952, 198, 11748, 257, 9...
3.944056
143