content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
import copy import errno import os import signal import time from psutil import STATUS_ZOMBIE, STATUS_DEAD, NoSuchProcess from zmq.utils.jsonapi import jsonmod as json from circus.process import Process, DEAD_OR_ZOMBIE, UNEXISTING from circus import logger from circus import util from circus.stream import get_pipe_re...
[ 11748, 4866, 198, 11748, 11454, 3919, 198, 11748, 28686, 198, 11748, 6737, 198, 11748, 640, 198, 198, 6738, 26692, 22602, 1330, 15486, 2937, 62, 57, 2662, 3483, 36, 11, 15486, 2937, 62, 7206, 2885, 11, 1400, 16678, 18709, 198, 6738, 197...
1.902571
3,151
# Faa um programa em Python que abra e reproduza o udio de um arquivo MP3. from pygame import mixer mixer.init() mixer.music.load('ex021.mp3') mixer.music.play() input('Agora vc escuta?')
[ 2, 376, 7252, 23781, 1430, 64, 795, 11361, 8358, 450, 430, 304, 8186, 4496, 267, 334, 67, 952, 390, 23781, 610, 421, 23593, 4904, 18, 13, 198, 198, 6738, 12972, 6057, 1330, 33938, 198, 19816, 263, 13, 15003, 3419, 198, 19816, 263, 1...
2.567568
74
from django.http import HttpResponseRedirect, HttpResponse from django.shortcuts import render_to_response from django.core.context_processors import csrf from admin_forms import * from django.template import loader,RequestContext from django.contrib.admin.views.decorators import staff_member_required from Human.mode...
[ 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 7738, 1060, 11, 367, 29281, 31077, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 62, 1462, 62, 26209, 198, 6738, 42625, 14208, 13, 7295, 13, 22866, 62, 14681, 669, 1330, 26...
3.420048
419
import urllib, json baseurl = 'https://query.yahooapis.com/v1/public/yql?' yql_query = "select item.condition from weather.forecast where woeid=9807" yql_url = baseurl + urllib.urlencode({'q':yql_query}) + "&format=json" result = urllib.urlopen(yql_url).read() data = json.loads(result) print data['query']['results']
[ 11748, 2956, 297, 571, 11, 33918, 198, 198, 8692, 6371, 796, 705, 5450, 1378, 22766, 13, 40774, 499, 271, 13, 785, 14, 85, 16, 14, 11377, 14, 88, 13976, 8348, 198, 198, 88, 13976, 62, 22766, 796, 366, 19738, 2378, 13, 31448, 422, ...
2.580645
124
"""This module provides mechanisms to use signal handlers in Python. Functions: alarm() -- cause SIGALRM after a specified time [Unix only] setitimer() -- cause a signal (described below) after a specified float time and the timer may restart then [Unix only] getitimer() -- get current value of ...
[ 37811, 1212, 8265, 3769, 11701, 284, 779, 6737, 32847, 287, 11361, 13, 201, 198, 201, 198, 24629, 2733, 25, 201, 198, 201, 198, 282, 1670, 3419, 1377, 2728, 33993, 1847, 29138, 706, 257, 7368, 640, 685, 47000, 691, 60, 201, 198, 2617,...
2.765494
597
# flake8: noqa """Module implementing the clients for services.""" from npc_engine.service_clients.text_generation_client import TextGenerationClient from npc_engine.service_clients.control_client import ControlClient from npc_engine.service_clients.sequence_classifier_client import ( SequenceClassifierClient,...
[ 2, 781, 539, 23, 25, 645, 20402, 201, 198, 37811, 26796, 15427, 262, 7534, 329, 2594, 526, 15931, 201, 198, 6738, 299, 14751, 62, 18392, 13, 15271, 62, 565, 2334, 13, 5239, 62, 20158, 62, 16366, 1330, 8255, 8645, 341, 11792, 201, 19...
3.418803
117
try: from setuptools import setup except ImportError: from distutils.core import setup config = { 'description': 'A program does that is a DJ by using feedback provided by the dancers.', 'author': 'Thomas Schaper', 'url': 'https://gitlab.com/SilentDiscoAsAService/DJFeet', 'download_url': 'https...
[ 28311, 25, 198, 220, 220, 220, 422, 900, 37623, 10141, 1330, 9058, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220, 422, 1233, 26791, 13, 7295, 1330, 9058, 198, 198, 11250, 796, 1391, 198, 220, 220, 220, 705, 11213, 10354, 705, 32, ...
2.386282
277
km = float(input('Digite qual a distncia da sua viagem em km: ')) if km <= 200: preo = km * 0.50 print('O valor da sua viagem de {:.2f}R$'.format(preo)) else: preo = km * 0.45 print('O valor da sua viagem de {:.2f}R$'.format(preo))
[ 13276, 796, 12178, 7, 15414, 10786, 19511, 578, 4140, 257, 1233, 10782, 544, 12379, 424, 64, 25357, 363, 368, 795, 10571, 25, 705, 4008, 201, 198, 201, 198, 361, 10571, 19841, 939, 25, 201, 198, 220, 220, 220, 662, 78, 796, 10571, 1...
2.03937
127
import json import kubernetes.config import pytest_bdd import pytest_bdd.parsers import utils.helper pytest_bdd.scenarios('features/metrics_server.feature')
[ 11748, 33918, 198, 198, 11748, 479, 18478, 3262, 274, 13, 11250, 198, 198, 11748, 12972, 9288, 62, 65, 1860, 198, 11748, 12972, 9288, 62, 65, 1860, 13, 79, 945, 364, 198, 198, 11748, 3384, 4487, 13, 2978, 525, 198, 198, 9078, 9288, ...
2.688525
61
default = False actions = 'store_true' ENC = 'utf-8'
[ 12286, 796, 10352, 198, 4658, 796, 705, 8095, 62, 7942, 6, 198, 24181, 796, 705, 40477, 12, 23, 6 ]
2.736842
19
import sre_constants as sc import sre_parse as sp import typing import unicodedata from pprint import pprint from RichConsole import groups, rsjoin from .knowledge import CAPTURE_GROUP, LITERAL_STR singleElPreLifter = SingleElPreLifter(REFirstPassVisitor) re_IN_FlatPreLifter = SingleElPreLifter(RE_IN_FirstPa...
[ 11748, 264, 260, 62, 9979, 1187, 355, 629, 198, 11748, 264, 260, 62, 29572, 355, 599, 198, 11748, 19720, 198, 11748, 28000, 9043, 1045, 198, 6738, 279, 4798, 1330, 279, 4798, 198, 198, 6738, 3998, 47581, 1330, 2628, 11, 44608, 22179, ...
2.985507
138
import torch from torch import nn
[ 11748, 28034, 198, 6738, 28034, 1330, 299, 77, 628, 628 ]
3.7
10
from pastila.fields import Field
[ 6738, 1613, 10102, 13, 25747, 1330, 7663, 628 ]
4.25
8
import multiprocessing import time from typing import List from constants import CPU_BIG_NUMBERS from utils import show_execution_time if __name__ == "__main__": show_execution_time(func=lambda: find_sums(CPU_BIG_NUMBERS))
[ 11748, 18540, 305, 919, 278, 198, 11748, 640, 198, 198, 6738, 19720, 1330, 7343, 198, 198, 6738, 38491, 1330, 9135, 62, 3483, 38, 62, 41359, 33, 4877, 198, 6738, 3384, 4487, 1330, 905, 62, 18558, 1009, 62, 2435, 628, 628, 198, 361, ...
2.876543
81
from abc import ABCMeta from whatsapp_tracker.bases.selenium_bases.base_selenium_kit import BaseSeleniumKit from whatsapp_tracker.mixins.seleniun_keyboard_press_mixin import SeleniumKeyBoardPressMixin
[ 6738, 450, 66, 1330, 9738, 48526, 198, 198, 6738, 45038, 1324, 62, 2213, 10735, 13, 65, 1386, 13, 741, 47477, 62, 65, 1386, 13, 8692, 62, 741, 47477, 62, 15813, 1330, 7308, 48767, 47477, 20827, 198, 6738, 45038, 1324, 62, 2213, 10735,...
3.075758
66
import numpy as np from layers import FullyConnectedLayer, ReLULayer, softmax_with_cross_entropy, l2_regularization
[ 11748, 299, 32152, 355, 45941, 198, 198, 6738, 11685, 1330, 40234, 13313, 276, 49925, 11, 797, 43, 6239, 2794, 11, 2705, 9806, 62, 4480, 62, 19692, 62, 298, 28338, 11, 300, 17, 62, 16338, 1634, 628 ]
3.277778
36
import numpy as np ### ----- config # parameters gamma = 3 omega = 1 precision = 10**-6 # matrix matrix = np.zeros((20, 20), dtype = np.float64) np.fill_diagonal(matrix, gamma) np.fill_diagonal(matrix[:, 1:], -1) # upper part np.fill_diagonal(matrix[1:, :], -1) # lower part # vector b bVector = np.full((20, 1), g...
[ 11748, 299, 32152, 355, 45941, 628, 198, 198, 21017, 37404, 4566, 198, 198, 2, 10007, 198, 28483, 2611, 796, 513, 198, 462, 4908, 796, 352, 198, 3866, 16005, 796, 838, 1174, 12, 21, 198, 198, 2, 17593, 198, 6759, 8609, 796, 45941, 1...
2.575646
271
# Copyright (C) 2013-2014 DNAnexus, Inc. # # This file is part of dx-toolkit (DNAnexus platform client libraries). # # 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.a...
[ 2, 15069, 357, 34, 8, 2211, 12, 4967, 7446, 44520, 11, 3457, 13, 198, 2, 198, 2, 770, 2393, 318, 636, 286, 44332, 12, 25981, 15813, 357, 28886, 44520, 3859, 5456, 12782, 737, 198, 2, 198, 2, 220, 220, 49962, 739, 262, 24843, 13789...
2.476232
2,272
"""Routines to make objects serialisable. Each of the functions in this module makes a specific type of object serialisable. In most cases, this module needs to be imported and the function run in both the serialising and the unserialising environments. Here's a summary (see function documentation for details): mk_...
[ 37811, 49, 448, 1127, 284, 787, 5563, 11389, 43942, 13, 198, 198, 10871, 286, 262, 5499, 287, 428, 8265, 1838, 257, 2176, 2099, 286, 2134, 198, 46911, 43942, 13, 220, 554, 749, 2663, 11, 428, 8265, 2476, 284, 307, 17392, 290, 262, 2...
2.446898
951
from floxcore.config import Configuration, ParamDefinition
[ 6738, 781, 1140, 7295, 13, 11250, 1330, 28373, 11, 25139, 36621, 628 ]
5
12
from flask import Flask from flask_restful import Api, Resource, reqparse from kuet_teacher_data import get_data app = Flask(__name__) api = Api(app) data = get_data() api.add_resource(Teacher_data,"/data","/data/","/data/<string:id>") api.add_resource(search_dept_teacher,"/find/<string:dept>/<string:id>") api.add_...
[ 6738, 42903, 1330, 46947, 198, 6738, 42903, 62, 2118, 913, 1330, 5949, 72, 11, 20857, 11, 43089, 29572, 198, 198, 6738, 479, 84, 316, 62, 660, 3493, 62, 7890, 1330, 651, 62, 7890, 198, 198, 1324, 796, 46947, 7, 834, 3672, 834, 8, ...
2.55
160
import os import sys sys.path.append(os.path.dirname(__file__) + "/../") from scipy.misc import imread from util.config import load_config from nnet import predict from util import visualize from dataset.pose_dataset import data_to_input cfg = load_config("demo/pose_cfg.yaml") # Load and setup CNN part detector s...
[ 11748, 28686, 198, 11748, 25064, 198, 198, 17597, 13, 6978, 13, 33295, 7, 418, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 8, 1343, 12813, 40720, 4943, 198, 198, 6738, 629, 541, 88, 13, 44374, 1330, 545, 961, 198, 198, 6738, 7736,...
2.943894
303
import datetime import logging import os import warnings import matplotlib.pyplot as plt import numpy as np import pandas as pd from logutils import BraceMessage as __ from tqdm import tqdm import simulators from mingle.models.broadcasted_models import inherent_alpha_model from mingle.utilities.chisqr import chi_squa...
[ 11748, 4818, 8079, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 14601, 198, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 2604, 26...
2.024036
9,652
import pandas as pd from datetime import datetime, timedelta from bs4 import BeautifulSoup as bs from etl.logger import get_logger from etl.main import ETL logger = get_logger("transform") def transform_data(service: str, data_file: str) -> pd.DataFrame: """ Simple function to guide the request ...
[ 11748, 19798, 292, 355, 279, 67, 201, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 201, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 355, 275, 82, 201, 198, 6738, 2123, 75, 13, 6404, 1362, 1330, 651, 62, 6404, 1362,...
2.223732
2,208
# Generated by Django 2.2.24 on 2021-07-19 11:52 import cloudinary.models from django.db import migrations
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 1731, 319, 33448, 12, 2998, 12, 1129, 1367, 25, 4309, 198, 198, 11748, 6279, 3219, 13, 27530, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
3.027778
36
from django.urls import path from academic.views import SectionCreate, SectionUpdate, SectionDelete from .views import ( StudentView, AttendanceMark, AttendanceSearch, AttendanceView, IndividualMarksView, AdmissionCreate, AdmissionView, AdmissionDelete, AdmissionUpda...
[ 201, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 201, 198, 6738, 8233, 13, 33571, 1330, 7275, 16447, 11, 7275, 10260, 11, 220, 7275, 38727, 201, 198, 6738, 764, 33571, 1330, 357, 201, 198, 220, 220, 220, 13613, 7680, 11, 201, ...
2.67191
1,335
import os import sys # PATH vars BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) ROOT_DIR = lambda *x: os.path.join(BASE_DIR, *x) APPS_DIR = os.path.join(ROOT_DIR(), "apps") sys.path.insert(0, APPS_DIR) # SECURITY WARNING: keep the secret key used in production secret! SECRET...
[ 11748, 28686, 198, 11748, 25064, 198, 198, 2, 46490, 410, 945, 198, 198, 33, 11159, 62, 34720, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 397,...
2.220547
2,521
import happybase from settings.default import DefaultConfig import redis pool = happybase.ConnectionPool(size=10, host='hadoop-master', port=9090) # redis_client = redis.StrictRedis(host=DefaultConfig.REDIS_HOST, port=DefaultConfig.REDIS_PORT, db=10, ...
[ 11748, 3772, 8692, 198, 6738, 6460, 13, 12286, 1330, 15161, 16934, 198, 11748, 2266, 271, 198, 198, 7742, 796, 3772, 8692, 13, 32048, 27201, 7, 7857, 28, 940, 11, 2583, 11639, 71, 4533, 404, 12, 9866, 3256, 2493, 28, 24, 42534, 8, 1...
1.992647
408
# -*- coding: utf-8 -*- # Define here the models for your scraped items # # See documentation in: # http://doc.scrapy.org/en/latest/topics/items.html import scrapy
[ 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, 2638, 1378, 15390, 13, 1416, 2416, 88, 13, 2398, 14, 2...
2.693548
62
sign_sock = None vrfy_sock = None MAX_PACKET_LEN = 8192 NOT_BINARY_STR_ERR = -1 MISSING_DELIMITER_ERR = -2 ORIGINAL_MSG_ERR = -3 # Packet Structure: < message > # Message may be either a long integer, or a binary string # Packet Structure: < message | ":" | signature > # Message and signature may be either long inte...
[ 12683, 62, 82, 735, 796, 6045, 198, 37020, 24928, 62, 82, 735, 796, 6045, 198, 198, 22921, 62, 47, 8120, 2767, 62, 43, 1677, 796, 807, 17477, 198, 11929, 62, 33, 1268, 13153, 62, 18601, 62, 1137, 49, 796, 532, 16, 198, 44, 16744, ...
2.774194
124
from django.contrib.auth.models import User from django.db import models
[ 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 628, 628, 628, 628 ]
3.333333
24
import socket try: from .idarest_mixins import IdaRestConfiguration except: from idarest_mixins import IdaRestConfiguration # idarest_master_plugin_t.config['master_debug'] = False # idarest_master_plugin_t.config['master_info'] = False # idarest_master_plugin_t.config['api_prefix'] = '/ida/api/v1.0' # ida...
[ 11748, 17802, 198, 28311, 25, 198, 220, 220, 220, 422, 764, 312, 12423, 62, 19816, 1040, 1330, 5121, 64, 19452, 38149, 198, 16341, 25, 198, 220, 220, 220, 422, 4686, 12423, 62, 19816, 1040, 1330, 5121, 64, 19452, 38149, 198, 198, 2, ...
2.577287
317
import logging import json from datetime import datetime from telegram.ext import (Updater, CommandHandler, MessageHandler, Filters, Job, CallbackQueryHandler) from telegram import (ChatAction, ParseMode, InlineKeyboardButton, InlineKeyboardMarkup) from peewee import fn import pytz from word...
[ 11748, 18931, 198, 11748, 33918, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 6738, 573, 30536, 13, 2302, 1330, 357, 4933, 67, 729, 11, 9455, 25060, 11, 16000, 25060, 11, 7066, 1010, 11, 198, 220, 220, 220, 220, 220, 220, 220, ...
2.47482
417
import setuptools from setuptools import setup, find_namespace_packages setuptools.setup( name="small_nn-jcanode", version="0.0.1", author="Justin Canode", author_email="jcanode@my.gcu.edu", description="A small Neural Network Framework", long_description_content_type="text/markdown", url=...
[ 11748, 900, 37623, 10141, 198, 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 14933, 10223, 62, 43789, 628, 198, 2617, 37623, 10141, 13, 40406, 7, 198, 220, 220, 220, 1438, 2625, 17470, 62, 20471, 12, 73, 5171, 1098, 1600, 198, 22...
2.662222
225
import os import sys import utils import extras.downloadStats as stats import extras.downloadManuscript as dm import extras.unpaywall as up main()
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 3384, 4487, 198, 11748, 33849, 13, 15002, 29668, 355, 9756, 198, 11748, 33849, 13, 15002, 5124, 15817, 355, 288, 76, 220, 198, 11748, 33849, 13, 403, 15577, 11930, 355, 510, 198, 198, 12417, ...
3.547619
42
""".""" from django.urls import path, reverse_lazy from account.views import (AccountView, InfoFormView, EditAccountView, AddAddressView, AddressListView, DeleteAddress) from django.con...
[ 37811, 526, 15931, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 11, 9575, 62, 75, 12582, 198, 6738, 1848, 13, 33571, 1330, 357, 30116, 7680, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
2.282486
531
#!/usr/bin/env python import os import sys sys.path.insert(0, '/home/nullism/web/dnd.nullism.com/') from main import app conf = {} conf['SECRET_KEY'] = 'CHANGEME' app.config.update(conf) application = app
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 28686, 198, 11748, 25064, 198, 17597, 13, 6978, 13, 28463, 7, 15, 11, 31051, 11195, 14, 8423, 1042, 14, 12384, 14, 67, 358, 13, 8423, 1042, 13, 785, 14, 11537, 198, 6738, 1388...
2.580247
81
#!/usr/bin/env python import logging from binance.spot import Spot as Client from binance.lib.utils import config_logging config_logging(logging, logging.DEBUG) key = "" secret = "" spot_client = Client(key, secret) logging.info( spot_client.sub_account_futures_asset_transfer_history( email="", ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 18931, 198, 6738, 9874, 590, 13, 20485, 1330, 15899, 355, 20985, 198, 6738, 9874, 590, 13, 8019, 13, 26791, 1330, 4566, 62, 6404, 2667, 198, 198, 11250, 62, 6404, 2667, 7, ...
2.602649
151
# -*- coding:utf-8 -*- import json if __name__ == '__main__': pass
[ 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 198, 11748, 33918, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1208 ]
2.181818
33
import pytest from jubox import JupyterNotebook, RawCell, CodeCell, MarkdownCell
[ 198, 11748, 12972, 9288, 198, 198, 6738, 474, 549, 1140, 1330, 449, 929, 88, 353, 6425, 2070, 11, 16089, 28780, 11, 6127, 28780, 11, 2940, 2902, 28780, 198 ]
2.964286
28
# coding: utf-8 #------------------------------------------------------------------------- # Copyright (c) Microsoft. 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 # ...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 10097, 45537, 198, 2, 15069, 357, 66, 8, 5413, 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...
4.330579
242
from selenium import webdriver from selenium.webdriver.common.keys import Keys import unittest from time import sleep path="C:\chromedriver.exe" url="http://www.hudl.com/login" #username:nathanyang18@outlook.com #password:test1234 if __name__ =="__main": unittest.main()
[ 6738, 384, 11925, 1505, 1330, 3992, 26230, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 11321, 13, 13083, 1330, 26363, 198, 11748, 555, 715, 395, 198, 6738, 640, 1330, 3993, 198, 6978, 2625, 34, 7479, 28663, 276, 38291, 13, 13499,...
2.76
100
from django.contrib.auth.models import User from rest_framework import serializers # MODEL IMPORTS from project.notes.models import Note, NoteItem
[ 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 6738, 1334, 62, 30604, 1330, 11389, 11341, 198, 198, 2, 19164, 3698, 30023, 33002, 198, 6738, 1628, 13, 17815, 13, 27530, 1330, 5740, 11, 5740, 7449, 628, 628 ]
3.682927
41
#!/usr/bin/env python3 # -*- encoding: utf-8 -*- # vim: tabstop=2 shiftwidth=2 softtabstop=2 expandtab import sys import json import os import urllib.parse import traceback import datetime import boto3 DRY_RUN = (os.getenv('DRY_RUN', 'false') == 'true') AWS_REGION = os.getenv('REGION_NAME', 'us-east-1') KINESIS_STR...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 21004, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 43907, 25, 7400, 11338, 28, 17, 6482, 10394, 28, 17, 2705, 8658, 11338, 28, 17, 4292, 8658, 198, 198, 11748, ...
1.930909
825
from pathlib import Path from src.main import retrieve_soil_composition # This example is base on geodatabase obtain from ssurgo on Ohio area ssurgo_folder_path = Path().absolute().parent / 'resources' / 'SSURGO' / 'soils_GSSURGO_oh_3905571_01' \ / 'soils' / 'gssurgo_g_oh' / 'gSSURGO_OH.gdb' coor...
[ 6738, 3108, 8019, 1330, 10644, 198, 198, 6738, 12351, 13, 12417, 1330, 19818, 62, 568, 346, 62, 785, 9150, 198, 198, 2, 770, 1672, 318, 2779, 319, 4903, 375, 265, 5754, 7330, 422, 264, 11793, 2188, 319, 6835, 1989, 198, 824, 333, 21...
2.356098
205
sol = Solution() t = int(input()) dp = [[0]*201 for _ in range(201)] for _ in range(t): print(sol.main())
[ 201, 198, 201, 198, 34453, 796, 28186, 3419, 201, 198, 83, 796, 493, 7, 15414, 28955, 201, 198, 26059, 796, 16410, 15, 60, 9, 1264, 329, 4808, 287, 2837, 7, 1264, 15437, 201, 198, 1640, 4808, 287, 2837, 7, 83, 2599, 3601, 7, 34453...
2.382979
47
import unittest from palindrome import is_palindrome if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 198, 6738, 6340, 521, 5998, 1330, 318, 62, 18596, 521, 5998, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3419, 198 ]
2.641026
39
import requests import json import re if __name__ == "__main__": # course_id = input("Enter course id: ") # print(get_course_requirements(course_id)) # major_reqs = get_all_course_requirements() # save(major_reqs, "../data/course_requirements.json") # major_titles = get_all_major_titles() # save(major_title...
[ 11748, 7007, 198, 11748, 33918, 198, 11748, 302, 628, 628, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 197, 2, 1781, 62, 312, 796, 5128, 7203, 17469, 1781, 4686, 25, 366, 8, 198, 197, 2, 3601, 7, 1136, ...
2.644172
163
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from builtins import bytes from builtins import chr from builtins import range from builtins import super import random from pprint import pprint from binascii import hexl...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 6738, 3170, 1040, 1330, ...
2.367701
1,096
from PyQt5 import QtWidgets, QtCore from utils.styling import rename_user_dialog_title_style
[ 6738, 9485, 48, 83, 20, 1330, 33734, 54, 312, 11407, 11, 33734, 14055, 198, 6738, 3384, 4487, 13, 34365, 1359, 1330, 36265, 62, 7220, 62, 38969, 519, 62, 7839, 62, 7635, 628 ]
2.9375
32
#!/usr/bin/python import bluetooth, sys, os, re, subprocess, time, getopt BT_BLE = int(os.getenv('BT_BLE', 0)) BT_SCAN_TIMEOUT = int(os.getenv('BT_SCAN_TIMEOUT', 2)) if BT_BLE: from gattlib import DiscoveryService from ble_client import BleClient #--------------------------------------------------------------...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 11748, 48208, 16271, 11, 25064, 11, 28686, 11, 302, 11, 850, 14681, 11, 640, 11, 651, 8738, 198, 198, 19313, 62, 19146, 796, 493, 7, 418, 13, 1136, 24330, 10786, 19313, 62, 19146, 3256, 657...
3.561576
203
#!/usr/bin/env python import os import sys if not os.getegid() == 0: sys.exit( 'Script must be run as root' ) from pyA20.gpio import gpio from pyA20.gpio import port pin = port.PA12 gpio.init() gpio.setcfg(pin, gpio.OUTPUT) gpio.output(pin, int(sys.argv[1]))
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 361, 407, 28686, 13, 1136, 1533, 312, 3419, 6624, 657, 25, 198, 220, 220, 220, 25064, 13, 37023, 7, 705, 7391, 1276, 307, 1057, 355, 6...
2.301724
116
######################################### # Author: Chenfu Shi # Email: chenfu.shi@postgrad.manchester.ac.uk # BSD-3-Clause License # Copyright 2019 Chenfu Shi # All rights reserved. # Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions ...
[ 29113, 7804, 2, 198, 2, 6434, 25, 12555, 20942, 16380, 198, 2, 9570, 25, 269, 831, 20942, 13, 44019, 31, 7353, 9744, 13, 805, 35983, 13, 330, 13, 2724, 198, 2, 347, 10305, 12, 18, 12, 2601, 682, 13789, 198, 2, 15069, 13130, 12555,...
2.797055
1,562
# Year 2022 # Authors: Anais Mller based on fink-broker.org code import os import sys import glob import logging import argparse import numpy as np import pandas as pd from tqdm import tqdm from pathlib import Path from functools import partial from astropy.table import Table from astropy import units as u from astrop...
[ 2, 6280, 33160, 198, 2, 46665, 25, 1052, 15152, 337, 6051, 1912, 319, 277, 676, 12, 7957, 6122, 13, 2398, 2438, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 15095, 198, 11748, 18931, 198, 11748, 1822, 29572, 198, 11748, 299, ...
2.143817
3,275
#!/usr/bin/python3 '''Day 11 of the 2017 advent of code''' def part_one(data): """Return the answer to part one of this day""" hexer = HexCounter() for coord in data: hexer.move(coord) return hexer.max() def part_two(data): """Return the answer to part two of this da...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 201, 198, 7061, 6, 12393, 1367, 286, 262, 2177, 19980, 286, 2438, 7061, 6, 201, 198, 201, 198, 201, 198, 201, 198, 4299, 636, 62, 505, 7, 7890, 2599, 201, 198, 220, 220, 220, 37227, 13615,...
2.19174
339
# Copied from /u/jlu/data/microlens/20aug22os/reduce/reduce.py ################################################## # # General Notes: # -- python uses spaces to figure out the beginnings # and ends of functions/loops/etc. So make sure # to preserve spacings properly (indent). This # is easy to do if you use em...
[ 2, 6955, 798, 422, 1220, 84, 14, 73, 2290, 14, 7890, 14, 24055, 75, 641, 14, 1238, 7493, 1828, 418, 14, 445, 7234, 14, 445, 7234, 13, 9078, 198, 198, 29113, 14468, 2235, 198, 2, 198, 2, 3611, 11822, 25, 198, 2, 1377, 21015, 3544...
2.406676
3,445
import tkinter as tk from PIL import Image, ImageTk from game import Game from threading import Thread import time from gameSaver import sendFull from Client import DummyAgent
[ 11748, 256, 74, 3849, 355, 256, 74, 198, 6738, 350, 4146, 1330, 7412, 11, 7412, 51, 74, 198, 6738, 983, 1330, 3776, 198, 6738, 4704, 278, 1330, 14122, 198, 11748, 640, 198, 6738, 983, 50, 8770, 1330, 3758, 13295, 198, 6738, 20985, 1...
3.765957
47
"""Core classes for motto """ from typing import Any, Callable, ClassVar, Dict, List, Optional, Tuple, Union from typing_extensions import Protocol, TypedDict SkillParams = Dict[str, Any] SkillProc = Callable[[Sentence, SkillParams], Optional[Message]] Config = Dict[str, Any]
[ 37811, 14055, 6097, 329, 33600, 198, 37811, 198, 6738, 19720, 1330, 4377, 11, 4889, 540, 11, 5016, 19852, 11, 360, 713, 11, 7343, 11, 32233, 11, 309, 29291, 11, 4479, 198, 6738, 19720, 62, 2302, 5736, 1330, 20497, 11, 17134, 276, 35, ...
3.166667
90
from diffrascape.env import BadSeeds
[ 6738, 814, 81, 3372, 1758, 13, 24330, 1330, 7772, 50, 39642, 628 ]
3.166667
12
#!/usr/bin/python import json, subprocess, sys, platform from os.path import expanduser if len (sys.argv) < 2 : print("Usage: python " + sys.argv[0] + " username(s)") sys.exit (1) HOME=expanduser("~") # determine paths SYSTEM=platform.system() if SYSTEM == 'Darwin': SERVERJSON=HOME+'/Library/Application ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 11748, 33918, 11, 850, 14681, 11, 25064, 11, 3859, 198, 6738, 28686, 13, 6978, 1330, 4292, 7220, 198, 198, 361, 18896, 357, 17597, 13, 853, 85, 8, 1279, 362, 1058, 198, 220, 220, 220, 3601,...
2.645522
536
# coding: utf-8 """ OriginStamp Client OpenAPI spec version: 3.0 OriginStamp Documentation: https://docs.originstamp.com Contact: mail@originstamp.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six def to_str(self): ...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 220, 220, 220, 19349, 1273, 696, 20985, 628, 220, 220, 220, 4946, 17614, 1020, 2196, 25, 513, 13, 15, 198, 220, 220, 220, 19349, 1273, 696, 43925, 25, 3740, 1378, 31628, 13, 11...
2.551205
332
power = {'BUSES': {'Area': 1.33155, 'Bus/Area': 1.33155, 'Bus/Gate Leakage': 0.00662954, 'Bus/Peak Dynamic': 0.0, 'Bus/Runtime Dynamic': 0.0, 'Bus/Subthreshold Leakage': 0.0691322, 'Bus/Subthreshold Leakage with power gating': 0.0259246, 'Gate...
[ 6477, 796, 1391, 6, 45346, 1546, 10354, 1391, 6, 30547, 10354, 352, 13, 2091, 18742, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 16286, 14, 30547, 10354, 352, 13, 2091, 18742, 11, 198, 220, 220, 220, 220, 220, ...
2.342059
29,261
# -*- coding: utf-8 -*- # Generated by Django 1.10.3 on 2016-12-13 22:10 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion import folder_tree.models import mptt.fields
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 940, 13, 18, 319, 1584, 12, 1065, 12, 1485, 2534, 25, 940, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 1...
2.934066
91
from __future__ import absolute_import # flake8: noqa # import apis from groupdocs_viewer_cloud.apis.file_api import FileApi from groupdocs_viewer_cloud.apis.folder_api import FolderApi from groupdocs_viewer_cloud.apis.info_api import InfoApi from groupdocs_viewer_cloud.apis.license_api import LicenseApi from groupdo...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 2, 781, 539, 23, 25, 645, 20402, 198, 198, 2, 1330, 2471, 271, 198, 6738, 1448, 31628, 62, 1177, 263, 62, 17721, 13, 499, 271, 13, 7753, 62, 15042, 1330, 9220, 32, 14415, 1...
2.972222
144
from models.wrap_mobilenet import * from models.wrap_resnet import * from models.wrap_vgg import * from models.wrap_alexnet import *
[ 6738, 4981, 13, 37150, 62, 76, 25898, 268, 316, 1330, 1635, 198, 6738, 4981, 13, 37150, 62, 411, 3262, 1330, 1635, 198, 6738, 4981, 13, 37150, 62, 85, 1130, 1330, 1635, 198, 6738, 4981, 13, 37150, 62, 1000, 87, 3262, 1330, 1635 ]
3.142857
42
import torch import torch.nn as nn from NeuralBlocks.blocks.convnormrelu import ConvNormRelu if __name__ == "__main__": s = SegNet(3, 10, norm = 'BN') inp = torch.randn(32,3,128, 128) #M x C x H x W s.train() result = s(inp)
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 6738, 47986, 45356, 13, 27372, 13, 42946, 27237, 260, 2290, 1330, 34872, 35393, 6892, 84, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, ...
2.333333
105
#!/usr/bin/python # This script derived from a piece of the rubber project # http://launchpad.net/rubber # (c) Emmanuel Beffara, 2002--2006 # # Modified by Nathan Grigg, January 2012 import re import string import sys import getopt #---- Log parser ----{{{1 re_loghead = re.compile("This is [0-9a-zA-Z-]*") re_reru...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 2, 770, 4226, 10944, 422, 257, 3704, 286, 262, 14239, 1628, 198, 2, 2638, 1378, 35681, 15636, 13, 3262, 14, 25089, 527, 198, 2, 357, 66, 8, 32390, 1355, 487, 3301, 11, 6244, 438, 133...
2.287852
1,136
# Copyright 2018 Fujitsu. # # 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...
[ 2, 220, 220, 220, 15069, 2864, 32671, 19831, 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, 2393, 2845, 287, ...
3.461818
275
#This program converts KPH to MPH. #constant CONVERT_FACTOR = 0.6214 #head output print("KPH \t MPH") print("_" * 20) #loop for kph_speed in range (60, 131, 10): #calculation mph_speed = kph_speed * CONVERT_FACTOR #output print(kph_speed, '\t', format(mph_speed, '.1f')) input("\nPress any key to ...
[ 198, 2, 1212, 1430, 26161, 509, 11909, 284, 43822, 13, 198, 198, 2, 9979, 415, 198, 10943, 15858, 62, 37, 10659, 1581, 796, 657, 13, 5237, 1415, 198, 198, 2, 2256, 5072, 198, 4798, 7203, 42, 11909, 3467, 83, 43822, 4943, 198, 4798, ...
2.042636
258
from __future__ import absolute_import from django.core.urlresolvers import reverse from mock import Mock, patch from sentry.rules.registry import RuleRegistry from sentry.testutils import APITestCase
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 6738, 42625, 14208, 13, 7295, 13, 6371, 411, 349, 690, 1330, 9575, 198, 6738, 15290, 1330, 44123, 11, 8529, 198, 198, 6738, 1908, 563, 13, 38785, 13, 2301, 4592, 1330, 14330, 8...
3.642857
56
# train-script.py # Grab data from movie_data.csv and train a ML model. # Kelly Fesler (c) Nov 2020 # Modified from Soumya Gupta (c) Jan 2020 # STEP 1: import ------------------------------------------- # Import libraries import urllib.request import os import pandas as pd import numpy as np import nltk import sklear...
[ 2, 4512, 12, 12048, 13, 9078, 198, 2, 25339, 1366, 422, 3807, 62, 7890, 13, 40664, 290, 4512, 257, 10373, 2746, 13, 198, 2, 9077, 376, 274, 1754, 357, 66, 8, 5267, 12131, 198, 2, 40499, 422, 22862, 1820, 64, 42095, 357, 66, 8, 2...
3.257883
888
from abc import ABCMeta, abstractmethod from collections import defaultdict from copy import deepcopy from typing import Union, Type, Any, Tuple import numpy as np import torch import torch.nn as nn from scipy.signal import find_peaks_cwt from .net import MyNN, MyNNRegressor from .utils import autoregression_matrix, ...
[ 6738, 450, 66, 1330, 9738, 48526, 11, 12531, 24396, 198, 6738, 17268, 1330, 4277, 11600, 198, 6738, 4866, 1330, 2769, 30073, 198, 6738, 19720, 1330, 4479, 11, 5994, 11, 4377, 11, 309, 29291, 198, 198, 11748, 299, 32152, 355, 45941, 198,...
3.271429
140
import types from testutils import assert_raises ns = types.SimpleNamespace(a=2, b='Rust') assert ns.a == 2 assert ns.b == "Rust" with assert_raises(AttributeError): _ = ns.c
[ 11748, 3858, 198, 198, 6738, 1332, 26791, 1330, 6818, 62, 430, 2696, 198, 198, 5907, 796, 3858, 13, 26437, 36690, 10223, 7, 64, 28, 17, 11, 275, 11639, 49444, 11537, 198, 198, 30493, 36545, 13, 64, 6624, 362, 198, 30493, 36545, 13, ...
2.716418
67
# entrada value = int(input()) # variaveis cashier = True valueI = value n1 = 0 n2 = 0 n5 = 0 n10 = 0 n20 = 0 n50 = 0 n100 = 0 # lao quando cashier == False sai while cashier == True: # condicionais if value >= 100: valueA = value // 100 n100 = valueA valueB = v...
[ 2, 24481, 4763, 201, 198, 8367, 796, 493, 7, 15414, 28955, 201, 198, 201, 198, 2, 1401, 544, 303, 271, 201, 198, 30350, 959, 796, 6407, 201, 198, 8367, 40, 796, 1988, 201, 198, 77, 16, 796, 657, 201, 198, 77, 17, 796, 657, 201, ...
1.866292
890
from abc import ABCMeta # def _make_delegator_method_to_property(name): # def delegator(self, *args, **kwargs): # return getattr(self.__delegate__, name) # return delegator # todo: finalize naming: Delegating, Delegate, actual_delegate, delegatee, delegator o_O ? # We have the following players i...
[ 6738, 450, 66, 1330, 9738, 48526, 628, 198, 198, 2, 825, 4808, 15883, 62, 2934, 1455, 1352, 62, 24396, 62, 1462, 62, 26745, 7, 3672, 2599, 198, 2, 220, 220, 220, 220, 825, 8570, 1352, 7, 944, 11, 1635, 22046, 11, 12429, 46265, 220...
3.102041
147
# -*- coding: utf-8 -*- from pymystem3 import Mystem # text = "some good newses" text = " " m = Mystem() lemmas = m.lemmatize(text) print(''.join(lemmas))
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 12972, 1820, 927, 18, 1330, 2011, 927, 198, 2, 2420, 796, 366, 11246, 922, 1705, 274, 1, 198, 5239, 796, 366, 220, 220, 220, 366, 198, 76, 796, 2011, 927,...
2.208333
72
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from config.template_middleware import TemplateResponse from desenho.desenho_model import Desenho, DesenhoForm from gaecookie.decorator import no_csrf #from pedido.pedido_model import Pedido, PedidoForm from routes import desenhos from tek...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 28000, 1098, 62, 17201, 874, 198, 6738, 4566, 13, 28243, 62, 27171, 1574, 1330, 37350, 31077, 198, 6738, 748, 268, 88...
3.19685
127
# import necessary libraries import csv from PIL import Image import argparse # create argument parser with PATH argument ap = argparse.ArgumentParser() ap.add_argument('-p', '--path', required=True, help='''PATH to CUB_200_2011 folder i.e. folder with CUB 200 csv files (make sure to include full path name for so ...
[ 2, 1330, 3306, 12782, 198, 11748, 269, 21370, 198, 6738, 350, 4146, 1330, 7412, 198, 11748, 1822, 29572, 198, 198, 2, 2251, 4578, 30751, 351, 46490, 4578, 220, 198, 499, 796, 1822, 29572, 13, 28100, 1713, 46677, 3419, 198, 499, 13, 28...
3.230263
152
import torch from torch import nn def l1_loss(x): return torch.mean(torch.sum(torch.abs(x), dim=1))
[ 11748, 28034, 198, 198, 6738, 28034, 1330, 299, 77, 628, 628, 198, 198, 4299, 300, 16, 62, 22462, 7, 87, 2599, 198, 220, 220, 220, 1441, 28034, 13, 32604, 7, 13165, 354, 13, 16345, 7, 13165, 354, 13, 8937, 7, 87, 828, 5391, 28, ...
2.333333
48
__all__ = [ 'IUserService', 'UserService', ] from services.users.iuser_service import IUserService from services.users.user_service import UserService
[ 834, 439, 834, 796, 685, 198, 220, 220, 220, 705, 40, 12982, 16177, 3256, 198, 220, 220, 220, 705, 12982, 16177, 3256, 198, 60, 198, 198, 6738, 2594, 13, 18417, 13, 3754, 263, 62, 15271, 1330, 314, 12982, 16177, 198, 6738, 2594, 13,...
3.076923
52
# Copyright 2019 The Oppia 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 ...
[ 2, 15069, 13130, 383, 9385, 544, 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, 351, ...
3.601744
344
"""Utility module for setting up different envs""" import numpy as np import structlog from shapely.geometry import Point from ray.rllib.agents.ppo import DEFAULT_CONFIG from ray.rllib.env.multi_agent_env import MultiAgentEnv from deepcomp.util.constants import SUPPORTED_ENVS, SUPPORTED_AGENTS, SUPPORTED_SHARING, SUPP...
[ 37811, 18274, 879, 8265, 329, 4634, 510, 1180, 551, 14259, 37811, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2878, 6404, 198, 6738, 5485, 306, 13, 469, 15748, 1330, 6252, 198, 6738, 26842, 13, 81, 297, 571, 13, 49638, 13, 16634, ...
2.440785
5,556
""" Faa um programa que receba o salrio de um funcionrio, calcule e mostre o novo salrio, sabende-se que este sofreu um aumento de 25%""" sal = float(input('Salrio:')) nsal = sal*1.25 print ('novo salrio = ', nsal)
[ 37811, 376, 7252, 23781, 1430, 64, 8358, 1407, 7012, 267, 3664, 27250, 390, 23781, 25439, 295, 27250, 11, 2386, 23172, 304, 749, 260, 267, 645, 13038, 3664, 27250, 11, 17463, 38396, 12, 325, 8358, 43577, 523, 19503, 84, 23781, 257, 1713...
2.721519
79
import numpy as np from numpy import random, linspace, cos, pi import math import random import matplotlib.pyplot as plt from scipy.fft import fft, fftfreq from scipy.fft import rfft, rfftfreq import copy from mpl_toolkits.mplot3d import axes3d from mpl_toolkits import mplot3d from plotly import __version__ import pand...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 299, 32152, 1330, 4738, 11, 300, 1040, 10223, 11, 8615, 11, 31028, 198, 11748, 10688, 198, 11748, 4738, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 629, 541, 88, 1...
2.95935
246
import unittest import sys import os import sys import json TEST_DIR = os.path.dirname(os.path.abspath(__file__)) PROJECT_DIR = os.path.abspath(os.path.join(TEST_DIR, os.pardir)) sys.path.insert(0, PROJECT_DIR) from module.cmdparse import cmdargs if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 33918, 198, 198, 51, 6465, 62, 34720, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 397, 2777, 776, 7, 834, 7753, 834, 4008, 1...
2.504202
119
""" ebb_fit_prior : fits a Beta prior by estimating the parameters from the data using method of moments and MLE estimates augment : given data and prior, computes the shrinked estimate, credible intervals and augments those in the given dataframe check_fit : plots the true average and the shrinked average """ impo...
[ 37811, 198, 1765, 65, 62, 11147, 62, 3448, 273, 1058, 11414, 257, 17993, 3161, 416, 39539, 262, 10007, 422, 262, 1366, 1262, 220, 198, 24396, 286, 7188, 290, 337, 2538, 7746, 198, 559, 5154, 1058, 1813, 1366, 290, 3161, 11, 552, 1769,...
2.231092
476
import sqlite3 from flask import Flask, render_template app = Flask(__name__) # database details - to remove some duplication db_name = 'shopping_data.db'
[ 11748, 44161, 578, 18, 198, 6738, 42903, 1330, 46947, 11, 8543, 62, 28243, 198, 198, 1324, 796, 46947, 7, 834, 3672, 834, 8, 198, 198, 2, 6831, 3307, 532, 284, 4781, 617, 50124, 198, 9945, 62, 3672, 796, 705, 1477, 33307, 62, 7890, ...
3.391304
46
# Decode Ways: https://leetcode.com/problems/decode-ways/ # A message containing letters from A-Z can be encoded into numbers using the following mapping: # 'A' -> "1" # 'B' -> "2" # ... # 'Z' -> "26" # To decode an encoded message, all the digits must be grouped then mapped back into letters using the reverse of th...
[ 2, 4280, 1098, 26658, 25, 3740, 1378, 293, 316, 8189, 13, 785, 14, 1676, 22143, 14, 12501, 1098, 12, 1322, 14, 198, 198, 2, 317, 3275, 7268, 7475, 422, 317, 12, 57, 460, 307, 30240, 656, 3146, 1262, 262, 1708, 16855, 25, 198, 198,...
3.607843
408
#!/usr/bin/python -W all """ word2vec.py: process tweets with word2vec vectors usage: word2vec.py [-x] [-m model-file [-l word-vector-length]] -w word-vector-file -T train-file -t test-file notes: - optional model file is a text file from which the word vector file is built - option x writes tokeni...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 532, 54, 477, 198, 37811, 198, 220, 220, 220, 1573, 17, 35138, 13, 9078, 25, 1429, 12665, 351, 1573, 17, 35138, 30104, 198, 220, 220, 220, 8748, 25, 1573, 17, 35138, 13, 9078, 25915, 87, 60, 2...
3.007199
1,667
from .pipeline import SampleDataContainer, run_pipeline, make_pipeline from .preprocess import preprocess_noob from .postprocess import consolidate_values_for_sheet __all__ = [ 'SampleDataContainer', 'preprocess_noob', 'run_pipeline', 'make_pipeline,', 'consolidate_values_for_sheet' ]
[ 6738, 764, 79, 541, 4470, 1330, 27565, 6601, 29869, 11, 1057, 62, 79, 541, 4470, 11, 787, 62, 79, 541, 4470, 198, 6738, 764, 3866, 14681, 1330, 662, 14681, 62, 3919, 672, 198, 6738, 764, 7353, 14681, 1330, 38562, 62, 27160, 62, 1640...
2.716814
113
from .rsmaker import RunstatMaker
[ 6738, 764, 3808, 10297, 1330, 5660, 14269, 48890, 628, 198 ]
3.6
10
row1 = ["","",""] row2 = ["","",""] row3 = ["","",""] map = [row1, row2, row3] print(f"{row1}\n{row2}\n{row3}") position = input("Where do you want to put the treasure? ") col = int(position[0]) ro = int(position[1]) map[ro-1][col-1] = "X" print(f"{row1}\n{row2}\n{row3}")
[ 808, 16, 796, 14631, 2430, 2430, 8973, 198, 808, 17, 796, 14631, 2430, 2430, 8973, 198, 808, 18, 796, 14631, 2430, 2430, 8973, 198, 8899, 796, 685, 808, 16, 11, 5752, 17, 11, 5752, 18, 60, 198, 4798, 7, 69, 1, 90, 808, 16, 32239...
2.166667
126
import xml.etree.ElementTree as ET from shared import * # neutral for skin in skins: name = f'{font}/emoji_u1f48f.svg' if skin == 'none' else f'{font}/emoji_u1f48f_{skin}.svg' left = ET.parse(name).getroot() right = ET.parse(name).getroot() remove(left, 2) remove(left, 1) remove(right, 0) w...
[ 11748, 35555, 13, 316, 631, 13, 20180, 27660, 355, 12152, 198, 6738, 4888, 1330, 1635, 198, 198, 2, 8500, 198, 1640, 4168, 287, 25873, 25, 198, 220, 220, 220, 1438, 796, 277, 6, 90, 10331, 92, 14, 368, 31370, 62, 84, 16, 69, 2780,...
2.048698
883
# 2019 KidsCanCode LLC / All rights reserved. # Game options/settings TITLE = "Jumpy!" WIDTH = 480 HEIGHT = 600 FPS = 60 # Environment options GRAVITY = 9.8 # Player properties PLAYER_ACC = 0.5 PLAYER_FRICTION = -0.01 PLAYER_JUMPPOWER = 10 # Define colors # I changed the screen color to aqua, the platform color to...
[ 2, 220, 13130, 17476, 6090, 10669, 11419, 1220, 1439, 2489, 10395, 13, 198, 198, 2, 3776, 3689, 14, 33692, 198, 49560, 2538, 796, 366, 41, 32152, 2474, 198, 54, 2389, 4221, 796, 23487, 198, 13909, 9947, 796, 10053, 198, 37, 3705, 796,...
2.57672
189
N = int(input()) R = input().split() print(i2r(sum(r2i(r) for r in R)))
[ 628, 198, 45, 796, 493, 7, 15414, 28955, 198, 49, 796, 5128, 22446, 35312, 3419, 198, 198, 4798, 7, 72, 17, 81, 7, 16345, 7, 81, 17, 72, 7, 81, 8, 329, 374, 287, 371, 22305, 198 ]
2.054054
37
from asyncio import Queue, QueueEmpty from abc import ABC, abstractmethod from typing import List
[ 6738, 30351, 952, 1330, 4670, 518, 11, 4670, 518, 40613, 198, 6738, 450, 66, 1330, 9738, 11, 12531, 24396, 198, 6738, 19720, 1330, 7343, 628 ]
3.96
25
filter(processInput())
[ 628, 198, 24455, 7, 14681, 20560, 28955, 198 ]
3.25
8
""" Distributed under the MIT License. See LICENSE.txt for more info. """ from django import template register = template.Library()
[ 37811, 198, 20344, 6169, 739, 262, 17168, 13789, 13, 4091, 38559, 24290, 13, 14116, 329, 517, 7508, 13, 198, 37811, 198, 198, 6738, 42625, 14208, 1330, 11055, 198, 198, 30238, 796, 11055, 13, 23377, 3419, 628, 198 ]
3.675676
37
contmaior = 0 contahomi = 0 contamuie = 0 while True: print('CADASTRE UMA PESSOA') print('=-' * 19) idade = int(input('INFORME SUA IDADE: ')) if idade > 18: contmaior += 1 sexo = str(input('INFORME SEU SEXO <<M/F>>: ')).upper().strip()[0] if sexo not in 'MF': while True: ...
[ 3642, 2611, 1504, 796, 657, 198, 3642, 993, 12753, 796, 657, 198, 3642, 321, 84, 494, 796, 657, 198, 4514, 6407, 25, 198, 220, 220, 220, 3601, 10786, 34, 2885, 11262, 2200, 471, 5673, 350, 7597, 23621, 11537, 198, 220, 220, 220, 360...
2.020522
536
from django.conf.urls import patterns, url from .views import template_test urlpatterns = patterns( '', url(r'^', template_test, name='template_test2'), )
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 7572, 11, 19016, 198, 198, 6738, 764, 33571, 1330, 11055, 62, 9288, 628, 198, 6371, 33279, 82, 796, 7572, 7, 198, 220, 220, 220, 705, 3256, 198, 220, 220, 220, 19016, 7, 81, 6, 61...
2.844828
58