content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
# -*- coding: utf-8 -*- from gevent.pool import Pool
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 4903, 1151, 13, 7742, 1330, 19850, 628 ]
2.454545
22
import argparse import datetime import json import random import time import numpy as np
[ 11748, 1822, 29572, 201, 198, 11748, 4818, 8079, 201, 198, 11748, 33918, 201, 198, 11748, 4738, 201, 198, 11748, 640, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 201, 198, 201, 198, 201, 198 ]
2.885714
35
from __future__ import absolute_import, division, print_function from cctbx.eltbx import covalent_radii from libtbx.test_utils import approx_equal if (__name__ == "__main__"): run()
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 198, 6738, 269, 310, 65, 87, 13, 2120, 65, 87, 1330, 269, 8325, 298, 62, 6335, 4178, 198, 6738, 9195, 83, 65, 87, 13, 9288, 62, 26791, 1330, 5561, 62, ...
2.890625
64
# Generated by Django 3.0.6 on 2020-05-06 02:47 from django.db import migrations, models import uuid
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 21, 319, 12131, 12, 2713, 12, 3312, 7816, 25, 2857, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 334, 27112, 628 ]
2.861111
36
import sys, os myPath = os.path.dirname(os.path.abspath(__file__)) sys.path.insert(0, myPath + '/../') import pytest import investigate # use the local path, instead of what has been installed @pytest.fixture
[ 11748, 25064, 11, 28686, 198, 1820, 15235, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 397, 2777, 776, 7, 834, 7753, 834, 4008, 198, 17597, 13, 6978, 13, 28463, 7, 15, 11, 616, 15235, 1343, 31051, 40720, 11537, 198,...
2.971831
71
#!/usr/bin/env python import sys import os import shutil import stat programpath = os.path.abspath(sys.path[0]) sys.path.append(os.path.join(programpath,"Lib")) from optparse import OptionParser import PackingUnits import SPULib import OsLib parser = OptionParser(usage="%prog [-f] [-q] FILENAME APPLICA...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 201, 198, 201, 198, 11748, 25064, 201, 198, 11748, 28686, 201, 198, 11748, 4423, 346, 201, 198, 11748, 1185, 201, 198, 201, 198, 1676, 2164, 696, 776, 796, 28686, 13, 6978, 13, 397, 2777, ...
2.496737
1,226
import numpy as np from linearSearch.linearSearch import LinearSearch class NonmonotoneGLL(LinearSearch): """ """ def __init__(self, method="GLL", max_iter=100, **opt): """ :param method: :param max_iter: :param opt: """ super().__init__(method, max_iter, ...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 14174, 18243, 13, 29127, 18243, 1330, 44800, 18243, 628, 198, 4871, 8504, 2144, 313, 505, 38, 3069, 7, 14993, 451, 18243, 2599, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 37227, 198, 220, ...
1.849015
1,371
"""A metric.""" from dataclasses import dataclass from typing import Optional from jupiter.domain.entity_name import EntityName from jupiter.domain.metrics.metric_key import MetricKey from jupiter.domain.metrics.metric_unit import MetricUnit from jupiter.domain.recurring_task_gen_params import RecurringTaskGenParams f...
[ 37811, 32, 18663, 526, 15931, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 6738, 19720, 1330, 32233, 198, 198, 6738, 474, 21251, 13, 27830, 13, 26858, 62, 3672, 1330, 20885, 5376, 198, 6738, 474, 21251, 13, 27830, 13, 4164,...
2.535467
1,156
import graphene from graphene.types.resolver import dict_resolver from authentication import with_default_authentication from handlers.graphql.resolvers import with_connection from handlers.graphql.types.base.objecttype import ObjectType from playbookloader import PlaybookLoader from handlers.graphql.types.vm import O...
[ 11748, 42463, 198, 6738, 42463, 13, 19199, 13, 411, 14375, 1330, 8633, 62, 411, 14375, 198, 198, 6738, 18239, 1330, 351, 62, 12286, 62, 41299, 3299, 198, 6738, 32847, 13, 34960, 13976, 13, 411, 349, 690, 1330, 351, 62, 38659, 198, 673...
4.016393
122
import sentencepiece as spm import sys path=sys.argv[1] input=sys.argv[2] out=sys.argv[3] sp = spm.SentencePieceProcessor() sp.Load(path) with open(input) as f: with open(out,"w") as w: for item in f: w.write(" ".join(sp.EncodeAsPieces(item))+"\n")
[ 11748, 6827, 12239, 355, 599, 76, 198, 11748, 25064, 198, 6978, 28, 17597, 13, 853, 85, 58, 16, 60, 198, 15414, 28, 17597, 13, 853, 85, 58, 17, 60, 198, 448, 28, 17597, 13, 853, 85, 58, 18, 60, 198, 2777, 796, 599, 76, 13, 318...
2.1
130
import json import logging import os import bottle from sys import argv from api import ping_response, start_response, move_response, end_response from utils.arena import Arena # Set log level LOG_LEVEL = 'DEBUG' if len(argv) > 1 and hasattr(logging, argv[1]): LOG_LEVEL = argv[1] logging.basicConfig(level=getattr...
[ 11748, 33918, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 9294, 198, 198, 6738, 25064, 1330, 1822, 85, 198, 6738, 40391, 1330, 29400, 62, 26209, 11, 923, 62, 26209, 11, 1445, 62, 26209, 11, 886, 62, 26209, 198, 6738, 3384, 4487, ...
2.508571
1,225
import numpy as np from .c_spheredistrib import F2GaussianSphereDistribution from ..core import FitFunction
[ 11748, 299, 32152, 355, 45941, 198, 198, 6738, 764, 66, 62, 2777, 6083, 396, 822, 1330, 376, 17, 35389, 31562, 38882, 20344, 3890, 198, 6738, 11485, 7295, 1330, 25048, 22203, 628, 628 ]
3.5
32
""" Given three ints, a b c, return True if one of b or c is "close" (differing from a by at most 1), while the other is "far", differing from both other values by 2 or more. Note: abs(num) computes the absolute value of a number. close_far(1, 2, 10) → True close_far(1, 2, 3) → False close_far(4, 1, 3) → True """
[ 37811, 198, 198, 15056, 1115, 493, 82, 11, 257, 275, 269, 11, 1441, 6407, 611, 530, 286, 275, 393, 269, 318, 366, 19836, 1, 357, 26069, 1586, 422, 257, 416, 379, 749, 352, 828, 981, 262, 584, 318, 366, 16370, 1600, 28742, 422, 111...
2.873874
111
""" This example: 1. Connects to the current model 2. Deploys a charm and waits until it reports itself active 3. Creates an offer 4. Lists the offer 3. Destroys the unit and application """ import tempfile from logging import getLogger from juju import loop from juju.controller import Controller log = getLogger(__...
[ 37811, 198, 1212, 1672, 25, 198, 198, 16, 13, 8113, 82, 284, 262, 1459, 2746, 198, 17, 13, 34706, 82, 257, 20024, 290, 28364, 1566, 340, 3136, 2346, 4075, 198, 18, 13, 7921, 274, 281, 2897, 198, 19, 13, 44968, 262, 2897, 198, 18, ...
3.239316
117
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'homework.ui' # # Created by: PyQt5 UI code generator 5.9 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 5178, 7822, 7560, 422, 3555, 334, 72, 2393, 705, 26452, 6433, 13, 9019, 6, 198, 2, 198, 2, 15622, 416, 25, 9485, 48, 83, 20, 12454, 2438, 17301, 642, 13, 2...
2.86747
83
from django.urls import path from .views import LocationCreateView app_name = 'campus' urlpatterns = [ path('location/create/', LocationCreateView.as_view(), name='create_location'), ]
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 198, 6738, 764, 33571, 1330, 13397, 16447, 7680, 198, 198, 1324, 62, 3672, 796, 705, 43842, 6, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 3108, 10786, 24886, 14, 17953, 14, ...
3.183333
60
# 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 agreed to in...
[ 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, 220, 220, 220, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789,...
3.399038
208
"""Init file for the paci helpers"""
[ 37811, 31768, 2393, 329, 262, 23503, 72, 49385, 37811, 198 ]
3.7
10
import numpy from omuse.units import units, constants from omuse.community.iemic.interface import iemic from omuse.community.iemic.implicit_utils import newton, continuation from matplotlib import pyplot from bstream import barotropic_streamfunction, overturning_streamfunction,z_from_cellcenterz """ default OCEAN...
[ 11748, 299, 32152, 198, 198, 6738, 39030, 1904, 13, 41667, 1330, 4991, 11, 38491, 198, 198, 6738, 39030, 1904, 13, 28158, 13, 72, 5314, 13, 39994, 1330, 1312, 5314, 198, 6738, 39030, 1904, 13, 28158, 13, 72, 5314, 13, 23928, 3628, 62,...
2.503873
2,840
#-*- coding: utf-8 -*- import unittest from utils import * from config import * import sys from websocket import create_connection if __name__ == '__main__': unittest.main()
[ 2, 12, 9, 12, 19617, 25, 3384, 69, 12, 23, 220, 532, 9, 12, 198, 198, 11748, 555, 715, 395, 198, 6738, 3384, 4487, 1330, 1635, 198, 6738, 4566, 1330, 1635, 198, 11748, 25064, 198, 6738, 2639, 5459, 1330, 2251, 62, 38659, 198, 198,...
2.761194
67
from pycoin.networks.bitcoinish import create_bitcoinish_network network = create_bitcoinish_network( symbol="BTX", network_name="BitCore", subnet_name="mainnet", wif_prefix_hex="80", sec_prefix="BTXSEC:", address_prefix_hex="03", pay_to_script_prefix_hex="7D", bip32_prv_prefix_hex="0488ADE4", bip32_pub_pr...
[ 6738, 12972, 3630, 13, 3262, 5225, 13, 35395, 680, 1330, 2251, 62, 35395, 680, 62, 27349, 198, 198, 27349, 796, 2251, 62, 35395, 680, 62, 27349, 7, 198, 220, 220, 220, 6194, 2625, 19313, 55, 1600, 3127, 62, 3672, 2625, 13128, 14055, ...
2.416216
185
from accounts.permissions import UserAccess from rest_framework import mixins, status from rest_framework.filters import SearchFilter from rest_framework.response import Response from rest_framework.viewsets import GenericViewSet from ..models import FlaggedToken from ..serializers import TokenSerializer class Token...
[ 6738, 5504, 13, 525, 8481, 1330, 11787, 15457, 198, 6738, 1334, 62, 30604, 1330, 5022, 1040, 11, 3722, 198, 6738, 1334, 62, 30604, 13, 10379, 1010, 1330, 11140, 22417, 198, 6738, 1334, 62, 30604, 13, 26209, 1330, 18261, 198, 6738, 1334,...
2.274681
1,489
""" Copyright 2020 The OneFlow 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 agr...
[ 37811, 198, 15269, 12131, 383, 1881, 37535, 46665, 13, 1439, 2489, 10395, 13, 198, 198, 26656, 15385, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 5832, 743, 407, 779, 428, 2393, 2845, 287, 11846, ...
2.267342
2,667
import asyncio from unittest import TestCase import jsons from jsons import InvalidDecorationError from jsons.decorators import loaded, dumped
[ 11748, 30351, 952, 198, 6738, 555, 715, 395, 1330, 6208, 20448, 198, 198, 11748, 44804, 684, 198, 6738, 44804, 684, 1330, 17665, 10707, 6944, 12331, 198, 6738, 44804, 684, 13, 12501, 273, 2024, 1330, 9639, 11, 24105, 628 ]
3.815789
38
""" Airflow API (Stable) Apache Airflow management API. # noqa: E501 The version of the OpenAPI document: 1.0.0 Contact: zach.z.liu@gmail.com Generated by: https://openapi-generator.tech """ import sys import unittest import airflow_python_sdk from airflow_python_sdk.model.class_reference impo...
[ 37811, 198, 220, 220, 220, 3701, 11125, 7824, 357, 1273, 540, 8, 628, 220, 220, 220, 24843, 3701, 11125, 4542, 7824, 13, 220, 1303, 645, 20402, 25, 412, 33548, 628, 220, 220, 220, 383, 2196, 286, 262, 4946, 17614, 3188, 25, 352, 13,...
2.970516
407
import json from sqlalchemy import Numeric from sqlalchemy.sql.elements import BinaryExpression from sqlalchemy_filtering.operators import FilterOperator, SQLDialect from sqlalchemy_filtering.validators import FilterRequest, Filter, _get_numeric_types, SQLAlchemyField def filter_apply(query, entity, obj: FilterReque...
[ 11748, 33918, 198, 6738, 44161, 282, 26599, 1330, 399, 39223, 198, 6738, 44161, 282, 26599, 13, 25410, 13, 68, 3639, 1330, 45755, 16870, 2234, 198, 198, 6738, 44161, 282, 26599, 62, 10379, 20212, 13, 3575, 2024, 1330, 25853, 18843, 1352, ...
1.955451
2,761
from .bbox_head import BBoxHead from .convfc_bbox_head import (ConvFCBBoxHead, Shared2FCBBoxHead, Shared4Conv1FCBBoxHead) from .double_bbox_head import DoubleConvFCBBoxHead from .detr_head import DetrHead __all__ = [ 'BBoxHead', 'ConvFCBBoxHead', 'Shared2FCBBoxHead', 'Shared4Conv...
[ 6738, 764, 65, 3524, 62, 2256, 1330, 12597, 1140, 13847, 198, 6738, 764, 42946, 16072, 62, 65, 3524, 62, 2256, 1330, 357, 3103, 85, 4851, 33, 14253, 13847, 11, 39403, 17, 4851, 33, 14253, 13847, 11, 198, 220, 220, 220, 220, 220, 220...
2.142045
176
from pathlib import Path from textblob import TextBlob path = Path("src/text.txt") with open(path) as f: text = f.read() blob = TextBlob(text) for sentence in blob.sentences: print(sentence.sentiment.polarity)
[ 6738, 3108, 8019, 1330, 10644, 198, 198, 6738, 2420, 2436, 672, 1330, 8255, 3629, 672, 628, 198, 6978, 796, 10644, 7203, 10677, 14, 5239, 13, 14116, 4943, 198, 198, 4480, 1280, 7, 6978, 8, 355, 277, 25, 198, 220, 220, 220, 2420, 796...
2.635294
85
# coding: utf-8 __author__ = 'Alain Lichnewsky' __license__ = 'MIT License' __version__ = '1.0' # (C) A.Lichnewsky, 2018, 2020 # # My own library organization (TBD: clean up ?) import sys import traceback sys.path.append("pylib") from UnitTest import * # Common toolkit imports import numpy as NP impor...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 834, 9800, 834, 796, 705, 2348, 391, 35171, 10827, 2584, 6, 198, 834, 43085, 834, 796, 705, 36393, 13789, 6, 198, 834, 9641, 834, 796, 705, 16, 13, 15, 6, 198, 198, 2, 357, 34, 8, 317,...
2.112974
2,505
from funcs import * from db import * ## # SHOW ## @app.route('/'+app.config['RNG_ID']+'/ips/list/all/', defaults={'pi_id': None}) @app.route('/'+app.config['RNG_ID']+'/ips/list/all/<pi_id>/') @app.route('/'+app.config['RNG_ID']+'/ips/list/last/', defaults={'pi_id': None}) @app.route('/'+app.config['RN...
[ 6738, 1257, 6359, 220, 220, 220, 220, 220, 220, 1330, 1635, 198, 6738, 20613, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1330, 1635, 198, 198, 2235, 198, 2, 37041, 198, 2235, 198, 31, 1324, 13, 38629, 10786, 14, 6, 10, 1324, 13,...
2.041363
411
import bisect import logging import sys from datetime import datetime from logging import handlers from youtubewatched.config import MAX_TIME_DIFFERENCE def logging_config(log_file_path: str, file_level: int = logging.DEBUG, console_out_level: int = logging.DEBUG, ...
[ 11748, 47457, 478, 198, 11748, 18931, 198, 11748, 25064, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 18931, 1330, 32847, 198, 198, 6738, 345, 37995, 413, 14265, 13, 11250, 1330, 25882, 62, 34694, 62, 35, 5064, 24302, 18310, 628, ...
2.318925
1,712
__author__ = 'Yin' # Standard imports import logging from uuid import UUID # Our imports from emission.analysis.result.carbon import getModeCarbonFootprint, carbonFootprintForMode from emission.core.common import Inside_polygon,berkeley_area,getConfirmationModeQuery from emission.core.get_database import get_section_d...
[ 834, 9800, 834, 796, 705, 56, 259, 6, 198, 2, 8997, 17944, 198, 11748, 18931, 198, 6738, 334, 27112, 1330, 471, 27586, 198, 198, 2, 3954, 17944, 198, 6738, 25592, 13, 20930, 13, 20274, 13, 29255, 1330, 651, 19076, 9914, 4189, 17574, ...
2.972441
1,016
import time import json import os import unittest from web3 import Web3 from uniswap.uniswap import UniswapV2Client, UniswapV2Utils class UniswapV2ClientTest(BaseTest): # FIXME add way to retrieve current liquidity balance for a par """def test_remove_liquidity(self): tx = self.uniswap.remove_liq...
[ 11748, 640, 198, 11748, 33918, 198, 11748, 28686, 198, 198, 11748, 555, 715, 395, 198, 198, 6738, 3992, 18, 1330, 5313, 18, 198, 198, 6738, 555, 271, 86, 499, 13, 403, 271, 86, 499, 1330, 791, 271, 86, 499, 53, 17, 11792, 11, 791,...
2.056358
692
#!/usr/bin/python # # Script for checking global health of host running VMware ESX/ESXi # # Licence : GNU General Public Licence (GPL) http://www.gnu.org/ # Pre-req : pywbem # #@--------------------------------------------------- #@ History #@--------------------------------------------------- #@ Date : 20080820 #@ A...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 198, 2, 12327, 329, 10627, 3298, 1535, 286, 2583, 2491, 37754, 13380, 55, 14, 1546, 42528, 198, 2, 198, 2, 10483, 594, 1058, 22961, 3611, 5094, 10483, 594, 357, 38, 6489, 8, 2638, 1378, ...
2.791421
1,189
import datetime import unittest from .context import date_utilities as d_utils ########################################################################### # Unit tests for get_datestamp() ########################################################################### # Test names are of the format: ...
[ 11748, 4818, 8079, 198, 11748, 555, 715, 395, 198, 198, 6738, 764, 22866, 1330, 3128, 62, 315, 2410, 355, 288, 62, 26791, 628, 198, 220, 220, 220, 1303, 29113, 29113, 7804, 2235, 198, 220, 220, 220, 1303, 11801, 5254, 329, 651, 62, ...
3.048698
883
from django.template.loader import render_to_string from djaveLogin.widgets.email_base import EmailBase from djaveLogin.models import new_sign_up_url
[ 198, 6738, 42625, 14208, 13, 28243, 13, 29356, 1330, 8543, 62, 1462, 62, 8841, 198, 6738, 42625, 1015, 47790, 13, 28029, 11407, 13, 12888, 62, 8692, 1330, 9570, 14881, 198, 6738, 42625, 1015, 47790, 13, 27530, 1330, 649, 62, 12683, 62, ...
3.377778
45
import pygame # The play scene function
[ 11748, 12972, 6057, 198, 198, 2, 383, 711, 3715, 2163, 198 ]
3.727273
11
from django.urls import path from . import views urlpatterns = [ path("scripts/", views.GetAddScripts.as_view()), path("<int:pk>/script/", views.GetUpdateDeleteScript.as_view()), path("<int:pk>/download/", views.download), ]
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 6738, 764, 1330, 5009, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 3108, 7203, 46521, 14, 1600, 5009, 13, 3855, 4550, 7391, 82, 13, 292, 62, 1177, 3419, 828, 198, 220, ...
2.586957
92
# -*- coding: utf-8 -*- import json import os.path import random import re from flask import Flask, send_from_directory from flask import request, abort from flaskrun.flaskrun import flask_run import datab.social_database as db app = Flask(__name__) # Regular expression to only accept certain files fileChecker = r...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 33918, 198, 11748, 28686, 13, 6978, 198, 11748, 4738, 198, 11748, 302, 198, 198, 6738, 42903, 1330, 46947, 11, 3758, 62, 6738, 62, 34945, 198, 6738, 42903, 1...
2.545918
392
#!/usr/bin/env python # encoding: utf-8 # Taken from legacy python unittest class WritelnDecorator: """Used to decorate file-like objects with a handy 'writeln' method"""
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 21004, 25, 3384, 69, 12, 23, 628, 198, 2, 30222, 422, 10655, 21015, 555, 715, 395, 198, 4871, 12257, 45542, 10707, 273, 1352, 25, 198, 220, 220, 220, 37227, 38052, 284, 11705, 378...
3.105263
57
# -*- coding: utf-8 -*- """ Functions to capture oscilloscope data. The curves are saved into a single file within the 'ScopeData' directory. Version 1.0 (2018-10-11) Daan Wielens - PhD at ICE/QTM University of Twente daan@daanwielens.com """ import visa import numpy as np from struct import unpack import matplotlib....
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 24629, 2733, 284, 8006, 24969, 40326, 1366, 13, 383, 23759, 389, 7448, 656, 257, 2060, 198, 7753, 1626, 262, 705, 43642, 6601, 6, 8619, 13, 198, 198, 14815, ...
2.991597
119
# top.py - top words ''' input: txt files from ./books folder output: csv files into the ./data folder This is a program that will find the top 100 words from a book discluding the stop words. These 100 top words will be stored in a csv file in the ./data folder for later use in the set.py program. ''' # https://to...
[ 2, 1353, 13, 9078, 532, 1353, 2456, 198, 198, 7061, 6, 198, 15414, 25, 256, 742, 3696, 422, 24457, 12106, 9483, 198, 22915, 25, 269, 21370, 3696, 656, 262, 24457, 7890, 9483, 198, 198, 1212, 318, 257, 1430, 326, 481, 1064, 262, 1353...
3.105802
293
import numpy as np import geopandas as geo import pandas as pd from skimage.segmentation import find_boundaries from shapely.geometry import Polygon from scipy.sparse import csr_matrix from scipy.sparse.csgraph import connected_components from merfishdecoder.core import zplane from merfishdecoder.core import dataset ...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 30324, 392, 292, 355, 40087, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 1341, 9060, 13, 325, 5154, 341, 1330, 1064, 62, 7784, 3166, 198, 6738, 5485, 306, 13, 469, 15748, 1330, 12280, 14...
2.426164
1,246
""" Implementation of bot that automates browsing for watch live broadcasts of tvs. """ from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.action_chains import ActionChains TV_NONE = None TV_FOX = 1 TV_STAR = 2 TV_KANALD = 3 TV_SHOW = 4 TV_TRT = 5 TV_A...
[ 37811, 198, 220, 220, 220, 46333, 286, 10214, 326, 3557, 689, 23182, 198, 220, 220, 220, 329, 2342, 2107, 30423, 286, 256, 14259, 13, 198, 37811, 198, 6738, 384, 11925, 1505, 1330, 3992, 26230, 198, 6738, 384, 11925, 1505, 13, 12384, ...
1.917759
1,678
import numpy as np import torch def do_mixup(x, mixup_lambda): """Mixup x of even indexes (0, 2, 4, ...) with x of odd indexes (1, 3, 5, ...). Args: x: (batch_size * 2, ...) mixup_lambda: (batch_size * 2,) Returns: out: (batch_size, ...) """ out = (x[0 :: 2].transpose(0, -1)...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 628, 198, 198, 4299, 466, 62, 19816, 929, 7, 87, 11, 5022, 929, 62, 50033, 2599, 198, 220, 220, 220, 37227, 35608, 929, 2124, 286, 772, 39199, 357, 15, 11, 362, 11, 604, 11, 2644, ...
2.398324
1,313
import copy import os import time import threading import typing import queue from cv2 import cv2 from genicam.gentl import TimeoutException from harvesters.core import Harvester import numpy as np from .._file_utils import create_output_dir from .._image_utils import RGB8Image from .._s3_utils import s3_upload_files...
[ 11748, 4866, 198, 11748, 28686, 198, 11748, 640, 198, 11748, 4704, 278, 198, 11748, 19720, 198, 11748, 16834, 198, 198, 6738, 269, 85, 17, 1330, 269, 85, 17, 198, 6738, 2429, 291, 321, 13, 6783, 75, 1330, 3862, 448, 16922, 198, 6738, ...
2.320069
578
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 11, 15720, 602, 628 ]
2.891892
37
# This code is part of Qiskit. # # (C) Copyright IBM 2018, 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivat...
[ 2, 770, 2438, 318, 636, 286, 1195, 1984, 270, 13, 198, 2, 198, 2, 357, 34, 8, 15069, 19764, 2864, 11, 12131, 13, 198, 2, 198, 2, 770, 2438, 318, 11971, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 13, 921, 743, 198, 2, 7330...
2.752086
839
# coding:utf-8 from __future__ import absolute_import, unicode_literals from sanic import Sanic from sanic.response import html, json import os from .api import bp from sanic_cors import CORS from sanic_auth import Auth, User __author__ = "golden" __date__ = '2018/6/1'
[ 2, 19617, 25, 40477, 12, 23, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 28000, 1098, 62, 17201, 874, 198, 6738, 5336, 291, 1330, 2986, 291, 198, 6738, 5336, 291, 13, 26209, 1330, 27711, 11, 33918, 198, 11748, 28686, 198,...
2.989011
91
from flask import Blueprint bp = Blueprint("main", __name__) from napalm_inspector.main import routes # noqa
[ 6738, 42903, 1330, 39932, 198, 198, 46583, 796, 39932, 7203, 12417, 1600, 11593, 3672, 834, 8, 198, 198, 6738, 25422, 38182, 62, 1040, 806, 273, 13, 12417, 1330, 11926, 220, 1303, 645, 20402, 198 ]
3.294118
34
peso = float(input('Qual é o seu peso: (KG) ')) altura = float(input('Qual é a sua altura: (m)')) imc = peso / (altura ** 2) if imc < 18.5: print('Abaixo do peso.') elif imc < 25: print('Peso Ideal.') elif imc < 30: print('Sobrepeso') elif imc < 40: print('obesidade') else: print('Obesidade mórbida...
[ 12272, 78, 796, 12178, 7, 15414, 10786, 46181, 38251, 267, 384, 84, 32317, 78, 25, 357, 42, 38, 8, 705, 4008, 198, 2501, 5330, 796, 12178, 7, 15414, 10786, 46181, 38251, 257, 424, 64, 5988, 5330, 25, 357, 76, 33047, 4008, 198, 320, ...
2.057325
157
from smt.surrogate_models import IDW from .smt_model import SMTModel class IDWModel(SMTModel): '''Inverse distance weighting model, implemented by SMT.''' @staticmethod @staticmethod
[ 6738, 895, 83, 13, 11793, 3828, 378, 62, 27530, 1330, 4522, 54, 198, 198, 6738, 764, 5796, 83, 62, 19849, 1330, 9447, 51, 17633, 628, 198, 198, 4871, 4522, 54, 17633, 7, 12310, 51, 17633, 2599, 198, 220, 220, 220, 705, 7061, 818, ...
2.871429
70
import os import os.path as ospx import torch split = "1" os.environ["CUDA_VISIBLE_DEVICES"] = "7" RESTORE_FROM_WHERE = "pretrained" EMBEDDING = "all" lambdaa = 0.2 #USE_CPU = True DEVICE = torch.device("cuda:0" if torch.cuda.is_available() else "cpu") BATCH_SIZE = 9 NUM_WORKERS = 3 ITER_SIZE = 1 IGNORE_LABEL = 255 #...
[ 11748, 28686, 198, 11748, 28686, 13, 6978, 355, 267, 2777, 87, 198, 11748, 28034, 198, 198, 35312, 796, 366, 16, 1, 198, 418, 13, 268, 2268, 14692, 43633, 5631, 62, 29817, 34563, 62, 39345, 34444, 8973, 796, 366, 22, 1, 198, 49, 646...
2.324519
416
name = "pyupload" from .main import pyuploader
[ 3672, 796, 366, 9078, 25850, 1, 198, 6738, 764, 12417, 1330, 12972, 25850, 263 ]
3.285714
14
import random import os import argparse from cv2 import cv2 from model import Classifier from matplotlib import pyplot as plt def parse_arguments(): """ Object for parsing command line strings into Python objects. """ arg = argparse.ArgumentParser() arg.add_argument('--source', '-s', type=str, def...
[ 11748, 4738, 198, 11748, 28686, 198, 11748, 1822, 29572, 198, 6738, 269, 85, 17, 1330, 269, 85, 17, 198, 6738, 2746, 1330, 5016, 7483, 198, 6738, 2603, 29487, 8019, 1330, 12972, 29487, 355, 458, 83, 628, 198, 4299, 21136, 62, 853, 288...
2.25
1,120
""" Provides a class for torch model evaluation. """ from __future__ import absolute_import import warnings import torch from .utils import common from pdb import set_trace as st class PyTorchModel: """ Class for torch model evaluation. Provide predict, intermediate_layer_outputs and adversarial_attack ...
[ 37811, 198, 15946, 1460, 257, 1398, 329, 28034, 2746, 12660, 13, 198, 37811, 198, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 11748, 14601, 198, 198, 11748, 28034, 198, 198, 6738, 764, 26791, 1330, 2219, 198, 6738, 27...
2.34663
2,181
from django.conf.urls import patterns, url from views import index_view, search, purchase, get_balance urlpatterns = patterns('', url(r'^$', index_view, name='index'), url(r'^search/(?P<sobject>[\w\-]+)/(?P<name>[\w\- ]+)$', search), url(r'^purchase/(?P<sobject>[\w\-]+)$', purchase), url(r'^getBalance...
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 7572, 11, 19016, 198, 6738, 5009, 1330, 6376, 62, 1177, 11, 2989, 11, 5001, 11, 651, 62, 20427, 628, 198, 6371, 33279, 82, 796, 7572, 10786, 3256, 198, 220, 220, 220, 19016, 7, 81, ...
2.421429
140
import numpy as np from matplotlib import pyplot import h5py import healpy as hp import sys from tqdm import tqdm from comancpipeline.Tools import Coordinates from matplotlib.transforms import ScaledTranslation from scipy.signal import fftconvolve def MAD(d,axis=0): """ Return Median Absolute Deviation for ar...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 2603, 29487, 8019, 1330, 12972, 29487, 198, 11748, 289, 20, 9078, 198, 11748, 12035, 9078, 355, 27673, 198, 11748, 25064, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 6738, 401, 1192, 7...
2.091514
601
from datetime import datetime from itemloaders.processors import Compose, MapCompose, TakeFirst from scrapy.loader import ItemLoader
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 6738, 2378, 2220, 364, 13, 14681, 669, 1330, 3082, 577, 11, 9347, 7293, 577, 11, 7214, 5962, 198, 6738, 15881, 88, 13, 29356, 1330, 9097, 17401, 628, 628 ]
3.805556
36
import numpy as np from scipy.sparse import csr_matrix, lil_matrix
[ 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 13, 82, 29572, 1330, 269, 27891, 62, 6759, 8609, 11, 42280, 62, 6759, 8609, 198 ]
2.68
25
from ignite.contrib.metrics.average_precision import AveragePrecision from ignite.contrib.metrics.roc_auc import ROC_AUC import ignite.contrib.metrics.regression
[ 6738, 44794, 13, 3642, 822, 13, 4164, 10466, 13, 23913, 62, 3866, 16005, 1330, 13475, 6719, 16005, 198, 6738, 44794, 13, 3642, 822, 13, 4164, 10466, 13, 12204, 62, 14272, 1330, 371, 4503, 62, 32, 9598, 198, 11748, 44794, 13, 3642, 822...
3.306122
49
from functools import wraps from typing import List from flask_jwt_extended import jwt_required, get_jwt_identity from cusg.db.schema import User from cusg.utils.http import ForbiddenError from cusg.utils.managers import UserManager from cusg.repository.repos import UserRepository, UserGroupRepository
[ 6738, 1257, 310, 10141, 1330, 27521, 198, 6738, 19720, 1330, 7343, 198, 198, 6738, 42903, 62, 73, 46569, 62, 2302, 1631, 1330, 474, 46569, 62, 35827, 11, 651, 62, 73, 46569, 62, 738, 414, 198, 198, 6738, 269, 385, 70, 13, 9945, 13, ...
3.242105
95
import logging import os import shutil import numpy as np
[ 11748, 18931, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 198, 11748, 299, 32152, 355, 45941, 628, 628 ]
3.444444
18
import csv, json import numpy as np from pprint import pprint import difflib import numeral from scipy.stats.kde import gaussian_kde from tqdm import tqdm import Levenshtein import itertools NUMBERS = "0123456789" DELIMITERS = "~!@#$%^*()_+`-={}|[]:<>?;',/'\\" + '"' ROMAN = "IVXL" CATEGORY_RATIO = 0.3 CATEGORY_NUMBER...
[ 11748, 269, 21370, 11, 33918, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 279, 4798, 1330, 279, 4798, 198, 11748, 814, 8019, 198, 11748, 997, 1691, 198, 6738, 629, 541, 88, 13, 34242, 13, 74, 2934, 1330, 31986, 31562, 62, 74, 2934,...
2.201754
228
# Generated by Django 2.2.2 on 2019-06-27 15:12 from django.db import migrations import multiselectfield.db.fields
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 17, 319, 13130, 12, 3312, 12, 1983, 1315, 25, 1065, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 198, 11748, 1963, 786, 801, 3245, 13, 9945, 13, 25747, 628 ]
2.925
40
import requests
[ 11748, 7007, 198 ]
5.333333
3
# -*- coding: utf-8 -*- """ Temporal framework doctests """ import doctest import unittest from openeo_udf.api import collection_base, feature_collection, datacube, \ machine_learn_model, spatial_extent, udf_data, structured_data def load_tests(loader, tests, ignore): """Load all doctests from the base imple...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 12966, 35738, 9355, 10412, 3558, 198, 37811, 198, 198, 11748, 10412, 395, 198, 11748, 555, 715, 395, 198, 6738, 1280, 68, 78, 62, 463, 69, 13, 15042, 1330, ...
2.638436
307
from pic2vec import ImageFeaturizer import os import argparse parser = argparse.ArgumentParser() parser.add_argument('--path', help='Path to the images') parser.add_argument('--depth', help='Depth of Xception') parser.set_defaults(depth=2) args = parser.parse_args() image_column_name = 'images' my_featurizer = Image...
[ 6738, 8301, 17, 35138, 1330, 7412, 14304, 2541, 7509, 198, 11748, 28686, 198, 198, 11748, 1822, 29572, 198, 48610, 796, 1822, 29572, 13, 28100, 1713, 46677, 3419, 198, 48610, 13, 2860, 62, 49140, 10786, 438, 6978, 3256, 1037, 11639, 15235...
2.919786
187
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2018-06-25 13:41 from __future__ import unicode_literals from django.db import migrations, models
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 1157, 319, 2864, 12, 3312, 12, 1495, 1511, 25, 3901, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738...
2.8
55
filename = 'risk tickers.xlsx' xls = pd.ExcelFile(filename) sht = xls.sheet_names for i in sht: print i df = pd.read_excel(filename,sheetname='Iron Steel') #print the column names print df.columns #get the values for a given column FLDS = df['Tickers'].values for i in FLDS: print i FLDS.shape FLDS = FLDS.tolist() FLD...
[ 34345, 796, 705, 19121, 4378, 364, 13, 87, 7278, 87, 6, 198, 87, 7278, 796, 279, 67, 13, 3109, 5276, 8979, 7, 34345, 8, 198, 1477, 83, 796, 2124, 7278, 13, 21760, 62, 14933, 198, 1640, 1312, 287, 427, 83, 25, 3601, 1312, 198, 19...
2.633919
3,644
# -*- coding: utf-8 -*- """ Created on Fri Oct 11 20:36:35 2019 @author: Stuart """ import torch import torch.nn as nn import torch.nn.utils.rnn as rnn_utils import neural_layers as nl # from transf_decoder import Transformer import utils import matplotlib.pyplot as plt plt.switch_backend('agg') import argparse ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 19480, 2556, 1367, 1160, 25, 2623, 25, 2327, 13130, 198, 198, 31, 9800, 25, 22559, 198, 37811, 198, 11748, 28034, 220, 198, 11748, 28034, 13, 204...
2.247721
2,523
import argparse if __name__ == '__main__': args = parse_args() if args.mode == 'sensitivity': organize_accuracy(args.input, args.output) elif args.mode == 'unaligned': organize_unaligned(args.input, args.output) elif args.mode == 'num_incorrect': organize_numincorrect(args...
[ 11748, 1822, 29572, 628, 198, 220, 220, 220, 220, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 26498, 796, 21136, 62, 22046, 3419, 198, 220, 220, 220, 611, 26498, 13, 14171, 6624, 705, 82, 40545, ...
2.369942
173
# Copyright 2021 The Brax 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 applicable law or agreed to in wri...
[ 2, 15069, 33448, 383, 9718, 87, 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, 11846, 351, 262, 13789, 13, 198, 2, ...
2.16565
984
# Generated by Django 1.11.15 on 2018-11-25 08:34 import django.contrib.auth.validators from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 352, 13, 1157, 13, 1314, 319, 2864, 12, 1157, 12, 1495, 8487, 25, 2682, 198, 198, 11748, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 12102, 2024, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 498...
2.977273
44
import sys,os import collections sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__),'..'))) from work import Ohio import unittest Ohio = Ohio() # #need to delete all files from testing folders if __name__=='__main__': unittest.main( )
[ 11748, 25064, 11, 418, 198, 11748, 17268, 198, 17597, 13, 6978, 13, 33295, 7, 418, 13, 6978, 13, 397, 2777, 776, 7, 418, 13, 6978, 13, 22179, 7, 418, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 828, 6, 492, 6, 22305, 198, 6738...
2.68
100
from ecoreleve_server.Models import Base,DBSession from sqlalchemy import Column, DateTime, Float, ForeignKey, Index, Integer, Numeric, String, Text, Unicode, text,Sequence,orm,and_,text from sqlalchemy.dialects.mssql.base import BIT from sqlalchemy.orm import relationship FieldSizeToClass = {0:'col-md-3',1:'col-md-6'...
[ 6738, 304, 7295, 293, 303, 62, 15388, 13, 5841, 1424, 1330, 7308, 11, 35, 4462, 2521, 198, 6738, 44161, 282, 26599, 1330, 29201, 11, 7536, 7575, 11, 48436, 11, 8708, 9218, 11, 12901, 11, 34142, 11, 399, 39223, 11, 10903, 11, 8255, 1...
2.888889
117
# # File: # scatter2.py # # Synopsis: # Draws random markers using user-defined markers. # # Category: # XY plots # polymarkers # # Author: # Mary Haley # # Date of initial publication: # December, 2005 # # Description: # This example generates some random data and plots the data as an # ...
[ 2, 198, 2, 220, 9220, 25, 198, 2, 220, 220, 220, 41058, 17, 13, 9078, 198, 2, 198, 2, 220, 16065, 24608, 25, 198, 2, 220, 220, 220, 15315, 82, 4738, 19736, 1262, 2836, 12, 23211, 19736, 13, 198, 2, 198, 2, 220, 21743, 25, 198,...
2.190863
985
#!/usr/bin/env python3 from base64 import b64encode, b64decode from sys import byteorder
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 6738, 2779, 2414, 1330, 275, 2414, 268, 8189, 11, 275, 2414, 12501, 1098, 198, 6738, 25064, 1330, 18022, 2875, 628 ]
3
30
"""TileSet class. TiledImageVisual uses this class to track the tiles it's drawing. """ from typing import Dict, List, NamedTuple, Set from ...layers.image.experimental import OctreeChunk, OctreeChunkKey from .texture_atlas import AtlasTile class TileData(NamedTuple): """TileSet stores one TileData per tile. ...
[ 37811, 35103, 7248, 1398, 13, 198, 198, 51, 3902, 5159, 36259, 3544, 428, 1398, 284, 2610, 262, 19867, 340, 338, 8263, 13, 198, 37811, 198, 6738, 19720, 1330, 360, 713, 11, 7343, 11, 34441, 51, 29291, 11, 5345, 198, 198, 6738, 2644, ...
2.380645
1,705
from __future__ import annotations import logging import datetime from fastapi import APIRouter, Depends, params from typing import List, Optional from app.core.auth import get_current_user from app.ratelimit.time_bucketed import rate_limit from app.routes.businesses.service.business_metrics.business_metric_service im...
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 11748, 18931, 198, 11748, 4818, 8079, 198, 6738, 3049, 15042, 1330, 3486, 4663, 39605, 11, 2129, 2412, 11, 42287, 198, 6738, 19720, 1330, 7343, 11, 32233, 198, 6738, 598, 13, 7295, 13, 184...
2.687643
4,370
from django.contrib import admin from .models import CarMake, CarModel # Car Model Inline # Car Make Inline # Car Make Admin # Car Model Admin admin.site.register(CarMake) admin.site.register(CarModel)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 764, 27530, 1330, 1879, 12050, 11, 1879, 17633, 628, 198, 2, 1879, 9104, 554, 1370, 628, 198, 2, 1879, 6889, 554, 1370, 628, 198, 2, 1879, 6889, 32053, 628, 198, 2, 1879, 91...
3.212121
66
# System import unittest import json import logging import pprint try: exePath=os.path.dirname(os.path.abspath(__file__)) parentPath,childDir=os.path.split(exePath) sys.path.insert(1,os.path.join(parentPath,"lib")) except: print "Unable to load local library paths" sys.exit(1) # Local import NDE imp...
[ 2, 4482, 198, 11748, 555, 715, 395, 198, 11748, 33918, 198, 11748, 18931, 198, 11748, 279, 4798, 198, 198, 28311, 25, 198, 220, 220, 220, 409, 68, 15235, 28, 418, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 397, 2777, 776, 7,...
2.418182
165
"""ZCM type definitions This file automatically generated by zcm. DO NOT MODIFY BY HAND!!!! """ try: import cStringIO.StringIO as BytesIO except ImportError: from io import BytesIO import struct
[ 37811, 57, 24187, 2099, 17336, 198, 1212, 2393, 6338, 7560, 416, 1976, 11215, 13, 198, 18227, 5626, 19164, 5064, 56, 11050, 367, 6981, 13896, 198, 37811, 198, 198, 28311, 25, 198, 220, 220, 220, 1330, 269, 10100, 9399, 13, 10100, 9399, ...
3.203125
64
''' Module of Android API for plyer.devicename. ''' from jnius import autoclass from plyer.facades import DeviceName Build = autoclass('android.os.Build') class AndroidDeviceName(DeviceName): ''' Implementation of Android devicename API. ''' def _get_device_name(self): """ Method to...
[ 7061, 6, 198, 26796, 286, 5565, 7824, 329, 35960, 263, 13, 7959, 291, 12453, 13, 198, 7061, 6, 198, 198, 6738, 474, 77, 3754, 1330, 1960, 420, 31172, 198, 6738, 35960, 263, 13, 38942, 2367, 1330, 16232, 5376, 198, 198, 15580, 796, 1...
2.871886
281
""" "ReTry" (c) by Ignacio Slater M. "ReTry" is licensed under a Creative Commons Attribution 4.0 International License. You should have received a copy of the license along with this work. If not, see <https://creativecommons.org/licenses/by/4.0/>. """ from retry.geometry import Point from retry.tree.rtree import RTre...
[ 37811, 198, 1, 3041, 23433, 1, 357, 66, 8, 416, 16583, 48711, 44289, 337, 13, 198, 1, 3041, 23433, 1, 318, 11971, 739, 257, 198, 16719, 425, 13815, 45336, 604, 13, 15, 4037, 13789, 13, 198, 1639, 815, 423, 2722, 257, 4866, 286, 26...
2.744898
196
# Copyright 2021 cms.rendner (Daniel Schmidt) # # 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, 220, 15069, 33448, 269, 907, 13, 10920, 1008, 357, 19962, 24740, 8, 198, 2, 198, 2, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 220, 345, 743, 407, 779, 428, 2393, 2845, 287...
3.650704
355
from flask import Flask from .proxy import create_proxy from . import stats def create_app(config): """Create flask app""" app = Flask(__name__) routes = config["routes"] @app.route("/") for route in routes: create_proxy(app, route["path_prefix"], route["backend"], config["backends"]) ...
[ 6738, 42903, 1330, 46947, 198, 198, 6738, 764, 36436, 1330, 2251, 62, 36436, 198, 6738, 764, 1330, 9756, 628, 198, 4299, 2251, 62, 1324, 7, 11250, 2599, 198, 220, 220, 220, 37227, 16447, 42903, 598, 37811, 198, 220, 220, 220, 598, 796...
2.739437
142
import numpy as np from scipy.ndimage import shift import random from targets import one_hot
[ 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 13, 358, 9060, 1330, 6482, 198, 11748, 4738, 198, 6738, 6670, 1330, 530, 62, 8940, 628, 628, 198 ]
3.464286
28
# Modify the program to show the numbers from 1 to 100. x=1 while x<=100: print(x) x=x+1
[ 2, 3401, 1958, 262, 1430, 284, 905, 262, 3146, 422, 352, 284, 1802, 13, 198, 87, 28, 16, 198, 4514, 2124, 27, 28, 3064, 25, 198, 220, 220, 220, 3601, 7, 87, 8, 198, 220, 220, 220, 2124, 28, 87, 10, 16 ]
2.285714
42
#!/usr/bin/env python # -*- coding: utf-8 -*- """ @author Eric Bullen <ebullen@linkedin.com> @application jtune.py @version 4.0.1 @abstract This tool will give detailed information about the running JVM in real-time. It produces useful information that can further assist the user ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 31, 9800, 220, 220, 220, 220, 220, 7651, 8266, 268, 1279, 1765, 724, 268, 31, 25614, 259, 13, 785, ...
2.208069
34,229
"""LightningFlower Model""" import flwr as fl import pytorch_lightning as pl
[ 37811, 15047, 768, 7414, 789, 9104, 37811, 198, 11748, 781, 18351, 355, 781, 198, 11748, 12972, 13165, 354, 62, 2971, 768, 355, 458, 628 ]
3.25
24
#coding:utf-8 from flask import * import pymysql import db,modules
[ 2, 66, 7656, 25, 40477, 12, 23, 198, 6738, 42903, 1330, 1635, 198, 11748, 279, 4948, 893, 13976, 198, 11748, 20613, 11, 18170, 198 ]
2.791667
24
# # The sphinx-jinja extension is available from https://github.com/tardyp/sphinx-jinja, # licensed under the MIT License. # # # The MIT License # # Copyright (c) 2016-2019 Pierre Tardy # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files...
[ 2, 198, 2, 383, 599, 20079, 87, 12, 18594, 6592, 7552, 318, 1695, 422, 3740, 1378, 12567, 13, 785, 14, 83, 446, 4464, 14, 82, 746, 28413, 12, 18594, 6592, 11, 198, 2, 11971, 739, 262, 17168, 13789, 13, 198, 2, 198, 2, 198, 2, ...
3.672289
415
import identifiers_api from .identifier_object_builder import set_identifier_object def manage_ids(jsons_data, **metadata_properties): """ :param jsons_data: :param kwargs: :return: """ organism = metadata_properties.get("organism", None) for dataset in jsons_data: collection_...
[ 11748, 42814, 62, 15042, 198, 198, 6738, 764, 738, 7483, 62, 15252, 62, 38272, 1330, 900, 62, 738, 7483, 62, 15252, 628, 198, 198, 4299, 6687, 62, 2340, 7, 8457, 684, 62, 7890, 11, 12429, 38993, 62, 48310, 2599, 198, 220, 220, 220, ...
2.898649
444
from .preprocessing.filter_genes import filter_genes from .preprocessing.normalize import normalize_total from .preprocessing.log_scale import log1p from .preprocessing.log_scale import scale from .preprocessing.graph import neighbors from .image_preprocessing.image_tiling import tiling from .image_preprocessing.featur...
[ 6738, 764, 3866, 36948, 13, 24455, 62, 5235, 274, 1330, 8106, 62, 5235, 274, 198, 6738, 764, 3866, 36948, 13, 11265, 1096, 1330, 3487, 1096, 62, 23350, 198, 6738, 764, 3866, 36948, 13, 6404, 62, 9888, 1330, 2604, 16, 79, 198, 6738, ...
3.858696
92
# copyright (c) 2018 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 app...
[ 2, 220, 220, 6634, 357, 66, 8, 2864, 39517, 79, 37382, 7035, 13, 477, 2489, 10395, 13, 198, 2, 198, 2, 11971, 739, 262, 2471, 4891, 5964, 11, 2196, 362, 13, 15, 357, 1169, 366, 43085, 15341, 198, 2, 345, 743, 407, 779, 428, 2393...
3.194444
540
# Generated by Django 2.2.3 on 2019-08-08 02:52 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 18, 319, 13130, 12, 2919, 12, 2919, 7816, 25, 4309, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
from Tkinter import * from pytesser import image_to_string from PIL import Image, ImageFilter, ImageEnhance, ImageTk import picamera from datetime import datetime from pic_window import pic_window ##TODO: implement all these functions ##from parnter implementations
[ 6738, 309, 74, 3849, 1330, 1635, 198, 6738, 12972, 83, 408, 263, 1330, 2939, 62, 1462, 62, 8841, 198, 6738, 350, 4146, 1330, 7412, 11, 7412, 22417, 11, 7412, 35476, 590, 11, 7412, 51, 74, 198, 11748, 8301, 18144, 198, 6738, 4818, 80...
3.506329
79
nums = [4, 6, 2, 6, 7, 2, 1]
[ 198, 77, 5700, 796, 685, 19, 11, 718, 11, 362, 11, 718, 11, 767, 11, 362, 11, 352, 60 ]
1.526316
19
#!/usr/bin/env python # coding: utf-8 # In this Kernel, I'd like to show you a very basic segmentation technique whihc only applies pure computer vision techniques. Nothing fancy. # # At first, I'll show the step-by-step processing and after that I will create the submission for the competition. # # With this kernel, ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 554, 428, 32169, 11, 314, 1549, 588, 284, 905, 345, 257, 845, 4096, 10618, 341, 8173, 348, 4449, 66, 691, 8991, 5899, 3644, 5761, 7605,...
2.562607
1,749