content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
# -*- coding: utf-8 -*- from django.db import models from apps.registro.models.TipoDomicilio import TipoDomicilio from apps.registro.models.Localidad import Localidad from apps.registro.models.Establecimiento import Establecimiento from django.core.exceptions import ValidationError from apps.seguridad.audit import audi...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 6725, 13, 2301, 396, 305, 13, 27530, 13, 28434, 78, 35, 10179, 346, 952, 1330, 23095, 78, 35, 10179, 346, 952, 198...
2.990741
108
# 6.5 Write code using find() and string slicing (see section 6.10) to extract # the number at the end of the line below. # Convert the extracted value to a floating point number and print it out. text = "X-DSPAM-Confidence: 0.8475"; pos = text.find(':') text = float(text[pos+1:]) print text
[ 2, 718, 13, 20, 19430, 2438, 1262, 1064, 3419, 290, 4731, 49289, 357, 3826, 2665, 718, 13, 940, 8, 284, 7925, 220, 198, 2, 262, 1271, 379, 262, 886, 286, 262, 1627, 2174, 13, 220, 198, 2, 38240, 262, 21242, 1988, 284, 257, 12462, ...
3.040404
99
import logging logger = logging.getLogger(__name__) print(f"!!!!!!!!!! getEffectiveLevel: {logger.getEffectiveLevel()} !!!!!!!!!!!!!") from dltb.base.observer import Observable, change from network import Network, loader from network.lucid import Network as LucidNetwork # lucid.modelzoo.vision_models: # A module ...
[ 11748, 18931, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 198, 4798, 7, 69, 1, 34635, 3228, 651, 44831, 4971, 25, 1391, 6404, 1362, 13, 1136, 44831, 4971, 3419, 92, 220, 34635, 13896, 2474, 8, 198, 198,...
3.421875
256
# -*- coding: utf-8 -*- # Copyright 2014-2016 OpenMarket Ltd # Copyright 2018-2019 New Vector Ltd # Copyright 2019 The Matrix.org Foundation C.I.C. # # 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 Licens...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 1946, 12, 5304, 4946, 27470, 12052, 198, 2, 15069, 2864, 12, 23344, 968, 20650, 12052, 198, 2, 15069, 13130, 383, 24936, 13, 2398, 5693, 327, 13, 40, 13, 34,...
2.118965
11,827
# Copyright 2017 Google Inc. 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 applicable law or a...
[ 2, 15069, 2177, 3012, 3457, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, ...
3.899522
209
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (nested_scopes, generators, division, absolute_import, with_statement, print_function, unicode_literals) import os import sub...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 1946, 41689, 1628, 20420, 357, 3826, 27342, 9865, 3843, 20673, 13, 9132, 737, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 3826, 38559, 24290, 737, 198, 198, 6738, 1...
3.327434
226
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 12131, 383, 3012, 4992, 46665, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, ...
3.408019
424
import os import sys import time from IPython.display import Image import matplotlib.pyplot as plt import numpy as np import pandas as pd import seaborn as sb sb.set_style("dark") #### Initial Setup #### #plant info plant_info = pd.read_csv('../data/plant_data.csv') plant_info.index.name = 'plant_index' plants = pla...
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 640, 198, 198, 6738, 6101, 7535, 13, 13812, 1330, 7412, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67,...
2.832108
1,632
import warnings from collections import OrderedDict from distutils.version import LooseVersion from functools import partial from inspect import isclass from typing import Callable, Optional, Dict, Union import numpy as np import torch import tqdm from torch import Tensor, nn from torch.nn import functional as F from...
[ 11748, 14601, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 6738, 1233, 26791, 13, 9641, 1330, 6706, 577, 14815, 198, 6738, 1257, 310, 10141, 1330, 13027, 198, 6738, 10104, 1330, 318, 4871, 198, 6738, 19720, 1330, 4889, 540, 11, 32...
2.83917
771
#!/usr/bin/env python # Filename: polygons_cd """ introduction: compare two polygons in to shape file authors: Huang Lingcao email:huanglingcao@gmail.com add time: 26 February, 2020 """ import sys,os from optparse import OptionParser # added path of DeeplabforRS sys.path.insert(0, os.path.expanduser('~/codes/Pychar...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 7066, 12453, 25, 25052, 684, 62, 10210, 220, 198, 37811, 198, 27427, 596, 25, 8996, 734, 25052, 684, 287, 284, 5485, 2393, 198, 198, 41617, 25, 31663, 25116, 66, 5488, 198, 12888, ...
2.485342
614
import tensorflow as tf # Convert the model. converter = tf.lite.TFLiteConverter.from_saved_model('model.py') tflite_model = converter.convert() open("trash_ai.tflite", "wb").write(tflite_model)
[ 11748, 11192, 273, 11125, 355, 48700, 198, 198, 2, 38240, 262, 2746, 13, 198, 1102, 332, 353, 796, 48700, 13, 36890, 13, 51, 3697, 578, 3103, 332, 353, 13, 6738, 62, 82, 9586, 62, 19849, 10786, 19849, 13, 9078, 11537, 198, 83, 2704,...
2.6
75
from django_cron import CronJobBase, Schedule from .models import Link from django.utils import timezone
[ 6738, 42625, 14208, 62, 66, 1313, 1330, 31683, 33308, 14881, 11, 19281, 198, 6738, 764, 27530, 1330, 7502, 198, 6738, 42625, 14208, 13, 26791, 1330, 640, 11340, 628 ]
3.785714
28
# coding: utf8 """ weasyprint.tests.stacking ------------------------- :copyright: Copyright 2011-2012 Simon Sapin and contributors, see AUTHORS. :license: BSD, see LICENSE for details. """ from __future__ import division, unicode_literals from ..stacking import StackingContext from .test_boxes impo...
[ 2, 19617, 25, 3384, 69, 23, 198, 37811, 198, 220, 220, 220, 356, 4107, 4798, 13, 41989, 13, 301, 5430, 198, 220, 220, 220, 220, 22369, 12, 628, 220, 220, 220, 1058, 22163, 4766, 25, 15069, 2813, 12, 6999, 11288, 35980, 259, 290, 2...
3.288
125
from django.shortcuts import render from django.contrib.auth.models import User from django.contrib.auth.decorators import login_required from sesame import utils from django.core.mail import send_mail
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 12501, 273, 2024, 1330, 17594, 62, 35827, 198, 6738, 264...
3.482759
58
from .custom_check import CustomCheck, CustomCheckError from typing import Any, List import logging logger = logging.getLogger(__name__)
[ 6738, 764, 23144, 62, 9122, 1330, 8562, 9787, 11, 8562, 9787, 12331, 198, 6738, 19720, 1330, 4377, 11, 7343, 198, 198, 11748, 18931, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 628, 198 ]
3.525
40
#!/usr/bin/python2.4 # Copyright (C) 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 17, 13, 19, 198, 198, 2, 15069, 357, 34, 8, 3648, 3012, 3457, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, ...
2.268473
1,624
# -*- coding: utf-8 -*- """This module contains classes for documents, and lists of documents. Documents are defined by the document rules in settings.py A file can contain one or more document. However, a document can not be constructed from more than one file. This is a limitation, obvious in cases like ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 1212, 8265, 4909, 6097, 329, 4963, 11, 290, 8341, 286, 4963, 13, 198, 220, 220, 33267, 389, 5447, 416, 262, 3188, 3173, 287, 6460, 13, 9078, 628, 220, 220, 317,...
3.417021
235
#!/usr/bin/env python3 import os import os.path import shutil import subprocess import sys import tempfile import uuid import mgm_utils if __name__ == "__main__": main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 28686, 198, 11748, 28686, 13, 6978, 198, 11748, 4423, 346, 198, 11748, 850, 14681, 198, 11748, 25064, 198, 11748, 20218, 7753, 198, 11748, 334, 27112, 198, 198, 11748, 10...
2.793651
63
""" Testing 3D tracer advection-diffusion equation with method of manufactured solution (MMS). """ from thetis import * import numpy from scipy import stats import pytest def run(setup, refinement, order, do_export=True, **options): """Run single test and return L2 error""" print_output('--- running {:} r...
[ 37811, 198, 44154, 513, 35, 491, 11736, 512, 303, 596, 12, 26069, 4241, 16022, 351, 2446, 286, 15943, 4610, 357, 44, 5653, 737, 198, 37811, 198, 6738, 262, 48010, 1330, 1635, 198, 11748, 299, 32152, 198, 6738, 629, 541, 88, 1330, 9756...
2.207198
1,945
from lxml import etree from django import forms from django.db import models
[ 6738, 300, 19875, 1330, 2123, 631, 198, 198, 6738, 42625, 14208, 1330, 5107, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 628 ]
3.590909
22
import tensorflow as tf from tensorflow import keras from keras_cv_attention_models.attention_layers import ( activation_by_name, batchnorm_with_activation, conv2d_no_bias, depthwise_conv2d_no_bias, add_pre_post_process, ) from keras_cv_attention_models import model_surgery from keras_cv_attention_m...
[ 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 11192, 273, 11125, 1330, 41927, 292, 198, 6738, 41927, 292, 62, 33967, 62, 1078, 1463, 62, 27530, 13, 1078, 1463, 62, 75, 6962, 1330, 357, 198, 220, 220, 220, 14916, 62, 1525, 62, 3672,...
2.146186
472
from pytest import raises from pydantic import ValidationError from robot_server.service.json_api.response import ( ResponseDataModel, ResponseModel, MultiResponseModel, ) from tests.service.helpers import ItemResponseModel
[ 6738, 12972, 9288, 1330, 12073, 198, 6738, 279, 5173, 5109, 1330, 3254, 24765, 12331, 198, 198, 6738, 9379, 62, 15388, 13, 15271, 13, 17752, 62, 15042, 13, 26209, 1330, 357, 198, 220, 220, 220, 18261, 6601, 17633, 11, 198, 220, 220, 2...
3.422535
71
from game.game_view import GameView from game.menu_view import menu_view from game import constants import arcade SCREEN_WIDTH = constants.SCREEN_WIDTH SCREEN_HEIGHT = constants.SCREEN_HEIGHT SCREEN_TITLE = constants.SCREEN_TITLE window = arcade.Window(SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_TITLE) start_view = menu_vi...
[ 198, 6738, 983, 13, 6057, 62, 1177, 1330, 3776, 7680, 198, 6738, 983, 13, 26272, 62, 1177, 1330, 6859, 62, 1177, 198, 6738, 983, 1330, 38491, 198, 11748, 27210, 628, 198, 6173, 2200, 1677, 62, 54, 2389, 4221, 796, 38491, 13, 6173, 2...
2.678832
137
# Copyright 2015 OpenStack Foundation # # 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 ...
[ 2, 15069, 1853, 4946, 25896, 5693, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 220, 407, 779, 428, 2393, 2845, 287, 11846, 351, 26...
2.519718
710
from concurrent.futures import TimeoutError from google.cloud import pubsub_v1 project_id = "pubsub-testing-331300" subscription_id = "test-sub" # Number of seconds the subscriber should listen for messages timeout = 5.0 subscriber = pubsub_v1.SubscriberClient() # The `subscription_path` method creates a fully qualif...
[ 6738, 24580, 13, 69, 315, 942, 1330, 3862, 448, 12331, 198, 6738, 23645, 13, 17721, 1330, 2240, 7266, 62, 85, 16, 198, 198, 16302, 62, 312, 796, 366, 12984, 7266, 12, 33407, 12, 2091, 1485, 405, 1, 198, 7266, 33584, 62, 312, 796, ...
3.246988
332
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models, _
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2142, 286, 10529, 2238, 13, 4091, 38559, 24290, 2393, 329, 1336, 6634, 290, 15665, 3307, 13, 198, 198, 6738, 16298, 2238, 1330, 40391, 11, 7032, 11, 4981, 11, 4808, ...
3.133333
45
""" Data Loader for Generating Tasks Author: Zhao Na, 2020 """ import os import random import math import glob import numpy as np import h5py as h5 import transforms3d from itertools import combinations import torch from torch.utils.data import Dataset def sample_K_pointclouds(data_path, num_point, pc_attribs, pc_...
[ 37811, 6060, 8778, 263, 329, 2980, 803, 309, 6791, 198, 198, 13838, 25, 29436, 11013, 11, 12131, 198, 37811, 198, 11748, 28686, 198, 11748, 4738, 198, 11748, 10688, 198, 11748, 15095, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 289, ...
2.403926
968
from dataclasses import dataclass from typing import List from greendoge.types.condition_opcodes import ConditionOpcode from greendoge.util.streamable import Streamable, streamable
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 6738, 19720, 1330, 7343, 198, 198, 6738, 10536, 31110, 469, 13, 19199, 13, 31448, 62, 404, 40148, 1330, 24295, 18257, 8189, 198, 6738, 10536, 31110, 469, 13, 22602, 13, 5532, 540, 133...
3.893617
47
"""The nexia integration base entity.""" from aiopvapi.resources.shade import ATTR_TYPE from homeassistant.const import ATTR_MODEL, ATTR_SW_VERSION import homeassistant.helpers.device_registry as dr from homeassistant.helpers.entity import DeviceInfo from homeassistant.helpers.update_coordinator import CoordinatorEnt...
[ 37811, 464, 497, 36072, 11812, 2779, 9312, 526, 15931, 198, 198, 6738, 257, 14922, 85, 15042, 13, 37540, 13, 1477, 671, 1330, 5161, 5446, 62, 25216, 198, 198, 6738, 1363, 562, 10167, 13, 9979, 1330, 5161, 5446, 62, 33365, 3698, 11, 51...
2.579186
221
# Xlib.ext.res -- X-Resource extension module # # Copyright (C) 2021 Aleksei Bavshin <alebastr89@gmail.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License # as published by the Free Software Foundation; either version 2.1 ...
[ 2, 1395, 8019, 13, 2302, 13, 411, 1377, 1395, 12, 26198, 7552, 8265, 201, 198, 2, 201, 198, 2, 220, 220, 220, 15069, 357, 34, 8, 33448, 9300, 74, 36455, 37313, 1477, 259, 1279, 32100, 459, 81, 4531, 31, 14816, 13, 785, 29, 201, ...
2.595607
2,003
# Process the unix command line of the pipeline. import argparse from version import rubra_version parser = argparse.ArgumentParser( description='A bioinformatics pipeline system.') parser.add_argument( 'pipeline', metavar='PIPELINE_FILE', type=str, help='Your Ruffus pipeline stages (a Python mod...
[ 2, 10854, 262, 555, 844, 3141, 1627, 286, 262, 11523, 13, 198, 198, 11748, 1822, 29572, 198, 6738, 2196, 1330, 6437, 430, 62, 9641, 198, 198, 48610, 796, 1822, 29572, 13, 28100, 1713, 46677, 7, 198, 220, 220, 220, 6764, 11639, 32, 1...
2.622793
623
import webbrowser import config from Generator import Generator if __name__ == '__main__': main()
[ 11748, 3992, 40259, 198, 11748, 4566, 198, 6738, 35986, 1330, 35986, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419, 198 ]
3.387097
31
#!/usr/bin/env python import getopt import socket import sys import cbor #from cbor2 import dumps, loads import json import time import traceback from coapthon.client.helperclient import HelperClient from coapthon.utils import parse_uri from coapthon import defines client = None paths = {} paths_extend = {} my_base ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 651, 8738, 198, 11748, 17802, 198, 11748, 25064, 198, 11748, 269, 2865, 198, 2, 6738, 269, 2865, 17, 1330, 45514, 11, 15989, 198, 11748, 33918, 198, 11748, 640, 198, 11748, 12854,...
2.162465
357
hiddenimports = ['sip', 'PyQt4.QtGui', 'PyQt4._qt'] from PyInstaller.hooks.hookutils import qt4_plugins_binaries
[ 30342, 320, 3742, 796, 37250, 82, 541, 3256, 705, 20519, 48, 83, 19, 13, 48, 83, 8205, 72, 3256, 705, 20519, 48, 83, 19, 13557, 39568, 20520, 198, 198, 6738, 9485, 15798, 263, 13, 25480, 82, 13, 25480, 26791, 1330, 10662, 83, 19, ...
2.346939
49
from PyTradier.base import BasePyTradier from typing import Union from datetime import datetime if __name__ == "__main__": from utils import printer data = MarketData() symbol = "AAPL" response = data.option_lookup(symbol) # response = data.option_strike(symbol, dates[0]) printer(response)
[ 6738, 9485, 2898, 38868, 13, 8692, 1330, 7308, 20519, 2898, 38868, 198, 6738, 19720, 1330, 4479, 198, 6738, 4818, 8079, 1330, 4818, 8079, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 422, ...
2.9
110
# Copyright 2018 Jetperch LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
[ 2, 15069, 2864, 19013, 525, 354, 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...
3.251852
270
""" Services are the heart of RPyC: each side of the connection exposes a *service*, which define the capabilities available to the other side. Note that the services by both parties need not be symmetric, e.g., one side may exposed *service A*, while the other may expose *service B*. As long as the two can interopera...
[ 37811, 198, 31007, 389, 262, 2612, 286, 371, 20519, 34, 25, 1123, 1735, 286, 262, 4637, 32142, 257, 1635, 15271, 25666, 198, 4758, 8160, 262, 9889, 1695, 284, 262, 584, 1735, 13, 198, 198, 6425, 326, 262, 2594, 416, 1111, 4671, 761, ...
3.618705
139
import unittest from testbase import TaskmatorTestBase from taskmator.task import core, util from taskmator import context if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 6738, 1332, 8692, 1330, 15941, 76, 1352, 14402, 14881, 198, 6738, 4876, 76, 1352, 13, 35943, 1330, 4755, 11, 7736, 198, 6738, 4876, 76, 1352, 1330, 4732, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 1241...
3.127273
55
"""Test discovery of entities for device-specific schemas for the Z-Wave JS integration."""
[ 37811, 14402, 9412, 286, 12066, 329, 3335, 12, 11423, 3897, 5356, 329, 262, 1168, 12, 39709, 26755, 11812, 526, 15931, 628, 628 ]
4.318182
22
from typing import Optional from botocore.client import BaseClient from typing import Dict from typing import Union from botocore.paginate import Paginator from botocore.waiter import Waiter from typing import List
[ 6738, 19720, 1330, 32233, 198, 6738, 10214, 420, 382, 13, 16366, 1330, 7308, 11792, 198, 6738, 19720, 1330, 360, 713, 198, 6738, 19720, 1330, 4479, 198, 6738, 10214, 420, 382, 13, 79, 363, 4559, 1330, 31525, 20900, 198, 6738, 10214, 420...
4
54
# Copyright 2021 Raven 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 applicable law or ...
[ 2, 15069, 33448, 12552, 46665, 13, 1439, 2489, 10395, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789,...
3.049046
367
from rest_framework import serializers from .models import *
[ 6738, 1334, 62, 30604, 1330, 11389, 11341, 201, 198, 6738, 764, 27530, 1330, 1635, 201 ]
4.133333
15
# 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
[ 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.637626
792
import unittest from api import create_app
[ 11748, 555, 715, 395, 198, 6738, 40391, 1330, 2251, 62, 1324, 198 ]
3.583333
12
from django import template from django.template.defaultfilters import stringfilter from django.utils.safestring import SafeString import markdown import urllib register = template.Library()
[ 6738, 42625, 14208, 1330, 11055, 198, 6738, 42625, 14208, 13, 28243, 13, 12286, 10379, 1010, 1330, 4731, 24455, 198, 6738, 42625, 14208, 13, 26791, 13, 49585, 395, 1806, 1330, 19978, 10100, 198, 11748, 1317, 2902, 198, 11748, 2956, 297, 5...
3.979167
48
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.CloudbusUserInfo import CloudbusUserInfo
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 33918, 198, 198, 6738, 435, 541, 323, 13, 64, 404, 13, 15042, 13, 9979, 415, 13, 22973, 34184, 1187, 1330, 163...
2.652174
69
# Generated by Django 2.2.4 on 2019-08-10 08:09 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 19, 319, 13130, 12, 2919, 12, 940, 8487, 25, 2931, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
#! /usr/bin/env python import sys import json import urllib import urllib2 import time import argparse import re # Category ID for Discrete Semiconductors > Transistors > BJTs TRANSISTOR_ID = b814751e89ff63d3 def find_total_hits(search_query): """ Function: find_total_hits -------------------- Return...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 25064, 198, 11748, 33918, 198, 11748, 2956, 297, 571, 198, 11748, 2956, 297, 571, 17, 198, 11748, 640, 198, 11748, 1822, 29572, 198, 11748, 302, 198, 198, 2, 21743, 4522,...
2.257938
2,299
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # FOGLAMP_BEGIN # See: http://foglamp.readthedocs.io/ # FOGLAMP_END """ fogbench -- a Python script used to test FogLAMP. The objective is to simulate payloads for input, REST and other requests against one or more FogLAMP instances. This version of fogbench is meant ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 376, 7730, 43, 23518, 62, 33, 43312, 198, 2, 4091, 25, 2638, 1378, 69, 28678, 696, 13, 961, 83, ...
2.43847
3,738
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2019. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modif...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 770, 2438, 318, 636, 286, 1195, 1984, 270, 13, 198, 2, 198, 2, 357, 34, 8, 15069, 19764, 13130, 13, 198, 2, 198, 2, 770, 2438, 318, 11971, 739, 262, 24843,...
2.087204
5,275
#!/usr/bin/python def meh(captcha): """Returns the sum of the digits which match the next one in the captcha input string. >>> meh('1122') 3 >>> meh('1111') 4 >>> meh('1234') 0 >>> meh('91212129') 9 """ result = 0 for n in range(len(captcha)): if captcha[n]...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 628, 198, 4299, 502, 71, 7, 27144, 11693, 2599, 198, 220, 220, 220, 37227, 35561, 262, 2160, 286, 262, 19561, 543, 2872, 262, 1306, 530, 287, 262, 48972, 198, 220, 220, 220, 5128, 4731, 13, 628,...
2.27017
1,351
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. """ Module for graph representations of crystals. """ import copy import logging import os.path import subprocess import warnings from collections import defaultdict, namedtuple from itertools import combinati...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 2, 15069, 357, 66, 8, 350, 4948, 265, 5235, 7712, 4816, 13, 198, 2, 4307, 6169, 739, 262, 2846, 286, 262, 17168, 13789, 13, 198, 198, 37811, 198, 26796, 329, 4823, 24612, 286, 24770, 13, 198, ...
2.162737
40,212
from . import image from . import container from . import system
[ 6738, 764, 1330, 2939, 198, 6738, 764, 1330, 9290, 198, 6738, 764, 1330, 1080, 198 ]
4.333333
15
from django.shortcuts import render, redirect from django.http import HttpResponse from .models import Article from django.contrib.auth.decorators import login_required from . import forms
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 18941, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 198, 6738, 764, 27530, 1330, 10172, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 12501, 273, 2024, 1330, ...
3.82
50
# Parser based on RFC 5228, especially the grammar as defined in section 8. All # references are to sections in RFC 5228 unless stated otherwise. import ply.yacc import sifter.grammar from sifter.grammar.lexer import tokens import sifter.handler import logging __all__ = ('parser',) def p_commands_list(p): """...
[ 2, 23042, 263, 1912, 319, 30978, 642, 23815, 11, 2592, 262, 23491, 355, 5447, 287, 2665, 807, 13, 1439, 198, 2, 10288, 389, 284, 9004, 287, 30978, 642, 23815, 4556, 5081, 4306, 13, 198, 198, 11748, 35960, 13, 88, 4134, 198, 198, 117...
2.243694
2,220
from sklearn import datasets from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.feature_extraction.text import CountVectorizer from sklearn.cross_validation import train_test_split from sklearn.cross_validation import cross_val_score from sklearn.cross_validation import ShuffleSplit from sklearn....
[ 6738, 1341, 35720, 1330, 40522, 198, 6738, 1341, 35720, 13, 30053, 62, 2302, 7861, 13, 5239, 1330, 309, 69, 312, 69, 38469, 7509, 198, 6738, 1341, 35720, 13, 30053, 62, 2302, 7861, 13, 5239, 1330, 2764, 38469, 7509, 198, 198, 6738, 13...
2.718901
619
import io import fast import spreadsheet import tab import utils import web from io import * from fast import * from spreadsheet import * from tab import * from utils import * from web import * __all__ = [] __all__.extend(io.__all__) __all__.extend(fast.__all__) __all__.extend(spreadsheet.__all__) __all__.extend(tab....
[ 11748, 33245, 198, 11748, 3049, 198, 11748, 30117, 198, 11748, 7400, 198, 11748, 3384, 4487, 198, 11748, 3992, 198, 198, 6738, 33245, 1330, 1635, 198, 6738, 3049, 1330, 1635, 198, 6738, 30117, 1330, 1635, 198, 6738, 7400, 1330, 1635, 198,...
2.71831
142
# (C) Copyright 2017 Inova Development Inc. # 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 appl...
[ 2, 357, 34, 8, 15069, 2177, 554, 10071, 7712, 3457, 13, 198, 2, 1439, 6923, 33876, 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.28363
617
# # All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or # its licensors. # # For complete copyright and license terms please see the LICENSE at the root of this # distribution (the "License"). All use of this software is governed by the License, # or, if provided, by the license below or th...
[ 2, 198, 2, 1439, 393, 16690, 286, 428, 2393, 15069, 357, 66, 8, 6186, 13, 785, 11, 3457, 13, 393, 663, 29116, 393, 198, 2, 663, 8240, 669, 13, 198, 2, 198, 2, 1114, 1844, 6634, 290, 5964, 2846, 3387, 766, 262, 38559, 24290, 379,...
3.746114
193
import os from QUANTAXIS.QASetting import QALocalize #from QUANTAXIS_CRAWLY.run_selenium_alone import (read_east_money_page_zjlx_to_sqllite, open_chrome_driver, close_chrome_dirver) from QUANTAXIS_CRAWLY.run_selenium_alone import * import urllib import pandas as pd import time from QUANTAXIS.QAUtil import (DATABASE) ...
[ 11748, 28686, 198, 6738, 19604, 1565, 5603, 55, 1797, 13, 48, 1921, 35463, 1330, 1195, 1847, 4374, 1096, 198, 2, 6738, 19604, 1565, 5603, 55, 1797, 62, 34, 20530, 11319, 13, 5143, 62, 741, 47477, 62, 17749, 1330, 357, 961, 62, 23316, ...
2.412587
143
#!/usr/bin/env python import logging import sys from app import app as application # Set default log level for the general logger # each handler can then restrict the messages logged application.logger.setLevel(logging.INFO) setup_flask_logging() if __name__ == '__main__': application.run()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 18931, 198, 11748, 25064, 198, 6738, 598, 1330, 598, 355, 3586, 628, 198, 198, 2, 5345, 4277, 2604, 1241, 329, 262, 2276, 49706, 198, 2, 1123, 21360, 460, 788, 4239, 262, 6218, ...
3.45977
87
#!/usr/bin/env python from game.base.being import Being
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 983, 13, 8692, 13, 11873, 1330, 11204, 628 ]
3.052632
19
# -*- coding: utf-8 -*- # Generated by Django 1.11.1 on 2017-06-25 15:10 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, 1157, 13, 16, 319, 2177, 12, 3312, 12, 1495, 1315, 25, 940, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, ...
2.690909
55
# coding: utf-8 """ Quetzal API Quetzal: an API to manage data files and their associated metadata. OpenAPI spec version: 0.5.0 Contact: support@quetz.al Generated by: https://openapi-generator.tech """ from setuptools import setup, find_packages # noqa: H301 NAME = "quetzal-openapi-client" V...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 220, 220, 220, 2264, 23773, 282, 7824, 628, 220, 220, 220, 2264, 23773, 282, 25, 281, 7824, 284, 6687, 1366, 3696, 290, 511, 3917, 20150, 13, 628, 220, 220, 220, 4946, 17614, 1...
2.672336
882
# coding: utf-8 from __future__ import unicode_literals import re from .adobepass import AdobePassIE from ..compat import compat_str from ..utils import ( fix_xml_ampersands, xpath_text, int_or_none, determine_ext, float_or_none, parse_duration, xpath_attr, update_url_query, Extrac...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 302, 198, 198, 6738, 764, 324, 672, 538, 562, 1330, 21771, 14478, 10008, 198, 6738, 11485, 5589, 265, 1330, 8330, 62, ...
2.365385
156
from alpha_vantage.timeseries import TimeSeries from pprint import pprint import json import argparse if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument('symbol', type=str, help="the stock symbol you want to download") parser.add_argument('time_window', type=str, choices=[...
[ 6738, 17130, 62, 38815, 13, 22355, 10640, 1330, 3862, 27996, 198, 6738, 279, 4798, 1330, 279, 4798, 198, 11748, 33918, 198, 11748, 1822, 29572, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, ...
2.905028
179
# Copyright The Cloud Custodian Authors. # SPDX-License-Identifier: Apache-2.0 import fnmatch from io import StringIO import json import os import shutil import zipfile import re from datetime import datetime, timedelta, tzinfo from distutils.util import strtobool import boto3 import placebo from botocore.response imp...
[ 2, 15069, 383, 10130, 40619, 375, 666, 46665, 13, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 198, 11748, 24714, 15699, 198, 6738, 33245, 1330, 10903, 9399, 198, 11748, 33918, 198, 11748, 28686, 198, 1174...
3.034205
994
from __future__ import unicode_literals, division, absolute_import from builtins import * # noqa pylint: disable=unused-import, redefined-builtin import pytest from flexget.entry import Entry # TODO Add more standard tests
[ 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 11, 7297, 11, 4112, 62, 11748, 198, 6738, 3170, 1040, 1330, 1635, 220, 1303, 645, 20402, 279, 2645, 600, 25, 15560, 28, 403, 1484, 12, 11748, 11, 2266, 18156, 12, 18780, 259,...
3.454545
66
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. """ This module define a WulffShape class to generate the Wulff shape from a lattice, a list of indices and their corresponding surface energies, and the total area and volume of the wulff shape,the weighted su...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 2, 15069, 357, 66, 8, 350, 4948, 265, 5235, 7712, 4816, 13, 198, 2, 4307, 6169, 739, 262, 2846, 286, 262, 17168, 13789, 13, 198, 198, 37811, 198, 1212, 8265, 8160, 257, 370, 377, 487, 33383, ...
2.600269
743
from app import app from flask import Flask, request, jsonify, g import sqlite3 import os import json from random import randint from flask_jwt_extended import jwt_required import datetime from flask_mysqldb import MySQL mysql = MySQL()
[ 6738, 598, 1330, 598, 198, 6738, 42903, 1330, 46947, 11, 2581, 11, 33918, 1958, 11, 308, 198, 11748, 44161, 578, 18, 198, 11748, 28686, 198, 11748, 33918, 198, 6738, 4738, 1330, 43720, 600, 198, 6738, 42903, 62, 73, 46569, 62, 2302, 1...
3.442857
70
from python_on_rails.either import as_either, Failure, Success def test_success_executes_bindings(): result = Success(1).bind(add_one).bind(times_five) assert isinstance(result, Success) assert result.value == 10 def test_a_failure_stops_the_execution_of_later_bindings(): result = Success("NaN").b...
[ 6738, 21015, 62, 261, 62, 430, 4487, 13, 31336, 1330, 355, 62, 31336, 11, 25743, 11, 16282, 628, 628, 198, 4299, 1332, 62, 13138, 62, 18558, 1769, 62, 21653, 654, 33529, 198, 220, 220, 220, 1255, 796, 16282, 7, 16, 737, 21653, 7, ...
2.89011
182
from django.db import models # Create your models here. # Station # Customers # Items # Payments
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 198, 2, 13610, 534, 4981, 994, 13, 198, 2, 9327, 198, 198, 2, 36707, 198, 198, 2, 17230, 198, 198, 2, 41318, 628, 628, 628 ]
3.212121
33
# Test definitions for Lit, the LLVM test runner. # # This is reusing the LLVM Lit test runner in the interim until the new build # rules are upstreamed. # TODO(b/136126535): remove this custom rule. """Lit runner globbing test """ load("//tensorflow:tensorflow.bzl", "filegroup") load("@bazel_skylib//lib:paths.bzl", "...
[ 2, 6208, 17336, 329, 25659, 11, 262, 27140, 15996, 1332, 17490, 13, 198, 2, 198, 2, 770, 318, 302, 3500, 262, 27140, 15996, 25659, 1332, 17490, 287, 262, 19303, 1566, 262, 649, 1382, 198, 2, 3173, 389, 28717, 276, 13, 198, 2, 16926,...
2.538023
2,104
""" These are functions to add to the configure context. """ def __checkCanLink(context, source, source_type, message_libname, real_libs=[]): """ Check that source can be successfully compiled and linked against real_libs. Keyword arguments: source -- source to try to compile source_type -- type of source file, ...
[ 37811, 198, 4711, 389, 5499, 284, 751, 284, 262, 17425, 4732, 13, 198, 37811, 198, 198, 4299, 11593, 9122, 6090, 11280, 7, 22866, 11, 2723, 11, 2723, 62, 4906, 11, 3275, 62, 8019, 3672, 11, 1103, 62, 8019, 82, 28, 21737, 2599, 198, ...
2.473997
673
# 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.466197
5,251
import os from timeit import default_timer as timer import unittest import pytest from decorator import decorator from hail.utils.java import Env import hail as hl from hail.backend.local_backend import LocalBackend _initialized = False _test_dir = os.environ.get('HAIL_TEST_RESOURCES_DIR', '../src/test/resources')...
[ 11748, 28686, 198, 6738, 640, 270, 1330, 4277, 62, 45016, 355, 19781, 198, 11748, 555, 715, 395, 198, 11748, 12972, 9288, 198, 6738, 11705, 1352, 1330, 11705, 1352, 198, 198, 6738, 32405, 13, 26791, 13, 12355, 1330, 2039, 85, 198, 11748...
2.723005
213
""" Modifications copyright (C) 2020 Michael Strobl """ import time import tensorflow as tf import numpy as np from entity_linker.models.base import Model
[ 37811, 198, 5841, 6637, 6634, 357, 34, 8, 12131, 3899, 30183, 2436, 198, 37811, 198, 198, 11748, 640, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 9312, 62, 8726, 263, 13, 27530, 13, 8...
3.488889
45
#!/usr/bin/env python import sys import parmed as pmd import numpy as np from scipy.spatial import distance if len(sys.argv) < 2: print "Usage: molecular_diameter.py <mymolecule.mol2>" exit(1) mol = pmd.load_file(sys.argv[1]) crds = mol.coordinates dist = distance.cdist(crds, crds, 'euclidean') print np.max(dist...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 25064, 198, 11748, 1582, 1150, 355, 9114, 67, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 13, 2777, 34961, 1330, 5253, 198, 198, 361, 18896, 7, 17597, 13, ...
2.384058
138
import sys import pandas as pd from simpletransformers.classification import ClassificationModel prefix = "data/" train_df = pd.read_csv(prefix + "train.csv", header=None) train_df.head() eval_df = pd.read_csv(prefix + "test.csv", header=None) eval_df.head() train_df[0] = (train_df[0] == 2).astype(int) eval_df[0]...
[ 11748, 25064, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 2829, 35636, 364, 13, 4871, 2649, 1330, 40984, 17633, 198, 198, 40290, 796, 366, 7890, 30487, 198, 198, 27432, 62, 7568, 796, 279, 67, 13, 961, 62, 40664, 7, 4...
2.40337
1,009
import networkx as nx import os.path
[ 11748, 3127, 87, 355, 299, 87, 198, 11748, 28686, 13, 6978, 628, 198 ]
3
13
import logging import uuid from django.db import models from django.urls import reverse from django.utils.encoding import force_text from django.utils.translation import ugettext_lazy as _ from model_utils.managers import InheritanceManager from mayan.apps.django_gpg.exceptions import VerificationError from mayan.ap...
[ 11748, 18931, 198, 11748, 334, 27112, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 198, 6738, 42625, 14208, 13, 26791, 13, 12685, 7656, 1330, 2700, 62, 5239, 198, 6738, 42625, 14...
3.372449
196
from ConfigParser import ConfigParser from sys import argv REPLACE_PROPERTIES = ["file_path", "database_connection", "new_file_path"] MAIN_SECTION = "app:main" if __name__ == '__main__': sync()
[ 6738, 17056, 46677, 1330, 17056, 46677, 198, 6738, 25064, 1330, 1822, 85, 198, 198, 2200, 6489, 11598, 62, 4805, 3185, 17395, 11015, 796, 14631, 7753, 62, 6978, 1600, 366, 48806, 62, 38659, 1600, 366, 3605, 62, 7753, 62, 6978, 8973, 198...
2.819444
72
# Copyright (c) 2020 Huawei Technologies Co.,Ltd. # # openGauss is licensed under Mulan PSL v2. # You can use this software according to the terms and conditions of the Mulan PSL v2. # You may obtain a copy of Mulan PSL v2 at: # # http://license.coscl.org.cn/MulanPSL2 # # THIS SOFTWARE IS PROVIDED ON AN "AS IS...
[ 2, 15069, 357, 66, 8, 12131, 43208, 21852, 1766, 1539, 43, 8671, 13, 198, 2, 198, 2, 1280, 35389, 1046, 318, 11971, 739, 17996, 272, 6599, 43, 410, 17, 13, 198, 2, 921, 460, 779, 428, 3788, 1864, 284, 262, 2846, 290, 3403, 286, ...
3.222222
270
# Original work Copyright (C) 2017 Tiancheng Zhao, Carnegie Mellon University # Modified work Copyright 2018 Weiyan Shi. import tensorflow as tf import numpy as np from nltk.translate.bleu_score import sentence_bleu from nltk.translate.bleu_score import SmoothingFunction def get_bow(embedding, avg=False): ""...
[ 2, 13745, 670, 15069, 357, 34, 8, 2177, 20834, 2395, 782, 29436, 11, 33976, 49808, 2059, 198, 2, 40499, 670, 15069, 2864, 29341, 4121, 16380, 13, 198, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 299, 32152, 355, 45941, 198, ...
2.551317
1,101
# 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 not u...
[ 2, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 198, 2, 393, 517, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 198, 2, 9387, 351, 428, 670, 329, 3224, 1321, 198, 2, 5115, 6634, 9238, 13, 220, 383, 7054,...
3.724382
283
import plotly.graph_objects as go import streamlit as st import pandas as pd from utils import * import glob import wfdb import os ANNOTATIONS_COL_NAME = 'annotations' ''' # MIT-BIH Arrhythmia DB Exploration ''' record_ids = [os.path.basename(file)[:-4] for file in glob.glob('data/*.dat')] if len(record_ids) == 0: ...
[ 11748, 7110, 306, 13, 34960, 62, 48205, 355, 467, 198, 11748, 4269, 18250, 355, 336, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 3384, 4487, 1330, 1635, 198, 11748, 15095, 198, 11748, 266, 69, 9945, 198, 11748, 28686, 198, 198, 1...
2.163886
1,678
from .config_store import ConfigStore config = ConfigStore() config.set_mqtt_broker("mqtt", 1883) config.set_redis_config("redis", 6379, 0)
[ 6738, 764, 11250, 62, 8095, 1330, 17056, 22658, 198, 198, 11250, 796, 17056, 22658, 3419, 198, 198, 11250, 13, 2617, 62, 76, 80, 926, 62, 7957, 6122, 7203, 76, 80, 926, 1600, 1248, 5999, 8, 198, 198, 11250, 13, 2617, 62, 445, 271, ...
2.6
55
# -*- coding: utf-8 -*- import socket as csocket from struct import pack,unpack from website.contrib.communication.models import *
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 17802, 355, 269, 44971, 198, 6738, 2878, 1330, 2353, 11, 403, 8002, 198, 6738, 3052, 13, 3642, 822, 13, 32560, 13, 27530, 1330, 1635, 628, 628 ]
3.268293
41
import pandas as pd import ete2 from ete2 import faces, Tree, AttrFace, TreeStyle import pylab from matplotlib.colors import hex2color, rgb2hex, hsv_to_rgb, rgb_to_hsv kelly_colors_hex = [ 0xFFB300, # Vivid Yellow 0x803E75, # Strong Purple 0xFF6800, # Vivid Orange 0xA6BDD7, # Very Light Blue 0xC100...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 304, 660, 17, 198, 6738, 304, 660, 17, 1330, 6698, 11, 12200, 11, 3460, 81, 32388, 11, 12200, 21466, 198, 11748, 279, 2645, 397, 198, 6738, 2603, 29487, 8019, 13, 4033, 669, 1330, 17910, ...
2.73756
1,246
import attr from firedrake import * import numpy as np import matplotlib.pyplot as plt import matplotlib from scipy.linalg import svd from scipy.sparse.linalg import svds from scipy.sparse import csr_matrix from slepc4py import SLEPc import pandas as pd from tqdm import tqdm import os matplotlib.use('Agg') def plot...
[ 11748, 708, 81, 198, 6738, 6294, 33788, 1330, 1635, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 2603, 29487, 8019, 198, 6738, 629, 541, 88, 13, 75, 1292, 70, 1330, 264,...
2.200237
3,371
# -*- encoding: utf-8 -*- ''' @File :_time_domain_features.py @Time :2021/04/16 20:02:55 @Author :wlgls @Version :1.0 ''' import numpy as np def statistics(data, combined=True): """Statistical features include Power, Mean, Std, 1st differece, Normalized 1st difference, 2nd difference, Norm...
[ 2, 532, 9, 12, 21004, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 7061, 6, 198, 31, 8979, 220, 220, 220, 220, 220, 220, 220, 1058, 62, 2435, 62, 27830, 62, 40890, 13, 9078, 198, 31, 7575, 220, 220, 220, 220, 220, 220, 220, 1058, ...
2.315511
3,404
from .session import Session, MutualAPI
[ 6738, 764, 29891, 1330, 23575, 11, 48807, 17614 ]
4.875
8
from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, SubmitField from wtforms.validators import InputRequired, Email, ValidationError from models import User
[ 6738, 42903, 62, 86, 27110, 1330, 46947, 8479, 198, 6738, 266, 83, 23914, 1330, 10903, 15878, 11, 30275, 15878, 11, 39900, 15878, 198, 6738, 266, 83, 23914, 13, 12102, 2024, 1330, 23412, 37374, 11, 9570, 11, 3254, 24765, 12331, 198, 673...
4.065217
46
# GENERATED BY KOMAND SDK - DO NOT EDIT import komand import json
[ 2, 24700, 1137, 11617, 11050, 509, 2662, 6981, 26144, 532, 8410, 5626, 48483, 198, 11748, 479, 296, 392, 198, 11748, 33918, 628, 198, 220, 220, 220, 220, 198, 220, 220, 220, 220, 628 ]
2.393939
33
#!/usr/bin/python3 from pyspark.sql import SparkSession from haychecker.dhc.metrics import rule spark = SparkSession.builder.appName("rule_example").getOrCreate() df = spark.read.format("csv").option("header", "true").load("examples/resources/employees.csv") df.show() condition1 = {"column": "salary", "operator": ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 6738, 279, 893, 20928, 13, 25410, 1330, 17732, 36044, 198, 198, 6738, 27678, 9122, 263, 13, 34985, 66, 13, 4164, 10466, 1330, 3896, 198, 198, 2777, 668, 796, 17732, 36044, 13, 38272, 13, ...
2.868421
380
import collections import logging import urllib.parse from structlog import wrap_logger from secure_message.constants import MESSAGE_BY_ID_ENDPOINT, MESSAGE_LIST_ENDPOINT, MESSAGE_QUERY_LIMIT from secure_message.services.service_toggles import party, internal_user_service logger = wrap_logger(logging.getLogger(__nam...
[ 11748, 17268, 198, 11748, 18931, 198, 11748, 2956, 297, 571, 13, 29572, 198, 198, 6738, 2878, 6404, 1330, 14441, 62, 6404, 1362, 198, 198, 6738, 5713, 62, 20500, 13, 9979, 1187, 1330, 337, 1546, 4090, 8264, 62, 17513, 62, 2389, 62, 16...
2.615677
3,942
# -*- coding: utf-8 -*- """ Defines various renderers for the game of nonogram """ from abc import ABC from sys import stdout from notetool.tool.log import logger from six import integer_types, itervalues, text_type from ..utils.iter import max_safe, pad from ..utils.other import two_powers from .common import BOX, ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 7469, 1127, 2972, 9851, 19288, 329, 262, 983, 286, 1729, 21857, 198, 37811, 198, 198, 6738, 450, 66, 1330, 9738, 198, 6738, 25064, 1330, 14367, 448, 198, 198...
2.516605
542
from __future__ import print_function, division from .str import StrPrinter from sympy.utilities import default_sort_key # numexpr works by altering the string passed to numexpr.evaluate # rather than by populating a namespace. Thus a special printer... def lambdarepr(expr, **settings): """ Returns a stri...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 11, 7297, 198, 198, 6738, 764, 2536, 1330, 4285, 6836, 3849, 198, 6738, 10558, 88, 13, 315, 2410, 1330, 4277, 62, 30619, 62, 2539, 628, 198, 198, 2, 997, 31937, 2499, 416, 29057, 262, 4...
3.366667
120
""" Fill na with most common of the whole column """ import numpy as np import pandas as pd import time import matplotlib.pyplot as plt from datetime import datetime import re from collections import Counter from statistics import median from tqdm import tqdm file = '/home/nicolasbievre/yelp_data.pkl' file_na = '/h...
[ 37811, 198, 33762, 12385, 351, 749, 2219, 286, 262, 2187, 5721, 198, 37811, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 640, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, ...
2.228438
429
from tkinter import Tk from tkinter import Entry from tkinter import Button from tkinter import StringVar t=Tk() t.title("Tarun Jaiswal") t.geometry("425x300") t.resizable(0,0) t.configure(background="black")#back ground color a=StringVar() e1=Entry(font=("",30),justify="right",textvariable=a) e1.place(x=0,y=...
[ 6738, 256, 74, 3849, 1330, 309, 74, 198, 6738, 256, 74, 3849, 1330, 21617, 198, 6738, 256, 74, 3849, 1330, 20969, 198, 6738, 256, 74, 3849, 1330, 10903, 19852, 198, 198, 83, 28, 51, 74, 3419, 198, 83, 13, 7839, 7203, 47079, 403, 1...
2.433854
1,217