content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import common data = common.read_file('2017/11/data.txt').strip().split(',') offset_x = 0 offset_y = 0 max_dist = 0 # |nw|n # sw| |ne # s |se| for move in data: if move == 'sw' or move == 's': offset_x -= 1 elif move == 'n' or move == 'ne': offset_x += 1 if move == 'nw' or move == ...
[ 11748, 2219, 198, 198, 7890, 796, 2219, 13, 961, 62, 7753, 10786, 5539, 14, 1157, 14, 7890, 13, 14116, 27691, 36311, 22446, 35312, 7, 3256, 11537, 198, 198, 28968, 62, 87, 796, 657, 198, 28968, 62, 88, 796, 657, 628, 198, 198, 9806,...
2.108949
257
import json import model from utils import Error import test_data import validation def test_upvote(client, existing_item): ''' Tests upvoting. ''' upc = str(existing_item.upc) store = existing_item.stores[0] store_name = str(store.name) lat = float(store.location['lat']) long_arg = fl...
[ 11748, 33918, 198, 11748, 2746, 198, 6738, 3384, 4487, 1330, 13047, 198, 11748, 1332, 62, 7890, 198, 11748, 21201, 628, 198, 4299, 1332, 62, 929, 27257, 7, 16366, 11, 4683, 62, 9186, 2599, 198, 220, 220, 220, 705, 7061, 198, 220, 220,...
2.248491
5,469
import re from typing import Dict, Iterable, Optional, Type from ..shared.patterns import Collection from . import fields model_registry: Dict[Collection, Type["Model"]] = {} class ModelMetaClass(type): """ Metaclass for Model base class (see below). This metaclass ensures that all fields get attribute...
[ 11748, 302, 198, 6738, 19720, 1330, 360, 713, 11, 40806, 540, 11, 32233, 11, 5994, 198, 198, 6738, 11485, 28710, 13, 33279, 82, 1330, 12251, 198, 6738, 764, 1330, 7032, 198, 198, 19849, 62, 2301, 4592, 25, 360, 713, 58, 36307, 11, 5...
2.502714
921
""" Tests for `astrofunc` module. """ import pytest from astrofunc import astrofunc
[ 37811, 198, 51, 3558, 329, 4600, 459, 305, 20786, 63, 8265, 13, 198, 37811, 198, 11748, 12972, 9288, 198, 6738, 6468, 305, 20786, 1330, 6468, 305, 20786, 628 ]
3.035714
28
from office365.runtime.client_value_object import ClientValueObject class TeamFunSettings(ClientValueObject): """Settings to configure use of Giphy, memes, and stickers in the team."""
[ 6738, 2607, 24760, 13, 43282, 13, 16366, 62, 8367, 62, 15252, 1330, 20985, 11395, 10267, 628, 198, 4871, 4816, 24629, 26232, 7, 11792, 11395, 10267, 2599, 198, 220, 220, 220, 37227, 26232, 284, 17425, 779, 286, 402, 541, 12114, 11, 3290...
3.84
50
import argparse import pathlib import time from watchdog.observers import Observer from watchdog.events import FileSystemEventHandler from selenium import webdriver try: from TinyTools.LoggingConfigurator import logger except ModuleNotFoundError: from sys import path from os.path import abspath path.a...
[ 11748, 1822, 29572, 198, 11748, 3108, 8019, 198, 11748, 640, 198, 198, 6738, 26856, 13, 672, 2655, 690, 1330, 27058, 198, 6738, 26856, 13, 31534, 1330, 9220, 11964, 9237, 25060, 198, 6738, 384, 11925, 1505, 1330, 3992, 26230, 198, 198, ...
2.866242
314
#!/usr/bin/env python3 # Because it's better not to rely on external libraries def banner(): """Print the program's banner""" banner = """ ____ ____ __ __ ____ ___ ____ ( _ \(_ _)( ) /__\ ( _ \/ __)( ___) )___/ _)(_ )(__ /(__)\ )___/\__ \ )__) (__) (____)(____)(__)(__)(__) (___/(...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 4362, 340, 338, 1365, 407, 284, 8814, 319, 7097, 12782, 628, 198, 4299, 17625, 33529, 198, 220, 220, 220, 37227, 18557, 262, 1430, 338, 17625, 37811, 198, 220, 220, 220, ...
2.335766
411
import time print('')
[ 11748, 640, 198, 198, 4798, 7, 7061, 8, 198 ]
2.555556
9
import random figlet_ansi_shadow = """ ████████╗██╗ ██████╗ ██████╗ ██████╗ ███████╗██████╗ ╚══██╔══╝██║ ██╔═══██╗██╔════╝ ██╔════╝ ██╔════╝██╔══██╗ ██║ ██║ ██║ ██║██║ ███╗██║ ███╗█████╗ ██████╔╝ ██║ ██║ ██║ ██║██║ ██║██║ ██║██╔══╝ ██╔══██╗ ██║ ███████╗╚██████╔╝╚...
[ 11748, 4738, 201, 198, 201, 198, 5647, 1616, 62, 504, 72, 62, 19106, 796, 37227, 201, 198, 201, 198, 49527, 22880, 245, 9968, 22880, 245, 220, 220, 220, 220, 220, 23287, 20503, 8115, 22880, 245, 220, 23287, 20503, 8115, 22880, 245, 22...
1.324764
3,812
load( "//:deps.bzl", "com_google_protobuf", "io_bazel_rules_rust", )
[ 2220, 7, 198, 220, 220, 220, 366, 1003, 25, 10378, 82, 13, 65, 48274, 1600, 198, 220, 220, 220, 366, 785, 62, 13297, 62, 11235, 672, 3046, 1600, 198, 220, 220, 220, 366, 952, 62, 65, 41319, 62, 38785, 62, 11469, 1600, 198, 8, 19...
1.8
45
# wwwhisper - web access control. # Copyright (C) 2012-2018 Jan Wrobel <jan@mixedbit.org> """wwwhisper admin API. The package exposes http API for specifying which users can access which locations and for other admin operations. """ default_app_config = 'wwwhisper_admin.appconfig.Config'
[ 2, 7324, 14363, 525, 532, 3992, 1895, 1630, 13, 198, 2, 15069, 357, 34, 8, 2321, 12, 7908, 2365, 370, 305, 6667, 1279, 13881, 31, 76, 2966, 2545, 13, 2398, 29, 198, 198, 37811, 1383, 1929, 271, 525, 13169, 7824, 13, 198, 198, 464,...
3.356322
87
#/usr/bin/env python ''' The minionswarm script will start a group of salt minions with different ids on a single system to test scale capabilities ''' # Import Python Libs import os import optparse import subprocess import tempfile import shutil import random import hashlib # Import salt libs import salt # Import t...
[ 2, 14, 14629, 14, 8800, 14, 24330, 21015, 198, 7061, 6, 198, 464, 22811, 31975, 4226, 481, 923, 257, 1448, 286, 8268, 22811, 351, 1180, 220, 2340, 198, 261, 257, 2060, 1080, 284, 1332, 5046, 9889, 198, 7061, 6, 198, 198, 2, 17267, ...
1.939894
1,880
import sys sys.path.insert(0, "../src") import cs50 i = cs50.get_int("Input: ") print(f"Output: {i}")
[ 11748, 25064, 198, 198, 17597, 13, 6978, 13, 28463, 7, 15, 11, 366, 40720, 10677, 4943, 198, 198, 11748, 50115, 1120, 198, 198, 72, 796, 50115, 1120, 13, 1136, 62, 600, 7203, 20560, 25, 220, 366, 8, 198, 4798, 7, 69, 1, 26410, 25,...
2.163265
49
#!/usr/bin/env python # -*- coding: utf-8 -*- # Created by shimeng on 17-8-17 # 爬虫名称 spider_name = 'get_ip' # 日志设置 log_folder_name = '%s_logs' % spider_name delete_existed_logs = True # 请求参数设置 thread_num = 50 sleep_time = 0.5 retry_times = 10 time_out = 5 # 当use_proxy为True时,必须在请求的args中或者在配置文件中定义ip, eg: ip="120.52.7...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15622, 416, 427, 320, 1516, 319, 1596, 12, 23, 12, 1558, 628, 198, 2, 13328, 230, 105, 164, 247, 104, 28938, 235...
1.342803
528
# -*- coding: utf-8 -*- """Working_Model.ipynb Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/15vMWS3F0cKUYSGMFpdKrZkNjuDhfApRm """ from google.colab import drive drive.mount('/content/drive') import pandas as pd import numpy as np import matplotli...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 28516, 62, 17633, 13, 541, 2047, 65, 198, 198, 38062, 4142, 7560, 416, 1623, 4820, 2870, 13, 198, 198, 20556, 2393, 318, 5140, 379, 198, 220, 220, 220, 3740, 13...
2.606096
853
import numpy #Initialize the class variables #The variable names indicate what data is stored in them #Method to calculate the hinge loss value for the entire data set #Method to calculate the hinge loss value and gradient for a particular row (used for Stochastic Gradient) #Method to train classifier using Stocha...
[ 11748, 299, 32152, 628, 198, 2, 24243, 1096, 262, 1398, 9633, 198, 2, 464, 7885, 3891, 7603, 644, 1366, 318, 8574, 287, 606, 198, 198, 2, 17410, 284, 15284, 262, 41968, 2994, 1988, 329, 262, 2104, 1366, 900, 198, 2, 17410, 284, 1528...
4.3125
80
#!/usr/bin/python import smbus import os import time import math twowire = smbus.SMBus(1) cal0 = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] cal1 = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] dig_T = [0,0,0,0,0,0,0,0,0] dig_P = [0,0,0,0,0,0,0,0,0,0] dig_H = [0,0,0,0,0,0,0,0,0] raw_data = [0,0,0,0,0,0,0,0] raw_value...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 11748, 895, 10885, 198, 11748, 28686, 198, 11748, 640, 198, 11748, 10688, 198, 198, 4246, 322, 557, 796, 895, 10885, 13, 50, 10744, 385, 7, 16, 8, 198, 198, 9948, 15, 796, 685, 15, 1...
2.030423
756
from django.shortcuts import render, redirect from .models import Contact from django.shortcuts import get_object_or_404 from .forms import ContactForm from django.contrib import messages from django.core.paginator import Paginator from django.contrib.auth.decorators import login_required @login_required @login_req...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 18941, 198, 6738, 764, 27530, 1330, 14039, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 651, 62, 15252, 62, 273, 62, 26429, 198, 6738, 764, 23914, 1330, 14039, 8479, 198, 6738, 4...
3.542056
107
import pytest from share import models from share.search import SearchIndexer from tests import factories
[ 11748, 12972, 9288, 198, 198, 6738, 2648, 1330, 4981, 198, 6738, 2648, 13, 12947, 1330, 11140, 15732, 263, 198, 198, 6738, 5254, 1330, 17590, 628 ]
4.36
25
n = int(input("Enter number of nodes:")) node = Node() node.makeset(n) edges = int(input("Enter number of edges:")) lis = [] mst = [] for i in range(edges): x, y, w = input().split(' ') lis.append((int(w), int(x), int(y))) lis.sort() print (lis) for j in range(edges): u = lis[j][1] v = lis[j][2] ...
[ 628, 198, 77, 796, 493, 7, 15414, 7203, 17469, 1271, 286, 13760, 11097, 4008, 198, 17440, 796, 19081, 3419, 198, 17440, 13, 49123, 316, 7, 77, 8, 198, 276, 3212, 796, 493, 7, 15414, 7203, 17469, 1271, 286, 13015, 11097, 4008, 198, 2...
2.152738
347
"""PRAW exception classes. Includes two main exceptions: :class:`.RedditAPIException` for when something goes wrong on the server side, and :class:`.ClientException` when something goes wrong on the client side. Both of these classes extend :class:`.PRAWException`. All other exceptions are subclassed from :class:`.Cl...
[ 37811, 47, 20530, 6631, 6097, 13, 198, 198, 42986, 734, 1388, 13269, 25, 1058, 4871, 25, 44646, 22367, 17614, 16922, 63, 329, 618, 1223, 198, 2188, 274, 2642, 319, 262, 4382, 1735, 11, 290, 1058, 4871, 25, 44646, 11792, 16922, 63, 618...
2.636418
3,350
""" Modulo para manejo de matrices de transformadas. """ from OpenGL.GL import * from functools import wraps # Decorador para mantener orden en matriz def matriz_propia(fun): """ Funcion para manejar espacios de matriz de OpenGL. La funcion que sea recibida por el decorador espera manejar matrices de tr...
[ 37811, 3401, 43348, 31215, 582, 68, 7639, 390, 2603, 45977, 390, 6121, 38768, 13, 37227, 198, 198, 6738, 30672, 13, 8763, 1330, 1635, 198, 6738, 1257, 310, 10141, 1330, 27521, 628, 198, 2, 4280, 273, 7079, 31215, 24818, 877, 2760, 268, ...
2.832184
435
# -*- coding: utf8 -*- """ Copyright 2014-2016 Andreas Würl 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 ap...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 23, 532, 9, 12, 198, 198, 37811, 628, 220, 220, 15069, 1946, 12, 5304, 33728, 370, 25151, 75, 628, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, ...
3.577093
227
class StagedObject: """ Use this class as a mixin to provide an interface for onStage/offStage objects. The idea here is that a DistributedObject could be present and active due to simple visibility, but we want to hide or otherwise disable it for some reason. """ UNKNOWN = -1 OFF = 0...
[ 198, 4871, 520, 1886, 10267, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 5765, 428, 1398, 355, 257, 5022, 259, 284, 2148, 281, 7071, 329, 319, 29391, 14, 2364, 29391, 5563, 13, 628, 220, 220, 220, 383, 2126, 994, 318, 326, ...
2.581871
684
#!/usr/bin/python from tweet_archiveur.scrapper import Scrapper from tweet_archiveur.database import Database import pandas as pd from os import getenv from dotenv import load_dotenv from pathlib import Path from sys import exit import logging import time import tweepy import random # Logging logger = logging.getLogg...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 6738, 6126, 62, 17474, 333, 13, 1416, 430, 2848, 1330, 1446, 430, 2848, 198, 6738, 6126, 62, 17474, 333, 13, 48806, 1330, 24047, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 28686, 1330, ...
2.754098
488
import requests import json import re # from requests.sessions import _TextMapping ATHLETES = [] with open('../../assets/nflAthletes.json', 'r') as athFile: data = athFile.read() athJson = json.loads(data) # list of abbreviated names active_list = [] id_list = [] for ath in athJson: id_list.append(ath['id...
[ 11748, 7007, 198, 11748, 33918, 198, 11748, 302, 198, 198, 2, 422, 7007, 13, 82, 6202, 1330, 4808, 8206, 44, 5912, 198, 198, 12599, 28882, 1546, 796, 17635, 198, 198, 4480, 1280, 10786, 40720, 40720, 19668, 14, 77, 2704, 32, 400, 4067...
2.09462
1,078
# -*- coding: utf-8 -*- # Copyright (C) 2019-2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 import pathlib import subprocess # nosec import sys import pytest from setup import SNYK_API, SNYK_TOKEN from utils.loader import SNYK_URL from utils.utilities import download_file
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 357, 34, 8, 13130, 12, 1238, 2481, 8180, 10501, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 198, 11748, 3108, 8019, 198, 1174...
2.881188
101
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: modules/prediction/proto/prediction_conf.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.pro...
[ 2, 2980, 515, 416, 262, 8435, 11876, 17050, 13, 220, 8410, 5626, 48483, 0, 198, 2, 2723, 25, 13103, 14, 28764, 2867, 14, 1676, 1462, 14, 28764, 2867, 62, 10414, 13, 1676, 1462, 198, 198, 11748, 25064, 198, 62, 65, 28, 17597, 13, 9...
2.272958
3,942
import argparse from os import path from distutils.dir_util import copy_tree TEMPLATE_PATH = "core/conf/projct_template"
[ 11748, 1822, 29572, 198, 6738, 28686, 1330, 3108, 198, 6738, 1233, 26791, 13, 15908, 62, 22602, 1330, 4866, 62, 21048, 198, 198, 51, 3620, 6489, 6158, 62, 34219, 796, 366, 7295, 14, 10414, 14, 1676, 73, 310, 62, 28243, 1, 198 ]
2.97561
41
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable from torchvision.models import resnet152
[ 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 6738, 28034, 13, 2306, 519, 6335, 1330, 35748, 198, 6738, 28034, 10178, 13, 27530, 133...
3.574468
47
import setuptools import FIP_mirror with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="FIP_mirror", version=FIP_mirror.__version__, author="dbeley", author_email="dbeley@protonmail.com", description="Mirror the FIP webradios on several services.", long_...
[ 11748, 900, 37623, 10141, 198, 11748, 376, 4061, 62, 10793, 1472, 198, 198, 4480, 1280, 7203, 15675, 11682, 13, 9132, 1600, 366, 81, 4943, 355, 277, 71, 25, 198, 220, 220, 220, 890, 62, 11213, 796, 277, 71, 13, 961, 3419, 198, 198, ...
2.304233
378
""" Settings for achievements app. """ DEFAULT_ADMIN = '' DEFAULT_ADMIN_PASSWORD = '' DEFAULT_ADMIN_MAIL = ''
[ 37811, 198, 26232, 329, 16970, 598, 13, 198, 37811, 198, 7206, 38865, 62, 2885, 23678, 796, 10148, 198, 7206, 38865, 62, 2885, 23678, 62, 47924, 54, 12532, 796, 10148, 198, 7206, 38865, 62, 2885, 23678, 62, 5673, 4146, 796, 10148 ]
2.725
40
"""Copy attributes from old data models to GenericAsset Revision ID: 6cf5b241b85f Revises: 1ae32ffc8c3f Create Date: 2021-11-11 17:18:15.395915 """ import json from datetime import datetime from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = "6cf5b241b85f" down_revisi...
[ 37811, 29881, 12608, 422, 1468, 1366, 4981, 284, 42044, 45869, 198, 198, 18009, 1166, 4522, 25, 718, 12993, 20, 65, 28872, 65, 5332, 69, 198, 18009, 2696, 25, 352, 3609, 2624, 487, 66, 23, 66, 18, 69, 198, 16447, 7536, 25, 33448, 12...
2.064289
7,373
import torch.nn as nn import torch from utils.model_utils import init_model from torchsummary import summary if __name__ == "__main___": __main__()
[ 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 198, 6738, 3384, 4487, 13, 19849, 62, 26791, 1330, 2315, 62, 19849, 198, 6738, 28034, 49736, 1330, 10638, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 17569, 1298, 198...
3.122449
49
from setuptools import find_packages, setup setup( name='acmclient', version="0.2", url='https://github.com/yangjiaronga/acmclient/', license='MIT', author='yangjiaronga', author_email='yangjiaronga@gmail.com', description='Aliyun acm client for Python', packages=find_packages(), i...
[ 6738, 900, 37623, 10141, 1330, 1064, 62, 43789, 11, 9058, 628, 198, 40406, 7, 198, 220, 220, 220, 1438, 11639, 330, 76, 16366, 3256, 198, 220, 220, 220, 2196, 2625, 15, 13, 17, 1600, 198, 220, 220, 220, 19016, 11639, 5450, 1378, 125...
2.594203
276
#! /usr/bin/env python # -*- coding: utf-8 -*- # vim:fenc=utf-8 # # Copyright © 2018 Malcolm Ramsay <malramsay64@gmail.com> # # Distributed under terms of the MIT license. """Test the behaviour of the looping through variables. This is a series of tests that are defining the interface of the module, primarily the ite...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 43907, 25, 69, 12685, 28, 40477, 12, 23, 198, 2, 198, 2, 15069, 10673, 2864, 20002, 47959, 1279, 7617, 9474, 3...
3.012295
244
from __future__ import print_function import sys class Color(object): """A printable and mixable color.""" # A dictionary of all colors, keyed by their numeric value colors = {} Color.NEITHER = Color(0, 'neither', '0') Color.RED = Color(1, 'red', '31;1') Color.BLUE = Color(~1, 'blue', '44') Color.PURPLE = Color(...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 25064, 198, 198, 4871, 5315, 7, 15252, 2599, 198, 197, 37811, 32, 3601, 540, 290, 5022, 540, 3124, 526, 15931, 628, 197, 2, 317, 22155, 286, 477, 7577, 11, 1994, 276, 4...
2.595092
163
from pathlib import PosixPath import numpy from osgeo import gdal from osgeo import osr from .image_output import SimpleImageOutput from .resampler import get_resampler from .utils import ensure_dir_exists, gdal_write
[ 6738, 3108, 8019, 1330, 18574, 844, 15235, 198, 198, 11748, 299, 32152, 198, 6738, 28686, 469, 78, 1330, 308, 31748, 198, 6738, 28686, 469, 78, 1330, 267, 27891, 198, 198, 6738, 764, 9060, 62, 22915, 1330, 17427, 5159, 26410, 198, 6738,...
3.25
68
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2021, John McNamara, jmcnamara@cpan.org # import unittest from io import StringIO from ...styles import Styles from ...format import Format class TestWriteXf(unittest.TestCase): """ ...
[ 29113, 29113, 7804, 4242, 21017, 198, 2, 198, 2, 30307, 329, 1395, 7278, 87, 34379, 13, 198, 2, 198, 2, 15069, 357, 66, 828, 2211, 12, 1238, 2481, 11, 1757, 22586, 47848, 11, 474, 23209, 7402, 3301, 31, 66, 6839, 13, 2398, 198, 2,...
2.234457
7,093
""" Functions for interface to the SARA client API. These routines can be used to build client-side applications for searching and downloading data. The most obvious way to use these routines is as follows:: urlOpener = saraclient.makeUrlOpener() sentinel = 2 paramList = ['startDate=2017-05-01', 'comp...
[ 37811, 198, 24629, 2733, 329, 7071, 284, 262, 311, 24401, 5456, 7824, 13, 220, 198, 198, 4711, 31878, 460, 307, 973, 284, 1382, 5456, 12, 1589, 5479, 329, 10342, 290, 220, 198, 15002, 278, 1366, 13, 220, 198, 198, 464, 749, 3489, 83...
2.77878
3,657
from collections.abc import Iterable import numpy as np import pandas as pd import warnings from scipy.sparse import issparse, csr_matrix from sklearn.decomposition import FastICA from sklearn.utils import sparsefuncs import anndata from anndata import AnnData from typing import Optional, Union, Callable from .cell_cy...
[ 6738, 17268, 13, 39305, 1330, 40806, 540, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 14601, 198, 6738, 629, 541, 88, 13, 82, 29572, 1330, 1189, 29572, 11, 269, 27891, 62, 6759, 8609, 198, 673...
2.193488
39,496
from coefficients import Coefficients, Constants from data_models import States, Setpoints, Weather from equations.utils import total_side_vents_ventilation_rates, total_roof_ventilation_rates, \ thermal_screen_air_flux_rate from equations.heat_fluxes import sensible_heat_flux_between_direct_air_heater_and_greenhou...
[ 6738, 44036, 1330, 1766, 41945, 11, 4757, 1187, 198, 6738, 1366, 62, 27530, 1330, 1829, 11, 5345, 13033, 11, 15615, 198, 6738, 27490, 13, 26791, 1330, 2472, 62, 1589, 62, 85, 658, 62, 1151, 10520, 62, 9700, 11, 2472, 62, 305, 1659, ...
3.363636
99
""" Construct csvs for Figure--Figure Captions/ Tables -- Table Captions """ from lxml import etree import os from Parser.parse_preprocess import get_words_from_child as get_words from converters.html2xml import htmlfile2xml from converters.xml2list import xml2list import pandas as pd import multiprocessing as mp impo...
[ 37811, 198, 42316, 50115, 14259, 329, 11291, 438, 11337, 6790, 507, 14, 33220, 1377, 8655, 6790, 507, 198, 37811, 198, 198, 6738, 300, 19875, 1330, 2123, 631, 198, 11748, 28686, 198, 6738, 23042, 263, 13, 29572, 62, 3866, 14681, 1330, 6...
2.11705
4,041
import unittest from exasol_integration_test_docker_environment.testing.utils import find_free_ports if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 198, 6738, 409, 292, 349, 62, 18908, 1358, 62, 9288, 62, 45986, 62, 38986, 13, 33407, 13, 26791, 1330, 1064, 62, 5787, 62, 3742, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198...
2.867925
53
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os import tex...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 1946, 41689, 1628, 20420, 357, 3826, 27342, 9865, 3843, 20673, 13, 9132, 737, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 3826, 38559, 24290, 737, 198, 198, 6738, 1...
2.392377
2,230
#!/usr/bin/env python """ SmallNet.py is a class that provides a network for Person localization Created 6/13/17. """ __author__ = "Alexander Ponamarev" __email__ = "alex.ponamaryov@gmail.com" import tensorflow as tf from collections import namedtuple from tensorflow import name_scope, variable_scope, stop_gradient ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 198, 18712, 7934, 13, 9078, 318, 257, 1398, 326, 3769, 257, 3127, 329, 7755, 42842, 198, 41972, 718, 14, 1485, 14, 1558, 13, 198, 37811, 198, 834, 9800, 834, 796, 366, 38708, ...
3.178295
129
# -*- python -*- # This software was produced by NIST, an agency of the U.S. government, # and by statute is not subject to copyright in the United States. # Recipients of this software assume all responsibilities associated # with its operation, modification and maintenance. However, to # facilitate maintenance we as...
[ 2, 532, 9, 12, 21015, 532, 9, 12, 198, 198, 2, 770, 3788, 373, 4635, 416, 399, 8808, 11, 281, 4086, 286, 262, 471, 13, 50, 13, 1230, 11, 198, 2, 290, 416, 14195, 318, 407, 2426, 284, 6634, 287, 262, 1578, 1829, 13, 198, 2, 3...
3.703022
761
from unittest.mock import patch import pytest from linnapi import exceptions, inventory from linnapi.models import InventoryItemImage from linnapi.requests.inventory import AddImageToInventoryItem @pytest.fixture @pytest.fixture @pytest.fixture @pytest.fixture @pytest.fixture @pytest.fixture
[ 6738, 555, 715, 395, 13, 76, 735, 1330, 8529, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 300, 3732, 15042, 1330, 13269, 11, 13184, 198, 6738, 300, 3732, 15042, 13, 27530, 1330, 35772, 25502, 198, 6738, 300, 3732, 15042, 13, 8897, 3...
3.038835
103
#!/usr/bin/env python3 # Copyright (c) 2020 The Bitcoin Unlimited developers """ Tests the electrum call 'blockchain.transaction.get' """ import asyncio from test_framework.util import assert_equal, p2p_port from test_framework.electrumutil import ElectrumTestFramework, ElectrumConnection from test_framework.nodemessag...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 15069, 357, 66, 8, 12131, 383, 6185, 26774, 6505, 198, 37811, 198, 51, 3558, 262, 1742, 6582, 869, 705, 9967, 7983, 13, 7645, 2673, 13, 1136, 6, 198, 37811, 198, 11748, 30351,...
2.553459
318
#!/usr/bin/python """ ============================================================================== Author: Tao Li (taoli@ucsd.edu) Date: Jul 8, 2015 Question: 233-Number-of-Digit-One Link: https://leetcode.com/problems/number-of-digit-one/ ====================================================================...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 37811, 198, 23926, 25609, 855, 198, 13838, 25, 220, 220, 32120, 7455, 357, 8326, 11106, 31, 1229, 21282, 13, 15532, 8, 198, 10430, 25, 220, 220, 220, 220, 5979, 807, 11, 1853, 198, 24361, 2...
4.153465
202
# Copyright 2015 Huawei Technologies Co., Ltd. # # 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 t...
[ 2, 15069, 1853, 43208, 21852, 1766, 1539, 12052, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, ...
3.97561
205
"""Split the Urban 3D dataset into train/dev/test and splits each image to 256x256 sub-tiles. Original images have size (2048, 2048). We do not resize images, but split them into smaller images i.e. each input image divided into 64 256x256 images """ import argparse import os from pathlib import Path import skimage....
[ 37811, 41205, 262, 14665, 513, 35, 27039, 656, 4512, 14, 7959, 14, 9288, 290, 30778, 1123, 2939, 284, 17759, 87, 11645, 850, 12, 83, 2915, 13, 198, 198, 20556, 4263, 423, 2546, 357, 1238, 2780, 11, 36117, 737, 198, 198, 1135, 466, 4...
2.618909
1,375
import unicodedata import codecs import sys import scipy as sp import hmm tbl = dict.fromkeys(i for i in xrange(sys.maxunicode) if unicodedata.category(unichr(i)).startswith('P')) def uniq(listinput): """ This finds the unique elements of the list listinput. """ """ This will be provided for t...
[ 11748, 28000, 9043, 1045, 198, 11748, 40481, 82, 198, 11748, 25064, 198, 11748, 629, 541, 88, 355, 599, 198, 11748, 289, 3020, 198, 198, 83, 2436, 796, 8633, 13, 6738, 13083, 7, 72, 329, 1312, 287, 2124, 9521, 7, 17597, 13, 9806, 46...
2.66875
160
# Copyright 2021 Tony Wu +https://github.com/tonywu7/ # # 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 ...
[ 2, 15069, 33448, 8832, 18027, 1343, 5450, 1378, 12567, 13, 785, 14, 1122, 88, 43812, 22, 14, 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, 239...
3.658031
193
#!/usr/bin/env python # # Copyright (c) 2017 10X Genomics, Inc. All rights reserved. # import martian import numpy as np import sys import cellranger.analysis.clustering as cr_clustering import cellranger.analysis.graphclust as cr_graphclust import cellranger.analysis.io as analysis_io from cellranger.analysis.singlege...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 2, 15069, 357, 66, 8, 2177, 838, 55, 5215, 31994, 11, 3457, 13, 1439, 2489, 10395, 13, 198, 2, 198, 11748, 11277, 666, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 25064, ...
2.423792
807
import os import logging logging.basicConfig( filename=".last_run.log", filemode="w", format="%(asctime)s %(levelname)s: %(message)s", level=logging.DEBUG ) # Must be done before importing Pygame: os.environ["PYGAME_HIDE_SUPPORT_PROMPT"] = "1" os.environ["SDL_VIDEO_CENTERED"] = "1" from src.game imp...
[ 11748, 28686, 198, 11748, 18931, 628, 198, 6404, 2667, 13, 35487, 16934, 7, 198, 220, 220, 220, 29472, 28, 1911, 12957, 62, 5143, 13, 6404, 1600, 198, 220, 220, 220, 2393, 14171, 2625, 86, 1600, 198, 220, 220, 220, 5794, 2625, 4, 7,...
2.486911
191
r""" **apyce.io** ---- This module contains functionality for exporting data to VTK ---- +----------------+------------------------------------------------------------+ | Format | Description | +================+================================================...
[ 81, 37811, 198, 198, 1174, 12826, 344, 13, 952, 1174, 198, 198, 650, 198, 198, 1212, 8265, 4909, 11244, 329, 39133, 1366, 284, 32751, 42, 198, 198, 650, 198, 198, 10, 1783, 10, 47232, 10541, 10, 198, 91, 220, 220, 220, 220, 18980, ...
2.739726
219
from utils import filter
[ 6738, 3384, 4487, 1330, 8106, 198 ]
4.166667
6
import docx import json import pyperclip # Concatenate role/company for keys below. # Order: URL, img, skills list # Read bullet points to check for skills. extra_info = { "IT Associate [Placement]PwC": [ "http://www.pwc.com/", "img/experience/pwc.jpeg", ["Python", "HTML5", "CSS3", "Bootst...
[ 11748, 2205, 87, 198, 11748, 33918, 198, 11748, 12972, 525, 15036, 198, 198, 2, 1482, 9246, 268, 378, 2597, 14, 39722, 329, 8251, 2174, 13, 198, 2, 8284, 25, 10289, 11, 33705, 11, 4678, 1351, 198, 2, 4149, 10492, 2173, 284, 2198, 32...
2.357047
745
# Generated by Django 2.1.7 on 2019-07-04 14:33 from django.db import migrations, models import users.models
[ 2, 2980, 515, 416, 37770, 362, 13, 16, 13, 22, 319, 13130, 12, 2998, 12, 3023, 1478, 25, 2091, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 2985, 13, 27530, 628 ]
3
37
from os import path import pytest import menu import ufo import pygame @pytest.fixture
[ 6738, 28686, 1330, 3108, 198, 11748, 12972, 9288, 198, 11748, 6859, 198, 11748, 334, 6513, 198, 11748, 12972, 6057, 198, 198, 31, 9078, 9288, 13, 69, 9602, 628 ]
3.178571
28
import time
[ 11748, 640, 198 ]
4
3
__all__ = [ 'HelpOperation', 'ListOperation', 'UploadOperation', 'DownloadOperation', 'InfoOperation', 'DeleteOperation', ] from .help import HelpOperation from .list import ListOperation from .upload import UploadOperation from .download import DownloadOperation from .info import InfoOperation ...
[ 834, 439, 834, 796, 685, 198, 220, 220, 220, 705, 22087, 32180, 3256, 198, 220, 220, 220, 705, 8053, 32180, 3256, 198, 220, 220, 220, 705, 41592, 32180, 3256, 198, 220, 220, 220, 705, 10002, 32180, 3256, 198, 220, 220, 220, 705, 123...
3.117333
375
""" Utilities for AAE """ import torch from sklearn.manifold import TSNE from sklearn.decomposition import PCA from visdom import Visdom from ....common import FloatTensor class SampleImage(object): """ Make a grid and plot a class of image on one row """
[ 37811, 198, 18274, 2410, 329, 317, 14242, 198, 37811, 198, 198, 11748, 28034, 198, 6738, 1341, 35720, 13, 805, 361, 727, 1330, 26136, 12161, 198, 6738, 1341, 35720, 13, 12501, 296, 9150, 1330, 4217, 32, 198, 6738, 1490, 3438, 1330, 6911...
3.35443
79
_base_ = '../mask_rcnn/mask_rcnn_r50_caffe_fpn_mstrain-poly_1x_coco.py' # We also need to change the num_classes in head to match the dataset's annotation classes=('pig', 'person', 'pig_head', 'pig_hip') # pig person 类分了也没法用,肯定不如专门分pig的分的准,所以不用这个的pig (目前pig类不能用,因为dorm中的pig在mask里) model = dict( roi_head=di...
[ 62, 8692, 62, 796, 705, 40720, 27932, 62, 6015, 20471, 14, 27932, 62, 6015, 20471, 62, 81, 1120, 62, 66, 21223, 62, 69, 21999, 62, 76, 2536, 391, 12, 35428, 62, 16, 87, 62, 66, 25634, 13, 9078, 6, 201, 198, 2, 775, 635, 761, 2...
1.68444
4,595
#!/usr/bin/env python # -*- coding: utf-8 -*- # Created by HazzaCheng on 2020-05-11 import torch import torch.nn.functional as F from torch import nn from torch_geometric.nn import GATConv, ARMAConv, SAGEConv
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15622, 416, 17064, 4496, 7376, 782, 319, 12131, 12, 2713, 12, 1157, 198, 198, 11748, 28034, 198, 11748, 28034, 13, ...
2.617284
81
import time import blockchain.Transaction from blockchain.Block import Block
[ 11748, 640, 198, 198, 11748, 11779, 13, 48720, 198, 6738, 11779, 13, 12235, 1330, 9726, 198 ]
4.875
16
# Functions for orbit prediction import model import perturbation import transform import numpy as np from scipy.integrate import solve_ivp # # function predict: # input: # elements - elements of satellite orbit, defined in model.py # ts - array of time points # ...
[ 2, 40480, 329, 13066, 17724, 201, 198, 201, 198, 11748, 2746, 201, 198, 11748, 22146, 5945, 341, 201, 198, 11748, 6121, 201, 198, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 6738, 629, 541, 88, 13, 18908, 4873, 1330, 8494, 62, ...
2.316901
284
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import os from azure.cognitiveservices.vision import computervision from msrest import authentication from dotenv import load_dotenv # Load the API key and endpoint from the .env file load_dotenv() API_KEY = os.getenv('API_KEY') ENDPOINT = os.ge...
[ 2, 15069, 357, 66, 8, 5413, 10501, 13, 198, 2, 49962, 739, 262, 17168, 5964, 13, 198, 198, 11748, 28686, 198, 6738, 35560, 495, 13, 66, 2360, 20288, 712, 1063, 13, 10178, 1330, 2653, 712, 1166, 198, 6738, 13845, 2118, 1330, 18239, 1...
3.451327
565
import hashlib import logging import re logger = logging.getLogger('main.util')
[ 11748, 12234, 8019, 198, 11748, 18931, 198, 11748, 302, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 10786, 12417, 13, 22602, 11537, 628, 628, 628 ]
3.269231
26
''' This code works as simulator. Main values: brightness, time, date, temperature, humidity. Users values: message. ''' import datetime from datetime import datetime import random ################################## PLANT SETTINGS ################################## plant_last_watering_day = "2021-01-12" plant_waterin...
[ 7061, 6, 220, 198, 1212, 2438, 2499, 355, 35375, 13, 198, 13383, 3815, 25, 22204, 11, 640, 11, 3128, 11, 5951, 11, 27716, 13, 198, 14490, 3815, 25, 3275, 13, 198, 7061, 6, 198, 11748, 4818, 8079, 198, 6738, 4818, 8079, 1330, 4818, ...
2.92145
331
import asyncio import collections import gc import logging import psycopg2 import pytest import re import socket import sys import time import uuid import warnings from docker import Client as DockerClient import aiopg from aiopg import sa @pytest.fixture(scope='session') @pytest.yield_fixture @pytest.mark.tryf...
[ 11748, 30351, 952, 198, 11748, 17268, 198, 11748, 308, 66, 198, 11748, 18931, 198, 11748, 17331, 22163, 70, 17, 198, 11748, 12972, 9288, 198, 11748, 302, 198, 11748, 17802, 198, 11748, 25064, 198, 11748, 640, 198, 11748, 334, 27112, 198, ...
2.590214
654
from django import forms from django.utils.datetime_safe import datetime from vacation_schedule.models import EmployeeVacationPeriod
[ 6738, 42625, 14208, 1330, 5107, 198, 6738, 42625, 14208, 13, 26791, 13, 19608, 8079, 62, 21230, 1330, 4818, 8079, 198, 6738, 14600, 62, 15952, 5950, 13, 27530, 1330, 36824, 53, 330, 341, 5990, 2101, 628 ]
3.828571
35
# # Copyright (c) 2021 Airbyte, Inc., all rights reserved. # from .destination import DestinationHadoop __all__ = ["DestinationHadoop"]
[ 2, 198, 2, 15069, 357, 66, 8, 33448, 3701, 26327, 11, 3457, 1539, 477, 2489, 10395, 13, 198, 2, 628, 198, 6738, 764, 16520, 1883, 1330, 45657, 39, 4533, 404, 198, 198, 834, 439, 834, 796, 14631, 24159, 1883, 39, 4533, 404, 8973, 1...
3.159091
44
#!/usr/bin/env python # -*- coding:utf-8 -*- # @author:Spring import tensorflow as tf import os import tarfile import requests inception_pretrain_model_url = 'http://download.tensorflow.org/models/image/imagenet/inception-2015-12-05.tgz' # 下载inception pretrain模型 inception_pretrain_model_dir = "inception_pretrain" if...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 2, 2488, 9800, 25, 30387, 198, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 28686, 198, 11748, 13422, 7753, 198, ...
2.281346
654
import json import logging import os from string import Template from ldap3 import Connection, SIMPLE from ldap3.core.exceptions import LDAPAttributeError from auth import auth_base from model import model_helper from utils import file_utils from utils.string_utils import strip KNOWN_REJECTIONS = [ "invalidCrede...
[ 11748, 33918, 198, 11748, 18931, 198, 11748, 28686, 198, 6738, 4731, 1330, 37350, 198, 198, 6738, 300, 67, 499, 18, 1330, 26923, 11, 23749, 16437, 198, 6738, 300, 67, 499, 18, 13, 7295, 13, 1069, 11755, 1330, 27178, 2969, 33682, 12331, ...
3.354167
144
import numpy as np from autogluon.features.generators import OneHotEncoderFeatureGenerator
[ 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 1960, 49006, 261, 13, 40890, 13, 8612, 2024, 1330, 1881, 21352, 27195, 12342, 38816, 8645, 1352, 628, 198 ]
3.518519
27
# Generated by Django 3.1.3 on 2020-11-26 00:16 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 18, 319, 12131, 12, 1157, 12, 2075, 3571, 25, 1433, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
from finding_parents_method import finding_parents # import lxml library from lxml import etree as ElementTree # genereer data voor input later file = open('country_data.xml') data = file.read() tree = ElementTree.fromstring(data) rank = tree.xpath('.//rank')[0] parents = finding_parents(rank) print(parents)
[ 6738, 4917, 62, 23743, 62, 24396, 1330, 4917, 62, 23743, 198, 2, 1330, 300, 19875, 5888, 198, 6738, 300, 19875, 1330, 2123, 631, 355, 11703, 27660, 198, 2, 2429, 567, 263, 1366, 410, 2675, 5128, 1568, 198, 7753, 796, 1280, 10786, 1931...
3.20202
99
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 17202, 39410, 25, 428, 2393, 373, 7560, 416, 262, 21624, 12994, 24118, 687, 10290, 357, 27110, 5235, 8, 16984, 13, 17202, 198, 2, 17202, 2141, 407, 4370, 416, 1021, 4556, 345, 821, 1728, 345, 760...
3.488189
127
from .steam import Steam
[ 6738, 764, 21465, 1330, 9094, 198 ]
4.166667
6
from __future__ import print_function import torch import torch.nn as nn import torch.nn.functional as F import pdb student = torch.tensor([[0,1,2],[2,3,4],[2,3,5]], dtype=torch.float) teacher = torch.tensor([[1,2,2],[3,4,5],[3,4,0]], dtype=torch.float) student2 = torch.tensor([[[0,1],[0,3]]], dtype=torch.float) tea...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 11748, 279, 9945, 628, 198, 50139, 796, 28034, 13, 83, 22854, 2...
2.294118
221
import sys import tempfile from dataclasses import asdict import tensorflow as tf from absl import logging from official.utils.misc import distribution_utils from smart_compose.args import SmartComposeArg from smart_compose.train import train from smart_compose.utils import distributed_utils, parsing_utils def main...
[ 11748, 25064, 198, 11748, 20218, 7753, 198, 6738, 4818, 330, 28958, 1330, 355, 11600, 198, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 2352, 75, 1330, 18931, 198, 6738, 1743, 13, 26791, 13, 44374, 1330, 6082, 62, 26791, 198, 1...
2.658981
824
## Greeter ## timed_block from time import time ## Closer ## Database ## contextlib from contextlib import contextmanager @contextmanager
[ 2235, 11955, 2357, 628, 198, 2235, 28805, 62, 9967, 198, 6738, 640, 1330, 640, 628, 198, 198, 2235, 1012, 13416, 628, 198, 2235, 24047, 628, 198, 2235, 4732, 8019, 198, 6738, 4732, 8019, 1330, 4732, 37153, 628, 198, 31, 22866, 37153, ...
3.547619
42
import math import sklearn import torch import torch.nn as nn from torch.nn.parameter import Parameter from torch.autograd import Variable import torch.nn.functional as F import sklearn.metrics class fcbr(nn.Module): """ fc-bn-relu [B, Fin] -> [B, Fout] """ class fcdbr(nn.Module): """ fc-dp-bn-relu ...
[ 11748, 10688, 198, 11748, 1341, 35720, 198, 11748, 28034, 220, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 6738, 28034, 13, 20471, 13, 17143, 2357, 1330, 25139, 2357, 198, 6738, 28034, 13, 2306, 519, 6335, 1330, 35748, 198, 11748, ...
2.172691
249
import numpy as np from PIL import Image import os, sys import argparse from sklearn.metrics import mean_absolute_error as compare_mae from skimage.measure import compare_psnr from skimage.measure import compare_ssim from labels import labels import scipy, skimage from scipy.spatial import KDTree from sklearn.metric...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 350, 4146, 1330, 7412, 198, 11748, 28686, 11, 25064, 198, 198, 11748, 1822, 29572, 220, 198, 6738, 1341, 35720, 13, 4164, 10466, 1330, 1612, 62, 48546, 62, 18224, 355, 8996, 62, 2611, 68, 198, ...
2.163807
1,807
# Copyright 2015 Rackspace # 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, sof...
[ 2, 15069, 1853, 37927, 13200, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 921, 743, 7330, 198, 2, 257, ...
2.21634
2,191
import geopandas as gpd import pandas as pd import numpy as np import shared import sys from shapely.geometry import Polygon args = sys.argv[1:] prefix = args[0] + "_" if len(args) else "" parcels = gpd.read_geocsv("parcels/%sparcels.csv" % prefix, low_memory=False) mazs = gpd.read_geocsv("data/mazs.csv") parcels_ce...
[ 11748, 30324, 392, 292, 355, 27809, 67, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 4888, 198, 11748, 25064, 198, 6738, 5485, 306, 13, 469, 15748, 1330, 12280, 14520, 198, 198, 22046, 796, 25064...
2.636852
559
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import unittest from test.multiprocess_test_case import MultiProcessTestCase import crypten.mpc.primitives.baseOT as ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 15069, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 198, 2, 198, 2, 770, 2723, 2438, 318, 11971, 739, 262, 17168, 5964, 1043, 287, 262, 198, 2, 38559, 24290, ...
3.194915
118
from ply import * import MonkeyLex tokens = MonkeyLex.tokens def p_program(p): '''program : program compound_action actions | compound_action actions | program actions | actions ''' if len(p) == 4: p[0] = p[1] if not p[0]: p[0] = [] ...
[ 6738, 35960, 1330, 1635, 198, 11748, 26997, 45117, 198, 198, 83, 482, 641, 796, 26997, 45117, 13, 83, 482, 641, 198, 198, 4299, 279, 62, 23065, 7, 79, 2599, 198, 220, 220, 220, 705, 7061, 23065, 220, 1058, 1430, 13061, 62, 2673, 402...
1.700748
3,208
from agent import Agent from random import random, sample from itertools import combinations from math import comb from mission import Mission class Bayes(Agent): ''' Maintains probabilities of all possible worlds. Calculates the probabilty of each player being a spy from set of worlds. Worlds prob...
[ 6738, 5797, 1330, 15906, 198, 6738, 4738, 1330, 4738, 11, 6291, 198, 6738, 340, 861, 10141, 1330, 17790, 198, 6738, 10688, 1330, 1974, 198, 6738, 4365, 1330, 12633, 198, 198, 4871, 4696, 274, 7, 36772, 2599, 220, 220, 220, 220, 198, 2...
2.229044
2,899
from math import sqrt, atan2, hypot, sin, cos, pi from random import uniform, gauss from typing import Optional, Tuple import numpy as np from map import Map from motion import Velocity, Odometry from obstacle import Obstacle, ObstacleID from robot import Robot from sensor_trace import SensorTrace, TimeStep from simu...
[ 6738, 10688, 1330, 19862, 17034, 11, 379, 272, 17, 11, 8813, 11, 7813, 11, 8615, 11, 31028, 198, 6738, 4738, 1330, 8187, 11, 31986, 1046, 198, 6738, 19720, 1330, 32233, 11, 309, 29291, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198...
2.183408
11,090
# Android environment import time from appium import webdriver from appium.webdriver.common.touch_action import TouchAction from eyes import Eyes DESIRED_CAPS = dict( avd='Pixel_4_API_31', platformName='Android', deviceName='Pixel_2_API_31', appPackage='com.globe.gcash.android', appActivity='gcash....
[ 2, 5565, 2858, 198, 11748, 640, 198, 6738, 598, 1505, 1330, 3992, 26230, 198, 6738, 598, 1505, 13, 12384, 26230, 13, 11321, 13, 29332, 62, 2673, 1330, 15957, 12502, 198, 6738, 2951, 1330, 18301, 198, 198, 30910, 37819, 62, 33177, 50, ...
2.620192
208
# # PySNMP MIB module CISCO-IF-LOOPBACK-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-IF-LOOPBACK-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 17:44:15 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (def...
[ 2, 198, 2, 9485, 15571, 7378, 337, 9865, 8265, 36159, 8220, 12, 5064, 12, 21982, 3185, 31098, 12, 8895, 33, 357, 4023, 1378, 16184, 76, 489, 8937, 13, 785, 14, 79, 893, 11632, 8, 198, 2, 7054, 45, 13, 16, 2723, 2393, 1378, 14, 1...
2.544415
2,274
from jsonspec.validators import load
[ 6738, 44804, 684, 43106, 13, 12102, 2024, 1330, 3440, 628 ]
3.8
10
"""TIL-446 Ny tabell for de dataene som skal arkiveres Revision ID: 2a2a61dd26dc Revises: 31c82e4a3348 Create Date: 2014-12-19 12:22:28.513372 """ # revision identifiers, used by Alembic. from sqlalchemy.dialects.postgresql import JSON, ENUM revision = '2a2a61dd26dc' down_revision = '31c82e4a3348' from alembic im...
[ 37811, 51, 4146, 12, 27260, 220, 17735, 7400, 695, 329, 390, 1366, 1734, 3870, 1341, 282, 610, 74, 425, 411, 198, 198, 18009, 1166, 4522, 25, 362, 64, 17, 64, 5333, 1860, 2075, 17896, 198, 18009, 2696, 25, 3261, 66, 6469, 68, 19, ...
2.458333
144
import ifaddr localips = []
[ 11748, 611, 29851, 198, 198, 12001, 2419, 796, 17635, 628 ]
3
10
# Generated by Django 3.0.6 on 2020-07-05 13:15 from django.conf import settings from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 21, 319, 12131, 12, 2998, 12, 2713, 1511, 25, 1314, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
3.1
40
import tinychain as tc import unittest from testutils import start_host if __name__ == "__main__": unittest.main()
[ 11748, 7009, 7983, 355, 37096, 198, 11748, 555, 715, 395, 198, 198, 6738, 1332, 26791, 1330, 923, 62, 4774, 628, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3...
2.840909
44
# @param A : list of list of integers # @return the same list modified
[ 220, 220, 220, 1303, 2488, 17143, 317, 1058, 1351, 286, 1351, 286, 37014, 201, 198, 220, 220, 220, 1303, 2488, 7783, 262, 976, 1351, 9518, 201 ]
3.076923
26