content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
""" you have a string "ddaaiillyypprrooggrraammeerr". We want to remove all the consecutive duplicates and put them in a separate string, which yields two separate instances of the string "dailyprogramer". use this list for testing: input: "balloons" expected output: "balons" "lo" input: "ddaaiillyypprrooggrraammeerr"...
[ 37811, 198, 5832, 423, 257, 4731, 366, 1860, 64, 1872, 6548, 88, 381, 81, 305, 519, 2164, 430, 321, 1326, 8056, 1911, 775, 765, 284, 4781, 477, 262, 12785, 14184, 16856, 290, 1234, 606, 287, 257, 198, 25512, 378, 4731, 11, 543, 1929...
2.534653
303
#!/usr/bin/env python3 import typing import PIL.Image from enum import Enum import re import preppipe.commontypes from preppipe.vnmodel import * # we define an MIR infrastructure for backend... Engine Model (EM) # helper functions def _get_label_name(name : str, type_prefix : str, scope_pre...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 201, 198, 201, 198, 11748, 19720, 201, 198, 11748, 350, 4146, 13, 5159, 201, 198, 6738, 33829, 1330, 2039, 388, 201, 198, 11748, 302, 201, 198, 201, 198, 11748, 662, 381, 3757, 13, 78...
2.603071
1,693
from openprocurement.tender.limited.models import Tender
[ 6738, 1280, 36942, 495, 434, 13, 83, 2194, 13, 10698, 13, 27530, 1330, 309, 2194, 628 ]
3.625
16
from pprint import pprint import requests import base64 import json import argparse import sys p = argparse.ArgumentParser(description="New") p.add_argument('-f','--folder-name', required=True, help='Folder name of the images/metadata files') p.add_argument('-s','--start', required=False, help='Start ID to upload') p...
[ 6738, 279, 4798, 1330, 279, 4798, 198, 11748, 7007, 198, 11748, 2779, 2414, 198, 11748, 33918, 198, 11748, 1822, 29572, 198, 11748, 25064, 628, 198, 79, 796, 1822, 29572, 13, 28100, 1713, 46677, 7, 11213, 2625, 3791, 4943, 198, 79, 13, ...
3.029891
368
import logging from queue import Queue from redis_queue.queue import RedisQueue from runner.base import BaseRunner logger = logging.getLogger(__name__) if __name__ == '__main__': # python -m event.runner from handler import * r = TestRedisRunner('test_runner', [], [], [Heart...
[ 11748, 18931, 198, 6738, 16834, 1330, 4670, 518, 198, 198, 6738, 2266, 271, 62, 36560, 13, 36560, 1330, 2297, 271, 34991, 198, 6738, 17490, 13, 8692, 1330, 7308, 49493, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, ...
2.638889
144
# -*- coding: utf-8 -*- from ultron.sentry.Analysis.TechnicalAnalysis.StatelessTechnicalAnalysers import SecuritySignValueHolder from ultron.sentry.Analysis.TechnicalAnalysis.StatelessTechnicalAnalysers import SecurityAverageValueHolder from ultron.sentry.Analysis.TechnicalAnalysis.StatelessTechnicalAnalysers import S...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 3789, 1313, 13, 82, 13000, 13, 32750, 13, 45638, 32750, 13, 9012, 1203, 45638, 2025, 26266, 364, 1330, 4765, 11712, 11395, 39, 19892, 198, 6738, 3789, 1313, 1...
3.356401
2,023
# from app.common.utils import * from sqlalchemy import desc from settings import Config from app.models import * from app.extensions import db from app.models.base import _BaseModel from app.common.message import DBError # # ------------------------------ # ------------------------------ # ----------------...
[ 2, 422, 598, 13, 11321, 13, 26791, 1330, 1635, 198, 6738, 44161, 282, 26599, 1330, 1715, 198, 6738, 6460, 1330, 17056, 198, 6738, 598, 13, 27530, 1330, 1635, 198, 6738, 598, 13, 2302, 5736, 1330, 20613, 198, 6738, 598, 13, 27530, 13, ...
4.010101
99
from unittest import TestCase import mock from cloudshell.cp.azure.domain.services.vm_credentials_service import VMCredentialsService from cloudshell.cp.azure.models.vm_credentials import VMCredentials def test_prepare_windows_credentials_without_user_and_password(self): """Check that method will return...
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 198, 11748, 15290, 198, 198, 6738, 6279, 29149, 13, 13155, 13, 1031, 495, 13, 27830, 13, 30416, 13, 14761, 62, 66, 445, 14817, 62, 15271, 1330, 569, 9655, 445, 14817, 16177, 198, 6738, 6279...
2.453061
980
from sys import platform import pygame from handler.handler import Handler
[ 6738, 25064, 1330, 3859, 198, 198, 11748, 12972, 6057, 198, 198, 6738, 21360, 13, 30281, 1330, 32412, 628 ]
4.333333
18
import requests import requests.exceptions import datetime import ujson as json import logging
[ 11748, 7007, 198, 11748, 7007, 13, 1069, 11755, 198, 198, 11748, 4818, 8079, 198, 11748, 334, 17752, 355, 33918, 198, 198, 11748, 18931, 628 ]
4.083333
24
from flask import ( abort, current_app, flash, redirect, render_template, request, session, url_for, ) from flask_login import current_user, login_required from notifications_python_client.errors import HTTPError from notifications_utils.field import Field from notifications_utils.format...
[ 6738, 42903, 1330, 357, 198, 220, 220, 220, 15614, 11, 198, 220, 220, 220, 1459, 62, 1324, 11, 198, 220, 220, 220, 7644, 11, 198, 220, 220, 220, 18941, 11, 198, 220, 220, 220, 8543, 62, 28243, 11, 198, 220, 220, 220, 2581, 11, 1...
2.680226
885
#!/usr/bin/env python2 """ spelling.py Filter the output of 'lynx -dump' into a list of words to spell check. """ from __future__ import print_function from collections import Counter import optparse import re import sys def Options(): """Returns an option parser instance.""" p = optparse.OptionParser() p....
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 17, 198, 37811, 198, 4125, 2680, 13, 9078, 198, 198, 22417, 262, 5072, 286, 705, 6213, 87, 532, 39455, 6, 656, 257, 1351, 286, 2456, 284, 4822, 2198, 13, 198, 37811, 198, 6738, 11593, 374...
2.342032
1,073
#!/usr/bin/env python3 # Based on: https://github.com/facebookresearch/DeepSDF using MIT LICENSE (https://github.com/facebookresearch/DeepSDF/blob/master/LICENSE) # Copyright 2021-present Philipp Friedrich, Josef Kamysek. All Rights Reserved. import functools import json import logging import math import os import sig...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 13403, 319, 25, 3740, 1378, 12567, 13, 785, 14, 19024, 34033, 14, 29744, 50, 8068, 1262, 17168, 38559, 24290, 357, 5450, 1378, 12567, 13, 785, 14, 19024, 34033, 14, 29744, 50, ...
2.427874
1,844
from distutils.core import setup setup( name = 'python-ethereumrpc', packages = ['python-ethereumrpc'], version = '0.1', description = 'A python interface for ethereum JSON-RPC service.', author = 'Nicolas Sandller', author_email = 'nicosandller@gmail.com', url = 'https://github.com/nicosandller/python-et...
[ 6738, 1233, 26791, 13, 7295, 1330, 9058, 198, 40406, 7, 198, 220, 1438, 796, 705, 29412, 12, 316, 1456, 388, 81, 14751, 3256, 198, 220, 10392, 796, 37250, 29412, 12, 316, 1456, 388, 81, 14751, 6, 4357, 198, 220, 2196, 796, 705, 15, ...
2.721311
183
# /robotafm/motor/interface.py # Main web interface, contains basic # information display # imports: import xml.dom.minidom from flask import Flask, render_template # constants: LANG = "./lang/rus.xml" # XML: load text strings from language file dom = xml.dom.minidom.parse(LANG) main_title = dom.getElem...
[ 2, 1220, 305, 13645, 1878, 76, 14, 76, 20965, 14, 39994, 13, 9078, 201, 198, 2, 8774, 3992, 7071, 11, 4909, 4096, 201, 198, 2, 1321, 3359, 201, 198, 201, 198, 2, 17944, 25, 201, 198, 11748, 35555, 13, 3438, 13, 1084, 312, 296, 2...
2.681979
283
from eval_codalab_basic import eval_codalab_basic if __name__ == '__main__': # 1. run first round to prepare full memory eval_codalab_basic(output_suffix='online', skip_first_round_if_memory_is_ready=True) # 2. do offline evaluation when memory is ready eval_codalab_basic(output_suffix='offline')
[ 6738, 5418, 62, 19815, 282, 397, 62, 35487, 1330, 5418, 62, 19815, 282, 397, 62, 35487, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1303, 352, 13, 1057, 717, 2835, 284, 8335, 1336, 4088, 1...
2.80531
113
UP = "U" DOWN = "D" ALLOWED_PATH_I = [UP, DOWN] def update_high_for_step(high: int, step: str) -> int: """Update the current high given a step""" if step == UP: high += 1 elif step == DOWN: high -= 1 return high def count_valley(steps: int, path: str) -> int: """...
[ 8577, 796, 366, 52, 1, 201, 198, 41925, 796, 366, 35, 1, 201, 198, 7036, 3913, 1961, 62, 34219, 62, 40, 796, 685, 8577, 11, 30320, 60, 201, 198, 201, 198, 201, 198, 4299, 4296, 62, 8929, 62, 1640, 62, 9662, 7, 8929, 25, 493, 1...
2.382637
311
from gpanel import * coordinates(-3, -3, 11, 11) line(0, 0, 8, 8) line(8, 0, 0, 8)
[ 6738, 308, 35330, 1330, 1635, 198, 198, 37652, 17540, 32590, 18, 11, 532, 18, 11, 1367, 11, 1367, 8, 198, 1370, 7, 15, 11, 657, 11, 807, 11, 807, 8, 198, 1370, 7, 23, 11, 657, 11, 657, 11, 807, 8, 198 ]
2
42
preo = float(input('Preo: ')) print('''Preencha a forma de pagamento com: 1 - p/ VISTA 2 - p/ CARTO 1x 3 - p/ CARTO 2x 4 - p/ CARTO 3x ou mais ''') pagto = str(input('Pagamento: ')).strip() if pagto == '1': preo = preo*0.9 elif pagto == '2': preo = preo*0.95 elif pagto == '4': preo = preo*1.2 print(preo)
[ 3866, 78, 796, 12178, 7, 15414, 10786, 6719, 78, 25, 705, 4008, 198, 4798, 7, 7061, 6, 47, 1361, 11693, 257, 1296, 64, 390, 42208, 3263, 78, 401, 25, 198, 16, 532, 279, 14, 220, 50035, 5603, 198, 17, 532, 279, 14, 327, 7227, 46,...
1.95122
164
import logging import sys from .application import Application from .document import Document, Track, Event if __name__ == '__main__': logging.basicConfig(level=logging.DEBUG) app = Application(sys.argv) if '--debug' in sys.argv: # # Load a document. # # We absolutely MUST have ...
[ 198, 11748, 18931, 198, 11748, 25064, 198, 198, 6738, 764, 31438, 1330, 15678, 198, 6738, 764, 22897, 1330, 16854, 11, 17762, 11, 8558, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 18931, 13, ...
2
632
"""Module with core functionality for a single pipeline stage """ import pathlib import os import sys from textwrap import dedent import shutil import cProfile from abc import abstractmethod from . import errors from .monitor import MemoryMonitor from .config import StageConfig, cast_to_streamable SERIAL = "serial" ...
[ 37811, 26796, 351, 4755, 11244, 329, 257, 2060, 11523, 3800, 37227, 198, 198, 11748, 3108, 8019, 198, 11748, 28686, 198, 11748, 25064, 198, 6738, 2420, 37150, 1330, 4648, 298, 198, 11748, 4423, 346, 198, 11748, 269, 37046, 198, 198, 6738,...
2.446322
5,207
#!/usr/bin/env python import rospy import numpy as np import math from geometry_msgs.msg import PoseStamped, Transform from TrinaPointAndClick.msg import Marker, MarkerArray if __name__ == '__main__': """ Initializes node and names it Parameters: None Returns: ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 686, 2777, 88, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 10688, 198, 6738, 22939, 62, 907, 14542, 13, 19662, 1330, 37557, 1273, 13322, 11, 26981, 198, 6738, 833, 1437, 12727...
2.269841
252
from mininet.topo import Topo from mininet.link import TCLink topos = { 'topology': ( lambda: Topology() ) }
[ 6738, 949, 42504, 13, 4852, 78, 1330, 5849, 78, 198, 6738, 949, 42504, 13, 8726, 1330, 309, 5097, 676, 198, 220, 198, 4852, 418, 796, 1391, 705, 4852, 1435, 10354, 357, 37456, 25, 5849, 1435, 3419, 1267, 1782, 198 ]
2.846154
39
# -*- coding: utf-8 -*- """ Created on Thu Apr 12 23:00:28 2018 @author: wangshuai """ import urllib import urllib.request as urllib2 import http.cookiejar as cookielib import io import re import gzip from selenium import webdriver import datetime if __name__ == '__main__': config = Config() ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 26223, 2758, 1105, 2242, 25, 405, 25, 2078, 2864, 198, 31, 9800, 25, 266, 648, 1477, 84, 1872, 198, 37811, 198, 11748, 2956, 297, 571, 198, 117...
1.75495
404
import tensorflow as tf
[ 11748, 11192, 273, 11125, 355, 48700, 198 ]
3.428571
7
from os import path, listdir import ocgis from flyingpigeon import subset from flyingpigeon import utils from flyingpigeon.ocgis_module import call def get_prediction(gam_model, ncs_indices): # mask=None """ predict the probabillity based on the gam_model and the given climate index datasets :param gam...
[ 6738, 28686, 1330, 3108, 11, 1351, 15908, 198, 11748, 267, 66, 70, 271, 198, 198, 6738, 7348, 79, 10045, 261, 1330, 24637, 198, 6738, 7348, 79, 10045, 261, 1330, 3384, 4487, 198, 6738, 7348, 79, 10045, 261, 13, 420, 70, 271, 62, 214...
2.187377
1,521
# Generated by Django 2.1.2 on 2018-10-18 15:36 from django.db import migrations, models from django.db.models import F
[ 2, 2980, 515, 416, 37770, 362, 13, 16, 13, 17, 319, 2864, 12, 940, 12, 1507, 1315, 25, 2623, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 1330, 376, 628, 198 ]
2.860465
43
import pytest
[ 11748, 12972, 9288, 628, 220, 220, 220, 220 ]
2.375
8
from splicemachine.mlflow_support import * from splicemachine.mlflow_support.mlflow_support import _GORILLA_SETTINGS import gorilla import mlflow.onnx gorilla.apply(gorilla.Patch(mlflow.onnx, _log_model.__name__.lstrip('_'), _log_model, settings=_GORILLA_SETTINGS))
[ 6738, 4328, 291, 368, 20480, 13, 76, 1652, 9319, 62, 11284, 1330, 1635, 198, 6738, 4328, 291, 368, 20480, 13, 76, 1652, 9319, 62, 11284, 13, 76, 1652, 9319, 62, 11284, 1330, 4808, 38, 1581, 8267, 32, 62, 28480, 51, 20754, 198, 11748...
2.542857
105
## Shorty ## Copyright 2009 Joshua Roesslein ## See LICENSE ## @url short.to
[ 2235, 10073, 88, 198, 2235, 15069, 3717, 20700, 5564, 408, 33663, 198, 2235, 4091, 38559, 24290, 198, 198, 2235, 2488, 6371, 1790, 13, 1462, 628 ]
3.16
25
import torch import torch.nn as nn import torch.nn.functional as F from torch.distributions import Categorical import numpy as np import gym from gym.spaces import Discrete, Box if __name__ == '__main__': import argparse parser = argparse.ArgumentParser() parser.add_argument('--env_name', '--env', type=str...
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 6738, 28034, 13, 17080, 2455, 507, 1330, 327, 2397, 12409, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 11550, 198, 673...
2.861751
217
import asynmsg import struct import google.protobuf.message
[ 11748, 355, 2047, 19662, 198, 11748, 2878, 198, 11748, 23645, 13, 11235, 672, 3046, 13, 20500, 628, 628, 628 ]
3.421053
19
import collections from thegame.abilities import Ability Vector = collections.namedtuple('Vector', ('x', 'y')) Vector.__doc__ = ''' A 2D vector. Used to represent a point and velocity in thegame ''' HeroAbility = collections.namedtuple( 'HeroAbility', ['level', 'value'] ) HeroAbilityList = collectio...
[ 11748, 17268, 198, 6738, 262, 6057, 13, 5738, 1330, 20737, 628, 198, 38469, 796, 17268, 13, 13190, 83, 29291, 10786, 38469, 3256, 19203, 87, 3256, 705, 88, 6, 4008, 198, 38469, 13, 834, 15390, 834, 796, 705, 7061, 198, 32, 362, 35, ...
2.962963
135
import os import json # import wget from flask import ( Flask, jsonify, send_from_directory, request, redirect, url_for ) from flask_sqlalchemy import SQLAlchemy import werkzeug werkzeug.cached_property = werkzeug.utils.cached_property from werkzeug.utils import secure_filename from werkzeug.mi...
[ 11748, 28686, 198, 11748, 33918, 198, 2, 1330, 266, 1136, 198, 198, 6738, 42903, 1330, 357, 198, 220, 220, 220, 46947, 11, 198, 220, 220, 220, 33918, 1958, 11, 198, 220, 220, 220, 3758, 62, 6738, 62, 34945, 11, 198, 220, 220, 220, ...
3.119382
712
# Welcome to the wonderful world of police databases: MALE = "male" FEMALE = "female"
[ 2, 19134, 284, 262, 7932, 995, 286, 1644, 20083, 25, 198, 198, 44, 21358, 796, 366, 22606, 1, 198, 37, 3620, 21358, 796, 366, 24724, 1, 198 ]
3.222222
27
from django.shortcuts import render from django.http import HttpResponse from backups_operator.servers.models import Server # Create your views here.
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 198, 198, 6738, 35872, 62, 46616, 13, 2655, 690, 13, 27530, 1330, 9652, 198, 2, 13610, 534, 5009, 994, 13 ]
3.947368
38
import argparse import sys import subprocess import psutil def insepect_process(pid): """Determine 1. is the process running in the container 2. if it's true, ourput the container id and the user :return: """ assert psutil.pid_exists(pid), "The process doesn't exist" try: result = ...
[ 11748, 1822, 29572, 198, 11748, 25064, 198, 11748, 850, 14681, 198, 11748, 26692, 22602, 198, 198, 4299, 287, 325, 806, 62, 14681, 7, 35317, 2599, 198, 220, 220, 220, 37227, 35, 2357, 3810, 198, 220, 220, 220, 352, 13, 318, 262, 1429,...
2.59325
563
ano = int(input('Digite o ano do seu carro: ')) idadecarro = 2022 - ano print('Carro novo' if idadecarro <=3 else 'Carro Velho')
[ 5733, 796, 493, 7, 15414, 10786, 19511, 578, 267, 281, 78, 466, 384, 84, 1097, 305, 25, 705, 4008, 198, 312, 671, 7718, 305, 796, 33160, 532, 281, 78, 198, 4798, 10786, 9914, 305, 645, 13038, 6, 611, 4686, 671, 7718, 305, 19841, 1...
2.509804
51
""" implements a wrapper for loading live data from the serial connection and passing it to plotting """ import serial import time import struct import plotly.express as px try: from . import log_parser except ImportError: import log_parser # TODO: clean up CLI code if __name__ == "__main__": import argpar...
[ 37811, 198, 320, 1154, 902, 257, 29908, 329, 11046, 2107, 1366, 422, 262, 11389, 4637, 290, 6427, 340, 284, 29353, 198, 37811, 198, 11748, 11389, 198, 11748, 640, 198, 11748, 2878, 198, 11748, 7110, 306, 13, 42712, 355, 279, 87, 198, ...
2.80315
254
import sys import dbops from pathlib import Path if len(sys.argv) < 2: print("Bucephalus Remove File Script") print("Usage: " + sys.argv[0] + " <identifier>") sys.exit() sys.argv.pop(0) ident = sys.argv.pop(0) if dbops.remove_record_by_id(ident) == None: print("*** Error: failed to remove record.")
[ 11748, 25064, 198, 198, 11748, 20613, 2840, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 361, 18896, 7, 17597, 13, 853, 85, 8, 1279, 362, 25, 198, 220, 3601, 7203, 33, 7234, 27451, 385, 17220, 9220, 12327, 4943, 198, 220, 3601, 7203,...
2.586777
121
import os
[ 11748, 28686, 628 ]
3.666667
3
""" """ from PyQt5 import QtWidgets, QtCore from GUI.GUI_windows_source import TranslationLanguage from json import load, dump from functools import partial import copy from scripts.stylesheets import choosen_lang_style, not_chosen_lang_style
[ 37811, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198, 37811, 198, 198, 6738, 9485, 48, 83, 20, 1330, 33734, 54...
2.657143
105
"""Map widget for Dear PyGui""" __version__ = "0.0.1"
[ 37811, 13912, 26295, 329, 23420, 9485, 8205, 72, 37811, 198, 198, 834, 9641, 834, 796, 366, 15, 13, 15, 13, 16, 1, 198 ]
2.391304
23
from flask import ( Blueprint, request)#, flash, g, redirect, render_template, get_template_attribute, url_for, jsonify # ) # from werkzeug.exceptions import abort import requests # from demosaurus.db import get_db # import pandas as pd # from nltk.metrics import distance # import re # import numpy as np bp = B...
[ 6738, 42903, 1330, 357, 198, 220, 220, 220, 220, 39932, 11, 2581, 8, 2, 11, 7644, 11, 308, 11, 18941, 11, 8543, 62, 28243, 11, 651, 62, 28243, 62, 42348, 11, 19016, 62, 1640, 11, 33918, 1958, 198, 2, 1267, 198, 2, 422, 266, 9587...
2.977941
136
from django.http import HttpResponse from django.http.response import JsonResponse from django.shortcuts import render from rest_framework.serializers import Serializer from admin import settings import requests from rest_framework import viewsets from time import gmtime, strftime from Kusa.models import SteamUser from...
[ 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 198, 6738, 42625, 14208, 13, 4023, 13, 26209, 1330, 449, 1559, 31077, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 1334, 62, 30604, 13, 46911, 11341, 1330, 23283,...
2.914685
715
import os from redis import StrictRedis
[ 11748, 28686, 201, 198, 6738, 2266, 271, 1330, 520, 2012, 7738, 271, 201, 198, 201, 198, 201, 198 ]
2.555556
18
""" Generative language models. Classes ------- SMILESEncoderDecoder A generative recurrent neural network to encode-decode SMILES strings. SMILESEncoderDecoderFineTuner The fine-tuner of SMILESEncoderDecoder model. """ __all__ = ( 'SMILESEncoderDecoder', 'SMILESEncoderDecoderFineTuner', ) import jso...
[ 37811, 198, 8645, 876, 3303, 4981, 13, 198, 198, 9487, 274, 198, 26866, 198, 12310, 4146, 1546, 27195, 12342, 10707, 12342, 198, 220, 220, 220, 317, 1152, 876, 42465, 17019, 3127, 284, 37773, 12, 12501, 1098, 9447, 4146, 1546, 13042, 13...
2.983333
180
from grappa import GrappaExperiment, MPIRunGrappaExperiment tpch_bigdatann = MPIRunGrappaExperiment({ 'trial': range(1, 3 + 1), #'qn': [x for x in range(8, 20 + 1) if x!=7 and x!=9 and x!=8 and x!=10 and x!=11], # exclude 7 that runs forever ...
[ 6738, 21338, 64, 1330, 7037, 44989, 20468, 3681, 11, 4904, 4663, 403, 46971, 44989, 20468, 3681, 198, 198, 34788, 354, 62, 14261, 19608, 1236, 796, 4904, 4663, 403, 46971, 44989, 20468, 3681, 15090, 198, 220, 220, 220, 220, 220, 220, 22...
1.467541
1,602
import numpy as np from scipy.special import softmax np.set_printoptions(precision=6) if __name__ == "__main__": x = np.array([[1, 4.2, 0.6, 1.23, 4.3, 1.2, 2.5]]) print("Input Array: ", x) print("Softmax Array: ", k_softmax(x)) print("Softmax Array: ", softmax(x))
[ 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 13, 20887, 1330, 2705, 9806, 198, 198, 37659, 13, 2617, 62, 4798, 25811, 7, 3866, 16005, 28, 21, 8, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198,...
2.251969
127
import tensorflow as tf from tensorflow.keras.layers import Conv2D, ReLU, SeparableConv2D, Input, SpatialDropout2D, MaxPool2D, Concatenate, Conv2DTranspose, BatchNormalization from tensorflow.keras.regularizers import l1, l2 from models.net import Net from layers.kerasGroupNorm import GroupNormalization
[ 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 11192, 273, 11125, 13, 6122, 292, 13, 75, 6962, 1330, 34872, 17, 35, 11, 797, 41596, 11, 8621, 283, 540, 3103, 85, 17, 35, 11, 23412, 11, 1338, 34961, 26932, 448, 17, 35, 11, 5436, ...
3.080808
99
"""PostDB class definition. PostDB encapsualte interactions (lookup, scan, insert) with the posts table. Typical usage example: from post import Post from post_db import PostDB post_db = PostDB(mode = "dev") post = Post( post_url = "https://www.example.com/", title = "Test", main_image...
[ 37811, 6307, 11012, 1398, 6770, 13, 628, 220, 2947, 11012, 32652, 723, 660, 12213, 357, 5460, 929, 11, 9367, 11, 7550, 8, 351, 262, 6851, 3084, 13, 628, 220, 48752, 8748, 1672, 25, 628, 220, 422, 1281, 1330, 2947, 198, 220, 422, 128...
2.951456
206
# coding: utf-8 from slackbot.bot import respond_to from slacker import Slacker import slackbot_settings # @respond_to("") # @respond_to("") # def cheer(message): # message.reply("") import MeCab import random import ChatBotScript import SentenceGenerator import datetime import webbrowser import time import sys ...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 6738, 30740, 13645, 13, 13645, 1330, 3031, 62, 1462, 198, 6738, 1017, 10735, 1330, 3454, 10735, 198, 11748, 30740, 13645, 62, 33692, 198, 198, 2, 2488, 5546, 62, 1462, 7203, 4943, 198, 2, 24...
2.691057
369
#!/usr/bin/env python3 # -*- coding: UTF-8 -*- # ----------------------------------------------------------------------------- # # P A G E B O T # # Copyright (c) 2016+ Buro Petr van Blokland + Claudia Mens # www.pagebot.io # Licensed under MIT conditions # # Supporting DrawBot, www.drawbot.com # ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 198, 2, 16529, 32501, 198, 2, 198, 2, 220, 220, 220, 220, 350, 317, 402, 412, 347, 440, 309, 198, 2, 198, 2, 220, 220...
3.038251
183
from PIL import Image import streamlit as st from streamlit_drawable_canvas import st_canvas from Streamlit_Pix2Pix_Generator import Generator import numpy as np import urllib.request from keras.preprocessing.image import load_img from keras.models import load_model import requests # Page intro st.title('Pix2Pix See ...
[ 6738, 350, 4146, 1330, 7412, 198, 11748, 4269, 18250, 355, 336, 198, 6738, 4269, 18250, 62, 19334, 540, 62, 5171, 11017, 1330, 336, 62, 5171, 11017, 198, 6738, 13860, 18250, 62, 47, 844, 17, 47, 844, 62, 8645, 1352, 1330, 35986, 198, ...
2.95611
2,005
""" The MIT License (MIT) Copyright (c) 2017 SML 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 use, copy, modify, merge, publish,...
[ 37811, 198, 464, 17168, 13789, 357, 36393, 8, 198, 198, 15269, 357, 66, 8, 2177, 311, 5805, 198, 198, 5990, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 198, 30073, 286, 428, 3788, 290, 3917, 10314, 3...
3.03172
599
""" .. module:: test_iterfunction :synopsis: Unit tests for iterfunction module """ import time import nutsflow.iterfunction as itf from six.moves import range
[ 37811, 198, 492, 8265, 3712, 1332, 62, 2676, 8818, 198, 220, 220, 1058, 28869, 24608, 25, 11801, 5254, 329, 11629, 8818, 8265, 198, 37811, 198, 198, 11748, 640, 198, 11748, 14380, 11125, 13, 2676, 8818, 355, 340, 69, 198, 198, 6738, 2...
3.254545
55
""" Alias convention tests. """ from io import BytesIO from json import loads from uuid import uuid4 from hamcrest import ( all_of, anything, assert_that, contains, equal_to, has_entries, has_entry, has_item, has_key, is_, is_not, ) from marshmallow import Schema, fields fr...
[ 37811, 198, 40489, 9831, 5254, 13, 198, 198, 37811, 198, 6738, 33245, 1330, 2750, 4879, 9399, 198, 6738, 33918, 1330, 15989, 198, 6738, 334, 27112, 1330, 334, 27112, 19, 198, 198, 6738, 8891, 66, 2118, 1330, 357, 198, 220, 220, 220, 4...
2.950943
265
''' molecool.io package configure access to subpackage functions ''' from .pdb import open_pdb from .xyz import open_xyz, write_xyz
[ 7061, 6, 198, 76, 2305, 24494, 13, 952, 5301, 198, 198, 11250, 495, 1895, 284, 850, 26495, 5499, 198, 7061, 6, 198, 198, 6738, 764, 79, 9945, 1330, 1280, 62, 79, 9945, 198, 6738, 764, 5431, 89, 1330, 1280, 62, 5431, 89, 11, 3551, ...
2.8125
48
#!/usr/bin/env python import sys import json from flatten_dict import flatten as _flatten try: data = json.load(sys.stdin)['object'] except Exception as ex: print("Missing or invalid test data:", ex) sys.exit(1) try: results = json.load(open(sys.argv[1], "r"))['results'] except Exception as ex: p...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 25064, 198, 11748, 33918, 198, 6738, 27172, 268, 62, 11600, 1330, 27172, 268, 355, 4808, 2704, 41769, 198, 198, 28311, 25, 198, 220, 220, 220, 1366, 796, 33918, 13, 2220, 7...
2.17765
349
__all__ = [ 'make_aio_client', 'make_sync_client', 'TAsyncHTTPXClient', 'THTTPXClient', ] from .aio import TAsyncHTTPXClient, make_client as make_aio_client from .sync import THTTPXClient, make_client as make_sync_client from ._version import get_versions __version__ = get_versions()['version'] del ge...
[ 834, 439, 834, 796, 685, 198, 220, 220, 220, 705, 15883, 62, 64, 952, 62, 16366, 3256, 198, 220, 220, 220, 705, 15883, 62, 27261, 62, 16366, 3256, 198, 220, 220, 220, 705, 51, 42367, 40717, 55, 11792, 3256, 198, 220, 220, 220, 705...
2.713115
122
import sys import random from kalc.model.system.base import ModularKind from typing import Set from kalc.model.system.primitives import Label, StatusNode from kalc.model.system.base import HasLabel from kalc.misc.util import cpuConvertToAbstractProblem, memConvertToAbstractProblem from kalc.misc.const import STATUS_NOD...
[ 11748, 25064, 198, 11748, 4738, 198, 6738, 479, 282, 66, 13, 19849, 13, 10057, 13, 8692, 1330, 3401, 934, 35854, 198, 6738, 19720, 1330, 5345, 198, 6738, 479, 282, 66, 13, 19849, 13, 10057, 13, 19795, 20288, 1330, 36052, 11, 12678, 19...
2.869955
223
from Module import AbstractModule def read_fastqc_results(fastqc_path): import os from genomicode import filelib summary_file = os.path.join(fastqc_path, "summary.txt") data_file = os.path.join(fastqc_path, "fastqc_data.txt") filelib.assert_exists_nz(summary_file) filelib.assert_exists_nz(da...
[ 6738, 19937, 1330, 27741, 26796, 628, 198, 198, 4299, 1100, 62, 7217, 80, 66, 62, 43420, 7, 7217, 80, 66, 62, 6978, 2599, 198, 220, 220, 220, 1330, 28686, 198, 220, 220, 220, 422, 45752, 1098, 1330, 2393, 8019, 628, 220, 220, 220, ...
2.316401
1,378
# noinspection PyUnresolvedReferences import propnet.symbols from propnet.models import serialized, python, composite from propnet.core.registry import Registry # This is just to enable importing the model directly from this module for example code generation _update_globals()
[ 2, 645, 1040, 14978, 9485, 3118, 411, 5634, 19927, 198, 11748, 2632, 3262, 13, 1837, 2022, 10220, 198, 6738, 2632, 3262, 13, 27530, 1330, 11389, 1143, 11, 21015, 11, 24185, 198, 6738, 2632, 3262, 13, 7295, 13, 2301, 4592, 1330, 33432, ...
3.985915
71
import csv import re regex = re.compile('[^a-zA-Z]') if __name__ == '__main__': for user in ['katyperry', 'TheEllenShow', 'YouTube', 'realDonaldTrump', 'BillGates', 'nytimes', 'CNN', 'espn', 'NASA', 'aliciakeys']: clean_dataset(user)
[ 201, 198, 11748, 269, 21370, 201, 198, 11748, 302, 201, 198, 201, 198, 260, 25636, 796, 302, 13, 5589, 576, 10786, 58, 61, 64, 12, 89, 32, 12, 57, 60, 11537, 201, 198, 201, 198, 201, 198, 201, 198, 361, 11593, 3672, 834, 6624, 7...
2.028986
138
#!/usr/bin/python import sys import os from nltk.tokenize import TreebankWordTokenizer as Tokenizer from nltk.tag.perceptron import PerceptronTagger import operator from itertools import chain import nltk from sklearn.metrics import classification_report, confusion_matrix from sklearn.preprocessing import LabelBinariz...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 220, 198, 11748, 25064, 198, 11748, 28686, 198, 6738, 299, 2528, 74, 13, 30001, 1096, 1330, 12200, 17796, 26449, 30642, 7509, 355, 29130, 7509, 198, 6738, 299, 2528, 74, 13, 12985, 13, 525, 984, 1...
1.673804
2,802
#!/Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5 import math import torch.nn as nn import torch from .GDN import GDN from .attention import Attention # class Analysis_transform(nn.Module): # def __init__(self, num_filters=128): # super(Analysis_transform, self).__init__() # self.co...
[ 2, 48443, 23377, 14, 42026, 14, 37906, 13, 30604, 14, 45150, 14, 18, 13, 20, 14, 8800, 14, 29412, 18, 13, 20, 198, 11748, 10688, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 198, 6738, 764, 38, 35504, 1330, 27044, ...
1.67788
1,962
# -*- encoding: utf-8 -*- from app import db
[ 2, 532, 9, 12, 21004, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 598, 1330, 20613, 628 ]
2.35
20
# -*- coding: utf-8 -*- from src.utils.get_data import load_data from src.utils.get_data import get_datasets from src.utils.get_data import concatenate_datasets from src.utils.dataset_balancer import balance_data import os import pandas as pd import unittest if __name__ == "__main__": unittest.ma...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 12351, 13, 26791, 13, 1136, 62, 7890, 1330, 3440, 62, 7890, 198, 6738, 12351, 13, 26791, 13, 1136, 62, 7890, 1330, 651, 62, 19608, 292, 1039, 198, 6738, 123...
2.195122
164
# # Yinhao Zhu, May 01, 2017 # """ Sparse GP regression, including variational GP and others. """ from __future__ import absolute_import import torch import numpy as np from torch.utils.data import TensorDataset, DataLoader from torch.distributions.transforms import LowerCholeskyTransform from ..model import Param f...
[ 2, 198, 2, 37201, 23778, 33144, 11, 1737, 5534, 11, 2177, 198, 2, 198, 37811, 198, 50, 29572, 14714, 20683, 11, 1390, 5553, 864, 14714, 290, 1854, 13, 198, 37811, 198, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 1...
3.172897
214
list1 = ['physics', 'chemistry', 1997, 2000] list2 = [1, 2, 3, 4, 5 ] list3 = ["a", "b", "c", "d"] print list1, list2, list3 # # print "list1[0]: ", list1[0] print "list2[1:5]: ", list2[1:5] # # append() list = [] ## list.append('Google') ## append() list.append('Python') print list # # de...
[ 4868, 16, 796, 37250, 746, 23154, 3256, 705, 15245, 4592, 3256, 8309, 11, 4751, 60, 198, 4868, 17, 796, 685, 16, 11, 362, 11, 513, 11, 604, 11, 642, 2361, 198, 4868, 18, 796, 14631, 64, 1600, 366, 65, 1600, 366, 66, 1600, 366, 6...
2.130973
565
import tkinter as tk import tkinter.font as tf from tkinter import ttk from tkinter import messagebox from tkinter.filedialog import askopenfilename, askdirectory import time import threading from functools import wraps from xyw_macro.utils import SingletonType from xyw_macro.contants import SLEEP_TIME class Inpu...
[ 11748, 256, 74, 3849, 355, 256, 74, 198, 11748, 256, 74, 3849, 13, 10331, 355, 48700, 198, 6738, 256, 74, 3849, 1330, 256, 30488, 198, 6738, 256, 74, 3849, 1330, 3275, 3524, 198, 6738, 256, 74, 3849, 13, 69, 3902, 498, 519, 1330, ...
2.206391
751
""" Utilities for testing """ import os import json TESTDATADIR = os.path.join(os.path.dirname(__file__), 'testdata') def get_pass(pass_name : str) -> str: """ Returns pass from test_credentials.json """ creds_path = os.path.join(os.path.dirname(__file__), 'test_credentials.json') with open(creds_path,...
[ 198, 37811, 41086, 329, 4856, 37227, 198, 198, 11748, 28686, 198, 11748, 33918, 198, 198, 51, 6465, 35, 1404, 2885, 4663, 796, 28686, 13, 6978, 13, 22179, 7, 418, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 828, 705, 9288, 7890, 1...
2.374016
508
from ballistics.collision.dispatch.config import DefaultCollisionConfiguration from ballistics.collision.dispatch.dispatcher import CollisionDispatcher
[ 6738, 2613, 3969, 13, 26000, 1166, 13, 6381, 17147, 13, 11250, 1330, 15161, 22667, 1166, 38149, 198, 6738, 2613, 3969, 13, 26000, 1166, 13, 6381, 17147, 13, 6381, 8071, 2044, 1330, 7778, 1166, 7279, 8071, 2044, 198 ]
4.108108
37
import os from webdriver_manager.driver import ChromeDriver from webdriver_manager.manager import DriverManager from webdriver_manager import utils
[ 11748, 28686, 198, 6738, 3992, 26230, 62, 37153, 13, 26230, 1330, 13282, 32103, 198, 6738, 3992, 26230, 62, 37153, 13, 37153, 1330, 12434, 13511, 198, 6738, 3992, 26230, 62, 37153, 1330, 3384, 4487, 628 ]
4.382353
34
from data_importers.management.commands import BaseDemocracyCountsCsvImporter
[ 6738, 1366, 62, 320, 1819, 1010, 13, 27604, 13, 9503, 1746, 1330, 7308, 11522, 17818, 12332, 82, 34, 21370, 3546, 26634, 628 ]
3.590909
22
MOVIE1 = { "title": "Guardians of the Galaxy", "year": 2014, "ids": { "trakt": 28, "slug": "guardians-of-the-galaxy-2014", "imdb": "tt2015381", "tmdb": 118340, }, } MOVIE2 = { "title": "Guardians of the Galaxy", "year": 2014, "ids": { "trakt": 28, ...
[ 44, 8874, 10008, 16, 796, 1391, 198, 220, 220, 220, 366, 7839, 1298, 366, 24502, 1547, 286, 262, 9252, 1600, 198, 220, 220, 220, 366, 1941, 1298, 1946, 11, 198, 220, 220, 220, 366, 2340, 1298, 1391, 198, 220, 220, 220, 220, 220, 2...
2.001868
1,606
# coding=utf-8 # -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -----------------------------------------------------...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 16529, 1783, 10541, 198, 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 17168, 13789, 13, 4091, 13789, 13, 14116, 287, 262, 1628, 6808, 329, 5964, 1321, ...
3.308411
535
import json import time import uuid from installed_clients.DataFileUtilClient import DataFileUtil from installed_clients.KBaseReportClient import KBaseReport from installed_clients.WorkspaceClient import Workspace as Workspace def log(message, prefix_newline=False): """Logging function, provides a hook to suppre...
[ 11748, 33918, 198, 11748, 640, 198, 11748, 334, 27112, 198, 198, 6738, 6589, 62, 565, 2334, 13, 6601, 8979, 18274, 346, 11792, 1330, 6060, 8979, 18274, 346, 198, 6738, 6589, 62, 565, 2334, 13, 42, 14881, 19100, 11792, 1330, 14204, 589, ...
3.316176
136
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import tensorflow as tf def to_tf_tensor(ndarray, dtype = tf.float64): '''Converts the given multidimensional array to a tensorflow tensor. Args: ndarray (ndarray-like): parameter for conversion. dtype (type, optional)...
[ 2, 15069, 357, 66, 8, 5413, 10501, 13, 198, 2, 49962, 739, 262, 17168, 5964, 13, 198, 198, 11748, 11192, 273, 11125, 355, 48700, 628, 198, 198, 4299, 284, 62, 27110, 62, 83, 22854, 7, 358, 18747, 11, 288, 4906, 796, 48700, 13, 224...
2.539394
330
# this file describe sets data structures on python thisSet={"Car","Bike","Truk"} # Printing sets on terminal print(thisSet)
[ 2, 428, 2393, 6901, 5621, 1366, 8573, 319, 21015, 220, 198, 198, 5661, 7248, 28, 4895, 9914, 2430, 33, 522, 2430, 51, 622, 74, 20662, 198, 198, 2, 44118, 5621, 319, 12094, 198, 4798, 7, 5661, 7248, 8 ]
3.342105
38
from multiprocessing import Pool import logging
[ 6738, 18540, 305, 919, 278, 1330, 19850, 198, 11748, 18931, 628, 198 ]
4.166667
12
import os import yaml from HTMLScriptExtractor import HTMLScriptExtractor MIME_TYPE_MAP = { '.htm': 'text/html', '.html': 'text/html', '.js': 'text/javascript', '.vbs': 'text/vbscript', '.txt': 'text/plain', '.jpg': 'image/jpeg', '.jpeg': 'image/jpeg' } # input: # a function "mime_ty...
[ 11748, 28686, 198, 198, 11748, 331, 43695, 198, 198, 6738, 11532, 7391, 11627, 40450, 1330, 11532, 7391, 11627, 40450, 628, 198, 44, 12789, 62, 25216, 62, 33767, 796, 1391, 198, 220, 220, 220, 45302, 19211, 10354, 705, 5239, 14, 6494, 3...
3.115385
442
from rapidtest import Test, Case, TreeNode from solutions.lowest_common_ancestor_of_a_binary_search_tree import Solution with Test(Solution, post_proc=TreeNode.get_val) as test: root = TreeNode.from_iterable([6, 2, 8, 0, 4, 7, 9, None, None, 3, 5]) Case(root, TreeNode(2), TreeNode(4), result=TreeNode(2)) C...
[ 6738, 5801, 9288, 1330, 6208, 11, 8913, 11, 12200, 19667, 198, 6738, 8136, 13, 9319, 395, 62, 11321, 62, 1192, 395, 273, 62, 1659, 62, 64, 62, 39491, 62, 12947, 62, 21048, 1330, 28186, 198, 198, 4480, 6208, 7, 46344, 11, 1281, 62, ...
2.519022
368
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: npu_utilization.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.prot...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 262, 8435, 11876, 17050, 13, 220, 8410, 5626, 48483, 0, 198, 2, 2723, 25, 299, 19944, 62, 22602, 1634, 13, 1676, 1462, 198, 198, 11748, 25064, 198, ...
2.410169
5,015
from annotatelib.models import ( models, class_from_filename, table_name_from_filename, _get_column_description_from_object, _get_indices_description_from_oject ) import sqlite3 from orator import DatabaseManager import os import sys sys.path.insert(0, os.path.abspath( os.path.join(os.path.dirname(__fil...
[ 6738, 24708, 378, 8019, 13, 27530, 1330, 357, 198, 220, 220, 220, 4981, 11, 1398, 62, 6738, 62, 34345, 11, 198, 220, 220, 220, 3084, 62, 3672, 62, 6738, 62, 34345, 11, 4808, 1136, 62, 28665, 62, 11213, 62, 6738, 62, 15252, 11, 198...
2.730159
126
__version__ = '0.0.1' def flatten_list(input_list): """ Flattens list with many nested lists. >>> flatten_list([1, [2, [3], [4]]]) [1, 2, 3, 4] """ result = [] for item in input_list: if isinstance(item, list): result.extend(flatten_list(item)) # yield from...
[ 834, 9641, 834, 796, 705, 15, 13, 15, 13, 16, 6, 628, 198, 4299, 27172, 268, 62, 4868, 7, 15414, 62, 4868, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1610, 1078, 641, 1351, 351, 867, 28376, 8341, 13, 628, 220, 220, 220...
2.037915
211
import os import keyring from prompt_toolkit import prompt KEY = ('slackcast', 'token') SLACKCAST_INSTALL_URL = os.environ.get( 'SLACKCAST_INSTALL_URL', 'https://slackcast.devtestit.com/install' )
[ 11748, 28686, 198, 11748, 1994, 1806, 198, 6738, 6152, 62, 25981, 15813, 1330, 6152, 198, 198, 20373, 796, 19203, 6649, 441, 2701, 3256, 705, 30001, 11537, 198, 8634, 8120, 44647, 62, 38604, 7036, 62, 21886, 796, 28686, 13, 268, 2268, 1...
2.684211
76
import progressbar from baidupcsapi import PCS pcs = PCS('username','password') test_file = open('bigfile.pdf','rb').read() ret = pcs.upload('/',test_file,'bigfile.pdf',callback=ProgressBar())
[ 11748, 4371, 5657, 198, 6738, 275, 1698, 929, 6359, 15042, 1330, 4217, 50, 628, 198, 79, 6359, 796, 4217, 50, 10786, 29460, 41707, 28712, 11537, 198, 9288, 62, 7753, 796, 1280, 10786, 14261, 7753, 13, 12315, 41707, 26145, 27691, 961, 34...
2.954545
66
""" messages """ from .color import ENDC, FAIL, OKBLUE, YELLOW EXE_SCRIPT_ERR_MSG = '{0}[!]{1} An error occurred while executing script in Pipfile'.format( FAIL, ENDC ) KEYWORD_NOT_FOUND_MSG = "{0}[!]{1} {2}Pipfile{1} in {3}[scripts]{1} keyword not found!".format( FAIL, ENDC, OKBLUE, YELLOW ) FILE_NOT_FOUND_MS...
[ 37811, 198, 37348, 1095, 198, 37811, 198, 6738, 764, 8043, 1330, 23578, 34, 11, 9677, 4146, 11, 7477, 9148, 8924, 11, 575, 23304, 3913, 198, 198, 6369, 36, 62, 6173, 46023, 62, 1137, 49, 62, 5653, 38, 796, 705, 90, 15, 92, 58, 364...
2.181452
248
import sys import logging import pymysql import json import os #rds settings - Lambda role must have RDS access rds_host = os.environ['RDS_HOST'] # Set in Lambda Dashboard name = os.environ['DB_USERNAME'] password = os.environ['DB_PW'] db_name = os.environ['DB_NAME'] db_table = os.environ['DB_TABLE'] logger = loggin...
[ 11748, 25064, 198, 11748, 18931, 198, 11748, 279, 4948, 893, 13976, 198, 11748, 33918, 198, 11748, 28686, 198, 198, 2, 4372, 82, 6460, 532, 21114, 6814, 2597, 1276, 423, 371, 5258, 1895, 198, 4372, 82, 62, 4774, 796, 28686, 13, 268, 2...
2.428571
504
# Generated by Django 2.1.5 on 2019-03-29 05:54 import datetime from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 16, 13, 20, 319, 13130, 12, 3070, 12, 1959, 8870, 25, 4051, 198, 198, 11748, 4818, 8079, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.972222
36
from django import forms from .models import Doacao
[ 6738, 42625, 14208, 1330, 5107, 201, 198, 6738, 764, 27530, 1330, 2141, 330, 5488, 201, 198 ]
3.375
16
import requests from elasticsearch import Elasticsearch, client from elasticsearch.exceptions import RequestError es = Elasticsearch() # retrieve all QIDs from the populated reframe ES index body = { "_source": { "includes": ["qid"], }, "query": { "query_string": { "query": "...
[ 11748, 7007, 198, 198, 6738, 27468, 12947, 1330, 48567, 12947, 11, 5456, 198, 6738, 27468, 12947, 13, 1069, 11755, 1330, 19390, 12331, 198, 274, 796, 48567, 12947, 3419, 628, 198, 2, 19818, 477, 1195, 47954, 422, 262, 22331, 1006, 28073, ...
2.219766
769
from django.core.paginator import Paginator, PageNotAnInteger, EmptyPage from django.urls import reverse_lazy from django.views.generic import (ListView, CreateView, TemplateView, ) from django.views.generic.detail import DetailView from django.views.generic.edit import (UpdateView, DeleteView, ) from blog.models impo...
[ 6738, 42625, 14208, 13, 7295, 13, 79, 363, 20900, 1330, 31525, 20900, 11, 7873, 3673, 2025, 46541, 11, 33523, 9876, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 62, 75, 12582, 198, 6738, 42625, 14208, 13, 33571, 13, 41357, 1330, ...
2.329571
443
""" Copyright (c) 2012 Wyss Institute at Harvard University 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 use, copy, modify, merge...
[ 37811, 198, 15269, 357, 66, 8, 2321, 12958, 824, 5136, 379, 11131, 2059, 198, 198, 5990, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 198, 1659, 428, 3788, 290, 3917, 10314, 3696, 357, 1169, 366, ...
3.333333
603
# BSD LICENSE # # Copyright(c) 2010-2014 Intel Corporation. All rights reserved. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copy...
[ 2, 347, 10305, 38559, 24290, 198, 2, 198, 2, 15069, 7, 66, 8, 3050, 12, 4967, 8180, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 2297, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, 11, 351...
3.238095
630
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_dj-pylti ------------ Tests for `dj-pylti` models module. """ from django.test import TestCase from dj_pylti import models
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 9288, 62, 28241, 12, 9078, 2528, 72, 198, 10541, 198, 198, 51, 3558, 329, 4600, 28241, 12, 9078, 252...
2.506849
73
"""Mutation. Usage: mutation play [--verbose] [--exclude=<globs>] [--only-deadcode-detection] [--include=<globs>] [--sampling=<s>] [--randomly-seed=<n>] [--max-workers=<n>] [<file-or-directory> ...] [-- TEST-COMMAND ...] mutation replay [--verbose] [--max-workers=<n>] mutation list mutation show MUTATION mut...
[ 37811, 44, 7094, 13, 198, 198, 28350, 25, 198, 220, 15148, 711, 685, 438, 19011, 577, 60, 685, 438, 1069, 9152, 28, 27, 4743, 8158, 37981, 685, 438, 8807, 12, 25124, 8189, 12, 15255, 3213, 60, 685, 438, 17256, 28, 27, 4743, 8158, ...
2.224036
4,410
import argparse from ColorDetector import ColorDetector if __name__ == "__main__": main()
[ 11748, 1822, 29572, 198, 6738, 5315, 11242, 9250, 1330, 5315, 11242, 9250, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1388, 3419, 198 ]
3.096774
31
print('===== DESAFIO 64 =====') num = 0 cont = 0 soma = 0 num = int(input('Digite um nmero [999 para SAIR]: ')) while num != 999: soma += num cont += 1 num = int(input('Digite um nmero [999 para SAIR]: ')) print(f'Voc digitou {cont} nmeros! A soma entre eles {soma}')
[ 4798, 10786, 1421, 28, 22196, 8579, 9399, 5598, 29335, 11537, 198, 22510, 796, 657, 198, 3642, 796, 657, 198, 82, 6086, 796, 657, 198, 22510, 796, 493, 7, 15414, 10786, 19511, 578, 23781, 299, 647, 78, 685, 17032, 31215, 14719, 4663, ...
2.361345
119