content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import json import socket import traceback from flask import Blueprint, request from telegram import Update from bot import app, config, logger, utils, telebot blueprint = Blueprint('webhook', __name__) ADMIN_LEVEL = 1 # 1=Channel admins + Owner, 2=Channel admins, 3=Owner only # shortening variables of Config obje...
[ 11748, 33918, 198, 11748, 17802, 198, 11748, 12854, 1891, 198, 198, 6738, 42903, 1330, 39932, 11, 2581, 198, 6738, 573, 30536, 1330, 10133, 198, 198, 6738, 10214, 1330, 598, 11, 4566, 11, 49706, 11, 3384, 4487, 11, 5735, 13645, 198, 198...
2.891791
268
# Generated by Django 3.1.1 on 2020-12-04 16:12 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 16, 319, 12131, 12, 1065, 12, 3023, 1467, 25, 1065, 201, 198, 201, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 201, 198, 201, 198 ]
2.567568
37
import os import sys import traceback import logging # try: # import _winreg as winreg # except: # import winreg import win32api #import winsys from winsys import accounts, registry, security from winsys.registry import REGISTRY_ACCESS # Monkeypatch to force stuff in the registry class to do 64 bit regi...
[ 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 12854, 1891, 198, 11748, 18931, 198, 198, 2, 1949, 25, 198, 2, 220, 220, 220, 220, 1330, 4808, 5404, 2301, 355, 1592, 2301, 198, 2, 2845, 25, 198, 2, 220, 220, 220, 220, 1330, 1592, ...
2.911017
236
"""Test for videos.api""" import json from os import path import pytest from videos.api import create_media_convert_job, process_video_outputs from videos.conftest import TEST_VIDEOS_WEBHOOK_PATH from videos.constants import DESTINATION_ARCHIVE, DESTINATION_YOUTUBE, VideoStatus from videos.factories import VideoFacto...
[ 37811, 14402, 329, 5861, 13, 15042, 37811, 198, 11748, 33918, 198, 6738, 28686, 1330, 3108, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 5861, 13, 15042, 1330, 2251, 62, 11431, 62, 1102, 1851, 62, 21858, 11, 1429, 62, 15588, 62, 22915,...
2.507614
985
# From https://github.com/tartley/colorama # Copyright Jonathan Hartley 2013 # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright no...
[ 2, 3574, 3740, 1378, 12567, 13, 785, 14, 83, 433, 1636, 14, 8043, 1689, 198, 2, 15069, 11232, 11345, 1636, 2211, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 2297, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, 11, 351, 393, ...
2.384295
1,439
from flask_restplus import fields from api.restplus import api data = api.model('Dataset Model', { 'id_personne': fields.String(readOnly=True, description='The unique identifier of row'), 'nom_personne': fields.String(required=True, description='Name '), 'prenom_personne': fields.String(required=True, desc...
[ 6738, 42903, 62, 2118, 9541, 1330, 7032, 198, 6738, 40391, 13, 2118, 9541, 1330, 40391, 198, 198, 7890, 796, 40391, 13, 19849, 10786, 27354, 292, 316, 9104, 3256, 1391, 198, 220, 220, 220, 705, 312, 62, 6259, 710, 10354, 7032, 13, 101...
3.10137
730
import os import falcon from falcon import testing from bot.middleware import JSONMiddleware
[ 11748, 28686, 198, 198, 11748, 24215, 1102, 198, 6738, 24215, 1102, 1330, 4856, 198, 198, 6738, 10214, 13, 27171, 1574, 1330, 19449, 34621, 1574, 628 ]
3.84
25
from __future__ import unicode_literals from swagger_schema import ( Info, Operation, PathItem, Response, Schema, Swagger, QueryParameter )
[ 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 6738, 1509, 7928, 62, 15952, 2611, 1330, 357, 198, 220, 220, 220, 14151, 11, 198, 220, 220, 220, 14680, 11, 198, 220, 220, 220, 10644, 7449, 11, 198, 220, 220, 220, 18...
2.522388
67
bash-4.1$ vi urlCheck.py import sys import getopt import smtplib import urllib2 import socket from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipart fromAddress='noreply@'+socket.getfqdn() toaddress='dl.cto.kr.big.data.monitoring@imcap.ap.ssmb.com'; array_server=['https://bigdataplatform-u...
[ 41757, 12, 19, 13, 16, 3, 25357, 19016, 9787, 13, 9078, 220, 198, 11748, 25064, 198, 11748, 651, 8738, 198, 11748, 895, 83, 489, 571, 198, 11748, 2956, 297, 571, 17, 198, 11748, 17802, 198, 6738, 3053, 13, 76, 524, 13, 5239, 1330, ...
2.112245
392
from typing import Any, Dict, Mapping, Optional, Sequence, Iterable, Tuple import pyevmasm as EVMAsm from .abi import ABI from ..utils.deprecated import deprecated
[ 6738, 19720, 1330, 4377, 11, 360, 713, 11, 337, 5912, 11, 32233, 11, 45835, 11, 40806, 540, 11, 309, 29291, 198, 11748, 12972, 1990, 5356, 76, 355, 8696, 44, 1722, 76, 198, 198, 6738, 764, 17914, 1330, 317, 3483, 198, 6738, 11485, 2...
3.387755
49
import functools import inspect import itertools from typing import Any, Awaitable, Callable, Union RawTask = Callable[[], Any] MaybeTask = Union['Task', RawTask] @functools.total_ordering
[ 11748, 1257, 310, 10141, 198, 11748, 10104, 198, 11748, 340, 861, 10141, 198, 6738, 19720, 1330, 4377, 11, 5851, 4548, 540, 11, 4889, 540, 11, 4479, 628, 198, 27369, 25714, 796, 4889, 540, 30109, 4357, 4377, 60, 198, 13300, 25714, 796, ...
3.25
60
#!/usr/bin/env python2 import os for root, dirs, files in os.walk("."): content = dirs + files all_filenames = set() for filename in content: if filename.lower() in all_filenames: print(root + "/" + filename) all_filenames.add(filename.lower())
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 17, 198, 198, 11748, 28686, 198, 198, 1640, 6808, 11, 288, 17062, 11, 3696, 287, 28686, 13, 11152, 7203, 526, 2599, 198, 197, 11299, 796, 288, 17062, 1343, 3696, 198, 197, 439, 62, 10379, ...
2.622449
98
# -*- coding: utf-8 -*- """ tipfy.local ~~~~~~~~~~~ Context-local utilities. :copyright: 2011 by tipfy.org. :license: BSD, see LICENSE.txt for more details. """ import werkzeug.local #: Context-local. local = werkzeug.local.Local() def get_app(): """Returns the current WSGI app instance. ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 220, 220, 220, 8171, 24928, 13, 12001, 198, 220, 220, 220, 220, 15116, 4907, 93, 628, 220, 220, 220, 30532, 12, 12001, 20081, 13, 628, 220, 220, 220, 1058,...
3.16707
413
import torch from torch.autograd.function import Function from torch._thnn import type2backend from . import _all_functions _all_functions.append(Embedding)
[ 11748, 28034, 198, 6738, 28034, 13, 2306, 519, 6335, 13, 8818, 1330, 15553, 198, 6738, 28034, 13557, 400, 20471, 1330, 2099, 17, 1891, 437, 198, 198, 6738, 764, 1330, 4808, 439, 62, 12543, 2733, 628, 198, 198, 62, 439, 62, 12543, 2733...
3.22
50
import matplotlib as mpl import matplotlib.cm as cm import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D from matplotlib.patches import Arrow from matplotlib.patches import Patch import mpl_toolkits.mplot3d.art3d as art3d import autograd.numpy as np import autograd.numpy.random as npr import autogra...
[ 11748, 2603, 29487, 8019, 355, 285, 489, 198, 11748, 2603, 29487, 8019, 13, 11215, 355, 12067, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 285, 489, 62, 25981, 74, 896, 13, 76, 29487, 18, 67, 1330, 12176, ...
2.3159
478
from tabulate import tabulate from vigorish.cli.components.viewers.display_table import DisplayTable from vigorish.cli.components.viewers.table_viewer import TableViewer from vigorish.util.list_helpers import make_chunked_list
[ 6738, 7400, 5039, 1330, 7400, 5039, 198, 198, 6738, 10539, 273, 680, 13, 44506, 13, 5589, 3906, 13, 1177, 364, 13, 13812, 62, 11487, 1330, 16531, 10962, 198, 6738, 10539, 273, 680, 13, 44506, 13, 5589, 3906, 13, 1177, 364, 13, 11487, ...
3.271429
70
################################################################################# # The Institute for the Design of Advanced Energy Systems Integrated Platform # Framework (IDAES IP) was produced under the DOE Institute for the # Design of Advanced Energy Systems (IDAES), and is copyright (c) 2018-2021 # by the softwar...
[ 29113, 29113, 14468, 2, 198, 2, 383, 5136, 329, 262, 8495, 286, 13435, 6682, 11998, 35432, 19193, 198, 2, 25161, 357, 41957, 1546, 6101, 8, 373, 4635, 739, 262, 46984, 5136, 329, 262, 198, 2, 8495, 286, 13435, 6682, 11998, 357, 41957,...
3.727984
511
# Generated by Django 2.2.3 on 2020-01-21 19:56 import django.contrib.postgres.fields from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 18, 319, 12131, 12, 486, 12, 2481, 678, 25, 3980, 198, 198, 11748, 42625, 14208, 13, 3642, 822, 13, 7353, 34239, 13, 25747, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, ...
2.892857
56
import mysql.connector from mysql.connector import errorcode from tkinter.messagebox import askokcancel, showerror
[ 11748, 48761, 13, 8443, 273, 198, 6738, 48761, 13, 8443, 273, 1330, 4049, 8189, 198, 6738, 256, 74, 3849, 13, 20500, 3524, 1330, 1265, 482, 66, 21130, 11, 14643, 1472, 628, 628, 628, 628, 628, 628, 198 ]
3.432432
37
from django.urls import path from .views import ListCreateUser, UserDetail urlpatterns = [ path('accounts/', ListCreateUser.as_view()), path('accounts/user-account/', UserDetail.as_view()), ]
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 6738, 764, 33571, 1330, 7343, 16447, 12982, 11, 11787, 11242, 603, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 3108, 10786, 23317, 82, 14, 3256, 7343, 16447, 12982, 13, 2...
2.791667
72
from src.Producto import Producto myAlimento = Alimento("Pollo", 10, 10, "Carnes") print(myAlimento.damePrecio())
[ 6738, 12351, 13, 15667, 78, 1330, 8721, 78, 628, 220, 220, 220, 220, 198, 1820, 2348, 3681, 78, 796, 978, 3681, 78, 7203, 47, 15578, 1600, 838, 11, 838, 11, 366, 34, 1501, 274, 4943, 198, 198, 4798, 7, 1820, 2348, 3681, 78, 13, ...
2.372549
51
from .adapter import * from .adapter_filtered import * from .batch_adapter import *
[ 6738, 764, 324, 3429, 1330, 1635, 198, 6738, 764, 324, 3429, 62, 10379, 4400, 1330, 1635, 198, 6738, 764, 43501, 62, 324, 3429, 1330, 1635 ]
3.32
25
from math import log2 import numpy as np from scipy import sparse as sp from sklearn.metrics.cluster.supervised import contingency_matrix, check_array, check_clusterings from expected_mutual_info_fast import expected_mutual_information # Anpassung der Funktionen aus https://github.com/scikit-learn/scikit-learn/blob/ma...
[ 6738, 10688, 1330, 2604, 17, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 1330, 29877, 355, 599, 198, 6738, 1341, 35720, 13, 4164, 10466, 13, 565, 5819, 13, 16668, 16149, 1330, 38820, 62, 6759, 8609, 11, 2198, 62, 1874...
2.511364
176
import logging import os, sys from shutil import which from re import sub from subprocess import Popen, PIPE
[ 11748, 18931, 198, 11748, 28686, 11, 25064, 198, 6738, 4423, 346, 1330, 543, 198, 6738, 302, 1330, 850, 198, 6738, 850, 14681, 1330, 8099, 268, 11, 350, 4061, 36, 628 ]
3.666667
30
# -*- coding: utf-8 -*- # @File : tasks.py # @Author : Xie # @Date : 9/10/18 # @Desc : 任务函数所在的模块(建议名称为tasks) 默认 import logging from .utils.yuntongxun.sms import CCP from celery_tasks.main import celery_app logger = logging.getLogger('django') @celery_app.task(name='send_sms_code') # 这里task是单数; 通过name参数来指定任务的名字...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2488, 8979, 1058, 8861, 13, 9078, 198, 2, 2488, 13838, 1058, 48989, 198, 2, 2488, 10430, 220, 220, 1058, 860, 14, 940, 14, 1507, 198, 2, 2488, 24564, 220, 220, 10...
1.444444
594
# -*- coding: utf8 -*- """ auto up """ from config.dev import * import requests from lxml import etree import urllib2 import pytesseract try: import Image except: from PIL import Image import os from io import BytesIO import sys headers = {'Host': 'www.douban.com', 'Accept': 'text/html,application/xhtml+xml...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 23, 532, 9, 12, 198, 198, 37811, 198, 23736, 510, 198, 37811, 198, 198, 6738, 4566, 13, 7959, 1330, 1635, 198, 11748, 7007, 198, 6738, 300, 19875, 1330, 2123, 631, 198, 11748, 2956, 297, 571, 17...
2.076416
759
""" __init__.py @Organization: @Author: Ming Zhou @Time: 4/22/21 5:28 PM @Function: """
[ 37811, 198, 834, 15003, 834, 13, 9078, 198, 198, 31, 26121, 1634, 25, 220, 220, 198, 31, 13838, 25, 26980, 32222, 198, 31, 7575, 25, 604, 14, 1828, 14, 2481, 642, 25, 2078, 3122, 198, 31, 22203, 25, 198, 37811, 198 ]
2.219512
41
from enum import Enum from math import pi from pathlib import Path from typing import Optional, Sequence, Tuple import tensorflow as tf from ertk.utils import PathOrStr __all__ = ["BBRBM", "GBRBM"] class RBM: """Restricted Boltzmann Machine This implementation is designed around the work of Hinton et. ...
[ 6738, 33829, 1330, 2039, 388, 198, 6738, 10688, 1330, 31028, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 19720, 1330, 32233, 11, 45835, 11, 309, 29291, 198, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 198, 6738, 220, 861, 74, 13,...
1.933683
10,118
# pyOCD debugger # Copyright (c) 2015-2020 Arm Limited # Copyright (c) 2021 Chris Reed # SPDX-License-Identifier: Apache-2.0 # # 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...
[ 2, 12972, 4503, 35, 49518, 198, 2, 15069, 357, 66, 8, 1853, 12, 42334, 7057, 15302, 198, 2, 15069, 357, 66, 8, 33448, 5180, 16105, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 198, 2, 198, 2, 49962, ...
2.522834
6,153
""" Download quantification result datasets from a Galaxy history. python scripts/download_datasets.py --help """ import argparse import logging from cycif_db.galaxy_download import download_datasets parser = argparse.ArgumentParser() parser.add_argument( '--server', '-s', type=str, dest='server', required=Fals...
[ 37811, 10472, 5554, 2649, 1255, 40522, 422, 257, 9252, 2106, 13, 198, 198, 29412, 14750, 14, 15002, 62, 19608, 292, 1039, 13, 9078, 1377, 16794, 198, 37811, 198, 11748, 1822, 29572, 198, 11748, 18931, 198, 198, 6738, 3075, 66, 361, 62, ...
2.800532
376
#!/usr/bin/env python # -*- coding: utf-8 -*- """:Mod: __init__ :Synopsis: :Author: servilla :Created: 12/30/17 """ import logging import os import sys sys.path.insert(0, os.path.abspath('..')) import daiquiri cwd = os.path.dirname(os.path.realpath(__file__)) logfile = cwd + '/tests.log' daiquiri.setup...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 15931, 1298, 5841, 25, 11593, 15003, 834, 198, 198, 25, 49771, 25, 198, 198, 25, 13838, 25, 198, 220, 220, 220, ...
2.218274
197
from django.db import models from django.utils import timezone from django.contrib.auth.models import User #Post class Start #Post Class End #Basic Tweet Class Start #Basic Tweet Class End
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 26791, 1330, 640, 11340, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 628, 198, 2, 6307, 1398, 7253, 198, 198, 2, 6307, 5016, 5268, 1...
3.527273
55
# Purpose of this script # ---------------------- # # Calculates overhead line conductor ratings according to the formulas in # the Electricity Supply Association of Australia (ESAA) document # D(b)5 - 1988, "Current rating of Bare Overhead Line Conductors". # # Note ESAA became ENA, Energy Networks Australia, so this ...
[ 2, 32039, 286, 428, 4226, 198, 2, 41436, 438, 198, 2, 198, 2, 27131, 689, 16965, 1627, 39206, 10109, 1864, 284, 262, 32126, 287, 198, 2, 262, 42048, 22663, 5396, 286, 4505, 357, 1546, 3838, 8, 3188, 198, 2, 360, 7, 65, 8, 20, 53...
3.84121
1,058
#!/usr/bin/python # -*- encoding=utf-8 -*- from django.conf.urls import include, url urlpatterns = [ url(r'^api/doc/', include("mouprojects.apps.apidoc.urls")), ]
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 21004, 28, 40477, 12, 23, 532, 9, 12, 198, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 2291, 11, 19016, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 22...
2.283784
74
"""Top-level package for Ketchup.""" __author__ = """Romain Commandé""" __email__ = "rcommande@meilleursagents.com" __version__ = "0.1.0"
[ 37811, 9126, 12, 5715, 5301, 329, 509, 47132, 526, 15931, 198, 198, 834, 9800, 834, 796, 37227, 22834, 391, 9455, 2634, 37811, 198, 834, 12888, 834, 796, 366, 81, 21812, 68, 31, 1326, 8270, 1834, 49638, 13, 785, 1, 198, 834, 9641, 8...
2.673077
52
#!/usr/bin/env python # -*- coding: utf-8 -*- """Run example Widom calculation in HKUST1 framework, using 0.7 scaling for the probe radius to compute blocks.""" import os import click from aiida.engine import run from aiida.plugins import DataFactory, WorkflowFactory from aiida.orm import Str, Dict from aiida import c...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 10987, 1672, 24801, 296, 17952, 287, 31440, 7759, 16, 9355, 11, 1262, 657, 13, 22, 20796, 329, 262, 12774, 16874...
2.447403
751
#!/usr/bin/env python #_MIT License #_ #_Copyright (c) 2017 Dan Persons (dpersonsdev@gmail.com) #_ #_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 limi...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 62, 36393, 13789, 198, 2, 62, 198, 2, 62, 15269, 357, 66, 8, 2177, 6035, 32884, 357, 67, 19276, 684, 7959, 31, 14816, 13, 785, 8, 198, 2, 62, 198, 2, 62, 5990, 3411, 31...
3.163993
561
from django.urls import path from . import views urlpatterns = [ path('', views.band_listing, name='band-list'), path('<int:band_id>/', views.band_detail, name='band-detail'), path('search/', views.band_search, name='band-search'), ]
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 198, 6738, 764, 1330, 5009, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 3108, 10786, 3256, 5009, 13, 3903, 62, 4868, 278, 11, 1438, 11639, 3903, 12, 4868, 33809, 198, 2...
2.695652
92
from django.http import response from django.shortcuts import render from gardens import geocoding from django.template import RequestContext from django.http.response import Http404, HttpResponse, HttpResponseRedirect, JsonResponse from rest_framework.parsers import JSONParser from rest_framework import status import ...
[ 6738, 42625, 14208, 13, 4023, 1330, 2882, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 25476, 1330, 4903, 420, 7656, 198, 6738, 42625, 14208, 13, 28243, 1330, 19390, 21947, 198, 6738, 42625, 14208, 13, 4023, 13, 26209...
3.429167
480
import argparse import csv import json import math import time from sklearn.model_selection import train_test_split import numpy as np import pandas as pd import torch import torch.nn.functional as F import torch.optim import torch.optim as optim import torch.utils.data as data from nltk.tokenize.treebank import Treeba...
[ 11748, 1822, 29572, 198, 11748, 269, 21370, 198, 11748, 33918, 198, 11748, 10688, 198, 11748, 640, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 4512, 62, 9288, 62, 35312, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, ...
2.374494
1,976
from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals from collections import defaultdict from django.core.management.base import BaseCommand from corehq.apps.userreports.models import DataSourceConfiguration, StaticDataSourceConfiguration from corehq.ap...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 17268, 1330, 4277, 11600, 198, 198, 6738, 42625, 14208, ...
3.645669
127
""" Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. SPDX-License-Identifier: Apache-2.0 OR MIT """ import os import pytest from Automated.atom_utils import hydra_test_utils as hydra from Automated.atom_utils.a...
[ 37811, 198, 15269, 357, 66, 8, 25767, 669, 284, 262, 4946, 513, 35, 7117, 4935, 13, 198, 1890, 1844, 6634, 290, 5964, 2846, 3387, 766, 262, 38559, 24290, 379, 262, 6808, 286, 428, 6082, 13, 198, 198, 4303, 36227, 12, 34156, 12, 3323...
3.136364
176
import os, sys; sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", "..")) from pattern.search import search, match from pattern.en import parsetree # This example demonstrates an interesting search pattern that mines for comparisons. # Notice the use of the constraint "be". # If the output from the ...
[ 11748, 28686, 11, 25064, 26, 25064, 13, 6978, 13, 28463, 7, 15, 11, 28686, 13, 6978, 13, 22179, 7, 418, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 828, 366, 492, 1600, 366, 492, 48774, 198, 198, 6738, 3912, 13, 12947, 1330, 298...
2.660377
424
import urllib.request import tarfile from CONFIG import CONFIG download_file_path = CONFIG.DATAST_DIR_PATH + CONFIG.DOWNLOADED_FILE_NAME if __name__ == '__main__': urllib.request.urlretrieve(CONFIG.DATASET_URL, download_file_path) with tarfile.open(download_file_path, "r:gz") as f: f.extractall(CONFI...
[ 11748, 2956, 297, 571, 13, 25927, 198, 11748, 13422, 7753, 198, 6738, 25626, 1330, 25626, 198, 198, 15002, 62, 7753, 62, 6978, 796, 25626, 13, 35, 1404, 11262, 62, 34720, 62, 34219, 1343, 25626, 13, 41925, 35613, 1961, 62, 25664, 62, ...
2.541353
133
from SimpleEvents import Dispatcher # don't forget about those parentheses. # It is a parameterized decorator, # with just one optional parameter. # @Dispatcher(delegateObject = None) @Dispatcher() @doNothing.subscribe @doNothing.subscribe # after subscribing returns noname function, decorator-safe doNothing.s...
[ 6738, 17427, 37103, 1330, 3167, 8071, 2044, 198, 198, 2, 836, 470, 6044, 546, 883, 46672, 13, 198, 2, 632, 318, 257, 11507, 1143, 11705, 1352, 11, 198, 2, 351, 655, 530, 11902, 11507, 13, 198, 2, 2488, 7279, 8071, 2044, 7, 2934, 3...
3.480315
127
from pathlib import Path import pandas as pd import numpy as np import torch from tqdm.auto import tqdm from diskcache import Cache cache = Cache(".cache") def npsample_batch(x, y, size=None, sort=True): """Sample from numpy arrays along 2nd dim.""" inds = np.random.choice(range(x.shape[1]), size=size, repla...
[ 6738, 3108, 8019, 1330, 10644, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 6738, 256, 80, 36020, 13, 23736, 1330, 256, 80, 36020, 198, 198, 6738, 11898, 23870, 1330, 34088, 198, 198,...
2.4375
208
import click import psycopg2 from feast.infra.utils.postgres.connection_utils import df_to_postgres_table from feast.infra.utils.postgres.postgres_config import PostgreSQLConfig if __name__ == "__main__": bootstrap()
[ 11748, 3904, 198, 11748, 17331, 22163, 70, 17, 198, 198, 6738, 26951, 13, 10745, 430, 13, 26791, 13, 7353, 34239, 13, 38659, 62, 26791, 1330, 47764, 62, 1462, 62, 7353, 34239, 62, 11487, 198, 6738, 26951, 13, 10745, 430, 13, 26791, 13...
3.054054
74
""" @package mi.dataset.parser @file marine-integrations/mi/dataset/parser/nutnr_j_cspp.py @author Emily Hahn @brief Parser for the nutnr_j_cspp dataset driver Release notes: initial release """ __author__ = 'Emily Hahn' __license__ = 'Apache 2.0' import re from mi.core.log import get_logger log = get_logger() from...
[ 37811, 198, 31, 26495, 21504, 13, 19608, 292, 316, 13, 48610, 198, 31, 7753, 16050, 12, 18908, 9143, 14, 11632, 14, 19608, 292, 316, 14, 48610, 14, 14930, 48624, 62, 73, 62, 6359, 381, 13, 9078, 198, 31, 9800, 17608, 367, 15386, 198...
2.206043
3,475
from flask import Flask, Response, render_template, jsonify, request from models import Employee, Field, LocalType, Local, Demand, Journey, db from schema import EmployeeSchema, FieldSchema, LocalTypeSchema, DemandSchema, JourneySchema, LocalSchema app = Flask(__name__) app.config['SQLALCHEMY_DATABASE_URI'] = 'postgre...
[ 6738, 42903, 1330, 46947, 11, 18261, 11, 8543, 62, 28243, 11, 33918, 1958, 11, 2581, 198, 6738, 4981, 1330, 36824, 11, 7663, 11, 10714, 6030, 11, 10714, 11, 34479, 11, 15120, 11, 20613, 198, 6738, 32815, 1330, 36824, 27054, 2611, 11, ...
2.615169
356
# -*- coding: utf-8 -*- # Copyright © 2017-2019, Chris Warrick. # Permission is hereby granted, free of charge, to any # person obtaining a copy of this software and associated # documentation files (the "Software"), to deal in the # Software without restriction, including without limitation # the rights to use, copy...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 15069, 10673, 2177, 12, 23344, 11, 5180, 1810, 5557, 13, 198, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 198, 2, 1048, 16727, 2...
2.760357
1,231
from rest_framework import generics from rest_framework.decorators import api_view from rest_framework.views import APIView from rest_framework.response import Response from .models import ProductType, ModuleType, Unit, Module, Version from .serializers import ProductTypeSerializer, ModuleTypeSerializer, UnitSerializer...
[ 6738, 1334, 62, 30604, 1330, 1152, 873, 198, 6738, 1334, 62, 30604, 13, 12501, 273, 2024, 1330, 40391, 62, 1177, 198, 6738, 1334, 62, 30604, 13, 33571, 1330, 3486, 3824, 769, 198, 6738, 1334, 62, 30604, 13, 26209, 1330, 18261, 198, 67...
3.028609
769
''' File: antifuzz.py Authors: Kaitlin Keenan and Ryan Frank ''' # Import needed modules import sys import re import random import argparse import subprocess from shutil import copy2 import ssdeep #http://python-ssdeep.readthedocs.io/en/latest/installation.html ''' Name: main Purpose: The main method performs the...
[ 7061, 6, 198, 8979, 25, 1885, 361, 4715, 13, 9078, 198, 198, 30515, 669, 25, 509, 4548, 2815, 32444, 272, 290, 6047, 5278, 198, 7061, 6, 628, 198, 2, 17267, 2622, 13103, 198, 11748, 25064, 198, 11748, 302, 198, 11748, 4738, 198, 117...
3.29085
306
from src.components.users import * from src.components.posts import * from src.components.errors import *
[ 6738, 12351, 13, 5589, 3906, 13, 18417, 1330, 1635, 198, 6738, 12351, 13, 5589, 3906, 13, 24875, 1330, 1635, 198, 6738, 12351, 13, 5589, 3906, 13, 48277, 1330, 1635, 198 ]
3.533333
30
DATA_FOLDER = 'data' DATA_INPUT_ZIP = 'stanford-dogs-dataset.zip' DATA_OUTPUT_ZIP = 'dataset_unzipped' DATASET_FOLDER = 'dataset' IMAGES_LIST_FILE_NAME = 'images.txt' INDEX_FILE_NAME = 'index.nmslib' INPUT_IMAGE_FILE_NAME = 'input_image.jpg' OUTPUT_IMAGE_FILE_NAME = 'output_image.jpg' DEFAULT_IMAGES_PER_RACE = 1 IMAG...
[ 26947, 62, 37, 3535, 14418, 796, 705, 7890, 6, 198, 26947, 62, 1268, 30076, 62, 57, 4061, 796, 705, 14192, 3841, 12, 22242, 12, 19608, 292, 316, 13, 13344, 6, 198, 26947, 62, 2606, 7250, 3843, 62, 57, 4061, 796, 705, 19608, 292, 3...
2.149701
167
#!/usr/bin/env python3 import curses from player import Player from enums import Direction
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 43878, 198, 198, 6738, 2137, 1330, 7853, 198, 6738, 551, 5700, 1330, 41837, 198 ]
3.576923
26
# -*- coding: utf-8 -*- """ TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-用户管理(Bk-User) available. Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in compliance with the Lic...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 24893, 1087, 14573, 15708, 318, 10607, 284, 1104, 262, 1280, 2723, 2055, 416, 1642, 5525, 241, 251, 165, 110, 116, 162, 247, 118, 12859, 239, 12, 18796, 101,...
4.26259
278
from terse import main FILENAME = 'made_by_test_invoke_helper.txt' @main
[ 6738, 1059, 325, 1330, 1388, 198, 198, 46700, 1677, 10067, 796, 705, 9727, 62, 1525, 62, 9288, 62, 37669, 62, 2978, 525, 13, 14116, 6, 198, 198, 31, 12417, 198 ]
2.5
30
import unittest from minos.common.testing import ( DatabaseMinosTestCase, ) from minos.networks import ( REQUEST_REPLY_TOPIC_CONTEXT_VAR, BrokerClient, BrokerClientPool, InMemoryBrokerPublisher, InMemoryBrokerSubscriberBuilder, ) from tests.utils import ( NetworksTestCase, ) if __name__ ...
[ 11748, 555, 715, 395, 198, 198, 6738, 949, 418, 13, 11321, 13, 33407, 1330, 357, 198, 220, 220, 220, 24047, 9452, 418, 14402, 20448, 11, 198, 8, 198, 6738, 949, 418, 13, 3262, 5225, 1330, 357, 198, 220, 220, 220, 4526, 35780, 62, ...
2.553957
139
""" This module provides some extensions to matplotlib. :dependencies: * numpy * matplotlib :copyright: | Tom de Geus | tom@geus.me | http://www.geus.me """ from __future__ import annotations import textwrap import deprecation import matplotlib import matplotlib.pyplot as plt import numpy as n...
[ 37811, 198, 1212, 8265, 3769, 617, 18366, 284, 2603, 29487, 8019, 13, 198, 198, 25, 45841, 3976, 25, 628, 220, 220, 220, 1635, 299, 32152, 198, 220, 220, 220, 1635, 2603, 29487, 8019, 198, 198, 25, 22163, 4766, 25, 628, 220, 220, 22...
2.199783
26,754
""" Module: 'utime' on M5 FlowUI v1.4.0-beta """ # MCU: (sysname='esp32', nodename='esp32', release='1.11.0', version='v1.11-284-g5d8e1c867 on 2019-08-30', machine='ESP32 module with ESP32') # Stubber: 1.3.1 - updated from typing import Any
[ 37811, 198, 26796, 25, 705, 315, 524, 6, 319, 337, 20, 27782, 10080, 410, 16, 13, 19, 13, 15, 12, 31361, 198, 37811, 198, 2, 13122, 52, 25, 357, 17597, 3672, 11639, 9774, 2624, 3256, 18666, 12453, 11639, 9774, 2624, 3256, 2650, 1163...
2.35514
107
#!/usr/bin/env python import os import glob import unittest from time import sleep from appium import webdriver if __name__ == '__main__': suite = unittest.TestLoader().loadTestsFromTestCase(AndroidWebViewTests) unittest.TextTestRunner(verbosity=2).run(suite)
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 28686, 198, 11748, 15095, 198, 11748, 555, 715, 395, 198, 6738, 640, 1330, 3993, 198, 6738, 598, 1505, 1330, 3992, 26230, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 1...
2.944444
90
#!/usr/bin/python # -*- coding: utf-8 -*- import datetime import os import re import shutil import sys import time import pythoncom import win32com from win32com.client import Dispatch from generator import fetcher CURRENT_FOLDER = sys.path[0] run_time_str = time.strftime('%Y%m%d%H%M', time.localtime(time.time())) R...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 4818, 8079, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 4423, 346, 198, 11748, 25064, 198, 11748, 640, 198, 198, 11...
2.378414
769
# Generated by Django 3.2.7 on 2021-12-15 16:20 import cloudinary.models from django.conf import settings from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 22, 319, 33448, 12, 1065, 12, 1314, 1467, 25, 1238, 198, 198, 11748, 6279, 3219, 13, 27530, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 6...
3.137931
58
import curses import random import time from cursy import curses_application @curses_application
[ 11748, 43878, 198, 11748, 4738, 198, 11748, 640, 198, 6738, 1090, 1837, 1330, 43878, 62, 31438, 628, 628, 198, 31, 66, 46998, 62, 31438, 198 ]
4.04
25
from ppb_vector import Vector2
[ 6738, 9788, 65, 62, 31364, 1330, 20650, 17, 628 ]
3.555556
9
'''@file seq_convertors.py this file contains functions that convert sequential data to non-sequential data and the other way around. Sequential data is defined to be data that is suetable as RNN input. This means that the data is a list containing an N x F tensor for each time step where N is the batch size and F is t...
[ 7061, 6, 31, 7753, 33756, 62, 1102, 1851, 669, 13, 9078, 198, 5661, 2393, 4909, 5499, 326, 10385, 35582, 1366, 284, 1729, 12, 3107, 1843, 1366, 198, 392, 262, 584, 835, 1088, 13, 24604, 1843, 1366, 318, 5447, 284, 307, 1366, 326, 31...
2.693686
1,172
import numpy as np from astropy import units as u, constants as c from astropy.io import fits from importer import * import utils as ut from spectrophot import Spec2Phot import regrid import manga_tools as m from manga_elines import get_emline_qty import spec_tools from elines import (balmer_low, balmer_high, heliu...
[ 11748, 299, 32152, 355, 45941, 198, 198, 6738, 6468, 28338, 1330, 4991, 355, 334, 11, 38491, 355, 269, 198, 6738, 6468, 28338, 13, 952, 1330, 11414, 198, 198, 6738, 848, 4337, 1330, 1635, 198, 11748, 3384, 4487, 355, 3384, 198, 6738, ...
2.062329
2,920
# Generated by Django 3.2.12 on 2022-03-03 09:06 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 1065, 319, 33160, 12, 3070, 12, 3070, 7769, 25, 3312, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.875
32
# sp20-516-250 E.Cloudmesh.Common.3 from cloudmesh.common.FlatDict import FlatDict store = { "name": "Amazon", "employees": { "type1": "hourly", "type2": "salary" } } flat = FlatDict(store, sep=".") print(flat)
[ 2, 599, 1238, 12, 47493, 12, 9031, 412, 13, 18839, 76, 5069, 13, 17227, 13, 18, 198, 198, 6738, 6279, 76, 5069, 13, 11321, 13, 7414, 265, 35, 713, 1330, 21939, 35, 713, 198, 8095, 796, 1391, 198, 1, 3672, 1298, 366, 24888, 1600, ...
2.262626
99
from django.urls import reverse, resolve from django.test import SimpleTestCase from Account.views import login_view, register_view, account_view, logout_view
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 11, 10568, 198, 6738, 42625, 14208, 13, 9288, 1330, 17427, 14402, 20448, 198, 6738, 10781, 13, 33571, 1330, 17594, 62, 1177, 11, 7881, 62, 1177, 11, 1848, 62, 1177, 11, 2604, 448, 62, 1177...
3.72093
43
from heapq import *
[ 6738, 24575, 80, 1330, 1635, 198 ]
3.333333
6
# # Copyright (C) [2020] Futurewei Technologies, Inc. # # FORCE-RISCV is 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 # # THIS SOFTWARE IS PR...
[ 2, 198, 2, 15069, 357, 34, 8, 685, 42334, 60, 10898, 42990, 21852, 11, 3457, 13, 198, 2, 198, 2, 7473, 5222, 12, 49, 1797, 33538, 318, 11971, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 198, 2, 220, 357, 1169, 366, 34156, 15...
3.365696
309
labels_template = "<div class='tree-label'>%s</div>" label_template = "<div class='tree-label-text'>%s</div>"
[ 198, 23912, 1424, 62, 28243, 796, 33490, 7146, 1398, 11639, 21048, 12, 18242, 44167, 4, 82, 3556, 7146, 24618, 198, 18242, 62, 28243, 796, 33490, 7146, 1398, 11639, 21048, 12, 18242, 12, 5239, 44167, 4, 82, 3556, 7146, 24618, 198 ]
2.775
40
# coding: utf-8 from flask.ext.script import (Command, Option, prompt, prompt_pass, prompt_choices) from .models import User, Role class CreateRole(Command): "Create a role" command_name = "createrole" option_list = ( Option('--name', '-n', dest='name'), Op...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 6738, 42903, 13, 2302, 13, 12048, 1330, 357, 21575, 11, 16018, 11, 6152, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220,...
2.395939
394
import main
[ 11748, 1388, 628, 628 ]
3.75
4
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Вариант 6 # В списке, состоящем из целых элементов, вычислить: # 1) номер максимального элемента списка; # 2) произведение элементов списка, расположенных между первым и вторым нулевыми элементами. # Преобразовать список таким образом, чтобы в первой его половине распол...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 12466, 240, 16142, 21169, 18849, 16142, 22177, 20375, 718, 198, 2, 12466, 240, 220, 21727, 140, 123, 18849,...
1.256731
1,040
import torch
[ 11748, 28034, 628 ]
4.666667
3
import json import logging import os import time import yaml import copy from oc.openshift_ops import OCP from ocs.exceptions import CommandFailed, CephHealthException from ocs.utils import create_oc_resource, apply_oc_resource from ocs.constants import TOP_DIR from ocsci import config from ocsci.testlib import deploy...
[ 11748, 33918, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 640, 198, 11748, 331, 43695, 198, 11748, 4866, 198, 198, 6738, 267, 66, 13, 44813, 29323, 62, 2840, 1330, 440, 8697, 198, 6738, 267, 6359, 13, 1069, 11755, 1330, 9455, 37, ...
2.402997
1,268
host = "127.0.0.1" username = None password = None port = 27017
[ 4774, 796, 366, 16799, 13, 15, 13, 15, 13, 16, 1, 198, 29460, 796, 6045, 198, 28712, 796, 6045, 198, 634, 796, 2681, 29326, 198 ]
2.56
25
from broker.providers.decoder import DecoderProvider from thingpark.parsers import parse_sensornode
[ 6738, 20426, 13, 15234, 4157, 13, 12501, 12342, 1330, 34580, 29495, 198, 6738, 1517, 20928, 13, 79, 945, 364, 1330, 21136, 62, 82, 641, 1211, 1098, 628 ]
3.740741
27
# -*- coding:utf-8 -*- from django.shortcuts import render, redirect from django.http import Http404 from taskdo.utils.runner import AdHocRunner, CommandRunner, PlayBookRunner from taskdo.utils.inventory import BaseInventory from mysite.utils.insertdb_history import InsertExecHistory from hosts import models as models_...
[ 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 18941, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 26429, 198, 6738, 4876, 4598, 13, 26791, 13, 16737, 1330, 12...
2.303202
531
from duckduckgo import query, Topic from sys import argv visited = [] depth_color = { 0: 'green', 1: '#A52A2A', 2: 'grey', 3: 'blue' } if __name__ == '__main__': print """digraph G { ranksep=3; ratio=auto;""" build_web_tree(None, ' '.join(argv[1:])) ...
[ 6738, 22045, 646, 694, 2188, 1330, 12405, 11, 47373, 198, 6738, 25064, 1330, 1822, 85, 198, 4703, 863, 796, 17635, 198, 18053, 62, 8043, 796, 1391, 198, 220, 220, 220, 657, 25, 705, 14809, 3256, 220, 198, 220, 220, 220, 352, 25, 705...
1.897727
176
from psi.experiment.api import ParadigmDescription PATH = 'psi.paradigms.behavior.' CORE_PATH = 'psi.paradigms.core.' ParadigmDescription( 'appetitive_gonogo_food', 'Appetitive GO-NOGO food', 'animal', [ {'manifest': PATH + 'behavior_np_gonogo.BehaviorManifest'}, {'manifest': PATH + 'behavior_mi...
[ 6738, 46231, 13, 23100, 3681, 13, 15042, 1330, 14853, 17225, 11828, 628, 198, 34219, 796, 705, 862, 72, 13, 1845, 324, 328, 907, 13, 46571, 2637, 198, 34, 6965, 62, 34219, 796, 705, 862, 72, 13, 1845, 324, 328, 907, 13, 7295, 2637, ...
2.239295
397
import ray ray.init() @ray.remote(num_return_vals=3) a_id, b_id, c_id = return_multiple.remote() print(ray.get([a_id, b_id]))
[ 11748, 26842, 198, 2433, 13, 15003, 3419, 628, 198, 31, 2433, 13, 47960, 7, 22510, 62, 7783, 62, 12786, 28, 18, 8, 198, 198, 64, 62, 312, 11, 275, 62, 312, 11, 269, 62, 312, 796, 1441, 62, 48101, 13, 47960, 3419, 198, 4798, 7, ...
2.206897
58
from io import open from setuptools import find_packages, setup with open('logarhythm/logarhythm.py', 'r') as f: for line in f: if line.startswith('__version__'): version = line.strip().split('=')[1].strip(' \'"') break else: version = '0.0.1' with open('README.md', 'r...
[ 6738, 33245, 1330, 1280, 198, 198, 6738, 900, 37623, 10141, 1330, 1064, 62, 43789, 11, 9058, 198, 198, 4480, 1280, 10786, 6404, 283, 71, 34853, 14, 6404, 283, 71, 34853, 13, 9078, 3256, 705, 81, 11537, 355, 277, 25, 198, 220, 220, 2...
2.616949
590
#!/usr/bin/env python from __future__ import print_function import sys import cStringIO import logging import copy import os import copy as cp from . import util from . import convert from . import builtins import visit as v from ast import Operators as op from ast import AssignOperators as assignop from ast.utils...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 25064, 198, 11748, 269, 10100, 9399, 198, 11748, 18931, 198, 11748, 4866, 198, 11748, 28686, 198, 11748, 4866, 355, 31396, ...
3.353465
1,010
""" 第一个python程序 - 输出"hello world!" 致敬Guido van Rossum先生 吉多·范罗苏姆 Version:0.1 Author: osc-wanghj Date: 2019年09月28日 """ # import this print('hello world!') # print('你好,世界!') print("你好,世界") print('你好', '世界') print('hello', 'world', 'NICE', sep=', ', end='!') print('hello', 'world', end='!\n')
[ 37811, 198, 198, 163, 105, 105, 31660, 10310, 103, 29412, 163, 101, 233, 41753, 237, 532, 5525, 122, 241, 49035, 118, 1, 31373, 995, 2474, 198, 164, 229, 112, 46763, 105, 8205, 17305, 5719, 9847, 388, 17739, 230, 37955, 198, 220, 220,...
1.575916
191
import torch import torch.nn.functional as F def iou_loss(confidence, label, reduction='sum', weight=1.0, eps=1e-6): """IoU loss, Computing the IoU loss between a set of predicted bboxes and target bboxes. The loss is calculated as negative log of IoU. Args: pred (Tensor): Predi...
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 220, 220, 220, 198, 198, 4299, 1312, 280, 62, 22462, 7, 39745, 11, 6167, 11, 7741, 11639, 16345, 3256, 3463, 28, 16, 13, 15, 11, 304, 862, 28, 16, 68, 12, 21, 2599, ...
2.071096
1,505
from rockstar import RockStar scala_code = 'object HelloWorld {def main(args: Array[String]) { println("Hello world") }}' rock_it_bro = RockStar(days=400, file_name='hello.scala', code=scala_code) rock_it_bro.make_me_a_rockstar()
[ 6738, 3881, 7364, 1330, 4631, 8248, 198, 198, 1416, 6081, 62, 8189, 796, 705, 15252, 18435, 10603, 1391, 4299, 1388, 7, 22046, 25, 15690, 58, 10100, 12962, 1391, 44872, 7203, 15496, 995, 4943, 34949, 6, 198, 10823, 62, 270, 62, 7957, ...
2.817073
82
from setuptools import find_packages, setup with open("README.md", "r") as fh: long_description = fh.read() setup( name="bayes-optim", version="0.2.5.8", author="Hao Wang", author_email="wangronin@gmail.com", packages=find_packages(), description="A Bayesian Optimization Library", long...
[ 6738, 900, 37623, 10141, 1330, 1064, 62, 43789, 11, 9058, 198, 198, 4480, 1280, 7203, 15675, 11682, 13, 9132, 1600, 366, 81, 4943, 355, 277, 71, 25, 198, 220, 220, 220, 890, 62, 11213, 796, 277, 71, 13, 961, 3419, 198, 198, 40406, ...
2.033784
592
import re from beancount.core import data
[ 11748, 302, 198, 6738, 307, 1192, 608, 13, 7295, 1330, 1366, 628, 628 ]
3.461538
13
from django.conf.urls import url from upload_form import views app_name = 'upload_form' urlpatterns = [ url('test/', views.test, name="test"), ]
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 198, 6738, 9516, 62, 687, 1330, 5009, 628, 198, 1324, 62, 3672, 796, 705, 25850, 62, 687, 6, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 19016, 10786, 9288, 14, ...
2.763636
55
from bllipparser import RerankingParser import StanfordDependencies import json import pickle print('Loading bllipparser...') rrp = RerankingParser.fetch_and_load('GENIA+PubMed', verbose=True)
[ 6738, 275, 297, 3974, 28198, 1330, 371, 263, 15230, 46677, 198, 11748, 13863, 35, 2690, 3976, 198, 11748, 33918, 198, 11748, 2298, 293, 198, 198, 4798, 10786, 19031, 275, 297, 3974, 28198, 986, 11537, 198, 21062, 79, 796, 371, 263, 1523...
3.145161
62
#! /usr/bin/env python3 from gpiozero import Button from time import sleep btn = Button(17) print("Press btn...") while True: try: if btn.is_pressed: print("Button pressed") sleep(0.2) except KeyboardInterrupt: print("Exiting") btn.close() exit(0)
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 6738, 27809, 952, 22570, 1330, 20969, 198, 6738, 640, 1330, 3993, 198, 198, 46118, 796, 20969, 7, 1558, 8, 198, 198, 4798, 7203, 13800, 275, 34106, 9313, 8, 198, 4514, 640...
2.418803
117
#!/usr/bin/env python3 # Copyright 2020 The Autoware Foundation # # 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 appl...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 15069, 12131, 383, 5231, 322, 533, 5693, 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...
2.535205
2,386
import cv2 import os cascPath = os.path.dirname( cv2.__file__) + "//data//haarcascade_frontalface_alt2.xml" faceCascade = cv2.CascadeClassifier(cascPath) video_capture = cv2.VideoCapture(0) while True: # Capture frame-by-frame ret, frame = video_capture.read() gray = cv2.cvtColor(frame, cv2.COL...
[ 11748, 269, 85, 17, 201, 198, 11748, 28686, 201, 198, 66, 3372, 15235, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 201, 198, 220, 220, 220, 269, 85, 17, 13, 834, 7753, 834, 8, 1343, 366, 1003, 7890, 1003, 3099, 5605, 28966, 62, 8534...
1.767578
512
""" Premium Question """ __author__ = 'Daniel'
[ 37811, 198, 36787, 18233, 198, 37811, 198, 834, 9800, 834, 796, 705, 19962, 6, 198 ]
3.133333
15
n = int(raw_input()) f = [0] * (n + 1) f[0] = 2 for i in range(n + 1): f[i] = f[i - 1] * 2 + 2 print f[n]
[ 77, 796, 493, 7, 1831, 62, 15414, 28955, 198, 69, 796, 685, 15, 60, 1635, 357, 77, 1343, 352, 8, 198, 69, 58, 15, 60, 796, 362, 198, 1640, 1312, 287, 2837, 7, 77, 1343, 352, 2599, 198, 220, 220, 220, 277, 58, 72, 60, 796, 27...
1.758065
62
import os import re import sys import pytest from lektor.buildfailures import BuildFailure from lektor.buildfailures import FailureController @pytest.fixture @pytest.fixture
[ 11748, 28686, 198, 11748, 302, 198, 11748, 25064, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 443, 74, 13165, 13, 11249, 32165, 942, 1330, 10934, 50015, 198, 6738, 443, 74, 13165, 13, 11249, 32165, 942, 1330, 25743, 22130, 628, 198, 3...
3.245614
57
import threading from collections import Mapping import logging from keeper.streams import WriteableBinaryStream from keeper.values import Value DEFAULT_ENCODING = "utf-8" logger = logging.getLogger(__name__)
[ 11748, 4704, 278, 198, 6738, 17268, 1330, 337, 5912, 198, 11748, 18931, 198, 198, 6738, 28356, 13, 5532, 82, 1330, 19430, 540, 33, 3219, 12124, 198, 6738, 28356, 13, 27160, 1330, 11052, 198, 198, 7206, 38865, 62, 24181, 3727, 2751, 796,...
3.412698
63