content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
''' HDF-saving features ''' import time import tempfile import random import traceback import numpy as np import fnmatch import os, sys import subprocess from riglib import calibrations, bmi from riglib.bmi import extractor from riglib.experiment import traits import hdfwriter
[ 7061, 6, 198, 39, 8068, 12, 29336, 3033, 198, 7061, 6, 198, 11748, 640, 198, 11748, 20218, 7753, 198, 11748, 4738, 198, 11748, 12854, 1891, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 24714, 15699, 198, 11748, 28686, 11, 25064, 198,...
3.531646
79
# # Copyright (c) 2013-2018 Quarkslab. # This file is part of IRMA project. # # 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 in the top-level directory # of this distribution and at: # # http:...
[ 2, 198, 2, 15069, 357, 66, 8, 2211, 12, 7908, 2264, 5558, 23912, 13, 198, 2, 770, 2393, 318, 636, 286, 14826, 5673, 1628, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 1...
3.417722
158
import time import os import math import numpy as np from libs import utils from libs.img_dataset import ImgDataset from nets.crnn import CRNN from nets.cnn.paper_cnn import PaperCNN import shutil def calculate_accuracy(predicts, labels): """ :param predicts: encoded predict result :param labels: ground...
[ 11748, 640, 198, 11748, 28686, 198, 11748, 10688, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 9195, 82, 1330, 3384, 4487, 198, 6738, 9195, 82, 13, 9600, 62, 19608, 292, 316, 1330, 1846, 70, 27354, 292, 316, 198, 6738, 317...
2.127882
3,730
#!/bin/python3 import math import os import random import re import sys # Complete the solve function below. if __name__ == '__main__': meal_cost = float(input()) tip_percent = int(input()) tax_percent = int(input()) solve(meal_cost, tip_percent, tax_percent) # Time complexity:...
[ 2, 48443, 8800, 14, 29412, 18, 201, 198, 201, 198, 11748, 10688, 201, 198, 11748, 28686, 201, 198, 11748, 4738, 201, 198, 11748, 302, 201, 198, 11748, 25064, 201, 198, 201, 198, 2, 13248, 262, 8494, 2163, 2174, 13, 201, 198, 201, 19...
2.503546
141
# -*- coding: utf-8 -*- # # Helper Script for Mass-Invitation of Participant Organisations # # RLPPTM Template Version 1.0 # # Execute in web2py folder after code upgrade like: # python web2py.py -S eden -M -R applications/eden/modules/templates/RLPPTM/tools/mis.py # import os import sys from core import s3_format_dat...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 5053, 525, 12327, 329, 5674, 12, 19904, 3780, 286, 29880, 7221, 38189, 198, 2, 198, 2, 45715, 10246, 15972, 37350, 10628, 352, 13, 15, 198, 2, 198, 2, 839...
1.816387
3,039
def save_form(form, actor=None): """Allows storing a form with a passed actor. Normally, Form.save() does not accept an actor, but if you require this to be passed (is not handled by middleware), you can use this to replace form.save(). Requires you to use the audit.Model model as the actor is passed to th...
[ 4299, 3613, 62, 687, 7, 687, 11, 8674, 28, 14202, 2599, 198, 220, 220, 220, 37227, 34934, 23069, 257, 1296, 351, 257, 3804, 8674, 13, 29282, 11, 5178, 13, 21928, 3419, 857, 407, 2453, 281, 8674, 11, 475, 611, 345, 2421, 198, 220, ...
2.569161
441
# coding = utf-8 # Create date: 2018-11-05 # Author :Hailong
[ 2, 19617, 796, 3384, 69, 12, 23, 198, 2, 13610, 3128, 25, 2864, 12, 1157, 12, 2713, 198, 2, 6434, 1058, 39, 603, 506, 628 ]
2.48
25
import json import logging from django.core.management.base import BaseCommand from django.db import transaction from paprika_sync.core.models import PaprikaAccount from paprika_sync.core.serializers import RecipeSerializer, CategorySerializer from paprika_sync.core.utils import log_start_end logger = logging.getLo...
[ 11748, 33918, 198, 11748, 18931, 198, 198, 6738, 42625, 14208, 13, 7295, 13, 27604, 13, 8692, 1330, 7308, 21575, 198, 6738, 42625, 14208, 13, 9945, 1330, 8611, 198, 198, 6738, 20461, 28716, 62, 27261, 13, 7295, 13, 27530, 1330, 14185, 2...
3.612903
93
#!/usr/bin/env python # Licensed under a 3-clause BSD style license - see LICENSE.rst import mica.archive.asp_l1 mica.archive.asp_l1.main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 49962, 739, 257, 513, 12, 565, 682, 347, 10305, 3918, 5964, 532, 766, 38559, 24290, 13, 81, 301, 198, 198, 11748, 285, 3970, 13, 17474, 13, 5126, 62, 75, 16, 198, 198, 76, 3970,...
2.581818
55
from time import sleep from proto9x.usb import usb from proto9x.tls import tls from proto9x.flash import read_flash from proto9x.init_flash import init_flash from proto9x.upload_fwext import upload_fwext from proto9x.calibrate import calibrate from proto9x.init_db import init_db #usb.trace_enabled=True #tls.trace_en...
[ 198, 6738, 640, 1330, 3993, 198, 198, 6738, 44876, 24, 87, 13, 43319, 1330, 38551, 198, 6738, 44876, 24, 87, 13, 83, 7278, 1330, 256, 7278, 198, 6738, 44876, 24, 87, 13, 34167, 1330, 1100, 62, 34167, 198, 6738, 44876, 24, 87, 13, ...
2.893401
197
from dataclasses import dataclass, field
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 11, 2214, 628, 198 ]
3.583333
12
import json import os from collections import OrderedDict from copy import deepcopy import SimpleITK as sitk from batchgenerators.augmentations.utils import resize_segmentation # resize_softmax_output from skimage.transform import resize from torch.optim import lr_scheduler from torch import nn import numpy as np impor...
[ 11748, 33918, 198, 11748, 28686, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 6738, 4866, 1330, 2769, 30073, 198, 11748, 17427, 2043, 42, 355, 1650, 74, 198, 6738, 15458, 8612, 2024, 13, 559, 5154, 602, 13, 26791, 1330, 47558, 62,...
2.230265
3,205
import os basepath = '/home/archit/scratch/cartpoles/data/hyperparam/cartpole/offline_learning/esarsa-adam/' dirs = os.listdir(basepath) string = '''''' for dir in dirs: print(dir) subbasepath = basepath + dir + '/' subdirs = os.listdir(subbasepath) for subdir in subdirs: print(subdir) subsubbasepath = subbasep...
[ 11748, 28686, 198, 12093, 538, 776, 796, 31051, 11195, 14, 998, 270, 14, 1416, 36722, 14, 26674, 79, 4316, 14, 7890, 14, 49229, 17143, 14, 26674, 36869, 14, 2364, 1370, 62, 40684, 14, 274, 945, 64, 12, 324, 321, 14, 6, 198, 15908, ...
2.316038
424
import os import shutil import tempfile import zipfile def archive_write(archivepath, data, filename, compression, compressionlevel): """ Create a file named filename in the archive and write data to it :param archivepath: The path to the zip-archive :type archivepath: str :param data: The data t...
[ 11748, 28686, 198, 11748, 4423, 346, 198, 11748, 20218, 7753, 198, 11748, 19974, 7753, 628, 198, 4299, 15424, 62, 13564, 7, 17474, 6978, 11, 1366, 11, 29472, 11, 19794, 11, 19794, 5715, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, ...
2.815331
1,722
"""Abstract class for all the scan planners https://www.postgresql.org/docs/9.1/using-explain.html https://www.postgresql.org/docs/9.5/runtime-config-query.html """ from src.query_planner.abstract_plan import AbstractPlan from typing import List
[ 37811, 23839, 1398, 329, 477, 262, 9367, 33596, 198, 5450, 1378, 2503, 13, 7353, 34239, 13976, 13, 2398, 14, 31628, 14, 24, 13, 16, 14, 3500, 12, 20676, 391, 13, 6494, 198, 5450, 1378, 2503, 13, 7353, 34239, 13976, 13, 2398, 14, 316...
3.126582
79
# !usr/bin/python # coding:utf-8 import time import socket if __name__ == "__main__" : main()
[ 2, 5145, 14629, 14, 8800, 14, 29412, 198, 2, 19617, 25, 40477, 12, 23, 198, 198, 11748, 640, 198, 11748, 17802, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1, 1058, 198, 220, 220, 220, 1388, 3419, 198 ]
2.439024
41
import argparse import sys from cliquet.scripts import cliquet from pyramid.scripts import pserve from pyramid.paster import bootstrap def main(args=None): """The main routine.""" if args is None: args = sys.argv[1:] parser = argparse.ArgumentParser(description="Kinto commands...
[ 11748, 1822, 29572, 198, 11748, 25064, 198, 6738, 537, 1557, 316, 13, 46521, 1330, 537, 1557, 316, 198, 6738, 27944, 13, 46521, 1330, 279, 2655, 303, 198, 6738, 27944, 13, 79, 1603, 1330, 6297, 26418, 628, 198, 4299, 1388, 7, 22046, 2...
2.034696
807
from django.contrib import admin from django.contrib.auth.models import User from .models import Vegetable, Harvest, Transaction, Merchandise, MerchandisePrice from .models import PurchasedItem, UserProfile, VegetablePrice, StockedVegetable from .models import MerchandisePhotos admin.site.register(Vegetable) admin.sit...
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 6738, 764, 27530, 1330, 23892, 540, 11, 26149, 11, 45389, 11, 34414, 18888, 11, 34414, 18888, 18124, 198, 67...
3.434066
182
from ctypes import sizeof from io import BytesIO import unittest from pyglet.media.synthesis import * local_dir = os.path.dirname(__file__) test_data_path = os.path.abspath(os.path.join(local_dir, '..', '..', 'data')) del local_dir def get_test_data_file(*file_parts): """Get a file from the test data directory...
[ 6738, 269, 19199, 1330, 39364, 198, 6738, 33245, 1330, 2750, 4879, 9399, 198, 11748, 555, 715, 395, 198, 198, 6738, 12972, 70, 1616, 13, 11431, 13, 1837, 429, 8497, 1330, 1635, 628, 198, 12001, 62, 15908, 796, 28686, 13, 6978, 13, 159...
2.784884
172
#Datos de entrada num=int(input("Ingrese un numero: ")) # Proceso if num==10: print("Calificacion: A") elif num==9: print("Calificacion: B") elif num==8: print("Calificacion: C") elif num==7 and num==6: print("Calificacion: D") elif num<=5 and num>=0: print("Calificacion: F")
[ 2, 27354, 418, 390, 24481, 4763, 198, 22510, 28, 600, 7, 15414, 7203, 27682, 260, 325, 555, 997, 3529, 25, 366, 4008, 198, 2, 1041, 728, 78, 198, 361, 997, 855, 940, 25, 198, 3601, 7203, 9771, 811, 49443, 25, 317, 4943, 198, 417, ...
2.410256
117
ribbon_needed = 0 with open("input.txt", "r") as puzzle_input: for line in puzzle_input: length, width, height = [int(item) for item in line.split("x")] dimensions = [length, width, height] smallest_side = min(dimensions) dimensions.remove(smallest_side) second_smallest_side = min(dimensions) ribbon_n...
[ 822, 4189, 62, 27938, 796, 657, 198, 198, 4480, 1280, 7203, 15414, 13, 14116, 1600, 366, 81, 4943, 355, 15027, 62, 15414, 25, 198, 197, 1640, 1627, 287, 15027, 62, 15414, 25, 198, 197, 197, 13664, 11, 9647, 11, 6001, 796, 685, 600, ...
2.690323
155
# QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. # Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the Licen...
[ 2, 19604, 1565, 4825, 1340, 48842, 13, 9858, 532, 9755, 2890, 15007, 11, 2295, 6477, 278, 34884, 13, 198, 2, 45661, 978, 7727, 9383, 25469, 7117, 410, 17, 13, 15, 13, 15069, 1946, 16972, 13313, 10501, 13, 198, 2, 198, 2, 49962, 739,...
2.84441
2,603
import numpy as np import torch import torch.nn.functional as F def content_loss(content_weight, content_current, content_target): """ Compute the content loss for style transfer. Inputs: - content_weight: Scalar giving the weighting for the content loss. - content_current: features of the curre...
[ 11748, 299, 32152, 355, 45941, 198, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 628, 198, 4299, 2695, 62, 22462, 7, 11299, 62, 6551, 11, 2695, 62, 14421, 11, 2695, 62, 16793, 2599, 198, 220, 220, 220, 37227, ...
2.781761
1,897
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import xml.sax.saxutils from Peach.transformer import Transformer
[ 2, 770, 8090, 6127, 5178, 318, 2426, 284, 262, 2846, 286, 262, 29258, 5094, 198, 2, 13789, 11, 410, 13, 362, 13, 15, 13, 1002, 257, 4866, 286, 262, 4904, 43, 373, 407, 9387, 351, 428, 198, 2, 2393, 11, 921, 460, 7330, 530, 379, ...
3.3375
80
# From: http://williams.best.vwh.net/avform.htm#GCF import math EPS = 0.0001 d2r = math.pi / 180.0 r2d = 180.0 / math.pi rad2nm = (180.0 * 60.0) / math.pi nm2rad = 1.0 / rad2nm nm2meter = 1852 meter2nm = 1.0 / nm2meter # p1 = (lat1(deg), lon1(deg)) # p2 = (lat2(deg), lon2(deg))
[ 2, 3574, 25, 2638, 1378, 10594, 1789, 82, 13, 13466, 13, 85, 1929, 13, 3262, 14, 615, 687, 13, 19211, 2, 15916, 37, 198, 198, 11748, 10688, 198, 198, 36, 3705, 796, 657, 13, 18005, 198, 67, 17, 81, 796, 10688, 13, 14415, 1220, 1...
1.958333
144
import connexion, os from connexion.resolver import RestyResolver from flask import json from flask_sqlalchemy import SQLAlchemy from flask_marshmallow import Marshmallow # Globally accessible libraries db = SQLAlchemy() mm = Marshmallow() def init_app(): """Initialize the Connexion application.""" BASE_DIR...
[ 11748, 369, 12413, 295, 11, 28686, 198, 6738, 369, 12413, 295, 13, 411, 14375, 1330, 8324, 88, 4965, 14375, 198, 6738, 42903, 1330, 33918, 198, 6738, 42903, 62, 25410, 282, 26599, 1330, 16363, 2348, 26599, 198, 6738, 42903, 62, 76, 5406...
2.419028
494
''' Summary: Program that implements a routing deamon based on the RIP version 2 protocol from RFC2453. Usage: python3 Router.py <router_config_file> Configuration File: The user supplies a router configuration file of the format: [Setting...
[ 7061, 6, 201, 198, 220, 220, 220, 21293, 25, 6118, 326, 23986, 257, 28166, 390, 16487, 1912, 319, 262, 220, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 44967, 2196, 362, 8435, 422, 30978, 1731, 4310, 13, ...
2.481792
2,389
from ibllib.io import spikeglx import numpy as np import ibllib.dsp as dsp from scipy import signal from ibllib.misc import print_progress from pathlib import Path import alf.io as aio import logging import ibllib.ephys.ephysqc as ephysqc from phylib.io import alf _logger = logging.getLogger('ibllib') ...
[ 6738, 24283, 297, 571, 13, 952, 1330, 20240, 4743, 87, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 24283, 297, 571, 13, 67, 2777, 355, 288, 2777, 201, 198, 6738, 629, 541, 88, 1330, 6737, 201, 198, 6738, 24283, 297, 57...
2.224287
2,314
from django.db import models
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 628, 628, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 1...
1.211009
109
# -*- coding: utf-8 -*- # vispy: gallery 10 # Copyright (c) Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. import sys import numpy as np from vispy import app, gloo, visuals from vispy.visuals.filters import Clipper, ColorFilter from vispy.visual...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 1490, 9078, 25, 15604, 838, 198, 2, 15069, 357, 66, 8, 6911, 9078, 7712, 4816, 13, 1439, 6923, 33876, 13, 198, 2, 4307, 6169, 739, 262, 357, 3605, 8, 347, 10305, ...
2.892568
1,480
from unittest import TestCase from datetime import datetime import pyarrow as pa import numpy as np import pandas as pd from h1st.schema import SchemaInferrer
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 12972, 6018, 355, 14187, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 289, 16, 301, 13, 15952, 2611, ...
3.333333
48
""" # refactoring Refactoring is the key to successfull projects. Refactor: 1) annuity_factor such that: conversion to integer is handled, no extra printing 2) policy_book into a class such that: a function generates the book and the premium stats and visualizations functions are avalaible 3) book_report su...
[ 37811, 198, 2, 1006, 529, 3255, 198, 198, 8134, 529, 3255, 318, 262, 1994, 284, 1943, 12853, 4493, 13, 198, 8134, 11218, 25, 198, 198, 16, 8, 1529, 14834, 62, 31412, 884, 326, 25, 198, 197, 197, 1102, 9641, 284, 18253, 318, 12118, ...
3.453704
108
"""Auxiliary methods.""" import os import json from errno import EEXIST import numpy as np import seaborn as sns import cPickle as pickle import matplotlib.pyplot as plt sns.set() DEFAULT_LOG_DIR = 'log' ATOB_WEIGHTS_FILE = 'atob_weights.h5' D_WEIGHTS_FILE = 'd_weights.h5' def convert_to_rgb(img, is_binary=False)...
[ 37811, 32, 2821, 28129, 5050, 526, 15931, 198, 11748, 28686, 198, 11748, 33918, 198, 6738, 11454, 3919, 1330, 412, 6369, 8808, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 384, 397, 1211, 355, 3013, 82, 198, 11748, 269, 31686, 2...
2.358304
2,523
from github import Github # parsedUrl = parseGithubURL('https://github.com/CakeCrusher/restock_emailer') # filePaths = fetchRepoFiles(parsedUrl['owner'], parsedUrl['repo']) # files = [path.split('/')[-1] for path in filePaths] # print(files)
[ 6738, 33084, 1330, 38994, 198, 198, 2, 44267, 28165, 796, 21136, 38, 10060, 21886, 10786, 5450, 1378, 12567, 13, 785, 14, 34, 539, 13916, 34055, 14, 2118, 735, 62, 12888, 263, 11537, 198, 2, 2393, 15235, 82, 796, 21207, 6207, 78, 2587...
2.793103
87
#-*- coding: utf-8 -*- import codecs import random from utils.global_names import GlobalNames, get_file_path
[ 2, 12, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 628, 198, 11748, 40481, 82, 198, 11748, 4738, 198, 6738, 3384, 4487, 13, 20541, 62, 14933, 1330, 8060, 36690, 11, 651, 62, 7753, 62, 6978, 628, 198 ]
2.825
40
from graphgallery.functional import device import tensorflow as tf import torch if __name__ == "__main__": test_device()
[ 6738, 4823, 24460, 13, 45124, 1330, 3335, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 28034, 628, 220, 220, 220, 220, 198, 220, 220, 220, 220, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220...
2.745098
51
# -*- coding: utf-8 -*- """ A card (duh). """ import random import uuid from enum import Enum from typing import List from py_hanabi.settings import CARD_DECK_DISTRIBUTION __author__ = "Jakrin Juangbhanich" __email__ = "juangbhanich.k@gmail.com"
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 32, 2657, 357, 646, 71, 737, 198, 37811, 198, 198, 11748, 4738, 198, 11748, 334, 27112, 198, 6738, 33829, 1330, 2039, 388, 198, 6738, 19720, 1330, 7343,...
2.571429
98
import types import django.test.testcases from django.conf import settings from facetools.models import TestUser from facetools.common import _create_signed_request from facetools.test import TestUserNotLoaded from facetools.signals import sync_facebook_test_user, setup_facebook_test_client from facetools.common impor...
[ 11748, 3858, 198, 198, 11748, 42625, 14208, 13, 9288, 13, 9288, 33964, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 39144, 10141, 13, 27530, 1330, 6208, 12982, 198, 6738, 39144, 10141, 13, 11321, 1330, 4808, 17953, 62, 32696...
3.389978
459
import setuptools import distpickymodel setuptools.setup( name="distpickymodel", version=distpickymodel.__version__, author="Dan G", author_email="daniel.garcia@d2garcia.com", description="A shared Mongoengine-based model library", long_description=get_long_desc(), url="https://github.com...
[ 11748, 900, 37623, 10141, 198, 11748, 1233, 79, 17479, 19849, 628, 198, 198, 2617, 37623, 10141, 13, 40406, 7, 198, 220, 220, 220, 1438, 2625, 17080, 79, 17479, 19849, 1600, 198, 220, 220, 220, 2196, 28, 17080, 79, 17479, 19849, 13, 8...
2.598109
423
import unittest from password import Credentials def test_init(self): """ Test for correct initialization """ self.assertEqual(self.new_credentials.account_name,"Github") self.assertEqual(self.new_credentials.username,"tinatasga") self.assertEqual(self.new_credentials.pa...
[ 11748, 555, 715, 395, 198, 6738, 9206, 1330, 327, 445, 14817, 198, 198, 4299, 1332, 62, 15003, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 6208, 329, 3376, 37588, 198, 220, ...
2.349684
632
# populacao = [[0,0],[-3,1]] # calc_fitness(pop=populacao) # print(populacao)
[ 198, 2, 16595, 330, 5488, 796, 16410, 15, 11, 15, 38430, 12, 18, 11, 16, 11907, 198, 2, 42302, 62, 69, 3659, 7, 12924, 28, 12924, 377, 330, 5488, 8, 198, 2, 3601, 7, 12924, 377, 330, 5488, 8, 628 ]
2
40
# -*- coding: utf-8 -*- from oopschool.school import Student,Tesla,SpecialStudent,Teacher from oopschool.newschool import Test
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 6738, 267, 2840, 1251, 13, 14347, 1330, 13613, 11, 41351, 11, 13409, 38778, 11, 6767, 3493, 201, 198, 6738, 267, 2840, 1251, 13, 10827, 1251, 1330, 6208 ]
3.047619
42
import logging from rdl.data_sources.MsSqlDataSource import MsSqlDataSource from rdl.data_sources.AWSLambdaDataSource import AWSLambdaDataSource
[ 11748, 18931, 198, 6738, 374, 25404, 13, 7890, 62, 82, 2203, 13, 10128, 50, 13976, 6601, 7416, 1330, 6997, 50, 13976, 6601, 7416, 198, 6738, 374, 25404, 13, 7890, 62, 82, 2203, 13, 12298, 8634, 4131, 6814, 6601, 7416, 1330, 14356, 863...
3.106383
47
# --------------------------------- # Prepare the data etc. # ---------------------------------- import numpy as np import pandas as pd # train_x is the training data, train_y is the target values, and test_x is the test data # stored in pandas DataFrames and Series (numpy arrays also used) train = pd.read_csv('../in...
[ 2, 20368, 12, 198, 2, 43426, 262, 1366, 3503, 13, 198, 2, 20368, 438, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 2, 4512, 62, 87, 318, 262, 3047, 1366, 11, 4512, 62, 88, 318, 262, 2496, 3...
2.995647
919
#!/usr/bin/env python # -*- coding: utf-8 -*- import wit import json if __name__ == "__main__": print "You ran the Wit client, nothing will happen. Exiting..."
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 20868, 220, 198, 11748, 33918, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 197,...
2.704918
61
# Problem Statement: https://www.hackerrank.com/challenges/itertools-combinations-with-replacement/problem from itertools import combinations_with_replacement S, k = input().split() for comb in combinations_with_replacement(sorted(S), int(k)): print(''.join(comb))
[ 2, 20647, 21983, 25, 3740, 1378, 2503, 13, 31153, 8056, 962, 13, 785, 14, 36747, 34120, 14, 270, 861, 10141, 12, 24011, 7352, 12, 4480, 12, 35666, 5592, 14, 45573, 198, 198, 6738, 340, 861, 10141, 1330, 17790, 62, 4480, 62, 35666, 5...
3.190476
84
""" Visual Genome Python API wrapper, models """
[ 37811, 198, 36259, 5215, 462, 11361, 7824, 29908, 11, 4981, 198, 37811, 628, 628, 628, 628, 628 ]
3.411765
17
import csv import matplotlib.pyplot as plt import time PLOT_PER_WINDOW = False WINDOW_LENGTH = 60000 BINS = 1000 delay_store = {} perwindow_delay_store = {} plotting_delay_store = {} filename = "output-large.csv" # filename = "output.csv" # filename = "output-medium.csv" # filename = "output-small.csv" # filename = "...
[ 11748, 269, 21370, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 640, 198, 198, 6489, 2394, 62, 18973, 62, 28929, 3913, 796, 10352, 198, 28929, 3913, 62, 43, 49494, 796, 718, 2388, 198, 33, 20913, 796, 8576...
2.511085
857
#!/usr/bin/env python # author: Peter Thorpe September 2015. The James Hutton Insitute, Dundee, UK. # title rename single copy busco genes from Bio.Seq import Seq from Bio.SeqRecord import SeqRecord from Bio import SeqIO import os from sys import stdin,argv import sys from optparse import OptionParser ###############...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 1772, 25, 5613, 13002, 431, 2693, 1853, 13, 383, 3700, 367, 21115, 7088, 3678, 11, 37921, 1453, 11, 3482, 13, 198, 2, 3670, 36265, 2060, 4866, 1323, 1073, 10812, 198, 198, 6738, 1...
2.288728
1,517
# Download the Python helper library from twilio.com/docs/python/install from twilio.rest import Client # Your Account Sid and Auth Token from twilio.com/console api_key_sid = 'SKXXXX' api_key_secret = 'your_api_key_secret' client = Client(api_key_sid, api_key_secret) did_delete = client.video\ .c...
[ 2, 10472, 262, 11361, 31904, 5888, 422, 665, 346, 952, 13, 785, 14, 31628, 14, 29412, 14, 17350, 198, 6738, 665, 346, 952, 13, 2118, 1330, 20985, 198, 198, 2, 3406, 10781, 15686, 290, 26828, 29130, 422, 665, 346, 952, 13, 785, 14, ...
2.511765
170
from time import sleep debug_mode = False time_to_exit = False exiting = False exit_code = 0
[ 6738, 640, 1330, 3993, 198, 198, 24442, 62, 14171, 796, 10352, 198, 198, 2435, 62, 1462, 62, 37023, 796, 10352, 198, 1069, 1780, 796, 10352, 198, 37023, 62, 8189, 796, 657, 628, 198 ]
2.939394
33
from __future__ import absoulte_import from __future__ import division from __future__ import print_function import tensorflow as tf from data import data_utils data = data_utils if __name__ == "__main__": tf.test.main()
[ 6738, 11593, 37443, 834, 1330, 2352, 2852, 660, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 628, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 198, 6738, 1366, 1330, 1366, 6...
3.191781
73
from django.apps import AppConfig
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
3.888889
9
import argparse import numpy as np import matlab.engine from scipy.io import savemat import os from time import time if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('--form', default='neuron', const='neuron', nargs='?', choices=('neuron', 'net...
[ 11748, 1822, 29572, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 23912, 13, 18392, 198, 6738, 629, 541, 88, 13, 952, 1330, 3613, 6759, 198, 11748, 28686, 198, 6738, 640, 1330, 640, 628, 198, 361, 11593, 3672, 834, 6624, 705, ...
2.487342
948
from stockprophet.cli import entry_point from stockprophet.crawler import ( init_stock_type, init_stock_category ) from stockprophet.db import init_db from .utils import read_db_settings
[ 6738, 4283, 22930, 3202, 13, 44506, 1330, 5726, 62, 4122, 198, 6738, 4283, 22930, 3202, 13, 66, 39464, 1330, 357, 198, 220, 220, 220, 2315, 62, 13578, 62, 4906, 11, 2315, 62, 13578, 62, 22872, 198, 8, 198, 6738, 4283, 22930, 3202, 1...
3.180328
61
import aoc_helper RAW = aoc_helper.day(25) print(RAW) DATA = parse_raw() aoc_helper.submit(25, part_one) aoc_helper.submit(25, part_two)
[ 11748, 257, 420, 62, 2978, 525, 198, 198, 20530, 796, 257, 420, 62, 2978, 525, 13, 820, 7, 1495, 8, 198, 4798, 7, 20530, 8, 198, 198, 26947, 796, 21136, 62, 1831, 3419, 198, 198, 64, 420, 62, 2978, 525, 13, 46002, 7, 1495, 11, ...
2.153846
65
groupList = [] tempGroup = [] with open("./6/input.txt") as inputFile: for line in inputFile: line = line.replace("\n","") if len(line) > 0: tempGroup.append(set(line)) else: groupList.append(tempGroup) tempGroup = [] if len(tempGroup) > 0: groupList.append(tempGroup) groupList = list(map(setInters...
[ 198, 8094, 8053, 796, 17635, 198, 29510, 13247, 796, 17635, 198, 4480, 1280, 7, 1911, 14, 21, 14, 15414, 13, 14116, 4943, 355, 5128, 8979, 25, 198, 197, 1640, 1627, 287, 5128, 8979, 25, 198, 197, 197, 1370, 796, 1627, 13, 33491, 720...
2.640523
153
# Copyright (c) 2021 PaddlePaddle 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 applic...
[ 2, 15069, 357, 66, 8, 33448, 220, 350, 37382, 47, 37382, 46665, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 1, 198, 2, 345, 743, 407, 779, 428, 2393, 2...
2.448312
948
# Generated by Django 2.0.6 on 2018-11-02 09:44 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 15, 13, 21, 319, 2864, 12, 1157, 12, 2999, 7769, 25, 2598, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
from collections import OrderedDict from random import Random from typing import Set from .._types import Dataset, Split, LabelIndices from .._util import per_label from ._RandomSplitter import RandomSplitter from ._Splitter import Splitter
[ 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 6738, 4738, 1330, 14534, 198, 6738, 19720, 1330, 5345, 198, 198, 6738, 11485, 62, 19199, 1330, 16092, 292, 316, 11, 27758, 11, 36052, 5497, 1063, 198, 6738, 11485, 62, 22602, 1330, 583, 62, ...
3.983607
61
from enum import Enum
[ 6738, 33829, 1330, 2039, 388, 628 ]
3.833333
6
from __future__ import absolute_import, division, print_function, unicode_literals import torch.nn.qat as nnqat import torch.nn.intrinsic import torch.nn.functional as F
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 11, 28000, 1098, 62, 17201, 874, 201, 198, 11748, 28034, 13, 20471, 13, 80, 265, 355, 299, 77, 80, 265, 201, 198, 11748, 28034, 13, 20471, 13, 600, 81, ...
3.052632
57
'''OpenGL extension EXT.draw_buffers2 This module customises the behaviour of the OpenGL.raw.GL.EXT.draw_buffers2 to provide a more Python-friendly API Overview (from the spec) This extension builds upon the ARB_draw_buffers extension and provides separate blend enables and color write masks for each color outp...
[ 7061, 6, 11505, 8763, 7552, 27489, 13, 19334, 62, 36873, 364, 17, 198, 198, 1212, 8265, 2183, 2696, 262, 9172, 286, 262, 220, 198, 11505, 8763, 13, 1831, 13, 8763, 13, 13918, 13, 19334, 62, 36873, 364, 17, 284, 2148, 257, 517, 220, ...
3.701493
268
""" Module containing the RetryingClient wrapper class. """ from time import sleep def _ensure_tuple_argument(argument_name, argument_value): """ Helper function to ensure the given arguments are tuples of Exceptions (or subclasses), or can at least be converted to such. Args: argument_name: s...
[ 37811, 19937, 7268, 262, 4990, 14992, 11792, 29908, 1398, 13, 37227, 198, 198, 6738, 640, 1330, 3993, 628, 198, 4299, 4808, 641, 495, 62, 83, 29291, 62, 49140, 7, 49140, 62, 3672, 11, 4578, 62, 8367, 2599, 198, 220, 220, 220, 37227, ...
3.012448
482
import numpy as np import numpy.linalg as lg A_mat = np.matrix([ [0, 1, 1, 1, 0], [1, 0, 0, 0, 1], [1, 0, 0, 1, 1], [1, 0, 1, 0, 1], [0, 1, 1, 1, 0] ]) eigen = lg.eig(A_mat) # return Arr[5] with 5 different linear independent eigen values vec = eigen[1][:, 0] # the column (eigen vect...
[ 11748, 299, 32152, 355, 45941, 201, 198, 11748, 299, 32152, 13, 75, 1292, 70, 355, 300, 70, 201, 198, 201, 198, 32, 62, 6759, 796, 45941, 13, 6759, 8609, 26933, 201, 198, 220, 220, 220, 685, 15, 11, 352, 11, 352, 11, 352, 11, 65...
2.058036
224
# Generated by Django 2.2.2 on 2019-08-25 09:29 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 17, 319, 13130, 12, 2919, 12, 1495, 7769, 25, 1959, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
from jumbo_api.objects.store import Store
[ 6738, 474, 29309, 62, 15042, 13, 48205, 13, 8095, 1330, 9363, 628 ]
3.583333
12
#!/usr/bin/env python import os import sys import time import errno import stat import datetime import socket import struct import atexit import logging #from lru import LRUCacheDict from logging import handlers from task_manager import Job, taskManage from ctypes import * from urlparse import * from multiprocessing ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 640, 198, 11748, 11454, 3919, 198, 11748, 1185, 198, 11748, 4818, 8079, 198, 11748, 17802, 198, 11748, 2878, 198, 11748, 379, 37023, 198, ...
2.439528
678
# -*- encoding: utf-8 -*- from flask import request from lazyblacksmith.utils.request import is_xhr import logging logger = logging.getLogger('lb.ajax') def is_not_ajax(): """ Return True if request is not ajax This function is used in @cache annotation to not cache direct call (http 40...
[ 2, 532, 9, 12, 21004, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 6738, 42903, 1330, 2581, 201, 198, 6738, 16931, 2436, 4595, 22947, 13, 26791, 13, 25927, 1330, 318, 62, 87, 11840, 201, 198, 201, 198, 11748, 18931, 201, 198, 201, ...
2.570423
142
import os
[ 11748, 28686, 198 ]
3.333333
3
import django from django.conf import settings from django.conf.urls import include, url from django.contrib import admin from django.contrib.staticfiles.urls import staticfiles_urlpatterns if django.VERSION[:2] > (1, 9): from django.views.i18n import JavaScriptCatalog else: from django.views.i18n import javas...
[ 11748, 42625, 14208, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 2291, 11, 19016, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 42625, 14208, 13, 3642, 822, 1...
2.382114
738
import math import time if __name__ == "__main__": primes = [] t1 = time.time() # 100109100129100151 big prime # http://primes.utm.edu/curios/page.php/100109100129100151.html # number_range = xrange(100109100129100153, 100109100129101238, 2) number_range = range(100109100129101237, 10010910...
[ 11748, 10688, 198, 11748, 640, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 778, 999, 796, 17635, 198, 220, 220, 220, 256, 16, 796, 640, 13, 2435, 3419, 628, 220, 220, 220, 1303, 220, ...
2.20111
721
import pytest from katana.dynamic_bitset import DynamicBitset __all__ = [] SIZE = 50
[ 11748, 12972, 9288, 198, 198, 6738, 479, 43777, 13, 67, 28995, 62, 9895, 316, 1330, 26977, 33, 896, 316, 198, 198, 834, 439, 834, 796, 17635, 198, 198, 33489, 796, 2026, 628, 628, 628, 628, 628, 628, 628 ]
2.657895
38
import unittest import astar if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 11748, 6468, 283, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3419, 198 ]
2.516129
31
#!/bin/env python3 import csv effects = {} ingredients = {} print("Formulating formulas") with open('ingredients.csv') as csvfile: aff = csv.reader(csvfile, delimiter=',') for row in aff: if row[0] not in effects.keys(): effects[row[0]] = row[1] with open('skyrim-ingredients.csv', newlin...
[ 2, 48443, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 269, 21370, 198, 198, 34435, 796, 23884, 198, 278, 23320, 796, 23884, 198, 4798, 7203, 8479, 8306, 32126, 4943, 628, 198, 4480, 1280, 10786, 278, 23320, 13, 40664, 11537, 355, 269, ...
2.116412
1,048
# coding: utf-8 """ Control-M Services Provides access to BMC Control-M Services # noqa: E501 OpenAPI spec version: 9.20.215 Contact: customer_support@bmc.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six from clients.ct...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 220, 220, 220, 6779, 12, 44, 6168, 628, 220, 220, 220, 47081, 1895, 284, 40714, 6779, 12, 44, 6168, 220, 1303, 645, 20402, 25, 412, 33548, 628, 220, 220, 220, 4946, 17614, 1020...
2.590452
398
# -*- coding: utf-8 -*- import pytest import numpy as np from unittest import TestCase from pyleecan.Classes.CellMat import CellMat from pyleecan.Classes.MeshSolution import MeshSolution from pyleecan.Classes.PointMat import PointMat from pyleecan.Classes.MeshMat import MeshMat from pyleecan.Classes.ScalarProductL2 i...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 12972, 9288, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 555, 715, 395, 1330, 6208, 20448, 198, 198, 6738, 279, 2349, 721, 272, 13, 9487, 274, 13, 28780, ...
2.890173
173
# -*- coding: utf-8 -*- """ Pytorch models __author__ = 'Jamie (krikit@naver.com)' __copyright__ = 'No copyright. Just copyleft!' """ # pylint: disable=no-member # pylint: disable=invalid-name ########### # imports # ########### import torch import torch.nn as nn from embedder import Embedder from pos_models impo...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 628, 198, 37811, 198, 20519, 13165, 354, 4981, 198, 834, 9800, 834, 796, 705, 48337, 357, 74, 12602, 270, 31, 2616, 332, 13, 785, 33047, 198, 834, 22163, 4766, 834, 796, 70...
2.983696
184
# -*- coding: utf-8 -*- """Top-level package for pyseqlogo.""" __author__ = """Saket Choudhary""" __email__ = 'saketkc@gmail.com' __version__ = '0.1.0' from .pyseqlogo import draw_logo from .pyseqlogo import setup_axis
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 9126, 12, 5715, 5301, 329, 12972, 41068, 6404, 78, 526, 15931, 198, 198, 834, 9800, 834, 796, 37227, 50, 461, 316, 609, 2778, 71, 560, 37811, 198, 834, 12888, 8...
2.351064
94
# coding: utf-8 import os.path try: from setuptools import setup extras = dict(zip_safe=False, test_suite='nose.collector', tests_require=['nose']) except ImportError: from distutils.core import setup extras = {} import apscheduler here = os.path.dirname(__file__) readme_path = os.path.join(here, 'R...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 11748, 28686, 13, 6978, 198, 198, 28311, 25, 198, 220, 220, 220, 422, 900, 37623, 10141, 1330, 9058, 628, 220, 220, 220, 33849, 796, 8633, 7, 13344, 62, 21230, 28, 25101, 11, 1332, 62, 2385, 57...
2.605317
489
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Travis Yates """Tests for object_detection.export_inference_graph.""" import os import mock import numpy as np import tensorflow as tf from object_detection import exporter from object_detection.builders import model_builder from object_detection.core i...
[ 2, 15069, 2177, 383, 309, 22854, 37535, 46665, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 19804, 34916, 198, 198, 37811, 51, 3558, 329, 2134, 62, 15255, 3213, 13, 39344, 62, 259, 4288, 62, 34960, 526, 15931, 198, 11748, 28686, 198, ...
3.459677
124
import os import sys import random main()
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 4738, 628, 198, 12417, 3419, 628, 198 ]
3.285714
14
"""Automated CI tools to run with Nox""" import nox from nox import Session locations = "src", "noxfile.py", "docs/conf.py" nox.options.sessions = "lint", "tests" package = "hypermodern_python"
[ 37811, 38062, 515, 14514, 4899, 284, 1057, 351, 399, 1140, 37811, 198, 11748, 645, 87, 198, 6738, 645, 87, 1330, 23575, 198, 198, 17946, 602, 796, 366, 10677, 1600, 366, 35420, 7753, 13, 9078, 1600, 366, 31628, 14, 10414, 13, 9078, 1,...
2.873239
71
import cocotb_test.simulator # For partial back compatibility
[ 198, 11748, 8954, 313, 65, 62, 9288, 13, 14323, 8927, 628, 198, 2, 1114, 13027, 736, 17764, 198 ]
3.611111
18
from django.apps import AppConfig
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628, 198 ]
3.6
10
""" ~ Tracing ~ This modules containes functions and classes related to the console debug long or trace. """ from enum import Enum, auto import time __all__ = ( "TraceLEVELS", "trace" ) m_use_debug = None def trace(message: str, level: TraceLEVELS = TraceLEVELS.NORMAL): """"...
[ 37811, 198, 220, 220, 220, 5299, 220, 220, 833, 4092, 220, 220, 220, 5299, 198, 220, 220, 220, 770, 13103, 3994, 274, 5499, 290, 6097, 198, 220, 220, 220, 3519, 284, 262, 8624, 14257, 890, 393, 12854, 13, 198, 37811, 198, 6738, 3382...
1.910891
505
""" sunkit-image ============ A image processing toolbox for Solar Physics. * Homepage: https://sunpy.org * Documentation: https://sunkit-image.readthedocs.io/en/latest/ """ import sys from .version import version as __version__ # NOQA # Enforce Python version check during package import. __minimum_python_version_...
[ 37811, 198, 82, 2954, 270, 12, 9060, 198, 25609, 198, 198, 32, 2939, 7587, 2891, 3524, 329, 12347, 23123, 13, 198, 198, 9, 5995, 7700, 25, 3740, 1378, 19155, 9078, 13, 2398, 198, 9, 43925, 25, 3740, 1378, 82, 2954, 270, 12, 9060, ...
3.029268
205
import plotly.graph_objects as go import plotly.express as px import pandas as pd
[ 11748, 7110, 306, 13, 34960, 62, 48205, 355, 467, 198, 11748, 7110, 306, 13, 42712, 355, 279, 87, 198, 11748, 19798, 292, 355, 279, 67 ]
3.24
25
# Exercise 4.11 # Author: Noah Waterfield Price import sys g = 9.81 # acceleration due to gravity try: # initial velocity (convert to m/s) v0 = (1000. / 3600) * float(sys.argv[1]) mu = float(sys.argv[2]) # coefficient of friction except IndexError: print 'Both v0 (in km/s) and mu must be supplied on...
[ 2, 32900, 604, 13, 1157, 198, 2, 6434, 25, 18394, 5638, 3245, 7886, 198, 198, 11748, 25064, 198, 70, 796, 860, 13, 6659, 220, 1303, 20309, 2233, 284, 13522, 198, 198, 28311, 25, 198, 220, 220, 220, 1303, 4238, 15432, 357, 1102, 1851...
2.488722
266
# Testing code to check update status on demand from socketIO_client import SocketIO, LoggingNamespace from threading import Thread socketIO = SocketIO('localhost', 3000) status = 'pause' receive_thread = Thread(target=_receive_thread, daemon=True) receive_thread.start() socketIO.on('pushState', on_push_state) # is...
[ 2, 23983, 2438, 284, 2198, 4296, 3722, 319, 3512, 198, 6738, 17802, 9399, 62, 16366, 1330, 47068, 9399, 11, 5972, 2667, 36690, 10223, 198, 6738, 4704, 278, 1330, 14122, 198, 198, 44971, 9399, 796, 47068, 9399, 10786, 36750, 3256, 20343, ...
3.382813
128
__version__ = "2.1.1" # Work around to update TensorFlow's absl.logging threshold which alters the # default Python logging output behavior when present. # see: https://github.com/abseil/abseil-py/issues/99 # and: https://github.com/tensorflow/tensorflow/issues/26691#issuecomment-500369493 try: import absl.logging...
[ 834, 9641, 834, 796, 366, 17, 13, 16, 13, 16, 1, 198, 198, 2, 5521, 1088, 284, 4296, 309, 22854, 37535, 338, 2352, 75, 13, 6404, 2667, 11387, 543, 40866, 262, 198, 2, 4277, 11361, 18931, 5072, 4069, 618, 1944, 13, 198, 2, 766, 2...
2.26811
2,540
from __future__ import absolute_import, division, print_function data = r"""cdials_array_family_flex_ext shoebox p1 (tRp2 (cscitbx_array_family_flex_ext grid p3 ((I0 t(I8 tI01 tRp4 (I8 tbS'\x02\x01\x02\x08\x00\x03\\\x01\x03m\x01\x03\x04\x06\x03\x15\x06\x00\x02\x01\x02\x03\x02\x01\x02\x11\x02\x11\x02\x9c\x02\x06\x02\x8...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 198, 198, 7890, 796, 374, 37811, 10210, 8231, 62, 18747, 62, 17989, 62, 32880, 62, 2302, 198, 1477, 78, 1765, 1140, 198, 79, 16, 198, 7, 83, 49, 79, 17,...
1.316733
69,437
#!/usr/bin/env python """ Info: This script loads the model trained in the cnn-asl.py script and enables the user to use it for classifying unseen ASL letters. It also visualizes the feature map of the last convolutional layer of the network to enable the user to get an insight into exactly which parts of the original ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 198, 12360, 25, 770, 4226, 15989, 262, 2746, 8776, 287, 262, 269, 20471, 12, 292, 75, 13, 9078, 4226, 290, 13536, 262, 2836, 284, 779, 340, 329, 1398, 4035, 29587, 7054, 43, 7...
3.123457
486
from Algorithmia import ADK # API calls will begin at the apply() method, with the request body passed as 'input' # For more details, see algorithmia.com/developers/algorithm-development/languages # This turns your library code into an algorithm that can run on the platform. # If you intend to use loading operation...
[ 6738, 978, 7727, 20730, 1330, 5984, 42, 628, 198, 2, 7824, 3848, 481, 2221, 379, 262, 4174, 3419, 2446, 11, 351, 262, 2581, 1767, 3804, 355, 705, 15414, 6, 198, 2, 1114, 517, 3307, 11, 766, 11862, 544, 13, 785, 14, 16244, 364, 14,...
3.964539
141
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
[ 2, 15069, 2864, 6186, 13, 785, 11, 3457, 13, 393, 663, 29116, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 11074, 198, 2, 921, 743, 407, 779, 428, 2393, ...
3.181572
369
"""Errors module.""" __all__ = [ 'Error', 'AddressError', 'AuthenticationError', 'TransportError', 'ValidationError', 'RegisterError', 'MessageError', 'DBusError', 'SignatureError', 'TooLongError', ]
[ 37811, 9139, 5965, 8265, 526, 15931, 198, 198, 834, 439, 834, 796, 685, 198, 220, 220, 220, 705, 12331, 3256, 198, 220, 220, 220, 705, 20231, 12331, 3256, 198, 220, 220, 220, 705, 47649, 3299, 12331, 3256, 198, 220, 220, 220, 705, 8...
2.367925
106
from XDR_iocs import * import pytest from freezegun import freeze_time Client.severity = 'INFO' client = Client({'url': 'test'}) def test_create_file_sync_all_types(self, mocker): """ Given: - Sync command When: - iocs as all types ...
[ 6738, 1395, 7707, 62, 72, 420, 82, 1330, 1635, 198, 11748, 12972, 9288, 198, 6738, 1479, 89, 1533, 403, 1330, 16611, 62, 2435, 628, 198, 11792, 13, 28116, 414, 796, 705, 10778, 6, 198, 16366, 796, 20985, 15090, 6, 6371, 10354, 705, ...
1.851783
5,411
from django.contrib.auth.models import AbstractUser from django.db.models import CharField from django.urls import reverse from django.utils.translation import ugettext_lazy as _ from django.db import models from PIL import Image
[ 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 27741, 12982, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 1330, 3178, 15878, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 198, 6738, 42625, 14208, 13, 26791, 13, 415...
3.553846
65
# Copyright (c) 2015-2020 Cloudify Platform Ltd. 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 b...
[ 2, 15069, 357, 66, 8, 1853, 12, 42334, 10130, 1958, 19193, 12052, 13, 1439, 2489, 10395, 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, 2...
3.355872
281
# -*- coding: utf-8 -*- """ Created on Sun Aug 19 17:48:13 2018 @author: Sediment """ # -*- coding: utf-8 -*- ''' Keras implementation of deep embedder to improve clustering, inspired by: "Unsupervised Deep Embedding for Clustering Analysis" (Xie et al, ICML 2016) Definition can accept somewhat custom ne...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 41972, 319, 3825, 2447, 678, 1596, 25, 2780, 25, 1485, 2864, 201, 198, 201, 198, 31, 9800, 25, 22710, 3681, 201, 198, 37811, 201, 198, 201, 198, ...
3.011601
431