content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
# iframe does not fire onload event if the response's content-type is not # text/plain or text/html so this script exists if you want to test a 404 load # in an iframe.
[ 2, 611, 28073, 857, 407, 2046, 319, 2220, 1785, 611, 262, 2882, 338, 2695, 12, 4906, 318, 407, 198, 2, 2420, 14, 25638, 393, 2420, 14, 6494, 523, 428, 4226, 7160, 611, 345, 765, 284, 1332, 257, 32320, 3440, 198, 2, 287, 281, 611, ...
3.595745
47
# -*- coding: utf-8 -*- from __future__ import absolute_import import pytest import salt.modules.chocolatey as choco import salt.utils.platform from tests.support.case import ModuleCase from tests.support.helpers import destructiveTest from tests.support.unit import skipIf @skipIf(not salt.utils.platform.is_windows...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 11748, 12972, 9288, 198, 11748, 8268, 13, 18170, 13, 354, 9140, 88, 355, 442, 25634, 198, 11748, 8268, 13,...
2.684713
314
# Desenvolva um algoritmo em Python que exiba os números de 1 a 10 for i in range(1,11,1): print(i)
[ 2, 2935, 268, 10396, 6862, 23781, 435, 7053, 270, 5908, 795, 11361, 8358, 409, 23718, 28686, 299, 21356, 647, 418, 390, 352, 257, 838, 628, 198, 1640, 1312, 287, 2837, 7, 16, 11, 1157, 11, 16, 2599, 198, 220, 3601, 7, 72, 8 ]
2.395349
43
""" Authentication Managment API """ import json from flask import jsonify, request from flask_restful import Resource, reqparse from aaxus import rest_api from aaxus.models.user import User from aaxus.models.token import RevokedToken from aaxus.services.confirm_email import generate_confirmation_token, confirm_token f...
[ 37811, 48191, 1869, 363, 434, 7824, 37227, 198, 11748, 33918, 198, 6738, 42903, 1330, 33918, 1958, 11, 2581, 198, 6738, 42903, 62, 2118, 913, 1330, 20857, 11, 43089, 29572, 198, 6738, 257, 897, 385, 1330, 1334, 62, 15042, 198, 6738, 257...
3.5
206
from widgets.button import DraggableButton from prefabs.inputter import pressed from base_node import get_surface from widgets.progressbar import * from prefabs.surface import blit from shape import Circle import pygame __all__ = [ 'HSeekbar' ]
[ 6738, 40803, 13, 16539, 1330, 1583, 9460, 540, 21864, 198, 6738, 7694, 8937, 13, 15414, 353, 1330, 12070, 198, 6738, 2779, 62, 17440, 1330, 651, 62, 42029, 198, 6738, 40803, 13, 33723, 5657, 1330, 1635, 198, 6738, 7694, 8937, 13, 42029,...
3.405405
74
from flask import current_app from flask_login import UserMixin, AnonymousUserMixin import hashlib from itsdangerous import TimedJSONWebSignatureSerializer as Serializer from werkzeug.security import generate_password_hash, check_password_hash from . import db, login_manager login_manager.anonymous_user = Anonymo...
[ 6738, 42903, 1330, 1459, 62, 1324, 198, 6738, 42903, 62, 38235, 1330, 11787, 35608, 259, 11, 19200, 12982, 35608, 259, 198, 11748, 12234, 8019, 198, 6738, 663, 38537, 516, 1330, 5045, 276, 40386, 13908, 11712, 1300, 32634, 7509, 355, 2328...
3.2
115
""" Utility functions to support logging for the fitbenchmarking project. """ import logging import sys def setup_logger(log_file='./fitbenchmarking.log', name='fitbenchmarking', append=False, level='INFO'): """ Define the location and style of the log file. :param log_file: path to the ...
[ 37811, 198, 18274, 879, 5499, 284, 1104, 18931, 329, 262, 4197, 26968, 4102, 278, 198, 16302, 13, 198, 37811, 198, 11748, 18931, 198, 11748, 25064, 628, 198, 4299, 9058, 62, 6404, 1362, 7, 6404, 62, 7753, 28, 4458, 14, 11147, 26968, 4...
2.644472
796
import numpy as np from astropy.wcs import WCS from glue.core import Data, DataCollection from glue.plugins.wcs_autolinking.wcs_autolinking import wcs_autolink, WCSLink from glue.core.link_helpers import MultiLink from glue.core.tests.test_state import clone from glue.dialogs.link_editor.state import EditableLinkFunct...
[ 11748, 299, 32152, 355, 45941, 198, 198, 6738, 6468, 28338, 13, 12712, 1330, 45410, 198, 6738, 22749, 13, 7295, 1330, 6060, 11, 6060, 36307, 198, 6738, 22749, 13, 37390, 13, 12712, 62, 2306, 349, 8040, 13, 12712, 62, 2306, 349, 8040, ...
3.37
100
import logging import logging.config import yaml class StderrFilter(logging.Filter): """Simple filter which only outputs the following levels: WARNING, ERROR, CRITICAL. """ class FormatRecordFactory(logging.LogRecord): """A factory which formats messages with str.format.""" def getMessage(self): ...
[ 11748, 18931, 198, 11748, 18931, 13, 11250, 198, 11748, 331, 43695, 628, 198, 4871, 520, 1082, 81, 22417, 7, 6404, 2667, 13, 22417, 2599, 198, 220, 220, 220, 37227, 26437, 8106, 543, 691, 23862, 262, 1708, 2974, 25, 39410, 11, 33854, ...
2.832618
233
from django.shortcuts import render, redirect from django.views.generic import TemplateView from .forms import BrukerForm from .models import bruker from vaskelister.models import Vaskeliste from studentby.models import studentby from kollektiv.models import kollektiv
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 18941, 198, 6738, 42625, 14208, 13, 33571, 13, 41357, 1330, 37350, 7680, 198, 6738, 764, 23914, 1330, 8274, 6122, 8479, 198, 6738, 764, 27530, 1330, 18145, 6122, 198, 6738, 34439, 7750...
3.69863
73
# -*- coding: utf-8 -*- # @Time : 2020/12/27 10:58 PM # @Author : Kevin from src.utils.sentence_process import cut_sentence_by_character from tqdm import tqdm from src import config if __name__ == '__main__': # cut_chat_data_by_character() clean_blank_pair()
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2488, 7575, 220, 220, 220, 1058, 12131, 14, 1065, 14, 1983, 838, 25, 3365, 3122, 198, 2, 2488, 13838, 220, 1058, 7939, 198, 6738, 12351, 13, 26791, 13, 34086, 594, ...
2.513761
109
import numpy as np import matplotlib.pyplot as plt from matplotlib.widgets import Slider, Button import math from scipy.optimize import fsolve #Define Link Lengths l1 = 2 l2 = 4.977 l3 = 2 l4 = 4 l5 = 1.5 l6 = 6 #Initial Motorized Joint Angles theta_1 = -(math.pi/180)*110 theta_4 = -(math.pi/180)*80 #Fixed Joint A ...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 2603, 29487, 8019, 13, 28029, 11407, 1330, 3454, 1304, 11, 20969, 198, 11748, 10688, 198, 6738, 629, 541, 88, 13, 40085, 1096, 1330,...
2.149525
1,264
import unittest import numpy as np from RyStats.common import entropy, hypersphere, procrustes_rotation class TestCommonFunctions(unittest.TestCase): """Tests fixture for the common functions.""" def test_entropy(self): """Testing entropy calculations.""" # One value in each column should h...
[ 11748, 555, 715, 395, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 11089, 29668, 13, 11321, 1330, 40709, 11, 45086, 79, 1456, 11, 386, 6098, 436, 274, 62, 10599, 341, 198, 198, 4871, 6208, 17227, 24629, 2733, 7, 403, 715, ...
2.279851
1,072
# 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, ...
2.909505
1,757
from config import get_config from utils import prepare_dirs_and_logger, save_config if __name__ == "__main__": config, unparsed = get_config() main(config)
[ 6738, 4566, 1330, 651, 62, 11250, 198, 6738, 3384, 4487, 1330, 8335, 62, 15908, 82, 62, 392, 62, 6404, 1362, 11, 3613, 62, 11250, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 4566, 11, ...
2.8
60
import os PROJECT_ROOT_DIR = os.path.abspath(os.path.join(__file__, os.pardir, os.pardir))
[ 11748, 28686, 198, 198, 31190, 23680, 62, 13252, 2394, 62, 34720, 796, 28686, 13, 6978, 13, 397, 2777, 776, 7, 418, 13, 6978, 13, 22179, 7, 834, 7753, 834, 11, 28686, 13, 26037, 343, 11, 28686, 13, 26037, 343, 4008 ]
2.275
40
import time from collections import deque from models.eligibility_trace_tf.world.memory.n_step_replay_memory import NStepReplayMemory, Transition, NStepTransition
[ 11748, 640, 198, 198, 6738, 17268, 1330, 390, 4188, 198, 198, 6738, 4981, 13, 417, 328, 2247, 62, 40546, 62, 27110, 13, 6894, 13, 31673, 13, 77, 62, 9662, 62, 260, 1759, 62, 31673, 1330, 399, 8600, 3041, 1759, 30871, 11, 40658, 11, ...
3.458333
48
import re
[ 11748, 302, 628, 198 ]
3
4
from util.functions import * from util import * from tqdm import tqdm import matplotlib.pyplot as plt import itertools def probabilistic_ordinal_embedding_prepare_data_for_training(dataset, model): """ """ triplets = [] for word...
[ 6738, 7736, 13, 12543, 2733, 1330, 1635, 198, 6738, 7736, 1330, 1635, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 340, 861, 10141, 628, 220, 220, 220, 220,...
1.993455
764
# -*- coding: utf-8 -*- """ Created on Sun Nov 12 17:17:09 2017 @author: sh """ import numpy as np import pandas as pd import matplotlib.pyplot as plt import pickle import tools_lib as tool import math load_predata_path = 'F:\\tcds\\shop\\predata\\' file = open(load_predata_path + 'data_mall_shop.pkl'...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 41972, 319, 3825, 5267, 1105, 1596, 25, 1558, 25, 2931, 2177, 201, 198, 201, 198, 31, 9800, 25, 427, 201, 198, 37811, 201, 198, 201, 198, 11748, ...
1.769715
2,384
import logging import threading from time import sleep import pytest from parla import Parla, TaskEnvironment from parla.cpu import cpu from parla.environments import EnvironmentComponentInstance, EnvironmentComponentDescriptor from parla.tasks import * logger = logging.getLogger(__name__) def repetitions(): ""...
[ 11748, 18931, 198, 11748, 4704, 278, 198, 6738, 640, 1330, 3993, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 1582, 5031, 1330, 2547, 5031, 11, 15941, 31441, 198, 6738, 1582, 5031, 13, 36166, 1330, 42804, 198, 6738, 1582, 5031, 13, 268...
2.846868
431
from unittest import mock from datetime import date from django.test import SimpleTestCase from mtp_common.dates import WorkdayChecker TEST_HOLIDAYS = {'england-and-wales': { 'division': 'england-and-wales', 'events': [ {'title': 'Boxing Day', 'date': '2016-12-26', 'notes': '', 'bunting': True}, ...
[ 6738, 555, 715, 395, 1330, 15290, 198, 6738, 4818, 8079, 1330, 3128, 198, 198, 6738, 42625, 14208, 13, 9288, 1330, 17427, 14402, 20448, 198, 198, 6738, 285, 34788, 62, 11321, 13, 19581, 1330, 5521, 820, 9787, 263, 198, 198, 51, 6465, ...
2.511905
168
""" Test attention networks on ImageNet. """ gpu = input('GPU: ') type_category_set = input('Category-set type in {diff, sem, sim, size}: ') version_wnids = input('Version number (WNIDs): ') version_weights = input('Version number (weights): ') start = int(input('Start category set: ')) stop = int(input('Stop category...
[ 37811, 198, 14402, 3241, 7686, 319, 7412, 7934, 13, 198, 37811, 198, 198, 46999, 796, 5128, 10786, 33346, 25, 705, 8, 198, 4906, 62, 22872, 62, 2617, 796, 5128, 10786, 27313, 12, 2617, 2099, 287, 1391, 26069, 11, 5026, 11, 985, 11, ...
2.50675
963
statement = """"Institute of Medical Biology, Chinese Academy of Medical Sciences",Vaccine,Inactivated virus,Phase II,Phase II began June 2020,Inactivated,NCT04412538,Unknown,,,N/A,https://docs.google.com/document/d/1Y4nCJJ4njzD1wiHbufCY6gqfRmj49Qn_qNgOJD62Wik/edit,6/23/2020""" parseRowToCell(statement)
[ 26090, 796, 13538, 15931, 6310, 3678, 286, 8366, 24698, 11, 3999, 8581, 286, 8366, 13473, 1600, 53, 4134, 500, 11, 818, 33106, 9471, 11, 35645, 2873, 11, 35645, 2873, 2540, 2795, 12131, 11, 818, 33106, 11, 45, 4177, 43977, 11623, 2548, ...
2.684211
114
from PyQt5 import QtWidgets, QtGui, QtCore # import PyQt5 widgets from cats import cat
[ 6738, 9485, 48, 83, 20, 1330, 33734, 54, 312, 11407, 11, 33734, 8205, 72, 11, 33734, 14055, 220, 1303, 1330, 9485, 48, 83, 20, 40803, 198, 198, 6738, 11875, 1330, 3797, 628 ]
2.8125
32
""" Helper class to train models using Ray backend """ import ray from ray.tune import Trainable from sklearn.base import clone from sklearn.model_selection import cross_validate from sklearn.utils.metaestimators import _safe_split import numpy as np import os from pickle import PicklingError import ray.cloudpickle as...
[ 37811, 5053, 525, 1398, 284, 4512, 4981, 1262, 7760, 30203, 198, 37811, 198, 198, 11748, 26842, 198, 6738, 26842, 13, 83, 1726, 1330, 16835, 540, 198, 6738, 1341, 35720, 13, 8692, 1330, 17271, 198, 6738, 1341, 35720, 13, 19849, 62, 4928...
1.935352
4,888
from typing import List, Tuple, Callable from dsfs.linalg.vector import Vector Matrix = List[List[float]]
[ 6738, 19720, 1330, 7343, 11, 309, 29291, 11, 4889, 540, 198, 198, 6738, 288, 82, 9501, 13, 75, 1292, 70, 13, 31364, 1330, 20650, 198, 198, 46912, 796, 7343, 58, 8053, 58, 22468, 11907, 628, 628, 628 ]
3.054054
37
#!/usr/bin/env python # coding: utf-8 import pandas as pd import numpy as np dataset = pd.read_json('../data/renttherunway_final_data.json.gz', lines=True) dataset = dataset.dropna() train_data, validation_data, test_data = np.split(dataset.sample(frac=1, random_state=42), ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 628, 198, 19608, 292, 316, 796, 279, 67, 13, 961, 62, 17752, 10786, 4...
2.059783
184
from django.contrib.postgres.search import SearchVector from ...product.models import Product from ...order.models import Order from ...userprofile.models import User def search_products(phrase): '''Dashboard full text product search''' sv = SearchVector('name', 'description') return Product.objects.anno...
[ 6738, 42625, 14208, 13, 3642, 822, 13, 7353, 34239, 13, 12947, 1330, 11140, 38469, 198, 198, 6738, 2644, 11167, 13, 27530, 1330, 8721, 198, 6738, 2644, 2875, 13, 27530, 1330, 8284, 198, 6738, 2644, 7220, 13317, 13, 27530, 1330, 11787, 6...
2.729167
576
from math import log, floor from two_thinning.strategies.strategy_base import StrategyBase
[ 6738, 10688, 1330, 2604, 11, 4314, 198, 198, 6738, 734, 62, 400, 23062, 13, 2536, 2397, 444, 13, 2536, 4338, 62, 8692, 1330, 20561, 14881, 628 ]
3.576923
26
# -*- enconding:utf-8 -*- from django import template from menubuilder.models import Menu register = template.Library() @register.inclusion_tag("tags/menu.html", takes_context=True)
[ 2, 532, 9, 12, 2207, 42703, 25, 40477, 12, 23, 532, 9, 12, 198, 198, 6738, 42625, 14208, 1330, 11055, 198, 198, 6738, 1450, 549, 3547, 263, 13, 27530, 1330, 21860, 198, 198, 30238, 796, 11055, 13, 23377, 3419, 198, 198, 31, 30238, ...
3
62
from ArbitrageGraph import ArbitrageGraph from ArbitrageGraphNeo import ArbitrageGraphNeo from FeeStore import FeeStore from OrderBook import OrderBook, OrderBookPair, Asset from PriceStore import PriceStore import datetime import logging from FWLiveParams import FWLiveParams import asyncio from utilities import timed ...
[ 6738, 33619, 8394, 37065, 1330, 33619, 8394, 37065, 198, 6738, 33619, 8394, 37065, 8199, 78, 1330, 33619, 8394, 37065, 8199, 78, 198, 6738, 28522, 22658, 1330, 28522, 22658, 198, 6738, 8284, 10482, 1330, 8284, 10482, 11, 8284, 10482, 47, ...
3.8625
160
#!/usr/bin/env/python # ============================================================================= # MODULE DOCSTRING # ============================================================================= """ Module which houses all the handling instructions for reading and writing to netCDF files for a given type. This...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 14, 29412, 198, 198, 2, 38093, 25609, 198, 2, 33893, 37760, 18601, 2751, 198, 2, 38093, 25609, 198, 198, 37811, 198, 26796, 543, 7777, 477, 262, 9041, 7729, 329, 3555, 290, 3597, 284, 2010, 34, ...
2.684033
15,701
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from django.utils import timezone from .models import RegVerifyMailModel, REG_EXPIRE_TIME from package import mail_client # 检查该用户当前是否可以推送验证码邮件 # 检查邮件和验证码是否正确 # 推送验证码邮件 # 推送订阅邮件(都调用这个api推送) # 推送启动邮件邮件(都调用这个api推送)
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 42625, 14208, 13, 26791, 1330, 640, 11340, 198, 6738, 764, 27530, 1330, 3310, 13414, 1958, 25804, 17633, 11, ...
1.11157
242
import numpy as np import matplotlib.pyplot as plt # Fixing random state for reproducibility np.random.seed(19680801) x = np.random.rand(10) y = np.random.rand(10) z = np.sqrt(x**2 + y**2) fig, axs = plt.subplots(2, 3, sharex=True, sharey=True) # marker symbol axs[0, 0].scatter(x, y, s=80, c=z, marker=">") axs[0, 0...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 2, 13268, 278, 4738, 1181, 329, 8186, 66, 2247, 198, 37659, 13, 25120, 13, 28826, 7, 25272, 28362, 486, 8, 198, 198, 87, 796, 459...
2.211765
170
import copy import csv import json import numpy as np import os import pickle import random import torch from torch.utils.data.sampler import Sampler import pdb class ASMRSampler(Sampler): """ Total videos: 2794. The sampler ends when last $BATCH_SIZE videos are left. """
[ 11748, 4866, 198, 11748, 269, 21370, 198, 11748, 33918, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 11748, 2298, 293, 198, 11748, 4738, 198, 198, 11748, 28034, 198, 6738, 28034, 13, 26791, 13, 7890, 13, 37687, 20053, 1330,...
2.989691
97
"""Leetcode 714. Best Time to Buy and Sell Stock with Transaction Fee Medium URL: https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-transaction-fee/ Your are given an array of integers prices, for which the i-th element is the price of a given stock on day i; and a non-negative integer fee representi...
[ 37811, 3123, 316, 8189, 767, 1415, 13, 6705, 3862, 284, 11763, 290, 25688, 10500, 351, 45389, 28522, 198, 31205, 198, 198, 21886, 25, 3740, 1378, 293, 316, 8189, 13, 785, 14, 1676, 22143, 14, 13466, 12, 2435, 12, 1462, 12, 17846, 12, ...
3.091185
329
#!/usr/bin/env python import ngs_utils.ensembl as ebl import os import shutil from optparse import OptionParser, SUPPRESS_HELP from os.path import isfile, join, basename, dirname, pardir from ngs_utils import logger from ngs_utils.file_utils import file_transaction, adjust_path, safe_mkdir, verify_file ''' Generates...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 299, 14542, 62, 26791, 13, 1072, 2022, 75, 355, 304, 2436, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 6738, 2172, 29572, 1330, 16018, 46677, 11, 19549, 32761, 62, 39, 3...
2.746411
209
import unittest import asyncio import moses.io as io from . import dummy
[ 11748, 555, 715, 395, 198, 11748, 30351, 952, 198, 11748, 285, 4629, 13, 952, 355, 33245, 198, 6738, 764, 1330, 31548, 628, 198 ]
3.26087
23
import threading thread_01 = threading.Thread( # name='t1', target=target_function, kwargs={'person_01': 'Bruno', 'person_02': 'Hanna'}) thread_01.start() thread_01.join() print('executed after join thread 01')
[ 11748, 4704, 278, 628, 197, 197, 198, 198, 16663, 62, 486, 796, 4704, 278, 13, 16818, 7, 198, 197, 2, 1438, 11639, 83, 16, 3256, 220, 198, 197, 16793, 28, 16793, 62, 8818, 11, 220, 198, 197, 46265, 22046, 34758, 6, 6259, 62, 486, ...
2.545455
88
"""Methods for building convolutional LSTM.""" import numpy import keras from gewittergefahr.gg_utils import error_checking from gewittergefahr.deep_learning import architecture_utils from ml4tc.machine_learning import cnn_architecture INPUT_DIMENSIONS_KEY = 'input_dimensions' NUM_LAYERS_BY_BLOCK_KEY = 'num_layers_by...
[ 37811, 46202, 329, 2615, 3063, 2122, 282, 406, 2257, 44, 526, 15931, 198, 198, 11748, 299, 32152, 198, 11748, 41927, 292, 198, 6738, 308, 413, 1967, 469, 69, 993, 81, 13, 1130, 62, 26791, 1330, 4049, 62, 41004, 198, 6738, 308, 413, ...
2.363954
8,872
"""Module defining Machinery, Species and ProcessingMap classes.""" # python 2/3 compatibility from __future__ import division, print_function, absolute_import # global imports from collections import namedtuple from scipy.sparse import ( csr_matrix, csc_matrix, lil_matrix, coo_matrix, hstack, eye ) import nu...
[ 37811, 26796, 16215, 7080, 15451, 11, 28540, 290, 28403, 13912, 6097, 526, 15931, 198, 198, 2, 21015, 362, 14, 18, 17764, 198, 6738, 11593, 37443, 834, 1330, 7297, 11, 3601, 62, 8818, 11, 4112, 62, 11748, 198, 198, 2, 3298, 17944, 198...
2.378068
5,134
# GNU MediaGoblin -- federated, autonomous media hosting # Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either versio...
[ 2, 22961, 6343, 38, 672, 2815, 1377, 28062, 515, 11, 18284, 2056, 13662, 198, 2, 15069, 357, 34, 8, 2813, 11, 2321, 6343, 38, 672, 2815, 20420, 13, 220, 4091, 37195, 20673, 13, 198, 2, 198, 2, 770, 1430, 318, 1479, 3788, 25, 345, ...
3.461059
321
#!/usr/bin/env python import sys import os import glob import numpy as np from astropy.io import ascii import matplotlib.pyplot as plt from matplotlib.backends.backend_pdf import PdfPages import astropy.table as at from numpy.lib.recfunctions import append_fields from scipy.stats import linregress import pymc3 as pm im...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 15095, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 6468, 28338, 13, 952, 1330, 355, 979, 72, 198, 11748, 2603, 29487, 8019, 13, 9078, 2948...
2.979167
144
import logging from django.test import Client, TestCase, override_settings from everbug.middleware import Header
[ 11748, 18931, 198, 198, 6738, 42625, 14208, 13, 9288, 1330, 20985, 11, 6208, 20448, 11, 20957, 62, 33692, 198, 198, 6738, 1683, 25456, 13, 27171, 1574, 1330, 48900, 628 ]
4
29
from django.core.paginator import Paginator from django.shortcuts import get_object_or_404, render from django.urls import reverse from django.views.generic.edit import CreateView, DeleteView, UpdateView from .forms import RegForm from .models import Cups, Participants, Races
[ 6738, 42625, 14208, 13, 7295, 13, 79, 363, 20900, 1330, 31525, 20900, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 651, 62, 15252, 62, 273, 62, 26429, 11, 8543, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 198, 6738, 42625, ...
3.607595
79
self.description = "transferred file with glob characters that match a removed file" lp = pmpkg("foo") lp.files = ["foo/b*r", "foo/bar"] self.addpkg2db("local", lp) sp1 = pmpkg("foo", "1.0-2") self.addpkg(sp1) sp2 = pmpkg("bar", "1.0-2") sp2.files = ["foo/b*r"] self.addpkg(sp2) self.args = "-U %s %s" % (sp1.filenam...
[ 944, 13, 11213, 796, 366, 7645, 18186, 2393, 351, 15095, 3435, 326, 2872, 257, 4615, 2393, 1, 198, 198, 34431, 796, 279, 3149, 10025, 7203, 21943, 4943, 198, 34431, 13, 16624, 796, 14631, 21943, 14, 65, 9, 81, 1600, 366, 21943, 14, ...
2.202703
222
# minent.utils # Project level utilities # # Author: Benjamin Bengfort <benjamin@bengfort.com> # Created: Thu Oct 23 14:09:04 2014 -0400 # # Copyright (C) 2014 Bengfort.com # For license information, see LICENSE.txt # # ID: utils.py [24fa113] benjamin@bengfort.com $ """ Project level utilities """ ################...
[ 2, 949, 298, 13, 26791, 198, 2, 4935, 1241, 20081, 198, 2, 198, 2, 6434, 25, 220, 220, 14533, 14964, 3319, 1279, 11722, 13337, 31, 65, 1516, 3319, 13, 785, 29, 198, 2, 15622, 25, 220, 26223, 2556, 2242, 1478, 25, 2931, 25, 3023, ...
3.16206
1,592
#!/usr/bin/env python3 x = 0 # NOLINT
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 87, 796, 657, 220, 1303, 399, 3535, 12394, 198 ]
2
20
import os import sys import bokeh.layouts as bkl import bokeh.plotting as bkp import numpy as np from bokeh.models import Label from bokeh.io import export_svgs import cairosvg # make it so we can import models/etc from parent folder sys.path.insert(1, os.path.join(sys.path[0], '../common')) from plotting import * fr...
[ 11748, 28686, 198, 11748, 25064, 198, 198, 11748, 1489, 365, 71, 13, 10724, 5269, 355, 275, 41582, 198, 11748, 1489, 365, 71, 13, 29487, 889, 355, 275, 74, 79, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 1489, 365, 71, 13, 27530, ...
2.067135
2,845
import os import stat import time import re import pwd import logSupport import condorPrivsep from pidSupport import register_sighandler, unregister_sighandler MY_USERNAME = pwd.getpwuid(os.getuid())[0] cleaners = Cleanup() class CredCleanup(Cleanup): """ Cleans up old credential files. """ ...
[ 11748, 28686, 198, 11748, 1185, 198, 11748, 640, 198, 11748, 302, 198, 11748, 279, 16993, 198, 11748, 2604, 15514, 198, 11748, 1779, 273, 20184, 325, 79, 198, 6738, 46514, 15514, 1330, 7881, 62, 82, 394, 392, 1754, 11, 555, 30238, 62, ...
2.947154
246
from . import database
[ 6738, 764, 1330, 6831, 628 ]
4.8
5
import sys from partsdb.partsdb import PartsDB from tables import * marpodb = PartsDB('postgresql:///'+sys.argv[1], Base = Base) session = marpodb.Session() n=0 i=0 for gene in session.query(Gene).all(): n = session.query(InterProHit).filter(InterProHit.targetID == gene.cds.id).count() if n == 0: session.quer...
[ 11748, 25064, 198, 6738, 3354, 9945, 13, 42632, 9945, 1330, 22349, 11012, 198, 6738, 8893, 1330, 1635, 198, 198, 3876, 33320, 65, 796, 22349, 11012, 10786, 7353, 34239, 13976, 1378, 14, 6, 10, 17597, 13, 853, 85, 58, 16, 4357, 7308, 7...
2.490566
212
from unittest import TestCase import hummingbot.client.config.config_validators as config_validators
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 198, 11748, 41465, 13645, 13, 16366, 13, 11250, 13, 11250, 62, 12102, 2024, 355, 4566, 62, 12102, 2024, 628 ]
3.814815
27
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import yaml
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 28686, 198, 198, 11748, 331, 43695, 628 ]
2.21875
32
from functools import partial class F(partial): """ Python Pipe. e.g.`range(10) | F(filter, lambda x: x % 2) | F(sum)` WARNING: There will be a small performance loss when building a pipeline. Please do not use it in performance-sensitive locations. """ class FF(partial): """ Python Pip...
[ 6738, 1257, 310, 10141, 1330, 13027, 628, 198, 4871, 376, 7, 47172, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 11361, 36039, 13, 304, 13, 70, 13, 63, 9521, 7, 940, 8, 930, 376, 7, 24455, 11, 37456, 2124, 25, 2124, 4064, ...
3.081871
171
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Travis Yates """Tests for object_detection.utils.test_utils.""" import numpy as np import tensorflow as tf from object_detection.utils import test_utils if __name__ == '__main__': tf.test.main()
[ 2, 15069, 2177, 383, 309, 22854, 37535, 46665, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 19804, 34916, 198, 198, 37811, 51, 3558, 329, 2134, 62, 15255, 3213, 13, 26791, 13, 9288, 62, 26791, 526, 15931, 198, 198, 11748, 299, 32152, ...
3.127907
86
import keyboard keyboard.hook(abc) keyboard.wait()
[ 11748, 10586, 628, 198, 198, 2539, 3526, 13, 25480, 7, 39305, 8, 198, 2539, 3526, 13, 17077, 3419, 198 ]
2.842105
19
"""Consolidate repository data from several previous steps. Use -h or --help for more information. """ import argparse import csv import logging import sys from util.parse import \ parse_repo_to_package_file, \ consolidate_data __log__ = logging.getLogger(__name__) FIELDNAMES = [ 'id', 'name', ...
[ 37811, 9444, 10180, 378, 16099, 1366, 422, 1811, 2180, 4831, 13, 198, 198, 11041, 532, 71, 393, 1377, 16794, 329, 517, 1321, 13, 198, 37811, 198, 11748, 1822, 29572, 198, 11748, 269, 21370, 198, 11748, 18931, 198, 11748, 25064, 198, 198...
2.385777
1,589
import unittest from pubmed.package1.example_mod2 import ExampleMod2 if __name__ == '__main__': # Run tests with the warning such as below ignored (not shown). # InsecureRequestWarning: Unverified HTTPS request # ResourceWarning: unclosed <ssl.SSLSocket fd=5, ... unittest.main(warnings='ignore')
[ 11748, 555, 715, 395, 198, 198, 6738, 2240, 1150, 13, 26495, 16, 13, 20688, 62, 4666, 17, 1330, 17934, 5841, 17, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1303, 5660, 5254, 351, 262...
3.048077
104
# The following code is of week one of python print("Hello my name is George!") print("This is my dog Max!") print('o----') print(' ||||') # some maths! print(50 - 10) # let's make a variable for year I was born in by inputting! # make sure to click on the black screen to type an press enter! year = input("What year...
[ 2, 383, 1708, 2438, 318, 286, 1285, 530, 286, 21015, 198, 4798, 7203, 15496, 616, 1438, 318, 4502, 2474, 8, 198, 198, 4798, 7203, 1212, 318, 616, 3290, 5436, 2474, 8, 198, 4798, 10786, 78, 650, 11537, 198, 4798, 10786, 8614, 15886, ...
3.277372
137
import sys from pyspark import SparkContext sc = SparkContext(appName="WordCountExample") lines = sc.textFile(sys.argv[1]) counts = lines.flatMap(lambda x: x.split(' ')) \ .map(lambda x: (x, 1)) \ .reduceByKey(lambda x, y: x+y) output = counts.collect() for (word, count) in o...
[ 11748, 25064, 201, 198, 6738, 279, 893, 20928, 1330, 17732, 21947, 201, 198, 1416, 796, 17732, 21947, 7, 1324, 5376, 2625, 26449, 12332, 16281, 4943, 201, 198, 6615, 796, 629, 13, 5239, 8979, 7, 17597, 13, 853, 85, 58, 16, 12962, 201,...
2.186047
172
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 16529, 35937, 198, 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 17168, 13789, 13, 4091, 13789, 13, 14116, 287, 262, 1628, 6808, 329, 198, 2, 5964, 1321...
3.203704
486
#%% import configparser config = configparser.ConfigParser() config.read('map_indicators.ini') config.sections() tables = config['Database']['tables'].split() print(tables) # %% import configparser def init(inifile : str) -> bool: ''' check if everything is ok prior to entering the main loop ''' c...
[ 2, 16626, 198, 11748, 4566, 48610, 198, 11250, 796, 4566, 48610, 13, 16934, 46677, 3419, 198, 11250, 13, 961, 10786, 8899, 62, 521, 44549, 13, 5362, 11537, 198, 11250, 13, 23946, 3419, 198, 83, 2977, 796, 4566, 17816, 38105, 6, 7131, ...
2.602431
1,152
#!/usr/bin/env python import pandas as pd #Full outer join on the 3 tables produced based on the 3 XML Orphanet files. filename1 = "orphanet_xml1_parsed" filename4 = "orphanet_xml4_parsed" filename6 = "orphanet_xml6_parsed" f1_df = pd.read_csv(filename1, sep="\t", index_col=False, dtype=str, na_filter = False, encoding...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 19798, 292, 355, 279, 67, 198, 2, 13295, 12076, 4654, 319, 262, 513, 8893, 4635, 1912, 319, 262, 513, 23735, 1471, 19080, 316, 3696, 13, 198, 34345, 16, 796, 366, 13425, 272, ...
2.360606
330
import tixte import discord client = discord.Client(intents=discord.Intents.all(), command_prefix='!') client.tixte = tixte.Client('your-master-token') @client.event
[ 11748, 256, 844, 660, 198, 11748, 36446, 198, 198, 16366, 796, 36446, 13, 11792, 7, 600, 658, 28, 15410, 585, 13, 5317, 658, 13, 439, 22784, 3141, 62, 40290, 11639, 0, 11537, 198, 16366, 13, 83, 844, 660, 796, 256, 844, 660, 13, 1...
2.929825
57
import logging from PIL import Image from pyscreenshot.plugins.backend import CBackend from pyscreenshot.util import platform_is_osx, py2 if py2(): to_bytes = buffer else: to_bytes = bytes log = logging.getLogger(__name__) # based on: # http://stackoverflow.com/questions/69645/take-a-screenshot-via-a-python-...
[ 11748, 18931, 198, 198, 6738, 350, 4146, 1330, 7412, 198, 6738, 279, 28349, 26892, 13, 37390, 13, 1891, 437, 1330, 327, 7282, 437, 198, 6738, 279, 28349, 26892, 13, 22602, 1330, 3859, 62, 271, 62, 418, 87, 11, 12972, 17, 198, 198, 3...
2.784
125
from .api import call # Retrieve arrival timings for all buses operating for specified bus stop. Each bus has 3 recurring timings. # Retrieve data of all operating bus services. # Retrieve data of all operating bus routes. # Retrieve data of bus stops. Max number of records per page is 500.
[ 6738, 764, 15042, 1330, 869, 198, 198, 2, 4990, 30227, 10325, 4628, 654, 329, 477, 16893, 5361, 329, 7368, 1323, 2245, 13, 5501, 1323, 468, 513, 24824, 4628, 654, 13, 628, 198, 2, 4990, 30227, 1366, 286, 477, 5361, 1323, 2594, 13, 6...
4.040541
74
# -*- coding: utf-8 -*- """ Malort Tests Test Runner: PyTest Notes: * Expected values for string samples are any values that the sample could contain, not the exact values. """ import os import unittest import pytest import malort as mt from malort.test_helpers import TestHelpers, TEST_FILES_1, TEST_FILES_2
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 15029, 419, 30307, 198, 198, 14402, 21529, 25, 9485, 14402, 198, 198, 16130, 25, 198, 9, 1475, 7254, 3815, 329, 4731, 8405, 389, 597, 3815, 326, 262, 6291, ...
3.019048
105
from .labelsmoothing import LabelSmoothingLoss
[ 6738, 764, 23912, 1424, 76, 1025, 722, 1330, 36052, 7556, 1025, 722, 43, 793 ]
3.285714
14
import numpy as np import itertools from pyquil import Program from pyquil.gates import MEASURE # all references are to chapter 4 of Gottesman's thesis, chapter 4 # https://arxiv.org/pdf/quant-ph/9705052.pdf tuple2pauli = {(0,0):'I', (0,1): 'Z', (1,0): 'X', (1,1): 'Y'}
[ 11748, 299, 32152, 355, 45941, 198, 11748, 340, 861, 10141, 198, 6738, 12972, 421, 346, 1330, 6118, 198, 6738, 12972, 421, 346, 13, 70, 689, 1330, 11948, 1921, 11335, 198, 198, 2, 477, 10288, 389, 284, 6843, 604, 286, 39451, 274, 805,...
2.4375
112
__author__ = "Prakash Manandhar" __copyright__ = "Copyright 2021, Prakash Manandhar" __credits__ = ["Prakash Manandhar"] __license__ = "MIT" __version__ = "1.1" __maintainer__ = "Prakash Manandhar" __email__ = "prakashm@alum.mit.edu" __status__ = "Production" import argparse import re import os.path from googleapiclie...
[ 834, 9800, 834, 796, 366, 47, 17716, 1077, 1869, 392, 9869, 1, 198, 834, 22163, 4766, 834, 796, 366, 15269, 33448, 11, 350, 17716, 1077, 1869, 392, 9869, 1, 198, 834, 66, 20696, 834, 796, 14631, 47, 17716, 1077, 1869, 392, 9869, 897...
2.505503
1,363
# -*- coding: utf-8 -*- """ Created on Mon Jun 27 13:53:50 2016 @author: au194693 """ import numpy as np import scipy.io as sio import pandas as pd from my_settings import (tf_folder, subjects_ctl) data = sio.loadmat("/Volumes/My_Passport/agency_connectivity/" + "results/data_all_Ctrl.mat")["data...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 2892, 7653, 2681, 1511, 25, 4310, 25, 1120, 1584, 198, 198, 31, 9800, 25, 35851, 22913, 48528, 198, 37811, 198, 198, 11748, 299, 32152, 355, 4594...
1.909774
931
#!/usr/bin/env python """ lambdata - a collection of Data Science helper functions """
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 37811, 220, 198, 2543, 65, 7890, 532, 257, 4947, 286, 6060, 5800, 31904, 5499, 220, 198, 37811, 628, 628, 198 ]
3.133333
30
# -*- coding: utf-8 -*- """ @time : 2020/05/10 12:14 @author : 姚明伟 """ import json import pickle from flask import request, jsonify, make_response from info.modules.search_content.search_script_conf import get_tips_word from info.utils.content import search_content_indistinct, search_content_exact from info.utils....
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 31, 2435, 220, 220, 1058, 12131, 14, 2713, 14, 940, 1105, 25, 1415, 198, 31, 9800, 1058, 10263, 100, 248, 23626, 236, 27670, 253, 198, 37811, 198, 198, 117...
1.875453
1,381
# Copyright 2015 OpenStack Foundation # 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 requ...
[ 2, 15069, 1853, 4946, 25896, 5693, 198, 2, 1439, 6923, 33876, 13, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 220, 407, 779, 428, ...
3.517123
292
import os import torch import torch.nn.functional as F from collections import OrderedDict import argparse from ptsemseg.models import get_model from ptsemseg.utils import convert_state_dict import numpy as np #based on https://github.com/ducha-aiki/ucn-pytorch/blob/master/Utils.py ; commit de5bdec from Oct 4, 20...
[ 11748, 28686, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 11748, 1822, 29572, 198, 198, 6738, 42975, 43616, 325, 70, 13, 27530, 1330, 651, 62, 19849, 198, 6738...
2.747059
170
from django import forms from .models.taste_note import TasteNoteModel
[ 6738, 42625, 14208, 1330, 5107, 198, 6738, 764, 27530, 13, 83, 4594, 62, 11295, 1330, 29633, 6425, 17633, 628 ]
3.789474
19
#!/usr/bin/env python # -*- coding: UTF-8 -*- """ * Copyright (C) 2017 Hendrik van Essen * * This file is subject to the terms and conditions of the MIT License * See the file LICENSE in the top level directory for more details. """ """setup script""" """ BASIC SYSTEM PRIVATE COMPUTER sudo apt-get install python...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 1635, 15069, 357, 34, 8, 2177, 14666, 12602, 5719, 11985, 268, 198, 1635, 198, 1635, 770, 2393, 318, 2426...
3.067254
1,249
import re import sys import nltk import json import argparse import pandas as pd from nltk.corpus import stopwords from sklearn.metrics import f1_score from sklearn.model_selection import train_test_split from sklearn.svm import LinearSVC from sklearn.multiclass import OneVsRestClassifier from sklearn.preprocessing im...
[ 11748, 302, 198, 11748, 25064, 198, 11748, 299, 2528, 74, 198, 11748, 33918, 198, 11748, 1822, 29572, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 299, 2528, 74, 13, 10215, 79, 385, 1330, 2245, 10879, 198, 6738, 1341, 35720, ...
3.347639
699
from scipy.stats import pearsonr, spearmanr from sklearn.metrics import precision_recall_curve, roc_curve, auc import pandas as pd import numpy as np def pearsonr_cor(pred, label): """ Return Pearson's correlation between prediction and label """ cor, _ = pearsonr(pred, label) return cor def spearmanr_...
[ 6738, 629, 541, 88, 13, 34242, 1330, 25286, 1559, 81, 11, 17514, 805, 81, 198, 6738, 1341, 35720, 13, 4164, 10466, 1330, 15440, 62, 8344, 439, 62, 22019, 303, 11, 686, 66, 62, 22019, 303, 11, 257, 1229, 198, 11748, 19798, 292, 355, ...
2.375927
1,213
#!/usr/bin/env python3 # # Copyright (c) 2018, Intel Corporation # # SPDX-License-Identifier: BSD-3-Clause # # Show installed versions of doc building tools import os.path import sys import pkg_resources import subprocess # Check all requirements listed in requirements.txt and print out version installed (if any) pri...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 198, 2, 15069, 357, 66, 8, 2864, 11, 8180, 10501, 198, 2, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 347, 10305, 12, 18, 12, 2601, 682, 198, 2, 198, 2, 5438, 658...
2.700246
407
import FWCore.ParameterSet.Config as cms process = cms.Process("Demo") process.load("FWCore.MessageService.MessageLogger_cfi") process.MessageLogger = cms.Service("MessageLogger", debugModules = cms.untracked.vstring("*"), cout = cms.untracked.PSet( threshold = cms.untracked.string('DEBUG') ), ...
[ 11748, 48849, 14055, 13, 36301, 7248, 13, 16934, 355, 269, 907, 198, 198, 14681, 796, 269, 907, 13, 18709, 7203, 11522, 78, 4943, 198, 198, 14681, 13, 2220, 7203, 24160, 14055, 13, 12837, 16177, 13, 12837, 11187, 1362, 62, 66, 12463, ...
2.875606
619
import re cases = int(input()) for case in range(cases): try: re.compile(input()) print(True) except re.error: print(False)
[ 11748, 302, 198, 198, 33964, 796, 493, 7, 15414, 28955, 198, 198, 1640, 1339, 287, 2837, 7, 33964, 2599, 198, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 302, 13, 5589, 576, 7, 15414, 28955, 198, 220, 220, 220...
2.135135
74
import copy import io from collections import defaultdict import click import matplotlib.pyplot as plt import numpy as np import pandas as pd import seaborn as sns from matplotlib import rcParams from matplotlib.backends.backend_pdf import PdfPages from openff.toolkit.topology import Molecule from PIL import Image fro...
[ 11748, 4866, 198, 11748, 33245, 198, 6738, 17268, 1330, 4277, 11600, 198, 198, 11748, 3904, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 117...
2.251931
1,036
class elements(object): """docstring for elements""" class linkedList(object): """docstring for linkedList""" # l = linkedList() # x1 = elements(key=5) # x2 = elements(key=6) # x3 = elements(key=7) # x4 = elements(key=8) # x5 = elements(key=9) # l.list_insert(x1) # l.list_insert(x2) # l.list_insert(x3) # l.list_i...
[ 4871, 4847, 7, 15252, 2599, 198, 197, 37811, 15390, 8841, 329, 4847, 37811, 628, 198, 4871, 6692, 8053, 7, 15252, 2599, 198, 197, 37811, 15390, 8841, 329, 6692, 8053, 37811, 628, 198, 2, 300, 796, 6692, 8053, 3419, 198, 2, 2124, 16, ...
2.213592
206
from argparse import ArgumentParser from argparse import RawDescriptionHelpFormatter import sys import build import os from pathlib import Path args = get_args(sys.argv) if args.listadversaries == True: adversary_list = os.listdir(os.path.join(Path(__file__).parent, "adversary")) for item in adversary_list: ...
[ 6738, 1822, 29572, 1330, 45751, 46677, 198, 6738, 1822, 29572, 1330, 16089, 11828, 22087, 8479, 1436, 198, 11748, 25064, 198, 11748, 1382, 198, 11748, 28686, 198, 6738, 3108, 8019, 1330, 10644, 628, 198, 22046, 796, 651, 62, 22046, 7, 175...
2.505682
352
import sys import snowflake.connector from snowflake.sqlalchemy import URL from sqlalchemy import create_engine
[ 11748, 25064, 198, 11748, 6729, 47597, 13, 8443, 273, 198, 6738, 6729, 47597, 13, 25410, 282, 26599, 1330, 10289, 198, 6738, 44161, 282, 26599, 1330, 2251, 62, 18392, 198 ]
3.862069
29
from typing import TYPE_CHECKING if TYPE_CHECKING: from model import Directory from model import NormalFile class VirusFile(NormalFile): """The VirusFile class is the structure that acts as a Virus File on the filesystem that still has lines of data but also deletes files that are not other virus fil...
[ 6738, 19720, 1330, 41876, 62, 50084, 2751, 198, 361, 41876, 62, 50084, 2751, 25, 198, 220, 220, 220, 422, 2746, 1330, 27387, 198, 198, 6738, 2746, 1330, 14435, 8979, 628, 198, 4871, 40584, 8979, 7, 26447, 8979, 2599, 198, 220, 220, 22...
2.690878
592
#coding:utf-8 # K-means import numpy as np import sys import matplotlib.pyplot as plt argvs = sys.argv if __name__ == "__main__": data = np.genfromtxt(argvs[1], delimiter=",") print(data) #plt.subplot(2, 1, 1) plt.plot(data[:,3]) data2 = np.genfromtxt(argvs[2], delimiter=",") print(data2) ...
[ 2, 66, 7656, 25, 40477, 12, 23, 198, 2, 509, 12, 1326, 504, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 25064, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 853, 14259, 796, 25064, 13, 853, 85, 1...
1.982833
233
import copy import torch import torch.nn as nn import torch.nn.functional as F from libs.net_utils import NLM, NLM_dot, NLM_woSoft, NLM_NC_woSoft, Batch_Contrastive from torchvision.models import resnet18 from libs.autoencoder import encoder3, decoder3, encoder_res18, encoder_res50 from libs.utils import * import pdb...
[ 11748, 4866, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 6738, 9195, 82, 13, 3262, 62, 26791, 1330, 22879, 44, 11, 22879, 44, 62, 26518, 11, 22879, 44, 62, 2...
2.279397
995
import day11 as day from helper import loadingUtils INPUTFOLDER = day.get_path()
[ 11748, 1110, 1157, 355, 1110, 198, 6738, 31904, 1330, 11046, 18274, 4487, 198, 198, 1268, 30076, 37, 3535, 14418, 796, 1110, 13, 1136, 62, 6978, 3419, 628, 628, 628 ]
3
29
from unittest import TestCase, main import overdoses import pandas as pd from pandas.util.testing import assert_series_equal if __name__ == '__main__': main()
[ 6738, 555, 715, 395, 1330, 6208, 20448, 11, 1388, 198, 198, 11748, 49626, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 19798, 292, 13, 22602, 13, 33407, 1330, 6818, 62, 25076, 62, 40496, 628, 198, 198, 361, 11593, 3672, 834, ...
3.054545
55
"""wargame.test.test_wargame This module contains unit tests for various modules in wargame package. This module is compatible with Python 2.7.9. It contains supporting code for the book, Learning Python Application Development, Packt Publishing. :copyright: 2016, Ninad Sathaye :license: The MIT License (MIT) . See...
[ 37811, 86, 853, 480, 13, 9288, 13, 9288, 62, 86, 853, 480, 198, 198, 1212, 8265, 4909, 4326, 5254, 329, 2972, 13103, 287, 266, 853, 480, 5301, 13, 198, 198, 1212, 8265, 318, 11670, 351, 11361, 362, 13, 22, 13, 24, 13, 632, 4909, ...
2.427269
2,303
from data.classes.players import *
[ 6738, 1366, 13, 37724, 13, 32399, 1330, 1635, 628, 628 ]
3.8
10
import os from glob import glob from ete3 import Tree from plot_module import * os.chdir("../DataEmpirical") exp_dirs = sorted( set(["_".join(i.split("_")[:-1]) for i in os.listdir("Experiments") if ("Replicates" in i) and ("Isopods" in i)])) os.makedirs("Analysis/DataFrame", exist_ok=True) file_format = "pdf" ...
[ 11748, 28686, 198, 6738, 15095, 1330, 15095, 198, 6738, 304, 660, 18, 1330, 12200, 198, 6738, 7110, 62, 21412, 1330, 1635, 198, 198, 418, 13, 354, 15908, 7203, 40720, 6601, 36, 3149, 343, 605, 4943, 198, 11201, 62, 15908, 82, 796, 232...
1.93237
3,667
import random import numpy as np from autotune.param_space import Param from typing import Callable from .hyper_param_opt import AbstractHyperParameterOptimizer
[ 11748, 4738, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 1960, 313, 1726, 13, 17143, 62, 13200, 1330, 25139, 198, 6738, 19720, 1330, 4889, 540, 198, 6738, 764, 49229, 62, 17143, 62, 8738, 1330, 27741, 38197, 36301, 27871, 320, 7509, ...
3.880952
42
# Test suite for DeriveAlive module # These lines should be included for Travis/Coverall import sys sys.path.append('../') import DeriveAlive.DeriveAlive as da import numpy as np import math def test_DeriveAlive_Var(): '''Test constructor of Var class to ensure proper variable initializations.''' # Run tests with...
[ 2, 6208, 18389, 329, 9626, 425, 2348, 425, 8265, 198, 198, 2, 2312, 3951, 815, 307, 3017, 329, 19804, 14, 27245, 439, 198, 11748, 25064, 198, 17597, 13, 6978, 13, 33295, 10786, 40720, 11537, 198, 198, 11748, 9626, 425, 2348, 425, 13, ...
2.429348
1,288
"""Subpackage for handling import and export of sequencing data. """ import os from .GenomFeatureReader import GenomFeatureReader from .GenomReader import GenomReader from .SamReader import SamReader, SamAlignedRead from .BaseAlignedRead import BaseAlignedRead from .BedtoolsIntersectionReader import BedtoolsIntersec...
[ 37811, 7004, 26495, 329, 9041, 1330, 290, 10784, 286, 32841, 1366, 13, 198, 198, 37811, 198, 198, 11748, 28686, 198, 198, 6738, 764, 13746, 296, 38816, 33634, 1330, 5215, 296, 38816, 33634, 198, 6738, 764, 13746, 296, 33634, 1330, 5215, ...
2.996
500
# -*- coding: utf-8 -*- # Author: Simon Bussy <simon.bussy@gmail.com> import numpy as np from collections import defaultdict class History(): """A class to manage the history along iterations of a solver. """ def clear(self): """Reset history values""" self.values = defaultdict(list)...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 6434, 25, 11288, 347, 14650, 1279, 14323, 261, 13, 65, 14650, 31, 14816, 13, 785, 29, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 17268, 1330, 4277, 11600, ...
2.22468
859