content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
from __future__ import absolute_import import six from rest_framework.response import Response from sentry.api.bases.project import ProjectEndpoint from sentry.models import TagKey, TagKeyStatus
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 11748, 2237, 198, 198, 6738, 1334, 62, 30604, 13, 26209, 1330, 18261, 198, 198, 6738, 1908, 563, 13, 15042, 13, 65, 1386, 13, 16302, 1330, 4935, 12915, 4122, 198, 6738, 1908, 5...
3.826923
52
from __future__ import print_function # For Py2/3 compatibility import async_eel import random import asyncio loop = asyncio.get_event_loop() async def print_num(n): """callback of js_random""" print('Got this from Javascript:', n) if __name__ == '__main__': asyncio.run_coroutine_threadsafe(main(), ...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 197, 2, 1114, 9485, 17, 14, 18, 17764, 198, 11748, 30351, 62, 68, 417, 198, 11748, 4738, 198, 11748, 30351, 952, 628, 198, 26268, 796, 30351, 952, 13, 1136, 62, 15596, 62, 26268, 3419, ...
2.837398
123
# coding=utf-8 """ Access methods for indexing datasets & products. """ import logging from datacube.config import LocalConfig from datacube.drivers import index_driver_by_name, index_drivers from .index import Index _LOG = logging.getLogger(__name__) def index_connect(local_config=None, application_name=None, val...
[ 2, 19617, 28, 40477, 12, 23, 198, 37811, 198, 15457, 5050, 329, 6376, 278, 40522, 1222, 3186, 13, 198, 37811, 198, 198, 11748, 18931, 198, 198, 6738, 4818, 330, 3266, 13, 11250, 1330, 10714, 16934, 198, 6738, 4818, 330, 3266, 13, 3670...
2.753927
573
#!/usr/bin/env python3 # # load_message.py - takes a single email or mbox formatted # file on stdin or in a file and reads it into the database. # import os import sys from optparse import OptionParser from configparser import ConfigParser import psycopg2 from lib.storage import ArchivesParserStorage from lib.mbox ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 198, 2, 3440, 62, 20500, 13, 9078, 532, 2753, 257, 2060, 3053, 393, 285, 3524, 39559, 198, 2, 2393, 319, 14367, 259, 393, 287, 257, 2393, 290, 9743, 340, 656, 262, 6831, 13,...
2.205099
2,667
# -*- coding: utf-8 -*- # Generated by Django 1.11.29 on 2020-03-10 14:30 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 1157, 13, 1959, 319, 12131, 12, 3070, 12, 940, 1478, 25, 1270, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198,...
2.753623
69
from dataset.baseset import BaseSet import random, cv2 import numpy as np
[ 6738, 27039, 13, 65, 1386, 316, 1330, 7308, 7248, 201, 198, 11748, 4738, 11, 269, 85, 17, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198,...
1.980769
52
# -*- coding: utf-8 -*- import mock from nose.tools import * # noqa (PEP8 asserts) import hmac import hashlib from StringIO import StringIO from django.core.exceptions import ValidationError from django.db import IntegrityError import furl from framework.auth import get_or_create_user from framework.auth.core impo...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 15290, 198, 6738, 9686, 13, 31391, 1330, 1635, 220, 1303, 645, 20402, 357, 47, 8905, 23, 29348, 8, 198, 198, 11748, 289, 20285, 198, 11748, 12234, 8019, 198,...
3.553097
226
import socketserver import socket import sys import threading import json import queue import time import datetime import traceback def run(config, handlers): server = Server(handlers) server.configure(config) return server
[ 11748, 37037, 18497, 198, 11748, 17802, 198, 11748, 25064, 198, 11748, 4704, 278, 198, 11748, 33918, 198, 11748, 16834, 198, 11748, 640, 198, 11748, 4818, 8079, 198, 11748, 12854, 1891, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, ...
3.194805
77
# -*- coding: ascii -*- import sys import json # handles a zoom firmware if __name__ == "__main__": if len(sys.argv) == 2: f = open(sys.argv[1], "rb") data = f.read() f.close() check(data)
[ 2, 532, 9, 12, 19617, 25, 355, 979, 72, 532, 9, 12, 201, 198, 11748, 25064, 201, 198, 11748, 33918, 201, 198, 201, 198, 201, 198, 2, 17105, 257, 19792, 18779, 201, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 201,...
1.897638
127
# 6 a-zA-Z0-9 import random source = '' lower_char = [chr(x) for x in range(ord('a'), ord('z') + 1)] upper_char = [chr(x) for x in range(ord('A'), ord('Z') + 1)] number_char = [chr(x) for x in range(ord('0'), ord('9') + 1)] source += "".join(lower_char) source += "".join(upper_char) source += "".join(number_char) sour...
[ 2, 718, 257, 12, 89, 32, 12, 57, 15, 12, 24, 198, 11748, 4738, 198, 198, 10459, 796, 10148, 198, 21037, 62, 10641, 796, 685, 354, 81, 7, 87, 8, 329, 2124, 287, 2837, 7, 585, 10786, 64, 33809, 2760, 10786, 89, 11537, 1343, 352, ...
2.242574
202
from django.test import TestCase from rest_framework.test import APIRequestFactory from .models import GBIC, GBICType from .views import GBICListViewSet # Create your tests here.
[ 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 1334, 62, 30604, 13, 9288, 1330, 7824, 18453, 22810, 198, 6738, 764, 27530, 1330, 13124, 2149, 11, 13124, 2149, 6030, 198, 6738, 764, 33571, 1330, 13124, 2149, 8053, 7680, 7248, ...
3.693878
49
import inspect from typing import List, Union, Set, Any import numpy as np from fruits.cache import Cache, CoquantileCache from fruits.scope import force_input_shape, FitTransform from fruits.core.callback import AbstractCallback from fruits.signature.iss import SignatureCalculator, CachePlan from fruits.words.word i...
[ 11748, 10104, 198, 6738, 19720, 1330, 7343, 11, 4479, 11, 5345, 11, 4377, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 15921, 13, 23870, 1330, 34088, 11, 1766, 40972, 576, 30562, 198, 6738, 15921, 13, 29982, 1330, 2700, 62, ...
2.217981
8,409
import os import argparse import subprocess import socket import sys import click from django.core.management import execute_from_command_line from workoutizer.settings import WORKOUTIZER_DIR, WORKOUTIZER_DB_PATH, TRACKS_DIR from workoutizer import __version__ BASE_DIR = os.path.dirname(os.path.dirname(__file__)) SE...
[ 11748, 28686, 198, 11748, 1822, 29572, 198, 11748, 850, 14681, 198, 11748, 17802, 198, 11748, 25064, 198, 198, 11748, 3904, 198, 6738, 42625, 14208, 13, 7295, 13, 27604, 1330, 12260, 62, 6738, 62, 21812, 62, 1370, 198, 198, 6738, 17578, ...
2.661074
298
"""Provide trimming of input reads from Fastq or BAM files. """ import os import sys import tempfile from bcbio.utils import (file_exists, safe_makedir, replace_suffix, append_stem, is_pair, replace_directory, map_wrap) from bcbio.log import logger from bcbio.bam impor...
[ 37811, 15946, 485, 15797, 2229, 286, 5128, 9743, 422, 12549, 80, 393, 347, 2390, 3696, 13, 198, 37811, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 20218, 7753, 198, 198, 6738, 275, 21101, 952, 13, 26791, 1330, 357, 7753, 62, 1069,...
2.372174
1,725
from rest_framework.response import Response from rest_framework.views import APIView from django.shortcuts import get_object_or_404 from dashboard.models import projects from .models import AnalysisConfig, SolverResults, SolverProgress, DockerLogs from rest_framework.parsers import FormParser, JSONParser, MultiPartPar...
[ 6738, 1334, 62, 30604, 13, 26209, 1330, 18261, 198, 6738, 1334, 62, 30604, 13, 33571, 1330, 3486, 3824, 769, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 651, 62, 15252, 62, 273, 62, 26429, 198, 6738, 30415, 13, 27530, 1330, 4493, ...
3.147887
284
# coding: utf-8 """``AppFS`` opener definition. """ from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals from .base import Opener from .errors import OpenerError from ..subfs import ClosingSubFS from .. import appfs
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 37811, 15506, 4677, 10652, 15506, 21996, 6770, 13, 198, 37811, 198, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 11593, 37443, ...
3.5375
80
import numpy as np from sklearn.metrics import fbeta_score, roc_curve, auc, confusion_matrix from sklearn.decomposition import PCA from sklearn import random_projection from sklearn import svm from sklearn.ensemble import IsolationForest import matplotlib.pyplot as plt from keras.layers import Dense, Input, Dropout fro...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 1341, 35720, 13, 4164, 10466, 1330, 277, 31361, 62, 26675, 11, 686, 66, 62, 22019, 303, 11, 257, 1229, 11, 10802, 62, 6759, 8609, 198, 6738, 1341, 35720, 13, 12501, 296, 9150, 1330, 4217, 32, ...
3.483146
178
# encoding: utf-8 import unittest import os import sys sys.path.append(os.getcwd()) from notifo import Notifo, send_message if __name__ == '__main__': unittest.main()
[ 2, 21004, 25, 3384, 69, 12, 23, 198, 11748, 555, 715, 395, 198, 11748, 28686, 198, 11748, 25064, 198, 17597, 13, 6978, 13, 33295, 7, 418, 13, 1136, 66, 16993, 28955, 198, 6738, 407, 361, 78, 1330, 1892, 361, 78, 11, 3758, 62, 2050...
2.567164
67
#!/usr/bin/env python # -*- coding: utf-8 -*- # import numpy as np import .Selection as Sel import .Exploration as Exp import .CatUtils as CU #----------------------------------------------------------------------------------------- #----------------------------------------------------------------------------------...
[ 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, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 764, 4653, 1564, 355, 15300, 198, 11748, 764, 18438, 6944,...
4.954545
66
from typing import List from presidio_analyzer import EntityRecognizer, RecognizerResult, AnalysisExplanation from presidio_analyzer.nlp_engine import NlpArtifacts from hebsafeharbor.common.terms_recognizer import TermsRecognizer
[ 6738, 19720, 1330, 7343, 198, 6738, 906, 312, 952, 62, 38200, 9107, 1330, 20885, 6690, 2360, 7509, 11, 31517, 7509, 23004, 11, 14691, 3109, 11578, 341, 198, 6738, 906, 312, 952, 62, 38200, 9107, 13, 21283, 79, 62, 18392, 1330, 399, 34...
3.569231
65
# encoding: utf-8 # # Copyright (C) 2018 ycmd contributors # # This file is part of ycmd. # # ycmd 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, either version 3 of the License, or # (at your option) any lat...
[ 2, 21004, 25, 3384, 69, 12, 23, 198, 2, 198, 2, 15069, 357, 34, 8, 2864, 331, 28758, 20420, 198, 2, 198, 2, 770, 2393, 318, 636, 286, 331, 28758, 13, 198, 2, 198, 2, 331, 28758, 318, 1479, 3788, 25, 345, 460, 17678, 4163, 340,...
1.981642
8,171
""" Config class containing all the settings for running sentiment scoring tool """ import jsonpickle
[ 37811, 198, 16934, 1398, 7268, 477, 262, 6460, 329, 2491, 15598, 9689, 2891, 198, 37811, 198, 198, 11748, 33918, 27729, 293 ]
4.857143
21
# Copyright 2020 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
[ 2, 15069, 12131, 43208, 21852, 1766, 1539, 12052, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198...
1.996522
4,600
from parameterized import parameterized from numpy.testing import TestCase from .. import candy
[ 6738, 11507, 1143, 1330, 11507, 1143, 198, 6738, 299, 32152, 13, 33407, 1330, 6208, 20448, 198, 198, 6738, 11485, 1330, 18550, 628 ]
4.454545
22
import time import subprocess import os print os.uname() if not os.uname()[0].startswith("Darw"): import pygame pygame.mixer.init() # Plays a song
[ 11748, 640, 198, 11748, 850, 14681, 198, 11748, 28686, 198, 198, 4798, 28686, 13, 403, 480, 3419, 198, 361, 407, 28686, 13, 403, 480, 3419, 58, 15, 4083, 9688, 2032, 342, 7203, 32708, 86, 1, 2599, 198, 197, 11748, 12972, 6057, 198, ...
2.52459
61
from __future__ import absolute_import, unicode_literals, print_function import mock import unittest import d43_aws_tools as aws_tools from boto3.dynamodb.conditions import Attr
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 28000, 1098, 62, 17201, 874, 11, 3601, 62, 8818, 198, 11748, 15290, 198, 11748, 555, 715, 395, 198, 11748, 288, 3559, 62, 8356, 62, 31391, 355, 3253, 82, 62, 31391, 198, 6738, 275, ...
3.178571
56
from dash import Dash, html, dcc import plotly.express as px import pandas as pd app = Dash(__name__) server = app.server # assume you have a "long-form" data frame # see https://plotly.com/python/px-arguments/ for more options df = pd.DataFrame({ "Fruit": ["Apples", "Oranges", "Bananas", "Apples", "Oranges", "Ba...
[ 6738, 14470, 1330, 16189, 11, 27711, 11, 288, 535, 198, 11748, 7110, 306, 13, 42712, 355, 279, 87, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 1324, 796, 16189, 7, 834, 3672, 834, 8, 198, 15388, 796, 598, 13, 15388, 198, 198, ...
2.45092
326
# pypi import six # local from ...lib import db as lib_db from ...lib import utils from ...model import objects as model_objects from ...model import utils as model_utils from . import formhandling # ============================================================================== def decode_args(getcreate_args): ...
[ 2, 279, 4464, 72, 198, 11748, 2237, 198, 198, 2, 1957, 198, 6738, 2644, 8019, 1330, 20613, 355, 9195, 62, 9945, 198, 6738, 2644, 8019, 1330, 3384, 4487, 198, 6738, 2644, 19849, 1330, 5563, 355, 2746, 62, 48205, 198, 6738, 2644, 19849,...
2.278546
5,859
# # Copyright 20202021 Xilinx, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
[ 2, 198, 2, 15069, 12131, 1238, 2481, 1395, 346, 28413, 11, 3457, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351...
3.697674
172
item1='phone' item1_price = 100 item1_quantity = 5 item1_price_total = item1_price * item1_quantity print(type(item1)) # str print(type(item1_price)) # int print(type(item1_quantity)) # int print(type(item1_price_total)) # int # output: # <class 'str'> # <class 'int'> # ...
[ 9186, 16, 11639, 4862, 6, 198, 9186, 16, 62, 20888, 796, 1802, 198, 9186, 16, 62, 40972, 414, 796, 642, 198, 9186, 16, 62, 20888, 62, 23350, 796, 2378, 16, 62, 20888, 1635, 2378, 16, 62, 40972, 414, 198, 198, 4798, 7, 4906, 7, 9...
2.04
175
_base_ = "./FlowNet512_1.5AugCosyAAEGray_NoiseRandom_AggressiveR_ClipGrad_fxfy1_Dtw01_LogDz_PM10_Flat_Pbr_01_02MasterChefCan.py" OUTPUT_DIR = "output/deepim/ycbvPbrSO/FlowNet512_1.5AugCosyAAEGray_NoiseRandom_AggressiveR_ClipGrad_fxfy1_Dtw01_LogDz_PM10_Flat_ycbvPbr_SO/16_36WoodBlock" DATASETS = dict(TRAIN=("ycbv_036_woo...
[ 62, 8692, 62, 796, 366, 19571, 37535, 7934, 25836, 62, 16, 13, 20, 12512, 36734, 88, 3838, 7156, 2433, 62, 2949, 786, 29531, 62, 46384, 3314, 49, 62, 2601, 541, 42731, 62, 21373, 24928, 16, 62, 35, 4246, 486, 62, 11187, 35, 89, 62...
2.023669
169
from .columns import OC from .paging import get_page, select_page, process_args from .results import serialize_bookmark, unserialize_bookmark, Page, Paging __all__ = [ 'OC', 'get_page', 'select_page', 'serialize_bookmark', 'unserialize_bookmark', 'Page', 'Paging', 'process_args' ]
[ 198, 6738, 764, 28665, 82, 1330, 24775, 198, 6738, 764, 79, 3039, 1330, 651, 62, 7700, 11, 2922, 62, 7700, 11, 1429, 62, 22046, 198, 6738, 764, 43420, 1330, 11389, 1096, 62, 2070, 4102, 11, 555, 46911, 1096, 62, 2070, 4102, 11, 7873...
2.46875
128
# coding=utf-8 # Copyright 2022 The Google Research 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 by applicab...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 33160, 383, 3012, 4992, 46665, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, ...
3.67619
315
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries # SPDX-License-Identifier: MIT import time import board import busio from adafruit_icm20x import ICM20948 cycles = 200 i2c = busio.I2C(board.SCL, board.SDA) icm = ICM20948(i2c) # Cycle between two data rates # Best viewed in the Mu serial plotter where y...
[ 2, 30628, 55, 12, 8979, 15269, 8206, 25, 33448, 10846, 4763, 329, 1215, 1878, 4872, 20171, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 17168, 198, 198, 11748, 640, 198, 11748, 3096, 198, 11748, 1323, 952, 198, 6738, 512, 1878, ...
2.486207
290
a = int(input()) while a: for x in range(a-1): out = '*' + ' ' * (a-x-2) + '*' + ' ' * (a-x-2) + '*' print(out.center(2*a-1)) print('*' * (2 * a - 1)) for x in range(a-1): out = '*' + ' ' * x + '*' + ' ' * x + '*' print(out.center(2*a-1)) a = int(input())
[ 64, 796, 493, 7, 15414, 28955, 198, 4514, 257, 25, 198, 220, 220, 220, 329, 2124, 287, 2837, 7, 64, 12, 16, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 503, 796, 705, 9, 6, 1343, 705, 705, 1635, 357, 64, 12, 87, 12, 17, 8,...
1.717514
177
import datetime import json import os from pathlib import Path from types import SimpleNamespace from typing import List from typing import NamedTuple, Union, Optional, Callable from uuid import uuid3, NAMESPACE_DNS from dateutil.parser import parse _VIDEO_SUFFIXES = [".mkv", ".mp4"] _IMAGE_SUFFIXES = [".jpg"] _PERMI...
[ 11748, 4818, 8079, 198, 11748, 33918, 198, 11748, 28686, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 3858, 1330, 17427, 36690, 10223, 198, 6738, 19720, 1330, 7343, 198, 6738, 19720, 1330, 34441, 51, 29291, 11, 4479, 11, 32233, 11, 4889...
2.264364
3,359
# Generated by Django 2.2.1 on 2019-09-27 14:23 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 16, 319, 13130, 12, 2931, 12, 1983, 1478, 25, 1954, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
#!/usr/bin/env python3 # This Source Code Form is subject to the terms of the MIT # License. If a copy of the same was not distributed with this # file, You can obtain one at # https://github.com/akhilpandey95/scholarlyimpact/blob/master/LICENSE. import os import csv import glob import json import requests import sub...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 770, 8090, 6127, 5178, 318, 2426, 284, 262, 2846, 286, 262, 17168, 198, 2, 13789, 13, 1002, 257, 4866, 286, 262, 976, 373, 407, 9387, 351, 428, 198, 2, 2393, 11, 921, ...
2.463627
2,873
#Copyright ReportLab Europe Ltd. 2000-2012 #see license.txt for license details #history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/pdfgen/pathobject.py __version__=''' $Id$ ''' __doc__=""" PDFPathObject is an efficient way to draw paths on a Canvas. Do not instantiate directly, obt...
[ 2, 15269, 6358, 17822, 2031, 12052, 13, 4751, 12, 6999, 198, 2, 3826, 5964, 13, 14116, 329, 5964, 3307, 198, 2, 23569, 2638, 1378, 2503, 13, 13116, 23912, 13, 1073, 13, 2724, 14, 37157, 12, 8800, 14, 1177, 66, 14259, 13, 37157, 14, ...
2.970588
170
import wikipedia import re import TCPclient as client WORDS = ["WIKIPEDIA","SEARCH","INFORMATION"]
[ 11748, 47145, 11151, 198, 11748, 302, 198, 11748, 23633, 16366, 355, 5456, 198, 198, 45359, 5258, 796, 14631, 54, 18694, 4061, 1961, 3539, 2430, 5188, 31315, 2430, 1268, 35036, 8973, 628, 628 ]
3.21875
32
import random print("Title : Eat, Drink, And Be Sick") noun = [] for i in range(4): n = input("Enter noun : ") noun.append(n) plural = [] for i in range(6): pn = input("Enter plural noun : ") plural.append(pn) adjective = [] for i in range(2): a = input("Enter adjective : ") adjective.append(a) ...
[ 11748, 4738, 198, 4798, 7203, 19160, 1058, 27574, 11, 32906, 11, 843, 1355, 32181, 4943, 198, 77, 977, 796, 17635, 198, 1640, 1312, 287, 2837, 7, 19, 2599, 198, 220, 220, 220, 299, 796, 5128, 7203, 17469, 23227, 1058, 366, 8, 198, 2...
3.222717
449
import numpy g = open('/home/srallaba/mgc/transposed/arctic_a0404.mgc','w') x = numpy.loadtxt('/home/srallaba/mgc_spaces/arctic_a0404.mgc') numpy.savetxt(g, numpy.transpose(x)) g.close()
[ 11748, 299, 32152, 220, 198, 70, 796, 1280, 10786, 14, 11195, 14, 27891, 439, 15498, 14, 11296, 66, 14, 7645, 29813, 14, 283, 11048, 62, 64, 15, 26429, 13, 11296, 66, 41707, 86, 11537, 198, 87, 796, 220, 299, 32152, 13, 2220, 14116,...
2.076087
92
from zone_api.core.zone_manager import ZoneManager from zone_api import platform_encapsulator as pe from zone_api.core.zone import Zone from zone_api.core.zone_event import ZoneEvent from zone_api.core.devices.dimmer import Dimmer from zone_api.core.devices.switch import Fan, Light, Switch from zone_api.core.devices.i...
[ 6738, 6516, 62, 15042, 13, 7295, 13, 11340, 62, 37153, 1330, 13035, 13511, 198, 6738, 6516, 62, 15042, 1330, 3859, 62, 12685, 1686, 8927, 355, 613, 198, 198, 6738, 6516, 62, 15042, 13, 7295, 13, 11340, 1330, 13035, 198, 6738, 6516, 62...
3.19171
193
from rest_framework.response import Response from rest_framework.views import APIView from django_redis import get_redis_connection from goods.models import SKU from decimal import Decimal from rest_framework.generics import CreateAPIView,ListAPIView from rest_framework.mixins import ListModelMixin from orders.serializ...
[ 6738, 1334, 62, 30604, 13, 26209, 1330, 18261, 198, 6738, 1334, 62, 30604, 13, 33571, 1330, 3486, 3824, 769, 198, 6738, 42625, 14208, 62, 445, 271, 1330, 651, 62, 445, 271, 62, 38659, 198, 6738, 7017, 13, 27530, 1330, 14277, 52, 198, ...
3.590164
183
import argparse import errno import logging import os import platform import signal import sys from collections import OrderedDict from contextlib import closing from distutils.version import StrictVersion from functools import partial from gettext import gettext from itertools import chain from pathlib import Path fro...
[ 11748, 1822, 29572, 198, 11748, 11454, 3919, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 3859, 198, 11748, 6737, 198, 11748, 25064, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 6738, 4732, 8019, 1330, 9605, 198, 6738, 1233, 26...
2.341086
12,727
from io import BytesIO from io import StringIO import json from bson.dbref import DBRef import datetime from bson import json_util import logging import base64 jsonCode ={ "building":{ "Essae Vaishnavi Solitaire": { "id": "B1", "division": { "SS"...
[ 6738, 33245, 1330, 2750, 4879, 9399, 198, 6738, 33245, 1330, 10903, 9399, 198, 11748, 33918, 198, 6738, 275, 1559, 13, 67, 4679, 69, 1330, 20137, 8134, 198, 11748, 4818, 8079, 198, 6738, 275, 1559, 1330, 33918, 62, 22602, 198, 11748, 18...
1.188848
6,492
# python3 # coding=utf-8 # Copyright 2020 Google LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
[ 2, 21015, 18, 198, 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 12131, 3012, 11419, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2...
2.631893
671
from django.core.management.base import BaseCommand import logging import re from talentmap_api.common.xml_helpers import XMLloader, strip_extra_spaces, parse_boolean, parse_date, get_nested_tag from talentmap_api.language.models import Language, Proficiency from talentmap_api.position.models import Grade, Skill, Pos...
[ 6738, 42625, 14208, 13, 7295, 13, 27604, 13, 8692, 1330, 7308, 21575, 198, 198, 11748, 18931, 198, 11748, 302, 198, 198, 6738, 7401, 8899, 62, 15042, 13, 11321, 13, 19875, 62, 16794, 364, 1330, 23735, 29356, 11, 10283, 62, 26086, 62, ...
3.612403
129
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Unit tests for gluon.recfile """ import unittest import os import shutil import uuid from .fix_path import fix_sys_path fix_sys_path(__file__) from gluon import recfile if __name__ == '__main__': unittest.main()
[ 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, 220, 220, 220, 11801, 5254, 329, 1278, 84, 261, 13, 8344, 7753, 198, 37811, 198, 11748, 555, 715, 39...
2.442478
113
import json import os import subprocess from dotenv import load_dotenv from subprocess import check_output, Popen, PIPE load_dotenv() # Accessing variables. CLIENT_ID = os.environ.get('CLIENT_ID') CLIENT_SECRET = os.environ.get('CLIENT_SECRET') USERNAME = os.environ.get('USERNAME') BUCKET_NAME = os.environ.get('BUCK...
[ 11748, 33918, 198, 11748, 28686, 198, 11748, 850, 14681, 198, 198, 6738, 16605, 24330, 1330, 3440, 62, 26518, 24330, 198, 6738, 850, 14681, 1330, 2198, 62, 22915, 11, 8099, 268, 11, 350, 4061, 36, 198, 198, 2220, 62, 26518, 24330, 3419,...
2.659498
279
# -*- coding: utf-8 -*- ########################################################################### ## Python code generated with wxFormBuilder (version Aug 8 2018) ## http://www.wxformbuilder.org/ ## ## PLEASE DO *NOT* EDIT THIS FILE! ########################################################################### impo...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 220, 198, 198, 29113, 29113, 7804, 21017, 198, 2235, 11361, 2438, 7560, 351, 266, 87, 8479, 32875, 357, 9641, 2447, 220, 807, 2864, 8, 198, 2235, 2638, 1378, 2503, 13, 49345,...
5.068627
102
""" dependencies.contrib.celery --------------------------- This module implements injectable Celery task. :copyright: (c) 2016-2020 by dry-python team. :license: BSD, see LICENSE for more details. """ from _dependencies.contrib.celery import shared_task from _dependencies.contrib.celery import task __all__ = ["sha...
[ 37811, 198, 45841, 3976, 13, 3642, 822, 13, 7015, 88, 198, 22369, 6329, 198, 198, 1212, 8265, 23986, 8677, 540, 15248, 1924, 4876, 13, 198, 198, 25, 22163, 4766, 25, 357, 66, 8, 1584, 12, 42334, 416, 5894, 12, 29412, 1074, 13, 198, ...
3.356436
101
"""Miscellaneous utility functions.""" from functools import reduce from PIL import Image import numpy as np from matplotlib.colors import rgb_to_hsv, hsv_to_rgb def compose(*funcs): """Compose arbitrarily many functions, evaluated left to right. Reference: https://mathieularose.com/function-composition-in-...
[ 37811, 31281, 25673, 10361, 5499, 526, 15931, 198, 198, 6738, 1257, 310, 10141, 1330, 4646, 198, 198, 6738, 350, 4146, 1330, 7412, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 2603, 29487, 8019, 13, 4033, 669, 1330, 46140, 62, 1462, 6...
1.989158
2,767
import logging import pathlib logging.basicConfig(level=logging.INFO) # Dirs ROOT_DIR = pathlib.Path(__file__).parent.absolute() DUMP_DIR = ROOT_DIR / 'dumps'
[ 11748, 18931, 198, 11748, 3108, 8019, 198, 198, 6404, 2667, 13, 35487, 16934, 7, 5715, 28, 6404, 2667, 13, 10778, 8, 198, 198, 2, 360, 17062, 198, 13252, 2394, 62, 34720, 796, 3108, 8019, 13, 15235, 7, 834, 7753, 834, 737, 8000, 13,...
2.639344
61
import re from pyquery import PyQuery as pq from .. import utils from .constants import RANKINGS_SCHEME, RANKINGS_URL from six.moves.urllib.error import HTTPError
[ 11748, 302, 198, 6738, 12972, 22766, 1330, 9485, 20746, 355, 279, 80, 198, 6738, 11485, 1330, 3384, 4487, 198, 6738, 764, 9979, 1187, 1330, 371, 15154, 20754, 62, 50, 3398, 3620, 36, 11, 371, 15154, 20754, 62, 21886, 198, 6738, 2237, ...
3.037037
54
import importlib from ditk import logging from collections import OrderedDict from functools import wraps import ding ''' Overview: `hpc_wrapper` is the wrapper for functions which are supported by hpc. If a function is wrapped by it, we will search for its hpc type and return the function implemented by hpc. ...
[ 11748, 1330, 8019, 198, 6738, 288, 270, 74, 1330, 18931, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 6738, 1257, 310, 10141, 1330, 27521, 198, 11748, 44852, 198, 7061, 6, 198, 29064, 25, 198, 220, 220, 220, 4600, 71, 14751, 62,...
2.316195
1,167
#Return the count of int(s) in passed array.
[ 2, 13615, 262, 954, 286, 493, 7, 82, 8, 287, 3804, 7177, 13, 220 ]
3.214286
14
import re from zlib import crc32 from ..utils import snake_to_camel_case CORE_TYPES = ( 0xbc799737, # boolFalse#bc799737 = Bool; 0x997275b5, # boolTrue#997275b5 = Bool; 0x3fedd339, # true#3fedd339 = True; 0x1cb5c415, # vector#1cb5c415 {t:Type} # [ t ] = Vector t; ) # https://github.com/telegramde...
[ 11748, 302, 198, 6738, 1976, 8019, 1330, 1067, 66, 2624, 198, 198, 6738, 11485, 26791, 1330, 17522, 62, 1462, 62, 66, 17983, 62, 7442, 198, 198, 34, 6965, 62, 9936, 47, 1546, 796, 357, 198, 220, 220, 220, 657, 87, 15630, 22, 39647, ...
1.88822
1,494
"Actions for compiling resx files" load( "@io_bazel_rules_dotnet//dotnet/private:providers.bzl", "DotnetResourceInfo", ) def emit_resx_core( dotnet, name = "", src = None, identifier = None, out = None, customresgen = None): """The function adds an action th...
[ 1, 32, 2733, 329, 33393, 581, 87, 3696, 1, 198, 198, 2220, 7, 198, 220, 220, 220, 44212, 952, 62, 65, 41319, 62, 38785, 62, 26518, 3262, 1003, 26518, 3262, 14, 19734, 25, 15234, 4157, 13, 65, 48274, 1600, 198, 220, 220, 220, 366, ...
2.545558
878
# Owner(s): ["oncall: jit"] import torch import os import sys from torch.testing._internal.jit_utils import JitTestCase # Make the helper files in test/ importable pytorch_test_dir = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) sys.path.append(pytorch_test_dir) if __name__ == '__main__': raise Ru...
[ 2, 23853, 7, 82, 2599, 14631, 261, 13345, 25, 474, 270, 8973, 198, 198, 11748, 28034, 198, 11748, 28686, 198, 11748, 25064, 198, 6738, 28034, 13, 33407, 13557, 32538, 13, 45051, 62, 26791, 1330, 449, 270, 14402, 20448, 198, 198, 2, 68...
2.408867
203
import gym import pix_sample_arena import time import pybullet as p import pybullet_data import cv2 if __name__ == "__main__": env = gym.make("pix_sample_arena-v0") x = 0 while True: p.stepSimulation() time.sleep(100)
[ 11748, 11550, 198, 11748, 279, 844, 62, 39873, 62, 533, 2616, 198, 11748, 640, 198, 11748, 12972, 15065, 1616, 355, 279, 198, 11748, 12972, 15065, 1616, 62, 7890, 198, 11748, 269, 85, 17, 198, 198, 361, 11593, 3672, 834, 6624, 366, 83...
2.326923
104
from datetime import time import pytest from i3_battery_block_vgg.timeparser import __parse_time_manually from i3_battery_block_vgg.timeparser import parse_time
[ 6738, 4818, 8079, 1330, 640, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 1312, 18, 62, 65, 16296, 62, 9967, 62, 85, 1130, 13, 2435, 48610, 1330, 11593, 29572, 62, 2435, 62, 805, 935, 198, 6738, 1312, 18, 62, 65, 16296, 62, 9967, ...
3
55
# RUN: %PYTHON% %s 2>&1 | FileCheck %s from __future__ import annotations import mlir import pycde from pycde import (Input, Output, Parameter, module, externmodule, generator, types, dim) from circt.dialects import comb, hw class Coefficients: def __init__(self, coeff): self.coeff = co...
[ 2, 32494, 25, 4064, 47, 56, 4221, 1340, 4, 4064, 82, 362, 29, 5, 16, 930, 9220, 9787, 4064, 82, 198, 198, 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 11748, 25962, 343, 198, 198, 11748, 12972, 66, 2934, 198, 6738, 12972, 66, 2...
2.288721
1,188
#! /usr/bin/env python import arc import sys import os # wait for all the background threads to finish before we destroy the objects they may use import atexit # arc.Logger.getRootLogger().addDestination(arc.LogStream(sys.stderr)) # arc.Logger.getRootLogger().setThreshold(arc.DEBUG) # run the example example()
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 10389, 198, 11748, 25064, 198, 11748, 28686, 628, 198, 2, 4043, 329, 477, 262, 4469, 14390, 284, 5461, 878, 356, 4117, 262, 5563, 484, 743, 779, 198, 11748, 379, 37023, 198, ...
3.191919
99
# coding: utf-8 # # Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 2, 198, 2, 15069, 1946, 383, 9385, 544, 46665, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743...
2.625711
15,130
"""For neatly implementing static typing in packaging. `mypy` - the static type analysis tool we use - uses the `typing` module, which provides core functionality fundamental to mypy's functioning. Generally, `typing` would be imported at runtime and used in that fashion - it acts as a no-op at runtime and does not h...
[ 37811, 1890, 29776, 15427, 9037, 19720, 287, 16846, 13, 198, 198, 63, 1820, 9078, 63, 532, 262, 9037, 2099, 3781, 2891, 356, 779, 532, 3544, 262, 4600, 774, 13886, 63, 8265, 11, 543, 198, 15234, 1460, 4755, 11244, 7531, 284, 616, 9078...
3.723684
456
from cereal import car from common.numpy_fast import clip, interp from selfdrive.car import apply_toyota_steer_torque_limits, create_gas_interceptor_command, make_can_msg from selfdrive.car.toyota.toyotacan import create_steer_command, create_ui_command, \ create_accel_command...
[ 6738, 33158, 1330, 1097, 198, 6738, 2219, 13, 77, 32152, 62, 7217, 1330, 10651, 11, 987, 79, 198, 6738, 2116, 19472, 13, 7718, 1330, 4174, 62, 83, 726, 4265, 62, 4169, 263, 62, 13165, 4188, 62, 49196, 11, 2251, 62, 22649, 62, 3849, ...
2.209913
343
from flask import Blueprint auth=Blueprint('auth',__name__) from .import views,forms
[ 6738, 42903, 1330, 39932, 198, 18439, 28, 14573, 4798, 10786, 18439, 3256, 834, 3672, 834, 8, 198, 198, 6738, 764, 11748, 5009, 11, 23914 ]
3.541667
24
from flask_wtf import FlaskForm from wtforms import StringField, SubmitField, SelectField from wtforms.validators import DataRequired
[ 6738, 42903, 62, 86, 27110, 1330, 46947, 8479, 198, 6738, 266, 83, 23914, 1330, 10903, 15878, 11, 39900, 15878, 11, 9683, 15878, 198, 6738, 266, 83, 23914, 13, 12102, 2024, 1330, 6060, 37374, 628 ]
3.970588
34
import pandas as pd import numpy as np def estimate_volatility(prices, l): """Create an exponential moving average model of the volatility of a stock price, and return the most recent (last) volatility estimate. Parameters ---------- prices : pandas.Series A series of adjusted closing...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 628, 198, 4299, 8636, 62, 10396, 18486, 7, 1050, 1063, 11, 300, 2599, 198, 220, 220, 220, 37227, 16447, 281, 39682, 3867, 2811, 2746, 286, 262, 30772, 286, 257, 4283...
2.835586
444
import sys n, q = map(int, sys.stdin.readline().split()) s = '$' + sys.stdin.readline().rstrip() lr = zip(*[map(int, sys.stdin.read().split())] * 2) if __name__ == '__main__': ans = main() print(*ans, sep='\n')
[ 11748, 25064, 201, 198, 201, 198, 77, 11, 10662, 796, 3975, 7, 600, 11, 25064, 13, 19282, 259, 13, 961, 1370, 22446, 35312, 28955, 201, 198, 82, 796, 705, 3, 6, 1343, 25064, 13, 19282, 259, 13, 961, 1370, 22446, 81, 36311, 3419, 2...
2.180952
105
import torch import torch.nn as nn from DecoderLayer import DecoderLayer import math
[ 11748, 28034, 201, 198, 11748, 28034, 13, 20471, 355, 299, 77, 201, 198, 6738, 34580, 49925, 1330, 34580, 49925, 201, 198, 11748, 10688, 201 ]
3.666667
24
""" Grains for Cisco NX-OS minions .. versionadded:: 2016.11.0 For documentation on setting up the nxos proxy minion look in the documentation for :mod:`salt.proxy.nxos<salt.proxy.nxos>`. """ import logging import salt.utils.nxos import salt.utils.platform from salt.exceptions import NxosClientError log = logging....
[ 37811, 198, 8642, 1299, 329, 28289, 42482, 12, 2640, 22811, 198, 198, 492, 2196, 29373, 3712, 1584, 13, 1157, 13, 15, 198, 198, 1890, 10314, 319, 4634, 510, 262, 299, 87, 418, 15741, 28365, 804, 287, 262, 10314, 198, 1640, 1058, 4666,...
2.890511
137
from typing import List, Optional, Tuple from tmsproviderapisdk.tms_extended_model import TmsExtendedModel
[ 6738, 19720, 1330, 7343, 11, 32233, 11, 309, 29291, 198, 6738, 256, 907, 15234, 1304, 499, 9409, 74, 13, 83, 907, 62, 2302, 1631, 62, 19849, 1330, 309, 907, 11627, 1631, 17633, 628 ]
3.272727
33
""" A class hierarchy relating to fields of all kinds. """ from __future__ import print_function, division import numpy as np from ciabatta.meta import make_repr_str from fealty import lattice, field_numerics, walled_field_numerics class Field(Space): def density_field(self, r): return density(r, self.L...
[ 37811, 198, 32, 1398, 18911, 11270, 284, 7032, 286, 477, 6982, 13, 198, 37811, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 11, 7297, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 269, 72, 397, 25014, 13, 28961, 1330, 787, 62,...
2.530303
330
""" ASGI config for example_django project. It exposes the ASGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.2/howto/deployment/asgi/ """ import os from django.core.asgi import get_asgi_application os.environ.setdefault("DJANG...
[ 37811, 198, 1921, 18878, 4566, 329, 1672, 62, 28241, 14208, 1628, 13, 198, 198, 1026, 32142, 262, 7054, 18878, 869, 540, 355, 257, 8265, 12, 5715, 7885, 3706, 7559, 31438, 15506, 13, 198, 198, 1890, 517, 1321, 319, 428, 2393, 11, 766,...
2.763033
211
"""Generate values of Method of Simulated Moments criterion function. Given observed moments and weighting matrix in `OUT_ANALYSIS`, "msm_estimation", generate values of Method of Simulated Moments criterion function for combinations of discount factor and present bias values. The goal is to study the bivariate distr...
[ 37811, 8645, 378, 3815, 286, 11789, 286, 3184, 4817, 45209, 34054, 2163, 13, 198, 198, 15056, 6515, 7188, 290, 3463, 278, 17593, 287, 4600, 12425, 62, 1565, 1847, 16309, 1797, 47671, 366, 907, 76, 62, 395, 18991, 1600, 198, 8612, 378, ...
2.66936
1,485
from dataclasses import dataclass from space_game.domain_names import KeyId from space_game.events.Event import Event
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 198, 6738, 2272, 62, 6057, 13, 27830, 62, 14933, 1330, 7383, 7390, 198, 6738, 2272, 62, 6057, 13, 31534, 13, 9237, 1330, 8558, 628 ]
3.636364
33
import pymsteams import logging from oncall.constants import TEAMS_SUPPORT
[ 11748, 279, 4948, 4169, 4105, 198, 11748, 18931, 198, 6738, 319, 13345, 13, 9979, 1187, 1330, 33536, 50, 62, 40331, 15490, 628 ]
3.454545
22
# + # # Copyright 2016 The BigDL 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 by applicable law or agreed to...
[ 2, 1343, 198, 2, 198, 2, 15069, 1584, 383, 4403, 19260, 46665, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, ...
3.539171
217
import math import numpy as np import scipy as sp import scipy.linalg import torch import torch.nn as nn import torch.nn.init as init import torch.nn.functional as F from nf.utils import unconstrained_RQS # supported non-linearities: note that the function must be invertible functional_derivatives = { torch.tanh: ...
[ 11748, 10688, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 629, 541, 88, 355, 599, 198, 11748, 629, 541, 88, 13, 75, 1292, 70, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 15003, ...
2.273381
278
# module pyparsing.py # # Copyright (c) 2003-2019 Paul T. McGuire # # 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, cop...
[ 2, 8265, 279, 4464, 945, 278, 13, 9078, 198, 2, 198, 2, 15069, 357, 66, 8, 5816, 12, 23344, 220, 3362, 309, 13, 33902, 557, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 198, 2, ...
2.578283
1,584
# -- coding: utf-8 #!/usr/bin/env python """ pyscanlogger: Port scan detector/logger tool, inspired by scanlogd {http://www.openwall.com/scanlogd} but with added ability to log slow port-scans. Features 1. Detects all stealth (half-open) and full-connect scans. 2. Detects Idle scan and logs it correctly usi...
[ 2, 1377, 19617, 25, 3384, 69, 12, 23, 201, 198, 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 201, 198, 37811, 201, 198, 79, 893, 5171, 6404, 1362, 25, 4347, 9367, 31029, 14, 6404, 1362, 2891, 11, 7867, 201, 198, 1525, 9367, 6404, ...
2.314925
670
from itertools import combinations import copy def check_following_migration(edges, p=0): """ :param edges: :return: """ e = copy.copy(edges) visited = [False for _ in e] miggroup = [] cnt = -1 for i in range(0, len(e)): if visited[i]: continue ...
[ 6738, 340, 861, 10141, 1330, 17790, 198, 11748, 4866, 628, 628, 628, 628, 628, 628, 198, 4299, 2198, 62, 27780, 278, 62, 76, 4254, 7, 276, 3212, 11, 279, 28, 15, 2599, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 1058, 17143, 13...
1.874054
1,453
# coding=utf-8 # Copyright 2020 The HuggingFace Team All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 12131, 383, 12905, 2667, 32388, 4816, 1439, 2489, 10395, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 7...
3.815789
266
# Copyright 2018 Hewlett Packard Enterprise Development LP # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
[ 2, 15069, 2864, 30446, 15503, 6400, 446, 14973, 7712, 18470, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 137...
3.694767
344
""" Common Petronia imports for bootstrap parts of an extension. This should be imported along with the `simp` module. """ from ...base.bus import ( EventBus, ListenerRegistrar, ListenerSetup, QueuePriority, ExtensionMetadataStruct, register_event, EVENT_WILDCARD, TARGET_WILDCARD, ...
[ 198, 37811, 198, 17227, 4767, 1313, 544, 17944, 329, 6297, 26418, 3354, 286, 281, 7552, 13, 198, 198, 1212, 815, 307, 17392, 1863, 351, 262, 4600, 82, 11011, 63, 8265, 13, 198, 37811, 628, 198, 6738, 2644, 8692, 13, 10885, 1330, 357, ...
2.474308
506
import pyopencl as cl from optparse import OptionParser parser = OptionParser() parser.add_option("-s", "--short", action="store_true", help="don't print all device properties") (options, args) = parser.parse_args() for platform in cl.get_platforms(): print(75*"=") print(platform) prin...
[ 11748, 12972, 9654, 565, 355, 537, 198, 6738, 2172, 29572, 1330, 16018, 46677, 198, 198, 48610, 796, 16018, 46677, 3419, 198, 48610, 13, 2860, 62, 18076, 7203, 12, 82, 1600, 366, 438, 19509, 1600, 2223, 2625, 8095, 62, 7942, 1600, 198, ...
1.653707
1,106
# -*- coding: future_fstrings -*- # # Copyright 2019 Gianluca Frison, Dimitris Kouzoupis, Robin Verschueren, # Andrea Zanelli, Niels van Duijkeren, Jonathan Frey, Tommaso Sartor, # Branimir Novoselnik, Rien Quirynen, Rezart Qelibari, Dang Doan, # Jonas Koenemann, Yutao Chen, Tobias Schls, Jonas Schlagenhauf, Moritz Die...
[ 2, 532, 9, 12, 19617, 25, 2003, 62, 69, 37336, 532, 9, 12, 198, 2, 198, 2, 15069, 13130, 30851, 75, 43120, 1305, 1653, 11, 14048, 270, 2442, 30559, 89, 10486, 271, 11, 12325, 18535, 354, 518, 918, 11, 198, 2, 23174, 47022, 23225, ...
3.107143
812
import numpy as np import cv2 import sys import os import glob def im2patch(im, pch_size, stride=1): ''' Transform image to patches. Input: im: 3 x H x W or 1 X H x W image, numpy format pch_size: (int, int) tuple or integer stride: (int, int) tuple or integer ''' if isinsta...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 269, 85, 17, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 15095, 198, 198, 4299, 545, 17, 17147, 7, 320, 11, 279, 354, 62, 7857, 11, 33769, 28, 16, 2599, 198, 220, 220, 220, 705, 7061,...
2.003125
2,560
# This source code is part of the Biotite package and is distributed # under the 3-Clause BSD License. Please see 'LICENSE.rst' for further # information. __name__ = "biotite.application" __author__ = "Patrick Kunzmann" __all__ = ["Application", "AppStateError", "TimeoutError", "VersionError", "AppState", "...
[ 2, 770, 2723, 2438, 318, 636, 286, 262, 347, 5151, 578, 5301, 290, 318, 9387, 198, 2, 739, 262, 513, 12, 2601, 682, 347, 10305, 13789, 13, 4222, 766, 705, 43, 2149, 24290, 13, 81, 301, 6, 329, 2252, 198, 2, 1321, 13, 198, 198, ...
2.792028
577
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
[ 2, 220, 220, 15069, 357, 66, 8, 12131, 350, 37382, 47, 37382, 46665, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, ...
2.170442
3,532
import evdev import time import struct
[ 11748, 819, 7959, 198, 11748, 640, 198, 11748, 2878, 198 ]
3.9
10
# Barcode Example # # This example shows off how easy it is to detect bar codes using the # OpenMV Cam M7. Barcode detection does not work on the M4 Camera. import sensor, image, time, math sensor.reset() sensor.set_pixformat(sensor.GRAYSCALE) sensor.set_framesize(sensor.VGA) # High Res! sensor.set_windowing((640, 80...
[ 2, 2409, 8189, 17934, 198, 2, 198, 2, 770, 1672, 2523, 572, 703, 2562, 340, 318, 284, 4886, 2318, 12416, 1262, 262, 198, 2, 4946, 44, 53, 7298, 337, 22, 13, 2409, 8189, 13326, 857, 407, 670, 319, 262, 337, 19, 20432, 13, 198, 19...
2.89738
458
n=int(input("Enter number ")) fact=1 for i in range(1,n+1): fact=fact*i print("Factorial is ",fact)
[ 77, 28, 600, 7, 15414, 7203, 17469, 1271, 366, 4008, 198, 22584, 28, 16, 198, 1640, 1312, 287, 2837, 7, 16, 11, 77, 10, 16, 2599, 198, 220, 1109, 28, 22584, 9, 72, 198, 4798, 7203, 29054, 5132, 318, 33172, 22584, 8, 198 ]
2.372093
43
import time # O * para desempacotar o paramtro. Permite atribuir inumeros parametros. maior(2, 1, 7) maior(5, 4, 7, 9, 2) maior(1, 4, 7, 20, 2) maior(0)
[ 11748, 640, 198, 2, 440, 1635, 220, 31215, 748, 368, 33587, 313, 283, 267, 5772, 23528, 13, 2448, 32937, 379, 822, 84, 343, 287, 6975, 418, 5772, 316, 4951, 13, 628, 198, 2611, 1504, 7, 17, 11, 352, 11, 767, 8, 198, 2611, 1504, ...
2.051948
77
# Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. import unittest import torch from common_testing import TestCaseMixin, get_random_cuda_device from pyt...
[ 2, 15069, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 201, 198, 2, 1439, 2489, 10395, 13, 201, 198, 2, 201, 198, 2, 770, 2723, 2438, 318, 11971, 739, 262, 347, 10305, 12, 7635, 5964, 1043, 287, 262, 201, 198, 2, 38559, ...
2.158217
1,144
import pyproj import pytest import numpy as np from easyric.io import geotiff, shp from skimage.io import imread from skimage.color import rgb2gray import matplotlib.pyplot as plt
[ 11748, 12972, 1676, 73, 198, 11748, 12972, 9288, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 2562, 1173, 13, 952, 1330, 4903, 313, 733, 11, 427, 79, 198, 6738, 1341, 9060, 13, 952, 1330, 545, 961, 198, 6738, 1341, 9060, 13, 8043, ...
2.984615
65
# coding: utf-8 """ Marketplace Insights API <a href=\"https://developer.ebay.com/api-docs/static/versioning.html#limited\" target=\"_blank\"> <img src=\"/cms/img/docs/partners-api.svg\" class=\"legend-icon partners-icon\" title=\"Limited Release\" alt=\"Limited Release\" />(Limited Release)</a> The Marketpl...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 220, 220, 220, 36703, 7088, 2337, 7824, 628, 220, 220, 220, 1279, 64, 13291, 17553, 5450, 1378, 16244, 263, 13, 1765, 323, 13, 785, 14, 15042, 12, 31628, 14, 12708, 14, 9641, 2...
2.785714
434
# Fractional Knapsack wt = [40,50,30,10,10,40,30] pro = [30,20,20,25,5,35,15] n = len(wt) data = [ (i,pro[i],wt[i]) for i in range(n) ] bag = 100 data.sort(key=lambda x: x[1]/x[2], reverse=True) profit=0 ans=[] i=0 while i<n: if data[i][2]<=bag: bag-=data[i][2] ans.append(data[i...
[ 2, 376, 7861, 282, 6102, 1686, 441, 201, 198, 201, 198, 46569, 796, 685, 1821, 11, 1120, 11, 1270, 11, 940, 11, 940, 11, 1821, 11, 1270, 60, 201, 198, 1676, 796, 685, 1270, 11, 1238, 11, 1238, 11, 1495, 11, 20, 11, 2327, 11, 1...
1.684564
298