content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
# Copyright 2019 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from pants.backend.python.lint import python_format_target, python_lint_target from pants.backend.python.lint.black import rules as black_rules
[ 2, 15069, 13130, 41689, 1628, 20420, 357, 3826, 27342, 9865, 3843, 20673, 13, 9132, 737, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 3826, 38559, 24290, 737, 628, 198, 6738, 12581, 13, 1891, 437, 13, 29412, 13,...
3.61039
77
# -*- coding: utf-8 -*- """ Created on Sat Aug 01 11:56:10 2015 @author: Zombie.Soc//similarities """ import matplotlib.pyplot as plt import matplotlib.image as mpimg print ("Reconstruction of Thomson spectrometer parabolas - to check parameters") #Parameters # !!! 0 point coordinates in ...
[ 201, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 41972, 319, 7031, 2447, 5534, 1367, 25, 3980, 25, 940, 1853, 201, 198, 201, 198, 31, 9800, 25, 14609, 13, 37949, 1003, 38610, 871, 201,...
1.858093
1,353
from selenium import webdriver import sys from os.path import join, abspath, dirname import logging from selenium.webdriver.remote.remote_connection import LOGGER as ghostdriver_logger from selenium.webdriver.common.desired_capabilities import DesiredCapabilities from locators import homePage from selenium.webdriver.su...
[ 6738, 384, 11925, 1505, 1330, 3992, 26230, 198, 11748, 25064, 198, 6738, 28686, 13, 6978, 1330, 4654, 11, 2352, 6978, 11, 26672, 3672, 198, 11748, 18931, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 47960, 13, 47960, 62, 38659, 13...
3.666667
156
from __future__ import absolute_import from __future__ import division from __future__ import print_function import io import json import math import os import numpy as np from PIL import Image from PIL import ImageFile import tensorflow.compat.v2 as tf from absl import logging from absl import app from absl import...
[ 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, 198, 11748, 33245, 198, 11748, 33918, 198, 11748, 10688, 198, 11748, 28686, 198, 198, ...
2.445607
3,153
#!/usr/bin/python3 from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import serialization from cryptography.hazmat.primitives.asymmetric import rsa from cryptography.hazmat.primitives import hashes from cryptography.hazmat.primitives.asymmetric import padding import sys impor...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 6738, 45898, 13, 71, 1031, 6759, 13, 1891, 2412, 1330, 4277, 62, 1891, 437, 198, 6738, 45898, 13, 71, 1031, 6759, 13, 19795, 20288, 1330, 11389, 1634, 198, 6738, 45898, 13, 71, 103...
2.848341
211
# Generated by Django 3.0.7 on 2020-06-15 22:15 from django.conf import settings from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 22, 319, 12131, 12, 3312, 12, 1314, 2534, 25, 1314, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14...
3.019231
52
from abc import ABC, abstractmethod from dataclasses import dataclass, field from fairseq.dataclass import ChoiceEnum, FairseqDataclass STEP_MODE_CHOICE = ChoiceEnum(['epoch', 'subepoch']) @dataclass
[ 6738, 450, 66, 1330, 9738, 11, 12531, 24396, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 11, 2214, 198, 198, 6738, 3148, 41068, 13, 19608, 330, 31172, 1330, 18502, 4834, 388, 11, 7011, 41068, 27354, 330, 31172, 198, 198, 42135,...
3.014706
68
n = int(input('Digite um numero: ')) a = n * 2 b = n * 3 c = n ** (1/2) print('O dobro do numero seria {} \n O triplo seria {} \n A raiz quadrada seria {:.2f}'.format(a, b, c))
[ 77, 796, 493, 7, 15414, 10786, 19511, 578, 23781, 997, 3529, 25, 705, 4008, 198, 198, 64, 796, 299, 1635, 362, 198, 65, 796, 299, 1635, 513, 198, 66, 796, 299, 12429, 357, 16, 14, 17, 8, 198, 198, 4798, 10786, 46, 466, 7957, 466...
2.130952
84
# FAST拐点检测,拐点检测Opencv有七种,且比skimage的方法快的多 from skimage import data, feature, img_as_float, io import numpy as np image = img_as_float(io.imread('/home/qiao/PythonProjects/Scikit-image_On_CT/Test_Img/10.jpg')) gamma_corrected = feature.corner_fast(image) points = feature.corner_peaks(gamma_corrected) print(points) io.ims...
[ 2, 376, 11262, 162, 233, 238, 163, 224, 117, 162, 96, 222, 38184, 233, 171, 120, 234, 162, 233, 238, 163, 224, 117, 162, 96, 222, 38184, 233, 11505, 33967, 17312, 231, 10310, 225, 163, 100, 235, 171, 120, 234, 10310, 242, 162, 107...
1.965517
174
import socket from .Packet import Packet from .PacketIpHeader import PacketIpv4Header, PacketIpv6Header from hpimdm.tree.hpim_globals import MSG_FORMAT from hpimdm.utils import TYPE_CHECKING if TYPE_CHECKING: from hpimdm.Interface import Interface if MSG_FORMAT == "BINARY": from .PacketHPIMHeader import Packe...
[ 11748, 17802, 198, 6738, 764, 47, 8317, 1330, 6400, 316, 198, 6738, 764, 47, 8317, 40, 79, 39681, 1330, 6400, 316, 40, 79, 85, 19, 39681, 11, 6400, 316, 40, 79, 85, 21, 39681, 198, 6738, 27673, 320, 36020, 13, 21048, 13, 24831, 32...
2.824176
182
import time import RPi.GPIO as GPIO #Python Package Reference: https://pypi.org/project/RPi.GPIO/ # Code taken from https://learn.sparkfun.com/tutorials/raspberry-pi-safe-reboot-and-shutdown-button using the last example to minimize resources used (sleep function) # Pin definition reset_shutdown_pin = 17 # Suppress ...
[ 11748, 640, 198, 11748, 25812, 72, 13, 16960, 9399, 355, 50143, 1303, 37906, 15717, 20984, 25, 3740, 1378, 79, 4464, 72, 13, 2398, 14, 16302, 14, 20031, 72, 13, 16960, 9399, 14, 198, 198, 2, 6127, 2077, 422, 3740, 1378, 35720, 13, 2...
2.799699
664
import time import board import adafruit_thermistor # these values work with the Adafruit CircuitPlayground Express. # they may work with other thermistors as well, as they're fairly standard, # though the pin will likely need to change (ie board.A1) # pylint: disable=no-member pin = board.TEMPERATURE resisto...
[ 11748, 640, 201, 198, 11748, 3096, 201, 198, 11748, 512, 1878, 4872, 62, 490, 76, 32380, 201, 198, 201, 198, 2, 777, 3815, 670, 351, 262, 1215, 1878, 4872, 13588, 11002, 2833, 10604, 13, 201, 198, 2, 484, 743, 670, 351, 584, 21969, ...
2.89272
261
from distutils.core import setup setup( name = 'jellylanguage', version = '0.1.31', packages = [ 'jelly' ], scripts = [ 'scripts/jelly' ], install_requires = [ 'sympy' ] )
[ 6738, 1233, 26791, 13, 7295, 1330, 9058, 198, 198, 40406, 7, 198, 197, 3672, 796, 705, 73, 695, 2645, 9000, 3256, 198, 197, 9641, 796, 705, 15, 13, 16, 13, 3132, 3256, 198, 197, 43789, 796, 685, 198, 197, 197, 6, 73, 6148, 6, 19...
2.174419
86
from distutils.core import setup, Extension if __name__ == "__main__": main()
[ 6738, 1233, 26791, 13, 7295, 1330, 9058, 11, 27995, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 197, 12417, 3419 ]
3.16
25
from typing import Optional, Dict, List, Tuple from bxcommon.messages.abstract_block_message import AbstractBlockMessage from bxcommon.network.ip_endpoint import IpEndpoint from bxcommon.utils.expiring_dict import ExpiringDict from bxcommon.utils.object_hash import Sha256Hash from bxgateway import log_messages from bx...
[ 6738, 19720, 1330, 32233, 11, 360, 713, 11, 7343, 11, 309, 29291, 198, 198, 6738, 275, 87, 11321, 13, 37348, 1095, 13, 397, 8709, 62, 9967, 62, 20500, 1330, 27741, 12235, 12837, 198, 6738, 275, 87, 11321, 13, 27349, 13, 541, 62, 437...
3.473054
167
#!/usr/bin/python #-*- mode: python; coding: utf-8 -*- #import simpleaudio as sa # This need wav files # avconv -i audio/d/dog.mp3 -acodec pcm_u8 -ar 8000 audio/d/dog.wav import time import os from gtts import gTTS import pyglet from subprocess import call
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 12, 9, 12, 4235, 25, 21015, 26, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 11748, 2829, 24051, 355, 473, 1303, 770, 761, 266, 615, 3696, 198, 2, 1196, 42946, 532, 72, 65...
2.584158
101
import sys sys.path.insert(0, '../models') from get_data import GetData # from python.ultilities.get_data import GetData import unittest import csv if __name__ == '__main__': unittest.main()
[ 11748, 25064, 198, 17597, 13, 6978, 13, 28463, 7, 15, 11, 705, 40720, 27530, 11537, 198, 6738, 651, 62, 7890, 1330, 3497, 6601, 198, 2, 422, 21015, 13, 586, 2410, 13, 1136, 62, 7890, 1330, 3497, 6601, 198, 11748, 555, 715, 395, 198,...
2.867647
68
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from django.test import TestCase from django.contrib import admin from physical.admin.engine_type import EngineTypeAdmin from physical.models import EngineType SEARCH_FIELDS = ('name', ) LIST_FILTER = ('is_in_memory', ) LIST_FIELDS = ('n...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 28000, 1098, 62, 17201, 874, 198, 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 42625, 14208, 13, 3642, ...
2.984127
126
# dbitem.py import re # Auto detect and split labels/cmd # Return a string suitable for substring searching
[ 2, 288, 2545, 368, 13, 9078, 198, 11748, 302, 628, 198, 220, 220, 220, 1303, 11160, 4886, 290, 6626, 14722, 14, 28758, 628, 220, 220, 220, 1303, 8229, 257, 4731, 11080, 329, 3293, 1806, 10342, 198 ]
3.305556
36
from django.template.base import Variable, VariableDoesNotExist from django.test import SimpleTestCase
[ 6738, 42625, 14208, 13, 28243, 13, 8692, 1330, 35748, 11, 35748, 13921, 3673, 3109, 396, 198, 6738, 42625, 14208, 13, 9288, 1330, 17427, 14402, 20448, 628, 198 ]
3.888889
27
# Import the agent class from .devicemanager import DeviceManager
[ 2, 17267, 262, 5797, 1398, 198, 6738, 764, 7959, 291, 8463, 3536, 1330, 16232, 13511, 198 ]
4.125
16
def originalDigits(self, s: str) -> str: """ credit to ZitaoWang for being a beast (adapted sol.) The key to this solution is in the set-up in identifying that each number has its own unique character that defines it. Some don't have this characteristic but they become d...
[ 4299, 2656, 19511, 896, 7, 944, 11, 264, 25, 965, 8, 4613, 965, 25, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 3884, 284, 1168, 5350, 78, 54, 648, 329, 852, 257, 13824, 357, 42552, 276...
1.912145
774
# coding=utf-8 # Django settings for bluebottle project. import os, datetime # Import global settings for overriding without throwing away defaults from django.conf import global_settings from django.utils.translation import ugettext as _ from admin_dashboard import * from .payments import * # Set PROJECT_ROOT to th...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 37770, 6460, 329, 4171, 10985, 293, 1628, 13, 198, 198, 11748, 28686, 11, 4818, 8079, 198, 198, 2, 17267, 3298, 6460, 329, 44987, 1231, 9644, 1497, 26235, 198, 6738, 42625, 14208, 13, 10414, 1330, ...
2.622068
7,758
#!/usr/bin/env python # -*- coding: utf-8 -*- #Los valores reales eran #La altura inicial es 0.5 [m] #La gravedad es 9.8 [m/s^2] #El ángulo es 25 [grados] #La velocidad inicial es 5 [m/s] #El Xmax es 2.724 [m] #El Ymax es 0.728 [m] import math, sys #PARA REVISAR RÁPIDAMENTE n=15 x=[0.100,0.250,0.400,0.550,0.700...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 28903, 1188, 2850, 1103, 274, 1931, 272, 198, 2, 14772, 5988, 5330, 287, 6652, 1658, 657, 13, 20, 685, 76, ...
1.751494
1,171
# Copyright (c) 2020 Chris Richardson & Matthew Scroggs # FEniCS Project # SPDX-License-Identifier: MIT import sympy import basix import numpy as np
[ 2, 15069, 357, 66, 8, 12131, 5180, 21679, 1222, 9308, 1446, 305, 1130, 82, 198, 2, 376, 4834, 72, 7902, 4935, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 17168, 198, 198, 11748, 10558, 88, 198, 11748, 1615, 844, 198, 11748, ...
3.122449
49
from enum import Enum if __name__ == '__main__': pass
[ 6738, 33829, 1330, 2039, 388, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1208, 198 ]
2.541667
24
#!/usr/bin/env python3 """ Visualize results of Gaussian process bootstrapping. """ import argparse import math import os import pathlib import pandas as pd import matplotlib.pyplot as mpl def parse_args(): """ Parse command line arguments. """ parser = argparse.ArgumentParser(description=__doc__.s...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 37811, 198, 36259, 1096, 2482, 286, 12822, 31562, 1429, 6297, 12044, 2105, 13, 198, 37811, 198, 198, 11748, 1822, 29572, 198, 11748, 10688, 198, 11748, 28686, 198, 11748, 3108, ...
2.363472
2,765
text = input('Enter a text: ') character = input('Enter a character that you can search in "'+text+'": ') result = text.count(character) print('The character "'+character+'" appears '+str(result)+' times in "'+text+'".')
[ 5239, 796, 5128, 10786, 17469, 257, 2420, 25, 705, 8, 198, 22769, 796, 5128, 10786, 17469, 257, 2095, 326, 345, 460, 2989, 287, 24018, 10, 5239, 10, 6, 1298, 705, 8, 198, 198, 20274, 796, 2420, 13, 9127, 7, 22769, 8, 198, 198, 479...
3.217391
69
import torch torch.manual_seed(0) # from _ext import th_fft import pytorch_fft.fft as cfft import pytorch_fft.fft.autograd as afft import numpy as np import numpy.fft as nfft if __name__ == "__main__": if torch.cuda.is_available(): nfft3 = lambda x: nfft.fftn(x,axes=(1,2,3)) nifft3 = lambda x:...
[ 11748, 28034, 198, 13165, 354, 13, 805, 723, 62, 28826, 7, 15, 8, 198, 2, 422, 4808, 2302, 1330, 294, 62, 487, 83, 198, 11748, 12972, 13165, 354, 62, 487, 83, 13, 487, 83, 355, 269, 487, 83, 198, 11748, 12972, 13165, 354, 62, 48...
1.657688
891
# -*- coding: utf-8 -*- # Copyright (c) 2020, omar jaber and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document from frappe import _
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 357, 66, 8, 12131, 11, 267, 3876, 474, 27359, 290, 20420, 198, 2, 1114, 5964, 1321, 11, 3387, 766, 5964, 13, 14116, 198, 198, 6738, 11593, 37443, 834, 1330, ...
3.422535
71
import pdf2txt #import time import csv from PySide import QtGui import os import os.path # prove prove my_dir = QtGui.QFileDialog.getExistingDirectory(None,'Scegli una cartella','\\srveuro\Ufficio_Tecnico\VALIDAZIONE\S10') file_list = [] for dirpath, dirnames, filenames in os.walk(my_dir): for fi...
[ 11748, 37124, 17, 14116, 201, 198, 201, 198, 2, 11748, 640, 201, 198, 11748, 269, 21370, 201, 198, 6738, 9485, 24819, 1330, 33734, 8205, 72, 201, 198, 11748, 28686, 201, 198, 11748, 28686, 13, 6978, 201, 198, 201, 198, 2, 5879, 5879, ...
1.94177
1,288
from typing import Any, Dict, List, Optional, Union from .muxed_account import MuxedAccount from .sep.ed25519_public_key_signer import Ed25519PublicKeySigner from .type_checked import type_checked __all__ = ["Account"] @type_checked class Account: """The :class:`Account` object represents a single account o...
[ 6738, 19720, 1330, 4377, 11, 360, 713, 11, 7343, 11, 32233, 11, 4479, 198, 198, 6738, 764, 76, 2821, 276, 62, 23317, 1330, 337, 2821, 276, 30116, 198, 6738, 764, 325, 79, 13, 276, 13381, 1129, 62, 11377, 62, 2539, 62, 12683, 263, ...
2.385075
1,340
# -*- coding: utf-8 -*- from .apiserver import APIServer from .apiresponse import APIResponse __all__ = ['APIServer', 'APIResponse']
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 764, 499, 5847, 332, 1330, 3486, 1797, 18497, 198, 6738, 764, 499, 2387, 79, 2591, 1330, 3486, 4663, 9774, 2591, 198, 198, 834, 439, 834, 796, 37250, 2969, ...
2.5
54
#!/usr/bin/env python3 # # fix_gpiov2_gds.py --- # # Special-purpose script that does the work of what ought to be a simple # binary diff and patch. Except that no such thing exists as a standard # offering on most Linux systems, so instead of adding another OS # package requirement, I'm just writing a binary search-a...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 198, 2, 4259, 62, 70, 14415, 709, 17, 62, 70, 9310, 13, 9078, 11420, 198, 2, 198, 2, 6093, 12, 29983, 4226, 326, 857, 262, 670, 286, 644, 10783, 284, 307, 257, 2829, 198, ...
2.193421
760
import math import os from copy import copy from functools import lru_cache from functools import partial from os.path import join import igl import numpy as np from numpy.linalg import norm # @lru_cache(maxsize=None) @lru_cache(maxsize=None) @lru_cache(maxsize=None) @lru_cache() def distort_unfold_t...
[ 11748, 10688, 198, 11748, 28686, 198, 6738, 4866, 1330, 4866, 198, 6738, 1257, 310, 10141, 1330, 300, 622, 62, 23870, 198, 6738, 1257, 310, 10141, 1330, 13027, 198, 6738, 28686, 13, 6978, 1330, 4654, 198, 198, 11748, 220, 38686, 198, 11...
2.282967
728
from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from configuration import DATABASE_FILE import os import sys # custom module imports from src.models import Base if not os.path.exists(os.path.dirname(DATABASE_FILE)): print(f"[initialize_database] Creating the database dir : {os.path.dir...
[ 6738, 44161, 282, 26599, 1330, 2251, 62, 18392, 198, 6738, 44161, 282, 26599, 13, 579, 1330, 6246, 10297, 198, 6738, 8398, 1330, 360, 1404, 6242, 11159, 62, 25664, 198, 11748, 28686, 198, 11748, 25064, 198, 2, 2183, 8265, 17944, 198, 67...
2.989189
185
from Vertex import Vertex INF = 10**9
[ 6738, 4643, 16886, 1330, 4643, 16886, 198, 1268, 37, 796, 838, 1174, 24, 198 ]
2.714286
14
VOWELS = ('a', 'e', 'i', 'o', 'u', 'yt', 'xr') CONSONANTS = ('b', 'c', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'm', 'n', 'p', 'q', 'r', 's', 't', 'v', 'w', 'x', 'y', 'z', 'sh', 'sch', 'zz', 'gh', 'ch', 'th', 'qu', 'thr', 'squ')
[ 53, 3913, 37142, 796, 19203, 64, 3256, 705, 68, 3256, 705, 72, 3256, 705, 78, 3256, 705, 84, 3256, 705, 20760, 3256, 705, 87, 81, 11537, 198, 198, 10943, 11782, 1565, 4694, 796, 19203, 65, 3256, 705, 66, 3256, 705, 67, 3256, 705, ...
1.478469
209
import os KHAN_BASE_URL = "http://192.168.1.2:8080" # instance used by khan mini to access API KHAN_MINI_BASE_URL = "http://192.168.1.2:8081" KHAN_BASE_URL2 = "http://192.168.1.2" # excluding port, which will be randomly assigned from below KHAN_INSTANCES = [8082,8083,8084,8085,8086] khanconf = os.pat...
[ 11748, 28686, 198, 198, 42, 39, 1565, 62, 33, 11159, 62, 21886, 796, 366, 4023, 1378, 17477, 13, 14656, 13, 16, 13, 17, 25, 1795, 1795, 1, 220, 220, 220, 220, 220, 220, 1303, 4554, 973, 416, 479, 7637, 9927, 284, 1895, 7824, 198, ...
2.237903
248
from django.contrib import admin from django.contrib.admin.actions import delete_selected from .models import CustomUser from djoser import signals, utils from djoser.compat import get_user_email from djoser.conf import settings make_activate.short_description = "Ativar Usuarios" send_confirmation_email.short_descr...
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 28482, 13, 4658, 1330, 12233, 62, 34213, 198, 198, 6738, 764, 27530, 1330, 8562, 12982, 198, 6738, 42625, 13416, 1330, 10425, 11, 3384, 4487, 19...
3.082803
314
from flask import Flask from flask_restful import Api from objects import Objects from replicate import Replicate from restore import Restore from object import Object app = Flask(__name__) api = Api(app) api.add_resource(Objects, "/api/objects/") api.add_resource(Replicate, "/api/replicate/<action>") api.add_resource...
[ 6738, 42903, 1330, 46947, 198, 6738, 42903, 62, 2118, 913, 1330, 5949, 72, 198, 6738, 5563, 1330, 35832, 198, 6738, 24340, 1330, 18407, 5344, 198, 6738, 11169, 1330, 42019, 198, 6738, 2134, 1330, 9515, 198, 198, 1324, 796, 46947, 7, 834...
2.974522
157
pratos = ('bolinho de bacalhau', 'francesinha', 'caldo verde', 'pastel de belém', 'feijoada') print('Cardápio principal:') for prato in pratos: print(f'\t{prato.title()}') pratos = ('arroz de forno', 'farofa crocante', 'caldo verde', 'pastel de ...
[ 1050, 35492, 796, 19203, 28984, 20327, 390, 275, 330, 282, 71, 559, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 8310, 1817, 259, 3099, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 66, 41476, 3326, ...
1.842553
235
# Copyright 2020 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
[ 2, 15069, 12131, 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, 11846, 351, 262, 13789, 13, 198, 2, 921, 743, 733...
4.331707
410
""" https://adventofcode.com/2017/day/6 """ import unittest from _2017 import d06_memreallocation if __name__ == '__main__': unittest.main()
[ 37811, 198, 5450, 1378, 324, 1151, 1659, 8189, 13, 785, 14, 5539, 14, 820, 14, 21, 198, 37811, 198, 11748, 555, 715, 395, 198, 6738, 4808, 5539, 1330, 288, 3312, 62, 11883, 260, 439, 5040, 628, 198, 198, 361, 11593, 3672, 834, 6624,...
2.508475
59
from random import randint from typing import Optional from harvester.zerg_action import ZergAction from sc2 import UnitTypeId from sc2.ids.upgrade_id import UpgradeId from sharpy.interfaces import IGameAnalyzer, IEnemyUnitsManager from sharpy.managers.extensions.game_states import AirArmy from sharpy.managers.extensi...
[ 6738, 4738, 1330, 43720, 600, 198, 6738, 19720, 1330, 32233, 198, 198, 6738, 3971, 1158, 353, 13, 89, 6422, 62, 2673, 1330, 37509, 12502, 198, 6738, 629, 17, 1330, 11801, 6030, 7390, 198, 6738, 629, 17, 13, 2340, 13, 929, 9526, 62, ...
3.413793
145
# Django from rest_framework import serializers # Models from sunnysouth.marketplace.models import Category
[ 2, 37770, 198, 6738, 1334, 62, 30604, 1330, 11389, 11341, 198, 198, 2, 32329, 198, 6738, 4252, 77, 893, 1536, 13, 10728, 5372, 13, 27530, 1330, 21743, 628 ]
3.928571
28
# Copyright 2019 Open Source Robotics Foundation, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
[ 2, 15069, 13130, 4946, 8090, 47061, 5693, 11, 3457, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, ...
3.173333
525
""" scrapple.utils.dynamicdispatch ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Functions related to dynamic dispatch of objects """ def get_command_class(command): """ Called from runCLI() to select the command class for the selected command. :param command: The command to be implemented :return: The command clas...
[ 37811, 198, 1416, 430, 381, 293, 13, 26791, 13, 67, 28995, 6381, 17147, 198, 27156, 15116, 8728, 4907, 198, 198, 24629, 2733, 3519, 284, 8925, 27965, 286, 5563, 198, 37811, 198, 198, 4299, 651, 62, 21812, 62, 4871, 7, 21812, 2599, 198...
3.056338
213
import tasks from . import base from jones import FixerAPI
[ 11748, 8861, 198, 198, 6738, 764, 1330, 2779, 198, 6738, 474, 1952, 1330, 13268, 263, 17614 ]
3.6875
16
from typing import Tuple import jax.numpy as jnp from ase import units from jax_md import energy from jax_md.energy import NeighborFn from .calculator import Calculator from .jax_utils import EnergyFn class LennardJones(Calculator): """Lennard-Jones Potential""" implemented_properties = ["energy", "energie...
[ 6738, 19720, 1330, 309, 29291, 198, 198, 11748, 474, 897, 13, 77, 32152, 355, 474, 37659, 198, 6738, 257, 325, 1330, 4991, 198, 6738, 474, 897, 62, 9132, 1330, 2568, 198, 6738, 474, 897, 62, 9132, 13, 22554, 1330, 28708, 37, 77, 198...
2.168111
577
import numpy as np from typing import Tuple, Callable, List, Union, cast from typing_extensions import Protocol import types import torch import pydrake.symbolic as sym import pdb import sympy from sympy import Symbol, sympify, simplify, trigsimp from functools import reduce import operator from enum import Enum # str...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 19720, 1330, 309, 29291, 11, 4889, 540, 11, 7343, 11, 4479, 11, 3350, 198, 6738, 19720, 62, 2302, 5736, 1330, 20497, 198, 11748, 3858, 198, 11748, 28034, 198, 11748, 279, 5173, 33788, 13, 1837, ...
2.628942
1,617
from Mesh.System.Entity.Function import BaseFunction from Mesh.System.Entity.Function.Tasked import TaskName
[ 6738, 47529, 13, 11964, 13, 32398, 13, 22203, 1330, 7308, 22203, 198, 6738, 47529, 13, 11964, 13, 32398, 13, 22203, 13, 25714, 276, 1330, 15941, 5376, 628 ]
4.074074
27
#!/usr/bin/env python # # Created on 07/11/2014 Pat Cappelaere - Vightel Corporation # # Output: Landsat 8 browse image # import os, inspect, sys import argparse import numpy import scipy import math from scipy import ndimage from osgeo import gdal from osgeo import osr from osgeo import ogr from which import * im...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 2, 15622, 319, 8753, 14, 1157, 14, 4967, 3208, 327, 1324, 10304, 567, 532, 569, 432, 417, 10501, 198, 2, 198, 2, 25235, 25, 24182, 265, 807, 25675, 2939, 198, 2, 198, 198, ...
2.693717
382
nome = input('Digite seu nome: ').upper() print(f'Seu nome possui {nome.count("A")} letra A') print(f'O primeiro A está na posição {nome.find("A")+1}') print(f'O último A está na posição {nome.rfind("A")+1}')
[ 77, 462, 796, 5128, 10786, 19511, 578, 384, 84, 299, 462, 25, 705, 737, 45828, 3419, 198, 4798, 7, 69, 6, 4653, 84, 299, 462, 1184, 9019, 1391, 77, 462, 13, 9127, 7203, 32, 4943, 92, 1309, 430, 317, 11537, 198, 4798, 7, 69, 6, ...
2.10101
99
import asyncio import datetime import logging import pykube import requests from kopf import config from kopf.clients import auth from kopf.structs import hierarchies logger = logging.getLogger(__name__) MAX_MESSAGE_LENGTH = 1024 CUT_MESSAGE_INFIX = '...' async def post_event(*, obj=None, ref=None, type, reason, ...
[ 11748, 30351, 952, 198, 11748, 4818, 8079, 198, 11748, 18931, 198, 198, 11748, 12972, 74, 3266, 198, 11748, 7007, 198, 198, 6738, 479, 404, 69, 1330, 4566, 198, 6738, 479, 404, 69, 13, 565, 2334, 1330, 6284, 198, 6738, 479, 404, 69, ...
2.522472
1,246
# coding: utf-8 from __future__ import division, print_function, absolute_import import pkg_resources __version__ = pkg_resources.get_distribution('pypcl').version from pypcl.common import *
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 6738, 11593, 37443, 834, 1330, 7297, 11, 3601, 62, 8818, 11, 4112, 62, 11748, 198, 198, 11748, 279, 10025, 62, 37540, 198, 198, 834, 9641, 834, 796, 279, 10025, 62, 37540, 13, 1136, 62, 17...
3.145161
62
from . import main from flask import render_template,abort from flask_login import login_required from ..models import User,Blog from app.request import get_quote @main.route('/') @main.route('/user/<jina>',methods=['GET','POST'])
[ 6738, 764, 1330, 1388, 198, 6738, 42903, 1330, 8543, 62, 28243, 11, 397, 419, 198, 6738, 42903, 62, 38235, 1330, 17594, 62, 35827, 198, 6738, 11485, 27530, 1330, 11787, 11, 42383, 198, 6738, 598, 13, 25927, 1330, 651, 62, 22708, 628, ...
3.144737
76
# lambda 는 1줄 함수. # lambda argument: manipulate(argument) # ex add = lambda x, y: x + y print(add(2,4)) # sort a = [(1,2), (4,1), (9,10), (13,-3)] a.sort(key = lambda x:x[1]) print(a) # 병렬로 sort list list1 = [1,2,3,4,5] list2 = [9,8,5,3,1] data = list(zip(list1, list2)) print(data) data.sort() list1, list2 = map(la...
[ 198, 2, 37456, 31619, 232, 242, 352, 168, 97, 226, 220, 47991, 101, 168, 230, 246, 13, 198, 2, 37456, 4578, 25, 18510, 7, 49140, 8, 198, 198, 2, 409, 198, 2860, 796, 37456, 2124, 11, 331, 25, 2124, 1343, 331, 198, 4798, 7, 2860,...
1.896739
184
import torch import torch.nn as nn import torch.nn.functional as F class TripletLoss(object): """Modified from Tong Xiao's open-reid (https://github.com/Cysu/open-reid). Related Triplet Loss theory can be found in paper 'In Defense of the Triplet Loss for Person Re-Identification'."""
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 628, 628, 198, 198, 4871, 19817, 83, 43, 793, 7, 15252, 2599, 198, 220, 220, 220, 37227, 5841, 1431, 422, 26565, 28249, 338, ...
3.122449
98
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 2, 15069, 4343, 3012, 3457, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, ...
2.819332
4,190
from eax import gf_double, xorstrings # these classes simulate the way it could be done in C in online mode, byte by byte # wrappers for the online stream api to test it
[ 6738, 304, 897, 1330, 308, 69, 62, 23352, 11, 2124, 273, 37336, 201, 198, 201, 198, 2, 777, 6097, 29308, 262, 835, 340, 714, 307, 1760, 287, 327, 287, 2691, 4235, 11, 18022, 416, 18022, 201, 198, 201, 198, 201, 198, 2, 7917, 11799...
3.232143
56
import setuptools with open("README.md", "r", encoding="utf-8") as fh: long_description = fh.read() setuptools.setup( name="body-mass-index", version="1.0.1", author="Romen Rodriguez-Gil", author_email="contact@romenrg.com", description="Utilities related to the Body Mass Index (BMI): Calculat...
[ 11748, 900, 37623, 10141, 198, 198, 4480, 1280, 7203, 15675, 11682, 13, 9132, 1600, 366, 81, 1600, 21004, 2625, 40477, 12, 23, 4943, 355, 277, 71, 25, 198, 220, 220, 220, 890, 62, 11213, 796, 277, 71, 13, 961, 3419, 198, 198, 2617, ...
2.635484
310
from db.models import Trade, Asset ass1 = Asset(name="Algo", asset_id="0", network="mainnet") ass2 = Asset(name="Choice", asset_id="297995609", network="mainnet") ass1.save() ass2.save() trade = Trade( wallet_address="Replace With Address", asset1=ass1, asset2=ass2, asset_in=ass2, asset_in_amount...
[ 6738, 20613, 13, 27530, 1330, 9601, 11, 31433, 198, 198, 562, 16, 796, 31433, 7, 3672, 2625, 2348, 2188, 1600, 11171, 62, 312, 2625, 15, 1600, 3127, 2625, 12417, 3262, 4943, 198, 562, 17, 796, 31433, 7, 3672, 2625, 46770, 1600, 11171,...
2.317204
186
"""This example changes the fill, brightness, blink rates, shows number and text printing, displays a counter and then shows off the new marquee features.""" from time import sleep from adafruit_featherwing import alphanum_featherwing display = alphanum_featherwing.AlphaNumFeatherWing() #Fill and empty all segments ...
[ 37811, 1212, 1672, 2458, 262, 6070, 11, 22204, 11, 21019, 3965, 11, 198, 49596, 1271, 290, 2420, 13570, 11, 11298, 257, 3753, 198, 392, 788, 2523, 572, 262, 649, 50089, 3033, 526, 15931, 198, 198, 6738, 640, 1330, 3993, 198, 6738, 512...
2.855828
326
import argparse import numpy as np import os import torch from torch import nn from torch.autograd import Variable from torch.backends import cudnn from torch.utils import data from utils.mpnet import MPNet from utils.plan_class import plan_dataset if __name__ == '__main__': parser = argparse.ArgumentParser() ...
[ 11748, 1822, 29572, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 198, 11748, 28034, 198, 6738, 28034, 1330, 299, 77, 198, 6738, 28034, 13, 2306, 519, 6335, 1330, 35748, 198, 6738, 28034, 13, 1891, 2412, 1330, 269, 463, 20...
2.912935
402
from django.shortcuts import render, HttpResponse, HttpResponseRedirect # importing calculators from .calculatorDilution import DilutionForm from .calculatorDilution import * from .calculatorPCR import PCRForm from .calculatorPCR import * from .calculatorUnitConvert import ConversionForm from .calculatorUnitConvert im...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 367, 29281, 31077, 11, 367, 29281, 31077, 7738, 1060, 198, 198, 2, 33332, 5204, 2024, 198, 6738, 764, 9948, 3129, 1352, 35, 346, 1009, 1330, 29328, 1009, 8479, 198, 6738, 764, 9948, ...
2.854867
1,130
# scrapes Townes van Zandt lyrics # sample code so I don't have to remember all of this stuff # the next time I want to source some verses from bs4 import BeautifulSoup as soup import requests import string punctuation_trans_table = str.maketrans("", "", string.punctuation) base_url = "http://ippc2.orst.edu/coopl/...
[ 2, 15881, 274, 8329, 274, 5719, 1168, 392, 83, 15844, 198, 2, 6291, 2438, 523, 314, 836, 470, 423, 284, 3505, 477, 286, 428, 3404, 198, 2, 262, 1306, 640, 314, 765, 284, 2723, 617, 24752, 198, 198, 6738, 275, 82, 19, 1330, 23762, ...
2.634304
309
from django.core import management from django.core.management.base import BaseCommand
[ 6738, 42625, 14208, 13, 7295, 1330, 4542, 201, 198, 6738, 42625, 14208, 13, 7295, 13, 27604, 13, 8692, 1330, 7308, 21575, 201, 198, 201, 198 ]
3.64
25
""" Display all visible SSIDs """ import NetworkManager for dev in NetworkManager.NetworkManager.GetDevices(): if dev.DeviceType != NetworkManager.NM_DEVICE_TYPE_WIFI: continue for ap in dev.GetAccessPoints(): print('%-30s %dMHz %d%%' % (ap.Ssid, ap.Frequency, ap.Strength))
[ 37811, 198, 23114, 477, 7424, 6723, 47954, 198, 37811, 198, 198, 11748, 7311, 13511, 198, 198, 1640, 1614, 287, 7311, 13511, 13, 26245, 13511, 13, 3855, 13603, 1063, 33529, 198, 220, 220, 220, 611, 1614, 13, 24728, 6030, 14512, 7311, 13...
2.6875
112
import requests import time import csv import sys from itertools import groupby import Utils # ==================================================================== # **Description** # This script takes the list of train stations we found on wikipedia # --> Extracts: train station number, train station name, train stat...
[ 11748, 7007, 198, 11748, 640, 198, 11748, 269, 21370, 198, 11748, 25064, 198, 6738, 340, 861, 10141, 1330, 1448, 1525, 198, 11748, 7273, 4487, 198, 198, 2, 38093, 18604, 198, 2, 12429, 11828, 1174, 198, 2, 770, 4226, 2753, 262, 1351, ...
3.335535
757
#! /usr/bin/env python import glob import time import torch import click import os.path import random import logging import pathlib import datetime import numpy as np import torchvision.transforms as tf from PIL import Image, ImageDraw from pathlib import Path from rich.logging import RichHandler from pytorch_lightnin...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 15095, 198, 11748, 640, 198, 11748, 28034, 198, 11748, 3904, 198, 11748, 28686, 13, 6978, 198, 11748, 4738, 198, 11748, 18931, 198, 11748, 3108, 8019, 198, 11748, 4818, 8079, 19...
2.740956
3,621
from django.db import models # Create your models here.
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 198, 2, 13610, 534, 4981, 994, 13, 198 ]
3.5625
16
# -*- coding: utf-8 -*- import argparse import os import re import shutil import zipfile parser = argparse.ArgumentParser() parser.add_argument('directory', type=str, nargs=1) group = parser.add_mutually_exclusive_group(required = True) group.add_argument('--extract', action='store_true') group.add_argument('--compre...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 1822, 29572, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 4423, 346, 198, 11748, 19974, 7753, 198, 198, 48610, 796, 1822, 29572, 13, 28100, 1713, 46677, 341...
1.906921
838
"""TESTING STRATEGY Function: generate(self) 1. Ensure the correct # of problems are generated. 2. Generated problems are of proper type 3. Ensure prediction problems are generated in order of Filter->Row->Transformation->Aggregation """ import unittest import pandas as pd from mock import MagicMock, call, patch f...
[ 37811, 51, 6465, 2751, 19269, 6158, 31212, 198, 22203, 25, 7716, 7, 944, 8, 198, 16, 13, 48987, 262, 3376, 1303, 286, 2761, 389, 7560, 13, 198, 17, 13, 2980, 515, 2761, 389, 286, 1774, 2099, 198, 18, 13, 48987, 17724, 2761, 389, 7...
2.997409
386
"""The |pydwf.core.api.digital_spi| module implements a single class: |DigitalSpi|.""" from typing import List from pydwf.core.dwf_device_subapi import AbstractDwfDeviceSubApi from pydwf.core.auxiliary.typespec_ctypes import typespec_ctypes from pydwf.core.auxiliary.constants import RESULT_SUCCESS from pydwf.core.au...
[ 37811, 464, 930, 79, 5173, 86, 69, 13, 7295, 13, 15042, 13, 34725, 62, 2777, 72, 91, 8265, 23986, 257, 2060, 1398, 25, 930, 27640, 4561, 72, 91, 526, 15931, 198, 198, 6738, 19720, 1330, 7343, 198, 198, 6738, 279, 5173, 86, 69, 13,...
2.004766
8,813
#created p.kennedy@fugro.com #created: May 2015 #Based on twitter bootstrap import os import sys import re import time import datetime # set an include path sys.path.append("./_bootstrap/_scripts") import zBMS import scan import whatsNew # import repairMenu outputFileName = "index.html" ignoreFolders = ['trash', '...
[ 2, 25598, 279, 13, 74, 1697, 4716, 31, 69, 1018, 305, 13, 785, 198, 2, 25598, 25, 1737, 1853, 198, 2, 15001, 319, 17044, 6297, 26418, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 302, 198, 11748, 640, 198, 11748, 4818, 807...
2.937642
882
import abc from abc import ABC from typing import Any import numpy as np
[ 11748, 450, 66, 198, 6738, 450, 66, 1330, 9738, 198, 6738, 19720, 1330, 4377, 198, 198, 11748, 299, 32152, 355, 45941, 628 ]
3.409091
22
from srcs.environments.MazeEnv import MazeEnv from srcs.agent.POMCP import POMCP import time import math if __name__ == "__main__": # Create the environment MAZE_FILE_NAME = "5.maze" env = MazeEnv("./mazes/" + MAZE_FILE_NAME) LOCAL_MINIMA = env.get_local_minima(MAZE_FILE_NAME) S = env.states_list(...
[ 6738, 12351, 82, 13, 268, 12103, 13, 44, 6201, 4834, 85, 1330, 33412, 4834, 85, 198, 6738, 12351, 82, 13, 25781, 13, 47, 2662, 8697, 1330, 350, 2662, 8697, 198, 11748, 640, 198, 11748, 10688, 198, 198, 361, 11593, 3672, 834, 6624, 3...
2.248106
1,056
import numpy as np from os import getcwd, path from cv2 import imread, IMREAD_COLOR def read_image(path=None): ''' Read an image from a path Path is relative path or full path ''' base_path = getcwd() full_path = path.join(base_path,path) if base_path in path: full_path = pa...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 28686, 1330, 651, 66, 16993, 11, 3108, 198, 6738, 269, 85, 17, 1330, 545, 961, 11, 8959, 15675, 62, 46786, 198, 198, 4299, 1100, 62, 9060, 7, 6978, 28, 14202, 2599, 198, 220, 220, 220, 705, ...
2.35865
237
# Copyright 2018-2020 Xanadu Quantum Technologies Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicabl...
[ 2, 15069, 2864, 12, 42334, 47482, 324, 84, 29082, 21852, 3457, 13, 201, 198, 201, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 201, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, ...
1.94377
9,799
import requests_html from pytest import fixture from requests_html import HTMLResponse from wsgiadapter import WSGIAdapter from tests.endpoints import login from warehouse14 import create_app @fixture @fixture
[ 11748, 7007, 62, 6494, 198, 6738, 12972, 9288, 1330, 29220, 198, 6738, 7007, 62, 6494, 1330, 11532, 31077, 198, 6738, 266, 82, 12397, 324, 3429, 1330, 25290, 18878, 47307, 198, 198, 6738, 5254, 13, 437, 13033, 1330, 17594, 198, 6738, 20...
3.711864
59
l=input("CANDIES: ").lstrip("[").rstrip("]") t=l.split(",") boolist=[] n= int(input("EXTRA CANDIES: ")) for i in range(len(t)): if int(t[i])+n>=int(max(t)): boolist.append("True") else: boolist.append("False") print(boolist)
[ 75, 28, 15414, 7203, 34, 6981, 11015, 25, 366, 737, 75, 36311, 7203, 58, 11074, 81, 36311, 7203, 60, 4943, 198, 83, 28, 75, 13, 35312, 7, 2430, 8, 198, 30388, 396, 28, 21737, 198, 77, 28, 493, 7, 15414, 7203, 13918, 3861, 327, 6...
1.96875
128
import pandas as pd from mock import MagicMock from ..plotlygraphs.graphbase import GraphBase from ..plotlygraphs.piegraph import PieGraph from ..plotlygraphs.datagraph import DataGraph from ..widget.encoding import Encoding from ..widget.invalidencodingerror import InvalidEncodingError
[ 11748, 19798, 292, 355, 279, 67, 198, 6738, 15290, 1330, 6139, 44, 735, 198, 198, 6738, 11485, 29487, 306, 34960, 82, 13, 34960, 8692, 1330, 29681, 14881, 198, 6738, 11485, 29487, 306, 34960, 82, 13, 79, 15702, 1470, 1330, 21690, 37065,...
3.511905
84
# NOTE(cutwater): This migration is replaced by v2_4_0 and should be # deleted once superseding migration is merged into master. from django.db import migrations
[ 2, 24550, 7, 8968, 7050, 2599, 770, 13472, 318, 6928, 416, 410, 17, 62, 19, 62, 15, 290, 815, 307, 198, 2, 220, 220, 13140, 1752, 22754, 8228, 13472, 318, 23791, 656, 4958, 13, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, ...
3.75
44
# todo: handle cases where the boundary crosses the dateline # usage: # python landgrab.py [osm id] [zoom level] [optional list-only flag] import requests, json, math, sys, os import xml.etree.ElementTree as ET import pprint if len(sys.argv) < 3: print "At least 2 arguments needed - please enter an OSM ID and zoo...
[ 2, 284, 4598, 25, 5412, 2663, 810, 262, 18645, 24234, 262, 3128, 1370, 198, 2, 8748, 25, 198, 2, 21015, 1956, 32393, 13, 9078, 685, 418, 76, 4686, 60, 685, 89, 4207, 1241, 60, 685, 25968, 1351, 12, 8807, 6056, 60, 198, 198, 11748,...
2.380563
1,101
import tweepy from keys import keys CONSUMER_KEY = keys['consumer_key'] CONSUMER_SECRET = keys['consumer_secret'] ACCESS_TOKEN = keys['access_token'] ACCESS_TOKEN_SECRET = keys['access_token_secret'] auth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET) auth.set_access_token(ACCESS_TOKEN, ACCESS_TOKEN_SECRET) a...
[ 11748, 4184, 538, 88, 198, 6738, 8251, 1330, 8251, 198, 220, 198, 10943, 50, 5883, 1137, 62, 20373, 796, 8251, 17816, 49827, 62, 2539, 20520, 198, 10943, 50, 5883, 1137, 62, 23683, 26087, 796, 8251, 17816, 49827, 62, 21078, 20520, 198, ...
2.125
336
from constants import * from polytropes import * from potentials import *
[ 6738, 38491, 1330, 1635, 198, 6738, 7514, 48385, 274, 1330, 1635, 198, 6738, 2785, 82, 1330, 1635, 198 ]
4.111111
18
from webApp.utils.app.routes import * from webApp.utils.app.forms import auth
[ 6738, 3992, 4677, 13, 26791, 13, 1324, 13, 81, 448, 274, 1330, 1635, 198, 6738, 3992, 4677, 13, 26791, 13, 1324, 13, 23914, 1330, 6284 ]
3.08
25
# This file is Copyright (c) 2020 Gregory Davill <greg.davill@gmail.com> # License: BSD from migen import * from litex.soc.interconnect.stream import Endpoint from rtl.edge_detect import EdgeDetect from litex.soc.interconnect.csr import AutoCSR, CSR, CSRStatus, CSRStorage from litex.soc.interconnect.stream import End...
[ 2, 770, 2393, 318, 15069, 357, 66, 8, 12131, 20653, 2544, 359, 1279, 9903, 13, 67, 615, 359, 31, 14816, 13, 785, 29, 198, 2, 13789, 25, 347, 10305, 198, 198, 6738, 285, 9324, 1330, 1635, 198, 6738, 300, 578, 87, 13, 35634, 13, 3...
3.051282
117
from globals import * import life as lfe import historygen import judgement import survival import speech import groups import combat import camps import sight import brain import zones import bad_numbers import logging import random MAX_INFLUENCE_FROM = 80 MAX_INTROVERSION = 10 MAX_CHARISMA = 9
[ 6738, 15095, 874, 1330, 1635, 198, 198, 11748, 1204, 355, 300, 5036, 198, 198, 11748, 2106, 5235, 198, 11748, 23071, 198, 11748, 9441, 198, 11748, 4046, 198, 11748, 2628, 198, 11748, 5249, 198, 11748, 11665, 198, 11748, 6504, 198, 11748, ...
3.409091
88
from qgis.core import QgsProcessing from qgis.core import QgsProcessingAlgorithm from qgis.core import QgsProcessingMultiStepFeedback from qgis.core import QgsProcessingParameterRasterLayer from qgis.core import QgsProcessingParameterRasterDestination import processing
[ 6738, 10662, 70, 271, 13, 7295, 1330, 1195, 14542, 18709, 278, 198, 6738, 10662, 70, 271, 13, 7295, 1330, 1195, 14542, 18709, 278, 2348, 42289, 198, 6738, 10662, 70, 271, 13, 7295, 1330, 1195, 14542, 18709, 278, 29800, 8600, 18332, 1891...
3.474359
78
import torch.nn as nn import torch.nn.functional as F import torch from sklearn.cluster import KMeans from sklearn.metrics.pairwise import pairwise_distances import numpy as np def initialize_bof_layers(model, data_loader, n_samples=100, n_feature_samples=5000, batch_size=32, k_means_max_iters=300, ...
[ 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 11748, 28034, 198, 6738, 1341, 35720, 13, 565, 5819, 1330, 509, 5308, 504, 198, 6738, 1341, 35720, 13, 4164, 10466, 13, 24874, 3083, 1330, ...
2.226804
1,358
#!/usr/bin/env python3 from gevent import monkey; monkey.patch_all() from arago.actors import Actor, Root import arago.actors.pattern_matching as matching from arago.common.logging import getCustomLogger logger = getCustomLogger(level="WARNING") players = [PingPong(name="Player One"), PingPong(name="Player Two")] pl...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 6738, 4903, 1151, 1330, 21657, 26, 21657, 13, 17147, 62, 439, 3419, 198, 6738, 610, 3839, 13, 529, 669, 1330, 27274, 11, 20410, 198, 11748, 610, 3839, 13, 529, 669, 13, 33279, 62...
3.070313
128
import pyspark import random if __name__ == "__main__": sc_conf = pyspark.SparkConf() sc_conf.setAppName("pi-app") sc_conf.setMaster('spark://spark-master-01:7077') sc_conf.set('spark.executor.cores','1') sc_conf.set("spark.executor.memory", '1g') sc = pyspark.SparkContext(conf=sc_conf) num_samples = ...
[ 11748, 279, 893, 20928, 198, 11748, 4738, 220, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 629, 62, 10414, 796, 279, 893, 20928, 13, 4561, 668, 18546, 3419, 198, 220, 629, 62, 10414, 13, 2617, 4677, ...
2.478495
186
from Products.CMFPlone.utils import safe_unicode from bika.lims import logger, to_utf8 from bika.lims.interfaces import IJSONReadExtender from bika.lims.jsonapi import get_include_fields from plone.jsonapi.core import router from plone.jsonapi.core.interfaces import IRouteProvider from plone.protect.authenticator impor...
[ 6738, 18675, 13, 24187, 37, 3646, 505, 13, 26791, 1330, 3338, 62, 46903, 1098, 198, 6738, 275, 9232, 13, 2475, 82, 1330, 49706, 11, 284, 62, 40477, 23, 198, 6738, 275, 9232, 13, 2475, 82, 13, 3849, 32186, 1330, 314, 40386, 5569, 116...
3.388235
170
''' Function: 关卡切换界面 Author: Charles 微信公众号: Charles的皮卡丘 ''' import pygame from .....utils import QuitGame '''关卡切换界面'''
[ 7061, 6, 198, 22203, 25, 198, 220, 220, 220, 10263, 227, 111, 39355, 94, 26344, 229, 162, 235, 95, 45911, 234, 165, 251, 95, 198, 13838, 25, 198, 220, 220, 220, 7516, 198, 36181, 106, 46479, 94, 17739, 105, 27670, 245, 20998, 115, ...
1.450549
91
# -*- coding: utf-8 -*- """ Reads in the raw data fetched from ENTSO-E Transparency Platform, refactors the data and fills in missing data """ import pandas as pd import numpy as np from datetime import datetime, date, time, timezone, timedelta import pickle import os import logging #%% def aggregate_entso(dictiona...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 4149, 82, 287, 262, 8246, 1366, 11351, 1740, 422, 12964, 4694, 46, 12, 36, 49165, 19193, 11, 1006, 529, 669, 262, 198, 1366, 290, 23816, 287, 4814, 1366, 1...
2.049061
2,344
""" A dictionary of words. :Author: Maded Batara III :Version: v20181010 """ from collections import Counter from .dictionary_query import DictionaryQuery class Dictionary(DictionaryQuery): """A dictionary of words. As this is a subclass of DictionaryQuery, this class supports all its methods.""...
[ 37811, 198, 32, 22155, 286, 2456, 13, 198, 198, 25, 13838, 25, 220, 220, 220, 220, 4627, 276, 6577, 3301, 6711, 198, 25, 14815, 25, 220, 220, 220, 410, 1264, 6659, 20943, 198, 37811, 198, 198, 6738, 17268, 1330, 15034, 198, 198, 673...
2.477807
383
from myhdl import * @block def cr(pc_next,branch_offset,r6_r7_data,cr_data,clk,rst,int0,int1,int2,int3,mem_read,mem_write,mem_ok,branch,selector,cr_write,ret,apc,jmp,bra ,main_state): ''' :param clk: 1 in clk :param rst: 1 in rst :param int0: 1 in interrupt :param int1: 1 in interrupt ...
[ 6738, 616, 71, 25404, 1330, 1635, 198, 198, 31, 9967, 198, 4299, 1067, 7, 14751, 62, 19545, 11, 1671, 3702, 62, 28968, 11, 81, 21, 62, 81, 22, 62, 7890, 11, 6098, 62, 7890, 11, 565, 74, 11, 81, 301, 11, 600, 15, 11, 600, 16, ...
2.029026
1,447
import sys from os import path import inspect from keystoneauth1 import identity from keystoneauth1 import session from cinderclient import client import re METRIC_NAME_PREFIX = "openstack." CINDER_LIMIT_PREFIX = "cinder.limit." CINDER_VOLUME_PREFIX = "cinder.volume." CINDER_SNAPSHOT_PREFIX = "cinder.snapshot." DEFAU...
[ 11748, 25064, 198, 6738, 28686, 1330, 3108, 198, 11748, 10104, 198, 198, 6738, 1994, 6440, 18439, 16, 1330, 5369, 198, 6738, 1994, 6440, 18439, 16, 1330, 6246, 198, 6738, 269, 5540, 16366, 1330, 5456, 198, 11748, 302, 198, 198, 47123, 4...
2.744186
129