content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import re import struct from typing import Any, BinaryIO, Dict, NamedTuple, Optional, Sequence, Tuple from .util import music, tilesets, load_tileset, spritesets, load_spriteset, PokeImportError from .sound import MinLibSound from .encoders import encode_tiles
[ 11748, 302, 198, 11748, 2878, 198, 6738, 19720, 1330, 4377, 11, 45755, 9399, 11, 360, 713, 11, 34441, 51, 29291, 11, 32233, 11, 45835, 11, 309, 29291, 198, 198, 6738, 764, 22602, 1330, 2647, 11, 19867, 1039, 11, 3440, 62, 83, 2915, ...
3.375
80
# This is an example program showing different methods of controlling motors, servos, and Neopixels. # It works with a Rock Candy or PiHut PS3 controller. # The left stick controls the speed and direction of both motors - push up to go forwards, down for backwards and left or right to steer. # The right stick directly ...
[ 2, 770, 318, 281, 1672, 1430, 4478, 1180, 5050, 286, 12755, 24699, 11, 1113, 418, 11, 290, 3169, 404, 14810, 13, 198, 2, 632, 2499, 351, 257, 4631, 24680, 393, 13993, 39, 315, 6599, 18, 10444, 13, 198, 2, 383, 1364, 4859, 6973, 26...
2.083556
5,996
""" Tools to help manage Globus proxies """ import os import subprocess import logging from iceprod.server.config import IceProdConfig logger = logging.getLogger('globus') class SiteGlobusProxy(object): """ Manage site-wide globus proxy :param cfgfile: cfgfile location (optional) :param duration: p...
[ 37811, 198, 33637, 284, 1037, 6687, 40713, 385, 41775, 198, 37811, 198, 198, 11748, 28686, 198, 11748, 850, 14681, 198, 11748, 18931, 198, 198, 6738, 4771, 1676, 67, 13, 15388, 13, 11250, 1330, 6663, 2964, 67, 16934, 198, 198, 6404, 136...
1.980354
1,527
import os import percy from percy import utils try: from urllib.parse import urlparse except ImportError: from urlparse import urlparse __all__ = ['ResourceLoader'] MAX_FILESIZE_BYTES = 15 * 1024**2 # 15 MiB.
[ 11748, 28686, 198, 11748, 583, 948, 198, 6738, 583, 948, 1330, 3384, 4487, 198, 198, 28311, 25, 198, 220, 220, 220, 422, 2956, 297, 571, 13, 29572, 1330, 19016, 29572, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220, 422, 19016, 2957...
2.7875
80
import traceback import uuid import socket import logging import os import base64 import zlib import gzip import time import datetime from http import cookies from http.server import BaseHTTPRequestHandler from http.server import HTTPServer from threading import Thread import WebRequest if __name__ == '__main__'...
[ 198, 11748, 12854, 1891, 198, 11748, 334, 27112, 198, 11748, 17802, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 2779, 2414, 198, 11748, 1976, 8019, 198, 11748, 308, 13344, 198, 11748, 640, 198, 11748, 4818, 8079, 198, 6738, 2638, 13...
2.933333
180
import re import math import random import logging from collections import OrderedDict from discord.ext import commands from common import utilities from common import dynamo_manager from common.module.discoverable_module import DiscoverableCog from common.module.module_initialization_container import ModuleInitializ...
[ 11748, 302, 198, 11748, 10688, 198, 11748, 4738, 198, 11748, 18931, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 198, 6738, 36446, 13, 2302, 1330, 9729, 198, 198, 6738, 2219, 1330, 20081, 198, 6738, 2219, 1330, 6382, 78, 62, 37153...
2.308666
2,608
import pytest from keras.preprocessing import image from PIL import Image import numpy as np import os import shutil import tempfile if __name__ == '__main__': pytest.main([__file__])
[ 11748, 12972, 9288, 201, 198, 6738, 41927, 292, 13, 3866, 36948, 1330, 2939, 201, 198, 6738, 350, 4146, 1330, 7412, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 28686, 201, 198, 11748, 4423, 346, 201, 198, 11748, 20218, 775...
2.706667
75
#!/usr/bin/env python from setuptools import find_packages, setup project = "ch-cli" version = "0.1.0" setup( name=project, version=version, description="Command line tool for ch", author="Zuiwan", author_email="danceiny@gmail.com", url="https://github.com/zuiwan/CodingHub-CLI.git", package...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 6738, 900, 37623, 10141, 1330, 1064, 62, 43789, 11, 9058, 198, 198, 16302, 796, 366, 354, 12, 44506, 1, 198, 9641, 796, 366, 15, 13, 16, 13, 15, 1, 198, 40406, 7, 198, 220, 220, ...
1.918644
590
import os import re from typing import ( Union, List, Dict, Pattern ) from pyrogram.filters import create from pyrogram import filters, Client from pyrogram.types import ( Message, CallbackQuery, InlineQuery, InlineKeyboardMarkup, ReplyKeyboardMarkup, Update ) from config import Config from tronx.da...
[ 11748, 28686, 198, 11748, 302, 198, 198, 6738, 19720, 1330, 357, 198, 197, 38176, 11, 220, 198, 197, 8053, 11, 220, 198, 197, 35, 713, 11, 220, 198, 197, 47546, 198, 8, 198, 198, 6738, 12972, 39529, 13, 10379, 1010, 1330, 2251, 198,...
2.879581
191
import torch from dataset import DrivingDataset from vidvqvae import VQVAE from torch.utils.data import DataLoader from torch.utils.data import random_split import pytorch_lightning as pl from pytorch_lightning.loggers import WandbLogger from pytorch_lightning.callbacks import ModelCheckpoint dataset = DrivingDataset...
[ 11748, 28034, 198, 6738, 27039, 1330, 32889, 27354, 292, 316, 198, 6738, 410, 312, 85, 80, 33353, 1330, 569, 48, 11731, 36, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 6060, 17401, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 4738, 6...
2.637931
406
# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and t...
[ 2, 15069, 2211, 412, 1229, 3400, 457, 385, 11998, 11, 3457, 13, 198, 2, 198, 2, 2297, 396, 3890, 290, 779, 286, 428, 3788, 287, 2723, 290, 13934, 5107, 11, 198, 2, 351, 393, 1231, 17613, 11, 389, 10431, 2810, 326, 262, 1708, 198, ...
3.514943
435
from ColorText import ColorText Texto = ColorText.mudaCor('Olá Mundo!','blue','lo') print(Texto)
[ 6738, 5315, 8206, 1330, 5315, 8206, 201, 198, 201, 198, 8206, 78, 796, 5315, 8206, 13, 76, 15339, 10606, 10786, 30098, 6557, 33324, 78, 0, 41707, 17585, 41707, 5439, 11537, 201, 198, 4798, 7, 8206, 78, 8 ]
2.702703
37
# -*- coding: utf-8 -*- """Tests for the color module. BSD 3-Clause License Copyright (c) 2020-2021, Daniel Nagel All rights reserved. """ import numpy as np import pytest from matplotlib import colors as clr import prettypyplot @pytest.mark.parametrize('num, kwargs, error', [ (1, {}, None), (2, {'high': 2...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 51, 3558, 329, 262, 3124, 8265, 13, 198, 198, 21800, 513, 12, 2601, 682, 13789, 198, 15269, 357, 66, 8, 12131, 12, 1238, 2481, 11, 7806, 15196, 417, 198, 3237, ...
1.998542
2,744
from typing import Text import os import pytest from rasa.constants import (DEFAULT_DOMAIN_PATH, DEFAULT_CONFIG_PATH, DEFAULT_MODELS_PATH, DEFAULT_DATA_PATH) @pytest.fixture(scope="session") @pytest.fixture(scope="session")
[ 6738, 19720, 1330, 8255, 198, 11748, 28686, 198, 11748, 12972, 9288, 198, 198, 6738, 374, 15462, 13, 9979, 1187, 1330, 357, 7206, 38865, 62, 39170, 29833, 62, 34219, 11, 5550, 38865, 62, 10943, 16254, 62, 34219, 11, 198, 220, 220, 220, ...
2.388889
108
# pylint: disable = missing-docstring import pytest from bases import encoding from bases.encoding import BaseEncoding from bases import random from bases.random import rand_str random.set_options(min_bytes=0, max_bytes=16) nsamples = 1024 @pytest.mark.parametrize("enc_name,enc", list(encoding.table()))
[ 2, 279, 2645, 600, 25, 15560, 796, 4814, 12, 15390, 8841, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 12536, 1330, 21004, 198, 6738, 12536, 13, 12685, 7656, 1330, 7308, 27195, 7656, 198, 6738, 12536, 1330, 4738, 198, 6738, 12536, 13, ...
3.121212
99
from marshmallow import Schema, fields
[ 6738, 22397, 42725, 1330, 10011, 2611, 11, 7032, 198 ]
4.333333
9
from pydantic import validator, Field from pystratis.api import Model # noinspection PyUnresolvedReferences class AddNodeRequest(Model): """A request model for the connectionmanager/addnode endpoint. Args: ipaddr (str): The endpoint. command (str): Allowed commands [add, remove, onetry] "...
[ 6738, 279, 5173, 5109, 1330, 4938, 1352, 11, 7663, 198, 6738, 12972, 2536, 37749, 13, 15042, 1330, 9104, 628, 198, 2, 645, 1040, 14978, 9485, 3118, 411, 5634, 19927, 198, 4871, 3060, 19667, 18453, 7, 17633, 2599, 198, 220, 220, 220, 3...
2.974194
155
import os PATH = os.path.abspath(os.path.dirname(__file__))
[ 11748, 28686, 198, 198, 34219, 796, 28686, 13, 6978, 13, 397, 2777, 776, 7, 418, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 4008, 198 ]
2.346154
26
import urllib from django.forms.fields import CharField from django.utils.translation import ugettext_lazy as _ from django.views.generic import View from .exceptions import PopupViewIsNotSubclassView from .widgets import PopupViewWidget
[ 11748, 2956, 297, 571, 198, 198, 6738, 42625, 14208, 13, 23914, 13, 25747, 1330, 3178, 15878, 198, 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 334, 1136, 5239, 62, 75, 12582, 355, 4808, 198, 6738, 42625, 14208, 13, 33571, 13, 41357,...
3.492754
69
from browser import document as doc from browser.html import TABLE, TR, TH, TD, INPUT, SELECT, OPTION, DIV, BUTTON, SPAN, LI, H2, H3, IMG, COLGROUP, COL, P, SECTION, BR from json import load from last_update import time # Create the static elements of the home page init_page() doc['loading'] <= DIV(Id='prerendered'...
[ 6738, 6444, 1330, 3188, 355, 2205, 198, 6738, 6444, 13, 6494, 1330, 43679, 11, 7579, 11, 2320, 11, 13320, 11, 3268, 30076, 11, 33493, 11, 39852, 2849, 11, 360, 3824, 11, 21728, 11357, 11, 6226, 1565, 11, 24653, 11, 367, 17, 11, 367,...
3.156863
102
"""Conversion functions for weather radar and rainfall data.""" from numpy import isfinite, log, ubyte from scipy.ndimage import gaussian_filter from skimage.exposure import equalize_hist, rescale_intensity def dBZ_to_ubyte(I, dBZ_min=-10.0, dBZ_max=50.0, filter_stddev=3.0): """Convert a dBZ field into a 8-bit imag...
[ 37811, 3103, 9641, 5499, 329, 6193, 13428, 290, 25807, 1366, 526, 15931, 198, 198, 6738, 299, 32152, 1330, 318, 69, 9504, 11, 2604, 11, 334, 26327, 198, 6738, 629, 541, 88, 13, 358, 9060, 1330, 31986, 31562, 62, 24455, 198, 6738, 1341...
2.368463
1,243
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function from .vendor.Qt import QtWidgets from .libs.maya import fbx from .libs.maya import namespace from . import history_helper def import_fbx(path, import_mode, parent): """import fbx Args: path (unicode): path ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 198, 198, 6738, 764, 85, 18738, 13, 48, 83, 1330, 33734, 54, 312, 11407, 198, 198, 6738, ...
1.861066
619
from sqlalchemy import schema from sqlalchemy.orm import Session from fastapi import Depends, APIRouter, HTTPException, status from fastapi.security.oauth2 import OAuth2PasswordRequestForm from .. import db, models, schemas, utils, oauth2 router = APIRouter( tags=["Authentication"], ) @router.post("/login", re...
[ 6738, 44161, 282, 26599, 1330, 32815, 198, 6738, 44161, 282, 26599, 13, 579, 1330, 23575, 198, 6738, 3049, 15042, 1330, 2129, 2412, 11, 3486, 4663, 39605, 11, 14626, 16922, 11, 3722, 198, 6738, 3049, 15042, 13, 12961, 13, 12162, 1071, 1...
3.192661
109
import logging import os from aiohttp import web, WSMsgType from aiohttp.web_response import Response from jsonrpcserver.aio import methods from sn_agent import ontology from sn_agent.api.job import can_perform_service, perform_job from sn_agent.job.job_descriptor import JobDescriptor from sn_agent.ontology.service_d...
[ 11748, 18931, 198, 11748, 28686, 198, 198, 6738, 257, 952, 4023, 1330, 3992, 11, 25290, 50108, 6030, 198, 6738, 257, 952, 4023, 13, 12384, 62, 26209, 1330, 18261, 198, 6738, 33918, 81, 14751, 15388, 13, 64, 952, 1330, 5050, 198, 198, ...
2.97006
167
maior = 0 menor = 0 for p in range(1, 6): peso = float(input(f'Digite a massa da {p}º pessoa em quilos: ')) if p == 1: maior = peso menor = peso else: if peso > maior: maior = peso if peso < menor: menor = peso print('O maior peso lido foi de {}Kg'.for...
[ 2611, 1504, 796, 657, 198, 3653, 273, 796, 657, 198, 1640, 279, 287, 2837, 7, 16, 11, 718, 2599, 198, 220, 220, 220, 32317, 78, 796, 12178, 7, 15414, 7, 69, 6, 19511, 578, 257, 2347, 64, 12379, 1391, 79, 92, 36165, 279, 408, 121...
1.910448
201
# SPDX-License-Identifier: MIT # Copyright (c) 2018-2022 Amano Team from pyrogram import types from pyrogram.helpers import bki, ikb from userlixo.database import Message
[ 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 17168, 198, 2, 15069, 357, 66, 8, 2864, 12, 1238, 1828, 42614, 78, 4816, 198, 198, 6738, 12972, 39529, 1330, 3858, 198, 6738, 12972, 39529, 13, 16794, 364, 1330, 275, 4106, 11, 220, 1134...
3.051724
58
import matplotlib.pyplot as plt import sys import os outDir = sys.argv[1] finalOutDir = outDir + '/figure3d/' if not os.path.exists(finalOutDir): os.makedirs(finalOutDir) #make a plot showing the true positive and false positive rates of each method. #each sv type will get its own icon, and methods can be labeled b...
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 25064, 198, 11748, 28686, 198, 198, 448, 35277, 796, 25064, 13, 853, 85, 58, 16, 60, 198, 198, 20311, 7975, 35277, 796, 503, 35277, 1343, 31051, 26875, 18, 67, 14, ...
2.276051
547
from collections import deque from math import ceil, log from division import Division from picker import Picker
[ 6738, 17268, 1330, 390, 4188, 198, 6738, 10688, 1330, 2906, 346, 11, 2604, 198, 198, 6738, 7297, 1330, 7458, 198, 6738, 2298, 263, 1330, 12346, 263, 628, 198 ]
4.142857
28
#!/usr/bin/env python3 import csv import sys import xml.etree.ElementTree as ET ### Natural key sorting for orders like : C1, C5, C10, C12 ... (instead of C1, C10, C12, C5...) # http://stackoverflow.com/a/5967539 import re def natural_keys(text): ''' alist.sort(key=natural_keys) sorts in human order http:...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 269, 21370, 198, 11748, 25064, 198, 11748, 35555, 13, 316, 631, 13, 20180, 27660, 355, 12152, 198, 198, 21017, 12068, 1994, 29407, 329, 6266, 588, 1058, 327, 16, 11, 327, 20...
2.220099
1,413
import wget import gzip import time as t import json import fileinput import os
[ 11748, 266, 1136, 198, 11748, 308, 13344, 198, 11748, 640, 355, 256, 198, 11748, 33918, 198, 11748, 2393, 15414, 198, 11748, 28686, 628, 628, 628 ]
3.4
25
"""Sample ace and supersmoother problems from literature."""
[ 37811, 36674, 31506, 290, 22754, 5908, 847, 2761, 422, 9285, 526, 15931, 198 ]
4.692308
13
from threading import Lock import geoip2.database from util import resource_path
[ 6738, 4704, 278, 1330, 13656, 201, 198, 201, 198, 11748, 40087, 541, 17, 13, 48806, 201, 198, 201, 198, 6738, 7736, 1330, 8271, 62, 6978, 201, 198, 201, 198, 201, 198 ]
2.967742
31
from stable_baselines.common.noise import NormalActionNoise, OrnsteinUhlenbeckActionNoise from stable_baselines.td3.rnd import RND from stable_baselines.td3.td3 import TD3 from stable_baselines.td3.dist_predictor import Predictor from stable_baselines.td3.ddl_td3 import DDLTD3 from stable_baselines.td3.policies import ...
[ 6738, 8245, 62, 12093, 20655, 13, 11321, 13, 3919, 786, 1330, 14435, 12502, 2949, 786, 11, 49359, 5714, 34653, 11925, 27343, 12502, 2949, 786, 198, 6738, 8245, 62, 12093, 20655, 13, 8671, 18, 13, 81, 358, 1330, 371, 8575, 198, 6738, 8...
2.920635
126
from django.shortcuts import render import random
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 11748, 4738, 198 ]
4.166667
12
#from django.test import TestCase from datetime import date from decimal import * from django.core.urlresolvers import reverse from django.contrib.auth.models import User from rest_framework.test import APITestCase from rest_framework.authtoken.models import Token from .models import * from .mommy_recipes import * ...
[ 2, 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 4818, 8079, 1330, 3128, 198, 6738, 32465, 1330, 1635, 198, 198, 6738, 42625, 14208, 13, 7295, 13, 6371, 411, 349, 690, 1330, 9575, 198, 6738, 42625, 14208, 13, 3642, 822, ...
2.256627
830
from localization import L from resources.fonts import QXFontDB from resources.gfx import QXImageDB, QXImageSequenceDB from xlib import qt as qtx from ...backend import BackendHost class QBackendPanel(qtx.QXWidget): """ Base panel for CSW backend """
[ 6738, 42842, 1330, 406, 198, 6738, 4133, 13, 10331, 82, 1330, 1195, 55, 23252, 11012, 198, 6738, 4133, 13, 70, 21373, 1330, 1195, 55, 5159, 11012, 11, 1195, 55, 5159, 44015, 594, 11012, 198, 6738, 2124, 8019, 1330, 10662, 83, 355, 106...
2.988764
89
import jax.numpy as jnp import numpy as np from jax import random from rmhmc.hmc import hmc from .problems import banana
[ 11748, 474, 897, 13, 77, 32152, 355, 474, 37659, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 474, 897, 1330, 4738, 198, 198, 6738, 42721, 71, 23209, 13, 71, 23209, 1330, 289, 23209, 198, 198, 6738, 764, 1676, 22143, 1330, 25996, 62...
2.952381
42
# 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.414815
135
'''Encoder eval for MS-SSIM ''' from cortex.main import run from cortex_DIM.configs.deconvnets import configs as decoder_configs from cortex_DIM.models.decoder import Decoder class MSSSIMEval(Decoder): '''Measure MS-SSIM through a decoder trained with reconstruction. ''' defaults = dict( data=...
[ 7061, 6, 27195, 12342, 5418, 329, 6579, 12, 5432, 3955, 198, 198, 7061, 6, 198, 198, 6738, 20223, 13, 12417, 1330, 1057, 198, 198, 6738, 20223, 62, 35, 3955, 13, 11250, 82, 13, 12501, 261, 85, 45938, 1330, 4566, 82, 355, 875, 12342,...
2.170807
644
# -*- coding: utf-8 -*- import asyncio import aiohttp if __name__ == "__main__": loop = asyncio.get_event_loop() yahoo = Yahoo() loop.run_until_complete(yahoo.fetch_price()) loop.run_forever()
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 30351, 952, 198, 11748, 257, 952, 4023, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 9052, 796, 30351, 952, 13, 1...
2.355556
90
"""Reusable utilities for data and model I/O""" from ._data_io import ( load_data, save_csv, try_load_data, try_load_xy, ) from ._model_io import save, saver DIVIK_RESULT_FNAME = "result.pkl" __all__ = [ "load_data", "save_csv", "try_load_data", "try_load_xy", "save", "saver", ...
[ 37811, 3041, 31979, 20081, 329, 1366, 290, 2746, 314, 14, 46, 37811, 198, 6738, 47540, 7890, 62, 952, 1330, 357, 198, 220, 220, 220, 3440, 62, 7890, 11, 198, 220, 220, 220, 3613, 62, 40664, 11, 198, 220, 220, 220, 1949, 62, 2220, ...
2.13245
151
import pyglet import rabbyt from pyglet.window import key from pyglet.window import mouse from pyglet.gl import * from tools import *
[ 11748, 12972, 70, 1616, 198, 11748, 27998, 1525, 83, 198, 6738, 12972, 70, 1616, 13, 17497, 1330, 1994, 198, 6738, 12972, 70, 1616, 13, 17497, 1330, 10211, 198, 6738, 12972, 70, 1616, 13, 4743, 1330, 1635, 198, 6738, 4899, 1330, 1635, ...
3.190476
42
# -*- coding: utf-8 -*- """ Created on Fri Apr 30 22:41:09 2021 @author: amanda """ # loop through the .zip files and create images in .png format # import necessary libraries import os import image_to_png directory = "dataset_zip" #file_extensions = ["OSAVI", "NDVI", "GNDVI", "PSRI", "NDVI45"] extension = "OSAVI" ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 19480, 2758, 1542, 2534, 25, 3901, 25, 2931, 33448, 198, 31, 9800, 25, 716, 5282, 198, 37811, 198, 198, 2, 9052, 832, 262, 764, 13344, 3696, 29...
2.773026
304
import pandas as pd CRITERIA = [ "largely_recommended", "reliability", "importance", "engaging", "pedagogy", "layman_friendly", "entertaining_relaxing", "better_habits", "diversity_inclusion", "backfire_risk", ] TCOLOR = [ "#1282b2", "#DC8A5D", "#C28BED", "#4C7...
[ 11748, 19798, 292, 355, 279, 67, 628, 198, 9419, 2043, 1137, 3539, 796, 685, 198, 220, 220, 220, 366, 11664, 306, 62, 47335, 1631, 1600, 198, 220, 220, 220, 366, 2411, 12455, 1600, 198, 220, 220, 220, 366, 11748, 590, 1600, 198, 220...
2.157623
387
# Copyright (c) 2015 Orange. # 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 a...
[ 2, 15069, 357, 66, 8, 1853, 11942, 13, 198, 2, 1439, 6923, 33876, 13, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 220, 407, 779,...
1.985011
4,203
from diepvries.deserializers.snowflake_deserializer import ( DatabaseConfiguration, SnowflakeDeserializer, ) if __name__ == "__main__": deserialize()
[ 6738, 4656, 79, 85, 1678, 13, 8906, 48499, 11341, 13, 82, 2197, 47597, 62, 8906, 48499, 7509, 1330, 357, 198, 220, 220, 220, 24047, 38149, 11, 198, 220, 220, 220, 7967, 47597, 5960, 48499, 7509, 11, 198, 8, 628, 198, 198, 361, 11593...
2.75
60
""" Metrics measuring either uncertainty or confidence of a model. """ import torch import torch.nn.functional as F
[ 37811, 198, 9171, 10466, 15964, 2035, 13479, 393, 6628, 286, 257, 2746, 13, 198, 37811, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 628, 628, 628 ]
4.033333
30
# # PySNMP MIB module TUBS-IBR-AGENT-CAPABILITIES (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/TUBS-IBR-AGENT-CAPABILITIES # Produced by pysmi-0.3.4 at Wed May 1 15:27:47 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python versio...
[ 2, 198, 2, 9485, 15571, 7378, 337, 9865, 8265, 309, 52, 4462, 12, 9865, 49, 12, 4760, 3525, 12, 33177, 32, 49516, 357, 4023, 1378, 16184, 76, 489, 8937, 13, 785, 14, 79, 893, 11632, 8, 198, 2, 7054, 45, 13, 16, 2723, 2393, 1378,...
2.677954
1,388
import PIL from PIL import ImageFont from PIL import Image from PIL import ImageDraw import numpy as np import matplotlib.pyplot as plt import os from skimage.filters import threshold_otsu import scipy from scipy import ndimage from scipy.interpolate import griddata import cv2 import preprocess if __name__ == "__ma...
[ 11748, 350, 4146, 198, 6738, 350, 4146, 1330, 7412, 23252, 198, 6738, 350, 4146, 1330, 7412, 198, 6738, 350, 4146, 1330, 7412, 25302, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83,...
2.306122
1,029
import os import sys import numpy as np import scipy.stats as stats import pandas as pd from IPython import embed from qlknn.NNDB.model import Network, NetworkJSON from qlknn.models.ffnn import QuaLiKizNDNN shortname = {'Ate': '$R/L_{T_e}$', 'Ati': '$R/L_{T_i}$'} longname ={ 'Ate': 'Normalized el...
[ 11748, 28686, 198, 11748, 25064, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 629, 541, 88, 13, 34242, 355, 9756, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 6101, 7535, 1330, 11525, 198, 198, 6738, 10662, 75, 15418, 77, ...
1.865297
876
"""Alconna ArgAction相关""" from datetime import datetime from typing import Any, Optional, TYPE_CHECKING, Literal from arclet.alconna.components.action import ArgAction from arclet.alconna.components.behavior import ArpamarBehavior from arclet.alconna.exceptions import BehaveCancelled, OutBoundsBehavior from arclet.alc...
[ 37811, 2348, 1102, 2616, 20559, 12502, 33566, 116, 17739, 111, 37811, 198, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 19720, 1330, 4377, 11, 32233, 11, 41876, 62, 50084, 2751, 11, 25659, 1691, 198, 6738, 10389, 1616, 13, 282, 1...
1.702081
913
from django.contrib import admin from notification.models import Notifications # Register your models here. admin.site.register(Notifications)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 14483, 13, 27530, 1330, 1892, 6637, 198, 2, 17296, 534, 4981, 994, 13, 198, 28482, 13, 15654, 13, 30238, 7, 3673, 6637, 8 ]
4.30303
33
#!/usr/bin/env python ''' Outer ear simulator Author: Michal Sudwoj <msudwoj@student.ethz.ch> Version: 1.0.0 Data: 2019-09-09 ''' from typing import Tuple import numpy as np import scipy.io.wavfile as wav import scipy.signal as ss from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter from pysofaconventio...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 7061, 6, 198, 7975, 263, 1027, 35375, 198, 198, 13838, 25, 2843, 282, 14818, 86, 13210, 1279, 907, 463, 86, 13210, 31, 50139, 13, 2788, 89, 13, 354, 29, 198, 14815, 25, 352, 13, 15...
2.295578
1,289
import numpy as np import math
[ 11748, 299, 32152, 355, 45941, 198, 11748, 10688, 628, 198 ]
3.3
10
from flask import Flask, Blueprint, request, jsonify, make_response, redirect, url_for from werkzeug.security import generate_password_hash, check_password_hash from functools import wraps from db import db_connect import datetime import jwt import sys auth = Blueprint('auth', __name__) @auth.route('/login') @db_co...
[ 6738, 42903, 1330, 46947, 11, 39932, 11, 2581, 11, 33918, 1958, 11, 787, 62, 26209, 11, 18941, 11, 19016, 62, 1640, 198, 6738, 266, 9587, 2736, 1018, 13, 12961, 1330, 7716, 62, 28712, 62, 17831, 11, 2198, 62, 28712, 62, 17831, 198, ...
3.431579
95
# yelp/urls.py from django.urls import path from django.conf.urls import url from rest_framework.urlpatterns import format_suffix_patterns # view functions from .views import hello from .views import home urlpatterns = { path('', hello, name='hello'), path('<slug:business_id>', home, name='home'), } urlpatte...
[ 2, 331, 417, 79, 14, 6371, 82, 13, 9078, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 198, 6738, 1334, 62, 30604, 13, 6371, 33279, 82, 1330, 5794, 62, 37333, 844, ...
2.934959
123
import tensorflow as tf def model_inputs(image_size): ''' Defines CNN inputs (placeholders). :param image_size: tuple, (height, width) of an image ''' #-> [Batch_size, image_size[0], image_size[1], 3] inputs = tf.placeholder(dtype=tf.float32, shape=[None, image_size[0], image_si...
[ 11748, 11192, 273, 11125, 355, 48700, 201, 198, 201, 198, 201, 198, 4299, 2746, 62, 15414, 82, 7, 9060, 62, 7857, 2599, 201, 198, 220, 220, 220, 705, 7061, 201, 198, 220, 220, 220, 2896, 1127, 8100, 17311, 357, 5372, 10476, 737, 201...
1.979989
1,849
#!/usr/bin/python # -*- coding: utf-8 -*- # Adapted from https://github.com/priba/nmp_qc """ utils.py: Functions to process dataset graphs. Usage: """ from __future__ import print_function import rdkit import torch from joblib import Parallel, delayed import multiprocessing import networkx as nx import nu...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 30019, 276, 422, 3740, 1378, 12567, 13, 785, 14, 79, 822, 64, 14, 77, 3149, 62, 80, 66, 198, 198, 37811, 198, 22...
2.381898
453
''' ############################################################################### Ultrafast Quantum Optics Package ############################################################################### Quantum Optics and Quantum Information Group Written by > Jean-Philippe MacLean: jpmaclean@uwaterloo.ca > Sacha Schwarz s...
[ 7061, 6, 198, 29113, 29113, 7804, 4242, 21017, 198, 36122, 7217, 29082, 13123, 873, 15717, 198, 29113, 29113, 7804, 4242, 21017, 198, 198, 24915, 388, 13123, 873, 290, 29082, 6188, 4912, 198, 25354, 416, 220, 198, 29, 11320, 12, 49680, ...
3.75
180
import os, sys from flask import request from flask_restplus import Namespace, Resource, fields from flask.wrappers import Response from app.utils.async_action import async_action from app.api_response import ApiResponse from app.errors import ApiException, JobTemplateNotFound, PlaybookFailure, PlaybookTimeout, Switch...
[ 11748, 28686, 11, 25064, 198, 6738, 42903, 1330, 2581, 198, 6738, 42903, 62, 2118, 9541, 1330, 28531, 10223, 11, 20857, 11, 7032, 198, 6738, 42903, 13, 29988, 11799, 1330, 18261, 198, 6738, 598, 13, 26791, 13, 292, 13361, 62, 2673, 1330...
2.337255
2,550
# Authors: Stephane Gaiffas <stephane.gaiffas@gmail.com> # Ibrahim Merad <imerad7@gmail.com> # License: BSD 3 clause """ This module implement the ``TMean`` class for the trimmed-means robust estimator. `StateTMean` is a place-holder for the TMean estimator containing: """ from collections import namedtupl...
[ 2, 46665, 25, 39644, 1531, 12822, 733, 292, 1279, 9662, 71, 1531, 13, 4908, 733, 292, 31, 14816, 13, 785, 29, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 30917, 4638, 324, 1279, 22723, 324, 22, 31, 14816, 13, 785, 29, 1...
2.491409
291
from typing import Set, List, Tuple from bauh.api.abstract.handler import ProcessWatcher from bauh.api.abstract.view import MultipleSelectComponent, InputOption from bauh.commons import resource from bauh.commons.html import bold from bauh.gems.arch import ROOT_DIR from bauh.view.util.translation import I18n
[ 6738, 19720, 1330, 5345, 11, 7343, 11, 309, 29291, 198, 198, 6738, 275, 559, 71, 13, 15042, 13, 397, 8709, 13, 30281, 1330, 10854, 54, 34734, 198, 6738, 275, 559, 71, 13, 15042, 13, 397, 8709, 13, 1177, 1330, 20401, 17563, 21950, 11...
3.171717
99
from policyglass import Action, EffectiveAction
[ 6738, 2450, 20721, 1330, 7561, 11, 29455, 12502, 628 ]
5.444444
9
import unittest import shutil import tempfile from os import path from unittest.mock import patch, mock_open from taurex.model.model import ForwardModel from taurex.model.simplemodel import SimpleForwardModel import numpy as np import pickle
[ 198, 11748, 555, 715, 395, 198, 11748, 4423, 346, 198, 11748, 20218, 7753, 198, 6738, 28686, 1330, 3108, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 8529, 11, 15290, 62, 9654, 198, 6738, 20486, 495, 87, 13, 19849, 13, 19849, 1330, ...
3.5
70
from typing import List # 迭代先序遍历
[ 6738, 19720, 1330, 7343, 198, 198, 2, 5525, 123, 255, 47987, 17739, 230, 41753, 237, 34402, 235, 43889, 228, 198 ]
1.7
20
# if __name__ == '__main__': # print "the generator function:" # print repr(counter) # print "call generator function" # c = counter() # print "the generator:" # print repr(c) # print 'iterate' # for item in c: # print 'received:', item
[ 198, 198, 2, 611, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 2, 220, 220, 220, 220, 3601, 366, 1169, 17301, 2163, 11097, 198, 2, 220, 220, 220, 220, 3601, 41575, 7, 24588, 8, 198, 2, 220, 220, 220, 220, 3601, 366, ...
2.322314
121
# -*- coding: utf-8 -*- # # Star Trek: Interstellar Transport # # Written in 2021 by Moky <albert.moky@gmail.com> # # ============================================================================== # MIT License # # Copyright (c) 2021 Albert Moky # # Permission is hereby granted, free of...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 220, 220, 2907, 12338, 25, 49041, 19940, 198, 2, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
3.091908
1,001
#!/usr/bin/python # Filename: TMWP_OO_CustDataStructures.py # TMWP = TheMitchWorksPro # Functions and/or Objects for smarter handling of common data structures # required imports are noted in the code where used/required # from ... import ... version = '0.1' python_version_support = 'code shoud be compatibi...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 7066, 12453, 25, 309, 14326, 47, 62, 6684, 62, 34, 436, 6601, 44909, 942, 13, 9078, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 309, 14326, 47, 796, 383, 44, 2007, 2304...
3.015748
254
# Copyright 2017 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """File-based buffer common. A file-based buffer which writes its events to a single file on disk, and separately maintains metadata. There are three fi...
[ 2, 15069, 2177, 383, 18255, 1505, 7294, 46665, 13, 1439, 2489, 10395, 13, 198, 2, 5765, 286, 428, 2723, 2438, 318, 21825, 416, 257, 347, 10305, 12, 7635, 5964, 326, 460, 307, 198, 2, 1043, 287, 262, 38559, 24290, 2393, 13, 198, 198,...
2.721083
8,092
from model.pgra import PGRA from model.pgra_function.sc import Score from data_utils.data_gen import LinkGenerator, init_seed_fn from torch.utils.data import DataLoader from time import perf_counter import torch import numpy as np import config from model.modules.regularizer import Regularizer import tempfile from coll...
[ 6738, 2746, 13, 6024, 430, 1330, 23842, 3861, 198, 6738, 2746, 13, 6024, 430, 62, 8818, 13, 1416, 1330, 15178, 198, 6738, 1366, 62, 26791, 13, 7890, 62, 5235, 1330, 7502, 8645, 1352, 11, 2315, 62, 28826, 62, 22184, 198, 6738, 28034, ...
3.724138
116
from astropy import cosmology as cosmo import autofit as af from autolens.pipeline import tagging from autolens.pipeline.phase import dataset from autolens.pipeline.phase.imaging.analysis import Analysis from autolens.pipeline.phase.imaging.meta_imaging import MetaImaging from autolens.pipeline.phase.imaging.result im...
[ 6738, 6468, 28338, 1330, 8615, 29126, 355, 8615, 5908, 198, 198, 11748, 1960, 1659, 270, 355, 6580, 198, 6738, 1960, 349, 641, 13, 79, 541, 4470, 1330, 49620, 198, 6738, 1960, 349, 641, 13, 79, 541, 4470, 13, 40715, 1330, 27039, 198, ...
3.27451
102
from torch.utils.data import Dataset import h5py import abc
[ 6738, 28034, 13, 26791, 13, 7890, 1330, 16092, 292, 316, 198, 11748, 289, 20, 9078, 198, 11748, 450, 66, 628 ]
3.05
20
import os import shutil import time import pprint import torch import argparse import numpy as np ## ------------------------ Basic Functions ------------------------ def one_hot(indices, depth): """ Returns a one-hot tensor. This is a PyTorch equivalent of Tensorflow's tf.one_hot. Parameters: ...
[ 11748, 28686, 198, 11748, 4423, 346, 198, 11748, 640, 198, 11748, 279, 4798, 198, 11748, 28034, 198, 11748, 1822, 29572, 198, 11748, 299, 32152, 355, 45941, 198, 198, 2235, 220, 22369, 14392, 40480, 220, 22369, 220, 198, 4299, 530, 62, ...
2.954545
616
from pyoinformatics.align import lcs, format_matrix from pyoinformatics.seq import Seq
[ 6738, 279, 8226, 259, 18982, 873, 13, 31494, 1330, 300, 6359, 11, 5794, 62, 6759, 8609, 198, 6738, 279, 8226, 259, 18982, 873, 13, 41068, 1330, 1001, 80, 628, 198 ]
2.966667
30
from __future__ import annotations import os from importlib import import_module from typing import TYPE_CHECKING, List, Type, Dict, Union from openhab_creator import logger if TYPE_CHECKING: from openhab_creator.models.configuration import Configuration from openhab_creator.output.items.baseitemscreator imp...
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 11748, 28686, 198, 6738, 1330, 8019, 1330, 1330, 62, 21412, 198, 6738, 19720, 1330, 41876, 62, 50084, 2751, 11, 7343, 11, 5994, 11, 360, 713, 11, 4479, 198, 198, 6738, 1280, 5976, 62, 45...
3.648936
94
import pandas as pd from imblearn.over_sampling import RandomOverSampler import math #Training Data re = RandomOverSampler() df = pd.read_csv("data/raw/train.csv") y = df["Survived"] x = df.drop(["Survived", "Cabin", "Name", "PassengerId", "Ticket"], axis=1) embark = ["C", "Q", "S"] genders = ["male", "female"] ...
[ 11748, 19798, 292, 355, 279, 67, 198, 6738, 545, 903, 1501, 13, 2502, 62, 37687, 11347, 1330, 14534, 5886, 16305, 20053, 198, 11748, 10688, 628, 198, 2, 44357, 6060, 198, 260, 796, 14534, 5886, 16305, 20053, 3419, 628, 198, 7568, 796, ...
2.135301
813
from typing import List from cu_pass.dpa_calculator.aggregate_interference_calculator.configuration.support.eirps import \ EIRP_DISTRIBUTION_MAP_TYPE from cu_pass.dpa_calculator.cbsd.cbsd import CbsdCategories from cu_pass.dpa_calculator.dpa.builder import RadioAstronomyFacilityNames from cu_pass.dpa_calculator.dp...
[ 6738, 19720, 1330, 7343, 198, 198, 6738, 18912, 62, 6603, 13, 67, 8957, 62, 9948, 3129, 1352, 13, 9460, 49373, 62, 3849, 4288, 62, 9948, 3129, 1352, 13, 11250, 3924, 13, 11284, 13, 68, 343, 862, 1330, 3467, 198, 220, 220, 220, 412, ...
2.663462
416
import logging import os import sys import time from typing import Union from io import IOBase from .base import Client from tftpy.shared import TIMEOUT_RETRIES from tftpy.packet import types from tftpy.exceptions import TftpException,TftpTimeout,TftpFileNotFoundError from tftpy.states import SentReadRQ,S...
[ 11748, 18931, 201, 198, 11748, 28686, 201, 198, 11748, 25064, 201, 198, 11748, 640, 201, 198, 201, 198, 6738, 19720, 1330, 4479, 201, 198, 6738, 33245, 1330, 314, 9864, 589, 201, 198, 201, 198, 6738, 764, 8692, 1330, 20985, 201, 198, ...
2.016208
3,455
import importlib max_steps = 1000 terminate_prob = 0.998 batch_size = 5 gameEnv = importlib.import_module('coin_game_v') env = gameEnv.gameEnv(terminate_prob=terminate_prob, max_steps=max_steps, batch_size=batch_size) print('state_space', env.state_space) print('red_pos', env.red_pos) print('blue_pos', env.blue_pos) ...
[ 11748, 1330, 8019, 198, 198, 9806, 62, 20214, 796, 8576, 198, 23705, 378, 62, 1676, 65, 796, 657, 13, 34808, 198, 43501, 62, 7857, 796, 642, 198, 6057, 4834, 85, 796, 1330, 8019, 13, 11748, 62, 21412, 10786, 3630, 62, 6057, 62, 85, ...
2.504225
710
# -*- coding: utf-8 -*- import pygame, os from src.sprites.MyStaticSprite import * from src.sprites.Interactive import * from src.ResourceManager import * from src.scenes.stage.OnDialogueState import * SPRITE_FILES = os.path.join("sprites", "interactives")
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 12972, 6057, 11, 28686, 198, 6738, 12351, 13, 2777, 23156, 13, 3666, 45442, 38454, 578, 1330, 1635, 198, 6738, 12351, 13, 2777, 23156, 13, 9492, 5275, 1330, ...
2.910112
89
from os import environ from boto3 import client import actions from loader import Loader ACCOUNTID = client('sts').get_caller_identity()['Account'] ARN = 'arn:aws:forecast:{region}:{account}:dataset/{name}' LOADER = Loader()
[ 6738, 28686, 1330, 551, 2268, 198, 6738, 275, 2069, 18, 1330, 5456, 198, 11748, 4028, 198, 6738, 40213, 1330, 8778, 263, 198, 198, 26861, 28270, 2389, 796, 5456, 10786, 6448, 27691, 1136, 62, 13345, 263, 62, 738, 414, 3419, 17816, 30116...
3.026667
75
from ecpy import EllipticCurve, ExtendedFiniteField, symmetric_tate_pairing import hashlib import random import cPickle # PKI secret secret = 0xdeadbeef p = int("501794446334189957604282155189438160845433783392772743395579628617109" "929160215221425142482928909270259580854362463493326988807453595748573" ...
[ 6738, 9940, 9078, 1330, 7122, 10257, 291, 26628, 303, 11, 24204, 37, 9504, 15878, 11, 23606, 19482, 62, 83, 378, 62, 24874, 278, 198, 11748, 12234, 8019, 198, 11748, 4738, 198, 11748, 269, 31686, 293, 198, 198, 2, 29673, 40, 3200, 198...
2.07529
518
# -*- coding: utf-8 -*- # Generated by Django 1.11.6 on 2017-10-12 20:32 from __future__ import unicode_literals import annoying.fields import byro.common.models.auditable from django.db import migrations, models import django.db.models.deletion import localflavor.generic.models
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 1157, 13, 21, 319, 2177, 12, 940, 12, 1065, 1160, 25, 2624, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, ...
2.968421
95
# -*- coding: utf-8 -*- from dataclasses import dataclass from typing import Any, Dict, List, NamedTuple, Optional from bkuser_core.categories.plugins.ldap.models import DepartmentProfile, UserProfile from bkuser_core.user_settings.loader import ConfigProvider from django.utils.encoding import force_str from ldap3.uti...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 6738, 19720, 1330, 4377, 11, 360, 713, 11, 7343, 11, 34441, 51, 29291, 11, 32233, 198, 198, 6738, 275, 74, 7220, 6...
2.262757
1,705
# IMPORTS # DATA data = [] with open("Data - Day04.txt") as file: for line in file: data.append(line.strip().split(" ")) # GOAL 1 """ A new system policy has been put in place that requires all accounts to use a passphrase instead of simply a password. A passphrase consists of a series of words (lowerca...
[ 2, 30023, 33002, 198, 198, 2, 42865, 198, 7890, 796, 17635, 198, 4480, 1280, 7203, 6601, 532, 3596, 3023, 13, 14116, 4943, 355, 2393, 25, 198, 220, 220, 220, 329, 1627, 287, 2393, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1366, ...
2.823651
482
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
[ 2, 16529, 1783, 10541, 198, 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 17168, 13789, 13, 4091, 13789, 13, 14116, 287, 262, 1628, 6808, 329, 5964, 1321, 13, 198, 2, 16529, 1783, 10541, 198,...
5.020619
97
#! /usr/bin/env python """ An implementation of Vanilla Policy Gradient (VPG) for solo_escape_task VPG is a model free, on policy, reinforcement learning algorithm (https://papers.nips.cc/paper/1713-policy-gradient-methods-for-reinforcement-learning-with-function-approximation.pdf) Author: LinZHanK (linzhank@gmail.com)...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 198, 2025, 7822, 286, 33897, 7820, 17701, 1153, 357, 53, 6968, 8, 329, 12199, 62, 41915, 62, 35943, 198, 53, 6968, 318, 257, 2746, 1479, 11, 319, 2450, 11, 37414, 4673, 1186...
2.163529
2,709
# Buycoin Python SDK # Copyright 2021 Iyanuoluwa Ajao # See LICENCE for details. """ Authentication is handled by the :any:`Airtable` class. >>> airtable = Airtable(base_key, table_name, api_key) Note: You can also use this class to handle authentication for you if you are making your own wrapper: >>> aut...
[ 2, 11763, 3630, 11361, 26144, 198, 2, 15069, 33448, 314, 4121, 84, 349, 84, 10247, 22028, 5488, 198, 2, 4091, 38559, 18310, 329, 3307, 13, 198, 198, 37811, 198, 47649, 3299, 318, 12118, 416, 262, 1058, 1092, 25, 63, 32, 2265, 540, 6...
2.934524
168
#!/usr/bin/env python3 ###Description: The tool reads cern web services behind SSO using user certificates from __future__ import print_function import os, urllib, urllib2, httplib, cookielib, sys, HTMLParser, re from optparse import OptionParser if __name__ == "__main__": parser = OptionParser(usage="%prog [-d(ebug...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 21017, 11828, 25, 383, 2891, 9743, 269, 1142, 3992, 2594, 2157, 6723, 46, 1262, 2836, 20835, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 28686, 11, 2956, 297, 5...
2.932039
412
# -*- coding: utf-8 -*- import filecmp import json import os import pkgutil import zipfile import hypothesis import pytest import six from verta.tracking.entities._deployable_entity import _DeployableEntity from verta._internal_utils.custom_modules import CustomModules from .. import utils from . import contexts
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 2393, 48991, 198, 11748, 33918, 198, 11748, 28686, 198, 11748, 279, 10025, 22602, 198, 11748, 19974, 7753, 198, 198, 11748, 14078, 198, 11748, 12972, 9288, 198, ...
3.393617
94
# We need those imports for migrations compatibility purpose from privatemedia.storage import ProtectedStorage, PrivateStorage # noqa
[ 2, 775, 761, 883, 17944, 329, 15720, 602, 17764, 4007, 198, 6738, 21883, 368, 5507, 13, 35350, 1330, 5038, 11197, 31425, 11, 15348, 31425, 220, 1303, 645, 20402, 198 ]
4.655172
29
# -*- coding: utf-8 -*- # # Copyright (c) 2014 Ari Aosved # http://github.com/devaos/sublime-remote/blob/master/LICENSE """This module implements an API layer for Vagrant related functionality.""" import re import subprocess # ============================================================================= def parse_...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 357, 66, 8, 1946, 6069, 317, 418, 1079, 198, 2, 2638, 1378, 12567, 13, 785, 14, 7959, 7495, 14, 7266, 27299, 12, 47960, 14, 2436, 672, 14, 9866, ...
2.429932
735
import gym import numpy as np from gym_framework.panda_ctrl.panda_mujoco_base_ctrl import PandaBase class PandaTorqueControl(PandaBase): """ Control the Panda robot by directly applying torques (control=torque). """ @property @property @property @property
[ 11748, 11550, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 11550, 62, 30604, 13, 79, 5282, 62, 44755, 13, 79, 5282, 62, 76, 23577, 25634, 62, 8692, 62, 44755, 1330, 41112, 14881, 628, 198, 4871, 41112, 15884, 4188, 15988, 7, 47...
2.939394
99
import plotly.express as px import plotly.io as pio import plotly.graph_objects as go from plotly.subplots import make_subplots import pandas as pd import numpy as np from agents import * from generators import * from CMDataLoader import CMDataLoader from Simulator import Simulator from plotutils import update_layout...
[ 11748, 7110, 306, 13, 42712, 355, 279, 87, 198, 11748, 7110, 306, 13, 952, 355, 279, 952, 198, 11748, 7110, 306, 13, 34960, 62, 48205, 355, 467, 198, 6738, 7110, 306, 13, 7266, 489, 1747, 1330, 787, 62, 7266, 489, 1747, 198, 198, ...
2.558857
875
__all__ = ( "extract_value", "extract_errors", ) from typing import ( cast, Any, Type, Union, List, ) from testplates.impl.value import ( MISSING, ) from testplates.impl.exceptions import ( TestplatesError, ) from .attrs import ( TESTPLATES_ERRORS_ATTR, TESTPLATES_VALUE_A...
[ 834, 439, 834, 796, 357, 198, 220, 220, 220, 366, 2302, 974, 62, 8367, 1600, 198, 220, 220, 220, 366, 2302, 974, 62, 48277, 1600, 198, 8, 198, 198, 6738, 19720, 1330, 357, 198, 220, 220, 220, 3350, 11, 198, 220, 220, 220, 4377, ...
2.447154
369
# Copyright 2014 Diamond Light Source 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, 1946, 13566, 4401, 8090, 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, 198, ...
3.578947
361
import torch # cand_ids = torch.randint(0,10000,(10,)) # print(cand_ids.dtype) # print(cand_ids.shape) scores = torch.Tensor([[ 0, 1, 2],[ 3, 4, 5],[ 6, 7, 8],[ 9, 10, 11]]) a=scores[0:2] # print(a) # print(scores.dtype) # print(scores.shape) # scores[[1,2,3]] # with torch.autograd.profiler.profile(record_shap...
[ 11748, 28034, 628, 198, 2, 2658, 62, 2340, 796, 28034, 13, 25192, 600, 7, 15, 11, 49388, 11, 7, 940, 11, 4008, 198, 2, 3601, 7, 46188, 62, 2340, 13, 67, 4906, 8, 198, 2, 3601, 7, 46188, 62, 2340, 13, 43358, 8, 198, 1416, 2850,...
2.223301
206
import csv from decimal import Decimal from itertools import islice from datetime import datetime, timedelta import pytest from bs4 import BeautifulSoup from src.jamberry.workstation import extract_shipping_address, extract_line_items, parse_order_row_soup, \ JamberryWorkstation # uncomment these lines to see ...
[ 11748, 269, 21370, 198, 6738, 32465, 1330, 4280, 4402, 198, 198, 6738, 340, 861, 10141, 1330, 318, 75, 501, 198, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 11748, 12972, 9288, 198, 6738, 275, 82, 19, 1330, 23762, ...
2.731707
369
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2020-03-28 11:49 from __future__ import unicode_literals from django.db import migrations
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 1157, 319, 12131, 12, 3070, 12, 2078, 1367, 25, 2920, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 673...
2.754717
53
""" clustering_utils.py: utilitary functions for the clustering.py module. """ import numpy as np from enum import IntEnum from .utils import find_in_sequence class Link(IntEnum): """ Represents state of coreferring links. Must be negative integers to not interfere with the clustering process. """ ...
[ 37811, 198, 565, 436, 1586, 62, 26791, 13, 9078, 25, 3384, 18748, 5499, 329, 262, 32966, 1586, 13, 9078, 8265, 13, 198, 37811, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 33829, 1330, 2558, 4834, 388, 198, 6738, 764, 26791, 13...
2.395792
998