content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import tensorflow as tf import argparse import time import datetime import sys from core.ops import * from core.input import * from utils.utils import * import core.models as models from core.NetworkFactory import TransferNetwork parser = argparse.ArgumentParser(description='') parser.add_argument('--data_path', dest...
[ 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 1822, 29572, 198, 11748, 640, 198, 11748, 4818, 8079, 198, 11748, 25064, 198, 198, 6738, 4755, 13, 2840, 1330, 1635, 198, 6738, 4755, 13, 15414, 1330, 1635, 198, 6738, 3384, 4487, 13, 26...
2.534118
2,975
""" Minibot GPIO, specific to Raspberry Pi. """ from minibot.hardware.gpio import PWM as MPWM from minibot.hardware.gpio import DigitalInput as MDigitalInput from minibot.hardware.gpio import DigitalOutput as MDigitalOutput import RPi.GPIO as RGPIO # Sets mode of the GPIO to BCM numbering. RGPIO.setmode(RGPIO.BCM) c...
[ 37811, 198, 9452, 571, 313, 50143, 11, 2176, 284, 24244, 13993, 13, 198, 37811, 198, 198, 6738, 949, 571, 313, 13, 10424, 1574, 13, 31197, 952, 1330, 350, 22117, 355, 4904, 22117, 198, 6738, 949, 571, 313, 13, 10424, 1574, 13, 31197, ...
2.142263
1,202
#Tested on python 3.7 #reference - https://stackoverflow.com/questions/14894993/running-windows-shell-commands-with-python # created by Ranti Familusi ranti.familusi@nttdata.com import subprocess #remove duplicates # extract performance monitors enabled on a server #create conf file. Conf file should be put in $SP...
[ 2, 51, 7287, 319, 21015, 513, 13, 22, 198, 2, 35790, 220, 532, 3740, 1378, 25558, 2502, 11125, 13, 785, 14, 6138, 507, 14, 1415, 4531, 28324, 18, 14, 20270, 12, 28457, 12, 29149, 12, 9503, 1746, 12, 4480, 12, 29412, 198, 2, 2727, ...
3.150376
133
# coding:utf-8 def walkdict_rec(key, obj): """遍历dict或list 采用递归recursion方式实现,dict嵌套不能太深,list长度也不能太大,大概不要超过100,否则会报错。 用法: for k, v in walk_dict('', obj): print k, v """ if isinstance(obj, list): for i, v in enumerate(obj): new_key = "%s[%d]." % (key, i) ...
[ 2, 19617, 25, 40477, 12, 23, 628, 198, 4299, 2513, 11600, 62, 8344, 7, 2539, 11, 26181, 2599, 198, 220, 220, 220, 37227, 34402, 235, 43889, 228, 11600, 22755, 244, 4868, 198, 220, 220, 220, 16268, 229, 229, 18796, 101, 34460, 240, 3...
1.447127
1,201
from typing import Callable, Dict, Tuple import numpy as np import pathlib import tensorflow from tensorflow.keras.models import load_model from .base import ModelTf as Model from datasets.emnist import EmnistDataset from datasets.sequence import DatasetSequence from algorithms.lenet import lenet DIRNAME = pathlib.Pa...
[ 6738, 19720, 1330, 4889, 540, 11, 360, 713, 11, 309, 29291, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 3108, 8019, 198, 11748, 11192, 273, 11125, 198, 6738, 11192, 273, 11125, 13, 6122, 292, 13, 27530, 1330, 3440, 62, 19849, 198, ...
3.345455
110
"""Scrape jobs from stack overflow.""" from bs4 import BeautifulSoup as Soup import requests from datetime import datetime DOMAIN = 'https://www.stackoverflow.com' JOBS = [] def get_webpage(url): """Get the webpage.""" response = requests.get(url) html = Soup(response.content, 'html.parser') return ...
[ 37811, 3351, 13484, 3946, 422, 8931, 30343, 526, 15931, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 355, 34011, 198, 11748, 7007, 198, 6738, 4818, 8079, 1330, 4818, 8079, 628, 198, 39170, 29833, 796, 705, 5450, 1378, 2503, 13, 25558...
2.267137
992
import unittest import pytest import string from zad1.random_user import RandomUser if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 11748, 12972, 9288, 198, 11748, 4731, 198, 6738, 1976, 324, 16, 13, 25120, 62, 7220, 1330, 14534, 12982, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715,...
2.851064
47
from flask import current_app from flask import render_template_string, Blueprint, send_from_directory import os DIRECTORY = os.path.dirname(os.path.realpath(__file__)) TEMPLATE_PATH = os.path.join(DIRECTORY, "templates/swagger-ui.html") SWAGGERUI_DEFAULTS = { 'API_AUTH': False, 'API_AUTH_KEY': '', 'API_...
[ 6738, 42903, 1330, 1459, 62, 1324, 198, 6738, 42903, 1330, 8543, 62, 28243, 62, 8841, 11, 39932, 11, 3758, 62, 6738, 62, 34945, 198, 11748, 28686, 198, 198, 17931, 23988, 15513, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978,...
2.37619
210
""" http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions ...
[ 37811, 198, 4023, 1378, 2503, 13, 43073, 13, 2398, 14, 677, 4541, 14, 43, 2149, 24290, 12, 17, 13, 15, 198, 198, 28042, 2672, 416, 9723, 1099, 393, 4987, 284, 287, 3597, 11, 198, 43776, 9387, 739, 262, 13789, 318, 9387, 319, 281, ...
2.213326
5,658
""" Copyright (c) 2020 COTOBA DESIGN, Inc. 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, modify, merge, publish, distri...
[ 37811, 198, 15269, 357, 66, 8, 12131, 327, 26631, 4339, 22196, 16284, 11, 3457, 13, 198, 198, 5990, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 286, 428, 3788, 290, 3917, 198, 22897, 341, 3696, ...
3.876081
347
from mock import MagicMock from django.test import TestCase from django.core.exceptions import ImproperlyConfigured from django.forms.widgets import HiddenInput from wagtail.wagtailadmin.edit_handlers import ( get_form_for_model, extract_panel_definitions_from_model_class, BaseFieldPanel, FieldPanel, ...
[ 6738, 15290, 1330, 6139, 44, 735, 198, 198, 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 42625, 14208, 13, 7295, 13, 1069, 11755, 1330, 12205, 525, 306, 16934, 1522, 198, 6738, 42625, 14208, 13, 23914, 13, 28029, 11407, 1...
2.811881
202
""" Lecture 11: All-Pairs Shortest Paths Matrix Multiplication Method ---------------------------- All pairs shortest path matrices multiplication method. """ from graph import Graph def multiply_adjacency_matrices(vertices, A, B): """ 'Multiply' two adjacency matrices where multiplication and addition are d...
[ 37811, 198, 43, 478, 495, 1367, 25, 1439, 12, 47, 3468, 10073, 395, 10644, 82, 198, 46912, 15237, 489, 3299, 11789, 198, 1783, 10541, 198, 3237, 14729, 35581, 3108, 2603, 45977, 48473, 198, 24396, 13, 198, 198, 37811, 628, 198, 6738, ...
2.707944
856
# Character class. Everything related to the player, or player # controlled characters, goes in here. The idea is that, eventually, # you'll be able to control more than one character in battle # Item class. Everything a consumable item can do is defined here, # so that different items with different sets of effect...
[ 2, 15684, 1398, 13, 11391, 3519, 284, 262, 2137, 11, 393, 2137, 198, 2, 6856, 3435, 11, 2925, 287, 994, 13, 383, 2126, 318, 326, 11, 4191, 11, 198, 2, 345, 1183, 307, 1498, 284, 1630, 517, 621, 530, 2095, 287, 3344, 628, 628, 19...
4.025641
195
import torch import torch.nn as nn import torch.nn.functional as functional
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 10345, 628 ]
3.85
20
from collections import defaultdict, deque import common lines = common.read_file('2021/12/data.txt').splitlines() connections = defaultdict(lambda: []) for line in lines: l, r = line.split('-') connections[l].append(r) connections[r].append(l) # part 1 paths = 0 q = deque([('start', defaultdict(lambda: ...
[ 6738, 17268, 1330, 4277, 11600, 11, 390, 4188, 198, 11748, 2219, 198, 198, 6615, 796, 2219, 13, 961, 62, 7753, 10786, 1238, 2481, 14, 1065, 14, 7890, 13, 14116, 27691, 35312, 6615, 3419, 198, 8443, 507, 796, 4277, 11600, 7, 50033, 25,...
2.419476
534
"""Depth-based models for supervised classification.""" from __future__ import annotations from itertools import combinations from typing import Generic, Optional, Sequence, TypeVar, Union import numpy as np from scipy.interpolate import lagrange from sklearn.base import BaseEstimator, ClassifierMixin, clone from skl...
[ 37811, 48791, 12, 3106, 4981, 329, 28679, 17923, 526, 15931, 198, 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 6738, 340, 861, 10141, 1330, 17790, 198, 6738, 19720, 1330, 42044, 11, 32233, 11, 45835, 11, 5994, 19852, 11, 4479, 198, 1...
2.387374
5,243
############################################################################## # Parte do livro Introdução à Programação com Python # Autor: Nilo Ney Coutinho Menezes # Editora Novatec (c) 2010-2017 # Primeira edição - Novembro/2010 - ISBN 978-85-7522-250-8 # Primeira reimpressão - Outubro/2011 # Segunda reimpressão - ...
[ 29113, 29113, 7804, 4242, 2235, 198, 2, 2142, 68, 466, 17717, 305, 11036, 16175, 28749, 28141, 6118, 64, 16175, 28749, 401, 11361, 198, 2, 5231, 273, 25, 399, 18526, 34506, 40253, 20327, 337, 11437, 274, 198, 2, 12058, 64, 5267, 378, ...
2.289948
776
from typing import List, Optional from aiohttp import web from .helpers import error_to_json
[ 6738, 19720, 1330, 7343, 11, 32233, 198, 198, 6738, 257, 952, 4023, 1330, 3992, 198, 198, 6738, 764, 16794, 364, 1330, 4049, 62, 1462, 62, 17752, 628, 628, 198 ]
3.413793
29
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- import pyt...
[ 2, 16529, 45537, 198, 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 17168, 13789, 13, 4091, 13789, 13, 14116, 287, 262, 1628, 6808, 329, 198, 2, 5964, 1321, 13, 198, 2, 16529, 35937, 198, 1...
4.239437
284
# Copyright 2020 Huawei Technologies Co., Ltd.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 by ap...
[ 2, 15069, 12131, 43208, 21852, 1766, 1539, 12052, 13, 3237, 6923, 33876, 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, 1184...
2.017257
14,777
from socket import * from serverudp import fib server_name = 'fib_server' server_port = 1200 server_socket = socket(AF_INET, SOCK_STREAM) server_socket.bind(('', server_port)) server_socket.listen(5) while True: connection_sock, address = server_socket.accept() req = connection_sock.recv(1024) n = int.f...
[ 6738, 17802, 1330, 1635, 198, 6738, 4382, 463, 79, 1330, 12900, 628, 198, 15388, 62, 3672, 796, 705, 69, 571, 62, 15388, 6, 198, 15388, 62, 634, 796, 24938, 198, 198, 15388, 62, 44971, 796, 17802, 7, 8579, 62, 1268, 2767, 11, 311, ...
2.6
160
# Copyright 2016 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 by applicable law or ag...
[ 2, 15069, 1584, 3012, 3457, 13, 1439, 6923, 33876, 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, ...
2.906644
1,189
#!/usr/bin/env python import json from app.models import ( FrameworkLot, Lot, Framework, ContactInformation, Supplier, SupplierFramework, FrameworkAgreement, User, Service, ArchivedService, DraftService, AuditEvent, Brief, BriefUser, BriefResponse, BriefClarificationQuestion, DirectAwardProject, DirectAward...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 33918, 198, 6738, 598, 13, 27530, 1330, 357, 198, 220, 220, 220, 25161, 48601, 11, 15099, 11, 25161, 11, 14039, 21918, 11, 8105, 2505, 11, 8105, 2505, 21055, 6433, 11, 198, 220,...
3.131092
595
# # Copyright (c) 2020 Pangeanic SL. # # This file is part of NEC TM # (see https://github.com/shasha79/nectm). # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright owne...
[ 2, 198, 2, 15069, 357, 66, 8, 12131, 350, 858, 26277, 12419, 13, 198, 2, 198, 2, 770, 2393, 318, 636, 286, 41804, 21232, 198, 2, 357, 3826, 3740, 1378, 12567, 13, 785, 14, 1477, 14715, 3720, 14, 1606, 76, 737, 198, 2, 198, 2, ...
2.930993
826
#from ..items import DarkWebScrapingItem #from items import DarkWebScrapingItem from collections import Counter import lxml.html.clean from string import punctuation import logging import scrapy from scrapy.utils.log import configure_logging from nltk.corpus import stopwords from nltk import PorterStemmer f...
[ 2, 6738, 11485, 23814, 1330, 3801, 13908, 3351, 2416, 278, 7449, 201, 198, 2, 6738, 3709, 1330, 3801, 13908, 3351, 2416, 278, 7449, 201, 198, 6738, 17268, 1330, 15034, 201, 198, 11748, 300, 19875, 13, 6494, 13, 27773, 201, 198, 6738, ...
2.543391
749
n = input('digite um numero de 0 a 9999:') um = n[0] c = n[1] d = n[2] u = n[3] print('a unidade de milhar é {} a centena é {} a dezena é {} e a unidade é {}'.format(um, c, d, u))
[ 77, 796, 5128, 10786, 12894, 578, 23781, 997, 3529, 390, 657, 220, 257, 860, 17032, 25, 11537, 198, 388, 796, 299, 58, 15, 60, 198, 66, 796, 299, 58, 16, 60, 198, 67, 796, 299, 58, 17, 60, 198, 84, 796, 299, 58, 18, 60, 198, ...
2.08046
87
"""DO NOT MODIFY. Auto-generated by build_frontend script.""" CORE = "7962327e4a29e51d4a6f4ee6cca9acc3" UI = "860bc790706c7d99ec8be0412777a9cc"
[ 37811, 18227, 5626, 19164, 5064, 56, 13, 11160, 12, 27568, 416, 1382, 62, 8534, 437, 4226, 526, 15931, 198, 34, 6965, 796, 366, 41060, 1954, 1983, 68, 19, 64, 1959, 68, 4349, 67, 19, 64, 21, 69, 19, 1453, 21, 13227, 24, 4134, 18, ...
2.117647
68
"""probing statistics as dict Revision ID: 03ddf61b5b3c Revises: 8b783114dc9a Create Date: 2022-01-11 19:00:16.273260 """ import sqlmodel.sql.sqltypes # revision identifiers, used by Alembic. from sqlalchemy.dialects.postgresql import JSON from alembic import op revision = "03ddf61b5b3c" down_revision = "8b783114d...
[ 37811, 1676, 4623, 7869, 355, 8633, 198, 198, 18009, 1166, 4522, 25, 7643, 1860, 69, 5333, 65, 20, 65, 18, 66, 198, 18009, 2696, 25, 807, 65, 50165, 16562, 17896, 24, 64, 198, 16447, 7536, 25, 33160, 12, 486, 12, 1157, 678, 25, 40...
2.524138
145
"""Setup landsat-mosaic-tiler.""" from setuptools import setup, find_packages # Runtime requirements. inst_reqs = [ "Pillow", "cogeo-mosaic>=3.0a3", # For custom response headers "lambda-proxy @ git+https://github.com/kylebarron/lambda-proxy@dev#egg=lambda-proxy", "landsat-cogeo-mosaic==0.1.1", ...
[ 37811, 40786, 8604, 265, 12, 76, 8546, 291, 12, 83, 5329, 526, 15931, 198, 198, 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 628, 198, 2, 43160, 5359, 13, 198, 8625, 62, 42180, 82, 796, 685, 198, 220, 220, 220, 366, 4...
2.412975
632
from django.core.management.base import BaseCommand from django.utils import autoreload import os import sys import time INPROGRESS_FILE = 'testing.inprogress' def get_test_command(): """ Return an instance of the Command class to use. This method can be patched in to run a test command other than the on...
[ 6738, 42625, 14208, 13, 7295, 13, 27604, 13, 8692, 1330, 7308, 21575, 198, 6738, 42625, 14208, 13, 26791, 1330, 1960, 382, 2220, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 640, 198, 198, 1268, 4805, 49656, 7597, 62, 25664, 796, 7...
2.941288
528
#!/usr/bin/env python # -*- coding: utf-8 -*- '''Downloads the minimum necessary NLTK models and corpora required to support TextBlob's basic features. Use this script if you only intend to use TextBlob's default models. If you want to use other models, use download_corpora.py. Modify for your own needs. ''' from text....
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 7061, 6, 10002, 82, 262, 5288, 3306, 22879, 51, 42, 4981, 290, 3990, 64, 2672, 284, 1104, 198, 8206, 3629, 672, 338, ...
2.988827
179
import os import sys import time import math import argparse import numpy as np from tqdm import tqdm import torch from imageio import imwrite import utils from models.lifted_gan import LiftedGAN if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument("model", help="The path to th...
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 640, 198, 11748, 10688, 198, 11748, 1822, 29572, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 11748, 28034, 198, 198, 6738, 2939, 952, 1330, 545, ...
2.382979
376
# -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick # -------------------------------------------------------- """Fast R-CNN config system. This file specifies default config option...
[ 2, 20368, 22369, 198, 2, 12549, 371, 12, 18474, 198, 2, 15069, 357, 66, 8, 1853, 5413, 198, 2, 49962, 739, 383, 17168, 13789, 685, 3826, 38559, 24290, 329, 3307, 60, 198, 2, 22503, 416, 9847, 23837, 1477, 624, 198, 2, 20368, 22369, ...
2.73549
1,947
"""A L shape attached with a joint and constrained to not tip over. This example is also used in the Get Started Tutorial. """ __docformat__ = "reStructuredText" import sys, random import pygame from pygame.locals import * import pymunk import pymunk.pygame_util def add_ball(space): """Add a ball...
[ 37811, 32, 406, 5485, 7223, 351, 257, 6466, 290, 31070, 284, 407, 8171, 625, 13, 201, 198, 201, 198, 1212, 1672, 318, 635, 973, 287, 262, 3497, 31026, 36361, 13, 220, 201, 198, 37811, 201, 198, 201, 198, 834, 15390, 18982, 834, 796,...
2.360502
638
#User function Template for python3 def copyList(head): ''' param: head: head of linkedList to copy return: the head of the copied linked list the #output will be 1 if successfully copied ''' main_ptr = head copy = LinkedList() copy_ptr = copy.head # Copying the data and next pointer a...
[ 2, 12982, 2163, 37350, 329, 21015, 18, 198, 198, 4299, 4866, 8053, 7, 2256, 2599, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 5772, 25, 1182, 25, 220, 1182, 286, 6692, 8053, 284, 4866, 198, 220, 220, 220, 1441, 25, 262, 118...
2.139976
843
# coding=utf8 # Copyright 2018 JDCLOUD.COM # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
[ 2, 19617, 28, 40477, 23, 198, 198, 2, 15069, 2864, 28591, 5097, 2606, 35, 13, 9858, 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, ...
3.73743
179
"""Constants used by PyFlo""" FLO_USER_AGENT = 'PyFlo (https://github.com/rsnodgrass/pyflowater/)' FLO_V1_API_PREFIX = 'https://api.meetflo.com/api/v1' FLO_V2_API_PREFIX = 'https://api-gw.meetflo.com/api/v2' FLO_AUTH_URL = FLO_V1_API_PREFIX + '/users/auth' FLO_USERTOKENS_URL = FLO_V1_API_PREFIX + '/usertokens/...
[ 37811, 34184, 1187, 973, 416, 9485, 33574, 37811, 198, 198, 3697, 46, 62, 29904, 62, 4760, 3525, 796, 705, 20519, 33574, 357, 5450, 1378, 12567, 13, 785, 14, 3808, 77, 375, 29815, 14, 9078, 11125, 729, 14, 33047, 198, 198, 3697, 46, ...
1.836765
680
import os import logging class Waiter: """Responsible for taking care of basic functions (such as removing IO files, for example). """ @staticmethod def cleanIO(input_path, output_path): """[summary] Arguments: input_path {string} -- video-input.mp4 path ou...
[ 11748, 28686, 198, 11748, 18931, 628, 198, 4871, 15329, 2676, 25, 198, 220, 220, 220, 37227, 19309, 684, 856, 329, 2263, 1337, 286, 4096, 5499, 198, 220, 220, 220, 357, 10508, 355, 10829, 24418, 3696, 11, 329, 1672, 737, 198, 220, 220...
2.352349
298
from __future__ import print_function import os import sys from paraview import simple import vtk import numpy as np import scipy.sparse as ss from vtk.numpy_interface import dataset_adapter as dsa from vtk.util import numpy_support from vtk.vtkCommonCore import vtkIntArray # ----------------------------------------...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 6738, 1582, 615, 769, 1330, 2829, 198, 11748, 410, 30488, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 629, 541, 88, 13, 82, 29572, ...
3.093274
1,115
## www.pubnub.com - PubNub Real-time push service in the cloud. # coding=utf8 ## PubNub Real-time Push APIs and Notifications Framework ## Copyright (c) 2010 Stephen Blum ## http://www.pubnub.com/ ## ----------------------------------- ## PubNub 3.1 Real-time Push Cloud API ## ----------------------------------- im...
[ 2235, 7324, 13, 12984, 77, 549, 13, 785, 532, 8525, 45, 549, 6416, 12, 2435, 4574, 2139, 287, 262, 6279, 13, 220, 198, 2, 19617, 28, 40477, 23, 198, 198, 2235, 8525, 45, 549, 6416, 12, 2435, 23691, 23113, 290, 1892, 6637, 25161, 1...
3.57561
410
import requests import json import re import os.path import urllib import logging import sys import getopt sessionId = '' config = {} OK_STATUS = 200 ERROR_STATUS = 452 USER_NOT_LOGGED_IN_STATUS = 453 # needed since gerrit has a limit for query to 10 so this part has to be sliced GERRIT_NUM_OF_USERS_SLICE = 3 # th...
[ 11748, 7007, 198, 11748, 33918, 198, 11748, 302, 198, 11748, 28686, 13, 6978, 198, 11748, 2956, 297, 571, 198, 11748, 18931, 198, 11748, 25064, 198, 11748, 651, 8738, 198, 198, 29891, 7390, 796, 10148, 198, 11250, 796, 23884, 198, 198, ...
2.380952
483
# pylint:disable=line-too-long import logging from ...sim_type import SimTypeFunction, SimTypeShort, SimTypeInt, SimTypeLong, SimTypeLongLong, SimTypeDouble, SimTypeFloat, SimTypePointer, SimTypeChar, SimStruct, SimTypeFixedSizeArray, SimTypeBottom, SimUnion, SimTypeBool from ...calling...
[ 2, 279, 2645, 600, 25, 40223, 28, 1370, 12, 18820, 12, 6511, 198, 11748, 18931, 198, 198, 6738, 2644, 14323, 62, 4906, 1330, 3184, 6030, 22203, 11, 220, 220, 220, 220, 3184, 6030, 16438, 11, 3184, 6030, 5317, 11, 3184, 6030, 14617, ...
2.909672
3,598
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ """Mimic pyquick exercise -- optional extra exercise. Google's Python Class Read in the ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 532, 926, 198, 2, 15069, 3050, 3012, 3457, 13, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 198, 2, 2638, 1378, 2503, 13, 43073, 13, 2398, 14, 677, 4541, 14, 43, 2149, 24290,...
3.017259
985
from .utils import * from .dataset import * from .sentiment_dataset import * from .lang import * from .bleu import * from .beam_omt import * from .rouge import * from .masked_cross_entropy import * from .embedding_metrics import *
[ 6738, 764, 26791, 1330, 1635, 198, 6738, 764, 19608, 292, 316, 1330, 1635, 198, 6738, 764, 34086, 3681, 62, 19608, 292, 316, 1330, 1635, 198, 6738, 764, 17204, 1330, 1635, 198, 6738, 764, 903, 84, 1330, 1635, 198, 6738, 764, 40045, 62...
3.066667
75
# Generated by Django 3.2.2 on 2021-05-15 12:14 from django.db import migrations, models import django.db.models.deletion import mptt.fields
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 17, 319, 33448, 12, 2713, 12, 1314, 1105, 25, 1415, 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.803922
51
from prometheus_client.core import GaugeMetricFamily
[ 6738, 1552, 36916, 62, 16366, 13, 7295, 1330, 35094, 469, 9171, 1173, 24094, 628 ]
3.857143
14
import os import time import calendar import uuid import urllib.parse import urllib.request, urllib.error, urllib.parse import filters, safe_pickle, util import queue import logging from util import cmp from settings import settings
[ 11748, 28686, 198, 11748, 640, 198, 11748, 11845, 198, 11748, 334, 27112, 198, 11748, 2956, 297, 571, 13, 29572, 198, 11748, 2956, 297, 571, 13, 25927, 11, 2956, 297, 571, 13, 18224, 11, 2956, 297, 571, 13, 29572, 198, 11748, 16628, 1...
3.463768
69
from .niki import * from pyspark.sql import SparkSession spark = SparkSession.builder.getOrCreate()
[ 6738, 764, 77, 5580, 1330, 1635, 198, 6738, 279, 893, 20928, 13, 25410, 1330, 17732, 36044, 198, 198, 2777, 668, 796, 17732, 36044, 13, 38272, 13, 1136, 5574, 16447, 3419, 198 ]
3.258065
31
#!/usr/bin/python3 import os os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' import tensorflow as tf tf.compat.v1.logging.set_verbosity(tf.compat.v1.logging.ERROR) import model import time from PIL import Image, ImageFilter,ImageEnhance import random import numpy as np import sys from tqdm import tqdm import math IMG_SIZE...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 11748, 28686, 198, 418, 13, 268, 2268, 17816, 10234, 62, 8697, 47, 62, 23678, 62, 25294, 62, 2538, 18697, 20520, 796, 705, 17, 6, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 27...
2.610803
722
# from trainer import TrainerClassification import argparse import torch import numpy as np import os # os.environ["CUDA_VISIBLE_DEVICES"] = "3,6" parser = argparse.ArgumentParser(description='PyTorch implementation of pre-training of graph neural networks') parser.add_argument('--device', type=int, default=0, ...
[ 2, 422, 21997, 1330, 31924, 9487, 2649, 198, 11748, 1822, 29572, 198, 11748, 28034, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 198, 2, 28686, 13, 268, 2268, 14692, 43633, 5631, 62, 29817, 34563, 62, 39345, 34444, 8973, ...
2.138562
2,295
import torch import torch.nn as nn import torch.nn.functional as func from torchsupport.rl.trajectory import Trajectory, Experience
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 25439, 198, 198, 6738, 28034, 11284, 13, 45895, 13, 9535, 752, 652, 1330, 4759, 752, 652, 11, 16386, 198 ]
3.594595
37
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Martin Luessi <mluessi@nmr.mgh.harvard.edu> # Daniel Strohmeier <daniel.strohmeier@tu-ilmenau.de> # Nathalie Gayraud <nat.gayraud@gmail.com> # Kostiantyn Maksymenko <kostiantyn.maksymenko@gmail.com> # Samuel Desla...
[ 2, 46665, 25, 21000, 260, 20159, 3319, 1279, 1000, 87, 49078, 13, 4546, 3319, 31, 259, 7496, 13, 8310, 29, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5780, 6026, 408, 72, 1279, 76, 2290, 408, 72, 31, 21533, 81, 13, 76,...
2.251963
9,168
""" Palpiteiro web-app. """ import os import time import pandas as pd import streamlit as st import helper import palpiteiro.data import palpiteiro.draft # Constants. APP_NAME = "Palpiteiro" SUBTITLE = "Recomendação de escalações para o Cartola FC" THIS_FOLDER = os.path.dirname(__file__) FAVICON = os.path.join("img...
[ 37811, 3175, 2595, 7058, 3992, 12, 1324, 13, 37227, 198, 198, 11748, 28686, 198, 11748, 640, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 4269, 18250, 355, 336, 198, 198, 11748, 31904, 198, 11748, 6340, 2595, 7058, 13, 7890, ...
2.23423
1,934
__title__ = 'wms-downloader' __version__ = '1.0.3' __author__ = 'Jochen Klar' __license__ = 'MIT' __copyright__ = 'Copyright 2017 Jochen Klar'
[ 834, 7839, 834, 796, 705, 86, 907, 12, 15002, 263, 6, 198, 834, 9641, 834, 796, 705, 16, 13, 15, 13, 18, 6, 198, 834, 9800, 834, 796, 705, 41, 420, 831, 14770, 283, 6, 198, 834, 43085, 834, 796, 705, 36393, 6, 198, 834, 22163,...
2.423729
59
import os filePath = "C:\Users\Administrator\Desktop\res1" pathDir=eachFile(filePath) for allDir in pathDir: child = "C:\Users\Administrator\Desktop\res1" + allDir readfile(child)
[ 11748, 28686, 201, 198, 201, 198, 7753, 15235, 796, 366, 34, 7479, 14490, 59, 41862, 12392, 59, 36881, 59, 411, 16, 1, 201, 198, 6978, 35277, 28, 27379, 8979, 7, 7753, 15235, 8, 201, 198, 1640, 477, 35277, 287, 3108, 35277, 25, 201,...
2.4875
80
import json import plotly import plotly.express as px import plotly.graph_objects as go from plotly.subplots import make_subplots import pickle import pandas as pd import numpy as np import utilities as utils import constants as const def plot_map(date_index, total, iva, death, mobility): """Generates the map in...
[ 11748, 33918, 198, 11748, 7110, 306, 198, 11748, 7110, 306, 13, 42712, 355, 279, 87, 198, 11748, 7110, 306, 13, 34960, 62, 48205, 355, 467, 198, 6738, 7110, 306, 13, 7266, 489, 1747, 1330, 787, 62, 7266, 489, 1747, 198, 11748, 2298, ...
2.086365
3,161
# Copyright 2019 Nokia # # 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, softwa...
[ 2, 15069, 13130, 26182, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, 743, 7330, 257...
2.837758
339
#Faça um programa que leia a largura e a altura de uma parede em metros, calcule a sua área e a quantidade de tinta #necessária para pinta-la, sabendo que cada litro de tinta, pinta uma área de 2m².
[ 2, 50110, 50041, 23781, 1430, 64, 8358, 443, 544, 257, 2552, 5330, 304, 257, 5988, 5330, 390, 334, 2611, 279, 1144, 68, 795, 1138, 4951, 11, 2386, 23172, 257, 424, 64, 6184, 94, 21468, 304, 257, 5554, 312, 671, 390, 34791, 64, 198, ...
2.605263
76
from django.conf.urls import patterns, url from . import views urlpatterns = patterns('', url(r'^$', views.script_runner_index, name='script_runner_index'), url(r'^run_munger/(?P<munger_builder_id>[0-9]+)$', views.run_munger_output, name='run_munger_output'), url(r'^build_munger/(?P<munger_builder_...
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 7572, 11, 19016, 201, 198, 201, 198, 6738, 764, 1330, 5009, 201, 198, 201, 198, 6371, 33279, 82, 796, 7572, 10786, 3256, 201, 198, 220, 220, 220, 19016, 7, 81, 6, 61, 3, 3256, 500...
2.402439
164
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: security.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _refl...
[ 2, 2980, 515, 416, 262, 8435, 11876, 17050, 13, 220, 8410, 5626, 48483, 0, 198, 2, 2723, 25, 2324, 13, 1676, 1462, 198, 198, 11748, 25064, 198, 62, 65, 28, 17597, 13, 9641, 62, 10951, 58, 15, 60, 27, 18, 290, 357, 50033, 2124, 2...
2.348149
10,372
#!/usr/bin/env python from PyQt5.QtWidgets import (QApplication, QWidget, QGridLayout, QVBoxLayout, QHBoxLayout, QLabel, QLineEdit, QPushButton) import PyQt5.QtCore as QtCore import PyQt5.QtGui as QtGui import sip import cmdFWMain as cmdFW from collections impo...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 54, 312, 11407, 1330, 357, 48, 23416, 11, 1195, 38300, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220...
2.182222
225
import torch.utils.data as data import numpy as np from scipy.misc import imread from path import Path import random import os class SequenceFolder(data.Dataset): """A sequence data loader where the files are arranged in this way: root/scene_1/0000000.jpg root/scene_1/0000001.jpg .. ...
[ 11748, 28034, 13, 26791, 13, 7890, 355, 1366, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 13, 44374, 1330, 545, 961, 198, 6738, 3108, 1330, 10644, 198, 11748, 4738, 198, 11748, 28686, 628, 198, 198, 4871, 45835, 41092, ...
2.668449
187
import time import socketserver from typing import Tuple, List from types import FunctionType from .packet import OSCPacket from .bundle import _BUNDLE_PREFIX from .osc_types import OSCParseError
[ 11748, 640, 198, 11748, 37037, 18497, 198, 198, 6738, 19720, 1330, 309, 29291, 11, 7343, 198, 6738, 3858, 1330, 15553, 6030, 198, 198, 6738, 764, 8002, 316, 1330, 440, 48956, 8317, 198, 6738, 764, 65, 31249, 1330, 4808, 33, 4944, 35, ...
3.355932
59
# -*- coding: utf-8 -*- import tensorflow as tf import csv import numpy as np def relu(x, alpha=0.5, max_value=None): '''ReLU. alpha: slope of negative section. ''' negative_part = tf.nn.relu(-x) x = tf.nn.relu(x) if max_value is not None: x = tf.clip_by_value(x, tf.cast...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 11748, 11192, 273, 11125, 355, 48700, 201, 198, 11748, 269, 21370, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 201, 198, 201, 198, 4299, 823, 84, 7, 87, 11...
2.166767
1,655
import base58 import hashlib import re import os import validators as valid from flask import abort import boto3 from boto3.dynamodb.conditions import Key if os.getenv("REDIS_ENABLED") is not None: import redis redis_host = os.getenv("REDIS_HOST", default="localhost") redis_client = redis.Redis(host=redis...
[ 11748, 2779, 3365, 198, 11748, 12234, 8019, 198, 11748, 302, 198, 11748, 28686, 198, 11748, 4938, 2024, 355, 4938, 198, 6738, 42903, 1330, 15614, 198, 11748, 275, 2069, 18, 198, 6738, 275, 2069, 18, 13, 67, 4989, 375, 65, 13, 17561, 1...
2.504615
325
"""Unit tests for Remittance Doc Aim to excercise RemittanceDoc """ from unittest import TestCase, main from remittance import RemittanceDoc
[ 37811, 26453, 5254, 329, 3982, 47912, 14432, 198, 198, 49945, 284, 409, 2189, 37561, 3982, 47912, 23579, 198, 37811, 198, 6738, 555, 715, 395, 1330, 6208, 20448, 11, 1388, 198, 198, 6738, 816, 47912, 1330, 3982, 47912, 23579, 628, 198 ]
3.625
40
from pcc.lex.token import TokenKind from pcc.lex.lexer import Lexer from pcc.ast.ast import * class Parser(object): """Parser for the Kaleidoscope language. After the parser is created, invoke parse_toplevel multiple times to parse Kaleidoscope source into an AST. """ # toplevel ::= definition |...
[ 6738, 279, 535, 13, 2588, 13, 30001, 1330, 29130, 35854, 198, 6738, 279, 535, 13, 2588, 13, 2588, 263, 1330, 17210, 263, 198, 6738, 279, 535, 13, 459, 13, 459, 1330, 1635, 628, 198, 4871, 23042, 263, 7, 15252, 2599, 198, 220, 220, ...
2.287831
1,890
from django.contrib import admin from .models import Relation, Funding, Proposal, Institution @admin.register(Relation) @admin.register(Funding) @admin.register(Proposal) @admin.register(Institution)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 198, 6738, 764, 27530, 1330, 4718, 341, 11, 35249, 11, 1041, 40007, 11, 29426, 628, 198, 31, 28482, 13, 30238, 7, 6892, 341, 8, 628, 198, 31, 28482, 13, 30238, 7, 24553, 278, 8, ...
3.265625
64
"""MediaWiki API 1.31.""" import datetime from typing import Any, BinaryIO, Dict, Iterator, List, Optional import requests import requests_toolbelt from mediawiki import (CanNotDelete, MediaWikiAPI, MediaWikiAPIMiscError, PageProtected, StatusCodeError) class MediaWikiAPI1_31(MediaWikiAPI): ...
[ 37811, 13152, 32603, 7824, 352, 13, 3132, 526, 15931, 198, 11748, 4818, 8079, 198, 6738, 19720, 1330, 4377, 11, 45755, 9399, 11, 360, 713, 11, 40806, 1352, 11, 7343, 11, 32233, 198, 198, 11748, 7007, 198, 11748, 7007, 62, 25981, 37976, ...
1.973164
7,490
##### # # This class is part of the Programming the Internet of Things project. # # It is provided as a simple shell to guide the student and assist with # implementation for the Programming the Internet of Things exercises, # and designed to be modified by the student as needed. # import logging from programmingth...
[ 4242, 2, 198, 2, 220, 198, 2, 770, 1398, 318, 636, 286, 262, 30297, 262, 4455, 286, 11597, 1628, 13, 198, 2, 220, 198, 2, 632, 318, 2810, 355, 257, 2829, 7582, 284, 5698, 262, 3710, 290, 3342, 351, 198, 2, 7822, 329, 262, 30297,...
3.96648
179
""" Problem: Given a linked list, uniformly shuffle the nodes. What if we want to prioritize space over time? """ from random import randint from DataStructures.LinkedList import LinkedList if __name__ == "__main__": ll = LinkedList() for i in range(1, 6): ll.add(i) print(ll) shuffle(ll)...
[ 37811, 198, 40781, 25, 198, 198, 15056, 257, 6692, 1351, 11, 42096, 36273, 262, 13760, 13, 1867, 611, 356, 765, 284, 32980, 2272, 198, 2502, 640, 30, 198, 37811, 198, 198, 6738, 4738, 1330, 43720, 600, 198, 198, 6738, 6060, 44909, 942...
2.544304
158
import matplotlib.pyplot as pl import numpy as np X = [ [10,8,13,9,11,14,6, 4,12,7,5], [10,8,13,9,11,14,6, 4,12,7,5], [10,8,13,9,11,14,6, 4,12,7,5], [8, 8, 8,8, 8, 8,8,19, 8,8,8]] Y = [ [8.04,6.95, 7.58,8.81,8.33,9.96,7.24, 4.26,10.84,4.82,5.68], [9.14,8.14, 8.74,8.77,9.26,8.10,6.1...
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 198, 11748, 299, 32152, 355, 45941, 198, 198, 55, 796, 685, 220, 220, 685, 940, 11, 23, 11, 1485, 11, 24, 11, 1157, 11, 1415, 11, 21, 11, 604, 11, 1065, 11, 22, 11, 20, 4357, ...
1.584635
768
import matplotlib.pyplot as plt import numpy as np import pandas as pd from matplotlib.transforms import offset_copy import cartopy.crs as ccrs import cartopy.io.img_tiles as cimgt import simplekml import geopy from geopy.distance import geodesic ########################################################################...
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 2603, 29487, 8019, 13, 7645, 23914, 1330, 11677, 62, 30073, 198, 11748, 6383, 11081, 13, 66, ...
5.816667
180
from __future__ import absolute_import from __future__ import division from __future__ import print_function import argparse import tensorflow as tf from datasets import dataset_factory from nets import nets_factory parser = argparse.ArgumentParser() parser.add_argument('--batch_size', default=100, type=int, help='ba...
[ 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, 198, 11748, 1822, 29572, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 40522, 1330,...
2.961433
363
# coding: utf-8 BASE = 1 DESTINATION = 2 # 车辆状态
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 33, 11159, 796, 352, 198, 35, 6465, 1268, 6234, 796, 362, 628, 198, 2, 5525, 121, 99, 164, 122, 228, 163, 232, 35050, 222, 223, 628 ]
1.485714
35
# Special online streams, Heavy Ions # # import FWCore.ParameterSet.Config as cms # last update: $Date: 2010/11/18 09:19:15 $ by $Author: argiro $ # $Id: AlCaRecoStream_SpecialsHI_cff.py,v 1.4 2010/11/18 09:19:15 argiro Exp $ # ECAL calibration with eta from Calibration.EcalAlCaRecoProducers.ALCARECOEcalCalEtaCali...
[ 2, 6093, 2691, 15190, 11, 14089, 314, 684, 198, 2, 198, 2, 628, 198, 198, 11748, 48849, 14055, 13, 36301, 7248, 13, 16934, 355, 269, 907, 198, 198, 2, 938, 4296, 25, 720, 10430, 25, 3050, 14, 1157, 14, 1507, 7769, 25, 1129, 25, ...
2.510726
1,212
import os import unittest import numpy as np from fireworks import FWorker from fireworks.core.rocket_launcher import rapidfire from atomate.vasp.powerups import use_fake_vasp from atomate.vasp.workflows.presets.core import wf_nmr from atomate.utils.testing import AtomateTest from pymatgen.core import Structure mo...
[ 11748, 28686, 198, 11748, 555, 715, 395, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 26056, 1330, 376, 12468, 263, 198, 6738, 26056, 13, 7295, 13, 30431, 62, 38722, 2044, 1330, 5801, 6495, 198, 198, 6738, 22037, 378, 13, ...
2.835351
413
""" Delete old Appr tables. Revision ID: d17c695859ea Revises: 5d463ea1e8a8 Create Date: 2018-07-16 15:21:11.593040 """ # revision identifiers, used by Alembic. revision = "d17c695859ea" down_revision = "5d463ea1e8a8" import sqlalchemy as sa from sqlalchemy.sql import table, column from util.migrate import UTF8LongT...
[ 37811, 198, 38727, 1468, 2034, 81, 8893, 13, 198, 198, 18009, 1166, 4522, 25, 288, 1558, 66, 3388, 3365, 3270, 18213, 198, 18009, 2696, 25, 642, 67, 38380, 18213, 16, 68, 23, 64, 23, 198, 16447, 7536, 25, 2864, 12, 2998, 12, 1433, ...
2.56391
133
'''5. Faça um programa que recebe um número inteiro do usuário e imprime na tela a quantidade de divisores desse número e quais são eles.''' print('CHECKING A NUMBER DIVIDERS') print('-'*40) #Receiving input of data. number = int(input('Enter a number: ')) while number!=0: if number%2==0: print(number, ...
[ 7061, 6, 20, 13, 18350, 50041, 23781, 1430, 64, 8358, 1407, 1350, 23781, 299, 21356, 647, 78, 493, 68, 7058, 466, 514, 84, 6557, 27250, 304, 848, 81, 524, 12385, 256, 10304, 257, 5554, 312, 671, 390, 2659, 271, 2850, 748, 325, 299, ...
2.158228
316
import requests import aiohttp import asyncio from dataclasses import dataclass from lazyops.lazyclasses import lazyclass from typing import List, Dict, Any, Optional @lazyclass @dataclass @lazyclass @dataclass @lazyclass @dataclass @lazyclass @dataclass
[ 198, 11748, 7007, 198, 11748, 257, 952, 4023, 198, 11748, 30351, 952, 198, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 6738, 16931, 2840, 13, 75, 12582, 37724, 1330, 16931, 4871, 198, 198, 6738, 19720, 1330, 7343, 11, 360,...
2.854167
96
from setuptools import setup, find_packages with open('README.md') as file: long_description = file.read() # specify requirements of your package here REQUIREMENTS = ['pyperclip'] # some more details CLASSIFIERS = [ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'To...
[ 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 198, 4480, 1280, 10786, 15675, 11682, 13, 9132, 11537, 355, 2393, 25, 198, 220, 220, 220, 890, 62, 11213, 796, 2393, 13, 961, 3419, 220, 198, 220, 220, 198, 220, 220, 19...
2.678201
578
#!/usr/bin/env python3 # Calculates statistics across all data points import sys from collections import defaultdict from collections import Counter import numpy as np counts = defaultdict(lambda: []) for line in sys.stdin: s = line.split() if len(s) == 3: m, t, steps = int(s[0]), int(s[1]), int(s[2...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 27131, 689, 7869, 1973, 477, 1366, 2173, 198, 198, 11748, 25064, 198, 6738, 17268, 1330, 4277, 11600, 198, 6738, 17268, 1330, 15034, 198, 11748, 299, 32152, 355, 45941, 198, ...
2.421384
318
name = "jordan wimberley" for letter in name: print(letter)
[ 3672, 796, 366, 73, 7350, 266, 320, 527, 1636, 1, 198, 1640, 3850, 287, 1438, 25, 198, 220, 220, 220, 3601, 7, 9291, 8, 628 ]
2.6
25
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Date : 2016-04-21 21:12:38 # @Author : Bluethon (j5088794@gmail.com) # @Link : http://github.com/bluethon from flask import render_template, request, jsonify from . import main # noinspection PyUnusedLocal @main.app_errorhandler(403) # errorhandler只有蓝本中错误才能触...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2488, 10430, 220, 220, 220, 1058, 1584, 12, 3023, 12, 2481, 2310, 25, 1065, 25, 2548, 198, 2, 2488, 13838, 220, ...
2.112108
223
#!/usr/bin/env python3 import json import re import logging from franken import crane with open("conf/clone.json") as cfg: workList = json.load(cfg) for repo_index, repo_item in workList.items(): logging.info("Processing " + repo_index) repo_name = repo_item["sourceRepo"] # extract source tag p...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 33918, 198, 11748, 302, 198, 11748, 18931, 198, 198, 6738, 14346, 268, 1330, 41175, 198, 198, 4480, 1280, 7203, 10414, 14, 21018, 13, 17752, 4943, 355, 30218, 70, 25, 1...
2.316354
746
""" Key Take Aways: 1. See how the values are changed in the recursive call stack """
[ 37811, 198, 9218, 7214, 317, 1322, 25, 198, 16, 13, 4091, 703, 262, 3815, 389, 3421, 287, 262, 45115, 869, 8931, 198, 37811, 220 ]
3.583333
24
#!/usr/bin/python3 import sys import string import re import json import logging stop_words = ('went','similar','k','truley','think','thanks','really','good','thats','deleted','get','yes','would','dont','im','also','one','like','ourselves', 'hers', 'between', 'yourself', 'but', 'again', 'there', 'about', 'once', 'dur...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 11748, 25064, 198, 11748, 4731, 198, 11748, 302, 198, 11748, 33918, 198, 11748, 18931, 198, 198, 11338, 62, 10879, 796, 19203, 19963, 41707, 38610, 41707, 74, 41707, 83, 622, 1636, 417...
2.452707
1,533
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: departure/board/departure.proto import sys _b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf im...
[ 2, 2980, 515, 416, 262, 8435, 11876, 17050, 13, 220, 8410, 5626, 48483, 0, 198, 2, 2723, 25, 12928, 14, 3526, 14, 10378, 433, 495, 13, 1676, 1462, 198, 198, 11748, 25064, 198, 198, 62, 65, 796, 25064, 13, 9641, 62, 10951, 58, 15, ...
1.949753
23,265
"""Tests for the HAPServer.""" from socket import timeout from unittest.mock import Mock, MagicMock, patch import pytest from pyhap import hap_server @patch('pyhap.hap_server.HAPServer.server_bind', new=MagicMock()) @patch('pyhap.hap_server.HAPServer.server_activate', new=MagicMock()) def test_finish_request_pops_s...
[ 37811, 51, 3558, 329, 262, 367, 2969, 10697, 526, 15931, 198, 6738, 17802, 1330, 26827, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 44123, 11, 6139, 44, 735, 11, 8529, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 12972, 45897, 1330,...
2.528596
577
from django.apps import AppConfig
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
3.888889
9
import numpy as np import matplotlib.pyplot as plt from collections import defaultdict saved = [ "din", "dout4", "dout8", ] if __name__ == "__main__": data = read_test_data() plot_data(data)
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 17268, 1330, 4277, 11600, 198, 198, 82, 9586, 796, 685, 198, 220, 220, 220, 366, 25194, 1600, 198, 220, 220, 220, 366, 67, 448, ...
2.358696
92
"""The main Daylio parser package."""
[ 37811, 464, 1388, 3596, 48590, 30751, 5301, 526, 15931, 198 ]
3.8
10
# lists all tags used in a given adsh import datetime import csv import h5py as h5 import datasets_lib as ds # store starting time for calculating total processing time time_start = datetime.datetime.now() # set path to folder Datasets/ path = 'D:/DataSets/' # we are looking for this adsh adsh_int = 23189 index_a...
[ 2, 8341, 477, 15940, 973, 287, 257, 1813, 512, 1477, 198, 198, 11748, 4818, 8079, 198, 11748, 269, 21370, 198, 11748, 289, 20, 9078, 355, 289, 20, 198, 11748, 40522, 62, 8019, 355, 288, 82, 198, 198, 2, 3650, 3599, 640, 329, 26019, ...
2.149646
989
""" byceps.application ~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2021 Jochen Kupperschmidt :License: Revised BSD (see `LICENSE` file for details) """ from __future__ import annotations from http import HTTPStatus from importlib import import_module import os from pathlib import Path from typing import Any, Callable, Option...
[ 37811, 198, 1525, 344, 862, 13, 31438, 198, 27156, 4907, 198, 198, 25, 15269, 25, 4793, 12, 1238, 2481, 449, 420, 831, 509, 7211, 364, 354, 21184, 198, 25, 34156, 25, 31492, 347, 10305, 357, 3826, 4600, 43, 2149, 24290, 63, 2393, 32...
2.770575
2,175
# -*- coding: UTF-8 -*- import vk_auth import json import urllib2 from urllib import urlencode
[ 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 198, 11748, 410, 74, 62, 18439, 198, 11748, 33918, 198, 11748, 2956, 297, 571, 17, 198, 6738, 2956, 297, 571, 1330, 2956, 11925, 8189, 198, 220, 220, 220, 220, 220, 220, 220, ...
2.288889
45
import warnings from mojap_metadata.metadata.metadata import ( Metadata, _unpack_complex_data_type, _metadata_complex_dtype_names, ) from mojap_metadata.converters import ( BaseConverter, _flatten_and_convert_complex_data_type, ) import pyarrow as pa from typing import Tuple, List, Any, Union, Cal...
[ 11748, 14601, 198, 198, 6738, 6941, 73, 499, 62, 38993, 13, 38993, 13, 38993, 1330, 357, 198, 220, 220, 220, 3395, 14706, 11, 198, 220, 220, 220, 4808, 403, 8002, 62, 41887, 62, 7890, 62, 4906, 11, 198, 220, 220, 220, 4808, 38993, ...
2.339884
1,730
# -*- coding: utf-8 -*- # Copyright (c) Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. import numpy as np from os import path as op from ..util import load_data_file # This is the package data dir, not the dir for config, etc. DATA_DIR = op.join...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 357, 66, 8, 6911, 9078, 7712, 4816, 13, 1439, 6923, 33876, 13, 198, 2, 4307, 6169, 739, 262, 357, 3605, 8, 347, 10305, 13789, 13, 4091, 38559, 24290, 13, 1...
2.44499
1,018
import unittest from mesa_geo.geoagent import GeoAgent, AgentCreator from shapely.geometry import Point if __name__ == "__main__": unittest.main()
[ 11748, 555, 715, 395, 198, 6738, 18842, 64, 62, 469, 78, 13, 469, 78, 25781, 1330, 32960, 36772, 11, 15906, 16719, 273, 198, 6738, 5485, 306, 13, 469, 15748, 1330, 6252, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 8...
2.8
55
import configparser import copy import cProfile import csv from datetime import datetime import itertools import json import logging import os.path import re import traceback from argparse import ArgumentParser import numpy as np import pandas from plotly import express as px from psychsim.probability import Distribu...
[ 11748, 4566, 48610, 198, 11748, 4866, 198, 11748, 269, 37046, 198, 11748, 269, 21370, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 340, 861, 10141, 198, 11748, 33918, 198, 11748, 18931, 198, 11748, 28686, 13, 6978, 198, 11748, 302...
3.037433
374
from .mujoco_env import MujocoEnv from rllab.core.serializable import Serializable import numpy as np from rllab.envs.base import Step from rllab.misc.overrides import overrides from rllab.misc import logger import xml.etree.ElementTree as elemTree
[ 6738, 764, 76, 23577, 25634, 62, 24330, 1330, 8252, 73, 25634, 4834, 85, 198, 6738, 374, 297, 397, 13, 7295, 13, 46911, 13821, 1330, 23283, 13821, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 374, 297, 397, 13, 268, 14259, 13, ...
3.036145
83