content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
"""Provide a mock standalone component.""" DOMAIN = 'test_standalone' def setup(hass, config): """Mock a successful setup.""" return True
[ 37811, 15946, 485, 257, 15290, 27669, 7515, 526, 15931, 198, 39170, 29833, 796, 705, 9288, 62, 1481, 17749, 6, 628, 198, 4299, 9058, 7, 71, 562, 11, 4566, 2599, 198, 220, 220, 220, 37227, 44, 735, 257, 4388, 9058, 526, 15931, 198, 2...
3.083333
48
from learntools.libs.wavelet import signal_to_wavelet
[ 6738, 26338, 10141, 13, 8019, 82, 13, 19204, 1616, 1330, 6737, 62, 1462, 62, 19204, 1616, 198 ]
3.176471
17
# -*- coding: utf-8 -*- """ This script reads a XML-formatted word list and produces a dictionary file used by the FirefoxOS virtual keyboard for word suggestions and auto corrections. The word lists come from the Android source: https://android.googlesource.com/platform/packages/inputmethods/LatinIME/+/master/dictio...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 198, 1212, 4226, 9743, 257, 23735, 12, 687, 16898, 1573, 1351, 290, 11073, 257, 22155, 198, 7753, 973, 416, 262, 16802, 2640, 7166, 10586, 329, 1573, 11776, ...
3.304833
1,345
# The contents of this file are subject to the BitTorrent Open Source License # Version 1.1 (the License). You may not copy or use this file, in either # source code or executable form, except in compliance with the License. You # may obtain a copy of the License at http://www.bittorrent.com/license/. # # Software di...
[ 2, 383, 10154, 286, 428, 2393, 389, 2426, 284, 262, 4722, 39286, 4946, 8090, 13789, 198, 2, 10628, 352, 13, 16, 357, 1169, 13789, 737, 220, 921, 743, 407, 4866, 393, 779, 428, 2393, 11, 287, 2035, 198, 2, 2723, 2438, 393, 28883, 1...
4.025
160
import os import threading import unittest from collections import defaultdict from unittest import mock import webtest from cornice import errors as cornice_errors from pyramid.url import parse_url_overrides from kinto.core import DEFAULT_SETTINGS from kinto.core import statsd from kinto.core.storage import generato...
[ 11748, 28686, 198, 11748, 4704, 278, 198, 11748, 555, 715, 395, 198, 6738, 17268, 1330, 4277, 11600, 198, 6738, 555, 715, 395, 1330, 15290, 198, 198, 11748, 3992, 9288, 198, 6738, 11676, 501, 1330, 8563, 355, 11676, 501, 62, 48277, 198,...
2.819348
1,013
# -*- coding: utf-8 -*- """ Created on Sat Jul 17 11:31:40 2021 @author: justi """ import utils import play import spotify import time as t from abc import ABC, abstractmethod
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 7031, 5979, 1596, 1367, 25, 3132, 25, 1821, 33448, 198, 198, 31, 9800, 25, 655, 72, 198, 37811, 198, 11748, 3384, 4487, 198, 11748, 711, 198, 1...
2.825397
63
""" Mixin for INI, .properties, and TOML. """ from __future__ import annotations import os from typing import Optional, Sequence, Set, Union import pandas as pd from typeddfs.df_errors import UnsupportedOperationError from typeddfs.utils import IoUtils, ParseUtils, Utils __all__ = ["_IniLikeMixin"]
[ 37811, 198, 35608, 259, 329, 3268, 40, 11, 764, 48310, 11, 290, 41526, 43, 13, 198, 37811, 198, 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 11748, 28686, 198, 6738, 19720, 1330, 32233, 11, 45835, 11, 5345, 11, 4479, 198, 198, 1174...
3.154639
97
from time import perf_counter as pfc puzzle = load('Tag_03.txt') start = pfc() print(solve(puzzle), pfc() - start)
[ 6738, 640, 1330, 23035, 62, 24588, 355, 279, 16072, 220, 198, 198, 79, 9625, 796, 3440, 10786, 24835, 62, 3070, 13, 14116, 11537, 198, 198, 9688, 796, 279, 16072, 3419, 198, 4798, 7, 82, 6442, 7, 79, 9625, 828, 279, 16072, 3419, 532...
2.565217
46
import os import unittest import scCloud.pipeline
[ 11748, 28686, 198, 11748, 555, 715, 395, 198, 198, 11748, 629, 18839, 13, 79, 541, 4470, 628 ]
3.058824
17
import time from datetime import datetime if __name__ == '__main__': main()
[ 11748, 640, 198, 198, 6738, 4818, 8079, 1330, 4818, 8079, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419, 628 ]
2.833333
30
import numpy as np from sklearn.feature_extraction.text import CountVectorizer
[ 11748, 299, 32152, 355, 45941, 198, 6738, 1341, 35720, 13, 30053, 62, 2302, 7861, 13, 5239, 1330, 2764, 38469, 7509, 628 ]
3.809524
21
import os from . import env PAUSE = { 'windows': 'PAUSE', 'macos': None, 'linux': None, 'unix': None } CLEAR = { 'windows': 'CLS', 'macos': 'clear', 'linux': 'clear', 'unix': 'clear' }
[ 11748, 28686, 198, 6738, 764, 1330, 17365, 198, 198, 4537, 19108, 796, 1391, 198, 220, 220, 220, 705, 28457, 10354, 705, 4537, 19108, 3256, 198, 220, 220, 220, 705, 20285, 418, 10354, 6045, 11, 198, 220, 220, 220, 705, 23289, 10354, 6...
2.064815
108
# -*- coding: utf-8 -*- """ @FileName : tf_load.py @Description : 加载tf模型 @Author : 齐鲁桐 @Email : qilutong@yahoo.com @Time : 2019-05-15 19:08 @Modify : None """ from __future__ import absolute_import, division, print_function import tensorflow as tf def load_graph(model_file, name=None): ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 31, 8979, 5376, 220, 220, 220, 1058, 48700, 62, 2220, 13, 9078, 198, 31, 11828, 1058, 10263, 232, 254, 164, 121, 121, 27110, 162, 101, 94, 161, 252, 233, ...
1.914201
338
from hylfm.datasets.online import OnlineTensorInfo
[ 6738, 2537, 1652, 76, 13, 19608, 292, 1039, 13, 25119, 1330, 7467, 51, 22854, 12360, 628 ]
3.25
16
import sys from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import * from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg from StockAndFlowInPython.sfd_canvas.interactive_sfd_ui import Ui_widget_interactive_sfd from StockAndFlowInPython.parsing.XMILE_parsing import text_to_equation,...
[ 11748, 25064, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 14055, 1330, 1635, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 8205, 72, 1330, 1635, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 54, 312, 11407, 1330, 1635, 198, 6738, 2603, 29487...
2.642173
313
n = 84
[ 77, 796, 9508, 201 ]
1.75
4
# Copyright 2020 Jianfeng Hou <frankderekdick@gmail.com> # 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 req...
[ 2, 15069, 12131, 40922, 69, 1516, 33790, 1279, 8310, 962, 67, 18238, 67, 624, 31, 14816, 13, 785, 29, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 153...
2.995146
824
"""Module with resnet like models.""" import argparse from collections import OrderedDict import importlib from typing import Any, Dict, List, Optional, Type, Union import torch import torch.nn as nn from .blocks import ResNetBlock, ResNetBottleneck, conv1x1 TYPE_TO_ARGS = { "resnet18": ([2, 2, 2, 2], ResNetB...
[ 37811, 26796, 351, 581, 3262, 588, 4981, 526, 15931, 628, 198, 11748, 1822, 29572, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 11748, 1330, 8019, 198, 6738, 19720, 1330, 4377, 11, 360, 713, 11, 7343, 11, 32233, 11, 5994, 11, 44...
2.519084
786
''' forms for the forum's related instances . ReplyForm . Meta: ''' from django import forms # from .models import Reply
[ 7061, 6, 198, 198, 23914, 329, 262, 10041, 338, 3519, 10245, 628, 220, 220, 220, 764, 14883, 8479, 198, 220, 220, 220, 220, 220, 220, 220, 764, 30277, 25, 198, 7061, 6, 198, 6738, 42625, 14208, 1330, 5107, 198, 2, 198, 6738, 764, ...
2.87234
47
# -*- coding: utf-8 -*- """ Created on Sun Mar 21 18:43:20 2021 @author: Waradon Senzt Phokhinanan """ ############################################################################################ import math import librosa import scipy.io import matplotlib.pyplot as plt from scipy import signal import ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 41972, 319, 3825, 1526, 2310, 1248, 25, 3559, 25, 1238, 33448, 201, 198, 201, 198, 31, 9800, 25, 1810, 324, 261, 2311, 89, 83, 1380, 482, 20079, ...
2.249807
1,297
import subprocess import logging from prairiedog.node import Node from prairiedog.edge import Edge from prairiedog.dgraph import Dgraph from prairiedog.graph import Graph from prairiedog.errors import GraphException log = logging.getLogger('prairiedog') # TODO: this currently runs too slow for tests # def test_dgr...
[ 11748, 850, 14681, 198, 11748, 18931, 198, 198, 6738, 7201, 343, 798, 519, 13, 17440, 1330, 19081, 198, 6738, 7201, 343, 798, 519, 13, 14907, 1330, 13113, 198, 6738, 7201, 343, 798, 519, 13, 67, 34960, 1330, 360, 34960, 198, 6738, 720...
2.961538
130
import statistics import os, random, pickle import numpy as np # we are going to show for each timestep, for each layer, what's the majority attention. # majority attention excluding roadmark tokens # majority from typing import List import scipy from collections import Counter from util import convert_enc_attn, lo...
[ 11748, 7869, 198, 198, 11748, 28686, 11, 4738, 11, 2298, 293, 198, 11748, 299, 32152, 355, 45941, 198, 198, 2, 356, 389, 1016, 284, 905, 329, 1123, 4628, 395, 538, 11, 329, 1123, 7679, 11, 644, 338, 262, 3741, 3241, 13, 198, 2, 37...
2.362256
922
from django.conf.urls.static import static from django.conf import settings """marketplace URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import view...
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 13, 12708, 1330, 9037, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 198, 37811, 10728, 5372, 10289, 28373, 198, 198, 464, 4600, 6371, 33279, 82, 63, 1351, 11926, 32336, 284, 5009, 13,...
2.681572
738
import logging import os from currentplatform import platform from sound_player.common import StatusObject, STATUS logger = logging.getLogger(__name__)
[ 11748, 18931, 198, 11748, 28686, 198, 198, 6738, 1459, 24254, 1330, 3859, 198, 198, 6738, 2128, 62, 7829, 13, 11321, 1330, 12678, 10267, 11, 15486, 2937, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 1...
3.690476
42
from .clog import MyRotatingFileHandler, MyTimedRotatingFileHandler
[ 6738, 764, 565, 519, 1330, 2011, 24864, 803, 8979, 25060, 11, 2011, 14967, 276, 24864, 803, 8979, 25060, 198 ]
3.578947
19
import base64 import mimetypes import uuid from django.core.files.base import ContentFile from django.utils.translation import gettext_lazy as _ from rest_framework import serializers from unicef_restlib.fields import ModelChoiceField from unicef_attachments.utils import get_client_ip
[ 11748, 2779, 2414, 198, 11748, 17007, 2963, 12272, 198, 11748, 334, 27112, 198, 198, 6738, 42625, 14208, 13, 7295, 13, 16624, 13, 8692, 1330, 14041, 8979, 198, 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 651, 5239, 62, 75, 12582, 35...
3.47619
84
import logging import time from datetime import timedelta from time import sleep import RPi.GPIO as GPIO from thespian.actors import Actor, ActorSystem, ActorTypeDispatcher # Logging logging.basicConfig(level=logging.DEBUG) log = logging.getLogger(__name__) # Sensor trigPin = 16 echoPin = 18 MAX_DISTANCE = 220 time...
[ 11748, 18931, 198, 11748, 640, 198, 6738, 4818, 8079, 1330, 28805, 12514, 198, 6738, 640, 1330, 3993, 198, 198, 11748, 25812, 72, 13, 16960, 9399, 355, 50143, 198, 6738, 262, 2777, 666, 13, 529, 669, 1330, 27274, 11, 27274, 11964, 11, ...
2.473148
2,160
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 16529, 35937, 198, 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 17168, 13789, 13, 4091, 13789, 13, 14116, 287, 262, 1628, 6808, 329, 198, 2, 5964, 1321...
5.229167
96
from django.contrib.auth import get_user_model from auth_app.utils import get_activate_key from main.decorators import except_shell from src.celery import app from auth_app.tasks import send_information_email from django.conf import settings from microservice_request.services import MicroServiceConnect, ConnectionServ...
[ 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 651, 62, 7220, 62, 19849, 198, 198, 6738, 6284, 62, 1324, 13, 26791, 1330, 651, 62, 39022, 62, 2539, 198, 6738, 1388, 13, 12501, 273, 2024, 1330, 2845, 62, 29149, 198, 6738, 12351, ...
3.693069
101
import math inputItems = input().split(' ') sum = 0 numbers = [] operators = [] isFirst = True for item in inputItems: if item == '*' or item == '/' or item == '+' or item == '-': for number in numbers: if isFirst: sum = int(number) isFirst = False e...
[ 11748, 10688, 198, 198, 15414, 23022, 796, 5128, 22446, 35312, 10786, 705, 8, 198, 16345, 796, 657, 198, 77, 17024, 796, 17635, 198, 3575, 2024, 796, 17635, 198, 271, 5962, 796, 6407, 198, 198, 1640, 2378, 287, 5128, 23022, 25, 198, 2...
1.795918
392
# Copyright 2018 Fujitsu. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
[ 2, 220, 220, 220, 15069, 2864, 32671, 19831, 13, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 220, 407, 779, 428, 2393, 2845, 287, ...
3.461538
208
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License from ftl.agents import Client, Server from ftl.training_utils import cycle from torchvision import datasets from torch.utils.data import DataLoader, Subset import torch import numpy as np from typing import Dict, List class DataManager: """ ...
[ 2, 15069, 357, 66, 8, 5413, 10501, 13, 198, 2, 49962, 739, 262, 17168, 13789, 198, 198, 6738, 10117, 75, 13, 49638, 1330, 20985, 11, 9652, 198, 6738, 10117, 75, 13, 34409, 62, 26791, 1330, 6772, 198, 6738, 28034, 10178, 1330, 40522, ...
2.148747
2,474
# -*- coding: utf-8 -*- """ Allows access to the site's bot user list. The function refresh() downloads the current bot user list and saves it to disk. It is run automatically when a bot first tries to get this data. """ # (C) Daniel Herding, 2005 # (C) Dr. Trigon, 2009-2010 # (C) Pywikipedia bot team, 2010-2012 # # ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 34934, 1895, 284, 262, 2524, 338, 10214, 2836, 1351, 13, 198, 198, 464, 2163, 14976, 3419, 21333, 262, 1459, 10214, 2836, 1351, 290, 16031, 198, 270, 284, 11...
2.16895
1,095
import numpy as np path = '/Users/benjaminramtoula/Documents/Cours/POLYMTL/MISTLAB/SLAM/decentralized_slam_project/logs/' dir = '2019-08-22_11-43-20_0.13_20/' timestamps_combined = [] nb_kf_used = [] data_exchanged_f_m_q = [] data_exchanged_f_m_a = [] data_exchanged_r_s_q = [] with open(path+dir+'find_matches_query....
[ 11748, 299, 32152, 355, 45941, 198, 198, 6978, 796, 31051, 14490, 14, 11722, 13337, 859, 83, 2852, 64, 14, 38354, 14, 34, 4662, 14, 45472, 56, 13752, 43, 14, 44, 8808, 48780, 14, 8634, 2390, 14, 12501, 298, 1373, 1143, 62, 82, 2543,...
1.87476
3,649
import logging from django.conf import settings from django.core.mail import get_connection from django_rq import job RQ_EMAIL_DEFAULT_QUEUE = getattr(settings, 'RQ_EMAIL_DEFAULT_QUEUE', 'default') RQ_EMAIL_BACKEND = getattr(settings, 'RQ_EMAIL_BACKEND', 'django.core.mail.backends.smtp.Ema...
[ 11748, 18931, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 7295, 13, 4529, 1330, 651, 62, 38659, 198, 6738, 42625, 14208, 62, 81, 80, 1330, 1693, 628, 198, 49, 48, 62, 27630, 4146, 62, 7206, 38865,...
2.325581
172
from Model.job import Job from Model.website import Website from Driver.WebDriver import WebDriver
[ 6738, 9104, 13, 21858, 1330, 15768, 198, 6738, 9104, 13, 732, 12485, 1330, 15887, 198, 6738, 12434, 13, 13908, 32103, 1330, 5313, 32103 ]
4.26087
23
# -*- coding: utf-8 -*- ###################### # TÜRKÇE NOT DEFTERİ # ###################### # @author : Şükrü Erdem Gök # @date : 28/06/2020 # @os : Windows 10 # @version : Python 3.8 # @description: Kodlar dışında yorumları ve uygulamanı görünen kısmını tamamen türkçe yaptım. Umarım işinize yarar. # GÖK DEFTER # K...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 14468, 4242, 2235, 198, 2, 309, 127, 250, 49, 42, 127, 229, 36, 5626, 23449, 5781, 128, 108, 1303, 198, 14468, 4242, 2235, 198, 198, 2, 2488, 9800, 1058, 25370, 252, ...
2.29803
812
from src.utils.utils import * import src.config.Consts as cs def sum_one_hot_columns_on_rows(df, col_to_aggregate): """ aggregate past loans information (category columns) in one row :param df: previous loans application dataframe :param col_to_aggregate: columns to be aggregated :return datafr...
[ 6738, 12351, 13, 26791, 13, 26791, 1330, 1635, 198, 11748, 12351, 13, 11250, 13, 3103, 6448, 355, 50115, 628, 198, 4299, 2160, 62, 505, 62, 8940, 62, 28665, 82, 62, 261, 62, 8516, 7, 7568, 11, 951, 62, 1462, 62, 9460, 49373, 2599, ...
2.436142
1,151
''' 实验名称:EEPROM(AT24C02) 版本:v1.0 日期:2020.12 作者:01Studio 说明:EEPROM的读写实验 ''' from at24c02 import AT24C02 import time EE = AT24C02(i2c_num=1) #哥伦布的B8,B9为I2C1 EE.write(1,8) #往地址1写入数字8(用户可以更改自己写的数字) time.sleep_ms(5) #需要适当延时再读取 print(EE.read(1)) #读取地址1数据,等于前面写入的数字
[ 7061, 6, 198, 22522, 252, 165, 103, 234, 28938, 235, 163, 100, 108, 171, 120, 248, 6500, 4805, 2662, 171, 120, 230, 1404, 1731, 34, 2999, 171, 120, 231, 198, 48304, 17312, 105, 171, 120, 248, 85, 16, 13, 15, 198, 33768, 98, 17312,...
0.964413
281
# Copyright (c) 2015 OpenStack Foundation # # 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 ...
[ 2, 15069, 357, 66, 8, 1853, 4946, 25896, 5693, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 220, 407, 779, 428, 2393, 2845, 287, ...
3.048736
554
# -*- coding: utf-8 -*- """NIM REST API Python Client -- Team component""" from __future__ import absolute_import import json from netease_im import util from netease_im.components import base from netease_im.util import is_str_type __author__ = "Manson Li" __email__ = "manson.li3307@gmail.com" class TeamCompone...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 45, 3955, 30617, 7824, 11361, 20985, 1377, 4816, 7515, 37811, 198, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 11748, 33918, 198, 198, 6738,...
1.94756
2,746
from rest_framework import serializers, viewsets from .models import Note class NoteSerializer(serializers.HyperlinkedModelSerializer): """Serializer to define the API representation for Notes""" class NoteViewSet(viewsets.ModelViewSet): """ViewSet to define the view behavior for Notes.""" serializer_clas...
[ 6738, 1334, 62, 30604, 1330, 11389, 11341, 11, 5009, 1039, 198, 6738, 764, 27530, 1330, 5740, 198, 198, 4871, 5740, 32634, 7509, 7, 46911, 11341, 13, 38197, 25614, 17633, 32634, 7509, 2599, 198, 220, 220, 220, 37227, 32634, 7509, 284, 8...
3.621359
103
import os
[ 11748, 28686, 198 ]
3.333333
3
''' Defines classes for the pattern of browsing a number of dyanmic views. @author: Peter Parente <parente@cs.unc.edu> @copyright: Copyright (c) 2008 Peter Parente @license: BSD License All rights reserved. This program and the accompanying materials are made available under the terms of The BSD License which accompa...
[ 7061, 6, 198, 7469, 1127, 6097, 329, 262, 3912, 286, 23182, 257, 1271, 286, 288, 4121, 9383, 5009, 13, 198, 198, 31, 9800, 25, 5613, 16774, 68, 1279, 8000, 68, 31, 6359, 13, 19524, 13, 15532, 29, 198, 31, 22163, 4766, 25, 15069, 3...
2.743252
1,593
from abc import ABC, abstractmethod from datetime import datetime from functools import cached_property from typing import Mapping from uuid import uuid4 from dateutil.tz import tzutc from app.utilities.json import json_dumps
[ 6738, 450, 66, 1330, 9738, 11, 12531, 24396, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 1257, 310, 10141, 1330, 39986, 62, 26745, 198, 6738, 19720, 1330, 337, 5912, 198, 6738, 334, 27112, 1330, 334, 27112, 19, 198, 198, 6738, ...
3.523077
65
""" A zero-indexed array arr consisting of n integers is given. The dominator of array arr is the value that occurs in more than half of the elements of arr. For example, consider array arr such that arr = [3,4,3,2,3,1,3,3] The dominator of arr is 3 because it occurs in 5 out of 8 elements of arr and 5 is more than a ...
[ 37811, 198, 32, 6632, 12, 9630, 276, 7177, 5240, 17747, 286, 299, 37014, 318, 1813, 13, 198, 198, 464, 7462, 1352, 286, 7177, 5240, 318, 262, 1988, 326, 8833, 287, 517, 621, 2063, 286, 262, 4847, 286, 5240, 13, 198, 1890, 1672, 11, ...
2.634228
298
import collections import numpy from xgboost.callback import print_evaluation import Crawler import SentAnalysis import DatabaseService from flask import Flask, request, Response
[ 11748, 17268, 198, 11748, 299, 32152, 198, 6738, 2124, 70, 39521, 13, 47423, 1330, 3601, 62, 18206, 2288, 198, 11748, 20177, 1754, 198, 11748, 11352, 32750, 198, 11748, 24047, 16177, 198, 6738, 42903, 1330, 46947, 11, 2581, 11, 18261, 628...
4.357143
42
from flask_sqlalchemy import SQLAlchemy from sqlalchemy.ext.declarative import declared_attr from sqlalchemy.orm import relationship from sqlalchemy.sql.schema import MetaData db = SQLAlchemy( metadata=MetaData( naming_convention={ "ix": 'ix_%(column_0_label)s', "uq": "uq_%(table_na...
[ 6738, 42903, 62, 25410, 282, 26599, 1330, 16363, 2348, 26599, 198, 6738, 44161, 282, 26599, 13, 2302, 13, 32446, 283, 876, 1330, 6875, 62, 35226, 198, 6738, 44161, 282, 26599, 13, 579, 1330, 2776, 198, 6738, 44161, 282, 26599, 13, 25410...
1.978261
276
import requests,sys,time import time,datetime
[ 11748, 7007, 11, 17597, 11, 2435, 198, 11748, 640, 11, 19608, 8079, 628, 198 ]
3.428571
14
#!/usr/bin/python3 # -*- coding: utf-8 -*- import datetime import os import re import shutil import subprocess import sys import time import urllib.parse import xbmc import xbmcgui import xbmcplugin import xbmcaddon import xbmcvfs __PLUGIN_ID__ = "plugin.picture.sane-scanner" _PLUGIN_NAME = "Kodi Sane Scanner" _TMP...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 4818, 8079, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 4423, 346, 198, 11748, 850, 14681, 198, 11748, 250...
2.064151
795
import urllib.request,json from .models import Quote get_quotes_url = 'http://quotes.stormconsultancy.co.uk/random.json'
[ 11748, 2956, 297, 571, 13, 25927, 11, 17752, 198, 6738, 764, 27530, 1330, 19879, 628, 198, 198, 1136, 62, 421, 6421, 62, 6371, 796, 705, 4023, 1378, 421, 6421, 13, 12135, 5936, 586, 3883, 13, 1073, 13, 2724, 14, 25120, 13, 17752, 6,...
2.116883
77
# Copyright 2016-2017 ZTE Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
[ 2, 15069, 1584, 12, 5539, 1168, 9328, 10501, 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, 19...
2.93871
310
import re import string import logging from tcutils.util import get_random_name, retry, is_v6 result_file = '/tmp/ping' class Ping: ''' Helper to generate ping traffic Mandatory args: host : Dest IP sender_vm_fixture : Sender VMs fixture handle Supports ping with IPv4 and IPv6 ...
[ 11748, 302, 198, 11748, 4731, 198, 11748, 18931, 198, 6738, 256, 8968, 4487, 13, 22602, 1330, 651, 62, 25120, 62, 3672, 11, 1005, 563, 11, 318, 62, 85, 21, 198, 198, 20274, 62, 7753, 796, 31051, 22065, 14, 13886, 6, 198, 198, 4871, ...
1.999693
3,262
import origen, subprocess, builtins, types, inspect, re, pathlib from .. import origen_sphinx_extension as ose def insert_header(app, docname, source): ''' Insert content at the beginning of the docs. Currently inserts: * Any |shorthand| ``include`` RST files ''' ext = ose.sphinx_ext(ap...
[ 11748, 1796, 268, 11, 850, 14681, 11, 3170, 1040, 11, 3858, 11, 10104, 11, 302, 11, 3108, 8019, 198, 6738, 11485, 1330, 1796, 268, 62, 82, 746, 28413, 62, 2302, 3004, 355, 267, 325, 628, 198, 198, 4299, 7550, 62, 25677, 7, 1324, 1...
2.238462
910
from graph_depth_first import __version__ import pytest from graph_depth_first.graph_depth import * @pytest.fixture # Node can be successfully added to the graph # An edge can be successfully added to the graph # A collection of all nodes can be properly retrieved from the graph # All appropriate neighbo...
[ 6738, 4823, 62, 18053, 62, 11085, 1330, 11593, 9641, 834, 198, 11748, 12972, 9288, 198, 198, 6738, 4823, 62, 18053, 62, 11085, 13, 34960, 62, 18053, 1330, 1635, 628, 628, 198, 198, 31, 9078, 9288, 13, 69, 9602, 198, 198, 2, 19081, 4...
4.156463
147
############################################################## # # script uses local X axis to compute element Length and snapshot it along a curve # 21.02.2016 # Sergey Solohin (Neill3d) 2016 # e-mail to: s@neill3d.com # www.neill3d.com # # Github repo - https://github.com/Neill3d/MoPlugs # Licensed under BSD...
[ 198, 29113, 14468, 7804, 4242, 2235, 198, 2, 198, 2, 4226, 3544, 1957, 1395, 16488, 284, 24061, 5002, 22313, 290, 27479, 340, 1863, 257, 12133, 198, 2, 2310, 13, 2999, 13, 5304, 198, 2, 36106, 4294, 1219, 259, 357, 26538, 18, 67, 8,...
3.309392
181
import numpy as np import matplotlib.pyplot as plt import matplotlib.animation as animation from FUNCS import FNS from LEGS import LegVar, LegFun from BMAP3D import MapVar, MapFun # --------------------------------------------------------------------------------------------------------------------- # Leg Module - pr...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 2603, 29487, 8019, 13, 11227, 341, 355, 11034, 198, 198, 6738, 29397, 7902, 1330, 376, 8035, 198, 6738, 20978, 50, 1330, 3564, 1985...
3.164384
584
dice_state = 0 # https://adventofcode.com/2021/day/21 if __name__ == '__main__': res = solve(2, 5) print(res)
[ 67, 501, 62, 5219, 796, 657, 628, 198, 2, 3740, 1378, 324, 1151, 1659, 8189, 13, 785, 14, 1238, 2481, 14, 820, 14, 2481, 628, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 581, 796, 8494, 7, ...
2.2
55
import io import json import re
[ 11748, 33245, 198, 11748, 33918, 198, 11748, 302, 198 ]
3.555556
9
from time import strftime, strptime from datetime import date, timedelta, datetime from handler.BaseHandler import * from model.Accounts import * from util import *
[ 6738, 640, 1330, 965, 31387, 11, 965, 457, 524, 198, 6738, 4818, 8079, 1330, 3128, 11, 28805, 12514, 11, 4818, 8079, 198, 198, 6738, 21360, 13, 14881, 25060, 1330, 1635, 198, 6738, 2746, 13, 30116, 82, 1330, 1635, 198, 6738, 7736, 133...
3.733333
45
from collections import Counter from .utils import to_unicode ''' from .value_checks import (is_a_date, is_a_number, is_a_nothing, is_a_latitude, is_a_longitude, is_a_coord_pair, is_a_country, is_a_city, is_a_state, is_a_address, is_a_text, is_a_label, is_a_zip, is_a_street, is_a_phone, is_a_url, is_a_ema...
[ 6738, 17268, 1330, 15034, 198, 6738, 764, 26791, 1330, 284, 62, 46903, 1098, 198, 7061, 6, 422, 764, 8367, 62, 42116, 1330, 357, 271, 62, 64, 62, 4475, 11, 318, 62, 64, 62, 17618, 11, 318, 62, 64, 62, 22366, 11, 198, 220, 220, 2...
2.57197
264
""" What are the two primary categories for tree traversals? A - 1- Depth-First 2- Breadth-First B - 1- Height-First 2- Width-First C - 1- Level-First 2- Branch-First D - 1- Leaf-First 2- Branch-First answer is : """
[ 37811, 198, 198, 2061, 389, 262, 734, 4165, 9376, 329, 5509, 33038, 874, 30, 198, 198, 32, 532, 352, 12, 36350, 12, 5962, 198, 220, 362, 12, 28731, 400, 12, 5962, 198, 198, 33, 532, 352, 12, 27280, 12, 5962, 220, 220, 198, 220, ...
2.568421
95
# 1100. Find K-Length Substrings With No Repeated Characters import collections print(Solution().numKLenSubstrNoRepeats("havefunonleetcode", 5))
[ 2, 36566, 13, 9938, 509, 12, 24539, 3834, 37336, 2080, 1400, 30558, 515, 26813, 198, 11748, 17268, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198, 4798, 7, 46344, 22446, 22510, 42, 30659, 7004, 2536, 2949, 47541,...
2.962264
53
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities fro...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 17202, 39410, 25, 428, 2393, 373, 7560, 416, 262, 21624, 12994, 26144, 35986, 13, 17202, 198, 2, 17202, 2141, 407, 4370, 416, 1021, 4556, 345, 821, 1728, 345, 760, 644, 345, 389, 1804, 0, 17202, ...
2.363636
1,562
import torch import numpy as np import time
[ 11748, 28034, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 640 ]
3.909091
11
import create_word_lists
[ 11748, 2251, 62, 4775, 62, 20713, 628, 628 ]
3.5
8
# Server is setup here from flask import ( Flask, render_template, redirect, request, jsonify, make_response, Response, ) from flask_bootstrap import Bootstrap import psycopg2 import logging from odm360.log import start_logger, stream_logger from odm360.camera360rig import do_request from o...
[ 2, 9652, 318, 9058, 994, 198, 6738, 42903, 1330, 357, 198, 220, 220, 220, 46947, 11, 198, 220, 220, 220, 8543, 62, 28243, 11, 198, 220, 220, 220, 18941, 11, 198, 220, 220, 220, 2581, 11, 198, 220, 220, 220, 33918, 1958, 11, 198, ...
2.664966
1,176
import numpy as np import datetime from keras.models import Model from keras.layers import Input, Activation, Reshape, BatchNormalization, MaxPool2D, Conv2D, Add, Dropout, Flatten, Dense from keras.optimizers import Adam from keras.preprocessing.image import ImageDataGenerator from keras.applications import xception ...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 4818, 8079, 198, 198, 6738, 41927, 292, 13, 27530, 1330, 9104, 198, 6738, 41927, 292, 13, 75, 6962, 1330, 23412, 11, 13144, 341, 11, 1874, 71, 1758, 11, 347, 963, 26447, 1634, 11, 5436, 27201...
2.752874
174
from __future__ import print_function # basic functions import argparse import os import random import math import numpy as np import pandas as pd import matplotlib.pyplot as plt plt.switch_backend('agg') # torch functions import torch import torch.nn as nn import torch.nn.parallel from torch.autograd import grad as ...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 2, 4096, 5499, 198, 11748, 1822, 29572, 198, 11748, 28686, 198, 11748, 4738, 198, 11748, 10688, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 1174...
2.189739
6,783
""" You have a bomb to defuse, and your time is running out! Your informer will provide you with a circular array code of length of n and a key k. To decrypt the code, you must replace every number. All the numbers are replaced simultaneously. If k > 0, replace the ith number with the sum of the next...
[ 37811, 220, 220, 921, 423, 257, 5194, 284, 825, 1904, 11, 290, 534, 640, 318, 2491, 503, 0, 3406, 4175, 263, 481, 198, 220, 220, 2148, 345, 351, 257, 18620, 7177, 2438, 286, 4129, 286, 299, 290, 257, 1994, 479, 13, 1675, 42797, 19...
2.945122
328
#!/usr/bin/env python # coding: utf-8 # In[1]: import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns # In[2]: df=pd.read_csv("./Dataset/Mall_Customers.csv") # In[3]: df.head() # In[4]: df.info() # In[5]: df.describe() # In[6]: df.rename(columns={'Annual Inco...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 554, 58, 16, 5974, 628, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 2603, 29487, 8019, 13, 90...
2.202944
1,902
import json import sys f = open('/path/to/json', 'r') h = json.load(f) ''' for i in h["UEN_DATAGOV"]["BODY"][0]["DATA"]: if i["ENTITY_NAME"][0] == "LEGALESE PTE. LTD.": print i["ENTITY_NAME"][0] print i["UEN"][0] ''' # note that my parser prints the key values into a single-element array chunkSiz...
[ 11748, 33918, 198, 11748, 25064, 198, 198, 69, 796, 1280, 10786, 14, 6978, 14, 1462, 14, 17752, 3256, 705, 81, 11537, 198, 71, 796, 33918, 13, 2220, 7, 69, 8, 198, 198, 7061, 6, 198, 1640, 1312, 287, 289, 14692, 52, 1677, 62, 35, ...
2.076046
263
# -*- coding: utf-8 -*- # Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: https://docs.scrapy.org/en/latest/topics/item-pipeline.html import scrapy from scrapy.pipelines.images import ImagesPipeline
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 2896, 500, 534, 2378, 31108, 994, 198, 2, 198, 2, 2094, 470, 6044, 284, 751, 534, 11523, 284, 262, 7283, 3620, 62, 47, 4061, 3698, 1268, 1546, 4634, 198, 2, ...
2.815217
92
import os import pandas as pd from feature_extraction.date_utils import date_features from feature_extraction.coords_features import coord_features from feature_extraction.other_features import raw_features, categorical_features from feature_extraction.path_utils import project_root import xgboost as xgb import joblib ...
[ 11748, 28686, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 3895, 62, 2302, 7861, 13, 4475, 62, 26791, 1330, 3128, 62, 40890, 198, 6738, 3895, 62, 2302, 7861, 13, 1073, 3669, 62, 40890, 1330, 6349, 62, 40890, 198, 6738, 3895, 62, ...
2.682584
356
from flask import Blueprint, render_template, session view = Blueprint('view', __name__, template_folder='templates') @view.route('/') print('view working')
[ 6738, 42903, 1330, 39932, 11, 8543, 62, 28243, 11, 6246, 198, 198, 1177, 796, 39932, 10786, 1177, 3256, 11593, 3672, 834, 11, 11055, 62, 43551, 11639, 11498, 17041, 11537, 198, 198, 31, 1177, 13, 38629, 10786, 14, 11537, 198, 220, 220, ...
3.192308
52
import pprint import random from collections import defaultdict, deque from enum import Enum, auto from typing import * import numpy as np V = TypeVar("V") D = TypeVar("D") Solution = Dict[V, D] Constraint = Callable[[Solution], bool] if __name__ == "__main__": kwargs = { "pruning_type": ...
[ 11748, 279, 4798, 198, 11748, 4738, 198, 6738, 17268, 1330, 4277, 11600, 11, 390, 4188, 198, 6738, 33829, 1330, 2039, 388, 11, 8295, 198, 6738, 19720, 1330, 1635, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 53, 796, 5994, 19852, ...
2.3
260
# Copyright (c) 2017-2020 Wenyi Tang. # Author: Wenyi Tang # Email: wenyitang@outlook.com # Update: 2020 - 5 - 28 import logging _logger = logging.getLogger("VSR.RWSR") _logger.info("LICENSE: RealSR is implemented by Xiaozhong Ji. " "@xiaozhongji https://github.com/jixiaozhong/RealSR")
[ 2, 220, 15069, 357, 66, 8, 2177, 12, 42334, 370, 28558, 72, 18816, 13, 198, 2, 220, 6434, 25, 370, 28558, 72, 18816, 198, 2, 220, 9570, 25, 266, 28558, 270, 648, 31, 448, 5460, 13, 785, 198, 2, 220, 10133, 25, 12131, 532, 642, ...
2.401575
127
import numpy as np import matplotlib from matplotlib import pyplot as plt def no_ticks(ax, axis="both"): """ Remove ticks and labels from one or both axis. ax : matplotlib ax object. axis : "both", "x", "y" """ from numpy import ndarray try: for axi in ax: set(axi) ...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 198, 6738, 2603, 29487, 8019, 1330, 12972, 29487, 355, 458, 83, 628, 198, 4299, 645, 62, 83, 3378, 7, 897, 11, 16488, 2625, 16885, 1, 2599, 198, 220, 220, 220, 37227, 198, ...
2.164354
937
print(( ld('kitten','kitten'), # 0 ld('kitten','sitten'), # 1 ld('kitten','sittes'), # 2 ld('kitten','sityteng'), # 3 ld('kitten','sittYing'), # 4 ld('rosettacode','raisethysword'), # 8 ld('kitten','kittenaaaaaaaaaaaaaaaaa'), # 17 ld('kittenaaaaaaaaaaaaaaaaa','kitten') # 17 )) print(( ...
[ 198, 4798, 19510, 198, 220, 220, 220, 300, 67, 10786, 74, 2621, 41707, 74, 2621, 33809, 1303, 657, 198, 220, 220, 220, 300, 67, 10786, 74, 2621, 41707, 82, 2621, 33809, 1303, 352, 198, 220, 220, 220, 300, 67, 10786, 74, 2621, 41707,...
2.155844
308
import cv2 as cv faceCascade = cv.CascadeClassifier('haarcascade/haarcascade_frontalface_default.xml') #most accurate eyeCascade = cv.CascadeClassifier('haarcascade/haarcascade_eye.xml') video = cv.VideoCapture(0) while(True): ret, frame = video.read() gray = cv.cvtColor(frame, cv.COLOR_BGR2GRAY) f...
[ 11748, 269, 85, 17, 355, 269, 85, 198, 198, 2550, 34, 28966, 796, 269, 85, 13, 34, 28966, 9487, 7483, 10786, 3099, 5605, 28966, 14, 3099, 5605, 28966, 62, 8534, 1604, 558, 62, 12286, 13, 19875, 11537, 1303, 1712, 7187, 198, 25379, 3...
1.920195
614
from braid import * from sgraph import * from typing import List from numpy import random
[ 6738, 275, 7086, 1330, 1635, 198, 6738, 264, 34960, 1330, 1635, 198, 6738, 19720, 1330, 7343, 198, 6738, 299, 32152, 1330, 4738, 628, 628 ]
3.875
24
########################################################################## ## Package Version ########################################################################## from .version import get_version, __version_info__ __version__ = get_version(short=True)
[ 29113, 29113, 7804, 2235, 198, 2235, 15717, 10628, 198, 29113, 29113, 7804, 2235, 198, 6738, 764, 9641, 1330, 651, 62, 9641, 11, 11593, 9641, 62, 10951, 834, 198, 834, 9641, 834, 796, 651, 62, 9641, 7, 19509, 28, 17821, 8 ]
6.425
40
# coding: utf-8 from . import views from django.conf.urls import url urlpatterns = [ url( r'^create/(?P<app_label>\w+)/(?P<model>\w+)/(?P<obj_id>\d+)/$', views.ExampleCreateView.as_view(), name='create' ), url( r'^update/(?P<pk>\d+)/$', views.ExampleUpdateView.as_...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 6738, 764, 1330, 5009, 198, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 628, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 19016, 7, 198, 220, 220, 220, 220, 220, ...
1.889474
190
# Random forest classification with PCA import pandas as pd import numpy as np import matplotlib.pyplot as plt # Read Data from sklearn.datasets import load_iris dataset = load_iris() # Choose which features to use x = dataset["data"] # It has 4 features - with PCA we will reduce it to 3 for 3D visualisation y =...
[ 2, 14534, 8222, 17923, 351, 4217, 32, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 220, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 2, 4149, 6060, 198, 6738, 1341, 35720, 13, ...
2.686375
778
from datetime import date from django.db import models
[ 6738, 4818, 8079, 1330, 3128, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 628, 628, 628 ]
3.588235
17
from pm4pymdl.visualization import mvp
[ 6738, 9114, 19, 79, 4948, 25404, 13, 41464, 1634, 1330, 285, 36133, 198 ]
3
13
""" Created on Dec 22, 2013 @author: root """ import Utils from Utils import print_pypoly_warning
[ 37811, 198, 41972, 319, 4280, 2534, 11, 2211, 198, 198, 31, 9800, 25, 6808, 198, 37811, 198, 11748, 7273, 4487, 198, 6738, 7273, 4487, 1330, 3601, 62, 79, 4464, 3366, 62, 43917, 628 ]
3.030303
33
from django.conf.urls import url from django.conf import settings from . import views from django.conf.urls.static import static urlpatterns = [ url(r'^$', views.home_page, name='homePage'), url(r'^category/', views.category, name='showCategory'), ] if settings.DEBUG: urlpatterns+= static(settings.MEDIA_U...
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 764, 1330, 5009, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 13, 12708, 1330, 9037, 198, 198, 6371, 33279, 82, ...
2.903226
124
from django.db import models # Create your models here.
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 198, 2, 13610, 534, 4981, 994, 13, 628 ]
3.625
16
""" Dismiss a javascript alert. """ from screenpy.abilities import BrowseTheWeb from screenpy.actor import Actor from screenpy.pacing import aside, beat class DismissAlert: """Dismiss an alert. Abilities Required: |BrowseTheWeb| Examples:: the_actor.attempts_to(DismissAlert()) """ ...
[ 37811, 198, 35, 1042, 747, 257, 44575, 7995, 13, 198, 37811, 198, 198, 6738, 3159, 9078, 13, 5738, 1330, 44775, 464, 13908, 198, 6738, 3159, 9078, 13, 11218, 1330, 27274, 198, 6738, 3159, 9078, 13, 79, 4092, 1330, 7263, 11, 4405, 628,...
2.619863
292
# # working file for testing git support . should be a unit test # import sys import os from src import check_path check_path() from shared.util_git import pull, push, isbehind if __name__ == "__main__": test_status()
[ 2, 198, 2, 1762, 2393, 329, 4856, 17606, 1104, 220, 764, 220, 815, 307, 257, 4326, 1332, 198, 2, 198, 11748, 25064, 198, 11748, 28686, 198, 198, 6738, 12351, 1330, 2198, 62, 6978, 198, 9122, 62, 6978, 3419, 198, 198, 6738, 4888, 13,...
3.094595
74
""" Files for every custom exceptions. """ class GameNotFoundError(Exception): """ Exception to raise when the required game is not found. """
[ 37811, 198, 25876, 329, 790, 2183, 13269, 13, 198, 37811, 628, 198, 4871, 3776, 3673, 21077, 12331, 7, 16922, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 35528, 284, 5298, 618, 262, 2672, 983, 318, 407, 1043, 13, 198, 220, ...
3.413043
46
from typing import Dict from botocore.paginate import Paginator
[ 6738, 19720, 1330, 360, 713, 198, 6738, 10214, 420, 382, 13, 79, 363, 4559, 1330, 31525, 20900, 628, 198 ]
3.473684
19
# -*- coding: utf-8 -*- LATEST = "2" f1 = "events.json" v1 = { "name": {"type": "string", "minlength": 1, "required": True}, "url": {"type": "string", "minlength": 1, "required": True}, "city": {"type": "string", "minlength": 1, "required": True}, "state": {"type": "string", "required": True, "nullabl...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 43, 1404, 6465, 796, 366, 17, 1, 198, 198, 69, 16, 796, 366, 31534, 13, 17752, 1, 198, 85, 16, 796, 1391, 198, 220, 220, 220, 366, 3672, 1298, 19779, 4906, 12...
2.660502
757
# # PySNMP MIB module HP-ICF-IP-LOCKDOWN-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HP-ICF-IP-LOCKDOWN-MIB # Produced by pysmi-0.3.4 at Wed May 1 13:34:15 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (d...
[ 2, 198, 2, 9485, 15571, 7378, 337, 9865, 8265, 6574, 12, 2149, 37, 12, 4061, 12, 36840, 41925, 12, 8895, 33, 357, 4023, 1378, 16184, 76, 489, 8937, 13, 785, 14, 79, 893, 11632, 8, 198, 2, 7054, 45, 13, 16, 2723, 2393, 1378, 14, ...
2.596815
8,351
from ....import_utils import * from ....models_dict import MODEL_REQUIREMENTS if is_all_dependency_installed(MODEL_REQUIREMENTS['encoders-audio-tfhub-yamnet']): import tensorflow as tf import tensorflow_hub as hub from ..base import BaseAudio2Vec from ....base import catch_vector_errors from ....doc_utils impo...
[ 6738, 19424, 11748, 62, 26791, 1330, 1635, 198, 6738, 19424, 27530, 62, 11600, 1330, 19164, 3698, 62, 2200, 49128, 28957, 198, 361, 318, 62, 439, 62, 45841, 1387, 62, 37050, 7, 33365, 3698, 62, 2200, 49128, 28957, 17816, 12685, 375, 364...
3.519595
791
# -*- coding: utf-8 -*- # Copyright (c) 2017 "Shopify inc." All rights reserved. # Use of this source code is governed by a MIT-style license that can be found in the LICENSE file. from __future__ import unicode_literals import xml.etree.ElementTree as et import pytest import six import tests.utils @pytest.fixture ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 357, 66, 8, 2177, 366, 29917, 1958, 753, 526, 1439, 2489, 10395, 13, 198, 2, 5765, 286, 428, 2723, 2438, 318, 21825, 416, 257, 17168, 12, 7635, 5964, 326, ...
3.23
100
"""create openvas_vuln table Revision ID: 506c8e35ba7c Revises: 13b7c3d4c802 Create Date: 2017-07-21 12:19:35.711173 """ from sqlalchemy.dialects import postgresql from alembic import op import sqlalchemy as sa import datetime # revision identifiers, used by Alembic. revision = '506c8e35ba7c' down_revision = '13b7c...
[ 37811, 17953, 1280, 11017, 62, 85, 377, 77, 3084, 198, 198, 18009, 1166, 4522, 25, 2026, 21, 66, 23, 68, 2327, 7012, 22, 66, 198, 18009, 2696, 25, 1511, 65, 22, 66, 18, 67, 19, 66, 30863, 198, 16447, 7536, 25, 2177, 12, 2998, 12...
2.483221
149
# Generated by Django 3.2.4 on 2021-07-09 04:35 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 19, 319, 33448, 12, 2998, 12, 2931, 8702, 25, 2327, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.766667
30
import torch import numpy as np import collections from itertools import repeat import random def flatten(x): ''' flatten high dimensional tensor x into an array :param x: :return: 1 dimensional tensor ''' dims = x.size()[1:] #remove the first dimension as it is batch dimension num_features...
[ 11748, 28034, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 17268, 198, 6738, 340, 861, 10141, 1330, 9585, 198, 11748, 4738, 198, 198, 4299, 27172, 268, 7, 87, 2599, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 27172, 268, 102...
2.743961
621