content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
from itertools import product import numpy as np import pandas as pd import pytest from sklearn.metrics import matthews_corrcoef as sk_matthews_corrcoef from evalml.objectives import ( F1, MAPE, MSE, AccuracyBinary, AccuracyMulticlass, BalancedAccuracyBinary, BalancedAccuracyMulticlass, ...
[ 6738, 340, 861, 10141, 1330, 1720, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 12972, 9288, 198, 6738, 1341, 35720, 13, 4164, 10466, 1330, 23963, 40645, 62, 10215, 81, 1073, 891, 355, 1341,...
2.677584
977
import os import urllib.parse import eventlet import eventlet.green.socket # eventlet.monkey_patch() import eventlet.websocket import eventlet.wsgi import wspty.pipe from flask import Flask, request, redirect from wspty.EchoTerminal import EchoTerminal from wspty.EncodedTerminal import EncodedTerminal from wspty.Webso...
[ 11748, 28686, 198, 11748, 2956, 297, 571, 13, 29572, 198, 198, 11748, 1785, 1616, 198, 11748, 1785, 1616, 13, 14809, 13, 44971, 198, 2, 1785, 1616, 13, 49572, 62, 17147, 3419, 198, 11748, 1785, 1616, 13, 732, 1443, 5459, 198, 11748, 1...
2.907127
463
# -*- encoding: utf-8 -*- """ Unit test for roger_promote.py """ import tests.helper import unittest import os import os.path import pytest import requests from mockito import mock, Mock, when from cli.roger_promote import RogerPromote from cli.appconfig import AppConfig from cli.settings import Settings from cl...
[ 2, 532, 9, 12, 21004, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 26453, 1332, 329, 686, 1362, 62, 16963, 1258, 13, 9078, 198, 198, 37811, 198, 198, 11748, 5254, 13, 2978, 525, 198, 198, 11748, 555, 715, 395, 198, 11...
3.253521
142
import json import pandas as pd import requests def load_jh_df(csv): ''' Loads a CSV file from JH repository and make some transforms ''' jh_data_path = ( 'https://raw.githubusercontent.com/' 'CSSEGISandData/COVID-19/master/' 'csse_covid_19_data/csse_covid_19_time_series/' ) retu...
[ 11748, 33918, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 7007, 628, 198, 198, 4299, 3440, 62, 73, 71, 62, 7568, 7, 40664, 2599, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 8778, 82, 257, 44189, 2393, 422, 449, 39, 16...
1.781457
1,057
import config as cfg import utils import native_code.executor as executor number_performed_tests = 0 expectations_correct = 0 expectations_wrong = 0 # The expect functions don't throw an exception like the assert_* functions # Instead, they just count how often the expected result was true # The...
[ 11748, 4566, 355, 30218, 70, 198, 11748, 3384, 4487, 198, 11748, 6868, 62, 8189, 13, 18558, 38409, 355, 3121, 273, 628, 198, 198, 17618, 62, 525, 12214, 62, 41989, 796, 657, 198, 1069, 806, 602, 62, 30283, 796, 657, 198, 1069, 806, ...
3.840336
119
from .one import * fruit = 'banana' colour = 'orange' sam['eggs'] = 'plenty' sam.pop('ham')
[ 6738, 764, 505, 1330, 1635, 201, 198, 201, 198, 34711, 796, 705, 3820, 2271, 6, 201, 198, 49903, 796, 705, 43745, 6, 201, 198, 37687, 17816, 33856, 82, 20520, 796, 705, 489, 3787, 6, 201, 198, 37687, 13, 12924, 10786, 2763, 11537, 2...
2.25
44
from django.urls import path, include from rest_framework_jwt.views import obtain_jwt_token from rest_framework.routers import DefaultRouter from .views import NoteViewSet app_name = 'api' router = DefaultRouter(trailing_slash=False) router.register('notes', NoteViewSet) urlpatterns = [ path('jwt-auth/', obtain...
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 11, 2291, 198, 6738, 1334, 62, 30604, 62, 73, 46569, 13, 33571, 1330, 7330, 62, 73, 46569, 62, 30001, 198, 6738, 1334, 62, 30604, 13, 472, 1010, 1330, 15161, 49, 39605, 198, 198, 6738, 7...
2.853846
130
from planning_framework import path import cv2 as cv import numpy as np import argparse import matplotlib.pyplot as plt parser = argparse.ArgumentParser(description="Path Planning Visualisation") parser.add_argument( "-n", "--n_heuristic", default=2, help="Heuristic for A* Algorithm (default = 2). 0 f...
[ 6738, 5410, 62, 30604, 1330, 3108, 198, 11748, 269, 85, 17, 355, 269, 85, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 1822, 29572, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 48610, 796, 1822, 29572, 13...
2.497015
670
n = int(input()) line = list(map(int, input().split())) l = {} res = "" for i, j in enumerate(line): l[j] = i+1 for k in range(n): res += str(l[k+1]) + " " print(res.rstrip())
[ 77, 796, 493, 7, 15414, 28955, 198, 1370, 796, 1351, 7, 8899, 7, 600, 11, 5128, 22446, 35312, 3419, 4008, 198, 75, 796, 23884, 198, 411, 796, 13538, 198, 198, 1640, 1312, 11, 474, 287, 27056, 378, 7, 1370, 2599, 198, 220, 220, 220...
2.137931
87
import pandas as pd if __name__ == '__main__': main() print('generating y = 3x+6...')
[ 11748, 19798, 292, 355, 279, 67, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419, 198, 220, 220, 220, 3601, 10786, 8612, 803, 331, 796, 513, 87, 10, 21, 986, 11537 ]
2.375
40
import re from pkg_resources import parse_requirements import pathlib from setuptools import find_packages, setup README_FILE = 'README.md' REQUIREMENTS_FILE = 'requirements.txt' VERSION_FILE = 'mtg/_version.py' VERSION_REGEXP = r'^__version__ = \'(\d+\.\d+\.\d+)\'' r = re.search(VERSION_REGEXP, open(VERSION_FILE).r...
[ 11748, 302, 198, 198, 6738, 279, 10025, 62, 37540, 1330, 21136, 62, 8897, 18883, 198, 11748, 3108, 8019, 198, 6738, 900, 37623, 10141, 1330, 1064, 62, 43789, 11, 9058, 198, 198, 15675, 11682, 62, 25664, 796, 705, 15675, 11682, 13, 9132,...
2.822535
355
from __future__ import annotations from dataclasses import dataclass from avilla.core.platform import Base from avilla.core.resource import Resource, ResourceProvider
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 198, 6738, 1196, 5049, 13, 7295, 13, 24254, 1330, 7308, 198, 6738, 1196, 5049, 13, 7295, 13, 31092, 1330, 20857, 11, 20857, 29495, 628,...
4.071429
42
from skimage import data from skimage.filter.rank import median from skimage.morphology import disk from skimage.viewer import ImageViewer from skimage.viewer.widgets import Slider, OKCancelButtons, SaveButtons from skimage.viewer.plugins.base import Plugin image = data.coins() viewer = ImageViewer(image) plugin = P...
[ 6738, 1341, 9060, 1330, 1366, 198, 6738, 1341, 9060, 13, 24455, 13, 43027, 1330, 14288, 198, 6738, 1341, 9060, 13, 24503, 1435, 1330, 11898, 198, 198, 6738, 1341, 9060, 13, 1177, 263, 1330, 7412, 7680, 263, 198, 6738, 1341, 9060, 13, ...
3.223684
152
# Test the buoyancy package and the variable density flows between the lake # and the gwf model. This model has 4 layers and a lake incised within it. # The model is transient and has heads in the aquifer higher than the initial # stage in the lake. As the model runs, the lake and aquifer equalize and # should end up...
[ 2, 6208, 262, 36675, 3883, 5301, 290, 262, 7885, 12109, 15623, 1022, 262, 13546, 198, 2, 290, 262, 308, 86, 69, 2746, 13, 220, 770, 2746, 468, 604, 11685, 290, 257, 13546, 753, 1417, 1626, 340, 13, 198, 2, 383, 2746, 318, 32361, 2...
3.075342
438
""" 1.0 """ import random if __name__ == '__main__': main()
[ 37811, 198, 220, 220, 220, 220, 198, 220, 220, 220, 352, 13, 15, 198, 37811, 198, 198, 11748, 4738, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419, 198 ]
2
39
import argparse import logging import apache_beam as beam from apache_beam.options.pipeline_options import PipelineOptions from apache_beam.options.pipeline_options import SetupOptions def run(argv=None, save_main_session=True): """Dummy pipeline to test Python3 operator.""" parser = argparse.ArgumentParser() ...
[ 11748, 1822, 29572, 198, 11748, 18931, 198, 198, 11748, 2471, 4891, 62, 40045, 355, 15584, 198, 6738, 2471, 4891, 62, 40045, 13, 25811, 13, 79, 541, 4470, 62, 25811, 1330, 37709, 29046, 198, 6738, 2471, 4891, 62, 40045, 13, 25811, 13, ...
3.072874
247
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2017/11/30 3:02 # @Author : Matrix # @Github : https://github.com/blackmatrix7/ # @Blog : http://www.cnblogs.com/blackmatrix/ # @File : messages.py # @Software: PyCharm import json from ..foundation import * from json import JSONDecodeError __author__ = 'blackmat...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2488, 7575, 1058, 2177, 14, 1157, 14, 1270, 513, 25, 2999, 198, 2, 2488, 13838, 1058, 24936, 198, 2, 2488, 38, 1...
2.581395
172
from setuptools import setup, find_packages from os import path here = path.join(path.abspath(path.dirname(__file__)), 'garpix_page') with open(path.join(here, 'README.rst'), encoding='utf-8') as f: long_description = f.read() setup( name='garpix_page', version='2.23.0', description='', long_desc...
[ 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 6738, 28686, 1330, 3108, 198, 198, 1456, 796, 3108, 13, 22179, 7, 6978, 13, 397, 2777, 776, 7, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 36911, 705, 4563, 79, 844, 62, ...
2.330033
606
# -*- coding: utf-8 -*- """ p2p-streams (c) 2014 enen92 fightnight This file contains the livestream addon engine. It is mostly based on divingmule work on livestreams addon! Functions: xml_lists_menu() -> main menu for the xml list category addlista() -> add a new list. It'll ask for local or rem...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 279, 17, 79, 12, 5532, 82, 220, 357, 66, 8, 220, 1946, 551, 268, 5892, 1907, 3847, 628, 220, 220, 220, 770, 2393, 4909, 262, 49683, 48557, 3113, 13, 632,...
3.00369
542
from ric.RainItComposite import RainItComposite
[ 6738, 12410, 13, 31443, 1026, 5377, 1930, 578, 1330, 10301, 1026, 5377, 1930, 578, 628 ]
3.266667
15
valor = int(input()) for i in range(valor+1): if(i%2 != 0): print(i)
[ 2100, 273, 796, 493, 7, 15414, 28955, 198, 198, 1640, 1312, 287, 2837, 7, 2100, 273, 10, 16, 2599, 198, 220, 220, 220, 611, 7, 72, 4, 17, 14512, 657, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 72, 8 ]
1.883721
43
#!/usr/bin/env python # ================================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved # ================================================================ import sys import json import TE TE.Net.setAppTokenFromEnvName("TX_ACCESS_TOKEN") postPar...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 46111, 4770, 25609, 18604, 198, 2, 15069, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 1439, 6923, 33876, 198, 2, 46111, 4770, 25609, 18604, 198, 198, 11748, 25064, 1...
3.013559
295
# Copyright 2018 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
[ 2, 15069, 2864, 3012, 3457, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, ...
3.089532
726
from flask import render_template, jsonify, Flask, redirect, url_for, request from app import app import random import os # import tensorflow as tf # import numpy as np # import sys # import spacy # nlp = spacy.load('en') # sys.path.insert(0, "/content/bert_experimental") # from bert_experimental.finetuning.text_pre...
[ 6738, 42903, 1330, 8543, 62, 28243, 11, 33918, 1958, 11, 46947, 11, 18941, 11, 19016, 62, 1640, 11, 2581, 198, 6738, 598, 1330, 598, 198, 11748, 4738, 198, 11748, 28686, 198, 2, 1330, 11192, 273, 11125, 355, 48700, 198, 2, 1330, 299, ...
2.746667
375
# -*- coding: utf-8 -*- """ Complementary Filter ==================== Attitude quaternion obtained with gyroscope and accelerometer-magnetometer measurements, via complementary filter. First, the current orientation is estimated at time :math:`t`, from a previous orientation at time :math:`t-1`, and a given ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 5377, 26908, 560, 25853, 201, 198, 4770, 1421, 201, 198, 201, 198, 8086, 3984, 627, 9205, 295, 6492, 351, 21486, 305, 29982, 290, 8320, 15635, 12, ...
2.214199
2,479
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
[ 2, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 198, 2, 393, 517, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 198, 2, 9387, 351, 428, 670, 329, 3224, 1321, 198, 2, 5115, 6634, 9238, 13, 220, 383, 7054,...
3.898678
227
# -*- coding: utf-8 -*- # Copyright (c) 2016 Mirantis 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 ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 357, 66, 8, 1584, 7381, 20836, 3457, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, ...
2.98022
455
from django.contrib.auth.models import User from django.core.validators import MaxValueValidator, MinValueValidator from django.db import models from django.utils.translation import ugettext_lazy as _
[ 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 6738, 42625, 14208, 13, 7295, 13, 12102, 2024, 1330, 5436, 11395, 47139, 1352, 11, 1855, 11395, 47139, 1352, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, ...
3.5
58
import numpy as np import hexy as hx if __name__ == "__main__": test_get_hex_line()
[ 11748, 299, 32152, 355, 45941, 198, 11748, 339, 5431, 355, 289, 87, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1332, 62, 1136, 62, 33095, 62, 1370, 3419, 198 ]
2.405405
37
# propagate_2D_integral: Simplification of the Kirchhoff-Fresnel integral. TODO: Very slow and give some problems import numpy from wofry.propagator.wavefront2D.generic_wavefront import GenericWavefront2D from wofry.propagator.propagator import Propagator2D # TODO: check resulting amplitude normalization (fft and ...
[ 2, 220, 220, 47933, 62, 17, 35, 62, 18908, 1373, 25, 45157, 2649, 286, 262, 7385, 354, 36092, 12, 37, 411, 4954, 19287, 13, 16926, 46, 25, 9576, 3105, 290, 1577, 617, 2761, 198, 198, 11748, 299, 32152, 198, 198, 6738, 266, 1659, 5...
3.42735
117
# https://leetcode.com/problems/delete-and-earn/
[ 2, 3740, 1378, 293, 316, 8189, 13, 785, 14, 1676, 22143, 14, 33678, 12, 392, 12, 451, 77, 14, 198 ]
2.45
20
# Desenvolva um programa que leia o primeiro termo e a razo de uma PA. No final mostre, os 10 primeiros termos dessa prograsso. primeiro = int(input("Primeiro Termo: ")) razao = int(input("Razo: ")) decimo = primeiro + (10 - 1) * razao for c in range(primeiro, decimo + razao, razao): print(f"{c}", end=" -> ") print...
[ 2, 2935, 268, 10396, 6862, 23781, 1430, 64, 8358, 443, 544, 267, 6994, 7058, 3381, 78, 304, 257, 374, 44299, 390, 334, 2611, 8147, 13, 1400, 2457, 749, 260, 11, 28686, 838, 6994, 72, 4951, 3381, 418, 288, 21411, 1172, 81, 28372, 13,...
2.507576
132
""" A :py:mod:`filter <tiddlyweb.filters>` type to limit a group of entities using a syntax similar to SQL Limit:: limit=<index>,<count> limit=<count> """ import itertools def limit_parse(count='0'): """ Parse the argument of a ``limit`` :py:mod:`filter <tiddlyweb.filters>` for a count and index...
[ 37811, 198, 32, 1058, 9078, 25, 4666, 25, 63, 24455, 1279, 83, 1638, 306, 12384, 13, 10379, 1010, 29, 63, 2099, 284, 4179, 257, 1448, 286, 12066, 198, 3500, 257, 15582, 2092, 284, 16363, 27272, 3712, 628, 220, 220, 220, 4179, 28, 27...
2.713781
283
""" Simple API to convert models between PyTorch and Keras (Conversions from Keras to PyTorch aren't implemented) """ from . import utility from . import tests from . import io_utils as utils import tensorflow def convert(model, input_shape, weights=True, quiet=True, i...
[ 37811, 198, 26437, 7824, 284, 10385, 4981, 1022, 9485, 15884, 354, 290, 17337, 292, 198, 198, 7, 3103, 47178, 422, 17337, 292, 284, 9485, 15884, 354, 3588, 470, 9177, 8, 198, 37811, 198, 6738, 764, 1330, 10361, 198, 6738, 764, 1330, 5...
2.281118
3,077
# -*- coding: utf-8 -*- """ Notifications ------------- Example showing how to add notifications to a characteristic and handle the responses. Updated on 2019-07-03 by hbldh <henrik.blidh@gmail.com> """ import sys import logging import asyncio import platform from bleak import BleakClient from bleak import _logger...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 3673, 6637, 198, 32501, 198, 198, 16281, 4478, 703, 284, 751, 19605, 284, 257, 16704, 290, 5412, 262, 9109, 13, 198, 198, 17354, 319, 13130, 12, 2998, 12, ...
2.753488
430
#!/usr/bin/python import socket my_listener = Listener("localhost",1234) my_listener.run()
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 11748, 17802, 628, 198, 1820, 62, 4868, 877, 796, 7343, 877, 7203, 36750, 1600, 1065, 2682, 8, 198, 1820, 62, 4868, 877, 13, 5143, 3419 ]
2.735294
34
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Convert Dialogflow history to spreadsheet User must manually copy the history from the browser and save this in a text file. This reads the textfile, parses the data, and saves it to a spreadsheet. Example training sample: USER Nov 4, 11:19 PM AGENT No matched i...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 38240, 21269, 519, 11125, 2106, 284, 30117, 198, 198, 12982, 1276, 14500, 4866, 262, 2106, 422, 262, 64...
2.363745
833
from django.shortcuts import render,redirect from .forms import usernameForm,DateForm,UsernameAndDateForm, DateForm_2 from django.contrib import messages from django.contrib.auth.models import User import cv2 import dlib import imutils from imutils import face_utils from imutils.video import VideoStream from imutils.fa...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 445, 1060, 198, 6738, 764, 23914, 1330, 20579, 8479, 11, 10430, 8479, 11, 5842, 13292, 1870, 10430, 8479, 11, 7536, 8479, 62, 17, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 6218, ...
2.376543
2,916
import re import string DATA = '05.txt' code1() code2()
[ 11748, 302, 201, 198, 11748, 4731, 201, 198, 201, 198, 201, 198, 26947, 796, 705, 2713, 13, 14116, 6, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 8189, 16, 3419, 201, 198, 8189, 17, 3419, 201, 198 ]
1.829268
41
import abc import contextlib import os import sys from functools import partial from itertools import chain import fbuild import fbuild.db import fbuild.path import fbuild.temp from . import platform # ------------------------------------------------------------------------------ # ----------------------------------...
[ 11748, 450, 66, 198, 11748, 4732, 8019, 198, 11748, 28686, 198, 11748, 25064, 198, 6738, 1257, 310, 10141, 1330, 13027, 198, 6738, 340, 861, 10141, 1330, 6333, 198, 198, 11748, 277, 11249, 198, 11748, 277, 11249, 13, 9945, 198, 11748, 2...
2.649867
1,131
import json import cherrypy import engine
[ 11748, 33918, 198, 198, 11748, 23612, 9078, 198, 198, 11748, 3113, 628, 628 ]
3.615385
13
from typing import Union from tuprolog import logger # noinspection PyUnresolvedReferences import jpype.imports # noinspection PyUnresolvedReferences import it.unibo.tuprolog.solve.exception.error as errors from tuprolog.core import Term, Atom from tuprolog.solve import ExecutionContext, Signature ExistenceError = err...
[ 6738, 19720, 1330, 4479, 198, 6738, 256, 929, 40329, 1330, 49706, 198, 2, 645, 1040, 14978, 9485, 3118, 411, 5634, 19927, 198, 11748, 474, 79, 2981, 13, 320, 3742, 198, 2, 645, 1040, 14978, 9485, 3118, 411, 5634, 19927, 198, 11748, 34...
2.93617
282
from __future__ import annotations from typing import TYPE_CHECKING import pkg_resources from bs4 import BeautifulSoup from requests import session from cptk.scrape import PageInfo from cptk.scrape import Website from cptk.utils import cptkException if TYPE_CHECKING: from cptk.scrape import Problem
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 6738, 19720, 1330, 41876, 62, 50084, 2751, 198, 198, 11748, 279, 10025, 62, 37540, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 6738, 7007, 1330, 6246, 198, 198, 6738, 269, 457, ...
3.344086
93
import pybullet as p import pybullet_data import gym from gym import spaces from gym.utils import seeding import numpy as np from math import sqrt import random import time import math import cv2 import torch import os def random_crop(imgs, out): """ args: imgs: shape (B,C,H,W) ...
[ 11748, 12972, 15065, 1616, 355, 279, 201, 198, 11748, 12972, 15065, 1616, 62, 7890, 201, 198, 11748, 11550, 201, 198, 6738, 11550, 1330, 9029, 201, 198, 6738, 11550, 13, 26791, 1330, 384, 8228, 201, 198, 11748, 299, 32152, 355, 45941, 2...
2.088333
600
--- setup.py.orig 2019-07-02 19:13:39 UTC +++ setup.py elif ( - sys.platform.startswith("linux") - or sys.platform.startswith("gnu") - or sys.platform.startswith("freebsd") + sys.platform.startswith("nothing") ): for dirname in _find_library_d...
[ 6329, 9058, 13, 9078, 13, 11612, 197, 23344, 12, 2998, 12, 2999, 678, 25, 1485, 25, 2670, 18119, 198, 45340, 9058, 13, 9078, 198, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 1288, 361, 357, 198, 12, 220, 220, 220, 220, 220, ...
1.935644
202
# Copyright 2019 Huawei Technologies Co., Ltd # # 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...
[ 2, 15069, 13130, 43208, 21852, 1766, 1539, 12052, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198...
2.79745
706
from abc import ABC from typing import Dict from redbot.core import Config from redbot.core.bot import Red from trainerdex.client import Client
[ 6738, 450, 66, 1330, 9738, 198, 6738, 19720, 1330, 360, 713, 198, 198, 6738, 2266, 13645, 13, 7295, 1330, 17056, 198, 6738, 2266, 13645, 13, 7295, 13, 13645, 1330, 2297, 198, 6738, 21997, 67, 1069, 13, 16366, 1330, 20985, 628 ]
3.65
40
import dash import dash_core_components as dcc import dash_html_components as html import dash_bootstrap_components as dbc import pandas as pd import numpy as np import altair as alt import vega_datasets alt.data_transformers.enable('default') alt.data_transformers.disable_max_rows() app = dash.Dash(__name__, assets_f...
[ 11748, 14470, 198, 11748, 14470, 62, 7295, 62, 5589, 3906, 355, 288, 535, 198, 11748, 14470, 62, 6494, 62, 5589, 3906, 355, 27711, 198, 11748, 14470, 62, 18769, 26418, 62, 5589, 3906, 355, 288, 15630, 198, 11748, 19798, 292, 355, 279, ...
1.791954
2,461
# coding=utf-8 from .subspaces import *
[ 2, 19617, 28, 40477, 12, 23, 198, 6738, 764, 7266, 2777, 2114, 1330, 1635, 198 ]
2.666667
15
import json import math from PIL import Image,ImageDraw import pandas as pd import glob import argparse import copy import numpy as np import matplotlib.pyplot as plt import pickle import cv2 from PIL import ImageEnhance import chainer from chainer.datasets import ConcatenatedDataset from chainer.data...
[ 11748, 33918, 201, 198, 11748, 10688, 201, 198, 6738, 350, 4146, 1330, 7412, 11, 5159, 25302, 201, 198, 11748, 19798, 292, 355, 279, 67, 201, 198, 11748, 15095, 201, 198, 11748, 1822, 29572, 201, 198, 11748, 4866, 201, 198, 11748, 299, ...
3.014815
405
import os import pdb import warnings import numpy as np import torch import torch.nn as nn import torch.utils.data import torch.backends.cudnn import torch.optim as optim import dataloaders from utils.utils import AverageMeter from utils.loss import build_criterion from utils.metrics import Evaluator from utils.step_...
[ 11748, 28686, 198, 11748, 279, 9945, 198, 11748, 14601, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 26791, 13, 7890, 198, 11748, 28034, 13, 1891, 2412, 1...
2.98895
181
sol = Solution() A = [1] B = [-1] C = [0] D = [1] result = sol.fourSumCount(A, B, C, D) print("Test 1: {0}".format(result)) A = [1, 2] B = [-2, -1] C = [-1, 2] D = [0, 2] result = sol.fourSumCount(A, B, C, D) print("Test 2: {0}".format(result))
[ 198, 34453, 796, 28186, 3419, 198, 32, 796, 685, 16, 60, 198, 33, 796, 25915, 16, 60, 198, 34, 796, 685, 15, 60, 198, 35, 796, 685, 16, 60, 198, 20274, 796, 1540, 13, 14337, 13065, 12332, 7, 32, 11, 347, 11, 327, 11, 360, 8, ...
1.968
125
# The MIT License (MIT) # Copyright (c) 2021 Tom J. Sun # 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, 383, 17168, 13789, 357, 36393, 8, 198, 198, 2, 15069, 357, 66, 8, 33448, 4186, 449, 13, 3825, 198, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 198, 2, 286, 428, 3788, 290, ...
3.467909
483
import re import six from smartfields.processors.base import ExternalFileProcessor from smartfields.utils import ProcessingError __all__ = [ 'FFMPEGProcessor' ]
[ 11748, 302, 198, 11748, 2237, 198, 198, 6738, 4451, 25747, 13, 14681, 669, 13, 8692, 1330, 34579, 8979, 18709, 273, 198, 6738, 4451, 25747, 13, 26791, 1330, 28403, 12331, 198, 198, 834, 439, 834, 796, 685, 198, 220, 220, 220, 705, 577...
3.34
50
## Program: VMTK ## Language: Python ## Date: January 12, 2018 ## Version: 1.4 ## Copyright (c) Richard Izzo, Luca Antiga, All rights reserved. ## See LICENSE file for details. ## This software is distributed WITHOUT ANY WARRANTY; without even ## the implied warranty of MERCHANTABILITY or FITNES...
[ 2235, 6118, 25, 569, 13752, 42, 198, 2235, 15417, 25, 220, 11361, 198, 2235, 7536, 25, 220, 220, 220, 220, 220, 3269, 1105, 11, 2864, 198, 2235, 10628, 25, 220, 220, 352, 13, 19, 198, 198, 2235, 220, 220, 15069, 357, 66, 8, 6219, ...
3.066327
196
from django import forms from nocaptcha_recaptcha.fields import NoReCaptchaField
[ 6738, 42625, 14208, 1330, 5107, 198, 6738, 299, 420, 2373, 11693, 62, 8344, 2373, 11693, 13, 25747, 1330, 1400, 3041, 19209, 11693, 15878, 198 ]
3.375
24
#! /bin/python3 # simple run menu import os import stat if __name__ == "__main__": print([command_to_name(i) for i in get_files_in_dir('') if is_file_executable(i)])
[ 2, 0, 1220, 8800, 14, 29412, 18, 198, 2, 2829, 1057, 6859, 198, 198, 11748, 28686, 198, 11748, 1185, 198, 197, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 197, 4798, 26933, 21812, 62, 1462, 62, 3672, 7, 72, ...
2.422535
71
# Author: Jaakko Leppakangas <jaeilepp@student.jyu.fi> # Joan Massich <mailsik@gmail.com> # # License: BSD-3-Clause import os.path as op import numpy as np from numpy.testing import assert_array_equal import pytest from mne import pick_types from mne.datasets import testing from mne.io.tests.test_raw import...
[ 198, 2, 6434, 25, 13790, 461, 7204, 1004, 381, 461, 648, 292, 1279, 73, 3609, 576, 381, 31, 50139, 13, 73, 24767, 13, 12463, 29, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 26640, 5674, 488, 1279, 26165, 1134, 31, 14816, 13, ...
2.623116
199
import urllib.request, json import pandas as pd baseUrl = 'https://avoindata.eduskunta.fi/api/v1/tables/VaskiData' parameters = 'rows?columnName=Eduskuntatunnus&columnValue=LA%25&perPage=100' page = 0 df = '' while True: print(f'Fetching page number {page}') with urllib.request.urlopen(f'{baseUrl}/{parameters...
[ 11748, 2956, 297, 571, 13, 25927, 11, 33918, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 8692, 28165, 796, 705, 5450, 1378, 615, 78, 521, 1045, 13, 276, 17990, 44424, 13, 12463, 14, 15042, 14, 85, 16, 14, 83, 2977, 14, 53, 209...
2.269341
349
# -*- coding: utf-8 -*- """ Created on Mon Sep 20 16:15:37 2021 @author: em42363 """ # In[1]: Import functions ''' CatBoost is a high-performance open source library for gradient boosting on decision trees ''' from catboost import CatBoostRegressor from sklearn.model_selection import train_test_split import pandas a...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 2892, 8621, 1160, 1467, 25, 1314, 25, 2718, 33448, 198, 198, 31, 9800, 25, 795, 43356, 5066, 198, 37811, 198, 2, 554, 58, 16, 5974, 17267, 5499...
2.493018
931
import logging from platform import system from tqdm import tqdm from multiprocessing import Lock loggers = {} # https://stackoverflow.com/questions/38543506/ def setup_custom_logger(name): """ Create a logger with a certain name and level """ global loggers if loggers.get(name): return...
[ 11748, 18931, 198, 6738, 3859, 1330, 1080, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 6738, 18540, 305, 919, 278, 1330, 13656, 198, 198, 6404, 5355, 796, 23884, 628, 198, 2, 3740, 1378, 25558, 2502, 11125, 13, 785, 14, 6138...
2.459725
509
import cv2 import sys import playsound face_cascade = cv2.CascadeClassifier('cascades/haarcascade_frontalface_default.xml') # capture video using cv2 video_capture = cv2.VideoCapture(0) while True: # capture frame by frame, i.e, one by one ret, frame = video_capture.read() gray = cv2.cvtColor(frame...
[ 11748, 269, 85, 17, 198, 11748, 25064, 198, 11748, 5341, 633, 198, 198, 2550, 62, 66, 28966, 796, 269, 85, 17, 13, 34, 28966, 9487, 7483, 10786, 66, 3372, 2367, 14, 3099, 5605, 28966, 62, 8534, 1604, 558, 62, 12286, 13, 19875, 11537...
2.017857
616
# vim:set et sw=4 ts=4: import logging import sys import jmespath from . import sis, classes # logging logging.basicConfig(stream=sys.stdout, level=logging.WARNING) logger = logging.getLogger(__name__) # SIS endpoint enrollments_uri = "https://apis.berkeley.edu/sis/v2/enrollments" # apparently some courses have LA...
[ 2, 43907, 25, 2617, 2123, 1509, 28, 19, 40379, 28, 19, 25, 198, 11748, 18931, 198, 11748, 25064, 198, 198, 11748, 474, 6880, 6978, 198, 198, 6738, 764, 1330, 264, 271, 11, 6097, 198, 198, 2, 18931, 198, 6404, 2667, 13, 35487, 16934,...
2.841856
1,056
from flask import Flask, render_template, request, redirect, url_for from os.path import join from stego import Steganography app = Flask(__name__) UPLOAD_FOLDER = 'static/files/' app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER ALLOWED_EXTENSIONS = {'png', 'jpg', 'jpeg'} if __name__ == '__main__': app.run(debug=...
[ 6738, 42903, 1330, 46947, 11, 8543, 62, 28243, 11, 2581, 11, 18941, 11, 19016, 62, 1640, 198, 6738, 28686, 13, 6978, 1330, 4654, 198, 198, 6738, 336, 1533, 78, 1330, 2441, 1030, 4867, 198, 198, 1324, 796, 46947, 7, 834, 3672, 834, 8...
2.566929
127
from flatland.envs.agent_utils import RailAgentStatus from flatland.envs.malfunction_generators import malfunction_from_params, MalfunctionParameters from flatland.envs.observations import GlobalObsForRailEnv from flatland.envs.rail_env import RailEnv from flatland.envs.rail_generators import sparse_rail_generator from...
[ 6738, 6228, 1044, 13, 268, 14259, 13, 25781, 62, 26791, 1330, 12950, 36772, 19580, 198, 6738, 6228, 1044, 13, 268, 14259, 13, 76, 1604, 4575, 62, 8612, 2024, 1330, 35654, 62, 6738, 62, 37266, 11, 32197, 4575, 48944, 198, 6738, 6228, 1...
2.854902
255
# -*- coding: utf-8 -*- # Generated by Django 2.2.4 on 2019-08-21 19:53 # this file is auto-generated so don't do flake8 on it # flake8: noqa from __future__ import absolute_import, unicode_literals from django.db import migrations, models import django.utils.timezone
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 19, 319, 13130, 12, 2919, 12, 2481, 678, 25, 4310, 198, 198, 2, 428, 2393, 318, 8295, 12, 27568, 523, 836, 470, 466, 781...
2.806122
98
"""Support for HTTP or web server issues."""
[ 37811, 15514, 329, 14626, 393, 3992, 4382, 2428, 526, 15931, 198 ]
4.090909
11
import torch.nn as nn from utils.BBBlayers import BBBConv2d, BBBLinearFactorial, FlattenLayer
[ 11748, 28034, 13, 20471, 355, 299, 77, 198, 6738, 3384, 4487, 13, 15199, 3629, 6962, 1330, 12597, 2749, 261, 85, 17, 67, 11, 12597, 9148, 259, 451, 29054, 5132, 11, 1610, 41769, 49925 ]
2.818182
33
import os from tensorflow.contrib.learn.python.learn.datasets import base import numpy as np import IPython from subprocess import call from keras.preprocessing import image from influence.dataset import DataSet from influence.inception_v3 import preprocess_input BASE_DIR = 'data' # TODO: change
[ 11748, 28686, 198, 198, 6738, 11192, 273, 11125, 13, 3642, 822, 13, 35720, 13, 29412, 13, 35720, 13, 19608, 292, 1039, 1330, 2779, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 6101, 7535, 198, 198, 6738, 850, 14681, 1330, 869, 198, ...
3.161616
99
# Copyright 2020 Carsten Blank # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
[ 2, 15069, 12131, 1879, 26400, 31990, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, 7...
3.592275
466
import OpenPNM import numpy as np import OpenPNM.Physics.models as pm
[ 11748, 4946, 13137, 44, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 4946, 13137, 44, 13, 2725, 23154, 13, 27530, 355, 9114, 628 ]
3.086957
23
# MIT No Attribution # Permission is hereby granted, free of charge, to any person obtaining a copy of this # software and associated documentation files (the "Software"), to deal in the Software # without restriction, including without limitation the rights to use, copy, modify, # merge, publish, distribute, sublicen...
[ 2, 17168, 1400, 45336, 198, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 286, 428, 198, 2, 3788, 290, 3917, 10314, 3696, 357, 1169, 366, 25423, 12340, 284, 1730, 287, 262, 10442, 1...
3.741935
248
# # Copyright (c) 2019-2022, NVIDIA 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 applicable law or ag...
[ 2, 198, 2, 15069, 357, 66, 8, 13130, 12, 1238, 1828, 11, 15127, 23929, 44680, 6234, 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, ...
2.84755
551
from optimizer.utils.intbounds import IntBounds
[ 6738, 6436, 7509, 13, 26791, 13, 600, 65, 3733, 1330, 2558, 33, 3733, 628 ]
3.5
14
#!/usr/bin/env python from __future__ import print_function from __future__ import unicode_literals try: from unittest import mock except ImportError: import mock from tdclient import models from tdclient.test.test_helper import *
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 28311, 25, 198, 220, 220, 220, 422, 555, 715, 395, 1330, ...
3.226667
75
from setuptools import setup dependencies = [ 'numpy', 'scipy', 'scikit-learn', ] setup( name='fireTS', version='0.0.7', description='A python package for multi-variate time series prediction', long_description=open('README.md').read(), long_description_content_type="text/markdown", ...
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 45841, 3976, 796, 685, 198, 220, 220, 220, 705, 77, 32152, 3256, 198, 220, 220, 220, 705, 1416, 541, 88, 3256, 198, 220, 220, 220, 705, 36216, 15813, 12, 35720, 3256, 198, 60, 198, 198,...
2.524887
221
# https://projecteuler.net/problem=19 day_19000101 = 1 days_1900 = year_days(1900) day_next_day1 = (day_19000101 + days_1900)%7 print(day_19000101, days_1900, day_next_day1) sum = 0 for i in range(1901, 2001): for j in range(1, 13): if day_next_day1 == 0: print(i, j) sum = sum + ...
[ 2, 3740, 1378, 16302, 68, 18173, 13, 3262, 14, 45573, 28, 1129, 628, 198, 820, 62, 1129, 18005, 486, 796, 352, 198, 12545, 62, 48104, 796, 614, 62, 12545, 7, 48104, 8, 198, 198, 820, 62, 19545, 62, 820, 16, 796, 357, 820, 62, 11...
1.974138
232
"""A simple address book.""" from ._tools import generate_uuid
[ 37811, 32, 2829, 2209, 1492, 526, 15931, 198, 6738, 47540, 31391, 1330, 7716, 62, 12303, 312, 628, 198 ]
3.611111
18
import keras import numpy as np import pandas as pd import cv2 import os import json import pdb import argparse import math import copy from vis.visualization import visualize_cam, overlay, visualize_activation from vis.utils.utils import apply_modifications from shutil import rmtree import matplotlib.cm as cm from ma...
[ 11748, 41927, 292, 220, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 269, 85, 17, 198, 11748, 28686, 198, 11748, 33918, 198, 11748, 279, 9945, 198, 11748, 1822, 29572, 198, 11748, 10688, 198, 117...
3.366534
251
from libTask import Queue from common import configParams from common import common if __name__ == '__main__': main()
[ 6738, 9195, 25714, 1330, 4670, 518, 198, 6738, 2219, 1330, 4566, 10044, 4105, 198, 6738, 2219, 1330, 2219, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419 ]
3.378378
37
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Feb 13 18:52:28 2018 @author: amajidsinar """ from sklearn import datasets import matplotlib.pyplot as plt import numpy as np plt.style.use('seaborn-white') iris = datasets.load_iris() dataset = iris.data # only take 0th and 1th column for X data_kno...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 30030, 3158, 1511, 1248, 25, 4309, 25, 2078, 2864, 198, 198, 31, 9800, 25, 716, 1228, 234...
2.512411
564
import torch, torchvision import detectron2 from detectron2.utils.logger import setup_logger setup_logger() # import some common libraries import numpy as np import os, json, cv2, random # import some common detectron2 utilities from detectron2 import model_zoo from detectron2.engine import DefaultPredic...
[ 11748, 28034, 11, 28034, 10178, 201, 198, 201, 198, 11748, 4886, 1313, 17, 201, 198, 6738, 4886, 1313, 17, 13, 26791, 13, 6404, 1362, 1330, 9058, 62, 6404, 1362, 201, 198, 40406, 62, 6404, 1362, 3419, 201, 198, 201, 198, 2, 1330, 61...
3.068783
189
"""AMQP Table Encoding/Decoding""" import struct import decimal import calendar from datetime import datetime from pika import exceptions from pika.compat import unicode_type, PY2, long, as_bytes def encode_short_string(pieces, value): """Encode a string value as short string and append it to pieces list ret...
[ 37811, 2390, 48, 47, 8655, 14711, 7656, 14, 10707, 7656, 37811, 198, 11748, 2878, 198, 11748, 32465, 198, 11748, 11845, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 6738, 279, 9232, 1330, 13269, 198, 6738, 279, 9232, 13, 5589, 265...
2.409079
3,701
from pylaas_core.abstract.abstract_service import AbstractService import time from pylaas_core.interface.technical.container_configurable_aware_interface import ContainerConfigurableAwareInterface
[ 6738, 279, 2645, 64, 292, 62, 7295, 13, 397, 8709, 13, 397, 8709, 62, 15271, 1330, 27741, 16177, 198, 11748, 640, 198, 198, 6738, 279, 2645, 64, 292, 62, 7295, 13, 39994, 13, 47944, 13, 34924, 62, 11250, 11970, 62, 9685, 62, 39994, ...
3.901961
51
from django.urls import reverse_lazy, reverse from django.utils.decorators import method_decorator from django.views.generic import ListView, DetailView, CreateView, DeleteView, UpdateView from .models import BlogPost from django.contrib.auth.decorators import login_required
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 62, 75, 12582, 11, 9575, 198, 6738, 42625, 14208, 13, 26791, 13, 12501, 273, 2024, 1330, 2446, 62, 12501, 273, 1352, 198, 6738, 42625, 14208, 13, 33571, 13, 41357, 1330, 7343, 7680, 11, 42...
3.597403
77
#! /usr/bin/env python # ******************************************************************** # Software License Agreement (BSD License) # # Copyright (c) 2015, University of Colorado, Boulder # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 41906, 17174, 2466, 198, 2, 10442, 13789, 12729, 357, 21800, 13789, 8, 198, 2, 198, 2, 220, 15069, 357, 66, 8, 1853, 11, 2059, 286, 7492, 11, 27437, 198, 2, 220, 1439, 2489, ...
2.52038
1,791
import numpy as np; import sys import matplotlib.pyplot as plt; from matplotlib import cm; from termcolor import colored; if __name__=="__main__": print "hello world"
[ 11748, 299, 32152, 355, 45941, 26, 198, 11748, 25064, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 26, 198, 6738, 2603, 29487, 8019, 1330, 12067, 26, 198, 6738, 3381, 8043, 1330, 16396, 26, 628, 198, 361, 11593, 3672, ...
3.053571
56
from EasyLogin import EasyLogin from pprint import pprint if __name__ == "__main__": #pprint(peptidecutter("SERVELAT")) import sys pprint(peptidecutter_more(sys.argv[1]))
[ 6738, 16789, 47790, 1330, 16789, 47790, 201, 198, 6738, 279, 4798, 1330, 279, 4798, 201, 198, 201, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 201, 198, 220, 220, 220, 1303, 381, 22272, 7, 431, 457, 485, 8968, 353, ...
2.353659
82
import unittest from .. import utils
[ 11748, 555, 715, 395, 198, 6738, 11485, 1330, 3384, 4487, 628 ]
3.454545
11
# Copyright (c) 2016 Hitachi Data Systems, 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 # # U...
[ 2, 15069, 357, 66, 8, 1584, 7286, 14299, 6060, 11998, 11, 3457, 13, 198, 2, 1439, 6923, 33876, 13, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, ...
3.528736
261
# This sample tests the type checker's reportUnnecessaryCast feature. from typing import cast, Union c: Union[int, str] = "hello" d = cast(int, c)
[ 2, 770, 6291, 5254, 262, 2099, 2198, 263, 338, 989, 3118, 49986, 19248, 3895, 13, 198, 198, 6738, 19720, 1330, 3350, 11, 4479, 628, 198, 198, 66, 25, 4479, 58, 600, 11, 965, 60, 796, 366, 31373, 1, 198, 67, 796, 3350, 7, 600, 11...
3.145833
48
combinador()
[ 198, 785, 8800, 7079, 3419 ]
2.6
5
from http import HTTPStatus from typing import Iterable, Union, Mapping from flask import request from flask_restful import Resource, fields, marshal from metadata_service.proxy import get_proxy_client popular_table_fields = { 'database': fields.String, 'cluster': fields.String, 'schema': fields.String, ...
[ 6738, 2638, 1330, 14626, 19580, 198, 6738, 19720, 1330, 40806, 540, 11, 4479, 11, 337, 5912, 198, 198, 6738, 42903, 1330, 2581, 198, 6738, 42903, 62, 2118, 913, 1330, 20857, 11, 7032, 11, 22397, 282, 198, 198, 6738, 20150, 62, 15271, ...
3.241176
170
import requests import logging import cfscrape import os from manhwaDownloader.constants import CONSTANTS as CONST logging.basicConfig(level=logging.DEBUG) folderPath = os.path.join(CONST.OUTPUTPATH, 'serious-taste-of-forbbiden-fruit') logging.info(len([file for file in os.walk(folderPath)])) walkList = [file for fi...
[ 11748, 7007, 198, 11748, 18931, 198, 11748, 30218, 1416, 13484, 198, 11748, 28686, 198, 6738, 582, 71, 10247, 10002, 263, 13, 9979, 1187, 1330, 7102, 2257, 1565, 4694, 355, 7102, 2257, 198, 198, 6404, 2667, 13, 35487, 16934, 7, 5715, 28...
2.919255
161
# define custom R2 metrics for Keras backend from keras import backend as K # base model architecture definition ################K2 import pandas as pd import numpy as np from sklearn.feature_selection import SelectFromModel from sklearn.linear_model import LassoCV from sklearn.model_selection import GridSear...
[ 2, 8160, 2183, 371, 17, 20731, 329, 17337, 292, 30203, 198, 6738, 41927, 292, 1330, 30203, 355, 509, 198, 220, 220, 220, 220, 198, 2, 2779, 2746, 10959, 6770, 198, 220, 220, 220, 220, 198, 14468, 42, 17, 198, 11748, 19798, 292, 355,...
2.346176
3,400
# Copyright 2020 Huawei Technologies Co., Ltd # # 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...
[ 2, 15069, 12131, 43208, 21852, 1766, 1539, 12052, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198...
3.691525
295
from bot.api.api_client import ApiClient from bot.api.base_route import BaseRoute import typing as t from bot.models import Tag
[ 6738, 10214, 13, 15042, 13, 15042, 62, 16366, 1330, 5949, 72, 11792, 198, 6738, 10214, 13, 15042, 13, 8692, 62, 38629, 1330, 7308, 43401, 198, 198, 11748, 19720, 355, 256, 198, 6738, 10214, 13, 27530, 1330, 17467, 628 ]
3.421053
38
# -*- coding: utf-8 -*- """ Created on Mon Sep 7 10:59:00 2020 @author: user """ import numpy as np import multiprocessing as mp import matplotlib.pyplot as plt import time import itertools import ctypes if __name__ == '__main__': AL_dist_flat = np.load(r'./AL_dist_flat.npy') n = np.shape(AL_dist_flat...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 2892, 8621, 220, 767, 838, 25, 3270, 25, 405, 12131, 198, 198, 31, 9800, 25, 2836, 198, 37811, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11...
1.97973
888
# coding: utf-8 import io import cairo # pycairo import cairocffi from pycairo_to_cairocffi import _UNSAFE_pycairo_context_to_cairocffi from cairocffi_to_pycairo import _UNSAFE_cairocffi_context_to_pycairo import pango_example if __name__ == '__main__': test()
[ 2, 19617, 25, 3384, 69, 12, 23, 201, 198, 201, 198, 11748, 33245, 201, 198, 11748, 1275, 7058, 220, 1303, 12972, 66, 18131, 201, 198, 11748, 1275, 7058, 66, 487, 72, 201, 198, 201, 198, 6738, 12972, 66, 18131, 62, 1462, 62, 66, 18...
2.142857
133
import random goat1 = random.randint(1, 3) goat2 = random.randint(1, 3) while goat1 == goat2: goat2 = random.randint(1, 3) success = 0 tries = 1_000_000 for _ in range(tries): options = [1, 2, 3] choice = random.randint(1, 3) options.remove(choice) if choice == goat1: options.remove(goat...
[ 11748, 4738, 198, 198, 2188, 265, 16, 796, 4738, 13, 25192, 600, 7, 16, 11, 513, 8, 198, 2188, 265, 17, 796, 4738, 13, 25192, 600, 7, 16, 11, 513, 8, 198, 198, 4514, 26917, 16, 6624, 26917, 17, 25, 198, 220, 220, 220, 26917, 1...
2.29717
212