content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import io import os import sys import toml import click import pprint import importlib import webbrowser from pathlib import Path from dynaconf import default_settings from dynaconf import constants from dynaconf.validator import Validator from dynaconf.utils.parse_conf import parse_conf_data from dotenv import cli as ...
[ 11748, 33245, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 284, 4029, 198, 11748, 3904, 198, 11748, 279, 4798, 198, 11748, 1330, 8019, 198, 11748, 3992, 40259, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 37860, 7807, 69, 1330, 427...
2.175821
6,700
"""Define a data buffer for contextual bandit algorithms.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np class ContextualDataset(object): """The buffer is able to append new data, and sample random minibatches.""" def __ini...
[ 37811, 7469, 500, 257, 1366, 11876, 329, 38356, 4097, 270, 16113, 526, 15931, 198, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 1...
2.331965
2,193
"""Add quiz_game_setups Table Revision ID: 822caa87a652 Revises: 3b809ceaf543 Create Date: 2021-06-26 11:48:17.948434 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '822caa87a652' down_revision = '3b809ceaf543' branch_labels = None depends_on = None
[ 37811, 4550, 38964, 62, 6057, 62, 2617, 4739, 8655, 198, 198, 18009, 1166, 4522, 25, 807, 1828, 6888, 64, 5774, 64, 43193, 198, 18009, 2696, 25, 513, 65, 34583, 344, 1878, 20, 3559, 198, 16447, 7536, 25, 33448, 12, 3312, 12, 2075, 1...
2.496
125
# -*- coding: utf-8 -*- from ..routes import Routes from .base import * __all__ = ( 'EmojiWrapper', ) class EmojiWrapper(EndpointsWrapper): """A higher-level wrapper around Emoji endpoints. .. seealso:: Emoji endpoints https://discordapp.com/developers/docs/resources/emoji """
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 11485, 81, 448, 274, 1330, 39602, 274, 198, 6738, 764, 8692, 1330, 1635, 198, 198, 834, 439, 834, 796, 357, 198, 220, 220, 220, 705, 36, 5908, 7285, 36918, ...
2.646018
113
import re import functools from modularodm import Q from rest_framework.filters import OrderingFilter from rest_framework import serializers as ser class ODMOrderingFilter(OrderingFilter): """Adaptation of rest_framework.filters.OrderingFilter to work with modular-odm.""" # override query_pattern = re.comp...
[ 11748, 302, 198, 11748, 1257, 310, 10141, 198, 198, 6738, 26507, 375, 76, 1330, 1195, 198, 6738, 1334, 62, 30604, 13, 10379, 1010, 1330, 8284, 278, 22417, 198, 6738, 1334, 62, 30604, 1330, 11389, 11341, 355, 1055, 628, 198, 4871, 440, ...
2.688707
1,709
import pygame import pygame_gui import engine.app from engine.math import Vector import engine.math ############################
[ 11748, 12972, 6057, 198, 11748, 12972, 6057, 62, 48317, 198, 198, 11748, 3113, 13, 1324, 198, 198, 6738, 3113, 13, 11018, 1330, 20650, 198, 11748, 3113, 13, 11018, 628, 197, 14468, 7804, 4242, 198 ]
3.911765
34
from scripta import cast_recorder from scripta import scripta from unittest import IsolatedAsyncioTestCase from unittest.mock import patch import asyncio import tdir
[ 6738, 4226, 64, 1330, 3350, 62, 8344, 2875, 198, 6738, 4226, 64, 1330, 4226, 64, 198, 6738, 555, 715, 395, 1330, 1148, 50027, 42367, 952, 14402, 20448, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 8529, 198, 11748, 30351, 952, 198, ...
3.574468
47
# All rights reserved by forest fairy. # You cannot modify or share anything without sacrifice. # If you don't agree, keep calm and don't look at code bellow! __author__ = "VirtualV <https://github.com/virtualvfix>" __date__ = "12/18/2017 4:43 PM" from config import CONFIG from libs.core.tools.utility import Utility ...
[ 2, 1439, 2489, 10395, 416, 8222, 25607, 13, 198, 2, 921, 2314, 13096, 393, 2648, 1997, 1231, 11728, 13, 198, 2, 1002, 345, 836, 470, 4236, 11, 1394, 9480, 290, 836, 470, 804, 379, 2438, 8966, 322, 0, 198, 198, 834, 9800, 834, 796,...
1.706671
3,133
from scraper import * s = Scraper(start=57024, end=58805, max_iter=30, scraper_instance=32) s.scrape_letterboxd()
[ 6738, 19320, 525, 1330, 1635, 220, 198, 82, 796, 1446, 38545, 7, 9688, 28, 39254, 1731, 11, 886, 28, 3365, 28256, 11, 3509, 62, 2676, 28, 1270, 11, 19320, 525, 62, 39098, 28, 2624, 8, 220, 198, 82, 13, 1416, 13484, 62, 9291, 3524,...
2.5
46
# encoding: utf-8 from Storm.Localized import Strings as LocalizedStrings from Storm.GameData import Catalog from Storm.DepotIndex import DepotIndex from Storm.DepotCataFile import DepotCataFile, TYPE_NONE, TYPE_PRODUCTS, TYPE_LICENSES from sys import argv from os.path import exists if __name__ != '__main__': ...
[ 2, 21004, 25, 3384, 69, 12, 23, 201, 198, 6738, 8865, 13, 14565, 1143, 1330, 4285, 654, 355, 10714, 1143, 13290, 654, 201, 198, 6738, 8865, 13, 8777, 6601, 1330, 44515, 201, 198, 6738, 8865, 13, 12156, 313, 15732, 1330, 30884, 15732, ...
2.433725
1,275
""" Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 """ OPTIONS_DEFAULT_DIRECTED = { "nodes": { "borderWidthSelected": 0, "borderWidth": 0, "color": { "background": "rgba(210, 229, 255, 1)", "border": "transparen...
[ 37811, 198, 15269, 6186, 13, 785, 11, 3457, 13, 393, 663, 29116, 13, 1439, 6923, 33876, 13, 198, 4303, 36227, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 198, 37811, 198, 198, 3185, 51, 11053, 62, 7206, 38865, 62, 17931, ...
1.949778
1,354
# shell game import sys, os, time, random, math relFold = '../../../' sys.path.append(relFold+'module') import sabr sabrUnroll()
[ 2, 7582, 983, 198, 198, 11748, 25064, 11, 28686, 11, 640, 11, 4738, 11, 10688, 198, 2411, 37, 727, 796, 705, 40720, 40720, 40720, 6, 198, 17597, 13, 6978, 13, 33295, 7, 2411, 37, 727, 10, 6, 21412, 11537, 198, 11748, 17463, 81, 19...
2.54902
51
class ExternalResourceType(GuidEnum): """ A type class used to distinguish between different kinds of external resource. ExternalResourceType(guid: Guid) """ @staticmethod def __new__(self, guid): """ __new__(cls: type,guid: Guid) """ pass
[ 4871, 34579, 26198, 6030, 7, 8205, 312, 4834, 388, 2599, 201, 198, 220, 220, 220, 37227, 201, 198, 317, 2099, 1398, 973, 284, 15714, 1022, 1180, 6982, 286, 7097, 8271, 13, 201, 198, 201, 198, 220, 201, 198, 201, 198, 34579, 26198, 6...
2.557522
113
import streamlit as st import glob import json from podcasts import pipeline from threading import Thread st.title("Podcast Summaries") json_files = glob.glob('*.json') episode_id = st.sidebar.text_input("Episode ID") button = st.sidebar.button("Download Episode summary") if button and episode_id: st.sidebar.wr...
[ 11748, 4269, 18250, 355, 336, 198, 11748, 15095, 198, 11748, 33918, 198, 6738, 31969, 1330, 11523, 198, 6738, 4704, 278, 1330, 14122, 198, 198, 301, 13, 7839, 7203, 47, 7107, 5060, 76, 3166, 4943, 198, 198, 17752, 62, 16624, 796, 15095,...
2.674627
335
""" Reproduce the standard glob package behaviour but use TSystem to be able to query remote file systems such as xrootd """ from __future__ import print_function from rootpy.ROOT import gSystem import glob as gl import os.path import fnmatch __all__ = ["glob", "iglob"] if __name__ == "__main__": test_paths...
[ 37811, 198, 6207, 2076, 344, 262, 3210, 15095, 5301, 9172, 475, 779, 309, 11964, 284, 307, 1498, 284, 198, 22766, 6569, 2393, 3341, 884, 355, 2124, 15763, 67, 198, 37811, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, ...
2.045455
880
#!/usr/bin/env python from distutils.core import setup from glob import glob from setuptools import find_packages setup(name='Fibonacci', version='1.0', description='Python Distribution Utilities', author='Kevin Chen', packages=find_packages('src'), package_dir={'': 'src'}, py_mo...
[ 198, 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 1233, 26791, 13, 7295, 1330, 9058, 198, 6738, 15095, 1330, 15095, 198, 198, 6738, 900, 37623, 10141, 1330, 1064, 62, 43789, 198, 198, 40406, 7, 3672, 11639, 37, 571, 26...
2.648649
148
""" This file is part of the tagup Python module which is released under MIT. See file LICENSE for full license details. """
[ 37811, 198, 1212, 2393, 318, 636, 286, 262, 7621, 929, 11361, 8265, 543, 318, 2716, 739, 17168, 13, 198, 6214, 2393, 38559, 24290, 329, 1336, 5964, 3307, 13, 198, 37811, 198 ]
4.032258
31
import torch import torch.nn as nn import torch.nn.functional as F from models.pct_utils import TDLayer, TULayer, PTBlock, TRBlock
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 6738, 4981, 13, 79, 310, 62, 26791, 1330, 13320, 49925, 11, 309, 6239, 2794, 11, 19310, 12235, 11, 7579, 12235, 628, 628...
3.190476
42
# Copyright 2019 The Kubeflow Authors # # 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...
[ 2, 15069, 13130, 383, 24921, 891, 9319, 46665, 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, 198, ...
2.600202
1,976
from unittest import TestCase from ..nbbase import ( NotebookNode, new_code_cell, new_text_cell, new_worksheet, new_notebook, new_output, new_author, new_metadata, new_heading_cell, nbformat )
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 198, 6738, 11485, 46803, 8692, 1330, 357, 198, 220, 220, 220, 5740, 2070, 19667, 11, 198, 220, 220, 220, 649, 62, 8189, 62, 3846, 11, 649, 62, 5239, 62, 3846, 11, 649, 62, 5225, 25473, ...
2.688312
77
# -*- coding: utf-8 -*- # 新規注文後、一定時間経ってもオーダーが残っている場合に # 処理を続行するか否か ORDER_IGNORE_TIMEOUT = True # 注文完了待ち確認間隔 ORDER_EXECUTED_RETRY_INTERVAL = 2 # 注文完了待ち確認回数 ORDER_EXECUTED_RETRY = 40 # クローズ済みトレード取得時の許容時間誤差 [s] TIME_ERROR_ALLOW = 3 # API呼び出しリトライ数 RETRY_API_CALL = 10 API_URI = 'https://api.liquid.com' API_USER_AGENT ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 10545, 244, 108, 17358, 237, 37345, 101, 23877, 229, 36181, 234, 23513, 31660, 22522, 248, 162, 25081, 38461, 241, 163, 113, 234, 33180, 28134, 43266, 20513, 12045...
1.859603
755
#!/usr/bin/env python2 # -*- coding: utf-8 -*- #!/usr/bin/env python2 # -*- coding: utf-8 -*- # ---------------------------------------------------------------------------------------------------------------------- # ROS-MAGNA # -----------------------------------------------------------------------------------------...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 17, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 17, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9...
3.847267
622
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 11, 15720, 602, 628 ]
2.891892
37
"""Class defintion for BaseFeaturizeViaLambda abstract class.""" from typing import Callable import pandas as pd from .base_featurizer import BaseFeaturizer class BaseFeaturizerViaLambda(BaseFeaturizer): """ Abstract class to create secondary featurization via a custom function. Attributes: _c...
[ 37811, 9487, 825, 600, 295, 329, 7308, 14304, 2541, 1096, 30754, 43, 4131, 6814, 12531, 1398, 526, 15931, 198, 198, 6738, 19720, 1330, 4889, 540, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 764, 8692, 62, 5036, 2541, 75...
2.436455
598
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import sys if __name__ == '__main__': A = tuple(map(int, input().split())) print('максимальный элемент имеет номер ', A.index(max(A))) zero_1 = zero_2 = -1 for i, item in enumerate(A): if (item == 0) and (zero_1 != -1) and (zero_2 == -...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 201, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 201, 198, 11748, 25064, 201, 198, 201, 198, 201, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834...
1.534562
434
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Sep 14 08:29:23 2017 @author: davidpvilaca """ import matplotlib.pyplot as plt import cv2 img1 = cv2.imread('vermelho3.jpg') img1_hsv = cv2.cvtColor(img1, cv2.COLOR_BGR2HSV) i = img1_hsv[:,:, 0] < 30 img1_hsv[i, 0] += 30 i = img1_hsv[:,:, 0] > 150 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, 37811, 198, 41972, 319, 26223, 8621, 1478, 8487, 25, 1959, 25, 1954, 2177, 198, 198, 31, 9800, 25, 21970, 79, 299...
1.942953
298
from itertools import chain from collections import OrderedDict import os.path from typing import Tuple from argparse import Namespace from tabulate import tabulate from termcolor import colored as clr import numpy as np import torch from torch import Tensor from torch import nn import torch.nn.functional as F from tor...
[ 6738, 340, 861, 10141, 1330, 6333, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 11748, 28686, 13, 6978, 198, 6738, 19720, 1330, 309, 29291, 198, 6738, 1822, 29572, 1330, 28531, 10223, 198, 6738, 7400, 5039, 1330, 7400, 5039, 198, ...
2.890957
376
import numpy as np import h5py import scisoftpy as dnp from time import sleep from math import cos, sin print("Starting") data = h5py.File('/dls/tmp/ssg37927/31_processed_160905_141219.nxs','r')['entry/result/data'] angles = h5py.File('/dls/tmp/ssg37927/31_processed_160905_141219.nxs','r')['entry/result/Angle'] fram...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 289, 20, 9078, 198, 11748, 629, 29719, 9078, 355, 288, 37659, 198, 6738, 640, 1330, 3993, 198, 6738, 10688, 1330, 8615, 11, 7813, 198, 198, 4798, 7203, 22851, 4943, 198, 198, 7890, 796, 289, ...
2.119883
684
# -*- coding: utf-8 -*- import csv import torch import torch.utils.data as tud from torch.nn.utils.rnn import pad_sequence TRAIN_DATA_PATH = './data/data_with_slots_intent_train.csv' DEV_DATA_PATH = './data/data_with_slots_intent_dev.csv' SLOT_PATH = './data/slot_maping.csv' INTENT_PATH = './data/intent_maping.csv' BA...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 269, 21370, 198, 11748, 28034, 198, 11748, 28034, 13, 26791, 13, 7890, 355, 256, 463, 198, 6738, 28034, 13, 20471, 13, 26791, 13, 81, 20471, 1330, 14841, 62, 4316...
2.022694
1,366
from __future__ import print_function from glob2 import glob import pandas as pd import os from pdb import set_trace head = """ [home](http://tiny.cc/sbse) | [models](xx) | [data](xx) | [discuss](https://github.com/ai-se/ResourcesDataDrivenSBSE/issues) | [citation](https://github.com/ai-se/ResourcesDataDrivenSBSE/blo...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 15095, 17, 1330, 15095, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 28686, 198, 6738, 279, 9945, 1330, 900, 62, 40546, 198, 198, 2256, 796, 37227, 198, 198, 58, 11195, 16...
2.524793
484
import feedparser import csv import json #import pandas as pd from urllib.request import urlopen from bs4 import BeautifulSoup query="engineer" extract(query)
[ 11748, 3745, 48610, 198, 11748, 269, 21370, 198, 11748, 33918, 198, 2, 11748, 19798, 292, 355, 279, 67, 198, 6738, 2956, 297, 571, 13, 25927, 1330, 19016, 9654, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 220, 198, 220, 198, ...
2.847458
59
import logging import asyncio import pathlib import uuid from functools import wraps from typing import Callable, Any, Union, List from bleak.backends.device import BLEDevice from bleak.backends.dotnet.utils import BleakDataReader from bleak.exc import BleakError, BleakDotNetTaskError from bleak.backends.scanner impor...
[ 11748, 18931, 198, 11748, 30351, 952, 198, 11748, 3108, 8019, 198, 11748, 334, 27112, 198, 6738, 1257, 310, 10141, 1330, 27521, 198, 6738, 19720, 1330, 4889, 540, 11, 4377, 11, 4479, 11, 7343, 198, 198, 6738, 30942, 13, 1891, 2412, 13, ...
2.934141
1,898
from super_gradients.training.datasets.detection_datasets.detection_dataset import DetectionDataSet from super_gradients.training.datasets.datasets_conf import COCO_DETECTION_CLASSES_LIST class COCODetectionDataSet(DetectionDataSet): """ COCODetectionDataSet - Detection Data Set Class COCO Data Set """
[ 6738, 2208, 62, 9744, 2334, 13, 34409, 13, 19608, 292, 1039, 13, 15255, 3213, 62, 19608, 292, 1039, 13, 15255, 3213, 62, 19608, 292, 316, 1330, 46254, 6601, 7248, 198, 6738, 2208, 62, 9744, 2334, 13, 34409, 13, 19608, 292, 1039, 13, ...
2.944444
108
import unittest import uuid import requests SERVICE_URL = 'http://localhost:8080' if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 11748, 334, 27112, 198, 198, 11748, 7007, 198, 198, 35009, 27389, 62, 21886, 796, 705, 4023, 1378, 36750, 25, 1795, 1795, 6, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220,...
2.627451
51
import json from src.user.use_cases import UserUseCase from src.user.schemas import UserSchema from abc import ABC, abstractmethod from src.containers import Services
[ 11748, 33918, 198, 6738, 12351, 13, 7220, 13, 1904, 62, 33964, 1330, 11787, 11041, 20448, 198, 6738, 12351, 13, 7220, 13, 1416, 4411, 292, 1330, 11787, 27054, 2611, 198, 6738, 450, 66, 1330, 9738, 11, 12531, 24396, 198, 6738, 12351, 13,...
3.617021
47
from ..dao import axis_dao from .controllers import controllers_service motion_service = MotionService()
[ 6738, 11485, 67, 5488, 1330, 16488, 62, 67, 5488, 198, 6738, 764, 3642, 36667, 1330, 20624, 62, 15271, 628, 198, 198, 38714, 62, 15271, 796, 20843, 16177, 3419, 198 ]
3.724138
29
import unittest from py_CLI_menus.int_return_menu import IntReturnMenu
[ 11748, 555, 715, 395, 198, 6738, 12972, 62, 5097, 40, 62, 3653, 385, 13, 600, 62, 7783, 62, 26272, 1330, 2558, 13615, 23381, 198 ]
2.958333
24
# Generated by Django 3.2.4 on 2021-09-19 22:33 from django.db import migrations, models import django.db.models.deletion import smartMoney_app.models
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 19, 319, 33448, 12, 2931, 12, 1129, 2534, 25, 2091, 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.942308
52
# # databases.py # Start of dataabases.py # # Created by FOSS-X UDAPI Desgin Team on 7/05/20. # Copyright © 2020 FOSS-X. All rights reserved. # from flask import Flask, jsonify, request,Blueprint from ..util_mongodb import * from ..util import * from ..util_mysql import * import pymongo mod = Blueprint(...
[ 2, 220, 198, 2, 220, 220, 20083, 13, 9078, 198, 2, 220, 220, 7253, 286, 1366, 18826, 13, 9078, 198, 2, 198, 2, 220, 220, 15622, 416, 376, 18420, 12, 55, 43700, 17614, 2935, 1655, 4816, 319, 767, 14, 2713, 14, 1238, 13, 198, 2, ...
2.511384
571
from __future__ import print_function import os import tensorflow import saver
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 28686, 198, 11748, 11192, 273, 11125, 198, 198, 11748, 473, 332, 628 ]
3.565217
23
from nose.tools import assert_raises from syn.tagmathon.b import Frame, Env, eval #------------------------------------------------------------------------------- # Frame #------------------------------------------------------------------------------- # Env #----------------------------------------------------------...
[ 6738, 9686, 13, 31391, 1330, 6818, 62, 430, 2696, 198, 6738, 6171, 13, 12985, 11018, 261, 13, 65, 1330, 25184, 11, 2039, 85, 11, 5418, 198, 198, 2, 10097, 24305, 198, 2, 25184, 198, 198, 2, 10097, 24305, 198, 2, 2039, 85, 198, 198...
5.095652
115
''' @author: kaicai.hu ''' import unittest import tempfile from kvmagent import kvmagent from kvmagent.plugins import vm_plugin from zstacklib.utils import bash if __name__ == "__main__": unittest.main()
[ 7061, 6, 198, 198, 31, 9800, 25, 479, 18452, 1872, 13, 13415, 198, 7061, 6, 198, 198, 11748, 555, 715, 395, 198, 11748, 20218, 7753, 198, 6738, 479, 14761, 25781, 1330, 479, 14761, 25781, 198, 6738, 479, 14761, 25781, 13, 37390, 1330,...
2.763158
76
import os import math import numpy as np import matplotlib.pyplot as plt import matplotlib.animation as animation from matplotlib.ticker import FuncFormatter, MultipleLocator from scipy import integrate # total time base_time = 4.0 pause_time = 1.5 total_time = base_time + pause_time # fig fig, ax = plt.subplots() #...
[ 11748, 28686, 198, 11748, 10688, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 2603, 29487, 8019, 13, 11227, 341, 355, 11034, 198, 6738, 2603, 29487, 8019, 13, 83, 15799, 1...
2.646778
419
import spidev import os spi = spidev.SpiDev() spi.open(0,0) print("Yay")
[ 11748, 599, 485, 85, 198, 11748, 28686, 198, 198, 2777, 72, 796, 599, 485, 85, 13, 4561, 72, 13603, 3419, 198, 2777, 72, 13, 9654, 7, 15, 11, 15, 8, 198, 198, 4798, 7203, 56, 323, 4943, 198 ]
1.973684
38
#!/usr/bin/env python3 #I mainly followed this post https://ruslanspivak.com/lsbasi-part7/ #Lexer #Tokenize the inputs #Token type PLUS MUL MINUS INTEGER import sys sys.tracebacklimit=0 #String representation for debugging just in case #lexer #advance to the next character #skipping white spaces #multiple digi...
[ 198, 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 40, 8384, 3940, 428, 1281, 3740, 1378, 14932, 75, 504, 79, 452, 461, 13, 785, 14, 7278, 12093, 72, 12, 3911, 22, 14, 198, 2, 45117, 263, 198, 2, 30642, 1096, 262...
3.053628
317
# -*- coding: utf-8 -*- import logging as log import os from OpenGL.GL import * import cyglfw3 as glfw
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 18931, 355, 2604, 198, 11748, 28686, 198, 198, 6738, 30672, 13, 8763, 1330, 1635, 198, 198, 11748, 3075, 70, 1652, 86, 18, 355, 1278, 44482, 198 ]
2.560976
41
############################################################################### # dice box ############################################################################### import cv import cv2 from datetime import datetime import json import requests import os import numpy import math from lib import dicebox_config as c...
[ 29113, 29113, 7804, 4242, 21017, 198, 2, 17963, 3091, 198, 29113, 29113, 7804, 4242, 21017, 198, 11748, 269, 85, 198, 11748, 269, 85, 17, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 33918, 198, 11748, 7007, 198, 11748, 28686, 1...
2.525424
3,245
# Licensed to Elasticsearch B.V under one or more agreements. # Elasticsearch B.V licenses this file to you under the Apache 2.0 License. # See the LICENSE file in the project root for more information from eland.operations import Operations
[ 2, 49962, 284, 48567, 12947, 347, 13, 53, 739, 530, 393, 517, 11704, 13, 198, 2, 48567, 12947, 347, 13, 53, 16625, 428, 2393, 284, 345, 739, 262, 24843, 362, 13, 15, 13789, 13, 198, 2, 4091, 262, 38559, 24290, 2393, 287, 262, 1628...
4.083333
60
import os,sys, math, numpy as np, itertools from matplotlib.patches import Patch import matplotlib.pyplot as plt from pylab import * import src.utilities as utils config = utils.read_config() mpl.rcParams.update(mpl.rcParamsDefault) # VS Code plots not black plt.style.use(config['viz']) infile='dist.dat' #First ...
[ 11748, 28686, 11, 17597, 11, 10688, 11, 299, 32152, 355, 45941, 11, 340, 861, 10141, 198, 6738, 2603, 29487, 8019, 13, 8071, 2052, 1330, 17106, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 279, 2645, 397, 1...
2.178995
1,095
import numpy as np import xarray as xr
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2124, 18747, 355, 2124, 81, 628, 628, 198 ]
2.866667
15
import pygame from pygame.locals import * import math from . import * #from .functions import * #from .constants import *
[ 11748, 12972, 6057, 198, 6738, 12972, 6057, 13, 17946, 874, 1330, 1635, 198, 11748, 10688, 198, 198, 6738, 764, 1330, 1635, 198, 2, 6738, 764, 12543, 2733, 1330, 1635, 198, 2, 6738, 764, 9979, 1187, 1330, 1635, 198 ]
3.236842
38
from profit.dataset.preprocessing import mol_feats from profit.dataset.preprocessing import mutator from profit.dataset.preprocessing import seq_feats from profit.dataset.preprocessing.mol_feats import construct_adj_matrix from profit.dataset.preprocessing.mol_feats import construct_mol_features from profit.dataset.pr...
[ 6738, 7630, 13, 19608, 292, 316, 13, 3866, 36948, 1330, 18605, 62, 5036, 1381, 198, 6738, 7630, 13, 19608, 292, 316, 13, 3866, 36948, 1330, 4517, 1352, 198, 6738, 7630, 13, 19608, 292, 316, 13, 3866, 36948, 1330, 33756, 62, 5036, 1381...
3.385593
236
# Copyright 2020 Neal Lathia # # 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 agre...
[ 2, 220, 220, 220, 15069, 12131, 29189, 406, 776, 544, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 220, 220, 220, 345, 743, 407, 779, 428, 2393, 2845, ...
2.786571
417
from game_hero.main_game import HeroGame def test_start_game(): """ Tests output of the game as string """ game_instance = HeroGame() game_output = game_instance.start_game() assert isinstance(game_output, str), "Output of the game is not string!" def test_game_instance(): """ Tests ...
[ 6738, 983, 62, 11718, 13, 12417, 62, 6057, 1330, 8757, 8777, 628, 198, 4299, 1332, 62, 9688, 62, 6057, 33529, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 30307, 5072, 286, 262, 983, 355, 4731, 198, 220, 220, 220, 37227, 198, 220,...
3.156627
166
# -*- coding: utf-8 -*- """ Created on Mon Mar 4 23:15:21 2019 @author: erikh """ # -*- coding: utf-8 -*- """ Created on Mon Mar 4 21:15:45 2019 @author: erikh """ # Data Preprocessing Template """ """ # Importing the libraries import numpy as np import matplotlib.pyplot as plt import pandas...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 41972, 319, 2892, 1526, 220, 604, 2242, 25, 1314, 25, 2481, 13130, 201, 198, 201, 198, 31, 9800, 25, 1931, 13848, 201, 198, 37811, 201, 198, 201,...
2.091684
3,283
import os import re import shutil import sys import stat import time import subprocess import glob from appionlib import apDisplay from appionlib import apParam from pyami import imagic2mrc #====================== #====================== #====================== def executeImagicBatchFile(filename, showcmd=True, ve...
[ 11748, 28686, 198, 11748, 302, 198, 11748, 4423, 346, 198, 11748, 25064, 198, 11748, 1185, 198, 11748, 640, 198, 11748, 850, 14681, 198, 11748, 15095, 198, 6738, 598, 295, 8019, 1330, 2471, 23114, 198, 6738, 598, 295, 8019, 1330, 2471, ...
2.380165
3,993
# Generated by Django 3.1.4 on 2020-12-21 11:36 from django.conf import settings from django.db import migrations, models import django.db.models.deletion def set_edited_by(apps, schema_editor): """将修改人设置为录入人""" Item = apps.get_model("storage", "Item") for item in Item.objects.all(): item.edited_...
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 19, 319, 12131, 12, 1065, 12, 2481, 1367, 25, 2623, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14...
2.308
250
# coding=utf-8 """ @desc: 国际象棋中的皇后比中国象棋里的大车还厉害,皇后能横向,纵向和斜向移动,在这三条线上的其他棋子都可以被吃掉。 所谓八皇后问题就是:将八位皇后放在一张8x8的棋盘上,使得每位皇后都无法吃掉别的皇后,(即任意两个皇后都不在同一条横线, 竖线和斜线上),问一共有多少种摆法。此问题是在1848年由棋手马克思·贝瑟尔提出的,后面陆续有包括高斯等大数学家们给出 自己的思考和解法,所以此问题不只是有年头了,简直比82年的拉菲还有年头,我们今天不妨尝尝这老酒。 @author: huijz @version 0.1 @date 2020-08-31 @email huijz8117@gmail.co...
[ 2, 19617, 28, 40477, 12, 23, 198, 37811, 198, 31, 20147, 25, 198, 32368, 121, 165, 247, 227, 164, 109, 94, 162, 96, 233, 40792, 21410, 19021, 229, 28938, 236, 162, 107, 242, 40792, 32368, 121, 164, 109, 94, 162, 96, 233, 34932, 23...
0.74141
553
N = int(input()) ans = 0 K = 100 for i in range(N): for j in range(N): a, b = i * 2 * K, (i + 1) * 2 * K c, d = j * 2 * K, (j + 1) * 2 * K if in_(a, c) and in_(a, d) and in_(b, c) and in_(b, d): ans += 1 print(ans)
[ 198, 45, 796, 493, 7, 15414, 28955, 198, 504, 796, 657, 198, 42, 796, 1802, 198, 1640, 1312, 287, 2837, 7, 45, 2599, 198, 220, 220, 220, 329, 474, 287, 2837, 7, 45, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 257, 11, 275, 7...
1.765517
145
from flask import Blueprint gee_gateway = Blueprint('gee_gateway', __name__, template_folder='templates', static_folder='static', static_url_path='/static/gee_gateway') from . import gee, web
[ 6738, 42903, 1330, 39932, 198, 198, 29622, 62, 10494, 1014, 796, 39932, 10786, 29622, 62, 10494, 1014, 3256, 11593, 3672, 834, 11, 11055, 62, 43551, 11639, 11498, 17041, 3256, 9037, 62, 43551, 11639, 12708, 3256, 9037, 62, 6371, 62, 6978,...
3.288136
59
# -*- coding: utf-8 -*- import random import numpy as np import time import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F from torch.autograd import Variable import os import csv """ NOT USED. leaky_relu사용. Pred 값이 - ~ +가 나옴 real target value is only 0 or 1 value """ ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 4738, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 640, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 40085, 355, ...
2.132231
968
from discord.ext import commands from Bot.utils.staff.staff_checks import * from main import main_db from pathlib import Path from config import prefixes users = main_db["users"] blacklisted_files = ["shutdown", "start", "reload"]
[ 6738, 36446, 13, 2302, 1330, 9729, 198, 6738, 18579, 13, 26791, 13, 28120, 13, 28120, 62, 42116, 1330, 1635, 198, 6738, 1388, 1330, 1388, 62, 9945, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 4566, 1330, 21231, 274, 198, 18417, 796, ...
3.530303
66
# pyright: reportUnusedClass=false from __future__ import annotations from dataclasses import dataclass from typing import Any, Iterator, Optional, TypeVar import pytest from antidote import implements, inject, injectable, interface, world from antidote.lib.injectable import register_injectable_provider from antidot...
[ 2, 279, 4766, 25, 989, 3118, 1484, 9487, 28, 9562, 198, 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 6738, 19720, 1330, 4377, 11, 40806, 1352, 11, 32233, 11, 5994, 19852, 198, 19...
3.482759
145
# -*- coding: utf-8 -*- # $Id: webservergluecgi.py $ """ Test Manager Core - Web Server Abstraction Base Class. """ __copyright__ = \ """ Copyright (C) 2012-2015 Oracle Corporation This file is part of VirtualBox Open Source Edition (OSE), as available from http://www.virtualbox.org. This file is free software; you ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 720, 7390, 25, 2639, 18497, 4743, 518, 37157, 13, 9078, 720, 198, 198, 37811, 198, 14402, 9142, 7231, 532, 5313, 9652, 2275, 301, 7861, 7308, 5016, 13, 198, 37811, ...
3.389021
419
# Copyright 2018-2021 Xanadu Quantum Technologies Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or...
[ 2, 15069, 2864, 12, 1238, 2481, 47482, 324, 84, 29082, 21852, 3457, 13, 198, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, ...
1.964622
10,741
#!/usr/bin/env python # # Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 2, 15069, 2177, 3012, 3457, 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, ...
3.052349
745
from .settings import * # DATABASES = { # 'default': { # 'ENGINE': 'django.db.backends.postgresql_psycopg2', # 'NAME': 'djadyen', # 'USERNAME': 'djadyen', # 'PASSWORD': 'djadyen', # } # }
[ 6738, 764, 33692, 1330, 1635, 198, 198, 2, 360, 1404, 6242, 1921, 1546, 796, 1391, 198, 2, 220, 220, 220, 220, 705, 12286, 10354, 1391, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 705, 26808, 8881, 10354, 705, 28241, 14208, 13, ...
1.832
125
import random import torch from torch import nn import torch.nn.functional as F
[ 11748, 4738, 198, 198, 11748, 28034, 198, 6738, 28034, 1330, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 628 ]
3.727273
22
# Zaimplementować funkcję remove_duplicates(txt: str) -> str, która zwróci wartość parametru txt pozbawioną sąsiadujących duplikujących się znaków. Przykład: XXYZZZ -> XYZ print(remove_duplicates("XXYZZ"))
[ 2, 1168, 1385, 26908, 8455, 38325, 46212, 66, 73, 128, 247, 4781, 62, 646, 489, 16856, 7, 14116, 25, 965, 8, 4613, 965, 11, 479, 83, 10205, 430, 1976, 18351, 10205, 979, 32943, 78, 129, 249, 38325, 5772, 316, 622, 256, 742, 745, 1...
2.06
100
#!/usr/bin/python import cv2 import numpy as np p = Process('/root/Desktop/b.jpg') img_disp = ImageDisplay('result') img_disp.spin(p)
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 628, 628, 198, 79, 796, 10854, 10786, 14, 15763, 14, 36881, 14, 65, 13, 9479, 11537, 198, 198, 9600, 62, 6381, 79, 796, 7412, ...
2.413793
58
# This file is part of Moksha. # Copyright (C) 2008-2014 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
[ 2, 770, 2393, 318, 636, 286, 337, 482, 26270, 13, 198, 2, 15069, 357, 34, 8, 3648, 12, 4967, 220, 2297, 10983, 11, 3457, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 19...
2.837624
1,010
import sys a = 10/0
[ 11748, 25064, 198, 198, 64, 796, 838, 14, 15 ]
2.222222
9
from django.contrib import admin from .models import Income, Expense, Budget, Extract @admin.register(Budget) @admin.register(Income) @admin.register(Expense) @admin.register(Extract)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 198, 6738, 764, 27530, 1330, 19003, 11, 5518, 1072, 11, 15401, 11, 29677, 628, 198, 31, 28482, 13, 30238, 7, 33, 29427, 8, 628, 198, 31, 28482, 13, 30238, 7, 818, 2958, 8, 628, ...
3.063492
63
# 410000001 if sm.hasQuest(38002): sm.removeEscapeButton() sm.flipDialoguePlayerAsSpeaker() sm.sendNext("What happened? A house and a new name... But what happened to my friends? Are they alive? If I am, then maybe we failed to seal the Black Mage...") sm.sendSay("No. They wouldn't give up that easily. ...
[ 2, 6073, 2388, 8298, 198, 361, 895, 13, 10134, 12166, 7, 2548, 21601, 2599, 198, 220, 220, 220, 895, 13, 28956, 36, 6794, 21864, 3419, 198, 220, 220, 220, 895, 13, 2704, 541, 41099, 14140, 1722, 5248, 3110, 3419, 198, 220, 220, 220,...
3.135714
280
import collections import typing import copy import inspect import ast import astunparse import dace import dace.sdfg.nodes as nd import dace.data as dt from dace.frontend.python.parser import DaceProgram from daceml.autodiff.base_abc import BackwardContext, BackwardResult import daceml.util.utils as utils def for...
[ 11748, 17268, 198, 11748, 19720, 198, 11748, 4866, 198, 11748, 10104, 198, 11748, 6468, 198, 198, 11748, 6468, 403, 29572, 198, 198, 11748, 288, 558, 198, 11748, 288, 558, 13, 82, 7568, 70, 13, 77, 4147, 355, 299, 67, 198, 11748, 288,...
2.284224
3,835
import click from flask.cli import with_appcontext from flask_sqlalchemy import SQLAlchemy from sqlalchemy.ext.compiler import compiles from sqlalchemy.types import DateTime # Force mysql to compile fraction of seconds @compiles(DateTime, "mysql") db = SQLAlchemy() @click.command("init-db") @with_appcontext ...
[ 11748, 3904, 198, 198, 6738, 42903, 13, 44506, 1330, 351, 62, 1324, 22866, 198, 6738, 42903, 62, 25410, 282, 26599, 1330, 16363, 2348, 26599, 198, 6738, 44161, 282, 26599, 13, 2302, 13, 5589, 5329, 1330, 552, 2915, 198, 6738, 44161, 282...
3.074468
188
import numpy as np import subprocess import json import matplotlib import matplotlib.pyplot as plt import matplotlib as mpl plt.rcParams['text.usetex'] = True plt.rcParams['text.latex.preamble'] = [r'\usepackage{lmodern}'] font = {'family':'serif'} plt.rc('font',**font) NM = range(2,150,4) # NM = range(2,20,2) NREP_sm...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 850, 14681, 198, 11748, 33918, 198, 11748, 2603, 29487, 8019, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 2603, 29487, 8019, 355, 285, 489, 198, 489, 83, 13, 6015,...
2.036071
1,802
del_items(0x8012F26C) SetType(0x8012F26C, "void GameOnlyTestRoutine__Fv()") del_items(0x8012F274) SetType(0x8012F274, "int vecleny__Fii(int a, int b)") del_items(0x8012F298) SetType(0x8012F298, "int veclenx__Fii(int a, int b)") del_items(0x8012F2C4) SetType(0x8012F2C4, "void GetDamageAmt__FiPiT1(int i, int *mind, int *...
[ 12381, 62, 23814, 7, 15, 87, 23, 30206, 37, 2075, 34, 8, 198, 7248, 6030, 7, 15, 87, 23, 30206, 37, 2075, 34, 11, 366, 19382, 3776, 10049, 14402, 49, 28399, 834, 37, 85, 3419, 4943, 198, 12381, 62, 23814, 7, 15, 87, 23, 30206, ...
2.145856
13,575
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2020, CTERA Networks Ltd. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type ANSIBLE_METADATA = { 'metadata_version': '1.1',...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 15069, 25, 357, 66, 8, 12131, 11, 327, 5781, 32, 27862, 12052, 13, 198, 2, 22961, 3611, 5094, 13789, 410, 18, 13, ...
2.392208
1,155
import adafruit_mcp3xxx.mcp3008 as MCP from multiprocessing import Process from moistureSensor import MoistureSensor moisture_one = MoistureSensor(MCP.P0) moisture_two = MoistureSensor(MCP.P1) moisture_three = MoistureSensor(MCP.P3) # Calibrates the sensors in parallel. p1 = Process(target=moisture_one.calibrate()) ...
[ 11748, 512, 1878, 4872, 62, 76, 13155, 18, 31811, 13, 76, 13155, 6200, 23, 355, 337, 8697, 198, 6738, 18540, 305, 919, 278, 1330, 10854, 198, 198, 6738, 20160, 47864, 1330, 4270, 396, 495, 47864, 198, 198, 5908, 396, 495, 62, 505, 7...
2.47138
297
#!/usr/bin/env python from flask import Flask, render_template, Response # emulated camera #from camera import Camera from camera_pi import Camera # Raspberry Pi camera module (requires picamera package) # from camera_pi import Camera from motion_tracker import get_frame app = Flask(__name__) @app.route('/') def ind...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 6738, 42903, 1330, 46947, 11, 8543, 62, 28243, 11, 18261, 198, 198, 2, 795, 4817, 4676, 198, 2, 6738, 4676, 1330, 20432, 198, 6738, 4676, 62, 14415, 1330, 20432, 198, 2, 24244, 13993, ...
2.665829
398
from jsub.error import JsubError
[ 6738, 474, 7266, 13, 18224, 1330, 449, 7266, 12331, 198 ]
3.3
10
import re from collections import defaultdict from typing import List, DefaultDict, Generator from adventofcode.util.exceptions import SolutionNotFoundException from adventofcode.util.helpers import solution_timer from adventofcode.util.input_helpers import get_input_for_day Coord = tuple[int, int] GridType = Default...
[ 11748, 302, 198, 6738, 17268, 1330, 4277, 11600, 198, 6738, 19720, 1330, 7343, 11, 15161, 35, 713, 11, 35986, 198, 198, 6738, 19980, 1659, 8189, 13, 22602, 13, 1069, 11755, 1330, 28186, 3673, 21077, 16922, 198, 6738, 19980, 1659, 8189, ...
2.790698
215
from typing import Any, List from .base_set import BaseSet from .base_var import VarSet from .predicates import Predicate
[ 6738, 19720, 1330, 4377, 11, 7343, 198, 198, 6738, 764, 8692, 62, 2617, 1330, 7308, 7248, 198, 6738, 764, 8692, 62, 7785, 1330, 12372, 7248, 198, 6738, 764, 28764, 16856, 1330, 14322, 5344, 628, 198 ]
3.571429
35
import json from django_mysql.models.fields import JSONField as MySQLJSONField from wicked_historian.encoder import JSONEncoder __all__ = ( 'JSONField', )
[ 11748, 33918, 198, 198, 6738, 42625, 14208, 62, 28744, 13976, 13, 27530, 13, 25747, 1330, 19449, 15878, 355, 33476, 40386, 15878, 198, 6738, 20589, 62, 10034, 22618, 13, 12685, 12342, 1330, 19449, 27195, 12342, 628, 198, 834, 439, 834, 79...
3.134615
52
import numpy as np import random if __name__ == '__main__': X = np.empty((10,5)) Y = np.linspace(0,9,10) d = AssembleDataset(X,Y,5,seed = 0) a,b = d.get_fold_data() print(a,b) a,b = d.get_res_data() print(a,b)
[ 11748, 299, 32152, 355, 45941, 198, 11748, 4738, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1395, 796, 45941, 13, 28920, 19510, 940, 11, 20, 4008, 198, 220, 220, 220, 575, 796, 45941, 13, ...
1.904762
126
# Copyright 2019 DeepMind Technologies Ltd. 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 appl...
[ 2, 15069, 13130, 10766, 28478, 21852, 12052, 13, 1439, 2489, 10395, 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, 35...
2.814449
1,924
import torch from fline.losses.segmentation.dice import BCEDiceLoss
[ 11748, 28034, 198, 198, 6738, 781, 500, 13, 22462, 274, 13, 325, 5154, 341, 13, 67, 501, 1330, 11843, 1961, 501, 43, 793, 628 ]
2.916667
24
# Cycles - For import random n = 10000 m = 0 l = 1000 for i in range(n): count = 0 x = -1 while x != l: x = random.randint(1, l) count=count+1 m=m+count print("Done! average:", m/n)
[ 2, 5934, 5427, 532, 1114, 198, 198, 11748, 4738, 198, 198, 77, 796, 33028, 198, 76, 796, 657, 198, 75, 796, 8576, 198, 1640, 1312, 287, 2837, 7, 77, 2599, 628, 220, 220, 220, 954, 796, 657, 198, 220, 220, 220, 2124, 796, 532, 16...
2.009259
108
#-*- coding:utf-8 -*- import sys import time from .torrentstatus import TorrentStatus
[ 2, 12, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 198, 11748, 25064, 198, 11748, 640, 198, 198, 6738, 764, 13165, 1156, 13376, 1330, 43399, 19580 ]
3
29
from pydotplus import Dot, Node, Edge import os # 该图配置 graph = {'A': ['B', 'C', 'F'], 'B': ['C', 'D'], 'C': ['D'], 'D': ['C'], 'E': ['F', 'D'], 'F': ['C'] } def find_path(graph, start, end, path=[]): """ 在图graph中找路径: 从顶点start到顶点end 走...
[ 198, 6738, 279, 5173, 313, 9541, 1330, 22875, 11, 19081, 11, 13113, 198, 11748, 28686, 198, 198, 2, 5525, 107, 98, 32368, 122, 165, 227, 235, 163, 121, 106, 198, 34960, 796, 1391, 6, 32, 10354, 37250, 33, 3256, 705, 34, 3256, 705, ...
1.552192
958
# Auth ALLOW_HOST = [] # Bot Address SEND_AS = "" # Google GOOGLE_WORKSPACE_USER = "" GOOGLE_WORKSPACE_SERVICE_ACCOUNT_CREDENTIALS = '''{ "type": "service_account", "project_id": "", "private_key_id": "", "private_key": "", "client_email": "", "client_id": "", "auth_uri": "https://accounts...
[ 2, 26828, 198, 7036, 3913, 62, 39, 10892, 796, 17635, 198, 198, 2, 18579, 17917, 198, 50, 10619, 62, 1921, 796, 13538, 198, 198, 2, 3012, 198, 38, 6684, 38, 2538, 62, 33249, 4303, 11598, 62, 29904, 796, 13538, 198, 38, 6684, 38, 2...
2.152893
242
""" Test code for adult.py ======= Testing class that simply checks to see if the adult dataset is loadable """ import numpy from pylearn2.datasets.adult import adult from pylearn2.testing.skip import skip_if_no_data def test_adult(): """ Tests if it will work correctly for train and test set. """ ski...
[ 37811, 198, 14402, 2438, 329, 4044, 13, 9078, 198, 1421, 18604, 198, 44154, 1398, 326, 2391, 8794, 284, 766, 611, 262, 4044, 27039, 198, 271, 3440, 540, 198, 37811, 198, 11748, 299, 32152, 198, 6738, 279, 2349, 1501, 17, 13, 19608, 29...
2.690391
281
from django import forms from multichoice.models import MCQuestion from quiz.forms import QuestionForm class CreationMultiChoiceForm(QuestionForm): """ Form dedicated to the creation of a MultiChoice Question. It inherits from QuestionForm and adds the fields answerN and and answerN_correct. """...
[ 6738, 42625, 14208, 1330, 5107, 198, 198, 6738, 1963, 488, 2942, 13, 27530, 1330, 13122, 24361, 198, 6738, 38964, 13, 23914, 1330, 18233, 8479, 628, 198, 4871, 21582, 29800, 46770, 8479, 7, 24361, 8479, 2599, 198, 220, 220, 220, 37227, ...
3.109649
456
#!/usr/bin/env python3 from argparse_dataclass import dataclass @dataclass if __name__ == "__main__": args = Options.parse_args() if args.v: print("args.v is true") if args.n == 0: args.n = 5 print(fib(args.n))
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 6738, 1822, 29572, 62, 19608, 330, 31172, 1330, 4818, 330, 31172, 628, 198, 31, 19608, 330, 31172, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198,...
2.146552
116
import logging import colorlog from coloured_log import ColoredFormatter DEBUG_TRACE_NUM = 9 logging.Logger.trace = trace logging.addLevelName(9, 'TRACE') class bcolours: """The ANSI colour codes """ HEADER = '\033[95m' OKBLUE = '\033[94m' OKGREEN = '\033[92m' WARNING = '\033[93m...
[ 11748, 18931, 201, 198, 11748, 3124, 6404, 201, 198, 6738, 34746, 62, 6404, 1330, 1623, 1850, 8479, 1436, 201, 198, 201, 198, 30531, 62, 5446, 11598, 62, 41359, 796, 860, 201, 198, 6404, 2667, 13, 11187, 1362, 13, 40546, 796, 12854, 2...
2.221681
821
import pandas as pd import numpy as np import torch import optuna from dataset import HotelDataSet from model import DeepNeuralNetwork import config from engine import Engine from sklearn.metrics import roc_auc_score import torch.optim as optim def train(fold, params, save_model=False): """Finding the optimal DNN...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 11748, 2172, 9613, 198, 6738, 27039, 1330, 12696, 6601, 7248, 198, 6738, 2746, 1330, 10766, 8199, 1523, 26245, 198, 11748, 4566, 198, 6738, 3113,...
2.395561
2,298
#!/usr/bin/env python # -*- coding: utf-8 -*- # Python version: 3.6 import os import copy import time import pickle import numpy as np from tqdm import tqdm import torch from tensorboardX import SummaryWriter import torchvision.utils as vutils from options import args_parser from update import LocalUpdate, test_inf...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 11361, 2196, 25, 513, 13, 21, 628, 198, 11748, 28686, 198, 11748, 4866, 198, 11748, 640, 198, 11748, 2298, 293, 19...
2.02394
4,762
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Nov 19 07:23:35 2020 Illustrate the use of Runge-Kutta methods to solve ODEs @author: zettergm """ # Imports import numpy as np import matplotlib.pyplot as plt # RHS of ODE for use with RK4 # Time grid N=15 tmin=0 tmax=6 t=np.linspace(tmin,tmax,n...
[ 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, 26223, 5267, 678, 8753, 25, 1954, 25, 2327, 12131, 198, 198, 21478, 436, 4873, 262, 779, ...
1.72027
740
# Generated by Django 3.1.2 on 2020-11-04 19:12 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 17, 319, 12131, 12, 1157, 12, 3023, 678, 25, 1065, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32