content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
import xmlrpc.client if __name__ == '__main__': main()
[ 11748, 35555, 81, 14751, 13, 16366, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419, 198 ]
2.384615
26
# Generated by Django 3.0.7 on 2020-07-27 19:23 import build.models from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 22, 319, 12131, 12, 2998, 12, 1983, 678, 25, 1954, 198, 198, 11748, 1382, 13, 27530, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
3
37
import argparse import os import torch import yaml DEFAULT_DEVICE = 'cuda:0'
[ 11748, 1822, 29572, 198, 198, 11748, 28686, 198, 11748, 28034, 198, 11748, 331, 43695, 198, 198, 7206, 38865, 62, 7206, 27389, 796, 705, 66, 15339, 25, 15, 6, 628, 198 ]
2.7
30
from webdnn.backend.webgl.optimize_rules.simplify_channel_mode_conversion.simplify_nonsense_channel_mode_conversion import \ SimplifyNonsenseChannelModeConversion from webdnn.backend.webgl.optimize_rules.simplify_channel_mode_conversion.simplify_redundant_channel_mode_conversion import \ SimplifyRedundantChanne...
[ 6738, 3992, 67, 20471, 13, 1891, 437, 13, 12384, 4743, 13, 40085, 1096, 62, 38785, 13, 14323, 489, 1958, 62, 17620, 62, 14171, 62, 1102, 9641, 13, 14323, 489, 1958, 62, 77, 46563, 62, 17620, 62, 14171, 62, 1102, 9641, 1330, 3467, 19...
3.054264
129
""" The constants used in FLV files and their meanings. """ # Tag type (TAG_TYPE_AUDIO, TAG_TYPE_VIDEO, TAG_TYPE_SCRIPT) = (8, 9, 18) # Sound format (SOUND_FORMAT_PCM_PLATFORM_ENDIAN, SOUND_FORMAT_ADPCM, SOUND_FORMAT_MP3, SOUND_FORMAT_PCM_LITTLE_ENDIAN, SOUND_FORMAT_NELLYMOSER_16KHZ, SOUND_FORMAT_NELLYMOSER_8KH...
[ 37811, 198, 464, 38491, 973, 287, 9977, 53, 3696, 290, 511, 26368, 13, 198, 37811, 198, 198, 2, 17467, 2099, 198, 7, 42197, 62, 25216, 62, 48877, 9399, 11, 37801, 62, 25216, 62, 42937, 11, 37801, 62, 25216, 62, 6173, 46023, 8, 796, ...
2.005015
1,994
from nltk.corpus import semcor # if __name__ == "__main__": # s = semcor.tagged_sents(tag='sem')[0] # for chunk in s: # a = semcor_chunk(chunk) # print a.get_syn_set() # for chunk in s: # a = semcor_chunk(chunk) # print a.get_words()
[ 6738, 299, 2528, 74, 13, 10215, 79, 385, 1330, 5026, 10215, 198, 198, 2, 611, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 2, 220, 197, 82, 796, 5026, 10215, 13, 12985, 2004, 62, 82, 658, 7, 12985, 11639, 43616, 11537, ...
1.97619
126
import tensorflow as tf from tensorflow import keras from tensorflow.keras import layers from load_cora import load_cora from baseline_model import create_ffn from utils import run_experiment from utils import display_learning_curves # Graph convolution layer if __name__ == '__main__': papers, train_data, test_...
[ 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 11192, 273, 11125, 1330, 41927, 292, 198, 6738, 11192, 273, 11125, 13, 6122, 292, 1330, 11685, 198, 6738, 3440, 62, 66, 5799, 1330, 3440, 62, 66, 5799, 198, 6738, 14805, 62, 19849, 1330, ...
2.772346
716
"""Discover Samsung Smart TV services.""" from . import SSDPDiscoverable from ..const import ATTR_NAME # For some models, Samsung forces a [TV] prefix to the user-specified name. FORCED_NAME_PREFIX = '[TV]'
[ 37811, 44596, 10397, 10880, 3195, 2594, 526, 15931, 198, 6738, 764, 1330, 21252, 5760, 29392, 540, 198, 6738, 11485, 9979, 1330, 5161, 5446, 62, 20608, 198, 198, 2, 1114, 617, 4981, 11, 10397, 3386, 257, 685, 6849, 60, 21231, 284, 262, ...
3.42623
61
"""Package for reverse-engineering.""" from .rpa import *
[ 37811, 27813, 329, 9575, 12, 40321, 526, 15931, 198, 198, 6738, 764, 81, 8957, 1330, 1635, 198 ]
3.470588
17
# Generated by Django 3.2.5 on 2021-12-21 19:42 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 20, 319, 33448, 12, 1065, 12, 2481, 678, 25, 3682, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.766667
30
""" This is the most simple scenario with a basic topology, some users and a set of apps with only one service. @author: Isaac Lera """ import os import time import json import random import logging.config import networkx as nx import numpy as np from pathlib import Path from yafs.core import Sim from yafs.a...
[ 37811, 198, 220, 220, 220, 770, 318, 262, 749, 2829, 8883, 351, 257, 4096, 1353, 1435, 11, 617, 2985, 290, 257, 900, 286, 6725, 351, 691, 530, 2139, 13, 628, 220, 220, 220, 2488, 9800, 25, 19068, 406, 8607, 198, 37811, 198, 11748, ...
2.408435
901
from db import db # class RisklayerPrognosisSchema(SQLAlchemyAutoSchema): # class Meta: # strict = True # model = RisklayerPrognosis # # timestamp = fields.Timestamp(data_key="datenbestand") # prognosis = fields.Number(data_key="prognosis")
[ 6738, 20613, 1330, 20613, 628, 198, 2, 1398, 19602, 29289, 2964, 4593, 5958, 27054, 2611, 7, 17861, 2348, 26599, 27722, 27054, 2611, 2599, 198, 2, 220, 220, 220, 220, 1398, 30277, 25, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, ...
2.567308
104
import os import unittest os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' import django if django.VERSION >= (1, 7): django.setup() from django import forms from django.db import models from django.forms.forms import NON_FIELD_ERRORS from django_secureform.forms import SecureForm if __name__ == '__main_...
[ 11748, 28686, 198, 11748, 555, 715, 395, 198, 418, 13, 268, 2268, 17816, 35028, 1565, 11230, 62, 28480, 51, 20754, 62, 33365, 24212, 20520, 796, 705, 33692, 6, 198, 198, 11748, 42625, 14208, 198, 361, 42625, 14208, 13, 43717, 18189, 357...
2.819672
122
import cv2 as cv import numpy as np cap = cv.VideoCapture(1) print(cap.get(cv.CAP_PROP_FRAME_WIDTH)) print(cap.get(cv.CAP_PROP_FRAME_HEIGHT)) cap.set(3,3000) cap.set(4,3000) print(cap.get(cv.CAP_PROP_FRAME_WIDTH)) print(cap.get(cv.CAP_PROP_FRAME_HEIGHT)) while (cap.isOpened()): ret , frame = cap.read() if...
[ 11748, 269, 85, 17, 355, 269, 85, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11128, 796, 269, 85, 13, 10798, 49630, 7, 16, 8, 198, 198, 4798, 7, 11128, 13, 1136, 7, 33967, 13, 33177, 62, 4805, 3185, 62, 10913, 10067, 62, 54, ...
1.995968
248
# from pypy-benchmarks/own/chaos.py, with some minor modifications # (more output, took out the benchmark harness) # import random, math, sys, time SIZE = 9 GAMES = 200 KOMI = 7.5 EMPTY, WHITE, BLACK = 0, 1, 2 SHOW = {EMPTY: '.', WHITE: 'o', BLACK: 'x'} PASS = -1 MAXMOVES = SIZE*SIZE*3 TIMESTAMP = 0 MOVES = 0 def us...
[ 2, 422, 279, 4464, 88, 12, 26968, 14306, 14, 593, 14, 354, 7495, 13, 9078, 11, 351, 617, 4159, 19008, 198, 2, 357, 3549, 5072, 11, 1718, 503, 262, 18335, 19356, 8, 198, 2, 198, 198, 11748, 4738, 11, 10688, 11, 25064, 11, 640, 19...
2.030691
391
# SPDX-FileCopyrightText: 2014 MicroPython & CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors) # # SPDX-License-Identifier: MIT import argparse import os import sys sys.path.append("../../tools/usb_descriptor") from adafruit_usb_descriptor import audio, audio10, cdc, hid, mi...
[ 2, 30628, 55, 12, 8979, 15269, 8206, 25, 1946, 4527, 37906, 1222, 13588, 37906, 20420, 357, 5450, 1378, 12567, 13, 785, 14, 324, 1878, 4872, 14, 21170, 5013, 29412, 14, 34960, 82, 14, 3642, 2455, 669, 8, 198, 2, 198, 2, 30628, 55, ...
2.381063
9,875
from tqdm import tqdm import pandas as pd import numpy as np, argparse, time, pickle, random, os, datetime import torch import torch.optim as optim from model import MaskedNLLLoss, BC_LSTM from dataloader import MELDDataLoader from sklearn.metrics import f1_score, confusion_matrix, accuracy_score, classification_re...
[ 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 11, 1822, 29572, 11, 640, 11, 2298, 293, 11, 4738, 11, 28686, 11, 4818, 8079, 198, 198, 11748, 28034, 198, 198, 11...
2.119454
1,758
#!/usr/bin/env python import os import sys import argparse import pat3dem.star as p3s import math if __name__ == '__main__': main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 1822, 29572, 198, 11748, 1458, 18, 9536, 13, 7364, 355, 279, 18, 82, 198, 11748, 10688, 198, 197, 197, 197, 198, 361, 11593, 3672, 834...
2.603774
53
from bs4 import BeautifulSoup import pandas as pd import requests import time import sys def reviews_scraper(asin_list, filename): ''' Takes a list of asins, retrieves html for reviews page, and parses out key data points Parameters ---------- List of ASINs (list of strings) Returns: -----...
[ 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 7007, 198, 11748, 640, 198, 11748, 25064, 628, 198, 4299, 8088, 62, 1416, 38545, 7, 47337, 62, 4868, 11, 29472, 2599, 198, 220, 220, 220, 7...
1.809706
2,349
# noinspection PyUnresolvedReferences import os import re # TODO I'm going to need to make a dictionary for my big list of stuff i care about and what's needed for # every file type.... RAF = ['EXIF:LensModel', 'MakerNotes:RawImageHeight', 'MakerNotes:RawImageWidth', 'EXIF:CreateDate', 'EXIF:ModifyDate', 'EXI...
[ 2, 645, 1040, 14978, 9485, 3118, 411, 5634, 19927, 198, 11748, 28686, 198, 11748, 302, 198, 198, 2, 16926, 46, 314, 1101, 1016, 284, 761, 284, 787, 257, 22155, 329, 616, 1263, 1351, 286, 3404, 1312, 1337, 546, 290, 644, 338, 2622, 3...
2.229547
1,699
import logging from typing import List, Callable import numpy as np from pyquaternion import Quaternion from pyrep import PyRep from pyrep.errors import IKError from pyrep.objects import Dummy, Object from rlbench import utils from rlbench.action_modes import ArmActionMode, ActionMode from rlbench.backend.exceptions ...
[ 11748, 18931, 198, 6738, 19720, 1330, 7343, 11, 4889, 540, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 12972, 421, 9205, 295, 1330, 2264, 9205, 295, 198, 6738, 12972, 7856, 1330, 9485, 6207, 198, 6738, 12972, 7856, 13, 48277, 13...
3.125
224
from django import forms from django.contrib.contenttypes.forms import generic_inlineformset_factory from django.contrib.contenttypes.models import ContentType from django.db import models from django.test import TestCase from django.test.utils import isolate_apps from .models import ( Animal, ForProxyMode...
[ 6738, 42625, 14208, 1330, 5107, 201, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 11299, 19199, 13, 23914, 1330, 14276, 62, 45145, 687, 2617, 62, 69, 9548, 201, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 11299, 19199, 13, 27530, 1330, ...
3.208333
120
from .PyPolyBoRi import (BooleSet, Polynomial, BoolePolynomialVector, FGLMStrategy) def _fglm(I, from_ring, to_ring): r""" Unchecked variant of fglm """ vec = BoolePolynomialVector(I) return FGLMStrategy(from_ring, to_ring, vec).main() def fglm(I, from_ring, to_ring): ...
[ 6738, 764, 20519, 34220, 16635, 49, 72, 1330, 357, 46120, 293, 7248, 11, 12280, 26601, 498, 11, 21458, 293, 34220, 26601, 498, 38469, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220,...
2.12942
1,499
""" Uses UMAP (https://umap-learn.readthedocs.io/en/latest/index.html) to reduce course embeddings to two dimensions for visualization. """ import pandas as pd import umap from sklearn.preprocessing import StandardScaler from ferry import config courses = pd.read_csv( config.DATA_DIR / "course_embeddings/courses_...
[ 37811, 198, 5842, 274, 471, 33767, 357, 5450, 1378, 388, 499, 12, 35720, 13, 961, 83, 704, 420, 82, 13, 952, 14, 268, 14, 42861, 14, 9630, 13, 6494, 8, 284, 4646, 1781, 198, 20521, 67, 654, 284, 734, 15225, 329, 32704, 13, 198, ...
2.587662
308
import inheritance shark = Predator('baby shark','sea','all',20) giraffe = Mammal('malwan','earth',20) giraffe.check_planet(inheritance.friendly) marti = Mammal('marti','earth',20) marti.check_planet(inheritance.friendly) print(inheritance.friendly.__dict__) print(inheritance.Planet.__dict__)
[ 11748, 24155, 628, 628, 628, 198, 1477, 668, 796, 38871, 10786, 40252, 21027, 41707, 8583, 41707, 439, 3256, 1238, 8, 198, 198, 70, 343, 21223, 796, 39502, 282, 10786, 7617, 8149, 41707, 16442, 3256, 1238, 8, 198, 70, 343, 21223, 13, ...
2.831776
107
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) 2017, Luis Pedro Coelho <luis@luispedro.org> # vim: set ts=4 sts=4 sw=4 expandtab smartindent: # # 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...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 357, 34, 8, 2177, 11, 20894, 28855, 1766, 417, 8873, 1279, 2290, 271, 31, 2290, 8802, 276, 305, 13, 2398, 29, 19...
3.454787
376
"""Tests for simple search controller, :mod:`search.controllers.simple`.""" from http import HTTPStatus from unittest import TestCase, mock from werkzeug.datastructures import MultiDict from werkzeug.exceptions import InternalServerError, NotFound, BadRequest from search.domain import SimpleQuery from search.control...
[ 37811, 51, 3558, 329, 2829, 2989, 10444, 11, 1058, 4666, 25, 63, 12947, 13, 3642, 36667, 13, 36439, 63, 526, 15931, 198, 198, 6738, 2638, 1330, 14626, 19580, 198, 6738, 555, 715, 395, 1330, 6208, 20448, 11, 15290, 198, 198, 6738, 266,...
3.577465
142
#!/usr/bin/env python # ROS Libraries import actionlib from actionlib_msgs.msg import GoalStatus from control_msgs.msg import JointTrajectoryControllerState, FollowJointTrajectoryAction, FollowJointTrajectoryGoal from kuri_wandering_robot.msg import Power from wandering_behavior.msg import WanderAction, WanderGoal impo...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 48263, 46267, 198, 11748, 2223, 8019, 198, 6738, 2223, 8019, 62, 907, 14542, 13, 19662, 1330, 25376, 19580, 198, 6738, 1630, 62, 907, 14542, 13, 19662, 1330, 16798, 15721, 752, 652, ...
3.348361
244
# - Generated by tools/entrypoint_compiler.py: do not edit by hand """ Trainers.LightGbmBinaryClassifier """ import numbers from ..utils.entrypoints import EntryPoint from ..utils.utils import try_set, unlist def trainers_lightgbmbinaryclassifier( training_data, predictor_model=None, number_...
[ 2, 532, 2980, 515, 416, 4899, 14, 13000, 4122, 62, 5589, 5329, 13, 9078, 25, 466, 407, 4370, 416, 1021, 198, 37811, 198, 44077, 364, 13, 15047, 38, 20475, 33, 3219, 9487, 7483, 198, 37811, 198, 198, 11748, 3146, 198, 198, 6738, 1148...
2.173328
5,354
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2010 Radim Rehurek <radimrehurek@seznam.cz> # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html """ Automated tests for checking transformation algorithms (the models package). """ import logging import unittest import numpy as n...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 357, 34, 8, 3050, 5325, 320, 797, 71, 495, 74, 1279, 6335, 320, 260, 71, 495, 74, 31, 325, 89, ...
2.699571
233
import tensorflow as tf from tensorflow import keras
[ 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 11192, 273, 11125, 1330, 41927, 292, 628, 198 ]
3.4375
16
import base64 import datetime import logging import os import time from typing import List, Tuple import structlog import tenacity from averbis import Pipeline from fhir.resources.bundle import Bundle from fhir.resources.codeableconcept import CodeableConcept from fhir.resources.composition import Composition, Composi...
[ 11748, 2779, 2414, 198, 11748, 4818, 8079, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 640, 198, 6738, 19720, 1330, 7343, 11, 309, 29291, 198, 198, 11748, 2878, 6404, 198, 11748, 3478, 4355, 198, 6738, 9076, 41907, 1330, 37709, 198,...
2.463124
922
# -*- coding: utf-8 -*- from selectable.decorators import login_required from maestros.models import TiposMedidasActuacion, TiposLimitesCriticos, TiposMedidasVigilancia, TiposTemperaturas, TiposFrecuencias, Zonas, Terceros, CatalogoEquipos, Personal, Consumibles, ParametrosAnalisis, Actividades, Etapas, Peligros, Tipos...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 2922, 540, 13, 12501, 273, 2024, 1330, 17594, 62, 35827, 198, 6738, 17266, 395, 4951, 13, 27530, 1330, 23095, 418, 9921, 24496, 6398, 84, 49443, 11, 23095, 418, 19...
2.805274
493
"""Define commands for Python 2.7""" import argparse import traceback from . import util from .cmd import run from .cmd import extractpipenv def main(): """Main function""" print("This version is not supported! It has limitted analysis features") parser = argparse.ArgumentParser(description='Analyze Jupyt...
[ 37811, 7469, 500, 9729, 329, 11361, 362, 13, 22, 37811, 198, 11748, 1822, 29572, 198, 11748, 12854, 1891, 198, 198, 6738, 764, 1330, 7736, 198, 6738, 764, 28758, 1330, 1057, 198, 6738, 764, 28758, 1330, 7925, 79, 541, 24330, 198, 198, ...
2.37931
348
#!/usr/bin/env python import os import imp gpcrondump_path = os.path.abspath('gpcrondump') gpcrondump = imp.load_source('gpcrondump', gpcrondump_path) import unittest2 as unittest from datetime import datetime from gppylib import gplog from gpcrondump import GpCronDump from gppylib.operations.utils import DEFAULT_NUM_...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 28686, 198, 11748, 848, 198, 31197, 6098, 623, 931, 62, 6978, 796, 28686, 13, 6978, 13, 397, 2777, 776, 10786, 31197, 6098, 623, 931, 11537, 198, 31197, 6098, 623, 931, 796...
3.004505
222
#!/usr/bin/env python ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License")...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 7061, 6, 198, 26656, 15385, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 198, 273, 517, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 198, 17080, 6169, 351, ...
3.894309
246
#!/usr/bin/env python # Copyright (c) 2017 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies the use of linker flags in environment variables. In this test, gyp and build both run in same local environment. """ import ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 15069, 357, 66, 8, 2177, 3012, 3457, 13, 1439, 2489, 10395, 13, 198, 2, 5765, 286, 428, 2723, 2438, 318, 21825, 416, 257, 347, 10305, 12, 7635, 5964, 326, 460, 307, 198, 2,...
2.503958
379
# -*- coding: utf-8 -*- from .context import sample
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 764, 22866, 1330, 6291, 628 ]
2.571429
21
###################################################################### # LeetCode Problem Number : 145 # Difficulty Level : Medium # URL : https://leetcode.com/problems/binary-tree-postorder-traversal/ ###################################################################### from binary_search_tree.tree_node import TreeNo...
[ 29113, 29113, 4242, 2235, 198, 2, 1004, 316, 10669, 20647, 7913, 1058, 20299, 198, 2, 27419, 5684, 1058, 13398, 198, 2, 10289, 1058, 3740, 1378, 293, 316, 8189, 13, 785, 14, 1676, 22143, 14, 39491, 12, 21048, 12, 7353, 2875, 12, 9535,...
4.984615
65
# -*- coding: utf-8 -*- """This python module aims to manage `DokuWiki <https://www.dokuwiki.org/dokuwiki>`_ wikis by using the provided `XML-RPC API <https://www.dokuwiki.org/devel:xmlrpc>`_. It is compatible with python2.7 and python3+. Installation ------------ It is on `PyPi <https://pypi.python.org/pypi/dokuwik...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 1212, 21015, 8265, 12031, 284, 6687, 198, 63, 35, 11601, 32603, 1279, 5450, 1378, 2503, 13, 67, 11601, 15466, 13, 2398, 14, 67, 11601, 15466, 29, 63, 62, 4...
2.479991
4,248
import setuptools import re with open("README.md", "r") as fh: long_description = fh.read() # get version from _version.py file, from below # https://stackoverflow.com/questions/458550/standard-way-to-embed-version-into-python-package VERSION_FILE = "test_aide/_version.py" version_file_str = open(VERSION_FILE, "r...
[ 11748, 900, 37623, 10141, 198, 11748, 302, 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, 2, 651, 2196, 422, 48...
2.709091
495
"""Simple matshow() example.""" from matplotlib.pylab import * def samplemat(dims): """Make a matrix with all zeros and increasing elements on the diagonal""" aa = zeros(dims) for i in range(min(dims)): aa[i, i] = i return aa # Display 2 matrices of different sizes dimlist = [(12, 12), (15, ...
[ 37811, 26437, 46054, 4919, 3419, 1672, 526, 15931, 198, 6738, 2603, 29487, 8019, 13, 79, 2645, 397, 1330, 1635, 628, 198, 4299, 6291, 6759, 7, 67, 12078, 2599, 198, 220, 220, 220, 37227, 12050, 257, 17593, 351, 477, 1976, 27498, 290, ...
2.642487
193
#! /usr/bin/env python3 import importlib import logging import os import subprocess from setuptools import setup from setuptools.command.install import install as install from setuptools.command.develop import develop as develop logger = logging.getLogger(__name__) stan_model_files = [ os.path.join("nonperiod...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 1330, 8019, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 850, 14681, 198, 198, 6738, 900, 37623, 10141, 1330, 9058, 198, 6738, 900, 37623, 10141, 13, 21812, 13, ...
2.566292
445
import os import h5py import nibabel as nb import numpy as np import torch import torch.utils.data as data from torchvision import transforms import utils.preprocessor as preprocessor # transform_train = transforms.Compose([ # transforms.RandomCrop(200, padding=56), # transforms.ToTensor(), # ]) # d...
[ 11748, 28686, 198, 198, 11748, 289, 20, 9078, 198, 11748, 33272, 9608, 355, 299, 65, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 11748, 28034, 13, 26791, 13, 7890, 355, 1366, 198, 6738, 28034, 10178, 1330, 31408, 198, 11...
2.340405
2,027
import argparse import yaml import sys from .conf import MysqlConf from lib.db import mysql parser = argparse.ArgumentParser() parser.add_argument("--config", help="config file name", type=str, required=False, default='office') input_args = parser.parse_args()
[ 11748, 1822, 29572, 198, 11748, 331, 43695, 198, 11748, 25064, 198, 6738, 764, 10414, 1330, 337, 893, 13976, 18546, 198, 6738, 9195, 13, 9945, 1330, 48761, 198, 198, 48610, 796, 1822, 29572, 13, 28100, 1713, 46677, 3419, 198, 48610, 13, ...
3.384615
78
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'design.ui' # # Created by: PyQt5 UI code generator 5.15.4 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. from PyQt5 import QtC...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 201, 198, 2, 5178, 7822, 7560, 422, 3555, 334, 72, 2393, 705, 26124, 13, 9019, 6, 201, 198, 2, 201, 198, 2, 15622, 416, 25, 9485, 48, 83, 20, 12454, 2438, 173...
2.804878
123
from simulation.car import spawn_drivers from simulation.passenger import spawn_passengers from simulation.core import World, Clock conf = { "x": 100, "y": 100, "drivers": 200, "users": 1000, "start": "2019-07-08T00:00:00", "end": "2019-07-08T00:01:00" } clock = Clock(conf["start"], conf["end"...
[ 6738, 18640, 13, 7718, 1330, 10922, 62, 36702, 198, 6738, 18640, 13, 6603, 6540, 1330, 10922, 62, 6603, 9302, 198, 6738, 18640, 13, 7295, 1330, 2159, 11, 21328, 198, 198, 10414, 796, 1391, 198, 220, 220, 220, 366, 87, 1298, 1802, 11, ...
2.584416
231
#!/bin/python3 import math import os import random import re import sys # # Complete the 'reverse_words_order_and_swap_cases' function below. # # The function is expected to return a STRING. # The function accepts STRING sentence as parameter. # sentence = input() news = reverse_words_order_and_swap_cases(sentence...
[ 2, 48443, 8800, 14, 29412, 18, 198, 198, 11748, 10688, 198, 11748, 28686, 198, 11748, 4738, 198, 11748, 302, 198, 11748, 25064, 628, 198, 2, 198, 2, 13248, 262, 705, 50188, 62, 10879, 62, 2875, 62, 392, 62, 2032, 499, 62, 33964, 6, ...
3.180952
105
import json d1 = {} with open("/home/qinyuan/zs/out/bart-large-with-description-grouped-1e-5-outerbsz4-innerbsz32-adapterdim4-unfreeze-dec29/test_predictions.jsonl") as fin: for line in fin: d = json.loads(line) d1[d["id"]] = d["output"][0]["answer"] d2 = {} dq = {} with open("/home/qinyuan/zs/out...
[ 11748, 33918, 198, 198, 67, 16, 796, 23884, 198, 4480, 1280, 7203, 14, 11195, 14, 80, 3541, 7258, 14, 89, 82, 14, 448, 14, 16575, 12, 11664, 12, 4480, 12, 11213, 12, 8094, 276, 12, 16, 68, 12, 20, 12, 39605, 1443, 89, 19, 12, ...
1.886364
660
import json, requests from pprint import pprint CREEDS_URL = 'http://amp.pharm.mssm.edu/CREEDS/' response = requests.get(CREEDS_URL + 'search', params={'q':'STAT3'}) if response.status_code == 200: pprint(response.json()) json.dump(response.json(), open('api1_result.json', 'wb'), indent=4)
[ 11748, 33918, 11, 7007, 198, 6738, 279, 4798, 1330, 279, 4798, 198, 198, 43387, 1961, 50, 62, 21886, 796, 705, 4023, 1378, 696, 13, 746, 1670, 13, 76, 824, 76, 13, 15532, 14, 43387, 1961, 50, 14, 6, 198, 26209, 796, 7007, 13, 1136...
2.672727
110
# Generated by Django 2.2.3 on 2019-07-31 13:54 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 18, 319, 13130, 12, 2998, 12, 3132, 1511, 25, 4051, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
# Forma sem bugs expressao = (str(input('Digite a expresso: '))) pilhaParenteses = [] for v in expressao: if v == '(': pilhaParenteses.append('(') elif v == ')': if len(pilhaParenteses) > 0: pilhaParenteses.pop() else: pilhaParenteses.append(')') brea...
[ 2, 220, 5178, 64, 5026, 11316, 198, 42712, 5488, 796, 357, 2536, 7, 15414, 10786, 19511, 578, 257, 1033, 33852, 25, 705, 22305, 198, 79, 346, 3099, 24546, 274, 274, 796, 17635, 198, 1640, 410, 287, 4911, 5488, 25, 198, 220, 220, 220...
2.160656
305
# Copyright 2018 TNG Technology Consulting GmbH, Unterfhring, Germany # Licensed under the Apache License, Version 2.0 - see LICENSE.md in project root directory import logging from xml.sax.saxutils import escape log = logging.getLogger()
[ 2, 15069, 2864, 309, 10503, 8987, 41005, 402, 2022, 39, 11, 791, 353, 69, 71, 1806, 11, 4486, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 532, 766, 38559, 24290, 13, 9132, 287, 1628, 6808, 8619, 198, 198, 11748, ...
3.573529
68
import dash_core_components as dcc import dash_html_components as html import plotly.graph_objs as go import plotly.express as px from plotly.subplots import make_subplots import pandas as pd import math from datetime import datetime, time from utils import MONTH_NAMES, month_range """ TODO: Terminar el heatmap de al...
[ 11748, 14470, 62, 7295, 62, 5589, 3906, 355, 288, 535, 198, 11748, 14470, 62, 6494, 62, 5589, 3906, 355, 27711, 198, 11748, 7110, 306, 13, 34960, 62, 672, 8457, 355, 467, 198, 11748, 7110, 306, 13, 42712, 355, 279, 87, 198, 6738, 71...
2.490722
485
# -*- coding: utf-8 -*- from gengine.app.tests.base import BaseDBTest from gengine.app.tests.helpers import create_user, update_user, delete_user, get_or_create_language from gengine.metadata import DBSession from gengine.app.model import AuthUser
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 308, 18392, 13, 1324, 13, 41989, 13, 8692, 1330, 7308, 11012, 14402, 198, 6738, 308, 18392, 13, 1324, 13, 41989, 13, 16794, 364, 1330, 2251, 62, 7220, 11, 4296, ...
3.060241
83
from __future__ import annotations import collections import copy import itertools import math import os import posixpath from io import BytesIO, StringIO from textwrap import indent from typing import Any, Dict, List, MutableMapping, Optional, Tuple, Union from fontTools.misc import etree as ET from fontTools.misc i...
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 11748, 17268, 198, 11748, 4866, 198, 11748, 340, 861, 10141, 198, 11748, 10688, 198, 11748, 28686, 198, 11748, 1426, 844, 6978, 198, 6738, 33245, 1330, 2750, 4879, 9399, 11, 10903, 9399, 198...
2.368076
20,129
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from typing import Any, Optional, Tuple import torch from botorch.acquisition.acquisition import AcquisitionFunction ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 15069, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 198, 2, 198, 2, 770, 2723, 2438, 318, 11971, 739, 262, 17168, 5964, 1043, 287, 262, 198, 2, 38559, 24290, 2393, ...
2.7773
1,163
# Copyright 2018 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 applicable law or agreed to in...
[ 2, 15069, 2864, 262, 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, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, ...
3.671698
265
# USAGE # python example.py --source images/ocean_sunset.jpg --target images/ocean_day.jpg # import the necessary packages from color_transfer import color_transfer import numpy as np import argparse import cv2 # construct the argument parser and parse the arguments ap = argparse.ArgumentParser() ap.add_argument("-s"...
[ 2, 1294, 11879, 198, 2, 21015, 1672, 13, 9078, 1377, 10459, 4263, 14, 78, 5829, 62, 19155, 2617, 13, 9479, 1377, 16793, 4263, 14, 78, 5829, 62, 820, 13, 9479, 198, 198, 2, 1330, 262, 3306, 10392, 198, 6738, 3124, 62, 39437, 1330, ...
3.259939
327
import copy import numpy as np import open3d as o3d from tqdm import tqdm from scipy import stats import utils_o3d as utils if __name__ == '__main__': run()
[ 11748, 4866, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 1280, 18, 67, 355, 267, 18, 67, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 6738, 629, 541, 88, 1330, 9756, 198, 198, 11748, 3384, 4487, 62, 78, 18, 67, 3...
2.4
75
#!/usr/bin/env python # -*- encoding: utf-8 -*- # Copyright (c) 2002-2019 "Neo4j," # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. # # 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 L...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 21004, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 15069, 357, 66, 8, 6244, 12, 23344, 366, 8199, 78, 19, 73, 553, 198, 2, 21227, 19, 73, 10710, 9564, 685, ...
2.626697
884
import os import imp from setuptools import setup, find_packages __version__ = imp.load_source( "hsfs.version", os.path.join("hsfs", "version.py") ).__version__ setup( name="hsfs", version=__version__, install_requires=[ "pyhumps==1.6.1", "requests", "furl", "boto3",...
[ 11748, 28686, 198, 11748, 848, 198, 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 628, 198, 834, 9641, 834, 796, 848, 13, 2220, 62, 10459, 7, 198, 220, 220, 220, 366, 11994, 9501, 13, 9641, 1600, 28686, 13, 6978, 13, 221...
2.17207
802
#!/usr/bin/env python3 from . import signup, signin, signout, update, info, detail
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 201, 198, 201, 198, 6738, 764, 1330, 1051, 929, 11, 1051, 259, 11, 1051, 448, 11, 4296, 11, 7508, 11, 3703, 201, 198 ]
2.71875
32
# Optional list of dependencies required by the package dependencies = ['torch'] from focal_loss import FocalLoss, focal_loss
[ 2, 32233, 1351, 286, 20086, 2672, 416, 262, 5301, 198, 45841, 3976, 796, 37250, 13165, 354, 20520, 198, 198, 6738, 25397, 62, 22462, 1330, 376, 4374, 43, 793, 11, 25397, 62, 22462, 198 ]
3.848485
33
#!/usr/bin/env python ############################################################################### # $Id$ # # Project: GDAL/OGR Test Suite # Purpose: Test GPX driver functionality. # Author: Even Rouault <even dot rouault at mines dash paris dot org> # ###########################################################...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 29113, 29113, 7804, 4242, 21017, 198, 2, 720, 7390, 3, 198, 2, 198, 2, 4935, 25, 220, 27044, 1847, 14, 49656, 6208, 26264, 198, 2, 32039, 25, 220, 6208, 14714, 55, 4639, 11244, 13, ...
3.754237
826
# Code Taken from https://github.com/LYH-YF/MWPToolkit # -*- encoding: utf-8 -*- # @Author: Yihuai Lan # @Time: 2021/08/21 04:59:55 # @File: sausolver.py import random import torch from torch import nn import copy from module.Encoder.rnn_encoder import BasicRNNEncoder from module.Embedder.basic_embedder import BasicE...
[ 2, 6127, 30222, 422, 3740, 1378, 12567, 13, 785, 14, 11319, 39, 12, 56, 37, 14, 14326, 11571, 970, 15813, 198, 2, 532, 9, 12, 21004, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2488, 13838, 25, 575, 48406, 1872, 14730, 198, 2, 2...
3.089888
267
import unittest from functools import partial import pandas as pd from pandas.util.testing import assert_frame_equal, assert_series_equal import numpy as np import threading from StringIO import StringIO from rosetta.parallel import parallel_easy, pandas_easy from rosetta.parallel.threading_easy import threading_easy...
[ 11748, 555, 715, 395, 198, 6738, 1257, 310, 10141, 1330, 13027, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 19798, 292, 13, 22602, 13, 33407, 1330, 6818, 62, 14535, 62, 40496, 11, 6818, 62, 25076, 62, 40496, 198, 11748, 299,...
3.517986
139
import time import srt import re import datetime from mqtthandler import MQTTHandler INIT_STATUS={ "video": { "title": None, "series_title": None, "season": None, "episode": None }, "time": None, "events": None }
[ 11748, 640, 198, 11748, 264, 17034, 198, 11748, 302, 198, 11748, 4818, 8079, 198, 6738, 285, 39568, 400, 392, 1754, 1330, 337, 48, 51, 4221, 392, 1754, 198, 198, 1268, 2043, 62, 35744, 2937, 34758, 198, 220, 220, 220, 366, 15588, 1298...
2.165289
121
#!/usr/bin/env python import os import numpy as np import pandas as pd os.getcwd() # Request for the filename # Current version of this script works only with TSV type files mainFilename = input('Input your file name (diabetes.tab.txt or housing.data.txt): ') print() # To create proper dataframe, transforming it wi...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 418, 13, 1136, 66, 16993, 3419, 198, 198, 2, 19390, 329, 262, 29472, 198, 2, 92...
3.148649
370
from donkeycar.parts.web_controller.web import WebSocketCalibrateAPI from functools import partial from tornado import testing import tornado.websocket import tornado.web import tornado.ioloop import json from unittest.mock import Mock from donkeycar.parts.actuator import PWMSteering, PWMThrottle
[ 198, 6738, 50085, 7718, 13, 42632, 13, 12384, 62, 36500, 13, 12384, 1330, 5313, 39105, 9771, 2889, 378, 17614, 198, 6738, 1257, 310, 10141, 1330, 13027, 198, 198, 6738, 33718, 1330, 4856, 198, 11748, 33718, 13, 732, 1443, 5459, 198, 117...
3.541176
85
# TracIncludeMacro macros import re import urllib2 from StringIO import StringIO from trac.core import * from trac.wiki.macros import WikiMacroBase from trac.wiki.formatter import system_message from trac.wiki.model import WikiPage from trac.mimeview.api import Mimeview, get_mimetype, Context from trac.perm import IPe...
[ 2, 833, 330, 818, 9152, 14155, 305, 34749, 198, 11748, 302, 198, 11748, 2956, 297, 571, 17, 198, 6738, 10903, 9399, 1330, 10903, 9399, 198, 198, 6738, 491, 330, 13, 7295, 1330, 1635, 198, 6738, 491, 330, 13, 15466, 13, 20285, 4951, ...
2.776596
188
# Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
[ 2, 15069, 1584, 3012, 3457, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, 743, ...
2.394016
3,977
from __future__ import absolute_import from unittest import TestCase import os import importlib import inspect from plotly.basedatatypes import BasePlotlyType, BaseFigure datatypes_root = "new_plotly/graph_objs" datatype_modules = [ dirpath.replace("/", ".") for dirpath, _, _ in os.walk(datatypes_root) if...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 555, 715, 395, 1330, 6208, 20448, 198, 11748, 28686, 198, 11748, 1330, 8019, 198, 11748, 10104, 198, 198, 6738, 7110, 306, 13, 3106, 265, 265, 9497, 1330, 7308, 43328, 306, 6030...
2.834646
127
import logging from collections import namedtuple from . import export log = logging.getLogger(__name__) NO_QUERY = 0 PARSED_QUERY = 1 RAW_QUERY = 2 SpecialCommand = namedtuple('SpecialCommand', ['handler', 'command', 'shortcut', 'description', 'arg_type', 'hidden', 'case_sensitive']) COMMANDS ...
[ 11748, 18931, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 198, 6738, 764, 1330, 10784, 198, 198, 6404, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 198, 198, 15285, 62, 10917, 19664, 796, 657, 198, 27082, 50, 1961, 62, ...
2.527697
343
from abc import ABC, abstractmethod
[ 6738, 450, 66, 1330, 9738, 11, 12531, 24396, 628 ]
4.111111
9
# convert2.py # A program to convert Celsius temps to Fahrenheit. # This version issues heat and cold warnings. main()
[ 2, 10385, 17, 13, 9078, 198, 2, 220, 220, 220, 220, 220, 317, 1430, 284, 10385, 34186, 2169, 862, 284, 35935, 13, 198, 2, 220, 220, 220, 220, 220, 770, 2196, 2428, 4894, 290, 4692, 14601, 13, 198, 198, 12417, 3419 ]
3.146341
41
"""The Wolf SmartSet Service integration.""" from datetime import timedelta import logging from httpx import ConnectError, ConnectTimeout from wolf_smartset.token_auth import InvalidAuth from wolf_smartset.wolf_client import FetchFailed, ParameterReadError, WolfClient from homeassistant.config_entries import ConfigEn...
[ 37811, 464, 8662, 10880, 7248, 4809, 11812, 526, 15931, 198, 6738, 4818, 8079, 1330, 28805, 12514, 198, 11748, 18931, 198, 198, 6738, 2638, 87, 1330, 8113, 12331, 11, 8113, 48031, 198, 6738, 17481, 62, 27004, 2617, 13, 30001, 62, 18439, ...
3.196653
239
# test ld = LevenshteinDistance() ld.solve('kitten','sitting') ld.show()
[ 2, 1332, 198, 335, 796, 1004, 574, 1477, 22006, 45767, 3419, 198, 335, 13, 82, 6442, 10786, 74, 2621, 41707, 82, 2535, 11537, 198, 335, 13, 12860, 3419 ]
2.571429
28
import numpy as np import unittest from pyapprox.benchmarks.spectral_diffusion import ( kronecker_product_2d, chebyshev_derivative_matrix, SteadyStateDiffusionEquation2D, SteadyStateDiffusionEquation1D ) from pyapprox.univariate_polynomials.quadrature import gauss_jacobi_pts_wts_1D import pyapprox as pya if...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 555, 715, 395, 198, 198, 6738, 12972, 1324, 13907, 13, 26968, 14306, 13, 4443, 1373, 62, 26069, 4241, 1330, 357, 198, 220, 220, 220, 479, 33171, 15280, 62, 11167, 62, 17, 67, 11, 1125, 48209,...
2.614634
205
import torch from torch import nn from torch.nn import functional as F from torchdrug import layers
[ 11748, 28034, 198, 6738, 28034, 1330, 299, 77, 198, 6738, 28034, 13, 20471, 1330, 10345, 355, 376, 198, 198, 6738, 28034, 30349, 1330, 11685, 198 ]
4.04
25
#!/usr/bin/env python3 import logging import json import os __author__ = 'adamkoziol'
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 18931, 198, 11748, 33918, 198, 11748, 28686, 198, 834, 9800, 834, 796, 705, 324, 321, 7204, 89, 1669, 6, 628 ]
2.806452
31
import numpy as np from sklearn.utils.multiclass import type_of_target from mindware.base_estimator import BaseEstimator from mindware.components.utils.constants import type_dict, MULTILABEL_CLS, IMG_CLS, TEXT_CLS, OBJECT_DET from mindware.components.feature_engineering.transformation_graph import DataNode
[ 11748, 299, 32152, 355, 45941, 198, 6738, 1341, 35720, 13, 26791, 13, 16680, 291, 31172, 1330, 2099, 62, 1659, 62, 16793, 198, 6738, 2000, 1574, 13, 8692, 62, 395, 320, 1352, 1330, 7308, 22362, 320, 1352, 198, 6738, 2000, 1574, 13, 55...
3.131313
99
# -*- coding: utf-8 -*- import scrapy import json import os import codecs from AnimeSpider.items import AnimespiderItem
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 15881, 88, 198, 11748, 33918, 198, 11748, 28686, 198, 11748, 40481, 82, 198, 6738, 27812, 41294, 13, 23814, 1330, 1052, 999, 79, 1304, 7449, 628 ]
3.025
40
import cv2 print cv2.__version__
[ 11748, 269, 85, 17, 198, 4798, 269, 85, 17, 13, 834, 9641, 834, 220, 198 ]
2.266667
15
"""Setup for pytest-testplan plugin.""" from setuptools import setup setup( name='pytest-testplan', version='0.1.0', description='A pytest plugin to generate a CSV test report.', author='Darlene Wong', author_email='darlene.py@gmail.com', license='MIT', py_modules=['pytest_testplan'], ...
[ 37811, 40786, 329, 12972, 9288, 12, 9288, 11578, 13877, 526, 15931, 198, 6738, 900, 37623, 10141, 1330, 9058, 628, 198, 40406, 7, 198, 220, 220, 220, 1438, 11639, 9078, 9288, 12, 9288, 11578, 3256, 198, 220, 220, 220, 2196, 11639, 15, ...
2.632911
158
# GPU # https://paddlex.readthedocs.io/zh_CN/develop/appendix/parameters.html#gpu import os os.environ['CUDA_VISIBLE_DEVICES'] = '0' from paddlex.det import transforms import paddlex as pdx # aluminum_dataset = 'https://bj.bcebos.com/paddlex/examples/industrial_quality_inspection/datasets/aluminum_inspection.tar.gz'...
[ 2, 11362, 198, 2, 3740, 1378, 79, 2860, 2588, 13, 961, 83, 704, 420, 82, 13, 952, 14, 23548, 62, 44175, 14, 16244, 14, 1324, 19573, 14, 17143, 7307, 13, 6494, 2, 46999, 198, 11748, 28686, 198, 418, 13, 268, 2268, 17816, 43633, 563...
2.46538
881
# Generated by Django 3.1.4 on 2021-01-07 19:32 from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 19, 319, 33448, 12, 486, 12, 2998, 678, 25, 2624, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, 9945, 13, 27530, 13, 2934, 1616, 295, 6...
2.818182
44
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import wooey.models.mixins
[ 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, 42625, 14208, 13, 9945, 1330, 4981, 11, 15720, 602, 198, 11748, 36440, 2959, 13, 27530, 13, 1...
2.913043
46
#!/usr/bin/python """ Firewall for munkireport. By Tuxudo Will return all details about how the firewall is configured """ import subprocess import os import sys import platform import re import plistlib import json sys.path.insert(0,'/usr/local/munki') sys.path.insert(0, '/usr/local/munkireport') from munkilib impo...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 37811, 198, 13543, 11930, 329, 285, 2954, 557, 634, 13, 198, 3886, 309, 2821, 12003, 198, 8743, 1441, 477, 3307, 546, 703, 262, 32928, 318, 17839, 198, 37811, 198, 198, 11748, 850, 14681...
2.15258
1,337
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/metrics.ipynb (unless otherwise specified). __all__ = ['recall_at_k', 'precision_at_k'] # Cell from typing import List # Cell def recall_at_k(predictions: List[int], targets: List[int], k: int = 10) -> float: """Computes `Recall@k` from the given predictions and ta...
[ 2, 47044, 7730, 1677, 1137, 11617, 0, 8410, 5626, 48483, 0, 9220, 284, 4370, 25, 299, 1443, 14, 4164, 10466, 13, 541, 2047, 65, 357, 25252, 4306, 7368, 737, 198, 198, 834, 439, 834, 796, 37250, 8344, 439, 62, 265, 62, 74, 3256, 70...
2.797342
301
#!/usr/bin/env/ python import os from math import pi import numpy as np from numpy import ma from scipy.optimize import leastsq import matplotlib.pyplot as plt from uncertainties import ufloat # local modules from .io import load_pendulum_mat_file def average_rectified_sections(data): '''Returns a slice of an o...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 14, 21015, 198, 198, 11748, 28686, 198, 6738, 10688, 1330, 31028, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 299, 32152, 1330, 17266, 198, 6738, 629, 541, 88, 13, 40085, 1096, 1330, 1551, ...
2.293565
6,806
import time import warnings import matplotlib.pyplot as plt import numpy as np import sympy as sp from .global_qbx import global_qbx_self from .mesh import apply_interp_mat, gauss_rule, panelize_symbolic_surface, upsample # prep step 2: find the minimum distance at which integrals are computed # to the required to...
[ 11748, 640, 198, 11748, 14601, 198, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 10558, 88, 355, 599, 198, 198, 6738, 764, 20541, 62, 80, 65, 87, 1330, 3298, 62, 80, 6...
3.267327
101
# -*- coding: utf-8 -*- BROKER_URL = 'amqp://guest@localhost//' CELERY_ACCEPT_CONTENT = ['json'], CELERY_RESULT_BACKEND = 'amqp://guest@localhost//' CELERY_RESULT_SERIALIZER = 'json' CELERY_TASK_SERIALIZER = 'json' CELERY_TIMEZONE = 'Asia/Shanghai' CELERY_ENABLE_UTC = False
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11473, 11380, 1137, 62, 21886, 796, 705, 321, 80, 79, 1378, 5162, 395, 31, 36750, 1003, 6, 198, 198, 34, 3698, 19664, 62, 2246, 42006, 62, 37815, 3525, 796, 37250...
2.114504
131
import logging as log
[ 11748, 18931, 355, 2604, 628 ]
4.6
5
import aspose.email from aspose.email.clients.imap import ImapClient from aspose.email.clients import SecurityOptions from aspose.email.clients.imap import ImapQueryBuilder import datetime as dt if __name__ == '__main__': run()
[ 11748, 355, 3455, 13, 12888, 198, 6738, 355, 3455, 13, 12888, 13, 565, 2334, 13, 320, 499, 1330, 1846, 499, 11792, 198, 6738, 355, 3455, 13, 12888, 13, 565, 2334, 1330, 4765, 29046, 198, 6738, 355, 3455, 13, 12888, 13, 565, 2334, 13...
3.065789
76
# Server UID SERVER_UID = 45158729 # Setup Logging system ######################################### # import os from FileConsoleLogger import FileConsoleLogger ServerLogger = FileConsoleLogger( os.path.join(os.path.dirname(os.path.abspath(__file__)), "_w3server.log") ) W3Logger = FileConsoleLogger( os.path.join(os.pa...
[ 2, 9652, 25105, 198, 35009, 5959, 62, 27586, 796, 4153, 1314, 5774, 1959, 198, 198, 2, 31122, 5972, 2667, 1080, 1303, 29113, 7804, 198, 2, 198, 11748, 28686, 198, 6738, 9220, 47581, 11187, 1362, 1330, 9220, 47581, 11187, 1362, 198, 198,...
2.497886
946
from regression_tests import *
[ 6738, 20683, 62, 41989, 1330, 1635, 628, 628, 628, 628, 628, 628, 628, 198 ]
3.214286
14
import subprocess
[ 11748, 850, 14681 ]
5.666667
3
# -*- coding: utf-8 -*- # Copyright: (c) 2018, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type DOCUMENTATION = """ become: runas short_description: Run As user ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 25, 357, 66, 8, 2864, 11, 28038, 856, 4935, 198, 2, 22961, 3611, 5094, 13789, 410, 18, 13, 15, 10, 357, 3826, 27975, 45761, 393, 3740, 1378, 2503, 13, 4179...
2.045709
1,072
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' ~Gros ''' from hashlib import sha256 import random def add_padding(data, block_size=16): """add PKCS#7 padding""" size = block_size - (len(data)%block_size) return data+chr(size)*size def strip_padding(data, block_size=16): """strip PKCS#7 padding"...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 7061, 6, 198, 93, 38, 4951, 198, 7061, 6, 198, 198, 6738, 12234, 8019, 1330, 427, 64, 11645, 198, 11748, 4738, ...
2.575758
198