content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
# Guess The No n = 45 attempt = 0 NoOfGuess = 9 while NoOfGuess > 0: attempt += 1 print("---------------------------------") No = int(input("Enter a No:-")) if No == n: print("Congratulations You won!") print("Total Attempt Taken:-", attempt) break elif No < n: pri...
[ 2, 37571, 383, 1400, 198, 77, 796, 4153, 198, 1078, 1791, 796, 657, 198, 2949, 5189, 8205, 408, 796, 860, 198, 198, 4514, 1400, 5189, 8205, 408, 1875, 657, 25, 198, 220, 220, 220, 2230, 15853, 352, 198, 220, 220, 220, 3601, 7203, ...
2.47479
238
#!/usr/bin/env python # -------------------------------------------------------------------------- # # System # -------------------------------------------------------------------------- # import os import getpass import pickle from threading import Thread # ------------------------------------------------------------...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 16529, 35937, 1303, 198, 2, 4482, 198, 2, 16529, 35937, 1303, 198, 11748, 28686, 198, 11748, 651, 6603, 198, 11748, 2298, 293, 198, 6738, 4704, 278, 1330, 14122, 198, 198, 2, 16529,...
3.540586
1,195
import logging import pytest from promise import Promise from graphene import InputObjectType from graphene.relay import Connection from sqlalchemy import inspect from .models import Editor as EditorModel from .models import Pet as PetModel from ..fields import SQLAlchemyConnectionField, SQLAlchemyFilteredConnection...
[ 11748, 18931, 198, 198, 11748, 12972, 9288, 198, 6738, 6991, 1330, 34920, 198, 198, 6738, 42463, 1330, 23412, 10267, 6030, 198, 6738, 42463, 13, 2411, 323, 1330, 26923, 198, 6738, 44161, 282, 26599, 1330, 10104, 198, 198, 6738, 764, 27530...
4.069307
101
import aiml kernel = aiml.Kernel() kernel.learn("startup.xml") kernel.respond("load aiml") while True: print(kernel.respond(raw_input("Message >>")))
[ 11748, 4031, 75, 198, 198, 33885, 796, 4031, 75, 13, 42, 7948, 3419, 198, 33885, 13, 35720, 7203, 9688, 929, 13, 19875, 4943, 198, 33885, 13, 5546, 7203, 2220, 4031, 75, 4943, 198, 198, 4514, 6407, 25, 198, 220, 220, 220, 3601, 7, ...
2.818182
55
import paddle.nn as nn from .backbones.mix_transformer import MixVisionTransformer from .decoders.segformer_head import SegformerHead class Segformer(nn.Layer): """Segformer model implementation """
[ 11748, 39517, 13, 20471, 355, 299, 77, 198, 198, 6738, 764, 1891, 35095, 13, 19816, 62, 7645, 16354, 1330, 15561, 44206, 8291, 16354, 198, 6738, 764, 12501, 375, 364, 13, 325, 70, 16354, 62, 2256, 1330, 31220, 16354, 13847, 628, 198, ...
3.147059
68
# symbolic dispatch wrapper --------------------------------------------------- from functools import singledispatch, update_wrapper, wraps import inspect from .calls import Call, FuncArg, MetaArg, Lazy from .symbolic import Symbolic, create_sym_call, strip_symbolic def symbolic_dispatch(f = None, cls = object): ...
[ 2, 18975, 27965, 29908, 20368, 1783, 6329, 198, 198, 6738, 1257, 310, 10141, 1330, 31958, 8802, 963, 11, 4296, 62, 48553, 11, 27521, 198, 11748, 10104, 198, 198, 6738, 764, 66, 5691, 1330, 4889, 11, 11138, 66, 28100, 11, 30277, 28100, ...
2.576956
2,326
import tensorflow as tf from tensorflow.contrib.rnn import LSTMCell, MultiRNNCell, DropoutWrapper import numpy as np from tqdm import tqdm import matplotlib.pyplot as plt
[ 11748, 11192, 273, 11125, 355, 48700, 201, 198, 6738, 11192, 273, 11125, 13, 3642, 822, 13, 81, 20471, 1330, 406, 2257, 9655, 695, 11, 15237, 49, 6144, 28780, 11, 14258, 448, 36918, 2848, 201, 198, 11748, 299, 32152, 355, 45941, 201, ...
2.623188
69
# ================================================================= # # Terms and Conditions of Use # # Unless otherwise noted, computer program source code of this # distribution # is covered under Crown Copyright, Government of # Canada, and is distributed under the MIT License. # # The Canada wordmark and related gr...
[ 2, 38093, 198, 2, 198, 2, 17637, 290, 27617, 286, 5765, 198, 2, 198, 2, 17486, 4306, 4367, 11, 3644, 1430, 2723, 2438, 286, 428, 198, 2, 6082, 1303, 318, 5017, 739, 12223, 15069, 11, 5070, 286, 198, 2, 3340, 11, 290, 318, 9387, ...
2.888957
1,630
""" String utilities. """ def camelize(value): """ Return the camel-cased version of a string. Used for analysis class names. """ c = _camelcase() return "".join(next(c)(x) if x else '_' for x in value.split("_"))
[ 37811, 198, 10100, 20081, 13, 198, 37811, 198, 198, 4299, 41021, 1096, 7, 8367, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 8229, 262, 41021, 12, 66, 839, 2196, 286, 257, 4731, 13, 198, 220, 220, 220, 16718, 329, 3781, 1398...
2.597826
92
# 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\holidays\holiday_tradition.py # Compiled at: 2020-06-15 20:09:55 # Size of source mod 2**32: 25532 b...
[ 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,...
1.76446
3,821
#encoding: utf-8 import re import json from ..extractor.fox import FOXIE as Old from ..utilsEX import download_webPage_by_PYCURL
[ 2, 12685, 7656, 25, 3384, 69, 12, 23, 628, 198, 11748, 302, 198, 11748, 33918, 198, 198, 6738, 11485, 2302, 40450, 13, 12792, 1330, 19912, 10008, 355, 5706, 198, 6738, 11485, 26791, 6369, 1330, 4321, 62, 12384, 9876, 62, 1525, 62, 47,...
2.977273
44
from .arena_object import Object class Tetrahedron(Object): """ Class for Tetrahedron in the ARENA. """
[ 6738, 764, 533, 2616, 62, 15252, 1330, 9515, 198, 198, 4871, 27351, 430, 704, 1313, 7, 10267, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 5016, 329, 27351, 430, 704, 1313, 287, 262, 5923, 45510, 13, 198, 220, 220, 220, 3722...
2.659091
44
import os from pyrogram.types import Message from tronx import USER_ID, Config from tronx.database.postgres import dv_sql as dv # ----- MODULES = sorted(__list_all_plugins()) __all__ = MODULES + ["MODULES"] # ----- # types of message # chat type
[ 11748, 28686, 198, 198, 6738, 12972, 39529, 13, 19199, 1330, 16000, 198, 198, 6738, 491, 261, 87, 1330, 1294, 1137, 62, 2389, 11, 17056, 198, 198, 6738, 491, 261, 87, 13, 48806, 13, 7353, 34239, 1330, 288, 85, 62, 25410, 355, 288, 8...
2.789474
95
from copy import deepcopy import pytest from channels.testing import WebsocketCommunicator from backend.groups.models import ChatGroup, GroupMessage from backend.socket_chat.tests.utils import round_to_minutes pytestmark = [pytest.mark.asyncio, pytest.mark.django_db(transaction=True)] @pytest.fixture @pytest.fi...
[ 6738, 4866, 1330, 2769, 30073, 198, 198, 11748, 12972, 9288, 198, 6738, 9619, 13, 33407, 1330, 47736, 5459, 30813, 26407, 198, 198, 6738, 30203, 13, 24432, 13, 27530, 1330, 24101, 13247, 11, 4912, 12837, 198, 6738, 30203, 13, 44971, 62, ...
3.333333
144
import os import random import cherrypy """ Dumb battlesnake server in python. For instructions see https://github.com/BattlesnakeOfficial/starter-snake-python/README.md """ move_names = ["up", "down", "left", "right"] moves_dx = [0, 0, -1, 1] moves_dy = [1, -1, 0, 0] """ Snake object. """ # Ideas: # 1. evaluate...
[ 11748, 28686, 198, 11748, 4738, 198, 11748, 23612, 9078, 198, 198, 37811, 198, 35, 2178, 10181, 77, 539, 4382, 287, 21015, 13, 198, 1890, 7729, 766, 3740, 1378, 12567, 13, 785, 14, 33, 1078, 829, 77, 539, 28529, 14, 12339, 12, 16184, ...
2.796526
403
depends = ["unittest"] description = """ Plug and play integration with the Jenkins Coninuous Integration server. For more information, visit: http://www.jenkins-ci.org/ """
[ 10378, 2412, 796, 14631, 403, 715, 395, 8973, 198, 11213, 796, 37227, 198, 23257, 290, 711, 11812, 351, 262, 21835, 1482, 259, 5623, 38410, 4382, 13, 198, 198, 1890, 517, 1321, 11, 3187, 25, 198, 4023, 1378, 2503, 13, 48796, 5331, 12,...
3.625
48
import numpy as np import os import random from copy import copy from typing import List import pickle from agents.plastic_dqn_v1 import config REPLAY_MEMORY_SIZE = 50_000 # How many last steps to keep for model training MIN_REPLAY_MEMORY_SIZE = 1_000 # Minimum number of steps in a memory to class LearnBuffer: ...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 11748, 4738, 198, 6738, 4866, 1330, 4866, 198, 6738, 19720, 1330, 7343, 198, 198, 11748, 2298, 293, 198, 198, 6738, 6554, 13, 489, 3477, 62, 49506, 77, 62, 85, 16, 1330, 4566, 198...
2.694093
474
#!/usr/bin/env python3 import sys import os import time # # Generate the master out.grid # Create a 3M point file of lat/lons - and write to ASCII file called out.grd. # This file will be used as input to ucvm_query for medium scale test for images # if not os.path.exists("out.grd"): print("Creating grd.out file.") ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 640, 198, 2, 198, 2, 2980, 378, 262, 4958, 503, 13, 25928, 198, 2, 13610, 257, 513, 44, 966, 2393, 286, 3042, 14, 75, 684, 532, 290...
2.582677
508
#!/usr/bin/python ''' Copyright(C) 2016 Engineering Department, University of Cambridge, UK. License Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LI...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 7061, 6, 198, 15269, 7, 34, 8, 1584, 14044, 2732, 11, 2059, 286, 14457, 11, 3482, 13, 198, 198, 34156, 198, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169...
3.018484
541
# •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• # Copyright (c) 2018, S.J.M. Steffann. This software is licensed under the BSD # 3-Clause License. Please see the LICENSE file in the project root directory. # •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••...
[ 2, 5595, 39967, 39967, 39967, 39967, 39967, 39967, 39967, 39967, 39967, 39967, 39967, 39967, 39967, 39967, 39967, 39967, 39967, 39967, 39967, 3581, 198, 2, 220, 15069, 357, 66, 8, 2864, 11, 311, 13, 41, 13, 44, 13, 2441, 487, 1236, 13, ...
3.248
125
""" Copyright (c) 2019 Muhammad Shehriyar Qureshi Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish,...
[ 37811, 198, 15269, 357, 66, 8, 13130, 15870, 1375, 71, 380, 88, 283, 1195, 942, 5303, 198, 198, 5990, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 198, 1659, 428, 3788, 290, 3917, 10314, 3696, 3...
3.848057
283
from annoying.functions import get_object_or_None from app.api.serializers import ( SendMessageRequestSerializer ) from app.core.models import MessageRequest from app.core.routing import ROUTING_REGISTRY from app.core.views import ( BaseAPIView, GET, POST ) from rest_framework import status class HealthCheckV...
[ 6738, 15774, 13, 12543, 2733, 1330, 651, 62, 15252, 62, 273, 62, 14202, 198, 6738, 598, 13, 15042, 13, 46911, 11341, 1330, 357, 198, 220, 220, 220, 16290, 12837, 18453, 32634, 7509, 198, 8, 198, 6738, 598, 13, 7295, 13, 27530, 1330, ...
3.064378
233
import requests if __name__ == '__main__': main()
[ 11748, 7007, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419, 198 ]
2.666667
21
# # Class SentimentSentences: sentences for polarity analysis # from nltk import stem from collections import Counter from bisect import bisect_left from sklearn.linear_model import LogisticRegression from sklearn.feature_extraction.text import CountVectorizer
[ 2, 198, 2, 5016, 11352, 3681, 31837, 3007, 25, 13439, 329, 755, 6806, 3781, 198, 2, 198, 198, 6738, 299, 2528, 74, 1330, 10717, 198, 6738, 17268, 1330, 15034, 198, 6738, 47457, 478, 1330, 47457, 478, 62, 9464, 198, 6738, 1341, 35720, ...
3.925373
67
n = 10 result = [] while n < 1000000: a = str(n) temp = 0 for i in a: temp += int(i) ** 5 if temp == n: result.append(n) n += 1 print(sum(result))
[ 77, 796, 838, 201, 198, 20274, 796, 17635, 201, 198, 4514, 299, 1279, 1802, 2388, 25, 201, 198, 220, 220, 220, 257, 796, 965, 7, 77, 8, 201, 198, 220, 220, 220, 20218, 796, 657, 201, 198, 220, 220, 220, 329, 1312, 287, 257, 25, ...
1.831776
107
for i in range(1, 100, 3): pass
[ 1640, 1312, 287, 2837, 7, 16, 11, 1802, 11, 513, 2599, 198, 220, 220, 220, 1208 ]
2.1875
16
import datetime import os from django.utils import timezone from tzlocal import get_localzone from obj_sys import obj_tools from obj_sys.models_ufs_obj import UfsObj from tagging.models import Tag
[ 11748, 4818, 8079, 198, 11748, 28686, 198, 198, 6738, 42625, 14208, 13, 26791, 1330, 640, 11340, 198, 6738, 256, 89, 12001, 1330, 651, 62, 12001, 11340, 198, 198, 6738, 26181, 62, 17597, 1330, 26181, 62, 31391, 198, 6738, 26181, 62, 175...
3.274194
62
# When merging two debts, if the resulting debt is negative, this function is used to swap the creditor and debtor, so that the sum of debt is always positive
[ 198, 220, 220, 220, 1303, 1649, 35981, 734, 20250, 11, 611, 262, 7186, 5057, 318, 4633, 11, 428, 2163, 318, 973, 284, 16075, 262, 45848, 290, 49519, 11, 523, 326, 262, 2160, 286, 5057, 318, 1464, 3967, 628 ]
4.342105
38
from django import forms from django.contrib.auth.models import User, Group from django.contrib.auth.forms import UserCreationForm from datetime import timedelta from main.models import UserEvent, UserProfile, Organization, Event import pytz
[ 6738, 42625, 14208, 1330, 5107, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 11, 4912, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 23914, 1330, 11787, 12443, 341, 8479, 198, 6738, 4818, 8079, 133...
3.796875
64
# -*- coding: utf-8 -*- """ Compute magnitude and relative vorticity """ import numpy as np import matplotlib as mpl mpl.rcParams['mathtext.default'] = 'regular' import matplotlib.pyplot as plt from mpl_toolkits.basemap import Basemap, addcyclic from netCDF4 import Dataset from pyveccalc.standard import WindHorizonta...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 7293, 1133, 14735, 290, 3585, 410, 419, 8467, 198, 37811, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 355, 285, 489, 198, 76, 489...
2.208136
1,057
'''Preprocess Epinions and Slashdot data''' '''Take in text file of data, create and save adjacency matrix''' import numpy as np, pickle import scipy.sparse as sp #Preprocess data #Optionally run normally or in test mode (when writing tests) if __name__ == "__main__": preprocess()
[ 7061, 6, 6719, 14681, 4551, 259, 507, 290, 26616, 26518, 1366, 7061, 6, 198, 7061, 6, 12322, 287, 2420, 2393, 286, 1366, 11, 2251, 290, 3613, 9224, 330, 1387, 17593, 7061, 6, 198, 198, 11748, 299, 32152, 355, 45941, 11, 2298, 293, 1...
3.164835
91
demo(15324)
[ 220, 220, 220, 220, 201, 198, 201, 198, 9536, 78, 7, 21395, 1731, 8 ]
1.357143
14
import abc import asyncio import datetime import logging from typing import Any, Coroutine, Generic, Iterable, Iterator, Tuple, TypeVar from .abc import ABCModbusProtocol, MultiRegister, SingleRegister logger = logging.getLogger(__name__) T = TypeVar("T") class ACThorRegistersMixin(ABCModbusProtocol, abc.A...
[ 11748, 450, 66, 198, 11748, 30351, 952, 198, 11748, 4818, 8079, 198, 11748, 18931, 198, 6738, 19720, 1330, 4377, 11, 2744, 28399, 11, 42044, 11, 40806, 540, 11, 40806, 1352, 11, 309, 29291, 11, 5994, 19852, 198, 198, 6738, 764, 39305, ...
2.266398
3,476
""" This file is a part of the source code for the PygameCommunityBot. This project has been licensed under the MIT license. Copyright (c) 2020-present PygameCommunityDiscord This file defines some constants and variables used across the whole codebase """ import io import os from typing import Optional, Union impor...
[ 37811, 198, 1212, 2393, 318, 257, 636, 286, 262, 2723, 2438, 329, 262, 9485, 6057, 20012, 20630, 13, 198, 1212, 1628, 468, 587, 11971, 739, 262, 17168, 5964, 13, 198, 15269, 357, 66, 8, 12131, 12, 25579, 9485, 6057, 20012, 15642, 585,...
2.428391
3,966
# Calculate masked average background reflectance import numpy as np def _avg_reflectance(spectral_data, mask): """ Find average reflectance of masked hyperspectral data instance. This is useful for calculating a target signature (n_band x 1 - column array) which is required in various GatorSense hypersp...
[ 2, 27131, 378, 29229, 2811, 4469, 4079, 590, 198, 198, 11748, 299, 32152, 355, 45941, 628, 198, 4299, 4808, 615, 70, 62, 35051, 590, 7, 4443, 1373, 62, 7890, 11, 9335, 2599, 198, 220, 220, 220, 37227, 9938, 2811, 4079, 590, 286, 292...
2.503968
504
if __name__ == "__main__": print(Solution().longestCommonPrefix(["hello", "heaven", "heavy"])) """ Time Complexity = O(N*k), k is the length of the common prefix Space Complexity = O(1) Write a function to find the longest common prefix string amongst an array of strings. ...
[ 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 3601, 7, 46344, 22446, 6511, 395, 17227, 36698, 844, 7, 14692, 31373, 1600, 366, 258, 4005, 1600, 366, 23701, 8973, 4008, 628, 628, 628, 198, 220, 220, ...
2.644068
177
import sys import binascii from xts_aes import XTSAES TEXT_TYPES = { 'encryption': 'plaintext', 'decryption': 'ciphertext', } arguments = sys.argv[1:] mode = 'encryption' inverse_mode = 'decryption' if arguments and (arguments[0] == '-d'): mode = 'decryption' inverse_mode = 'encryption' key = read_h...
[ 11748, 25064, 198, 11748, 9874, 292, 979, 72, 198, 198, 6738, 220, 742, 82, 62, 64, 274, 1330, 44235, 4090, 1546, 198, 198, 32541, 62, 9936, 47, 1546, 796, 1391, 198, 220, 220, 220, 705, 12685, 13168, 10354, 705, 25638, 5239, 3256, ...
2.444737
380
from __future__ import absolute_import from . import ssl_match_hostname
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 6738, 764, 1330, 264, 6649, 62, 15699, 62, 4774, 3672, 628 ]
3.52381
21
"""Line""" from .line import Line # noqa: F401
[ 37811, 13949, 37811, 198, 6738, 764, 1370, 1330, 6910, 220, 1303, 645, 20402, 25, 376, 21844, 198 ]
2.823529
17
import os from unittest.mock import Mock import pytest from doit.exceptions import InvalidCommand from doit.cmd_run import Run from doit.cmd_list import List from doit import doit_cmd
[ 11748, 28686, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 44123, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 466, 270, 13, 1069, 11755, 1330, 17665, 21575, 198, 6738, 466, 270, 13, 28758, 62, 5143, 1330, 5660, 198, 6738, 466, 270, ...
3.147541
61
import time import sys import os import glob import pickle import json import torch import pdb def mkdir(savepath, prune_fname=False): """ returns `True` iff `savepath` is created """ if prune_fname: savepath = os.path.dirname(savepath) if not os.path.exists(savepath): try: ...
[ 11748, 640, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 15095, 198, 11748, 2298, 293, 198, 11748, 33918, 198, 11748, 28034, 198, 11748, 279, 9945, 198, 198, 4299, 33480, 15908, 7, 21928, 6978, 11, 778, 1726, 62, 69, 3672, 28, 2510...
2.244726
237
"""Analyze results. Use the saved model output to calculate AUC and other metrics. """ import collections import cPickle as pickle import gflags as flags import gzip import logging import numpy as np import os import pandas as pd from sklearn import metrics from statsmodels.stats import proportion import sys flags.D...
[ 37811, 37702, 2736, 2482, 13, 198, 198, 11041, 262, 7448, 2746, 5072, 284, 15284, 317, 9598, 290, 584, 20731, 13, 198, 37811, 198, 198, 11748, 17268, 198, 11748, 269, 31686, 293, 355, 2298, 293, 198, 11748, 308, 33152, 355, 9701, 198, ...
2.073963
4,002
#!/usr/bin/env python import cgi import os from utils import simple_success_response_JSON from shutil import copyfile args = cgi.FieldStorage() u_id = args['u_id'].value ### Check if SVG exists for each user. If it doesn't, create one ### ------------------------------------------------------------ svg_pat...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 269, 12397, 198, 11748, 28686, 198, 198, 6738, 3384, 4487, 1330, 2829, 62, 13138, 62, 26209, 62, 40386, 198, 6738, 4423, 346, 1330, 4866, 7753, 198, 198, 22046, 796, 220, 2...
3.052308
325
from os import path from collections import OrderedDict from diot import Diot from pyppl.utils import alwaysList from bioprocs.utils.tsvio2 import TsvReader, TsvWriter infile = {{i.infile | quote}} colfile = {{i.colfile | quote}} outfile = {{o.outfile | quote}} inopts = {{args.inopts | repr}} cols = {{args.cols |...
[ 6738, 28686, 1330, 3108, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 6738, 2566, 313, 1330, 360, 5151, 198, 6738, 12972, 381, 75, 13, 26791, 1330, 1464, 8053, 198, 6738, 3182, 404, 305, 6359, 13, 26791, 13, 912, 85, 952, 17, ...
2.562883
652
from app.signal_calc import SignalCalc import plotly.graph_objects as go from plotly.subplots import make_subplots import math import numpy as np import pandas as pd def line_fig(date, y_axis, y_dict): """ :param date: xaxis, :param y_label: yaxis label e.g. 'y2','y3' :param y_dict: line data :ret...
[ 6738, 598, 13, 12683, 282, 62, 9948, 66, 1330, 26484, 9771, 66, 198, 11748, 7110, 306, 13, 34960, 62, 48205, 355, 467, 198, 6738, 7110, 306, 13, 7266, 489, 1747, 1330, 787, 62, 7266, 489, 1747, 198, 11748, 10688, 198, 11748, 299, 32...
1.985037
401
class SplitDataLoader: """ This class distributes each sample among different workers. It returns a dictionary with key as data party's id and value as a pointer to the list of data batches at party's location. example: >>> from splitnn_dataloader import SplitDataLoader >>> splitnn_tra...
[ 198, 4871, 27758, 6601, 17401, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 770, 1398, 1233, 7657, 1123, 6291, 1871, 1180, 3259, 13, 198, 220, 220, 220, 632, 5860, 257, 22155, 351, 1994, 355, 1366, 2151, 338, 4686, 290, 198, 2...
2.224066
1,205
from flask import Flask, render_template, send_from_directory, request, redirect, url_for import os import psycopg2 # import students from students import studentRoutes from Admin import adminRoutes # import nltk # import numpy as np # import pandas as pd # conn = psycopg2.connect('dbname=postgres') conn = psycopg2.co...
[ 6738, 42903, 1330, 46947, 11, 8543, 62, 28243, 11, 3758, 62, 6738, 62, 34945, 11, 2581, 11, 18941, 11, 19016, 62, 1640, 198, 11748, 28686, 198, 11748, 17331, 22163, 70, 17, 198, 2, 1330, 2444, 198, 6738, 2444, 1330, 3710, 49, 448, 2...
2.755556
630
#!/usr/bin/env python # -*- coding: utf-8 -*- import re from setuptools import setup, find_namespace_packages project_name = 'vznncv-miniterm' with open('README.md') as readme_file: readme = readme_file.read() readme = re.sub(r'!\[[^\[\]]*\]\S*', '', readme) _locals = {} with open('src/' + project_name.replace(...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 302, 198, 198, 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 14933, 10223, 62, 43789, 198, 198, 16302, 62, ...
2.293185
631
import os import json from PIL import Image, ImageDraw, ImageFont from inky.inky_uc8159 import Inky from datetime import datetime as dt from bots.orgbot import get_org_image from bots.twitterbot import get_tweet_img from bots.twitterbot import get_recent_care_tweet from bots.pomodorobot import get_pomodoro_time from bo...
[ 11748, 28686, 198, 11748, 33918, 198, 6738, 350, 4146, 1330, 7412, 11, 7412, 25302, 11, 7412, 23252, 198, 6738, 287, 2584, 13, 29246, 62, 1229, 23, 19707, 1330, 554, 2584, 198, 6738, 4818, 8079, 1330, 4818, 8079, 355, 288, 83, 198, 67...
2.054759
767
import numpy as np import tensorflow as tf import keras.backend as K ''' Cauchy-Schwarz distance between 2 samples The distance measures 'distinguishability' between samples. So, if 2 samples belong to same class, the distance would have a small value. ''' ''' Compute Cauchy-Schwarz distance loss amon...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 41927, 292, 13, 1891, 437, 355, 509, 198, 198, 7061, 6, 198, 220, 220, 220, 327, 559, 29658, 12, 14874, 5767, 89, 5253, 1022, 362, 8405, 198, 220, ...
2.648276
290
import os import json import boto3 import logging from .constants import ( DATA_DIR, S3_BUCKET, AWS_DIR, AWS_EC2_FILE, AWS_RDS_FILE, AZURE_DIR, GCP_DIR ) # Initialisation of data directory if not os.path.exists(DATA_DIR): logging.debug('No data directories yet, creating') aws_path:...
[ 11748, 28686, 198, 11748, 33918, 198, 11748, 275, 2069, 18, 198, 11748, 18931, 198, 198, 6738, 764, 9979, 1187, 1330, 357, 198, 220, 220, 220, 42865, 62, 34720, 11, 198, 220, 220, 220, 311, 18, 62, 33, 16696, 2767, 11, 198, 220, 220...
2.230189
265
## Parinfer.py - a Parinfer implementation in Python ## v3.12.0 ## https://github.com/oakmac/parinfer.py ## ## More information about Parinfer can be found here: ## http://shaunlebron.github.io/parinfer/ ## ## Copyright (c) 2015, 2020, Chris Oakman and other contributors ## Released under the ISC license ## https://git...
[ 2235, 2547, 259, 2232, 13, 9078, 532, 257, 2547, 259, 2232, 7822, 287, 11361, 198, 2235, 410, 18, 13, 1065, 13, 15, 198, 2235, 3740, 1378, 12567, 13, 785, 14, 15877, 20285, 14, 1845, 259, 2232, 13, 9078, 198, 2235, 198, 2235, 3125, ...
2.713723
5,837
# -*- coding: utf-8 -*- # Generated by Django 1.11.17 on 2018-12-24 00:52 from __future__ import unicode_literals from django.db import migrations
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 1157, 13, 1558, 319, 2864, 12, 1065, 12, 1731, 3571, 25, 4309, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198,...
2.709091
55
"""Select platform for Nest Protect.""" from __future__ import annotations from dataclasses import dataclass from homeassistant.components.select import SelectEntity, SelectEntityDescription from homeassistant.helpers.entity import EntityCategory from . import HomeAssistantNestProtectData from .const import DOMAIN, ...
[ 37811, 17563, 3859, 329, 21420, 21916, 526, 15931, 198, 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 198, 6738, 1363, 562, 10167, 13, 5589, 3906, 13, 19738, 1330, 9683, 32398, 11, ...
2.550111
1,347
L = [10, 11, 12, 13, 14, 15, 16, 17, 18] print(L) L1 = [x for x in L if x % 2 == 0] print(L1) ip = '10.20.30.40' octets = ip.split('.') print(octets) octets = [int(octet) for octet in octets] print(octets) import random primesPositions = [p for p in range(100) if isPrime(random.randint(1, 1000))] print(primesPosit...
[ 43, 796, 685, 940, 11, 1367, 11, 1105, 11, 1511, 11, 1478, 11, 1315, 11, 1467, 11, 1596, 11, 1248, 60, 198, 4798, 7, 43, 8, 198, 198, 43, 16, 796, 685, 87, 329, 2124, 287, 406, 611, 2124, 4064, 362, 6624, 657, 60, 198, 4798, ...
2.344828
232
from tensorflow import keras from model.model import csnet_extra_model
[ 6738, 11192, 273, 11125, 1330, 41927, 292, 198, 6738, 2746, 13, 19849, 1330, 50115, 3262, 62, 26086, 62, 19849, 198 ]
3.55
20
import os import traceback from ..xjson import XJson
[ 11748, 28686, 201, 198, 11748, 12854, 1891, 201, 198, 6738, 11485, 87, 17752, 1330, 1395, 41, 1559, 201, 198, 201, 198, 201, 198, 201, 198, 201 ]
2.423077
26
# -*- coding: utf-8 -*- # Generated by Django 1.11.26 on 2019-11-25 21:03 from __future__ import unicode_literals from django.conf import settings import django.core.validators from django.db import migrations, models import django.db.models.deletion import django.utils.timezone
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 1157, 13, 2075, 319, 13130, 12, 1157, 12, 1495, 2310, 25, 3070, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198...
2.968421
95
print(join(capitalize("this will be uppercase text"))) print(join(leetspeak("This isn't a leetspeak"))) print(join(hypenate("will be hypenated by letters"))) print(join(hypenate("will be hypenated by words".split()))) # next() and send() free = psychologist() print('free->', free) print('next->', next(...
[ 198, 198, 4798, 7, 22179, 7, 27544, 1096, 7203, 5661, 481, 307, 334, 39921, 589, 2420, 1, 22305, 198, 4798, 7, 22179, 7, 293, 1039, 36729, 7203, 1212, 2125, 470, 257, 443, 1039, 36729, 1, 22305, 198, 4798, 7, 22179, 7, 12114, 3617, ...
2.837209
172
from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import from builtins import super from future import standard_library standard_library.install_aliases() import logging import os import errno from .BaseDispatch import BaseDisp...
[ 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 3170, 1040, 1330, ...
2.090535
1,944
#!/usr/bin/env python from pyon.net.endpoint import RPCClient #from interface.services.idatastore_service import IDatastoreService from interface.services.ihello_service import IHelloService from pyon.net.messaging import make_node import gevent import time import base64 import os import argparse import msgpack parse...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 12972, 261, 13, 3262, 13, 437, 4122, 1330, 39400, 11792, 198, 2, 6738, 7071, 13, 30416, 13, 312, 265, 459, 382, 62, 15271, 1330, 4522, 265, 459, 382, 16177, 198, 6738, 707...
2.758261
575
# -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # # Copyright 2018-2019 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 16529, 26171, 198, 2, 198, 2, 220, 220, 15069, 2864, 12, 23344, 376, 7569, 13, 20185, 15302, 198, 2, 198, 2, 220, 220, 49962, 739, 262, 24843, 13789, 11, 106...
2.446802
3,252
#!/usr/bin/env python3 import argparse from augur.utils import read_tree, read_node_data, read_metadata from collections import Counter import csv import hashlib MAX_HASH_LENGTH = 7 if __name__ == "__main__": parser = argparse.ArgumentParser( description="Find polytomies in a given tree that all belong t...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 1822, 29572, 198, 6738, 16339, 333, 13, 26791, 1330, 1100, 62, 21048, 11, 1100, 62, 17440, 62, 7890, 11, 1100, 62, 38993, 198, 6738, 17268, 1330, 15034, 198, 11748, 269, 213...
2.187661
1,556
from .base import * ALLOWED_HOSTS = [ "*" ] SECRET_KEY = os.environ.get("SECERT_KEY", "dummykey") DATABASE_NAME = os.environ.get("DATABASE_NAME", "newstream") DATABASE_USER = os.environ.get("DATABASE_USER", "newstream") DATABASE_HOST = os.environ.get("DATABASE_HOST", "") DATABASE_PORT = os.environ.get("DATABASE_P...
[ 6738, 764, 8692, 1330, 1635, 198, 198, 7036, 3913, 1961, 62, 39, 10892, 50, 796, 685, 198, 220, 220, 220, 366, 9, 1, 198, 60, 198, 198, 23683, 26087, 62, 20373, 796, 28686, 13, 268, 2268, 13, 1136, 7203, 23683, 17395, 62, 20373, 1...
1.919897
774
from flask import Blueprint, g, render_template, redirect, url_for, g, flash from flask_security import current_user, login_required, current_user from app import db bp = Blueprint('settings', __name__) #@bp.before_app_request #def before_request(): # g.search_form = SearchForm() @bp.route('/index', methods=['GET...
[ 6738, 42903, 1330, 39932, 11, 308, 11, 8543, 62, 28243, 11, 18941, 11, 19016, 62, 1640, 11, 308, 11, 7644, 198, 6738, 42903, 62, 12961, 1330, 1459, 62, 7220, 11, 17594, 62, 35827, 11, 1459, 62, 7220, 198, 6738, 598, 1330, 20613, 198...
3.03125
128
import datetime from flask import Flask from flask_jwt_extended import JWTManager from flask_signon.utils import import_string
[ 11748, 4818, 8079, 198, 6738, 42903, 1330, 46947, 198, 6738, 42903, 62, 73, 46569, 62, 2302, 1631, 1330, 449, 39386, 13511, 198, 198, 6738, 42903, 62, 12683, 261, 13, 26791, 1330, 1330, 62, 8841, 628 ]
3.685714
35
from xml.etree import ElementTree from datetime import datetime from typing import Any from os import path import re
[ 6738, 35555, 13, 316, 631, 1330, 11703, 27660, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 19720, 1330, 4377, 198, 6738, 28686, 1330, 3108, 198, 11748, 302, 628, 628, 628 ]
3.935484
31
# a = int(input()) # b = int(input()) # if a < b: # print('a') # else: # print('b') # password = input('enter password:') # check_password = input('confirm password:') # if password == check_password and len(password) >=8: # print('Succesful') # else: # if len(password)>= 8: # print('password don...
[ 2, 257, 796, 493, 7, 15414, 28955, 198, 2, 275, 796, 493, 7, 15414, 28955, 198, 2, 611, 257, 1279, 275, 25, 198, 2, 220, 220, 220, 220, 3601, 10786, 64, 11537, 198, 2, 2073, 25, 198, 2, 220, 220, 220, 220, 3601, 10786, 65, 115...
2.143581
592
import unittest import json from app import create_app, db, session from tests.api.v1 import BaseTestCase class AuthTestCase(BaseTestCase): """Test case for the authentication blueprint.""" def test_user_login(self): """Test registered user can login. (POST request)""" #first regi...
[ 11748, 555, 715, 395, 198, 11748, 33918, 198, 6738, 598, 1330, 2251, 62, 1324, 11, 20613, 11, 6246, 198, 6738, 5254, 13, 15042, 13, 85, 16, 1330, 7308, 14402, 20448, 198, 198, 4871, 26828, 14402, 20448, 7, 14881, 14402, 20448, 2599, 1...
2.081911
3,516
from flask import Blueprint, render_template from sys import version from flask import Flask, jsonify from pathogen_memo.controllers import getallquery #Set word_count_site_name indexv = Blueprint('indexv', __name__) @indexv.route('/')
[ 6738, 42903, 1330, 39932, 11, 8543, 62, 28243, 198, 6738, 25064, 1330, 2196, 198, 6738, 42903, 1330, 46947, 11, 33918, 1958, 628, 198, 198, 6738, 3108, 6644, 62, 11883, 78, 13, 3642, 36667, 1330, 651, 439, 22766, 628, 198, 2, 7248, 15...
3.361111
72
#!/usr/bin/env python """ fasta_unwrap: hard-wrapped fastas unwrapped (sequence is just 1 line) Usage: fasta_unwrap <fasta> | [-] fasta_unwrap -h | --help fasta_unwrap --version Options: <fasta> Fasta file name ('-' if from STDIN). -h --help Show this screen. --version Show version. Descri...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 37811, 198, 7217, 64, 62, 403, 37150, 25, 1327, 12, 29988, 1496, 3049, 292, 7379, 430, 1496, 357, 43167, 318, 655, 352, 1627, 8, 198, 198, 28350, 25, 198, 220, 3049, 64, 62, 4...
2.306522
460
# client.py import socket import sys import json host = sys.argv[1] port = int(sys.argv[2]) question = sys.argv[3] userid = sys.argv[4] max_size = 1024 if len(sys.argv) == 6: max_size = sys.argv[5] payload = {"question": question, "userid": userid} json_data = json.dumps(payload) # create a socket object s = soc...
[ 2, 5456, 13, 9078, 198, 11748, 17802, 198, 11748, 25064, 198, 11748, 33918, 198, 198, 4774, 796, 25064, 13, 853, 85, 58, 16, 60, 198, 634, 796, 493, 7, 17597, 13, 853, 85, 58, 17, 12962, 198, 25652, 796, 25064, 13, 853, 85, 58, ...
2.498024
253
from .internals.base_operator import BaseOperator from ...data.writers import MinIoWriter, Writer # type:ignore from ...data.validator import Schema # type:ignore import datetime
[ 6738, 764, 23124, 874, 13, 8692, 62, 46616, 1330, 7308, 18843, 1352, 201, 198, 6738, 2644, 7890, 13, 34422, 1330, 1855, 40, 78, 34379, 11, 26606, 220, 1303, 2099, 25, 46430, 201, 198, 6738, 2644, 7890, 13, 12102, 1352, 1330, 10011, 26...
3.339286
56
#!/usr/bin/env python # This script ships with HAT, or HercAdminTool. # Please see our project here: https://github.com/jguy1987/HercAdminTool # Author: Jguy - John Mish # The MIT license covers this file. Please see applicable license file here: https://github.com/jguy1987/HercAdminTool/blob/master/license.txt # You ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 770, 4226, 7937, 351, 367, 1404, 11, 393, 2332, 66, 46787, 25391, 13, 198, 2, 4222, 766, 674, 1628, 994, 25, 3740, 1378, 12567, 13, 785, 14, 73, 22932, 27301, 14, 39, 2798,...
2.355102
1,470
from django.urls import path from companies import views app_name = 'company' urlpatterns = [ path('contacts/', views.CompanyContactsView.as_view(), name='contacts'), path('phone/list/', views.CompanyPhoneListView.as_view(), name='phone_list'), path('phone/add/', views.CompanyPhoneCreateView.as_view(), n...
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 198, 6738, 2706, 1330, 5009, 628, 198, 1324, 62, 3672, 796, 705, 39722, 6, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 3108, 10786, 3642, 8656, 14, 3256, 5009, 13, 39154, 42...
2.80241
415
from django.conf import settings from django.db import models from django.contrib import admin admin.site.register(CrewMember, CrewMemberAdmin)
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 628, 628, 198, 28482, 13, 15654, 13, 30238, 7, 46724, 27608, 11, 17652, 27608, 46787, 8, 198 ...
3.609756
41
import requests import urllib3 import re import time from pathlib import Path from __constants.constants import head1 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) ######### AUTHOR - @AmmeySaini ######### ######### Github Repo - https://github.com/AmmeySaini/Realme-AutoBuy ######### ######### I'...
[ 11748, 7007, 198, 11748, 2956, 297, 571, 18, 198, 11748, 302, 198, 11748, 640, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 11593, 9979, 1187, 13, 9979, 1187, 1330, 1182, 16, 198, 333, 297, 571, 18, 13, 40223, 62, 40539, 654, 7, 3...
3.401235
162
import numpy as np import sys import regex as re if __name__ == "__main__": file_name = sys.argv[1] parse_output_performance(file_name)
[ 11748, 299, 32152, 355, 45941, 201, 198, 11748, 25064, 201, 198, 11748, 40364, 355, 302, 201, 198, 201, 198, 201, 198, 201, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 201, 198, 220, 220, 220, 2393, 62, 3672, 796, ...
2.40625
64
""" Demo of CMR. Note that CMR assumes that the object has been detected, so please use a picture of a bird that is centered and well cropped. Sample usage: python demo.py --name bird_net --num_train_epoch 500 --img_path misc/demo_data/img1.jpg """ from __future__ import absolute_import from __future__ import divis...
[ 37811, 198, 11522, 78, 286, 327, 13599, 13, 198, 198, 6425, 326, 327, 13599, 18533, 326, 262, 2134, 468, 587, 12326, 11, 523, 3387, 779, 257, 4286, 286, 257, 6512, 326, 318, 19254, 290, 880, 48998, 13, 198, 198, 36674, 8748, 25, 198...
3.048128
374
################################################################################# # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # # # # Licensed under the Apache License, Version 2.0 (the "License"). ...
[ 29113, 29113, 14468, 2, 198, 2, 220, 220, 15069, 6186, 13, 785, 11, 3457, 13, 393, 663, 29116, 13, 1439, 6923, 33876, 13, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 22...
2.878033
1,525
import multiprocessing as mp import os import tempfile from unittest import skipIf from .common import TestConfig, test_data from hexrd import config reference_data = \ """ analysis_name: analysis #working_dir: # not set to test defaulting to cwd --- analysis_name: analysis_2 working_dir: %(existing_path)s multiproc...
[ 11748, 18540, 305, 919, 278, 355, 29034, 198, 11748, 28686, 198, 11748, 20218, 7753, 198, 6738, 555, 715, 395, 1330, 14267, 1532, 198, 198, 6738, 764, 11321, 1330, 6208, 16934, 11, 1332, 62, 7890, 198, 6738, 17910, 4372, 1330, 4566, 628...
2.954315
197
# -*- coding: utf-8 -*- """ this file is for training the SAE, and apply for the model @author Zhou Hang """ import model
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 5661, 2393, 318, 329, 3047, 262, 311, 14242, 11, 290, 4174, 329, 262, 2746, 198, 31, 9800, 32222, 24300, 198, 37811, 198, 11748, 2746, 198 ]
2.97561
41
import dataiku import constants from dataikuapi.utils import DataikuException import os from threading import Thread from werkzeug.serving import make_server from tensorflow import logging from tensorboard.backend import application import tensorboard.default as tb_default
[ 11748, 1366, 28643, 198, 11748, 38491, 198, 6738, 1366, 28643, 15042, 13, 26791, 1330, 6060, 28643, 16922, 198, 11748, 28686, 198, 6738, 4704, 278, 1330, 14122, 198, 6738, 266, 9587, 2736, 1018, 13, 31293, 1330, 787, 62, 15388, 198, 6738,...
3.985714
70
from typing import TYPE_CHECKING, Final from urllib.parse import quote from arago.hiro.model.graph.vertex import Vertex from arago.hiro.utils.cast_b import to_vertex if TYPE_CHECKING: from arago.hiro.client.rest_base_client import HiroRestBaseClient
[ 6738, 19720, 1330, 41876, 62, 50084, 2751, 11, 8125, 198, 6738, 2956, 297, 571, 13, 29572, 1330, 9577, 198, 198, 6738, 610, 3839, 13, 49907, 13, 19849, 13, 34960, 13, 332, 16886, 1330, 4643, 16886, 198, 6738, 610, 3839, 13, 49907, 13,...
3.071429
84
# -*- coding: utf-8 -*- # # Copyright 2019 Google LLC. 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 requir...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 1303, 198, 2, 15069, 13130, 3012, 11419, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198...
2.940449
890
input = open('inputs/day16.input').read().strip().split(',') positions = list("abcdefghijklmnop") print("Part one: %s" % move(1, positions[:])) print("Part two: %s" % move(1000000000, positions[:]))
[ 15414, 796, 1280, 10786, 15414, 82, 14, 820, 1433, 13, 15414, 27691, 961, 22446, 36311, 22446, 35312, 7, 3256, 11537, 198, 198, 1930, 1756, 796, 1351, 7203, 39305, 4299, 456, 2926, 41582, 10295, 404, 4943, 198, 198, 4798, 7203, 7841, 53...
2.68
75
import statsmodels.formula.api as smf import matplotlib.pyplot as plt import pandas as pd from sklearn.linear_model import LinearRegression from sklearn import model_selection from sklearn import metrics from mpl_toolkits.mplot3d import Axes3D data = pd.read_excel('train_data.xlsx') data2 = pd.read_excel('test_data.x...
[ 11748, 9756, 27530, 13, 687, 4712, 13, 15042, 355, 895, 69, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 1341, 35720, 13, 29127, 62, 19849, 1330, 44800, 8081, 2234, 198...
2.328969
611
__all__ = ['read_dir', 'get_last_checkpoint', 'compute_metrics', 'get_aapm_minmax', 'convert_coefficient2hu', 'convert_hu2coefficient'] import os import os.path as path import scipy.io as sio import numpy as np from tqdm import tqdm from skimage.measure import compare_ssim, compare_psnr
[ 834, 439, 834, 796, 37250, 961, 62, 15908, 3256, 705, 1136, 62, 12957, 62, 9122, 4122, 3256, 705, 5589, 1133, 62, 4164, 10466, 3256, 705, 1136, 62, 64, 499, 76, 62, 1084, 9806, 3256, 198, 220, 220, 220, 705, 1102, 1851, 62, 1073, ...
2.660714
112
import copy import logging import numpy as np import os import time from threading import Thread import carla class Speedometer(object): """ Speed pseudo sensor that gets the current speed of the vehicle. This sensor is not placed at the CARLA environment. It is only an asynchronous interface to t...
[ 11748, 4866, 198, 11748, 18931, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 11748, 640, 198, 6738, 4704, 278, 1330, 14122, 198, 198, 11748, 1097, 5031, 628, 628, 198, 198, 4871, 8729, 15635, 7, 15252, 2599, 198, 220, 220...
2.717718
333
from api.core.exceptions import NotFoundError from api.staticdata.control_list_entries.models import ControlListEntry def get_clc_parent_nodes(rating): """ A control list entry can be a group entry or a child of a child entry. Given a rating, this function provides the list of all parent nodes in the ch...
[ 6738, 40391, 13, 7295, 13, 1069, 11755, 1330, 1892, 21077, 12331, 198, 6738, 40391, 13, 12708, 7890, 13, 13716, 62, 4868, 62, 298, 1678, 13, 27530, 1330, 6779, 8053, 30150, 628, 628, 198, 4299, 651, 62, 565, 66, 62, 8000, 62, 77, 41...
2.345221
701
import os import logging from .kubesubmitmixin import SubmitToKubeMixin from .kubespecmixin import KubeSpecMixin log = logging.getLogger(__name__)
[ 11748, 28686, 198, 11748, 18931, 198, 6738, 764, 74, 29080, 549, 2781, 19816, 259, 1330, 39900, 2514, 42, 3266, 35608, 259, 198, 6738, 764, 74, 29080, 431, 11215, 844, 259, 1330, 509, 3266, 22882, 35608, 259, 198, 198, 6404, 796, 18931,...
2.921569
51
from typing import Optional from spotty.config.abstract_instance_config import AbstractInstanceConfig from spotty.providers.aws.config.validation import validate_instance_parameters VOLUME_TYPE_EBS = 'ebs' VOLUME_TYPE_EFS = 'efs' DEFAULT_AMI_NAME = 'SpottyAMI'
[ 6738, 19720, 1330, 32233, 198, 198, 6738, 4136, 774, 13, 11250, 13, 397, 8709, 62, 39098, 62, 11250, 1330, 27741, 33384, 16934, 198, 6738, 4136, 774, 13, 15234, 4157, 13, 8356, 13, 11250, 13, 12102, 341, 1330, 26571, 62, 39098, 62, 17...
3.142857
84
""" Contains models for api app. """ import hashlib import importlib import csv import re import ujson from django.conf import settings from django.core.exceptions import ObjectDoesNotExist from django.db import models, transaction, IntegrityError from django.contrib.auth.models import User from django.contrib.auth i...
[ 37811, 198, 4264, 1299, 4981, 329, 40391, 598, 13, 198, 37811, 198, 11748, 12234, 8019, 198, 11748, 1330, 8019, 198, 11748, 269, 21370, 198, 11748, 302, 198, 198, 11748, 334, 17752, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 1...
2.435622
2,796
from .errors import InvalidInputError
[ 6738, 764, 48277, 1330, 17665, 20560, 12331, 628 ]
4.875
8
import torch
[ 11748, 28034, 198 ]
4.333333
3
from time import sleep import scrapy from scrapy import Request # usage: `scrapy crawl fd-sitemap-css -o ./sitemapURLs/fdlinks.json`
[ 6738, 640, 1330, 3993, 198, 11748, 15881, 88, 198, 6738, 15881, 88, 1330, 19390, 198, 198, 2, 8748, 25, 4600, 1416, 2416, 88, 27318, 277, 67, 12, 82, 9186, 499, 12, 25471, 532, 78, 24457, 82, 9186, 499, 21886, 82, 14, 16344, 28751, ...
2.891304
46
# Generated by Django 2.2.10 on 2020-03-19 15:29 import django.db.models.deletion from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 940, 319, 12131, 12, 3070, 12, 1129, 1315, 25, 1959, 198, 198, 11748, 42625, 14208, 13, 9945, 13, 27530, 13, 2934, 1616, 295, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, ...
2.840909
44
"""Custom parser which raises an error instead of exiting.""" import argparse class ArgumentParserError(Exception): """Error raised by ArgumentParser""" pass class CatParser(argparse.ArgumentParser): """Overrides error method to throw an error instead of exiting"""
[ 37811, 15022, 30751, 543, 12073, 281, 4049, 2427, 286, 33895, 526, 15931, 198, 11748, 1822, 29572, 628, 198, 4871, 45751, 46677, 12331, 7, 16922, 2599, 198, 220, 220, 220, 37227, 12331, 4376, 416, 45751, 46677, 37811, 198, 220, 220, 220, ...
3.863014
73
from .main import cli __version__ = 1.0 __all__ = ['cli']
[ 6738, 764, 12417, 1330, 537, 72, 198, 198, 834, 9641, 834, 796, 352, 13, 15, 198, 198, 834, 439, 834, 796, 37250, 44506, 20520 ]
2.458333
24
""" link: https://leetcode-cn.com/problems/heaters problem: 给定数轴上若干A类型的点,再给B类型的点,问以所有B为圆心画圆,最小半径是多少可以覆盖所有的A solution: 二分。所有A点由其最近的B负责覆盖,结果为此集合中的最大值。 """
[ 37811, 198, 198, 8726, 25, 3740, 1378, 293, 316, 8189, 12, 31522, 13, 785, 14, 1676, 22143, 14, 258, 8605, 198, 198, 45573, 25, 13328, 119, 247, 22522, 248, 46763, 108, 164, 121, 112, 41468, 164, 233, 98, 33176, 110, 32, 163, 109, ...
0.82199
191