content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
""" Se dă o listă de cuburi de latură l_i și culoare c_i. Să se construiască un turn de înălțime maximă astfel încât laturile cuburilor succesive sunt în ordine crescătoare și culorile cuburilor alăturate sunt diferite. Laturile _nu_ sunt distincte. Să se găsească înălțimea maximă posibilă a unui turn și numărul de ...
[ 37811, 198, 4653, 288, 128, 225, 267, 1351, 128, 225, 390, 13617, 9900, 390, 300, 2541, 128, 225, 300, 62, 72, 220, 132, 247, 72, 10845, 78, 533, 269, 62, 72, 13, 198, 198, 50, 128, 225, 384, 1500, 622, 72, 3372, 128, 225, 555, ...
1.874819
1,382
zahlen = [] with open('AdventOfCode_01_1_Input.txt') as f: for zeile in f: zahlen.append(int(zeile)) print(sum(zahlen))
[ 89, 993, 11925, 796, 17635, 198, 198, 4480, 1280, 10786, 2782, 1151, 5189, 10669, 62, 486, 62, 16, 62, 20560, 13, 14116, 11537, 355, 277, 25, 198, 220, 329, 41271, 576, 287, 277, 25, 198, 220, 220, 220, 1976, 993, 11925, 13, 33295, ...
2.114754
61
import platform __all__ = () if platform.system() == 'Linux': from pathlib import Path from constants import ROOT_DIR, VENV_DIR, SYSTEMD_DIR from utils.config import asgi_framework from . import run_subprocess __all__ = ('create_systemd_unit', 'enable_systemd_unit', 'start_service', ...
[ 11748, 3859, 198, 198, 834, 439, 834, 796, 7499, 198, 198, 361, 3859, 13, 10057, 3419, 6624, 705, 19314, 10354, 198, 220, 220, 220, 422, 3108, 8019, 1330, 10644, 198, 220, 220, 220, 422, 38491, 1330, 15107, 2394, 62, 34720, 11, 569, ...
2.59375
160
import requests import inspect import urllib import pandas as pd ##################################### ### ### ### Define constant ### ### ### ##################################### CONST_ENDPOINT = '206.189.149.240' CONST_PORT = 4000 CONST_LIBR...
[ 11748, 7007, 198, 11748, 10104, 198, 11748, 2956, 297, 571, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 29113, 4242, 2, 198, 21017, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
2.497317
1,118
# from . import algorithms # from . import controller # from . import environment # from . import experiment # from . import models # from . import optimizers # from . import plotting # from . import utils
[ 2, 422, 764, 1330, 16113, 198, 2, 422, 764, 1330, 10444, 198, 2, 422, 764, 1330, 2858, 198, 2, 422, 764, 1330, 6306, 198, 2, 422, 764, 1330, 4981, 198, 2, 422, 764, 1330, 6436, 11341, 198, 2, 422, 764, 1330, 29353, 198, 2, 422, ...
4.12
50
import numpy as np import math # ls = np.array([[-1,2,1], [0,-3,2], [1,1,-4]]) # plane = getPlane(ls) # incident = np.array([1,0,0]) # print(getReflectionFromPlane(plane,incident))
[ 11748, 299, 32152, 355, 45941, 198, 11748, 10688, 198, 198, 2, 43979, 796, 45941, 13, 18747, 26933, 58, 12, 16, 11, 17, 11, 16, 4357, 685, 15, 12095, 18, 11, 17, 4357, 685, 16, 11, 16, 12095, 19, 11907, 8, 198, 2, 6614, 796, 651...
2.22619
84
from django.contrib import admin from .models import TriviaQuiz, TriviaQuestion admin.site.register(TriviaQuiz) admin.site.register(TriviaQuestion)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 764, 27530, 1330, 7563, 8869, 4507, 528, 11, 7563, 8869, 24361, 198, 198, 28482, 13, 15654, 13, 30238, 7, 23854, 4507, 528, 8, 198, 28482, 13, 15654, 13, 30238, 7, 23854, 2436...
3.386364
44
import unittest from silence_exception import silence_exception, SilenceException if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 198, 6738, 9550, 62, 1069, 4516, 1330, 9550, 62, 1069, 4516, 11, 26354, 16922, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3419, 1...
3.116279
43
import sys, getopt import utils import pandas as pd import DatasetPaths import yaml KEY = 'Hospital' COLUMNS_TO_KEEP = ['Hospital','km0_x','km0_y'] # Execute only if script run standalone (not imported) if __name__ == '__main__': df_samur = pd.read_csv(DatasetPaths.SAMUR) df_hospitals = pd.read_csv(Dataset...
[ 11748, 25064, 11, 651, 8738, 198, 11748, 3384, 4487, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 16092, 292, 316, 15235, 82, 198, 11748, 331, 43695, 198, 198, 20373, 796, 705, 39, 3531, 6, 198, 25154, 5883, 8035, 62, 10468, 62, ...
2.293706
429
# -*- coding: utf-8 -*- """ """ import argparse import os import sys from abc import abstractmethod, ABCMeta from pathlib import Path try: from bpdb import set_trace except ImportError: from pdb import set_trace class Book(object): """ Args: """ if __name__ == '__main__': pass
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 37811, 198, 11748, 1822, 29572, 198, 11748, 28686, 198, 11748, 25064, 198, 6738, 450, 66, 1330, 12531, 24396, 11, 9738, 48526, 198, 6738, 3108, 8019, 1330, 106...
2.655172
116
from testing_helpers import wrap @wrap
[ 6738, 4856, 62, 16794, 364, 1330, 14441, 220, 198, 198, 31, 37150, 628, 628 ]
3.142857
14
import numpy n = int(input()) a = numpy.array([input().split() for _ in range(n)], int) b = numpy.array([input().split() for _ in range(n)], int) print(numpy.dot(a, b))
[ 11748, 299, 32152, 198, 198, 77, 796, 493, 7, 15414, 28955, 198, 64, 796, 299, 32152, 13, 18747, 26933, 15414, 22446, 35312, 3419, 329, 4808, 287, 2837, 7, 77, 8, 4357, 493, 8, 198, 65, 796, 299, 32152, 13, 18747, 26933, 15414, 2244...
2.522388
67
#!/usr/bin/env python from bottle import route, run, static_file import os import rospy @route('/freeboard/<filename:path>') @route('/freeboard/') if __name__ == "__main__": main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 9294, 1330, 6339, 11, 1057, 11, 9037, 62, 7753, 198, 11748, 28686, 198, 11748, 686, 2777, 88, 198, 198, 31, 38629, 10786, 14, 5787, 3526, 14, 27, 34345, 25, 6978, 29, 1153...
2.652778
72
#!/usr/local/bin/python import pdb import sys,os,platform,matplotlib # # import matplotlib.animation as animation # import matplotlib.pyplot as plt import sys import params sys.path.append("..") import scipy.io import numpy as np from scipy.integrate import odeint from numpy import cos, sin, tan, arctan2, sqrt, sign,...
[ 2, 48443, 14629, 14, 12001, 14, 8800, 14, 29412, 198, 11748, 279, 9945, 198, 11748, 25064, 11, 418, 11, 24254, 11, 6759, 29487, 8019, 198, 2, 198, 2, 1330, 2603, 29487, 8019, 13, 11227, 341, 355, 11034, 198, 2, 1330, 2603, 29487, 80...
2.446635
2,080
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = 'Walson Tung' 'url handlers' import re,time,json,logging,hashlib,base64,asyncio import markdown2 from aiohttp import web from coreweb import get,post from apis import * from models import User,Comment,Blog,next_id from config import configs COOKIE_NAME =...
[ 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, 834, 9800, 834, 796, 705, 54, 874, 261, 309, 2150, 6, 198, 198, 6, 6371, 32847, 6, 198, 198, 11748, 302, ...
2.043011
930
from .fruit_fly_net import FruitFlyNet, bio_hash_loss
[ 6738, 764, 34711, 62, 12254, 62, 3262, 1330, 22826, 33771, 7934, 11, 13401, 62, 17831, 62, 22462 ]
3.117647
17
#!/usr/bin/env python3 # # iso3166-lookup.py 0.0.1 # # Copyright 2020 Alan Orth. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any late...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 198, 2, 47279, 18, 23055, 12, 5460, 929, 13, 9078, 657, 13, 15, 13, 16, 198, 2, 198, 2, 15069, 12131, 12246, 47664, 13, 198, 2, 198, 2, 770, 1430, 318, 1479, 3788, 25, 3...
3.194857
1,011
"""Rotate a newick tree to put the leaf with a given label first.""" from argparse import ArgumentParser import newick if __name__ == '__main__': parser = ArgumentParser(description=__doc__) parser.add_argument('newick_file') parser.add_argument('label') opts = parser.parse_args() tree = newick.rea...
[ 37811, 24864, 378, 257, 649, 624, 5509, 284, 1234, 262, 12835, 351, 257, 1813, 6167, 717, 526, 15931, 198, 6738, 1822, 29572, 1330, 45751, 46677, 198, 11748, 649, 624, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, ...
2.772414
145
# b is base # n is exponent print(power(5,7)) print() print(power2(5,7))
[ 2, 275, 318, 2779, 198, 2, 299, 318, 28622, 198, 198, 4798, 7, 6477, 7, 20, 11, 22, 4008, 198, 4798, 3419, 198, 4798, 7, 6477, 17, 7, 20, 11, 22, 4008, 198 ]
2.242424
33
from pathlib import Path from pkg_resources import resource_filename """ Paths to data files in this Python module. """ # The path to the data files. DATA_DIRECTORY = Path(resource_filename(__name__, "data")) # The path to object data. OBJECT_DATA_DIRECTORY = DATA_DIRECTORY.joinpath("objects") # The path to object ca...
[ 6738, 3108, 8019, 1330, 10644, 198, 6738, 279, 10025, 62, 37540, 1330, 8271, 62, 34345, 198, 198, 37811, 198, 15235, 82, 284, 1366, 3696, 287, 428, 11361, 8265, 13, 198, 37811, 198, 198, 2, 383, 3108, 284, 262, 1366, 3696, 13, 198, ...
2.936768
427
# -*- coding:utf-8 -*- # This file is adapted from the SinglePathOneShot library at # https://github.com/megvii-model/SinglePathOneShot # 2020.6.29-Changed for Modular-NAS search space. # Huawei Technologies Co., Ltd. <linyunfeng5@huawei.com> # Copyright 2020 Huawei Technologies Co., Ltd. """ShuffleNetV2 arc...
[ 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 198, 2, 770, 2393, 318, 16573, 422, 262, 14206, 15235, 3198, 28512, 5888, 379, 198, 2, 3740, 1378, 12567, 13, 785, 14, 28917, 85, 4178, 12, 19849, 14, 28008, 15235, 3198, ...
2.016497
3,334
# -*- coding: utf-8 -*- # Generated by Django 1.11.6 on 2018-07-20 18:04 from __future__ import unicode_literals from django.db import migrations
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 1157, 13, 21, 319, 2864, 12, 2998, 12, 1238, 1248, 25, 3023, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, ...
2.690909
55
# -*- coding: utf-8 -*- """Test the capabilities of the ResourceManager. """ import gc import logging import re import pytest from pyvisa import InvalidSession, ResourceManager, VisaIOError, errors from pyvisa.constants import AccessModes, InterfaceType, StatusCode from pyvisa.highlevel import VisaLibraryBase from p...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 14402, 262, 9889, 286, 262, 20857, 13511, 13, 198, 198, 37811, 198, 11748, 308, 66, 198, 11748, 18931, 198, 11748, 302, 198, 198, 11748, 12972, 9288, 198, 198, 67...
2.467349
3,614
#!/usr/bin/env python ''' This module contains helper functions to make plugins simpler to read and write, centralising common functionality easy to reuse ''' import os import re import cgi import logging from tornado.template import Template from framework.dependency_management.dependency_resolver import BaseCompone...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 7061, 6, 198, 1212, 8265, 4909, 31904, 5499, 284, 787, 20652, 18599, 284, 1100, 290, 3551, 11, 198, 31463, 1710, 2219, 11244, 2562, 284, 32349, 198, 7061, 6, 198, 198, 11748, 28686, 19...
4.047945
146
#! /usr/bin/env python # Run the default regression test for the PICMI version of the EB test # using the same reference file as for the non-PICMI test since the two # tests are otherwise the same. import sys sys.path.append('../../../../warpx/Regression/Checksum/') import checksumAPI my_check = checksumAPI.evaluat...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 5660, 262, 4277, 20683, 1332, 329, 262, 350, 2149, 8895, 2196, 286, 262, 43374, 1332, 198, 2, 1262, 262, 976, 4941, 2393, 355, 329, 262, 1729, 12, 47, 2149, 8895, 1332, 1...
2.966216
148
from project.elf import Elf
[ 6738, 1628, 13, 7046, 1330, 19067 ]
4.5
6
from django.db import models from djaveDT import now from djavError.models.fixable import Fixable
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 1015, 24544, 1330, 783, 198, 6738, 42625, 615, 12331, 13, 27530, 13, 13049, 540, 1330, 13268, 540, 628 ]
3.535714
28
#!/usr/bin/env python if __name__ == "__main__": plot_stacked_clustered_bars()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 220, 220, 220, 220, 220, 220, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 7110, 62, 301, 6021, 62, 565, 436, 1068, 62, 34046, 3419, 198 ]
2.2
40
from datetime import datetime, timedelta import azure.batch.batch_auth as batchauth import azure.batch._batch_service_client as batch import uuid import datetime import time # Batch account credentials BATCH_ACCOUNT_NAME = '' BATCH_ACCOUNT_URL = '' BATCH_ACCOUNT_KEY = '' # Create a Batch service client. We'll now b...
[ 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 11748, 35560, 495, 13, 43501, 13, 43501, 62, 18439, 355, 15458, 18439, 198, 11748, 35560, 495, 13, 43501, 13557, 43501, 62, 15271, 62, 16366, 355, 15458, 220, 198, 11748, 3...
2.463169
991
""" Base class for objects that are backed by database documents. | Copyright 2017-2020, Voxel51, Inc. | `voxel51.com <https://voxel51.com/>`_ | """ from copy import deepcopy import eta.core.serial as etas class Document(object): """Base class for objects that are associated with :class:`fiftyone.core.datas...
[ 37811, 198, 14881, 1398, 329, 5563, 326, 389, 9763, 416, 6831, 4963, 13, 198, 198, 91, 15069, 2177, 12, 42334, 11, 28035, 417, 4349, 11, 3457, 13, 198, 91, 4600, 85, 1140, 417, 4349, 13, 785, 1279, 5450, 1378, 85, 1140, 417, 4349, ...
2.348662
4,523
from copy import deepcopy import datetime as dt from marshmallow.exceptions import ValidationError import pytest import pytz from sfa_api.conftest import (VALID_OBS_JSON, VALID_FORECAST_JSON, VALID_CDF_FORECAST_JSON, VALID_FORECAST_AGG_JSON, VALID_AGG_JSON...
[ 6738, 4866, 1330, 2769, 30073, 198, 11748, 4818, 8079, 355, 288, 83, 628, 198, 6738, 22397, 42725, 13, 1069, 11755, 1330, 3254, 24765, 12331, 198, 11748, 12972, 9288, 198, 11748, 12972, 22877, 628, 198, 6738, 264, 13331, 62, 15042, 13, ...
2.139656
3,258
from Tkinter import * from simplex import Simplex from textOperator import Operator vertices = [] master = Tk() master.title = "master" Label(master, text="enter number of vertices").grid(row=0) Label(master, text="enter complete connection without "+"'.'").grid(row=1) Label(master, text="enter connection with "+...
[ 6738, 309, 74, 3849, 1330, 1635, 198, 6738, 2829, 87, 1330, 220, 3184, 11141, 198, 6738, 2420, 18843, 1352, 1330, 35946, 198, 198, 1851, 1063, 796, 17635, 628, 628, 198, 9866, 796, 309, 74, 3419, 198, 9866, 13, 7839, 796, 366, 9866, ...
2.772727
308
from typing import Tuple, Any from amino import _, Either, Map, Left, Right, do, Do from amino.state import State from ribosome.nvim.io.compute import NvimIO, NvimIOSuspend, NvimIOPure from ribosome.nvim.io.api import N from ribosome.nvim.api.function import nvim_call_function, nvim_call_tpe from ribosome.nvim.api.co...
[ 6738, 19720, 1330, 309, 29291, 11, 4377, 198, 198, 6738, 23206, 1330, 4808, 11, 15467, 11, 9347, 11, 9578, 11, 6498, 11, 466, 11, 2141, 198, 6738, 23206, 13, 5219, 1330, 1812, 198, 198, 6738, 12183, 418, 462, 13, 77, 31124, 13, 952,...
2.502242
223
""" Add Two Numbers II: Leetcode 445 You are given two non-empty linked lists representing two non-negative integers. The most significant digit comes first and each of their nodes contain a single digit. Add the two numbers and return it as a linked list. You may assume the two numbers do not contain any leading zer...
[ 37811, 198, 4550, 4930, 27797, 2873, 25, 1004, 316, 8189, 48655, 198, 198, 1639, 389, 1813, 734, 1729, 12, 28920, 6692, 8341, 10200, 734, 1729, 12, 31591, 37014, 13, 220, 198, 464, 749, 2383, 16839, 2058, 717, 290, 1123, 286, 511, 137...
2.214452
429
import networkx as nx import time as t # Generating Watts_strogatz_graph using networkx. # Four parameters: # n (int) – The number of nodes # k (int) – Each node is joined with its k nearest neighbors in a ring topology. # p (float) – The probability of rewiring each edge # seed (int, optional) – Seed for ...
[ 11748, 3127, 87, 355, 299, 87, 201, 198, 11748, 640, 355, 256, 201, 198, 201, 198, 201, 198, 2, 2980, 803, 27555, 62, 301, 3828, 27906, 62, 34960, 1262, 3127, 87, 13, 220, 201, 198, 2, 6675, 10007, 25, 220, 201, 198, 2, 299, 357...
2.156997
879
############################### # Import Python modules ############################### import sys,os # NOTE: Uncomment these lines if you are putting the modules in the local directory #sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'pyserial.serial')) #sys.path.append(os.path.join(os.path.dirname(__fil...
[ 14468, 7804, 4242, 21017, 198, 2, 17267, 11361, 13103, 198, 14468, 7804, 4242, 21017, 198, 11748, 25064, 11, 418, 198, 2, 24550, 25, 791, 23893, 777, 3951, 611, 345, 389, 5137, 262, 13103, 287, 262, 1957, 8619, 198, 2, 17597, 13, 6978...
1.95784
2,870
from datetime import timedelta from typing import Optional from fastapi import HTTPException, status from fastapi.security import OAuth2PasswordBearer from jose import jwt from passlib.context import CryptContext # defining algorithms from Shared.functions.helperFunctions import get_now_with_tz from Shared.functions....
[ 6738, 4818, 8079, 1330, 28805, 12514, 198, 6738, 19720, 1330, 32233, 198, 198, 6738, 3049, 15042, 1330, 14626, 16922, 11, 3722, 198, 6738, 3049, 15042, 13, 12961, 1330, 440, 30515, 17, 35215, 3856, 11258, 198, 6738, 474, 577, 1330, 474, ...
2.955326
582
#!/usr/bin/env python from __future__ import with_statement from contextlib import closing from subprocess import call, Popen, PIPE import os from math import log,sqrt import numpy as np def main( ): '''Write some help documentation here ''' print "# leading comments can be given a '#' character" my_dicti...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 6738, 11593, 37443, 834, 1330, 351, 62, 26090, 198, 6738, 4732, 8019, 1330, 9605, 198, 6738, 850, 14681, 1330, 869, 11, 8099, 268, 11, 350, 4061, 36, 198, 11748, 28686, 198, 6738, 1068...
1.985003
1,467
# vim: set encoding=utf-8 # Copyright (c) 2016 Intel Corporation  # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # #       http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
[ 2, 43907, 25, 900, 21004, 28, 40477, 12, 23, 198, 198, 2, 220, 15069, 1849, 7, 66, 8, 1849, 5304, 8180, 1849, 10606, 1819, 341, 1849, 198, 2, 198, 2, 220, 49962, 1849, 4625, 1849, 1169, 1849, 25189, 4891, 1849, 34156, 11, 1849, 14...
2.563107
309
import base64
[ 11748, 2779, 2414, 628 ]
3.75
4
# -*- coding: utf-8 -*- from qcloudsdkcore.request import Request
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 10662, 17721, 21282, 74, 7295, 13, 25927, 1330, 19390, 198 ]
2.576923
26
import subprocess # e.g. dl_osm_from_extents(-77,-78,45,46)
[ 11748, 850, 14681, 198, 198, 2, 304, 13, 70, 13, 198, 25404, 62, 418, 76, 62, 6738, 62, 2302, 658, 32590, 3324, 12095, 3695, 11, 2231, 11, 3510, 8, 198 ]
2.033333
30
clientes1 = lista_de_clientes(["joao", 'maria', 'jose']) clientes2 = lista_de_clientes(["dani", 'tiago', 'luana']) print(clientes1) print(clientes2)
[ 198, 198, 16366, 274, 16, 796, 1351, 64, 62, 2934, 62, 16366, 274, 7, 14692, 7639, 5488, 1600, 705, 3876, 544, 3256, 705, 73, 577, 6, 12962, 198, 16366, 274, 17, 796, 1351, 64, 62, 2934, 62, 16366, 274, 7, 14692, 67, 3216, 1600, ...
2.220588
68
import pkg_resources import ConfigParser from configobj import ConfigObj, flatten_errors import os import validate validator = validate.Validator() import os.path # from http://stackoverflow.com/questions/4028904 ank_user_dir = os.path.join(os.path.expanduser("~"), ".autonetkit") #NOTE: this only gets loaded once p...
[ 11748, 279, 10025, 62, 37540, 198, 11748, 17056, 46677, 198, 6738, 4566, 26801, 1330, 17056, 49201, 11, 27172, 268, 62, 48277, 198, 11748, 28686, 198, 198, 11748, 26571, 198, 12102, 1352, 796, 26571, 13, 47139, 1352, 3419, 198, 198, 11748...
3.336134
119
# Copyright (c) Facebook, Inc. and its affiliates. import unittest import torch import random import operator import functools import numpy as np import pythia.modules.layers as layers
[ 2, 15069, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 198, 11748, 555, 715, 395, 198, 198, 11748, 28034, 198, 11748, 4738, 198, 11748, 10088, 198, 11748, 1257, 310, 10141, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, ...
3.5
54
# Example code from Aaron Hall StackOverflow response # https://stackoverflow.com/questions/2627002/whats-the-pythonic-way-to-use-getters-and-setters/36943813#36943813 foo = Protective() foo.protected_value = 35 print(foo.__dict__) foo.protected_value = 200 # raises ValueError del foo.protected_value # raises Attrib...
[ 2, 17934, 2438, 422, 12139, 4789, 23881, 5886, 11125, 2882, 198, 2, 3740, 1378, 25558, 2502, 11125, 13, 785, 14, 6138, 507, 14, 2075, 1983, 21601, 14, 1929, 1381, 12, 1169, 12, 29412, 291, 12, 1014, 12, 1462, 12, 1904, 12, 1136, 101...
3.189655
116
import numpy as np from PIL import Image import matplotlib.pyplot as plt import matplotlib as mpl from astropy.visualization import simple_norm from scipy.integrate import simps # Generate fake data from scipy.stats.kde import gaussian_kde from lightcurve import generate_lightcurve ### ### Plot data from instruments o...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 350, 4146, 1330, 7412, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 2603, 29487, 8019, 355, 285, 489, 198, 6738, 6468, 28338, 13, 41464, 1634, 1330, 2829, 62, 27237,...
2.205607
428
import numpy numpy.random.seed(40) tt = numpy.genfromtxt('../../data/toy/swissroll_color.dat',unpack=True).T X = numpy.genfromtxt('../../data/toy/swissroll.dat',unpack=True).T N = X.shape[1] converters = [] from shogun import LocallyLinearEmbedding lle = LocallyLinearEmbedding() lle.set_k(9) converters.append((lle, "L...
[ 11748, 299, 32152, 198, 77, 32152, 13, 25120, 13, 28826, 7, 1821, 8, 198, 926, 796, 299, 32152, 13, 5235, 6738, 14116, 10786, 40720, 40720, 7890, 14, 83, 726, 14, 2032, 747, 2487, 62, 8043, 13, 19608, 3256, 403, 8002, 28, 17821, 737...
2.319358
1,121
from django.shortcuts import render from django.views.generic import TemplateView from .models import Slider ...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 42625, 14208, 13, 33571, 13, 41357, 1330, 37350, 7680, 198, 6738, 764, 27530, 1330, 3454, 1304, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 62...
2.209125
263
"""Test geomconv script.""" import os import pytest import geomconv fixtures_dir = os.path.join('tests', 'fixtures') @pytest.fixture def chdir_fixtures(request): """Change the directory to the fixtures dir and back to the root directory after finished.""" cwd = os.getcwd() os.chdir(fixtures_dir) ...
[ 37811, 14402, 4903, 296, 42946, 4226, 526, 15931, 198, 11748, 28686, 198, 11748, 12972, 9288, 198, 11748, 4903, 296, 42946, 198, 198, 69, 25506, 62, 15908, 796, 28686, 13, 6978, 13, 22179, 10786, 41989, 3256, 705, 69, 25506, 11537, 628, ...
2.557536
617
escreva('Olá, mundo!') escreva('Eu sou o Lucas :)') escreva('Estou aprendendo Python') escreva('Com o Professor Guanabara') escreva('No CursoEmVideo')
[ 198, 198, 3798, 260, 6862, 10786, 30098, 6557, 11, 27943, 78, 0, 11537, 198, 3798, 260, 6862, 10786, 36, 84, 24049, 267, 15257, 14373, 11537, 198, 3798, 260, 6862, 10786, 22362, 280, 2471, 10920, 31110, 11361, 11537, 198, 3798, 260, 686...
2.508197
61
# Copyright 2018/2019 The RLgraph 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, 15069, 2864, 14, 23344, 383, 45715, 34960, 7035, 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, 2845, 287, ...
2.413017
2,443
# Copyright 2021 QHAna plugin runner contributors. # # 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, 33448, 1195, 39, 2025, 64, 13877, 17490, 20420, 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, ...
3.427918
437
from django.db import models # Create your models here.
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 201, 198, 201, 198, 201, 198, 2, 13610, 534, 4981, 994, 13, 201, 198 ]
2.952381
21
from random import choice, randint words = [] names = [] with open("EnglishWords.txt", "r") as f: line = f.readline().strip() while line: words.append(line) line = f.readline().strip() with open("names.txt", "r") as f: line = f.readline().strip() while line: names.append(line)...
[ 6738, 4738, 1330, 3572, 11, 43720, 600, 198, 198, 10879, 796, 17635, 198, 14933, 796, 17635, 198, 198, 4480, 1280, 7203, 15823, 37117, 13, 14116, 1600, 366, 81, 4943, 355, 277, 25, 198, 220, 220, 220, 1627, 796, 277, 13, 961, 1370, ...
2.067947
677
import os import discord import requests
[ 11748, 28686, 220, 198, 11748, 36446, 198, 11748, 7007, 198 ]
4.2
10
# Copyright (c) 2020 Hugh Wade # SPDX-License-Identifier: MIT import slotserver.slot_repository as sr MAX_ID_LEN = 1024 MAX_DATA_LEN = 1024 * 8 MAX_BATCH_SLOTS = 10 MAX_BATCH_SUBSLOTS = 10 class SlotOverflowException(Exception): ''' Raised when something is bigger than allowed ''' pass class SlotUn...
[ 2, 15069, 357, 66, 8, 12131, 25464, 19136, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 17168, 198, 11748, 17314, 18497, 13, 43384, 62, 260, 1930, 37765, 355, 19677, 198, 198, 22921, 62, 2389, 62, 43, 1677, 796, 28119, 198, 22...
2.37055
618
from __future__ import annotations import logging from typing import Any, Dict, Sequence, Union import sentry_sdk from asphalt.core import Context, resolve_reference from sentry_sdk.integrations import Integration from typeguard import check_argument_types from asphalt.exceptions.api import ExceptionReporter logger...
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 11748, 18931, 198, 6738, 19720, 1330, 4377, 11, 360, 713, 11, 45835, 11, 4479, 198, 198, 11748, 1908, 563, 62, 21282, 74, 198, 6738, 48292, 13, 7295, 1330, 30532, 11, 10568, 62, 35790, 1...
3.62754
443
#!/usr/bin/env python3 # encoding: utf-8 """ @author: Medivh Xu @file: send_email.py @time: 2020-03-04 21:27 """ import smtplib from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipart from email.header import Header
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 21004, 25, 3384, 69, 12, 23, 198, 37811, 198, 31, 9800, 25, 2019, 452, 71, 33591, 198, 31, 7753, 25, 3758, 62, 12888, 13, 9078, 198, 31, 2435, 25, 12131, 12, 3070, 12, 302...
2.589474
95
import numpy as np import numpy.linalg as la from collections import deque from .LayerReservoir import LayerReservoir """ Notes (from scholarpedia): -The SPECTRAL RADIUS of the reservoir weights codetermines: (1): (?) (2): amount of nonlinear interaction of input components through time ...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 299, 32152, 13, 75, 1292, 70, 355, 8591, 198, 198, 6738, 17268, 1330, 390, 4188, 198, 198, 6738, 764, 49925, 4965, 712, 10840, 1330, 34398, 4965, 712, 10840, 198, 198, 37811, 198, 16130, 357, ...
2.447284
1,565
import tensorflow as tf import numpy as np from tensorflow.contrib import rnn import pickle import re word2int_filepath = "./train data/word2int.p"
[ 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 11192, 273, 11125, 13, 3642, 822, 1330, 374, 20471, 198, 11748, 2298, 293, 198, 11748, 302, 198, 198, 4775, 17, 600, 62, 7753, 6978, 796, 366, 19571, ...
2.921569
51
import os import subprocess from lsst.pipe.tasks.ingest import IngestTask from lsst.utils import getPackageDir from lsst.meas.algorithms import IngestIndexedReferenceTask # from lsst.pipe.drivers.constructCalibs import BiasTask, FlatTask from huntsman.drp.utils import date_to_ymd def ingest_raw_data(filename_list, ...
[ 11748, 28686, 198, 11748, 850, 14681, 198, 198, 6738, 43979, 301, 13, 34360, 13, 83, 6791, 13, 278, 395, 1330, 554, 3495, 25714, 198, 6738, 43979, 301, 13, 26791, 1330, 651, 27813, 35277, 198, 198, 6738, 43979, 301, 13, 1326, 292, 13,...
2.50713
2,244
#!/usr/bin/python3 import discord import json import requests import math client = discord.Client() sessions = [] session_id = 0 API_HOST = "99.189.77.224" API_PORT = "8000" with open("discord_token", "r") as f: token = f.read() f.close turns = {'O': Player.O, 'E': Player.E, 'X': Player.X} reverse_turns ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 11748, 36446, 198, 11748, 33918, 198, 11748, 7007, 198, 11748, 10688, 198, 198, 16366, 796, 36446, 13, 11792, 3419, 198, 198, 82, 6202, 796, 17635, 198, 29891, 62, 312, 796, 657, 198, 198...
2.848739
238
#!/usr/bin/env python3 # # This file is part of the MicroPython project, http://micropython.org/ # # The MIT License (MIT) # # Copyright (c) 2020 Damien P. George # Copyright (c) 2020 Jim Mussared # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated document...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 198, 2, 770, 2393, 318, 636, 286, 262, 4527, 37906, 1628, 11, 2638, 1378, 9383, 1773, 7535, 13, 2398, 14, 198, 2, 198, 2, 383, 17168, 13789, 357, 36393, 8, 198, 2, 198, 2,...
2.778539
876
"""Proxmox plugin for Let's Encrypt client""" import os import subprocess import logging import zope.component import zope.interface from letsencrypt import interfaces from letsencrypt.plugins import common from letsencrypt import errors from shutil import copyfile logger = logging.getLogger(__name__)
[ 37811, 2964, 87, 76, 1140, 13877, 329, 3914, 338, 14711, 6012, 5456, 37811, 198, 11748, 28686, 198, 11748, 850, 14681, 198, 11748, 18931, 198, 11748, 1976, 3008, 13, 42895, 198, 11748, 1976, 3008, 13, 39994, 198, 6738, 8781, 12685, 6012, ...
3.719512
82
import base64 import json from decimal import Decimal from .cast_handlers import bool_cast_handler
[ 11748, 2779, 2414, 198, 11748, 33918, 198, 6738, 32465, 1330, 4280, 4402, 198, 198, 6738, 764, 2701, 62, 4993, 8116, 1330, 20512, 62, 2701, 62, 30281, 628, 628 ]
3.678571
28
#! /usr/bin/python3 import sys import re as regex # Our scripts import tools import settings if __name__ == '__main__': tools.move_to_script_dir(sys.argv[0]) main()
[ 2, 0, 1220, 14629, 14, 8800, 14, 29412, 18, 198, 198, 11748, 25064, 198, 11748, 302, 355, 40364, 198, 198, 2, 3954, 14750, 198, 11748, 4899, 198, 11748, 6460, 628, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10...
2.535211
71
import click import requests import os import json import questionary from questionary import Separator, Choice, prompt from tabulate import tabulate import gridly_cli.api as api from gridly_cli.utils import records_data_to_json, dump_to_json_file, dump_to_csv_file headers = { 'Content-Type': 'application/json', ...
[ 11748, 3904, 198, 11748, 7007, 198, 11748, 28686, 198, 11748, 33918, 198, 11748, 1808, 560, 198, 6738, 1808, 560, 1330, 8621, 283, 1352, 11, 18502, 11, 6152, 198, 6738, 7400, 5039, 1330, 7400, 5039, 198, 198, 11748, 10706, 306, 62, 4450...
2.275921
2,932
from math import ceil from typing import Any, List from unittest import TestCase from unittest.mock import MagicMock, patch from rich.table import Table from kaskade.renderables.paginated_table import PaginatedTable from tests import faker
[ 6738, 10688, 1330, 2906, 346, 198, 6738, 19720, 1330, 4377, 11, 7343, 198, 6738, 555, 715, 395, 1330, 6208, 20448, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 6139, 44, 735, 11, 8529, 198, 198, 6738, 5527, 13, 11487, 1330, 8655, 19...
3.536232
69
# # models.py -- Models for the "reviewboard.site" app. # # Copyright (c) 2010 David Trowbridge # # 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 lim...
[ 2, 198, 2, 4981, 13, 9078, 1377, 32329, 329, 262, 366, 19023, 3526, 13, 15654, 1, 598, 13, 198, 2, 198, 2, 15069, 357, 66, 8, 3050, 220, 3271, 309, 808, 9458, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, ...
3.166331
992
import os import numpy from dnachisel import ( CircularDnaOptimizationProblem, DnaOptimizationProblem, random_dna_sequence, sequence_to_biopython_record, Specification, annotate_record, ) def test_circular_example(): """This example has a BsmBI cross origin site (location -3 -- 3)""" p...
[ 11748, 28686, 198, 11748, 299, 32152, 198, 6738, 288, 77, 620, 36811, 1330, 357, 198, 220, 220, 220, 7672, 934, 35, 2616, 27871, 320, 1634, 40781, 11, 198, 220, 220, 220, 360, 2616, 27871, 320, 1634, 40781, 11, 198, 220, 220, 220, 4...
2.616564
652
from __future__ import print_function from cloudmesh.shell.command import command from cloudmesh.shell.command import PluginCommand from cloudmesh.transfer.api.manager import Manager from cloudmesh.common.console import Console from cloudmesh.common.util import path_expand from pprint import pprint from cloudmesh.commo...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 6279, 76, 5069, 13, 29149, 13, 21812, 1330, 3141, 198, 6738, 6279, 76, 5069, 13, 29149, 13, 21812, 1330, 42636, 21575, 198, 6738, 6279, 76, 5069, 13, 39437, 13, 15042, 13, 3715...
3.801887
106
import unittest from talipp.indicators import DEMA from TalippTest import TalippTest if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 198, 6738, 3305, 3974, 13, 521, 44549, 1330, 360, 27630, 198, 198, 6738, 7193, 3974, 14402, 1330, 7193, 3974, 14402, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 22...
2.795918
49
from example_python_package_shim import multi
[ 198, 6738, 1672, 62, 29412, 62, 26495, 62, 1477, 320, 1330, 5021, 628, 198 ]
3.5
14
from django.urls import path, include, re_path from .import views urlpatterns=[ path('',views.page1,name="index"), path('Resources/',views.MembersListView.as_view(),name="resources"), path('Resource/<int:pk>', views.MembersDetailView.as_view(), name='Resource-detail'), path('Technologies/',views.Technol...
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 11, 2291, 11, 302, 62, 6978, 198, 6738, 764, 11748, 5009, 198, 6371, 33279, 82, 41888, 198, 220, 220, 220, 3108, 10786, 3256, 33571, 13, 7700, 16, 11, 3672, 2625, 9630, 12340, 198, 220, ...
2.806061
165
from CCICApp.zhihu.zhihu_login import ZhiHuLogin
[ 6738, 12624, 2149, 4677, 13, 23548, 48406, 13, 23548, 48406, 62, 38235, 1330, 1168, 5303, 38202, 47790, 198 ]
2.722222
18
from django.db import models
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 628, 198 ]
3.444444
9
from django.core.management import call_command from conf.celery import app @app.task(autoretry_for=(TimeoutError,)) @app.task()
[ 6738, 42625, 14208, 13, 7295, 13, 27604, 1330, 869, 62, 21812, 198, 198, 6738, 1013, 13, 7015, 88, 1330, 598, 628, 198, 31, 1324, 13, 35943, 7, 2306, 9997, 563, 62, 1640, 16193, 48031, 12331, 11, 4008, 628, 198, 31, 1324, 13, 35943,...
2.977778
45
# -*- coding: utf-8 -*- """ /*************************************************************************** DemGenerator Random DEM generator -------------------- begin : 2017-08-29 git sha : $Format:%H$ copyri...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 14, 17174, 17174, 4557, 8162, 198, 1897, 8645, 1352, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
2.875792
789
''' Make a figure of the thin pv-slices stacked on top of each other. ''' from spectral_cube import SpectralCube, Projection from astropy.io import fits from astropy import units as u import numpy as np from glob import glob import os from os.path import join as osjoin import matplotlib.pyplot as plt from aplpy impor...
[ 198, 7061, 6, 198, 12050, 257, 3785, 286, 262, 7888, 279, 85, 12, 82, 677, 274, 24167, 319, 1353, 286, 1123, 584, 13, 198, 7061, 6, 198, 198, 6738, 37410, 62, 40296, 1330, 13058, 1373, 29071, 11, 4935, 295, 198, 6738, 6468, 28338, ...
1.98238
3,689
import socket import time import struct import threading import select import random import Queue import warnings if __name__ == "__main__": markerserver = MarkerServer(port=55555, sync_interval=15) markerserver.start() sockets = [] for i in range(25): c = MarkerSocket(ip="127.0.0.1", port=...
[ 11748, 17802, 198, 11748, 640, 198, 11748, 2878, 198, 11748, 4704, 278, 198, 11748, 2922, 198, 11748, 4738, 198, 11748, 4670, 518, 198, 11748, 14601, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 628, 220, 220, 220,...
2.200873
458
from spotty.config.abstract_instance_config import AbstractInstanceConfig from spotty.providers.gcp.config.validation import validate_instance_parameters VOLUME_TYPE_DISK = 'disk' DEFAULT_IMAGE_NAME = 'spotty'
[ 6738, 4136, 774, 13, 11250, 13, 397, 8709, 62, 39098, 62, 11250, 1330, 27741, 33384, 16934, 198, 6738, 4136, 774, 13, 15234, 4157, 13, 70, 13155, 13, 11250, 13, 12102, 341, 1330, 26571, 62, 39098, 62, 17143, 7307, 198, 198, 44558, 383...
3.261538
65
import argparse import itertools import logging import os import os.path as osp import StringIO import signal import sys import threading import time from dnslib import RR,QTYPE,RCODE from dnslib.server import DNSServer,DNSHandler,BaseResolver,DNSLogger from .config import ( DEFAULT_CONFIG_PATH, GSDriver, ...
[ 198, 11748, 1822, 29572, 198, 11748, 340, 861, 10141, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 28686, 13, 6978, 355, 267, 2777, 198, 11748, 10903, 9399, 198, 11748, 6737, 198, 11748, 25064, 198, 11748, 4704, 278, 198, 11748, 640,...
2.195151
4,166
# %% import collections import os import sys import time from pprint import pformat import ipdb import numpy as np import torch import torch.autograd import torch.nn as nn from loguru import logger from sklearn.metrics import precision_recall_fscore_support from torch.optim import SGD, Adam from torch.utils.data impor...
[ 2, 43313, 198, 11748, 17268, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 640, 198, 6738, 279, 4798, 1330, 279, 18982, 198, 198, 11748, 20966, 9945, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 11748, 28034, 13, 2306, ...
2.209628
4,279
# -*- coding: utf-8 -*- """ Texas module ============ This module presents two classes to handle the way state holidays are managed in Texas. The :class:`TexasBase` class gathers all available holidays for Texas, according to this document: http://www.statutes.legis.state.tx.us/Docs/GV/htm/GV.662.htm The :class:`Tex...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 21607, 8265, 198, 25609, 198, 198, 1212, 8265, 10969, 734, 6097, 284, 5412, 262, 835, 1181, 17122, 389, 5257, 198, 259, 3936, 13, 198, 198, 464, 1058, 4871, ...
2.762655
889
from django.shortcuts import render from .models import Thing
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 764, 27530, 1330, 21561 ]
4.357143
14
from pathlib import Path from typing import Any, Callable, Optional, Tuple, Union from torch import Tensor from . import common from .common import SignalInfo, EncodingInfo @common._impl_load @common._impl_load_wav @common._impl_save @common._impl_info
[ 6738, 3108, 8019, 1330, 10644, 198, 6738, 19720, 1330, 4377, 11, 4889, 540, 11, 32233, 11, 309, 29291, 11, 4479, 198, 198, 6738, 28034, 1330, 309, 22854, 198, 198, 6738, 764, 1330, 2219, 198, 6738, 764, 11321, 1330, 26484, 12360, 11, ...
3.329114
79
from __future__ import print_function import os import os.path as op import sys from peddy import Ped, Family, Sample, PHENOTYPE, SEX HERE = op.dirname(op.dirname(os.path.abspath(os.path.dirname(__file__)))) from contextlib import contextmanager @contextmanager
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 28686, 198, 11748, 28686, 13, 6978, 355, 1034, 198, 11748, 25064, 198, 6738, 279, 21874, 1330, 13457, 11, 7884, 11, 27565, 11, 9370, 1677, 2394, 56, 11401, 11, 311, 6369, 198, ...
2.936842
95
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: market.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflec...
[ 2, 2980, 515, 416, 262, 8435, 11876, 17050, 13, 220, 8410, 5626, 48483, 0, 198, 2, 2723, 25, 1910, 13, 1676, 1462, 198, 198, 11748, 25064, 198, 62, 65, 28, 17597, 13, 9641, 62, 10951, 58, 15, 60, 27, 18, 290, 357, 50033, 2124, 2...
2.307492
11,493
#!/usr/bin/env python import django import sys, os, logging logging.basicConfig(level=logging.INFO, format='%(asctime)s %(name)-12s %(levelname)-8s %(message)s', datefmt='%m-%d %H:%M', filename='../logs/task.log', filemode='a') sys.path.app...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 42625, 14208, 198, 11748, 25064, 11, 28686, 11, 18931, 198, 6404, 2667, 13, 35487, 16934, 7, 5715, 28, 6404, 2667, 13, 10778, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, ...
2.20198
505
import os import json import ffmpeg import pickle import sys import matplotlib.pyplot as plt from cv2 import VideoWriter, VideoWriter_fourcc, resize import numpy as np import cv2 def imgseq2video(imgseq, name="pick_up", decode="mp4v", folder=None, fps=3, o_h=500, o_w=500, full_path=None, rgb_to_bgr=T...
[ 11748, 28686, 198, 11748, 33918, 198, 11748, 31246, 43913, 198, 11748, 2298, 293, 198, 11748, 25064, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 269, 85, 17, 1330, 7623, 34379, 11, 7623, 34379, 62, 14337, 53...
2.277336
1,006
#!/usr/bin/env python # -*- coding: utf-8 -*- """ ArgParseInator test """ __file_name__ = "apitest.py" __author__ = "luca" __version__ = "1.0.0" __date__ = "2014-11-18" import argparseinator from argparseinator import arg, ap_arg, class_args @argparseinator.arg("name", help="The name to print") @argparseinator....
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 220, 220, 220, 20559, 10044, 325, 818, 1352, 1332, 198, 37811, 198, 834, 7753, 62, 3672, 834, 796, 366, 4...
2.275347
937
# -*- coding: utf-8 -*- """Example of using Copula Based Outlier Detector (COPOD) for outlier detection Sample wise interpretation is provided here. """ # Author: Winston Li <jk_zhengli@hotmail.com> # License: BSD 2 clause from __future__ import division from __future__ import print_function import os import sys # t...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 16281, 286, 1262, 6955, 4712, 13403, 3806, 2505, 4614, 9250, 357, 34, 3185, 3727, 8, 329, 503, 2505, 13326, 198, 36674, 10787, 10794, 318, 2810, 994, 13, 198, 378...
2.634757
679
import numpy as np import open3d if __name__ == "__main__": print("Load a ply point cloud, print it, and render it") pcd = open3d.read_point_cloud('/home/heider/Datasets/pointclouds/office.ply') print(pcd) print(np.asarray(pcd.points)) # open3d.draw_geometries([pcd]) print("Downsample the point cloud wit...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 1280, 18, 67, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 628, 220, 3601, 7203, 8912, 257, 35960, 966, 6279, 11, 3601, 340, 11, 290, 8543, 340, 4943, 198, 220, 279, 1...
2.530769
260
import argparse import torch import torch.nn.functional as F import torch.optim as optim from torch_sparse import fill_diag, sum as sparsesum, mul import torch_geometric.transforms as T from gcn import GCN import numpy as np import scipy.sparse as sp from scipy.sparse.linalg import eigsh from ogb.nodeproppred impor...
[ 11748, 1822, 29572, 198, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 11748, 28034, 13, 40085, 355, 6436, 198, 198, 6738, 28034, 62, 82, 29572, 1330, 6070, 62, 10989, 363, 11, 2160, 355, 599, 945, 274, 38...
2.356522
805
# -*- coding: utf-8 -*- """Human readable object exploration module. It is designed to be more verbose than the dir()-function, while being more compact than help(). """ from __future__ import print_function __author__ = "Talon24" __license__ = "MIT" __version__ = "0.1.10" __maintainer__ = "Talon24" __url__ = "https...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 20490, 31744, 2134, 13936, 8265, 13, 198, 198, 1026, 318, 3562, 284, 307, 517, 15942, 577, 621, 262, 26672, 3419, 12, 8818, 11, 981, 852, 517, 198, 5589, 529, 6...
2.341911
4,197
import torch import torch.nn as nn import torch.nn.functional as F if __name__ == '__main__': net = MaskNet(5) # Summarize #from torchinfo import summary data_sizes = [ (2, 2), (2, 1, 360), (2, 3, 95, 160), (2, 18), ] #summary(net, data_sizes) # Test r...
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 628, 220, 220, 220, 2010, 796, 18007, 7934, 7, 20, 8, 6...
2.024896
241
#!python3 import matplotlib.pyplot as plt import numpy as np from matplotlib.collections import PatchCollection if __name__ == "__main__": from exons import make_exon_shapes, make_exons_unscaled, make_exon_exon_lines else: from diag.exons import make_exon_shapes, make_exons_unscaled, make_exon_exon_lines con...
[ 2, 0, 29412, 18, 198, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 2603, 29487, 8019, 13, 4033, 26448, 1330, 17106, 36307, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834...
2.034672
1,644
#!/usr/bin/env python3 import numpy as np import cv2 import pandas as pd import matplotlib.pyplot as plt from collections import Counter from sklearn.cluster import KMeans from sklearn.neighbors import KernelDensity import scipy import scipy.signal import math import imutils import img_util card_regions = loadCardR...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 269, 85, 17, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 17268, ...
2.345395
1,216
import random import numpy as np import pybullet as p import itertools from rrc_simulation import visual_objects from scipy.spatial.transform import Rotation as R def apply_rotation_z(org_pos, theta): ''' Apply 3 x 3 rotation matrix for rotation on xy-plane ''' x_, y_, z_ = org_pos x = x_ * np.co...
[ 11748, 4738, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 12972, 15065, 1616, 355, 279, 198, 11748, 340, 861, 10141, 198, 6738, 374, 6015, 62, 14323, 1741, 1330, 5874, 62, 48205, 198, 6738, 629, 541, 88, 13, 2777, 34961, 13, 35636, ...
2.273541
3,908