content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
from rest_framework import serializers from core.models import CarbureLot, CarbureLotEvent, CarbureLotComment, CarbureNotification, CarbureStock, CarbureStockTransformation, Depot, Entity, EntityCertificate, EntityDepot, GenericCertificate, GenericError, SustainabilityDeclaration from doublecount.serializers import Bi...
[ 6738, 1334, 62, 30604, 1330, 11389, 11341, 198, 198, 6738, 4755, 13, 27530, 1330, 20453, 495, 48601, 11, 20453, 495, 48601, 9237, 11, 20453, 495, 48601, 21357, 11, 20453, 495, 3673, 2649, 11, 20453, 495, 26207, 11, 20453, 495, 26207, 82...
4.226415
106
""" Writes the energy transfer section of a MESS input file """ import os from ioformat import build_mako_str # OBTAIN THE PATH TO THE DIRECTORY CONTAINING THE TEMPLATES # SRC_PATH = os.path.dirname(os.path.realpath(__file__)) TEMPLATE_PATH = os.path.join(SRC_PATH, 'templates') SECTION_PATH = os.path.join(TEMPLATE_P...
[ 37811, 198, 20257, 274, 262, 2568, 4351, 2665, 286, 257, 337, 7597, 5128, 2393, 198, 37811, 198, 198, 11748, 28686, 198, 6738, 33245, 18982, 1330, 1382, 62, 76, 25496, 62, 2536, 628, 198, 2, 25334, 30339, 3336, 46490, 5390, 3336, 42242,...
2.306612
1,210
# Based on: http://www.djangosnippets.org/snippets/73/ # # Modified by Sean Reifschneider to be smarter about surrounding page # link context. For usage documentation see: # # http://www.tummy.com/Community/Articles/django-pagination/ from django import template register = template.Library() def paginator(c...
[ 2, 220, 13403, 319, 25, 2638, 1378, 2503, 13, 28241, 648, 418, 77, 3974, 1039, 13, 2398, 14, 16184, 3974, 1039, 14, 4790, 14, 198, 2, 198, 2, 220, 40499, 416, 11465, 797, 361, 20601, 710, 1304, 284, 307, 23714, 546, 7346, 2443, 19...
2.53022
728
import numpy as np
[ 11748, 299, 32152, 355, 45941, 628, 198 ]
3
7
from sentence_transformers.util import batch_to_device from torch import Tensor import pytorch_lightning as pl from torch import nn, sigmoid, tensor from torchmetrics import Accuracy, F1, Recall, Precision, MatthewsCorrcoef, StatScores from sentence_transformers import SentenceTransformer import transformers import tor...
[ 6738, 6827, 62, 35636, 364, 13, 22602, 1330, 15458, 62, 1462, 62, 25202, 198, 6738, 28034, 1330, 309, 22854, 198, 11748, 12972, 13165, 354, 62, 2971, 768, 355, 458, 198, 6738, 28034, 1330, 299, 77, 11, 264, 17225, 1868, 11, 11192, 273...
3.639344
122
#!/usr/bin/env python # -*- coding: utf-8 -*- import vtk if __name__ == '__main__': main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 410, 30488, 628, 628, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, ...
2.102041
49
from app import create_app from app.models.user import User from flask_script import Manager, Server app = create_app('production') manager = Manager(app) server = Server(port=9527) manager.add_command("run", server) @manager.command @manager.command def adduser(user_name, email, role=2): """ Register a...
[ 6738, 598, 1330, 2251, 62, 1324, 198, 6738, 598, 13, 27530, 13, 7220, 1330, 11787, 198, 6738, 42903, 62, 12048, 1330, 9142, 11, 9652, 198, 198, 1324, 796, 2251, 62, 1324, 10786, 25493, 11537, 198, 37153, 796, 9142, 7, 1324, 8, 198, ...
2.802158
278
# coding:utf-8 # # Author: Lucas Airam Castro de Souza # Laboratory: Grupo de Teleinformática e Automação # University: Universidade Federal do Rio de Janeiro # # # # # # # # # Usage: python pkt2csv.py <pcap_path> <path_to_write> <pcap_class> -1 or 1 import pickle import pyshark import sys pcap_file = pyshark.File...
[ 2, 19617, 25, 40477, 12, 23, 198, 2, 220, 198, 2, 6434, 25, 15257, 3701, 321, 21193, 390, 22862, 4496, 198, 2, 18643, 25, 25665, 7501, 390, 14318, 259, 687, 6557, 83, 3970, 304, 5231, 6086, 16175, 28749, 198, 2, 2059, 25, 26986, 3...
2.113438
573
from django.core.urlresolvers import reverse, reverse_lazy from django.http import HttpResponseRedirect from django.views.generic import TemplateView, DetailView, CreateView from django.shortcuts import get_object_or_404, redirect from allauth.account.adapter import get_adapter from allauth.socialaccount.models import...
[ 6738, 42625, 14208, 13, 7295, 13, 6371, 411, 349, 690, 1330, 9575, 11, 9575, 62, 75, 12582, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 7738, 1060, 198, 6738, 42625, 14208, 13, 33571, 13, 41357, 1330, 37350, 7680, 11, ...
3.38191
199
import click import gym from pynput import keyboard from pynput.keyboard import Key from stable_baselines3 import DQN from stable_baselines3.dqn import MlpPolicy from stable_baselines3.common.env_util import make_vec_env from stable_baselines3.common.env_checker import check_env @click.command() @click.option('-m', '...
[ 11748, 3904, 198, 11748, 11550, 198, 6738, 279, 2047, 1996, 1330, 10586, 198, 6738, 279, 2047, 1996, 13, 2539, 3526, 1330, 7383, 198, 6738, 8245, 62, 12093, 20655, 18, 1330, 360, 48, 45, 198, 6738, 8245, 62, 12093, 20655, 18, 13, 4950...
2.608696
368
from threading import Lock from copy import deepcopy
[ 6738, 4704, 278, 1330, 13656, 198, 6738, 4866, 1330, 2769, 30073, 198, 220, 220, 220, 220, 220, 220, 220, 220 ]
3.05
20
from setuptools import setup from glob import glob import os package_name = 'vt_steering_controller' setup( name=package_name, version='1.0.0', packages=[package_name], data_files=[ ('share/ament_index/resource_index/packages', ['resource/' + package_name]), ('share/' + pac...
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 6738, 15095, 1330, 15095, 198, 11748, 28686, 198, 198, 26495, 62, 3672, 796, 705, 36540, 62, 4169, 1586, 62, 36500, 6, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 28, 26495, 62, 3672, 11, ...
2.477477
333
import pytest from . import polite tv_id = 1418 # The Big Bang Theory season_number = 12 episode_number = 1 @polite @polite @polite @pytest.mark.parametrize("with_guest_session", [True, False]) @polite @pytest.mark.parametrize("with_guest_session", [True, False]) @polite @polite @polite @polite @p...
[ 11748, 12972, 9288, 198, 198, 6738, 764, 1330, 23507, 628, 198, 14981, 62, 312, 796, 1478, 1507, 220, 1303, 383, 4403, 9801, 17003, 198, 6230, 62, 17618, 796, 1105, 198, 38668, 62, 17618, 796, 352, 628, 198, 31, 16104, 578, 628, 198, ...
2.527132
129
# -*- coding: utf-8 -*- """Test data_util :mod:`~utilipy.data_utils.decorators`.""" __all__ = [ "test_idxDecorator_standard", "test_idxDecorator_defaults", "test_idxDecorator_new_decorator", "test_idxDecorator_existing_function", ] ###################################################################...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 14402, 1366, 62, 22602, 1058, 4666, 25, 63, 93, 22602, 541, 88, 13, 7890, 62, 26791, 13, 12501, 273, 2024, 63, 526, 15931, 628, 198, 834, 439, 834, 796, ...
3.193961
861
from forum.models import Question
[ 6738, 10041, 13, 27530, 1330, 18233 ]
5.5
6
import logging import os import secrets import socket import sys from timeit import default_timer as timer from urllib import request import yaml logging.basicConfig(level=logging.DEBUG, # Use Jormungandr logging format format='%(asctime)s.%(msecs)03d %(levelname)-8s %(message...
[ 11748, 18931, 198, 11748, 28686, 198, 11748, 13141, 198, 11748, 17802, 198, 11748, 25064, 198, 6738, 640, 270, 1330, 4277, 62, 45016, 355, 19781, 198, 6738, 2956, 297, 571, 1330, 2581, 198, 198, 11748, 331, 43695, 628, 198, 6404, 2667, ...
2.372215
1,526
import os os.system("cls") #limpa janela terminal antes da execução sexo = str(input("Informe seu sexo: [M/F] ")).strip().upper()[0] while sexo not in 'MmFf': print(sexo) sexo = str(input("Dados inválidos. Informe seu sexo: [M/F] ")).strip().upper()[0] print(f'Sexo {sexo} registrado com sucesso!')
[ 11748, 28686, 198, 418, 13, 10057, 7203, 565, 82, 4943, 1303, 2475, 8957, 42897, 10304, 12094, 1885, 274, 12379, 2452, 84, 16175, 28749, 198, 198, 8044, 78, 796, 965, 7, 15414, 7203, 818, 687, 68, 384, 84, 1714, 78, 25, 685, 44, 14,...
2.246377
138
#!/usr/bin/env python # -*- coding:utf-8 -*- # Author: Xiangtai(lxtpku@pku.edu.cn) # Implementation of Paper Learning a Discriminative Feature Network for Semantic Segmentation (CVPR2018)(face_plus_plus) import torch import torch.nn as nn from model.resnet import resnet101 #from torchvision.models import resnet101 _...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 2, 6434, 25, 45641, 83, 1872, 7, 75, 742, 79, 23063, 31, 79, 23063, 13, 15532, 13, 31522, 8, 198, 2, 46333, 286, 14962...
2.604444
225
import sqlite3 as lite con = lite.connect('JobDetails.db') cur = con.cursor() cur.execute("SELECT ReviewID, DateRange FROM Reviews") results = cur.fetchall() for result in results: rID = result[0] r = result[1] split = r.split("-") slash = r.split("/") if len(split) == 1: years = str(2...
[ 11748, 44161, 578, 18, 355, 300, 578, 198, 198, 1102, 796, 300, 578, 13, 8443, 10786, 33308, 24259, 13, 9945, 11537, 198, 22019, 796, 369, 13, 66, 21471, 3419, 198, 198, 22019, 13, 41049, 7203, 46506, 6602, 2389, 11, 7536, 17257, 1603...
2.316327
294
import unittest import pandasql.tests.test_pandasql unittest.main(pandasql.tests.test_pandasql)
[ 11748, 555, 715, 395, 198, 11748, 19798, 292, 13976, 13, 41989, 13, 9288, 62, 79, 392, 292, 13976, 198, 198, 403, 715, 395, 13, 12417, 7, 79, 392, 292, 13976, 13, 41989, 13, 9288, 62, 79, 392, 292, 13976, 8, 198 ]
2.365854
41
# -*- coding: utf-8 -*- # Copyright 2021, CS GROUP - France, https://www.csgroup.eu/ # # This file is part of EODAG project # https://www.github.com/CS-SI/EODAG # # 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 c...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 33448, 11, 9429, 44441, 532, 4881, 11, 3740, 1378, 2503, 13, 6359, 8094, 13, 12496, 14, 198, 2, 198, 2, 770, 2393, 318, 636, 286, 412, 3727, 4760, 1628, 19...
2.105325
3,380
from eNMS.controller import controller from eNMS.custom import CustomApp # noqa: F401 from eNMS.database import db from eNMS.environment import env from eNMS.forms import form_factory from eNMS.server import server from eNMS.variables import vs initialize()
[ 6738, 304, 45, 5653, 13, 36500, 1330, 10444, 198, 6738, 304, 45, 5653, 13, 23144, 1330, 8562, 4677, 220, 1303, 645, 20402, 25, 376, 21844, 198, 6738, 304, 45, 5653, 13, 48806, 1330, 20613, 198, 6738, 304, 45, 5653, 13, 38986, 1330, ...
3.234568
81
__version__ = '0.1dev' from . import ( math, arithmetic, datastr, functions, numeric_operations ) from .math import ( complex_math, ntheory, calculus, geometry, trigonometry, linalg, polynomial, statistics, quaternion, octonion, ) from .arithmetic import ( ...
[ 834, 9641, 834, 796, 705, 15, 13, 16, 7959, 6, 198, 198, 6738, 764, 1330, 357, 198, 220, 220, 220, 10688, 11, 198, 220, 220, 220, 34768, 11, 198, 220, 220, 220, 4818, 459, 81, 11, 198, 220, 220, 220, 5499, 11, 198, 220, 220, 2...
2.446886
546
import torch from torch import nn from torch.distributions import Normal from typing import Tuple from torch.nn import functional class GlimpseSensor(nn.Module): """The glimpse network. Combines the "what" and the "where" into a glimpse feature vector `g_t`. - "what": glimpse extracted from the re...
[ 11748, 28034, 198, 6738, 28034, 1330, 299, 77, 198, 6738, 28034, 13, 17080, 2455, 507, 1330, 14435, 198, 198, 6738, 19720, 1330, 309, 29291, 198, 198, 6738, 28034, 13, 20471, 1330, 10345, 628, 198, 4871, 402, 2475, 7752, 47864, 7, 20471...
2.303131
4,503
from cms.api import add_plugin from cms.test_utils.testcases import CMSTestCase from djangocms_frontend.contrib.alert.cms_plugins import AlertPlugin from djangocms_frontend.contrib.alert.forms import AlertForm from ..fixtures import TestFixture
[ 6738, 269, 907, 13, 15042, 1330, 751, 62, 33803, 198, 6738, 269, 907, 13, 9288, 62, 26791, 13, 9288, 33964, 1330, 16477, 2257, 395, 20448, 198, 198, 6738, 42625, 648, 420, 907, 62, 8534, 437, 13, 3642, 822, 13, 44598, 13, 46406, 62,...
3.220779
77
""" Coupling Knob ------------------ Creates a coupling knob from current optics. Not implemented yet. TODO! """ from operator import itemgetter from typing import Sequence # from optics_functions.coupling import coupling_via_cmatrix import pandas as pd from cpymad.madx import Madx import numpy as np import logging...
[ 37811, 198, 34, 280, 11347, 6102, 672, 198, 1783, 438, 198, 198, 16719, 274, 257, 40204, 36842, 422, 1459, 36237, 13, 198, 3673, 9177, 1865, 13, 16926, 46, 0, 198, 37811, 198, 198, 6738, 10088, 1330, 2378, 1136, 353, 198, 6738, 19720,...
2.869215
497
import torch.nn as nn import torch.nn.functional as F import torch device = torch.device("cuda" if torch.cuda.is_available() else "cpu") model = Decoder(10, 10*3, 1).to(device) x = torch.rand(4, 5, 10).to(device) h = torch.rand(4, 5, 20).to(device) trigger = torch.tensor([1, 2, 3, 4]).to(device) mask = torch.ones(4...
[ 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 11748, 28034, 628, 198, 198, 25202, 796, 28034, 13, 25202, 7203, 66, 15339, 1, 611, 28034, 13, 66, 15339, 13, 271, 62, 15182, 3419, 2073, ...
2.532895
152
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
[ 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 220, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 921, 743, 7330, 198, 2, 220, 220, ...
3.4375
240
#!/pxrpythonsubst # # Copyright 2016 Pixar # # Licensed under the Apache License, Version 2.0 (the "Apache License") # with the following modification; you may not use this file except in # compliance with the Apache License and the following modification to it: # Section 6. Trademarks. is deleted and replaced with: # ...
[ 2, 48443, 8416, 81, 79, 5272, 684, 549, 301, 198, 2, 198, 2, 15069, 1584, 46706, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 25189, 4891, 13789, 4943, 198, 2, 351, 262, 1708, 17613, 26, ...
3.584795
342
""" Desafio 1 | Faça um programa que peça para o usuário digitar o nome e a idade de um aluno e o número de provas que esse aluno fez. Depois, o programa deve pedir para o usuário digitar as notas de cada prova do aluno. Ao final o programa deve imprimir uma lista contendo: a. Nome do aluno na posição 0 b. Idade do a...
[ 37811, 198, 5960, 1878, 952, 352, 930, 18350, 50041, 23781, 1430, 64, 8358, 613, 50041, 31215, 267, 514, 84, 6557, 27250, 3100, 7940, 267, 299, 462, 304, 257, 4686, 671, 390, 23781, 435, 36909, 304, 267, 299, 21356, 647, 78, 390, 899,...
2.285366
410
import cv2 as cv import numpy as np import time import get_eviz_url import upload_file if __name__ == '__main__': obj = DetectVideo() # detect_img(src="person.png") # 获取地址 (萤石云产品序列号) src_rtmp = get_eviz_url.get_url(serial_str='F77671789') # 检测视频流 obj.detect_video(src=src_rtmp)
[ 11748, 269, 85, 17, 355, 269, 85, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 640, 198, 11748, 651, 62, 1990, 528, 62, 6371, 198, 11748, 9516, 62, 7753, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 19...
1.8
170
""" Initialization file for tweets library module. These exist here in lib as some of them are useful as help functions of other scripts (such as getting available campaigns). However, these could be moved to utils/reporting/ as individual scripts. And they could be called directly or with make, to avoid having multip...
[ 37811, 198, 24243, 1634, 2393, 329, 12665, 5888, 8265, 13, 198, 198, 4711, 2152, 994, 287, 9195, 355, 617, 286, 606, 389, 4465, 355, 1037, 5499, 286, 584, 198, 46521, 357, 10508, 355, 1972, 1695, 9964, 737, 2102, 11, 777, 714, 307, ...
4.657895
76
# Data Parallel Control (dpctl) # # Copyright 2020-2021 Intel Corporation # # 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....
[ 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6060, 42945, 6779, 357, 26059, 34168, 8, 198, 2, 198, 2, 15069, 12131, 12, 1238, 2481, 8180, 10501, 198, 2, 198, 2, 4996...
3.516129
186
# -*- coding: utf-8 -*- import logging from typing import List from flask_appbuilder import ModelRestApi logger = logging.getLogger(__name__) class BaseRavenModelRestApi(ModelRestApi): """ Extends FAB's ModelResApi to implement specific raven generic functionality. """ csrf_exempt = False add_...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 18931, 198, 6738, 19720, 1330, 7343, 198, 198, 6738, 42903, 62, 1324, 38272, 1330, 9104, 19452, 32, 14415, 628, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, ...
2.694268
157
# -*- coding: utf-8 -*- """App version module.""" from .. import __version__ def get_version(): """Return app version.""" return __version__
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 4677, 2196, 8265, 526, 15931, 198, 6738, 11485, 1330, 11593, 9641, 834, 628, 198, 4299, 651, 62, 9641, 33529, 198, 220, 220, 220, 37227, 13615, 598, 2196, 526, 15...
2.849057
53
import collections print(Customer('Dave', '123 Main').greeting())
[ 11748, 17268, 198, 198, 4798, 7, 44939, 10786, 27984, 3256, 705, 10163, 8774, 27691, 70, 2871, 278, 28955, 198 ]
3.526316
19
#!/usr/bin/env python3 from cc_pathlib.path import Path from cc_pathlib.case import CaseCollation from cc_pathlib.uniw import UniversalWriter
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 201, 198, 201, 198, 6738, 36624, 62, 6978, 8019, 13, 6978, 1330, 10644, 201, 198, 6738, 36624, 62, 6978, 8019, 13, 7442, 1330, 8913, 22667, 341, 201, 198, 6738, 36624, 62, 6978, 8019, ...
2.814815
54
# coding:utf8 from threading import Thread, Event from fastweb.util.log import recorder class FThread(Thread): """封装系统thread,方便线程停止""" _fthreads = [] def __init__(self, name, task, period=0, frequency=-1): """初始化线程 :parameter: - `name`: 线程名 - `task`: 任务函数,线程名会作为参数传递给...
[ 2, 19617, 25, 40477, 23, 198, 198, 6738, 4704, 278, 1330, 14122, 11, 8558, 198, 198, 6738, 3049, 12384, 13, 22602, 13, 6404, 1330, 38156, 628, 198, 4871, 376, 16818, 7, 16818, 2599, 198, 220, 220, 220, 37227, 22887, 223, 35318, 163, ...
1.563202
712
from django.test import TestCase from django.utils import timezone from .models import Game, Platform, Genre
[ 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 42625, 14208, 13, 26791, 1330, 640, 11340, 198, 198, 6738, 764, 27530, 1330, 3776, 11, 19193, 11, 5215, 260, 198 ]
3.666667
30
# third party import numpy as np import pytest # syft absolute import syft as sy from syft.core.adp.data_subject import DataSubject from syft.core.tensor.autodp.phi_tensor import PhiTensor as PT from syft.core.tensor.tensor import Tensor @pytest.fixture @pytest.fixture @pytest.fixture @pytest.fixture @pytest...
[ 2, 2368, 2151, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 12972, 9288, 198, 198, 2, 827, 701, 4112, 198, 11748, 827, 701, 355, 827, 198, 6738, 827, 701, 13, 7295, 13, 324, 79, 13, 7890, 62, 32796, 1330, 6060, 19776, 198, 6738, ...
2.418264
3,756
""" configure.py Takes user input file and returns settings namespace object """ import argparse import pytraj # to support pytraj calls in input file import mdtraj # to support mdtraj calls in the input file import numpy # to support numpy calls in input file import numpy as np # to support numpy...
[ 37811, 198, 11250, 495, 13, 9078, 198, 51, 1124, 2836, 5128, 2393, 290, 5860, 6460, 25745, 2134, 198, 37811, 198, 198, 11748, 1822, 29572, 198, 11748, 12972, 9535, 73, 220, 220, 220, 220, 220, 220, 1303, 284, 1104, 12972, 9535, 73, 38...
2.814745
1,058
# Arvore Binaria de Busca em Python # Kelvin Salton do Prado # 2015 ############# Metodos de Busca ############# ############################################ ############ Metodo de Insercao ############ ############################################ ########### Metodos de Impressao ########### ImprimeAr...
[ 201, 198, 2, 943, 85, 382, 20828, 10312, 390, 5869, 6888, 795, 11361, 201, 198, 2, 46577, 4849, 1122, 466, 1736, 4533, 201, 198, 2, 1853, 201, 198, 201, 198, 7804, 4242, 2, 3395, 375, 418, 390, 5869, 6888, 1303, 7804, 4242, 201, 1...
2.437685
674
""" Use the turtle module to draw a tree recursively. """ import turtle from random import randrange main()
[ 37811, 198, 11041, 262, 28699, 8265, 284, 3197, 257, 5509, 664, 1834, 2280, 13, 198, 37811, 628, 198, 11748, 28699, 198, 6738, 4738, 1330, 43720, 9521, 628, 628, 198, 12417, 3419, 198 ]
3.5625
32
#!/usr/bin/env python """An ivyprobe script for ivy-python """ import getopt import os import signal import sys import time from ivy.std_api import * try: import readline except ImportError: pass # The next line taken from https://pythonhosted.org/six/ # Copyright (c) 2010-2016 Benjamin Peterson PY2 = sys.ve...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 2025, 21628, 88, 1676, 1350, 4226, 329, 21628, 88, 12, 29412, 198, 37811, 198, 11748, 651, 8738, 198, 11748, 28686, 198, 11748, 6737, 198, 11748, 25064, 198, 11748, 640, 198, 198,...
1.8794
4,403
# ---------------------------------------------------------------------------- # Title: Scientific Visualisation - Python & Matplotlib # Author: Nicolas P. Rougier # License: BSD # ---------------------------------------------------------------------------- import numpy as np import matplotlib.pyplot as plt from mat...
[ 2, 16529, 10541, 198, 2, 11851, 25, 220, 220, 22060, 15612, 5612, 532, 11361, 1222, 6550, 29487, 8019, 198, 2, 6434, 25, 220, 29737, 350, 13, 13876, 70, 959, 198, 2, 13789, 25, 347, 10305, 198, 2, 16529, 10541, 198, 11748, 299, 3215...
2.292467
677
#!/usr/bin/env python # -*- encoding: utf-8 """ On sites where I don't want to use my standard username (@alexwlchan) -- for example, if I'm starring content but not creating anything -- I create alliterative usernames from the names provided by Docker. e.g. on GitHub I might use "goofy_galileo" This script generates...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 21004, 25, 3384, 69, 12, 23, 198, 37811, 198, 2202, 5043, 810, 314, 836, 470, 765, 284, 779, 616, 3210, 20579, 4275, 1000, 87, 40989, 3147, 8, 1377, 198, 1640, 1672,...
3
256
#!/usr/bin/env python domain_name = os.environ['DOMAIN_NAME'] admin_server_listen_address = os.environ['ADMIN_SERVER_LISTEN_ADDRESS'] admin_server_listen_port = os.environ['ADMIN_SERVER_LISTEN_PORT'] admin_username = os.environ['ADMIN_USERNAME'] admin_password = os.environ['ADMIN_PASSWORD'] #########################...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 27830, 62, 3672, 796, 28686, 13, 268, 2268, 17816, 39170, 29833, 62, 20608, 20520, 198, 28482, 62, 15388, 62, 4868, 268, 62, 21975, 796, 28686, 13, 268, 2268, 17816, 2885, 23678, ...
3.227053
207
import argparse PSSTGUY_TEMPLATE = """ ┻┳| ┻┳| ┳┻| ┳┻| ┻┳| ┳┻| ┻┳| ┳┻| _ ┻┳|•.•) {SECRET_TXT} ┳┻|⊂ノ ┻┳| """ if __name__ == '__main__': cli()
[ 11748, 1822, 29572, 628, 198, 3705, 2257, 38022, 56, 62, 51, 3620, 6489, 6158, 796, 37227, 198, 6552, 119, 6552, 111, 91, 220, 198, 6552, 119, 6552, 111, 91, 220, 198, 6552, 111, 6552, 119, 91, 220, 198, 6552, 111, 6552, 119, 91, ...
1.205882
136
# hook gets lauches from an api import os import pathlib import subprocess import re import time import posixpath import requests import airflow from airflow.hooks.base_hook import BaseHook from airflow.exceptions import AirflowException from airflow.utils import apply_defaults from airflow.utils.log.logging_mixin im...
[ 2, 8011, 3011, 300, 559, 2052, 422, 281, 40391, 198, 198, 11748, 28686, 198, 11748, 3108, 8019, 198, 11748, 850, 14681, 198, 11748, 302, 198, 11748, 640, 198, 198, 11748, 1426, 844, 6978, 198, 11748, 7007, 198, 11748, 45771, 198, 6738, ...
3.263889
144
__author__ = 'Robert Meyer' from pypet import Trajectory, pypetexceptions, PickleResult from pypet.tests.testutils.data import TrajectoryComparator from pypet.tests.testutils.ioutils import make_temp_dir, run_suite, parse_args import pypet.pypetexceptions as pex if __name__ == '__main__': opt_args = parse_args()...
[ 834, 9800, 834, 796, 705, 19156, 23975, 6, 198, 198, 6738, 279, 4464, 316, 1330, 4759, 752, 652, 11, 279, 4464, 316, 1069, 11755, 11, 12346, 293, 23004, 198, 6738, 279, 4464, 316, 13, 41989, 13, 9288, 26791, 13, 7890, 1330, 4759, 75...
2.724409
127
import torch import torch.nn as nn import torch.nn.init as init import numpy as np import pandas as pd import torchvision import cv2 from torchvision import transforms, utils, models from tqdm import tqdm from torch.utils.data import Dataset, DataLoader, ConcatDataset import torchvision.models as models from os import ...
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 15003, 355, 2315, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 28034, 10178, 198, 11748, 269, 85, 17, ...
2.574642
978
import random as r from pprint import pprint N = r.randint(2,10) taken = [False for i in range(N)] areFriends = setFriends(N) pprint(setFriends(5)) print(N) print(countParing(taken))
[ 11748, 4738, 355, 374, 198, 6738, 279, 4798, 1330, 279, 4798, 198, 198, 45, 796, 374, 13, 25192, 600, 7, 17, 11, 940, 8, 198, 83, 1685, 796, 685, 25101, 329, 1312, 287, 2837, 7, 45, 15437, 198, 198, 533, 36705, 796, 900, 36705, ...
2.569444
72
import os import logging from subprocess import call as system_call if os.name == "nt": else: def find_sensitive_path(insensitive_path, dir=None): """ Borrowed from https://stackoverflow.com/a/37708342 Returns a case-sensitive filepath when given a case-insensitive path """ if dir is None: ...
[ 11748, 28686, 198, 11748, 18931, 198, 6738, 850, 14681, 1330, 869, 355, 1080, 62, 13345, 628, 198, 198, 361, 28686, 13, 3672, 6624, 366, 429, 1298, 628, 198, 17772, 25, 628, 198, 4299, 1064, 62, 30176, 62, 6978, 7, 1040, 18464, 62, ...
2.415042
359
#---------------------------------------------------------- # Imports #---------------------------------------------------------- import pytest #---------------------------------------------------------- # Simple test function #---------------------------------------------------------- #-----------------...
[ 201, 198, 2, 43801, 438, 201, 198, 2, 1846, 3742, 201, 198, 2, 43801, 438, 201, 198, 201, 198, 11748, 12972, 9288, 201, 198, 201, 198, 2, 43801, 438, 201, 198, 2, 17427, 1332, 2163, 201, 198, 2, 43801, 438, 201, 198, 201, 198, 2...
7.238636
88
from time import sleep from pytest import fail def poll_result(fn, result_test_fn, *, max_checks=5, interval=1): """Polling utility for cases where we need to wait for BigchainDB processing. After 'max_checks' attempts, will fail the test with the last result. Args: fn (func): polling func...
[ 6738, 640, 1330, 3993, 198, 198, 6738, 12972, 9288, 1330, 2038, 628, 628, 198, 4299, 3278, 62, 20274, 7, 22184, 11, 1255, 62, 9288, 62, 22184, 11, 1635, 11, 3509, 62, 42116, 28, 20, 11, 16654, 28, 16, 2599, 198, 220, 220, 220, 372...
2.605392
408
from requests import Session import xml.etree.ElementTree as ET import json from ..tools import (xmltools, log) from outpost24hiabclient.clients.hiabclient import HiabClient from ..entities.scanner import Scanner
[ 6738, 7007, 1330, 23575, 201, 198, 11748, 35555, 13, 316, 631, 13, 20180, 27660, 355, 12152, 201, 198, 11748, 33918, 201, 198, 6738, 11485, 31391, 1330, 357, 87, 76, 2528, 10141, 11, 2604, 8, 201, 198, 6738, 38327, 1731, 5303, 397, 16...
3.054054
74
import unittest from social_networks.twitter_controller.twitter_api import * @unittest.skip # @unittest.skip # @unittest.skip @unittest.skip
[ 11748, 555, 715, 395, 198, 6738, 1919, 62, 3262, 5225, 13, 6956, 62, 36500, 13, 6956, 62, 15042, 1330, 1635, 628, 198, 31, 403, 715, 395, 13, 48267, 628, 198, 198, 2, 2488, 403, 715, 395, 13, 48267, 198, 198, 2, 2488, 403, 715, ...
2.660714
56
# Copyright Contributors to the Pyro project. # SPDX-License-Identifier: Apache-2.0 import pyro.distributions as dist from .reparam import Reparam class LinearHMMReparam(Reparam): """ Auxiliary variable reparameterizer for :class:`~pyro.distributions.LinearHMM` random variables. This defers to comp...
[ 2, 15069, 25767, 669, 284, 262, 44954, 1628, 13, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 198, 198, 11748, 12972, 305, 13, 17080, 2455, 507, 355, 1233, 198, 198, 6738, 764, 260, 17143, 1330, 1432, ...
2.48488
959
import torch import torch.nn as nn import torch.nn.functional as F
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 628, 220, 220, 220, 220, 198 ]
2.92
25
from setuptools import find_packages, setup setup( name="mapupdater", packages=find_packages() + ["twisted.plugins"], install_requires=[ "autobahn == 0.13.0", "twisted >= 15.0.0", "treq", "bs4", "html5lib", "service_identity >= 14.0.0" ], include_pa...
[ 6738, 900, 37623, 10141, 1330, 1064, 62, 43789, 11, 9058, 628, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 2625, 8899, 929, 67, 729, 1600, 198, 220, 220, 220, 10392, 28, 19796, 62, 43789, 3419, 1343, 14631, 4246, 6347, 13, 37390, ...
2.060976
164
""" :Created: 18 September 2016 :Author: Lucas Connors """ from django.apps import apps from django.contrib.auth.models import User from django.db import connection from django.db.migrations.executor import MigrationExecutor from django.test import TransactionTestCase from django.utils.text import slugify from pigeon...
[ 37811, 198, 25, 41972, 25, 1248, 2693, 1584, 198, 25, 13838, 25, 15257, 20776, 669, 198, 198, 37811, 198, 198, 6738, 42625, 14208, 13, 18211, 1330, 6725, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, ...
3.493274
223
# The power set of a set is the set of all its subsets. # Write a function that, given a set, generates its power set. # For example, given the set {1, 2, 3}, # it should return {{}, {1}, {2}, {3}, {1, 2}, {1, 3}, {2, 3}, {1, 2, 3}}. import math if __name__ == "__main__": inp = [1, 2, 3] print "Power set:",...
[ 2, 383, 1176, 900, 286, 257, 900, 318, 262, 900, 286, 477, 663, 6352, 1039, 13, 198, 2, 19430, 257, 2163, 326, 11, 1813, 257, 900, 11, 18616, 663, 1176, 900, 13, 198, 2, 1114, 1672, 11, 1813, 262, 900, 1391, 16, 11, 362, 11, 5...
2.471429
140
#!/usr/bin/env python3 # -*- coding: ascii -*- from __future__ import division, with_statement from setuptools import setup, find_packages import sys import io version = '1.3.0' author = "Omoto Kenji" license = "MIT License" author_email = 'doloopwhile@gmail.com' with io.open('README.rst', encoding='ascii') as fp: ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 355, 979, 72, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 7297, 11, 351, 62, 26090, 198, 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789,...
2.716698
533
from __future__ import unicode_literals from django.test import TestCase from djangocms_baseplugins.baseplugin.tests.base import BasePluginTestCase from djangocms_baseplugins.image.cms_plugins import ImagePlugin
[ 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 198, 6738, 42625, 648, 420, 907, 62, 8692, 37390, 13, 8692, 33803, 13, 41989, 13, 8692, 1330, 7308, 37233, 14402...
3.52459
61
import argparse import requests import pandas as pd import matplotlib.pyplot as plt import matplotlib.dates as mdates # Get command line arguments parser = argparse.ArgumentParser() parser.add_argument("--county", help="county name - default: Cork", default="Cork") parser.add_argument("--days", help="number of days to...
[ 11748, 1822, 29572, 198, 11748, 7007, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 2603, 29487, 8019, 13, 19581, 355, 285, 19581, 198, 198, 2, 3497, 3141, 1627, 7159, ...
2.572271
678
import numpy as np def compute_fans(shape): """ Taken from Keras compute_fans """ if len(shape) == 2: fan_in = shape[0] fan_out = shape[1] elif len(shape) in {3, 4, 5}: receptive_field_size = np.prod(shape[:-2]) fan_in = shape[-2] * receptive_field_size fan_o...
[ 11748, 299, 32152, 355, 45941, 198, 198, 4299, 24061, 62, 69, 504, 7, 43358, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 30222, 422, 17337, 292, 24061, 62, 69, 504, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 611, 18896,...
2.060241
249
"""Discover plugins.""" from functools import partial from backuppy.location import PathSource, PathTarget, SshTarget, FirstAvailableTarget from backuppy.notifier import NotifySendNotifier, CommandNotifier, FileNotifier, StdioNotifier def _new(available_plugin_types, configuration, plugin_type, plugin_configuration_...
[ 37811, 44596, 20652, 526, 15931, 198, 6738, 1257, 310, 10141, 1330, 13027, 198, 198, 6738, 736, 7211, 88, 13, 24886, 1330, 10644, 7416, 11, 10644, 21745, 11, 311, 1477, 21745, 11, 3274, 10493, 21745, 198, 6738, 736, 7211, 88, 13, 1662, ...
2.962077
2,215
# -*- coding: utf-8 -*- """ .. module:: card :synopsis: Encapsulate card behavior .. moduleauthor:: Zach Mitchell <zmitchell@fastmail.com> """ from enum import Enum from functools import total_ordering from uuid import uuid4 class Card(object): """ Represents a card in the game Parameters ----------...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 492, 8265, 3712, 2657, 198, 220, 220, 220, 1058, 28869, 24608, 25, 14711, 1686, 5039, 2657, 4069, 198, 492, 8265, 9800, 3712, 18825, 14526, 1279, 89, 2781, 1...
2.814631
1,408
from datetime import datetime from werkzeug.security import generate_password_hash, check_password_hash from flask_sqlalchemy import SQLAlchemy from sqlalchemy.exc import SQLAlchemyError db = SQLAlchemy() class User(db.Model): """User object model.""" id = db.Column(db.Integer, primary_key=True) userna...
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 266, 9587, 2736, 1018, 13, 12961, 1330, 7716, 62, 28712, 62, 17831, 11, 2198, 62, 28712, 62, 17831, 198, 6738, 42903, 62, 25410, 282, 26599, 1330, 16363, 2348, 26599, 198, 6738, 44161, 282,...
2.685185
378
### Author - Raghav Maheshwari ### import notify2 #from wolframalpha import Client from os import listdir #app_id = "KHHH6P-HTUJE286QJ" #client = Client(app_id) LOGO_PATH = '/home/imnobody0396/Documents/Nancy-The-Virtual-Assistant/logo.png' #LOGO_PATH = '/home/imnobody0396/Desktop/nancy.png' HOME_DIR = '/home/im...
[ 21017, 6434, 532, 371, 10471, 615, 6669, 956, 36599, 2743, 44386, 198, 198, 11748, 19361, 17, 198, 2, 6738, 17481, 859, 26591, 1330, 20985, 198, 6738, 28686, 1330, 1351, 15908, 628, 198, 2, 1324, 62, 312, 796, 366, 42, 16768, 39, 21, ...
2.357143
308
doc = { 'name': 'hash_md5', 'inputs' : ['whitelist_csv', 'vt_hash', 'et_hash_dns'], 'id': 'hash', 'cache': None, }
[ 198, 15390, 796, 1391, 198, 220, 220, 220, 705, 3672, 10354, 705, 17831, 62, 9132, 20, 3256, 198, 220, 220, 220, 705, 15414, 82, 6, 1058, 37250, 1929, 270, 46331, 62, 40664, 3256, 705, 36540, 62, 17831, 3256, 705, 316, 62, 17831, 62...
1.913043
69
# -*- coding: utf-8 -*- from flask import (Flask, request, render_template, redirect, url_for, jsonify) import json from ming import (create_datastore, Session, collection, Field, Document, schema) from bson.objectid import ObjectId fro...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 42903, 1330, 357, 7414, 2093, 11, 198, 220, 220, 220, 220, 220, 220, 220, 2581, 11, 198, 220, 220, 220, 220, 220, 220, 220, 8543, 62, 28243, 11, 198, 220, 220,...
2.066929
762
import os import logging import sys import requests from collections import OrderedDict import datetime import cartosql # Constants LATEST_URL = 'https://api.acleddata.com/acled/read?page={page}' MIN_PAGES = 10 MAX_PAGES = 200 CLEAR_TABLE_FIRST = False CARTO_TABLE = 'soc_016_conflict_protest_events' CARTO_SCHEMA = O...
[ 11748, 28686, 198, 11748, 18931, 198, 11748, 25064, 198, 11748, 7007, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 11748, 4818, 8079, 198, 11748, 6383, 418, 13976, 628, 198, 2, 4757, 1187, 198, 43, 1404, 6465, 62, 21886, 796, 705,...
2.077893
2,221
from __future__ import absolute_import from __future__ import unicode_literals import csv342 as csv import six import sys import time from datetime import ( datetime, date, timedelta, ) from io import open from xml.etree import cElementTree as ElementTree from django.core.management.base import BaseComma...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 269, 21370, 31575, 355, 269, 21370, 198, 11748, 2237, 198, 11748, 25064, 198, 11748, 640, 198, 198, 6738, ...
2.753138
478
# -*- coding: utf-8 -*- # @createTime : 2020/3/24 13:56 # @author : 王江桥 # @fileName: mq_rpc_server.py # @email: jiangqiao.wang@mabotech.com import json import os import sys import pika from mesService.modules.RabbitMQ import logger from mesService.modules.ERPInterface.erp_to_mes.deviartion.receive_deviating import ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2488, 17953, 7575, 220, 220, 220, 1058, 12131, 14, 18, 14, 1731, 1511, 25, 3980, 198, 2, 2488, 9800, 220, 1058, 13328, 23329, 162, 109, 253, 162, 94, 98, 198, 2, ...
2.690283
494
import json import datetime import click from tabulate import tabulate
[ 11748, 33918, 198, 11748, 4818, 8079, 198, 11748, 3904, 198, 6738, 7400, 5039, 1330, 7400, 5039, 628 ]
4.235294
17
from CRL import CRL, DEFAULTS_FILE from console_utils import console if __name__ == '__main__': """ Example of execution: $ python crl_console.py --cart_ids 2 4 6 7 8 --energy=21500 --p0=6.52 "d","d_ideal","f","p0","p1","p1_ideal" 0.000372455276869,-0.0669574652539,1.04864377922,6.52,1.2496275447...
[ 6738, 327, 7836, 1330, 327, 7836, 11, 5550, 7708, 35342, 62, 25664, 198, 6738, 8624, 62, 26791, 1330, 8624, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 17934, 286,...
2.16092
174
# built-in from argparse import REMAINDER, ArgumentParser # app from ..actions import make_json from ..config import builders from ..repositories import get_repo from .base import BaseCommand class PackageSearchCommand(BaseCommand): """Search packages on PyPI.org or Anaconda Cloud. """ @staticmethod
[ 2, 3170, 12, 259, 198, 6738, 1822, 29572, 1330, 22657, 32, 12115, 1137, 11, 45751, 46677, 198, 198, 2, 598, 198, 6738, 11485, 4658, 1330, 787, 62, 17752, 198, 6738, 11485, 11250, 1330, 31606, 198, 6738, 11485, 260, 1930, 270, 1749, 13...
3.361702
94
# Copyright (c) 2019 Graphcore Ltd. All rights reserved. import pytest import sys import tempfile from pathlib import Path sys.path.append(Path(__file__).parent.parent.as_posix()) from get_weights import get_weights # noqa @pytest.mark.parametrize('model_name', ['VGG16', 'VGG19', 'ResNet101']) @pytest.mark.para...
[ 2, 15069, 357, 66, 8, 13130, 29681, 7295, 12052, 13, 1439, 2489, 10395, 13, 198, 198, 11748, 12972, 9288, 198, 11748, 25064, 198, 11748, 20218, 7753, 198, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 17597, 13, 6978, 13, 33295, 7, 15...
2.463768
207
# Copyright (c) 2021 Horizon Robotics and ALF Contributors. 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...
[ 2, 15069, 357, 66, 8, 33448, 22776, 47061, 290, 8355, 37, 25767, 669, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428,...
2.708502
988
import unittest, os import pytest import numpy as np import pyuvdata as uv from .. import pspecbeam, conversions from hera_pspec.data import DATA_PATH
[ 11748, 555, 715, 395, 11, 28686, 198, 11748, 12972, 9288, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 12972, 14795, 7890, 355, 334, 85, 198, 6738, 11485, 1330, 279, 16684, 40045, 11, 32626, 198, 6738, 339, 430, 62, 862, 43106, 13, ...
3.234043
47
# noinspection PyTypeChecker import torch import operator from functools import reduce from torch import Tensor device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu") # NOTE: This is deprecated # noinspection PyTypeChecker def build_temporal_clique(node_index_aggr, node_types_aggr, order=1): "...
[ 2, 645, 1040, 14978, 9485, 6030, 9787, 263, 198, 11748, 28034, 198, 11748, 10088, 198, 6738, 1257, 310, 10141, 1330, 4646, 198, 198, 6738, 28034, 1330, 309, 22854, 198, 198, 25202, 796, 28034, 13, 25202, 7203, 66, 15339, 25, 15, 1, 61...
2.30323
3,034
"""The type representing a cell magic""" """ A cell magic is a shortcut a user can write into a notebook cell. The cell magic is written under the form '%%magic' and in principle it operates over the entire code of the cell it is written in, e.g. ------cell %%magic_python from matplotlib import pyplot x = [1,2,3] pri...
[ 37811, 464, 2099, 10200, 257, 2685, 5536, 37811, 198, 198, 37811, 198, 32, 2685, 5536, 318, 257, 29401, 257, 2836, 460, 3551, 656, 257, 20922, 2685, 13, 198, 464, 2685, 5536, 318, 3194, 739, 262, 1296, 705, 16626, 32707, 6, 290, 287, ...
3.295597
159
# -*- encoding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, so...
[ 2, 532, 9, 12, 21004, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13...
3.559242
211
import sys ''' Plot the positions from a saved Sibernetic position_buffer.txt file ''' if __name__ == '__main__': if len(sys.argv) == 2: pos_file_name = sys.argv[1] else: pos_file_name = '../buffers/position_buffer.txt' #pos_file_name = '../buffers/position_buffer0.txt' ...
[ 11748, 25064, 220, 198, 198, 7061, 6, 198, 220, 220, 220, 28114, 262, 6116, 422, 257, 7448, 28394, 9833, 2292, 62, 22252, 13, 14116, 2393, 198, 7061, 6, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 2...
2.237226
274
from .views import scrap_proj
[ 6738, 764, 33571, 1330, 15881, 62, 1676, 73 ]
3.625
8
from .base import BaseModule
[ 6738, 764, 8692, 1330, 7308, 26796, 198 ]
4.142857
7
# Generated by Django 3.2.3 on 2021-05-24 03:26 from django.db import migrations, models import django.db.models.deletion import django.utils.timezone
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 18, 319, 33448, 12, 2713, 12, 1731, 7643, 25, 2075, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, 9945, 13, 27530, 13, 2934, 1616, 295, ...
2.886792
53
# -*- coding: utf-8 -*- from os.path import join from unicodecsv import writer from progress.bar import Bar from optparse import make_option from django.conf import settings from django.core.management.base import BaseCommand from core.models import Article
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 28686, 13, 6978, 1330, 4654, 198, 6738, 28000, 375, 721, 21370, 1330, 6260, 198, 6738, 4371, 13, 5657, 1330, 2409, 198, 6738, 2172, 29572, 1330, 787, 62, 18076, 19...
3.493333
75
from osbot_aws.helpers.Test_Helper import Test_Helper from osbot_browser.browser.Browser_Lamdba_Helper import Browser_Lamdba_Helper from osbot_browser.view_helpers.Google_Charts_Js import Google_Charts_Js
[ 6738, 28686, 13645, 62, 8356, 13, 16794, 364, 13, 14402, 62, 47429, 1330, 6208, 62, 47429, 198, 6738, 28686, 13645, 62, 40259, 13, 40259, 13, 46532, 62, 43, 28745, 7012, 62, 47429, 1330, 34270, 62, 43, 28745, 7012, 62, 47429, 198, 673...
3.121212
66
import importlib from typing import TYPE_CHECKING from cowbird.config import get_all_configs from cowbird.utils import SingletonMeta, get_config_path, get_logger, get_settings if TYPE_CHECKING: from typing import List from cowbird.services.service import Service LOGGER = get_logger(__name__) VALID_SERVICES...
[ 11748, 1330, 8019, 198, 6738, 19720, 1330, 41876, 62, 50084, 2751, 198, 198, 6738, 9875, 16944, 13, 11250, 1330, 651, 62, 439, 62, 11250, 82, 198, 6738, 9875, 16944, 13, 26791, 1330, 5573, 10565, 48526, 11, 651, 62, 11250, 62, 6978, 1...
2.397399
692
############################################################################## # # Copyright (c) 2001, 2002 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # TH...
[ 29113, 29113, 7804, 4242, 2235, 198, 2, 198, 2, 15069, 357, 66, 8, 5878, 11, 6244, 1168, 3008, 5693, 290, 25767, 669, 13, 198, 2, 1439, 6923, 33876, 13, 198, 2, 198, 2, 770, 3788, 318, 2426, 284, 262, 8617, 286, 262, 1168, 3008, ...
2.692308
1,196
from mmdet.apis import init_detector, inference_detector, show_result_pyplot import mmcv import argparse import cv2 import numpy as np import os import time import threading import tqdm def read_image(file_name, format=None, package="PIL"): """ Read an image into the given format. Will apply rotation and f...
[ 6738, 8085, 15255, 13, 499, 271, 1330, 2315, 62, 15255, 9250, 11, 32278, 62, 15255, 9250, 11, 905, 62, 20274, 62, 9078, 29487, 198, 11748, 8085, 33967, 198, 11748, 1822, 29572, 198, 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 459...
2.020297
2,759
# -*- coding: utf-8 -*- # # Created by libxd on 17-2-5. #
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15622, 416, 9195, 24954, 319, 1596, 12, 17, 12, 20, 13, 198, 2, 198 ]
1.870968
31
from django.http import JsonResponse, HttpResponse from django.shortcuts import render from django.contrib.auth import get_user_model from cvat.apps.authentication.decorators import login_required from cvat.apps.stats.services import collect_annotators_stats, save_job_stats User = get_user_model() @login_required ...
[ 6738, 42625, 14208, 13, 4023, 1330, 449, 1559, 31077, 11, 367, 29281, 31077, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 651, 62, 7220, 62, 19849, 198, 198, 6738, 269, ...
3.266055
109
import numpy as np import os import sys import time import copy import scipy import random import logging import pandas as pd import qinfer as qi import matplotlib.pyplot as plt from matplotlib.gridspec import GridSpec import seaborn as sns import redis import pickle try: from lfig import LatexF...
[ 11748, 299, 32152, 355, 45941, 201, 198, 11748, 28686, 201, 198, 11748, 25064, 201, 198, 11748, 640, 201, 198, 11748, 4866, 201, 198, 11748, 629, 541, 88, 201, 198, 11748, 4738, 201, 198, 11748, 18931, 201, 198, 11748, 19798, 292, 355, ...
1.907423
33,356
'''Autogenerated by xml_generate script, do not edit!''' from OpenGL import platform as _p, arrays # Code generation uses this from OpenGL.raw.GL import _types as _cs # End users want this... from OpenGL.raw.GL._types import * from OpenGL.raw.GL import _errors from OpenGL.constant import Constant as _C import...
[ 7061, 6, 16541, 519, 877, 515, 416, 35555, 62, 8612, 378, 4226, 11, 466, 407, 4370, 0, 7061, 6, 201, 198, 6738, 30672, 1330, 3859, 355, 4808, 79, 11, 26515, 201, 198, 2, 6127, 5270, 3544, 428, 201, 198, 6738, 30672, 13, 1831, 13, ...
2.140162
371
# wujian@2018 """ SI-SNR(scale-invariant SNR/SDR) measure of speech separation """ import numpy as np from itertools import permutations import pdb def si_snr(x, s, remove_dc=True): """ Compute SI-SNR Arguments: x: vector, enhanced/separated signal s: vector, reference signal(ground trut...
[ 2, 266, 23577, 666, 31, 7908, 198, 37811, 198, 11584, 12, 15571, 49, 7, 9888, 12, 16340, 2743, 415, 11346, 49, 14, 50, 7707, 8, 3953, 286, 4046, 14139, 198, 37811, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 340, 861, ...
2.105561
1,061
from .base import BaseResource import requests
[ 198, 6738, 764, 8692, 1330, 7308, 26198, 198, 11748, 7007 ]
4.7
10
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Oct 15 07:53:36 2020 Illustrates linear least squares fitting of data @author: zettergm """ # Imports import numpy as np import matplotlib.pyplot as plt import sys sys.path.append("../linear_algebra") from elimtools import Gauss_elim,backsub # Grid a...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 26223, 2556, 1315, 8753, 25, 4310, 25, 2623, 12131, 198, 198, 21478, 436, 9700, 14174, 1551...
2.340952
525