content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
import hashlib import mimetypes from urllib.parse import unquote from django.conf import settings from django.core.exceptions import ValidationError from django.db import models from django.http import HttpResponseRedirect from django.template.loader import render_to_string from django.urls import reverse from django....
[ 11748, 12234, 8019, 198, 11748, 17007, 2963, 12272, 198, 6738, 2956, 297, 571, 13, 29572, 1330, 555, 22708, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 7295, 13, 1069, 11755, 1330, 3254, 24765, 12331,...
2.763217
2,213
# -*-coding utf-8 -*- ########################################################################## # # Copyright (c) 2022 Baidu.com, 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 th...
[ 2, 532, 9, 12, 66, 7656, 3384, 69, 12, 23, 532, 9, 12, 198, 29113, 29113, 7804, 2235, 198, 2, 198, 2, 15069, 357, 66, 8, 33160, 347, 1698, 84, 13, 785, 11, 3457, 13, 1439, 6923, 33876, 198, 2, 198, 2, 49962, 739, 262, 24843, ...
3.923077
260
# -*- coding: utf-8 -*- # # This file is part of menRva. # Copyright (C) 2018-present NU,FSM,GHSL. # # menRva is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """Test terms views.py""" from cd2h_repo_project.modules.terms.views import ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 770, 2393, 318, 636, 286, 1450, 49, 6862, 13, 198, 2, 15069, 357, 34, 8, 2864, 12, 25579, 399, 52, 11, 10652, 44, 11, 38, 7998, 43, 13, 198, 2, 198, ...
2.845528
123
import webbrowser import wikipedia import requests def test_site(search: str): """please enter site name with http information""" try: r = requests.get(search) except Exception as error: print(error) return "site not working" if r.status_code == 200: print("site wo...
[ 11748, 3992, 40259, 198, 11748, 47145, 11151, 198, 11748, 7007, 198, 198, 4299, 1332, 62, 15654, 7, 12947, 25, 965, 2599, 198, 220, 220, 220, 37227, 29688, 3802, 2524, 1438, 351, 2638, 1321, 37811, 198, 220, 220, 220, 1949, 25, 198, 2...
2.632353
136
import string from timeit import itertools s1 = '315c4eeaa8b5f8aaf9174145bf43e1784b8fa00dc71d885a804e5ee9fa40b16349c146fb778cdf2d3aff021dfff5b403b510d0d0455468aeb98622b137dae857553ccd8883a7bc37520e06e515d22c954eba5025b8cc57ee59418ce7dc6bc41556bdb36bbca3e8774301fbcaa3b83b220809560987815f65286764703de0f3d524400a19b15961...
[ 11748, 4731, 198, 6738, 640, 270, 1330, 340, 861, 10141, 198, 198, 82, 16, 796, 705, 27936, 66, 19, 1453, 7252, 23, 65, 20, 69, 23, 64, 1878, 24, 22985, 18781, 19881, 3559, 68, 1558, 5705, 65, 23, 13331, 405, 17896, 4869, 67, 4423...
1.712115
2,633
# -*- coding: utf-8 -*- """Classes (Python) to compute the Bandit UCB (Upper Confidence Bound) arm allocation and choosing the arm to pull next. See :mod:`moe.bandit.bandit_interface` for further details on bandit. """ import copy from abc import abstractmethod from moe.bandit.bandit_interface import BanditInterfac...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 9487, 274, 357, 37906, 8, 284, 24061, 262, 10243, 270, 14417, 33, 357, 52, 2848, 7326, 1704, 30149, 8, 3211, 20157, 290, 11236, 262, 3211, 284, 2834, 1306, 13, ...
2.6
615
import Hedge while True: text = input('Hedge > ') if text.strip() == "": continue result, error = Hedge.run('<stdin>', text) if (error): print(error.asString()) elif result: if len(result.elements) == 1: print(repr(result.elements[0])) else: print(repr(result))
[ 11748, 41078, 201, 198, 201, 198, 4514, 6407, 25, 201, 198, 197, 5239, 796, 5128, 10786, 39, 14907, 1875, 705, 8, 201, 198, 197, 361, 2420, 13, 36311, 3419, 6624, 366, 1298, 201, 198, 197, 197, 43043, 201, 198, 197, 20274, 11, 4049,...
2.225564
133
import numpy as np from yt.geometry.selection_routines import GridSelector from yt.utilities.io_handler import BaseIOHandler from yt.utilities.logger import ytLogger as mylog from yt.utilities.on_demand_imports import _h5py as h5py _convert_mass = ("particle_mass", "mass") _particle_position_names = {}
[ 11748, 299, 32152, 355, 45941, 198, 198, 6738, 331, 83, 13, 469, 15748, 13, 49283, 62, 81, 448, 1127, 1330, 24846, 17563, 273, 198, 6738, 331, 83, 13, 315, 2410, 13, 952, 62, 30281, 1330, 7308, 9399, 25060, 198, 6738, 331, 83, 13, ...
2.836364
110
#!/usr/bin/env python3 """ cidr_enum.py is a very simple tool to help enumerate IP ranges when being used with other tools """ import argparse import netaddr if __name__ == '__main__': main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 37811, 198, 66, 312, 81, 62, 44709, 13, 9078, 318, 257, 845, 2829, 2891, 284, 1037, 27056, 378, 6101, 16069, 618, 852, 973, 351, 584, 4899, 198, 37811, 198, 198, 11748, 1822...
3.015385
65
# model settings model = dict( type='Semi_AppSup_TempSup_SimCLR_Crossclip_PTV_Recognizer3D', backbone=dict( type='ResNet3d', depth=18, pretrained=None, pretrained2d=False, norm_eval=False, conv_cfg=dict(type='Conv3d'), norm_cfg=dict(type='SyncBN', requires...
[ 2, 2746, 6460, 198, 19849, 796, 8633, 7, 198, 220, 220, 220, 2099, 11639, 13900, 72, 62, 4677, 40784, 62, 30782, 40784, 62, 8890, 5097, 49, 62, 21544, 15036, 62, 47, 6849, 62, 6690, 2360, 7509, 18, 35, 3256, 198, 220, 220, 220, 32...
2.195473
3,402
#!/usr/bin/python2.7 # Python 2.7 version by Alex Eames of http://RasPi.TV # functionally equivalent to the Gertboard dtoa test by Gert Jan van Loo & Myra VanInwegen # Use at your own risk - I'm pretty sure the code is harmless, but check it yourself. # This will not work unless you have installed py-spidev as in the ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 17, 13, 22, 198, 2, 11361, 362, 13, 22, 2196, 416, 4422, 412, 1047, 286, 2638, 1378, 49, 292, 38729, 13, 6849, 220, 198, 2, 48410, 7548, 284, 262, 402, 861, 3526, 288, 1462, 64, 1332, 416, 4...
2.652174
1,127
# -*- coding: utf-8 -*- import sublime from . import blame from . import templates
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 41674, 198, 198, 6738, 764, 1330, 8138, 198, 6738, 764, 1330, 24019, 628, 198 ]
2.965517
29
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.test import TestCase
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 628, 628 ]
2.805556
36
# import logging # import hercules.lib.util.hercules_logging as l # from hercules.lib.util import sso as sso import opencv2 as cv2 import urllib import numpy as np # log = l.setup_logging(__name__) if __name__ == "__main__": main()
[ 2, 1330, 18931, 198, 2, 1330, 607, 13930, 13, 8019, 13, 22602, 13, 372, 13930, 62, 6404, 2667, 355, 300, 198, 2, 422, 607, 13930, 13, 8019, 13, 22602, 1330, 264, 568, 355, 264, 568, 198, 11748, 1280, 33967, 17, 355, 269, 85, 17, ...
2.637363
91
from rest_framework.exceptions import APIException from rest_framework import status
[ 6738, 1334, 62, 30604, 13, 1069, 11755, 1330, 7824, 16922, 198, 6738, 1334, 62, 30604, 1330, 3722, 628, 628, 628, 198 ]
4.333333
21
#!/usr/bin/env python3 # Crypto trading bot using binance api # Author: LeonardoM011<Leonardo.leo.201@gmail.com> # Created on 2021-02-05 21:56 # Set constants here: DELTA_TIME = 300 # How long can we check for setting up new trade (in seconds) # ---------------------- # Imports: import os import sys...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 201, 198, 201, 198, 2, 36579, 7313, 10214, 1262, 9874, 590, 40391, 201, 198, 2, 6434, 25, 38083, 44, 28555, 27, 36185, 13109, 13, 293, 78, 13, 1264, 31, 14816, 13, 785, 29, 201, 198...
2.792035
226
# -*- coding: utf-8 -*- """Plotting.py for notebook 01_Exploring_DM_Halos This python file contains all the functions used for plotting graphs and maps in the 1st notebook (.ipynb) of the repository: 01. Exploring parameters in DM halos and sub-halos Script written by: Soumya Shreeram Project supervised by Johan Com...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 43328, 889, 13, 9078, 329, 20922, 5534, 62, 18438, 3255, 62, 23127, 62, 40202, 418, 198, 198, 1212, 21015, 2393, 4909, 477, 262, 5499, 973, 329, 29353, 28770, 290...
2.293013
5,696
# Licensed to Modin Development Team under one or more contributor license agreements. # See the NOTICE file distributed with this work for additional information regarding # copyright ownership. The Modin Development Team licenses this file to you under the # Apache License, Version 2.0 (the "License"); you may not u...
[ 2, 49962, 284, 3401, 259, 7712, 4816, 739, 530, 393, 517, 18920, 5964, 11704, 13, 198, 2, 4091, 262, 28536, 2393, 9387, 351, 428, 670, 329, 3224, 1321, 5115, 198, 2, 6634, 9238, 13, 220, 383, 3401, 259, 7712, 4816, 16625, 428, 2393,...
3.471519
316
import matplotlib.pyplot as plt import random import pickle from skimage.transform import rotate from scipy import ndimage from skimage.util import img_as_ubyte from joblib import Parallel, delayed from sklearn.ensemble.forest import _generate_unsampled_indices from sklearn.ensemble.forest import _generate_sample_indic...
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 4738, 198, 11748, 2298, 293, 198, 6738, 1341, 9060, 13, 35636, 1330, 23064, 198, 6738, 629, 541, 88, 1330, 299, 67, 9060, 198, 6738, 1341, 9060, 13, 22602, 1330, 337...
2.970425
541
import numpy as np import pandas as pd from sklearn.base import BaseEstimator, TransformerMixin, clone from sklearn_pandas.util import validate_dataframe
[ 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 1341, 35720, 13, 8692, 1330, 7308, 22362, 320, 1352, 11, 3602, 16354, 35608, 259, 11, 17271, 198, 6738, 1341, 35720, 62, 79, 392, 292, 13, 22602, 1330, 26...
3.291667
48
import pytest from CommonServerPython import * from ProofpointThreatResponse import create_incident_field_context, get_emails_context, pass_sources_list_filter, \ pass_abuse_disposition_filter, filter_incidents, prepare_ingest_alert_request_body, \ get_incidents_batch_by_time_request, get_new_incidents, get_tim...
[ 11748, 12972, 9288, 198, 6738, 8070, 10697, 37906, 1330, 1635, 198, 6738, 29999, 4122, 817, 630, 31077, 1330, 2251, 62, 1939, 738, 62, 3245, 62, 22866, 11, 651, 62, 368, 1768, 62, 22866, 11, 1208, 62, 82, 2203, 62, 4868, 62, 24455, ...
2.168624
4,258
import sys import os import json from enum import Enum from .mach_o import LC_SYMTAB from macholib import MachO from macholib import mach_o from shutil import copy2 from shutil import SameFileError def replace_methname(macho_file, methname_json, output_dir): """ Map method names in Mach-O file with the JSO...
[ 11748, 25064, 198, 11748, 28686, 198, 11748, 33918, 198, 6738, 33829, 1330, 2039, 388, 198, 198, 6738, 764, 76, 620, 62, 78, 1330, 22228, 62, 23060, 44, 5603, 33, 198, 6738, 3235, 349, 571, 1330, 7080, 46, 198, 6738, 3235, 349, 571, ...
2.386194
536
#!/usr/bin/env python import math import numpy as np
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 10688, 198, 11748, 299, 32152, 355, 45941 ]
2.944444
18
# Copyright 2021 Google LLC # # 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 writing, ...
[ 2, 15069, 33448, 3012, 11419, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, 743, 733...
3.073022
493
""" Disjoint set. Reference: https://en.wikipedia.org/wiki/Disjoint-set_data_structure """ def make_set(x: Node) -> None: """ Make x as a set. """ # rank is the distance from x to its' parent # root's rank is 0 x.rank = 0 x.parent = x def union_set(x: Node, y: Node) -> None: ...
[ 37811, 198, 220, 220, 220, 3167, 73, 1563, 900, 13, 198, 220, 220, 220, 20984, 25, 3740, 1378, 268, 13, 31266, 13, 2398, 14, 15466, 14, 7279, 73, 1563, 12, 2617, 62, 7890, 62, 301, 5620, 198, 37811, 628, 198, 198, 4299, 787, 62, ...
2.118454
802
# Timothy Keller # S = 1/2, I = 1/2 # Spin 1/2 electron coupled to spin 1/2 nuclei import numpy as np from scipy.linalg import expm from matplotlib.pylab import * from matplotlib import cm sigma_x = 0.5*np.r_[[[0, 1],[1, 0]]] sigma_y = 0.5*np.r_[[[0,-1j],[1j, 0]]] sigma_z = 0.5*np.r_[[[1, 0],[0, -1]]] Identity = np.e...
[ 2, 22283, 35999, 198, 2, 311, 796, 352, 14, 17, 11, 314, 796, 352, 14, 17, 198, 2, 28002, 352, 14, 17, 11538, 18064, 284, 7906, 352, 14, 17, 17751, 72, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 13, 75, ...
1.835092
758
from spiderNest.preIntro import * path_ = os.path.dirname(os.path.dirname(__file__)) + '/dataBase/log_information.csv' def save_login_info(VMess, class_): """ VMess class_: ssr or v2ray """ now = str(datetime.now()).split('.')[0] with open(path_, 'a', encoding='utf-8', newline='') as f: ...
[ 6738, 19230, 45, 395, 13, 3866, 5317, 305, 1330, 1635, 198, 198, 6978, 62, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 4008, 1343, 31051, 7890, 14881, 14, 6404, 62, 17018, 13, 40664, ...
1.861163
533
# Copyright (c) 2021 PaddlePaddle 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 appli...
[ 2, 15069, 357, 66, 8, 33448, 350, 37382, 47, 37382, 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...
2.23781
8,347
import os.path import re import sys import traceback from pprint import pformat import tornado from tornado import template SENSITIVE_SETTINGS_RE = re.compile( 'api|key|pass|salt|secret|signature|token', flags=re.IGNORECASE )
[ 11748, 28686, 13, 6978, 198, 11748, 302, 198, 11748, 25064, 198, 11748, 12854, 1891, 198, 6738, 279, 4798, 1330, 279, 18982, 198, 11748, 33718, 198, 198, 6738, 33718, 1330, 11055, 628, 198, 50, 16938, 2043, 9306, 62, 28480, 51, 20754, 6...
2.811765
85
___assign("%SeqIter", SeqIter) ___assign("%iter", iter) ___assign("%next", next) ___assign("%FuncIter", FuncIter)
[ 198, 17569, 562, 570, 7203, 4, 4653, 80, 29993, 1600, 1001, 80, 29993, 8, 198, 198, 17569, 562, 570, 7203, 4, 2676, 1600, 11629, 8, 198, 198, 17569, 562, 570, 7203, 4, 19545, 1600, 1306, 8, 198, 198, 17569, 562, 570, 7203, 4, 37, ...
2.269231
52
from lite_content.lite_internal_frontend.open_general_licences import ( OGEL_DESCRIPTION, OGTCL_DESCRIPTION, OGTL_DESCRIPTION, ) from lite_forms.components import Option
[ 6738, 300, 578, 62, 11299, 13, 36890, 62, 32538, 62, 8534, 437, 13, 9654, 62, 24622, 62, 677, 3007, 1330, 357, 198, 220, 220, 220, 34498, 3698, 62, 30910, 40165, 11, 198, 220, 220, 220, 34498, 4825, 43, 62, 30910, 40165, 11, 198, ...
2.772727
66
# -*- coding: utf-8 -*- """RotateMatrix.ipynb Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/1LX-dZFuQCyBXDNVosTp0MHaZZxoc5T4I """ #Function to rotate matrix by 90 degree if __name__ == '__main__': #Declaring matrix mat = [ [1, 2, 3, ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 24864, 378, 46912, 13, 541, 2047, 65, 198, 198, 38062, 4142, 7560, 416, 1623, 4820, 2870, 13, 198, 198, 20556, 2393, 318, 5140, 379, 198, 220, 220, 220, 3740, 1...
2.038627
233
xs = [1, 3, 2, 4, 5, 2] sorted_xs = quicksort(xs)
[ 198, 198, 34223, 796, 685, 16, 11, 513, 11, 362, 11, 604, 11, 642, 11, 362, 60, 198, 82, 9741, 62, 34223, 796, 627, 3378, 419, 7, 34223, 8, 198 ]
1.733333
30
# Copyright IBM Corp. 2016 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 a...
[ 198, 2, 15069, 19764, 11421, 13, 1584, 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, ...
3.030812
2,142
''' Created on Mar 6, 2018 @author: cef hp functions for workign with dictionaries ''' import logging, os, sys, math, copy, inspect from collections import OrderedDict from weakref import WeakValueDictionary as wdict import numpy as np import hp.basic mod_logger = logging.getLogger(__name__) #...
[ 7061, 6, 201, 198, 41972, 319, 1526, 718, 11, 2864, 201, 198, 201, 198, 31, 9800, 25, 269, 891, 201, 198, 201, 198, 24831, 5499, 329, 670, 570, 351, 48589, 3166, 201, 198, 7061, 6, 201, 198, 11748, 18931, 11, 28686, 11, 25064, 11,...
2.266687
3,296
import os import random try: from colorama import Fore, Style except ModuleNotFoundError: os.system("pip install colorama") from urllib.request import urlopen from Core.helper.color import green, white, blue, red, start, alert Version = "2.2" yellow = ("\033[1;33;40m") all_col = [Style.BRIGHT + Fore.RED, Style....
[ 11748, 28686, 198, 11748, 4738, 198, 28311, 25, 198, 197, 6738, 3124, 1689, 1330, 4558, 11, 17738, 198, 16341, 19937, 3673, 21077, 12331, 25, 198, 197, 418, 13, 10057, 7203, 79, 541, 2721, 3124, 1689, 4943, 628, 198, 6738, 2956, 297, ...
2.556054
223
#!/usr/bin/env python # # Copyright 2019-2020 Flavio Garcia # Copyright 2016-2017 Veeti Paananen under MIT License # # 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...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 2, 15069, 13130, 12, 42334, 33026, 952, 18555, 198, 2, 15069, 1584, 12, 5539, 8016, 316, 72, 11243, 27870, 268, 739, 17168, 13789, 198, 2, 198, 2, 49962, 739, 262, 24843, 137...
3.652344
256
"""PyTorch policy class used for Simple Q-Learning""" import logging from typing import Dict, Tuple import gym import ray from ray.rllib.agents.dqn.simple_q_tf_policy import ( build_q_models, compute_q_values, get_distribution_inputs_and_class) from ray.rllib.models.modelv2 import ModelV2 from ray.rllib.models.to...
[ 37811, 20519, 15884, 354, 2450, 1398, 973, 329, 17427, 1195, 12, 41730, 37811, 198, 198, 11748, 18931, 198, 6738, 19720, 1330, 360, 713, 11, 309, 29291, 198, 198, 11748, 11550, 198, 11748, 26842, 198, 6738, 26842, 13, 81, 297, 571, 13, ...
2.509254
1,783
#Grapheme Rime_tone=[ "a","","","e","","i","o","","","u","","y","i","oa","o","oe","oo","u","u","u","u","uy","","uy","y", #blank "","","","","","","","","","","","","i","a","o","e","o","u","u","u","","y","","uy","y", #grave "o", "o","o", ...
[ 2, 38, 2416, 258, 1326, 201, 198, 49, 524, 62, 41527, 41888, 220, 220, 220, 366, 64, 2430, 2430, 2430, 68, 2430, 2430, 72, 2430, 78, 2430, 2430, 2430, 84, 2430, 2430, 88, 2430, 72, 2430, 12162, 2430, 78, 2430, 2577, 2430, 2238, 24...
1.5528
26,250
__author__ = 'Dmitry Golubkov' from django.contrib.sessions.base_session import AbstractBaseSession from django.contrib.sessions.backends.db import SessionStore as DBStore
[ 834, 9800, 834, 796, 705, 35, 2781, 563, 26849, 549, 21862, 6, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 82, 6202, 13, 8692, 62, 29891, 1330, 27741, 14881, 36044, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 82, 6202, 13, 1891...
3.240741
54
import unittest #write the import for function for assignment7 sum_list_values from src.assignments.assignment7 import sum_list_values #unittest.main(verbosity=2)
[ 11748, 555, 715, 395, 198, 2, 13564, 262, 1330, 329, 2163, 329, 16237, 22, 2160, 62, 4868, 62, 27160, 198, 6738, 12351, 13, 562, 570, 902, 13, 562, 16747, 22, 1330, 2160, 62, 4868, 62, 27160, 198, 198, 2, 403, 715, 395, 13, 12417,...
3.215686
51
# Copyright 2018 by Kurt Griffiths # # 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 writ...
[ 2, 15069, 2864, 416, 20642, 30469, 82, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921,...
2.985258
407
from arm.logicnode.arm_nodes import *
[ 6738, 3211, 13, 6404, 291, 17440, 13, 1670, 62, 77, 4147, 1330, 1635 ]
2.846154
13
import inspect import json import uuid from collections import Counter from datetime import datetime from io import StringIO import mock from django.contrib.admin.utils import NestedObjects from django.db import transaction, IntegrityError from django.db.models.signals import post_delete, post_save from django.test im...
[ 11748, 10104, 198, 11748, 33918, 198, 11748, 334, 27112, 198, 6738, 17268, 1330, 15034, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 33245, 1330, 10903, 9399, 198, 198, 11748, 15290, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 2848...
2.66484
1,095
import pytest import numpy as np from numpy.testing import assert_allclose from keras import backend as K from keras import activations def get_standard_values(): ''' These are just a set of floats used for testing the activation functions, and are useful in multiple tests. ''' return np.array([[...
[ 11748, 12972, 9288, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 299, 32152, 13, 33407, 1330, 6818, 62, 439, 19836, 198, 198, 6738, 41927, 292, 1330, 30203, 355, 509, 198, 6738, 41927, 292, 1330, 1753, 602, 628, 198, 4299, 651, 62, ...
2.455894
1,281
#import numpy #import os #from xml.etree.ElementTree import * import tables #from Xdmf import * if __name__ == '__main__': from optparse import OptionParser usage = "" parser = OptionParser(usage=usage) parser.add_option("-n","--size", help="number of processors for run", ...
[ 198, 198, 2, 11748, 299, 32152, 198, 2, 11748, 28686, 198, 2, 6738, 35555, 13, 316, 631, 13, 20180, 27660, 1330, 1635, 198, 11748, 8893, 198, 2, 6738, 1395, 36020, 69, 1330, 1635, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 124...
1.775796
785
# # PySNMP MIB module CISCO-TRUSTSEC-POLICY-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-TRUSTSEC-POLICY-MIB # Produced by pysmi-0.3.4 at Wed May 1 12:14:36 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3....
[ 2, 198, 2, 9485, 15571, 7378, 337, 9865, 8265, 36159, 8220, 12, 5446, 7759, 23683, 12, 45472, 2149, 56, 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, 1...
2.815111
36,438
# -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # # Copyright 2018-2019 Fetch.AI Limited # # 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 ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 16529, 26171, 198, 2, 198, 2, 220, 220, 15069, 2864, 12, 23344, 376, 7569, 13, 20185, 15302, 198, 2, 198, 2, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 3...
3.794776
268
""" sphinx.ext.napoleon ~~~~~~~~~~~~~~~~~~~ Support for NumPy and Google style docstrings. :copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from sphinx import __display_version__ as __version__ from sphinx.application import Sphinx from ...
[ 37811, 198, 220, 220, 220, 599, 20079, 87, 13, 2302, 13, 77, 499, 25637, 198, 220, 220, 220, 220, 27156, 4907, 93, 628, 220, 220, 220, 7929, 329, 31835, 20519, 290, 3012, 3918, 2205, 37336, 13, 628, 220, 220, 220, 1058, 22163, 4766,...
2.464746
2,950
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from rdkit import DataStructs import plugin_api __license__ = "X11"
[ 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, 33918, 198, 6738, 374, 67, 15813, 1330, 6060, 44909, 82, 198, 11748, 13877, 62, 15042, 198, 198, 834, 43085...
2.529412
51
# coding: utf-8 import time from config.config_loader import global_config from mall_spider.spiders.actions.context import Context from mall_spider.spiders.actions.direct_proxy_action import DirectProxyAction __proxy_service = None
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 11748, 640, 198, 198, 6738, 4566, 13, 11250, 62, 29356, 1330, 3298, 62, 11250, 198, 6738, 17374, 62, 2777, 1304, 13, 2777, 4157, 13, 4658, 13, 22866, 1330, 30532, 198, 6738, 17374, 62, 2777, 1304...
3.470588
68
import os import weather import datetime import unittest import tempfile if __name__ == '__main__': unittest.main()
[ 11748, 28686, 198, 11748, 6193, 198, 11748, 4818, 8079, 198, 11748, 555, 715, 395, 198, 11748, 20218, 7753, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3419, 198 ]
2.95122
41
import asyncio
[ 11748, 30351, 952, 198 ]
3.75
4
""" This example shows how to evaluate DeepCT (using Anserini) in BEIR. For more details on DeepCT, refer here: https://arxiv.org/abs/1910.10687 The original DeepCT repository is not modularised and only works with Tensorflow 1.x (1.15). We modified the DeepCT repository to work with Tensorflow latest (2.x). We do not...
[ 37811, 198, 1212, 1672, 2523, 703, 284, 13446, 10766, 4177, 357, 3500, 1052, 2655, 5362, 8, 287, 9348, 4663, 13, 198, 1890, 517, 3307, 319, 10766, 4177, 11, 3522, 994, 25, 3740, 1378, 283, 87, 452, 13, 2398, 14, 8937, 14, 1129, 940,...
2.504507
3,106
# Engineering Mechanics: Statics, 4th Edition # Bedford and Fowler # Problem 6.64 # Units for this model are meters and kilonewtons # Import 'FEModel3D' and 'Visualization' from 'PyNite' from PyNite import FEModel3D from PyNite import Visualization # Create a new model truss = FEModel3D() # Define the nodes truss.Ad...
[ 2, 14044, 47570, 25, 5133, 873, 11, 604, 400, 5061, 198, 2, 41540, 290, 33693, 198, 2, 20647, 718, 13, 2414, 198, 2, 27719, 329, 428, 2746, 389, 10700, 290, 8769, 44181, 27288, 198, 198, 2, 17267, 705, 37, 3620, 375, 417, 18, 35, ...
2.685053
1,124
import yagmail receiver = "your@gmail.com" #Receiver's gmail address body = "Hello there from Yagmail" filename = "document.pdf" yag = yagmail.SMTP("my@gmail.com")#Your gmail address yag.send( to=receiver, subject="Yagmail test (attachment included", contents=body, attachments=filename, )...
[ 11748, 331, 363, 4529, 201, 198, 201, 198, 260, 39729, 796, 366, 14108, 31, 14816, 13, 785, 1, 1303, 3041, 39729, 338, 308, 4529, 2209, 201, 198, 2618, 796, 366, 15496, 612, 422, 575, 363, 4529, 1, 201, 198, 34345, 796, 366, 22897, ...
2.515625
128
############################################################################## # # Copyright (c) 2003-2020 by The University of Queensland # http://www.uq.edu.au # # Primary Business: Queensland, Australia # Licensed under the Apache License, version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # # Development unt...
[ 198, 29113, 29113, 7804, 4242, 2235, 198, 2, 198, 2, 15069, 357, 66, 8, 5816, 12, 42334, 416, 383, 2059, 286, 21105, 198, 2, 2638, 1378, 2503, 13, 84, 80, 13, 15532, 13, 559, 198, 2, 198, 2, 21087, 7320, 25, 21105, 11, 4505, 198...
3.200803
498
from bosonstar.ComplexBosonStar import Complex_Boson_Star # ===================== # All imporntnat definitions # ===================== # Physics defintions phi0 = 0.40 # centeral phi D = 5.0 # Dimension (total not only spacial) Lambda = -0.2 # Cosmological constant # Solver definitions Rst...
[ 6738, 37284, 261, 7364, 13, 5377, 11141, 33, 418, 261, 8248, 1330, 19157, 62, 33, 418, 261, 62, 8248, 628, 198, 2, 36658, 1421, 198, 2, 220, 1439, 848, 273, 429, 32353, 17336, 198, 2, 36658, 1421, 198, 198, 2, 23123, 825, 600, 507...
2.783042
401
#!/usr/bin/env python # coding=utf-8 from setuptools import setup, find_packages with open('README.md', encoding='utf-8') as f: readme = f.read() with open('LICENSE', encoding='utf-8') as f: license = f.read() with open('requirements.txt', encoding='utf-8') as f: reqs = f.read() pkgs = [p for p in find_...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 28, 40477, 12, 23, 198, 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 198, 4480, 1280, 10786, 15675, 11682, 13, 9132, 3256, 21004, 11639, 40477, 12, 23, 1153...
2.503145
318
# flake8: noqa """ Ory APIs Documentation for all public and administrative Ory APIs. Administrative APIs can only be accessed with a valid Personal Access Token. Public APIs are mostly used in browsers. # noqa: E501 The version of the OpenAPI document: v0.0.1-alpha.187 Contact: support@ory.sh ...
[ 2, 781, 539, 23, 25, 645, 20402, 198, 198, 37811, 198, 220, 220, 220, 440, 563, 23113, 628, 220, 220, 220, 43925, 329, 477, 1171, 290, 11553, 440, 563, 23113, 13, 30048, 23113, 460, 691, 307, 17535, 351, 257, 4938, 15644, 8798, 2913...
3.339844
256
from abc import ABC, abstractmethod from typing import Tuple from requests import Response from .pydantic_models import (AppliedExclusionConditionsResponse, BiasAttributeConfigListResponse, ComputeRewardResponse, DefaultPredictionResponse, ...
[ 6738, 450, 66, 1330, 9738, 11, 12531, 24396, 198, 6738, 19720, 1330, 309, 29291, 198, 198, 6738, 7007, 1330, 18261, 198, 198, 6738, 764, 79, 5173, 5109, 62, 27530, 1330, 357, 4677, 18511, 3109, 4717, 25559, 1756, 31077, 11, 198, 220, ...
2.623839
646
from __future__ import print_function, unicode_literals #Ensures Unicode is used for all strings. my_str = 'whatever' #Shows the String type, which should be unicode type(my_str) #declare string: ip_addr = '192.168.1.1' #check it with boolean:(True) ip_addr == '192.168.1.1' #(false) ip_addr == '10.1.1.1' #is this su...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 11, 28000, 1098, 62, 17201, 874, 198, 198, 2, 4834, 82, 942, 34371, 318, 973, 329, 477, 13042, 13, 198, 1820, 62, 2536, 796, 705, 39664, 6, 198, 2, 2484, 1666, 262, 10903, 2099, 11, 5...
2.695341
279
#enhanced keyboard driver import copy import os import configparser from pp_displaymanager import DisplayManager if __name__ == '__main__': from tkinter import * root = Tk() w = Label(root, text="pp_kbddriver_plus.py test harness") w.pack() idd=pp_kbddriver_plus() reason,message=idd...
[ 2, 16550, 2903, 10586, 4639, 198, 11748, 4866, 198, 11748, 28686, 198, 11748, 4566, 48610, 198, 6738, 9788, 62, 13812, 37153, 1330, 16531, 13511, 628, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 22...
2.507317
205
# Generated by Django 3.2.6 on 2021-09-03 15:48 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 21, 319, 33448, 12, 2931, 12, 3070, 1315, 25, 2780, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
#!/usr/bin/env python # Copyright 1996-2019 Cyberbotics Ltd. # # 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 applica...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 15069, 8235, 12, 23344, 15101, 13645, 873, 12052, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, ...
2.293046
1,208
""" test local env """ import os for k, v in os.environ.iteritems(): print k, '=', v
[ 37811, 198, 9288, 1957, 17365, 198, 37811, 198, 198, 11748, 28686, 198, 198, 1640, 479, 11, 410, 287, 28686, 13, 268, 2268, 13, 2676, 23814, 33529, 198, 220, 220, 220, 3601, 479, 11, 705, 28, 3256, 410, 628 ]
2.421053
38
"""This file contains code for use with "Think Stats", by Allen B. Downey, available from greenteapress.com Copyright 2014 Allen B. Downey License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html """ from __future__ import print_function, division import bisect import numpy as np import pandas as pd import scipy.sta...
[ 37811, 1212, 2393, 4909, 2438, 329, 779, 351, 366, 22073, 20595, 1600, 198, 1525, 9659, 347, 13, 5588, 2959, 11, 1695, 422, 10536, 21872, 499, 601, 13, 785, 198, 198, 15269, 1946, 9659, 347, 13, 5588, 2959, 198, 34156, 25, 22961, 3864...
2.128797
12,182
from __future__ import absolute_import, division, print_function from six.moves import range from dials.array_family import flex import math
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 198, 6738, 2237, 13, 76, 5241, 1330, 2837, 198, 6738, 5980, 82, 13, 18747, 62, 17989, 1330, 7059, 198, 11748, 10688, 198 ]
3.916667
36
import py import inspect from rpython.rlib.objectmodel import compute_hash, compute_identity_hash from rpython.translator.c import gc from rpython.annotator import model as annmodel from rpython.rtyper.llannotation import SomePtr from rpython.rtyper.lltypesystem import lltype, llmemory, rffi, llgroup from rpython.memo...
[ 11748, 12972, 198, 11748, 10104, 198, 198, 6738, 374, 29412, 13, 81, 8019, 13, 15252, 19849, 1330, 24061, 62, 17831, 11, 24061, 62, 738, 414, 62, 17831, 198, 6738, 374, 29412, 13, 7645, 41880, 13, 66, 1330, 308, 66, 198, 6738, 374, ...
3.572464
276
from . import utils from . import display from . import save from . import FFTW from . import stackregistration __version__="0.2.1"
[ 6738, 764, 1330, 3384, 4487, 198, 6738, 764, 1330, 3359, 198, 6738, 764, 1330, 3613, 198, 6738, 764, 1330, 376, 9792, 54, 198, 6738, 764, 1330, 8931, 2301, 33397, 198, 198, 834, 9641, 834, 2625, 15, 13, 17, 13, 16, 1 ]
3.219512
41
# Copyright The PyTorch Lightning team. # # 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 i...
[ 2, 15069, 383, 9485, 15884, 354, 12469, 1074, 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, 1...
3.625498
251
import numpy as np import unittest from pydlm.modeler.trends import trend from pydlm.modeler.seasonality import seasonality from pydlm.modeler.builder import builder from pydlm.base.kalmanFilter import kalmanFilter if __name__ == '__main__': unittest.main()
[ 11748, 299, 32152, 355, 45941, 198, 11748, 555, 715, 395, 198, 198, 6738, 279, 5173, 75, 76, 13, 19849, 263, 13, 83, 10920, 82, 1330, 5182, 198, 6738, 279, 5173, 75, 76, 13, 19849, 263, 13, 6230, 1483, 1330, 1622, 1483, 198, 6738, ...
2.770833
96
from arcapix.fs.gpfs.policy import PlacementPolicy from arcapix.fs.gpfs.rule import MigrateRule # load placement policy for mmfs1 policy = PlacementPolicy('mmfs1') # create a new migrate rule for 'sata1' r = MigrateRule(source='sata1', threshold=(90, 50)) # add rule to start of the policy policy.rules.insert(r, 0) ...
[ 6738, 10389, 499, 844, 13, 9501, 13, 31197, 9501, 13, 30586, 1330, 1345, 5592, 36727, 198, 6738, 10389, 499, 844, 13, 9501, 13, 31197, 9501, 13, 25135, 1330, 337, 42175, 31929, 198, 198, 2, 3440, 13127, 2450, 329, 8085, 9501, 16, 198,...
2.982906
117
#!/usr/bin/env python3 import sys depths = list(map(int, sys.stdin)) increased = [a > b for (a, b) in zip(depths[1:], depths[:-1])] print(sum(increased))
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 25064, 198, 198, 10378, 9998, 796, 1351, 7, 8899, 7, 600, 11, 25064, 13, 19282, 259, 4008, 198, 198, 24988, 839, 796, 685, 64, 1875, 275, 329, 357, 64, 11, 275, 8, ...
2.289855
69
from flask import Blueprint, request, render_template, \ flash, g, session, redirect, url_for, jsonify from app import db, requires_auth from flask_cors import CORS from .models import Paste import uuid from datetime import datetime from app.user.models import User from pygments import highlight from pygments.lexers i...
[ 6738, 42903, 1330, 39932, 11, 2581, 11, 8543, 62, 28243, 11, 3467, 198, 197, 34167, 11, 308, 11, 6246, 11, 18941, 11, 19016, 62, 1640, 11, 33918, 1958, 198, 6738, 598, 1330, 20613, 11, 4433, 62, 18439, 198, 6738, 42903, 62, 66, 669,...
2.420571
1,750
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This script run neural network model on a camera live stream """ import argparse import cv2 import numpy as np import os import time import sys COMMANDS = {0: "move_forward", 1: "go_down", 2: "rot_10_deg", 3: "go_up", 4: "take_off", 5: "land", 6: "idle"}...
[ 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, 1212, 4226, 1057, 17019, 3127, 2746, 319, 257, 4676, 2107, 4269, 198, 37811, 198, 198, 11748, 1822, 29...
2.241379
551
""" Classification of pixels in images using color and other features. General pipeline usage: 1. Load and segment images (img_utils.py) 2. Prepare training data (label_image.py) 3. Train classifier or cluster data (sklearn KMeans, MeanShift, SVC, etc.) 4. Predict labels on new image or directory (classify_directory(...
[ 37811, 198, 9487, 2649, 286, 17848, 287, 4263, 1262, 3124, 290, 584, 3033, 13, 198, 198, 12218, 11523, 8748, 25, 198, 198, 16, 13, 8778, 290, 10618, 4263, 357, 9600, 62, 26791, 13, 9078, 8, 198, 17, 13, 43426, 3047, 1366, 357, 18242...
2.531935
2,145
from allennlp.common import JsonDict from allennlp.data import DatasetReader, Instance from allennlp.models import Model from allennlp.predictors import Predictor from overrides import overrides
[ 6738, 477, 1697, 34431, 13, 11321, 1330, 449, 1559, 35, 713, 198, 6738, 477, 1697, 34431, 13, 7890, 1330, 16092, 292, 316, 33634, 11, 2262, 590, 198, 6738, 477, 1697, 34431, 13, 27530, 1330, 9104, 198, 6738, 477, 1697, 34431, 13, 79, ...
3.563636
55
# Created on Sep 7, 2020 # author: Hosein Hadipour # contact: hsn.hadipour@gmail.com import os output_dir = os.path.curdir def skinnytk2(R=1): """ This function generates the relations of Skinny-n-n for R rounds. tk ================================================> TWEAKEY_P(t...
[ 2, 15622, 319, 8621, 767, 11, 12131, 198, 2, 1772, 25, 367, 577, 259, 11161, 541, 454, 198, 2, 2800, 25, 289, 16184, 13, 18108, 541, 454, 31, 14816, 13, 785, 198, 198, 11748, 28686, 198, 198, 22915, 62, 15908, 796, 28686, 13, 6978...
1.866367
1,781
import pytest from bmipy import Bmi
[ 11748, 12972, 9288, 198, 198, 6738, 275, 76, 541, 88, 1330, 347, 11632, 628, 628 ]
2.666667
15
from scrapy_compose.utils.context import realize from .field import FuncField as BaseField
[ 198, 6738, 15881, 88, 62, 785, 3455, 13, 26791, 13, 22866, 1330, 6537, 198, 6738, 764, 3245, 1330, 11138, 66, 15878, 355, 7308, 15878, 198 ]
3.68
25
import urllib.request import json from .models import News # Getting api key api_key = None # Getting the movie base url base_url = None def get_news_source(country,category): ''' Function that gets the json response to our url request ''' get_news_source_url = base_url.format(country,category,api_key)...
[ 11748, 2956, 297, 571, 13, 25927, 198, 11748, 33918, 198, 6738, 764, 27530, 1330, 3000, 198, 2, 18067, 40391, 1994, 198, 15042, 62, 2539, 796, 6045, 198, 2, 18067, 262, 3807, 2779, 19016, 198, 8692, 62, 6371, 796, 6045, 198, 198, 4299...
2.693262
564
import numpy as np from hypernet.src.general import const from hypernet.src.general import utils from hypernet.src.thermophysicalModels.reactionThermo.mixture import Basic
[ 11748, 299, 32152, 355, 45941, 198, 198, 6738, 8718, 3262, 13, 10677, 13, 24622, 1330, 1500, 198, 6738, 8718, 3262, 13, 10677, 13, 24622, 1330, 3384, 4487, 198, 6738, 8718, 3262, 13, 10677, 13, 490, 76, 41789, 5841, 1424, 13, 260, 267...
3.48
50
from django.db import models from django.urls import reverse from datetime import date from django.contrib.auth.models import User #! 1 - Import user models MEALS = ( ('B', 'Breakfast'), ('L', 'Lunch'), ('D', 'Dinner') )
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 198, 6738, 4818, 8079, 1330, 3128, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 220, 220, 220, 220, 220, 220, 2...
2.428571
105
""" Kedro plugin for running a project with Airflow """ __version__ = "0.5.0"
[ 37811, 509, 276, 305, 13877, 329, 2491, 257, 1628, 351, 3701, 11125, 37227, 198, 198, 834, 9641, 834, 796, 366, 15, 13, 20, 13, 15, 1, 198 ]
2.925926
27
import play import behavior import main import robocup import constants import time import math ## This isn't a real play, but it's pretty useful # Turn it on and we'll draw the window evaluator stuff on-screen from the ball to our goal
[ 11748, 711, 198, 11748, 4069, 198, 11748, 1388, 198, 11748, 3857, 420, 929, 198, 11748, 38491, 198, 11748, 640, 198, 11748, 10688, 628, 198, 2235, 770, 2125, 470, 257, 1103, 711, 11, 475, 340, 338, 2495, 4465, 198, 2, 6756, 340, 319, ...
3.854839
62
from ...imports import * def stringify_metallicity(Z): """ Convert a metallicity into a PHOENIX-style string. Parameters ---------- Z : float [Fe/H]-style metallicity (= 0.0 for solar) """ if Z <= 0: return "-{:03.1f}".format(np.abs(Z)) else: return "+{:03.1f}"...
[ 6738, 2644, 320, 3742, 1330, 1635, 628, 198, 4299, 4731, 1958, 62, 4164, 439, 8467, 7, 57, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 38240, 257, 1138, 439, 8467, 656, 257, 9370, 46, 1677, 10426, 12, 7635, 4731, 13, 628, ...
2.163399
153
# -*- coding: utf-8 -*-
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 628 ]
1.785714
14
# Copyright 2018 The TensorFlow Probability 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 o...
[ 2, 15069, 2864, 383, 309, 22854, 37535, 30873, 1799, 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, ...
3.773333
300
import dash from flask import Flask from flask.helpers import get_root_path from flask_login import login_required from flask_wtf.csrf import CSRFProtect from flask_admin import Admin, BaseView, expose from flask_admin.contrib.sqla import ModelView from datetime import datetime from dateutil import parser import pytz f...
[ 11748, 14470, 198, 6738, 42903, 1330, 46947, 198, 6738, 42903, 13, 16794, 364, 1330, 651, 62, 15763, 62, 6978, 198, 6738, 42903, 62, 38235, 1330, 17594, 62, 35827, 198, 6738, 42903, 62, 86, 27110, 13, 6359, 41871, 1330, 9429, 32754, 414...
3.688073
109
from __future__ import print_function from scipy.linalg import block_diag from scipy.stats import norm as ndist from scipy.interpolate import interp1d import collections import numpy as np from numpy import log from numpy.linalg import norm, qr, inv, eig import pandas as pd import regreg.api as rr from .randomization...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 629, 541, 88, 13, 75, 1292, 70, 1330, 2512, 62, 10989, 363, 198, 6738, 629, 541, 88, 13, 34242, 1330, 2593, 355, 299, 17080, 198, 6738, 629, 541, 88, 13, 3849, 16104, 378, ...
2.195289
2,632
from __future__ import division import numpy as np na = np.newaxis import collections, itertools import abc from pyhsmm.util.stats import sample_discrete, sample_discrete_from_log, combinedata from pyhsmm.util.general import rle as rle # NOTE: assumes censoring. can make no censoring by adding to score of last # segm...
[ 6738, 11593, 37443, 834, 1330, 7297, 198, 11748, 299, 32152, 355, 45941, 198, 2616, 796, 45941, 13, 3605, 22704, 198, 11748, 17268, 11, 340, 861, 10141, 198, 11748, 450, 66, 198, 198, 6738, 12972, 11994, 3020, 13, 22602, 13, 34242, 1330...
2.892534
884
import six import json import gzip from exporters.default_retries import retry_long from exporters.writers.base_writer import BaseWriter
[ 11748, 2237, 198, 11748, 33918, 198, 11748, 308, 13344, 198, 6738, 1033, 3816, 13, 12286, 62, 1186, 1678, 1330, 1005, 563, 62, 6511, 198, 198, 6738, 1033, 3816, 13, 34422, 13, 8692, 62, 16002, 1330, 7308, 34379, 628 ]
3.657895
38
""" Simple file to validate that maketests is working. Call maketests via: >>> from x7.shell import *; maketests('x7.sample.needs_tests') """
[ 37811, 198, 26437, 2393, 284, 26571, 326, 285, 461, 316, 3558, 318, 1762, 13, 220, 4889, 285, 461, 316, 3558, 2884, 25, 198, 33409, 422, 2124, 22, 13, 29149, 1330, 1635, 26, 285, 461, 316, 3558, 10786, 87, 22, 13, 39873, 13, 50032, ...
2.938776
49
''' Written by: Balazs Valer Fekete fbv81bp@outlook.hu fbv81bp@gmail.com Last updated: 29.01.2021 ''' # the concept is to generate a side channel resistant initialisation of the hashing function based on # one secret key and several openly known initialisation vectors (IV) in a manner that the same input # is n...
[ 7061, 6, 201, 198, 25354, 416, 25, 8528, 1031, 82, 3254, 263, 376, 988, 14471, 277, 65, 85, 6659, 46583, 31, 448, 5460, 13, 13415, 277, 65, 85, 6659, 46583, 31, 14816, 13, 785, 201, 198, 5956, 6153, 25, 2808, 13, 486, 13, 1238, ...
2.826552
1,401
""" graphstar.utils ~~~~~~~~~~~~~~~ Cristian Cornea A simple bedirectional graph with A* and breadth-first pathfinding. Utils are either used by the search algorithm, or when needed :) Pretty self explainatory (I hope) For more information see the examples and tests folder """ def clean_route_list(route_st...
[ 37811, 198, 197, 34960, 7364, 13, 26791, 198, 197, 15116, 8728, 4907, 93, 198, 197, 34, 1585, 666, 2744, 39718, 628, 197, 32, 2829, 3996, 4154, 282, 4823, 351, 317, 9, 290, 32483, 12, 11085, 3108, 41070, 13, 628, 197, 18274, 4487, 3...
2.857143
301
import os def check_env(env_var_name): """ Check and return the type of an environment variable. supported types: None Integer String @param env_var_name: environment variable name @return: string of the type name. """ try: val = os.getenv(env_var_name) ...
[ 11748, 28686, 628, 198, 4299, 2198, 62, 24330, 7, 24330, 62, 7785, 62, 3672, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 6822, 290, 1441, 262, 2099, 286, 281, 2858, 7885, 13, 628, 220, 220, 220, 4855, 3858, 25, 198, 220, ...
2.261803
233
from .models import Sound , Album from rest_framework import serializers
[ 6738, 764, 27530, 1330, 9506, 837, 23999, 198, 6738, 1334, 62, 30604, 1330, 11389, 11341, 198, 220, 220, 220, 220, 220, 220, 220, 220, 628, 628 ]
3.269231
26
from datetime import datetime from django.conf import settings import pytz DEFAULT_TRACKER_POSITIONS = [ ('tracker-head-top', 'Head - near top'), ('tracker-head-bottom', 'Head - near bottom'), ('tracker-body-top', 'Body - near top'), ('tracker-body-bottom', 'Body - near bottom') ] def get_tracker_po...
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 11748, 12972, 22877, 628, 198, 7206, 38865, 62, 5446, 8120, 1137, 62, 37997, 2043, 11053, 796, 685, 198, 220, 220, 220, 19203, 2213, 10735, 12, 225...
2.803965
454
import datetime from fastapi import APIRouter router = APIRouter()
[ 11748, 4818, 8079, 198, 198, 6738, 3049, 15042, 1330, 3486, 4663, 39605, 198, 198, 472, 353, 796, 3486, 4663, 39605, 3419, 628 ]
3.181818
22