content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
# -*- coding: utf-8 -*- # License: Apache License 2.0 from __future__ import unicode_literals import unittest from wikipedia2vec.utils.tokenizer.token import Token from wikipedia2vec.utils.tokenizer.mecab_tokenizer import MeCabTokenizer from nose.tools import *
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 13789, 25, 24843, 13789, 362, 13, 15, 198, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 11748, 555, 715, 395, 198, 198, 6738, 47145, 11151, ...
3.022727
88
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( js_to_json, merge_dicts, )
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 764, 11321, 1330, 14151, 11627, 40450, 198, 6738, 11485, 26791, 1330, 357, 198, 220, 220, 220, 44804, 62, 1462, 62, 17752...
2.709091
55
# Generated by Django 2.2.7 on 2020-02-12 08:58 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 22, 319, 12131, 12, 2999, 12, 1065, 8487, 25, 3365, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.766667
30
#!/usr/bin/env python3
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198 ]
2.3
10
#!/usr/bin/env Python """ Entry point from the TwitOff Flask web application """ # Local imports from .app import create_app APP = create_app()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 11361, 198, 37811, 198, 30150, 966, 422, 262, 1815, 270, 9362, 46947, 3992, 3586, 198, 37811, 198, 2, 10714, 17944, 198, 6738, 764, 1324, 1330, 2251, 62, 1324, 198, 198, 24805, 796, 2251, 62, 1324...
3.295455
44
from typing import Dict import click import yaml from .ddns_updater import ddns_updater from .public_ip_getter import public_ip_getter from .error_handler import error_handler from ddns_manager import DDNSManager @click.group() def cli(): """ DDNS Manager\n Simple, powerful and extensible Dynamic DNS m...
[ 6738, 19720, 1330, 360, 713, 198, 198, 11748, 3904, 198, 11748, 331, 43695, 198, 198, 6738, 764, 1860, 5907, 62, 929, 67, 729, 1330, 49427, 5907, 62, 929, 67, 729, 198, 6738, 764, 11377, 62, 541, 62, 1136, 353, 1330, 1171, 62, 541, ...
2.561437
529
import json import torch from base.base_dataset import BaseADDataset from networks.main import build_network, build_autoencoder from optim.D3RE_uLSIF_trainer import D3REuLSIFTrainer class D3REuLSIF(object): """A class for the Deep Density Ratio estimation. Attributes: eta: Deep SAD hyperparameter et...
[ 11748, 33918, 198, 11748, 28034, 198, 198, 6738, 2779, 13, 8692, 62, 19608, 292, 316, 1330, 7308, 2885, 27354, 292, 316, 198, 6738, 7686, 13, 12417, 1330, 1382, 62, 27349, 11, 1382, 62, 2306, 6571, 66, 12342, 198, 6738, 6436, 13, 35, ...
2.282149
1,843
# 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,...
4.009174
218
fAnn = open("/home/mlc/TextMining/14.ann") fTxt = open("/home/mlc/TextMining/14.txt") annTxt = fAnn.read() lawTxt = fTxt.read() lawTxtWordList = lawTxt.replace("\n", " ").split(" ") filteredLawTxtList = [] for word in lawTxtWordList: if word == '': filteredLawTxtList.append("###") else: ...
[ 220, 220, 220, 220, 220, 220, 220, 220, 198, 198, 69, 18858, 796, 1280, 7203, 14, 11195, 14, 4029, 66, 14, 8206, 44, 3191, 14, 1415, 13, 1236, 4943, 198, 69, 51, 742, 796, 1280, 7203, 14, 11195, 14, 4029, 66, 14, 8206, 44, 3191,...
2.075916
382
from django.db import transaction from flexible.forms import * from flexible.models_tests import * from flexible.tests_utils import * # from accounts.tests_utils import create_anon_request # class FlexibleFormsTestCase(TestCase): # def test_model_instance_form_new_instance_valid_input(self): # request = ...
[ 6738, 42625, 14208, 13, 9945, 1330, 8611, 198, 198, 6738, 12846, 13, 23914, 1330, 1635, 198, 6738, 12846, 13, 27530, 62, 41989, 1330, 1635, 198, 6738, 12846, 13, 41989, 62, 26791, 1330, 1635, 198, 2, 422, 5504, 13, 41989, 62, 26791, 1...
2.038519
6,724
# This file was automatically generated by SWIG (http://www.swig.org). # Version 2.0.10 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. from sys import version_info if version_info >= (3,0,0): new_instancemethod = lambda func, inst, cls: _StepBas...
[ 2, 770, 2393, 373, 6338, 7560, 416, 12672, 3528, 357, 4023, 1378, 2503, 13, 2032, 328, 13, 2398, 737, 198, 2, 10628, 362, 13, 15, 13, 940, 198, 2, 198, 2, 2141, 407, 787, 2458, 284, 428, 2393, 4556, 345, 760, 644, 345, 389, 1804...
3.538671
78,263
LOOKUP_BUSINESS = { "ABACUS": "ABCS", "ABCS": "ABCS", "ABOVE": "ABV", "ABV": "ABV", "ABRASIVE": "ABR", "ABR": "ABR", "ABRSV": "ABR", "ABROAD": "ABRD", "ABRD": "ABRD", "ABSOLUTE": "ABSLT", "ABSLT": "ABSLT", "ABSTRACT": "ABSTRCT", "ABSTRCT": "ABSTRCT", "ACADEMIC": "...
[ 43, 15308, 8577, 62, 45346, 44180, 796, 1391, 198, 220, 220, 220, 366, 6242, 2246, 2937, 1298, 366, 24694, 50, 1600, 198, 220, 220, 220, 366, 24694, 50, 1298, 366, 24694, 50, 1600, 198, 220, 220, 220, 366, 6242, 46, 6089, 1298, 366,...
1.689886
74,982
import importlib import numpy as np import pandas as pd import pytest from sklearn.model_selection import train_test_split from sklearn.preprocessing import LabelEncoder import tensorflow as tf from keras_batchflow.tf.batch_generators import BatchGenerator as BatchGeneratorTF from keras_batchflow.base.batch_generators ...
[ 11748, 1330, 8019, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 12972, 9288, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 4512, 62, 9288, 62, 35312, 198, 6738, 1341, 35720, 13, 3866, 36948...
2.912429
354
# Project: GBS Tool # Author: Dr. Marc Mueller-Stoffels, marc@denamics.com, denamics GmbH # Date: December 15, 2017 # License: MIT License (see LICENSE file of this package for more information) # General imports from bs4 import BeautifulSoup as Soup class PvSystem: """ PvSystem class: stub :var: :m...
[ 2, 4935, 25, 402, 4462, 16984, 198, 2, 6434, 25, 1583, 13, 13067, 17768, 12, 1273, 2364, 1424, 11, 1667, 66, 31, 6559, 321, 873, 13, 785, 11, 2853, 321, 873, 402, 2022, 39, 198, 2, 7536, 25, 3426, 1315, 11, 2177, 198, 2, 13789, ...
2.396325
381
from double3sdk.double_api import _DoubleAPI
[ 6738, 4274, 18, 21282, 74, 13, 23352, 62, 15042, 1330, 4808, 25628, 17614, 628 ]
3.285714
14
import urwid from subprocess import run, PIPE def remove_namespaces(namespaces_array): """ Execute 'kubectl repo remove' command on input values namespaces_array is an array of strings as: ['namespace1', 'anothername', 'nalkinscloud', ...] :param namespaces_array: array of strings :return:...
[ 198, 11748, 2956, 28029, 198, 6738, 850, 14681, 1330, 1057, 11, 350, 4061, 36, 628, 198, 198, 4299, 4781, 62, 14933, 43076, 7, 14933, 43076, 62, 18747, 2599, 628, 220, 220, 220, 37227, 198, 220, 220, 220, 8393, 1133, 705, 74, 549, 4...
2.942177
294
import os # change to the root directory of this project for an example. os.chdir(os.path.basename(os.getcwd())) # Import the main python script. import pihole_stat_rainbow_hat # We're going to define library as the script. # Initialize the main class PiholeStatRainbowHat() library = pihole_stat_rainbow_hat.PiholeSt...
[ 11748, 28686, 198, 198, 2, 1487, 284, 262, 6808, 8619, 286, 428, 1628, 329, 281, 1672, 13, 198, 418, 13, 354, 15908, 7, 418, 13, 6978, 13, 12093, 12453, 7, 418, 13, 1136, 66, 16993, 3419, 4008, 198, 198, 2, 17267, 262, 1388, 21015...
3.472656
256
""" Custom layers """ import torch.nn as nn from numpy import prod import math class pixelNorm(nn.Module): """ It does this in short y = x/sqrt(mean(x**2) + ep) """
[ 37811, 201, 198, 15022, 11685, 201, 198, 37811, 201, 198, 201, 198, 11748, 28034, 13, 20471, 355, 299, 77, 201, 198, 6738, 299, 32152, 1330, 40426, 201, 198, 11748, 10688, 201, 198, 201, 198, 201, 198, 4871, 17465, 35393, 7, 20471, 13...
2.147368
95
from flask import Flask, render_template, request, session, redirect, url_for, flash, jsonify import os import urllib, json, sqlite3 from util.db_builder import execute from util.user import User from util.post import Post from util.qaf import Qaf from util.comment import Comment from json import loads import util.quo...
[ 6738, 42903, 1330, 46947, 11, 8543, 62, 28243, 11, 2581, 11, 6246, 11, 18941, 11, 19016, 62, 1640, 11, 7644, 11, 33918, 1958, 198, 11748, 28686, 198, 11748, 2956, 297, 571, 11, 33918, 11, 44161, 578, 18, 198, 198, 6738, 7736, 13, 99...
2.478178
527
input = """(5 * 7 * 5) * 6 * 5 + 7 + 6 * 4 (2 + 3 + (2 + 8) * 3 + (7 + 4)) * 3 + 7 2 + 4 * (2 + 2 * (9 + 2 + 6 + 3 + 6) + 4) 4 * 3 9 + (8 * 5 * 5 * 4 * (3 * 5) * 2) + 4 + 4 5 + 5 + 2 * 4 + 4 7 + 9 * 2 + 2 * 3 5 + 8 + 5 * (6 * 8 * (9 * 2 + 2 + 7 + 4 + 2) + 4 * 6) * 5 8 * 7 * 4 * 5 + 3 (9 * 9 + 9 * 7 * 4) + 9 + 5 * (5 + ...
[ 15414, 796, 13538, 18109, 20, 1635, 767, 1635, 642, 8, 1635, 718, 1635, 642, 1343, 767, 1343, 718, 1635, 604, 198, 7, 17, 1343, 513, 1343, 357, 17, 1343, 807, 8, 1635, 513, 1343, 357, 22, 1343, 604, 4008, 1635, 513, 1343, 767, 198...
1.793723
10,738
""" Faça um programa que leia uma frase pelo teclado e mostre: - Quantas vezes aparece a letra 'A'. - Em que posição ela aparece a primeira vez. - Em que posição ela aparece pela última vez. """ frase_digitada = input('Digite uma frase: ') print(f'A palavra "A" aparece: {frase_digitada.upper().count("...
[ 37811, 198, 220, 220, 220, 18350, 50041, 23781, 1430, 64, 8358, 443, 544, 334, 2611, 1216, 589, 16176, 78, 573, 565, 4533, 304, 749, 260, 25, 198, 220, 220, 220, 532, 16972, 292, 1569, 12271, 2471, 533, 344, 257, 1309, 430, 705, 32,...
2.225806
217
from pfam_maps.models import PfamMaps from django.contrib import admin admin.site.register(PfamMaps, PfamMapsAdmin)
[ 6738, 279, 44769, 62, 31803, 13, 27530, 1330, 38477, 321, 47010, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 628, 198, 28482, 13, 15654, 13, 30238, 7, 47, 44769, 47010, 11, 38477, 321, 47010, 46787, 8, 198 ]
3.105263
38
#! /usr/bin/python import time from datetime import datetime import serial from xbee import XBee, ZigBee PORT = '/dev/ttyUSB0' BAUD_RATE = 9600 # Open serial port and enable flow control ser = serial.Serial(PORT, BAUD_RATE, bytesize=8, parity='N', stopbits=1, timeout=None, xonxoff=1, rtscts=1, dsrdtr=1) # Create A...
[ 198, 2, 0, 1220, 14629, 14, 8800, 14, 29412, 198, 198, 11748, 640, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 11389, 198, 6738, 2124, 20963, 1330, 1395, 49512, 11, 24992, 49512, 198, 198, 15490, 796, 31051, 7959, 14, 42852, ...
2.111446
664
import heapq G = { "A": {"B":2, "C":5}, "B": {"A": 2, "D": 3, "E": 1, "F": 1}, "C": {"A": 5, "F": 3}, "D": {"B": 3}, "E": {"B": 4, "F": 3}, "F": {"C": 3, "E": 3}, } G = Graph(G) r""" Layout of G2: E -- 1 --> B -- 1 --> C -- 1 --> D -- 1 --> F \ ...
[ 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198, 198, 11748, 24575, 80, 628, 198, 38, 796, 1391, 198, 220, 220, 220, 366, 32, 1298, 19779, 33, 1298, 17, 11, 366, 34, 1298, 20, 5512, 198, 220, 220, 220, 366, 33, ...
1.783934
722
from .functions import PAM_Module, CrissCrossAttention, CrossAttention, ca_weight, ca_map
[ 6738, 764, 12543, 2733, 1330, 350, 2390, 62, 26796, 11, 3864, 747, 21544, 8086, 1463, 11, 6372, 8086, 1463, 11, 1275, 62, 6551, 11, 1275, 62, 8899 ]
3.296296
27
#List of locations Alley = Location("Alley") ArcheryRange = Location("Archery Range") Beach = Location("Beach") Cemetary = Location("Cemetary") Chapel = Location("Chapel") Dock = Location("Dock") Factory = Location("Factory") FireStation = Location("Fire station") Forest = Location("Forest") Hospital = Location("Hospi...
[ 198, 2, 8053, 286, 7064, 198, 2348, 1636, 796, 13397, 7203, 2348, 1636, 4943, 198, 3163, 31132, 17257, 796, 13397, 7203, 3163, 31132, 13667, 4943, 198, 3856, 620, 796, 13397, 7203, 3856, 620, 4943, 198, 34, 368, 8527, 796, 13397, 7203, ...
3.300469
213
""" Example of lazy vs normal loading Created by Chip Huyen (chiphuyen@cs.stanford.edu) CS20: "TensorFlow for Deep Learning Research" cs20.stanford.edu Lecture 02 """ import os os.environ['TF_CPP_MIN_LOG_LEVEL']='2' import tensorflow as tf ######################################## ## NORMAL LOADING ## ## ...
[ 37811, 17934, 286, 16931, 3691, 3487, 11046, 198, 41972, 416, 17869, 367, 4669, 268, 357, 354, 13323, 4669, 268, 31, 6359, 13, 14192, 3841, 13, 15532, 8, 198, 7902, 1238, 25, 366, 51, 22854, 37535, 329, 10766, 18252, 4992, 1, 198, 635...
2.757075
424
from app import db, api, jwt, reqparser from app.respmsg import mk_response from app.models.user import User from app.middleware.auth import admin_required, not_expired from flask import current_app from flask_restful import Resource, abort, request from flask_jwt_simple import jwt_required, get_jwt_identity from funct...
[ 6738, 598, 1330, 20613, 11, 40391, 11, 474, 46569, 11, 43089, 48610, 198, 6738, 598, 13, 4363, 19662, 1330, 33480, 62, 26209, 198, 6738, 598, 13, 27530, 13, 7220, 1330, 11787, 198, 6738, 598, 13, 27171, 1574, 13, 18439, 1330, 13169, 6...
2.443491
2,097
import argparse import sys from socialfeeder import feeder, __VERSION__ from socialfeeder.utilities.constants import FEEDER_FACEBOOK if __name__ == '__main__': main()
[ 11748, 1822, 29572, 198, 11748, 25064, 198, 6738, 1919, 12363, 263, 1330, 3745, 263, 11, 11593, 43717, 834, 198, 6738, 1919, 12363, 263, 13, 315, 2410, 13, 9979, 1187, 1330, 18630, 1961, 1137, 62, 49836, 39453, 198, 198, 361, 11593, 367...
3.166667
54
""" Otter Check command-line utility """ import os from glob import glob from jinja2 import Template from .logs import LogEntry, EventType from .notebook import _OTTER_LOG_FILENAME from ..execute import grade_notebook, check from ..utils import block_print RESULT_TEMPLATE = Template("""{% if grade == 1.0 %}All tes...
[ 37811, 198, 46, 83, 353, 6822, 3141, 12, 1370, 10361, 198, 37811, 198, 198, 11748, 28686, 198, 198, 6738, 15095, 1330, 15095, 198, 6738, 474, 259, 6592, 17, 1330, 37350, 198, 198, 6738, 764, 6404, 82, 1330, 5972, 30150, 11, 8558, 6030...
2.738189
1,016
import cv2 import math import numpy as np import os from opt import * import pandas as pd # Read images with OpenCV. from ast import literal_eval import mediapipe as mp mp_hands = mp.solutions.hands mp_drawing = mp.solutions.drawing_utils mp_drawing_styles = mp.solutions.drawing_styles # help(mp_hands.Hands) # Run M...
[ 11748, 269, 85, 17, 198, 11748, 10688, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 6738, 2172, 1330, 1635, 198, 11748, 19798, 292, 355, 279, 67, 198, 2, 4149, 4263, 351, 4946, 33538, 13, 198, 6738, 6468, 1330, 18875, 6...
2.122519
1,159
import sys if sys.version_info >= (3, 8): from typing import Optional, Literal, List, Any, Callable, Dict, Union else: from typing import Optional, List, Any, Callable, Dict, Union from typing_extensions import Literal import logging from pyee import AsyncIOEventEmitter from aiortc import RTCIceServer, Med...
[ 11748, 25064, 198, 361, 25064, 13, 9641, 62, 10951, 18189, 357, 18, 11, 807, 2599, 198, 220, 220, 220, 422, 19720, 1330, 32233, 11, 25659, 1691, 11, 7343, 11, 4377, 11, 4889, 540, 11, 360, 713, 11, 4479, 198, 17772, 25, 198, 220, ...
3.943396
318
import numpy as np from adabkb.optimizer import AdaBKB from adabkb.kernels import GaussianKernel from adabkb.options import OptimizerOptions import time import matplotlib.pyplot as plt print("---------------------------------------------------------------------------------------") init_time = time.time() fun = lamb...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 512, 397, 32812, 13, 40085, 7509, 1330, 47395, 33, 22764, 198, 6738, 512, 397, 32812, 13, 74, 44930, 1330, 12822, 31562, 42, 7948, 198, 6738, 512, 397, 32812, 13, 25811, 1330, 30011, 7509, 29046...
2.247303
1,205
from . import edges from .node2vec import Node2Vec __version__ = '0.4.3'
[ 6738, 764, 1330, 13015, 198, 6738, 764, 17440, 17, 35138, 1330, 19081, 17, 53, 721, 198, 198, 834, 9641, 834, 796, 705, 15, 13, 19, 13, 18, 6, 198 ]
2.551724
29
__author__ = "Dave Wapstra <dwapstra@cisco.com>" from unicon.statemachine import State, Path, StateMachine from unicon.eal.dialogs import Dialog, Statement from unicon.plugins.generic.statements import GenericStatements from ..statemachine import ConfdStateMachine from .patterns import NfvisPatterns patterns = Nfvi...
[ 834, 9800, 834, 796, 366, 27984, 370, 499, 12044, 1279, 67, 86, 499, 12044, 31, 66, 4861, 13, 785, 24618, 198, 198, 6738, 555, 4749, 13, 14269, 368, 20480, 1330, 1812, 11, 10644, 11, 1812, 37573, 198, 6738, 555, 4749, 13, 2287, 13, ...
2.628713
202
# This module provides a basic and probably temporary WCS solution until astropy has a wcs built-in import warnings import numpy as np from astropy.extern import six from astropy.utils import misc from astropy.modeling import Model, polynomial from astropy.modeling.parameters import Parameter from ..models.BSplineMod...
[ 2, 770, 8265, 3769, 257, 4096, 290, 2192, 8584, 45410, 4610, 1566, 6468, 28338, 468, 257, 266, 6359, 3170, 12, 259, 198, 198, 11748, 14601, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 6468, 28338, 13, 1069, 759, 1330, 2237, 19...
2.541508
4,469
# -*- coding: utf-8 -*- { '\n\nThank you!': '\n\nThank you!', '\n\nWe will wait and let you know when your payment is confirmed.': '\n\nWe will wait and let you know when your payment is confirmed.', '\n- %s from %s to %s': '\n- %s from %s to %s', '\nAmount: R$%.2f': '\nAmount: R$%.2f', "\nSomething happened and we cou...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 90, 198, 6, 59, 77, 59, 77, 10449, 345, 0, 10354, 705, 59, 77, 59, 77, 10449, 345, 0, 3256, 198, 6, 59, 77, 59, 77, 1135, 481, 4043, 290, 1309, 345, 760, 618, ...
2.693032
12,643
# Copyright (c) 2012-2022, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. def component_platforms(component_platform): """ Property: Component.Platform """ valid_component_platforms = ["Linux", "Windows"] if component_platform not in valid_component_platfor...
[ 2, 15069, 357, 66, 8, 2321, 12, 1238, 1828, 11, 2940, 2631, 988, 1279, 4102, 31, 431, 988, 13, 2398, 29, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 4091, 38559, 24290, 2393, 329, 1336, 5964, 13, 628, 198, 4299, 7515, 62, 242...
2.652614
593
import os from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_migrate import Migrate from flask_login import LoginManager from flask_babel import Babel, gettext #################################################### ### Config #################################################### db = SQLAlchemy() ...
[ 11748, 28686, 198, 6738, 42903, 1330, 46947, 198, 6738, 42903, 62, 25410, 282, 26599, 1330, 16363, 2348, 26599, 198, 6738, 42903, 62, 76, 42175, 1330, 337, 42175, 198, 6738, 42903, 62, 38235, 1330, 23093, 13511, 198, 6738, 42903, 62, 65, ...
4.764706
119
""" Copyright MIT and Harvey Mudd College MIT License Summer 2020 Lab 4B - LIDAR Wall Following """ ######################################################################################## # Imports ######################################################################################## import sys import cv2 as cv i...
[ 37811, 198, 15269, 17168, 290, 14943, 337, 4185, 5535, 198, 36393, 13789, 198, 33560, 12131, 198, 198, 17822, 604, 33, 532, 406, 2389, 1503, 5007, 14207, 198, 37811, 198, 198, 29113, 29113, 14468, 7804, 198, 2, 1846, 3742, 198, 29113, 2...
3.209172
894
import logging import os import requests from spokestack.io.pyaudio import PyAudioOutput from spokestack.profile.wakeword_asr import WakewordSpokestackASR from spokestack.tts.clients.spokestack import TextToSpeechClient from spokestack.tts.manager import TextToSpeechManager from const import DEFAULT_MODEL_URL, FILE_N...
[ 11748, 18931, 198, 11748, 28686, 198, 198, 11748, 7007, 198, 6738, 599, 482, 395, 441, 13, 952, 13, 9078, 24051, 1330, 9485, 21206, 26410, 198, 6738, 599, 482, 395, 441, 13, 13317, 13, 48530, 4775, 62, 292, 81, 1330, 20441, 4775, 4561...
2.612717
346
from django.test import TestCase from django.db import connection from curious.graph import traverse from curious_tests.models import Blog, Entry, Author from curious_tests import assertQueryResultsEqual
[ 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 42625, 14208, 13, 9945, 1330, 4637, 198, 6738, 11040, 13, 34960, 1330, 38138, 198, 6738, 11040, 62, 41989, 13, 27530, 1330, 14001, 11, 21617, 11, 6434, 198, 6738, 11040, 62, 41...
4.25
48
import os from dotenv import load_dotenv from pathlib import Path load_dotenv() env_path = Path('.') / '.env' load_dotenv(dotenv_path=env_path)
[ 11748, 28686, 198, 6738, 16605, 24330, 1330, 3440, 62, 26518, 24330, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 2220, 62, 26518, 24330, 3419, 198, 198, 24330, 62, 6978, 796, 10644, 10786, 2637, 8, 1220, 45302, 24330, 6, 198, 2220, 62...
2.722222
54
from typing import List import re import io from configVar import config_vars from db import DBManager from .baseClasses import * from .subprocessBatchCommands import RunProcessBase class SVNClient(RunProcessBase, kwargs_defaults={"url": None, "depth": "infinity", "repo_rev": -1, 'working_copy_path': None}): """ ...
[ 6738, 19720, 1330, 7343, 198, 11748, 302, 198, 11748, 33245, 198, 6738, 4566, 19852, 1330, 4566, 62, 85, 945, 198, 6738, 20613, 1330, 20137, 13511, 198, 6738, 764, 8692, 9487, 274, 1330, 1635, 198, 6738, 764, 7266, 14681, 33, 963, 6935,...
2.779751
563
from time import sleep from fastapi import APIRouter, BackgroundTasks router = APIRouter() @router.get("")
[ 6738, 640, 1330, 3993, 198, 198, 6738, 3049, 15042, 1330, 3486, 4663, 39605, 11, 25353, 51, 6791, 198, 198, 472, 353, 796, 3486, 4663, 39605, 3419, 628, 198, 198, 31, 472, 353, 13, 1136, 7203, 4943, 198 ]
3.027027
37
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # PYTHON_ARGCOMPLETE_OK ## # Copyright 2015 Telefonica Investigacion y Desarrollo, S.A.U. # This file is part of openmano # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the L...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 350, 56, 4221, 1340, 62, 1503, 38, 41335, 9328, 62, 11380, 198, 198, 2235, 198, 2, 15069, 1853, 14318, 69, 3...
2.408759
1,918
# coding: utf-8 from __future__ import division, print_function, unicode_literals from formatcode.base.errors import FormatCodeError
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 6738, 11593, 37443, 834, 1330, 7297, 11, 3601, 62, 8818, 11, 28000, 1098, 62, 17201, 874, 198, 6738, 5794, 8189, 13, 8692, 13, 48277, 1330, 18980, 10669, 12331, 628, 628 ]
3.512821
39
# Copyright 2021 ABSA Group Limited # 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 writ...
[ 2, 15069, 33448, 9564, 4090, 4912, 15302, 198, 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, ...
2.229947
1,870
from Pythonexercicios.ex111.UtilidadesCeV import moeda from Pythonexercicios.ex112.UtilidadesCeV import dados p = dados.leiadinheiro("Digite um valor R$ ") moeda.resumo(p, taxa=int(input('Aumento: ')), taxar=int(input('Redução: ')))
[ 6738, 48657, 505, 87, 2798, 291, 4267, 13, 1069, 16243, 13, 18274, 346, 312, 2367, 34, 68, 53, 1330, 6941, 18082, 198, 6738, 48657, 505, 87, 2798, 291, 4267, 13, 1069, 14686, 13, 18274, 346, 312, 2367, 34, 68, 53, 1330, 9955, 418, ...
2.156522
115
import argparse from pathlib import Path import torch import torch.nn as nn from PIL import Image from torchvision import transforms from torchvision.utils import save_image import numpy as np import math import time import net from function import adaptive_instance_normalization, coral # Example code: # python Meta...
[ 11748, 1822, 29572, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 6738, 350, 4146, 1330, 7412, 198, 6738, 28034, 10178, 1330, 31408, 198, 6738, 28034, 10178, 13, 26791, 1330, ...
2.767561
1,566
bl_info = { "name": "Sausage64 Character Export", "description": "Exports a sausage-link character with animations.", "author": "Buu342", "version": (1, 0), "blender": (2, 80, 0), "location": "File > Export > Sausage64 Character (.S64)", "warning": "", "wiki_url": "https://github.com/buu...
[ 2436, 62, 10951, 796, 1391, 198, 220, 220, 220, 366, 3672, 1298, 366, 50, 8717, 496, 2414, 15684, 36472, 1600, 198, 220, 220, 220, 366, 11213, 1298, 366, 3109, 3742, 257, 31889, 12, 8726, 2095, 351, 22407, 33283, 198, 220, 220, 220, ...
2.726981
934
import uuid import logging import threading from sleekxmpp import Message, Iq from sleekxmpp.exceptions import XMPPError from sleekxmpp.xmlstream.handler import Callback from sleekxmpp.xmlstream.matcher import StanzaPath from sleekxmpp.xmlstream import register_stanza_plugin from sleekxmpp.plugins import BasePlugin fr...
[ 11748, 334, 27112, 198, 11748, 18931, 198, 11748, 4704, 278, 198, 198, 6738, 33143, 87, 76, 381, 1330, 16000, 11, 314, 80, 198, 6738, 33143, 87, 76, 381, 13, 1069, 11755, 1330, 1395, 7378, 47, 12331, 198, 6738, 33143, 87, 76, 381, 1...
3.191176
136
import unittest try: # When executed within PyCharm import bibhelper.handler.bibtex_handler as bibtex_handler except ImportError: # When executed in the root directory as: # pyton -m unittest tests.test_latex_handler import handler.bibtex_handler
[ 11748, 555, 715, 395, 198, 198, 28311, 25, 198, 220, 220, 220, 1303, 1649, 10945, 1626, 9485, 1925, 1670, 198, 220, 220, 220, 1330, 275, 571, 2978, 525, 13, 30281, 13, 65, 571, 16886, 62, 30281, 355, 275, 571, 16886, 62, 30281, 198,...
2.87234
94
from LoadBalancer import LoadBalancer __all__ = ['LoadBalancer']
[ 6738, 8778, 24597, 8250, 1330, 8778, 24597, 8250, 198, 198, 834, 439, 834, 796, 37250, 8912, 24597, 8250, 20520, 198 ]
3.3
20
from flask import Blueprint, render_template, redirect, url_for, jsonify, make_response from flask_login import current_user, login_required from src.models import Business, SignIn from src.services import dump_db from src import db admin_view = Blueprint('admin_view', __name__, url_prefix="/") @admin_view.route('/a...
[ 6738, 42903, 1330, 39932, 11, 8543, 62, 28243, 11, 18941, 11, 19016, 62, 1640, 11, 33918, 1958, 11, 787, 62, 26209, 198, 6738, 42903, 62, 38235, 1330, 1459, 62, 7220, 11, 17594, 62, 35827, 198, 6738, 12351, 13, 27530, 1330, 7320, 11, ...
3.079365
504
#!/usr/bin/python # # Generate C++ structs for the tables. import argparse import errno import os import psycopg2 import re # Generate a argument parser parser = argparse.ArgumentParser(description='Create C++ structs from a database table structure.') parser.add_argument('-u', '--user', dest='user', required=True, h...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 198, 2, 2980, 378, 327, 4880, 2878, 82, 329, 262, 8893, 13, 198, 198, 11748, 1822, 29572, 198, 11748, 11454, 3919, 198, 11748, 28686, 198, 11748, 17331, 22163, 70, 17, 198, 11748, 302, 1...
2.507948
2,831
from app.model import Synonym, Tissue # tissue = Tissue.query.first() # print(tissue) # blood = Tissue.query.filter_by(label='blood').first() # print(blood) # whole_blood = Synonym.query.filter_by(synonym='whole blood').all() # print(whole_blood[0].tissue.label) # userList = users.query\le # .join(friendships, ...
[ 6738, 598, 13, 19849, 1330, 16065, 5177, 11, 309, 21949, 198, 198, 2, 10712, 796, 309, 21949, 13, 22766, 13, 11085, 3419, 198, 2, 3601, 7, 83, 21949, 8, 198, 198, 2, 2910, 796, 309, 21949, 13, 22766, 13, 24455, 62, 1525, 7, 18242,...
2.574194
310
""" Analysis tools for perses automated molecular design. TODO ---- * Analyze all but last iteration to ensure we can analyze a running simulation? """ __author__ = 'John D. Chodera' ################################################################################ # IMPORTS ##########################################...
[ 37811, 198, 32750, 4899, 329, 2774, 274, 16359, 18955, 1486, 13, 198, 198, 51, 3727, 46, 198, 650, 198, 9, 16213, 2736, 477, 475, 938, 24415, 284, 4155, 356, 460, 16602, 257, 2491, 18640, 30, 198, 198, 37811, 198, 198, 834, 9800, 83...
2.179849
10,570
"""Desenvolva um programa que leia o nome, idade e sexo de 4 pessoas. No final do programa, mostre: -A média de idade do grupo; -Qual é o nome do homem mais velho; -Quantas mulheres têm menos de 20 anos.""" idadetotal = 0 media = 0 maioridade = 0 nomehomem = '' menoridade = 0 for i in range(1, 5): nome = str(inpu...
[ 37811, 5960, 268, 10396, 6862, 23781, 1430, 64, 8358, 443, 544, 267, 299, 462, 11, 4686, 671, 304, 1714, 78, 390, 604, 279, 408, 78, 292, 13, 1400, 2457, 466, 1430, 64, 11, 749, 260, 25, 532, 32, 285, 2634, 67, 544, 390, 4686, 6...
2.219955
441
import json from hello_world._types import AWSLambdaContext, AWSLambdaEventType def lambda_handler(event: AWSLambdaEventType, context: AWSLambdaContext) -> dict: """AWS Lambda function handler Python example --- This is an example AWS Lambda function handler written in Python. The default name is `l...
[ 11748, 33918, 198, 198, 6738, 23748, 62, 6894, 13557, 19199, 1330, 14356, 8634, 4131, 6814, 21947, 11, 14356, 8634, 4131, 6814, 9237, 6030, 628, 198, 4299, 37456, 62, 30281, 7, 15596, 25, 14356, 8634, 4131, 6814, 9237, 6030, 11, 4732, 2...
2.830696
632
from setuptools import setup setup( name='API_Calc', version='n/a', packages=['dearpygui, fluids'], url='https://github.com/jendakolda/API_Calc', license='', author='Jenda Kolda', author_email='jenda@kolda.eu', description='Utility for Pressure Safety Valve sizin according to API RP 520...
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 11639, 17614, 62, 9771, 66, 3256, 198, 220, 220, 220, 2196, 11639, 77, 14, 64, 3256, 198, 220, 220, 220, 10392, 28, 17816, 67, 451, 9078, 48317, 11, ...
2.511628
129
from sklearn.preprocessing import StandardScaler from sklearn.neighbors.kde import KernelDensity
[ 6738, 1341, 35720, 13, 3866, 36948, 1330, 8997, 3351, 36213, 198, 6738, 1341, 35720, 13, 710, 394, 32289, 13, 74, 2934, 1330, 32169, 35, 6377, 628 ]
3.769231
26
import numpy as np import matplotlib.pyplot as plt b = np.linspace(0, 1, 1000) W_array = W_integral(b) fig = plt.figure() ax = fig.add_subplot(111) ax.set_aspect('equal', adjustable='box') plt.xlim(0, 1) plt.ylim(0, 1) plt.grid() r_equal = 0.768079256355335044369928555784925495604 x_ticks = [0, 0.2...
[ 11748, 299, 32152, 355, 45941, 201, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 201, 198, 201, 198, 65, 796, 45941, 13, 21602, 10223, 7, 15, 11, 352, 11, 8576, 8, 201, 198, 201, 198, 201, 198, 54, 62, 18747, 796,...
1.83844
359
import argparse import boto import sys import random import os def get_filters(args): """ Return a dict of filters based on the given arguments """ filters = {} if args.tag: for t in args.tag: k, v = t.split('=') # TODO error checking filters['tag:%s' % k] = v if args...
[ 11748, 1822, 29572, 198, 11748, 275, 2069, 198, 11748, 25064, 198, 11748, 4738, 198, 11748, 28686, 628, 198, 4299, 651, 62, 10379, 1010, 7, 22046, 2599, 198, 220, 220, 220, 37227, 8229, 257, 8633, 286, 16628, 1912, 319, 262, 1813, 7159,...
2.301961
510
from cobra.manipulation import modify
[ 6738, 22843, 430, 13, 805, 541, 1741, 1330, 13096, 198 ]
3.8
10
#!/usr/bin/env python # -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # ---------------------------------------------...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 16529, 1783, 10541, 198, 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 17168, 13789, 13, 4091, 13789, 13, 14116, 287, 262, 1628, 6808...
3.591837
245
#------------------------------------------------------------------------------- # # Project: EOxServer <http://eoxserver.org> # Authors: Fabian Schindler <fabian.schindler@eox.at> # #------------------------------------------------------------------------------- # Copyright (C) 2013 EOX IT Services GmbH # # Permission...
[ 2, 10097, 24305, 198, 2, 198, 2, 4935, 25, 412, 38208, 10697, 1279, 4023, 1378, 68, 1140, 15388, 13, 2398, 29, 198, 2, 46665, 25, 14236, 666, 3059, 521, 1754, 1279, 36434, 666, 13, 20601, 521, 1754, 31, 68, 1140, 13, 265, 29, 198,...
2.988105
1,177
from ctypes import Structure, c_double, c_int from . import timespec
[ 6738, 269, 19199, 1330, 32522, 11, 269, 62, 23352, 11, 269, 62, 600, 198, 198, 6738, 764, 1330, 1661, 43106, 628 ]
3.380952
21
import argparse from typing import Tuple from monorail_scraper.utils.scrape_util import scrape_issues if __name__ == '__main__': main()
[ 11748, 1822, 29572, 198, 198, 6738, 19720, 1330, 309, 29291, 198, 198, 6738, 937, 273, 603, 62, 1416, 38545, 13, 26791, 13, 1416, 13484, 62, 22602, 1330, 42778, 62, 37165, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 8...
2.92
50
import pyttsx3 engine = pyttsx3.init() engine.say("No More! Blah Blah Blah!") engine.runAndWait()
[ 11748, 12972, 83, 912, 87, 18, 198, 18392, 796, 12972, 83, 912, 87, 18, 13, 15003, 3419, 198, 18392, 13, 16706, 7203, 2949, 220, 220, 3125, 0, 1086, 993, 1086, 993, 1086, 993, 2474, 8, 198, 18392, 13, 5143, 1870, 21321, 3419 ]
2.357143
42
import torch import torch.nn as nn import torch.nn.functional as F import numpy as np import pdb # Luong attention layer
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 279, 9945, 198, 198, 2, 6026, 506, 3241, 7679, 198 ]
3.297297
37
#----------------------------------------------------------------------------- #Copyright (c) Peter Bingham (petersbingham@hotmail.co.uk) # #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 witho...
[ 2, 10097, 32501, 198, 2, 15269, 357, 66, 8, 5613, 21631, 2763, 220, 357, 6449, 364, 4623, 2763, 31, 8940, 4529, 13, 1073, 13, 2724, 8, 198, 2, 198, 2, 5990, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, ...
3.582305
486
from django.apps import AppConfig
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
3.888889
9
from typing import Union, Dict, Sequence, Mapping from marshmallow import fields, post_dump from model.ientity import IEntitySchema
[ 6738, 19720, 1330, 4479, 11, 360, 713, 11, 45835, 11, 337, 5912, 198, 198, 6738, 22397, 42725, 1330, 7032, 11, 1281, 62, 39455, 198, 198, 6738, 2746, 13, 1153, 414, 1330, 314, 32398, 27054, 2611, 628 ]
3.75
36
import torch from torch.distributions import Normal from botorch.acquisition import analytic from botorch.acquisition import acquisition from botorch.utils.transforms import t_batch_mode_transform
[ 11748, 28034, 198, 6738, 28034, 13, 17080, 2455, 507, 1330, 14435, 198, 6738, 10214, 273, 354, 13, 43561, 10027, 1330, 49166, 220, 198, 6738, 10214, 273, 354, 13, 43561, 10027, 1330, 12673, 198, 198, 6738, 10214, 273, 354, 13, 26791, 13...
3.846154
52
import unittest from unittest.mock import patch from pathlib import ( PurePosixPath, PureWindowsPath ) from dataladmetadatamodel.metadatapath import MetadataPath if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 8529, 198, 6738, 3108, 8019, 1330, 357, 198, 220, 220, 220, 17129, 21604, 844, 15235, 11, 198, 220, 220, 220, 17129, 11209, 15235, 198, 8, 198, 198, 6738, 4818, 282,...
2.630952
84
import matplotlib matplotlib.use('Agg') import os, sys import yaml from argparse import ArgumentParser from tqdm import tqdm import imageio import numpy as np from skimage.transform import resize from skimage import img_as_ubyte import torch from sync_batchnorm import DataParallelWithCallback # from modules.generato...
[ 11748, 2603, 29487, 8019, 198, 198, 6759, 29487, 8019, 13, 1904, 10786, 46384, 11537, 198, 11748, 28686, 11, 25064, 198, 11748, 331, 43695, 198, 6738, 1822, 29572, 1330, 45751, 46677, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, ...
2.648289
1,052
from src.sandbox.layer import Layer from src.sandbox.activation import Activation import numpy as np class BatchDense(Layer): """ NumPy-ified version of Dense. Takes batch inputs. """
[ 6738, 12351, 13, 38142, 3524, 13, 29289, 1330, 34398, 198, 6738, 12351, 13, 38142, 3524, 13, 48545, 1330, 13144, 341, 198, 198, 11748, 299, 32152, 355, 45941, 628, 198, 4871, 347, 963, 35, 1072, 7, 49925, 2599, 198, 220, 220, 220, 372...
3.061538
65
if __name__ == '__main__': Generator().create_statements('many_to_many.yaml', 'schema.sql')
[ 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 35986, 22446, 17953, 62, 14269, 3196, 10786, 21834, 62, 1462, 62, 21834, 13, 88, 43695, 3256, 705, 15952, 2611, 13, 25410, 11537, 198 ]
2.552632
38
import json import random import sys import io import os try: to_unicode = unicode except NameError: to_unicode = str import calc_metrics PATH = os.getcwd() os.chdir(PATH) projects = [ "scribe-java", "jasmine-maven-plugin", "java-apns", "jopt-simple", "la4j", "metrics-core", "vraptor","assertj-core"] covLevel...
[ 11748, 33918, 198, 11748, 4738, 198, 11748, 25064, 198, 11748, 33245, 198, 11748, 28686, 198, 28311, 25, 198, 220, 220, 220, 284, 62, 46903, 1098, 796, 28000, 1098, 198, 16341, 6530, 12331, 25, 198, 220, 220, 220, 284, 62, 46903, 1098, ...
2.333901
587
from flask import Blueprint core = Blueprint('core', __name__) from . import app_version from . import open_log
[ 6738, 42903, 1330, 39932, 198, 198, 7295, 796, 39932, 10786, 7295, 3256, 11593, 3672, 834, 8, 198, 198, 6738, 764, 1330, 598, 62, 9641, 198, 6738, 764, 1330, 1280, 62, 6404, 198 ]
3.5625
32
import datetime from decimal import Decimal from django.test import TestCase from ems.utils import get_active_entry, ActiveEntryError from ems.utils.views import format_totals from ems import utils from . import factories
[ 11748, 4818, 8079, 198, 6738, 32465, 1330, 4280, 4402, 198, 198, 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 795, 82, 13, 26791, 1330, 651, 62, 5275, 62, 13000, 11, 14199, 30150, 12331, 198, 6738, 795, 82, 13, 26791, 1...
3.546875
64
''' a chainable computation Flow ''' from abc import abstractmethod from copy import deepcopy from itertools import chain from typing import List, Union from nujo.autodiff.tensor import Tensor class _FlowMeta(type): ''' Flow's metaclass used to setup the computation flow ''' def __call__(cls, *args, **k...
[ 7061, 6, 257, 6333, 540, 29964, 27782, 198, 7061, 6, 198, 198, 6738, 450, 66, 1330, 12531, 24396, 198, 6738, 4866, 1330, 2769, 30073, 198, 6738, 340, 861, 10141, 1330, 6333, 198, 6738, 19720, 1330, 7343, 11, 4479, 198, 198, 6738, 1436...
2.342222
2,250
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under th...
[ 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, 743, 7330, 257, 4866, 286, 262, 13789, 379, 198, 2,...
3.858108
148
from typing import Any import io import pathlib import re if __name__ == "__main__": passport_file_path = pathlib.Path(__file__).parent / "passports.txt" with passport_file_path.open() as passports_file: passports = process_passport_file(passports_file) print(count_valid_passports(passports)...
[ 6738, 19720, 1330, 4377, 198, 11748, 33245, 198, 11748, 3108, 8019, 198, 11748, 302, 628, 628, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 17981, 62, 7753, 62, 6978, 796, 3108, 8019, 13,...
2.846154
130
# -*- coding: utf-8 -*- """ Created on Mon Nov 11 15:08:20 2019 Polynomial Regression with Elastic Net Regularization @author: Dr. Dr. Danny E. P. Vanpoucke @web : https://dannyvanpoucke.be """ import pandas as pd from TModelClass import TModelClass import numpy as np from TModelResults import TModelResults from Bo...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 2892, 5267, 1367, 1315, 25, 2919, 25, 1238, 13130, 198, 198, 34220, 26601, 498, 3310, 2234, 351, 48567, 3433, 23603, 1634, 198, 198, 31, 9800, 25...
2.11915
12,522
# encoding: utf-8 # Copyright 2011 Tree.io Limited # This file is part of Treeio. # License www.tree.io/license #!/usr/bin/python OBJECTS_NUM = 100 # setup environment import sys, os sys.path.append('../') os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' from django.core.management import setup_environ from treeio...
[ 2, 21004, 25, 3384, 69, 12, 23, 198, 2, 15069, 2813, 12200, 13, 952, 15302, 198, 2, 770, 2393, 318, 636, 286, 12200, 952, 13, 198, 2, 13789, 7324, 13, 21048, 13, 952, 14, 43085, 198, 198, 2, 48443, 14629, 14, 8800, 14, 29412, 19...
2.736486
296
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F def exp_rampup(current, rampup_epochs): """Exponential rampup from https://arxiv.org/abs/1610.02242""" if rampup_epochs == 0: return 1.0 else: current = np.clip(current, 0.0, rampup_epochs)...
[ 11748, 299, 32152, 355, 45941, 201, 198, 11748, 28034, 201, 198, 11748, 28034, 13, 20471, 355, 299, 77, 201, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 4299, 1033, 62, 81, 69...
2.181347
193
dob={"Vedant":"17/07/2001", "Kunjan":"24/04/2004", "Banish":"16/01/2003", "Shivam":"18/09/2000"} name= input("Enter name:") l1= name.split() for i in l1: if i in dob.keys(): person=i print(" ".join([person,"'s Date Of Birth is :",dob[person]])) else: print(str(i)+" : Sorry! No Data Fou...
[ 67, 672, 28, 4895, 53, 276, 415, 2404, 1558, 14, 2998, 14, 14585, 1600, 366, 42, 403, 13881, 2404, 1731, 14, 3023, 14, 15724, 1600, 366, 33, 7115, 2404, 1433, 14, 486, 14, 16088, 1600, 220, 366, 2484, 452, 321, 2404, 1507, 14, 293...
2.124183
153
from ruamel import yaml import click import json import copy import click_completion import click_completion.core from click_repl import repl from prettytable import PrettyTable # TODO - move providers to separate file from calm.dsl.providers import get_provider, get_provider_types from calm.dsl.api import get_api_cl...
[ 6738, 7422, 17983, 1330, 331, 43695, 198, 11748, 3904, 198, 11748, 33918, 198, 11748, 4866, 198, 198, 11748, 3904, 62, 785, 24547, 198, 11748, 3904, 62, 785, 24547, 13, 7295, 198, 6738, 3904, 62, 35666, 1330, 2186, 198, 6738, 2495, 1148...
2.736821
2,447
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf import numpy as np import argparse import os import json import glob import functools import random import collections import math import time import scipy.ndimage as sn import scipy.io...
[ 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, 11192, 273, 11125, 355, 48700, 198, 11748, 299, 32152, 355, 45941, 198, 11748, ...
2.251722
10,746
import open3d import numpy as np print("Testing mesh in open3d ...") mesh =open3d.io.read_triangle_mesh("f16.ply") print(mesh) print('Vertices:') print(np.asarray(mesh.vertices)) print('Triangles:') print(np.asarray(mesh.triangles)) open3d.visualization.draw_geometries([mesh]) print("Painting the mesh") mesh...
[ 11748, 1280, 18, 67, 220, 198, 11748, 299, 32152, 355, 45941, 220, 220, 628, 197, 198, 198, 4798, 7203, 44154, 19609, 287, 1280, 18, 67, 35713, 8, 198, 76, 5069, 796, 9654, 18, 67, 13, 952, 13, 961, 62, 28461, 9248, 62, 76, 5069, ...
2.481013
316
# Copyright (c) 2019-2020, SPEAR3 authors (see AUTHORS.txt). # Licensed under the BSD 3-clause license (see LICENSE.txt) import asyncio import numpy as np import pygmo as pg # from numba import jit from operator import itemgetter # @jit
[ 2, 15069, 357, 66, 8, 13130, 12, 42334, 11, 6226, 17133, 18, 7035, 357, 3826, 37195, 20673, 13, 14116, 737, 198, 2, 49962, 739, 262, 347, 10305, 513, 12, 565, 682, 5964, 357, 3826, 38559, 24290, 13, 14116, 8, 198, 198, 11748, 30351,...
2.963415
82
#!/usr/bin/python '''Module to wrap a fontforge type script so that it can be used either standalone or as a macro within fontforge. Handles commandline attribute parsing. The module pulls attribute strings from the calling module to help it.''' __url__ = 'http://projects.palaso.org/projects/pysilfont' __copyright__ = ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 7061, 6, 26796, 284, 14441, 257, 10369, 30293, 2099, 4226, 523, 326, 340, 460, 307, 973, 2035, 27669, 198, 273, 355, 257, 15021, 1626, 10369, 30293, 13, 7157, 829, 3141, 1370, 11688, 32096, 1...
3.392638
163
import json import nodes import copy # Generate IP address OCID ip_pool = [] # Open DSE Cluster deployment environment file with open('clusterParameters.json') as inputFile: clusterParameters = json.load(inputFile) # Retrieve information for the deployment file for IP createion orchestration locations = cluste...
[ 11748, 33918, 198, 11748, 13760, 198, 11748, 4866, 628, 198, 2, 2980, 378, 6101, 2209, 24775, 2389, 198, 541, 62, 7742, 796, 17635, 198, 198, 2, 4946, 360, 5188, 38279, 14833, 2858, 2393, 198, 4480, 1280, 10786, 565, 5819, 48944, 13, ...
2.904847
557
import os import platform if 'window' in platform.platform().lower(): pref = '' else: pref = './' os.system('{0}mf2005 freyberg.truth.nam'.format(pref)) os.system('{0}mp6 <mpath.in'.format(pref)) os.system('python Process_output.py')
[ 11748, 28686, 198, 11748, 3859, 198, 361, 705, 17497, 6, 287, 3859, 13, 24254, 22446, 21037, 33529, 198, 220, 220, 220, 7694, 796, 10148, 198, 17772, 25, 198, 220, 220, 220, 7694, 796, 705, 19571, 6, 198, 418, 13, 10057, 10786, 90, ...
2.574468
94
"""init Revision ID: d5702b5f65cc Revises: 5c5924fd9221 Create Date: 2021-06-27 01:51:08.400079 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'd5702b5f65cc' down_revision = '5c5924fd9221' branch_labels = None depends_on = None
[ 37811, 15003, 198, 198, 18009, 1166, 4522, 25, 288, 20, 36680, 65, 20, 69, 2996, 535, 198, 18009, 2696, 25, 642, 66, 3270, 1731, 16344, 24, 26115, 198, 16447, 7536, 25, 33448, 12, 3312, 12, 1983, 5534, 25, 4349, 25, 2919, 13, 27559,...
2.436975
119
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
[ 2, 16529, 1783, 10541, 198, 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 17168, 13789, 13, 4091, 13789, 13, 14116, 287, 262, 1628, 6808, 329, 5964, 1321, 13, 198, 2, 16529, 1783, 10541, 198,...
6.256757
74
# (C) Copyright 2005-2021 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD # license included in LICENSE.txt and may be redistributed only under # the conditions described in the aforementioned license. The license # is also available online at...
[ 2, 357, 34, 8, 15069, 5075, 12, 1238, 2481, 2039, 28895, 11, 3457, 1539, 9533, 11, 15326, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 770, 3788, 318, 2810, 1231, 18215, 739, 262, 2846, 286, 262, 347, 10305, 198, 2, 5964, 3017, ...
3.197324
299
# # PySNMP MIB module CISCO-CAT6K-CROSSBAR-CAPABILITY (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-CAT6K-CROSSBAR-CAPABILITY # Produced by pysmi-0.3.4 at Mon Apr 29 17:35:12 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Pytho...
[ 2, 198, 2, 9485, 15571, 7378, 337, 9865, 8265, 36159, 8220, 12, 34, 1404, 21, 42, 12, 9419, 2640, 16811, 1503, 12, 33177, 32, 25382, 357, 4023, 1378, 16184, 76, 489, 8937, 13, 785, 14, 79, 893, 11632, 8, 198, 2, 7054, 45, 13, 16...
2.077864
9,324