content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
###################################################################################################################### # Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # ...
[ 29113, 29113, 29113, 14468, 4242, 2235, 198, 2, 220, 15069, 13130, 6186, 13, 785, 11, 3457, 13, 393, 663, 29116, 13, 1439, 6923, 33876, 13, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
1.886814
857
############################################################################### # file -- parse.py -- # Top contributors (to current version): # Nestan Tsiskaridze # This file is part of the configuration finder for the Stanford AHA project. # Copyright (c) 2021 by the authors listed in the file AUTHORS # in th...
[ 29113, 29113, 7804, 4242, 21017, 198, 2, 220, 2393, 1377, 21136, 13, 9078, 1377, 198, 2, 220, 5849, 20420, 357, 1462, 1459, 2196, 2599, 198, 2, 220, 220, 220, 21420, 272, 13146, 1984, 283, 312, 2736, 198, 2, 220, 770, 2393, 318, 636...
3.873832
214
from flask import Blueprint, render_template, redirect, url_for, request, flash, make_response from werkzeug.security import generate_password_hash from flask_login import login_required, current_user from . import db import datetime from .models import Visitor, User main = Blueprint('main', __name__)
[ 6738, 42903, 1330, 39932, 11, 8543, 62, 28243, 11, 18941, 11, 19016, 62, 1640, 11, 2581, 11, 7644, 11, 787, 62, 26209, 198, 6738, 266, 9587, 2736, 1018, 13, 12961, 1330, 7716, 62, 28712, 62, 17831, 198, 6738, 42903, 62, 38235, 1330, ...
3.8125
80
# Funes cabecalho = "SISTEMA DE CADASTRO DE FUNCIONARIO\n\n\n" rodape = "\n\n\n Obrigada pela preferencia"
[ 2, 376, 4015, 198, 198, 66, 397, 721, 282, 8873, 796, 366, 50, 8808, 27630, 5550, 37292, 1921, 5446, 46, 5550, 29397, 34, 2849, 1503, 9399, 59, 77, 59, 77, 59, 77, 1, 198, 198, 14892, 1758, 796, 37082, 77, 59, 77, 59, 77, 440, ...
1.963636
55
from node import Node
[ 6738, 10139, 1330, 19081, 201, 198, 201, 198, 197, 197, 201, 198, 201, 198, 201, 198 ]
2.0625
16
#!/usr/bin/env python3 # # Copyright (C) 2018 Linus Jahn <lnj@kaidan.im> # Copyright (C) 2019,2020 Hiroshi Miura <miurahr@linux.com> # Copyright (C) 2020, Aurlien Gteau # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software")...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 198, 2, 15069, 357, 34, 8, 2864, 5164, 385, 449, 15386, 1279, 18755, 73, 31, 74, 1698, 272, 13, 320, 29, 198, 2, 15069, 357, 34, 8, 13130, 11, 42334, 35763, 72, 13756, 533...
3.57461
449
from django.template import loader, RequestContext from django.http import Http404, HttpResponse from django.core.xheaders import populate_xheaders from django.core.paginator import ObjectPaginator, InvalidPage from django.core.exceptions import ObjectDoesNotExist def object_list(request, queryset, paginate_by=None, p...
[ 6738, 42625, 14208, 13, 28243, 1330, 40213, 11, 19390, 21947, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 26429, 11, 367, 29281, 31077, 198, 6738, 42625, 14208, 13, 7295, 13, 87, 50145, 1330, 48040, 62, 87, 50145, 198, 6738, 42...
2.213376
2,198
"""Utility Modules.""" from typing import Any, Callable, Dict, List, Optional, Sequence, TypeVar, Union import jax import jax.numpy as jnp from .module import Module, parameters_method T = TypeVar("T", bound=Module) O = TypeVar("O")
[ 37811, 18274, 879, 3401, 5028, 526, 15931, 628, 198, 6738, 19720, 1330, 4377, 11, 4889, 540, 11, 360, 713, 11, 7343, 11, 32233, 11, 45835, 11, 5994, 19852, 11, 4479, 198, 198, 11748, 474, 897, 198, 11748, 474, 897, 13, 77, 32152, 35...
3.0375
80
""" Backend to connect Open edX richie with an LMS """ import logging import re import requests from requests.auth import AuthBase from ..serializers import SyncCourseRunSerializer from .base import BaseLMSBackend logger = logging.getLogger(__name__) def split_course_key(key): """Split an OpenEdX course key by...
[ 37811, 198, 7282, 437, 284, 2018, 4946, 1225, 55, 5527, 494, 351, 281, 406, 5653, 198, 37811, 198, 11748, 18931, 198, 11748, 302, 198, 198, 11748, 7007, 198, 6738, 7007, 13, 18439, 1330, 26828, 14881, 198, 198, 6738, 11485, 46911, 11341...
3.030303
231
# by Greg Hazel import xmlrpclib from xmlrpclib2 import * from BTL import brpc old_PyCurlTransport = PyCurlTransport # -------------------------------------------------------------------- # request dispatcher # Double underscore is BAD! def new_server_proxy(url): c = cache_set.get_cache(PyCURL_Cache, url)...
[ 2, 416, 8547, 42805, 198, 198, 11748, 35555, 81, 79, 565, 571, 198, 6738, 35555, 81, 79, 565, 571, 17, 1330, 1635, 198, 6738, 347, 14990, 1330, 865, 14751, 198, 198, 727, 62, 20519, 34, 6371, 8291, 634, 796, 9485, 34, 6371, 8291, ...
2.59919
247
import base64 import mimetypes import os from django.conf import settings from django.http import Http404, HttpResponse from django.shortcuts import get_object_or_404 from django.views.decorators.cache import cache_control from django.views.static import serve as django_serve from database_files.models import File ...
[ 11748, 2779, 2414, 198, 11748, 17007, 2963, 12272, 198, 11748, 28686, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 26429, 11, 367, 29281, 31077, 198, 6738, 42625, 14208, 13, 195...
2.923345
287
import numpy as np import pandas as pd from abc import ABC def _gen_random(self, seed: int = None): """[summary] Args: seed (int, optional): [description]. Defaults to 123. """ rng = np.random.default_rng(seed) for example in self._new_noise: se...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 450, 66, 1330, 9738, 628, 220, 220, 220, 220, 198, 220, 220, 220, 825, 4808, 5235, 62, 25120, 7, 944, 11, 9403, 25, 493, 796, 6045, 2599, 198, 220, 22...
2.186528
193
from wtforms import Form, TextField, PasswordField, SelectField, TextAreaField, BooleanField, validators, ValidationError, RadioField import re phone_regex = "(\+\d+-?)?((\(?\d{3}\)?)|(\d{3}))-?\d{3}-?\d{4}$" gender_choices = [ ("", "Gender"), ("male", "Male"), ("female", "Female"), ("other", "Other"...
[ 6738, 266, 83, 23914, 1330, 5178, 11, 8255, 15878, 11, 30275, 15878, 11, 9683, 15878, 11, 8255, 30547, 15878, 11, 41146, 15878, 11, 4938, 2024, 11, 3254, 24765, 12331, 11, 8829, 15878, 198, 11748, 302, 628, 198, 4862, 62, 260, 25636, ...
2.62624
1,311
# coding: utf-8 ''' ''' from math import ceil import os from flask import json from flask import Flask from flask import request from flask import send_from_directory from flask import render_template # from json_loader import load_locations # from json_loader import prepare_locations from models import Location ...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 7061, 6, 198, 7061, 6, 198, 198, 6738, 10688, 1330, 2906, 346, 198, 11748, 28686, 198, 198, 6738, 42903, 1330, 33918, 198, 6738, 42903, 1330, 46947, 198, 6738, 42903, 1330, 2581, 198, 6738, ...
2.776119
201
from __future__ import annotations from .base import CorkusBase from enum import Enum
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 6738, 764, 8692, 1330, 25567, 385, 14881, 198, 6738, 33829, 1330, 2039, 388, 198 ]
4.095238
21
import pybrisk
[ 198, 11748, 12972, 1671, 1984, 198 ]
2.666667
6
import serial import serial.tools.list_ports from hale_hub.constants import STARTING_OUTLET_COMMAND, SERIAL_BAUD_RATE, SERIAL_TIMEOUT from hale_hub.ifttt_logger import send_ifttt_log _outlet_interface = _OutletInterface() set_outlet_serial_interface = _outlet_interface.set_serial_interface toggle_outlet = _outlet_i...
[ 11748, 11389, 198, 11748, 11389, 13, 31391, 13, 4868, 62, 3742, 198, 6738, 289, 1000, 62, 40140, 13, 9979, 1187, 1330, 33303, 2751, 62, 12425, 28882, 62, 9858, 44, 6981, 11, 18871, 12576, 62, 4339, 8322, 62, 49, 6158, 11, 18871, 12576...
2.78866
194
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import numpy as np def measure_twocores(core_xyz_ref, core_xyz_tar): ''' Measure the following aspects of two helical cores. - Interhelical distance vector between the centers. - Interhelical angle (0-90 degree) ''' # Obtain the centers... ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 299, 32152, 355, 45941, 628, 198, 198, 4299, 3953, 62, 4246, 420, 2850, 7, 7295, 62, 5431, 89, 62, ...
2.220898
1,426
from typing import List with open("dane/liczby.txt") as f: nums: List[int] = [] nums_9_chars: List[int] = [] for line in f: sline = line.strip() num = int(sline, 2) if len(sline) == 9: nums_9_chars.append(num) nums.append(num) count_even = 0 max_num = 0 for n...
[ 6738, 19720, 1330, 7343, 198, 198, 4480, 1280, 7203, 67, 1531, 14, 677, 89, 1525, 13, 14116, 4943, 355, 277, 25, 198, 220, 220, 220, 997, 82, 25, 7343, 58, 600, 60, 796, 17635, 198, 220, 220, 220, 997, 82, 62, 24, 62, 354, 945, ...
1.979472
341
if __name__ == "__main__": print_fib(10) print print_fib2(10)
[ 198, 220, 220, 220, 220, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 3601, 62, 69, 571, 7, 940, 8, 198, 220, 220, 220, 3601, 220, 198, 220, 220, 220, 3601, 62, 69, 571, 17, 7, 94...
1.75
48
import os from typing import List from src.model.Etape import Etape from src.model.Grille import Grille from src.model.ItemCase import ItemCase from src.model.PointMontage import PointMontage from src.model.Robot import Robot from src.model.Tache import Tache
[ 11748, 28686, 198, 6738, 19720, 1330, 7343, 198, 198, 6738, 12351, 13, 19849, 13, 36, 83, 1758, 1330, 17906, 1758, 198, 6738, 12351, 13, 19849, 13, 8642, 8270, 1330, 1902, 8270, 198, 6738, 12351, 13, 19849, 13, 7449, 20448, 1330, 9097, ...
3.38961
77
import os import sys import time import traceback import project1_Copy as p1 import numpy as np verbose = False if __name__ == "__main__": main()
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 640, 198, 11748, 12854, 1891, 198, 11748, 1628, 16, 62, 29881, 355, 279, 16, 198, 11748, 299, 32152, 355, 45941, 198, 198, 19011, 577, 796, 10352, 628, 628, 628, 628, 628, 628, 198, 198, 36...
2.827586
58
""" Unit tests for module `homework_1.tasks.task_3`. """ from tempfile import NamedTemporaryFile from typing import Tuple import pytest from homework_1.tasks.task_3 import find_maximum_and_minimum
[ 37811, 198, 26453, 5254, 329, 8265, 4600, 26452, 6433, 62, 16, 13, 83, 6791, 13, 35943, 62, 18, 44646, 198, 37811, 198, 198, 6738, 20218, 7753, 1330, 34441, 12966, 5551, 8979, 198, 6738, 19720, 1330, 309, 29291, 198, 198, 11748, 12972, ...
3.140625
64
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities fro...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 17202, 39410, 25, 428, 2393, 373, 7560, 416, 262, 21624, 12994, 26144, 35986, 13, 17202, 198, 2, 17202, 2141, 407, 4370, 416, 1021, 4556, 345, 821, 1728, 345, 760, 644, 345, 389, 1804, 0, 17202, ...
2.404444
1,800
# coding:utf-8 import app.admin.views.start import app.admin.views.book import app.admin.views.user import app.admin.views.site
[ 2, 19617, 25, 40477, 12, 23, 198, 198, 11748, 598, 13, 28482, 13, 33571, 13, 9688, 198, 11748, 598, 13, 28482, 13, 33571, 13, 2070, 198, 11748, 598, 13, 28482, 13, 33571, 13, 7220, 198, 11748, 598, 13, 28482, 13, 33571, 13, 15654, ...
2.931818
44
import os import chainer import chainer.links as L from net import SiameseNetwork import numpy as np import matplotlib.pyplot as plt # model = SiameseNetwork() chainer.serializers.load_npz(os.path.join('result', 'model.npz'), model) # _, test = chainer.datasets.get_mnist(ndim=3) test_data, test_label = test._data...
[ 11748, 28686, 198, 198, 11748, 6333, 263, 198, 11748, 6333, 263, 13, 28751, 355, 406, 198, 6738, 2010, 1330, 15638, 1047, 68, 26245, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, ...
2.189189
333
from random import randrange, random from time import time import logging from TwisterTempoGUI import TwisterTempoGUI
[ 6738, 4738, 1330, 43720, 9521, 11, 4738, 198, 6738, 640, 1330, 640, 198, 11748, 18931, 198, 6738, 1815, 1694, 12966, 7501, 40156, 1330, 1815, 1694, 12966, 7501, 40156, 628, 198 ]
4
30
# -*- coding: utf-8 -*- """ Panorama is a Pelican plugin to generate statistics from blog posts (number of posts per month, categories and so on) display them as beautiful charts. Project location: https://github.com/romainx/panorama """ __version__ = "0.2.0" __author__ = "romainx" from .panorama import *
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 15730, 36161, 318, 257, 12903, 7490, 13877, 284, 7716, 7869, 422, 4130, 6851, 198, 7, 17618, 286, 6851, 583, 1227, 11, 9376, 290, 523, 319, 8, 3359, 6...
3.11
100
#!/usr/bin/python2.5 # Copyright (C) 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 17, 13, 20, 198, 198, 2, 15069, 357, 34, 8, 4343, 3012, 3457, 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, ...
3.642105
190
from django.urls import path from . import views from . views import UserPostListView, PostDetailView, PostDeleteview, PostCreateView, PostUpdateView,CommentUpdateView, VideoCreateView, video_update urlpatterns = [ path('',views.base, name='base'), path('login',views.login, name='login'), path('register',v...
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 6738, 764, 1330, 5009, 198, 6738, 764, 5009, 1330, 11787, 6307, 8053, 7680, 11, 2947, 11242, 603, 7680, 11, 2947, 38727, 1177, 11, 2947, 16447, 7680, 11, 2947, 10260, 7680, 11, 21357, ...
2.804613
737
''' compute_collision() will compute the collision of all the entities with a Point while compute_first_collision() will always return its first entry. Especially if a point is on an element edge this can be tricky. You may also want to compare with the Cell.contains(Point) tool. ''' # Script by Rudy at https://fenicsp...
[ 7061, 6, 198, 5589, 1133, 62, 26000, 1166, 3419, 481, 24061, 262, 17661, 286, 477, 262, 12066, 351, 198, 64, 6252, 981, 24061, 62, 11085, 62, 26000, 1166, 3419, 481, 1464, 1441, 663, 717, 5726, 13, 198, 48464, 611, 257, 966, 318, 31...
2.766404
381
import datetime import os from alice_check_train.main import rasp_to_text from alice_check_train.rasp_api import get_rasp, filter_rasp if __name__ == '__main__': main()
[ 11748, 4818, 8079, 198, 11748, 28686, 198, 198, 6738, 435, 501, 62, 9122, 62, 27432, 13, 12417, 1330, 374, 5126, 62, 1462, 62, 5239, 198, 6738, 435, 501, 62, 9122, 62, 27432, 13, 81, 5126, 62, 15042, 1330, 651, 62, 81, 5126, 11, 8...
2.641791
67
# https://medium.com/@kumon/how-to-realize-similarity-search-with-elasticsearch-3dd5641b9adb # https://docs.aws.amazon.com/opensearch-service/latest/developerguide/knn.html import sys import requests import h5py import numpy as np import json import aiohttp import asyncio import time import httpx from requests.auth imp...
[ 2, 3740, 1378, 24132, 13, 785, 14, 31, 74, 388, 261, 14, 4919, 12, 1462, 12, 5305, 1096, 12, 38610, 414, 12, 12947, 12, 4480, 12, 417, 3477, 12947, 12, 18, 1860, 20, 42759, 65, 24, 324, 65, 198, 2, 3740, 1378, 31628, 13, 8356, ...
2.387002
3,062
import platform import textwrap import pytest from . import test_projects, utils dockcross_only_project = test_projects.new_c_project( setup_py_add=textwrap.dedent(r''' import os, sys # check that we're running in the correct docker image as specified in the # environment options CIBW_MA...
[ 11748, 3859, 198, 11748, 2420, 37150, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 764, 1330, 1332, 62, 42068, 11, 3384, 4487, 198, 198, 67, 735, 19692, 62, 8807, 62, 16302, 796, 1332, 62, 42068, 13, 3605, 62, 66, 62, 16302, 7, 198...
2.522321
224
# coding: utf-8 import math import dateutil import dateutil.parser import json from ChartBars import Chart from ChartUpdaterByCCWebsocket import ChartUpdaterByCoincheckWS from Util import BitcoinUtil # a class for one position
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 11748, 10688, 198, 11748, 3128, 22602, 198, 11748, 3128, 22602, 13, 48610, 198, 11748, 33918, 198, 198, 6738, 22086, 33, 945, 1330, 22086, 198, 6738, 22086, 4933, 67, 729, 3886, 4093, 1135, 14...
3.253521
71
from PiRelay8 import Relay import time r1 = Relay("RELAY1") r2 = Relay("RELAY2") r3 = Relay("RELAY3") r4 = Relay("RELAY4") r5 = Relay("RELAY5") r6 = Relay("RELAY6") r7 = Relay("RELAY7") r8 = Relay("RELAY8") r1.off() r2.off() r3.off() r4.off() r5.off() r6.off() r7.off() r8.off() r1.on() time.s...
[ 6738, 13993, 6892, 323, 23, 1330, 4718, 323, 201, 198, 11748, 640, 201, 198, 201, 198, 81, 16, 796, 4718, 323, 7203, 16448, 4792, 16, 4943, 201, 198, 81, 17, 796, 4718, 323, 7203, 16448, 4792, 17, 4943, 201, 198, 81, 18, 796, 4718...
1.615217
460
import rs3clans import discord from discord.ext import commands from bot.bot_client import Bot from bot.utils.tools import separator from bot.utils.context import Context
[ 11748, 44608, 18, 565, 504, 201, 198, 11748, 36446, 201, 198, 6738, 36446, 13, 2302, 1330, 9729, 201, 198, 201, 198, 6738, 10214, 13, 13645, 62, 16366, 1330, 18579, 201, 198, 6738, 10214, 13, 26791, 13, 31391, 1330, 2880, 1352, 201, 1...
3.267857
56
# 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 # distrib...
[ 2, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 921, 743, 7330, 198, 2, 220, 220, 257, 4866,...
3.560847
189
import unittest from typing import Set, Optional, Dict, List from uuid import uuid4 from StructNoSQL import BaseField, MapModel, TableDataModel from tests.components.playground_table_clients import PlaygroundDynamoDBBasicTable, TEST_ACCOUNT_ID if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 6738, 19720, 1330, 5345, 11, 32233, 11, 360, 713, 11, 7343, 198, 6738, 334, 27112, 1330, 334, 27112, 19, 198, 198, 6738, 32112, 2949, 17861, 1330, 7308, 15878, 11, 9347, 17633, 11, 8655, 6601, 17633, 198, 67...
3.148936
94
import unittest from test import test_support import base64 def test_main(): test_support.run_unittest(__name__) if __name__ == '__main__': test_main()
[ 11748, 555, 715, 395, 198, 6738, 1332, 1330, 1332, 62, 11284, 198, 11748, 2779, 2414, 628, 628, 628, 198, 200, 198, 4299, 1332, 62, 12417, 33529, 198, 220, 220, 220, 1332, 62, 11284, 13, 5143, 62, 403, 715, 395, 7, 834, 3672, 834, ...
2.6
65
import numpy as np from ctypes import c_void_p from .Shader import Shader from .transforms import * from OpenGL.GL import *
[ 11748, 299, 32152, 355, 45941, 198, 6738, 269, 19199, 1330, 269, 62, 19382, 62, 79, 198, 198, 6738, 764, 2484, 5067, 1330, 911, 5067, 198, 6738, 764, 7645, 23914, 1330, 1635, 198, 198, 6738, 30672, 13, 8763, 1330, 1635, 198, 220, 220,...
2.755102
49
from argparse import ( ArgumentParser ) from os import getcwd as os_getcwd DEFAULT_OUTPUT_FOLDER = os_getcwd() DEFAULT_SAMPLE_VOLUME = 10000
[ 6738, 1822, 29572, 1330, 357, 198, 220, 220, 220, 45751, 46677, 198, 220, 220, 220, 1267, 198, 6738, 28686, 1330, 651, 66, 16993, 355, 28686, 62, 1136, 66, 16993, 198, 198, 7206, 38865, 62, 2606, 7250, 3843, 62, 37, 3535, 14418, 796, ...
2.491803
61
import math x = float(input()) prop_2 = -(x**2) / math.factorial(2) prop_3 = (x**4) / math.factorial(4) prop_4 = -(x**6) / math.factorial(6) cos_x = float(1 + prop_2 + prop_3 + prop_4) print(prop_2) print(prop_3) print(prop_4) print(cos_x)
[ 11748, 10688, 198, 198, 87, 796, 12178, 7, 15414, 28955, 198, 198, 22930, 62, 17, 796, 532, 7, 87, 1174, 17, 8, 1220, 10688, 13, 22584, 5132, 7, 17, 8, 198, 198, 22930, 62, 18, 796, 357, 87, 1174, 19, 8, 1220, 10688, 13, 22584, ...
2.033058
121
import pytest from datagateway_api.src.common.exceptions import BadRequestError, FilterError from datagateway_api.src.datagateway_api.filter_order_handler import FilterOrderHandler from datagateway_api.src.datagateway_api.icat.filters import PythonICATWhereFilter
[ 11748, 12972, 9288, 198, 198, 6738, 4818, 37861, 1014, 62, 15042, 13, 10677, 13, 11321, 13, 1069, 11755, 1330, 7772, 18453, 12331, 11, 25853, 12331, 198, 6738, 4818, 37861, 1014, 62, 15042, 13, 10677, 13, 19608, 37861, 1014, 62, 15042, ...
3.410256
78
# -*- coding: utf-8 -*- # Define here the models for your scraped items # # See documentation in: # https://doc.scrapy.org/en/latest/topics/items.html import scrapy from scrapy.loader import ItemLoader from scrapy.loader.processors import TakeFirst # class SpiderItem(scrapy.Item): # # define the fields for your...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 2896, 500, 994, 262, 4981, 329, 534, 15881, 276, 3709, 198, 2, 198, 2, 4091, 10314, 287, 25, 198, 2, 3740, 1378, 15390, 13, 1416, 2416, 88, 13, 2398, 14, 2...
2.615023
213
# # (C) Copyright 2013 Enthought, Inc., Austin, TX # All right reserved. # # This file is open source software distributed according to the terms in # LICENSE.txt # """ Context holding multiple subcontexts. """ from __future__ import absolute_import from itertools import chain from collections import MutableMapping ...
[ 2, 198, 2, 357, 34, 8, 15069, 2211, 2039, 28895, 11, 3457, 1539, 9533, 11, 15326, 198, 2, 1439, 826, 10395, 13, 198, 2, 198, 2, 770, 2393, 318, 1280, 2723, 3788, 9387, 1864, 284, 262, 2846, 287, 198, 2, 38559, 24290, 13, 14116, ...
3.477273
176
"""A simple file to test the line_counter performance in python This is a multiline doctest """ __author__ = "Frederico Moeller" __copyright__ = "" __credits__ = ["Frederico Moeller"] __license__ = "MIT" __version__ = "1.0.1" __maintainer__ = "Frederico Moeller" __email__ = "" __status__ = "" #import things import ma...
[ 37811, 32, 2829, 2393, 284, 1332, 262, 1627, 62, 24588, 2854, 287, 21015, 198, 1212, 318, 257, 1963, 346, 500, 10412, 395, 198, 37811, 198, 198, 834, 9800, 834, 796, 366, 30847, 263, 3713, 4270, 12368, 1, 198, 834, 22163, 4766, 834, ...
2.330882
272
"""Data pipelines.""" from collections import defaultdict, OrderedDict from tqdm import tqdm from torch.utils.data import TensorDataset, DataLoader, RandomSampler, SequentialSampler import torch def get_info(examples, vocab=None, max_seq_len=256): """Gathers info on and creats a featurized example generator for...
[ 37811, 6601, 31108, 526, 15931, 198, 198, 6738, 17268, 1330, 4277, 11600, 11, 14230, 1068, 35, 713, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 309, 22854, 27354, 292, 316, 11, 60...
2.471354
768
# Take number, and convert integer to string # Calculate and return number of digits # Define main function # Call main function main()
[ 2, 7214, 1271, 11, 290, 10385, 18253, 284, 4731, 198, 2, 27131, 378, 290, 1441, 1271, 286, 19561, 628, 198, 2, 2896, 500, 1388, 2163, 198, 220, 220, 220, 220, 198, 2, 4889, 1388, 2163, 198, 12417, 3419, 198 ]
3.666667
39
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import absolute_import from __future__ import unicode_literals from __future__ import division from future import standard_library standard_library.install_aliases() from builtins import * import re import sys import os import subprocess imp...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, ...
1.734445
2,459
import asyncio from contextlib import AsyncExitStack from aiogram.dispatcher.filters.state import StatesGroup, State from aiogram.dispatcher.storage import FSMContextProxy from aiogram.types import Message, PhotoSize, ReplyKeyboardRemove, ContentTypes from aiogram.utils.helper import HelperMode from dialog.avatar_ima...
[ 11748, 30351, 952, 198, 6738, 4732, 8019, 1330, 1081, 13361, 30337, 25896, 198, 198, 6738, 257, 72, 21857, 13, 6381, 8071, 2044, 13, 10379, 1010, 13, 5219, 1330, 1829, 13247, 11, 1812, 198, 6738, 257, 72, 21857, 13, 6381, 8071, 2044, ...
3.488235
170
from skimage.metrics import structural_similarity as ssim from glob import glob from PIL import Image import numpy as np import ntpath import dhash import cv2 from database_structure import database_migrations IMAGE_FOLDER = "./image_store" ALLOWED_EXTENSIONS = ['png', 'jpg', 'jpeg'] image_store_hash = dict() db_ops ...
[ 6738, 1341, 9060, 13, 4164, 10466, 1330, 13204, 62, 38610, 414, 355, 264, 14323, 198, 6738, 15095, 1330, 15095, 198, 6738, 350, 4146, 1330, 7412, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 299, 83, 6978, 198, 11748, 288, 17831, 198...
3.035088
114
import discord from discord.ext import commands import os import json from datetime import date, datetime, timedelta from .utils import helper_functions as hf from copy import deepcopy dir_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__))).replace('\\', '/')
[ 11748, 36446, 198, 6738, 36446, 13, 2302, 1330, 9729, 198, 11748, 28686, 198, 11748, 33918, 198, 6738, 4818, 8079, 1330, 3128, 11, 4818, 8079, 11, 28805, 12514, 198, 6738, 764, 26791, 1330, 31904, 62, 12543, 2733, 355, 289, 69, 198, 673...
3.309524
84
#!/usr/bin/env python3 from components import ProgramState import binaryninja as binja import argparse import os.path import curses # TODO...impliment live-refreashing the settings.json during run (add the keybinding and check for it here in the global input loop) # TODO...support multi-key presses? Not sure if this ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 6738, 6805, 1330, 6118, 9012, 198, 11748, 13934, 35073, 6592, 355, 9874, 6592, 198, 11748, 1822, 29572, 198, 11748, 28686, 13, 6978, 198, 11748, 43878, 198, 198, 2, 16926, 46, ...
3.416667
168
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
[ 2, 15069, 1853, 383, 309, 22854, 37535, 46665, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, ...
4.017391
230
import moviepy.editor as mpy import moviepy.video.fx.all as vfx import subprocess as sp # Crop and resize video clip = mpy.VideoFileClip("smoke.mp4") (w, h) = clip.size cropped_clip = vfx.crop(clip, width=(h/128)*64, height=h, x1=w/4*3-100, y1=0).resize((64, 128)) cropped_clip.write_videofile('smoke-cropped.mp4') # C...
[ 11748, 3807, 9078, 13, 35352, 355, 285, 9078, 198, 11748, 3807, 9078, 13, 15588, 13, 21373, 13, 439, 355, 410, 21373, 198, 11748, 850, 14681, 355, 599, 198, 198, 2, 327, 1773, 290, 47558, 2008, 198, 15036, 796, 285, 9078, 13, 10798, ...
2.444444
297
"""This contains the configuration of the Rolodex application.""" # Django Imports from django.apps import AppConfig
[ 37811, 1212, 4909, 262, 8398, 286, 262, 371, 349, 375, 1069, 3586, 526, 15931, 198, 198, 2, 37770, 1846, 3742, 198, 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
3.966667
30
# Generated by Django 4.0.3 on 2022-03-01 14:42 from django.conf import settings from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 604, 13, 15, 13, 18, 319, 33160, 12, 3070, 12, 486, 1478, 25, 3682, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
3.1
40
''' Created on Mar 22, 2020 @author: Michal.Busta at gmail.com ''' #get rid of the optimizer state ... import torch MODEL_PATH = '/models/model-b2-2.pth' state = torch.load(MODEL_PATH, map_location=lambda storage, loc: storage) state_out = { "state_dict": state["state_dict"], } torch.save(state_out, 'model-b2-2....
[ 7061, 6, 198, 41972, 319, 1526, 2534, 11, 12131, 198, 198, 31, 9800, 25, 2843, 282, 13, 33, 436, 64, 379, 308, 4529, 13, 785, 198, 7061, 6, 198, 198, 2, 1136, 5755, 286, 262, 6436, 7509, 1181, 2644, 220, 198, 11748, 28034, 198, ...
2.51938
129
import os import re from setuptools import setup version = re.search( '^__version__\s*=\s*"(.*)"', open('braumeister/braumeister.py').read(), re.M ).group(1) setup( name="braumeister", packages=["braumeister", "braumeister.actions"], version=version, author="Marcel Steffen", author_...
[ 11748, 28686, 198, 11748, 302, 198, 198, 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 9641, 796, 302, 13, 12947, 7, 198, 220, 220, 220, 705, 61, 834, 9641, 834, 59, 82, 9, 28, 59, 82, 9, 18109, 15885, 16725, 3256, 198, 220, 220,...
2.551724
406
# standard library imports import os # third party imports import numpy as np from PIL import Image import torch.nn as nn from torchvision import transforms # local imports import config from . import utils from . import geometric_transformer
[ 2, 3210, 5888, 17944, 198, 11748, 28686, 198, 198, 2, 2368, 2151, 17944, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 350, 4146, 1330, 7412, 198, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 6738, 28034, 10178, 1330, 31408, 628, ...
3.90625
64
from pathlib import Path import h5py import numpy as np from torchvision.datasets.vision import VisionDataset from PIL import Image import requests import zipfile from tqdm import tqdm
[ 6738, 3108, 8019, 1330, 10644, 198, 198, 11748, 289, 20, 9078, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 28034, 10178, 13, 19608, 292, 1039, 13, 10178, 1330, 19009, 27354, 292, 316, 198, 6738, 350, 4146, 1330, 7412, 198, 198, 11748...
3.339286
56
""" link: https://leetcode.com/problems/permutations-ii problem: nums solution: 46 """
[ 37811, 201, 198, 201, 198, 8726, 25, 3740, 1378, 293, 316, 8189, 13, 785, 14, 1676, 22143, 14, 16321, 32855, 12, 4178, 201, 198, 201, 198, 45573, 25, 997, 82, 201, 198, 201, 198, 82, 2122, 25, 6337, 201, 198, 201, 198, 37811, 201,...
2.222222
45
import findspark findspark.init() from pyspark import SparkConf,SparkContext from pyspark.streaming import StreamingContext from pyspark.sql import Row,SQLContext import sys import requests conf=SparkConf() conf.setAppName("BigData") sc=SparkContext(conf=conf) ssc=StreamingContext(sc,int(sys.argv[1])) ssc.checkpo...
[ 11748, 1064, 2777, 668, 198, 19796, 2777, 668, 13, 15003, 3419, 198, 198, 6738, 279, 893, 20928, 1330, 17732, 18546, 11, 4561, 668, 21947, 198, 6738, 279, 893, 20928, 13, 5532, 278, 1330, 43124, 21947, 198, 6738, 279, 893, 20928, 13, ...
2.484393
865
# Generated by Django 4.0.1 on 2022-01-20 13:10 import courses.fields from django.db import migrations
[ 2, 2980, 515, 416, 37770, 604, 13, 15, 13, 16, 319, 33160, 12, 486, 12, 1238, 1511, 25, 940, 198, 198, 11748, 10902, 13, 25747, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
3
35
#Atoi stands for ASCII to Integer Conversion #Adjustment contains rule of three for calculating an integer given another integer representing a percentage
[ 2, 32, 1462, 72, 6296, 329, 37101, 284, 34142, 44101, 198, 198, 2, 39668, 434, 4909, 3896, 286, 1115, 329, 26019, 281, 18253, 1813, 1194, 18253, 10200, 257, 5873, 198 ]
5.2
30
#!/usr/bin/python # Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 15069, 1584, 3012, 3457, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428...
3.837104
221
################################################## # ./AppService_services.py # generated by ZSI.wsdl2python # # ################################################## from .AppService_services_types import * from .AppService_services_types import \ nbcr_sdsc_edu_opal_types as ns1 import urllib.parse, types from...
[ 29113, 14468, 2235, 220, 198, 2, 24457, 4677, 16177, 62, 30416, 13, 9078, 220, 198, 2, 7560, 416, 1168, 11584, 13, 18504, 25404, 17, 29412, 220, 198, 2, 220, 198, 2, 220, 198, 29113, 14468, 2235, 628, 198, 6738, 764, 4677, 16177, 62...
3.527273
110
# Copyright (c) 2020-2022, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
[ 2, 15069, 357, 66, 8, 12131, 12, 1238, 1828, 11, 15127, 23929, 44680, 6234, 13, 220, 1439, 2489, 10395, 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...
3.090909
297
# -*- coding: utf-8 -*- # Copyright 1999-2020 Alibaba Group Holding Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 7358, 12, 42334, 41992, 4912, 31703, 12052, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, ...
3.628571
210
from unittest import TestCase import torch import transformers from model.bert_model import BertModel
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 11748, 28034, 198, 198, 11748, 6121, 364, 198, 198, 6738, 2746, 13, 4835, 62, 19849, 1330, 22108, 17633, 628 ]
3.888889
27
import json import os import tempfile from unittest import TestCase import pytest from donjuan import Dungeon, DungeonRandomizer, Renderer
[ 11748, 33918, 198, 11748, 28686, 198, 11748, 20218, 7753, 198, 6738, 555, 715, 395, 1330, 6208, 20448, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 836, 73, 7258, 1330, 11995, 11, 11995, 29531, 7509, 11, 28703, 11882, 628 ]
3.736842
38
"""Spinnaker validate functions.""" import logging from .consts import API_URL from .utils.credentials import get_env_credential LOG = logging.getLogger(__name__) def validate_gate(): """Check Gate connection.""" try: credentials = get_env_credential() LOG.debug('Found credentials: %s', cred...
[ 37811, 4561, 3732, 3110, 26571, 5499, 526, 15931, 198, 11748, 18931, 198, 198, 6738, 764, 1102, 6448, 1330, 7824, 62, 21886, 198, 6738, 764, 26791, 13, 66, 445, 14817, 1330, 651, 62, 24330, 62, 66, 445, 1843, 198, 198, 25294, 796, 189...
2.744395
223
# -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2017-03-15 00:56 from __future__ import unicode_literals from django.conf import settings import django.contrib.postgres.fields.jsonb from django.db import migrations, models import django.db.models.deletion
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 940, 13, 21, 319, 2177, 12, 3070, 12, 1314, 3571, 25, 3980, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, ...
2.891304
92
#!/usr/bin/env python # -*- coding: utf-8 -*- import sqlite3 as sqlite import os.path as osp import sys
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 44161, 578, 18, 355, 44161, 578, 198, 11748, 28686, 13, 6978, 355, 267, 2777, 198, 11748, 25064, 198 ]
2.47619
42
""" easy way to use losses """ from center_loss import Centerloss import torch.nn as nn from FocalLoss import FocalLoss
[ 37811, 198, 38171, 835, 284, 779, 9089, 198, 37811, 198, 6738, 3641, 62, 22462, 1330, 3337, 22462, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 6738, 376, 4374, 43, 793, 1330, 376, 4374, 43, 793, 198 ]
3.243243
37
# Copyright 2016 Rackspace Australia # 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 requi...
[ 2, 15069, 1584, 37927, 13200, 4505, 198, 2, 1439, 6923, 33876, 13, 198, 2, 198, 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,...
3.538983
295
import os import sys import json sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "../../bert"))) sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "../../"))) import tokenization from config import config if __name__=="__main__": DATA_INPUT_DIR = config.data_dir D...
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 33918, 198, 17597, 13, 6978, 13, 33295, 7, 418, 13, 6978, 13, 397, 2777, 776, 7, 418, 13, 6978, 13, 22179, 7, 418, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 828, 366, 40720, 40720, ...
2.496094
256
import typing # noqa from google.protobuf import descriptor from google.protobuf.json_format import _IsMapEntry, _Printer from google.protobuf.message import Message # noqa from clarifai.rest.grpc.proto.clarifai.api.utils import extensions_pb2
[ 11748, 19720, 220, 1303, 645, 20402, 198, 198, 6738, 23645, 13, 11235, 672, 3046, 1330, 43087, 198, 6738, 23645, 13, 11235, 672, 3046, 13, 17752, 62, 18982, 1330, 4808, 3792, 13912, 30150, 11, 4808, 6836, 3849, 198, 6738, 23645, 13, 112...
3.08642
81
from .capsulenet import *
[ 6738, 764, 27979, 377, 268, 316, 1330, 1635, 198 ]
2.888889
9
#!/usr/bin/env python # # -*- coding: utf-8 -*- # # Copyright (c) 2018 JiNong, Inc. # All right reserved. # import struct import time import socket import select import traceback import hashlib import json from enum import IntEnum from threading import Thread, Lock from mate import Mate, ThreadMate, DevType from mbloc...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 357, 66, 8, 2864, 29380, 45, 506, 11, 3457, 13, 198, 2, 1439, 826, 10395, 13, 198, 2, ...
2.057087
3,591
import demjson import sys from subprocess import Popen, PIPE import subprocess import xml.etree.ElementTree as ET import os from datetime import datetime from functions import runcommand #from sets import Set #run test ########################## main function ############################### # a command will like ...
[ 11748, 1357, 17752, 198, 11748, 25064, 198, 6738, 850, 14681, 1330, 8099, 268, 11, 350, 4061, 36, 198, 11748, 850, 14681, 198, 11748, 35555, 13, 316, 631, 13, 20180, 27660, 355, 12152, 198, 11748, 28686, 198, 6738, 4818, 8079, 1330, 481...
2.460979
2,063
# flake8: noqa: F401 from .context_manager_hook import ContextManagerHook from .counter_hook import CounterHook from .file_open_hook import FileOpenHook from .logging_hook import LoggingHook from .profiler_hook import ProfilerHook from .runtime_audit_hook import RuntimeAuditHook from .stack_trace_hook import StackTrace...
[ 2, 781, 539, 23, 25, 645, 20402, 25, 376, 21844, 198, 6738, 764, 22866, 62, 37153, 62, 25480, 1330, 30532, 13511, 39, 566, 198, 6738, 764, 24588, 62, 25480, 1330, 15034, 39, 566, 198, 6738, 764, 7753, 62, 9654, 62, 25480, 1330, 9220...
2.698113
212
import pytest import numpy as np import pandas as pd from hypothetical._lib import _build_des_mat
[ 11748, 12972, 9288, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 25345, 13557, 8019, 1330, 4808, 11249, 62, 8906, 62, 6759, 628, 628 ]
3.366667
30
#!/usr/bin/env python3 # Copyright (c) 2017 Computer Vision Center (CVC) at the Universitat Autonoma de # Barcelona (UAB). # # This work is licensed under the terms of the MIT license. # For a copy, see <https://opensource.org/licenses/MIT>. """Download big files from Google Drive.""" import shutil import sys import...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 15069, 357, 66, 8, 2177, 13851, 19009, 3337, 357, 34, 15922, 8, 379, 262, 26986, 270, 265, 5231, 261, 6086, 390, 198, 2, 15142, 357, 52, 6242, 737, 198, 2, 198, 2, 77...
3.217391
138
# -*- coding: utf-8 -*- """ """ import time import tkinter import tkinter.messagebox if __name__ == '__main__': main()
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 201, 198, 37811, 201, 198, 11748, 640, 201, 198, 11748, 256, 74, 3849, 201, 198, 11748, 256, 74, 3849, 13, 20500, 3524, 201, 198, 201, 198, 201, ...
2.014085
71
""" GitLab webhook receiver - see http://doc.gitlab.com/ee/web_hooks/web_hooks.html """ import asyncio import json import logging from sinks.base_bot_request_handler import AsyncRequestHandler logger = logging.getLogger(__name__) try: import dateutil.parser except ImportError: logger.error("missing module p...
[ 37811, 198, 38, 270, 17822, 3992, 25480, 9733, 532, 766, 2638, 1378, 15390, 13, 18300, 23912, 13, 785, 14, 1453, 14, 12384, 62, 25480, 82, 14, 12384, 62, 25480, 82, 13, 6494, 198, 37811, 198, 198, 11748, 30351, 952, 198, 11748, 33918,...
3.040323
124
from evsim.system_simulator import SystemSimulator from evsim.behavior_model_executor import BehaviorModelExecutor from evsim.system_message import SysMessage from evsim.definition import * import os import subprocess as sp
[ 6738, 819, 14323, 13, 10057, 62, 14323, 8927, 1330, 4482, 8890, 8927, 201, 198, 6738, 819, 14323, 13, 46571, 62, 19849, 62, 18558, 38409, 1330, 20181, 17633, 23002, 38409, 201, 198, 6738, 819, 14323, 13, 10057, 62, 20500, 1330, 311, 893...
3.553846
65
import os from typing import Union, List from tei_entity_enricher.interface.postprocessing.io import FileReader, FileWriter from tei_entity_enricher.util.helper import local_save_path, makedir_if_necessary from tei_entity_enricher.util.exceptions import FileNotFound
[ 11748, 28686, 201, 198, 6738, 19720, 1330, 4479, 11, 7343, 201, 198, 6738, 573, 72, 62, 26858, 62, 268, 1173, 372, 13, 39994, 13, 7353, 36948, 13, 952, 1330, 9220, 33634, 11, 9220, 34379, 201, 198, 6738, 573, 72, 62, 26858, 62, 268,...
3.113636
88
import logging logger = logging.getLogger(__name__) logger.addHandler(logging.NullHandler()) logger.level = logging.DEBUG
[ 11748, 18931, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 198, 6404, 1362, 13, 2860, 25060, 7, 6404, 2667, 13, 35067, 25060, 28955, 198, 6404, 1362, 13, 5715, 796, 18931, 13, 30531 ]
3.128205
39
from args import get_argparser, parse_args, get_aligner, get_bbox if __name__ == '__main__': parser = get_argparser() args = parse_args(parser) a = get_aligner(args) bbox = get_bbox(args) for z in range(args.bbox_start[2], args.bbox_stop[2]): print('Rendering z={0}'.format(z)) render(a, bbox, z) ...
[ 6738, 26498, 1330, 651, 62, 853, 48610, 11, 21136, 62, 22046, 11, 651, 62, 31494, 263, 11, 651, 62, 65, 3524, 220, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 30751, 796, 651, 62, 853, 48610, 3419, ...
2.360294
136
# -*- coding: utf-8 -*- # # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 12131, 3012, 11419, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779...
2.279558
19,563
#/usr/bin/python __version__ = '1.0' __author__ = 'alastair.maxwell@glasgow.ac.uk' ## ## Imports import string import os import errno import shutil import sys import glob import datetime import subprocess import logging as log import numpy as np import csv from io import StringIO import PyPDF2 from sklearn import prep...
[ 2, 14, 14629, 14, 8800, 14, 29412, 198, 834, 9641, 834, 796, 705, 16, 13, 15, 6, 198, 834, 9800, 834, 796, 705, 282, 459, 958, 13, 29047, 31, 14391, 21175, 13, 330, 13, 2724, 6, 198, 198, 2235, 198, 2235, 1846, 3742, 198, 11748,...
2.708343
4,399
# Copyright (c) OpenMMLab. All rights reserved. import torch from mmedit.models.backbones import ContextualAttentionNeck, DeepFillEncoder from mmedit.models.common import SimpleGatedConvModule
[ 2, 15069, 357, 66, 8, 4946, 44, 5805, 397, 13, 1439, 2489, 10395, 13, 198, 11748, 28034, 198, 198, 6738, 285, 1150, 270, 13, 27530, 13, 1891, 35095, 1330, 30532, 723, 8086, 1463, 8199, 694, 11, 10766, 33762, 27195, 12342, 198, 6738, ...
3.37931
58
# Generated by Django 2.2.13 on 2020-11-27 05:49 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 1485, 319, 12131, 12, 1157, 12, 1983, 8870, 25, 2920, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.875
32
# Generated by Django 3.2.4 on 2021-07-14 11:55 from django.db import migrations, models import uuid
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 19, 319, 33448, 12, 2998, 12, 1415, 1367, 25, 2816, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 334, 27112, 628 ]
2.861111
36
import json import os import nibabel as nib import csv from operator import itemgetter # PATH TO PREPROCESSED DATA raw_data_path = '/home/lab/nnUNet_data/nnUNet_raw_data_base/nnUNet_raw_data/Task500_BrainMets' pixdim_ind = [1,2,3] # Indexes at which the voxel size [x,y,z] is stored # PATH TO JSON FILE with open('/h...
[ 11748, 33918, 198, 11748, 28686, 198, 11748, 33272, 9608, 355, 33272, 198, 11748, 269, 21370, 198, 198, 6738, 10088, 1330, 2378, 1136, 353, 198, 198, 2, 46490, 5390, 22814, 4805, 4503, 7597, 1961, 42865, 198, 1831, 62, 7890, 62, 6978, 7...
2.300435
689
# -*- coding: utf-8 -*- """ tornadio2.tests.gen ~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2011 by the Serge S. Koval, see AUTHORS for more details. :license: Apache, see LICENSE for more details. """ from collections import deque from nose.tools import eq_ from tornadio2 import gen _queue = None ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 220, 220, 220, 12445, 324, 952, 17, 13, 41989, 13, 5235, 198, 220, 220, 220, 220, 27156, 4907, 93, 628, 220, 220, 220, 1058, 22163, 4766, 25, 357, 66, 8,...
2.315018
546
#! /usr/bin/env python # -*- coding: utf-8 -*- # # author: Avinash Kori # contact: koriavinash1@gmail.com import torch import SimpleITK as sitk import numpy as np import nibabel as nib from torch.autograd import Variable from skimage.transform import resize from torchvision import transforms from time import gmtime, ...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 220, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 1772, 25, 5184, 259, 1077, 509, 10145, 198, 2, 2800, 25, 479, 7661, 7114, 1077, 16, 31, 14816, ...
3.469636
247
import numpy as np from statsmodels.discrete.conditional_models import ( ConditionalLogit, ConditionalPoisson) from statsmodels.tools.numdiff import approx_fprime from numpy.testing import assert_allclose import pandas as pd
[ 11748, 299, 32152, 355, 45941, 198, 6738, 9756, 27530, 13, 15410, 8374, 13, 17561, 1859, 62, 27530, 1330, 357, 198, 220, 220, 220, 220, 220, 9724, 1859, 11187, 270, 11, 9724, 1859, 18833, 30927, 8, 198, 6738, 9756, 27530, 13, 31391, 1...
3.352113
71