content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
# Copyright (c) 2017, Mayo Clinic # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # Redistributions of source code must retain the above copyright notice, this # list of conditions and the f...
[ 2, 15069, 357, 66, 8, 2177, 11, 32987, 26690, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 2297, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, 11, 351, 393, 1231, 17613, 11, 198, 2, 389, 10431, 2810, 326, 262, 1708, 3403, ...
3.399225
516
# Created by rahman at 15:20 2020-03-05 using PyCharm import subprocess from image_attacks.im_utils import slice_files, combine_files, clean_trim, count_cats, make_features_counts, score from shared_tools.utils import make_allPairs, classifiers, DATAPATH, city def attack_images(cores, prob_cutoff): """ :p...
[ 2, 15622, 416, 374, 993, 805, 379, 1315, 25, 1238, 12131, 12, 3070, 12, 2713, 1262, 9485, 1925, 1670, 198, 11748, 850, 14681, 198, 198, 6738, 2939, 62, 38458, 13, 320, 62, 26791, 1330, 16416, 62, 16624, 11, 12082, 62, 16624, 11, 342...
2.545741
634
import numpy as np from dr.backend.base import Backend
[ 11748, 299, 32152, 355, 45941, 198, 198, 6738, 1553, 13, 1891, 437, 13, 8692, 1330, 5157, 437, 628 ]
3.166667
18
from random import randint from time import sleep computador = randint(1, 5) print('\033[34m-==-\033[m'*17) print('Vamos jogar um jogo, tente adivinhar o número que estou pensando !') sleep(1) jogador = int(input('Chute um valor de 1 até 5: ')) print('PROCESSANDO...') sleep(1) if jogador == computador: print('\033...
[ 6738, 4738, 1330, 43720, 600, 198, 6738, 640, 1330, 3993, 198, 785, 1996, 7079, 796, 43720, 600, 7, 16, 11, 642, 8, 198, 4798, 10786, 59, 44427, 58, 2682, 76, 12, 855, 12, 59, 44427, 58, 76, 6, 9, 1558, 8, 198, 4798, 10786, 53, ...
2.298387
248
from datetime import date from dateutil.relativedelta import relativedelta from celery.task import task, group from django.db.models import Sum, Count from go.billing import settings from go.billing.models import ( Account, Transaction, MessageCost, Statement, LineItem) from go.base.utils import vumi_api ...
[ 6738, 4818, 8079, 1330, 3128, 198, 198, 6738, 3128, 22602, 13, 2411, 265, 1572, 12514, 1330, 48993, 1572, 12514, 198, 198, 6738, 18725, 1924, 13, 35943, 1330, 4876, 11, 1448, 198, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 1330, 5060...
2.644018
677
_base_ = './i_base.py' item_cfg = {'b': 2} item6 = {'cfg': item_cfg}
[ 62, 8692, 62, 796, 705, 19571, 72, 62, 8692, 13, 9078, 6, 198, 9186, 62, 37581, 796, 1391, 6, 65, 10354, 362, 92, 198, 9186, 21, 796, 1391, 6, 37581, 10354, 2378, 62, 37581, 92, 198 ]
1.916667
36
""" Copyright 2020 The OneFlow Authors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
[ 37811, 198, 15269, 12131, 383, 1881, 37535, 46665, 13, 1439, 2489, 10395, 13, 198, 198, 26656, 15385, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 5832, 743, 407, 779, 428, 2393, 2845, 287, 11846, ...
3.6097
433
import sys import csv import re from modules.pixelBasedDecoding import decodePixelBased # Input parsing: # needs to know up front how large the image is going to be x_dim = int(sys.argv[1]) y_dim = int(sys.argv[2]) # Extract tile nr tile_nr = sys.argv[3] tile_nr_int = int(re.findall(r"\d+", tile_nr)[0]) codebook ...
[ 11748, 25064, 198, 11748, 269, 21370, 198, 11748, 302, 198, 6738, 13103, 13, 32515, 15001, 10707, 7656, 1330, 36899, 40809, 15001, 198, 198, 2, 23412, 32096, 25, 198, 198, 2, 2476, 284, 760, 510, 2166, 703, 1588, 262, 2939, 318, 1016, ...
2.561934
331
# Generated by Django 3.2.6 on 2021-08-08 21:52 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 21, 319, 33448, 12, 2919, 12, 2919, 2310, 25, 4309, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
import os, sys os.chdir("G:\\My Drive\\Academic\\Research\\Neural Heap") from neural_heap.dataset.io_synthesis.io_synthesis_args import IOSynthesisArgs from neural_heap.dataset.io_synthesis.io_synthesis_utils import IOSynthesisUtils
[ 11748, 28686, 11, 25064, 201, 198, 418, 13, 354, 15908, 7203, 38, 25, 6852, 3666, 9974, 6852, 12832, 49113, 6852, 25104, 6852, 8199, 1523, 679, 499, 4943, 201, 198, 6738, 17019, 62, 258, 499, 13, 19608, 292, 316, 13, 952, 62, 1837, ...
2.5
98
from pyteal import * from algosdk.v2client import algod from algosdk import account, mnemonic import pyteal # from deploy import PytealDeploy algod_token = 'B3SU4KcVKi94Jap2VXkK83xx38bsv95K5UZm2lab' algod_addres = "http://testnet-algorand.api.purestake.io/ps2" purestack_token = { "X-Api-Key": algod_to...
[ 6738, 12972, 660, 282, 1330, 1635, 201, 198, 6738, 435, 70, 418, 34388, 13, 85, 17, 16366, 1330, 435, 25344, 201, 198, 6738, 435, 70, 418, 34388, 1330, 1848, 11, 285, 77, 50016, 201, 198, 11748, 12972, 660, 282, 201, 198, 201, 198, ...
1.976027
292
# Copyright (c) 2016 Mirantis, 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 law...
[ 2, 220, 220, 220, 15069, 357, 66, 8, 1584, 7381, 20836, 11, 3457, 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,...
3.294355
248
#!/usr/bin/python # See file COPYING distributed with python-hypothesis for copyright and # license. from setuptools import setup long_description = open('README.rst').read() setup(name='python-hypothesis', version='0.4.2', description='Python library for the Hypothes.is API', author='Christia...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 2, 4091, 2393, 27975, 45761, 9387, 351, 21015, 12, 36362, 313, 8497, 329, 6634, 290, 220, 198, 2, 5964, 13, 198, 198, 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 6511, 62, 11213, 79...
2.216117
546
# -*- coding: utf-8 -*- # Generated by Django 1.10.7 on 2018-04-22 14:31 from __future__ import unicode_literals from django.db import migrations, models
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 940, 13, 22, 319, 2864, 12, 3023, 12, 1828, 1478, 25, 3132, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, ...
2.736842
57
""" Copyright 2020 The OneFlow Authors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
[ 37811, 198, 15269, 12131, 383, 1881, 37535, 46665, 13, 1439, 2489, 10395, 13, 198, 198, 26656, 15385, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 5832, 743, 407, 779, 428, 2393, 2845, 287, 11846, ...
2.610039
777
someList = ['470 градусов по фаренгейту', 'Сталкер', 'Наруто', 'Форсаж', 'Оно', 'Оно2', 'Смешарики', 'Лунтик'] print(someList) someList.append('frdfvty') del someList[8] print(someList)
[ 11246, 8053, 796, 37250, 27790, 12466, 111, 21169, 16142, 43666, 35072, 21727, 25443, 110, 12466, 123, 15166, 220, 141, 226, 16142, 21169, 16843, 22177, 140, 111, 16843, 140, 117, 20375, 35072, 3256, 705, 140, 94, 20375, 16142, 30143, 31583...
1.453125
128
import asyncio from aiogoogle import Aiogoogle, GoogleAPI from aiogoogle.auth.creds import ClientCreds, UserCreds import base64 import bs4 import json import scraper.util import scraper.flags AUTHOR = "Erratic Errata"
[ 11748, 30351, 952, 198, 6738, 257, 72, 24076, 2467, 1330, 38230, 24076, 2467, 11, 3012, 17614, 198, 6738, 257, 72, 24076, 2467, 13, 18439, 13, 66, 445, 82, 1330, 20985, 34, 445, 82, 11, 11787, 34, 445, 82, 198, 11748, 2779, 2414, 19...
2.857143
77
# Copyright 2021-2022 VMware, Inc. # SPDX-License-Identifier: BSD-2-Clause
[ 2, 15069, 33448, 12, 1238, 1828, 37754, 11, 3457, 13, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 347, 10305, 12, 17, 12, 2601, 682, 198 ]
2.678571
28
"""Storage engine sanity tests""" from pymongo import MongoClient import copy import unittest import time from . import storage ITEM_VISIBLE = {"key" : "valueA", storage.VISIBLE_KEY : True} ITEM_HIDDEN = {"key" : "valueB"} def is_same_dictionary(a, b): """Shallow dictionary comparison""" keysA = set(a.keys...
[ 37811, 31425, 3113, 34182, 5254, 37811, 198, 198, 6738, 279, 4948, 25162, 1330, 42591, 11792, 198, 11748, 4866, 198, 11748, 555, 715, 395, 198, 11748, 640, 198, 198, 6738, 764, 1330, 6143, 198, 198, 2043, 3620, 62, 29817, 34563, 796, 19...
2.738235
340
import torch import copy from torch import nn from torch.nn import functional as F from torch.nn.modules.container import ModuleList class NeighborAttention(nn.Module): """ A graph-based attention replacement. """ class NeighborEncoderLayer(nn.Module): """ Copy-paste of torch.nn.TransformerEnco...
[ 11748, 28034, 198, 11748, 4866, 198, 198, 6738, 28034, 1330, 299, 77, 198, 6738, 28034, 13, 20471, 1330, 10345, 355, 376, 198, 6738, 28034, 13, 20471, 13, 18170, 13, 34924, 1330, 19937, 8053, 628, 198, 4871, 28708, 8086, 1463, 7, 20471,...
2.987654
243
username="postgres" password="dr@g0ngThcetaG"
[ 29460, 2625, 7353, 34239, 1, 198, 28712, 2625, 7109, 31, 70, 15, 782, 817, 66, 17167, 38, 1 ]
2.5
18
# Testoob, Python Testing Out Of (The) Box # Copyright (C) 2005-2006 The Testoob Team # # 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 # # Un...
[ 2, 6208, 78, 672, 11, 11361, 23983, 3806, 3226, 357, 464, 8, 8315, 198, 2, 15069, 357, 34, 8, 5075, 12, 13330, 383, 6208, 78, 672, 4816, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 3415...
3.407855
331
import urllib import os from subprocess import Popen directory = 'C:\\Temp\\cygwindownload' if not os.path.isdir(directory): os.makedirs(directory) urllib.urlretrieve("https://cygwin.com/setup-x86.exe", directory + '\\setup.exe') p = Popen("cygwin-install.bat") stdout, stderr = p.communicate()
[ 11748, 2956, 297, 571, 201, 198, 11748, 28686, 201, 198, 201, 198, 6738, 850, 14681, 1330, 8099, 268, 201, 198, 201, 198, 201, 198, 34945, 796, 705, 34, 25, 6852, 30782, 6852, 948, 70, 7972, 593, 2220, 6, 201, 198, 361, 407, 28686, ...
2.44186
129
# -*- coding: utf-8 -*- import datetime, json, logging, os, pprint from availability_app import settings_app from availability_app.lib import view_info_helper from availability_app.lib.concurrency import AsyncHelper # temporary demo helper from availability_app.lib.ezb_v1_handler import EzbV1Helper from availability...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 4818, 8079, 11, 33918, 11, 18931, 11, 28686, 11, 279, 4798, 198, 198, 6738, 11500, 62, 1324, 1330, 6460, 62, 1324, 198, 6738, 11500, 62, 1324, 13, 8019, 13...
2.589752
2,908
from selenium import webdriver from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions import time wd = webdriver.Firefox() wd.get("https://www.google.com/search?q=python") # wd.find_element_by_css_selector("a").cl...
[ 6738, 384, 11925, 1505, 1330, 3992, 26230, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 11284, 13, 9019, 1330, 5313, 32103, 21321, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 11321, 13, 1525, 1330, 2750, 198, 6738, 384, 119...
2.788104
269
from functools import wraps from flask import g, abort
[ 6738, 1257, 310, 10141, 1330, 27521, 198, 6738, 42903, 1330, 308, 11, 15614, 220 ]
3.928571
14
#Elsa by Frostmeister import discord import math import time import datetime import googlesearch as gs import urbandictionary as ud import random import asyncio import os from discord.ext import commands bot = commands.Bot(description=" The Snow Queen ❄️" , command_prefix=("e!","E!")) ################ EVENTS...
[ 2, 49050, 416, 15122, 1326, 1694, 628, 198, 198, 11748, 36446, 198, 11748, 10688, 198, 11748, 640, 198, 11748, 4818, 8079, 198, 11748, 467, 519, 829, 3679, 355, 308, 82, 198, 11748, 2956, 3903, 14188, 355, 334, 67, 198, 11748, 4738, 1...
2.837696
191
# Working in IT, a lot of what we do boils down to using a computer to perform a # certain task. In your job you might create user accounts, configure the network, # install software, backup existing data, or execute a whole range of other # computer based tasks from day to day. Back in my first IT job, I realized that...
[ 2, 14594, 287, 7283, 11, 257, 1256, 286, 644, 356, 466, 40169, 866, 284, 1262, 257, 3644, 284, 1620, 257, 198, 2, 1728, 4876, 13, 554, 534, 1693, 345, 1244, 2251, 2836, 5504, 11, 17425, 262, 3127, 11, 198, 2, 2721, 3788, 11, 11559...
4.418681
910
""" Analytic integral for vectorized field / potential computation """ __all__ = [ "c_coeffs", "d_distance", "gamma0", "omega", "potential_dipoles", "potential_vertex_dipoles", "triangle_potential_approx", "triangle_potential_dipole_linear", "triangle_potential_uniform", "x_di...
[ 37811, 198, 198, 37702, 13370, 19287, 329, 15879, 1143, 2214, 1220, 2785, 29964, 198, 198, 37811, 198, 198, 834, 439, 834, 796, 685, 198, 220, 220, 220, 366, 66, 62, 1073, 14822, 82, 1600, 198, 220, 220, 220, 366, 67, 62, 30246, 160...
2.358888
4,748
""" _GetNotClosedOutWorkflows_ Oracle implementation of GetNotClosedOutWorkflows Lists top level filesets not injected to monitoring """ from WMCore.Database.DBFormatter import DBFormatter
[ 37811, 198, 62, 3855, 3673, 2601, 1335, 7975, 12468, 44041, 62, 198, 198, 48625, 7822, 286, 3497, 3673, 2601, 1335, 7975, 12468, 44041, 198, 43, 1023, 1353, 1241, 3696, 1039, 407, 25077, 284, 9904, 198, 37811, 198, 6738, 370, 9655, 382,...
3.673077
52
from setuptools import setup, find_packages __version__ = '0.1.0' setup( name='cst-micro-chassis', version=__version__, author='CyberSolutionsTech', license='MIT', author_email='nicolae.natrapeiu@cyber-solutions.com', description='Microservices chassis pattern library', long_description=...
[ 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 198, 834, 9641, 834, 796, 705, 15, 13, 16, 13, 15, 6, 628, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 11639, 66, 301, 12, 24055, 12, 354, 20297, 3256, 198, 220, 2...
2.483376
391
# # Copyright (c) 2010 Red Hat, 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 law or agreed t...
[ 2, 198, 2, 15069, 357, 66, 8, 3050, 2297, 10983, 11, 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, 779, 428, 2393, 2845, 287, 11846, 351, 26...
3.622857
175
import collections import os,sys Coord = collections.namedtuple("Coord", ["x", "y"])
[ 11748, 17268, 198, 11748, 28686, 11, 17597, 628, 198, 7222, 585, 796, 17268, 13, 13190, 83, 29291, 7203, 7222, 585, 1600, 14631, 87, 1600, 366, 88, 8973, 8 ]
3.071429
28
import os import time import fero from fero import FeroError from typing import Optional, Union from marshmallow import ( Schema, fields, validate, EXCLUDE, ) from .common import FeroObject
[ 11748, 28686, 198, 11748, 640, 198, 11748, 277, 3529, 198, 6738, 277, 3529, 1330, 376, 3529, 12331, 198, 6738, 19720, 1330, 32233, 11, 4479, 198, 6738, 22397, 42725, 1330, 357, 198, 220, 220, 220, 10011, 2611, 11, 198, 220, 220, 220, ...
2.930556
72
from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.common.by import By from selenium import webdriver from decouple import config import time import re import os url = "https://busyliving.co.uk/" username = config(...
[ 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 11284, 1330, 2938, 62, 17561, 1756, 355, 13182, 201, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 11284, 13, 9019, 1330, 5313, 32103, 21321, 220, 201, 198, 6738, 384, 11925, 1505, 13, ...
3.016667
300
import csv from datetime import datetime from typing import Dict, Optional, Union def attendee_report(csv_path: str) -> Dict: """Given a standard Zoom CSV attendee report, returns massaged information.""" report = [] field_map = { "email": ["Email", str], "first_name": ["First Name", s...
[ 11748, 269, 21370, 198, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 19720, 1330, 360, 713, 11, 32233, 11, 4479, 628, 628, 198, 198, 4299, 5262, 1453, 62, 13116, 7, 40664, 62, 6978, 25, 965, 8, 4613, 360, 713, 25, 198, 220, ...
2.159633
545
# ***************************************************************************** # Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * Redistributions...
[ 2, 41906, 17174, 4557, 35625, 198, 2, 220, 15069, 357, 66, 8, 2864, 11, 15127, 23929, 44680, 6234, 13, 220, 1439, 2489, 10395, 13, 198, 2, 198, 2, 220, 2297, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, 11, 351, 393, 1231, 19...
3.400673
594
# # Copyright IBM Corp. 2014 # # 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, s...
[ 2, 198, 2, 15069, 19764, 11421, 13, 1946, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, ...
3.184466
309
from asciimatics.effects import Effect from asciimatics.screen import Screen from pyfiglet import Figlet import re import ftfy import unicodedata # XXX: Should this be a Renderer?
[ 6738, 355, 979, 320, 23372, 13, 34435, 1330, 7896, 198, 6738, 355, 979, 320, 23372, 13, 9612, 1330, 15216, 198, 198, 6738, 12972, 5647, 1616, 1330, 12138, 1616, 198, 198, 11748, 302, 198, 11748, 10117, 24928, 198, 11748, 28000, 9043, 10...
3.381818
55
import pymongo import shutil import os import argparse import re import urllib2 import subprocess import time import matplotlib as mpl mpl.use('Agg') import matplotlib.pyplot as plt import kmeanstree from sys import exit # instanciate and configure an argument parser PARSER = argparse.ArgumentParser(description='')...
[ 11748, 279, 4948, 25162, 198, 11748, 4423, 346, 198, 11748, 28686, 198, 11748, 1822, 29572, 198, 11748, 302, 198, 11748, 2956, 297, 571, 17, 198, 11748, 850, 14681, 198, 11748, 640, 198, 198, 11748, 2603, 29487, 8019, 355, 285, 489, 198...
2.963356
1,037
import pytest import mock import numpy as np import awkward as awk from zinv.utils.AwkwardOps import ( get_nth_object, get_nth_sorted_object_indices, get_attr_for_min_ref, jagged_prod, ) @pytest.mark.parametrize("array,id,size,out", ([ awk.JaggedArray.fromiter([[0, 1, 2], [3, 4], [5, 6, 7, 8]]), ...
[ 11748, 12972, 9288, 198, 11748, 15290, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 13006, 355, 3253, 74, 198, 198, 6738, 1976, 16340, 13, 26791, 13, 23155, 12378, 41472, 1330, 357, 198, 220, 220, 220, 651, 62, 77, 400, 62, 15252, ...
1.854403
1,147
#!/usr/bin/env python import datetime import time import os from shutil import copyfile from pydrive.auth import GoogleAuth from pydrive.drive import GoogleDrive from grovepi import * SLEEP_TIME = 3 dht_sensor_port = 7 dht_sensor_type = 0 g_login = GoogleAuth() g_login.LocalWebserverAuth() drive = GoogleDrive(g_log...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 4818, 8079, 198, 11748, 640, 198, 11748, 28686, 198, 6738, 4423, 346, 1330, 4866, 7753, 198, 6738, 279, 5173, 11590, 13, 18439, 1330, 3012, 30515, 198, 6738, 279, 5173, 11590...
2.579839
1,240
colors = { "white": (255, 255, 255), "red": (255, 0, 0), "green": (0, 255, 0), "blue": (0, 0, 255), "orange": (255, 128, 0) }
[ 4033, 669, 796, 1391, 198, 220, 220, 220, 366, 11186, 1298, 357, 13381, 11, 14280, 11, 14280, 828, 198, 220, 220, 220, 366, 445, 1298, 357, 13381, 11, 657, 11, 657, 828, 198, 220, 220, 220, 366, 14809, 1298, 357, 15, 11, 14280, 11...
1.907895
76
from domain.address_details import AddressDetails from domain.gdk_account import GdkAccount from domain.gdk_wallet import GdkWallet from typing import Dict, List from domain.utxo import Utxo from services.wallet import WalletService class AccountService: """create a new GDK account""" """derive ...
[ 6738, 7386, 13, 21975, 62, 36604, 1330, 17917, 24259, 198, 6738, 7386, 13, 21287, 74, 62, 23317, 1330, 402, 34388, 30116, 198, 6738, 7386, 13, 21287, 74, 62, 44623, 1330, 402, 34388, 47152, 198, 6738, 19720, 1330, 360, 713, 11, 7343, ...
3.226744
172
from __future__ import absolute_import # flake8: noqa # import apis into api package from ngsi_v2.api.api_entry_point_api import APIEntryPointApi from ngsi_v2.api.attribute_value_api import AttributeValueApi from ngsi_v2.api.attributes_api import AttributesApi from ngsi_v2.api.batch_operations_api import BatchOperati...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 2, 781, 539, 23, 25, 645, 20402, 198, 198, 2, 1330, 2471, 271, 656, 40391, 5301, 198, 6738, 23370, 13396, 62, 85, 17, 13, 15042, 13, 15042, 62, 13000, 62, 4122, 62, 15042, ...
2.84127
189
from django.db import models
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 628, 198 ]
3.444444
9
from __future__ import annotations from cli_stryket.system_exception import InvalidSystemException
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 6738, 537, 72, 62, 301, 563, 7126, 13, 10057, 62, 1069, 4516, 1330, 17665, 11964, 16922, 628, 628, 198 ]
3.961538
26
import pandas as pd import glob txt_files = glob.glob("*.txt") image_files=[] for i in txt_files: i=i.replace(".txt", ""); image_files.append(i) print(image_files) print(len(image_files)) #print((txt_files)) df=pd.read_csv('train.csv') # enter your filename with exiftags df['Assessment']='' df['Compress...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 15095, 198, 14116, 62, 16624, 796, 15095, 13, 4743, 672, 7203, 24620, 14116, 4943, 198, 9060, 62, 16624, 28, 21737, 198, 1640, 1312, 287, 256, 742, 62, 16624, 25, 198, 220, 220, 220, 1312, ...
1.69129
2,193
#!/usr/bin/env python ## # omnibus - deadbits # Twitter username search ## from BeautifulSoup import BeautifulSoup from http import get
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2235, 198, 2, 22284, 26333, 532, 2636, 9895, 198, 2, 3009, 20579, 2989, 198, 2235, 198, 198, 6738, 23762, 50, 10486, 1330, 23762, 50, 10486, 198, 198, 6738, 2638, 1330, 651, 628, 628 ]
3.357143
42
import logging from niftypet.ninst import install_tools as tls from .conftest import HOME log = logging.getLogger(__name__) DATA_URL = "https://zenodo.org/record/3877529/files/amyloidPET_FBP_TP0_extra.zip?download=1" if __name__ == "__main__": logging.basicConfig(level=logging.INFO) main()
[ 11748, 18931, 198, 198, 6738, 47803, 6449, 13, 77, 8625, 1330, 2721, 62, 31391, 355, 256, 7278, 198, 198, 6738, 764, 1102, 701, 395, 1330, 41779, 198, 198, 6404, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 198, 26947, 6...
2.62931
116
forces = pinocchio.StdVect_Force() for i in range(rmodel.njoints): forces.append(pinocchio.Force.Zero()) tau,fr,fl = pbm.x2vars(res) Mr = rmodel.frames[pbm.idR].placement jr = rmodel.frames[pbm.idR].parent forces[jr] = Mr.act(pinocchio.Force(fr)) Ml = rmodel.frames[pbm.idL].placement jl = rmodel.frames[pbm.idL].pare...
[ 27087, 796, 6757, 420, 40900, 13, 1273, 67, 53, 478, 62, 10292, 3419, 198, 1640, 1312, 287, 2837, 7, 81, 19849, 13, 77, 73, 1563, 82, 2599, 3386, 13, 33295, 7, 11635, 420, 40900, 13, 10292, 13, 28667, 28955, 198, 198, 83, 559, 11,...
2.187793
213
''' boxdb/support_litebase -> v0.3 This file contain code for 1)get the data from file, and get row data [ ]get_content() speed optimization [ ]get_element() function added ''' def get_content(context, target): """ It gets the content from any file with data in it(auto generated) and returns in list ...
[ 7061, 6, 198, 3524, 9945, 14, 11284, 62, 36890, 8692, 4613, 410, 15, 13, 18, 198, 198, 1212, 2393, 3994, 2438, 329, 198, 16, 8, 1136, 262, 1366, 422, 2393, 11, 290, 651, 5752, 1366, 198, 198, 58, 2361, 1136, 62, 11299, 3419, 2866,...
2.320313
768
import re CITY_RE = re.compile('[^a-zA-Z- ]') DATA = { 'a': { 'anzherosudzhensk':'анжеро-судженск', 'ashukino':'ашукино', }, 'b': { 'bronnitsy':'бронницы', 'biysk':'бийск', }, 'c': { 'chelyabinsk':'челябинск', }, 'd': { }, 'e': { 'elektros...
[ 11748, 302, 198, 198, 34, 9050, 62, 2200, 796, 302, 13, 5589, 576, 10786, 58, 61, 64, 12, 89, 32, 12, 57, 12, 2361, 11537, 198, 26947, 796, 1391, 198, 220, 220, 220, 705, 64, 10354, 1391, 198, 220, 220, 220, 220, 220, 220, 705, ...
1.317945
1,343
import json import os from collections import OrderedDict from itertools import count from multiprocessing import cpu_count from tempfile import TemporaryDirectory as InTemporaryDirectory from types import MethodType from joblib import Parallel, delayed from checkpoint import __version__ as version from checkpoint.cr...
[ 11748, 33918, 198, 11748, 28686, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 6738, 340, 861, 10141, 1330, 954, 198, 6738, 18540, 305, 919, 278, 1330, 42804, 62, 9127, 198, 6738, 20218, 7753, 1330, 46042, 43055, 355, 554, 12966, 5...
2.16515
10,548
# from secret import FLAG FLAG = "CSR{fuckingIdiotShitStupid}" c = hashfun(FLAG) print(c) print(len(FLAG)) print(len(c)) m = revhash(c) print(m) c = [10, 30, 31, 62, 27, 9, 4, 0, 1, 1, 4, 4, 7, 13, 8, 12, 21, 28, 12, 6, 60] m = revhash(c) print(m)
[ 2, 422, 3200, 1330, 9977, 4760, 198, 198, 38948, 796, 366, 7902, 49, 90, 69, 19296, 7390, 5151, 2484, 270, 1273, 7658, 36786, 628, 628, 198, 66, 796, 12234, 12543, 7, 38948, 8, 198, 4798, 7, 66, 8, 198, 4798, 7, 11925, 7, 38948, ...
2.007874
127
#!/usr/local/bin/python3 total_fuel = 0 with open("input.txt") as f: for line in f.readlines(): total_fuel += int(int(line) / 3) - 2 print(total_fuel)
[ 2, 48443, 14629, 14, 12001, 14, 8800, 14, 29412, 18, 198, 198, 23350, 62, 25802, 796, 657, 198, 4480, 1280, 7203, 15414, 13, 14116, 4943, 355, 277, 25, 198, 220, 220, 220, 329, 1627, 287, 277, 13, 961, 6615, 33529, 198, 220, 220, ...
2.309859
71
#!/usr/bin/env python __author__ = "Akalanka Galappaththi" __email__ = "a.galappaththi@uleth.ca" __copyright__ = "Copyright 2020, The Bug Report Summarization Project @ Sybil-Lab" __license__ = "MIT" __maintainer__ = "Akalanka Galappaththi" from models.Turn import Turn class BugReport: """Class represents a com...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 834, 9800, 834, 796, 366, 33901, 282, 15927, 5027, 1324, 776, 400, 72, 1, 198, 834, 12888, 834, 796, 366, 64, 13, 13528, 1324, 776, 400, 72, 31, 2261, 400, 13, 6888, 1, 198, ...
2.025482
1,452
#!/usr/bin/python3 # -*- coding:utf-8 -*- # Project: http://plankton-toolbox.org # Copyright (c) 2010-2018 SMHI, Swedish Meteorological and Hydrological Institute # License: MIT License (see LICENSE.txt or http://opensource.org/licenses/mit). import app_tools import toolbox_utils @toolbox_utils.singleton ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 201, 198, 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 201, 198, 2, 4935, 25, 2638, 1378, 489, 962, 1122, 12, 25981, 3524, 13, 2398, 201, 198, 2, 15069, 357, 66, 8, 3050, 12, ...
2.264706
680
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 16529, 35937, 198, 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 17168, 13789, 13, 4091, 13789, 13, 14116, 287, 262, 1628, 6808, 329, 5964, 1321, 13, 19...
3.385776
928
from RPIO import PWM
[ 6738, 25812, 9399, 1330, 350, 22117, 628 ]
3.142857
7
# program to compute the time # of execution of any python code import time from collections import Counter if __name__ == "__main__": puzzle_input = read_input("day14.txt") start = time.time() print(f"Part 1: {part1(puzzle_input)}") print(f"Part 2: {part2(puzzle_input)}") end = time.time() ...
[ 2, 1430, 284, 24061, 262, 640, 198, 2, 286, 9706, 286, 597, 21015, 2438, 198, 11748, 640, 198, 6738, 17268, 1330, 15034, 628, 628, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 15027, 62, 154...
2.735714
140
import numpy as np from sklearn.model_selection import train_test_split from file_io import features_from_file, labels_from_file, add_history from utils import labels_to_categorical, transpose_vector, get_count, get_mean_stddev, normalize_data BATCH_SIZE = 128
[ 11748, 299, 32152, 355, 45941, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 4512, 62, 9288, 62, 35312, 198, 198, 6738, 2393, 62, 952, 1330, 3033, 62, 6738, 62, 7753, 11, 14722, 62, 6738, 62, 7753, 11, 751, 62, 23569, 198, 673...
3.141176
85
import cv2 import numpy as np import glob # This function records images from the connected camera to specified directory # when the "Space" key is pressed. # directory: should be a string corresponding to the name of an existing # directory print("Hello!") folder = 'calibration_data' ####### THE FOLDER YOU CREATED ...
[ 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 15095, 198, 198, 2, 770, 2163, 4406, 4263, 422, 262, 5884, 4676, 284, 7368, 8619, 220, 198, 2, 618, 262, 366, 14106, 1, 1994, 318, 12070, 13, 198, 2, 8619, 25, 81...
3.940426
235
FILENAME = './puzzle1/data/input' s = 0 previous_value = None with open(FILENAME) as file: for line in file: if previous_value: if int(line) > previous_value: s += 1 previous_value = int(line) print(s)
[ 46700, 1677, 10067, 796, 705, 19571, 79, 9625, 16, 14, 7890, 14, 15414, 6, 201, 198, 201, 198, 82, 796, 657, 201, 198, 3866, 1442, 62, 8367, 796, 6045, 201, 198, 4480, 1280, 7, 46700, 1677, 10067, 8, 355, 2393, 25, 201, 198, 220, ...
1.984733
131
''' Author : MiKueen Level : Medium Problem Statement : Single Number III Given an array of numbers nums, in which exactly two elements appear only once and all the other elements appear exactly twice. Find the two elements that appear only once. Example: Input: [1,2,1,3,2,5] Output: [3,5] Note: The order of the re...
[ 7061, 6, 198, 13838, 1058, 13756, 42, 518, 268, 198, 4971, 1058, 13398, 198, 40781, 21983, 1058, 14206, 7913, 6711, 198, 198, 15056, 281, 7177, 286, 3146, 997, 82, 11, 287, 543, 3446, 734, 4847, 1656, 691, 1752, 290, 477, 262, 584, ...
3.640845
142
print('hello word','sub2') name = input() print('hello,', name) if name=='test': print('hello1,', name) else: print('hello2,', name)
[ 4798, 10786, 31373, 1573, 41707, 7266, 17, 11537, 198, 198, 3672, 796, 5128, 3419, 198, 4798, 10786, 31373, 11, 3256, 1438, 8, 198, 198, 361, 1438, 855, 6, 9288, 10354, 198, 220, 220, 220, 3601, 10786, 31373, 16, 11, 3256, 1438, 8, ...
2.491228
57
from django.apps import AppConfig
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
3.888889
9
t = (1, 2, 3) a, b, c = t print(a) print(b) print(c)
[ 83, 796, 357, 16, 11, 362, 11, 513, 8, 198, 64, 11, 275, 11, 269, 796, 256, 198, 198, 4798, 7, 64, 8, 198, 4798, 7, 65, 8, 198, 4798, 7, 66, 8 ]
1.606061
33
import numpy as np import wave #takes input frame and width of sample in bytes and transforms it into a number between -1 and 1 #reverses squash() vunsquash = np.vectorize(unsquash) vsquash = np.vectorize(squash) #Gets next frame in the file #Arranges the file into numpy matrix for input using every possible sequ...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 6769, 198, 198, 2, 83, 1124, 5128, 5739, 290, 9647, 286, 6291, 287, 9881, 290, 31408, 340, 656, 257, 1271, 1022, 532, 16, 290, 352, 198, 198, 2, 260, 690, 274, 34613, 3419, 198, 198, 85, ...
3.324786
117
# -*- coding: utf-8 -*- """Console script for polr.""" import sys import click from .polr import Polr from . import utils from . import settings _client = None @click.group() def polr(args=None): """ Console script for polr. """ return 0 SHORTEN_HELP_STR = "Return an error if a link with the d...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 47581, 4226, 329, 755, 81, 526, 15931, 198, 11748, 25064, 198, 198, 11748, 3904, 198, 198, 6738, 764, 16104, 81, 1330, 2165, 81, 198, 6738, 764, 1330, 3384, ...
2.655673
758
from unittest import TestCase from src.pynwb.ndx_franklab_novela.associated_files import AssociatedFiles
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 198, 6738, 12351, 13, 79, 2047, 39346, 13, 358, 87, 62, 8310, 962, 23912, 62, 3919, 626, 64, 13, 32852, 62, 16624, 1330, 10575, 25876, 628 ]
3.147059
34
import functools import requests from dbt.events.functions import fire_event from dbt.events.types import ( RegistryProgressMakingGETRequest, RegistryProgressGETResponse ) from dbt.utils import memoized, _connection_exception_retry as connection_exception_retry from dbt import deprecations import os if os.gete...
[ 11748, 1257, 310, 10141, 198, 11748, 7007, 198, 6738, 288, 18347, 13, 31534, 13, 12543, 2733, 1330, 2046, 62, 15596, 198, 6738, 288, 18347, 13, 31534, 13, 19199, 1330, 357, 198, 220, 220, 220, 33432, 32577, 23874, 18851, 18453, 11, 198,...
2.73545
189
#from https://stackoverflow.com/questions/726549/algorithm-for-additive-color-mixing-for-rgb-values/726578 rgb_scale = 255 cmyk_scale = 100 def cmyk_to_rgb(c, m, y, k): """ """ r = rgb_scale*(1.0 - (c + k) / float(cmyk_scale)) g = rgb_scale*(1.0 - (m + k) / float(cmyk_scale)) b = rgb_scale*(1.0 - ...
[ 2, 6738, 3740, 1378, 25558, 2502, 11125, 13, 785, 14, 6138, 507, 14, 22, 22980, 2920, 14, 282, 42289, 12, 1640, 12, 2860, 1800, 12, 8043, 12, 19816, 278, 12, 1640, 12, 81, 22296, 12, 27160, 14, 22, 2075, 38907, 198, 198, 81, 22296...
1.864078
412
""" Convert txt files of ApolloCar3D into json file with COCO format """ import glob import os import time from shutil import copyfile import json import argparse import numpy as np from PIL import Image # Packages for data processing, crowd annotations and histograms try: import matplotlib.pyplot as plt # pyli...
[ 37811, 198, 3103, 1851, 256, 742, 3696, 286, 17508, 9914, 18, 35, 656, 33918, 2393, 351, 327, 4503, 46, 5794, 198, 37811, 198, 198, 11748, 15095, 198, 11748, 28686, 198, 11748, 640, 198, 6738, 4423, 346, 1330, 4866, 7753, 198, 11748, ...
2.715232
302
#!/usr/bin/env python import os import sys import ci_lib batches = [] if 0 and os.uname()[0] == 'Linux': batches += [ [ "sudo chown `whoami`: ~", "chmod u=rwx,g=rx,o= ~", "sudo mkdir /var/run/sshd", "sudo /etc/init.d/ssh start", "mkdir -p ~/....
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 11748, 269, 72, 62, 8019, 198, 198, 8664, 2052, 796, 17635, 198, 198, 361, 657, 290, 28686, 13, 403, 480, 3419, 58, 15, 60, 6624, 705,...
1.821483
661
from django.shortcuts import render, redirect from django.http import HttpResponse, Http404 from .models import Order, _get_all_order from .forms import DriverModelForm, OrderModelForm, StoreModelForm
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 18941, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 11, 367, 29281, 26429, 198, 6738, 764, 27530, 1330, 8284, 11, 4808, 1136, 62, 439, 62, 2875, 198, 6738, 764, 23914,...
3.649123
57
# a simple Ngram finder # only feasible for 3.x version # original text file must be plain text n=1 # min N howmany = 5 # max N outlength = 200 white_list = [] white_punc = [',','。','“','”','—','?','!','…','"',"'",':','?','!','.',','] file_raw = open('put full path to youre text file here','r',encoding='utf-8') fil...
[ 2, 257, 2829, 399, 4546, 1064, 263, 198, 2, 691, 23498, 329, 513, 13, 87, 2196, 198, 2, 2656, 2420, 2393, 1276, 307, 8631, 2420, 220, 198, 198, 77, 28, 16, 220, 1303, 949, 399, 198, 4919, 21834, 796, 642, 220, 1303, 3509, 399, 1...
2.08194
598
#=========================================================================== # # Report functions # #=========================================================================== import time from ..util import Data from .Link import Link #=========================================================================== def po...
[ 2, 23926, 2559, 18604, 198, 2, 198, 2, 6358, 5499, 198, 2, 198, 2, 23926, 2559, 18604, 198, 11748, 640, 198, 6738, 11485, 22602, 1330, 6060, 198, 6738, 764, 11280, 1330, 7502, 198, 198, 2, 23926, 2559, 18604, 198, 4299, 1176, 7, 163...
2.907762
889
from test.integration.base import DBTIntegrationTest, use_profile
[ 6738, 1332, 13, 18908, 1358, 13, 8692, 1330, 360, 19313, 34500, 1358, 14402, 11, 779, 62, 13317, 628 ]
3.722222
18
import endpoints import graylogapi
[ 11748, 886, 13033, 198, 11748, 12768, 6404, 15042, 198 ]
3.888889
9
""" Install API Endpoint """ # Third Party Library from django.views import View from django.http import JsonResponse from django.utils.translation import gettext as _ # Local Library from pyvalitron.form import Form from app.modules.util.helpers import Helpers from app.modules.core.request import Request from app.mo...
[ 37811, 198, 15798, 7824, 5268, 4122, 198, 37811, 198, 198, 2, 10467, 3615, 10074, 198, 6738, 42625, 14208, 13, 33571, 1330, 3582, 198, 6738, 42625, 14208, 13, 4023, 1330, 449, 1559, 31077, 198, 6738, 42625, 14208, 13, 26791, 13, 41519, ...
3.911392
158
import pytest from crawler.core import Downloader, Config, UrlManager import os from shutil import rmtree DEFAULT_INI_PATH = "./tests/config/default.ini" CONFIG_DIR_PATH = "./tests/config" test_failed_urls = ["http://www.google.com"] test_finished_urls = ["http://www.baidu.com"] test_repeated_urls = [] for i in range...
[ 11748, 12972, 9288, 198, 6738, 27784, 1754, 13, 7295, 1330, 10472, 263, 11, 17056, 11, 8799, 75, 13511, 198, 11748, 28686, 198, 6738, 4423, 346, 1330, 374, 16762, 631, 198, 198, 7206, 38865, 62, 1268, 40, 62, 34219, 796, 366, 19571, 4...
2.618497
173
# Generated by Django 3.0.7 on 2020-07-01 17:59 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 22, 319, 12131, 12, 2998, 12, 486, 1596, 25, 3270, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
import pytest from cogctl.cli.relay import relay import responses @pytest.fixture(autouse=True)
[ 11748, 12972, 9288, 198, 6738, 43072, 34168, 13, 44506, 13, 2411, 323, 1330, 24248, 198, 11748, 9109, 628, 198, 31, 9078, 9288, 13, 69, 9602, 7, 2306, 1076, 28, 17821, 8, 628, 628, 628, 628, 628, 628 ]
2.945946
37
from abc import ABC, abstractmethod from typing import Callable, Generic, Iterable, List, Optional, Tuple, TypeVar, Union from helpers.utils import CacheContainer, with_cache # S and A are used for generic typing where S represents the state type and A represents the action type S = TypeVar("S") A = TypeVar("A") # Ga...
[ 6738, 450, 66, 1330, 9738, 11, 12531, 24396, 198, 6738, 19720, 1330, 4889, 540, 11, 42044, 11, 40806, 540, 11, 7343, 11, 32233, 11, 309, 29291, 11, 5994, 19852, 11, 4479, 198, 6738, 49385, 13, 26791, 1330, 34088, 29869, 11, 351, 62, ...
4.049261
203
from models.constants import CONFIGURATION_FILE_PATH, CONFIGURATION_FILENAME from os import path import json try: config = path.join(CONFIGURATION_FILE_PATH, CONFIGURATION_FILENAME) with open(config) as configuration_file: config = json.load(configuration_file) except FileNotFoundError: config = di...
[ 6738, 4981, 13, 9979, 1187, 1330, 25626, 4261, 6234, 62, 25664, 62, 34219, 11, 25626, 4261, 6234, 62, 46700, 1677, 10067, 198, 6738, 28686, 1330, 3108, 198, 11748, 33918, 198, 198, 28311, 25, 198, 220, 220, 220, 4566, 796, 3108, 13, 2...
2.981651
109
from pymongo.cursor import Cursor import bson.objectid import datetime import json import pytz from ..jobs.jobs import Job def sse_pack(d): """ Format a map with Server-Sent-Event-meaningful keys into a string for transport. Happily borrowed from: http://taoofmac.com/space/blog/2014/11/16/1940 ...
[ 6738, 279, 4948, 25162, 13, 66, 21471, 1330, 327, 21471, 198, 11748, 275, 1559, 13, 15252, 312, 198, 11748, 4818, 8079, 198, 11748, 33918, 198, 11748, 12972, 22877, 198, 198, 6738, 11485, 43863, 13, 43863, 1330, 15768, 628, 198, 4299, 2...
2.609808
469
# -*- coding: utf-8 -*- from django.core import mail from nose.tools import eq_ from kitsune.sumo.tests import post from kitsune.users.tests import add_permission, user from kitsune.wiki.config import ( SIGNIFICANCES, MEDIUM_SIGNIFICANCE, TYPO_SIGNIFICANCE) from kitsune.wiki.events import ( ReadyRevisionEvent...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 42625, 14208, 13, 7295, 1330, 6920, 198, 198, 6738, 9686, 13, 31391, 1330, 37430, 62, 198, 198, 6738, 19183, 1726, 13, 16345, 78, 13, 41989, 1330, 1281, 198, 6738,...
2.308974
2,641
from sys import version_info import inspect from weakref import WeakSet, WeakKeyDictionary from collections import deque from functools import partial class Signal(object): """ basic signal emitter fired signals are added to this object's calling frame - if this becomes excessive, this also includes mode to ad...
[ 198, 6738, 25064, 1330, 2196, 62, 10951, 628, 198, 11748, 10104, 198, 6738, 4939, 5420, 1330, 28788, 7248, 11, 28788, 9218, 35, 14188, 198, 6738, 17268, 1330, 390, 4188, 198, 6738, 1257, 310, 10141, 1330, 13027, 628, 198, 4871, 26484, 7...
3.335052
388
from json import JSONEncoder import json
[ 6738, 33918, 1330, 19449, 27195, 12342, 198, 11748, 33918, 628, 198 ]
3.909091
11
from xivdb.sql import DB, Base, Weapon, Repair, Materia, Stats from xivdb.importCsv import importCsv from typing import List from sqlalchemy.orm import sessionmaker from XivDbReader import Reader import sqlalchemy.orm d = DB(Base) session: sessionmaker = d.newSession() w = d.newWeapon() read: Reader = Reader(job='wh...
[ 198, 6738, 2124, 452, 9945, 13, 25410, 1330, 20137, 11, 7308, 11, 13072, 11, 28912, 11, 337, 729, 544, 11, 20595, 198, 6738, 2124, 452, 9945, 13, 11748, 34, 21370, 1330, 1330, 34, 21370, 198, 6738, 19720, 1330, 7343, 198, 6738, 44161,...
2.236677
638
""" Python implementation of the LiNGAM algorithms. The LiNGAM Project: https://sites.google.com/site/sshimizu06/lingam """ import itertools import numbers import warnings import numpy as np from sklearn.utils import check_array, resample from .bootstrap import BootstrapResult from .direct_lingam import DirectLiNGAM ...
[ 37811, 198, 37906, 7822, 286, 262, 7455, 10503, 2390, 16113, 13, 198, 464, 7455, 10503, 2390, 4935, 25, 3740, 1378, 49315, 13, 13297, 13, 785, 14, 15654, 14, 824, 38400, 47775, 3312, 14, 1359, 321, 198, 37811, 198, 11748, 340, 861, 10...
2.095771
5,179
from django.apps import AppConfig
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
3.888889
9
# -*- coding: utf-8 -*- """ The :class:`SwaggerClient` provides an interface for making API calls based on a swagger spec, and returns responses of python objects which build from the API response. Structure Diagram:: +---------------------+ | | | SwaggerClient | ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 464, 1058, 4871, 25, 63, 10462, 7928, 11792, 63, 3769, 281, 7071, 329, 1642, 7824, 3848, 1912, 319, 198, 64, 1509, 7928, 1020, 11, 290, 5860, 9109, 286, 21...
2.429392
4,355
# coding:utf-8 import json import pickle import requests import os import re from io import BytesIO BASE_DIR = os.path.dirname(__file__) # LOGIN_URL = 'http://grdms.bit.edu.cn/yjs/login_cas.jsp' # LOGIN_URL = 'https://login.bit.edu.cn/cas/login?service=https://login.bit.edu.cn/campus-account/shiro-cas' LOGIN_URL = 'h...
[ 2, 19617, 25, 40477, 12, 23, 198, 11748, 33918, 198, 11748, 2298, 293, 198, 198, 11748, 7007, 198, 11748, 28686, 198, 11748, 302, 198, 6738, 33245, 1330, 2750, 4879, 9399, 198, 198, 33, 11159, 62, 34720, 796, 28686, 13, 6978, 13, 1590...
2.283388
307
import discord, requests, os from discord.ext import commands, tasks from discord_components import DiscordComponents from config import token, db from typing import Union from help_ import CustomHelpCommand config = db["config"] links = db["linked"] presence_count = 0 intents = discord.Intents...
[ 11748, 36446, 11, 7007, 11, 28686, 201, 198, 6738, 36446, 13, 2302, 1330, 9729, 11, 8861, 201, 198, 6738, 36446, 62, 5589, 3906, 1330, 39462, 7293, 3906, 201, 198, 6738, 4566, 1330, 11241, 11, 20613, 201, 198, 6738, 19720, 1330, 4479, ...
2.553435
262
from vtk import * source = vtkRandomGraphSource() source.DirectedOff() source.SetNumberOfVertices(50) source.SetEdgeProbability(0.01) source.SetUseEdgeProbability(True) source.AllowParallelEdgesOn() source.AllowSelfLoopsOn() source.SetStartWithTree(True) # Connect to the Boost centrality filter. centrality = vtkBoos...
[ 6738, 410, 30488, 1330, 1635, 198, 198, 10459, 796, 410, 30488, 29531, 37065, 7416, 3419, 198, 10459, 13, 13470, 276, 9362, 3419, 198, 10459, 13, 7248, 15057, 5189, 42369, 1063, 7, 1120, 8, 198, 10459, 13, 7248, 37021, 2964, 65, 1799, ...
3.054496
367
import input_data #input import BLOSUM52=input_data.BLOSUM52 seq2=input_data.seq2 seq1=input_data.seq1 matrix=NW_matrix(seq1,seq2,BLOSUM52,-2) #compute 2 matrix, gap penality is set to -2 result=allign(matrix[0],matrix[1],seq1,seq2) #use matrix obtained before to get the alignment print(result[0],result[1])...
[ 11748, 5128, 62, 7890, 220, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 2, 15414, 1330, 198, 9148, 2640, 5883, 4309, 28, 15414, 62, 7890, 13, 9148, 2640, 5883, 4309, 198, 41068, 17, 28, 15414, 62, 7890, 13, 41068, 17, 198, 4...
2.5
140
directions = open('input', 'r').read().strip().split(', ') x = 0 y = 0 facing = 0 #North visited = {} visited[(x, y)] = True for direction in directions: if direction[0] == 'R': facing += 1 else: facing -= 1 if facing < 0: facing = 3 elif facing > 3: facing = 0 cou...
[ 12942, 507, 796, 1280, 10786, 15414, 3256, 705, 81, 27691, 961, 22446, 36311, 22446, 35312, 7, 3256, 705, 8, 198, 87, 796, 657, 198, 88, 796, 657, 198, 29532, 796, 657, 1303, 14157, 198, 4703, 863, 796, 23884, 198, 4703, 863, 58, 7,...
2
425
from ..broker import Broker
[ 6738, 11485, 7957, 6122, 1330, 2806, 6122, 628 ]
3.625
8