content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
from django import forms
[ 6738, 42625, 14208, 1330, 5107, 220 ]
4.166667
6
import pytest pytest.importorskip("sodasql")
[ 11748, 12972, 9288, 198, 198, 9078, 9288, 13, 11748, 669, 74, 541, 7203, 82, 375, 292, 13976, 4943, 198 ]
2.421053
19
from py_adventure import PointOfInterest from py_adventure import ZoneConnection from py_adventure import City, Zone, Location, Building from py_adventure import Region from typing import Dict, List barrel : PointOfInterest = PointOfInterest("Barrel") gate : Location = Location("City Gate") inn : Location = Buildi...
[ 6738, 12972, 62, 324, 5388, 1330, 6252, 5189, 19302, 198, 6738, 12972, 62, 324, 5388, 1330, 13035, 32048, 198, 6738, 12972, 62, 324, 5388, 1330, 2254, 11, 13035, 11, 13397, 11, 11819, 198, 6738, 12972, 62, 324, 5388, 1330, 17718, 198, ...
3.1917
506
# -*- coding: utf-8 -*- __author__ = "Filip Koprivec" from helper import get_file DAY = 8 HEIGHT = 6 WIDTH = 50 data = [line.strip() for line in get_file(DAY)] print(part1(data)) print(part2(data))
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 834, 9800, 834, 796, 366, 11928, 541, 40500, 11590, 66, 1, 198, 198, 6738, 31904, 1330, 651, 62, 7753, 198, 198, 26442, 796, 807, 198, 198, 13909, 9947, 796, 718,...
2.348315
89
#!/usr/bin/env python # from operator import itemgetter import sys last_group = None current_count = 1 # input comes from STDIN for line in sys.stdin: # Remove trailing '\n' line = line.strip() # Extract (key,value) vs = line.split('\t') # print vs[0] current_group = vs[0].strip() if last...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 422, 10088, 1330, 2378, 1136, 353, 198, 11748, 25064, 198, 198, 12957, 62, 8094, 796, 6045, 198, 14421, 62, 9127, 796, 352, 198, 198, 2, 5128, 2058, 422, 48571, 1268, 198, 16...
2.440816
245
from __future__ import annotations import rich from rich.align import Align from rich.style import Style, StyleType from textual.widget import Reactive, Widget
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 11748, 5527, 198, 6738, 5527, 13, 31494, 1330, 978, 570, 198, 6738, 5527, 13, 7635, 1330, 17738, 11, 17738, 6030, 198, 198, 6738, 40577, 13, 42655, 1330, 797, 5275, 11, 370, 17484, 628 ]
3.97561
41
""" Author: Anastassios Dardas, PhD - Higher Education Specialist at the Education & Research at Esri Canada. Date: Re-modified Q1 - 2022 About: """ from pandas import DataFrame from ..util import TimeDelta, SpatialDelta
[ 37811, 201, 198, 13838, 25, 1052, 459, 562, 4267, 360, 446, 292, 11, 16394, 532, 16038, 7868, 36816, 379, 262, 7868, 1222, 4992, 379, 8678, 380, 3340, 13, 201, 198, 10430, 25, 797, 12, 41771, 1195, 16, 532, 33160, 201, 198, 201, 198...
3.191781
73
"""This module provides functions used to generate and load probe files.""" # ----------------------------------------------------------------------------- # Imports # ----------------------------------------------------------------------------- import os import pprint import itertools from tools import MemMappedText...
[ 37811, 1212, 8265, 3769, 5499, 973, 284, 7716, 290, 3440, 12774, 3696, 526, 15931, 198, 198, 2, 16529, 32501, 198, 2, 1846, 3742, 198, 2, 16529, 32501, 198, 11748, 28686, 198, 11748, 279, 4798, 198, 11748, 340, 861, 10141, 198, 198, 6...
2.469935
1,081
import numpy as np
[ 11748, 299, 32152, 355, 45941, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198 ]
1.684211
19
"""The tests for the mFi sensor platform.""" import unittest.mock as mock from mficlient.client import FailedToLogin import pytest import requests import homeassistant.components.mfi.sensor as mfi import homeassistant.components.sensor as sensor_component from homeassistant.const import DEVICE_CLASS_TEMPERATURE, TEMP...
[ 37811, 464, 5254, 329, 262, 285, 10547, 12694, 3859, 526, 15931, 198, 11748, 555, 715, 395, 13, 76, 735, 355, 15290, 198, 198, 6738, 285, 69, 291, 75, 1153, 13, 16366, 1330, 22738, 2514, 47790, 198, 11748, 12972, 9288, 198, 11748, 700...
2.482463
2,680
# -*- coding: utf-8 -*- # Copyright 2019 Red Hat # GNU General Public License v3.0+ # (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """ The eos_lacp_interfaces class It is in this file where the current configuration (as dict) is compared to the provided configuration (as dict) and the command set necessary...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 13130, 2297, 10983, 198, 2, 22961, 3611, 5094, 13789, 410, 18, 13, 15, 10, 198, 2, 357, 3826, 27975, 45761, 393, 3740, 1378, 2503, 13, 41791, 13, 2398, 14, ...
2.394131
2,692
import os import sys import threading import tkinter as tk os.chdir(os.getcwd()) self = tk.Tk() self.title("meet") self.resizable(0, 0) self.grid() ch_time = tk.Button(self, text="CHANGE SCHEDULE", command=exc) ch_time.grid(row=0, column=0, sticky="nswe") ch_link = tk.Button(self, text="CHA...
[ 11748, 28686, 201, 198, 11748, 25064, 201, 198, 11748, 4704, 278, 201, 198, 11748, 256, 74, 3849, 355, 256, 74, 201, 198, 201, 198, 418, 13, 354, 15908, 7, 418, 13, 1136, 66, 16993, 28955, 201, 198, 201, 198, 944, 796, 256, 74, 13...
2.29932
441
import contextlib import dataclasses import os import time from unittest import mock from outrun.filesystem.caching.service import LocalCacheService from outrun.filesystem.caching.cache import CacheEntry, RemoteCache
[ 11748, 4732, 8019, 198, 11748, 4818, 330, 28958, 198, 11748, 28686, 198, 11748, 640, 198, 6738, 555, 715, 395, 1330, 15290, 198, 198, 6738, 503, 5143, 13, 16624, 6781, 13, 66, 8103, 13, 15271, 1330, 10714, 30562, 16177, 198, 6738, 503, ...
3.640625
64
default_app_config = 'apps.markets3.apps.Markets3Config'
[ 12286, 62, 1324, 62, 11250, 796, 705, 18211, 13, 34162, 18, 13, 18211, 13, 9704, 1039, 18, 16934, 6, 198 ]
2.85
20
#!/usr/bin/env python import os import codecs import re import sys # Borrowed from rosunit ## unit test suites are not good about screening out illegal ## unicode characters. This little recipe I from http://boodebr.org/main/python/all-about-python-and-unicode#UNI_XML ## screens these out RE_XML_ILLEGAL = u'([\u0000...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 28686, 198, 11748, 40481, 82, 198, 11748, 302, 198, 11748, 25064, 198, 198, 2, 347, 6254, 276, 422, 686, 19155, 270, 198, 198, 2235, 4326, 1332, 45861, 389, 407, 922, 546, ...
1.892667
941
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import from .config import RiveScriptTestCase class MessageFormatTests(RiveScriptTestCase): """Test format message."""
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 11, 4112, 62, 11748, 198, 198, 6738, 764, 11250, 1330,...
3
74
#Some configuration parameters from datetime import timedelta host = "mail.messagingengine.com" port = 465 email = "*********@fastmail.com" password = "password" touchfile = "/home/henfredemars/.bashrc" time_to_wait = timedelta(14) check_period = timedelta(0,0,0,0,30) min_sane_year = 2016 max_sane_year = 3016
[ 2, 4366, 8398, 10007, 198, 198, 6738, 4818, 8079, 1330, 28805, 12514, 198, 198, 4774, 796, 366, 4529, 13, 37348, 3039, 18392, 13, 785, 1, 198, 634, 796, 49669, 198, 12888, 796, 366, 4557, 9, 31, 7217, 4529, 13, 785, 1, 198, 28712, ...
2.794643
112
# -*- coding: utf-8 -*- # %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% # # Copyright (c) 2019 Image Processing Research Group of University Federico II of Naples ('GRIP-UNINA'). # All rights reserved. # This work should only be used for nonprofit purposes. # # By downloading and/or using an...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 4064, 36917, 36917, 36917, 36917, 36917, 36917, 36917, 36917, 36917, 36917, 36917, 36917, 36917, 36917, 36917, 36917, 36917, 36917, 198, 2, 198, 2, 15069, 357, 66, 8, 1...
3.368932
206
# -*- coding: utf-8 -*- """ Created on Mon Apr 1 14:39:33 2019 @author: jone """ #%% Gaussian Pyramids import cv2 img = cv2.imread('img/monkey.tiff') lower_reso = cv2.pyrDown(img) # 원본 이미지의 1/4 사이즈 higher_reso = cv2.pyrUp(img) # 원본 이미지의 4배 사이즈 cv2.imshow('img', img) cv2.imshow('lower', lower_reso) cv2.imshow...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 2892, 2758, 220, 352, 1478, 25, 2670, 25, 2091, 13130, 198, 198, 31, 9800, 25, 474, 505, 198, 37811, 198, 198, 2, 16626, 12822, 31562, 9485, 43...
1.473976
1,441
# Generated by Django 2.1.2 on 2019-01-17 02:37 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 16, 13, 17, 319, 13130, 12, 486, 12, 1558, 7816, 25, 2718, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
n = int(input('digite um número:')) print('O antecessor do número {} é {}, e o sucessor é {}!'.format(n, n-1, n+1))
[ 77, 796, 493, 7, 15414, 10786, 12894, 578, 23781, 299, 21356, 647, 78, 32105, 4008, 198, 4798, 10786, 46, 29692, 919, 273, 466, 299, 21356, 647, 78, 23884, 38251, 1391, 5512, 304, 267, 424, 919, 273, 38251, 23884, 0, 4458, 18982, 7, ...
2.166667
54
import os from fdfgen import forge_fdf
[ 11748, 28686, 198, 6738, 277, 7568, 5235, 1330, 28325, 62, 69, 7568, 628 ]
3.076923
13
# # This is the beginning of Eddie's Extra file for the Final Capstone Project # The idea behind this design is to make an accurate representation of a Rose-Hulman Student # # The rosebot import was added in order for me to use the dot trick import rosebot import time # def beep_proxy(robot, initial, delta, speed)...
[ 2, 198, 2, 770, 318, 262, 3726, 286, 19478, 338, 17221, 2393, 329, 262, 8125, 220, 4476, 6440, 4935, 198, 2, 383, 2126, 2157, 428, 1486, 318, 284, 787, 281, 7187, 10552, 286, 257, 8049, 12, 39, 377, 805, 13613, 198, 2, 628, 198, ...
2.471471
999
# -*- encoding: utf-8 -*- import re import warnings from denorm import denormalized, depend_on_related from dirtyfields.dirtyfields import DirtyFieldsMixin from django.db import models from django.db.models import CASCADE, PROTECT from django.db.models.expressions import RawSQL from django.contrib.contenttypes.fields...
[ 2, 532, 9, 12, 21004, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 302, 198, 11748, 14601, 198, 198, 6738, 2853, 579, 1330, 2853, 6636, 1143, 11, 4745, 62, 261, 62, 5363, 198, 6738, 11841, 25747, 13, 49075, 25747, 1330, 32052, 15...
1.971237
3,581
from .base import * # noqa from .base import env # GENERAL SECRET_KEY = env( "DJANGO_SECRET_KEY", default="!!!SET DJANGO_SECRET_KEY!!!", ) TEST_RUNNER = "django.test.runner.DiscoverRunner"
[ 6738, 764, 8692, 1330, 1635, 220, 1303, 645, 20402, 198, 6738, 764, 8692, 1330, 17365, 198, 198, 2, 41877, 198, 23683, 26087, 62, 20373, 796, 17365, 7, 198, 220, 220, 220, 366, 35028, 1565, 11230, 62, 23683, 26087, 62, 20373, 1600, 19...
2.45679
81
#!/usr/bin/env python3 import attr, collections, datetime from common import file_in_this_dir NYU_PICKLE = file_in_this_dir("NYU.pickle") DAYS_OF_WEEK = ( "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday" ) def _deques_increasing_first(list_of_deques, greater_than...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 708, 81, 11, 17268, 11, 4818, 8079, 198, 6738, 2219, 1330, 2393, 62, 259, 62, 5661, 62, 15908, 198, 12805, 52, 62, 47, 11860, 2538, 796, 2393, 62, 259, 62, 5661, 62, 159...
2.23253
830
import json from http.client import HTTPResponse from typing import TextIO, Dict from urllib import request from platforms.cpp import as_cpp_enum from platforms.csharp import as_csharp_enum from platforms.java import as_java_enum from platforms.python import as_python_enum from platforms.typescript import as_typescrip...
[ 11748, 33918, 198, 6738, 2638, 13, 16366, 1330, 7154, 51, 4805, 9774, 2591, 198, 6738, 19720, 1330, 8255, 9399, 11, 360, 713, 198, 6738, 2956, 297, 571, 1330, 2581, 198, 198, 6738, 9554, 13, 20322, 1330, 355, 62, 20322, 62, 44709, 198...
3.069444
216
import os from copy import deepcopy import mne import torch from braindecode.torch_ext.util import np_to_var from mne.time_frequency import tfr_morlet from EEGNAS import global_vars import numpy as np from scipy.io import savemat from PIL import Image from EEGNAS.utilities.misc import create_folder, label_by_idx, uni...
[ 11748, 28686, 198, 6738, 4866, 1330, 2769, 30073, 198, 198, 11748, 285, 710, 198, 11748, 28034, 198, 6738, 3632, 12501, 1098, 13, 13165, 354, 62, 2302, 13, 22602, 1330, 45941, 62, 1462, 62, 7785, 198, 6738, 285, 710, 13, 2435, 62, 353...
2.315421
428
# License: BSD 3 clause import unittest import numpy as np from scipy.sparse import csr_matrix from tick.linear_model import SimuLogReg, ModelHinge from tick.base_model.tests.generalized_linear_model import TestGLM if __name__ == '__main__': unittest.main()
[ 2, 13789, 25, 347, 10305, 513, 13444, 198, 198, 11748, 555, 715, 395, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 13, 82, 29572, 1330, 269, 27891, 62, 6759, 8609, 198, 198, 6738, 4378, 13, 29127, 62, 19849, 133...
2.8125
96
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'ChannelVersionItem.ui' # # Created by: PyQt4 UI code generator 4.11.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except AttributeError: try: _e...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 5178, 7822, 7560, 422, 3555, 334, 72, 2393, 705, 29239, 14815, 7449, 13, 9019, 6, 198, 2, 198, 2, 15622, 416, 25, 9485, 48, 83, 19, 12454, 2438, 17301, 604, ...
2.714286
147
import subprocess import re import os from math import sqrt import sys # SETTINGS PROG = "./produce.out" # FOR TESTING: reduce this number when debugging X = 500 # number of times to repeat the test # This data structure holds the raw data for each test run times = [] DEBUG = True def call_produce(program, cmd_str...
[ 11748, 850, 14681, 198, 11748, 302, 198, 11748, 28686, 198, 6738, 10688, 1330, 19862, 17034, 198, 11748, 25064, 198, 198, 2, 25823, 51, 20754, 198, 4805, 7730, 796, 366, 19571, 18230, 344, 13, 448, 1, 198, 2, 7473, 43001, 2751, 25, 46...
2.011134
1,976
import requests import time from opentracing_instrumentation.client_hooks import install_all_patches from jaeger_client import Config from os import getenv JAEGER_HOST = getenv('JAEGER_HOST', 'localhost') WEBSERVER_HOST = getenv('WEBSERVER_HOST', 'localhost') # Create configuration object with enabled logging and sa...
[ 11748, 7007, 198, 11748, 640, 198, 6738, 1034, 298, 81, 4092, 62, 259, 43872, 341, 13, 16366, 62, 25480, 82, 1330, 2721, 62, 439, 62, 8071, 2052, 198, 6738, 474, 3609, 1362, 62, 16366, 1330, 17056, 198, 198, 6738, 28686, 1330, 651, ...
2.664789
355
from typing import Any, List
[ 6738, 19720, 1330, 4377, 11, 7343, 628 ]
4.285714
7
from selenium import webdriver from selenium.webdriver.common.keys import Keys import pyautogui import time driver = webdriver.Chrome() driver.get('https://www.keybr.com/multiplayer') while True: ticker = driver.find_element_by_class_name('Ticker') if ticker.text == "GO!": break inp = driver.find_...
[ 6738, 384, 11925, 1505, 1330, 3992, 26230, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 11321, 13, 13083, 1330, 26363, 198, 198, 11748, 12972, 2306, 519, 9019, 198, 11748, 640, 198, 198, 26230, 796, 3992, 26230, 13, 1925, 5998, 34...
2.263844
307
from .compact_gauss import compact_gauss_scheme from .main_item_gauss import main_item_gauss_scheme __author__ = 'Nikita'
[ 6738, 764, 5589, 529, 62, 4908, 1046, 1330, 16001, 62, 4908, 1046, 62, 15952, 1326, 198, 6738, 764, 12417, 62, 9186, 62, 4908, 1046, 1330, 1388, 62, 9186, 62, 4908, 1046, 62, 15952, 1326, 198, 834, 9800, 834, 796, 705, 40979, 5350, ...
2.772727
44
import pandas as pd from sklearn.preprocessing import MinMaxScaler, StandardScaler from sklearn.base import TransformerMixin, BaseEstimator from flowcat.types import fcsdata as fcs from . import FCSDataMixin class FCSMinMaxScaler(FCSDataMixin, TransformerMixin, BaseEstimator): """MinMaxScaling with adaptations...
[ 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 1341, 35720, 13, 3866, 36948, 1330, 1855, 11518, 3351, 36213, 11, 8997, 3351, 36213, 198, 6738, 1341, 35720, 13, 8692, 1330, 3602, 16354, 35608, 259, 11, 7308, 22362, 320, 1352, 628, 198,...
2.516447
608
from setuptools import setup, find_packages setup(name='Golden Retriever', version='0.1', description='Information retrieval using fine-tuned semantic similarity', author='AI Singapore', packages=find_packages(), zip_safe=False)
[ 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 198, 40406, 7, 3672, 11639, 32378, 4990, 380, 964, 3256, 198, 220, 220, 220, 220, 220, 2196, 11639, 15, 13, 16, 3256, 198, 220, 220, 220, 220, 220, 6764, 11639, 21918, 4...
2.988506
87
#!/usr/bin/env python with open("../templates/header.html", "r") as header: print header.read() with open("../templates/navbar.html", "r") as navbar: print navbar.read() print(""" <div class="row"> <div class="col-xxs-6 col-xxs-offset-3 col-xs-4 col-sm-3 col-md-2 col-lg-1"> <img class="img-responsive" alt="kevin....
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 4480, 1280, 7203, 40720, 11498, 17041, 14, 25677, 13, 6494, 1600, 366, 81, 4943, 355, 13639, 25, 198, 197, 4798, 13639, 13, 961, 3419, 198, 4480, 1280, 7203, 40720, 11498, 17041, 14, 2...
2.417683
328
#!/usr/bin/env python3 import os import sys import pickle from functools import partial from string import ascii_lowercase import jax import torch sys.path.append('..') from ti_mps import TI_MPS samp_lens = [16, 30] # What lengths we want to sample at samp_size = 1000 # Numb...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 2298, 293, 198, 6738, 1257, 310, 10141, 1330, 13027, 198, 6738, 4731, 1330, 355, 979, 72, 62, 21037, 7442, 198, 198, 11748, 474, 897, 1...
2.038765
2,786
""" import numpy as np # line_no: 1 import gadget gadget.record('docs_training_py') x = np.arange(5) # line_no: 2 s = x[0] # line_no: 3 for i in x: # line_no: 4 if i % 2 == 0: # line_no: 5 s += i # line_no: 6 print('done') """ import gadget as ln wit...
[ 37811, 198, 11748, 299, 32152, 355, 45941, 220, 220, 220, 220, 220, 1303, 1627, 62, 3919, 25, 352, 198, 11748, 42892, 198, 198, 70, 324, 1136, 13, 22105, 10786, 31628, 62, 34409, 62, 9078, 11537, 198, 198, 87, 796, 45941, 13, 283, 8...
1.933735
498
# ... continued ... if action == 'start': gibson.start(user_instance['instance_id']) return _return_payload( message=start_message.format(user=who), color='green', ) elif action == 'stop': gibson.stop(user_instance['instance_id']) return _return_payload( message='stopping i...
[ 2, 2644, 3767, 2644, 198, 198, 361, 2223, 6624, 705, 9688, 10354, 198, 220, 220, 220, 46795, 1559, 13, 9688, 7, 7220, 62, 39098, 17816, 39098, 62, 312, 6, 12962, 198, 220, 220, 220, 1441, 4808, 7783, 62, 15577, 2220, 7, 198, 220, ...
2.45
220
import numpy as np from MPU9250 import MPU9250 from BMP280 import BMP280 m = MPU9250() b = BMP280() print(b.pressure(), 'Pa') avg_x_accel = lambda x: np.array([list(m.readAccel().values()) for _ in range(x)]).mean(axis=0) x = np.sum(avg_x_accel(10) - avg_x_accel(10)) print(x)
[ 11748, 299, 32152, 355, 45941, 198, 6738, 4904, 52, 5892, 1120, 1330, 4904, 52, 5892, 1120, 198, 6738, 347, 7378, 21033, 1330, 347, 7378, 21033, 198, 198, 76, 796, 4904, 52, 5892, 1120, 3419, 198, 198, 65, 796, 347, 7378, 21033, 3419,...
2.222222
126
""" This example shows how to capture point clouds, with color, from the Zivid camera. For scenes with high dynamic range we combine multiple acquisitions to get an HDR point cloud. This example shows how to fully configure settings for each acquisition. In general, capturing an HDR point cloud is a lot simpler than t...
[ 37811, 198, 1212, 1672, 2523, 703, 284, 8006, 966, 15114, 11, 351, 3124, 11, 422, 262, 1168, 1699, 4676, 13, 198, 198, 1890, 8188, 351, 1029, 8925, 2837, 356, 12082, 3294, 33683, 284, 651, 281, 33675, 966, 6279, 13, 770, 1672, 2523, ...
4.191304
115
# coding=utf-8 """ Class used for representing tTask of BPMN 2.0 graph """ import graph.classes.activities.activity_type as activity class Task(activity.Activity): """ Class used for representing tTask of BPMN 2.0 graph """ def __init__(self): """ Default constructor, initializes obje...
[ 2, 19617, 28, 40477, 12, 23, 198, 37811, 198, 9487, 973, 329, 10200, 256, 25714, 286, 347, 5868, 45, 362, 13, 15, 4823, 198, 37811, 198, 11748, 4823, 13, 37724, 13, 15791, 871, 13, 21797, 62, 4906, 355, 3842, 628, 198, 4871, 15941, ...
2.79021
143
# Problem 4 MIT Midterm # # Write a function called gcd # that calculates the greatest common divisor of two positive integers. # The gcd of two or more integers, when at least one of them is not zero, # is the largest positive integer that divides the numbers without a remainder. # 20 min until finished # One way is ...
[ 2, 20647, 604, 17168, 7215, 4354, 1303, 198, 2, 19430, 257, 2163, 1444, 308, 10210, 198, 2, 326, 43707, 262, 6000, 2219, 2659, 271, 273, 286, 734, 3967, 37014, 13, 198, 2, 383, 308, 10210, 286, 734, 393, 517, 37014, 11, 618, 379, ...
2.313779
1,466
# -*- coding: utf-8 -*- import os basedir = os.path.abspath(os.path.dirname(__file__)) SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(basedir, 'app.db') SQLALCHEMY_MIGRATE_REPO = os.path.join(basedir, 'db_repository') SQLALCHEMY_TRACK_MODIFICATIONS = False CSRF_ENABLED = True SECRET_KEY = 'ochen-secre...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 11748, 28686, 201, 198, 201, 198, 201, 198, 3106, 343, 796, 28686, 13, 6978, 13, 397, 2777, 776, 7, 418, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 4008, 201...
2.0875
160
""" 8.7 – Álbum: Escreva uma função chamada make_album() que construa um dicionário descrevendo um álbum musical. A função deve aceitar o nome de um artista e o título de um álbum e deve devolver um dicionário contendo essas duas informações. Use a função para criar três dicionários que representem álbuns diferentes. A...
[ 37811, 198, 23, 13, 22, 784, 6184, 223, 75, 4435, 25, 16319, 260, 6862, 334, 2611, 1257, 16175, 28749, 442, 321, 4763, 787, 62, 40916, 3419, 8358, 1500, 622, 64, 23781, 198, 67, 47430, 6557, 27250, 1715, 18218, 31110, 23781, 6184, 94,...
2.545226
398
# This file is part of the faebryk project # SPDX-License-Identifier: MIT import csv import subprocess import re import logging logger = logging.getLogger("script") # Expects a csv file in the format: issue_number,title # Can be generated with gh issue list and some manual editing with open("issues.txt", 'r') as f...
[ 2, 770, 2393, 318, 636, 286, 262, 24685, 1765, 563, 74, 1628, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 17168, 628, 198, 11748, 269, 21370, 198, 11748, 850, 14681, 198, 11748, 302, 198, 11748, 18931, 198, 198, 6404, 1362, 7...
2.685714
280
#!/usr/bin/env python # -*- coding: utf-8 -*- # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, ...
2.66131
809
from nf_prefix_tree import PyPrefixTree t = PyPrefixTree() t.addSequence('ABCDE', 'key1') t.addSequence('ABCXY', 'key2') t.addSequence('ZYAPW', 'key3') t.show()
[ 6738, 299, 69, 62, 40290, 62, 21048, 1330, 9485, 36698, 844, 27660, 198, 198, 83, 796, 9485, 36698, 844, 27660, 3419, 198, 198, 83, 13, 2860, 44015, 594, 10786, 24694, 7206, 3256, 705, 2539, 16, 11537, 198, 83, 13, 2860, 44015, 594, ...
2.263889
72
import downloader import tkinter as tk from tkinter import filedialog import pathlib import os root = tk.Tk() app = Application(master=root) app.mainloop()
[ 11748, 4321, 263, 198, 11748, 256, 74, 3849, 355, 256, 74, 198, 6738, 256, 74, 3849, 1330, 5717, 498, 519, 198, 11748, 3108, 8019, 198, 11748, 28686, 628, 198, 198, 15763, 796, 256, 74, 13, 51, 74, 3419, 198, 1324, 796, 15678, 7, ...
2.944444
54
""" entry-point functions for the sample_pck module, as referenced in setup.cfg """ from .animals import Animal, create_jerry, create_tom
[ 37811, 198, 13000, 12, 4122, 5499, 329, 262, 6291, 62, 79, 694, 8265, 11, 355, 20717, 287, 9058, 13, 37581, 220, 198, 37811, 198, 198, 6738, 764, 11227, 874, 1330, 13792, 11, 2251, 62, 73, 6996, 11, 2251, 62, 39532 ]
3.475
40
from email.policy import default from time import timezone from django import forms from django.utils import timezone
[ 6738, 3053, 13, 30586, 1330, 4277, 198, 6738, 640, 1330, 640, 11340, 198, 6738, 42625, 14208, 1330, 5107, 198, 198, 6738, 42625, 14208, 13, 26791, 1330, 640, 11340, 198 ]
4.103448
29
################################################################################ # # # Script to run PyTorch CPU benchmarks # # ...
[ 29113, 29113, 14468, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220,...
1.839544
1,315
# -*- coding: utf-8 -*- from odoo import fields, models
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 16298, 2238, 1330, 7032, 11, 4981, 628 ]
2.521739
23
################################ ##Generated with a lot of love## ## with EasyPython ## ##Web site: easycoding.tn ## ################################ import RPi.GPIO as GPIO from http.server import BaseHTTPRequestHandler, HTTPServer GPIO.setmode(GPIO.BCM) GPIO.setup(26, GPIO.OUT) request = None server...
[ 29113, 198, 2235, 8645, 515, 351, 257, 1256, 286, 1842, 2235, 198, 2235, 220, 220, 220, 351, 220, 220, 16789, 37906, 220, 220, 220, 220, 220, 220, 22492, 198, 2235, 13908, 2524, 25, 2562, 66, 7656, 13, 34106, 220, 220, 220, 220, 224...
3.051282
156
#!/usr/bin/env python # -*- coding: utf-8 -*- import asyncio import json from collections import namedtuple import paho.mqtt.client as mqtt import time #sudo pip3 install paho-mqtt #sudo apt-get install -y mosquitto mosquitto-clients #sudo systemctl enable mosquitto.service MQTT_ERR_SUCCESS = 0 class RTapp: ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 30351, 952, 198, 11748, 33918, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 11748, 279, 17108, 13, 76, 80,...
3.090426
188
# encoding: utf-8 u''' Utility functions for I/O. ''' import sys import six _FILESYSTEM_ENCODING = str( sys.getfilesystemencoding() or sys.getdefaultencoding() ) def encode_path(p): u''' Convert a Unicode path string to a byte string. Intended to be used for encoding paths that are known to be ...
[ 2, 21004, 25, 3384, 69, 12, 23, 198, 198, 84, 7061, 6, 198, 18274, 879, 5499, 329, 314, 14, 46, 13, 198, 7061, 6, 198, 198, 11748, 25064, 198, 198, 11748, 2237, 198, 198, 62, 46700, 1546, 56, 25361, 62, 24181, 3727, 2751, 796, 9...
3.02253
577
from datetime import timedelta import airflow from airflow import DAG from airflow.operators.dummy_operator import DummyOperator args = { 'owner': 'Airflow', 'start_date': airflow.utils.dates.days_ago(9), } with DAG( dag_id='exercise4', default_args=args, schedule_interval=timedelta(hours...
[ 6738, 4818, 8079, 1330, 28805, 12514, 198, 198, 11748, 45771, 198, 6738, 45771, 1330, 360, 4760, 198, 6738, 45771, 13, 3575, 2024, 13, 67, 13513, 62, 46616, 1330, 360, 13513, 18843, 1352, 198, 198, 22046, 796, 1391, 198, 220, 220, 220, ...
2.137821
312
# create_btc_wallet.py # pywallet implementation from pywallet import wallet # Testing #print(w) #print("Seed Phrase: ", seed) #print("Private Key: ", priv_key) #print("Public Key: ", pub_key) #print("Address: ", address) cw = create_wallet() print(cw)
[ 2, 2251, 62, 18347, 66, 62, 44623, 13, 9078, 198, 2, 12972, 44623, 7822, 198, 198, 6738, 12972, 44623, 1330, 13008, 628, 198, 2, 23983, 198, 198, 2, 4798, 7, 86, 8, 198, 2, 4798, 7203, 50, 2308, 1380, 22789, 25, 33172, 9403, 8, ...
2.793478
92
import datetime as dt from fabric.api import env, local, task, lcd, settings import json import time from time import sleep from .heroku_utils import first_colour_database from .utils import repeat_run_local, FabricSupportException, wait_for_dyno_to_run # Global environment variables See documentation HEROKU_APP_NAME...
[ 11748, 4818, 8079, 355, 288, 83, 198, 6738, 9664, 13, 15042, 1330, 17365, 11, 1957, 11, 4876, 11, 300, 10210, 11, 6460, 198, 11748, 33918, 198, 11748, 640, 198, 6738, 640, 1330, 3993, 198, 198, 6738, 764, 11718, 23063, 62, 26791, 1330...
2.490712
4,791
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os import sys import argparse import gzip from xml.dom import minidom from concurrent.futures import ProcessPoolExecutor import multiprocessing from tqdm import tqdm import jsonlines from typing import List, Dict, Any import logging logger = logging.getLogger(os...
[ 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, 11748, 28686, 198, 11748, 25064, 198, 11748, 1822, 29572, 198, 11748, 308, 13344, 198, 6738, 35555, 13, 3438, ...
2.741176
170
# # @lc app=leetcode id=892 lang=python3 # # [892] Surface Area of 3D Shapes # # https://leetcode.com/problems/surface-area-of-3d-shapes/description/ # # algorithms # Easy (57.01%) # Likes: 209 # Dislikes: 270 # Total Accepted: 15.9K # Total Submissions: 27.5K # Testcase Example: '[[2]]' # # On a N * N grid, we ...
[ 2, 198, 2, 2488, 44601, 598, 28, 293, 316, 8189, 4686, 28, 4531, 17, 42392, 28, 29412, 18, 198, 2, 198, 2, 685, 4531, 17, 60, 20321, 9498, 286, 513, 35, 911, 7916, 198, 2, 198, 2, 3740, 1378, 293, 316, 8189, 13, 785, 14, 1676,...
1.898855
524
# coding=utf-8 # Copyright 2019 The TensorFlow Datasets 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 appl...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 13130, 383, 309, 22854, 37535, 16092, 292, 1039, 46665, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 77...
2.742145
2,005
import segmentation_models_pytorch as smp import shutil import torch from pathlib import Path from torch.utils.data import DataLoader from torch.utils.tensorboard import SummaryWriter from lib.dataset import DroneDeploySegmentationDataset as Dataset from lib.config import ( BATCH_SIZES, CONFIG_PATH, CRIT...
[ 11748, 10618, 341, 62, 27530, 62, 9078, 13165, 354, 355, 895, 79, 198, 11748, 4423, 346, 198, 11748, 28034, 198, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 6060, 17401, 198, 6738, 28034, 13, 26791, ...
2.304405
1,521
from .rcp import main main()
[ 6738, 764, 6015, 79, 1330, 1388, 198, 198, 12417, 3419 ]
2.9
10
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
[ 2, 15069, 13130, 3012, 11419, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, 743, 733...
3.095368
734
""" Tests for the Teams endpoint. """ import pytest @pytest.mark.vcr def test_teams(client): """Tests fetching of all teams """ teams = client.teams() team = teams.items[0] assert team.team_id == 199048 assert team.name == "Sample" assert team.created_at == "2019-12-25 13:50:00 (Etc/UTC)"...
[ 37811, 198, 51, 3558, 329, 262, 24690, 36123, 13, 198, 37811, 198, 198, 11748, 12972, 9288, 628, 198, 31, 9078, 9288, 13, 4102, 13, 85, 6098, 198, 4299, 1332, 62, 660, 4105, 7, 16366, 2599, 198, 220, 220, 220, 37227, 51, 3558, 21207...
2.593085
376
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Feb 25 09:44:15 2019 @author: dberke Code to define a class for a model fit to an absorption line. """ import matplotlib from matplotlib.gridspec import GridSpec import matplotlib.pyplot as plt import matplotlib.ticker as ticker import numpy as np fr...
[ 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, 41972, 319, 2892, 3158, 1679, 7769, 25, 2598, 25, 1314, 13130, 198, 198, 31, 9800, 25, 288, 527, 365,...
1.967978
10,680
import tensorflow as try: import numpy as np x_data = np.float32(np.random.rand(2,100)) y_data = np.dot([0.100,0.200],x_data) + 0.300 b = tf.Varible(tf.zerso([1])) W = tf.Varible(tf.random_uniform([1,2],-1.0,1.0)) y = tf.matmul(W,x_data) + b
[ 11748, 11192, 273, 11125, 355, 1949, 25, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 87, 62, 7890, 796, 45941, 13, 22468, 2624, 7, 37659, 13, 25120, 13, 25192, 7, 17, 11, 3064, 4008, 201, 198, 88, 62, 7890, 796, 45941, 13, ...
1.96063
127
# ======================================================================== # # # Copyright (c) 2017 - 2020 scVAE 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.apac...
[ 2, 38093, 1421, 18604, 1303, 198, 2, 198, 2, 15069, 357, 66, 8, 2177, 532, 12131, 629, 11731, 36, 7035, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, ...
3.944206
233
""" API.ai Agent This module provides a Agent class to be used within an Assistant class implementation to be able to interact with the user through the agent """ from . import utils from . import parser from . import widgets Status = utils.enum( 'OK', 'GenericError', 'InvalidData', 'NotImplemented', '...
[ 37811, 7824, 13, 1872, 15906, 198, 198, 1212, 8265, 3769, 257, 15906, 1398, 284, 307, 973, 1626, 281, 15286, 1398, 198, 320, 32851, 284, 307, 1498, 284, 9427, 351, 262, 2836, 832, 262, 5797, 37227, 628, 198, 6738, 764, 1330, 3384, 448...
2.474444
1,800
from django.db import IntegrityError from django.test import TestCase from .models import Profile, User class UserTest(TestCase): """ Test module for Puppy model """
[ 6738, 42625, 14208, 13, 9945, 1330, 39348, 12331, 198, 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 764, 27530, 1330, 13118, 11, 11787, 628, 198, 4871, 11787, 14402, 7, 14402, 20448, 2599, 198, 220, 220, 220, 37227, 6208, ...
3.659574
47
from __future__ import annotations from typing import TYPE_CHECKING import dearpygui.core as dpgcore from dearpygui_obj import _register_item_type, wrap_callback from dearpygui_obj.wrapper.widget import Widget, ItemWidget, ConfigProperty if TYPE_CHECKING: from typing import Optional, Tuple, Callable from dea...
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 6738, 19720, 1330, 41876, 62, 50084, 2751, 198, 198, 11748, 390, 5117, 88, 48317, 13, 7295, 355, 288, 6024, 7295, 198, 6738, 390, 5117, 88, 48317, 62, 26801, 1330, 4808, 30238, 62, 9186, ...
2.693783
1,512
# Copyright 2019 The TensorFlow 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 applica...
[ 2, 15069, 13130, 383, 309, 22854, 37535, 46665, 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, 11846,...
3.244505
1,092
import collections import json import os import sys import hashlib import logging from .utils import cached_property, get_resource from .graphics import Image class SettingsDict(collections.MutableMapping): ''' Represents the tingapp.settings dict-like object. The settings are loaded from three files in...
[ 11748, 17268, 198, 11748, 33918, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 12234, 8019, 198, 11748, 18931, 198, 6738, 764, 26791, 1330, 39986, 62, 26745, 11, 651, 62, 31092, 198, 6738, 764, 70, 11549, 1330, 7412, 628, 198, 198, ...
3.109848
264
# Algorithm to draw a straight line using Bresenham's algorithm # works only foor lines having inclination <= 45 degree from graphics import * import time import ctypes user32 = ctypes.windll.user32 scrnWidth, scrnHeight= (user32.GetSystemMetrics(0)-100), (user32.GetSystemMetrics(1)-100) print("Straight line d...
[ 2, 978, 42289, 284, 3197, 257, 3892, 1627, 1262, 347, 411, 268, 2763, 338, 11862, 201, 198, 2, 2499, 691, 277, 2675, 3951, 1719, 36793, 19841, 4153, 4922, 201, 198, 6738, 9382, 1330, 1635, 201, 198, 11748, 640, 201, 198, 11748, 269, ...
2.296137
699
import unittest import pandas as pd import numpy as np import src.features.outlier_correction as oc
[ 11748, 555, 715, 395, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 12351, 13, 40890, 13, 448, 2505, 62, 10215, 8243, 355, 267, 66 ]
3.193548
31
############################################################################### # Copyright (c) 2013-2022 Contributors to the Eclipse Foundation # # See the NOTICE file distributed with this work for additional # information regarding copyright ownership. # All rights reserved. This program and the accompanying m...
[ 29113, 29113, 7804, 4242, 21017, 198, 2, 15069, 357, 66, 8, 2211, 12, 1238, 1828, 25767, 669, 284, 262, 30991, 5693, 198, 2, 220, 220, 220, 198, 2, 220, 4091, 262, 28536, 2393, 9387, 351, 428, 670, 329, 3224, 198, 2, 220, 1321, 51...
4.942623
122
import torch import numpy as np import torch.optim as optim from torch.nn import NLLLoss from torch.utils.data import DataLoader from torch.utils.data.sampler import RandomSampler from torch.nn.utils import clip_grad_norm from torchvision.datasets import CIFAR10 from torchvision.transforms import transforms from src.mo...
[ 11748, 28034, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 13, 40085, 355, 6436, 198, 6738, 28034, 13, 20471, 1330, 399, 3069, 43, 793, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 6060, 17401, 198, 6738, 28034, 13, 26791, 13,...
3.587629
97
# ASCIITableToPDF.py # Author: Vasudev Ram - http://www.dancingbison.com # Demo program to show how to generate an ASCII table as PDF, # using the xtopdf toolkit for PDF creation from Python. # Generates a PDF file with information about the # first 32 ASCII codes, i.e. the control characters. # Based on the ASCII Cod...
[ 2, 25400, 40, 2043, 540, 2514, 20456, 13, 9078, 198, 2, 6434, 25, 23663, 463, 1990, 7431, 532, 2638, 1378, 2503, 13, 67, 5077, 65, 1653, 13, 785, 198, 2, 34588, 1430, 284, 905, 703, 284, 7716, 281, 37101, 3084, 355, 12960, 11, 198...
2.014541
1,788
"""This is game module It helps control game status and contains some helper functions """ import pygame import brick from constants import * import random import time # pygame will search the system for font with similar name fontName = pygame.font.match_font('arial') def initSound(): """load various sound e...
[ 37811, 1212, 318, 983, 8265, 198, 198, 1026, 5419, 1630, 983, 3722, 290, 4909, 617, 31904, 5499, 198, 37811, 198, 11748, 12972, 6057, 198, 11748, 17214, 198, 6738, 38491, 1330, 1635, 198, 11748, 4738, 198, 11748, 640, 628, 198, 198, 2, ...
2.281947
986
# Copyright 2020-2021 Huawei Technologies Co., Ltd # # 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 agre...
[ 2, 15069, 12131, 12, 1238, 2481, 43208, 21852, 1766, 1539, 12052, 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...
2.557231
6,299
#Imports import os from shutil import copyfile data_path = '/home/ndg/projects/shared_datasets/PuckIt/FACITdata' out_path = '/home/ndg/projects/shared_datasets/PuckIt/sample2/data' sub_file = '/home/ndg/users/hsalee/PuckIt/resources/large_sample.txt' with open(sub_file, 'r') as fin: all_subs = fin.readlines() al...
[ 2, 3546, 3742, 198, 11748, 28686, 198, 6738, 4423, 346, 1330, 4866, 7753, 198, 198, 7890, 62, 6978, 796, 31051, 11195, 14, 358, 70, 14, 42068, 14, 28710, 62, 19608, 292, 1039, 14, 47, 1347, 1026, 14, 37, 2246, 2043, 7890, 6, 198, ...
2.372
250
from .decode_list import decode_list
[ 6738, 764, 12501, 1098, 62, 4868, 1330, 36899, 62, 4868, 198 ]
3.363636
11
import torch from torch.utils.data import DataLoader from torch.nn import CTCLoss from tqdm import tqdm from dataset import Synth90kDataset, synth90k_collate_fn from model import CRNN from ctc_decoder import ctc_decode from config import evaluate_config as config torch.backends.cudnn.enabled = False if __name__ =...
[ 11748, 28034, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 6060, 17401, 198, 6738, 28034, 13, 20471, 1330, 327, 4825, 43, 793, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 198, 6738, 27039, 1330, 16065, 400, 3829, 74, 27354, ...
3
115
import logging import pickle from typing import Dict, Optional, Union, NoReturn import numpy as np import pandas as pd from sklearn.compose import ColumnTransformer from sklearn.ensemble import RandomForestClassifier from sklearn.linear_model import LogisticRegression from sklearn.metrics import accuracy_score, roc_au...
[ 11748, 18931, 198, 11748, 2298, 293, 198, 6738, 19720, 1330, 360, 713, 11, 32233, 11, 4479, 11, 1400, 13615, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 1341, 35720, 13, 785, 3455, 1330, 2...
2.797633
845
from dataclasses import dataclass from bindings.gmd.md_georectified_type import MdGeorectifiedType __NAMESPACE__ = "http://www.isotc211.org/2005/gmd" @dataclass
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 6738, 34111, 13, 70, 9132, 13, 9132, 62, 469, 382, 310, 1431, 62, 4906, 1330, 39762, 10082, 382, 310, 1431, 6030, 198, 198, 834, 45, 29559, 47, 11598, 834, 796, 366, 4023, 1378, 2...
2.603175
63
from ..BasicGeometry.Edge import Edge from ..BasicGeometry.EdgeArray import EdgeArray from ..Mesh.MeshEdge import MeshEdge from ..Mesh.MeshElementArray import MeshElementArray class Stringer: """The Stringer object stores information on stringer reinforcements created on entities. Attributes ---------- ...
[ 6738, 11485, 26416, 10082, 15748, 13, 37021, 1330, 13113, 198, 6738, 11485, 26416, 10082, 15748, 13, 37021, 19182, 1330, 13113, 19182, 198, 6738, 11485, 37031, 13, 37031, 37021, 1330, 47529, 37021, 198, 6738, 11485, 37031, 13, 37031, 20180, ...
2.665803
1,158
# (C) 2022 GoodData Corporation from gooddata_sdk import GoodDataApiClient from gooddata_sdk.catalog.catalog_service_base import CatalogServiceBase from gooddata_sdk.catalog.permissions.declarative_model.permission import CatalogDeclarativeWorkspacePermissions
[ 2, 357, 34, 8, 33160, 4599, 6601, 10501, 198, 6738, 922, 7890, 62, 21282, 74, 1330, 4599, 6601, 32, 14415, 11792, 198, 6738, 922, 7890, 62, 21282, 74, 13, 9246, 11794, 13, 9246, 11794, 62, 15271, 62, 8692, 1330, 44515, 16177, 14881, ...
3.540541
74
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import inspect import typeguard
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 15069, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 198, 2, 198, 2, 770, 2723, 2438, 318, 11971, 739, 262, 17168, 5964, 1043, 287, 262, 198, 2, 38559, 24290, 2393, ...
3.746032
63
import pygame import time import Sprite from pygame.locals import* from time import sleep from Sprite import Sprite from myVegeta import Vegeta from myTube import Tube from myGoomba import Goomba from myFireball import Fireball print("Use the arrow key...
[ 11748, 12972, 6057, 201, 198, 11748, 640, 201, 198, 11748, 33132, 201, 198, 201, 198, 201, 198, 6738, 12972, 6057, 13, 17946, 874, 1330, 9, 201, 198, 6738, 640, 1330, 3993, 201, 198, 6738, 33132, 1330, 33132, 201, 198, 6738, 616, 2697...
2.307339
218
# Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. #!/usr/bin/env python3 # Copyright 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed und...
[ 2, 15069, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 770, 2723, 2438, 318, 11971, 739, 262, 5964, 1043, 287, 262, 220, 198, 2, 38559, 24290, 2393, 287, 262, 6808, 8619, 28...
2.311674
2,801
import fnmatch from setuptools import setup from setuptools.command.build_py import build_py as build_py_orig exclude = ['*Tests'] setup( cmdclass={ 'build_py': build_py, } )
[ 11748, 24714, 15699, 198, 6738, 900, 37623, 10141, 1330, 9058, 198, 6738, 900, 37623, 10141, 13, 21812, 13, 11249, 62, 9078, 1330, 1382, 62, 9078, 355, 1382, 62, 9078, 62, 11612, 628, 198, 1069, 9152, 796, 37250, 9, 51, 3558, 20520, 6...
2.552632
76
import argparse import json import os from typing import Any, Iterator from datetime import datetime import boto3 from mypy_boto3_s3.client import S3Client from mypy_boto3_sqs.client import SQSClient IS_LOCAL = bool(os.environ.get("IS_LOCAL", False)) if __name__ == "__main__": args = parse_args() ...
[ 11748, 1822, 29572, 198, 11748, 33918, 198, 11748, 28686, 198, 198, 6738, 19720, 1330, 4377, 11, 40806, 1352, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 11748, 275, 2069, 18, 198, 198, 6738, 616, 9078, 62, 65, 2069, 18, 62, 82...
2.537736
212
from abc import ABC, abstractmethod
[ 6738, 450, 66, 1330, 9738, 11, 12531, 24396, 628, 198 ]
3.8
10
import sys t = int(input()) num = list(map(int, sys.stdin.readline().split())) dp = [1 for _ in range(t)] for i in range(t): for j in range(i): if num[i] > num[j]: dp[i] = max(dp[i], dp[j] + 1) print(max(dp))
[ 11748, 25064, 198, 83, 796, 493, 7, 15414, 28955, 198, 22510, 796, 1351, 7, 8899, 7, 600, 11, 25064, 13, 19282, 259, 13, 961, 1370, 22446, 35312, 3419, 4008, 198, 198, 26059, 796, 685, 16, 329, 4808, 287, 2837, 7, 83, 15437, 198, ...
1.966387
119
# -*- coding: UTF-8 -*- """Manager class for streamlining downstream build and evaluation given an architecture. Manager is the class that takes in architecture designs from an architecture search/optimization algorithm, then interacts with ``amber.modeler`` to build and train the model according to architecture, and ...
[ 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 198, 37811, 13511, 1398, 329, 4269, 21310, 33218, 1382, 290, 12660, 1813, 281, 10959, 13, 198, 198, 13511, 318, 262, 1398, 326, 2753, 287, 10959, 9824, 422, 281, 10959, 2989, 14, ...
2.305658
6,769
""" This script contains all the globals variables which are used in the code. Most of the variables are settings upon which the code works. """ DATA_SOURCE = "offline"; # can be either "offline" or "online". DATA_SAMPLING_FREQ = 256.0; # the sampling rate of the recorded EEG. DATA_...
[ 37811, 198, 220, 220, 220, 770, 4226, 4909, 477, 262, 15095, 874, 9633, 198, 220, 220, 220, 543, 389, 973, 287, 262, 2438, 13, 628, 220, 220, 220, 4042, 286, 262, 9633, 389, 6460, 2402, 543, 262, 198, 220, 220, 220, 2438, 2499, 13...
2.764706
255
import torch import torchvision from torch.utils.data import Dataset, Subset from torchvision.transforms import ToTensor from src.data.cmnist_dist import make_joint_distribution, CMNIST_NAME, CMNIST_VERSIONS CMNIST_SIZE = 28 ** 2 * 2 CMNIST_SHAPE = [2, 28, 28] CMNIST_N_CLASSES = 2 CMNIST_N_ENVS = 2 MNIST_TRAIN = 't...
[ 11748, 28034, 198, 11748, 28034, 10178, 198, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 16092, 292, 316, 11, 3834, 2617, 198, 6738, 28034, 10178, 13, 7645, 23914, 1330, 1675, 51, 22854, 198, 198, 6738, 12351, 13, 7890, 13, 66, 10295, ...
2.453901
282