content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
""" View decorators --------------- Decorators for view handlers. All items in this module can be imported directly from :mod:`coaster.views`. """ from functools import wraps from flask import ( Response, abort, current_app, g, jsonify, make_response, redirect, render_template, r...
[ 37811, 198, 7680, 11705, 2024, 198, 24305, 198, 198, 10707, 273, 2024, 329, 1570, 32847, 13, 198, 198, 3237, 3709, 287, 428, 8265, 460, 307, 17392, 3264, 422, 1058, 4666, 25, 63, 1073, 1603, 13, 33571, 44646, 198, 37811, 198, 198, 673...
2.701052
5,419
#!/usr/bin/env python3 # coding:utf-8 if __name__ == "__main__": s = Solution() print(s.Power(2, 0)) print(s.Power(0, 2)) print(s.Power(3.5, 2)) print(s.Power(3.5, -2))
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 19617, 25, 40477, 12, 23, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 264, 796, 28186, 3419, 198, 220, 220, 220, 3601, 7, 82,...
1.939394
99
# -*- coding : utf-8-*- import abc from enum import Enum class StructTemplate(metaclass=abc.ABCMeta): """ 构造物模板的基类 """ @abc.abstractmethod def _register_kwd(self): """ 注册参数的抽象方法, 构造函数调用一次, 子类定义中需实现. 已注册的参数可以在构造函数中使用. Returns: """ pass @abc.abstrac...
[ 2, 532, 9, 12, 19617, 1058, 3384, 69, 12, 23, 12, 9, 12, 198, 11748, 450, 66, 198, 6738, 33829, 1330, 2039, 388, 628, 198, 198, 4871, 32112, 30800, 7, 4164, 330, 31172, 28, 39305, 13, 24694, 48526, 2599, 198, 220, 220, 220, 37227,...
1.363354
322
from descarteslabs.client.exceptions import * # noqa
[ 6738, 1715, 433, 274, 75, 8937, 13, 16366, 13, 1069, 11755, 1330, 1635, 220, 1303, 645, 20402, 198 ]
3
18
board = [] for loop in range(0, 5): treta = ["O"] * 5 board.append(treta) print(board)
[ 3526, 796, 17635, 198, 198, 1640, 9052, 287, 2837, 7, 15, 11, 642, 2599, 198, 220, 220, 220, 256, 1186, 64, 796, 14631, 46, 8973, 1635, 642, 198, 220, 220, 220, 3096, 13, 33295, 7, 83, 1186, 64, 8, 198, 220, 220, 220, 3601, 7, ...
2.083333
48
from .version import __version__ as version
[ 6738, 764, 9641, 1330, 11593, 9641, 834, 355, 2196 ]
4.777778
9
import time import board import keypad import usb_hid import neopixel from adafruit_led_animation.animation.pulse import Pulse from adafruit_led_animation.animation.solid import Solid from adafruit_led_animation.animation.blink import Blink from adafruit_led_animation.group import AnimationGroup from adafruit_led_anima...
[ 11748, 640, 198, 11748, 3096, 198, 11748, 1994, 15636, 198, 11748, 38551, 62, 49675, 198, 11748, 497, 404, 7168, 198, 6738, 512, 1878, 4872, 62, 992, 62, 11227, 341, 13, 11227, 341, 13, 79, 9615, 1330, 25062, 198, 6738, 512, 1878, 487...
2.255994
2,836
#!/usr/bin/python # Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import contextlib import os import shutil import tempfile @contextlib.contextmanager def TempDeploymentDir(paths, use_symlinks=True): "...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 15069, 1853, 383, 18255, 1505, 46665, 13, 1439, 2489, 10395, 13, 198, 2, 5765, 286, 428, 2723, 2438, 318, 21825, 416, 257, 347, 10305, 12, 7635, 5964, 326, 460, 307, 198, 2, 1043, 287, ...
3.003289
304
from functools import cache if __name__ == '__main__': print(numsSameConsecDiff(8, 1))
[ 6738, 1257, 310, 10141, 1330, 12940, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 3601, 7, 77, 5700, 30556, 3103, 2363, 28813, 7, 23, 11, 352, 4008, 198 ]
2.540541
37
import itertools import json from math import inf import rtree as rtree from pymunk import Vec2d from k_road.builder.road_builder import RoadBuilder from k_road.constants import Constants from k_road.entity import entity_factory from k_road.entity.entity_type import EntityType # ------------------------------------...
[ 11748, 340, 861, 10141, 198, 11748, 33918, 198, 6738, 10688, 1330, 1167, 198, 198, 11748, 374, 21048, 355, 374, 21048, 198, 6738, 279, 4948, 2954, 1330, 38692, 17, 67, 198, 198, 6738, 479, 62, 6344, 13, 38272, 13, 6344, 62, 38272, 133...
3.84
150
#!/usr/bin/python import sys import logging logging.basicConfig(stream=sys.stderr) sys.path.insert(0,"/var/www/vhosts/maildash.iccenter.org/") from maildash import app as application application.secret_key = 'development-key'
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 11748, 25064, 198, 11748, 18931, 198, 6404, 2667, 13, 35487, 16934, 7, 5532, 28, 17597, 13, 301, 1082, 81, 8, 198, 17597, 13, 6978, 13, 28463, 7, 15, 553, 14, 7785, 14, 2503, 14, 85, 4774...
2.873418
79
import os, glob from fabric.api import env, sudo, run, cd, local, put, prefix, roles, execute, task, get from fabric.api import settings as fab_settings from fabric.context_managers import settings, hide from fabric.contrib.files import sed from subprocess import Popen, PIPE import datetime from utils import _build_en...
[ 11748, 28686, 11, 15095, 198, 6738, 9664, 13, 15042, 1330, 17365, 11, 21061, 11, 1057, 11, 22927, 11, 1957, 11, 1234, 11, 21231, 11, 9176, 11, 12260, 11, 4876, 11, 651, 198, 6738, 9664, 13, 15042, 1330, 6460, 355, 7843, 62, 33692, 1...
2.838442
1,207
for _ in range(6): sauter() avancer() avancer() gauche() for _ in range(2): avancer() for _ in range(9): coup() avancer() avancer() ouvrir()
[ 1640, 4808, 287, 2837, 7, 21, 2599, 198, 197, 82, 2306, 263, 3419, 198, 197, 615, 8250, 3419, 198, 615, 8250, 3419, 198, 70, 559, 2395, 3419, 198, 1640, 4808, 287, 2837, 7, 17, 2599, 198, 197, 615, 8250, 3419, 198, 1640, 4808, 287...
2.147059
68
import cv2 import tensorflow as tf import numpy as np import glob import os import time import argparse import configparser from auto_pose.ae import factory, utils parser = argparse.ArgumentParser() parser.add_argument("experiment_name") parser.add_argument("-f", "--file_str", required=True, help='folder or filena...
[ 198, 11748, 269, 85, 17, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 15095, 198, 11748, 28686, 198, 11748, 640, 198, 11748, 1822, 29572, 198, 11748, 4566, 48610, 198, 198, 6738, 8295, 62, 3...
2.508591
873
# -*- coding: utf-8 -*- """ Collection of functions that perform different types of parsing """ __author__ = "Brian Connelly <bdc@bconnelly.net>" __credits__ = "Brian Connelly" import re from seeds.SEEDSError import * def parse_int_rangelist(s, sorted=False): """Parse a list of numeric ranges. These lists are...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 36307, 286, 5499, 326, 1620, 1180, 3858, 286, 32096, 198, 37811, 198, 198, 834, 9800, 834, 796, 366, 24761, 20776, 6148, 1279, 17457, 66, 31, 65, 37043, 6148...
2.188472
1,093
#!/usr/bin/env python3 import contextlib import os import random import socket import string import subprocess import time import unittest @contextlib.contextmanager class SmokeTest(unittest.TestCase): '''High level smoke tests for the library. These should be run via ninja smoke from your meson build ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 4732, 8019, 198, 11748, 28686, 198, 11748, 4738, 198, 11748, 17802, 198, 11748, 4731, 198, 11748, 850, 14681, 198, 11748, 640, 198, 11748, 555, 715, 395, 628, 198, 198, ...
3.180328
122
from __future__ import print_function import argparse import glob import os if __name__ == '__main__': main()
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 1822, 29572, 198, 11748, 15095, 198, 11748, 28686, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419, 198 ]
3.025641
39
import math from functools import reduce, wraps from typing import Callable, List, Union, Optional from toolz import groupby import pandas as pd from funcy import lmapcat try: from tqdm.autonotebook import tqdm except ImportError: _has_tqdm = False tqdm = None else: _has_tqdm = True def rename_keys(...
[ 11748, 10688, 198, 6738, 1257, 310, 10141, 1330, 4646, 11, 27521, 198, 6738, 19720, 1330, 4889, 540, 11, 7343, 11, 4479, 11, 32233, 198, 6738, 2891, 89, 1330, 1448, 1525, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 1257, 948...
2.52292
1,178
#!/usr/bin/env python3 import asyncio import discord import logging import json import random logger = logging.getLogger('spookbot') logger.setLevel(logging.INFO) handler = logging.FileHandler(filename='spookbot.log', mode='w', encoding='utf-8') handler.setFormatter(logging.Formatter('%(asctime)s:%(levelname)s:%(name...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 30351, 952, 198, 11748, 36446, 198, 11748, 18931, 198, 11748, 33918, 198, 11748, 4738, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 10786, 2777, 566, 13645, 1...
2.699605
253
from threading import Timer import mido import time from singleton import Singleton from activelayer import ActiveLayer, ActiveLayerIdentifier
[ 6738, 4704, 278, 1330, 5045, 263, 198, 11748, 3095, 78, 198, 11748, 640, 198, 198, 6738, 2060, 1122, 1330, 5573, 10565, 198, 6738, 4075, 29289, 1330, 14199, 49925, 11, 14199, 49925, 33234, 7483, 628, 198 ]
4.171429
35
# coding: utf-8 import time import pickle import socket import random import logging import argparse import configparser import threading from utils import contains_successor from queue import Queue ##############################################NODE DISCOVERY############################################## # M...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 11748, 640, 198, 11748, 2298, 293, 198, 11748, 17802, 198, 11748, 4738, 198, 11748, 18931, 198, 11748, 1822, 29572, 198, 11748, 4566, 48610, 198, 11748, 4704, 278, 198, 6738, 3384, 4487, 1330, ...
3.092593
486
import os import numpy as np from protoclass.preprocessing import StandardTimeNormalization path_root = '/data/prostate/pre-processing/lemaitre-2016-nov/norm-objects' shift_patient = [] # We have to open each npy file for root, dirs, files in os.walk(path_root): # Create the string for the file to read f...
[ 11748, 28686, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 1237, 420, 31172, 13, 3866, 36948, 1330, 8997, 7575, 26447, 1634, 198, 198, 6978, 62, 15763, 796, 31051, 7890, 14, 1676, 5219, 14, 3866, 12, 36948, 14, 293, 2611, ...
2.8375
240
# Generated by Django 2.0.3 on 2018-03-30 22:28 import ckeditor.fields from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 15, 13, 18, 319, 2864, 12, 3070, 12, 1270, 2534, 25, 2078, 198, 198, 11748, 269, 9091, 2072, 13, 25747, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.923077
39
end print max(-1,-2) # = -1 print max(1,2) # = 2 print max(3,4) # = 4 print max(1.0, 1.5) # = 1.500000
[ 437, 198, 198, 4798, 3509, 32590, 16, 12095, 17, 8, 220, 220, 220, 220, 220, 1303, 796, 532, 16, 198, 4798, 3509, 7, 16, 11, 17, 8, 220, 220, 220, 220, 220, 220, 220, 1303, 796, 362, 198, 4798, 3509, 7, 18, 11, 19, 8, 220, 2...
1.644737
76
'''Cross validation codes.''' """ kwargs: keyword arguments to runSimulation order of positional arguments: obs_data, model, parameters """ from collections import namedtuple import lmfit # Fitting lib import matplotlib.pyplot as plt import math import numpy as np import pandas as pd import random import tellurium...
[ 7061, 6, 21544, 21201, 12416, 2637, 7061, 198, 198, 37811, 198, 46265, 22046, 25, 21179, 7159, 284, 1057, 8890, 1741, 198, 2875, 286, 45203, 7159, 25, 10201, 62, 7890, 11, 2746, 11, 10007, 198, 37811, 198, 198, 6738, 17268, 1330, 3706, ...
2.721607
7,044
from qcore.asserts import assert_eq import random from python_project_template.utils import random_string
[ 6738, 10662, 7295, 13, 30493, 82, 1330, 6818, 62, 27363, 198, 11748, 4738, 198, 198, 6738, 21015, 62, 16302, 62, 28243, 13, 26791, 1330, 4738, 62, 8841, 628 ]
3.857143
28
import unittest import torch from pytorch_metric_learning.losses import NPairsLoss from pytorch_metric_learning.utils import common_functions as c_f, loss_and_miner_utils as lmu
[ 11748, 555, 715, 395, 198, 11748, 28034, 198, 6738, 12972, 13165, 354, 62, 4164, 1173, 62, 40684, 13, 22462, 274, 1330, 28498, 3468, 43, 793, 198, 6738, 12972, 13165, 354, 62, 4164, 1173, 62, 40684, 13, 26791, 1330, 2219, 62, 12543, 2...
3.016949
59
import requests import json import datetime import pandas as pd import numpy as np import platform # 有時候的登入狀態會抓不到資料: # 要抓的港口 'ID': 港口名稱 port_ID_map = {'87':'Los Angeles','2727':'longBeach','93':'Oakland','1253':'Shanhi','1006':'Yantian', '290':'Singapore','172':'Hamburg','2036':'Rotterdam','199':'Felixsto...
[ 11748, 7007, 198, 11748, 33918, 198, 11748, 4818, 8079, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 3859, 198, 2, 42164, 231, 162, 25081, 161, 222, 247, 21410, 163, 247, 119, 17739, 98, 45379, ...
1.848523
1,591
#!/usr/bin/env python import unittest import sys import os.path remotedir = os.path.dirname(os.path.dirname(os.path.dirname((__file__)))) sys.path.insert(0, remotedir) from robotremoteserver import RobotRemoteServer if __name__ == '__main__': unittest.main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 555, 715, 395, 198, 11748, 25064, 198, 11748, 28686, 13, 6978, 198, 198, 2787, 5191, 343, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 15908, 3672, 7, 418...
2.34127
126
import json import logging import xbmc logger = logging.getLogger(__name__) _JSONRPC_TEMPLATE = """{{"jsonrpc":"2.0","id":0,"method":"{method}","params":{params}}}""" PLAYER_MUSIC = 0 PLAYER_VIDEO = 1 PLAYER_PICTURE = 2 LIST_FIELD_ART = "art" LIST_FIELD_UNIQUEID = "uniqueid"
[ 11748, 33918, 198, 11748, 18931, 198, 198, 11748, 2124, 20475, 66, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 628, 198, 198, 62, 40386, 49, 5662, 62, 51, 3620, 6489, 6158, 796, 37227, 90, 4895, 17...
2.403361
119
#!/usr/bin/python # (c) 2021, NetApp, Inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type DOCUMENTATION = ''' module: na_ontap_fpolicy_scope short_description: NetApp ONTAP - Create, del...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 2, 357, 66, 8, 33448, 11, 3433, 4677, 11, 3457, 198, 2, 22961, 3611, 5094, 13789, 410, 18, 13, 15, 10, 357, 3826, 27975, 45761, 393, 3740, 1378, 2503, 13, 41791, 13, 2398, 14, 677, ...
2.937231
1,625
"""Console script for codebots. You can get detaled information about each of the bots with the :code:`--help` option. .. code-block:: bash codebots --help emailbot --help telebot --help slackbot --help sshbot --help deploybot --help latexbot --help drivebot ...
[ 37811, 47581, 4226, 329, 2438, 42478, 13, 198, 198, 1639, 460, 651, 1062, 3021, 1321, 546, 1123, 286, 262, 29641, 351, 262, 1058, 8189, 25, 63, 438, 16794, 63, 3038, 13, 198, 198, 492, 2438, 12, 9967, 3712, 27334, 628, 220, 220, 220...
2.829941
4,716
# Copyright (C) 2013 Sony Mobile Communications AB. # All rights, including trade secret rights, reserved. from ave.broker.session import RemoteSession
[ 2, 15069, 357, 34, 8, 2211, 10184, 12173, 14620, 9564, 13, 198, 2, 1439, 2489, 11, 1390, 3292, 3200, 2489, 11, 10395, 13, 198, 198, 6738, 257, 303, 13, 7957, 6122, 13, 29891, 1330, 21520, 36044, 198 ]
4.135135
37
# Add zip code import pymongo myclient = pymongo.MongoClient("mongodb://localhost:27017/") mydb = myclient["mydatabase"] mycol = mydb["restaurant"] myquery = {"borough":{"$regex":"Bronx"}} for x in mycol.find(myquery): print(x)
[ 2, 3060, 19974, 2438, 201, 198, 11748, 279, 4948, 25162, 201, 198, 1820, 16366, 796, 279, 4948, 25162, 13, 44, 25162, 11792, 7203, 31059, 375, 65, 1378, 36750, 25, 1983, 29326, 14, 4943, 201, 198, 1820, 9945, 796, 616, 16366, 14692, 1...
2.44
100
#!/usr/bin/env python3 -B import paho.mqtt.publish as mqtt # pip install --upgrade paho-mqtt import json from collections import namedtuple import time import random import base64 import os Loc = namedtuple('Loc', 'imei lat lon alt vel cog plate tid') positions = [ Loc("516081298750081", 59.373399, 17.946690, ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 532, 33, 198, 198, 11748, 279, 17108, 13, 76, 80, 926, 13, 12984, 1836, 355, 285, 80, 926, 220, 1303, 7347, 2721, 1377, 929, 9526, 279, 17108, 12, 76, 80, 926, 198, 11748, 33918, 19...
1.846753
1,155
from db.repositories.statistics_repository import StatisticsRepository from db.repositories.dna_repository import DNARepository from model import Dna from model.DTO.Dna import DNACreate from service import statistics_service from fastapi import HTTPException
[ 6738, 20613, 13, 260, 1930, 270, 1749, 13, 14269, 3969, 62, 260, 1930, 37765, 1330, 14370, 6207, 13264, 198, 6738, 20613, 13, 260, 1930, 270, 1749, 13, 67, 2616, 62, 260, 1930, 37765, 1330, 45080, 1503, 538, 13264, 198, 6738, 2746, 13...
3.547945
73
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Julea(MesonPackage): """JULEA is a flexible storage framework that allows offering arbitra...
[ 2, 15069, 2211, 12, 42334, 13914, 45036, 3549, 2351, 4765, 11, 11419, 290, 584, 198, 2, 1338, 441, 4935, 34152, 13, 4091, 262, 1353, 12, 5715, 27975, 38162, 9947, 2393, 329, 3307, 13, 198, 2, 198, 2, 30628, 55, 12, 34156, 12, 33234,...
2.878307
567
import base64 # converte os bytes em imagem e salva no path especificado # remove o cabeçalho do base64 enviado na requisição pelo JS
[ 11748, 2779, 2414, 628, 220, 220, 220, 220, 198, 2, 6718, 660, 28686, 9881, 795, 3590, 368, 304, 3664, 6862, 645, 3108, 1658, 431, 7790, 4533, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 2, 4781, 267, 269, 11231, 16175, ...
2.525424
59
# # ------------------------------------------------------------------------- # Copyright (c) 2015-2017 AT&T Intellectual Property # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # ...
[ 2, 198, 2, 16529, 45537, 198, 2, 220, 220, 15069, 357, 66, 8, 1853, 12, 5539, 5161, 5, 51, 42443, 14161, 198, 2, 198, 2, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 220,...
2.374659
2,936
# Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
[ 2, 15069, 1584, 3012, 3457, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, ...
3.987805
164
#!/usr/bin/env python from suds.client import Client import base64 # Suds does not support base64binary type, so we do the encoding manually. file_data = base64.b64encode('file_data') c=Client('http://localhost:9000/filemgr/?wsdl') c.service.add('x', 'y', 'file_name', file_data) print('file written.') print() prin...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 424, 9310, 13, 16366, 1330, 20985, 198, 11748, 2779, 2414, 198, 198, 2, 14818, 82, 857, 407, 1104, 2779, 2414, 39491, 2099, 11, 523, 356, 466, 262, 21004, 14500, 13, 198, ...
2.8
145
from skimage.measure import marching_cubes import pandas as pd import numpy as np from LoopStructural.utils import getLogger logger = getLogger(__name__)
[ 6738, 1341, 9060, 13, 1326, 5015, 1330, 26409, 62, 66, 29080, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 26304, 44909, 1523, 13, 26791, 1330, 651, 11187, 1362, 198, 6404, 1362, 796, 651, ...
3.208333
48
""" 1 comprehension 2 user defined function # ASSIGNMENT: 1 WRITE list comprehension to create 15 random number 2 write list comprehensioon to create prime number till user defined number 3 write dictionary comprehension with 5 key value paiir 4 convert all assignmnent into user defined function """ ### COMPREHENS...
[ 37811, 198, 16, 35915, 198, 17, 2836, 5447, 2163, 198, 198, 2, 24994, 16284, 10979, 25, 198, 16, 44423, 1351, 35915, 284, 2251, 1315, 4738, 1271, 198, 17, 3551, 1351, 8569, 952, 261, 284, 2251, 6994, 1271, 10597, 2836, 5447, 1271, 198...
2.394586
1,219
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import unittest from punica.cli import main from click.testing import CliRunner if __name__ == '__main__': unittest.main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 555, 715, 395, 198, 198, 6738, 4000, 3970, 13, 44506, 1330, 1388, 198, 198, 6738, 3904, 13, 33407, 13...
2.5
72
import requests import json from github import GithubException
[ 11748, 7007, 198, 11748, 33918, 198, 6738, 33084, 1330, 38994, 16922, 628 ]
5.333333
12
model = dm.DSCN(task=6723) model.compile("adam", "sparse_categorical_crossentropy", metrics=['accuracy']) print('start training...') history = model.fit(train_model_input, data[target].values, batch_size=256, epochs=20, verbose=2, validation_data=(test_model_input, test_data[target].values)) model.save('./dscn.h5')
[ 19849, 796, 288, 76, 13, 5258, 44175, 7, 35943, 28, 3134, 1954, 8, 198, 19849, 13, 5589, 576, 7203, 324, 321, 1600, 366, 82, 29572, 62, 66, 2397, 12409, 62, 19692, 298, 28338, 1600, 20731, 28, 17816, 4134, 23843, 6, 12962, 198, 198,...
2.717949
117
import pyodbc server = 'localhost' database = 'testDB' username = 'SA' password = 'giorgio$1' cnxn = pyodbc.connect('DRIVER={ODBC Driver 17 for SQL Server};SERVER='+server+';DATABASE='+database+';UID='+username+';PWD='+ password) cursor = cnxn.cursor() print('Inserting a new row into table') tsql = "INSERT INTO Empl...
[ 11748, 12972, 375, 15630, 198, 198, 15388, 796, 705, 36750, 6, 198, 48806, 796, 705, 9288, 11012, 6, 198, 29460, 796, 705, 4090, 6, 198, 28712, 796, 705, 70, 1504, 27769, 3, 16, 6, 198, 198, 31522, 87, 77, 796, 12972, 375, 15630, ...
2.828025
157
#! encoding: UTF-8 import os import opts import ipdb import time import random import numpy as np from six.moves import cPickle import keras from keras.datasets import mnist import tensorflow as tf if __name__ == '__main__': opt = opts.parse_opt() opt_dict = vars(opt) for k, v in opt_dict.items(): ...
[ 2, 0, 21004, 25, 41002, 12, 23, 198, 198, 11748, 28686, 198, 11748, 2172, 82, 198, 11748, 20966, 9945, 198, 11748, 640, 198, 11748, 4738, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 2237, 13, 76, 5241, 1330, 269, 31686, 293, 198, ...
2.304469
358
# -*- coding:utf-8 -*- # # File : cmd_package.py # This file is part of RT-Thread RTOS # COPYRIGHT (C) 2006 - 2018, RT-Thread Development Team # # 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 Softwa...
[ 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 201, 198, 2, 201, 198, 2, 9220, 220, 220, 220, 220, 220, 1058, 23991, 62, 26495, 13, 9078, 201, 198, 2, 770, 2393, 318, 636, 286, 11923, 12, 16818, 11923, 2640, 201, 198, 2,...
2.110933
18,137
# Corrigido # Bloco de importações import random # Bloco de entrada print() n = int(input('Informe um número maior que zero: ')) print() # Bloco de cálculos num = random.randint(0, n) # Bloco de saída print('Numéro de saída: {}.'.format(num)) print()
[ 2, 2744, 4359, 17305, 198, 198, 2, 1086, 25634, 390, 1330, 64, 16175, 127, 113, 274, 198, 11748, 4738, 198, 198, 2, 1086, 25634, 390, 24481, 4763, 198, 4798, 3419, 198, 77, 796, 493, 7, 15414, 10786, 818, 687, 68, 23781, 299, 21356,...
2.33945
109
# -*- encoding: utf-8 -*- from django.conf.urls.defaults import * from django.contrib import admin from django.conf import settings from tastypie.api import Api from journalmanager import views, models from api import resources admin.autodiscover() # RESTful API config v1_api = Api(api_name='v1') v1_api_resources = ...
[ 2, 532, 9, 12, 21004, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 13, 12286, 82, 1330, 1635, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 42625, 14208, 13, 10414, 1330, 64...
2.593361
964
""" Neuroimaging cartesian reconstruction ===================================== Credit: L Elgueddari In this tutorial we will reconstruct an MRI image from the sparse kspace measurments. """ # Package import import pysap from pysap.data import get_sample_data from mri.numerics.linear import Wavelet2 from mri.numeric...
[ 37811, 198, 8199, 1434, 320, 3039, 6383, 35610, 25056, 198, 10052, 1421, 28, 198, 198, 23690, 25, 406, 2574, 70, 1739, 67, 2743, 198, 198, 818, 428, 11808, 356, 481, 31081, 281, 30278, 2939, 422, 262, 29877, 479, 13200, 198, 1326, 292...
2.539442
1,648
Version = "4.5.2" if __name__ == "__main__": print (Version)
[ 14815, 796, 366, 19, 13, 20, 13, 17, 1, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 3601, 357, 14815, 8, 628 ]
2.233333
30
from django.contrib.auth.models import Group, Permission from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.core.exceptions import ValidationError from django.db import models from django.utils.translation import ugettext_lazy as _ fro...
[ 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 4912, 11, 2448, 3411, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 11299, 19199, 13, 25747, 1330, 42044, 33616, 9218, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 11299, 19199...
3.265659
463
from transbank.error.invalid_amount_error import InvalidAmountError
[ 6738, 1007, 17796, 13, 18224, 13, 259, 12102, 62, 17287, 62, 18224, 1330, 17665, 31264, 12331, 628 ]
4.058824
17
# -*- coding: utf-8 -*- from usercrawler import UserCrawler uid = u'小鱼游啊游0423' crawler = UserCrawler() userinfo = crawler.scratch(uid) print userinfo
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 514, 2798, 39464, 1330, 11787, 34, 39464, 198, 27112, 796, 334, 6, 22887, 237, 165, 109, 120, 162, 116, 116, 161, 243, 232, 162, 116, 116, 3023, 1954, 6, 198, ...
2.191176
68
import torch from torch.nn import functional as F from .utils import ConvNdTorch, PoolingNdTorch, NormNdTorch, DropoutNdTorch from .basic_networks import BaseSegmentationTorchNetwork
[ 11748, 28034, 198, 6738, 28034, 13, 20471, 1330, 10345, 355, 376, 198, 6738, 764, 26791, 1330, 34872, 45, 67, 15884, 354, 11, 19850, 278, 45, 67, 15884, 354, 11, 11220, 45, 67, 15884, 354, 11, 14258, 448, 45, 67, 15884, 354, 198, 67...
3.263158
57
from tensorflow.keras import layers import time import tensorflow as tf def make_generator_model(): ''' Create GAN generator :return: Generator ''' model = tf.keras.Sequential() model.add(layers.Dense(7*7*256, use_bias=False, input_shape=(100,))) model.add(layers.BatchNormalization()) ...
[ 6738, 11192, 273, 11125, 13, 6122, 292, 1330, 11685, 198, 11748, 640, 198, 198, 11748, 11192, 273, 11125, 355, 48700, 628, 198, 4299, 787, 62, 8612, 1352, 62, 19849, 33529, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 13610, 402...
2.386441
885
from typing import Optional, Union from slack_sdk.web import SlackResponse from slack_bolt.authorization import AuthorizeResult from slack_bolt.request.request import BoltRequest from slack_bolt.response import BoltResponse # # NOTE: this source file intentionally avoids having a reference to # AsyncBoltRequest, Asy...
[ 6738, 19720, 1330, 32233, 11, 4479, 198, 198, 6738, 30740, 62, 21282, 74, 13, 12384, 1330, 36256, 31077, 198, 198, 6738, 30740, 62, 25593, 13, 9800, 1634, 1330, 6434, 1096, 23004, 198, 6738, 30740, 62, 25593, 13, 25927, 13, 25927, 1330,...
3.933824
136
#!/usr/bin/env python # -*- coding:utf-8 -*- BROKER_BACKEND = "mongodb" BROKER_HOST = "localhost" BROKER_PORT = 7680 CELERY_RESULT_BACKEND = "mongodb" CELERY_MONGODB_BACKEND_SETTINGS = { "host": "localhost", "port": 7680, "database": "books", "taskmeta_collection": "celerytasks", } CELERYD_CONCURRENC...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 198, 11473, 11380, 1137, 62, 31098, 10619, 796, 366, 31059, 375, 65, 1, 198, 11473, 11380, 1137, 62, 39, 10892, 796, 366, ...
2.133663
202
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: http.proto from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_data...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 262, 8435, 11876, 17050, 13, 220, 8410, 5626, 48483, 0, 198, 2, 2723, 25, 2638, 13, 1676, 1462, 198, 198, 6738, 23645, 13, 11235, 672, 3046, 1330, ...
1.83825
7,796
from function_file import best_fit, line_graph, normal_curve if __name__ == "__main__": # Create dataframe df2 = pd.read_csv("../input/english-premier-league-data-for-10-seasons/epldat10seasons/epl-allseasons-matchstats.csv") # Create dataframe to summarise cards given by season ...
[ 6738, 2163, 62, 7753, 1330, 1266, 62, 11147, 11, 1627, 62, 34960, 11, 3487, 62, 22019, 303, 220, 220, 220, 198, 220, 220, 220, 220, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 220, 198, 220, 2...
2.577875
687
""" Helpers for setup.py, e.g. requirements.txt parsing, version bumping, custom setup.py commands Inside of :py:mod:`privex.helpers.setuppy.common` there's a variety of functions related to generating requirements.txt files, parsing requirements.txt files which recursively import other requirements.txt files, and ha...
[ 37811, 198, 12621, 19276, 329, 9058, 13, 9078, 11, 304, 13, 70, 13, 5359, 13, 14116, 32096, 11, 2196, 13852, 278, 11, 2183, 9058, 13, 9078, 9729, 628, 198, 24441, 286, 1058, 9078, 25, 4666, 25, 63, 3448, 303, 87, 13, 16794, 364, 1...
3.447761
469
__all__ = ('setup', 'Extension') from celerid import patch_distutils # Cause distutils to be hot-patched. from distutils.core import setup, Extension as std_Extension from distutils.errors import DistutilsOptionError
[ 834, 439, 834, 796, 19203, 40406, 3256, 705, 11627, 3004, 11537, 198, 198, 6738, 18725, 263, 312, 1330, 8529, 62, 17080, 26791, 1303, 24228, 1233, 26791, 284, 307, 3024, 12, 8071, 1740, 13, 198, 198, 6738, 1233, 26791, 13, 7295, 1330, ...
3.606557
61
# # Copyright (C) 2019 Databricks, 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 i...
[ 2, 198, 2, 15069, 357, 34, 8, 13130, 16092, 397, 23706, 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, ...
3.52069
290
import multiprocessing import os import random import shutil import threading import time import traceback import json import re import tempfile from subprocess import run, PIPE from urllib.parse import urlparse from botocore.exceptions import ClientError import boto3 import requests from idseq_dag.engine.pipeline_st...
[ 11748, 18540, 305, 919, 278, 198, 11748, 28686, 198, 11748, 4738, 198, 11748, 4423, 346, 198, 11748, 4704, 278, 198, 11748, 640, 198, 11748, 12854, 1891, 198, 11748, 33918, 198, 11748, 302, 198, 11748, 20218, 7753, 198, 6738, 850, 14681, ...
2.044452
6,209
import torch import torch.nn as nn import torch.jit as jit from typing import Any from typing import List from typing import Tuple from typing import Optional from collections import namedtuple state_type = Tuple[torch.Tensor, torch.Tensor] return_type = Tuple[torch.Tensor, Tuple[torch.Tensor, torch.Tensor]] LSTMSta...
[ 11748, 28034, 198, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 45051, 355, 474, 270, 198, 198, 6738, 19720, 1330, 4377, 198, 6738, 19720, 1330, 7343, 198, 6738, 19720, 1330, 309, 29291, 198, 6738, 19720, 1330, 322...
2.794326
141
import requests from bs4 import BeautifulSoup from _datetime import date import progressbar import time import os import pandas as pd #check if a value is empty #if it is we return 0.0 if __name__ == "__main__": wrapper = WNBAWrapper() wrapper.getBoxScore()
[ 11748, 7007, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 6738, 4808, 19608, 8079, 1330, 3128, 198, 11748, 4371, 5657, 198, 11748, 640, 198, 11748, 28686, 198, 11748, 19798, 292, 355, 279, 67, 628, 220, 220, 220, 1303, 9122, 6...
2.98913
92
#!/usr/bin/env python from subprocess import Popen, PIPE import sys import argparse parser = argparse.ArgumentParser(description='Ping Scan Network') # Main arguments parser.add_argument("-network", dest="network", help="NetWork segment[For example 192.168.56]", required=True) parser.add_argument("-machines", des...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 6738, 850, 14681, 1330, 8099, 268, 11, 350, 4061, 36, 198, 11748, 25064, 198, 11748, 1822, 29572, 198, 198, 48610, 796, 1822, 29572, 13, 28100, 1713, 46677, 7, 11213, 11639, 49806, 20937...
2.628205
390
from django.db import models from django.utils import timezone # Create your models here.
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 26791, 1330, 640, 11340, 198, 198, 2, 13610, 534, 4981, 994, 13 ]
3.75
24
from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys from selenium.common.exceptions import ElementNotInteractableException, NoSuchElementException import csv import time WPP_URL = "https://web.whatsapp.com/" def le_arquivo(nome_arquivo): ''' ...
[ 6738, 384, 11925, 1505, 1330, 3992, 26230, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 11321, 13, 1525, 1330, 2750, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 11321, 13, 13083, 1330, 26363, 198, 6738, 384, 11925, 1505, 13...
2.187355
1,724
import cv2 import numpy as np import os import math from utils import * ## ADD 'Frames' folder to file path before running code. if __name__ == "__main__": main()
[ 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 11748, 10688, 198, 6738, 3384, 4487, 1330, 1635, 628, 198, 2235, 27841, 705, 35439, 6, 9483, 284, 2393, 3108, 878, 2491, 2438, 13, 628, 198, 198, 361, 115...
3.017544
57
""" 671 easy second minimum node in a binary tree """ # Definition for a binary tree node.
[ 37811, 198, 46250, 198, 38171, 198, 12227, 5288, 10139, 287, 257, 13934, 5509, 198, 37811, 628, 198, 2, 30396, 329, 257, 13934, 5509, 10139, 13, 628, 628, 198 ]
3.464286
28
from multiprocessing import Process from core.himesis_utils import expand_graph from copy import deepcopy
[ 198, 6738, 18540, 305, 919, 278, 1330, 10854, 198, 198, 6738, 4755, 13, 71, 999, 271, 62, 26791, 1330, 4292, 62, 34960, 198, 6738, 4866, 1330, 2769, 30073, 628 ]
3.758621
29
#!/usr/bin/env python3 ################################################################################ # This script will run the Arrythmia Web App from the command line. This # script should be used for developing builds only. ################################################################################ import sub...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 29113, 29113, 14468, 198, 2, 770, 4226, 481, 1057, 262, 943, 563, 400, 20730, 5313, 2034, 422, 262, 3141, 1627, 13, 770, 198, 2, 4226, 815, 307, 973, 329, 5922, 12188, 691, 13, ...
2.887712
944
# Regression analysis using scikit-learn functions # Common imports import numpy as np import pandas as pd import matplotlib.pyplot as plt import sklearn.linear_model as skl from sklearn.model_selection import train_test_split from sklearn.metrics import mean_squared_error, r2_score, mean_absolute_error import os # Wh...
[ 2, 3310, 2234, 3781, 1262, 629, 1134, 270, 12, 35720, 5499, 198, 2, 8070, 17944, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 1341,...
2.333894
1,189
# -*- coding: utf-8 -*- # 句向量训练者称为出题者assitant,标签训练者称为student import getData from keras.models import Sequential from keras.layers import LSTM, Dense, Dropout from gensim.models import Word2Vec import numpy as np from keras import metrics dim_num_feature = 120 # 用于限制长度 w2v_model = Word2Vec.load("...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 2, 10263, 237, 98, 28938, 239, 34932, 237, 164, 106, 255, 163, 119, 225, 38519, 163, 100, 108, 10310, 118, 49035, 118, 165, 95, 246, 38519, 562, 23737, 171, 120, ...
2.125131
951
"""Provides methods for text cleanup."""
[ 37811, 15946, 1460, 5050, 329, 2420, 27425, 526, 15931, 198 ]
4.1
10
import logging from contextlib import suppress from datetime import datetime from typing_extensions import Self from ._util import _regex_it from .api import _APIClient from .base import ClubObject from .config import get_from_cache, set_in_cache from .constants import _TMIO from .errors import TMIOException from .pl...
[ 11748, 18931, 198, 6738, 4732, 8019, 1330, 18175, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 6738, 19720, 62, 2302, 5736, 1330, 12189, 198, 198, 6738, 47540, 22602, 1330, 4808, 260, 25636, 62, 270, 198, 6738, 764, 15042, 1330, 4...
2.252206
3,287
import os import json import torch import numpy as np from model import VAENAR, ScheduledOptim
[ 11748, 28686, 198, 11748, 33918, 198, 198, 11748, 28034, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 2746, 1330, 13753, 1677, 1503, 11, 27774, 6309, 27871, 320, 628, 628, 198 ]
3.258065
31
from twisted.application import internet, service from twisted.internet import reactor from txtrader.tcpserver import serverFactory from txtrader.webserver import webServerFactory from txtrader.rtx import RTX if __name__ == '__main__': main()
[ 6738, 19074, 13, 31438, 1330, 5230, 11, 2139, 198, 6738, 19074, 13, 37675, 1330, 21905, 198, 198, 6738, 256, 742, 81, 5067, 13, 23047, 862, 18497, 1330, 4382, 22810, 198, 6738, 256, 742, 81, 5067, 13, 732, 1443, 18497, 1330, 3992, 106...
3.36
75
from collections import namedtuple from requests.structures import CaseInsensitiveDict from boltons.typeutils import make_sentinel class ReadOnlyContainer(object): """ Base class for read-only property containers. """ def __init__(self, **fields): """ Initialize the property container...
[ 6738, 17268, 1330, 3706, 83, 29291, 198, 198, 6738, 7007, 13, 7249, 942, 1330, 8913, 20376, 18464, 35, 713, 198, 6738, 18100, 684, 13, 4906, 26791, 1330, 787, 62, 34086, 20538, 628, 198, 4871, 4149, 10049, 29869, 7, 15252, 2599, 198, ...
2.740088
227
import csv, datetime with open('tooldesc.csv') as td: rdr = csv.reader(td) items = list(rdr) items = [convertDate(item) for item in items] with open('tooldesc2.csv', 'w', newline='') as td: wrt = csv.writer(td) for item in items: wrt.writerow(item)
[ 11748, 269, 21370, 11, 4818, 8079, 198, 198, 4480, 1280, 10786, 1462, 727, 3798, 13, 40664, 11537, 355, 41560, 25, 198, 220, 220, 220, 374, 7109, 796, 269, 21370, 13, 46862, 7, 8671, 8, 198, 220, 220, 220, 3709, 796, 1351, 7, 4372, ...
2.225806
124
""" 将mask rcnn转成shapefile的一些函数 """ from osgeo import ogr, gdal, osr import cv2 import numpy as np def create_geom(): """用于测试,生成一个wkt""" multipolygon = ogr.Geometry(ogr.wkbMultiPolygon) polygon = ogr.Geometry(ogr.wkbPolygon) ring = ogr.Geometry(ogr.wkbLinearRing) ring.AddPoint(1179091.1646903288, ...
[ 37811, 198, 49546, 27932, 48321, 20471, 164, 121, 105, 22755, 238, 43358, 7753, 21410, 31660, 12859, 249, 49035, 121, 46763, 108, 198, 37811, 198, 198, 6738, 28686, 469, 78, 1330, 267, 2164, 11, 308, 31748, 11, 267, 27891, 198, 11748, 2...
1.885781
1,716
from paypalrestsdk import WebhookEvent import logging logging.basicConfig(level=logging.INFO) webhook_event = WebhookEvent.find("8PT597110X687430LKGECATA") if webhook_event.resend(): # return True or False print("webhook event[%s] resend successfully" % (webhook_event.id)) else: print(webhook_event.error)
[ 6738, 1414, 18596, 2118, 21282, 74, 1330, 5313, 25480, 9237, 198, 11748, 18931, 198, 6404, 2667, 13, 35487, 16934, 7, 5715, 28, 6404, 2667, 13, 10778, 8, 198, 198, 12384, 25480, 62, 15596, 796, 5313, 25480, 9237, 13, 19796, 7203, 23, ...
2.765217
115
#!/usr/bin/env python # coding=utf-8 try: import mock except ImportError: import unittest.mock as mock from marvin_product_classifier_engine.data_handler import AcquisitorAndCleaner import pandas as pd @mock.patch('marvin_product_classifier_engine.data_handler.acquisitor_and_cleaner.pd.read_csv') @mock.pat...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 28, 40477, 12, 23, 198, 198, 28311, 25, 198, 220, 220, 220, 1330, 15290, 198, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220, 1330, 555, 715, 395, 13, 76, 735, 355, 152...
2.8
150
"""TcEx Service Common Module""" # standard library import base64 import json import os import subprocess import sys import time import uuid from multiprocessing import Process from random import randint from threading import Event, Lock, Thread from typing import Any, Optional from ..services import MqttMessageBroker...
[ 37811, 51, 66, 3109, 4809, 8070, 19937, 37811, 198, 2, 3210, 5888, 198, 11748, 2779, 2414, 198, 11748, 33918, 198, 11748, 28686, 198, 11748, 850, 14681, 198, 11748, 25064, 198, 11748, 640, 198, 11748, 334, 27112, 198, 6738, 18540, 305, ...
2.277994
6,939
'''aula de tkinter I''' from tkinter import * #dá nome ao quadro principal quadro = Tk() #dá um tamanho ao quadro quadro.geometry("800x600") #dá o titulo na janela do programa quadro.title("primeiro programa pos retorno!") #faz o quadro iniciar # sem isso o programa não abre quadro.mainloop() ...
[ 7061, 6, 2518, 64, 390, 256, 74, 3849, 314, 7061, 6, 198, 198, 6738, 256, 74, 3849, 1330, 1635, 198, 198, 2, 67, 6557, 299, 462, 257, 78, 15094, 305, 10033, 198, 47003, 305, 796, 309, 74, 3419, 198, 198, 2, 67, 6557, 23781, 256,...
2.41791
134
#This script Imports Game Data from ESPN, and Odds from the ODDS-API, and then imports them into a MySQL table, example in workbench here https://puu.sh/HOKCj/ce199eec8e.png import mysql.connector import requests import json import datetime import time #Connection to the MYSQL Server. mydb = mysql.connector....
[ 2, 1212, 4226, 1846, 3742, 3776, 6060, 422, 10409, 11, 290, 20664, 82, 422, 262, 31245, 5258, 12, 17614, 11, 290, 788, 17944, 606, 656, 257, 33476, 3084, 11, 1672, 287, 670, 26968, 994, 3740, 1378, 79, 12303, 13, 1477, 14, 39, 11380...
2.405726
1,432
from models import news
[ 6738, 4981, 1330, 1705, 628, 628 ]
4.5
6
""" Utilities for creating simulated data sets. """ from typing import Optional, Sequence import numpy as np import pandas as pd from scipy.linalg import toeplitz from ..api import AllTracker __all__ = ["sim_data"] __tracker = AllTracker(globals()) def sim_data( n: int = 100, intercept: float = -5, t...
[ 37811, 198, 18274, 2410, 329, 4441, 28590, 1366, 5621, 13, 198, 37811, 198, 6738, 19720, 1330, 32233, 11, 45835, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 629, 541, 88, 13, 75, 1292, 70,...
2.443789
3,389
# Copyright (c) 2021 - present / Neuralmagic, Inc. 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 b...
[ 2, 15069, 357, 66, 8, 33448, 532, 1944, 1220, 47986, 32707, 11, 3457, 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.515022
5,392
# -*- coding: utf-8 -*- # # Copyright (C) 2019 CESNET z.s.p.o.. # # OARepo is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """ Models used by the ProxyIDP Remote application """
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 357, 34, 8, 13130, 42700, 12884, 1976, 13, 82, 13, 79, 13, 78, 492, 198, 2, 198, 2, 440, 1503, 538, 78, 318, 1479, 3788, 26, 345, 460, 17678, 4...
3.05814
86
import argparse from camp_real_engine.engine import RealizationEngine
[ 11748, 1822, 29572, 198, 198, 6738, 1413, 62, 5305, 62, 18392, 13, 18392, 1330, 6416, 1634, 13798, 628, 198 ]
3.842105
19
from rest_framework.pagination import LimitOffsetPagination from rest_framework.permissions import AllowAny from rest_framework.viewsets import ReadOnlyModelViewSet from ..models import Catalog from ..serializers import CatalogListSerializer, CatalogSerializer
[ 6738, 1334, 62, 30604, 13, 79, 363, 1883, 1330, 27272, 34519, 47, 363, 1883, 198, 6738, 1334, 62, 30604, 13, 525, 8481, 1330, 22507, 7149, 198, 6738, 1334, 62, 30604, 13, 1177, 28709, 1330, 4149, 10049, 17633, 7680, 7248, 198, 198, 67...
4.311475
61
""" File: weather_master.py Name: Karen Wong ----------------------- This program should implement a console program that asks weather data from user to compute the average, highest, lowest, cold days among the inputs. Output format should match what is shown in the sample run in the Assignment 2 Handout. """ EXIT = -...
[ 37811, 198, 8979, 25, 6193, 62, 9866, 13, 9078, 198, 5376, 25, 18678, 27247, 198, 19351, 6329, 198, 1212, 1430, 815, 3494, 257, 8624, 1430, 326, 7893, 6193, 1366, 422, 2836, 284, 24061, 262, 2811, 11, 4511, 11, 9016, 11, 4692, 1528, ...
2.824895
474
"""Color cycler.""" from matplotlib import cycler as mpl_cycler def cycler(**kwargs): """Wrap a matplotlib.cycler object into a parameter-dictionary compatible with plt.rcParams. Please refer to https://matplotlib.org/cycler/ and https://matplotlib.org/stable/tutorials/intermediate/color...
[ 37811, 10258, 11700, 263, 526, 15931, 198, 198, 6738, 2603, 29487, 8019, 1330, 11700, 263, 355, 285, 489, 62, 15539, 263, 628, 198, 4299, 11700, 263, 7, 1174, 46265, 22046, 2599, 198, 220, 220, 220, 37227, 54, 2416, 257, 2603, 29487, ...
2.676829
164
# Copyright (c) 2020 Continental Automotive GmbH """Testing functions."""
[ 2, 220, 15069, 357, 66, 8, 12131, 30462, 17406, 19138, 402, 2022, 39, 198, 198, 37811, 44154, 5499, 526, 15931, 198 ]
3.619048
21
import unittest import pandas as pd import pytest import riptable as rt # N.B. TL;DR We have to import the actual implementation module to override the module global # variable "tm.N" and "tm.K". # In pandas 1.0 they move the code from pandas/util/testing.py to pandas/_testing.py. # The "import ...
[ 11748, 555, 715, 395, 201, 198, 11748, 19798, 292, 355, 279, 67, 201, 198, 11748, 12972, 9288, 201, 198, 201, 198, 11748, 374, 10257, 540, 355, 374, 83, 201, 198, 2, 399, 13, 33, 13, 24811, 26, 7707, 775, 423, 284, 1330, 262, 4036...
2.776735
533
"""Indent and Dedent classes.""" from sqlfluff.core.parser.match_wrapper import match_wrapper from sqlfluff.core.parser.segments.raw import RawSegment from sqlfluff.core.parser.context import ParseContext from typing import Optional, List class MetaSegment(RawSegment): """A segment which is empty but indicates w...
[ 37811, 5497, 298, 290, 35023, 298, 6097, 526, 15931, 198, 198, 6738, 19862, 1652, 75, 1648, 13, 7295, 13, 48610, 13, 15699, 62, 48553, 1330, 2872, 62, 48553, 198, 6738, 19862, 1652, 75, 1648, 13, 7295, 13, 48610, 13, 325, 11726, 13, ...
2.924221
1,412