content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
from typing import Tuple, Callable, List import numpy as np import torch import torch.nn as nn from receptivefields.base import ReceptiveField from receptivefields.logging import get_logger from receptivefields.types import ( ImageShape, GridPoint, GridShape, FeatureMapDescription, ) _logger = get_lo...
[ 6738, 19720, 1330, 309, 29291, 11, 4889, 540, 11, 7343, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 198, 6738, 41062, 25747, 13, 8692, 1330, 797, 25867, 15878, 198, 6738, ...
3.194175
103
#!/bin/env python # coding=UTF-8 # Import Self from .tmpFile import tmpFile, tmpFolder
[ 2, 48443, 8800, 14, 24330, 21015, 198, 2, 19617, 28, 48504, 12, 23, 198, 198, 2, 17267, 12189, 198, 6738, 764, 22065, 8979, 1330, 45218, 8979, 11, 45218, 41092, 198 ]
2.933333
30
from __future__ import unicode_literals from django.conf import settings from django.db.models import F from django.db.models.aggregates import Count from rest_framework import response, decorators from geotrek.api.v2 import serializers as api_serializers, \ viewsets as api_viewsets from geotrek.api.v2.functions ...
[ 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 1330, 376, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 13, 9460, 2301, 689,...
3.330645
124
''' Takes a given spectrum and collapses it spatially to inspect for any possible contamination (via continuum). Currently just using this code for one galaxy in particular. ''' import numpy as np import matplotlib.pyplot as plt import astropy.io.fits as fits from astropy.stats import mad_std import os __author__ = ...
[ 7061, 6, 198, 51, 1124, 257, 1813, 10958, 290, 35752, 340, 15246, 1927, 284, 10104, 329, 597, 198, 79, 4733, 22733, 357, 8869, 44422, 737, 198, 198, 21327, 655, 1262, 428, 2438, 329, 530, 16161, 287, 1948, 13, 198, 7061, 6, 198, 198...
2.687566
941
#!/usr/bin/env python # -*- coding: utf-8 -*- ########################################################### # WARNING: Generated code! # # ************************** # # Manual changes may get lost if file is generated again. # # Only code inside the [MANUAL] ta...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 29113, 14468, 7804, 21017, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 39410, 25, ...
3.003115
321
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ################################################################ #### !ship Functions #### ################################################################ from fuzzywuzzy import process from pathlib import Path import json import re...
[ 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, 29113, 29113, 198, 4242, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2...
3.277868
619
import sys import os import numpy as np from matplotlib import pyplot as pl from ..perform_dic import dic_raw_plots as dic_raw_plots #processpool=None
[ 11748, 25064, 198, 11748, 28686, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 2603, 29487, 8019, 1330, 12972, 29487, 355, 458, 198, 198, 6738, 11485, 525, 687, 62, 67, 291, 1330, 288, 291, 62, 1831, 62, 489, 1747, 355, 288, 291...
2.818182
55
# coding: utf-8 # ALuno: Misael Augusto # Matrícula: 117110525 # Problema: Aprovados no ENEM alunos = [] notas = [] while True: aluno_nota = raw_input().split() if aluno_nota[0] == "fim": nota_corte = int(raw_input()) break else: alunos.append(aluno_nota[0]) notas.append(int(aluno_nota[1])) reprovados = 0 ...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 2, 8355, 36909, 25, 14136, 3010, 2932, 78, 198, 2, 6550, 81, 8836, 3129, 64, 25, 1367, 4869, 13348, 1495, 198, 2, 1041, 903, 2611, 25, 317, 15234, 22484, 645, 12964, 3620, 198, 198, 282, 403, ...
2.071429
252
#*----------------------------------------------------------------------------* #* Copyright (C) 2021 Politecnico di Torino, Italy * #* SPDX-License-Identifier: Apache-2.0 * #* * ...
[ 2, 9, 10097, 10541, 9, 198, 2, 9, 15069, 357, 34, 8, 33448, 2165, 578, 31522, 3713, 2566, 4022, 2879, 11, 8031, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
2.469397
2,124
#!/usr/bin/env python """ Demostrates Sqlite3 driver usage from within the testcases. """ import sys from testplan.testing.multitest import MultiTest from testplan.testing.multitest.driver.sqlite import Sqlite3 from testplan import test_plan from testplan.testing.multitest import testsuite, testcase from testplan.re...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 198, 11522, 455, 9700, 311, 13976, 578, 18, 4639, 8748, 422, 1626, 262, 1332, 33964, 13, 198, 37811, 198, 198, 11748, 25064, 198, 198, 6738, 1332, 11578, 13, 33407, 13, 16680, 2...
2.199537
1,729
#!/usr/bin/env python # $Id: ioloop.py 1217 2013-04-18 18:21:44Z g.rodola $ # ====================================================================== # Copyright (C) 2007-2013 Giampaolo Rodola' <g.rodola@gmail.com> # # All Rights Reserved # # Permission is hereby granted, free of charge, to an...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 720, 7390, 25, 1312, 349, 11224, 13, 9078, 1105, 1558, 2211, 12, 3023, 12, 1507, 1248, 25, 2481, 25, 2598, 57, 308, 13, 14892, 5708, 720, 198, 198, 2, 220, 38093, 1421, 28, 198,...
2.411421
7,863
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. # -------------------------------------------------------------------------- from onnxruntime.training import ortmodule from glob import glob from s...
[ 2, 16529, 45537, 198, 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 17168, 13789, 13, 198, 2, 16529, 35937, 198, 198, 6738, 319, 77, 87, 43282, 13, 34409, 1330, 393, 83, 21412, 198, 198, 67...
2.968984
935
import base64 import io import dash import dash_core_components as dcc import dash_html_components as html import dash_table import pandas as pd import plotly.express as px from dash.dependencies import Input, Output, State external_stylesheets = ["https://codepen.io/chriddyp/pen/bWLwgP.css"] app = dash.Dash(__name__...
[ 11748, 2779, 2414, 198, 11748, 33245, 198, 198, 11748, 14470, 198, 11748, 14470, 62, 7295, 62, 5589, 3906, 355, 288, 535, 198, 11748, 14470, 62, 6494, 62, 5589, 3906, 355, 27711, 198, 11748, 14470, 62, 11487, 198, 11748, 19798, 292, 355...
1.712711
1,542
# ================================================================ # Created by Gregory Kramida on 4/24/18. # Copyright (c) 2018 Gregory Kramida # 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 Licen...
[ 2, 220, 46111, 4770, 25609, 18604, 198, 2, 220, 15622, 416, 20653, 509, 859, 3755, 319, 604, 14, 1731, 14, 1507, 13, 198, 2, 220, 15069, 357, 66, 8, 2864, 20653, 509, 859, 3755, 198, 2, 220, 49962, 739, 262, 24843, 13789, 11, 1062...
3.116327
490
from pydantic import BaseModel
[ 6738, 279, 5173, 5109, 1330, 7308, 17633, 628, 198 ]
3.666667
9
import os import numpy as np import cv2 import matplotlib.pyplot as plt import albumentations as albu import torch import segmentation_models_pytorch as smp from torch.utils.data import DataLoader from torch.utils.data import Dataset as BaseDataset DATA_DIR = '/home/nivv/dataset/temp/flat' x_train_dir = os.path.joi...
[ 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 269, 85, 17, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 435, 65, 1713, 602, 355, 435, 11110, 198, 11748, 28034, 198, 11748, 10618, 341, 62, 2...
2.323326
433
''' .. codeauthor:: David Zwicker <david.zwicker@ds.mpg.de> ''' import functools import tempfile import numpy as np from .. import MemoryStorage, FileStorage from ...grids import UnitGrid from ...fields import ScalarField from ...pdes import DiffusionPDE from ...tools.misc import module_available def test_storage...
[ 7061, 6, 198, 492, 2438, 9800, 3712, 3271, 1168, 86, 15799, 1279, 67, 8490, 13, 89, 86, 15799, 31, 9310, 13, 3149, 70, 13, 2934, 29, 198, 7061, 6, 198, 198, 11748, 1257, 310, 10141, 198, 11748, 20218, 7753, 198, 198, 11748, 299, 3...
2.112299
1,309
# This file is a part of Arjuna-Workshops # Copyright 2015-2021 Rahul Verma # Website: www.RahulVerma.net # 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/L...
[ 2, 770, 2393, 318, 257, 636, 286, 943, 73, 9613, 12, 23044, 21936, 198, 2, 15069, 1853, 12, 1238, 2481, 48543, 4643, 2611, 198, 198, 2, 15887, 25, 7324, 13, 47135, 377, 13414, 2611, 13, 3262, 198, 198, 2, 49962, 739, 262, 24843, 1...
3.724138
174
import re, zipfile, copy , xml.etree.ElementTree from copy import deepcopy from collections import Counter import xlrd from tabulate import tabulate import utils WORD_NAMESPACE = '{http://schemas.openxmlformats.org/wordprocessingml/2006/main}' PARA = WORD_NAMESPACE + 'p' TEXT = WORD_NAMESPACE + 't' T...
[ 11748, 302, 11, 19974, 7753, 11, 4866, 837, 35555, 13, 316, 631, 13, 20180, 27660, 201, 198, 6738, 4866, 1330, 2769, 30073, 201, 198, 6738, 17268, 1330, 15034, 201, 198, 201, 198, 11748, 2124, 75, 4372, 201, 198, 6738, 7400, 5039, 133...
2.376106
452
#coding:utf-8 # # id: bugs.core_5908 # title: Enhance dynamic libraries loading related error messages # decription: # We intentionally try to load unit from non-existent UDR module with name "udrcpp_foo". # Message 'module not found' issued BEFORE fix - without any...
[ 2, 66, 7656, 25, 40477, 12, 23, 198, 2, 198, 2, 4686, 25, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 11316, 13, 7295, 62, 3270, 2919, 198, 2, 3670, 25, 220, 220, 220, 220, 220, 220, 220, 32999, 8925, 12782, 11046, 3519, ...
2.293447
1,053
from http import client import os import sys import toml import requests import json sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))), 'lib')) import risksense_api as rsapi if __name__ == "__main__": try: createandassigntags() except KeyboardI...
[ 6738, 2638, 1330, 5456, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 284, 4029, 198, 11748, 7007, 198, 11748, 33918, 198, 17597, 13, 6978, 13, 28463, 7, 15, 11, 28686, 13, 6978, 13, 22179, 7, 418, 13, 6978, 13, 15908, 3672, 7, ...
2.452514
179
# This code have been programmed by Christian Blad, Sajuran and Søren Koch aka. Group VT4103A # The code is based on the original from udemy course https://www.udemy.com/artificial-intelligence-az/ # From Aalborg University # Gathering all the parameters (that we can modify to explore)
[ 2, 770, 2438, 423, 587, 27402, 416, 4302, 1086, 324, 11, 311, 1228, 42211, 290, 311, 24172, 918, 17009, 22430, 13, 4912, 32751, 19, 15197, 32, 198, 2, 383, 2438, 318, 1912, 319, 262, 2656, 422, 334, 67, 3065, 1781, 3740, 1378, 2503,...
3.679487
78
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 from . import schema_pb2 as schema__pb2 class ImmuServiceStub(object): """immud...
[ 2, 2980, 515, 416, 262, 308, 49, 5662, 11361, 8435, 17050, 13877, 13, 8410, 5626, 48483, 0, 198, 37811, 11792, 290, 4382, 6097, 11188, 284, 1237, 672, 3046, 12, 23211, 2594, 526, 15931, 198, 11748, 1036, 14751, 198, 198, 6738, 23645, ...
2.356388
11,827
numeros = [] cont = 0 while True: valor = int(input('Digite um valor: ')) numeros.append(valor) cont += 1 resp = str(input('Você deseja continuar[S/N]: ')).strip().lower()[0] while resp != 'n' and resp != 's': resp = str(input('Opção inválida, por favor digite outra[S/N]: ')).strip().lower()...
[ 77, 6975, 418, 796, 17635, 198, 3642, 796, 657, 198, 4514, 6407, 25, 198, 220, 220, 220, 1188, 273, 796, 493, 7, 15414, 10786, 19511, 578, 23781, 1188, 273, 25, 705, 4008, 198, 220, 220, 220, 5470, 418, 13, 33295, 7, 2100, 273, 8,...
2.266204
432
test_ex = [] ex = { "K": 0, "N": 0, "list": [] } T = int(input()) for i in range(T): temp_k = int(input()) temp_n = int(input()) temp_list = input() temp_list = temp_list.split() temp_list = list(map(int, temp_list)) ex["K"] = temp_k ex["N"] = temp_n ex["list"] = temp_list...
[ 9288, 62, 1069, 796, 17635, 198, 1069, 796, 1391, 198, 220, 220, 220, 366, 42, 1298, 657, 11, 198, 220, 220, 220, 366, 45, 1298, 657, 11, 198, 220, 220, 220, 366, 4868, 1298, 17635, 198, 92, 628, 198, 198, 51, 796, 493, 7, 15414...
2.034591
636
#!/usr/bin/env python3 from etchlib.widgets.editor import Widget as EditorWidget from etchlib.graphicsitems import * from PyQt5.QtCore import * from PyQt5.QtGui import ( QPainter, QColor, QPen, QIcon, QBrush, QPixmap, QPainterPath, QImage, QFont, QFontMetrics ) from PyQt5.QtW...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 6738, 2123, 354, 8019, 13, 28029, 11407, 13, 35352, 1330, 370, 17484, 355, 12058, 38300, 198, 6738, 2123, 354, 8019, 13, 70, 11549, 23814, 1330, 1635, 198, 198, 6738, 9485, 48...
2.115288
399
# -*- coding: utf-8 -*- """本脚本的目的是将DATAPATH中的文件数据都存入Mongo""" import json,datetime,re from os import walk,sep from pymongo import MongoClient #DATAPATH = '/Users/xuegeng/Documents/vng/Folder2Collect' client = MongoClient() db = client.VnTrader_1Min_Db#与数据库创建链接 def saveFuturesData(fileNameList,db,dataType = "main"): ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 17312, 105, 164, 226, 248, 17312, 105, 21410, 33566, 106, 21410, 42468, 49546, 35, 1404, 2969, 12599, 40792, 21410, 23877, 229, 20015, 35050, 243, 108, 162, 235, 10...
1.509128
1,479
import pytest import numpy as np from numpy.testing import assert_allclose from keras.layers import Dense, Activation, Input from keras.utils.test_utils import layer_test, keras_test from keras.layers import normalization from keras.models import Sequential, Model from keras import backend as K input_1 = np.arange(10...
[ 11748, 12972, 9288, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 299, 32152, 13, 33407, 1330, 6818, 62, 439, 19836, 198, 198, 6738, 41927, 292, 13, 75, 6962, 1330, 360, 1072, 11, 13144, 341, 11, 23412, 198, 6738, 41927, 292, 13, 267...
2.42959
561
""" Simple library for multiple views game aplication with pygame File: slider.py Date: 10.02.2022 Github: https://github.com/0xMartin Email: martin.krcma1@gmail.com Copyright (C) 2022 Martin Krcma Permission is hereby granted, free of charge, to any person obtaining a copy of this software a...
[ 37811, 198, 26437, 5888, 329, 3294, 5009, 983, 257, 489, 3299, 351, 12972, 6057, 198, 198, 8979, 25, 220, 220, 220, 220, 220, 220, 28982, 13, 9078, 198, 10430, 25, 220, 220, 220, 220, 220, 220, 838, 13, 2999, 13, 1238, 1828, 198, ...
3.478481
395
import asyncio from kopf._cogs.aiokits.aiotasks import all_tasks, create_task
[ 11748, 30351, 952, 198, 198, 6738, 479, 404, 69, 13557, 66, 18463, 13, 1872, 482, 896, 13, 1872, 313, 6791, 1330, 477, 62, 83, 6791, 11, 2251, 62, 35943, 628 ]
2.666667
30
from abc import abstractmethod from argparse import Namespace from idlelib.config import _warn from typing import Optional, Union import pytorch_lightning as pl from pytorch_lightning.utilities import AttributeDict, rank_zero_only from domain.base import Hyperparameters from properties import APPLICATION_PROPERTIES ...
[ 6738, 450, 66, 1330, 12531, 24396, 198, 6738, 1822, 29572, 1330, 28531, 10223, 198, 6738, 21696, 8019, 13, 11250, 1330, 4808, 40539, 198, 6738, 19720, 1330, 32233, 11, 4479, 198, 198, 11748, 12972, 13165, 354, 62, 2971, 768, 355, 458, 1...
3.61
100
"""" https://adventofcode.com/2021/day/19 """ from itertools import product from functools import cache import re from utils import Point class Scanner: """A scanner with a index and a list of points of beacons""" orientations = range(24) @cache def find_overlaps(scanner1, scanner2): """Find a list of beaco...
[ 15931, 15931, 3740, 1378, 324, 1151, 1659, 8189, 13, 785, 14, 1238, 2481, 14, 820, 14, 1129, 37227, 198, 198, 6738, 340, 861, 10141, 1330, 1720, 198, 6738, 1257, 310, 10141, 1330, 12940, 198, 11748, 302, 198, 6738, 3384, 4487, 1330, 6...
2.281069
1,722
import uuid import random import string from datetime import datetime, timedelta # Taken from https://stackoverflow.com/a/1118038
[ 11748, 334, 27112, 198, 11748, 4738, 198, 11748, 4731, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 628, 628, 628, 628, 628, 628, 198, 2, 30222, 422, 3740, 1378, 25558, 2502, 11125, 13, 785, 14, 64, 14, 1157, 15259, 2548...
3.302326
43
""" lib """ import cyme.bt, cyme.ecs, cyme.electrolyse, cyme.flux, cyme.simulation, cyme.mobile
[ 37811, 198, 8019, 198, 37811, 198, 198, 11748, 3075, 1326, 13, 18347, 11, 3075, 1326, 13, 721, 82, 11, 3075, 1326, 13, 9509, 305, 306, 325, 11, 3075, 1326, 13, 69, 22564, 11, 3075, 1326, 13, 14323, 1741, 11, 3075, 1326, 13, 24896, ...
2.204545
44
''' This script calls the 2011 Aspen Ethanol Model APV10 as part of the Virtual Engineering workflow. ''' # import argparse import os # from i_o import parse_config, save_simulation_results, plot_hist # from utilities import extract_input_data, generate_input_data, simulate_using_aspen from classes import Aspen, Excel...
[ 7061, 6, 198, 1212, 4226, 3848, 262, 2813, 1081, 3617, 9956, 22012, 9104, 3486, 53, 940, 198, 292, 636, 286, 262, 15595, 14044, 30798, 13, 198, 7061, 6, 198, 198, 2, 1330, 1822, 29572, 198, 11748, 28686, 198, 2, 422, 1312, 62, 78, ...
3.364341
129
''' Linear Regression with Eager API. A linear regression learning algorithm example using TensorFlow's Eager API. Author: Aymeric Damien Project: https://github.com/aymericdamien/TensorFlow-Examples/ ''' from __future__ import absolute_import, division, print_function import matplotlib.pyplot as plt import numpy as...
[ 7061, 6, 44800, 3310, 2234, 351, 412, 3536, 7824, 13, 198, 198, 32, 14174, 20683, 4673, 11862, 1672, 1262, 309, 22854, 37535, 338, 412, 3536, 7824, 13, 198, 198, 13838, 25, 13709, 946, 46107, 198, 16775, 25, 3740, 1378, 12567, 13, 785...
2.380132
755
# Greater than 3 # Description # Given an nxn array, print only the elements that are greater than three as a 1D array. # Input: nxn array # Output: 1D array containing elements that are greater than 3 # Sample Input 1: [[9,8,7],[6,5,4],[3,2,1]] # Sample Output 1: [9 8 7 6 5 4] # Sample Input 2: [[-1, 2, 0],[1,3,5],[3,...
[ 2, 18169, 621, 513, 198, 2, 12489, 198, 2, 11259, 281, 299, 87, 77, 7177, 11, 3601, 691, 262, 4847, 326, 389, 3744, 621, 1115, 355, 257, 352, 35, 7177, 13, 198, 2, 23412, 25, 299, 87, 77, 7177, 198, 2, 25235, 25, 352, 35, 7177...
2.657895
190
import logging import click_log logger = logging.getLogger(__name__) # configure the logger to use the click settings click_log.basic_config(logger)
[ 11748, 18931, 198, 198, 11748, 3904, 62, 6404, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 198, 198, 2, 17425, 262, 49706, 284, 779, 262, 3904, 6460, 198, 12976, 62, 6404, 13, 35487, 62, 11250, 7, ...
3.234043
47
from django.urls import re_path from .apps import UsersConfig from . import views app_name = UsersConfig.label urlpatterns = [ re_path( r'^$', view=views.UserListView.as_view(), name='list' ), re_path( r'^~redirect/$', view=views.UserRedirectView.as_view(), ...
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 302, 62, 6978, 198, 198, 6738, 764, 18211, 1330, 18987, 16934, 198, 6738, 764, 1330, 5009, 198, 198, 1324, 62, 3672, 796, 18987, 16934, 13, 18242, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, ...
1.959596
297
import json from .oauth import OAuth2Test
[ 11748, 33918, 198, 198, 6738, 764, 12162, 1071, 1330, 440, 30515, 17, 14402, 628 ]
3.142857
14
extensions = ['sphinx.ext.graphviz'] exclude_patterns = ['_build']
[ 2302, 5736, 796, 37250, 82, 746, 28413, 13, 2302, 13, 34960, 85, 528, 20520, 198, 1069, 9152, 62, 33279, 82, 796, 37250, 62, 11249, 20520, 198 ]
2.576923
26
# Generated by Django 2.2.2 on 2020-07-19 07:39 import datetime from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 17, 319, 12131, 12, 2998, 12, 1129, 8753, 25, 2670, 198, 198, 11748, 4818, 8079, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.972222
36
from .libthai import split
[ 6738, 764, 8019, 400, 1872, 1330, 6626, 198 ]
3.375
8
from bclearer_source.b_code.common_knowledge.matched_objects import MatchedEaObjects from enum import unique from enum import auto @unique object_name_mapping = \ { BclearerMatchedEaObjects.BCLEARER_FOUNDATION_COMMON_RESERVED_NAMES: 'bCLEARer Foundation Common Reserved Names', BclearerMatchedEaO...
[ 6738, 275, 2375, 11258, 62, 10459, 13, 65, 62, 8189, 13, 11321, 62, 45066, 13, 31409, 62, 48205, 1330, 6550, 1740, 36, 64, 10267, 82, 198, 6738, 33829, 1330, 3748, 198, 6738, 33829, 1330, 8295, 628, 198, 31, 34642, 628, 198, 15252, ...
1.955868
997
""" ``mako`` extension module. """ import re from wheezy.html.ext.lexer import ( InlinePreprocessor, Preprocessor, WhitespacePreprocessor, ) widget_preprocessor = MakoPreprocessor() whitespace_preprocessor = WhitespacePreprocessor( rules=[ (re.compile(r"^ \s+|\s+$", re.MULTILINE), r""), ...
[ 37811, 7559, 76, 25496, 15506, 7552, 8265, 13, 198, 37811, 198, 198, 11748, 302, 198, 198, 6738, 483, 68, 7357, 13, 6494, 13, 2302, 13, 2588, 263, 1330, 357, 198, 220, 220, 220, 554, 1370, 6719, 41341, 11, 198, 220, 220, 220, 3771, ...
2.380252
476
# -*- coding: utf-8 -*- """Flask API Endpoints: /suggestions (List[int], POST): Estimates and returns the library_ids following the three library_id sequence. request example: curl -X POST -H "Content-Type: application/json" -d '{"library_ids": [2,3,4]}' localhost:8888/suggestions """ import os from fl...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 7414, 2093, 7824, 198, 198, 12915, 13033, 25, 198, 220, 220, 220, 1220, 47811, 507, 357, 8053, 58, 600, 4357, 24582, 2599, 220, 47052, 290, 5860, 262, 5888, 62, ...
2.718033
305
from copy import copy, deepcopy from gamesolver.Games.TierGame import TierGame from gamesolver.util import GameValue FIRST = "X" SECOND = "O" NONE = "_" # Returns lowest equivalent state
[ 6738, 4866, 1330, 4866, 11, 2769, 30073, 198, 198, 6738, 1830, 14375, 13, 24474, 13, 35252, 8777, 1330, 15917, 8777, 198, 6738, 1830, 14375, 13, 22602, 1330, 3776, 11395, 198, 198, 39776, 2257, 796, 366, 55, 1, 198, 23683, 18672, 796, ...
3.233333
60
""" bellini Bayesian Learning on Laboratory Investigations """ # Add imports here from .quantity import * from .groups import * from .distributions import * from .procedure import * from . import quantity, groups, distributions, procedure def set_verbose(v = True): """ Set the verbosity of object labels """ g...
[ 37811, 198, 7923, 5362, 198, 15262, 35610, 18252, 319, 18643, 38111, 198, 37811, 198, 198, 2, 3060, 17944, 994, 198, 6738, 764, 40972, 414, 1330, 1635, 198, 6738, 764, 24432, 1330, 1635, 198, 6738, 764, 17080, 2455, 507, 1330, 1635, 198...
3.127717
368
class Pynetauto_co: # parent class of Cisco class "Parent class of Cisco, HP, Juniper, Arista" class Cisco(Pynetauto_co): # parent class of Devices class "Parent class of Switch, Router and Firewall" class Devices (Cisco): # parent class of Router and Switch classes "Parent class of Switch, Router ...
[ 4871, 350, 2047, 316, 23736, 62, 1073, 25, 1303, 2560, 1398, 286, 28289, 1398, 201, 198, 220, 220, 220, 366, 24546, 1398, 286, 28289, 11, 6574, 11, 7653, 9346, 11, 943, 12523, 1, 201, 198, 201, 198, 4871, 28289, 7, 47, 2047, 316, ...
2.338583
254
from pathlib import Path from snowshu.core.utils import fetch_adapter,correct_case import yaml from typing import Union, TextIO, List, Optional,Type,Any from snowshu.logger import Logger from snowshu.configs import DEFAULT_THREAD_COUNT, \ DEFAULT_MAX_NUMBER_OF_OUTLIERS, \ DEFAULT_PRESERVE_CASE from dataclasses import d...
[ 6738, 3108, 8019, 1330, 10644, 198, 6738, 6729, 1477, 84, 13, 7295, 13, 26791, 1330, 21207, 62, 324, 3429, 11, 30283, 62, 7442, 198, 11748, 331, 43695, 198, 6738, 19720, 1330, 4479, 11, 8255, 9399, 11, 7343, 11, 32233, 11, 6030, 11, ...
2.926554
177
#!/usr/bin/env python2 import sys from collections import defaultdict def mangleSnpEffAnnotationString(annstring): """ # Annotation : T|missense_variant|MODERATE|CCT8L2|ENSG00000198445|transcript|ENST00000359963|protein_coding|1/1|c.1406G>A|p.Gly469Glu|1666/2034|1406/1674|469/557| | # SubField n...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 17, 198, 198, 11748, 25064, 198, 6738, 17268, 1330, 4277, 11600, 628, 628, 198, 198, 4299, 45663, 293, 16501, 79, 36, 487, 2025, 38983, 10100, 7, 1236, 8841, 2599, 198, 220, 220, 220, 37227...
2.203101
1,290
# -*- coding: utf-8 -*- import sys import argparse import traceback import logging from pygamewindow import PygameWindow logger = logging.getLogger(__name__) if __name__ == '__main__': parser = argparse.ArgumentParser(description='QR Code Scanner') parser.add_argument( '--fps', dest='fps', ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 25064, 198, 11748, 1822, 29572, 198, 11748, 12854, 1891, 198, 11748, 18931, 198, 6738, 12972, 28483, 413, 521, 322, 1330, 9485, 6057, 27703, 198, 198, 6404, 1362, 7...
2.167822
721
import torch from torch import nn
[ 11748, 28034, 198, 6738, 28034, 1330, 299, 77, 628, 628 ]
3.7
10
import json import logging from pathlib import Path from random import choice import discord from discord.ext import commands from bot.bot import Bot from bot.constants import Colours log = logging.getLogger(__name__) FACTS = json.loads(Path("bot/resources/holidays/valentines/valentine_facts.json").read_text("utf8"...
[ 11748, 33918, 198, 11748, 18931, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 4738, 1330, 3572, 198, 198, 11748, 36446, 198, 6738, 36446, 13, 2302, 1330, 9729, 198, 198, 6738, 10214, 13, 13645, 1330, 18579, 198, 6738, 10214, 13, 9979, ...
2.423453
614
# Copyright (C) 2020 Mandiant, Inc. All Rights Reserved. import pytest import fixtures from fixtures import exefile import floss.main
[ 2, 15069, 357, 34, 8, 12131, 13314, 3014, 11, 3457, 13, 1439, 6923, 33876, 13, 198, 198, 11748, 12972, 9288, 198, 11748, 34609, 198, 6738, 34609, 1330, 409, 891, 576, 198, 198, 11748, 781, 793, 13, 12417, 628, 198 ]
3.538462
39
import json import re from django import template from django.templatetags.static import static from django.urls import reverse from django.utils.safestring import mark_safe from natsort import natsorted from piffle.iiif import IIIFImageClientException from geniza.common.utils import absolutize_url register = templa...
[ 11748, 33918, 198, 11748, 302, 198, 198, 6738, 42625, 14208, 1330, 11055, 198, 6738, 42625, 14208, 13, 11498, 489, 265, 316, 3775, 13, 12708, 1330, 9037, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 198, 6738, 42625, 14208, 13, 26...
2.803767
1,646
"""Test fixtures for kernels.""" from typing import Callable, Optional import numpy as np import pytest import probnum as pn from probnum.typing import ShapeType from ._utils import _shape_param_to_id_str @pytest.fixture( params=[pytest.param(seed, id=f"seed{seed}") for seed in range(1)], name="rng", ) de...
[ 37811, 14402, 34609, 329, 50207, 526, 15931, 198, 198, 6738, 19720, 1330, 4889, 540, 11, 32233, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 12972, 9288, 198, 198, 11748, 1861, 22510, 355, 279, 77, 198, 6738, 1861, 22510, 13, 77...
2.252229
1,907
#!/usr/bin/env python # coding: utf-8 import logging import sys,os from pathlib import Path sys.path.insert(1,'/usr3/graduate/baksar/projectx/E2EWatch/utils/') from config import Configuration from utils import * from datasets import EclipseDeploymentDataset import seaborn as sns import argparse import argparse impo...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 628, 198, 11748, 18931, 198, 11748, 25064, 11, 418, 198, 6738, 3108, 8019, 1330, 10644, 198, 17597, 13, 6978, 13, 28463, 7, 16, 4032, 14, 14629, 18, ...
2.049277
1,867
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/05_automl.ipynb (unless otherwise specified). __all__ = ['get_num_nodes'] # Cell from .imports import * # Cell def get_num_nodes(num_all_nodes:int=64, num_stages:int=3, fold:int=4): "generate num of nodes of all stages randomly, constrint to a condition based on fo...
[ 2, 47044, 7730, 1677, 1137, 11617, 0, 8410, 5626, 48483, 0, 9220, 284, 4370, 25, 299, 1443, 14, 2713, 62, 2306, 296, 75, 13, 541, 2047, 65, 357, 25252, 4306, 7368, 737, 198, 198, 834, 439, 834, 796, 37250, 1136, 62, 22510, 62, 77,...
2.346667
300
from torchvision import transforms from torch.autograd import Variable import torch.nn as nn import torch from Yolov3.Utils.utils import build_targets from Yolov3.Utils.focal_loss import focal_loss from PIL import Image from Yolov3.Utils.utils import non_max_suppression import numpy as np
[ 6738, 28034, 10178, 1330, 31408, 198, 6738, 28034, 13, 2306, 519, 6335, 1330, 35748, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 198, 6738, 575, 349, 709, 18, 13, 18274, 4487, 13, 26791, 1330, 1382, 62, 83, 853, 103...
3.139785
93
"""Endpoint description generator Each function description consists of: --- { name: Name of the function, methods: Accepted HTTP method traceback: A stack of the function's module and packages within the structured API endpoints, description: Function description derived from the f...
[ 37811, 12915, 4122, 6764, 17301, 198, 198, 10871, 2163, 6764, 10874, 286, 25, 198, 6329, 198, 220, 220, 220, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 1438, 25, 6530, 286, 262, 2163, 11, 198, 220, 220, 220, 220, 220, 220, 220, ...
2.44368
4,217
import json import mock import pytest import time from selenium.webdriver.common.keys import Keys from dlgr.griduniverse.bots import RandomBot, AdvantageSeekingBot, FoodSeekingBot @pytest.fixture @pytest.fixture @pytest.fixture
[ 11748, 33918, 198, 11748, 15290, 198, 11748, 12972, 9288, 198, 11748, 640, 198, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 11321, 13, 13083, 1330, 26363, 198, 198, 6738, 288, 75, 2164, 13, 25928, 403, 3997, 13, 42478, 1330, 1453...
3.064103
78
from django.conf.urls import patterns, include, url from django.contrib import admin urlpatterns = patterns('', # Examples: # url(r'^$', 'app.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^$', 'app.v...
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 7572, 11, 2291, 11, 19016, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 198, 6371, 33279, 82, 796, 7572, 10786, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
1.890526
475
import logging import coloredlogs class LoggerFactory(object): """ :: logger工厂,获取logger对象 """ @staticmethod def get_logger(logger_name=None): """ .. note:: 获取日志对象 ``logger`` :param logger_name: ``logger`` 名字 :return: - 日志对象 ``logger`` ...
[ 11748, 18931, 198, 11748, 16396, 6404, 82, 628, 198, 4871, 5972, 1362, 22810, 7, 15252, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 7904, 628, 220, 220, 220, 220, 220, 220, 220, 49706, 32432, 98, 43889, 224, 171, 120, 234, ...
1.27357
647
from os.path import join import h5py from performance.math_utils import radians2degrees from tomogram_utils.transformations import rotate_ref from file_actions.readers.tomograms import load_tomogram from constants import h5_internal_paths
[ 6738, 28686, 13, 6978, 1330, 4654, 198, 198, 11748, 289, 20, 9078, 198, 198, 6738, 2854, 13, 11018, 62, 26791, 1330, 2511, 1547, 17, 13500, 6037, 198, 6738, 16667, 21857, 62, 26791, 13, 35636, 602, 1330, 23064, 62, 5420, 198, 6738, 23...
3.61194
67
import logging import gym from gym import error, spaces, utils from gym.utils import seeding from lord_gym.envs import actions from lord_gym.envs.error import InvalidGameOperation from lord_gym.envs.game import LordGame logger = logging.getLogger(__name__)
[ 11748, 18931, 198, 198, 11748, 11550, 198, 6738, 11550, 1330, 4049, 11, 9029, 11, 3384, 4487, 198, 6738, 11550, 13, 26791, 1330, 384, 8228, 198, 198, 6738, 15876, 62, 1360, 76, 13, 268, 14259, 1330, 4028, 198, 6738, 15876, 62, 1360, 7...
3.209877
81
import re import scrapy import util from ScanningSpider.items import CVEItem from ScanningSpider.items import CVEDetailItem
[ 11748, 302, 198, 11748, 15881, 88, 198, 11748, 7736, 198, 6738, 20937, 768, 41294, 13, 23814, 1330, 24640, 7449, 198, 6738, 20937, 768, 41294, 13, 23814, 1330, 26196, 1961, 316, 603, 7449 ]
3.84375
32
import asyncio import collections import logging """ The event class is a lightweight container which stores the event name, a timestamp that should indicate when the event occured, and a payload. Events are produced by publishers and consumed by subscribers. The payload can be any type that you wish, although a JSO...
[ 11748, 30351, 952, 198, 11748, 17268, 198, 11748, 18931, 198, 198, 37811, 198, 464, 1785, 1398, 318, 257, 18700, 9290, 543, 7000, 262, 1785, 1438, 11, 257, 41033, 326, 815, 7603, 618, 262, 198, 15596, 1609, 1522, 11, 290, 257, 21437, ...
2.568079
2,644
dld = '.|.' dash = '-' n, m = map(int, input().split()) for i in range((n-1)//2): print((dld*i).rjust((m-3)//2, dash)+dld+(dld*i).ljust((m-3)//2, dash)) print('WELCOME'.center(m, dash)) for i in range((n-1)//2-1, -1, -1): print((dld*i).rjust((m-3)//2, dash)+dld+(dld*i).ljust((m-3)//2, dash))
[ 67, 335, 796, 45302, 91, 2637, 198, 42460, 796, 705, 19355, 198, 198, 77, 11, 285, 796, 3975, 7, 600, 11, 5128, 22446, 35312, 28955, 198, 198, 1640, 1312, 287, 2837, 19510, 77, 12, 16, 8, 1003, 17, 2599, 198, 220, 220, 220, 3601, ...
1.876543
162
""" write_actions test. """ from ryu.base.app_manager import RyuApp from ryu.controller.ofp_event import EventOFPSwitchFeatures from ryu.controller.ofp_event import EventOFPPacketIn from ryu.controller.handler import set_ev_cls from ryu.controller.handler import CONFIG_DISPATCHER from ryu.controller.handler import MAI...
[ 37811, 3551, 62, 4658, 1332, 13, 37227, 198, 198, 6738, 374, 24767, 13, 8692, 13, 1324, 62, 37153, 1330, 36936, 4677, 198, 6738, 374, 24767, 13, 36500, 13, 1659, 79, 62, 15596, 1330, 8558, 19238, 3705, 42248, 23595, 198, 6738, 374, 24...
2.87037
162
from fitfarmer.data import get_patient_csv_data from fitfarmer.diagnose import diagnose if __name__ == "__main__": main()
[ 6738, 4197, 16370, 647, 13, 7890, 1330, 651, 62, 26029, 62, 40664, 62, 7890, 198, 6738, 4197, 16370, 647, 13, 47356, 577, 1330, 37489, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1388, 3419, ...
2.976744
43
## SPDX-License-Identifier: BSD-2-Clause ## Copyright (c) 2020, Konrad Weihmann import os from oeqa.runtime.case import OERuntimeTestCase from oeqa.core.decorator.depends import OETestDepends from oeqa.runtime.decorator.package import OERequirePackage
[ 2235, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 347, 10305, 12, 17, 12, 2601, 682, 198, 2235, 15069, 357, 66, 8, 12131, 11, 17431, 6335, 775, 4449, 9038, 198, 198, 11748, 28686, 198, 198, 6738, 267, 68, 20402, 13, 43282, 13, 7442, ...
2.822222
90
""" MIT License Sugaroid Artificial Intelligence Chatbot Core Copyright (c) 2020-2021 Srevin Saju Copyright (c) 2021 The Sugaroid Project 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 r...
[ 37811, 198, 36393, 13789, 198, 198, 50, 35652, 1868, 35941, 9345, 198, 30820, 13645, 7231, 198, 15269, 357, 66, 8, 12131, 12, 1238, 2481, 311, 260, 7114, 311, 1228, 84, 198, 15269, 357, 66, 8, 33448, 383, 20874, 1868, 4935, 198, 198, ...
3.62
550
""" gentoo ebuild support """
[ 37811, 198, 6783, 2238, 304, 11249, 1104, 198, 37811, 198 ]
3
10
# coding: utf-8 from __future__ import ( absolute_import, print_function, unicode_literals, ) from unittest import TestCase from pydocx.openxml.wordprocessing import Level, LevelOverride from pydocx.util.xml import parse_xml_from_string
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 6738, 11593, 37443, 834, 1330, 357, 198, 220, 220, 220, 4112, 62, 11748, 11, 198, 220, 220, 220, 3601, 62, 8818, 11, 198, 220, 220, 220, 28000, 1098, 62, 17201, 874, 11, 198, 8, 198, 198, 673...
2.863636
88
import difflib import re from pkg_resources import parse_version from discord import Embed from discord.ext import commands from discord.utils import escape_mentions from core import checks from core._color_data import ALL_COLORS from core.models import PermissionLevel class Colori(commands.Cog): """ Conve...
[ 11748, 814, 8019, 198, 11748, 302, 198, 198, 6738, 279, 10025, 62, 37540, 1330, 21136, 62, 9641, 198, 198, 6738, 36446, 1330, 13302, 276, 198, 6738, 36446, 13, 2302, 1330, 9729, 198, 6738, 36446, 13, 26791, 1330, 6654, 62, 434, 507, 1...
2.11372
2,981
from matplotlib.pyplot import copper import numpy as np class Robot(): """ Classe robot """ def __init__(self, x, y, t) -> None: """Initialisateur de la classe avec les coordonnées du robot Args: x (float): coordonnée X du robot y (float): coordonnée Y du robot...
[ 6738, 2603, 29487, 8019, 13, 9078, 29487, 1330, 15317, 198, 11748, 299, 32152, 355, 45941, 628, 198, 4871, 16071, 33529, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1012, 21612, 9379, 198, 220, 220, 220, 37227, 198, 220, 220, 220, ...
2.131481
1,620
from __future__ import print_function, division import unittest if __name__ == "__main__": unittest.main()
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 11, 7297, 198, 11748, 555, 715, 395, 628, 220, 220, 220, 220, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 555, 715, 395, 13, 12417, 3419, 198 ]
2.973684
38
""" This directory contains unit tests. Some of them are quite rudimentary (and the R version contains more). use `pytest` to run all tests. """
[ 37811, 198, 220, 220, 220, 770, 8619, 4909, 4326, 5254, 13, 198, 220, 220, 220, 2773, 286, 606, 389, 2407, 47381, 357, 392, 262, 371, 2196, 4909, 517, 737, 198, 220, 220, 220, 779, 4600, 9078, 9288, 63, 284, 1057, 477, 5254, 13, 1...
3.413043
46
#! /usr/bin/env python """Static analysis tool for checking docstring conventions and style. About ----- Currently implemented checks cover most of PEP257: http://www.python.org/dev/peps/pep-0257/ After PEP257 is covered and tested, other checks might be added, e.g. NumPy docstring conventions is the first candidate...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 45442, 3781, 2891, 329, 10627, 2205, 8841, 21396, 290, 3918, 13, 198, 198, 8585, 198, 30934, 198, 198, 21327, 9177, 8794, 3002, 749, 286, 350, 8905, 28676, 25, 198, 4023, 1378...
2.739713
5,225
from setuptools import setup, find_packages import versioneer extras = { 'atari': ['gym[atari]'], 'box2d': ['gym[box2d]', 'opencv-python'], 'pybullet': ['pybullet'], 'procgen': ['procgen'], 'cloud': ['boto3', 'awscli'], 'pettingzoo': ['supersuit'], } extras['all'] = [item for group in extras.values() for ...
[ 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 11748, 2196, 28153, 198, 198, 2302, 8847, 796, 1391, 198, 220, 705, 35554, 10354, 37250, 1360, 76, 58, 35554, 49946, 4357, 198, 220, 705, 3524, 17, 67, 10354, 37250, 1360, ...
2.255245
286
""" black_list 改为 使用string实现 """ from bproxypool.core import BaseService, Conflict, NotFound, PatchSuccess, DeleteSuccess, \ GetSuccess from bproxypool.utils.logger import LoggerPool log = LoggerPool().get_logger('proxypool', fn='api')
[ 37811, 198, 13424, 62, 4868, 10545, 242, 117, 10310, 118, 220, 45635, 18796, 101, 8841, 22522, 252, 163, 236, 108, 198, 37811, 198, 198, 6738, 275, 1676, 87, 4464, 970, 13, 7295, 1330, 7308, 16177, 11, 27863, 11, 1892, 21077, 11, 1710...
2.606383
94
# -*- coding: utf-8 -*- from __future__ import unicode_literals from .adapter import PrependAdapter from .coerce import context_to_path_logger from .funcwrap import call_sig, call_unlogged, logged __all__ = [ "logged", "call_unlogged", "call_sig", "PrependAdapter", "context_to_path_logger", ]
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 764, 324, 3429, 1330, 19141, 437, 47307, 198, 6738, 764, 1073, 263, 344, 1330, 4732, 62, 1462...
2.449612
129
#!/usr/bin/python3 import math from PIL import Image SIZE = (1440, 1440) mask = Image.new("RGBA", SIZE, (0,0,0,0)) MIN_THETA = -140 * math.pi / 180.0 MAX_THETA = -110 * math.pi / 180.0 for j in range(SIZE[1]): for i in range(SIZE[0]): if (i-720)*(i-720) + (j-720)*(j-720) < 720*720: theta = math.atan2(7...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 11748, 10688, 198, 6738, 350, 4146, 1330, 7412, 198, 198, 33489, 796, 357, 1415, 1821, 11, 49557, 8, 198, 198, 27932, 796, 7412, 13, 3605, 7203, 48192, 4339, 1600, 311, 35400, 11, ...
2.045833
240
################################## #Creator: James Stauder #Creation Date: 1/30/18 #Last edit Date: 2/05/18 #Purpose: Class to make Dataset objects #Parameters: #name -> name of dataset #pen -> color of pen to use in plotting #Attributes: #name -> name of dataset #pen -> color of pen to use in plotting #interp -> inte...
[ 29113, 2235, 198, 2, 16719, 273, 25, 3700, 520, 29233, 198, 2, 12443, 341, 7536, 25, 352, 14, 1270, 14, 1507, 198, 2, 5956, 4370, 7536, 25, 362, 14, 2713, 14, 1507, 198, 2, 30026, 3455, 25, 5016, 284, 787, 16092, 292, 316, 5563, ...
3.225806
186
#!/usr/bin/env python # coding: utf-8 from __future__ import division from __future__ import print_function from __future__ import absolute_import import torch import numpy as np import pandas as pd def to_torch(arr, cuda=True): """ Transform given numpy array to a torch.autograd.Variable """ tensor...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, ...
2.469741
347
from heapq import heappop, heappush, heapify if __name__ == "__main__": """ from timeit import timeit k = 3 arr = [2, 6, 3, 12, 56, 8] n = len(arr) print(timeit(lambda: sort_k(arr, n, k), number=10000)) # 0.010045346996776061 """
[ 6738, 24575, 80, 1330, 339, 1324, 404, 11, 339, 1324, 1530, 11, 24575, 1958, 628, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 422, 640, 270, 1330, 640, 270, 628, ...
2.210084
119
# Copyright (c) 2014 Intel Corporation. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # * Redistributions of works must retain the original copyright notice, this list # of conditions and the following disclaimer....
[ 2, 15069, 357, 66, 8, 1946, 8180, 10501, 13, 198, 2, 198, 2, 2297, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, 11, 351, 393, 1231, 17613, 11, 198, 2, 389, 10431, 2810, 326, 262, 1708, 3403, 389, 1138, 25, 198, 2, 198, 2, ...
3.548571
700
import logging import threading import unittest import pubnub from pubnub.models.consumer.presence import PNSetStateResult, PNGetStateResult from pubnub.pubnub import PubNub from tests.helper import pnconf_copy from tests.integrational.vcr_helper import pn_vcr pubnub.set_stream_logger('pubnub', logging.DEBUG)
[ 11748, 18931, 198, 11748, 4704, 278, 198, 11748, 555, 715, 395, 198, 198, 11748, 2240, 77, 549, 198, 6738, 2240, 77, 549, 13, 27530, 13, 49827, 13, 18302, 594, 1330, 350, 45, 7248, 9012, 23004, 11, 350, 45, 3855, 9012, 23004, 198, 6...
2.962264
106
try: f = open('D:/02.Python/ch13/hellopython.txt', 'r') except FileNotFoundError: print('no file') raise SystemExit print('next code...')
[ 28311, 25, 198, 220, 220, 220, 277, 796, 1280, 10786, 35, 14079, 2999, 13, 37906, 14, 354, 1485, 14, 12758, 404, 7535, 13, 14116, 3256, 705, 81, 11537, 198, 16341, 9220, 3673, 21077, 12331, 25, 198, 220, 220, 220, 3601, 10786, 3919, ...
2.542373
59
# -*- coding: utf-8 -*- import math import matplotlib.pyplot as plt import numpy as np
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 10688, 198, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 11748, 299, 32152, 355, 45941, 628, 628, 198 ]
2.447368
38
############################################################################### ## ## Copyright (C) 2014-2016, New York University. ## Copyright (C) 2011-2014, NYU-Poly. ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## ...
[ 29113, 29113, 7804, 4242, 21017, 198, 2235, 198, 2235, 15069, 357, 34, 8, 1946, 12, 5304, 11, 968, 1971, 2059, 13, 198, 2235, 15069, 357, 34, 8, 2813, 12, 4967, 11, 48166, 12, 34220, 13, 198, 2235, 15069, 357, 34, 8, 4793, 12, 980...
3.729131
587
import logging from gym.envs.registration import register logger = logging.getLogger(__name__) register( id='Baxter-v0', entry_point='gym_baxter.envs:BaxterEnv', timestep_limit=1000, reward_threshold=1.0, nondeterministic = True, ) #register( # id='BaxterEmptyGoal-v0', # entry_point='gym_ba...
[ 11748, 18931, 198, 6738, 11550, 13, 268, 14259, 13, 2301, 33397, 1330, 7881, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 198, 198, 30238, 7, 198, 220, 220, 220, 4686, 11639, 33, 40864, 12, 85, 15, ...
2.310526
190
from django.db import models from MetaStudio.settings import AUTH_USER_MODEL from django.urls import reverse from django.contrib.auth.models import User # Create your models here.
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 30277, 41501, 13, 33692, 1330, 37195, 62, 29904, 62, 33365, 3698, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330...
3.62
50
#!/usr/bin/env python3 import collections import re import sys import click import inflect import yaml from clickclick import warning, info from swagger_spec_validator.validator20 import validate_spec Issue = collections.namedtuple('Issue', 'location message guideline') def compatibility_layer(spec): """Make s...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 17268, 198, 11748, 302, 198, 11748, 25064, 198, 198, 11748, 3904, 198, 11748, 1167, 801, 198, 11748, 331, 43695, 198, 6738, 3904, 12976, 1330, 6509, 11, 7508, 198, 6738, ...
2.42735
2,691
## @defgroup Components-Energy-Nacelles Nacelles # Nacelle.py # # Created: Jul 2021, M. Clarke # ---------------------------------------------------------------------- # Imports # ---------------------------------------------------------------------- from SUAVE.Core import Data, ContainerOrdered from SUAVE.Comp...
[ 2235, 2488, 4299, 8094, 36109, 12, 28925, 12, 45, 558, 297, 274, 399, 558, 297, 274, 198, 2, 399, 330, 13485, 13, 9078, 198, 2, 220, 198, 2, 15622, 25, 220, 5979, 33448, 11, 337, 13, 19635, 220, 220, 198, 198, 2, 16529, 23031, 1...
2.090007
2,722
#!/usr/bin/env python from marvin import config try: from sdss_access import Access except ImportError as e: Access = None rsync_access = Access(label='marvin_get_test_data') rsync_access.remote() # MPL-7 # rsync_access = add_data(rsync_access, release='MPL-7', plate='8485', ifu='1901') # rsync_access = a...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 1667, 7114, 1330, 4566, 198, 28311, 25, 198, 220, 220, 220, 422, 45647, 824, 62, 15526, 1330, 8798, 198, 16341, 17267, 12331, 355, 304, 25, 198, 220, 220, 220, 8798, 796, ...
2.420959
563
#!/usr/bin/env python # ****************************************************************************** # Copyright 2017-2018 Intel Corporation # # 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, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 41906, 17174, 46068, 1174, 198, 2, 15069, 2177, 12, 7908, 8180, 10501, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2,...
2.014976
5,876
import subprocess import os import time from flask import Flask, render_template, Response, request, send_file from youtube_dl import YoutubeDL app = Flask(__name__) ydl_opts = { 'format': 'bestaudio', 'postprocessors': [{ 'key': 'FFmpegExtractAudio', 'preferredcodec': 'mp3', ...
[ 11748, 850, 14681, 198, 11748, 28686, 198, 11748, 640, 198, 6738, 42903, 1330, 46947, 11, 8543, 62, 28243, 11, 18261, 11, 2581, 11, 3758, 62, 7753, 198, 6738, 35116, 62, 25404, 1330, 27431, 19260, 198, 198, 1324, 796, 46947, 7, 834, 3...
2.134529
223
"""Welcome User""" """First line """
[ 37811, 14618, 11787, 37811, 198, 37811, 5962, 1627, 37227, 198 ]
3.7
10