content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
from enum import Enum from typing import Optional from pydantic import BaseModel, Field, validator from bson.objectid import ObjectId def generate_objectid(): """Returns ObjectId as str.""" return str(ObjectId()) class TaskId(BaseModel): """ Id of a Task. Despites the TaskId value represents an...
[ 6738, 33829, 1330, 2039, 388, 198, 6738, 19720, 1330, 32233, 198, 198, 6738, 279, 5173, 5109, 1330, 7308, 17633, 11, 7663, 11, 4938, 1352, 198, 6738, 275, 1559, 13, 15252, 312, 1330, 9515, 7390, 628, 198, 4299, 7716, 62, 15252, 312, 3...
3.081522
184
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function import csv import numpy as np import os import sys from observations.util import maybe_download_and_extract def galton_families(path): """Galton's data on the heights of parents and...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 269, 21370, ...
2.975118
844
from osbot_aws.apis.Lambda import Lambda from pbx_gs_python_utils.utils.Dev import Dev from pbx_gs_python_utils.utils.Lambdas_Helpers import slack_message from pbx_gs_python_utils.utils.Misc import Misc from osbot_jupyter.api.CodeBuild_Jupyter_Helper import CodeBuild_Jupyter_Helper from osbot_jupyter.api.Live_Notebook...
[ 6738, 28686, 13645, 62, 8356, 13, 499, 271, 13, 43, 4131, 6814, 1330, 21114, 6814, 198, 6738, 279, 65, 87, 62, 14542, 62, 29412, 62, 26791, 13, 26791, 13, 13603, 1330, 6245, 198, 6738, 279, 65, 87, 62, 14542, 62, 29412, 62, 26791, ...
2.658915
129
#!/usr/bin/env python3 import scrape_common as sc print('BS') # The list of articles is also available on https://www.gd.bs.ch/medienseite/medienmitteilungen.html URL = sc.download("https://www.gd.bs.ch/") URL = sc.filter(r'Tagesbulletin.*Corona', URL) # 2020-03-25, List of sub-articles: """ <a href="/nm/2020-ta...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 42778, 62, 11321, 355, 629, 198, 198, 4798, 10786, 4462, 11537, 198, 2, 383, 1351, 286, 6685, 318, 635, 1695, 319, 3740, 1378, 2503, 13, 21287, 13, 1443, 13, 354, 14,...
2.178282
1,851
import numpy as np import math import cv2 import matplotlib.pyplot as plt import time import numpy.ma as ma import gym from gym import spaces from gym.envs.toy_text import discrete from stable_baselines.common.policies import MlpPolicy from stable_baselines import PPO2 from stable_baselines.common.env_checker import ...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 10688, 198, 11748, 269, 85, 17, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 640, 198, 11748, 299, 32152, 13, 2611, 355, 17266, 198, 198, 11748, 11550, 198, 6738, ...
2.468034
2,096
import typing as tp import numpy as np from nevergrad.common import testing from . import game @testing.parametrized(**{name: (name,) for name in game._Game().get_list_of_games()})
[ 11748, 19720, 355, 256, 79, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 1239, 9744, 13, 11321, 1330, 4856, 198, 6738, 764, 1330, 983, 628, 198, 31, 33407, 13, 17143, 316, 380, 8863, 7, 1174, 90, 3672, 25, 357, 3672, 35751, 329, 1...
3.155172
58
#!/usr/bin/env python """ pg.examples.testsprite Like the testsprite.c that comes with libsdl, this pygame version shows lots of sprites moving around. It is an abomination of ugly code, and mostly used for testing. See pg.examples.aliens for some prettyier code. """ import sys import os from random import randint...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 23241, 13, 1069, 12629, 13, 41989, 1050, 578, 198, 198, 7594, 262, 5254, 1050, 578, 13, 66, 326, 2058, 351, 9195, 21282, 75, 11, 428, 12972, 6057, 2196, 2523, 198, 75, 1747, 2...
2.226401
2,659
import pkgutil import sys import bankinator.bank import bankinator.output import getpass
[ 11748, 279, 10025, 22602, 198, 11748, 25064, 198, 11748, 3331, 20900, 13, 17796, 198, 11748, 3331, 20900, 13, 22915, 198, 11748, 651, 6603, 628, 628 ]
3.68
25
# -*- coding: utf-8 -*- import datetime import pathlib import pickle import os import logging import numpy as np import torch as t from torch.optim import Adagrad, lr_scheduler from torch.utils.data import DataLoader from torch.utils.tensorboard import SummaryWriter from tqdm import tqdm from train_utils import save_...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 4818, 8079, 198, 11748, 3108, 8019, 198, 11748, 2298, 293, 198, 11748, 28686, 198, 11748, 18931, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 355, 25...
3.223602
161
#!/usr/bin/python import argparse from apiclient.discovery import build import httplib2 from oauth2client import client from oauth2client import file from oauth2client import tools from apiclient.errors import HttpError import pprint from config import CREDENTIALS_JSON def get_service(api_name, api_version, scope...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 11748, 1822, 29572, 198, 198, 6738, 2471, 291, 75, 1153, 13, 67, 40821, 1330, 1382, 198, 11748, 1841, 489, 571, 17, 198, 6738, 267, 18439, 17, 16366, 1330, 5456, 198, 6738, 267, 18439, ...
3.14689
2,090
""" 列名称、数据类型、单位辅助转换工具 列名称规则: 1. 去除前导大写字符; 如"一、营业总收入" -> "营业总收入" "(一)基本每股收益" -> "基本每股收益" 2. 列名称 (上限) -> 列名称_上限_ -> 列名称_上限 3. 去除名称中的单位;如"分配股本基数(董 )万股" -> "分配股本基数_董" 4. 名称中含":",转换为"_";如"其中:营业收入" -> "其中_营业收入" """ import re import pandas as pd from .base import DB_DATE_FIELD, TS_...
[ 37811, 198, 198, 26344, 245, 28938, 235, 163, 100, 108, 23513, 46763, 108, 162, 235, 106, 163, 109, 119, 161, 252, 233, 23513, 39355, 243, 19526, 235, 164, 122, 227, 27950, 102, 164, 121, 105, 162, 235, 95, 32432, 98, 17739, 115, 19...
1.262032
2,431
""" ---> Reveal Cards In Increasing Order ---> Medium """ import collections in_deck = [17, 13, 11, 2, 3, 5, 7] a = Solution() # print(a.deckRevealedIncreasing(in_deck)) print(a.deckRevealedIncreasing_sol2(in_deck)) """ Reference - https://leetcode.com/problems/reveal-cards-in-increasing-order/discuss/200515/Ja...
[ 37811, 198, 198, 438, 3784, 31091, 282, 15824, 554, 38921, 8284, 198, 438, 3784, 13398, 198, 198, 37811, 198, 11748, 17268, 628, 198, 198, 259, 62, 35875, 796, 685, 1558, 11, 1511, 11, 1367, 11, 362, 11, 513, 11, 642, 11, 767, 60, ...
2.857724
246
#!/usr/local/bin/python3.3 a, *b = 'spam' print(a) print(b) nudge = 1 wink = 2 print(nudge, wink) A, B = nudge, wink print([A, B]) [C, D] = [nudge, wink] nudge, wink = wink, nudge print(nudge, wink) [a, b, c] = (1, 2, 3) print(a, c) (a, b, c, d) = "SPAM" print(a, c) D = {'a': 'lala', 'b': 'haha'} [g, y] = D print([...
[ 2, 48443, 14629, 14, 12001, 14, 8800, 14, 29412, 18, 13, 18, 198, 198, 64, 11, 1635, 65, 796, 705, 2777, 321, 6, 198, 4798, 7, 64, 8, 198, 4798, 7, 65, 8, 198, 198, 77, 12587, 796, 352, 198, 86, 676, 796, 362, 198, 4798, 7, ...
1.771164
756
# Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
[ 2, 15069, 1584, 3012, 3457, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, ...
2.009166
1,091
#!/usr/bin/env python """ Contains the sqlintf.Input class definition Please note that this module is private. The sqlintf.Input class is available in the ``wpipe.sqlintf`` namespace - use that instead. """ from .core import sa, orm from .DPOwner import DPOwner __all__ = ['Input'] class Input(DPOwner): """ ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 198, 4264, 1299, 262, 44161, 600, 69, 13, 20560, 1398, 6770, 198, 198, 5492, 3465, 326, 428, 8265, 318, 2839, 13, 383, 44161, 600, 69, 13, 20560, 1398, 318, 198, 15182, 287, 2...
2.605923
439
import logging _log = logging.getLogger(__name__) import asyncio from functools import partial, wraps from . import raw from .raw import Disconnected, RemoteError, Cancelled, Finished, LazyRepr from ..wrapper import Value, Type from .._p4p import (logLevelAll, logLevelTrace, logLevelDebug, logLe...
[ 198, 11748, 18931, 198, 62, 6404, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 198, 198, 11748, 30351, 952, 198, 198, 6738, 1257, 310, 10141, 1330, 13027, 11, 27521, 198, 198, 6738, 764, 1330, 8246, 198, 6738, 764, 1831, ...
2.505407
3,884
import carbon import asyncio loop = asyncio.get_event_loop() # Setting up asyncio code = """ defmodule Something do def anything() do IO.puts "Hello, World" end end """ # Any kind of code-block in any language options = carbon.CarbonOptions(code) cb = carbon.Carbon() image = loop.run_until_complet...
[ 11748, 6588, 198, 11748, 30351, 952, 198, 198, 26268, 796, 30351, 952, 13, 1136, 62, 15596, 62, 26268, 3419, 220, 1303, 25700, 510, 30351, 952, 198, 198, 8189, 796, 37227, 198, 4299, 21412, 13742, 466, 198, 220, 220, 220, 825, 1997, 3...
2.97931
145
from Annotations import annotate_modification """ This functions deletes/filters sequences and columns/positions on the MSA on the following order: - Removes all the columns/position on the MSA with gaps on the reference sequence (first sequence) - Removes all the sequences with a coverage with respect to t...
[ 6738, 47939, 1330, 24708, 378, 62, 4666, 2649, 628, 628, 628, 628, 198, 37811, 198, 1212, 5499, 28128, 274, 14, 10379, 1010, 16311, 290, 15180, 14, 1930, 1756, 319, 262, 337, 4090, 319, 262, 198, 27780, 278, 1502, 25, 628, 532, 3982, ...
3.5
160
import torch import os import glob from torch.utils.data import Dataset import numpy as np import scipy.stats as scipy_stats import numpy.matlib from PIL import Image from torchvision import transforms from xmuda.data.utils.preprocess import create_img_grid, create_voxel_grid, select_points_in_frustum, compute_local_fr...
[ 11748, 28034, 198, 11748, 28686, 198, 11748, 15095, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 16092, 292, 316, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 629, 541, 88, 13, 34242, 355, 629, 541, 88, 62, 34242, 198, 11748, 299, ...
2.564987
377
"""Locations where we look for configs, install stuff, etc""" from __future__ import absolute_import import os import os.path import platform import site import sys import sysconfig from distutils import sysconfig as distutils_sysconfig from distutils.command.install import SCHEME_KEYS # type: ignore from pip._inter...
[ 37811, 43, 20968, 810, 356, 804, 329, 4566, 82, 11, 2721, 3404, 11, 3503, 37811, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 11748, 28686, 198, 11748, 28686, 13, 6978, 198, 11748, 3859, 198, 11748, 2524, 198, 11748, ...
2.606868
1,689
import os.path import smtplib import socket import ssl from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText # Copyright (c) 2021. Xin Yang # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obt...
[ 11748, 28686, 13, 6978, 198, 11748, 895, 83, 489, 571, 198, 11748, 17802, 198, 11748, 264, 6649, 198, 6738, 3053, 13, 76, 524, 13, 16680, 541, 433, 1330, 337, 3955, 3620, 586, 541, 433, 198, 6738, 3053, 13, 76, 524, 13, 5239, 1330, ...
3.011613
775
from __future__ import absolute_import, division, print_function import stripe TEST_RESOURCE_ID = 'loc_123'
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 198, 198, 11748, 39858, 628, 198, 51, 6465, 62, 19535, 31033, 62, 2389, 796, 705, 17946, 62, 10163, 6, 628 ]
3.294118
34
""" 백준 11549번 : Identifying tea """ T = int(input()) print(list(map(int, input().split())).count(T))
[ 37811, 198, 167, 108, 109, 168, 97, 222, 12279, 2920, 167, 110, 230, 1058, 11440, 4035, 8887, 198, 37811, 198, 198, 51, 796, 493, 7, 15414, 28955, 198, 4798, 7, 4868, 7, 8899, 7, 600, 11, 5128, 22446, 35312, 28955, 737, 9127, 7, 5...
2.244444
45
from random import randint from time import sleep cor = {31 : '\033[31m', 32 : '\033[32m', 33 : '\033[33m', 34 : '\033[34m', 'f' : '\033[m'} n = randint(1, 10) print(cor[33], '=*=+=*='*14, cor['f']) print('Tente adivinhar o número {}entre 0 a 10 {}escolhido pelo computador e vença o jogo '.format(cor[31], cor['f'])) pr...
[ 6738, 4738, 1330, 43720, 600, 198, 6738, 640, 1330, 3993, 198, 10215, 796, 1391, 3132, 1058, 705, 59, 44427, 58, 3132, 76, 3256, 3933, 1058, 705, 59, 44427, 58, 2624, 76, 3256, 4747, 1058, 705, 59, 44427, 58, 2091, 76, 3256, 4974, 1...
2.140625
384
# In for loops, 'item' is the loop variable. # We don't need a loop counter # Loop through each character for item in 'Python': print(item) # Loop through each item in a list for item in ['Eric', 'Nancy', 'River']: print(item) # Loop through each item in a list for item in [1, 2, 3, 4]: print(item) # L...
[ 198, 2, 554, 329, 23607, 11, 705, 9186, 6, 318, 262, 9052, 7885, 13, 198, 2, 775, 836, 470, 761, 257, 9052, 3753, 198, 198, 2, 26304, 832, 1123, 2095, 198, 1640, 2378, 287, 705, 37906, 10354, 198, 220, 220, 220, 3601, 7, 9186, 8...
3.024823
282
#!/usr/bin/python3 """Module with database connection classess""" # System libraries import os, copy # Third-party libraries import psycopg2 from pymongo import MongoClient from config import Config VARS = [ Config.PSQL_DB, Config.DB_HOST, Config.PSQL_PASSWORD, Config.PSQL_PORT, Config.PSQL_USE...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 37811, 26796, 351, 6831, 4637, 1398, 408, 37811, 198, 198, 2, 4482, 12782, 198, 11748, 28686, 11, 4866, 198, 198, 2, 10467, 12, 10608, 12782, 198, 11748, 17331, 22163, 70, 17, 198, 6738, ...
2.582192
146
try: while True: cipo = input().split("x") maior = max(len(cipo[0]), len(cipo[-1])) for segmento in cipo: if len(segmento) // 2 > maior: maior = len(segmento) // 2 print(maior) except EOFError: pass
[ 28311, 25, 201, 198, 220, 220, 220, 981, 6407, 25, 201, 198, 220, 220, 220, 220, 220, 220, 220, 269, 541, 78, 796, 5128, 22446, 35312, 7203, 87, 4943, 201, 198, 220, 220, 220, 220, 220, 220, 220, 17266, 1504, 796, 3509, 7, 11925, ...
1.720497
161
import unittest import uuid import py3crdt from py3crdt.sequence import Sequence from datetime import datetime if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 11748, 334, 27112, 198, 11748, 12972, 18, 66, 4372, 83, 198, 6738, 12972, 18, 66, 4372, 83, 13, 43167, 1330, 45835, 198, 6738, 4818, 8079, 1330, 4818, 8079, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, ...
2.824561
57
# 创建一个人事系统类 hrSystem.record('bob',2000,98) hrSystem.print_record() #homework2 calendar.new()
[ 2, 10263, 230, 249, 161, 119, 118, 31660, 10310, 103, 21689, 12859, 233, 163, 111, 119, 163, 119, 253, 163, 109, 119, 198, 198, 11840, 11964, 13, 22105, 10786, 65, 672, 3256, 11024, 11, 4089, 8, 198, 11840, 11964, 13, 4798, 62, 2210...
1.694915
59
#!/usr/bin/env python # coding: utf-8 # Dernier TP (mini projet) : exemples de calcul numérique # - Prof : Lilian Besson # - Site du cours : [https://perso.crans.org/besson/teach/intro_num_DEM_2020/](https://perso.crans.org/besson/teach/intro_num_DEM_2020/) # - Date : mercredi 14/10/2020 et vendredi 16/10/2020. # ---...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 360, 1142, 959, 24525, 357, 45313, 386, 31173, 8, 1058, 409, 368, 2374, 390, 5204, 997, 2634, 33865, 198, 2, 532, 4415, 1058, 16342, 66...
2.014949
1,873
from django.contrib import admin from like.models import Like admin.site.register(Like, LikeAdmin)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 588, 13, 27530, 1330, 4525, 628, 198, 198, 28482, 13, 15654, 13, 30238, 7, 7594, 11, 4525, 46787, 8, 198 ]
3.4
30
""" General Constants """ __all__ = [ ]
[ 37811, 198, 12218, 4757, 1187, 198, 37811, 198, 198, 834, 439, 834, 796, 685, 198, 198, 60, 198 ]
2.333333
18
# -*- coding: utf-8 -*- # 019_cleaner.py # CODED TO BE EXECUTED SERVER SIDE : # cd /home/common/shade # python3 manage.py shell import sys from apis.voca import * ################################## # Init des paths et noms de fichiers AddLog('title' , 'Début du nettoyage du fichier') work_dir = '/home/c...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 2, 5534, 24, 62, 27773, 263, 13, 9078, 201, 198, 201, 198, 2, 327, 3727, 1961, 5390, 9348, 7788, 2943, 3843, 1961, 18871, 5959, 311, 14114, 1058, 201, 198, 2, 2...
2.633178
428
from app.api.classes.observation.models import Observation from app.db import db from flask import jsonify from sqlalchemy.sql import text
[ 6738, 598, 13, 15042, 13, 37724, 13, 672, 3168, 341, 13, 27530, 1330, 11086, 13208, 198, 6738, 598, 13, 9945, 1330, 20613, 198, 6738, 42903, 1330, 33918, 1958, 198, 6738, 44161, 282, 26599, 13, 25410, 1330, 2420, 628 ]
3.684211
38
from collections import defaultdict from tests.data_handler.data_handler_tests_utils import DataHandlerTestsUtils from covid19_il.data_handler.data_handlers.tested_individuals_scores import TestedIndividualsScores from covid19_il.data_handler.enums.resource_id import ResourceId class TestTestedIndividualsScores(Data...
[ 6738, 17268, 1330, 4277, 11600, 198, 198, 6738, 5254, 13, 7890, 62, 30281, 13, 7890, 62, 30281, 62, 41989, 62, 26791, 1330, 6060, 25060, 51, 3558, 18274, 4487, 198, 6738, 39849, 312, 1129, 62, 346, 13, 7890, 62, 30281, 13, 7890, 62, ...
2.320755
1,113
import re from unidecode import unidecode from sklearn.feature_extraction.text import CountVectorizer from sklearn.preprocessing import StandardScaler import numpy as np _pad = 'pad' _start = 'start' _eos = 'eos' _punctuation = "!'(),.:;? " _special = '-' _letters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxy...
[ 11748, 302, 198, 6738, 555, 485, 8189, 1330, 555, 485, 8189, 198, 6738, 1341, 35720, 13, 30053, 62, 2302, 7861, 13, 5239, 1330, 2764, 38469, 7509, 198, 6738, 1341, 35720, 13, 3866, 36948, 1330, 8997, 3351, 36213, 198, 11748, 299, 32152,...
2.323699
346
from __future__ import absolute_import, division, print_function import os if __name__ == "__main__": run()
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 198, 198, 11748, 28686, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 1057, 3419, 198 ]
3.2
35
#-*- coding: UTF-8 -*- # 01107267 # 03/24/2017 from flask import Flask, Response, redirect from flask_login import (LoginManager, login_required, login_user, current_user, logout_user, UserMixin) from itsdangerous import URLSafeTimedSerializer from datetime import timedelta from dat...
[ 2, 12, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 201, 198, 2, 5534, 15982, 25674, 201, 198, 2, 7643, 14, 1731, 14, 5539, 201, 198, 201, 198, 201, 198, 6738, 42903, 1330, 46947, 11, 18261, 11, 18941, 201, 198, 6738, 42903, 62,...
2.364668
4,053
import numpy as np import tensorflow as tf from utils import preprocess_flags, save_arch from utils import arch_folder if __name__ == '__main__': f = tf.compat.v1.app.flags from utils import define_default_flags define_default_flags(f) tf.compat.v1.app.run()
[ 11748, 299, 32152, 355, 45941, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 198, 6738, 3384, 4487, 1330, 662, 14681, 62, 33152, 11, 3613, 62, 998, 198, 6738, 3384, 4487, 1330, 3934, 62, 43551, 198, 198, 361, 11593, 3672, 834, 6624, ...
2.67619
105
import unittest from google.appengine.api import datastore from google.appengine.api import datastore_errors from django.db import models from django.http import HttpRequest from django.core.signals import request_finished, request_started from django.core.cache import cache from djangae.contrib import sleuth from d...
[ 11748, 555, 715, 395, 198, 198, 6738, 23645, 13, 1324, 18392, 13, 15042, 1330, 4818, 459, 382, 198, 6738, 23645, 13, 1324, 18392, 13, 15042, 1330, 4818, 459, 382, 62, 48277, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 673...
2.896396
1,554
# -*- coding: utf-8 -*- """ wechatpy.client.jsapi ~~~~~~~~~~~~~~~~~~~~ This module provides some APIs for JS SDK :copyright: (c) 2014 by messense. :license: MIT, see LICENSE for more details. """ from __future__ import absolute_import, unicode_literals import hashlib import time from wechatpy.ut...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 220, 220, 220, 356, 17006, 9078, 13, 16366, 13, 8457, 15042, 198, 220, 220, 220, 220, 27156, 8728, 628, 220, 220, 220, 770, 8265, 3769, 617, 23113, 329, 26...
3
137
def select_tcw(table, field=("*",), where=None): """ 示例内容:: select_tcw("table", ("id", "name"), where="id='2' and name='3'") 转换sql: select id,name from table where id='2' and name='3' :param table: 查询的表名称 :param field: 需要查询的字段,放入元祖中,默认值("*",) :param where: 筛选的内容,如 id='2' and name=...
[ 4299, 2922, 62, 23047, 86, 7, 11487, 11, 2214, 28, 7203, 9, 1600, 828, 810, 28, 14202, 2599, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 13328, 97, 118, 160, 122, 233, 37863, 227, 22522, 117, 3712, 628, 220, 220, 220, 220, 220,...
1.660688
3,345
import json from surprise import dump _, algo = dump.load('knn.algo') with open('movies.json') as file: movies = json.load(file) movie_name_to_raw_ids = dict() for movie_id, movie_info in movies.items(): movie_name_to_raw_ids[movie_info['name']] = movie_id ''' >>> import knowledge >>> from pprint import pprin...
[ 11748, 33918, 198, 6738, 5975, 1330, 10285, 198, 198, 62, 11, 435, 2188, 796, 10285, 13, 2220, 10786, 15418, 77, 13, 282, 2188, 11537, 198, 4480, 1280, 10786, 76, 20526, 13, 17752, 11537, 355, 2393, 25, 198, 220, 220, 220, 6918, 796, ...
2.164234
1,096
class Solution: """ @param pid: the process id @param ppid: the parent process id @param kill: a PID you want to kill @return: a list of PIDs of processes that will be killed in the end """
[ 4871, 28186, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 2488, 17143, 46514, 25, 262, 1429, 4686, 198, 220, 220, 220, 2488, 17143, 9788, 312, 25, 262, 2560, 1429, 4686, 198, 220, 220, 220, 2488, 17143, 1494, 25, 257, 37022, 3...
2.958333
72
import sys import shlex import math
[ 11748, 25064, 198, 11748, 427, 2588, 198, 11748, 10688, 198 ]
3.6
10
# https://py.checkio.org/en/mission/sun-angle/ ''' Every true traveler must know how to do 3 things: fix the fire, find the water and extract useful information from the nature around him. Programming won't help you with the fire and water, but when it comes to the information extraction - it might be just the thi...
[ 2, 3740, 1378, 9078, 13, 9122, 952, 13, 2398, 14, 268, 14, 3411, 14, 19155, 12, 9248, 14, 201, 198, 201, 198, 7061, 6, 201, 198, 6109, 2081, 40168, 1276, 760, 703, 284, 466, 513, 1243, 25, 4259, 262, 2046, 11, 1064, 262, 1660, 2...
3.274286
350
import socket from concurrent.futures import ThreadPoolExecutor, wait import tkinter as tk from scapy.all import * if __name__ == "__main__": top = tk.Tk() myPortScanner = PortScanner(top) # odic, cdic = myPortScanner.portScanner(['127.0.0.1'], 8086, 8200) myPortScanner.window() top.mainloop() ...
[ 11748, 17802, 198, 6738, 24580, 13, 69, 315, 942, 1330, 14122, 27201, 23002, 38409, 11, 4043, 198, 11748, 256, 74, 3849, 355, 256, 74, 198, 6738, 629, 12826, 13, 439, 1330, 1635, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, ...
2.425532
141
# Nícolas Ramos # desenvolvido para ser igual ao pedido no desafio print('====== DESAFIO 1 ======') primeiro = int(input('Primeiro número ')) segundo = int(input('Segundo número ')) print(f'A soma é {primeiro + segundo}')
[ 2, 399, 8836, 4033, 292, 36692, 198, 2, 748, 268, 10396, 16921, 78, 31215, 1055, 45329, 723, 257, 78, 7190, 17305, 645, 748, 1878, 952, 198, 198, 4798, 10786, 50155, 22196, 8579, 9399, 352, 29335, 28, 11537, 198, 198, 35505, 7058, 796...
2.472527
91
# flake8: noqa from stactools.core.io import use_fsspec from stactools.core.copy import (move_asset_file_to_item, move_assets, move_all_assets, copy_catalog) from stactools.core.layout import layout_catalog from stactools.core.merge import (merge_items, merge_all_items)
[ 2, 781, 539, 23, 25, 645, 20402, 198, 198, 6738, 336, 529, 10141, 13, 7295, 13, 952, 1330, 779, 62, 69, 824, 43106, 198, 6738, 336, 529, 10141, 13, 7295, 13, 30073, 1330, 357, 21084, 62, 562, 316, 62, 7753, 62, 1462, 62, 9186, 1...
2.328244
131
from __future__ import unicode_literals from __future__ import absolute_import import os import subprocess if 'PUPPETBOARD_SETTINGS' not in os.environ: os.environ['PUPPETBOARD_SETTINGS'] = os.path.join( os.getcwd(), 'settings.py' ) from puppetboard.app import app if __name__ == '__main__': # Star...
[ 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 11748, 28686, 198, 11748, 850, 14681, 198, 198, 361, 705, 5105, 10246, 2767, 8202, 9795, 62, 28480, 51, 20754, 6, 407,...
2.313278
482
# Copyright 2018 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. # A copy of the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file ac...
[ 2, 15069, 2864, 6186, 13, 785, 11, 3457, 13, 393, 663, 29116, 13, 198, 2, 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, 42...
3.643243
185
# -*- coding: utf-8 -*- """ Editor: Zhao Xinlu School: BUPT Date: 2018-03-31 算法思想: 三数之和最接近某值 """ if __name__ == '__main__': nums = [-1, 2, 1, -4] target = 1 print Solution().threeSumClosest(nums, target)
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 17171, 25, 29436, 25426, 2290, 198, 26130, 25, 347, 8577, 51, 198, 10430, 25, 2864, 12, 3070, 12, 3132, 198, 163, 106, 245, 37345, 243, 45250, 251, 46349, ...
1.728
125
#-*- coding: utf-8 -*- #File: config.py #Author: yobobobo(zhouboacmer@qq.com) import tensorflow as tf from tensorgo.utils import logger __all__ = ['TrainConfig']
[ 2, 12, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 8979, 25, 4566, 13, 9078, 198, 2, 13838, 25, 331, 672, 672, 20391, 7, 38536, 2127, 330, 647, 31, 38227, 13, 785, 8, 198, 198, 11748, 11192, 273, 11125, 355, 48700,...
2.484848
66
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from gpu_tests.gpu_test_expectations import GpuTestExpectations # See the GpuTestExpectations class for documentation.
[ 2, 15069, 1946, 383, 18255, 1505, 46665, 13, 1439, 2489, 10395, 13, 198, 2, 5765, 286, 428, 2723, 2438, 318, 21825, 416, 257, 347, 10305, 12, 7635, 5964, 326, 460, 307, 198, 2, 1043, 287, 262, 38559, 24290, 2393, 13, 198, 198, 6738,...
3.628205
78
import time
[ 11748, 640, 628 ]
4.333333
3
""" Given an array nums containing n distinct numbers in the range [0, n], return the only number in the range that is missing from the array. Follow up: Could you implement a solution using only O(1) extra space complexity and O(n) runtime complexity? Example 1: Input: nums = [3,0,1] Output: 2 Explanation: n = 3...
[ 37811, 198, 198, 15056, 281, 7177, 997, 82, 7268, 299, 7310, 3146, 287, 262, 2837, 685, 15, 11, 299, 4357, 1441, 262, 691, 1271, 287, 262, 2837, 326, 318, 4814, 422, 262, 7177, 13, 198, 198, 7155, 510, 25, 10347, 345, 3494, 257, 4...
3.114713
401
import matplotlib matplotlib.use('Agg') import numpy as np import matplotlib.pyplot as plt from pylab import rcParams # import os def create_plots(setup, cwd=''): """ Function to create detailed heatmaps and the iteration plot for a single fault Args: setup (str): name of the setup (heat or adve...
[ 11748, 2603, 29487, 8019, 198, 6759, 29487, 8019, 13, 1904, 10786, 46384, 11537, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 279, 2645, 397, 1330, 48321, 10044, 4105, ...
2.121775
2,636
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 2, 15069, 4343, 3012, 3457, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, ...
3.459873
785
import betamax import requests import unittest from requests_toolbelt import SSLAdapter
[ 11748, 731, 321, 897, 198, 11748, 7007, 198, 11748, 555, 715, 395, 198, 198, 6738, 7007, 62, 25981, 37976, 1330, 25952, 47307, 628 ]
3.913043
23
import appdaemon.plugins.hass.hassapi as hass
[ 11748, 598, 6814, 7966, 13, 37390, 13, 71, 562, 13, 71, 562, 15042, 355, 468, 82, 198 ]
2.705882
17
# Copyright 2016 Splunk, Inc. # # Licensed under the Apache License, Version 2.0 (the 'License'): you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
[ 2, 15069, 1584, 13341, 2954, 11, 3457, 13, 201, 198, 2, 201, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 705, 34156, 6, 2599, 345, 743, 201, 198, 2, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, ...
2.333333
1,536
#!/usr/bin/env python # coding: utf-8 # In[7]: import csv import matplotlib.pyplot as plt import pandas as pd from sqlalchemy import create_engine # In[8]: engine = create_engine('postgres://aruns2@mlpolicylab.db.dssg.io:5432/bills3_database') # In[5]: #test command sql = "SELECT status_id FROM catalogs.bill...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 554, 58, 22, 5974, 628, 198, 11748, 269, 21370, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 19798, 292, 3...
2.658668
2,042
""" 2017 Day 9 https://adventofcode.com/2017/day/9 """ from typing import Tuple import aocd # type: ignore def main() -> None: """ Calculate and output the solutions based on the real puzzle input. """ data = aocd.get_data(year=2017, day=9) part1, part2 = parse_stream(data) print(f"Part 1:...
[ 37811, 198, 5539, 3596, 860, 198, 5450, 1378, 324, 1151, 1659, 8189, 13, 785, 14, 5539, 14, 820, 14, 24, 198, 37811, 198, 198, 6738, 19720, 1330, 309, 29291, 198, 11748, 257, 420, 67, 220, 1303, 2099, 25, 8856, 628, 198, 198, 4299, ...
2.445122
164
from django.test import TestCase from django.test import Client import json # Create your tests here.
[ 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 42625, 14208, 13, 9288, 1330, 20985, 198, 11748, 33918, 198, 198, 2, 13610, 534, 5254, 994, 13, 628 ]
3.714286
28
#! /usr/bin/env python3 # -*-coding:utf-8 -*- # @Time : 2019/06/18 17:04:28 # @Author : che # @Email : ch1huizong@gmail.com import imaplib username = "" password = "" mail_server = "imap.qq.com" i = imaplib.IMAP4_SSL(mail_server) print(i.login(username, password)) print(i.select("INBOX")) for msg_id in i.sea...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 66, 7656, 25, 40477, 12, 23, 532, 9, 12, 198, 2, 2488, 7575, 220, 220, 220, 1058, 13130, 14, 3312, 14, 1507, 1596, 25, 3023, 25, 2078, 198, 2, 2488, 13838,...
2.096774
248
from module.interface import * from os import system system('cls') menu('List Comprehension Nomes') mulheres = ['Jeanne', 'Lisa', 'Gina', 'Aurora', 'Monica', 'Grisália', 'Natália', 'Julia', 'Rosilene', 'Tabata'] homens = ['Samuel', 'Gustavo', 'Bob', 'André', 'David', 'Idelfonso', 'João', 'Julius', 'Pedro', 'José'] t...
[ 6738, 8265, 13, 39994, 1330, 1635, 198, 6738, 28686, 1330, 1080, 198, 198, 10057, 10786, 565, 82, 11537, 198, 26272, 10786, 8053, 3082, 7345, 295, 399, 2586, 11537, 198, 198, 76, 377, 19079, 796, 37250, 38248, 710, 3256, 705, 44203, 325...
2.216638
577
#encoding=utf8 import os # define redis connection, default is localhost and port is 6379 REDIS_URL = os.environ.get("REDIS_URL", 'redis://localhost:6379')
[ 2, 12685, 7656, 28, 40477, 23, 198, 198, 11748, 28686, 198, 198, 2, 8160, 2266, 271, 4637, 11, 4277, 318, 1957, 4774, 290, 2493, 318, 718, 29088, 198, 22083, 1797, 62, 21886, 796, 28686, 13, 268, 2268, 13, 1136, 7203, 22083, 1797, 6...
2.907407
54
#!/usr/bin/env python """ Solution to Project Euler Problem 14 http://projecteuler.net/ by Apalala <apalala@gmail.com> (cc) Attribution-ShareAlike http://creativecommons.org/licenses/by-sa/3.0/ The following iterative sequence is defined for the set of positive integers: n → n/2 (n is even) n → 3n + 1 (n is odd) Us...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 198, 46344, 284, 4935, 412, 18173, 20647, 1478, 198, 4023, 1378, 16302, 68, 18173, 13, 3262, 14, 198, 198, 1525, 5949, 282, 6081, 1279, 499, 282, 6081, 31, 14816, 13, 785, 29, ...
3.208178
269
# # nes-keypress.py # # Usage: python nes-keypress.py [--verbose] -if INPUT_FILE # # Input File Format: # { # "latch_pin": 10, # "clock_pin": 3, # "data_pin": 7, # "key_mapping": { # "a": "KEY_Z", # "b": "KEY_X", # "select": "KEY_Q", # "start": "KEY_E", # "up": "KEY_W", # "down": "KEY_S", # "le...
[ 2, 198, 2, 299, 274, 12, 2539, 8439, 13, 9078, 198, 2, 198, 2, 29566, 25, 21015, 299, 274, 12, 2539, 8439, 13, 9078, 685, 438, 19011, 577, 60, 532, 361, 3268, 30076, 62, 25664, 198, 2, 198, 2, 23412, 9220, 18980, 25, 198, 2, 1...
2.531519
698
# simpleshare import sys import os import tkinter as tk from simpleshare.gui import Simpleshare from simpleshare.cli import cli_main from simpleshare.util import MCASTGROUP, PORT # center_window # main
[ 2, 985, 2374, 43466, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 256, 74, 3849, 355, 256, 74, 198, 198, 6738, 985, 2374, 43466, 13, 48317, 1330, 3184, 2374, 43466, 198, 6738, 985, 2374, 43466, 13, 44506, 1330, 537, 72, 62, 12417...
3.059701
67
# Copyright 2014 in medias res Gesellschaft fuer Informationstechnologie mbH # The ddb project licenses this file to you 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...
[ 2, 15069, 1946, 287, 1117, 4448, 581, 45371, 19187, 11693, 701, 14035, 263, 6188, 4169, 1349, 928, 494, 285, 65, 39, 198, 2, 383, 288, 9945, 1628, 16625, 428, 2393, 284, 345, 739, 262, 24843, 13789, 11, 198, 2, 2196, 362, 13, 15, ...
2.453202
812
from django.conf import settings from django.contrib.auth import authenticate from django.contrib.sites.models import Site from django.db import models from socialregistration.signals import connect, login AUTH_USER_MODEL = getattr(settings, 'AUTH_USER_MODEL', 'auth.User') connect.connect(save_facebook_token, sender...
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 8323, 5344, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 49315, 13, 27530, 1330, 14413, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 19...
3.452703
148
from calamari_ocr.ocr.dataset.textprocessors.text_processor import TextProcessor from calamari_ocr.ocr.dataset.textprocessors.text_normalizer import ( TextNormalizerProcessorParams, ) from calamari_ocr.ocr.dataset.textprocessors.text_regularizer import ( TextRegularizerProcessorParams, ) from calamari_ocr.ocr....
[ 6738, 35765, 2743, 62, 1696, 13, 1696, 13, 19608, 292, 316, 13, 5239, 14681, 669, 13, 5239, 62, 41341, 1330, 8255, 18709, 273, 198, 198, 6738, 35765, 2743, 62, 1696, 13, 1696, 13, 19608, 292, 316, 13, 5239, 14681, 669, 13, 5239, 62,...
2.906977
215
""" The builtin `datetime` module provides classes for points in time (`date`, and `datetime`) as well as durations (`timedelta`), but it does not account for time durations at a specific point. This module provides `Interval`, which contains a start and end `date` or `datetime`, and a duration `timedelta`. This is use...
[ 37811, 198, 464, 3170, 259, 4600, 19608, 8079, 63, 8265, 3769, 6097, 329, 2173, 287, 640, 357, 63, 4475, 47671, 290, 198, 63, 19608, 8079, 63, 8, 355, 880, 355, 288, 20074, 357, 63, 16514, 276, 12514, 63, 828, 475, 340, 857, 407, ...
3.730337
178
#!/usr/bin/env python3 from diagrams import Cluster, Diagram from diagrams.aws.database import RDS from diagrams.aws.general import User from diagrams.aws.network import APIGateway from diagrams.k8s.compute import Pod with Diagram("apiks", show=False): topic = User("client") with Cluster("AWS"): with...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 6738, 37067, 1330, 38279, 11, 6031, 6713, 198, 6738, 37067, 13, 8356, 13, 48806, 1330, 371, 5258, 198, 6738, 37067, 13, 8356, 13, 24622, 1330, 11787, 198, 6738, 37067, 13, 835...
2.481481
216
from user_handle import views from django.conf.urls import url from django.contrib.auth.decorators import login_required urlpatterns = [ url(r'^register/$', views.Register.as_view(), name='Register'), url(r'^login/$', views.Login.as_view(), name='Login'), url(r'^logout/$', views.Logout.as_view(), name='Log...
[ 6738, 2836, 62, 28144, 1330, 5009, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 12501, 273, 2024, 1330, 17594, 62, 35827, 198, 198, 6371, 33279, 82, 796, 685, 19...
2.588235
272
""" Simple functions for calling commands as subprocesses. """ import logging import signal import subprocess __all__ = ["capture_command", "predicate_command", "action_command", "CommandError"] logger = logging.getLogger(__name__)
[ 37811, 198, 26437, 5499, 329, 4585, 9729, 355, 850, 14681, 274, 13, 198, 37811, 198, 11748, 18931, 198, 11748, 6737, 198, 11748, 850, 14681, 198, 198, 834, 439, 834, 796, 14631, 27144, 495, 62, 21812, 1600, 366, 28764, 5344, 62, 21812, ...
3.449275
69
#many ways to do this, this is only one example d = dict(G.degree) 1 in d.values() # answer: none
[ 198, 2, 21834, 2842, 284, 466, 428, 11, 428, 318, 691, 530, 1672, 198, 67, 796, 8633, 7, 38, 13, 16863, 8, 198, 16, 287, 288, 13, 27160, 3419, 198, 198, 2, 3280, 25, 4844 ]
2.828571
35
import pandas as pd from py_expression_eval import Parser math_parser = Parser() def _get_minintensity(qualifier): """ Returns absolute min and relative min Args: qualifier ([type]): [description] Returns: [type]: [description] """ min_intensity = 0 min_percent_intensity...
[ 11748, 19798, 292, 355, 279, 67, 198, 6738, 12972, 62, 38011, 62, 18206, 1330, 23042, 263, 198, 11018, 62, 48610, 796, 23042, 263, 3419, 628, 198, 4299, 4808, 1136, 62, 1084, 47799, 7, 13255, 7483, 2599, 198, 220, 220, 220, 37227, 198...
2.048617
8,207
from django.shortcuts import render from django.template import loader from django.http import HttpResponse, HttpResponseRedirect from django.contrib.auth.decorators import login_required from django.urls import reverse from datetime import datetime # Create your views here. @login_required
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 42625, 14208, 13, 28243, 1330, 40213, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 11, 367, 29281, 31077, 7738, 1060, 198, 6738, 42625, 14208, 13, 3642, 822, 13, ...
3.708861
79
import os import pytest import caproto as ca from caproto._headers import MessageHeader _incr_sends = [ [(b'abc', b'def', b'ghi'), 0, (b'abc', b'def', b'ghi') ], [(b'abc', b'def', b'ghi'), 1, (b'bc', b'def', b'ghi') ], [(b'abc', b'def', b'ghi'), 3, (b'def', b'gh...
[ 11748, 28686, 198, 11748, 12972, 9288, 198, 11748, 1451, 305, 1462, 355, 1275, 198, 6738, 1451, 305, 1462, 13557, 50145, 1330, 16000, 39681, 628, 628, 198, 62, 1939, 81, 62, 82, 2412, 796, 685, 198, 220, 220, 220, 47527, 65, 6, 39305,...
1.976141
964
from .kde_corner import *
[ 6738, 764, 74, 2934, 62, 10215, 1008, 1330, 1635 ]
2.777778
9
import json import urllib.request from bs4 import BeautifulSoup main()
[ 11748, 33918, 198, 11748, 2956, 297, 571, 13, 25927, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 628, 198, 12417, 3419 ]
3.272727
22
from runPy_iBatchLearn import main import sys gpuid = int(sys.argv[1]) # gpuid=3 ### Permuted-MNIST incremental class offline_training = '' boost_scale = 0 ############## DATASET SELECT ############## dataset='EMNIST' ### CNN mlp_mha=10 batch_size=600 print_freq=100 ### pretrained # mlp_mha=11 # batch_size=256 #...
[ 6738, 1057, 20519, 62, 72, 33, 963, 20238, 1330, 1388, 198, 11748, 25064, 198, 198, 46999, 312, 796, 493, 7, 17597, 13, 853, 85, 58, 16, 12962, 198, 2, 308, 19944, 312, 28, 18, 198, 198, 21017, 2448, 76, 7241, 12, 39764, 8808, 294...
2.590977
1,330
''' Code uses standard trained model for prediction on transformed wavelet. Uses MAE to calculate accuracy. ''' from os import listdir from os.path import isfile, join import matplotlib.pyplot as plt import numpy as np from copy import copy import seaborn as sns from pomegranate import * import pywt from...
[ 7061, 6, 201, 198, 10669, 3544, 3210, 8776, 2746, 329, 17724, 319, 14434, 6769, 1616, 13, 201, 198, 5842, 274, 8779, 36, 284, 15284, 9922, 13, 220, 201, 198, 7061, 6, 201, 198, 201, 198, 6738, 28686, 1330, 1351, 15908, 201, 198, 673...
2.478261
276
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Name : __init__.py.py Created on : 2017/06/19 13:20 Author : Liuker <liu@liuker.xyz> Version : 1.0.0 Copyright : Copyright (C) 2016 - 2017, Liuker's Blog, https://liuker.org. Description : . """
[ 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, 6530, 220, 220, 220, 220, 220, 220, 220, 1058, 11593, 15003, 834, 13, 9078, 13, 9078, 198, 15622, 31...
2.211382
123
#!/usr/bin/env python # Copyright (c) 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """This script takes a Clang git revision as an argument, it then creates a feature branch, puts this revision into update.py, uplo...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 15069, 357, 66, 8, 1584, 383, 18255, 1505, 46665, 13, 1439, 2489, 10395, 13, 198, 2, 5765, 286, 428, 2723, 2438, 318, 21825, 416, 257, 347, 10305, 12, 7635, 5964, 326, 460, 307, ...
2.630728
742
import sys import os from codecs import open from setuptools import setup, find_packages if sys.version_info < (3, 5): print ("At least Python 3.5 is required. Please install Python 3.5.") exit(1) try: from setuptools import setup except ImportError as e: sys.stderr.write("Could not import ...
[ 201, 198, 11748, 25064, 201, 198, 11748, 28686, 201, 198, 6738, 40481, 82, 1330, 1280, 201, 198, 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 201, 198, 201, 198, 361, 25064, 13, 9641, 62, 10951, 1279, 357, 18, 11, 642, ...
2.565632
838
from cloudmesh.configuration.Config import Config config = Config() profile = config["cloudmesh.profile"] print(profile) ## """ flow = flow_from_clientsecrets(filename, scope, message=message, #Change this to use jason as oblect cache=cache, redirect_uri=redirect_uri, ...
[ 6738, 6279, 76, 5069, 13, 11250, 3924, 13, 16934, 1330, 17056, 198, 11250, 796, 17056, 3419, 198, 13317, 796, 4566, 14692, 17721, 76, 5069, 13, 13317, 8973, 198, 4798, 7, 13317, 8, 198, 198, 2235, 198, 37811, 198, 220, 220, 220, 5202,...
2.319797
197
from _Framework.Capabilities import CONTROLLER_ID_KEY, PORTS_KEY, NOTES_CC, SCRIPT, REMOTE, controller_id, inport, \ outport from APC_mini_mle import APC_mini_mle
[ 6738, 4808, 21055, 6433, 13, 15610, 5738, 1330, 27342, 46, 3069, 1137, 62, 2389, 62, 20373, 11, 350, 33002, 62, 20373, 11, 5626, 1546, 62, 4093, 11, 6374, 46023, 11, 22657, 23051, 11, 10444, 62, 312, 11, 287, 634, 11, 3467, 198, 220...
2.560606
66
""" mcpython - a minecraft clone written in python licenced under the MIT-licence (https://github.com/mcpython4-coding/core) Contributors: uuk, xkcdjerry (inactive) Based on the game of fogleman (https://github.com/fogleman/Minecraft), licenced under the MIT-licence Original game "minecraft" by Mojang Studios (www.m...
[ 37811, 198, 76, 13155, 7535, 532, 257, 6164, 3323, 17271, 3194, 287, 21015, 3476, 5864, 739, 262, 17168, 12, 677, 594, 220, 198, 7, 5450, 1378, 12567, 13, 785, 14, 76, 13155, 7535, 19, 12, 66, 7656, 14, 7295, 8, 198, 198, 37146, 6...
2.453736
5,955
''' https://leetcode.com/problems/valid-parentheses/ 20. Valid Parentheses Easy Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input string is valid if: Open brackets must be closed by the same type of brackets. Open brackets must b...
[ 7061, 6, 201, 198, 5450, 1378, 293, 316, 8189, 13, 785, 14, 1676, 22143, 14, 12102, 12, 8000, 39815, 14, 201, 198, 1238, 13, 48951, 16774, 39815, 201, 198, 28406, 201, 198, 201, 198, 15056, 257, 4731, 7268, 655, 262, 3435, 29513, 32...
2.782427
239
from __future__ import print_function import os import argparse import torch import torch.nn as nn import torch.nn.functional as F import torchvision import torch.optim as optim from torchvision import datasets, transforms from torch.autograd import Variable import numpy as np import time import logging fr...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 201, 198, 11748, 28686, 201, 198, 11748, 1822, 29572, 201, 198, 11748, 28034, 201, 198, 11748, 28034, 13, 20471, 355, 299, 77, 201, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 201, ...
2.377424
1,444
# Generated by Django 2.1.1 on 2019-05-16 16:00 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 362, 13, 16, 13, 16, 319, 13130, 12, 2713, 12, 1433, 1467, 25, 405, 201, 198, 201, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 201, 198, 201, 198 ]
2.485714
35
from .detection import detect_spikes
[ 6738, 764, 15255, 3213, 1330, 4886, 62, 2777, 7938 ]
4
9
from .feeding_learned_reward import FeedingLearnedRewardEnv from .agents import pr2, baxter, sawyer, jaco, stretch, panda, human, human_mesh from .agents.pr2 import PR2 from .agents.baxter import Baxter from .agents.sawyer import Sawyer from .agents.jaco import Jaco from .agents.stretch import Stretch from .agents.pand...
[ 6738, 764, 22824, 62, 35720, 276, 62, 260, 904, 1330, 18272, 278, 14961, 2817, 48123, 4834, 85, 198, 6738, 764, 49638, 1330, 778, 17, 11, 275, 40864, 11, 2497, 9860, 11, 474, 10602, 11, 7539, 11, 279, 5282, 11, 1692, 11, 1692, 62, ...
3.087282
401
import matplotlib.pyplot as plt import torch from path import Path import os from utils import * import torch.nn as nn import torch.nn.functional as f device = torch.device("cuda") if torch.cuda.is_available() else torch.device("cpu") import cv2 from path import Path from tqdm import tqdm from opts import parse_args...
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 28034, 198, 6738, 3108, 1330, 10644, 198, 11748, 28686, 198, 6738, 3384, 4487, 1330, 1635, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13...
2.112426
676
'''/*--------------------------------------------------------------------------------------------- * Copyright (c) VituTech. All rights reserved. * Licensed under the Apache License 2.0. See License.txt in the project root for license information. *------------------------------------------------------------------...
[ 7061, 6, 15211, 10097, 1783, 32501, 198, 1635, 220, 15069, 357, 66, 8, 18271, 84, 17760, 13, 1439, 2489, 10395, 13, 198, 1635, 220, 49962, 739, 262, 24843, 13789, 362, 13, 15, 13, 4091, 13789, 13, 14116, 287, 262, 1628, 6808, 329, 5...
6.186441
59
from __future__ import absolute_import, unicode_literals import os from celery import Celery # set the default Django settings module for the 'celery' program. os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'yt2m.settings') app = Celery('yt2m') app.config_from_object('django.conf:settings', namespace='CELERY') app....
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 28000, 1098, 62, 17201, 874, 198, 11748, 28686, 198, 6738, 18725, 1924, 1330, 15248, 1924, 198, 198, 2, 900, 262, 4277, 37770, 6460, 8265, 329, 262, 705, 7015, 88, 6, 1430, 13, 198, ...
3.017699
113
from django.test import TestCase from .factories import *
[ 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 198, 6738, 764, 22584, 1749, 1330, 1635, 628, 198 ]
3.388889
18