content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
from enum import Enum import random import collections import numpy as np # ####################################################################### # Data Types ####################################################################### # def __str__(self): return self._string class _Session0(_Session): ...
[ 6738, 33829, 1330, 2039, 388, 198, 11748, 4738, 198, 11748, 17268, 198, 11748, 299, 32152, 355, 45941, 628, 198, 2, 198, 29113, 29113, 4242, 21017, 198, 2, 6060, 24897, 198, 29113, 29113, 4242, 21017, 198, 2, 628, 198, 220, 220, 220, ...
3.381968
1,453
''' Given an n x n matrix where each of the rows and columns are sorted in ascending order, return the kth smallest element in the matrix. Note that it is the kth smallest element in the sorted order, not the kth distinct element. Input: matrix = [[1,5,9],[10,11,13],[12,13,15]], k = 8 Output: 13 Explanation: The elem...
[ 7061, 6, 198, 15056, 281, 299, 2124, 299, 17593, 810, 1123, 286, 262, 15274, 290, 15180, 389, 23243, 287, 41988, 1502, 11, 1441, 262, 479, 400, 18197, 5002, 287, 262, 17593, 13, 198, 198, 6425, 326, 340, 318, 262, 479, 400, 18197, 5...
2.636816
402
from unittest import TestCase from unittest.mock import Mock import numpy as np from pathfinding.domain.angle import Angle from pathfinding.domain.coord import Coord from vision.domain.image import Image from vision.domain.rectangle import Rectangle from vision.infrastructure.cvVisionException import CameraDoesNotExi...
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 44123, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 3108, 41070, 13, 27830, 13, 9248, 1330, 42375, 198, 6738, 3108, 41070, 13, 27830, 13,...
4.085106
94
from .feature_maps import * import torch.nn as nn def create_grad_feature_map(model: nn.Module, grad_layers: List[LayerGradientComputation], use_float64: bool = False) -> FeatureMap: """ Creates a feature map corresponding to phi_{grad} or phi_{ll}, depending on which layers are ...
[ 6738, 764, 30053, 62, 31803, 1330, 1635, 198, 11748, 28034, 13, 20471, 355, 299, 77, 628, 628, 198, 4299, 2251, 62, 9744, 62, 30053, 62, 8899, 7, 19849, 25, 299, 77, 13, 26796, 11, 3915, 62, 75, 6962, 25, 7343, 58, 49925, 42731, 1...
2.885714
350
from configparser import ConfigParser from configparser import DuplicateSectionError from PyQt5 import QtCore, QtGui, QtWidgets from pinsey import Constants from pinsey.Utils import clickable, center, picture_grid, horizontal_line, resolve_message_sender, name_set, windows from pinsey.gui.MessageWindow import MessageW...
[ 6738, 4566, 48610, 1330, 17056, 46677, 198, 6738, 4566, 48610, 1330, 49821, 5344, 16375, 12331, 198, 6738, 9485, 48, 83, 20, 1330, 33734, 14055, 11, 33734, 8205, 72, 11, 33734, 54, 312, 11407, 198, 198, 6738, 6757, 4397, 1330, 4757, 118...
3.855856
222
from os import system as c i = "ipconfig" input(c(i)) # import win32clipboard # from time import sleep as wait # set clipboard data # while True: # win32clipboard.OpenClipboard() # win32clipboard.EmptyClipboard() # win32clipboard.SetClipboardText('Clipboard Blocked!') # win32clipboard.CloseClipboard() ...
[ 6738, 28686, 1330, 1080, 355, 269, 198, 72, 796, 366, 541, 11250, 1, 198, 15414, 7, 66, 7, 72, 4008, 198, 2, 1330, 1592, 2624, 15036, 3526, 198, 2, 422, 640, 1330, 3993, 355, 4043, 198, 198, 2, 900, 47999, 1366, 198, 2, 981, 640...
2.564885
131
# -*- encoding: utf-8 -*- """ @File : emails.py @Contact : 1053522308@qq.com @License : (C)Copyright 2017-2018, Liugroup-NLPR-CASIA @Modify Time @Author @Version @Desciption ------------ ------- -------- ----------- 2020/9/27 10:22 wuxiaoqiang 1.0 None """ import asyn...
[ 2, 532, 9, 12, 21004, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 31, 8979, 220, 220, 220, 1058, 220, 220, 7237, 13, 9078, 220, 220, 220, 220, 198, 31, 17829, 1058, 220, 220, 13343, 2327, 1828, 21495, 31, 38227, 13, 785, ...
2.326633
199
import time import copy import random import logging from functools import partial import numpy as np import torch from torch.utils.data import DataLoader from transformers import DistilBertModel, DistilBertForSequenceClassification, DistilBertTokenizer, AlbertModel, AlbertForSequenceClassification, DistilBertTokenize...
[ 11748, 640, 198, 11748, 4866, 198, 11748, 4738, 198, 11748, 18931, 198, 6738, 1257, 310, 10141, 1330, 13027, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 6060, 17401, 198, 6738, ...
2.442029
1,104
#!/usr/bin/env python ############################################################################### # # scomdominfo.py - Report information folds and classes of a list of SCOP sids # # File: scomdominfo.py # Author: Alex Stivala # Created: November 2008 # # $Id: scopdominfo.py 3009 2009-12-08 03:01:48Z alexs $ # ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 29113, 29113, 7804, 4242, 21017, 198, 2, 198, 2, 629, 296, 3438, 10951, 13, 9078, 532, 6358, 1321, 38744, 290, 6097, 286, 257, 1351, 286, 6374, 3185, 264, 2340, 198, 2, 198, 2, 9220,...
2.567552
1,769
# Copyright (C) 2020 Intel Corporation # # SPDX-License-Identifier: MIT from tools.test import * import os
[ 2, 15069, 357, 34, 8, 12131, 8180, 10501, 198, 2, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 17168, 198, 198, 6738, 4899, 13, 9288, 1330, 1635, 198, 11748, 28686, 628 ]
3.30303
33
import torch import torch.nn as nn from torch.nn import (TransformerEncoder, TransformerDecoder, TransformerEncoderLayer, TransformerDecoderLayer) from torch import Tensor from typing import Iterable, List import math import os import numpy as np try: from janome.tokenizer import Tokenizer ex...
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 6738, 28034, 13, 20471, 1330, 357, 8291, 16354, 27195, 12342, 11, 3602, 16354, 10707, 12342, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220,...
2.32197
792
# Copyright 2010-2012 Opera Software ASA # # 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 ...
[ 2, 220, 220, 15069, 3050, 12, 6999, 26049, 10442, 49599, 220, 198, 2, 198, 2, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 220, 220, 345, 743, 407, 779, 428, 2393, 2845, 28...
2.403698
3,245
from flask import Flask from loguru import logger from flasgger import Swagger from patron.api import api_bp logger.add("api.log", format="{time:YYYY-MM-DD at HH:mm:ss} | {level} | {message}", rotation="500 MB") template = { "swagger": "2.0", "info": { "title": "PATRON", "description": "", ...
[ 6738, 42903, 1330, 46947, 198, 6738, 2604, 14717, 1330, 49706, 198, 6738, 781, 292, 26679, 1330, 2451, 7928, 198, 198, 6738, 19686, 13, 15042, 1330, 40391, 62, 46583, 628, 198, 6404, 1362, 13, 2860, 7203, 15042, 13, 6404, 1600, 5794, 26...
2.305221
249
import numpy as np import matplotlib.pylab as plt
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 79, 2645, 397, 355, 458, 83, 198 ]
2.777778
18
# with tidy long table fig, ax = plt.subplots() sns.violinplot(x='station', y='no2', data=data_tidy[data_tidy['datetime'].dt.year == 2011], palette="GnBu_d", ax=ax) ax.set_ylabel("NO$_2$ concentration (g/m)")
[ 2, 351, 43044, 890, 3084, 198, 5647, 11, 7877, 796, 458, 83, 13, 7266, 489, 1747, 3419, 198, 82, 5907, 13, 17069, 259, 29487, 7, 87, 11639, 17529, 3256, 331, 11639, 3919, 17, 3256, 1366, 28, 7890, 62, 83, 19325, 58, 7890, 62, 83, ...
2.363636
88
""" Project: dncnn Author: khalil MEFTAH Date: 2021-11-26 DnCNN: Deep Neural Convolutional Network for Image Denoising model implementation """ import torch from torch import nn import torch.nn.functional as F # helper functions # main classe
[ 37811, 198, 16775, 25, 288, 10782, 20471, 198, 13838, 25, 479, 14201, 346, 11948, 37, 5603, 39, 198, 10430, 25, 33448, 12, 1157, 12, 2075, 198, 35, 77, 18474, 25, 10766, 47986, 34872, 2122, 282, 7311, 329, 7412, 5601, 78, 1710, 2746, ...
3.25
76
#!/usr/bin/python from __future__ import print_function import logging from fabric.api import task,run,local,put,get,execute,settings from fabric.decorators import * from fabric.context_managers import shell_env,quiet from fabric.exceptions import * from fabric.utils import puts,fastprint from time import sleep from c...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 18931, 198, 6738, 9664, 13, 15042, 1330, 4876, 11, 5143, 11, 12001, 11, 1996, 11, 1136, 11, 41049, 11, 33692, 198, 6738, 9664, ...
2.404343
967
from django import forms from mezzanine.blog.forms import BlogPostForm from .models import BlogPost # These fields need to be in the form, hidden, with default values, # since it posts to the blog post admin, which includes these fields # and will use empty values instead of the model defaults, without # these spe...
[ 198, 6738, 42625, 14208, 1330, 5107, 198, 198, 6738, 502, 3019, 272, 500, 13, 14036, 13, 23914, 1330, 14001, 6307, 8479, 198, 198, 6738, 764, 27530, 1330, 14001, 6307, 628, 198, 2, 2312, 7032, 761, 284, 307, 287, 262, 1296, 11, 7104, ...
3.893204
103
# -*- coding: utf-8 -*- # Generated by Django 1.11.6 on 2019-03-02 15:56 from __future__ import unicode_literals import ckeditor.fields from django.db import migrations, models import django.db.models.deletion
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 1157, 13, 21, 319, 13130, 12, 3070, 12, 2999, 1315, 25, 3980, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, ...
2.789474
76
import platform from setuptools import setup if platform.system() == "Windows": setup( name="intermezzo", version="0.1.0", description="A library for creating cross-platform text-based interfaces using termbox-go.", long_description="", url="https://github.com/imdaveho/inter...
[ 11748, 3859, 198, 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 361, 3859, 13, 10057, 3419, 6624, 366, 11209, 1298, 198, 220, 220, 220, 9058, 7, 198, 220, 220, 220, 220, 220, 220, 220, 1438, 2625, 3849, 1326, 47802, 1600, 198, 220, ...
2.192248
645
from django.urls import path from . import views urlpatterns = [ path('', views.index, name='index'), path('<str:nome>', views.cumprimentar, name='cumprimentar'), ]
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 6738, 764, 1330, 5009, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 3108, 10786, 3256, 5009, 13, 9630, 11, 1438, 11639, 9630, 33809, 198, 220, 220, 220, 3108, 10786, 27, ...
2.621212
66
import numpy as np import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec import cv2, os, sys, glob import scipy import sklearn import imageio import matplotlib.cm as cm import matplotlib import time from sklearn import decomposition, metrics, manifold, svm from tsne import bh_sne from matplotlib.path ...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 2603, 29487, 8019, 13, 2164, 2340, 43106, 355, 50000, 43106, 198, 11748, 269, 85, 17, 11, 28686, 11, 25064, 11, 15095, 198, 11748, ...
4.596685
181
import pygame from game.game_data.cells.Cell import Cell from game.pygame_ import PICS_pygame, CELL_SIZE from game.pygame_.Object import Object
[ 11748, 12972, 6057, 198, 198, 6738, 983, 13, 6057, 62, 7890, 13, 46342, 13, 28780, 1330, 12440, 198, 6738, 983, 13, 9078, 6057, 62, 1330, 350, 19505, 62, 9078, 6057, 11, 18671, 3069, 62, 33489, 198, 6738, 983, 13, 9078, 6057, 44807, ...
3.173913
46
import json import os import torch import math def adjust_learning_rate(optimizer, scale): """ Scale learning rate by a specified factor. :param optimizer: optimizer whose learning rate must be shrunk. :param scale: factor to multiply learning rate with. """ for param_group in optimizer.param...
[ 11748, 33918, 198, 11748, 28686, 198, 11748, 28034, 198, 11748, 10688, 628, 198, 4299, 4532, 62, 40684, 62, 4873, 7, 40085, 7509, 11, 5046, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 21589, 4673, 2494, 416, 257, 7368, 5766, ...
2.974277
311
from enum import Enum
[ 6738, 33829, 1330, 2039, 388, 628 ]
3.833333
6
#!/bin/python3 """This is the top-level program to operate the Raspberry Pi based lego sorter.""" # Things I can set myself: AWB, Brightness, crop, exposure_mode, # exposure_speed,iso (sensitivity), overlays, preview_alpha, # preview_window, saturation, shutter_speed, # Thought for future enhancement: at start...
[ 2, 48443, 8800, 14, 29412, 18, 198, 37811, 1212, 318, 262, 1353, 12, 5715, 1430, 284, 8076, 262, 24244, 13993, 1912, 1232, 78, 264, 4337, 526, 15931, 198, 198, 2, 11597, 314, 460, 900, 3589, 25, 14356, 33, 11, 17558, 1108, 11, 13833...
2.222928
3,149
# -*- coding: utf-8 -*- from yaml import load, dump try: from yaml import CSafeLoader as SafeLoader print "Using CSafeLoader" except ImportError: from yaml import SafeLoader print "Using Python SafeLoader" import os import sys reload(sys) sys.setdefaultencoding("utf-8") from sqlalchemy import Table
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 331, 43695, 1330, 3440, 11, 10285, 198, 28311, 25, 198, 197, 6738, 331, 43695, 1330, 9429, 8635, 17401, 355, 19978, 17401, 198, 197, 4798, 366, 12814, 9429, 8635, ...
3.05
100
from django.shortcuts import render from core.models import Projects,InfoNotifications,WarningNotifications from django.http import HttpResponse from .tasks import sleepy
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 4755, 13, 27530, 1330, 29898, 11, 12360, 3673, 6637, 11, 20361, 3673, 6637, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 198, 198, 6738, 764, 83, 6791, 1330, 42...
4.119048
42
import tensorflow as tf import numpy as np EPS = 1e-5 def KL_monte_carlo(z, mean, sigma=None, log_sigma=None): """Computes the KL divergence at a point, given by z. Implemented based on https://www.tensorflow.org/tutorials/generative/cvae This is the part "log(p(z)) - log(q(z|x)) where z is sampled from...
[ 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 299, 32152, 355, 45941, 198, 198, 36, 3705, 796, 352, 68, 12, 20, 628, 198, 4299, 48253, 62, 2144, 660, 62, 7718, 5439, 7, 89, 11, 1612, 11, 264, 13495, 28, 14202, 11, 2604, 62, 82...
2.236291
2,006
from tkinter import * import os, xmltodict, requests def knop1(): 'Open GUI huidig station' global root root.destroy() os.system('Huidig_Station.py') def knop2(): 'Open GUI ander station' global root root.destroy() os.system('Ander_Station.py') def nl_to_eng(): 'Wanneer er op d...
[ 6738, 256, 74, 3849, 1330, 1635, 198, 11748, 28686, 11, 2124, 76, 2528, 375, 713, 11, 7007, 628, 198, 198, 4299, 638, 404, 16, 33529, 198, 220, 220, 220, 705, 11505, 25757, 289, 27112, 328, 4429, 6, 198, 220, 220, 220, 3298, 6808, ...
1.823905
2,351
from .py2ifttt import IFTTT
[ 6738, 764, 9078, 17, 361, 926, 83, 1330, 314, 9792, 15751 ]
2.454545
11
import socket import tokens import connection import io import os from PIL import Image from message.literalMessage import LiteralMessage from baseApplication import BaseApplication host = input('Host: ') ClientApplication(host, 50007)
[ 11748, 17802, 201, 198, 11748, 16326, 201, 198, 11748, 4637, 201, 198, 11748, 33245, 201, 198, 11748, 28686, 201, 198, 6738, 350, 4146, 1330, 7412, 201, 198, 6738, 3275, 13, 18250, 1691, 12837, 1330, 25659, 1691, 12837, 201, 198, 6738, ...
3.671642
67
import sys import socket ETH_P_ALL=3 # not defined in socket module, sadly... s=socket.socket(socket.AF_PACKET, socket.SOCK_RAW, socket.htons(ETH_P_ALL)) s.bind((sys.argv[1], 0)) r=s.recv(2000) sys.stdout.write("<%s>\n"%repr(r))
[ 11748, 25064, 198, 11748, 17802, 198, 198, 20702, 62, 47, 62, 7036, 28, 18, 1303, 407, 5447, 287, 17802, 8265, 11, 21098, 986, 198, 82, 28, 44971, 13, 44971, 7, 44971, 13, 8579, 62, 47, 8120, 2767, 11, 17802, 13, 50, 11290, 62, 20...
2.254902
102
#!/usr/bin/env python3 from json import loads from urllib.request import urlopen, Request SITE = input('Site: ') COOKIE = 'pj=' + input('pj=') examList = loads(urlopen(Request(f'{SITE}/data/module/homework/all.asp?sAct=GetHomeworkListByStudent&iIsExam=1&iPageCount=' + loads(urlopen(Request(f'{SITE}/data/module/home...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 6738, 33918, 1330, 15989, 198, 6738, 2956, 297, 571, 13, 25927, 1330, 19016, 9654, 11, 19390, 628, 198, 50, 12709, 796, 5128, 10786, 29123, 25, 705, 8, 198, 34, 15308, 10008, ...
2.376874
467
import sys import os import tkinter.filedialog as fd from time import sleep import datetime import tkinter import tkinter as tk from tkinter import ttk from tkinter import scrolledtext import threading # New File & Duplicate File Save # FileSave
[ 11748, 25064, 198, 11748, 28686, 198, 11748, 256, 74, 3849, 13, 69, 3902, 498, 519, 355, 277, 67, 198, 6738, 640, 1330, 3993, 198, 11748, 4818, 8079, 198, 11748, 256, 74, 3849, 198, 11748, 256, 74, 3849, 355, 256, 74, 198, 6738, 256...
3
86
#!/usr/bin/python # # Copyright 2018-2021 Polyaxon, Inc. # # 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, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 198, 2, 15069, 2864, 12, 1238, 2481, 12280, 897, 261, 11, 3457, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, ...
3.595628
183
# -*- coding: utf-8 -*- # AUTHOR: Zeray Rice <fanzeyi1994@gmail.com> # FILE: judge/base/__init__.py # CREATED: 01:49:33 08/03/2012 # MODIFIED: 15:42:49 19/04/2012 # DESCRIPTION: Base handler import re import time import urllib import hashlib import httplib import datetime import functools import traceback import simp...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 220, 198, 2, 44746, 25, 37028, 323, 13823, 1279, 24408, 2736, 48111, 22666, 31, 14816, 13, 785, 29, 198, 2, 45811, 25, 5052, 14, 8692, 14, 834, 15003, 834, 13, 9078, 198, ...
2.900804
373
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import markdownx.models import myblog.filename from django.conf import settings
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 11, 15720, 602, 198, 11748, 1317, 2902, 87, 13, 27530, 19...
3.224138
58
test = {'name': 'q6', 'points': 10, 'suites': [{'cases': [{'code': '>>> increment = lambda x: x + 1\n' '\n' '>>> square = lambda x: x * x\n' '\n' '>>> do_nothing = make_zipper(increment, ' ...
[ 9288, 796, 1391, 6, 3672, 10354, 705, 80, 21, 3256, 198, 705, 13033, 10354, 838, 11, 198, 705, 2385, 2737, 10354, 685, 90, 6, 33964, 10354, 685, 90, 6, 8189, 10354, 705, 33409, 18703, 796, 37456, 2124, 25, 2124, 1343, 352, 59, 77, ...
1.356453
1,139
""" This problem was asked by Google. Suppose we represent our file system by a string in the following manner: The string "dir\n\tsubdir1\n\tsubdir2\n\t\tfile.ext" represents: dir subdir1 subdir2 file.ext The directory dir contains an empty sub-directory subdir1 and a sub-directory subdir2 containin...
[ 37811, 198, 1212, 1917, 373, 1965, 416, 3012, 13, 198, 198, 15979, 577, 356, 2380, 674, 2393, 1080, 416, 257, 4731, 287, 262, 1708, 5642, 25, 198, 198, 464, 4731, 366, 15908, 59, 77, 59, 912, 549, 15908, 16, 59, 77, 59, 912, 549, ...
3.111876
581
from os.path import expanduser, exists from os import makedirs TURBOT_PATH = expanduser('~/.turbot') UPVOTE_LOGS = expanduser("%s/upvote_logs" % TURBOT_PATH) CHECKPOINT = expanduser("%s/checkpoint" % TURBOT_PATH) REFUND_LOG = expanduser("%s/refunds" % TURBOT_PATH)
[ 6738, 28686, 13, 6978, 1330, 4292, 7220, 11, 7160, 198, 6738, 28686, 1330, 285, 4335, 17062, 198, 198, 51, 4261, 33, 2394, 62, 34219, 796, 4292, 7220, 10786, 93, 11757, 83, 5945, 313, 11537, 198, 8577, 53, 23051, 62, 25294, 50, 796, ...
2.40708
113
from output.models.ms_data.additional.member_type021_xsd.member_type021 import Root __all__ = [ "Root", ]
[ 6738, 5072, 13, 27530, 13, 907, 62, 7890, 13, 2860, 1859, 13, 19522, 62, 4906, 46821, 62, 87, 21282, 13, 19522, 62, 4906, 46821, 1330, 20410, 198, 198, 834, 439, 834, 796, 685, 198, 220, 220, 220, 366, 30016, 1600, 198, 60, 198 ]
2.581395
43
reportedCases=eval(input('Enter the number of reported cases:-')) name=input('Enter the name of the region:-') days=eval(input('Enter the number of days:-')) totalHospitalbeds=eval(input('Enter the total number of beds available in the region:')) avgDailyIncomeInUsd=eval(input('Enter the Average income:-')) avgDaily...
[ 628, 198, 26263, 34, 1386, 28, 18206, 7, 15414, 10786, 17469, 262, 1271, 286, 2098, 2663, 25, 19355, 4008, 198, 3672, 28, 15414, 10786, 17469, 262, 1438, 286, 262, 3814, 21912, 11537, 198, 12545, 28, 18206, 7, 15414, 10786, 17469, 262, ...
3.090395
177
#!/usr/bin/env python3 # Original Author @elitest # This script uses boto3 to perform client side decryption # of data encryption keys and associated files # and encryption in ways compatible with the AWS SDKs # This support is not available in boto3 at this time # Wishlist: # Currently only tested with KMS managed s...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 13745, 6434, 2488, 417, 270, 395, 198, 198, 2, 770, 4226, 3544, 275, 2069, 18, 284, 1620, 5456, 1735, 875, 13168, 198, 2, 286, 1366, 15835, 8251, 290, 3917, 3696, 198, 2, 29...
3.165254
708
from IPython.display import HTML #TO DO - the nested table does not display? #Also, the nested execution seems to take a long time to run? #Profile it to see where I'm going wrong!
[ 6738, 6101, 7535, 13, 13812, 1330, 11532, 628, 198, 2, 10468, 8410, 532, 262, 28376, 3084, 857, 407, 3359, 30, 198, 2, 7583, 11, 262, 28376, 9706, 2331, 284, 1011, 257, 890, 640, 284, 1057, 30, 198, 2, 37046, 340, 284, 766, 810, 3...
3.755102
49
from turtle import width import streamlit as st import numpy as np import pandas as pd from dis import dis import streamlit as st from data.get_saved_library import get_saved_library, display_user_name, display_user_pic from data.get_recently_played import get_recently_played from data.get_top_artists import get_top_ar...
[ 6738, 28699, 1330, 9647, 198, 11748, 4269, 18250, 355, 336, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 595, 1330, 595, 198, 11748, 4269, 18250, 355, 336, 198, 6738, 1366, 13, 1136, 62, 82, 958...
3.279476
229
# Author: allannozomu # Runtime: 56 ms # Memory: 13 MB
[ 2, 6434, 25, 477, 1236, 8590, 296, 84, 198, 2, 43160, 25, 7265, 13845, 198, 2, 14059, 25, 1511, 10771, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220 ]
2.030303
33
import pytest from models.contact_number import ContactNumberModel
[ 11748, 12972, 9288, 198, 6738, 4981, 13, 32057, 62, 17618, 1330, 14039, 15057, 17633, 628, 198 ]
4.3125
16
import unittest import numpy as np from sciquence.sequences import * if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 629, 1557, 594, 13, 3107, 3007, 1330, 1635, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3419, ...
2.767442
43
# -*- coding: utf-8 -*- """ Simple example using BarGraphItem """ # import initExample ## Add path to library (just for examples; you do not need this) import numpy as np import pickle as p import pandas as pd from analysis_guis.dialogs.rotation_filter import RotationFilter from analysis_guis.dialogs impor...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 26437, 1672, 1262, 2409, 37065, 7449, 201, 198, 37811, 201, 198, 2, 1330, 2315, 16281, 22492, 3060, 3108, 284, 5888, 357, 3137, 329, 6096, 26, 345,...
1.975163
4,147
""" downloads gmail atts """ import base64, os from auth.auth import get_service from msg.label import agencies, get_atts from report.response import get_threads, get_status from att.drive import get_or_create_atts_folder,\ check_if_drive, make_drive_folder, upload_to_drive ### START CONFIG ### buffer_path = ...
[ 37811, 198, 15002, 82, 308, 4529, 708, 82, 198, 37811, 198, 198, 11748, 2779, 2414, 11, 28686, 198, 6738, 6284, 13, 18439, 1330, 651, 62, 15271, 198, 6738, 31456, 13, 18242, 1330, 5942, 11, 651, 62, 30353, 198, 6738, 989, 13, 26209, ...
2.404722
1,186
# Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import absolute_import from pex.pip.log_analyzer import LogAnalyzer from pex.typing import TYPE_CHECKING, Generic if TYPE_CHECKING: from typing import Iterable, Mappi...
[ 2, 15069, 33160, 41689, 1628, 20420, 357, 3826, 27342, 9865, 3843, 20673, 13, 9132, 737, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 3826, 38559, 24290, 737, 198, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 1...
3.109756
164
from typing import Any from typing import Callable from typing import Iterable class NextDispatch(Exception): pass class DispatcherType(type): class Dispatcher(FunctionMixin, metaclass=DispatcherType): dispatch: callable register: callable registry: Iterable class MetaDispatcher(FunctionMixin...
[ 6738, 19720, 1330, 4377, 198, 6738, 19720, 1330, 4889, 540, 198, 6738, 19720, 1330, 40806, 540, 628, 628, 198, 198, 4871, 7406, 49354, 7, 16922, 2599, 198, 220, 220, 220, 1208, 628, 198, 4871, 3167, 8071, 2044, 6030, 7, 4906, 2599, 62...
3.2
150
from pbpstats.resources.enhanced_pbp import StartOfPeriod
[ 6738, 279, 46583, 34242, 13, 37540, 13, 16550, 2903, 62, 40842, 79, 1330, 7253, 5189, 5990, 2101, 628 ]
3.277778
18
# Copyright 2015 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
[ 2, 15069, 1853, 4946, 25896, 5693, 198, 2, 1439, 6923, 33876, 13, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 220, 407, 779, 428, ...
2.18404
1,391
#!/usr/bin/env python # coding: utf-8 # In[2]: from collections import defaultdict import csv import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt # ## read data to numpy(not in use) # In[385]: # def readCsvToNumpy(file_name, feat_num): # util_mat = [] # with open...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 554, 58, 17, 5974, 628, 198, 6738, 17268, 1330, 4277, 11600, 198, 11748, 269, 21370, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 1979...
2.083333
1,752
# -*- coding: utf-8 -*- from __future__ import absolute_import import keras.backend as K from time import sleep def _ternarize(W, H=1): '''The weights' ternarization function, # References: - [Recurrent Neural Networks with Limited Numerical Precision](http://arxiv.org/abs/1608.06902) - [Ternary Weig...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 11748, 41927, 292, 13, 1891, 437, 355, 509, 198, 6738, 640, 1330, 3993, 628, 198, 4299, 4808, 759, 283, 1096, 7, 5...
2.370445
494
import asyncio cond = None p_list = [] # # if __name__ == "__main__": asyncio.run(main())
[ 11748, 30351, 952, 198, 198, 17561, 796, 6045, 198, 79, 62, 4868, 796, 17635, 628, 198, 2, 220, 628, 198, 2, 220, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 30351, 952, 13, 5143, 7,...
2.212766
47
from collections import Counter
[ 6738, 17268, 1330, 15034, 198, 220, 220, 220, 220, 220, 220, 220, 220 ]
3.076923
13
"""Mini-functions that do not belong elsewhere.""" from datetime import datetime
[ 37811, 39234, 12, 12543, 2733, 326, 466, 407, 5594, 8057, 526, 15931, 198, 6738, 4818, 8079, 1330, 4818, 8079, 628 ]
4.1
20
import flask_admin as admin # from flask_admin.contrib.sqla import ModelView from app import app # from app import db from models import * # Admin admin = admin.Admin(app) # Add Admin Views
[ 11748, 42903, 62, 28482, 355, 13169, 198, 2, 422, 42903, 62, 28482, 13, 3642, 822, 13, 31166, 5031, 1330, 9104, 7680, 198, 198, 6738, 598, 1330, 598, 198, 2, 422, 598, 1330, 20613, 198, 6738, 4981, 1330, 1635, 198, 198, 2, 32053, 19...
3.327586
58
# Generated by Django 3.0.6 on 2020-05-21 20:38 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 21, 319, 12131, 12, 2713, 12, 2481, 1160, 25, 2548, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
import os # We should try to import any custom settings. SETTINGS_MODULE_NAME = os.getenv("MYPI_SETTINGS_MODULE") if SETTINGS_MODULE_NAME: SETTINGS_MODULE = import_module(SETTINGS_MODULE_NAME) else: SETTINGS_MODULE = object() # Try to get everything from the custom settings, but provide a default. PACKAGES_...
[ 11748, 28686, 628, 198, 198, 2, 775, 815, 1949, 284, 1330, 597, 2183, 6460, 13, 198, 28480, 51, 20754, 62, 33365, 24212, 62, 20608, 796, 28686, 13, 1136, 24330, 7203, 26708, 11901, 62, 28480, 51, 20754, 62, 33365, 24212, 4943, 198, 36...
2.483051
236
#!/usr/bin/env python # -*- coding: utf-8 -*- import simplejson as json from alipay.aop.api.constant.ParamConstants import *
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 2829, 17752, 355, 33918, 198, 198, 6738, 435, 541, 323, 13, 64, 404, 13, 15042, 13, 9979, 415, 13, 22973, 3418...
2.58
50
from __future__ import division # Use floating point for math calculations from flask import Blueprint from CTFd.models import ( ChallengeFiles, Challenges, Fails, Flags, Hints, Solves, Tags, db, ) from CTFd.plugins import register_plugin_assets_directory from CTFd.plugins.challenges...
[ 6738, 11593, 37443, 834, 1330, 7297, 220, 1303, 5765, 12462, 966, 329, 10688, 16765, 628, 198, 6738, 42903, 1330, 39932, 198, 198, 6738, 327, 10234, 67, 13, 27530, 1330, 357, 198, 220, 220, 220, 13879, 25876, 11, 198, 220, 220, 220, 4...
2.981595
163
shopping_list = { 'Tomatoes': 6, 'Bananas': 5, 'Crackers': 2, 'Sugar': 1, 'Icecream': 1, 'Bread': 3, 'Chocolate': 2 } # Just the keys print(shopping_list.keys()) # Just the values # print(shopping_list.values()) # Both keys and values # print(shopping_list.items())
[ 198, 1477, 33307, 62, 4868, 796, 1391, 198, 220, 220, 220, 705, 13787, 15048, 10354, 718, 11, 198, 220, 220, 220, 705, 30457, 15991, 10354, 642, 11, 198, 220, 220, 220, 705, 13916, 28874, 10354, 362, 11, 198, 220, 220, 220, 705, 50,...
2.322835
127
from .surface import * from .modifiers import * from .evaluator import Evaluator from .lowlevel import display_results
[ 6738, 764, 42029, 1330, 1635, 198, 6738, 764, 4666, 13350, 1330, 1635, 198, 6738, 764, 18206, 84, 1352, 1330, 26439, 84, 1352, 198, 6738, 764, 9319, 5715, 1330, 3359, 62, 43420, 198 ]
3.71875
32
import math from math import* print('enter a positive integer') FacMe=int(input()) primefacts=[1] if not isPrime(FacMe): if FacMe % 2==0: primefacts.append(2) if FacMe % 3==0: primefacts.append(3) for i in range(5,FacMe): if FacMe%i==0: if isPrime(i): ...
[ 11748, 10688, 201, 198, 6738, 10688, 1330, 9, 201, 198, 201, 198, 4798, 10786, 9255, 257, 3967, 18253, 11537, 201, 198, 47522, 5308, 28, 600, 7, 15414, 28955, 201, 198, 35505, 37473, 41888, 16, 60, 201, 198, 361, 407, 318, 26405, 7, ...
2.004902
204
# encoding: utf-8 """ binary butterfly validator Copyright (c) 2021, binary butterfly GmbH Use of this source code is governed by an MIT-style license that can be found in the LICENSE.txt. """ import re from typing import Any, Optional from ..abstract_input import AbstractInput from ..fields import Field from ..vali...
[ 2, 21004, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 39491, 35113, 4938, 1352, 198, 15269, 357, 66, 8, 33448, 11, 13934, 35113, 402, 2022, 39, 198, 11041, 286, 428, 2723, 2438, 318, 21825, 416, 281, 17168, 12, 7635, 5964, 326, 460,...
3.863636
110
from runner.run_descriptions.run_description import RunDescription, Experiment, ParamGrid _params = ParamGrid([ ('prediction_bonus_coeff', [0.00, 0.05]), ]) _experiments = [ Experiment( 'doom_maze_very_sparse', 'python -m algorithms.curious_a2c.train_curious_a2c --env=doom_maze_very_sparse --g...
[ 6738, 17490, 13, 5143, 62, 20147, 1968, 507, 13, 5143, 62, 11213, 1330, 5660, 11828, 11, 29544, 11, 25139, 41339, 198, 198, 62, 37266, 796, 25139, 41339, 26933, 198, 220, 220, 220, 19203, 28764, 2867, 62, 4189, 385, 62, 1073, 14822, 3...
2.255773
563
import os from xappt_qt.__version__ import __version__, __build__ from xappt_qt.plugins.interfaces.qt import QtInterface # suppress "qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow)" os.environ['QT_LOGGING_RULES'] = '*.debug=false;qt.qpa.*=false' version = tuple(map(int, __version__.split('.'))) + (__build__, )...
[ 11748, 28686, 198, 198, 6738, 2124, 1324, 83, 62, 39568, 13, 834, 9641, 834, 1330, 11593, 9641, 834, 11, 11593, 11249, 834, 198, 198, 6738, 2124, 1324, 83, 62, 39568, 13, 37390, 13, 3849, 32186, 13, 39568, 1330, 33734, 39317, 198, 198...
2.57047
149
#!/usr/bin/python3 import sys import sqlite3; import re; import os; import random import qualification from cttable import CandidateTable, TableVotingGroup, PhantomTableVotingGroup import cttable SW_VERSION_SPLIT = (1, 1, 4) SW_VERSION = ".".join([str(x) for x in SW_VERSION_SPLIT]) EARLIEST_COMPATIBLE_DB_VERSION = (...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 11748, 25064, 198, 11748, 44161, 578, 18, 26, 198, 11748, 302, 26, 198, 11748, 28686, 26, 198, 11748, 4738, 198, 11748, 28587, 198, 198, 6738, 269, 926, 540, 1330, 40327, 10962, 11, ...
2.385977
8,871
# Copyright (c) Jeremas Casteglione <jrmsdev@gmail.com> # See LICENSE file. from glob import glob from os import path, makedirs
[ 2, 15069, 357, 66, 8, 10272, 5356, 5833, 1533, 75, 7935, 1279, 73, 81, 907, 7959, 31, 14816, 13, 785, 29, 198, 2, 4091, 38559, 24290, 2393, 13, 198, 198, 6738, 15095, 1330, 15095, 198, 6738, 28686, 1330, 3108, 11, 285, 4335, 17062, ...
2.931818
44
""" ############## # jsonReader # ############## """ # Import import json from platform import system from enum import Enum from datetime import timedelta # %% ____________________________________________________________________________________________________ # ____________________________________________________...
[ 37811, 198, 7804, 4242, 2235, 198, 2, 33918, 33634, 1303, 198, 7804, 4242, 2235, 198, 37811, 198, 198, 2, 17267, 198, 11748, 33918, 198, 6738, 3859, 1330, 1080, 198, 6738, 33829, 1330, 2039, 388, 198, 6738, 4818, 8079, 1330, 28805, 1251...
2.226048
1,336
import re test = input(" : ") test.encode('unicode-escape').decode().replace('\\\\', '\\') print(" : "+test) if re.match(test, "a"): print(test + " Match 1") if re.match(test, "aa"): print(test + " Match 2") if re.match(test, "aaaa"): print(test + " Match 3")
[ 11748, 302, 198, 198, 9288, 796, 5128, 7203, 1058, 366, 8, 198, 198, 9288, 13, 268, 8189, 10786, 46903, 1098, 12, 41915, 27691, 12501, 1098, 22446, 33491, 10786, 13426, 3256, 705, 6852, 11537, 198, 198, 4798, 7203, 1058, 43825, 9288, 8,...
2.376068
117
# t=0 # for x in range(1,9): for y in range(1,11): for z in range(1,13): if 6*x+5*y+4*z==50: print("x ",x," y ",y," z ",z," ") t=t+1 print(" {} ".format(t)) #by xiaozhiyuqwq #https://www.rainyat.work #2021-12-23
[ 2, 201, 198, 83, 28, 15, 201, 198, 2, 201, 198, 1640, 2124, 287, 2837, 7, 16, 11, 24, 2599, 201, 198, 220, 220, 220, 329, 331, 287, 2837, 7, 16, 11, 1157, 2599, 201, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1976, 287, 28...
1.561111
180
# from job_scrapper_gui import naukri_gui from tkinter import * from PIL import ImageTk import PIL.Image import naukri_scrapper import linkedin_scrapper import indeed import simply_hired_scrapper from selenium import webdriver root = Tk() root.title("Compare Jobs") root.geometry("1000x670") root.configure(background=...
[ 2, 422, 1693, 62, 1416, 430, 2848, 62, 48317, 1330, 299, 559, 74, 380, 62, 48317, 198, 6738, 256, 74, 3849, 1330, 1635, 198, 6738, 350, 4146, 1330, 7412, 51, 74, 198, 11748, 350, 4146, 13, 5159, 198, 11748, 299, 559, 74, 380, 62, ...
2.876289
873
""" multispectrum Zhiang Chen, Feb, 2020 """ import gdal import cv2 import numpy as np import math import os if __name__ == '__main__': st = MultDim() # split tiles """ st.readTiff("./datasets/C3/Orth5.tif", channel=5) R = st.readImage("./datasets/Rock/R.png", channel=1) G = st.readImage("....
[ 37811, 198, 16680, 271, 806, 6582, 198, 57, 5303, 648, 12555, 11, 198, 15146, 11, 12131, 198, 37811, 198, 198, 11748, 308, 31748, 198, 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 10688, 198, 11748, 28686, 628, ...
2.107744
594
import json from engine.serializers.template import TemplateCellSerializer
[ 11748, 33918, 198, 198, 6738, 3113, 13, 46911, 11341, 13, 28243, 1330, 37350, 28780, 32634, 7509, 628, 198 ]
4.333333
18
#!/usr/bin/env python3 from random import randrange import random import pygame, sys from pygame.locals import * import string pygame.font.init() MENU_WIDTH = 1000 MENU_HEIGHT = 1000 GUESS_WIDTH = 1000 GUESS_HEIGHT = 650 HANGMAN_WIDTH = 1300 HANGMAN_HEIGHT = 720 BLACK = (0,0,0) WHITE = (25...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 201, 198, 201, 198, 6738, 4738, 1330, 43720, 9521, 201, 198, 11748, 4738, 201, 198, 11748, 12972, 6057, 11, 25064, 201, 198, 6738, 12972, 6057, 13, 17946, 874, 1330, 1635, 201, 198, 117...
2.143836
292
import numpy as np from PuzzleLib.Backend import gpuarray from PuzzleLib.Backend.Dnn import crossMapLRN, crossMapLRNBackward from PuzzleLib.Modules.LRN import LRN if __name__ == "__main__": unittest()
[ 11748, 299, 32152, 355, 45941, 198, 198, 6738, 23966, 25835, 13, 7282, 437, 1330, 308, 19944, 18747, 198, 6738, 23966, 25835, 13, 7282, 437, 13, 35, 20471, 1330, 3272, 13912, 35972, 45, 11, 3272, 13912, 35972, 45, 7282, 904, 198, 198, ...
2.849315
73
import copy from typing import Iterable import numba as nb import numpy as np import spectrum_utils.spectrum as sus def dot(spectrum1: sus.MsmsSpectrum, spectrum2: sus.MsmsSpectrum, fragment_mz_tolerance: float) -> float: """ Compute the dot product between the given spectra. Parameters ----...
[ 11748, 4866, 198, 6738, 19720, 1330, 40806, 540, 198, 198, 11748, 997, 7012, 355, 299, 65, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 10958, 62, 26791, 13, 4443, 6582, 355, 2341, 628, 198, 4299, 16605, 7, 4443, 6582, 16, 25, 2341...
2.628028
1,156
""" BP. """ import sys import classicML as cml DATASET_PATH = './datasets/iris_dataset.csv' CALLBACKS = [cml.callbacks.History(loss_name='categorical_crossentropy', metric_name='accuracy')] # ds = cml.data.Dataset(label_mode='one-hot', standardization=True, ...
[ 37811, 198, 20866, 13, 198, 37811, 198, 11748, 25064, 198, 11748, 6833, 5805, 355, 269, 4029, 628, 198, 35, 1404, 1921, 2767, 62, 34219, 796, 705, 19571, 19608, 292, 1039, 14, 29616, 62, 19608, 292, 316, 13, 40664, 6, 198, 34, 7036, ...
1.9437
373
__author__ = "arunrajms" from rest_framework import serializers from pool.models import Pool from rest_framework.validators import UniqueValidator import re TYPE_CHOICES = ['Integer','IP','IPv6','AutoGenerate','Vlan','MgmtIP'] PUT_TYPE_CHOICES = ['Integer','IP','IPv6','Vlan','MgmtIP'] SCOPE_CHOICES = ['global','fabri...
[ 834, 9800, 834, 796, 366, 283, 403, 430, 73, 907, 1, 198, 198, 6738, 1334, 62, 30604, 1330, 11389, 11341, 198, 6738, 5933, 13, 27530, 1330, 19850, 198, 6738, 1334, 62, 30604, 13, 12102, 2024, 1330, 30015, 47139, 1352, 198, 11748, 302,...
3.018182
110
import os import platform from datetime import datetime import time from pathlib import Path import asyncio from dateutil.parser import parse as parsedate from dateutil import tz import aiohttp
[ 11748, 28686, 198, 11748, 3859, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 640, 198, 6738, 3108, 8019, 1330, 10644, 198, 11748, 30351, 952, 198, 198, 6738, 3128, 22602, 13, 48610, 1330, 21136, 355, 44267, 378, 198, 6738, 3128, ...
3.792453
53
# O(n) time | O(1) space
[ 2, 440, 7, 77, 8, 640, 930, 440, 7, 16, 8, 2272, 628 ]
2
13
import pytest from layers.attention import AttentionLayer from tensorflow.keras.layers import Input, GRU, Dense, Concatenate, TimeDistributed from tensorflow.keras.models import Model import tensorflow as tf def test_attention_layer_standalone_fixed_b_fixed_t(): """ Tests fixed batch size and time steps E...
[ 11748, 12972, 9288, 198, 6738, 11685, 13, 1078, 1463, 1330, 47406, 49925, 198, 6738, 11192, 273, 11125, 13, 6122, 292, 13, 75, 6962, 1330, 23412, 11, 10863, 52, 11, 360, 1072, 11, 1482, 9246, 268, 378, 11, 3862, 20344, 6169, 198, 6738...
2.613267
799
from itertools import zip_longest, islice if __name__ == '__main__': L = input() inverse_suffix_array = suffix_array_best(L) suffix_array = inverse_array(inverse_suffix_array) for item in suffix_array: print(item + 1, end=' ') LCP = lcp_array(L, suffix_array) ...
[ 6738, 340, 861, 10141, 1330, 19974, 62, 6511, 395, 11, 318, 75, 501, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 201, 198, 220, 220, 220, 406, 796...
2.009479
211
# -*- coding: utf-8 -*- """ utils.py - Definition of utility functions. """ from collections import namedtuple from lgr.utils import format_cp VariantProperties = namedtuple('VariantProperties', ['cp', 'type', 'when', 'not_when', ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 26791, 13, 9078, 532, 30396, 286, 10361, 5499, 13, 198, 37811, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 198, 6738, 300, 2164, 13, 26791, 1330, 5794, 62,...
2.279588
583
#!/usr/bin/env python3 # import modules. import sys; sys.path.append("..") import hashlib import json import logging import os import plac import unittest import warnings from tomes_packager.lib.directory_object import * from tomes_packager.lib.file_object import * # enable logging. logging.basicConfig(level=logging....
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 1330, 13103, 13, 198, 11748, 25064, 26, 25064, 13, 6978, 13, 33295, 7203, 492, 4943, 198, 11748, 12234, 8019, 198, 11748, 33918, 198, 11748, 18931, 198, 11748, 28686, 198, ...
2.433551
459
from unv.web.helpers import url_with_domain, url_for_static
[ 6738, 555, 85, 13, 12384, 13, 16794, 364, 1330, 19016, 62, 4480, 62, 27830, 11, 19016, 62, 1640, 62, 12708, 628, 198 ]
2.818182
22
import pygame icon = pygame.image.load("diamond_pickaxe.png") screen_weight = 1750 screen_height = 980 pygame.init() window = pygame.display.set_mode((screen_weight, screen_height)) pygame.display.set_caption('Pickaxe clicker') pygame.display.set_icon(icon) # zmienne wytrzymao_kilofa = 50 max_wytrzymao_kilofa = 50...
[ 11748, 12972, 6057, 198, 198, 4749, 796, 12972, 6057, 13, 9060, 13, 2220, 7203, 67, 8446, 62, 27729, 38231, 13, 11134, 4943, 198, 198, 9612, 62, 6551, 796, 1596, 1120, 198, 9612, 62, 17015, 796, 32614, 198, 198, 9078, 6057, 13, 15003,...
2.121739
2,760
import os from tempfile import NamedTemporaryFile import h5py import numpy as np import torch from skimage.metrics import adapted_rand_error from torch.utils.data import DataLoader from pytorch3dunet.datasets.hdf5 import StandardHDF5Dataset from pytorch3dunet.datasets.utils import prediction_collate, get_test_loaders...
[ 11748, 28686, 198, 6738, 20218, 7753, 1330, 34441, 12966, 5551, 8979, 198, 198, 11748, 289, 20, 9078, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 6738, 1341, 9060, 13, 4164, 10466, 1330, 16573, 62, 25192, 62, 18224, 198, ...
2.826531
196
from django.shortcuts import render, get_object_or_404 from django.contrib.auth.decorators import login_required from catalog.models import Videos, Category, Docs, Subscriber from django.contrib.auth.decorators import login_required
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 651, 62, 15252, 62, 273, 62, 26429, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 12501, 273, 2024, 1330, 17594, 62, 35827, 198, 6738, 18388, 13, 27530, 1330, 18637, 11, 2...
3.434783
69
import MySQLdb db = MySQLdb.connect('localhost', 'root', 'vis_2014', 'FinanceVis') cursor = db.cursor() sql = 'select predict_news_word from all_twitter where symbol=%s order by predict_news_word+0 desc' cursor.execute(sql, ('AAPL', )) results = cursor.fetchall() file_twitter_predict = open('twitter_predict_AAPL.csv...
[ 11748, 33476, 9945, 198, 198, 9945, 796, 33476, 9945, 13, 8443, 10786, 36750, 3256, 705, 15763, 3256, 705, 4703, 62, 4967, 3256, 705, 37, 14149, 15854, 11537, 198, 66, 21471, 796, 20613, 13, 66, 21471, 3419, 198, 198, 25410, 796, 705, ...
2.621212
198
""" Dot Plot ========= _thumb: .2, .8 _example_title: Plot distribution. """ import matplotlib.pyplot as plt import numpy as np import arviz as az az.style.use("arviz-darkgrid") data = np.random.normal(0, 1, 1000) az.plot_dot(data, dotcolor="C1", point_interval=True, figsize=(12, 6)) plt.show()
[ 37811, 198, 35, 313, 28114, 198, 2559, 28, 198, 198, 62, 400, 2178, 25, 764, 17, 11, 764, 23, 198, 62, 20688, 62, 7839, 25, 28114, 6082, 13, 198, 37811, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299...
2.447154
123
# https://open.kattis.com/problems/alphabetspam import sys import math xs = input() white = 0 lower = 0 higher =0 other = 0 for i in xs: if i == '_': white += 1 elif ('a' <= i) & (i <= 'z'): lower += 1 elif ('A' <= i) & (i <= "Z"): higher += 1 else: other += 1 print(...
[ 2, 3740, 1378, 9654, 13, 74, 1078, 271, 13, 785, 14, 1676, 22143, 14, 17307, 397, 1039, 79, 321, 198, 198, 11748, 25064, 198, 11748, 10688, 198, 198, 34223, 796, 5128, 3419, 198, 198, 11186, 796, 657, 198, 21037, 796, 657, 198, 4650...
2.087629
194
import numpy as np from sympy import simplify, sqrt, symbols from sympy.stats import Normal, covariance as cov, variance as var if __name__ == "__main__": ab, bc, a, b, c = symbols([ "beta_{A_to_B}", "beta_{B_to_C}", "sigma_A", "sigma_B", "sigma_C"]) Na = Normal('Na',...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 10558, 88, 1330, 30276, 11, 19862, 17034, 11, 14354, 198, 6738, 10558, 88, 13, 34242, 1330, 14435, 11, 44829, 590, 355, 39849, 11, 24198, 355, 1401, 628, 198, 198, 361, 11593, 3672, 834, 6624, ...
1.576888
2,224
#!/usr/bin/env python2.7 # coding=<UTF-8> # tweetpic.py take a photo with the Pi camera and tweet it # by Alex Eames http://raspi.tv/?p=5918 import tweepy from subprocess import call from datetime import datetime import requests import json i = datetime.now() #take time and date for filename no...
[ 198, 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 17, 13, 22, 220, 220, 198, 2, 19617, 28, 27, 48504, 12, 23, 29, 198, 2, 6126, 16564, 13, 9078, 1011, 257, 4590, 351, 262, 13993, 4676, 290, 6126, 340, 220, 220, 198, 2, 416, 4422...
2.516611
602
from pathlib import Path import pandas as pd from torch.utils.tensorboard import SummaryWriter
[ 6738, 3108, 8019, 1330, 10644, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 28034, 13, 26791, 13, 83, 22854, 3526, 1330, 21293, 34379, 628 ]
3.62963
27