content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
""" A hodge-podge of convenience functions for luci """
[ 37811, 198, 32, 289, 9728, 12, 79, 9728, 286, 15607, 5499, 329, 300, 42008, 198, 198, 37811, 198 ]
3.166667
18
testcases = int(input()) for _ in range(testcases): main_details = list(map(int, input().split())) coin_details = list(map(lambda x: int(x)%main_details[-1], input().split())) print(sum(coin_details)%main_details[-1])
[ 9288, 33964, 796, 493, 7, 15414, 28955, 201, 198, 1640, 4808, 287, 2837, 7, 9288, 33964, 2599, 201, 198, 220, 220, 220, 1388, 62, 36604, 796, 1351, 7, 8899, 7, 600, 11, 5128, 22446, 35312, 3419, 4008, 201, 198, 220, 220, 220, 10752,...
2.526882
93
########################################################################## # If not stated otherwise in this file or this component's Licenses.txt # file the following copyright and licenses apply: # # Copyright 2021 RDK Management # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use th...
[ 29113, 29113, 7804, 2235, 198, 2, 1002, 407, 5081, 4306, 287, 428, 2393, 393, 428, 7515, 338, 10483, 4541, 13, 14116, 198, 2, 2393, 262, 1708, 6634, 290, 16625, 4174, 25, 198, 2, 198, 2, 15069, 33448, 31475, 42, 8549, 198, 2, 198, ...
2.163446
7,556
import geopandas as gp import pytest from shapely.geometry import Polygon import maup CRS = "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs"
[ 11748, 30324, 392, 292, 355, 27809, 198, 11748, 12972, 9288, 198, 6738, 5485, 306, 13, 469, 15748, 1330, 12280, 14520, 198, 11748, 285, 559, 79, 198, 198, 34, 6998, 796, 43825, 1676, 73, 28, 6511, 15460, 1343, 695, 862, 28, 54, 14313,...
2.47619
63
""" Plot results of benchmark. Need to run benchmark.py first to generate the file benchmark_results.json. """ import json from collections import defaultdict import matplotlib.pyplot as plt def groupby(values, keyfunc): """Group values by key returned by keyfunc.""" groups = defaultdict(list) for value ...
[ 37811, 198, 43328, 2482, 286, 18335, 13, 10664, 284, 1057, 18335, 13, 9078, 717, 284, 7716, 198, 1169, 2393, 18335, 62, 43420, 13, 17752, 13, 198, 37811, 198, 11748, 33918, 198, 6738, 17268, 1330, 4277, 11600, 198, 198, 11748, 2603, 294...
2.471591
528
from edgesets import UEdge, DEdge
[ 6738, 13015, 1039, 1330, 471, 37021, 11, 5550, 67, 469, 201, 198, 201 ]
2.769231
13
import argparse from pathlib import Path import numpy as np import scipy import keras from keras.models import load_model from moviepy.editor import VideoFileClip, concatenate_videoclips from tqdm import tqdm if __name__ == '__main__': main()
[ 11748, 1822, 29572, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 629, 541, 88, 198, 198, 11748, 41927, 292, 198, 6738, 41927, 292, 13, 27530, 1330, 3440, 62, 19849, 198, 198, 6738, 3807, 9078,...
2.94186
86
from django.shortcuts import render, get_object_or_404 from django.http import HttpResponse, HttpResponseRedirect from django.utils import timezone from django.db.models import Count, Q from django.core.paginator import EmptyPage, PageNotAnInteger, Paginator from django.contrib.auth import login, authenticate, log...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 651, 62, 15252, 62, 273, 62, 26429, 201, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 11, 367, 29281, 31077, 7738, 1060, 201, 198, 6738, 42625, 14208, 13, 26791, 1330,...
3.20339
236
# coding=utf-8 import tensorflow as tf
[ 2, 19617, 28, 40477, 12, 23, 198, 11748, 11192, 273, 11125, 355, 48700, 628 ]
2.857143
14
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # imports. from ssht00ls.classes.config import * from ssht00ls.classes import utils # the ssh connections object class. # Initialized objects. connections = Connections()
[ 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, 2, 17944, 13, 198, 6738, 26678, 83, 405, 7278, 13, 37724, 13, 11250, 1330, 1635, 198, 6738, 26678, 83, 405, ...
2.96
75
data = np.arange(0, 20, 2) result = pd.Series(data) # Alternative Solution # s = pd.Series(range(0, 20, 2)) # Alternative Solution # s = pd.Series([x for x in range(0, 20) if x % 2 == 0])
[ 198, 7890, 796, 45941, 13, 283, 858, 7, 15, 11, 1160, 11, 362, 8, 198, 20274, 796, 279, 67, 13, 27996, 7, 7890, 8, 628, 198, 2, 27182, 28186, 198, 2, 264, 796, 279, 67, 13, 27996, 7, 9521, 7, 15, 11, 1160, 11, 362, 4008, 628...
2.474359
78
#!/usr/bin/env python # encoding: utf-8 from contextlib import contextmanager import mock __author__ = 'Liu Yicong' __email__ = 'imyikong@gmail.com'
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 21004, 25, 3384, 69, 12, 23, 198, 198, 6738, 4732, 8019, 1330, 4732, 37153, 198, 198, 11748, 15290, 198, 198, 834, 9800, 834, 796, 705, 43, 16115, 575, 291, 506, 6, 198, 834, 12...
2.684211
57
# -*- coding: utf-8 -*- # Generated by Django 1.11.10 on 2018-03-11 12:37 from __future__ import absolute_import from __future__ import unicode_literals from django.db import migrations, models
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 1157, 13, 940, 319, 2864, 12, 3070, 12, 1157, 1105, 25, 2718, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593,...
2.969697
66
# -*- coding:utf-8 -*- """ console.py ~~~~~~~~ - :author: Fufu, 2021/6/7 """ from . import OutputPlugin from ..libs.metric import Metric
[ 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 37811, 198, 220, 220, 220, 8624, 13, 9078, 198, 220, 220, 220, 220, 15116, 198, 220, 220, 220, 220, 532, 220, 628, 220, 220, 220, 1058, 9800, 25, 376, 3046, 84, 11, 334...
2.242857
70
import json import unittest from slack_sdk.web import WebClient from tests.slack_sdk.web.mock_web_api_server import ( setup_mock_web_api_server, cleanup_mock_web_api_server, )
[ 11748, 33918, 198, 11748, 555, 715, 395, 198, 198, 6738, 30740, 62, 21282, 74, 13, 12384, 1330, 5313, 11792, 198, 6738, 5254, 13, 6649, 441, 62, 21282, 74, 13, 12384, 13, 76, 735, 62, 12384, 62, 15042, 62, 15388, 1330, 357, 198, 220...
2.513514
74
from netforce.model import Model, fields, get_model, clear_cache from netforce.database import get_connection from datetime import * import time from netforce import access TaskList.register()
[ 6738, 2010, 3174, 13, 19849, 1330, 9104, 11, 7032, 11, 651, 62, 19849, 11, 1598, 62, 23870, 198, 6738, 2010, 3174, 13, 48806, 1330, 651, 62, 38659, 198, 6738, 4818, 8079, 1330, 1635, 198, 11748, 640, 198, 6738, 2010, 3174, 1330, 1895,...
3.9
50
#!/usr/bin/python3 import paramiko,time #using as ssh client client=paramiko.SSHClient() #auto adjut host kue verification with yes or no client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) #time to connect to remote Cisco IOS addr=input("Enter your Router IP :") u='root' p='cisco' #connected with SSh sessio...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 11748, 5772, 12125, 11, 2435, 198, 198, 2, 3500, 355, 26678, 5456, 198, 16366, 28, 17143, 12125, 13, 5432, 39, 11792, 3419, 198, 2, 23736, 9224, 315, 2583, 479, 518, 19637, 351, 37...
3.093333
225
#!/usr/bin/env python3 import sys, os import arsdkparser #=============================================================================== #=============================================================================== def class_name(name): splitted_name = name.split('_') return "ArsdkFeature" + "".join(x.c...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 25064, 11, 28686, 198, 11748, 610, 21282, 74, 48610, 198, 198, 2, 23926, 25609, 18604, 198, 198, 2, 23926, 25609, 18604, 198, 198, 4299, 1398, 62, 3672, 7, 3672, 2599, ...
2.389924
1,985
import numpy import pygame import random from pygame import gfxdraw pygame.init() config_instance = open('settings.txt', 'r', encoding = 'utf-8') settings = file_handler(config_instance) game = Game(settings) game.start()
[ 11748, 299, 32152, 198, 11748, 12972, 6057, 198, 11748, 4738, 198, 6738, 12972, 6057, 1330, 308, 21373, 19334, 198, 9078, 6057, 13, 15003, 3419, 198, 198, 11250, 62, 39098, 796, 1280, 10786, 33692, 13, 14116, 3256, 705, 81, 3256, 21004, ...
3.152778
72
import time import random
[ 11748, 640, 198, 11748, 4738, 198 ]
4.333333
6
# -*- coding: utf-8 -*- """ Created on Mon Jan 6 10:07:13 2020 @author: sjliu.me@gmail.com """ import torch import torch.nn as nn import torch.nn.functional as F
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 41972, 319, 2892, 2365, 220, 718, 838, 25, 2998, 25, 1485, 12131, 201, 198, 201, 198, 31, 9800, 25, 264, 73, 4528, 84, 13, 1326, 31, 14816, 13,...
2.272727
77
__all__ = ['templatetags']
[ 834, 439, 834, 796, 37250, 11498, 489, 265, 316, 3775, 20520, 198 ]
2.25
12
# Copyright 2020 DeepMind Technologies Limited. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
[ 2, 15069, 12131, 10766, 28478, 21852, 15302, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198,...
3.61039
231
import hawkey import logging from rpmreq import graph from rpmreq import query log = logging.getLogger(__name__) def last_version(dep, repos): """ Return latest package meeting dep or latest version of dep regardless of version range. :param dep: dependency to meet :param repos: repos to quer...
[ 11748, 23185, 2539, 198, 11748, 18931, 198, 198, 6738, 37542, 42180, 1330, 4823, 198, 6738, 37542, 42180, 1330, 12405, 628, 198, 6404, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 628, 198, 198, 4299, 938, 62, 9641, 7, 103...
2.82659
173
from mlflow.tracking import MlflowClient from urllib.parse import urlparse
[ 6738, 285, 1652, 9319, 13, 36280, 1330, 337, 1652, 9319, 11792, 198, 6738, 2956, 297, 571, 13, 29572, 1330, 19016, 29572, 628, 628, 198 ]
3.291667
24
#!/usr/bin/python # -*- coding: utf-8 -*- from datetime import datetime, timedelta from iso8601 import parse_date from pytz import timezone import urllib import json import os
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 6738, 47279, 4521, 486, 1330, 21136, 62, 4475, 198, 6738, 1297...
2.863636
66
EMAIL_ADDRESS = 'domfigarobarbearia@gmail.com' EMAIL_PASSWORD = 'barbeariadomfigaro' HEROKU_PASSWORD = "Barbeariadomfigaro!"
[ 27630, 4146, 62, 2885, 7707, 7597, 796, 705, 3438, 5647, 283, 30973, 33227, 544, 31, 14816, 13, 785, 6, 198, 27630, 4146, 62, 47924, 54, 12532, 796, 705, 5657, 33227, 72, 324, 296, 5647, 12022, 6, 198, 198, 16879, 11380, 52, 62, 479...
2.272727
55
''' Created on 15/03/2018 @author: pelejaf '''
[ 7061, 6, 198, 41972, 319, 1315, 14, 3070, 14, 7908, 198, 198, 31, 9800, 25, 613, 293, 73, 1878, 198, 7061, 6 ]
2.136364
22
# coding: utf-8 from config.base import * DEBUG = False SERVER_PORT = 8899
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 6738, 4566, 13, 8692, 1330, 1635, 198, 198, 30531, 796, 10352, 198, 35009, 5959, 62, 15490, 796, 9193, 2079, 198 ]
2.714286
28
from __future__ import print_function NUM_ROWS = 7 NUM_COLS = 7 DIRECTIONS = ('E', 'W', 'N', 'S') MOVEMENT_DIFFS = { 'N': (0, -1), 'S': (0, 1), 'E': (1, 0), 'W': (-1, 0) } X_MOVEMENT_DIFFS = { 'N': 0, 'S': 0, 'E': 1, 'W': -1 } Y_MOVEMENT_DIFFS = { 'N': -1, 'S': 1, 'E': 0, ...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 41359, 62, 49, 22845, 796, 767, 198, 41359, 62, 25154, 50, 796, 767, 198, 17931, 23988, 11053, 796, 19203, 36, 3256, 705, 54, 3256, 705, 45, 3256, 705, 50, 11537, 198, 44, 887...
2.467718
2,664
from dataclasses import dataclass from typing import Dict from dataclasses_jsonschema import JsonSchemaMixin
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 6738, 19720, 1330, 360, 713, 198, 198, 6738, 4818, 330, 28958, 62, 8457, 684, 2395, 2611, 1330, 449, 1559, 27054, 2611, 35608, 259, 628, 198 ]
3.294118
34
import numpy as np import pandas as pd import unittest from pyampute.ampute import MultivariateAmputation from pyampute.exploration.md_patterns import mdPatterns if __name__ == "__main__": unittest.main()
[ 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 555, 715, 395, 198, 198, 6738, 12972, 696, 1133, 13, 696, 1133, 1330, 7854, 42524, 5840, 1996, 341, 198, 6738, 12972, 696, 1133, 13, 20676, 6944, 13, 913...
2.917808
73
from __future__ import absolute_import from __future__ import print_function import numpy as np import random import cv2 from keras.utils import to_categorical from keras.models import Model from keras.layers import Dropout, Lambda, Dense, Conv2D, Flatten, Input, MaxPooling2D from keras.optimizers import RMSprop from ...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 4738, 198, 11748, 269, 85, 17, 198, 6738, 41927, 292, 13, 26791, 1330, 284, 62, 6...
3.417391
115
import sys if sys.version_info < (3, 5): print("Python 3.5 is required for this package") sys.exit(1) from setuptools import setup setup(name = "simplesvnbrowser", version = "0.0.1", description = "A simple subversion repository browser application", url = "https://github.com/holtrop/simple-...
[ 11748, 25064, 198, 361, 25064, 13, 9641, 62, 10951, 1279, 357, 18, 11, 642, 2599, 198, 220, 220, 220, 3601, 7203, 37906, 513, 13, 20, 318, 2672, 329, 428, 5301, 4943, 198, 220, 220, 220, 25064, 13, 37023, 7, 16, 8, 198, 198, 6738,...
2.525424
236
# -*- coding: utf-8 -*- """ Created on Wed Oct 30 10:02:36 2019 @author: abibeka Purpose: Batch update synchro volumes """ # 0.0 Housekeeping. Clear variable space #****************************************************************************************** from IPython import get_ipython #run magic commands ipython =...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 3300, 2556, 1542, 838, 25, 2999, 25, 2623, 13130, 198, 198, 31, 9800, 25, 450, 571, 38001, 198, 30026, 3455, 25, 347, 963, 4296, 6171, 354, 305...
2.709821
448
#! /usr/bin/env python # -*- coding: utf-8 -*- """ Creates the multiline text charts Given the unique nature of multiline text charts, we use a separate method to construct them. ----- """ # Built-in Modules import pickle import sys import textwrap import traceback # Third-party Modules # Note the order and structu...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 16719, 274, 262, 1963, 346, 500, 2420, 15907, 198, 15056, 262, 3748, 3450, 286, 1963, 346, 500, 24...
2.045159
2,768
# -*- coding: utf-8 -*- """ * TencentBlueKing is pleased to support the open source community by making - PaaS (BlueKing-PaaS) available. * Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved. * Licensed under the MIT License (the "License"); you may not use this file except in compliance...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 1635, 9368, 1087, 14573, 15708, 318, 10607, 284, 1104, 262, 1280, 2723, 2055, 416, 1642, 532, 350, 7252, 50, 357, 14573, 15708, 12, 47, 7252, 50, 8, 1695, ...
3.887255
204
from pylie.common import * from pylie import SO3
[ 6738, 279, 2645, 494, 13, 11321, 1330, 1635, 198, 6738, 279, 2645, 494, 1330, 12809, 18, 628, 198 ]
2.833333
18
import pytz from datetime import timedelta from dateutil import parser from django.utils.text import Truncator from django.db import IntegrityError from core.models import Data
[ 11748, 12972, 22877, 198, 6738, 4818, 8079, 1330, 28805, 12514, 198, 6738, 3128, 22602, 1330, 30751, 198, 6738, 42625, 14208, 13, 26791, 13, 5239, 1330, 833, 19524, 1352, 198, 6738, 42625, 14208, 13, 9945, 1330, 39348, 12331, 198, 198, 67...
3.869565
46
from django.db.models.signals import post_save from django.dispatch import receiver from roadmaps.models import RoadmapNode from roadmaps.services.progress import ProgressPropagator
[ 6738, 42625, 14208, 13, 9945, 13, 27530, 13, 12683, 874, 1330, 1281, 62, 21928, 198, 6738, 42625, 14208, 13, 6381, 17147, 1330, 9733, 198, 198, 6738, 2975, 31803, 13, 27530, 1330, 5567, 8899, 19667, 198, 6738, 2975, 31803, 13, 30416, 13...
3.833333
48
import numpy as np import pytest from numpy.testing import assert_array_equal from ReconstructOrder.datastructures.intensity_data import IntensityData # ==== test basic construction ===== def test_basic_constructor_nparray(): """ test assignment using numpy arrays """ int_data = IntensityData() ...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 12972, 9288, 198, 6738, 299, 32152, 13, 33407, 1330, 6818, 62, 18747, 62, 40496, 198, 6738, 23419, 7249, 18743, 13, 19608, 459, 1356, 942, 13, 47799, 62, 7890, 1330, 2558, 6377, 6601, 198, 198,...
2.369004
2,710
import torch
[ 11748, 28034, 628 ]
4.666667
3
if __name__ == "__main__": global fac_dic fac_dic = {n : fac(n) for n in range(10)} answer = list(main()) print(answer)
[ 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 3298, 1777, 62, 67, 291, 220, 198, 220, 220, 220, 1777, 62, 67, 291, 796, 1391, 77, 1058, 1777, 7, 77, 8, 329, 299, 287, 2837, 7, 940, 38165, 198,...
2.190476
63
import torch import torch.nn.functional as F import torchaudio import numpy as np from scipy.signal import get_window from librosa.util import pad_center, tiny from librosa.filters import window_sumsquare from librosa.filters import mel as librosa_mel_fn def dynamic_range_compression(x, C=1, clip_val=1e-5): """ ...
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 198, 11748, 28034, 24051, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 13, 12683, 282, 1330, 651, 62, 17497, 198, 6738, 9195, 4951, 64, 13, 226...
2.38756
627
"""This module defines the ndk_cc_toolchain_config rule. This file is based on the `external/androidndk/cc_toolchain_config.bzl` file produced by the built-in `android_ndk_repository` Bazel rule[1], which was used to build the SkCMS repository up until this revision[2]. The paths in this file point to locations insid...
[ 37811, 1212, 8265, 15738, 262, 299, 34388, 62, 535, 62, 25981, 7983, 62, 11250, 3896, 13, 198, 198, 1212, 2393, 318, 1912, 319, 262, 4600, 22615, 14, 19411, 358, 74, 14, 535, 62, 25981, 7983, 62, 11250, 13, 65, 48274, 63, 2393, 4635...
2.351784
813
import re from http import cookiejar from urllib import request, parse from bs4 import BeautifulSoup from VirtualJudgeSpider import Config from VirtualJudgeSpider.Config import Problem, Spider, Result from VirtualJudgeSpider.OJs.BaseClass import Base
[ 11748, 302, 198, 6738, 2638, 1330, 19751, 9491, 198, 6738, 2956, 297, 571, 1330, 2581, 11, 21136, 198, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 198, 6738, 15595, 29511, 41294, 1330, 17056, 198, 6738, 15595, 29511, 41294, 13,...
4.096774
62
''' ''' n = int(input()) # square_map = [] for i in range(n): square_map.append(list(map(int, input()))) ''' ''' _house_count = 0 house = [] bundle = 0 for i in range(n): for j in range(n): if dfx(i, j): house.append(_house_count) _house_count = 0 bundle += ...
[ 7061, 6, 220, 705, 7061, 198, 198, 77, 796, 493, 7, 15414, 28955, 1303, 220, 220, 198, 23415, 62, 8899, 796, 17635, 198, 198, 1640, 1312, 287, 2837, 7, 77, 2599, 198, 220, 220, 220, 6616, 62, 8899, 13, 33295, 7, 4868, 7, 8899, 7...
2
187
""" Attachment File which implements the Hiven Attachment type and its methods (endpoints) --- Under MIT License Copyright 2020 - 2021 Luna Klatzer Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Softw...
[ 37811, 198, 8086, 15520, 9220, 543, 23986, 262, 367, 1469, 3460, 15520, 2099, 290, 663, 5050, 198, 7, 437, 13033, 8, 198, 198, 6329, 198, 198, 9203, 17168, 13789, 198, 198, 15269, 220, 12131, 532, 33448, 23694, 14770, 265, 9107, 198, ...
3.784753
446
from django.shortcuts import render from .models import Task from rest_framework import serializers from rest_framework.response import Response from rest_framework.decorators import api_view # Create your views here.
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 764, 27530, 1330, 15941, 198, 6738, 1334, 62, 30604, 1330, 11389, 11341, 198, 6738, 1334, 62, 30604, 13, 26209, 1330, 18261, 198, 6738, 1334, 62, 30604, 13, 12501, 273, 2024, ...
4.111111
54
# -*- coding: utf-8 -*- """ This file contains all the settings that defines the development server. SECURITY WARNING: don't run with debug turned on in production! """ import logging from typing import List from server.settings.components.common import INSTALLED_APPS, MIDDLEWARE # Setting the development status: ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 1212, 2393, 4909, 477, 262, 6460, 326, 15738, 262, 2478, 4382, 13, 198, 198, 23683, 4261, 9050, 39410, 25, 836, 470, 1057, 351, 14257, 2900, 319, 287, ...
3.119205
151
import sys import json from random import choice, random import time from pyaidoop_graphql_client.api import Client if __name__ == "__main__": main(sys.argv)
[ 11748, 25064, 198, 11748, 33918, 198, 6738, 4738, 1330, 3572, 11, 4738, 198, 11748, 640, 198, 6738, 12972, 1698, 11224, 62, 34960, 13976, 62, 16366, 13, 15042, 1330, 20985, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 83...
3.055556
54
#!/bin/env python3 """ Extracts all metro and RER stations from an OSM dump. """ import xml.etree.cElementTree as ET import argparse import csv from math import radians, cos, sin, asin, sqrt def extract_stations_from_dump(dump_path): """Extract a list of |Station|s from an XML dump.""" tree = ET.parse(dump_p...
[ 2, 48443, 8800, 14, 24330, 21015, 18, 198, 37811, 198, 11627, 974, 82, 477, 24536, 290, 371, 1137, 8985, 422, 281, 7294, 44, 10285, 13, 198, 37811, 198, 198, 11748, 35555, 13, 316, 631, 13, 66, 20180, 27660, 355, 12152, 198, 11748, ...
2.411189
1,430
# note : this does not create the link between the map and the world. It only spawns the robots. # Please make sure to go back and manually add the path to the bitmap file file_name = 'plots.txt' f = open("../new_results/" + file_name, "w+") counter = 1 for i in range(1, 10): for j in range(1, 6): f.write('...
[ 2, 3465, 1058, 428, 857, 407, 2251, 262, 2792, 1022, 262, 3975, 290, 262, 995, 13, 632, 691, 44632, 262, 14193, 13, 198, 2, 4222, 787, 1654, 284, 467, 736, 290, 14500, 751, 262, 3108, 284, 262, 1643, 8899, 2393, 198, 7753, 62, 367...
2.416667
204
# -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2018-2019 Contributor # # 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 #...
[ 2, 532, 9, 12, 269, 9078, 12, 521, 298, 12, 5715, 25, 604, 26, 33793, 12, 8658, 82, 12, 14171, 25, 18038, 532, 9, 12, 198, 2, 409, 25, 900, 4292, 8658, 2705, 8658, 11338, 28, 19, 6482, 10394, 28, 19, 25, 198, 2, 198, 2, 1506...
2.824074
648
from types import SimpleNamespace import pytest import threading from py4web.core import Fixture result = {'seq': []} foo = Foo()
[ 6738, 3858, 1330, 17427, 36690, 10223, 198, 11748, 12972, 9288, 198, 11748, 4704, 278, 198, 6738, 12972, 19, 12384, 13, 7295, 1330, 376, 9602, 198, 198, 20274, 796, 1391, 6, 41068, 10354, 17635, 92, 628, 628, 198, 21943, 796, 36080, 341...
3.159091
44
# uncompyle6 version 3.7.4 # Python bytecode 3.7 (3394) # Decompiled from: Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)] # Embedded file name: T:\InGame\Gameplay\Scripts\Server\objects\components\object_inventory_component.py # Compiled at: 2020-10-06 03:00:48 # Size of source...
[ 2, 34318, 2349, 21, 2196, 513, 13, 22, 13, 19, 198, 2, 11361, 18022, 8189, 513, 13, 22, 357, 2091, 5824, 8, 198, 2, 4280, 3361, 3902, 422, 25, 11361, 513, 13, 22, 13, 24, 357, 31499, 14, 85, 18, 13, 22, 13, 24, 25, 1485, 66,...
2.752106
831
from __future__ import absolute_import, unicode_literals from django.core.management import BaseCommand, CommandError from sqs_consumer.worker.service import WorkerService
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 42625, 14208, 13, 7295, 13, 27604, 1330, 7308, 21575, 11, 9455, 12331, 198, 198, 6738, 19862, 82, 62, 49827, 13, 28816, 13, 15271, 1330, ...
3.977273
44
import numpy as np
[ 11748, 299, 32152, 355, 45941, 198 ]
3.166667
6
# coding: utf-8 from the import expect from filesystem import paths from filesystem.paths import root
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 6738, 262, 1330, 1607, 198, 198, 6738, 29905, 1330, 13532, 198, 6738, 29905, 13, 6978, 82, 1330, 6808, 628 ]
3.75
28
from openpharmacophore.databases.zinc import get_zinc_urls, discretize_values import pytest
[ 6738, 1280, 746, 32813, 2522, 382, 13, 19608, 18826, 13, 89, 1939, 1330, 651, 62, 89, 1939, 62, 6371, 82, 11, 1221, 1186, 1096, 62, 27160, 198, 11748, 12972, 9288, 628, 220, 220, 220, 220 ]
2.771429
35
import numpy as np import matplotlib.pyplot as plt from scipy.integrate import odeint from scipy.optimize import minimize import pandas as pd # generate data file from TCLab or get sample data file from: # http://apmonitor.com/pdc/index.php/Main/ArduinoEstimation2 # Import data file # Column 1 = time (t) # ...
[ 11748, 299, 32152, 355, 45941, 201, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 201, 198, 6738, 629, 541, 88, 13, 18908, 4873, 1330, 267, 2934, 600, 201, 198, 6738, 629, 541, 88, 13, 40085, 1096, 1330, 17775, 201, ...
2.130608
1,003
from math import gcd moons = [(-16, -1, -12), (0, -4, -17), (-11, 11, 0), (2, 2, -6)] velocities = [(0,0,0),(0,0,0),(0,0,0),(0,0,0)] x_positions = set() y_positions = set() z_positions = set() x_positions.add((moons[0][0],moons[1][0],moons[2][0],moons[3][0],velocities[0][0],velocities[1][0],velocities[2][0],velociti...
[ 6738, 10688, 1330, 308, 10210, 198, 198, 5908, 684, 796, 685, 32590, 1433, 11, 532, 16, 11, 532, 1065, 828, 357, 15, 11, 532, 19, 11, 532, 1558, 828, 13841, 1157, 11, 1367, 11, 657, 828, 357, 17, 11, 362, 11, 532, 21, 15437, 198...
1.966285
1,661
import AutoTicketsBot as tBot configDestination = 'var/config.yml' args = tBot.addArgs() config = tBot.configRead(configDestination) if tBot.configWrite(configDestination, args, config) is True: print("Successfully store new config to {}".format(configDestination)) ticketsBot = tBot.AutoTicketsBot(config) #schedul...
[ 11748, 11160, 43254, 20630, 355, 256, 20630, 198, 198, 11250, 24159, 1883, 796, 705, 7785, 14, 11250, 13, 88, 4029, 6, 198, 198, 22046, 796, 256, 20630, 13, 2860, 42035, 3419, 198, 11250, 796, 256, 20630, 13, 11250, 5569, 7, 11250, 24...
2.896396
222
extended_map = get_map_from_input('input') number_of_threes = traverse_map_counting_trees(extended_map, 1, 1) print(f"1x1 => {number_of_threes}") number_of_threes = traverse_map_counting_trees(extended_map, 3, 1) print(f"3x1 => {number_of_threes}") number_of_threes = traverse_map_counting_trees(extended_map, 5, 1...
[ 628, 198, 2302, 1631, 62, 8899, 796, 651, 62, 8899, 62, 6738, 62, 15414, 10786, 15414, 11537, 198, 198, 17618, 62, 1659, 62, 400, 6037, 796, 38138, 62, 8899, 62, 9127, 278, 62, 83, 6037, 7, 2302, 1631, 62, 8899, 11, 352, 11, 352, ...
2.368852
366
import os import sys import pytest from django.contrib.auth import get_user_model from users.tests.factories import UserFactory sys.path.append(os.path.join(os.path.dirname(__file__), 'app')) User = get_user_model()
[ 11748, 28686, 198, 11748, 25064, 198, 198, 11748, 12972, 9288, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 651, 62, 7220, 62, 19849, 198, 198, 6738, 2985, 13, 41989, 13, 22584, 1749, 1330, 11787, 22810, 198, 198, 17597, 13,...
2.846154
78
import numpy as np import numba from numba import jit
[ 11748, 299, 32152, 355, 45941, 198, 11748, 997, 7012, 198, 6738, 997, 7012, 1330, 474, 270 ]
3.3125
16
''' Smallest factor to reach a number composed of digit '1' Status: Accepted ''' ############################################################################### def main(): """Read input and print output""" while True: try: number = int(input()) except EOFError: break...
[ 7061, 6, 198, 18712, 395, 5766, 284, 3151, 257, 1271, 13160, 286, 16839, 705, 16, 6, 198, 198, 19580, 25, 21699, 276, 198, 7061, 6, 198, 198, 29113, 29113, 7804, 4242, 21017, 198, 198, 4299, 1388, 33529, 198, 220, 220, 220, 37227, 5...
2.430421
309
from flask import request, abort from flask_restful_swagger_3 import Resource, swagger from flask_jwt_extended import jwt_required, get_jwt_identity, get_jwt from models.message import Message, MessageCreate from database.manager import db from emails import send_new_message
[ 6738, 42903, 1330, 2581, 11, 15614, 198, 6738, 42903, 62, 2118, 913, 62, 2032, 7928, 62, 18, 1330, 20857, 11, 1509, 7928, 198, 6738, 42903, 62, 73, 46569, 62, 2302, 1631, 1330, 474, 46569, 62, 35827, 11, 651, 62, 73, 46569, 62, 738,...
3.631579
76
#!/usr/bin/env python3 # # Copyright (c) 2015, Intel Corporation # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditi...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 198, 2, 15069, 357, 66, 8, 1853, 11, 8180, 10501, 198, 2, 198, 2, 2297, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, 11, 351, 393, 1231, 198, 2, 17613, 11, 389, 10431...
3.211359
1,074
# coding:utf-8 # example 17: quick_sort.py import random # def quick_sort(array): # if len(array) <= 1: # return array # pivot_idx = 0 # pivot = array[pivot_idx] # less_part = [num for num in array[pivot_idx + 1:] if num <= pivot] # great_part = [num for num in array[pivot_idx + 1:] if nu...
[ 2, 19617, 25, 40477, 12, 23, 198, 2, 1672, 1596, 25, 2068, 62, 30619, 13, 9078, 198, 198, 11748, 4738, 628, 198, 2, 825, 2068, 62, 30619, 7, 18747, 2599, 198, 2, 220, 220, 220, 220, 611, 18896, 7, 18747, 8, 19841, 352, 25, 198, ...
2.349442
269
from zope.interface import implements from epsilon.extime import Time from axiom.iaxiom import IScheduler from axiom.item import Item from axiom.attributes import text from axiom.test.historic.stubloader import StubbedTest from xquotient.exmess import _UndeferTask, Message, INBOX_STATUS, CLEAN_STATUS from xquotient....
[ 6738, 1976, 3008, 13, 39994, 1330, 23986, 198, 198, 6738, 304, 862, 33576, 13, 2302, 524, 1330, 3862, 198, 198, 6738, 7877, 29005, 13, 544, 87, 29005, 1330, 3180, 1740, 18173, 198, 6738, 7877, 29005, 13, 9186, 1330, 9097, 198, 6738, 7...
3.151899
158
""" A test file for testing zestimation The learned file could be downloaded at [learned_zqso_only_model_outdata_full_dr9q_minus_concordance_norm_1176-1256.mat] (https://drive.google.com/file/d/1SqAU_BXwKUx8Zr38KTaA_nvuvbw-WPQM/view?usp=sharing) """ import os import re import time import numpy as np from .test_selec...
[ 37811, 198, 32, 1332, 2393, 329, 4856, 1976, 395, 18991, 198, 198, 464, 4499, 2393, 714, 307, 15680, 379, 198, 58, 35720, 276, 62, 89, 80, 568, 62, 8807, 62, 19849, 62, 448, 7890, 62, 12853, 62, 7109, 24, 80, 62, 40191, 62, 1102, ...
2.519481
231
import pytest from quart.xml_parser_quart import fusion_vulnerability_dictionaries EXPECTED_1 = \ {u'1': {'category': u'Category 1', 'consequence': u'Consequence 1', 'diagnosis': u'Diagnosis 1', 'hosts': [{'ip': u'1.1.1.1', 'name': 'host1'}, {'ip': u'2.2.2...
[ 11748, 12972, 9288, 201, 198, 201, 198, 6738, 28176, 13, 19875, 62, 48610, 62, 36008, 1330, 21748, 62, 85, 40920, 62, 67, 2867, 3166, 201, 198, 201, 198, 49864, 9782, 1961, 62, 16, 796, 3467, 201, 198, 220, 220, 220, 1391, 84, 6, ...
1.800587
1,364
from poker import poker, kind, two_pair, hand_rank, card_ranks, best_hand def test(): "Test cases for the functions in poker program" sf = "6C 7C 8C 9C TC".split() # Straight Flush fk = "9D 9H 9S 9C 7D".split() # Four of a Kind fh = "TD TC TH 7C 7D".split() # Full House tp = "5S 5D AC AS KS".sp...
[ 6738, 27101, 1330, 27101, 11, 1611, 11, 734, 62, 24874, 11, 1021, 62, 43027, 11, 2657, 62, 81, 2283, 11, 1266, 62, 4993, 628, 198, 4299, 1332, 33529, 198, 220, 220, 220, 366, 14402, 2663, 329, 262, 5499, 287, 27101, 1430, 1, 198, ...
2.15625
576
""" base estimator class for megaman """ # Author: James McQueen -- <jmcq@u.washington.edu> # LICENSE: Simplified BSD https://github.com/mmp2/megaman/blob/master/LICENSE import numpy as np from scipy.sparse import isspmatrix from sklearn.base import BaseEstimator, TransformerMixin from sklearn.utils.validation impo...
[ 37811, 2779, 3959, 1352, 1398, 329, 17243, 10546, 37227, 198, 198, 2, 6434, 25, 3700, 1982, 32466, 220, 1377, 1279, 73, 23209, 80, 31, 84, 13, 86, 2542, 13, 15532, 29, 198, 2, 38559, 24290, 25, 45157, 1431, 347, 10305, 3740, 1378, 1...
2.841176
170
#!/usr/bin/env python # -*- coding: UTF-8 -*- # # generated by wxGlade 0.9.4 on Sat Feb 1 19:14:54 2020 # import wx from pymorsecode import MorseCode # begin wxGlade: dependencies # end wxGlade # begin wxGlade: extracode # end wxGlade # end of class MyFrame # end of class MyApp if __name__ == "__main__": a...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 198, 2, 198, 2, 7560, 416, 266, 87, 9861, 671, 657, 13, 24, 13, 19, 319, 7031, 3158, 220, 352, 678, 25, 1415, 25, 4051, 1...
2.369128
149
"""update user profile definition Revision ID: d3f96fb8b8e5 Revises: 2b13f89aa1b3 Create Date: 2021-10-18 15:45:33.906745 """ from alembic import op import sqlalchemy as sa from alembic_utils.pg_function import PGFunction from sqlalchemy import text as sql_text # revision identifiers, used by Alembic. revision = 'd3...
[ 37811, 19119, 2836, 7034, 6770, 198, 198, 18009, 1166, 4522, 25, 288, 18, 69, 4846, 21855, 23, 65, 23, 68, 20, 198, 18009, 2696, 25, 362, 65, 1485, 69, 4531, 7252, 16, 65, 18, 198, 16447, 7536, 25, 33448, 12, 940, 12, 1507, 1315, ...
2.833333
174
""" On an 8 x 8 chessboard, there is one white rook. There also may be empty squares, white bishops, and black pawns. These are given as characters 'R', '.', 'B', and 'p' respectively. Uppercase characters represent white pieces, and lowercase characters represent black pieces. The rook moves as in the rules of Chess:...
[ 37811, 198, 198, 2202, 281, 807, 2124, 807, 19780, 3526, 11, 612, 318, 530, 2330, 10929, 13, 1318, 635, 743, 307, 6565, 24438, 11, 2330, 27538, 11, 290, 2042, 29649, 82, 13, 2312, 389, 1813, 355, 3435, 705, 49, 3256, 705, 2637, 11, ...
3.209076
617
# Copyright (c) 2020, Huawei Technologies.All rights reserved. # # Licensed under the BSD 3-Clause License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://opensource.org/licenses/BSD-3-Clause # # Unless required by applicable law...
[ 2, 15069, 357, 66, 8, 12131, 11, 43208, 21852, 13, 3237, 2489, 10395, 13, 198, 2, 198, 2, 49962, 739, 262, 347, 10305, 513, 12, 2601, 682, 13789, 220, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287,...
3.645669
254
# -*- coding: utf-8 -*- from simmate.website.core_components.filters import ( Structure, Forces, Thermodynamics, Calculation, ) from simmate.database.base_data_types.dynamics import ( DynamicsRun as DynamicsRunTable, DynamicsIonicStep as DynamicsIonicStepTable, )
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 985, 9830, 13, 732, 12485, 13, 7295, 62, 5589, 3906, 13, 10379, 1010, 1330, 357, 198, 220, 220, 220, 32522, 11, 198, 220, 220, 220, 12700, 11, 198, 220, 2...
2.694444
108
import numpy as np import pandas as pd from taller1.models import Userid_Timestamp_Count
[ 11748, 299, 32152, 355, 45941, 201, 198, 11748, 19798, 292, 355, 279, 67, 201, 198, 6738, 25242, 16, 13, 27530, 1330, 11787, 312, 62, 14967, 27823, 62, 12332, 201 ]
3.137931
29
"""Convert Shapefiles to Tecplot plt format usage: > python shapefile_to_plt.py shapefile.shp outfile.plt Necessary modules ----------------- pyshp The Python Shapefile Library (pyshp) reads and writes ESRI Shapefiles in pure Python. https://pypi.python.org/pypi/pyshp https://www.esri.com/library/whi...
[ 37811, 3103, 1851, 25959, 16624, 284, 48257, 29487, 458, 83, 5794, 198, 198, 26060, 25, 628, 220, 220, 220, 1875, 21015, 5485, 7753, 62, 1462, 62, 489, 83, 13, 9078, 5485, 7753, 13, 1477, 79, 503, 7753, 13, 489, 83, 198, 198, 45, ...
2.72402
1,761
"""When creating factory functions, plain functions are good unless you need to inherit from a higher level class. If you don't need to inherit, dont use a class.""" from functools import partial from .suits import * from .cards import * def card_mapping(rank, suit): """Get the desired rank. If the rank isnt ...
[ 37811, 2215, 4441, 8860, 5499, 11, 8631, 5499, 389, 922, 4556, 345, 761, 284, 198, 259, 372, 270, 422, 257, 2440, 1241, 1398, 13, 1002, 345, 836, 470, 761, 284, 16955, 11, 17666, 779, 257, 198, 4871, 526, 15931, 198, 198, 6738, 1257...
3.085561
187
# -*- coding: utf-8 -*- import unittest from app.services.spider_qidian import QidianSpider
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 555, 715, 395, 198, 6738, 598, 13, 30416, 13, 2777, 1304, 62, 80, 19825, 1330, 1195, 19825, 41294, 198 ]
2.657143
35
from __future__ import annotations import logging import socket import pytest from .constants import TEST_HOST, TEST_PORT logger = logging.getLogger("tests.fixtures.client")
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 11748, 18931, 198, 11748, 17802, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 764, 9979, 1187, 1330, 43001, 62, 39, 10892, 11, 43001, 62, 15490, 628, 198, 6404, 1362, 796, 18931, 13, 1136...
3.433962
53
"""Standard raspberry GPIO access layer. It defines abstract layer that extends InOutInterface to access all standard ports on rapsberry pi. It uses RPi.GPIO under the hood. Thanks to that you have a standardized way of accessing these ports, as well as any others implementing InOutInterface. """ import logging fr...
[ 37811, 23615, 38973, 50143, 1895, 7679, 13, 198, 198, 1026, 15738, 12531, 7679, 326, 14582, 554, 7975, 39317, 284, 1895, 477, 3210, 198, 3742, 319, 374, 1686, 8396, 31028, 13, 632, 3544, 25812, 72, 13, 16960, 9399, 739, 262, 14263, 13, ...
4.394737
114
import discord import os import json from discord.ext import commands, tasks import time import asyncio import random from discord.utils import MAX_ASYNCIO_SECONDS ########################################################################## #generalrole = discord.utils.get(ctx.guild.roles, id=661454256251076613) #logch...
[ 11748, 36446, 198, 11748, 28686, 198, 11748, 33918, 198, 6738, 36446, 13, 2302, 1330, 9729, 11, 8861, 198, 11748, 640, 198, 11748, 30351, 952, 198, 11748, 4738, 198, 198, 6738, 36446, 13, 26791, 1330, 25882, 62, 26483, 7792, 9399, 62, 2...
3.34127
252
#First, we import the relevant libraries import sys import pandas as pd from sqlalchemy import create_engine def load_data(messages_filepath, categories_filepath): '''This function will load the messages and categories datasets. Then, this function will merge the datasets by left join using the common id...
[ 2, 5962, 11, 356, 1330, 262, 5981, 12782, 198, 11748, 25064, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 44161, 282, 26599, 1330, 2251, 62, 18392, 628, 198, 4299, 3440, 62, 7890, 7, 37348, 1095, 62, 7753, 6978, 11, 9376, 62, 77...
2.811342
1,781
import torch from argparse import ArgumentParser, Namespace import logging import os from collections import namedtuple import random import torch Transition = namedtuple('Transition', ('state', 'action', 'next_state', 'reward', 'done'))
[ 11748, 28034, 198, 6738, 1822, 29572, 1330, 45751, 46677, 11, 28531, 10223, 198, 11748, 18931, 198, 11748, 28686, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 11748, 4738, 198, 11748, 28034, 198, 198, 8291, 653, 796, 3706, 83, 29291, 107...
3
89
import pandas as pd from modules import bedtools from modules import intervals if __name__ == "__main__": pass
[ 11748, 19798, 292, 355, 279, 67, 198, 6738, 13103, 1330, 3996, 31391, 198, 6738, 13103, 1330, 20016, 628, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1208, 198 ]
3.305556
36
#!/usr/bin/env python3 f=1 fprev=1 n=2 while f < 10**999: f,fprev = f + fprev,f n += 1 print(n)
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 69, 28, 16, 198, 69, 47050, 28, 16, 198, 77, 28, 17, 198, 4514, 277, 1279, 838, 1174, 17032, 25, 198, 220, 277, 11, 69, 47050, 796, 277, 1343, 277, 47050, 11, 69, 198, 220, ...
1.851852
54
test = list() test.append('Werberty') test.append(21) galera = list() galera.append(test[:]) test[0] = 'Maria' test[1] = 22 galera.append(test[:]) print(galera) pessoal = [['joo', 19], ['Ana', 33], ['Joaquim', 13], ['Maria', 45]] print(pessoal[1]) print(pessoal[2][1]) for p in pessoal: print(f'{p[0]} tem {p[1]} an...
[ 9288, 796, 1351, 3419, 198, 9288, 13, 33295, 10786, 54, 263, 527, 774, 11537, 198, 9288, 13, 33295, 7, 2481, 8, 198, 13528, 8607, 796, 1351, 3419, 198, 13528, 8607, 13, 33295, 7, 9288, 58, 25, 12962, 198, 9288, 58, 15, 60, 796, 70...
2.107143
252
from summariser.ngram_vector.base import Sentence from summariser.utils.data_helpers import * from nltk.stem.porter import PorterStemmer from summariser.ngram_vector.state_type import * import random
[ 6738, 15676, 5847, 13, 782, 859, 62, 31364, 13, 8692, 1330, 11352, 594, 198, 6738, 15676, 5847, 13, 26791, 13, 7890, 62, 16794, 364, 1330, 1635, 198, 6738, 299, 2528, 74, 13, 927, 13, 26634, 1330, 20890, 1273, 368, 647, 198, 6738, 1...
3.366667
60
from setuptools import setup setup(name='betbright_test', version='0.1', description='Python product category classification kit', url='', author='Oleksii Nidzelskyi', author_email='alexey.education@gmail.com', license='MIT', packages=['betbright_test'], zip_safe=False)
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 40406, 7, 3672, 11639, 11181, 29199, 62, 9288, 3256, 198, 220, 220, 220, 220, 220, 2196, 11639, 15, 13, 16, 3256, 198, 220, 220, 220, 220, 220, 6764, 11639, 37906, 1720, 6536, 17923, 6220...
2.5
128
from docsie_universal_importer.providers.base.urls import default_urlpatterns from .import_provider import GoogleCloudStorageProvider urlpatterns = default_urlpatterns(GoogleCloudStorageProvider)
[ 6738, 34165, 494, 62, 40082, 62, 320, 26634, 13, 15234, 4157, 13, 8692, 13, 6371, 82, 1330, 4277, 62, 6371, 33279, 82, 198, 198, 6738, 764, 11748, 62, 15234, 1304, 1330, 3012, 18839, 31425, 29495, 198, 198, 6371, 33279, 82, 796, 4277,...
3.735849
53
import argparse import json import os import time from elf.segmentation.multicut import get_multicut_solver, _to_objective from elf.segmentation.utils import load_multicut_problem # TODO add large problems! where decomp should shine... if __name__ == "__main__": main()
[ 11748, 1822, 29572, 198, 11748, 33918, 198, 11748, 28686, 198, 11748, 640, 198, 198, 6738, 23878, 13, 325, 5154, 341, 13, 16680, 13554, 1330, 651, 62, 16680, 13554, 62, 82, 14375, 11, 4808, 1462, 62, 15252, 425, 198, 6738, 23878, 13, ...
3.218391
87
IMAP_GMAIL = 'imap.gmail.com' IMAP_OUTLOOK = 'outlook.office365.com' IMAP_YAHOO = 'imap.mail.yahoo.com'
[ 3955, 2969, 62, 38, 5673, 4146, 796, 705, 320, 499, 13, 14816, 13, 785, 6, 198, 3955, 2969, 62, 12425, 43, 15308, 796, 705, 448, 5460, 13, 31810, 24760, 13, 785, 6, 198, 3955, 2969, 62, 56, 18429, 6684, 796, 705, 320, 499, 13, 4...
2.039216
51
"""Unit test package for oadds."""
[ 37811, 26453, 1332, 5301, 329, 267, 2860, 82, 526, 15931, 198 ]
3.181818
11
from schematics.types import StringType, BooleanType, MD5Type, BaseType from schematics.exceptions import ValidationError from schematics.types.compound import ModelType from openprocurement.api.models import ListType from openprocurement.tender.core.procedure.models.award import ( Award as BaseAward, PatchAwar...
[ 6738, 3897, 6759, 873, 13, 19199, 1330, 10903, 6030, 11, 41146, 6030, 11, 10670, 20, 6030, 11, 31783, 198, 6738, 3897, 6759, 873, 13, 1069, 11755, 1330, 3254, 24765, 12331, 198, 6738, 3897, 6759, 873, 13, 19199, 13, 5589, 633, 1330, 9...
3.25
168
from __future__ import print_function import numpy as np from fidimag.atomistic import Sim from fidimag.common import CuboidMesh from fidimag.atomistic import UniformExchange def test_exch_1d(): """ Test the x component of the exchange field in a 1D mesh, with the spin ordering: 0 1 2 3 4 5 """...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 49909, 48466, 13, 37696, 2569, 1330, 3184, 198, 6738, 49909, 48466, 13, 11321, 1330, 7070, 1868, 37031, 198, 6738, 49909, 48466, 13, 37696, 2569...
2.069462
1,598