content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import numpy as np import fatiando as ft shape = (41, 41) x, y = ft.grd.regular((-10, 10, 30, 50), shape) height = 800 - 1000*ft.utils.gaussian2d(x, y, 3, 1, x0=0, y0=37) rel = -7000*ft.utils.gaussian2d(x, y, 3, 5, x0=0, y0=40) thick = height - rel dens = 1900*np.ones_like(thick) data = np.transpose([x, y, height, thi...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 3735, 72, 25440, 355, 10117, 198, 198, 43358, 796, 357, 3901, 11, 6073, 8, 198, 87, 11, 331, 796, 10117, 13, 2164, 67, 13, 16338, 19510, 12, 940, 11, 838, 11, 1542, 11, 2026, 828, 5485, 8...
2.261317
486
from .page_all_requests import * # noqa from .page_request_details import * # noqa
[ 6738, 764, 7700, 62, 439, 62, 8897, 3558, 1330, 1635, 220, 1303, 645, 20402, 201, 198, 6738, 764, 7700, 62, 25927, 62, 36604, 1330, 1635, 220, 1303, 645, 20402 ]
2.931034
29
# -*- coding: utf-8 -*- """ wegene.Models.AncestryArea This file was automatically generated by APIMATIC BETA v2.0 on 02/22/2016 """ from wegene.APIHelper import APIHelper class AncestryArea(object): """Implementation of the 'ancestry area' model. User ancestry composition areas information Att...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 220, 220, 356, 70, 1734, 13, 5841, 1424, 13, 2025, 9165, 563, 30547, 628, 220, 220, 770, 2393, 373, 6338, 7560, 416, 3486, 3955, 1404, 2149, 347, 2089...
2.105065
5,035
import argparse import os from typing import Type from loguru import logger import numpy as np import torch from probnmn.config import Config from probnmn.evaluators import ( ProgramPriorEvaluator, JointTrainingEvaluator, ModuleTrainingEvaluator, QuestionCodingEvaluator, ) from probnmn.trainers import...
[ 11748, 1822, 29572, 198, 11748, 28686, 198, 6738, 19720, 1330, 5994, 198, 198, 6738, 2604, 14717, 1330, 49706, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 198, 6738, 1861, 77, 10295, 13, 11250, 1330, 17056, 198, 6738, 1861...
2.725291
1,376
# This file is used to configure the behavior of pytest when using the Astropy # test infrastructure. import os from pytest_astropy_header.display import PYTEST_HEADER_MODULES, TESTED_VERSIONS # from astropy.tests.helper import enable_deprecations_as_exceptions ## Uncomment the following line to treat all Deprecat...
[ 2, 770, 2393, 318, 973, 284, 17425, 262, 4069, 286, 12972, 9288, 618, 1262, 262, 8304, 28338, 198, 2, 1332, 6884, 13, 198, 11748, 28686, 198, 198, 6738, 12972, 9288, 62, 459, 28338, 62, 25677, 13, 13812, 1330, 350, 56, 51, 6465, 62,...
3.312727
275
import os from conans import ConanFile
[ 11748, 28686, 198, 198, 6738, 369, 504, 1330, 31634, 8979, 198 ]
3.636364
11
#!/usr/bin/env python import asyncio from hexbytes import HexBytes from decimal import Decimal import logging from typing import ( List, Dict, Iterable, Set, Optional ) from web3 import Web3 from web3.datastructures import AttributeDict from hummingbot.wallet.ethereum.erc20_token import ERC20Token...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 30351, 952, 198, 6738, 17910, 33661, 1330, 22212, 45992, 198, 6738, 32465, 1330, 4280, 4402, 198, 11748, 18931, 198, 6738, 19720, 1330, 357, 198, 220, 220, 220, 7343, 11, 198...
3.021277
282
"""Authorization fixtures module""" import pytest from src.middleware import generate_token from src.utilities.constants import MIMETYPE, MIMETYPE_TEXT from ..mocks.token import EXPIRED_TOKEN as expired_token @pytest.fixture(scope='module') def auth_header(new_user, generate_token=generate_token): """Fixture that...
[ 37811, 13838, 1634, 34609, 8265, 37811, 198, 11748, 12972, 9288, 198, 6738, 12351, 13, 27171, 1574, 1330, 7716, 62, 30001, 198, 6738, 12351, 13, 315, 2410, 13, 9979, 1187, 1330, 337, 3955, 2767, 56, 11401, 11, 337, 3955, 2767, 56, 11401...
2.3596
901
""" Copyright (c) 2015 Red Hat, Inc All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. Classes which implement tasks which builder has to be capable of doing. Logic above these classes has to set the workflow itself. """ import jso...
[ 37811, 198, 15269, 357, 66, 8, 1853, 2297, 10983, 11, 3457, 198, 3237, 2489, 10395, 13, 198, 198, 1212, 3788, 743, 307, 9518, 290, 9387, 739, 262, 2846, 198, 1659, 262, 347, 10305, 5964, 13, 4091, 262, 38559, 24290, 2393, 329, 3307, ...
2.348485
1,848
import cowsay import itertools import threading import time import sys import os import argparse import pandas as pd if __name__=="__main__": parser = argparse.ArgumentParser(description='Name Roulette v2.1.0. A random picker for names. A digital terminal script based on the game spin the bottle.') parser.add...
[ 11748, 22575, 323, 198, 11748, 340, 861, 10141, 198, 11748, 4704, 278, 198, 11748, 640, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 1822, 29572, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 361, 11593, 3672, 834, 855, 1, 834, ...
2.595238
588
import gensim from gensim.models import Word2Vec, word2vec from gensim.models.callbacks import CallbackAny2Vec import os os.system('clear') # Creating a class to fetch loss after every epoch w2v = Word2Vec(vector_size=100, # size of the w2v is allocated to be 300 window = 5, # window size assi...
[ 11748, 308, 641, 320, 198, 6738, 308, 641, 320, 13, 27530, 1330, 9678, 17, 53, 721, 11, 1573, 17, 35138, 198, 6738, 308, 641, 320, 13, 27530, 13, 13345, 10146, 1330, 4889, 1891, 7149, 17, 53, 721, 198, 11748, 28686, 198, 198, 418, ...
2.263158
532
import connexion from openapi_server.models.error import Error # noqa: E501 from openapi_server.models.text_person_name_annotation import TextPersonNameAnnotation from openapi_server.models.text_person_name_annotation_request import TextPersonNameAnnotationRequest # noqa: E501 from openapi_server.models.text_person_n...
[ 11748, 369, 12413, 295, 198, 6738, 1280, 15042, 62, 15388, 13, 27530, 13, 18224, 1330, 13047, 220, 1303, 645, 20402, 25, 412, 33548, 198, 6738, 1280, 15042, 62, 15388, 13, 27530, 13, 5239, 62, 6259, 62, 3672, 62, 1236, 14221, 1330, 82...
2.712
500
# Python program to print left view of Binary Tree # A binary tree node # Constructor to create a new node # Recursive function pritn left view of a binary tree # A wrapper over leftViewUtil() # Driver program to test above function root = Node(12) root.left = Node(10) root.right = Node(20) root.right.left ...
[ 2, 11361, 1430, 284, 3601, 1364, 1570, 286, 45755, 12200, 198, 198, 2, 317, 13934, 5509, 10139, 628, 220, 220, 220, 1303, 28407, 273, 284, 2251, 257, 649, 10139, 628, 198, 2, 3311, 30753, 2163, 778, 270, 77, 1364, 1570, 286, 257, 13...
3.151261
119
s = 0 q = 0 for i in range(6): n = float(input()) if n > 0: q += 1 s += n if q != 0: m = s / q else: m = 0 print(q, 'valores positivos') print('{:.1f}'.format(m))
[ 82, 796, 657, 198, 80, 796, 657, 198, 1640, 1312, 287, 2837, 7, 21, 2599, 198, 220, 220, 220, 299, 796, 12178, 7, 15414, 28955, 198, 220, 220, 220, 611, 299, 1875, 657, 25, 198, 220, 220, 220, 220, 220, 220, 220, 10662, 15853, 3...
1.87
100
# -*- coding: utf-8 -*- # Generated by Django 1.11.7 on 2019-02-06 15:58 from __future__ import unicode_literals from django.db import migrations
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 1157, 13, 22, 319, 13130, 12, 2999, 12, 3312, 1315, 25, 3365, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, ...
2.690909
55
""" ``StatsNbaSummaryLoader`` loads summary data for a game and creates :obj:`~pbpstats.resources.games.stats_nba_game_item.StatsNbaGameItem` objects for game The following code will load summary data for game id "0021900001" from a file located in a subdirectory of the /data directory .. code-block:: python fro...
[ 37811, 198, 15506, 29668, 45, 7012, 22093, 17401, 15506, 15989, 10638, 1366, 329, 257, 983, 290, 198, 20123, 274, 1058, 26801, 25, 63, 93, 40842, 79, 34242, 13, 37540, 13, 19966, 13, 34242, 62, 77, 7012, 62, 6057, 62, 9186, 13, 29668,...
2.997859
467
from discord.ext import commands import discord import platform
[ 6738, 36446, 13, 2302, 1330, 9729, 198, 11748, 36446, 198, 11748, 3859, 628, 198 ]
4.714286
14
from django.core.files.uploadedfile import InMemoryUploadedFile from django.conf import settings from mako.models import FileConfig from api.models import File import logging from typing import List, Tuple import uuid from uuid import UUID import os import pathlib import zipfile import tarfile import hashlib from shuti...
[ 6738, 42625, 14208, 13, 7295, 13, 16624, 13, 25850, 276, 7753, 1330, 554, 30871, 41592, 276, 8979, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 285, 25496, 13, 27530, 1330, 9220, 16934, 198, 6738, 40391, 13, 27530, 1330, 9...
2.617433
2,478
import numpy as np import pytest from panqec.bpauli import bsf_to_pauli, bsf_wt from panqec.error_models import PauliErrorModel, DeformedXZZXErrorModel from panqec.codes import Toric3DCode from panqec.decoders import DeformedToric3DMatchingDecoder from panqec.bsparse import to_array from panqec.utils import get_directi...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 12972, 9288, 198, 6738, 3425, 80, 721, 13, 46583, 2518, 72, 1330, 275, 28202, 62, 1462, 62, 79, 2518, 72, 11, 275, 28202, 62, 46569, 198, 6738, 3425, 80, 721, 13, 18224, 62, 27530, 1330, 33...
2.032641
337
from ..factory import Type
[ 6738, 11485, 69, 9548, 1330, 5994, 628 ]
4
7
import numpy as np import vtk if __name__ == '__main__': main()
[ 11748, 299, 32152, 355, 45941, 198, 11748, 410, 30488, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419, 198 ]
2.448276
29
import time
[ 11748, 640, 198 ]
4
3
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function from marshmallow import fields, validate from polyaxon_schemas.ops.run import BaseRunConfig, BaseRunSchema
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 198, 198, 6738, 22397, 42725, 1330, 7032, 11, 26571, 198, 198, 6738, 7514, 897, 261, 62, ...
3.225806
62
""" :Author: Bilal Shaikh <bilal.shaikh@columbia.edu> Ashwin Srinivasan <ashwins@mit.edu> ::Date: 2018-07-19 :Copyright: 2018, Karr Lab :License: MIT """ import wc_kb import wc_kb_gen import numpy from wc_onto import onto as wcOntology from wc_utils.util.ontology import are_terms_equivalent class ObservablesG...
[ 37811, 198, 25, 13838, 25, 24207, 282, 19413, 13848, 1279, 33473, 282, 13, 26270, 13848, 31, 4033, 2178, 544, 13, 15532, 29, 198, 220, 220, 220, 220, 220, 220, 220, 220, 7844, 5404, 311, 12769, 38630, 272, 1279, 1077, 86, 1040, 31, ...
2.033846
2,925
# -*- coding: utf-8 -*- """ Created on Sun Jan 10 23:15:14 2021 @author: Nikhil """ import numpy as np import modern_robotics as mr import yaml from trajectory import TrajectoryGenerator from simulate import Odometry from feedback_controller import FeedbackController from math import cos, sin import csv...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 41972, 319, 3825, 2365, 838, 2242, 25, 1314, 25, 1415, 33448, 201, 198, 201, 198, 31, 9800, 25, 11271, 71, 346, 201, 198, 37811, 201, 198, 201, ...
2.044989
2,734
import numpy as np from robolib.datamanager.siamese_data_loader import load_one_image from apps.erianet.erianet_util import load_erianet_model, get_3bhif_names MODEL_FILENAME = "TestModel.model" CLASS = 6 IMAGE = 3 model = load_erianet_model(MODEL_FILENAME) name = input("Enter name: ") img = int(input("Which im...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 3857, 349, 571, 13, 19608, 10546, 3536, 13, 13396, 1047, 68, 62, 7890, 62, 29356, 1330, 3440, 62, 505, 62, 9060, 198, 6738, 6725, 13, 263, 666, 316, 13, 263, 666, 316, 62, 22602, 1330, 3440,...
2.514706
204
import os from rest_framework import exceptions, status from rest_framework.permissions import AllowAny from rest_framework.renderers import CoreJSONRenderer, JSONRenderer from rest_framework.response import Response from rest_framework.schemas import SchemaGenerator from rest_framework.views import APIView from rest_...
[ 11748, 28686, 198, 198, 6738, 1334, 62, 30604, 1330, 13269, 11, 3722, 198, 6738, 1334, 62, 30604, 13, 525, 8481, 1330, 22507, 7149, 198, 6738, 1334, 62, 30604, 13, 10920, 19288, 1330, 7231, 40386, 49, 437, 11882, 11, 19449, 49, 437, 1...
3.415842
202
from sql_tools import wifiTest import random c = 0 ap = 'SSID' encr = True while(c < 100): ssid = ap + str(c) mac = randNumb() sign = random.randrange(0, 100, 1) chan = random.randrange(1, 12, 1) lat = 10.7546 lon = -52.1235 wifiTest(c, ssid, mac, sign, chan, str(encr), lat, lon) c +...
[ 6738, 44161, 62, 31391, 1330, 43121, 14402, 198, 11748, 4738, 628, 198, 66, 796, 657, 198, 499, 796, 705, 5432, 2389, 6, 198, 268, 6098, 796, 6407, 198, 198, 4514, 7, 66, 1279, 1802, 2599, 198, 220, 220, 220, 264, 30255, 796, 2471, ...
2.131579
152
#!/usr/bin/python import random import sys count = 0 while count < 1000: x=random.randint(1,100) j=random.randint(1,200) op = ["+", "-", "*"] op_num = random.randint(1,3) data = "" solve = 0 if count < 500: if op_num == 1: solve = x + j data = ("what is %d ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 11748, 4738, 198, 11748, 25064, 198, 198, 9127, 796, 657, 198, 4514, 954, 1279, 8576, 25, 198, 220, 220, 220, 2124, 28, 25120, 13, 25192, 600, 7, 16, 11, 3064, 8, 198, 220, 220, 220,...
1.824684
713
# -*- coding: utf-8 -*- """Top-level package for pineapple nodes."""
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 9126, 12, 5715, 5301, 329, 45540, 13760, 526, 15931, 198 ]
2.692308
26
""" @package dochemistry @mainpage Wrapper for various NoSQL, document-oriented databases @section Introduction Introduction doChemistry is intended to be an abstraction layer for various NoSQL and document-oriented databases. """ __version__ = '0.0.1'
[ 37811, 198, 31, 26495, 2205, 4411, 4592, 198, 198, 31, 12417, 7700, 27323, 2848, 329, 2972, 1400, 17861, 11, 3188, 12, 17107, 20083, 198, 198, 31, 5458, 22395, 22395, 198, 220, 466, 41829, 4592, 318, 5292, 284, 307, 281, 34651, 7679, ...
3.753623
69
# coding: utf-8 # The MIT License (MIT) # # Copyright (c) <2011-2014> <Shibzukhov Zaur, szport at gmail dot 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, incl...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 383, 17168, 13789, 357, 36393, 8, 198, 2, 220, 198, 2, 15069, 357, 66, 8, 1279, 9804, 12, 4967, 29, 1279, 2484, 571, 89, 2724, 28026, 1168, 2899, 11, 264, 89, 634, 379, 308, 4529, 1...
2.656331
1,161
import pytest from aws_cdk.assertions import Template
[ 11748, 12972, 9288, 198, 198, 6738, 3253, 82, 62, 10210, 74, 13, 30493, 507, 1330, 37350, 628 ]
3.294118
17
from tkinter import* from tkinter import messagebox from centralizando import Centralizar from componentes import Objetos from tkinter.scrolledtext import ScrolledText App09()
[ 6738, 256, 74, 3849, 1330, 9, 198, 6738, 256, 74, 3849, 1330, 3275, 3524, 198, 6738, 4318, 528, 25440, 1330, 5694, 528, 283, 198, 6738, 7515, 274, 1330, 1835, 31173, 418, 198, 6738, 256, 74, 3849, 13, 1416, 8375, 5239, 1330, 1446, 8...
3.56
50
__all__ = ('UserMenuFactory', 'UserMenuRunner', 'UserPagination',) from scarletio import CancelledError, copy_docs, CallableAnalyzer from ...discord.core import BUILTIN_EMOJIS from ...discord.emoji import Emoji from ...discord.interaction import InteractionEvent from ...discord.message import Message from ...discord i...
[ 834, 439, 834, 796, 19203, 12982, 23381, 22810, 3256, 705, 12982, 23381, 49493, 3256, 705, 12982, 47, 363, 1883, 3256, 8, 198, 198, 6738, 10153, 1616, 952, 1330, 43780, 3353, 12331, 11, 4866, 62, 31628, 11, 4889, 540, 37702, 9107, 198, ...
2.135363
13,305
import yaml ############################ Genrate page parts ######################################### ############################ Genrate full pages #########################################
[ 11748, 331, 43695, 198, 14468, 7804, 4242, 5215, 4873, 2443, 3354, 1303, 29113, 7804, 198, 198, 14468, 7804, 4242, 5215, 4873, 1336, 5468, 1303, 29113, 7804, 628, 628, 628, 628 ]
6.666667
30
################################################################################ # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: MIT-0 ################################################################################ import json from account_operations import account_ope...
[ 29113, 29113, 14468, 198, 2, 15069, 6186, 13, 785, 11, 3457, 13, 393, 663, 29116, 13, 1439, 6923, 33876, 13, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 17168, 12, 15, 198, 29113, 29113, 14468, 198, 198, 11748, 33918, 198, 19...
3.008197
366
#Stop words from nltk.tokenize import word_tokenize from nltk.corpus import stopwords example_sentence = "This is an example sentence to show you, how it is working." stop_words = set(stopwords.words("English")) filtered_sentence = [] example_tokenize = word_tokenize(example_sentence) print(example_token...
[ 2, 19485, 2456, 201, 198, 201, 198, 6738, 299, 2528, 74, 13, 30001, 1096, 1330, 1573, 62, 30001, 1096, 201, 198, 6738, 299, 2528, 74, 13, 10215, 79, 385, 1330, 2245, 10879, 201, 198, 201, 198, 20688, 62, 34086, 594, 796, 366, 1212, ...
2.652582
213
"""Helper functions for model tests.""" import unittest.mock as mock import pytest # type: ignore from app.models import (Game, Player, Round) PROVISIONAL_NAME = "provisional name" CONFIRMED_NAME = "Abcdef" def mock_game(): """Return a mock of a Game.""" return mock.create_autospec(Game) ...
[ 37811, 47429, 5499, 329, 2746, 5254, 526, 15931, 198, 11748, 555, 715, 395, 13, 76, 735, 355, 15290, 198, 198, 11748, 12972, 9288, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 2099,...
2.667323
508
from output.models.ms_data.additional.member_type002_xsd.member_type002 import ( Ct, Root, ) __all__ = [ "Ct", "Root", ]
[ 6738, 5072, 13, 27530, 13, 907, 62, 7890, 13, 2860, 1859, 13, 19522, 62, 4906, 21601, 62, 87, 21282, 13, 19522, 62, 4906, 21601, 1330, 357, 198, 220, 220, 220, 43166, 11, 198, 220, 220, 220, 20410, 11, 198, 8, 198, 198, 834, 439, ...
2.15625
64
from enum import Enum import pytest from pytest import approx from cdpy import cdp @pytest.fixture @pytest.fixture @pytest.fixture @pytest.fixture @pytest.fixture
[ 6738, 33829, 1330, 2039, 388, 198, 198, 11748, 12972, 9288, 198, 6738, 12972, 9288, 1330, 5561, 198, 198, 6738, 22927, 9078, 1330, 22927, 79, 628, 198, 31, 9078, 9288, 13, 69, 9602, 628, 198, 31, 9078, 9288, 13, 69, 9602, 628, 198, ...
2.661765
68
# Copyright (C) 2018-2020 The python-bitcoin-utils developers # # This file is part of python-bitcoin-utils # # It is subject to the license terms in the LICENSE file found in the top-level # directory of this distribution. # # No part of python-bitcoin-utils, including this file, may be copied, modified, # propagated,...
[ 2, 15069, 357, 34, 8, 2864, 12, 42334, 383, 21015, 12, 35395, 12, 26791, 6505, 198, 2, 198, 2, 770, 2393, 318, 636, 286, 21015, 12, 35395, 12, 26791, 198, 2, 198, 2, 632, 318, 2426, 284, 262, 5964, 2846, 287, 262, 38559, 24290, ...
2.328098
9,296
import argparse import sys import os import data_utils import numpy as np from torch import Tensor from torch.utils.data import DataLoader from torchvision import transforms import yaml import torch from torch import nn from model import RawGAT_ST # In main model script we used our best RawGAT-ST-mul model. To use oth...
[ 11748, 1822, 29572, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 1366, 62, 26791, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 28034, 1330, 309, 22854, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 6060, 17401, 198, 6738, 28034, 101...
2.356556
2,799
# %% # Import needed libraries and modules import napari import numpy as np from dask_image.imread import imread from skimage import filters, morphology # %% # Use dask to read the image files, which permits for lazy loading. all_samples = imread("./fiber_data/*.jpg") # set the scale in micron per pixel of the images...
[ 2, 43313, 198, 2, 17267, 2622, 12782, 290, 13103, 198, 198, 11748, 25422, 2743, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 288, 2093, 62, 9060, 13, 320, 961, 1330, 545, 961, 198, 6738, 1341, 9060, 1330, 16628, 11, 46320, 198, 198,...
3.09292
452
import argparse import numpy as np import pandas as pd from utils import bulid_dataset from keras.models import Model,Input from keras.layers import LSTM,Embedding,Dense,TimeDistributed,Dropout,Bidirectional from keras_contrib.layers import CRF from keras_contrib.utils import save_load_utils import matplotlib.pyplot a...
[ 11748, 1822, 29572, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 3384, 4487, 1330, 4807, 312, 62, 19608, 292, 316, 198, 6738, 41927, 292, 13, 27530, 1330, 9104, 11, 20560, 198, 6738, 41927, 292, ...
2.003125
960
import time import json from AWSIoTPythonSDK.MQTTLib import AWSIoTMQTTShadowClient #awshost you got from `aws iot describe-endpoint` awshost = "a134g88szk3vbi.iot.us-east-1.amazonaws.com" # Edit this to be your device name in the AWS IoT console thing = "raspberry_pi2" awsport = 8883 caPath = "/home/levon/iot_keys/...
[ 11748, 640, 198, 11748, 33918, 198, 198, 6738, 14356, 11584, 78, 7250, 7535, 10305, 42, 13, 49215, 51, 14990, 571, 1330, 14356, 11584, 78, 15972, 48, 15751, 27447, 11792, 198, 198, 2, 707, 1477, 455, 345, 1392, 422, 4600, 8356, 1312, ...
2.918367
392
# Generated by Django 2.2.8 on 2021-01-22 08:02 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 23, 319, 33448, 12, 486, 12, 1828, 8487, 25, 2999, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
''' Within this script, focus to convert given set of frames to a video. Requirements ---- You require OpenCV 3.2 to be installed. Run ---- If need to run this script seperately, then can edit the relevant input file path and output file path. If need to use this script within another code then can import the script...
[ 7061, 6, 198, 22005, 428, 4226, 11, 2962, 284, 10385, 1813, 900, 286, 13431, 284, 257, 2008, 13, 198, 198, 42249, 198, 650, 198, 1639, 2421, 4946, 33538, 513, 13, 17, 284, 307, 6589, 13, 198, 198, 10987, 198, 650, 198, 1532, 761, ...
3.607692
130
from .base import Grouper from .pointwise_grouper import PointwiseGrouper __all__ = ["pointwise_grouper"]
[ 6738, 764, 8692, 1330, 402, 472, 525, 198, 6738, 764, 4122, 3083, 62, 70, 472, 525, 1330, 6252, 3083, 38, 472, 525, 198, 198, 834, 439, 834, 796, 14631, 4122, 3083, 62, 70, 472, 525, 8973, 198 ]
2.891892
37
import subprocess import matplotlib matplotlib.use('AGG') import svgutils.transform as sg from svgutils.templates import VerticalLayout import matplotlib.pyplot as plt import numpy as np import os import os.path try: figs = [] for i in range(2): figs.append(plt.figure()) plt.plot(np.random.ra...
[ 11748, 850, 14681, 198, 11748, 2603, 29487, 8019, 198, 6759, 29487, 8019, 13, 1904, 10786, 4760, 38, 11537, 628, 198, 11748, 38487, 70, 26791, 13, 35636, 355, 264, 70, 198, 6738, 38487, 70, 26791, 13, 11498, 17041, 1330, 38937, 32517, 1...
2.255172
435
#! /usr/bin/python # -*- coding: utf-8 -*- # ------------------------------------------------------------------------- # cdb_python_create.py # # Mar/26/2013 # ------------------------------------------------------------------------- import sys reload(sys) sys.setdefaultencoding('utf-8') import json sys.path.appen...
[ 2, 0, 1220, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 16529, 45537, 198, 2, 197, 66, 9945, 62, 29412, 62, 17953, 13, 9078, 198, 2, 198, 2, 197, 197, 197, 197, 197, 197, ...
3.666667
234
import numpy as np from deepscratch.models.initializers.initialization import Initialization
[ 11748, 299, 32152, 355, 45941, 198, 6738, 2769, 1416, 36722, 13, 27530, 13, 36733, 11341, 13, 36733, 1634, 1330, 20768, 1634, 198 ]
4.227273
22
__author__ = 'CwT' import struct
[ 834, 9800, 834, 796, 705, 34, 86, 51, 6, 198, 11748, 2878, 198 ]
2.538462
13
from transformers import PegasusForConditionalGeneration, PegasusTokenizer from .base_single_doc_model import SingleDocSummModel
[ 6738, 6121, 364, 1330, 48188, 1890, 25559, 1859, 8645, 341, 11, 48188, 30642, 7509, 198, 6738, 764, 8692, 62, 29762, 62, 15390, 62, 19849, 1330, 14206, 23579, 13065, 76, 17633, 628 ]
4.193548
31
<<<<<<< HEAD """"Test Code""" take = solution()[0] halves = solution()[1] print(take(5, halves())) ======= >>>>>>> d79c1c8db2dfefe6e4c829e5cb5aa8db78b2579e
[ 198, 198, 16791, 16791, 16791, 27, 39837, 198, 15931, 15931, 14402, 6127, 37811, 198, 20657, 796, 4610, 3419, 58, 15, 60, 198, 14201, 1158, 796, 4610, 3419, 58, 16, 60, 198, 4798, 7, 20657, 7, 20, 11, 37192, 3419, 4008, 198, 1421, 1...
2.106667
75
# Copyright (C) 2019 Wenhua Wang # # This file is part of QuantLibExt, which is an extension to the # free-software/open-source quantitative library QuantLib - http://quantlib.org/ # # QuantLibExt is free software: you can redistribute it and/or modify it # under the terms of the BSD license. # # QuantLib's license is ...
[ 2, 15069, 357, 34, 8, 13130, 370, 16550, 6413, 15233, 198, 2, 198, 2, 770, 2393, 318, 636, 286, 16972, 25835, 11627, 11, 543, 318, 281, 7552, 284, 262, 198, 2, 1479, 12, 43776, 14, 9654, 12, 10459, 26610, 5888, 16972, 25835, 532, ...
3.646766
201
from common.scripts.cleaning import map_priority
[ 6738, 2219, 13, 46521, 13, 2375, 7574, 1330, 3975, 62, 49336, 628 ]
4.166667
12
# Generated by Django 2.0.4 on 2018-06-12 07:40 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 362, 13, 15, 13, 19, 319, 2864, 12, 3312, 12, 1065, 8753, 25, 1821, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.766667
30
from django.db import models # Create your models here. from datetime import date from django.urls import reverse from django.contrib.auth.models import User from ckeditor.fields import RichTextField from django_resized import ResizedImageField
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 198, 2, 13610, 534, 4981, 994, 13, 198, 6738, 4818, 8079, 1330, 3128, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330...
3.555556
72
import generation as gn import tree as tr import generator as gtr import math import sys #xs = [-5,-3,-2,-1,2,6,7] #ys = [64,26,13,4,1,53,76] # 2x^2 - 3x - 1 xs = [-1, 1, 0, 3, -2, 0, -1, 3, 2, -2] ys = [1, 1, 0, 2, -2, 5, 3, -1, 5, -4] zs = [3, 3, 1, 12, 3, 6, 5, 9, 10, 1] # x^2 + y + 1 if __name__ == "__main__": ...
[ 11748, 5270, 355, 19967, 198, 11748, 5509, 355, 491, 198, 11748, 17301, 355, 308, 2213, 198, 11748, 10688, 198, 11748, 25064, 198, 198, 2, 34223, 796, 25915, 20, 12095, 18, 12095, 17, 12095, 16, 11, 17, 11, 21, 11, 22, 60, 198, 2, ...
1.869318
176
# Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None
[ 2, 30396, 329, 257, 13934, 5509, 10139, 13, 198, 2, 1398, 12200, 19667, 25, 198, 2, 220, 220, 220, 220, 825, 11593, 15003, 834, 7, 944, 11, 2124, 2599, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 2100, 796, 2124, 1...
2.16
75
import logging from typing import Dict, List, Optional from great_expectations.core.usage_statistics.anonymizers.anonymizer import Anonymizer from great_expectations.core.usage_statistics.util import ( aggregate_all_core_expectation_types, ) from great_expectations.rule_based_profiler.config.base import RuleBasedP...
[ 11748, 18931, 198, 6738, 19720, 1330, 360, 713, 11, 7343, 11, 32233, 198, 198, 6738, 1049, 62, 1069, 806, 602, 13, 7295, 13, 26060, 62, 14269, 3969, 13, 272, 5177, 11341, 13, 272, 5177, 7509, 1330, 1052, 5177, 7509, 198, 6738, 1049, ...
3.315789
133
""" These code are inspired by: - https://cs231n.github.io/neural-networks-case-study/ """ import numpy as np if __name__ == "__main__": X, y = generate_spiral_data(n_points_per_class=100, n_classes=2, visualization=False)
[ 37811, 198, 4711, 2438, 389, 7867, 416, 25, 198, 220, 220, 220, 532, 3740, 1378, 6359, 25667, 77, 13, 12567, 13, 952, 14, 710, 1523, 12, 3262, 5225, 12, 7442, 12, 44517, 14, 198, 37811, 198, 11748, 299, 32152, 355, 45941, 628, 628, ...
2.629213
89
# -*- coding: utf-8 -*- import os import importlib from cnab240.registro import Registros cwd = os.path.abspath(os.path.dirname(__file__)) nome_bancos = (fname for fname in os.listdir(cwd) if os.path.isdir(os.path.join(cwd, fname)) and not fname.startswith('__')) for nome_banco in nome_bancos: ba...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 28686, 198, 11748, 1330, 8019, 198, 198, 6738, 269, 77, 397, 16102, 13, 2301, 396, 305, 1330, 13811, 4951, 198, 198, 66, 16993, 796, 28686, 13, 6978, 13, 3...
2.285156
256
#!/usr/bin/env python3 """ Find Code Usage: fc.py [options] <search-regex> Options: --debug Print debugging info while program is running -m --modules Search for the names of scripts or modules (minus filename extension) instead of for items in files....
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 37811, 198, 16742, 6127, 198, 198, 28350, 25, 198, 220, 220, 220, 277, 66, 13, 9078, 685, 25811, 60, 1279, 12947, 12, 260, 25636, 29, 198, 198, 29046, 25, 198, 220, 220, 220, 1...
2.125166
2,261
# Copyright 2019 Brian T. Park # # MIT License """ Implements the TestDataGenerator to generate the validation test data using acetz, which uses Python ZoneProcessor class. Pulling in ZoneProcessor also means that it pulls in the data structures defined by zonedb. """ from typing import Dict from typing import List f...
[ 2, 15069, 13130, 8403, 309, 13, 3250, 198, 2, 198, 2, 17168, 13789, 198, 198, 37811, 198, 3546, 1154, 902, 262, 6208, 6601, 8645, 1352, 284, 7716, 262, 21201, 1332, 1366, 1262, 198, 23253, 89, 11, 543, 3544, 11361, 13035, 18709, 273, ...
2.325229
3,496
DOMAIN = "centrometal_boiler" WEB_BOILER_CLIENT = "web_boiler_client" WEB_BOILER_SYSTEM = "web_boiler_system" WEB_BOILER_LOGIN_RETRY_INTERVAL = 60 WEB_BOILER_REFRESH_INTERVAL = 600
[ 39170, 29833, 796, 366, 1087, 398, 316, 282, 62, 2127, 5329, 1, 198, 8845, 33, 62, 8202, 4146, 1137, 62, 5097, 28495, 796, 366, 12384, 62, 2127, 5329, 62, 16366, 1, 198, 8845, 33, 62, 8202, 4146, 1137, 62, 23060, 25361, 796, 366, ...
2.116279
86
# pylint: disable=unused-argument,invalid-name,line-too-long import logging from itertools import zip_longest from pathlib import Path from typing import List, Optional, Set, Type, TypeVar from alembic.autogenerate import comparators from alembic.autogenerate.api import AutogenContext from flupy import flu from sqlalc...
[ 2, 279, 2645, 600, 25, 15560, 28, 403, 1484, 12, 49140, 11, 259, 12102, 12, 3672, 11, 1370, 12, 18820, 12, 6511, 198, 11748, 18931, 198, 6738, 340, 861, 10141, 1330, 19974, 62, 6511, 395, 198, 6738, 3108, 8019, 1330, 10644, 198, 673...
2.750586
3,412
import argparse import os import matplotlib import torch from torch.backends import cudnn import evaluate from supervised_solver import SupervisedSolver from cam_solver import CAMSolver if __name__ == '__main__': parser = argparse.ArgumentParser() # Train configuration. parser.add_argument('--image_s...
[ 11748, 1822, 29572, 198, 11748, 28686, 198, 198, 11748, 2603, 29487, 8019, 198, 11748, 28034, 198, 6738, 28034, 13, 1891, 2412, 1330, 269, 463, 20471, 198, 198, 11748, 13446, 198, 6738, 28679, 62, 82, 14375, 1330, 3115, 16149, 50, 14375, ...
2.764
1,000
"""Workflow client exception classes""" from typing import Any, Dict, Set from .enums import ExecutionStatus class WorkflowClientError(Exception): """Base class for workflow client errors""" pass class WorkflowDoesNotExist(WorkflowClientError): """Raised when a workflow does not exist in AWS Step Func...
[ 37811, 12468, 11125, 5456, 6631, 6097, 37811, 198, 6738, 19720, 1330, 4377, 11, 360, 713, 11, 5345, 198, 198, 6738, 764, 268, 5700, 1330, 37497, 19580, 628, 198, 4871, 5521, 11125, 11792, 12331, 7, 16922, 2599, 198, 220, 220, 220, 37227...
2.587786
1,048
# -*- coding:utf-8 -*- from mako import runtime, filters, cache UNDEFINED = runtime.UNDEFINED STOP_RENDERING = runtime.STOP_RENDERING __M_dict_builtin = dict __M_locals_builtin = locals _magic_number = 10 _modified_time = 1468813642.546569 _enable_loop = True _template_filename = '/home/sumukh/Documents/thesis/Cyberweb...
[ 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 6738, 285, 25496, 1330, 19124, 11, 16628, 11, 12940, 198, 4944, 7206, 20032, 1961, 796, 19124, 13, 4944, 7206, 20032, 1961, 198, 2257, 3185, 62, 49, 10619, 1137, 2751, 796, ...
2.410995
382
import unittest from streak_test_case import StreakTestCase
[ 11748, 555, 715, 395, 198, 198, 6738, 15113, 62, 9288, 62, 7442, 1330, 9737, 461, 14402, 20448, 198 ]
3.388889
18
import requests import urllib def call_server(): """Does a simple server call, and returns whatever the server returns.""" call_url = server_url + '/tests/test_connection' r = requests.get(call_url) return r.text
[ 11748, 7007, 198, 11748, 2956, 297, 571, 198, 198, 4299, 869, 62, 15388, 33529, 198, 220, 220, 220, 37227, 13921, 257, 2829, 4382, 869, 11, 290, 5860, 4232, 262, 4382, 5860, 526, 15931, 198, 220, 220, 220, 869, 62, 6371, 796, 4382, ...
3.08
75
import psycopg2 import os from os import environ import json from datetime import datetime # Global vars below username = os.environ.get('DATABASE_USERNAME', None) access_key = os.environ.get('DATABASE_PASS', None) database_endpoint= os.environ.get('DATABASE_ENDPOINT', None)
[ 11748, 17331, 22163, 70, 17, 198, 11748, 28686, 198, 6738, 28686, 1330, 551, 2268, 198, 11748, 33918, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 2, 8060, 410, 945, 2174, 198, 198, 29460, 796, 28686, 13, 268, 2268, 13, 1136, 10786, ...
2.82
100
import numpy as np def hamming_loss(x, y, thread=0.5): """ :param x: the predicted outputs of the classifier, the output of the ith instance for the jth class is stored in x(i,j) :param y: the actual labels of the instances, if the ith instance belong to the jth class, y(i,j)=1, otherwise y(i,j)=0 :r...
[ 11748, 299, 32152, 355, 45941, 628, 198, 198, 4299, 8891, 2229, 62, 22462, 7, 87, 11, 331, 11, 4704, 28, 15, 13, 20, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1058, 17143, 2124, 25, 262, 11001, 23862, 286, 262, 1398, 74...
2.498294
293
# Adapted from # Copyright (c) Aishwarya Kamath & Nicolas Carion. Licensed under the Apache License 2.0. All Rights Reserved # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved """ TubeDETR model and criterion classes. """ from typing import Dict, Optional import torch import torch.distributed impor...
[ 2, 30019, 276, 422, 198, 2, 15069, 357, 66, 8, 317, 680, 86, 43898, 12670, 776, 1222, 29737, 1879, 295, 13, 49962, 739, 262, 24843, 13789, 362, 13, 15, 13, 1439, 6923, 33876, 198, 2, 15069, 357, 66, 8, 3203, 11, 3457, 13, 290, 6...
1.952524
9,015
# coding=utf-8 # Copyright 2020 The TensorFlow Datasets Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 12131, 383, 309, 22854, 37535, 16092, 292, 1039, 46665, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 77...
3.036424
1,812
import subprocess import parmed from .template import default_force_field, leap_template from .utils import easy_call def run_tleap(parm, ns_names, gaplist, sslist, leap_input=None): # adapted from amber_adaptbx code in phenix ''' Parameters ---------- parm : parmed.Structure ns_names : List...
[ 11748, 850, 14681, 198, 11748, 1582, 1150, 198, 6738, 764, 28243, 1330, 4277, 62, 3174, 62, 3245, 11, 16470, 62, 28243, 198, 6738, 764, 26791, 1330, 2562, 62, 13345, 628, 198, 198, 4299, 1057, 62, 7100, 499, 7, 79, 1670, 11, 36545, ...
2.060842
641
# -*-coding:utf8 -*- import os, requests, json, threading, datetime, webbrowser import tkinter.messagebox from io import BytesIO from tkinter import * # 使用Tkinter前需要先导入 from tkinter import ttk from PIL import ImageTk, Image from tkinter.ttk import Separator, Combobox # 获取今日时间戳 today_time = datetime.datetime.now().st...
[ 2, 220, 532, 9, 12, 66, 7656, 25, 40477, 23, 532, 9, 12, 198, 11748, 28686, 11, 7007, 11, 33918, 11, 4704, 278, 11, 4818, 8079, 11, 3992, 40259, 198, 11748, 256, 74, 3849, 13, 20500, 3524, 198, 6738, 33245, 1330, 2750, 4879, 9399,...
1.410688
1,366
#or gate class from myhdl import *
[ 2, 273, 8946, 1398, 198, 6738, 616, 71, 25404, 1330, 1635, 198 ]
2.916667
12
# Generated by Django 2.1.7 on 2019-09-10 17:44 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 362, 13, 16, 13, 22, 319, 13130, 12, 2931, 12, 940, 1596, 25, 2598, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.766667
30
from .store import config, open_group, clone_store from .dataloader import select, help
[ 6738, 764, 8095, 1330, 4566, 11, 1280, 62, 8094, 11, 17271, 62, 8095, 198, 6738, 764, 67, 10254, 1170, 263, 1330, 2922, 11, 1037, 198 ]
3.52
25
import logging import os from os.path import isfile, join import numpy as np from data_io import file_reading from data_io import x_y_spliting #import matplotlib.pyplot as plt if __name__ == '__main__': #data_file = '../../data/gesture_data/processed_data/data.txt_trainTest10/train_0.txt' #data_file = '.....
[ 11748, 18931, 198, 11748, 28686, 198, 6738, 28686, 13, 6978, 1330, 318, 7753, 11, 4654, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 1366, 62, 952, 1330, 2393, 62, 25782, 198, 6738, 1366, 62, 952, 1330, 2124, 62, 88, 62, 22018, 1780...
2.29171
953
from pm4py.objects.log.importer.xes import importer as xes_importer
[ 6738, 9114, 19, 9078, 13, 48205, 13, 6404, 13, 320, 26634, 13, 48169, 1330, 848, 4337, 355, 2124, 274, 62, 320, 26634, 628 ]
3
23
#!/usr/bin/env python -i import os import string import sys import random import threading import getopt thread_list = [] print('This program will process 5 files at a time Max') for x in range(1, 6): file__IO = input('\tEnter file name here to analize with path:: ') t = threading.Thread(target=cat) thre...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 532, 72, 198, 11748, 28686, 198, 11748, 4731, 198, 11748, 25064, 198, 11748, 4738, 198, 11748, 4704, 278, 198, 11748, 651, 8738, 198, 198, 16663, 62, 4868, 796, 17635, 198, 198, 4798, 10786, ...
2.87931
174
__version__ = "0.14.dev0"
[ 834, 9641, 834, 796, 366, 15, 13, 1415, 13, 7959, 15, 1, 198 ]
2
13
# Generated by Django 3.1.10 on 2021-06-21 08:40 from django.db import migrations from django.db import models
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 940, 319, 33448, 12, 3312, 12, 2481, 8487, 25, 1821, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 628 ]
2.973684
38
""" A collection of back end subroutines (mostly SQL queries). This module contains the routines to deal with the monitoring sources, provided by the user via the command line. """ import logging, sys from tkp.db import execute as execute from tkp.db.associations import _empty_temprunningcatalog as _del_tempruncat fr...
[ 37811, 198, 32, 4947, 286, 736, 886, 850, 81, 448, 1127, 357, 29471, 16363, 20743, 737, 198, 198, 1212, 8265, 4909, 262, 31878, 284, 1730, 351, 262, 9904, 198, 82, 2203, 11, 2810, 416, 262, 2836, 2884, 262, 3141, 1627, 13, 198, 3781...
1.948373
7,961
""" LC 2155 You are given a 0-indexed binary array nums of length n. nums can be divided at index i (where 0 <= i <= n) into two arrays (possibly empty) numsleft and numsright: numsleft has all the elements of nums between index 0 and i - 1 (inclusive), while numsright has all the elements of nums between index i and ...
[ 37811, 198, 5639, 362, 18742, 198, 1639, 389, 1813, 257, 657, 12, 9630, 276, 13934, 7177, 997, 82, 286, 4129, 299, 13, 997, 82, 460, 307, 9086, 379, 6376, 1312, 357, 3003, 657, 19841, 1312, 19841, 299, 8, 656, 734, 26515, 357, 39363...
2.692612
758
#!/usr/bin/env python3 # fileencoding=utf-8
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 2393, 12685, 7656, 28, 40477, 12, 23, 198 ]
2.315789
19
# from allauth.account.views import confirm_email from django.conf import settings from django.contrib import admin from django.urls import path, include from drf_yasg import openapi from drf_yasg.views import get_schema_view from rest_framework import permissions from django.conf.urls.static import static # swagger f...
[ 2, 422, 477, 18439, 13, 23317, 13, 33571, 1330, 6216, 62, 12888, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 11, 2291, 198, 67...
2.772436
624
from gym.envs.zxstock import AtariEnv
[ 6738, 11550, 13, 268, 14259, 13, 42592, 13578, 1330, 35884, 4834, 85, 198 ]
2.923077
13
#!/usr/bin/env python import csv import rospy import rospkg import roslaunch from interaccion.msg import * from std_msgs.msg import String, Bool, Empty if __name__ == "__main__": try: rosp = rospkg.RosPack() path = rosp.get_path('interaccion') # Ruta del directorio para guardar # los d...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 269, 21370, 198, 11748, 686, 2777, 88, 198, 11748, 686, 2777, 10025, 198, 11748, 686, 6649, 11429, 198, 6738, 987, 4134, 295, 13, 19662, 1330, 1635, 198, 6738, 14367, 62, 9...
1.993088
434
#!/usr/bin/env python # -*- coding: utf-8 -*- """ PyperApp - it all starts here. PyperCard inspired applications in your browser via Brython. This module provides commands for users to set up everything and carry our common tasks. As `manage.py` is to Django, so `pypr` is to PyperApp. Copyright © 2020 Nicholas H.Tol...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 20519, 525, 4677, 532, 340, 477, 4940, 994, 13, 198, 198, 20519, 525, 16962, 7867, 5479, 287, 534, 6...
3.033934
1,444
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 2864, 383, 3012, 9552, 15417, 4816, 46665, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393,...
2.305952
2,033
from conans import ConanFile, tools, CMake from conans.errors import ConanInvalidConfiguration import os
[ 6738, 369, 504, 1330, 31634, 8979, 11, 4899, 11, 327, 12050, 198, 6738, 369, 504, 13, 48277, 1330, 31634, 44651, 38149, 198, 11748, 28686, 628 ]
4.24
25
import numpy as np import pytest from npe2 import DynamicPlugin from qtpy.QtWidgets import QLabel, QRadioButton from napari._qt.dialogs.qt_reader_dialog import ( QtReaderDialog, open_with_dialog_choices, prepare_remaining_readers, ) from napari.errors.reader_errors import ReaderPluginError from napari.sett...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 12972, 9288, 198, 6738, 299, 431, 17, 1330, 26977, 37233, 198, 6738, 10662, 83, 9078, 13, 48, 83, 54, 312, 11407, 1330, 1195, 33986, 11, 1195, 26093, 21864, 198, 198, 6738, 25422, 2743, 13557, ...
2.906977
129
import torch import numpy as np from torch import nn class ActorConv(nn.Module): """ The actor and critic share a convolutional network, which encodes the local map into a vector. Then the actor and critic combines the """ class CriticConv(nn.Module): """ The actor and critic share a convolut...
[ 11748, 28034, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 28034, 1330, 299, 77, 198, 198, 4871, 27274, 3103, 85, 7, 20471, 13, 26796, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 383, 8674, 290, 4014, 2648, 257, 3063, 2122,...
3.255639
133
import time import serial def send_serial_cmd(print_prefix, command): """ function for sending serial commands to the OPS module """ data_for_send_str = command data_for_send_bytes = str.encode(data_for_send_str) print(print_prefix, command) ser.write(data_for_send_bytes) # initialize ...
[ 11748, 640, 198, 11748, 11389, 628, 198, 4299, 3758, 62, 46911, 62, 28758, 7, 4798, 62, 40290, 11, 3141, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 2163, 329, 7216, 11389, 9729, 284, 262, 40490, 8265, 198, 220, 220, 220, 3...
2.284247
1,168
# Copyright (c) Aaron Gallagher <_@habnab.it> # See COPYING for details. import six from parsley import makeProtocol, stack from twisted.internet.error import ConnectionLost, ConnectionRefusedError from twisted.internet import defer, protocol from twisted.python import failure, log from twisted.trial import unittest ...
[ 2, 15069, 357, 66, 8, 12139, 38580, 1279, 62, 31, 5976, 77, 397, 13, 270, 29, 198, 2, 4091, 27975, 45761, 329, 3307, 13, 198, 198, 11748, 2237, 198, 198, 6738, 13544, 1636, 1330, 787, 19703, 4668, 11, 8931, 198, 6738, 19074, 13, 3...
3.244898
294