content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
BASE_DIR = './' num_gpu = 1 num_inputs = 39 num_features = 200000 batch_size = 16000 multi_hot_flags = [False] multi_hot_len = 1 n_epoches = 20 iteration_per_loop = 10 #one_step = 60/iteration_per_loop # for one step debug one_step = 0 line_per_sample = 1000 graph_path = "./" # n_step_update = 10 #test_record = "...
[ 33, 11159, 62, 34720, 796, 705, 19571, 6, 198, 198, 22510, 62, 46999, 796, 352, 220, 198, 22510, 62, 15414, 82, 796, 5014, 198, 22510, 62, 40890, 796, 939, 830, 198, 43501, 62, 7857, 796, 1467, 830, 198, 41684, 62, 8940, 62, 33152, ...
2.300995
402
from collections_edges import * from collectors_and_savers.saver import SaverThread from custom_configurations.config import * from graphql_queries.graphql_queries import * from mongodb_queries.mongodb_queries import * from mongodb_connect.mongraph import * from collection_modules.log_message import * db = Mongraph(db...
[ 6738, 17268, 62, 276, 3212, 1330, 1635, 198, 6738, 26668, 62, 392, 62, 11400, 690, 13, 82, 8770, 1330, 311, 8770, 16818, 198, 6738, 2183, 62, 11250, 20074, 13, 11250, 1330, 1635, 198, 6738, 4823, 13976, 62, 421, 10640, 13, 34960, 1397...
2.642633
319
import os from tqdm import tqdm """ Ubuntu Dialogue Corpus http://arxiv.org/abs/1506.08909 """ class UbuntuData: """ """ def __init__(self, dirName): """ Args: dirName (string): directory where to load the corpus """ self.MAX_NUMBER_SUBDIR = 10 self....
[ 11748, 28686, 198, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 198, 37811, 198, 36609, 11157, 34709, 44874, 198, 198, 4023, 1378, 283, 87, 452, 13, 2398, 14, 8937, 14, 8628, 21, 13, 2919, 44675, 198, 198, 37811, 198, 198, ...
1.981664
709
""" ArcGIS Toolbox for integrating the CEA with ArcGIS. ArcGIS starts by creating an instance of Toolbox, which in turn names the tools to include in the interface. These tools shell out to ``cli.py`` because the ArcGIS python version is old and can't be updated. Therefore we would decouple the python version used by...
[ 37811, 198, 24021, 38, 1797, 16984, 3524, 329, 32029, 262, 327, 16412, 351, 10173, 38, 1797, 13, 198, 198, 24021, 38, 1797, 4940, 416, 4441, 281, 4554, 286, 16984, 3524, 11, 543, 287, 1210, 3891, 262, 4899, 284, 2291, 287, 262, 7071, ...
3.316199
642
from main.greeting import English,Spanish import pytest
[ 6738, 1388, 13, 70, 2871, 278, 1330, 3594, 11, 43584, 198, 11748, 12972, 9288, 198 ]
3.733333
15
"""Parsing functions for JunOS XML/HTTP responses.""" # Third Party Imports import xmltodict from boltons.iterutils import remap # Project Imports from junos_rest.constants import RESULTS _NAMESPACES = { "http://xml.juniper.net/xnm/1.1/xnm:error": "error", "http://xml.juniper.net/xnm/1.1/xnm:token": "token",...
[ 37811, 47, 945, 278, 5499, 329, 7653, 2640, 23735, 14, 40717, 9109, 526, 15931, 198, 198, 2, 10467, 3615, 1846, 3742, 198, 11748, 2124, 76, 2528, 375, 713, 198, 6738, 18100, 684, 13, 2676, 26791, 1330, 816, 499, 198, 198, 2, 4935, 1...
2.367691
1,659
from metaflow import FlowSpec, timeout, step, retry import time if __name__ == '__main__': TimeoutFlow()
[ 6738, 1138, 1878, 9319, 1330, 27782, 22882, 11, 26827, 11, 2239, 11, 1005, 563, 198, 11748, 640, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 3862, 448, 37535, 3419 ]
2.945946
37
#-*- coding:utf-8 -*- import os actions = {} init_pkg()
[ 2, 12, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 11748, 28686, 198, 198, 4658, 796, 23884, 198, 198, 15003, 62, 35339, 3419, 198 ]
2.148148
27
# Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Utility for outputting a HTML diff of two multi-line strings. The main purpose of this utility is to show the difference between text baselines (-expecte...
[ 2, 15069, 1584, 383, 18255, 1505, 46665, 13, 1439, 2489, 10395, 13, 198, 2, 5765, 286, 428, 2723, 2438, 318, 21825, 416, 257, 347, 10305, 12, 7635, 5964, 326, 460, 307, 198, 2, 1043, 287, 262, 38559, 24290, 2393, 13, 198, 198, 37811...
3.122905
358
# -*- coding: utf-8 -*- # Copyright FMR LLC <opensource@fidelity.com> # SPDX-License-Identifier: Apache-2.0 """CIFAR10 training script demonstrating a few different stoke options Based loosely on: https://pytorch.org/tutorials/beginner/blitz/cifar10_tutorial.html """ import torch import torchvision.datasets as tv_d...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 15069, 376, 13599, 11419, 1279, 44813, 1668, 31, 69, 23091, 13, 785, 29, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 198, 198, ...
3.182222
225
from ftplib import FTP from os.path import abspath, join, dirname host = 'your.com' user = 'youlogin' password = 'yourpass' remotedir = '/folder/on/server/' filename = 'file.txt' localdir = abspath(dirname(__file__)) absFilePathAutoSlash = abspath(join(dirname(__file__), filename)) ftp = FTP(host) ftp.login(user=use...
[ 6738, 10117, 489, 571, 1330, 45854, 198, 6738, 28686, 13, 6978, 1330, 2352, 6978, 11, 4654, 11, 26672, 3672, 198, 198, 4774, 796, 705, 14108, 13, 785, 6, 198, 7220, 796, 705, 88, 2852, 519, 259, 6, 198, 28712, 796, 705, 14108, 6603,...
2.848837
258
""" pyDL Python と Selenium を使用したCLIダウンローダー。 Chromeのプロファイルを指定するとキャッシュを流用できる。 """ import click import json import dl @click.group() @click.option('--incomplete', '-i', type=str, default='./incomplete', help='Incomplete Files Directory.') @click.option('--download', '-d', type=str, default='./download', help='Downloa...
[ 37811, 198, 9078, 19260, 198, 198, 37906, 23294, 101, 15300, 47477, 17433, 240, 45635, 18796, 101, 22180, 25224, 5097, 40, 27852, 16165, 6527, 16253, 12045, 222, 6312, 16764, 198, 1925, 5998, 5641, 30965, 16253, 41939, 11482, 9202, 31758, 1...
2.551948
308
#!/usr/bin/env python # coding: utf-8 import graphgallery print("GraphGallery version: ", graphgallery.__version__) ''' Load Datasets - cora/citeseer/pubmed ''' from graphgallery.datasets import Planetoid data = Planetoid('cora', root="~/GraphData/datasets/", verbose=False) graph = data.graph splits = ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 201, 198, 2, 19617, 25, 3384, 69, 12, 23, 201, 198, 201, 198, 11748, 4823, 24460, 201, 198, 201, 198, 4798, 7203, 37065, 29352, 2196, 25, 33172, 4823, 24460, 13, 834, 9641, 834, 8, 201, ...
2.24359
312
"""gensim phrases tags""" from urduhack.preprocessing import remove_punctuation, replace_numbers from urduhack.tokenization.words import fix_join_words from urduhack.tokenization import sentence_tokenizer from sklearn.model_selection import ParameterGrid from urduhack import normalize from urduhack.stop_words import S...
[ 37811, 70, 641, 320, 20144, 15940, 37811, 198, 198, 6738, 2956, 646, 31153, 13, 3866, 36948, 1330, 4781, 62, 79, 16260, 2288, 11, 6330, 62, 77, 17024, 198, 6738, 2956, 646, 31153, 13, 30001, 1634, 13, 10879, 1330, 4259, 62, 22179, 62,...
2.402496
1,282
#!/usr/bin/env python # coding: utf-8 # # PT Tokenizer # <div style="position: absolute; right:0;top:0"><a href="./tokenizer.ipynb" style="text-decoration: none"> <font size="5">←</font></a> # <a href="../evaluation.py.ipynb" style="text-decoration: none"> <font size="5">↑</font></a></div> # # This is a wrapper aroun...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 1303, 19310, 29130, 7509, 198, 2, 1279, 7146, 3918, 2625, 9150, 25, 4112, 26, 826, 25, 15, 26, 4852, 25, 15, 22039, 64, 13291, 28, 19...
2.596215
317
print("Running performance analysis...") print("Out dir : %s" % out_dir) print("Architecture: %s" % arch) import os import sys import csv csv_records = [] csv_path = os.path.join(out_dir,"mpn-performance-%s.csv" % arch) for record in performance: func, lx,ly,instr_s,instr_e,cycle_s,cycle_e = record ...
[ 198, 198, 4798, 7203, 28768, 2854, 3781, 9313, 8, 198, 4798, 7203, 7975, 26672, 220, 220, 220, 220, 1058, 4064, 82, 1, 4064, 503, 62, 15908, 8, 198, 4798, 7203, 19895, 5712, 495, 25, 4064, 82, 1, 4064, 3934, 8, 198, 198, 11748, 28...
2.309859
284
# Copyright (C) 2018 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """Tests for actions available on audits handle.""" from ggrc.models import Audit from ggrc.models import Program from ggrc.models import all_models from integration.ggrc import generator from integration....
[ 2, 15069, 357, 34, 8, 2864, 3012, 3457, 13, 198, 2, 49962, 739, 2638, 1378, 2503, 13, 43073, 13, 2398, 14, 677, 4541, 14, 43, 2149, 24290, 12, 17, 13, 15, 1279, 3826, 38559, 24290, 2393, 29, 198, 198, 37811, 51, 3558, 329, 4028, ...
2.487032
1,041
""" Test stats.Describe object """ import acequia as aq if __name__ == '__main__': srcdir = r'.\testdata\dinogws_smalltest\\' outdir = r'.\output\tables\\' fpath = f'{srcdir}B29A0016001_1.csv' gw = aq.GwSeries.from_dinogws(fpath) hdr('test self._create_list()') ds = aq.GwListStats...
[ 198, 198, 37811, 198, 220, 220, 220, 6208, 9756, 13, 24564, 4892, 2134, 220, 198, 198, 37811, 198, 198, 11748, 31506, 421, 544, 355, 257, 80, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 628, 220, 220, 220, 12...
2.044444
495
#!/usr/bin/env python # Copyright 2014 Google Inc. 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 required...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 15069, 1946, 3012, 3457, 13, 1439, 2489, 10395, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 407, 198, 2, 7...
3.167722
316
''' Divide and conquer In this section, we'll discuss algorithms that use a strategy called divide and conquer to solve problems more efficiently. The name comes from the idea that the algorithm will break (or divide) the problem down into sub-problems that can be more easily solved (or conquered). Then, the solution...
[ 7061, 6, 198, 24095, 485, 290, 23875, 198, 818, 428, 2665, 11, 356, 1183, 2112, 16113, 326, 779, 257, 4811, 1444, 14083, 290, 23875, 284, 8494, 2761, 517, 18306, 13, 220, 198, 464, 1438, 2058, 422, 262, 2126, 326, 262, 11862, 481, 2...
3.42487
386
# Copyright 2019 ducandu GmbH, All Rights Reserved # (this is a modified version of the Apache 2.0 licensed RLgraph file of the same name). # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # #...
[ 2, 15069, 13130, 288, 1229, 392, 84, 402, 2022, 39, 11, 1439, 6923, 33876, 198, 2, 357, 5661, 318, 257, 9518, 2196, 286, 262, 24843, 362, 13, 15, 11971, 45715, 34960, 2393, 286, 262, 976, 1438, 737, 198, 2, 198, 2, 49962, 739, 262...
3.035838
865
"""Exceptions for library.""" class DressUpException(Exception): """Base exception for all exceptions raised by the library.""" def __repr__(self) -> str: """Representation of DressUpException.""" return "DressUpException()" class InvalidUnicodeTypeError(DressUpException, ValueError): "...
[ 37811, 3109, 11755, 329, 5888, 526, 15931, 628, 198, 4871, 33611, 4933, 16922, 7, 16922, 2599, 198, 220, 220, 220, 37227, 14881, 6631, 329, 477, 13269, 4376, 416, 262, 5888, 526, 15931, 628, 220, 220, 220, 825, 11593, 260, 1050, 834, ...
2.988024
167
# https://tf.wiki/zh_hans/deployment/serving.html
[ 2, 3740, 1378, 27110, 13, 15466, 14, 23548, 62, 71, 504, 14, 2934, 1420, 434, 14, 31293, 13, 6494, 198 ]
2.5
20
""" You have an array of logs. Each log is a space delimited string of words. For each log, the first word in each log is an alphanumeric identifier. Then, either: Each word after the identifier will consist only of lowercase letters, or; Each word after the identifier will consist only of digits. We will call thes...
[ 37811, 198, 1639, 423, 281, 7177, 286, 17259, 13, 220, 5501, 2604, 318, 257, 2272, 46728, 863, 4731, 286, 2456, 13, 198, 198, 1890, 1123, 2604, 11, 262, 717, 1573, 287, 1123, 2604, 318, 281, 435, 19080, 39223, 27421, 13, 220, 3244, ...
3.511864
295
from fluiddb.cache.permission import ( CachingPermissionAPI, CachingPermissionCheckerAPI) from fluiddb.data.path import getParentPath from fluiddb.data.permission import Operation from fluiddb.data.user import Role from fluiddb.model.exceptions import UnknownPathError from fluiddb.security.exceptions import Permiss...
[ 6738, 6562, 1638, 65, 13, 23870, 13, 525, 3411, 1330, 357, 198, 220, 220, 220, 327, 8103, 5990, 3411, 17614, 11, 327, 8103, 5990, 3411, 9787, 263, 17614, 8, 198, 6738, 6562, 1638, 65, 13, 7890, 13, 6978, 1330, 651, 24546, 15235, 198...
2.545212
5,618
from .anmm import * from .arci import * from .arcii import * from .cdssm import * from .drmm import * from .dssm import * from .duet import * from .knrm import * from .model import * from .matchpyramid import *
[ 6738, 764, 272, 3020, 1330, 1635, 198, 6738, 764, 283, 979, 1330, 1635, 198, 6738, 764, 283, 979, 72, 1330, 1635, 198, 6738, 764, 10210, 824, 76, 1330, 1635, 198, 6738, 764, 7109, 3020, 1330, 1635, 198, 6738, 764, 67, 824, 76, 1330,...
2.916667
72
import os import logging # Settings that can be overridden via environment variables. LOG_FILE = os.getenv("LOG_FILE", "/logs/harchiverd.log") LOG_LEVEL = os.getenv("LOG_LEVEL", 'DEBUG') OUTPUT_DIRECTORY = os.getenv("OUTPUT_DIRECTORY", "/images") WEBSERVICE = os.getenv("WEBSERVICE", "http...
[ 11748, 28686, 198, 11748, 18931, 198, 198, 2, 16163, 326, 460, 307, 23170, 4651, 2884, 2858, 9633, 13, 198, 198, 25294, 62, 25664, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 28686, 13, 1136, 24330, 7203, 25294, 62, 25664, ...
1.984925
398
#-*- coding:utf-8 -*- import wx from wx.py.shell import ShellFrame if __name__ == '__main__': app = App(False) app.MainLoop()
[ 2, 12, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 198, 11748, 266, 87, 198, 6738, 266, 87, 13, 9078, 13, 29149, 1330, 17537, 19778, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 5...
2.266667
60
# Copyright 2015 gRPC authors. # # 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 in writing...
[ 2, 15069, 1853, 308, 49, 5662, 7035, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, ...
3.157061
694
# -*- coding: utf-8 -*- # Generated by Django 1.11.17 on 2021-03-02 13:17 from __future__ import unicode_literals from django.db import migrations
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 1157, 13, 1558, 319, 33448, 12, 3070, 12, 2999, 1511, 25, 1558, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198...
2.709091
55
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Description: TODO """ __author__ = "Ariel Gerardo Rios (ariel.gerardo.rios@gmail.com)" from django.test import TestCase # Create your tests here. # vim: ai ts=4 sts=4 et sw=4 ft=python
[ 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, 11828, 25, 16926, 46, 198, 37811, 198, 834, 9800, 834, 796, 366, 32, 11719, 13573, 13109, 371, 4267, ...
2.474227
97
from flask import Flask from flask import render_template from flask.ext.socketio import SocketIO, emit from hashlib import sha256 import sys app = Flask(__name__) app.config['SECRET_KEY'] = 'replaceme' app.config['ADMIN_URL'] = '/admin' app.config['DEBUG'] = True # Replace the above secrets and specify other overrid...
[ 6738, 42903, 1330, 46947, 198, 6738, 42903, 1330, 8543, 62, 28243, 198, 6738, 42903, 13, 2302, 13, 44971, 952, 1330, 47068, 9399, 11, 27588, 198, 6738, 12234, 8019, 1330, 427, 64, 11645, 198, 11748, 25064, 198, 198, 1324, 796, 46947, 7,...
2.627953
508
import re format_regexps = { "hgvs": [ # just the accession and variant type r"^[^:]+:[cgnopr]", ], "spdi": [ # SequenceId:Position:DeletionLength:InsertedSequence r"^[^:]+:\d+:(\d+|\w*):\w*" ], "gnomad": [ # 1-55516888-G-GA r"^\d+-\d+-\w*-\w*$", ...
[ 11748, 302, 628, 198, 18982, 62, 260, 25636, 862, 796, 1391, 198, 220, 220, 220, 366, 71, 70, 14259, 1298, 685, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 655, 262, 1895, 295, 290, 15304, 2099, 198, 220, 220, 220, 220, 220, 220...
2.295775
852
#! /usr/bin/env python3 # -*- coding: utf-8 -*- # File : gather.py # Author : Jiayuan Mao # Email : maojiayuan@gmail.com # Date : 02/16/2018 # # This file is part of Jacinle. # Distributed under terms of the MIT license. import time import multiprocessing as mp from jacinle.comm.gather import make_gather_pair fr...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 9220, 220, 220, 1058, 6431, 13, 9078, 198, 2, 6434, 1058, 29380, 323, 7258, 22828, 198, 2, 9570, 220, 1058...
2.582278
158
import math import random import torch import numpy as np from sklearn.metrics import roc_auc_score, average_precision_score from scripts.study_case.ID_4.torch_geometric.utils import to_undirected from ..inits import reset EPS = 1e-15 MAX_LOGVAR = 10 class InnerProductDecoder(torch.nn.Module): r"""The inner p...
[ 11748, 10688, 198, 11748, 4738, 198, 198, 11748, 28034, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 1341, 35720, 13, 4164, 10466, 1330, 686, 66, 62, 14272, 62, 26675, 11, 2811, 62, 3866, 16005, 62, 26675, 198, 6738, 14750, 13, 44517,...
2.166454
4,698
# pylint: disable=invalid-name """Lambda module for learning sqlite3""" import os import sqlite3 ############################################################################### print(f"\n\n" + "#" * 79) print(f"Assignment - Part 1, Querying a Database") print(f"#" * 79 + "\n") ########################################...
[ 2, 279, 2645, 600, 25, 15560, 28, 259, 12102, 12, 3672, 198, 37811, 43, 4131, 6814, 8265, 329, 4673, 44161, 578, 18, 37811, 198, 198, 11748, 28686, 198, 11748, 44161, 578, 18, 198, 198, 29113, 29113, 7804, 4242, 21017, 198, 4798, 7, ...
2.623439
1,041
from django.http import HttpResponse from django.template import RequestContext from django.shortcuts import render_to_response, get_object_or_404 from eventapp.models import Event, Category
[ 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 198, 6738, 42625, 14208, 13, 28243, 1330, 19390, 21947, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 62, 1462, 62, 26209, 11, 651, 62, 15252, 62, 273, 62, 26429, 198, 198,...
3.764706
51
from mimid.api import mock, every, verify, slot, prop from mimid.matchers.value import * from mimid.exceptions import *
[ 6738, 17007, 312, 13, 15042, 1330, 15290, 11, 790, 11, 11767, 11, 10852, 11, 2632, 198, 6738, 17007, 312, 13, 6759, 3533, 13, 8367, 1330, 1635, 198, 6738, 17007, 312, 13, 1069, 11755, 1330, 1635, 198 ]
3.333333
36
import numpy as np import cv2 import matplotlib.pyplot as plt import matplotlib.image as mpimg import pickle from combined_thresh import combined_thresh from perspective_transform import perspective_transform from Line import Line from line_fit import line_fit, tune_fit, final_viz, calc_curve, calc_vehicle_offset, viz2...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 269, 85, 17, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 2603, 29487, 8019, 13, 9060, 355, 29034, 9600, 198, 11748, 2298, 293, 198, 6738, 5929, 62, 400, 3447, 13...
2.416773
2,361
from random import randint
[ 6738, 4738, 1330, 43720, 600, 628 ]
4.666667
6
# Generated by Django 3.1.2 on 2020-10-18 13:27 from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 17, 319, 12131, 12, 940, 12, 1507, 1511, 25, 1983, 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
from django.contrib import admin from django.urls import path, include urlpatterns = [ path('admin/', admin.site.urls), path('exemplo/', include('exemplo.urls')), ]
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 11, 2291, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 3108, 10786, 28482, 14, 3256, 13169, 13, 15654, 13, 6371, 82, 828, 198, ...
2.565217
69
# Created by Egor Kostan. # GitHub: https://github.com/ikostan # LinkedIn: https://www.linkedin.com/in/egor-kostan/ # FUNDAMENTALS ALGORITHMS MATHEMATICS NUMBERS import unittest import allure from utils.log_func import print_log from kyu_8.keep_hydrated.keep_hydrated import litres @allure.epic('8 kyu') @allure.p...
[ 2, 220, 15622, 416, 412, 7053, 509, 455, 272, 13, 198, 2, 220, 21722, 25, 3740, 1378, 12567, 13, 785, 14, 1134, 455, 272, 198, 2, 220, 27133, 25, 3740, 1378, 2503, 13, 25614, 259, 13, 785, 14, 259, 14, 1533, 273, 12, 74, 455, ...
1.998047
1,024
# -*- coding: utf-8 -*- # https://github.com/wenmin-wu/dominant-colors-py __author__ = "wuwenmin1991@gmail.com" import numpy as np # lgtm [py/import-and-import-from] from numpy import linalg as LA from PIL import Image from collections import deque class ColorNode(object): """""" @property @mean.sett...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 3740, 1378, 12567, 13, 785, 14, 21006, 1084, 12, 43812, 14, 3438, 42483, 12, 4033, 669, 12, 9078, 198, 834, 9800, 834, 796, 366, 43812, 21006, 1084, 24529, 31,...
2.241015
1,419
#!/usr/bin/env python import sys import time import json outputList = [] if __name__ == "__main__": filename = sys.argv[1] namesList = open(filename,'r') for line in namesList: processLine(line) output = open('output.json','w') print json.dumps(outputList) output.write(json.dumps(outputList)) # json.du...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 25064, 198, 11748, 640, 198, 11748, 33918, 198, 198, 22915, 8053, 796, 17635, 628, 197, 197, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 197, 34345, ...
2.65873
126
import numpy as np
[ 11748, 299, 32152, 355, 45941 ]
3.6
5
# Print the frequencies with which words occur in a file. The results are # printed with the words in the order that they occur in the file, but a # dictionary is used to keep a count of the words. Counting does not start # until a line starting with '***' has been seen and stops when another # line with '***' is found...
[ 2, 12578, 262, 19998, 351, 543, 2456, 3051, 287, 257, 2393, 13, 383, 2482, 389, 198, 2, 10398, 351, 262, 2456, 287, 262, 1502, 326, 484, 3051, 287, 262, 2393, 11, 475, 257, 198, 2, 22155, 318, 973, 284, 1394, 257, 954, 286, 262, ...
2.391234
616
#!/usr/bin/env python # some python script
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 617, 21015, 4226, 198 ]
3.071429
14
# # Copyright 2021 Splunk 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 law or agreed to in writing, so...
[ 2, 198, 2, 15069, 33448, 13341, 2954, 3457, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198...
2.658505
776
# pip install pytorch-lightning # pip install neptune-client # %% from __future__ import print_function from pytorch_lightning.loggers import WandbLogger from pytorch_lightning.callbacks.progress import ProgressBar from sklearn.model_selection import train_test_split import ast from pytorch_lightning.callbacks.early_st...
[ 2, 7347, 2721, 12972, 13165, 354, 12, 2971, 768, 198, 2, 7347, 2721, 497, 457, 1726, 12, 16366, 198, 2, 43313, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 12972, 13165, 354, 62, 2971, 768, 13, 6404, 5355, 1330, 22...
1.670583
6,639
"""Gathers environment settings and loads them into global attributes.""" from starlette.config import Config from starlette.datastructures import CommaSeparatedStrings, Secret config = Config('.env') # Main Configs DEBUG = config('DEBUG', cast=bool, default=False) TESTING = config('TESTING', cast=bool, default=Fals...
[ 37811, 38, 1032, 82, 2858, 6460, 290, 15989, 606, 656, 3298, 12608, 526, 15931, 198, 6738, 3491, 21348, 13, 11250, 1330, 17056, 198, 6738, 3491, 21348, 13, 19608, 459, 1356, 942, 1330, 1520, 64, 19117, 283, 515, 13290, 654, 11, 3943, ...
2.756098
287
from enum import Enum from typing import Any, Callable, List, Type from specklepy.logging.exceptions import SpeckleException from specklepy.objects.base import Base
[ 6738, 33829, 1330, 2039, 388, 198, 6738, 19720, 1330, 4377, 11, 4889, 540, 11, 7343, 11, 5994, 198, 198, 6738, 693, 694, 293, 9078, 13, 6404, 2667, 13, 1069, 11755, 1330, 2531, 694, 293, 16922, 198, 6738, 693, 694, 293, 9078, 13, 48...
3.4
50
# -*- coding: utf-8 -*- """ Created on Wed Jan 13 19:02:19 2021 @author: Jacob Salminen @version: 1.0.20 """ #%% IMPORTS import os import sys SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) sys.path.append(os.path.dirname(SCRIPT_DIR)) import time import multiprocessing as mp import numpy as np from os.path i...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 3300, 2365, 1511, 678, 25, 2999, 25, 1129, 33448, 198, 198, 31, 9800, 25, 12806, 4849, 1084, 268, 198, 31, 9641, 25, 352, 13, 15, 13, 1238, 1...
2.311688
1,078
#!/usr/bin/python3 # # Copyright (c) 2014-2022 The Voxie Authors # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy,...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 2, 198, 2, 15069, 357, 66, 8, 1946, 12, 1238, 1828, 383, 28035, 494, 46665, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, ...
2.36452
2,779
import main import configuracion as conf import filtrosQuery as fq import tkinter as tk from tkinter import ttk from tkinter import font from tkinter import messagebox from PIL import Image from PIL import ImageTk import pruebas import repoBD import executeQuery import datetime app = tk.Tk() app.title("BuscadorGitHubR...
[ 11748, 1388, 198, 11748, 4566, 333, 49443, 355, 1013, 198, 11748, 1226, 83, 4951, 20746, 355, 277, 80, 198, 11748, 256, 74, 3849, 355, 256, 74, 198, 6738, 256, 74, 3849, 1330, 256, 30488, 198, 6738, 256, 74, 3849, 1330, 10369, 198, ...
2.299877
5,679
rooms = { 'entrance_r' : {'desc': 'You are in the entrance to a huge cave system. The way you entered has collapsed behind you.', 'passages': {'north': 'passage_r'}, 'occupants': True, 'hostile': False, 'tag': 'entrance_r'}, 'passage_r' : {'desc': 'This is a long low north-south passage', 'passages': {'south': '...
[ 9649, 796, 1391, 220, 220, 220, 705, 298, 8132, 62, 81, 6, 1058, 1391, 6, 20147, 10354, 705, 1639, 389, 287, 262, 10384, 284, 257, 3236, 11527, 1080, 13, 383, 835, 345, 5982, 468, 14707, 2157, 345, 2637, 11, 705, 6603, 1095, 10354, ...
2.873969
849
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # 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 applicab...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 12131, 383, 3012, 4992, 46665, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, ...
2.898773
978
from django.urls import path from . import views from .views import ( BookmarkChecklistListView, CategoryChecklistListView, ChecklistCreateView, ChecklistDeleteView, ChecklistDetailView, ChecklistListView, ChecklistUpdateView, CommentDeleteView, CommentUpdateView, ItemCreateView...
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 198, 6738, 764, 1330, 5009, 198, 6738, 764, 33571, 1330, 357, 198, 220, 220, 220, 4897, 4102, 9787, 4868, 8053, 7680, 11, 198, 220, 220, 220, 21743, 9787, 4868, 8053, 7680, 11, 198, ...
2.125628
1,592
from .es_utils import * from tqdm import tqdm from config import * from dataloader.utils import * import argparse import json import ipdb '''Generate the BM25 gray candidates: Make sure the q-q BM25 index has been built ''' if __name__ == '__main__': args = vars(parser_args()) bsz = args['batch_size'] a...
[ 6738, 764, 274, 62, 26791, 1330, 1635, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 6738, 4566, 1330, 1635, 198, 6738, 4818, 282, 1170, 263, 13, 26791, 1330, 1635, 198, 11748, 1822, 29572, 198, 11748, 33918, 198, 11748, 20966, ...
2.221888
996
import datetime from django.conf import settings from django.contrib.contenttypes.models import ContentType from django import get_version from distutils.version import StrictVersion if StrictVersion(get_version()) >= StrictVersion('1.8.0'): from django.contrib.contenttypes.fields import GenericForeignKey else: ...
[ 11748, 4818, 8079, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 11299, 19199, 13, 27530, 1330, 14041, 6030, 198, 198, 6738, 42625, 14208, 1330, 651, 62, 9641, 198, 6738, 1233, 26791, 13, 96...
2.703961
1,868
from .tables import DynamoDbTables from .lock import DynamoDbLocks
[ 6738, 764, 83, 2977, 1330, 41542, 43832, 51, 2977, 198, 6738, 764, 5354, 1330, 41542, 43832, 43, 3320, 198 ]
3.526316
19
#!/usr/bin/env python import mirheo as mir dt = 0.001 ranks = (1, 1, 1) domain = (16, 16, 16) u = mir.Mirheo(ranks, domain, dt, debug_level=3, log_filename='log') pv = mir.ParticleVectors.ParticleVector('pv', mass = 1) ic = mir.InitialConditions.Uniform(number_density=3) u.registerParticleVector(pv, ic) rc = 1.0...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 5720, 258, 78, 355, 5720, 198, 198, 28664, 796, 657, 13, 8298, 198, 198, 81, 2283, 220, 796, 357, 16, 11, 352, 11, 352, 8, 198, 27830, 796, 357, 1433, 11, 1467, 11, 1...
2.258581
437
import unittest import re from pyld import jsonld import requests from unittest.mock import patch from hydra_python_core import doc_maker, doc_writer from samples import doc_writer_sample_output class TestCreateClass(unittest.TestCase): """ Test Class for create_class method """ @patch('hydra_py...
[ 11748, 555, 715, 395, 198, 11748, 302, 198, 6738, 12972, 335, 1330, 33918, 335, 198, 11748, 7007, 198, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 8529, 198, 6738, 25039, 62, 29412, 62, 7295, 1330, 2205, 62, 10297, 11, 2205, 62, 16...
1.695212
8,688
import torch import torch.nn as nn import torch.nn.functional as F if __name__ == '__main__': x_down = torch.randn((1, 128, 56, 56)) x_enc = torch.randn((1, 64, 111, 111)) upconcat = UpConcat2d(in_channels_conv=128, out_channels_conv=64) y = upconcat(x_down, x_enc) print(y.shape)
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 2124, 62, 2902, 796, 28034, 13, ...
2.251852
135
import tkinter as tk from tkinter import ttk from tkinter.font import Font root = tk.Tk() # definindo a fonte grandeFonte = Font( family='Helvetica', size=42, weight='bold', slant='roman', underline=0, overstrike=0 ) bt1 = ttk.Button(root, text='grande botao', font=grandeFonte) bt1.pack(pady=2...
[ 11748, 256, 74, 3849, 355, 256, 74, 198, 6738, 256, 74, 3849, 1330, 256, 30488, 198, 6738, 256, 74, 3849, 13, 10331, 1330, 24060, 198, 198, 15763, 796, 256, 74, 13, 51, 74, 3419, 198, 2, 2730, 521, 78, 257, 277, 38599, 198, 198, ...
2.266667
180
import re import sublime import sublime_plugin from Default.comment import build_comment_data from .consts import PANEL_NAME from .persist import HIGHLIGHTED_REGIONS
[ 11748, 302, 198, 11748, 41674, 198, 11748, 41674, 62, 33803, 198, 198, 6738, 15161, 13, 23893, 1330, 1382, 62, 23893, 62, 7890, 198, 198, 6738, 764, 1102, 6448, 1330, 40468, 3698, 62, 20608, 198, 6738, 764, 19276, 396, 1330, 367, 3528, ...
3.411765
51
import os from configparser import ConfigParser def list_submodules(source_dir): """Looks for a .gitmodules in `source_dir` or its parents. If it finds one, it reads it and returns a set of dirs to submodules. dirs are absolutes""" gitmodules_path = _find_gitmodules(source_dir) if not gitmodules_pa...
[ 11748, 28686, 198, 198, 6738, 4566, 48610, 1330, 17056, 46677, 628, 198, 198, 4299, 1351, 62, 7266, 18170, 7, 10459, 62, 15908, 2599, 198, 220, 220, 220, 37227, 41102, 329, 257, 764, 18300, 18170, 287, 4600, 10459, 62, 15908, 63, 393, ...
2.531561
301
#!/usr/bin/env python """ Test authenticator endpoints, depends on keystone """ from keystone_authenticator import BearerAuth from json import dumps import os def test_login(client, app): """ should respond with ok and user """ _development_login(client, app) def test_logout(client): """ s...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 198, 14402, 16425, 1352, 886, 13033, 11, 8338, 319, 1994, 6440, 198, 37811, 198, 6738, 1994, 6440, 62, 41299, 26407, 1330, 1355, 11258, 30515, 198, 6738, 33918, 1330, 45514, 198, ...
2.5
286
#!/env/bin/python # -*- coding: utf-8 -*- from django.apps import AppConfig
[ 2, 48443, 24330, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934 ]
2.5
30
from django.contrib import admin from .models import Brand, Product, Profile, Instagram, OrderItem,Order from django.utils.html import format_html # Register your models here. make_published.short_description = "Mark selected stories as published" admin.site.register(Brand,BrandAdmin) admin.site.register(Pr...
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 764, 27530, 1330, 13512, 11, 8721, 11, 13118, 11, 10767, 11, 8284, 7449, 11, 18743, 198, 6738, 42625, 14208, 13, 26791, 13, 6494, 1330, 5794, 62, 6494, 198, 2, 17296, 534, 498...
3.445946
148
# 2020 Alessio Gerace @ Inrim import os import importlib import importlib.util import json from datetime import datetime import logging import base64 from typing import Union import ipaddress as ipaddr import requests import re logger = logging.getLogger() alert_base = { "succcess": { "alert_type": "succe...
[ 2, 12131, 47319, 952, 13573, 558, 2488, 554, 3036, 198, 11748, 28686, 198, 11748, 1330, 8019, 198, 11748, 1330, 8019, 13, 22602, 198, 11748, 33918, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 18931, 198, 11748, 2779, 2414, 198, ...
2.148957
2,061
X = 1 CONTADOR = 0 CONTADOR2 = 0 while True: X = int(input()) CONTADOR = 0 CONTADOR2 = 0 if X == 0: break while CONTADOR2 != 5: if X % 2 == 0: CONTADOR += X CONTADOR2 += 1 X += 1 else: X += 1 print(CONTADOR)
[ 55, 796, 352, 198, 37815, 2885, 1581, 796, 657, 198, 37815, 2885, 1581, 17, 796, 657, 198, 4514, 6407, 25, 198, 220, 220, 220, 1395, 796, 493, 7, 15414, 28955, 198, 220, 220, 220, 22904, 2885, 1581, 796, 657, 198, 220, 220, 220, 2...
1.688889
180
from setuptools import setup setup( name="ProtoC Python Typing generator plugin", version="0.2", install_requires=['protobuf'], scripts=['protoc-gen-python_grpc_typings', 'protoc-gen-python_typings'], packages=['stubs_generator'], # metadata for upload to PyPI author="Miroslav Cibulka", ...
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 2625, 2964, 1462, 34, 11361, 17134, 278, 17301, 13877, 1600, 198, 220, 220, 220, 2196, 2625, 15, 13, 17, 1600, 628, 220, 220, 220, 2721, 62, 47911, 2...
2.662722
338
from __future__ import print_function, absolute_import, division #makes KratosMultiphysics backward compatible with python 2.6 and 2.7 # -*- coding: utf-8 -*- # importing the Kratos Library from KratosMultiphysics import * from KratosMultiphysics.IncompressibleFluidApplication import * import edgebased_eulerian_solver ...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 11, 4112, 62, 11748, 11, 7297, 1303, 49123, 509, 10366, 418, 15205, 13323, 23154, 19528, 11670, 351, 21015, 362, 13, 21, 290, 362, 13, 22, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, ...
3.336634
101
"""Forms for our demo Flask app.""" from flask_wtf import FlaskForm from wtforms import StringField, FloatField, DateField, IntegerField from wtforms.validators import InputRequired, Optional, Email, URL, ValidationError # https://wtforms.readthedocs.io/en/3.0.x/validators/#built-in-validators class AddPetForm(Fla...
[ 37811, 8479, 82, 329, 674, 13605, 46947, 598, 526, 15931, 198, 198, 6738, 42903, 62, 86, 27110, 1330, 46947, 8479, 198, 6738, 266, 83, 23914, 1330, 10903, 15878, 11, 48436, 15878, 11, 7536, 15878, 11, 34142, 15878, 198, 6738, 266, 83, ...
3.234807
362
""" OSGAR ArtifactDetectorDNN wrapper for DNN detector """ import os.path from io import StringIO import cv2 import numpy as np from subt.tf_detector import CvDetector try: import torch import subt.artf_model from subt.artf_detector import Detector except ImportError: print('\nWarning: missing torch!...
[ 37811, 198, 220, 7294, 38, 1503, 45908, 11242, 9250, 35, 6144, 29908, 329, 360, 6144, 31029, 198, 37811, 198, 11748, 28686, 13, 6978, 198, 6738, 33245, 1330, 10903, 9399, 198, 198, 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941,...
2.40324
2,284
import subprocess import yaml from m2g.utils.gen_utils import run def make_dataconfig(input_dir, sub, ses, anat, func, acquisition='alt+z', tr=2.0): """Generates the data_config file needed by cpac Arguments: input_dir {str} -- Path of directory containing input files sub {int} -- subject ...
[ 11748, 850, 14681, 198, 11748, 331, 43695, 198, 6738, 285, 17, 70, 13, 26791, 13, 5235, 62, 26791, 1330, 1057, 198, 198, 4299, 787, 62, 19608, 7807, 5647, 7, 15414, 62, 15908, 11, 850, 11, 264, 274, 11, 20076, 11, 25439, 11, 12673, ...
2.308463
898
""" optimize.ga.chromosome ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Implements class for manage chromosome. :copyright: Hwang.S.J. :license: MIT LICENSE 1.0 . """ from .gene import Gene
[ 37811, 198, 197, 40085, 1096, 13, 4908, 13, 28663, 418, 462, 198, 197, 27156, 27156, 15116, 93, 198, 197, 3546, 1154, 902, 1398, 329, 6687, 34348, 13, 198, 197, 25, 22163, 4766, 25, 367, 47562, 13, 50, 13, 41, 13, 198, 197, 25, 43...
3.079365
63
# Karolina Szafran-Belzowska, 2019/04/25 # Iris flower data analysis # fourth column (petal width) import csv with open('irisdata_project_2019.csv') as data: readCSV = csv.reader(data, delimiter=',') for row in readCSV: print(row[3])
[ 2, 9375, 47196, 27974, 1878, 2596, 12, 12193, 89, 1666, 4914, 11, 13130, 14, 3023, 14, 1495, 198, 2, 34230, 15061, 1366, 3781, 198, 198, 2, 5544, 5721, 357, 6449, 282, 9647, 8, 198, 198, 11748, 269, 21370, 198, 4480, 1280, 10786, 29...
2.447619
105
# <auto-generated> # This code was generated by the UnitCodeGenerator tool # # Changes to this file will be lost if the code is regenerated # </auto-generated>
[ 2, 1279, 23736, 12, 27568, 29, 198, 2, 770, 2438, 373, 7560, 416, 262, 11801, 10669, 8645, 1352, 2891, 198, 2, 198, 2, 19179, 284, 428, 2393, 481, 307, 2626, 611, 262, 2438, 318, 16935, 515, 198, 2, 7359, 23736, 12, 27568, 29, 628...
3.659091
44
#!/usr/local/bin/python2.7 #GUI for the Chat Project program #We're using Tkinter module from Tkinter import * import tkMessageBox #Module used for system info boxes #Our App will be class based so: root = Tk() c= Chat(root) #Size and Name of the main window nomFinestra = 'EiFC Xat' root.title(nomFinestra) root....
[ 2, 48443, 14629, 14, 12001, 14, 8800, 14, 29412, 17, 13, 22, 198, 198, 2, 40156, 329, 262, 24101, 4935, 1430, 198, 2, 1135, 821, 1262, 309, 74, 3849, 8265, 198, 198, 6738, 309, 74, 3849, 1330, 1635, 198, 11748, 256, 74, 12837, 142...
2.751724
145
#END FUNCTIONS m = "CHECKUNDERTHEFLOORBOARD" c = railFenceCipher(m, 2) #Choose a key print("--Begin Encryption--") for k in range(2, 11): print("Key %s: %s" % (k, railFenceCipher(m, k))) print("--End Encryption--\n") print("--Begin Decryption--") for k in range(2, 11): print("Key %s: %s" % (k, railFenceCipher(...
[ 2, 10619, 29397, 4177, 11053, 220, 220, 198, 198, 76, 796, 366, 50084, 4944, 14418, 10970, 3697, 46, 1581, 8202, 9795, 1, 198, 66, 796, 6787, 37, 594, 34, 10803, 7, 76, 11, 362, 8, 1303, 31851, 257, 1994, 198, 198, 4798, 7203, 438...
2.381579
152
FORMAT_TMPL = '{time} {title} {tags}'
[ 628, 198, 21389, 1404, 62, 15972, 6489, 796, 705, 90, 2435, 92, 1391, 7839, 92, 1391, 31499, 92, 6, 628, 628 ]
2.095238
21
# -*- coding: utf-8 -*- from util.mail.sender import Sender from os.path import getsize
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 7736, 13, 4529, 13, 82, 2194, 1330, 311, 2194, 198, 6738, 28686, 13, 6978, 1330, 3011, 1096 ]
2.666667
33
# NOTE: If you are running a local test environment, settings_dev will already have sensible defaults for many of these. # Only override the ones you need to, so you're less likely to have to make manual settings updates after pulling in changes. # Choose one of these: # from .deployments.settings_dev import * # from ...
[ 2, 24550, 25, 1002, 345, 389, 2491, 257, 1957, 1332, 2858, 11, 6460, 62, 7959, 481, 1541, 423, 20586, 26235, 329, 867, 286, 777, 13, 198, 2, 5514, 20957, 262, 3392, 345, 761, 284, 11, 523, 345, 821, 1342, 1884, 284, 423, 284, 787,...
3.093023
688
import time import traceback from pathlib import Path from secrets import token_bytes from typing import Dict, Optional, Tuple, List, Any import logging from blspy import AugSchemeMPL, G2Element from src.types.coin import Coin from src.types.coin_solution import CoinSolution from src.types.program import Program from...
[ 11748, 640, 198, 11748, 12854, 1891, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 13141, 1330, 11241, 62, 33661, 198, 6738, 19720, 1330, 360, 713, 11, 32233, 11, 309, 29291, 11, 7343, 11, 4377, 198, 11748, 18931, 198, 198, 6738, 698, ...
3.34
350
""" Component that will perform facial recognition via deepstack. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/image_processing.deepstack_face """ import io import logging import re import time from pathlib import Path import requests from PIL import ...
[ 37811, 198, 21950, 326, 481, 1620, 16324, 9465, 2884, 2769, 25558, 13, 198, 198, 1890, 517, 3307, 546, 428, 3859, 11, 3387, 3522, 284, 262, 10314, 379, 198, 5450, 1378, 11195, 12, 562, 10167, 13, 952, 14, 5589, 3906, 14, 9060, 62, 3...
2.124139
5,518
# -*- coding: utf-8 -*- """ Created on Tue Jun 5 07:35:15 2018 @author: Ray Justin O. Huang """ import numpy as np import pandas as pd from sklearn.base import BaseEstimator, TransformerMixin import string # PerColumnAttributesAdder # Used to quickly add columns that are fractions of other columns # StringCaseCh...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 30030, 7653, 220, 642, 8753, 25, 2327, 25, 1314, 2864, 198, 198, 31, 9800, 25, 7760, 10799, 440, 13, 31663, 198, 37811, 198, 11748, 299, 32152, ...
3.125581
215
X = int(input()) five_hundread_yen_coin_num = X // 500 five_yen_coin_num = X % 500 // 5 print(five_hundread_yen_coin_num * 1000 + five_yen_coin_num * 5)
[ 55, 796, 493, 7, 15414, 28955, 198, 13261, 62, 71, 917, 961, 62, 88, 268, 62, 3630, 62, 22510, 796, 1395, 3373, 5323, 198, 13261, 62, 88, 268, 62, 3630, 62, 22510, 796, 1395, 4064, 5323, 3373, 642, 198, 198, 4798, 7, 13261, 62, ...
2.25
68
from django.shortcuts import render from rest_framework.decorators import api_view from rest_framework.response import Response from .serializers import LanguageListSerializer, LanguageActionSerializer from rest_framework import status @api_view(['GET', 'POST', 'DELETE']) @api_view(['PUT', 'PATCH', 'DELETE'])
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 1334, 62, 30604, 13, 12501, 273, 2024, 1330, 40391, 62, 1177, 198, 6738, 1334, 62, 30604, 13, 26209, 1330, 18261, 198, 6738, 764, 46911, 11341, 1330, 15417, 8053, 32634, 7509, ...
3.413043
92
from parlai.agents.programr.parser.template.nodes.base import TemplateNode # from parlai.agents.programr.utils.logging.ylogger import YLogger import parlai.utils.logging as logging ####################################################################################################### # <formal>ABC</formal>
[ 6738, 1582, 75, 1872, 13, 49638, 13, 23065, 81, 13, 48610, 13, 28243, 13, 77, 4147, 13, 8692, 1330, 37350, 19667, 198, 2, 422, 1582, 75, 1872, 13, 49638, 13, 23065, 81, 13, 26791, 13, 6404, 2667, 13, 2645, 519, 1362, 1330, 575, 11...
3.865854
82
import mysql.connector import Admin import lib_users lib_database = mysql.connector.connect( host="localhost", user="root", password="PRA085@dik", #Use your server password. database='library_management_system', ) ##creating tables.. ''' my_cursor = lib_database.cursor() # 1: Books (columns:- [author +...
[ 11748, 48761, 13, 8443, 273, 198, 11748, 32053, 198, 11748, 9195, 62, 18417, 198, 198, 8019, 62, 48806, 796, 48761, 13, 8443, 273, 13, 8443, 7, 198, 220, 220, 220, 2583, 2625, 36750, 1600, 198, 220, 220, 220, 2836, 2625, 15763, 1600, ...
2.155917
1,783
""" Author: Trevor Stalnaker File: menu.py A general class for creating menus Parameters: pos - (x,y) position for the top-left corner of the menu dims - (width, height) pixels of the menu commands - list of dictionaries specifying the button attributes padding - (horizontal, vertical) padding between...
[ 37811, 198, 13838, 25, 25389, 520, 282, 77, 3110, 198, 8979, 25, 6859, 13, 9078, 198, 198, 32, 2276, 1398, 329, 4441, 26798, 198, 198, 48944, 25, 198, 220, 220, 220, 1426, 532, 357, 87, 11, 88, 8, 2292, 329, 262, 1353, 12, 9464, ...
3.511013
227
#!/usr/bin/env python import argparse import torch def get_ctranslate2_model_spec(opt): """Creates a CTranslate2 model specification from the model options.""" is_vanilla_transformer = ( opt.encoder_type == "transformer" and opt.decoder_type == "transformer" and opt.position_encoding ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 1822, 29572, 198, 11748, 28034, 628, 198, 4299, 651, 62, 24087, 504, 17660, 17, 62, 19849, 62, 16684, 7, 8738, 2599, 198, 220, 220, 220, 37227, 16719, 274, 257, 327, 8291, 17660...
2.424749
299
import torch import torch.nn as nn import torch.nn.functional as F
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 628 ]
3.4
20
""" 2.定义一个北京欢乐谷门票类,应用你所定义的类, 计算两个社会青年和一个学生平日比节假日门票能省多少钱 票价是: 除节假日票价100元/天 节假日为平日的1.2倍 学生半价 """ societyman = False student = True m = Ticket(societyman) m1 = m.myprice() s = Ticket(student) s1 = s.myprice() print("欢乐谷一个学生平日比节假日门票能节省{}元".format(s1)) print("欢乐谷一个社会青年平日比节假日门票能节省{}元".format(m1))
[ 37811, 198, 17, 13, 22522, 248, 20046, 231, 31660, 10310, 103, 44293, 245, 12859, 105, 162, 105, 95, 20046, 238, 164, 108, 115, 29785, 101, 163, 98, 101, 163, 109, 119, 11, 41753, 242, 18796, 101, 19526, 254, 33699, 222, 22522, 248, ...
0.902941
340
import unittest from pthat.pthat import PTHat if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 6738, 279, 5562, 13, 79, 5562, 1330, 350, 4221, 265, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3419, 198 ]
2.461538
39
import csv while True: print() print('1) Guardar nuevo producto') print('2) Consultar Productos') print('3) Stock Productos') print('4) Consultar Proveedores') print('5) Compra a Proveedores') print('6) Venta al cliente') print('7) Consultar Transacciones') print('8) Sa...
[ 11748, 269, 21370, 201, 198, 201, 198, 4514, 6407, 25, 201, 198, 201, 198, 220, 220, 220, 3601, 3419, 201, 198, 220, 220, 220, 3601, 10786, 16, 8, 4932, 283, 299, 518, 13038, 1720, 78, 11537, 201, 198, 220, 220, 220, 3601, 10786, ...
1.665801
4,620
from __future__ import annotations import inspect from functools import partial from typing import TYPE_CHECKING if TYPE_CHECKING: from typing import Any, Callable, List class UnboundFailureMode: """Failure mode of a trigger not bound to a trigger instance. """ @property @property def desc...
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 11748, 10104, 198, 6738, 1257, 310, 10141, 1330, 13027, 198, 6738, 19720, 1330, 41876, 62, 50084, 2751, 198, 198, 361, 41876, 62, 50084, 2751, 25, 198, 220, 220, 220, 422, 19720, 1330, 437...
2.871324
544
mystuff = {"key1":"value1", "key2":"value2"} print(mystuff['key1']) mystuff2 = {"key1":123, "key2":"value2", "key3":{'123':[1,2,3]}} print(mystuff2) mystuff3 = {"key1":123, "key2":"value2", "key3":{'123':[1,2, 'grabMe']}} print(mystuff3 ['key3']['123'][2]) mystuff4 = {"key1":123, "key2":"value2", "key3":{'123':[1,2,...
[ 1820, 41094, 796, 19779, 2539, 16, 2404, 8367, 16, 1600, 366, 2539, 17, 2404, 8367, 17, 20662, 198, 4798, 7, 1820, 41094, 17816, 2539, 16, 6, 12962, 198, 198, 1820, 41094, 17, 796, 19779, 2539, 16, 1298, 10163, 11, 366, 2539, 17, 24...
2.135246
244