content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
import numpy as np import os import six.moves.urllib as urllib import sys import tarfile import tensorflow as tf import zipfile from distutils.version import StrictVersion from collections import defaultdict from io import StringIO from matplotlib import pyplot as plt from PIL import Image import json import time im...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 11748, 2237, 13, 76, 5241, 13, 333, 297, 571, 355, 2956, 297, 571, 198, 11748, 25064, 198, 11748, 13422, 7753, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 19974, 7753, 19...
2.558176
636
from __future__ import unicode_literals import frappe, json from frappe.model.utils.user_settings import update_user_settings, sync_user_settings
[ 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 11748, 5306, 27768, 11, 33918, 198, 6738, 5306, 27768, 13, 19849, 13, 26791, 13, 7220, 62, 33692, 1330, 4296, 62, 7220, 62, 33692, 11, 17510, 62, 7220, 62, 33692, 628, 6...
3.547619
42
import BoltzmannMachine as bm import QHO as qho import numpy as np import datetime # Visualization imports from IPython.display import clear_output from PIL import Image import matplotlib.pyplot as plt import matplotlib matplotlib.rcParams['figure.dpi']=300 # Set the quantum gas with N particles, a limit of 10 for the...
[ 11748, 21764, 89, 9038, 37573, 355, 275, 76, 198, 11748, 1195, 32298, 355, 10662, 8873, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 4818, 8079, 198, 2, 15612, 1634, 17944, 198, 6738, 6101, 7535, 13, 13812, 1330, 1598, 62, 22915, 198...
3.085653
467
import time import os import sys import shutil import json import argparse from zipfile import ZipFile from contextlib import contextmanager from datetime import datetime from Tests.private_build.upload_packs_private import download_and_extract_index, update_index_with_priced_packs, \ extract_packs_artifacts from T...
[ 11748, 640, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 4423, 346, 198, 11748, 33918, 198, 11748, 1822, 29572, 198, 6738, 19974, 7753, 1330, 38636, 8979, 198, 6738, 4732, 8019, 1330, 4732, 37153, 198, 6738, 4818, 8079, 1330, 4818, 8...
2.516508
1,787
from django.apps import AppConfig
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
3.888889
9
dataset_type = 'FlyingChairs' data_root = 'data/FlyingChairs_release' img_norm_cfg = dict(mean=[0., 0., 0.], std=[255., 255., 255.], to_rgb=False) global_transform = dict( translates=(0.05, 0.05), zoom=(1.0, 1.5), shear=(0.86, 1.16), rotate=(-10., 10.)) relative_transform = dict( translates=(0.00...
[ 19608, 292, 316, 62, 4906, 796, 705, 49095, 1925, 3468, 6, 198, 7890, 62, 15763, 796, 705, 7890, 14, 49095, 1925, 3468, 62, 20979, 6, 198, 198, 9600, 62, 27237, 62, 37581, 796, 8633, 7, 32604, 41888, 15, 1539, 657, 1539, 657, 13, ...
2.153788
1,320
# Copyright 2019 Intel Corporation. import logging from collections import namedtuple import numpy as np import six from plaidml2 import DType from plaidml2.core import TensorShape, Buffer from plaidml2.ffi import ForeignObject, ffi, ffi_call, lib logger = logging.getLogger(__name__) def __init(): """Docstrin...
[ 2, 15069, 13130, 8180, 10501, 13, 198, 198, 11748, 18931, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2237, 198, 198, 6738, 458, 1698, 4029, 17, 1330, 360, 6030, 198, 6738, 458, 1698, ...
2.170106
1,987
""" 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 applicable law or agreed to in writin...
[ 37811, 198, 15069, 357, 66, 8, 2864, 8180, 10501, 198, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 921, 743, 73...
2.527181
791
""" Class description goes here. """ import json import logging
[ 198, 37811, 5016, 6764, 2925, 994, 13, 37227, 198, 198, 11748, 33918, 198, 11748, 18931, 628 ]
4.1875
16
# Orthogonal linear system solver tests from math import sqrt import numpy as np from orthogonal import orthogonal ################################################################################ # 2x2 orthogonal matrix A = np.matrix('1 1;' '1 -1', float) A = A*1.0/sqrt(2.0) # Known terms vector b = ...
[ 2, 47664, 519, 20996, 14174, 1080, 1540, 332, 5254, 198, 198, 6738, 10688, 1330, 19862, 17034, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 29617, 519, 20996, 1330, 29617, 519, 20996, 628, 198, 29113, 29113, 14468, 198, 2, 362, 8...
2.632399
321
import os import shutil from dataclasses import dataclass from datetime import datetime from typing import Dict, List, Optional from huggingface_hub import Repository from loguru import logger from prettytable import PrettyTable from .splits import TEST_SPLIT, TRAIN_SPLIT, VALID_SPLIT from .tasks import TASKS from .u...
[ 11748, 28686, 198, 11748, 4423, 346, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 19720, 1330, 360, 713, 11, 7343, 11, 32233, 198, 198, 6738, 46292, 2550, 62, 40140, 1330, 1432...
2.849224
451
# -*- coding: utf-8 -*- # Copyright 2012 Viewfinder Inc. All Rights Reserved. """Apple Push Notification service utilities. Original copyright for this code: https://github.com/jayridge/apnstornado TokenToBinary(): converts a hex-encoded token into a binary value CreateMessage(): formats a binary APNs message fr...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 2321, 3582, 22805, 3457, 13, 1439, 6923, 33876, 13, 198, 198, 37811, 16108, 23691, 42808, 2139, 20081, 13, 198, 198, 20556, 6634, 329, 428, 2438, 25, 3740, 137...
3.292199
705
r"""Training and evaluating quantum kernels =========================================== .. meta:: :property="og:description": Kernels and alignment training with Pennylane. :property="og:image": https://pennylane.ai/qml/_images/QEK_thumbnail.png .. related:: tutorial_kernel_based_training Kernel-based tr...
[ 81, 37811, 44357, 290, 22232, 14821, 50207, 198, 10052, 2559, 18604, 198, 198, 492, 13634, 3712, 198, 220, 220, 220, 1058, 26745, 2625, 519, 25, 11213, 1298, 509, 44930, 290, 19114, 3047, 351, 6595, 2645, 1531, 13, 198, 220, 220, 220, ...
3.134623
7,703
#!/usr/bin/python3 import pygame import random import time ##VARIABLES TO CHANGE width = 500 height = 500 stats_height = 150 board_size = 5 window_name = "PyLoopover "+str(board_size)+"x"+str(board_size) scramble_turns = 50 t_round = 3 FPS = 30 ##DONT CHANGE THESE BOIS WHITE = (255,255,255) BLACK = (0,0,0) GREEN = (3...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 11748, 12972, 6057, 198, 11748, 4738, 198, 11748, 640, 198, 198, 2235, 53, 1503, 3539, 9148, 1546, 5390, 5870, 27746, 198, 10394, 796, 5323, 198, 17015, 796, 5323, 198, 34242, 62, 17015, ...
2.270008
1,237
# for continue , continue = skip!!! for i in range(1,11): if i == 6: continue; print(i); print(i); print(i); print(i); print(i);
[ 2, 329, 2555, 837, 2555, 796, 14267, 10185, 201, 198, 1640, 1312, 287, 2837, 7, 16, 11, 1157, 2599, 201, 198, 220, 220, 220, 611, 1312, 6624, 718, 25, 201, 198, 220, 220, 220, 220, 220, 220, 220, 2555, 26, 201, 198, 220, 220, 22...
1.954023
87
# ============================================================================= # # Copyright (c) 2016, Cisco Systems # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # Redistributions of source ...
[ 2, 38093, 25609, 198, 2, 198, 2, 15069, 357, 66, 8, 1584, 11, 28289, 11998, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 2297, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, 11, 351, 393, 1231, 198, 2, 17613, 11, 389, 10431...
1.587887
4,227
# -*- coding: utf-8 -*- # Copyright to Alexander Liu. # Any distrubites of this copy should inform its author. If for commercial, please inform the author for authentication. Apr 2014 import sys reload(sys) sys.setdefaultencoding('utf-8') from lxml import etree import time import json import urllib import urllib2 # Fo...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 284, 10009, 18258, 13, 220, 198, 2, 4377, 1233, 25089, 2737, 286, 428, 4866, 815, 4175, 663, 1772, 13, 1002, 329, 5068, 11, 3387, 4175, 262, 1772, 329, 18239...
2.225588
2,509
from .color_converter import ColorConverter from .scale_converter import ScaleConverter
[ 6738, 764, 8043, 62, 1102, 332, 353, 1330, 5315, 3103, 332, 353, 198, 198, 6738, 764, 9888, 62, 1102, 332, 353, 1330, 21589, 3103, 332, 353, 198 ]
3.296296
27
from plasTeX import Command, Environment
[ 6738, 458, 292, 49568, 1330, 9455, 11, 9344, 628, 628, 628, 628, 628 ]
3.846154
13
print('\033[0;33;44mTeste\033[m') print('\033[4;33;44mTeste\033[m') print('\033[1;35;43mTeste\033[m') print('\033[7;32;40mTeste\033[m') print('\033[7;30mTeste\033[m') print(" - - - Testando os 40 - - -") print("\033[0;37;40mPreto\033[m") print("\033[0;30;41mVermelho\033[m") print("\033[0;30;42mVerde\033[m") print("\03...
[ 4798, 10786, 59, 44427, 58, 15, 26, 2091, 26, 2598, 76, 14402, 68, 59, 44427, 58, 76, 11537, 198, 4798, 10786, 59, 44427, 58, 19, 26, 2091, 26, 2598, 76, 14402, 68, 59, 44427, 58, 76, 11537, 198, 4798, 10786, 59, 44427, 58, 16, ...
1.86036
666
"""TurboGears project related information""" version = "2.4.3" description = "Next generation TurboGears" long_description=""" TurboGears brings together a best of breed python tools to create a flexible, full featured, and easy to use web framework. TurboGears 2 provides an integrated and well tested set of tools for...
[ 37811, 17483, 2127, 38, 4127, 1628, 3519, 1321, 37811, 198, 9641, 796, 366, 17, 13, 19, 13, 18, 1, 198, 11213, 796, 366, 10019, 5270, 22278, 38, 4127, 1, 198, 6511, 62, 11213, 2625, 15931, 198, 17483, 2127, 38, 4127, 6774, 1978, 257...
3.891892
333
## PRODUCE MEAN CALCULATIONS AND EXPORT AS .NPY from __future__ import print_function path = '/home/mkloewer/python/swm/' import os; os.chdir(path) # change working directory import numpy as np from scipy import sparse import time as tictoc from netCDF4 import Dataset # OPTIONS runfolder = 15 print('Calculating subgri...
[ 2235, 4810, 3727, 52, 5222, 11948, 1565, 33290, 34, 6239, 18421, 5357, 7788, 15490, 7054, 764, 22182, 56, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6978, 796, 31051, 11195, 14, 28015, 5439, 413, 263, 14, 29412, 14, 2032, ...
2.526316
323
""" Module to generate solutions for Boggle grids. Andrew Gillis 22 Dec. 2009 """ from __future__ import print_function import os import sys import collections import trie if sys.version < '3': range = xrange
[ 37811, 198, 26796, 284, 7716, 8136, 329, 347, 20258, 50000, 13, 198, 198, 20508, 12981, 271, 2534, 4280, 13, 3717, 198, 198, 37811, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 17...
3.338462
65
import logging import pytest from ocs_ci.framework.testlib import ( managed_service_required, skipif_ms_consumer, tier4, tier4a, ) from ocs_ci.ocs import constants from ocs_ci.utility import pagerduty log = logging.getLogger(__name__)
[ 11748, 18931, 198, 11748, 12972, 9288, 198, 198, 6738, 267, 6359, 62, 979, 13, 30604, 13, 9288, 8019, 1330, 357, 198, 220, 220, 220, 5257, 62, 15271, 62, 35827, 11, 198, 220, 220, 220, 14267, 361, 62, 907, 62, 49827, 11, 198, 220, ...
2.628866
97
# -*- coding: utf-8 -*- import numpy as np, pandas as pd, arviz as az, prince, matplotlib.pyplot as plt, seaborn as sns from cmdstanpy import CmdStanModel #%% load data data = pd.read_csv("data/overfitting.csv", index_col = 'case_id') data.columns data.info() feature_names = data.columns.str.startswith("...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 201, 198, 11748, 299, 32152, 355, 45941, 11, 19798, 292, 355, 279, 67, 11, 610, 85, 528, 355, 35560, 11, 19716, 11, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, ...
2.542097
1,354
# -*- coding: utf-8 -*- import json import threading import os import time import mats import sys import requests import traceback import re from util import debug, error
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 33918, 198, 11748, 4704, 278, 198, 11748, 28686, 198, 11748, 640, 198, 11748, 46054, 198, 11748, 25064, 198, 11748, 7007, 198, 11748, 12854, 1891, 198, 11748, ...
3.392157
51
# -*- coding: utf-8 -*- # Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: https://doc.scrapy.org/en/latest/topics/item-pipeline.html import os from scrapy import Request from scrapy.pipelines.images import ImagesPipeline from luoxia import settings
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 2896, 500, 534, 2378, 31108, 994, 198, 2, 198, 2, 2094, 470, 6044, 284, 751, 534, 11523, 284, 262, 7283, 3620, 62, 47, 4061, 3698, 1268, 1546, 4634, 198, 2, ...
2.906542
107
# Copyright 2020 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://aws.amazon.com/apache2.0/ # # or in the "license" file acc...
[ 2, 15069, 12131, 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, 921, 198, 2, 743, 407, 779, 428, 2393, ...
2.499564
2,296
#! /usr/bin/env python3 # Copyright 2020 Tier IV, 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 la...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 15069, 12131, 15917, 8363, 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, ...
3.413428
283
import asyncio import unittest from .helpers import async_test
[ 11748, 30351, 952, 198, 11748, 555, 715, 395, 198, 6738, 764, 16794, 364, 1330, 30351, 62, 9288, 628 ]
3.555556
18
import turtle as t t.penup() gotoy = 222 t.speed(0) t.setup(988,520) t.goto(494,260) t.pendown() for counter in range(7): t.setheading(-90) rectangle(40,988,'#B22234') t.setheading(-90) t.forward(80) t.penup() t.setheading(0) t.goto(-494,260) t.pendown() rectangle(494,280,'...
[ 11748, 28699, 355, 256, 201, 198, 201, 198, 83, 13, 3617, 929, 3419, 201, 198, 201, 198, 23442, 726, 796, 27795, 201, 198, 201, 198, 83, 13, 12287, 7, 15, 8, 201, 198, 83, 13, 40406, 7, 24, 3459, 11, 31211, 8, 201, 198, 83, 13...
1.774327
483
# Given a linked list, remove consecutive nodes that sums up to zero # https://www.careercup.com/question?id=5717797377146880 from util import * if __name__ == "__main__": s1 = [6, -6, 8, 4, -12, 9, 8, -8] s2 = [4, 6 - 10, 8, 9, 10, -19, 10, -18, 20, 25] s3 = [2, 3, -5, 10, 10, -5, -5, 20, 5, -5] sam...
[ 2, 11259, 257, 6692, 1351, 11, 4781, 12785, 13760, 326, 21784, 510, 284, 6632, 198, 2, 3740, 1378, 2503, 13, 6651, 2798, 929, 13, 785, 14, 25652, 30, 312, 28, 3553, 1558, 44673, 26514, 1415, 3104, 1795, 198, 198, 6738, 7736, 1330, 1...
2.10728
261
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
[ 2, 16529, 1783, 10541, 198, 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 17168, 13789, 13, 4091, 13789, 13, 14116, 287, 262, 1628, 6808, 329, 5964, 1321, 13, 198, 2, 16529, 1783, 10541, 198,...
4.526718
131
import sys import os from tempfile import TemporaryDirectory import numpy as np import tensorflow.compat.v1 as tf tf.get_logger().setLevel('ERROR') # only show error messages from recommenders.utils.timer import Timer from recommenders.utils.constants import SEED from recommenders.models.deeprec.deeprec_utils import ...
[ 11748, 25064, 198, 11748, 28686, 220, 198, 6738, 20218, 7753, 1330, 46042, 43055, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 11192, 273, 11125, 13, 5589, 265, 13, 85, 16, 355, 48700, 198, 27110, 13, 1136, 62, 6404, 1362, 22446, 261...
2.242033
2,479
#!/usr/bin/env python """ ctypesgen.ctypedescs contains classes to represent a C type. All of them classes are subclasses of CtypesType. Unlike in previous versions of ctypesgen, CtypesType and its subclasses are completely independent of the parser module. The most important method of CtypesType and its subclasses ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 37811, 198, 310, 9497, 5235, 13, 310, 4464, 276, 3798, 82, 4909, 6097, 284, 2380, 257, 327, 2099, 13, 1439, 286, 606, 198, 37724, 389, 850, 37724, 286, 327, 19199, 6030, 13, 198...
2.406953
978
from random import randint import pyxel from constants import Screen import cursors class ReachCircle(Circle): def respawn(self): self._x = randint(self._r, Screen.width - self._r) self._y = randint(self._r, Screen.height - self._r) self._r = randint(self.min_r, min(Screen.width, Scre...
[ 6738, 4738, 1330, 43720, 600, 198, 11748, 12972, 87, 417, 198, 198, 6738, 38491, 1330, 15216, 198, 11748, 13882, 669, 628, 628, 198, 198, 4871, 25146, 31560, 293, 7, 31560, 293, 2599, 628, 220, 220, 220, 825, 42929, 7, 944, 2599, 198,...
2.44186
172
from pulzarutils.utils import Utils from pulzarutils.utils import Constants from pulzarutils.messenger import Messenger from pulzarcore.core_db import DB
[ 6738, 17472, 41046, 26791, 13, 26791, 1330, 7273, 4487, 198, 6738, 17472, 41046, 26791, 13, 26791, 1330, 4757, 1187, 198, 6738, 17472, 41046, 26791, 13, 37348, 6540, 1330, 24306, 198, 6738, 17472, 89, 5605, 382, 13, 7295, 62, 9945, 1330, ...
3.690476
42
#!/usr/bin/env python2 from __future__ import print_function import atexit import logging import sys import ssg_test_suite.oscap import ssg_test_suite.virt from ssg_test_suite.rule import get_viable_profiles from ssg_test_suite.virt import SnapshotStack logging.getLogger(__name__).addHandler(logging.NullHandler()) ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 17, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 379, 37023, 198, 11748, 18931, 198, 11748, 25064, 198, 198, 11748, 37786, 70, 62, 9288, 62, 2385, 578, 13, 418, 1112...
1.904336
1,453
import decimal import operator import warnings from wtforms import fields, widgets
[ 11748, 32465, 198, 11748, 10088, 198, 11748, 14601, 198, 198, 6738, 266, 83, 23914, 1330, 7032, 11, 40803, 628, 198 ]
4.3
20
import mtrain import numpy as np import pandas as pd import random def simulate_games(num_players=4, domino_size=12, num_games=250, collect_data=True, debug=False, players=["Random", "Greedy", "Probability", "Neural"], file_name="PlayData/data4_12_250"): """ Runs the m...
[ 11748, 285, 27432, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 4738, 198, 198, 4299, 29308, 62, 19966, 7, 22510, 62, 32399, 28, 19, 11, 2401, 2879, 62, 7857, 28, 1065, 11, 997, 62, 19966, 28...
2.443963
1,615
__all__ = ("DottedMarkupLanguageException", "DecodeError")
[ 834, 439, 834, 796, 5855, 35, 8426, 9704, 929, 32065, 16922, 1600, 366, 10707, 1098, 12331, 4943, 628, 198 ]
3.210526
19
############################################################################## # # Below code is inspired on # https://github.com/facebookresearch/detectron2/blob/master/detectron2/data/datasets/pascal_voc.py # -------------------------------------------------------- # Detectron2 # Licensed under the Apache 2.0 license...
[ 29113, 29113, 7804, 4242, 2235, 198, 2, 198, 2, 10383, 2438, 318, 7867, 319, 198, 2, 3740, 1378, 12567, 13, 785, 14, 19024, 34033, 14, 15255, 478, 1313, 17, 14, 2436, 672, 14, 9866, 14, 15255, 478, 1313, 17, 14, 7890, 14, 19608, 2...
2.359937
1,278
import glob import time import random filelist = glob.glob('/mnt/lustre/chenyuntao1/datasets/imagenet/train/*/*') random.shuffle(filelist) begin = time.time() for i, f in enumerate(filelist): if i == 10000: break with open(f, "rb") as fin: result = fin.read() end = time.time() print("%.1f im...
[ 11748, 15095, 198, 11748, 640, 198, 11748, 4738, 628, 198, 7753, 4868, 796, 15095, 13, 4743, 672, 10786, 14, 76, 429, 14, 38878, 260, 14, 6607, 88, 2797, 5488, 16, 14, 19608, 292, 1039, 14, 320, 11286, 316, 14, 27432, 15211, 15211, ...
2.424658
146
# Copyright (C) 2015-2019 Tormod Landet # SPDX-License-Identifier: Apache-2.0 import dolfin from . import register_boundary_condition, BoundaryConditionCreator from ocellaris.utils import ( CodedExpression, OcellarisCppExpression, OcellarisError, verify_field_variable_definition, )
[ 2, 15069, 357, 34, 8, 1853, 12, 23344, 309, 579, 375, 6379, 316, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 198, 198, 11748, 288, 4024, 259, 198, 6738, 764, 1330, 7881, 62, 7784, 560, 62, 31448, 11...
2.859813
107
import unittest from count_split_inversions import count_inversions if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 6738, 954, 62, 35312, 62, 259, 47178, 1330, 954, 62, 259, 47178, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3419, 198 ]
2.925
40
# # Copyright 2016 The BigDL Authors. # # 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 ...
[ 2, 198, 2, 15069, 1584, 383, 4403, 19260, 46665, 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...
3.546729
214
import time import krpc conn = krpc.connect(name='Sub-orbital flight') vessel = conn.space_center.active_vessel vessel.auto_pilot.target_pitch_and_heading(90, 90) vessel.auto_pilot.engage() vessel.control.throttle = 1 time.sleep(1) print('Launch!') vessel.control.activate_next_stage() fuel_amount = conn.get_call(ve...
[ 11748, 640, 198, 11748, 479, 81, 14751, 198, 37043, 796, 479, 81, 14751, 13, 8443, 7, 3672, 11639, 7004, 12, 27688, 1287, 5474, 11537, 198, 198, 1158, 741, 796, 48260, 13, 13200, 62, 16159, 13, 5275, 62, 1158, 741, 198, 198, 1158, 7...
2.632877
730
#!/usr/bin/env python3 import numpy as np if __name__ == "__main__": main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1388, 3419, 198 ]
2.342857
35
from distutils.version import LooseVersion from itertools import product import numpy as np import pandas as pd from ..model.event import Event from ..model.event import EventTeam from ..model.submission import Submission from ..model.team import Team from .team import get_event_team_by_name from .submission import...
[ 6738, 1233, 26791, 13, 9641, 1330, 6706, 577, 14815, 198, 6738, 340, 861, 10141, 1330, 1720, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 11485, 19849, 13, 15596, 1330, 8558, 198, 6738, ...
2.331092
7,735
#Automate the Boring Stuff with Python import time, sys indent = 0 # How many spaces to indent indent_Increasing = True # Whether the indentation is increasing or not try: while True: # The main program loop print(' ' * indent, end='') print('********') time.sleep(0.1) # Pause for 1/10th o...
[ 2, 38062, 378, 262, 347, 3255, 27864, 351, 11361, 198, 198, 11748, 640, 11, 25064, 198, 521, 298, 796, 657, 1303, 1374, 867, 9029, 284, 33793, 198, 521, 298, 62, 15562, 2313, 796, 6407, 1303, 10127, 262, 33793, 341, 318, 3649, 393, ...
2.342105
266
import getpass import sys import json from reflowrestclient.utils import * host = raw_input('Host: ') username = raw_input('Username: ') password = getpass.getpass('Password: ') token = get_token(host, username, password) if token: print "Authentication successful" print '=' * 40 else: print "No token fo...
[ 11748, 651, 6603, 198, 11748, 25064, 198, 11748, 33918, 198, 6738, 1006, 9319, 2118, 16366, 13, 26791, 1330, 1635, 198, 198, 4774, 796, 8246, 62, 15414, 10786, 17932, 25, 705, 8, 198, 29460, 796, 8246, 62, 15414, 10786, 5842, 13292, 25,...
2.890625
128
from django.conf import settings from django.conf.urls import url, static from . import views from . import jobs urlpatterns = [ url(r'^choose_company/(?P<company_id>.*)/$', views.choose_company, name='choose_company'), url(r'^cleanlogs/$', jobs.cleanlogs, name='cleanlogs'), url(r'^primecache/$', job...
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 11, 9037, 198, 198, 6738, 764, 1330, 5009, 198, 6738, 764, 1330, 3946, 628, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, ...
2.591195
159
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="i3-workspace-swap", description='A python utility swap the content of two workplaces in i3wm', long_description=long_description, long_description_content_type="text/markdown", version="1...
[ 11748, 900, 37623, 10141, 198, 198, 4480, 1280, 7203, 15675, 11682, 13, 9132, 1600, 366, 81, 4943, 355, 277, 71, 25, 198, 220, 220, 220, 890, 62, 11213, 796, 277, 71, 13, 961, 3419, 198, 198, 2617, 37623, 10141, 13, 40406, 7, 198, ...
2.524096
332
# coding: utf-8 """ Cisco Intersight Cisco Intersight is a management platform delivered as a service with embedded analytics for your Cisco and 3rd party IT infrastructure. This platform offers an intelligent level of management that enables IT organizations to analyze, simplify, and automate their environmen...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 37811, 198, 220, 220, 220, 28289, 554, 1010, 432, 628, 220, 220, 220, 28289, 554, 1010, 432, 318, 257, 4542, 3859, 6793, 355, 257, 2139, 351, 14553, 23696, 329, 534, 28289, 290, 513, 4372, 2151, ...
3.531802
566
# # Copyright 2004-2016, by the California Institute of Technology. # ALL RIGHTS RESERVED. United States Government Sponsorship # acknowledged. Any commercial use must be negotiated with the Office # of Technology Transfer at the California Institute of Technology. # # This software may be subject to U.S. exp...
[ 2, 198, 2, 220, 220, 15069, 5472, 12, 5304, 11, 416, 262, 3442, 5136, 286, 8987, 13, 198, 2, 220, 220, 11096, 371, 34874, 15731, 1137, 53, 1961, 13, 1578, 1829, 5070, 18972, 11094, 198, 2, 220, 220, 10810, 13, 4377, 5068, 779, 127...
3.973094
223
import pytest from nbformat.v4.nbbase import new_notebook, new_markdown_cell, new_code_cell, new_raw_cell from jupytext.compare import compare_notebooks, NotebookDifference, test_round_trip_conversion as round_trip_conversion def test_raise_on_incomplete_markdown_cell(): ref = new_notebook(cells=[new_markdown_...
[ 11748, 12972, 9288, 198, 6738, 299, 65, 18982, 13, 85, 19, 13, 46803, 8692, 1330, 649, 62, 11295, 2070, 11, 649, 62, 4102, 2902, 62, 3846, 11, 649, 62, 8189, 62, 3846, 11, 649, 62, 1831, 62, 3846, 198, 6738, 474, 929, 88, 5239, ...
2.511062
452
import asyncio import discord import random import datetime from discord.ext import commands from Cogs import DisplayName from Cogs import Nullify
[ 11748, 30351, 952, 198, 11748, 36446, 198, 11748, 4738, 198, 11748, 4818, 8079, 198, 6738, 220, 220, 36446, 13, 2302, 1330, 9729, 198, 6738, 220, 220, 327, 18463, 1330, 16531, 5376, 198, 6738, 220, 220, 327, 18463, 1330, 35886, 1958, 19...
3.731707
41
########## # Additional dependencies are needed: # Follow the LOLA installation described in the tune_class_api/lola_pg_official.py file ########## import os import ray from ray import tune import marltoolbox.algos.lola.envs as lola_envs import marltoolbox.algos.lola_dice.envs as lola_dice_envs from marltoolbox.algos...
[ 7804, 2235, 198, 2, 15891, 20086, 389, 2622, 25, 198, 2, 7281, 262, 35513, 32, 9988, 3417, 287, 262, 14009, 62, 4871, 62, 15042, 14, 75, 5708, 62, 6024, 62, 16841, 13, 9078, 2393, 198, 7804, 2235, 198, 198, 11748, 28686, 198, 11748,...
2.848958
192
import string import random import json from calendar import month_name from django.conf import settings SHORTLINK_MIN = getattr(settings, "SHORTLINK_MIN", 6) def json_data_func(instance): ''' Return json format data, ready for passing into AmCharts. Contains 2 items - name of the month and count of di...
[ 11748, 4731, 198, 11748, 4738, 198, 11748, 33918, 198, 6738, 11845, 1330, 1227, 62, 3672, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 198, 9693, 9863, 43, 17248, 62, 23678, 796, 651, 35226, 7, 33692, 11, 366, 9693, 9863, 43, ...
2.826568
271
#!/usr/bin/python import argparse import ConfigParser import os import sys new_path = [ os.path.join( os.getcwd(), "lib" ) ] new_path.extend( sys.path[1:] ) sys.path = new_path from galaxy import eggs eggs.require( "SQLAlchemy >= 0.4" ) import galaxy.webapps.tool_shed.model.mapping as tool_shed_model from sqlalchemy....
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 11748, 1822, 29572, 198, 11748, 17056, 46677, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 3605, 62, 6978, 796, 685, 28686, 13, 6978, 13, 22179, 7, 28686, 13, 1136, 66, 16993, 22784, 366, ...
2.907692
260
from __future__ import unicode_literals from moto.core.responses import BaseResponse from .models import dynamodbstreams_backends from six import string_types
[ 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 285, 2069, 13, 7295, 13, 16733, 274, 1330, 7308, 31077, 198, 198, 6738, 764, 27530, 1330, 6382, 375, 65, 5532, 82, 62, 1891, 2412, 198, 6738, 2237, 1330, 4731...
3.6
45
# Copyright (C) 2018-2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 import numpy as np from openvino.tools.mo.front.extractor import FrontExtractorOp from openvino.tools.mo.front.mxnet.extractors.utils import get_mxnet_layer_attrs from openvino.tools.mo.ops.const import Const
[ 2, 15069, 357, 34, 8, 2864, 12, 1238, 2481, 8180, 10501, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 1280, 85, 2879, 13, 31391, 13, 5908, 13, ...
2.969697
99
from JumpScale import j b = builder() b.do()
[ 198, 198, 6738, 15903, 29990, 1330, 474, 628, 198, 198, 65, 796, 27098, 3419, 198, 65, 13, 4598, 3419, 198 ]
2.5
20
import sys import warnings import matplotlib.pyplot as plt from parsets import IMACC, IMG, PROGC, REGFLPC, ExecE, plot warnings.filterwarnings("ignore") MEM = IMACC(sys.stdin.read()) # Load memory from stdin PC = PROGC(0) # Start from the first instruction RF = REGFLPC() # initialize register and flags EE = ExecE...
[ 11748, 25064, 198, 11748, 14601, 198, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 13544, 1039, 1330, 8959, 26861, 11, 8959, 38, 11, 38688, 34, 11, 23337, 3697, 5662, 11, 8393, 36, 11, 7110, 198, 198, 40539...
2.541787
347
import discord import re import emoji import contextlib import typing import datetime from discord.ext import commands from discord.http import Route def generate_snowflake(dt: typing.Optional[datetime.datetime] = None) -> int: """Returns a numeric snowflake pretending to be created at the given date but mor...
[ 11748, 36446, 198, 11748, 302, 198, 11748, 44805, 198, 11748, 4732, 8019, 198, 11748, 19720, 198, 11748, 4818, 8079, 198, 6738, 36446, 13, 2302, 1330, 9729, 198, 6738, 36446, 13, 4023, 1330, 18956, 628, 628, 628, 198, 198, 4299, 7716, 6...
3.072414
290
""" kissim.cli.encode Encode structures (generate fingerprints) from CLI arguments. """ import numpy as np from kissim.api import encode from kissim.cli.utils import configure_logger def encode_from_cli(args): """ Encode structures. Parameters ---------- args : argsparse.Namespace CLI ...
[ 37811, 198, 41304, 320, 13, 44506, 13, 268, 8189, 198, 198, 4834, 8189, 8573, 357, 8612, 378, 34290, 8, 422, 43749, 7159, 13, 198, 37811, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 9245, 320, 13, 15042, 1330, 37773, 198,...
2.431535
482
import numpy as np from util import * def naiveDistanceProfile(tsA, idx, m, tsB = None): """Return the distance profile of query against ts. Use the naive all pairs comparison algorithm. >>> np.round(naiveDistanceProfile(np.array([0.0, 1.0, -1.0, 0.0]), 0, 4, np.array([-1, 1, 0, 0, -1, 1])), 3) array([[ 2...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 7736, 1330, 1635, 198, 198, 4299, 24354, 45767, 37046, 7, 912, 32, 11, 4686, 87, 11, 285, 11, 40379, 33, 796, 6045, 2599, 198, 220, 220, 220, 37227, 13615, 262, 5253, 7034, 286, 12405, 1028, ...
2.172237
778
import pyplot as plt import numpy as np from sklearn import linear_model
[ 11748, 12972, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 1341, 35720, 1330, 14174, 62, 19849, 198 ]
3.47619
21
# encoding: UTF-8 from builtins import str import psutil # import sys # PyQt 4/5 compatibility try: from PyQt4.QtGui import QMainWindow, QDialog, QDockWidget, QAction, QHeaderView, QMessageBox, QLabel, QVBoxLayout from PyQt4 import QtCore except ImportError: from PyQt5.QtWidgets import QMainWindow, QDial...
[ 2, 21004, 25, 41002, 12, 23, 198, 198, 6738, 3170, 1040, 1330, 965, 198, 198, 11748, 26692, 22602, 198, 198, 2, 1330, 25064, 198, 2, 9485, 48, 83, 604, 14, 20, 17764, 198, 28311, 25, 198, 220, 220, 220, 422, 9485, 48, 83, 19, 13...
3.370558
197
#!/usr/bin/env python # coding: utf-8 # In[ ]: import requests import json import re from flask import Flask, request, abort import mysql.connector as mariadb from mysql.connector import Error from linebot import ( LineBotApi, WebhookHandler ) from linebot.exceptions import ( InvalidSignatureError ) from l...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 554, 58, 2361, 25, 628, 198, 11748, 7007, 198, 11748, 33918, 198, 11748, 302, 198, 6738, 42903, 1330, 46947, 11, 2581, 11, 15614, 198, ...
2.451923
520
# coding=utf-8 from sfc_models.objects import * from sfc_models.examples.Quick2DPlot import Quick2DPlot register_standard_logs('output', __file__) mod = Model() country = Country(mod, 'CO') Household(country, 'HH') ConsolidatedGovernment(country, 'GOV') FixedMarginBusiness(country, 'BUS', profit_margin=.025) Market(c...
[ 2, 19617, 28, 40477, 12, 23, 198, 6738, 264, 16072, 62, 27530, 13, 48205, 1330, 1635, 198, 6738, 264, 16072, 62, 27530, 13, 1069, 12629, 13, 21063, 17, 35, 43328, 1330, 12029, 17, 35, 43328, 628, 198, 30238, 62, 20307, 62, 6404, 82,...
2.474026
462
from importlib import import_module from django.conf import settings from django.core.signals import setting_changed SOCIALACCOUNT_MODEL = getattr(settings, "REST_AUTH_SOCIALACCOUNT_MODEL", "auth_framework.SocialAccount") DEFAULTS = { 'UNIQUE_EMAIL': True, 'RESET_PASSWORD_BY': 'pin', # 'url'| 'pin' 'SER...
[ 6738, 1330, 8019, 1330, 1330, 62, 21412, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 7295, 13, 12683, 874, 1330, 4634, 62, 40985, 198, 198, 50, 4503, 12576, 26861, 28270, 62, 33365, 3698, 796, 651, ...
2.475746
536
from django.db import models from shorty.manager import UrlManager
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 198, 6738, 1790, 88, 13, 37153, 1330, 8799, 75, 13511, 198 ]
3.578947
19
security = """ New Web users get the Roles "User,Nosy" New Email users get the Role "User" Role "admin": User may access the rest interface (Rest Access) User may access the web interface (Web Access) User may access the xmlrpc interface (Xmlrpc Access) User may create everything (Create) User may edit everything ...
[ 12961, 796, 37227, 198, 3791, 5313, 2985, 651, 262, 371, 4316, 366, 12982, 11, 45, 418, 88, 1, 198, 3791, 9570, 2985, 651, 262, 20934, 366, 12982, 1, 198, 47445, 366, 28482, 1298, 198, 11787, 743, 1895, 262, 1334, 7071, 357, 19452, ...
3.534879
13,676
tc = int(input()) while tc: tc -= 1 best = 0 n, x = map(int, input().split()) for i in range(n): s, r = map(int, input().split()) if x >= s: best = max(best, r) print(best)
[ 23047, 796, 493, 7, 15414, 28955, 198, 4514, 37096, 25, 198, 220, 220, 220, 37096, 48185, 352, 198, 220, 220, 220, 1266, 796, 657, 198, 220, 220, 220, 299, 11, 2124, 796, 3975, 7, 600, 11, 5128, 22446, 35312, 28955, 198, 220, 220, ...
1.964286
112
""" Tests related to :class:`.SqliteWrapper` / :class:`.ExampleWrapper` """ # from unittest import TestCase from tests.base import *
[ 37811, 198, 51, 3558, 3519, 284, 1058, 4871, 25, 44646, 50, 13976, 578, 36918, 2848, 63, 1220, 1058, 4871, 25, 44646, 16281, 36918, 2848, 63, 198, 37811, 198, 2, 422, 555, 715, 395, 1330, 6208, 20448, 198, 6738, 5254, 13, 8692, 1330, ...
3.045455
44
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import *
[ 2, 15069, 2211, 12, 42334, 13914, 45036, 3549, 2351, 4765, 11, 11419, 290, 584, 198, 2, 1338, 441, 4935, 34152, 13, 4091, 262, 1353, 12, 5715, 27975, 38162, 9947, 2393, 329, 3307, 13, 198, 2, 198, 2, 30628, 55, 12, 34156, 12, 33234,...
3.47619
63
from typing import Any, Text, Dict, List, Union from rasa_sdk import Action, Tracker from rasa_sdk.executor import CollectingDispatcher from rasa_sdk.forms import FormAction from rasa_sdk.events import UserUtteranceReverted, UserUttered, FollowupAction # from rasa_core.events import (UserUtteranceReverted, UserUttered...
[ 6738, 19720, 1330, 4377, 11, 8255, 11, 360, 713, 11, 7343, 11, 4479, 198, 6738, 374, 15462, 62, 21282, 74, 1330, 7561, 11, 26885, 198, 6738, 374, 15462, 62, 21282, 74, 13, 18558, 38409, 1330, 9745, 278, 7279, 8071, 2044, 198, 6738, ...
2.90799
413
import plotly.graph_objs as go
[ 11748, 7110, 306, 13, 34960, 62, 672, 8457, 355, 467, 198 ]
2.818182
11
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 16529, 35937, 198, 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 17168, 13789, 13, 4091, 13789, 13, 14116, 287, 262, 1628, 6808, 329, 198, 2, 5964, 1321...
5.44086
93
"""File generated by TLObjects' generator. All changes will be ERASED""" from ...tl.tlobject import TLRequest from typing import Optional, List, Union, TYPE_CHECKING import os import struct if TYPE_CHECKING: from ...tl.types import TypeInputStickerSet, TypeInputUser, TypeInputStickerSetItem, TypeInputDocument ...
[ 37811, 8979, 7560, 416, 24811, 10267, 82, 6, 17301, 13, 1439, 2458, 481, 307, 13793, 42827, 37811, 198, 6738, 2644, 28781, 13, 28781, 15252, 1330, 24811, 18453, 198, 6738, 19720, 1330, 32233, 11, 7343, 11, 4479, 11, 41876, 62, 50084, 27...
3.647727
88
import KratosMultiphysics import KratosMultiphysics.KratosUnittest as UnitTest import KratosMultiphysics.ChimeraApplication from KratosMultiphysics.ChimeraApplication.fluid_chimera_analysis import FluidChimeraAnalysis
[ 11748, 509, 10366, 418, 15205, 13323, 23154, 198, 11748, 509, 10366, 418, 15205, 13323, 23154, 13, 42, 10366, 418, 3118, 715, 395, 355, 11801, 14402, 198, 11748, 509, 10366, 418, 15205, 13323, 23154, 13, 1925, 320, 8607, 23416, 198, 6738,...
3.205882
68
import urllib.request import xml.etree.ElementTree if __name__ == "__main__": import pprint pprint.pprint(RSS10Parser("https://www.youtube.com/feeds/videos.xml?playlist_id=PLrPVslFukDQo7l5RCqAZtKDl6tUyMAFWH").getlist())
[ 11748, 2956, 297, 571, 13, 25927, 198, 11748, 35555, 13, 316, 631, 13, 20180, 27660, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 1330, 279, 4798, 198, 220, 279, 4798, 13, 381, 22272, 7, 49, 5432, 940...
2.333333
96
import math,time,random import pepper_interface IP = "192.168.0.147" PORT = 9559 simulation = False with pepper_interface.get(IP,PORT,simulation) as pepper: time.sleep(1.0) values,time_stamp = pepper.laser.get() print print "Front" print values["Front"] print print "Left" print va...
[ 11748, 10688, 11, 2435, 11, 25120, 198, 11748, 13385, 62, 39994, 198, 198, 4061, 796, 366, 17477, 13, 14656, 13, 15, 13, 20198, 1, 198, 15490, 796, 860, 38605, 198, 14323, 1741, 796, 10352, 628, 198, 198, 4480, 13385, 62, 39994, 13, ...
2.503106
161
# Importar a classe da lngua inglesa (English) e criar um objeto nlp from ____ import ____ nlp = ____ # Processar o texto doc = ____("I like tree kangaroos and narwhals.") # Selecionar o primeiro token first_token = doc[____] # Imprimir o texto do primeito token print(first_token.____)
[ 2, 17267, 283, 257, 537, 21612, 12379, 300, 782, 6413, 5347, 829, 64, 357, 15823, 8, 304, 269, 380, 283, 23781, 26181, 27206, 299, 34431, 198, 6738, 220, 1427, 1330, 220, 1427, 198, 21283, 79, 796, 220, 1427, 198, 198, 2, 10854, 283...
2.685185
108
from tests.integration.create_token import create_token from tests.integration.integration_test_case import IntegrationTestCase
[ 6738, 5254, 13, 18908, 1358, 13, 17953, 62, 30001, 1330, 2251, 62, 30001, 198, 6738, 5254, 13, 18908, 1358, 13, 18908, 1358, 62, 9288, 62, 7442, 1330, 38410, 14402, 20448, 628 ]
4.16129
31
# coding=utf-8 # Copyright 2021 The Fairseq Authors and the HuggingFace Inc. team. 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/...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 33448, 383, 7011, 41068, 46665, 290, 262, 12905, 2667, 32388, 3457, 13, 1074, 13, 1439, 2489, 10395, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, ...
2.617762
6,925
# 6.00 Problem Set 2 # # Hangman # Name : Solutions # Collaborators : <your collaborators> # Time spent : <total time> # ----------------------------------- # Helper code # You don't need to understand this helper code, # but you will have to know how to use the functions import random import string WO...
[ 2, 718, 13, 405, 20647, 5345, 362, 198, 2, 220, 198, 2, 24300, 805, 198, 2, 6530, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 23555, 198, 2, 37322, 2024, 1058, 1279, 14108, 37886, 29, 198, 2, 3862, 3377, 220, 220, 220, 10...
2.627229
1,234
''' Created by auto_sdk on 2016.04.13 ''' from top.api.base import RestApi
[ 7061, 6, 198, 41972, 416, 8295, 62, 21282, 74, 319, 1584, 13, 3023, 13, 1485, 198, 7061, 6, 198, 6738, 1353, 13, 15042, 13, 8692, 1330, 8324, 32, 14415, 198 ]
2.5
30
# Copyright 2021 Sony Corporation. # Copyright 2021 Sony Group 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 requi...
[ 2, 15069, 33448, 10184, 10501, 13, 198, 2, 15069, 33448, 10184, 4912, 10501, 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, ...
2.459087
1,161
#!/usr/bin/env python from __future__ import print_function # READ #### f = open("my_file.txt") print("\nLoop directly over file") print("-" * 60) for line in f: print(line.strip()) print("-" * 60) f.seek(0) my_content = f.readlines() print("\nUse readlines method") print("-" * 60) for line in my_content: pri...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 2, 20832, 1303, 21017, 198, 69, 796, 1280, 7203, 1820, 62, 7753, 13, 14116, 4943, 198, 4798, 7203, 59, 77, 39516, 3264, 625, ...
2.467033
364
import uuid from typing import List, Dict, Any import unittest from selfhost_client import SelfHostClient, DatasetType
[ 11748, 334, 27112, 198, 6738, 19720, 1330, 7343, 11, 360, 713, 11, 4377, 198, 198, 11748, 555, 715, 395, 198, 198, 6738, 2116, 4774, 62, 16366, 1330, 12189, 17932, 11792, 11, 16092, 292, 316, 6030, 628 ]
3.388889
36
from setuptools import setup, find_packages setup( name="soccergen", version="0.1", packages=find_packages(), # Project uses reStructuredText, so ensure that the docutils get # installed or upgraded on the target machine install_requires=["gfootball>=2.8",], # metadata to display on PyPI ...
[ 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 2625, 35634, 2189, 5235, 1600, 198, 220, 220, 220, 2196, 2625, 15, 13, 16, 1600, 198, 220, 220, 220, 10392, 28, 19796, 62, 43789...
2.754545
330
from itertools import product from unittest.mock import patch import pytest import numpy as np import pandas as pd from pandas.util.testing import assert_frame_equal from sm.engine.annotation.fdr import FDR, run_fdr_ranking from sm.engine.formula_parser import format_modifiers FDR_CONFIG = {'decoy_sample_size': 2} ...
[ 6738, 340, 861, 10141, 1330, 1720, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 8529, 198, 11748, 12972, 9288, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 19798, 292, 13, 22602, 13, 33407,...
2.019179
2,242
from logging import getLogger getLogger('flake8').propagate = False
[ 6738, 18931, 1330, 651, 11187, 1362, 198, 198, 1136, 11187, 1362, 10786, 47597, 23, 27691, 22930, 37861, 796, 10352, 198 ]
3.45
20
import math import numpy as np import pandas as pd def fixed_time_horizon(df, column='close', lookback=20): """ Fixed-time Horizon As it relates to finance, virtually all ML papers label observations using the fixed-time horizon method. Fixed-time horizon is presented as one of the main procedures to ...
[ 11748, 10688, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 628, 198, 4299, 5969, 62, 2435, 62, 17899, 8637, 7, 7568, 11, 5721, 11639, 19836, 3256, 804, 1891, 28, 1238, 2599, 198, 220, 220, 220, 37227, 198,...
2.576561
1,698
from __future__ import absolute_import import hashlib import logging import os from django.utils.encoding import smart_str from common.conf.settings import TEMPORARY_DIRECTORY from common.utils import fs_cleanup from .exceptions import OfficeConversionError, UnknownFileFormat from .literals import (DEFAULT_PAGE_NUM...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 11748, 12234, 8019, 198, 11748, 18931, 198, 11748, 28686, 198, 198, 6738, 42625, 14208, 13, 26791, 13, 12685, 7656, 1330, 4451, 62, 2536, 198, 198, 6738, 2219, 13, 10414, 13, 336...
3
231
import numpy as np import pandas as pd import matplotlib.pyplot as plt import utils if __name__ == '__main__': main()
[ 11748, 299, 32152, 355, 45941, 201, 198, 11748, 19798, 292, 355, 279, 67, 201, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 201, 198, 11748, 3384, 4487, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 361, 11593, ...
2.305085
59
import functools from collections import OrderedDict from typing import Any, Callable, Dict, List, Mapping, Sequence, Tuple, Union, cast import torch from ignite.engine import Engine, EventEnum, Events from ignite.handlers.timing import Timer
[ 11748, 1257, 310, 10141, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 6738, 19720, 1330, 4377, 11, 4889, 540, 11, 360, 713, 11, 7343, 11, 337, 5912, 11, 45835, 11, 309, 29291, 11, 4479, 11, 3350, 198, 198, 11748, 28034, 198, 1...
3.57971
69
""" Bellman Ford Arbitrage implementation over websocket API. """ from __future__ import annotations from collections import namedtuple from datetime import datetime from decimal import Decimal from math import log import pandas as pd import numpy as np import asyncio import typing from aiokraken.model.assetpair imp...
[ 37811, 198, 36488, 805, 8092, 33619, 8394, 7822, 625, 2639, 5459, 7824, 13, 198, 37811, 198, 6738, 11593, 37443, 834, 1330, 37647, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 32465, 1330, ...
2.794798
346