content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Bootstrap RST # Copyright (c) 2014, Nicolas P. Rougier # Distributed under the (new) BSD License. See LICENSE.txt for more info. # ----------------------------------------------------------------------------- from ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 16529, 32501, 198, 2, 18892, 26418, 371, 2257, 198, 2, 15069, 357, 66, 8, 1946, 11, 29737, 350, 13, 13876, 70, 959, 198, 2, 4307, 6169, 739, 262, 357, 3605, 8, ...
3.260188
319
from arl.graphs.dask_init import get_dask_Client c=get_dask_Client() print(c.scheduler_info()) exit()
[ 6738, 610, 75, 13, 34960, 82, 13, 67, 2093, 62, 15003, 1330, 651, 62, 67, 2093, 62, 11792, 198, 198, 66, 28, 1136, 62, 67, 2093, 62, 11792, 3419, 198, 4798, 7, 66, 13, 1416, 704, 18173, 62, 10951, 28955, 198, 37023, 3419, 198 ]
2.340909
44
from unittest import TestCase import day9
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 11748, 1110, 24, 628 ]
3.583333
12
import os import multiprocessing # number of cores to use in parallel processing ncores = multiprocessing.cpu_count() # don't use max number b/c of windows bug: https://bugs.python.org/issue26903 if os.name == 'nt' and ncores >= 64: ncores = 60
[ 11748, 28686, 198, 11748, 18540, 305, 919, 278, 198, 198, 2, 1271, 286, 21758, 284, 779, 287, 10730, 7587, 198, 10782, 2850, 796, 18540, 305, 919, 278, 13, 36166, 62, 9127, 3419, 198, 198, 2, 836, 470, 779, 3509, 1271, 275, 14, 66, ...
2.988095
84
import random import math random.seed(0) # APPROXIMATING USING A SIMULATION def sameDate(numPeople, numSame): """Two arguments, number of people in the group and the number of people that we ask if they have birthday the same day.""" # I am assuming that every birthday is equally likely possibleDates ...
[ 11748, 4738, 198, 11748, 10688, 198, 25120, 13, 28826, 7, 15, 8, 198, 198, 2, 3486, 31190, 55, 3955, 33881, 1294, 2751, 317, 23749, 6239, 6234, 198, 198, 4299, 976, 10430, 7, 22510, 8061, 11, 997, 30556, 2599, 198, 220, 220, 220, 37...
2.897106
311
import json from copy import deepcopy as copy from traitlets import HasTraits, Unicode, validate, TraitError from ._util import Util class ParamsAuth0(HasTraits): """ See Auth0 doc https://auth0.com/docs/api/authentication#authorize-application """ name = Unicode() response_type = Unicode() ...
[ 198, 11748, 33918, 198, 198, 6738, 4866, 1330, 2769, 30073, 355, 4866, 198, 6738, 1291, 2578, 912, 1330, 7875, 15721, 896, 11, 34371, 11, 26571, 11, 4759, 270, 12331, 198, 198, 6738, 47540, 22602, 1330, 7273, 346, 628, 198, 4871, 2547, ...
1.900421
1,898
from django.shortcuts import render, redirect import viewalertmgmt.DBOPS.MongoDBOps as db from django.contrib.auth.decorators import login_required from .form import FormReAssignment from django.contrib.auth.models import User @login_required(login_url="/account/login/") @login_required(login_url="/account/login/")...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 18941, 198, 11748, 1570, 44598, 11296, 16762, 13, 11012, 30737, 13, 44, 25162, 35, 8202, 862, 355, 20613, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 12501, 273, 2024, 133...
3.14966
147
import xlsWriter import xlsPlot import xlsReader # importation de xlsWriter data = {"keys":[chr(65+i) for i in range(10)],"data":[i for i in range(10)],"d":[i+1 for i in range(10)],"da":[i+2 for i in range(10)]} xls = xlsWriter.xlsWriter() xls.AddData(data, KeysCol="keys", Title=("Données",4,4)) xls.SaveFile() # sa...
[ 11748, 2124, 7278, 34379, 198, 11748, 2124, 7278, 43328, 198, 11748, 2124, 7278, 33634, 198, 198, 2, 1330, 341, 390, 2124, 7278, 34379, 198, 7890, 796, 19779, 13083, 20598, 354, 81, 7, 2996, 10, 72, 8, 329, 1312, 287, 2837, 7, 940, ...
2.423858
394
from . import views from django.urls import path, include urlpatterns = [path('', views.job_list), path('', views.job_details),]
[ 6738, 764, 1330, 5009, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 220, 3108, 11, 2291, 198, 198, 6371, 33279, 82, 796, 685, 6978, 10786, 3256, 5009, 13, 21858, 62, 4868, 828, 3108, 10786, 3256, 5009, 13, 21858, 62, 36604, 828, 60, ...
2.833333
48
import unittest from libsousou import module_loading if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 198, 6738, 9195, 82, 516, 280, 1330, 8265, 62, 25138, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3419, 198 ]
2.666667
39
# pylint: disable=missing-function-docstring, no-self-use, missing-class-docstring, no-member #!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) Microsoft Corporation. # Licensed under the GNU General Public License v3.0 or later. # See License.txt in the project root for license information. # import uui...
[ 2, 279, 2645, 600, 25, 15560, 28, 45688, 12, 8818, 12, 15390, 8841, 11, 645, 12, 944, 12, 1904, 11, 4814, 12, 4871, 12, 15390, 8841, 11, 645, 12, 19522, 198, 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617...
2.931677
161
import uuid menu = { 'Appetizers': { 'Wings': 8.00, 'Spring Rolls': 5.00, 'Cookies': 2.00, 'Grilled Squid': 8.00, 'Crab Wonton': 6.00, 'Satay': 7.00 }, 'Entrees': { 'Salmon': 15.00, 'Steak': 20.00, 'Meat Tornado': 25.00, 'A Li...
[ 11748, 334, 27112, 198, 198, 26272, 796, 1391, 198, 220, 220, 220, 705, 4677, 316, 11341, 10354, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 705, 54, 654, 10354, 807, 13, 405, 11, 198, 220, 220, 220, 220, 220, 220, 220, 705, 303...
2.125248
2,020
"""Uniform replay buffer.""" import functools import numpy as np import randomdict from alpacka import data class UniformReplayBuffer: """Replay buffer with uniform sampling. Stores datapoints in a queue of fixed size. Adding to a full buffer overwrites the oldest ones. """ def __init__(self,...
[ 37811, 3118, 6933, 24788, 11876, 526, 15931, 198, 198, 11748, 1257, 310, 10141, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 4738, 11600, 198, 198, 6738, 435, 8002, 64, 1330, 1366, 628, 198, 4871, 35712, 3041, 1759, 28632, 25, 1...
2.323364
2,140
# ------------------------------------------------------------------------------ # Experiment class that tracks experiments with different configurations. # The idea is that if multiple experiments are performed, all intermediate # stored files and model states are within a directory for that experiment. In # addition,...
[ 2, 16529, 26171, 198, 2, 29544, 1398, 326, 8339, 10256, 351, 1180, 25412, 13, 198, 2, 383, 2126, 318, 326, 611, 3294, 10256, 389, 6157, 11, 477, 19898, 198, 2, 8574, 3696, 290, 2746, 2585, 389, 1626, 257, 8619, 329, 326, 6306, 13, ...
2.103827
2,456
import os import shutil import stat import traceback from typing import ( Dict, Iterable, List, Optional, ) from norfs.fs.base import ( BaseFileSystem, FSObjectPath, FSObjectType, FileSystemOperationError, Path, ) from norfs.permissions import Policy, Perm, Scope _local_fs_perms...
[ 11748, 28686, 198, 11748, 4423, 346, 198, 11748, 1185, 198, 11748, 12854, 1891, 198, 198, 6738, 19720, 1330, 357, 198, 220, 220, 220, 360, 713, 11, 198, 220, 220, 220, 40806, 540, 11, 198, 220, 220, 220, 7343, 11, 198, 220, 220, 220...
2.173529
340
# Copyright (c) 2016 Luke San Antonio Bialecki # All rights reserved. import json import re from fixture import SQLAlchemyFixture from flask_testing import TestCase from . import data as test_data from .. import models, exceptions as ex from ..app import create_app API_PREFIX = '/api/v1'
[ 2, 15069, 357, 66, 8, 1584, 11336, 2986, 11366, 347, 498, 68, 49108, 198, 2, 1439, 2489, 10395, 13, 198, 198, 11748, 33918, 198, 11748, 302, 198, 198, 6738, 29220, 1330, 16363, 2348, 26599, 37, 9602, 198, 6738, 42903, 62, 33407, 1330,...
3.402299
87
# Generated by Django 3.1.7 on 2021-05-13 06:57 from django.conf import settings from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 22, 319, 33448, 12, 2713, 12, 1485, 9130, 25, 3553, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14...
3.019231
52
from hcipy import * import matplotlib.pyplot as plt import numpy as np pupil_grid = make_pupil_grid(512) N = 9 zernike_basis = make_zernike_basis(N, 1, pupil_grid, 4) for i,m in enumerate(zernike_basis): plt.subplot(3,3,i+1) imshow_field(zernike_basis[i], cmap='RdBu') plt.axis('off') plt.show() aperture...
[ 6738, 289, 66, 541, 88, 1330, 1635, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 198, 79, 929, 346, 62, 25928, 796, 787, 62, 79, 929, 346, 62, 25928, 7, 25836, 8, 198, 45, ...
2.153659
410
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
[ 2, 15069, 13130, 383, 309, 22854, 37535, 46665, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 705, 34156, 24036, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846,...
3.718499
373
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import sys import xlrd #import xlwt import csv import codecs from sklearn import svm from sklearn import preprocessing from sklearn.model_selection import train_test_split from sklearn.model_selection import cross_val_score from sklearn.model_selection import learning_cur...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 25064, 198, 11748, 2124, 75, 4372, 198, 2, 11748, 2124, 75, 46569, 198, 11748, 269, 21370, 198, 11748, ...
2.436866
1,774
"""report draft Revision ID: f6e0eb07959a Revises: 2e713373295b Create Date: 2018-03-08 10:09:45.220153 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = "f6e0eb07959a" down_revision = "2e713373295b" branch_labels = None depends_on = None
[ 37811, 13116, 4538, 198, 198, 18009, 1166, 4522, 25, 277, 21, 68, 15, 1765, 2998, 24, 3270, 64, 198, 18009, 2696, 25, 362, 68, 50055, 34770, 25710, 65, 198, 16447, 7536, 25, 2864, 12, 3070, 12, 2919, 838, 25, 2931, 25, 2231, 13, 1...
2.442623
122
""" LibriSpeech Datasets Copyright by https://github.com/willfrey """ from __future__ import print_function import fnmatch import glob import os from torchaudio import data def _get_files(directory, pattern, recursive=True): """ Return the full path to all files in directory matching the specified pattern....
[ 37811, 198, 25835, 380, 5248, 3055, 16092, 292, 1039, 198, 15269, 416, 3740, 1378, 12567, 13, 785, 14, 10594, 37425, 198, 37811, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 24714, 15699, 198, 11748, 15095, 198, ...
2.592342
444
from setuptools import setup, find_packages try: from setuptools import setup except ImportError: from distutils.core import setup setup( name="clarifai", description='Clarifai API Python Client', version='2.0.29', author='Clarifai', maintainer='Robert Wen', maintainer_email='robert@cl...
[ 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 198, 28311, 25, 198, 220, 220, 220, 422, 900, 37623, 10141, 1330, 9058, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220, 422, 1233, 26791, 13, 7295, 1330, 9058, 198, 198,...
2.082153
353
# Title: Lowest Common Ancestor of a Binary Tree # Runtime: 92 ms # Memory: 27.4 MB # Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None TreeNodeInfo = collections.namedtuple('TreeNodeInfo', ['parent', 'level'...
[ 2, 11851, 25, 7754, 395, 8070, 31200, 273, 286, 257, 45755, 12200, 198, 2, 43160, 25, 10190, 13845, 198, 2, 14059, 25, 2681, 13, 19, 10771, 198, 198, 2, 30396, 329, 257, 13934, 5509, 10139, 13, 198, 2, 1398, 12200, 19667, 25, 198, ...
2.306358
173
# Copyright (c) 2020 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, 12131, 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...
3.4
345
import jk_prettyprintobj # # # #
[ 628, 198, 11748, 474, 74, 62, 37784, 4798, 26801, 628, 628, 197, 2, 198, 197, 2, 198, 197, 2, 198, 198, 2, 628, 628, 628, 628, 198 ]
1.888889
27
from ._ironclust import ironclust
[ 6738, 47540, 1934, 565, 436, 1330, 6953, 565, 436 ]
3.666667
9
import time from win10toast import ToastNotifier toaster = ToastNotifier() toaster.show_toast("Prepara memo para: Empleado: juan Perez - Fecha de Designacion: 08-20-2018", "Python is 10 seconds awsm!", icon_path="custom.ico", duration=20) toaster.show_toast("Exa...
[ 11748, 640, 198, 6738, 1592, 940, 1462, 459, 1330, 46831, 3673, 7483, 198, 1462, 1603, 796, 46831, 3673, 7483, 3419, 198, 1462, 1603, 13, 12860, 62, 1462, 459, 7203, 6719, 1845, 64, 16155, 31215, 25, 2295, 1154, 4533, 25, 474, 7258, 2...
2.165441
272
from headers import lib from . import msg_opaques, finaliser from utils import voidp2bytes
[ 6738, 24697, 1330, 9195, 198, 6738, 764, 1330, 31456, 62, 26186, 13281, 11, 2457, 5847, 198, 6738, 3384, 4487, 1330, 7951, 79, 17, 33661, 628, 198 ]
3.576923
26
# -*- coding: utf8 -*- import cmath import math from Tkinter import * def load_naca(filename): '''Loads naca profile from file Files from http://airfoiltools.com/airfoil/naca4digit''' xy = [] f = file(filename) lines = f.readlines() scaleFactor = 200 for line in lines[1:]: # Referen...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 23, 532, 9, 12, 198, 11748, 269, 11018, 198, 11748, 10688, 198, 6738, 309, 74, 3849, 1330, 1635, 198, 198, 4299, 3440, 62, 77, 22260, 7, 34345, 2599, 198, 220, 220, 220, 705, 7061, 8912, 82, 2...
2.104312
1,716
import sublime_plugin import sublime import os
[ 11748, 41674, 62, 33803, 198, 11748, 41674, 198, 11748, 28686, 628, 628, 628, 198 ]
3.785714
14
# A plain hexbin-plot fig, ax = plt.subplots(figsize=(8, 8)) scatter = ax.hexbin(x, y, cmap=plt.cm.Blues_r, gridsize=10) ax.set_xlabel('X', fontsize=12) ax.set_ylabel('Y', fontsize=12) plt.tight_layout()
[ 2, 317, 8631, 17910, 8800, 12, 29487, 198, 198, 5647, 11, 7877, 796, 458, 83, 13, 7266, 489, 1747, 7, 5647, 7857, 16193, 23, 11, 807, 4008, 198, 1416, 1436, 796, 7877, 13, 33095, 8800, 7, 87, 11, 331, 11, 269, 8899, 28, 489, 83,...
2.125
96
import os import shutil import sys import traceback # Control data control_dir = 'control_files' control_files = ['mom.txt', 'me.txt'] # Input image data base_data_dir = os.path.expanduser(r"~\Pictures\wedding_pictures") # Output folder base_output_dir = r"E:\Josh_Wedding" # Populate correct subdirec...
[ 11748, 28686, 201, 198, 11748, 4423, 346, 201, 198, 11748, 25064, 201, 198, 11748, 12854, 1891, 201, 198, 201, 198, 2, 6779, 1366, 201, 198, 13716, 62, 15908, 796, 705, 13716, 62, 16624, 6, 201, 198, 13716, 62, 16624, 796, 37250, 3254...
2.027624
905
""" Language specific settings """ from typing import Dict, Set from shapiro.common import Rating, ranged_rating from shapiro.tools import log, signum from spacy.tokens import Token _log = log
[ 37811, 198, 32065, 2176, 6460, 198, 37811, 198, 6738, 19720, 1330, 360, 713, 11, 5345, 198, 198, 6738, 427, 499, 7058, 13, 11321, 1330, 12028, 11, 17929, 62, 8821, 198, 6738, 427, 499, 7058, 13, 31391, 1330, 2604, 11, 1051, 388, 198, ...
3.316667
60
import os import json import unittest import Bio.Entrez as Entrez from phenox.paths import PhenoXPaths from phenox.geo_data import GEOQuery paths = PhenoXPaths() test_data_path = os.path.join(paths.test_dir, 'data', 'test_geo_data.json')
[ 11748, 28686, 198, 11748, 33918, 198, 11748, 555, 715, 395, 198, 11748, 16024, 13, 14539, 21107, 355, 7232, 21107, 198, 6738, 6566, 1140, 13, 6978, 82, 1330, 34828, 78, 55, 15235, 82, 198, 6738, 6566, 1140, 13, 469, 78, 62, 7890, 1330...
2.645161
93
"""BuildAndInstallCPlusPlusProgram.py - Builds and installs a C++ program on Linux or Windows. Usage: BuildAndInstallCPlusPlusProgram.py --solution-name=<String> --cmake-generator=<String> --cmake-build-type=<String> --tests-project-name=<String> [--cmake-definitions=<String>] (--install|--no-install)""" import os ...
[ 37811, 15580, 1870, 15798, 34, 17860, 17860, 15167, 13, 9078, 532, 10934, 82, 290, 42027, 257, 327, 4880, 1430, 319, 7020, 393, 3964, 13, 201, 198, 201, 198, 28350, 25, 10934, 1870, 15798, 34, 17860, 17860, 15167, 13, 9078, 1377, 82, ...
2.943966
232
from app.models import PhotoNotification, PhotoNotificationFromTenant from flask import request import logging logger = logging.getLogger("logger") def add_notification(body): """ :param: body: json, same format as Photo add a column 'read' for nofitication """ try: body['read'] = False ...
[ 6738, 598, 13, 27530, 1330, 5555, 3673, 2649, 11, 5555, 3673, 2649, 4863, 24893, 415, 198, 6738, 42903, 1330, 2581, 198, 11748, 18931, 628, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7203, 6404, 1362, 4943, 628, 198, 4299, 751,...
2.596045
354
from . import feature_extraction from . import cluster from . import mode_estimate from . import kernclust from . import run_kernel_clustering
[ 6738, 764, 1330, 3895, 62, 2302, 7861, 198, 6738, 764, 1330, 13946, 198, 6738, 764, 1330, 4235, 62, 395, 1920, 198, 6738, 764, 1330, 479, 1142, 565, 436, 198, 6738, 764, 1330, 1057, 62, 33885, 62, 565, 436, 1586 ]
3.641026
39
from pathlib import Path from setuptools import setup readme = Path(__file__).parent.joinpath('README.md') if readme.exists(): with readme.open() as f: long_description = f.read() else: long_description = '-' setup( name='cwf2neo', version='0.77.0', packages=['cwf2neo'], include_packa...
[ 6738, 3108, 8019, 1330, 10644, 198, 198, 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 961, 1326, 796, 10644, 7, 834, 7753, 834, 737, 8000, 13, 22179, 6978, 10786, 15675, 11682, 13, 9132, 11537, 198, 361, 1100, 1326, 13, 1069, 1023, ...
2.428105
306
import argparse import logging from typing import Optional, Generator, Tuple, List, Union from geo_cli.etl.pipeline.dsa.dsa_pipeline import DsaPipeline from geo_cli.etl.pipeline.osn.osn_pipeline import OsnPipeline from geo_cli.etl.pipeline.reverse_beacon.reverse_beacon_pipeline import ReverseBeaconPipeline from geo_cl...
[ 11748, 1822, 29572, 198, 11748, 18931, 198, 6738, 19720, 1330, 32233, 11, 35986, 11, 309, 29291, 11, 7343, 11, 4479, 198, 198, 6738, 40087, 62, 44506, 13, 316, 75, 13, 79, 541, 4470, 13, 9310, 64, 13, 9310, 64, 62, 79, 541, 4470, ...
2.683168
202
"""rio-mbtiles package""" import sys import warnings __version__ = "1.6.0" if sys.version_info < (3, 7): warnings.warn( "Support for Python versions < 3.7 will be dropped in rio-mbtiles version 2.0", FutureWarning, stacklevel=2, )
[ 37811, 27250, 12, 2022, 83, 2915, 5301, 37811, 198, 198, 11748, 25064, 198, 11748, 14601, 198, 198, 834, 9641, 834, 796, 366, 16, 13, 21, 13, 15, 1, 198, 198, 361, 25064, 13, 9641, 62, 10951, 1279, 357, 18, 11, 767, 2599, 198, 220...
2.375
112
import os import re IMPORT_REGEX = re.compile(r"import\s*(?:static)*\s*(.+)")
[ 11748, 28686, 198, 11748, 302, 198, 198, 3955, 15490, 62, 31553, 6369, 796, 302, 13, 5589, 576, 7, 81, 1, 11748, 59, 82, 9, 7, 27514, 12708, 27493, 59, 82, 9, 7, 13, 28988, 4943, 628 ]
2.222222
36
import sys sys.path.append('/home/bsrivast/ssw_paper/project-CURRENNT-public/pyTools') from os.path import join, basename from ioTools import readwrite import kaldi_io import numpy as np args = sys.argv data_dir = args[1] out_dir = args[2] dataname = basename(data_dir) xvector_file = "exp/0007_voxceleb_v2_1a/exp/xv...
[ 11748, 25064, 198, 17597, 13, 6978, 13, 33295, 10786, 14, 11195, 14, 1443, 15104, 459, 14, 824, 86, 62, 20189, 14, 16302, 12, 34, 31302, 1677, 11251, 12, 11377, 14, 9078, 33637, 11537, 198, 198, 6738, 28686, 13, 6978, 1330, 4654, 11, ...
2.193966
464
# Make a program that reports the amino acid composition in a file of proteins #how many of each AA there are #| sort -nk2 -> sort by total number of AA import mcb185 import sys total = 0 count = {} #want to go through every AA in aseqeunce and count how many we have for name, seq in mcb185.read_fasta(sys.argv[1])...
[ 2, 6889, 257, 1430, 326, 3136, 262, 23206, 7408, 11742, 287, 257, 2393, 286, 15568, 198, 2, 4919, 867, 286, 1123, 15923, 612, 389, 198, 2, 91, 3297, 532, 77, 74, 17, 4613, 3297, 416, 2472, 1271, 286, 15923, 198, 198, 11748, 285, 2...
2.371429
560
import re from icon_validator.styling import * from icon_validator.rules.validator import KomandPluginValidator from icon_validator.exceptions import ValidationException
[ 11748, 302, 198, 198, 6738, 7196, 62, 12102, 1352, 13, 34365, 1359, 1330, 1635, 198, 6738, 7196, 62, 12102, 1352, 13, 38785, 13, 12102, 1352, 1330, 32364, 392, 37233, 47139, 1352, 198, 6738, 7196, 62, 12102, 1352, 13, 1069, 11755, 1330,...
3.822222
45
from cone.app.model import AppNode from cone.zodb.interfaces import IZODBEntry from cone.zodb.interfaces import IZODBEntryNode from node.behaviors import DefaultInit from node.behaviors import Lifecycle from node.behaviors import NodeChildValidate from node.behaviors import Nodify from node.behaviors import Storage fro...
[ 6738, 27763, 13, 1324, 13, 19849, 1330, 2034, 19667, 198, 6738, 27763, 13, 89, 375, 65, 13, 3849, 32186, 1330, 314, 57, 3727, 12473, 429, 563, 198, 6738, 27763, 13, 89, 375, 65, 13, 3849, 32186, 1330, 314, 57, 3727, 12473, 429, 563,...
3.125356
351
import utils.gpu as gpu from models.loss.segmentation_loss import SegmentationLosses import torch import torch.optim as optim from torch.utils.data import DataLoader import time import argparse from evals.evaluator import Evaluator from utils.tools import * import configs.deeplabv3plus_config_voc as cfg from ...
[ 11748, 3384, 4487, 13, 46999, 355, 308, 19944, 201, 198, 6738, 4981, 13, 22462, 13, 325, 5154, 341, 62, 22462, 1330, 1001, 5154, 341, 43, 793, 274, 201, 198, 11748, 28034, 201, 198, 11748, 28034, 13, 40085, 355, 6436, 201, 198, 6738, ...
2.650124
403
from threading import Lock import warnings
[ 6738, 4704, 278, 1330, 13656, 198, 11748, 14601, 198, 220, 220, 220, 220, 220, 220, 220, 220 ]
3
17
#!/usr/bin/python # Copyright 2002, 2003 Dave Abrahams # Copyright 2002, 2003, 2004, 2006 Vladimir Prus # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) import BoostBuild import os t = BoostBuild.Tester(translate_...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 2, 15069, 6244, 11, 5816, 9935, 16660, 82, 198, 2, 15069, 6244, 11, 5816, 11, 5472, 11, 4793, 14840, 1736, 385, 198, 2, 4307, 6169, 739, 262, 19835, 10442, 13789, 11, 10628, 352, 13, ...
2.219266
1,879
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 11, 15720, 602, 628 ]
2.891892
37
assert(getattr(B(), "key") == "got key")
[ 198, 30493, 7, 1136, 35226, 7, 33, 22784, 366, 2539, 4943, 6624, 366, 23442, 1994, 4943, 198 ]
2.470588
17
# Copyright 2020 The FedLearner 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, 12131, 383, 10169, 14961, 1008, 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.429752
968
import logging import kubernetes
[ 11748, 18931, 198, 11748, 479, 18478, 3262, 274, 628 ]
3.777778
9
import intrepyd import intrepyd.simulator import intrepyd.trace import unittest if __name__ == '__main__': unittest.main()
[ 11748, 493, 7856, 5173, 198, 11748, 493, 7856, 5173, 13, 14323, 8927, 198, 11748, 493, 7856, 5173, 13, 40546, 198, 11748, 555, 715, 395, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715,...
2.723404
47
#!/usr/bin/env python """Initialize the extinctions package.""" import os import glob # Automatically import all modules (python files) __all__ = [os.path.basename(m).replace('.py', '') for m in glob.glob("extinctions/*.py") if '__init__' not in m] + ['extern'] # Set to True if you want to import all pre...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 37811, 24243, 1096, 262, 1070, 31253, 5301, 526, 15931, 198, 198, 11748, 28686, 198, 11748, 15095, 198, 198, 2, 17406, 4142, 1330, 477, 13103, 357, 29412, 3696, 8, 198, 834, 439, ...
2.732919
161
import time import argparse import sys from cyber_py3 import cyber from modules.supervisor.proto.general_msg_pb2 import SV_info TIMEOUT_CONST_TIME = 0.5 STD_DELAY = 0.2 timer_set = True parser = argparse.ArgumentParser(description='Specify message content') parser.add_argument('--f', type=float, default=0, help='FATA...
[ 11748, 640, 198, 11748, 1822, 29572, 198, 11748, 25064, 198, 6738, 10075, 62, 9078, 18, 1330, 10075, 198, 6738, 13103, 13, 16668, 13131, 13, 1676, 1462, 13, 24622, 62, 19662, 62, 40842, 17, 1330, 20546, 62, 10951, 198, 198, 34694, 12425...
2.316736
723
from .layers import Time, Difference, LRS import numpy as np import tensorflow as tf tf.logging.set_verbosity(tf.logging.ERROR) import keras from keras import backend as K from keras.layers import Dense, BatchNormalization, Reshape, Conv1D, ZeroPadding1D, Lambda, Activation
[ 6738, 764, 75, 6962, 1330, 3862, 11, 43795, 11, 406, 6998, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 27110, 13, 6404, 2667, 13, 2617, 62, 19011, 16579, 7, 27110, 13, 6404, 2667, 13, 24908...
3.032967
91
import logging from .bot import BattleBot
[ 11748, 18931, 198, 6738, 764, 13645, 1330, 5838, 20630, 628 ]
4.3
10
import scipy.spatial.distance as dist from gensim.models import FastText import random import numpy as np import torch from dataset import AuxTables from .featurizer import Featurizer #GM
[ 11748, 629, 541, 88, 13, 2777, 34961, 13, 30246, 355, 1233, 198, 6738, 308, 641, 320, 13, 27530, 1330, 12549, 8206, 198, 11748, 4738, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 6738, 27039, 1330, 47105, 51, 2977, 198, ...
3.436364
55
#!/usr/bin/env python2 # -*- coding: utf-8 -*- from hermes_python.hermes import Hermes INTENT_HOW_ARE_YOU = "tmatthomasmartinch:how_are_you" INTENT_GOOD = "tmatthomasmartinch:feeling_good" INTENT_BAD = "bezzam:feeling_bad" INTENT_ALRIGHT = "bezzam:feeling_alright" INTENT_FILTER_FEELING = [INTENT_GOOD, INTENT_BAD, INT...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 17, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 607, 6880, 62, 29412, 13, 372, 6880, 1330, 41167, 198, 198, 12394, 3525, 62, 37181, 62, 12203, 62, 36981, 7...
2.210526
171
description = 'Stressi specific high temperature furnace with cooling down ' \ 'option' group = 'plugplay' includes = ['alias_T'] tango_base = 'tango://%s:10000/box/' % setupname devices = { 'T_%s' % setupname: device('nicos.devices.tango.TemperatureController', desc...
[ 11213, 796, 705, 1273, 601, 72, 2176, 1029, 5951, 42227, 351, 15134, 866, 705, 3467, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 18076, 6, 198, 198, 8094, 796, 705, 16875, 1759, 6, 198, 198, 42813, 7...
1.849365
1,102
""" module for GNSS processing """ from copy import deepcopy from enum import IntEnum from math import floor, sin, cos, sqrt, asin, atan2, fabs import numpy as np gpst0 = [1980, 1, 6, 0, 0, 0] class rCST(): """ class for constants """ CLIGHT = 299792458.0 MU_GPS = 3.9860050E14 MU_GAL...
[ 37811, 201, 198, 21412, 329, 15484, 5432, 7587, 201, 198, 37811, 201, 198, 201, 198, 6738, 4866, 1330, 2769, 30073, 201, 198, 6738, 33829, 1330, 2558, 4834, 388, 201, 198, 6738, 10688, 1330, 4314, 11, 7813, 11, 8615, 11, 19862, 17034, ...
1.689283
8,519
import pytrellis pytrellis.load_database("./testdata") c = pytrellis.Chip("testdev") bits = { (0, 0), (10, 0), (399, 0), (0, 98), (399, 97) } for b in bits: c.cram.set_bit(b[0], b[1], 1) bs = pytrellis.Bitstream.serialise_chip(c) bs.metadata.append("test_metadata") bs.write_bit("work/bitstream...
[ 11748, 12972, 83, 11252, 271, 198, 198, 9078, 83, 11252, 271, 13, 2220, 62, 48806, 7, 1911, 14, 9288, 7890, 4943, 198, 66, 796, 12972, 83, 11252, 271, 13, 49985, 7203, 9288, 7959, 4943, 198, 9895, 796, 1391, 198, 220, 220, 220, 357,...
1.99696
329
import os import random import torch import logging import torchvision.datasets as datasets from tensorboardX import SummaryWriter from models import resnet from visionmodel import VisionModel from arguments import get_args from utils import train, validate, Timer, build_task_name from constants import _RANDOM_RESHUFF...
[ 11748, 28686, 198, 11748, 4738, 198, 11748, 28034, 198, 11748, 18931, 198, 11748, 28034, 10178, 13, 19608, 292, 1039, 355, 40522, 198, 6738, 11192, 273, 3526, 55, 1330, 21293, 34379, 198, 198, 6738, 4981, 1330, 581, 3262, 198, 6738, 5761,...
2.938202
178
APIS = [{ 'field_name': 'SymbolDescription', 'field_price': 'AvgPrice', 'field_symbol': 'Symbol', 'name': 'SASE', 'root': 'http://www.sase.ba', 'params': { 'type': 19 }, 'request_type': "POST", 'status': 'FeedServices/HandlerChart.ashx', 'type': 'json' }, { 'field_name': 'Descrip...
[ 2969, 1797, 796, 685, 90, 198, 220, 220, 220, 705, 3245, 62, 3672, 10354, 705, 13940, 23650, 11828, 3256, 198, 220, 220, 220, 705, 3245, 62, 20888, 10354, 705, 48997, 18124, 3256, 198, 220, 220, 220, 705, 3245, 62, 1837, 23650, 10354,...
2.264822
253
#coding:utf-8 #通过组合最小二乘法和梯度下降法,可以得到线性回归 wheat_and_bread = [[1, 6], [2, 5], [3, 7], [4, 10]] s = gradient_descent_runner(wheat_and_bread, 1, 1, 0.01, 100) print s
[ 2, 66, 7656, 25, 40477, 12, 23, 220, 198, 2, 34460, 248, 32573, 229, 163, 119, 226, 28938, 230, 17312, 222, 22887, 237, 12859, 234, 20046, 246, 37345, 243, 161, 240, 234, 162, 95, 107, 41753, 99, 10310, 233, 165, 247, 235, 37345, ...
1.330709
127
import pytest import colossalai from colossalai.context.parallel_mode import ParallelMode import torch.multiprocessing as mp from colossalai.testing import rerun_if_address_is_in_use from colossalai.utils.cuda import get_current_device from colossalai.utils import free_port from colossalai.utils import ColoInitContext ...
[ 11748, 12972, 9288, 198, 11748, 41197, 1872, 198, 6738, 41197, 1872, 13, 22866, 13, 1845, 29363, 62, 14171, 1330, 42945, 19076, 198, 11748, 28034, 13, 16680, 541, 305, 919, 278, 355, 29034, 198, 6738, 41197, 1872, 13, 33407, 1330, 302, ...
3.143333
300
from .base import PipBaseRecipe
[ 6738, 764, 8692, 1330, 25149, 14881, 37523, 628 ]
4.125
8
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) PROJECT_DIR = os.path.dirname(BASE_DIR) SECRET_KEY = os.getenv('SECRET_KEY') DEBUG = bool(os.getenv('DEBUG', True)) SQL_ECHO = False DATABASES = { 'default': { 'ENGINE': 'sqlite', 'HOST': os.getenv('DEFAULT_HOST')...
[ 11748, 28686, 628, 198, 33, 11159, 62, 34720, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 397, 2777, 776, 7, 834, 7753, 834, 22305, 198, 31190, 23680, 62, 34720, 796, 28686, 13, ...
2.073239
355
import fnmatch import os import sys dirs = [ ] types = [ ] excludes = [ ] files = [ ] # Default to accepting a list of directories first curArray = dirs # Iterate over the arguments and add them to the arrays for i in range(1, len(sys.argv)): arg = sys.argv[i] if arg == "-dirs": curArray = dirs ...
[ 11748, 24714, 15699, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 15908, 82, 796, 685, 2361, 198, 19199, 796, 685, 2361, 198, 1069, 13955, 796, 685, 2361, 198, 16624, 796, 685, 2361, 198, 198, 2, 15161, 284, 12598, 257, 1351, 286, ...
2.169757
701
#!/usr/bin/python AA = [5, 3, 4, 7, 1, 6, 2, 8] merg_sort(AA, 0, len(AA)-1) print(AA) AA = [23,34,44,3,2,3,44,5,66,7,5, 3, 4, 7, 1, 6, 2, 8] merg_sort(AA, 0, len(AA)-1) print(AA) AA = [1000,999,998,997,996,995,994,993,992,991,990,989,988,987,986,985,984,983,982,981,980,979,978,977,976,975,974,973,972,971,970,969,96...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 628, 198, 3838, 796, 685, 20, 11, 513, 11, 604, 11, 767, 11, 352, 11, 718, 11, 362, 11, 807, 60, 198, 647, 70, 62, 30619, 7, 3838, 11, 657, 11, 18896, 7, 3838, 13219, 16, 8, 198, 4798, 7...
1.776389
2,321
import ubermagutil as uu import discretisedfield as df import ubermagutil.typesystem as ts from .energyterm import EnergyTerm @uu.inherit_docs @ts.typesystem(A=ts.Parameter(descriptor=ts.Scalar(), otherwise=df.Field)) class Exchange(EnergyTerm): r"""Exchange energy term. .. math:: w = - A \mathbf{m}...
[ 11748, 48110, 19726, 22602, 355, 334, 84, 198, 11748, 1221, 1186, 1417, 3245, 355, 47764, 198, 11748, 48110, 19726, 22602, 13, 19199, 6781, 355, 40379, 198, 6738, 764, 22554, 4354, 1330, 6682, 40596, 628, 198, 31, 12303, 13, 259, 372, 2...
2.590769
650
# Copyright 2020 The TensorFlow Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
[ 2, 15069, 12131, 383, 309, 22854, 37535, 46665, 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, ...
3.613043
230
import re from kaori.adapters.slack import SlackCommand, SlackMessage, SlackAdapter class PingCommand(SlackCommand): """usage: {bot} ping - respond with pong""" @staticmethod
[ 11748, 302, 198, 198, 6738, 38387, 10145, 13, 324, 12126, 13, 6649, 441, 1330, 36256, 21575, 11, 36256, 12837, 11, 36256, 47307, 628, 198, 4871, 34263, 21575, 7, 11122, 441, 21575, 2599, 198, 220, 220, 220, 37227, 26060, 25, 1391, 13645...
3.280702
57
#!/usr/bin/env python """Mixture of Gaussians. Perform inference with Metropolis-Hastings. It utterly fails. This is because we are proposing a sample in a high-dimensional space. The acceptance ratio is so small that it is unlikely we'll ever accept a proposed sample. A Gibbs-like extension ("MH within Gibbs"), which...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 44, 9602, 286, 12822, 1046, 1547, 13, 198, 198, 5990, 687, 32278, 351, 3395, 25986, 12, 39, 459, 654, 13, 632, 15950, 10143, 13, 770, 318, 198, 13893, 356, 389, 24634, 257, 62...
2.453386
1,019
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'mainwindow.ui', # licensing of 'mainwindow.ui' applies. # # Created: Wed Sep 29 12:04:37 2021 # by: pyside2-uic running on PySide2 5.13.2 # # WARNING! All changes made in this file will be lost! from PySide2 import QtCore, QtGui, QtWi...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 5178, 7822, 7560, 422, 3555, 334, 72, 2393, 705, 12417, 17497, 13, 9019, 3256, 198, 2, 15665, 286, 705, 12417, 17497, 13, 9019, 6, 8991, 13, 198, 2, 198, 2, ...
2.747899
119
import torch import pyro # The basic unit of probabilistic programming is the stochastic function, it's composed of: # 1. deterministic function (e.g. function, nn.Module) # 2. primitive stochastic functions that calls a random number generator # Pyro calls stochastic functions "models" # It seems like stofuncs are da...
[ 11748, 28034, 198, 11748, 12972, 305, 198, 198, 2, 383, 4096, 4326, 286, 1861, 14991, 2569, 8300, 318, 262, 3995, 354, 3477, 2163, 11, 340, 338, 13160, 286, 25, 198, 2, 352, 13, 2206, 49228, 2163, 357, 68, 13, 70, 13, 2163, 11, 29...
4.134938
1,371
#!/usr/bin/python import os import json import base64 import io import re import uuid import time import shutil import argparse import shelve import sys import glob import copy import StringIO import uuid from collections import OrderedDict os.umask(0022) upg_ver = 4.0 cur_dir = os.path.dirname(os.path.realpath(__f...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 11748, 28686, 198, 11748, 33918, 198, 11748, 2779, 2414, 198, 11748, 33245, 198, 11748, 302, 198, 11748, 334, 27112, 198, 11748, 640, 198, 11748, 4423, 346, 198, 11748, 1822, 29572, 198, 1...
2.421162
4,319
import statzcw if __name__ == '__main__': print(zvariance([1,2,3,4,5]))
[ 11748, 1185, 89, 66, 86, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 3601, 7, 89, 25641, 590, 26933, 16, 11, 17, 11, 18, 11, 19, 11, 20, 60, 4008 ]
2
38
import graphene from graphene_django import DjangoObjectType from .models import Qualifying
[ 11748, 42463, 198, 6738, 42463, 62, 28241, 14208, 1330, 37770, 10267, 6030, 198, 198, 6738, 764, 27530, 1330, 9537, 4035, 628 ]
4.47619
21
from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.pipeline import Pipeline from sklearn.ensemble import ExtraTreesClassifier # Create pipeline from sklearn.feature_extraction.text import CountVectorizer from sklearn.feature_extraction.text import TfidfTransformer from sklearn.naive_bayes import M...
[ 6738, 1341, 35720, 13, 30053, 62, 2302, 7861, 13, 5239, 1330, 309, 69, 312, 69, 38469, 7509, 198, 6738, 1341, 35720, 13, 79, 541, 4470, 1330, 37709, 198, 6738, 1341, 35720, 13, 1072, 11306, 1330, 17221, 51, 6037, 9487, 7483, 198, 2, ...
2.469663
445
import rospy import geometry_msgs.msg import numpy as np import time from nav_msgs.msg import Odometry import math #Pub Code cmd = geometry_msgs.msg.Twist() pub = rospy.Publisher('/cmd_vel', geometry_msgs.msg.Twist, queue_size=10) rospy.init_node('SQ_F', anonymous=True) rate = rospy.Rate(50) # 50hz #Sub code x=0.0...
[ 11748, 686, 2777, 88, 198, 11748, 22939, 62, 907, 14542, 13, 19662, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 640, 198, 198, 6738, 6812, 62, 907, 14542, 13, 19662, 1330, 10529, 15748, 198, 11748, 10688, 198, 198, 2, 14876, 6127, ...
2.29108
213
from lsh import Cluster, jaccard_sim from .utils import * def test_same_set(): """A set should be clustered with itself""" s = randset() cluster = Cluster() cluster.add_set(s) cluster.add_set(s) assert len(cluster.get_sets()) == 1 def test_similar_sets(): """Two similar sets should be cl...
[ 6738, 300, 1477, 1330, 38279, 11, 474, 4134, 446, 62, 14323, 198, 198, 6738, 764, 26791, 1330, 1635, 628, 198, 4299, 1332, 62, 31642, 62, 2617, 33529, 198, 220, 220, 220, 37227, 32, 900, 815, 307, 49480, 351, 2346, 37811, 198, 220, ...
2.435772
615
from django.core.management.base import BaseCommand, CommandError from question_api.models import ( Question, Answer, Tenant, User)
[ 6738, 42625, 14208, 13, 7295, 13, 27604, 13, 8692, 1330, 7308, 21575, 11, 9455, 12331, 198, 198, 6738, 1808, 62, 15042, 13, 27530, 1330, 357, 198, 220, 220, 220, 18233, 11, 23998, 11, 9368, 415, 11, 11787, 8, 198 ]
3.512821
39
#!/usr/bin/env python """ Top level ``eval`` module. """ import tokenize import warnings from pandas.util._validators import validate_bool_kwarg from pandas.core.computation.engines import _engines from pandas.core.computation.scope import _ensure_scope from pandas.io.formats.printing import pprint_thing def _ch...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 37811, 198, 9126, 1241, 7559, 18206, 15506, 8265, 13, 198, 37811, 198, 198, 11748, 11241, 1096, 198, 11748, 14601, 198, 198, 6738, 19798, 292, 13, 22602, 13557, 12102, 2024, 1330, 2...
2.504528
4,527
from tkinter import * import tkinter.messagebox from functools import partial import Reportes.Tabla as ReporteTabla import ascendente as asc import ast.Entorno as Entorno import ast.Ast as Ast import Reportes.Errores as Reporte obj = gui() obj.iniciar()
[ 6738, 256, 74, 3849, 1330, 1635, 201, 198, 11748, 256, 74, 3849, 13, 20500, 3524, 201, 198, 6738, 1257, 310, 10141, 1330, 13027, 201, 198, 11748, 6358, 274, 13, 33349, 5031, 355, 6358, 68, 33349, 5031, 201, 198, 11748, 34800, 21872, 3...
2.571429
112
#This script creates a directory called Fake_Experiments and puts all of the fake JSON files in there, #These will be used by import_json.py for importing to mongo #It then creates a file called bulkfile.json which is suitable for uploading to elasticsearch using the /_bulk endpoint import random import json from faker...
[ 2, 1212, 4226, 8075, 257, 8619, 1444, 33482, 62, 20468, 6800, 290, 7584, 477, 286, 262, 8390, 19449, 3696, 287, 612, 11, 198, 2, 4711, 481, 307, 973, 416, 1330, 62, 17752, 13, 9078, 329, 33332, 284, 285, 25162, 198, 2, 1026, 788, ...
3.2875
240
"""Provides integration with iCloud devices""" import asyncio import os from typing import TYPE_CHECKING, Any, Dict, cast import voluptuous as vol from pyicloud import PyiCloudService from pyicloud.services.findmyiphone import AppleDevice from homecontrol.const import ItemStatus from homecontrol.dependencies.action_d...
[ 37811, 15946, 1460, 11812, 351, 42076, 4410, 37811, 198, 11748, 30351, 952, 198, 11748, 28686, 198, 6738, 19720, 1330, 41876, 62, 50084, 2751, 11, 4377, 11, 360, 713, 11, 3350, 198, 198, 11748, 2322, 37623, 5623, 355, 2322, 198, 6738, 1...
2.818061
753
import itertools import sys from heapq import heappush, heappop # from guppy import hpy def BenchmarkTSP(model, LoadPickle=False): """used for evaluating the performance of creating preprocessing data""" h = hpy() warehouseData = readWarehouse(sys.argv[1]) # warehouseData contains {"items","minm...
[ 11748, 340, 861, 10141, 198, 11748, 25064, 198, 6738, 24575, 80, 1330, 339, 1324, 1530, 11, 339, 1324, 404, 198, 198, 2, 422, 915, 14097, 1330, 289, 9078, 628, 628, 628, 628, 628, 198, 4299, 25187, 4102, 51, 4303, 7, 19849, 11, 8778...
2.711911
361
# Module to solve the Thomas-Fermi problem in 1D import numpy as np def create_K_matrix(x, E_scale=1.0, sigma=1.0, x_0 = 1.0): ''' Input: x : discrete 1D grid E_scale : energy scale for the K matrix, default units is eV sigma : impact paramter to prevent blow up at the same point ...
[ 2, 19937, 284, 8494, 262, 5658, 12, 37, 7780, 72, 1917, 287, 352, 35, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 4299, 2251, 62, 42, 62, 6759, 8609, 7, 87, 11, 412, 62, 9888, 28, 16, 13, 15, 11, 264, 13495, 28, 16, 13,...
2.150674
2,449
from typing import List if __name__ == '__main__': print(Solution.rob([2, 3, 2])) print(Solution.rob([0])) print(Solution.rob([1, 2, 3, 1])) print(Solution.rob([2, 3, 2, 50, 2])) print(Solution.rob([2, 3, 2, 50, 2, 3, 1, 30, 5, 31]))
[ 6738, 19720, 1330, 7343, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 3601, 7, 46344, 13, 22609, 26933, 17, 11, 513, 11, 362, 60, 4008, 198, 220, 220, 220, 3601, 7, 46344, 13, 22609, 26933,...
2.17094
117
""" Set of unit tests for IndexDigestSource """ import unittest from ..sources import IndexDigestSource class IndexDigestSourceTestClass(unittest.TestCase): """ Unit tests for IndexDigestSource class """
[ 37811, 198, 7248, 286, 4326, 5254, 329, 12901, 19511, 395, 7416, 198, 37811, 198, 11748, 555, 715, 395, 198, 198, 6738, 11485, 82, 2203, 1330, 12901, 19511, 395, 7416, 628, 198, 4871, 12901, 19511, 395, 7416, 14402, 9487, 7, 403, 715, ...
3.173913
69
from sklearn.metrics import confusion_matrix print(confusion_matrix(y_test, np.rint(y_pred))) cf_10_3 = confusion_matrix(y_test, np.rint(y_pred))
[ 6738, 1341, 35720, 13, 4164, 10466, 1330, 10802, 62, 6759, 8609, 198, 198, 4798, 7, 10414, 4241, 62, 6759, 8609, 7, 88, 62, 9288, 11, 45941, 13, 22272, 7, 88, 62, 28764, 22305, 198, 198, 12993, 62, 940, 62, 18, 796, 10802, 62, 675...
2.508475
59
import os import sys import argparse __cur_dir = os.path.dirname(os.path.realpath(__file__)) figs_dir = os.path.join(__cur_dir, 'figures/') target_dir = os.path.join(__cur_dir, 'targets/') if not os.path.exists(target_dir): os.mkdir(target_dir) template_fp = os.path.join(__cur_dir, 'fig_template.tmp') ...
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 1822, 29572, 198, 198, 834, 22019, 62, 15908, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 5305, 6978, 7, 834, 7753, 834, 4008, 198, 5647, 82, 62, 15908, 796, 28686, 13, 6...
2.287709
358
#-*- coding: utf-8 -*- import argparse from http.server import HTTPServer, BaseHTTPRequestHandler import json import subprocess import os if __name__ == '__main__': parser = argparse.ArgumentParser(description='Echo HTTP server.') parser.add_argument('-a', '--address', help='default: 0.0.0.0'...
[ 2, 12, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 1822, 29572, 198, 6738, 2638, 13, 15388, 1330, 38288, 18497, 11, 7308, 40717, 18453, 25060, 198, 11748, 33918, 198, 11748, 850, 14681, 198, 11748, 28686, 198, 2...
2.53527
241
from keras import constraints from keras import backend as K class NonPos(constraints.Constraint): """Constrains the weights to be non-positive. """
[ 6738, 41927, 292, 1330, 17778, 198, 6738, 41927, 292, 1330, 30203, 355, 509, 628, 198, 4871, 8504, 21604, 7, 1102, 2536, 6003, 13, 3103, 2536, 2913, 2599, 198, 220, 220, 220, 37227, 3103, 2536, 1299, 262, 19590, 284, 307, 1729, 12, 24...
3.244898
49
from QUANTAXIS.QAUtil import (QASETTING, DATABASE, QA_util_log_info) from QUANTAXIS.QAUtil.QAParameter import (FREQUENCE) import pandas as pd from datetime import datetime import time from dateutil.tz import tzutc import pymongo from QUANTAXIS.QAUtil.QADate_Adv import (QA_util_str_to_Unix_timestamp, QA_util_datetime_t...
[ 6738, 19604, 1565, 5603, 55, 1797, 13, 48, 32, 18274, 346, 1330, 357, 48, 1921, 2767, 48996, 11, 360, 1404, 6242, 11159, 11, 1195, 32, 62, 22602, 62, 6404, 62, 10951, 8, 198, 6738, 19604, 1565, 5603, 55, 1797, 13, 48, 32, 18274, 3...
1.951946
3,288
#!/usr/bin/env python import os import re import click import requests from string import Template def degrees_to_cardinal(degrees): ''' Return the cardinal direction representing a given 'degrees' ''' cardinal = ['N', 'NNE', 'NE', 'ENE', 'E', 'ESE', 'SE', 'SSE', 'S', 'SSW', 'SW', 'WS...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 3904, 198, 11748, 7007, 198, 6738, 4731, 1330, 37350, 628, 198, 4299, 7370, 62, 1462, 62, 9517, 1292, 7, 13500, 6037, 2599, 198, 220, 22...
2.310394
2,790
from annogesiclib.helper import Helper from annogesiclib.gff3 import Gff3Parser def get_terminal(genes, inters, gene_len, type_, file_type): '''deal with the intergenic region which located at two ends''' if type_ == "start": for gene in genes: if (gene.strand == "-"): in...
[ 6738, 1529, 519, 274, 291, 8019, 13, 2978, 525, 1330, 5053, 525, 198, 6738, 1529, 519, 274, 291, 8019, 13, 70, 487, 18, 1330, 402, 487, 18, 46677, 628, 628, 198, 4299, 651, 62, 23705, 282, 7, 5235, 274, 11, 987, 82, 11, 9779, 62...
1.771807
3,703
import os import requests import json from github import Github if __name__ == '__main__': pass
[ 11748, 28686, 198, 11748, 7007, 198, 11748, 33918, 198, 6738, 33084, 1330, 38994, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1208, 198 ]
3.258065
31