content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
from time import sleep from blinkt import * from pythonosc import osc_message_builder from pythonosc import udp_client sender = udp_client.SimpleUDPClient('127.0.0.1', 4559) set_all(255,0,0) show() while True: sender.send_message('/play_this', 60) sleep(.1) set_brightness(1) for i in range(5): ...
[ 6738, 640, 1330, 3993, 198, 6738, 21019, 83, 1330, 1635, 198, 6738, 21015, 17500, 1330, 267, 1416, 62, 20500, 62, 38272, 198, 6738, 21015, 17500, 1330, 334, 26059, 62, 16366, 198, 198, 82, 2194, 796, 334, 26059, 62, 16366, 13, 26437, ...
2.283133
166
from unittest import TestCase from unittest.mock import patch, MagicMock from word_vectorizer.models.model_data import ModelData from word_vectorizer.models.model_data_loader import ModelDataLoader
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 8529, 11, 6139, 44, 735, 198, 198, 6738, 1573, 62, 31364, 7509, 13, 27530, 13, 19849, 62, 7890, 1330, 9104, 6601, 198, 6738, 1573, 62, 31364, 7509,...
3.571429
56
import tensorflow as tf import numpy as np from tommy2tommy.layers import attention if __name__ == "__main__": tf.test.main()
[ 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 16667, 1820, 17, 39532, 1820, 13, 75, 6962, 1330, 3241, 628, 628, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 2...
2.74
50
import streamlit as st import math import itertools as it import pandas as pd import matplotlib.pyplot as plt import seaborn as sns import plotly.express as px from dataframe import df def data_processing(): """ Страница предварительного анализа исходных данных. """ st.title('Предварительный анали...
[ 11748, 4269, 18250, 355, 336, 198, 198, 11748, 10688, 198, 11748, 340, 861, 10141, 355, 340, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 384, 397, 1211, 355, 301...
1.758224
608
import os import yaml import typer import requests from pathlib import Path from yaspin import yaspin import subprocess from .config import config from .server import Server from .utils import get_file_sha1, init_storage, cleanup, pretty_error app = typer.Typer() @app.command("prepare") if __name__ == "__main_...
[ 11748, 28686, 198, 11748, 331, 43695, 198, 11748, 1259, 525, 198, 11748, 7007, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 331, 5126, 259, 1330, 331, 5126, 259, 198, 11748, 850, 14681, 198, 198, 6738, 764, 11250, 1330, 4566, 198, 673...
3.121495
107
''' Created on 10.08.2014 @author: Philip Peter <philip.peter@justgeek.de> As long as you retain this notice you can do whatever you want with this stuff. If we meet some day, and you think this stuff is worth it, you can buy me a beer in return Philip Peter ''' class IMDbQuery(object): ''' A generic class for ...
[ 7061, 6, 198, 41972, 319, 838, 13, 2919, 13, 4967, 198, 198, 31, 9800, 25, 14576, 5613, 1279, 28864, 541, 13, 79, 2357, 31, 3137, 469, 988, 13, 2934, 29, 198, 198, 1722, 890, 355, 345, 12377, 428, 4003, 345, 460, 466, 4232, 345, ...
2.386415
2,223
__version__ = '6.9.2'
[ 834, 9641, 834, 796, 705, 21, 13, 24, 13, 17, 6, 198 ]
1.833333
12
import sys import time import configparser from datetime import datetime from volt_meter import VoltMeter from sense_client import SenseClient from solar_edge_client import SolarEdgeClient daily_power_meter = VoltMeter(25, .03, 2.35) power_consumed_meter = VoltMeter(23, .03, 2.25) solar_output_meter = VoltMeter(17, .0...
[ 11748, 25064, 198, 11748, 640, 198, 11748, 4566, 48610, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 13161, 62, 27231, 1330, 22702, 44, 2357, 198, 6738, 2565, 62, 16366, 1330, 24956, 11792, 198, 6738, 6591, 62, 14907, 62, 16366, ...
2.767677
297
# -*- coding: utf-8 -*- # Copyright 2020 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 applic...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 201, 198, 2, 15069, 12131, 3012, 11419, 201, 198, 2, 201, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 201, 198, ...
2.049015
4,060
# grid relative from .aws import * from .azure import * from .gcp import * from .provider import *
[ 2, 10706, 3585, 198, 6738, 764, 8356, 1330, 1635, 198, 6738, 764, 1031, 495, 1330, 1635, 198, 6738, 764, 70, 13155, 1330, 1635, 198, 6738, 764, 15234, 1304, 1330, 1635, 198 ]
3.193548
31
from torch import nn from lib.layers.Replicate_unit import Replicate_unit1d from lib.layers.FC_LSTM_unit import FC_lstm_stacked from lib.layers.Conv_LSTM_unit import CONV_lstm_unit import random import torch.nn.functional as F import torch from pysc2.lib import actions import numpy as np if __name__ == "__main__": ...
[ 6738, 28034, 1330, 299, 77, 198, 6738, 9195, 13, 75, 6962, 13, 39232, 5344, 62, 20850, 1330, 18407, 5344, 62, 20850, 16, 67, 198, 6738, 9195, 13, 75, 6962, 13, 4851, 62, 43, 2257, 44, 62, 20850, 1330, 10029, 62, 75, 301, 76, 62, ...
2.391236
639
import tensorflow as tf import sonnet as snt from tensorflow_probability import distributions from crazycar.algos_tf.common import make_mlp from crazycar.algos_tf.base import BaseModel, BaseNetwork EPS = 1e-16 class Actor(BaseNetwork): """ Actor for DDPG Args: encoder: class from crazycar.enc...
[ 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 3367, 3262, 355, 264, 429, 198, 198, 6738, 11192, 273, 11125, 62, 1676, 65, 1799, 1330, 24570, 198, 198, 6738, 7165, 7718, 13, 14016, 418, 62, 27110, 13, 11321, 1330, 787, 62, 4029, 79...
2.029335
1,534
import random import os import struct from functools import partial MAX_U64 = 1 << 64 shuffle = partial( random.shuffle, random=lambda: struct.unpack("Q", os.urandom(8))[0] / MAX_U64 )
[ 11748, 4738, 198, 11748, 28686, 198, 11748, 2878, 198, 6738, 1257, 310, 10141, 1330, 13027, 198, 198, 22921, 62, 52, 2414, 796, 352, 9959, 5598, 198, 198, 1477, 18137, 796, 13027, 7, 198, 220, 220, 220, 4738, 13, 1477, 18137, 11, 4738...
2.728571
70
import os from contextlib import contextmanager from shutil import rmtree from tempfile import mkdtemp from galaxy.dependencies import ConditionalDependencies AZURE_BLOB_TEST_CONFIG = """<object_store type="azure_blob"> blah... </object_store> """ AZURE_BLOB_TEST_CONFIG_YAML = """ type: azure_blob other_attribute...
[ 11748, 28686, 198, 6738, 4732, 8019, 1330, 4732, 37153, 198, 6738, 4423, 346, 1330, 374, 16762, 631, 198, 6738, 20218, 7753, 1330, 33480, 67, 29510, 198, 198, 6738, 16161, 13, 45841, 3976, 1330, 9724, 1859, 35, 2690, 3976, 198, 198, 227...
2.469534
279
# Imports needed for evaluating expected result. from datetime import datetime, date, timedelta from decimal import Decimal from robot.api.deco import keyword from robot.utils import unicode @keyword(types=['Integer']) # type always is given as str @keyword(types=[u'INT']) # type g...
[ 2, 1846, 3742, 2622, 329, 22232, 2938, 1255, 13, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 3128, 11, 28805, 12514, 198, 6738, 32465, 1330, 4280, 4402, 198, 198, 6738, 9379, 13, 15042, 13, 12501, 78, 1330, 21179, 198, 6738, 9379, 13...
2.502513
398
import torch from . import misc
[ 11748, 28034, 198, 198, 6738, 764, 1330, 12747, 628 ]
3.777778
9
from django.urls import reverse from common.utils.tests import TestCaseUtils
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 198, 198, 6738, 2219, 13, 26791, 13, 41989, 1330, 6208, 20448, 18274, 4487, 628 ]
3.590909
22
import os from pathlib import Path import pytest import snakemake @pytest.mark.skipif( os.environ.get("GITHUB_ACTIONS", "false") == "true", reason="Broken on GitHub Actions" )
[ 11748, 28686, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 11748, 12972, 9288, 198, 11748, 17522, 15883, 628, 198, 31, 9078, 9288, 13, 4102, 13, 48267, 361, 7, 198, 220, 220, 220, 28686, 13, 268, 2268, 13, 1136, 7203, 38, 10554, 1052...
2.859375
64
from typing import Union import numpy as np
[ 6738, 19720, 1330, 4479, 198, 11748, 299, 32152, 355, 45941, 198 ]
4
11
# -*- coding:utf-8 -*- # @Time:2020/6/21 16:22 # @Author:TimVan # @File:20. Valid Parentheses.py # @Software:PyCharm # 20. Valid Parentheses.py # Given a string containing just the characters '(', ')', '{', '}', '[' and ']', # determine if the input string is valid. # An input string is valid if: # Open brackets must ...
[ 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 2, 2488, 7575, 25, 42334, 14, 21, 14, 2481, 1467, 25, 1828, 198, 2, 2488, 13838, 25, 14967, 25298, 198, 2, 2488, 8979, 25, 1238, 13, 48951, 16774, 39815, 13, 9078, 198, ...
2.597633
338
import DS1302 from machine import I2C, Pin from esp8266_i2c_lcd import I2cLcd import time DEFAULT_I2C_ADDR = 0x27 i2c = I2C(0,sda=Pin(0),scl=Pin(1),freq=400000) lcd = I2cLcd(i2c, DEFAULT_I2C_ADDR, 2, 16) ds = DS1302.DS1302(Pin(2),Pin(3),Pin(4)) while True: d=ds.DateTime() date1=str(d[0])+"-"+str(d[1])+"-"+str...
[ 11748, 17400, 12952, 17, 198, 6738, 4572, 1330, 314, 17, 34, 11, 13727, 198, 6738, 15024, 23, 25540, 62, 72, 17, 66, 62, 75, 10210, 1330, 314, 17, 66, 43, 10210, 198, 11748, 640, 198, 7206, 38865, 62, 40, 17, 34, 62, 2885, 7707, ...
1.737654
324
#!/usr/bin/python # # Filename: # # JsonToCsvConverter.py # # # Basic Usage: # # python JsonToCsvConverter.py /directory/containing/datastream/json/files # # Utilities import sys, os, re, glob, json if __name__ == '__main__': sys.exit(main())
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 198, 2, 7066, 12453, 25, 220, 198, 2, 198, 2, 220, 220, 220, 220, 449, 1559, 2514, 34, 21370, 3103, 332, 353, 13, 9078, 198, 2, 198, 2, 198, 2, 14392, 29566, 25, 198, 2, 198, 2, ...
2.278261
115
from matplotlib.pyplot import plot, show, figure, title import matplotlib as plt import numpy as np from numpy import linalg as LA from scipy.fftpack import dct, idct, fft, ifft from scipy.sparse import coo_matrix from sklearn.linear_model import Lasso import sys, random Fs = 40e3 #Sample rate duration = 1./8 N_samps...
[ 6738, 2603, 29487, 8019, 13, 9078, 29487, 1330, 7110, 11, 905, 11, 3785, 11, 3670, 198, 11748, 2603, 29487, 8019, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 299, 32152, 1330, 300, 1292, 70, 355, 9131, 198, 6738, 629,...
2.165217
460
# Portal & Balloon Msgs for Evan Intro | Dream World: Dream Forest Entrance (900010000) # Author: Tiger # "What was that? I heard something!" sm.avatarOriented("Effect/OnUserEff.img/guideEffect/evanTutorial/evanBalloon01")
[ 2, 25663, 1222, 47821, 6997, 14542, 329, 21523, 37219, 930, 7610, 2159, 25, 7610, 9115, 7232, 8132, 357, 12865, 486, 2388, 8, 198, 2, 6434, 25, 17030, 198, 198, 2, 366, 2061, 373, 326, 30, 314, 2982, 1223, 2474, 198, 5796, 13, 615, ...
3.111111
72
# -*- coding: utf-8 -*- # Copyright 2019 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Test service. Handles test related functionality. """ from __future__ import print_function import os import re import shuti...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 13130, 383, 18255, 1505, 7294, 46665, 13, 1439, 2489, 10395, 13, 198, 2, 5765, 286, 428, 2723, 2438, 318, 21825, 416, 257, 347, 10305, 12, 7635, 5964, 326, 4...
2.457842
5,598
from django.conf import settings from django.urls import path from rest_framework.routers import DefaultRouter from shop_app.apis.carousel_api import CarouselApiView from shop_app.apis.display_api import CommodityCardDisplay, CommodityDetailDisplay, CommodityCategoryDisplay app_name = 'shop_app' urlpatterns = [ ...
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 6738, 1334, 62, 30604, 13, 472, 1010, 1330, 15161, 49, 39605, 198, 198, 6738, 6128, 62, 1324, 13, 499, 271, 13, 7718, 48355, 62, 15042,...
2.391727
411
import model import data from yamlargs import expose_module expose_module(model) expose_module(data)
[ 11748, 2746, 198, 11748, 1366, 198, 198, 6738, 331, 321, 15521, 82, 1330, 15651, 62, 21412, 198, 198, 1069, 3455, 62, 21412, 7, 19849, 8, 198, 1069, 3455, 62, 21412, 7, 7890, 8, 198 ]
3.029412
34
#!/usr/bin/python # -*-coding=utf-8 from __future__ import print_function, division import unittest from onvif import ONVIFCamera, ONVIFError CAM_HOST = '10.1.3.10' CAM_PORT = 80 CAM_USER = 'root' CAM_PASS = 'password' DEBUG = False if __name__ == '__main__': unittest.main()
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 66, 7656, 28, 40477, 12, 23, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 11, 7297, 198, 11748, 555, 715, 395, 198, 198, 6738, 319, 85, 361, 1330, 6177, 12861, 4851,...
2.371901
121
import FWCore.ParameterSet.Config as cms process = cms.Process("FWLitePlots") #input stuff for Run/Lumi selection with the "JSON"-formatted files from the PVT group import FWCore.PythonUtilities.LumiList as LumiList # setup process process = cms.Process("FWLitePlots") # get JSON file correctly parced JSONfile = 'D...
[ 11748, 48849, 14055, 13, 36301, 7248, 13, 16934, 355, 269, 907, 198, 198, 14681, 796, 269, 907, 13, 18709, 7203, 24160, 43, 578, 3646, 1747, 4943, 198, 198, 2, 15414, 3404, 329, 5660, 14, 43, 12994, 6356, 351, 262, 366, 40386, 26793, ...
2.575816
521
from django.contrib.contenttypes.models import ContentType from django.core.management.base import BaseCommand
[ 6738, 42625, 14208, 13, 3642, 822, 13, 11299, 19199, 13, 27530, 1330, 14041, 6030, 198, 6738, 42625, 14208, 13, 7295, 13, 27604, 13, 8692, 1330, 7308, 21575, 628 ]
4
28
from ipypdf.widgets.node_tools import AutoTools def test_parse_text(app, pdf_nodes): """ Check that the ocr model runs and adds content properly """ doc_node = pdf_nodes[0] app.tree.remove_children(doc_node) # clear any previously defined nodes AutoTools(doc_node).extract_text() assert l...
[ 6738, 20966, 4464, 7568, 13, 28029, 11407, 13, 17440, 62, 31391, 1330, 11160, 33637, 628, 198, 4299, 1332, 62, 29572, 62, 5239, 7, 1324, 11, 37124, 62, 77, 4147, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 6822, 326, 262, 2...
2.78882
161
''' Dalvik Executable (dex) parser. References: - http://www.dalvikvm.com/ - http://code.google.com/p/androguard/source/browse/core/bytecodes/dvm.py - http://androguard.googlecode.com/hg/specs/dalvik/dex-format.html Author: Robert Xiao Creation Date: May 29, 2011 ''' from hachoir_parser import HachoirParser from hac...
[ 7061, 6, 198, 35, 282, 28930, 8393, 18187, 357, 67, 1069, 8, 30751, 13, 198, 198, 19927, 25, 198, 12, 2638, 1378, 2503, 13, 31748, 28930, 14761, 13, 785, 14, 198, 12, 2638, 1378, 8189, 13, 13297, 13, 785, 14, 79, 14, 392, 3828, ...
2.470423
355
from django.http import JsonResponse
[ 6738, 42625, 14208, 13, 4023, 1330, 449, 1559, 31077, 628, 198 ]
3.545455
11
from py_collector import Scheduler, Manager, Collector from datetime import datetime try: from pymongo.write_concern import WriteConcern from pymodm.connection import connect from pymodm import MongoModel, fields from bs4 import BeautifulSoup import requests except: raise ImportError('Please mak...
[ 6738, 12972, 62, 33327, 273, 1330, 27774, 18173, 11, 9142, 11, 17573, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 28311, 25, 198, 220, 220, 220, 422, 279, 4948, 25162, 13, 13564, 62, 1102, 30903, 1330, 19430, 3103, 30903, 198, 220, ...
2.97191
178
#!/usr/bin/env python # coding: utf-8 # # 「第1章 画像分類」の準備ファイル # # - 本ファイルでは、第1章で使用するフォルダの作成とファイルのダウンロードを行います。 # # In[1]: import os import urllib.request import zipfile # In[2]: # フォルダ「data」が存在しない場合は作成する data_dir = "./data/" if not os.path.exists(data_dir): os.mkdir(data_dir) # In[3]: # ImageNetのclass_inde...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 1303, 40283, 163, 105, 105, 16, 44165, 254, 13328, 242, 119, 161, 225, 237, 26344, 228, 165, 94, 252, 13700, 27032, 118, 244, 43636, 24...
1.655093
864
#!/usr/bin/env python # -*- coding: utf-8 -*- # --------------------------------------------------------------------- # Copyright (c) Merchise Autrement [~º/~] and Contributors # All rights reserved. # # This is free software; you can do what the LICENCE file allows you to. # from odoo import api, fields @api.model ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 16529, 30934, 198, 2, 15069, 357, 66, 8, 34414, 786, 5231, 260, 434, 685, 93, 36165, 14, 93, 60, 290, 25767, 669...
3.342857
140
# -*- coding: utf-8 -*- """Sphinx documentation plugin used to document tasks. Introduction ============ Usage ----- Add the extension to your :file:`docs/conf.py` configuration module: .. code-block:: python extensions = (..., 'celery.contrib.sphinx') If you'd like to change the prefix for ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 50, 746, 28413, 10314, 13877, 973, 284, 3188, 8861, 13, 198, 198, 21906, 198, 25609, 198, 198, 28350, 198, 30934, 198, 198, 4550, 262, 7552, 284, 534, 1058, 7753,...
3.180043
461
from flask import render_template, request, url_for, flash, redirect from flask_login import login_user, logout_user, login_required, current_user from . import auth from .. import db from ..models import User from .forms import LoginForm, RegistrationForm from ..email import send_email @auth.before_app_requ...
[ 6738, 42903, 1330, 8543, 62, 28243, 11, 2581, 11, 19016, 62, 1640, 11, 7644, 11, 18941, 201, 198, 6738, 42903, 62, 38235, 1330, 17594, 62, 7220, 11, 2604, 448, 62, 7220, 11, 17594, 62, 35827, 11, 1459, 62, 7220, 201, 198, 6738, 764,...
2.779817
218
"""GenericModel class and its child classes. The GenericModel class enables flattening of the model parameters for tracking. MLP and LeNet are example models. Add your own PyTorch model by inheriting from GenericModel and organizing it into the pytorch lightning style. """ # pylint: disable = no-member import pytorch_...
[ 37811, 46189, 17633, 1398, 290, 663, 1200, 6097, 13, 198, 198, 464, 42044, 17633, 1398, 13536, 27172, 3101, 286, 262, 2746, 10007, 329, 9646, 13, 198, 5805, 47, 290, 1004, 7934, 389, 1672, 4981, 13, 3060, 534, 898, 9485, 15884, 354, 2...
2.073674
5,918
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc from exchange import injective_insurance_rpc_pb2 as exchange_dot_injective__insurance__rpc__pb2 class InjectiveInsuranceRPCStub(object): """InjectiveInsura...
[ 2, 2980, 515, 416, 262, 308, 49, 5662, 11361, 8435, 17050, 13877, 13, 8410, 5626, 48483, 0, 198, 37811, 11792, 290, 4382, 6097, 11188, 284, 1237, 672, 3046, 12, 23211, 2594, 526, 15931, 198, 11748, 1036, 14751, 198, 198, 6738, 5163, 1...
2.509434
848
''' Created on May 27, 2016 @author: cesar ''' from scipy.stats import norm, pareto, lognorm, gamma, weibull_min, weibull_max, gengamma, expon import numpy as np from scipy.stats import kstest import sys from matplotlib import pyplot as plt from scipy import interpolate from scipy.integrate import quadrature from sci...
[ 7061, 6, 198, 41972, 319, 1737, 2681, 11, 1584, 198, 198, 31, 9800, 25, 269, 18964, 198, 7061, 6, 198, 6738, 629, 541, 88, 13, 34242, 1330, 2593, 11, 279, 533, 1462, 11, 300, 2360, 579, 11, 34236, 11, 356, 571, 724, 62, 1084, 11...
1.891247
3,016
#!/usr/bin/env python3 # Copyright 2020, Esri. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 15069, 12131, 11, 8678, 380, 13, 220, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2...
3.362847
576
""" Units Manged By Systemctl (services) ==================================== Parsers included in this module are: ListUnits - command ``/bin/systemctl list-units`` ------------------------------------------------- UnitFiles - command ``/bin/systemctl list-unit-files`` -----------------------------------------------...
[ 37811, 198, 3118, 896, 337, 5102, 2750, 4482, 34168, 357, 30416, 8, 198, 10052, 1421, 198, 198, 47, 945, 364, 3017, 287, 428, 8265, 389, 25, 198, 198, 8053, 3118, 896, 532, 3141, 7559, 14, 8800, 14, 10057, 34168, 1351, 12, 41667, 15...
2.390252
3,180
from app1.models import * from app1.util.utils import * def teachCourse(request): ''' get: http://127.0.0.1:8000/app3/teachCourse?tno=001 调用参数: tno:工号 ''' tid=request.GET.get("tno") result=Inventory.objects.filter(teachPlan__teacher__tno=tid).values("teachPlan__teach...
[ 6738, 598, 16, 13, 27530, 1330, 1635, 198, 6738, 598, 16, 13, 22602, 13, 26791, 1330, 1635, 198, 198, 4299, 4545, 49046, 7, 25927, 2599, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 220, 220, 220, 220, 651, 25, 198, 220, 220...
2.210046
219
import math import os import random import re import sys if __name__ == '__main__': fptr = open(os.environ['OUTPUT_PATH'], 'w') q = int(input()) for q_itr in range(q): s = input() result = sherlockAndAnagrams(s) fptr.write(str(result) + '\n') fptr.close()
[ 11748, 10688, 198, 11748, 28686, 198, 11748, 4738, 198, 11748, 302, 198, 11748, 25064, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 277, 20692, 796, 1280, 7, 418, 13, 268, 2268, 17816, 2606, ...
2.20438
137
# -*- coding: utf-8 -*- model = { u'ан ': 0, u'ен ': 1, u'ың ': 2, u' қа': 3, u' ба': 4, u'ай ': 5, u'нда': 6, u'ын ': 7, u' са': 8, u' ал': 9, u'ді ': 10, u'ары': 11, u'ды ': 12, u'ып ': 13, u' мұ': 14, u' бі': 15, u'асы': 16, u'да ': 17, u'най': 18, u' жа': 19, u'мұн': 20, u'ста': 21, u'ған': 2...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 19849, 796, 1391, 198, 334, 6, 16142, 22177, 705, 25, 657, 11, 198, 334, 6, 16843, 22177, 705, 25, 352, 11, 198, 334, 6, 45035, 142, 96, 705, 25, 362, 11, 198, 334...
1.43563
2,874
from django.apps import AppConfig
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
3.888889
9
import unittest from cortex_serving_client.printable_chars import remove_non_printable
[ 11748, 555, 715, 395, 198, 198, 6738, 20223, 62, 31293, 62, 16366, 13, 4798, 540, 62, 354, 945, 1330, 4781, 62, 13159, 62, 4798, 540, 628 ]
3.423077
26
import termios import socket import select import enum import sys import tty from paramiko.py3compat import u
[ 11748, 3381, 4267, 198, 11748, 17802, 198, 11748, 2922, 198, 11748, 33829, 198, 11748, 25064, 198, 11748, 256, 774, 198, 198, 6738, 5772, 12125, 13, 9078, 18, 5589, 265, 1330, 334, 198 ]
3.46875
32
from ..apibase import SlobsService from .selectionbase import SelectionBase from .selection import Selection # For the side-effects
[ 6738, 11485, 499, 571, 589, 1330, 3454, 8158, 16177, 198, 6738, 764, 49283, 8692, 1330, 29538, 14881, 198, 6738, 764, 49283, 1330, 29538, 220, 1303, 1114, 262, 1735, 12, 34435, 628 ]
4.322581
31
#!/usr/bin/env python """Estimate parameters of models that predict SchTime using available info: SchDep, SchArr, Carrier, Date, Distance, Origin and Dest coordinates.""" import numpy as np import pandas as pd from sklearn import linear_model from analysis.filter import get_jetstream def regression(year, month, ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 22362, 1920, 10007, 286, 4981, 326, 4331, 3059, 7575, 1262, 1695, 7508, 25, 3059, 12156, 11, 3059, 3163, 81, 11, 30252, 11, 220, 198, 220, 220, 220, 7536, 11, 34600, 11, 19349, ...
2.613158
380
import re text=input() lookForVars=re.compile(r"\b([_])([A-Za-z]+)\b") varNames=lookForVars.findall(text) output="" for k in range(0,len(varNames)): output+=varNames[k][1] if not k==len(varNames)-1: output+="," print(output)
[ 11748, 302, 198, 5239, 28, 15414, 3419, 198, 5460, 1890, 53, 945, 28, 260, 13, 5589, 576, 7, 81, 1, 59, 65, 26933, 62, 60, 5769, 58, 32, 12, 57, 64, 12, 89, 48688, 19415, 65, 4943, 198, 7785, 36690, 28, 5460, 1890, 53, 945, 13...
2.132743
113
########################################## # Author: Feroz Farazi (msff2@cam.ac.uk) # # Date: 07 Dec 2020 # ########################################## import configparser import pkg_resources import os ENTRDF_PROP_FILE = pkg_resources.resource_filename(__name__,os.path.join('conf','EntityRDFizer.p...
[ 29113, 7804, 2235, 198, 2, 6434, 25, 376, 3529, 89, 6755, 7761, 357, 907, 487, 17, 31, 20991, 13, 330, 13, 2724, 8, 1303, 198, 2, 7536, 25, 8753, 4280, 12131, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220,...
2.930586
461
BABELRC_CONTENT = u'''{ "presets": [ "@babel/preset-env", "@babel/preset-react" ] }''' WEBPACK_CONFIG_JS_CONTENT = u'''module.exports = { watch: true, module: { rules: [ { test: /\.js$/, exclude: /node_modules/, use: { ...
[ 4339, 33, 3698, 7397, 62, 37815, 3525, 796, 334, 7061, 6, 90, 198, 220, 220, 220, 366, 18302, 1039, 1298, 685, 198, 220, 220, 220, 220, 220, 220, 220, 44212, 65, 9608, 14, 18302, 316, 12, 24330, 1600, 44212, 65, 9608, 14, 18302, 3...
2.083434
827
############## # Setup Django import django django.setup() ############# # Test proper import threading import time import pytest from django.db import DatabaseError, connection, transaction from django.db.models import F, Subquery from app.models import Sock @pytest.mark.django_db
[ 7804, 4242, 2235, 198, 2, 31122, 37770, 198, 198, 11748, 42625, 14208, 198, 28241, 14208, 13, 40406, 3419, 628, 198, 7804, 4242, 2, 198, 2, 6208, 1774, 198, 198, 11748, 4704, 278, 198, 11748, 640, 198, 11748, 12972, 9288, 198, 6738, 4...
3.360465
86
import requests #from urlparse import urljoin from future.standard_library import install_aliases install_aliases() from urllib.parse import urljoin # curl -X POST "http://192.168.0.3:5000/api/v1/image" # -H "accept: application/json" # -H "Authorization: DEADBEEF" # -H "content-type: multipart/form-data" # -F "file=...
[ 11748, 7007, 198, 2, 6738, 19016, 29572, 1330, 19016, 22179, 198, 6738, 2003, 13, 20307, 62, 32016, 1330, 2721, 62, 7344, 1386, 198, 17350, 62, 7344, 1386, 3419, 198, 198, 6738, 2956, 297, 571, 13, 29572, 1330, 19016, 22179, 198, 198, ...
2.34292
452
#!/usr/bin/python # -*- coding: UTF-8 -*- import os, sys, requests from bs4 import BeautifulSoup from biplist import * #python在安装时,默认的编码是ascii,当程序中出现非ascii编码时,python的处理常常会报类似这样的错误。 #python没办法处理非ascii编码的,此时需要自己设置将python的默认编码,一般设置为utf8的编码格式。 reload(sys) sys.setdefaultencoding('utf8') #创建文件夹路劲 #保存Html文件 #解析用户列表 ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 198, 198, 11748, 28686, 11, 25064, 11, 7007, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 220, 198, 6738, 3182, 489, 396, 1330, 1...
1.054487
312
from setuptools import setup, find_packages with open("README.md", "r") as fh: long_description = fh.read() setup( name="bearx", version="0.1", scripts=['bearx'], author="Bartek Szmelczynski", author_email="bartek.szmelczynski@gmail.com", description=("deep learning library created in ord...
[ 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 198, 4480, 1280, 7203, 15675, 11682, 13, 9132, 1600, 366, 81, 4943, 355, 277, 71, 25, 198, 220, 220, 220, 890, 62, 11213, 796, 277, 71, 13, 961, 3419, 628, 198, 40406, ...
2.596154
260
""" sensitivity.py -- Driver to calculate the gradient of a workflow, and return it as a driver output. SensitivityDriver includes a differentiator slot where the differentiation method can be plugged. Fake finite difference is supported. """ # pylint: disable-msg=C0103 #public symbols __all__ =...
[ 37811, 198, 220, 220, 220, 14233, 13, 9078, 1377, 12434, 284, 15284, 262, 31312, 286, 257, 30798, 11, 290, 1441, 198, 220, 220, 220, 340, 355, 257, 4639, 5072, 13, 220, 198, 220, 220, 220, 220, 198, 220, 220, 220, 14173, 11365, 3210...
2.290131
2,361
import checkdata from archive.utils.mock_di_api import mock_api from archive.utils.operator_test import operator_test api = mock_api(__file__) # class instance of mock_api mock_api.print_send_msg = True # set class variable for printing api.send optest = operator_test(__file__) # config parameter msg ...
[ 11748, 2198, 7890, 198, 6738, 15424, 13, 26791, 13, 76, 735, 62, 10989, 62, 15042, 1330, 15290, 62, 15042, 198, 6738, 15424, 13, 26791, 13, 46616, 62, 9288, 1330, 10088, 62, 9288, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 15...
2.565854
205
''' Descrição: Interface para visualizar as especificações de hardware do computador Desenvolvedor: William Hoeflich Versão: 0.1 ''' # Importando as bibliotecas utilizadas no projeto from ui import Interface if __name__ == "__main__": main()
[ 7061, 6, 201, 198, 24564, 380, 16175, 28749, 25, 26491, 31215, 5874, 528, 283, 355, 1658, 431, 7790, 64, 16175, 127, 113, 274, 390, 6890, 466, 2653, 7079, 201, 198, 5960, 24330, 5634, 273, 25, 3977, 9544, 891, 33467, 201, 198, 34947, ...
2.59596
99
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
[ 2, 15069, 357, 66, 8, 33448, 350, 37382, 47, 37382, 46665, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845...
3.727273
187
#!/usr/bin/python """Inspect path to locate possible completions for cmd. Walk through the entries in the current PATH env var and look for things that might match a cmd. Argument is a text string S; we dump out any program on the path that contains S. If SHELL is set to bash, then we also test to see if any bash fun...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 37811, 818, 4443, 3108, 284, 17276, 1744, 1224, 45240, 329, 23991, 13, 198, 198, 35963, 832, 262, 12784, 287, 262, 1459, 46490, 17365, 1401, 290, 804, 329, 198, 27971, 326, 1244, 2872, 257, 2...
2.612816
1,108
# Copyright (c) 2012 iQIYI Inc. # Copyright (c) 2013 Tencent Inc. # All rights reserved. # # Author: Jingxu Chen <chenjingxu@qiyi.com> # Feng Chen <chen3feng@gmail.com> # Date: October 13, 2012 """ A helper class to get the files generated from thrift IDL files. """ import os import blade import config...
[ 2, 15069, 357, 66, 8, 2321, 1312, 48, 40, 56, 40, 3457, 13, 198, 2, 15069, 357, 66, 8, 2211, 9368, 1087, 3457, 13, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 6434, 25, 42279, 87, 84, 12555, 1279, 6607, 49940, 87, 84, 31, ...
1.873543
4,547
import sys import os from glob import glob from PIL import Image from tqdm import trange from util import util import shutil image_path = sys.argv[1] path_trainA = os.path.join(image_path,'trainA') path_trainB = os.path.join(image_path,'trainB') path_testA = os.path.join(image_path,'testA') path_testB = os.path.join(i...
[ 11748, 25064, 198, 11748, 28686, 198, 6738, 15095, 1330, 15095, 198, 6738, 350, 4146, 1330, 7412, 198, 6738, 256, 80, 36020, 1330, 491, 858, 198, 6738, 7736, 1330, 7736, 198, 11748, 4423, 346, 198, 198, 9060, 62, 6978, 796, 25064, 13, ...
2.253275
458
#!/usr/bin/env python # # Copyright @2014 blackshirtmuslim@yahoo.com # Licensed: see Python license """Module to handle json services.""" import datetime import json import peewee import tornado.web import tornado.escape from dompetku.handler import base from dompetku.utils import jsonify from dompetku.model import ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 2, 15069, 2488, 4967, 2042, 15600, 14664, 2475, 31, 40774, 13, 785, 198, 2, 49962, 25, 766, 11361, 5964, 198, 198, 37811, 26796, 284, 5412, 33918, 2594, 526, 15931, 198, 198, ...
3.445455
110
""" Test all test files. """ # import glob # import unittest # # test_files = glob.glob('test_*.py') # module_strings = [test_file[0:len(test_file)-3] for test_file in test_files] # suites = [unittest.defaultTestLoader.loadTestsFromName(test_file) for test_file in module_strings] # testSuite = unittest.TestSuite(suite...
[ 37811, 198, 14402, 477, 1332, 3696, 13, 198, 37811, 198, 198, 2, 1330, 15095, 198, 2, 1330, 555, 715, 395, 198, 2, 198, 2, 1332, 62, 16624, 796, 15095, 13, 4743, 672, 10786, 9288, 62, 24620, 9078, 11537, 198, 2, 8265, 62, 37336, 7...
2.753623
138
YStepsPerBlock = 225 XStepsPerBlock = 227 Delay = 0.0008
[ 56, 8600, 82, 5990, 12235, 796, 18500, 198, 55, 8600, 82, 5990, 12235, 796, 30989, 198, 13856, 323, 796, 657, 13, 830, 23, 198, 220, 220, 220, 220 ]
2.178571
28
""" @brief test tree node (time=5s) """ import sys import os import unittest import warnings import time try: from pstats import SortKey except ImportError: # python < 3.7 from pyquickhelper.pycode.profiling import SortKey import pandas from pyquickhelper.pycode import ExtTestCase from pyquickhelper.pa...
[ 37811, 198, 31, 65, 3796, 220, 220, 220, 220, 220, 1332, 5509, 10139, 357, 2435, 28, 20, 82, 8, 198, 37811, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 555, 715, 395, 198, 11748, 14601, 198, 11748, 640, 198, 28311, 25, 198, 22...
2.903226
186
upper_leg = RigidBody('Upper Leg', upper_leg_mass_center, upper_leg_frame, upper_leg_mass, upper_leg_central_inertia) torso = RigidBody('Torso', torso_mass_center, torso_frame, torso_mass, torso_central_inertia)
[ 45828, 62, 1455, 796, 24666, 312, 25842, 10786, 52, 2848, 3564, 3256, 6727, 62, 1455, 62, 22208, 62, 16159, 11, 6727, 62, 1455, 62, 14535, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 22...
2.172414
116
from substance import (Engine, Command) from substance.exceptions import (LinkCommandError) # Disable parsing for this command
[ 6738, 9136, 1330, 357, 13798, 11, 9455, 8, 198, 6738, 9136, 13, 1069, 11755, 1330, 357, 11280, 21575, 12331, 8, 628, 198, 220, 220, 220, 1303, 31529, 32096, 329, 428, 3141, 198 ]
4.15625
32
from django.dispatch import receiver from django.urls import resolve, reverse from django.utils.translation import gettext_lazy as _ from django.template.loader import get_template from pretix.base.middleware import _parse_csp, _merge_csp, _render_csp from pretix.presale.signals import ( html_head, process_res...
[ 6738, 42625, 14208, 13, 6381, 17147, 1330, 9733, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 10568, 11, 9575, 198, 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 651, 5239, 62, 75, 12582, 355, 4808, 198, 6738, 42625, 14208, 13, 28243,...
2.919315
409
from typing import List
[ 6738, 19720, 1330, 7343, 628, 198 ]
4.333333
6
#!/usr/bin/env python3 # Copyright (c) 2021, DeepX-inc # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and t...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 15069, 357, 66, 8, 33448, 11, 10766, 55, 12, 1939, 198, 2, 198, 2, 2297, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, 11, 351, 393, 1231, 198, 2, 17613, 11, 389, 1043...
2.788306
992
# elements_constraints_discovery.py from __future__ import print_function import pandas as pd from tdda.constraints.pdconstraints import discover_constraints, verify_df df = pd.read_csv('../testdata/elements92.csv') constraints = discover_constraints(df) with open('elements92.tdda', 'w') as f: f.write(constraint...
[ 2, 4847, 62, 1102, 2536, 6003, 62, 67, 40821, 13, 9078, 198, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 256, 1860, 64, 13, 1102, 2536, 6003, 13, 30094, 1102, 2536, 6003,...
2.645161
155
""" The class that handles model IO """ import numpy as np import antimony as sb class ModelIO: """ Class for loading and parsing models Parameters --------- model_contents : str Either the model string or the file path content_type : str, {"ModelStr...
[ 37811, 198, 220, 220, 220, 383, 1398, 326, 17105, 2746, 24418, 198, 37811, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 1885, 33969, 355, 264, 65, 628, 628, 628, 198, 198, 4871, 9104, 9399, 25, 198, 220, 220, 220, 37227, ...
2.144742
2,577
import torch import torch.nn as nn class EMA: """ Modified version of class fairseq.models.ema.EMAModule. Args: model (nn.Module): cfg (DictConfig): device (str): skip_keys (list): The keys to skip assigning averaged weights to. """ def step(self, new_model: nn.Mo...
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 628, 198, 4871, 412, 5673, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 40499, 2196, 286, 1398, 3148, 41068, 13, 27530, 13, 19687, 13, 3620, 2390, 375, 2261, 13, 628, 2...
2.071066
788
# -*- coding: utf-8 -*- """ package.module ~~~~~~~~~~~~~~ A brief description goes here. :copyright: (c) 2016 by chenxiaofeng. :license: LICENSE_NAME, see LICENSE_FILE for more details. """ from datetime import datetime from .base import db
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 220, 220, 220, 5301, 13, 21412, 198, 220, 220, 220, 220, 15116, 8728, 4907, 628, 220, 220, 220, 317, 4506, 6764, 2925, 994, 13, 628, 220, 220, 220, 1058, ...
2.75
96
# To add a new cell, type '# %%' # To add a new markdown cell, type '# %% [markdown]' # %% # Imports from BoundaryConditions.Simulation.SimulationData import getSimData from Controller.Cell.CHP_SystemThermal import CtrlDefault from GenericModel.Design import _check_pBTypes, generateGenericCell from GenericModel.PARAMET...
[ 2, 1675, 751, 257, 649, 2685, 11, 2099, 705, 2, 43313, 6, 198, 2, 1675, 751, 257, 649, 1317, 2902, 2685, 11, 2099, 705, 2, 43313, 685, 4102, 2902, 49946, 198, 2, 43313, 198, 2, 1846, 3742, 198, 6738, 30149, 560, 25559, 1756, 13, ...
2.178803
1,387
# Hey Dear , the convention of plotting the graph is different from mathematical representation # x-axis is same as x-axis and y-axis is opposite to y-axis import cv2 img = cv2.imread("/Users/abhishekraj/Downloads/xa.jpeg") # Image is just the array of pixel or matrix print(img.shape) # Resize the image imgResize =...
[ 2, 14690, 23420, 837, 262, 9831, 286, 29353, 262, 4823, 318, 1180, 422, 18069, 10552, 198, 2, 2124, 12, 22704, 318, 976, 355, 2124, 12, 22704, 290, 331, 12, 22704, 318, 6697, 284, 331, 12, 22704, 198, 11748, 269, 85, 17, 198, 198, ...
2.837963
216
from PIL import Image def quarter(filename): """ :param filename: the filename :return: redefined image """ image = Image.open(filename) width, height = image.size quarter_sized = image.resize((int(width/2), int(height/2))) quarter_sized.save('quarter_sized_%s.png' % filename.strip('....
[ 6738, 350, 4146, 1330, 7412, 628, 198, 4299, 3860, 7, 34345, 2599, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 1058, 17143, 29472, 25, 262, 29472, 198, 220, 220, 220, 1058, 7783, 25, 2266, 18156, 2939, 198, 220, 220, 220, 37227, ...
2.453333
450
import unittest from conans.test.utils.tools import TestClient from conans.paths import CONANINFO from conans.util.files import load import os
[ 11748, 555, 715, 395, 198, 6738, 369, 504, 13, 9288, 13, 26791, 13, 31391, 1330, 6208, 11792, 198, 6738, 369, 504, 13, 6978, 82, 1330, 7102, 1565, 10778, 198, 6738, 369, 504, 13, 22602, 13, 16624, 1330, 3440, 198, 11748, 28686, 628 ]
3.428571
42
""" Module to run a simulation of photodetection signals and test various filters. Classes ------- Toy : the main class to run the simulations Noise : abstract class to generate noise, see concrete subclasses WhiteNoise : generate white noise DataCycleNoise : generate noise copying it from a source array Filter : clas...
[ 37811, 198, 26796, 284, 1057, 257, 18640, 286, 2825, 375, 316, 3213, 10425, 290, 1332, 2972, 16628, 13, 198, 198, 9487, 274, 198, 26866, 198, 48236, 1058, 262, 1388, 1398, 284, 1057, 262, 27785, 198, 2949, 786, 1058, 12531, 1398, 284, ...
2.48
1,625
# Child class is able to access parent class methods and variables # When one sub-child class is extending child which extends Parent class P = Parent() P.displayP() #P.displayC() #output error as Parent doesn't inherit child methods C = Child() C.displayC() #Child class display C.displayP() #Inherited from pa...
[ 2, 5932, 1398, 318, 1498, 284, 1895, 2560, 1398, 5050, 290, 9633, 198, 2, 1649, 530, 850, 12, 9410, 1398, 318, 16610, 1200, 543, 14582, 16774, 1398, 198, 220, 220, 220, 220, 198, 198, 47, 796, 16774, 3419, 198, 47, 13, 13812, 47, ...
3.561404
171
import torch import torchvision import torch.nn.functional as F import torchvision.datasets as datasets import torchvision.transforms as transforms from torch import optim from torch import nn from torch.utils.data import DataLoader from tqdm import tqdm # Set device device = torch.device("cuda" if torch.cuda.is_...
[ 11748, 28034, 198, 11748, 28034, 10178, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 11748, 28034, 10178, 13, 19608, 292, 1039, 355, 40522, 198, 11748, 28034, 10178, 13, 7645, 23914, 355, 31408, 220, 198, 6738, 28034, 1330, 643...
2.48583
1,235
#!/usr/bin/env python3 import itertools as it, operator as op, functools as ft from collections import OrderedDict, defaultdict, deque, namedtuple from contextlib import contextmanager import os, sys, io, re, time, logging, configparser import base64, hashlib, unicodedata, math import signal, threading from pulsectl ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 340, 861, 10141, 355, 340, 11, 10088, 355, 1034, 11, 1257, 310, 10141, 355, 10117, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 11, 4277, 11600, 11, 390, 4188, 11, 3...
2.971193
243
# NÚMEROS PRIMOS # Faça um programa que leia um número inteiro e diga se ele é ou não um número primo. num = int(input('Digite um numero inteiro: ')) tot = 0 for c in range(1, num + 1): if num % c == 0: print('\033[33m', end='') tot += 1 else: print('\033[31m', end='') print(f'{c} '...
[ 2, 399, 127, 248, 29296, 2640, 4810, 3955, 2640, 198, 2, 18350, 50041, 23781, 1430, 64, 8358, 443, 544, 23781, 299, 21356, 647, 78, 493, 68, 7058, 304, 3100, 64, 384, 9766, 38251, 267, 84, 299, 28749, 23781, 299, 21356, 647, 78, 268...
2.046025
239
import click @click.group() import profiles import auth import orgs import projects import resources
[ 11748, 3904, 628, 198, 31, 12976, 13, 8094, 3419, 628, 198, 11748, 16545, 198, 11748, 6284, 198, 11748, 8745, 82, 198, 11748, 4493, 198, 11748, 4133, 198 ]
3.888889
27
""" x2sys_init - Initialize a new x2sys track database. """ from pygmt.clib import Session from pygmt.helpers import build_arg_string, fmt_docstring, kwargs_to_strings, use_alias @fmt_docstring @use_alias( D="fmtfile", E="suffix", F="force", G="discontinuity", I="spacing", N="units", R="re...
[ 37811, 198, 87, 17, 17597, 62, 15003, 532, 20768, 1096, 257, 649, 2124, 17, 17597, 2610, 6831, 13, 198, 37811, 198, 6738, 12972, 70, 16762, 13, 565, 571, 1330, 23575, 198, 6738, 12972, 70, 16762, 13, 16794, 364, 1330, 1382, 62, 853, ...
2.622961
1,594
""" MIT License Copyright (c) 2016 Santi Dsp Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distr...
[ 37811, 198, 36393, 13789, 198, 15269, 357, 66, 8, 1584, 10844, 72, 360, 2777, 198, 5990, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 198, 1659, 428, 3788, 290, 3917, 10314, 3696, 357, 1169, 366, ...
3.855856
333
import igraph as ig from igraph import Graph import numpy as np import sys, os from GraphPackage.AssistantObjects import Feature_Workhouse from GraphPackage.AssistantObjects import DynDomEntry from csb.bio.utils import rmsd from mainPackage.PathAndDir import Dir2TmpFile #from GraphPackage.Graph_Config import Path2Viter...
[ 11748, 45329, 1470, 355, 45329, 198, 6738, 45329, 1470, 1330, 29681, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 25064, 11, 28686, 198, 6738, 29681, 27813, 13, 48902, 10267, 82, 1330, 27018, 62, 12468, 4803, 198, 6738, 29681, 27813, 1...
2.484762
1,050
import sys sys.exit() print('after exit()')
[ 11748, 25064, 198, 17597, 13, 37023, 3419, 198, 4798, 10786, 8499, 8420, 3419, 11537, 628 ]
3
15
""" tests for time conversions relevant to MSISE00 """ from __future__ import annotations import datetime import typing import numpy as np from pytest import approx import sciencedates as sd T: list[typing.Any] = [datetime.datetime(2013, 7, 2, 12, 0, 0)] T.append(T[0].date()) T.append(np.datetime64(T[0])) T.append(...
[ 37811, 198, 41989, 329, 640, 32626, 5981, 284, 6579, 24352, 405, 198, 37811, 198, 198, 6738, 11593, 37443, 834, 1330, 37647, 198, 11748, 4818, 8079, 198, 11748, 19720, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 12972, 9288, 1330,...
2.739837
123
from .serializers import PokemonsSerializer,SinglePokemonSerializer from rest_framework.response import Response from rest_framework.views import APIView import json import requests # PokeList view allows the whole pokemon list to be returned. # SinglePoke view ensures that the pokemon whose id is given will return...
[ 6738, 764, 46911, 11341, 1330, 41163, 11567, 32634, 7509, 11, 28008, 48034, 32634, 7509, 198, 6738, 1334, 62, 30604, 13, 26209, 1330, 18261, 198, 6738, 1334, 62, 30604, 13, 33571, 1330, 3486, 3824, 769, 198, 11748, 33918, 198, 11748, 7007...
4.02439
82
import os add_list = ["DBAG0K-A9009ZRQC-000","DBAG0K-1900AZBJY-000"] for index in add_list: os.system("node multi_add_cart.js {} {}".format(index,len(add_list)))
[ 11748, 28686, 198, 2860, 62, 4868, 796, 14631, 35, 4339, 38, 15, 42, 12, 32, 12865, 24, 57, 49, 48, 34, 12, 830, 2430, 35, 4339, 38, 15, 42, 12, 48104, 22778, 33, 41, 56, 12, 830, 8973, 198, 198, 1640, 6376, 287, 751, 62, 4868...
2.168831
77
# Copyright 2012 New Dream Network, LLC (DreamHost) # 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, 15069, 2321, 968, 7610, 7311, 11, 11419, 357, 30571, 17932, 8, 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, 34156, 15341, 345, 743, 198, 2,...
3.004386
456
from app.extensions import sched from elasticapm import Client from flask import current_app def register_apm(name=None): """This decorator wraps a passed function with a call to the app's registered Elastic APM instance :param object: Function to be wrapped and decorator parameters by calling :type obj...
[ 6738, 598, 13, 2302, 5736, 1330, 6038, 198, 6738, 27468, 499, 76, 1330, 20985, 198, 6738, 42903, 1330, 1459, 62, 1324, 628, 198, 4299, 7881, 62, 499, 76, 7, 3672, 28, 14202, 2599, 198, 220, 220, 220, 37227, 1212, 11705, 1352, 27521, ...
3.492188
128
from boost_histogram import Histogram
[ 6738, 5750, 62, 10034, 21857, 1330, 5590, 21857, 201, 198, 201, 198 ]
3.416667
12
#!/usr/bin/python3 import numpy from tqdm import tqdm from collections import defaultdict from amr_coref.utils.logging import setup_logging, ERROR from amr_coref.coref.coref_mention_data import CorefMentionData from amr_coref.utils.data_utils import load_json from amr_coref.coref.vocab_embeddings import loa...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 11748, 299, 32152, 198, 6738, 220, 220, 256, 80, 36020, 1330, 256, 80, 36020, 198, 6738, 220, 220, 17268, 1330, 4277, 11600, 198, 6738, 220, 220, 716, 81, 62, 7295, 69, 13, 26791, 13, ...
2.142344
1,391
# +1 # +1 # This class is very simple because it does not actually generate features itself. # Instead, it simply uses the features generated by the trigger model. Currently, to represent a pair of event mentions, # it uses just the embeddings associated with the two anchors (with optional window size)
[ 198, 198, 2, 1343, 16, 628, 198, 2, 1343, 16, 198, 2, 770, 1398, 318, 845, 2829, 780, 340, 857, 407, 1682, 7716, 3033, 2346, 13, 198, 2, 5455, 11, 340, 2391, 3544, 262, 3033, 7560, 416, 262, 7616, 2746, 13, 16888, 11, 284, 2380,...
4.246575
73