content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
#!/usr/bin/python3 import pynput import sys keyboard = pynput.keyboard.Controller() current_word = 's' target = 'mike' replacement = 'rein god' with pynput.keyboard.Listener(on_press=on_press) as listener: current_word = '' listener.join()
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 11748, 279, 2047, 1996, 198, 11748, 25064, 198, 198, 2539, 3526, 796, 279, 2047, 1996, 13, 2539, 3526, 13, 22130, 3419, 628, 198, 14421, 62, 4775, 796, 705, 82, 6, 198, 16793, 796, 705,...
2.663043
92
import logging import os from telethon import events from telethon.events import NewMessage from telethon.errors.rpcerrorlist import BotMethodInvalidError from slavkabot.slavka import Slavka best_chat = os.getenv('best_chat') slavka = Slavka() logger = logging.getLogger(__name__) # @events.register(events.NewM...
[ 11748, 18931, 198, 11748, 28686, 198, 198, 6738, 5735, 400, 261, 1330, 2995, 198, 6738, 5735, 400, 261, 13, 31534, 1330, 968, 12837, 198, 6738, 5735, 400, 261, 13, 48277, 13, 81, 79, 2189, 1472, 4868, 1330, 18579, 17410, 44651, 12331, ...
2.377473
657
import numpy as np from PIL import Image import torch import torchvision from ._detection_collate_configs import make_configs from ..utils import transforms, visualization
[ 11748, 299, 32152, 355, 45941, 198, 6738, 350, 4146, 1330, 7412, 198, 198, 11748, 28034, 198, 11748, 28034, 10178, 198, 198, 6738, 47540, 15255, 3213, 62, 26000, 378, 62, 11250, 82, 1330, 787, 62, 11250, 82, 198, 6738, 11485, 26791, 133...
3.888889
45
# @param strs, a list of strings # @return a list of strings if __name__ == '__main__': s = Solution() strs=['aca','dog','','cat','tac','god','','aca'] strs2=['and','dan'] strs3=[''] print s.anagrams(strs3)
[ 220, 220, 220, 1303, 2488, 17143, 965, 82, 11, 257, 1351, 286, 13042, 198, 220, 220, 220, 1303, 2488, 7783, 257, 1351, 286, 13042, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 264, 796...
2.235849
106
from .omega_2013 import solution as omega_2013
[ 6738, 764, 462, 4908, 62, 6390, 1330, 4610, 355, 37615, 62, 6390, 198 ]
3.615385
13
import pyglet import time from pyglet.window import key from . import resources
[ 11748, 12972, 70, 1616, 198, 11748, 640, 198, 6738, 12972, 70, 1616, 13, 17497, 1330, 1994, 198, 6738, 764, 1330, 4133, 198 ]
3.636364
22
import bottle import os import random from api import * @bottle.route('/') @bottle.route('/static/<path:path>') @bottle.post('/start') @bottle.post('/move') @bottle.post('/end') @bottle.post('/ping') # Expose WSGI app (so gunicorn can find it) application = bottle.default_app() if __name__ == '__main__'...
[ 11748, 9294, 198, 11748, 28686, 198, 11748, 4738, 198, 198, 6738, 40391, 1330, 1635, 628, 198, 31, 10985, 293, 13, 38629, 10786, 14, 11537, 628, 198, 31, 10985, 293, 13, 38629, 10786, 14, 12708, 14, 27, 6978, 25, 6978, 29, 11537, 628,...
2.288557
201
# 给定一个非空整数数组,除了某个元素只出现一次以外,其余每个元素均出现两次。找出那个只出现了一次的元素。 # # 说明: # # 你的算法应该具有线性时间复杂度。 你可以不使用额外空间来实现吗? # # 示例 1: # # 输入: [2,2,1] # 输出: 1 # 示例 2: # # 输入: [4,1,2,1,2] # 输出: 4 # # 来源:力扣(LeetCode) # 链接:https://leetcode-cn.com/problems/single-number # 著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。 from typing import List if __name__ == '_...
[ 2, 13328, 119, 247, 22522, 248, 31660, 10310, 103, 165, 251, 252, 163, 102, 118, 46763, 112, 46763, 108, 46763, 108, 163, 119, 226, 171, 120, 234, 165, 247, 97, 12859, 228, 162, 253, 238, 10310, 103, 17739, 225, 163, 112, 254, 20998...
0.843137
459
# ================================================================= # # Work of the U.S. Department of Defense, Defense Digital Service. # Released as open source under the MIT License. See LICENSE file. # # =================================================================
[ 2, 38093, 198, 2, 198, 2, 5521, 286, 262, 471, 13, 50, 13, 2732, 286, 5947, 11, 5947, 10231, 4809, 13, 198, 2, 28728, 355, 1280, 2723, 739, 262, 17168, 13789, 13, 220, 4091, 38559, 24290, 2393, 13, 198, 2, 198, 2, 38093, 198 ]
6.25
44
from unittest import TestCase from niaarm.niaarm import NiaARM, _cut_point from niaarm.feature import Feature from niaarm.dataset import Dataset import os # The basic test for checking the identification of the appropriate cut point of association rule. # let's borrow a test case from Wikipedia: # https://en....
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 6738, 299, 544, 1670, 13, 18142, 1670, 1330, 399, 544, 33456, 11, 4808, 8968, 62, 4122, 198, 6738, 299, 544, 1670, 13, 30053, 1330, 27018, 198, 6738, 299, 544, 1670, 13, 19608, 292, 316, ...
3.419048
105
from __future__ import absolute_import, division, print_function import argparse from datetime import datetime from os import environ import keras import numpy as np import pandas as pd import tensorflow as tf from keras.applications import MobileNet from keras.callbacks import (EarlyStopping, ModelCheckpoint, Reduce...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 198, 198, 11748, 1822, 29572, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 28686, 1330, 551, 2268, 198, 198, 11748, 41927, 292, 198, 11748, 299, 32152,...
3.065831
638
from django import template from django.conf import settings register = template.Library() @register.simple_tag
[ 6738, 42625, 14208, 1330, 11055, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 198, 30238, 796, 11055, 13, 23377, 3419, 628, 198, 31, 30238, 13, 36439, 62, 12985, 198 ]
3.833333
30
# Copyright (c) 2016, Malte Splietker # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * Redistributions of source code must retain the above copyright notice, # this list of conditions...
[ 2, 15069, 357, 66, 8, 1584, 11, 4434, 660, 13341, 1155, 6122, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 2297, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, 11, 351, 393, 1231, 198, 2, 17613, 11, 389, 10431, 2810, 326, 2...
3.427957
465
import src.hybrid_systems as hs from sklearn.neural_network import MLPRegressor import pandas as pd import src.time_series_functions as tsf if __name__ == "__main__": # linear_combination() nonlinear_combination()
[ 11748, 12351, 13, 12114, 10236, 62, 10057, 82, 355, 289, 82, 220, 198, 6738, 1341, 35720, 13, 710, 1523, 62, 27349, 1330, 10373, 4805, 1533, 44292, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 12351, 13, 2435, 62, 25076, 62, 1254...
2.871795
78
import os, sys, threading, webview from main import run if __name__ == "__main__": t = threading.Thread(target=run) t.daemon = True t.start() port = int(os.environ.get("PORT", 5000)) webview.create_window('Sauce', f"http://localhost:{port}/") webview.start() sys.exit()
[ 11748, 28686, 11, 25064, 11, 4704, 278, 11, 3992, 1177, 201, 198, 201, 198, 6738, 1388, 1330, 1057, 201, 198, 201, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 201, 198, 220, 220, 220, 256, 796, 4704, 278, 13, 16818...
2.311111
135
""" train and evaluate hierarchical classification models: first binary classification (cat/dog) and then breed classification according to the predict animal in the first binary model (1 out of 12 / 1 out of 25) ### Usage: python advanced_model_hierarchical.py inception_v3 or: python advanced_model_hierarchical.py i...
[ 37811, 198, 27432, 290, 13446, 38958, 17923, 4981, 25, 717, 13934, 17923, 357, 9246, 14, 9703, 8, 290, 788, 15939, 17923, 198, 1864, 284, 262, 4331, 5044, 287, 262, 717, 13934, 2746, 357, 16, 503, 286, 1105, 1220, 352, 503, 286, 1679,...
2.208354
10,223
# -*- coding: utf-8 -*- from .interface import Multimeter
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 764, 39994, 1330, 7854, 16912, 198 ]
2.761905
21
import argparse import os import sys sys.path.insert(0, '../cnn/') sys.path.insert(0, 'net/') import torch import torch.nn.utils.prune as prune from tensorflow.python.ops import nn from torch import nn import test from model import Cell, ReLUConvBN from net.quantization import apply_weight_sharing os.makedirs('save...
[ 11748, 1822, 29572, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 17597, 13, 6978, 13, 28463, 7, 15, 11, 705, 40720, 66, 20471, 14, 11537, 198, 17597, 13, 6978, 13, 28463, 7, 15, 11, 705, 3262, 14, 11537, 198, 198, 11748, 28034, 1...
2.504894
1,226
# Generated by Django 3.0.14 on 2022-02-27 19:52 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 1415, 319, 33160, 12, 2999, 12, 1983, 678, 25, 4309, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.875
32
import logging from django import forms import requests from .base import BaseAction, BaseActionForm logger = logging.getLogger('zentral.core.actions.backends.trello') class TrelloClient(object): """Trello API Client""" API_BASE_URL = "https://api.trello.com/1"
[ 11748, 18931, 198, 6738, 42625, 14208, 1330, 5107, 198, 11748, 7007, 198, 6738, 764, 8692, 1330, 7308, 12502, 11, 7308, 12502, 8479, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 10786, 89, 298, 1373, 13, 7295, 13, 4658, 13, ...
2.925532
94
from django.db import models from . import kMeans from django.contrib.postgres.fields import JSONField # Create your models here.
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 201, 198, 6738, 764, 1330, 479, 5308, 504, 201, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 7353, 34239, 13, 25747, 1330, 19449, 15878, 201, 198, 201, 198, 2, 13610, 534, 4981, 994, 13, 201 ]
3.214286
42
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
[ 2, 15069, 13130, 3012, 11419, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, 743, 733...
2.982318
509
# q3 find second max element in an array array = [int(arr_ele) for arr_ele in input("Enter array elements separated by space: ").strip().split(' ')] array.sort() print("second largest element is : ", array[-2]
[ 2, 10662, 18, 1064, 1218, 3509, 5002, 287, 281, 7177, 201, 198, 201, 198, 201, 198, 18747, 796, 685, 600, 7, 3258, 62, 11129, 8, 329, 5240, 62, 11129, 287, 5128, 7203, 17469, 7177, 4847, 11266, 416, 2272, 25, 366, 737, 36311, 22446,...
3.176471
68
#!/usr/bin/env python """ This is a set of helper functions for general utilities """ import difflib def diff(string1, string2): """ Returns an array where array[0] is the content of s2 that have been added in regards to s1 and array[1] is the content of s2 that has been removed from s1 """ d...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 198, 1212, 318, 257, 900, 286, 31904, 5499, 329, 2276, 20081, 198, 37811, 198, 198, 11748, 814, 8019, 628, 198, 4299, 814, 7, 8841, 16, 11, 4731, 17, 2599, 198, 220, 220, 220,...
2.383825
779
#Imports and dependencies from selenium import webdriver import time from selenium.webdriver.common.keys import Keys time_wait_sixty = 60 time_wait_four = 4 # Here the process of automation is achieved by using the framework Selenium. # Selenium is a portable framework for testing and automating web applications web ...
[ 2, 3546, 3742, 290, 20086, 198, 6738, 384, 11925, 1505, 1330, 3992, 26230, 198, 11748, 640, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 11321, 13, 13083, 1330, 26363, 198, 198, 2435, 62, 17077, 62, 82, 19404, 796, 3126, 198, 24...
3.685714
105
# coding=utf-8 # Copyright 2019 Google LLC # 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 to ...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 13130, 3012, 11419, 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, ...
3.782427
239
"Base infeed class" import abc import tensorflow as tf from pydantic import BaseModel class Infeed(abc.ABC): """ An infeed abstracts the operation of creating a stream of examples. """ @abc.abstractmethod def __call__(self, *args, **kwds) -> tf.data.Dataset: """ Configures and A...
[ 1, 14881, 1167, 2308, 1398, 1, 198, 11748, 450, 66, 198, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 279, 5173, 5109, 1330, 7308, 17633, 628, 198, 198, 4871, 4806, 2308, 7, 39305, 13, 24694, 2599, 198, 220, 220, 220, 37227, ...
2.585714
140
# Lint as: python3 # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
[ 2, 406, 600, 355, 25, 21015, 18, 198, 2, 15069, 12131, 3012, 11419, 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,...
3.325424
295
# coding: utf-8 from __future__ import absolute_import try: from django.conf import settings as _settings except ImportError: # No need django for celery_rpc client _settings = object() # Default limit for results of filter call FILTER_LIMIT = 1000 # Default timeout for getting results GET_RESULT_TIMEOUT...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 28311, 25, 198, 220, 220, 220, 422, 42625, 14208, 13, 10414, 1330, 6460, 355, 4808, 33692, 198, 16341, 17267, 12331, 25, 198, 220, 220, 2...
2.781202
649
import numpy as np import pandas as pd import scipy.stats as spss import plotly.express as px import seaborn as sns ''' Central Limit Theorem The central limit theorem states that the sampling distribution of the mean of any independent, random variable will be normal or nearly normal, if the sample size is large en...
[ 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 629, 541, 88, 13, 34242, 355, 599, 824, 198, 11748, 7110, 306, 13, 42712, 355, 279, 87, 198, 11748, 384, 397, 1211, 355, 3013, 82, 198, 198, 7061,...
3.783784
2,183
#!/usr/bin/python3 import pyperclip import re ''' Projeto extrator de número de telefone (posicao 4899) O extrator de número de telefone e de endereços de email deverá fazer: - Obter o texto do clipboard - Encontrar todos os número de telefone e os endereços de email do texto - colá-los no clipboard ''' phoneRegex...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 11748, 12972, 525, 15036, 198, 11748, 302, 628, 198, 7061, 6, 198, 2964, 73, 27206, 1070, 12392, 390, 299, 21356, 647, 78, 390, 5735, 69, 505, 357, 1930, 3970, 78, 4764, 2079, 8, 198, ...
2.206395
1,032
# Generated by Django 3.1.4 on 2021-02-19 22:19 from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 19, 319, 33448, 12, 2999, 12, 1129, 2534, 25, 1129, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, 9945, 13, 27530, 13, 2934, 1616, 295, ...
2.818182
44
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.14.4 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import # import models into mod...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 37811, 198, 220, 220, 220, 12554, 527, 3262, 274, 628, 220, 220, 220, 1400, 6764, 2810, 357, 27568, 416, 2451, 7928, 6127, 5235, 198, 220, 220, 220, 3740, 1378, 12567, 13, 785, 14, 2032, 7928, ...
3.02688
12,463
#------------------------------------------------------------------------------- # Name: __init__ # Purpose: opan.vpt2.__init__ file # # Author: Brian Skinn # bskinn@alum.mit.edu # # Created: 5 Oct 2015 # Copyright: (c) Brian Skinn 2016 # License: The MIT License; see "license.t...
[ 2, 10097, 24305, 198, 2, 6530, 25, 220, 220, 220, 220, 220, 220, 220, 11593, 15003, 834, 198, 2, 32039, 25, 220, 220, 220, 220, 1034, 272, 13, 85, 457, 17, 13, 834, 15003, 834, 2393, 198, 2, 198, 2, 6434, 25, 220, 220, 220, 22...
2.856492
439
N = int(input()) T = list(map(int,input().split())) menor = T[0] pos = 1 for k in range(1,N): if T[k] < menor: menor = T[k] pos = k+1 print(pos)
[ 45, 796, 493, 7, 15414, 28955, 198, 51, 796, 1351, 7, 8899, 7, 600, 11, 15414, 22446, 35312, 3419, 4008, 198, 198, 3653, 273, 796, 309, 58, 15, 60, 198, 1930, 796, 352, 198, 198, 1640, 479, 287, 2837, 7, 16, 11, 45, 2599, 198, ...
1.826087
92
# # PySNMP MIB module ZXR10-SWITCH-ACL-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ZXR10-SWITCH-ACL-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 21:42:26 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (defau...
[ 2, 198, 2, 9485, 15571, 7378, 337, 9865, 8265, 1168, 55, 49, 940, 12, 17887, 31949, 12, 2246, 43, 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, ...
2.470673
14,526
import sys from pathlib import Path __version__ = '0.0.1' def parse_input(paths): """ Take input paths and turn into list of audio files to process. This is primarily just path munging and the validation will occur elsewhere. """ for path in paths: original_path = Path(path.strip()).reso...
[ 11748, 25064, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 834, 9641, 834, 796, 705, 15, 13, 15, 13, 16, 6, 628, 198, 4299, 21136, 62, 15414, 7, 6978, 82, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 7214, 5128, 13532, 29...
2.492401
329
from __future__ import annotations from item_engine.textbase.items.lemmas import Lemma from item_engine.textbase.items.tokens import Token # this module has been auto-generated by ItemEngine __all__ = ['P_Any_', 'P_All_', 'P_Skip_', 'Any_', 'P_Inv_', 'All_', 'P_Atom_', 'CharsetArg', 'PatternArg', 'GrammarArg', 'Ato...
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 6738, 2378, 62, 18392, 13, 5239, 8692, 13, 23814, 13, 293, 3020, 292, 1330, 20607, 2611, 198, 6738, 2378, 62, 18392, 13, 5239, 8692, 13, 23814, 13, 83, 482, 641, 1330, 29130, 628, 198, 2, 4...
2.570175
228
import base64 import os import textwrap import pyperclip from prompt_toolkit.completion import Completion from empire.client.src.EmpireCliConfig import empire_config from empire.client.src.EmpireCliState import state from empire.client.src.menus.UseMenu import UseMenu from empire.client.src.utils import print_util fr...
[ 11748, 2779, 2414, 198, 11748, 28686, 198, 11748, 2420, 37150, 198, 198, 11748, 12972, 525, 15036, 198, 6738, 6152, 62, 25981, 15813, 13, 785, 24547, 1330, 955, 24547, 198, 198, 6738, 13735, 13, 16366, 13, 10677, 13, 36, 35386, 2601, 72...
3.225434
173
#-*- coding : utf-8-*- # coding:unicode_escape import sys import cv2 from argparse import ArgumentParser from gaze_tracking import GazeTrackingFromVideo from screen_brightness_control import set_brightness parse = ArgumentParser() parse.add_argument("-v", "--videocapture", default=0, type=int) parse.add_argument("-e"...
[ 2, 12, 9, 12, 19617, 1058, 3384, 69, 12, 23, 12, 9, 12, 198, 2, 19617, 25, 46903, 1098, 62, 41915, 198, 198, 11748, 25064, 198, 11748, 269, 85, 17, 198, 6738, 1822, 29572, 1330, 45751, 46677, 198, 6738, 17841, 62, 36280, 1330, 402...
2.132959
534
from django.http import Http404 from django.shortcuts import get_object_or_404, render, redirect from django.contrib.auth import authenticate from django.contrib.auth import login as login1 from django.contrib.auth.decorators import login_required from django.contrib.auth.models import Group from django.contrib.auth.pa...
[ 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 26429, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 651, 62, 15252, 62, 273, 62, 26429, 11, 8543, 11, 18941, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 8323, 5344, 198, ...
3.839506
162
from typing import Optional import torch.nn import pytorch_msssim from hylfm.hylfm_types import PeriodUnit from hylfm.utils.general import Period
[ 6738, 19720, 1330, 32233, 198, 198, 11748, 28034, 13, 20471, 198, 198, 11748, 12972, 13165, 354, 62, 76, 824, 14323, 198, 6738, 2537, 1652, 76, 13, 12114, 1652, 76, 62, 19199, 1330, 18581, 26453, 198, 6738, 2537, 1652, 76, 13, 26791, ...
3.117647
51
# Generated by Django 3.2.4 on 2021-06-19 05:28 import datetime from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 19, 319, 33448, 12, 3312, 12, 1129, 8870, 25, 2078, 198, 198, 11748, 4818, 8079, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, 9945, 13, 27530...
2.916667
48
import pandas as pd import numpy as np CoberturaVanguarda = { "APARECIDA": "VALE DO PARAÍBA", "CAÇAPAVA": "VALE DO PARAÍBA", "CACHOEIRA PAULISTA": "VALE DO PARAÍBA", "CANAS": "VALE DO PARAÍBA", "CUNHA": "VALE DO PARAÍBA", "GU...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 198, 34, 2023, 83, 5330, 53, 23521, 64, 796, 1391, 198, 220, 220, 220, 366, 2969, 1503, 2943, 41957, 1298, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
1.532565
1,735
# 問題3 # キーボードから文字列を入力して,その文字列の長さをカウントしなさい. sentense = input("Input your sentense:") l = len(sentense) print(l)
[ 2, 10263, 243, 237, 165, 94, 234, 18, 198, 2, 17433, 255, 12045, 250, 12045, 231, 27370, 36853, 23877, 229, 27764, 245, 26344, 245, 31758, 17739, 98, 27950, 249, 22180, 28134, 171, 120, 234, 2515, 251, 5641, 23877, 229, 27764, 245, 26...
1.302326
86
# -*- coding: utf-8 -*- """ Created on Wed Sep 21 16:02:58 2016 @author: cs390mb Assignment 2 : Activity Recognition This is the starter script used to train an activity recognition classifier on accelerometer data. See the assignment details for instructions. Basically you will train a decision tree classifier and...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 3300, 8621, 2310, 1467, 25, 2999, 25, 3365, 1584, 198, 198, 31, 9800, 25, 50115, 25964, 2022, 198, 198, 8021, 16747, 362, 1058, 24641, 31517, 653...
3.272561
1,640
from cooling_class import SimplifiedThermalModel, SimplifiedThermalModelEvolver import numpy from matplotlib import pyplot import matplotlib.cm as cm from amuse.lab import * from amuse.ext.molecular_cloud import molecular_cloud from prepare_figure import single_frame, figure_frame, set_tickmarks from distinct_colours...
[ 6738, 15134, 62, 4871, 1330, 45157, 1431, 35048, 7617, 17633, 11, 45157, 1431, 35048, 7617, 17633, 36, 10396, 332, 198, 198, 11748, 299, 32152, 198, 6738, 2603, 29487, 8019, 1330, 12972, 29487, 220, 198, 11748, 2603, 29487, 8019, 13, 1121...
3.190184
163
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = "Lucas Miguel S Ponce" __email__ = "lucasmsp@gmail.com" from ddf_library.utils import generate_info def filter_rows(data, settings): """ Filters rows using the given condition. :param data: A pandas's DataFrame; :param settings: a dictiona...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 834, 9800, 834, 796, 366, 22946, 292, 29825, 311, 350, 27078, 1, 198, 834, 12888, 834, 796, 366, 75, 1229, ...
2.645367
313
import socket import ssl import os hostname = 'example.com' context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT) context.load_verify_locations('root.pem') with socket.socket(socket.AF_INET, socket.SOCK_STREAM, 0) as sock: with context.wrap_socket(sock, server_hostname=hostname) as ssock: file = os.open("recv...
[ 11748, 17802, 198, 11748, 264, 6649, 198, 11748, 28686, 198, 4774, 3672, 796, 705, 20688, 13, 785, 6, 198, 198, 22866, 796, 264, 6649, 13, 31127, 21947, 7, 45163, 13, 4805, 2394, 4503, 3535, 62, 51, 6561, 62, 5097, 28495, 8, 198, 22...
2.279817
218
from py_behrtech.Parsers.messageParser import MessageParser from py_behrtech.Parsers.nodeParser import NodeParser from py_behrtech.Parsers.modelParser import ModelParser from py_behrtech.Parsers.defaults import Defaults
[ 198, 6738, 12972, 62, 1350, 11840, 13670, 13, 47, 945, 364, 13, 20500, 46677, 1330, 16000, 46677, 198, 6738, 12972, 62, 1350, 11840, 13670, 13, 47, 945, 364, 13, 17440, 46677, 1330, 19081, 46677, 198, 6738, 12972, 62, 1350, 11840, 13670...
3.202899
69
from typing import List import pandas as pd from fastapi import FastAPI, Response, status from tensorflow.python.keras.models import load_model from model import Answers app = FastAPI() model = load_model('./models/best_model.h5') questions_map = { "X1": "the availability of information about the city services"...
[ 6738, 19720, 1330, 7343, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 3049, 15042, 1330, 12549, 17614, 11, 18261, 11, 3722, 198, 6738, 11192, 273, 11125, 13, 29412, 13, 6122, 292, 13, 27530, 1330, 3440, 62, 19849, 198, 198, 6...
3.061611
211
#!/usr/bin/env python # encoding: utf-8 name = 'sms-store'
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 21004, 25, 3384, 69, 12, 23, 198, 198, 3672, 796, 705, 82, 907, 12, 8095, 6, 628 ]
2.259259
27
from datetime import datetime ''' Animal class initializes the name, color and birthday Use a method to set the most_common animal species to the respective species' class Keeps an array of available species have been instantiated from Animal Holds static methods for formatting bithday and turning species from...
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 7061, 6, 198, 40002, 1398, 4238, 4340, 262, 1438, 11, 3124, 290, 10955, 198, 11041, 257, 2446, 284, 900, 262, 749, 62, 11321, 5044, 4693, 284, 262, 198, 220, 220, 220, 220, 220, 220, 220...
3.969325
163
import pkg_resources __version__ = pkg_resources.get_distribution("docker-publisher-osparc-services").version
[ 11748, 279, 10025, 62, 37540, 198, 198, 834, 9641, 834, 796, 279, 10025, 62, 37540, 13, 1136, 62, 17080, 3890, 7203, 45986, 12, 12984, 8191, 12, 418, 1845, 66, 12, 30416, 11074, 9641, 198 ]
3.264706
34
# -*- coding: utf-8 -*- __author__ = """Matthieu Berjon""" __email__ = 'matthieu@berjon.net' __version__ = '0.3.0'
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 834, 9800, 834, 796, 37227, 19044, 400, 22304, 4312, 46286, 37811, 198, 834, 12888, 834, 796, 705, 6759, 400, 22304, 31, 527, 46286, 13, 3262, 6, 198, 834, 9641, ...
2.148148
54
# Copyright (c) Facebook, Inc. and its affiliates. import os import numpy as np import torch import torch.optim as optim import torch.nn as nn import pytorch3d.transforms as p3d_t BASE_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), "../..")) def tf2d_between(pose1, pose2, device=None): """ ...
[ 198, 2, 15069, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 198, 198, 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 28034, 198, 11748, 28034, 13, 40085, 355, 6436, 198, 11748, 28034, 13, 20471, 355, 299, ...
1.982784
1,336
import enum from typing import NamedTuple, Callable from PyQt5 import QtWidgets from .page_controller import PageController from esolang_IDE.editor_page import EditorPage from esolang_IDE.notebook import Notebook from esolang_IDE.file_info import FileInfo from esolang_IDE.main_window import IDE
[ 11748, 33829, 198, 6738, 19720, 1330, 34441, 51, 29291, 11, 4889, 540, 198, 198, 6738, 9485, 48, 83, 20, 1330, 33734, 54, 312, 11407, 198, 198, 6738, 764, 7700, 62, 36500, 1330, 7873, 22130, 198, 198, 6738, 1658, 349, 648, 62, 14114, ...
3.290323
93
# !/usr/bin/env python # -*- coding: utf-8 -*- # Author: huizhi.yang # Time: 2022/2/22 20:13 import hashlib import json from flask import jsonify, request, Response from app_api import app_api_init as app @app.route("/register", methods=['POST']) @app.route("/login", methods=['POST'])
[ 2, 5145, 14, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 6434, 25, 289, 84, 528, 5303, 13, 17859, 198, 2, 3862, 25, 33160, 14, 17, 14, 1828, 1160, 25, 1485, 198, 11...
2.678899
109
# # PySNMP MIB module CTRON-DEVICE-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CTRON-DEVICE-MIB # Produced by pysmi-0.3.4 at Wed May 1 12:29:46 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar ...
[ 2, 198, 2, 9485, 15571, 7378, 337, 9865, 8265, 34577, 1340, 12, 7206, 27389, 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, 14490, 14, 67, 615...
2.92
1,050
from amuse.support import options from amuse.test import amusetest import io import textwrap import os
[ 6738, 26072, 13, 11284, 1330, 3689, 198, 6738, 26072, 13, 9288, 1330, 716, 385, 316, 395, 198, 11748, 33245, 198, 11748, 2420, 37150, 198, 11748, 28686, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 198, 220, ...
2.652174
46
from os import system, name, path, getcwd from pathlib import Path from time import time from .inputdata import getInputData, viewGeneratedInputData from .outputdata import getOutputData, viewOrderedOutputData makeDefaultDirs() clear() drawWelcome() option_menu = 0 while True: try: menu() ...
[ 6738, 28686, 1330, 1080, 11, 1438, 11, 3108, 11, 651, 66, 16993, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 640, 1330, 640, 198, 6738, 764, 15414, 7890, 1330, 651, 20560, 6601, 11, 1570, 8645, 515, 20560, 6601, 198, 6738, 764, 229...
1.920755
1,060
"""Used for unregistering event handlers""" EVENT_UNREGISTER = 0x1
[ 37811, 38052, 329, 555, 30238, 278, 1785, 32847, 37811, 198, 20114, 3525, 62, 4944, 31553, 41517, 796, 657, 87, 16, 198 ]
3.190476
21
# coding: utf-8 from keras.utils import np_utils from keras.models import Sequential from keras.layers import Dense from tartare.Vision import ExpandImgData if __name__ == "__main__": main()
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 6738, 41927, 292, 13, 26791, 1330, 45941, 62, 26791, 198, 6738, 41927, 292, 13, 27530, 1330, 24604, 1843, 198, 6738, 41927, 292, 13, 75, 6962, 1330, 360, 1072, 198, 6738, 35842, 533, 13, 442...
2.926471
68
# coding=utf-8 from pyspark.conf import SparkConf from pyspark.context import SparkContext
[ 2, 19617, 28, 40477, 12, 23, 220, 198, 198, 6738, 279, 893, 20928, 13, 10414, 1330, 17732, 18546, 198, 6738, 279, 893, 20928, 13, 22866, 1330, 17732, 21947, 198 ]
3.206897
29
EXP_DIR = "EXPERIMENTS" EXP_NAME = "EXPERIMENT" DATA_DIR = "DATA" CKPTS_DIR = "ckpts" EXPDATA_DIR = "data" RESULTS_DIR = "results" CONFIG_DIR = "config" LOGS_DIR = "logs" TRAINING = "training" VALIDATION = "validation" TEST = "test" LEARNING_MODES = [TRAINING, VALIDATION, TEST] RAW_DIR = "raw" PROCESSED_DIR = "proces...
[ 49864, 62, 34720, 796, 366, 6369, 18973, 3955, 15365, 1, 198, 49864, 62, 20608, 796, 366, 6369, 18973, 3955, 3525, 1, 198, 26947, 62, 34720, 796, 366, 26947, 1, 198, 34, 42, 47, 4694, 62, 34720, 796, 366, 694, 457, 82, 1, 198, 636...
1.753012
996
""" Handles the shell entry point """ import argparse import sys from pswingw2.config_defaults import get_simple_config from pswingw2 import send_simple_message def parse(args): """Parse arguments""" parser = argparse.ArgumentParser(description="Sending SMS using PSWin Gateway") parser.add_argument('-u', ...
[ 37811, 198, 12885, 829, 262, 7582, 5726, 966, 198, 37811, 198, 11748, 1822, 29572, 198, 11748, 25064, 198, 6738, 279, 46737, 86, 17, 13, 11250, 62, 12286, 82, 1330, 651, 62, 36439, 62, 11250, 198, 6738, 279, 46737, 86, 17, 1330, 3758,...
2.546248
573
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Functions used by dax_tools like in dax_upload/dax_test/dax_setup. """ from __future__ import print_function from future import standard_library standard_library.install_aliases() from builtins import filter from builtins import input from builtins import str from bu...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 24629, 2733, 973, 416, 288, 897, 62, 31391, 588, 287, 288, 897, 62, 25850, 14, 67, 897, 62, 9288, ...
2.132817
42,457
import numpy as np from scipy import interpolate from skimage.restoration import unwrap_phase import warnings def interpolate_field(field, newsize, info=None, verbose=False): """Interpolate two-dimensional complex field Parameters ---------- field: 2d ndarray of shape (M,M) The field image ...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 1330, 39555, 378, 198, 6738, 1341, 9060, 13, 2118, 6944, 1330, 7379, 2416, 62, 40715, 198, 11748, 14601, 628, 198, 4299, 39555, 378, 62, 3245, 7, 3245, 11, 1705, 1096, 11, 7508, ...
2.371212
1,188
import imutils from datetime import datetime import numpy as np import imagezmq import argparse import imutils import cv2 imageHub = imagezmq.ImageHub() lastActive = {} lastActiveCheck = datetime.now() timeSinceLastFrame = {} ESTIMATED_NUM_PIS = 4 ACTIVE_CHECK_PERIOD = 10 ACTIVE_CHECK_SECONDS = ESTIMATED_NUM_PIS *...
[ 11748, 545, 26791, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2939, 89, 76, 80, 198, 11748, 1822, 29572, 198, 11748, 545, 26791, 198, 11748, 269, 85, 17, 628, 198, 9060, 16066, 796, 2939, ...
2.498998
1,497
units = ["zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"] teens = ["ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "nineteen"] tens = ["", "ten", "twenty", "thirty", "forty", "fifty", "sixty", "seventy", "eighty", "ninety"]...
[ 41667, 796, 14631, 22570, 1600, 366, 505, 1600, 366, 11545, 1600, 366, 15542, 1600, 366, 14337, 1600, 220, 366, 13261, 1600, 220, 198, 220, 220, 220, 366, 19412, 1600, 366, 26548, 1600, 366, 26022, 1600, 366, 30888, 8973, 198, 660, 641,...
2.322275
211
from pritunl_wireguard_client.utils.importer import download_profile from pritunl_wireguard_client.utils.pritunl_auth import \ pritunl_auth, pritunl_sign, verify_signature, ClientBox from pritunl_wireguard_client.utils.token import Tokens from pritunl_wireguard_client.utils.random import rand_str, rand_str_complex
[ 6738, 778, 270, 403, 75, 62, 21809, 14864, 62, 16366, 13, 26791, 13, 320, 26634, 1330, 4321, 62, 13317, 198, 6738, 778, 270, 403, 75, 62, 21809, 14864, 62, 16366, 13, 26791, 13, 79, 799, 403, 75, 62, 18439, 1330, 3467, 198, 220, 2...
2.93578
109
# Generated by Django 3.1.7 on 2021-03-10 09:25 import ckeditor.fields from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 22, 319, 33448, 12, 3070, 12, 940, 7769, 25, 1495, 198, 198, 11748, 269, 9091, 2072, 13, 25747, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.923077
39
from .core import COO, as_coo from .umath import elemwise from .common import tensordot, dot, concatenate, stack, triu, tril, where, \ nansum, nanprod, nanmin, nanmax, nanreduce, roll
[ 6738, 764, 7295, 1330, 327, 6684, 11, 355, 62, 1073, 78, 198, 6738, 764, 388, 776, 1330, 9766, 76, 3083, 198, 6738, 764, 11321, 1330, 11192, 585, 313, 11, 16605, 11, 1673, 36686, 378, 11, 8931, 11, 1333, 84, 11, 491, 346, 11, 810,...
2.685714
70
import glob import os import pathlib from nbconvert import NotebookExporter from nbconvert.preprocessors import ExecutePreprocessor import nbformat import pytest from traitlets.config import Config def run_notebook(path, timeout=120): """ Execute a Jupyter Notebook and return any errors that it produces. ...
[ 11748, 15095, 198, 11748, 28686, 198, 11748, 3108, 8019, 198, 198, 6738, 299, 65, 1102, 1851, 1330, 5740, 2070, 3109, 26634, 198, 6738, 299, 65, 1102, 1851, 13, 3866, 14681, 669, 1330, 8393, 1133, 6719, 41341, 198, 11748, 299, 65, 18982...
2.93625
800
# Assignment-3.2 ############ # In Built filter function # Input the paramaters print("\r") print("-> Input") number = int(input("-> Insert a number : ")) num_list = list(range (1,number+1)) even_number = list (filter (lambda x :(x%2==0), list (filter (lambda y: (y%5==0) ,num_list )))) odd_number = l...
[ 2, 50144, 12, 18, 13, 17, 201, 198, 201, 198, 7804, 4242, 201, 198, 2, 554, 28477, 8106, 2163, 220, 201, 198, 201, 198, 2, 23412, 262, 5772, 8605, 220, 201, 198, 4798, 7203, 59, 81, 4943, 201, 198, 4798, 7203, 3784, 23412, 4943, ...
2.64058
345
# -*- coding: utf-8 -*- import json from os import path from gluon import current from gluon.html import * from gluon.storage import Storage from gluon.http import redirect from s3 import FS, S3CustomController from s3theme import formstyle_foundation_inline THEME = "DRK" # =======================================...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 33918, 198, 198, 6738, 28686, 1330, 3108, 198, 198, 6738, 1278, 84, 261, 1330, 1459, 198, 6738, 1278, 84, 261, 13, 6494, 1330, 1635, 198, 6738, 1278, 84, 2...
1.961434
5,134
import requests as r from bs4 import BeautifulSoup as bs import re import discord,asyncio,random from discord.ext import commands import datetime links = [] List= ["``Please Enter The Motogp Name And GP`","``Grabbing links...``"]
[ 11748, 7007, 355, 374, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 355, 275, 82, 198, 11748, 302, 198, 11748, 36446, 11, 292, 13361, 952, 11, 25120, 198, 6738, 36446, 13, 2302, 1330, 9729, 198, 11748, 4818, 8079, 198, 28751, 796, ...
3.432836
67
from updown import * import os import io from scipy.io import wavfile import scipy.signal as sps import soundfile import librosa from tqdm import tqdm parser = argparse.ArgumentParser(description='Sync ~/Downloads to Dropbox') parser.add_argument('--token', default=TOKEN, help='Access token' '(see https://www.dropbox...
[ 6738, 2325, 593, 1330, 1635, 198, 11748, 28686, 198, 11748, 33245, 198, 6738, 629, 541, 88, 13, 952, 1330, 266, 615, 7753, 198, 11748, 629, 541, 88, 13, 12683, 282, 355, 599, 82, 198, 11748, 2128, 7753, 198, 11748, 9195, 4951, 64, 1...
3.064935
154
import os import json import random from PIL import Image from torch.utils.data import Dataset from dataset.utils import pre_question
[ 11748, 28686, 198, 11748, 33918, 198, 11748, 4738, 198, 6738, 350, 4146, 1330, 7412, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 16092, 292, 316, 198, 6738, 27039, 13, 26791, 1330, 662, 62, 25652, 628, 220, 220, 220, 220, 220, 220, 2...
2.960784
51
from __future__ import absolute_import from .sql_client import SQLClient from .data_obs_client import DataObsClient __all__ = [ 'SQLClient', 'DataObsClient' ]
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 6738, 764, 25410, 62, 16366, 1330, 16363, 11792, 198, 6738, 764, 7890, 62, 8158, 62, 16366, 1330, 6060, 31310, 11792, 198, 198, 834, 439, 834, 796, 685, 198, 220, 220, 220, 705...
2.964912
57
#!/usr/bin/env python3 # python_trimmer_example 0.0.1 import os import dxpy import subprocess @dxpy.entry_point('main') dxpy.run()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 21015, 62, 2213, 10957, 62, 20688, 657, 13, 15, 13, 16, 198, 198, 11748, 28686, 198, 11748, 44332, 9078, 198, 11748, 850, 14681, 198, 198, 31, 34350, 9078, 13, 13000, 62, 4122...
2.481481
54
import time from selenium import webdriver from selenium.webdriver.chrome.options import Options chrome_options = Options() chrome_options.headless = True # TC04
[ 11748, 640, 201, 198, 6738, 384, 11925, 1505, 1330, 3992, 26230, 201, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 46659, 13, 25811, 1330, 18634, 201, 198, 46659, 62, 25811, 796, 18634, 3419, 201, 198, 46659, 62, 25811, 13, 2256, ...
3.207547
53
#-*- coding:utf-8 -*- import unittest from datetime import datetime from time import sleep import mock from pytest import fail from tornado import gen from tornado import testing from pybreaker import * class CircuitBreakerStorageBasedTestCase(object): """ Mix in to test against different storage backings....
[ 2, 12, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 198, 11748, 555, 715, 395, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 640, 1330, 3993, 198, 198, 11748, 15290, 198, 6738, 12972, 9288, 1330, 2038, 198, 6738, 33718, ...
2.449814
10,760
## # .test.test_installation ## import sys import os import unittest from .. import installation as ins class test_installation(unittest.TestCase): """ Most of this is exercised by TestCaseWithCluster, but do some explicit checks up front to help find any specific issues that do not naturally occur. """ def tes...
[ 2235, 198, 2, 764, 9288, 13, 9288, 62, 17350, 341, 198, 2235, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 555, 715, 395, 198, 6738, 11485, 1330, 9988, 355, 1035, 198, 198, 4871, 1332, 62, 17350, 341, 7, 403, 715, 395, 13, 1440...
2.751724
290
# -*- coding: utf-8 -*- import hashlib import nose from nose.tools.trivial import eq_ from cmonkey import ( CookieClient, SignatureClient, SignatureBuilder, IntegrationClient, ) try: import mock except ImportError: from unittest import mock if __name__ == "__main__": nose.main(argv...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 12234, 8019, 198, 198, 11748, 9686, 198, 6738, 9686, 13, 31391, 13, 83, 15104, 498, 1330, 37430, 62, 198, 198, 6738, 269, 49572, 1330, 357, 198, 220, 220, ...
2.587413
143
from django.db.models.signals import post_save from django.db.models.signals import pre_delete from django.dispatch import receiver from .models import Account from .models import User from .tasks import create_account from .tasks import delete_user from .tasks import delete_user_email from .tasks import send_confirma...
[ 6738, 42625, 14208, 13, 9945, 13, 27530, 13, 12683, 874, 1330, 1281, 62, 21928, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 13, 12683, 874, 1330, 662, 62, 33678, 198, 6738, 42625, 14208, 13, 6381, 17147, 1330, 9733, 198, 198, 6738, ...
3.282051
156
import numpy as np import matplotlib.pyplot as plt from scipy.special import sph_harm, spherical_jn, jv, jn_zeros, comb from scipy.interpolate import interp1d from scipy.integrate import simps from scipy.optimize import brentq import os import sys sys.path.append(os.path.join(os.getcwd(), '../build/')) impor...
[ 11748, 299, 32152, 355, 45941, 201, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 201, 198, 6738, 629, 541, 88, 13, 20887, 1330, 599, 71, 62, 29155, 11, 43180, 62, 73, 77, 11, 474, 85, 11, 474, 77, 62, 9107, 418, ...
2.293254
2,861
from django.contrib import admin from .models import Campaign, Supporter # Register your models here. admin.site.register(Campaign) admin.site.register(Supporter)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 764, 27530, 1330, 13718, 11, 8105, 4337, 198, 198, 2, 17296, 534, 4981, 994, 13, 198, 28482, 13, 15654, 13, 30238, 7, 46102, 8, 198, 28482, 13, 15654, 13, 30238, 7, 15979, 4...
3.704545
44
# -*- coding: utf-8 -*- # Generated by Django 1.11.6 on 2018-01-22 19:01 from __future__ import unicode_literals from django.db import migrations from django.contrib.sites.apps import SitesConfig from django.contrib.sites.management import create_default_site
[ 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, 2864, 12, 486, 12, 1828, 678, 25, 486, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 19...
3.034884
86
import select import socket import signal import pickle import struct import argparse import sys SERVER_HOST = 'localhost' CHAT_SERVER_NAME = 'server' # Some utilities class ChatServer: """ An example chat server using select """ def sighandler(self, signum, frame): """ Clean up client outputs "...
[ 11748, 2922, 198, 11748, 17802, 198, 11748, 6737, 198, 11748, 2298, 293, 198, 11748, 2878, 198, 11748, 1822, 29572, 198, 11748, 25064, 628, 198, 35009, 5959, 62, 39, 10892, 796, 705, 36750, 6, 198, 31542, 62, 35009, 5959, 62, 20608, 796...
2.606618
272
# Generated by Django 2.1 on 2018-12-13 18:26 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import simple_history.models
[ 2, 2980, 515, 416, 37770, 362, 13, 16, 319, 2864, 12, 1065, 12, 1485, 1248, 25, 2075, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, ...
3.22807
57
import pygame import settings import sys import os
[ 11748, 12972, 6057, 198, 11748, 6460, 198, 198, 11748, 25064, 198, 11748, 28686, 628 ]
3.785714
14
import graphene from ...csv import ExportEvents, FileTypes from ...graphql.core.enums import to_enum ExportEventEnum = to_enum(ExportEvents) FileTypeEnum = to_enum(FileTypes)
[ 11748, 42463, 198, 198, 6738, 2644, 40664, 1330, 36472, 37103, 11, 9220, 31431, 198, 6738, 2644, 34960, 13976, 13, 7295, 13, 268, 5700, 1330, 284, 62, 44709, 198, 198, 43834, 9237, 4834, 388, 796, 284, 62, 44709, 7, 43834, 37103, 8, 1...
3.214286
56
CMarketRspInfoField = { "ErrorID": "int", "ErrorMsg": "string", } CMarketReqUserLoginField = { "UserId": "string", "UserPwd": "string", "UserType": "string", "MacAddress": "string", "ComputerName": "string", "SoftwareName": "string", "SoftwareVersion": "string", "AuthorCode": "s...
[ 34, 27470, 49, 2777, 12360, 15878, 796, 1391, 198, 220, 220, 220, 366, 12331, 2389, 1298, 366, 600, 1600, 198, 220, 220, 220, 366, 12331, 50108, 1298, 366, 8841, 1600, 198, 92, 198, 198, 34, 27470, 3041, 80, 12982, 47790, 15878, 796, ...
2.361201
1,232
#!/usr/bin/env python """ module with functions to enable logging """ import time,os,re,csv,sys,uuid,joblib,yaml from datetime import date from dotenv import find_dotenv, load_dotenv if not os.path.exists(os.path.join(".","logs")): os.mkdir("logs") def update_train_log(data_shape, eval_test, runtime, MODEL_VERSI...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 198, 21412, 351, 5499, 284, 7139, 18931, 198, 37811, 198, 198, 11748, 640, 11, 418, 11, 260, 11, 40664, 11, 17597, 11, 12303, 312, 11, 21858, 8019, 11, 88, 43695, 198, 6738, 4...
2.327792
1,925
from __future__ import unicode_literals import frappe from frappe.utils import ( today, format_time, global_date_format, now, get_first_day, ) from frappe.utils.pdf import get_pdf from frappe import _ from frappe.www import printview import datetime from frappe import publish_progress from frappe.ut...
[ 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 11748, 5306, 27768, 198, 6738, 5306, 27768, 13, 26791, 1330, 357, 198, 220, 220, 220, 1909, 11, 198, 220, 220, 220, 5794, 62, 2435, 11, 198, 220, 220, 220, 3298, 62, 4...
2.252423
2,579
__author__ = 'Chirag' # ============================================================= def create_cubes(n): """returns list of cubes from 0 to n""" result = [] for x in range(n): result.append(x**3) # entire 'result' list in memory (inefficient) return result for x in create_cubes(10): print(x) print() # ==...
[ 834, 9800, 834, 796, 705, 1925, 343, 363, 6, 198, 198, 2, 46111, 4770, 25609, 628, 198, 4299, 2251, 62, 66, 29080, 7, 77, 2599, 198, 197, 37811, 7783, 82, 1351, 286, 34896, 422, 657, 284, 299, 37811, 198, 197, 20274, 796, 17635, 1...
3.5
204
import logging from datetime import datetime from .database_config import TableMatch, get_base, get_engine, TablePlayer, TablePlayerMatch, TableAttackEvent, \ TableKillEvent, TableDominationEvent, TableRevengeEvent, TableConnectionEvent, TableDisconnectionEvent, \ TableSteamUserIdValidatedEvent, TableEnteredTh...
[ 11748, 18931, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 6738, 764, 48806, 62, 11250, 1330, 8655, 23850, 11, 651, 62, 8692, 11, 651, 62, 18392, 11, 8655, 14140, 11, 8655, 14140, 23850, 11, 8655, 27732, 9237, 11, 3467, 198, 220...
3.533333
225
# Event: LCCS Python Fundamental Skills Workshop # Date: Dec 2018 # Author: Joe English, PDST # eMail: computerscience@pdst.ie # Purpose: A program to count (and display) the most frequently occurring words in a text # Breakout 7.1 Frequency Counters # Q2(g) - solution # IMPORTANT: Copy the book into book.txt ...
[ 2, 8558, 25, 406, 4093, 50, 11361, 49983, 20389, 26701, 201, 198, 2, 7536, 25, 4280, 2864, 201, 198, 2, 6434, 25, 5689, 3594, 11, 14340, 2257, 201, 198, 2, 304, 25804, 25, 9061, 4234, 31, 30094, 301, 13, 494, 201, 198, 2, 32039, ...
2.830508
295
import os
[ 11748, 28686, 198 ]
3.333333
3