content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
# Generated by Django 3.1.3 on 2020-12-05 17:27 import django.db.models.deletion from django.conf import settings from django.db import migrations, models import core.cache
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 18, 319, 12131, 12, 1065, 12, 2713, 1596, 25, 1983, 198, 198, 11748, 42625, 14208, 13, 9945, 13, 27530, 13, 2934, 1616, 295, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625...
3.034483
58
""" Copyright (C) 2020 ETH Zurich. All rights reserved. Author: Sergei Vostrikov, ETH Zurich 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/LI...
[ 37811, 198, 220, 220, 15069, 357, 34, 8, 12131, 35920, 43412, 13, 1439, 2489, 10395, 13, 628, 220, 220, 6434, 25, 34724, 569, 455, 12602, 709, 11, 35920, 43412, 628, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 3...
3.688525
183
#!/usr/bin/env python import sys import os import re import subprocess from enum import Enum GitLabProtector()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 850, 14681, 198, 6738, 33829, 1330, 2039, 388, 198, 198, 38, 270, 17822, 19703, 9250, 3419, 628 ]
3.138889
36
import os import pathlib import tempfile TEMP_DIR = tempfile.TemporaryDirectory()
[ 11748, 28686, 198, 11748, 3108, 8019, 198, 11748, 20218, 7753, 628, 198, 51, 39494, 62, 34720, 796, 20218, 7753, 13, 12966, 5551, 43055, 3419, 628, 628, 628, 628 ]
3.25
28
import pickle from karas.version import __version__
[ 11748, 2298, 293, 198, 198, 6738, 479, 283, 292, 13, 9641, 1330, 11593, 9641, 834, 628, 628, 628 ]
3.222222
18
#!/usr/bin/python3 import calc if __name__ == '__main__': main()
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 11748, 42302, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419, 198 ]
2.322581
31
import numpy as np from aiida.common import AttributeDict from aiida.engine import WorkChain, append_ from aiida.orm import Dict, List, StructureData from aiida.orm.nodes.data.upf import get_pseudos_from_structure from aiida.orm.utils import load_node from aiida.plugins import WorkflowFactory from aiida_quantumespresso...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 257, 72, 3755, 13, 11321, 1330, 3460, 4163, 35, 713, 198, 6738, 257, 72, 3755, 13, 18392, 1330, 5521, 35491, 11, 24443, 62, 198, 6738, 257, 72, 3755, 13, 579, 1330, 360, 713, 11, 7343, 11, ...
2.945017
291
import torch import numpy as np import pandas as pd from collections import OrderedDict def generate_categorical_to_ordinal_map(inputs): if isinstance(inputs, pd.Series): inputs = inputs.values uq_inputs = np.unique(inputs) return dict(zip(list(uq_inputs), list(range(len(uq_inputs))))) def ma...
[ 11748, 28034, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 628, 628, 198, 198, 4299, 7716, 62, 66, 2397, 12409, 62, 1462, 62, 585, 1292, 62, 8899, 7, 15414, ...
2.295588
680
# Analisador de textos # Crie um programa que leia o nome completo de uma pessoa e mostre: # - O nome com todas as letras maisculas e minsculas. # - Quantas letras ao todo (sem considerar espaos). print('=*'*20, 'CADASTRO', '=*'*20) nome = str(input('Nome Completo:')).strip()#Para ler com letras maisculas print('Ana...
[ 2, 1052, 27315, 7079, 390, 2420, 418, 198, 2, 220, 327, 5034, 23781, 1430, 64, 8358, 443, 544, 267, 299, 462, 1224, 1462, 390, 334, 2611, 279, 408, 12162, 304, 749, 260, 25, 198, 2, 532, 440, 299, 462, 401, 284, 67, 292, 355, 13...
2.455516
281
from django.conf.urls.defaults import patterns, include, url from django.contrib import admin from core import game admin.autodiscover() game.autodiscover() urlpatterns = patterns("", ("^admin/", include(admin.site.urls)), url("", include("social_auth.urls")), url("", include("core.urls")), )
[ 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 13, 12286, 82, 1330, 7572, 11, 2291, 11, 19016, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 198, 6738, 4755, 1330, 983, 628, 198, 28482, 13, 2306, 375, 29392, 3419, 198, ...
2.836364
110
# -*- coding: utf-8 -*- """ Created on Fri Sep 13 20:11:22 2019 @author: drone911 """ from helper import * from models import * import numpy as np from keras.datasets import mnist from tqdm import tqdm import warnings if __name__=="__main__": warnings.filterwarnings("ignore") (train_images, train_lab...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 19480, 8621, 1511, 1160, 25, 1157, 25, 1828, 13130, 198, 198, 31, 9800, 25, 12170, 35549, 198, 37811, 198, 198, 6738, 31904, 1330, 1635, 198, 673...
2.387019
416
# HEAD # DataType - List method -index() Usage Error # DESCRIPTION # Describes index method of lists # and its error incase item is not there # RESOURCES # lists = ['hello', 'hi', 'howdy', 'heyas'] # returns an error - ValueError print(lists.index('hello hello'))
[ 2, 39837, 198, 2, 6060, 6030, 532, 7343, 2446, 532, 9630, 3419, 29566, 13047, 198, 2, 22196, 40165, 198, 2, 39373, 22090, 6376, 2446, 286, 8341, 220, 198, 2, 220, 220, 220, 220, 220, 220, 290, 663, 4049, 753, 589, 2378, 318, 407, ...
2.956989
93
from pyspark import SparkContext, SparkConf, SQLContext from pyspark.sql.functions import count, lit, col, udf, expr, collect_list, explode from pyspark.sql.types import IntegerType, StringType, MapType, ArrayType, BooleanType, FloatType from pyspark.sql import HiveContext from datetime import datetime, timedelta from ...
[ 6738, 279, 893, 20928, 1330, 17732, 21947, 11, 17732, 18546, 11, 16363, 21947, 198, 6738, 279, 893, 20928, 13, 25410, 13, 12543, 2733, 1330, 954, 11, 6578, 11, 951, 11, 334, 7568, 11, 44052, 11, 2824, 62, 4868, 11, 22818, 198, 6738, ...
2.652975
706
import pytest import pyhash
[ 11748, 12972, 9288, 198, 198, 11748, 12972, 17831, 628, 628, 628, 628, 628, 628, 628, 628, 198 ]
2.647059
17
#!/usr/bin/env python # -*- coding: utf-8 -*- # Python version: 3.6 import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import copy import numpy as np from torchvision import datasets, transforms import torch import math from utils.sampling import mnist_iid, mnist_noniid, cifar_iid from utils.opti...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 11361, 2196, 25, 513, 13, 21, 198, 198, 11748, 2603, 29487, 8019, 198, 6759, 29487, 8019, 13, 1904, 10786, 46384, ...
2.130556
4,657
from flask import current_app from scaner.utils import add_metadata import json # PRUEBA EXTRACION USUARIOS # @add_metadata() # def get(userId, fields=None, *args, **kwargs): # #get_task = current_app.tasks.get_users_from_twitter.delay() # get_task = current_app.tasks.execute_metrics.delay() # return {'res...
[ 6738, 42903, 1330, 1459, 62, 1324, 198, 6738, 9367, 263, 13, 26791, 1330, 751, 62, 38993, 198, 11748, 33918, 198, 198, 2, 4810, 8924, 4339, 7788, 5446, 2246, 2849, 1294, 52, 33604, 2640, 198, 2, 2488, 2860, 62, 38993, 3419, 198, 2, ...
2.703125
128
import logging from time import sleep from cct.case import Case logger = logging.getLogger(__file__)
[ 11748, 18931, 198, 6738, 640, 1330, 3993, 198, 198, 6738, 269, 310, 13, 7442, 1330, 8913, 628, 628, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 7753, 834, 8, 198 ]
3.212121
33
raise DeprecationWarning("""DEPRECATED: After Popular request and decision from the BDFL: `IPython.terminal.ptshell` has been moved back to `IPython.terminal.interactiveshell` during the beta cycle (after IPython 5.0.beta3) Sorry about that. This file will be removed in 5.0 rc or final. """)
[ 40225, 2129, 8344, 341, 20361, 7203, 15931, 46162, 38827, 11617, 25, 198, 198, 3260, 22623, 2581, 290, 2551, 422, 262, 28023, 3697, 25, 198, 63, 4061, 7535, 13, 23705, 282, 13, 457, 29149, 63, 468, 587, 3888, 736, 284, 4600, 4061, 753...
3.252747
91
lista = [] for n in range(0, 5): lista.append(int(input(f'Digite um valor para a posio {n}: '))) print('=-=' * 10) print(f'Voc digitou os valores {lista}') maior = lista[0] menor = lista[0] for n in lista: if maior < n: maior = n if menor > n: menor = n print(f'O maior valor digitado foi {m...
[ 4868, 64, 796, 17635, 198, 1640, 299, 287, 2837, 7, 15, 11, 642, 2599, 198, 220, 220, 220, 1351, 64, 13, 33295, 7, 600, 7, 15414, 7, 69, 6, 19511, 578, 23781, 1188, 273, 31215, 257, 1426, 952, 1391, 77, 38362, 705, 22305, 198, 4...
2.09319
279
# ------------------------------------------------------------------------------ # CodeHawk Binary Analyzer # Author: Henny Sipma # ------------------------------------------------------------------------------ # The MIT License (MIT) # # Copyright (c) 2016-2020 Kestrel Technology LLC # Copyright (c) 2020 Henny Si...
[ 2, 16529, 26171, 198, 2, 6127, 39, 19301, 45755, 16213, 9107, 198, 2, 6434, 25, 367, 11870, 311, 541, 2611, 198, 2, 16529, 26171, 198, 2, 383, 17168, 13789, 357, 36393, 8, 198, 2, 198, 2, 15069, 357, 66, 8, 1584, 12, 42334, 509, ...
3.665517
580
from asyncio import sleep from vkbottle.exceptions import VKError from vkbottle.framework.blueprint.user import Blueprint user = Blueprint( name='access_token_error_blueprint' )
[ 6738, 30351, 952, 1330, 3993, 201, 198, 201, 198, 6738, 410, 74, 10985, 293, 13, 1069, 11755, 1330, 569, 7336, 81, 1472, 201, 198, 6738, 410, 74, 10985, 293, 13, 30604, 13, 17585, 4798, 13, 7220, 1330, 39932, 201, 198, 201, 198, 722...
2.811594
69
import challenges import unittest if __name__ == '__main__': unittest.main()
[ 11748, 6459, 198, 11748, 555, 715, 395, 628, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3419 ]
2.741935
31
#!/usr/bin/env python3 # Day 6: Find All Duplicates in an Array # # Given an array of integers, 1 a[i] n (n = size of array), some elements # appear twice and others appear once. # Find all the elements that appear twice in this array. # Could you do it without extra space and in O(n) runtime? # Test assert Solutio...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 3596, 718, 25, 9938, 1439, 49821, 16856, 287, 281, 15690, 198, 2, 198, 2, 11259, 281, 7177, 286, 37014, 11, 352, 220, 257, 58, 72, 60, 220, 299, 357, 77, 796, 2546, 2...
2.959677
124
"""TiledImageVisual class A visual that draws tiles using a texture atlas. """ from typing import List, Set import numpy as np from ...layers.image.experimental.octree_util import OctreeChunk from ..vendored import ImageVisual from ..vendored.image import _build_color_transform from .texture_atlas import TextureAtla...
[ 37811, 51, 3902, 5159, 36259, 1398, 198, 198, 32, 5874, 326, 14293, 19867, 1262, 257, 11743, 379, 21921, 13, 198, 37811, 198, 6738, 19720, 1330, 7343, 11, 5345, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 2644, 75, 6962, ...
2.294765
2,273
import tensorflow as tf x = tf.constant(35, name='x') print(x) y = tf.Variable(x+5, name='y') with tf.Session() as session: merged = tf.summary.merge_all() writer = tf.summary.FileWriter("output", session.graph) model = tf.global_variables_initializer() session.run(model) print (session.run(y)) ...
[ 11748, 11192, 273, 11125, 355, 48700, 628, 198, 87, 796, 48700, 13, 9979, 415, 7, 2327, 11, 1438, 11639, 87, 11537, 198, 4798, 7, 87, 8, 198, 88, 796, 48700, 13, 43015, 7, 87, 10, 20, 11, 1438, 11639, 88, 11537, 198, 198, 4480, ...
2.568182
132
#!/usr/bin/env python from implementations import MallardDuck, WildTurkey, TurkeyAdapter if __name__ == '__main__': d = MallardDuck() print '\nThe Duck says...' d.quack() d.fly() t = WildTurkey() print '\nThe Turkey says...' t.gobble() t.fly() # Now we use the adapter to show how...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 25504, 1330, 16618, 446, 35, 1347, 11, 6183, 31632, 11, 7137, 47307, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 288, 796, 16618,...
2.576355
203
CELERY_BROKER_URL = 'redis://localhost:6379/0' CELERY_RESULT_BACKEND = 'redis://localhost:6379/0' CELERY_IMPORTS=('app.users.tasks')
[ 34, 3698, 19664, 62, 11473, 11380, 1137, 62, 21886, 796, 705, 445, 271, 1378, 36750, 25, 21, 29088, 14, 15, 6, 198, 198, 34, 3698, 19664, 62, 19535, 16724, 62, 31098, 10619, 796, 705, 445, 271, 1378, 36750, 25, 21, 29088, 14, 15, ...
2.16129
62
# -*- coding: utf-8 -*- from PIL import Image from numpy import array import sqlite3 import tkMessageBox import matplotlib.pyplot as plt from pybrain.tools.shortcuts import buildNetwork from pybrain.datasets import SupervisedDataSet from pybrain.supervised.trainers import BackpropTrainer from pybrain.structure.module...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 350, 4146, 1330, 7412, 198, 6738, 299, 32152, 1330, 7177, 198, 11748, 44161, 578, 18, 198, 11748, 256, 74, 12837, 14253, 198, 198, 11748, 2603, 29487, 8019, 13, 90...
2.37766
376
import colander from datetime import datetime from grano.core import app, db, celery from grano.logic.validation import database_name from grano.logic.references import AccountRef from grano.plugins import notify_plugins from grano.model import Project def save(data, project=None): """ Create or update a proje...
[ 11748, 951, 4066, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 6738, 1036, 5733, 13, 7295, 1330, 598, 11, 20613, 11, 18725, 1924, 198, 6738, 1036, 5733, 13, 6404, 291, 13, 12102, 341, 1330, 6831, 62, 3672, 198, 6738, 1036, 5733,...
2.825617
648
N,K=map(int,input().split()) print("YES" if N>=2*K-1 else "NO")
[ 45, 11, 42, 28, 8899, 7, 600, 11, 15414, 22446, 35312, 28955, 198, 4798, 7203, 43335, 1, 611, 399, 29, 28, 17, 9, 42, 12, 16, 2073, 366, 15285, 4943 ]
2.1
30
from allauth.socialaccount.providers.oauth2.urls import default_urlpatterns from provider import PivotalTrackerProvider urlpatterns = default_urlpatterns(PivotalTrackerProvider)
[ 6738, 477, 18439, 13, 14557, 23317, 13, 15234, 4157, 13, 12162, 1071, 17, 13, 6371, 82, 1330, 4277, 62, 6371, 33279, 82, 198, 6738, 10131, 1330, 350, 452, 4997, 35694, 29495, 198, 198, 6371, 33279, 82, 796, 4277, 62, 6371, 33279, 82, ...
3.6
50
from odoo import fields, models, api, _ from odoo.exceptions import UserError
[ 6738, 16298, 2238, 1330, 7032, 11, 4981, 11, 40391, 11, 4808, 198, 6738, 16298, 2238, 13, 1069, 11755, 1330, 11787, 12331, 198 ]
3.545455
22
"""UDP hole punching server.""" from twisted.internet.protocol import DatagramProtocol from twisted.internet import reactor import sys DEFAULT_PORT = 4000 if __name__ == '__main__': if len(sys.argv) < 2: print("Usage: ./server.py PORT") port = DEFAULT_PORT # sys.exit(1) else: ...
[ 37811, 52, 6322, 7604, 29044, 4382, 526, 15931, 198, 6738, 19074, 13, 37675, 13, 11235, 4668, 1330, 16092, 6713, 19703, 4668, 198, 6738, 19074, 13, 37675, 1330, 21905, 198, 198, 11748, 25064, 198, 7206, 38865, 62, 15490, 796, 30123, 628, ...
2.456044
182
from typing import Any, List, Literal, TypedDict from .FHIR_Address import FHIR_Address from .FHIR_Age import FHIR_Age from .FHIR_Annotation import FHIR_Annotation from .FHIR_Attachment import FHIR_Attachment from .FHIR_CodeableConcept import FHIR_CodeableConcept from .FHIR_Coding import FHIR_Coding from .FHIR_Contact...
[ 6738, 19720, 1330, 4377, 11, 7343, 11, 25659, 1691, 11, 17134, 276, 35, 713, 198, 198, 6738, 764, 44602, 4663, 62, 20231, 1330, 376, 39, 4663, 62, 20231, 198, 6738, 764, 44602, 4663, 62, 23396, 1330, 376, 39, 4663, 62, 23396, 198, 6...
2.891663
4,486
from django.shortcuts import render from django.contrib.auth.decorators import login_required from .models import * from .forms import address_form from django.http import JsonResponse from .utils import cartData,guestobj import json,datetime
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 12501, 273, 2024, 1330, 17594, 62, 35827, 198, 6738, 764, 27530, 1330, 1635, 198, 6738, 764, 23914, 1330, 2209, 62, 687, 198, 6738,...
3.626866
67
import os from ecogdata.util import Bunch __all__ = ['Parameter', 'TypedParam', 'BoolOrNum', 'NSequence', 'NoneOrStr', 'Path', 'parse_param', 'uniform_bunch_case'] def parse_param(name, command, table): p = table.get(name.lower(), Parameter)(command) return p.value() def uniform_bunch_cas...
[ 11748, 28686, 198, 6738, 9940, 519, 7890, 13, 22602, 1330, 347, 3316, 628, 198, 834, 439, 834, 796, 37250, 36301, 3256, 705, 31467, 276, 22973, 3256, 705, 33, 970, 5574, 33111, 3256, 705, 45, 44015, 594, 3256, 705, 14202, 5574, 13290, ...
2.197368
228
"""FILE lgt_createinput.main.py This script creates condensed LPJ netcdf files for landforms and soil properties landforms.nc: - lfcnt (landid) number of landforms in cell - frac (landid, lfid/ standid) area fraction this landform represents - slope (landid, lfid/ standid) - elevation (landid, lfid/ standid) avg...
[ 37811, 25664, 300, 13655, 62, 17953, 15414, 13, 12417, 13, 9078, 198, 198, 1212, 4226, 8075, 38784, 18470, 41, 2010, 66, 7568, 3696, 198, 1640, 1956, 23914, 290, 9260, 6608, 628, 1956, 23914, 13, 10782, 25, 198, 532, 300, 16072, 429, ...
2.020733
10,225
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = 'ipetrash' """ http://www.dns-shop.ru/""" # # http://stackoverflow.com/a/37755811/5909792 # def get_html(url, check_content_func=None): # # from PyQt5.QtCore import QUrl # # from PyQt5.QtWidgets import QApplication # # from PyQt5.QtWe...
[ 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, 834, 9800, 834, 796, 705, 541, 21879, 1077, 6, 628, 198, 37811, 220, 220, 220, 220, 220, 220, 2638, 1378, ...
1.947887
1,727
import pytest from dnaio import Sequence from cutadapt.adapters import ( RemoveAfterMatch, RemoveBeforeMatch, FrontAdapter, BackAdapter, PrefixAdapter, SuffixAdapter, LinkedAdapter, MultipleAdapters, IndexedPrefixAdapters, IndexedSuffixAdapters, ) def test_linke...
[ 11748, 12972, 9288, 198, 198, 6738, 288, 2616, 952, 1330, 45835, 198, 6738, 2005, 42552, 13, 324, 12126, 1330, 357, 198, 220, 220, 220, 17220, 3260, 23850, 11, 198, 220, 220, 220, 17220, 8421, 23850, 11, 198, 220, 220, 220, 8880, 4730...
2.487889
289
import copy import random from .parameters import Parameters def new(self): """Generates a :class:`~archABM.event_model.EventModel` copy, with reset count and noise Returns: EventModel: cloned instance """ self.count = 0 self.noise = None return copy.co...
[ 11748, 4866, 198, 11748, 4738, 198, 6738, 764, 17143, 7307, 1330, 40117, 628, 198, 220, 220, 220, 825, 649, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 8645, 689, 257, 1058, 4871, 25, 63, 93, 998, 6242, 44, 13, 15...
2.252268
1,764
""" test photokit.py methods """ import os import pathlib import tempfile import pytest from osxphotos.photokit import ( LivePhotoAsset, PhotoAsset, PhotoLibrary, VideoAsset, PHOTOS_VERSION_CURRENT, PHOTOS_VERSION_ORIGINAL, PHOTOS_VERSION_UNADJUSTED, ) skip_test = "OSXPHOTOS_TEST_EXPORT"...
[ 37811, 1332, 2825, 482, 270, 13, 9078, 5050, 37227, 198, 198, 11748, 28686, 198, 11748, 3108, 8019, 198, 11748, 20218, 7753, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 28686, 87, 24729, 13, 38611, 482, 270, 1330, 357, 198, 220, 220, ...
2.390687
5,562
import os import sys import json
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 33918, 628, 628, 628, 198 ]
3.25
12
import tensorflow as tf import tensorflow_datasets as tfds import numpy as np import random from utils.dataset_processing import grasp, image import matplotlib.pyplot as plt dataset_path = './tfds/' train_data, meta = tfds.load('Jacquard', split='train', with_info=True, shuffle_files=False) BATCH_SIZE = 1 number_trai...
[ 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 11192, 273, 11125, 62, 19608, 292, 1039, 355, 48700, 9310, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 4738, 198, 6738, 3384, 4487, 13, 19608, 292, 316, 62, 36948, 1330, 13180, 11, 2...
1.899576
1,414
import pytest from scylla.scheduler import Scheduler, cron_schedule
[ 11748, 12972, 9288, 198, 198, 6738, 629, 88, 8466, 13, 1416, 704, 18173, 1330, 27774, 18173, 11, 1067, 261, 62, 15952, 5950, 628, 628, 198 ]
2.92
25
def mul_time(t, n): '''Multiple time t by n n: int Returns a time tr ''' return int_to_time(time_to_int(t) * n) def increment(t, sec): '''Writes a inc function does not contain any loops #for the second exercise of writing a pure function, I think you can just create a new object by copy.deepcopy(t) and ...
[ 197, 198, 4299, 35971, 62, 2435, 7, 83, 11, 299, 2599, 198, 197, 7061, 6, 31217, 640, 256, 416, 299, 198, 197, 198, 197, 77, 25, 493, 198, 197, 198, 197, 35561, 257, 640, 491, 198, 197, 7061, 6, 198, 197, 7783, 493, 62, 1462, ...
2.589438
587
# -*- coding: utf-8 -*- """Provider package.""" from __future__ import unicode_literals from .enzyme import EnzymeProvider from .ffmpeg import FFmpegProvider from .mediainfo import MediaInfoProvider
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 29495, 5301, 526, 15931, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 764, 268, 24266, 1330, 2039, 24266, 29495, 198, 6738, 764,...
3.333333
60
list = ('APRENDER', 'PROGRAMAR', 'LINGUAGEM', 'PYTHON', 'CURSO', 'GRATIS', 'ESTUDAR', 'PRATICAR', 'TRABALHAR', 'MERCADO', 'PROGRAMADOR', 'FUTURO') for p in list: print(f'\nNa palavra {p} temos: ', end='') for l in p: if l.lower() in 'aeiou': print(l.lower(), end=' ')
[ 4868, 796, 19203, 2969, 49, 10619, 1137, 3256, 705, 4805, 7730, 24115, 1503, 3256, 705, 43, 2751, 52, 4760, 3620, 3256, 705, 47, 56, 4221, 1340, 3256, 705, 34, 4261, 15821, 3256, 705, 10761, 1404, 1797, 3256, 705, 6465, 8322, 1503, 32...
1.842424
165
from sqlalchemy import * from sqlalchemy.orm import relationship from base import Base from unit import Unit
[ 6738, 44161, 282, 26599, 1330, 1635, 198, 6738, 44161, 282, 26599, 13, 579, 1330, 2776, 198, 198, 6738, 2779, 1330, 7308, 198, 6738, 4326, 1330, 11801, 628 ]
4.111111
27
""" Custom excel types for pandas objects (eg dataframes). For information about custom types in PyXLL see: https://www.pyxll.com/docs/udfs.html#custom-types For information about pandas see: http://pandas.pydata.org/ Including this module in your pyxll config adds the following custom types that can be used as retu...
[ 37811, 198, 15022, 27336, 3858, 329, 19798, 292, 5563, 357, 1533, 1366, 37805, 737, 198, 198, 1890, 1321, 546, 2183, 3858, 287, 9485, 55, 3069, 766, 25, 198, 5450, 1378, 2503, 13, 9078, 87, 297, 13, 785, 14, 31628, 14, 463, 9501, 13...
2.864481
915
from django.shortcuts import render import requests from bs4 import BeautifulSoup import re from collections import defaultdict as dfd from .models import * from datetime import date from datetime import timedelta from django.db.models import Sum from django.db.models import Count from django.db.models.functions impor...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 198, 11748, 7007, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 11748, 302, 198, 6738, 17268, 1330, 4277, 11600, 355, 288, 16344, 198, 6738, 764, 27530, 1330, 1635, 198, 6738...
1.872277
1,010
from django.http import HttpResponse
[ 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 198 ]
3.7
10
from src.core import Basic import networkx as nx
[ 6738, 12351, 13, 7295, 1330, 14392, 198, 11748, 3127, 87, 355, 299, 87, 628 ]
3.571429
14
# -*- coding: utf-8 -*- # Generated by Django 1.9.5 on 2016-11-28 05:19 from __future__ import unicode_literals 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, 24, 13, 20, 319, 1584, 12, 1157, 12, 2078, 8870, 25, 1129, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 1...
2.724638
69
from gym import spaces import numpy as np from bark.models.dynamic import StateDefinition from modules.runtime.commons.parameters import ParameterServer import math import operator from src.commons.spaces import BoundedContinuous, Discrete from src.observers.observer import StateObserver
[ 198, 6738, 11550, 1330, 9029, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 21405, 13, 27530, 13, 67, 28995, 1330, 1812, 36621, 198, 6738, 13103, 13, 43282, 13, 9503, 684, 13, 17143, 7307, 1330, 25139, 2357, 10697, 198, 11748, 10688, 1...
3.818182
77
import altair as alt import pandas as pd def scatterplot(x, y, data, hue=None, color=None, opacity=1., x_autoscale=True, y_autoscale=True): """Display a basic scatterplot. Parameters ---------- x : str Column in data to be used for x-axis y : str Column in data to be used ...
[ 11748, 5988, 958, 355, 5988, 198, 11748, 19798, 292, 355, 279, 67, 628, 198, 4299, 41058, 29487, 7, 87, 11, 331, 11, 1366, 11, 37409, 28, 14202, 11, 3124, 28, 14202, 11, 45912, 28, 16, 1539, 198, 220, 220, 220, 220, 220, 220, 220,...
2.197074
4,374
import gym from gym import spaces from itertools import cycle import random import sys import os import pygame from pygame.locals import * import flappy import numpy as np import cv2 # GLOBALS FPS = 30 SCREENWIDTH = 288 SCREENHEIGHT = 512 PIPEGAPSIZE = 100 # gap between upper and lower part of pipe BASEY ...
[ 11748, 11550, 198, 6738, 11550, 1330, 9029, 198, 198, 6738, 340, 861, 10141, 1330, 6772, 198, 11748, 4738, 198, 11748, 25064, 198, 11748, 28686, 198, 198, 11748, 12972, 6057, 198, 6738, 12972, 6057, 13, 17946, 874, 1330, 1635, 198, 198, ...
2.645161
248
from typing import AsyncGenerator, List, Union, Any from aiohttp.client import ClientSession from vkmini.utils import AbstractLogger from vkmini.request import longpoll_get, default_session from vkmini.exceptions import TokenInvalid from vkmini import VkApi
[ 6738, 19720, 1330, 1081, 13361, 8645, 1352, 11, 7343, 11, 4479, 11, 4377, 198, 198, 6738, 257, 952, 4023, 13, 16366, 1330, 20985, 36044, 198, 198, 6738, 410, 74, 45313, 13, 26791, 1330, 27741, 11187, 1362, 198, 6738, 410, 74, 45313, 1...
3.493333
75
import tarfile import pandas as pd import sqlalchemy as db from aswan import AswanConfig, ProdConfig, Project from aswan.migrate import pull, push from aswan.models import Base from aswan.object_store import get_object_store
[ 11748, 13422, 7753, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 44161, 282, 26599, 355, 20613, 198, 198, 6738, 355, 8149, 1330, 1081, 8149, 16934, 11, 1041, 67, 16934, 11, 4935, 198, 6738, 355, 8149, 13, 76, 42175, 1330, 28...
3.367647
68
from django.apps import AppConfig
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 198 ]
3.777778
9
import datetime as dt
[ 11748, 4818, 8079, 355, 288, 83 ]
3.5
6
## Incorrect division method ## 8 kyu ## https://www.codewars.com/kata/54d1c59aba326343c80000e7
[ 2235, 220, 3457, 47315, 7297, 2446, 201, 198, 2235, 220, 807, 479, 24767, 201, 198, 2235, 220, 3740, 1378, 2503, 13, 19815, 413, 945, 13, 785, 14, 74, 1045, 14, 4051, 67, 16, 66, 3270, 15498, 39195, 32118, 66, 23, 2388, 68, 22, 20...
2.23913
46
#!/usr/bin/env python3 import subprocess import sys from pathlib import Path import os pythonpath = sys.executable curdir = Path(__file__).parent.resolve() parentdir = curdir.parent # If openvino_env is already activated, launch jupyter lab # This will also start if openvino_env_2 is activated instead of openvino_env...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 850, 14681, 198, 11748, 25064, 198, 6738, 3108, 8019, 1330, 10644, 198, 11748, 28686, 198, 198, 29412, 6978, 796, 25064, 13, 18558, 18187, 198, 66, 2799, 343, 796, 10644, 7, ...
2.338592
824
import os.path, os, time from datetime import datetime from os import listdir from os.path import isfile, join path = "_posts" onlyfiles = [f for f in listdir(path) if isfile(join(path, f))] #print(onlyfiles) for i in onlyfiles: completePath = f"{path}/{i}" updatePost(completePath)
[ 198, 11748, 28686, 13, 6978, 11, 28686, 11, 640, 198, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 220, 220, 220, 220, 198, 220, 220, 220, 220, 198, 198, 6738, 28686, 1330, 1351, 15908, 198, 6738, 28686, 13, 6978, 1330, 318, 7753, ...
2.606838
117
from brownie import (accounts, web3)
[ 6738, 7586, 494, 1330, 357, 23317, 82, 11, 3992, 18, 8, 628, 628 ]
3.076923
13
from helper import greetings greetings("hi!")
[ 6738, 31904, 1330, 12589, 654, 198, 198, 70, 46648, 7203, 5303, 2474, 8, 628, 198 ]
3.266667
15
from setuptools import setup setup( name="manzip", version='1.0.0', py_modules=['manzip'], install_requires=[ 'Click', ], entry_points=''' [console_scripts] manzip=app:main ''', )
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 2625, 805, 13344, 1600, 198, 220, 220, 220, 2196, 11639, 16, 13, 15, 13, 15, 3256, 198, 220, 220, 220, 12972, 62, 18170, 28, 17816, 805, 13344, 6, ...
2.053097
113
from mmhelloworld import say_hello
[ 6738, 8085, 12758, 322, 1764, 1330, 910, 62, 31373, 628, 198 ]
3.363636
11
# -*- coding: utf-8 -*- """.. moduleauthor:: Artur Lissin""" from typing import TypeVar from bann.b_container.states.general.interface.init_state import InitState from bann.b_container.states.general.interface.net_state import NetState from bann.b_container.functions.dict_str_repr import dict_string_repr from rewowr.p...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 492, 8265, 9800, 3712, 3683, 333, 406, 747, 259, 37811, 198, 6738, 19720, 1330, 5994, 19852, 198, 198, 6738, 275, 1236, 13, 65, 62, 34924, 13, 27219, 13, 24622, ...
3.079602
201
import numpy as np import matplotlib.pyplot as plt plt.style.use('science') import os, sys, time sys.path.insert(0,"/import/freenas-m-03-geodynamics/jhayek/petsc-3.12.5/lib/petsc/bin/") sys.path.insert(0,"/import/freenas-m-03-geodynamics/jhayek/TEAR/se2wave/utils/python") sys.path.insert(0,"/import/freenas-m-03-geod...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 489, 83, 13, 7635, 13, 1904, 10786, 16801, 11537, 198, 198, 11748, 28686, 11, 25064, 11, 640, 628, 198, 17597, 13, 6978, 13, 28463, 7, ...
2.37325
1,929
# coding=utf-8 # # ROSREPO # Manage ROS workspaces with multiple Gitlab repositories # # Author: Timo Rhling # # Copyright 2016 Fraunhofer FKIE # # 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...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 198, 2, 48263, 2200, 16402, 198, 2, 1869, 496, 48263, 2499, 43076, 351, 3294, 15151, 23912, 38072, 198, 2, 198, 2, 6434, 25, 5045, 78, 10323, 1359, 198, 2, 198, 2, 15069, 1584, 39313, 403, 71, ...
2.819334
1,262
#!/usr/bin/python3 # -*- coding: utf-8 -*- # @Date : 2020/8/30 # @Author : Bruce Liu /Lin Luo # @Mail : 15869300264@163.com def trans(source_card: Card, target_card: Card, trans_num: int): """ :param source_card: :param target_card: :param trans_num: :return: """ print(f'trans ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2488, 10430, 220, 220, 1058, 12131, 14, 23, 14, 1270, 198, 2, 2488, 13838, 1058, 11088, 18258, 1220, 14993, 25956, 19...
2.306759
577
import subprocess from sys import exit result = subprocess.check_output(["ciphey", "-q", "-t 'hello'"]) if "hello" in result: exit(0) else: exit(1)
[ 11748, 850, 14681, 198, 6738, 25064, 1330, 8420, 198, 198, 20274, 796, 850, 14681, 13, 9122, 62, 22915, 7, 14692, 66, 541, 20342, 1600, 27444, 80, 1600, 27444, 83, 705, 31373, 6, 8973, 8, 198, 198, 361, 366, 31373, 1, 287, 1255, 25,...
2.507937
63
import math import os import tensorflow as tf import numpy as np import matplotlib as mpl mpl.use('Agg') import matplotlib.pyplot as plt import ops import utils import model_fctd import data import config import visualizations as vis FLAGS = tf.app.flags.FLAGS if __name__ == '__main__': # test_encode_decod...
[ 11748, 10688, 198, 11748, 28686, 198, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 355, 285, 489, 198, 76, 489, 13, 1904, 10786, 46384, 11537, 198, 11748, 2603, 29487, 8019,...
2.679144
187
""" Copyright 2018 Matthew Aynalem 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...
[ 37811, 198, 15269, 2864, 9308, 317, 2047, 282, 368, 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, 351, 262, 13789, 13, 198,...
3.033898
472
# Copyright 2021 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
[ 2, 15069, 33448, 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, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, 743, 733...
3.692308
286
"""Get status for split or move completed percentage of a given file duplicate volume.""" # :license: MIT, see LICENSE for more details. import click import SoftLayer from SoftLayer.CLI import environment from SoftLayer.CLI import formatting
[ 37811, 3855, 3722, 329, 6626, 393, 1445, 5668, 5873, 286, 257, 1813, 2393, 23418, 6115, 526, 15931, 198, 2, 1058, 43085, 25, 17168, 11, 766, 38559, 24290, 329, 517, 3307, 13, 198, 198, 11748, 3904, 198, 11748, 8297, 49925, 198, 6738, ...
4.206897
58
from django import forms #from pagedown.widgets import PagedownWidget from apps.saas.models import Offer
[ 6738, 42625, 14208, 1330, 5107, 198, 2, 6738, 279, 1886, 593, 13, 28029, 11407, 1330, 350, 1886, 593, 38300, 198, 6738, 6725, 13, 11400, 292, 13, 27530, 1330, 33085 ]
3.586207
29
#library import os #string aphoto print(" _ _ _ _ __ __ _ _ .____ .__ ") print("| | | | ___| | | __\\ \\ / /__ _ __| | __| | | | |__| ____ __ _____ _____ __ ") print("| |_| |/ _ \\ | |/ _ \\ \\ /\\ / / _ \\|...
[ 2, 32016, 198, 11748, 28686, 628, 198, 2, 8841, 257, 23074, 198, 4798, 7203, 4808, 220, 220, 4808, 220, 220, 220, 220, 220, 4808, 4808, 220, 220, 220, 11593, 220, 220, 220, 220, 220, 220, 220, 11593, 220, 220, 220, 220, 220, 220, ...
1.713261
3,205
from options import TestOptions import torch from models import TETGAN from utils import load_image, to_data, to_var, visualize, save_image import os #os.environ["CUDA_VISIBLE_DEVICES"] = "0" if __name__ == '__main__': main()
[ 6738, 3689, 1330, 6208, 29046, 198, 11748, 28034, 198, 6738, 4981, 1330, 309, 2767, 45028, 198, 6738, 3384, 4487, 1330, 3440, 62, 9060, 11, 284, 62, 7890, 11, 284, 62, 7785, 11, 38350, 11, 3613, 62, 9060, 198, 11748, 28686, 198, 2, ...
2.924051
79
#!/usr/bin/python # load many feeds to the GTFS data manager, from a csv with fields name and url # usage: bulkLoadFeeds.py file.csv http://server.example.com/ import csv from getpass import getpass from sys import argv import json from cookielib import CookieJar import urllib2 from urllib import urlencode if len(arg...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 3440, 867, 21318, 284, 262, 7963, 10652, 1366, 4706, 11, 422, 257, 269, 21370, 351, 7032, 1438, 290, 19016, 198, 2, 8748, 25, 11963, 8912, 18332, 82, 13, 9078, 2393, 13, 40664, 2638, 137...
2.31625
800
import numpy as np from scipy import integrate import matplotlib.pyplot as plt from UTILS.Calculus import Calculus from UTILS.SetAxisLimit import SetAxisLimit from UTILS.Tools import Tools from UTILS.Errors import Errors import sys # Theoretical background https://arxiv.org/abs/1401.5176 # Mocak, Meakin, Viallet, Ar...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 1330, 19386, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 19255, 45484, 13, 9771, 17576, 1330, 2199, 17576, 198, 6738, 19255, 45484, 13, 7248, 31554, 27...
3.263889
144
# -*- coding: utf-8 -*- from __future__ import print_function import logging from flask import url_for logger = logging.getLogger() try: from flask_weasyprint import render_pdf import_error = False except (ImportError, OSError) as e: # print(""" # Error importing flask-weasyprint! # PDF support...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 18931, 198, 6738, 42903, 1330, 19016, 62, 1640, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, ...
2.691589
214
from ._version import __version__ # noqa:F401 try: from .app import TerminalsExtensionApp except ModuleNotFoundError: import warnings warnings.warn("Could not import submodules")
[ 6738, 47540, 9641, 1330, 11593, 9641, 834, 220, 1303, 645, 20402, 25, 37, 21844, 198, 198, 28311, 25, 198, 220, 220, 220, 422, 764, 1324, 1330, 15527, 874, 11627, 3004, 4677, 198, 16341, 19937, 3673, 21077, 12331, 25, 198, 220, 220, 2...
3.305085
59
# By TheDestruc7i0n https://thedestruc7i0n.ca # MrGarretto for the code for traversing the command block chain https://mrgarretto.com import mcplatform import codecs __version__ = "V1.4.1" displayName = "Commands to Function" inputs = ( ("Converts a command block chain into a function.", "label"), ("The fil...
[ 2, 2750, 383, 24159, 622, 66, 22, 72, 15, 77, 3740, 1378, 83, 704, 395, 622, 66, 22, 72, 15, 77, 13, 6888, 198, 2, 1770, 38, 9624, 33955, 329, 262, 2438, 329, 33038, 278, 262, 3141, 2512, 6333, 3740, 1378, 43395, 4563, 11489, 78...
3.250825
303
import json from flask import g, request, render_template from flask.views import View from godmode import logging from godmode.acl import ACL from godmode.audit_log import audit_log from godmode.exceptions import AccessDenied log = logging.getLogger(__name__)
[ 11748, 33918, 198, 198, 6738, 42903, 1330, 308, 11, 2581, 11, 8543, 62, 28243, 198, 6738, 42903, 13, 33571, 1330, 3582, 198, 198, 6738, 5770, 14171, 1330, 18931, 198, 6738, 5770, 14171, 13, 37779, 1330, 17382, 198, 6738, 5770, 14171, 13...
3.533333
75
import discord import asyncio import time import aiohttp import re import pathlib import os import json from bs4 import BeautifulSoup from datetime import datetime from models.UpdatedMessage import UpdatedMessage from models.EmbedTemplate import EmbedTemplate from models.BotMention import BotMention from f...
[ 11748, 36446, 201, 198, 11748, 30351, 952, 201, 198, 11748, 640, 201, 198, 11748, 257, 952, 4023, 201, 198, 11748, 302, 201, 198, 11748, 3108, 8019, 201, 198, 11748, 28686, 201, 198, 11748, 33918, 201, 198, 6738, 275, 82, 19, 1330, 23...
3.670213
94
c = get_config() c.JupyterHub.ip = u'127.0.0.1' c.JupyterHub.port = 8000 c.JupyterHub.cookie_secret_file = u'/srv/jupyterhub/jupyterhub_cookie_secret' c.JupyterHub.db_url = u'/srv/jupyterhub/jupyterhub.sqlite' #c.JupyterHub.proxy_auth_token = u'/srv/jupyterhub/proxy_auth_token' c.ConfigurableHTTPProxy.auth_token = u'/s...
[ 66, 796, 651, 62, 11250, 3419, 198, 66, 13, 41, 929, 88, 353, 16066, 13, 541, 796, 334, 6, 16799, 13, 15, 13, 15, 13, 16, 6, 198, 66, 13, 41, 929, 88, 353, 16066, 13, 634, 796, 38055, 198, 66, 13, 41, 929, 88, 353, 16066, ...
2.109555
1,214
import datetime import warnings import pandas as pd import numpy as np from MongoDBUtils import * from scipy.optimize import fsolve import pymongo TRADING_FEE = 0.008 EARLIEST_DATE = datetime.datetime(2014, 10, 17) LATEST_DATE = datetime.datetime(2019, 10, 17) # In any cases, we shouldn't know today's and future val...
[ 11748, 4818, 8079, 198, 11748, 14601, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 42591, 11012, 18274, 4487, 1330, 1635, 198, 6738, 629, 541, 88, 13, 40085, 1096, 1330, 43458, 6442, 198, 11748, 2...
2.970149
134
import torch.nn as nn
[ 11748, 28034, 13, 20471, 355, 299, 77, 628 ]
2.875
8
# Generated by Django 4.0.3 on 2022-04-18 14:29 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 604, 13, 15, 13, 18, 319, 33160, 12, 3023, 12, 1507, 1478, 25, 1959, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
import os import torch import numpy as np import pandas as pd from torch.utils.data import Dataset, DataLoader from scipy.spatial.distance import cdist import logging
[ 11748, 28686, 198, 11748, 28034, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 16092, 292, 316, 11, 6060, 17401, 198, 6738, 629, 541, 88, 13, 2777, 34961, 13, 30...
3.408163
49
"""Implements a db backed storage area for intermediate results""" import sqlite3
[ 37811, 3546, 1154, 902, 257, 20613, 9763, 6143, 1989, 329, 19898, 2482, 37811, 198, 11748, 44161, 578, 18, 628 ]
4.368421
19
import boto3 import dateutil import glob import json import logging import os import queue import time from queries import MetadataQueries USE_LOCAL_DATA = True # whether to load data from S3 (false) or locally (true) LOCAL_DATA_REPOSITORY = "s3data/usdot-its-cvpilot-public-data" # path to local directory containing s...
[ 11748, 275, 2069, 18, 198, 11748, 3128, 22602, 198, 11748, 15095, 198, 11748, 33918, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 16834, 198, 11748, 640, 198, 6738, 20743, 1330, 3395, 14706, 4507, 10640, 198, 198, 19108, 62, 29701, 1...
2.623881
335
Managers = ['Shim', 'Mike', 'Ryan', 'Kevin', 'Wessa', 'ser0wl'] # google spreedsheet id ISKO_SPREADSHEET_ID = '' # the list of names with discord ID ISKO_DiscordAccount = 'DiscordAccount!A2:B100' # the list of Names, ronin address, ronin private keys # eg: # Name | Address | Privat...
[ 5124, 10321, 796, 37250, 2484, 320, 3256, 705, 16073, 3256, 705, 21868, 3256, 705, 23865, 3256, 705, 54, 21411, 3256, 705, 2655, 15, 40989, 20520, 198, 198, 2, 23645, 599, 260, 5379, 25473, 4686, 198, 1797, 22328, 62, 4303, 15675, 9693,...
2.306034
464
# -*- coding: utf-8 -*- # Generated by Django 1.9.13 on 2017-08-19 03:52 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, 24, 13, 1485, 319, 2177, 12, 2919, 12, 1129, 7643, 25, 4309, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, ...
2.736842
57
from gpiozero import Button import os from time import sleep button = Button(2) i = 0 while True: if button.is_pressed: print(i, ". I've been pressed") i += 1 sleep(0.1)
[ 6738, 27809, 952, 22570, 1330, 20969, 198, 11748, 28686, 198, 6738, 640, 1330, 3993, 198, 198, 16539, 796, 20969, 7, 17, 8, 198, 72, 796, 657, 198, 198, 4514, 6407, 25, 198, 220, 220, 220, 611, 4936, 13, 271, 62, 45477, 25, 198, 2...
2.325581
86
import rasterio from rasterio.plot import show, reshape_as_raster, reshape_as_image, adjust_band from rasterio import warp import numpy as np
[ 11748, 374, 1603, 952, 198, 6738, 374, 1603, 952, 13, 29487, 1330, 905, 11, 27179, 1758, 62, 292, 62, 81, 1603, 11, 27179, 1758, 62, 292, 62, 9060, 11, 4532, 62, 3903, 198, 6738, 374, 1603, 952, 1330, 25825, 198, 11748, 299, 32152, ...
3.108696
46
from logging import getLogger from queue import Empty import threading import random import time logger = getLogger('opentsdb-py')
[ 6738, 18931, 1330, 651, 11187, 1362, 198, 6738, 16834, 1330, 33523, 198, 11748, 4704, 278, 198, 11748, 4738, 198, 11748, 640, 198, 198, 6404, 1362, 796, 651, 11187, 1362, 10786, 404, 658, 9945, 12, 9078, 11537, 628, 628 ]
3.552632
38
from xlrd import open_workbook wb = open_workbook(r"C:\Users\Lenovo\Documents\excel converter.xlsx") for s in wb.sheets(): #print 'Sheet:',s.name values = [] for row in range(s.nrows): col_value = [] for col in range(s.ncols): value = (s.cell(row,col).value) ...
[ 6738, 2124, 75, 4372, 1330, 1280, 62, 1818, 2070, 201, 198, 39346, 796, 1280, 62, 1818, 2070, 7, 81, 1, 34, 7479, 14490, 59, 30659, 18768, 59, 38354, 59, 1069, 5276, 38394, 13, 87, 7278, 87, 4943, 201, 198, 1640, 264, 287, 266, 65...
2.012987
231
from apitax.drivers.Driver import Driver from apitax.utilities.Files import getAllFiles from apitax.ah.Options import Options from pathlib import Path from apitax.ah.Credentials import Credentials from apitax.utilities.Json import read from apitax.ah.State import State from apitax.utilities.Files import getPath
[ 6738, 2471, 270, 897, 13, 36702, 13, 32103, 1330, 12434, 198, 6738, 2471, 270, 897, 13, 315, 2410, 13, 25876, 1330, 651, 3237, 25876, 198, 6738, 2471, 270, 897, 13, 993, 13, 29046, 1330, 18634, 198, 6738, 3108, 8019, 1330, 10644, 198,...
3.340426
94