content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
''' Faa um programa que leia um nmero inteiro e mostre na tela o seu sucessor e seu antecessor. ''' n = int(input('Entre com um valor: ')) antecessor = n - 1 sucessor = n + 1 msg = 'o antecessor do nmero {} {} e seu sucessor {}'.format(n, antecessor, sucessor) print(msg)
[ 7061, 6, 198, 37, 7252, 23781, 1430, 64, 8358, 443, 544, 23781, 299, 647, 78, 493, 68, 7058, 304, 749, 260, 12385, 256, 10304, 267, 384, 84, 424, 919, 273, 304, 384, 84, 29692, 919, 273, 13, 198, 198, 7061, 6, 198, 198, 77, 796,...
2.367521
117
import pytest from mitzasql.sql_parser.parser import parse from mitzasql.utils import dfs
[ 11748, 12972, 9288, 198, 6738, 285, 4224, 292, 13976, 13, 25410, 62, 48610, 13, 48610, 1330, 21136, 198, 6738, 285, 4224, 292, 13976, 13, 26791, 1330, 288, 9501, 198 ]
3.103448
29
version = '2.0.1048'
[ 9641, 796, 705, 17, 13, 15, 13, 940, 2780, 6, 198 ]
1.909091
11
# Importing standard libraires import sys ''' Main Function for the program. Logic is as follows Make two frequency tables for two strings Take overlap of both and add up the non overlapping regions (absolute values) ''' if __name__ == "__main__": # Parsing in the input s1 = list(sys.stdin.readline...
[ 2, 17267, 278, 3210, 9195, 430, 2387, 198, 11748, 25064, 198, 198, 7061, 6, 198, 220, 220, 220, 8774, 15553, 329, 262, 1430, 13, 30146, 318, 355, 5679, 198, 220, 220, 220, 6889, 734, 8373, 8893, 329, 734, 13042, 198, 220, 220, 220, ...
2.460317
315
from .utilities import Response SCHEDULE_RESPONSE = b""" {"error":{"code":200,"message":"Success"},"data":{"classes":[{ "id":113209,"sector":"F","class_type_id":48,"start_date":"2020-06-07", "end_date":"2020-06-07","start_time":"09:00:00","end_time":"09:45:00", "duration":"2700000","teacher_id":782,"location_id":10,"l...
[ 6738, 764, 315, 2410, 1330, 18261, 198, 198, 50, 3398, 1961, 24212, 62, 19535, 47, 1340, 5188, 796, 275, 37811, 198, 4895, 18224, 8351, 8189, 1298, 2167, 553, 20500, 2404, 33244, 13018, 7890, 8351, 37724, 20598, 90, 198, 1, 312, 1298, ...
2.689103
312
''' Ta-libMACD ''' import pandas as pd import numpy as np import talib as ta import tushare as ts from matplotlib import rc import matplotlib.pyplot as plt import seaborn as sns rc('mathtext', default='regular') sns.set_style('white') # %matplotlib plt.rcParams["figure.figsize"] = (20, 10) dw = ts.get_k_data("600600"...
[ 7061, 6, 198, 38586, 12, 8019, 44721, 35, 198, 7061, 6, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 3305, 571, 355, 20486, 198, 11748, 256, 1530, 533, 355, 40379, 198, 6738, 2603, 29487, 8019,...
2.504854
206
import logging from regression_model.config import config from regression_model.config import logging_config VERSION_PATH = config.PACKAGE_ROOT / 'VERSION' with open(VERSION_PATH, 'r') as version_file: __version__ = version_file.read().strip()
[ 11748, 18931, 198, 198, 6738, 20683, 62, 19849, 13, 11250, 1330, 4566, 198, 6738, 20683, 62, 19849, 13, 11250, 1330, 18931, 62, 11250, 628, 198, 43717, 62, 34219, 796, 4566, 13, 47, 8120, 11879, 62, 13252, 2394, 1220, 705, 43717, 6, 1...
3.36
75
from datetime import date year_current_date = date.today().year get_info("Cleberton", 28, 1.69, 75) # Funo recebe algumas informaoes por parametro, e retorna ano de nascimento, imc # com algumas frases customizadas
[ 6738, 4818, 8079, 1330, 3128, 198, 198, 1941, 62, 14421, 62, 4475, 796, 3128, 13, 40838, 22446, 1941, 628, 198, 198, 1136, 62, 10951, 7203, 34349, 527, 1122, 1600, 2579, 11, 352, 13, 3388, 11, 5441, 8, 198, 198, 2, 11138, 78, 1407, ...
2.650602
83
import json from sys import stdout # START data = '''{ "name": "bugs", "age": 76 }''' obj = json.loads(data) json.dump(obj, stdout) # END print(obj)
[ 11748, 33918, 198, 6738, 25064, 1330, 14367, 448, 198, 198, 2, 33303, 198, 7890, 796, 705, 7061, 90, 198, 220, 220, 220, 366, 3672, 1298, 366, 32965, 1600, 198, 220, 220, 220, 366, 496, 1298, 8684, 198, 92, 7061, 6, 198, 26801, 796,...
2.285714
70
"""Tests for SpeedTest integration.""" from unittest.mock import patch import speedtest from openpeerpower import config_entries from openpeerpower.components import speedtestdotnet from openpeerpower.setup import async_setup_component from tests.common import MockConfigEntry
[ 37811, 51, 3558, 329, 8729, 14402, 11812, 526, 15931, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 8529, 198, 198, 11748, 2866, 9288, 198, 198, 6738, 1280, 33350, 6477, 1330, 4566, 62, 298, 1678, 198, 6738, 1280, 33350, 6477, 13, 5589...
3.837838
74
# Kertaus, kerta 3 # Muuttujat ja sytteen lukeminen kyttjlt nimi = input("Anna nimesi: ") kengnnumero = input("Mik on kengnnumerosi: ") print("Moi vaan, " + nimi + "! Kengnnumerosi on " + kengnnumero + ".") # F-merkkijono print(f"Moi vaan, {nimi}! Kengnnumerosi on {kengnnumero}.") # Numerot # Iklaskuri syntymvuosi ...
[ 2, 509, 861, 8717, 11, 479, 861, 64, 513, 198, 198, 2, 8252, 15318, 23577, 265, 45091, 827, 83, 7821, 300, 4649, 1084, 268, 479, 88, 926, 73, 2528, 198, 77, 25236, 796, 5128, 7203, 31160, 299, 999, 72, 25, 366, 8, 198, 74, 1516,...
2.041391
604
import requests from lxml import etree if __name__ == '__main__': headers = {"User-Agent":'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36'} url = 'https://www.apache.org/dist/ant/' sourceHTML = requests.get(url, headers = headers) selec...
[ 11748, 7007, 198, 6738, 300, 19875, 1330, 2123, 631, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 24697, 796, 19779, 12982, 12, 36772, 1298, 6, 44, 8590, 5049, 14, 20, 13, 15, 357, 11209, 2...
2.264706
272
from h1d_wrapper.h1d_wrapper import Element, Mesh, Linearizer
[ 6738, 289, 16, 67, 62, 48553, 13, 71, 16, 67, 62, 48553, 1330, 11703, 11, 47529, 11, 44800, 7509, 198 ]
3.1
20
import pytest from jelm import Jelm, Node, Edge from jelm.tests.network_case_set_class import NetwokCaseTemplate
[ 11748, 12972, 9288, 198, 198, 6738, 474, 417, 76, 1330, 449, 417, 76, 11, 19081, 11, 13113, 198, 198, 6738, 474, 417, 76, 13, 41989, 13, 27349, 62, 7442, 62, 2617, 62, 4871, 1330, 3433, 86, 482, 20448, 30800, 628, 628, 628, 628, 6...
2.777778
45
''' Evaluation code for trajectory prediction. We record the objects in the last frame of every sequence in test dataset as considered objects, which is stored in considered_objects.txt. We compare the error between your predicted locations in the next 3s(six positions) and the ground truth for these considered object...
[ 7061, 6, 198, 36, 2100, 2288, 2438, 329, 22942, 17724, 13, 198, 198, 1135, 1700, 262, 5563, 287, 262, 938, 5739, 286, 790, 8379, 287, 1332, 27039, 355, 3177, 5563, 11, 543, 318, 8574, 287, 3177, 62, 48205, 13, 14116, 13, 198, 1135, ...
3.96
125
# !/usr/bin/python # -*- coding: utf-8 -*- import click import os try: # Python 2.x version from urllib2 import HTTPError, URLError except: # Python 3.x version from urllib.error import HTTPError, URLError from shellfoundry.exceptions import FatalError from shellfoundry.utilities.config_reader import ...
[ 2, 5145, 14, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 3904, 198, 11748, 28686, 198, 28311, 25, 198, 220, 220, 220, 1303, 11361, 362, 13, 87, 2196, 198, 220, 220, ...
3.342105
190
#!/usr/bin/python import rospy from rospy import ROSException from std_msgs.msg import Header, Bool from std_srvs.srv import SetBool from geometry_msgs.msg import PoseWithCovarianceStamped, Point, Quaternion from sensor_msgs.msg import NavSatFix, NavSatStatus from sam_msgs.msg import GetGPSFixAction, GetGPSFixFeedback...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 11748, 686, 2777, 88, 198, 6738, 686, 2777, 88, 1330, 48263, 16922, 198, 6738, 14367, 62, 907, 14542, 13, 19662, 1330, 48900, 11, 347, 970, 198, 6738, 14367, 62, 27891, 14259, 13, 27891,...
2.891129
248
# -*- coding: utf-8 -*- from puremvc.patterns.proxy import Proxy from .. import ApplicationFacade
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 5899, 76, 28435, 13, 33279, 82, 13, 36436, 1330, 38027, 198, 198, 6738, 11485, 1330, 15678, 47522, 671, 628 ]
2.885714
35
import pygame import os
[ 11748, 12972, 6057, 198, 11748, 28686, 628 ]
3.571429
7
# This Python file uses the following encoding: utf-8 from app.package.views.Calibrate_view import CalibrateView from app.package.controllers.Calibrate_controller import CalibrateController from app.package.models.Calibrate_model import CalibrateModel import sys import matplotlib from PySide2.QtWidgets import QApplica...
[ 2, 770, 11361, 2393, 3544, 262, 1708, 21004, 25, 3384, 69, 12, 23, 198, 6738, 598, 13, 26495, 13, 33571, 13, 9771, 2889, 378, 62, 1177, 1330, 2199, 2889, 378, 7680, 198, 6738, 598, 13, 26495, 13, 3642, 36667, 13, 9771, 2889, 378, ...
3.063985
547
import datetime import decimal from playhouse.sqlite_ext import * # Peewee assumes that the `pysqlite2` module was compiled against the # BerkeleyDB SQLite libraries. from pysqlite2 import dbapi2 as berkeleydb berkeleydb.register_adapter(decimal.Decimal, str) berkeleydb.register_adapter(datetime.date, str) berkeleyd...
[ 11748, 4818, 8079, 198, 11748, 32465, 198, 198, 6738, 711, 4803, 13, 25410, 578, 62, 2302, 1330, 1635, 198, 198, 2, 2631, 413, 1453, 18533, 326, 262, 4600, 79, 893, 13976, 578, 17, 63, 8265, 373, 14102, 1028, 262, 198, 2, 14727, 110...
3.103448
116
from numpy.random import standard_normal from numbers import Number def simulation_analysis(project, sim_dict, iterations=250, valuator=None): """ Purpose: Analyses the effects of uncertainty of a system by performing a Monte Carlo simulation. Args: project: An instance of Project to pe...
[ 6738, 299, 32152, 13, 25120, 1330, 3210, 62, 11265, 198, 6738, 3146, 1330, 7913, 628, 198, 4299, 18640, 62, 20930, 7, 16302, 11, 985, 62, 11600, 11, 34820, 28, 9031, 11, 1188, 84, 1352, 28, 14202, 2599, 198, 220, 220, 220, 37227, 19...
2.441781
584
import logging from telegram.ext import CommandHandler logger = logging.getLogger(__name__)
[ 11748, 18931, 198, 198, 6738, 573, 30536, 13, 2302, 1330, 9455, 25060, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 628, 628, 628 ]
3.3
30
# -*- coding: utf-8 -*- """ @file @brief Fonctions retournant des jeux de donnes. """ import os def get_data_folder(): """ Retourne le rpertoire de donnes inclus dans ce module. """ this = os.path.dirname(__file__) data = os.path.join(this, "data") return os.path.abspath(data)
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 31, 7753, 198, 31, 65, 3796, 376, 261, 2733, 1005, 1798, 415, 748, 11223, 2821, 390, 836, 2516, 13, 198, 37811, 198, 11748, 28686, 628, 198, 4299, 651, 62,...
2.320611
131
from django.db import models
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 628 ]
3.75
8
import os from os.path import join import traceback from bs4 import BeautifulSoup from nose.plugins import Plugin
[ 11748, 28686, 198, 6738, 28686, 13, 6978, 1330, 4654, 198, 11748, 12854, 1891, 198, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 6738, 9686, 13, 37390, 1330, 42636, 628 ]
3.741935
31
""" aiohttp-ultrajson ----------------- Integrates UltraJSON with your aiohttp application. """ from setuptools import setup setup( name='aiohttp-ultrajson', version='0.1.0', url='https://github.com/sunghyunzz/aiohttp-ultrajson', license='MIT', author='sunghyunzz', author_email='me@sunghyunzz....
[ 37811, 198, 64, 952, 4023, 12, 586, 430, 17752, 198, 1783, 12, 198, 198, 34500, 9700, 14563, 40386, 351, 534, 257, 952, 4023, 3586, 13, 198, 37811, 198, 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 40406, 7, 198, 220, 220, 220, 14...
2.442543
409
n, m = map(int, input().split()) scores = list(map(int, input().split())) answers = list(map(int, input().split())) for i in range(n): actuals = list(map(int, input().split())) result = 0 for i, score in enumerate(scores): if actuals[i] == answers[i]: result += score print(result...
[ 77, 11, 285, 796, 3975, 7, 600, 11, 5128, 22446, 35312, 28955, 198, 198, 1416, 2850, 796, 1351, 7, 8899, 7, 600, 11, 5128, 22446, 35312, 3419, 4008, 198, 198, 504, 86, 364, 796, 1351, 7, 8899, 7, 600, 11, 5128, 22446, 35312, 3419,...
2.350365
137
""" Tools for network communication. """ import abc import io import json import socket import struct import sys import time import zlib import dh.ejson import dh.utils # NumPy is only needed for some parts and is optional try: import numpy as np except ImportError as e: _NUMPY_ERROR = e else: _NUMPY_ERR...
[ 37811, 198, 33637, 329, 3127, 6946, 13, 198, 37811, 198, 198, 11748, 450, 66, 198, 11748, 33245, 198, 11748, 33918, 198, 11748, 17802, 198, 11748, 2878, 198, 11748, 25064, 198, 11748, 640, 198, 11748, 1976, 8019, 198, 198, 11748, 34590, ...
3.102564
156
from setuptools import setup setup( name = 'apache-replay', version = '0.0.3', url = 'https://github.com/danizen/apache-replay.git', author = 'Daniel Davis', author_email = 'dan@danizen.net', description = 'Facilitates replaying of Apache files in Common Log and Combined Log format', long...
[ 6738, 900, 37623, 10141, 1330, 9058, 628, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 796, 705, 43073, 12, 260, 1759, 3256, 198, 220, 220, 220, 2196, 796, 705, 15, 13, 15, 13, 18, 3256, 198, 220, 220, 220, 19016, 796, 705, 5450,...
2.659722
432
from distutils.core import setup setup( name='do_more', packages=['do_more'], version='0.1.0', description='A library enhancing pydoit features.', author='Duy Tin Truong', author_email='', url='https://github.com/duytintruong/do_more', download_url='https://github.com/duytintruong/do_mor...
[ 6738, 1233, 26791, 13, 7295, 1330, 9058, 198, 40406, 7, 198, 220, 220, 220, 1438, 11639, 4598, 62, 3549, 3256, 198, 220, 220, 220, 10392, 28, 17816, 4598, 62, 3549, 6, 4357, 198, 220, 220, 220, 2196, 11639, 15, 13, 16, 13, 15, 325...
2.32
200
import pandas as pd import numpy as np import elist.elist as elel import edict.edict as eded import tlist.tlist as tltl import copy __all__ = [ '_append_col', '_append_cols', '_append_row', '_append_rows', '_cn2clocs', '_col', '_cols', '_columns_map', '_crop', '_get_clocs', '_get_rlocs', '_getitem', '_ind...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 1288, 396, 13, 46331, 355, 9766, 75, 198, 11748, 1225, 713, 13, 276, 713, 355, 1225, 276, 198, 11748, 256, 4868, 13, 83, 4868, 355, 256, 2528, 75, 198,...
2.245315
587
from typing import List, Tuple import sentencepiece as spm import tensorflow as tf import tensorflow.keras as keras from npgru.predictor.category_predictor import CategoryPredictor from npgru.preprocessor.model_file import get_model_dir
[ 6738, 19720, 1330, 7343, 11, 309, 29291, 198, 198, 11748, 6827, 12239, 355, 599, 76, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 11192, 273, 11125, 13, 6122, 292, 355, 41927, 292, 198, 198, 6738, 299, 6024, 622, 13, 79, 174...
3.287671
73
# Generated by Django 3.1.6 on 2021-04-25 19:46 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 21, 319, 33448, 12, 3023, 12, 1495, 678, 25, 3510, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.766667
30
import math line = raw_input().strip().split() N = int(line[0]) cap = float(line[1]) items = [] for _ in xrange(N): items.append(map(float, raw_input().split())) items = sorted(items, cmp=custcmp) answer = 0.0 index = 0 while cap > 0 and index < N: cur = items[index] to_add = min(cur[1], cap) answer += to_add...
[ 11748, 10688, 198, 198, 1370, 796, 8246, 62, 15414, 22446, 36311, 22446, 35312, 3419, 198, 198, 45, 796, 493, 7, 1370, 58, 15, 12962, 198, 11128, 796, 12178, 7, 1370, 58, 16, 12962, 198, 198, 23814, 796, 17635, 198, 198, 1640, 4808, ...
2.388535
157
from random import randint from time import sleep opcao = 123 cont = 0 while opcao != 0: print('-=-' * 20) print('Vou pensar em um nmero entre 0 e 10, quer tentar adivinhar?') print('-=-' * 20) print('\n[ 1 ] Sim [ 0 ] No') opcao = int(input('Escolha uma das opes acima\n>')) if opcao == 1: ...
[ 6738, 4738, 1330, 43720, 600, 198, 6738, 640, 1330, 3993, 198, 198, 404, 66, 5488, 796, 17031, 198, 3642, 796, 657, 198, 4514, 1034, 66, 5488, 14512, 657, 25, 198, 220, 220, 220, 3601, 10786, 12, 10779, 6, 1635, 1160, 8, 198, 220, ...
1.97007
568
# -*- coding: utf-8 -*- """Demo153_RareCategories.ipynb ## Rare Categories - Labels - The number of labels in the dataset are different - __high cardinality__ refers to uniqueness of data values - The lower the cardinality, the more duplicated elements in a column - A column with the lowest possible cardinali...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 11522, 78, 21395, 62, 26737, 34, 26129, 13, 541, 2047, 65, 198, 198, 2235, 14423, 45486, 198, 198, 12, 3498, 1424, 220, 198, 198, 12, 383, 1271, 286, 14722, 287...
2.872727
660
#!/usr/bin/env python import sys import os import argparse import adios import skel_settings import skel_bpls # Command line parsing is chained together. This is stage two. The first stage happens in ../bin/skel # TODO: Get rid of this in favor of chained version, above. if __name__ == "__main__": ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 1822, 29572, 198, 198, 11748, 512, 4267, 198, 11748, 6146, 75, 62, 33692, 198, 11748, 6146, 75, 62, 65, 489, 82, 198, 198, 2, 9455, 1627, ...
2.929204
113
# Copyright 2021 LINE Corporation # # LINE Corporation licenses this file to you under the Apache License, # version 2.0 (the "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at: # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
[ 2, 220, 15069, 33448, 48920, 10501, 198, 2, 198, 2, 220, 48920, 10501, 16625, 428, 2393, 284, 345, 739, 262, 24843, 13789, 11, 198, 2, 220, 2196, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 407, 779, 428, 2393, 2845, 287, ...
3.834356
163
"""Provides a Preprocessed action for the Microsoft Visual Studio compilers. """ import os import SCons.Action import SCons.Util import preprocessed_builder # XXX These are internal to SCons and may change in the future...but it's unlikely from SCons.Tool.msvc import CSuffixes, CXXSuffixes, msvc_batch_key # TODO Con...
[ 37811, 15946, 1460, 257, 3771, 14681, 276, 2223, 329, 262, 5413, 15612, 11733, 552, 34393, 13, 198, 37811, 198, 198, 11748, 28686, 198, 11748, 6374, 684, 13, 12502, 198, 11748, 6374, 684, 13, 18274, 346, 198, 11748, 662, 14681, 276, 62,...
2.514586
857
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models
[ 2, 21004, 25, 3384, 69, 12, 23, 198, 11748, 4818, 8079, 198, 6738, 5366, 13, 9945, 1330, 20613, 198, 6738, 5366, 13, 85, 17, 1330, 10011, 2611, 44, 4254, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198 ]
3.263158
38
import requests import json from os import environ from .models import Order, Piece from .BLConsul import BLConsul GATEWAY_PORT = environ.get("HAPROXY_PORT") GATEWAY_ADDRESS = environ.get("HAPROXY_IP") MACHINE_SERVICE = "machine" PAYMENT_SERVICE = "payment" DELIVERY_SERVICE = "delivery" AUTH_SERVICE = "auth" CA_CERT ...
[ 11748, 7007, 198, 11748, 33918, 198, 6738, 28686, 1330, 551, 2268, 198, 6738, 764, 27530, 1330, 8284, 11, 27053, 198, 6738, 764, 33, 5639, 684, 377, 1330, 347, 5639, 684, 377, 198, 198, 38, 6158, 27285, 62, 15490, 796, 551, 2268, 13, ...
2.519481
154
# Generated by Django 3.1.7 on 2021-02-26 21:54 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 22, 319, 33448, 12, 2999, 12, 2075, 2310, 25, 4051, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
#################################################################################################### # # congruence_closure_module.py # # Authors: # Jeremy Avigad # Rob Lewis # # This module maintains a union-find structure for terms in Blackboard, which is currently only used # for congruence closure. It should perhap...
[ 29113, 29113, 29113, 4242, 198, 2, 198, 2, 369, 48929, 594, 62, 17966, 62, 21412, 13, 9078, 198, 2, 198, 2, 46665, 25, 198, 2, 11753, 5184, 328, 324, 198, 2, 3851, 10174, 198, 2, 198, 2, 770, 8265, 16047, 257, 6441, 12, 19796, 4...
4.828025
157
import pandas as pd import numpy as np import csv
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 269, 21370, 198 ]
2.941176
17
import http.server import os import socketserver Handler = http.server.SimpleHTTPRequestHandler httpd = socketserver.TCPServer(("127.0.0.1", 8080), Handler) print("server:\thttp://127.0.0.1:8080\n\nlog:") httpd.serve_forever()
[ 11748, 2638, 13, 15388, 198, 11748, 28686, 198, 11748, 37037, 18497, 198, 198, 25060, 796, 2638, 13, 15388, 13, 26437, 40717, 18453, 25060, 198, 198, 4023, 67, 796, 37037, 18497, 13, 4825, 3705, 18497, 7, 7203, 16799, 13, 15, 13, 15, ...
2.655172
87
#!/usr/bin/env python3 import locale import sys from datetime import datetime as dt import pywikibot as pwb if __name__ == '__main__': main(sys.argv) # vim: set ts=4 sts=4 sw=4 tw=100 et:
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 36693, 198, 11748, 25064, 198, 198, 6738, 4818, 8079, 1330, 4818, 8079, 355, 288, 83, 198, 198, 11748, 12972, 20763, 571, 313, 355, 279, 39346, 628, 198, 198, 361, 1159...
2.426829
82
Python 3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:20:19) [MSC v.1925 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license()" for more information. >>> # pip install imapclient // pip install pyzmail >>> import imapclient >>> conn= imapclient.IMAPClient('imap.gmail.com', ssl=True) #True to use S...
[ 37906, 513, 13, 23, 13, 18, 357, 31499, 14, 85, 18, 13, 23, 13, 18, 25, 21, 69, 23, 66, 23, 2624, 11, 1737, 1511, 12131, 11, 2534, 25, 1238, 25, 1129, 8, 685, 5653, 34, 410, 13, 1129, 1495, 3933, 1643, 357, 24123, 15437, 319, ...
2.682226
557
/* * Copyright (c) 2020 Huawei Technologies Co.,Ltd. * * openGauss is licensed under Mulan PSL v2. * You can use this software according to the terms and conditions of the Mulan PSL v2. * You may obtain a copy of Mulan PSL v2 at: * * http://license.coscl.org.cn/MulanPSL2 * * THIS SOFTWARE IS PROVIDED ...
[ 15211, 198, 1635, 15069, 357, 66, 8, 12131, 43208, 21852, 1766, 1539, 43, 8671, 13, 198, 1635, 198, 1635, 1280, 35389, 1046, 318, 11971, 739, 17996, 272, 6599, 43, 410, 17, 13, 198, 1635, 921, 460, 779, 428, 3788, 1864, 284, 262, 28...
2.493544
697
import unittest from gilded_rose import Item, GildedRose if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 6738, 308, 46158, 62, 13698, 1330, 9097, 11, 402, 46158, 31087, 628, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3419, 198 ]
2.658537
41
import random import string
[ 11748, 4738, 198, 11748, 4731, 628 ]
4.833333
6
from douyin.utils import fetch from douyin.config import hot_trend_url, common_headers from douyin.utils.tranform import data_to_music, data_to_topic from douyin.structures.hot import HotTrend from douyin.utils.common import parse_datetime # define trend query params query = { 'version_code': '2.9.1', 'count'...
[ 6738, 2255, 88, 259, 13, 26791, 1330, 21207, 198, 6738, 2255, 88, 259, 13, 11250, 1330, 3024, 62, 83, 10920, 62, 6371, 11, 2219, 62, 50145, 198, 6738, 2255, 88, 259, 13, 26791, 13, 2213, 272, 687, 1330, 1366, 62, 1462, 62, 28965, ...
2.853448
116
# Import the hashing Library import hashlib # Get the string as input word = input("Enter the word for Hashing: ") # Get the hashing hashed_code = hashlib.sha256(word.encode()) final = hashed_code.hexdigest() # Print the result print("Hashed with 256 bit: ") print(final)
[ 2, 17267, 262, 49544, 10074, 201, 198, 11748, 12234, 8019, 201, 198, 201, 198, 2, 3497, 262, 4731, 355, 5128, 201, 198, 4775, 796, 5128, 7203, 17469, 262, 1573, 329, 367, 2140, 25, 366, 8, 201, 198, 201, 198, 2, 3497, 262, 49544, ...
2.823529
102
from __future__ import unicode_literals from django.db import models from django.utils import timezone from django.dispatch import receiver from django.conf import settings from taggit.managers import TaggableManager import requests
[ 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 26791, 1330, 640, 11340, 198, 6738, 42625, 14208, 13, 6381, 17147, 1330, 9733, 198, 6738, 42625, ...
3.71875
64
""" Vernam Cipher Benjamin D. Miller Takes a key, and a message Encripts the message using the key """ """ * TEST CASES * """ vernam(9,"hello world") vernam(14,"TEST_CASE 34!") vernam("test","test")
[ 37811, 201, 198, 53, 1142, 321, 44334, 201, 198, 11696, 13337, 360, 13, 7920, 201, 198, 51, 1124, 257, 1994, 11, 290, 257, 3275, 201, 198, 4834, 6519, 82, 262, 3275, 1262, 262, 1994, 201, 198, 37811, 201, 198, 201, 198, 37811, 1635,...
2.511905
84
from datetime import datetime as d
[ 6738, 4818, 8079, 1330, 4818, 8079, 355, 288, 198 ]
3.888889
9
from fineract.objects.currency import Currency from fineract.objects.fineract_object import FineractObject from fineract.objects.types import ChargeTimeType, ChargeAppliesTo, ChargeCalculationType, ChargePaymentMode
[ 6738, 38575, 529, 13, 48205, 13, 34415, 1330, 20113, 198, 6738, 38575, 529, 13, 48205, 13, 69, 7274, 529, 62, 15252, 1330, 4463, 263, 529, 10267, 198, 6738, 38575, 529, 13, 48205, 13, 19199, 1330, 20260, 7575, 6030, 11, 20260, 4677, 1...
3.928571
56
from heapq import heapify, heappop, heappush if __name__ == "__main__": main()
[ 6738, 24575, 80, 1330, 24575, 1958, 11, 339, 1324, 404, 11, 339, 1324, 1530, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1388, 3419 ]
2.59375
32
activate_this = '/var/www/html/venv/bin/activate_this.py' execfile(activate_this, dict(__file__=activate_this)) import sys, os, logging from flask_apscheduler import APScheduler sys.path.insert(0, 'var/www/html/StuffMart/vagrant/catalog') logging.basicConfig(stream=sys.stderr) from server import flask as application ...
[ 39022, 62, 5661, 796, 31051, 7785, 14, 2503, 14, 6494, 14, 574, 85, 14, 8800, 14, 39022, 62, 5661, 13, 9078, 6, 198, 18558, 7753, 7, 39022, 62, 5661, 11, 8633, 7, 834, 7753, 834, 28, 39022, 62, 5661, 4008, 198, 198, 11748, 25064, ...
2.208978
646
import unittest from unittest.mock import patch, Mock import pandas as pd from pandas.testing import assert_frame_equal from parameterized import parameterized from dgraphpandas.strategies.horizontal import horizontal_transform
[ 11748, 555, 715, 395, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 8529, 11, 44123, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 19798, 292, 13, 33407, 1330, 6818, 62, 14535, 62, 40496, 198, 6738, 11507, 1143, 1330, 11507, ...
3.666667
63
#!/usr/bin/python # This is client.py file import socket # Import socket module s = socket.socket() # Create a socket object #host = socket.gethostname() # Get local machine name host = socket.gethostbyname("localhost") print host port = 53 # Reserve a port for your serv...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 770, 318, 5456, 13, 9078, 2393, 198, 198, 11748, 17802, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 1726...
2.536913
149
import os import shutil from flask import render_template, redirect, url_for, request from werkzeug.utils import secure_filename from config import Config from application import app from application.model import Model
[ 11748, 28686, 198, 11748, 4423, 346, 198, 6738, 42903, 1330, 8543, 62, 28243, 11, 18941, 11, 19016, 62, 1640, 11, 2581, 198, 6738, 266, 9587, 2736, 1018, 13, 26791, 1330, 5713, 62, 34345, 198, 6738, 4566, 1330, 17056, 198, 6738, 3586, ...
4.226415
53
""" Tests onnxml Imputer converter """ import unittest import warnings import numpy as np import torch from sklearn.impute import SimpleImputer from hummingbird.ml._utils import onnx_ml_tools_installed, onnx_runtime_installed, lightgbm_installed from hummingbird.ml import convert if onnx_runtime_installed(): imp...
[ 37811, 198, 51, 3558, 319, 77, 19875, 1846, 10549, 38394, 198, 37811, 198, 11748, 555, 715, 395, 198, 11748, 14601, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 6738, 1341, 35720, 13, 11011, 1133, 1330, 17427, 3546, ...
2.937173
191
import configparser, os, glob, csv, json, hashlib, time import pandas as pd import psycopg2 from pprint import pprint from rs_sql_queries import staging_events_insert, staging_songs_insert from rs_sql_queries import insert_table_queries import boto3 from botocore import UNSIGNED from botocore.config import Config DE...
[ 11748, 4566, 48610, 11, 28686, 11, 15095, 11, 269, 21370, 11, 33918, 11, 12234, 8019, 11, 640, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 17331, 22163, 70, 17, 198, 6738, 279, 4798, 1330, 279, 4798, 198, 6738, 44608, 62, 25410,...
2.07507
3,570
#!/usr/bin/python import json, urllib2, datetime from sqlite3 import dbapi2 as sqlite3 # zip codes to log zipcodes = ['07740','11210','33139','90210'] # configuration DATABASE = '../db/weather.db' SECRET_KEY = 'hackerati' DEBUG = True # open database db = sqlite3.connect(DATABASE) for zipcode in zipcodes: # pu...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 11748, 33918, 11, 2956, 297, 571, 17, 11, 4818, 8079, 198, 6738, 44161, 578, 18, 1330, 20613, 15042, 17, 355, 44161, 578, 18, 198, 198, 2, 19974, 12416, 284, 2604, 198, 13344, 40148, 7...
2.549618
393
from git import Repo from git_inspector import find_git_directories
[ 198, 6738, 17606, 1330, 1432, 78, 198, 6738, 17606, 62, 1040, 806, 273, 1330, 1064, 62, 18300, 62, 12942, 1749, 628, 628, 198 ]
3.173913
23
#!/usr/bin/env python3 try: from gelpia import bin_dir except: print("gelpia not found, gaol_repl must be in your PATH\n") bin_dir = "" from pass_utils import * from output_flatten import flatten import re import sys import subprocess import os.path as path if __name__ == "__main__": try: runma...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 28311, 25, 198, 220, 422, 20383, 79, 544, 1330, 9874, 62, 15908, 198, 16341, 25, 198, 220, 3601, 7203, 25280, 79, 544, 407, 1043, 11, 31986, 349, 62, 35666, 1276, 307, 287, ...
2.764706
136
import os from pip.req import parse_requirements from setuptools import find_packages, setup with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme: README = readme.read() # parse_requirements() returns generator of pip.req.InstallRequirement objects install_reqs = parse_requirements( os....
[ 11748, 28686, 198, 198, 6738, 7347, 13, 42180, 1330, 21136, 62, 8897, 18883, 198, 6738, 900, 37623, 10141, 1330, 1064, 62, 43789, 11, 9058, 198, 198, 4480, 1280, 7, 418, 13, 6978, 13, 22179, 7, 418, 13, 6978, 13, 15908, 3672, 7, 834...
2.836412
758
import csv import ipaddress import logging.handlers import sys import argparse try: import vat.vectra as vectra import requests except Exception as error: print('\nMissing import requirements: {}\n'.format(str(error))) sys.exit(0) LOG = logging.getLogger(__name__) INVALID_CHARS = ['~', '#', '$', '^'...
[ 11748, 269, 21370, 198, 11748, 20966, 21975, 198, 11748, 18931, 13, 4993, 8116, 198, 11748, 25064, 198, 11748, 1822, 29572, 628, 198, 28311, 25, 198, 220, 220, 220, 1330, 410, 265, 13, 303, 310, 430, 355, 1569, 310, 430, 198, 220, 220...
2.441603
2,346
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Python # # # Number / String / Tuple # List / Dictionary / Set # Number # Int IntNum = 100 # Float FloatNum = 100.10 # Boolean // True:1 False:0 BoolNum = True # Complex ComplexNum = 1.00j # String Str = "" # List List = ['a', 'b', 1, 2] # Tu...
[ 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, 2, 11361, 198, 2, 220, 198, 2, 220, 220, 198, 198, 2, 220, 7913, 1220, 10903, 1220, 309, 29291, 198, 2, ...
2.07109
211
"""Generate Docs for ThreatConnect API""" # standard library import importlib import sys from abc import ABC from typing import Any, Optional # first-party from tcex.api.tc.v3._gen._gen_abc import GenerateABC
[ 37811, 8645, 378, 14432, 82, 329, 25238, 13313, 7824, 37811, 198, 2, 3210, 5888, 198, 11748, 1330, 8019, 198, 11748, 25064, 198, 6738, 450, 66, 1330, 9738, 198, 6738, 19720, 1330, 4377, 11, 32233, 198, 198, 2, 717, 12, 10608, 198, 673...
3.349206
63
#!/usr/bin/python sootv = {} #Read file sootvetstviya for l in open ("filesootv"): data = l.strip().split("\t") if data[0] not in sootv: sootv[data[0]] = data[1] #Read FinalReport file for l in open('Ire30_GP'): data = l.strip().split("\t") if data[1] in sootv: print(data[0]+"\t"+sootv[data[1]]...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 201, 198, 201, 198, 568, 313, 85, 796, 23884, 201, 198, 201, 198, 2, 5569, 2393, 523, 313, 16809, 301, 8903, 3972, 201, 198, 1640, 300, 287, 1280, 5855, 16624, 1025, 85, 1, 2599, 201, 198, 197...
1.872549
204
# Quiz01_1.py items = {"":1000,"":900,"":500,"":700,"":800} print("=== ====") print("[][][][][] ") print(" --> ) , ") # item, price item = input() # , items2 = item.strip().split(',') price = pItems(*items2,**items) print(" : {0} ".format(price) )
[ 2, 2264, 528, 486, 62, 16, 13, 9078, 198, 220, 220, 220, 220, 198, 23814, 796, 19779, 1298, 12825, 553, 1298, 12865, 553, 1298, 4059, 553, 1298, 9879, 553, 1298, 7410, 92, 198, 198, 4798, 7203, 18604, 220, 220, 220, 24844, 2625, 8, ...
2.228814
118
""" Copyright 2019 Sangkug Lym Copyright 2019 The University of Texas at Austin Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless require...
[ 37811, 198, 15069, 13130, 30043, 74, 1018, 406, 4948, 198, 15069, 13130, 383, 2059, 286, 3936, 379, 9533, 628, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 345, 743, 407, 779, 428, 2393, 28...
2.866197
426
# -*- coding: utf-8 -*- import numpy import csv import re, nltk from sklearn.feature_extraction.text import CountVectorizer from nltk.stem.porter import PorterStemmer from sklearn.linear_model import LogisticRegression # from sklearn.cross_validation import train_test_split from sklearn.externals import joblib...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 299, 32152, 198, 11748, 269, 21370, 198, 11748, 302, 11, 299, 2528, 74, 198, 6738, 1341, 35720, 13, 30053, 62, 2302, 7861, 13, 5239, 1330, 2764, 38469, 7509,...
2.470211
1,091
#!/usr/bin/env python3 # -*- coding: UTF-8 -*- import sys import os from PIL import Image import numpy as np size = None matrix_x = None for image in os.listdir('./washington'): try: print(image) with Image.open(os.path.join('./washington',image)) as im: imgVector = np.array(list(im.get...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 198, 11748, 25064, 198, 11748, 28686, 198, 6738, 350, 4146, 1330, 7412, 198, 11748, 299, 32152, 355, 45941, 198, 198, 7857, ...
1.912105
1,297
import boto3 import sys if __name__ == "__main__": if len(sys.argv) > 2: print("[ERROR] You have passed in an invalid target-id, example target-id is ou-zhz0-prn5fmbc") sys.exit() else: print("[INFO] Valid argument detected, proceeding with account migration") destination_id = ...
[ 11748, 275, 2069, 18, 198, 11748, 25064, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 628, 220, 220, 220, 611, 18896, 7, 17597, 13, 853, 85, 8, 1875, 362, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 720...
2.109434
795
#!/usr/bin/env python3 from sys import argv from sys import stdin from sys import stdout alp = len(argv) if alp > 1 and argv[1] == "--version": print ('version 0.1') quit() if alp > 1 and argv[1] == "--help": print ('ctrl+d to quit') quit() print('todo')
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 6738, 25064, 1330, 1822, 85, 198, 6738, 25064, 1330, 14367, 259, 198, 6738, 25064, 1330, 14367, 448, 198, 198, 282, 79, 796, 18896, 7, 853, 85, 8, 198, 361, 435, 79, 1875, 352, ...
2.382609
115
# https://rosalind.info/problems/rna/ # Transcribing DNA into RNA exercise from ROSALIND DNA = "ACAACAAAGGATCGGCGAGGAGCTGGTTAATCTCGATTCTAACAAAGGCCTCTTGAGTGACATAAAGTTGCTGTTCGGCCCCCGTTGCAGCCAAGCCTAGACTCGAGCGGGGTCTACCTCTGTAAACCCAAGTCGCAGGCCAAGGGCATTTTAACCCCCAAAGTTAGATACGTCGATTGAGTGCGCACTCCCTAACTTCAGACAGGATGGCGCTTAGCACTGG...
[ 2, 3740, 1378, 4951, 282, 521, 13, 10951, 14, 1676, 22143, 14, 81, 2616, 14, 198, 2, 3602, 66, 23098, 7446, 656, 25897, 5517, 422, 48263, 1847, 12115, 198, 198, 28886, 796, 366, 26576, 2246, 3838, 4760, 38, 1404, 34, 11190, 39816, 4...
1.986087
575
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2016-08-04 10:44 from __future__ import unicode_literals from django.db import migrations
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 24, 13, 22, 319, 1584, 12, 2919, 12, 3023, 838, 25, 2598, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 19...
2.672727
55
# The MIT License (MIT) # Copyright (c) 2016 Dell Inc. or its subsidiaries. # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation # files (the "Software"), to deal in the Software without restriction, # including without limitation the rights to ...
[ 2, 383, 17168, 13789, 357, 36393, 8, 198, 2, 15069, 357, 66, 8, 1584, 23617, 3457, 13, 393, 663, 34943, 13, 198, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 198, 2, 16727, 257, 4866, 286, 428, ...
2.261283
1,263
import struct import itertools import numpy as np from bitarray import bitarray RANDOM_SEED = 2387613 IMAGE_SIZE = 128 BATCH_SIZE = 2048 # Assign an integer to each word to be predicted. WORD2LABEL = { 'The Eiffel Tower': 0, 'The Great Wall of China': 1, 'The Mona Lisa': 2, 'airplane': 3, 'alar...
[ 11748, 2878, 198, 11748, 340, 861, 10141, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 1643, 18747, 1330, 1643, 18747, 628, 198, 49, 6981, 2662, 62, 5188, 1961, 796, 32544, 4304, 1485, 198, 198, 3955, 11879, 62, 33489, 796, 13108...
1.990113
3,540
from collections import Counter from Bio import SeqIO import numpy as np import warnings import math warnings.filterwarnings(action='ignore', category=UserWarning, module='gensim') from gensim.models import Word2Vec Max_length = 100 # maximum length of used peptides ...
[ 6738, 17268, 1330, 15034, 201, 198, 201, 198, 6738, 16024, 1330, 1001, 80, 9399, 201, 198, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 201, 198, 11748, 14601, 201, 198, 11748, 10688, 201, 198, 201, 198, 40539, 654, 13, 24455, 4...
2.31746
189
from .excel4_anti_analysis import *
[ 6738, 764, 1069, 5276, 19, 62, 17096, 62, 20930, 1330, 1635 ]
3.181818
11
import numpy as np import librosa import os from pytorch_sound.data.meta.ljspeech import LJSpeechMeta from torch.utils.data import Dataset, DataLoader from typing import Tuple
[ 11748, 299, 32152, 355, 45941, 198, 11748, 9195, 4951, 64, 198, 11748, 28686, 198, 6738, 12972, 13165, 354, 62, 23661, 13, 7890, 13, 28961, 13, 75, 73, 45862, 1330, 406, 41, 5248, 3055, 48526, 198, 6738, 28034, 13, 26791, 13, 7890, 13...
3.178571
56
"""Get the parsed query from the driver and apply transformation and action based on the query template """ import time import pyspark.sql.functions as f from pyspark.sql import SparkSession from pyspark.sql.types import IntegerType, StringType, StructField, StructType import yaml from schema import schema with ...
[ 37811, 3855, 262, 44267, 12405, 422, 262, 4639, 290, 4174, 13389, 290, 2223, 1912, 319, 262, 198, 220, 220, 220, 12405, 11055, 198, 37811, 198, 11748, 640, 198, 198, 11748, 279, 893, 20928, 13, 25410, 13, 12543, 2733, 355, 277, 198, 6...
3.13253
166
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'main_gui.ui' # # Created by: PyQt5 UI code generator 5.9.2 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 201, 198, 2, 5178, 7822, 7560, 422, 3555, 334, 72, 2393, 705, 12417, 62, 48317, 13, 9019, 6, 201, 198, 2, 201, 198, 2, 15622, 416, 25, 9485, 48, 83, 20, 12454...
2.57732
97
import os import yaml DEFAULT_CONFIG = { 'SEED': 10, # random seed 'BATCH_SIZE': 8, # input batch size for training 'INPUT_SIZE': 256, # input image size for training 0 for original size 'MAX_ITERS': 1e6, # maximum number of iterations to...
[ 11748, 28686, 198, 198, 11748, 331, 43695, 628, 198, 198, 7206, 38865, 62, 10943, 16254, 796, 1391, 198, 220, 220, 220, 705, 5188, 1961, 10354, 838, 11, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220,...
2.392857
336
# # Copyright 2019 Gianluca Frison, Dimitris Kouzoupis, Robin Verschueren, # Andrea Zanelli, Niels van Duijkeren, Jonathan Frey, Tommaso Sartor, # Branimir Novoselnik, Rien Quirynen, Rezart Qelibari, Dang Doan, # Jonas Koenemann, Yutao Chen, Tobias Schls, Jonas Schlagenhauf, Moritz Diehl # # This file is part of acados...
[ 2, 198, 2, 15069, 13130, 30851, 75, 43120, 1305, 1653, 11, 14048, 270, 2442, 30559, 89, 10486, 271, 11, 12325, 18535, 354, 518, 918, 11, 198, 2, 23174, 47022, 23225, 11, 11556, 1424, 5719, 10343, 2926, 365, 918, 11, 11232, 35086, 11, ...
2.185323
4,020
import httplib # Used only for handling httplib.HTTPException (case #26701) import os import sys import platform import re import urllib import urllib2 import traceback import time from StringIO import StringIO from multiprocessing import subprocess from kunai.log import logger from kunai.collector import Collector
[ 11748, 1841, 489, 571, 1303, 16718, 691, 329, 9041, 1841, 489, 571, 13, 40717, 16922, 357, 7442, 1303, 25674, 486, 8, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 3859, 198, 11748, 302, 198, 11748, 2956, 297, 571, 198, 11748, 2956,...
3.595506
89
#!/usr/bin/python3 # -*- coding: utf-8 -*- ''' 2017 ICPC at UCSY Problem-H: Sum Square ''' import sys def parse_tc(tc): ''' Input: Test Case Update: Return: None ''' x = list(map(int,tc.infile.readline().split())) tc.dataset = x[0] tc.max_num = x[1] tc.base ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 7061, 6, 198, 220, 220, 220, 2177, 12460, 5662, 379, 49553, 56, 198, 220, 220, 220, 20647, 12, 39, 25, 5060, 9276...
1.792424
660
""" Author: Peng Wu License: MIT """ # Initialize Spark Context: local multi-threads from pyspark import SparkConf, SparkContext output_folder = './csv/' # with open(output_folder+'viz_txedge.csv', 'w') as f: # pass # def formatted_print_2(keyValue): # with open(output_folder+'viz_txedge.csv', ...
[ 37811, 198, 13838, 25, 42341, 18027, 198, 34156, 25, 17168, 198, 37811, 198, 198, 2, 20768, 1096, 17732, 30532, 25, 1957, 5021, 12, 16663, 82, 198, 6738, 279, 893, 20928, 1330, 17732, 18546, 11, 17732, 21947, 198, 198, 22915, 62, 43551,...
2.25641
351
import torch from torch import nn as nn import numpy as np from .base import Readout def initialize(self, mean_activity=None): """ Initializes the mean, and sigma of the Gaussian readout along with the features weights """ if mean_activity is None: mean_activity = self...
[ 11748, 28034, 198, 6738, 28034, 1330, 299, 77, 355, 299, 77, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 764, 8692, 1330, 4149, 448, 628, 198, 220, 220, 220, 825, 41216, 7, 944, 11, 1612, 62, 21797, 28, 14202, 2599, 198, 220...
2.334356
978
from flask import render_template,request, redirect, url_for from . import main from ..requests import get_articles, get_news_sources,get_top_headlines, get_news_category
[ 6738, 42903, 1330, 8543, 62, 28243, 11, 25927, 11, 18941, 11, 19016, 62, 1640, 198, 6738, 764, 1330, 1388, 198, 6738, 11485, 8897, 3558, 1330, 651, 62, 26845, 11, 651, 62, 10827, 62, 82, 2203, 11, 1136, 62, 4852, 62, 2256, 6615, 11,...
3.541667
48
#!/usr/bin/env python3 # MIT License # # Copyright (c) 2020 FABRIC Testbed # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 17168, 13789, 198, 2, 198, 2, 15069, 357, 66, 8, 12131, 376, 6242, 41132, 6208, 3077, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, ...
3.638484
343
from .node_view import NodeView from .node import Node from .nodes_view import NodesView from .nodes import Nodes
[ 6738, 764, 17440, 62, 1177, 1330, 19081, 7680, 198, 6738, 764, 17440, 1330, 19081, 198, 6738, 764, 77, 4147, 62, 1177, 1330, 399, 4147, 7680, 198, 6738, 764, 77, 4147, 1330, 399, 4147, 198 ]
3.352941
34
#!/usr/bin/env python # Author: Christian Vallentin <mail@vallentinsource.com> # Website: http://vallentinsource.com # Repository: https://github.com/MrVallentin/http_request # # Date Created: February 28, 2016 # Last Modified: February 29, 2016 # # Developed and tested using Python 3.5.1 import http.client, urllib....
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 6434, 25, 4302, 46929, 31371, 1279, 4529, 31, 85, 439, 298, 1040, 1668, 13, 785, 29, 198, 2, 15887, 25, 2638, 1378, 85, 439, 298, 1040, 1668, 13, 785, 198, 2, 1432, 13264, ...
3.009174
109
import PyPDF2 merger = PyPDF2.PdfFileMerger() merger.append('data/src/pdf/sample1.pdf', pages=(0, 1)) merger.append('data/src/pdf/sample2.pdf', pages=(2, 4)) merger.merge(2, 'data/src/pdf/sample3.pdf', pages=(0, 3, 2)) merger.write('data/temp/sample_merge_page.pdf') merger.close() merger = PyPDF2.PdfFileMerger() m...
[ 11748, 9485, 20456, 17, 198, 198, 647, 1362, 796, 9485, 20456, 17, 13, 47, 7568, 8979, 13102, 1362, 3419, 198, 198, 647, 1362, 13, 33295, 10786, 7890, 14, 10677, 14, 12315, 14, 39873, 16, 13, 12315, 3256, 5468, 16193, 15, 11, 352, 4...
2.360202
397
from transformers.data.processors.squad import SquadV1Processor, SquadV2Processor from transformers import squad_convert_examples_to_features import urllib.request import os
[ 6738, 6121, 364, 13, 7890, 13, 14681, 669, 13, 16485, 324, 1330, 11630, 53, 16, 18709, 273, 11, 11630, 53, 17, 18709, 273, 198, 6738, 6121, 364, 1330, 8244, 62, 1102, 1851, 62, 1069, 12629, 62, 1462, 62, 40890, 198, 11748, 2956, 297...
3.48
50
import random import numpy as np import pandas as pd import trading_env # np.set_printoptions(threshold=np.nan) #df = pd.read_hdf('dataset/SGXTW.h5', 'STW') #df = pd.read_hdf('dataset/SGXTWsample.h5', 'STW') df = pd.read_csv('dataset/btc_indexed2.csv') print(df.describe()) env = trading_env.make(env_id='training_v1'...
[ 11748, 4738, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 7313, 62, 24330, 198, 198, 2, 45941, 13, 2617, 62, 4798, 25811, 7, 400, 10126, 28, 37659, 13, 12647, 8, 198, 198, 2, 7568, 796, 279, ...
1.964989
457