content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import functools import itertools from mopidy.models import Track from mopidy.mpd import exceptions, protocol, translator _SEARCH_MAPPING = { "album": "album", "albumartist": "albumartist", "any": "any", "artist": "artist", "comment": "comment", "composer": "composer", "date": "date", ...
[ 11748, 1257, 310, 10141, 198, 11748, 340, 861, 10141, 198, 198, 6738, 285, 404, 19325, 13, 27530, 1330, 17762, 198, 6738, 285, 404, 19325, 13, 3149, 67, 1330, 13269, 11, 8435, 11, 33417, 198, 198, 62, 5188, 31315, 62, 44, 24805, 2751,...
2.524096
6,142
from omni import Car, vrep from input import OmniParser from vis import OmniPlotter, plt import sys import threading vrep.simxFinish(-1) client_id = vrep.simxStart('127.0.0.1', 19997, True, True, 5000, 5) if client_id != -1: print('Connected to remote API server') vrep.simxStartSimulation(client_id, vrep.simx...
[ 6738, 39030, 8461, 1330, 1879, 11, 410, 7856, 198, 6738, 5128, 1330, 44251, 46677, 198, 6738, 1490, 1330, 44251, 43328, 353, 11, 458, 83, 198, 11748, 25064, 198, 11748, 4704, 278, 198, 198, 85, 7856, 13, 14323, 87, 48658, 32590, 16, 8...
2.749311
363
""" Test of user-related APIs. """ import os from app import app, db from app.config import AUTH_TOKEN_HEADER from app.models import User from app.schemas import UserSchema from app.util.test import * from unittest import TestCase class UserTestCase(TestCase): """ User-related API test class. """ client = a...
[ 37811, 6208, 286, 2836, 12, 5363, 23113, 13, 37227, 198, 11748, 28686, 198, 6738, 598, 1330, 598, 11, 20613, 198, 6738, 598, 13, 11250, 1330, 37195, 62, 10468, 43959, 62, 37682, 1137, 198, 6738, 598, 13, 27530, 1330, 11787, 198, 6738, ...
2.744681
188
import os.path BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = '5rnjl(8n64k%qt36c0vw)71n$3fflnrjfs!16^e1c!jkbksrot' ALLOWED_HOSTS = '*' DEBUG = True ROOT_URLCONF = 'tests.urls' INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contentty...
[ 11748, 28686, 13, 6978, 198, 198, 33, 11159, 62, 34720, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 397, 2777, 776, 7, 834, 7753, 834, 22305, 198, 198, 23683, 26087, 62, 20373, 7...
2.293317
808
import os import sys from .Model_ablation import * import torch_optimizer as optim from torch.utils.tensorboard import SummaryWriter from . import Data import copy import torch.distributed as dist import torch.multiprocessing as mp from .TrainUtil import * import argparse if __name__ == '__main__': ...
[ 11748, 28686, 198, 11748, 25064, 198, 198, 6738, 764, 17633, 62, 397, 7592, 1330, 1635, 198, 11748, 28034, 62, 40085, 7509, 355, 6436, 198, 198, 6738, 28034, 13, 26791, 13, 83, 22854, 3526, 1330, 21293, 34379, 198, 198, 6738, 764, 1330,...
2.806052
727
# Copyright 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
[ 2, 15069, 3050, 3012, 3457, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, 743, ...
2.275892
1,149
# -*- coding: utf-8 -*- """ Spatial Transformer Networks Tutorial ===================================== **Author**: `Ghassen HAMROUNI <https://github.com/GHamrouni>`_ .. figure:: /_static/img/stn/FSeq.png In this tutorial, you will learn how to augment your network using a visual attention mechanism called spatial tr...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 4561, 34961, 3602, 16354, 27862, 36361, 198, 10052, 1421, 28, 198, 1174, 13838, 1174, 25, 4600, 41126, 562, 268, 48079, 49, 19385, 40, 1279, 5450, 1378, 12567,...
3.473181
1,361
from django.conf.urls import url, include from django.conf.urls.static import static from django.conf import settings import rest_framework_swagger from convert.views import * urlpatterns = [ url(r'^docs/', include('rest_framework_swagger.urls')), url(r'^convert/', include('convert.urls', namespace='convert', ...
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 11, 2291, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 13, 12708, 1330, 9037, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 11748, 1334, 62, 30604, 62, 2032, 7928, ...
2.821656
157
import argparse import os import pandas as pd import numpy as np import socket import torch from hessian_eigenthings import compute_hessian_eigenthings import models # contains various architectures and the pruning algorithms from config import run_cfgs # contains run configurations for experiments from utils import * ...
[ 11748, 1822, 29572, 198, 11748, 28686, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 17802, 198, 11748, 28034, 198, 6738, 339, 824, 666, 62, 68, 328, 7944, 654, 1330, 24061, 62, 33979, 666, 62, ...
2.481956
859
""" color_scheme_matcher. Licensed under MIT. Copyright (C) 2012 Andrew Gibson <agibsonsw@gmail.com> 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 limit...
[ 37811, 198, 8043, 62, 15952, 1326, 62, 6759, 2044, 13, 198, 198, 26656, 15385, 739, 17168, 13, 198, 198, 15269, 357, 34, 8, 2321, 220, 6858, 20400, 1279, 363, 571, 82, 684, 86, 31, 14816, 13, 785, 29, 198, 198, 5990, 3411, 318, 29...
2.281163
5,399
import os import itertools import logging as L import numpy as np from perf_compare import execute L.basicConfig(format='%(levelname)s:%(message)s', level=L.DEBUG) if __name__ == '__main__': template_list = ['constants.h.t', 'group_spgemm_kernels.cu.t'] #key_values = {'$COLUMN_PER_GROUP$': [1, 2, 4, 8, 16, 3...
[ 11748, 28686, 198, 11748, 340, 861, 10141, 198, 11748, 18931, 355, 406, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 23035, 62, 5589, 533, 1330, 12260, 198, 198, 43, 13, 35487, 16934, 7, 18982, 11639, 4, 7, 5715, 3672, 8, 82, 25, ...
1.968831
385
""" This file is part of the everest project. See LICENSE.txt for licensing, CONTRIBUTORS.txt for contributor information. Created on Nov 27, 2013. """ import pytest from everest.tests.test_url import BaseTestUrl __docformat__ = 'reStructuredText en' __all__ = ['TestUrlNoSql', ] @pytest.mark.usefixture...
[ 37811, 198, 1212, 2393, 318, 636, 286, 262, 28001, 2118, 1628, 13, 198, 6214, 38559, 24290, 13, 14116, 329, 15665, 11, 27342, 9865, 3843, 20673, 13, 14116, 329, 18920, 1321, 13, 198, 198, 41972, 319, 5267, 2681, 11, 2211, 13, 198, 378...
2.878261
115
# This code is part of Qiskit. # # (C) Copyright IBM 2021. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivative wo...
[ 2, 770, 2438, 318, 636, 286, 1195, 1984, 270, 13, 198, 2, 198, 2, 357, 34, 8, 15069, 19764, 33448, 13, 198, 2, 198, 2, 770, 2438, 318, 11971, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 13, 921, 743, 198, 2, 7330, 257, 486...
1.889571
3,260
import os import datetime import basis_set_exchange as bse from basis_set_exchange import writers, refconverters import logging logger = logging.getLogger(__name__) class DataLoader(object): """Cache basis set metadata for faster server load"""
[ 11748, 28686, 198, 11748, 4818, 8079, 198, 11748, 4308, 62, 2617, 62, 1069, 3803, 355, 275, 325, 198, 6738, 4308, 62, 2617, 62, 1069, 3803, 1330, 8786, 11, 1006, 1102, 332, 1010, 198, 11748, 18931, 198, 6404, 1362, 796, 18931, 13, 113...
3.486111
72
import torch import math import numpy as np import os import pandas as pd from torch.nn.functional import dropout from torch.autograd import Variable from models.dynamic_net import Vcnet, Drnet, TR, TransPlus from models.itermidate_models import VcnetAtt from data.data import get_iter from utils.eval import curve imp...
[ 11748, 28034, 198, 11748, 10688, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 28034, 13, 20471, 13, 45124, 1330, 4268, 448, 198, 6738, 28034, 13, 2306, 519, 6335, 1330, 35748, 1...
1.966444
5,543
from typing import Iterable, Optional, Tuple, Union import numpy as np import vsketch def bounds_equal( vsk: vsketch.Vsketch, xmin: float, ymin: float, xmax: float, ymax: float ) -> bool: """Asserts that sketch bounds are approximately equal to those provided""" bounds = vsk.document.bounds() retur...
[ 6738, 19720, 1330, 40806, 540, 11, 32233, 11, 309, 29291, 11, 4479, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 3691, 7126, 354, 628, 198, 4299, 22303, 62, 40496, 7, 198, 220, 220, 220, 3691, 74, 25, 3691, 7126, 354, 1...
2.018973
1,792
import numpy as np from keras_callbacks.learning_rate_scheduler import LearningRateState, LearningRateScheduler _DEFAULT_LR_DECAY_SETUP = [[0, 0.0009], [10000, 0.00009], [110000, 0.0000075], [1211000, 0]]
[ 11748, 299, 32152, 355, 45941, 198, 198, 6738, 41927, 292, 62, 13345, 10146, 13, 40684, 62, 4873, 62, 1416, 704, 18173, 1330, 18252, 32184, 9012, 11, 18252, 32184, 50, 1740, 18173, 198, 198, 62, 7206, 38865, 62, 35972, 62, 41374, 4792, ...
2.64557
79
import numpy as np import numpy.linalg as la import pandas as pd from sklearn import linear_model from law.model.base_model import Model from sklearn.externals import joblib
[ 11748, 299, 32152, 355, 45941, 198, 11748, 299, 32152, 13, 75, 1292, 70, 355, 8591, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 1341, 35720, 1330, 14174, 62, 19849, 198, 198, 6738, 1099, 13, 19849, 13, 8692, 62, 19849, 1330, 9104...
2.921875
64
# Programa para representar triângulos no plano. import math
[ 2, 6118, 64, 31215, 2380, 283, 1333, 22940, 782, 377, 418, 645, 1410, 78, 13, 198, 198, 11748, 10688 ]
3.210526
19
# Monocyte - Search and Destroy unwanted AWS Resources relentlessly. # Copyright 2015 Immobilien Scout GmbH # # 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/licens...
[ 2, 2892, 43320, 532, 11140, 290, 19448, 19125, 30865, 13864, 37952, 13, 198, 2, 15069, 1853, 9543, 25898, 2013, 22529, 402, 2022, 39, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341,...
3.558052
267
import logging import pandas from glob import iglob from os.path import join from sqlalchemy.orm.exc import MultipleResultsFound from . import util EHR_FILENAME = "EDSD-multicenter.csv" SEPARATOR = ";" INTERESTING_COLUMNS = ["PatientID", "Age", "Gender", "Handedness", "Patient'sBirthDate", "Diagnosis", "MMSE_TOT"...
[ 11748, 18931, 198, 11748, 19798, 292, 198, 198, 6738, 15095, 1330, 220, 38686, 672, 198, 6738, 28686, 13, 6978, 1330, 4654, 198, 198, 6738, 44161, 282, 26599, 13, 579, 13, 41194, 1330, 20401, 25468, 21077, 198, 198, 6738, 764, 1330, 773...
2.582278
158
""" @file bible/tests.py @author Brian Kim @brief unit tests on the bible api """ from flask import Flask from bible import create_app from bible.seed import * import json, os, tempfile, unittest if __name__=="__main__": unittest.main()
[ 37811, 198, 220, 2488, 7753, 220, 220, 41169, 14, 41989, 13, 9078, 198, 220, 2488, 9800, 8403, 6502, 198, 220, 2488, 65, 3796, 220, 4326, 5254, 319, 262, 41169, 40391, 198, 37811, 198, 198, 6738, 42903, 1330, 46947, 220, 198, 6738, 41...
2.833333
90
import factory from oscar.core.compat import get_user_model __all__ = ['UserFactory']
[ 11748, 8860, 198, 198, 6738, 267, 13034, 13, 7295, 13, 5589, 265, 1330, 651, 62, 7220, 62, 19849, 198, 198, 834, 439, 834, 796, 37250, 12982, 22810, 20520, 628 ]
3.068966
29
# Copyright (c) 2016-2021, Thomas Larsson # 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 of conditions...
[ 2, 15069, 357, 66, 8, 1584, 12, 1238, 2481, 11, 5658, 25577, 16528, 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, 2810, ...
5.0625
1,040
""" 'editor' hooks for common editors that work well with ipython They should honor the line number argument, at least. Contributions are *very* welcome. """ import IPython.ipapi ip = IPython.ipapi.get() from IPython.Itpl import itplns import os def install_editor(run_template, wait = False): """ Gets a templa...
[ 37811, 705, 35352, 6, 26569, 329, 2219, 15719, 326, 670, 880, 351, 20966, 7535, 198, 198, 2990, 815, 7522, 262, 1627, 1271, 4578, 11, 379, 1551, 13, 198, 198, 37146, 507, 389, 1635, 548, 9, 7062, 13, 198, 37811, 198, 198, 11748, 610...
2.75643
661
from ui.stub_io import StubIO from ui.app_ui import AppUi from services.bookmarks_service import BookmarksService from repositories.bookmarks_repository import BookmarksRepository from db_connection import DBConnection io = StubIO() class AppLibrary: ''' References from course material '''
[ 6738, 334, 72, 13, 301, 549, 62, 952, 1330, 41135, 9399, 198, 6738, 334, 72, 13, 1324, 62, 9019, 1330, 2034, 52, 72, 198, 6738, 2594, 13, 2070, 14306, 62, 15271, 1330, 4897, 14306, 16177, 198, 6738, 38072, 13, 2070, 14306, 62, 260, ...
3.141414
99
from . import hrf_estimation
[ 6738, 764, 1330, 39436, 69, 62, 395, 18991, 198 ]
3.222222
9
from dataclasses import dataclass from typing import List, Dict, Tuple @dataclass class HMM: """ A Virtool HMM (Hidden Markov Model). :param id: A unique ID for the HMM :param cluster: The cluster number for the HMM :param entries: Dictionary descriptions of the sequences in the cluster :para...
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 6738, 19720, 1330, 7343, 11, 360, 713, 11, 309, 29291, 628, 198, 31, 19608, 330, 31172, 198, 4871, 367, 12038, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 317, 11285, 970, ...
2.739229
441
import os import pika import amqpkey amqp_url=amqpkey.key url=os.environ.get('CLOUDAMQP_URL',amqp_url) params = pika.URLParameters(url) params.socket_timeout = 15 connection = pika.BlockingConnection(params) channel = connection.channel(); channel.queue_declare(queue='hello') msg=channel.basic_publish(exchange='',r...
[ 11748, 28686, 198, 11748, 279, 9232, 198, 198, 11748, 716, 80, 79, 2539, 198, 321, 80, 79, 62, 6371, 28, 321, 80, 79, 2539, 13, 2539, 198, 198, 6371, 28, 418, 13, 268, 2268, 13, 1136, 10786, 5097, 2606, 35, 2390, 48, 47, 62, 218...
2.77027
148
import pyspark.pandas as pan #Calculate average of a column
[ 11748, 279, 893, 20928, 13, 79, 392, 292, 355, 3425, 198, 2, 9771, 3129, 378, 2811, 286, 257, 5721, 628 ]
3.05
20
import sys import subprocess CHIP = 'atmega328p' PORT = '/dev/ttyUSB0' BAUDRATE = '19200' if len(sys.argv) == 5: chip = sys.argv[1] port = sys.argv[2] baud = sys.argv[3] program = sys.argv[4] else: program = sys.argv[1] chip, port, baud = (CHIP, PORT, BAUDRATE) command = ('avrdude' + ' -p' + chip + ' -...
[ 11748, 25064, 198, 11748, 850, 14681, 198, 198, 3398, 4061, 796, 705, 265, 13731, 34256, 79, 6, 198, 15490, 796, 31051, 7959, 14, 42852, 27155, 15, 6, 198, 4339, 52, 7707, 6158, 796, 705, 1129, 2167, 6, 198, 198, 361, 18896, 7, 1759...
2.256881
218
import logging from datetime import datetime from django.conf import settings from django.contrib import admin from django.http import HttpResponseRedirect from django.shortcuts import render import requests from elasticsearch.exceptions import ConnectionError, NotFoundError from fjord.search.index import ( chun...
[ 11748, 18931, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 7738, 1060, 198, ...
2.383895
1,602
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** # Export this package's modules as members: from ._enums import * from .device import * from .get_device import * from .get_network_function import * f...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 17202, 39410, 25, 428, 2393, 373, 7560, 416, 262, 21624, 12994, 26144, 35986, 13, 17202, 198, 2, 17202, 2141, 407, 4370, 416, 1021, 4556, 345, 821, 1728, 345, 760, 644, 345, 389, 1804, 0, 17202, ...
3.322917
192
import pytest from mopidy_kitchen.uri import ( ROOT_URI, AlbumsUri, AlbumTrackUri, AlbumUri, SearchUri, StationStreamUri, StationUri, StationsUri, parse_uri, )
[ 11748, 12972, 9288, 198, 198, 6738, 285, 404, 19325, 62, 15813, 6607, 13, 9900, 1330, 357, 198, 220, 220, 220, 15107, 2394, 62, 47269, 11, 198, 220, 220, 220, 23999, 82, 52, 380, 11, 198, 220, 220, 220, 23999, 24802, 52, 380, 11, ...
2.048544
103
# # PySNMP MIB module CISCO-ITP-MONITOR-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-ITP-MONITOR-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 17:46:34 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (def...
[ 2, 198, 2, 9485, 15571, 7378, 337, 9865, 8265, 36159, 8220, 12, 2043, 47, 12, 27857, 2043, 1581, 12, 8895, 33, 357, 4023, 1378, 16184, 76, 489, 8937, 13, 785, 14, 79, 893, 11632, 8, 198, 2, 7054, 45, 13, 16, 2723, 2393, 1378, 14...
2.436626
6,296
from functools import reduce from django.db import models from django.core.validators import MinLengthValidator from .validators import ( IsDigitValidator, ControlNumberValidation )
[ 6738, 1257, 310, 10141, 1330, 4646, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 7295, 13, 12102, 2024, 1330, 1855, 24539, 47139, 1352, 198, 6738, 764, 12102, 2024, 1330, 357, 198, 220, 220, 220, 1148...
3.5
54
import datetime import inspect import numpy.testing as npt import os.path import pandas as pd import pandas.util.testing as pdt import sys from tabulate import tabulate import unittest # #find parent directory and import model # parentddir = os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir)) # sy...
[ 11748, 4818, 8079, 198, 11748, 10104, 198, 11748, 299, 32152, 13, 33407, 355, 299, 457, 198, 11748, 28686, 13, 6978, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 19798, 292, 13, 22602, 13, 33407, 355, 279, 28664, 198, 11748, 25064,...
2.134062
20,483
import numpy as np import cv2 import random import copy import data_augment import threading import itertools #import numba #@numba.jit #@numba.jit #@numba.jit class threadsafe_iter: """Takes an iterator/generator and makes it thread-safe by serializing call to the `next` method of given iterator/generato...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 269, 85, 17, 198, 11748, 4738, 198, 11748, 4866, 198, 11748, 1366, 62, 559, 5154, 198, 11748, 4704, 278, 198, 11748, 340, 861, 10141, 198, 2, 11748, 997, 7012, 628, 198, 198, 2, 31, 77, 217...
2.956522
161
import pytest from selenium import webdriver @pytest.fixture
[ 11748, 12972, 9288, 198, 198, 6738, 384, 11925, 1505, 1330, 3992, 26230, 198, 198, 31, 9078, 9288, 13, 69, 9602 ]
3.1
20
import requests from bs4 import BeautifulSoup import time KEYWORD = input("키워드를 입력해주세요. : ") PAGE = int(input("Crawiling을 진행할 page 수를 입력해주세요. : ")) time = time.localtime() headers = {"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36 Edg/...
[ 11748, 7007, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 11748, 640, 198, 198, 20373, 54, 12532, 796, 5128, 7203, 169, 224, 97, 168, 249, 234, 167, 241, 250, 167, 98, 120, 23821, 252, 227, 167, 254, 98, 47991, 112, 168, 9...
1.695279
233
import time import numpy as np from scipy.interpolate import interp1d from pymove.core.dataframe import PandasMoveDataFrame from pymove.utils.constants import TID from pymove.utils.log import progress_bar from pymove.utils.trajectories import shift from pymove.utils.transformations import feature_values_using_filter ...
[ 11748, 640, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 13, 3849, 16104, 378, 1330, 987, 79, 16, 67, 198, 198, 6738, 279, 4948, 659, 13, 7295, 13, 7890, 14535, 1330, 16492, 292, 21774, 6601, 19778, 198, 6738, 2...
2.207081
7,683
''' The manager can solve the component selection operations When user draw a contour on the screen, the point clouds inside the contour will be selected. ''' import numpy as np import cv2 import sketch_3d_ui.geometry.geometry_utils as geometry_utils from PyQt5.QtCore import QSize, Qt, QRect, QPoint from PyQt5.QtGui ...
[ 7061, 6, 198, 464, 4706, 460, 8494, 262, 7515, 6356, 4560, 198, 2215, 2836, 3197, 257, 542, 454, 319, 262, 3159, 11, 262, 966, 15114, 198, 48787, 262, 542, 454, 481, 307, 6163, 13, 198, 7061, 6, 198, 198, 11748, 299, 32152, 355, 4...
2.969325
163
import base64 from datetime import datetime, timedelta import os from werkzeug.security import generate_password_hash, check_password_hash from app import db from flask import url_for
[ 11748, 2779, 2414, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 11748, 28686, 198, 6738, 266, 9587, 2736, 1018, 13, 12961, 1330, 7716, 62, 28712, 62, 17831, 11, 2198, 62, 28712, 62, 17831, 198, 6738, 598, 1330, 20613,...
3.755102
49
# Auxillary data for json_parse_tests.bzl, kept here to simply neaten # up the test file.
[ 2, 47105, 15856, 1366, 329, 33918, 62, 29572, 62, 41989, 13, 65, 48274, 11, 4030, 994, 284, 2391, 15049, 268, 198, 2, 510, 262, 1332, 2393, 13, 198 ]
3.214286
28
tamanio = float(input("Ingrese el tamaño del pez \n")) if tamanio >= 10: print("Pez contaminado") elif tamanio >= 7: print("Pez con síntomas de organismo contaminado") elif tamanio >= 4: print("Pez en buenas condiciones") else: print("Pez con problemas de nutrición") input()
[ 83, 10546, 952, 796, 12178, 7, 15414, 7203, 27682, 260, 325, 1288, 256, 1689, 31329, 1619, 613, 89, 3467, 77, 48774, 198, 361, 256, 10546, 952, 18189, 838, 25, 198, 220, 220, 220, 3601, 7203, 6435, 89, 33554, 4533, 4943, 198, 417, 3...
2.495726
117
from django.db import models from apps.recipes.models import Recipe
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 198, 6738, 6725, 13, 8344, 18636, 13, 27530, 1330, 26694, 628 ]
3.684211
19
import tensorflow as tf """Functions to apply to the binary mask""" def tight_box_coordinates(binary_mask): """Calculates the minimal encapsulating rectangle from a binary mask""" binary_mask = tf.squeeze(binary_mask) tf.assert_rank(binary_mask, 2, 'expected a 2D binary mask') binary_mask_shape = tf.s...
[ 11748, 11192, 273, 11125, 355, 48700, 198, 198, 37811, 24629, 2733, 284, 4174, 284, 262, 13934, 9335, 37811, 198, 198, 4299, 5381, 62, 3524, 62, 37652, 17540, 7, 39491, 62, 27932, 2599, 198, 220, 220, 220, 37227, 9771, 3129, 689, 262, ...
2.335628
581
import matplotlib.pyplot as plt import skimage import skimage.io import skimage.transform import os import os.path as osp from mmcv import mkdir_or_exist from dmb.data.datasets.utils.load_flow import write_flo from dmb.visualization.flow.show_result import ShowResultTool
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 1341, 9060, 198, 11748, 1341, 9060, 13, 952, 198, 11748, 1341, 9060, 13, 35636, 198, 11748, 28686, 198, 11748, 28686, 13, 6978, 355, 267, 2777, 198, 198, 6738, 8085, ...
3.149425
87
# Copyright 2015-2016 NEC Corporation. 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 requ...
[ 2, 15069, 1853, 12, 5304, 41804, 10501, 13, 220, 1439, 2489, 10395, 13, 198, 2, 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, 407, 779,...
3.373239
284
""" Poll object Refer: https://developer.twitter.com/en/docs/twitter-api/data-dictionary/object-model/poll """ from dataclasses import dataclass, field from typing import List, Optional from .base import BaseModel @dataclass @dataclass class Poll(BaseModel): """ A class representing poll object. ...
[ 37811, 198, 220, 220, 220, 12868, 2134, 628, 220, 220, 220, 33973, 25, 3740, 1378, 16244, 263, 13, 6956, 13, 785, 14, 268, 14, 31628, 14, 6956, 12, 15042, 14, 7890, 12, 67, 14188, 14, 15252, 12, 19849, 14, 30393, 198, 37811, 198, ...
2.941176
221
import math from Analisis_Ascendente.Instrucciones.instruccion import Instruccion,IdId from Analisis_Ascendente.Instrucciones.expresion import * from Analisis_Ascendente.Instrucciones.Expresiones.Math import * import Analisis_Ascendente.Instrucciones.Expresiones.Expresion as Expresion
[ 11748, 220, 10688, 198, 6738, 1052, 27315, 271, 62, 32, 1416, 437, 21872, 13, 6310, 622, 535, 295, 274, 13, 8625, 622, 535, 295, 1330, 2262, 622, 535, 295, 11, 7390, 7390, 198, 6738, 1052, 27315, 271, 62, 32, 1416, 437, 21872, 13, ...
2.642202
109
# Generated by Django 2.0.2 on 2018-03-05 01:57 from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 362, 13, 15, 13, 17, 319, 2864, 12, 3070, 12, 2713, 5534, 25, 3553, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, 9945, 13, 27530, 13, 2934, 1616, 295, ...
2.818182
44
from graphviz import Digraph import torch import argparse parser = argparse.ArgumentParser(description="training") parser.add_argument( "--checkpoint", type=str, default=None, help="checkpoint full path", ) parser.add_argument( "--directory", type=str, default='./', help="directory to save", ) parser.add_argument( "-...
[ 6738, 4823, 85, 528, 1330, 7367, 1470, 220, 198, 11748, 28034, 198, 11748, 1822, 29572, 198, 198, 48610, 796, 1822, 29572, 13, 28100, 1713, 46677, 7, 11213, 2625, 34409, 4943, 198, 48610, 13, 2860, 62, 49140, 7, 198, 1, 438, 9122, 412...
2.159459
1,110
# Enumerate all primes to n # https://www.geeksforgeeks.org/prime-numbers/ # Interesting facts about prime number # Two is the only even Prime number # Every Prime number can be represented in form of 6n+1 or 6n-1 except 2 and 3, where n is # natural number. # Two and Three are only two consecutiv...
[ 2, 2039, 6975, 378, 477, 778, 999, 284, 299, 198, 198, 2, 3740, 1378, 2503, 13, 469, 2573, 30293, 2573, 13, 2398, 14, 35505, 12, 77, 17024, 14, 198, 2, 43580, 6419, 546, 6994, 1271, 198, 220, 220, 220, 1303, 4930, 318, 262, 691, ...
3.372736
1,049
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import json import random import sys import time import requests from slackclient import SlackClient VERSION = 'v0.2' if __name__ == '__main__': # Create the Nekochan object # Replace these placeholders with your keys! nekochan = Nekochan('<bot_token>', ...
[ 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, 33918, 198, 11748, 4738, 198, 11748, 25064, 198, 11748, 640, 198, 198, 11748, 7007, 198, 6738, 30740, 1...
1.877717
368
import argparse import codecs from datetime import date from pathlib import Path import markdown from bs4 import BeautifulSoup from pygments.formatters import HtmlFormatter from weasyprint import HTML import sys if __name__ == "__main__": parser = argparse.ArgumentParser(description="Convert markdown to pdf") ...
[ 11748, 1822, 29572, 198, 11748, 40481, 82, 198, 6738, 4818, 8079, 1330, 3128, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 11748, 1317, 2902, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 6738, 12972, 11726, 13, 18982, 1010, 133...
2.936975
238
""" Provides modification functions for RecipeUrl objects """ from operations import crud from models.core.recipe_url import RecipeURL def add(url): """Add a RecipeURL""" recipe_url_obj = RecipeURL(url=url) return crud.add(recipe_url_obj)
[ 37811, 47081, 17613, 5499, 329, 26694, 28165, 5563, 37227, 198, 198, 6738, 4560, 1330, 1067, 463, 198, 6738, 4981, 13, 7295, 13, 29102, 431, 62, 6371, 1330, 26694, 21886, 198, 198, 4299, 751, 7, 6371, 2599, 198, 220, 220, 220, 37227, ...
3.123457
81
############################################################################### # CS 224W (Fall 2019) - HW3 # Starter code for Problem 3 ############################################################################### import snap import matplotlib.pyplot as plt # Setup num_voters = 10000 decision_period = 10 def rea...
[ 29113, 29113, 7804, 4242, 21017, 198, 2, 9429, 26063, 54, 357, 24750, 13130, 8, 532, 44884, 18, 198, 2, 37460, 2438, 329, 20647, 513, 198, 29113, 29113, 7804, 4242, 21017, 198, 198, 11748, 11495, 198, 11748, 2603, 29487, 8019, 13, 9078,...
2.612087
3,756
# pylint: disable=g-bad-file-header # Copyright 2019 The dm_env 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...
[ 2, 279, 2645, 600, 25, 15560, 28, 70, 12, 14774, 12, 7753, 12, 25677, 198, 2, 15069, 13130, 383, 288, 76, 62, 24330, 46665, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1...
3.698413
252
import multiprocessing from typing import List from onnxruntime import GraphOptimizationLevel, InferenceSession, SessionOptions from onnxruntime.quantization import QuantType, quantize_dynamic def generic_optimize_onnx(onnx_path: str, output_path: str, quant_type='int8') -> None: """Apply dynamic quantization to...
[ 11748, 18540, 305, 919, 278, 198, 6738, 19720, 1330, 7343, 198, 198, 6738, 319, 77, 87, 43282, 1330, 29681, 27871, 320, 1634, 4971, 11, 554, 4288, 36044, 11, 23575, 29046, 198, 6738, 319, 77, 87, 43282, 13, 40972, 1634, 1330, 16972, 6...
2.732323
594
"""Generic action object, the parent of all action objects.""" import gws import gws.types as t
[ 37811, 46189, 2223, 2134, 11, 262, 2560, 286, 477, 2223, 5563, 526, 15931, 198, 198, 11748, 308, 18504, 198, 11748, 308, 18504, 13, 19199, 355, 256, 628 ]
3.62963
27
# !/usr/bin/env python3 """ Created on Fri Jun 26 08:37:56 2020 This code represents ezBIDS's attempt to determine BIDS information (datatype, suffix, entitiy labels [acq, run, dir, etc]) based on dcm2niix output. This information is then displayed in the ezBIDS UI, where users can made edits/modifications as they see...
[ 2, 5145, 14, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 37811, 198, 41972, 319, 19480, 7653, 2608, 8487, 25, 2718, 25, 3980, 12131, 198, 198, 1212, 2438, 6870, 304, 89, 33, 14255, 338, 2230, 284, 5004, 347, 14255, 1321, 357, 19608, ...
2.100355
30,402
from datetime import datetime from typing import List from flask_restful import fields from src.models.community import CommunityModel from src.models.user import UserModel
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 19720, 1330, 7343, 198, 198, 6738, 42903, 62, 2118, 913, 1330, 7032, 198, 198, 6738, 12351, 13, 27530, 13, 28158, 1330, 8108, 17633, 198, 6738, 12351, 13, 27530, 13, 7220, 1330, 11787, 1763...
4.139535
43
from .fuzzy_matcher import FuzzyMatcher # noqa from .iteration import pairwise # noqa from .strings import abbreviated, capitalized # noqa
[ 6738, 764, 69, 4715, 88, 62, 6759, 2044, 1330, 376, 4715, 88, 19044, 2044, 220, 1303, 645, 20402, 198, 6738, 764, 2676, 341, 1330, 5166, 3083, 220, 1303, 645, 20402, 198, 6738, 764, 37336, 1330, 37640, 515, 11, 3139, 1143, 220, 1303, ...
3.155556
45
# This code is forked from: https://github.com/duerig/laser-dewarp.git import cv2, maxflow, numpy from scipy import signal # Taken from http://wiki.scipy.org/Cookbook/SignalSmooth def smooth(x,window_len=11,window='hanning'): """smooth the data using a window with requested size. This method is based on ...
[ 2, 770, 2438, 318, 329, 9091, 422, 25, 3740, 1378, 12567, 13, 785, 14, 646, 263, 328, 14, 75, 6005, 12, 67, 413, 5117, 13, 18300, 198, 198, 11748, 269, 85, 17, 11, 3509, 11125, 11, 299, 32152, 198, 6738, 629, 541, 88, 1330, 6737...
2.600499
801
import keras import os from sklearn.model_selection import train_test_split from keras_preprocessing.image import ImageDataGenerator from numpy import asarray from keras import layers, losses from tensorflow.keras.preprocessing.image import ImageDataGenerator from PIL import Image import glob import pandas as pd from k...
[ 11748, 41927, 292, 198, 11748, 28686, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 4512, 62, 9288, 62, 35312, 198, 6738, 41927, 292, 62, 3866, 36948, 13, 9060, 1330, 7412, 6601, 8645, 1352, 198, 6738, 299, 32152, 1330, 355, 18747...
2.771617
1,064
import asyncio import logging from merc import message from merc import parser logger = logging.getLogger(__name__)
[ 11748, 30351, 952, 198, 11748, 18931, 198, 198, 6738, 11991, 1330, 3275, 198, 6738, 11991, 1330, 30751, 628, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 628, 628 ]
3.588235
34
# # @lc app=leetcode.cn id=1285 lang=python3 # # [1285] balance-a-binary-search-tree # None # @lc code=end
[ 2, 198, 2, 2488, 44601, 598, 28, 293, 316, 8189, 13, 31522, 4686, 28, 1065, 5332, 42392, 28, 29412, 18, 198, 2, 198, 2, 685, 1065, 5332, 60, 5236, 12, 64, 12, 39491, 12, 12947, 12, 21048, 198, 2, 198, 14202, 198, 2, 2488, 44601,...
2.208333
48
# https://github.com/philtabor/Youtube-Code-Repository/blob/master/ReinforcementLearning/DeepQLearning/simple_dqn_torch.py from obsolete import ttt_env from obsolete.phils_dq import Agent from obsolete.phils_utils import plotLearning import numpy as np play(50000)
[ 2, 3740, 1378, 12567, 13, 785, 14, 746, 2326, 4820, 14, 56, 9762, 12, 10669, 12, 6207, 13264, 14, 2436, 672, 14, 9866, 14, 3041, 259, 13442, 41730, 14, 29744, 9711, 451, 768, 14, 36439, 62, 49506, 77, 62, 13165, 354, 13, 9078, 198...
3.08046
87
import setuptools with open("README.md", "r", encoding="utf-8") as fh: long_description = fh.read() setuptools.setup( name="fake-event-producer", version="0.0.1", author="Jakub Szafran", author_email="jszafran.pv@gmail.com", description="Helper package for generating fake events.", long_de...
[ 11748, 900, 37623, 10141, 198, 198, 4480, 1280, 7203, 15675, 11682, 13, 9132, 1600, 366, 81, 1600, 21004, 2625, 40477, 12, 23, 4943, 355, 277, 71, 25, 198, 220, 220, 220, 890, 62, 11213, 796, 277, 71, 13, 961, 3419, 198, 198, 2617, ...
2.537217
309
from flask import request, render_template, redirect from app import app import sys import os try: pyWrkspLoc = os.environ["PYWRKSP"] except KeyError: os_ = input('Would you like to use the "HOME" env varible?') if os_ == 'y': pyWrkspLoc = os.environ["HOME"] + input('Since you do not have the P...
[ 6738, 42903, 1330, 2581, 11, 8543, 62, 28243, 11, 18941, 198, 6738, 598, 1330, 598, 198, 11748, 25064, 198, 11748, 28686, 198, 198, 28311, 25, 198, 220, 220, 220, 12972, 39213, 591, 79, 33711, 796, 28686, 13, 268, 2268, 14692, 47, 56,...
2.331325
1,826
import asyncio
[ 11748, 30351, 952 ]
4.666667
3
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: object.proto """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 262, 8435, 11876, 17050, 13, 220, 8410, 5626, 48483, 0, 198, 2, 2723, 25, 2134, 13, 1676, 1462, 198, 37811, 8645, 515, 8435, 11876, 2438, 526, 15931...
2.342409
7,272
#!/usr/bin/env python from setuptools import setup, find_packages setup( name="aws-shd-rss", description="Check AWS Service Health Dashboard RSS", version="0.1", author="htnosm", author_email="htnosm@gmail.com", license="MIT License", install_requires=_requires_from_file('requirements.tx...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 628, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 2625, 8356, 12, 1477, 67, 12, 42216, 1600, 198, 220, 220, 220, 6764,...
2.656716
134
"""A Box that automatically sets its size to fit the given text.""" from dataclasses import dataclass, replace from typing import Optional, Dict, Any, Callable import pyglet from pyglet import gl import cocos from ..alignment import HorizontalAlignment, LeftBottom from ..components.box import Box, bounding_rect_of_r...
[ 37811, 32, 8315, 326, 6338, 5621, 663, 2546, 284, 4197, 262, 1813, 2420, 526, 15931, 198, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 11, 6330, 198, 6738, 19720, 1330, 32233, 11, 360, 713, 11, 4377, 11, 4889, 540, 198, 198, ...
2.46702
4,715
# ----------------------------------------------------------------------------- # # Copyright (c) Charles Carley. # # This software is provided 'as-is', without any express or implied # warranty. In no event will the authors be held liable for any damages # arising from the use of this software. # # Permission is...
[ 2, 16529, 32501, 198, 2, 198, 2, 220, 220, 15069, 357, 66, 8, 7516, 1879, 1636, 13, 198, 2, 198, 2, 220, 220, 770, 3788, 318, 2810, 705, 292, 12, 271, 3256, 1231, 597, 4911, 393, 17142, 198, 2, 18215, 13, 554, 645, 1785, 481, ...
4.412
250
from .mm_tasks import * from .cv_tasks import * from .nlu_tasks import * from .ofa_task import OFATask
[ 6738, 764, 3020, 62, 83, 6791, 1330, 1635, 198, 6738, 764, 33967, 62, 83, 6791, 1330, 1635, 198, 6738, 764, 77, 2290, 62, 83, 6791, 1330, 1635, 198, 6738, 764, 1659, 64, 62, 35943, 1330, 3963, 1404, 2093 ]
2.684211
38
import pandas as pd from sklearn.linear_model import LogisticRegression from sklearn.model_selection import train_test_split from sklearn.feature_extraction.text import CountVectorizer from string import punctuation from wordcloud import WordCloud from nltk import tokenize import unidecode import nltk import seaborn as...
[ 11748, 19798, 292, 355, 279, 67, 198, 6738, 1341, 35720, 13, 29127, 62, 19849, 1330, 5972, 2569, 8081, 2234, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 4512, 62, 9288, 62, 35312, 198, 6738, 1341, 35720, 13, 30053, 62, 2302, 7...
2.814493
345
# coding: utf-8 """ Isilon SDK Isilon SDK - Language bindings for the OneFS API # noqa: E501 OpenAPI spec version: 6 Contact: sdk@isilon.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six from isi_sdk_8_1_1.models.event_s...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 220, 220, 220, 1148, 33576, 26144, 628, 220, 220, 220, 1148, 33576, 26144, 532, 15417, 34111, 329, 262, 1881, 10652, 7824, 220, 1303, 645, 20402, 25, 412, 33548, 628, 220, 220, 2...
2.483155
2,612
# Copyright (C) 2018-2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 import onnx from extensions.front.onnx.instance_normalization_ext import InstanceNormalizationExtractor from unit_tests.utils.extractors import PB, BaseExtractorsTestingClass
[ 2, 15069, 357, 34, 8, 2864, 12, 1238, 2481, 8180, 10501, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 198, 198, 11748, 319, 77, 87, 198, 198, 6738, 18366, 13, 8534, 13, 261, 77, 87, 13, 39098, 62, ...
3.376623
77
class GameState(object): """ Wraps a state of the game """ next_player = None @property def value(self): """ Defines the estimated value of a state This is very useful for AI program, but is not really important for human players. """ raise NotImplementedError class GameModel(object): """ Wraps ...
[ 198, 4871, 3776, 9012, 7, 15252, 2599, 198, 197, 37811, 198, 197, 36918, 862, 257, 1181, 286, 262, 983, 198, 197, 37811, 198, 197, 19545, 62, 7829, 796, 6045, 628, 197, 31, 26745, 198, 197, 4299, 1988, 7, 944, 2599, 198, 197, 197, ...
3.054025
944
#!/usr/bin/env python # coding: utf-8 # <h5>Pacotes necessários # In[3]: import pandas as pd import numpy as np from sklearn.ensemble import RandomForestClassifier from sklearn.model_selection import train_test_split # <h5>Lendo o banco de dados # In[4]: dados = pd.read_csv('E:/Cursos/BootCamp Carrefour/Intro...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 1279, 71, 20, 29, 18844, 6421, 2418, 6557, 380, 418, 198, 198, 2, 554, 58, 18, 5974, 628, 198, 11748, 19798, 292, 355, 279, 67, 198, ...
2.021084
1,328
import os.path as osp from tqdm import tqdm import time import numpy as np import torch from torch_sparse import SparseTensor from sklearn.preprocessing import MinMaxScaler import sys from ogb.lsc import MAG240MDataset, MAG240MEvaluator sys.path.append('/var/ogb/ogb/lsc') from mag240m_mini_graph_new import MAG240MMIN...
[ 11748, 28686, 13, 6978, 355, 267, 2777, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 198, 11748, 640, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 198, 6738, 28034, 62, 82, 29572, 1330, 1338, 17208, 51, 22854, ...
2.189834
2,223
# Check whether a solution is valid # Check whether grid[i][j] is valid in the grid
[ 2, 6822, 1771, 257, 4610, 318, 4938, 220, 198, 198, 2, 6822, 1771, 10706, 58, 72, 7131, 73, 60, 318, 4938, 287, 262, 10706, 220, 198 ]
3.346154
26
from Interpreter.Expression.expression import Expression
[ 6738, 4225, 3866, 353, 13, 16870, 2234, 13, 38011, 1330, 41986, 628 ]
4.833333
12
from django.contrib import admin # Register your models here. from django.contrib import admin # 别忘了导入ArticlerPost from .models import ArticlePost # 注册ArticlePost到admin中 admin.site.register(ArticlePost)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 198, 2, 17296, 534, 4981, 994, 13, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 198, 2, 10263, 230, 104, 33232, 246, 12859, 228, 43380, 120, 17739, 98, 8001, 291, ...
2.746667
75
from .core import send_email class Emailer: '''Class used to simplify the process of sending emails programmatically using Python Parameters ---------- from_address : str The email address to be sending emails from password : str The password to the from_address smtp_address : ...
[ 6738, 764, 7295, 1330, 3758, 62, 12888, 198, 198, 4871, 9570, 263, 25, 198, 220, 220, 220, 705, 7061, 9487, 973, 284, 30276, 262, 1429, 286, 7216, 7237, 1430, 49454, 1262, 11361, 628, 220, 220, 220, 40117, 198, 220, 220, 220, 24200, ...
2.25
736
"""Computing statistics from a polynomial expansions.""" from equadratures.basis import Basis import numpy as np from itertools import * class Statistics(object): """ Compute statistics (mean, variance, skewness, kurtosis and sensitivity indices) of an orthogonal polynomial defined via parameters, a basis and ...
[ 37811, 5377, 48074, 7869, 422, 257, 745, 6213, 49070, 36383, 526, 15931, 198, 6738, 1602, 41909, 6691, 13, 12093, 271, 1330, 6455, 271, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 340, 861, 10141, 1330, 1635, 198, 198, 4871, 14370, 7...
2.716147
1,765
import logging import azure.functions as func import requests url = "http://dev.virtualearth.net/REST/V1/Routes/Driving?o=json&wp.0=Aeugst am Albis&avoid=minimizeTolls&key=AmzCNKlINpVWMJENuTPqdfiR-B5Kg1YM95MtahgZtn-AvzMukcU9GqaZ9Wey9ADd&wp.1=Bonstetten"
[ 11748, 18931, 201, 198, 201, 198, 11748, 35560, 495, 13, 12543, 2733, 355, 25439, 201, 198, 201, 198, 11748, 7007, 201, 198, 201, 198, 6371, 796, 366, 4023, 1378, 7959, 13, 32844, 16442, 13, 3262, 14, 49, 6465, 14, 53, 16, 14, 49, ...
1.941606
137
# pylint: disable=no-self-use import inspect import pytest from http_exceptions import HTTPException from http_exceptions.client_exceptions import CLIENT_EXCEPTIONS from http_exceptions.client_exceptions import ClientException from http_exceptions.server_exceptions import SERVER_EXCEPTIONS from http_exceptions.server...
[ 2, 279, 2645, 600, 25, 15560, 28, 3919, 12, 944, 12, 1904, 198, 11748, 10104, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 2638, 62, 1069, 11755, 1330, 14626, 16922, 198, 6738, 2638, 62, 1069, 11755, 13, 16366, 62, 1069, 11755, 1330,...
4.083019
265
""" Logic dealing with types.db files """ from collections import namedtuple DataSet = namedtuple("DataSet", "name sources") DataSource = namedtuple("DataSource", "name type min max") ACCEPTABLE_TYPES = ["GAUGE", "ABSOLUTE", "COUNTER", "DERIVE"] def parse_types_db(content): """ Returns a set of data source...
[ 37811, 198, 11187, 291, 7219, 351, 3858, 13, 9945, 3696, 198, 37811, 198, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 198, 6601, 7248, 796, 3706, 83, 29291, 7203, 6601, 7248, 1600, 366, 3672, 4237, 4943, 198, 6601, 7416, 796, 3706, ...
2.435593
590
from typing import Callable, Any from lee_reward import lee_reward from fu_reward import fu_reward from yang_reward import yang_reward from lopez_reward import lopez_reward def reward_handler(reward_fuction_str: str) -> Callable[[Any], float]: """ Reward function handler. Parameters: ---...
[ 198, 6738, 19720, 1330, 4889, 540, 11, 4377, 198, 198, 6738, 443, 68, 62, 260, 904, 1330, 443, 68, 62, 260, 904, 198, 6738, 14035, 62, 260, 904, 1330, 14035, 62, 260, 904, 198, 6738, 331, 648, 62, 260, 904, 1330, 331, 648, 62, 2...
2.448485
330
""" Parameter Estimation tests #2. Robert Clewley, March 2005. """ from __future__ import print_function # PyDSTool imports from PyDSTool import * from PyDSTool.Toolbox.ParamEst import BoundMin, L2_feature_1D from PyDSTool.common import metric_float_1D import HH_model, IF_squarespike_model # ----------------...
[ 37811, 198, 220, 220, 220, 25139, 2357, 10062, 18991, 5254, 1303, 17, 13, 628, 220, 220, 220, 5199, 3779, 86, 1636, 11, 2805, 5075, 13, 198, 37811, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 2, 9485, 35, 2257, 970...
1.981926
3,043
import sunpy.io as io import subprocess import os def file_finder(date, local=True, index=0): ''' This function takes in the date from the 3Dplot.py. It then uses this date to access the website that contains all of the XRT images. It uses a findFiles.sh bash script that attempts to download images of a certai...
[ 11748, 4252, 9078, 13, 952, 355, 33245, 198, 11748, 850, 14681, 198, 11748, 28686, 198, 198, 4299, 2393, 62, 22805, 7, 4475, 11, 1957, 28, 17821, 11, 6376, 28, 15, 2599, 198, 197, 7061, 6, 198, 197, 198, 197, 1212, 2163, 2753, 287, ...
2.478085
1,483
params = { 'wingtype': 'rotary', 'rotorquantity': 6, 'takeoffweight': 1.5, 'batterytype': 'LiPo', 'batteryvoltage': 14.8, 'batterymass': 0.5, 'props': '10x4.7' }
[ 37266, 796, 1391, 198, 6, 5469, 4906, 10354, 705, 10599, 560, 3256, 198, 6, 10599, 273, 40972, 414, 10354, 718, 11, 198, 470, 539, 2364, 6551, 10354, 352, 13, 20, 11, 198, 6, 65, 16296, 4906, 10354, 705, 32304, 18833, 3256, 198, 6, ...
2.090909
77
import regexes, parser import clientos
[ 11748, 40364, 274, 11, 30751, 198, 11748, 5456, 418, 198 ]
3.9
10
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import...
[ 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.260116
173
from .views import index_bp
[ 6738, 764, 33571, 1330, 6376, 62, 46583, 198 ]
3.5
8
import unittest # noinspection PyProtectedMember from flutils.packages import _build_version_bump_position
[ 11748, 555, 715, 395, 198, 198, 2, 645, 1040, 14978, 9485, 19703, 11197, 27608, 198, 6738, 781, 26791, 13, 43789, 1330, 4808, 11249, 62, 9641, 62, 65, 931, 62, 9150, 628 ]
3.516129
31
from typing import cast from datetime import datetime import logging from processes.models import * from .schedule_checker import ScheduleChecker SUMMARY_TEMPLATE = \ """Task '{{task.name}}' did not execute as scheduled at {{expected_execution_at}}""" logger = logging.getLogger(__name__)
[ 6738, 19720, 1330, 3350, 201, 198, 6738, 4818, 8079, 1330, 4818, 8079, 201, 198, 11748, 18931, 201, 198, 201, 198, 6738, 7767, 13, 27530, 1330, 1635, 201, 198, 6738, 764, 15952, 5950, 62, 9122, 263, 1330, 19281, 9787, 263, 201, 198, 2...
2.971154
104