content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
#Isaiah Lawlor - Lab Two # Strings # assigned outputs to 'speak' when input is inserted by user name = "Isaiah Lawlor" # Integers # This is a numeric value that is assigned as the particular output for a command inserted by the user age = 21 # Floats # another numeric value that has is represented with a decimal pla...
[ 2, 39443, 9520, 3854, 4685, 532, 3498, 4930, 198, 2, 4285, 654, 198, 2, 8686, 23862, 284, 705, 47350, 6, 618, 5128, 318, 18846, 416, 2836, 198, 3672, 796, 366, 39443, 9520, 3854, 4685, 1, 198, 198, 2, 15995, 364, 198, 2, 770, 318,...
2.996923
325
import os import sys import json import pathlib import argparse import getpass from services import registry config_template = { "DAEMON_LISTENING_PORT": None, "ETHEREUM_JSON_RPC_ENDPOINT": "https://kovan.infura.io/", "AGENT_CONTRACT_ADDRESS": None, "PASSTHROUGH_ENDPOINT": None, "PASSTHROUGH_ENA...
[ 11748, 28686, 198, 11748, 25064, 198, 198, 11748, 33918, 198, 11748, 3108, 8019, 198, 11748, 1822, 29572, 198, 11748, 651, 6603, 628, 198, 6738, 2594, 1330, 20478, 198, 198, 11250, 62, 28243, 796, 1391, 198, 220, 220, 220, 366, 5631, 36...
2.012407
403
from flask import Blueprint from flask_login import login_required from flask_restplus import Api resources_api = Blueprint('api.resources', __name__) @resources_api.before_request # login nécessaire pour tout le blueprint @login_required api = Api(resources_api) from . import routes
[ 6738, 42903, 1330, 39932, 198, 6738, 42903, 62, 38235, 1330, 17594, 62, 35827, 198, 6738, 42903, 62, 2118, 9541, 1330, 5949, 72, 198, 198, 37540, 62, 15042, 796, 39932, 10786, 15042, 13, 37540, 3256, 11593, 3672, 834, 8, 198, 198, 31, ...
3.406977
86
import logging import typing import torch import torch.nn as nn import torch.nn.functional as F from .modeling_utils import ProteinConfig from .modeling_utils import ProteinModel from .modeling_utils import ValuePredictionHead from .modeling_utils import SequenceClassificationHead from .modeling_utils import SequenceT...
[ 11748, 18931, 198, 11748, 19720, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 198, 6738, 764, 4666, 10809, 62, 26791, 1330, 31702, 16934, 198, 6738, 764, 4666, 10...
3.407407
270
from .Item import * for id in range(0, 16): handler.register(Concret) handler.register(ConcretPowder)
[ 6738, 764, 7449, 1330, 1635, 198, 198, 1640, 4686, 287, 2837, 7, 15, 11, 1467, 2599, 628, 220, 220, 220, 21360, 13, 30238, 7, 3103, 66, 1186, 8, 628, 220, 220, 220, 21360, 13, 30238, 7, 3103, 66, 1186, 47, 34656, 8, 198 ]
2.627907
43
# lextab.py. This file automatically created by PLY (version 3.11). Don't edit! _tabversion = '3.10' _lextokens = set(('ABBREV_AXIS_AT', 'ABBREV_PATH_SEP', 'ABBREV_STEP_PARENT', 'ABBREV_STEP_SELF', 'AND_OP', 'AXISNAME', 'AXIS_SEP', 'CLOSE_BRACKET', 'CLOSE_PAREN', 'COLON', 'COMMA', 'DIV_OP', 'DOLLAR', 'EQUAL_OP', '...
[ 2, 443, 742, 397, 13, 9078, 13, 770, 2393, 6338, 2727, 416, 9297, 56, 357, 9641, 513, 13, 1157, 737, 2094, 470, 4370, 0, 198, 62, 8658, 9641, 220, 220, 796, 705, 18, 13, 940, 6, 198, 62, 293, 742, 482, 641, 220, 220, 220, 796,...
1.780635
1,322
import logging #from ..shared_code import database import azure.functions as func import csv import os
[ 11748, 18931, 201, 198, 2, 6738, 11485, 28710, 62, 8189, 1330, 6831, 201, 198, 11748, 35560, 495, 13, 12543, 2733, 355, 25439, 201, 198, 11748, 269, 21370, 201, 198, 11748, 28686, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198 ]
2.829268
41
# color_setup.py Customise for your hardware config # Released under the MIT License (MIT). See LICENSE. # Copyright (c) 2020 Peter Hinch # As written, supports: # Adafruit 1.5" 128*128 OLED display: https://www.adafruit.com/product/1431 # Adafruit 1.27" 128*96 display https://www.adafruit.com/product/1673 # Edit the...
[ 2, 3124, 62, 40406, 13, 9078, 8562, 786, 329, 534, 6890, 4566, 198, 198, 2, 28728, 739, 262, 17168, 13789, 357, 36393, 737, 4091, 38559, 24290, 13, 198, 2, 15069, 357, 66, 8, 12131, 5613, 367, 8589, 198, 198, 2, 1081, 3194, 11, 69...
2.7833
503
''' Created on Aug 5, 2020 @author: Jeff ''' import PyQt5 from PyQt5 import QtCore, QtGui, QtWidgets import datetime import pyperclip #Fixes scaling issues on high res monitors if hasattr(QtCore.Qt, 'AA_EnableHighDpiScaling'): PyQt5.QtWidgets.QApplication.setAttribute(QtCore.Qt.AA_EnableHighDpiScaling, True) if ...
[ 7061, 6, 198, 41972, 319, 2447, 642, 11, 12131, 198, 198, 31, 9800, 25, 5502, 198, 7061, 6, 198, 11748, 9485, 48, 83, 20, 198, 6738, 9485, 48, 83, 20, 1330, 33734, 14055, 11, 33734, 8205, 72, 11, 33734, 54, 312, 11407, 198, 11748,...
2.306667
225
from captcha.models import CaptchaStore from captcha.helpers import captcha_image_url from django.http import JsonResponse from django.shortcuts import redirect from django.utils import timezone from django.views.generic import TemplateView, View from .forms import CommentForm
[ 6738, 48972, 13, 27530, 1330, 6790, 11693, 22658, 198, 6738, 48972, 13, 16794, 364, 1330, 48972, 62, 9060, 62, 6371, 198, 6738, 42625, 14208, 13, 4023, 1330, 449, 1559, 31077, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 18941, 198, ...
3.957746
71
from .rest import RestClient class Organizations(object): """Auth0 organizations endpoints Args: domain (str): Your Auth0 domain, e.g: 'username.auth0.com' token (str): Management API v2 Token telemetry (bool, optional): Enable or disable Telemetry (defaults to True) ...
[ 6738, 764, 2118, 1330, 8324, 11792, 628, 198, 4871, 41846, 7, 15252, 2599, 198, 220, 220, 220, 37227, 30515, 15, 5745, 886, 13033, 628, 220, 220, 220, 943, 14542, 25, 198, 220, 220, 220, 220, 220, 220, 220, 7386, 357, 2536, 2599, 34...
2.506702
4,476
#!/usr/bin/env python # Copyright (c) 2018 NVIDIA Corporation. All rights reserved. # This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. # https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode """ This file starts a ROS node to run DOPE, listening to ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 15069, 357, 66, 8, 2864, 15127, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 770, 670, 318, 11971, 739, 257, 17404, 13815, 45336, 12, 15419, 48401, 12, 11649, 32, 2339, 604, 13,...
3.296196
368
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2002-2009 Zuza Software Foundation # # This file is part of the Translate Toolkit. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; e...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 6244, 12, 10531, 1168, 84, 4496, 10442, 5693, 198, 2, 198, 2, 770, 2393, 318, 636, 286, 262, 3602...
2.250328
6,104
#!/usr/bin/env python # # spyne - Copyright (C) Spyne contributors. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later ve...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 2, 13997, 710, 532, 15069, 357, 34, 8, 23688, 710, 20420, 13, 198, 2, 198, 2, 770, 5888, 318, 1479, 3788, 26, 345, 460, 17678, 4163, 340, 290, 14, 273, 198, 2, 13096, 340...
3.572474
683
import os import json size_factors = [3, 5, 7, 9, 15, 18, 21, 24] if __name__ == "__main__": main()
[ 11748, 28686, 198, 11748, 33918, 198, 198, 7857, 62, 22584, 669, 796, 685, 18, 11, 642, 11, 767, 11, 860, 11, 1315, 11, 1248, 11, 2310, 11, 1987, 60, 628, 628, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198...
2.22
50
lxd.adjust_timing_tool = False lxd.offset = 0
[ 75, 24954, 13, 23032, 62, 16514, 278, 62, 25981, 796, 10352, 198, 75, 24954, 13, 28968, 796, 657 ]
2.5
18
# 14. Leer un lote de N números y determine el promedio de múltiplos de 7 que contengan, # cuántos son capicúas (Si el número y su inverso son iguales). # Ejemplo: Si N = 8 [49, 2, 7, 34, 55, 105, 121, 53] # → Promedio de Múltiplos de 7: 53.67 # Cantidad de Capicúas: 4 numeros = [49, 2, 7, 34, 55, 105, 121, 53...
[ 2, 1478, 13, 1004, 263, 555, 1256, 68, 390, 399, 299, 21356, 647, 418, 331, 5004, 1288, 1552, 276, 952, 390, 285, 21356, 2528, 24705, 418, 390, 767, 8358, 542, 268, 1030, 11, 220, 201, 198, 2, 18912, 6557, 429, 418, 3367, 1451, 29...
2.144654
159
#!/bin/python3 print("- Markdown-HTML -") import markdown, natsort, os, json, pathlib REPO_PATH = pathlib.Path(os.environ['GITHUB_WORKSPACE']) INPUT_LIST = json.loads(os.environ['INPUT_INPUT_FILES']) OUTPUT_LIST = json.loads(os.environ['INPUT_OUTPUT_FILES']) EXCLUDE_DUPLICATES : bool = json.loads(os.environ['INPUT_E...
[ 2, 48443, 8800, 14, 29412, 18, 198, 198, 4798, 7203, 12, 2940, 2902, 12, 28656, 532, 4943, 198, 198, 11748, 1317, 2902, 11, 299, 1381, 419, 11, 28686, 11, 33918, 11, 3108, 8019, 198, 198, 2200, 16402, 62, 34219, 796, 3108, 8019, 13,...
2.335729
974
"""Model for the list of robots.""" import logging from typing import Tuple from selenium.common.exceptions import TimeoutException from selenium.webdriver.chrome.webdriver import WebDriver from selenium.webdriver.common.by import By from selenium.webdriver.remote.webelement import WebElement from selenium.webdriver.su...
[ 37811, 17633, 329, 262, 1351, 286, 14193, 526, 15931, 198, 11748, 18931, 198, 6738, 19720, 1330, 309, 29291, 198, 6738, 384, 11925, 1505, 13, 11321, 13, 1069, 11755, 1330, 3862, 448, 16922, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, ...
2.396434
1,907
from codecs import open from os import path from setuptools import setup, find_packages # adding README here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'README.md'), encoding='utf-8') as f: long_description = f.read() setup( name='neuralkernel', version='0.0.8', description='neu...
[ 6738, 40481, 82, 1330, 1280, 198, 6738, 28686, 1330, 3108, 198, 198, 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 198, 2, 4375, 20832, 11682, 198, 1456, 796, 3108, 13, 397, 2777, 776, 7, 6978, 13, 15908, 3672, 7, 8...
2.702065
339
from django.shortcuts import render, get_object_or_404, redirect from django.http import HttpResponse from django.forms import modelform_factory from home.models import Todo # Create your views here.
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 651, 62, 15252, 62, 273, 62, 26429, 11, 18941, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 198, 6738, 42625, 14208, 13, 23914, 1330, 2746, 687, 62, 69, 9548, 198, 1...
3.474576
59
import os from Bio import SeqIO import shutil import subprocess import webbrowser # Converts files from abi to fasta homeDIR = os.getcwd() counter = 0 sourcefiles = os.listdir(homeDIR) destinationpath = f"{homeDIR}\FASTA" for filename in os.listdir(homeDIR): if filename.endswith(".ab1"): count = SeqIO.convert(fi...
[ 11748, 28686, 198, 6738, 16024, 1330, 1001, 80, 9399, 198, 11748, 4423, 346, 198, 11748, 850, 14681, 198, 11748, 3992, 40259, 628, 198, 2, 1482, 24040, 3696, 422, 450, 72, 284, 3049, 64, 198, 11195, 34720, 796, 28686, 13, 1136, 66, 16...
2.690102
1,081
# Copyright 2018 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from textwrap import dedent from pants.testutil.pants_run_integration_test import PantsRunIntegrationTest
[ 2, 15069, 2864, 41689, 1628, 20420, 357, 3826, 27342, 9865, 3843, 20673, 13, 9132, 737, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 3826, 38559, 24290, 737, 198, 198, 6738, 2420, 37150, 1330, 4648, 298, 198, 19...
3.809524
63
import os import pytest from treepath import path, get, TraversingError, get_match from treepath.path.exceptions.path_syntax_error import PathSyntaxError
[ 11748, 28686, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 2054, 538, 776, 1330, 3108, 11, 651, 11, 4759, 690, 278, 12331, 11, 651, 62, 15699, 198, 6738, 2054, 538, 776, 13, 6978, 13, 1069, 11755, 13, 6978, 62, 1837, 41641, 62, 182...
3.115385
52
st,sm,et,em=map(int,input().split()) rt=et-st if rt<0:rt=24+(et-st) rm=em-sm if rm<0: rm=60+(em-sm) rt-=1 if et==st and em==sm:print("O JOGO DUROU 24 HORA(S) E 0 MINUTO(S)") else: if rt<0:rt=24+rt print(f"O JOGO DUROU {rt} HORA(S) E {rm} MINUTO(S)")
[ 301, 11, 5796, 11, 316, 11, 368, 28, 8899, 7, 600, 11, 15414, 22446, 35312, 28955, 198, 17034, 28, 316, 12, 301, 198, 361, 374, 83, 27, 15, 25, 17034, 28, 1731, 33747, 316, 12, 301, 8, 198, 26224, 28, 368, 12, 5796, 198, 361, ...
1.694268
157
import os from app import create_app from ext import db from flask_script import Manager from flask_migrate import Migrate, MigrateCommand import app.model app = create_app(os.getenv('FLASK_CONFIG') or 'default') migrate = Migrate(app, db) manager = Manager(app) manager.add_command('db', MigrateCommand) if __name_...
[ 11748, 28686, 198, 198, 6738, 598, 1330, 2251, 62, 1324, 198, 6738, 1070, 1330, 20613, 198, 6738, 42903, 62, 12048, 1330, 9142, 198, 6738, 42903, 62, 76, 42175, 1330, 337, 42175, 11, 337, 42175, 21575, 198, 198, 11748, 598, 13, 19849, ...
3.008475
118
#!/usr/bin/env python # longest common subsequence X = "AGGTAB" Y = "GXTXAYB" print ("Length of Longest Common Subsequence is ", lcs(X , Y, len(X), len(Y))) # least common subsequence X = "AGGTAB" Y = "GXTXAYB" print ("Length of Least Common Subsequence is ", lcs(X , Y, len(X), len(Y))) # longest increasing sub...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 14069, 2219, 6399, 594, 628, 198, 55, 796, 366, 4760, 38, 5603, 33, 1, 198, 56, 796, 366, 38, 25010, 55, 4792, 33, 1, 198, 4798, 5855, 24539, 286, 5882, 395, 8070, 3834, ...
2.54386
171
one_or_many(1) one_or_many('1', 1, 2, 'abc') one_or_many()
[ 201, 198, 201, 198, 505, 62, 273, 62, 21834, 7, 16, 8, 201, 198, 505, 62, 273, 62, 21834, 10786, 16, 3256, 352, 11, 362, 11, 705, 39305, 11537, 201, 198, 505, 62, 273, 62, 21834, 3419, 201, 198 ]
1.692308
39
# Copyright 2020 The Private Cardinality Estimation Framework Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
[ 2, 15069, 12131, 383, 15348, 25564, 414, 10062, 18991, 25161, 46665, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, ...
2.308343
6,616
from __future__ import annotations import typing from functools import partial import cryptography.exceptions as bkx from cryptography.hazmat.primitives import serialization as serial from cryptography.hazmat.primitives.asymmetric import rsa, utils from cryptography.hazmat.primitives.serialization import ( Encodi...
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 11748, 19720, 198, 6738, 1257, 310, 10141, 1330, 13027, 198, 198, 11748, 45898, 13, 1069, 11755, 355, 275, 74, 87, 198, 6738, 45898, 13, 71, 1031, 6759, 13, 19795, 20288, 1330, 11389, 1634...
2.805921
608
from gopigo import * import time p = Piggy() try: menu() except(KeyboardInterrupt, SystemExit): from gopigo import * stop()
[ 6738, 308, 404, 14031, 1330, 1635, 198, 11748, 640, 628, 198, 79, 796, 23097, 1360, 3419, 628, 198, 198, 28311, 25, 198, 220, 220, 220, 6859, 3419, 198, 16341, 7, 9218, 3526, 9492, 3622, 11, 4482, 30337, 2599, 198, 220, 220, 220, 42...
2.592593
54
import sys lines = open(sys.argv[1], 'r') for line in lines: line = line.replace('\n', '').replace('\r', '') if len(line) > 0: word, pattern = line.split(' ') for i in range(len(pattern)): insert = word[i].lower() if pattern[i] == '0' else word[i].upper() word = w...
[ 11748, 25064, 201, 198, 6615, 796, 1280, 7, 17597, 13, 853, 85, 58, 16, 4357, 705, 81, 11537, 201, 198, 1640, 1627, 287, 3951, 25, 201, 198, 220, 220, 220, 1627, 796, 1627, 13, 33491, 10786, 59, 77, 3256, 10148, 737, 33491, 10786, ...
2.068421
190
#!/usr/bin/env python # Copyright (c) Twisted Matrix Laboratories. # Transformed into a cheesy ngram-server by JRN # See LICENSE for details. # # Copyright (c) [2014-], Yandex, LLC # Author: jorono@yandex-team.ru (Josef Robert Novak) # All rights reserved. # # Redistribution and use in source and binary forms, with o...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 15069, 357, 66, 8, 40006, 24936, 46779, 13, 198, 2, 3602, 12214, 656, 257, 45002, 299, 4546, 12, 15388, 416, 32598, 45, 198, 2, 4091, 38559, 24290, 329, 3307, 13, 198, 2, 198, 2...
2.586306
1,738
from math import trunc n = float(input('Digite um valor: ')) print(f'A porção inteira de {n} é {trunc(n)}')
[ 6738, 10688, 1330, 40122, 198, 198, 77, 796, 12178, 7, 15414, 10786, 19511, 578, 23781, 1188, 273, 25, 705, 4008, 198, 4798, 7, 69, 6, 32, 16964, 16175, 28749, 493, 68, 8704, 390, 1391, 77, 92, 38251, 1391, 2213, 19524, 7, 77, 38165...
2.422222
45
__author__ = 'Vijay_Thomas@intuit.com'
[ 834, 9800, 834, 796, 705, 53, 2926, 323, 62, 22405, 31, 600, 5013, 13, 785, 6, 628 ]
2.352941
17
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.VoucherTimeRule import VoucherTimeRule from alipay.aop.api.domain.VoucherSingleItemInfo import VoucherSingleItemInfo from alipay.aop.api.domain.PromoInfo import PromoInfo from alipa...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 33918, 198, 198, 6738, 435, 541, 323, 13, 64, 404, 13, 15042, 13, 9979, 415, 13, 22973, 34184, 1187, 1330, 163...
2.687943
141
from pyglet.window import key import pyglet import directories import assets # Window caption = "Colors" #icon = pyglet.image.load("Assets/mario.png") wWidth, wHeight = 1280, 720 window = pyglet.window.Window(wWidth,wHeight) window.set_caption(caption) window.set_icon(assets.icon) # Keyboard keys ...
[ 6738, 12972, 70, 1616, 13, 17497, 1330, 1994, 201, 198, 201, 198, 11748, 12972, 70, 1616, 201, 198, 201, 198, 11748, 29196, 201, 198, 11748, 6798, 201, 198, 201, 198, 2, 26580, 201, 198, 6888, 1159, 796, 366, 5216, 669, 1, 201, 198,...
2.588235
255
from mkt.webapps.serializers import SimpleAppSerializer, SimpleESAppSerializer class FeedFireplaceESAppSerializer(BaseFireplaceAppSerializer, SimpleESAppSerializer): """ Serializer for Fireplace Feed pages (mostly detail pages). Needs collection groups. """
[ 6738, 285, 21841, 13, 12384, 18211, 13, 46911, 11341, 1330, 17427, 4677, 32634, 7509, 11, 17427, 1546, 4677, 32634, 7509, 628, 628, 198, 198, 4871, 18272, 13543, 5372, 1546, 4677, 32634, 7509, 7, 14881, 13543, 5372, 4677, 32634, 7509, 11,...
2.706897
116
#!/usr/bin/env python3 import sys class GFF3_line: """A class to represet GFF3 lines and allow modification of the values of its fields. Attributes: ------------ field0, ..., field8 strings containing the values of each field in a GFF3 line attributes ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 25064, 628, 198, 198, 4871, 402, 5777, 18, 62, 1370, 25, 198, 220, 220, 220, 37227, 32, 1398, 284, 1128, 42503, 402, 5777, 18, 3951, 290, 1249, 17613, 286, 262, 198, ...
2.131376
2,725
from __future__ import print_function from problog.logic import Var, Term, Constant from itertools import product from logging import getLogger from problog.util import Timer import logging from getSQLQuery import getSQLQuery # from sympy.parsing.sympy_parser import parse_expr # from sympy import lambdify, symbols fro...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 1861, 6404, 13, 6404, 291, 1330, 12372, 11, 35118, 11, 20217, 198, 6738, 340, 861, 10141, 1330, 1720, 198, 6738, 18931, 1330, 651, 11187, 1362, 198, 6738, 1861, 6404, 13, 22602, ...
3.583893
149
import os # checks if the scanned IP address equals the target
[ 11748, 28686, 628, 198, 2, 8794, 611, 262, 28660, 6101, 2209, 21767, 262, 2496, 198 ]
4.333333
15
import json import os if __name__ == '__main__': obj = readJson() if obj is None: print('not obj data') else: result = readDirList() writeResult()
[ 11748, 33918, 198, 11748, 28686, 628, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 26181, 796, 1100, 41, 1559, 3419, 198, 220, 220, 220, 611, 26181, 318, 6045, 25, 198, 220, 220, 220, ...
2.25
84
import torch from torch_geometric.data import Data import logging import numpy as np from abc import ABC, abstractmethod import time from time import time as now from funlib.segment.arrays import replace_values from gnn_agglomeration import utils logger = logging.getLogger(__name__) logger.setLevel(logging.INFO)
[ 11748, 28034, 198, 6738, 28034, 62, 469, 16996, 13, 7890, 1330, 6060, 198, 11748, 18931, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 450, 66, 1330, 9738, 11, 12531, 24396, 198, 11748, 640, 198, 6738, 640, 1330, 640, 355, 783, 198, ...
3.37234
94
from pyconjp_domains.talks import Category categories_raw_data = [ { "id": 30061, "title": "Track", "items": [ {"id": 80001, "name": "Track1"}, {"id": 80002, "name": "Track2"}, {"id": 80003, "name": "Track3"}, {"id": 80004, "name": "Track4"}, ...
[ 6738, 12972, 1102, 34523, 62, 3438, 1299, 13, 83, 23833, 1330, 21743, 198, 198, 66, 26129, 62, 1831, 62, 7890, 796, 685, 198, 220, 220, 220, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 366, 312, 1298, 5867, 5333, 11, 198, 220, 2...
1.955577
1,013
def masters(): """Gets tachyon masters :return: """ return __salt__['search.mine_by_host']('roles:tachyon.master') def is_primary_master(): """Checks whether current host is the first one created as tachyon master :return: """ return __salt__['search.is_primary_host']('roles:tachyon...
[ 198, 4299, 18159, 33529, 198, 220, 220, 220, 37227, 38, 1039, 256, 620, 19181, 18159, 628, 220, 220, 220, 1058, 7783, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1441, 11593, 82, 2501, 834, 17816, 12947, 13, 3810, 62, 1525, 6...
2.64
125
import time from datetime import datetime, date, timedelta from config import get_env
[ 11748, 640, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 3128, 11, 28805, 12514, 198, 6738, 4566, 1330, 651, 62, 24330, 628 ]
3.954545
22
# Author: Travis Oliphant # 1999 -- 2002 import warnings import sigtools from scipy import linalg from scipy.fftpack import fft, ifft, ifftshift, fft2, ifft2, fftn, \ ifftn, fftfreq from numpy import polyadd, polymul, polydiv, polysub, roots, \ poly, polyval, polyder, cast, asarray, isscalar, atleast_...
[ 2, 6434, 25, 19804, 6544, 13323, 415, 198, 2, 7358, 1377, 6244, 198, 198, 11748, 14601, 198, 198, 11748, 43237, 31391, 198, 6738, 629, 541, 88, 1330, 300, 1292, 70, 198, 6738, 629, 541, 88, 13, 487, 83, 8002, 1330, 277, 701, 11, 6...
2.148289
18,147
from flask_restx import Api from flask import Blueprint from .main.controller.user_controller import api as user_ns from .main.controller.auth_controller import api as auth_ns from .main.controller.blog_controller import api as blog_ns from .main.controller.comments_controller import api as comments_ns from .main.cont...
[ 6738, 42903, 62, 2118, 87, 1330, 5949, 72, 198, 6738, 42903, 1330, 39932, 198, 198, 6738, 764, 12417, 13, 36500, 13, 7220, 62, 36500, 1330, 40391, 355, 2836, 62, 5907, 198, 6738, 764, 12417, 13, 36500, 13, 18439, 62, 36500, 1330, 4039...
2.904762
315
expected_output={'vpn': {'1002': {'prefix': ['10.111.2.0/24', '10.154.2.0/24', '10.51.2.0/24']}}}
[ 40319, 62, 22915, 34758, 6, 85, 21999, 10354, 1391, 6, 3064, 17, 10354, 1391, 6, 40290, 10354, 37250, 940, 13, 16243, 13, 17, 13, 15, 14, 1731, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
1.422018
109
#HUGHXIE #a2q1.py import random #get random number between 1 and 100 number = (random.randint(1,100)) #TEST print(str(number)) #initial guess guess = input("Enter guess: ") while True: #checks if input is valid if guess.isdigit()==True and int(guess)<101: if (int(guess) > number): guess = i...
[ 2, 39, 44004, 55, 10008, 198, 2, 64, 17, 80, 16, 13, 9078, 198, 11748, 4738, 198, 2, 1136, 4738, 1271, 1022, 352, 290, 1802, 198, 17618, 796, 357, 25120, 13, 25192, 600, 7, 16, 11, 3064, 4008, 198, 2, 51, 6465, 198, 4798, 7, 2...
2.261168
291
# -*- coding: utf-8 -*- # # Author: jimin.huang # # Created Time: 2015年02月07日 星期六 17时01分29秒 # from scrapy import signals from scrapy.mail import MailSender from scrapy.exceptions import NotConfigured
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 220, 198, 2, 6434, 25, 474, 320, 259, 13, 13415, 648, 198, 2, 220, 198, 2, 15622, 3862, 25, 1853, 33176, 112, 2999, 17312, 230, 2998, 33768, 98, 10545, 246, 253, ...
2.228261
92
""" This module contains general purpose functions that are used throughout PBjam. """ from . import PACKAGEDIR import os import numpy as np def get_priorpath(): """ Get default prior path name Returns ------- prior_file : str Default path to the prior in the package directory structure...
[ 37811, 198, 198, 1212, 8265, 4909, 2276, 4007, 5499, 326, 389, 973, 3690, 30524, 39159, 13, 198, 198, 37811, 198, 198, 6738, 764, 1330, 47035, 4760, 1961, 4663, 198, 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 198, 4299, 651,...
2.275862
1,073
from __future__ import unicode_literals import frappe from frappe.model.utils.rename_field import rename_field from frappe.modules import scrub, get_doctype_module lab_test_name = ["test_name", "lab_test_name"] lab_test_code = ["test_code", "lab_test_code"] lab_test_comment = ["test_comment", "lab_test_comment"] lab_t...
[ 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 11748, 5306, 27768, 198, 6738, 5306, 27768, 13, 19849, 13, 26791, 13, 918, 480, 62, 3245, 1330, 36265, 62, 3245, 198, 6738, 5306, 27768, 13, 18170, 1330, 27268, 11, 651, ...
2.759786
562
import FWCore.ParameterSet.Config as cms lheZdecayFilter = cms.EDFilter("LHEDYdecayFilter", src = cms.InputTag("source"), leptonID =cms.int32(11), verbose = cms.untracked.bool(True) )
[ 11748, 48849, 14055, 13, 36301, 7248, 13, 16934, 355, 269, 907, 198, 198, 75, 258, 57, 12501, 323, 22417, 796, 269, 907, 13, 1961, 22417, 7203, 43, 39, 1961, 56, 12501, 323, 22417, 1600, 198, 220, 220, 220, 12351, 796, 269, 907, 13,...
1.763514
148
# pyisotopomer: Nitrous oxide isotopocule data corrections in Python # Copyright (C) 2021 Colette L Kelly et al. (MIT License) from .pyisotopomer import Scrambling from .pyisotopomer import Isotopomers
[ 2, 12972, 271, 313, 404, 12057, 25, 24282, 7596, 30788, 31624, 404, 420, 2261, 1366, 26251, 287, 11361, 198, 2, 15069, 357, 34, 8, 33448, 220, 1766, 21348, 406, 9077, 2123, 435, 13, 220, 357, 36393, 13789, 8, 198, 198, 6738, 764, 90...
3.153846
65
import unittest from os import path import os from iridauploader.tests_integration import tests_integration import iridauploader.config as config import iridauploader.api as api import iridauploader.model as model import iridauploader.progress as progress from iridauploader.core.cli_entry import upload_run_single_en...
[ 11748, 555, 715, 395, 198, 6738, 28686, 1330, 3108, 198, 11748, 28686, 198, 198, 6738, 4173, 312, 559, 7304, 263, 13, 41989, 62, 18908, 1358, 1330, 5254, 62, 18908, 1358, 198, 198, 11748, 4173, 312, 559, 7304, 263, 13, 11250, 355, 456...
2.119478
15,869
from __future__ import absolute_import import mock from sentry.interfaces.geo import Geo from sentry.testutils import TestCase
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 11748, 15290, 198, 198, 6738, 1908, 563, 13, 3849, 32186, 13, 469, 78, 1330, 32960, 198, 6738, 1908, 563, 13, 9288, 26791, 1330, 6208, 20448, 628 ]
3.611111
36
import threading import time """ Associo Threads a funções Nomeio Threads Pego o nome de threads nomeadas """ # my modification: thread id's if __name__ == "__main__": t1 = threading.Thread(name='first_function', target=first_function) t2 = threading.Thread(name='second_function', target=secon...
[ 11748, 4704, 278, 201, 198, 11748, 640, 201, 198, 201, 198, 37811, 201, 198, 8021, 420, 952, 14122, 82, 257, 1257, 16175, 127, 113, 274, 201, 198, 45, 462, 952, 14122, 82, 201, 198, 47, 1533, 78, 267, 299, 462, 390, 14390, 299, 46...
2.692429
634
# -*- coding: utf-8 -*- """ Created on Sun Aug 8 21:02:21 2021 @author: Jerry """ import matplotlib.pyplot as plt #
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 3825, 2447, 220, 807, 2310, 25, 2999, 25, 2481, 33448, 198, 198, 31, 9800, 25, 13075, 198, 37811, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487,...
2.333333
51
import numpy as np import matplotlib.pyplot as plt data = [2, 1, 3, 0.13, 1, 20]
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 628, 198, 198, 7890, 796, 685, 17, 11, 352, 11, 513, 11, 657, 13, 1485, 11, 352, 11, 1160, 60, 628 ]
2.297297
37
from .... pyaz_utils import _call_az def download(destination, node_id, pool_id, account_endpoint=None, account_key=None, account_name=None): ''' Required Parameters: - destination -- The path to the destination file or directory. - node_id -- The ID of the Compute Node for which you want to get ...
[ 6738, 19424, 12972, 1031, 62, 26791, 1330, 4808, 13345, 62, 1031, 198, 198, 4299, 4321, 7, 16520, 1883, 11, 10139, 62, 312, 11, 5933, 62, 312, 11, 1848, 62, 437, 4122, 28, 14202, 11, 1848, 62, 2539, 28, 14202, 11, 1848, 62, 3672, ...
3.356863
255
################################################################################ # # Package : AlphaPy # Module : features # Created : July 11, 2013 # # Copyright 2020 ScottFree Analytics LLC # Mark Conway & Robert D. Scott II # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use ...
[ 29113, 29113, 14468, 198, 2, 198, 2, 15717, 220, 220, 1058, 12995, 20519, 198, 2, 19937, 220, 220, 220, 1058, 3033, 198, 2, 15622, 220, 220, 1058, 2901, 1367, 11, 2211, 198, 2, 198, 2, 15069, 12131, 4746, 11146, 30437, 11419, 198, 2...
2.494762
16,895
import string import textwrap import time import pytest from seaworthy.containers.nginx import NginxContainer from seaworthy.pytest import dockertest from seaworthy.utils import output_lines @pytest.fixture(scope='module') @dockertest()
[ 11748, 4731, 198, 11748, 2420, 37150, 198, 11748, 640, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 32085, 18906, 13, 3642, 50221, 13, 782, 28413, 1330, 399, 42822, 29869, 198, 6738, 32085, 18906, 13, 9078, 9288, 1330, 23423, 861, 395, ...
3.375
72
# This file is part of PSL-Python. # Copyright (c) 2021, Eijiro Shibusawa <phd_kimberlite@yahoo.co.jp> # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must re...
[ 2, 770, 2393, 318, 636, 286, 6599, 43, 12, 37906, 13, 198, 2, 15069, 357, 66, 8, 33448, 11, 412, 2926, 7058, 911, 26333, 6909, 1279, 746, 67, 62, 74, 320, 527, 36890, 31, 40774, 13, 1073, 13, 34523, 29, 198, 2, 1439, 2489, 10395...
3.383529
425
import datetime def get_mins_between_now_and_event(event): """Returns the minutes between the current time and the start time of the inputted event Args: event (dict): an single event from the event list returned from google_calendar's GoogleCalendar class method get_events Returns: int: ...
[ 11748, 4818, 8079, 198, 198, 4299, 651, 62, 42951, 62, 23395, 62, 2197, 62, 392, 62, 15596, 7, 15596, 2599, 198, 220, 220, 220, 37227, 35561, 262, 2431, 1022, 262, 1459, 640, 290, 262, 923, 640, 286, 262, 5128, 1513, 1785, 628, 220,...
2.614019
1,070
from jesse.helpers import get_candle_source, slice_candles, np_shift import numpy as np from numba import njit import talib from typing import Union from jesse.helpers import get_config from collections import namedtuple """ https://www.tradingview.com/script/SFGEoDmG-Low-Pass-Channel-DW/ """ LowPass = namedtuple('L...
[ 6738, 474, 35270, 13, 16794, 364, 1330, 651, 62, 46188, 293, 62, 10459, 11, 16416, 62, 46188, 829, 11, 45941, 62, 30846, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 997, 7012, 1330, 299, 45051, 198, 11748, 3305, 571, 220, 198, 6738...
2.652778
144
import pytz import binascii import os import logging import tzlocal from datetime import datetime, timedelta from collections import namedtuple from securitybot.sql import SQLEngine from scribe_logger.logger import ScribeLogHandler __author__ = 'Alex Bertsch' __email__ = 'abertsch@dropbox.com' # http://stackoverflo...
[ 11748, 12972, 22877, 198, 11748, 9874, 292, 979, 72, 198, 11748, 28686, 198, 11748, 18931, 198, 11748, 256, 89, 12001, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 198, 6738, 2...
2.400643
1,555
#!/usr/bin/python # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ import sys import re from operator import itemgetter """Baby Names exercise Define the extr...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 15069, 3050, 3012, 3457, 13, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 198, 2, 2638, 1378, 2503, 13, 43073, 13, 2398, 14, 677, 4541, 14, 43, 2149, 24290, 12, 17, ...
2.727941
680
# -*- coding: iso-8859-1 -*- """ MoinMoin - (re)building of Xapian indices @copyright: 2007 MoinMoin:KarolNowak @license: GNU GPL, see COPYING for details. """ import MoinMoin.events as ev def handle_renamed(event): """Updates Xapian index when a page changes its name""" request = event.reques...
[ 2, 532, 9, 12, 19617, 25, 47279, 12, 3459, 3270, 12, 16, 532, 9, 12, 198, 37811, 198, 220, 220, 220, 4270, 259, 16632, 259, 532, 357, 260, 8, 16894, 286, 1395, 499, 666, 36525, 628, 220, 220, 220, 2488, 22163, 4766, 25, 4343, 42...
2.537721
623
import main medumList = [ [ "000007910007004600508903400920305000801720000400001250600000000000100008219030000", "000003060080050700015080040800300009349006000206090370000400506700008002090000430", "308062015400000060060070008802400107000008300000053280000500670200000000010020540", "00041037800070002930400050...
[ 11748, 1388, 198, 198, 1150, 388, 8053, 796, 685, 198, 197, 58, 198, 197, 197, 1, 20483, 3720, 12825, 9879, 3510, 405, 33042, 3829, 2682, 28694, 1238, 22515, 830, 23, 29326, 2167, 22914, 2388, 1065, 35638, 8269, 18005, 2388, 6469, 1129,...
2.392138
7,403
# Generated by Django 2.1.7 on 2019-04-16 12:39 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 362, 13, 16, 13, 22, 319, 13130, 12, 3023, 12, 1433, 1105, 25, 2670, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.766667
30
# -*- coding: utf-8 -*- from common.mymako import render_mako_context, render_json from blueking.component.shortcuts import get_client_by_request from utils import get_job_instance_id, get_job_log_content from models import Operations, ResourceData, CeleryTask from datetime import datetime
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 2219, 13, 1820, 76, 25496, 1330, 8543, 62, 76, 25496, 62, 22866, 11, 8543, 62, 17752, 198, 6738, 4171, 3364, 13, 42895, 13, 19509, 23779, 1330, 651, 62, 163...
3.210526
95
from .interfaces import api as interfaces_api from flask import Blueprint from flask_restplus import Api api_blueprint = Blueprint('interfaces service', __name__) api = Api( api_blueprint, title=f'Dependencies Service Public API', version='1.0', description='Service for managing interface dependencies...
[ 6738, 764, 3849, 32186, 1330, 40391, 355, 20314, 62, 15042, 198, 6738, 42903, 1330, 39932, 198, 6738, 42903, 62, 2118, 9541, 1330, 5949, 72, 198, 198, 15042, 62, 17585, 4798, 796, 39932, 10786, 3849, 32186, 2139, 3256, 11593, 3672, 834, ...
3.268908
119
from Crypto.Cipher import AES from Crypto.Hash import SHA256 password = ("anything") hash_obj = SHA256.new(password.encode('utf-8')) hkey = hash_obj.digest() msg = "Hello stackoverflow!" cipher_text = encrypt(msg) print(cipher_text) plaintext = decrypt(cipher_text) print(plaintext)
[ 198, 6738, 36579, 13, 34, 10803, 1330, 34329, 220, 220, 220, 220, 198, 6738, 36579, 13, 26257, 1330, 25630, 11645, 198, 198, 28712, 796, 5855, 49459, 4943, 220, 220, 220, 220, 198, 17831, 62, 26801, 796, 25630, 11645, 13, 3605, 7, 287...
2.646018
113
import heapq from collections import Counter """ Success Details Runtime: 28 ms, faster than 92.45% of Python3 online submissions for Reorganize String. Memory Usage: 14.2 MB, less than 84.12% of Python3 online submissions for Reorganize String. Next challenges: Rearrange String k Distance Apart Show off your accep...
[ 11748, 24575, 80, 198, 6738, 17268, 1330, 15034, 628, 198, 198, 37811, 198, 33244, 198, 24259, 220, 198, 41006, 25, 2579, 13845, 11, 5443, 621, 10190, 13, 2231, 4, 286, 11361, 18, 2691, 22129, 329, 797, 9971, 1096, 10903, 13, 198, 308...
3.455285
123
import aiohttp, asyncio, logging, os, io import hangups import plugins logger = logging.getLogger(__name__) @asyncio.coroutine def _handle_forwarding(bot, event, command): """Handle message forwarding""" # Test if message forwarding is enabled if not bot.get_config_suboption(event.conv_id, 'forwardin...
[ 11748, 257, 952, 4023, 11, 30351, 952, 11, 18931, 11, 28686, 11, 33245, 198, 198, 11748, 289, 2303, 862, 198, 198, 11748, 20652, 628, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 628, 198, 198, 31, 292, ...
1.91219
968
from pyrediseasyio.io.io_group import IOGroup from pyrediseasyio.html.html_io_group import HMTLIOGroup from pyrediseasyio.html.html_io import HTMLIO from pyrediseasyio.io.single_io import SingleIO from pyrediseasyio.io.boolean_io import BooleanIO from pyrediseasyio.io.string_io import StringIO from pyrediseasyio.io.flo...
[ 6738, 12972, 445, 786, 4107, 952, 13, 952, 13, 952, 62, 8094, 1330, 314, 7730, 3233, 198, 6738, 12972, 445, 786, 4107, 952, 13, 6494, 13, 6494, 62, 952, 62, 8094, 1330, 367, 13752, 31271, 7730, 3233, 198, 6738, 12972, 445, 786, 4107...
2.89404
151
#!/usr/bin/env python3 # # Copyright (c) 2015, The Linux Foundation. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # 1. Redistributions of source code must retain the above copyright # notic...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 198, 2, 15069, 357, 66, 8, 1853, 11, 383, 7020, 5693, 13, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 2297, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, 11, 351, ...
2.918224
856
import matplotlib matplotlib.use('TkAgg') import matplotlib.pyplot as plt import matplotlib.image as mpimage import numpy as np import collections import plotting as plot # Define a class to receive the characteristics of each line detection
[ 11748, 2603, 29487, 8019, 198, 6759, 29487, 8019, 13, 1904, 10786, 51, 74, 46384, 11537, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 2603, 29487, 8019, 13, 9060, 355, 29034, 9060, 198, 198, 11748, 299, 3215...
3.275
80
import pytest import pandas as pd from s64da_benchmark_toolkit import streams @pytest.fixture @pytest.fixture
[ 198, 11748, 12972, 9288, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 264, 2414, 6814, 62, 26968, 4102, 62, 25981, 15813, 1330, 15190, 628, 198, 31, 9078, 9288, 13, 69, 9602, 628, 198, 31, 9078, 9288, 13, 69, 9602, 628, 628...
2.702128
47
import torch import torch.nn as nn import torch.nn.functional as F import onmt from onmt.models.transformer_layers import MultiHeadAttention, Linear from onmt.modules.relative_attention import RelPartialLearnableMultiHeadAttn from onmt.modules.optimized.relative_self_attention import RelativeSelfMultiheadAttn from onm...
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 11748, 319, 16762, 198, 198, 6738, 319, 16762, 13, 27530, 13, 7645, 16354, 62, 75, 6962, 1330, 15237, 13847, 8086, 1463, ...
3.533181
437
import pytest from voucher_selection.server.config import ( DBConfig, ServerConfig, create_db_config, create_server_config, )
[ 11748, 12972, 9288, 198, 198, 6738, 40621, 62, 49283, 13, 15388, 13, 11250, 1330, 357, 198, 220, 220, 220, 360, 2749, 261, 5647, 11, 198, 220, 220, 220, 9652, 16934, 11, 198, 220, 220, 220, 2251, 62, 9945, 62, 11250, 11, 198, 220, ...
2.642857
56
print("""You enter a dark room with two doors. Do you go through door #1 or door #2?""") door = input("> ") if door == "1": print("There's a giant bear here eating a cheese cake.") print("What do you do?") print("1. Take the cake.") print("2. Scream at the bear.") bear = input("> ") ...
[ 4798, 7203, 15931, 1639, 3802, 257, 3223, 2119, 351, 734, 8215, 13, 220, 198, 5211, 345, 467, 832, 3420, 1303, 16, 393, 3420, 1303, 17, 1701, 1, 4943, 220, 198, 220, 198, 9424, 796, 5128, 7, 5320, 366, 8, 220, 198, 220, 198, 361, ...
2.646778
419
import queue, os, logging import threading from copy import copy import time from dquant.constants import Constants from dquant.markets._okex_future_ws import OkexFutureWs import asyncio # 返回最后一个买/卖/删除记录,因为getorder不会记录已经成交或者删除的订单信息,而已经执行的订单保存在getHist里(只保存最近10个) if __name__ == "__main__": amount = 1 ...
[ 11748, 16834, 11, 28686, 11, 18931, 198, 11748, 4704, 278, 198, 6738, 4866, 1330, 4866, 198, 198, 11748, 640, 198, 198, 6738, 288, 40972, 13, 9979, 1187, 1330, 4757, 1187, 198, 6738, 288, 40972, 13, 34162, 13557, 2088, 87, 62, 37443, ...
1.988701
708
#!/usr/bin/env python3 import numpy as np from narratex.base import load_pickle, save_json from narratex.clustering import get_group2name_by_freq from narratex.visualization import make_dendrogram_dict if __name__ == '__main__': import argparse aparser = argparse.ArgumentParser() aparser.add_argument(...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 6664, 378, 87, 13, 8692, 1330, 3440, 62, 27729, 293, 11, 3613, 62, 17752, 198, 6738, 6664, 378, 87, 13, 565, 436, 1586, 1330, ...
2.765432
162
import math from .searcher import Searcher from pychemia import pcm_log
[ 11748, 10688, 198, 198, 6738, 764, 325, 283, 2044, 1330, 42016, 2044, 198, 6738, 12972, 15245, 544, 1330, 279, 11215, 62, 6404, 628 ]
3.217391
23
# -*- coding: utf-8 -*- from copy import deepcopy
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 4866, 1330, 2769, 30073, 628 ]
2.47619
21
import argparse import copy from os import path from pathlib import Path import torch torch.set_default_tensor_type('torch.cuda.FloatTensor') from torchvision.utils import save_image from mpl_toolkits.mplot3d import Axes3D # noqa: F401 unused import # import ssl # enable if downloading models gives CERTIFI...
[ 11748, 1822, 29572, 198, 11748, 4866, 198, 6738, 28686, 1330, 3108, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 11748, 28034, 198, 198, 13165, 354, 13, 2617, 62, 12286, 62, 83, 22854, 62, 4906, 10786, 13165, 354, 13, 66, 15339, 13, ...
3.046703
364
from django.conf import settings from django.db import models from django.utils.text import slugify from django.contrib.auth import get_user_model STATUS_PENDING = "pending" STATUS_PROGRESS = "progress" STATUS_COMPLETED = "completed" STATUSES = [STATUS_PENDING, STATUS_PROGRESS, STATUS_COMPLETED] THEMES = ["Validation...
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 26791, 13, 5239, 1330, 31065, 1958, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 651, 62, 7220, 62, 19849...
2.725962
208
from main import app from unittest import TestCase from flask import json from nose.tools import ok_, eq_ import unittest # if __name__ == '__main__': # nose.run()
[ 6738, 1388, 1330, 598, 198, 6738, 555, 715, 395, 1330, 6208, 20448, 198, 6738, 42903, 1330, 33918, 198, 6738, 9686, 13, 31391, 1330, 12876, 62, 11, 37430, 62, 198, 11748, 555, 715, 395, 628, 628, 220, 220, 220, 1303, 611, 11593, 3672,...
2.870968
62
import os APPLICATION_PARAMETER = os.environ.get('APPLICATION_PARAMETER', 'my_parameter') POSTGRES_HOST = os.environ.get('POSTGRES_HOST', 'localhost') POSTGRES_USER = os.environ.get("POSTGRES_USER", "postgres") POSTGRES_PASSWORD = os.environ.get("POSTGRES_PASSWORD", "admin") POSTGRES_DB = os.environ.get("POSTGRES_DB"...
[ 11748, 28686, 198, 198, 2969, 31484, 6234, 62, 27082, 2390, 2767, 1137, 796, 28686, 13, 268, 2268, 13, 1136, 10786, 2969, 31484, 6234, 62, 27082, 2390, 2767, 1137, 3256, 705, 1820, 62, 17143, 2357, 11537, 198, 198, 32782, 10761, 1546, 6...
2.42446
139
import csv import json import urllib from bs4 import BeautifulSoup from datetime import datetime, timedelta from decimal import Decimal from xml.etree import ElementTree from lxml import etree import requests from django.utils import timezone, dateparse from driver.models import GPSDevice, GPSDeviceLog, TracknovateGP...
[ 11748, 269, 21370, 198, 11748, 33918, 198, 11748, 2956, 297, 571, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 6738, 32465, 1330, 4280, 4402, 198, 6738, 35555, 13, 316, ...
2.416552
1,450
from django.db import models class Theme(models.Model): """ Topic of interest """ name = models.CharField(max_length=150, blank=False) comments = models.TextField(blank=True, default="") parent_theme = models.ForeignKey( 'self', on_delete=models.CASCADE, related...
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 628, 198, 4871, 26729, 7, 27530, 13, 17633, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 47373, 286, 1393, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 1438, 79...
2.675879
796
# -*- coding: utf-8 -*- import sys from colorama import init, Fore, Style import random, string if __name__ == '__main__': try: init(autoreset=True) text = raw_input(Fore.YELLOW+'[*] Set the text you want to encrypt: '+ Style.RESET_ALL) # sec_key = 'asdhjuiktu76tgb4'#16 # bit ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 11748, 25064, 201, 198, 6738, 3124, 1689, 1330, 2315, 11, 4558, 11, 17738, 201, 198, 11748, 4738, 11, 4731, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 197,...
2.103982
904
#!/usr/bin/env python """ rtfobj.py rtfobj is a Python module to extract embedded objects from RTF files, such as OLE ojects. It can be used as a Python library or a command-line tool. Usage: rtfobj.py <file.rtf> rtfobj project website: http://www.decalage.info/python/rtfobj rtfobj is part of the python-oletools pa...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 198, 17034, 69, 26801, 13, 9078, 198, 198, 17034, 69, 26801, 318, 257, 11361, 8265, 284, 7925, 14553, 5563, 422, 371, 10234, 3696, 11, 884, 355, 198, 46, 2538, 267, 752, 82, 1...
2.532448
6,102
#!/usr/bin/env python3 import RPi.GPIO as GPIO # import GPIO from hx711 import HX711 # import the class HX711 from hx711 import outliers_filter try: GPIO.setmode(GPIO.BCM) # set GPIO pin mode to BCM numbering # Create an object hx which represents your real hx711 chip # Required input parameters are onl...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 25812, 72, 13, 16960, 9399, 355, 50143, 220, 1303, 1330, 50143, 198, 6738, 289, 87, 22, 1157, 1330, 367, 55, 22, 1157, 220, 1303, 1330, 262, 1398, 367, 55, 22, 1157, 198, ...
2.785992
2,827
""" Created on 24.09.2009 @author: alen """ from django import template register = template.Library() @register.inclusion_tag('socialregistration/openid_form.html')
[ 37811, 198, 41972, 319, 1987, 13, 2931, 13, 10531, 198, 198, 31, 9800, 25, 435, 268, 198, 37811, 198, 6738, 42625, 14208, 1330, 11055, 198, 198, 30238, 796, 11055, 13, 23377, 3419, 198, 198, 31, 30238, 13, 259, 4717, 62, 12985, 10786,...
3.111111
54
# -*- coding: utf-8 -*- # Generated by Django 1.11.11 on 2018-11-19 13:11 from __future__ import unicode_literals from django.db import migrations, models
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 1157, 13, 1157, 319, 2864, 12, 1157, 12, 1129, 1511, 25, 1157, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198,...
2.754386
57
from django.urls import path from home import views as home_view from . import views urlpatterns = [ path('', home_view.index, name='index'), path('',views.index, name='Programming'), path('',views.index, name='Music'), path('',views.index, name='Design'), ]
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 198, 6738, 1363, 1330, 5009, 355, 1363, 62, 1177, 198, 6738, 764, 1330, 5009, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 3108, 10786, 3256, 1363, 62, 1177, 13, 9630, 1...
2.865979
97
# Authors: Raghav RV <rvraghav93@gmail.com> # License: BSD 3 clause import pickle from sklearn.utils.deprecation import _is_deprecated from sklearn.utils.deprecation import deprecated from sklearn.utils._testing import assert_warns_message @deprecated('qwerty') @deprecated()
[ 2, 46665, 25, 371, 10471, 615, 31367, 1279, 81, 37020, 10471, 615, 6052, 31, 14816, 13, 785, 29, 201, 198, 2, 13789, 25, 347, 10305, 513, 13444, 201, 198, 201, 198, 201, 198, 11748, 2298, 293, 201, 198, 201, 198, 6738, 1341, 35720, ...
2.540984
122