content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
from hops import constants class HopsfsTrainingDataset(): """ Represents a training dataset on hopsfs in the feature store """ def __init__(self, hopsfs_training_dataset_json): """ Initalizes the hopsfs training dataset from JSON payload Args: :external_training_da...
[ 6738, 29438, 1330, 38491, 198, 198, 4871, 367, 2840, 9501, 44357, 27354, 292, 316, 33529, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1432, 6629, 257, 3047, 27039, 319, 29438, 9501, 287, 262, 3895, 3650, 198, 220, 220, 220, 37227, ...
2.301339
448
from . import utils import datetime import glob import matplotlib import matplotlib.image import numpy as np import os import requests import subprocess import tables import time import torch.utils.data movie_cache = {} class PVC1(torch.utils.data.Dataset): """ Loads a segment from the Ri...
[ 6738, 764, 1330, 3384, 4487, 201, 198, 201, 198, 11748, 4818, 8079, 201, 198, 11748, 15095, 201, 198, 11748, 2603, 29487, 8019, 201, 198, 11748, 2603, 29487, 8019, 13, 9060, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 2868...
2.027327
2,342
""" Approach-1: If we observe the given 2d array.Array is increasing from left to right as well as increasing from top to bottom.so approach is to start from top right and (1)If the current element is greater than target which means all the elements in the current column is greater than the target.So exclude that colu...
[ 37811, 198, 4677, 28562, 12, 16, 25, 198, 1532, 356, 12414, 262, 1813, 362, 67, 7177, 13, 19182, 318, 3649, 422, 1364, 284, 826, 355, 880, 355, 3649, 422, 1353, 284, 4220, 13, 568, 198, 21064, 620, 318, 284, 923, 422, 1353, 826, 2...
2.701299
462
# -*- coding: utf-8 -*- import sys from os import makedirs, path from typing import NoReturn, Text # ============================================================================== # CLASS # ==============================================================================
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 201, 198, 11748, 25064, 201, 198, 6738, 28686, 1330, 285, 4335, 17062, 11, 3108, 201, 198, 6738, 19720, 1330, 1400, 13615, 11, 8255, 201, 198, 201, 198, 2, 38093, ...
4.7
60
from anthill.framework.handlers.streaming.uploadfile import UploadFileStreamHandler from anthill.platform.handlers import UserHandlerMixin # noinspection PyAbstractClass
[ 6738, 26794, 359, 13, 30604, 13, 4993, 8116, 13, 5532, 278, 13, 25850, 7753, 1330, 36803, 8979, 12124, 25060, 198, 6738, 26794, 359, 13, 24254, 13, 4993, 8116, 1330, 11787, 25060, 35608, 259, 628, 198, 2, 645, 1040, 14978, 9485, 23839, ...
4
43
#!/usr/bin/env python # encoding: utf-8 from gi.repository import GLib from urllib.parse import unquote import sys import dbus import dbus.service import dbus.exceptions import dbus.mainloop.glib def decompose_uri(uri): """ extract folder part & filename part. """ last_slash = uri.rfind('/') uri...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 21004, 25, 3384, 69, 12, 23, 198, 198, 6738, 308, 72, 13, 260, 1930, 37765, 1330, 10188, 571, 198, 6738, 2956, 297, 571, 13, 29572, 1330, 555, 22708, 198, 198, 11748, 25064, 198, ...
2.440506
395
import collections import os import re import time
[ 11748, 17268, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 640, 628, 628 ]
4.153846
13
import glob from pathlib import Path import json import re import os import numpy as np import pandas as pd from isochrones.models import StellarModelGrid, ModelGridInterpolator from isochrones.mist.models import MISTEvolutionTrackGrid from isochrones.mist.bc import MISTBolometricCorrectionGrid from isochrones.mags i...
[ 11748, 15095, 198, 6738, 3108, 8019, 1330, 10644, 198, 11748, 33918, 198, 11748, 302, 198, 11748, 28686, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 318, 5374, 9821, 13, 27530, 1330, 39...
3.325
120
# -*-coding:utf-8 -*- u""" :创建时间: 2022/3/18 19:04 :作者: 苍之幻灵 :我的主页: https://cpcgskill.com :QQ: 2921251087 :爱发电: https://afdian.net/@Phantom_of_the_Cang :aboutcg: https://www.aboutcg.org/teacher/54335 :bilibili: https://space.bilibili.com/351598127 """ from __future__ import unicode_literals, print_function import array...
[ 2, 532, 9, 12, 66, 7656, 25, 40477, 12, 23, 532, 9, 12, 198, 84, 37811, 198, 25, 26344, 249, 161, 119, 118, 33768, 114, 29785, 112, 25, 33160, 14, 18, 14, 1507, 678, 25, 3023, 198, 25, 43291, 38519, 25, 5525, 233, 235, 45298, ...
2.238764
356
import numpy as np import cv2 import sys, Image, ImageDraw import colorsys import allproc as one import math import kNN cap = cv2.VideoCapture(0) #cap is an object that stores the camera properties. Cap is used to retrieve camera options. list_coord = [] xValues = [] yValues = [] count_points = 0 sumX = 0 sumY = 0 su...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 269, 85, 17, 198, 11748, 25064, 11, 7412, 11, 7412, 25302, 198, 11748, 7577, 893, 198, 11748, 477, 36942, 355, 530, 198, 11748, 10688, 198, 11748, 479, 6144, 198, 198, 11128, 796, 269, 85, 17...
2.660907
463
#!/usr/bin/python import argparse import base64 import json import os if __name__ == "__main__": parser = argparse.ArgumentParser( description="Dump all certificates out of Traefik's acme.json file") parser.add_argument('acme_json', help='path to the acme.json file') parser.add_argument('dest_dir'...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 11748, 1822, 29572, 198, 11748, 2779, 2414, 198, 11748, 33918, 198, 11748, 28686, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 30751, 796, 1822, 29572,...
2.560831
337
# !/usr/bin/env python # encoding: utf-8 # # This file is part of ckanext-nhm # Created by the Natural History Museum in London, UK from ckan.plugins import toolkit from flask import Blueprint blueprint = Blueprint(name='vfactor-iiif', import_name=__name__, url_prefix='/vfactor_iiif') @blueprint.route('/') def index...
[ 2, 5145, 14, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 21004, 25, 3384, 69, 12, 23, 198, 2, 198, 2, 770, 2393, 318, 636, 286, 269, 74, 1531, 742, 12, 77, 23940, 198, 2, 15622, 416, 262, 12068, 7443, 9594, 287, 3576, 11, 3482, ...
2.806667
150
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2018 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 2, 317, 5888, 326, 3769, 257, 11361, 7071, 284, 262, 50203, 18579, 7824, 198, 2, 15069, 357, 34, 8, 1853, 12, 7908, 198, 2, 1004, 28092, 36026, 390, 22862, 4496, 1279, 7959, ...
2.885971
1,561
from functools import lru_cache import dash import dash_bootstrap_components as dbc import dash_core_components as dcc import dash_html_components as html import pandas as pd import numpy as np import plotly.graph_objs as go from app import app from db import session from models import SingleAgentWellResult, WellResu...
[ 6738, 1257, 310, 10141, 1330, 300, 622, 62, 23870, 198, 198, 11748, 14470, 198, 11748, 14470, 62, 18769, 26418, 62, 5589, 3906, 355, 288, 15630, 198, 11748, 14470, 62, 7295, 62, 5589, 3906, 355, 288, 535, 198, 11748, 14470, 62, 6494, ...
2.956376
298
"""Miscellaneous utility functions.""" from functools import reduce from PIL import Image import numpy as np from matplotlib.colors import rgb_to_hsv, hsv_to_rgb def compose(*funcs): """Compose arbitrarily many functions, evaluated left to right. Reference: https://mathieularose.com/function-composition-in-...
[ 37811, 31281, 25673, 10361, 5499, 526, 15931, 198, 198, 6738, 1257, 310, 10141, 1330, 4646, 198, 198, 6738, 350, 4146, 1330, 7412, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 2603, 29487, 8019, 13, 4033, 669, 1330, 46140, 62, 1462, 6...
2.100952
1,050
from ..converter_utils import let_user_pick from ..converter_utils import print_message as prmsg from ..converter_utils import run_ffmpeg from .base import Base class Audio(Base): """Get user input to execute different video conversions""" def run(self): """Run the Audio command.""" chosen_op...
[ 6738, 11485, 1102, 332, 353, 62, 26791, 1330, 1309, 62, 7220, 62, 27729, 198, 6738, 11485, 1102, 332, 353, 62, 26791, 1330, 3601, 62, 20500, 355, 778, 19662, 198, 6738, 11485, 1102, 332, 353, 62, 26791, 1330, 1057, 62, 487, 43913, 198...
2.573643
258
"""Tests for the rds scheduler class.""" from moto import mock_rds2 from package.scheduler.rds_handler import RdsScheduler from .utils import launch_rds_instance import pytest @pytest.mark.parametrize( "aws_region, tag_key, tag_value, result_count", [ ("eu-west-1", "tostop", "true", 1), ("eu-w...
[ 37811, 51, 3558, 329, 262, 374, 9310, 6038, 18173, 1398, 526, 15931, 198, 198, 6738, 285, 2069, 1330, 15290, 62, 4372, 82, 17, 198, 198, 6738, 5301, 13, 1416, 704, 18173, 13, 4372, 82, 62, 30281, 1330, 371, 9310, 50, 1740, 18173, 19...
2.367412
313
# TODO comment this if need to disable debug logging of config
[ 628, 628, 628, 198, 220, 220, 220, 1303, 16926, 46, 2912, 428, 611, 761, 284, 15560, 14257, 18931, 286, 4566, 628 ]
3.571429
21
from face_recog_gui import * import logging import os from flask import Flask from flask_ask import Ask, request, session, question, statement app = Flask(__name__) ask = Ask(app, "/") logging.getLogger('flask_ask').setLevel(logging.DEBUG) @ask.launch @ask.intent('HelloWorldIntent') @ask.intent('AuthenticateIntent...
[ 6738, 1986, 62, 8344, 519, 62, 48317, 1330, 1635, 198, 11748, 18931, 198, 11748, 28686, 198, 198, 6738, 42903, 1330, 46947, 198, 6738, 42903, 62, 2093, 1330, 16981, 11, 2581, 11, 6246, 11, 1808, 11, 2643, 198, 198, 1324, 796, 46947, 7...
2.432526
289
from typing import Type, List, Tuple, Dict, Any import pytest from pydantic import BaseModel, ValidationError from ensysmod.schemas.energy_transmission_distance import EnergyTransmissionDistanceCreate schemas_with_region_to_or_ref_required: List[Tuple[Type[BaseModel], Dict[str, Any]]] = [ (EnergyTransmissionDist...
[ 6738, 19720, 1330, 5994, 11, 7343, 11, 309, 29291, 11, 360, 713, 11, 4377, 198, 198, 11748, 12972, 9288, 198, 6738, 279, 5173, 5109, 1330, 7308, 17633, 11, 3254, 24765, 12331, 198, 198, 6738, 3140, 893, 4666, 13, 1416, 4411, 292, 13, ...
2.558545
1,375
print(physics([1,2,3],[1,2,3]))
[ 198, 4798, 7, 746, 23154, 26933, 16, 11, 17, 11, 18, 38430, 16, 11, 17, 11, 18, 60, 4008 ]
1.684211
19
from . import models from . import constants from . import searchers from . import utilities
[ 6738, 764, 1330, 4981, 198, 6738, 764, 1330, 38491, 198, 6738, 764, 1330, 9622, 3533, 198, 6738, 764, 1330, 20081 ]
4.6
20
# digite notas até digitar compute e depois faz a média nota = '0' soma = 0 incremento = 0 while nota != 'compute': nota = input ('Digite uma nota de 0 a 10: ') if nota == 'compute': print (' ') else: soma += float (nota) incremento += 1 print ('A média será',soma, '/', incremento,...
[ 2, 3100, 578, 407, 292, 379, 2634, 3100, 7940, 24061, 304, 1207, 10924, 277, 1031, 257, 285, 2634, 67, 544, 220, 198, 198, 1662, 64, 796, 705, 15, 6, 198, 82, 6086, 796, 657, 198, 24988, 434, 78, 796, 657, 198, 4514, 407, 64, 14...
2.271739
276
# Author: Atheesh Krishnan import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns axis = pd.read_csv('D:/DS/AXISBANK.csv') cipla = pd.read_csv('D:/DS/CIPLA.csv') fortis = pd.read_csv('D:/DS/FORTIS.csv') jet = pd.read_csv('D:/DS/JETAIRWAYS.csv') titan = pd.read_csv('D:/DS/TITAN.cs...
[ 2, 6434, 25, 27751, 5069, 31372, 12647, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 384, 397, 1211, 355, 3013, 82, 198, 198, ...
2.665644
1,304
from . import mirror_graph from . import mirror_graph_sbu
[ 6738, 764, 1330, 10162, 62, 34960, 198, 6738, 764, 1330, 10162, 62, 34960, 62, 82, 11110, 198 ]
3.411765
17
# -*- coding: utf8 -*- # Copyright (c) 2021 Niklas Rosenstein # # 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, mo...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 23, 532, 9, 12, 198, 2, 15069, 357, 66, 8, 33448, 11271, 21921, 41916, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 198, 2, 286, 4...
3.337629
776
import pkg_resources import pandas as pd def charity_donation(): """Return a dataframe about the charity donation. Contains the following fields: # Column Non-Null Count Dtype --- ------ -------------- ----- 0 n_donations 354 non-null int64 ...
[ 11748, 279, 10025, 62, 37540, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 4299, 11016, 62, 9099, 341, 33529, 198, 220, 220, 220, 37227, 13615, 257, 1366, 14535, 546, 262, 11016, 13784, 13, 628, 220, 220, 220, 49850, 262, 1708, 703...
1.960309
907
# Python program to draw star # using Turtle Programming import turtle star = turtle.Turtle() for i in range(50): star.forward(50) star.right(144) turtle.done()
[ 2, 11361, 1430, 284, 3197, 3491, 220, 201, 198, 2, 1262, 33137, 30297, 220, 201, 198, 11748, 28699, 220, 201, 198, 201, 198, 7364, 796, 28699, 13, 51, 17964, 3419, 220, 201, 198, 201, 198, 1640, 1312, 287, 2837, 7, 1120, 2599, 220, ...
2.447368
76
#!/usr/bin/env python # -*- coding: utf-8 -*- from podium_api.asyncreq import get_json_header_token, make_request_custom_success from podium_api.types.paged_response import get_paged_response_from_json from podium_api.types.venue import get_venue_from_json def make_venue_get( token, endpoint, ex...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 201, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 6738, 27941, 62, 15042, 13, 292, 2047, 7513, 80, 1330, 651, 62, 17752, 62, 25677, 62, 30001, 11, 787, 62, ...
2.492376
2,492
from urllib.request import urlopen # b_soup_1.py from bs4 import BeautifulSoup import xlwt if __name__ == "__main__": main()
[ 6738, 2956, 297, 571, 13, 25927, 1330, 19016, 9654, 220, 1303, 275, 62, 82, 10486, 62, 16, 13, 9078, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 11748, 2124, 75, 46569, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417...
2.591837
49
# Generated by Django 2.2 on 2021-09-02 23:16 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 319, 33448, 12, 2931, 12, 2999, 2242, 25, 1433, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.966667
30
from django.contrib.auth import logout, login from django.contrib.auth.mixins import LoginRequiredMixin from django.shortcuts import render, redirect from django.urls import reverse_lazy from django.views.generic import CreateView, FormView from petstagram.accounts.forms import LoginForm, RegisterForm, ProfileForm fro...
[ 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 2604, 448, 11, 17594, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 19816, 1040, 1330, 23093, 37374, 35608, 259, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 189...
3.584071
113
#!/usr/bin/env python import string import math from flexbe_core import EventState, Logger from flexbe_core.proxy import ProxySubscriberCached from geometry_msgs.msg import Point, Pose from sensor_msgs.msg import PointCloud2 from sensor_msgs import point_cloud2 ''' Created on 03.06.2019 @author: Quentin Gaillot ''' c...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 4731, 198, 11748, 10688, 198, 6738, 7059, 1350, 62, 7295, 1330, 8558, 9012, 11, 5972, 1362, 198, 6738, 7059, 1350, 62, 7295, 13, 36436, 1330, 38027, 7004, 1416, 24735, 34, 2317, ...
2.104665
1,672
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F def soft_thresholding(x, soft_eta, mode): """ Perform row-wise soft thresholding. The row wise shrinkage is specific on E(k+1) updating The element wise shrinkage is specific on Z(k+1) updating :para...
[ 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, 4299, 2705, 62, 400, 10126, 278, 7, 87, 11...
2.449772
438
from orator.migrations import Migration
[ 6738, 393, 1352, 13, 76, 3692, 602, 1330, 36991, 628 ]
4.1
10
#!/usr/bin/env python # -*- coding: utf-8 -*- # -------------------------------------------------------------------------- # Copyright Commvault Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 201, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 201, 198, 2, 16529, 35937, 201, 198, 2, 15069, 1520, 85, 1721, 11998, 11, 3457, 13, 201, 198, 2, 201, 198...
2.747664
1,070
import numpy as np import math from ..miniworld import MiniWorldEnv, Room from ..entity import Box from gym import spaces class Hallway(MiniWorldEnv): """ Environment in which the goal is to go to a red box at the end of a hallway """
[ 11748, 299, 32152, 355, 45941, 198, 11748, 10688, 198, 6738, 11485, 45313, 6894, 1330, 12558, 10603, 4834, 85, 11, 10096, 198, 6738, 11485, 26858, 1330, 8315, 198, 6738, 11550, 1330, 9029, 198, 198, 4871, 4789, 1014, 7, 39234, 10603, 4834...
3.189873
79
from dbstream.DBStream import DBStream
[ 6738, 20613, 5532, 13, 11012, 12124, 1330, 20137, 12124, 198 ]
3.9
10
import pandas as pd def with_func(df, columns, func): """ Tranforms the given columns based on the given function :param df: Table to be transformed :param columns: columns to be transformed :param func: function that receives the dataframe and the name of the column to be formated :return: ...
[ 11748, 19798, 292, 355, 279, 67, 628, 198, 4299, 351, 62, 20786, 7, 7568, 11, 15180, 11, 25439, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 833, 272, 23914, 262, 1813, 15180, 1912, 319, 262, 1813, 2163, 198, 220, 220, 220, ...
2.829365
504
""" Author: Benny Date: Nov 2019 """ import argparse import os from data_utils.S3DISDataLoader import ScannetDatasetWholeScene,S3DISDataset from data_utils.indoor3d_util import g_label2color import torch import logging from pathlib import Path import sys import importlib from tqdm import tqdm import provider import num...
[ 37811, 198, 13838, 25, 44275, 198, 10430, 25, 5267, 13130, 198, 37811, 198, 11748, 1822, 29572, 198, 11748, 28686, 198, 6738, 1366, 62, 26791, 13, 50, 18, 26288, 6601, 17401, 1330, 1446, 1236, 316, 27354, 292, 316, 1199, 2305, 36542, 11...
2.689655
667
# Generated by Django 3.1.7 on 2021-07-23 21:06 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 22, 319, 33448, 12, 2998, 12, 1954, 2310, 25, 3312, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628, 198 ]
2.787879
33
from sklearn import metrics from seqeval.metrics import classification_report, f1_score from seqeval.scheme import IOBES def calcuate_ne_f1(EVAL_TRUE,EVAL_PRED): """ EVAL_TRUE : List[List[str]] , size = (all sentences, sentence len) EVAL_PRED : List[List[str]] , size = (all sentences, sen...
[ 6738, 1341, 35720, 1330, 20731, 220, 201, 198, 6738, 33756, 18206, 13, 4164, 10466, 1330, 17923, 62, 13116, 11, 277, 16, 62, 26675, 201, 198, 201, 198, 6738, 33756, 18206, 13, 15952, 1326, 1330, 314, 9864, 1546, 201, 198, 201, 198, 42...
2.440678
177
from .cabinet_object import CabinetObject from .button_object import ButtonObject from .serving_region import ServingRegionObject from .stove_object import StoveObject from .pot_object import PotObject
[ 6738, 764, 66, 6014, 316, 62, 15252, 1330, 20384, 10267, 198, 6738, 764, 16539, 62, 15252, 1330, 20969, 10267, 198, 6738, 764, 31293, 62, 36996, 1330, 49208, 47371, 10267, 198, 6738, 764, 301, 659, 62, 15252, 1330, 520, 659, 10267, 198,...
4.06
50
import numpy as np import pandas as pd from pydantic import BaseModel from rdkit.Chem import AllChem from typing import List from icolos.core.containers.compound import Conformer from icolos.core.workflow_steps.step import StepBase from icolos.utils.enums.step_enums import StepRMSFilterEnum _SRF = StepRMSFilterEnum...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 279, 5173, 5109, 1330, 7308, 17633, 198, 6738, 374, 67, 15813, 13, 41829, 1330, 1439, 41829, 198, 6738, 19720, 1330, 7343, 198, 198, 6738, 14158, 349, ...
3.028037
107
import csv from spacy.lang.en import English nlp = English() tokenizer = nlp.Defaults.create_tokenizer(nlp) if __name__ == "__main__": write_data('data/to_label_abstracts.txt', 'data/papers/labeled_dev.csv') write_data('data/unlabeled_abstracts.txt', 'data/papers/unlabeled.csv')
[ 11748, 269, 21370, 198, 6738, 599, 1590, 13, 17204, 13, 268, 1330, 3594, 198, 198, 21283, 79, 796, 3594, 3419, 198, 30001, 7509, 796, 299, 34431, 13, 7469, 13185, 13, 17953, 62, 30001, 7509, 7, 21283, 79, 8, 628, 628, 198, 361, 1159...
2.547826
115
#!/usr/bin/env python # Copyright 2015,2016 Nir Cohen # # 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 a...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 15069, 1853, 11, 5304, 31487, 17154, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, ...
2.976087
460
# -*- coding: utf-8 -*- from src.Ui.Ui_MainWindow import Ui_MainWindow from src.NGA_Spider import * from src.CheckDialog import * from PyQt5.QtWidgets import * import json from bs4 import BeautifulSoup import bs4 import re import os import time data_dir = './data' duplicate_str = '!@#err!duplicate!err!!@#' # 标记重复投票的字...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 12351, 13, 52, 72, 13, 52, 72, 62, 13383, 27703, 1330, 471, 72, 62, 13383, 27703, 198, 6738, 12351, 13, 45, 9273, 62, 41294, 1330, 1635, 198, 6738, 12351, 13, ...
2.219178
146
from IPython.html.widgets import ContainerWidget from IPython.utils.traitlets import CInt class GridWidget(ContainerWidget): """Grid widget Allows you to easily align widgets to a Bootstrap fluid grid.""" height = CInt(820, help='Pixel height of the entire grid.') padding = CInt(10, help='Pix...
[ 6738, 6101, 7535, 13, 6494, 13, 28029, 11407, 1330, 43101, 38300, 198, 6738, 6101, 7535, 13, 26791, 13, 9535, 2578, 912, 1330, 327, 5317, 198, 198, 4871, 24846, 38300, 7, 29869, 38300, 2599, 198, 220, 220, 220, 37227, 41339, 26295, 198,...
2.352057
1,531
""" Do a couple basic tests to check that the default keys are returned correctly. """ from fence import keys def test_default_public_key(app, rsa_public_key): """Test that the default public key is correct.""" assert keys.default_public_key(app) == rsa_public_key def test_default_private_key(app, rsa_priv...
[ 37811, 198, 5211, 257, 3155, 4096, 5254, 284, 2198, 326, 262, 4277, 8251, 389, 4504, 9380, 13, 198, 37811, 198, 198, 6738, 13990, 1330, 8251, 628, 198, 4299, 1332, 62, 12286, 62, 11377, 62, 2539, 7, 1324, 11, 374, 11400, 62, 11377, ...
3.185714
140
import configparser from azure.devops.connection import Connection from msrest.authentication import BasicAuthentication def create_azdo_connection(org_name, org_pat): """ Creates the connection to the Azure DevOps orgnanization that will be used by the clients :param str org_name: Name of the organiz...
[ 11748, 4566, 48610, 198, 198, 6738, 35560, 495, 13, 7959, 2840, 13, 38659, 1330, 26923, 198, 198, 6738, 13845, 2118, 13, 41299, 3299, 1330, 14392, 47649, 3299, 628, 198, 198, 4299, 2251, 62, 1031, 4598, 62, 38659, 7, 2398, 62, 3672, 1...
2.963145
407
import subprocess, re import json import itertools from time import perf_counter import numpy as np with open("true_cardinality.json","r") as j: true_cardinalities = json.load(j) with open("queries.json","r") as j2: queries = json.load(j2) with open("attr_range.json","r") as j3: attr_range = json.load(j3...
[ 11748, 850, 14681, 11, 302, 198, 11748, 33918, 198, 11748, 340, 861, 10141, 198, 6738, 640, 1330, 23035, 62, 24588, 198, 11748, 299, 32152, 355, 45941, 198, 198, 4480, 1280, 7203, 7942, 62, 9517, 1292, 414, 13, 17752, 2430, 81, 4943, ...
2.467879
825
class Solution: """ @param grid: a boolean 2D matrix @return: an integer @ Time: O(n^^2) Space O(1) @ DFS """ ''' class Solution: """ @param grid: a boolean 2D matrix @return: an integer """
[ 4871, 28186, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 2488, 17143, 10706, 25, 257, 25131, 362, 35, 17593, 198, 220, 220, 220, 2488, 7783, 25, 281, 18253, 198, 220, 220, 220, 2488, 3862, 25, 440, 7, 77, 18237, 17, 8, 220,...
2.294118
102
import csv import logging from typing import Optional, Sequence from sqltask.base.lookup_source import BaseLookupSource from sqltask.base.row_source import BaseRowSource from sqltask.utils.file import detect_encode logger = logging.getLogger(__name__) class CsvRowSource(BaseRowSource): """ Row source that r...
[ 11748, 269, 21370, 198, 11748, 18931, 198, 6738, 19720, 1330, 32233, 11, 45835, 198, 198, 6738, 19862, 2528, 2093, 13, 8692, 13, 5460, 929, 62, 10459, 1330, 7308, 8567, 929, 7416, 198, 6738, 19862, 2528, 2093, 13, 8692, 13, 808, 62, 1...
2.078547
1,184
"""Add city table Revision ID: 96dfc07259e3 Revises: 9e76e10b7227 Create Date: 2022-04-23 10:04:42.716365 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql # revision identifiers, used by Alembic. revision = '96dfc07259e3' down_revision = '9e76e10b7227' branch_labels = Non...
[ 37811, 4550, 1748, 3084, 198, 198, 18009, 1166, 4522, 25, 9907, 7568, 66, 2998, 25191, 68, 18, 198, 18009, 2696, 25, 860, 68, 4304, 68, 940, 65, 22, 24403, 198, 16447, 7536, 25, 33160, 12, 3023, 12, 1954, 838, 25, 3023, 25, 3682, ...
2.533333
135
import pandas as pd import pytest from etl_vouchers import etl @pytest.mark.parametrize( "df_orders, df_barcodes, df_expected_vouchers, allow_useless", [ ( pd.DataFrame( { "customer_id": [ 1, 1, ...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 12972, 9288, 198, 6738, 2123, 75, 62, 85, 280, 3533, 1330, 2123, 75, 628, 198, 198, 31, 9078, 9288, 13, 4102, 13, 17143, 316, 380, 2736, 7, 198, 220, 220, 220, 366, 7568, 62, 6361, 11, ...
1.153767
3,902
#!/usr/bin/env python3 ############################################################ ## Jose F. Sanchez ## ## Copyright (C) 2019-2020 Lauro Sumoy Lab, IGTP, Spain ## ############################################################ ## useful imports import time import io import os imp...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 29113, 14468, 7804, 4242, 198, 2235, 5264, 376, 13, 21909, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 22...
2.326707
21,631
#!/usr/bin/env python3 # tubestats/youtube_presenter.py - main script for displaying data and graphs # # by Shivan Sivakumaran from datetime import datetime, timedelta import streamlit as st from tubestats.youtube_data import YouTubeData # Settings ALI_ABDAAL_CHANNEL_ID = "UCoOae5nYA7VqaXzerajD0lg" SHIVAN_SIVAKUMAR...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 12202, 395, 1381, 14, 11604, 62, 25579, 263, 13, 9078, 532, 1388, 4226, 329, 19407, 1366, 290, 28770, 198, 2, 198, 2, 416, 911, 13809, 311, 452, 461, 388, 19173, 198, 198, 6...
2.281713
2,499
import os from fabric.api import cd, sudo from dploy.context import ctx, get_project_dir
[ 11748, 28686, 198, 198, 6738, 9664, 13, 15042, 1330, 22927, 11, 21061, 198, 198, 6738, 288, 1420, 13, 22866, 1330, 269, 17602, 11, 651, 62, 16302, 62, 15908, 628, 628, 198 ]
3.064516
31
# Generated by Django 2.2.13 on 2020-07-08 14:51 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 1485, 319, 12131, 12, 2998, 12, 2919, 1478, 25, 4349, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.875
32
"""GANomaly: Semi-Supervised Anomaly Detection via Adversarial Training. https://arxiv.org/abs/1805.06725 """ # Copyright (C) 2020 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the Lic...
[ 37811, 45028, 24335, 25, 35525, 12, 12442, 16149, 1052, 24335, 46254, 2884, 1215, 690, 36098, 13614, 13, 198, 198, 5450, 1378, 283, 87, 452, 13, 2398, 14, 8937, 14, 1507, 2713, 13, 15, 3134, 1495, 198, 37811, 198, 198, 2, 15069, 357, ...
2.314839
3,100
from dali.utils import apply_recursively_on_type __all__ = [ "VocabEncoded","Vocab" ]
[ 6738, 288, 7344, 13, 26791, 1330, 4174, 62, 8344, 1834, 2280, 62, 261, 62, 4906, 198, 198, 834, 439, 834, 796, 685, 198, 220, 220, 220, 366, 53, 420, 397, 27195, 9043, 2430, 53, 420, 397, 1, 198, 60, 198 ]
2.275
40
from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 198, 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 334, 1136, 5239, 62, 75, 12582, 355, 4808, 628 ]
3.5
26
from PIL import ImageTk import tkinter as tk import sys root = tk.Tk() # トップレベルウィンドウの作成 root.title("画像 viewer") # タイトル img = ImageTk.PhotoImage(file=sys.argv[1]) # 画像の読み込み コマンドライン引数の1番目のファイル名 tk.Label(root, image=img).pack() # ラベルウィジェットの作成、画像指定 root.mainloop()
[ 171, 119, 123, 6738, 350, 4146, 1330, 7412, 51, 74, 198, 11748, 256, 74, 3849, 355, 256, 74, 198, 11748, 25064, 198, 15763, 796, 256, 74, 13, 51, 74, 3419, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 2...
1.508108
185
first_name=input() last_name=input() age=int(input()) town=input() print(f"You are {first_name} {last_name}, a {age}-years old person from {town}.")
[ 11085, 62, 3672, 28, 15414, 3419, 198, 12957, 62, 3672, 28, 15414, 3419, 198, 496, 28, 600, 7, 15414, 28955, 198, 12735, 28, 15414, 3419, 198, 198, 4798, 7, 69, 1, 1639, 389, 1391, 11085, 62, 3672, 92, 1391, 12957, 62, 3672, 5512, ...
2.660714
56
# Generated by Django 3.0.12 on 2021-02-24 20:42 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 1065, 319, 33448, 12, 2999, 12, 1731, 1160, 25, 3682, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.8
30
import inspect import os import resource from functools import lru_cache from importlib import import_module from main.utils import get_suggestions_for_exception def patch_cwd(): """ os.getcwd() requires opening a file, which fails under the limits, so this removes the need for that. """ cwd = o...
[ 11748, 10104, 198, 11748, 28686, 198, 11748, 8271, 198, 6738, 1257, 310, 10141, 1330, 300, 622, 62, 23870, 198, 6738, 1330, 8019, 1330, 1330, 62, 21412, 198, 198, 6738, 1388, 13, 26791, 1330, 651, 62, 47811, 507, 62, 1640, 62, 1069, 4...
2.805755
139
from twisted.application import service, strports from nevow import appserver from environment import env as e import store import dispatcher import itodo application = service.Application('todo') db = store.Todos(e.dbname, e.user, e.password, e.host) disp = dispatcher.Dispatch() site = appserver.NevowSite(resource=...
[ 6738, 19074, 13, 31438, 1330, 2139, 11, 965, 3742, 198, 6738, 497, 85, 322, 1330, 598, 15388, 198, 198, 6738, 2858, 1330, 17365, 355, 304, 198, 11748, 3650, 198, 11748, 49952, 198, 11748, 340, 24313, 198, 198, 31438, 796, 2139, 13, 23...
3.064516
155
#!/usr/bin/env python from binance.client import Client import json import os.path import sys if __name__ == '__main__': main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 9874, 590, 13, 16366, 1330, 20985, 198, 11748, 33918, 198, 11748, 28686, 13, 6978, 198, 11748, 25064, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, ...
2.833333
48
""" Description: cost measurement functions Contributors: Simon Schwär, Sebastian Rosenzweig, Meinard Müller License: The MIT license, https://opensource.org/licenses/MIT This file is part of the Differentiable Intonation Tools https://github.com/simonschwaer/differentiable-intonation-tools/ """ import numpy as np ...
[ 37811, 198, 11828, 25, 1575, 15558, 5499, 198, 37146, 669, 25, 11288, 20469, 11033, 81, 11, 26190, 15564, 89, 732, 328, 11, 2185, 259, 446, 40790, 6051, 198, 34156, 25, 383, 17168, 5964, 11, 3740, 1378, 44813, 1668, 13, 2398, 14, 677,...
2.294353
4,250
#!/usr/bin/env python3 """ Name: src_rebrand.py Main: JimmyBot(jmfgdev) Lisc: GPLV3 Desc: Rebranding OBSD base sources for use in LBSD. """ # Usage: src_rebrand.sh $SRC_DIR . ./libdeblob.sh PATCH_DIR=/tmp/src_rebrand if [ -e $PATCH_DIR ] then self_destruct_sequence $PATCH_DIR else mkdir $PATCH_DIR f...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 37811, 198, 5376, 25, 12351, 62, 260, 17938, 13, 9078, 198, 13383, 25, 12963, 20630, 7, 73, 76, 40616, 7959, 8, 198, 43, 2304, 25, 38644, 53, 18, 198, 24564, 25, 797, 1793...
2.34648
2,003
from __future__ import print_function, division import numpy as np from openmdao.api import ExplicitComponent from openaerostruct.aerodynamics.utils import _assemble_AIC_mtx, _assemble_AIC_mtx_b, \ _assemble_AIC_mtx_d try: from openaerostruct.fortran import OAS_API fortran_flag = True except: ...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 11, 7297, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 201, 198, 6738, 1280, 9132, 5488, 13, 15042, 1330, 11884, 21950, 201, 198, 201, 198, 6738, 1280, 25534, 455, 1356, 13, 25534, ...
2.51292
774
# coding: utf-8 # Para ejecutar el script invocar a: # # ```python pascal2yolo_1class -d <dir>``` # # donde ``<dir>`` es el path absoluto (sin el / final) donde se encuentran las imágenes las anotaciones en formato pascal voc. # Cargamos lo primero las librerías que vamos a necesitar. # In[35]: import xml.etree...
[ 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 2547, 64, 304, 73, 721, 315, 283, 1288, 4226, 800, 420, 283, 257, 25, 198, 2, 220, 198, 2, 7559, 63, 29412, 279, 27747, 17, 88, 14057, 62, 16, 4871, 532, 67, 1279, 15908, 29, ...
2.564885
393
import traceback from PyQt5 import QtCore, QtWidgets from PyQt5.QtCore import QCoreApplication, QFile, Qt from PyQt5.QtGui import QIcon from PyQt5.QtWidgets import QAction, QFileDialog,QMainWindow, QMessageBox, QTableWidget,QTableWidgetItem, QTreeWidgetItem,QWidget
[ 11748, 12854, 1891, 198, 198, 6738, 9485, 48, 83, 20, 1330, 33734, 14055, 11, 33734, 54, 312, 11407, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 14055, 1330, 1195, 14055, 23416, 11, 1195, 8979, 11, 33734, 198, 6738, 9485, 48, 83, 20, ...
2.8
95
import pickle import os from tqdm import tqdm from torch.utils.data import DataLoader, Dataset from transformers import AutoTokenizer, AutoModelForSeq2SeqLM import argparse import math import torch import sys from global_parameters import answers_dir, QG_REPO_DIR, HOWTO_PATH, TRANSFORMERS_PATH sys.path.insert(0, os.p...
[ 11748, 2298, 293, 198, 11748, 28686, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 6060, 17401, 11, 16092, 292, 316, 198, 6738, 6121, 364, 1330, 11160, 30642, 7509, 11, 11160, 17633, 1890,...
2.248047
1,536
# Copyright (c) 2019. Partners HealthCare and other members of # Forome Association # # Developed by Sergey Trifonov based on contributions by Joel Krier, # Michael Bouzinier, Shamil Sunyaev and other members of Division of # Genetics, Brigham and Women's Hospital # # Licensed under the Apache License, Version 2....
[ 2, 220, 15069, 357, 66, 8, 13130, 13, 14205, 3893, 17784, 290, 584, 1866, 286, 198, 2, 220, 1114, 462, 5396, 198, 2, 198, 2, 220, 6013, 276, 416, 36106, 833, 361, 261, 709, 1912, 319, 9284, 416, 18623, 509, 5277, 11, 198, 2, 220...
3.757937
252
# Note: this can be ignored for now -- it is here to support future package management # For now, requirements.txt handles the dependencies from setuptools import setup setup( name='model', version='0.0.1', url='https://github.com/geohci/research-api-endpoint-template', license='MIT License', main...
[ 2, 5740, 25, 428, 460, 307, 9514, 329, 783, 1377, 340, 318, 994, 284, 1104, 2003, 5301, 4542, 198, 2, 1114, 783, 11, 5359, 13, 14116, 17105, 262, 20086, 198, 198, 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 40406, 7, 198, 220, ...
2.272446
323
for x in range(0, 3): print("Liczba to: %d" % (x))
[ 1640, 2124, 287, 2837, 7, 15, 11, 513, 2599, 198, 220, 220, 220, 3601, 7203, 26656, 89, 7012, 284, 25, 220, 4064, 67, 1, 4064, 357, 87, 4008, 198 ]
1.931034
29
from kingfisher_scrapy.spiders.digiwhist_base import DigiwhistBase
[ 6738, 5822, 69, 4828, 62, 1416, 2416, 88, 13, 2777, 4157, 13, 12894, 72, 1929, 396, 62, 8692, 1330, 7367, 72, 1929, 396, 14881, 628 ]
2.72
25
#!/usr/bin/env python import mock import math import time import robocar from position import Position TEST_ROUTE = [Position(0.0, 0.0), Position(2.0, 0.0), Position(2.0, 2.0), Position(0.0, 2.0)]
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 15290, 198, 11748, 10688, 198, 11748, 640, 198, 198, 11748, 3857, 420, 283, 198, 6738, 2292, 1330, 23158, 198, 198, 51, 6465, 62, 49, 2606, 9328, 796, 685, 26545, 7, 15, ...
2.5
80
import logging import sys from sanic.log import logger LOGGING_CONFIG_PATCH = dict( formatters={ "generic": { "format": "%(asctime)s [%(name)s] [%(levelname)s] %(message)s", "datefmt": "[%Y-%m-%d %H:%M:%S]", }, }, handlers={ "console": { "stre...
[ 11748, 18931, 198, 11748, 25064, 198, 198, 6738, 5336, 291, 13, 6404, 1330, 49706, 628, 198, 198, 25294, 38, 2751, 62, 10943, 16254, 62, 47, 11417, 796, 8633, 7, 628, 220, 220, 220, 5794, 1010, 34758, 198, 220, 220, 220, 220, 220, 2...
1.828467
274
import matplotlib.pyplot as plt import matplotlib.colors as colors import numpy as np from matplotlib import colors from matplotlib.ticker import FormatStrFormatter from scipy.signal import resample from MagniPy.util import confidence_interval from MagniPy.Analysis.Visualization.barplot import bar_plot from MagniPy.Ana...
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 2603, 29487, 8019, 13, 4033, 669, 355, 7577, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 2603, 29487, 8019, 1330, 7577, 198, 6738, 2603, 29487, 8019, 13, 83, 15799,...
3.490566
106
#!/usr/bin/env python """ This script gathers settings and dictionaries from friso (a chinese tokenization library) and generates a C source file that can later be compiled into RediSearch, allowing the module to have a built-in chinese dictionary. By default this script will generate a C source file of compressed dat...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 37811, 198, 1212, 4226, 43609, 6460, 290, 48589, 3166, 422, 1216, 26786, 357, 64, 442, 3762, 198, 30001, 1634, 5888, 8, 290, 18616, 257, 327, 2723, 2393, 326, 460, 1568, 307, 198,...
2.247191
2,314
""" DICpy: digital imahe correlation with python ======================================== """ import pkg_resources import DICpy.DIC_2D import DICpy.utils from DICpy.DIC_2D import * from DICpy.utils import * try: __version__ = pkg_resources.get_distribution("DICpy").version except pkg_resources.DistributionNotFo...
[ 37811, 198, 35, 2149, 9078, 25, 4875, 545, 64, 258, 16096, 351, 21015, 198, 10052, 2559, 198, 37811, 198, 198, 11748, 279, 10025, 62, 37540, 198, 198, 11748, 360, 2149, 9078, 13, 35, 2149, 62, 17, 35, 198, 11748, 360, 2149, 9078, 13...
2.963415
164
from .. import main
[ 6738, 11485, 1330, 1388, 198 ]
4
5
""" Message module docstring. """ import abc class Message(object, metaclass=abc.ABCMeta): """ Message class docstring. """ @abc.abstractmethod
[ 37811, 198, 12837, 8265, 2205, 8841, 13, 198, 37811, 198, 11748, 450, 66, 628, 198, 4871, 16000, 7, 15252, 11, 1138, 330, 31172, 28, 39305, 13, 24694, 48526, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 16000, 1398, 2205, 8841...
2.745763
59
# Run from home directory with python -m pytest tests import pytest import random import tensorflow as tf import numpy as np from tensorflow.keras.layers import Dense, Concatenate, BatchNormalization, GRU, LSTM from nn_builder.tensorflow.RNN import RNN N = 250 X = np.random.random((N, 3, 5)) X = X.astype('float32') X...
[ 2, 5660, 422, 1363, 8619, 351, 21015, 532, 76, 12972, 9288, 5254, 198, 11748, 12972, 9288, 198, 11748, 4738, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 11192, 273, 11125, 13, 6122, 292, 13,...
2.173365
11,969
from datetime import datetime if __name__ == "__main__": currentage = input("What is your current age? ") retirementage = input("At what age would you like to retire? ") retirementCalculator = RetirementCalculator() yearsleft = retirementCalculator.yearsleft(int(currentage), int(retirementage)) p...
[ 6738, 4818, 8079, 1330, 4818, 8079, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1459, 496, 796, 5128, 7203, 2061, 318, 534, 1459, 2479, 30, 366, 8, 198, 220, 220, 220, 10737, 496, 796,...
3.150289
173
import cmath import math from tkinter import W polos = 8 freq = 60 t1 = 380 t2 = 220 r1 = 0.19 r2L = 0.11 x1 = 0.45 x2L = 0.21 rp = 130 xm = 22 perdastotais = 1735 rpm = 400 ns = 120*freq/polos print("ns = ", ns) s = (ns - rpm)/ns print("s = ", s) aux1=[x1+x2L] Zs = complex(r1+r2L/s,sum(list(aux1))) print("Zs = ",...
[ 11748, 269, 11018, 198, 11748, 10688, 198, 6738, 256, 74, 3849, 1330, 370, 628, 198, 16104, 418, 796, 807, 198, 19503, 80, 796, 3126, 198, 83, 16, 796, 29101, 198, 83, 17, 796, 15629, 198, 81, 16, 796, 657, 13, 1129, 198, 81, 17, ...
1.853224
729
from configuration import * file_name = '4pages.pdf' result_file_name = "result.xml" opts = { "file": test_data_path + file_name } response = pdf_api.put_pdf_in_request_to_xml( temp_folder + '/' + result_file_name, **opts) pprint(response)
[ 6738, 8398, 1330, 1635, 198, 198, 7753, 62, 3672, 796, 705, 19, 31126, 13, 12315, 6, 198, 20274, 62, 7753, 62, 3672, 796, 366, 20274, 13, 19875, 1, 198, 198, 404, 912, 796, 1391, 198, 220, 220, 220, 366, 7753, 1298, 1332, 62, 7890...
2.51
100
# # $Id$ # from BeautifulSoup import BeautifulSoup import sys, string import HTMLParser from utils import commaSep parser = HTMLParser.HTMLParser() soup = BeautifulSoup(file(sys.argv[1]).read()) #def commaSep(items): # return ",".join(['"' + i + '"' for i in items]) for division in soup.findAll('tr', {'bgcolor':'s...
[ 2, 198, 2, 720, 7390, 3, 198, 2, 198, 6738, 23762, 50, 10486, 1330, 23762, 50, 10486, 198, 11748, 25064, 11, 4731, 198, 11748, 11532, 46677, 198, 6738, 3384, 4487, 1330, 39650, 19117, 198, 198, 48610, 796, 11532, 46677, 13, 28656, 466...
2.740741
351
# question can be found on leetcode.com/problems/valid-palindrome
[ 2, 1808, 460, 307, 1043, 319, 443, 316, 8189, 13, 785, 14, 1676, 22143, 14, 12102, 12, 18596, 521, 5998, 628 ]
3.190476
21
# -*- coding: utf-8 -*- # Define here the models for your scraped items # # See documentation in: # http://doc.scrapy.org/en/latest/topics/items.html import scrapy # Poskrapeovat iba jazyk - slovensky
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 2896, 500, 994, 262, 4981, 329, 534, 15881, 276, 3709, 198, 2, 198, 2, 4091, 10314, 287, 25, 198, 2, 2638, 1378, 15390, 13, 1416, 2416, 88, 13, 2398, 14, 2...
2.582278
79
import codecs import os import pathlib import platform import re from setuptools import setup, find_packages def clean_html(raw_html): """ Args: raw_html: Returns: """ cleanr = re.compile("<.*?>") cleantext = re.sub(cleanr, "", raw_html).strip() return cleantext # Single sourcin...
[ 11748, 40481, 82, 198, 11748, 28686, 198, 11748, 3108, 8019, 198, 11748, 3859, 198, 11748, 302, 198, 198, 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 628, 198, 4299, 3424, 62, 6494, 7, 1831, 62, 6494, 2599, 198, 220, 220...
2.294586
1,256
from scrappy.persistor.in_memory import InMemoryPersistor from scrappy.persistor.document import Document
[ 6738, 19320, 14097, 13, 19276, 32380, 13, 259, 62, 31673, 1330, 554, 30871, 30946, 32380, 198, 6738, 19320, 14097, 13, 19276, 32380, 13, 22897, 1330, 16854, 628 ]
3.962963
27
# -*- coding: utf-8 -*- ### # (C) Copyright (2012-2019) Hewlett Packard Enterprise Development LP # # 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 limi...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 21017, 198, 2, 357, 34, 8, 15069, 357, 6999, 12, 23344, 8, 30446, 15503, 6400, 446, 14973, 7712, 18470, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, ...
3.787062
371
from __future__ import (absolute_import, division, print_function) import sys
[ 6738, 11593, 37443, 834, 1330, 357, 48546, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 8, 198, 198, 11748, 25064, 198 ]
3.761905
21
from sklearn.datasets import load_boston from sklearn.model_selection import train_test_split from sklearn.preprocessing import StandardScaler from sklearn.linear_model import SGDRegressor from sklearn.metrics import mean_squared_error """ 线性回归:梯度下降法 :return:None """ # 1.获取数据 data = load_boston() # 2.数据集...
[ 6738, 1341, 35720, 13, 19608, 292, 1039, 1330, 3440, 62, 65, 5744, 201, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 4512, 62, 9288, 62, 35312, 201, 198, 6738, 1341, 35720, 13, 3866, 36948, 1330, 8997, 3351, 36213, 201, 198, 67...
1.766537
514
import unittest from zeppos_data_manager.series_enricher import SeriesEnricher if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 6738, 41271, 381, 418, 62, 7890, 62, 37153, 13, 25076, 62, 268, 1173, 372, 1330, 7171, 4834, 1173, 372, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715...
2.723404
47
#!/usr/bin/env python3 # The arrow library is used to handle datetimes import arrow import json # The request library is used to fetch content through HTTP import requests import re tz_bo = 'America/La_Paz' def extract_xsrf_token(html): """Extracts XSRF token from the source code of the generation graph page.""" ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 383, 15452, 5888, 318, 973, 284, 5412, 4818, 46874, 198, 11748, 15452, 198, 11748, 33918, 198, 2, 383, 2581, 5888, 318, 973, 284, 21207, 2695, 832, 14626, 198, 11748, 7007,...
2.564761
857
#!/usr/bin/env python # -*- coding: utf-8 -*- import numpy as np from utils.fever_db import convert_brc from chaonan_src._utils.wiki_pageview_utils import WikiPageviews from chaonan_src._doc_retrieval.item_rules_spiral import ItemRuleBuilderSpiral __author__ = ['chaonan99'] class ItemRuleRawPageview(ItemRuleBuil...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 628, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 3384, 4487, 13, 69, 964, 62, 9945, 1330, 10385, 62, 1671, 66, 198...
1.947211
1,004