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/env python """Term checker helper.""" import logging class TermChecker(object): """Term Checker""" def __init__(self, server_messenger): """Initialize the termchecker.""" self.server_messenger = server_messenger self.current_terms = [] self.current_terms_set = se...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 40596, 2198, 263, 31904, 526, 15931, 198, 198, 11748, 18931, 628, 198, 4871, 35118, 9787, 263, 7, 15252, 2599, 628, 220, 220, 220, 37227, 40596, 6822, 263, 37811, 628, 220, 220, ...
2.329146
796
""" Read file into texts and calls. It's ok if you don't understand how to read files """ import csv with open('texts.csv', 'r') as f: reader = csv.reader(f) texts = list(reader) with open('calls.csv', 'r') as f: reader = csv.reader(f) calls = list(reader) """ TASK 2: Which telephone number spent the ...
[ 37811, 198, 5569, 2393, 656, 13399, 290, 3848, 13, 198, 1026, 338, 12876, 611, 345, 836, 470, 1833, 703, 284, 1100, 3696, 198, 37811, 198, 11748, 269, 21370, 198, 4480, 1280, 10786, 5239, 82, 13, 40664, 3256, 705, 81, 11537, 355, 277,...
3.231579
285
# pylint: disable=W0613, W0212 # Copyright (C) 2018 The Android Open Source Project # # 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 ...
[ 2, 279, 2645, 600, 25, 15560, 28, 54, 3312, 1485, 11, 370, 2999, 1065, 198, 198, 2, 15069, 357, 34, 8, 2864, 383, 5565, 4946, 8090, 4935, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 341...
3.091262
515
from manual_functions import add_player, start_new_season, delete_all, delete_one_player from get_data import get_clan_members from connect_db import db if __name__ == "__main__": main()
[ 6738, 10107, 62, 12543, 2733, 1330, 751, 62, 7829, 11, 923, 62, 3605, 62, 6230, 11, 12233, 62, 439, 11, 12233, 62, 505, 62, 7829, 198, 6738, 651, 62, 7890, 1330, 651, 62, 565, 272, 62, 30814, 198, 6738, 2018, 62, 9945, 1330, 20613...
3.063492
63
import inspect import functools import warnings import time import contextlib import mlflow from mlflow.utils import gorilla from mlflow.entities import Metric from mlflow.tracking.client import MlflowClient from mlflow.utils.validation import MAX_METRICS_PER_BATCH INPUT_EXAMPLE_SAMPLE_ROWS = 5 ENSURE_AUTOLOGGING_EN...
[ 11748, 10104, 198, 11748, 1257, 310, 10141, 198, 11748, 14601, 198, 11748, 640, 198, 11748, 4732, 8019, 198, 198, 11748, 285, 1652, 9319, 198, 6738, 285, 1652, 9319, 13, 26791, 1330, 45314, 198, 6738, 285, 1652, 9319, 13, 298, 871, 1330...
2.847656
2,560
#!/usr/bin/env python """ Convert Quantum Espresso output to fitpot data. Usage: espresso_in.py [options] FILE Options: -h, --help Show this message and help. --specorder=SPECORDER Specify the order of species needed to convert to pos. [default: Al,Mg,Si] """ from __future__ import print_functio...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 198, 3103, 1851, 29082, 20386, 33852, 5072, 284, 4197, 13059, 1366, 13, 198, 198, 28350, 25, 198, 220, 48247, 62, 259, 13, 9078, 685, 25811, 60, 45811, 198, 198, 29046, 25, 198,...
2.120859
1,117
import six import socket import struct import sys import time import json from six.moves.queue import Queue, Empty from collections import deque import threading from datetime import datetime, timedelta now = datetime.now multicast_group = '225.3.14.15' multicast_port = 10083 class MultiCastSender( threading.Thread ...
[ 11748, 2237, 198, 11748, 17802, 198, 11748, 2878, 198, 11748, 25064, 198, 11748, 640, 198, 11748, 33918, 198, 6738, 2237, 13, 76, 5241, 13, 36560, 1330, 4670, 518, 11, 33523, 198, 6738, 17268, 1330, 390, 4188, 198, 11748, 4704, 278, 198...
2.852941
374
from .. import location_handling import h5pyd import numpy as np def test_get_loc(): ''' This function tests the get_loc(city, state) function to make sure the output is a tuple containing floats and that the output matches the working state output of inputs 'Salem' and 'OR'. ''' test = locati...
[ 6738, 11485, 1330, 4067, 62, 4993, 1359, 198, 11748, 289, 20, 79, 5173, 198, 11748, 299, 32152, 355, 45941, 628, 198, 4299, 1332, 62, 1136, 62, 17946, 33529, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 770, 2163, 5254, 262, 6...
2.589136
718
# Copyright Contributors to the Pyro project. # SPDX-License-Identifier: Apache-2.0 import functools from collections import OrderedDict from funsor.cnf import Contraction from funsor.delta import Delta from funsor.gaussian import Gaussian from funsor.integrate import Integrate from funsor.interpretations import Stat...
[ 2, 15069, 25767, 669, 284, 262, 44954, 1628, 13, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 198, 198, 11748, 1257, 310, 10141, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 198, 6738, 1257, 82, ...
2.937132
509
for vals in iter_cross([xrange(3), xrange(2)]): print vals
[ 198, 1640, 410, 874, 287, 11629, 62, 19692, 26933, 87, 9521, 7, 18, 828, 2124, 9521, 7, 17, 15437, 2599, 198, 220, 220, 220, 3601, 410, 874, 198 ]
2.285714
28
#!/usr/bin/env python import sys sys.path.append('..') from pyswmap import MapCalc # This script prints out the PSID for any given port and BMR. # Syntax is as follows: # ./port2psid.py [port number] # Define MAP domain characteristics. The values may be changed to suite # a alternate MAP domain configurations. ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 25064, 198, 17597, 13, 6978, 13, 33295, 10786, 492, 11537, 198, 198, 6738, 279, 893, 86, 8899, 1330, 9347, 9771, 66, 198, 198, 2, 770, 4226, 20842, 503, 262, 6599, 2389, 329, ...
2.37276
279
file_name = 'testo.txt' # load opening and closing resource by hand f = open(file_name, 'r') content = f.read() f.close() print(content) # load all lines in a single string with open(file_name, 'r') as f: content = f.read() print(content) # load all lines as a list content = [] with open(file_name, 'r') as f: ...
[ 198, 7753, 62, 3672, 796, 705, 9288, 78, 13, 14116, 6, 198, 198, 2, 3440, 4756, 290, 9605, 8271, 416, 1021, 198, 69, 796, 1280, 7, 7753, 62, 3672, 11, 705, 81, 11537, 198, 11299, 796, 277, 13, 961, 3419, 198, 69, 13, 19836, 3419...
2.592453
265
from collections import defaultdict from dataclasses import dataclass from itertools import cycle from typing import List NORTH = '^' SOUTH = 'v' EAST = '>' WEST = '<' DIRECTIONS = (NORTH, SOUTH, EAST, WEST) DIR_NAMES = {NORTH: 'NORTH', WEST: 'WEST', SOUTH: 'SOUTH', EAST: 'EAST'} LEFT = {NORTH: WEST, WEST: SOUTH, SOUT...
[ 6738, 17268, 1330, 4277, 11600, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 6738, 340, 861, 10141, 1330, 6772, 198, 6738, 19720, 1330, 7343, 198, 198, 35510, 4221, 796, 705, 61, 6, 198, 50, 2606, 4221, 796, 705, 85, 6, ...
2.183775
604
from flask import render_template from .request import get_news from app import app # @app.route('/') # def index(): # popular_news = get_news('popular') # print(popular_news) # title = 'Home - Welcome to The best News Preview Website Online' # return render_template('index.html', title = title,popula...
[ 6738, 42903, 1330, 8543, 62, 28243, 198, 6738, 764, 25927, 1330, 651, 62, 10827, 198, 6738, 598, 1330, 598, 198, 198, 2, 2488, 1324, 13, 38629, 10786, 14, 11537, 198, 2, 825, 6376, 33529, 198, 198, 2, 220, 220, 220, 220, 2968, 62, ...
3.09589
219
import os from glob import glob import numpy as np from batchlib.util import open_file, read_table determine_igm_mad('/g/kreshuk/data/covid/_')
[ 11748, 28686, 198, 6738, 15095, 1330, 15095, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 15458, 8019, 13, 22602, 1330, 1280, 62, 7753, 11, 1100, 62, 11487, 628, 198, 198, 67, 2357, 3810, 62, 17225, 62, 9937, 10786, 14, 70, 14,...
2.740741
54
def get_true_times(obs_times_hash, variable): """ Get the timepoints where the variable is true in the form of a dictionary. Parameters: obs_times_hash: the dictionary containing all observations by variable as a tuple (case, time). variable: the system state to look for. Returns: ...
[ 4299, 651, 62, 7942, 62, 22355, 7, 8158, 62, 22355, 62, 17831, 11, 7885, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 3497, 262, 640, 13033, 810, 262, 7885, 318, 2081, 287, 262, 1296, 286, 257, 22155, 13, 628, 220, 220, 22...
2.434424
3,271
#!/usr/bin/env python3 # -*- coding:utf-8 -*- """ curses -- Terminal hamdling for character-cell displays """ import curses from random import randint class SnakeGame: """Snake Game by Python Language""" def start(self): """Game Start""" self.snake_init() self.generate_food() ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 37811, 198, 66, 46998, 1377, 24523, 8891, 67, 1359, 329, 2095, 12, 3846, 11298, 198, 37811, 198, 11748, 43878, 198, 67...
2.256579
456
import ctypes _cudart = ctypes.CDLL('libcudart.so')
[ 11748, 269, 19199, 198, 198, 62, 66, 463, 433, 796, 269, 19199, 13, 8610, 3069, 10786, 8019, 66, 463, 433, 13, 568, 11537, 628, 198 ]
2.2
25
# -*- coding: utf-8 -*- """ @author: Jonathan Massey @description: Compute the PCA of a flow field @contact: jmom1n15@soton.ac.uk """ from torch import pca_lowrank
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 31, 9800, 25, 11232, 11066, 4397, 198, 31, 11213, 25, 3082, 1133, 262, 4217, 32, 286, 257, 5202, 2214, 198, 31, 32057, 25, 474, 32542, 16, 77, 1314, 31, ...
2.59375
64
print("Before modification:") obj1 = SomeClass('4', .5, 'Me') obj1.showSomeVal() print(" Run class method from the instance") print("After:") obj1.someVal = 4 #will remain in instance obj1.set_someVal(40) obj1.showSomeVal() print(" Run class methon on the class") obj2 = SomeClass('4', .5, 'Me') obj1.someVal = 4...
[ 198, 198, 4798, 7203, 8421, 17613, 25, 4943, 198, 26801, 16, 796, 2773, 9487, 10786, 19, 3256, 764, 20, 11, 705, 5308, 11537, 198, 26801, 16, 13, 12860, 4366, 7762, 3419, 198, 4798, 7203, 220, 220, 5660, 1398, 2446, 422, 262, 4554, ...
2.876238
202
import asyncio import functools from typing import Optional, Callable, Awaitable from urllib.parse import quote from aiohttp import web from dazzler.system import UNDEFINED from ._middleware import Middleware from ._page import Page class User: """ Base user of the dazzler auth system. """ username:...
[ 11748, 30351, 952, 198, 11748, 1257, 310, 10141, 198, 6738, 19720, 1330, 32233, 11, 4889, 540, 11, 5851, 4548, 540, 198, 6738, 2956, 297, 571, 13, 29572, 1330, 9577, 198, 6738, 257, 952, 4023, 1330, 3992, 198, 198, 6738, 32282, 1754, ...
2.523653
1,522
# -*- coding: utf-8 -*- from typing import AsyncIterator, List, Union from related import IntegerField, SequenceField, StringField, immutable from .._api_helper import FilterType from .._endpoints import DATA_ADDRESSBOOK from ..model import Serializable @immutable class Role(Serializable): """A role of addresse...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 19720, 1330, 1081, 13361, 37787, 11, 7343, 11, 4479, 198, 198, 6738, 3519, 1330, 34142, 15878, 11, 45835, 15878, 11, 10903, 15878, 11, 40139, 198, 198, 6738, 11485, ...
2.726073
909
from sklearn.metrics import f1_score from sklearn.metrics import jaccard_score from sklearn.metrics import accuracy_score from sklearn.neighbors import NearestNeighbors import numpy as np def _nearestneighbors(*, train, test, x_predict=None, metrics, n_neighbors=5, radius=1.0, algorithm='auto', leaf_size=30, metric=...
[ 6738, 1341, 35720, 13, 4164, 10466, 1330, 277, 16, 62, 26675, 198, 6738, 1341, 35720, 13, 4164, 10466, 1330, 474, 4134, 446, 62, 26675, 198, 6738, 1341, 35720, 13, 4164, 10466, 1330, 9922, 62, 26675, 198, 198, 6738, 1341, 35720, 13, 7...
2.573248
471
""" Runtime: 4552 ms, faster than 5.04% of Python3 online submissions for Linked List Cycle. Memory Usage: 17.7 MB, less than 24.84% of Python3 online submissions for Linked List Cycle. """ from typing import List from typing import Optional if __name__ == "__main__": main()
[ 37811, 198, 41006, 25, 604, 40427, 13845, 11, 5443, 621, 642, 13, 3023, 4, 286, 11361, 18, 2691, 22129, 329, 7502, 276, 7343, 26993, 13, 198, 30871, 29566, 25, 1596, 13, 22, 10771, 11, 1342, 621, 1987, 13, 5705, 4, 286, 11361, 18, ...
3.426829
82
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Gtkplus(MesonPackage): """The GTK+ package contains libraries used for creating graphical ...
[ 2, 15069, 2211, 12, 1238, 1828, 13914, 45036, 3549, 2351, 4765, 11, 11419, 290, 584, 198, 2, 1338, 441, 4935, 34152, 13, 4091, 262, 1353, 12, 5715, 27975, 38162, 9947, 2393, 329, 3307, 13, 198, 2, 198, 2, 30628, 55, 12, 34156, 12, ...
2.189939
1,153
import numpy as np import tensorflow as tf import keras from sklearn.metrics import confusion_matrix, classification_report from . import Metrics def ann_train_and_evaluate(training_set_samples, training_set_labels, test_set_samples, test_set_labels, xmit_conn): """ Functional unit that accepts training and test ...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 41927, 292, 198, 6738, 1341, 35720, 13, 4164, 10466, 1330, 10802, 62, 6759, 8609, 11, 17923, 62, 13116, 198, 6738, 764, 1330, 3395, 10466, 628, 198, 4...
2.910019
1,078
from django.db import models from django.urls import reverse from multiselectfield import MultiSelectField from core.choices import * from django.contrib.auth.models import PermissionsMixin from django.contrib.auth.base_user import AbstractBaseUser from django.core.exceptions import ValidationError from django.utils.tr...
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 198, 6738, 1963, 786, 801, 3245, 1330, 15237, 17563, 15878, 198, 6738, 4755, 13, 6679, 1063, 1330, 1635, 198, 6738, 42625, 14208, 13, 3642, 822...
3.586066
244
# 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 in wr...
[ 2, 15069, 13130, 3012, 11419, 201, 198, 2, 201, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 705, 34156, 24036, 201, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 201, 1...
2.586033
1,389
# Copyright (c) 2019 J. Alvarez-Jarreta and C.J. Brasher # # This file is part of the LipidFinder software tool and governed by the # 'MIT License'. Please see the LICENSE file that should have been # included as part of this software. """Set of methods aimed to reassign a m/z value to every feature in a cluster: >...
[ 2, 15069, 357, 66, 8, 13130, 449, 13, 36952, 12, 47511, 1186, 64, 290, 327, 13, 41, 13, 1709, 31218, 198, 2, 198, 2, 770, 2393, 318, 636, 286, 262, 24701, 312, 37, 5540, 3788, 2891, 290, 21825, 416, 262, 198, 2, 705, 36393, 1378...
2.703145
795
import logging from contextlib import contextmanager log = logging.getLogger(__name__) @contextmanager
[ 11748, 18931, 198, 6738, 4732, 8019, 1330, 4732, 37153, 198, 198, 6404, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 628, 198, 198, 31, 22866, 37153, 198 ]
3.566667
30
from django.http import Http404, HttpResponseRedirect, HttpResponse from django.contrib.auth.decorators import login_required from sphene.community import PermissionDenied from sphene.community.middleware import get_current_user from sphene.sphboard.models import Post from sphene.sphquestions.models import AnswerV...
[ 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 26429, 11, 367, 29281, 31077, 7738, 1060, 11, 367, 29281, 31077, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 12501, 273, 2024, 1330, 17594, 62, 35827, 628, 198, 6738, 599, ...
3.44
100
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import _utilities __a...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 17202, 39410, 25, 428, 2393, 373, 7560, 416, 262, 21624, 12994, 26144, 35986, 13, 17202, 198, 2, 17202, 2141, 407, 4370, 416, 1021, 4556, 345, 821, 1728, 345, 760, 644, 345, 389, 1804, 0, 17202, ...
2.59306
634
import getopt import logging import os import sys from gitutils.repo import RepoCloner from loggingcfg import initialize_logger from utils import utility if __name__ == '__main__': logger = initialize_logger(name='SZZ:CLONE') start(sys.argv[1:])
[ 11748, 651, 8738, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 6738, 17606, 26791, 13, 260, 7501, 1330, 1432, 78, 2601, 14491, 198, 6738, 18931, 37581, 1330, 41216, 62, 6404, 1362, 198, 6738, 3384, 4487, 1330, 10361,...
2.965517
87
# # Collective Knowledge (index of reproducible articles) # # See CK LICENSE.txt for licensing details # See CK COPYRIGHT.txt for copyright details # # Developer: Grigori Fursin # cfg={} # Will be updated by CK (meta description of this module) work={} # Will be updated by CK (temporal data) ck=None # Will be updated...
[ 2, 198, 2, 29128, 20414, 357, 9630, 286, 8186, 37369, 6685, 8, 198, 2, 198, 2, 4091, 45233, 38559, 24290, 13, 14116, 329, 15665, 3307, 198, 2, 4091, 45233, 27975, 38162, 9947, 13, 14116, 329, 6634, 3307, 198, 2, 198, 2, 23836, 25, ...
2.120294
8,446
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import division import numpy as np import matplotlib.pyplot as plt import matplotlib from matplotlib.colors import LinearSegmentedColormap import sys FILENAME = sys.argv[1] _f = open(FILENAME + '.csv', 'r') u_dp = [[] for i in range(4)] u_l = [[] for i in...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, ...
2.046512
1,806
#!/usr/bin/env python """IP{4,6} over IP{v,6} tunnel functional tests""" import unittest from scapy.layers.inet6 import IPv6, Ether, IP, UDP, IPv6ExtHdrFragment from scapy.all import fragment, fragment6, RandShort, defragment6 from framework import VppTestCase, VppTestRunner from vpp_ip import DpoProto from vpp_ip_rou...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 4061, 90, 19, 11, 21, 92, 625, 6101, 90, 85, 11, 21, 92, 13275, 10345, 5254, 37811, 198, 198, 11748, 555, 715, 395, 198, 6738, 629, 12826, 13, 75, 6962, 13, 42504, 21, 1330,...
1.792803
7,336
#! /bin/env python import sys, time, traceback ########################################################################3 # Simple audio encoder # ---------------------------------------------------------------------------------- # Change the format of your compressed audio files to something different # http://...
[ 2, 0, 1220, 8800, 14, 24330, 21015, 198, 198, 11748, 25064, 11, 640, 11, 12854, 1891, 628, 198, 29113, 29113, 7804, 18, 198, 2, 17427, 220, 6597, 2207, 12342, 628, 198, 2, 16529, 1783, 438, 198, 198, 2, 9794, 262, 5794, 286, 534, ...
2.7
270
n = int(input()) cc = 0 for i in range(n): cl = int(input()) cc += cl if cc > 255: print('Insufficient capacity!') cc -= cl print(cc)
[ 201, 198, 77, 796, 493, 7, 15414, 28955, 201, 198, 535, 796, 657, 201, 198, 1640, 1312, 287, 2837, 7, 77, 2599, 201, 198, 220, 220, 220, 537, 796, 493, 7, 15414, 28955, 201, 198, 220, 220, 220, 36624, 15853, 537, 201, 198, 220, ...
1.988506
87
import shutil import os def copy_into(source, destination): """ Copy all files from source into destination recursively. Overwrites existing files. """ files = [] for r, d, f in os.walk(source): for file in f: full_filename = os.path.join(r, file) files.append("/"....
[ 11748, 4423, 346, 198, 11748, 28686, 628, 198, 4299, 4866, 62, 20424, 7, 10459, 11, 10965, 2599, 198, 220, 220, 220, 37227, 17393, 477, 3696, 422, 2723, 656, 10965, 664, 1834, 2280, 13, 628, 220, 220, 220, 3827, 8933, 274, 4683, 3696,...
2.29572
257
''' VTQuery worker ''' import os import requests import collections import ConfigParser import pprint class VTQuery(object): ''' This worker query Virus Total, an apikey needs to be provided ''' dependencies = ['meta'] def __init__(self): ''' VTQuery Init''' # Grab API key from confi...
[ 198, 7061, 6, 32751, 20746, 8383, 705, 7061, 198, 11748, 28686, 198, 11748, 7007, 198, 11748, 17268, 198, 11748, 17056, 46677, 198, 11748, 279, 4798, 198, 198, 4871, 32751, 20746, 7, 15252, 2599, 198, 220, 220, 220, 705, 7061, 770, 8383...
2.311394
1,413
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: streamlit/proto/DeckGlChart.proto from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_d...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 262, 8435, 11876, 17050, 13, 220, 8410, 5626, 48483, 0, 198, 2, 2723, 25, 4269, 18250, 14, 1676, 1462, 14, 5005, 694, 9861, 45488, 13, 1676, 1462, ...
2.366744
2,165
import sys import time from Node import Node from utils import read_input from bfs import best_first_search from heuristic import heuristic1 from heuristic import heuristic2 from heuristic import heuristic3 from hill import hill_climb if len(sys.argv) != 4: print("Usage: ./run.sh [INPUT TEXT FILE] [ALGO...
[ 11748, 25064, 201, 198, 11748, 640, 201, 198, 6738, 19081, 1330, 19081, 201, 198, 6738, 3384, 4487, 1330, 1100, 62, 15414, 201, 198, 6738, 275, 9501, 1330, 1266, 62, 11085, 62, 12947, 201, 198, 6738, 339, 27915, 1330, 339, 27915, 16, ...
2.567657
909
import sys sys.stdin = open("input.txt", "r") sys.stdout = open("output.txt", "w") n, m = map(int, input().split()) n_mas = [0 for i in range(n)] for i in range(m): for j in list(map(int, input().split())): n_mas[j-1] += 1 print(*n_mas)
[ 11748, 25064, 198, 17597, 13, 19282, 259, 796, 1280, 7203, 15414, 13, 14116, 1600, 366, 81, 4943, 198, 17597, 13, 19282, 448, 796, 1280, 7203, 22915, 13, 14116, 1600, 366, 86, 4943, 198, 77, 11, 285, 796, 3975, 7, 600, 11, 5128, 224...
2.254545
110
""" Module to define Celery instance Tutorial: https://docs.celeryproject.org/en/stable/django/first-steps-with-django.html """ import os from celery import Celery # Set the default Django settings module for the 'celery' program. os.environ.setdefault("DJANGO_SETTINGS_MODULE", "opennews.settings.dev") app = Celery("...
[ 37811, 198, 26796, 284, 8160, 15248, 1924, 4554, 198, 51, 44917, 25, 198, 5450, 1378, 31628, 13, 7015, 88, 16302, 13, 2398, 14, 268, 14, 31284, 14, 28241, 14208, 14, 11085, 12, 20214, 12, 4480, 12, 28241, 14208, 13, 6494, 198, 37811, ...
3.253807
591
# -*- coding: utf-8 -*- """ Created on Fri Aug 02 10:31:06 2019 @author: TinaB """ ## Script to calculate NOF / NPS bands for HCL ########################################################### import pandas as pd import matplotlib.pyplot as plt import numpy from hilltoppy.web_service import measurement_list, measuremen...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 19480, 2447, 7816, 838, 25, 3132, 25, 3312, 13130, 198, 198, 31, 9800, 25, 35903, 33, 198, 37811, 628, 198, 2235, 12327, 284, 15284, 8005, 37, ...
2.208445
2,605
from django.urls import re_path, path from file_upload import views from base.views import load_report, log_detail, log_list, scan_viscidus_poison_tick, viscidus_poison_tick_info,\ scan_boss_nature_protection, boss_nature_protection_info, gold_run_detail # namespace app_name = "base" urlpatterns = [ # Upload...
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 302, 62, 6978, 11, 3108, 198, 6738, 2393, 62, 25850, 1330, 5009, 198, 6738, 2779, 13, 33571, 1330, 3440, 62, 13116, 11, 2604, 62, 49170, 11, 2604, 62, 4868, 11, 9367, 62, 85, 2304, 312, 385, ...
2.463061
758
import sys import os filePath = os.path.abspath(os.path.dirname(__file__)) sys.path.append(os.path.split(filePath)[0]) import pytest from examples.data import read_data data_dir = '../data/international-airline-passengers.csv' prepare_data = read_data.PassengerData(params={'input_seq_length':15,'output_seq_length':...
[ 198, 11748, 25064, 198, 11748, 28686, 198, 7753, 15235, 796, 28686, 13, 6978, 13, 397, 2777, 776, 7, 418, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 4008, 198, 17597, 13, 6978, 13, 33295, 7, 418, 13, 6978, 13, 35312, 7, 7753, 1...
2.654321
162
# -*- coding: utf-8 -*- # (C) Copyright 2020, 2021 IBM. All Rights Reserved. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modificatio...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 357, 34, 8, 15069, 12131, 11, 33448, 19764, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 770, 2438, 318, 11971, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15,...
2.018523
4,049
from datastore.migrations import AddFieldMigration, BaseEvent from datastore.shared.typing import JSON class Migration(AddFieldMigration): """ This migration adds `group/weight` with the id as the default weight. """ target_migration_index = 18 collection = "group" field = "weight"
[ 6738, 4818, 459, 382, 13, 76, 3692, 602, 1330, 3060, 15878, 44, 4254, 11, 7308, 9237, 198, 6738, 4818, 459, 382, 13, 28710, 13, 774, 13886, 1330, 19449, 628, 198, 4871, 36991, 7, 4550, 15878, 44, 4254, 2599, 198, 220, 220, 220, 3722...
3.141414
99
# -*- coding: utf-8 -*- """ Create on 2017/01/18 @author: vinson zheng @group: inpluslab @contact: 1530820222@qq.com """ import sys VERSION = '1.0' K_LABELS = ['D', 'W', 'M'] K_MIN_LABELS = ['1', '5', '15', '30', '60'] K_TYPE = {'D': 'akdaily', 'W': 'akweekly', 'M': 'akmonthly'} TT_K_TYPE = {'D': 'day', 'W': 'week',...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 16447, 319, 2177, 14, 486, 14, 1507, 198, 31, 9800, 25, 410, 7899, 1976, 31753, 198, 31, 8094, 25, 287, 9541, 23912, 198, 31, 32057, 25, 1315, 21495, 1238,...
1.778145
5,445
from bs4 import BeautifulSoup import urllib import json import os jaren = [str("2012"),str("2010"),str("2006"),str("2003"),str("2002"),str("1998"),str("1994"),str("1989"),str("1986")] DESIRED_COLUMNS = {1, 2, 5} #scrapes only afk, aantal & zetels verkiezingsData = [] filename = raw_input('Enter a filename: ') or 'data...
[ 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 11748, 2956, 297, 571, 198, 11748, 33918, 198, 11748, 28686, 198, 73, 5757, 796, 685, 2536, 7203, 6999, 12340, 2536, 7203, 10333, 12340, 2536, 7203, 13330, 12340, 2536, 7203, 16088, 12340, ...
2.250542
922
#!/usr/bin/env python import vtk if __name__ == "__main__": main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 410, 30488, 628, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1388, 3419, 198 ]
2.30303
33
from pathlib import Path import copy import spikeextractors as se import spiketoolkit as st from ..basesorter import BaseSorter try: import herdingspikes as hs HAVE_HS = True except ImportError: HAVE_HS = False class HerdingspikesSorter(BaseSorter): """ HerdingSpikes is a sorter based on estima...
[ 6738, 3108, 8019, 1330, 10644, 198, 11748, 4866, 198, 198, 11748, 20240, 2302, 974, 669, 355, 384, 198, 11748, 599, 1134, 316, 970, 15813, 355, 336, 198, 198, 6738, 11485, 65, 1386, 4337, 1330, 7308, 50, 4337, 198, 198, 28311, 25, 198...
2.328722
1,807
# pygame demo 7 SimpleButton test # 1 - Import packages import pygame from pygame.locals import * from SimpleButton import * import sys # Define constants GRAY = (200, 200, 200) WINDOW_WIDTH = 400 WINDOW_HEIGHT = 100 FRAMES_PER_SECOND = 30 # 2 - Initialize the world pygame.init() window = pygame.display.set_mode((...
[ 2, 12972, 6057, 13605, 767, 220, 17427, 21864, 1332, 198, 198, 2, 352, 532, 17267, 10392, 198, 11748, 12972, 6057, 198, 6738, 12972, 6057, 13, 17946, 874, 1330, 1635, 198, 6738, 17427, 21864, 1330, 1635, 198, 11748, 25064, 198, 198, 2, ...
2.491363
521
import os from setuptools import setup, find_packages import brutebuster_signals setup( name="django-brutebuster-signals", version=brutebuster_signals.__version__, description=read('DESCRIPTION'), long_description=read('README.rst'), keywords='brutebuster signals email', packages=find_package...
[ 11748, 28686, 198, 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 11748, 33908, 24899, 62, 12683, 874, 628, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 2625, 28241, 14208, 12, 1671, 1133, 24899, 12, 12683, 874, 1600, ...
2.627358
212
#!/usr/bin/python from flask import Flask from flask import render_template import time import requests import random from random import randint import json import subprocess networks = subprocess.check_output('sudo iwlist wlan0 scanning | grep ESSID',shell=True) networks = networks.decode('ascii') networks = networ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 6738, 42903, 1330, 46947, 198, 6738, 42903, 1330, 8543, 62, 28243, 198, 11748, 640, 198, 11748, 7007, 198, 11748, 4738, 198, 6738, 4738, 1330, 43720, 600, 198, 11748, 33918, 198, 11748, 850, 14...
2.680124
322
# 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, software # distributed under the...
[ 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, 7330, 257, 4866, 286, 262, 13789, 379, 198, 2,...
3.049844
321
"""Expressive syntax for working with binary formats and network protocols.""" __author__ = "Matthew Sachs (matthewg@zevils.com)" __copyright__ = "Copyright (c) 2013 Matthew Sachs" __license__ = "Apache License v2.0" __vcs_id__ = "$Revision$" __version__ = "0.1.0" from . import delimiter from . import field from . im...
[ 37811, 16870, 3314, 15582, 329, 1762, 351, 13934, 17519, 290, 3127, 19565, 526, 15931, 198, 198, 834, 9800, 834, 796, 366, 25372, 25158, 357, 76, 1078, 6391, 70, 31, 89, 1990, 4487, 13, 785, 16725, 198, 834, 22163, 4766, 834, 796, 366...
3.283784
148
print('''Faça um programa que ajude um jogador da MEGA SENA a criar palpites. O programa vai perguntar quantos jogos serão gerados e vai sortear 6 números entre 1 e 60 para cada jogo, cadastrando tudo em uma lista composta.''') from random import randint from time import sleep li = [] num = int(input('Quantos jogos...
[ 4798, 7, 7061, 6, 50110, 50041, 23781, 1430, 64, 8358, 257, 73, 2507, 23781, 48342, 7079, 12379, 337, 33146, 44738, 32, 257, 269, 380, 283, 38891, 2737, 13, 220, 198, 46, 1430, 64, 410, 1872, 583, 70, 2797, 283, 5554, 418, 48342, 41...
2.138329
347
from pytest import raises from pyinter import interval as i
[ 6738, 12972, 9288, 1330, 12073, 198, 6738, 12972, 3849, 1330, 16654, 355, 1312, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 198, 220, 220, 220, 220 ]
2.933333
30
import scrapy
[ 11748, 15881, 88, 198 ]
3.5
4
import warnings import xarray as xr from .checks import is_xarray from .stats import standardize from .testing import ttest_ind_from_stats def _create_composites(anomaly_field, index, threshold=1, dim="time"): """Creates composite from some variable's anomaly field and a climate index""" index_comp = xr...
[ 11748, 14601, 198, 198, 11748, 2124, 18747, 355, 2124, 81, 198, 198, 6738, 764, 42116, 1330, 318, 62, 87, 18747, 198, 6738, 764, 34242, 1330, 3210, 1096, 198, 6738, 764, 33407, 1330, 256, 9288, 62, 521, 62, 6738, 62, 34242, 628, 198, ...
2.477927
1,563
from argparse import ArgumentParser import numpy as np import librosa import pickle import torch torch.set_num_threads(1) import os from utils import SDR, get_mir_scores, load_pkl if __name__ == "__main__": main()
[ 6738, 1822, 29572, 1330, 45751, 46677, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 9195, 4951, 64, 198, 11748, 2298, 293, 198, 198, 11748, 28034, 198, 13165, 354, 13, 2617, 62, 22510, 62, 16663, 82, 7, 16, 8, 198, 198, 11748, 2868...
2.670588
85
# Copyright (c) SenseTime. All Rights Reserved. from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import argparse import os import cv2 import torch import numpy as np import math import sys import shutil sys.path.appen...
[ 2, 15069, 357, 66, 8, 24956, 7575, 13, 1439, 6923, 33876, 13, 198, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 11593, 37...
2.819805
616
# coding=utf8 import logging from handlers.base import BaseHandler logger = logging.getLogger('listenone.' + __name__)
[ 2, 19617, 28, 40477, 23, 198, 11748, 18931, 198, 198, 6738, 32847, 13, 8692, 1330, 7308, 25060, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 10786, 4868, 268, 505, 2637, 1343, 11593, 3672, 834, 8, 628 ]
3.210526
38
import os from datetime import datetime import holoviews as hv import numpy as np import pandas as pd from bokeh.models import HoverTool hv.extension("bokeh") if os.environ.get("USEGIT") == "true": env_name = "git" else: env_name = "pypi-cran" df_r = pd.read_csv( f"reference_posterior_{env_name}.csv", i...
[ 11748, 28686, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 11748, 6039, 709, 769, 82, 355, 289, 85, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 1489, 365, 71, 13, 27530, 1330, 38452, 2539...
2.241917
1,732
import struct import unittest import json from manticore.platforms import evm from manticore.core import state from manticore.core.smtlib import Operators, ConstraintSet import os if __name__ == '__main__': unittest.main()
[ 198, 11748, 2878, 198, 11748, 555, 715, 395, 198, 11748, 33918, 198, 6738, 285, 5109, 382, 13, 24254, 82, 1330, 819, 76, 198, 6738, 285, 5109, 382, 13, 7295, 1330, 1181, 198, 6738, 285, 5109, 382, 13, 7295, 13, 5796, 83, 8019, 1330,...
3.026316
76
# Generated by Django 3.1.3 on 2020-11-25 02:54 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 18, 319, 12131, 12, 1157, 12, 1495, 7816, 25, 4051, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
import itertools adj8 = ((1, 0), (-1, 0), (0, 1), (0, -1), (1, -1), (1, 1), (-1, 1), (-1, -1))
[ 11748, 340, 861, 10141, 198, 198, 41255, 23, 796, 14808, 16, 11, 657, 828, 13841, 16, 11, 657, 828, 357, 15, 11, 352, 828, 357, 15, 11, 532, 16, 828, 357, 16, 11, 532, 16, 828, 357, 16, 11, 352, 828, 13841, 16, 11, 352, 828, ...
1.818182
55
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2016-07-26 06:16 from __future__ import unicode_literals from django.db import migrations, models
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 24, 13, 22, 319, 1584, 12, 2998, 12, 2075, 9130, 25, 1433, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 1...
2.719298
57
# ****************************************************************************** # Copyright 2017-2021 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apa...
[ 2, 41906, 17174, 46068, 1174, 198, 2, 15069, 2177, 12, 1238, 2481, 8180, 10501, 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, ...
4.384236
203
import os import dask import dask.dataframe as dd from dask.distributed import Client, SSHCluster import time import argparse import math import subprocess """ >>> python dask_setup.py --start_size 100_000_000 \ --step_size 100_000_000 \ ...
[ 11748, 28686, 198, 198, 11748, 288, 2093, 198, 11748, 288, 2093, 13, 7890, 14535, 355, 49427, 198, 6738, 288, 2093, 13, 17080, 6169, 1330, 20985, 11, 33825, 2601, 5819, 198, 198, 11748, 640, 198, 11748, 1822, 29572, 198, 11748, 10688, 1...
1.835101
2,074
import array import random import numpy as np from deap import algorithms from deap import base from deap import creator from deap import tools # パラメータ定義テーブル(Ax仕様) PARAMETERS = [ { "name": "x1", "type": "range", "bounds": [-10.0, 10.0], "value_type": "float", }, { ...
[ 11748, 7177, 198, 11748, 4738, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 390, 499, 1330, 16113, 198, 6738, 390, 499, 1330, 2779, 198, 6738, 390, 499, 1330, 13172, 198, 6738, 390, 499, 1330, 4899, 198, 198, 2, 14524, 239...
1.499145
585
from rest_framework import viewsets, filters from rest_framework.permissions import IsAdminUser from gia_practice_app.Practice.models import Practice, PracticeTemplate from gia_practice_app.Practice.serializers import PracticeSerializer, PracticeTemplateSerializer, \ PracticePrimitiveSerializer from workprogramsap...
[ 6738, 1334, 62, 30604, 1330, 5009, 1039, 11, 16628, 198, 6738, 1334, 62, 30604, 13, 525, 8481, 1330, 1148, 46787, 12982, 198, 198, 6738, 308, 544, 62, 39541, 62, 1324, 13, 49515, 501, 13, 27530, 1330, 19939, 11, 19939, 30800, 198, 673...
3.826923
104
#!/usr/bin/python # -*- coding: UTF-8 -*- # Author Cleoner S. Pietralonga # e-mail: cleonerp@gmail.com # Apache License import sympy as sp from sympy.physics.quantum import TensorProduct import numpy as np import cupy as cp from logicqubit.utils import * from logicqubit.hilbert import *
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 198, 198, 2, 6434, 3779, 14491, 311, 13, 36548, 1373, 44294, 198, 2, 304, 12, 4529, 25, 1190, 14491, 79, 31, 14816, 13, 785, 198, ...
2.843137
102
# Copyright 2018 Cyril Roelandt # # Licensed under the 3-clause BSD license. See the LICENSE file. class InvalidPackageNameError(Exception): """Invalid package name or non-existing package.""" class InvalidPackageVersionError(Exception): """Invalid or non-existing version of a valid package""" class ...
[ 2, 15069, 2864, 220, 220, 220, 220, 220, 40399, 346, 5564, 8822, 83, 198, 2, 198, 2, 49962, 739, 262, 513, 12, 565, 682, 347, 10305, 5964, 13, 4091, 262, 38559, 24290, 2393, 13, 628, 198, 4871, 17665, 27813, 5376, 12331, 7, 16922, ...
3.636364
110
"""PDF operations module.""" import os import sys import tempfile import PyPDF4 class PdfSplitter: """Pdf Splitter class.""" def __init__(self, filepath: str) -> None: """Constructor.""" self.filepath = filepath self.input_pdf = PyPDF4.PdfFileReader(filepath, "rb") self.total...
[ 37811, 20456, 4560, 8265, 526, 15931, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 20218, 7753, 198, 198, 11748, 9485, 20456, 19, 628, 198, 4871, 350, 7568, 26568, 1967, 25, 198, 220, 220, 220, 37227, 47, 7568, 13341, 1967, 1398, 5...
1.956652
1,338
# -*- coding: utf-8 -*- """ @file @brief Builds a knn classifier for image in order to find close images. """ import os import numpy from PIL.Image import Image from sklearn.neighbors import NearestNeighbors from .image_helper import img2gray, enumerate_image_class, read_image, image_zoom class ImageNearestNeighbors(...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 31, 7753, 198, 31, 65, 3796, 10934, 82, 257, 638, 77, 1398, 7483, 329, 2939, 287, 1502, 284, 1064, 1969, 4263, 13, 198, 37811, 198, 11748, 28686, 198, 1174...
2.072714
5,611
import os import posixpath from django.conf import settings from django.core.files import File from django.core.files.storage import DefaultStorage from django.http import Http404 from django.shortcuts import get_object_or_404 from django.utils._os import safe_join from django.views.generic import RedirectView from re...
[ 11748, 28686, 198, 11748, 1426, 844, 6978, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 7295, 13, 16624, 1330, 9220, 198, 6738, 42625, 14208, 13, 7295, 13, 16624, 13, 35350, 1330, 15161, 31425, 198, ...
2.782152
762
print("*"*20) print("Comparando Numeros") print("*"*20) primeiro_valor = int(input("Digite o primeiro valor: ")) segundo_valor = int(input("Digite o segundo valor: ")) if primeiro_valor > segundo_valor: print(f"O número {primeiro_valor} é MAIOR!") elif segundo_valor > primeiro_valor: print(f"O número {segundo...
[ 4798, 7203, 9, 1, 9, 1238, 8, 198, 4798, 7203, 50249, 25440, 399, 6975, 418, 4943, 198, 4798, 7203, 9, 1, 9, 1238, 8, 198, 198, 35505, 7058, 62, 2100, 273, 796, 493, 7, 15414, 7203, 19511, 578, 267, 6994, 7058, 1188, 273, 25, 36...
2.220994
181
# -*- coding: utf-8 -*- """ Main script for divergence regulated encoder network (DREN) demo.py @author: jpeeples """ ## Python standard libraries from __future__ import print_function from __future__ import division import numpy as np import os import pdb ## PyTorch dependencies import torch import torch.nn as nn im...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 13383, 4226, 329, 43366, 17153, 2207, 12342, 3127, 357, 7707, 1677, 8, 198, 9536, 78, 13, 9078, 198, 31, 9800, 25, 474, 39463, 2374, 198, 37811, 198, 198, ...
1.854351
4,964
# Generated by Django 2.2.7 on 2019-11-18 19:59 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 22, 319, 13130, 12, 1157, 12, 1507, 678, 25, 3270, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
# see surf_foil.py for an improved version of this #from __future__ import unicode_literals from FreeCAD import Base #import Draft, Part import Part, math z = foil(file_profile="/home/paul/CAD/foil/H105Coord.dat", file_LeadTrail="/home/paul/CAD/foil/test.sweepPath") z.show() #z.showfoil() #z.showProfile...
[ 2, 766, 9053, 62, 6513, 346, 13, 9078, 329, 281, 6596, 2196, 286, 428, 198, 198, 2, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 6738, 3232, 34, 2885, 1330, 7308, 198, 2, 11748, 13650, 11, 2142, 198, 11748, 2142,...
2.446922
3,184
from portality.lib.argvalidate import argvalidate from portality.lib import dates from portality import models, constants, clcsv from portality.bll import exceptions from portality.core import app from portality import lock from portality.bll.doaj import DOAJ from portality.store import StoreFactory, prune_container fr...
[ 6738, 2493, 1483, 13, 8019, 13, 853, 12102, 378, 1330, 1822, 12102, 378, 198, 6738, 2493, 1483, 13, 8019, 1330, 9667, 198, 6738, 2493, 1483, 1330, 4981, 11, 38491, 11, 537, 40664, 198, 6738, 2493, 1483, 13, 65, 297, 1330, 13269, 198, ...
3.739496
119
import threading class MarkerDataSet: """ Base class for collecting the detected marker pose. """ def saveitem(self, id, obs, x, y): """Save a new position in the marker pose in the data set. Parameters ---------- id : int id of the car obs : ...
[ 11748, 4704, 278, 628, 198, 4871, 2940, 263, 6601, 7248, 25, 198, 220, 220, 220, 37227, 7308, 1398, 329, 13157, 262, 12326, 18364, 12705, 13, 220, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 825, 3613, 9186, 7, 944, 11, 4686, 11,...
1.926391
557
# # Copyright 2017 the original author or 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...
[ 2, 198, 2, 15069, 2177, 262, 2656, 1772, 393, 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,...
3.414791
311
import mock import pytest import logging import re from testfixtures import LogCapture from mock import mock_open from webbreaker.webinspect.proxy import WebInspectProxy from webinspectapi.webinspect import WebInspectResponse try: import ConfigParser as configparser config = configparser.SafeConfigParser() e...
[ 11748, 15290, 198, 11748, 12972, 9288, 198, 11748, 18931, 198, 11748, 302, 198, 6738, 1332, 69, 25506, 1330, 5972, 49630, 198, 6738, 15290, 1330, 15290, 62, 9654, 198, 198, 6738, 3992, 25766, 13, 12384, 1040, 806, 13, 36436, 1330, 5313, ...
3.011921
755
"""Compute tracking error from quantum circuit results.""" import numpy as np def compute_mean_terr(res, N, d, Σ, g, ε0): """Compute mean tracking error from a set of quantum measurements. Parameters ---------- res: dict Measurements from a quantum circuit in Qiskit format. N: int ...
[ 37811, 7293, 1133, 9646, 4049, 422, 14821, 10349, 2482, 526, 15931, 198, 198, 11748, 299, 32152, 355, 45941, 628, 198, 4299, 24061, 62, 32604, 62, 353, 81, 7, 411, 11, 399, 11, 288, 11, 7377, 96, 11, 308, 11, 7377, 113, 15, 2599, ...
2.097138
1,153
import time mytime = time.localtime() if mytime.tm_hour < 6 or mytime.tm_hour > 18: a = 0 else: a = 1
[ 11748, 640, 198, 198, 1820, 2435, 796, 640, 13, 12001, 2435, 3419, 198, 361, 616, 2435, 13, 17209, 62, 9769, 1279, 718, 393, 616, 2435, 13, 17209, 62, 9769, 1875, 1248, 25, 198, 220, 220, 220, 257, 796, 657, 198, 17772, 25, 198, 2...
2.211538
52
from django.core.exceptions import PermissionDenied from django.shortcuts import redirect from django.conf import settings
[ 6738, 42625, 14208, 13, 7295, 13, 1069, 11755, 1330, 2448, 3411, 21306, 798, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 18941, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 628, 198 ]
3.90625
32
from scorch_api.bot import * import Utilities.Weights.playerStore as playerStore
[ 6738, 34203, 354, 62, 15042, 13, 13645, 1330, 1635, 198, 11748, 41086, 13, 1135, 2337, 13, 7829, 22658, 355, 2137, 22658, 198 ]
3.681818
22
""" Assigns a human understandable label to a color value TODO: in python there's rarely a need for generic file or folder names like core.py or main.py """ from collections import OrderedDict import pandas as pd import numpy as np import cv2 from object_detection.constants import COLOR_KEYS def estimate_color(img...
[ 37811, 198, 8021, 570, 82, 257, 1692, 21977, 6167, 284, 257, 3124, 1988, 628, 198, 51, 3727, 46, 25, 287, 21015, 612, 338, 8365, 257, 761, 329, 14276, 2393, 393, 9483, 3891, 588, 4755, 13, 9078, 393, 1388, 13, 9078, 198, 37811, 198,...
2.262626
1,584
# Copyright (c) 2017 Cisco and/or its affiliates. # 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 ag...
[ 2, 15069, 357, 66, 8, 2177, 28289, 290, 14, 273, 663, 29116, 13, 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...
2.449416
2,056
import unittest from collections import OrderedDict from aioupnp.serialization.ssdp import SSDPDatagram from aioupnp.fault import UPnPError from aioupnp.constants import UPNP_ORG_IGD
[ 11748, 555, 715, 395, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 6738, 257, 72, 10486, 37659, 13, 46911, 1634, 13, 824, 26059, 1330, 21252, 5760, 265, 6713, 198, 6738, 257, 72, 10486, 37659, 13, 69, 1721, 1330, 15958, 77, 47, ...
2.828571
70
"""Node feature Revision ID: 43a5cdca0a62 Revises: f08sa66d495 Create Date: 2013-12-09 12:09:41.969339 """ # revision identifiers, used by Alembic. revision = '43a5cdca0a62' down_revision = 'f08sa66d495' from alembic import op import sqlalchemy as sa
[ 37811, 19667, 3895, 198, 198, 18009, 1166, 4522, 25, 5946, 64, 20, 10210, 6888, 15, 64, 5237, 198, 18009, 2696, 25, 277, 2919, 11400, 2791, 67, 33781, 198, 16447, 7536, 25, 2211, 12, 1065, 12, 2931, 1105, 25, 2931, 25, 3901, 13, 388...
2.471154
104
EX01() EX02()
[ 198, 6369, 486, 3419, 198, 6369, 2999, 3419 ]
1.75
8
from ninja import Router from django.forms.models import model_to_dict from django.db.utils import IntegrityError from backend.common import response,Error from tasks.apis.api_schema import TaskIn from projects.models import Project from cases.models import TestCase from tasks.models import TestTask,TaskCaseRelevance f...
[ 6738, 37049, 1330, 48538, 198, 6738, 42625, 14208, 13, 23914, 13, 27530, 1330, 2746, 62, 1462, 62, 11600, 198, 6738, 42625, 14208, 13, 9945, 13, 26791, 1330, 39348, 12331, 198, 6738, 30203, 13, 11321, 1330, 2882, 11, 12331, 198, 6738, 8...
2.272589
1,317
""" $project$ common configuration properties @author: $author$ @date: $time$ """ import os LOGFORMAT = '%(asctime)s %(message)s' # You need to change these, most likely. GIS_FILESERVER = "\\\\cc-storage\\GIS" # Normally mapped as the "K:" LISDATA = os.path.join(GIS_FILESERVER, "LISData") LOCAL_GDB = ...
[ 37811, 198, 3, 16302, 3, 2219, 8398, 6608, 198, 31, 9800, 25, 720, 9800, 3, 198, 31, 4475, 25, 220, 220, 720, 2435, 3, 198, 37811, 198, 11748, 28686, 198, 25294, 21389, 1404, 796, 705, 4, 7, 292, 310, 524, 8, 82, 4064, 7, 20500,...
2.393574
249
from flask import Flask, jsonify, request from flask.ext.cors import CORS, cross_origin from database.database import ApplicationDao app = Flask(__name__) cors = CORS(app) app.config['CORS_HEADERS'] = 'Content-Type' OK = 200 CREATED = 201 NOT_FOUND = 404 INTERNAL_SERVER_ERROR = 500 SERVICE_UNAVAILABLE = 503 @app.r...
[ 6738, 42903, 1330, 46947, 11, 33918, 1958, 11, 2581, 198, 6738, 42903, 13, 2302, 13, 66, 669, 1330, 327, 20673, 11, 3272, 62, 47103, 198, 198, 6738, 6831, 13, 48806, 1330, 15678, 35, 5488, 198, 198, 1324, 796, 46947, 7, 834, 3672, 8...
2.66443
298
import logging from pathlib import Path f = foo() f.init_api('.', 123)
[ 11748, 18931, 198, 6738, 3108, 8019, 1330, 10644, 628, 198, 69, 796, 22944, 3419, 198, 69, 13, 15003, 62, 15042, 10786, 2637, 11, 17031, 8 ]
2.88
25