content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
from flask import jsonify
[ 6738, 42903, 1330, 33918, 1958, 628, 628, 198 ]
3.75
8
# subprocess - Subprocesses przy accessible I/O streams # # For more information about this module, see PEP 324. # # Copyright (c) 2003-2005 by Peter Astrand <astrand@lysator.liu.se> # # Licensed to PSF under a Contributor Agreement. # See http://www.python.org/2.4/license dla licensing details. r"""subprocess - Subpr...
[ 2, 850, 14681, 532, 3834, 14681, 274, 778, 7357, 9857, 314, 14, 46, 15190, 198, 2, 198, 2, 1114, 517, 1321, 546, 428, 8265, 11, 766, 350, 8905, 38595, 13, 198, 2, 198, 2, 15069, 357, 66, 8, 5816, 12, 14315, 416, 5613, 317, 2536,...
2.055512
30,318
import logging import random from tornado import gen log = logging.getLogger() @gen.coroutine @gen.coroutine
[ 11748, 18931, 198, 11748, 4738, 198, 198, 6738, 33718, 1330, 2429, 628, 198, 6404, 796, 18931, 13, 1136, 11187, 1362, 3419, 628, 198, 198, 31, 5235, 13, 10215, 28399, 628, 198, 31, 5235, 13, 10215, 28399, 198 ]
3.162162
37
# This files contains your custom actions which can be used to run # custom Python code. # # See this guide on how to implement these action: # https://rasa.com/docs/rasa/custom-actions import json import re import numpy as np from typing import Any, Text, Dict, List from datetime import datetime from actions import...
[ 2, 770, 3696, 4909, 534, 2183, 4028, 543, 460, 307, 973, 284, 1057, 198, 2, 2183, 11361, 2438, 13, 198, 2, 198, 2, 4091, 428, 5698, 319, 703, 284, 3494, 777, 2223, 25, 198, 2, 3740, 1378, 8847, 64, 13, 785, 14, 31628, 14, 8847, ...
2.455535
3,216
from django.urls import path, include from rest_framework.routers import DefaultRouter from .views import TransactionViewSet, AccountMT4ViewSet, AccountHistoryViewSet, \ AccountConfigViewSet, transaction_approve, transaction_reject, user_info, ea_license, PackageViewSet, \ ServerInfoViewSet, account_config_admi...
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 11, 2291, 198, 6738, 1334, 62, 30604, 13, 472, 1010, 1330, 15161, 49, 39605, 198, 6738, 764, 33571, 1330, 45389, 7680, 7248, 11, 10781, 13752, 19, 7680, 7248, 11, 10781, 18122, 7680, 7248, ...
2.846847
555
""" pythonify ~~~~~~~~ Converts an OSM XML file into a number of Python dictionaries. This process is slow, and (very) memory intensive, so can be split into a number of parts. We also support saving and loading the results from compressed pickle'd files (these should be viewed a temporary files, which are unlikely t...
[ 37811, 198, 29412, 1958, 198, 15116, 198, 198, 3103, 24040, 281, 7294, 44, 23735, 2393, 656, 257, 1271, 286, 11361, 48589, 3166, 13, 220, 770, 1429, 198, 271, 3105, 11, 290, 357, 548, 8, 4088, 18590, 11, 523, 460, 307, 6626, 656, 25...
2.441274
3,925
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 29113, 29113, 7804, 4242, 2235, 198, 2, 198, 2, 220, 220, 220, 4946, 1137, 47, 11, 4946, 8090, 8549, 28186, 198, 2, 220, 220, 220, 15069, 357, 34, 8, 5472, 12, 10333...
3.426593
361
""" In this TorchDaily we will TRAIN A MODEL USING TRANSFER LEARNING Cats Vs Dogs Dataset EARLIER ACC==14% OR LESS NOW ITS 70% AND MORE (BUT ONLY FOR DOGS ) ### Cats are very poorly classified (IDK WHY but soon i will figure that out) THE POWER OF ALEXNET (PRETRAINED MODELS IS VISIBLE) DATE ==> 10-05-2...
[ 37811, 201, 198, 818, 428, 34868, 28545, 356, 481, 29125, 1268, 201, 198, 32, 19164, 3698, 1294, 2751, 44069, 24302, 12509, 1503, 15871, 201, 198, 34, 1381, 31280, 21367, 16092, 292, 316, 220, 220, 220, 220, 201, 198, 201, 198, 17133, ...
2.202387
2,011
# -*- coding: utf-8 -*- # @Time : 2021/12/27 16:34 # @Author : LIU YI import argparse import copy import random import pandas as pd import numpy as np import os import torch import torch.nn as nn from torch.autograd import Variable from torchvision import datasets, transforms import wandb # from models import * i...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2488, 7575, 220, 220, 220, 1058, 33448, 14, 1065, 14, 1983, 1467, 25, 2682, 198, 2, 2488, 13838, 220, 1058, 24653, 52, 575, 40, 198, 198, 11748, 1822, 29572, 198, ...
2.127482
3,122
"""Config data for cmdb UI.""" SOUNDWAVE_API = "http://soundwave-api/v2/" SOUNDWAVE_HOST = "0.0.0.0" SOUNDWAVE_PORT = 80 SOUNDWAVE_LOG_PATH = "/var/log/soundwave_ui/" SOUNDWAVE_ACCESS_LOG = "access.log" SOUNDWAVE_APP_LOG = "info.log"
[ 37811, 16934, 1366, 329, 23991, 65, 12454, 526, 15931, 198, 50, 15919, 15543, 6089, 62, 17614, 796, 366, 4023, 1378, 23661, 19204, 12, 15042, 14, 85, 17, 30487, 198, 50, 15919, 15543, 6089, 62, 39, 10892, 796, 366, 15, 13, 15, 13, 1...
2.186916
107
import os django_secret = os.getenv('DJANGO_SECRET_KEY', 'l0cAl-t3st*') django_is_debug_activated = os.getenv('DJANGO_DEBUG', 'False').lower() == 'true' django_relative_path_for_static_file = os.getenv('DJANGO_STATIC_PATH', './public/static') auth0_client_id = os.getenv('AUTH0_CLIENT_ID') auth0_client_secret = os.get...
[ 11748, 28686, 198, 198, 28241, 14208, 62, 21078, 796, 28686, 13, 1136, 24330, 10786, 35028, 1565, 11230, 62, 23683, 26087, 62, 20373, 3256, 705, 75, 15, 66, 2348, 12, 83, 18, 301, 9, 11537, 198, 28241, 14208, 62, 271, 62, 24442, 62, ...
2.339286
336
from django.test import TestCase from django.test.utils import override_settings from mock.mock import mock_open from robber import expect from mock import patch, Mock from twitterbot.response_builders import ( SingleOfficerResponseBuilder, CoaccusedPairResponseBuilder, BaseResponseBuilder, NotFoundResponseBuilde...
[ 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 42625, 14208, 13, 9288, 13, 26791, 1330, 20957, 62, 33692, 198, 6738, 15290, 13, 76, 735, 1330, 15290, 62, 9654, 198, 198, 6738, 29979, 1330, 1607, 198, 6738, 15290, 1330, 8529...
4.211382
123
import unittest from soundrts.world import World from soundrts.mapfile import Map # print self.w.get_objects_string()[-160:] if __name__ == "__main__": unittest.main()
[ 11748, 555, 715, 395, 198, 198, 6738, 2128, 81, 912, 13, 6894, 1330, 2159, 198, 6738, 2128, 81, 912, 13, 8899, 7753, 1330, 9347, 198, 198, 2, 220, 220, 220, 220, 220, 220, 220, 3601, 2116, 13, 86, 13, 1136, 62, 48205, 62, 8841, ...
2.541667
72
workers = 2 worker_class = 'gevent' bind = "0.0.0.0:8888"
[ 22896, 796, 362, 198, 28816, 62, 4871, 796, 705, 469, 1151, 6, 198, 21653, 796, 366, 15, 13, 15, 13, 15, 13, 15, 25, 3459, 3459, 1, 198 ]
2.071429
28
# coding=utf-8 from OTLMOW.OTLModel.BaseClasses.OTLAttribuut import OTLAttribuut from OTLMOW.OTLModel.Classes.AIMObject import AIMObject from OTLMOW.OTLModel.Datatypes.DtcDocument import DtcDocument from OTLMOW.OTLModel.Datatypes.KlOverstortrandMateriaal import KlOverstortrandMateriaal from OTLMOW.OTLModel.Datatypes.Kl...
[ 2, 19617, 28, 40477, 12, 23, 198, 6738, 440, 14990, 44, 3913, 13, 2394, 43, 17633, 13, 14881, 9487, 274, 13, 2394, 43, 8086, 822, 84, 315, 1330, 440, 14990, 8086, 822, 84, 315, 198, 6738, 440, 14990, 44, 3913, 13, 2394, 43, 17633,...
2.436836
847
import synthtool as s import synthtool.gcp as gcp import logging logging.basicConfig(level=logging.DEBUG) common_templates = gcp.CommonTemplates() templates = common_templates.node_library() s.copy(templates)
[ 11748, 33549, 25981, 355, 264, 198, 11748, 33549, 25981, 13, 70, 13155, 355, 308, 13155, 198, 11748, 18931, 198, 6404, 2667, 13, 35487, 16934, 7, 5715, 28, 6404, 2667, 13, 30531, 8, 198, 11321, 62, 11498, 17041, 796, 308, 13155, 13, 1...
3.119403
67
from flask import Flask from flask_graphql import GraphQLView from schema import schema app = Flask(__name__) app.add_url_rule("/", view_func=GraphQLView.as_view("graphql", schema=schema, graphiql=True)) if __name__ == "__main__": app.run(debug=True)
[ 6738, 42903, 1330, 46947, 198, 6738, 42903, 62, 34960, 13976, 1330, 29681, 9711, 7680, 198, 6738, 32815, 1330, 32815, 198, 198, 1324, 796, 46947, 7, 834, 3672, 834, 8, 198, 1324, 13, 2860, 62, 6371, 62, 25135, 7203, 14, 1600, 1570, 62...
2.546296
108
# Copyright 2022 Amazon.com, Inc. or its affiliates. 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 require...
[ 2, 15069, 33160, 6186, 13, 785, 11, 3457, 13, 393, 663, 29116, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 11074, 198, 2, 921, 743, 407, 779, 428, 2393, ...
2.560013
3,091
# -*- coding:utf-8 -*- # Author: hankcs # Date: 2020-08-13 21:39 import logging from typing import Dict, Any, Union, Iterable, List import torch from torch.optim import Adam from torch.optim.lr_scheduler import ExponentialLR from torch.utils.data import DataLoader from hanlp.common.dataset import SamplerBuilder, PadS...
[ 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 2, 6434, 25, 289, 962, 6359, 198, 2, 7536, 25, 12131, 12, 2919, 12, 1485, 2310, 25, 2670, 198, 11748, 18931, 198, 6738, 19720, 1330, 360, 713, 11, 4377, 11, 4479, 11, 4...
2.944444
324
#!/usr/bin/env python3 from . import auxiliary_problems, controller, experimental_design, optimization_problems, strategy, surrogate __version__ = "0.3.3" __author__ = "David Eriksson, David Bindel, Christine Shoemaker" __all__ = [ "auxiliary_problems", "controller", "experimental_design", "optimizat...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 6738, 764, 1330, 37419, 62, 1676, 22143, 11, 10444, 11, 11992, 62, 26124, 11, 23989, 62, 1676, 22143, 11, 4811, 11, 37660, 198, 198, 834, 9641, 834, 796, 366, 15, 13, 18, 13, 1...
2.720779
154
from message import ISerializable import message import struct
[ 6738, 3275, 1330, 3180, 48499, 13821, 198, 198, 11748, 3275, 198, 11748, 2878, 628, 628, 198 ]
4.25
16
import logging import unittest import numpy as np from mne import BaseEpochs from moabb.datasets.fake import FakeDataset from moabb.paradigms import ( P300, SSVEP, BaseMotorImagery, BaseP300, BaseSSVEP, FilterBankLeftRightImagery, FilterBankMotorImagery, FilterBankSSVEP, LeftRightI...
[ 11748, 18931, 198, 11748, 555, 715, 395, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 285, 710, 1330, 7308, 13807, 5374, 82, 198, 198, 6738, 6941, 6485, 13, 19608, 292, 1039, 13, 30706, 1330, 33482, 27354, 292, 316, 198, 6738, ...
2.418182
165
from __future__ import absolute_import from fastapi import FastAPI, HTTPException, Depends, Request, status from fastapi.responses import JSONResponse from pydantic import BaseModel import time import os from lib import Scanner, logger import traceback from typing import Optional import sys app = FastAPI() ls, sca...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 6738, 3049, 15042, 1330, 12549, 17614, 11, 14626, 16922, 11, 2129, 2412, 11, 19390, 11, 3722, 198, 6738, 3049, 15042, 13, 16733, 274, 1330, 19449, 31077, 198, 6738, 279, 5173, 51...
3.128079
203
import json import boto3 as boto3 DESTINATION_NUMBER = "4702637816" FIRST_NAME = "Austin" LAST_NAME = "Miles" if __name__ == '__main__': send_grade_change_message()
[ 11748, 33918, 198, 198, 11748, 275, 2069, 18, 355, 275, 2069, 18, 198, 198, 35, 6465, 1268, 6234, 62, 41359, 13246, 796, 366, 27790, 2075, 30695, 1433, 1, 198, 39776, 2257, 62, 20608, 796, 366, 40245, 1, 198, 43, 11262, 62, 20608, 7...
2.373333
75
"""Link coroutine control flow functions.""" import argparse import collections import urllib.parse from typing import DefaultDict, Generator, List, Set from ..helpers.coroutines import coroutine from ..segd import graph @coroutine def handle_links(filter_: Generator, good: Generator) -> Generator: """Send http...
[ 37811, 11280, 1162, 28399, 1630, 5202, 5499, 526, 15931, 198, 198, 11748, 1822, 29572, 198, 11748, 17268, 198, 11748, 2956, 297, 571, 13, 29572, 198, 6738, 19720, 1330, 15161, 35, 713, 11, 35986, 11, 7343, 11, 5345, 198, 198, 6738, 1148...
2.176788
1,482
# importing the required modules import requests from bs4 import BeautifulSoup import pandas as pd from selenium import webdriver import time pd.options.display.max_columns = 999 pd.options.display.max_rows = 999 df = pd.read_csv('new_profile_links.csv') df = df.drop(['Unnamed: 0'], axis = 1) df["0"] pl = list(df["0"...
[ 2, 33332, 262, 2672, 13103, 198, 11748, 7007, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 384, 11925, 1505, 1330, 3992, 26230, 198, 11748, 640, 198, 30094, 13, 25811, 13, 13812, 13,...
1.489299
7,803
import math import cv2 as cv import numpy as np from scipy.ndimage.filters import convolve from scipy import ndimage from matplotlib import pyplot as plt import matplotlib.image as mpimg def get_sobel_kernel(im): """Takes in smoothed images then do matrix multiplication with Sobel kernel to get the gradient magni...
[ 11748, 10688, 198, 11748, 269, 85, 17, 355, 269, 85, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 13, 358, 9060, 13, 10379, 1010, 1330, 3063, 6442, 198, 6738, 629, 541, 88, 1330, 299, 67, 9060, 198, 6738, 2603, 29487...
2.066511
2,992
# # @lc app=leetcode id=221 lang=python3 # # [221] Maximal Square # # https://leetcode.com/problems/maximal-square/description/ # # algorithms # Medium (34.82%) # Likes: 1997 # Dislikes: 49 # Total Accepted: 175K # Total Submissions: 500.4K # Testcase Example: # '[["1","0","1","0","0"], # ["1","0","1","1","1...
[ 2, 198, 2, 2488, 44601, 598, 28, 293, 316, 8189, 4686, 28, 26115, 42392, 28, 29412, 18, 198, 2, 198, 2, 685, 26115, 60, 5436, 4402, 9276, 198, 2, 198, 2, 3740, 1378, 293, 316, 8189, 13, 785, 14, 1676, 22143, 14, 9806, 4402, 12, ...
2.161692
402
import numpy as np from statsmodels.compat import range from . import utils def dot_plot(points, intervals=None, lines=None, sections=None, styles=None, marker_props=None, line_props=None, split_names=None, section_order=None, line_order=None, stacked=False, styles_order=None, s...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 9756, 27530, 13, 5589, 265, 1330, 2837, 198, 6738, 764, 1330, 3384, 4487, 628, 198, 4299, 16605, 62, 29487, 7, 13033, 11, 20016, 28, 14202, 11, 3951, 28, 14202, 11, 9004, 28, 14202, 11, 198, ...
2.042818
8,758
"""create_pipeline_offset_table Revision ID: 746f77fcf519 Revises: 63c90017aa5d Create Date: 2020-10-20 13:32:59.329693 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '746f77fcf519' down_revision = '63c90017aa5d' branch_labels = None depends_on = None
[ 37811, 17953, 62, 79, 541, 4470, 62, 28968, 62, 11487, 198, 198, 18009, 1166, 4522, 25, 767, 3510, 69, 3324, 69, 12993, 47785, 198, 18009, 2696, 25, 8093, 66, 12865, 1558, 7252, 20, 67, 198, 16447, 7536, 25, 12131, 12, 940, 12, 1238...
2.512
125
# # Copyright (c) 2013-2019 Contributors to the Eclipse Foundation # # See the NOTICE file distributed with this work for additional information regarding copyright # ownership. All rights reserved. This program and the accompanying materials are made available # under the terms of the Apache License, Version 2.0 which...
[ 2, 198, 2, 15069, 357, 66, 8, 2211, 12, 23344, 25767, 669, 284, 262, 30991, 5693, 198, 2, 198, 2, 4091, 262, 28536, 2393, 9387, 351, 428, 670, 329, 3224, 1321, 5115, 6634, 198, 2, 9238, 13, 1439, 2489, 10395, 13, 770, 1430, 290, ...
2.613031
1,013
#!/usr/bin/env python # -*- coding: utf-8 -*- from openravepy import * import sys import numpy as np # initialize environment env = Environment() env.StopSimulation() # openrave_root = './' # env.Load(openrave_root + "baxter_ik.xml") env.Load("sc_3dof.xml") env.SetViewer('qtcoin') # start the viewer (conflicts with ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 1280, 5758, 9078, 1330, 1635, 198, 11748, 25064, 198, 11748, 299, 32152, 355, 45941, 628, 198, 2, 41216, 285...
2.671552
1,160
import discord # type: ignore from discord.ext import commands # type: ignore from discord.commands import Option # type: ignore from typing import Optional import json import requests from utils import error, PROFILE_NAMES, hf, guild_ids from menus import generate_static_preset_menu from emojis import ITEM_RARITY...
[ 11748, 36446, 220, 1303, 2099, 25, 8856, 198, 6738, 36446, 13, 2302, 1330, 9729, 220, 1303, 2099, 25, 8856, 198, 6738, 36446, 13, 9503, 1746, 1330, 16018, 220, 1303, 2099, 25, 8856, 198, 6738, 19720, 1330, 32233, 198, 198, 11748, 33918,...
2.8487
423
#!/usr/bin/env python # _*_ coding: utf-8 _*_ # @Time : 2021/12/27 14:03 # @Author : zhangjianming # @Email : YYDSPanda@163.com # @File : MyModel.py # @Software: PyCharm import torch import torch.nn as nn import torch.nn.functional as F from torch_nlp_job_default.util.log_config import get_logger logger = ge...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 4808, 9, 62, 19617, 25, 3384, 69, 12, 23, 4808, 9, 62, 198, 2, 2488, 7575, 220, 220, 220, 1058, 33448, 14, 1065, 14, 1983, 1478, 25, 3070, 198, 2, 2488, 13838, 220, 1058, 1976...
2.164773
176
class NotImplementedEngineError(NotImplementedError): """Exception raised when executing a method with a specific engine is not supported yet. This exception is raised when a method can not be executed with the selected engine by the user. Parameters ---------- engine : str The engine not...
[ 4871, 1892, 3546, 1154, 12061, 13798, 12331, 7, 3673, 3546, 1154, 12061, 12331, 2599, 628, 220, 220, 220, 37227, 16922, 4376, 618, 23710, 257, 2446, 351, 257, 2176, 3113, 318, 407, 4855, 1865, 13, 628, 220, 220, 220, 770, 6631, 318, 4...
3.108883
349
# -*- coding: utf-8 -*- """ Test BeautifyIcon --------------- """ from __future__ import (absolute_import, division, print_function) from jinja2 import Template import folium from folium import plugins
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 14402, 13711, 1958, 19578, 198, 24305, 198, 198, 37811, 198, 198, 6738, 11593, 37443, 834, 1330, 357, 48546, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 8,...
3.166667
66
import torch.nn as nn
[ 11748, 28034, 13, 20471, 355, 299, 77, 628 ]
2.875
8
# MIT License # # Copyright (c) 2016 Patrick Eschenbach # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, ...
[ 2, 17168, 13789, 198, 2, 198, 2, 15069, 357, 66, 8, 1584, 9925, 16319, 831, 19496, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 198, 2, 286, 428, 3788, 290, 3917, 10314, ...
2.814249
786
# name: driving_school.py #--------------------------------- IMPORTS -------------------------------------# import time # Import time library for sleep function import easygopigo3 as easy # Import the GoPiGo3 library gpg = easy.EasyGoPiGo3() # ...
[ 2, 1438, 25, 5059, 62, 14347, 13, 9078, 628, 198, 2, 3880, 12, 30023, 33002, 20368, 30934, 2, 198, 11748, 640, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 22...
2.931429
350
"""The PanelComponentExplorer makes it easy to explore components""" from .panel_component_explorer import PanelComponentExplorer
[ 37811, 464, 18810, 21950, 18438, 11934, 1838, 340, 2562, 284, 7301, 6805, 37811, 198, 6738, 764, 35330, 62, 42895, 62, 20676, 11934, 1330, 18810, 21950, 18438, 11934, 198 ]
4.642857
28
import os import numpy as np import cv2 from glob import glob from tqdm import tqdm import tensorflow as tf from tensorflow.keras.models import load_model from tensorflow.keras.utils import CustomObjectScope from data_generator import * from metrics import dice_coef, dice_loss if __name__ == "__main__": model_pat...
[ 198, 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 269, 85, 17, 198, 6738, 15095, 1330, 15095, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 11192, 273, 11125, 13,...
2.378414
769
import unittest import numpy as np from tsp_spanning import tsp, point_tsp, points_to_distance_matrix if __name__ == "__main__": unittest.main()
[ 11748, 555, 715, 395, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 23053, 62, 12626, 768, 1330, 23053, 11, 966, 62, 912, 79, 11, 2173, 62, 1462, 62, 30246, 62, 6759, 8609, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834,...
2.684211
57
import json import csv from typing import Dict, List, Union def get_items_list(filename: str) -> List: """Loads items data from formatted csv files and returns the items list """ primary_title_column = 0 secondary_title_column = 1 rarity_column = 2 name_column = 3 # stats are messy...
[ 11748, 33918, 198, 11748, 269, 21370, 198, 6738, 19720, 1330, 360, 713, 11, 7343, 11, 4479, 198, 198, 4299, 651, 62, 23814, 62, 4868, 7, 34345, 25, 965, 8, 4613, 7343, 25, 198, 220, 220, 220, 37227, 8912, 82, 3709, 1366, 422, 39559,...
2.232087
1,284
import numpy as np from opytimizer.optimizers.science import efo from opytimizer.spaces import search np.random.seed(0)
[ 11748, 299, 32152, 355, 45941, 198, 198, 6738, 1034, 88, 16514, 7509, 13, 40085, 11341, 13, 16801, 1330, 304, 6513, 198, 6738, 1034, 88, 16514, 7509, 13, 2777, 2114, 1330, 2989, 198, 198, 37659, 13, 25120, 13, 28826, 7, 15, 8, 628, ...
2.863636
44
# -*- coding: utf-8 -*- """ james.task ~~~~~~~~~~~~~ Implementation of the task. Task this is action which contains checking. It should contains rule, weight """
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 220, 220, 220, 474, 1047, 13, 35943, 198, 220, 220, 220, 220, 15116, 8728, 93, 198, 220, 220, 220, 46333, 286, 262, 4876, 13, 15941, 428, 318, 2223, 543, ...
2.903226
62
import argparse import baloney.parser as baloney_parser from baloney.interpreter import BaloneyInterpreter parser = argparse.ArgumentParser() parser.add_argument('--lex', type=bool) parser.add_argument("file", type=str, help="Target .bs file") if __name__ == '__main__': args = parser.parse_arg...
[ 11748, 1822, 29572, 198, 11748, 3652, 1419, 13, 48610, 355, 3652, 1419, 62, 48610, 198, 6738, 3652, 1419, 13, 3849, 3866, 353, 1330, 8528, 1419, 9492, 3866, 353, 198, 198, 48610, 796, 1822, 29572, 13, 28100, 1713, 46677, 3419, 198, 4861...
2.690476
126
import streamlit as st import cv2 import os from inference import return_annotated_images from tensorflow.keras.models import load_model from streamlit_webrtc import ( ClientSettings, VideoTransformerBase, WebRtcMode, webrtc_streamer, ) WEBRTC_CLIENT_SETTINGS = ClientSettings( rtc_configuration={"i...
[ 11748, 4269, 18250, 355, 336, 198, 11748, 269, 85, 17, 198, 11748, 28686, 198, 6738, 32278, 1330, 1441, 62, 34574, 515, 62, 17566, 198, 6738, 11192, 273, 11125, 13, 6122, 292, 13, 27530, 1330, 3440, 62, 19849, 198, 6738, 4269, 18250, ...
2.420339
590
# Copyright (C) 2016 Nippon Telegraph and Telephone Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
[ 2, 15069, 357, 34, 8, 1584, 399, 3974, 261, 21821, 290, 44735, 10501, 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...
2.891514
1,143
# Adafruit PN532 NFC/RFID control library. # Author: Tony DiCola # # The MIT License (MIT) # # Copyright (c) 2015-2018 Adafruit Industries # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software wi...
[ 2, 1215, 1878, 4872, 350, 45, 20, 2624, 24004, 14, 32754, 2389, 1630, 5888, 13, 198, 2, 6434, 25, 8832, 6031, 28635, 198, 2, 198, 2, 383, 17168, 13789, 357, 36393, 8, 198, 2, 198, 2, 15069, 357, 66, 8, 1853, 12, 7908, 1215, 1878...
2.466147
1,669
from http.server import BaseHTTPRequestHandler import http import argparse from urllib.parse import urlparse from urllib.parse import urlencode from urllib.parse import parse_qs from urllib.parse import unquote import socket, ssl, pprint from io import BytesIO XSS = "'\"><img src=\"\" onerror=alert(\"\")>" FILE_PATH =...
[ 6738, 2638, 13, 15388, 1330, 7308, 40717, 18453, 25060, 198, 11748, 2638, 198, 11748, 1822, 29572, 198, 6738, 2956, 297, 571, 13, 29572, 1330, 19016, 29572, 198, 6738, 2956, 297, 571, 13, 29572, 1330, 2956, 11925, 8189, 198, 6738, 2956, ...
2.851936
439
import tensorflow as tf import utils from tensorflow.keras import backend as K from tensorflow.keras.models import load_model # from keras import backend as K # from keras.models import load_model # from tensorflow.python.keras import backend as K def freeze_session(session, keep_var_names=None, output_names=None, c...
[ 11748, 11192, 273, 11125, 355, 48700, 198, 198, 11748, 3384, 4487, 198, 6738, 11192, 273, 11125, 13, 6122, 292, 1330, 30203, 355, 509, 198, 6738, 11192, 273, 11125, 13, 6122, 292, 13, 27530, 1330, 3440, 62, 19849, 198, 2, 422, 41927, ...
2.768672
964
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import shutil from uuid import uuid4 from flask import render_template, request, current_app, redirect, url_for, flash, Blueprint, jsonify from flask.ext.login import login_required from sqlalchemy import exists from guitarfan.extensions.flasksqlalc...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 628, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 4423, 346, 198, 6738, 334, 27112, 1330, 334, 27112, 19, 198, 198, 673...
3.22549
204
import os, requests from selenium_test_case import SeleniumTestCase, slow, online, wd, host import tests from tests.pages import faq_page, about_page from nose.tools import assert_equals, raises
[ 11748, 28686, 11, 7007, 198, 198, 6738, 384, 11925, 1505, 62, 9288, 62, 7442, 1330, 15300, 47477, 14402, 20448, 11, 3105, 11, 2691, 11, 266, 67, 11, 2583, 198, 11748, 5254, 198, 6738, 5254, 13, 31126, 1330, 24685, 80, 62, 7700, 11, ...
3.072464
69
import heading_planning_laylines import json import make_ros_tasks
[ 11748, 9087, 62, 11578, 768, 62, 10724, 6615, 198, 11748, 33918, 198, 11748, 787, 62, 4951, 62, 83, 6791, 628 ]
3.4
20
if __name__ == '__main__': s = input("Input: ") print(f"Output: {Solution().reverseWords(s)}")
[ 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 264, 796, 5128, 7203, 20560, 25, 366, 8, 198, 220, 220, 220, 3601, 7, 69, 1, 26410, 25, 1391, 46344, 22446, 50188, 37117, 7, 82, 38165, 4943, ...
2.386364
44
"""Tradfri lights platform tests.""" from copy import deepcopy from unittest.mock import Mock, MagicMock, patch, PropertyMock import pytest from pytradfri.device import Device from pytradfri.device.light import Light from pytradfri.device.light_control import LightControl from homeassistant.components import tradfri...
[ 37811, 2898, 324, 69, 380, 7588, 3859, 5254, 526, 15931, 198, 198, 6738, 4866, 1330, 2769, 30073, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 44123, 11, 6139, 44, 735, 11, 8529, 11, 14161, 44, 735, 198, 198, 11748, 12972, 9288, 198...
2.351531
5,422
from texting_wall import settings as django_settings
[ 6738, 36634, 62, 11930, 1330, 6460, 355, 42625, 14208, 62, 33692, 198 ]
4.416667
12
import random import numpy as np import matplotlib.pyplot as plt import os import pandas as pd import torch from torch.utils.data import DataLoader, Dataset from torch.utils.data.sampler import SubsetRandomSampler import imp from librosa.core import load from librosa.output import write_wav from scipy.io import wavfile...
[ 11748, 4738, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 28686, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 28034, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 6060...
2.693846
650
# -*- coding: utf-8 -*- """ Created on Fri Jun 7 07:40:20 2013 @author: abrys """ # To ignore numpy errors: # pylint: disable=E1101 import nibabel import numpy from dicom2nifti.common import get_nifti_data class Slice(object): """ Class containing all data for a single slice in an image volume """...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 19480, 7653, 220, 767, 8753, 25, 1821, 25, 1238, 2211, 198, 198, 31, 9800, 25, 450, 19753, 198, 37811, 198, 2, 1675, 8856, 299, 32152, 8563, 25...
2.187761
2,631
from typing import List, Dict import torch from pymarlin.core import trainer_backend, module_interface, trainer from torch.utils.data import DataLoader # too long import from pymarlin.utils.stats import global_stats from pymarlin.utils.config_parser.custom_arg_parser import CustomArgParser from pymarlin.utils.distribu...
[ 6738, 19720, 1330, 7343, 11, 360, 713, 198, 11748, 28034, 198, 6738, 12972, 3876, 2815, 13, 7295, 1330, 21997, 62, 1891, 437, 11, 8265, 62, 39994, 11, 21997, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 6060, 17401, 198, 198, 2, 1165,...
2.677165
762
import os import re import sys import platform import subprocess import fnmatch import shutil from setuptools import setup, Extension, find_packages from setuptools.command.build_ext import build_ext import setuptools.command.build_py from distutils.version import LooseVersion from ctypes.util import find_library ver...
[ 11748, 28686, 198, 11748, 302, 198, 11748, 25064, 198, 11748, 3859, 198, 11748, 850, 14681, 198, 11748, 24714, 15699, 198, 11748, 4423, 346, 198, 198, 6738, 900, 37623, 10141, 1330, 9058, 11, 27995, 11, 1064, 62, 43789, 198, 6738, 900, ...
2.427448
1,144
import pandas as pd from pathlib import Path import sys def get_trinity_samples(run_name, condition, outfile, samples_path="config/samples.tsv", units_path="config/units.tsv"): """ """ samples = ( pd.read_csv(samples_path, sep="\t", dtype={"ID": str}) .set_index("ID", drop=False) .s...
[ 11748, 19798, 292, 355, 279, 67, 198, 6738, 3108, 8019, 1330, 10644, 198, 11748, 25064, 198, 198, 4299, 651, 62, 2213, 6269, 62, 82, 12629, 7, 5143, 62, 3672, 11, 4006, 11, 503, 7753, 11, 8405, 62, 6978, 2625, 11250, 14, 82, 12629, ...
2.054054
518
#!/usr/bin/env python # Copyright (C) 2016 Uvea I. S., Kevin Rattai # # Watch for channel request and assign channel based on prior or unassigned chan # # This software is based on an unknown license, but is available # with no license statement from here: # http://stackoverflow.com/questions/31775450/publish-and-subs...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 15069, 357, 34, 8, 1584, 471, 303, 64, 314, 13, 311, 1539, 7939, 50100, 1872, 198, 2, 198, 2, 6305, 329, 6518, 2581, 290, 8333, 6518, 1912, 319, 3161, 393, 555, 562, 3916, ...
2.592295
623
# ###################################################################################################################### # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # # ...
[ 2, 1303, 29113, 29113, 29113, 14468, 4242, 2, 198, 2, 220, 15069, 6186, 13, 785, 11, 3457, 13, 393, 663, 29116, 13, 1439, 6923, 33876, 13, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
2.223361
976
# I would like to be able to pass an array with two elements to my swapValues function # to swap the values. However it appears that the values aren't changing. # Can you figure out what's wrong here?
[ 2, 314, 561, 588, 284, 307, 1498, 284, 1208, 281, 7177, 351, 734, 4847, 284, 616, 16075, 40161, 2163, 198, 2, 220, 284, 16075, 262, 3815, 13, 2102, 340, 3568, 326, 262, 3815, 3588, 470, 5609, 13, 198, 2, 1680, 345, 3785, 503, 644,...
4.08
50
#!/usr/bin/python # ***************************************************************************** # # Copyright (c) 2016, EPAM SYSTEMS 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 # #...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 2, 41906, 17174, 4557, 35625, 198, 2, 198, 2, 15069, 357, 66, 8, 1584, 11, 14724, 2390, 36230, 50, 19387, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, ...
2.17971
9,315
import os import sys from util import read from util.crypto.rc4 import rc4 from util.patch.syscall import find_syscall_funcs
[ 11748, 28686, 198, 11748, 25064, 198, 198, 6738, 7736, 1330, 1100, 198, 6738, 7736, 13, 29609, 78, 13, 6015, 19, 1330, 48321, 19, 198, 6738, 7736, 13, 17147, 13, 17597, 13345, 1330, 1064, 62, 17597, 13345, 62, 12543, 6359, 198 ]
3.15
40
# vim: set ft=python fileencoding=utf-8 tw=72 fdm=indent foldlevel=1 nowrap: """ Simple server for testing purposes. :copyright: © 2012-2020, J. A. Corbal :license: MIT """ import os import sys from http.server import HTTPServer, SimpleHTTPRequestHandler class Server: """Simple server. .. versionchanged:: 1...
[ 2, 43907, 25, 900, 10117, 28, 29412, 2393, 12685, 7656, 28, 40477, 12, 23, 665, 28, 4761, 277, 36020, 28, 521, 298, 5591, 5715, 28, 16, 783, 2416, 25, 198, 37811, 198, 26437, 4382, 329, 4856, 4959, 13, 198, 198, 25, 22163, 4766, 2...
2.272634
972
from molsysmt._private.exceptions import * from molsysmt._private.digestion import * from molsysmt._private.lists_and_tuples import is_list_or_tuple
[ 6738, 285, 10220, 893, 16762, 13557, 19734, 13, 1069, 11755, 1330, 1635, 198, 6738, 285, 10220, 893, 16762, 13557, 19734, 13, 12894, 395, 295, 1330, 1635, 198, 6738, 285, 10220, 893, 16762, 13557, 19734, 13, 20713, 62, 392, 62, 28047, 2...
2.941176
51
from datetime import datetime import json from app import db, LOGGER from app.utils.testing import ApiTestCase from app.events.models import Event, EventRole from app.users.models import AppUser, UserCategory, Country from app.applicationModel.models import ApplicationForm, Question, Section from app.responses...
[ 6738, 4818, 8079, 1330, 4818, 8079, 201, 198, 11748, 33918, 201, 198, 201, 198, 6738, 598, 1330, 20613, 11, 41605, 30373, 201, 198, 6738, 598, 13, 26791, 13, 33407, 1330, 5949, 72, 14402, 20448, 201, 198, 6738, 598, 13, 31534, 13, 275...
3.544444
180
# -*- coding: utf-8 -*- ''' Created on 09.07.2015 @author: Goetz Edinger ''' import enchant import nltk.data from nltk.tokenize import sent_tokenize from nltk.tokenize import word_tokenize import string import sys debug = True dict_sentence_length = {} dict_word_length = {} number_of_letters ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 7061, 6, 198, 41972, 319, 7769, 13, 2998, 13, 4626, 198, 198, 31, 9800, 25, 1514, 23773, 1717, 3889, 198, 7061, 6, 198, 11748, 23260, 198, 11748, 299, 2528, 74, ...
3.350254
591
# # Copyright (c) 2019, 2020 Oracle and/or its affiliates. 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 r...
[ 2, 198, 2, 15069, 357, 66, 8, 13130, 11, 12131, 18650, 290, 14, 273, 663, 29116, 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, 4...
2.437024
1,707
from models.status import Status from datetime import datetime class User: """ The User object represents a person, bot or entity registered as a user in the application. username: (str) password: (str) last_seen: (str) timestamp when the user was latest ...
[ 6738, 4981, 13, 13376, 1330, 12678, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 4871, 11787, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 383, 11787, 2134, 6870, 257, 1048, 11, 220, 198, 220, 220, 220, 10214, 393, 9312, ...
2.467249
229
import media import fresh_tomatoes def main(): """Generate an HTML page to show movies with corresponding information.""" toy_story = media.Movie( "Toy Story", "A story of a boy and his toys that come to life.", "https://upload.wikimedia.org/wikipedia/en/1/13/Toy_Story.jpg", "h...
[ 11748, 2056, 198, 11748, 4713, 62, 39532, 15048, 628, 198, 4299, 1388, 33529, 198, 220, 220, 220, 37227, 8645, 378, 281, 11532, 2443, 284, 905, 6918, 351, 11188, 1321, 526, 15931, 198, 220, 220, 220, 13373, 62, 13571, 796, 2056, 13, 2...
2.125
928
# -*- coding: utf-8 -*- import argparse import os import signal import subprocess import sys # Project defaults from utils import utils # ===== LOAD CONFIGURATION FILE ===== CONFIG_FILE = "conf/conf.json" CFG, log, = utils.init_main_data(CONFIG_FILE) if CFG is None or log is None: print("Unable to load {}".format...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 1822, 29572, 198, 11748, 28686, 198, 11748, 6737, 198, 11748, 850, 14681, 198, 11748, 25064, 198, 198, 2, 4935, 26235, 198, 6738, 3384, 4487, 1330, 3384, 4487, 198,...
2.381786
1,142
from amuse.lab import new_powerlaw_mass_distribution ###BOOKLISTSTART### import numpy import math from amuse.units import units from matplotlib import pyplot from prepare_figure import figure_frame, get_distinct ###BOOKLISTSTOP### if __name__ in ('__main__', '__plot__'): o, arguments = new_option_parser().parse_...
[ 6738, 26072, 13, 23912, 1330, 649, 62, 6477, 6270, 62, 22208, 62, 17080, 3890, 198, 198, 21017, 39453, 45849, 2257, 7227, 21017, 198, 11748, 299, 32152, 198, 11748, 10688, 198, 6738, 26072, 13, 41667, 1330, 4991, 198, 6738, 2603, 29487, ...
2.956522
138
"""Represent a range of years, with ability to update based on a track""" # Copyright 2016-2020 Florian Pigorsch & Contributors. All rights reserved. # # Use of this source code is governed by a MIT-style # license that can be found in the LICENSE file. import datetime import re import typing class YearRange: ""...
[ 37811, 40171, 257, 2837, 286, 812, 11, 351, 2694, 284, 4296, 1912, 319, 257, 2610, 37811, 198, 2, 15069, 1584, 12, 42334, 4432, 666, 23097, 669, 354, 1222, 25767, 669, 13, 1439, 2489, 10395, 13, 198, 2, 198, 2, 5765, 286, 428, 2723,...
2.340701
1,312
from .config import get_parser as char_rnn_parser from .model import CharRNN from .trainer import CharRNNTrainer
[ 6738, 764, 11250, 1330, 651, 62, 48610, 355, 1149, 62, 81, 20471, 62, 48610, 198, 6738, 764, 19849, 1330, 3178, 49, 6144, 198, 6738, 764, 2213, 10613, 1330, 3178, 49, 6144, 2898, 10613 ]
3.393939
33
# Definition for a binary tree node. from sortedArrayToBST import Solution test = Solution() head_node = test.sortedArrayToBST([1, 2, 3, 4, 5, 6, 7]) test1 = Solution1() print test1.pathSum(head_node, 7) # 4 # 2 6 # 1 3 5 7
[ 2, 30396, 329, 257, 13934, 5509, 10139, 13, 198, 6738, 23243, 19182, 2514, 33, 2257, 1330, 28186, 198, 198, 9288, 796, 28186, 3419, 198, 2256, 62, 17440, 796, 1332, 13, 82, 9741, 19182, 2514, 33, 2257, 26933, 16, 11, 362, 11, 513, 1...
2.51087
92
import json import os import requests import pprint from datadog import initialize, api # source /opt/datadog/datadog-agent/venv/bin/activate DD_API_KEY = os.getenv('DD_API_KEY', '') DD_APP_KEY = os.getenv('DD_APP_KEY', '') options = { 'api_key': DD_API_KEY, 'app_key': DD_APP_KEY } initialize(**options) i...
[ 11748, 33918, 198, 11748, 28686, 198, 11748, 7007, 198, 11748, 279, 4798, 198, 198, 6738, 4818, 324, 519, 1330, 41216, 11, 40391, 198, 198, 2, 2723, 1220, 8738, 14, 19608, 324, 519, 14, 19608, 324, 519, 12, 25781, 14, 574, 85, 14, 8...
2.743873
816
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Jan T. Sott # Copyright (c) 2017 Jan T. Sott # # License: MIT # Ported to CudaLint by Alexey T. # from cuda_lint import Linter, util class Iscc(Linter): """Provides an interface to the ISCC executable.""" c...
[ 2, 198, 2, 300, 3849, 13, 9078, 198, 2, 406, 3849, 329, 3834, 27299, 43, 3849, 18, 11, 257, 2438, 10627, 9355, 329, 3834, 27299, 8255, 513, 198, 2, 198, 2, 22503, 416, 2365, 309, 13, 311, 1252, 198, 2, 15069, 357, 66, 8, 2177, ...
2.372385
239
from django.test import TestCase from django.contrib.auth import get_user_model import json User = get_user_model()
[ 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 651, 62, 7220, 62, 19849, 198, 11748, 33918, 198, 198, 12982, 796, 651, 62, 7220, 62, 19849, 3419, 628 ]
3.189189
37
from django.urls import path, include from . import views urlpatterns = [ path('', views.index, name='index'), path('populated_cities', views.populated_cities_query, name ='populated_cities'), path('start_tour_cities', views.start_tour_cities, name ='start_tour_cities'), path('stop_tour_cities', views....
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 11, 2291, 198, 6738, 764, 1330, 5009, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 3108, 10786, 3256, 5009, 13, 9630, 11, 1438, 11639, 9630, 33809, 198, 220, 220, 220, 3108, ...
2.528777
834
import Enum RF = Enum.enum(ORIGINAL=0, PIECE=1, EN_LINE1=2, EN_LINE2=3)
[ 11748, 2039, 388, 198, 198, 32754, 796, 2039, 388, 13, 44709, 7, 1581, 3528, 17961, 28, 15, 11, 30434, 2943, 36, 28, 16, 11, 12964, 62, 24027, 16, 28, 17, 11, 12964, 62, 24027, 17, 28, 18, 8, 220 ]
1.871795
39
# EMACS settings: -*- tab-width: 2; indent-tabs-mode: t; python-indent-offset: 2 -*- # vim: tabstop=2:shiftwidth=2:noexpandtab # kate: tab-width 2; replace-tabs off; indent-width 2; # # ============================================================================== # Authors: Patrick Lehmann # ...
[ 2, 17228, 2246, 50, 6460, 25, 532, 9, 12, 197, 8658, 12, 10394, 25, 362, 26, 33793, 12, 8658, 82, 12, 14171, 25, 256, 26, 21015, 12, 521, 298, 12, 28968, 25, 362, 532, 9, 12, 198, 2, 43907, 25, 7400, 11338, 28, 17, 25, 30846, ...
3.145161
558
S = input() if all(c == ' ' for c in S[1::2]) and all('a' <= c <= 'z' for c in S[::2]): print('Yes') else: print('No')
[ 50, 796, 5128, 3419, 198, 198, 361, 477, 7, 66, 6624, 705, 705, 329, 269, 287, 311, 58, 16, 3712, 17, 12962, 290, 477, 10786, 64, 6, 19841, 269, 19841, 705, 89, 6, 329, 269, 287, 311, 58, 3712, 17, 60, 2599, 198, 220, 220, 220...
2.064516
62
# # # # # import numpy as np import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import matplotlib.animation as animation ## Computing grid and resolutions # Grid size x-direction NX = 500 # Grid size y-direction NY = 500 ## Properties of the acoustic excitation # Frequency freq = 60.0e3 ...
[ 2, 198, 2, 198, 2, 198, 2, 198, 2, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 198, 6759, 29487, 8019, 13, 1904, 10786, 46384, 11537, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 117...
2.317352
1,314
from abc import ( ABC, abstractmethod, ) from typing import ( Union, )
[ 6738, 450, 66, 1330, 357, 198, 220, 220, 220, 9738, 11, 198, 220, 220, 220, 12531, 24396, 11, 198, 8, 198, 6738, 19720, 1330, 357, 198, 220, 220, 220, 4479, 11, 198, 8, 628, 198 ]
2.428571
35
import GPy from GPyOpt.util.general import get_quantiles import GPyOpt import numpy as np from math import pow, log, sqrt import pandas as pd # train_x : history x # train_y : history y # num_init : The number of initial sample points # lsx : the collected x in last round # lsy : the text function value c...
[ 11748, 14714, 88, 201, 198, 6738, 14714, 88, 27871, 13, 22602, 13, 24622, 1330, 651, 62, 40972, 2915, 201, 198, 11748, 14714, 88, 27871, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 6738, 10688, 1330, 7182, 11, 2604, 11, 19862, ...
3.726415
212
# -*- coding: utf-8 -*- { 'name': "自定义主题界面风格", 'summary': """自定义界面风格模块""", 'description': """用以自定义Odoo界面风格的模块""", 'author': "SuXueFeng", 'website': "https://www.sxfblog.com", 'category': 'style', 'version': '0.1', 'depends': ['base'], 'data': [ 'views/WebAssetsBackend.xml', ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 90, 198, 220, 220, 220, 705, 3672, 10354, 366, 164, 229, 103, 22522, 248, 20046, 231, 10310, 119, 165, 95, 246, 45911, 234, 165, 251, 95, 45617, 236, 43718, 120, 1600,...
1.502146
233
a = "aaa" b = "bbb" + "ccc" d = """ddd eee fff""" + "ggg" l = ["hhh", "iii" + "jjj"] noqa = "k" "l" # noqa: NIC001 noqa = ("k" # noqa: NIC002 "l") print("abc" + "def", "ghi")
[ 64, 796, 366, 46071, 1, 198, 65, 796, 366, 11848, 65, 1, 1343, 366, 535, 66, 1, 198, 67, 796, 37227, 1860, 67, 198, 1453, 68, 198, 20972, 37811, 1343, 366, 1130, 70, 1, 198, 75, 796, 14631, 49126, 1600, 198, 220, 220, 220, 220, ...
1.710526
114
# Generated by Django 2.2.7 on 2019-11-18 16:44 from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 22, 319, 13130, 12, 1157, 12, 1507, 1467, 25, 2598, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, 9945, 13, 27530, 13, 2934, 1616, 295, ...
2.818182
44
from setuptools import setup import os env = os.getenv('environment_name') or 'dev' if env == 'prd': setup( name='NHentai-API', version='0.0.17', description='NHentai Python API made using webscraping.', long_description=readme(), long_description_content_type='text/markdow...
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 11748, 28686, 198, 198, 24330, 796, 28686, 13, 1136, 24330, 10786, 38986, 62, 3672, 11537, 393, 705, 7959, 6, 198, 198, 361, 17365, 6624, 705, 1050, 67, 10354, 198, 220, 220, 220, 9058, 7, 198...
2.250605
826
# coding=utf-8 # Distributed under the MIT software license, see the accompanying # file LICENSE or http://www.opensource.org/licenses/mit-license.php. from unittest import TestCase from mock import Mock from pyqrllib.pyqrllib import bin2hstr, hstr2bin from qrl.daemon.walletd import WalletD from qrl.generated import ...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 4307, 6169, 739, 262, 17168, 3788, 5964, 11, 766, 262, 19249, 198, 2, 2393, 38559, 24290, 393, 2638, 1378, 2503, 13, 44813, 1668, 13, 2398, 14, 677, 4541, 14, 2781, 12, 43085, 13, 10121, 13, 19...
3.074468
188
""" Revision ID: 23184a5b4714 Revises: 2fcbb8a6de94 Create Date: 2017-05-29 17:13:59.813275 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '23184a5b4714' down_revision = '2fcbb8a6de94' branch_labels = None depends_on = None
[ 37811, 198, 198, 18009, 1166, 4522, 25, 2242, 22883, 64, 20, 65, 2857, 1415, 198, 18009, 2696, 25, 362, 16072, 11848, 23, 64, 21, 2934, 5824, 198, 16447, 7536, 25, 2177, 12, 2713, 12, 1959, 1596, 25, 1485, 25, 3270, 13, 23, 1485, ...
2.403361
119
""" To do get hanja get multiple definitions on page example sentences """ from bs4 import BeautifulSoup import urllib.request import urllib.parse import time import re import random defin = [] class NaverDict: """ This class looks up korean vocabulary words using the Naver korean-english dictionary. ...
[ 37811, 198, 2514, 466, 198, 1136, 289, 272, 6592, 198, 1136, 3294, 17336, 319, 2443, 198, 20688, 13439, 198, 37811, 198, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 11748, 2956, 297, 571, 13, 25927, 198, 11748, 2956, 297, 571...
2.216381
818
import logging import owlready2 import tqdm import auto.auto logger = logging.getLogger(__name__) _CACHED_CP_CLASSES = dict() class Scene_Criticality_Phenomenon(Criticality_Phenomenon): """ Concretization for scene-level criticality phenomena. Note that member traffic_model is a list of scenes. """ ...
[ 11748, 18931, 198, 11748, 39610, 1493, 17, 198, 11748, 256, 80, 36020, 198, 198, 11748, 8295, 13, 23736, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 198, 198, 62, 34, 16219, 1961, 62, 8697, 62, 316...
2.22896
4,634
import re import requests import threading import queue as Queue from requests.packages.urllib3.exceptions import InsecureRequestWarning
[ 11748, 302, 198, 11748, 7007, 198, 11748, 4704, 278, 198, 11748, 16834, 355, 4670, 518, 198, 6738, 7007, 13, 43789, 13, 333, 297, 571, 18, 13, 1069, 11755, 1330, 554, 22390, 18453, 20361, 198 ]
4.029412
34
# -*- mode: python; coding: utf-8 -*- # Copyright 2019 the HERA Collaboration # Licensed under the 2-clause BSD License """Test code in hera_librarian/cli.py """ import pytest import os import hera_librarian from hera_librarian import cli
[ 2, 532, 9, 12, 4235, 25, 21015, 26, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 13130, 262, 24906, 32, 37322, 341, 198, 2, 49962, 739, 262, 362, 12, 565, 682, 347, 10305, 13789, 198, 198, 37811, 14402, 2438, 287, 339...
2.940476
84
import tensorflow as tf from nn_utils import * import numpy as np import nn_utils
[ 201, 198, 11748, 11192, 273, 11125, 355, 48700, 201, 198, 6738, 299, 77, 62, 26791, 1330, 1635, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 299, 77, 62, 26791, 201, 198, 201 ]
2.617647
34