content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
# Copyright The PyTorch Lightning team. # # 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 i...
[ 2, 15069, 383, 9485, 15884, 354, 12469, 1074, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 1...
3.373938
353
from setuptools import setup setup( name='pypulseq_cest', author='Kerstin Heinecke, Patrick Schuenke', author_email='kerstin.heinecke@ptb.de', version='0.1', description='PyPulseq-CEST simulation framework.', url='https://github.com/KerstinHut/pypulseq-cest', install_requires=['bmctool>=0.4...
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 11639, 79, 4464, 9615, 80, 62, 9165, 3256, 198, 220, 220, 220, 1772, 11639, 42, 263, 301, 259, 679, 500, 66, 365, 11, 9925, 3059, 84, 268, 365, 325...
2.395904
293
from django.db.models import Q from django.views.generic import ListView from guardian.mixins import PermissionListMixin from rnapuzzles.models import FaqModel
[ 6738, 42625, 14208, 13, 9945, 13, 27530, 1330, 1195, 198, 6738, 42625, 14208, 13, 33571, 13, 41357, 1330, 7343, 7680, 198, 6738, 21688, 13, 19816, 1040, 1330, 2448, 3411, 8053, 35608, 259, 198, 198, 6738, 374, 77, 499, 4715, 829, 13, ...
3.395833
48
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ A Port of some of the functionality of the "chebpade" function in the "chebfun" library. Copyright 2017 by The University of Oxford and The Chebfun Developers. All rights reserved. See http://www.chebfun.org/ for Chebfun information. This file is part of Fieldosophy,...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 32, 4347, 286, 617, 286, 262, 11244, 286, 262, 366, 2395, 46583, 671, 1, 2163, 287, 262, 366, 2395, ...
2.098005
1,153
#!/usr/bin/env python # -*- coding: utf-8 -*- """Install using distutils Run: python setup.py install to install this package. """ from setuptools import setup, find_packages from os.path import join name = "your_package" desc = "Show detailed information for docker images" long_desc = "Shows detailed informati...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 15798, 1262, 1233, 26791, 198, 198, 10987, 25, 198, 220, 220, 220, 21015, 9058, 13, 9078, 2721, 198, 198, 1462, ...
2.668142
452
import requests from requests.auth import HTTPBasicAuth import xml.etree.ElementTree as ET def configure(user, password, endpoint='https://localhost/', ssl_verify=None): """initial configuration of WFA endpoint and authentication """ Service.configure(user=user, password=password, endpoint=endpoint, ssl_verif...
[ 11748, 7007, 198, 6738, 7007, 13, 18439, 1330, 14626, 26416, 30515, 198, 11748, 35555, 13, 316, 631, 13, 20180, 27660, 355, 12152, 628, 198, 4299, 17425, 7, 7220, 11, 9206, 11, 36123, 11639, 5450, 1378, 36750, 14, 3256, 264, 6649, 62, ...
3.553191
94
from booking.models import Room from .availability import check_availability
[ 6738, 25452, 13, 27530, 1330, 10096, 198, 6738, 764, 47274, 1330, 2198, 62, 47274 ]
5.428571
14
#!/usr/bin/env python from django.contrib import admin from django.db import models from sync_google_contacts.models import GoogleAdminAccounts from sync_google_contacts.models import PhoneNumber admin.site.register(GoogleAdminAccounts, googleadminaccountAdmin) admin.site.register(PhoneNumber, phonenumberAdmin)
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 17510, 62, 13297, 62, 3642, 8656, 13, 27530, 1330, 3012, 46787, 30116, 82, ...
3.579545
88
# ******************************************************************************* # Copyright 2021 Arm Limited and affiliates. # SPDX-License-Identifier: Apache-2.0 # # 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 c...
[ 2, 41906, 17174, 46068, 8162, 198, 2, 15069, 33448, 7057, 15302, 290, 29116, 13, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357,...
2.702215
1,941
from mlrose_hiive.opt_probs import MaxKColorOpt import numpy as np import networkx as nx
[ 6738, 25962, 13698, 62, 5303, 425, 13, 8738, 62, 1676, 1443, 1330, 5436, 42, 10258, 27871, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 3127, 87, 355, 299, 87, 628 ]
3
30
# Graph Scratchpad # YOUR NAME # Use this as a "scratchpad" to tinker with your graph. from graph import Graph # Example network = Graph() print(network)
[ 2, 29681, 1446, 36722, 15636, 198, 2, 16592, 36751, 198, 2, 5765, 428, 355, 257, 366, 1416, 36722, 15636, 1, 284, 256, 24275, 351, 534, 4823, 13, 198, 198, 6738, 4823, 1330, 29681, 628, 198, 2, 17934, 198, 27349, 796, 29681, 3419, 1...
3.270833
48
""" This package contains all views related to POIs (points of interest) """ from .poi_view import POIView from .poi_actions import view_poi, archive_poi, restore_poi, delete_poi from .poi_list_view import POIListView
[ 37811, 198, 1212, 5301, 4909, 477, 5009, 3519, 284, 19922, 3792, 357, 13033, 286, 1393, 8, 198, 37811, 198, 6738, 764, 7501, 72, 62, 1177, 1330, 19922, 3824, 769, 198, 6738, 764, 7501, 72, 62, 4658, 1330, 1570, 62, 7501, 72, 11, 154...
3.070423
71
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from marionette_test import MarionetteTestCase from errors import InvalidElementStateException
[ 2, 770, 8090, 6127, 5178, 318, 2426, 284, 262, 2846, 286, 262, 29258, 5094, 198, 2, 13789, 11, 410, 13, 362, 13, 15, 13, 1002, 257, 4866, 286, 262, 4904, 43, 373, 407, 9387, 351, 428, 198, 2, 2393, 11, 921, 460, 7330, 530, 379, ...
3.641975
81
import extendSysPath import ModuleBaseTestCase import mock import Utils import time import Tarpit
[ 11748, 9117, 44387, 15235, 198, 11748, 19937, 14881, 14402, 20448, 198, 11748, 15290, 198, 11748, 7273, 4487, 198, 11748, 640, 198, 11748, 309, 5117, 270, 198 ]
3.769231
26
#!/usr/bin/env python """cexbot """ # Contributions from Django # Copyright (c) Django Software Foundation and individual contributors. # All rights reserved. import sys import os VERSION = (0, 0, 14, 'alpha', 3) __clsname__ = 'cexbot' __author__ = 'Nik Cubrilovic <nikcub@gmail.com>' __email__ = 'nikcub@gmail.com'...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 37811, 344, 87, 13645, 198, 37811, 198, 2, 49152, 422, 37770, 198, 198, 2, 15069, 357, 66, 8, 37770, 10442, 5693, 290, 1981, 20420, 13, 198, 2, 1439, 2489, 10395, 13, 198, 198, ...
2.60644
559
''' Created on 2018/04/30 @author: syuu ''' import pandas as pd from matplotlib import pyplot indata = [('Toms', 174, 75), ('Jam', 144, 45), ('Lily', 114, 25)] df = pd.DataFrame(data = indata, columns= ['name','weight','length'], index = ['one','two','threes']) print(df) print("====================") print(df['name'...
[ 7061, 6, 198, 41972, 319, 2864, 14, 3023, 14, 1270, 198, 198, 31, 9800, 25, 827, 12303, 198, 7061, 6, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 2603, 29487, 8019, 1330, 12972, 29487, 198, 198, 521, 1045, 796, 685, 10786, 51, ...
2.8
170
"""Last line detector.""" import csv import re from pathlib import Path from typing import Iterator, List from godslayer.csv.reversed_csv_reader import ReversedCsvReader from godslayer.exceptions import InvalidFooterError from godslayer.line_counter import LineCounter from godslayer.list_string_matcher import ListStri...
[ 37811, 5956, 1627, 31029, 526, 15931, 198, 11748, 269, 21370, 198, 11748, 302, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 19720, 1330, 40806, 1352, 11, 7343, 198, 198, 6738, 5770, 6649, 2794, 13, 40664, 13, 260, 690, 276, 62, 40664,...
3.313869
137
from infobip_channels.sms.models.response.core import ScheduledSMSMessages
[ 6738, 1167, 672, 541, 62, 354, 8961, 13, 82, 907, 13, 27530, 13, 26209, 13, 7295, 1330, 27774, 6309, 50, 5653, 36479, 1095, 628 ]
3.166667
24
import torch from torch.utils.data import Dataset, DataLoader from torch.autograd import Variable import pandas as pd import numpy as np from sklearn import preprocessing import argparse from Data.data_pipeline import * #""" Diabetes dataset.""" # Initialize your data, download, etc. #""" Diabetes ...
[ 11748, 28034, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 16092, 292, 316, 11, 6060, 17401, 198, 6738, 28034, 13, 2306, 519, 6335, 1330, 35748, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 1341, ...
2.779104
670
import pytest from subprocess import PIPE from subprocess import check_output SELECT_INNER_WORD = """v\tstart characterwise Visual mode selecting 1 characters iW\textend highlighted area with "inner WORD\"""" LONG_EXAMPLE = """qa\trecord typed characters into named register {0-9a-zA-Z"} (uppercase to append) 3j\tcurs...
[ 11748, 12972, 9288, 198, 6738, 850, 14681, 1330, 350, 4061, 36, 198, 6738, 850, 14681, 1330, 2198, 62, 22915, 198, 198, 46506, 62, 1268, 21479, 62, 54, 12532, 796, 37227, 85, 59, 83, 9688, 2095, 3083, 15612, 4235, 17246, 352, 3435, 19...
2.845455
330
# detect_board.py # Functions for detecting game state from an image of the board import cv2 import numpy as np from scipy.spatial import distance as dist import online_goban.settings as settings # Put 4 points in the order [top-left, top-right, bottom-right, bottom-left] # Helper function for board detection # Take...
[ 2, 4886, 62, 3526, 13, 9078, 198, 2, 40480, 329, 31521, 983, 1181, 422, 281, 2939, 286, 262, 3096, 198, 198, 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 13, 2777, 34961, 1330, 5253, 355, 1233, ...
3.37
200
r"""An example to use simple_ppo_agent. A galloping example: blaze run -c opt \ //robotics/reinforcement_learning/minitaur/agents:simple_ppo_agent_example -- \ --logdir=/cns/ij-d/home/jietan/experiment/minitaur_vizier_study_ppo/\ minreact_nonexp_nr_01_186515603_186518344/15/ \ --checkpoint=model.ckpt-14000000 A trott...
[ 81, 37811, 2025, 1672, 284, 779, 2829, 62, 16634, 62, 25781, 13, 198, 198, 32, 7976, 15816, 1672, 25, 198, 2436, 6201, 1057, 532, 66, 2172, 3467, 198, 1003, 305, 13645, 873, 14, 260, 259, 13442, 62, 40684, 14, 1084, 270, 2899, 14, ...
2.764706
425
# -*- coding: utf-8 -*- from collections import defaultdict from flask import (abort, current_app, g, redirect, render_template, request, url_for) from flask_login import current_user from werkzeug.contrib.atom import AtomFeed, FeedEntry from app import db from . import main from ..models import ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 17268, 1330, 4277, 11600, 198, 198, 6738, 42903, 1330, 357, 397, 419, 11, 1459, 62, 1324, 11, 308, 11, 18941, 11, 8543, 62, 28243, 11, 2581, 11, 198, 220, ...
2.654822
394
print("Hello from Python out of process")
[ 4798, 7203, 15496, 422, 11361, 503, 286, 1429, 4943 ]
4.555556
9
"""Minimalistic unicast DNS-SD implementation.""" import math import asyncio import struct import logging from ipaddress import IPv4Address from collections import namedtuple from typing import List, cast from pyatv.support import exceptions, net, log_binary _LOGGER = logging.getLogger(__name__) DnsHeader = namedtup...
[ 37811, 9452, 4402, 2569, 28000, 459, 18538, 12, 10305, 7822, 526, 15931, 198, 11748, 10688, 198, 11748, 30351, 952, 198, 11748, 2878, 198, 11748, 18931, 198, 6738, 20966, 21975, 1330, 25961, 19, 20231, 198, 6738, 17268, 1330, 3706, 83, 29...
2.272977
3,275
from PyQt5.QtWidgets import QPushButton, QVBoxLayout, QWidget from PyQt5 import QtCore
[ 6738, 9485, 48, 83, 20, 13, 48, 83, 54, 312, 11407, 1330, 1195, 49222, 21864, 11, 1195, 53, 14253, 32517, 11, 1195, 38300, 198, 6738, 9485, 48, 83, 20, 1330, 33734, 14055, 198 ]
2.636364
33
from src.models.Model import db
[ 6738, 12351, 13, 27530, 13, 17633, 1330, 20613, 628 ]
3.666667
9
#importing some useful packages import numpy as np import cv2 from p4lib.cameraCal import CameraCal from p4lib.imageFilters import ImageFilters from p4lib.projectionManager import ProjectionManager from p4lib.roadManager import RoadManager from p4lib.diagManager import DiagManager from moviepy.editor import VideoFileCl...
[ 2, 11748, 278, 617, 4465, 10392, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 269, 85, 17, 198, 6738, 279, 19, 8019, 13, 25695, 9771, 1330, 20432, 9771, 198, 6738, 279, 19, 8019, 13, 9060, 11928, 1010, 1330, 7412, 11928, 1010, 198,...
3.22549
204
from __future__ import annotations import ast import functools from typing import Iterable from tokenize_rt import Offset from tokenize_rt import Token from pyupgrade._ast_helpers import ast_to_offset from pyupgrade._ast_helpers import is_name_attr from pyupgrade._data import register from pyupgrade._data import Sta...
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 11748, 6468, 198, 11748, 1257, 310, 10141, 198, 6738, 19720, 1330, 40806, 540, 198, 198, 6738, 11241, 1096, 62, 17034, 1330, 3242, 2617, 198, 6738, 11241, 1096, 62, 17034, 1330, 29130, 198, ...
3.476744
172
cont = 1 num = 0 while cont <= 10: idade = int(input('Digite o ano de nascimento: ')) maior = 2021 - idade if maior >= 18: num = num + 1 cont = cont + 1 print (f'{num} pessoas são maiores de idade.')
[ 3642, 796, 352, 201, 198, 22510, 796, 657, 201, 198, 4514, 542, 19841, 838, 25, 201, 198, 220, 220, 220, 4686, 671, 796, 493, 7, 15414, 10786, 19511, 578, 267, 281, 78, 390, 299, 3372, 3681, 78, 25, 705, 4008, 201, 198, 220, 220, ...
2.080357
112
#include <openvino/runtime/core.hpp> int main() { //! [get_available_devices] ov::Core core; std::vector<std::string> available_devices = core.get_available_devices(); //! [get_available_devices] //! [hetero_priorities] auto device_priorites = core.get_property("HETERO", ov::device::priorities); //! [hetero_prioritie...
[ 2, 17256, 1279, 9654, 85, 2879, 14, 43282, 14, 7295, 13, 71, 381, 29, 198, 198, 600, 1388, 3419, 1391, 198, 1003, 0, 685, 1136, 62, 15182, 62, 42034, 60, 198, 709, 3712, 14055, 4755, 26, 198, 19282, 3712, 31364, 27, 19282, 3712, 8...
2.748353
759
# -*- coding: utf-8 -*- from pathlib_mate import PathCls as Path from sqlitedict import SqliteDict cache = SqliteDict( Path(__file__).change(new_basename="cache.sqlite").abspath, autocommit=True) with open(Path(__file__).change(new_basename="data.txt").abspath, "r") as f: content = f.read() id_list = list(...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 3108, 8019, 62, 9830, 1330, 10644, 2601, 82, 355, 10644, 198, 6738, 44161, 863, 713, 1330, 311, 13976, 578, 35, 713, 198, 198, 23870, 796, 311, 13976, 578, ...
2.254826
259
#!/usr/bin/env python from astropy.io import fits import matplotlib.pyplot as plt plt.style.use('ggplot') import numpy as np from CosmicRayLabel import CosmicRayLabel from ComputeStats import ComputeStats import glob import itertools import scipy.ndimage as ndimage import sys sys.path.append('/Users/nmiles/animated_fi...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 6468, 28338, 13, 952, 1330, 11414, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 489, 83, 13, 7635, 13, 1904, 10786, 1130, 29487, 11537, 198, 11748, 299...
3.051095
137
from garage.tf.distributions.diagonal_gaussian import DiagonalGaussian RecurrentDiagonalGaussian = DiagonalGaussian
[ 6738, 15591, 13, 27110, 13, 17080, 2455, 507, 13, 10989, 27923, 62, 4908, 31562, 1330, 6031, 27923, 35389, 31562, 201, 198, 201, 198, 6690, 6657, 18683, 27923, 35389, 31562, 796, 6031, 27923, 35389, 31562, 201, 198 ]
3.333333
36
# _*_ coding: utf-8 _*_ """ Created by Allen7D on 2018/6/17. ↓↓↓ 产品接口 ↓↓↓ """ from app.libs.error_code import Success from app.libs.redprint import RedPrint from app.models.product import Product from app.validators.params import Count, IDMustBePositiveInt from app.api_docs.v1 import product as api_doc __author__ ...
[ 2, 4808, 9, 62, 19617, 25, 3384, 69, 12, 23, 4808, 9, 62, 198, 37811, 198, 220, 15622, 416, 9659, 22, 35, 319, 2864, 14, 21, 14, 1558, 13, 198, 220, 17804, 241, 29705, 241, 29705, 241, 220, 12859, 100, 161, 241, 223, 162, 236, ...
2.321277
470
from . import mshapely from mshapely.spatial import DF from mshapely.io import GIS
[ 6738, 764, 1330, 285, 43358, 306, 198, 6738, 285, 43358, 306, 13, 2777, 34961, 1330, 36323, 198, 6738, 285, 43358, 306, 13, 952, 1330, 402, 1797 ]
3.153846
26
import multiprocessing from mri_tools.topup_eddy.common import run_pre_processing __author__ = 'Robbert Harms' __date__ = "2015-05-04" __maintainer__ = "Robbert Harms" __email__ = "robbert.harms@maastrichtuniversity.nl" # input_dir = '/home/robbert/programming/python/mdt/bin/multite_20150417_alard/1_uncorrected/' # t...
[ 11748, 18540, 305, 919, 278, 198, 6738, 285, 380, 62, 31391, 13, 4852, 929, 62, 21874, 13, 11321, 1330, 1057, 62, 3866, 62, 36948, 198, 198, 834, 9800, 834, 796, 705, 14350, 4835, 2113, 907, 6, 198, 834, 4475, 834, 796, 366, 4626, ...
2.038793
696
from typing import Tuple import numpy as np from numba import njit, types from numba.experimental import jitclass @jitclass( [ ("priorities", types.float32[:]), ("indices", types.int64[:]), ("max_length", types.int64), ("length", types.int64), ] ) @njit() @njit(inline="alw...
[ 6738, 19720, 1330, 309, 29291, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 997, 7012, 1330, 299, 45051, 11, 3858, 198, 6738, 997, 7012, 13, 23100, 9134, 1330, 474, 270, 4871, 628, 198, 31, 45051, 4871, 7, 198, 220, 220, 220, ...
2.404915
936
#! /usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright 2020 Alibaba Group Holding 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/LICENS...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 12131, 41992, 4912, 31703, 15302, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10...
3.4375
288
# -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2017-09-12 10:11 from __future__ import unicode_literals from django.db import migrations, models
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 1157, 13, 19, 319, 2177, 12, 2931, 12, 1065, 838, 25, 1157, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, ...
2.736842
57
# -*- coding: utf-8 -*- # Imports import os,sys import glob import math import argparse as ap # Script information __author__ = "Sergi Rodà Llordés" __version__ ="1.0" __maintainer__="Sergi Rodà Llordés" __email__="sergi.rodallordes@bsc.es" def storePDBfilenames(PDBs_to_parse, parser): """It identifies the PDB...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 628, 198, 2, 1846, 3742, 220, 198, 11748, 28686, 11, 17597, 198, 11748, 15095, 198, 11748, 10688, 198, 11748, 1822, 29572, 355, 2471, 198, 198, 2, 12327, 1321, 198, 834, 9800...
1.997029
2,356
import mock import pytest import json import os from PythonUtils.record_expenditure import ExpenditureFile from PythonUtils.record_expenditure import ExpenditureRecord @pytest.fixture(scope="module") mock_inputs = {"When did you spend it?" : "01/01/2020", "How much have you spent?": "3.00", ...
[ 11748, 15290, 198, 11748, 12972, 9288, 198, 11748, 33918, 198, 11748, 28686, 198, 6738, 11361, 18274, 4487, 13, 22105, 62, 11201, 437, 8089, 1330, 48623, 8089, 8979, 198, 6738, 11361, 18274, 4487, 13, 22105, 62, 11201, 437, 8089, 1330, 48...
2.493088
217
#!/usr/bin/env python # -*- coding: utf-8 -*- # Created by Jiawei Liu on 2019/03/07 import os import time from concurrent import futures import logging import json import grpc import numpy as np from grpc.beta import implementations from bert_serving.client import BertClient import tensorflow as tf from tensorflow_ser...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15622, 416, 449, 544, 42990, 18258, 319, 13130, 14, 3070, 14, 2998, 198, 11748, 28686, 198, 11748, 640, 198, 6738, ...
2.029388
2,450
from .auto_tokenizer import AutoTokenizer from .glove_tokenizer import GloveTokenizer from .t5_tokenizer import T5Tokenizer
[ 6738, 764, 23736, 62, 30001, 7509, 1330, 11160, 30642, 7509, 198, 6738, 764, 4743, 659, 62, 30001, 7509, 1330, 2671, 659, 30642, 7509, 198, 6738, 764, 83, 20, 62, 30001, 7509, 1330, 309, 20, 30642, 7509, 198 ]
3.351351
37
from modeltranslation.translator import translator, TranslationOptions from .models import GalleryImage translator.register(GalleryImage, GalleryImageTranslationOptions)
[ 6738, 953, 2120, 26084, 7592, 13, 7645, 41880, 1330, 33417, 11, 33322, 29046, 198, 6738, 764, 27530, 1330, 12917, 5159, 198, 198, 7645, 41880, 13, 30238, 7, 29352, 5159, 11, 12917, 5159, 48313, 29046, 8 ]
4.857143
35
# -*- coding: utf-8 -*- """Module for facet extraction, extrusion and simplicial grids""" from larlib import * VOID = V0,CV0 = [[]],[[0]] # the empty simplicial model """ Transformation to triangles by sorting circularly the vertices of faces """ if __name__ == "__main__": # example 1 V = [[0,0],[1,0],[2,0]...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 26796, 329, 39144, 22236, 11, 22820, 4241, 290, 7106, 6652, 50000, 37811, 198, 6738, 300, 7063, 571, 1330, 1635, 198, 198, 29516, 2389, 796, 569, 15, 11, 33538, 1...
1.878049
738
from TSP_utils import TSP_solver, TSP_plotter, TSP_generator, TSP_loader import numpy as np import os import networkx as nx import argparse import json from tqdm import tqdm if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("--save_folder", type=str, default='./test_sets') ...
[ 6738, 309, 4303, 62, 26791, 1330, 309, 4303, 62, 82, 14375, 11, 309, 4303, 62, 29487, 353, 11, 309, 4303, 62, 8612, 1352, 11, 309, 4303, 62, 29356, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 11748, 3127, 87, 355, 29...
2.201751
2,285
# Howdy! This is intentionally blank
[ 2, 1374, 9892, 0, 770, 318, 16464, 9178 ]
4.5
8
""" Rename plugin for Pylp. Copyright (C) 2017 The Pylp Authors. This file is under the MIT License. """ from pylprename.transformer import rename __version__ = "0.1.1" __all__ = ['rename']
[ 37811, 198, 198, 49, 12453, 13877, 329, 350, 2645, 79, 13, 198, 198, 15269, 357, 34, 8, 2177, 383, 350, 2645, 79, 46665, 13, 198, 1212, 2393, 318, 739, 262, 17168, 13789, 13, 198, 198, 37811, 198, 198, 6738, 279, 2645, 79, 918, 48...
2.684932
73
import json import sys from collections import OrderedDict, defaultdict from datetime import date from pathlib import Path from typing import Dict, List def run(action: str): """ Invoke different actions on converter engine. """ # Create converter instance and read input file. converter = Domain...
[ 11748, 33918, 198, 11748, 25064, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 11, 4277, 11600, 198, 6738, 4818, 8079, 1330, 3128, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 19720, 1330, 360, 713, 11, 7343, 628, 198, 198, 4299, 1057...
2.708738
515
from datetime import datetime, timedelta from django.conf import settings from starbowmodweb import mybb
[ 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 3491, 8176, 4666, 12384, 1330, 616, 11848, 628 ]
3.821429
28
import os import torch import torch.nn as nn from torch.nn import functional as F import torchvision from torchvision.models.segmentation.fcn import FCNHead class ConvBlock(nn.Module): """ On an input tensor x, performs: [Conv3x3, BatchNorm, ReLU] x 2 \n For an input tensor x of shape (batch_size, #channels, he...
[ 11748, 28686, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 6738, 28034, 13, 20471, 1330, 10345, 355, 376, 198, 11748, 28034, 10178, 198, 6738, 28034, 10178, 13, 27530, 13, 325, 5154, 341, 13, 16072, 77, 1330, 1002...
2.806162
779
import numpy as np import matplotlib.pyplot as plt import pandas as pd import sys from sklearn.feature_extraction.text import CountVectorizer from sklearn.naive_bayes import MultinomialNB from sklearn.svm import LinearSVC from sklearn.pipeline import Pipeline from sklearn.feature_extraction.text import TfidfTransform...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 11748, 25064, 198, 198, 6738, 1341, 35720, 13, 30053, 62, 2302, 7861, 13, 5239, 1330, 2764, 3...
2.401222
2,455
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2020 OSGeo # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 29113, 29113, 7804, 2, 198, 2, 198, 2, 15069, 357, 34, 8, 12131, 7294, 10082, 78, 198, 2, 198, 2, 770, 1430, 318, 1479, 3788, 25, 345, 460, 17678, 4163, 340, 290, ...
4.125
232
# -*- coding: utf-8 -*- import json from SkinningTools.Maya import interface from SkinningTools.Maya.tools import shared from SkinningTools.UI.qt_util import * from SkinningTools.UI.utils import * from SkinningTools.py23 import * from SkinningTools.Maya.tools.apiWeights import ApiWeights from SkinningTools.UI.d...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 11748, 33918, 201, 198, 6738, 17847, 768, 33637, 13, 6747, 64, 1330, 7071, 201, 198, 6738, 17847, 768, 33637, 13, 6747, 64, 13, 31391, 1330, 4888, 201, 198, 6738, ...
2.197833
4,706
import logging from .bindings import bind, element_map, service_map from ..errors import ConfigurationError DEBUG = False _logger = logging.getLogger(__name__) __all__ = ['ApplicationServiceElement', 'NullServiceElement', 'DebugServiceElement'] class ApplicationServiceElement: """ ApplicationServiceElement...
[ 198, 11748, 18931, 198, 198, 6738, 764, 21653, 654, 1330, 11007, 11, 5002, 62, 8899, 11, 2139, 62, 8899, 198, 6738, 11485, 48277, 1330, 28373, 12331, 198, 198, 30531, 796, 10352, 198, 62, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, ...
3.530612
147
import graylog from datetime import datetime, date, time, timedelta import pytz search_consult_events() # sessions = get_session(datetime(2016, 2, 11), datetime(2016, 2, 13)) # for session in sessions: # # Specify session id to filter results # # if session[1] == '62409': # # if session[2] != '36409856' and sess...
[ 11748, 12768, 6404, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 3128, 11, 640, 11, 28805, 12514, 198, 11748, 12972, 22877, 628, 198, 12947, 62, 5936, 586, 62, 31534, 3419, 628, 198, 2, 10991, 796, 651, 62, 29891, 7, 19608, 8079, 7, ...
2.651934
181
import pytest from mock import mock, MagicMock from suds import WebFault from algosec.errors import AlgoSecLoginError, AlgoSecAPIError
[ 11748, 12972, 9288, 198, 6738, 15290, 1330, 15290, 11, 6139, 44, 735, 198, 6738, 424, 9310, 1330, 5313, 37, 1721, 198, 198, 6738, 435, 70, 577, 66, 13, 48277, 1330, 978, 2188, 6558, 47790, 12331, 11, 978, 2188, 6558, 17614, 12331, 628...
3.261905
42
import torch.nn as nn import torch import torch.nn.functional as F from networks.dropblock import DropBlock
[ 11748, 28034, 13, 20471, 355, 299, 77, 201, 198, 11748, 28034, 201, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 201, 198, 6738, 7686, 13, 14781, 9967, 1330, 14258, 12235, 201, 198, 201, 198, 201, 198, 201, 198, 201 ]
2.975
40
import pytest from src.day15 import solve_part1, solve_part2 day = "15" @pytest.mark.parametrize("day", [day]) @pytest.mark.parametrize("day", [day])
[ 11748, 12972, 9288, 198, 198, 6738, 12351, 13, 820, 1314, 1330, 8494, 62, 3911, 16, 11, 8494, 62, 3911, 17, 198, 198, 820, 796, 366, 1314, 1, 198, 198, 31, 9078, 9288, 13, 4102, 13, 17143, 316, 380, 2736, 7203, 820, 1600, 685, 820...
2.428571
63
from django.contrib import admin from .models import Youtube # Register your models here. @admin.register(Youtube)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 201, 198, 6738, 764, 27530, 1330, 27431, 201, 198, 201, 198, 201, 198, 2, 17296, 534, 4981, 994, 13, 201, 198, 31, 28482, 13, 30238, 7, 56, 9762, 8, 201, 198 ]
3.153846
39
from typing import Any, Dict, Mapping, Optional import torch from torch import nn from . import dynamics from .gmm2d import GMM2D from .state_attention import StateAttention from ..latent.distributions import PDistribution
[ 6738, 19720, 1330, 4377, 11, 360, 713, 11, 337, 5912, 11, 32233, 198, 198, 11748, 28034, 198, 6738, 28034, 1330, 299, 77, 198, 198, 6738, 764, 1330, 17262, 198, 6738, 764, 70, 3020, 17, 67, 1330, 6951, 44, 17, 35, 198, 6738, 764, ...
3.476923
65
from platypush.backend.weather import WeatherBackend class WeatherOpenweathermapBackend(WeatherBackend): """ Weather forecast backend that leverages the OpenWeatherMap API. Triggers: * :class:`platypush.message.event.weather.NewWeatherConditionEvent` when there is a weather condition update ...
[ 6738, 40315, 4464, 1530, 13, 1891, 437, 13, 23563, 1330, 15615, 7282, 437, 628, 198, 4871, 15615, 11505, 23563, 8899, 7282, 437, 7, 41865, 7282, 437, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 15615, 11092, 30203, 326, 17124, ...
2.92278
259
import pytest from omegaconf import DictConfig, OmegaConf from nn_core.common.utils import seed_index_everything @pytest.mark.parametrize( "seed_index, expected_seed", [ (0, 1608637542), (30, 787716372), ], )
[ 11748, 12972, 9288, 198, 6738, 267, 28917, 7807, 69, 1330, 360, 713, 16934, 11, 19839, 18546, 198, 198, 6738, 299, 77, 62, 7295, 13, 11321, 13, 26791, 1330, 9403, 62, 9630, 62, 37814, 628, 198, 31, 9078, 9288, 13, 4102, 13, 17143, 3...
2.285714
105
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models, fields
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2142, 286, 10529, 2238, 13, 4091, 38559, 24290, 2393, 329, 1336, 6634, 290, 15665, 3307, 13, 198, 198, 6738, 16298, 2238, 1330, 4981, 11, 7032, 628 ]
3.243902
41
from .dataloader import * from .resnet import * from .shared_conv import * from .no_share_conv import *
[ 6738, 764, 67, 10254, 1170, 263, 1330, 1635, 198, 6738, 764, 411, 3262, 1330, 1635, 198, 6738, 764, 28710, 62, 42946, 1330, 1635, 198, 6738, 764, 3919, 62, 20077, 62, 42946, 1330, 1635 ]
3.121212
33
import sys import logging import MySQLdb from django.core.management.base import BaseCommand, CommandError from django.conf import settings dbname = 'makdb' user = 'admin' password = 'Admin123$' host = 'mak-db-server.cnslitlzorh7.us-east-1.rds.amazonaws.com' logger = logging.getLogger() logger.setLevel(logging.INFO)...
[ 11748, 25064, 198, 11748, 18931, 198, 11748, 33476, 9945, 198, 198, 6738, 42625, 14208, 13, 7295, 13, 27604, 13, 8692, 1330, 7308, 21575, 11, 9455, 12331, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 198, 9945, 3672, 796, 705, 7...
2.767241
116
# Generated by Django 3.0.7 on 2020-09-11 12:33 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 22, 319, 12131, 12, 2931, 12, 1157, 1105, 25, 2091, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.766667
30
import os import re import threading import time from datetime import datetime import requests # artifact_url = 'https://repo.maven.apache.org/maven2/com/google/guava/guava/21.0/' artifact_url = 'https://repo1.maven.org/maven2/com/google/guava/guava/21.0/' request_params = {'proxies': 'http://127.0.0.1:6152'} headers...
[ 11748, 28686, 198, 11748, 302, 198, 11748, 4704, 278, 198, 11748, 640, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 11748, 7007, 198, 198, 2, 24127, 62, 6371, 796, 705, 5450, 1378, 260, 7501, 13, 2611, 574, 13, 43073, 13, 2398, ...
2.514652
546
from textblob import TextBlob import tweepy import twkeys def twminer(keyword, twcount): """Search Tweets with a keyword and determine their sentiments""" # Authentication with Twitter using API keys stored in twkeys.py file auth = tweepy.OAuthHandler(twkeys.C_KEY, twkeys.C_SECRET) auth.set_access_tok...
[ 6738, 2420, 2436, 672, 1330, 8255, 3629, 672, 198, 11748, 4184, 538, 88, 198, 11748, 665, 13083, 198, 198, 4299, 665, 1084, 263, 7, 2539, 4775, 11, 665, 9127, 2599, 198, 220, 220, 220, 37227, 18243, 24205, 1039, 351, 257, 21179, 290, ...
2.267112
599
from yaml import load
[ 6738, 331, 43695, 1330, 3440, 628 ]
3.833333
6
# Copyright (c) 2011 Tencent Inc. # All rights reserved. # # Author: Michaelpeng <michaelpeng@tencent.com> # Date: October 20, 2011 """ This is the test module for prebuild_cc_library target. """ import blade_test class TestPrebuildCcLibrary(blade_test.TargetTest): """Test prebuilt cc_library.""" def ...
[ 2, 15069, 357, 66, 8, 2813, 9368, 1087, 3457, 13, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 6434, 25, 3899, 79, 1516, 1279, 76, 40302, 79, 1516, 31, 1452, 1087, 13, 785, 29, 198, 2, 7536, 25, 220, 220, 3267, 1160, 11, 281...
2.46683
407
# Generated by Django 3.2 on 2021-04-16 07:34 from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 319, 33448, 12, 3023, 12, 1433, 8753, 25, 2682, 201, 198, 201, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 201, 198, 11748, 42625, 14208, 13, 9945, 13, 27530, 13, 2934, 1616,...
2.645833
48
import torch.nn as nn import torch vgg_11=[64,'m',128,'m',256,256,'m',512,512,'m',512,512,'m'] vgg_13=[64,64,'m',128,128,'m',256,256,'m',512,512,'m',512,512,'m'] vgg_16=[64,64,'m',128,128,'m',256,256,256,'m',512,512,512,'m',512,512,512,'m'] vgg_19=[64,64,'m',128,128,'m',256,256,256,256,'m',512,512,512,512,'m',512,512,...
[ 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 198, 198, 85, 1130, 62, 1157, 41888, 2414, 4032, 76, 3256, 12762, 4032, 76, 3256, 11645, 11, 11645, 4032, 76, 3256, 25836, 11, 25836, 4032, 76, 3256, 25836, 11, 25836, 4032, 76...
1.971264
174
"""This script compare tracking performances of three controllers 1. OSG: Online Scalling with Guarantee (OSG) 1. TT: Computed Torque Trajectory Tracking (TT) 2. OS: Online Scaling (OS) The controllers track the same geometric path. There are non-zero initial joint positions. """ import numpy as np import openravepy ...
[ 37811, 1212, 4226, 8996, 9646, 13289, 286, 1115, 20624, 198, 198, 16, 13, 7294, 38, 25, 7467, 1446, 9221, 351, 34234, 1453, 357, 2640, 38, 8, 198, 16, 13, 26653, 25, 955, 17128, 4022, 4188, 4759, 752, 652, 37169, 357, 15751, 8, 198,...
3.398551
138
#!/usr/bin/env python import transport def try_locate(t: transport.Transport) -> bool: """""" import os.path if not os.path.exists('darknet'): # download darknet for linux/macos/windows, but now... # or download tensorflow lite for linux & other platforms. return False return True def main(t: tra...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 4839, 198, 198, 4299, 1949, 62, 75, 13369, 7, 83, 25, 4839, 13, 8291, 634, 8, 4613, 20512, 25, 198, 220, 13538, 15931, 15931, 198, 220, 1330, 28686, 13, 6978, 198, 220, ...
2.636771
223
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Aug 20 15:19:47 2019 @author: nmei """ import re import os import pandas as pd import numpy as np from glob import glob from shutil import copyfile,rmtree from nipype.interfaces.fsl import ICA_AROMA from nipype.interf...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 30030, 2447, 1160, 1315, 25, 1129, 25, 2857, 13130, 198, 198, 31, 9800, 25, 299, 1326, 72...
1.493265
2,747
from math import hypot co = float(input('Digite o tamanho do cateto oposto: ')) ca = float(input('Digite o tamanho do cateto adjacente: ')) print('O comprimento da hipotenusa é de {:.2f}'.format(hypot(co, ca)))
[ 6738, 10688, 1330, 8813, 198, 1073, 796, 12178, 7, 15414, 10786, 19511, 578, 267, 256, 10546, 8873, 466, 3797, 27206, 1034, 455, 78, 25, 705, 4008, 198, 6888, 796, 12178, 7, 15414, 10786, 19511, 578, 267, 256, 10546, 8873, 466, 3797, ...
2.74026
77
import networkx as nx import codecs import json DATA_FILE = "/home/rkapoor/Documents/ISI/data/DIG-Nov-Eval/gt-v02-all.jl" doc_keys = dict() output_file_base = "output.jl" file_number = 1 count = 0 outfile = codecs.open(str(file_number)+output_file_base, 'w', 'utf-8') with codecs.open(DATA_FILE, 'r', 'utf-8') as inf...
[ 11748, 3127, 87, 355, 299, 87, 198, 11748, 40481, 82, 198, 11748, 33918, 198, 198, 26947, 62, 25664, 796, 12813, 11195, 14, 81, 74, 499, 2675, 14, 38354, 14, 1797, 40, 14, 7890, 14, 35, 3528, 12, 20795, 12, 36, 2100, 14, 13655, 12...
2.053785
502
Hello().main()
[ 198, 198, 15496, 22446, 12417, 3419, 198 ]
2.428571
7
""" SSBGP-DSS Simulations Usage: dss-generator <topologies> <destinations> <priority> [--reportnodes] [--c=<repetitions>] [--min=<min_delay>] [--max=<max_delay>] [--th=<threshold>] [ --db=<db_path>] dss-generator (-h | --help) Options: -h --help Show this screen. --version Sh...
[ 37811, 198, 5432, 33, 16960, 12, 5258, 50, 3184, 5768, 198, 198, 28350, 25, 198, 220, 288, 824, 12, 8612, 1352, 1279, 4852, 5823, 29, 1279, 16520, 7352, 29, 1279, 49336, 29, 685, 438, 13116, 77, 4147, 60, 685, 438, 66, 28, 27, 260...
2.701657
362
import os #gets the file path for a specific folder within the application data ouput structure
[ 11748, 28686, 198, 198, 2, 11407, 262, 2393, 3108, 329, 257, 2176, 9483, 1626, 262, 3586, 1366, 267, 929, 315, 4645, 628 ]
4.454545
22
from app.models import ( User, UserInvitation, site, survey, card as card_model, camera as camera_model, species as species_model, survey_camera_card, survey_species, survey_species_camera) from flask_marshmallow import Marshmallow ma = Marshmallow()
[ 6738, 598, 13, 27530, 1330, 357, 198, 220, 220, 220, 11787, 11, 198, 220, 220, 220, 11787, 19904, 3780, 11, 198, 220, 220, 220, 2524, 11, 198, 220, 220, 220, 5526, 11, 198, 220, 220, 220, 2657, 355, 2657, 62, 19849, 11, 198, 220, ...
2.672566
113
import os from aiida import orm from aiida.plugins import WorkflowFactory from aiida.engine import submit, run_get_node VerificationWorkChain = WorkflowFactory('sssp_workflow.verification') def run_verification( pseudo, pw_code, ph_code, protocol, cutoff_control, criteria, options, ...
[ 11748, 28686, 198, 198, 6738, 257, 72, 3755, 1330, 393, 76, 198, 198, 6738, 257, 72, 3755, 13, 37390, 1330, 5521, 11125, 22810, 198, 6738, 257, 72, 3755, 13, 18392, 1330, 9199, 11, 1057, 62, 1136, 62, 17440, 198, 198, 13414, 2649, 1...
2.278533
736
import boto3 import os import json import logging import datetime from jsonpath_ng import jsonpath, parse from event_mappings import EventMappings from sitewise_asset import SitewiseAsset from sitewise_assets_cache import SitewiseAssetsCache logger = logging.getLogger() logger.setLevel(getattr(logging, os.environ.get(...
[ 11748, 275, 2069, 18, 198, 11748, 28686, 198, 11748, 33918, 198, 11748, 18931, 198, 11748, 4818, 8079, 198, 6738, 33918, 6978, 62, 782, 1330, 33918, 6978, 11, 21136, 198, 6738, 1785, 62, 76, 39242, 1330, 8558, 44, 39242, 198, 6738, 1650...
2.772093
215
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = 'ipetrash' from typing import Dict, List import requests from bs4 import BeautifulSoup if __name__ == '__main__': season_by_series = get_seasons() for season, series_list in season_by_series.items(): print(f'{season} ({len(series_list)}...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 834, 9800, 834, 796, 705, 541, 21879, 1077, 6, 628, 198, 6738, 19720, 1330, 360, 713, 11, 7343, 198, 198, ...
2.321888
233
import logging import sys import textwrap from collections import OrderedDict from aioupnp.upnp import UPnP log = logging.getLogger("aioupnp") handler = logging.StreamHandler() handler.setFormatter(logging.Formatter('%(asctime)-15s-%(filename)s:%(lineno)s->%(message)s')) log.addHandler(handler) log.setLevel(logging.WA...
[ 11748, 18931, 198, 11748, 25064, 198, 11748, 2420, 37150, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 6738, 257, 72, 10486, 37659, 13, 929, 37659, 1330, 15958, 77, 47, 198, 198, 6404, 796, 18931, 13, 1136, 11187, 1362, 7203, 1872...
2.666667
249
from cutmix.cutmix import CutMix
[ 6738, 2005, 19816, 13, 8968, 19816, 1330, 9712, 35608 ]
3.555556
9
from queue import Queue from threading import Event, Thread from usb import USBError, ENDPOINT_OUT, ENDPOINT_IN from usb.control import get_interface from usb.core import find from usb.util import find_descriptor, endpoint_direction, claim_interface, dispose_resources from scripts.libAnt.drivers.driver import Driver,...
[ 6738, 16834, 1330, 4670, 518, 198, 6738, 4704, 278, 1330, 8558, 11, 14122, 198, 198, 6738, 38551, 1330, 8450, 12331, 11, 12964, 6322, 46, 12394, 62, 12425, 11, 12964, 6322, 46, 12394, 62, 1268, 198, 6738, 38551, 13, 13716, 1330, 651, ...
3.49635
137
import sys from collections import defaultdict as y,deque as dq F=lambda:map(int,input().split()) n,m=F() g=y(list) t={} for i in range(m): a,b=F() g[a]+=[b] g[b]+=[a] v=[0]*(n+1) q=dq([1]) while q: x=q.popleft() if x==n: p=[n] x=n while x!=1: x=t[x] p...
[ 11748, 25064, 198, 6738, 17268, 1330, 4277, 11600, 355, 331, 11, 2934, 4188, 355, 288, 80, 198, 37, 28, 50033, 25, 8899, 7, 600, 11, 15414, 22446, 35312, 28955, 198, 77, 11, 76, 28, 37, 3419, 198, 70, 28, 88, 7, 4868, 8, 198, 83...
1.55814
344
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'note.ui' # # Created by: PyQt5 UI code generator 5.15.4 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. from PyQt5 import QtCore, QtGui, ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 5178, 7822, 7560, 422, 3555, 334, 72, 2393, 705, 11295, 13, 9019, 6, 198, 2, 198, 2, 15622, 416, 25, 9485, 48, 83, 20, 12454, 2438, 17301, 642, 13, 1314, 1...
2.6
215
# coding: utf-8 """ OpenShift API (with Kubernetes) OpenShift provides builds, application lifecycle, image content management, and administrative policy on top of Kubernetes. The API allows consistent management of those objects. All API operations are authenticated via an Authorization bearer token that is...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 220, 220, 220, 4946, 33377, 7824, 357, 4480, 12554, 527, 3262, 274, 8, 628, 220, 220, 220, 4946, 33377, 3769, 12188, 11, 3586, 3868, 47510, 11, 2939, 2695, 4542, 11, 290, 11553, ...
2.127369
23,059
import os import numpy as np import yaml EXP_NAME='release' EXP_PATH='exp/TH14/'+EXP_NAME+'/' MAX_ITER = 200 num_process = 24 rewrite_cfg('MAX_ITER',MAX_ITER) os.system('pwd') # train on multiple videos rewrite_cfg_str('DATA_FILE','att_unfused\/val.all.tsv') rewrite_cfg_str('STAGE','val') rewrite_solver('snapshot',...
[ 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 331, 43695, 198, 198, 49864, 62, 20608, 11639, 20979, 6, 198, 49864, 62, 34219, 11639, 11201, 14, 4221, 1415, 14, 6, 10, 49864, 62, 20608, 10, 26488, 6, 198, 198, 22921, 62...
2.211111
540
import os from spotipy import Spotify from spotipy.oauth2 import SpotifyOAuth from tqdm import tqdm from config import spotify_client_config directory = os.path.dirname(os.path.relpath(__file__)) if directory: os.chdir(directory) auth_manager = SpotifyOAuth( client_id=spotify_client_config['client_id'], ...
[ 11748, 28686, 198, 6738, 4136, 541, 88, 1330, 26778, 198, 6738, 4136, 541, 88, 13, 12162, 1071, 17, 1330, 26778, 23621, 1071, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 198, 6738, 4566, 1330, 4136, 1958, 62, 16366, 62, 1125...
2.826316
190
import uuid import time import json from .app_models import GeoLocation
[ 11748, 334, 27112, 198, 11748, 640, 198, 11748, 33918, 198, 198, 6738, 764, 1324, 62, 27530, 1330, 32960, 14749, 628, 198 ]
3.571429
21
import seaborn as sns import matplotlib.pyplot as plt titanic = sns.load_dataset('titanic') #스타일 테마 설정 sns.set_style('whitegrid') #그래프 객체 생성 fig = plt.figure(figsize=(15,5)) ax1 = fig.add_subplot(1,3,1) ax2 = fig.add_subplot(1,3,2) ax3 = fig.add_subplot(1,3,3) #기본값 sns.countplot(x = 'class',palette = 'Set1',data = ...
[ 11748, 384, 397, 1211, 355, 3013, 82, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 83, 18642, 291, 796, 3013, 82, 13, 2220, 62, 19608, 292, 316, 10786, 83, 18642, 291, 11537, 198, 198, 2, 168, 232, 97, 1...
1.639535
430
import json import logging class MessageErrorHandler(object): """ Handles invalid and errored messages""" def __init__(self, invalid_stream_name, error_stream_name, writer): """ :param invalid_stream_name: Kinesis stream for invalid messages :param error_stream_name: Kinesis stream fo...
[ 11748, 33918, 198, 11748, 18931, 628, 198, 4871, 16000, 12331, 25060, 7, 15252, 2599, 198, 220, 220, 220, 37227, 7157, 829, 12515, 290, 1931, 34640, 6218, 37811, 628, 220, 220, 220, 825, 11593, 15003, 834, 7, 944, 11, 12515, 62, 5532, ...
2.038924
1,413
# (C) British Crown Copyright 2018, Met Office. # See LICENSE.md in the top directory for license details. # """JSON feature bundles """ __all__ = ('feature_bundle', 'FeatureBundle') from json import load from dtype import stringlike, arraylike from exceptions import ExternalException from nfluid import fluid, globa...
[ 2, 357, 34, 8, 3517, 12223, 15069, 2864, 11, 3395, 4452, 13, 198, 2, 4091, 38559, 24290, 13, 9132, 287, 262, 1353, 8619, 329, 5964, 3307, 13, 198, 2, 198, 198, 37811, 40386, 3895, 36344, 198, 37811, 198, 198, 834, 439, 834, 796, 1...
3.666667
135
import subprocess op = subprocess.check_output(["sudo","docker", "ps","-a"]) op = op.split("\n") for i in op: i = i.split() try: if(i[1] == "gateway"): print([i[0], i[1]]) op = subprocess.check_output(["sudo","docker","commit",i[0], i[1]]) print(op) except: ...
[ 11748, 850, 14681, 198, 198, 404, 796, 850, 14681, 13, 9122, 62, 22915, 7, 14692, 24032, 2430, 45986, 1600, 366, 862, 2430, 12, 64, 8973, 8, 198, 404, 796, 1034, 13, 35312, 7203, 59, 77, 4943, 198, 1640, 1312, 287, 1034, 25, 198, ...
1.929412
170
# import hnet # print(dir(hnet)) # print(hnet.__version__) # %% import numpy as np import pandas as pd # %% from hnet import hnet hn = hnet() df = hn.import_example('sprinkler') hn1 = hnet(excl_background='0.0', dtypes=np.array(['bool']*df.shape[1])) out1 = hn1.association_learning(df.astype(bool)) hn2 = hnet() ou...
[ 2, 1330, 289, 3262, 198, 2, 3601, 7, 15908, 7, 71, 3262, 4008, 198, 2, 3601, 7, 71, 3262, 13, 834, 9641, 834, 8, 198, 198, 2, 43313, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 628, 198, 2, 43313, ...
2.489287
4,574