content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
from adversarials.adversarial_utils import * from adversarials import attacker from src.utils.logging import * from src.utils.common_utils import * from src.data.dataset import TextLineDataset from src.data.data_iterator import DataIterator from src.models import build_model from src.decoding import beam_search import...
[ 6738, 16907, 283, 8231, 13, 324, 690, 36098, 62, 26791, 1330, 1635, 198, 6738, 16907, 283, 8231, 1330, 15250, 198, 6738, 12351, 13, 26791, 13, 6404, 2667, 1330, 1635, 198, 6738, 12351, 13, 26791, 13, 11321, 62, 26791, 1330, 1635, 198, ...
1.975767
7,593
import numpy as np import matplotlib.pyplot as plt n = [0,10,20,40,80,160,320,640] error_rate_knn = [0.352873876328,0.387737617135,0.453305017255,0.458524980174,0.474808757584,0.470144927536,0.473847774559,0.467094872065] error_rate_svm = [0.357722691365,0.355341365462,0.355402176799,0.352894528152,0.352941176471,0....
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 628, 198, 198, 77, 796, 685, 15, 11, 940, 11, 1238, 11, 1821, 11, 1795, 11, 14198, 11, 19504, 11, 31102, 60, 198, 18224, 62, 4873, 62, 15...
2.080303
660
from flask import Blueprint, request, jsonify import json import yaml import app_conf from tools.db_connector import DBConnector as mysql from service import service_mesh as sm_service service_mesh = Blueprint('service_mesh', __name__) # set logger logger = app_conf.Log.get_logger(__name__) conn = my...
[ 6738, 42903, 1330, 39932, 11, 2581, 11, 33918, 1958, 201, 198, 11748, 33918, 201, 198, 11748, 331, 43695, 201, 198, 11748, 598, 62, 10414, 201, 198, 201, 198, 6738, 4899, 13, 9945, 62, 8443, 273, 1330, 360, 2749, 261, 1606, 273, 355, ...
2.752
125
# Copyright 2016 by MPI-SWS and Data-Ken Research. # Licensed under the Apache 2.0 License. """ Build a filter that takes an input stream and dispatches to one of several output topics based on the input value. """ import asyncio import unittest from antevents.base import Publisher, DefaultSubscriber, Scheduler from ...
[ 2, 15069, 1584, 416, 4904, 40, 12, 17887, 50, 290, 6060, 12, 27827, 4992, 13, 198, 2, 49962, 739, 262, 24843, 362, 13, 15, 13789, 13, 198, 37811, 198, 15580, 257, 8106, 326, 2753, 281, 5128, 4269, 290, 4596, 20981, 284, 530, 286, ...
3.205479
146
""" Packrat Parsing """ # NOTE: attempting to use exceptions instead of FAIL codes resulted in # almost a 2x slowdown, so it's probably not a good idea from typing import (Union, List, Dict, Callable, Iterable, Any) from collections import defaultdict import re import inspect from pe._constants import ( FAIL, ...
[ 198, 37811, 198, 11869, 10366, 23042, 278, 198, 198, 37811, 198, 198, 2, 24550, 25, 9361, 284, 779, 13269, 2427, 286, 9677, 4146, 12416, 8724, 287, 198, 2, 2048, 257, 362, 87, 35621, 11, 523, 340, 338, 2192, 407, 257, 922, 2126, 198...
2.692759
511
import aiohttp from aiohttp import web import aiohttp_rpc
[ 11748, 257, 952, 4023, 198, 6738, 257, 952, 4023, 1330, 3992, 198, 198, 11748, 257, 952, 4023, 62, 81, 14751, 628, 198 ]
2.772727
22
#!/usr/bin/env python3 """ usage: put under source folder, required files: evolving_state.txt, calib_state.txt, state.txt After first run, integration_states.txt, vio_states.txt are generated and figures are saved in current dir You can move the figures and state.txt, integration_states.txt, vio_states.txt into a fold...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 37811, 198, 26060, 25, 1234, 739, 2723, 9483, 11, 2672, 3696, 25, 21568, 62, 5219, 13, 14116, 11, 27417, 62, 5219, 13, 14116, 11, 1181, 13, 14116, 198, 3260, 717, 1057, 11, ...
2.641278
407
import os import shutil
[ 11748, 28686, 198, 11748, 4423, 346, 628, 628, 628, 198 ]
3
10
from random import randint from time import sleep itens = ('Pedra', 'Papel', 'Tesoura') computador = randint(0, 2) print('''Suas opes: [ 0 ] PEDRA [ 1 ] PAPEL [ 2 ] TESOURA''') jogador = int(input('Qual a sua jogada? ')) print('JO') sleep(1) print('KEN') sleep(1) print('POOO') print('#x#' * 13) print('O computador jog...
[ 6738, 4738, 1330, 43720, 600, 198, 6738, 640, 1330, 3993, 198, 270, 641, 796, 19203, 43468, 430, 3256, 705, 47, 499, 417, 3256, 705, 36504, 280, 430, 11537, 198, 785, 1996, 7079, 796, 43720, 600, 7, 15, 11, 362, 8, 198, 4798, 7, 7...
2.107018
570
""" 5) Faa um programa que pea ao usurio para digitar 10 valores e some-os. """ soma = 0 for n in range(10): num = float(input(f'Digite o valor {n + 1} de 10 para ser somado \n')) soma = soma + num print(f'{soma}')
[ 37811, 198, 20, 8, 376, 7252, 23781, 1430, 64, 8358, 613, 64, 257, 78, 39954, 952, 31215, 3100, 7940, 838, 1188, 2850, 304, 617, 12, 418, 13, 198, 37811, 198, 198, 82, 6086, 796, 657, 198, 1640, 299, 287, 2837, 7, 940, 2599, 198, ...
2.309278
97
# 243 - Shortest Word Distance (Easy) # https://leetcode.com/problems/shortest-word-distance/
[ 2, 35989, 532, 10073, 395, 9678, 34600, 357, 28406, 8, 198, 2, 3740, 1378, 293, 316, 8189, 13, 785, 14, 1676, 22143, 14, 19509, 395, 12, 4775, 12, 30246, 14, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220 ]
2.465116
43
from __future__ import print_function import numpy as np import cv2 import sys import imutils from imutils.video import VideoStream import argparse import time if __name__ == '__main__': main()
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 269, 85, 17, 198, 11748, 25064, 198, 11748, 545, 26791, 198, 6738, 545, 26791, 13, 15588, 1330, 7623, 12124, 198, 11748, 1822, 29572, 198, 11...
3.278689
61
__author__ = 'thorwhalen' """ functions that work on soup, soup tags, etc. """ import bs4 from ut.pgenerator.get import last_element from tempfile import mkdtemp import os import ut.pstr.to as strto import ut.parse.util as parse_util import ut.pstr.trans as pstr_trans def get_elements(nodes, path_to_element): ...
[ 834, 9800, 834, 796, 705, 400, 273, 1929, 282, 268, 6, 198, 37811, 198, 12543, 2733, 326, 670, 319, 17141, 11, 17141, 15940, 11, 3503, 13, 198, 37811, 198, 198, 11748, 275, 82, 19, 198, 198, 6738, 3384, 13, 6024, 877, 1352, 13, 11...
2.219966
591
from faker import Faker from sqlalchemy import Column, Date, ForeignKey, Integer, String, Table, create_engine from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm.session import sessionmaker from sqlalchemy_utils import create_database, database_exists connection_string = "mysql+mysqlconnector:...
[ 6738, 277, 3110, 1330, 376, 3110, 198, 6738, 44161, 282, 26599, 1330, 29201, 11, 7536, 11, 8708, 9218, 11, 34142, 11, 10903, 11, 8655, 11, 2251, 62, 18392, 198, 6738, 44161, 282, 26599, 13, 2302, 13, 32446, 283, 876, 1330, 2377, 283, ...
3.112821
195
""" Return the 3rd longest string in an array of strings """ print ThirdGreatest(raw_input())
[ 37811, 198, 13615, 262, 513, 4372, 14069, 198, 8841, 287, 281, 7177, 286, 198, 37336, 198, 37811, 198, 220, 220, 220, 220, 198, 4798, 10467, 13681, 395, 7, 1831, 62, 15414, 28955, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 22...
2.5
44
# -*- coding: utf-8 -*- """rackio/workers/__init__.py This module implements all Rackio Workers. """ from .alarms import AlarmWorker from .api import APIWorker from .continuos import _ContinuosWorker from .controls import ControlWorker from .functions import FunctionWorker from .logger import LoggerWorker from .state...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 39638, 952, 14, 22896, 14, 834, 15003, 834, 13, 9078, 198, 198, 1212, 8265, 23986, 477, 37927, 952, 16847, 13, 198, 37811, 198, 198, 6738, 764, 282, 8357, 1330, ...
3.242991
107
# coding: utf-8 # leetcode import os import json import requests import time if __name__ == '__main__': main()
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 2, 443, 316, 8189, 198, 198, 11748, 28686, 198, 11748, 33918, 198, 11748, 7007, 198, 11748, 640, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388,...
2.688889
45
""" File: Milestone1.py Name: ----------------------- This file tests the milestone 1 for our babyname.py project """ import sys # ------------- DO NOT EDIT THE CODE BELOW THIS LINE ---------------- # if __name__ == "__main__": main()
[ 37811, 198, 8979, 25, 4460, 13631, 16, 13, 9078, 198, 5376, 25, 220, 198, 19351, 6329, 198, 1212, 2393, 5254, 262, 23554, 352, 329, 198, 454, 9289, 2047, 480, 13, 9078, 1628, 198, 37811, 198, 198, 11748, 25064, 628, 198, 198, 2, 220...
3.333333
75
from typing import List, Set from CandidateScore import CandidateScore from Candidate import Candidate from Voter import Voter from ElectionConfig import ElectionConfig
[ 6738, 19720, 1330, 7343, 11, 5345, 198, 6738, 40327, 26595, 1330, 40327, 26595, 198, 6738, 40327, 1330, 40327, 198, 6738, 46226, 1330, 46226, 198, 6738, 14219, 16934, 1330, 14219, 16934, 628, 198 ]
5.34375
32
import os import time from tqdm import tqdm import trimesh import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from torch.utils.data import DataLoader import _init_path from config import cfg from RASF import RASF from pointclouds.datasets.shapenetpart import ShapenetPartDataset, to...
[ 11748, 28686, 198, 11748, 640, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 198, 11748, 491, 999, 71, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, ...
2.284065
2,165
from django.utils.translation import ugettext as _ from slugify import slugify from .base import models
[ 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 334, 1136, 5239, 355, 4808, 198, 198, 6738, 31065, 1958, 1330, 31065, 1958, 198, 198, 6738, 764, 8692, 1330, 4981, 628 ]
3.689655
29
import os import sys import cv2 import numpy as np import matplotlib.pyplot as plt sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..')) from lib.utils import utils_inference from lib.utils import utils_landmarks from lib.ransac import ransac ### Eye Landmarks Detection method = 'unityeyes_angle' ckpt = 13...
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 17597, 13, 6978, 13, 28463, 7, 15, 11, 28686, 13, 6978, 13, 22179, 7, 4...
2.153235
881
#!/usr/bin/python from common import * import atexit atexit.register(cleanup) subs = [ sub('1.1.#'), sub('1.1.#'), sub('1.1.#') ] for i in range(100): pub('1.1.{}'.format(i)) expect_pub_received(subs, ['1.1.\d+'] * 100)
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 6738, 2219, 1330, 1635, 198, 11748, 379, 37023, 198, 198, 378, 10198, 13, 30238, 7, 27773, 929, 8, 198, 198, 7266, 82, 796, 685, 198, 220, 220, 220, 850, 10786, 16, 13, 16, 32535, 33...
2.02521
119
from typing import List from neural_network import NeuralNetwork
[ 6738, 19720, 1330, 7343, 198, 6738, 17019, 62, 27349, 1330, 47986, 26245, 628 ]
5.076923
13
import wisardpkg as wp import random import numpy as np import time from astropy.stats import bootstrap from astropy.utils import NumpyRNGContext LOW_N = 5 HIGH_N = 31 MIN_SCORE = 0.1 GROW_INTERVAL = 100 MAX_DISCRIMINATOR_LIMIT = 10
[ 11748, 266, 271, 446, 35339, 355, 266, 79, 198, 11748, 4738, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 640, 198, 6738, 6468, 28338, 13, 34242, 1330, 6297, 26418, 198, 6738, 6468, 28338, 13, 26791, 1330, 399, 32152, 49, 10503, 2194...
2.659091
88
""" Copyright 2013 Rackspace 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, software dist...
[ 37811, 198, 15269, 2211, 37927, 13200, 198, 198, 26656, 15385, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 5832, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 1639, 743, 7...
3.798969
194
from PyQt5.QtGui import QImage, QPixmap # review
[ 6738, 9485, 48, 83, 20, 13, 48, 83, 8205, 72, 1330, 1195, 5159, 11, 1195, 47, 844, 8899, 1303, 2423, 198 ]
2.333333
21
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2011-2013, Nigel Small # # 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...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 15069, 2813, 12, 6390, 11, 28772, 10452, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, ...
3.435484
248
import pybithumb df = pybithumb.get_ohlcv("BTC", interval="day") df[""] = (df['high'] - df['low']) * 0.5 df[""] = df["open"] + df[""].shift(1) print(df)
[ 11748, 12972, 65, 342, 2178, 198, 198, 7568, 796, 12972, 65, 342, 2178, 13, 1136, 62, 48988, 33967, 7203, 35964, 1600, 16654, 2625, 820, 4943, 198, 7568, 14692, 8973, 796, 357, 7568, 17816, 8929, 20520, 532, 47764, 17816, 9319, 6, 12962...
2.231884
69
"""Common dependencies for rules_proto_grpc.""" load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_file") load("//internal:common.bzl", "check_bazel_minimum_version") # Versions MINIMUM_BAZEL_VERSION = "3.0.0" ENABLE_VERSION_NAGS = False PROTOBUF_VERSION = "3.19.1" # When updating, also updat...
[ 37811, 17227, 20086, 329, 3173, 62, 1676, 1462, 62, 2164, 14751, 526, 15931, 198, 198, 2220, 7203, 31, 65, 41319, 62, 31391, 1003, 31391, 14, 11249, 62, 4299, 82, 14, 260, 7501, 25, 4023, 13, 65, 48274, 1600, 366, 4023, 62, 17474, 1...
1.838815
7,693
from fastapi import APIRouter from ws_assets.routes import ui from ws_assets.routes.api.v1 import websocket from ws_assets.settings import Settings settings = Settings() # /api/v1 api_v1_router = APIRouter(tags=["v1"]) for endpoints in (websocket,): api_v1_router.include_router(endpoints.router, prefix="/api/v1...
[ 6738, 3049, 15042, 1330, 3486, 4663, 39605, 198, 198, 6738, 266, 82, 62, 19668, 13, 81, 448, 274, 1330, 334, 72, 198, 6738, 266, 82, 62, 19668, 13, 81, 448, 274, 13, 15042, 13, 85, 16, 1330, 2639, 5459, 198, 6738, 266, 82, 62, 1...
2.468927
177
#!/usr/bin/env python # -*- coding: utf-8 -*- """AdventureDocs Choose Your Own Adventure style software documentation from markdown. Use markdown files to represent a section of instructions, and options to skip to a section, or just go to the next section. Load a directory of markdown files, which also includes a ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 48289, 23579, 82, 198, 198, 31851, 3406, 11744, 9553, 3918, 3788, 198, 22897, 341, 422, 1317, 2902, 13, 198...
3.654028
211
# This example runs the examples from figure 5 of the manuscript from synbioweaver import * declareNewMolecule('GFP') declareNewMolecule('TetR') declareNewPart('pConst', ConstitutivePromoter, []) declareNewPart('cTetR', CodingRegion, moleculesAfter=[TetR]) declareNewPart('ter',Terminator) declareNewPart('pNeg', Nega...
[ 2, 770, 1672, 4539, 262, 6096, 422, 3785, 642, 286, 262, 17116, 198, 198, 6738, 6171, 8482, 47097, 8770, 1330, 1635, 198, 198, 32446, 533, 3791, 44, 2305, 23172, 10786, 38, 5837, 11537, 198, 32446, 533, 3791, 44, 2305, 23172, 10786, 5...
3.171975
314
from util import * from arclib import bz2 from bz2 import compress, decompress
[ 6738, 7736, 1330, 1635, 198, 6738, 610, 565, 571, 1330, 275, 89, 17, 198, 6738, 275, 89, 17, 1330, 27413, 11, 38237, 601, 198 ]
3.291667
24
from train.train_agent import train_agent from train.train_agents import train_agents
[ 6738, 4512, 13, 27432, 62, 25781, 1330, 4512, 62, 25781, 198, 6738, 4512, 13, 27432, 62, 49638, 1330, 4512, 62, 49638, 198 ]
3.909091
22
import argparse import json import logging import multiprocessing as mp import os import time from typing import List from detectron2.structures import BoxMode from detectron2 import model_zoo from detectron2.data import MetadataCatalog, DatasetCatalog from detectron2.structures import BoxMode from detectron2.utils.vi...
[ 11748, 1822, 29572, 198, 11748, 33918, 198, 11748, 18931, 198, 11748, 18540, 305, 919, 278, 355, 29034, 198, 11748, 28686, 198, 11748, 640, 198, 6738, 19720, 1330, 7343, 198, 198, 6738, 4886, 1313, 17, 13, 7249, 942, 1330, 8315, 19076, ...
2.392065
2,571
from typing import Any, Callable, Dict, List, Tuple try: from typing_extensions import Protocol except ImportError: from typing import Protocol # type: ignore StrHeaderListType = List[Tuple[str, str]] RawHeaderListType = List[Tuple[bytes, bytes]] HeaderDictType = Dict[str, Any] ParamDictType = Dict[str, str]...
[ 6738, 19720, 1330, 4377, 11, 4889, 540, 11, 360, 713, 11, 7343, 11, 309, 29291, 198, 198, 28311, 25, 198, 220, 220, 220, 422, 19720, 62, 2302, 5736, 1330, 20497, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220, 422, 19720, 1330, 20...
3.042017
119
from dataclasses import dataclass from typing import Union NoneType = type(None)
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 6738, 19720, 1330, 4479, 628, 198, 14202, 6030, 796, 2099, 7, 14202, 8, 198, 220, 220, 220, 220 ]
3.222222
27
import math from typing import Sequence, Tuple import torch from torch import nn from torch.nn import functional as F from tensorfn.config import config_model from pydantic import StrictInt, StrictFloat from .layer import DropPath, tuple2, PositionwiseFeedForward LayerNorm = lambda x: nn.LayerNorm(x, eps=...
[ 11748, 10688, 201, 198, 6738, 19720, 1330, 45835, 11, 309, 29291, 201, 198, 201, 198, 11748, 28034, 201, 198, 6738, 28034, 1330, 299, 77, 201, 198, 6738, 28034, 13, 20471, 1330, 10345, 355, 376, 201, 198, 6738, 11192, 273, 22184, 13, ...
2.824675
154
import tensorflow as tf if tf.__version__.startswith('1.'): tf.enable_eager_execution()
[ 11748, 11192, 273, 11125, 355, 48700, 198, 198, 361, 48700, 13, 834, 9641, 834, 13, 9688, 2032, 342, 10786, 16, 2637, 2599, 198, 220, 220, 220, 48700, 13, 21633, 62, 68, 3536, 62, 18558, 1009, 3419, 198 ]
2.513514
37
import json # def basic_info_merger(dict): # with open ('basic_number_info.json', 'r') as basic_num_info: # num_info = json.load(basic_num_info) # for data in num_info: # # print(data) # number = str(data.get('number'))[2:-2] # # print(number) # number2 = '+92'+ dict['n...
[ 11748, 33918, 628, 198, 2, 825, 4096, 62, 10951, 62, 647, 1362, 7, 11600, 2599, 198, 2, 220, 220, 220, 220, 351, 1280, 19203, 35487, 62, 17618, 62, 10951, 13, 17752, 3256, 705, 81, 11537, 355, 4096, 62, 22510, 62, 10951, 25, 198, ...
2.056278
3,998
# from django import forms # from .models import ExcelUpload # # # class ExcelUploadForm(forms.ModelForm): # class Meta: # model = ExcelUpload # fields = ('document', )
[ 2, 422, 42625, 14208, 1330, 5107, 198, 2, 422, 764, 27530, 1330, 24134, 41592, 198, 2, 198, 2, 198, 2, 1398, 24134, 41592, 8479, 7, 23914, 13, 17633, 8479, 2599, 198, 2, 220, 220, 220, 220, 1398, 30277, 25, 198, 2, 220, 220, 220, ...
2.7
70
from .loading import * from .utils_dict_list import * from .get_logger import get_neptune_logger, get_tensorboard_logger from .map_dict import Map,DotDict
[ 6738, 764, 25138, 1330, 1635, 198, 6738, 764, 26791, 62, 11600, 62, 4868, 1330, 1635, 198, 6738, 764, 1136, 62, 6404, 1362, 1330, 651, 62, 710, 457, 1726, 62, 6404, 1362, 11, 651, 62, 83, 22854, 3526, 62, 6404, 1362, 198, 6738, 764,...
2.90566
53
import gzip from pathlib import Path import numpy as np data_path = Path(__file__).parent / '..' / 'data' train_images_file = data_path / 'train-images-idx3-ubyte.gz' train_labels_file = data_path / 'train-labels-idx1-ubyte.gz' test_images_file = data_path / 't10k-images-idx3-ubyte.gz' test_labels_file = data_path /...
[ 11748, 308, 13344, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 7890, 62, 6978, 796, 10644, 7, 834, 7753, 834, 737, 8000, 1220, 705, 492, 6, 1220, 705, 7890, 6, 198, 198, 27432, 62, 17566, 6...
2.240896
357
from __future__ import absolute_import from __future__ import print_function import os.path import numpy # from nipype.interfaces.base import ( # TraitedSpec, traits, File, isdefined, # CommandLineInputSpec, CommandLine) from nipype.interfaces.base import ( TraitedSpec, traits, BaseInterface, File, isdefine...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 28686, 13, 6978, 198, 11748, 299, 32152, 198, 2, 422, 299, 541, 2981, 13, 3849, 32186, 13, 8692, 1330, 357, 198, 2, 220, ...
2.653696
514
from Bio import SeqIO import sys with open("phase0.fasta", 'w') as phase0, open("phase1.fasta", 'w') as phase1: for record in SeqIO.parse(sys.argv[1], "fasta"): if record.id.endswith('0'): phase0.write(record.format("fasta")) elif record.id.endswith('1'): phase1.write(record...
[ 6738, 16024, 1330, 1001, 80, 9399, 198, 11748, 25064, 198, 198, 4480, 1280, 7203, 40715, 15, 13, 7217, 64, 1600, 705, 86, 11537, 355, 7108, 15, 11, 1280, 7203, 40715, 16, 13, 7217, 64, 1600, 705, 86, 11537, 355, 7108, 16, 25, 198, ...
2.059459
185
import time from tests.integration.integration_test_case import IntegrationTestCase from app.settings import RESPONDENT_ACCOUNT_URL
[ 11748, 640, 198, 198, 6738, 5254, 13, 18908, 1358, 13, 18908, 1358, 62, 9288, 62, 7442, 1330, 38410, 14402, 20448, 198, 6738, 598, 13, 33692, 1330, 47203, 18672, 3525, 62, 26861, 28270, 62, 21886, 628 ]
3.828571
35
import os from gym.envs.mujoco import reacher3dof from rllab.envs.gym_env import GymEnv os.environ['MKL_SERVICE_FORCE_INTEL'] = '1' os.environ['MUJOCO_GL'] = 'egl' env = GymEnv("Reacher3DOF-v1", mode='oracle', force_reset=True) time_step = env.reset() print(time_step) while True: env.render() time_step = en...
[ 11748, 28686, 198, 198, 6738, 11550, 13, 268, 14259, 13, 76, 23577, 25634, 1330, 302, 3493, 18, 67, 1659, 198, 6738, 374, 297, 397, 13, 268, 14259, 13, 1360, 76, 62, 24330, 1330, 31187, 4834, 85, 198, 198, 418, 13, 268, 2268, 17816,...
2.350211
237
import spacy from spacy.lang.de.examples import sentences #from collections import OrderedDict #import numpy as np nlp = spacy.load('de_core_news_sm') doc = nlp("Weil die Sonne scheint, ist es warm, nachdem ich ein Eis, das sehr lecker war, gegessen habe.") print(doc.text) #for token in doc: # print(token.text, to...
[ 11748, 599, 1590, 198, 6738, 599, 1590, 13, 17204, 13, 2934, 13, 1069, 12629, 1330, 13439, 198, 2, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 2, 11748, 299, 32152, 355, 45941, 198, 198, 21283, 79, 796, 599, 1590, 13, 2220, 10786, ...
2.556561
221
from django.contrib import admin from django.urls import path, include from django.conf import settings from django.conf.urls import url urlpatterns = [ url(r'^api-auth/', include('rest_framework.urls')), path('', include('lobby.urls')), path('', include('connectquatro.urls')), path('admin/', admin.si...
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 11, 2291, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 628, 198, 6371, ...
2.743802
121
# -*- coding: utf-8 -*- ''' Some common, generic utilities ''' from __future__ import absolute_import from base64 import urlsafe_b64encode, urlsafe_b64decode def urlsafe_nopadding_b64encode(data): '''URL safe Base64 encode without padding (=)''' return urlsafe_b64encode(data).rstrip('=') def urlsafe_nopa...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 7061, 6, 198, 4366, 2219, 11, 14276, 20081, 198, 7061, 6, 198, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 6738, 2779, 2414, 1330, 2956, 7278, ...
2.439394
330
# ---------------------------------------------------------------------------- # Copyright (c) 2016-2018, QIIME 2 development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. # ------------------------------------------------...
[ 2, 16529, 10541, 198, 2, 15069, 357, 66, 8, 1584, 12, 7908, 11, 1195, 40, 12789, 362, 2478, 1074, 13, 198, 2, 198, 2, 4307, 6169, 739, 262, 2846, 286, 262, 40499, 347, 10305, 13789, 13, 198, 2, 198, 2, 383, 1336, 5964, 318, 287,...
4.482456
114
# -*- coding: utf-8 -*- """Main module.""" from pyspark.sql import DataFrame from pyspark.sql.functions import lit, col, to_timestamp
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 201, 198, 37811, 13383, 8265, 526, 15931, 201, 198, 201, 198, 201, 198, 6738, 279, 893, 20928, 13, 25410, 1330, 6060, 19778, 201, 198, 6738, 279, 893, 20928, 13, ...
2.349206
63
from avalon import harmony
[ 6738, 37441, 261, 1330, 22471, 628 ]
4.666667
6
# Copyright 2015 Google Inc. 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 applicable law or ag...
[ 2, 15069, 1853, 3012, 3457, 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, 351, 262, 13789, ...
3.704348
230
from fixture.utils import equal_list, equal_dict from ezcode.graph import NegativeCycleExist from ezcode.graph.directed import DirectedGraph from ezcode.graph.undirected import UndirectedGraph def test_undirected_graph(): """ A ------ C | /|\ | / | \ | / | \ | / | E ...
[ 6738, 29220, 13, 26791, 1330, 4961, 62, 4868, 11, 4961, 62, 11600, 198, 6738, 304, 89, 8189, 13, 34960, 1330, 36183, 20418, 2375, 3109, 396, 198, 6738, 304, 89, 8189, 13, 34960, 13, 34762, 1330, 4128, 276, 37065, 198, 6738, 304, 89, ...
1.832029
4,090
from .abc_coffee import AbcCoffeeProgram from .ingredients import Milk, Coffee from .programs import (Cappuccino, Doppio, Espresso, Latte, Lungo, Macchiato)
[ 6738, 764, 39305, 62, 1073, 5853, 1330, 2275, 66, 34, 2364, 1453, 15167, 198, 6738, 764, 278, 23320, 1330, 24796, 11, 19443, 198, 6738, 764, 23065, 82, 1330, 357, 34, 1324, 18863, 2879, 11, 2141, 381, 952, 11, 20386, 33852, 11, 5476, ...
2.962264
53
#coding=utf8 import time, sys, Queue import MySQLdb from MySQLdb import cursors from multiprocessing.managers import BaseManager from multiprocessing.sharedctypes import RawArray from multiprocessing import Process, freeze_support, Array reload(sys) sys.setdefaultencoding('utf8') if __name__ == '__main__': freez...
[ 2, 66, 7656, 28, 40477, 23, 198, 11748, 640, 11, 25064, 11, 4670, 518, 198, 11748, 33476, 9945, 198, 6738, 33476, 9945, 1330, 13882, 669, 198, 6738, 18540, 305, 919, 278, 13, 805, 10321, 1330, 7308, 13511, 198, 6738, 18540, 305, 919, ...
2.552124
259
from invoke.exceptions import UnexpectedExit from utils import execute_command, is_file_exists import logging ''' is_genkey_unique ''' ''' is_vps_installed ''' ''' is_polis_installed ''' ''' is_monitoring_script_installed ''' ''' BUG : Must be logged in root ! TODO : add an interactive shell to ask u...
[ 6738, 26342, 13, 1069, 11755, 1330, 471, 42072, 30337, 198, 6738, 3384, 4487, 1330, 12260, 62, 21812, 11, 318, 62, 7753, 62, 1069, 1023, 198, 11748, 18931, 628, 198, 198, 7061, 6, 198, 271, 62, 5235, 2539, 62, 34642, 198, 7061, 6, 6...
2.774194
124
# -------------------------------------------------------------------------- # 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 may cause incor...
[ 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, 13, 198, 2, 198, 2, 6127, 7560, ...
4.197605
167
#! /usr/bin/env python import logging from tornado.ioloop import IOLoop from stormed import Connection, Message msg = Message('Hello World!') logging.basicConfig() conn = Connection(host='localhost') conn.connect(on_connect) io_loop = IOLoop.instance() io_loop.start()
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 18931, 198, 6738, 33718, 13, 1669, 11224, 1330, 314, 3535, 11224, 198, 6738, 33997, 1330, 26923, 11, 16000, 198, 198, 19662, 796, 16000, 10786, 15496, 2159, 0, 11537, 198, ...
3.2
85
from abc import ABCMeta, abstractmethod comp = Component() comp = Wrapper(comp) print(comp.operator())
[ 6738, 450, 66, 1330, 9738, 48526, 11, 12531, 24396, 628, 628, 198, 198, 5589, 796, 35100, 3419, 198, 5589, 796, 27323, 2848, 7, 5589, 8, 198, 4798, 7, 5589, 13, 46616, 28955, 198 ]
3.272727
33
from .metadata_parser import parse_metadata from nmfamv2.metadata import Metadata # Parser # Validator # Object
[ 6738, 764, 38993, 62, 48610, 1330, 21136, 62, 38993, 198, 6738, 28642, 44769, 85, 17, 13, 38993, 1330, 3395, 14706, 628, 198, 2, 23042, 263, 198, 2, 48951, 1352, 198, 2, 9515, 198 ]
3.454545
33
"""Daily clean up of DB tables.""" import logging from helpers.report_helper import ReportHelper logger = logging.getLogger(__file__) def main(): """Regular clean up of database tables.""" r = ReportHelper() try: r.cleanup_db_tables() except Exception as e: logger.exception("Excepti...
[ 37811, 28545, 3424, 510, 286, 20137, 8893, 526, 15931, 198, 198, 11748, 18931, 198, 6738, 49385, 13, 13116, 62, 2978, 525, 1330, 6358, 47429, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 7753, 834, 8, 628, 198, 429...
2.815789
152
""" Copyright 2017-2018 Fizyr (https://fizyr.com) 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 w...
[ 37811, 198, 15269, 2177, 12, 7908, 376, 528, 2417, 357, 5450, 1378, 69, 528, 2417, 13, 785, 8, 198, 198, 26656, 15385, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 5832, 743, 407, 779, 428, 2393...
2.255172
3,770
import PySimpleGUI as pg import time import sys from pygame import mixer # Section Popup if __name__ == '__main__': main()
[ 11748, 9485, 26437, 40156, 355, 23241, 201, 198, 11748, 640, 201, 198, 11748, 25064, 201, 198, 6738, 12972, 6057, 1330, 33938, 201, 198, 201, 198, 201, 198, 2, 7275, 8099, 929, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
2.264706
68
import bpy from .main import ToolPanel from ..operators import retargeting, detector from ..core.icon_manager import Icons from ..core.retargeting import get_target_armature from bpy.types import PropertyGroup, UIList from bpy.props import StringProperty # Retargeting panel
[ 11748, 275, 9078, 198, 198, 6738, 764, 12417, 1330, 16984, 26639, 198, 6738, 11485, 3575, 2024, 1330, 1005, 7641, 278, 11, 31029, 198, 6738, 11485, 7295, 13, 4749, 62, 37153, 1330, 314, 5936, 198, 6738, 11485, 7295, 13, 1186, 7641, 278,...
3.469136
81
from no_imports import *
[ 6738, 645, 62, 320, 3742, 1330, 1635, 198 ]
3.125
8
import os import pytest from leapp.libraries.stdlib import api, CalledProcessError, run from leapp.models import SELinuxModule, SELinuxModules from leapp.reporting import Report from leapp.snactor.fixture import current_actor_context TEST_MODULES = [ ['400', 'mock1'], ['99', 'mock1'], ['300', 'mock1'], ...
[ 11748, 28686, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 443, 1324, 13, 75, 11127, 13, 19282, 8019, 1330, 40391, 11, 34099, 18709, 12331, 11, 1057, 198, 6738, 443, 1324, 13, 27530, 1330, 311, 3698, 259, 2821, 26796, 11, 311, 3698, ...
2.181818
352
#!/usr/bin/env python3 from __future__ import absolute_import, division, print_function, unicode_literals import argparse import os import subprocess from glob import glob import pandas as pd import matplotlib matplotlib.use('Agg') from matplotlib import pyplot as plt import base64 import json import numpy as np impor...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 11, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 1822, 29572, 198, 11748, 28686, 198, 11748, 850, 146...
1.920975
10,136
from app import app from flask import render_template, request, flash from .form import * from automlk.monitor import get_heart_beeps from automlk.context import get_config, set_config
[ 6738, 598, 1330, 598, 198, 6738, 42903, 1330, 8543, 62, 28243, 11, 2581, 11, 7644, 198, 6738, 764, 687, 1330, 1635, 198, 6738, 3557, 75, 74, 13, 41143, 1330, 651, 62, 11499, 62, 1350, 25386, 198, 6738, 3557, 75, 74, 13, 22866, 1330,...
3.596154
52
import errand_boy from errand_boy import run from errand_boy.transports import unixsocket from .base import mock, BaseTestCase
[ 11748, 11454, 392, 62, 7081, 198, 6738, 11454, 392, 62, 7081, 1330, 1057, 198, 6738, 11454, 392, 62, 7081, 13, 7645, 3742, 1330, 555, 844, 44971, 198, 198, 6738, 764, 8692, 1330, 15290, 11, 7308, 14402, 20448, 628, 198 ]
3.333333
39
import socket from contextlib import suppress from os import SEEK_END, stat from pathlib import Path from re import search, split, findall from sys import exc_info from threading import Thread from time import sleep from traceback import format_exc from colorama import Fore, Style from discord import Webhook, Requests...
[ 11748, 17802, 198, 6738, 4732, 8019, 1330, 18175, 198, 6738, 28686, 1330, 31107, 42, 62, 10619, 11, 1185, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 302, 1330, 2989, 11, 6626, 11, 1064, 439, 198, 6738, 25064, 1330, 2859, 62, 10951, ...
4.074074
108
#!/usr/bin/python3.7 """ Set all playlist descriptions. Example result: Resident Advisor Archive www.residentarchive.com @residentarchive """ import boto3 import spotipy from pprint import pprint dynamodb = boto3.resource("dynamodb", region_name='eu-west-1') ra_playlists = dynamodb.Table('ra_playlists') scope = '...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 13, 22, 198, 198, 37811, 198, 7248, 477, 33178, 16969, 13, 198, 198, 16281, 1255, 25, 198, 198, 4965, 738, 35399, 20816, 7324, 13, 8154, 17474, 13, 785, 2488, 8154, 17474, 198, 37811, 198, 1...
2.898833
257
import pandas as pd pd.set_option('display.width', 1000) pd.set_option('display.max_rows', 10000) pd.set_option('display.max_columns', 10000)
[ 11748, 19798, 292, 355, 279, 67, 628, 198, 30094, 13, 2617, 62, 18076, 10786, 13812, 13, 10394, 3256, 8576, 8, 198, 30094, 13, 2617, 62, 18076, 10786, 13812, 13, 9806, 62, 8516, 3256, 33028, 8, 198, 30094, 13, 2617, 62, 18076, 10786, ...
2.754717
53
try: from ipware.ip import get_client_ip except ImportError: from ipware.ip2 import get_client_ip
[ 28311, 25, 198, 220, 220, 220, 422, 20966, 1574, 13, 541, 1330, 651, 62, 16366, 62, 541, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220, 422, 20966, 1574, 13, 541, 17, 1330, 651, 62, 16366, 62, 541, 198 ]
2.717949
39
from setuptools import setup, find_packages # See: # https://packaging.python.org/guids/distruting-packages-using-setuptools setup( name="cigarbox", version="0.1.0", description="utility libraries", long_description="utility libraries", long_description_content_type="text/plain", url="https://...
[ 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 198, 2, 4091, 25, 198, 2, 3740, 1378, 8002, 3039, 13, 29412, 13, 2398, 14, 5162, 2340, 14, 17080, 81, 15129, 12, 43789, 12, 3500, 12, 2617, 37623, 10141, 198, 198, 40406...
2.609929
282
# -*- coding: utf-8 -*- import types from crossover import Client from crossover import _Requester
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 3858, 198, 6738, 27668, 1330, 20985, 198, 6738, 27668, 1330, 4808, 16844, 7834, 628 ]
3.448276
29
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (c) 2020 tecnovert # Distributed under the MIT software license, see the accompanying # file LICENSE.txt or http://www.opensource.org/licenses/mit-license.php. import os import sys import time import signal import logging import subprocess from io import Str...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 15069, 357, 66, 8, 12131, 573, 66, 3919, 1851, 198, 2, 4307, 6169, 739, 262, 17168, 3788, 5964, 11, 766...
2.272857
700
from random import randint numeros = list() sort(numeros) somapar(numeros)
[ 6738, 4738, 1330, 43720, 600, 628, 198, 198, 77, 6975, 418, 796, 1351, 3419, 198, 30619, 7, 77, 6975, 418, 8, 198, 82, 296, 499, 283, 7, 77, 6975, 418, 8, 198 ]
2.4375
32
if isinstance(other, float): other = Measurement(other, 0)
[ 361, 318, 39098, 7, 847, 11, 12178, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 584, 796, 24291, 434, 7, 847, 11, 657, 8, 198 ]
2.366667
30
# -*- coding: utf-8 -*- # Copyright 2016 Open Permissions Platform Coalition # 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 appl...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 1584, 4946, 2448, 8481, 19193, 15135, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779...
2.898429
955
import numpy as np import matplotlib.pyplot as plt import matplotlib.animation as animation DT = 0.01 FRAMERATE = 60 N_ROWS = 64 SECONDS = 10 velocity_frames = read_velocity() pressure_frames = read_pressure() color_frames = read_color() divergence_frames = read_divergence() frame_interval = 1000//FRAMERATE frame_co...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 2603, 29487, 8019, 13, 11227, 341, 355, 11034, 198, 198, 24544, 796, 657, 13, 486, 198, 10913, 2390, 1137, 6158, 796, 3126, 198, ...
2.660668
389
RTS2_FITS_LUTs = {} RTS2_FITS_LUTs['BNL'] = { 0: { # 'MJD' : 'JD', # 'MONDIODE' : 'AMP0.CURRENT.MIN', 'MONOWL': 'MONOCH.WAVELENG', 'FILTER': 'MONOCH.FILT_1', 'CONTROLL': 'INSTRUME', 'CCDTEMP': 'CRYO.C.TEMP', 'IMGTYPE': 'TESTTYPE', ...
[ 49, 4694, 17, 62, 37, 29722, 62, 43, 3843, 82, 796, 23884, 198, 198, 49, 4694, 17, 62, 37, 29722, 62, 43, 3843, 82, 17816, 15766, 43, 20520, 796, 1391, 198, 220, 220, 220, 657, 25, 1391, 198, 220, 220, 220, 220, 220, 220, 220, ...
1.375976
6,918
""" Given two non-empty binary trees s and t, check whether tree t has exactly the same structure and node values with a subtree of s. A subtree of s is a tree consists of a node in s and all of this node's descendants. The tree s could also be considered as a subtree of itself """
[ 37811, 198, 15056, 734, 1729, 12, 28920, 13934, 7150, 264, 290, 256, 11, 2198, 1771, 5509, 256, 468, 3446, 262, 976, 4645, 290, 10139, 3815, 351, 257, 13284, 631, 286, 264, 13, 317, 13284, 631, 286, 264, 318, 257, 5509, 10874, 286, ...
4.042857
70
from argparse import ArgumentParser from contextlib import redirect_stderr from io import StringIO from re import escape as re_escape from unittest import TestCase from argparse_utils import python_literal_action
[ 6738, 1822, 29572, 1330, 45751, 46677, 198, 6738, 4732, 8019, 1330, 18941, 62, 301, 1082, 81, 198, 6738, 33245, 1330, 10903, 9399, 198, 6738, 302, 1330, 6654, 355, 302, 62, 41915, 198, 6738, 555, 715, 395, 1330, 6208, 20448, 198, 198, ...
3.981481
54
import logging from joblib import Parallel, delayed from typing import Iterable from emissor.persistence import ScenarioStorage from emissor.processing.api import DataPreprocessor, ScenarioInitializer, SignalProcessor from emissor.representation.scenario import Modality logger = logging.getLogger(__name__) # TODO
[ 11748, 18931, 198, 6738, 1693, 8019, 1330, 42945, 11, 11038, 198, 6738, 19720, 1330, 40806, 540, 198, 198, 6738, 795, 747, 273, 13, 19276, 13274, 1330, 1446, 39055, 31425, 198, 6738, 795, 747, 273, 13, 36948, 13, 15042, 1330, 6060, 6719...
3.72093
86
from django import template from powers.models import Power register = template.Library()
[ 6738, 42625, 14208, 1330, 11055, 201, 198, 201, 198, 6738, 5635, 13, 27530, 1330, 4333, 201, 198, 201, 198, 30238, 796, 11055, 13, 23377, 3419, 201, 198, 201, 198 ]
3.413793
29
import numpy as np from matplotlib import pyplot as plt from pylab import rcParams def plot_buoyancy(cwd=''): """ Plotting routine for the cross section of the buoyancy Args: cwd (string): current working directory """ xx = np.load(cwd + 'data/xaxis.npy') uend = np.load(cwd + 'data/s...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 2603, 29487, 8019, 1330, 12972, 29487, 355, 458, 83, 198, 6738, 279, 2645, 397, 1330, 48321, 10044, 4105, 628, 198, 4299, 7110, 62, 11110, 726, 3883, 7, 66, 16993, 28, 7061, 2599, 198, 220, 22...
2.192748
1,048
#Requires the modules SpeechRecognition and pyaudio import speech_recognition as sr import sys sys.path.insert(1, "..") from camera.camera import Camera from widefind.widefindScript import WidefindTracker #Handle transcriptions here if __name__ == "__main__": # create recognizer and mic instances recogn...
[ 2, 39618, 262, 13103, 24709, 6690, 2360, 653, 290, 12972, 24051, 198, 11748, 4046, 62, 26243, 653, 355, 19677, 198, 11748, 25064, 198, 17597, 13, 6978, 13, 28463, 7, 16, 11, 366, 492, 4943, 198, 6738, 4676, 13, 25695, 1330, 20432, 198...
3.205298
151
import os import pandas as pd import numpy as np import matplotlib.pyplot as plt from sklearn.datasets import load_digits from sklearn.model_selection import learning_curve def export_reports(name, reports, loc): """ Export each report in 'reports' to html in the location indicated by 'loc' """ for key ...
[ 11748, 28686, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 1341, 35720, 13, 19608, 292, 1039, 1330, 3440, 62, 12894, 896, 198, 6738, ...
2.396161
2,292
import glob import os import shutil import sys from zipfile import ZipFile import django from internetarchive import upload sys.path.append("/var/projects/museum/") os.environ.setdefault("DJANGO_SETTINGS_MODULE", "museum.settings") django.setup() from museum_site.models import File ZGAMES_PATH = "/var/projects/muse...
[ 11748, 15095, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 11748, 25064, 198, 6738, 19974, 7753, 1330, 38636, 8979, 198, 198, 11748, 42625, 14208, 198, 6738, 5230, 17474, 1330, 9516, 198, 198, 17597, 13, 6978, 13, 33295, 7203, 14, 7785,...
2.18299
388
import ffmpeg import os import tempfile import re from pydub import AudioSegment import math FRAME_NAME_PATTERN = "frame-%08d.jpg" FRACTION_PATTERN = r"(\d+)/(\d+)" FRACTION_RE = re.compile(FRACTION_PATTERN) SILENCE = -99.5 LOUDEST = 99.5
[ 11748, 31246, 43913, 198, 11748, 28686, 198, 11748, 20218, 7753, 198, 11748, 302, 198, 6738, 279, 5173, 549, 1330, 13491, 41030, 434, 198, 11748, 10688, 198, 198, 10913, 10067, 62, 20608, 62, 47, 1404, 31800, 796, 366, 14535, 12, 4, 291...
2.386139
101
#! /usr/bin/python3 # 20180726 - wiki.binefa.cat # Based on a code from Tony DiCola (AdaFruit) # License: Public Domain import time import Adafruit_ADS1x15 import time import RPi.GPIO as GPIO GPIO.setmode(GPIO.BOARD) GPIO.setup(32, GPIO.OUT) GPIO.setup(33, GPIO.OUT) GPIO.setup(12, GPIO.OUT) GPIO.setup(35, GPIO.OUT) ...
[ 2, 0, 1220, 14629, 14, 8800, 14, 29412, 18, 198, 198, 2, 580, 36928, 2075, 532, 22719, 13, 65, 500, 13331, 13, 9246, 198, 198, 2, 13403, 319, 257, 2438, 422, 8832, 6031, 28635, 357, 2782, 64, 37, 4872, 8, 198, 2, 13789, 25, 5094...
2.036907
569
from .users import * from .summaries import * from .keys import *
[ 6738, 764, 18417, 1330, 1635, 198, 6738, 764, 82, 13929, 3166, 1330, 1635, 198, 6738, 764, 13083, 1330, 1635 ]
3.421053
19
import sys import warnings import numpy as np from scipy.stats import rankdata TAB = ' ' maxfloat = np.float128 if hasattr(np, 'float128') else np.longdouble
[ 11748, 25064, 198, 11748, 14601, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 13, 34242, 1330, 4279, 7890, 628, 198, 5603, 33, 796, 705, 220, 220, 220, 705, 198, 9806, 22468, 796, 45941, 13, 22468, 12762, 611, 468...
2.883333
60
#!/usr/bin/env python # coding: utf-8 # Copyright (c) Qotto, 2019 """ BaseCommandHandler Module All command handler must be inherit from this class. Execute function was called by consumer on each received command. For make an transaction in execute function return 'transaction' as string after end transaction other...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 2, 15069, 357, 66, 8, 1195, 17631, 11, 13130, 198, 198, 37811, 7308, 21575, 25060, 19937, 198, 198, 3237, 3141, 21360, 1276, 307, 16955, 422, 428...
3.789855
138
from django.contrib import admin from django.urls import path,re_path from . import views from rest_framework.authtoken.views import obtain_auth_token from rest_framework_simplejwt import views as jwt_views from django.conf import settings from django.conf.urls.static import static urlpatterns = [ path('', views....
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 11, 260, 62, 6978, 198, 6738, 764, 1330, 5009, 198, 6738, 1334, 62, 30604, 13, 18439, 30001, 13, 33571, 1330, 7330, 62, 18439, 62, 3000...
2.561567
536
#!/usr/bin/python3 # -*- coding: utf-8 -*- import argparse import codecs if __name__ == '__main__': main()
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 1822, 29572, 198, 11748, 40481, 82, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, ...
2.306122
49
from . import polygon_geo_cpu def polygon_iou(poly1, poly2): """Compute the IoU of polygons.""" return polygon_geo_cpu.polygon_iou(poly1, poly2)
[ 6738, 764, 1330, 7514, 14520, 62, 469, 78, 62, 36166, 628, 198, 4299, 7514, 14520, 62, 72, 280, 7, 35428, 16, 11, 7514, 17, 2599, 198, 220, 220, 220, 37227, 7293, 1133, 262, 27853, 52, 286, 25052, 684, 526, 15931, 198, 220, 220, 2...
2.348485
66