content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
""" 无人机获取视频流 """ from djitellopy import tello import cv2 drone = tello.Tello() drone.connect() print(drone.get_battery()) drone.stream_on() while True: img = drone.get_frame_read().frame img = cv2.resize(img, (360, 240)) cv2.imshow("Image", img) cv2.waitKey(1)
[ 37811, 198, 33768, 254, 21689, 17312, 118, 164, 236, 115, 20998, 244, 164, 100, 228, 165, 95, 239, 38184, 223, 198, 37811, 198, 198, 6738, 42625, 578, 297, 11081, 1330, 1560, 78, 198, 11748, 269, 85, 17, 198, 198, 7109, 505, 796, 15...
1.971831
142
import os import torch import torch.utils.data as data from PIL import Image from multiprocessing.dummy import Pool
[ 11748, 28686, 198, 11748, 28034, 198, 11748, 28034, 13, 26791, 13, 7890, 355, 1366, 198, 6738, 350, 4146, 1330, 7412, 198, 6738, 18540, 305, 919, 278, 13, 67, 13513, 1330, 19850 ]
3.709677
31
# ============================================================================== # Copyright 2018 Paul Balanca. 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 # # ht...
[ 2, 38093, 25609, 28, 198, 2, 15069, 2864, 3362, 8528, 42124, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 28...
2.884674
659
import os import json import re import collections from bs4 import BeautifulSoup import urllib.request, urllib.parse, urllib.error from linebot import ( LineBotApi, WebhookHandler ) from linebot.models import ( MessageEvent, PostbackEvent, TextMessage, TextSendMessage, TemplateSendMessage, PostbackAction, B...
[ 11748, 28686, 198, 11748, 33918, 198, 11748, 302, 198, 11748, 17268, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 11748, 2956, 297, 571, 13, 25927, 11, 2956, 297, 571, 13, 29572, 11, 2956, 297, 571, 13, 18224, 198, 6738, 1627,...
2.985646
209
import matplotlib.pyplot as plt import numpy as np import torch from torch import nn from torch import optim import torch.nn.functional as F from torchvision import datasets, transforms, models from PIL import Image from torch.autograd import Variable test_transforms = transforms.Compose([transforms.Resize(224), ...
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 6738, 28034, 1330, 299, 77, 198, 6738, 28034, 1330, 6436, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, ...
2.287411
421
from .economy import * __title__ = "DiscordEconomy" __summary__ = "Discord.py, other libs, and forks(pycord, nextcord etc.) extension to create economy easily." __uri__ = "https://github.com/Nohet/DiscordEconomy" __version__ = "1.3.2" __author__ = "Nohet" __email__ = "igorczupryniak503@gmail.com" __license__ =...
[ 6738, 764, 13926, 88, 1330, 1635, 201, 198, 201, 198, 834, 7839, 834, 796, 366, 15642, 585, 28489, 88, 1, 201, 198, 834, 49736, 834, 796, 366, 15642, 585, 13, 9078, 11, 584, 9195, 82, 11, 290, 43378, 7, 9078, 66, 585, 11, 1306, ...
2.565789
152
import os, re if "CONDA_PREFIX" in os.environ: # fix compilation in conda env if "CUDA_HOME" not in os.environ and os.path.exists( os.path.join(os.environ["CONDA_PREFIX"], "bin/nvcc")): print("Detected CONDA_PREFIX containing nvcc but no CUDA_HOME, " "setting CUDA_HOME=${CONDA_...
[ 11748, 28686, 11, 302, 198, 361, 366, 10943, 5631, 62, 47, 31688, 10426, 1, 287, 28686, 13, 268, 2268, 25, 198, 220, 220, 220, 1303, 4259, 23340, 287, 1779, 64, 17365, 198, 220, 220, 220, 611, 366, 43633, 5631, 62, 39069, 1, 407, ...
2.133903
702
#!/usr/bin/env python3 # NOTE: you will need to make sure that you have opencv installed for the confidence argument to work with pyautogui import pyautogui import subprocess import sys import time from collections import Counter, namedtuple card_image_paths = ["../screenshots/" + card + ".png" for card in ["ace", "t...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 24550, 25, 345, 481, 761, 284, 787, 1654, 326, 345, 423, 1280, 33967, 6589, 329, 262, 6628, 4578, 284, 670, 351, 12972, 2306, 519, 9019, 198, 11748, 12972, 2306, 519, 901...
2.239153
2,881
#! python3 # delUneededFiles.py - Walks through a folder tree and searches for # exceptionally large files or folders—say, ones # that have a file size of more than 100MB. Print # these files with their absolute path to the # screen. # ...
[ 2, 0, 21015, 18, 198, 2, 1619, 52, 27938, 25876, 13, 9078, 532, 6445, 591, 832, 257, 9483, 5509, 290, 15455, 329, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
2.460526
380
""" Copyright (c) Facebook, Inc. and its affiliates. This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree. """ import logging import os from typing import Callable, Dict, List, Optional, Union import numpy as np import pandas as pd from .base_dataset ...
[ 37811, 198, 15269, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 198, 198, 1212, 2723, 2438, 318, 11971, 739, 262, 17168, 5964, 1043, 287, 262, 198, 43, 2149, 24290, 2393, 287, 262, 6808, 8619, 286, 428, 2723, 5509, 13, 198, ...
2.86532
297
import os import sys import argparse import utils if __name__ == '__main__': main()
[ 11748, 28686, 201, 198, 11748, 25064, 201, 198, 11748, 1822, 29572, 201, 198, 11748, 3384, 4487, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 201, 198, 220, 220, 220, 1388...
2.266667
45
from datasimulator.graph import Graph from dictionaryutils import dictionary
[ 6738, 19395, 320, 8927, 13, 34960, 1330, 29681, 198, 6738, 22155, 26791, 1330, 22155, 628 ]
5.2
15
from htk.test_scaffold.models import TestScaffold from htk.test_scaffold.tests import BaseTestCase from htk.test_scaffold.tests import BaseWebTestCase from htk.constants import * #################### # Finally, import tests from subdirectories last to prevent circular import from htk.lib.tests import * from htk.scrip...
[ 6738, 289, 30488, 13, 9288, 62, 1416, 2001, 727, 13, 27530, 1330, 6208, 3351, 2001, 727, 198, 6738, 289, 30488, 13, 9288, 62, 1416, 2001, 727, 13, 41989, 1330, 7308, 14402, 20448, 198, 6738, 289, 30488, 13, 9288, 62, 1416, 2001, 727, ...
3.414141
99
from django.core.urlresolvers import reverse from django.test import TestCase from django.contrib.auth import get_user_model from django.core import mail from django.conf import settings from django.test.utils import override_settings from django.utils.encoding import force_text from rest_framework import status from...
[ 6738, 42625, 14208, 13, 7295, 13, 6371, 411, 349, 690, 1330, 9575, 198, 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 651, 62, 7220, 62, 19849, 198, 6738, 42625, 14208, 13, 7...
2.455285
738
# 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 from .. import _utilitie...
[ 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.607143
112
import torch import time import random import torch.utils.data import torch.nn.functional as F from dataset import NASBenchDataset, SplitSubet from sampler import ArchSampler from .train_utils import *
[ 11748, 28034, 198, 11748, 640, 198, 11748, 4738, 198, 11748, 28034, 13, 26791, 13, 7890, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 198, 6738, 27039, 1330, 7210, 44199, 27354, 292, 316, 11, 27758, 7004, 316, 198, 6738, 6072...
3.690909
55
#!/usr/bin/env python # coding: utf-8 # ## Damage and Loss Assessment (12-story RC frame) # # This example continues the example2 to conduct damage and loss assessment using the PLoM model and compare the results against the results based on MSA # ### Run example2 import numpy as np import random import time from m...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 22492, 8995, 290, 22014, 25809, 357, 1065, 12, 13571, 13987, 5739, 8, 198, 2, 220, 198, 2, 770, 1672, 4477, 262, 1672, 17, 284, 3189, ...
2.17392
6,687
from __future__ import division
[ 6738, 11593, 37443, 834, 1330, 7297, 198 ]
4.571429
7
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc from exchange import injective_auction_rpc_pb2 as exchange_dot_injective__auction__rpc__pb2 class InjectiveAuctionRPCStub(object): """InjectiveAuctionRPC d...
[ 2, 2980, 515, 416, 262, 308, 49, 5662, 11361, 8435, 17050, 13877, 13, 8410, 5626, 48483, 0, 198, 37811, 11792, 290, 4382, 6097, 11188, 284, 1237, 672, 3046, 12, 23211, 2594, 526, 15931, 198, 11748, 1036, 14751, 198, 198, 6738, 5163, 1...
2.431217
1,134
# Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
[ 2, 15069, 1584, 3012, 3457, 13, 201, 198, 2, 201, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 201, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 201,...
2.83
400
from Voicelab.pipeline.Node import Node import parselmouth from parselmouth.praat import call from Voicelab.toolkits.Voicelab.VoicelabNode import VoicelabNode from Voicelab.toolkits.Voicelab.MeasureFormantNode import MeasureFormantNode from Voicelab.VoicelabWizard.VoicelabTab import VoicelabTab from Voicelab.VoicelabWi...
[ 6738, 20687, 291, 417, 397, 13, 79, 541, 4470, 13, 19667, 1330, 19081, 198, 11748, 1582, 741, 14775, 198, 6738, 1582, 741, 14775, 13, 79, 430, 265, 1330, 869, 198, 6738, 20687, 291, 417, 397, 13, 25981, 74, 896, 13, 42144, 291, 417,...
3.159292
791
import abc import functools import hashlib import itertools import logging import os import typing as t from pathlib import Path from .cache import CacheManager, ENABLE_CACHING from .core import PkgFile from .pkg_helpers import ( normalize_pkgname, is_listed_path, guess_pkgname_and_version, ) if t.TYPE_CH...
[ 11748, 450, 66, 198, 11748, 1257, 310, 10141, 198, 11748, 12234, 8019, 198, 11748, 340, 861, 10141, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 19720, 355, 256, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 6738, 764, 23870, 1330, ...
2.482428
626
import argparse from pathlib import Path from lib.photobooth import Photobooth, PhotoPrinter, RandomStaticPhoto if __name__ == "__main__": main()
[ 11748, 1822, 29572, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 6738, 9195, 13, 38611, 672, 5226, 1330, 5919, 672, 5226, 11, 5555, 6836, 3849, 11, 14534, 45442, 6191, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, ...
3.142857
49
"""Processor for the latent graph In the original paper the processor is described as The Processor iteratively processes the 256-channel latent feature data on the icosahedron grid using 9 rounds of message-passing GNNs. During each round, a node exchanges information with itself and its immediate neighbors. There a...
[ 37811, 18709, 273, 329, 262, 41270, 4823, 198, 198, 818, 262, 2656, 3348, 262, 12649, 318, 3417, 355, 198, 198, 464, 32893, 11629, 9404, 7767, 262, 17759, 12, 17620, 41270, 3895, 1366, 319, 262, 14158, 8546, 704, 1313, 10706, 198, 3500,...
2.501927
1,038
# # Copyright (c) Contributors to the Open 3D Engine Project. # For complete copyright and license terms please see the LICENSE at the root of this distribution. # # SPDX-License-Identifier: Apache-2.0 OR MIT # # import binascii import fnmatch import pathlib import re from typing import Type, List from commit_validat...
[ 2, 198, 2, 15069, 357, 66, 8, 25767, 669, 284, 262, 4946, 513, 35, 7117, 4935, 13, 198, 2, 1114, 1844, 6634, 290, 5964, 2846, 3387, 766, 262, 38559, 24290, 379, 262, 6808, 286, 428, 6082, 13, 198, 2, 198, 2, 30628, 55, 12, 34156...
3.341463
205
resistor = {'black':0, 'brown':1, 'red':2, 'orange':3, 'yellow':4, 'green': 5, 'blue':6, 'violet':7, 'grey':8, 'white':9} first = str(resistor[input()]) if first == 0: first = '' second = str(resistor[input()]) if second == 0: second = '' answer = int(first + second) third = 10**resistor[input()] if answer ==...
[ 411, 32380, 796, 1391, 6, 13424, 10354, 15, 11, 705, 33282, 10354, 16, 11, 705, 445, 10354, 17, 11, 705, 43745, 10354, 18, 11, 705, 36022, 10354, 19, 11, 705, 14809, 10354, 642, 11, 705, 17585, 10354, 21, 11, 705, 85, 19194, 10354, ...
2.424837
153
''' Problem Name: Grade The Steel Problem Code: FLOW014 Problem Type: https://www.codechef.com/problems/school Problem Link: https://www.codechef.com/problems/FLOW014 Solution Link: https://www.codechef.com/viewsolution/46845982 ''' from sys import stdin, stdout if __name__ == '__main__': t =...
[ 7061, 6, 198, 220, 220, 220, 20647, 6530, 25, 22653, 383, 7851, 198, 220, 220, 220, 20647, 6127, 25, 9977, 3913, 28645, 198, 220, 220, 220, 20647, 5994, 25, 3740, 1378, 2503, 13, 19815, 721, 258, 69, 13, 785, 14, 1676, 22143, 14, ...
2.51773
141
from pytest_mock import MockerFixture from pipert2.core.base.synchronise_routines.synchroniser_node import SynchroniserNode
[ 6738, 12972, 9288, 62, 76, 735, 1330, 337, 12721, 37, 9602, 198, 6738, 279, 9346, 83, 17, 13, 7295, 13, 8692, 13, 28869, 11413, 786, 62, 81, 448, 1127, 13, 28869, 11413, 5847, 62, 17440, 1330, 16065, 11413, 5847, 19667, 628, 628, 62...
2.954545
44
#! /usr/bin/env python # coding=utf-8 import os os.environ['TF_CPP_MIN_LOG_LEVEL']='2' import cv2 import numpy as np import core.utils as utils import tensorflow as tf import re from PIL import Image import xml.etree.ElementTree as ET from xml.etree import ElementTree # 导入ElementTree模块 return_elements = ["input/inpu...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 28, 40477, 12, 23, 198, 198, 11748, 28686, 198, 418, 13, 268, 2268, 17816, 10234, 62, 8697, 47, 62, 23678, 62, 25294, 62, 2538, 18697, 20520, 11639, 17, 6, 198, 11748, ...
2.193916
263
#!/usr/bin/env python # -*- coding: utf-8 -*- # # export.py - Exports enumerated data for reachable nodes into a JSON file. # # Copyright (c) Addy Yeow Chin Heng <ayeowch@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (th...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 10784, 13, 9078, 532, 1475, 3742, 27056, 515, 1366, 329, 3151, 540, 13760, 656, 257, 19449, 2393, 13, 198,...
2.776834
1,295
#!/usr/bin/python3 import os import csv import sys import argparse from statistics import median from collections import OrderedDict if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("datafile", type=str, help="name of file with employees data") parser.add_argument("-g", "...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 11748, 28686, 198, 11748, 269, 21370, 198, 11748, 25064, 198, 11748, 1822, 29572, 198, 6738, 7869, 1330, 14288, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 628, 198, 198, 361, 11593, 3672...
3
181
import mongoengine.fields as fields from base.db.mongo import MongoBaseModel, Decimal2Field
[ 11748, 285, 25162, 18392, 13, 25747, 355, 7032, 198, 6738, 2779, 13, 9945, 13, 76, 25162, 1330, 42591, 14881, 17633, 11, 4280, 4402, 17, 15878, 628, 628 ]
3.518519
27
import os from sqlalchemy import create_engine from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import Column, Integer, String from sqlalchemy.orm import sessionmaker Base = declarative_base() engine = create_engine(os.environ['DATABASE_URL_NOTION']) DBSession = sessionmaker(bind=engine) sessio...
[ 11748, 28686, 198, 6738, 44161, 282, 26599, 1330, 2251, 62, 18392, 198, 6738, 44161, 282, 26599, 13, 2302, 13, 32446, 283, 876, 1330, 2377, 283, 876, 62, 8692, 198, 6738, 44161, 282, 26599, 1330, 29201, 11, 34142, 11, 10903, 198, 6738, ...
3.06383
141
from django.apps import AppConfig
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934 ]
4.125
8
#!/usr/bin/env python import rospy from geometry_msgs.msg import Twist from math import radians if __name__ == '__main__': DrawASquare()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 686, 2777, 88, 198, 6738, 22939, 62, 907, 14542, 13, 19662, 1330, 44088, 198, 6738, 10688, 1330, 2511, 1547, 198, 220, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 83...
2.75
52
""" Exports the trained networks to the renderer """ import sys import os sys.path.insert(0, os.getcwd()) import torch import h5py import argparse import io from typing import Union from collections import OrderedDict from tests.volnet.network import InputParametrization, OutputParametrization, SceneNetwork from dif...
[ 37811, 198, 3109, 3742, 262, 8776, 7686, 284, 262, 9851, 11882, 198, 37811, 198, 198, 11748, 25064, 198, 11748, 28686, 198, 17597, 13, 6978, 13, 28463, 7, 15, 11, 28686, 13, 1136, 66, 16993, 28955, 198, 198, 11748, 28034, 198, 11748, ...
3.248062
129
#!/usr/bin/env python import glob, os, argparse parser = argparse.ArgumentParser() parser.add_argument("-i", "--input", type=str, help="input FASTA") parser.add_argument("-o", "--output", type=str, help="output files path and prefix") args = parser.parse_args() fastas = glob.glob(args.input) header_list = [] seq_dic...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 15095, 11, 28686, 11, 1822, 29572, 198, 198, 48610, 796, 1822, 29572, 13, 28100, 1713, 46677, 3419, 198, 48610, 13, 2860, 62, 49140, 7203, 12, 72, 1600, 366, 438, 15414, 1600, 2...
2.019
2,000
from query_filter_builder.sql.sql_filters import convert_to_sql_with_params simple_obj = { "version": 0.1, "filters": [ { "col": "col1", "value": "asd", }, { "col": "col2", "value": "~asd", }, { "col": "col3", ...
[ 6738, 12405, 62, 24455, 62, 38272, 13, 25410, 13, 25410, 62, 10379, 1010, 1330, 10385, 62, 1462, 62, 25410, 62, 4480, 62, 37266, 198, 198, 36439, 62, 26801, 796, 1391, 198, 220, 220, 220, 366, 9641, 1298, 657, 13, 16, 11, 198, 220, ...
1.440936
855
# ------------------------------------------------------------------------ # StonePaperPi # Please review ReadMe for instructions on how to build and run the program # # (c) 2022 by Balaji # MIT License # paper # scissor # stone # pip install lobe # pip3 install --extra-index-url https://google-coral.github.io/py-repo...
[ 2, 16529, 982, 198, 2, 8026, 42950, 38729, 198, 2, 4222, 2423, 4149, 5308, 329, 7729, 319, 703, 284, 1382, 290, 1057, 262, 1430, 198, 2, 220, 198, 2, 357, 66, 8, 33160, 416, 8528, 26436, 198, 2, 17168, 13789, 198, 2, 3348, 198, ...
2.753754
666
# Lint as: python3 # # Copyright 2020 Google LLC # # 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 a...
[ 2, 406, 600, 355, 25, 21015, 18, 198, 2, 198, 2, 15069, 12131, 3012, 11419, 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, 1...
3.232639
288
# Исключения try: # в блоке try пишется код который потенциально приводит к ошибке n = int(input()) import lalala raise TypeError('Что-то пошло не так') # выбрасывается исключение except ValueError: # except можно типизировать т.е. написать какие ошибки отлавливать print('Не число!!...
[ 2, 12466, 246, 21727, 31583, 30143, 141, 236, 141, 229, 16843, 22177, 18849, 40623, 198, 198, 28311, 25, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 12466, 110, 12466, 109, 30...
1.246269
402
import autogalaxy as ag from autoarray.mock.fixtures import * from autofit.mock.mock_search import MockSamples, MockSearch from autogalaxy.plot.mat_wrap.lensing_include import Include1D, Include2D # # MODEL # # # PROFILES # # GALAXY # # Plane # # GALAX...
[ 11748, 1960, 519, 282, 6969, 355, 556, 201, 198, 6738, 8295, 18747, 13, 76, 735, 13, 69, 25506, 1330, 1635, 201, 198, 6738, 1960, 1659, 270, 13, 76, 735, 13, 76, 735, 62, 12947, 1330, 44123, 50, 12629, 11, 44123, 18243, 201, 198, ...
1.716599
247
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'calculator.ui' # # Created by: PyQt5 UI code generator 5.12.1 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 5178, 7822, 7560, 422, 3555, 334, 72, 2393, 705, 9948, 3129, 1352, 13, 9019, 6, 198, 2, 198, 2, 15622, 416, 25, 9485, 48, 83, 20, 12454, 2438, 17301, 642, ...
2.816092
87
""" Tests for the archive state """ import os import pathlib import shutil import tempfile import textwrap import attr import pytest import salt.utils.files import salt.utils.path import salt.utils.platform import salt.utils.stringutils try: import zipfile # pylint: disable=unused-import HAS_ZIPFILE = True ...
[ 37811, 198, 51, 3558, 329, 262, 15424, 1181, 198, 37811, 198, 11748, 28686, 198, 11748, 3108, 8019, 198, 11748, 4423, 346, 198, 11748, 20218, 7753, 198, 11748, 2420, 37150, 198, 198, 11748, 708, 81, 198, 11748, 12972, 9288, 198, 11748, ...
2.527488
2,201
# Generated by Django 2.0.8 on 2018-12-07 11:17 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 15, 13, 23, 319, 2864, 12, 1065, 12, 2998, 1367, 25, 1558, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
#!/usr/bin/env python3 # If a user has staretd using a temp card this job will remove the card from the card field import xmlrpc.client import sys host="http://localhost:9191/rpc/api/xmlrpc" # If not localhost then this address will need to be whitelisted in PaperCut auth="atoken" # Value defined in advan...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 201, 198, 201, 198, 2, 1002, 257, 2836, 468, 24170, 8671, 1262, 257, 20218, 2657, 428, 1693, 481, 4781, 262, 2657, 422, 262, 2657, 2214, 201, 198, 201, 198, 11748, 35555, 81, 14751, 1...
2.696281
484
import torch torch.backends.cudnn.benchmark = True from torch.distributions import Normal import numpy as np import os from core.network import Network from core.optimizer import Optimizer from core.buffer import RolloutBuffer from .base import BaseAgent class REINFORCE(BaseAgent): """REINFORCE agent. Args...
[ 11748, 28034, 198, 198, 13165, 354, 13, 1891, 2412, 13, 66, 463, 20471, 13, 26968, 4102, 796, 6407, 198, 6738, 28034, 13, 17080, 2455, 507, 1330, 14435, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 198, 6738, 4755, 13, ...
2.826425
386
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import re import time import dbus # NOQA: F801 from dbus.mainloop.glib import DBusGMainLoop ccd_regex = re.compile('(.*)?CCD.*') temp = 20 if __name__ == '__main__': try: main() except KeyboardInterrupt: print('\nExiting the program, bye!')
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 302, 198, 11748, 640, 198, 198, 11748, 288, 10885, 220, 1303, 8005, 48, 32, 25, 376, 41531, 198, 6738, 288...
2.262411
141
import ast import smart_open import pandas as pd from im_tutorials.utilities import eval_cols, double_eval def arxiv_papers(year=2017): '''arxiv_papers Get arXiv papers csv for a single year and return as dataframe. Args: year (`int`): Year of the dataset. Returns: arxiv_df (`pd.Data...
[ 11748, 6468, 198, 11748, 4451, 62, 9654, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 545, 62, 83, 44917, 82, 13, 315, 2410, 1330, 5418, 62, 4033, 82, 11, 4274, 62, 18206, 628, 198, 4299, 610, 87, 452, 62, 40491, 7, 1941,...
2.189873
395
"""Generic functions for huntsman-drp.""" from contextlib import suppress from datetime import datetime from dateutil.parser import parse as parse_date_dateutil def parse_date(object): """ Parse a date as a `datetime.datetime`. Args: object (Object): The object to parse. Returns: A `...
[ 37811, 46189, 5499, 329, 42984, 805, 12, 7109, 79, 526, 15931, 198, 6738, 4732, 8019, 1330, 18175, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 3128, 22602, 13, 48610, 1330, 21136, 355, 21136, 62, 4475, 62, 4475, 22602, 628, 198,...
2.547344
433
from __future__ import absolute_import, division, print_function from __future__ import unicode_literals """Modelling an abstract group Yet to be documented """ import sys import re import warnings from copy import deepcopy from random import sample, randint from numbers import Integral, Number from mmgroup.struc...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 198, 6738, 11593, 37443, 834, 1330, 220, 28000, 1098, 62, 17201, 874, 628, 198, 37811, 5841, 9417, 281, 12531, 1448, 198, 198, 11486, 284, 307, 12395, 198, ...
2.585222
4,412
# Copyright 2022 The Symanto Research Team Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
[ 2, 15069, 33160, 383, 15845, 14723, 4992, 4816, 46665, 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...
3.93125
160
# Copyright [2018] [Sunayu LLC] # # 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...
[ 2, 220, 220, 15069, 685, 7908, 60, 685, 16012, 323, 84, 11419, 60, 198, 2, 198, 2, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 220, 220, 345, 743, 407, 779, 428, 2393, 2...
3.540625
320
"""Initial Migration Revision ID: df19fc248886 Revises: Create Date: 2020-05-04 14:05:37.920674 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'df19fc248886' down_revision = None branch_labels = None depends_on = None
[ 37811, 24243, 36991, 198, 198, 18009, 1166, 4522, 25, 47764, 1129, 16072, 1731, 3459, 4521, 198, 18009, 2696, 25, 220, 198, 16447, 7536, 25, 12131, 12, 2713, 12, 3023, 1478, 25, 2713, 25, 2718, 13, 37128, 45385, 198, 198, 37811, 198, ...
2.754902
102
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # $File: mongo.py # $Date: Fri Feb 14 20:24:26 2014 +0800 # $Author: Xiaoyu Liu <i[at]vuryleo[dot]com> """database connections""" from mongoengine import connect import config connect(config.DATABASE_NAME) # vim: foldmethod=marker
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 17, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 720, 8979, 25, 285, 25162, 13, 9078, 198, 2, 720, 10430, 25, 19480, 3158, 1478, 1160, 25, 1731, 25, 2075, 19...
2.504425
113
import click as ck import pandas as pd import gzip @ck.command() @ck.option( '--data-file', '-df', default='data/swissprot_exp_annots.pkl', help='Data file generated by uni2pandas script') @ck.option( '--inter-file', '-if', default=f'data/protein.links.full.v11.0.txt.gz', help='Data file with interacti...
[ 11748, 3904, 355, 269, 74, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 308, 13344, 198, 198, 31, 694, 13, 21812, 3419, 198, 31, 694, 13, 18076, 7, 198, 220, 220, 220, 705, 438, 7890, 12, 7753, 3256, 705, 12, 7568, 3256, 4277...
2.661836
207
from __future__ import annotations from sqlalchemy.orm import RelationshipProperty from sqlalchemy.orm.attributes import InstrumentedAttribute from sqlalchemy.orm.base import ( ONETOMANY, MANYTOONE, MANYTOMANY, ) from sqlalchemy.orm.dynamic import DynaLoader try: # Python 3.9+ from functools impor...
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 6738, 44161, 282, 26599, 13, 579, 1330, 39771, 21746, 198, 6738, 44161, 282, 26599, 13, 579, 13, 1078, 7657, 1330, 42410, 276, 33682, 198, 6738, 44161, 282, 26599, 13, 579, 13, 8692, 1330,...
2.87234
235
# -*- coding: utf-8 -*- from adm import views from django.urls import path app_name = "adm" urlpatterns = [ # Processo path('instaurar/', views.criar_processo_adm, name='criar_processo_adm'), path('listar/', views.listar_adm, name='listar_adm'), path('listar/ajax/', views.processos_adm_ajax, name='pr...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 6178, 1330, 5009, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 198, 1324, 62, 3672, 796, 366, 324, 76, 1, 198, 198, 6371, 33279, 82, 796, 685, ...
2.119601
1,505
#!/usr/bin/python """ Calculate Fisher matrix and P(k) constraints for all redshift bins for a given experiment. """ import numpy as np import pylab as P import scipy.spatial, scipy.integrate, scipy.interpolate from scipy.integrate import simps import radiofisher as rf from radiofisher.units import * from radiofisher....
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 37811, 198, 9771, 3129, 378, 14388, 17593, 290, 350, 7, 74, 8, 17778, 329, 477, 2266, 30846, 41701, 329, 257, 1813, 220, 198, 23100, 3681, 13, 198, 37811, 198, 11748, 299, 32152, 355, 45941, ...
1.974709
6,010
#!/usr/bin/env python # -*- coding: utf-8 -*- """Tests for `sarbor` package.""" import unittest import sarbor class TestSarborToy(unittest.TestCase): """Tests for `sarbor` package.""" def setUp(self): """ 0-1-2-3-4-5 | | 6 10 | 7-9 ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 51, 3558, 329, 4600, 82, 283, 2865, 63, 5301, 526, 15931, 628, 198, 11748, 555, 715, 395, 198, 198, 11748...
1.779058
955
import pytest from ahd2fhir.mappers.ahd_to_observation_smkstat import AHD_TYPE, get_fhir_resources from tests.utils import map_resources AHD_PAYLOADS_EXPECTED_NUMBER_OF_CONDITIONS = [ ("payload_1.json", 3), ("payload_2.json", 0), ] @pytest.mark.parametrize( "ahd_json_path,expected_number_of_conditions",...
[ 11748, 12972, 9288, 198, 198, 6738, 29042, 67, 17, 69, 71, 343, 13, 76, 46629, 13, 993, 67, 62, 1462, 62, 672, 3168, 341, 62, 5796, 74, 14269, 1330, 317, 10227, 62, 25216, 11, 651, 62, 69, 71, 343, 62, 37540, 198, 6738, 5254, 13...
2.091241
274
import setuptools setuptools.setup( name="thingspeak", version='0.0.1', author='Roger Selzler', description='Tools to ease the manipulation of data on thingspek from Mathworks using REST API and python.', url='https://github.com/roger-selzler/ThingSpeak', packages=setupto...
[ 11748, 900, 37623, 10141, 198, 2617, 37623, 10141, 13, 40406, 7, 198, 220, 220, 220, 220, 220, 220, 220, 1438, 2625, 27971, 36729, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 2196, 11639, 15, 13, 15, 13, 16, 3256, 198, 220, 220, ...
2.408805
159
# Copyright (C) 2021 Clinton Garwood # MIT Open Source Initiative Approved License # handle_data_types_clinton.py # CIS-135 Python # Assignment #5 # # Include five variables: # # Include three variables: # # An integer with value 1 named one one = 1 # # A float with a value 10.10 named tenTen tenTen = 10.10...
[ 2, 15069, 357, 34, 8, 33448, 2605, 7164, 3822, 201, 198, 2, 17168, 4946, 8090, 18362, 20010, 1079, 13789, 201, 198, 2, 5412, 62, 7890, 62, 19199, 62, 37821, 13, 9078, 201, 198, 2, 36159, 12, 17059, 11361, 201, 198, 2, 50144, 1303, ...
2.837563
197
from .matter import * name = 'matter'
[ 6738, 764, 47635, 1330, 1635, 198, 3672, 796, 705, 47635, 6 ]
3.363636
11
from django import forms from app.models import BrewPiDevice, OldControlConstants, NewControlConstants, SensorDevice, FermentationProfile, FermentationProfilePoint from django.core import validators import fermentrack_django.settings as settings from django.forms import ModelForm from . import udev_integration import...
[ 6738, 42625, 14208, 1330, 5107, 198, 6738, 598, 13, 27530, 1330, 9702, 38729, 24728, 11, 5706, 15988, 34184, 1187, 11, 968, 15988, 34184, 1187, 11, 35367, 24728, 11, 12880, 14374, 37046, 11, 12880, 14374, 37046, 12727, 198, 6738, 42625, 1...
3.968085
94
import matplotlib.pyplot as plt import numpy as np from scipy.stats import norm from soak19 import wl_to_rgb import pandas as pd cone = pd.read_csv('data/cone_response_5nm.csv', index_col=0, comment='#') fig, axs = plt.subplots(1, 3) _, h = fig.get_size_inches() fig.set_size_inches(h, h) for ax, (name, c) in zip(axs...
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 13, 34242, 1330, 2593, 198, 6738, 33182, 1129, 1330, 266, 75, 62, 1462, 62, 81, 22296, 198, 11748, 19798, 292, 355, ...
2.226923
260
from django import template from django.template.defaultfilters import pluralize from django.utils.formats import date_format as djd_fmt register = template.Library() @register.filter # noinspection PyShadowingBuiltins @register.filter # noinspection PyShadowingBuiltins @register.filter @register.filter @reg...
[ 6738, 42625, 14208, 1330, 11055, 198, 6738, 42625, 14208, 13, 28243, 13, 12286, 10379, 1010, 1330, 22801, 1096, 198, 6738, 42625, 14208, 13, 26791, 13, 687, 1381, 1330, 3128, 62, 18982, 355, 42625, 67, 62, 69, 16762, 198, 198, 30238, 79...
3.460784
102
"""Base MLP model.""" from typing import Dict, Any import tensorflow as tf import tensorflow.keras.layers as L import configlib from configlib import config as C from components.inputlayers.categorical import OneHotCategoricalInput import components.inputlayers.image import utils.factory # Setup configurable parame...
[ 37811, 14881, 10373, 47, 2746, 526, 15931, 198, 6738, 19720, 1330, 360, 713, 11, 4377, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 11192, 273, 11125, 13, 6122, 292, 13, 75, 6962, 355, 406, 198, 198, 11748, 4566, 8019, 198, ...
2.754991
1,102
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """reorder_lines_inversed.py. This module is designed to reorganize the string sequence of a simple text document. There are 2 types of string sequence reorganization in reverse order: strict and blocks. In the strict reorganization method, each row is rearranged in rever...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 260, 2875, 62, 6615, 62, 259, 690, 276, 13, 9078, 13, 198, 198, 1212, 8265, 318, 3562, 284, 35459, 1096, ...
2.236926
1,874
import time from random import randint from time import sleep itens = ('Pedra','Papel', 'Tesoura') computador = randint(0, 2) print('''Suas opções: [0] PEDRA [1] PAPEL [2] TESOURA ''') jogador = int(input('Qual é a sua jogada? ')) print('-'* 20) t = 1 print('JO') time.sleep(t) print('KEN') time.sleep(t) print('PO!!!')...
[ 11748, 640, 198, 6738, 4738, 1330, 43720, 600, 198, 6738, 640, 1330, 3993, 198, 270, 641, 796, 19203, 43468, 430, 41707, 47, 499, 417, 3256, 705, 36504, 280, 430, 11537, 198, 785, 1996, 7079, 796, 43720, 600, 7, 15, 11, 362, 8, 198,...
2.147687
562
""" ===================== Methods vs. Functions ===================== Placeholder for Methods vs. Functions documentation. """
[ 37811, 198, 198, 4770, 1421, 28, 198, 46202, 3691, 13, 40480, 198, 4770, 1421, 28, 198, 198, 27271, 13829, 329, 25458, 3691, 13, 40480, 10314, 13, 198, 198, 37811, 198 ]
4.333333
30
# from stl_dsa.users.models import User # def test_user_is_member(faker): # email = faker.email() # taggings = # user = User(email=email, first_name=faker.first_name(), last_name=faker.last_name())
[ 2, 422, 336, 75, 62, 9310, 64, 13, 18417, 13, 27530, 1330, 11787, 628, 198, 2, 825, 1332, 62, 7220, 62, 271, 62, 19522, 7, 69, 3110, 2599, 198, 2, 220, 220, 220, 220, 3053, 796, 277, 3110, 13, 12888, 3419, 198, 2, 220, 220, 22...
2.409091
88
from app.drivers.prottable.base import PepProttableDriver from app.actions.headers import peptable as head from app.readers import tsv as tsvreader from app.actions.peptable import model_qvals as prep from app.drivers.options import peptable_options class ModelQValuesDriver(PepProttableDriver): """Given a peptide...
[ 6738, 598, 13, 36702, 13, 1676, 926, 540, 13, 8692, 1330, 24226, 2964, 926, 540, 32103, 198, 6738, 598, 13, 4658, 13, 50145, 1330, 34337, 540, 355, 1182, 198, 6738, 598, 13, 961, 364, 1330, 256, 21370, 355, 256, 21370, 46862, 198, 6...
2.898876
267
from . import camera, mat_utils, rgbd_util
[ 6738, 764, 1330, 4676, 11, 2603, 62, 26791, 11, 48670, 17457, 62, 22602 ]
3.230769
13
# -*- coding: utf-8 -*- # # Copyright (c) 2011-2013, Cédric Krier # Copyright (c) 2011-2013, B2CK # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * Redistributions of source code must retain...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 357, 66, 8, 2813, 12, 6390, 11, 327, 2634, 67, 1173, 509, 5277, 198, 2, 15069, 357, 66, 8, 2813, 12, 6390, 11, 347, 17, 34, 42, 198, 2, 1439, ...
3.331373
510
#!/usr/bin/python3 import argparse import git import ruamel.yaml import os import sys print("Entering updateEndpoint script..") parser = argparse.ArgumentParser() parser.add_argument('--action', required=True, type=str, help="action to take: 'add' or 'delete'") parser.add_argument('--cluster_name', requi...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 11748, 1822, 29572, 198, 11748, 17606, 198, 11748, 7422, 17983, 13, 88, 43695, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 4798, 7203, 17469, 278, 4296, 12915, 4122, 4226, 492, 494...
2.617431
1,090
#!/usr/bin/env python #----------------------------------------------------------------------------- # Copyright (c) 2013--, biocore development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #-------------------------...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 10097, 32501, 198, 2, 15069, 357, 66, 8, 2211, 438, 11, 3182, 420, 382, 2478, 1074, 13, 198, 2, 198, 2, 4307, 6169, 739, 262, 2846, 286, 262, 40499, 347, 10305, 13789, 13, ...
2.001699
4,710
""" STEP ONE """ import requests def request_tg_code_get_random_hash(input_phone_number): """ requests Login Code and returns a random_hash which is used in STEP TWO """ request_url = "https://my.telegram.org/auth/send_password" request_data = { "phone": input_phone_number ...
[ 37811, 49154, 16329, 37227, 201, 198, 201, 198, 11748, 7007, 201, 198, 201, 198, 201, 198, 4299, 2581, 62, 25297, 62, 8189, 62, 1136, 62, 25120, 62, 17831, 7, 15414, 62, 4862, 62, 17618, 2599, 201, 198, 220, 220, 220, 37227, 7007, 2...
2.495327
214
for c in range (0,6): print('oi') for c in range (0,6): print(c) for c in range (6,0,-1): print(c) for c in range (0,20,2): print(c) n = int(input('Digite um número')) for c in range (0,n+1): print(c) i = int(input('Digite um número inicial')) f = int(input('Digite um número final')) p = int(input('...
[ 1640, 269, 287, 2837, 357, 15, 11, 21, 2599, 198, 220, 220, 220, 3601, 10786, 23013, 11537, 198, 1640, 269, 287, 2837, 357, 15, 11, 21, 2599, 198, 220, 220, 220, 3601, 7, 66, 8, 198, 1640, 269, 287, 2837, 357, 21, 11, 15, 12095,...
2.090129
233
# -*- coding: utf-8 -*- from datetime import datetime import uuid import os import json
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 334, 27112, 198, 11748, 28686, 198, 11748, 33918, 628, 628, 198 ]
2.787879
33
# cd_raw_collection.py # "cd" stands for class discovery. This script is used by class discovery # related scripts, and represents a raw input list file. # # Steven Lu 5/20/2019 from entity.cd_subject import CDSubject from collection.raw_collection import RawCollection # Overwrite parent's add_subject() function
[ 2, 22927, 62, 1831, 62, 43681, 13, 9078, 198, 2, 366, 10210, 1, 6296, 329, 1398, 9412, 13, 770, 4226, 318, 973, 416, 1398, 9412, 198, 2, 3519, 14750, 11, 290, 6870, 257, 8246, 5128, 1351, 2393, 13, 198, 2, 198, 2, 8239, 6026, 64...
3.678161
87
# -*- coding: utf-8 -*- # snapshottest: v1 - https://goo.gl/zC4yUc from __future__ import unicode_literals from snapshottest import Snapshot snapshots = Snapshot() snapshots['test_translate 1'] = [ 'ca', "n't", "'m", "'s", "'ve", 'ha', 'wo', 'atm', 'xmas', "'ll", 'im' ] ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 11495, 1477, 24879, 25, 410, 16, 532, 3740, 1378, 42469, 13, 4743, 14, 89, 34, 19, 88, 52, 66, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 19...
1.84715
386
#!/usr/bin/env python # coding: utf-8 # In[22]: import cv2 import glob import numpy as np def findClickCoordinate(img,dot,dot_size = 5): """ Find coordinate of clicked location Parameters: -img: input image -dot: amount of output dot -dot_size: size of dot Returns: -c...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 554, 58, 1828, 5974, 628, 198, 11748, 269, 85, 17, 198, 11748, 15095, 198, 11748, 299, 32152, 355, 45941, 198, 198, 4299, 1064, 8164, 7...
2.339144
631
"""A ProFile "magic block" plugin for Cameo/Aphid system information. Forfeited into the public domain with NO WARRANTY. Read LICENSE for details. This plugin allows the Apple to obtain some basic system information from a Cameo/Aphid. By convention, this plugin is associated with block $FFFEFD. There's no reason it...
[ 37811, 32, 1041, 8979, 366, 32707, 2512, 1, 13877, 329, 32653, 78, 14, 32, 746, 312, 1080, 1321, 13, 198, 198, 1890, 5036, 863, 656, 262, 1171, 7386, 351, 8005, 34764, 56, 13, 4149, 38559, 24290, 329, 3307, 13, 198, 198, 1212, 13877...
2.693231
1,167
from django.test import TestCase from django_hosts import reverse from util.test_utils import CleanUpTempFilesTestMixin, Get, MOCK_JPG_FILE, assert_requesting_paths_succeeds from ..models import Equipment
[ 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 42625, 14208, 62, 4774, 82, 1330, 9575, 198, 198, 6738, 7736, 13, 9288, 62, 26791, 1330, 5985, 4933, 30782, 25876, 14402, 35608, 259, 11, 3497, 11, 337, 11290, 62, 41, 6968, ...
3.285714
63
# -*- coding: utf-8 -*- """`bottle_jwt.auth` module. Main auth providers class implementation. """ from __future__ import print_function from __future__ import unicode_literals import abc import six from .compat import signature __all__ = ["BaseAuthBackend", ] @six.add_metaclass(abc.ABCMeta) class BaseAuthBacke...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 63, 10985, 293, 62, 73, 46569, 13, 18439, 63, 8265, 13, 198, 198, 13383, 6284, 9549, 1398, 7822, 13, 198, 37811, 198, 198, 6738, 11593, 37443, 834, 1330, 3601, ...
2.381379
1,450
import subprocess import log
[ 11748, 850, 14681, 198, 11748, 2604, 628 ]
4.285714
7
from setuptools import setup, find_packages import os setup(name="jondis", version="0.1", description="Redis pool for HA redis clusters", long_description=read('README.md'), author="Jon Haddad", author_email="jon@grapheffect.com", classifiers=[ "Development Status :: 3 - A...
[ 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 11748, 28686, 198, 198, 40406, 7, 3672, 2625, 73, 623, 271, 1600, 198, 220, 220, 220, 220, 220, 2196, 2625, 15, 13, 16, 1600, 198, 220, 220, 220, 220, 220, 6764, 2625, ...
2.458667
375
import pytest import sys from snsql import metadata from snsql.sql.privacy import Privacy privacy = Privacy(alphas=[0.01, 0.05], epsilon=30.0, delta=0.1) overrides = {'censor_dims': False}
[ 11748, 12972, 9288, 198, 11748, 25064, 198, 6738, 3013, 25410, 1330, 20150, 198, 198, 6738, 3013, 25410, 13, 25410, 13, 13776, 1590, 1330, 16777, 198, 198, 13776, 1590, 796, 16777, 7, 282, 5902, 41888, 15, 13, 486, 11, 657, 13, 2713, ...
2.652778
72
import sys import os.path import logging import warnings from . import PACKAGEDIR from contextlib import contextmanager from matplotlib.backends.backend_pdf import PdfPages import copy import numpy as np import pandas as pd import lightkurve as lk import matplotlib.pyplot as plt from lightkurve import MPLSTYLE from as...
[ 11748, 25064, 198, 11748, 28686, 13, 6978, 198, 11748, 18931, 198, 11748, 14601, 198, 6738, 764, 1330, 47035, 4760, 1961, 4663, 198, 6738, 4732, 8019, 1330, 4732, 37153, 198, 6738, 2603, 29487, 8019, 13, 1891, 2412, 13, 1891, 437, 62, 1...
3.34
200
# -*- coding:utf-8 -*- """ """ import numpy as np import pandas as pd from pandas.util import hash_pandas_object from hypernets.tabular.datasets.dsutils import load_bank from . import if_dask_ready, is_dask_installed from ..dask_transofromer_test import setup_dask if is_dask_installed: import dask.dataframe as d...
[ 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 37811, 198, 198, 37811, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 19798, 292, 13, 22602, 1330, 12234, 62, 79, 392, 292, 62, 15252...
2.649425
174
import os import sys from os.path import join as pjoin from loguru import logger from pathlib import Path from rich.logging import RichHandler try: from pyinspect import install_traceback install_traceback() except ImportError: pass # fails in notebooks from . import settings, actors from .scene import S...
[ 11748, 28686, 198, 11748, 25064, 198, 6738, 28686, 13, 6978, 1330, 4654, 355, 279, 22179, 198, 6738, 2604, 14717, 1330, 49706, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 5527, 13, 6404, 2667, 1330, 3998, 25060, 198, 198, 28311, 25, ...
2.442068
561
from unittest.mock import patch from mau.parsers import nodes from mau.parsers.main_parser import MainParser from tests.helpers import init_parser_factory, parser_test_factory init_parser = init_parser_factory(MainParser) _test = parser_test_factory(MainParser) @patch("mau.parsers.main_parser.header_anchor") ...
[ 6738, 555, 715, 395, 13, 76, 735, 1330, 8529, 198, 198, 6738, 285, 559, 13, 79, 945, 364, 1330, 13760, 198, 6738, 285, 559, 13, 79, 945, 364, 13, 12417, 62, 48610, 1330, 8774, 46677, 198, 198, 6738, 5254, 13, 16794, 364, 1330, 231...
2.580645
279
from __future__ import unicode_literals from mayan.apps.smart_settings.classes import NamespaceMigration from .serialization import yaml_load class CommonSettingMigration(NamespaceMigration): """ From version 0001 to 0002 backend arguments are no longer quoted but YAML valid too. Changed in version 3.3....
[ 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 743, 272, 13, 18211, 13, 27004, 62, 33692, 13, 37724, 1330, 28531, 10223, 44, 4254, 198, 198, 6738, 764, 46911, 1634, 1330, 331, 43695, 62, 2220, 628, 198, 48...
3.357143
98
import json import numpy as np # import torchtext from torchtext.vocab import Vectors from tqdm import tqdm import torch from torch.utils.data import TensorDataset, DataLoader import nltk nltk.download('punkt') # def clean_text(text): # text = re.sub(r"<.*?>", " ", text) # text = re.sub(r"[^A-Za-z0-9(),!?\'`]"...
[ 11748, 33918, 198, 11748, 299, 32152, 355, 45941, 198, 2, 1330, 28034, 5239, 198, 6738, 28034, 5239, 13, 18893, 397, 1330, 569, 478, 669, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 11748, 28034, 198, 6738, 28034, 13, 26791, ...
2.372093
172
import unittest import fix15 import io import unittest.mock import fix15.__main__ test_file = \ """id,firstname,lastname,accountid 00300000053jhOc,john,smith,00100006gG70oPa 003000A694fjJ21,allison,brown,001000000043463 0030000bB09fQt9,thomas,tomlinson,001000004FfoA00 003000000044000,hannah,anderson,001000000000001 00...
[ 11748, 555, 715, 395, 198, 11748, 4259, 1314, 198, 11748, 33245, 198, 11748, 555, 715, 395, 13, 76, 735, 198, 11748, 4259, 1314, 13, 834, 12417, 834, 198, 198, 9288, 62, 7753, 796, 3467, 198, 37811, 312, 11, 11085, 3672, 11, 12957, ...
2.333333
315
""" This name generator is an improved version of das' random syllable-based name generator. Original source at: https://codereview.stackexchange.com/q/156903 Improved by: Gustavo R. Rehermann (Gustavo6046) """ import random vowels = 'aeiou' consonants = 'bcdfghjklmnpqrstvwxyz' pre_consonants = 'tspdkcmnlxrg' post_c...
[ 37811, 198, 1212, 1438, 17301, 318, 281, 6596, 2196, 286, 288, 292, 6, 4738, 27226, 540, 12, 3106, 198, 3672, 17301, 13, 198, 198, 20556, 2723, 379, 25, 3740, 1378, 19815, 567, 1177, 13, 301, 330, 365, 87, 3803, 13, 785, 14, 80, 1...
2.398964
193
import pytest from streamsets.testframework.decorators import stub @stub @pytest.mark.parametrize('stage_attributes', [{'authentication_type': 'USER_PASS'}]) @stub @pytest.mark.parametrize('stage_attributes', [{'authentication_type': 'LDAP'}, {'authentication_type': 'N...
[ 11748, 12972, 9288, 198, 198, 6738, 15190, 1039, 13, 9288, 30604, 13, 12501, 273, 2024, 1330, 17071, 628, 198, 31, 301, 549, 198, 31, 9078, 9288, 13, 4102, 13, 17143, 316, 380, 2736, 10786, 14247, 62, 1078, 7657, 3256, 685, 90, 6, 4...
1.729766
1,495
# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2017-03-05 16:59 from __future__ import unicode_literals from django.db import migrations, models
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 940, 319, 2177, 12, 3070, 12, 2713, 1467, 25, 3270, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738,...
2.767857
56
''' Class for evaluating trained Classifier model ''' from sklearn.metrics import accuracy_score func_map = { 'accuracy_score': accuracy_score } class ModelEvaluator: ''' Class for evaluating trained Classifier model ''' def load_input(self, trained_classifier): ''' Handles load...
[ 198, 7061, 6, 198, 9487, 329, 22232, 8776, 5016, 7483, 2746, 198, 7061, 6, 198, 198, 6738, 1341, 35720, 13, 4164, 10466, 1330, 9922, 62, 26675, 198, 198, 20786, 62, 8899, 796, 1391, 198, 220, 220, 220, 705, 4134, 23843, 62, 26675, 1...
2.325744
571