content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
#encoding: utf8 __author__ = 'Diogo Gomes' __email__ = 'dgomes@ua.pt' __license__ = "GPL" __version__ = "0.1" import copy import card from shoe import Shoe from dealer import Dealer from player import Player BET_MULTIPLIER = 2
[ 2, 12685, 7656, 25, 3384, 69, 23, 198, 834, 9800, 834, 796, 705, 18683, 24076, 402, 2586, 6, 198, 834, 12888, 834, 796, 705, 67, 70, 2586, 31, 6413, 13, 457, 6, 198, 834, 43085, 834, 796, 366, 38, 6489, 1, 198, 834, 9641, 834, ...
2.643678
87
# Escribir un programa que muestre la sumatoria de todos los mltiplos de 7 encontrados entre el 0 y el 100. # Summing all the multiples of 7 from 0 to 100. total = 0 for i in range(101): if i % 7 == 0: total = total+i print("Sumatoria de los mltiplos de 7:", total)
[ 2, 220, 220, 16319, 822, 343, 555, 1430, 64, 8358, 38779, 395, 260, 8591, 2160, 1352, 544, 390, 284, 37427, 22346, 285, 2528, 24705, 418, 390, 767, 2207, 756, 6335, 418, 920, 260, 1288, 657, 331, 1288, 1802, 13, 198, 2, 5060, 2229, ...
2.540541
111
# HomeAssistant Status Output # Publishes the provided sensor key and value pair to a HomeAssistant instance import logging import time from ww import f logger = logging.getLogger(__name__.rsplit(".")[-1])
[ 2, 5995, 48902, 12678, 25235, 198, 2, 8525, 19724, 262, 2810, 12694, 1994, 290, 1988, 5166, 284, 257, 5995, 48902, 4554, 198, 198, 11748, 18931, 198, 11748, 640, 198, 6738, 266, 86, 1330, 277, 628, 198, 6404, 1362, 796, 18931, 13, 113...
3.516667
60
from flask import Blueprint, jsonify, request, render_template home_routes = Blueprint("home_routes", __name__) # # Add config for database # app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///db.sqlite3' # # stop tracking modifications on sqlalchemy config # app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False #...
[ 198, 6738, 42903, 1330, 39932, 11, 33918, 1958, 11, 2581, 11, 8543, 62, 28243, 198, 198, 11195, 62, 81, 448, 274, 796, 39932, 7203, 11195, 62, 81, 448, 274, 1600, 11593, 3672, 834, 8, 628, 198, 2, 1303, 3060, 4566, 329, 6831, 198, ...
2.911565
147
from argparse import ArgumentParser from collections import defaultdict import glob import os import pickle from random import shuffle, seed import sys from tempfile import mkdtemp import shutil import logging root_logger = logging.getLogger() root_logger.setLevel(logging.DEBUG) CTN_LOG = logging.getLogger('CTN_CLASS...
[ 6738, 1822, 29572, 1330, 45751, 46677, 198, 6738, 17268, 1330, 4277, 11600, 198, 11748, 15095, 198, 11748, 28686, 198, 11748, 2298, 293, 198, 6738, 4738, 1330, 36273, 11, 9403, 198, 11748, 25064, 198, 6738, 20218, 7753, 1330, 33480, 67, 2...
2.288726
3,415
from flask_restful import Resource from flask import Response import os import cv2 picturecounter = 1 #
[ 6738, 42903, 62, 2118, 913, 1330, 20857, 198, 6738, 42903, 1330, 18261, 198, 11748, 28686, 198, 11748, 269, 85, 17, 628, 198, 34053, 24588, 796, 352, 220, 1303, 220 ]
3.689655
29
#!/usr/bin/env python3 ''' ############################################################################### ############################################################################### ## ## ## _ ___ ___ ___ ___ ___ ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 7061, 6, 198, 29113, 29113, 7804, 4242, 21017, 198, 29113, 29113, 7804, 4242, 21017, 198, 2235, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 22...
2.386485
4,321
from summarizer.summarizer import summarize
[ 6738, 15676, 7509, 13, 16345, 3876, 7509, 1330, 35743, 198 ]
4.4
10
#!/usr/bin/python # -*- coding: utf-8 -*- # Function to encrypt message using key is defined
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 15553, 284, 34117, 3275, 1262, 1994, 318, 5447, 628 ]
2.878788
33
#!/usr/bin/python3 import os import random print("# Python program - Adding random numbers to beginning of filename.") rename_files("./prank")
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 11748, 28686, 198, 11748, 4738, 628, 198, 198, 4798, 7203, 2, 11361, 1430, 532, 18247, 4738, 3146, 284, 3726, 286, 29472, 19570, 198, 198, 918, 480, 62, 16624, 7, 1911, 14, 1050, 9...
3.288889
45
import copy import functools import itertools import numbers import warnings from collections import defaultdict from datetime import timedelta from distutils.version import LooseVersion from typing import ( Any, Dict, Hashable, Mapping, Optional, Sequence, Tuple, TypeVar, Union, ) ...
[ 11748, 4866, 198, 11748, 1257, 310, 10141, 198, 11748, 340, 861, 10141, 198, 11748, 3146, 198, 11748, 14601, 198, 6738, 17268, 1330, 4277, 11600, 198, 6738, 4818, 8079, 1330, 28805, 12514, 198, 6738, 1233, 26791, 13, 9641, 1330, 6706, 577...
2.266163
32,544
number_of_participants, number_of_pens, number_of_notebooks = map(int, input().split()) if number_of_pens >= number_of_participants and number_of_notebooks >= number_of_participants: print('Yes') else: print('No')
[ 17618, 62, 1659, 62, 48013, 1187, 11, 1271, 62, 1659, 62, 79, 641, 11, 1271, 62, 1659, 62, 11295, 12106, 796, 3975, 7, 600, 11, 5128, 22446, 35312, 28955, 198, 198, 361, 1271, 62, 1659, 62, 79, 641, 18189, 1271, 62, 1659, 62, 4801...
2.7875
80
from DLA import main_single d = main_single(1, gotosize=[1e4, 5e4]) d.plot_particles() d.plot_mass_distribution()
[ 6738, 360, 13534, 1330, 1388, 62, 29762, 198, 67, 796, 1388, 62, 29762, 7, 16, 11, 1392, 418, 1096, 41888, 16, 68, 19, 11, 642, 68, 19, 12962, 198, 67, 13, 29487, 62, 3911, 2983, 3419, 198, 67, 13, 29487, 62, 22208, 62, 17080, 3...
2.425532
47
# -*- coding: utf-8 -*- # # Copyright (c) The PyAMF Project. # See LICENSE.txt for details. """ Tests for AMF utilities. @since: 0.1.0 """ import unittest from datetime import datetime from io import BytesIO import pyamf from pyamf import util from pyamf.tests.util import replace_dict PosInf = 1e300000 NegInf = -...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 357, 66, 8, 383, 9485, 2390, 37, 4935, 13, 198, 2, 4091, 38559, 24290, 13, 14116, 329, 3307, 13, 198, 198, 37811, 198, 51, 3558, 329, 3001, 37, 2...
2.58156
141
import dns.resolver import sys import colorama import platform from colorama import init, Fore, Back, Style import re # pip install -r requirements.txt (colorama) os = platform.platform() if os.find('Windows')!= (-1): init(convert=True) print(""" \x1B[3mSimple Python3 Script fo...
[ 11748, 288, 5907, 13, 411, 14375, 201, 198, 11748, 25064, 201, 198, 11748, 3124, 1689, 201, 198, 11748, 3859, 201, 198, 6738, 3124, 1689, 1330, 2315, 11, 4558, 11, 5157, 11, 17738, 201, 198, 11748, 302, 201, 198, 201, 198, 2, 7347, ...
2.470085
1,053
# -*- coding: utf-8 -* """ ask.api .""" from json import dumps from tornado.httpserver import HTTPServer from tornado.ioloop import IOLoop from tornado.options import parse_command_line from tornado.web import Application, RequestHandler from tornado.options import define, options from tokenizer import get_entity fr...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 198, 37811, 1265, 13, 15042, 22135, 15931, 198, 6738, 33918, 1330, 45514, 198, 198, 6738, 33718, 13, 5450, 18497, 1330, 38288, 18497, 198, 6738, 33718, 13, 1669, 11224, 1330, 314, ...
3.142857
210
# -*- coding: utf-8 -*- """ proxy.py ~~~~~~~~ Fast, Lightweight, Pluggable, TLS interception capable proxy server focused on Network monitoring, controls & Application development, testing, debugging. :copyright: (c) 2013-present by Abhinav Singh and contributors. :license: BSD, see LICENSE fo...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 220, 220, 220, 15741, 13, 9078, 198, 220, 220, 220, 220, 15116, 198, 220, 220, 220, 220, 12549, 11, 4401, 6551, 11, 1345, 6837, 540, 11, 33855, 28759, 6007...
2.818898
254
# Copyright (c) 2013 Intel, Inc. # Copyright (c) 2013 OpenStack Foundation # 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/li...
[ 2, 15069, 357, 66, 8, 2211, 8180, 11, 3457, 13, 198, 2, 15069, 357, 66, 8, 2211, 4946, 25896, 5693, 198, 2, 1439, 6923, 33876, 13, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, ...
3.160494
405
import multiple multiple.rename("C:/Users/Username/Desktop",'new_name',33,'.exe') """this above lines renames all the files of the folder Desktop to 'new_name' and count starts from 33 to further (we can also provide 1 to start it from 1) and extension is given '.exe' hence the files will be renamed like : 1. new_n...
[ 11748, 3294, 198, 198, 48101, 13, 918, 480, 7203, 34, 14079, 14490, 14, 5842, 13292, 14, 36881, 1600, 6, 3605, 62, 3672, 3256, 2091, 4032, 13, 13499, 11537, 198, 198, 37811, 5661, 2029, 3951, 8851, 1047, 477, 262, 3696, 286, 262, 9483...
3.137931
116
import os def readlinkabs(l): """ Return an absolute path for the destination of a symlink """ if not (os.path.islink(l)): return None p = os.readlink(l) if os.path.isabs(p): return p return os.path.join(os.path.dirname(l), p)
[ 11748, 28686, 198, 198, 4299, 1100, 8726, 8937, 7, 75, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 8229, 281, 4112, 3108, 329, 262, 10965, 220, 198, 220, 220, 220, 286, 257, 827, 4029, 676, 198, 220, 220, 220, 37227, 198, ...
2.155039
129
#!/usr/bin/python3 import time import numpy as np from picamera2.encoders import H264Encoder from picamera2.outputs import CircularOutput from picamera2 import Picamera2 lsize = (320, 240) picam2 = Picamera2() video_config = picam2.video_configuration(main={"size": (1280, 720), "format": "RGB888"}, ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 11748, 640, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 8301, 18144, 17, 13, 12685, 375, 364, 1330, 367, 18897, 27195, 12342, 198, 6738, 8301, 18144, 17, 13, 22915, 82, 1330,...
2.140845
639
"""Generic functionality useful for all gene representations. This module contains classes which can be used for all the different types of patterns available for representing gene information (ie. motifs, signatures and schemas). These are the general classes which should be handle any of the different specific patte...
[ 37811, 46189, 11244, 4465, 329, 477, 9779, 24612, 13, 198, 198, 1212, 8265, 4909, 6097, 543, 460, 307, 973, 329, 477, 262, 1180, 198, 19199, 286, 7572, 1695, 329, 10200, 9779, 1321, 357, 494, 13, 32702, 82, 11, 198, 12683, 6691, 290, ...
4.418367
98
from .nut import parse_nut, format_nut, merge_nut_bottles
[ 6738, 764, 14930, 1330, 21136, 62, 14930, 11, 5794, 62, 14930, 11, 20121, 62, 14930, 62, 10985, 829, 198 ]
3.052632
19
# Copyright 2014 Josh Pieper, jjp@pobox.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, 15069, 1946, 8518, 21690, 525, 11, 474, 34523, 31, 79, 672, 1140, 13, 785, 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, ...
3.506276
239
# -*- test-case-name: epsilon.test.test_juice -*- # Copyright 2005 Divmod, Inc. See LICENSE file for details import warnings, pprint import keyword import io import six from twisted.internet.main import CONNECTION_LOST from twisted.internet.defer import Deferred, maybeDeferred, fail from twisted.internet.protocol im...
[ 2, 532, 9, 12, 1332, 12, 7442, 12, 3672, 25, 304, 862, 33576, 13, 9288, 13, 9288, 62, 14396, 501, 532, 9, 12, 198, 2, 15069, 5075, 4777, 4666, 11, 3457, 13, 220, 4091, 38559, 24290, 2393, 329, 3307, 198, 198, 11748, 14601, 11, 2...
2.572453
697
""" Client for simulator requests """ __copyright__ = "Copyright 2020, Microsoft Corp." # pyright: strict from random import uniform import time from typing import Union import jsons import requests from .exceptions import RetryTimeoutError, ServiceError from .logger import Logger from .simulator_protocol import ( ...
[ 37811, 198, 11792, 329, 35375, 7007, 198, 37811, 198, 834, 22163, 4766, 834, 796, 366, 15269, 12131, 11, 5413, 11421, 526, 198, 198, 2, 279, 4766, 25, 7646, 198, 198, 6738, 4738, 1330, 8187, 198, 11748, 640, 198, 6738, 19720, 1330, 44...
3.073446
177
''' GuoWang xie set up :2020-1-9 intergrate img and label into one file -- fiducial1024_v1 ''' import argparse import sys, os import pickle import random import collections import json import numpy as np import scipy.io as io import scipy.misc as m import matplotlib.pyplot as plt import glob import math import time ...
[ 7061, 6, 198, 8205, 78, 54, 648, 2124, 494, 198, 2617, 510, 1058, 42334, 12, 16, 12, 24, 198, 3849, 2164, 378, 33705, 290, 6167, 656, 530, 2393, 198, 198, 438, 49909, 1229, 498, 35500, 62, 85, 16, 198, 7061, 6, 628, 198, 11748, ...
2.654
500
#!/usr/bin/env python import argparse import logging try: import ujson as json except ImportError: import json import sys import datetime import os import importlib from gnip_tweet_evaluation import analysis,output """ Perform audience and/or conversation analysis on a set of Tweets. """ logger = logging.g...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 1822, 29572, 198, 11748, 18931, 198, 28311, 25, 198, 220, 220, 220, 1330, 334, 17752, 355, 33918, 220, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220, 1330, 33918, 198, 1...
2.738074
1,111
from flask import Flask, request import os from twilio.twiml.messaging_response import MessagingResponse from selenium import webdriver chrome_options = webdriver.ChromeOptions() chrome_options.binary_location = os.environ.get("GOOGLE_CHROME_BIN") chrome_options.add_argument("--headless") chrome_options.add_argument("-...
[ 6738, 42903, 1330, 46947, 11, 2581, 198, 11748, 28686, 198, 6738, 665, 346, 952, 13, 4246, 320, 75, 13, 37348, 3039, 62, 26209, 1330, 10626, 3039, 31077, 198, 6738, 384, 11925, 1505, 1330, 3992, 26230, 198, 46659, 62, 25811, 796, 3992, ...
3.009756
205
""" Custom exceptions for nflfastpy module """
[ 37811, 198, 15022, 13269, 329, 299, 69, 1652, 459, 9078, 8265, 198, 37811 ]
3.538462
13
from __future__ import print_function import numpy as np import matplotlib.pyplot as plt
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198 ]
3.333333
27
from django.test import TestCase from dynamic_setting.models import Setting
[ 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 8925, 62, 33990, 13, 27530, 1330, 25700, 198 ]
4.222222
18
"""Sensor for data from Austrian Zentralanstalt fr Meteorologie.""" from __future__ import annotations import logging import voluptuous as vol from homeassistant.components.weather import ( ATTR_WEATHER_HUMIDITY, ATTR_WEATHER_PRESSURE, ATTR_WEATHER_TEMPERATURE, ATTR_WEATHER_WIND_BEARING, ATTR_WEA...
[ 37811, 47864, 329, 1366, 422, 25691, 1168, 298, 1373, 272, 301, 2501, 1216, 25582, 928, 494, 526, 15931, 198, 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 11748, 18931, 198, 198, 11748, 2322, 37623, 5623, 355, 2322, 198, 198, 6738, 1...
2.404762
966
import copy import glob import hashlib import logging import os import shutil from subprocess import CalledProcessError, DEVNULL, check_output # skipcq:BAN-B404 import tempfile import typing from pathlib import Path from typing import Any, Text, Tuple, Union, Optional, List, Dict, NamedTuple from packaging import ver...
[ 11748, 4866, 198, 11748, 15095, 198, 11748, 12234, 8019, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 6738, 850, 14681, 1330, 34099, 18709, 12331, 11, 5550, 53, 33991, 11, 2198, 62, 22915, 220, 1303, 14267, 66, 80, ...
2.505704
5,873
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Jul 16 11:20:01 2021 @author: q GOAL : develop a backtester from a .py framework / library # installation : pip install backtesting # Documentation Index : - Manuals - Tutorials - Example Strategies - FAQ ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 19480, 5979, 1467, 1367, 25, 1238, 25, 486, 33448, 198, 198, 31, 9800, 25, 10662, 198, 19...
3.449301
572
"""" Generator Expression Em aulas anteriores foi abordado: - List Comprehension; - Dictionary Comprehension; - Set Comprehension. No foi abordado: - Tuple Comprehension ... porque elas se chamam Generators nomes = ['Carlos', 'Camila', 'Carla', 'Cristiana', 'Cristina', 'Vanessa'] print(any8[nomes[0]...
[ 15931, 15931, 198, 8645, 1352, 41986, 198, 198, 10161, 257, 25283, 281, 353, 72, 2850, 11511, 72, 450, 585, 4533, 25, 198, 220, 220, 220, 532, 7343, 3082, 7345, 295, 26, 198, 220, 220, 220, 532, 28261, 3082, 7345, 295, 26, 198, 220,...
2.6538
829
numero1 = int(input("Digite o primeiro nmero: ")) numero2 = int(input("Digite o segundo nmero: ")) numero3 = int(input("Digite o terceiro nmero: ")) if (numero1 < numero2 and numero2 < numero3): print("crescente") else: print("no est em ordem crescente")
[ 22510, 3529, 16, 796, 493, 7, 15414, 7203, 19511, 578, 267, 6994, 7058, 299, 647, 78, 25, 366, 4008, 198, 22510, 3529, 17, 796, 493, 7, 15414, 7203, 19511, 578, 267, 384, 70, 41204, 299, 647, 78, 25, 366, 4008, 198, 22510, 3529, 1...
2.4
110
import turtle tina = turtle.Turtle() tina.shape("turtle") tina.speed(10) sneeuwvlok(30, 6)
[ 11748, 28699, 198, 83, 1437, 796, 28699, 13, 51, 17964, 3419, 198, 83, 1437, 13, 43358, 7203, 83, 17964, 4943, 198, 83, 1437, 13, 12287, 7, 940, 8, 198, 198, 82, 710, 12496, 86, 19279, 482, 7, 1270, 11, 718, 8, 198 ]
2.190476
42
# Copyright (c) 2012 Roberto Alsina y otros. # 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, pub...
[ 2, 15069, 357, 66, 8, 2321, 32076, 978, 82, 1437, 331, 30972, 4951, 13, 198, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 198, 2, 1048, 16727, 257, 4866, 286, 428, 3788, 290, 3917, 198, 2, 10314, 3696, ...
3.705882
374
# to include all module here in order to cite from numpy import * from numpy.linalg import * import string import os import scipy import scipy.sparse #import rwposcar #import anaxdat import math #define touch file if False: mkdir("xixi/") #define rm file #define check file(1 exist; else0) #define check the f...
[ 2, 284, 2291, 477, 8265, 994, 287, 1502, 284, 21729, 198, 6738, 299, 32152, 1330, 1635, 198, 6738, 299, 32152, 13, 75, 1292, 70, 1330, 1635, 198, 11748, 4731, 198, 11748, 28686, 198, 11748, 629, 541, 88, 198, 11748, 629, 541, 88, 13...
1.670514
9,703
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import _utilities __a...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 17202, 39410, 25, 428, 2393, 373, 7560, 416, 262, 21624, 12994, 26144, 35986, 13, 17202, 198, 2, 17202, 2141, 407, 4370, 416, 1021, 4556, 345, 821, 1728, 345, 760, 644, 345, 389, 1804, 0, 17202, ...
2.419806
929
# Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # This file is licensed under the Apache License, Version 2.0 (the "License"). # You may not use this file except in compliance with the License. A copy of the # License is located at # # http://aws.amazon.com/apache2.0/ # # This f...
[ 2, 15069, 3050, 12, 23344, 6186, 13, 785, 11, 3457, 13, 393, 663, 29116, 13, 1439, 6923, 33876, 13, 201, 198, 2, 201, 198, 2, 770, 2393, 318, 11971, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 11074, 201...
3.063882
407
#!/usr/bin/env python3 ## # 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 ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2235, 198, 2, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 198, 2, 393, 517, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 198, 2, 9387, 351, 42...
2.878095
525
import numpy as np from scipy import ndimage
[ 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 1330, 299, 67, 9060, 628 ]
3.066667
15
# coding: utf-8 # Licensed under a 3-clause BSD style license - see LICENSE.rst """ Test the Logarithmic Units and Quantities """ from __future__ import (absolute_import, unicode_literals, division, print_function) from ...extern import six from ...extern.six.moves import zip import pickle...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 2, 49962, 739, 257, 513, 12, 565, 682, 347, 10305, 3918, 5964, 532, 766, 38559, 24290, 13, 81, 301, 198, 37811, 198, 220, 220, 220, 6208, 262, 5972, 283, 342, 9383, 27719, 290, 16972, 871, 198,...
2.067256
4,297
import os from mock import patch from datetime import datetime, date, time import json import responses from . import fixtures from django.utils import timezone CW_MEMBER_IMAGE_FILENAME = 'AnonymousMember.png' def create_mock_call(method_name, return_value, side_effect=None): """Utility function for mocking th...
[ 11748, 28686, 198, 6738, 15290, 1330, 8529, 198, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 3128, 11, 640, 198, 11748, 33918, 198, 11748, 9109, 198, 198, 6738, 764, 1330, 34609, 198, 6738, 42625, 14208, 13, 26791, 1330, 640, 11340, 19...
2.618538
561
from .monovideoodometry import MonoVideoOdometry from .parameters import * def visual_odometry( image_path="./input/sequences/10/image_0/", pose_path="./input/poses/10.txt", fivepoint=False, ): """ Plots the estimated odometry path using either five point estimation or eight point estimation :...
[ 6738, 764, 2144, 709, 485, 702, 15748, 1330, 34879, 10798, 46, 67, 15748, 198, 6738, 764, 17143, 7307, 1330, 1635, 628, 198, 4299, 5874, 62, 375, 15748, 7, 198, 220, 220, 220, 2939, 62, 6978, 28, 1911, 14, 15414, 14, 3107, 3007, 14,...
2.029298
1,297
import os import numpy as np import tensorflow as tf
[ 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 11192, 273, 11125, 355, 48700, 628, 198 ]
3.235294
17
# -*- coding: utf-8 -*- """ Created on Tue Mar 19 16:26:35 2019 @author: Administrator """ # Forked from run_rbf_comparison.py from __future__ import division from __future__ import print_function from __future__ import absolute_import from __future__ import unicode_literals import math import copy import numpy as...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 30030, 1526, 678, 1467, 25, 2075, 25, 2327, 13130, 198, 198, 31, 9800, 25, 22998, 198, 37811, 198, 2, 39812, 276, 422, 1057, 62, 81, 19881, 62,...
2.472236
3,926
import sys import pickle ########################################################## # usage # pypy find_4g.py xid_train.p ../../data/train # xid_train.p is a list like ['loIP1tiwELF9YNZQjSUO',''....] to specify # the order of samples in traing data # ../../data/train is the path of original train data ####...
[ 11748, 25064, 201, 198, 11748, 2298, 293, 201, 198, 201, 198, 29113, 14468, 7804, 2235, 201, 198, 2, 8748, 201, 198, 2, 279, 4464, 88, 1064, 62, 19, 70, 13, 9078, 2124, 312, 62, 27432, 13, 79, 11485, 14, 40720, 7890, 14, 27432, 22...
1.708671
865
from .months import Months from .sizes import Size
[ 6738, 764, 41537, 1330, 37461, 198, 6738, 764, 82, 4340, 1330, 12849 ]
4.166667
12
""" pygments.lexers.trafficscript ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lexer for RiverBed's TrafficScript (RTS) language. :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.lexer import RegexLexer from pygments.token import String...
[ 37811, 198, 220, 220, 220, 12972, 11726, 13, 2588, 364, 13, 9535, 487, 873, 6519, 198, 220, 220, 220, 220, 27156, 15116, 8728, 93, 628, 220, 220, 220, 17210, 263, 329, 5866, 45896, 338, 23624, 7391, 357, 49, 4694, 8, 3303, 13, 628, ...
3.030769
130
""" Collection of tests asserting things that should be true for any index subclass. Makes use of the `indices` fixture defined in pandas/tests/indexes/conftest.py. """ import re import numpy as np import pytest from pandas._libs.tslibs import iNaT from pandas.core.dtypes.common import is_period_dtype, needs_i8_conv...
[ 37811, 198, 36307, 286, 5254, 33183, 1243, 326, 815, 307, 2081, 329, 198, 1092, 6376, 47611, 13, 27433, 779, 286, 262, 4600, 521, 1063, 63, 29220, 5447, 198, 259, 19798, 292, 14, 41989, 14, 9630, 274, 14, 1102, 701, 395, 13, 9078, 1...
2.914773
176
import pytest import numpy as np from casadi import MX, SX import biorbd_casadi as biorbd from bioptim.dynamics.configure_problem import ConfigureProblem from bioptim.dynamics.dynamics_functions import DynamicsFunctions from bioptim.interfaces.biorbd_interface import BiorbdInterface from bioptim.misc.enums import Cont...
[ 11748, 12972, 9288, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 6124, 9189, 1330, 26135, 11, 44205, 198, 11748, 275, 1504, 17457, 62, 34004, 9189, 355, 275, 1504, 17457, 198, 6738, 3182, 40085, 13, 67, 4989, 873, 13, 11250, 495,...
3.54321
162
from hestia.manager_interface import ManagerInterface from event_manager import event_actions
[ 6738, 339, 301, 544, 13, 37153, 62, 39994, 1330, 9142, 39317, 198, 198, 6738, 1785, 62, 37153, 1330, 1785, 62, 4658, 628 ]
4.363636
22
from helpers import *
[ 6738, 49385, 1330, 1635 ]
5.25
4
#!/usr/bin/env python # encoding: utf-8 r""" Riemann solvers for the shallow water equations. The available solvers are: * Roe - Use Roe averages to caluclate the solution to the Riemann problem * HLL - Use a HLL solver * Exact - Use a newton iteration to calculate the exact solution to the Riemann pro...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 21004, 25, 3384, 69, 12, 23, 198, 81, 37811, 198, 49, 26597, 1236, 1540, 690, 329, 262, 19337, 1660, 27490, 13, 198, 220, 220, 220, 220, 198, 464, 1695, 1540, 690, 389, 25, 198,...
1.849555
4,161
# Copyright 2020, Kay Hayen, mailto:kay.hayen@gmail.com # # Part of "Nuitka", an optimizing Python compiler that is compatible and # integrates with CPython, but also works on its own. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in complianc...
[ 2, 220, 220, 220, 220, 15069, 12131, 11, 17356, 9075, 268, 11, 6920, 1462, 25, 5568, 13, 71, 323, 268, 31, 14816, 13, 785, 198, 2, 198, 2, 220, 220, 220, 220, 2142, 286, 366, 45, 5013, 4914, 1600, 281, 45780, 11361, 17050, 326, ...
2.436573
1,821
# Copyright (c) 2012-2013 Mitch Garnaat http://garnaat.org/ # Copyright 2012-2014 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http...
[ 2, 15069, 357, 66, 8, 2321, 12, 6390, 20472, 402, 28610, 265, 2638, 1378, 70, 28610, 265, 13, 2398, 14, 198, 2, 15069, 2321, 12, 4967, 6186, 13, 785, 11, 3457, 13, 393, 663, 29116, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 4996...
3.069479
806
# -*- coding: utf-8 -*- """ Created on Fri Sep 18 21:56:15 2020 @author: Ray @email: 1324789704@qq.com @wechat: RayTing0305 """ ''' Question 1 Write a function called proportion_of_education which returns the proportion of children in the dataset who had a mother with the education levels equal to less tha...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 41972, 319, 19480, 8621, 1248, 2310, 25, 3980, 25, 1314, 12131, 201, 198, 201, 198, 31, 9800, 25, 7760, 201, 198, 31, 12888, 25, 1511, 1731, 4040...
3.712121
1,188
from numpy import genfromtxt import matplotlib.pyplot as plt import mpl_finance import numpy as np import uuid import matplotlib # Input your csv file here with historical data ad = genfromtxt(f"../financial_data/SM.csv", delimiter=",", dtype=str) # output = [] # with open("STOCKbluechip.csv") as f: # output ...
[ 6738, 299, 32152, 1330, 2429, 6738, 14116, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 285, 489, 62, 69, 14149, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 334, 27112, 198, 11748, 2603, 29487, 8019, 198...
2.635945
217
""" The Tornado Framework By Ali Pesaranghader University of Ottawa, Ontario, Canada E-mail: apesaran -at- uottawa -dot- ca / alipsgh -at- gmail -dot- com """ import re from data_structures.attribute import Attribute from dictionary.tornado_dictionary import TornadoDic
[ 37811, 201, 198, 464, 48970, 25161, 201, 198, 3886, 12104, 350, 18964, 272, 456, 5067, 201, 198, 21009, 286, 14074, 11, 10553, 11, 3340, 201, 198, 36, 12, 4529, 25, 2471, 18964, 272, 532, 265, 12, 334, 1252, 6909, 532, 26518, 12, 12...
2.938144
97
from __future__ import print_function from keras.datasets import mnist from keras.datasets import cifar10 from keras.utils.np_utils import to_categorical import numpy as np from keras import backend as K from evolution import Evolution from genome_handler import GenomeHandler import tensorflow as tf #import mlflow.kera...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 41927, 292, 13, 19608, 292, 1039, 1330, 285, 77, 396, 198, 6738, 41927, 292, 13, 19608, 292, 1039, 1330, 269, 361, 283, 940, 198, 6738, 41927, 292, 13, 26791, 13, 37659, 62, ...
2.082603
799
''' Autores:Eduardo Rodrguez Lpez A01749381 Rebeca Rojas Prez A01751192 Jared Abraham Flores Guarneros A01379868 Eduardo Aguilar Chas A01749375 ''' from random import random from ...
[ 7061, 6, 198, 16541, 2850, 25, 36, 646, 13109, 6882, 41345, 14870, 406, 46057, 220, 220, 220, 220, 220, 220, 220, 220, 317, 29326, 2920, 36626, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2...
2.15873
378
"""Helper for adding content stored in a file to a jupyter notebook.""" import os from pkg_resources import resource_string from IPython.display import display, Javascript, HTML # Originally I implemented this using regular open() and read(), so it # could use relative paths from the importing file. # # But for distr...
[ 37811, 47429, 329, 4375, 2695, 8574, 287, 257, 2393, 284, 257, 474, 929, 88, 353, 20922, 526, 15931, 198, 11748, 28686, 198, 6738, 279, 10025, 62, 37540, 1330, 8271, 62, 8841, 198, 6738, 6101, 7535, 13, 13812, 1330, 3359, 11, 24711, 1...
2.811352
599
#! /usr/bin/python3 import base64 from data.ProgramHubLogger import ProgramHubLogger from datetime import datetime import logging import os import sys from ui.MotionSensor import MotionSensorWidget from ui.PositionStatus import PositionStatusWidget from ui.DevicePortWidget import DevicePortWidget from ui.ConnectionWid...
[ 2, 0, 1220, 14629, 14, 8800, 14, 29412, 18, 198, 198, 11748, 2779, 2414, 198, 6738, 1366, 13, 15167, 16066, 11187, 1362, 1330, 6118, 16066, 11187, 1362, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 18931, 198, 11748, 28686, 198,...
3.118421
380
from django.shortcuts import render from django.views.generic.list import ListView from django.views.generic.detail import DetailView from django.views.generic.edit import CreateView, UpdateView, DeleteView from django.urls import reverse_lazy from django.contrib.auth.views import LoginView from .models impor...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 201, 198, 6738, 42625, 14208, 13, 33571, 13, 41357, 13, 4868, 1330, 7343, 7680, 201, 198, 6738, 42625, 14208, 13, 33571, 13, 41357, 13, 49170, 1330, 42585, 7680, 201, 198, 6738, 42625, 1...
3.293578
109
import numpy as np from dnnv.nn.converters.tensorflow import * from dnnv.nn.operations import * TOL = 1e-6
[ 11748, 299, 32152, 355, 45941, 198, 198, 6738, 288, 20471, 85, 13, 20471, 13, 1102, 332, 1010, 13, 83, 22854, 11125, 1330, 1635, 198, 6738, 288, 20471, 85, 13, 20471, 13, 3575, 602, 1330, 1635, 628, 198, 51, 3535, 796, 352, 68, 12, ...
2.434783
46
# Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved. # # 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 us...
[ 2, 15069, 357, 34, 8, 12131, 13, 43208, 21852, 1766, 1539, 12052, 13, 1439, 2489, 10395, 13, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 198, 2, 286, 428, 3788, 290, 391...
3.061581
1,088
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Now write a program that calculates the minimum fixed monthly payment needed in order pay off a credit card balance within 12 months. By a fixed monthly payment, we mean a single number which does not change each month, but instead is a constant amount that will be ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 3844, 3551, 257, 1430, 326, 43707, 262, 5288, 5969, 9651, 6074, 2622, 220, 198, 259, 1502, 1414, 572, ...
3.548628
802
# V0 import collections # V0' # IDEA : collections.Counter(s).most_common # V1 # IDEA : SORT # https://blog.csdn.net/fuxuemingzhu/article/details/79437548 import collections ### Test case: s=Solution() assert s.frequencySort(['a','b','c','c']) == 'ccab' assert s.frequencySort(['a']) == 'a' assert s.frequencySort([...
[ 2, 569, 15, 198, 11748, 17268, 198, 198, 2, 569, 15, 6, 198, 2, 4522, 16412, 1058, 17268, 13, 31694, 7, 82, 737, 1712, 62, 11321, 198, 198, 2, 569, 16, 220, 198, 2, 4522, 16412, 1058, 311, 9863, 220, 198, 2, 3740, 1378, 14036, ...
2.488281
256
"""Stores all the helper functions that generate html""" import random def generate_2choice_html(example): '''Makes html for ranking form for the specified row index. Returns the HTML for a table of radio buttons used for ranking, as well as a count of the total number of radio buttons. ''' # Check f...
[ 37811, 1273, 2850, 477, 262, 31904, 5499, 326, 7716, 27711, 37811, 198, 11748, 4738, 198, 198, 4299, 7716, 62, 17, 25541, 62, 6494, 7, 20688, 2599, 198, 220, 705, 7061, 44, 1124, 27711, 329, 12759, 1296, 329, 262, 7368, 5752, 6376, 13...
2.289133
1,546
# -*- coding: utf-8 -*- """ @file @brief This the documentation of this module (myexampleb). """
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 31, 7753, 198, 31, 65, 3796, 770, 262, 10314, 286, 428, 8265, 357, 1820, 20688, 65, 737, 198, 37811, 628 ]
2.675676
37
############################################## """ This module generate a dataset """ ############################################## # preample import numpy as np from utilites import Pauli_operators, simulate, CheckNoise ################################################ # meta parameters name = "G_1q...
[ 29113, 7804, 4242, 2235, 201, 198, 37811, 201, 198, 1212, 8265, 7716, 257, 27039, 201, 198, 201, 198, 37811, 201, 198, 29113, 7804, 4242, 2235, 201, 198, 2, 662, 1403, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 6738, 7736, 273...
2.092486
1,211
_base_ = ['../_base_/base_tensorrt_static-300x300.py']
[ 62, 8692, 62, 796, 37250, 40720, 62, 8692, 62, 14, 8692, 62, 83, 22854, 17034, 62, 12708, 12, 6200, 87, 6200, 13, 9078, 20520, 198 ]
2.2
25
# -*- coding: utf-8 -*- """ API definition module. """ from flask import Blueprint from flask_restful import Api from .resources.user import UserAuth, UserItem, UserList, UserFollow # Create an API-related blueprint api_bp = Blueprint(name='api', import_name=__name__) api = Api(api_bp) api.add_resource(UserList, '...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 17614, 6770, 8265, 13, 198, 37811, 198, 198, 6738, 42903, 1330, 39932, 198, 6738, 42903, 62, 2118, 913, 1330, 5949, 72, 198, 198, 6738, 764, 37540, 13, ...
2.790055
181
#!usr/bin/env python3 import itertools # itertools is a module that's not technically a set of built-in functions but # it is part of the standard library that comes with python. # it's useful for for creating and using iterators. if __name__ == "__main__": main() # CONSOLE OUTPUT: # some infinite iterators #...
[ 2, 0, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 340, 861, 10141, 628, 198, 2, 340, 861, 10141, 318, 257, 8265, 326, 338, 407, 14497, 257, 900, 286, 3170, 12, 259, 5499, 475, 198, 2, 340, 318, 636, 286, 262, 3210, 5888, ...
2.476596
235
from starlette.responses import PlainTextResponse
[ 6738, 3491, 21348, 13, 16733, 274, 1330, 28847, 8206, 31077, 628 ]
4.636364
11
import atexit import datetime as dt import os import platform import pypyrus_logbook as logbook import sys import time import traceback from .conf import all_loggers from .formatter import Formatter from .header import Header from .output import Root from .record import Record from .sysinfo import Sysinfo def wr...
[ 11748, 379, 37023, 198, 11748, 4818, 8079, 355, 288, 83, 198, 11748, 28686, 198, 11748, 3859, 198, 11748, 279, 4464, 21180, 62, 6404, 2070, 355, 2604, 2070, 198, 11748, 25064, 198, 11748, 640, 198, 11748, 12854, 1891, 198, 198, 6738, 76...
2.235751
4,123
# coding: utf-8 # Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 2, 15069, 357, 66, 8, 1584, 11, 12131, 11, 18650, 290, 14, 273, 663, 29116, 13, 220, 1439, 2489, 10395, 13, 198, 2, 770, 3788, 318, 10668, 12, 36612, 284, 345, 739, 262, 14499, 2448, 33532, 1...
2.957576
165
# Spider for MillardAyo.com import scrapy from bs4 import BeautifulSoup
[ 2, 12648, 329, 9212, 446, 32, 8226, 13, 785, 198, 198, 11748, 15881, 88, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 628 ]
3.083333
24
# # 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 ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
[ 2, 198, 2, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 393, 517, 198, 2, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 9387, 351, 198, 2, 428, 670, 329, 3224, 1321, 5115, 6634, 9238, 13, 198, 2, 383, ...
3.194724
796
from sqlalchemy import create_engine from sqlalchemy.orm import scoped_session from sqlalchemy.orm import sessionmaker from settings import DB_URI Session = sessionmaker(autocommit=False, autoflush=False, bind=create_engine(DB_URI)) session = scoped_session(Session)
[ 6738, 44161, 282, 26599, 1330, 2251, 62, 18392, 198, 6738, 44161, 282, 26599, 13, 579, 1330, 629, 19458, 62, 29891, 198, 6738, 44161, 282, 26599, 13, 579, 1330, 6246, 10297, 198, 6738, 6460, 1330, 20137, 62, 47269, 198, 198, 36044, 796,...
3.392405
79
# 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 ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
[ 2, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 198, 2, 393, 517, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 198, 2, 9387, 351, 428, 670, 329, 3224, 1321, 198, 2, 5115, 6634, 9238, 13, 220, 383, 7054,...
2.539417
3,945
"""Calculation history Class""" from calc.calculations.addition import Addition from calc.calculations.subtraction import Subtraction from calc.calculations.multiplication import Multiplication from calc.calculations.division import Division
[ 37811, 9771, 14902, 2106, 5016, 37811, 198, 6738, 42302, 13, 9948, 3129, 602, 13, 2860, 653, 1330, 3060, 653, 198, 6738, 42302, 13, 9948, 3129, 602, 13, 7266, 83, 7861, 1330, 3834, 83, 7861, 198, 6738, 42302, 13, 9948, 3129, 602, 13, ...
4.084746
59
# Aula 17 (Listas (Parte 1)) valores = [] while True: valor = int(input('Digite um Valor ou -1 para Finalizar: ')) if valor < 0: print('\nFinalizando...') break else: valores.append(valor) print(f'Foram digitados {len(valores)} nmeros') valores.sort(reverse=True) print(f'Lista orde...
[ 2, 317, 4712, 1596, 357, 8053, 292, 357, 7841, 68, 352, 4008, 198, 198, 2100, 2850, 796, 17635, 198, 198, 4514, 6407, 25, 198, 220, 220, 220, 1188, 273, 796, 493, 7, 15414, 10786, 19511, 578, 23781, 3254, 273, 267, 84, 532, 16, 31...
2.275109
229
# Generated by Django 2.0.9 on 2018-11-20 11:23 from django.conf import settings from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 362, 13, 15, 13, 24, 319, 2864, 12, 1157, 12, 1238, 1367, 25, 1954, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 142...
3.019231
52
from .bn import ABN, InPlaceABN, InPlaceABNWrapper, InPlaceABNSync, InPlaceABNSyncWrapper from .misc import GlobalAvgPool2d from .residual import IdentityResidualBlock from .dense import DenseModule
[ 6738, 764, 9374, 1330, 9564, 45, 11, 554, 27271, 6242, 45, 11, 554, 27271, 6242, 27605, 430, 2848, 11, 554, 27271, 6242, 8035, 13361, 11, 554, 27271, 6242, 8035, 13361, 36918, 2848, 201, 198, 6738, 764, 44374, 1330, 8060, 48997, 27201, ...
2.985294
68
# 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 ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
[ 2, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 198, 2, 393, 517, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 198, 2, 9387, 351, 428, 670, 329, 3224, 1321, 198, 2, 5115, 6634, 9238, 13, 220, 383, 7054,...
2.327428
1,524
# coding: utf-8 """ Merlin API Guide for accessing Merlin's model management, deployment, and serving functionalities # noqa: E501 OpenAPI spec version: 0.7.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import re # noqa: F401 ...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 220, 220, 220, 32918, 628, 220, 220, 220, 7824, 10005, 329, 22534, 32918, 338, 2746, 4542, 11, 14833, 11, 290, 7351, 10345, 871, 220, 1303, 645, 20402, 25, 412, 33548, 628, 220, ...
3.103704
135
"""Define the NonlinearBlockJac class.""" from openmdao.recorders.recording_iteration_stack import Recording from openmdao.solvers.solver import NonlinearSolver from openmdao.utils.mpi import multi_proc_fail_check
[ 37811, 7469, 500, 262, 8504, 29127, 12235, 28821, 1398, 526, 15931, 198, 6738, 1280, 9132, 5488, 13, 8344, 6361, 13, 8344, 1284, 62, 2676, 341, 62, 25558, 1330, 43905, 198, 6738, 1280, 9132, 5488, 13, 34453, 690, 13, 82, 14375, 1330, ...
3.359375
64
# Copyright 2018 The TensorFlow Authors. 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 applica...
[ 2, 15069, 2864, 383, 309, 22854, 37535, 46665, 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, ...
3.987539
321
from meerk40t.core.cutcode import CutCode, RawCut from meerk40t.core.parameters import Parameters from meerk40t.core.units import UNITS_PER_MIL from meerk40t.kernel import Module from meerk40t.numpath import Numpath from meerk40t.svgelements import Color def header_write(self, data): """ Write da...
[ 6738, 502, 9587, 1821, 83, 13, 7295, 13, 8968, 8189, 1330, 9712, 10669, 11, 16089, 26254, 198, 6738, 502, 9587, 1821, 83, 13, 7295, 13, 17143, 7307, 1330, 40117, 198, 6738, 502, 9587, 1821, 83, 13, 7295, 13, 41667, 1330, 4725, 29722, ...
2.295508
423
# -*- coding: utf8 -*- # Copyright (c) 2017-2021 THL A29 Limited, a Tencent company. 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...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 23, 532, 9, 12, 198, 2, 15069, 357, 66, 8, 2177, 12, 1238, 2481, 2320, 43, 317, 1959, 15302, 11, 257, 9368, 1087, 1664, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 137...
1.778364
758
# Ported to Python 3 # Originally from https://github.com/DeprecatedCode/oauth2lib/blob/d161b010f8a596826050a09e5e94d59443cc12d9/oauth2lib/provider.py import json import logging from requests import Response from io import StringIO try: from werkzeug.exceptions import Unauthorized except ImportError: Unauthor...
[ 2, 4347, 276, 284, 11361, 513, 198, 2, 19486, 422, 3740, 1378, 12567, 13, 785, 14, 12156, 31023, 10669, 14, 12162, 1071, 17, 8019, 14, 2436, 672, 14, 67, 25948, 65, 20943, 69, 23, 64, 3270, 3104, 21719, 1120, 64, 2931, 68, 20, 68,...
2.363341
5,232
from model import ImageCluster m=ImageCluster( base_model='vgg16',#your feature map extractor model resorted_img_folder='resorted_data',#the folder for clustered images cluster_algo='kmeans',#cluster algorithm base_img_folder='data', maxK=150,#the max k num is 30, which means ImageCluster calculates...
[ 6738, 2746, 1330, 7412, 2601, 5819, 198, 76, 28, 5159, 2601, 5819, 7, 198, 220, 220, 220, 2779, 62, 19849, 11639, 85, 1130, 1433, 3256, 2, 14108, 3895, 3975, 7925, 273, 2746, 198, 220, 220, 220, 44635, 62, 9600, 62, 43551, 11639, 41...
2.996124
258
# Copyright (c) 2021 GradsFlow. 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 ...
[ 2, 220, 15069, 357, 66, 8, 33448, 1902, 5643, 37535, 13, 1439, 2489, 10395, 13, 198, 2, 198, 2, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 220, 345, 743, 407, 779, 428, 2393, ...
3.661111
180
from Jumpscale import j JSBASE = j.baseclasses.object from .ExecutorBase import * import serial
[ 6738, 449, 8142, 38765, 1330, 474, 198, 198, 41, 16811, 11159, 796, 474, 13, 8692, 37724, 13, 15252, 198, 198, 6738, 764, 23002, 38409, 14881, 1330, 1635, 198, 11748, 11389, 628 ]
3.193548
31
# Copyright MelisaDev 2022 - Present # Full MIT License can be found in `LICENSE.txt` at the project root. from __future__ import annotations
[ 2, 15069, 5616, 9160, 13603, 33160, 532, 21662, 198, 2, 6462, 17168, 13789, 460, 307, 1043, 287, 4600, 43, 2149, 24290, 13, 14116, 63, 379, 262, 1628, 6808, 13, 198, 198, 6738, 11593, 37443, 834, 1330, 37647, 628 ]
3.789474
38
"""Classes derived from the Feedgen extension classes.""" from typing import Dict, List, Optional from lxml import etree from lxml.etree import Element from flask import current_app from feedgen.ext.base import BaseEntryExtension, BaseExtension from feed.domain import Author, Media
[ 37811, 9487, 274, 10944, 422, 262, 18272, 5235, 7552, 6097, 526, 15931, 198, 6738, 19720, 1330, 360, 713, 11, 7343, 11, 32233, 198, 198, 6738, 300, 19875, 1330, 2123, 631, 198, 6738, 300, 19875, 13, 316, 631, 1330, 11703, 198, 6738, 4...
3.84
75