content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
import googlemaps gmaps = googlemaps.Client(key='google_key')
[ 11748, 23645, 31803, 198, 198, 70, 31803, 796, 23645, 31803, 13, 11792, 7, 2539, 11639, 13297, 62, 2539, 11537, 628 ]
3.2
20
from __future__ import absolute_import from __future__ import division from __future__ import print_function # Imports import os import numpy as np import tensorflow as tf def run(model, X, Y, optimizer=None, nb_epochs=30, nb_batches=128): """ Run the estimator """ if optimizer is None: optim...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 2, 1846, 3742, 198, 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 11...
2.280106
1,503
""" Represents an app archive. This is an app at rest, whether it's a naked app bundle in a directory, or a zipped app bundle, or an IPA. We have a common interface to extract these apps to a temp file, then resign them, and create an archive of the same type """ import abc import biplist from bundle impor...
[ 37811, 1432, 6629, 281, 598, 15424, 13, 770, 318, 281, 598, 379, 1334, 11, 1771, 340, 338, 257, 12105, 198, 220, 220, 220, 598, 18537, 287, 257, 8619, 11, 393, 257, 1976, 3949, 598, 18537, 11, 393, 281, 27966, 13, 775, 423, 257, 1...
2.378505
2,782
from conan.tools.env import Environment def runenv_from_cpp_info(conanfile, cpp_info): """ return an Environment deducing the runtime information from a cpp_info """ dyn_runenv = Environment(conanfile) if cpp_info is None: # This happens when the dependency is a private one = BINARY_SKIP retu...
[ 6738, 369, 272, 13, 31391, 13, 24330, 1330, 9344, 628, 198, 4299, 1057, 24330, 62, 6738, 62, 20322, 62, 10951, 7, 1102, 272, 7753, 11, 269, 381, 62, 10951, 2599, 198, 220, 220, 220, 37227, 1441, 281, 9344, 4648, 25648, 262, 19124, 1...
2.438746
351
""" ********************************************************************************** List model ********************************************************************************** """ from enum import Enum from dataclasses import dataclass from uuid import UUID from datetime import datetime
[ 37811, 198, 17174, 17174, 8412, 1174, 198, 8053, 2746, 198, 17174, 17174, 8412, 1174, 198, 37811, 198, 198, 6738, 33829, 1330, 2039, 388, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 6738, 334, 27112, 1330, 471, 27586, 198, ...
6.276596
47
# -*- coding: utf-8 -*- """ Automation task as a AppDaemon App for Home Assistant - current meter PEAK POWER notifications """ import datetime as dt from enum import IntEnum import appdaemon.plugins.hass.hassapi as hass LOG_LEVEL = "INFO" LOG_LEVEL_ALERT = "WARNING" LOGGER = "special_event_log" COEF_CRITICAL_LIMIT ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 38062, 341, 4876, 355, 257, 2034, 26531, 7966, 2034, 329, 5995, 15286, 532, 198, 14421, 16430, 18468, 10206, 40295, 19605, 198, 37811, 198, 11748, 4818, 8079, ...
2.415771
279
# -*- test-case-name: twisted.internet.test -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ This module provides support for Twisted to interact with the glib/gtk2 mainloop. In order to use this support, simply do the following:: | from twisted.internet import gtk2reactor | ...
[ 2, 532, 9, 12, 1332, 12, 7442, 12, 3672, 25, 19074, 13, 37675, 13, 9288, 532, 9, 12, 198, 2, 15069, 357, 66, 8, 40006, 24936, 46779, 13, 198, 2, 4091, 38559, 24290, 329, 3307, 13, 628, 198, 37811, 198, 1212, 8265, 3769, 1104, 32...
2.979268
820
""" Setup: - Import Libraries - Setup tf on multiple cores - Import Data """ import pandas as pd import numpy as np import tensorflow as tf import seaborn as sns from time import time import multiprocessing import random import os from tensorflow.keras.models import Sequential from tensorflow.keras.layer...
[ 37811, 198, 40786, 25, 198, 220, 220, 220, 532, 17267, 46267, 198, 220, 220, 220, 532, 31122, 48700, 319, 3294, 21758, 198, 220, 220, 220, 532, 17267, 6060, 198, 37811, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152...
2.360976
1,845
# This example show how to use inline keyboards and process button presses import telebot import time from telebot.types import InlineKeyboardMarkup, InlineKeyboardButton import os, sys from PIL import Image, ImageDraw, ImageFont import random TELEGRAM_TOKEN = '1425859530:AAF5MQE87Zg_bv3B2RLe3Vl2A5rMz6vYpsA' ...
[ 2, 770, 1672, 905, 703, 284, 779, 26098, 34512, 290, 1429, 4936, 31048, 201, 198, 11748, 5735, 13645, 201, 198, 11748, 640, 201, 198, 6738, 5735, 13645, 13, 19199, 1330, 554, 1370, 9218, 3526, 9704, 929, 11, 554, 1370, 9218, 3526, 218...
2.525714
175
from rectangle2 import rectangle_area
[ 6738, 35991, 17, 1330, 35991, 62, 20337, 198 ]
4.75
8
# -*- coding: utf-8 -*- from unittest import TestCase, TestLoader from radio import (Radio, ListenerNotFound, ReplyHandlerAlreadyBound, HandlerAlreadyBound) suite = TestLoader().loadTestsFromTestCase(TestRadioRequestReplyMethods)
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 555, 715, 395, 1330, 6208, 20448, 11, 6208, 17401, 198, 198, 6738, 5243, 1330, 357, 26093, 11, 7343, 877, 3673, 21077, 11, 14883, 25060, 37447, 49646, 11, 198...
2.865169
89
import sys from typing import Sequence import pytest from jina import Request, QueryLang, Document from jina.clients.request import request_generator from jina.proto import jina_pb2 from jina.proto.jina_pb2 import EnvelopeProto from jina.types.message import Message from jina.types.request import _trigger_fields from...
[ 11748, 25064, 198, 6738, 19720, 1330, 45835, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 474, 1437, 1330, 19390, 11, 43301, 43, 648, 11, 16854, 198, 6738, 474, 1437, 13, 565, 2334, 13, 25927, 1330, 2581, 62, 8612, 1352, 198, 6738, 4...
3.324074
108
import os import sys DIR_OF_THIS_SCRIPT = os.path.abspath( os.path.dirname( __file__ ) )
[ 11748, 28686, 198, 11748, 25064, 198, 198, 34720, 62, 19238, 62, 43559, 62, 6173, 46023, 796, 28686, 13, 6978, 13, 397, 2777, 776, 7, 28686, 13, 6978, 13, 15908, 3672, 7, 11593, 7753, 834, 1267, 1267, 628 ]
2.459459
37
from distutils.core import setup setup( name='utils', version='1.0.0', author='Mirco Tracolli', author_email='mirco.tracolli@pg.infn.it', packages=[ 'utils', ], scripts=[], url='https://github.com/Cloud-PG/smart-cache', license='Apache 2.0 License', description='Utils fo...
[ 6738, 1233, 26791, 13, 7295, 1330, 9058, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 11639, 26791, 3256, 198, 220, 220, 220, 2196, 11639, 16, 13, 15, 13, 15, 3256, 198, 220, 220, 220, 1772, 11639, 27453, 1073, 833, 330, 692, 72, ...
2.504065
246
"""Support for Eight Sleep binary sensors.""" from __future__ import annotations import logging from pyeight.eight import EightSleep from homeassistant.components.binary_sensor import ( BinarySensorDeviceClass, BinarySensorEntity, ) from homeassistant.core import HomeAssistant from homeassistant.helpers.enti...
[ 37811, 15514, 329, 18087, 17376, 13934, 15736, 526, 15931, 198, 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 11748, 18931, 198, 198, 6738, 279, 5948, 432, 13, 26022, 1330, 18087, 40555, 198, 198, 6738, 1363, 562, 10167, 13, 5589, 3906,...
3.635838
173
# This file is part of the CERN Indico plugins. # Copyright (C) 2014 - 2022 CERN # # The CERN Indico plugins are free software; you can redistribute # them and/or modify them under the terms of the MIT License; see # the LICENSE file for more details. from unittest.mock import MagicMock import pytest from requests.ex...
[ 2, 770, 2393, 318, 636, 286, 262, 327, 28778, 1423, 3713, 20652, 13, 198, 2, 15069, 357, 34, 8, 1946, 532, 33160, 327, 28778, 198, 2, 198, 2, 383, 327, 28778, 1423, 3713, 20652, 389, 1479, 3788, 26, 345, 460, 17678, 4163, 198, 2, ...
3.322581
155
# _*_ coding: utf-8 _*_ # --------------------------- __author__ = 'StormSha' __date__ = '2018/3/28 18:01' # --------------------------- # -------------------------django---------------------- from django.conf.urls import url from .views import OrgView, AddUserAskView, OrgHomeView, OrgCourseView, OrgDescView, OrgTeach...
[ 2, 4808, 9, 62, 19617, 25, 3384, 69, 12, 23, 4808, 9, 62, 198, 2, 220, 22369, 6329, 198, 834, 9800, 834, 796, 705, 32173, 2484, 64, 6, 198, 834, 4475, 834, 796, 705, 7908, 14, 18, 14, 2078, 1248, 25, 486, 6, 198, 2, 220, 223...
2.592751
469
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, 9945, 13, 2...
2.857143
49
import FWCore.ParameterSet.Config as cms # handle normal mixing or premixing # change assumptions about lumi rate # turnon = True enables default, False disables # recalibration and darkening always together # needs lumi to set proper ZS thresholds (tbd)
[ 11748, 48849, 14055, 13, 36301, 7248, 13, 16934, 355, 269, 907, 198, 198, 2, 5412, 3487, 17090, 393, 4199, 844, 278, 198, 198, 2, 1487, 14895, 546, 300, 12994, 2494, 198, 198, 2, 1210, 261, 796, 6407, 13536, 4277, 11, 10352, 595, 29...
3.7
70
import numpy as np import xml.etree.ElementTree as ET if __name__ == '__main__': robot = MuJoCoXmlRobot('mujoco_assets/hopper.xml') params = list(1.0 * np.array(robot.get_params())) robot.update(params, 'mujoco_assets/hopper_test.xml') assert robot.get_params() == params #assert robot.get_height()...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 35555, 13, 316, 631, 13, 20180, 27660, 355, 12152, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 9379, 796, 8252, 9908, 7222, 55, 4029, 14350, 313, 1...
2.220202
990
''' Load User Middleware''' from masonite.facades.Auth import Auth
[ 7061, 6, 8778, 11787, 6046, 1574, 7061, 6, 198, 6738, 285, 888, 578, 13, 38942, 2367, 13, 30515, 1330, 26828, 198 ]
3.190476
21
from minqlx_plugin_test import * import logging import unittest from mockito import * from mockito.matchers import * from hamcrest import * from redis import Redis from merciful_elo_limit import *
[ 6738, 949, 13976, 87, 62, 33803, 62, 9288, 1330, 1635, 198, 198, 11748, 18931, 198, 11748, 555, 715, 395, 198, 198, 6738, 15290, 10094, 1330, 1635, 198, 6738, 15290, 10094, 13, 6759, 3533, 1330, 1635, 198, 6738, 8891, 66, 2118, 1330, ...
3.258065
62
from ronglian_sms_sdk import SmsSDK from celery_tasks.main import app # # celerytask # celery(main)
[ 6738, 374, 506, 75, 666, 62, 82, 907, 62, 21282, 74, 1330, 311, 907, 10305, 42, 198, 6738, 18725, 1924, 62, 83, 6791, 13, 12417, 1330, 598, 198, 2, 220, 198, 2, 18725, 1924, 35943, 198, 2, 18725, 1924, 7, 12417, 8 ]
2.380952
42
import sublime_plugin
[ 11748, 41674, 62, 33803, 628, 628 ]
4.166667
6
# Copyright 2018 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, s...
[ 2, 15069, 2864, 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, 7330...
2.740023
1,754
# -*- coding: UTF-8 -*- import os, re, shutil, time, xbmc from resources.lib.modules import control try: import json as simplejson except: import simplejson ADDONS = os.path.join(control.HOMEPATH, 'addons')
[ 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 198, 198, 11748, 28686, 11, 302, 11, 4423, 346, 11, 640, 11, 2124, 20475, 66, 198, 6738, 4133, 13, 8019, 13, 18170, 1330, 1630, 198, 28311, 25, 1330, 33918, 355, 2829, 17752, ...
2.857143
77
""" All things for a HAP characteristic. A Characteristic is the smallest unit of the smart home, e.g. a temperature measuring or a device status. """ import logging from pyhap.const import ( HAP_PERMISSION_READ, HAP_REPR_DESC, HAP_REPR_FORMAT, HAP_REPR_IID, HAP_REPR_MAX_LEN, HAP_REPR_PERM, ...
[ 37811, 198, 3237, 1243, 329, 257, 367, 2969, 16704, 13, 198, 198, 32, 15684, 2569, 318, 262, 18197, 4326, 286, 262, 4451, 1363, 11, 304, 13, 70, 13, 198, 64, 5951, 15964, 393, 257, 3335, 3722, 13, 198, 37811, 198, 11748, 18931, 198,...
1.988914
902
dataset_type = 'UNITER_VqaDataset' data_root = '/home/datasets/mix_data/UNITER/VQA/' train_datasets = ['train'] test_datasets = ['minival'] # name not in use, but have defined one to run vqa_cfg = dict( train_txt_dbs=[ data_root + 'vqa_train.db', data_root + 'vqa_trainval.db', data_root +...
[ 19608, 292, 316, 62, 4906, 796, 705, 4944, 2043, 1137, 62, 53, 20402, 27354, 292, 316, 6, 198, 7890, 62, 15763, 796, 31051, 11195, 14, 19608, 292, 1039, 14, 19816, 62, 7890, 14, 4944, 2043, 1137, 14, 53, 48, 32, 14, 6, 198, 198, ...
1.950331
906
from django.conf import settings from django.conf.urls.static import static from django.contrib import admin from django.urls import path, include, re_path from django.views.generic import TemplateView urlpatterns = [ path('api-auth/', include('rest_framework.urls')), path('rest-auth/', include('rest_auth.urls...
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 13, 12708, 1330, 9037, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 11, 2291, 11, ...
2.490066
302
#!/bin/bash # -*- coding: UTF-8 -*- # from PyQt5.QtWebEngineWidgets import QWebEngineView from PyQt5.QtWidgets import (QApplication, QMainWindow, QWidget, QGridLayout, QMessageBox, QFileDialog, QLabel, QLineEdit, QPushButton, QComboBox, QCheckBox, QDateTimeEdit, ...
[ 2, 48443, 8800, 14, 41757, 198, 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 198, 2, 220, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 13908, 13798, 54, 312, 11407, 1330, 1195, 13908, 13798, 7680, 198, 6738, 9485, 48, 83, ...
2.620053
379
""" GpuCorrMM-based convolutional layers """ import numpy as np import theano import theano.tensor as T from theano.sandbox.cuda.basic_ops import gpu_contiguous from theano.sandbox.cuda.blas import GpuCorrMM from .. import init from .. import nonlinearities from . import base # base class for all layers that rely ...
[ 37811, 198, 38, 19944, 10606, 81, 12038, 12, 3106, 3063, 2122, 282, 11685, 198, 37811, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 262, 5733, 198, 11748, 262, 5733, 13, 83, 22854, 355, 309, 198, 6738, 262, 5733, 13, 3814...
3.071429
112
#! /usr/bin/env python # # =============================================================== # Description: Sanity check for fresh install. # # Created: 2014-08-12 16:42:52 # # Author: Ayush Dubey, dubey@cs.cornell.edu # # Copyright (C) 2013, Cornell University, see the LICENSE file # ...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 220, 198, 2, 46111, 4770, 25609, 855, 198, 2, 220, 220, 220, 12489, 25, 220, 2986, 414, 2198, 329, 4713, 2721, 13, 220, 198, 2, 220, 198, 2, 220, 220, 220, 220, 220, 220, ...
2.646302
1,244
# -*- coding: utf-8 -*- from __future__ import print_function, unicode_literals try: unicode except NameError: basestring = unicode = str # Python 3 import logging import rdflib from rdflib import compare logger = logging.getLogger("ldtools") RESET_SEQ = "\033[0m" COLOR_SEQ = "\033[1;%dm" BOLD_SEQ = "\033[...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 11, 28000, 1098, 62, 17201, 874, 198, 198, 28311, 25, 198, 220, 220, 220, 28000, 1098, 198, 16341, 6530, 12331, 25, 198, ...
2.326993
1,104
# Debug print levels for fine-grained debug trace output control DNFQUEUE = (1 << 0) # netfilterqueue DGENPKT = (1 << 1) # Generic packet handling DGENPKTV = (1 << 2) # Generic packet handling with TCP analysis DCB = (1 << 3) # Packet handlign callbacks DPROCFS = (1 << 4) # procfs DIPTBLS = (...
[ 2, 31687, 3601, 2974, 329, 3734, 12, 2164, 1328, 14257, 12854, 5072, 1630, 198, 35, 21870, 48, 8924, 8924, 796, 357, 16, 9959, 657, 8, 220, 220, 220, 220, 1303, 2010, 24455, 36560, 198, 35, 35353, 40492, 51, 796, 357, 16, 9959, 352,...
2.125749
668
''' Script for training the model ''' import tensorflow as tf import numpy as np from input import BatchGenerator from model import MultiRnn import time from datetime import datetime import os import matplotlib as mpl mpl.use('Agg') from matplotlib import pyplot as plt sum_dir = 'sum' # dir to write summary train_di...
[ 7061, 6, 198, 7391, 329, 3047, 262, 2746, 198, 7061, 6, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 5128, 1330, 347, 963, 8645, 1352, 198, 6738, 2746, 1330, 15237, 49, 20471, 198, 11748, 6...
2.132304
1,489
import os import sys import threading import time import warnings from contextlib import ExitStack import click import pendulum from dagster import __version__ from dagster.core.instance import DagsterInstance from dagster.daemon.controller import ( DEFAULT_DAEMON_HEARTBEAT_TOLERANCE_SECONDS, DagsterDaemonCont...
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 4704, 278, 198, 11748, 640, 198, 11748, 14601, 198, 6738, 4732, 8019, 1330, 29739, 25896, 198, 198, 11748, 3904, 198, 11748, 44017, 14452, 198, 6738, 48924, 1706, 1330, 11593, 9641, 834, 198, 6...
2.65
320
import sys, os sys.path.append(os.path.dirname(os.path.dirname(sys.path[0]))) from sportsreference.nfl.teams import Teams for team in Teams(): print(team.name) for player in team.roster.players: print(player.name) for game in team.schedule: print(game.dataframe) print(game.dataframe...
[ 11748, 25064, 11, 28686, 198, 17597, 13, 6978, 13, 33295, 7, 418, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 15908, 3672, 7, 17597, 13, 6978, 58, 15, 60, 22305, 198, 6738, 5701, 35790, 13, 77, 2704, 13, 660, 4105, 1330, 2469...
2.451852
135
import numpy as np import matplotlib import matplotlib.pyplot as plt import sys sys.path.append("../") from quelea import * nx = 217 ny = 133 x0 = 0 x1 = 30 # lambdas y0 = 0 y1 = 20 # lambdas xs = np.linspace(x0, x1, nx) ys = np.linspace(y0, y1, ny) # 2d array of (x, y, z, t) coords = np.array( [ [x, y, 0, 0] for ...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 11748, 25064, 198, 17597, 13, 6978, 13, 33295, 7203, 40720, 4943, 198, 6738, 8358, 293, 64, 1330, 1635...
2.19685
508
import os from absl import app from absl import flags import numpy as np import tqdm from tensorflow.keras import Model from albumentations import ( Compose, HorizontalFlip, RandomBrightness,RandomContrast, ShiftScaleRotate, ToFloat, VerticalFlip) from utils import reset_tf from eval_utils import calc_score_v...
[ 11748, 28686, 198, 6738, 2352, 75, 1330, 598, 198, 6738, 2352, 75, 1330, 9701, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 256, 80, 36020, 198, 198, 6738, 11192, 273, 11125, 13, 6122, 292, 1330, 9104, 198, 6738, 435, 65, 1713, 602...
3.160428
187
from django.conf import settings from suit import apps from suit.apps import DjangoSuitConfig from suit.menu import ParentItem, ChildItem APP_NAME = settings.APP_NAME WIKI_URL = settings.WIKI_URL
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 198, 6738, 6050, 1330, 6725, 198, 6738, 6050, 13, 18211, 1330, 37770, 50, 5013, 16934, 198, 6738, 6050, 13, 26272, 1330, 16774, 7449, 11, 5932, 7449, 198, 198, 24805, 62, 20608, 796, 6460,...
3.3
60
import h5py import numpy as np np.set_printoptions(threshold=np.nan) from shutil import copyfile copyfile("dummy_lutnet.h5", "pretrained_bin.h5") # create pretrained.h5 using datastructure from dummy.h5 bl = h5py.File("baseline_pruned.h5", 'r') #dummy = h5py.File("dummy.h5", 'r') pretrained = h5py.File("pretrained_b...
[ 11748, 289, 20, 9078, 198, 11748, 299, 32152, 355, 45941, 198, 37659, 13, 2617, 62, 4798, 25811, 7, 400, 10126, 28, 37659, 13, 12647, 8, 198, 198, 6738, 4423, 346, 1330, 4866, 7753, 198, 198, 30073, 7753, 7203, 67, 13513, 62, 75, 31...
2.235448
17,231
# Natural Language Toolkit: Interface to Weka Classsifiers # # Copyright (C) 2001-2015 NLTK Project # Author: Edward Loper <edloper@gmail.com> # URL: <http://nltk.org/> # For license information, see LICENSE.TXT """ Classifiers that make use of the external 'Weka' package. """ from __future__ import print_fu...
[ 2, 12068, 15417, 16984, 15813, 25, 26491, 284, 775, 4914, 5016, 82, 13350, 201, 198, 2, 201, 198, 2, 15069, 357, 34, 8, 5878, 12, 4626, 22879, 51, 42, 4935, 201, 198, 2, 6434, 25, 10443, 406, 3575, 1279, 276, 75, 3575, 31, 14816, ...
2.460199
402
import pandas as pd import numpy as np from src.si.util.util import label_gen __all__ = ['Dataset'] def hasLabel(self): """Returns True if the dataset constains labels (a dependent variable)""" return self.Y is not None def getNumFeatures(self): """Returns the number of features""" ...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 12351, 13, 13396, 13, 22602, 13, 22602, 1330, 6167, 62, 5235, 198, 198, 834, 439, 834, 796, 37250, 27354, 292, 316, 20520, 628, 220, 220, 220, 825, 468, ...
2.024662
1,703
""" Module: 'display' on M5 FlowUI v1.4.0-beta """ # MCU: (sysname='esp32', nodename='esp32', release='1.11.0', version='v1.11-284-g5d8e1c867 on 2019-08-30', machine='ESP32 module with ESP32') # Stubber: 1.3.1
[ 37811, 198, 26796, 25, 705, 13812, 6, 319, 337, 20, 27782, 10080, 410, 16, 13, 19, 13, 15, 12, 31361, 198, 37811, 198, 2, 13122, 52, 25, 357, 17597, 3672, 11639, 9774, 2624, 3256, 18666, 12453, 11639, 9774, 2624, 3256, 2650, 11639, ...
2.244681
94
import json, requests, datetime from cron_descriptor import get_description from .dbclient import dbclient from .JobsClient import JobsClient from .ClustersClient import ClustersClient from .WorkspaceClient import WorkspaceClient from .ScimClient import ScimClient from .LibraryClient import LibraryClient from .HiveCli...
[ 11748, 33918, 11, 7007, 11, 4818, 8079, 198, 6738, 1067, 261, 62, 20147, 1968, 273, 1330, 651, 62, 11213, 198, 198, 6738, 764, 9945, 16366, 1330, 20613, 16366, 198, 6738, 764, 41, 8158, 11792, 1330, 19161, 11792, 198, 6738, 764, 2601, ...
4
91
# -*- coding: utf-8 -*- # SkinWeights command and component editor # Copyright (C) 2018 Trevor van Hoof # Website: http://www.trevorius.com # # pyqt attribute sliders # Copyright (C) 2018 Daniele Niero # Website: http://danieleniero.com/ # # neighbour finding algorythm # Copyright (C) 2018 Jan Pijpers # Webs...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 2, 17847, 1135, 2337, 3141, 290, 7515, 5464, 201, 198, 2, 15069, 357, 34, 8, 2864, 25389, 5719, 9544, 1659, 201, 198, 2, 15887, 25, 2638, 1378, 2503, 13, 83, 18...
3.338192
343
"""AVM FRITZ!Box binary sensors.""" from __future__ import annotations from collections.abc import Callable from dataclasses import dataclass from datetime import datetime, timedelta import logging from typing import Any, Literal from fritzconnection.core.exceptions import ( FritzActionError, FritzActionFaile...
[ 37811, 10116, 44, 8782, 2043, 57, 0, 14253, 13934, 15736, 526, 15931, 198, 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 6738, 17268, 13, 39305, 1330, 4889, 540, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 6738, 4818, 80...
2.48489
3,640
from Ifc.ClassRegistry import ifc_class, ifc_abstract_class, ifc_fallback_class class Omitted: """ Marked with '*' it states that some supertype had defined that attribute, but in the subtype it is a derived (calculated) value, so it no longer makes sense to explicitely assign value to it. """ #...
[ 6738, 1002, 66, 13, 9487, 8081, 4592, 1330, 611, 66, 62, 4871, 11, 611, 66, 62, 397, 8709, 62, 4871, 11, 611, 66, 62, 7207, 1891, 62, 4871, 628, 628, 198, 4871, 440, 3291, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 2940,...
3.149701
167
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (c) 2016 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # import logging import os from io_monitor.constants import DOMAIN from io_monitor.utils.data_window import DataCollectionWindow LOG = logging.getLogger(DOMAIN)
[ 2, 43907, 25, 7400, 11338, 28, 19, 6482, 10394, 28, 19, 2705, 8658, 11338, 28, 19, 198, 2, 198, 2, 15069, 357, 66, 8, 1584, 3086, 5866, 11998, 11, 3457, 13, 198, 2, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, ...
3.030612
98
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # Copyright (c) 2018, NVIDIA 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 cop...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 2864, 383, 3012, 9552, 15417, 4816, 46665, 290, 383, 12905, 2667, 32388, 3457, 13, 1074, 13, 198, 2, 15069, 357, 66, 8, 2864, 11, 15127, 23929, 44680, 6234, 13, 220, 1439, 2489, 10395, 13,...
2.327139
3,121
from net_common import * import struct import sys if __name__ == "__main__": sock = get_connected_local_socket() path = encodeString('/dev/shm/exampleDir') # path = encodeString('/dev/null') sock.sendall(bytearray(b'\x0A')) # HASH request # sock.sendall(bytearray(b'\x01')) # choose MD5 algorithm...
[ 6738, 2010, 62, 11321, 1330, 1635, 198, 11748, 2878, 198, 11748, 25064, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 32263, 796, 651, 62, 15236, 62, 12001, 62, 44971, 3419, 628, 220, 220, 220,...
2.458647
399
# -*- coding: utf-8 -*- # Generated by Django 1.11.13 on 2018-09-11 10:05 from __future__ import unicode_literals import config.s3 from django.db import migrations, models
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 1157, 13, 1485, 319, 2864, 12, 2931, 12, 1157, 838, 25, 2713, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, ...
2.761905
63
"""Validate that number of threads in thread pools is set to 1.""" import numexpr import blosc import threadpoolctl # APIs that return previous number of threads: assert numexpr.set_num_threads(2) == 1 assert blosc.set_nthreads(2) == 1 for d in threadpoolctl.threadpool_info(): assert d["num_threads"] == 1, d
[ 37811, 7762, 20540, 326, 1271, 286, 14390, 287, 4704, 20354, 318, 900, 284, 352, 526, 15931, 198, 198, 11748, 997, 31937, 198, 11748, 698, 17500, 198, 11748, 4704, 7742, 34168, 198, 198, 2, 23113, 326, 1441, 2180, 1271, 286, 14390, 25, ...
3.07767
103
#!/usr/bin/env python """A simple viewer for Stokes patterns based on two far-field pattern files. (Possibly based on one FF pattern files if it has two requests: one for each polarization channel.)""" import os import argparse import numpy import matplotlib.pyplot as plt from antpat.reps.sphgridfun.tvecfun import TVec...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 32, 2829, 19091, 329, 520, 3369, 7572, 1912, 319, 734, 1290, 12, 3245, 3912, 3696, 13, 198, 7, 47, 20846, 1912, 319, 530, 18402, 3912, 3696, 611, 340, 468, 734, 7007, 25, 530,...
2.454424
746
'''Some helper functions for PyTorch, including: - progress_bar: progress bar mimic xlua.progress. - set_lr : set the learning rate - clip_gradient : clip gradient ''' import os import sys import time import math import torch import torch.nn as nn import torch.nn.init as init from torch.autogr...
[ 7061, 6, 4366, 31904, 5499, 329, 9485, 15884, 354, 11, 1390, 25, 201, 198, 220, 220, 220, 532, 4371, 62, 5657, 25, 4371, 2318, 26332, 2124, 40211, 13, 33723, 13, 201, 198, 220, 220, 220, 532, 900, 62, 14050, 1058, 900, 262, 4673, ...
2.57037
270
from __future__ import absolute_import, division, print_function import logging import sys logging.basicConfig( stream=sys.stdout, level=logging.DEBUG, format='%(asctime)s %(name)s-%(levelname)s: %(message)s', datefmt='%Y-%m-%d %H:%M:%S') import numpy as np import utils logger = logging.getLogger("ind...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 198, 198, 11748, 18931, 198, 11748, 25064, 198, 198, 6404, 2667, 13, 35487, 16934, 7, 198, 220, 220, 220, 4269, 28, 17597, 13, 19282, 448, 11, 198, 220, 2...
2.5
134
print('\033[7;30mOla mundo\033[m!!!')
[ 4798, 10786, 59, 44427, 58, 22, 26, 1270, 76, 46, 5031, 27943, 78, 59, 44427, 58, 76, 10185, 11537, 198 ]
1.9
20
# Copyright 2020 The Cirq Developers # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
[ 2, 15069, 12131, 383, 21239, 80, 34152, 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...
3.489796
245
import os import sys import numpy as np import iotbx.phil from cctbx import uctbx from dxtbx.model.experiment_list import ExperimentListFactory from scitbx.math import five_number_summary import dials.util from dials.array_family import flex from dials.util import Sorry, tabulate help_message = """ Examples:: d...
[ 11748, 28686, 198, 11748, 25064, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 1312, 313, 65, 87, 13, 28864, 198, 6738, 269, 310, 65, 87, 1330, 334, 310, 65, 87, 198, 6738, 288, 742, 65, 87, 13, 19849, 13, 23100, 3681, ...
2.693213
1,105
# -*- coding: utf-8 -*- from enum import Enum, IntEnum, unique import os APP_NAME = "mine2farm" NETWORK_NAME = "CenterAxis" LOG_LEVEL_CONSOLE = "WARNING" LOG_LEVEL_FILE = "INFO" APP_FOLDER = os.getenv("JESA_MINE2FARM_HOME", "C:/GitRepos/mine2farm/") LOG_FOLDER = APP_FOLDER + "app/log/" LOG_FILE = "%(asctime)_" + AP...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 628, 198, 6738, 33829, 1330, 2039, 388, 11, 2558, 4834, 388, 11, 3748, 198, 11748, 28686, 628, 198, 24805, 62, 20608, 796, 366, 3810, 17, 43323, 1, 198, 12884, 33249, 62, 2...
2.264113
3,472
from django.db import models # Create your models here.
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 198, 2, 13610, 534, 4981, 994, 13 ]
3.733333
15
import base64 import io import dash import dash_core_components as dcc import dash_html_components as html import dash_bootstrap_components as dbc from dash.dependencies import Input, Output import numpy as np import tensorflow as tf from PIL import Image from constants import CLASSES import yaml with open('app.ya...
[ 11748, 2779, 2414, 198, 11748, 33245, 198, 198, 11748, 14470, 198, 11748, 14470, 62, 7295, 62, 5589, 3906, 355, 288, 535, 198, 11748, 14470, 62, 6494, 62, 5589, 3906, 355, 27711, 198, 11748, 14470, 62, 18769, 26418, 62, 5589, 3906, 355,...
2.04451
1,685
import json import requests from django.conf import settings
[ 11748, 33918, 198, 11748, 7007, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 628, 198 ]
4.2
15
print(int(input(""))**0.5)
[ 4798, 7, 600, 7, 15414, 7203, 48774, 1174, 15, 13, 20, 8 ]
2.166667
12
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 16529, 35937, 198, 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 17168, 13789, 13, 4091, 13789, 13, 14116, 287, 262, 1628, 6808, 329, 5964, 1321, 13, 19...
5.033333
120
from django.shortcuts import render,redirect,reverse from . import forms,models from django.db.models import Sum from django.contrib.auth.models import Group from django.http import HttpResponseRedirect from django.contrib.auth.decorators import login_required,user_passes_test #for showing signup/login button for te...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 445, 1060, 11, 50188, 198, 6738, 764, 1330, 5107, 11, 27530, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 1330, 5060, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, ...
2.467986
859
import os import numpy as np from paddle import fluid from ltr.models.bbreg.atom import atom_resnet50, atom_resnet18 from ltr.models.siamese.siam import siamfc_alexnet from ltr.models.siam.siam import SiamRPN_AlexNet, SiamMask_ResNet50_sharp, SiamMask_ResNet50_base from pytracking.admin.environment import env...
[ 11748, 28686, 201, 198, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 6738, 39517, 1330, 11711, 201, 198, 201, 198, 6738, 300, 2213, 13, 27530, 13, 11848, 2301, 13, 37696, 1330, 22037, 62, 411, 3262, 1120, 11, 22037, 62, 411, 326...
2.789773
176
#!/usr/bin/env python2 import sys import random import os.path import shutil import commands import types import math #gsPath = '/usr/local/bin/gs' gsPath = 'gs' logFile = '/dev/null' #logFile = 'plot.log' #--- class PsPlot(fname, pageHeader, pageSubHeader, plotsPerPage) # #--- Main # def main(): tMin = 0 ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 17, 198, 198, 11748, 25064, 198, 11748, 4738, 198, 11748, 28686, 13, 6978, 198, 11748, 4423, 346, 198, 11748, 9729, 198, 11748, 3858, 198, 11748, 10688, 198, 198, 2, 14542, 15235, 796, 31051,...
1.89604
1,212
# -*- coding: utf-8 -*- # Generated by Django 1.10.3 on 2016-11-28 06:53 from __future__ import unicode_literals from django.db import migrations
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 940, 13, 18, 319, 1584, 12, 1157, 12, 2078, 9130, 25, 4310, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, ...
2.690909
55
# Copyright 2021 Northern.tech AS # # 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 ag...
[ 2, 15069, 33448, 8342, 13, 13670, 7054, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 220, 220, 220, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 35...
2.903039
691
""" 295 find median from data stream hard """ from heapq import * sol = MedianFinder() sol.addNum(1) print(sol.findMedian()) sol.addNum(2) print(sol.findMedian())
[ 37811, 198, 25710, 198, 19796, 14288, 422, 1366, 4269, 198, 10424, 198, 37811, 198, 198, 6738, 24575, 80, 1330, 1635, 628, 628, 198, 198, 34453, 796, 26178, 37, 5540, 3419, 198, 34453, 13, 2860, 33111, 7, 16, 8, 198, 4798, 7, 34453, ...
2.625
64
import os import numpy as np import raisimpy as raisim import math import time raisim.World.setLicenseFile(os.path.dirname(os.path.abspath(__file__)) + "/../../rsc/activation.raisim") world = raisim.World() ground = world.addGround() world.setTimeStep(0.001) world.setMaterialPairProp("steel", "steel", 0.1, 1.0, 0.0) ...
[ 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2179, 271, 320, 9078, 355, 2179, 271, 320, 198, 11748, 10688, 198, 11748, 640, 198, 198, 430, 271, 320, 13, 10603, 13, 2617, 34156, 8979, 7, 418, 13, 6978, 13, 15908, 3672,...
2.103175
1,638
# Copyright 2012 Pedro Navarro Perez # Copyright 2013 Cloudbase Solutions Srl # 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...
[ 2, 15069, 2321, 28855, 13244, 34852, 23058, 198, 2, 15069, 2211, 10130, 8692, 23555, 21714, 75, 198, 2, 1439, 6923, 33876, 13, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 341...
3.242268
388
# -------------- # Importing header files import numpy as np import pandas as pd from scipy.stats import mode # code starts here bank = pd.read_csv(path) categorical_var = bank.select_dtypes(include = 'object') print(categorical_var) numerical_var = bank.select_dtypes(include = 'number') print(numeric...
[ 2, 220, 26171, 198, 2, 17267, 278, 13639, 3696, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 19798, 292, 355, 279, 67, 201, 198, 6738, 629, 541, 88, 13, 34242, 1330, 4235, 220, 201, 198, 201, 198, 201, 198, 201, 198, ...
2.389189
555
''' Training Scropt for V2C captioning task. ''' __author__ = 'Jacob Zhiyuan Fang' import os import numpy as np from opts import * from utils.utils import * import torch.optim as optim from model.Model import Model from torch.utils.data import DataLoader from utils.dataloader import VideoDataset from model.transforme...
[ 7061, 6, 13614, 1446, 305, 457, 329, 569, 17, 34, 8305, 278, 4876, 13, 705, 7061, 198, 198, 834, 9800, 834, 796, 705, 46751, 1168, 5303, 88, 7258, 24468, 6, 198, 198, 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 2172...
2.939189
148
import influxdb_client from influxdb_client import InfluxDBClient bucket = "python-client-sandbox" org = "Energy Monitor" token = "miQdAvNXHiNDVVzPzV5FpkCaR_8qdQ-L1FlPCOXQPI325Kbrh1fgfhkcDUZ4FepaebDdpZ-A1gmtnnjU0_hViA==" url = "http://localhost:9999" client = InfluxDBClient(url=url, token=token, org=org) writeApi = c...
[ 11748, 25065, 9945, 62, 16366, 198, 6738, 25065, 9945, 62, 16366, 1330, 4806, 22564, 11012, 11792, 198, 198, 27041, 316, 796, 366, 29412, 12, 16366, 12, 38142, 3524, 1, 198, 2398, 796, 366, 28925, 18289, 1, 198, 30001, 796, 366, 11632, ...
2.29717
212
# No shebang line, this module is meant to be imported # # Copyright 2014 Oliver Palmer # # 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 # # Unle...
[ 2, 1400, 673, 36668, 1627, 11, 428, 8265, 318, 4001, 284, 307, 17392, 198, 2, 198, 2, 15069, 1946, 15416, 18918, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743...
3.557377
366
# coding: utf-8 """ """ #---------------------------------------------------------------------- def klSigmode(self): """""" if self.mode == 'deal': self.canvas.updateSig(self.signalsOpen) self.mode = 'dealOpen' else: self.canvas.updateSig(self.signals) self.mode = 'deal'...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 37811, 198, 198, 37811, 198, 198, 2, 10097, 23031, 198, 4299, 479, 75, 50, 328, 14171, 7, 944, 2599, 198, 220, 220, 220, 13538, 15931, 15931, 220, 220, 220, 198, 220, 220, 220, 611, 2116, 13, ...
2.439394
132
# 2020, BackThen Maps # Coded by Remi Petitpierre https://github.com/RPetitpierre # For Bibliothque nationale de France (BnF) import cv2, thinning, os import numpy as np import pandas as pd import shapefile as shp from skimage.measure import approximate_polygon from PIL import Image, ImageDraw from utils.utils imp...
[ 2, 12131, 11, 5157, 6423, 20347, 220, 198, 2, 327, 9043, 416, 3982, 72, 4767, 270, 79, 31058, 3740, 1378, 12567, 13, 785, 14, 20031, 316, 270, 79, 31058, 198, 2, 1114, 347, 29142, 849, 4188, 2260, 68, 390, 4881, 357, 33, 77, 37, ...
2.252884
4,334
from unittest import TestCase from unittest.mock import patch from easy2fa import cli
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 8529, 198, 198, 6738, 2562, 17, 13331, 1330, 537, 72, 628 ]
3.259259
27
from torch.utils.data import TensorDataset, DataLoader, RandomSampler, SequentialSampler from bert_finetuning.data import GermanData """ ** FOR DEBUGGING ** if __name__ == "__main__": ## define data paths germeval_data_paths = { "train": "./datasets/hasoc_dataset/hasoc_german_train.csv"...
[ 6738, 28034, 13, 26791, 13, 7890, 1330, 309, 22854, 27354, 292, 316, 11, 6060, 17401, 11, 14534, 16305, 20053, 11, 24604, 1843, 16305, 20053, 201, 198, 201, 198, 6738, 275, 861, 62, 15643, 316, 46493, 13, 7890, 1330, 2679, 6601, 201, ...
2.173626
455
import torch import numpy as np import torch.utils.data as data from torch.utils.data import Subset from data.fast_mnist import create_MNIST_dataset from data.ambiguous_mnist.ambiguous_mnist_dataset import AmbiguousMNIST
[ 11748, 28034, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 13, 26791, 13, 7890, 355, 1366, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 3834, 2617, 198, 198, 6738, 1366, 13, 7217, 62, 10295, 396, 1330, 2251, 62, 39764, 8808, ...
3.15493
71
# -*- coding: utf-8 -*- import logging import datetime from flask import request, render_template from flask_jwt_extended import ( create_access_token, decode_token ) from jwt.exceptions import DecodeError from flasgger import swag_from from http import HTTPStatus from pathlib import Path from sqlalchemy.orm.e...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 18931, 198, 11748, 4818, 8079, 198, 198, 6738, 42903, 1330, 2581, 11, 8543, 62, 28243, 198, 6738, 42903, 62, 73, 46569, 62, 2302, 1631, 1330, 357, 198, 220, 220, ...
3.951872
187
import os from typing import Any, Callable, Dict import tomodachi from tomodachi import aws_sns_sqs, aws_sns_sqs_publish from tomodachi.discovery import AWSSNSRegistration from tomodachi.envelope import JsonBase
[ 11748, 28686, 198, 6738, 19720, 1330, 4377, 11, 4889, 540, 11, 360, 713, 198, 198, 11748, 284, 4666, 14299, 198, 6738, 284, 4666, 14299, 1330, 3253, 82, 62, 82, 5907, 62, 31166, 82, 11, 3253, 82, 62, 82, 5907, 62, 31166, 82, 62, 1...
2.945205
73
types_of_people = 10 x = f"There are {types_of_people} types of people." binary = "binary" do_not = "don't" y = f"Those who know {binary} and those who {do_not}." print(x) print(y) print(f"I said: {x}") print(f"I also said: '{y}'") hilarious = False joke_evaluation = "Isn't that joke so funny?! {}" print(joke_eval...
[ 19199, 62, 1659, 62, 15332, 796, 838, 198, 87, 796, 277, 1, 1858, 389, 1391, 19199, 62, 1659, 62, 15332, 92, 3858, 286, 661, 526, 198, 198, 39491, 796, 366, 39491, 1, 198, 4598, 62, 1662, 796, 366, 9099, 470, 1, 198, 88, 796, 27...
2.5
170
import base64 from google.protobuf import json_format from importlib import import_module import json import numpy as np import os import sys from mmdnn.conversion.caffe.errors import ConversionError from mmdnn.conversion.caffe.common_graph import fetch_attr_value from mmdnn.conversion.caffe.utils import get_lower_cas...
[ 11748, 2779, 2414, 198, 6738, 23645, 13, 11235, 672, 3046, 1330, 33918, 62, 18982, 198, 6738, 1330, 8019, 1330, 1330, 62, 21412, 198, 11748, 33918, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 6738, ...
3.296296
108
""" leetcode-85 0 1 , rows x cols , 1 , """ from typing import List
[ 37811, 198, 293, 316, 8189, 12, 5332, 198, 657, 220, 352, 837, 220, 15274, 2124, 951, 82, 837, 220, 352, 837, 220, 198, 37811, 198, 6738, 19720, 1330, 7343 ]
2.482759
29
# -*- coding: utf-8 -*- # Copyright (c) 2016-2018 by University of Kassel and Fraunhofer Institute for Energy Economics # and Energy System Technology (IEE), Kassel. All rights reserved. import numpy as np import pytest from pandapower.optimal_powerflow import OPFNotConverged import pandapower as pp try: impo...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 15069, 357, 66, 8, 1584, 12, 7908, 416, 2059, 286, 15035, 741, 290, 39313, 403, 71, 30288, 5136, 329, 6682, 18963, 198, 2, 290, 6682, 4482, 8987, 357, 40, 65...
1.976528
4,729
# -*- coding: utf-8 -*- # @Author: GXR # @CreateTime: 2022-01-20 # @UpdateTime: 2022-01-20 import redis import config import cookie_login from cookie_api import app red = redis.Redis( host=config.REDIS_HOST, port=config.REDIS_PORT, db=config.REDIS_DB, decode_responses=True, ) # cookie if __name_...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2488, 13838, 25, 402, 55, 49, 198, 2, 2488, 16447, 7575, 25, 33160, 12, 486, 12, 1238, 198, 2, 2488, 10260, 7575, 25, 33160, 12, 486, 12, 1238, 198, 198, 11748, ...
2.320513
156
from feemodel.app.transient import TransientOnline from feemodel.app.pools import PoolsOnlineEstimator from feemodel.app.predict import Prediction from feemodel.app.simonline import SimOnline __all__ = [ 'TransientOnline', 'PoolsOnlineEstimator', 'Prediction', 'SimOnline' ]
[ 6738, 730, 368, 375, 417, 13, 1324, 13, 7645, 1153, 1330, 3602, 1153, 14439, 198, 6738, 730, 368, 375, 417, 13, 1324, 13, 7742, 82, 1330, 350, 10141, 14439, 22362, 320, 1352, 198, 6738, 730, 368, 375, 417, 13, 1324, 13, 79, 17407, ...
2.754717
106
# -*- coding: utf-8 -*- from __future__ import unicode_literals # start tutorial from django.db import models from djng.forms import NgModelFormMixin, NgFormValidationMixin from djng.styling.bootstrap3.forms import Bootstrap3ModelForm
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 2, 923, 11808, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 782, 13, 23914, 1330, 34...
3.118421
76
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may ...
[ 2, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 201, 198, 2, 393, 517, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 201, 198, 2, 9387, 351, 428, 670, 329, 3224, 1321, 201, 198, 2, 5115, 6634, 9238, 13, ...
2.53768
1,181
import contextlib import os from collections import namedtuple import yaml from dagster import __version__ as current_dagster_version from dagster import check from .ecr import ecr_image, get_aws_account_id, get_aws_region from .utils import ( execute_docker_build, execute_docker_push, execute_docker_tag,...
[ 11748, 4732, 8019, 198, 11748, 28686, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 198, 11748, 331, 43695, 198, 6738, 48924, 1706, 1330, 11593, 9641, 834, 355, 1459, 62, 67, 363, 1706, 62, 9641, 198, 6738, 48924, 1706, 1330, 2198, 198,...
3.061453
179
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import json import logging import os import unittest from telemetry.core import browser_finder from telemetry.core import exceptions from telemetry.core ...
[ 2, 15069, 357, 66, 8, 2321, 383, 18255, 1505, 46665, 13, 1439, 2489, 10395, 13, 198, 2, 5765, 286, 428, 2723, 2438, 318, 21825, 416, 257, 347, 10305, 12, 7635, 5964, 326, 460, 307, 198, 2, 1043, 287, 262, 38559, 24290, 2393, 13, 1...
3.782946
129
import sqlite3
[ 11748, 44161, 578, 18, 628 ]
3.2
5
from django import forms from django.forms.utils import ErrorList from crits.campaigns.campaign import Campaign from crits.core.forms import add_bucketlist_to_form, add_ticket_to_form from crits.core.handlers import get_item_names, get_source_names from crits.core.user_tools import get_user_organization from crits.cor...
[ 6738, 42625, 14208, 1330, 5107, 198, 6738, 42625, 14208, 13, 23914, 13, 26791, 1330, 13047, 8053, 198, 198, 6738, 1955, 82, 13, 35012, 82, 13, 35012, 1330, 13718, 198, 6738, 1955, 82, 13, 7295, 13, 23914, 1330, 751, 62, 27041, 316, 48...
3.377622
143
"""Monte Carlo receding horizon control.""" from abc import ABC, abstractmethod from multiprocessing import Pipe, Process import gym from stable_baselines.common.vec_env import CloudpickleWrapper from aprl.common.mujoco import MujocoState, ResettableEnv def _worker(remote, parent_remote, dynamic_fn_wrapper, hor...
[ 37811, 9069, 660, 40089, 664, 8228, 17810, 1630, 526, 15931, 198, 198, 6738, 450, 66, 1330, 9738, 11, 12531, 24396, 198, 6738, 18540, 305, 919, 278, 1330, 36039, 11, 10854, 198, 198, 11748, 11550, 198, 6738, 8245, 62, 12093, 20655, 13, ...
2.25885
452
import numpy as np if __name__ == '__main__': postinList, classVec = loadDataSet() myVocabList = createVocabList(postinList) # print(setOfWords2Vec(myVocabList, postinList[0])) trainMat = [] for postinDoc in postinList: trainMat.append(setOfWords2Vec(myVocabList, postinDoc)) pr...
[ 198, 11748, 299, 32152, 355, 45941, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 628, 220, 220, 220, 1281, 259, 8053, 11, 1398, 53, 721, 796, 3440, 6601, 7248, 3419, 198, 220, 220, 220, 616, 53, 420, 397,...
2.141361
191
from .swd import SWD from .ahb import AHB from .debugger import Debugger, HaltError, NotHaltedError try: from .dwarf import ELFDebugger except ImportError: pass
[ 6738, 764, 2032, 67, 1330, 12672, 35, 198, 6738, 764, 993, 65, 1330, 28159, 33, 198, 6738, 764, 24442, 1362, 1330, 31687, 1362, 11, 367, 2501, 12331, 11, 1892, 39, 29590, 12331, 198, 28311, 25, 198, 220, 220, 220, 422, 764, 67, 5767...
2.816667
60
import subprocess subprocess.Popen(['sh', '../Switches/Switch3_On.sh'])
[ 11748, 850, 14681, 198, 7266, 14681, 13, 47, 9654, 7, 17816, 1477, 3256, 705, 40720, 10462, 9249, 14, 38978, 18, 62, 2202, 13, 1477, 6, 12962, 198 ]
2.666667
27