content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
import json, io, os, os.path from Catalog.Schema import DBSchema, DBSchemaEncoder, DBSchemaDecoder from Query.Plan import PlanBuilder from Storage.StorageEngine import StorageEngine if __name__ == "__main__": import doctest doctest.testmod()
[ 11748, 33918, 11, 33245, 11, 28686, 11, 28686, 13, 6978, 198, 198, 6738, 44515, 13, 27054, 2611, 220, 220, 220, 220, 220, 220, 220, 1330, 360, 4462, 2395, 2611, 11, 360, 4462, 2395, 2611, 27195, 12342, 11, 360, 4462, 2395, 2611, 10707...
2.673267
101
import numpy as np import mylib
[ 11748, 299, 32152, 355, 45941, 198, 198, 11748, 616, 8019, 628 ]
3.090909
11
""" Registry general data files """ from typing import Any from moderngl_window.resources.base import BaseRegistry from moderngl_window.meta import DataDescription data = DataFiles()
[ 37811, 198, 8081, 4592, 2276, 1366, 3696, 198, 37811, 198, 6738, 19720, 1330, 4377, 198, 6738, 7019, 782, 75, 62, 17497, 13, 37540, 13, 8692, 1330, 7308, 8081, 4592, 198, 6738, 7019, 782, 75, 62, 17497, 13, 28961, 1330, 6060, 11828, 6...
3.72
50
import unittest from routes import Mapper
[ 11748, 555, 715, 395, 201, 198, 6738, 11926, 1330, 337, 11463, 201, 198 ]
3.384615
13
""" python config_slave.py 127.0.0.1 38000 38006 127.0.0.2 18999 18002 will generate 4 slave server configs accordingly. will be used in deployment automation to configure a cluster. usage: python config_slave.py <host1> <port1> <port2> <host2> <port3> ... """ import argparse import collections import json import ...
[ 37811, 198, 220, 220, 220, 21015, 4566, 62, 36341, 13, 9078, 18112, 13, 15, 13, 15, 13, 16, 4353, 830, 4353, 28041, 18112, 13, 15, 13, 15, 13, 17, 1248, 17032, 21431, 17, 198, 198, 10594, 7716, 604, 11778, 4382, 4566, 82, 16062, 1...
2.809249
173
#1) Write a function, sublist, that takes in a list of numbers as the parameter. In the function, use a while loop to return a sublist of the input list. # The sublist should contain the same values of the original list up until it reaches the number 5 (it should not contain the number 5). #2) Write a function called...
[ 2, 16, 8, 19430, 257, 2163, 11, 850, 4868, 11, 326, 2753, 287, 257, 1351, 286, 3146, 355, 262, 11507, 13, 554, 262, 2163, 11, 779, 257, 981, 9052, 284, 1441, 257, 850, 4868, 286, 262, 5128, 1351, 13, 220, 198, 2, 383, 850, 4868,...
3.753425
511
# -*- coding: utf-8 -*- """ TencentBlueKing is pleased to support the open source community by making -(BlueKing-IAM) available. Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in compliance with the Licens...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 24893, 1087, 14573, 15708, 318, 10607, 284, 1104, 262, 1280, 2723, 2055, 416, 1642, 532, 7, 14573, 15708, 12, 40, 2390, 8, 1695, 13, 198, 15269, 357, 34, 8...
3.468085
987
import util import libtcodpy as tcod import enemies import operator
[ 11748, 7736, 198, 11748, 9195, 83, 19815, 9078, 355, 256, 19815, 198, 11748, 5775, 198, 11748, 10088, 628, 198 ]
3.684211
19
#!/usr/bin/python3 from PIL import Image from numpy import complex, array from tqdm import tqdm import colorsys W=512 #W=142 if __name__ == "__main__": img = Image.new("RGB", (W, int(W / 2))) pixels = img.load() for x in tqdm(range(img.size[0])): for y in tqdm(range(img.size[1])): xx...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 6738, 350, 4146, 1330, 7412, 198, 6738, 299, 32152, 1330, 3716, 11, 7177, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 198, 11748, 7577, 893, 198, 198, 54, 28, 25836, 198,...
1.96748
246
# # -*- coding: utf-8 -*- # # Copyright (c) 2018 Intel 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 License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
[ 2, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 357, 66, 8, 2864, 8180, 10501, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, ...
2.924577
769
#!/usr/bin/env python # # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # # Jiao Lin # California Institute of Technology # (C) 2006-2010 All Rights Reserved # # {LicenseText} # # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 2, 220, 27156, 27156, 27156, 27156, 15116, 8728, 4907, 198, 2, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
2.525478
314
from .base_options import BaseOptions
[ 6738, 764, 8692, 62, 25811, 1330, 7308, 29046, 198 ]
4.222222
9
# -*- coding: utf-8 -*- """ Created on Fri Apr 24 18:45:34 2020 @author: kakdemi """ import pandas as pd #importing generators all_generators = pd.read_excel('generators2.xlsx', sheet_name='NEISO generators (dispatch)') #getting all oil generators all_oil = all_generators[all_generators['typ']=='oil'].copy() #gett...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 19480, 2758, 1987, 1248, 25, 2231, 25, 2682, 12131, 198, 198, 31, 9800, 25, 479, 461, 9536, 72, 198, 37811, 198, 198, 11748, 19798, 292, 355, 2...
2.452883
711
# -*- coding: utf-8 -*- """ Created on Tue Nov 16 19:47:41 2021 @author: User """ import tkinter as tk racine = tk . Tk () label = tk . Label ( racine , text ="J ' adore Python !") bouton = tk . Button ( racine , text =" Quitter ", command = racine . destroy ) label . pack () bouton . pack ()
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 41972, 319, 30030, 5267, 1467, 678, 25, 2857, 25, 3901, 33448, 201, 198, 201, 198, 31, 9800, 25, 11787, 201, 198, 37811, 201, 198, 201, 198, 1174...
2.456
125
from fastapi import APIRouter, status, Body, HTTPException from fastapi.encoders import jsonable_encoder from starlette.responses import JSONResponse from app.models.common import * from app.models.clickup import * from app.database.crud.clickup import * router = APIRouter()
[ 6738, 3049, 15042, 1330, 3486, 4663, 39605, 11, 3722, 11, 12290, 11, 14626, 16922, 198, 6738, 3049, 15042, 13, 12685, 375, 364, 1330, 33918, 540, 62, 12685, 12342, 198, 6738, 3491, 21348, 13, 16733, 274, 1330, 19449, 31077, 198, 198, 67...
3.409639
83
""" N.B imports are within functions to prevent tensorflow being imported before it's warnings are silenced """ import os import logging from imlib.general.logging import suppress_specific_logs tf_suppress_log_messages = [ "multiprocessing can interact badly with TensorFlow" ] def suppress_tf_logging(tf_suppre...
[ 37811, 198, 45, 13, 33, 17944, 389, 1626, 5499, 284, 2948, 11192, 273, 11125, 852, 17392, 878, 198, 270, 338, 14601, 389, 38086, 198, 37811, 198, 198, 11748, 28686, 198, 11748, 18931, 198, 6738, 545, 8019, 13, 24622, 13, 6404, 2667, 1...
2.779116
249
# coding=utf-8 import dateutil.parser import flask import json import os import time import urllib import yaml EPISODES = yaml.load(open("episodes.yaml").read()) app = flask.Flask(__name__, static_path="/assets", static_folder="assets") app.jinja_env.filters["strftime"] = \ ...
[ 2, 19617, 28, 40477, 12, 23, 198, 11748, 3128, 22602, 13, 48610, 198, 11748, 42903, 198, 11748, 33918, 198, 11748, 28686, 198, 11748, 640, 198, 11748, 2956, 297, 571, 198, 11748, 331, 43695, 628, 198, 8905, 1797, 3727, 1546, 796, 331, ...
2.394231
208
#!/usr/bin/env python3 from functools import * import operator print(sum(digits(factorial(100))))
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 6738, 1257, 310, 10141, 1330, 1635, 198, 11748, 10088, 198, 198, 4798, 7, 16345, 7, 12894, 896, 7, 22584, 5132, 7, 3064, 35514, 198 ]
2.857143
35
import numpy as np from math import cos, sin, pi import cv2 import random from config import config, TransformationParams from data_prep import map_coco_to_personlab class Transformer:
[ 11748, 299, 32152, 355, 45941, 198, 6738, 10688, 1330, 8615, 11, 7813, 11, 31028, 198, 11748, 269, 85, 17, 198, 11748, 4738, 198, 198, 6738, 4566, 1330, 4566, 11, 49127, 10044, 4105, 198, 6738, 1366, 62, 46012, 1330, 3975, 62, 66, 256...
3.481481
54
# -*- coding: utf-8 -*- """ Created on Wed Dec 25 15:46:32 2019 @author: tadahaya """ from .binom import BT from .connect import Connect from .fet import FET from .gsea import GSEA from .ssgsea import ssGSEA __copyright__ = 'Copyright (C) 2020 MIZUNO Tadahaya' __version__ = '1.0.3' __license__...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 41972, 319, 3300, 4280, 1679, 1315, 25, 3510, 25, 2624, 13130, 201, 198, 201, 198, 31, 9800, 25, 36264, 993, 11729, 201, 198, 37811, 201, 198, 20...
2.23913
184
""" Selfium Helper Files ~~~~~~~~~~~~~~~~~~~ All Helper Files used in Selfium project; :copyright: (c) 2021 - Caillou and ZeusHay; :license: MIT, see LICENSE for more details. """ from .getUser import * from .getGuild import * from .params import * from .notify import * from .sendEmbed import * from .isStaff import *
[ 198, 37811, 198, 24704, 1505, 5053, 525, 13283, 198, 27156, 4907, 93, 198, 3237, 5053, 525, 13283, 973, 287, 12189, 1505, 1628, 26, 198, 25, 22163, 4766, 25, 357, 66, 8, 33448, 532, 6488, 359, 280, 290, 20620, 31306, 26, 198, 25, 43...
3.232323
99
# 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 app...
[ 2, 220, 220, 15069, 357, 66, 8, 33448, 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, 15341, 198, 2, 345, 743, 407, 779, 428, ...
2.09765
3,830
from faust import Record
[ 6738, 24685, 436, 1330, 13266, 628, 628, 198 ]
3.625
8
#!/usr/bin/python3 #------------------------------------------------------------------------------ # Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None #-------------------------------------------------------...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 2, 10097, 26171, 198, 198, 2, 30396, 329, 257, 13934, 5509, 10139, 13, 198, 2, 1398, 12200, 19667, 25, 198, 2, 220, 220, 220, 220, 825, 11593, 15003, 834, 7, 944, 11, 2124, 2599,...
3.602041
98
#!/usr/bin/env python3 from setuptools import setup, find_packages setup( name="", version="0.01", packages=find_packages(), install_requires=[ "fitbit" ], dependency_links=[ ], extras_require={ "tests": [ "flake8", "autopep8", ] } )
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 628, 198, 40406, 7, 198, 220, 220, 220, 1438, 2625, 1600, 198, 220, 220, 220, 2196, 2625, 15, 13, 486, 1600, 198, 220, ...
2
160
import sys sys.path.append("../") from src.app.sigma import SigmaConverter if __name__ == "__main__": sigmaconverter = SigmaConverter() sigmaconverter.read_from_file() sigmaconverter.write_to_excel()
[ 11748, 25064, 198, 17597, 13, 6978, 13, 33295, 7203, 40720, 4943, 198, 198, 6738, 12351, 13, 1324, 13, 82, 13495, 1330, 31669, 3103, 332, 353, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 264,...
2.488372
86
# Generated by Django 2.2.14 on 2020-11-08 05:40 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 1415, 319, 12131, 12, 1157, 12, 2919, 8870, 25, 1821, 201, 198, 201, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 201, 198, 201, 198 ]
2.514286
35
from model.sparsely_lstm_vae import * import torch.utils.data as data_utils from sklearn import preprocessing from utils.eval_methods import * device = get_default_device() # Read data # normal = pd.read_csv("data/SWaT_Dataset_Normal_v1.csv") # , nrows=1000) normal = pd.read_csv("data/SWaT/SWaT_Dataset_Normal_v1.csv...
[ 6738, 2746, 13, 82, 29572, 306, 62, 75, 301, 76, 62, 33353, 1330, 1635, 198, 11748, 28034, 13, 26791, 13, 7890, 355, 1366, 62, 26791, 198, 6738, 1341, 35720, 1330, 662, 36948, 198, 6738, 3384, 4487, 13, 18206, 62, 24396, 82, 1330, 1...
2.6
1,630
from __future__ import absolute_import, unicode_literals from dcs.celeryconf import app import time from django.core.mail import EmailMessage
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 28000, 1098, 62, 17201, 874, 198, 6738, 288, 6359, 13, 7015, 88, 10414, 1330, 598, 198, 11748, 640, 198, 198, 6738, 42625, 14208, 13, 7295, 13, 4529, 1330, 9570, 12837, 628 ]
3.6
40
#!/usr/bin/env python3 import importlib import os # automatically import any Python files in the models/ directory for file in sorted(os.listdir(os.path.dirname(__file__))): if file.endswith(".py") and not file.startswith("_"): model_name = file[: file.find(".py")] importlib.import_module("pytorc...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 1330, 8019, 198, 11748, 28686, 628, 198, 2, 6338, 1330, 597, 11361, 3696, 287, 262, 4981, 14, 8619, 198, 1640, 2393, 287, 23243, 7, 418, 13, 4868, 15908, 7, 418, 13, ...
2.709924
131
# -*- coding: utf-8 -*- __author__ = '' SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://root:mapei123@127.0.0.1:3306/awesome' SECRET_KEY = '\x88D\xf09\x91\x07\x98\x89\x87\x96\xa0A\xc68\xf9\xecJ:U\x17\xc5V\xbe\x8b\xef\xd7\xd8\xd3\xe6\x98*4' # Email MAIL_SERVER = 'smtp.exmail.qq.com' MAIL_PORT = 465 MAIL_USE_SSL = True MAI...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 834, 9800, 834, 796, 10148, 198, 17861, 1847, 3398, 3620, 56, 62, 35, 1404, 6242, 11159, 62, 47269, 796, 705, 28744, 13976, 10, 79, 4948, 893, 13976, 1378, 15763, 25, ...
1.91198
409
# Generated by Django 2.2 on 2020-08-01 08:08 from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 319, 12131, 12, 2919, 12, 486, 8487, 25, 2919, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, 9945, 13, 27530, 13, 2934, 1616, 295, 628 ]
2.904762
42
from typing import Any, List, Callable from fastapi import APIRouter, HTTPException, status, BackgroundTasks from app import schemas from app.core import docker_client import json from copy import deepcopy router = APIRouter()
[ 6738, 19720, 1330, 4377, 11, 7343, 11, 4889, 540, 198, 198, 6738, 3049, 15042, 1330, 3486, 4663, 39605, 11, 14626, 16922, 11, 3722, 11, 25353, 51, 6791, 198, 198, 6738, 598, 1330, 3897, 5356, 198, 6738, 598, 13, 7295, 1330, 36253, 62,...
3.68254
63
"""Model-related utilities. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from . import backend as K from .utils.generic_utils import has_arg from .utils.generic_utils import to_list from .engine.input_layer import Input from .engine.input_layer import...
[ 37811, 17633, 12, 5363, 20081, 13, 198, 37811, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 6738, 764, 1330, 30203, 355, 509...
2.13594
4,833
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. from __future__ import unicode_literals import json import os import os.path import subprocess import sys import unittest import pytest from ...__main__ import TESTING_TOOLS_ROOT CWD = os.getcwd() DATA_DIR = os.path.join...
[ 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 17168, 13789, 13, 198, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 33918, 198, 11748, 28686, 198, 11748, 2868...
1.743192
26,440
''' Wavelet kernel slice allows kernel operation on feature subset active_dims is iterable of feature dimensions to extract input_dim must equal dimension defined by active_dims ''' import numpy as np import tensorflow as tf from .. import util from . import kernel from .kernel_extras import *
[ 7061, 6, 198, 39709, 1616, 9720, 198, 48369, 3578, 9720, 4905, 319, 3895, 24637, 198, 5275, 62, 67, 12078, 318, 11629, 540, 286, 3895, 15225, 284, 7925, 198, 15414, 62, 27740, 1276, 4961, 15793, 5447, 416, 4075, 62, 67, 12078, 198, 70...
3.820513
78
#!/usr/bin/python3 #program to parse png images and change images # cmd: python3 transform.py # you must have local input/ and output/ directories # # name: R. Melton # date: 12/27/20 # cmdline: python transform.py cmd show image='city.png' --ulx=1 --uly=2 --brx=0 --bry=9 # python transform.py show city.png #...
[ 198, 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 2, 23065, 284, 21136, 279, 782, 4263, 290, 1487, 4263, 198, 2, 23991, 25, 21015, 18, 6121, 13, 9078, 198, 2, 345, 1276, 423, 1957, 5128, 14, 290, 5072, 14, 29196, 198, 2, 198, ...
2.541573
890
""" Would you rather? This plugin includes would you rather functionality """ import asyncio import random import re import discord import bot import plugins from pcbot import Config client = plugins.client # type: bot.Client db = Config("would-you-rather", data=dict(timeout=10, responses=["**{name}** would **{cho...
[ 37811, 10928, 345, 2138, 30, 770, 13877, 3407, 561, 345, 2138, 11244, 198, 37811, 198, 11748, 30351, 952, 198, 11748, 4738, 198, 11748, 302, 198, 198, 11748, 36446, 198, 198, 11748, 10214, 198, 11748, 20652, 198, 6738, 40653, 13645, 1330,...
2.778338
397
# -*- coding: utf-8 -*- # ---------------------------------------------------------------------------- # Copyright 2019-2020 ARM Limited or its affiliates # # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 16529, 10541, 198, 2, 15069, 13130, 12, 42334, 20359, 15302, 393, 663, 29116, 198, 2, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 19...
4.119658
234
import random import time from multiprocessing import Pool if __name__ == '__main__': process_names = [f'computer_{i}' for i in range(15)] pool = Pool(processes=5) pool.map(worker, process_names) # pool.terminate()
[ 11748, 4738, 198, 11748, 640, 198, 6738, 18540, 305, 919, 278, 1330, 19850, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1429, 62, 14933, 796, 685, 69, 6, 33215, 23330, 72, 92, 6, 329,...
2.689655
87
# -*- coding: utf-8 -*- """ Created on Mon Sep 7 11:48:59 2020 @author: mazal """ """ ========================================= Support functions of pydicom (Not sourced) ========================================= Purpose: Create support functions for the pydicom project """ """ Test mode 1 | Basics...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 41972, 319, 2892, 8621, 220, 767, 1367, 25, 2780, 25, 3270, 12131, 201, 198, 201, 198, 31, 9800, 25, 285, 1031, 282, 201, 198, 37811, 201, 198, ...
3.198442
2,439
import re regex = re.compile(r'[\n\r\t]')
[ 11748, 302, 198, 198, 260, 25636, 796, 302, 13, 5589, 576, 7, 81, 6, 58, 59, 77, 59, 81, 59, 83, 60, 11537, 628, 628, 628, 628, 628, 628, 628 ]
1.866667
30
from django.db import models from django.urls import reverse from django.utils import timezone from django.utils.safestring import mark_safe from django.conf import settings MAX_LEN_AUTHORS_FIELD = 512 CITATION_FORMAT_FLAVORS = ['html', 'ris', 'bibtex', 'biblatex'] DEFAULT_KEYWORDS = ['surface', 'topography']
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 198, 6738, 42625, 14208, 13, 26791, 1330, 640, 11340, 198, 6738, 42625, 14208, 13, 26791, 13, 49585, 395, 1806, 1330, 1317, 62, 21230, 198, 673...
2.925926
108
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-07-24 19:36 from __future__ import unicode_literals from django.db import migrations, models
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 940, 13, 20, 319, 2177, 12, 2998, 12, 1731, 678, 25, 2623, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 1...
2.736842
57
""" Your module description """ """ this is my second py code for my second lecture """ #print ('hello world') # this is a single line commment # this is my second line comment #print(type("123.")) #print ("Hello World".upper()) #print("Hello World".lower()) #print("hello" + "world" + ".") #print(2**3) #my_st...
[ 37811, 198, 7120, 8265, 6764, 198, 37811, 198, 37811, 198, 5661, 318, 616, 1218, 12972, 2438, 198, 198, 1640, 616, 1218, 19143, 198, 37811, 198, 198, 2, 4798, 19203, 31373, 995, 11537, 1303, 428, 318, 257, 2060, 1627, 725, 434, 220, 1...
2.60355
169
if __name__ == "__main__": run_tests() import time time_start = time.perf_counter() print(run()) time_end = time.perf_counter() - time_start print(f"Time: {time_end:0.4f} sec")
[ 628, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1057, 62, 41989, 3419, 198, 220, 220, 220, 1330, 640, 198, 220, 220, 220, 640, 62, 9688, 796, 640, 13, 525, 69, 62, 24588, 3419, 198,...
2.225806
93
from enum import Enum
[ 6738, 33829, 1330, 2039, 388, 628, 198 ]
3.428571
7
# -*- coding: utf-8 -*- from .LineApi import LINE from .lib.Gen.ttypes import *
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 764, 13949, 32, 14415, 1330, 48920, 198, 6738, 764, 8019, 13, 13746, 13, 83, 19199, 1330, 1635, 198 ]
2.424242
33
''' Created on Jun 17, 2021 @author: Sean ''' import PDF2CSV_GUI if __name__ == "__main__": main()
[ 7061, 6, 201, 198, 41972, 319, 7653, 1596, 11, 33448, 201, 198, 201, 198, 31, 9800, 25, 11465, 201, 198, 7061, 6, 201, 198, 11748, 12960, 17, 7902, 53, 62, 40156, 201, 198, 201, 198, 201, 198, 361, 11593, 3672, 834, 6624, 366, 834...
2.111111
54
#!/usr/bin/python import praw reddit = praw.Reddit('mob-secondbot') subreddit = reddit.subreddit("learnpython") for submission in subreddit.hot(limit=5): print("Title: ", submission.title) print("Text: ", submission.selftext) print("Score: ", submission.score) print("---------------------------------...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 11748, 279, 1831, 198, 198, 10748, 796, 279, 1831, 13, 22367, 10786, 39949, 12, 12227, 13645, 11537, 198, 198, 7266, 10748, 796, 18374, 13, 7266, 10748, 7203, 35720, 29412, 4943, 198, 198, 1640...
3.15534
103
from subprocess import Popen, PIPE, call name = "kazuate_liar.o" src = """ #include <iostream> #include <random> using namespace std; int main() { random_device rd; mt19937 mt(rd()); uniform_int_distribution<int> randfive(0, 4); uniform_int_distribution<int> randint(1, 100); int count = 0; ...
[ 6738, 850, 14681, 1330, 8099, 268, 11, 350, 4061, 36, 11, 869, 198, 198, 3672, 796, 366, 74, 1031, 4985, 62, 4528, 283, 13, 78, 1, 198, 10677, 796, 37227, 198, 198, 2, 17256, 1279, 72, 455, 1476, 29, 198, 2, 17256, 1279, 25120, ...
1.877095
537
""" Terrafort Generate terraform templates for specific resources """ import click from .providers.aws import Aws cli.add_command(Aws.aws_db_instance) cli.add_command(Aws.aws_iam_instance_profile) cli.add_command(Aws.aws_instance) cli.add_command(Aws.aws_security_group) if __name__ == "__main__": # pylint: di...
[ 37811, 198, 15156, 430, 3319, 198, 8645, 378, 1059, 430, 687, 24019, 329, 2176, 4133, 198, 37811, 198, 198, 11748, 3904, 198, 198, 6738, 764, 15234, 4157, 13, 8356, 1330, 5851, 82, 628, 198, 198, 44506, 13, 2860, 62, 21812, 7, 32, 1...
2.621622
148
import discord import app_util
[ 11748, 36446, 198, 11748, 598, 62, 22602, 628, 628 ]
3.777778
9
#!/usr/bin/env python3 import sys import re import numpy as np from PIL import Image moves = { 'e': (2, 0), 'se': (1, 2), 'sw': (-1, 2), 'w': (-2, 0), 'nw': (-1, -2), 'ne': (1, -2) } # Save (x, y): True/False in tiles. True = black, False = white. tiles = {} for line in open(sys.argv[1]).read().splitlines(): po...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 25064, 198, 11748, 302, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 350, 4146, 1330, 7412, 198, 198, 76, 5241, 796, 1391, 705, 68, 10354, 357, 17, 11, 657, 828, 70...
2.25355
493
#!/usr/bin/env python # Copyright 2017 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from __future__ import absolute_import from __future__ import print_function import argparse import gzip import json import os import s...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 15069, 2177, 383, 18255, 1505, 46665, 13, 1439, 2489, 10395, 13, 198, 2, 5765, 286, 428, 2723, 2438, 318, 21825, 416, 257, 347, 10305, 12, 7635, 5964, 326, 460, 307, 198, 2, 1043,...
2.431122
2,969
"""Write raw files to BIDS format. example usage: $ mne_bids raw_to_bids --subject_id sub01 --task rest --raw data.edf --bids_root new_path """ # Authors: Teon Brooks <teon.brooks@gmail.com> # Stefan Appelhoff <stefan.appelhoff@mailbox.org> # # License: BSD (3-clause) import mne_bids from mne_bids import wr...
[ 37811, 16594, 8246, 3696, 284, 347, 14255, 5794, 13, 198, 198, 20688, 8748, 25, 220, 720, 285, 710, 62, 65, 2340, 8246, 62, 1462, 62, 65, 2340, 1377, 32796, 62, 312, 850, 486, 1377, 35943, 1334, 198, 438, 1831, 1366, 13, 276, 69, ...
2.130336
1,757
if __name__ == "__main__": main()
[ 201, 198, 201, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 201, 198, 220, 220, 220, 1388, 3419, 201, 198 ]
1.913043
23
# you can write to stdout for debugging purposes, e.g. # print("this is a debug message") ''' Rotate an array A to the right by a given number of steps K. Covert the array to a deque Apply the rotate() method the rotate the deque in positive K steps Convert the deque to array ''' from collec...
[ 2, 345, 460, 3551, 284, 14367, 448, 329, 28769, 4959, 11, 304, 13, 70, 13, 198, 2, 3601, 7203, 5661, 318, 257, 14257, 3275, 4943, 198, 198, 7061, 6, 198, 220, 220, 220, 18481, 378, 281, 7177, 317, 284, 262, 826, 416, 257, 1813, ...
3.081818
110
# -*- coding: utf-8 -*- """ Python Markdown A Python implementation of John Gruber's Markdown. Documentation: https://python-markdown.github.io/ GitHub: https://github.com/Python-Markdown/markdown/ PyPI: https://pypi.org/project/Markdown/ Started by Manfred Stienstra (http://www.dwerg.net/). Maintained for a few yea...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 37906, 2940, 2902, 198, 198, 32, 11361, 7822, 286, 1757, 25665, 527, 338, 2940, 2902, 13, 198, 198, 24941, 341, 25, 3740, 1378, 29412, 12, 4102, 2902, 13, ...
3.14
400
import os
[ 11748, 28686, 628 ]
3.666667
3
# Copyright 2020 Huawei Technologies Co., Ltd # # 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...
[ 2, 15069, 12131, 43208, 21852, 1766, 1539, 12052, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198...
2.961298
801
import datetime import boto3 US_EAST_REGION = {'us-east-1'} US_EAST_AVAILABILITY_ZONES = {'us-east-1a', 'us-east-1b', 'us-east-1c', 'us-east-1e'} # note d is missing INSTANCE_VERSION = 'Linux/UNIX (Amazon VPC)' def fetch_price_stats_per_availability_zone(region, start_time, end_time, instance_type, instance_vers...
[ 11748, 4818, 8079, 198, 198, 11748, 275, 2069, 18, 198, 198, 2937, 62, 36, 11262, 62, 31553, 2849, 796, 1391, 6, 385, 12, 23316, 12, 16, 6, 92, 198, 198, 2937, 62, 36, 11262, 62, 10116, 32, 47164, 25382, 62, 57, 39677, 796, 1391, ...
2.221374
1,572
from .nearest_neighbor_index import NearestNeighborIndex from .kd_tree import *
[ 198, 6738, 764, 710, 12423, 62, 710, 394, 2865, 62, 9630, 1330, 3169, 12423, 46445, 2865, 15732, 198, 6738, 764, 74, 67, 62, 21048, 1330, 1635, 198 ]
3
27
''' Author: huangbaochen<huangbaochenwo@live.com> Date: 2021-12-11 20:04:19 LastEditTime: 2021-12-11 21:46:16 LastEditors: huangbaochen<huangbaochenwo@live.com> Description: Try No MERCY ''' import pytest from fppy.try_monad import Try, Success, Fail from fppy.option import Just, Nothing def test_try_monad_map(): ...
[ 7061, 6, 198, 13838, 25, 289, 84, 648, 7012, 420, 831, 27, 13415, 648, 7012, 420, 831, 21638, 31, 12583, 13, 785, 29, 198, 10430, 25, 33448, 12, 1065, 12, 1157, 1160, 25, 3023, 25, 1129, 198, 5956, 18378, 7575, 25, 33448, 12, 1065...
2.470356
253
from datetime import date from typing import Dict, Optional from sqlalchemy.orm import Session from sqlalchemy.sql.expression import func from app.database.models import Quote TOTAL_DAYS = 366 def create_quote_object(quotes_fields: Dict[str, Optional[str]]) -> Quote: """This function create a quote object from...
[ 6738, 4818, 8079, 1330, 3128, 198, 6738, 19720, 1330, 360, 713, 11, 32233, 198, 198, 6738, 44161, 282, 26599, 13, 579, 1330, 23575, 198, 6738, 44161, 282, 26599, 13, 25410, 13, 38011, 1330, 25439, 198, 198, 6738, 598, 13, 48806, 13, 2...
3.031847
314
n, k = map(int, input().split()) w = list(map(int, input().split())) r = sum(map(lambda x: (x+k-1)//k, w)) print((r+1)//2)
[ 77, 11, 479, 796, 3975, 7, 600, 11, 5128, 22446, 35312, 28955, 198, 86, 796, 1351, 7, 8899, 7, 600, 11, 5128, 22446, 35312, 3419, 4008, 198, 81, 796, 2160, 7, 8899, 7, 50033, 2124, 25, 357, 87, 10, 74, 12, 16, 8, 1003, 74, 11,...
2.084746
59
import os import sys
[ 198, 11748, 28686, 198, 11748, 25064, 628, 628, 628 ]
3
9
from telemetry.TruckConstants import ConstantValues from telemetry.TruckCurrent import CurrentValues from telemetry.TruckPositioning import Positioning
[ 6738, 5735, 41935, 13, 51, 30915, 34184, 1187, 1330, 20217, 40161, 198, 6738, 5735, 41935, 13, 51, 30915, 11297, 1330, 9236, 40161, 198, 6738, 5735, 41935, 13, 51, 30915, 26545, 278, 1330, 23158, 278, 628, 628, 198 ]
4.216216
37
import csv from pyspark.sql import SparkSession from pyspark.sql.types import IntegerType spark = SparkSession.builder.appName("Assignment4").getOrCreate() sc = spark.sparkContext # load data to dataframe path = 'fake_data.csv' df = spark.read.format('csv').option('header','true').load(path) # cast income as an int...
[ 198, 11748, 269, 21370, 198, 6738, 279, 893, 20928, 13, 25410, 1330, 17732, 36044, 198, 6738, 279, 893, 20928, 13, 25410, 13, 19199, 1330, 34142, 6030, 198, 198, 2777, 668, 796, 17732, 36044, 13, 38272, 13, 1324, 5376, 7203, 8021, 16747...
2.513559
590
import factory from django.contrib.auth import get_user_model
[ 11748, 8860, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 651, 62, 7220, 62, 19849, 628 ]
3.368421
19
from dataclasses import dataclass, field from reamber.base.Hold import Hold, HoldTail from reamber.o2jam.O2JNoteMeta import O2JNoteMeta
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 11, 2214, 198, 198, 6738, 302, 7789, 13, 8692, 13, 26807, 1330, 9340, 11, 9340, 51, 603, 198, 6738, 302, 7789, 13, 78, 17, 39159, 13, 46, 17, 41, 6425, 48526, 1330, 440, 17, 41, 6425...
2.957447
47
import lightbulb from apscheduler.schedulers.asyncio import AsyncIOScheduler from peacebot.core.utils.time import TimeConverter
[ 11748, 1657, 15065, 65, 198, 6738, 257, 862, 1740, 18173, 13, 1416, 704, 377, 364, 13, 292, 13361, 952, 1330, 1081, 13361, 40, 2640, 1740, 18173, 198, 198, 6738, 4167, 13645, 13, 7295, 13, 26791, 13, 2435, 1330, 3862, 3103, 332, 353, ...
3
44
import unittest from appium import webdriver if __name__ == '__main__': suite = unittest.TestLoader().loadTestsFromTestCase(MSiteDefaultBrowserAndroidUITests) unittest.TextTestRunner(verbosity=2).run(suite)
[ 11748, 555, 715, 395, 198, 198, 6738, 598, 1505, 1330, 3992, 26230, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 18389, 796, 555, 715, 395, 13, 14402, 17401, 22446, 2220, 51, 3558, 4863, 1440...
2.868421
76
""" Created on 17-June-2020 @author Jibesh Patra The types extracted during runtime usually look something like --> <class 'numpy.ndarray'> or <class 'seaborn.palettes._ColorPalette'> change them to --> ndarray, ColorPalette """ import re remove_chars = re.compile(r'>|\'|<|(class )|_|(type)')
[ 37811, 198, 198, 41972, 319, 1596, 12, 15749, 12, 42334, 198, 31, 9800, 449, 571, 5069, 3208, 430, 198, 198, 464, 3858, 21242, 1141, 19124, 3221, 804, 1223, 588, 14610, 1279, 4871, 705, 77, 32152, 13, 358, 18747, 44167, 393, 198, 27, ...
2.931373
102
from PyQt5.QtGui import * from PyQt5.QtCore import * from PyQt5.QtWidgets import * from matplotlib import pyplot as plt from matplotlib.figure import Figure from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas import matplotlib.ticker as ticker import numpy as np import random, matplotlib...
[ 6738, 9485, 48, 83, 20, 13, 48, 83, 8205, 72, 1330, 1635, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 14055, 1330, 1635, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 54, 312, 11407, 1330, 1635, 198, 198, 6738, 2603, 29487, 8019, 1330, ...
2.831933
119
'''Functional tests for CPG''' from .. import CircuitPlayground from .. import __version__ as CircuitPlaygroundVersion import time def test_led(cpg) -> None: '''Flash LEDs and run a short chasing light.''' _printFuncTestHeadingWithDeliLine('LED-Test: Flash LEDs and run a short chasing light...') print('fl...
[ 7061, 6, 22203, 282, 5254, 329, 327, 6968, 7061, 6, 198, 198, 6738, 11485, 1330, 13588, 11002, 2833, 198, 6738, 11485, 1330, 11593, 9641, 834, 355, 13588, 11002, 2833, 14815, 198, 11748, 640, 198, 198, 4299, 1332, 62, 992, 7, 66, 6024...
2.585728
1,079
from django.db import models
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198 ]
3.625
8
from math import sqrt import torch from torch_geometric.utils import geodesic_distance
[ 6738, 10688, 1330, 19862, 17034, 198, 198, 11748, 28034, 198, 6738, 28034, 62, 469, 16996, 13, 26791, 1330, 4903, 4147, 291, 62, 30246, 628 ]
3.708333
24
# Copyright 2009-present MongoDB, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
[ 2, 15069, 3717, 12, 25579, 42591, 11012, 11, 3457, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, ...
2.622873
1,058
"""This module tests Stanford NLP processors.""" import os import unittest from texar.torch import HParams from forte.pipeline import Pipeline from forte.data.readers import StringReader from forte.processors.stanfordnlp_processor import StandfordNLPProcessor from ft.onto.base_ontology import Token, Sentence
[ 37811, 1212, 8265, 5254, 13863, 399, 19930, 20399, 526, 15931, 198, 11748, 28686, 198, 11748, 555, 715, 395, 198, 198, 6738, 48659, 283, 13, 13165, 354, 1330, 6574, 283, 4105, 198, 198, 6738, 329, 660, 13, 79, 541, 4470, 1330, 37709, ...
3.477778
90
#! /usr/bin/env python3 # -*- coding: utf-8 -*- """ Serve current folder files in a HTTP webserver. """ import socketserver from threading import Thread from http.server import SimpleHTTPRequestHandler PORT = 8000 if __name__ == '__main__': thread = start_http_server() thread.join()
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 50, 3760, 1459, 9483, 3696, 287, 257, 14626, 2639, 18497, 13, 198, 37811, 198, 11748, 37037, 18497, ...
2.97
100
# coding: utf-8 # TODO: Check the value of __debug__ inside of the compiled block! # According to the documentation, it should follow the optimize flag. # However, cpython3.5.0a0 behaves the same way as PyPy (__debug__ follows # -O, -OO flags of the interpreter).
[ 2, 19617, 25, 3384, 69, 12, 23, 628, 198, 198, 2, 16926, 46, 25, 6822, 262, 1988, 286, 11593, 24442, 834, 2641, 286, 262, 14102, 2512, 0, 198, 2, 220, 220, 220, 220, 220, 220, 4784, 284, 262, 10314, 11, 340, 815, 1061, 262, 2718...
2.938144
97
import yfinance as yf import matplotlib.pyplot as plt import plotly.express as px import plotly.graph_objects as go from plotly.subplots import make_subplots import pandas as pd from IPython.display import Markdown import numpy as np from datetime import date, timedelta
[ 198, 11748, 331, 69, 14149, 355, 331, 69, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 7110, 306, 13, 42712, 355, 279, 87, 198, 11748, 7110, 306, 13, 34960, 62, 48205, 355, 467, 198, 6738, 7110, 306, 13,...
3.22093
86
#!/usr/bin/env python # -*- coding: utf-8 -*- ########################################################### # WARNING: Generated code! # # ************************** # # Manual changes may get lost if file is generated again. # # Only code inside the [MANUAL] ta...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 29113, 14468, 7804, 21017, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 39410, 25, ...
3.113314
353
# -*- coding: utf-8 -*- # # Copyright (c) 2021, Dana Lehman # Copyright (c) 2020, Geoffrey M. Poore # All rights reserved. # # Licensed under the BSD 3-Clause License: # http://opensource.org/licenses/BSD-3-Clause # from .quiz import Quiz, Question, GroupStart, GroupEnd, TextRegion BEFORE_ITEMS = '''\ <?xml version...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 357, 66, 8, 33448, 11, 22937, 29921, 805, 198, 2, 15069, 357, 66, 8, 12131, 11, 42803, 337, 13, 7695, 382, 198, 2, 1439, 2489, 10395, 13, 198, 2,...
1.972595
13,501
#!/usr/bin/env python """Tests for `bids_statsmodels_design_synthesizer` package.""" import pytest import subprocess as sp from pathlib import Path SYNTHESIZER = "aggregate_stats_design.py" from bids_statsmodels_design_synthesizer import aggregate_stats_design as synth_mod # from bids_statsmodels_design_synthesizer...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 37811, 51, 3558, 329, 4600, 65, 2340, 62, 34242, 27530, 62, 26124, 62, 1837, 429, 956, 7509, 63, 5301, 526, 15931, 198, 198, 11748, 12972, 9288, 198, 11748, 850, 14681, 355, 599, ...
2.495606
569
#!/usr/bin/env python # coding: utf-8 __author__ = 'whoami' """ @version: 1.0 @author: whoami @license: Apache Licence 2.0 @contact: skutil@gmail.com @site: http://www.itweet.cn @software: PyCharm Community Edition @file: plugin_api.py @time: 2015-11-28 1:52 """ from linux import cpu,disk,iostats,loadavg,memory,netst...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 834, 9800, 834, 796, 705, 8727, 6277, 6, 198, 198, 37811, 198, 31, 9641, 25, 352, 13, 15, 198, 31, 9800, 25, 508, 6277, 198, 31, 43085, 25, ...
2.526718
131
import numpy as np import eyekit import algorithms import core data = eyekit.io.load(core.FIXATIONS / 'sample.json') passages = eyekit.io.load(core.DATA / 'passages.json') original_sequence = data['trial_5']['fixations'] fixation_XY = np.array([fixation.xy for fixation in original_sequence], dtype=int) word_XY = np....
[ 11748, 299, 32152, 355, 45941, 198, 11748, 1926, 988, 270, 198, 11748, 16113, 198, 11748, 4755, 198, 198, 7890, 796, 1926, 988, 270, 13, 952, 13, 2220, 7, 7295, 13, 47084, 18421, 1220, 705, 39873, 13, 17752, 11537, 198, 6603, 1095, 79...
2.663551
535
# # Autogenerated by Thrift Compiler (0.9.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py # from thrift.Thrift import TType, TMessageType, TException, TApplicationException from ttypes import * from thrift.Thrift import TProcessor from thrift.transport import TTransport ...
[ 2, 198, 2, 5231, 519, 877, 515, 416, 16283, 2135, 3082, 5329, 357, 15, 13, 24, 13, 15, 8, 198, 2, 198, 2, 8410, 5626, 48483, 4725, 48481, 7013, 15986, 311, 11335, 14603, 7013, 35876, 25003, 7013, 15986, 8410, 2751, 198, 2, 198, 2,...
3.148387
155
#! /usr/bin/env python from .core import gemucator
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 764, 7295, 1330, 16840, 1229, 1352, 198 ]
2.736842
19
import graphene from graphene_django import DjangoObjectType from graphene_django.converter import convert_django_field from pyuploadcare.dj.models import ImageField
[ 11748, 42463, 198, 6738, 42463, 62, 28241, 14208, 1330, 37770, 10267, 6030, 198, 6738, 42463, 62, 28241, 14208, 13, 1102, 332, 353, 1330, 10385, 62, 28241, 14208, 62, 3245, 198, 6738, 12972, 25850, 6651, 13, 28241, 13, 27530, 1330, 7412, ...
3.952381
42
#!/usr/bin/python3 ''' This script follows formulas put forth in Kislyuk et al. (2011) to calculate genome fluidity of a pangenome dataset. Variance and standard error are estimated as total variance containing both the variance due to subsampling all possible combinations (without replacement) of N genomes from th...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 7061, 6, 198, 1212, 4226, 5679, 32126, 1234, 6071, 287, 30519, 306, 2724, 2123, 435, 13, 357, 9804, 8, 284, 15284, 19270, 220, 198, 35522, 17995, 286, 257, 279, 648, 268, 462, 2703...
2.444964
4,061
# # This module provides the Instance class that encapsulate some complex server instances related operations # from __future__ import print_function from json import loads from neutronclient.v2_0 import client as neutron_client from novaclient import client as nova_client from cinderclient import client as cinder_cli...
[ 2, 198, 2, 770, 8265, 3769, 262, 2262, 590, 1398, 326, 32652, 5039, 617, 3716, 4382, 10245, 3519, 4560, 198, 2, 198, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 33918, 1330, 15989, 198, 6738, 49810, 16366, 13, 85, ...
3.96124
129
# Licensed under a 3-clause BSD style license - see LICENSE.rst """Tools to create profiles (i.e. 1D "slices" from 2D images).""" import numpy as np import scipy.ndimage from astropy import units as u from astropy.convolution import Box1DKernel, Gaussian1DKernel from astropy.coordinates import Angle from astropy.table ...
[ 2, 49962, 739, 257, 513, 12, 565, 682, 347, 10305, 3918, 5964, 532, 766, 38559, 24290, 13, 81, 301, 198, 37811, 33637, 284, 2251, 16545, 357, 72, 13, 68, 13, 352, 35, 366, 82, 677, 274, 1, 422, 362, 35, 4263, 21387, 15931, 198, ...
2.595628
549
# -*- coding: utf-8 -*- if __name__ == '__main__': main()
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419, 198 ]
1.969697
33
"""versatileimagefield Field mixins.""" import os import re from .datastructures import FilterLibrary from .registry import autodiscover, versatileimagefield_registry from .settings import ( cache, VERSATILEIMAGEFIELD_CREATE_ON_DEMAND, VERSATILEIMAGEFIELD_SIZED_DIRNAME, VERSATILEIMAGEFIELD_FILTERED_DIR...
[ 37811, 690, 12610, 9060, 3245, 7663, 5022, 1040, 526, 15931, 198, 11748, 28686, 198, 11748, 302, 198, 198, 6738, 764, 19608, 459, 1356, 942, 1330, 25853, 23377, 198, 6738, 764, 2301, 4592, 1330, 1960, 375, 29392, 11, 21362, 9060, 3245, ...
2.124691
2,021
# Copyright 2020, Google LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
[ 2, 15069, 12131, 11, 3012, 11419, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, ...
2.823414
1,529
import open3d as o3d import numpy as np pc_load_pathname = '/home/caizhongang/github/waymo_kitti_converter/007283-000.bin' pc = np.fromfile(pc_load_pathname, dtype=np.float32).reshape(-1, 3) pcd = o3d.geometry.PointCloud() pcd.points = o3d.utility.Vector3dVector(pc) axis = o3d.geometry.TriangleMesh.create_coordinat...
[ 11748, 1280, 18, 67, 355, 267, 18, 67, 198, 11748, 299, 32152, 355, 45941, 198, 198, 14751, 62, 2220, 62, 6978, 3672, 796, 31051, 11195, 14, 6888, 528, 71, 506, 648, 14, 12567, 14, 1014, 5908, 62, 74, 715, 72, 62, 1102, 332, 353, ...
2.316667
180
# Copyright 2013 Hewlett-Packard Development Company, L.P. # # Author: Kiall Mac Innes <kiall@managedit.ie> # # 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/lice...
[ 2, 15069, 2211, 30446, 15503, 12, 11869, 446, 7712, 5834, 11, 406, 13, 47, 13, 198, 2, 198, 2, 6434, 25, 21927, 439, 4100, 554, 2516, 1279, 4106, 439, 31, 39935, 270, 13, 494, 29, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 1...
3.542857
210
"""node-path implementation for OpenGLContext """ from vrml.vrml97 import nodepath, nodetypes from vrml.cache import CACHE from OpenGLContext import quaternion from OpenGL.GL import glMultMatrixf
[ 37811, 17440, 12, 6978, 7822, 329, 30672, 21947, 198, 37811, 198, 6738, 410, 81, 4029, 13, 37020, 4029, 5607, 1330, 18666, 538, 776, 11, 18666, 2963, 12272, 198, 6738, 410, 81, 4029, 13, 23870, 1330, 327, 2246, 13909, 198, 6738, 30672, ...
3.106061
66