content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
from pyvisdk.esxcli.executer import execute_soap from pyvisdk.esxcli.base import Base class StorageCorePathStats(Base): ''' Stats operations pertaining to the pluggable storage architectures' device paths on the system. ''' moid = 'ha-cli-handler-storage-core-path-stats' def get(self, path=None):...
[ 198, 6738, 12972, 4703, 34388, 13, 274, 87, 44506, 13, 18558, 11894, 1330, 12260, 62, 568, 499, 198, 6738, 12972, 4703, 34388, 13, 274, 87, 44506, 13, 8692, 1330, 7308, 198, 198, 4871, 20514, 14055, 15235, 29668, 7, 14881, 2599, 198, ...
2.380665
331
from dataclasses import dataclass from typing import Optional @dataclass
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 6738, 19720, 1330, 32233, 628, 198, 31, 19608, 330, 31172, 198 ]
3.75
20
#BEWARE: automatically generated code #This code was generated by /generate/__main__.py from opengl.gl.raw.bindings import * @accepts(t.enum, t.enum) @returns(t.void) @binds(dll) def blend_equation_separate(modergb, modealpha): ''' set the RGB blend equation and the alpha blend equation separately. A...
[ 2, 33, 6217, 12203, 25, 6338, 7560, 2438, 198, 2, 1212, 2438, 373, 7560, 416, 1220, 8612, 378, 14, 834, 12417, 834, 13, 9078, 198, 198, 6738, 1280, 4743, 13, 4743, 13, 1831, 13, 21653, 654, 1330, 1635, 198, 198, 31, 13635, 82, 7, ...
2.637426
11,035
from bs4 import BeautifulSoup from urllib import request from urllib.error import HTTPError import tqdm import os import argparse if __name__ == '__main__': main()
[ 6738, 275, 82, 19, 1330, 23762, 50, 10486, 201, 198, 6738, 2956, 297, 571, 1330, 2581, 201, 198, 6738, 2956, 297, 571, 13, 18224, 1330, 14626, 12331, 201, 198, 11748, 256, 80, 36020, 201, 198, 11748, 28686, 201, 198, 11748, 1822, 2957...
2.637681
69
# -*- coding: utf-8 -*- """ Created on Sat May 2 11:26:18 2020 @author: max """ import cv2 import numpy as np from PIL import Image, ImageDraw, ImageFont import requests
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 7031, 1737, 220, 362, 1367, 25, 2075, 25, 1507, 12131, 198, 198, 31, 9800, 25, 3509, 198, 37811, 198, 11748, 269, 85, 17, 198, 11748, 299, 3215...
2.758065
62
from nose.tools import assert_equal import os import tempfile import re from asciinema.config import Config
[ 6738, 9686, 13, 31391, 1330, 6818, 62, 40496, 198, 198, 11748, 28686, 198, 11748, 20218, 7753, 198, 11748, 302, 198, 198, 6738, 355, 979, 7749, 64, 13, 11250, 1330, 17056, 628, 198 ]
3.5
32
import requests from base64 import b32encode, b32decode, b64encode, b64decode, b85encode, b85decode from base58 import b58decode, b58encode import base91 import hashlib import json def ensure_str(s, encoding='utf-8', errors='strict'): """Coerce *s* to `str`. For Python 3: - `str` -> `str` - `byte...
[ 11748, 7007, 198, 6738, 2779, 2414, 1330, 220, 275, 2624, 268, 8189, 11, 275, 2624, 12501, 1098, 11, 275, 2414, 268, 8189, 11, 275, 2414, 12501, 1098, 11, 275, 5332, 268, 8189, 11, 275, 5332, 12501, 1098, 198, 6738, 2779, 3365, 1330, ...
2.347328
262
""" Cascaded Convolution Model - Pranav Shrestha (ps2958) - Jeffrey Wan (jw3468) """ import pickle import numpy as np import pandas as pd import matplotlib.pyplot as plt from keras.preprocessing import text, sequence from keras.preprocessing.text import Tokenizer from keras.utils import to_categorical from keras.mo...
[ 37811, 198, 34, 3372, 5286, 34872, 2122, 9104, 198, 198, 12, 1736, 272, 615, 911, 2118, 3099, 357, 862, 1959, 3365, 8, 198, 12, 19627, 33242, 357, 73, 86, 2682, 3104, 8, 198, 198, 37811, 198, 198, 11748, 2298, 293, 198, 11748, 299, ...
2.601626
1,968
# #author :Sachin Mehta #Description : This repository contains source code for semantically segmenting WSIs; however, it could be easily # adapted for other domains such as natural image segmentation #File Description: This file implements the Cross entropy loss for 2D data. #===========...
[ 2, 198, 2, 9800, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 50, 620, 259, 2185, 4352, 64, 198, 2, 11828, 220, 220, 220, 220, 1058, 770, 16099, 4909, 2723, 2438, 329, 5026, 31589, 10618, 278, 25290, 3792, 26, 2158, 11, 340,...
3.791667
120
""" Defines the abstract class Aardvark Connection, which is used by child classes to test the I2C and SPI connections. """ from abc import ABCMeta, abstractmethod import unittest from aardvark_py import aa_find_devices_ext, aa_open, aa_close, AA_PORT_NOT_FREE class AardvarkConnection(unittest.TestCase): """ ...
[ 37811, 198, 7469, 1127, 262, 12531, 1398, 317, 446, 85, 668, 26923, 11, 543, 318, 973, 416, 1200, 6097, 198, 1462, 1332, 262, 314, 17, 34, 290, 49091, 8787, 13, 198, 37811, 198, 198, 6738, 450, 66, 1330, 9738, 48526, 11, 12531, 2439...
2.367694
941
#!/usr/bin/env python # _*_coding:utf-8 _*_ #@Time :2020/12/8 13:52 #@Author :Wenbo #@FileName: dataset.py.py import numpy as np from PIL import Image from paddle.io import Dataset import paddle.vision.transforms as T import paddle as pd class MyDataset(Dataset): """ 步骤一:继承paddle.io.Dataset...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 201, 198, 2, 4808, 9, 62, 66, 7656, 25, 40477, 12, 23, 4808, 9, 62, 201, 198, 2, 31, 7575, 220, 220, 220, 1058, 42334, 14, 1065, 14, 23, 1511, 25, 4309, 201, 198, 2, 31, 13838, 220,...
1.661635
795
from avatar2.targets import Target, TargetStates from avatar2.protocols.gdb import GDBProtocol from .target import action_valid_decorator_factory, synchronize_state from ..watchmen import watch
[ 6738, 30919, 17, 13, 83, 853, 1039, 1330, 12744, 11, 12744, 42237, 198, 6738, 30919, 17, 13, 11235, 4668, 82, 13, 70, 9945, 1330, 402, 11012, 19703, 4668, 198, 198, 6738, 764, 16793, 1330, 2223, 62, 12102, 62, 12501, 273, 1352, 62, ...
3.225806
62
print("merhaba") print("merhaba") print("merhaba") print("merhaba")
[ 4798, 7203, 647, 5976, 64, 4943, 198, 4798, 7203, 647, 5976, 64, 4943, 198, 4798, 7203, 647, 5976, 64, 4943, 198, 4798, 7203, 647, 5976, 64, 4943 ]
2.481481
27
import re import math from copy import deepcopy import pulsar as psr from . import ApplyBasisSet def make_system(SomeString): """This function turns a string into a system object, which it then returns Special thanks to Lori A. Burns for the original version of this function ============================...
[ 11748, 302, 198, 11748, 10688, 198, 6738, 4866, 1330, 2769, 30073, 198, 11748, 22271, 283, 355, 26692, 81, 198, 6738, 764, 1330, 27967, 15522, 271, 7248, 628, 198, 4299, 787, 62, 10057, 7, 4366, 10100, 2599, 198, 220, 220, 220, 37227, ...
2.045166
2,834
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Поле first — целое число, целая часть числа; поле second — положительное целое число, дробная часть числа. Реализовать метод multiply() — умножение на произвольное целое число типа int. Метод должен правильно работать при любых допустимых значениях first и seco...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 201, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 201, 198, 37811, 201, 198, 140, 253, 25443, 119, 16843, 717, 851, 220, 141, 228, 16843, 30143, 15166, 1...
1.268817
372
from flask import Flask, render_template, redirect, url_for, request, make_response from flask_bootstrap import Bootstrap from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, BooleanField from wtforms.validators import InputRequired , Email, Length from flask_sqlalchemy import SQLAlchemy from...
[ 6738, 42903, 1330, 46947, 11, 8543, 62, 28243, 11, 18941, 11, 19016, 62, 1640, 11, 2581, 11, 787, 62, 26209, 198, 6738, 42903, 62, 18769, 26418, 1330, 18892, 26418, 198, 6738, 42903, 62, 86, 27110, 1330, 46947, 8479, 198, 6738, 266, 8...
2.842105
494
import inspect import importlib import os.path from urlparse import urlunsplit """ * adds github_link(mode) context variable: provides URL (in relevant mode) of current document on github * if sphinx.ext.linkcode is enabled, automatically generates github linkcode links (by setting config.linkcode_resolve) Settin...
[ 11748, 10104, 198, 11748, 1330, 8019, 198, 11748, 28686, 13, 6978, 198, 6738, 19016, 29572, 1330, 19016, 13271, 489, 270, 198, 198, 37811, 198, 9, 6673, 33084, 62, 8726, 7, 14171, 8, 4732, 7885, 25, 3769, 10289, 357, 259, 5981, 4235, ...
3.308924
437
#! /usr/bin/python # -*- coding: utf-8 -*- """ Module is used for visualization of segmentation stored in pkl, dcm and other files. """ from loguru import logger import io3d import sed3 import numpy as np pth = io3d.datasets.join_path("medical", "orig", "3Dircadb1.1", "PATIENT_DICOM", get_root=True) datap = io3d.read...
[ 2, 0, 1220, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 26796, 318, 973, 329, 32704, 286, 10618, 341, 8574, 287, 279, 41582, 11, 288, 11215, 290, 584, 3696, 13, 198, ...
2.1883
547
from threading import Thread import gui from tools import clipboard, qrcode, generate_token import os import tempfile import uuid import time import shutil import tkinter as tk from tkinter.filedialog import asksaveasfilename from tkinter.messagebox import askyesno class Gallery(Thread): """ The Gallery clas...
[ 6738, 4704, 278, 1330, 14122, 198, 11748, 11774, 198, 6738, 4899, 1330, 47999, 11, 10662, 6015, 1098, 11, 7716, 62, 30001, 198, 11748, 28686, 198, 11748, 20218, 7753, 198, 11748, 334, 27112, 198, 11748, 640, 198, 11748, 4423, 346, 198, ...
2.334642
3,565
# -*- coding: utf-8 -*- # Generated by Django 1.9.6 on 2016-05-12 00:31 from __future__ import unicode_literals from django.db import migrations, models import jsonfield.fields
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 24, 13, 21, 319, 1584, 12, 2713, 12, 1065, 3571, 25, 3132, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 1...
2.84127
63
#!/usr/bin/python3.9 # Copyright (c) 2021 MobileCoin Inc. # Copyright (c) 2021 The Forest Team import asyncio import copy import logging import os from contextlib import asynccontextmanager from typing import Any, AsyncGenerator, Callable, Optional, Union try: import asyncpg DUMMY = False except ImportError:...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 13, 24, 198, 2, 15069, 357, 66, 8, 33448, 12173, 24387, 3457, 13, 198, 2, 15069, 357, 66, 8, 33448, 383, 9115, 4816, 198, 198, 11748, 30351, 952, 198, 11748, 4866, 198, 11748, 18931, 198, ...
2.198737
3,009
"""Visitors that make certain mutations to the AST""" import sys import os from src.modules.php import syntax_tree from src.modules.php.base import Visitor from src.compiler.php import phpast class DependencyResolver(Visitor): """Expands the tree by augmenting the ASTs for files added in it using Include...
[ 37811, 15854, 6742, 326, 787, 1728, 23005, 284, 262, 29273, 37811, 198, 198, 11748, 25064, 198, 11748, 28686, 198, 198, 6738, 12351, 13, 18170, 13, 10121, 1330, 15582, 62, 21048, 198, 6738, 12351, 13, 18170, 13, 10121, 13, 8692, 1330, 6...
2.407143
560
# coding: utf-8 # # Copyright (c) 2019 Zoltán Máté # All Rights Reserved. # # Author: Zoltán Máté <mate.zoltan0@gmail.com> #
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 2, 198, 2, 15069, 357, 66, 8, 13130, 1168, 5978, 21162, 337, 6557, 83, 2634, 198, 2, 1439, 6923, 33876, 13, 198, 2, 198, 2, 6434, 25, 1168, 5978, 21162, 337, 6557, 83, 2634, 1279, 9830, 13, ...
2.210526
57
# send mail function import smtplib from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from email.header import Header import time from jinja2 import Environment, FileSystemLoader import configparser
[ 2, 3758, 6920, 2163, 198, 11748, 895, 83, 489, 571, 198, 6738, 3053, 13, 76, 524, 13, 16680, 541, 433, 1330, 337, 3955, 3620, 586, 541, 433, 198, 6738, 3053, 13, 76, 524, 13, 5239, 1330, 337, 3955, 2767, 2302, 198, 6738, 3053, 13,...
3.515152
66
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 from django.db import models from rapidsms.webui.managers import * class Location(models.Model): """A Location is technically a geopgraphical point (lat+long), but is often used to represent a large area such as a city or state. It is recursive v...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 43907, 25, 257, 72, 40379, 28, 19, 39747, 28, 19, 2123, 1509, 28, 19, 628, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 4095, 2340, 907, 13, 12384, 9019, 13, 805, 1...
2.650051
983
from .randomized import * from .swap import * from .comp_uncomp import *
[ 6738, 764, 25120, 1143, 1330, 1635, 198, 6738, 764, 2032, 499, 1330, 1635, 198, 6738, 764, 5589, 62, 403, 5589, 1330, 1635, 198 ]
3.173913
23
# # ---------------------------------------------------------------------------------------------------- # DESCRIPTION # ---------------------------------------------------------------------------------------------------- # # --------------------------------------------------------------------------------------------...
[ 2, 198, 2, 16529, 3880, 650, 198, 2, 22196, 40165, 198, 2, 16529, 3880, 650, 628, 198, 2, 198, 2, 16529, 3880, 650, 198, 2, 30023, 33002, 198, 2, 16529, 3880, 650, 198, 6738, 42625, 14208, 13, 4023, 220, 220, 220, 220, 220, 220, ...
5.092742
248
""" Copyright (C) 2020 Intel Corporation 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 wri...
[ 37811, 198, 15069, 357, 34, 8, 12131, 8180, 10501, 628, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 921, 743, 7...
3.578073
602
import csv
[ 11748, 269, 21370 ]
3.333333
3
# -*- coding: utf-8 -*- # @author Vasileios Choutas # Contact: vassilis.choutas@tuebingen.mpg.de from __future__ import absolute_import from __future__ import print_function from __future__ import division from typing import NewType, List, Tuple import torch from torch import norm import torch.optim as optim impor...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 2488, 9800, 23663, 576, 4267, 609, 448, 292, 198, 2, 14039, 25, 410, 562, 346, 271, 13, 354, 448, 292, 31, 83, 518, 4623, 268, 13, 3149, 70, 13, 2934, 628,...
3.06015
133
# -*- coding: utf-8 -*- # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "L...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 393, 517, 198, 2, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 9387, 351, 198, 2,...
2.599317
1,757
""" A script that scrapes various bits of data from subreddits """ import praw import requests import os import sqlite3 SQ_LITE_FILE = "avexchange_data.db" def get_urls(subreddit): """ scrape for certain keywords on a subreddit """ print("getting urls from r/{}".format(subreddit)) reddit = praw.Reddit...
[ 37811, 317, 4226, 326, 15881, 274, 2972, 10340, 286, 1366, 422, 46386, 198, 37811, 198, 11748, 279, 1831, 198, 11748, 7007, 198, 11748, 28686, 198, 11748, 44161, 578, 18, 198, 198, 50, 48, 62, 43, 12709, 62, 25664, 796, 366, 1015, 87,...
2.512448
482
#!/usr/bin/python # -*- coding: utf-8 -*- """ Created on 2017-12-22 @author: foxty Node Agent """ # ============================== # Node Agent # ============================== import os import sys import logging import logging.handlers import socket import select import Queue as Q import threading from datetime im...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 41972, 319, 2177, 12, 1065, 12, 1828, 198, 31, 9800, 25, 11511, 742, 88, 198, 198, 19667, 15906, 198, 37811...
2.224272
1,030
#!/usr/bin/python #---------------------------------------------------------------- # #------------------------------------------------------ # Usage: # #------------------------------------------------------ # Copyright 2007, Oliver White # # This program is free software: you can redistribute it and/or modify # it un...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 10097, 198, 2, 198, 2, 3880, 19351, 438, 198, 2, 29566, 25, 198, 2, 198, 2, 3880, 19351, 438, 198, 2, 15069, 4343, 11, 15416, 2635, 198, 2, 198, 2, 770, 1430, 318, 1479, 3788, 25, ...
4.094077
287
import re from functools import wraps from gooey.gui.components.filtering.prefix_filter import OperatorType class SuperBool(object): """ A boolean which keeps with it the rationale for when it is false. """ __nonzero__ = __bool__ def lift(f): """ Lifts a basic predicate to the SuperBoo...
[ 11748, 302, 198, 6738, 1257, 310, 10141, 1330, 27521, 198, 198, 6738, 467, 2577, 88, 13, 48317, 13, 5589, 3906, 13, 10379, 20212, 13, 40290, 62, 24455, 1330, 35946, 6030, 628, 198, 4871, 3115, 33, 970, 7, 15252, 2599, 198, 220, 220, ...
2.47407
1,909
import functools from datetime import datetime from flask import Blueprint, jsonify, request from iotud.tools import fetch_all, fetch_one, update, insert, get_auth_props, either_response, delete from string import ascii_lowercase import random from oslash import Right, Left from toolz import accumulate, assoc, reduce ...
[ 11748, 1257, 310, 10141, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 42903, 1330, 39932, 11, 33918, 1958, 11, 220, 2581, 198, 6738, 1312, 313, 463, 13, 31391, 1330, 21207, 62, 439, 11, 21207, 62, 505, 11, 4296, 11, 7550, 11, ...
3.120603
199
import json import core from core.movieinfo import Trailer from dominate.tags import * # pylama:ignore=W0401
[ 11748, 33918, 198, 198, 11748, 4755, 198, 6738, 4755, 13, 41364, 10951, 1330, 36923, 198, 6738, 17863, 13, 31499, 1330, 1635, 628, 198, 2, 279, 2645, 1689, 25, 46430, 28, 54, 3023, 486, 198 ]
3.294118
34
# Pig Bar Damage Skin success = sm.addDamageSkin(2436229) if success: sm.chat("The Pig Bar Damage Skin has been added to your account's damage skin collection.") # sm.consumeItem(2436229)
[ 2, 23097, 2409, 8995, 17847, 198, 13138, 796, 895, 13, 2860, 22022, 42455, 7, 1731, 2623, 23539, 8, 198, 361, 1943, 25, 198, 220, 220, 220, 895, 13, 17006, 7203, 464, 23097, 2409, 8995, 17847, 468, 587, 2087, 284, 534, 1848, 338, 24...
3.16129
62
from __future__ import absolute_import from .euclidean_nomination import EuclideanNomination
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 764, 12496, 565, 485, 272, 62, 26601, 1883, 1330, 48862, 485, 272, 45, 27744, 198 ]
3.72
25
import subprocess import os try: Settings=[] f=open('data/Settings.txt','r') _lines=f.readlines() Settings.append([i.replace('\n','') for i in _lines]) Settings=Settings[0] #Because list in list f.close() except: Settings=['Manual: Fill',5,0,'No','No'] try: subprocess.Popen(['GUI.exe'...
[ 11748, 850, 14681, 198, 11748, 28686, 198, 198, 28311, 25, 198, 220, 220, 220, 16163, 28, 21737, 198, 220, 220, 220, 277, 28, 9654, 10786, 7890, 14, 26232, 13, 14116, 41707, 81, 11537, 198, 220, 220, 220, 4808, 6615, 28, 69, 13, 961...
2.39881
168
from nltk import stem from nltk import tokenize from nltk import tag from nltk.tag import pos_tag from nltk.tokenize import word_tokenize text1 = 'His acting was amazing.' text2 = 'He was merely acting.' print(pos_tag(word_tokenize(text1))) print(pos_tag(word_tokenize(text2)))
[ 6738, 299, 2528, 74, 1330, 10717, 198, 6738, 299, 2528, 74, 1330, 11241, 1096, 198, 6738, 299, 2528, 74, 1330, 7621, 198, 6738, 299, 2528, 74, 13, 12985, 1330, 1426, 62, 12985, 198, 6738, 299, 2528, 74, 13, 30001, 1096, 1330, 1573, ...
2.886598
97
"""Tests for miner module - search methods""" import os import pytest import vcr from pyminer import Miner m = Miner() @vcr.use_cassette('test/vcr_cassettes/search.yaml') def test_search(): "miner.search - basic test" res = m.search(filter = {'has_full_text': True}, limit = 5) assert 'Mined' == res.__class...
[ 37811, 51, 3558, 329, 16285, 8265, 532, 2989, 5050, 37811, 198, 11748, 28686, 198, 11748, 12972, 9288, 198, 11748, 410, 6098, 198, 6738, 12972, 1084, 263, 1330, 29295, 198, 76, 796, 29295, 3419, 198, 198, 31, 85, 6098, 13, 1904, 62, 6...
2.5
374
import pytest import importlib from utils.migration import search @pytest.fixture @pytest.fixture @pytest.fixture
[ 11748, 12972, 9288, 198, 11748, 1330, 8019, 198, 198, 6738, 3384, 4487, 13, 76, 4254, 1330, 2989, 198, 198, 31, 9078, 9288, 13, 69, 9602, 198, 198, 31, 9078, 9288, 13, 69, 9602, 198, 198, 31, 9078, 9288, 13, 69, 9602, 198 ]
2.809524
42
from ..remote import RemoteModel from infoblox_netmri.utils.utils import check_api_availability class DeviceCertificateRemote(RemoteModel): """ This table list out the device certificates. | ``id:`` The internal NetMRI identifier for this device certificate. | ``attribute type:`` number ...
[ 6738, 11485, 47960, 1330, 21520, 17633, 198, 6738, 1167, 45292, 1140, 62, 3262, 76, 380, 13, 26791, 13, 26791, 1330, 2198, 62, 15042, 62, 47274, 628, 198, 4871, 16232, 37608, 22460, 36510, 7, 36510, 17633, 2599, 198, 220, 220, 220, 3722...
2.239669
968
from random import random, choice if __name__ == "__main__": nn = NeuralNetwork(inputs=2, hidden_neurons=4) training = [([0, 0], 0), ([0, 1], 1), ([1, 0], 1), ([1, 1], 0)] for epoch in range(100000): input, target = choice(training) nn.learn(input, target) for input, target in tra...
[ 6738, 4738, 1330, 4738, 11, 3572, 628, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 628, 220, 220, 220, 299, 77, 796, 47986, 26245, 7, 15414, 82, 28, 17, 11, 7104, 62, 710, 333, 684, 28, 19, 8, 198, 220, 22...
2.276042
192
import re from gurobipy import * from .stl_parsing import parse_logic from .stl_constraints import create_constraints from .utilities.simple_utilities import remove_gurobi_log, parentheses_match def solve(logic): """Finds solutions for all binary and continuous variables in logic string""" return synthesize_stl(crea...
[ 11748, 302, 198, 6738, 915, 22609, 541, 88, 1330, 1635, 198, 6738, 764, 301, 75, 62, 79, 945, 278, 1330, 21136, 62, 6404, 291, 198, 6738, 764, 301, 75, 62, 1102, 2536, 6003, 1330, 2251, 62, 1102, 2536, 6003, 198, 6738, 764, 315, 2...
2.866055
545
from ncssl_api_client.__main__ import main_cli_wrapper from unittest import TestCase import mock
[ 6738, 299, 25471, 75, 62, 15042, 62, 16366, 13, 834, 12417, 834, 1330, 1388, 62, 44506, 62, 48553, 198, 6738, 555, 715, 395, 1330, 6208, 20448, 198, 11748, 15290, 628 ]
3.266667
30
# -*- coding: utf-8 -*- __version__ = '0.1.dev0' from .multigp import MultiGP from .pca import PCA from .util import * from . import priors from george import kernels
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 834, 9641, 834, 796, 705, 15, 13, 16, 13, 7959, 15, 6, 198, 198, 6738, 764, 16680, 328, 79, 1330, 15237, 16960, 198, 6738, 764, 79, 6888, 1330, 4217, 32, 198, ...
2.640625
64
from core.sessions.buffers.exporter.exporters import BaseExporter import codecs
[ 6738, 4755, 13, 82, 6202, 13, 36873, 364, 13, 1069, 26634, 13, 1069, 1819, 1010, 1330, 7308, 3109, 26634, 201, 198, 11748, 40481, 82, 201, 198 ]
3.153846
26
''' Write a program to implement various sorting techniques: [Compare with Python’s Built-In Sorting Functions also] • Insertion sort • Selection Sort • Bubble Sort • Merge Sort • Quick Sort ''' # SELECTION SORT n = int(input("Enter the number of list items: ")) arr = [] for i in range(0, n): ele = i...
[ 7061, 6, 201, 198, 16594, 257, 1430, 284, 3494, 2972, 29407, 7605, 25, 220, 201, 198, 58, 41488, 351, 11361, 447, 247, 82, 28477, 12, 818, 311, 24707, 40480, 635, 60, 201, 198, 3581, 35835, 295, 3297, 201, 198, 3581, 29538, 33947, 2...
2.834356
163
import pandas as pd import torch import copy from typing import Dict, List, Tuple from torch import LongTensor from torch.tensor import Tensor from torch.utils.data import Dataset from konlpy.tag import Kkma from nltk.tokenize import word_tokenize from tqdm.auto import tqdm
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 28034, 198, 11748, 4866, 198, 6738, 19720, 1330, 360, 713, 11, 7343, 11, 309, 29291, 198, 6738, 28034, 1330, 5882, 51, 22854, 198, 6738, 28034, 13, 83, 22854, 1330, 309, 22854, 198, 6738, 2...
3.159091
88
with open("delay_vs_fanout.csv", "w") as f: print("fanout,delay", file=f) for net_name, net in ctx.nets: if net.driver.cell is None: continue if net.driver.cell.type == "DCCA": continue # ignore global clocks for user in net.users: print(f"{len(net.use...
[ 4480, 1280, 7203, 40850, 62, 14259, 62, 24408, 448, 13, 40664, 1600, 366, 86, 4943, 355, 277, 25, 198, 220, 220, 220, 3601, 7203, 24408, 448, 11, 40850, 1600, 2393, 28, 69, 8, 198, 220, 220, 220, 329, 2010, 62, 3672, 11, 2010, 287...
2.112994
177
# Copyright (C) 2011 by Michele Silva (michele.silva@gmail.com) # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. import os import math import numpy from mocapy.framework import eMISMASK from Bio.PDB ...
[ 2, 15069, 357, 34, 8, 2813, 416, 38872, 23720, 357, 9383, 258, 293, 13, 18217, 6862, 31, 14816, 13, 785, 8, 198, 2, 770, 2438, 318, 636, 286, 262, 8436, 404, 7535, 6082, 290, 21825, 416, 663, 198, 2, 5964, 13, 4222, 766, 262, 38...
1.957342
5,087
#!/usr/bin/env python # author: pharesim@nhzcrypto.org import json import urllib import urllib2 import sqlite3 import math import ConfigParser import time config = ConfigParser.RawConfigParser() config.read('config.ini') conn = sqlite3.connect(config.get("pool", "database")) c = conn.cursor() if __...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 1772, 25, 872, 3565, 320, 31, 77, 32179, 29609, 78, 13, 2398, 198, 198, 11748, 33918, 198, 11748, 2956, 297, 571, 198, 11748, 2956, 297, 571, 17, 198, 11748, 44161, 578, 18, ...
2.654135
133
import argparse import time import parsl # Tested. Confirmed. Local X Local X SingleNodeLauncher from parsl.tests.configs.local_ipp import config # Tested. Confirmed. ssh X Slurm X SingleNodeLauncher # from parsl.tests.configs.midway_ipp import config # Tested. Confirmed. ssh X Slurm X SingelNodeLauncher # from pars...
[ 11748, 1822, 29572, 198, 11748, 640, 198, 198, 11748, 13544, 75, 198, 2, 6208, 276, 13, 7326, 15491, 13, 10714, 1395, 10714, 1395, 14206, 19667, 46182, 2044, 198, 6738, 13544, 75, 13, 41989, 13, 11250, 82, 13, 12001, 62, 3974, 1330, 4...
2.628
1,000
""" General details about the program """ __version__ = '0.2.0' __author__ = 'blackCheetah' __created__ = '27.09.2018' __updated__ = '07.10.2018' __description__ = 'Retrieve all subscribers who made a comment on your last 50 videos.'
[ 37811, 198, 220, 220, 220, 3611, 3307, 546, 262, 1430, 198, 37811, 198, 834, 9641, 834, 220, 220, 220, 220, 796, 705, 15, 13, 17, 13, 15, 6, 198, 834, 9800, 834, 220, 220, 220, 220, 220, 796, 705, 13424, 7376, 316, 993, 6, 198, ...
2.628866
97
#!/usr/bin/env python """ Schema Schema | Name | Type | Owner --------+-------------------+----------+--------- public | job | table | huangch public | job_definition | table | huangch public | job_definition_id | sequence | huangch public | job_id | sequence | ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 198, 27054, 2611, 628, 10011, 2611, 930, 220, 220, 220, 220, 220, 220, 6530, 220, 220, 220, 220, 220, 220, 220, 930, 220, 220, 5994, 220, 220, 930, 220, 23853, 198, 982, 10, ...
2.551918
3,024
from src.data.load_dictionaries import load_dictionaries, create_key_skills from src.data.load_vacancies import load_vacancies from src.data.vacancy import Vacancy
[ 6738, 12351, 13, 7890, 13, 2220, 62, 67, 2867, 3166, 1330, 3440, 62, 67, 2867, 3166, 11, 2251, 62, 2539, 62, 8135, 2171, 198, 6738, 12351, 13, 7890, 13, 2220, 62, 85, 330, 16183, 1330, 3440, 62, 85, 330, 16183, 198, 6738, 12351, 1...
3.09434
53
"""" Author: Jayson C. Garrison Dates: 01/19/2022 Course: CS-5333 (Machine Learning) Description: Function that partitions data according to five fold cross validation GitHub: https://github.com/jayson-garrison/ML-Naive-Bayes """ # partition a data set into a list of 5 tuples for training and testing # five fo...
[ 15931, 15931, 198, 13838, 25, 23288, 261, 327, 13, 39233, 198, 35, 689, 25, 5534, 14, 1129, 14, 1238, 1828, 198, 49046, 25, 9429, 12, 20, 20370, 357, 37573, 18252, 8, 198, 11828, 25, 15553, 326, 43869, 1366, 1864, 284, 1936, 5591, 3...
3.40404
99
# # Copyright (c) 2016 Stefan Seefeld # All rights reserved. # # This file is part of Faber. It is made available under the # Boost Software License, Version 1.0. # (Consult LICENSE or http://www.boost.org/LICENSE_1_0.txt) from .check import check from ..artefact import intermediate, always from ..tools.compiler impor...
[ 2, 198, 2, 15069, 357, 66, 8, 1584, 28842, 1001, 22521, 335, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 770, 2393, 318, 636, 286, 14236, 263, 13, 632, 318, 925, 1695, 739, 262, 198, 2, 19835, 10442, 13789, 11, 10628, 352, 13...
3.335664
143
from django.apps import AppConfig
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
3.888889
9
#! /usr/bin/env python3 #--------------------------------- # Plots errors of experiments # obtained from iModel output # Pedro Peixoto (ppeixoto@usp.br) # Novembre 2018 #---------------------------------- import sys import os import re import string import numpy as np import matplotlib #matplotlib.use('Ag...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 3880, 12, 198, 2, 220, 220, 1345, 1747, 8563, 286, 10256, 198, 2, 220, 220, 220, 220, 220, 6492, 422, 1312, 17633, 5072, 198, 2, 220, 220, 28855, 2631, 844, 2069, 357, 2...
2.587963
1,296
# -*- coding: utf-8 -*- import json from os import chdir, getcwd, makedirs, mkdir, walk from os.path import abspath, exists, join from shutil import copyfile, rmtree from urlparse import urljoin, urlparse, urlunparse, uses_netloc, uses_relative from chameleon.zpt.template import PageTextTemplateFile from clik import A...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 33918, 198, 6738, 28686, 1330, 442, 15908, 11, 651, 66, 16993, 11, 285, 4335, 17062, 11, 33480, 15908, 11, 2513, 198, 6738, 28686, 13, 6978, 1330, 2352, 6978, 11,...
2.889796
1,225
import torch import math from typing import Sequence, Optional, Callable, Tuple, Dict, Union import typing from .sgld import dot from .verlet_sgld import VerletSGLD class HMC(VerletSGLD): """HMC with Verlet integration. Really `VerletSGLD` but with momentum=1 and temperature=1, and a different M-H acceptance...
[ 11748, 28034, 198, 11748, 10688, 198, 6738, 19720, 1330, 45835, 11, 32233, 11, 4889, 540, 11, 309, 29291, 11, 360, 713, 11, 4479, 198, 11748, 19720, 198, 198, 6738, 764, 45213, 335, 1330, 16605, 198, 6738, 764, 332, 1616, 62, 45213, 3...
2.830565
301
#!/usr/bin/env python # Copyright (c) Microsoft Corporation. # Licensed under the MIT license. """ Usage: vocab.py [options] TRAIN_FILE VOCAB_FILE Options: -h --help Show this screen. --size=<int> vocab size [default: 10000] --freq_cutoff=<int> frequency cutoff [de...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 15069, 357, 66, 8, 5413, 10501, 13, 198, 2, 49962, 739, 262, 17168, 5964, 13, 198, 37811, 198, 28350, 25, 198, 220, 220, 220, 12776, 397, 13, 9078, 685, 25811, 60, 29125, 1268, ...
2.536388
371
import matplotlib.pyplot as plt import networkx as nx import pandas as pd from networkx.readwrite import json_graph, write_gexf from matplotlib import pylab summary_groups_data_path = '/Users/Juan/django_projects/adaptive-boxes/graphs/partitions_data/hall/summary_groups.csv' x_units_path = '/Users/Juan/django_projec...
[ 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 3127, 87, 355, 299, 87, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 3127, 87, 13, 961, 13564, 1330, 33918, 62, 34960, 11, 3551, 62, 25636, 69, 198, 6738,...
2.210095
733
# Bake the transform on each frame from one transform to another. # # This is similar to the graph editor's keyframe bake (without any smart key reduction), # but bakes one object to another. This is useful for baking a constraint to another # transform. # # For example, you can constrain a locator to a character's ha...
[ 2, 38493, 262, 6121, 319, 1123, 5739, 422, 530, 6121, 284, 1194, 13, 198, 2, 198, 2, 770, 318, 2092, 284, 262, 4823, 5464, 338, 1994, 14535, 28450, 357, 19419, 597, 4451, 1994, 7741, 828, 198, 2, 475, 275, 1124, 530, 2134, 284, 11...
3.631579
266
"""Model of a single magic card.""" from django.db import models from multiselectfield import MultiSelectField from django.utils.text import slugify class Set(models.Model): """Class for set model.""" name = models.CharField(max_length=50) set_id = models.CharField(max_length=5, null=True, blank=True) ...
[ 37811, 17633, 286, 257, 2060, 5536, 2657, 526, 15931, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 1963, 786, 801, 3245, 1330, 15237, 17563, 15878, 198, 6738, 42625, 14208, 13, 26791, 13, 5239, 1330, 31065, 1958, 628, 198, ...
2.224031
1,781
import yaml import nb_clean as nbc from pathlib import Path import nbformat import sys with open('./book/_config.yml') as f: data = yaml.safe_load(f) # Sometimes we use rendered notebooks instead of executing them exclude_paths = [] for pattern in data['execute']['exclude_patterns']: exclude_paths += list(Path(...
[ 11748, 331, 43695, 198, 11748, 299, 65, 62, 27773, 355, 299, 15630, 198, 6738, 3108, 8019, 1330, 10644, 198, 11748, 299, 65, 18982, 198, 11748, 25064, 198, 198, 4480, 1280, 7, 4458, 14, 2070, 47835, 11250, 13, 88, 4029, 11537, 355, 27...
2.353618
608
from time import sleep dados = {} ### --> DICIONÁRIO RECEBE TODOS OS DADOS COM SEUS RESPECTIVOS VALORES; ID, NOME ETC... lista_de_dados = [] lista_principal = [] copia_dados = []### --> DICIONÁRIO RECEBE TODOS OS DADOS codigo_cliente = 0 ### --> CONTADOR CONTAGEM TRANSAÇÕES moeda_origem_sigla = 'R$:' moeda_destino_sig...
[ 6738, 640, 1330, 3993, 198, 198, 67, 22484, 796, 23884, 44386, 14610, 360, 2149, 2849, 127, 223, 7112, 46, 19644, 36, 12473, 16926, 2640, 7294, 360, 2885, 2640, 9440, 7946, 2937, 47203, 9782, 3824, 2640, 26173, 1581, 1546, 26, 4522, 11,...
1.526212
49,347
from .Base import * from discord.ext import commands from discord.utils import get
[ 6738, 764, 14881, 1330, 1635, 198, 6738, 36446, 13, 2302, 1330, 9729, 198, 6738, 36446, 13, 26791, 1330, 651 ]
4.315789
19
a = 1 b = 5 h = b*5 d = a*5 s = ( cq.Workplane("XY") .ellipse(a,b) .sweep( cq.Workplane("XZ") # Start 0deg tangent, Tip finishes with 90deg tangent .spline([(0, i) for i in range(h)] + [(d,h)],[(0,1),(1,0)]) # Start 0deg tangent, Tip finishes with 45deg tangent #.sp...
[ 64, 796, 352, 198, 65, 796, 642, 198, 71, 796, 275, 9, 20, 198, 67, 796, 257, 9, 20, 198, 198, 82, 796, 357, 198, 220, 220, 220, 269, 80, 13, 12468, 14382, 7203, 34278, 4943, 198, 220, 220, 220, 764, 695, 541, 325, 7, 64, 11...
1.785047
214
""" 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, software dist...
[ 37811, 198, 15269, 1853, 37927, 13200, 198, 198, 26656, 15385, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 5832, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 1639, 743, 7...
3.390782
499
from django.contrib import admin from recipe import models admin.site.register(models.Recipe) admin.site.register(models.Ingredient)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 198, 6738, 8364, 1330, 4981, 198, 198, 28482, 13, 15654, 13, 30238, 7, 27530, 13, 37523, 8, 198, 28482, 13, 15654, 13, 30238, 7, 27530, 13, 27682, 445, 1153, 8, 198 ]
3.375
40
# -*- coding: utf8 -*- """Autogenerated file - DO NOT EDIT If you spot a bug, please report it on the mailing list and/or change the generator.""" import os from ...base import (CommandLine, CommandLineInputSpec, SEMLikeCommandLine, TraitedSpec, File, Directory, traits, isdefined, ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 23, 532, 9, 12, 198, 37811, 16541, 519, 877, 515, 2393, 532, 8410, 5626, 48483, 198, 1532, 345, 4136, 257, 5434, 11, 3387, 989, 340, 319, 262, 21898, 1351, 290, 14, 273, 1487, 262, 17301, 526, ...
3.020398
3,922
# coding=utf-8 """ Product Catalog: urls test cases """ from django.test import TestCase from django.urls import reverse from django.urls import resolve from product_catalog.models.product import Product from product_catalog.models.category import Category
[ 2, 19617, 28, 40477, 12, 23, 198, 37811, 8721, 44515, 25, 2956, 7278, 1332, 2663, 37227, 198, 198, 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 198, 6738, 42625, 14208, 13, 6371, ...
3.714286
70
#!/usr/bin/env python3 """ Cluster and align the docking domain sequences """ import os import subprocess from Bio import SeqIO from extract_seq import remove_invalid_pro def clustering(info_dict): ''' Cluster the query sequences to 3 classes ''' c_seq = info_dict['c_seq_path'] n_seq = info_dict...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 37811, 198, 2601, 5819, 290, 10548, 262, 45441, 7386, 16311, 198, 37811, 198, 198, 11748, 28686, 198, 11748, 850, 14681, 220, 198, 6738, 16024, 1330, 1001, 80, 9399, 198, 6738, ...
2.059829
3,978
import sys from examples.auth import authorization from socrata import Socrata socrata = Socrata(authorization) file_path = sys.argv[1] """ This shows reprojecting from British National Grid to WGS84 We're using the proj4 def from here: http://spatialreference.org/ref/epsg/27700/ """ with open(file_path, 'rb') as ...
[ 11748, 25064, 198, 6738, 6096, 13, 18439, 1330, 19601, 198, 6738, 1307, 81, 1045, 1330, 311, 1696, 1045, 198, 198, 82, 1696, 1045, 796, 311, 1696, 1045, 7, 9800, 1634, 8, 198, 198, 7753, 62, 6978, 796, 25064, 13, 853, 85, 58, 16, ...
1.897351
604
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: yandex/cloud/mdb/greenplum/v1/resource_preset.proto """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflect...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 262, 8435, 11876, 17050, 13, 220, 8410, 5626, 48483, 0, 198, 2, 2723, 25, 331, 392, 1069, 14, 17721, 14, 9132, 65, 14, 14809, 489, 388, 14, 85, ...
2.348066
3,258
# display only the IP addresses to the screen. iplist = [ 5060, "80", 55, "10.0.0.1", "10.20.30.1", "ssh" ] # example 1 - add up the strings print("IP addresses: " + iplist[3] + ", and " + iplist[4]) # example 2 - use the comma separator print("IP addresses:", iplist[3], ", and", iplist[4]) # example 3 - use an 'f-s...
[ 2, 3359, 691, 262, 6101, 9405, 284, 262, 3159, 13, 198, 24705, 396, 796, 685, 2026, 1899, 11, 366, 1795, 1600, 5996, 11, 366, 940, 13, 15, 13, 15, 13, 16, 1600, 366, 940, 13, 1238, 13, 1270, 13, 16, 1600, 366, 45824, 1, 2361, ...
2.533333
150
"""fake_blink terminal simulation of blinkt, to use rename to blinkt.py and place in same directory as blinkt program""" import sys import pantilthat import atexit import signal _clear_on_exit = True _true_color = True NUM_PIXELS = 8 pixels = [(0,0,0)] * NUM_PIXELS def set_clear_on_exit(value=Tru...
[ 37811, 30706, 62, 2436, 676, 12094, 18640, 286, 21019, 83, 11, 284, 779, 36265, 284, 21019, 83, 13, 9078, 290, 1295, 287, 976, 8619, 355, 21019, 83, 1430, 37811, 198, 11748, 25064, 198, 11748, 15857, 346, 5562, 198, 11748, 379, 37023, ...
2.807377
244
from unittest import TestCase from requre.cassette import CassetteExecution
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 6738, 1038, 260, 13, 66, 562, 5857, 1330, 14154, 5857, 23002, 1009, 628 ]
3.666667
21
# CQML # Compact Query Meta-language # https://github.com/TheSwanFactory/hclang/blob/master/hc/cqml.hc # TODO: https://github.com/LucaCanali/sparkMeasure from .wrappers import *
[ 2, 327, 48, 5805, 198, 2, 37904, 43301, 30277, 12, 16129, 198, 2, 3740, 1378, 12567, 13, 785, 14, 464, 50, 8149, 22810, 14, 71, 565, 648, 14, 2436, 672, 14, 9866, 14, 71, 66, 14, 66, 80, 4029, 13, 71, 66, 198, 198, 2, 16926, ...
2.535211
71
from gocept.template_rewrite.dtml import DTMLRegexRewriter from gocept.template_rewrite.lib2to3 import rewrite_using_2to3 from gocept.template_rewrite.pagetemplates import PTParseError from gocept.template_rewrite.pagetemplates import PTParserRewriter import argparse import logging import os import os.path import pathl...
[ 6738, 467, 984, 13, 28243, 62, 1809, 6525, 13, 67, 20369, 1330, 24311, 5805, 3041, 25636, 30003, 43407, 198, 6738, 467, 984, 13, 28243, 62, 1809, 6525, 13, 8019, 17, 1462, 18, 1330, 28183, 62, 3500, 62, 17, 1462, 18, 198, 6738, 467,...
2.306719
1,265
""" Definition of :class:`EventList`. :class:`EventList` is used to handle photon arrival times. """ import copy import pickle import warnings import numpy as np import numpy.random as ra from astropy.table import Table from .filters import get_deadtime_mask from .gti import append_gtis, check_separate, cross_gtis ...
[ 37811, 198, 36621, 286, 1058, 4871, 25, 63, 9237, 8053, 44646, 198, 198, 25, 4871, 25, 63, 9237, 8053, 63, 318, 973, 284, 5412, 48190, 10325, 1661, 13, 198, 37811, 198, 198, 11748, 4866, 198, 11748, 2298, 293, 198, 11748, 14601, 198, ...
2.128353
8,835
from styx_msgs.msg import TrafficLight import cv2 import numpy as np import tensorflow as tf import datetime import rospy from std_msgs.msg import String from sensor_msgs.msg import Image from cv_bridge import CvBridge, CvBridgeError
[ 6738, 8944, 87, 62, 907, 14542, 13, 19662, 1330, 23624, 15047, 198, 198, 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 4818, 8079, 198, 11748, 686, 2777, 88, 198, 6738, ...
3.146667
75
import numpy as np import pandas as pd def validate_cISSN(issn:str) -> bool: """ Validates the last character (c) of the ISSN number, based on the first 7 digits returns: boolean: True if c is valid False otherwise """ assert type(issn) == str, "issn must be a string" issn_num = is...
[ 11748, 299, 32152, 355, 45941, 201, 198, 11748, 19798, 292, 355, 279, 67, 201, 198, 201, 198, 201, 198, 4299, 26571, 62, 66, 1797, 15571, 7, 747, 77, 25, 2536, 8, 4613, 20512, 25, 201, 198, 220, 220, 220, 37227, 201, 198, 220, 220...
2.281918
1,731
from sqlalchemy import Column, Table, Index, types from rdflib_sqlalchemy.types import TermType MYSQL_MAX_INDEX_LENGTH = 200 TABLE_NAME_TEMPLATES = [ "{interned_id}_asserted_statements", "{interned_id}_literal_statements", "{interned_id}_namespace_binds", "{interned_id}_quoted_statements", "{int...
[ 6738, 44161, 282, 26599, 1330, 29201, 11, 8655, 11, 12901, 11, 3858, 198, 198, 6738, 374, 67, 2704, 571, 62, 25410, 282, 26599, 13, 19199, 1330, 35118, 6030, 628, 198, 44, 16309, 9711, 62, 22921, 62, 12115, 6369, 62, 43, 49494, 796, ...
2.455172
145
# Copyright 2017 Internap. # # 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, so...
[ 2, 15069, 2177, 2445, 499, 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, 2, 921, 743, ...
3.84
150
from functools import partial import time _cached_objects = dict() CACHE_EXPIRY = 60 * 10 def get_cached_object(model, id): """ A very, very simple in-memory cache for ORM objects. No invalidation other than restarting this app or waiting CACHE_EXPIRY seconds. """ lookup = (model, id) cached =...
[ 6738, 1257, 310, 10141, 1330, 13027, 198, 11748, 640, 198, 198, 62, 66, 2317, 62, 48205, 796, 8633, 3419, 198, 198, 34, 2246, 13909, 62, 49864, 4663, 56, 796, 3126, 1635, 838, 198, 4299, 651, 62, 66, 2317, 62, 15252, 7, 19849, 11, ...
2.595668
277
"""repo2docker: convert git repositories into jupyter-suitable docker images Images produced by repo2docker can be used with Jupyter notebooks standalone or with BinderHub. Usage: python -m repo2docker https://github.com/you/your-repo """ import json import sys import logging import os import getpass import shut...
[ 37811, 260, 7501, 17, 45986, 25, 10385, 17606, 38072, 656, 474, 929, 88, 353, 12, 2385, 4674, 36253, 4263, 198, 198, 29398, 4635, 416, 29924, 17, 45986, 460, 307, 973, 351, 449, 929, 88, 353, 43935, 27669, 198, 273, 351, 347, 5540, ...
2.115318
11,620
import os from pycograph import pycograph from pycograph.schemas.parse_result import CALLS, CONTAINS, IMPORTS from pycograph.schemas.pycograph_input import PycographLoadInput from tests.integration.whole_projects.helpers import assert_edge, assert_node
[ 11748, 28686, 198, 198, 6738, 12972, 66, 2384, 1330, 12972, 66, 2384, 198, 6738, 12972, 66, 2384, 13, 1416, 4411, 292, 13, 29572, 62, 20274, 1330, 33290, 6561, 11, 7102, 5603, 20913, 11, 30023, 33002, 198, 6738, 12972, 66, 2384, 13, 1...
3.227848
79
# -*- coding: utf-8 -*- from parser.utils.fn import stripe import torch import torch.autograd as autograd @torch.enable_grad()
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 30751, 13, 26791, 13, 22184, 1330, 39858, 198, 198, 11748, 28034, 198, 11748, 28034, 13, 2306, 519, 6335, 355, 1960, 519, 6335, 628, 198, 198, 31, 13165, 354,...
2.627451
51
import argparse import gym from gym import spaces import cv2 cv2.ocl.setUseOpenCL(False) import pygame import sys import time import matplotlib import numpy as np import pickle import random import torch import torch.nn as nn import torch.nn.functional as F from run_test import * from baselines.common.trex_utils impor...
[ 11748, 1822, 29572, 198, 11748, 11550, 198, 6738, 11550, 1330, 9029, 198, 11748, 269, 85, 17, 198, 33967, 17, 13, 38679, 13, 2617, 11041, 11505, 5097, 7, 25101, 8, 198, 11748, 12972, 6057, 198, 11748, 25064, 198, 11748, 640, 198, 11748,...
2.42654
844
from PIL import Image, TiffImagePlugin TiffImagePlugin.WRITE_LIBTIFF = True def save_tiff(output, img): """Save numpy array img as compressed TIFF as output file Args: output: img: Returns: """ pil_img = Image.fromarray(img) pil_img.save(output, compression='packbits')
[ 6738, 350, 4146, 1330, 7412, 11, 35775, 5159, 37233, 198, 198, 51, 733, 5159, 37233, 13, 18564, 12709, 62, 40347, 51, 29267, 796, 6407, 628, 198, 4299, 3613, 62, 83, 733, 7, 22915, 11, 33705, 2599, 198, 220, 220, 220, 37227, 16928, ...
2.560976
123
from program2_funs import Searcher # , hSLD, SNode # (b) Show your program loading in the 30-node sample file. s = Searcher("30node.txt") # (c) Show you program setting start node=U and end node=T. s.setStartGoal('U','T') # myViz should be a DRDViz instance -> save map to file on disk. s.myViz.sav...
[ 201, 198, 201, 198, 6738, 1430, 17, 62, 12543, 82, 1330, 42016, 2044, 220, 201, 198, 2, 837, 289, 8634, 35, 11, 11346, 1098, 201, 198, 201, 198, 201, 198, 2, 357, 65, 8, 5438, 534, 1430, 11046, 287, 262, 1542, 12, 17440, 6291, 2...
2.352941
578
# Generated on 2019-02-03T13:03:06.509000 from mail import * from http import * from mime import * from netnews import * VERSION = "2019.02.03"
[ 2, 2980, 515, 319, 13130, 12, 2999, 12, 3070, 51, 1485, 25, 3070, 25, 3312, 13, 29022, 830, 198, 198, 6738, 6920, 1330, 1635, 198, 6738, 2638, 1330, 1635, 198, 6738, 285, 524, 1330, 1635, 198, 6738, 2010, 10827, 1330, 1635, 198, 198...
2.754717
53
import hashlib import json import multiprocessing as mp from typing import Optional import psutil from django.http import JsonResponse from django.views.decorators.csrf import csrf_exempt from django.views.decorators.http import require_POST, require_GET from django.utils import timezone from .constants import ( ...
[ 11748, 12234, 8019, 198, 11748, 33918, 198, 11748, 18540, 305, 919, 278, 355, 29034, 198, 6738, 19720, 1330, 32233, 198, 198, 11748, 26692, 22602, 198, 198, 6738, 42625, 14208, 13, 4023, 1330, 449, 1559, 31077, 198, 6738, 42625, 14208, 13...
2.877637
237
__author__ = 'Den Elston' __version__ = '0.0.1' default_app_config = 'django_webpack.apps.DjangoWebpackConfig'
[ 834, 9800, 834, 796, 705, 21306, 2574, 3743, 6, 198, 834, 9641, 834, 796, 705, 15, 13, 15, 13, 16, 6, 198, 198, 12286, 62, 1324, 62, 11250, 796, 705, 28241, 14208, 62, 12384, 8002, 13, 18211, 13, 35, 73, 14208, 13908, 8002, 16934,...
2.466667
45
import math radius = 10 printPattern(radius)
[ 11748, 10688, 198, 42172, 796, 838, 198, 4798, 47546, 7, 42172, 8 ]
3.666667
12