content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import json import os import glob import random from typing import Union try: import xarray as xr except ModuleNotFoundError: xr = None import numpy as np import pandas as pd from .datasets import Datasets from .utils import check_attributes, download, sanity_check from ai4water.utils.utils import dateandtim...
[ 11748, 33918, 198, 11748, 28686, 198, 11748, 15095, 198, 11748, 4738, 198, 6738, 19720, 1330, 4479, 198, 198, 28311, 25, 198, 220, 220, 220, 1330, 2124, 18747, 355, 2124, 81, 198, 16341, 19937, 3673, 21077, 12331, 25, 198, 220, 220, 220...
2.017573
20,771
# Space: O(n) # Time: O(n) # BFS approach # Definition for a binary tree node. # class TreeNode: # def __init__(self, val=0, left=None, right=None): # self.val = val # self.left = left # self.right = right
[ 198, 2, 4687, 25, 440, 7, 77, 8, 198, 2, 3862, 25, 440, 7, 77, 8, 198, 198, 2, 347, 10652, 3164, 198, 198, 2, 30396, 329, 257, 13934, 5509, 10139, 13, 198, 2, 1398, 12200, 19667, 25, 198, 2, 220, 220, 220, 220, 825, 11593, 1...
2.18018
111
_base_ = [ '../_base_/models/faster_rcnn_r50_fpn_gc.py', '../_base_/datasets/voc0712_RoiCC.py', '../_base_/schedules/schedule_1x.py', '../_base_/default_runtime.py' ]
[ 62, 8692, 62, 796, 685, 198, 220, 220, 220, 705, 40720, 62, 8692, 62, 14, 27530, 14, 69, 1603, 62, 6015, 20471, 62, 81, 1120, 62, 69, 21999, 62, 36484, 13, 9078, 3256, 198, 220, 220, 220, 705, 40720, 62, 8692, 62, 14, 19608, 292...
1.904255
94
# Copyright Pincer 2021-Present # Full MIT License can be found in `LICENSE` at the project root. """ sent when a user's voice state changes in a subscribed voice channel (mute, volume, etc.) """ # TODO: Implement event
[ 2, 15069, 350, 1939, 263, 33448, 12, 34695, 198, 2, 6462, 17168, 13789, 460, 307, 1043, 287, 4600, 43, 2149, 24290, 63, 379, 262, 1628, 6808, 13, 198, 198, 37811, 198, 34086, 618, 257, 2836, 338, 3809, 1181, 2458, 287, 257, 45794, 3...
3.46875
64
"""Meta Data Categories.""" class Categories: """Meta Data Categories.""" BIOSPECIMEN = "Biospecimen" DEMOGRAPHICS = "Demographics" SC_RNA_SEQ_LEVEL_1 = "ScRNA-seqLevel1" SC_RNA_SEQ_LEVEL_2 = "ScRNA-seqLevel2" SC_RNA_SEQ_LEVEL_3 = "ScRNA-seqLevel3" SC_RNA_SEQ_LEVEL_4 = "ScRNA-seqLevel4" ...
[ 37811, 48526, 6060, 45486, 526, 15931, 628, 198, 4871, 45486, 25, 198, 220, 220, 220, 37227, 48526, 6060, 45486, 526, 15931, 628, 220, 220, 220, 27553, 47, 2943, 3955, 1677, 796, 366, 33, 4267, 43106, 19027, 1, 198, 220, 220, 220, 401...
2.080963
914
from base64 import b64decode, urlsafe_b64encode import hashlib import logging import re try: from urllib.parse import unquote except ImportError: from urllib import unquote from django.http import JsonResponse from oidc_provider.lib.errors import * from oidc_provider.lib.utils.params import * from oidc_provid...
[ 6738, 2779, 2414, 1330, 275, 2414, 12501, 1098, 11, 2956, 7278, 8635, 62, 65, 2414, 268, 8189, 198, 11748, 12234, 8019, 198, 11748, 18931, 198, 11748, 302, 198, 28311, 25, 198, 220, 220, 220, 422, 2956, 297, 571, 13, 29572, 1330, 555,...
2.954839
155
import requests import datetime import json import telegram #공공 오픈 API를 이용하여 외환 정보 받아오기 if __name__ == '__main__': main()
[ 11748, 7007, 198, 11748, 4818, 8079, 198, 11748, 33918, 198, 11748, 573, 30536, 198, 198, 2, 166, 111, 113, 166, 111, 113, 23821, 246, 97, 169, 242, 230, 7824, 167, 98, 120, 23821, 251, 112, 168, 248, 102, 47991, 246, 168, 245, 105,...
1.5
86
if False: x = 3 elif False: y = 4 else: z = 5
[ 361, 10352, 25, 198, 220, 220, 220, 2124, 796, 513, 198, 417, 361, 10352, 25, 198, 220, 220, 220, 331, 796, 604, 198, 17772, 25, 198, 220, 220, 220, 1976, 796, 642, 198 ]
1.757576
33
delta_time = 0
[ 67, 12514, 62, 2435, 796, 657, 198 ]
2.142857
7
"""All low level structures used for parsing eddystone packets.""" from construct import Struct, Byte, Switch, OneOf, Int8sl, Array, \ GreedyString, Int16ub, Int16ul, Int32ub from ..const import EDDYSTONE_URL_SCHEMES, EDDYSTONE_TLM_UNENCRYPTED, EDDYSTONE_TLM_ENCRYPTED # pylint: disable=invalid-n...
[ 37811, 3237, 1877, 1241, 8573, 973, 329, 32096, 1225, 9892, 6440, 24624, 526, 15931, 198, 6738, 5678, 1330, 32112, 11, 30589, 11, 14645, 11, 1881, 5189, 11, 2558, 23, 6649, 11, 15690, 11, 3467, 198, 220, 220, 220, 220, 220, 220, 220, ...
2.251223
613
#read the program.amup file raw_file = open("program.amup", "r") #make empty structure of program arr = { "target": "", "sec_target": "", "thr_target": "", "operator": "+", "A": 0, "B": 0, "C": 0, "D": 0 } #make empty list of converted to C++ language program lines = [] #simple functio...
[ 2, 961, 262, 1430, 13, 321, 929, 2393, 198, 1831, 62, 7753, 796, 1280, 7203, 23065, 13, 321, 929, 1600, 366, 81, 4943, 198, 198, 2, 15883, 6565, 4645, 286, 1430, 198, 3258, 796, 1391, 198, 220, 220, 220, 366, 16793, 1298, 366, 160...
1.804583
1,571
import pytest from datetime import datetime from uuid import uuid4 from s3.core import RequestError base_url = 'https://test-bucket.storage.yandexcloud.net' list_data = ( b'<?xml version="1.0" encoding="UTF-8"?>\n' b'<ListBucketResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/">\n' b' <Name>flk-tes...
[ 11748, 12972, 9288, 198, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 334, 27112, 1330, 334, 27112, 19, 198, 198, 6738, 264, 18, 13, 7295, 1330, 19390, 12331, 198, 198, 8692, 62, 6371, 796, 705, 5450, 1378, 9288, 12, 27041, 316...
2.012879
1,320
import numpy as np import csv from pandas import read_csv import pandas as pd from sklearn.model_selection import train_test_split with open('cancer-data.csv') as f: raw_data = f.read() ####PREPROCESS OF THE DATASET###### #def data_preprocess2(filename): # # Load a CSV file # dataset = read_csv(filename, header...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 269, 21370, 198, 6738, 19798, 292, 1330, 1100, 62, 40664, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 4512, 62, 9288, 62, 35312, 198, 198, 4480, ...
2.339934
606
from flask import render_template, redirect, url_for,flash,request from flask_login import login_required, current_user, login_user,logout_user from ..models import Users from .forms import Loginform,Signupform from .. import db from . import auth @auth.route('/signup', methods=['GET','POST']) @auth.route('/login...
[ 6738, 42903, 1330, 8543, 62, 28243, 11, 18941, 11, 19016, 62, 1640, 11, 34167, 11, 25927, 198, 6738, 42903, 62, 38235, 1330, 17594, 62, 35827, 11, 1459, 62, 7220, 11, 17594, 62, 7220, 11, 6404, 448, 62, 7220, 198, 6738, 11485, 27530, ...
3.225
120
with (a, c,): pass with (a as b, c): pass async with (a, c,): pass async with (a as b, c): pass
[ 4480, 357, 64, 11, 269, 11, 2599, 198, 220, 220, 220, 1208, 198, 198, 4480, 357, 64, 355, 275, 11, 269, 2599, 198, 220, 220, 220, 1208, 198, 198, 292, 13361, 351, 357, 64, 11, 269, 11, 2599, 198, 220, 220, 220, 1208, 198, 198, ...
1.885246
61
from .CensusTractMapper import CensusTractMapper from .NeighborhoodMapper import NeighborhoodMapper from .BoroughMapper import BoroughMapper
[ 6738, 764, 34, 7314, 51, 974, 44, 11463, 1330, 20962, 51, 974, 44, 11463, 198, 6738, 764, 46445, 2865, 2894, 44, 11463, 1330, 37914, 44, 11463, 198, 6738, 764, 33, 7985, 44, 11463, 1330, 48114, 44, 11463, 198 ]
3.710526
38
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django import VERSION as DJANGO_VERSION from django.db import migrations
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 42625, 14208, 1330, 44156, 2849, 355, 13004, 1565, 11230, 62, 43717, 198, 6738, 42625, 14208, 1...
2.959184
49
import os import socket import sys import environs from apps.base.utils.env import env BASE_DIR = environs.Path(__file__).parent.parent # type: ignore READ_DOT_ENV_FILE = env.bool("READ_DOT_ENV_FILE", default=True) if READ_DOT_ENV_FILE is True: env.read_env(str(BASE_DIR.joinpath(".env"))) # Quick-start devel...
[ 11748, 28686, 198, 11748, 17802, 198, 11748, 25064, 198, 198, 11748, 17365, 343, 684, 198, 198, 6738, 6725, 13, 8692, 13, 26791, 13, 24330, 1330, 17365, 198, 198, 33, 11159, 62, 34720, 796, 17365, 343, 684, 13, 15235, 7, 834, 7753, 83...
2.384927
2,959
#!/usr/bin/env python import rospy from interactive_markers.interactive_marker_server import InteractiveMarkerServer from visualization_msgs.msg import InteractiveMarker, InteractiveMarkerControl, Marker import copy class KnotPointsServer: ''' This class allows setting points with interactive markers This...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 686, 2777, 88, 198, 198, 6738, 14333, 62, 4102, 364, 13, 3849, 5275, 62, 4102, 263, 62, 15388, 1330, 21365, 9704, 263, 10697, 198, 6738, 32704, 62, 907, 14542, 13, 19662, ...
2.380805
1,615
from os.path import expanduser, dirname import pandas as pd import numpy as np import os import re import sys import json import joblib import pickle import xgboost from xgboost import XGBClassifier from sklearn.pipeline import Pipeline from sklearn.compose import ColumnTransformer from sklearn.model_selection import ...
[ 6738, 28686, 13, 6978, 1330, 4292, 7220, 11, 26672, 3672, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 25064, 198, 11748, 33918, 198, 11748, 1693, 8019, 198, 1...
2.972535
1,420
from .pasttrec import * from .communication import *
[ 6738, 764, 30119, 83, 8344, 1330, 1635, 198, 6738, 764, 32560, 1330, 1635, 198 ]
3.785714
14
#!/usr/bin/env python3 # depends on 'pymumble' # A mumble bot, plays music, tells fortunes. # Uses youtube-dl as a backend. import subprocess import wave from pymumble_py3.mumble import Mumble from pymumble_py3.callbacks import * from subprocess import call from sys import argv from os import remo...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 8338, 319, 705, 79, 4948, 10344, 6, 198, 198, 2, 317, 285, 10344, 10214, 11, 5341, 2647, 11, 4952, 27806, 13, 198, 2, 36965, 35116, 12, 25404, 355, 257, 30203, 13, 198, 198,...
2.54432
801
''' Страны и города ''' n = int(input()) cities = dict() for line in range(n): line = input() line = line.split() country = line[0] for city in line[1:]: cities[city] = country m = int(input()) for city in range(m): print(cities[input()])
[ 7061, 6, 198, 140, 94, 20375, 21169, 16142, 22177, 45035, 12466, 116, 12466, 111, 15166, 21169, 25443, 112, 16142, 198, 7061, 6, 198, 77, 796, 493, 7, 15414, 28955, 198, 66, 871, 796, 8633, 3419, 198, 1640, 1627, 287, 2837, 7, 77, 2...
2.136
125
#!/usr/bin/env python """ Combine data from the crosswiki_dictionary crosswiki_invdict dbpedia_geo geoname_links You'll want to make an index on the geonameid property in the geoanmes.allCountries collection, e.g.: db.allCountries.ensureIndex({geonameid: 1}) """ import sys import re import codecs i...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 198, 20575, 500, 1366, 422, 262, 628, 220, 220, 220, 3272, 15466, 62, 67, 14188, 198, 220, 220, 220, 3272, 15466, 62, 16340, 11600, 198, 220, 220, 220, 20613, 50235, 62, 469, ...
2.688235
170
import json import os import time import zmq from slackclient import SlackClient from zmq import Context SLACK_CHANNEL_ID = os.environ["SLACK_CHANNEL_ID"] SLACK_BOT_TOKEN = os.environ["SLACK_BOT_TOKEN"] TOPICFILTER = "1" TIMEOUT = 1 ctx = Context() print("Connecting to the producer") socket = ctx.socket(zmq.SUB) s...
[ 11748, 33918, 198, 11748, 28686, 198, 11748, 640, 198, 198, 11748, 1976, 76, 80, 198, 198, 6738, 30740, 16366, 1330, 36256, 11792, 198, 6738, 1976, 76, 80, 1330, 30532, 198, 198, 8634, 8120, 62, 3398, 22846, 3698, 62, 2389, 796, 28686, ...
2.342618
359
""" extract_img.py get images from WeChat friends list. """ import itchat import os import pickle from concurrent.futures import * import concurrent.futures import time from tqdm import tqdm from math import ceil import argparse if __name__ == "__main__": parser = argparse.ArgumentParser() ...
[ 37811, 201, 198, 2302, 974, 62, 9600, 13, 9078, 201, 198, 1136, 4263, 422, 775, 30820, 2460, 1351, 13, 201, 198, 37811, 201, 198, 11748, 340, 17006, 201, 198, 11748, 28686, 201, 198, 11748, 2298, 293, 201, 198, 6738, 24580, 13, 69, ...
2.155249
1,810
import wx import unittest try: _ except NameError: import gettext gettext.install('Digsby') if getattr(wx, 'WXPY', False): wx.WindowClass = wx._Window else: wx.WindowClass = wx.Window try: sentinel except NameError: import bootstrap bootstrap.install_sentinel() test_main = unittest....
[ 11748, 266, 87, 198, 11748, 555, 715, 395, 198, 198, 28311, 25, 198, 220, 220, 220, 4808, 198, 16341, 6530, 12331, 25, 198, 220, 220, 220, 1330, 651, 5239, 198, 220, 220, 220, 651, 5239, 13, 17350, 10786, 35, 9235, 1525, 11537, 198,...
2.425373
134
#!/usr/bin/env python import roslib import rospy import smach import smach_ros from smach import StateMachine import actionlib import time import threading from smach_ros import SimpleActionState from smach_ros import ActionServerWrapper from std_msgs.msg import String from std_msgs.msg import UInt8 from wm_interprete...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 686, 6649, 571, 198, 11748, 686, 2777, 88, 198, 11748, 895, 620, 198, 11748, 895, 620, 62, 4951, 198, 6738, 895, 620, 1330, 1812, 37573, 198, 11748, 2223, 8019, 198, 11748,...
1.719498
2,549
from flask import request, redirect, g from app import db from config.setting import MOBILE_WHITE_LIST from app.modules.vendor.pre_request.flask import filter_params from app.modules.vendor.pre_request.filter_rules import Rule from app.modules.passport.register_mobile import RegisterHandler from app.modules.base.bas...
[ 6738, 42903, 1330, 2581, 11, 18941, 11, 308, 198, 198, 6738, 598, 1330, 20613, 198, 198, 6738, 4566, 13, 33990, 1330, 13070, 3483, 2538, 62, 12418, 12709, 62, 45849, 198, 198, 6738, 598, 13, 18170, 13, 85, 18738, 13, 3866, 62, 25927, ...
3.556777
273
import abc from typing import Optional
[ 11748, 450, 66, 198, 6738, 19720, 1330, 32233, 628 ]
4.444444
9
x = 42 print x # Outputs `42`
[ 87, 796, 5433, 198, 4798, 2124, 220, 220, 1303, 25235, 82, 4600, 3682, 63 ]
2.214286
14
# # Copyright 2019 The FATE Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
[ 2, 198, 2, 220, 15069, 13130, 383, 376, 6158, 46665, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 220, 345, 743, 407, 779, 428, 2393, ...
3.43908
435
import matplotlib.pyplot as plt import random import math import sys from graphics import * _num_bins = 96 win = GraphWin("floorplan", 531, 741) b = Image(Point(265, 371), "floorplan.gif") r = Rectangle(Point(20, 0), Point(511, 150)) r.setFill("white") title = Text(Point(265, 30), "Building Occupant Optimization") si...
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 4738, 198, 11748, 10688, 198, 11748, 25064, 198, 6738, 9382, 1330, 1635, 198, 198, 62, 22510, 62, 65, 1040, 796, 9907, 198, 5404, 796, 29681, 16643, 7203, 28300, 11578...
2.684729
203
import rdflib # Store custom properties and objects not defined in CASE as the PLASO prefix. PLASO = rdflib.Namespace('http://plaso.example.org/core#')
[ 198, 11748, 374, 67, 2704, 571, 198, 198, 2, 9363, 2183, 6608, 290, 5563, 407, 5447, 287, 42001, 355, 262, 9297, 1921, 46, 21231, 13, 198, 6489, 1921, 46, 796, 374, 67, 2704, 571, 13, 36690, 10223, 10786, 4023, 1378, 489, 292, 78, ...
3
51
a = source() b = k if a: b = c elif a: b = d sink(b)
[ 64, 796, 2723, 3419, 198, 65, 796, 479, 198, 361, 257, 25, 198, 220, 220, 220, 275, 796, 269, 198, 417, 361, 257, 25, 198, 220, 220, 220, 275, 796, 288, 198, 82, 676, 7, 65, 8 ]
1.621622
37
from authentication import BaseHandler from authentication import app # from authentication import sendmail @app.route('/signup', 'signup')
[ 6738, 18239, 1330, 7308, 25060, 198, 6738, 18239, 1330, 598, 198, 2, 422, 18239, 1330, 3758, 4529, 628, 198, 31, 1324, 13, 38629, 10786, 14, 12683, 929, 3256, 705, 12683, 929, 11537, 198 ]
4.30303
33
import argparse import os import sys import usb_lookup __author__ = 'Preston Miller & Chapin Bryce' __date__ = '20160401' __version__ = 0.03 __description__ = 'This scripts reads a Windows 7 Setup API log and prints USB Devices to the user' def main(in_file): """ Main function to handle operation :param ...
[ 11748, 1822, 29572, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 38551, 62, 5460, 929, 198, 198, 834, 9800, 834, 796, 705, 47, 2118, 261, 7920, 1222, 15954, 259, 39560, 6, 198, 834, 4475, 834, 796, 705, 1264, 1899, 21844, 6, 198,...
2.574074
1,944
from datetime import datetime from typing import Optional from fastapi import APIRouter, Depends from sqlmodel import Field, SQLModel from ...db import get_session from sqlalchemy import select from sqlalchemy.ext.asyncio import AsyncSession router = APIRouter() @router.post("/history_ortho_conference", respo...
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 19720, 1330, 32233, 198, 198, 6738, 3049, 15042, 1330, 3486, 4663, 39605, 11, 2129, 2412, 198, 6738, 44161, 19849, 1330, 7663, 11, 16363, 17633, 198, 198, 6738, 2644, 9945, 1330, 651, 62, 2...
3.063291
237
from .book import Book
[ 6738, 764, 2070, 1330, 4897, 198 ]
3.833333
6
#! /usr/bin/env python3 # -*- coding: utf-8 -*- # from https://docs.scipy.org/doc/numpy-dev/user/quickstart.html import numpy as np a = np.arange(15).reshape(3, 5) print("a=",a) print("\ta.shape =",a.shape) print("\ta.ndim =",a.ndim) print("\ta.dtype.name =",a.dtype.name) print("\ta.itemsize =",a.itemsize) print("\t...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 422, 3740, 1378, 31628, 13, 1416, 541, 88, 13, 2398, 14, 15390, 14, 77, 32152, 12, 7959, 14, 7220, ...
1.96069
1,043
import tensorflow as tf import numpy as np from capreolus import get_logger from capreolus.utils.exceptions import MissingDocError from . import Extractor from .bertpassage import BertPassage logger = get_logger(__name__) @Extractor.register
[ 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 1451, 260, 349, 385, 1330, 651, 62, 6404, 1362, 198, 6738, 1451, 260, 349, 385, 13, 26791, 13, 1069, 11755, 1330, 25639, 23579, 12331, 198, 6738, ...
3.194805
77
import unittest N = 8 count = 0 if __name__ == "__main__": # unittest.main() solveNQ() print(count)
[ 11748, 555, 715, 395, 198, 198, 45, 796, 807, 198, 9127, 796, 657, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1303, 555, 715, 395, 13, 12417, 3419, 198, 220, 220, 220, 8494, 45, 48, 3419...
2.125
56
from creevey.util.util import * # noqa: F401, F403
[ 6738, 269, 631, 3304, 13, 22602, 13, 22602, 1330, 1635, 220, 1303, 645, 20402, 25, 376, 21844, 11, 376, 31552, 198 ]
2.47619
21
import csv, networkx class Layer(object): """Class representing a layer in the social network"""
[ 11748, 269, 21370, 11, 3127, 87, 198, 198, 4871, 34398, 7, 15252, 2599, 198, 197, 37811, 9487, 10200, 257, 7679, 287, 262, 1919, 3127, 37811, 628, 197, 628, 628, 197, 197 ]
3.451613
31
# -*- coding: utf-8 -*- @auth.requires_login() @auth.requires_login() @auth.requires_login()
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 31, 18439, 13, 47911, 62, 38235, 3419, 220, 220, 198, 220, 220, 198, 31, 18439, 13, 47911, 62, 38235, 3419, 220, 220, 220, 220, 220, 220, 198, 220, 198, 31, 184...
1.982143
56
import math n = int(input()) print(3 + math.ceil(math.log(n/3, 2)))
[ 11748, 10688, 198, 77, 796, 493, 7, 15414, 28955, 198, 4798, 7, 18, 1343, 10688, 13, 344, 346, 7, 11018, 13, 6404, 7, 77, 14, 18, 11, 362, 22305 ]
2.310345
29
# ============================================================================= # SIMULATION-BASED ENGINEERING LAB (SBEL) - http://sbel.wisc.edu # University of Wisconsin-Madison # # Copyright (c) 2020 SBEL # All rights reserved. # # Use of this source code is governed by a BSD-style license that can be found # at http...
[ 2, 38093, 25609, 198, 2, 23749, 6239, 6234, 12, 33, 42827, 36924, 8881, 1137, 2751, 406, 6242, 357, 16811, 3698, 8, 532, 2638, 1378, 82, 6667, 13, 86, 2304, 13, 15532, 198, 2, 2059, 286, 9279, 12, 46845, 198, 2, 198, 2, 15069, 357...
4.243243
185
from vtam.utils.RunnerFilterCodonStop import RunnerFilterCodonStop from vtam.utils.Logger import Logger from vtam.utils.FileSampleInformation import FileSampleInformation from vtam.utils.VTAMexception import VTAMexception from vtam.utils.DataframeVariantReadCountLike import DataframeVariantReadCountLike from wopmars.mo...
[ 6738, 410, 83, 321, 13, 26791, 13, 49493, 22417, 43806, 261, 19485, 1330, 21529, 22417, 43806, 261, 19485, 198, 6738, 410, 83, 321, 13, 26791, 13, 11187, 1362, 1330, 5972, 1362, 198, 6738, 410, 83, 321, 13, 26791, 13, 8979, 36674, 219...
3.471698
106
from PIL import Image import numpy as np def merge_pixels(pixel1, pixel2): """ Merge two R or G or B pixels using 4 least significant bits. INPUT: A string tuple (e.g. ("00101010")), Another string tuple (e.g. ("00101010")) OUTPUT: An integer tuple with the two RGB values merged 00100010 ...
[ 6738, 350, 4146, 1330, 7412, 198, 11748, 299, 32152, 355, 45941, 628, 628, 198, 4299, 20121, 62, 79, 14810, 7, 32515, 16, 11, 17465, 17, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 39407, 734, 371, 393, 402, 393, 347, 17848...
2.671141
149
# -*- coding: UTF-8 -*- import cv2 import numpy as np import os.path # 椒盐噪声 # 高斯噪声 # 昏暗 # 亮度 # 旋转 # 翻转 if __name__ == "__main__": # 图片文件夹路径 file_dir = r"../dataset/train/Toothbrush/" for img_name in os.listdir(file_dir): img_path = file_dir + img_name img = cv2.imread(img_path)...
[ 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 198, 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 13, 6978, 628, 198, 2, 10545, 97, 240, 33566, 238, 161, 247, 103, 18004, 108, 628, 198, 2, 1626...
1.675764
916
from django.db import connections from django.db.models.expressions import Col from django.db.models.sql.compiler import SQLCompiler from django.db.models.sql.constants import INNER from django.db.models.sql.query import Query from django_cte import CTEQuerySet from django_cte import With as CTEWith from mptt.querysets...
[ 6738, 42625, 14208, 13, 9945, 1330, 8787, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 13, 42712, 507, 1330, 1623, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 13, 25410, 13, 5589, 5329, 1330, 49747, 5639, 3361, 5329, 198, 6738, 42625...
2.585168
863
"""ExpLib""" import json from . import dataset, expmaker, logging, model, optim from .experiment import Experiment
[ 37811, 16870, 25835, 37811, 198, 11748, 33918, 198, 198, 6738, 764, 1330, 27039, 11, 1033, 10297, 11, 18931, 11, 2746, 11, 6436, 198, 6738, 764, 23100, 3681, 1330, 29544, 198 ]
3.866667
30
#!/usr/bin/env python3 # -*- coding: utf-8 -*- mytext = "hello world" print(mytext[1]) print(mytext[2:4]) print( mytext[0: : 2 ] ) print(mytext.center(80)) print("Number of es in mytext:", mytext.count("e") ) print("Number of lds in mytext:", mytext.count("ld") ) print(mytext.endswith("ing")) print(mytext.capit...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 1820, 5239, 796, 366, 31373, 995, 1, 198, 198, 4798, 7, 1820, 5239, 58, 16, 12962, 198, 4798, 7, 1820, 523...
2.391026
156
# -*- coding: utf-8 -*- ## xxx import math import os from distutils.dir_util import mkpath import cv2 import matplotlib.pyplot as plt import numpy as np from scipy.spatial.distance import cdist import tensorflow as tf from train_config import config from pycocotools.coco import COCO, maskUtils from tensorlayer import...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2235, 2124, 5324, 198, 11748, 10688, 198, 11748, 28686, 198, 6738, 1233, 26791, 13, 15908, 62, 22602, 1330, 33480, 6978, 198, 198, 11748, 269, 85, 17, 198, 11748, 2...
2.098077
11,440
class User: ''' Class that generates new instances of users ''' users = [] #Empty list that will store users def __init__(self, first_name, last_name, username, email, password): ''' init method helps to define the properties for our user objects ''' self.first_name ...
[ 4871, 11787, 25, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 5016, 326, 18616, 649, 10245, 286, 2985, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 2985, 796, 17635, 1303, 40613, 1351, 326, 481, 3650, 2985, 628, 220, 220...
2.368186
1,119
from time import time t1 = time() print(len([i for i in range(1, 10001) if Lychrel_Check(i)])) print(f"Process completed in {time()-t1}s")
[ 6738, 640, 1330, 640, 628, 628, 198, 83, 16, 796, 640, 3419, 198, 4798, 7, 11925, 26933, 72, 329, 1312, 287, 2837, 7, 16, 11, 1802, 486, 8, 611, 9334, 354, 2411, 62, 9787, 7, 72, 15437, 4008, 198, 4798, 7, 69, 1, 18709, 5668, ...
2.553571
56
#!/usr/bin/env python # -*- coding: utf-8 -*- import unittest from chibi_lxc.container import Container
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 555, 715, 395, 198, 6738, 442, 27567, 62, 75, 25306, 13, 34924, 1330, 43101, 628, 628, 628 ]
2.658537
41
import os import math import random import numpy as np import tensorflow as tf from sklearn import metrics # from past.builtins import xrange import pdb def zero_nil_slot(t, name=None): """ Overwrites the nil_slot (first row) of the input Tensor with zeros. The nil_slot is a dummy slot and should not be ...
[ 11748, 28686, 198, 11748, 10688, 198, 11748, 4738, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 1341, 35720, 1330, 20731, 198, 2, 422, 1613, 13, 18780, 1040, 1330, 2124, 9521, 198, 11748, 279, ...
2.487476
519
import sys import os workload = sys.argv[1] dirname = "workload/dc_workload/all-to-all-144-"+workload protocol = sys.argv[2] bandwidth = ['40G', '100G'] delay = ['200ns'] load = [0.5, 0.6, 0.7, 0.8] slowdown_val = [] for d in delay: for l in load: slowdown_val = [] for b in bandwidth: ...
[ 11748, 25064, 198, 11748, 28686, 198, 198, 1818, 2220, 796, 25064, 13, 853, 85, 58, 16, 60, 198, 15908, 3672, 796, 366, 1818, 2220, 14, 17896, 62, 1818, 2220, 14, 439, 12, 1462, 12, 439, 12, 18444, 21215, 10, 1818, 2220, 198, 11235,...
1.767838
939
import socket, uuid from django.db import models, transaction from django.db.models import fields, signals from django.dispatch import receiver from django.utils.encoding import force_text from django.utils.functional import Promise from django.utils.translation import ugettext_lazy as _ # based on 2017-11-28 # h...
[ 11748, 17802, 11, 334, 27112, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 11, 8611, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 1330, 7032, 11, 10425, 198, 6738, 42625, 14208, 13, 6381, 17147, 1330, 9733, 198, 6738, 42625, 142...
2.373308
11,599
from unittest import TestCase import numpy as np from bfdc.drift import move_drift_to_zero
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 275, 16344, 66, 13, 7109, 2135, 1330, 1445, 62, 7109, 2135, 62, 1462, 62, 22570, 628 ]
2.967742
31
import unittest from scrapy.http import Headers from scrapy.http import HtmlResponse from scrapy.http import Response from scrapy.http import TextResponse from scrapy.http import XmlResponse from scrapy.responsetypes import responsetypes if __name__ == "__main__": unittest.main()
[ 11748, 555, 715, 395, 198, 198, 6738, 15881, 88, 13, 4023, 1330, 7123, 364, 198, 6738, 15881, 88, 13, 4023, 1330, 367, 20369, 31077, 198, 6738, 15881, 88, 13, 4023, 1330, 18261, 198, 6738, 15881, 88, 13, 4023, 1330, 8255, 31077, 198, ...
3.321839
87
#!/usr/bin/env python """Base class for Yambo+Wannier90 workflow.""" from email.charset import QP import pathlib import typing as ty import numpy as np from aiida import orm from aiida.common import AttributeDict from aiida.common.lang import type_check from aiida.engine import ExitCode, ProcessBuilder, ToContext, Wo...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 14881, 1398, 329, 14063, 2127, 10, 54, 1236, 959, 3829, 30798, 526, 15931, 198, 6738, 3053, 13, 354, 945, 316, 1330, 1195, 47, 198, 11748, 3108, 8019, 198, 11748, 19720, 355, 12...
1.994652
26,925
import unittest from unittest.mock import patch from unittest.mock import mock_open from acscore import metrics
[ 11748, 555, 715, 395, 198, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 8529, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 15290, 62, 9654, 198, 198, 6738, 936, 26675, 1330, 20731, 628 ]
3.285714
35
import logging from google.appengine.ext import ndb from flask_restplus import abort from src.beans.item import Item import uuid
[ 11748, 18931, 198, 198, 6738, 23645, 13, 1324, 18392, 13, 2302, 1330, 299, 9945, 198, 6738, 42903, 62, 2118, 9541, 1330, 15614, 198, 198, 6738, 12351, 13, 44749, 13, 9186, 1330, 9097, 198, 11748, 334, 27112, 198 ]
3.540541
37
""" CLI script to run MySQL SELECT statements It produces a copy of provided file with additional metadata and an export of results in CSV format """ import argparse def get_main_args_parser(parents, defaults): """ Parser for the arguments required to run mysql_tracer. :param parents: a list of parent a...
[ 37811, 198, 5097, 40, 4226, 284, 1057, 33476, 33493, 6299, 198, 198, 1026, 11073, 257, 4866, 286, 2810, 2393, 351, 3224, 20150, 290, 281, 10784, 286, 2482, 287, 44189, 5794, 198, 37811, 198, 11748, 1822, 29572, 628, 198, 4299, 651, 62, ...
2.859517
662
# Marcelo Campos de Medeiros # ADS UNIFIP # REVISÃO DE PYTHON # AULA 07 GUSTAVO GUANABARA ''' Faça um programa que leia quanto dinheiro uma pessoa tem e mostre o valor em dolares. Considerando o dolar U$ 1.00 == R$4.50 ''' print('='*30) print('{:$^30}'.format(' DOLARES ')) print('='*30) valor = float(input('Qual ...
[ 2, 36547, 78, 5425, 418, 390, 2019, 20295, 4951, 198, 2, 44784, 4725, 5064, 4061, 198, 2, 4526, 29817, 5746, 46, 5550, 350, 56, 4221, 1340, 198, 2, 317, 6239, 32, 8753, 402, 7759, 10116, 46, 19348, 1565, 6242, 24401, 198, 7061, 6, ...
2.282528
269
import urllib2 import simplejson import time from BeautifulSoup import BeautifulSoup allGames = [] lastGame = [] try: with open('aramGames.txt', 'r') as gameFile: allGames = simplejson.load(gameFile) lastGame = allGames[-1] except: print("Could not find list of previously recorded games, making new file now......
[ 11748, 2956, 297, 571, 17, 198, 11748, 2829, 17752, 198, 11748, 640, 198, 6738, 23762, 50, 10486, 1330, 23762, 50, 10486, 198, 198, 439, 24474, 796, 17635, 198, 12957, 8777, 796, 17635, 628, 198, 28311, 25, 198, 197, 4480, 1280, 10786, ...
2.61563
627
from flask import Flask from random import randint app = Flask(__name__) @app.route('/') @make_h1 target_number = randint(1, 10) @app.route('/<int:input_number>') # Decorator doesn't work so it's uncommented # @make_h1 if __name__ == '__main__': app.run(debug=True)from flask import Flask from random impo...
[ 6738, 42903, 1330, 46947, 198, 6738, 4738, 1330, 43720, 600, 198, 198, 1324, 796, 46947, 7, 834, 3672, 834, 8, 628, 198, 198, 31, 1324, 13, 38629, 10786, 14, 11537, 198, 31, 15883, 62, 71, 16, 628, 198, 16793, 62, 17618, 796, 43720,...
2.538462
221
import sys from kaggle_environments import evaluate, make, utils out = sys.stdout submission = utils.read_file("/kaggle/working/main.py") agent = utils.get_last_callable(submission) sys.stdout = out env = make("connectx", debug=True) env.run([agent, agent]) print("Success!" if env.state[0].status == env.state[1].statu...
[ 11748, 25064, 198, 6738, 479, 9460, 293, 62, 268, 12103, 1330, 13446, 11, 787, 11, 3384, 4487, 198, 448, 796, 25064, 13, 19282, 448, 198, 7266, 3411, 796, 3384, 4487, 13, 961, 62, 7753, 7203, 14, 74, 9460, 293, 14, 16090, 14, 12417,...
2.837398
123
from flask import Blueprint, request, jsonify from flask_jwt_extended import create_access_token, create_refresh_token, set_access_cookies, set_refresh_cookies, \ jwt_required, jwt_refresh_token_required, get_jwt_identity, get_raw_jwt from flask_cors import cross_origin from lockheed_141310 import blacklist from l...
[ 6738, 42903, 1330, 39932, 11, 2581, 11, 33918, 1958, 198, 6738, 42903, 62, 73, 46569, 62, 2302, 1631, 1330, 2251, 62, 15526, 62, 30001, 11, 2251, 62, 5420, 3447, 62, 30001, 11, 900, 62, 15526, 62, 27916, 444, 11, 900, 62, 5420, 3447...
2.66362
1,094
from djaveLogin.base_login_decorator import base_login_decorator
[ 6738, 42625, 1015, 47790, 13, 8692, 62, 38235, 62, 12501, 273, 1352, 1330, 2779, 62, 38235, 62, 12501, 273, 1352, 628 ]
3.142857
21
import typing as t from .recent_game_info import RecentGameInfo
[ 11748, 19720, 355, 256, 198, 198, 6738, 764, 49921, 62, 6057, 62, 10951, 1330, 22926, 8777, 12360, 628 ]
3.666667
18
# ##### BEGIN MIT LICENSE BLOCK ##### # # MIT License # # Copyright (c) 2021 Steven Garcia # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation ...
[ 2, 46424, 347, 43312, 17168, 38559, 24290, 9878, 11290, 46424, 198, 2, 198, 2, 17168, 13789, 198, 2, 198, 2, 15069, 357, 66, 8, 33448, 8239, 18555, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1...
3.658263
357
#!/usr/local/bin/python3 import discord import asyncio import core.battle_lobby as battle_lobby from core.common import SERVSET CLIENT = discord.Client() @CLIENT.event @CLIENT.event if __name__ == '__main__': main()
[ 2, 48443, 14629, 14, 12001, 14, 8800, 14, 29412, 18, 198, 198, 11748, 36446, 198, 11748, 30351, 952, 198, 11748, 4755, 13, 38471, 62, 75, 11369, 355, 3344, 62, 75, 11369, 198, 6738, 4755, 13, 11321, 1330, 18871, 20304, 2767, 198, 198,...
2.743902
82
# -*- coding: utf-8 -*- from datetime import timedelta from os import environ import re from urllib import quote DOODLE_VERSION = '1.4' # current Doodle version CHECK_NEW_VERSION = True # whether check the latest version THREAD_SAFE = environ.get('APPENGINE_RUNTIME') == 'python27' # whether enable thread safe mode,...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 4818, 8079, 1330, 28805, 12514, 198, 6738, 28686, 1330, 551, 2268, 198, 11748, 302, 198, 6738, 2956, 297, 571, 1330, 9577, 628, 198, 18227, 3727, 2538, 62, 43...
2.997749
2,665
LEARNING_RATE = 0.2 NUM_TRAINING_ITERATIONS = 50000 CONVERGENCE_THRESHOLD = 0.000001
[ 2538, 1503, 15871, 62, 49, 6158, 796, 657, 13, 17, 198, 41359, 62, 51, 3861, 1268, 2751, 62, 2043, 1137, 18421, 796, 642, 2388, 198, 10943, 5959, 38, 18310, 62, 4221, 19535, 39, 15173, 796, 657, 13, 2388, 486 ]
2.153846
39
#!/home/kasengchou/git/dj-cms/py-env/bin/python3.6 from django.core import management if __name__ == "__main__": management.execute_from_command_line()
[ 2, 48443, 11195, 14, 42749, 1516, 354, 280, 14, 18300, 14, 28241, 12, 46406, 14, 9078, 12, 24330, 14, 8800, 14, 29412, 18, 13, 21, 198, 6738, 42625, 14208, 13, 7295, 1330, 4542, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417...
2.616667
60
""" Module providing a macro to automatically absorb X percent of the beam using the absorbers at the NanoMAX beamline """ import os import numpy as np from contrast.environment import env, macro, register_shortcut, runCommand # ToDo # - avoid elements with absorption edges close to the current energy # ...
[ 37811, 198, 26796, 4955, 257, 15021, 284, 6338, 17565, 1395, 1411, 286, 262, 198, 40045, 1262, 262, 8256, 1213, 379, 262, 33504, 22921, 15584, 1370, 198, 37811, 198, 198, 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 6273, ...
2.496416
1,116
# MINLP written by GAMS Convert at 01/15/21 11:37:41 # # Equation counts # Total E G L N X C B # 557 187 0 370 0 0 0 0 # # Variable counts # x b i s1s s2s sc ...
[ 2, 220, 20625, 19930, 3194, 416, 402, 40834, 38240, 379, 5534, 14, 1314, 14, 2481, 1367, 25, 2718, 25, 3901, 198, 2, 220, 220, 198, 2, 220, 7889, 341, 9853, 198, 2, 220, 220, 220, 220, 220, 7472, 220, 220, 220, 220, 220, 220, 22...
1.438514
698,343
""" InstantDL Utils for data evaluation Written by Dominik Waibel """ import numpy as np import matplotlib.pyplot as plt plt.rcParams["font.family"] = "Computer Modern Roman" from skimage import io from skimage.io import imread from skimage.color import gray2rgb, rgb2gray from skimage.transform import resize import os...
[ 37811, 198, 49933, 19260, 198, 18274, 4487, 329, 1366, 12660, 198, 25354, 416, 11817, 1134, 15329, 43837, 198, 37811, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 489, 83, 1...
2.673981
2,552
import unittest from openmdao.main.assembly import ExprMapper, Assembly, set_as_top from openmdao.main.component import Component from openmdao.main.datatypes.int import Int from openmdao.main.expreval import ExprEvaluator nodes = ['A', 'B', 'C', 'D'] if __name__ == "__main__": unittest.main()
[ 11748, 555, 715, 395, 198, 198, 6738, 1280, 9132, 5488, 13, 12417, 13, 41873, 1330, 1475, 1050, 44, 11463, 11, 10006, 11, 900, 62, 292, 62, 4852, 198, 6738, 1280, 9132, 5488, 13, 12417, 13, 42895, 1330, 35100, 198, 6738, 1280, 9132, ...
2.723214
112
"""List SSH keys.""" # :license: MIT, see LICENSE for more details. import click import SoftLayer from SoftLayer.CLI import environment from SoftLayer.CLI import formatting @click.command() @click.option('--sortby', help='Column to sort by', type=click.Choice(['id', ...
[ 37811, 8053, 33825, 8251, 526, 15931, 198, 2, 1058, 43085, 25, 17168, 11, 766, 38559, 24290, 329, 517, 3307, 13, 198, 198, 11748, 3904, 198, 198, 11748, 8297, 49925, 198, 6738, 8297, 49925, 13, 5097, 40, 1330, 2858, 198, 6738, 8297, 4...
1.993243
444
# -*- coding: UTF-8 -*- from Crypto.Cipher import AES from Crypto import Random iv = Random.new().read(AES.block_size)
[ 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 201, 198, 201, 198, 6738, 36579, 13, 34, 10803, 1330, 34329, 201, 198, 6738, 36579, 1330, 14534, 201, 198, 201, 198, 452, 796, 14534, 13, 3605, 22446, 961, 7, 32, 1546, 13, 99...
2.571429
49
import glob import math import os import numpy as np if __name__ == "__main__": data_dir = "/data/wuyiming/reid/msmt/MSMT17_V1/train/" imgs_path = glob.glob(os.path.join(data_dir, '*', '*.jpg')) matrix = get_st_matrix(imgs_path, pseudo_labels=None)
[ 11748, 15095, 198, 11748, 10688, 198, 11748, 28686, 198, 198, 11748, 299, 32152, 355, 45941, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1366, 62, 15908, 796, 12813, 7890, 14, 86, 4669, ...
2.273504
117
"""Python wrappers around TensorFlow ops. This file is MACHINE GENERATED! Do not edit. """ import collections as _collections from google.protobuf import text_format as _text_format from tensorflow.core.framework import op_def_pb2 as _op_def_pb2 # Needed to trigger the call to _set_call_cpp_shape_fn. from tensorfl...
[ 37811, 37906, 7917, 11799, 1088, 309, 22854, 37535, 39628, 13, 198, 198, 1212, 2393, 318, 337, 16219, 8881, 24700, 1137, 11617, 0, 2141, 407, 4370, 13, 198, 37811, 198, 198, 11748, 17268, 355, 4808, 4033, 26448, 198, 198, 6738, 23645, 1...
2.430647
2,271
print(A.my_attr) # <ref>
[ 198, 198, 4798, 7, 32, 13, 1820, 62, 35226, 8, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 1279, 5420, 29 ]
1.478261
23
##################################################### ##将radar 数据转为kitti格式 ## ##################################################### import json import math import os import numpy as np import utils
[ 29113, 14468, 4242, 2, 198, 2235, 49546, 6335, 283, 10545, 243, 108, 162, 235, 106, 164, 121, 105, 10310, 118, 74, 715, 72, 43718, 120, 28156, 237, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 22...
2.860759
79
import sys from pyspark.sql import SparkSession from sparknlp import annotator from sparknlp.base import DocumentAssembler, Finisher, TokenAssembler, Chunk2Doc, Doc2Chunk sys.modules['com.johnsnowlabs.nlp.annotators'] = annotator sys.modules['com.johnsnowlabs.nlp.annotators.tokenizer'] = annotator sys.modules['com.joh...
[ 11748, 25064, 198, 6738, 279, 893, 20928, 13, 25410, 1330, 17732, 36044, 198, 6738, 9009, 21283, 79, 1330, 24708, 1352, 198, 6738, 9009, 21283, 79, 13, 8692, 1330, 16854, 1722, 4428, 1754, 11, 4463, 4828, 11, 29130, 1722, 4428, 1754, 11...
2.684132
668
# -*- coding: utf-8 -*- import numpy as np import pandas as pd import subprocess import glob import matplotlib.pyplot as plt import seaborn as sns import logging import os import argparse import astropy.io.fits as fits from astropy.coordinates import SkyCoord from astropy.table import Table from astropy import units a...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 850, 14681, 198, 11748, 15095, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, ...
3.017857
168
from stix_shifter.stix_translation import stix_translation import unittest translation = stix_translation.StixTranslation() class TestStixToQuery(unittest.TestCase): """ class to perform unit test case guardium translate query """ def _test_query_assertions(self, query, queries): """ ...
[ 6738, 336, 844, 62, 1477, 18171, 13, 301, 844, 62, 41519, 1330, 336, 844, 62, 41519, 198, 11748, 555, 715, 395, 198, 198, 41519, 796, 336, 844, 62, 41519, 13, 1273, 844, 48313, 3419, 628, 198, 4871, 6208, 1273, 844, 2514, 20746, 7, ...
2.594406
286
"""Current Scope Device. Copyright 2014 Joe Hood 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...
[ 37811, 11297, 41063, 16232, 13, 198, 198, 15269, 1946, 5689, 17233, 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, ...
3.094595
370
import urllib.parse from nextcord.ext import commands import nextcord import httpx from Plugin import AutomataPlugin COWSAY_API = "https://cowsay.morecode.org/say" class Cowsay(AutomataPlugin): """ Cowsay Made using https://cowsay.morecode.org/ """ @commands.command() async def cowsay(self...
[ 11748, 2956, 297, 571, 13, 29572, 198, 198, 6738, 1306, 66, 585, 13, 2302, 1330, 9729, 198, 11748, 1306, 66, 585, 198, 11748, 2638, 87, 198, 198, 6738, 42636, 1330, 17406, 1045, 37233, 198, 198, 34, 3913, 27358, 62, 17614, 796, 366, ...
2.538462
234
# -*- coding: utf-8 -*- """ Created on Fri Mar 2 20:08:14 2018 @author: Ian """ from basicFun import hessian_2sided from basicFun import getLag import numpy as np import scipy import shutil import datetime from scipy.optimize import brute from scipy.special import gamma from statsmodels.tsa.arima_mode...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 41972, 319, 19480, 1526, 220, 362, 1160, 25, 2919, 25, 1415, 2864, 201, 198, 201, 198, 31, 9800, 25, 12930, 201, 198, 37811, 201, 198, 201, 198, ...
2.672
125
import configparser import inspect import json import warnings from enum import Enum, auto from typing import Dict, Set, TextIO, Any, Optional, Iterable import yaml from objconf import attributes class Config: """ `Config` is a base class for your configuration class. Inherit from Config when defining ...
[ 11748, 4566, 48610, 198, 11748, 10104, 198, 11748, 33918, 198, 11748, 14601, 198, 6738, 33829, 1330, 2039, 388, 11, 8295, 198, 6738, 19720, 1330, 360, 713, 11, 5345, 11, 8255, 9399, 11, 4377, 11, 32233, 11, 40806, 540, 198, 198, 11748, ...
3.413534
133
from datetime import datetime, timedelta import factory from factory.django import DjangoModelFactory from factory.fuzzy import FuzzyDecimal, FuzzyInteger from ralph.assets.models.choices import AssetSource from ralph.assets.tests.factories import ( AssetHolderFactory, BaseObjectFactory, BudgetInfoFactory...
[ 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 198, 11748, 8860, 198, 6738, 8860, 13, 28241, 14208, 1330, 37770, 17633, 22810, 198, 6738, 8860, 13, 69, 4715, 88, 1330, 376, 4715, 88, 10707, 4402, 11, 376, 4715, 88, 46541, ...
2.795455
1,056
""" Utilities for loading and preprocessing relevant data. """ import pandas as pd def load_cnv_data(cnv_file, copy_samples, threshold='moderate'): """Load and threshold CNV data file from GDC.""" # load raw copy info tsv file copy_thresh_df = ( pd.read_csv(cnv_file, sep='\t', index_col=0) ...
[ 37811, 198, 18274, 2410, 329, 11046, 290, 662, 36948, 5981, 1366, 13, 198, 37811, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 4299, 3440, 62, 31522, 85, 62, 7890, 7, 31522, 85, 62, 7753, 11, 4866, 62, 82, 12629, 11, 11387, 11639...
2.218894
868
#Tests for RobotController #Author: Witold Wasilewski 2011 from RoboticFramework.RobotController.RobotController import RobotController from RoboticFramework.RobotModelBounder import RobotModelBounder from RoboticFramework.RobotArm import RobotArm from config import Config from RoboticFramework.RobotController.Delegat...
[ 2, 51, 3558, 329, 16071, 22130, 198, 2, 13838, 25, 40648, 727, 8920, 576, 18504, 4106, 2813, 198, 198, 6738, 3851, 6210, 21055, 6433, 13, 14350, 313, 22130, 13, 14350, 313, 22130, 1330, 16071, 22130, 198, 6738, 3851, 6210, 21055, 6433, ...
4.059322
118
"""mirdata annotation data types """ import numpy as np class Annotation(object): """Annotation base class""" class BeatData(Annotation): """BeatData class Attributes: times (np.ndarray): array of time stamps (as floats) in seconds with positive, strictly increasing values p...
[ 37811, 76, 1447, 1045, 23025, 1366, 3858, 198, 37811, 198, 11748, 299, 32152, 355, 45941, 628, 198, 4871, 1052, 38983, 7, 15252, 2599, 198, 220, 220, 220, 37227, 2025, 38983, 2779, 1398, 37811, 628, 198, 4871, 12568, 6601, 7, 2025, 3898...
2.673065
3,126
from vector import Vector v1 = Vector([0.0, 1.0, 2.0, 3.0]) v2 = Vector(3) v3 = Vector((10, 15)) v4 = Vector(5) v5 = Vector([5.0]) print(v1) print(v2) print(v3) print(v4) print(v5) print(repr(v5)) print("\nadd") v6 = v1 + v2 v6 = v3 + v4 v6 = v5 + 4 v6 = 7 + v5 v6 = v2 + 5 v6 = 12 + v1 print("\nsub") v6 = v1 - v2 v6 =...
[ 6738, 15879, 1330, 20650, 198, 198, 85, 16, 796, 20650, 26933, 15, 13, 15, 11, 352, 13, 15, 11, 362, 13, 15, 11, 513, 13, 15, 12962, 198, 85, 17, 796, 20650, 7, 18, 8, 198, 85, 18, 796, 20650, 19510, 940, 11, 1315, 4008, 198, ...
1.704678
342