content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
[ 2, 220, 220, 15069, 357, 66, 8, 12131, 350, 37382, 47, 37382, 46665, 13, 1439, 6923, 12224, 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, ...
1.76956
18,239
from gensim import models w = models.Word2Vec.load_word2vec_format('/home/jalaj/Downloads/GoogleNews-vectors-negative300.bin', binary=True) if 'the' in w.wv.vocab: print("Vector for word 'the' \n") print(w.wv['the']) else: print("Vocabulary doesn't include word 'the'\n") if 'a' in w.wv.vocab: print("Vec...
[ 6738, 308, 641, 320, 1330, 4981, 198, 86, 796, 4981, 13, 26449, 17, 53, 721, 13, 2220, 62, 4775, 17, 35138, 62, 18982, 10786, 14, 11195, 14, 73, 282, 1228, 14, 10002, 82, 14, 11708, 9980, 12, 303, 5217, 12, 31591, 6200, 13, 8800, ...
2.340782
179
import itertools def peek(sequence): """ Returns the value of the top of the sequence without removing the value from the data. """ iterable = iter(sequence) try: first = next(iterable) return first, itertools.chain([first], iterable) except StopIteration: return No...
[ 11748, 340, 861, 10141, 628, 198, 4299, 27185, 7, 43167, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 16409, 262, 1988, 286, 262, 1353, 286, 262, 8379, 1231, 10829, 262, 1988, 198, 220, 220, 220, 422, 262, 1366, 13, 198, 220...
2.680328
122
import numpy as np from scipy import stats class H0: ''' Applies binomial hypothesis test to data processed with RadClass. Capable of applying a hypothesis test to gross or channel-wise count-rate. This test relies on the assumption that count-rates measured consecutively in time will not be stat...
[ 11748, 299, 32152, 355, 45941, 198, 198, 6738, 629, 541, 88, 1330, 9756, 628, 198, 4871, 367, 15, 25, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 2034, 13508, 9874, 49070, 14078, 1332, 284, 1366, 13686, 351, 5325, 9487, 13, 1...
2.578896
1,033
#!/usr/bin/env python # # faq.py # # Routines to assemble a FAQ list for the Wireshark web site. # Questions and answer content can be found below. Section and # question numbers will be automatically generated. # # Wireshark - Network traffic analyzer # By Gerald Combs <gerald@wireshark.org> # Copyright 1998 Gerald Co...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 2, 24685, 80, 13, 9078, 198, 2, 198, 2, 39602, 1127, 284, 25432, 257, 18749, 1351, 329, 262, 370, 2387, 71, 668, 3992, 2524, 13, 198, 2, 20396, 290, 3280, 2695, 460, 307, ...
3.61219
16,784
filter_cfg = dict( type='SavizkyGolayFilter', window_size=11, polyorder=2, )
[ 24455, 62, 37581, 796, 8633, 7, 198, 220, 220, 220, 2099, 11639, 47362, 528, 2584, 38, 349, 323, 22417, 3256, 198, 220, 220, 220, 4324, 62, 7857, 28, 1157, 11, 198, 220, 220, 220, 7514, 2875, 28, 17, 11, 198, 8, 198 ]
2.119048
42
import torch.nn as nn import torch.nn.functional as F # define the CNN architecture ### TODO: choose an architecture, and complete the class
[ 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 198, 2, 8160, 262, 8100, 10959, 198, 220, 220, 220, 44386, 16926, 46, 25, 3853, 281, 10959, 11, 290, 1844, 262, 1398 ]
3.717949
39
# Licensed under a 3-clause BSD style license - see LICENSE.rst import numpy as np import pytest import pickle import os from .. import Quat, normalize ra = 10. dec = 20. roll = 30. q0 = Quat([ra, dec, roll]) equatorial_23 = np.array([[[10, 20, 30], [10, 20, -30], ...
[ 2, 49962, 739, 257, 513, 12, 565, 682, 347, 10305, 3918, 5964, 532, 766, 38559, 24290, 13, 81, 301, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 12972, 9288, 198, 11748, 2298, 293, 198, 11748, 28686, 198, 198, 6738, 11485, 1330, 22...
2.027441
2,806
#!/usr/bin/env python #=============================================================================== # Copyright (c) 2014 Geoscience Australia # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions ar...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 201, 198, 201, 198, 2, 23926, 25609, 18604, 201, 198, 2, 15069, 357, 66, 8, 220, 1946, 2269, 418, 4234, 4505, 201, 198, 2, 1439, 2489, 10395, 13, 201, 198, 2, 220, 201, 198, 2, 2297, ...
2.876476
1,101
if __name__ == "__main__": print("The upper bound of P(A∪B) = P(A) + P(B)\n") print("The lower bound of P(A∪B) = max(P(A), P(B))\n") print("The upper bound of P(A∩B) = max(P(A), P(B))\n") print("The lower bound of P(A∩B) = 0\n")
[ 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 201, 198, 220, 220, 220, 3601, 7203, 464, 6727, 5421, 286, 350, 7, 32, 24861, 103, 33, 8, 796, 350, 7, 32, 8, 1343, 350, 7, 33, 19415, 77, 4943, 201, 198, 220, 220, 220, ...
1.937984
129
import pytest from pype import * __author__ = "Mynti207" __copyright__ = "Mynti207" __license__ = "mit"
[ 11748, 12972, 9288, 198, 6738, 279, 2981, 1330, 1635, 198, 198, 834, 9800, 834, 796, 366, 3666, 429, 72, 22745, 1, 198, 834, 22163, 4766, 834, 796, 366, 3666, 429, 72, 22745, 1, 198, 834, 43085, 834, 796, 366, 2781, 1, 628 ]
2.52381
42
# -*- coding: utf-8 -*- # # Copyright (C) 2012 Tommy Winther # http://tommy.winther.nu # # Modified for FTV Guide (09/2014 onwards) # by Thomas Geppert [bluezed] - bluezed.apps@gmail.com # # This Program is free software; you can redistribute it and/or modify # it under the terms of the G...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 2, 201, 198, 2, 220, 220, 220, 220, 220, 15069, 357, 34, 8, 2321, 19919, 7178, 490, 201, 198, 2, 220, 220, 220, 220, 220, 2638, 1378, 39532, 1820, 13, 5404, 4...
2.431579
855
#!/usr/bin/env python # -*- encoding: utf-8 -*- ''' @File : imports.py @Time : 2020/05/07 23:59:19 @Author : Benjin Zhu @Contact : poodarchu@gmail.com @Last Modified by : Benjin Zhu @Last Modified time : 2020/05/07 23:59:19 ''' import imp def dynamic_i...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 21004, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 7061, 6, 198, 31, 8979, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 220, 220, 17944...
2.213942
416
# Copyright (C) strawberryhacker import os import sys import serial import time from citrus import citrus_packet from citrus import citrus_file from loading import loading_simple from loading import loading_bar # Used for loading a custom application to the CitrusOS and execute it main()
[ 2, 15069, 357, 34, 8, 41236, 71, 10735, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 11389, 198, 11748, 640, 198, 198, 6738, 35405, 1330, 35405, 62, 8002, 316, 198, 6738, 35405, 1330, 35405, 62, 7753, 198, 6738, 11046, 1330, ...
4.013699
73
# -*- coding: utf-8 -*- """Unit test package for document_clipper."""
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 26453, 1332, 5301, 329, 3188, 62, 565, 14710, 526, 15931, 198 ]
2.62963
27
from intensity_normalization.normalize import fcm, gmm, kde, lsq, nyul, whitestripe, zscore
[ 6738, 12245, 62, 11265, 1634, 13, 11265, 1096, 1330, 277, 11215, 11, 308, 3020, 11, 479, 2934, 11, 300, 31166, 11, 299, 88, 377, 11, 20542, 395, 380, 431, 11, 1976, 26675, 198 ]
2.787879
33
import sys import json import argparse from blocksec2go import open_pyscard, CardError from blocksec2go import select_app, unlock_pin, set_pin from blocksec2go.util import bytes_from_hex
[ 11748, 25064, 198, 11748, 33918, 198, 11748, 1822, 29572, 198, 198, 6738, 2512, 2363, 17, 2188, 1330, 1280, 62, 79, 893, 9517, 11, 5172, 12331, 198, 6738, 2512, 2363, 17, 2188, 1330, 2922, 62, 1324, 11, 12116, 62, 11635, 11, 900, 62, ...
3.241379
58
pkgname = "libdaemon" pkgver = "0.14" pkgrel = 0 build_style = "gnu_configure" configure_args = ["--disable-lynx"] hostmakedepends = ["pkgconf"] pkgdesc = "Lightweight C library that eases the writing of UNIX daemons" maintainer = "q66 <q66@chimera-linux.org>" license = "LGPL-2.1-or-later" url = "http://0pointer.de/len...
[ 35339, 3672, 796, 366, 8019, 6814, 7966, 1, 198, 35339, 332, 796, 366, 15, 13, 1415, 1, 198, 35339, 2411, 796, 657, 198, 11249, 62, 7635, 796, 366, 41791, 62, 11250, 495, 1, 198, 11250, 495, 62, 22046, 796, 14631, 438, 40223, 12, ...
2.34434
212
#=============================================================================== # pyQuASAR.py #=============================================================================== # Imports ====================================================================== import funcgenom import gzip import itertools import os impor...
[ 2, 23926, 25609, 18604, 198, 2, 12972, 4507, 1921, 1503, 13, 9078, 198, 2, 23926, 25609, 18604, 198, 198, 2, 1846, 3742, 38093, 1421, 28, 198, 198, 11748, 25439, 5235, 296, 198, 11748, 308, 13344, 198, 11748, 340, 861, 10141, 198, 117...
1.93712
4,278
import re import idna from django.http import JsonResponse from django.views.decorators.csrf import csrf_exempt from django.views.decorators.http import require_http_methods from helper.models import UserData, NotesData EMAIL_REGEX = '^[a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$' @csrf_exem...
[ 11748, 302, 198, 198, 11748, 4686, 2616, 198, 6738, 42625, 14208, 13, 4023, 1330, 449, 1559, 31077, 198, 6738, 42625, 14208, 13, 33571, 13, 12501, 273, 2024, 13, 6359, 41871, 1330, 269, 27891, 69, 62, 42679, 198, 6738, 42625, 14208, 13,...
2.305263
190
import json import datetime import decimal from math import sqrt access_control = {'Access-Control-Allow-Origin': '*','Access-Control-Allow-Credentials': 'true'}
[ 11748, 33918, 198, 11748, 4818, 8079, 198, 11748, 32465, 198, 6738, 10688, 1330, 19862, 17034, 198, 198, 15526, 62, 13716, 796, 1391, 6, 15457, 12, 15988, 12, 35265, 12, 39688, 10354, 705, 9, 41707, 15457, 12, 15988, 12, 35265, 12, 34, ...
3.326531
49
from os.path import abspath, join, dirname, realpath from flask import Flask from flask_cors import CORS from cache import initialize_cache from compress import initialize_compress from controllers import initialize_routes from flask_restful import Api from mailer import initialize_mailer from middleware.error_handling...
[ 6738, 28686, 13, 6978, 1330, 2352, 6978, 11, 4654, 11, 26672, 3672, 11, 1103, 6978, 198, 6738, 42903, 1330, 46947, 198, 6738, 42903, 62, 66, 669, 1330, 327, 20673, 198, 6738, 12940, 1330, 41216, 62, 23870, 198, 6738, 27413, 1330, 41216,...
2.986799
303
# Generated by Django 3.0.5 on 2020-04-18 10:36 import datetime from django.conf import settings from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 20, 319, 12131, 12, 3023, 12, 1507, 838, 25, 2623, 198, 198, 11748, 4818, 8079, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981...
3.089286
56
""" Filename: table_manager.py Purpose: A program to define and create all tables needed in the database Authors: Jordan Smith Group: Wholesome as Heck Programmers (WaHP) Last modified: 11/13/21 """ from db_manager import db_mgr DROP_ALL = True tables = {} ### # TABLES TO BE ADDED ### tables['fitnessGoal'] = { ...
[ 37811, 198, 35063, 25, 3084, 62, 37153, 13, 9078, 198, 198, 30026, 3455, 25, 317, 1430, 284, 8160, 290, 2251, 477, 8893, 2622, 287, 262, 6831, 198, 198, 30515, 669, 25, 8078, 4176, 198, 13247, 25, 854, 4316, 462, 355, 31679, 6118, 1...
2.272225
1,811
from backend.app import app
[ 6738, 30203, 13, 1324, 1330, 598 ]
4.5
6
# -*- coding: utf-8 -*- # Generated by Django 1.11.10 on 2018-10-09 14:26 from __future__ import unicode_literals from django.db import migrations
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 1157, 13, 940, 319, 2864, 12, 940, 12, 2931, 1478, 25, 2075, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, ...
2.709091
55
# # Copyright 2016 The BigDL Authors. # # 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, 198, 2, 15069, 1584, 383, 4403, 19260, 46665, 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...
2.858396
798
""" Algorithms for ode propagation with adaptive step selection using explicit embedded runge-kutta method (rk_step): - select_initial_step: select size of first step - rk_variable_step: make an adaptive rk step according to tolerance - rk_prop: integrate ode from s0, t0 to t (Cauchy's problem) - event_detector: root s...
[ 37811, 198, 2348, 7727, 907, 329, 267, 2934, 43594, 351, 29605, 2239, 6356, 198, 3500, 7952, 14553, 1057, 469, 12, 74, 315, 8326, 2446, 357, 81, 74, 62, 9662, 2599, 198, 12, 2922, 62, 36733, 62, 9662, 25, 2922, 2546, 286, 717, 2239,...
2.139975
7,137
# Copyright 2022 The Pigweed Authors # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
[ 2, 15069, 33160, 383, 23097, 39054, 46665, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 407, 198, 2, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 921, 743, ...
2.341363
4,608
import hashlib import json import logging import os from aquarium.provenance import (FileEntity, FileTypes, JobActivity, OperationActivity, ProvenanceTrace) from typing import List, Union
[ 11748, 12234, 8019, 198, 11748, 33918, 198, 11748, 18931, 198, 11748, 28686, 198, 198, 6738, 33868, 13, 42874, 590, 1330, 357, 8979, 32398, 11, 9220, 31431, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220...
2.254386
114
import math import numpy as np from metadrive.utils.math_utils import norm class InterpolatingLine: """ This class provides point set with interpolating function """ @staticmethod @staticmethod @staticmethod @staticmethod def get_point(self, longitudinal, lateral=None): ...
[ 11748, 10688, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 1138, 324, 11590, 13, 26791, 13, 11018, 62, 26791, 1330, 2593, 628, 198, 4871, 4225, 16104, 803, 13949, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 770, 139...
2.348637
697
import pytest # pylint: disable=unused-import from .context import Storage, Asset, Order from .fixtures import ( ASSET_ID, ORDER_ID, WORKSPACE_ID, auth_mock, auth_live, storage_mock, storage_live, JSON_ASSET, JSON_ORDER, ) def test_paginate_with_limit_smaller_page_size(storage...
[ 11748, 12972, 9288, 198, 198, 2, 279, 2645, 600, 25, 15560, 28, 403, 1484, 12, 11748, 198, 6738, 764, 22866, 1330, 20514, 11, 31433, 11, 8284, 198, 6738, 764, 69, 25506, 1330, 357, 198, 220, 220, 220, 24994, 2767, 62, 2389, 11, 198,...
2.181026
2,066
# -*- coding: utf-8 -*- # Copyright: (c) 2016, Matt Davis, <mdavis@ansible.com> # Copyright: (c) 2016, Chris Houseknecht, <house@redhat.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 15069, 25, 357, 66, 8, 1584, 11, 4705, 7802, 11, 1279, 9132, 23401, 31, 504, 856, 13, 785, 29, 198, 2, 15069, 25, 357, 66, 8, 1584, 11, 5180, 2097, 74, 7...
2.484211
95
import numpy.testing import cupy # NumPy-like assertion functions that accept both NumPy and CuPy arrays
[ 11748, 299, 32152, 13, 33407, 198, 198, 11748, 6508, 88, 628, 198, 2, 31835, 20519, 12, 2339, 19190, 5499, 326, 2453, 1111, 31835, 20519, 290, 14496, 20519, 26515, 628, 628, 628, 198 ]
3.5625
32
from collections import Counter import random class LPA: """ Louvain community detection """ def train(self,networks): """ No training actually takes place in this class. :param networks: list of egonet objects :return: Predictions on training networks """ ...
[ 6738, 17268, 1330, 15034, 198, 11748, 4738, 198, 198, 4871, 406, 4537, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 4768, 85, 391, 2055, 13326, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 825, 4512, 7, 944, 11, 3262, 5225, ...
2.084187
879
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ #plot maps of ensemble mean annual mean dslc and wind stress change @author: thermans """ import xarray as xr import matplotlib.pyplot as plt import os import numpy as np import fnmatch import cmocean import cartopy.crs as ccrs import matplotlib import matplotlib.gri...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 198, 2, 29487, 8739, 286, 34549, 1612, 5079, 1612, 288, 6649, 66, 290, 2344, 5503, 1487, 198, 198, 31...
2.290463
2,978
import pytest from src.conanbuilder.signature import Signature @pytest.fixture
[ 11748, 12972, 9288, 198, 6738, 12351, 13, 1102, 272, 38272, 13, 12683, 1300, 1330, 34894, 628, 198, 31, 9078, 9288, 13, 69, 9602, 628, 628, 628, 198 ]
3.222222
27
import torch import torch.nn from models.blocks import *
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 198, 6738, 4981, 13, 27372, 1330, 1635, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198 ]
2.5
28
#!/usr/bin/env python import os from typing import Any import pytest import tcod as libtcod @pytest.mark.filterwarnings("ignore") if __name__ == "__main__": test_parser()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 28686, 198, 6738, 19720, 1330, 4377, 198, 198, 11748, 12972, 9288, 198, 198, 11748, 256, 19815, 355, 9195, 83, 19815, 628, 198, 31, 9078, 9288, 13, 4102, 13, 24455, 40539, ...
2.757576
66
# Copyright (c) 2019-present, HuggingFace Inc. # All rights reserved. This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. import json import logging import os import tarfile import tempfile import torch from pytorch_pretrained_bert import cac...
[ 2, 15069, 357, 66, 8, 13130, 12, 25579, 11, 12905, 2667, 32388, 3457, 13, 198, 2, 1439, 2489, 10395, 13, 770, 2723, 2438, 318, 11971, 739, 262, 347, 10305, 12, 7635, 5964, 1043, 287, 262, 198, 2, 38559, 24290, 2393, 287, 262, 6808, ...
2.521564
2,481
import numpy as np import cv2 from core.config import cfg import utils.blob as blob_utils import roi_data.rpn def get_minibatch_blob_names(is_training=True): """Return blob names in the order in which they are read by the data loader. """ # data blob: holds a batch of N images, each with 3 channels b...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 269, 85, 17, 198, 198, 6738, 4755, 13, 11250, 1330, 30218, 70, 198, 11748, 3384, 4487, 13, 2436, 672, 355, 44812, 62, 26791, 198, 11748, 686, 72, 62, 7890, 13, 81, 21999, 628, 198, 4299, 65...
2.112711
2,014
import sys, os class Extractor: ''' Returns the variable name if a variable with the value <value> is found. ''' ''' Scans a list of <lines> containing CSS and returns a list of strings containing the rendered LESS version. ''' ''' Returns the output for the v...
[ 11748, 25064, 11, 28686, 198, 198, 4871, 29677, 273, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 16409, 262, 7885, 1438, 611, 257, 7885, 351, 198, 220, 220, 220, 262, 1988, 1...
1.965096
573
import unittest import numpy as np from auv_models import linear_surge, diagonal_slow_without_g from helper import degrees_to_quat_rotation if __name__ == "__main__": unittest.main()
[ 11748, 555, 715, 395, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 257, 14795, 62, 27530, 1330, 14174, 62, 11793, 469, 11, 40039, 62, 38246, 62, 19419, 62, 70, 198, 6738, 31904, 1330, 7370, 62, 1462, 62, 421, 265, 62, 10...
2.838235
68
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import argparse import requests import json from dateutil.parser import parse from lxml import html if __name__ == '__main__': arg_parser = argparse.ArgumentParser( description='Download videos from ZDF media library.') arg_parser...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 1822, 29572, 198, 198, 11748, 7007, 198, 11748, 33918, 198, 198, 6738, ...
2.619444
360
import os import yaml import tempfile import json import sys import copy from collections import namedtuple import pytest from mock import patch from aeon_ztp.bin import aztp_os_selector dev_data = { 'os_name': 'cumulus-vx', 'vendor': 'cumulus', 'hw_part_number': '1234', 'hostname': 'cumulus', 'f...
[ 11748, 28686, 198, 11748, 331, 43695, 198, 11748, 20218, 7753, 198, 11748, 33918, 198, 11748, 25064, 198, 11748, 4866, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 11748, 12972, 9288, 198, 6738, 15290, 1330, 8529, 198, 198, 6738, 257, 23...
2.226415
1,431
import unittest from lymph.core.monitoring.metrics import RawMetric from lymph.core.monitoring.aggregator import Aggregator
[ 11748, 555, 715, 395, 198, 198, 6738, 28837, 13, 7295, 13, 41143, 278, 13, 4164, 10466, 1330, 16089, 9171, 1173, 198, 6738, 28837, 13, 7295, 13, 41143, 278, 13, 9460, 2301, 1352, 1330, 19015, 2301, 1352, 628, 628 ]
3.368421
38
#! /usr/bin/env python # -*- coding: utf-8 -*- # vim:fenc=utf-8 # # Copyright © 2017 eelium <eelium@eez008> # # Distributed under terms of the MIT license. import random """ parameters """ # The window refresh rate REFRESH_INTERVAL = 50 # the ground size margin_left = 100 margin_right = 100 margin_top = 100 margin_b...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 43907, 25, 69, 12685, 28, 40477, 12, 23, 198, 2, 198, 2, 15069, 10673, 2177, 304, 417, 1505, 1279, 68, 417, ...
1.956541
2,209
from django.contrib.auth.decorators import login_required from django.contrib.auth.mixins import LoginRequiredMixin from django.contrib.auth.models import User from django.core.exceptions import PermissionDenied, SuspiciousOperation from django.db import transaction from django.db.utils import IntegrityError from djang...
[ 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 12501, 273, 2024, 1330, 17594, 62, 35827, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 19816, 1040, 1330, 23093, 37374, 35608, 259, 198, 6738, 42625, 14208, 13, 3642, 822, 13, ...
2.22077
19,047
#coding=utf-8 import os import math #from tqdm import tqdm def lsp(x,y,th,mv_red_th,mv_green_th):#x与y为五人机绝对坐标系,后二者为mv返回大致角度值(为绝对坐标系中y轴方向顺时针转动角度) ''' ''' times=30#雷达扫描次数 num_data_line=600#雷达数据行数 data_ls = [[round(0.6 * x,2),0] for x in range(num_data_line)]#创建存储雷达数据的数组 error_rang...
[ 2, 66, 7656, 28, 40477, 12, 23, 198, 11748, 28686, 198, 11748, 10688, 628, 198, 2, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 198, 4299, 300, 2777, 7, 87, 11, 88, 11, 400, 11, 76, 85, 62, 445, 62, 400, 11, 76, 85, 62, ...
1.504891
1,840
# ------------------------------------------------------------------------ # Copyright (c) 2021 megvii-model. All Rights Reserved. # ------------------------------------------------------------------------ # Modified from BasicSR (https://github.com/xinntao/BasicSR) # Copyright 2018-2020 BasicSR Authors # -------------...
[ 2, 16529, 982, 198, 2, 15069, 357, 66, 8, 33448, 17243, 85, 4178, 12, 19849, 13, 1439, 6923, 33876, 13, 198, 2, 16529, 982, 198, 2, 40499, 422, 14392, 12562, 357, 5450, 1378, 12567, 13, 785, 14, 87, 259, 429, 5488, 14, 26416, 1256...
3.728395
324
a = [1,2,3,1,2,3] l = 0 m = 0 h = len(a)-1 while(m<=h): if(a[m]==1): a[l],a[m] = a[m],a[l] l+=1 m+=1 elif(a[m]==2): m+=1 else: a[h],a[m] = a[m],a[h] h-=1 print a
[ 64, 796, 685, 16, 11, 17, 11, 18, 11, 16, 11, 17, 11, 18, 60, 201, 198, 75, 796, 657, 201, 198, 76, 796, 657, 201, 198, 71, 796, 18896, 7, 64, 13219, 16, 201, 198, 4514, 7, 76, 27, 28, 71, 2599, 201, 198, 197, 361, 7, 64...
1.276316
152
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2014 The Plaso Project Authors. # Please see the AUTHORS file for details on individual authors. # # 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, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 1946, 383, 1345, 292, 78, 4935, 46665, 13, 198, 2, 4222, 766, 262, 37195, 20673, 2393, 329, 3307, 319, 1...
3.052548
1,884
"""Provide pytest fixtures for the entire test suite. These fixtures create data and data modules that can be reused by other tests. Their construction relies heavily on the utility functions provided in `utils/scripts.py`. """ import copy import imgaug.augmenters as iaa from omegaconf import ListConfig, OmegaConf i...
[ 37811, 15946, 485, 12972, 9288, 34609, 329, 262, 2104, 1332, 18389, 13, 198, 198, 4711, 34609, 2251, 1366, 290, 1366, 13103, 326, 460, 307, 46823, 416, 584, 5254, 13, 5334, 198, 9979, 2762, 16507, 7272, 319, 262, 10361, 5499, 2810, 287,...
2.491923
2,600
from .utils import load_query
[ 6738, 764, 26791, 1330, 3440, 62, 22766, 198 ]
3.75
8
import datetime import os import platform import pytest import subprocess import sys import uuid sys.path.insert(0, 'src') from cosalib import cmdlib PY_MAJOR, PY_MINOR, PY_PATCH = platform.python_version_tuple() def test_run_verbose(): """ Verify run_verbose returns expected information """ result...
[ 11748, 4818, 8079, 198, 11748, 28686, 198, 11748, 3859, 198, 11748, 12972, 9288, 198, 11748, 850, 14681, 198, 11748, 25064, 198, 11748, 334, 27112, 198, 198, 17597, 13, 6978, 13, 28463, 7, 15, 11, 705, 10677, 11537, 198, 198, 6738, 8615...
2.319095
1,592
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distrib...
[ 2, 46424, 347, 43312, 38644, 38559, 24290, 9878, 11290, 46424, 198, 2, 198, 2, 220, 770, 1430, 318, 1479, 3788, 26, 345, 460, 17678, 4163, 340, 290, 14, 273, 198, 2, 220, 13096, 340, 739, 262, 2846, 286, 262, 22961, 3611, 5094, 1378...
3.195531
358
import setuptools, sys, os with open("README.rst", "r") as fh: long_description = fh.read() # The wce triage is designed to work with Ubuntu 18.04LTS and after # that comes with Python 3.6. python_version = sys.version_info need_python_version = (3, 6) if python_version < need_python_version: raise RuntimeError...
[ 11748, 900, 37623, 10141, 11, 25064, 11, 28686, 198, 198, 4480, 1280, 7203, 15675, 11682, 13, 81, 301, 1600, 366, 81, 4943, 355, 277, 71, 25, 198, 220, 890, 62, 11213, 796, 277, 71, 13, 961, 3419, 198, 198, 2, 383, 266, 344, 1333,...
2.348066
543
""" The `dicts` module provides a set of utility functions to simplify dict operations """ # Copyright 2022 the original author or authors (i.e.: St4rG00se for Dev4py). # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtai...
[ 37811, 198, 464, 4600, 11600, 82, 63, 8265, 3769, 257, 900, 286, 10361, 5499, 284, 30276, 8633, 4560, 198, 37811, 198, 198, 2, 15069, 33160, 262, 2656, 1772, 393, 7035, 357, 72, 13, 68, 11207, 520, 19, 81, 38, 405, 325, 329, 6245, ...
2.933333
1,875
from rest_framework import serializers from django.contrib.auth.models import User from snippets.models import Contact from snippets.models import Snippet from snippets.serializers import ContactSerializer
[ 6738, 1334, 62, 30604, 1330, 11389, 11341, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 6738, 45114, 13, 27530, 1330, 14039, 198, 6738, 45114, 13, 27530, 1330, 5489, 3974, 316, 198, 6738, 45114, 13, 46...
4.404255
47
# -*- coding: utf-8 -*- """ hskl Classification Module Data I/O conventions X: (DimX, DimY, NumSpectralChannels) <np.array> Y: (DimX, DimY) <np.array,dtype=uint8> 0 - ignored 1 - first label 2 - second label ... """ # Author: Qian Cao # License: BSD 3-Clause import numpy as np from sklearn.utils ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 71, 8135, 75, 198, 198, 9487, 2649, 19937, 198, 198, 6601, 314, 14, 46, 21396, 198, 55, 25, 357, 29271, 55, 11, 14048, 56, 11, 31835, 49738, 1373, 1...
2.459964
1,124
from datetime import date, timedelta from random import uniform from numpy import ndarray def polygen(*coefficients): '''Polynomial generating function''' if not coefficients: return lambda i: 0 else: c0 = coefficients[0] coefficients = coefficients[1:] ...
[ 6738, 4818, 8079, 1330, 3128, 11, 28805, 12514, 201, 198, 6738, 4738, 1330, 8187, 201, 198, 201, 198, 6738, 299, 32152, 1330, 299, 67, 18747, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 4299, 7514, 5235, 46...
2.455882
136
#!/usr/bin/env python3 import re import sys import argparse import asyncio import json from os import environ from typing import List from pprint import pprint import logging import subprocess from urllib.parse import urlparse from aiohttp import ClientSession, ClientError import requests from bs4 import BeautifulSoup...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 302, 198, 11748, 25064, 198, 11748, 1822, 29572, 198, 11748, 30351, 952, 198, 11748, 33918, 198, 6738, 28686, 1330, 551, 2268, 198, 6738, 19720, 1330, 7343, 198, 6738, 279, 47...
2.625538
1,394
""" .. module:: BEST :platform: Unix, linux, Windows .. moduleauthor:: Sunkyu Kim <sunkyu-kim@korea.ac.kr> ================================ Biomedical Entity Query API v2 ================================ API Description ================ This API is for use of BEST(Biomedical Entity Search Tool) in various purposes....
[ 37811, 198, 492, 8265, 3712, 38502, 198, 220, 220, 220, 1058, 24254, 25, 33501, 11, 32639, 11, 3964, 198, 492, 8265, 9800, 3712, 3825, 2584, 84, 6502, 1279, 19155, 2584, 84, 12, 74, 320, 31, 74, 46215, 13, 330, 13, 38584, 29, 198, ...
2.308866
3,147
import io import unittest import unittest.mock from haste.benchmarking import log
[ 11748, 33245, 198, 11748, 555, 715, 395, 198, 11748, 555, 715, 395, 13, 76, 735, 198, 198, 6738, 36797, 13, 26968, 4102, 278, 1330, 2604, 628 ]
3.230769
26
from RandomBot.MainCog import *
[ 6738, 14534, 20630, 13, 13383, 34, 519, 1330, 1635, 198 ]
3.2
10
# coding: utf-8 # In[1]: import sys sys.path.append("../../examples") from full_adder import FullAdder from magma import * # In[2]: T = Bits(4) # In[3]: from magma.simulator import PythonSimulator from magma.bit_vector import BitVector simulator = PythonSimulator(Adder4) simulator.set_value(Adder4.a, BitVe...
[ 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 554, 58, 16, 5974, 628, 198, 11748, 25064, 198, 17597, 13, 6978, 13, 33295, 7203, 40720, 40720, 1069, 12629, 4943, 198, 6738, 1336, 62, 26676, 1330, 6462, 2782, 1082, 198, 6738, 2153...
2.615044
226
# Space: O(1) # Time: O(n) # Recursive approach # Definition for singly-linked list. # class ListNode: # def __init__(self, x): # self.val = x # self.next = None
[ 198, 2, 4687, 25, 440, 7, 16, 8, 198, 2, 3862, 25, 440, 7, 77, 8, 198, 198, 2, 3311, 30753, 3164, 198, 198, 2, 30396, 329, 1702, 306, 12, 25614, 1351, 13, 198, 2, 1398, 7343, 19667, 25, 198, 2, 220, 220, 220, 220, 825, 11593...
2.186047
86
import errno import logging import os import shutil import stat import sys from typing import TYPE_CHECKING from dvc.exceptions import DvcException if TYPE_CHECKING: from dvc.types import StrPath logger = logging.getLogger(__name__) def path_isin(child: "StrPath", parent: "StrPath") -> bool: """Check ...
[ 11748, 11454, 3919, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 11748, 1185, 198, 11748, 25064, 198, 6738, 19720, 1330, 41876, 62, 50084, 2751, 198, 198, 6738, 288, 28435, 13, 1069, 11755, 1330, 360, 28435, 16922, 19...
3.005882
170
''' Figure utilities. ''' from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import types import matplotlib.pyplot as plt from matplotlib.figure import Figure from matplotlib.backends.backend_agg import FigureCanvasAgg import six from io i...
[ 7061, 6, 11291, 20081, 13, 705, 7061, 198, 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, 11748, 299, 32152, 355, 45941, 198, ...
2.433519
1,617
""" Java Backend Format Strings The following section lists format strings for the Java backend, and can/ should be updated as the text API to the Stanford Portable Library changes. The strings are marked using keyword format syntax, which can be expanded by keyword in Python """ # Platform::filelib_fileExists # Platf...
[ 37811, 198, 29584, 5157, 437, 18980, 4285, 654, 198, 198, 464, 1708, 2665, 8341, 5794, 13042, 329, 262, 7349, 30203, 11, 290, 460, 14, 198, 21754, 307, 6153, 355, 262, 2420, 7824, 284, 262, 13863, 44685, 10074, 2458, 13, 198, 464, 130...
2.612779
6,996
# coding=utf-8 import urllib import re from proxy import Proxy from .basespider import BaseSpider from bs4 import BeautifulSoup
[ 2, 19617, 28, 40477, 12, 23, 198, 198, 11748, 2956, 297, 571, 198, 11748, 302, 198, 198, 6738, 15741, 1330, 38027, 198, 6738, 764, 65, 1386, 79, 1304, 1330, 7308, 41294, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 628 ]
3.195122
41
from tracardi.service.storage.elastic_client import ElasticClient from tracardi.service.storage.factory import storage_manager from tracardi.domain.storage_result import StorageResult from tracardi.service.storage.index import resources
[ 6738, 491, 330, 22490, 13, 15271, 13, 35350, 13, 417, 3477, 62, 16366, 1330, 48567, 11792, 198, 6738, 491, 330, 22490, 13, 15271, 13, 35350, 13, 69, 9548, 1330, 6143, 62, 37153, 198, 6738, 491, 330, 22490, 13, 27830, 13, 35350, 62, ...
3.934426
61
#!/usr/bin/env python3 # Copyright (c) Yugabyte, 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 ag...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 15069, 357, 66, 8, 25554, 37828, 11, 3457, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 407, 779, ...
3.421512
344
""" GoogleViews: /s(earch) <term> /i(mage) <term> youtube urls """ from ..utils import media_sender import requests, urllib
[ 37811, 198, 220, 220, 220, 3012, 7680, 82, 25, 198, 220, 220, 220, 1220, 82, 7, 3679, 8, 1279, 4354, 29, 198, 220, 220, 220, 1220, 72, 7, 25561, 8, 1279, 4354, 29, 198, 220, 220, 220, 35116, 2956, 7278, 198, 198, 37811, 198, 673...
2.366667
60
import subprocess from glob import glob from os.path import join import numpy as np import seisflows.seistools.specfem3d as solvertools from seisflows.seistools.shared import getpar, setpar from seisflows.tools import unix from seisflows.tools.code import exists from seisflows.tools.config import SeisflowsParameter...
[ 198, 11748, 850, 14681, 198, 6738, 15095, 1330, 15095, 198, 6738, 28686, 13, 6978, 1330, 4654, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 384, 271, 44041, 13, 325, 396, 10141, 13, 4125, 12993, 368, 18, 67, 355, 1540, 18...
2.090261
1,684
""" TensorMONK :: loss :: utils """ __all__ = ["compute_n_embedding", "compute_top15", "one_hot", "one_hot_idx", "hard_negative_mask"] import torch import numpy as np @torch.no_grad() @torch.no_grad() @torch.no_grad() @torch.no_grad() def hard_negative_mask(prediction: torch.Tensor, ...
[ 37811, 309, 22854, 27857, 42, 7904, 2994, 7904, 3384, 4487, 37227, 198, 198, 834, 439, 834, 796, 14631, 5589, 1133, 62, 77, 62, 20521, 12083, 1600, 366, 5589, 1133, 62, 4852, 1314, 1600, 366, 505, 62, 8940, 1600, 366, 505, 62, 8940, ...
2.327399
1,292
''' The module linear.py provides the linear preparation analogous of parallelize.py. ''' from qiskit import * from qiskit.circuit import Parameter def get_measurement_circ(n, qregname, cregname, full_measurement=True): ''' Creates a measurement circuit that can toggle between measuring the first control...
[ 7061, 6, 198, 464, 8265, 14174, 13, 9078, 3769, 262, 14174, 198, 3866, 1845, 341, 34657, 286, 10730, 1096, 13, 9078, 13, 198, 7061, 6, 198, 198, 6738, 10662, 1984, 270, 1330, 1635, 198, 6738, 10662, 1984, 270, 13, 21170, 5013, 1330, ...
2.443396
1,590
import time import unittest import sqlalchemy as _sqla import sqlalchemy.orm as _sqla_orm from .. import models
[ 11748, 640, 198, 11748, 555, 715, 395, 198, 198, 11748, 44161, 282, 26599, 355, 4808, 31166, 5031, 198, 11748, 44161, 282, 26599, 13, 579, 355, 4808, 31166, 5031, 62, 579, 198, 198, 6738, 11485, 1330, 4981, 628, 628, 198 ]
3.025641
39
#!/usr/bin/env python # coding=utf-8 # Created by JTProgru # Date: 2019-08-13 # https://jtprog.ru/ __author__ = 'jtprogru' __version__ = '0.0.1' __author_email__ = 'mail@jtprog.ru' import twitter import dotenv as d from pathlib import Path from speedtest import Speedtest import json env = d.get_variables(str(Path(__...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 28, 40477, 12, 23, 198, 2, 15622, 416, 449, 51, 2964, 48929, 198, 2, 7536, 25, 13130, 12, 2919, 12, 1485, 198, 2, 3740, 1378, 73, 83, 1676, 70, 13, 622, 14, 198, 198, ...
2.413279
738
"""Caching utilities for the merge-counts command line tool.""" import glob import os import json import tempfile from pathlib import Path from typing import Dict, Optional from logzero import logger from . import errors CACHE_POINTER_LOCATION = Path.home() / ".mergecounts-cache" class DNAnexusFileCache: """A...
[ 37811, 34, 8103, 20081, 329, 262, 20121, 12, 9127, 82, 3141, 1627, 2891, 526, 15931, 198, 198, 11748, 15095, 198, 11748, 28686, 198, 11748, 33918, 198, 11748, 20218, 7753, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 19720, 1330, 360, ...
2.71504
2,653
# Connor Sanders # 10/16/2017 # Yahoo Finance Web Scraper # Tested on python 2.7 and 3.5 # Returns a JSON File containing financial statement data for a given company or list of companies # How to use this script: # Make sure you have the PhantomJS Driver set up. If you need the manually add the path, go to...
[ 2, 27599, 5831, 201, 198, 2, 838, 14, 1433, 14, 5539, 201, 198, 201, 198, 2, 16551, 15007, 5313, 1446, 38545, 201, 198, 2, 6208, 276, 319, 21015, 362, 13, 22, 290, 513, 13, 20, 201, 198, 2, 16409, 257, 19449, 9220, 7268, 3176, 2...
2.840308
908
#!/usr/bin/env python import argparse import numpy as np import rospy import message_filters from message_filters import TimeSynchronizer from ros_x_habitat.msg import PointGoalWithGPSCompass, DepthImage from sensor_msgs.msg import Image from cv_bridge import CvBridge import cv2 from PIL import Image as PILImage from n...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 1822, 29572, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 686, 2777, 88, 198, 11748, 3275, 62, 10379, 1010, 198, 6738, 3275, 62, 10379, 1010, 1330, 3862, 50, 24871, 7509, 198, ...
1.958217
10,363
# ================================================== # # DASHBOARD # # ================================================== # # Author: Brady Hammond # # Created: 05/04/2018 # # Last Edited: ...
[ 2, 46111, 4770, 28, 1303, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 360, 11211, 8202, 9795, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
2.331868
455
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import locale from PySide2.QtCore import Qt, QTranslator from PySide2.QtGui import QGuiApplication, QIcon, QFont from scihubeva.scihubeva_dialog import SciHubEVADialog from scihubeva.utils import * import scihubeva.resources if hasattr(Qt, 'AA_Enab...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 36693, 198, 198, 6738, 9485, 24819, 17, 13, 48, 83, 14055, 1330, 3373...
2.391473
516
# A basic script to remove any part of the configuration that is described in "hassci" #Open the file with open(r'configuration.yaml', 'r') as file: data = file.read() # Open ignore file with open('.hass_ci') as ignore_file: # Open ignore file and replace matches line by line for search_t...
[ 2, 317, 4096, 4226, 284, 4781, 597, 636, 286, 262, 8398, 326, 318, 3417, 287, 366, 71, 562, 979, 1, 198, 198, 2, 11505, 262, 2393, 198, 4480, 1280, 7, 81, 6, 11250, 3924, 13, 88, 43695, 3256, 705, 81, 11537, 355, 2393, 25, 198, ...
2.824468
188
import platform import doctest import unittest from nose.tools import assert_raises from urlblocks import urlblocks as urlblocks_module from urlblocks import URL from urlblocks.six import text_type, u, print_ def dictsort(d): """``repr()`` a dictionary with sorted key/value pairs, for doctests.""" items = so...
[ 11748, 3859, 198, 11748, 10412, 395, 198, 11748, 555, 715, 395, 198, 198, 6738, 9686, 13, 31391, 1330, 6818, 62, 430, 2696, 198, 6738, 19016, 27372, 1330, 19016, 27372, 355, 19016, 27372, 62, 21412, 198, 6738, 19016, 27372, 1330, 10289, ...
2.957143
140
import json import re from collections import OrderedDict, defaultdict import cchardet import requests from colorama import Fore from selenium import webdriver from toapi.cache import CacheSetting from toapi.log import logger from toapi.server import Server from toapi.settings import Settings from toapi.storage impor...
[ 11748, 33918, 198, 11748, 302, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 11, 4277, 11600, 198, 198, 11748, 269, 30215, 316, 198, 11748, 7007, 198, 6738, 3124, 1689, 1330, 4558, 198, 6738, 384, 11925, 1505, 1330, 3992, 26230, 198, 19...
2.095332
3,042
""" Exercise 2 Write a program to look for lines of the form New Revision: 39772 And extract the number from each of the lines using a regular expression and the findall() method. Compute the average of the numbers and print out the average. Enter file:mbox.txt 38549.7949721 Enter file:mbox-short.txt 39756.9259259 ""...
[ 37811, 198, 3109, 23697, 362, 220, 220, 198, 16594, 257, 1430, 284, 804, 329, 3951, 286, 262, 1296, 198, 3791, 46604, 25, 5014, 43571, 198, 1870, 7925, 262, 1271, 422, 1123, 286, 262, 3951, 1262, 257, 3218, 5408, 290, 198, 1169, 1064,...
2.874372
199
########################################################################### # Imports ########################################################################### # Standard library imports import argparse import time as time import numpy as np import math as math import matplotlib.pyplot as plt from matplotlib import p...
[ 29113, 29113, 7804, 21017, 198, 2, 1846, 3742, 198, 29113, 29113, 7804, 21017, 198, 2, 8997, 5888, 17944, 198, 11748, 1822, 29572, 198, 11748, 640, 355, 640, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 10688, 355, 10688, 198, 11748, ...
2.252322
4,415
from .devices import data_parallel, empty_cache, find, move_to_device, CPU, GPU
[ 6738, 764, 42034, 1330, 1366, 62, 1845, 29363, 11, 6565, 62, 23870, 11, 1064, 11, 1445, 62, 1462, 62, 25202, 11, 9135, 11, 11362 ]
3.291667
24
## ## ## Interface to allow remote kerberos authentication via Multiplexor ## ## ## ## ## ## TODO: RPC auth type is not implemented or tested!!!! from msldap.authentication.spnego.asn1_structs import KRB5Token from msldap.authentication.kerberos.gssapi import get_gssapi, GSSWrapToken, KRB5_MECH_INDEP_TOKEN from min...
[ 198, 2235, 220, 198, 2235, 198, 2235, 26491, 284, 1249, 6569, 41927, 527, 418, 18239, 2884, 20401, 87, 273, 198, 2235, 220, 198, 2235, 198, 2235, 198, 2235, 198, 2235, 198, 2235, 16926, 46, 25, 39400, 6284, 2099, 318, 407, 9177, 393, ...
3.024691
243
#!/usr/bin/python # Copyright: (c) 2020, Tatsuya Naganawa <tatsuyan201101@gmail.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = { 'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community' } DOCUMENTATION = ''' --- mo...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 2, 15069, 25, 357, 66, 8, 12131, 11, 309, 19231, 3972, 399, 7329, 6909, 1279, 83, 19231, 4121, 1264, 8784, 31, 14816, 13, 785, 29, 198, 2, 22961, 3611, 5094, 13789, 410, 18, 13, 15, ...
2.552632
874
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. #-------------------------------------------------------------------...
[ 2, 10097, 32501, 198, 2, 15069, 357, 66, 8, 2321, 532, 33160, 11, 1052, 330, 13533, 11, 3457, 1539, 290, 347, 2088, 71, 25767, 669, 13, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 383, 1336, 5964, 318, 287, 262, 2393, 38559, ...
7.364017
239
import unittest from ..sdk import Client, Results from . import config if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 6738, 11485, 21282, 74, 1330, 20985, 11, 15691, 198, 6738, 764, 1330, 4566, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3419, 198 ]
2.880952
42
from django.test import TestCase from django.test import override_settings @override_settings(ES_ENABLED=False)
[ 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 42625, 14208, 13, 9288, 1330, 20957, 62, 33692, 628, 198, 31, 2502, 13154, 62, 33692, 7, 1546, 62, 1677, 6242, 30465, 28, 25101, 8, 198 ]
3.257143
35
import hashlib import os import shutil from concurrent.futures import ThreadPoolExecutor, as_completed from contextlib import suppress from functools import wraps from typing import List, Any, Union from funcy import contextmanager from toolz import keyfilter logger = None def ensure_directory(directory, force_rec...
[ 11748, 12234, 8019, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 6738, 24580, 13, 69, 315, 942, 1330, 14122, 27201, 23002, 38409, 11, 355, 62, 785, 16838, 198, 6738, 4732, 8019, 1330, 18175, 198, 6738, 1257, 310, 10141, 1330, 27521, 1...
2.494426
1,525
from refactor.default_interface import DefaultHandler from refactor.tilde_essentials.example import Example from refactor.tilde_essentials.leaf_strategy import LeafBuilder from refactor.tilde_essentials.splitter import Splitter from refactor.tilde_essentials.stop_criterion import StopCriterion from refactor.tilde_essen...
[ 6738, 1006, 11218, 13, 12286, 62, 39994, 1330, 15161, 25060, 198, 6738, 1006, 11218, 13, 83, 44725, 62, 408, 14817, 13, 20688, 1330, 17934, 198, 6738, 1006, 11218, 13, 83, 44725, 62, 408, 14817, 13, 33201, 62, 2536, 4338, 1330, 14697, ...
3.715
200
from identixone.base.choices import Conf
[ 6738, 1852, 844, 505, 13, 8692, 13, 6679, 1063, 1330, 7326, 628 ]
3.5
12
#!/usr/bin/python import argparse import collections import json import math import os import struct import sys ANGLE_FACTOR = 2 * math.pi / 40000.0 SPEED_FACTOR = 1 / 1000.0 if __name__ == '__main__': main()
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 11748, 1822, 29572, 198, 11748, 17268, 198, 11748, 33918, 198, 11748, 10688, 198, 11748, 28686, 198, 11748, 2878, 198, 11748, 25064, 198, 198, 15567, 2538, 62, 37, 10659, 1581, 796, 362, 1...
2.708861
79
#!/usr/env/bin python3 # Copyright 2017 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 ...
[ 2, 48443, 14629, 14, 24330, 14, 8800, 21015, 18, 198, 198, 2, 15069, 2177, 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,...
2.069452
1,771