content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
class InvalidCoinID(Exception): """ Exception raised when search query requested by user doesn't return a coin. """
[ 4871, 17665, 24387, 2389, 7, 16922, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 35528, 4376, 618, 2989, 12405, 9167, 416, 2836, 1595, 470, 1441, 257, 10752, 13, 198, 220, 220, 220, 37227 ]
3.628571
35
# -*- coding: utf-8 -*- # Copyright 2019 Open End AB # # 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 o...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 15069, 13130, 4946, 5268, 9564, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 7...
3.228507
442
import ftplib import requests import tempfile import json import os import sys ''' Created on 07 Sep 2013 @author: rob dobson '''
[ 11748, 10117, 489, 571, 198, 11748, 7007, 198, 11748, 20218, 7753, 198, 11748, 33918, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 7061, 6, 198, 41972, 319, 8753, 8621, 2211, 198, 198, 31, 9800, 25, 3857, 466, 1443, 261, 198, 7061, ...
2.711538
52
# convert decimal to binary # Get the i-th digit of binary string x # sort A using binary digit i from random import choice from string import uppercase if __name__ == "__main__": strings = [] for i in range(27): strings.append(genstring(5)) print strings strings = RADIX_SORT(strings) print strings
[ 2, 10385, 32465, 284, 13934, 198, 198, 2, 3497, 262, 1312, 12, 400, 16839, 286, 13934, 4731, 2124, 198, 198, 2, 3297, 317, 1262, 13934, 16839, 1312, 198, 198, 6738, 4738, 1330, 3572, 198, 6738, 4731, 1330, 334, 39921, 589, 198, 198, ...
3.047619
105
# coding:utf-8 #!/usr/bin/python # # Copyright (c) Contributors to the Open 3D Engine Project. # For complete copyright and license terms please see the LICENSE at the root of this distribution. # # SPDX-License-Identifier: Apache-2.0 OR MIT # # # ------------------------------------------------------------------------...
[ 2, 19617, 25, 40477, 12, 23, 198, 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 198, 2, 15069, 357, 66, 8, 25767, 669, 284, 262, 4946, 513, 35, 7117, 4935, 13, 198, 2, 1114, 1844, 6634, 290, 5964, 2846, 3387, 766, 262, 38559, 24...
3.705882
255
marksheet=[] scoresheet=[] if __name__ == '__main__': for _ in range(int(input())): name = input() score = float(input()) marksheet=marksheet+[[name,score]] scoresheet+=[score] x=sorted(set(scoresheet))[1] for n, s in sorted(marksheet): if s==x: print(n) ...
[ 14306, 25473, 28, 21737, 198, 1416, 2850, 25473, 28, 21737, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 329, 4808, 287, 2837, 7, 600, 7, 15414, 28955, 2599, 198, 220, 220, 220, 220, 220, 220, 2...
1.953488
172
# -*- coding: utf-8 -*- """ Created on 2021-03-02 23:40:37 --------- @summary: --------- @author: Boris """ import feapder
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 33448, 12, 3070, 12, 2999, 2242, 25, 1821, 25, 2718, 198, 45537, 198, 31, 49736, 25, 198, 45537, 198, 31, 9800, 25, 25026, 198, 37811, 198, 198...
2.5
50
#!/usr/bin/env python ################################################################################ # COPYRIGHT(c) 2018 STMicroelectronics # # # # Redistribution and use in source and binary for...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 201, 198, 201, 198, 29113, 29113, 14468, 201, 198, 2, 27975, 38162, 9947, 7, 66, 8, 2864, 3563, 13031, 9509, 20844, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
2.76526
2,228
from sqlalchemy import create_engine from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker #load .env variables import os from dotenv import load_dotenv load_dotenv() PWD = os.getenv('PWD') import sys sys.path.insert(1, PWD) SQLALCHEMY_DATABASE_URL = f"sqlite:///{PWD}/data_bas...
[ 6738, 44161, 282, 26599, 1330, 2251, 62, 18392, 198, 6738, 44161, 282, 26599, 13, 2302, 13, 32446, 283, 876, 1330, 2377, 283, 876, 62, 8692, 198, 6738, 44161, 282, 26599, 13, 579, 1330, 6246, 10297, 198, 2, 2220, 764, 24330, 9633, 198...
2.633745
243
""" defines: - TableObject - RealTableArray - ComplexTableArray these are used by: - RealDisplacementArray - RealVelocityArray - RealAccelerationArray - RealEigenvaluesArray - RealSPCForcesArray - RealMPCForcesArray - RealAppliedLoadsArray - ComplexDisplacementArray - ComplexVelocityArray - ComplexAccele...
[ 37811, 198, 4299, 1127, 25, 198, 532, 8655, 10267, 198, 532, 6416, 10962, 19182, 198, 532, 19157, 10962, 19182, 198, 198, 27218, 389, 973, 416, 25, 198, 532, 6416, 7279, 489, 5592, 19182, 198, 532, 6416, 46261, 11683, 19182, 198, 532, ...
1.658789
27,971
linkedList = LinkedList() linkedList.insert(1) linkedList.insert(4) linkedList.insert(7) linkedList.insert(8) linkedList.printLinkedList() print() # linkedList.reverse_iteratively() linkedList.reverse_recursively() linkedList.printLinkedList()
[ 628, 198, 25614, 8053, 796, 7502, 276, 8053, 3419, 198, 25614, 8053, 13, 28463, 7, 16, 8, 198, 25614, 8053, 13, 28463, 7, 19, 8, 198, 25614, 8053, 13, 28463, 7, 22, 8, 198, 25614, 8053, 13, 28463, 7, 23, 8, 198, 25614, 8053, 13,...
2.975904
83
# ---------------------------------------------------------------------------- # test17.py # # Copyright 2021 Daniel Tisza # MIT License # # Taking raw image with Zybo and saving to NETCDF # # LED calibration set: C # Wavelength: 584.577535 # Setpoint: 11127 # # -------------------------------------------------...
[ 2, 16529, 10541, 198, 2, 197, 9288, 1558, 13, 9078, 198, 2, 198, 2, 197, 15269, 33448, 7806, 309, 271, 4496, 198, 2, 197, 36393, 13789, 198, 2, 198, 2, 197, 26556, 8246, 2939, 351, 40905, 2127, 290, 8914, 284, 30502, 34, 8068, 198...
2.62721
3,903
import json from typing import Union import mock from openeo.rest.datacube import DataCube from openeo.rest.imagecollectionclient import ImageCollectionClient def get_download_graph(cube: Union[DataCube, ImageCollectionClient]) -> dict: """ Do fake download of a cube and intercept the process graph :par...
[ 11748, 33918, 198, 6738, 19720, 1330, 4479, 198, 198, 11748, 15290, 198, 198, 6738, 1280, 68, 78, 13, 2118, 13, 19608, 330, 3266, 1330, 6060, 29071, 198, 6738, 1280, 68, 78, 13, 2118, 13, 9060, 43681, 16366, 1330, 7412, 36307, 11792, ...
2.937916
451
import os import string import sys import math languages = ['dan','deu','dut','eng','fin','fra','gla','ita','nob','pol','por','spa','swe','swh','tgl'] def smoothing(corpus): ''' Addative Smoothing args: corpus(dict): words to occourences based on langauge returns: a modified corpus increase the co...
[ 11748, 28686, 198, 11748, 4731, 198, 11748, 25064, 198, 11748, 10688, 198, 75, 33213, 796, 37250, 25604, 41707, 2934, 84, 41707, 67, 315, 41707, 1516, 41707, 15643, 41707, 69, 430, 41707, 4743, 64, 41707, 5350, 41707, 34952, 41707, 16104, ...
2.48311
1,865
# DESCRIPTION # Implement a trie with insert, search, and startsWith methods. # EXAMPLE: # Trie trie = new Trie(); # trie.insert("apple"); # trie.search("apple"); // returns true # trie.search("app"); // returns false # trie.startsWith("app"); // returns true # trie.insert("app"); # trie.search("app"); // r...
[ 2, 22196, 40165, 198, 2, 48282, 257, 1333, 68, 351, 7550, 11, 2989, 11, 290, 4940, 3152, 5050, 13, 198, 198, 2, 7788, 2390, 16437, 25, 198, 2, 309, 5034, 1333, 68, 796, 649, 309, 5034, 9783, 198, 198, 2, 1333, 68, 13, 28463, 720...
2.961905
210
import socket import time import cv2 import pickle import zlib import datetime HOST = '192.168.0.101' PORT = 13327 video = cv2.VideoCapture(0) video.set(3, 50) video.set(4, 50) s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((HOST, PORT)) for i in range(5800): ret, frame = video.read() ...
[ 11748, 17802, 198, 11748, 640, 198, 11748, 269, 85, 17, 198, 11748, 2298, 293, 198, 11748, 1976, 8019, 198, 11748, 4818, 8079, 198, 198, 39, 10892, 796, 705, 17477, 13, 14656, 13, 15, 13, 8784, 6, 198, 15490, 796, 22169, 1983, 198, ...
2.042735
351
import xml_utilities
[ 198, 11748, 35555, 62, 315, 2410, 628, 628, 628, 628, 198 ]
2.727273
11
# normal libaries import os import gzip import re import collections import zipfile import operator import logging logger = logging.getLogger(os.path.basename(__file__)) logging.basicConfig(level=logging.INFO) # 3rd party (all avalible trough pip!) import numpy as np import matplotlib as mp mp.use("Agg") from matpl...
[ 2, 3487, 9195, 3166, 198, 11748, 28686, 198, 11748, 308, 13344, 198, 11748, 302, 198, 11748, 17268, 198, 11748, 19974, 7753, 198, 11748, 10088, 198, 11748, 18931, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 418, 13, 6978...
2.596798
10,305
# By Mostapha Sadeghipour Roudsari # Sadeghipour@gmail.com # Ladybug started by Mostapha Sadeghipour Roudsari is licensed # under a Creative Commons Attribution-ShareAlike 3.0 Unported License. """ Export Honeybee Objects to OpenStudio - Provided by Honeybee 0.0.53 Args: openStudioLibFolder: Retur...
[ 2, 2750, 4042, 499, 3099, 311, 671, 456, 541, 454, 371, 2778, 82, 2743, 198, 2, 311, 671, 456, 541, 454, 31, 14816, 13, 785, 198, 2, 11182, 25456, 2067, 416, 4042, 499, 3099, 311, 671, 456, 541, 454, 371, 2778, 82, 2743, 318, 11...
2.925302
2,316
import petsc4py, sys # I like to be in control of the command line petsc4py.init(sys.argv) from dolfin import * from petsc4py import PETSc parameters['form_compiler']['representation'] = 'uflacs' parameters['form_compiler']['cpp_optimize'] = True parameters['form_compiler']['cpp_optimize_flags'] = '-O3 -ffast-math -...
[ 11748, 17252, 66, 19, 9078, 11, 25064, 198, 198, 2, 314, 588, 284, 307, 287, 1630, 286, 262, 3141, 1627, 198, 79, 1039, 66, 19, 9078, 13, 15003, 7, 17597, 13, 853, 85, 8, 198, 198, 6738, 288, 4024, 259, 1330, 1635, 198, 6738, 17...
2.394489
4,464
from unittest import TestCase from employees import Employee, Job, sort_employees_by_salary
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 198, 6738, 4409, 1330, 36824, 11, 15768, 11, 3297, 62, 7033, 2841, 62, 1525, 62, 21680, 560, 628, 198 ]
3.518519
27
import numpy as np import matplotlib.pyplot as plt # remove cv2 before you submit to autograder import cv2 import os from PIL import Image def img_tile(imgs, path, filename, save, aspect_ratio=1.0, border=1, border_color=0): """ Visualize the WGAN result for each step :param imgs: Numpy array of the ge...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 2, 4781, 269, 85, 17, 878, 345, 9199, 284, 1960, 519, 81, 5067, 198, 11748, 269, 85, 17, 198, 11748, 28686, 198, 6738, 350, 4146, 1330...
2.232934
2,168
from django.contrib import messages from django.contrib.auth import authenticate, login, update_session_auth_hash from django.contrib.auth.decorators import login_required from django.contrib.auth.forms import PasswordChangeForm from django.shortcuts import redirect, render from .forms import EmailForm, RegistrationFo...
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 6218, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 8323, 5344, 11, 17594, 11, 4296, 62, 29891, 62, 18439, 62, 17831, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 12501, 27...
2.651498
901
#Dependencies import datetime as dt import numpy as np import pandas as pd import sqlalchemy from sqlalchemy.ext.automap import automap_base from sqlalchemy.orm import Session from sqlalchemy import create_engine, func from flask import Flask, jsonify #Boilerplate engine = create_engine("sqlite:///Resources/hawaii....
[ 2, 35, 2690, 3976, 198, 11748, 4818, 8079, 355, 288, 83, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 11748, 44161, 282, 26599, 198, 6738, 44161, 282, 26599, 13, 2302, 13, 2306, 296, 499, 1330, ...
3.029724
471
# Copyright 2016-present CERN – European Organization for Nuclear Research # # 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...
[ 2, 220, 220, 220, 220, 15069, 1584, 12, 25579, 327, 28778, 784, 3427, 12275, 329, 19229, 4992, 198, 2, 198, 2, 220, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 220, 2...
3.304167
240
import json from os import wait import time import math import threading from .HWIO.LEDController import LEDController from .HWIO.SwitchController import SwitchController from .HWIO.ServoController import ServoController from .KinematicsDB import getKinematicsDB eRobotState_VOID = 0 eRobotState_LOAD = 1 eRobotState_...
[ 11748, 33918, 198, 6738, 28686, 1330, 4043, 198, 11748, 640, 198, 11748, 10688, 198, 11748, 4704, 278, 198, 198, 6738, 764, 39, 54, 9399, 13, 30465, 22130, 1330, 12365, 22130, 198, 6738, 764, 39, 54, 9399, 13, 38978, 22130, 1330, 14645,...
2.957746
142
import sys from torch.optim import Adam from tqdm import tqdm from src.dataset.ReviewDataset import ReviewDataset from src.models.AttSeq2Seq import AttSeq2Seq from src.models.Seq2Seq import Seq2Seq from src.trainers.BaseTrainer import BaseTrainer from src.utils.const import MAX_PADDING, CATE_MAX_PADDING, EARLY_STOPPI...
[ 11748, 25064, 198, 198, 6738, 28034, 13, 40085, 1330, 7244, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 198, 6738, 12351, 13, 19608, 292, 316, 13, 14832, 27354, 292, 316, 1330, 6602, 27354, 292, 316, 198, 6738, 12351, 13, 27...
2.85034
147
#!/usr/local/bin/python3 import os import sys import pprint import logging import json from pyflowater import PyFlo if __name__ == "__main__": main()
[ 2, 48443, 14629, 14, 12001, 14, 8800, 14, 29412, 18, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 279, 4798, 198, 11748, 18931, 198, 11748, 33918, 198, 198, 6738, 12972, 11125, 729, 1330, 9485, 33574, 628, 198, 361, 11593, 367...
2.872727
55
import pygame import time import draw from window import Window import event_handler pygame.init() ARRAY_SIZE,DELAY = event_handler.get_user_input() if __name__ == "__main__": running = True clock = pygame.time.Clock() FPS = 60 window = Window() handler = event_handler.Handler(windo...
[ 11748, 12972, 6057, 198, 11748, 640, 198, 11748, 3197, 198, 6738, 4324, 1330, 26580, 198, 11748, 1785, 62, 30281, 198, 198, 9078, 6057, 13, 15003, 3419, 198, 1503, 30631, 62, 33489, 11, 35, 3698, 4792, 796, 1785, 62, 30281, 13, 1136, ...
2.39312
407
from pyglobe3d.core.icosalogic.grid_consts import Grid from pyglobe3d.core.icosalogic.elements import ElementWithIndexAndLocationObjects from pyglobe3d.core.icosalogic.triangle_attrs import TriangleIndex, TriangleLocation class Triangle(ElementWithIndexAndLocationObjects): """ Describes a logical triangle loc...
[ 6738, 12972, 4743, 5910, 18, 67, 13, 7295, 13, 291, 418, 11794, 291, 13, 25928, 62, 1102, 6448, 1330, 24846, 198, 6738, 12972, 4743, 5910, 18, 67, 13, 7295, 13, 291, 418, 11794, 291, 13, 68, 3639, 1330, 11703, 3152, 15732, 1870, 147...
2.486692
263
import csv import os from sqlalchemy import create_engine from sqlalchemy.orm import scoped_session, sessionmaker if not os.getenv("DATABASE_URL"): raise RuntimeError("DATABASE_URL is not set") # Set up database engine = create_engine(os.getenv("DATABASE_URL")) db = scoped_session(sessionmaker(bind=engine)) if...
[ 11748, 269, 21370, 198, 11748, 28686, 198, 198, 6738, 44161, 282, 26599, 1330, 2251, 62, 18392, 198, 6738, 44161, 282, 26599, 13, 579, 1330, 629, 19458, 62, 29891, 11, 6246, 10297, 198, 198, 361, 407, 28686, 13, 1136, 24330, 7203, 35, ...
2.848
125
import argparse import json from _jsonnet import evaluate_file as jsonnet_evaluate_file from sklearn.decomposition import TruncatedSVD from scipy.sparse import csr_matrix import torch from tqdm import tqdm from purano.io import read_tg_jsonl from purano.training.models.tfidf import build_idf_vocabulary, get_tfidf_vec...
[ 11748, 1822, 29572, 198, 11748, 33918, 198, 198, 6738, 4808, 17752, 3262, 1330, 13446, 62, 7753, 355, 33918, 3262, 62, 49786, 62, 7753, 198, 6738, 1341, 35720, 13, 12501, 296, 9150, 1330, 833, 19524, 515, 50, 8898, 198, 6738, 629, 541, ...
2.821168
274
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ @author: jyao Go over all n-grams up to length k (say 5) in a text, check which of these n-grams appear in the p(e|m) dictionary. For each mention that appears, take the top scored entity e based on p(e|m) value, and check its wikipedia page to see if it contains a D...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 31, 9800, 25, 474, 3972, 78, 198, 5247, 625, 477, 299, 12, 4546, 82, 510, 284, 4129, 479, 357, 1670...
2.974026
154
import bz2 import pytest from io import TextIOWrapper from pathlib import Path from tests.mowgli_etl_test.http_client.mock_etl_http_client import MockEtlHttpClient _sample_usf_file_path = Path(__file__).parent / "usf_test_data.xml" _sample_usf_zip_file_path = Path(__file__).parent / "usf_test_data.zip" @pytest.fix...
[ 11748, 275, 89, 17, 198, 11748, 12972, 9288, 198, 6738, 33245, 1330, 8255, 40, 3913, 430, 2848, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 5254, 13, 76, 322, 70, 4528, 62, 316, 75, 62, 9288, 13, 4023, 62, 16366, 13, 76, 735, 6...
2.524476
143
import os import sys import subprocess import csv # When instantiating a trial class both of the inputs, name and trial, should be included. #Their current defaults are for demonstration/testing purposes only. def loop(que): """ desc: the loop used to manage talking to the trial interpreter. possible comm...
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 850, 14681, 198, 11748, 269, 21370, 198, 198, 2, 1649, 9113, 26336, 257, 4473, 1398, 1111, 286, 262, 17311, 11, 1438, 290, 4473, 11, 815, 307, 3017, 13, 198, 2, 14574, 1459, 26235, 389, 329...
2.684932
584
"""VIMS ISIS header.""" import os import numpy as np import pvl from .errors import ISISError from .history import ISISHistory from .labels import ISISLabels from .tables import ISISTables from .time import time as _dt from .vars import BYTE_ORDERS, FIELD_TYPES from ..misc import get_md5 class ISISCube: """VIM...
[ 37811, 53, 3955, 50, 7768, 13639, 526, 15931, 198, 198, 11748, 28686, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 279, 19279, 198, 198, 6738, 764, 48277, 1330, 7768, 12331, 198, 6738, 764, 23569, 1330, 7768, 18122, 198, 67...
2.216525
3,764
# -*- coding: utf-8 -*- import os from pyfann import libfann from test_opencv import PROJECT_ROOT imgW = 83 imgH = 23 factor = 2 rimgW = imgW * factor rimgH = imgH * factor nSegs = 5 segW = 18 segH = 18 segSize = (segW, segH) num_input = segW * segH TRAIN_FILE = os.path.join(PROJECT_ROOT, "fann.train")
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 28686, 198, 198, 6738, 12972, 69, 1236, 1330, 9195, 69, 1236, 198, 198, 6738, 1332, 62, 9654, 33967, 1330, 21965, 23680, 62, 13252, 2394, 628, 198, 9600, 54, 796,...
2.113333
150
#coding:utf-8 import matplotlib.pyplot as plt import matplotlib import platform
[ 2, 66, 7656, 25, 40477, 12, 23, 198, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 2603, 29487, 8019, 198, 11748, 3859, 628, 220, 220, 220, 220, 220, 220, 220, 220 ]
2.5
36
from __future__ import division import numpy as np import utils import pdb data = utils.load_dataset("mnist/mnist_test", npy=True) Xvalid, yvalid = data['X'], data['y'] if __name__ == "__main__": pdb.set_trace()
[ 6738, 11593, 37443, 834, 1330, 7297, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 3384, 4487, 198, 11748, 279, 9945, 198, 198, 7890, 796, 3384, 4487, 13, 2220, 62, 19608, 292, 316, 7203, 10295, 396, 14, 10295, 396, 62, 9288, 1600, ...
2.522727
88
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import json import warnings import pulumi import pulumi.runtime from typing import Union from .. import utilities, tables
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 17202, 39410, 25, 428, 2393, 373, 7560, 416, 262, 21624, 12994, 24118, 687, 10290, 357, 27110, 5235, 8, 16984, 13, 17202, 198, 2, 17202, 2141, 407, 4370, 416, 1021, 4556, 345, 821, 1728, 345, 760...
3.898734
79
# -*- coding: utf-8 -*- """ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # # This file was generated and any changes will be overwritten. """ from __future__ import unicode_literals from .calendar_request impo...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 220, 198, 37811, 198, 2, 15069, 357, 66, 8, 5413, 10501, 13, 220, 1439, 6923, 33876, 13, 220, 49962, 739, 262, 17168, 13789, 13, 220, 4091, 13789, 287, 262, 1628, 6808, 329...
3.875
112
import torch from rlpyt.models.conv2d import Conv2dModel from rlpyt.models.mlp import MlpModel from rlpyt.ul.models.dmlab_conv2d import DmlabConv2dModel from rlpyt.utils.tensor import infer_leading_dims, restore_leading_dims def weight_init(m): """Kaiming_normal is standard for relu networks, sometimes.""" ...
[ 198, 11748, 28034, 198, 198, 6738, 374, 75, 9078, 83, 13, 27530, 13, 42946, 17, 67, 1330, 34872, 17, 67, 17633, 198, 6738, 374, 75, 9078, 83, 13, 27530, 13, 4029, 79, 1330, 337, 34431, 17633, 198, 6738, 374, 75, 9078, 83, 13, 377,...
2.318182
220
from django.shortcuts import render, redirect from django.contrib import messages from .models import User, Job from datetime import datetime import bcrypt
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 18941, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 6218, 198, 6738, 764, 27530, 1330, 11787, 11, 15768, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 275, 29609, 198 ]
4
39
import __version print(__version.version)
[ 11748, 11593, 9641, 201, 198, 4798, 7, 834, 9641, 13, 9641, 8 ]
3.5
12
# -*- coding: utf-8 -*- import wx from src.ui import MakeInfoEntrySizer, AddField, MedFont, winSizes import hashlib from strings import trans
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 266, 87, 198, 6738, 12351, 13, 9019, 1330, 6889, 12360, 30150, 50, 7509, 11, 3060, 15878, 11, 2019, 23252, 11, 1592, 50, 4340, 198, 11748, 12234, 8019, 198, ...
2.918367
49
# Create a function called uppercase_and_reverse that takes a little bit of text, # uppercases it all, and then reverses it (flips all the letters around) text = uppercase_and_reverse("Do not go gentle into that good night.") #"THGIN DOOG TAHT OTNI ELTNEG OG TON OD" print(text)
[ 2, 13610, 257, 2163, 1444, 334, 39921, 589, 62, 392, 62, 50188, 326, 2753, 257, 1310, 1643, 286, 2420, 11, 220, 198, 2, 334, 39921, 1386, 340, 477, 11, 290, 788, 10372, 274, 340, 357, 2704, 2419, 477, 262, 7475, 1088, 8, 198, 198,...
3.157303
89
#!/usr/bin/env python3 """ mypy-after-commit.py: Git post-commit script to type-check commits in the background. Install with: ln -rs ./contrib/hooks/mypy-after-commit.py .git/hooks/post-commit """ import sys import subprocess import os from lib import announce, complain, file_link, in_acceptable_environment, chec...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 37811, 198, 1820, 9078, 12, 8499, 12, 41509, 13, 9078, 25, 15151, 1281, 12, 41509, 4226, 284, 2099, 12, 9122, 23463, 287, 262, 4469, 13, 198, 198, 15798, 351, 25, 198, 198, ...
2.836601
153
import openml import pandas as pd import numpy as np from sklearn import metrics from sklearn.neighbors import KNeighborsClassifier from sklearn.preprocessing import OneHotEncoder from sklearn.model_selection import train_test_split import iinc # Measures # Dataset list openml_list = openml.datasets.list_datasets() ...
[ 11748, 1280, 4029, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 1341, 35720, 1330, 20731, 198, 6738, 1341, 35720, 13, 710, 394, 32289, 1330, 509, 46445, 32289, 9487, 7483, 198, 6738, 1341, 35720, ...
2.462845
1,413
# Server Configuration ip_address_server = "http://192.168.88.204" url = "/epass2018/parking_outs/api_member_out" timeout_connection = 30 # in second(s) retry_connect = 3 # in second(s) # HID Configuration hid_name = "Sycreader RFID"
[ 2, 9652, 28373, 198, 541, 62, 21975, 62, 15388, 796, 366, 4023, 1378, 17477, 13, 14656, 13, 3459, 13, 18638, 1, 198, 6371, 796, 12813, 538, 562, 7908, 14, 20928, 278, 62, 5269, 14, 15042, 62, 19522, 62, 448, 1, 198, 48678, 62, 386...
2.819277
83
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT license. import glob import re import warnings from os.path import join as pjoin from collections import OrderedDict, defaultdict from typing import Any, Optional, Mapping, List, Tuple, Container, Union from numpy.random import Rand...
[ 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 17168, 5964, 13, 628, 198, 11748, 15095, 198, 11748, 302, 198, 11748, 14601, 198, 6738, 28686, 13, 6978, 1330, 4654, 355, 279, 22179, 198, 6738, ...
2.274615
5,779
# pylint: disable=unused-wildcard-import,c-extension-no-member,too-many-instance-attributes,no-self-use,raise-missing-from,no-member,wildcard-import """Provides a wrapper for Windows Process defined by PID""" from ctypes import * from ctypes.wintypes import * from wmempy.wmem_system import WinSys as WSys from wmempy.wm...
[ 2, 279, 2645, 600, 25, 15560, 28, 403, 1484, 12, 21992, 9517, 12, 11748, 11, 66, 12, 2302, 3004, 12, 3919, 12, 19522, 11, 18820, 12, 21834, 12, 39098, 12, 1078, 7657, 11, 3919, 12, 944, 12, 1904, 11, 40225, 12, 45688, 12, 6738, ...
2.431561
4,062
from setuptools import setup setup( name='patho_toolbox', version='', packages=[''], url='', license='', author='vankhoa', author_email='vankhoa21991@gmail.com', description='pathology toolbox' )
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 11639, 6978, 78, 62, 25981, 3524, 3256, 198, 220, 220, 220, 2196, 11639, 3256, 198, 220, 220, 220, 10392, 41888, 7061, 4357, 198, 220, 220, 220, 19016,...
2.410526
95
#! /usr/bin/env python3 """ Plot the compostion of the giant component in time from a set of snapshots located in a directory. ``` {.text} usage: kappa_snapshot_largest_complex_time [-h] Show detailed help. [-d DIRECTORY] Directory where snapshots are stored, default is <.> [-p PATTERN] ...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 37811, 198, 43328, 262, 36541, 295, 286, 262, 6175, 7515, 287, 640, 422, 257, 900, 286, 47787, 5140, 287, 257, 8619, 13, 198, 198, 15506, 63, 1391, 13, 5239, 92, 198, 26060, ...
2.391843
2,501
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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...
[ 2, 43907, 25, 7400, 11338, 28, 19, 6482, 10394, 28, 19, 2705, 8658, 11338, 28, 19, 198, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 220, ...
3.354839
279
import json import argparse from mlcl.init_implementation import init_implementation if __name__ == '__main__': try: parser = argparse.ArgumentParser() parser.add_argument('--profiling-method', help='Type of profiling that shall be run.') parser.add_argument('--implementation', help='Imp...
[ 11748, 33918, 198, 11748, 1822, 29572, 198, 198, 6738, 25962, 565, 13, 15003, 62, 320, 32851, 1330, 2315, 62, 320, 32851, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 628, 220, 220, 220, 1949, 25, 198, 220, 220,...
2.224902
1,534
#coding:utf-8 # # id: bugs.core_4653 # title: Crash on infinite mutual SP calls (instead of "Too many concurrent executions of the same request.") # decription: 20150108: crach every even run, WI-T3.0.0.31529, Win XP SP3 # tracker_id: CORE-4653 # min_versions: ['3.0'] # versions: 3.0 # qmid: ...
[ 2, 66, 7656, 25, 40477, 12, 23, 198, 2, 198, 2, 4686, 25, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 11316, 13, 7295, 62, 42018, 18, 198, 2, 3670, 25, 220, 220, 220, 220, 220, 220, 220, 23653, 319, 15541, 13584, 6226, 3...
2.3576
1,250
import functools ## these code solution is from: https://github.com/danielgaylord/coding-exercises/blob/main/Advent%20of%20Code/2021-Day16.py # Read puzzle input and return as usable data structure # Find value of a literal value subpacket # Recursive function to decode packets and subpackets if __name__ == "_...
[ 11748, 1257, 310, 10141, 198, 198, 2235, 777, 2438, 4610, 318, 422, 25, 3740, 1378, 12567, 13, 785, 14, 67, 6321, 22744, 10572, 14, 66, 7656, 12, 1069, 2798, 2696, 14, 2436, 672, 14, 12417, 14, 2782, 1151, 4, 1238, 1659, 4, 1238, ...
2.757991
219
import os import pandas as pd from fit_simple import * from social_heuristic import * from baseline_model import * from test_model import * from sklearn import gaussian_process data = [] in_dir = '../../new-processed/' out_dir = '../../modeling/' light_fields = ['0-1en01', '1-1en01', '2-1en01', '3-1en01'] pars ...
[ 198, 11748, 28686, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 4197, 62, 36439, 1330, 1635, 198, 6738, 1919, 62, 258, 27915, 1330, 1635, 198, 6738, 14805, 62, 19849, 1330, 1635, 198, 6738, 1332, 62, 19849, 1330, 1635, 1...
2.143293
984
import os import json import glob import numpy as np from matplotlib import pyplot as plt from enterprise_warp.results import suitable_estimator crn_lvl_dir = '/fred/oz002/bgoncharov/correlated_noise_pta_2020_out/dr2_timing_20200607/20200908_20200917_cpl_vargam_x1psr/noisefiles/' pe_lvl_dir = '/fred/oz002/bgoncharov/...
[ 11748, 28686, 198, 11748, 33918, 198, 11748, 15095, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 2603, 29487, 8019, 1330, 12972, 29487, 355, 458, 83, 198, 198, 6738, 13953, 62, 86, 5117, 13, 43420, 1330, 11080, 62, 395, 320, 1352, 198...
2.034528
1,535
""" Weapon serializers. """ from rest_framework import serializers from common.serializers import OwnedModelSerializer from equipment.models import Weapon, WeaponProperty class WeaponSerializer(OwnedModelSerializer): """ Serializer for Weapon model """ properties = serializers.PrimaryKeyRelatedField( ...
[ 37811, 13072, 11389, 11341, 13, 37227, 198, 6738, 1334, 62, 30604, 1330, 11389, 11341, 198, 198, 6738, 2219, 13, 46911, 11341, 1330, 11744, 276, 17633, 32634, 7509, 198, 6738, 5112, 13, 27530, 1330, 13072, 11, 13072, 21746, 628, 198, 4871...
3.747475
99
l = [] for el in l: print( f""" module {el.capitalize().replace(".", "_")}Listener : sig type t = ??? val t_to_js : t -> Ojs.t val t_of_js : Ojs.t -> t end """ ) print( """ type listener = ([ """ ) for el in l: print( f""" | `{el.capitalize().replace(".", "_")} of ...
[ 75, 796, 17635, 198, 198, 1640, 1288, 287, 300, 25, 198, 220, 220, 220, 3601, 7, 198, 220, 220, 220, 220, 220, 220, 220, 277, 37811, 198, 21412, 1391, 417, 13, 27544, 1096, 22446, 33491, 7203, 33283, 45434, 4943, 92, 33252, 1058, 43...
2.399031
619
i#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ YEAR: 2019 - 2021 @author: ADA GJERMUNDSEN This script will reproduce FIGURE 5 in Gjermundsen et. al 2021 The data used for plotting is generated by scripts contained in the same folder as this (FIGURE5) """ import xarray as xr import warnings warnings.simplefilte...
[ 72, 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 56, 17133, 25, 13130, 532, 33448, 198, 198, 31, 9800, 25, 46460, 402, 41, 1137, 44, 4944, 5258, ...
1.87952
5,669
import os import numpy as np import pandas as pd import json import base64 # from netCDF4 import Dataset,chartostring from netcdf import NetCDF from s3netcdfapi import S3NetCDFAPI # import binpy import scipy.io as sio from mbtilesapi import getTile,getVT,readVT,send,VT2Tile,Points2VT,getVTfromBinary from s3netcdfapi.d...
[ 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 33918, 198, 11748, 2779, 2414, 198, 2, 422, 2010, 34, 8068, 19, 1330, 16092, 292, 316, 11, 40926, 455, 1806, 198, 6738, 2010, 66, 7568...
2.21658
1,930
# The MIT License (MIT) # # Copyright (c) 2016 Litrin Jiang # # 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 the rights # to use, copy, modi...
[ 2, 383, 17168, 13789, 357, 36393, 8, 198, 2, 198, 2, 15069, 357, 66, 8, 1584, 25659, 12769, 32294, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 198, 2, 286, 428, 3788, ...
3.549708
342
# coding:utf-8 import numpy as np import matplotlib.pyplot as plt FileConfirmed=open('source/GlobalConfirm.csv', 'r') lines_confirm=FileConfirmed.readlines() lines_confirm.pop(0) FileRecovered=open('source/GlobalRecovered.csv', 'r') lines_recovered=FileRecovered.readlines() lines_recovered.pop(0) FileDeath=open('sou...
[ 2, 19617, 25, 40477, 12, 23, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 8979, 18546, 15491, 28, 9654, 10786, 10459, 14, 22289, 18546, 2533, 13, 40664, 3256, 705, 81, 115...
2.231981
2,095
import torch import torch.nn as nn import numpy as np from einops import rearrange #from nystrom_attention import Nystromformer import gc import collections import torch.nn.functional as F class ConvBlock(nn.Module): """Some Information about ConvBlock""" if __name__ == '__main__': x = torch.rand((...
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 304, 259, 2840, 1330, 37825, 858, 198, 2, 6738, 299, 88, 20282, 62, 1078, 1463, 1330, 17735, 20282, 16354, 198, 11748, 308, 66, 1...
2.715232
151
import sys sys.path.append("..") from utils import utils, responses from django.http import HttpResponse, HttpRequest from django.views import View from rest_framework.views import APIView # For swagger from documentapp.models import Document from profileapp.models import Profile from .models import Comment # Create...
[ 11748, 25064, 198, 198, 17597, 13, 6978, 13, 33295, 7203, 492, 4943, 198, 6738, 3384, 4487, 1330, 3384, 4487, 11, 9109, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 11, 367, 29281, 18453, 198, 6738, 42625, 14208, 13, 3357...
3.766667
90
from pytest_kind import KindCluster from kluctl.e2e.conftest import recreate_namespace from kluctl.e2e.kluctl_test_project import KluctlTestProject from kluctl.e2e.kluctl_test_project_helpers import add_configmap_deployment from kluctl.utils.dict_utils import get_dict_value from kluctl.utils.yaml_utils import yaml_loa...
[ 6738, 12972, 9288, 62, 11031, 1330, 14927, 2601, 5819, 198, 198, 6738, 479, 2290, 34168, 13, 68, 17, 68, 13, 1102, 701, 395, 1330, 32049, 62, 14933, 10223, 198, 6738, 479, 2290, 34168, 13, 68, 17, 68, 13, 74, 2290, 34168, 62, 9288, ...
2.833333
114
from .base import * # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True ALLOWED_HOSTS = ('*',) CSRF_COOKIE_SECURE = False SESSION_COOKIE_SECURE = False INTERNAL_IPS = ('127.0.0.1',) # Email settings for Mailhog. # These need to match the settings in docker-compose.yml. # EMAIL_BACKEND =...
[ 6738, 764, 8692, 1330, 1635, 198, 198, 2, 10729, 4261, 9050, 39410, 25, 836, 470, 1057, 351, 14257, 2900, 319, 287, 3227, 0, 198, 30531, 796, 6407, 198, 198, 7036, 3913, 1961, 62, 39, 10892, 50, 796, 19203, 9, 3256, 8, 198, 198, 7...
2.560241
166
import os import win32com.client as client text = """ This sample document is generated by WdBibTeX. Some text with dummy citation \\cite{enArticle1} will be converted \ to [1] by executing wdbibtex. The list of bibliography is placed to the thebibliography command as follows: \\thebibliography """ ap = client.Dis...
[ 11748, 28686, 198, 11748, 1592, 2624, 785, 13, 16366, 355, 5456, 198, 198, 5239, 796, 37227, 198, 1212, 6291, 3188, 318, 7560, 416, 370, 36077, 571, 49568, 13, 198, 198, 4366, 2420, 351, 31548, 27860, 26867, 66, 578, 90, 268, 14906, 1...
2.805907
237
# Generated by Django 3.0.6 on 2020-06-16 13:03 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 21, 319, 12131, 12, 3312, 12, 1433, 1511, 25, 3070, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
# -*- coding: utf-8 -*- # (c) Copyright IBM Corp. 2018. All Rights Reserved. # pragma pylint: disable=unused-argument, no-self-use """Function implementation""" import logging from fn_geocoding.util.request_common import execute_call log = logging.getLogger(__name__) log.setLevel(logging.INFO) log.addHandler(logging....
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 357, 66, 8, 15069, 19764, 11421, 13, 2864, 13, 1439, 6923, 33876, 13, 198, 2, 23864, 2611, 279, 2645, 600, 25, 15560, 28, 403, 1484, 12, 49140, 11, 645, 12, 944, ...
2.333333
396
from .lib import eth_wallet
[ 6738, 764, 8019, 1330, 220, 4555, 62, 44623, 201, 198 ]
3
10
from unittest import skip from unittest.mock import Mock, patch from django.core import mail from django.urls import reverse from django.test import TestCase from guardian.shortcuts import assign_perm, get_user_perms from django.db.models import Count from feder.cases.factories import CaseFactory from feder.cases.mode...
[ 6738, 555, 715, 395, 1330, 14267, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 44123, 11, 8529, 198, 198, 6738, 42625, 14208, 13, 7295, 1330, 6920, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 198, 6738, 42625, 14208, 13, 9288, ...
3.458115
382
from test_in_prod import track_class @track_class(thorough=True) class HelperClass(object): ''' def another_func(self, str_val): return str_val '''
[ 6738, 1332, 62, 259, 62, 1676, 67, 1330, 2610, 62, 4871, 198, 198, 31, 11659, 62, 4871, 7, 400, 7985, 28, 17821, 8, 198, 4871, 5053, 525, 9487, 7, 15252, 2599, 628, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 825, 1194, 62, 20...
2.394366
71
import numpy as np import pandas as pd from tqdm import tqdm def get_percentiles(x, n_percentiles=5): """ Utility function to divide a particular variable up into percentiles. """ return pd.qcut(x, q=n_percentiles, retbins=False, labels=False) def reduce_repeats(X, y, categorical=False, use_index=Fa...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 628, 198, 4299, 651, 62, 25067, 2915, 7, 87, 11, 299, 62, 25067, 2915, 28, 20, 2599, 198, 220, 220, 220, 37227, ...
2.45954
2,002
# Copyright (c) 2010 The Native Client Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import sys import naclimc if __name__ == "__main__": Main(sys.argv[1:])
[ 2, 15069, 357, 66, 8, 3050, 383, 12547, 20985, 46665, 13, 1439, 2489, 10395, 13, 198, 2, 5765, 286, 428, 2723, 2438, 318, 21825, 416, 257, 347, 10305, 12, 7635, 5964, 326, 460, 307, 198, 2, 1043, 287, 262, 38559, 24290, 2393, 13, ...
3.125
80
"""Input uuid handler.""" import re from typing import Optional from InquirerPy import inquirer # type: ignore from redbrick.cli.cli_base import CLIInputParams class CLIInputUUID(CLIInputParams): """Input uuid handler.""" def __init__(self, entity: Optional[str], name: str) -> None: """Init handle...
[ 37811, 20560, 334, 27112, 21360, 526, 15931, 198, 11748, 302, 198, 6738, 19720, 1330, 32233, 198, 198, 6738, 17193, 557, 81, 20519, 1330, 38212, 81, 220, 1303, 2099, 25, 8856, 198, 198, 6738, 2266, 1671, 624, 13, 44506, 13, 44506, 62, ...
2.178082
584
__copyright__ = "Copyright (c) 2021 Jina AI Limited. All rights reserved." __license__ = "Apache-2.0" import subprocess import numpy as np import pytest from jina import Document, DocumentArray, Flow from simpleranker import SimpleRanker @pytest.mark.docker
[ 834, 22163, 4766, 834, 796, 366, 15269, 357, 66, 8, 33448, 449, 1437, 9552, 15302, 13, 1439, 2489, 10395, 526, 198, 834, 43085, 834, 796, 366, 25189, 4891, 12, 17, 13, 15, 1, 198, 198, 11748, 850, 14681, 198, 198, 11748, 299, 32152,...
3.2875
80
# coding=utf-8 # coding=utf-8 # Copyright 2019 The RecSim Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 13130, 383, 3311, 8890, 46665, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 7...
3.51938
258
from distutils.core import setup setup( name = 'steamprofile', packages = ['steamprofile'], version = '0.1.2', license='MIT', description = 'Gather Information about Profiles on Steam.', author = 'Aaron Levi Can (aaronlyy)', author_email = 'aaronlevican@gmail.com', url = 'https://github.com/aaronlyy/...
[ 220, 220, 198, 6738, 1233, 26791, 13, 7295, 1330, 9058, 198, 40406, 7, 198, 220, 1438, 796, 705, 4169, 696, 305, 7753, 3256, 198, 220, 10392, 796, 37250, 4169, 696, 305, 7753, 6, 4357, 198, 220, 2196, 796, 705, 15, 13, 16, 13, 17,...
2.847411
367
#!coding=utf8 from __future__ import unicode_literals import datetime from dateutil.relativedelta import relativedelta from django.conf import settings from django.template.loader import render_to_string from django.utils import timezone from django_datajsonar.models import Catalog, Node, Distribution from series_tie...
[ 2, 0, 66, 7656, 28, 40477, 23, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 11748, 4818, 8079, 198, 198, 6738, 3128, 22602, 13, 2411, 265, 1572, 12514, 1330, 48993, 1572, 12514, 198, 6738, 42625, 14208, 13, 10...
3.238095
273
from .actor_critics import ActorCritic from .actor_critics import ActorCriticWithTargets from .actor_critics import ActorTwinCriticWithTargets from .actors import Actor from .actors import DetachedScaleGaussianPolicyHead from .actors import DeterministicPolicyHead from .actors import GaussianPolicyHead from .actors im...
[ 6738, 764, 11218, 62, 22213, 873, 1330, 27274, 18559, 291, 198, 6738, 764, 11218, 62, 22213, 873, 1330, 27274, 18559, 291, 3152, 51, 853, 1039, 198, 6738, 764, 11218, 62, 22213, 873, 1330, 27274, 5080, 259, 18559, 291, 3152, 51, 853, ...
3.344262
244
""" Tests to be run against production servers and APIs to make sure nothing broke in production. """
[ 37811, 198, 198, 51, 3558, 284, 307, 1057, 1028, 3227, 9597, 290, 23113, 284, 787, 1654, 2147, 6265, 287, 3227, 13, 198, 198, 37811, 198 ]
4.16
25
""" Nearest neighbor accuracy. """ import os import torch import numpy as np from tqdm import tqdm from copy import deepcopy from dotmap import DotMap from src.utils import utils from torchvision import transforms import torch.nn.functional as F from torch.utils.data import DataLoader from src.systems.simclr import Sim...
[ 37811, 198, 8199, 12423, 4780, 9922, 13, 198, 37811, 198, 11748, 28686, 198, 11748, 28034, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 6738, 4866, 1330, 2769, 30073, 198, 6738, 16605, 8899, ...
2.963255
381
from cached_property import cached_property from ..data import panda_urdfpath from ..model import RobotModel from .urdf import RobotModelFromURDF class Panda(RobotModelFromURDF): """Panda Robot Model. https://frankaemika.github.io/docs/control_parameters.html """ @cached_property @cached_prop...
[ 6738, 39986, 62, 26745, 1330, 39986, 62, 26745, 198, 198, 6738, 11485, 7890, 1330, 279, 5282, 62, 2799, 69, 6978, 198, 6738, 11485, 19849, 1330, 16071, 17633, 198, 6738, 764, 2799, 69, 1330, 16071, 17633, 4863, 4261, 8068, 628, 198, 487...
3.037383
107
"""This module contains the general information for ChassisPowerMonitor ManagedObject.""" from ...imcmo import ManagedObject from ...imccoremeta import MoPropertyMeta, MoMeta from ...imcmeta import VersionMeta class ChassisPowerMonitor(ManagedObject): """This is ChassisPowerMonitor class.""" consts = Chass...
[ 37811, 1212, 8265, 4909, 262, 2276, 1321, 329, 609, 20297, 13434, 35479, 1869, 1886, 10267, 526, 15931, 198, 198, 6738, 2644, 320, 66, 5908, 1330, 1869, 1886, 10267, 198, 6738, 2644, 320, 535, 382, 28961, 1330, 4270, 21746, 48526, 11, 4...
2.519467
976
""" Word Ladder Given two words beginWord and endWord, and a dictionary wordList, return the length of the shortest transformation sequence from beginWord to endWord, such that: Only one letter can be changed at a time. Each transformed word must exist in the word list. Return 0 if there is no such transform...
[ 37811, 198, 26449, 12862, 1082, 198, 198, 15056, 734, 2456, 2221, 26449, 290, 886, 26449, 11, 290, 257, 22155, 1573, 8053, 11, 1441, 262, 4129, 286, 262, 35581, 13389, 8379, 422, 2221, 26449, 284, 886, 26449, 11, 884, 326, 25, 628, 22...
3.214092
369
""" Trolls are attacking your comment section! A common way to deal with this situation is to remove all of the vowels from the trolls' comments, neutralizing the threat. Your task is to write a function that takes a string and return a new string with all vowels removed. For example, the string "This website is for...
[ 37811, 198, 51, 2487, 82, 389, 9274, 534, 2912, 2665, 0, 198, 198, 32, 2219, 835, 284, 1730, 351, 428, 3074, 318, 284, 4781, 477, 286, 262, 23268, 1424, 422, 262, 24727, 6, 3651, 11, 198, 29797, 2890, 262, 2372, 13, 198, 198, 7120...
3.511278
133
#! coding: utf-8 from django.db import migrations
[ 2, 0, 19617, 25, 3384, 69, 12, 23, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.833333
18
import arrow import discord from apollo import emojis as emoji from apollo.constants import EMBED_COLOR from apollo.translate import t
[ 11748, 15452, 198, 11748, 36446, 198, 198, 6738, 2471, 15578, 1330, 795, 13210, 271, 355, 44805, 198, 6738, 2471, 15578, 13, 9979, 1187, 1330, 412, 10744, 1961, 62, 46786, 198, 6738, 2471, 15578, 13, 7645, 17660, 1330, 256, 628 ]
3.512821
39
# Copyright (c) 2010 - 2020, Nordic Semiconductor ASA # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this # list o...
[ 2, 15069, 357, 66, 8, 3050, 532, 12131, 11, 35834, 311, 5314, 40990, 49599, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 2297, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, 11, 351, 393, 1231, 198, 2, 17613, 11, 389, 10431, ...
3.407186
501
import datetime from common.variables import * from sqlalchemy import create_engine, Table, Column, Integer, String, Text, MetaData, DateTime from sqlalchemy.orm import mapper, sessionmaker import os class ClientDatabase: ''' Класс - оболочка для работы с базой данных клиента. Использует SQLite базу данн...
[ 11748, 4818, 8079, 198, 6738, 2219, 13, 25641, 2977, 1330, 1635, 198, 6738, 44161, 282, 26599, 1330, 2251, 62, 18392, 11, 8655, 11, 29201, 11, 34142, 11, 10903, 11, 8255, 11, 30277, 6601, 11, 7536, 7575, 198, 6738, 44161, 282, 26599, ...
1.633929
2,464
# coding : utf-8 # created by wyj import pandas as pd # TERMINALNO, TIME, TRIP_ID, LONGITUDE, LATITUDE, DIRECTION, HEIGHT, SPEED, CALLSTATE, Y
[ 2, 19617, 1058, 3384, 69, 12, 23, 198, 2, 2727, 416, 266, 88, 73, 198, 11748, 19798, 292, 355, 279, 67, 628, 198, 2, 28994, 44, 17961, 15285, 11, 20460, 11, 7579, 4061, 62, 2389, 11, 44533, 2043, 52, 7206, 11, 42355, 2043, 52, 7...
2.416667
60
import sys import os import re import binascii #Adding directory to the path where Python searches for modules cmd_folder = os.path.dirname('/home/arvind/Documents/Me/My_Projects/Git/Crypto/modules/') sys.path.insert(0, cmd_folder) #Importing common crypto module import block if __name__ == "__main__": userdata= ...
[ 11748, 25064, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 9874, 292, 979, 72, 198, 2, 32901, 8619, 284, 262, 3108, 810, 11361, 15455, 329, 13103, 198, 28758, 62, 43551, 796, 28686, 13, 6978, 13, 15908, 3672, 10786, 14, 11195, 14, ...
2.005814
1,032
""" Module Docstring Docstrings: http://www.python.org/dev/peps/pep-0257/ """ __author__ = 'Yannic Schneider (v@vendetta.ch)' __copyright__ = 'Copyright (c) 20xx Yannic Schneider' __license__ = 'WTFPL' __vcs_id__ = '$Id$' __version__ = '0.1' #Versioning: http://www.python.org/dev/peps/pep-0386/ # ## Code goes here. #...
[ 37811, 198, 26796, 14432, 8841, 198, 23579, 37336, 25, 2638, 1378, 2503, 13, 29412, 13, 2398, 14, 7959, 14, 431, 862, 14, 431, 79, 12, 15, 28676, 14, 198, 37811, 198, 198, 834, 9800, 834, 796, 705, 56, 1236, 291, 26039, 357, 85, 3...
2.216383
647
# # @lc app=leetcode id=725 lang=python3 # # [725] Split Linked List in Parts # # Definition for singly-linked list. # class ListNode: # def __init__(self, x): # self.val = x # self.next = None from typing import List from LeetCode.Python.BaseListNode import MakeListNodes, PrintListNode, ListNode ...
[ 2, 198, 2, 2488, 44601, 598, 28, 293, 316, 8189, 4686, 28, 45151, 42392, 28, 29412, 18, 198, 2, 198, 2, 685, 45151, 60, 27758, 7502, 276, 7343, 287, 22349, 198, 2, 198, 2, 30396, 329, 1702, 306, 12, 25614, 1351, 13, 198, 2, 1398...
2.479167
192
__all__ = ['show_research_popup', 'show_research_popup_once'] HEADER = _('Keep Digsby Free') MINOR = _("Digsby will use your computer's free time using it to conduct both free and paid research.")
[ 834, 439, 834, 796, 37250, 12860, 62, 34033, 62, 12924, 929, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 12860, 62, 34033, 62, 12924, 929, 62, 27078, 20520, 198, 198, 37682, 1137, 796, 4808, 10786, 15597, 7367, ...
2.876712
73
''' github.com/uxai/gridlock Thanks for your interest in GRIDLOCK I plan to do slow improvements here and there on methods, or enabling files in the near future. If you have suggestions or improvements, let me know! I'm new to Python so I'm still learning ^^; TABLE OF CONTENTS ----------------------------------------...
[ 7061, 6, 198, 12567, 13, 785, 14, 2821, 1872, 14, 25928, 5354, 198, 198, 9690, 329, 534, 1393, 287, 10863, 2389, 36840, 198, 40, 1410, 284, 466, 3105, 8561, 994, 290, 612, 319, 5050, 11, 393, 15882, 3696, 287, 262, 1474, 2003, 13, ...
2.590071
705
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
[ 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 220, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 921, 743, 7330, 198, 2, 220, 220, ...
3.459459
185