content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
## \namespace orbit::sns_linac ## \brief The base classes of ORBIT Linac lattice structure. ## ## Classes: ## - LinacAcclattice - Class. The linac lattice. ## - LinacAccNodes - Module. Collection of the linac accelerator nodes: drifts, quads, RF gaps etc.. ## - LinacLatticeFactory - Class. The factory t...
[ 2235, 3467, 14933, 10223, 13066, 3712, 82, 5907, 62, 2815, 330, 198, 2235, 3467, 65, 3796, 383, 2779, 6097, 286, 6375, 26094, 5164, 330, 47240, 501, 4645, 13, 198, 2235, 198, 2235, 38884, 25, 198, 2235, 532, 5164, 330, 17320, 75, 1078...
2.817658
521
import numpy as np _EPS = 1e-16 _TYPE = np.float64
[ 11748, 299, 32152, 355, 45941, 198, 198, 62, 36, 3705, 796, 352, 68, 12, 1433, 198, 62, 25216, 796, 45941, 13, 22468, 2414, 628, 628 ]
2.2
25
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import hydra # Put the configuration into strict mode before merging it with the command line overrides. # This will result with a KeyError if a key that does not already exist in the configuration is # being accessed. This applies both for read (...
[ 2, 15069, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 1439, 6923, 33876, 198, 11748, 25039, 628, 198, 2, 5930, 262, 8398, 656, 7646, 4235, 878, 35981, 340, 351, 262, 3141, 1627, 23170, 1460, 13, 198, 2, 770, 481, 1255, 35...
3.860465
129
import numpy as np import string import torch import pytest from torch import nn from pytorch_widedeep.models import Wide, DeepDense, DeepText, DeepImage, WideDeep from pytorch_widedeep.initializers import (Normal, Uniform, ConstantInitializer, XavierNormal, XavierUniform, KaimingNormal, KaimingUniform) from copy imp...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 4731, 198, 11748, 28034, 198, 11748, 12972, 9288, 198, 198, 6738, 28034, 1330, 299, 77, 198, 6738, 12972, 13165, 354, 62, 86, 1384, 68, 538, 13, 27530, 1330, 23399, 11, 10766, 35, 1072, 11, 1...
2.995305
639
# Copyright 2020 Makani Technologies LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
[ 2, 15069, 12131, 15841, 3216, 21852, 11419, 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, ...
3.592
250
"""Default environment Edit service environment to override """ ################################################################################ # Base Environment ################################################################################ import logging from pathlib import Path from typing import Optional from p...
[ 37811, 19463, 2858, 198, 18378, 2139, 2858, 284, 20957, 198, 37811, 198, 29113, 29113, 14468, 198, 2, 7308, 9344, 198, 29113, 29113, 14468, 198, 11748, 18931, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 19720, 1330, 32233, 198, 198, 67...
5.25
92
""" <Program Name> test_pushtoolslib.py <Author> Konstantin Andrianov <Started> April 2013. <Copyright> See LICENSE for licensing information. <Purpose> Test pushtoolslib.py. """ import os import tempfile import unittest import ConfigParser import logging import tuf import tuf.log import tuf.formats im...
[ 37811, 198, 27, 15167, 6530, 29, 198, 220, 1332, 62, 14689, 25981, 6649, 571, 13, 9078, 198, 198, 27, 13838, 29, 198, 220, 17431, 18797, 259, 843, 4484, 709, 198, 198, 27, 10434, 276, 29, 198, 220, 3035, 2211, 13, 198, 198, 27, 15...
2.748603
179
import pytari2600.inputs as inputs import pytari2600.memory.riot as riot import pytari2600.clocks as clocks import unittest if __name__ == '__main__': unittest.main()
[ 11748, 12972, 83, 2743, 2075, 405, 13, 15414, 82, 355, 17311, 198, 11748, 12972, 83, 2743, 2075, 405, 13, 31673, 13, 36671, 355, 16352, 198, 11748, 12972, 83, 2743, 2075, 405, 13, 565, 3320, 355, 29906, 198, 11748, 555, 715, 395, 198,...
2.6875
64
from math import ceil import numpy as np import matplotlib.pyplot as plt import iris.plot as iplt from irise import convert from irise.plot.util import multilabel, add_map from myscripts.models.um import case_studies from systematic_forecasts import second_analysis from myscripts.projects.thesis.bl import plotdir name...
[ 6738, 10688, 1330, 2906, 346, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 4173, 271, 13, 29487, 355, 1312, 489, 83, 198, 6738, 4173, 786, 1330, 10385, 198, 6738, 4173, ...
2.440415
386
import zlib import re import binascii import struct from .package_file import PackageFile from .package_file_header import PackageFileHeader from .package_version import PackageVersion from .package_flags import PackageFlags from .package_index_entry import PackageIndexEntry from .package_errors import IncorrectFilenam...
[ 11748, 1976, 8019, 198, 11748, 302, 198, 11748, 9874, 292, 979, 72, 198, 11748, 2878, 198, 6738, 764, 26495, 62, 7753, 1330, 15717, 8979, 198, 6738, 764, 26495, 62, 7753, 62, 25677, 1330, 15717, 8979, 39681, 198, 6738, 764, 26495, 62, ...
4.153846
78
import markdown import Famcy import json class displayParagraph(Famcy.FamcyBlock): """ Represents the block to display paragraph. """ @classmethod
[ 11748, 1317, 2902, 198, 11748, 16513, 948, 198, 11748, 33918, 198, 198, 4871, 3359, 10044, 6111, 7, 37, 321, 948, 13, 37, 321, 948, 12235, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1432, 6629, 262, 2512, 284, 3359, 198, 2...
2.786885
61
# django-salesforce # # by Phil Christensen # (c) 2012-2013 Freelancers Union (http://www.freelancersunion.org) # See LICENSE.md for details # """ Database router for SalesforceModel objects. """ import logging from django.conf import settings log = logging.getLogger(__name__) class ModelRouter(object): """ Data...
[ 2, 42625, 14208, 12, 82, 2040, 3174, 198, 2, 198, 2, 416, 4543, 49195, 198, 2, 357, 66, 8, 2321, 12, 6390, 4848, 417, 20811, 4479, 357, 4023, 1378, 2503, 13, 19503, 417, 20811, 24592, 13, 2398, 8, 198, 2, 4091, 38559, 24290, 13, ...
2.840964
415
import numpy as np import math from matplotlib import pyplot as plt from temperature_profile import temp_profile number = int(1E6) # number of iteration # %% Initial temperature profile temperature = temp_profile() T = np.zeros(number) T[2] = 2000 #initial temperature T[1] = 1600 # %% Values...
[ 11748, 299, 32152, 355, 45941, 201, 198, 11748, 10688, 201, 198, 6738, 2603, 29487, 8019, 1330, 12972, 29487, 355, 458, 83, 201, 198, 6738, 5951, 62, 13317, 1330, 20218, 62, 13317, 201, 198, 17618, 796, 493, 7, 16, 36, 21, 8, 1303, ...
1.918591
2,469
from acados_settings import acados_settings import time import os import numpy as np import matplotlib.pyplot as plt from plotFnc import * from utils import * from trajectory import * Tf = 1 # prediction horizon N = 100 # number of discretization steps T = 20.00 # simulation time[s] Ts = Tf / N # sampl...
[ 6738, 5790, 418, 62, 33692, 1330, 5790, 418, 62, 33692, 198, 11748, 640, 198, 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 7110, 37, 10782, 1330, 1635, 198, ...
2.315152
1,485
import torch import torch.nn as nn import torchvision.models as models
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 10178, 13, 27530, 355, 4981, 628, 220, 220, 220, 220 ]
3.304348
23
import unittest from generations.base_model import BaseModel
[ 11748, 555, 715, 395, 198, 198, 6738, 10439, 13, 8692, 62, 19849, 1330, 7308, 17633, 628 ]
3.9375
16
n1=float(input('Numero 1:')) n2=float(input('Numero 2:')) n3=float(input('Numero 3:')) media=(n1+n2+n3)/3 print('La media es de '+str(media))
[ 77, 16, 28, 22468, 7, 15414, 10786, 33111, 3529, 352, 32105, 4008, 198, 77, 17, 28, 22468, 7, 15414, 10786, 33111, 3529, 362, 32105, 4008, 198, 77, 18, 28, 22468, 7, 15414, 10786, 33111, 3529, 513, 32105, 4008, 198, 11431, 16193, 77, ...
2.203125
64
from abc import ABC from random import randint from ursina import * from controls import LocalAIController, LocalController, OnlineController from model.qubic import Qubic from networking.client import Client from ui.qubic.vue_qubic import VueQubic
[ 6738, 450, 66, 1330, 9738, 198, 6738, 4738, 1330, 43720, 600, 198, 198, 6738, 220, 1834, 1437, 1330, 1635, 198, 198, 6738, 6973, 1330, 10714, 32, 2149, 756, 10646, 11, 10714, 22130, 11, 7467, 22130, 198, 6738, 2746, 13, 421, 65, 291, ...
3.311688
77
def OrderedSet(alist): """ Creates an ordered set from a list of tuples or other hashable items """ mmap = {} # implements hashed lookup oset = [] # storage for set for item in alist: #Save unique items in input order if item not in mmap: mmap[item] = 1 oset.append(item) return oset
[ 198, 4299, 14230, 1068, 7248, 7, 49845, 2599, 198, 220, 37227, 7921, 274, 281, 6149, 900, 422, 257, 1351, 286, 12777, 2374, 393, 584, 12234, 540, 3709, 37227, 198, 220, 8085, 499, 796, 23884, 1303, 23986, 468, 704, 35847, 198, 220, 26...
2.837838
111
#-*-coding:utf-8-*- from __future__ import division import tornado.httpserver import tornado.ioloop import tornado.options import tornado.web import tornado.httpclient import tornado.gen from tornado.concurrent import Future import urllib #import json import simplejson as json import datetime import hashlib import tim...
[ 2, 12, 9, 12, 66, 7656, 25, 40477, 12, 23, 12, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 11748, 33718, 13, 5450, 18497, 198, 11748, 33718, 13, 1669, 11224, 198, 11748, 33718, 13, 25811, 198, 11748, 33718, 13, 12384, 198,...
3.013937
574
# Copyright (c) OpenMMLab. All rights reserved. from typing import Sequence import torch import torch.nn as nn from torch import Tensor from ..builder import LOSSES def sequence_loss(preds, flow_gt, gamma, valid=None, max_flow=400): """Compute sequence loss between prediction and ground truth. Args: ...
[ 2, 15069, 357, 66, 8, 4946, 44, 5805, 397, 13, 1439, 2489, 10395, 13, 198, 6738, 19720, 1330, 45835, 198, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 6738, 28034, 1330, 309, 22854, 198, 198, 6738, 11485, 38272,...
2.323442
1,011
# The number, 1406357289, is a 0 to 9 pandigital number because it is # made up of each of the digits 0 to 9 in some order, but it also has # a rather interesting sub-string divisibility property. # Let d_1 be the 1st digit, d_2 be the 2nd digit, and so on. In this # way, we note the following: # d_2 * d_3 * d_4 = 40...
[ 2, 383, 1271, 11, 1478, 3312, 27277, 27693, 11, 318, 257, 657, 284, 860, 19798, 328, 1287, 1271, 780, 340, 318, 198, 2, 925, 510, 286, 1123, 286, 262, 19561, 657, 284, 860, 287, 617, 1502, 11, 475, 340, 635, 468, 198, 2, 257, 21...
2.382591
494
import torch import torch.nn as nn class Norm(nn.Module): """ A module wrapper for vector/matrix norm """
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 628, 198, 4871, 11220, 7, 20471, 13, 26796, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 317, 8265, 29908, 329, 15879, 14, 6759, 8609, 2593, 198, 220, 220, 220, 37227, ...
2.813953
43
#!/usr/bin/env python # -*- coding: utf-8 -*- """ The Academy / ASC Common LUT Format Sample Implementations are provided by the Academy under the following terms and conditions: Copyright © 2015 Academy of Motion Picture Arts and Sciences ("A.M.P.A.S."). Portions contributed by others as indicated. All rights reserv...
[ 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, 198, 464, 8581, 1220, 25400, 8070, 406, 3843, 18980, 27565, 48282, 602, 389, 2810, 416, 262, 198, 12832, 32...
3.46988
913
from django.apps import AppConfig
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
3.888889
9
""" Faça um programa que receba dois numeros e mostre qual deles é maior. """ num = input('Digite o 1° numero: ') num2 = input('Digite o 2° numero: ') if num < num2: print(f'{num2} é o número maior!') else: print(f'{num} é o maior número!')
[ 37811, 198, 50110, 50041, 23781, 1430, 64, 8358, 1407, 7012, 466, 271, 5470, 418, 304, 749, 260, 4140, 390, 829, 38251, 17266, 1504, 13, 198, 37811, 198, 22510, 796, 5128, 10786, 19511, 578, 267, 352, 7200, 997, 3529, 25, 705, 8, 198,...
2.243243
111
from mlbase.utils.cli import Command from mlbase.arxiv2vec.actions import train, infer from mlbase.arxiv2vec.dataset import json_arxiv, merge_json def dataset_command(): """ datasetコマンド """ cmd = Command("dataset", "データセットを整理するコマンド") cmd_json = Command("json_arxiv", "arXivのデータを今回用に加工") << cmd ...
[ 6738, 25962, 8692, 13, 26791, 13, 44506, 1330, 9455, 198, 6738, 25962, 8692, 13, 283, 87, 452, 17, 35138, 13, 4658, 1330, 4512, 11, 13249, 198, 6738, 25962, 8692, 13, 283, 87, 452, 17, 35138, 13, 19608, 292, 316, 1330, 33918, 62, 28...
2.285901
766
#!/usr/bin/python from reagan.subclass import Subclass import pandas as pd import pyodbc import sqlalchemy import urllib if __name__ == "__main__": ss = SQLServer("102") sites = ss.to_dict( schema="glops", table="DCM_Sites", key="Site_Id_DCM", value="Site_DCM" )
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 6738, 302, 7329, 13, 7266, 4871, 1330, 3834, 4871, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 12972, 375, 15630, 198, 11748, 44161, 282, 26599, 198, 11748, 2956, 297, 571, 628, 198, 19...
2.411765
119
from gen3.auth import Gen3Auth from gen3.submission import Gen3Submission from pprint import pprint from string import Template from attrdict import AttrDict import os DEFAULT_CREDENTIALS_PATH = os.path.join('.', 'credentials.json') DEFAULT_HOST = 'gen3.compbio.ohsu.edu' DEFAULT_ENDPOINT = f'https://{DEFAULT_HOST}' ...
[ 6738, 2429, 18, 13, 18439, 1330, 5215, 18, 30515, 198, 6738, 2429, 18, 13, 7266, 3411, 1330, 5215, 18, 7004, 3411, 198, 6738, 279, 4798, 1330, 279, 4798, 198, 6738, 4731, 1330, 37350, 198, 6738, 708, 4372, 713, 1330, 3460, 81, 35, 7...
2.468521
683
import dash import dash_bootstrap_components as dbc from dash import dcc from dash import html from dash.dependencies import Input, Output, State, MATCH, ALL, ClientsideFunction import time import json import requests import os import random from app import server, app # TODO Make new raw_outputs.txt raw_outputs = []...
[ 11748, 14470, 198, 11748, 14470, 62, 18769, 26418, 62, 5589, 3906, 355, 288, 15630, 198, 6738, 14470, 1330, 288, 535, 198, 6738, 14470, 1330, 27711, 198, 6738, 14470, 13, 45841, 3976, 1330, 23412, 11, 25235, 11, 1812, 11, 337, 11417, 11...
1.97928
2,944
from flask_sqlalchemy import SQLAlchemy from .database import metadata db = SQLAlchemy(metadata=metadata)
[ 6738, 42903, 62, 25410, 282, 26599, 1330, 16363, 2348, 26599, 198, 6738, 764, 48806, 1330, 20150, 198, 198, 9945, 796, 16363, 2348, 26599, 7, 38993, 28, 38993, 8, 198 ]
3.689655
29
""" Read a list of hooks from a config and enable them on the current repo. You will be prompted if there is a complicated situation, eg. there's an existing hook managed by another program or a hook is about to be removed, Usage: enable (-h | --help) enable REPO [options] Options: --conf PATH Use given...
[ 37811, 198, 5569, 257, 1351, 286, 26569, 422, 257, 4566, 290, 7139, 606, 319, 262, 1459, 29924, 13, 198, 198, 1639, 481, 307, 12053, 611, 612, 318, 257, 8253, 3074, 11, 29206, 13, 612, 338, 281, 198, 25687, 8011, 5257, 416, 1194, 14...
3.138889
252
# ========================================================================= # # Copyright COS 397 # # 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/license...
[ 2, 38093, 2559, 198, 2, 198, 2, 220, 15069, 327, 2640, 5014, 22, 198, 2, 198, 2, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 220, 345, 743, 407, 779, 428, 2393, 2845, 287, 11...
2.796296
540
# -*- encoding: utf-8 -*- """ @File : evalutator.py @Time : 2020/4/15 20:26 @Author : Alessia K @Email : ------ @Reference: https://github.com/facebookresearch/pycls/blob/master/pycls/ """ import torch import numpy as np def topk_correct(pred, target, topk): """Computes the accuracy of the cor...
[ 2, 532, 9, 12, 21004, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 31, 8979, 220, 220, 220, 1058, 5418, 315, 1352, 13, 9078, 201, 198, 31, 7575, 220, 220, 220, 1058, 12131, 14, 19, 14, 1314, 1160, 25, 2075, 201...
2.168047
845
#!/usr/bin/python # -*- coding: utf-8 -*- """ Author: AsherYang Email : ouyangfan1991@gmail.com Date : 2018/6/29 Desc : get host goods list tornado handler api handler """ import sys sys.path.append('../') import tornado.web from BaseResponse import BaseResponse from constant import ResponseCode from FFStoreJsonEnc...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 13838, 25, 1081, 372, 38663, 198, 15333, 1058, 267, 4669, 648, 24408, 24529, 31, 14816, 13, 785, 198, 10430, ...
1.863248
351
from channels.routing import ProtocolTypeRouter, URLRouter from django.urls import path from backend.socket_chat.consumers.main import MainConsumer application = ProtocolTypeRouter({ "websocket": URLRouter([ path('ws/main/', MainConsumer), ]) })
[ 6738, 9619, 13, 81, 13660, 1330, 20497, 6030, 49, 39605, 11, 10289, 49, 39605, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 6738, 30203, 13, 44971, 62, 17006, 13, 5936, 31260, 13, 12417, 1330, 8774, 49106, 198, 198, 31438, ...
3.05814
86
# -*- coding: utf-8 -*- from django.contrib import admin from .models import Languages, Docname, TypeDoc, Reference, Category admin.site.register(Languages) admin.site.register(Docname) admin.site.register(TypeDoc) admin.site.register(Reference) admin.site.register(Category, AdminCategory)
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 628, 198, 6738, 764, 27530, 1330, 42860, 11, 14432, 3672, 11, 5994, 23579, 11, 20984, 11, 21743, 198, 198, 28482, 13...
3.172043
93
#!/usr/bin/env python # Setup script for PyPI; use CMakeFile.txt to build the example application from setuptools import setup from pybind11 import __version__ setup( name='pybind11', version=__version__, description='Seamless operability between C++11 and Python', author='Wenzel Jakob', author_e...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 31122, 4226, 329, 9485, 11901, 26, 779, 327, 12050, 8979, 13, 14116, 284, 1382, 262, 1672, 3586, 198, 198, 6738, 900, 37623, 10141, 1330, 9058, 198, 6738, 12972, 21653, 1157, 1...
3.044933
1,046
import cv2 import imutils import numpy as np import torch from PIL import Image from torchvision.transforms import ToTensor DIGITS_LOOKUP = { (1, 1, 1, 0, 1, 1, 1): 0, (0, 0, 1, 0, 0, 1, 0): 1, (0, 0, 1, 0, 0, 1, 0): 1, (1, 0, 1, 1, 1, 0, 1): 2, (1, 0, 1, 1, 0, 1, 1): 3, (0, 1, 1, 1, 0, 1, 0): ...
[ 11748, 269, 85, 17, 198, 11748, 545, 26791, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 6738, 350, 4146, 1330, 220, 7412, 198, 6738, 28034, 10178, 13, 7645, 23914, 1330, 1675, 51, 22854, 198, 35, 3528, 29722, 62, 43, 1...
1.708185
281
import plotly.graph_objects as go from global_covid_tracker.dataframes import cases_dataframe
[ 11748, 7110, 306, 13, 34960, 62, 48205, 355, 467, 198, 6738, 3298, 62, 66, 709, 312, 62, 2213, 10735, 13, 7890, 37805, 1330, 2663, 62, 7890, 14535, 628 ]
3.392857
28
# -*- coding: utf-8 -*- #https://www.hackerearth.com/practice/ #https://amueller.github.io/word_cloud/auto_examples/colored_by_group.html import prediction import top_wordcloud import heatmap import dataframe import sentiment import home_page import streamlit as st #add home page hide_menu = """ <st...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 201, 198, 2, 5450, 1378, 2503, 13, 71, 330, 365, 260, 11999, 13, 785, 14, 39541, 14, 201, 198, 2, 5450, 1378, 321, 16466, 13, 12567, 13, 952, 14, 4775, 62, 17...
2.497561
410
#!/usr/bin/env python import rospy from std_msgs.msg import Bool from std_msgs.msg import Float32 from std_msgs.msg import Float64 import math # Model Parameters wheel_diameter = 0.155 front_to_rear_wheel_center = 0.42 left_to_right_wheel_center = 0.285 # Test values speed = 10.0 # rad/s turn_radius = 1.0 # meters i...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 686, 2777, 88, 198, 6738, 14367, 62, 907, 14542, 13, 19662, 1330, 347, 970, 198, 6738, 14367, 62, 907, 14542, 13, 19662, 1330, 48436, 2624, 198, 6738, 14367, 62, 907, 14542, 13,...
2.488506
174
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 2321, 12, 4626, 26778, 9564, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743,...
3.143737
487
#!/usr/bin/env python3 # @generated AUTOGENERATED file. Do not Change! from dataclasses import dataclass, field as _field from ...config import custom_scalars, datetime from gql_client.runtime.variables import encode_variables from gql import gql, Client from gql.transport.exceptions import TransportQueryError from fu...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 2488, 27568, 47044, 7730, 1677, 1137, 11617, 2393, 13, 2141, 407, 9794, 0, 198, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 11, 2214, 355, 4808, 3245, 198, 6738, 2644, ...
3.095092
326
# -*- coding: utf-8 -*- """02-ppo.ipynb Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/1GXTVkhpJyQQsUWn6tGQAWPmstw9adAzj # PPO for transformer models > A Pytorch implementation of Proximal Policy Optimization for transfomer models. This follows the l...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 2999, 12, 16634, 13, 541, 2047, 65, 198, 198, 38062, 4142, 7560, 416, 1623, 4820, 2870, 13, 198, 198, 20556, 2393, 318, 5140, 379, 198, 220, 220, 220, 3740, 137...
2.284852
6,628
#!/usr/bin/env python from stella import stella # test3[f0-args0] delta = 1e-7 x = power(0,42) print ("power(0,42) =", x) stella(power, debug='print')(0,42) y = stella(power)(0,42) print ("stella(power)(0,42) =", y) print ("met:", x-y < delta and type(x) == type(y))
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 336, 12627, 1330, 336, 12627, 198, 198, 2, 1332, 18, 58, 69, 15, 12, 22046, 15, 60, 198, 67, 12514, 796, 352, 68, 12, 22, 198, 198, 87, 796, 1176, 7, 15, 11, 3682, 8...
2.15873
126
#!/usr/bin/python '''The MIT License (MIT) Copyright (c) 2017 Yu Xiong Wei(try.dash.now@gmail.com) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 7061, 6, 464, 17168, 13789, 357, 36393, 8, 198, 15269, 357, 66, 8, 2177, 10605, 1395, 295, 70, 29341, 7, 28311, 13, 42460, 13, 2197, 31, 14816, 13, 785, 8, 198, 198, 5990, 3411, 318, 2937...
3.266748
821
import tempfile import datetime import json import os from unittest.mock import MagicMock, mock_open import marshmallow import pendulum import pytest import requests import prefect from prefect.client.client import Client, FlowRunInfoResult, TaskRunInfoResult from prefect.engine.result import NoResult, Result, SafeRe...
[ 11748, 20218, 7753, 198, 11748, 4818, 8079, 198, 11748, 33918, 198, 11748, 28686, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 6139, 44, 735, 11, 15290, 62, 9654, 198, 198, 11748, 22397, 42725, 198, 11748, 44017, 14452, 198, 11748, 1297...
3.657143
245
"""A set of 20 biases and 1 900s dark for the morning cals """ import RO.Wdg import TUI.Models import time import RO.Astro.Tm import subprocess as sub import tkMessageBox as box __version__ = "2022-02-08"
[ 37811, 32, 900, 286, 1160, 29275, 290, 352, 15897, 82, 3223, 329, 262, 3329, 269, 874, 198, 37811, 198, 198, 11748, 15107, 13, 54, 67, 70, 198, 11748, 309, 10080, 13, 5841, 1424, 198, 11748, 640, 198, 11748, 15107, 13, 32, 20661, 13...
2.797297
74
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Renames a directory of files based on a template. .. module:: batch_renamer.py First we'll examine the contents of a directory and ensure it only contains files with names we want to rename. .. code-block:: python3 >>> os.listdir("/path/to/dir") ['img_1074....
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 26764, 1047, 257, 8619, 286, 3696, 1912, 319, 257, 11055, 13, 198, 198, 492, 8265, 3712, 15458, 62, 918, 2...
2.533436
1,301
import discord import asyncio import asyncpg import random import logging import schedule import json import time import re import os from datetime import datetime, timedelta from discord.ext import commands, tasks from itertools import cycle logging.basicConfig(level=logging.INFO) prefix = os.environ['COMMAND_PREFIX...
[ 11748, 36446, 198, 11748, 30351, 952, 198, 11748, 30351, 6024, 198, 11748, 4738, 198, 11748, 18931, 198, 11748, 7269, 198, 11748, 33918, 198, 11748, 640, 198, 11748, 302, 198, 11748, 28686, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 288...
2.988
250
import sys sys.stdin=open("num3.in","r") sys.stdout=open("num3.tmp","w") print (bin(int(raw_input())))[2:]
[ 11748, 25064, 198, 17597, 13, 19282, 259, 28, 9654, 7203, 22510, 18, 13, 259, 2430, 81, 4943, 198, 17597, 13, 19282, 448, 28, 9654, 7203, 22510, 18, 13, 22065, 2430, 86, 4943, 198, 4798, 357, 8800, 7, 600, 7, 1831, 62, 15414, 3419, ...
2.229167
48
#!/usr/bin/env python3 import mwparserfromhell import utils import sys import re if __name__ == '__main__': snps = utils.run_parser(parse_snps) minus = [name for name, details in snps.items() if details.get('r', None) == 'minus'] # "Compress" the list rsids = sorted([int(item[2:]) if item.startswit...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 285, 24142, 28198, 6738, 12758, 198, 11748, 3384, 4487, 198, 11748, 25064, 198, 11748, 302, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, ...
2
598
import json
[ 11748, 33918, 628, 198 ]
3.5
4
#!/usr/bin/env python # -*- coding: utf-8 -*- import MySQLdb as mdb import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt from matplotlib.dates import DateFormatter tempdata = [] humdata = [] dates = [] # Read the data from db con = mdb.connectcon = ('DBHOST', 'DBUSER', 'DMPASS', 'DB'); cur = con.c...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 33476, 9945, 355, 285, 9945, 198, 11748, 2603, 29487, 8019, 198, 198, 6759, 29487, 8019, 13, 1904, 10786, 4...
2.382353
476
n = [[], []] valor = 0 for cont in range(1, 8): valor = int(input('Digite o valor:')) if valor % 2 == 0: n[0].append(valor) else: n[1].append(valor) n[0].sort() n[1].sort() print(f'Os valores pares são {n[0]}') print(f'Os valores ímpares são {n[1]}')
[ 77, 796, 16410, 4357, 685, 11907, 198, 2100, 273, 796, 657, 198, 1640, 542, 287, 2837, 7, 16, 11, 807, 2599, 198, 220, 220, 220, 1188, 273, 796, 493, 7, 15414, 10786, 19511, 578, 267, 220, 1188, 273, 32105, 4008, 198, 220, 220, 22...
1.9375
144
# -*- coding: utf-8 -*- """ A script to benchmark TEA. @david angeles dangeles@caltech.edu """ import tissue_enrichment_analysis as tea # the library to be used import pandas as pd import os import numpy as np import seaborn as sns import matplotlib.pyplot as plt import re import matplotlib as mpl sns.set_context('...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 32, 4226, 284, 18335, 13368, 32, 13, 198, 198, 31, 67, 8490, 18304, 274, 198, 67, 8368, 274, 31, 9948, 13670, 13, 15532, 198, 37811, 198, 198, 11748, 10712...
2.327807
6,394
import click from lhotse.bin.modes import prepare from lhotse.recipes.peoples_speech import prepare_peoples_speech from lhotse.utils import Pathlike @prepare.command(context_settings=dict(show_default=True)) @click.argument("corpus_dir", type=click.Path(exists=True, dir_okay=True)) @click.argument("output_dir", type...
[ 11748, 3904, 198, 198, 6738, 300, 8940, 325, 13, 8800, 13, 76, 4147, 1330, 8335, 198, 6738, 300, 8940, 325, 13, 8344, 18636, 13, 431, 12614, 62, 45862, 1330, 8335, 62, 431, 12614, 62, 45862, 198, 6738, 300, 8940, 325, 13, 26791, 133...
2.741294
201
#!/usr/bin/env python # -*- coding: utf-8 -*- from ..dataset_container import Datapoint from datetime import datetime def test_datapoint_construction(): """Test that datapoints correctly store the values passed to them.""" dp = Datapoint(datetime(2018, 1, 1, 12, 0, 0), 2) assert dp.timestamp == datetime(2...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 11485, 19608, 292, 316, 62, 34924, 1330, 16092, 499, 1563, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 198...
2.622807
228
from django.contrib.auth import views as auth_views from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.urls import include, re_path from django_comments_ink.tests import views urlpatterns = [ re_path(r"^accounts/login/$", auth_views.LoginView.as_view()), re_path( r"^article...
[ 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 5009, 355, 6284, 62, 33571, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 12708, 16624, 13, 6371, 82, 1330, 9037, 16624, 62, 6371, 33279, 82, 198, 6738, 42625, 14208, 13, 6371, 82, 133...
2.071782
404
#!/usr/bin/env python import time import pyhdfs host = "default" port = 0 TEST_ROOT="/user/ai_data/hzxiahouzuoxin/" if __name__ == "__main__": main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 640, 198, 11748, 12972, 71, 7568, 82, 198, 198, 4774, 796, 366, 12286, 1, 198, 634, 796, 657, 198, 198, 51, 6465, 62, 13252, 2394, 35922, 7220, 14, 1872, 62, 7890, 14, 32179, ...
2.25
72
#Task types MULTICLASS = 'multiclass' MULTILABEL = 'multilabel' BINARY = 'binary' NER = 'ner'
[ 2, 25714, 3858, 198, 44, 16724, 2149, 43, 10705, 796, 705, 16680, 291, 31172, 6, 198, 44, 16724, 4146, 6242, 3698, 796, 705, 16680, 346, 9608, 6, 198, 33, 1268, 13153, 796, 705, 39491, 6, 198, 21479, 796, 705, 1008, 6, 198 ]
2.238095
42
from unittest import TestCase import jinja2 from esrally.track import loader
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 198, 11748, 474, 259, 6592, 17, 198, 198, 6738, 1658, 81, 453, 13, 11659, 1330, 40213, 628, 628 ]
3.153846
26
import numpy as np from nearpy.distances.distance import Distance class CorrelationDistance(Distance): """ Correlation distance """
[ 11748, 299, 32152, 355, 45941, 198, 198, 6738, 1474, 9078, 13, 17080, 1817, 13, 30246, 1330, 34600, 628, 198, 4871, 2744, 49501, 45767, 7, 45767, 2599, 198, 220, 220, 220, 37227, 2744, 49501, 5253, 37227, 198 ]
3.861111
36
import argparse import textwrap import sys
[ 11748, 1822, 29572, 198, 11748, 2420, 37150, 198, 11748, 25064, 628, 628, 628, 628 ]
3.571429
14
import os import numpy as np from tqdm import tqdm import glob import argparse parser = argparse.ArgumentParser(description='Prepare LAION-400M dataset for use.') parser.add_argument('--data_download_dir', type=str, help='base directory for downloading original dataset') parser.add_argument('--data_processed_dir', typ...
[ 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 11748, 15095, 198, 11748, 1822, 29572, 198, 198, 48610, 796, 1822, 29572, 13, 28100, 1713, 46677, 7, 11213, 11639, 37534, 533, 9131, ...
2.541806
598
from interop.voqc import SQIR, print_gates import argparse import time import os.path from pathlib import Path import sys if __name__ == "__main__": parser = argparse.ArgumentParser(description= "Run all optimizations,usage: python run_voqc.py <input rel. directory> <output qasm file>") parser.add_argument("i"...
[ 6738, 987, 404, 13, 13038, 80, 66, 1330, 49747, 4663, 11, 3601, 62, 70, 689, 198, 11748, 1822, 29572, 198, 11748, 640, 198, 11748, 28686, 13, 6978, 198, 6738, 3108, 8019, 1330, 10644, 198, 11748, 25064, 198, 198, 361, 11593, 3672, 834...
2.530086
349
""" This script does two things. First compares the SASA distributions of a given set of trajectories, then it compares that distributions with a reference distribution. Some parts of the code can be uncommented to get, if needed, the plot of the distributions in the second case (can be a way of detecting if they ove...
[ 37811, 198, 1212, 4226, 857, 734, 1243, 13, 3274, 23008, 262, 35516, 32, 24570, 286, 257, 1813, 900, 286, 20134, 1749, 11, 788, 220, 198, 270, 23008, 326, 24570, 351, 257, 4941, 6082, 13, 198, 4366, 3354, 286, 262, 2438, 460, 307, 8...
2.020405
7,351
import numpy as np import pandas as pd import tensorflow as tf import argparse from sklearn.preprocessing import MinMaxScaler from sklearn.metrics import auc,roc_curve,accuracy_score import matplotlib as mplbck import matplotlib.pyplot as plt from matplotlib.lines import Line2D from skimage.transform import resize mpl...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 220, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 1822, 29572, 198, 6738, 1341, 35720, 13, 3866, 36948, 1330, 1855, 11518, 3351, 36213, 198, 6738, 1341, 35720,...
2.789577
1,017
import inspect import unittest from .diff import PrettyDiff from .error import UnvisitedSnapshotsLeftError from .module import SnapshotModule, SnapshotTest from .reporting import diff_report # Inspired by https://gist.github.com/twolfson/13f5f5784f67fd49b245
[ 11748, 10104, 198, 11748, 555, 715, 395, 198, 198, 6738, 764, 26069, 1330, 20090, 28813, 198, 6738, 764, 18224, 1330, 791, 4703, 863, 43826, 20910, 18819, 12331, 198, 6738, 764, 21412, 1330, 16026, 9442, 26796, 11, 16026, 9442, 14402, 198...
3.341772
79
import importlib import logging import traceback from model.model.common.user import User from model.model.topic.topic import Topic from trino.exceptions import TrinoUserError from dqc.common.constants import TOPIC_RULE, FACTOR_RULE from dqc.common.utils.data_utils import get_date_range from dqc.model.analysis.rule_r...
[ 11748, 1330, 8019, 198, 11748, 18931, 198, 11748, 12854, 1891, 198, 198, 6738, 2746, 13, 19849, 13, 11321, 13, 7220, 1330, 11787, 198, 6738, 2746, 13, 19849, 13, 26652, 13, 26652, 1330, 47373, 198, 6738, 491, 2879, 13, 1069, 11755, 1330...
2.928251
223
# Copyright (c) 2021 Massachusetts Institute of Technology from setuptools import find_packages, setup DISTNAME = "hydra_zen_example.image_classifier" LICENSE = "MIT" INSTALL_REQUIRES = [ "hydra-zen >= 0.3.0rc5", "pytorch_lightning >= 1.4.9", "pytorch >= 1.7.1", "torchvision >= 0.8.1", "torchmetri...
[ 2, 15069, 357, 66, 8, 33448, 10140, 5136, 286, 8987, 198, 198, 6738, 900, 37623, 10141, 1330, 1064, 62, 43789, 11, 9058, 198, 198, 35, 8808, 20608, 796, 366, 15511, 430, 62, 4801, 62, 20688, 13, 9060, 62, 4871, 7483, 1, 198, 43, 2...
2.264591
257
# Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from __future__ import absolute_import from .log import * from .decorators import * from .meta_class import * from . import multiprocessing_shim
[ 2, 15069, 1584, 383, 18255, 1505, 46665, 13, 1439, 2489, 10395, 13, 198, 2, 5765, 286, 428, 2723, 2438, 318, 21825, 416, 257, 347, 10305, 12, 7635, 5964, 326, 460, 307, 198, 2, 1043, 287, 262, 38559, 24290, 2393, 13, 198, 6738, 1159...
3.698795
83
from hypernets.tests.tabular.dask_transofromer_test import setup_dask from . import if_dask_ready, is_dask_installed from ..psudo_labeling_test import TestPseudoLabeling as _TestPseudoLabeling if is_dask_installed: import dask.dataframe as dd @if_dask_ready
[ 6738, 8718, 45938, 13, 41989, 13, 8658, 934, 13, 67, 2093, 62, 7645, 1659, 398, 263, 62, 9288, 1330, 9058, 62, 67, 2093, 198, 6738, 764, 1330, 611, 62, 67, 2093, 62, 1493, 11, 318, 62, 67, 2093, 62, 37050, 198, 6738, 11485, 862, ...
2.731959
97
import pandas as pd import re from pandas import ExcelWriter metros = pd.read_excel('Metro names.xlsx', header=0) metros_list = list(metros.iloc[:,0]) states_list = list(metros.iloc[:,1]) # Function to extract the metro area name and total units through regex # Function to match metro and state names # Function to ...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 302, 198, 6738, 19798, 292, 1330, 24134, 34379, 198, 198, 4164, 4951, 796, 279, 67, 13, 961, 62, 1069, 5276, 10786, 45141, 3891, 13, 87, 7278, 87, 3256, 13639, 28, 15, 8, 198, 4164, 4951,...
2.810573
681
import io import typing as t from django_docker_helpers.config.backends.base import BaseParser from django_docker_helpers.config.exceptions import KVStorageValueIsEmpty from .yaml_parser import YamlParser class RedisParser(BaseParser): """ Reads a whole config bundle from a redis key and provides the unifie...
[ 11748, 33245, 198, 11748, 19720, 355, 256, 198, 198, 6738, 42625, 14208, 62, 45986, 62, 16794, 364, 13, 11250, 13, 1891, 2412, 13, 8692, 1330, 7308, 46677, 198, 6738, 42625, 14208, 62, 45986, 62, 16794, 364, 13, 11250, 13, 1069, 11755, ...
2.4
1,675
import importlib import inspect from .matcher import RootMatcher from .tokenizer.tokens import Document
[ 11748, 1330, 8019, 198, 11748, 10104, 198, 6738, 764, 6759, 2044, 1330, 20410, 19044, 2044, 198, 6738, 764, 30001, 7509, 13, 83, 482, 641, 1330, 16854, 628 ]
3.888889
27
#!/usr/bin/env python3 import sys best_orfs = {} query = None for line in sys.stdin: if line.startswith('LTR'): query, subject, pid, alnlen, mis, gapo, qstart, qend, sstart, send, evalue, bitscore = line.strip().split('\t') alnlen = int(alnlen) if query in best_orfs: best_orfs[query].append([alnlen]) else...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 25064, 198, 198, 13466, 62, 273, 9501, 796, 23884, 198, 22766, 796, 6045, 198, 1640, 1627, 287, 25064, 13, 19282, 259, 25, 198, 197, 361, 1627, 13, 9688, 2032, 342, 1...
2.278571
560
from __future__ import absolute_import, division, print_function, unicode_literals import sys import time from echomesh.base import Config from echomesh.command import Command from echomesh.expression import Expression from echomesh.util import Log from echomesh.util.thread.MasterRunnable import MasterRunnable from e...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 11, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 25064, 198, 11748, 640, 198, 198, 6738, 304, 354, 2586, 71, 13, 8692, 1330, 17056, 198, 6738, 304, 354, ...
3.269504
141
import deezer.errors from spoty import settings, secrets_file_name from deezer import Deezer from spoty import log import spoty.utils import os.path import click import time import re import datetime DEEZER_TRACK_ID_TAG = 'DEEZER_TRACK_ID' # DEEZER_APP_ID = settings.default.DEEZER_APP_ID # DEEZER_APP_SECRET = setting...
[ 11748, 390, 8471, 263, 13, 48277, 198, 6738, 4136, 88, 1330, 6460, 11, 13141, 62, 7753, 62, 3672, 198, 6738, 390, 8471, 263, 1330, 1024, 8471, 263, 198, 6738, 4136, 88, 1330, 2604, 198, 11748, 4136, 88, 13, 26791, 198, 11748, 28686, ...
2.443966
232
"""This module defines a dataclass which holds metadata about a WSI. With this class, metadata is in a normalized consistent format which is quite useful when working with many different WSI formats. The raw metadata is also preserved and accessible via a dictionary. The format of this dictionary may vary between WSI ...
[ 37811, 1212, 8265, 15738, 257, 4818, 330, 31172, 543, 6622, 20150, 546, 257, 370, 11584, 13, 198, 198, 3152, 428, 1398, 11, 20150, 318, 287, 257, 39279, 6414, 5794, 198, 4758, 318, 2407, 4465, 618, 1762, 351, 867, 1180, 370, 11584, 17...
2.291488
4,676
import gc import pickle import numpy as np import pandas as pd import tensorflow as tf from keras import Input, Model from keras.callbacks import ModelCheckpoint, EarlyStopping, ReduceLROnPlateau from keras.layers import Lambda, Dropout, Dense from keras.metrics import top_k_categorical_accuracy from keras.optimizers...
[ 11748, 308, 66, 198, 11748, 2298, 293, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 198, 6738, 41927, 292, 1330, 23412, 11, 9104, 198, 6738, 41927, 292, ...
1.983193
1,309
#test_model.py from pathlib import Path import sys root_dir = Path(Path.cwd()).parent sys.path.append(str(root_dir))#+'/src/') import pytest from src.sloth.model import Model from src.sloth.problem import Problem from src.sloth.simulation import Simulation from src.sloth.core.equation_operators import * from src....
[ 2, 9288, 62, 19849, 13, 9078, 198, 198, 6738, 3108, 8019, 1330, 10644, 198, 11748, 25064, 198, 198, 15763, 62, 15908, 796, 10644, 7, 15235, 13, 66, 16993, 3419, 737, 8000, 198, 198, 17597, 13, 6978, 13, 33295, 7, 2536, 7, 15763, 62,...
2.720461
347
from calculate import * from LeftHand import FretDance from chordToFinger import * if __name__ == '__main__': a = test() chordNote = [24, 16, 19, 12] a.testDancerMaker(chordNote)
[ 6738, 15284, 1330, 1635, 198, 6738, 9578, 12885, 1330, 376, 1186, 35, 590, 198, 6738, 25594, 2514, 37, 3889, 1330, 1635, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 257, 796, 1332, 3419...
2.635135
74
import unittest from .helpers import StubBoard, StubPiece, C, WHITE, BLACK # VALID MOVES ------------------------------------------------------------- # ------------------------------------------------------------------------- # INVALID MOVES ----------------------------------------------------------- ...
[ 11748, 555, 715, 395, 198, 6738, 764, 16794, 364, 1330, 41135, 29828, 11, 41135, 47, 8535, 11, 327, 11, 44925, 11, 31963, 628, 220, 220, 220, 1303, 26173, 2389, 28184, 1546, 20368, 1783, 32501, 198, 220, 220, 220, 1303, 16529, 45537, ...
5.361446
83
"""Test for hot water.""" import unittest from pymultimatic.model import OperatingModes, constants from tests.conftest import _hotwater class HotWaterTest(unittest.TestCase): """Test class.""" def test_get_active_mode_on(self) -> None: """Test active mode on.""" hot_water = _hotwater() ...
[ 37811, 14402, 329, 3024, 1660, 526, 15931, 198, 11748, 555, 715, 395, 198, 198, 6738, 279, 4948, 586, 320, 1512, 13, 19849, 1330, 24850, 44, 4147, 11, 38491, 198, 6738, 5254, 13, 1102, 701, 395, 1330, 4808, 8940, 7050, 628, 198, 4871,...
2.386417
427
from chainer.backends import cuda import cupy import numpy as np from chainer.functions import cast from chainer.functions import im2col from chainer.functions.connection.convolution_2d import Convolution2DFunction from chainerkfac.optimizers.fisher_blocks import FisherBlockConnection
[ 6738, 6333, 263, 13, 1891, 2412, 1330, 269, 15339, 198, 198, 11748, 6508, 88, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 6333, 263, 13, 12543, 2733, 1330, 3350, 198, 6738, 6333, 263, 13, 12543, 2733, 1330, 545, 17, 4033, 198,...
3.54878
82
""" Wrapper code to make it easy to run experiments with LAAOS. `parse_args_and_load_experiment_config` facilitates loading external experiment configs. `embedded_experiment` returns a store for an experiment based on the current script file. `embedded_experiments` returns a store a given job (out of number of jobs)...
[ 37811, 198, 36918, 2848, 2438, 284, 787, 340, 2562, 284, 1057, 10256, 351, 406, 3838, 2640, 13, 198, 198, 63, 29572, 62, 22046, 62, 392, 62, 2220, 62, 23100, 3681, 62, 11250, 63, 42699, 11046, 7097, 6306, 4566, 82, 13, 198, 198, 63,...
3.514286
175
_summary_writer = None
[ 198, 62, 49736, 62, 16002, 796, 6045, 198 ]
3
8
n=int(input()) th=n//1000 n=n%1000 fh=n//500 n=n%500 h=n//100 n=n%100 f=n//50 n=n%50 t=n//10 o=n%10 print(th+fh+h+f+t+o)
[ 77, 28, 600, 7, 15414, 28955, 201, 198, 400, 28, 77, 1003, 12825, 201, 198, 77, 28, 77, 4, 12825, 201, 198, 69, 71, 28, 77, 1003, 4059, 201, 198, 77, 28, 77, 4, 4059, 201, 198, 71, 28, 77, 1003, 3064, 201, 198, 77, 28, 77, ...
1.377551
98
# This is an example in how to use the sacn library to send and receive DMX data via sACN. # It assumes a multicast ready environment and the packets probably can be captured on the loopback traffic interface. # A sender and receiver is created, so that the receiver receives the values transmitted from the sender. # Ea...
[ 2, 770, 318, 281, 1672, 287, 703, 284, 779, 262, 5360, 77, 5888, 284, 3758, 290, 3328, 14848, 55, 1366, 2884, 264, 2246, 45, 13, 198, 2, 632, 18533, 257, 47368, 459, 3492, 2858, 290, 262, 24624, 2192, 460, 307, 7907, 319, 262, 905...
3.259958
477
import numpy as np import sklearn.cluster from optparse import OptionParser from sigvisa import Sigvisa from sigvisa.source.event import get_event if __name__ == "__main__": main()
[ 11748, 299, 32152, 355, 45941, 198, 11748, 1341, 35720, 13, 565, 5819, 628, 198, 6738, 2172, 29572, 1330, 16018, 46677, 198, 198, 6738, 43237, 4703, 64, 1330, 21984, 4703, 64, 198, 6738, 43237, 4703, 64, 13, 10459, 13, 15596, 1330, 651,...
2.910448
67
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
[ 2, 198, 2, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 198, 2, 393, 517, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 198, 2, 9387, 351, 428, 670, 329, 3224, 1321, 198, 2, 5115, 6634, 9238, 13, 220, ...
3.096311
488
# coding: utf8 from __future__ import unicode_literals ADJECTIVE_RULES = [ ["ین", ""], ["\u200cترین", ""], ["ترین", ""], ["\u200cتر", ""], ["تر", ""], ["\u200cای", ""], # ["ایی", "ا"], # ["ویی", "و"], # ["ی", ""], # ["مند", ""], # ["گین", ""], # ["مین", ""], # [...
[ 2, 19617, 25, 3384, 69, 23, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 628, 198, 2885, 23680, 9306, 62, 49, 6239, 1546, 796, 685, 198, 220, 220, 220, 14631, 151, 234, 23338, 1600, 13538, 4357, 198, 220, 220, 22...
1.462428
692
import tkinter from tkinter import LEFT, END, DISABLED, NORMAL import warnings import numpy as np import qiskit from qiskit import QuantumCircuit from qiskit.visualization import visualize_transition # Ignore unnecessary warnings warnings.simplefilter("ignore") # Define Window root = tkinter.Tk() root.title('Quantum ...
[ 11748, 256, 74, 3849, 198, 6738, 256, 74, 3849, 1330, 12509, 9792, 11, 23578, 11, 13954, 6242, 30465, 11, 25273, 42126, 198, 11748, 14601, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 10662, 1984, 270, 198, 6738, 10662, 1984, 270, 13...
2.501073
4,193
#!/usr/bin/env python import io import os import sys import audioread from google.cloud import speech from google.cloud.speech import enums from google.cloud.speech import types import config if __name__ == '__main__': if len(sys.argv) < 2: print_usage() sys.exit(-1) if sys.argv[1].startswi...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 33245, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 40504, 382, 324, 198, 6738, 23645, 13, 17721, 1330, 4046, 198, 6738, 23645, 13, 17721, 13, 45862, 1330, 551, 5700, 19...
2.42439
205
from __main__ import * # _et all the libraries from parent class Event(): """ Class for creating event objects. Extract all information needed for the event and keep the information inside the object. obj = new Event(db) obj.get_event(evid) for sta in obj: km = obj.distance(st...
[ 6738, 11593, 12417, 834, 1330, 1635, 220, 220, 220, 220, 220, 1303, 4808, 316, 477, 262, 12782, 422, 2560, 198, 198, 4871, 8558, 33529, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 5016, 329, 4441, 1785, 5563, 13, 198, 220, 220, 2...
1.864955
3,584
#!/usr/bin/env python # Copyright (C) 2020 T. Zachary Laine # # Distributed under the Boost Software License, Version 1.0. (See # accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) test_file_form = '''\ // Copyright (C) 2020 T. Zachary Laine // // Distributed under the Boost Software...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 15069, 357, 34, 8, 12131, 309, 13, 18825, 560, 406, 5718, 198, 2, 198, 2, 4307, 6169, 739, 262, 19835, 10442, 13789, 11, 10628, 352, 13, 15, 13, 357, 6214, 198, 2, 19249, ...
1.879838
1,731
# -*- coding: utf-8 -*- import random __author__ = 'Eric Larson' __email__ = 'eric@ionrock.org' __version__ = '0.1.2' ALPHA = 'abcdefghijklmnopqrstuvwxyz' NUMS = '0123456789' DELIMITERS = ' -_.,' CHARS = ALPHA + NUMS CHARS_WITH_CAPS = ALPHA.upper() + CHARS CHARS_WITH_DELIMITERS = CHARS + DELIMITERS
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 4738, 198, 198, 834, 9800, 834, 796, 705, 25004, 42630, 6, 198, 834, 12888, 834, 796, 705, 35626, 31, 295, 10823, 13, 2398, 6, 198, 834, 9641, 834, 796, 705, ...
2.075342
146
# automatically generated by the FlatBuffers compiler, do not modify # namespace: apemodefb
[ 2, 6338, 7560, 416, 262, 21939, 36474, 364, 17050, 11, 466, 407, 13096, 198, 198, 2, 25745, 25, 2471, 368, 375, 891, 65, 628 ]
3.916667
24