content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
import argparse import os import pickle import numpy as np import matplotlib.pyplot as plt plt.style.use('ggplot') parser = argparse.ArgumentParser(description='PyTorch MNIST Example') parser.add_argument('--mnist', action='store_true', default=False, help='open mnist result') args = parser.parse_a...
[ 11748, 1822, 29572, 198, 11748, 28686, 198, 11748, 2298, 293, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 489, 83, 13, 7635, 13, 1904, 10786, 1130, 29487, 11537, 198, 198, 48610...
2.015896
692
import torch
[ 11748, 28034, 628 ]
4.666667
3
# Copyright 2015-2018 David Hadka # # This file is part of Platypus, a Python module for designing and using # evolutionary algorithms (EAs) and multiobjective evolutionary algorithms # (MOEAs). # # Platypus is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License a...
[ 2, 15069, 1853, 12, 7908, 3271, 11161, 4914, 198, 2, 198, 2, 770, 2393, 318, 636, 286, 32715, 4464, 385, 11, 257, 11361, 8265, 329, 18492, 290, 1262, 198, 2, 16673, 16113, 357, 36, 1722, 8, 290, 5021, 15252, 425, 16673, 16113, 198, ...
3.850806
248
#!/usr/bin/env python # -*- coding: utf-8 -*-are not covered by the UCLB ACP-A Licence, from __future__ import absolute_import, division, print_function import tensorflow as tf def bilinear_sampler_1d_h(input_images, x_offset, wrap_mode='border', name='bilinear_sampler', **kwargs): ''' : x_offset--X : x,...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 533, 407, 5017, 416, 262, 471, 5097, 33, 7125, 47, 12, 32, 10483, 594, 11, 198, 198, 6738, 11593, 37443, 834, 1330, 4112, ...
1.786807
1,895
#import relevant libraries import numpy as np import pandas as pd import matplotlib.pyplot as plt from astropy.io import ascii import json from IPython.display import display, Image from specutils import Spectrum1D from astropy import units from scipy.optimize import curve_fit from scipy.interpolate import interp1d imp...
[ 2, 11748, 5981, 12782, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 6468, 28338, 13, 952, 1330, 355, 979, 72, 198, 11748, 33918, 198...
2.492999
1,714
"""Check if userbot alive. If you change these, you become the gayest gay such that even the gay world will disown you.""" import asyncio from telethon import events from telethon.tl.types import ChannelParticipantsAdmins from platform import uname from userbot import ALIVE_NAME from userbot.utils import admin_cm...
[ 37811, 9787, 611, 2836, 13645, 6776, 13, 1002, 345, 1487, 777, 11, 345, 1716, 262, 5650, 395, 5650, 884, 326, 772, 262, 5650, 995, 481, 595, 593, 345, 526, 15931, 201, 198, 11748, 30351, 952, 201, 198, 6738, 5735, 400, 261, 1330, 29...
3.354331
127
import os import logging.config from random import randint import zlib import struct import socket import time from PIL import Image import config # from config import ADB_ROOT, ADB_HOST, SCREEN_SHOOT_SAVE_PATH, ShellColor, CONFIG_PATH,enable_adb_host_auto_detect, ADB_SERVER from .ADBClientSession import ADBClientSes...
[ 11748, 28686, 198, 11748, 18931, 13, 11250, 198, 6738, 4738, 1330, 43720, 600, 198, 11748, 1976, 8019, 198, 11748, 2878, 198, 11748, 17802, 198, 11748, 640, 198, 198, 6738, 350, 4146, 1330, 7412, 198, 198, 11748, 4566, 198, 2, 422, 4566...
3.099338
151
import inspect import os from pathlib import Path
[ 11748, 10104, 201, 198, 11748, 28686, 201, 198, 6738, 3108, 8019, 1330, 10644, 201, 198, 201, 198 ]
3.235294
17
import sys from PyQt5.QtWidgets import QApplication from gui import MgallManager if __name__ == "__main__": main()
[ 11748, 25064, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 54, 312, 11407, 1330, 1195, 23416, 198, 198, 6738, 11774, 1330, 337, 39580, 13511, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 13...
2.733333
45
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
[ 2, 15069, 2177, 3012, 3457, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, ...
2.669173
17,825
import numbers from . import meter import numpy as np import torch
[ 11748, 3146, 198, 6738, 764, 1330, 16430, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 628 ]
4
17
"""Lighting channels module for Zigbee Home Automation.""" from __future__ import annotations from contextlib import suppress from zigpy.zcl.clusters import lighting from .. import registries from ..const import REPORT_CONFIG_DEFAULT from .base import ClientChannel, ZigbeeChannel
[ 37811, 15047, 278, 9619, 8265, 329, 24992, 20963, 5995, 17406, 341, 526, 15931, 198, 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 6738, 4732, 8019, 1330, 18175, 198, 198, 6738, 1976, 328, 9078, 13, 89, 565, 13, 565, 13654, 1330, 1201...
3.931507
73
"""Classes to represent Packet Filter's queueing schedulers and statistics.""" import pf._struct from pf._base import PFObject from pf.constants import * from pf._utils import rate2str __all__ = ["ServiceCurve", "FlowQueue", "PFQueue", "PFQueueStats"]
[ 37811, 9487, 274, 284, 2380, 6400, 316, 25853, 338, 16834, 278, 6038, 377, 364, 290, 7869, 526, 15931, 198, 198, 11748, 279, 69, 13557, 7249, 198, 6738, 279, 69, 13557, 8692, 1330, 28223, 10267, 198, 6738, 279, 69, 13, 9979, 1187, 133...
2.59292
113
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** # Export this package's modules as members: from ._enums import * from .environment import * from .environment_setting import * from .gallery_image imp...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 17202, 39410, 25, 428, 2393, 373, 7560, 416, 262, 21624, 12994, 26144, 35986, 13, 17202, 198, 2, 17202, 2141, 407, 4370, 416, 1021, 4556, 345, 821, 1728, 345, 760, 644, 345, 389, 1804, 0, 17202, ...
3.514493
276
''' (c) Copyright 2013 Telefonica, I+D. Printed in Spain (Europe). All Rights Reserved. The copyright to the software program(s) is property of Telefonica I+D. The program(s) may be used and or copied only with the express written consent of Telefonica I+D or in accordance with the terms and conditions stipulated in t...
[ 7061, 6, 198, 7, 66, 8, 15069, 2211, 14318, 69, 32752, 11, 314, 10, 35, 13, 38482, 287, 8602, 357, 16112, 737, 1439, 6923, 198, 4965, 8520, 13, 198, 198, 464, 6634, 284, 262, 3788, 1430, 7, 82, 8, 318, 3119, 286, 14318, 69, 3275...
3.672316
177
''' User views ''' from datetime import timedelta from flask import request, jsonify, make_response, redirect, json, render_template from flask_jwt_extended import (create_access_token, jwt_required) from flask_restful import Resource from flask_login import login_user, current_user from sqlalchemy.exc import Integrit...
[ 7061, 6, 11787, 5009, 705, 7061, 198, 198, 6738, 4818, 8079, 1330, 28805, 12514, 198, 6738, 42903, 1330, 2581, 11, 33918, 1958, 11, 787, 62, 26209, 11, 18941, 11, 33918, 11, 8543, 62, 28243, 198, 6738, 42903, 62, 73, 46569, 62, 2302, ...
2.762712
236
from querybuilder.fields import ( RankField, RowNumberField, DenseRankField, PercentRankField, CumeDistField, NTileField, LagField, LeadField, FirstValueField, LastValueField, NthValueField, NumStdDevField ) from querybuilder.query import QueryWindow, Query from querybuilder.tests.models import Order from query...
[ 6738, 12405, 38272, 13, 25747, 1330, 357, 198, 220, 220, 220, 10916, 15878, 11, 11314, 15057, 15878, 11, 360, 1072, 27520, 15878, 11, 22512, 27520, 15878, 11, 327, 2454, 20344, 15878, 11, 24563, 576, 15878, 11, 21003, 15878, 11, 198, 22...
3.504505
111
import numpy h = .25 s = 1 bitmap = numpy.array([ [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,0], [0,0,1,1,1,1,1,1,1,1,1,1,1,1,0,0], [0,0,1,1,1,0,1,0,1,1,1,0,0,1,0,0], [0,0,1,1,0,1,0,1,0,1,1,0,0,1,0,...
[ 11748, 299, 32152, 198, 198, 71, 796, 764, 1495, 198, 82, 796, 352, 198, 2545, 8899, 796, 299, 32152, 13, 18747, 26933, 198, 220, 220, 220, 685, 15, 11, 15, 11, 15, 11, 15, 11, 15, 11, 15, 11, 15, 11, 15, 11, 15, 11, 15, 11,...
1.097403
616
import numpy as np from sklearn.model_selection import RandomizedSearchCV, GridSearchCV from sklearn.metrics import roc_auc_score from sklearn.model_selection import StratifiedKFold from sklearn.model_selection import KFold import scipy.stats as sts import xgboost as xgb from xiter import * import pandas as pd import a...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 14534, 1143, 18243, 33538, 11, 24846, 18243, 33538, 198, 6738, 1341, 35720, 13, 4164, 10466, 1330, 686, 66, 62, 14272, 62, 26675, 198, 6738, 1341, 35720, ...
2.472813
1,692
import random import json import gym from gym import spaces import pandas as pd import numpy as np MAX_ACCOUNT_BALANCE = 2147483647 MAX_NUM_SHARES = 2147483647 MAX_SHARE_PRICE = 5000 MAX_VOLUME = 1000e8 MAX_AMOUNT = 3e10 MAX_OPEN_POSITIONS = 5 MAX_STEPS = 20000 MAX_DAY_CHANGE = 1 INITIAL_ACCOUNT_BALANCE = 10000 DATA...
[ 11748, 4738, 198, 11748, 33918, 198, 11748, 11550, 198, 6738, 11550, 1330, 9029, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 628, 198, 22921, 62, 26861, 28270, 62, 33, 1847, 19240, 796, 362, 20198, 2780, 26...
2.492308
195
import json import os import pathlib import time from tqdm import tqdm from aggregator import aggregate from download import DOWNLOAD_PATH, download_files, unzip_files from tqdm.contrib.concurrent import process_map if __name__ == "__main__": main()
[ 11748, 33918, 198, 11748, 28686, 198, 11748, 3108, 8019, 198, 11748, 640, 198, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 6738, 13262, 1352, 1330, 19406, 198, 6738, 4321, 1330, 30320, 35613, 62, 34219, 11, 4321, 62, 16624, 11...
3.222222
81
from PIL import Image import os, glob import numpy as np from sklearn import model_selection classes = ["car", "bycycle", "motorcycle", "pedestrian"] num_class = len(classes) image_size = 50 # X = [] Y = [] for index, classlabel in enumerate(classes): photos_dir = "./" + classlabel files = glob.glob(photos...
[ 6738, 350, 4146, 1330, 7412, 198, 11748, 28686, 11, 15095, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 1341, 35720, 1330, 2746, 62, 49283, 198, 198, 37724, 796, 14631, 7718, 1600, 366, 1525, 13696, 1600, 366, 76, 20965, 13696, 1600, ...
2.335312
337
from services import waypoint_scenarios, quest_scenarios from services.build_campaign import Campaign from log_setup import log if __name__ == "__main__": number_waypoint_scenario = waypoint_scenarios.get_number_of_waypoint_scenarios() log.info(f"We have {number_waypoint_scenario} waypoint available") numb...
[ 6738, 2594, 1330, 835, 4122, 62, 1416, 268, 13010, 11, 1235, 62, 1416, 268, 13010, 198, 6738, 2594, 13, 11249, 62, 35012, 1330, 13718, 198, 6738, 2604, 62, 40406, 1330, 2604, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834...
2.839216
255
import os pkgs = os.path.join(os.environ["ROOT"], "pkgs") info_dir = os.path.join(pkgs, "conda-build-test-ignore-some-prefix-files-1.0-0", "info") has_prefix_file = os.path.join(info_dir, "has_prefix") print(info_dir) assert os.path.isfile(has_prefix_file) with open(has_prefix_file) as f: assert "test2" not in f.r...
[ 11748, 28686, 198, 198, 35339, 82, 796, 28686, 13, 6978, 13, 22179, 7, 418, 13, 268, 2268, 14692, 13252, 2394, 33116, 366, 35339, 82, 4943, 198, 10951, 62, 15908, 796, 28686, 13, 6978, 13, 22179, 7, 35339, 82, 11, 366, 66, 13533, 12...
2.379562
137
import os from collections import namedtuple import torch import torch.nn as nn import torch.nn.functional as F from sklearn.metrics import classification_report from torch.optim import Adam from tqdm import tqdm from data import DataIteratorDistill from loss import FocalLoss from model import CNN from torchtext impo...
[ 11748, 28686, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 6738, 1341, 35720, 13, 4164, 10466, 1330, 17923, 62, 1311...
2.272978
1,088
#!/usr/bin/python # -*- coding: iso-8859-1 -*- # Copyright (c) 2016, Jan Brohl <janbrohl@t-online.de> # All rights reserved. # See LICENSE.txt # Copyright (c) 2004 Colin Stewart (http://www.owlfish.com/) # All rights reserved. # # Redistribution and use in source and binary forms, with or without # ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 47279, 12, 3459, 3270, 12, 16, 532, 9, 12, 198, 198, 2, 220, 220, 220, 15069, 357, 66, 8, 1584, 11, 2365, 2806, 18519, 1279, 13881, 7957, 18519, 31, 83, 12, ...
3.05036
695
from pathlib import Path from typing import List from fasta_reader import FASTAItem, FASTAWriter, read_fasta __all__ = ["downsample"]
[ 6738, 3108, 8019, 1330, 10644, 198, 6738, 19720, 1330, 7343, 198, 198, 6738, 3049, 64, 62, 46862, 1330, 376, 1921, 5603, 7449, 11, 376, 1921, 5603, 34379, 11, 1100, 62, 7217, 64, 198, 198, 834, 439, 834, 796, 14631, 30371, 1403, 8973,...
3.186047
43
# API keys # YF_API_KEY = "YRVHVLiFAt3ANYZf00BXr2LHNfZcgKzdWVmsZ9Xi" # yahoo finance api key TICKER = "TSLA" INTERVAL = "1m" PERIOD = "1d" LOOK_BACK = 30 # hard limit to not reach rate limit of 100 per day
[ 2, 7824, 8251, 198, 2, 575, 37, 62, 17614, 62, 20373, 796, 366, 38162, 53, 39, 53, 32304, 37, 2953, 18, 31827, 57, 69, 405, 33, 55, 81, 17, 43, 39, 45, 69, 57, 66, 70, 42, 89, 67, 54, 53, 907, 57, 24, 42528, 1, 1303, 331, ...
2.069307
101
from controller.invoker import ( invoker_cmd_branch_checkout, invoker_cmd_branch_commit, invoker_cmd_branch_create, invoker_cmd_branch_delete, invoker_cmd_branch_list, invoker_cmd_evaluate, invoker_cmd_filter, invoker_cmd_gpu_info, invoker_cmd_inference, invoker_cmd_init, inv...
[ 6738, 10444, 13, 16340, 11020, 1330, 357, 198, 220, 220, 220, 800, 11020, 62, 28758, 62, 1671, 3702, 62, 9122, 448, 11, 198, 220, 220, 220, 800, 11020, 62, 28758, 62, 1671, 3702, 62, 41509, 11, 198, 220, 220, 220, 800, 11020, 62, ...
2.276181
974
from datetime import datetime, timedelta due_date_format = '%Y-%m-%d' datepicker_date_format = '%m%d%Y'
[ 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 198, 23301, 62, 4475, 62, 18982, 796, 705, 4, 56, 12, 4, 76, 12, 4, 67, 6, 198, 198, 4475, 79, 15799, 62, 4475, 62, 18982, 796, 705, 4, 76, 4, 67, 4, 56, 6, 628, 628...
2.285714
49
import numpy as np from numba.roc.vectorizers import HsaGUFuncVectorize from numba.roc.dispatch import HSAGenerializedUFunc from numba import guvectorize import unittest if __name__ == '__main__': unittest.main()
[ 11748, 299, 32152, 355, 45941, 198, 198, 6738, 997, 7012, 13, 12204, 13, 31364, 11341, 1330, 367, 11400, 38, 36820, 19524, 38469, 1096, 198, 6738, 997, 7012, 13, 12204, 13, 6381, 17147, 1330, 367, 4090, 8645, 498, 1143, 36820, 19524, 19...
2.858974
78
import os from pymongo import MongoClient from dotenv import load_dotenv if __name__ == "__main__": pass
[ 11748, 28686, 198, 6738, 279, 4948, 25162, 1330, 42591, 11792, 198, 6738, 16605, 24330, 1330, 3440, 62, 26518, 24330, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1208, 198 ]
2.947368
38
FILE = r'../src/etc-hosts.txt' hostnames = [] try: with open(FILE, encoding='utf-8') as file: content = file.readlines() except FileNotFoundError: print('File does not exist') except PermissionError: print('Permission denied') for line in content: if line.startswith('#'): continue ...
[ 25664, 796, 374, 6, 40720, 10677, 14, 14784, 12, 4774, 82, 13, 14116, 6, 198, 4774, 14933, 796, 17635, 628, 198, 28311, 25, 198, 220, 220, 220, 351, 1280, 7, 25664, 11, 21004, 11639, 40477, 12, 23, 11537, 355, 2393, 25, 198, 220, ...
2.164223
341
def n_subimissions_per_day( url, headers ): """Get the number of submissions we can make per day for the selected challenge. Parameters ---------- url : {'prize', 'points', 'knowledge' , 'all'}, default='all' The reward of the challenges for top challengers. headers : dictionary , T...
[ 4299, 299, 62, 7266, 320, 7717, 62, 525, 62, 820, 7, 19016, 11, 24697, 15179, 198, 220, 220, 220, 37227, 3855, 262, 1271, 286, 22129, 356, 460, 787, 583, 1110, 329, 262, 6163, 4427, 13, 628, 220, 220, 220, 40117, 198, 220, 220, 22...
3.030488
164
# -*- coding: utf-8 -*- import unittest from src.graph import Graph from src.maximum_cut import maximum_cut, maximum_cut_for_bipartite_graph
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 555, 715, 395, 198, 198, 6738, 12351, 13, 34960, 1330, 29681, 198, 6738, 12351, 13, 47033, 62, 8968, 1330, 5415, 62, 8968, 11, 5415, 62, 8968, 62, 1640, 62...
2.769231
52
# -*- coding: utf-8 -*- # # Copyright 2021 AVSystem <avsystem@avsystem.com> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 33448, 14661, 11964, 1279, 615, 10057, 31, 615, 10057, 13, 785, 29, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 116...
3.355263
228
from pymongo import MongoClient if __name__=="__main__": mongo = MongoClient('mongodb://localhost:27017/') db = mongo['words'] collection = db['word_stats'] firstIsALastIsVowel(collection) firstLetterTotals(collection)
[ 6738, 279, 4948, 25162, 1330, 42591, 11792, 201, 198, 361, 11593, 3672, 834, 855, 1, 834, 12417, 834, 1298, 201, 198, 220, 220, 220, 285, 25162, 796, 42591, 11792, 10786, 31059, 375, 65, 1378, 36750, 25, 1983, 29326, 14, 11537, 201, 1...
2.595745
94
# Copyright 2020 Toyota Research Institute. All rights reserved. from packnet_sfm.utils.image import flip_lr, interpolate_scales from packnet_sfm.utils.misc import filter_dict from packnet_sfm.utils.types import is_tensor, is_list, is_numpy def flip(tensor, flip_fn): """ Flip tensors or list of tensors base...
[ 2, 15069, 12131, 20182, 4992, 5136, 13, 220, 1439, 2489, 10395, 13, 198, 198, 6738, 2353, 3262, 62, 28202, 76, 13, 26791, 13, 9060, 1330, 14283, 62, 14050, 11, 39555, 378, 62, 1416, 2040, 198, 6738, 2353, 3262, 62, 28202, 76, 13, 26...
2.325
2,200
''' Created on 25.07.2012 @author: karl '''
[ 7061, 6, 198, 41972, 319, 1679, 13, 2998, 13, 6999, 198, 198, 31, 9800, 25, 479, 7063, 198, 7061, 6, 628 ]
2.190476
21
# To make directory as a python package
[ 2, 1675, 787, 8619, 355, 257, 21015, 5301, 198 ]
4.444444
9
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_orthoexon ---------------------------------- Tests for `orthoexon` module. """ import os import pytest def test_separate_with_quotes(exon_id_with_quotes): from orthoexon.util import separate test = separate(exon_id_with_quotes) true = "ENSE00001229...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 9288, 62, 1506, 78, 1069, 261, 198, 3880, 438, 198, 198, 51, 3558, 329, 4600, 1506, 78, 1069, 261, ...
2.203325
782
import argparse import os import shutil import time import numpy as np from utils import model, utils from utils.record import RecordAudio parser = argparse.ArgumentParser() parser.add_argument('--audio_db', default='audio_db/', type=str, help='') parser.add_argument('--threshold', default=0.7, ...
[ 11748, 1822, 29572, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 11748, 640, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 3384, 4487, 1330, 2746, 11, 3384, 4487, 198, 6738, 3384, 4487, 13, 22105, 1330, 13266, 21206, 198, 1...
2.171924
634
import logging from datetime import timedelta from flask import Blueprint, Response, abort, redirect, url_for from cubedash import _model, _utils, _utils as utils _LOG = logging.getLogger(__name__) bp = Blueprint("product", __name__) def _iso8601_duration(tdelta: timedelta): """ Format a ti...
[ 11748, 18931, 198, 6738, 4818, 8079, 1330, 28805, 12514, 198, 198, 6738, 42903, 1330, 39932, 11, 18261, 11, 15614, 11, 18941, 11, 19016, 62, 1640, 198, 198, 6738, 13617, 276, 1077, 1330, 4808, 19849, 11, 4808, 26791, 11, 4808, 26791, 35...
2.124324
555
# # This file is part of LiteX-Boards. # # Copyright (c) 2021 Florent Kermarrec <florent@enjoy-digital.fr> # SPDX-License-Identifier: BSD-2-Clause # Board diagram/pinout: # https://user-images.githubusercontent.com/1450143/133655492-532d5e9a-0635-4889-85c9-68683d06cae0.png # http://dl.sipeed.com/TANG/Nano/HDK/Tang-NAN...
[ 2, 198, 2, 770, 2393, 318, 636, 286, 27395, 55, 12, 16635, 1371, 13, 198, 2, 198, 2, 15069, 357, 66, 8, 33448, 23347, 429, 17337, 3876, 8344, 1279, 2704, 382, 429, 31, 268, 2633, 12, 34725, 13, 8310, 29, 198, 2, 30628, 55, 12, ...
2.715976
507
import torch from torch.distributions.kl import kl_divergence from torch.nn.utils.convert_parameters import (vector_to_parameters, parameters_to_vector) from rl_utils.optimization import conjugate_gradient from rl_utils.torch_utils import (weighted_mean, detach_distributi...
[ 11748, 28034, 198, 6738, 28034, 13, 17080, 2455, 507, 13, 41582, 1330, 479, 75, 62, 67, 1428, 12745, 198, 6738, 28034, 13, 20471, 13, 26791, 13, 1102, 1851, 62, 17143, 7307, 1330, 357, 31364, 62, 1462, 62, 17143, 7307, 11, 198, 220, ...
2.5
138
from datetime import timedelta from dateutil.relativedelta import relativedelta from django.core.management.base import BaseCommand, CommandError from django.utils import timezone from ...models import Request DURATION_OPTIONS = { 'hours': lambda amount: timezone.now() - timedelta(hours=amount), 'days': lamb...
[ 6738, 4818, 8079, 1330, 28805, 12514, 198, 198, 6738, 3128, 22602, 13, 2411, 265, 1572, 12514, 1330, 48993, 1572, 12514, 198, 6738, 42625, 14208, 13, 7295, 13, 27604, 13, 8692, 1330, 7308, 21575, 11, 9455, 12331, 198, 6738, 42625, 14208, ...
3.187215
219
import pytest import windows.crypto import windows.generated_def as gdef import windows.crypto.generation from .pfwtest import * pytestmark = pytest.mark.usefixtures('check_for_gc_garbage') TEST_CERT = b""" MIIBwTCCASqgAwIBAgIQG46Uyws+67ZBOfPJCbFrRjANBgkqhkiG9w0BAQsFADAfMR0wGwYDVQQD ExRQeXRob25Gb3JXaW5kb3dzVGVzdDAe...
[ 11748, 12972, 9288, 198, 198, 11748, 9168, 13, 29609, 78, 198, 11748, 9168, 13, 27568, 62, 4299, 355, 308, 4299, 198, 11748, 9168, 13, 29609, 78, 13, 20158, 198, 198, 6738, 764, 79, 44482, 9288, 1330, 1635, 198, 198, 9078, 9288, 4102,...
1.471445
2,679
from __future__ import absolute_import, division, print_function from builtins import (bytes, str, open, super, range, zip, round, input, int, pow, object, map, zip) __author__ = "Andrea Tramacere" import numpy as np from astropy import wcs from bokeh.layouts import row, widgetbox,gridplot ...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 198, 198, 6738, 3170, 1040, 1330, 357, 33661, 11, 965, 11, 1280, 11, 2208, 11, 2837, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220...
2.928962
183
from pathlib import Path from testaid.pathlist import PathList
[ 6738, 3108, 8019, 1330, 10644, 198, 6738, 1332, 1698, 13, 6978, 4868, 1330, 10644, 8053, 628, 628 ]
3.882353
17
# Copyright 2016-2017 IBM Corp. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
[ 2, 15069, 1584, 12, 5539, 19764, 11421, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, ...
2.481503
1,703
root = getRoot(config) # We only run a small set of tests on Windows for now. # Override the parent directory's "unsupported" decision until we can handle # all of its tests. if root.host_os in ['Windows']: config.unsupported = False else: config.unsupported = True
[ 198, 15763, 796, 651, 30016, 7, 11250, 8, 198, 198, 2, 775, 691, 1057, 257, 1402, 900, 286, 5254, 319, 3964, 329, 783, 13, 198, 2, 3827, 13154, 262, 2560, 8619, 338, 366, 403, 15999, 1, 2551, 1566, 356, 460, 5412, 198, 2, 477, 2...
3.4
80
import math import os.path import sys import textwrap from test import support def printlist(x, width=70, indent=4, file=None): """Print the elements of iterable x to stdout. Optional arg width (default 70) is the maximum line length. Optional arg indent (default 4) is the number of blanks with which ...
[ 11748, 10688, 198, 11748, 28686, 13, 6978, 198, 11748, 25064, 198, 11748, 2420, 37150, 198, 6738, 1332, 1330, 1104, 628, 628, 198, 198, 4299, 3601, 4868, 7, 87, 11, 9647, 28, 2154, 11, 33793, 28, 19, 11, 2393, 28, 14202, 2599, 198, ...
2.722689
238
""" AJAX for SQLite Viewer plugin """ from yapsy.IPlugin import IPlugin from flask import Response, jsonify import json import logging import sqlite3
[ 37811, 198, 32, 41, 25922, 329, 16363, 578, 3582, 263, 13877, 198, 37811, 198, 198, 6738, 331, 1686, 88, 13, 40, 37233, 1330, 314, 37233, 198, 6738, 42903, 1330, 18261, 11, 33918, 1958, 198, 11748, 33918, 198, 11748, 18931, 198, 11748, ...
3.355556
45
import requests, json url = 'http://educacao.dadosabertosbr.com/api/cidades/ce' cidades = requests.get(url).content cidades = cidades.decode('utf-8') cidades = json.loads(cidades) for cidade in cidades: codigo, nome = cidade.split(':') print(nome)
[ 11748, 7007, 11, 33918, 198, 198, 6371, 796, 705, 4023, 1378, 18123, 330, 5488, 13, 67, 22484, 397, 861, 418, 1671, 13, 785, 14, 15042, 14, 66, 312, 2367, 14, 344, 6, 198, 66, 312, 2367, 796, 7007, 13, 1136, 7, 6371, 737, 11299, ...
2.333333
108
__version__ = "4.3.1.post1"
[ 198, 834, 9641, 834, 796, 366, 19, 13, 18, 13, 16, 13, 7353, 16, 1, 198 ]
1.8125
16
import math from constants import Constants from utils import vector2d from wpilib import SmartDashboard as Dash from autonomous import pursuitpoint
[ 11748, 10688, 198, 6738, 38491, 1330, 4757, 1187, 198, 6738, 3384, 4487, 1330, 15879, 17, 67, 198, 6738, 266, 79, 22282, 1330, 10880, 43041, 3526, 355, 16189, 198, 6738, 18284, 1330, 14748, 4122, 628 ]
4.411765
34
import difflib import itertools import voluptuous as vol from esphome.py_compat import string_types # pylint: disable=protected-access, unidiomatic-typecheck
[ 11748, 814, 8019, 198, 11748, 340, 861, 10141, 198, 198, 11748, 2322, 37623, 5623, 355, 2322, 198, 198, 6738, 1658, 746, 462, 13, 9078, 62, 5589, 265, 1330, 4731, 62, 19199, 628, 628, 198, 2, 279, 2645, 600, 25, 15560, 28, 24326, 12...
3.153846
52
#!/usr/bin/env python # -*- coding:utf-8 -*- # @Filename: DensityPeaks.py # @Author: Daniel Puente Ramrez # @Time: 5/3/22 09:55 # @Version: 4.0 import math from collections import defaultdict import numpy as np import pandas as pd from sklearn.neighbors import KNeighborsClassifier, NearestNeighbors...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 2, 2488, 35063, 25, 220, 220, 220, 360, 6377, 6435, 4730, 13, 9078, 198, 2, 2488, 13838, 25, 220, 220, 220, 220, 220, ...
2.910112
178
""" # Definition for a Node. """ node2 = TreeNode(2, []) node3 = TreeNode(3, []) children = [node2, node3] node1 = TreeNode(1, children) solution = Solution() print(solution.levelOrder(node1))
[ 37811, 198, 2, 30396, 329, 257, 19081, 13, 198, 37811, 628, 198, 198, 17440, 17, 796, 12200, 19667, 7, 17, 11, 685, 12962, 198, 17440, 18, 796, 12200, 19667, 7, 18, 11, 685, 12962, 198, 17197, 796, 685, 17440, 17, 11, 10139, 18, 6...
2.648649
74
""" websocket - WebSocket client library for Python Copyright (C) 2010 Hiroki Ohtani(liris) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, ...
[ 37811, 198, 732, 1443, 5459, 532, 5313, 39105, 5456, 5888, 329, 11361, 198, 198, 15269, 357, 34, 8, 3050, 25940, 4106, 3966, 83, 3216, 7, 75, 29616, 8, 628, 220, 220, 220, 770, 5888, 318, 1479, 3788, 26, 345, 460, 17678, 4163, 340, ...
2.7
1,510
from django.db import models from vaccine_card.vaccination.models import Vaccine
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 198, 6738, 12319, 62, 9517, 13, 37839, 1883, 13, 27530, 1330, 31749, 500, 628, 628, 628, 198 ]
3.52
25
# 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. # libcloud.org licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not...
[ 2, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 393, 517, 198, 2, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 9387, 351, 198, 2, 428, 670, 329, 3224, 1321, 5115, 6634, 9238, 13, 198, 2, 9195, 17721, 13...
4.012295
244
from typing import Tuple from hypothesis import given from gon.base import (Point, Polygon) from tests.utils import (equivalence, implication) from . import strategies
[ 6738, 19720, 1330, 309, 29291, 198, 198, 6738, 14078, 1330, 1813, 198, 198, 6738, 35140, 13, 8692, 1330, 357, 12727, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
2.417582
91
import os import numpy as np import pytest import easyidp from easyidp.core.objects import ReconsProject, Points from easyidp.io import metashape module_path = os.path.join(easyidp.__path__[0], "io/tests")
[ 11748, 28686, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 12972, 9288, 198, 11748, 2562, 312, 79, 198, 6738, 2562, 312, 79, 13, 7295, 13, 48205, 1330, 3311, 684, 16775, 11, 11045, 198, 6738, 2562, 312, 79, 13, 952, 1330, 1138...
2.853333
75
"""Constant values.""" STATUS_SUCCESS = (0,) STATUS_AUTH_FAILED = (100, 101, 102, 200, 401) STATUS_INVALID_PARAMS = ( 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 216, 217, 218, 220, 221, 223, 225, 227, 228, ...
[ 37811, 3103, 18797, 3815, 526, 15931, 198, 198, 35744, 2937, 62, 12564, 4093, 7597, 796, 357, 15, 35751, 198, 198, 35744, 2937, 62, 32, 24318, 62, 7708, 4146, 1961, 796, 357, 3064, 11, 8949, 11, 15143, 11, 939, 11, 22219, 8, 198, 19...
1.524321
1,583
#!/usr/bin/env python from kivy.app import App from kivy.uix.floatlayout import FloatLayout from kivy.uix.slider import Slider from kivy.graphics import Color, Bezier, Line if __name__ == '__main__': Main().run()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 6738, 479, 452, 88, 13, 1324, 1330, 2034, 198, 6738, 479, 452, 88, 13, 84, 844, 13, 22468, 39786, 1330, 48436, 32517, 198, 6738, 479, 452, 88, 13, 84, 844, 13, 6649, 1304, 1330, 34...
2.662651
83
#coding:utf-8 # # id: bugs.core_6489 # title: User without ALTER ANY ROLE privilege can use COMMENT ON ROLE # decription: # Test creates two users: one of them has no any rights, second is granted with 'alter any role' privilege. # First user ('junior') must not hav...
[ 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, 2414, 4531, 198, 2, 3670, 25, 220, 220, 220, 220, 220, 220, 220, 11787, 1231, 8355, 5781, 15529, ...
2.285171
1,052
import numpy as np import torch from torch.nn import functional as F from torchvision.ops import nms
[ 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 6738, 28034, 13, 20471, 1330, 10345, 355, 376, 198, 6738, 28034, 10178, 13, 2840, 1330, 299, 907, 628, 220, 220, 220, 220, 220, 220, 220, 220, 198 ]
3.083333
36
#!/usr/bin/env python # encoding: utf-8 import sys reload(sys) sys.setdefaultencoding("utf-8")
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 21004, 25, 3384, 69, 12, 23, 198, 198, 11748, 25064, 198, 198, 260, 2220, 7, 17597, 8, 198, 17597, 13, 2617, 12286, 12685, 7656, 7203, 40477, 12, 23, 4943 ]
2.461538
39
#!/usr/bin/python """ Tests for Pyclipper wrapper library. """ from __future__ import print_function from unittest2 import TestCase, main import sys if sys.version_info < (3,): integer_types = (int, long) else: integer_types = (int,) import pyclipper # Example polygons from http://www.angusj.com/delphi/clip...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 37811, 198, 51, 3558, 329, 9485, 565, 14710, 29908, 5888, 13, 198, 37811, 198, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 555, 715, 395, 17, 1330, 6208, 20448, 11, 1388, ...
2.353957
1,390
FACTS = ['espoem multiplied by zero still equals espoem.', 'There is no theory of evolution. Just a list of creatures espoem has allowed to live.', 'espoem does not sleep. He waits.', 'Alexander Graham Bell had three missed calls from espoem when he invented the telephone.', 'espoem ...
[ 37, 2246, 4694, 796, 37250, 274, 7501, 368, 33096, 416, 6632, 991, 21767, 1658, 7501, 368, 2637, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 705, 1858, 318, 645, 4583, 286, 6954, 13, 2329, 257, 1351, 286, 8109, 1658, 7501, 368,...
3.134363
3,431
import xml.etree.ElementTree as ET import csv import os import re from ij import IJ from loci.plugins.in import ImporterOptions from loci.plugins import BF from ij.plugin import ImagesToStack from ij import io #Records metadata (x,y location) for cells that were extracted with 1_find_extract_cells.py #metadata will be...
[ 11748, 35555, 13, 316, 631, 13, 20180, 27660, 355, 12152, 198, 11748, 269, 21370, 198, 11748, 28686, 198, 11748, 302, 198, 6738, 1312, 73, 1330, 314, 41, 198, 6738, 1179, 72, 13, 37390, 13, 259, 1330, 1846, 26634, 29046, 198, 6738, 11...
2.554044
1,323
from env_SingleCatchPigs import EnvSingleCatchPigs import random env = EnvSingleCatchPigs(7) max_iter = 10000 env.set_agent_at([2, 2], 0) env.set_pig_at([4, 4], 0) for i in range(max_iter): print("iter= ", i) env.render() action = random.randint(0, 4) print('action is', action) reward, done = env.s...
[ 6738, 17365, 62, 28008, 34, 963, 47, 9235, 1330, 2039, 85, 28008, 34, 963, 47, 9235, 198, 11748, 4738, 198, 198, 24330, 796, 2039, 85, 28008, 34, 963, 47, 9235, 7, 22, 8, 198, 9806, 62, 2676, 796, 33028, 198, 24330, 13, 2617, 62, ...
2.398907
183
# -*- coding: utf-8 -*- import re import gzip import pandas as pd import numpy as np from eust.core import _download_file, conf _DIMENSION_NAME_RE = re.compile(r"^[a-z_0-9]+$") _YEAR_RE = re.compile(r"^(1|2)[0-9]{3}$") _TSV_GZ_FILENAME = "data.tsv.gz" _HDF_FILENAME = "data.h5" _HDF_TABLE_PATH = "eurostat_tab...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 302, 198, 11748, 308, 13344, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 304, 436, 13, 7295, 1330, 4808, ...
1.993902
164
from __future__ import absolute_import from __future__ import division from __future__ import print_function from config import CONFIG import json import tensorflow as tf import numpy as np import matplotlib.pyplot as plt # pylint: disable=g-import-not-at-top import io import math import os import time from absl i...
[ 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 6738, 4566, 1330, 25626, 198, 11748, 33918, 198, 11748, 11192, 273, 11125, 355, ...
2.108105
8,279
from enum import IntEnum from .Mesh import BoneWeights4, SubMesh, VertexData from .NamedObject import NamedObject from .PPtr import PPtr, save_ptr from ..export import SpriteHelper from ..enums import SpriteMeshType from ..streams import EndianBinaryWriter class SpriteVertex: def __init__(self, reader): ...
[ 6738, 33829, 1330, 2558, 4834, 388, 198, 198, 6738, 764, 37031, 1330, 21717, 1135, 2337, 19, 11, 3834, 37031, 11, 4643, 16886, 6601, 198, 6738, 764, 45, 2434, 10267, 1330, 34441, 10267, 198, 6738, 764, 10246, 2213, 1330, 21082, 2213, 11...
2.745763
177
import numpy as np import os from astropy.table import Table from . import utils __all__ = ["FilterDefinition", "FilterFile", "ParamFilter"] VEGA_FILE = os.path.join(utils.path_to_eazy_data(), 'alpha_lyr_stis_008.fits') VEGA = Table.read(VEGA_FILE) for c in VEGA.col...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 198, 6738, 6468, 28338, 13, 11487, 1330, 8655, 198, 6738, 764, 1330, 3384, 4487, 198, 198, 834, 439, 834, 796, 14631, 22417, 36621, 1600, 366, 22417, 8979, 1600, 366, 22973, 22417, ...
1.770004
2,787
# # LeetCode # # Problem - 106 # URL - https://leetcode.com/problems/construct-binary-tree-from-inorder-and-postorder-traversal/ # # Definition for a binary tree node. # class TreeNode: # def __init__(self, val=0, left=None, right=None): # self.val = val # self.left = left # self.right = ri...
[ 2, 198, 2, 1004, 316, 10669, 198, 2, 198, 2, 20647, 532, 15696, 198, 2, 10289, 532, 3740, 1378, 293, 316, 8189, 13, 785, 14, 1676, 22143, 14, 41571, 12, 39491, 12, 21048, 12, 6738, 12, 259, 2875, 12, 392, 12, 7353, 2875, 12, 953...
2.364964
137
import copy import time from collections import defaultdict import cloudpickle import numpy as np import pandas as pd import woodwork as ww from sklearn.model_selection import BaseCrossValidator from .pipeline_search_plots import PipelineSearchPlots from evalml.automl.automl_algorithm import IterativeAlgorithm from ...
[ 11748, 4866, 198, 11748, 640, 198, 6738, 17268, 1330, 4277, 11600, 198, 198, 11748, 6279, 27729, 293, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 4898, 1818, 355, 266, 86, 198, 6738, 1341, 35720...
2.888152
1,055
import graphene from graphql_jwt.decorators import setup_jwt_cookie from . import mixins, types from .decorators import social_auth
[ 11748, 42463, 198, 6738, 4823, 13976, 62, 73, 46569, 13, 12501, 273, 2024, 1330, 9058, 62, 73, 46569, 62, 44453, 198, 198, 6738, 764, 1330, 5022, 1040, 11, 3858, 198, 6738, 764, 12501, 273, 2024, 1330, 1919, 62, 18439, 628, 628 ]
3.317073
41
# yellowbrick.regressor.base # Base classes for regressor Visualizers. # # Author: Rebecca Bilbro <rbilbro@districtdatalabs.com> # Author: Benjamin Bengfort <bbengfort@districtdatalabs.com> # Created: Fri Jun 03 10:30:36 2016 -0700 # # Copyright (C) 2016 District Data Labs # For license information, see LICENSE.tx...
[ 2, 7872, 1671, 624, 13, 2301, 44292, 13, 8692, 198, 2, 7308, 6097, 329, 842, 44292, 15612, 11341, 13, 198, 2, 198, 2, 6434, 25, 220, 220, 23489, 24207, 7957, 1279, 26145, 346, 7957, 31, 17080, 2012, 67, 10254, 8937, 13, 785, 29, 1...
4.089362
235
#!/usr/bin/env python3 import os import argparse import logging import isce import isceobj from components.stdproc.stdproc import crossmul from iscesys.ImageUtil.ImageUtil import ImageUtil as IU def createParser(): ''' Command Line Parser. ''' parser = argparse.ArgumentParser( description='Generat...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 628, 198, 11748, 28686, 198, 11748, 1822, 29572, 198, 11748, 18931, 198, 198, 11748, 318, 344, 198, 11748, 318, 344, 26801, 198, 6738, 6805, 13, 19282, 36942, 13, 19282, 36942, 1330, 3272...
2.585185
405
from typing import List if __name__== '__main__': solution = Solution() nums = [3,2,2,3] val = 3 ans = solution.removeElement(nums, val) # print(ans) print(nums[:ans])
[ 6738, 19720, 1330, 7343, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198, 361, 11593, 3672, 834, 855, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 4610, 796, 28186, 3419, 628, 220, 220, ...
2.09
100
# Copyright (c) 2014-present PlatformIO <contact@platformio.org> # # 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 appli...
[ 2, 15069, 357, 66, 8, 1946, 12, 25579, 19193, 9399, 1279, 32057, 31, 24254, 952, 13, 2398, 29, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, ...
2.793867
1,174
# Copyright 2015 The LUCI Authors. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 # that can be found in the LICENSE file. """Messages for the Machine Provider API.""" # pylint: disable=unused-wildcard-import, wildcard-import from protorpc import messages from compo...
[ 2, 15069, 1853, 383, 406, 9598, 40, 46665, 13, 1439, 2489, 10395, 13, 198, 2, 5765, 286, 428, 2723, 2438, 318, 21825, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 198, 2, 326, 460, 307, 1043, 287, 262, 38559, 24290, 2393, 13, 1...
3.553957
139
# webscraping test import urllib.request from bs4 import BeautifulSoup with urllib.request.urlopen('http://www.netvasco.com.br') as url: page = url.read() #print(page) print(url.geturl()) print(url.info()) print(url.getcode()) # Analise o html na varivel 'page' e armazene-o no formato Beautiful ...
[ 2, 3992, 1416, 2416, 278, 1332, 198, 198, 11748, 2956, 297, 571, 13, 25927, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 628, 198, 4480, 2956, 297, 571, 13, 25927, 13, 6371, 9654, 10786, 4023, 1378, 2503, 13, 3262, 11017, 1073, 1...
2.375527
237
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
[ 2, 15069, 13130, 383, 309, 22854, 37535, 46665, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846,...
3.664165
533
"""Experiment wrapper for training on Cloud ML.""" import argparse, glob, os import tensorflow as tf # From this package. import model def generate_experiment_fn(data_dir, train_batch_size, eval_batch_size, train_steps, eval_steps, cell_size, hidden, **experime...
[ 37811, 20468, 3681, 29908, 329, 3047, 319, 10130, 10373, 526, 15931, 198, 198, 11748, 1822, 29572, 11, 15095, 11, 28686, 198, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 198, 2, 3574, 428, 5301, 13, 198, 11748, 2746, 628, 198, 4299,...
2.29239
1,498
# Time: 310 ms # Memory: 1664 KB n = int(input()) e = 0 s = 0 for i in range(n): s =s- eval(input().replace(' ', '-')) e = max(e, s) print(e)
[ 2, 3862, 25, 28947, 13845, 198, 2, 14059, 25, 1467, 2414, 14204, 198, 77, 796, 493, 7, 15414, 28955, 198, 68, 796, 657, 198, 82, 796, 657, 198, 1640, 1312, 287, 2837, 7, 77, 2599, 198, 220, 220, 220, 264, 796, 82, 12, 5418, 7, ...
2.112676
71
import pyredner import numpy as np import torch cam = pyredner.Camera(position = torch.tensor([0.0, 0.0, -5.0]), look_at = torch.tensor([0.0, 0.0, 0.0]), up = torch.tensor([0.0, 1.0, 0.0]), fov = torch.tensor([45.0]), # in degree c...
[ 11748, 12972, 445, 1008, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 198, 20991, 796, 12972, 445, 1008, 13, 35632, 7, 9150, 796, 28034, 13, 83, 22854, 26933, 15, 13, 15, 11, 657, 13, 15, 11, 532, 20, 13, 15, 46570, ...
1.944388
989
############################################################################## # # Copyright (c) 2001, 2002 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # TH...
[ 29113, 29113, 7804, 4242, 2235, 198, 2, 198, 2, 15069, 357, 66, 8, 5878, 11, 6244, 1168, 3008, 5693, 290, 25767, 669, 13, 198, 2, 1439, 6923, 33876, 13, 198, 2, 198, 2, 770, 3788, 318, 2426, 284, 262, 8617, 286, 262, 1168, 3008, ...
3.724528
265
""" Enable import """ from os import path import sys sys.path.append( path.abspath(path.join('tools', 'validators', 'instance_validator')))
[ 37811, 27882, 1330, 37227, 198, 198, 6738, 28686, 1330, 3108, 198, 11748, 25064, 198, 198, 17597, 13, 6978, 13, 33295, 7, 198, 220, 220, 220, 3108, 13, 397, 2777, 776, 7, 6978, 13, 22179, 10786, 31391, 3256, 705, 12102, 2024, 3256, 70...
2.979592
49
from typing import Callable, AnyStr, Optional from zlib import compress as default_compress, decompress as default_decompress from .cache import Cache from ..constants import NOT_FOUND
[ 6738, 19720, 1330, 4889, 540, 11, 4377, 13290, 11, 32233, 198, 6738, 1976, 8019, 1330, 27413, 355, 4277, 62, 5589, 601, 11, 38237, 601, 355, 4277, 62, 12501, 3361, 601, 198, 198, 6738, 764, 23870, 1330, 34088, 198, 6738, 11485, 9979, ...
3.895833
48
"""Mobjects representing vector fields.""" __all__ = [ "VectorField", "ArrowVectorField", "StreamLines", ] import itertools as it import random from math import ceil, floor from typing import Callable, Iterable, Optional, Sequence, Tuple, Type import numpy as np from colour import Color from PIL import I...
[ 37811, 44, 48205, 10200, 15879, 7032, 526, 15931, 198, 198, 834, 439, 834, 796, 685, 198, 220, 220, 220, 366, 38469, 15878, 1600, 198, 220, 220, 220, 366, 3163, 808, 38469, 15878, 1600, 198, 220, 220, 220, 366, 12124, 43, 1127, 1600, ...
2.303941
9,515
""" This library allows the conversion of python 3.7's :mod:`dataclasses` to :mod:`marshmallow` schemas. It takes a python class, and generates a marshmallow schema for it. Simple example:: from marshmallow import Schema from marshmallow_dataclass import dataclass @dataclass class Point: x:flo...
[ 37811, 198, 1212, 5888, 3578, 262, 11315, 286, 21015, 513, 13, 22, 338, 1058, 4666, 25, 63, 19608, 330, 28958, 63, 198, 1462, 1058, 4666, 25, 63, 76, 5406, 42725, 63, 3897, 5356, 13, 198, 198, 1026, 2753, 257, 21015, 1398, 11, 290, ...
2.579798
6,742
#!/usr/bin/env python3 import sys import asyncio from electrum_trc.network import filter_protocol, Network from electrum_trc.util import create_and_start_event_loop, log_exceptions try: txid = sys.argv[1] except: print("usage: txradar txid") sys.exit(1) loop, stopping_fut, loop_thread = create_and_star...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 25064, 198, 11748, 30351, 952, 198, 198, 6738, 1742, 6582, 62, 2213, 66, 13, 27349, 1330, 8106, 62, 11235, 4668, 11, 7311, 198, 6738, 1742, 6582, 62, 2213, 66, 13, 22602, ...
2.701299
154
import sys import typing import numpy as np OJ = 'ONLINE_JUDGE' if sys.argv[-1] == OJ: from numba import i8, njit from numba.pycc import CC cc = CC('my_module') fn = solve signature = (i8, i8[:, :]) cc.export( fn.__name__, signature, )(fn) cc.compile() exit(0) from my_module impor...
[ 11748, 25064, 198, 11748, 19720, 198, 198, 11748, 299, 32152, 355, 45941, 628, 628, 198, 198, 46, 41, 796, 705, 1340, 24027, 62, 41, 8322, 8264, 6, 198, 361, 25064, 13, 853, 85, 58, 12, 16, 60, 6624, 440, 41, 25, 198, 220, 422, ...
2.285714
147
from datetime import datetime from pypylon import pylon import nimmAuf import smbus2 import os import argparse import bestimmeVolumen from threading import Thread import time programmstart = time.time() # Argumente parsen (bei Aufruf im Terminal z.B. 'starteMessung.py -n 100' eingeben) ap = argparse.ArgumentParser(de...
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 279, 4464, 15158, 1330, 279, 15158, 198, 11748, 299, 8608, 32, 3046, 198, 11748, 895, 10885, 17, 198, 11748, 28686, 198, 11748, 1822, 29572, 198, 11748, 1266, 320, 1326, 16598, 20080, 198, ...
2.389215
853
import os import tempfile
[ 11748, 28686, 198, 11748, 20218, 7753, 628, 628, 628, 198 ]
3.2
10
# # PySNMP MIB module EXTREME-RTSTATS-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/EXTREME-BASE-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 18:53:03 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, M...
[ 2, 198, 2, 9485, 15571, 7378, 337, 9865, 8265, 27489, 2200, 11682, 12, 14181, 2257, 33586, 12, 8895, 33, 357, 4023, 1378, 16184, 76, 489, 8937, 13, 785, 14, 79, 893, 11632, 8, 198, 2, 7054, 45, 13, 16, 2723, 2393, 1378, 14, 14490,...
2.75196
1,786