content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
from __future__ import absolute_import from .huffman import HeapNode, HuffmanCoding
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 764, 71, 1648, 805, 1330, 679, 499, 19667, 11, 14721, 805, 34, 7656, 198 ]
3.5
24
import dash import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input, Output import pandas as pd import plotly.express as px import re from functions import filterByTokens # load article csv into panda articleData = pd.read_csv('fataburen_articles_diva_processed.csv...
[ 11748, 14470, 198, 11748, 14470, 62, 7295, 62, 5589, 3906, 355, 288, 535, 198, 11748, 14470, 62, 6494, 62, 5589, 3906, 355, 27711, 198, 6738, 14470, 13, 45841, 3976, 1330, 23412, 11, 25235, 198, 198, 11748, 19798, 292, 355, 279, 67, 1...
2.202375
5,727
# Generated by Django 2.2 on 2020-04-26 15:19 from django.db import migrations, models import django.utils.timezone
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 319, 12131, 12, 3023, 12, 2075, 1315, 25, 1129, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, 26791, 13, 2435, 11340, 628 ]
3.025641
39
description = 'BOA Table 4' pvprefix = 'SQ:BOA:mcu1:' devices = dict( t4tx = device('nicos_ess.devices.epics.motor.EpicsMotor', epicstimeout = 3.0, description = 'Table 4 X Translation', motorpv = pvprefix + 'T4TX', errormsgpv = pvprefix + 'T4TX-MsgTxt', precision = 0.05, ...
[ 11213, 796, 705, 8202, 32, 8655, 604, 6, 198, 198, 79, 85, 40290, 796, 705, 50, 48, 25, 8202, 32, 25, 23209, 84, 16, 32105, 198, 198, 42034, 796, 8633, 7, 198, 220, 220, 220, 256, 19, 17602, 796, 3335, 10786, 6988, 418, 62, 408,...
2.056338
355
from __future__ import print_function import os import sys import json import urllib import itertools from tqdm import tqdm from utils import LogUtil from parser import Parser from ioutils import read_lines from ads_parser import AdsParser from pycorenlp import StanfordCoreNLP # The following two lines make CoreNLP h...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 33918, 198, 11748, 2956, 297, 571, 198, 11748, 340, 861, 10141, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 6738, 3384, 4487...
2.062006
2,403
#!/usr/bin/python3 # -*- coding: utf-8 -*- """ @FileName : Agent.py @Author : citang @Date : 2021/7/27 5:46 下午 @Description : description the function of the file """ import sys from framework import Model, Db, Log, Config, Common class __Agent__: """模块功能""" def Data(self, nam...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 220, 220, 220, 2488, 8979, 5376, 220, 220, 220, 1058, 15906, 13, 9078, 198, 220, 220, 220, 2488, 13838, 220,...
1.740385
1,040
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ DEV notes: uses a trained network to predict the class for an input image pass in a single image /path/to/image and return the flower name and class probability python predict.py /path/to/image checkpoint python predict.py input checkpoint --top_k 3 python predict.p...
[ 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, 37811, 198, 39345, 4710, 25, 198, 2664, 257, 8776, 3127, 284, 4331, 262, 1398, 329, 281, 5128, 2939, 198, 66...
2.547899
3,236
if __name__ == "__main__": read_data()
[ 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 1100, 62, 7890, 3419, 198 ]
2.333333
18
#!/usr/bin/env python #coding=utf-8 # vlan parse def parse_cisco(req): '''phy_slot/phy_subslot/phy_port:XPI.XCI''' nasportid = req.get('NAS-Port-Id') if not nasportid:return nasportid = nasportid.lower() parse_vlanid() parse_vlanid2() return req def parse_std(req):...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 66, 7656, 28, 40477, 12, 23, 198, 198, 2, 220, 410, 9620, 21136, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198, 4299, 21136, 62, 66, 4861, 7, 42180, 2599, 198, 220, 22...
1.977459
488
import boto3
[ 11748, 275, 2069, 18, 198 ]
2.6
5
"""Errors for Google Assistant.""" class SmartHomeError(Exception): """Google Assistant Smart Home errors. https://developers.google.com/actions/smarthome/create-app#error_responses """ def __init__(self, code, msg): """Log error code.""" super().__init__(msg) self.code = cod...
[ 37811, 9139, 5965, 329, 3012, 15286, 526, 15931, 628, 198, 4871, 10880, 16060, 12331, 7, 16922, 2599, 198, 220, 220, 220, 37227, 11708, 15286, 10880, 5995, 8563, 13, 628, 220, 220, 220, 3740, 1378, 16244, 364, 13, 13297, 13, 785, 14, ...
2.683333
120
# Generated by Django 3.1.13 on 2021-09-05 16:30 from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 1485, 319, 33448, 12, 2931, 12, 2713, 1467, 25, 1270, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, 9945, 13, 27530, 13, 2934, 1616, 295,...
2.840909
44
import smart_imports smart_imports.all()
[ 198, 11748, 4451, 62, 320, 3742, 198, 198, 27004, 62, 320, 3742, 13, 439, 3419, 628 ]
2.75
16
from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, SubmitField, ValidationError, BooleanField from wtforms.validators import Email, EqualTo, Required from ..models import User import email_validator
[ 6738, 42903, 62, 86, 27110, 1330, 46947, 8479, 198, 6738, 266, 83, 23914, 1330, 10903, 15878, 11, 30275, 15878, 11, 39900, 15878, 11, 3254, 24765, 12331, 11, 41146, 15878, 198, 6738, 266, 83, 23914, 13, 12102, 2024, 1330, 9570, 11, 2870...
4
57
#!/usr/bin/env python3 # -*- encoding: utf-8 # SPDX-License-Identifier: CC0-1.0 & Additional T&Cs # Copyright (c) 12021 - 12021 HE, Emporia.AI Pte Ltd # See LICENSE.md for Additional Terms and Conditions from quart import Blueprint, abort from quart_trio import QuartTrio from quart_schema import validate_request, vali...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 21004, 25, 3384, 69, 12, 23, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 12624, 15, 12, 16, 13, 15, 1222, 15891, 309, 5, 32274, 198, 2, 15069, 357, 66...
2.783784
296
import pandas as pd import os import numpy as np line_end = " \\\\\n" files = ["china", "desharnais", "isbsg10", "osp", "osp2", "ground", "flight"] percentage_metrics = ["SA+", "SD+", "MMRE-", "MdMRE-", "Pred25+", "Pred40+", "Delta+"] to_show = ["MAR-", "SA+", "MdMRE-", "Pred40+", "Effort-" ,"Months-","Defects-", "Ri...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 198, 1370, 62, 437, 796, 366, 3467, 13426, 77, 1, 198, 198, 16624, 796, 14631, 354, 1437, 1600, 366, 67, 5069, 1501, 15152, 1600, 366, 271, ...
2.092166
1,519
# -*- coding: utf-8 -*- """Series transformations as slotting and resampling.""" from .time import dt_from_s, s_from_dt from .datastructures import DataTimeSlot, DataTimeSlotSeries, TimePoint, DataTimePointSeries, DataTimePoint from .utilities import compute_data_loss from .operations import avg from .units import Tim...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 27996, 38226, 355, 10852, 889, 290, 581, 321, 11347, 526, 15931, 198, 198, 6738, 764, 2435, 1330, 288, 83, 62, 6738, 62, 82, 11, 264, 62, 6738, 62, 28664, 198, ...
1.804808
17,721
from pygelib.CG_routines import _raw_cg_product, _compute_output_shape from pygelib.Layers import CGProduct, SO3Linear, L1DifferenceLayer, ManyEdgeMPLayer from pygelib.utils import _convert_to_SO3part_view from pygelib.SO3VecArray import SO3VecArray from pygelib.transforms import radial_gaussian from pygelib.rotations ...
[ 6738, 12972, 25280, 571, 13, 39816, 62, 81, 448, 1127, 1330, 4808, 1831, 62, 66, 70, 62, 11167, 11, 4808, 5589, 1133, 62, 22915, 62, 43358, 198, 6738, 12972, 25280, 571, 13, 43, 6962, 1330, 29925, 15667, 11, 12809, 18, 14993, 451, 1...
2.954198
131
import torch from torch import nn, einsum
[ 11748, 28034, 198, 6738, 28034, 1330, 299, 77, 11, 304, 1040, 388, 198 ]
3.230769
13
# -*- coding: utf-8 -*- """ @Project : @FileName: @Author :penghr @Time :202x/xx/xx xx:xx @Desc : """ import os import h5py import cv2 import numpy as np from PIL import Image from tqdm import tqdm
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 31, 16775, 1058, 220, 198, 31, 8979, 5376, 25, 220, 198, 31, 13838, 220, 1058, 3617, 456, 81, 220, 198, 31, 7575, 220, 220, 220, 1058, 19004, 87, 14, 532...
2.175258
97
import socket import struct import RF24 # print("%d %d %d %d %d %d" % (self._heartbeat, self._id, self._lefta, self._leftb, self._righta, self._rightb)) # sock.sendall(struct.pack("!BBBBBB", self._heartbeat, self._id, self._lefta, self._leftb, self._righta, self._rightb))
[ 11748, 17802, 220, 198, 11748, 2878, 198, 11748, 20445, 1731, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 1303, 3601, 7203, 4, 67, 4064, 67, 4064, 67, 4064, 67, 4064, 67, 4064, 67, 1, 4064, 357,...
2.365079
126
# Copyright 2020 AstroLab Software # Author: Biswajit Biswas # # 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 applicab...
[ 2, 15069, 12131, 35167, 17822, 10442, 198, 2, 6434, 25, 38045, 86, 1228, 270, 38045, 9776, 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, ...
3.787356
174
from gym_mdptetris.envs.tetris import Tetris, TetrisFlat, TetrisHeuristic, MelaxTetris, MelaxTetrisFlat, MelaxTetrisHeuristic from gym_mdptetris.envs.board import Board from gym_mdptetris.envs.piece import Piece
[ 6738, 11550, 62, 9132, 457, 316, 2442, 13, 268, 14259, 13, 83, 316, 2442, 1330, 27351, 2442, 11, 27351, 2442, 7414, 265, 11, 27351, 2442, 1544, 27915, 11, 5616, 897, 51, 316, 2442, 11, 5616, 897, 51, 316, 2442, 7414, 265, 11, 5616, ...
2.65
80
import argparse import re from abc import ABC, abstractmethod from enum import Enum import PySimpleGUI as sg import yaml from pathlib2 import Path """ Simple tool to simplify the creation of hints for the learning platform. The tool preserves the existing IDs and adds a given prefix to new entries. These ...
[ 11748, 1822, 29572, 198, 11748, 302, 198, 6738, 450, 66, 1330, 9738, 11, 12531, 24396, 198, 6738, 33829, 1330, 2039, 388, 198, 198, 11748, 9485, 26437, 40156, 355, 264, 70, 198, 11748, 331, 43695, 198, 6738, 3108, 8019, 17, 1330, 10644,...
2.19998
10,026
from django import urls from django.contrib.contenttypes.models import ContentType from django.db import models from django.test import TestCase from ..permalinks import PermalinkError, expand, resolve
[ 6738, 42625, 14208, 1330, 2956, 7278, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 11299, 19199, 13, 27530, 1330, 14041, 6030, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 198, ...
3.727273
55
#!/usr/bin/env python3 """ Script to provide convex tool functionality """ from convex_api.tool.convex_tool import convex_tool if __name__ == "__main__": convex_tool()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 37811, 628, 220, 220, 220, 12327, 284, 2148, 24748, 87, 2891, 11244, 198, 198, 37811, 628, 198, 6738, 24748, 87, 62, 15042, 13, 25981, 13, 1102, 303, 87, 62, 25981, 1330, 24...
2.676471
68
from tqdm import tqdm from module.expansion.ppr import PPR from module.import_options import Options from module.lfr.community_writer import WriteCommunities from module.lfr.lfr_reader import LFRReader from module.lfr.nmi_plot import PlotNMI from module.seeding.seeder.spreadhub import Spreadhub if __name__ == '__ma...
[ 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 198, 6738, 8265, 13, 11201, 5487, 13, 381, 81, 1330, 350, 4805, 198, 6738, 8265, 13, 11748, 62, 25811, 1330, 18634, 198, 6738, 8265, 13, 1652, 81, 13, 28158, 62, 16002, 1330, 19430, 3...
2.708556
374
from collections import deque n, q = map(int, input().split()) links = [list(map(int, input().split())) for _ in range(n - 1)] nodes = [] for i in range(n + 1): nodes.append(Node(i)) for j in range(n - 1): edge_start, edge_end = links[j] nodes[edge_start].nears.append(edge_end) nodes[edge_end].near...
[ 6738, 17268, 1330, 390, 4188, 628, 198, 198, 77, 11, 10662, 796, 3975, 7, 600, 11, 5128, 22446, 35312, 28955, 198, 28751, 796, 685, 4868, 7, 8899, 7, 600, 11, 5128, 22446, 35312, 3419, 4008, 329, 4808, 287, 2837, 7, 77, 532, 352, ...
2.133005
406
#!/usr/bin/env python3 # -*- coding: utf-8 -*- class ScrapySplashWrapperError(Exception): """Base class for other exceptions""" pass class InvalidProxy(ScrapySplashWrapperError): """Raised when the proxy is not valid"""
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 628, 198, 4871, 1446, 2416, 88, 26568, 1077, 36918, 2848, 12331, 7, 16922, 2599, 198, 220, 220, 220, 37227, 14881, 1398,...
2.843373
83
import json import requests from flask import Flask, jsonify, render_template, redirect, request from form_formatter.append_snapshot_formatter import AppendSnapshotFormatter from form_formatter.update_frequency_formatter import UpdateFrequencyFormatter from form_formatter.update_open_date_formatter import UpdateOpenD...
[ 11748, 33918, 198, 198, 11748, 7007, 198, 6738, 42903, 1330, 46947, 11, 33918, 1958, 11, 8543, 62, 28243, 11, 18941, 11, 2581, 198, 198, 6738, 1296, 62, 687, 1436, 13, 33295, 62, 45380, 9442, 62, 687, 1436, 1330, 2034, 437, 43826, 944...
3.183727
381
from http import HTTPStatus from io import StringIO from django.core.exceptions import ObjectDoesNotExist from django.core.management import call_command from django.test import TestCase from django.urls import reverse from faker import Faker from rest_framework.test import APIClient from clients.models import Clien...
[ 6738, 2638, 1330, 14626, 19580, 198, 6738, 33245, 1330, 10903, 9399, 198, 198, 6738, 42625, 14208, 13, 7295, 13, 1069, 11755, 1330, 9515, 13921, 3673, 3109, 396, 198, 6738, 42625, 14208, 13, 7295, 13, 27604, 1330, 869, 62, 21812, 198, 6...
3.633929
112
from setuptools import setup setup( name="ycd", version="v0.1.0", description="Youtube comment downloader", url="https://github.com/koomook/youtube-comment-downloader", author="Goobong", author_email="bongbonggg97@gmail.com", license="Unlicense", packages=["ycd"], install_requires=[...
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 2625, 88, 10210, 1600, 198, 220, 220, 220, 2196, 2625, 85, 15, 13, 16, 13, 15, 1600, 198, 220, 220, 220, 6764, 2625, 56, 9762, 2912, 4321, 263, 160...
2.537975
158
""" A module with base components for rendering the scene """ from __future__ import annotations import pygame from abc import ABC, abstractmethod from .simulation import EnvironmentComponent, SimObjectComponent, RenderEvent from .event_system import EventSystem from .event import Event from typing import Optional, ...
[ 37811, 198, 32, 8265, 351, 2779, 6805, 329, 14837, 262, 3715, 198, 37811, 198, 198, 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 11748, 12972, 6057, 198, 198, 6738, 450, 66, 1330, 9738, 11, 12531, 24396, 198, 6738, 764, 14323, 1741, ...
2.562823
2,706
import click from paperspace import client, config from paperspace.cli import common from paperspace.cli.cli import cli from paperspace.commands import models as models_commands @cli.group("models", help="Manage models", cls=common.ClickGroup) @models_group.command("list", help="List models with optional filtering...
[ 11748, 3904, 198, 198, 6738, 9473, 10223, 1330, 5456, 11, 4566, 198, 6738, 9473, 10223, 13, 44506, 1330, 2219, 198, 6738, 9473, 10223, 13, 44506, 13, 44506, 1330, 537, 72, 198, 6738, 9473, 10223, 13, 9503, 1746, 1330, 4981, 355, 4981, ...
3.109195
174
import datetime import os import torch from torch import nn from torch import optim from torch.autograd import Variable from torch.utils.data import DataLoader from torchvision import transforms import joint_transforms from config import duts_train_path from datasets import ImageFolder from misc import AvgMeter, chec...
[ 11748, 4818, 8079, 198, 11748, 28686, 198, 198, 11748, 28034, 198, 6738, 28034, 1330, 299, 77, 198, 6738, 28034, 1330, 6436, 198, 6738, 28034, 13, 2306, 519, 6335, 1330, 35748, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 6060, 17401, 1...
2.664783
531
# Copyright (c), Tiziano Müller # SPDX-License-Identifier: MIT import itertools import re import warnings from dataclasses import dataclass from typing import ( IO, Any, Callable, Iterator, List, Mapping, Optional, Sequence, Type, TypeVar, Union, ) from typing_extensions im...
[ 2, 15069, 357, 66, 828, 309, 528, 10115, 40790, 6051, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 17168, 198, 198, 11748, 340, 861, 10141, 198, 11748, 302, 198, 11748, 14601, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172,...
1.800259
1,542
import torch from torch import nn from torch.nn.parameter import Parameter class TimeNormalization(nn.Module): r""" Time Normalization Layer, normalized the input using it's mean and variance over time as defined in the follow equation: .. math:: \hat{h}_n=\frac{h_n-\mu_n}{\sqrt{\sigma_n^2...
[ 11748, 28034, 198, 6738, 28034, 1330, 299, 77, 198, 6738, 28034, 13, 20471, 13, 17143, 2357, 1330, 25139, 2357, 628, 198, 4871, 3862, 26447, 1634, 7, 20471, 13, 26796, 2599, 198, 220, 220, 220, 374, 37811, 198, 220, 220, 220, 3862, 14...
2.475336
446
# ============================================= from django.conf import settings from django.conf.urls.static import static # ============================================= from django.contrib import admin from django.urls import path, include from django.contrib import admin from django.contrib.auth import views...
[ 2, 46111, 25609, 201, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 201, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 13, 12708, 1330, 9037, 201, 198, 2, 46111, 25609, 201, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 2...
2.538462
1,001
from __future__ import absolute_import import os import keras.models as models from keras.layers.core import Layer, Dense, Dropout, Activation, Flatten, Reshape, Permute from keras.layers.convolutional import Conv2D, MaxPooling2D, UpSampling2D, Cropping2D from keras.layers.normalization import BatchNormalization from ...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 11748, 28686, 198, 198, 11748, 41927, 292, 13, 27530, 355, 4981, 198, 6738, 41927, 292, 13, 75, 6962, 13, 7295, 1330, 34398, 11, 360, 1072, 11, 14258, 448, 11, 13144, 341, 11, 1610,...
3.188235
170
# # @lc app=leetcode id=683 lang=python3 # # [683] K Empty Slots # # https://leetcode.com/problems/k-empty-slots/description/ # # algorithms # Hard (35.43%) # Likes: 573 # Dislikes: 560 # Total Accepted: 44.4K # Total Submissions: 125.4K # Testcase Example: '[1,3,2]\n1' # # You have N bulbs in a row numbered fro...
[ 2, 198, 2, 2488, 44601, 598, 28, 293, 316, 8189, 4686, 28, 47521, 42392, 28, 29412, 18, 198, 2, 198, 2, 685, 47521, 60, 509, 33523, 3454, 1747, 198, 2, 198, 2, 3740, 1378, 293, 316, 8189, 13, 785, 14, 1676, 22143, 14, 74, 12, ...
2.488255
596
from pytest import raises from remoto import log from remoto.exc import TimeoutError from mock import Mock
[ 6738, 12972, 9288, 1330, 12073, 198, 6738, 816, 2069, 1330, 2604, 198, 6738, 816, 2069, 13, 41194, 1330, 3862, 448, 12331, 198, 6738, 15290, 1330, 44123, 628 ]
4
27
# -*- coding: utf-8 -*- """ VTK pipeline to represent a set of points, as sphere glyphs. """ import numpy as np import vtk from vtk.util import numpy_support import sksurgeryvtk.models.vtk_base_model as vbm #pylint:disable=super-with-arguments class VTKSphereModel(vbm.VTKBaseModel): """ Class to represent ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 36392, 42, 11523, 284, 2380, 257, 900, 286, 2173, 11, 355, 16558, 25874, 82, 13, 198, 37811, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 410, ...
2.159044
1,465
# -*- coding: utf-8 -*- # Copyright (c) 2020 Kumagai group. import fire from pymatgen import Element, Structure from pymatgen.analysis.defects.utils import ChargeDensityAnalyzer from pymatgen.io.vasp import Chgcar, VolumetricData from vise.util.structure_symmetrizer import StructureSymmetrizer if __name__ == '__m...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 220, 15069, 357, 66, 8, 12131, 19162, 363, 1872, 1448, 13, 198, 198, 11748, 2046, 198, 6738, 279, 4948, 265, 5235, 1330, 11703, 11, 32522, 198, 6738, 279, 4948, 265...
2.834586
133
from github import Github import boto3 import json import os import requests def get_params(): """ Retrieve environment variables """ pat_name = os.getenv("PAT_SECRET_NAME") pat = get_pat(pat_name) return pat def get_user_repos(gh): """ Get all repos for an organization """ ...
[ 6738, 33084, 1330, 38994, 198, 11748, 275, 2069, 18, 198, 11748, 33918, 198, 11748, 28686, 198, 11748, 7007, 628, 198, 4299, 651, 62, 37266, 33529, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 4990, 30227, 2858, 9633, 198, 220, 220, ...
2.484349
607
MAX_BUCKETS = 33 BATCH_SIZE = 20
[ 22921, 62, 33, 16696, 32716, 796, 4747, 198, 33, 11417, 62, 33489, 796, 1160 ]
2.285714
14
# Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
[ 2, 15069, 13130, 383, 6378, 5908, 4946, 16092, 292, 316, 46665, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, ...
2.332036
11,565
import os import testinfra.utils.ansible_runner testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
[ 11748, 28686, 198, 198, 11748, 1332, 10745, 430, 13, 26791, 13, 504, 856, 62, 16737, 198, 198, 9288, 10745, 430, 62, 4774, 82, 796, 1332, 10745, 430, 13, 26791, 13, 504, 856, 62, 16737, 13, 2025, 82, 856, 49493, 7, 198, 220, 220, ...
2.459459
74
# pylint:disable=redefined-outer-name import json import pytest from tinvest import CandleStreamingResponse, Streaming pytestmark = pytest.mark.asyncio @pytest.fixture() @pytest.fixture() @pytest.fixture() @pytest.mark.usefixtures('_candle_message')
[ 2, 279, 2645, 600, 25, 40223, 28, 445, 18156, 12, 39605, 12, 3672, 198, 11748, 33918, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 19783, 4223, 1330, 44973, 12124, 278, 31077, 11, 43124, 198, 198, 9078, 9288, 4102, 796, 12972, 9288, ...
2.806452
93
#!/usr/bin/python3.2 # illustrate how command line arguments work: import sys print("There are "+str(len(sys.argv))+" element(s) passed in from the command line.") i=0 for x in sys.argv: print("Argv("+str(i)+") is: ",x) i=i+1
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 13, 17, 198, 2, 19418, 703, 3141, 1627, 7159, 670, 25, 198, 198, 11748, 25064, 198, 198, 4798, 7203, 1858, 389, 43825, 2536, 7, 11925, 7, 17597, 13, 853, 85, 4008, 10, 1, 5002, 7, 82, 8,...
2.549451
91
#!/usr/bin/env python # coding: utf-8 """ xopt driver using Processes Basic usage: python -m xopt.run xopt.yaml positional arguments: input_file Xopt YAML input file optional arguments: -h, --help show this help message and exit -n MAX_WORKERS Maximum workers -logfile LOGFILE log file ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 628, 198, 37811, 198, 87, 8738, 4639, 1262, 10854, 274, 198, 198, 26416, 8748, 25, 198, 198, 29412, 532, 76, 2124, 8738, 13, 5143, 2124, 8738, 13, 8...
2.585393
890
import io import os import time import cv2 import numpy as np from flask import Flask, Response, json, request, g, send_from_directory from flask_cors import CORS from detector import Detector from recoer import Recoer detector = Detector('./data/models/ctpn.pb') recoer = Recoer('./tf_crnn/data/chars/chn.txt', './da...
[ 11748, 33245, 198, 11748, 28686, 198, 11748, 640, 198, 198, 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 42903, 1330, 46947, 11, 18261, 11, 33918, 11, 2581, 11, 308, 11, 3758, 62, 6738, 62, 34945, 198, 6738, 4290...
2.595041
242
import unittest from operator import truediv import sys sys.path.append('./') solutions = __import__('solutions.034_search_for_a_range', fromlist='*') if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 6738, 10088, 1330, 491, 1739, 452, 198, 11748, 25064, 198, 17597, 13, 6978, 13, 33295, 7, 4458, 14, 11537, 198, 198, 82, 14191, 796, 11593, 11748, 834, 10786, 82, 14191, 13, 49841, 62, 12947, 62, 1640, 62, ...
2.54878
82
#!/usr/bin/env python # -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) 2017 - Anil Lakhman - MIT License # ----------------------------------------------------------------------------- from docutils import nodes from docutils.parsers.rst import role...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 16529, 32501, 198, 2, 15069, 357, 66, 8, 2177, 532, 1052, 346, 406, 11322, 805, 532, 17168, 13789, 198, 2, 16529, ...
3.541096
146
from picamera.array import PiRGBArray from picamera import PiCamera import time import cv2 import os # Center coordinates cx = 160 cy = 120 os.system( "echo 0=150 > /dev/servoblaster" ) os.system( "echo 1=150 > /dev/servoblaster" ) xdeg = 150 ydeg = 150 # Setup the camera camera = PiCamera() camera.resolution = ...
[ 6738, 8301, 18144, 13, 18747, 1330, 13993, 36982, 19182, 198, 6738, 8301, 18144, 1330, 13993, 35632, 198, 11748, 640, 198, 11748, 269, 85, 17, 198, 11748, 28686, 198, 198, 2, 3337, 22715, 198, 66, 87, 796, 13454, 198, 948, 796, 7982, ...
2.331355
1,011
'''subsector.py - subsector''' from traveller_utils.util import Die from traveller_utils.ct.planet import Planet D6 = Die(6) class Subsector(): ''' Subsector - collection of hexes, possibly containing systems ''' def generate(self, dm: int=0): ''' Generate subsector contents - dm: m...
[ 7061, 6, 7266, 34914, 13, 9078, 532, 850, 34914, 7061, 6, 198, 198, 6738, 49130, 62, 26791, 13, 22602, 1330, 6733, 198, 6738, 49130, 62, 26791, 13, 310, 13, 47427, 1330, 11397, 198, 198, 35, 21, 796, 6733, 7, 21, 8, 628, 198, 4871...
2.293333
225
import re import collections from enum import Enum from ydk._core._dm_meta_info import _MetaInfoClassMember, _MetaInfoClass, _MetaInfoEnum from ydk.types import Empty, YList, YLeafList, DELETE, Decimal64, FixedBitsDict from ydk._core._dm_meta_info import ATTRIBUTE, REFERENCE_CLASS, REFERENCE_LIST, REFERENCE_LEAFLI...
[ 628, 198, 11748, 302, 198, 11748, 17268, 198, 198, 6738, 33829, 1330, 2039, 388, 198, 198, 6738, 331, 34388, 13557, 7295, 13557, 36020, 62, 28961, 62, 10951, 1330, 4808, 48526, 12360, 9487, 27608, 11, 4808, 48526, 12360, 9487, 11, 4808, ...
1.654113
26,234
import machine import dht if __name__ == "__main__": sensor = Sensor(13)
[ 11748, 4572, 198, 11748, 288, 4352, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 12694, 796, 35367, 7, 1485, 8, 198 ]
2.724138
29
from SmellDetector import AbsSmellDectector, ModSmellDectector, HieSmellDectector, DepSmellDectector, EncSmellDectector
[ 6738, 2439, 695, 11242, 9250, 1330, 13051, 7556, 695, 35, 478, 9250, 11, 3401, 7556, 695, 35, 478, 9250, 11, 367, 494, 7556, 695, 35, 478, 9250, 11, 2129, 7556, 695, 35, 478, 9250, 11, 14711, 7556, 695, 35, 478, 9250, 628 ]
2.880952
42
from __future__ import division from textwrap import dedent import colorsys import numpy as np from scipy import stats import pandas as pd from pandas.core.series import remove_na import matplotlib as mpl import matplotlib.pyplot as plt import warnings from .external.six import string_types from .external.six.moves im...
[ 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 2420, 37150, 1330, 4648, 298, 198, 11748, 7577, 893, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 1330, 9756, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 19798, 292, ...
2.392268
19,943
# Copyright Contributors to the Amundsen project. # SPDX-License-Identifier: Apache-2.0 import importlib from pyhocon import ConfigFactory, ConfigTree from typing import Any, Dict, Iterator, Optional from databuilder.models.dashboard.dashboard_metadata import DashboardMetadata from databuilder.models.dashboard.dashb...
[ 2, 15069, 25767, 669, 284, 262, 1703, 917, 6248, 1628, 13, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 198, 198, 11748, 1330, 8019, 198, 198, 6738, 12972, 71, 36221, 1330, 17056, 22810, 11, 17056, 27660...
3.060606
924
# DIT-NR-NTT & DIF-RN-INTT & precompute import random import math from scipy import poly1d q = 12289 kesai = 7 inv_kesai = pow(kesai,2047) % q kesai4_1 = pow(inv_kesai,1536) % q print("kesai4_1 = ",kesai4_1) print(pow(inv_kesai,1024) % q) w = 49 inv_w = 1254 n_inv = 12277 w4 = [[],[],[],[]] for j in r...
[ 2, 360, 2043, 12, 24723, 12, 11251, 51, 1222, 360, 5064, 12, 42336, 12, 12394, 51, 1222, 662, 5589, 1133, 201, 198, 11748, 4738, 201, 198, 11748, 10688, 201, 198, 6738, 629, 541, 88, 1330, 7514, 16, 67, 201, 198, 201, 198, 80, 796...
1.992659
3,678
# Generated by Django 2.2.13 on 2020-11-23 18:09 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 1485, 319, 12131, 12, 1157, 12, 1954, 1248, 25, 2931, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.875
32
from download_data import get_outdoor_seatings_for_country country_name = 'Ukraine' get_outdoor_seatings_for_country(country_name)
[ 6738, 4321, 62, 7890, 1330, 651, 62, 448, 9424, 62, 24073, 654, 62, 1640, 62, 19315, 198, 198, 19315, 62, 3672, 796, 705, 44814, 6, 198, 1136, 62, 448, 9424, 62, 24073, 654, 62, 1640, 62, 19315, 7, 19315, 62, 3672, 8, 198 ]
3.069767
43
import logging from flask_babel import lazy_gettext from .jsontools import dict_to_json from .widgets import ChartWidget, DirectChartWidget from ..baseviews import BaseModelView, expose from ..models.group import DirectProcessData, GroupByProcessData from ..security.decorators import has_access from ..urltools import...
[ 11748, 18931, 198, 198, 6738, 42903, 62, 65, 9608, 1330, 16931, 62, 1136, 5239, 198, 198, 6738, 764, 8457, 756, 10141, 1330, 8633, 62, 1462, 62, 17752, 198, 6738, 764, 28029, 11407, 1330, 22086, 38300, 11, 4128, 45488, 38300, 198, 6738,...
2.51634
1,989
import pandas as pd import numpy as np from IPython.display import Markdown, display class MissingDataImputer_Numerical: ''' Various imputation methods available in this module are: Mean, Median, Mode, User define value, Random Sample distribution Parameters: ----------- Allow...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 6101, 7535, 13, 13812, 1330, 2940, 2902, 11, 3359, 628, 628, 198, 4871, 25639, 6601, 3546, 10549, 62, 45, 6975, 605, 25, 198, 220, 220, 220, 705, 7...
2.022971
4,658
#!/usr/bin/env python3.8 # -*- coding: utf-8 -*- """ https://projecteuler.net/problem=2 Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be: 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ... By considering the terms in the Fibonacci sequence...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 13, 23, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 5450, 1378, 16302, 68, 18173, 13, 3262, 14, 45573, 28, 17, 198, 10871, 649, 3381, 287, 262, ...
2.866359
217
#!/usr/bin/env python3 import logging import os from glob import glob from pathlib import Path import pandas as pd import yaml from tensorflow.keras.preprocessing.image import (DirectoryIterator, ImageDataGenerator) from src.data import load_params # set tf warning ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 18931, 198, 11748, 28686, 198, 6738, 15095, 1330, 15095, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 331, 43695, 198, 6738,...
2.532667
1,301
# Distância km=int(input()) print('{} minutos'.format(km*2))
[ 2, 4307, 22940, 10782, 544, 198, 198, 13276, 28, 600, 7, 15414, 28955, 198, 198, 4798, 10786, 90, 92, 949, 315, 418, 4458, 18982, 7, 13276, 9, 17, 4008 ]
2.137931
29
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # This file is part of nautilus-pdf-tools # # Copyright (c) 2012 Lorenzo Carbonell Cerezo <a.k.a. atareao> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # i...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 770, 2393, 318, 636, 286, 299, 2306, 35815, 12, 12315, 12, 31391, 198, 2, 198, 2, 15069, 357, 66, ...
3.334081
446
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # 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 applicab...
[ 2, 43907, 25, 7400, 11338, 28, 19, 6482, 10394, 28, 19, 2705, 8658, 11338, 28, 19, 198, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 2...
2.283787
3,707
"""Class for making calls to the Archiver Appliance Rest API.""" import requests import aa class AaRestClient(object): """Class used for making calls to the AA Rest API.""" def _construct_url(self, command, **kwargs): """Construct the appropriate URL for the AA Rest API. Args: c...
[ 37811, 9487, 329, 1642, 3848, 284, 262, 5579, 1428, 39100, 3610, 8324, 7824, 526, 15931, 198, 11748, 7007, 198, 198, 11748, 257, 64, 628, 198, 4871, 317, 64, 19452, 11792, 7, 15252, 2599, 198, 220, 220, 220, 37227, 9487, 973, 329, 164...
2.322222
720
from django.core.management.base import BaseCommand, CommandError from signup.models import create_or_update_signup from signup.models import add_user_to_global_list from sequence import models as sequence_model from signup import db import datetime
[ 6738, 42625, 14208, 13, 7295, 13, 27604, 13, 8692, 1330, 7308, 21575, 11, 9455, 12331, 198, 198, 6738, 1051, 929, 13, 27530, 1330, 2251, 62, 273, 62, 19119, 62, 12683, 929, 198, 6738, 1051, 929, 13, 27530, 1330, 751, 62, 7220, 62, 1...
3.705882
68
# Numerical features that are marked as continuous INT_FEATURES = ['user_id', 'timestamp'] # Feature that can be grouped into buckets FLOAT_FEATURES = ['x-acc', 'y-acc', 'z-acc'] # Feature that the model will predict LABEL_KEY = 'activity' # Utility function for renaming the feature
[ 198, 2, 399, 6975, 605, 3033, 326, 389, 7498, 355, 12948, 198, 12394, 62, 15112, 47471, 796, 37250, 7220, 62, 312, 3256, 705, 16514, 27823, 20520, 198, 198, 2, 27018, 326, 460, 307, 32824, 656, 38674, 198, 3697, 46, 1404, 62, 15112, ...
3.272727
88
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 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, 13...
3.646154
195
import RPi.GPIO as GPIO import time import os # Set up the GPIO GPIO.setwarnings(False) GPIO.setmode(GPIO.BOARD) GPIO.setup(11, GPIO.OUT) print "l : left" print "r : right" print "m : middle" print "t : test" print "q : exit" while True: Servo = GPIO.PWM(11, 50) Servo.start(2.5) input = raw_input("Select...
[ 11748, 25812, 72, 13, 16960, 9399, 355, 50143, 198, 11748, 640, 198, 11748, 28686, 198, 198, 2, 5345, 510, 262, 50143, 198, 16960, 9399, 13, 2617, 40539, 654, 7, 25101, 8, 198, 16960, 9399, 13, 2617, 14171, 7, 16960, 9399, 13, 8202, ...
2.09772
614
""" Treemap builder using pylab. Uses algorithm straight from http://hcil.cs.umd.edu/trs/91-03/91-03.html James Casbon 29/7/2006 """ import pylab from matplotlib.patches import Rectangle from functools import reduce if __name__ == '__main__': # example using nested lists, iter to walk and random colors si...
[ 37811, 198, 31055, 368, 499, 27098, 1262, 279, 2645, 397, 13, 198, 198, 5842, 274, 11862, 3892, 422, 2638, 1378, 71, 2856, 13, 6359, 13, 388, 67, 13, 15532, 14, 2213, 82, 14, 6420, 12, 3070, 14, 6420, 12, 3070, 13, 6494, 198, 198,...
2.453608
194
from scapy.all import * from ccsds_base import CCSDSPacket class HS_HK_TLM_PKT_TlmPkt(Packet): """Housekeeping Packet Structure app = HS command = HK_TLM_PKT msg_id = HS_HK_TLM_MID = 0x08ad = 0x0800 + 0x0ad """ name = "HS_HK_TLM_PKT_TlmPkt" fields_desc = [ # APPEND_ITEM CMD_VALID_...
[ 6738, 629, 12826, 13, 439, 1330, 1635, 198, 6738, 269, 6359, 9310, 62, 8692, 1330, 327, 7902, 35, 4303, 8317, 628, 198, 4871, 18070, 62, 38730, 62, 14990, 44, 62, 40492, 51, 62, 51, 75, 76, 47, 21841, 7, 47, 8317, 2599, 198, 220, ...
2.494746
2,379
import time from pyhdx.batch_processing import yaml_to_hdxm from pyhdx.fileIO import csv_to_protein, save_fitresult, dataframe_to_file from pyhdx.fitting import fit_gibbs_global_batch_aligned, fit_gibbs_global from pyhdx.models import HDXMeasurementSet from pyhdx.support import pprint_df_to_file from pyhdx.fitting_tor...
[ 11748, 640, 198, 198, 6738, 12972, 31298, 87, 13, 43501, 62, 36948, 1330, 331, 43695, 62, 1462, 62, 31298, 87, 76, 198, 6738, 12972, 31298, 87, 13, 7753, 9399, 1330, 269, 21370, 62, 1462, 62, 48693, 11, 3613, 62, 11147, 20274, 11, 1...
2.56741
1,031
# Copyright (c) 2011-2012 OpenStack Foundation. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # U...
[ 2, 15069, 357, 66, 8, 2813, 12, 6999, 4946, 25896, 5693, 13, 198, 2, 1439, 6923, 33876, 13, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 22...
2.414262
1,837
from numpy import sqrt, ceil, sin, cos, arctan2, diff, minimum, maximum from numpy import array, ones, zeros, full, linspace, arange, int64, concatenate from numpy import in1d, unique, isclose, nan, atleast_1d, intersect1d from warnings import warn from tokamesh.geometry import build_edge_map from tokamesh.triangle i...
[ 198, 6738, 299, 32152, 1330, 19862, 17034, 11, 2906, 346, 11, 7813, 11, 8615, 11, 610, 310, 272, 17, 11, 814, 11, 5288, 11, 5415, 198, 6738, 299, 32152, 1330, 7177, 11, 3392, 11, 1976, 27498, 11, 1336, 11, 300, 1040, 10223, 11, 61...
2.529693
7,527
from Acquisition import aq_inner from Acquisition import aq_parent from Products.CMFCore.utils import getToolByName
[ 6738, 44564, 1330, 257, 80, 62, 5083, 198, 6738, 44564, 1330, 257, 80, 62, 8000, 198, 6738, 18675, 13, 24187, 4851, 382, 13, 26791, 1330, 651, 25391, 3886, 5376, 628 ]
3.9
30
import os import time import cv2 import numpy as np
[ 11748, 28686, 198, 11748, 640, 198, 198, 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 628, 628, 198 ]
2.85
20
import pytest from bank import Bank from atm_controller import AtmController, ControlType from cash_bin import CashBin from card_reader import CardReader @pytest.fixture(scope="module") def cards(): """ 카드 데이터 fixture 생성 """ # 쉽게 알아보기 위하여 card number와 account를 문자열로 처리 card_list = { "card1": [ ...
[ 11748, 12972, 9288, 198, 198, 6738, 3331, 1330, 5018, 198, 6738, 379, 76, 62, 36500, 1330, 1629, 76, 22130, 11, 6779, 6030, 198, 6738, 5003, 62, 8800, 1330, 16210, 33, 259, 198, 6738, 2657, 62, 46862, 1330, 5172, 33634, 628, 198, 31, ...
1.793677
3,005
from dataclasses import dataclass from typing import Tuple, Union import numpy as np from ksc.type import Type # make_dims(1) = (1,) # make_dims([1, 2, 3]) = (1,2,3) # make_dims((1,2,3)) = (1,2,3) # Shape of a scalar is just just empty tuple ScalarShape = () # Shape class hierarchy class Shape: """ Shape c...
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 6738, 19720, 1330, 309, 29291, 11, 4479, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 479, 1416, 13, 4906, 1330, 5994, 198, 198, 2, 787, 62, 67, 12078, 7, 16, 8, 796, 357, ...
2.118644
708
import sys import time from ifsApprover import db from ifsApprover.Log import get_logger from ifsApprover.Utils import make_dirs_if_needed, rnd_string logger = get_logger("MailActions") def get_first_matching_content_type(mail_mime_part, content_type_to_find): """ Recursively searches all mime parts of the ...
[ 11748, 25064, 198, 11748, 640, 198, 198, 6738, 611, 82, 4677, 305, 332, 1330, 20613, 198, 6738, 611, 82, 4677, 305, 332, 13, 11187, 1330, 651, 62, 6404, 1362, 198, 6738, 611, 82, 4677, 305, 332, 13, 18274, 4487, 1330, 787, 62, 15908...
2.614622
807
import readline import textwrap import os import pygments.token import logging from colorama import Fore, Back from typing import List, Iterable from privex.helpers import empty, DictObject from prompt_toolkit import PromptSession, print_formatted_text, ANSI from prompt_toolkit.completion import Completer, WordComplete...
[ 11748, 1100, 1370, 198, 11748, 2420, 37150, 198, 11748, 28686, 198, 11748, 12972, 11726, 13, 30001, 198, 11748, 18931, 198, 6738, 3124, 1689, 1330, 4558, 11, 5157, 198, 6738, 19720, 1330, 7343, 11, 40806, 540, 198, 6738, 1293, 303, 87, ...
2.843011
465
import torch
[ 11748, 28034, 201, 198 ]
3.5
4
import cgi import httplib import webapp2 from . import channel from . import compute from . import error from . import middleware from . import model from . import settings from . import shared from . import wsgi_config from error import Abort from google.appengine.api import app_identity from google.appengine.api i...
[ 11748, 269, 12397, 198, 11748, 1841, 489, 571, 198, 11748, 3992, 1324, 17, 198, 198, 6738, 764, 1330, 6518, 198, 6738, 764, 1330, 24061, 198, 6738, 764, 1330, 4049, 198, 6738, 764, 1330, 3504, 1574, 198, 6738, 764, 1330, 2746, 198, 67...
3.053913
575
YELLOW = '\x1b[33m' GREEN = '\x1b[32m' RED = '\x1b[31m' MAGENTA = '\x1b[35m' RESET_COLOR = '\x1b[0m'
[ 56, 23304, 3913, 796, 705, 59, 87, 16, 65, 58, 2091, 76, 6, 198, 43016, 796, 705, 59, 87, 16, 65, 58, 2624, 76, 6, 198, 22083, 796, 705, 59, 87, 16, 65, 58, 3132, 76, 6, 198, 45820, 3525, 32, 796, 705, 59, 87, 16, 65, 58, ...
1.507463
67
from mrp import process_def import pytest
[ 6738, 285, 81, 79, 1330, 1429, 62, 4299, 198, 11748, 12972, 9288, 628 ]
3.307692
13
import testlib fee = 20 initialsend = 200000 capacity = 1000000
[ 11748, 1332, 8019, 198, 198, 39071, 796, 1160, 198, 36733, 21280, 796, 939, 830, 198, 42404, 796, 1802, 2388, 198 ]
3.25
20
from django.test import TestCase from django.contrib.auth import get_user_model
[ 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 651, 62, 7220, 62, 19849, 628 ]
3.375
24
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
[ 2, 15069, 2177, 383, 309, 22854, 37535, 46665, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, ...
2.920559
5,866
from collections import defaultdict import json # Utillity to convert raw coefficient files to more useful formats. # Outputs both json file and python file (mapping represented as python dict) # fmt: off files = [ # format is (input_name, output_name) ("C2110H2R", "2018_v21"), ("C2214O5P", "2018_v22"), ...
[ 6738, 17268, 1330, 4277, 11600, 198, 11748, 33918, 198, 198, 2, 7273, 359, 414, 284, 10385, 8246, 35381, 3696, 284, 517, 4465, 17519, 13, 198, 2, 25235, 82, 1111, 33918, 2393, 290, 21015, 2393, 357, 76, 5912, 7997, 355, 21015, 8633, 8...
2.474836
457
"""Reader application to read log entries in real time from server""" import time import json import logging import argparse import sys import socketio from socketio.exceptions import ConnectionError as SocketConnectionError from decentralized_logger import setup_logging, disable_loggers, parse_logging_format DISABL...
[ 37811, 33634, 3586, 284, 1100, 2604, 12784, 287, 1103, 640, 422, 4382, 37811, 198, 198, 11748, 640, 198, 11748, 33918, 198, 11748, 18931, 198, 11748, 1822, 29572, 198, 11748, 25064, 198, 11748, 17802, 952, 198, 6738, 17802, 952, 13, 1069,...
2.562954
826
''' author : https://github.com/Harnek''' a = [[1, 2, 3, 4], [5, 6, 7, 8], [9,10,11,12], [13,14,15,16],] r = 4 c = 4 #Diagonally Up ''' 1 5 2 9 6 3 13 10 7 4 14 11 8 15 12 16 ''' for i in range(r + c - 1): k1 = 0 if i < c else i - c + 1 k2 = 0 if i < r else i - r + 1 for j in range(...
[ 7061, 6, 198, 9800, 1058, 3740, 1378, 12567, 13, 785, 14, 13587, 710, 74, 7061, 6, 198, 198, 64, 796, 16410, 16, 11, 362, 11, 513, 11, 604, 4357, 198, 220, 220, 220, 220, 685, 20, 11, 718, 11, 767, 11, 807, 4357, 198, 220, 220...
1.893401
591
from importlib import import_module import os import sys import click from .core import ( generate_url, create_xml_url ) XML_HEADER = """<?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"...
[ 6738, 1330, 8019, 1330, 1330, 62, 21412, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 11748, 3904, 198, 198, 6738, 764, 7295, 1330, 357, 198, 220, 220, 220, 7716, 62, 6371, 11, 198, 220, 220, 220, 2251, 62, 19875, 62, 6371, 198, ...
2.247191
623
from zzcore import StdAns, mysakuya import requests from config import LOLIKEY
[ 6738, 1976, 89, 7295, 1330, 520, 67, 2025, 82, 11, 616, 82, 29863, 198, 11748, 7007, 198, 198, 6738, 4566, 1330, 35513, 40, 20373, 628, 198 ]
3.153846
26
""" Locus-based Genetic Algorithm (LGA) @auth: Yu-Hsiang Fu @date: 2016/04/28 @update: 2018/03/26 """ # -------------------------------------------------------------------------------- # 1.Import modular # -------------------------------------------------------------------------------- # import modular impo...
[ 37811, 201, 198, 43, 10901, 12, 3106, 42295, 978, 42289, 357, 43, 9273, 8, 201, 198, 201, 198, 31, 18439, 25, 10605, 12, 39, 13396, 648, 13333, 201, 198, 31, 4475, 25, 1584, 14, 3023, 14, 2078, 201, 198, 31, 19119, 25, 2864, 14, ...
3.830018
553
from tilapia.lib.provider.chains.bch.provider import BCHProvider from tilapia.lib.provider.chains.btc.clients.blockbook import BlockBook # noqa
[ 6738, 21502, 499, 544, 13, 8019, 13, 15234, 1304, 13, 38861, 13, 65, 354, 13, 15234, 1304, 1330, 347, 3398, 29495, 198, 6738, 21502, 499, 544, 13, 8019, 13, 15234, 1304, 13, 38861, 13, 18347, 66, 13, 565, 2334, 13, 9967, 2070, 1330,...
2.9
50