content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
""" GRIB - Parcel with Maximum CAPE on Skew-T """ # (C) Copyright 2017- ECMWF. # # This software is licensed under the terms of the Apache Licence Version 2.0 # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. # # In applying this licence, ECMWF does not waive the privileges and immunities # grante...
[ 37811, 198, 38, 7112, 33, 532, 2547, 5276, 351, 22246, 20176, 36, 319, 19460, 86, 12, 51, 198, 37811, 198, 198, 2, 357, 34, 8, 15069, 2177, 12, 13182, 14326, 37, 13, 198, 2, 198, 2, 770, 3788, 318, 11971, 739, 262, 2846, 286, 26...
2.304604
1,694
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
[ 2, 15069, 1853, 383, 309, 22854, 37535, 46665, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, ...
2.329899
5,532
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals import pyflann import utool as ut (print, rrr, profile) = ut.inject2(__name__) class PickleFLANN(pyflann.FLANN): """ Adds the ability to pickle a flann class on a unix system. (Actually, pickle still...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 11, 28000, 1098, 62, 17201, 874, 198, 11748, 12972, 2704, 1236, 198, 11748, 3384, 970, 355,...
2.309237
498
#!/usr/bin/env python # author: Fred Laine # disable SSL verification import ssl import json import requests import urllib3 from pprint import pprint as pp #disable ssl warnings urllib3.disable_warnings() # the configuration elements per switch in arista.conf mcs_config_block = "" # File containing the switches se...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 1772, 25, 8559, 406, 5718, 198, 198, 2, 15560, 25952, 19637, 198, 11748, 264, 6649, 198, 11748, 33918, 198, 11748, 7007, 198, 11748, 2956, 297, 571, 18, 198, 6738, 279, 4798, ...
2.332693
2,083
# -*- coding: utf-8 -*- """Components to keep Grok UI related stuff in a dedicated namespace. """ from zope.site.interfaces import IRootFolder from zope.location import LocationProxy from zope.publisher.browser import applySkin from zope.publisher.interfaces import browser from zope.traversing.interfaces import ITraver...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 7293, 3906, 284, 1394, 10299, 74, 12454, 3519, 3404, 287, 257, 7256, 25745, 13, 198, 37811, 198, 6738, 1976, 3008, 13, 15654, 13, 3849, 32186, 1330, 14826, 1025, ...
2.930556
216
"""Click-based interface for Songpal.""" import ast import asyncio import json import logging import sys from functools import update_wrapper import click from songpal import Device, SongpalException from songpal.common import ProtocolType from songpal.containers import Setting from songpal.discovery import Discover ...
[ 37811, 8164, 12, 3106, 7071, 329, 10940, 18596, 526, 15931, 198, 11748, 6468, 198, 11748, 30351, 952, 198, 11748, 33918, 198, 11748, 18931, 198, 11748, 25064, 198, 6738, 1257, 310, 10141, 1330, 4296, 62, 48553, 198, 198, 11748, 3904, 198,...
2.47407
8,041
import numpy as np import numpy.random as rd import matplotlib.pyplot as plt import seaborn as sns # noqa from itertools import islice from ibm_rng import ibm_rng from pylatex import Plt N = 1000 if __name__ == '__main__': main()
[ 11748, 299, 32152, 355, 45941, 198, 11748, 299, 32152, 13, 25120, 355, 374, 67, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 384, 397, 1211, 355, 3013, 82, 220, 1303, 645, 20402, 198, 6738, 340, 861, 10141...
2.536082
97
from __future__ import print_function import tensorflow as tf if __name__ == "__main__": #TFRecordWriter.iwslt15() TFRecordWriter.segmentation()
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1303, 10234, 23739, 34379, 13, 14246, 82, 2528, 1314, ...
1.826446
121
"""对openid进行加密和解密的操作""" from itsdangerous import BadSignature,TimedJSONWebSignatureSerializer as Serializer
[ 37811, 43380, 117, 9654, 312, 32573, 249, 26193, 234, 27950, 254, 43380, 228, 161, 240, 234, 164, 100, 96, 43380, 228, 21410, 162, 241, 235, 43291, 37811, 201, 198, 6738, 663, 38537, 516, 1330, 7772, 11712, 1300, 11, 14967, 276, 40386, ...
2.134615
52
import numpy as np
[ 11748, 299, 32152, 355, 45941, 628, 198 ]
3
7
import cv2 as cv import numpy as np import xlsxwriter import math import imutils from imutils import contours from imutils import perspective from scipy.spatial import distance as dist import matplotlib.pyplot as plt count = 0 x = np.zeros((10000, 1)) kernel_ed = np.ones((5,5),np.uint8) cap = cv.V...
[ 11748, 269, 85, 17, 355, 269, 85, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 2124, 7278, 87, 16002, 201, 198, 11748, 10688, 201, 198, 11748, 545, 26791, 201, 198, 6738, 545, 26791, 1330, 542, 4662, 201, 198, 6738, 545, ...
2.13933
567
import pygame, sys, math from pygame.locals import * # Using Python 3.9.1 and pygame==2.0.0 pygame.init() pygame.font.init() fonts = {} pygame.mouse.set_visible(False) size = (1400, 900) screen = pygame.display.set_mode(size, RESIZABLE) pygame.display.set_caption("Maths for Game Dev") fps = pyg...
[ 11748, 12972, 6057, 11, 25064, 11, 10688, 201, 198, 6738, 12972, 6057, 13, 17946, 874, 1330, 1635, 220, 201, 198, 201, 198, 2, 8554, 11361, 513, 13, 24, 13, 16, 290, 12972, 6057, 855, 17, 13, 15, 13, 15, 201, 198, 201, 198, 9078, ...
1.909288
5,082
from trakt.interfaces.base import authenticated, Interface from trakt.mapper.sync import SyncMapper
[ 6738, 1291, 21841, 13, 3849, 32186, 13, 8692, 1330, 44529, 11, 26491, 198, 6738, 1291, 21841, 13, 76, 11463, 13, 27261, 1330, 35908, 44, 11463, 628, 628 ]
3.814815
27
from ..utils.estimation import is_inside_polygon # useful to initialize point on a given system and make sure we are inside from ..utils.physics import gaussian import numpy as np def initialize(points:np.ndarray, quantity:int, t:str, params:list): """ Returns a array of new particles described by [x,y,vx,vy,vz] ...
[ 6738, 11485, 26791, 13, 395, 18991, 1330, 318, 62, 48787, 62, 35428, 14520, 1303, 4465, 284, 41216, 966, 319, 257, 1813, 1080, 290, 787, 1654, 356, 389, 2641, 198, 6738, 11485, 26791, 13, 746, 23154, 1330, 31986, 31562, 198, 198, 11748,...
2.636975
1,785
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved from typing import Dict, List import torch import torch.nn.functional as F from torch import nn from detectron2.layers import ShapeSpec from detectron2.utils.registry import Registry from detectron2.modeling.anchor_generator import build_anchor_ge...
[ 2, 15069, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 1439, 6923, 33876, 198, 6738, 19720, 1330, 360, 713, 11, 7343, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 6738, 28034, 1330, 299, 77, 198...
2.329106
1,656
"""" Introduction: JobHopping is a class which is used to predict where a scholar may hop to. Usage: """ import pickle import os import torch import torch.nn as nn import heapq import numpy as np from src.config import model_path import torch.nn.functional as F #调用计算机GPU进行计算 os.environ["CUDA_VISIBLE_DEVICES"] = '0...
[ 15931, 15931, 198, 21906, 25, 198, 220, 220, 220, 15768, 28900, 2105, 318, 257, 1398, 543, 318, 973, 284, 4331, 810, 257, 15606, 743, 1725, 284, 13, 198, 28350, 25, 198, 198, 37811, 198, 11748, 2298, 293, 198, 11748, 28686, 198, 11748...
2.171429
245
# python3 # Copyright 2021 InstaDeep Ltd. 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 applic...
[ 2, 21015, 18, 198, 2, 15069, 33448, 2262, 64, 29744, 12052, 13, 1439, 2489, 10395, 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, 284...
3.072022
361
import bpy from bpy.props import * from ... events import propertyChanged from ... base_types import AnimationNode from .. container_provider import getHelperMaterial from ... algorithms.interpolations import PyInterpolation, CachedInterpolation
[ 11748, 275, 9078, 198, 6738, 275, 9078, 13, 1676, 862, 1330, 1635, 198, 6738, 2644, 2995, 1330, 3119, 31813, 198, 6738, 2644, 2779, 62, 19199, 1330, 23535, 19667, 198, 6738, 11485, 9290, 62, 15234, 1304, 1330, 651, 47429, 17518, 198, 67...
4.133333
60
import tensorflow as tf import numpy as np import pickle def get_mnist(): ''' func to get mnist images dataset from tensorflow site ''' from tensorflow.examples.tutorials.mnist import input_data mnist = input_data.read_data_sets("/tmp/data/", one_hot=True) dataset = dict() dataset["train_im...
[ 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2298, 293, 198, 198, 4299, 651, 62, 10295, 396, 33529, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 25439, 284, 651, 285, 77, 396, 4263, 27039...
2.35706
857
from .route import magic_route from .runtime_collector import runtime_info from .runtime_collector import update_runtime_info from .stubgen import generate_stubs
[ 6738, 764, 38629, 1330, 5536, 62, 38629, 198, 6738, 764, 43282, 62, 33327, 273, 1330, 19124, 62, 10951, 198, 6738, 764, 43282, 62, 33327, 273, 1330, 4296, 62, 43282, 62, 10951, 198, 6738, 764, 301, 549, 5235, 1330, 7716, 62, 301, 2316...
3.767442
43
# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """SQL routines for full-text indexing.""" from ggrc import db from ggrc.fulltext import Indexer class SqlIndexer(Indexer): """SqlIndexer class.""" def records_generator(self, record): """Record ...
[ 2, 15069, 357, 34, 8, 2177, 3012, 3457, 13, 198, 2, 49962, 739, 2638, 1378, 2503, 13, 43073, 13, 2398, 14, 677, 4541, 14, 43, 2149, 24290, 12, 17, 13, 15, 1279, 3826, 38559, 24290, 2393, 29, 198, 198, 37811, 17861, 31878, 329, 133...
2.497561
1,025
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' init_sim.py initialize a new simulation directory structure using `pwd` as the root directory. If there are files present in this directory defined in the directory structure, they will me moved to the corresponding directories command -s: if this parameter reads "silen...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 7061, 6, 198, 15003, 62, 14323, 13, 9078, 198, 36733, 1096, 257, 649, 18640, 8619, 4645, 1262, 4600, 79, 16993, 63, 3...
2.762032
374
import argparse import os from subprocess import check_call import sys import utils parser = argparse.ArgumentParser() parser.add_argument('--parent_dir', default='tests/learning_rate', \ help='Directory containing params.json') parser.add_argument('--data_dir', default='data', \ ...
[ 11748, 1822, 29572, 198, 11748, 28686, 198, 6738, 850, 14681, 1330, 2198, 62, 13345, 198, 11748, 25064, 198, 198, 11748, 3384, 4487, 628, 198, 48610, 796, 1822, 29572, 13, 28100, 1713, 46677, 3419, 198, 48610, 13, 2860, 62, 49140, 10786, ...
2.113342
2,391
"""Provide variant calling with VarScan from TGI at Wash U. http://varscan.sourceforge.net/ """ import os import shutil import contextlib from bcbio import utils from bcbio.distributed.transaction import file_transaction from bcbio.pipeline import config_utils from bcbio.variation import samtools import sh import py...
[ 37811, 15946, 485, 15304, 4585, 351, 12372, 33351, 422, 309, 18878, 379, 22892, 471, 13, 198, 198, 4023, 1378, 85, 945, 5171, 13, 10459, 30293, 13, 3262, 14, 198, 37811, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 11748, 4732, 8019, ...
2.032808
1,524
from django.contrib import admin from .models import Sale # Register your models here. admin.site.register(Sale)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 764, 27530, 1330, 16467, 198, 198, 2, 17296, 534, 4981, 994, 13, 198, 28482, 13, 15654, 13, 30238, 7, 50, 1000, 8, 198 ]
3.454545
33
from .spotify import Spotify10 POLICIES = {} POLICIES['Spotify 1.0'] = Spotify10 def load_policy(name, section): """ Load and return an instance of the policy with the given name. """ try: policy = POLICIES[name] except KeyError: raise Exception('Unsupported policy (' + name + ')'...
[ 6738, 764, 20485, 1958, 1330, 26778, 940, 198, 198, 45472, 2149, 11015, 796, 23884, 198, 45472, 2149, 11015, 17816, 32565, 1958, 352, 13, 15, 20520, 796, 26778, 940, 198, 198, 4299, 3440, 62, 30586, 7, 3672, 11, 2665, 2599, 198, 220, ...
2.755906
127
import unittest from data515_project.kc_real_estate import get_county_data # Define a class in which the tests will run if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 201, 198, 6738, 1366, 45969, 62, 16302, 13, 74, 66, 62, 5305, 62, 44146, 1330, 651, 62, 9127, 88, 62, 7890, 201, 198, 201, 198, 2, 2896, 500, 257, 1398, 287, 543, 262, 5254, 481, 1057, 201, 198, 201, 198, 3...
2.493151
73
# This script is used to capture a video # Press 'q' to end recording import cv2 def CaptureVideo(file_name, port = 0): """ Captures video from the webcam and saves it as a .mov file in the /Videos folder. Input: File name webcam port (default = 0) Output: String of file name """ ...
[ 2, 770, 4226, 318, 973, 284, 8006, 257, 2008, 198, 2, 4332, 705, 80, 6, 284, 886, 8296, 198, 198, 11748, 269, 85, 17, 198, 198, 4299, 31793, 10798, 7, 7753, 62, 3672, 11, 2493, 796, 657, 2599, 198, 220, 220, 220, 37227, 198, 220...
2.299363
471
################################################################################# # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # # # # Licensed under the Apache License, Version 2.0 (the "License"). ...
[ 29113, 29113, 14468, 2, 198, 2, 220, 220, 15069, 6186, 13, 785, 11, 3457, 13, 393, 663, 29116, 13, 1439, 6923, 33876, 13, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 22...
2.27947
755
import numpy as np import tensorflow as tf def image_grid(image_batch, max_side_size, batch_size=None): """Make a grid from a batch of images. Concatenate first max_side_size*max_side_size images from a batch in a grid of size max_side_size x max_side_size. Args: batch: a tensor batch of im...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 11192, 273, 11125, 355, 48700, 628, 198, 198, 4299, 2939, 62, 25928, 7, 9060, 62, 43501, 11, 3509, 62, 1589, 62, 7857, 11, 15458, 62, 7857, 28, 14202, 2599, 198, 220, 220, 220, 37227, 12050, ...
2.296791
374
# -*- coding: utf-8 -* # @Time : 2020/12/22 17:29 from motor.motor_asyncio import AsyncIOMotorClient db = DataBase()
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 198, 2, 2488, 7575, 1058, 12131, 14, 1065, 14, 1828, 1596, 25, 1959, 198, 198, 6738, 5584, 13, 76, 20965, 62, 292, 13361, 952, 1330, 1081, 13361, 40, 2662, 20965, 11792, 628, 1...
2.346154
52
import numpy as np import scipy import warnings from typing import Callable, Optional from .methods import ConditionalVariance def _delete_qr_square(Q, R, s): """ Given a QR decomposition of a square matrix K, remove row and column s. Note we do not overwrite the original matrices :param Q: orthogon...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 629, 541, 88, 198, 11748, 14601, 198, 6738, 19720, 1330, 4889, 540, 11, 32233, 198, 198, 6738, 764, 24396, 82, 1330, 9724, 1859, 23907, 590, 628, 198, 198, 4299, 4808, 33678, 62, 80, 81, 62, ...
2.772425
1,204
from models.dgcnn import DGCNN import numpy as np if __name__=='__main__': batch_size = 2 num_pt = 124 pos_dim = 3 np.random.seed(0) input_feed = np.random.rand(batch_size, pos_dim, num_pt, 1) input_feed = np.around(input_feed).astype("float32") label_feed = np.random.rand(batch_size) ...
[ 6738, 4981, 13, 67, 36484, 20471, 1330, 360, 15916, 6144, 198, 11748, 299, 32152, 355, 45941, 628, 198, 361, 11593, 3672, 834, 855, 6, 834, 12417, 834, 10354, 198, 220, 220, 220, 15458, 62, 7857, 796, 362, 198, 220, 220, 220, 997, 6...
2.244444
225
import cv2 class CSICamera(object): ''' Define CSI Camera class ''' def gstreamer_pipeline( self, device_id=0, capture_width=1280, capture_height=720, display_width=1280, display_height=720, frame_rate=120 ): ...
[ 11748, 269, 85, 17, 198, 198, 4871, 9429, 2149, 18144, 7, 15252, 2599, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 2896, 500, 49911, 20432, 1398, 198, 220, 220, 220, 705, 7061, 628, 220, 220, 220, 825, 308, 5532, 263, 62, 7...
1.961062
565
__author__ = "Michael J. Harms" __date__ = "2021-04-08" __description__ = \ """ utility functions for the topiary package """ from . import _private import ete3 from ete3 import Tree import dendropy as dp import pandas as pd import numpy as np import re, sys, os, string, random, pickle, io, urllib, http import war...
[ 198, 834, 9800, 834, 796, 366, 13256, 449, 13, 2113, 907, 1, 198, 834, 4475, 834, 796, 366, 1238, 2481, 12, 3023, 12, 2919, 1, 198, 834, 11213, 834, 796, 3467, 198, 37811, 198, 315, 879, 5499, 329, 262, 1353, 8042, 5301, 198, 3781...
2.334351
2,620
from .utils.loading import Loader from .ratio import RatioEstimator from .base import Estimator # edb extra-s from .utils.loading_edb import Loader_edb
[ 6738, 764, 26791, 13, 25138, 1330, 8778, 263, 198, 6738, 764, 10366, 952, 1330, 33956, 22362, 320, 1352, 198, 6738, 764, 8692, 1330, 10062, 320, 1352, 198, 198, 2, 1225, 65, 3131, 12, 82, 198, 6738, 764, 26791, 13, 25138, 62, 276, 6...
3.06
50
#! /usr/bin/env python # -*- coding: utf-8 -*- # vim:fenc=utf-8 # # Copyright © 2018 CESAR SINCHIGUANO <cesarsinchiguano@hotmail.es> # # Distributed under terms of the BSD license. """ #Write a class called ExerciseSession. ExerciseSession #should have a constructor that requires two strings and an #integer: the strin...
[ 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, 2864, 42700, 1503, 311, 1268, 3398, 352...
3.268595
484
from datetime import datetime, timedelta from os import getenv from google.cloud import datastore from telegram_send.telegram_send import send import requests YC_REQUEST_URL = getenv("YC_REQUEST_URL") YC_AUTH_COOKIE = getenv("YC_AUTH_COOKIE") YC_GOOD_ID = getenv("YC_GOOD_ID") TG_TOKEN = getenv("TG_TOKEN") TG_CHAT_ID ...
[ 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 6738, 28686, 1330, 651, 24330, 198, 198, 6738, 23645, 13, 17721, 1330, 4818, 459, 382, 198, 6738, 573, 30536, 62, 21280, 13, 660, 30536, 62, 21280, 1330, 3758, 198, 11748, 7007,...
2.527463
1,147
from rlpyt.utils.launching.affinity import encode_affinity from rlpyt.utils.launching.exp_launcher import run_experiments from rlpyt.utils.launching.variant import make_variants, VariantLevel script = "rlpyt/experiments/scripts/dm_control/qpg/sac/train/dm_control_sac_autoreg.py" affinity_code = encode_affinity( n...
[ 198, 6738, 374, 75, 9078, 83, 13, 26791, 13, 38722, 10813, 13, 2001, 6269, 1330, 37773, 62, 2001, 6269, 198, 6738, 374, 75, 9078, 83, 13, 26791, 13, 38722, 10813, 13, 11201, 62, 38722, 2044, 1330, 1057, 62, 23100, 6800, 198, 6738, 3...
2.568
500
import sys # lines = sys.stdin.readlines() # n, m = list(map(int, lines[0].split(' '))) # num1 = list(map(int, lines[1].split(' '))) # num2 = list(map(int, lines[2].split(' '))) n, m = 5, 5 num1 = [4, 4, 1, 1, 1] num2 = [4, 3, 0, 1, 2] # 返回值 ret = [] # 暴力法 maximum = -1 while len(num1) > 0: for n1 in num1: ...
[ 11748, 25064, 198, 198, 2, 3951, 796, 25064, 13, 19282, 259, 13, 961, 6615, 3419, 198, 2, 299, 11, 285, 796, 1351, 7, 8899, 7, 600, 11, 3951, 58, 15, 4083, 35312, 10786, 705, 22305, 198, 2, 997, 16, 796, 1351, 7, 8899, 7, 600, ...
1.788856
341
from typing import Any, Sequence import jax.numpy as jnp from chex import Array from einops import rearrange from flax import linen as nn from .layers import Layer from .utils import Reduce, Sequential Dtype = Any __all__ = ["ProteinBERT"] class ProteinBERT(nn.Module): """A Flax Module for the ProteinBERT arc...
[ 6738, 19720, 1330, 4377, 11, 45835, 198, 198, 11748, 474, 897, 13, 77, 32152, 355, 474, 37659, 198, 6738, 1125, 87, 1330, 15690, 198, 6738, 304, 259, 2840, 1330, 37825, 858, 198, 6738, 781, 897, 1330, 41822, 355, 299, 77, 198, 198, ...
2.672638
614
# Library with classes/functions for building Scalarm simulation scenarios # License: MIT # Copyright (c) Jakub Liput 2015-2016 import json import os import sys import tarfile from contextlib import closing # LAUNCH IMPORT BINARIES import_binaries()
[ 2, 10074, 351, 6097, 14, 12543, 2733, 329, 2615, 34529, 1670, 18640, 13858, 198, 2, 13789, 25, 17168, 198, 2, 15069, 357, 66, 8, 25845, 549, 24701, 315, 1853, 12, 5304, 198, 198, 11748, 33918, 198, 11748, 28686, 198, 11748, 25064, 198...
3.652174
69
class ReverseProxy(object): """ Reverse proxies can cause some problems within applications, as they change routes, redirect traffic, and applications might have errors because of that. This piece of middlewar make sure everything runs smoothly. """ def __call__(self, environ, start_response): ...
[ 4871, 31849, 44148, 7, 15252, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 31849, 41775, 460, 2728, 617, 2761, 1626, 5479, 11, 355, 484, 1487, 11926, 11, 18941, 198, 220, 220, 220, 4979, 11, 290, 5479, 1244, 423, 8563, 780, ...
2.751938
903
# -*-: coding: utf-8 -*- import numpy as np from numpy import pi from example import print_dtype if __name__ == '__main__': indarray = np.array([2, 3, 4]) # NOTE: np.array(1, 2, 3, 4) # WRONG!!! print_dtype(indarray) dndarray = np.array([1.2, 3.5, 5.1]) print_dtype(dndarray) # transform s...
[ 2, 532, 9, 12, 25, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 299, 32152, 1330, 31028, 198, 198, 6738, 1672, 1330, 3601, 62, 67, 4906, 628, 198, 361, 11593, 3672, 834, 6624, ...
2.551213
742
""" Description: Main Entdpoints for HTML Delivery an web Frontend @date: 10/25/2019 @author: Lukas Felzmann, Sebastian Leilich, Kai Plautz """ from flask import render_template, Blueprint bp_webpage = Blueprint('web', __name__) @bp_webpage.route('/')
[ 37811, 198, 11828, 25, 8774, 7232, 67, 13033, 329, 11532, 28682, 281, 3992, 8880, 437, 198, 31, 4475, 25, 838, 14, 1495, 14, 23344, 198, 31, 9800, 25, 28102, 292, 13937, 89, 9038, 11, 26190, 1004, 346, 488, 11, 22091, 1345, 2306, 89...
3.084337
83
import grid2demand as gd "Step 1: Read Input Network Data" net = gd.ReadNetworkFile('./data_folder') "Step 2: Network Partition into Grids" zone = gd.NetworkPartition(number_of_x_blocks=None, number_of_y_blocks=None, cell_width=500, cell_height=500, latitude=30) # user can customize number ...
[ 11748, 10706, 17, 28550, 355, 308, 67, 198, 198, 1, 8600, 352, 25, 4149, 23412, 7311, 6060, 1, 198, 3262, 796, 308, 67, 13, 5569, 26245, 8979, 7, 4458, 14, 7890, 62, 43551, 11537, 198, 198, 1, 8600, 362, 25, 7311, 2142, 653, 656, ...
3.202778
360
__version__ = "1.1.0" from plates.core import ( combinations, expand_pattern, generate_random_pattern, generate_random_plate, get_pattern, get_plate, get_plate_index, matches_pattern, max_plate, min_plate, STD_PATTERNS, std_patterns_table, valid_pattern, valid_pl...
[ 834, 9641, 834, 796, 366, 16, 13, 16, 13, 15, 1, 198, 198, 6738, 13375, 13, 7295, 1330, 357, 198, 220, 220, 220, 17790, 11, 198, 220, 220, 220, 4292, 62, 33279, 11, 198, 220, 220, 220, 7716, 62, 25120, 62, 33279, 11, 198, 220, ...
2.270833
144
""" Configuration file for the Sphinx documentation builder. http://www.sphinx-doc.org/en/master/config TODO: Test intersphinx. autosummary_imported_members = True # What for? Cookbook: # [NOT work, error can`t find module, try to hide all command under: # if __main__!=autosummary(find out)] # I...
[ 37811, 201, 198, 38149, 2393, 329, 262, 45368, 28413, 10314, 27098, 13, 201, 198, 4023, 1378, 2503, 13, 82, 746, 28413, 12, 15390, 13, 2398, 14, 268, 14, 9866, 14, 11250, 201, 198, 201, 198, 51, 3727, 46, 25, 201, 198, 220, 220, 2...
2.850951
3,576
#!/usr/bin/env python2.7 # -*- coding:UTF-8 -*-2 u"""falling.py Copyright (c) 2019 Yukio Kuro This software is released under BSD license. 落下ピースモジュール。 """ import piece as _piece import utils.const as _const class _Operatable(_piece.Piece): u"""操作ピース。 """ __slots__ = "_left", "_top" def __init__(sel...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 17, 13, 22, 198, 2, 532, 9, 12, 19617, 25, 48504, 12, 23, 532, 9, 12, 17, 198, 84, 37811, 7207, 278, 13, 9078, 198, 198, 15269, 357, 66, 8, 13130, 19760, 952, 25796, 198, 1212, 3788, ...
1.760911
6,759
import numpy.testing as nt import matplotlib.pyplot as plt import unittest """ we will assume that the primitives rotx,trotx, etc. all work """ from math import pi from spatialmath.twist import * from spatialmath import super_pose # as sp from spatialmath.base import * from spatialmath.base import argcheck from spatia...
[ 11748, 299, 32152, 13, 33407, 355, 299, 83, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 555, 715, 395, 198, 198, 37811, 198, 732, 481, 7048, 326, 262, 2684, 20288, 5724, 87, 11, 83, 10599, 87, 11, 3503,...
3.173184
179
# -*- coding: utf-8 -*- from django_ogp.tests import settings from django.test import TestCase from django_ogp.models import BasicMeta from django_ogp.models import ImageMeta from django_ogp.models import LocaleAlternateMeta from django_ogp.templatetags.ogp import show_ogp from django.template import Context, Templat...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 42625, 14208, 62, 519, 79, 13, 41989, 1330, 6460, 198, 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 198, 6738, 42625, 14208, 62, 519, 79, 13, 27530, ...
3.029412
136
## Copyright (c) 2003 Henk Punt ## Permission is hereby granted, free of charge, to any person obtaining ## a copy of this software and associated documentation files (the ## "Software"), to deal in the Software without restriction, including ## without limitation the rights to use, copy, modify, merge, publish, #...
[ 2235, 220, 197, 220, 220, 15069, 357, 66, 8, 5816, 6752, 74, 350, 2797, 198, 198, 2235, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 198, 2235, 257, 4866, 286, 428, 3788, 290, 3917, 10314, 3696, 357,...
2.700982
5,906
#!/usr/bin/env python3 import argparse import os.path as path import libquality.ffmpeg as ffmpeg import libquality.quality as quality import libquality.reference as reference import libquality.profile as profile if __name__ == "__main__": main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 1822, 29572, 198, 11748, 28686, 13, 6978, 355, 3108, 198, 11748, 9195, 13237, 13, 487, 43913, 355, 31246, 43913, 198, 11748, 9195, 13237, 13, 13237, 355, 3081, 198, 11748, 919...
3.486111
72
# 统计 CU 和 PU 分布 from lightgbm import LGBMClassifier import optuna from sklearn import tree import graphviz import pydotplus import numpy as np import pandas as pd import xgboost as xgb from xgboost import XGBClassifier from xgboost import plot_importance from xgboost import plot_tree from sklearn.model_se...
[ 2, 13328, 119, 253, 164, 106, 94, 29369, 10263, 240, 234, 24676, 10263, 230, 228, 30585, 225, 201, 198, 201, 198, 6738, 1657, 70, 20475, 1330, 406, 4579, 44, 9487, 7483, 201, 198, 11748, 2172, 9613, 201, 198, 6738, 1341, 35720, 1330, ...
1.908585
7,723
import argparse from pyannote.database.util import load_rttm import numpy as np import tqdm if __name__ == "__main__": parser = argparse.ArgumentParser(description="convert segment file to rttm file") parser.add_argument("seg_path", type=str, help="input segment file path") parser.add_argument("rttm_path"...
[ 11748, 1822, 29572, 198, 6738, 12972, 1236, 1258, 13, 48806, 13, 22602, 1330, 3440, 62, 81, 926, 76, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 256, 80, 36020, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 62...
2.323944
355
import json from django import forms from django.shortcuts import render, redirect # Create your views here. import requests from .forms import UserForm, addRecipesForm, addRecipesMing, RecipesDesc, recipesPreviewForm from .templates.mrGetTemplate import mrGetQuery, mrPostQuery from .common import get_recipes, get_re...
[ 11748, 33918, 198, 6738, 42625, 14208, 1330, 5107, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 18941, 198, 198, 2, 13610, 534, 5009, 994, 13, 198, 11748, 7007, 198, 6738, 764, 23914, 1330, 11787, 8479, 11, 751, 6690, 1863...
3.082051
195
# Apache License Version 2.0 # # Copyright (c) 2021., Redis Labs Modules # All rights reserved. # import json import logging from redisbench_admin.run.redis_benchmark.redis_benchmark import ( redis_benchmark_from_stdout_csv_to_json, ) from redisbench_admin.run.ycsb.ycsb import post_process_ycsb_results
[ 2, 220, 24843, 13789, 10628, 362, 13, 15, 198, 2, 198, 2, 220, 15069, 357, 66, 8, 33448, 1539, 2297, 271, 23500, 3401, 5028, 198, 2, 220, 1439, 2489, 10395, 13, 198, 2, 198, 198, 11748, 33918, 198, 11748, 18931, 198, 198, 6738, 22...
2.724138
116
#!/usr/bin/python import httplib2 import os import sys import csv from apiclient.discovery import build_from_document from apiclient.errors import HttpError from oauth2client.client import flow_from_clientsecrets from oauth2client.file import Storage from oauth2client.tools import argparser, run_flow CLIENT_SECRETS_...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 11748, 1841, 489, 571, 17, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 269, 21370, 198, 198, 6738, 2471, 291, 75, 1153, 13, 67, 40821, 1330, 1382, 62, 6738, 62, 22897, 198, 6738, ...
2.860406
394
from functools import wraps, update_wrapper import numpy as np import cv2 __all__ = [ 'MORPH_SHAPES', 'clamp', 'even', 'odd', 'map_to_int', 'TrackbarManager', 'midpoint_from_dimensions', 'midpoint_from_points', 'circle_to_box', 'circles_to_boxes', 'draw_boxes' ] ###########################################...
[ 6738, 1257, 310, 10141, 1330, 27521, 11, 4296, 62, 48553, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 269, 85, 17, 198, 198, 834, 439, 834, 796, 685, 198, 220, 220, 220, 705, 44, 1581, 11909, 62, 9693, 2969, 1546, 3256, 705, 565...
3.238443
822
"""Squirrel Fragments This module contains format strings for the Squirrel program. """ squirrely = r""" ,;:;;, ;;;;; .=', ;:;;:, /_', "=. ';:;:; @=:__, \,;:;:' _(\.= ;:;;' `"_( _/="` ...
[ 37811, 22266, 22793, 24229, 902, 198, 198, 1212, 8265, 4909, 5794, 13042, 329, 262, 44259, 1430, 13, 198, 37811, 198, 198, 16485, 343, 38015, 796, 374, 37811, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
1.489362
235
''' MIT License Copyright (c) 2020 Sebastian Cornejo in collaboration with Faviola Molina from dLab - Fundación Ciencia y Vida Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without...
[ 7061, 6, 198, 36393, 13789, 198, 198, 15269, 357, 66, 8, 12131, 26190, 2744, 710, 7639, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 287, 12438, 351, 34395, 30292, 17958, 1437, 422, 288, 17822, 532, 7557, 32009, ...
3.465174
402
""" Lets see what com ports pyserial reports on our test runners""" from serial.tools import list_ports #pylint: disable=import-error from ndicapy import ndiDeviceName def test_list_ports(): """ Check that ndicapy.ndiDeviceName gets all the comports found by pyserial """ #list ports print([com...
[ 37811, 38257, 766, 644, 401, 14090, 279, 893, 48499, 3136, 319, 674, 1332, 19323, 37811, 198, 198, 6738, 11389, 13, 31391, 1330, 1351, 62, 3742, 1303, 79, 2645, 600, 25, 15560, 28, 11748, 12, 18224, 198, 6738, 299, 67, 291, 12826, 133...
2.420949
506
# -*- coding: utf-8 -*- from requests_middleware import BaseMiddleware
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 7007, 62, 27171, 1574, 1330, 7308, 34621, 1574, 628 ]
2.92
25
""" Example implementation of the PyRandomString library """ import PyRandomString py_random_string = PyRandomString.RandomString() # calling method to get a single random string random_string = py_random_string.get_string(string_type=PyRandomString.StringType.ALPHA_NUMERIC_ALL_CASE, random_length=False, max_length=...
[ 37811, 198, 16281, 7822, 286, 262, 9485, 29531, 10100, 5888, 198, 37811, 198, 198, 11748, 9485, 29531, 10100, 198, 198, 9078, 62, 25120, 62, 8841, 796, 9485, 29531, 10100, 13, 29531, 10100, 3419, 198, 198, 2, 4585, 2446, 284, 651, 257, ...
3.227564
312
import json import math import os from gig import ents, ext_data from utils import dt, jsonx from sl_new_pds import _utils, seat_utils from sl_new_pds._constants import START_TYPE from sl_new_pds._utils import log, log_time from sl_new_pds.draw_current_and_new import draw_current_and_new if __name__ == '__main__':...
[ 11748, 33918, 198, 11748, 10688, 198, 11748, 28686, 198, 198, 6738, 12526, 1330, 220, 658, 11, 1070, 62, 7890, 198, 6738, 3384, 4487, 1330, 288, 83, 11, 33918, 87, 198, 198, 6738, 1017, 62, 3605, 62, 79, 9310, 1330, 4808, 26791, 11, ...
2.130159
315
# THIS FILE IS GENERATED FROM KIVY SETUP.PY __version__ = '1.11.0.dev0' __hash__ = '9b90467ec9efea3891e07be92c9bb4ba638a7ca0' __date__ = '20190329'
[ 2, 12680, 45811, 3180, 24700, 1137, 11617, 16034, 509, 3824, 56, 25823, 8577, 13, 47, 56, 198, 834, 9641, 834, 796, 705, 16, 13, 1157, 13, 15, 13, 7959, 15, 6, 198, 834, 17831, 834, 796, 705, 24, 65, 24, 3023, 3134, 721, 24, 891...
1.973333
75
#(C) Copyright [2022] American Megatrends International 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 # # http:#www.apache.org/licenses/LICENSE-2.0 # #Unless required by applicable law ...
[ 2, 7, 34, 8, 15069, 685, 1238, 1828, 60, 1605, 8336, 10562, 358, 82, 4037, 11419, 198, 2, 198, 2, 26656, 15385, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 1662, 779, 428, 2393, ...
3.747126
174
import re import os import requests import time import sys import _thread import shutil from config import TIME_TO_LIVE, STORAGE_DIR, LOG_LEVEL from logger import log from constants import HTTP_OK, HTTP_PARTIAL
[ 198, 11748, 302, 198, 11748, 28686, 198, 11748, 7007, 198, 11748, 640, 198, 11748, 25064, 198, 11748, 4808, 16663, 198, 11748, 4423, 346, 198, 198, 6738, 4566, 1330, 20460, 62, 10468, 62, 43, 9306, 11, 46366, 11879, 62, 34720, 11, 41605...
3.412698
63
import numpy as np import pytest import torch import torch.distributed as dist import torch.nn as nn import ray import ray.util.data as ml_data import ray.util.iter as parallel_it from ray import tune from ray.tune.utils import merge_dicts from ray.util.data.examples.mlp_identity_torch import make_train_operator from ...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 12972, 9288, 198, 11748, 28034, 198, 11748, 28034, 13, 17080, 6169, 355, 1233, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 198, 11748, 26842, 198, 11748, 26842, 13, 22602, 13, 7890, 355, 2...
2.756892
399
# Copyright 2021 NVIDIA Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
[ 2, 15069, 33448, 15127, 10501, 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, 73...
2.69933
1,194
from epipack.vis import visualize if __name__=="__main__": import netwulf as nw from epipack import StochasticEpiModel import networkx as nx network, config, _ = nw.load('random_network.json') N = len(network['nodes']) edge_list = [ ( link['source'], link['target'], 1.0 ) for link in netwo...
[ 6738, 2462, 541, 441, 13, 4703, 1330, 38350, 628, 198, 361, 11593, 3672, 834, 855, 1, 834, 12417, 834, 1298, 198, 220, 220, 220, 1330, 2010, 86, 4754, 355, 299, 86, 198, 220, 220, 220, 422, 2462, 541, 441, 1330, 520, 5374, 3477, 1...
1.939358
841
from django.conf import settings from django.conf.urls import url, include from django.conf.urls.static import static from rest_framework.routers import SimpleRouter, DefaultRouter from shopifier.admin import views router_account = DefaultRouter() router_account.register(r'admin', views.UsersAdminViewSet) router_acc...
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 11, 2291, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 13, 12708, 1330, 9037, 198, 198, 6738, 1334, 62, 30604, 13, 472, 101...
2.491491
999
# Copyright 2002-2011 Nick Mathewson. See LICENSE for licensing information. """mixminion.ServerKeys Classes for servers to generate and store keys and server descriptors. """ #FFFF We need support for encrypting private keys. __all__ = [ "ServerKeyring", "generateServerDescriptorAndKeys", "genera...
[ 2, 15069, 6244, 12, 9804, 8047, 6550, 6391, 1559, 13, 220, 4091, 38559, 24290, 329, 15665, 1321, 13, 198, 198, 37811, 19816, 1084, 295, 13, 10697, 40729, 628, 220, 220, 38884, 329, 9597, 284, 7716, 290, 3650, 8251, 290, 4382, 12145, 6...
2.205683
22,277
from __future__ import print_function import collections, gzip, time import numpy as np import tensorflow as tf import sys, os sys.path.append("../tuner_utils") from yellowfin import YFOptimizer import inspect class MediumConfig(object): """Medium config.""" init_scale = 0.05 learning_rate = 0.25 max_grad_no...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 17268, 11, 308, 13344, 11, 640, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 198, 11748, 25064, 11, 28686, 198, 198, 17597, 13, 6978, 13, ...
2.128416
2,305
import logging import os import time import falcon
[ 11748, 18931, 198, 11748, 28686, 198, 11748, 640, 198, 198, 11748, 24215, 1102, 628, 198 ]
3.6
15
from datetime import datetime from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes.generic import GenericForeignKey from django.db import models from django.db.models import Q from django.db.models.query import QuerySet class PostQuerySet(QuerySet): """ Subclass of Quer...
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 11299, 19199, 13, 27530, 1330, 14041, 6030, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 11299, 19199, 13, 41357, 1330, 42044, 33616, 9218, 198, 6738, 4...
2.273381
1,668
import threading from tornado.ioloop import IOLoop from dockyard.const import ExpStatus import logging GLOBAL = __GlobalVar.instance()
[ 11748, 4704, 278, 198, 6738, 33718, 13, 1669, 11224, 1330, 314, 3535, 11224, 198, 6738, 23423, 9413, 13, 9979, 1330, 5518, 19580, 198, 11748, 18931, 628, 198, 198, 8763, 9864, 1847, 796, 11593, 22289, 19852, 13, 39098, 3419, 198 ]
3.538462
39
# Imports. import random import numpy as np import torch import torch.nn.functional as F import torch.optim as optim # For optimizer support. # Other imports. from model import Actor, Critic from buffer import ReplayBuffer from noise import Noise from collections import namedtuple, deque """ Hyperparameter setup. ""...
[ 2, 1846, 3742, 13, 198, 11748, 4738, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 11748, 28034, 13, 40085, 355, 6436, 1303, 1114, 6436, 7509, 1104, 13, 198, 198, 2, 381...
2.284338
3,633
#!/usr/bin/env python """ Copyright 2017, Tianwei Shen, HKUST. Copyright 2017, Zixin Luo, HKUST. Model architectures. """ from __future__ import print_function import sys import os import numpy as np import tensorflow as tf from tensorflow.python.ops import gen_nn_ops from scipy import ndimage sys.path.append("../")...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 198, 15269, 2177, 11, 20834, 42990, 22323, 11, 31440, 7759, 13, 198, 15269, 2177, 11, 1168, 844, 259, 25956, 11, 31440, 7759, 13, 198, 17633, 45619, 13, 198, 37811, 198, 6738, 1...
2.27744
6,405
# Pablo Carreira - 15/10/16 ITEM_ALIAS = 'item' # Alias for each item in the 'FOR ITEM_ALIAS IN'..
[ 2, 33185, 1879, 260, 8704, 532, 1315, 14, 940, 14, 1433, 198, 198, 2043, 3620, 62, 1847, 43429, 796, 705, 9186, 6, 220, 1303, 978, 4448, 329, 1123, 2378, 287, 262, 705, 13775, 7283, 3620, 62, 1847, 43429, 3268, 6, 492 ]
2.439024
41
from distutils.core import setup setup( name='syncli', version='0.0.3', author='Sumeet Singh', author_email='singhsays@gmail.com', packages=['syncli'], url='http://pypi.python.org/pypi/syncli/', license='LICENSE.txt', description='Python CLI for Synology DSM.', long_description=ope...
[ 6738, 1233, 26791, 13, 7295, 1330, 9058, 628, 198, 40406, 7, 198, 220, 220, 220, 1438, 11639, 28869, 44506, 3256, 198, 220, 220, 220, 2196, 11639, 15, 13, 15, 13, 18, 3256, 198, 220, 220, 220, 1772, 11639, 50, 2454, 316, 14403, 3256...
2.228814
236
""" Testing Logger Methods """ import os import mock from spylunking.log.setup_logging import build_colorized_logger from tests.base_test import BaseTestCase from tests.mock_utils import mock_get_token from tests.mock_utils import mock_post_request class TestLogger(BaseTestCase): """TestLogger""" org_value =...
[ 37811, 198, 44154, 5972, 1362, 25458, 198, 37811, 198, 11748, 28686, 198, 11748, 15290, 198, 6738, 599, 2645, 2954, 278, 13, 6404, 13, 40406, 62, 6404, 2667, 1330, 1382, 62, 8043, 1143, 62, 6404, 1362, 198, 6738, 5254, 13, 8692, 62, 9...
2.099884
861
#!/usr/bin/env python import sys import time from sqlite3 import dbapi2 as sqlite import mc_bin_client CREATE_TABLE = """ create table if not exists samples ( host varchar(64) not null, uptime integer not null, statname varchar(64) not null, value varchar(64) not null ) """ INS = """insert...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 25064, 198, 11748, 640, 198, 198, 6738, 44161, 578, 18, 1330, 20613, 15042, 17, 355, 44161, 578, 198, 198, 11748, 36650, 62, 8800, 62, 16366, 198, 198, 43387, 6158, 62, 381...
2.192073
328
#!/usr/bin/env python # vim:ts=4:sts=4:sw=4:et # # Author: Hari Sekhon # Date: 2013-11-13 13:52:54 +0000 (Wed, 13 Nov 2013) # # https://github.com/harisekhon/nagios-plugins # # License: see accompanying Hari Sekhon LICENSE file # # If you're using my code you're welcome to connect with me on LinkedIn # and optio...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 220, 43907, 25, 912, 28, 19, 25, 6448, 28, 19, 25, 2032, 28, 19, 25, 316, 198, 2, 198, 2, 220, 6434, 25, 2113, 72, 37558, 24130, 198, 2, 220, 7536, 25, 2211, 12, 1157, 12, ...
2.996047
506
from asgard.workers.autoscaler.app import app app.run()
[ 6738, 355, 19977, 13, 22896, 13, 2306, 418, 9948, 263, 13, 1324, 1330, 598, 198, 198, 1324, 13, 5143, 3419, 198 ]
2.714286
21
""" ======== Glossary ======== .. glossary:: ssm State space model """ from __future__ import division, absolute_import, print_function
[ 37811, 198, 2559, 198, 9861, 793, 560, 198, 2559, 198, 198, 492, 21194, 560, 3712, 628, 220, 220, 220, 264, 5796, 198, 220, 220, 220, 220, 220, 220, 220, 1812, 2272, 2746, 198, 37811, 198, 6738, 11593, 37443, 834, 1330, 7297, 11, 41...
3
50
import smooth.framework.functions.functions as func class SimulationParameters: """Class to store parameters for smooth simulation. :param start_date: the first evaluated time period. Defaults to '1/1/2019' :type start_date: string representation of date :param n_intervals: number of time steps. Defa...
[ 11748, 7209, 13, 30604, 13, 12543, 2733, 13, 12543, 2733, 355, 25439, 628, 198, 4871, 41798, 48944, 25, 198, 220, 220, 220, 37227, 9487, 284, 3650, 10007, 329, 7209, 18640, 13, 628, 220, 220, 220, 1058, 17143, 923, 62, 4475, 25, 262, ...
2.94086
558
# Copyright 2019 TerraPower, 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
[ 2, 15069, 13130, 24118, 13434, 11, 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, 9...
2.674854
855
#!/usr/bin/env python3 # Day 24: LRU Cache # # Design and implement a data structure for Least Recently Used (LRU) cache. It # should support the following operations: get and put. # - get(key) - Get the value (will always be positive) of the key if the key # exists in the cache, otherwise return -1. # - put(key, va...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 3596, 1987, 25, 37491, 52, 34088, 198, 2, 198, 2, 8495, 290, 3494, 257, 1366, 4645, 329, 1004, 459, 23413, 16718, 357, 35972, 52, 8, 12940, 13, 632, 198, 2, 815, 1104, ...
3.174658
292
import numpy as np import matplotlib.pyplot as plt import torch from torch import tensor as ts import torch.nn as nn import torch.optim as optim from mdn import mdn_base from mdn.misc_mixture_density_network import Mixture_Density_Network as MDN from data_handler.data_handler import Data_Handler as DH ''' File info...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 11748, 28034, 198, 6738, 28034, 1330, 11192, 273, 355, 40379, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 4008...
2.594862
506
import ibeam.config config.initialize() __version__ = "0.3.0-rc8"
[ 11748, 24283, 68, 321, 13, 11250, 198, 198, 11250, 13, 36733, 1096, 3419, 198, 198, 834, 9641, 834, 796, 366, 15, 13, 18, 13, 15, 12, 6015, 23, 1, 198 ]
2.266667
30
from flask import render_template,redirect,url_for,request,flash from . import auth from ..models import Group from .forms import RegistrationForm,LoginForm from .. import db from flask_login import login_user,logout_user,login_required @auth.route('/login', methods=["GET", "POST"]) @auth.route('/logout') @login_req...
[ 6738, 42903, 1330, 8543, 62, 28243, 11, 445, 1060, 11, 6371, 62, 1640, 11, 25927, 11, 34167, 198, 6738, 764, 1330, 6284, 198, 6738, 11485, 27530, 1330, 4912, 198, 6738, 764, 23914, 1330, 24610, 8479, 11, 47790, 8479, 198, 6738, 11485, ...
3.237288
118
'''OpenGL extension SGIX.blend_alpha_minmax This module customises the behaviour of the OpenGL.raw.GL.SGIX.blend_alpha_minmax to provide a more Python-friendly API Overview (from the spec) Two additional blending equations are specified using the interface defined by EXT_blend_minmax. These equations are simil...
[ 7061, 6, 11505, 8763, 7552, 26147, 10426, 13, 2436, 437, 62, 26591, 62, 1084, 9806, 198, 198, 1212, 8265, 2183, 2696, 262, 9172, 286, 262, 220, 198, 11505, 8763, 13, 1831, 13, 8763, 13, 38475, 10426, 13, 2436, 437, 62, 26591, 62, 10...
3.738095
252
# Work with Python 3.6 import discord import psycopg2 import asyncio import os import logging from beem.steem import Steem from beem.account import Account #from time import sleep TOKEN = 'NTg1NzI4NDk3MzI3Mjc2MDMy.XPd6iw.X3rW_9QGWtTwZJDI4cNuo8Knt2Q' client = discord.Client() DIR_PATH = os.path.dirname(os.path.realp...
[ 2, 5521, 351, 11361, 513, 13, 21, 198, 11748, 36446, 198, 11748, 17331, 22163, 70, 17, 198, 11748, 30351, 952, 198, 11748, 28686, 198, 11748, 18931, 198, 198, 6738, 307, 368, 13, 4169, 368, 1330, 2441, 368, 198, 6738, 307, 368, 13, ...
2.501736
576
from flask import Flask, request, jsonify import logging app = Flask(__name__) logger = logging.getLogger('record-ip-flask') logger.setLevel(logging.DEBUG) fh = logging.FileHandler('debug.log') formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') fh.setFormatter(formatter) fh.setLevel...
[ 6738, 42903, 1330, 46947, 11, 2581, 11, 33918, 1958, 198, 11748, 18931, 198, 198, 1324, 796, 46947, 7, 834, 3672, 834, 8, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 10786, 22105, 12, 541, 12, 2704, 2093, 11537, 198, 6404...
2.577982
218
import numpy as np arr1 = np.array([10, 20, 30, 40, 50, 60]) arr2 = np.array([20, 21, 22, 23, 24, 25]) newarr = np.multiply(arr1, arr2) print(newarr)
[ 11748, 299, 32152, 355, 45941, 198, 198, 3258, 16, 796, 45941, 13, 18747, 26933, 940, 11, 1160, 11, 1542, 11, 2319, 11, 2026, 11, 3126, 12962, 198, 3258, 17, 796, 45941, 13, 18747, 26933, 1238, 11, 2310, 11, 2534, 11, 2242, 11, 1987...
2.15493
71
from waterbutler import settings config = settings.child('DROPBOX_PROVIDER_CONFIG') BASE_URL = config.get('BASE_URL', 'https://api.dropboxapi.com/2') BASE_CONTENT_URL = config.get('BASE_CONTENT_URL', 'https://content.dropboxapi.com/2/') CONTIGUOUS_UPLOAD_SIZE_LIMIT = int(config.get('CONTIGUOUS_UPLOAD_SIZE_LIMIT', ...
[ 6738, 1660, 4360, 1754, 1330, 6460, 198, 198, 11250, 796, 6460, 13, 9410, 10786, 7707, 3185, 39758, 62, 41283, 41237, 62, 10943, 16254, 11537, 628, 198, 33, 11159, 62, 21886, 796, 4566, 13, 1136, 10786, 33, 11159, 62, 21886, 3256, 705, ...
2.487654
162
import tomli from ChromProcess import Classes def analysis_from_toml(fname): """ Create and AnalysisInformation object from a formatted csv file. Parameters ---------- fname: str or pathlib Path Returns ------- analysis: Classes.AnalysisInformation """ analysis = Classes.Ana...
[ 11748, 284, 4029, 72, 198, 6738, 18255, 18709, 1330, 38884, 628, 198, 4299, 3781, 62, 6738, 62, 39532, 75, 7, 69, 3672, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 13610, 290, 14691, 21918, 2134, 422, 257, 39559, 269, 21370, ...
2.837398
738
import torch as th import numpy as np numpy_to_torch_dtype_dict = { np.dtype(np.bool): th.bool, np.dtype(np.uint8): th.uint8, np.dtype(np.int8): th.int8, np.dtype(np.int16): th.int16, np.dtype(np.int32): th.int32, np.dtype(np.int64): th.int64, np.dtype(np.float16): th.float16, np.dtype(...
[ 11748, 28034, 355, 294, 198, 11748, 299, 32152, 355, 45941, 198, 198, 77, 32152, 62, 1462, 62, 13165, 354, 62, 67, 4906, 62, 11600, 796, 1391, 198, 220, 220, 220, 45941, 13, 67, 4906, 7, 37659, 13, 30388, 2599, 294, 13, 30388, 11, ...
2.297003
1,835
"""Finds the FOF groups changed after Balrog-injection and unchanged after Balrog-injection. Author: Brian Yanny""" #!/usr/bin/env python import sys import csv if(len(sys.argv) != 3): sys.exit("Usage: python par.py matchlist outprefixname") fn=sys.argv[1] outprefix=sys.argv[2] gidlist={} gidsizelist={} fofidli...
[ 37811, 16742, 82, 262, 11895, 37, 2628, 3421, 706, 8528, 3828, 12, 259, 29192, 290, 21588, 706, 8528, 3828, 12, 259, 29192, 13, 198, 13838, 25, 8403, 575, 7737, 37811, 198, 198, 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, ...
1.771046
1,568