content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
""" Message context. """ from typing import Dict from microcosm.api import defaults, typed from microcosm.config.types import boolean from microcosm_logging.decorators import logger from microcosm_pubsub.constants import TTL_KEY, URI_KEY from microcosm_pubsub.message import SQSMessage
[ 37811, 198, 12837, 4732, 13, 198, 198, 37811, 198, 6738, 19720, 1330, 360, 713, 198, 198, 6738, 4580, 6966, 76, 13, 15042, 1330, 26235, 11, 25683, 198, 6738, 4580, 6966, 76, 13, 11250, 13, 19199, 1330, 25131, 198, 6738, 4580, 6966, 76...
3.372093
86
import os import argparse import torch import torch.optim as optim import torchvision import torchvision.transforms as transforms from model import Net from azureml.core import Run run = Run.get_context() if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument( '--data_path', ...
[ 11748, 28686, 198, 11748, 1822, 29572, 198, 11748, 28034, 198, 11748, 28034, 13, 40085, 355, 6436, 198, 11748, 28034, 10178, 198, 11748, 28034, 10178, 13, 7645, 23914, 355, 31408, 198, 198, 6738, 2746, 1330, 3433, 198, 6738, 35560, 495, 4...
2.46614
886
import pytest from app.db import session_scope pytestmark = pytest.mark.asyncio
[ 11748, 12972, 9288, 198, 198, 6738, 598, 13, 9945, 1330, 6246, 62, 29982, 198, 198, 9078, 9288, 4102, 796, 12972, 9288, 13, 4102, 13, 292, 13361, 952, 628 ]
2.964286
28
from abc import ABC, abstractmethod from datetime import datetime import json import logging from catalyst import utils from catalyst.core import _State __all__ = ["MetricsFormatter", "TxtMetricsFormatter", "JsonMetricsFormatter"]
[ 6738, 450, 66, 1330, 9738, 11, 12531, 24396, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 33918, 198, 11748, 18931, 198, 198, 6738, 31357, 1330, 3384, 4487, 198, 6738, 31357, 13, 7295, 1330, 4808, 9012, 628, 628, 198, 198, 834, ...
3.537313
67
#!/usr/bin/env python3 """ Description: Python script to append the common columns in one sheet from another sheet using fuzzy matching. """ import pip import os import sys import argparse import_or_install('numpy') import_or_install('pandas') import_or_install('fuzzywuzzy') import numpy as np import pandas...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 37811, 198, 11828, 25, 11361, 4226, 284, 24443, 262, 2219, 15180, 287, 530, 9629, 422, 1194, 9629, 1262, 34669, 12336, 13, 198, 37811, 198, 11748, 7347, 198, 220, 220, 220, 22...
2.852639
1,364
from .Panel import * __all__ = ['BubblePanel'] default_size = plt.matplotlib.rcParams['lines.markersize']**2
[ 6738, 764, 26639, 1330, 1635, 198, 198, 834, 439, 834, 796, 37250, 33, 549, 903, 26639, 20520, 198, 198, 12286, 62, 7857, 796, 458, 83, 13, 6759, 29487, 8019, 13, 6015, 10044, 4105, 17816, 6615, 13, 4102, 364, 1096, 20520, 1174, 17, ...
2.581395
43
import os from twisted.internet.defer import succeed
[ 11748, 28686, 198, 198, 6738, 19074, 13, 37675, 13, 4299, 263, 1330, 6758, 628 ]
3.928571
14
from rest_framework import viewsets from boh import models from . import serializers
[ 6738, 1334, 62, 30604, 1330, 5009, 1039, 198, 198, 6738, 275, 1219, 1330, 4981, 198, 198, 6738, 764, 1330, 11389, 11341, 628, 628, 198 ]
3.791667
24
import matplotlib matplotlib.use('TkAgg') import matplotlib.pyplot import agentframework import csv import matplotlib.animation #create environment in which agents will operate environment=[] #read csv downloaded file f = open('in.txt', newline='') reader = csv.reader(f, quoting=csv.QUOTE_NONNUMERIC) for row in ...
[ 11748, 2603, 29487, 8019, 198, 6759, 29487, 8019, 13, 1904, 10786, 51, 74, 46384, 11537, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 198, 11748, 5797, 30604, 198, 11748, 269, 21370, 198, 11748, 2603, 29487, 8019, 13, 11227, 341, 220, ...
2.518605
430
# Copyright (C) 2022 Intel Corporation # SPDX-License-Identifier: Apache-2.0 # try: import e2e.fixtures from e2e.conftest_utils import * # noqa from e2e.conftest_utils import pytest_addoption as _e2e_pytest_addoption # noqa from e2e import config # noqa from e2e.utils import get_plugins_...
[ 2, 15069, 357, 34, 8, 33160, 8180, 10501, 201, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 201, 198, 2, 201, 198, 201, 198, 28311, 25, 201, 198, 220, 220, 220, 1330, 304, 17, 68, 13, 69, 25506, 20...
2.5
386
"""Validation for UDFs. Warning: This is an experimental module and API here can change without notice. DO NOT USE DIRECTLY. """ from inspect import Parameter, Signature, signature from typing import Any, Callable, List import ibis.common.exceptions as com from ibis.expr.datatypes import DataType def _parameter_c...
[ 37811, 7762, 24765, 329, 471, 8068, 82, 13, 198, 198, 20361, 25, 770, 318, 281, 11992, 8265, 290, 7824, 994, 460, 1487, 1231, 4003, 13, 198, 198, 18227, 5626, 23210, 42242, 11319, 13, 198, 37811, 198, 198, 6738, 10104, 1330, 25139, 23...
2.547945
949
import inspect from ariadne import make_executable_schema, QueryType, MutationType, SubscriptionType from .resolver import * # # Schema # keywords = ['query', 'mutation', 'subscription', 'source'] # This is for testing or in case you don't want a database as the root schema
[ 11748, 10104, 198, 198, 6738, 257, 21244, 710, 1330, 787, 62, 18558, 18187, 62, 15952, 2611, 11, 43301, 6030, 11, 337, 7094, 6030, 11, 3834, 33584, 6030, 198, 198, 6738, 764, 411, 14375, 1330, 1635, 198, 198, 2, 198, 2, 10011, 2611, ...
3.361446
83
import random from otp.ai.AIBase import * from direct.distributed.ClockDelta import * from toontown.battle.BattleBase import * from toontown.battle.BattleCalculatorAI import * from toontown.toonbase.ToontownBattleGlobals import * from toontown.battle.SuitBattleGlobals import * from pandac.PandaModules import * from too...
[ 11748, 4738, 198, 6738, 30972, 79, 13, 1872, 13, 32, 9865, 589, 1330, 1635, 198, 6738, 1277, 13, 17080, 6169, 13, 44758, 42430, 1330, 1635, 198, 6738, 284, 756, 593, 13, 38471, 13, 24064, 14881, 1330, 1635, 198, 6738, 284, 756, 593, ...
3.409639
249
# Copyright (c) Group Three-Forest SJTU. All Rights Reserved. from tracking.tracking import * # a = tracking_video_rectangle("video/","1.mp4",[[273,352],[266,616],[412,620],[416,369]]) a = tracking_video_rectangle_tovideo("video/","1.mp4", "1.png", [[273,352],[266,616],[412,620],[416,369]], result = 'result__.a...
[ 2, 15069, 357, 66, 8, 4912, 7683, 12, 34605, 31766, 51, 52, 13, 1439, 6923, 33876, 13, 220, 201, 198, 201, 198, 6738, 9646, 13, 36280, 1330, 1635, 201, 198, 201, 198, 2, 257, 796, 9646, 62, 15588, 62, 2554, 9248, 7203, 15588, 14, ...
2.631206
141
import gym from gym import spaces, error, utils from gym.utils import seeding import numpy as np from scipy.spatial.distance import pdist, squareform import configparser from os import path import matplotlib.pyplot as plt from matplotlib.pyplot import gca font = {'family' : 'sans-serif', 'weight' : 'bold', ...
[ 11748, 11550, 198, 6738, 11550, 1330, 9029, 11, 4049, 11, 3384, 4487, 198, 6738, 11550, 13, 26791, 1330, 384, 8228, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 13, 2777, 34961, 13, 30246, 1330, 279, 17080, 11, 6616, 6...
2.818182
121
# -*-coding:utf-8-*- # from functools import reduce from functools import reduce SANCAI_jixiang = [1, 3, 5, 7, 8, 11, 13, 15, 16, 18, 21, 23, 24, 25, 31, 32, 33, 35, 37, 39, 41, 45, 47, 48, 52, 57, 61, 63, 65, 67, 68, 81] # ,, SANCAI_xiaoji = [6, 17, 26, 27, 29, 30, 38, 49, 51, 55, ...
[ 2, 532, 9, 12, 66, 7656, 25, 40477, 12, 23, 12, 9, 12, 198, 2, 422, 1257, 310, 10141, 1330, 4646, 198, 6738, 1257, 310, 10141, 1330, 4646, 198, 36753, 8141, 40, 62, 73, 844, 15483, 796, 685, 16, 11, 513, 11, 642, 11, 767, 11, ...
1.90572
944
# Generated by Django 3.1.2 on 2020-10-18 16:07 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 17, 319, 12131, 12, 940, 12, 1507, 1467, 25, 2998, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
""" Module for reporting into http://www.blazemeter.com/ service Copyright 2015 BlazeMeter Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unles...
[ 37811, 198, 26796, 329, 6447, 656, 2638, 1378, 2503, 13, 2436, 1031, 368, 2357, 13, 785, 14, 2139, 198, 198, 15269, 1853, 33965, 44, 2357, 3457, 13, 198, 198, 26656, 15385, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, ...
3.645408
392
""" Losses that assume an underlying spatial organization (gradients, curvature, etc.) """ import torch import torch.nn as tnn from nitorch.core.pyutils import make_list, prod from nitorch.core.utils import slice_tensor from nitorch.spatial import diff1d from ._base import Loss
[ 37811, 198, 43, 793, 274, 326, 7048, 281, 10238, 21739, 4009, 198, 7, 9744, 2334, 11, 46171, 1300, 11, 3503, 2014, 198, 37811, 198, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 256, 20471, 198, 6738, 299, 2072, 354, 13, 7295,...
3.287356
87
from django.db import models from django.utils import timezone
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 26791, 1330, 640, 11340, 628, 198 ]
3.611111
18
from app.services.console import Console from app.services.server import Server __main__ = ["server", "console"]
[ 6738, 598, 13, 30416, 13, 41947, 1330, 24371, 198, 6738, 598, 13, 30416, 13, 15388, 1330, 9652, 198, 198, 834, 12417, 834, 796, 14631, 15388, 1600, 366, 41947, 8973, 198 ]
3.8
30
#!/usr/bin/env python3 # Copyright 2020 Gaitech Korea Co., Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 15069, 12131, 12822, 45396, 4969, 1766, 1539, 12052, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743,...
3.865217
230
import sys import unittest import requests_mock from mock import patch sys.path.append('services/LiveService') from LiveService import LiveService L = LiveService() baseURL = "https://yanexx65s8e1.live.elementalclouddev.com/api" if __name__ == '__main__': unittest.main()
[ 11748, 25064, 198, 11748, 555, 715, 395, 198, 11748, 7007, 62, 76, 735, 198, 6738, 15290, 1330, 8529, 198, 17597, 13, 6978, 13, 33295, 10786, 30416, 14, 18947, 16177, 11537, 198, 6738, 7547, 16177, 1330, 7547, 16177, 628, 198, 198, 43, ...
2.887755
98
# -*- coding: utf-8 -*- """ Created on Fri Sep 14 11:49:10 2018 @author: Lionel Massoulard """ import pytest import numpy as np import pandas as pd from sklearn.base import is_regressor, is_classifier from sklearn.exceptions import NotFittedError from sklearn.model_selection import KFold from sklearn.ensemble impo...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 19480, 8621, 1478, 1367, 25, 2920, 25, 940, 2864, 198, 198, 31, 9800, 25, 44286, 5674, 2852, 446, 198, 37811, 198, 198, 11748, 12972, 9288, 198, ...
3.282609
184
from django import forms from django.conf import settings from django.http import HttpResponse, HttpResponseRedirect, Http404 from manager import models as pmod from . import templater from django.conf import settings import decimal, datetime # This view will display all users and then on a new page display al...
[ 6738, 42625, 14208, 1330, 5107, 201, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 201, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 11, 367, 29281, 31077, 7738, 1060, 11, 367, 29281, 26429, 201, 198, 6738, 4706, 1330, ...
3.778947
95
import pandas as pd import numpy as np import os import logging # suppress warnings import warnings; warnings.filterwarnings('ignore'); from tqdm.autonotebook import tqdm # register `pandas.progress_apply` and `pandas.Series.map_apply` with `tqdm` tqdm.pandas() # https://pandas.pydata.org/pandas-docs/stable/user_g...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 11748, 18931, 628, 198, 2, 18175, 14601, 198, 11748, 14601, 26, 198, 40539, 654, 13, 24455, 40539, 654, 10786, 46430, 24036, 198, 198, 6738, 25...
2.626943
579
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack.package import *
[ 2, 15069, 2211, 12, 1238, 1828, 13914, 45036, 3549, 2351, 4765, 11, 11419, 290, 584, 198, 2, 1338, 441, 4935, 34152, 13, 4091, 262, 1353, 12, 5715, 27975, 38162, 9947, 2393, 329, 3307, 13, 198, 2, 198, 2, 30628, 55, 12, 34156, 12, ...
3.439394
66
""" GPA Calculator """ # Write a function called "simple_gpa" to find GPA when student enters a letter grade as a string. Assign the result to a variable called "gpa". """ Use these conversions: A+ --> 4.0 A --> 4.0 A- --> 3.7 B+ --> 3.3 B --> 3.0 B- --> 2.7 C+ --> 2.3 C --> 2.0 C- --> 1.7 D+ --> 1.3 D --> 1.0 D- -->...
[ 37811, 198, 38, 4537, 43597, 198, 37811, 198, 198, 2, 19430, 257, 2163, 1444, 366, 36439, 62, 70, 8957, 1, 284, 1064, 45283, 618, 3710, 14170, 257, 3850, 9559, 355, 257, 4731, 13, 2195, 570, 262, 1255, 284, 257, 7885, 1444, 366, 70,...
2.394366
142
import sys import soundcard import numpy import pytest ones = numpy.ones(1024) signal = numpy.concatenate([[ones], [-ones]]).T def test_loopback_playback(loopback_player, loopback_recorder): loopback_player.play(signal) recording = loopback_recorder.record(1024*10) assert recording.shape[1] == 2 left,...
[ 11748, 25064, 198, 11748, 2128, 9517, 198, 11748, 299, 32152, 198, 11748, 12972, 9288, 198, 198, 1952, 796, 299, 32152, 13, 1952, 7, 35500, 8, 198, 12683, 282, 796, 299, 32152, 13, 1102, 9246, 268, 378, 26933, 58, 1952, 4357, 25915, 1...
2.591443
1,192
# This is a simple program to find the last three digits of 11 raised to any given number. # The main algorithm that does the work is on line 10 # To use it, simply copy the code and run the function
[ 2, 770, 318, 257, 2829, 1430, 284, 1064, 262, 938, 1115, 19561, 286, 1367, 4376, 284, 597, 1813, 1271, 13, 198, 2, 383, 1388, 11862, 326, 857, 262, 670, 318, 319, 1627, 838, 198, 198, 2, 1675, 779, 340, 11, 2391, 4866, 262, 2438, ...
4.102041
49
#!/usr/bin/env python import time from osr_msgs.msg import Joystick, Commands, Encoder, RunStop from nav_msgs.msg import Odometry from geometry_msgs.msg import Point, Pose, Quaternion, Twist, Vector3 import rospy import tf import math import numpy if __name__ == '__main__': rospy.init_node('osr_odometry2') ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 640, 198, 6738, 267, 27891, 62, 907, 14542, 13, 19662, 1330, 14087, 13915, 11, 49505, 11, 14711, 12342, 11, 5660, 19485, 198, 6738, 6812, 62, 907, 14542, 13, 19662, 1330, 10529, ...
2.303226
465
import numpy as np import h5py import os from devito.logger import info from devito import TimeFunction, clear_cache from examples.seismic.acoustic import AcousticWaveSolver from examples.seismic import Model, RickerSource, Receiver, TimeAxis from math import floor from scipy.interpolate import griddata import argparse...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 289, 20, 9078, 198, 11748, 28686, 198, 6738, 1614, 10094, 13, 6404, 1362, 1330, 7508, 198, 6738, 1614, 10094, 1330, 3862, 22203, 11, 1598, 62, 23870, 198, 6738, 6096, 13, 325, 1042, 291, 13, ...
2.29579
1,829
import math if __name__=='__main__': n=(int)(input()) for abc in range(n): t=(int)(input()) print math.factorial(t)
[ 11748, 10688, 198, 361, 11593, 3672, 834, 855, 6, 834, 12417, 834, 10354, 198, 220, 220, 220, 299, 16193, 600, 5769, 15414, 28955, 198, 220, 220, 220, 329, 450, 66, 287, 2837, 7, 77, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 2...
1.925
80
from setuptools import setup setup(name="pykinematicskineticstoolbox", version="0.0", description="Installable python package which collects useful kinematics and kinetics functions", author="John Martin K. God", author_email="john.martin.kleven.godo@gmail.com", license="MIT", packages=["pykinematics...
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 40406, 7, 3672, 2625, 9078, 5116, 368, 23372, 5116, 5139, 301, 970, 3524, 1600, 198, 197, 220, 2196, 2625, 15, 13, 15, 1600, 198, 197, 220, 6764, 2625, 15798, 540, 21015, 5301, 543, 26609...
3.04918
122
from datetime import datetime # ensure an rpc peer is added # exponetially smooth online/offline states of peers
[ 6738, 4818, 8079, 1330, 4818, 8079, 628, 198, 2, 4155, 281, 374, 14751, 12720, 318, 2087, 628, 198, 2, 1033, 36823, 1927, 7209, 2691, 14, 2364, 1370, 2585, 286, 14495, 198 ]
3.774194
31
# terrascript/dns/r.py import terrascript
[ 2, 8812, 15961, 14, 67, 5907, 14, 81, 13, 9078, 198, 11748, 8812, 15961, 628, 628, 628, 628, 198 ]
2.631579
19
from Jumpscale import j from .TCPRouterClient import TCPRouterClient JSConfigs = j.baseclasses.object_config_collection
[ 6738, 449, 8142, 38765, 1330, 474, 198, 6738, 764, 4825, 4805, 39605, 11792, 1330, 17283, 4805, 39605, 11792, 198, 198, 20120, 16934, 82, 796, 474, 13, 8692, 37724, 13, 15252, 62, 11250, 62, 43681, 628 ]
3.485714
35
""" Functions for reading Magritek Spinsolve binary (dx/1d) files and parameter (acqu.par/proc.par) files. """ import os from warnings import warn import numpy as np from . import fileiobase from . import jcampdx __developer_info__ = """ Spinsolve is the software used on the Magritek benchtop NMR devices. A spect...
[ 37811, 198, 24629, 2733, 329, 3555, 2944, 6525, 74, 1338, 1040, 6442, 13934, 357, 34350, 14, 16, 67, 8, 3696, 290, 220, 198, 17143, 2357, 357, 43561, 13, 1845, 14, 36942, 13, 1845, 8, 3696, 13, 198, 37811, 198, 198, 11748, 28686, 19...
2.32247
3,805
import logging import copy import pickle import pandas as pd
[ 11748, 18931, 198, 11748, 4866, 198, 11748, 2298, 293, 198, 11748, 19798, 292, 355, 279, 67, 628, 628, 198 ]
3.421053
19
import sys import scipy.stats normal = scipy.stats.norm(0, 1)
[ 11748, 25064, 198, 198, 11748, 629, 541, 88, 13, 34242, 198, 198, 11265, 796, 629, 541, 88, 13, 34242, 13, 27237, 7, 15, 11, 352, 8, 628, 628, 628, 198 ]
2.333333
30
# -*- coding: utf-8 -*- # # Graph : graph package # # Copyright or Copr. 2006 INRIA - CIRAD - INRA # # File author(s): Jerome Chopard <jerome.chopard@sophia.inria.fr> # # Distributed under the Cecill-C License. # See accompanying file LICENSE.txt or copy at # http://www.cecill.in...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 220, 220, 220, 220, 220, 220, 29681, 1058, 4823, 5301, 198, 2, 198, 2, 220, 220, 220, 220, 220, 220, 15069, 393, 6955, 81, 13, 4793, 3268, 49, 3539, 532...
2.466102
236
import paddle.fluid as fluid from paddle.fluid.initializer import MSRA from paddle.fluid.param_attr import ParamAttr if __name__ == '__main__': data = fluid.data(name='data', shape=[None, 3, 300, 300]) build_ssd(data, 21, img_shape=[3, 300, 300])
[ 11748, 39517, 13, 35522, 312, 355, 11711, 198, 6738, 39517, 13, 35522, 312, 13, 36733, 7509, 1330, 6579, 3861, 198, 6738, 39517, 13, 35522, 312, 13, 17143, 62, 35226, 1330, 25139, 8086, 81, 628, 628, 198, 361, 11593, 3672, 834, 6624, ...
2.755319
94
""" Copyright 2020 The OneFlow Authors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
[ 37811, 198, 15269, 12131, 383, 1881, 37535, 46665, 13, 1439, 2489, 10395, 13, 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, ...
3.610329
213
#! /usr/bin/env python3 import json import os.path import jinja2 DEFAULT_PARAMS = { "ansible_user": "vagrant" } if __name__ == "__main__": # Reading configuration here = os.path.dirname(os.path.realpath(__file__ + "/../")) with open(here + "/config.json", "r") as rf: config = json.load(rf...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 18, 628, 198, 11748, 33918, 198, 11748, 28686, 13, 6978, 198, 198, 11748, 474, 259, 6592, 17, 628, 198, 7206, 38865, 62, 27082, 40834, 796, 1391, 198, 220, 220, 220, 366, 504, 856, 62, ...
2.242386
788
import os import harvest.dataframe from harvest.models.simulator import Simulator
[ 11748, 28686, 198, 198, 11748, 13222, 13, 7890, 14535, 198, 6738, 13222, 13, 27530, 13, 14323, 8927, 1330, 13942, 198 ]
4.15
20
# pylint: skip-file import os from assimilator import * from Boinc import boinc_project_path if __name__ == "__main__": SlimeClustersAssimilator().run()
[ 2, 279, 2645, 600, 25, 14267, 12, 7753, 198, 198, 11748, 28686, 198, 6738, 36659, 1352, 1330, 1635, 198, 6738, 3248, 1939, 1330, 1489, 1939, 62, 16302, 62, 6978, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, ...
2.925926
54
# Licensed to Modin Development Team under one or more contributor license agreements. # See the NOTICE file distributed with this work for additional information regarding # copyright ownership. The Modin Development Team licenses this file to you under the # Apache License, Version 2.0 (the "License"); you may not u...
[ 2, 49962, 284, 3401, 259, 7712, 4816, 739, 530, 393, 517, 18920, 5964, 11704, 13, 198, 2, 4091, 262, 28536, 2393, 9387, 351, 428, 670, 329, 3224, 1321, 5115, 198, 2, 6634, 9238, 13, 220, 383, 3401, 259, 7712, 4816, 16625, 428, 2393,...
3.9
310
from astropy.table import Table, Column import matplotlib.pyplot as plt #url = "https://exoplanetarchive.ipac.caltech.edu/cgi-bin/nstedAPI/nph-nstedAPI?table=exoplanets&select=pl_hostname,ra,dec&order=dec&format=csv" url = "https://exoplanetarchive.ipac.caltech.edu/cgi-bin/nstedAPI/nph-nstedAPI?table=exoplanets" # This...
[ 6738, 6468, 28338, 13, 11487, 1330, 8655, 11, 29201, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 2, 6371, 796, 366, 5450, 1378, 1069, 46853, 316, 17474, 13, 541, 330, 13, 9948, 13670, 13, 15532, 14, 37157, 12, ...
2.248895
679
from tools import factorial if __name__ == '__main__': solve()
[ 6738, 4899, 1330, 1109, 5132, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 8494, 3419, 198 ]
2.8
25
# Copyright 2022. ThingsBoard # # 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, 220, 220, 220, 220, 15069, 33160, 13, 11597, 29828, 198, 2, 198, 2, 220, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 220, 220, 220, 220, 345, 743, 407, 779, 428, ...
3.078376
1,059
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. ### CONTROLS (non-tunable) ### # general TYPE_OF_RUN = test_episodes # train, test, test_episodes, render NUM_EPISODES_TO_TEST = 1000 MIN_FINAL_REWARD_FOR_SUCCESS = 1.0 LOAD_MODEL_FROM = models/gru_flat_babyai.pth SAVE_MODELS_TO = None # wo...
[ 2, 15069, 357, 66, 8, 5413, 10501, 13, 198, 2, 49962, 739, 262, 17168, 5964, 13, 198, 198, 21017, 220, 49833, 50, 220, 357, 13159, 12, 28286, 540, 8, 220, 44386, 198, 198, 2, 2276, 198, 25216, 62, 19238, 62, 49, 4944, 796, 1332, ...
2.13245
453
"""runghc support""" load(":private/context.bzl", "render_env") load(":private/packages.bzl", "expose_packages", "pkg_info_to_compile_flags") load( ":private/path_utils.bzl", "link_libraries", "ln", "target_unique_name", ) load( ":private/set.bzl", "set", ) load(":providers.bzl", "get_ghci_extr...
[ 37811, 5143, 456, 66, 1104, 37811, 198, 198, 2220, 7, 1298, 19734, 14, 22866, 13, 65, 48274, 1600, 366, 13287, 62, 24330, 4943, 198, 2220, 7, 1298, 19734, 14, 43789, 13, 65, 48274, 1600, 366, 1069, 3455, 62, 43789, 1600, 366, 35339, ...
2.204315
1,576
# Copyright (C) 2019 Cancer Care Associates # 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, 357, 34, 8, 13130, 15523, 7276, 29306, 198, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, ...
2.963054
406
"""Test data validator decorator.""" from unittest.mock import Mock from aiohttp import web import voluptuous as vol from homeassistant.components.http import HomeAssistantView from homeassistant.components.http.data_validator import RequestDataValidator
[ 37811, 14402, 1366, 4938, 1352, 11705, 1352, 526, 15931, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 44123, 198, 198, 6738, 257, 952, 4023, 1330, 3992, 198, 11748, 2322, 37623, 5623, 355, 2322, 198, 198, 6738, 1363, 562, 10167, 13, 5...
3.661972
71
import days STAGE_INIT = 0 STAGE_CHALLENGE_INIT = 1 STAGE_BOOKED = 2 messages = [ "Hey {{first_name}}, thankyou for your enquiry to be one of our Transformation Challengers", "We have 2 Challenges available for you:\n\nThe 8 Week Bikini Challenge which helps you shed 3-9kg of unwanted body fat...
[ 11748, 1528, 198, 198, 2257, 11879, 62, 1268, 2043, 796, 657, 198, 2257, 11879, 62, 3398, 7036, 1677, 8264, 62, 1268, 2043, 796, 352, 198, 2257, 11879, 62, 39453, 1961, 796, 362, 198, 198, 37348, 1095, 796, 685, 198, 220, 220, 220, ...
2.591292
1,424
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack.package import *
[ 2, 15069, 2211, 12, 1238, 1828, 13914, 45036, 3549, 2351, 4765, 11, 11419, 290, 584, 198, 2, 1338, 441, 4935, 34152, 13, 4091, 262, 1353, 12, 5715, 27975, 38162, 9947, 2393, 329, 3307, 13, 198, 2, 198, 2, 30628, 55, 12, 34156, 12, ...
3.439394
66
#!/usr/bin/env python3 import os, sys, re, json, requests, datetime, tarfile, argparse from pprint import pprint import numpy as np from utils.UrlUtils import UrlUtils server = 'https://qc.sentinel1.eo.esa.int/' cal_re = re.compile(r'S1\w_AUX_CAL') def cmdLineParse(): ''' Command line parser. ''' ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 28686, 11, 25064, 11, 302, 11, 33918, 11, 7007, 11, 4818, 8079, 11, 13422, 7753, 11, 1822, 29572, 198, 6738, 279, 4798, 1330, 279, 4798, 198, 11748, 299, 32152, 355, 45941, ...
2.083845
1,956
# Copyright 2005-2008, James Garrison # Copyright 2010, 2012 Bradley M. Kuhn # This software's license gives you freedom; you can copy, convey, # propagate, redistribute, modify and/or redistribute modified versions of # this program under the terms of the GNU Affero General Public License # (AGPL) as published by the...
[ 2, 15069, 5075, 12, 11528, 11, 3700, 39233, 198, 2, 15069, 3050, 11, 2321, 16182, 337, 13, 46035, 77, 198, 198, 2, 770, 3788, 338, 5964, 3607, 345, 4925, 26, 345, 460, 4866, 11, 13878, 11, 198, 2, 47933, 11, 17678, 4163, 11, 13096...
2.734952
947
import unittest from unittest.mock import Mock from graphene import Schema from graphene.test import Client from graphene_spike.query import Query
[ 11748, 555, 715, 395, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 44123, 198, 198, 6738, 42463, 1330, 10011, 2611, 198, 6738, 42463, 13, 9288, 1330, 20985, 198, 198, 6738, 42463, 62, 2777, 522, 13, 22766, 1330, 43301, 628 ]
3.75
40
from rich import print from rich.console import Console from rich.table import Table import click from click_default_group import DefaultGroup import yaml import os ##from terminaltables import SingleTable import sys from textwrap import wrap import collections import datetime import configparser import pkg_resources ...
[ 6738, 5527, 1330, 3601, 198, 6738, 5527, 13, 41947, 1330, 24371, 198, 6738, 5527, 13, 11487, 1330, 8655, 198, 11748, 3904, 198, 6738, 3904, 62, 12286, 62, 8094, 1330, 15161, 13247, 198, 11748, 331, 43695, 198, 11748, 28686, 198, 2235, 6...
2.487097
930
from social_core.backends.oauth import BaseOAuth2
[ 6738, 1919, 62, 7295, 13, 1891, 2412, 13, 12162, 1071, 1330, 7308, 23621, 1071, 17, 628 ]
3.1875
16
from django.db import models from django.contrib import admin
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 628, 198 ]
3.555556
18
#!/usr/bin/env python # license removed for brevity import rospy from std_msgs.msg import String from gazebo_msgs.msg import LinkState if __name__ == '__main__': try: talker() except rospy.ROSInterruptException: pass
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 5964, 4615, 329, 1449, 21319, 198, 198, 11748, 686, 2777, 88, 198, 6738, 14367, 62, 907, 14542, 13, 19662, 1330, 10903, 198, 6738, 308, 1031, 1765, 78, 62, 907, 14542, 13, 19662, ...
2.464646
99
import torch from os import listdir, path from PIL import Image import torchvision
[ 11748, 28034, 198, 6738, 28686, 1330, 1351, 15908, 11, 3108, 198, 6738, 350, 4146, 1330, 7412, 198, 11748, 28034, 10178, 628 ]
4
21
from django.core.mail.message import EmailMessage, EmailMultiAlternatives from django.utils.translation import ugettext_lazy as _ from django.template.loader import render_to_string from django.utils.safestring import mark_safe
[ 6738, 42625, 14208, 13, 7295, 13, 4529, 13, 20500, 1330, 9570, 12837, 11, 9570, 29800, 23081, 2929, 198, 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 334, 1136, 5239, 62, 75, 12582, 355, 4808, 198, 6738, 42625, 14208, 13, 28243, 13, ...
3.59375
64
"""Tests for the HAPServer.""" from socket import timeout from unittest.mock import Mock, MagicMock, patch import pytest from pyhap import hap_server
[ 37811, 51, 3558, 329, 262, 367, 2969, 10697, 526, 15931, 198, 6738, 17802, 1330, 26827, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 44123, 11, 6139, 44, 735, 11, 8529, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 12972, 45897, 1330,...
3.255319
47
from flask import render_template, Blueprint, request from app.utils.search import MySQLClient from app.utils.preprocessor import TextPreprocessor mainbp = Blueprint("main", __name__)
[ 6738, 42903, 1330, 8543, 62, 28243, 11, 39932, 11, 2581, 198, 198, 6738, 598, 13, 26791, 13, 12947, 1330, 33476, 11792, 198, 6738, 598, 13, 26791, 13, 3866, 41341, 1330, 8255, 6719, 41341, 628, 198, 12417, 46583, 796, 39932, 7203, 12417...
3.897959
49
# -*- coding: utf-8 -*- """This module contains design algorithm for a traditional two stage operational amplifier.""" from typing import TYPE_CHECKING, List, Optional, Dict, Any, Tuple, Sequence from copy import deepcopy import numpy as np import scipy.optimize as sciopt from bag.math import gcd from bag.data.lti...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 1212, 8265, 4909, 1486, 11862, 329, 257, 4569, 734, 3800, 13919, 33382, 526, 15931, 198, 198, 6738, 19720, 1330, 41876, 62, 50084, 2751, 11, 7343, 11, 32233, ...
3.280952
210
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import *
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 33918, 198, 198, 6738, 435, 541, 323, 13, 64, 404, 13, 15042, 13, 9979, 415, 13, 22973, 34184, 1187, 1330, 163...
2.446809
47
import torch from torchaudio_unittest.common_utils import PytorchTestCase from torchaudio_unittest.models.emformer.emformer_test_impl import EmformerTestImpl
[ 11748, 28034, 198, 6738, 28034, 24051, 62, 403, 715, 395, 13, 11321, 62, 26791, 1330, 9485, 13165, 354, 14402, 20448, 198, 6738, 28034, 24051, 62, 403, 715, 395, 13, 27530, 13, 368, 16354, 13, 368, 16354, 62, 9288, 62, 23928, 1330, 22...
3.404255
47
""" Two pipelines: * full history * update latest season * Only updates latest season year """ from functools import partial import itertools from kedro.pipeline import Pipeline, node from nba_analysis.pipelines.data_processing import basketball_reference from . import nodes
[ 37811, 198, 7571, 31108, 25, 198, 9, 1336, 2106, 198, 9, 4296, 3452, 1622, 198, 220, 220, 220, 1635, 5514, 5992, 3452, 1622, 614, 198, 37811, 628, 198, 6738, 1257, 310, 10141, 1330, 13027, 198, 11748, 340, 861, 10141, 198, 6738, 479, ...
3.653846
78
# Created by BaiJiFeiLong@gmail.com at 2022/1/21 17:13 import typing from IceSpringRealOptional.typingUtils import gg from PySide2 import QtWidgets, QtCore from IceSpringMusicPlayer import tt from IceSpringMusicPlayer.common.pluginMixin import PluginMixin from IceSpringMusicPlayer.common.pluginWidgetMixin import Plu...
[ 2, 15622, 416, 40750, 41, 72, 14304, 72, 14617, 31, 14816, 13, 785, 379, 33160, 14, 16, 14, 2481, 1596, 25, 1485, 198, 198, 11748, 19720, 198, 198, 6738, 6663, 30387, 15633, 30719, 13, 774, 13886, 18274, 4487, 1330, 308, 70, 198, 67...
3.458716
109
""" An implementation on spherical harmonics in python becasue scipy.special.sph_harm in scipy<=0.13 is very slow Originally written by Jozef Vesely https://github.com/scipy/scipy/issues/1280 """ import numpy as np if __name__ == "__main__": from scipy.special import sph_harm from scipy.misc import factorial...
[ 37811, 198, 2025, 7822, 319, 43180, 25625, 873, 287, 21015, 639, 292, 518, 629, 541, 88, 13, 20887, 13, 82, 746, 62, 29155, 287, 629, 541, 88, 27, 28, 15, 13, 1485, 318, 845, 3105, 198, 198, 22731, 3194, 416, 5302, 89, 891, 569, ...
2.037086
755
#!/usr/bin/env python # coding: utf-8 # In[9]: import requests import pandas as pd from lxml import etree from bs4 import BeautifulSoup import datetime import io import numpy as np from alphacast import Alphacast from dotenv import dotenv_values API_KEY = dotenv_values(".env").get("API_KEY") alphacast = Alphacast(A...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 554, 58, 24, 5974, 628, 198, 11748, 7007, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 300, 19875, 1330, 2123, 631, 198, 6738, 275,...
2.078857
875
# import the GED using the munkres algorithm import gmatch4py as gm import networkx as nx import collections import csv import pickle from collections import OrderedDict import json import concurrent.futures as cf import time iter = 0 ''' def runParallelCode(pairList): with cf.ProcessPoolExecutor(max_workers...
[ 198, 2, 1330, 262, 402, 1961, 1262, 262, 285, 2954, 411, 11862, 198, 11748, 308, 15699, 19, 9078, 355, 308, 76, 198, 11748, 3127, 87, 355, 299, 87, 220, 198, 11748, 17268, 198, 11748, 269, 21370, 198, 11748, 2298, 293, 198, 6738, 17...
2.358779
393
# -*- coding: utf-8 -*- # Copyright 2011 Takeshi KOMIYA # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 220, 15069, 2813, 33687, 5303, 509, 2662, 40, 44947, 198, 2, 198, 2, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, ...
3.467593
216
# -*- coding: utf-8 -*- """ Created on Thu Dec 19 20:00:00 2019 @author: Emilia Chojak @e-mail: emilia.chojak@gmail.com """ tax_dict = { 'Pan troglodytes' : 'Hominoidea', 'Pongo abelii' : 'Hominoidea', 'Hominoidea' : 'Simiiformes', 'Simiiformes' : 'Haplorrhini', 'Tarsius tarsier' : 'Tarsiiformes', 'Haplorrhini' : 'Pr...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 26223, 4280, 678, 1160, 25, 405, 25, 405, 13130, 198, 198, 31, 9800, 25, 2295, 17517, 10031, 73, 461, 198, 31, 68, 12, 4529, 25, 795, 17517, ...
2.216463
328
import csv # with open('./1.csv', newline='', encoding='utf-8') as f: # reader = csv.reader(f) # for row in reader: # print(row) with open('./1.csv', 'a', encoding='utf-8') as f: writer = csv.writer(f) writer.writerow(['4', '', '25', '1022', '886']) writer.writerow(['5', '', '18', '2234', ...
[ 11748, 269, 21370, 198, 198, 2, 351, 1280, 7, 4458, 14, 16, 13, 40664, 3256, 649, 1370, 11639, 3256, 21004, 11639, 40477, 12, 23, 11537, 355, 277, 25, 198, 2, 220, 220, 220, 220, 9173, 796, 269, 21370, 13, 46862, 7, 69, 8, 198, ...
2.108974
156
"""This module contains code for parsing RPC responses.""" from dataclasses import dataclass, field from typing import Union, Tuple, Any, Dict, List, Optional, Literal from apischema import alias from apischema.conversions import as_str from solana.publickey import PublicKey from solana.transaction import Transactio...
[ 37811, 1212, 8265, 4909, 2438, 329, 32096, 39400, 9109, 526, 15931, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 11, 2214, 198, 6738, 19720, 1330, 4479, 11, 309, 29291, 11, 4377, 11, 360, 713, 11, 7343, 11, 32233, 11, 25659, 1...
3.333333
231
"""Build a binary min heap object.""" from math import floor
[ 37811, 15580, 257, 13934, 949, 24575, 2134, 526, 15931, 198, 6738, 10688, 1330, 4314, 628 ]
4.133333
15
""" Vesper archive settings. The Vesper server serves the Vesper archive that is in the directory in which the server starts. The archive settings are the composition of a set of default settings (hard-coded in this module) and settings (optionally) specified in the file "Archive Settings.yaml" in the archive director...
[ 37811, 198, 53, 274, 525, 15424, 6460, 13, 198, 198, 464, 36448, 525, 4382, 9179, 262, 36448, 525, 15424, 326, 318, 287, 262, 8619, 198, 259, 543, 262, 4382, 4940, 13, 383, 15424, 6460, 389, 262, 11742, 198, 1659, 257, 900, 286, 427...
3.300429
233
#-*- coding=utf-8 -*- from __future__ import division, print_function, absolute_import from base_model import BaseModel from helper import * import tensorflow as tf import pickle import numpy as np import time
[ 2, 12, 9, 12, 19617, 28, 40477, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 7297, 11, 3601, 62, 8818, 11, 4112, 62, 11748, 198, 198, 6738, 2779, 62, 19849, 1330, 7308, 17633, 198, 6738, 31904, 1330, 1635, 198, 11748, 1...
3.419355
62
import subprocess from LEGEND import tbot as bot from LEGEND import tbot as borg from LEGEND.events import register from LEGEND import OWNER_ID, SUDO_USERS import asyncio import traceback import io import os import sys import time from telethon.tl import functions from telethon.tl import types from telethon.tl.types im...
[ 11748, 850, 14681, 198, 6738, 20978, 10619, 1330, 256, 13645, 355, 10214, 198, 6738, 20978, 10619, 1330, 256, 13645, 355, 275, 2398, 198, 6738, 20978, 10619, 13, 31534, 1330, 7881, 198, 6738, 20978, 10619, 1330, 47210, 21479, 62, 2389, 11...
3.386792
106
# Status: Being ported by Steven Watanabe # Base revision: 47077 # # Copyright (c) 2005 Reece H. Dunn. # Copyright 2006 Ilya Sokolov # Copyright (c) 2008 Steven Watanabe # # Use, modification and distribution is subject to the Boost Software # License Version 1.0. (See accompanying file LICENSE_1_0.txt or # http://www....
[ 2, 12678, 25, 11204, 49702, 416, 8239, 12242, 272, 11231, 198, 2, 7308, 18440, 25, 38634, 3324, 198, 2, 198, 2, 15069, 357, 66, 8, 5075, 29030, 344, 367, 13, 30833, 13, 198, 2, 15069, 4793, 49804, 64, 37641, 349, 709, 198, 2, 1506...
2.436522
575
import re from typing import Dict from aiohttp import web from yarl import URL from simcore_service_webserver.db_models import UserRole, UserStatus from simcore_service_webserver.login.cfg import cfg, get_storage from simcore_service_webserver.login.registration import create_invitation from simcore_service_webserver...
[ 11748, 302, 198, 6738, 19720, 1330, 360, 713, 198, 198, 6738, 257, 952, 4023, 1330, 3992, 198, 6738, 331, 7063, 1330, 10289, 198, 198, 6738, 985, 7295, 62, 15271, 62, 732, 1443, 18497, 13, 9945, 62, 27530, 1330, 11787, 47445, 11, 1178...
2.66763
346
from indra import sparser xml_str1 = ''' <article pmid="54321"> <interpretation> <sentence-text>MEK1 phosphorylates ERK1</sentence-text> <sem> <ref category="phosphorylate"> <var name="agent"> <ref category="protein"> <var name="name">MP2K1_HUMAN</var> <var name="uid...
[ 6738, 773, 430, 1330, 599, 28198, 198, 198, 19875, 62, 2536, 16, 796, 705, 7061, 198, 27, 20205, 9114, 312, 2625, 20, 3559, 2481, 5320, 198, 1279, 27381, 341, 29, 198, 1279, 34086, 594, 12, 5239, 29, 11682, 42, 16, 18431, 652, 75, ...
1.998929
934
""" Simple Example using coreali to access a register model. Needs no h^ardware""" # Import dependencies and compile register model with systemrdl-compiler from systemrdl import RDLCompiler import coreali import numpy as np import os from coreali import RegisterModel rdlc = RDLCompiler() rdlc.compile_file(os.path.di...
[ 37811, 17427, 17934, 1262, 4755, 7344, 284, 1895, 257, 7881, 2746, 13, 36557, 645, 289, 61, 446, 1574, 37811, 198, 198, 2, 17267, 20086, 290, 17632, 7881, 2746, 351, 1080, 4372, 75, 12, 5589, 5329, 198, 6738, 1080, 4372, 75, 1330, 314...
2.878151
238
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import os import re from abc import ABC, ABCMeta, abstractmethod from dataclasses import dataclass from typing import ( TYPE_CHECKING, Dict, Iterable, Iterator, List, Optional,...
[ 2, 15069, 1946, 41689, 1628, 20420, 357, 3826, 27342, 9865, 3843, 20673, 13, 9132, 737, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 3826, 38559, 24290, 737, 198, 198, 11748, 28686, 198, 11748, 302, 198, 6738, 4...
3.25
744
import json import requests from enum import Enum from typing import Dict from ..exceptions import JsonDecodeError, UnexpectedResponse, RequestError, BaseApiRequestError # - # - - # , GET/POST def _handle_errors(self, token): """ , """ tok...
[ 11748, 33918, 198, 11748, 7007, 198, 6738, 33829, 1330, 2039, 388, 198, 6738, 19720, 1330, 360, 713, 198, 6738, 11485, 1069, 11755, 1330, 449, 1559, 10707, 1098, 12331, 11, 471, 42072, 31077, 11, 19390, 12331, 11, 7308, 32, 14415, 18453, ...
2.099822
561
# -*- coding: utf-8 -*- # The MIT License (MIT) - Copyright (c) 2016-2021 Dave Vandenbout. import pytest from skidl import netlist_to_skidl from .setup_teardown import get_filename, setup_function, teardown_function
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 383, 17168, 13789, 357, 36393, 8, 532, 15069, 357, 66, 8, 1584, 12, 1238, 2481, 9935, 35464, 268, 65, 448, 13, 198, 198, 11748, 12972, 9288, 198, 198, 6738, ...
2.728395
81
#!/usr/bin/env python3 import ST7735 import sys st7735 = ST7735.ST7735( port=0, cs=1, dc=9, backlight=12, rotation=270, spi_speed_hz=10000000 ) # Reset the display st7735.begin() st7735.reset() st7735.set_backlight(0) print "\nDone." # Exit cleanly sys.exit(0)
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 3563, 3324, 2327, 198, 11748, 25064, 198, 198, 301, 3324, 2327, 796, 3563, 3324, 2327, 13, 2257, 3324, 2327, 7, 198, 220, 220, 220, 2493, 28, 15, 11, 198, 220, 220, ...
2.049296
142
from geopy.geocoders import Nominatim from requests.models import LocationParseError geolocator = Nominatim(user_agent="geoapiExercises") Latitude = 25.594095 Longitude = 85.137566 location(Latitude, Longitude) # Display
[ 198, 6738, 4903, 11081, 13, 469, 420, 375, 364, 1330, 399, 6351, 265, 320, 198, 6738, 7007, 13, 27530, 1330, 13397, 10044, 325, 12331, 198, 198, 469, 349, 420, 1352, 796, 399, 6351, 265, 320, 7, 7220, 62, 25781, 2625, 469, 78, 15042...
2.825
80
import random from tkinter import PhotoImage """ Esse arquivo define os estados do game """ def ia_chocer(): """IA faz a escolha de um numero aleatrio""" posibility = ['rock', 'paper', 'scissor'] value = posibility[random.randint(0, 2)] return value
[ 11748, 4738, 198, 6738, 256, 74, 3849, 1330, 5555, 5159, 628, 198, 37811, 198, 23041, 325, 610, 421, 23593, 8160, 28686, 1556, 22484, 466, 983, 198, 198, 37811, 628, 198, 4299, 220, 544, 62, 354, 420, 263, 33529, 198, 220, 220, 220, ...
2.660377
106
from filelock import FileLock, Timeout import os import time
[ 6738, 2393, 5354, 1330, 9220, 25392, 11, 3862, 448, 201, 198, 11748, 28686, 201, 198, 11748, 640, 201, 198, 201, 198, 201, 198 ]
2.956522
23
#from . import context #from . import test_NNModels #from . import test_data_extract #from . import test_speedcom #from . import test_utilities
[ 2, 6738, 764, 1330, 4732, 198, 2, 6738, 764, 1330, 1332, 62, 6144, 5841, 1424, 198, 2, 6738, 764, 1330, 1332, 62, 7890, 62, 2302, 974, 198, 2, 6738, 764, 1330, 1332, 62, 12287, 785, 198, 2, 6738, 764, 1330, 1332, 62, 315, 2410, ...
3.2
45
# Django REST Framework from rest_framework import serializers # Model from todo.management.models import Task # Utils from todo.utils.tasks import TaskMetrics from todo.utils.serializer_fields import CompleteNameUser
[ 2, 37770, 30617, 25161, 198, 6738, 1334, 62, 30604, 1330, 11389, 11341, 198, 198, 2, 9104, 198, 6738, 284, 4598, 13, 27604, 13, 27530, 1330, 15941, 198, 198, 2, 7273, 4487, 198, 6738, 284, 4598, 13, 26791, 13, 83, 6791, 1330, 15941, ...
3.683333
60
import numpy as np import pandas as pd from sklearn.decomposition import PCA ''' A function that detects outliers, where k is a tandard deviation threshold hyperparameter preferablly (2, 2.5, 3). The algo could handle multivariable data frames with any number of features d. For that manner, it first reduces the dimens...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 1341, 35720, 13, 12501, 296, 9150, 1330, 4217, 32, 198, 198, 7061, 6, 198, 32, 2163, 326, 39382, 41528, 3183, 11, 810, 479, 318, 257, 256, 392, 446, 288...
3.575758
165
# included from snippets/main.py # tests T1 = """ 4 3 2 """ TEST_T1 = """ >>> as_input(T1) >>> main() 4 """ T2 = """ 1 2 3 """ TEST_T2 = """ >>> as_input(T2) >>> main() 1 """ T3 = """ 3141592 6535897 9323846 """ TEST_T3 = """ >>> as_input(T3) >>> main() 2 """ T4 = """ 2 10 1 """ TEST_T4 = """ >>> as_input(T4) >>> ...
[ 2, 3017, 422, 45114, 14, 12417, 13, 9078, 628, 628, 198, 2, 5254, 198, 51, 16, 796, 37227, 198, 19, 513, 362, 198, 37811, 198, 51, 6465, 62, 51, 16, 796, 37227, 198, 33409, 355, 62, 15414, 7, 51, 16, 8, 198, 33409, 1388, 3419, ...
2.106576
441
ezan = { 'name': 'ezan', 'age': 18, 'hair': 'brown', 'cool': True , } print(ezan) ezan = Person( name = "ezan", age = 18, hair = "black", cool = True, hungry = False) print(ezan.name) print('I am hungry') Austin = Person(name = 'austin', age = 18, hair = "Shrek", cool = False, hungry = True)
[ 8471, 272, 796, 1391, 198, 220, 220, 220, 705, 3672, 10354, 705, 8471, 272, 3256, 198, 220, 220, 220, 705, 496, 10354, 1248, 11, 628, 220, 220, 220, 705, 27108, 10354, 705, 33282, 3256, 198, 220, 220, 220, 705, 24494, 10354, 6407, 8...
2.415385
130
# 62. # yanghui = [[0 for i in range(202)] for j in range(202)]
[ 2, 8190, 13, 220, 198, 2, 220, 198, 198, 4121, 456, 9019, 796, 16410, 15, 329, 1312, 287, 2837, 7, 19004, 15437, 329, 474, 287, 2837, 7, 19004, 15437, 198 ]
2.233333
30