content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
from PIL import Image import random im = Image.open("/tmp/out.png") px = im.load() rng = random.Random() COMMANDS = 18 size = im.size position = (0, 0) direction = (1, 0) matrix_1 = ((0, 1), (-1, 0)) matrix_2 = ((0, -1), (1, 0)) stack = [] inbuf = ["b", "e", "e", "s", "i", "n", "c", "u", "r", "s", "e"] while True: ...
[ 6738, 350, 4146, 1330, 7412, 198, 11748, 4738, 198, 198, 320, 796, 7412, 13, 9654, 7203, 14, 22065, 14, 448, 13, 11134, 4943, 198, 8416, 796, 545, 13, 2220, 3419, 198, 198, 81, 782, 796, 4738, 13, 29531, 3419, 198, 198, 9858, 10725,...
1.994007
1,335
from dpd.utils import download_file def download_lodes_data(data, st, part_or_seg, type_, year): """ Download LODES OD file. APIS documentation from here: https://lehd.ces.census.gov/data/lodes/LODES7/LODESTechDoc7.4.pdf Args: data (str): one of "od", "rac", or "wac" e.g. "od" ...
[ 6738, 288, 30094, 13, 26791, 1330, 4321, 62, 7753, 628, 198, 4299, 4321, 62, 75, 4147, 62, 7890, 7, 7890, 11, 336, 11, 636, 62, 273, 62, 325, 70, 11, 2099, 62, 11, 614, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 10472,...
2.102754
1,489
# # Copyright (c) 2010 Red Hat, 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 t...
[ 2, 198, 2, 15069, 357, 66, 8, 3050, 2297, 10983, 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, 26...
3.361765
340
''' NAME argumentos_at.py VERSION [1.0] AUTHOR Daianna Gonzalez Padilla <daianna@lcg.unam.mx> DESCRIPTION This programs gets a file with one or more dna sequences and returns an output file with the AT content of each sequence, from the command line CATEGORY DNA sequence analysis USAGE ...
[ 7061, 6, 198, 20608, 198, 220, 220, 220, 4578, 418, 62, 265, 13, 9078, 198, 198, 43717, 198, 220, 220, 220, 685, 16, 13, 15, 60, 198, 198, 32, 24318, 1581, 198, 220, 220, 220, 9637, 666, 2616, 24416, 15744, 5049, 1279, 6814, 666, ...
2.296064
1,118
# -*- coding: utf-8 -*- # Generated by Django 1.11.29 on 2020-09-28 03:34 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 2, 2980, 515, 416, 37770, 352, 13, 1157, 13, 1959, 319, 12131, 12, 2931, 12, 2078, 7643, 25, 2682, 201, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201...
2.686047
86
from django.contrib import admin from . import models admin.site.register(models.Product, ProductAdmin) admin.site.register(models.Review, ReviewAdmin) admin.site.register(models.Order, OrderAdmin)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 764, 1330, 4981, 198, 198, 28482, 13, 15654, 13, 30238, 7, 27530, 13, 15667, 11, 8721, 46787, 8, 198, 28482, 13, 15654, 13, 30238, 7, 27530, 13, 14832, 11, 6602, 46787, 8, 1...
3.491228
57
#!/usr/bin/env python3 import argparse import yaml import pathlib import decimal import datetime import os decimal.getcontext().prec = 10 parser = argparse.ArgumentParser() parser.add_argument('--data', help='path to data directory', required=True) args = parser.parse_args() script_path = os.path.dirname(os.path.re...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 1822, 29572, 198, 11748, 331, 43695, 198, 11748, 3108, 8019, 198, 11748, 32465, 198, 11748, 4818, 8079, 198, 11748, 28686, 198, 198, 12501, 4402, 13, 1136, 22866, 22446, ...
2.673879
647
""" Wanna-transfer -------------- Wanna-transfer is a python based tool to efficient upload and download large files to and from the cloud. It is easy to setup ``````````````````` And run it: .. code:: bash $ pip install wanna-transfer $ wanna -h Links ````` * `development <https://github.com/Multiplicom/w...
[ 37811, 198, 54, 7697, 12, 39437, 198, 26171, 198, 54, 7697, 12, 39437, 318, 257, 21015, 1912, 2891, 284, 198, 16814, 9516, 290, 4321, 1588, 3696, 284, 290, 422, 262, 6279, 13, 198, 198, 1026, 318, 2562, 284, 9058, 198, 33153, 33153, ...
2.520305
788
"""Extract all tables from an html file, printing and saving each to csv file.""" import pandas as pd import sys df_list = pd.read_html(sys.argv[1]) df = pd.DataFrame((df_list[0])) for index, row in df.iterrows(): print row['Element'],"::", row['Cov.'], "::", row['Cov..1']
[ 37811, 11627, 974, 477, 8893, 422, 281, 27711, 2393, 11, 13570, 290, 8914, 1123, 284, 269, 21370, 2393, 526, 15931, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 25064, 198, 198, 7568, 62, 4868, 796, 279, 67, 13, 961, 62, 6...
2.611111
108
# -*- coding: utf-8 -*- from numpy import array, linspace, pi import numpy as np from scipy.optimize import curve_fit, root_scalar def get_BH(self): """ Return the B(H) curve of the material (by default do nothing). Parameters ---------- self : ModelBH a ModelBH object Returns --...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 299, 32152, 1330, 7177, 11, 300, 1040, 10223, 11, 31028, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 13, 40085, 1096, 1330, 12133, 62, 11147, 11, ...
2.420455
176
#!/usr/bin/python import sys import os import build_include """ parameters -- tag: the git tag or branch to use, fast: use git pull versus git clone zero parameters means build local source without pulling from git""" if len(sys.argv) > 1: tag = sys.argv[1] else: tag = False if len(sys.argv) > 2: ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 1382, 62, 17256, 198, 198, 37811, 220, 220, 10007, 1377, 7621, 25, 262, 17606, 7621, 393, 8478, 284, 779, 11, 3049, 25, 779, 17606, 2834, 905...
2.623494
332
#!/usr/bin/env python3 """Regenerate the frontend OpenAPI bindings to the backend. Requirements: - npm/node installed and in PATH - java 8+ installed and in PATH """ import os from pathlib import Path import shutil from typing import List EXIT_SUCCESS = 0 if __name__ == "__main__": main()
[ 171, 119, 123, 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 37811, 8081, 877, 378, 262, 2166, 437, 4946, 17614, 34111, 284, 262, 30203, 13, 198, 198, 42249, 25, 198, 220, 220, 220, 532, 30599, 14, 17440, 6589, 290, 287...
2.924528
106
import numpy as np import networkx as nx import itertools as it import pandas as pd from pgmpy.models import MarkovModel from pgmpy.factors.discrete import DiscreteFactor import pylab as plt from utils.utils import IsingModel, factor2Df, sampling from collections import Counter from pgmpy.models import BayesianModel fr...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 3127, 87, 355, 299, 87, 198, 11748, 340, 861, 10141, 355, 340, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 23241, 3149, 88, 13, 27530, 1330, 2940, 709, 17633, 198, 6738, 23241, 3149, 88,...
3.33871
124
# https://edabit.com/challenge/76ibd8jZxvhAwDskb # # A city skyline can be represented as a 2-D list with 1s representing buildings. In the example below, the height of # the tallest building is 4 (second-most right column). # # [[0, 0, 0, 0, 0, 0], # [0, 0, 0, 0, 1, 0], # [0, 0, 1, 0, 1, 0], # [0, 1, 1, 1, 1, 0], # [1...
[ 2, 3740, 1378, 276, 29968, 13, 785, 14, 36747, 3540, 14, 4304, 571, 67, 23, 73, 57, 87, 85, 71, 23155, 35, 8135, 65, 198, 2, 198, 2, 317, 1748, 47566, 460, 307, 7997, 355, 257, 362, 12, 35, 1351, 351, 352, 82, 10200, 6832, 13,...
1.891608
572
from __future__ import annotations import asyncio import json import math import time from asyncio import Queue import dataclasses from dataclasses import dataclass from typing import Dict, Type, Set, TypeVar, Generic, List, Any import numpy as np from coniql.util import doc_field from .plugin import Plugin from ._t...
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 11748, 30351, 952, 198, 11748, 33918, 198, 11748, 10688, 198, 11748, 640, 198, 6738, 30351, 952, 1330, 4670, 518, 198, 11748, 4818, 330, 28958, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, ...
3.149096
664
import utils def main(): """Main.""" code_b64 = 'Um9sbGluJyBpbiBteSA1LjAKV2l0aCBteSByYWctdG9wIGRvd24gc28gbXkg' code_b64 += 'aGFpciBjYW4gYmxvdwpUaGUgZ2lybGllcyBvbiBzdGFuZGJ5IHdhdmluZyBq' code_b64 += 'dXN0IHRvIHNheSBoaQpEaWQgeW91IHN0b3A/IE5vLCBJIGp1c3QgZHJvdmUg' code_b64 += 'YnkK' code = bytearra...
[ 11748, 3384, 4487, 198, 198, 4299, 1388, 33529, 198, 220, 220, 220, 37227, 13383, 526, 15931, 198, 220, 220, 220, 2438, 62, 65, 2414, 796, 705, 37280, 24, 36299, 38, 2290, 41, 88, 33, 79, 8482, 33, 660, 4090, 16, 43, 73, 10206, 53...
1.847458
472
import time
[ 11748, 640, 198 ]
4
3
import sys sys.path.append("..") from common import * data = fnl(parse)[0] school = data print(data) days = 256 rate = 7 track = [0 for i in range(rate+2)] for fish in range(len(school)): track[school[fish]] += 1 pprint(track) for day in range(days): day0 = track[0] track = track[1:] track.appe...
[ 11748, 25064, 198, 17597, 13, 6978, 13, 33295, 7203, 492, 4943, 198, 6738, 2219, 1330, 1635, 198, 198, 7890, 796, 277, 21283, 7, 29572, 38381, 15, 60, 198, 14347, 796, 1366, 198, 4798, 7, 7890, 8, 198, 198, 12545, 796, 17759, 198, 4...
2.256831
183
from urllib.request import urlopen from bs4 import BeautifulSoup import ssl # Ignore SSL certificate errors ctx = ssl.create_default_context() ctx.check_hostname = False ctx.verify_mode = ssl.CERT_NONE url = "http://py4e-data.dr-chuck.net/comments_1481945.html" html = urlopen(url, context=ctx).read().decode() soup = ...
[ 6738, 2956, 297, 571, 13, 25927, 1330, 19016, 9654, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 11748, 264, 6649, 198, 198, 2, 41032, 25952, 10703, 8563, 198, 49464, 796, 264, 6649, 13, 17953, 62, 12286, 62, 22866, 3419, 198,...
2.733696
184
from __future__ import absolute_import import toml from roundhouse import Serializer
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 11748, 284, 4029, 198, 198, 6738, 2835, 4803, 1330, 23283, 7509, 628 ]
4
22
#!/usr/bin/env python import numpy as np import epitome as epi def slidewin_intranet_corr(data, idx, net, n_steps, win_step, win_len): """ data -- voxels x timepoints idx -- voxel network labels (integers) net -- interger value representing network of interest n_steps -- number of windows to take ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 21240, 462, 355, 2462, 72, 198, 198, 4299, 27803, 413, 259, 62, 600, 2596, 316, 62, 10215, 81, 7, 7890, 11, 4686, 87, 11, 2010, 11, 299, ...
1.976471
2,295
"""Organizations managers.""" from django.db import models from readthedocs.core.utils.extend import SettingsOverrideObject from .constants import ADMIN_ACCESS, READ_ONLY_ACCESS class TeamManagerBase(models.Manager): """Manager to control team's access.""" class TeamMemberManager(models.Manager): """M...
[ 37811, 26121, 4582, 11663, 526, 15931, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 198, 6738, 1100, 83, 704, 420, 82, 13, 7295, 13, 26791, 13, 2302, 437, 1330, 16163, 37961, 10267, 198, 198, 6738, 764, 9979, 1187, 1330, 5...
2.67029
276
import unified_planning from unified_planning.shortcuts import * from unified_planning.test import TestCase, main, skipIfEngineNotAvailable from unified_planning.test.examples import get_example_problems from up_skdecide.domain import DomainImpl as SkDecideDomain from skdecide.hub.solver.iw import IW
[ 11748, 22706, 62, 11578, 768, 198, 6738, 22706, 62, 11578, 768, 13, 19509, 23779, 1330, 1635, 198, 6738, 22706, 62, 11578, 768, 13, 9288, 1330, 6208, 20448, 11, 1388, 11, 14267, 1532, 13798, 3673, 10493, 198, 6738, 22706, 62, 11578, 768...
3.465909
88
''' Created by auto_sdk on 2015.01.28 ''' from aliyun.api.base import RestApi
[ 7061, 6, 201, 198, 41972, 416, 8295, 62, 21282, 74, 319, 1853, 13, 486, 13, 2078, 201, 198, 7061, 6, 201, 198, 6738, 435, 7745, 403, 13, 15042, 13, 8692, 1330, 8324, 32, 14415, 201, 198 ]
2.277778
36
# Copyright 2021 Open Source Robotics Foundation, 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...
[ 2, 15069, 33448, 4946, 8090, 47061, 5693, 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, ...
3.22763
637
# Copyright 2020 The dm_control 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 i...
[ 2, 15069, 12131, 383, 288, 76, 62, 13716, 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.422297
296
resize = dummyfunc
[ 198, 411, 1096, 796, 31548, 20786, 628 ]
3
7
# Copyright (C) 2018-2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 import unittest from unittest.mock import patch, mock_open from openvino.tools.mo.front.tf.loader import load_tf_graph_def from openvino.tools.mo.utils.summarize_graph import summarize_graph pbtxt = 'node{name:"Placeholder"op:"Placehol...
[ 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, 555, 715, 395, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 8529, 11, 15290, 62,...
2.554054
222
t = int(raw_input().strip()) for i in xrange(t): n = int(raw_input().strip()) data = [int(j) for j in raw_input().strip().split()] ans = 0 for j in xrange(n - 1): for k in xrange(j + 1, n): if data[j] | data[k] <= max(data[j], data[k]): ans += 1 print ans
[ 83, 796, 493, 7, 1831, 62, 15414, 22446, 36311, 28955, 198, 1640, 1312, 287, 2124, 9521, 7, 83, 2599, 198, 220, 220, 220, 299, 796, 493, 7, 1831, 62, 15414, 22446, 36311, 28955, 198, 220, 220, 220, 1366, 796, 685, 600, 7, 73, 8, ...
1.987261
157
import os import sys # Add path to python source to path. sys.path.append(os.path.join(os.path.dirname( os.path.dirname(os.path.abspath(__file__))), "python")) import SmoothParticleNets as spn import itertools import numpy as np import torch import torch.autograd from gradcheck import gradcheck from test_convsdf ...
[ 11748, 28686, 198, 11748, 25064, 198, 2, 3060, 3108, 284, 21015, 2723, 284, 3108, 13, 198, 17597, 13, 6978, 13, 33295, 7, 418, 13, 6978, 13, 22179, 7, 418, 13, 6978, 13, 15908, 3672, 7, 198, 220, 220, 220, 28686, 13, 6978, 13, 159...
2.795276
381
data=open('input2.txt',"r") la=list() h,d=0,0 for x in data: la.append(x.strip().split()) for i in range(len(la)): if la[i][0]=='forward': h+=int(la[i][1]) elif la[i][0]=='down': d+=int(la[i][1]) elif la[i][0]=='up': d-=int(la[i][1]) print(h*d)
[ 7890, 28, 9654, 10786, 15414, 17, 13, 14116, 40264, 81, 4943, 201, 198, 5031, 28, 4868, 3419, 201, 198, 71, 11, 67, 28, 15, 11, 15, 201, 198, 1640, 2124, 287, 1366, 25, 201, 198, 220, 220, 220, 8591, 13, 33295, 7, 87, 13, 36311,...
1.666667
180
""" Go fast with multiprocessing ============================ The streaming interfaces with iterables allow efficient batch processing as shown :doc:`here <ex4_timepicker_batch>`. But still only one core/thread will be utilized. We will change that will multiprocessing. Following example shows a batch feature extract...
[ 37811, 198, 5247, 3049, 351, 18540, 305, 919, 278, 198, 4770, 25609, 198, 198, 464, 11305, 20314, 351, 11629, 2977, 1249, 6942, 15458, 7587, 355, 3402, 1058, 15390, 25, 63, 1456, 1279, 1069, 19, 62, 2435, 79, 15799, 62, 43501, 29, 446...
3.362969
1,226
#!/usr/bin/env python3 import collections try: # python 3 from collections import abc except ImportError: # python 2 import collections as abc import concurrent.futures from datetime import datetime import gc import inspect import logging from logging import Logger, LogRecord import os # import slack impor...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 17268, 198, 198, 28311, 25, 220, 1303, 21015, 513, 198, 220, 220, 220, 422, 17268, 1330, 450, 66, 198, 16341, 17267, 12331, 25, 220, 1303, 21015, 362, 198, 220, 220, ...
2.889831
708
from django.contrib import admin from django.utils import timezone from django.utils.safestring import mark_safe from django.urls import reverse from .calendar import EventCalendar import datetime, calendar from .models import ( TimeOfDay, Scheduler, SchedulerException, SchedulerRecurringPattern, Ac...
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 42625, 14208, 13, 26791, 1330, 640, 11340, 198, 6738, 42625, 14208, 13, 26791, 13, 49585, 395, 1806, 1330, 1317, 62, 21230, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 19...
2.979228
337
# Copyright 2020 The TensorFlow 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 applica...
[ 2, 15069, 12131, 383, 309, 22854, 37535, 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, 2393, 2845, 287, 11846,...
3.264354
836
import os import hashlib
[ 11748, 28686, 198, 11748, 12234, 8019, 628 ]
3.714286
7
# Poppler, assuming it's been installed to the (Linux) system. { 'targets': [{ 'target_name': 'poppler', 'type': 'none', 'direct_dependent_settings': { 'libraries': [ '-lpoppler-cpp', ], 'include_dirs': [ '/usr/include/poppl...
[ 2, 7695, 381, 1754, 11, 13148, 340, 338, 587, 6589, 284, 262, 357, 19314, 8, 1080, 13, 198, 90, 198, 220, 220, 220, 705, 83, 853, 1039, 10354, 685, 90, 198, 220, 220, 220, 220, 220, 220, 220, 705, 16793, 62, 3672, 10354, 705, 75...
1.738095
210
from .app import app app.run()
[ 6738, 764, 1324, 1330, 598, 198, 198, 1324, 13, 5143, 3419, 198 ]
2.666667
12
import os import numpy as np from numba import njit from evrepr.data.file_reader import FileReader @njit
[ 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 997, 7012, 1330, 299, 45051, 198, 198, 6738, 819, 260, 1050, 13, 7890, 13, 7753, 62, 46862, 1330, 9220, 33634, 628, 198, 31, 77, 45051, 628, 198 ]
2.972973
37
"""Vision Transformer in PyTorch. Reference: [1] Dosovitskiy, Alexey, et al. "An image is worth 16x16 words: Transformers for image recognition at scale." arXiv preprint arXiv:2010.11929 (2020) Code adapted from https://github.com/lucidrains/vit-pytorch/blob/main/vit_pytorch/vit.py """ import torch from torch import ...
[ 37811, 44206, 3602, 16354, 287, 9485, 15884, 354, 13, 198, 26687, 25, 198, 58, 16, 60, 43976, 709, 896, 4106, 88, 11, 4422, 2959, 11, 2123, 435, 13, 366, 2025, 2939, 318, 2861, 1467, 87, 1433, 2456, 25, 39185, 329, 2939, 9465, 379, ...
3.007663
261
import pygame import pygame.display import pygame.mixer from pygame import gfxdraw import numpy as np import pysprint_car import pysprint_tracks import random import json import os #New awesome imports from shazz :D from managers.sample_manager import SampleManager from managers.texture_manager import TextureManager f...
[ 11748, 12972, 6057, 198, 11748, 12972, 6057, 13, 13812, 198, 11748, 12972, 6057, 13, 19816, 263, 198, 6738, 12972, 6057, 1330, 308, 21373, 19334, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 279, 893, 4798, 62, 7718, 198, 11748, 279, ...
2.561446
5,395
# -*- test-case-name: twisted.web.test.test_static -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Static resources for L{twisted.web}. """ from __future__ import division, absolute_import import os import warnings import itertools import time import errno import mimetypes from zope....
[ 2, 532, 9, 12, 1332, 12, 7442, 12, 3672, 25, 19074, 13, 12384, 13, 9288, 13, 9288, 62, 12708, 532, 9, 12, 198, 2, 15069, 357, 66, 8, 40006, 24936, 46779, 13, 198, 2, 4091, 38559, 24290, 329, 3307, 13, 198, 198, 37811, 198, 45442...
2.38828
12,236
import collections from typing import Union import numpy as np from sklearn.utils.validation import _deprecate_positional_args from sklearn.datasets import load_digits as sklearn_load_digits def _mg_eq(xt, xtau, a=0.2, b=0.1, n=10): """ Mackey-Glass time delay diffential equation, at values x(t) and x(t-tau)....
[ 11748, 17268, 198, 6738, 19720, 1330, 4479, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 1341, 35720, 13, 26791, 13, 12102, 341, 1330, 4808, 10378, 8344, 378, 62, 1930, 1859, 62, 22046, 198, 6738, 1341, 35720, 13, 19608, 292, 103...
2.157363
2,078
from flask_sqlalchemy import SQLAlchemy from flask_login import LoginManager from flask_bcrypt import Bcrypt from flask_mail import Mail from flask_migrate import Migrate #: Flask-SQLAlchemy extension instance db = SQLAlchemy() #: Flask-Bcrypt extension instance bcrypt = Bcrypt() #: Flask-Login extension instance lo...
[ 6738, 42903, 62, 25410, 282, 26599, 1330, 16363, 2348, 26599, 198, 6738, 42903, 62, 38235, 1330, 23093, 13511, 198, 6738, 42903, 62, 15630, 6012, 1330, 347, 29609, 198, 6738, 42903, 62, 4529, 1330, 11099, 198, 6738, 42903, 62, 76, 42175, ...
3.5
110
import sys import boto3 import click from botocore.exceptions import ClientError status_map = { 'CREATE_IN_PROGRESS': 'CP', 'CREATE_FAILED': 'CF', 'CREATE_COMPLETE': 'C', 'ROLLBACK_IN_PROGRESS': 'RP', 'ROLLBACK_FAILED': 'RF', 'ROLLBACK_COMPLETE': 'R', 'DELETE_IN_PROGRESS': 'DP', 'DELE...
[ 11748, 25064, 198, 11748, 275, 2069, 18, 198, 11748, 3904, 198, 198, 6738, 10214, 420, 382, 13, 1069, 11755, 1330, 20985, 12331, 628, 198, 13376, 62, 8899, 796, 1391, 198, 220, 220, 220, 705, 43387, 6158, 62, 1268, 62, 4805, 49656, 75...
2.328822
1,256
# -*- coding: utf-8 -*- # Copyright 2016, RadsiantBlue Technologies, 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...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 1584, 11, 5325, 82, 3014, 14573, 21852, 11, 3457, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, ...
3.124675
385
from unittest import TestCase from src.configurations import SimpleConfig, FullConfig
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 198, 6738, 12351, 13, 11250, 20074, 1330, 17427, 16934, 11, 6462, 16934, 628, 198 ]
4.045455
22
from .arduino import *
[ 6738, 764, 446, 84, 2879, 1330, 1635, 198 ]
2.875
8
# Pyrogram - Telegram MTProto API Client Library for Python # Copyright (C) 2017-2018 Dan Tès <https://github.com/delivrance> # # This file is part of Pyrogram. # # Pyrogram is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free S...
[ 2, 9485, 39529, 532, 50203, 19308, 2964, 1462, 7824, 20985, 10074, 329, 11361, 198, 2, 15069, 357, 34, 8, 2177, 12, 7908, 6035, 309, 14064, 82, 1279, 5450, 1378, 12567, 13, 785, 14, 12381, 452, 8132, 29, 198, 2, 198, 2, 770, 2393, ...
3.153392
339
# -*- coding: utf-8 -*- """ Created on Mon Apr 9 17:41:20 2018 @author: David """ import numpy as np import matplotlib.pyplot as plt from astropy.convolution import Gaussian2DKernel,convolve #Data Loading======== data1 = np.loadtxt("Halo.txt") data1=np.transpose(data1) prints=0#Define si se hacen los prints de ca...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 2892, 2758, 220, 860, 1596, 25, 3901, 25, 1238, 2864, 198, 198, 31, 9800, 25, 3271, 198, 37811, 198, 198, 11748, 299, 32152, 355, 45941, 198, 1...
1.90737
1,479
tupla1 = (1,2,3,4,5) print(tupla1) tupla1 = list(tupla1) # Convertendo a tupla para lista tupla1[1] = 3000 print(tupla1)
[ 28047, 489, 64, 16, 796, 357, 16, 11, 17, 11, 18, 11, 19, 11, 20, 8, 198, 4798, 7, 28047, 489, 64, 16, 8, 198, 28047, 489, 64, 16, 796, 1351, 7, 28047, 489, 64, 16, 8, 1303, 38240, 31110, 257, 12777, 489, 64, 31215, 1351, 64...
1.846154
65
#!/usr/bin/env python3 # coding: utf-8 import multiprocessing from sshconnector import sshconnector import pymysql import asyncio db = pymysql.connect("localhost", "root", "root", "hosts")
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 11748, 18540, 305, 919, 278, 198, 6738, 26678, 8443, 273, 1330, 26678, 8443, 273, 198, 11748, 279, 4948, 893, 13976, 198, 11748, 30351, ...
2.852941
68
#!/usr/bin/python3 import unittest if __name__ == '__main__': unittest.main()
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 11748, 555, 715, 395, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 197, 403, 715, 395, 13, 12417, 3419, 198 ]
2.314286
35
import sys import ruamel.yaml as yaml TRAFFIC = sys.argv[1] file = "../kubernetes-manifests/loadgenerator.yaml" with open(file, "r") as stream: d = list(yaml.safe_load_all(stream)) d[0]['spec']['template']['spec']['containers'][0]['env'][0]['value'] = TRAFFIC with open(file, "w") as stream: yaml.dump_all( ...
[ 11748, 25064, 198, 198, 11748, 7422, 17983, 13, 88, 43695, 355, 331, 43695, 198, 198, 51, 3861, 5777, 2149, 796, 25064, 13, 853, 85, 58, 16, 60, 198, 198, 7753, 796, 366, 40720, 74, 18478, 3262, 274, 12, 805, 361, 3558, 14, 2220, ...
2.115385
182
slu = Solution() print(slu.findLengthOfLCIS([1, 3, 5, 4, 7]))
[ 198, 198, 82, 2290, 796, 28186, 3419, 198, 4798, 7, 82, 2290, 13, 19796, 24539, 5189, 5639, 1797, 26933, 16, 11, 513, 11, 642, 11, 604, 11, 767, 60, 4008, 198 ]
2.064516
31
Spam('Key 1', 'Value 1') Spam('Key 2', 'Value 2')
[ 198, 4561, 321, 10786, 9218, 352, 3256, 705, 11395, 352, 11537, 198, 4561, 321, 10786, 9218, 362, 3256, 705, 11395, 362, 11537, 198 ]
2.217391
23
from app.crud import Mapper from app.models.broadcast_read_user import PityBroadcastReadUser from app.utils.decorator import dao from app.utils.logger import Log @dao(PityBroadcastReadUser, Log("BroadcastReadDao"))
[ 6738, 598, 13, 6098, 463, 1330, 337, 11463, 198, 6738, 598, 13, 27530, 13, 36654, 2701, 62, 961, 62, 7220, 1330, 350, 414, 30507, 2701, 5569, 12982, 198, 6738, 598, 13, 26791, 13, 12501, 273, 1352, 1330, 288, 5488, 198, 6738, 598, 1...
3.056338
71
import torch.nn as nn from torchvision.models.resnet import model_urls from torchvision.models.utils import load_state_dict_from_url from ..layers import Sequential, Conv2d, BatchNorm2d, FC, MaxPool2d, GlobalAvgPool2D, GroupNorm, \ ResNetBottleneckBlock, ResNetBasicBlock from ..utils import batch_set_tensor __all_...
[ 11748, 28034, 13, 20471, 355, 299, 77, 198, 6738, 28034, 10178, 13, 27530, 13, 411, 3262, 1330, 2746, 62, 6371, 82, 198, 6738, 28034, 10178, 13, 27530, 13, 26791, 1330, 3440, 62, 5219, 62, 11600, 62, 6738, 62, 6371, 198, 6738, 11485, ...
2.523686
2,322
from server import app, talisman import pytest # Create test client without https redirect # (normally taken care of by running in debug) @pytest.fixture # Add a function to test routes with optional location
[ 6738, 4382, 1330, 598, 11, 3305, 23845, 198, 11748, 12972, 9288, 628, 198, 2, 13610, 1332, 5456, 1231, 3740, 18941, 198, 2, 357, 27237, 453, 2077, 1337, 286, 416, 2491, 287, 14257, 8, 198, 31, 9078, 9288, 13, 69, 9602, 628, 198, 2, ...
3.963636
55
import os p = open(os.environ['subdir'] + '/lensing.bands','r').readlines() i = 0 for l in p: import re res = re.split('\s+',l) f_in = os.environ['subdir'] + '/' + res[0] + '/' + res[1] + '/SCIENCE/coadd_' + res[0] + '_good/coadd.reg' from glob import glob command = 'cp ' + f_in + ' ' + os.environ...
[ 11748, 28686, 198, 79, 796, 1280, 7, 418, 13, 268, 2268, 17816, 7266, 15908, 20520, 1343, 31051, 75, 26426, 13, 21397, 41707, 81, 27691, 961, 6615, 3419, 198, 72, 796, 657, 198, 1640, 300, 287, 279, 25, 198, 220, 220, 220, 1330, 302...
2.164384
219
# -*- coding: utf-8 -*- # Generated by Django 1.11.15 on 2018-10-15 05:23 from __future__ import unicode_literals from django.db import migrations, models import fileapp.models
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 1157, 13, 1314, 319, 2864, 12, 940, 12, 1314, 8870, 25, 1954, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, ...
2.84127
63
# Copyright 2013 Hewlett-Packard Development Company, L.P. # # 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 applicabl...
[ 2, 15069, 2211, 30446, 15503, 12, 11869, 446, 7712, 5834, 11, 406, 13, 47, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 407, 779, 428, 2393, 2845, 287, ...
2.4742
1,938
import discord from discord.ext import commands from discord.utils import get
[ 11748, 36446, 198, 6738, 36446, 13, 2302, 1330, 9729, 198, 6738, 36446, 13, 26791, 1330, 651 ]
4.8125
16
# encoding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import ( compat_str, compat_urllib_parse_urlencode, ) from ..utils import ExtractorError
[ 2, 21004, 25, 3384, 69, 12, 23, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 302, 198, 198, 6738, 764, 11321, 1330, 14151, 11627, 40450, 198, 6738, 11485, 5589, 265, 1330, 357, 198, 220, 220, 220, ...
2.958904
73
# Generated by Django 3.1.7 on 2021-03-31 17:16 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 22, 319, 33448, 12, 3070, 12, 3132, 1596, 25, 1433, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
from sklearn.neighbors import KNeighborsClassifier, KNeighborsRegressor, NearestNeighbors from sklearn.metrics import balanced_accuracy_score, mean_absolute_error import numpy as np import matplotlib import matplotlib.pyplot as plt from .plot import multiline from tqdm.autonotebook import tqdm
[ 6738, 1341, 35720, 13, 710, 394, 32289, 1330, 509, 46445, 32289, 9487, 7483, 11, 509, 46445, 32289, 8081, 44292, 11, 3169, 12423, 46445, 32289, 198, 6738, 1341, 35720, 13, 4164, 10466, 1330, 12974, 62, 4134, 23843, 62, 26675, 11, 1612, ...
3.225806
93
""" Name: Runs a Google Analytics API query Developer: Matt Clarke Date: June 8, 2020 Description: Passes a payload to the Google Analytics reporting API and returns the data. """ import math import pandas as pd def show_message(verbose, message): """Show a message if verbose mode is True. Args: ver...
[ 37811, 198, 5376, 25, 44743, 257, 3012, 30437, 7824, 12405, 198, 45351, 25, 4705, 19635, 198, 10430, 25, 2795, 807, 11, 12131, 198, 11828, 25, 6251, 274, 257, 21437, 284, 262, 3012, 30437, 6447, 7824, 290, 5860, 262, 1366, 13, 198, 37...
2.395468
9,973
#!/usr/bin/env python3 """ Copyright (c) Facebook, Inc. and its affiliates. This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree. """ import math import matplotlib import numpy as np import os import unittest from sumo.geometry.rot3 import Rot3 import...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 37811, 198, 15269, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 198, 198, 1212, 2723, 2438, 318, 11971, 739, 262, 17168, 5964, 1043, 287, 262, 198, 43, 2149, 24290, 2393,...
3.239726
146
# Copyright 2021 The Brax 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 wri...
[ 2, 15069, 33448, 383, 9718, 87, 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, 198, 2, ...
2.092161
6,174
# Module imports Input, Output and AttributeList to be used in widgets # pylint: disable=unused-import import sys import os import types from operator import attrgetter from AnyQt.QtWidgets import ( QWidget, QDialog, QVBoxLayout, QSizePolicy, QApplication, QStyle, QShortcut, QSplitter,...
[ 2, 19937, 17944, 23412, 11, 25235, 290, 3460, 4163, 8053, 284, 307, 973, 287, 40803, 198, 2, 279, 2645, 600, 25, 15560, 28, 403, 1484, 12, 11748, 198, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 3858, 198, 6738, 10088, 1330, 708...
2.669692
7,602
# Copyright (C) 2019 Simon Biggs # 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, 357, 34, 8, 13130, 11288, 4403, 14542, 198, 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.641184
811
import os class Config: """Extendable configuation class. This is also used for flask application config. """ DATABASE = "hakoblog" DATABASE_HOST = "db" DATABASE_USER = "root" DATABASE_PASS = "" TESTING = False GLOBAL_USER_NAME = "hakobe" CONFIG = config()
[ 11748, 28686, 628, 198, 4871, 17056, 25, 198, 220, 220, 220, 37227, 11627, 437, 540, 4566, 2288, 1398, 13, 198, 220, 220, 220, 770, 318, 635, 973, 329, 42903, 3586, 4566, 13, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 360, 1404,...
2.4
125
""" PLOTING DIRECTIONALITY INDEX @author: PUNEET DHEER """ from matplotlib.widgets import Button import numpy as np import matplotlib.pyplot as plt from itertools import combinations fig,ax = plt.subplots() plt.subplots_adjust(bottom = 0.3) dataDI = DI index = np.arange(0, dataDI.shape[0],1) ...
[ 37811, 201, 198, 6489, 2394, 2751, 42242, 2849, 1847, 9050, 24413, 6369, 201, 198, 201, 198, 31, 9800, 25, 350, 41884, 2767, 360, 13909, 1137, 201, 198, 37811, 201, 198, 201, 198, 6738, 2603, 29487, 8019, 13, 28029, 11407, 1330, 20969, ...
2.118236
499
from libavg_charts.aid_lines.cursor_aid_line import CursorAidLine
[ 6738, 9195, 615, 70, 62, 354, 5889, 13, 1698, 62, 6615, 13, 66, 21471, 62, 1698, 62, 1370, 1330, 327, 21471, 44245, 13949, 628 ]
2.791667
24
import os.path from typing import List import xarray as xr from test.cli.helpers import CliTest, CliDataTest, TEST_ZARR_DIR from xcube.core.verify import assert_cube
[ 11748, 28686, 13, 6978, 198, 6738, 19720, 1330, 7343, 198, 198, 11748, 2124, 18747, 355, 2124, 81, 198, 198, 6738, 1332, 13, 44506, 13, 16794, 364, 1330, 1012, 72, 14402, 11, 1012, 72, 6601, 14402, 11, 43001, 62, 57, 26465, 62, 34720,...
2.982456
57
from __future__ import unicode_literals from django.apps import AppConfig
[ 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
3.619048
21
from treadmill.infra.setup import base_provision from treadmill.infra import configuration, constants, exceptions from treadmill.api import ipa
[ 6738, 49246, 13, 10745, 430, 13, 40406, 1330, 2779, 62, 1676, 10178, 198, 6738, 49246, 13, 10745, 430, 1330, 8398, 11, 38491, 11, 13269, 198, 6738, 49246, 13, 15042, 1330, 20966, 64, 628 ]
4.393939
33
import json # Generate traits JSON from IPFS metadata json_data = {'assets': []} dir = 'ipfs\doe_metadata_QmcxJeVYRhyevvwQgsBfSWiY7QVmyNx1rQinzXbc1ZYut5' for i in range(1, 10001): with open(f'{dir}/{i}', 'r') as f: tmp_data = json.loads(f.read()) json_data['assets'].append(tmp_data) with open...
[ 11748, 33918, 198, 198, 2, 2980, 378, 12796, 19449, 422, 6101, 10652, 20150, 198, 17752, 62, 7890, 796, 1391, 6, 19668, 10354, 17635, 92, 198, 15908, 796, 705, 541, 9501, 59, 67, 2577, 62, 38993, 62, 48, 23209, 87, 40932, 53, 38162, ...
2.01
200
"""Describes a DiscreteTimeStateTransitionModel""" import numpy as np import tensorflow as tf import tensorflow_probability as tfp from tensorflow_probability.python.internal import dtype_util from tensorflow_probability.python.internal import reparameterization from covid.impl.util import batch_gather, transition_coo...
[ 37811, 24564, 22090, 257, 8444, 8374, 7575, 9012, 8291, 653, 17633, 37811, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 11192, 273, 11125, 62, 1676, 65, 1799, 355, 256, 46428, 198, 6738, 11192...
3.019108
157
""" description: this file helps to load raw file and gennerate batch x,y author:luchi date:22/11/2016 """ import numpy as np import cPickle as pkl #file path dataset_path='data/subj0.pkl' #return batch dataset
[ 37811, 198, 11213, 25, 428, 2393, 5419, 284, 3440, 8246, 2393, 290, 2429, 1008, 378, 15458, 2124, 11, 88, 198, 9800, 25, 75, 22200, 198, 4475, 25, 1828, 14, 1157, 14, 5304, 198, 37811, 198, 11748, 299, 32152, 355, 45941, 198, 11748, ...
2.772152
79
# Copyright 2016 Leon Poon and Contributors # # 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 ...
[ 2, 15069, 1584, 10592, 350, 2049, 290, 25767, 669, 201, 198, 2, 201, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 201, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 2...
3.372449
196
from functools import lru_cache from pydantic import BaseSettings @lru_cache
[ 6738, 1257, 310, 10141, 1330, 300, 622, 62, 23870, 198, 198, 6738, 279, 5173, 5109, 1330, 7308, 26232, 628, 198, 198, 31, 75, 622, 62, 23870, 198 ]
3
27
from django.contrib import admin from .models import * # Register your models here. admin.site.register(Hotel) admin.site.register(Owner) admin.site.register(Room) admin.site.register(Comment)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 764, 27530, 1330, 1635, 198, 198, 2, 17296, 534, 4981, 994, 13, 198, 28482, 13, 15654, 13, 30238, 7, 21352, 417, 8, 198, 28482, 13, 15654, 13, 30238, 7, 42419, 8, 198, 28482...
3.233333
60
from test_include import * import numpy as np data = generate_dataset() past_queries = [] past_queries.append(Query([0.2, 0.2, 0.6, 0.6], 0.4, 1)) test_queries, freqmat = generate_test_queries(data) quickSel = Crumbs() quickSel.assign_optimal_freq(past_queries) crumbs_answers = map(lambda t: quickSel.answer(t), tes...
[ 6738, 1332, 62, 17256, 1330, 1635, 198, 11748, 299, 32152, 355, 45941, 628, 198, 7890, 796, 7716, 62, 19608, 292, 316, 3419, 198, 198, 30119, 62, 421, 10640, 796, 17635, 198, 30119, 62, 421, 10640, 13, 33295, 7, 20746, 26933, 15, 13, ...
2.360215
186
#!/usr/bin/env python3 import os import sys import fileinput import itertools # Define input and output files fileToClean = '/Users/tdh1/Desktop/MTCdata/2-17-2017-Hurco04.txt' #input file fileToSave = '/Users/tdh1/Desktop/MTCdata/2-17-2017-Hurco04-Clean.txt' #output file fileToTemp = '/Users/tdh1/Desktop/MTCdata/Temp....
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 2393, 15414, 198, 11748, 340, 861, 10141, 198, 198, 2, 2896, 500, 5128, 290, 5072, 3696, 198, 7753, 2514, 32657, 796, 31051, 14490, 14, ...
2.743259
853
import re
[ 11748, 302, 198 ]
3.333333
3
num = int(input('Digite um valor p/ saber seu fatorial: ')) c = num d = num print('{}!= {}x'.format(num,num),end='') while c != 1: c -= 1 num += (c * num) - num if c != 1: print('{}x'.format(c), end='') else: print('{}'.format(c), end='') print('\nO fatorial de {} é {}.'.format(d,num))
[ 22510, 796, 493, 7, 15414, 10786, 19511, 578, 23781, 1188, 273, 279, 14, 17463, 263, 384, 84, 277, 21592, 25, 705, 4008, 198, 66, 796, 997, 198, 67, 796, 997, 198, 4798, 10786, 90, 92, 0, 28, 23884, 87, 4458, 18982, 7, 22510, 11, ...
2.058065
155
#!/usr/bin/env python # encoding: utf-8 """ Parses and updates indexes files. Created by Karl Dubost on 2018-03-25. Copyright (c) 2018 Grange. All rights reserved. see LICENSE.TXT """ import datetime import logging import os import string import sys import lxml.html from lxml import etree from ymir.utils import hel...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 21004, 25, 3384, 69, 12, 23, 198, 37811, 198, 47, 945, 274, 290, 5992, 39199, 3696, 13, 198, 198, 41972, 416, 15415, 10322, 455, 319, 2864, 12, 3070, 12, 1495, 13, 198, 15269, 3...
2.465417
1,547
#!/usr/bin/python3 from gpiozero import RGBLED, Button, LED, DigitalOutputDevice from time import sleep from subprocess import getoutput from signal import pause from os import system ''' Script zum aktivieren verschiedener Ein- und Ausgabegeraete -Rotary Encoder zur Lautstaerkeregelung -RGB LED zur Anzeige/Visualisie...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 6738, 27809, 952, 22570, 1330, 25228, 30465, 11, 20969, 11, 12365, 11, 10231, 26410, 24728, 198, 6738, 640, 1330, 3993, 198, 6738, 850, 14681, 1330, 651, 22915, 198, 6738, 6737, 1330, 14985...
2.272881
2,371
from django.utils.translation import ugettext_lazy as _ from django.forms import ModelForm, ValidationError from .workflow import Account from .constants import BANK_CODE_RANGE
[ 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 334, 1136, 5239, 62, 75, 12582, 355, 4808, 198, 6738, 42625, 14208, 13, 23914, 1330, 9104, 8479, 11, 3254, 24765, 12331, 198, 6738, 764, 1818, 11125, 1330, 10781, 198, 6738, 764, 9979, 118...
3.442308
52
"""Selection classes. Represents an enumeration using a widget. """ # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. from collections import OrderedDict from threading import Lock from .widget import DOMWidget, register from traitlets import ( Unicode, Bool, A...
[ 37811, 4653, 1564, 6097, 13, 198, 198, 6207, 6629, 281, 27056, 341, 1262, 257, 26295, 13, 198, 37811, 198, 198, 2, 15069, 357, 66, 8, 449, 929, 88, 353, 7712, 4816, 13, 198, 2, 4307, 6169, 739, 262, 2846, 286, 262, 40499, 347, 103...
2.560956
2,551
"""Tests for views for REST APIs for channels""" # pylint: disable=unused-argument import pytest from django.urls import reverse from rest_framework import status from open_discussions.constants import NOT_AUTHENTICATED_ERROR_TYPE from open_discussions.factories import UserFactory pytestmark = [pytest.mark.betamax, p...
[ 37811, 51, 3558, 329, 5009, 329, 30617, 23113, 329, 9619, 37811, 198, 2, 279, 2645, 600, 25, 15560, 28, 403, 1484, 12, 49140, 198, 11748, 12972, 9288, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 198, 6738, 1334, 62, 30604, 1330...
2.707304
1,903
import numpy as np from fedot.core.chains.chain import Chain from fedot.core.chains.node import PrimaryNode, SecondaryNode from fedot.core.data.data_split import train_test_data_setup from test.unit.models.test_split_train_test import get_roc_auc_value, get_synthetic_input_data
[ 11748, 299, 32152, 355, 45941, 198, 198, 6738, 11672, 313, 13, 7295, 13, 38861, 13, 7983, 1330, 21853, 198, 6738, 11672, 313, 13, 7295, 13, 38861, 13, 17440, 1330, 21087, 19667, 11, 29521, 19667, 198, 6738, 11672, 313, 13, 7295, 13, 7...
3.168539
89
from typing import TYPE_CHECKING if TYPE_CHECKING: from Platforms.Web.index import WebIndex from Platforms.Discord.main_discord import PhaazebotDiscord import json import discord from aiohttp.web import Response, Request from Utils.Classes.webrequestcontent import WebRequestContent from Platforms.Discord.utils impor...
[ 6738, 19720, 1330, 41876, 62, 50084, 2751, 198, 361, 41876, 62, 50084, 2751, 25, 198, 197, 6738, 19193, 82, 13, 13908, 13, 9630, 1330, 5313, 15732, 198, 197, 6738, 19193, 82, 13, 15642, 585, 13, 12417, 62, 15410, 585, 1330, 1380, 64, ...
2.672939
1,116
from manimlib.imports import * from accalib.electrical_circuits import BatteryLampCircuit, BatteryLampCircuitAC from accalib.particles import Electron from accalib.lines import DottedLine from accalib.tools import rule_of_thirds_guide
[ 6738, 582, 320, 8019, 13, 320, 3742, 1330, 1635, 198, 6738, 697, 282, 571, 13, 9509, 8143, 62, 21170, 15379, 1330, 23490, 43, 696, 31560, 5013, 11, 23490, 43, 696, 31560, 5013, 2246, 198, 6738, 697, 282, 571, 13, 3911, 2983, 1330, 5...
3.210526
76
from .workflows.run_workflow import run_workflow __all__ = ['run_workflow']
[ 6738, 764, 1818, 44041, 13, 5143, 62, 1818, 11125, 1330, 1057, 62, 1818, 11125, 198, 198, 834, 439, 834, 796, 37250, 5143, 62, 1818, 11125, 20520, 198 ]
2.851852
27
import cv2 import numpy as np import cmapy import matplotlib.pyplot as plt img = cv2.imread('/home/pi/opencv/video0007_frame0007gt_R128x128.png').astype(np.float) # BGR, float blue = img[:,:,2] green = img[:,:,1] red = img[:,:,0] exg = 2*green - red - blue print("max exg", exg.max()) print("mean exg", exg.mean())...
[ 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 269, 8899, 88, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 220, 628, 198, 9600, 796, 220, 269, 85, 17, 13, 320, 961, 10786, 14, 11195, 14, 14415, ...
2.174475
619
""" Front end API for the fuzzi_moss library. """ from .fuzz_decorator import fuzz, set_fuzzer from .fuzz_weaver import fuzz_clazz, defuzz_class, fuzz_module, defuzz_all_classes from .config import pydysofu_random from .core_fuzzers import fuzzer_invocations, fuzzer_invocations_count, reset_invocation_counters
[ 37811, 198, 25886, 886, 7824, 329, 262, 26080, 72, 62, 76, 793, 5888, 13, 198, 37811, 198, 198, 6738, 764, 69, 4715, 62, 12501, 273, 1352, 1330, 26080, 11, 900, 62, 69, 4715, 263, 198, 6738, 764, 69, 4715, 62, 732, 8770, 1330, 260...
2.95283
106
#!/usr/bin/env python import Tkinter as Tk root=Tk.Tk() label=Tk.Label(root, text="Label") label.pack(side='top') button=Tk.Button(root, text="unpack", command=label_unpack) button.pack(side='top') root.mainloop()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 309, 74, 3849, 355, 309, 74, 198, 15763, 28, 51, 74, 13, 51, 74, 3419, 198, 198, 18242, 28, 51, 74, 13, 33986, 7, 15763, 11, 2420, 2625, 33986, 4943, 198, 18242, 13, ...
2.438202
89
import tensorlayerx as tlx from gammagl.layers.conv import MessagePassing class APPNPConv(MessagePassing): ''' Approximate personalized propagation of neural predictions '''
[ 11748, 11192, 273, 29289, 87, 355, 256, 75, 87, 198, 6738, 308, 6475, 363, 75, 13, 75, 6962, 13, 42946, 1330, 16000, 14478, 278, 198, 198, 4871, 3486, 13137, 47, 3103, 85, 7, 12837, 14478, 278, 2599, 198, 220, 220, 220, 705, 7061, ...
3.016129
62