content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
from setuptools import setup, find_packages with open('requirements.txt') as f: requirements = f.readlines() with open('README.md') as f: long_description = f.read() setup( name ='corgi-cli', version ='1.0.0', author ='Raleigh Wise', author_email ='vibhu4agarwal@gmail.com', url ='https://github.com/l3ga...
[ 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 198, 4480, 1280, 10786, 8897, 18883, 13, 14116, 11537, 355, 277, 25, 198, 197, 8897, 18883, 796, 277, 13, 961, 6615, 3419, 198, 198, 4480, 1280, 10786, 15675, 11682, 13, 9...
2.507645
327
from django.conf import settings from django.conf.urls import url from django.conf.urls.static import static from django.contrib import admin from django.contrib.auth.views import login, logout from chat.views import index urlpatterns = [ url(r'^$', index), url(r'^accounts/login/$', login), url(r'^account...
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 13, 12708, 1330, 9037, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198,...
2.748466
163
print("Digite dois numeros: ") x = int(input()) y = int(input()) if x > y: troca = x x = y y = troca soma = 0 for i in range(x, y): if i % 2 != 0: soma = soma + i print(f"Soma dos impares = {soma}")
[ 4798, 7203, 19511, 578, 466, 271, 5470, 418, 25, 366, 8, 198, 87, 796, 493, 7, 15414, 28955, 198, 88, 796, 493, 7, 15414, 28955, 198, 198, 361, 2124, 1875, 331, 25, 198, 220, 220, 220, 4161, 6888, 796, 2124, 198, 220, 220, 220, ...
1.973684
114
import logging
[ 11748, 18931, 628 ]
5.333333
3
from reportlab.lib.pagesizes import letter from reportlab.lib.units import inch from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle from reportlab.lib.enums import TA_RIGHT, TA_CENTER from reportlab.lib import colors...
[ 6738, 989, 23912, 13, 8019, 13, 31126, 4340, 1330, 3850, 198, 6738, 989, 23912, 13, 8019, 13, 41667, 1330, 11111, 198, 6738, 989, 23912, 13, 489, 265, 4464, 385, 1330, 17427, 23579, 30800, 11, 2547, 6111, 11, 1338, 11736, 11, 8655, 11...
2.358974
2,223
import pytest import numpy as np import reciprocalspaceship as rs import gemmi @pytest.mark.parametrize("cell_and_spacegroup", [ (gemmi.UnitCell(10., 20., 30., 90., 90., 90.), gemmi.SpaceGroup('P 21 21 21')), (gemmi.UnitCell(30., 30., 30., 90., 90., 120.), gemmi.SpaceGroup('R 32')), ]) @pytest.mark.parametrize...
[ 11748, 12972, 9288, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 36564, 874, 43076, 1056, 355, 44608, 198, 11748, 16840, 11632, 198, 198, 31, 9078, 9288, 13, 4102, 13, 17143, 316, 380, 2736, 7203, 3846, 62, 392, 62, 13200, 8094, 1600...
2.476615
449
from django.shortcuts import render # Create your views here. from rest_framework.views import APIView from rest_framework.response import Response from celery import shared_task @shared_task
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 198, 2, 13610, 534, 5009, 994, 13, 198, 6738, 1334, 62, 30604, 13, 33571, 1330, 3486, 3824, 769, 198, 6738, 1334, 62, 30604, 13, 26209, 1330, 18261, 628, 198, 6738, 18725, 1924, 1...
3.823529
51
from django.shortcuts import render from django.views import View from django.views.generic.list import ListView from django.http import JsonResponse from django.contrib.auth.decorators import login_required from django.utils.decorators import method_decorator from django.db.models import (Q, F, Case, When, PositiveInt...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 42625, 14208, 13, 33571, 1330, 3582, 198, 6738, 42625, 14208, 13, 33571, 13, 41357, 13, 4868, 1330, 7343, 7680, 198, 6738, 42625, 14208, 13, 4023, 1330, 449, 1559, 31077, 198, ...
2.592983
3,506
from django.contrib import admin from django.urls import path,include from . import views urlpatterns = [ path('', views.index, name='index'), path('signup_page/',views.signuppage,name='signup_page'), path('login_page/',views.loginpage,name='login_page'), path('login/',views.handleLogin,name='login'), ...
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 11, 17256, 198, 6738, 764, 1330, 5009, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 3108, 10786, 3256, 5009, 13, 9630, 11, ...
2.72067
179
""" Make use of a corpus. The advanced-API provides extra functionality of top of the core of TF. The most notable things are downloading corpus data and methods for (pretty) display corpus material. The real power of the advanced API is unleashed when there are well-tuned configuration settings for a corpus, and pos...
[ 37811, 198, 12050, 779, 286, 257, 35789, 13, 198, 198, 464, 6190, 12, 17614, 3769, 3131, 11244, 286, 1353, 286, 262, 4755, 286, 24958, 13, 198, 464, 749, 12411, 1243, 389, 22023, 35789, 1366, 290, 5050, 329, 357, 37784, 8, 198, 13812,...
2.786033
673
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import sys import logging import functools from termcolor import colored from collections import OrderedDict import numpy as np import torch import torch.nn as nn import torch.nn.functional as F im...
[ 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, 28686, 198, 11748, 25064, 198, 11748, 18931, 198, 11748, 1257, 310, 10141, 198,...
3.033632
446
import base64 import numpy as np import urllib.request import json import subprocess as sp from playsound import playsound # copy from https://qiita.com/to_obara/items/d8d5c92c2ea85a197e2d def get_token() -> str: """ Google Text-To-Speechの認証した上で、gcloudをセットアップした状態で tokenを取得するために、gcloud auth print-access-tok...
[ 11748, 2779, 2414, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 2956, 297, 571, 13, 25927, 198, 11748, 33918, 198, 11748, 850, 14681, 355, 599, 198, 6738, 5341, 633, 1330, 5341, 633, 198, 198, 2, 4866, 422, 3740, 1378, 40603, ...
1.750277
901
from rest_framework import status from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import permissions from addressapp.serializers.address import DistrictSerializer,MunicipalitySerializer,\ WardSerializer,WardSerializerUpdate from addressapp.models import Address...
[ 6738, 1334, 62, 30604, 1330, 3722, 198, 6738, 1334, 62, 30604, 13, 33571, 1330, 3486, 3824, 769, 198, 6738, 1334, 62, 30604, 13, 26209, 1330, 18261, 198, 6738, 1334, 62, 30604, 1330, 21627, 198, 198, 6738, 2209, 1324, 13, 46911, 11341, ...
3.305019
259
import swapper from cities.models import ( Continent, Country, Region, Subregion, City, District, PostalCode, AlternativeName)
[ 11748, 1509, 11463, 198, 198, 6738, 4736, 13, 27530, 1330, 357, 198, 220, 220, 220, 45778, 11, 12946, 11, 17718, 11, 3834, 36996, 11, 2254, 11, 5665, 11, 32881, 10669, 11, 198, 220, 220, 220, 27182, 5376, 8, 628 ]
3.512821
39
import csv from nltk.stem import PorterStemmer import numpy as np train_docs_class_list = [] test_docs_index_list = list(range(1, 1010)) train_docs_list = [] with open('trainingdata.txt') as csvfile: rows = csv.reader(csvfile, delimiter=' ') for row in rows: file_list = [] for col in...
[ 11748, 269, 21370, 198, 6738, 299, 2528, 74, 13, 927, 1330, 20890, 1273, 368, 647, 198, 11748, 299, 32152, 355, 45941, 628, 628, 628, 628, 628, 628, 198, 27432, 62, 31628, 62, 4871, 62, 4868, 796, 17635, 198, 9288, 62, 31628, 62, 96...
2.15187
1,791
#!/usr/bin/env python """ * Copyright (C) 2021 LEIDOS. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicab...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 37811, 198, 1635, 15069, 357, 34, 8, 33448, 12509, 2389, 2640, 13, 198, 1635, 198, 1635, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, ...
2.650324
11,422
import struct with open("fluxtime.dat","rb") as f: bin_data = f.read() num_entries = len(bin_data)/4 data_unpak = struct.unpack('{0}f'.format(num),bin_data) RA_set = data_unpack[0::7] DEC_set = data_unpack[1::7] AST_set = data_unpack[2::7] I_set = data_unpack[3::7] Q_set = data_unpack[4::7] U_set = data_unpack[...
[ 11748, 2878, 198, 198, 4480, 1280, 7203, 35522, 742, 524, 13, 19608, 2430, 26145, 4943, 355, 277, 25, 198, 220, 220, 220, 9874, 62, 7890, 796, 277, 13, 961, 3419, 198, 198, 22510, 62, 298, 1678, 796, 18896, 7, 8800, 62, 7890, 20679,...
2.113514
185
# Generated by Django 3.0.3 on 2020-02-12 00:37 from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 18, 319, 12131, 12, 2999, 12, 1065, 3571, 25, 2718, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, 9945, 13, 27530, 13, 2934, 1616, 295, ...
2.818182
44
""" ukcp18_ls1.py ============= Helper functions for working with UKCP18 Land Strand 1. """ # Standard library imports import os # Third-party imports import numpy as np import numpy.random as npr import numpy.ma from numpy.ma.core import MaskedArray import cPickle BASEDIR = 'ukcp-test-inputs/inp...
[ 37811, 201, 198, 2724, 13155, 1507, 62, 7278, 16, 13, 9078, 201, 198, 25609, 28, 201, 198, 201, 198, 47429, 5499, 329, 1762, 351, 3482, 8697, 1507, 6379, 4285, 392, 352, 13, 201, 198, 37811, 201, 198, 201, 198, 2, 8997, 5888, 17944,...
2.106129
3,100
import abjad from abjadext import rmakers I_rhythms = { "matA": rmakers.stack( rmakers.talea([1, 1, 1, 1], 8, extra_counts=[0, 1]), rmakers.extract_trivial() ), "rests": rmakers.stack( rmakers.note(), rmakers.force_rest(selector) ) } II_rhythms = { "matA": rmakers.stack( ...
[ 11748, 450, 38442, 198, 6738, 450, 73, 671, 742, 1330, 374, 6620, 198, 198, 40, 62, 17179, 5272, 907, 796, 1391, 198, 220, 220, 220, 366, 6759, 32, 1298, 374, 6620, 13, 25558, 7, 198, 220, 220, 220, 374, 6620, 13, 29429, 64, 26933...
1.982323
396
# File: kafka_parser.py # # Copyright (c) 2017-2022 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 appli...
[ 2, 9220, 25, 479, 1878, 4914, 62, 48610, 13, 9078, 198, 2, 198, 2, 15069, 357, 66, 8, 2177, 12, 1238, 1828, 13341, 2954, 3457, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 153...
3.40404
198
__version__ = "0.1.0" from .exceptions import ActyMathError from .calc import Calc
[ 834, 9641, 834, 796, 366, 15, 13, 16, 13, 15, 1, 198, 198, 6738, 764, 1069, 11755, 1330, 2191, 88, 37372, 12331, 198, 6738, 764, 9948, 66, 1330, 2199, 66, 198 ]
2.709677
31
# Generated by Django 2.0.4 on 2018-07-20 02:04 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 15, 13, 19, 319, 2864, 12, 2998, 12, 1238, 7816, 25, 3023, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
import numpy as np from .. import ArrayStringReader def test_arraystringreader(): """here is my test code https://docs.pytest.org/en/stable/getting-started.html#create-your-first-test """ size = 8 sample_array = np.random.rand(size).astype('float32') text = ','.join([str(x) for x in sample_a...
[ 11748, 299, 32152, 355, 45941, 198, 198, 6738, 11485, 1330, 15690, 10100, 33634, 628, 198, 4299, 1332, 62, 18747, 8841, 46862, 33529, 198, 220, 220, 220, 37227, 1456, 318, 616, 1332, 2438, 628, 220, 220, 220, 3740, 1378, 31628, 13, 9078...
2.731579
190
import base64 from typing import Optional, Tuple import boto3 import click from botocore.config import Config from docker import from_env from opta.amplitude import amplitude_client from opta.core.gcp import GCP from opta.core.generator import gen_all from opta.core.terraform import get_terraform_outputs from opta.ex...
[ 11748, 2779, 2414, 198, 6738, 19720, 1330, 32233, 11, 309, 29291, 198, 198, 11748, 275, 2069, 18, 198, 11748, 3904, 198, 6738, 10214, 420, 382, 13, 11250, 1330, 17056, 198, 6738, 36253, 1330, 422, 62, 24330, 198, 198, 6738, 2172, 64, ...
3.193084
347
# Preprocess images from scipy import misc from scipy.ndimage.measurements import center_of_mass import numpy as np import os from os.path import isfile, isdir if __name__ == '__main__': PARENT_DIR = 'resources/New' progbar = ProgBar() recurse(progbar, PARENT_DIR)
[ 2, 3771, 14681, 4263, 198, 198, 6738, 629, 541, 88, 1330, 12747, 198, 6738, 629, 541, 88, 13, 358, 9060, 13, 1326, 5015, 902, 1330, 3641, 62, 1659, 62, 22208, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 6738, 28686, ...
2.699029
103
# -*- coding: utf-8 -*- x = jQuery(".item") x.on("click", lambda e: e.preventDefault()) fooController["$inject"] = ["$scope", "$rootScope", "config"] tttt = xxx = 222
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 87, 796, 37420, 7, 1911, 9186, 4943, 198, 87, 13, 261, 7203, 12976, 1600, 37456, 304, 25, 304, 13, 3866, 1151, 19463, 28955, 628, 198, 198, 21943, 22130, 14692, 3...
2.478261
69
from typing import Callable, Mapping, TypeVar from unittest.mock import Mock from lxml.etree import _Element as Element from pytest import raises from preacher.core.extraction.analysis import Analyzer T = TypeVar('T')
[ 6738, 19720, 1330, 4889, 540, 11, 337, 5912, 11, 5994, 19852, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 44123, 198, 198, 6738, 300, 19875, 13, 316, 631, 1330, 4808, 20180, 355, 11703, 198, 6738, 12972, 9288, 1330, 12073, 198, 198, ...
3.46875
64
from faktotum.research.vendor import ner, lm, utils_ner
[ 6738, 277, 461, 83, 313, 388, 13, 34033, 13, 85, 18738, 1330, 17156, 11, 300, 76, 11, 3384, 4487, 62, 1008, 198 ]
2.545455
22
import requests from projects.sachinl0har.chatbots.helper import say, run if __name__ == "__main__": run("Acro", acro)
[ 11748, 7007, 198, 198, 6738, 4493, 13, 82, 620, 259, 75, 15, 9869, 13, 17006, 42478, 13, 2978, 525, 1330, 910, 11, 1057, 628, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1057, 7203, 12832, ...
2.612245
49
import numpy as np def sog_func(x, p, exp_const, store_x0, matrix_test, store_c): """ Compute Sum of Gaussians function at a given point with given arguments. Parameters ---------- point : 1-D array with shape (d, ) A point used to evaluate the function. p : integer Number...
[ 11748, 299, 32152, 355, 45941, 628, 198, 4299, 264, 519, 62, 20786, 7, 87, 11, 279, 11, 1033, 62, 9979, 11, 3650, 62, 87, 15, 11, 17593, 62, 9288, 11, 3650, 62, 66, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 3082, 1133...
2.105749
974
import tensorflow as tf import tensorflow.keras.backend as K from skatingAI.nets.keypoint.KPDetectorBase import KPDetectorBase layers = tf.keras.layers BN_MOMENTUM = 0.01
[ 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 11192, 273, 11125, 13, 6122, 292, 13, 1891, 437, 355, 509, 198, 198, 6738, 33051, 20185, 13, 45938, 13, 2539, 4122, 13, 42, 5760, 316, 9250, 14881, 1330, 509, 5760, 316, 9250, 14881, 1...
2.651515
66
__author__ = 'Matt Wilson' __copyright__ = 'Copyright 2019-2020, Synesis Information Systems, Copyright 2019, Synesis Software' __credits__ = [ 'Garth Lancaster', 'Matt Wilson', ] __email__ = 'matthew@synesis.com.au' __license__ = 'BSD-3-Clause' __maintainer__ = 'Matt...
[ 198, 834, 9800, 834, 220, 220, 220, 220, 220, 796, 220, 220, 705, 13448, 8127, 6, 198, 834, 22163, 4766, 834, 220, 220, 796, 220, 220, 705, 15269, 13130, 12, 42334, 11, 1632, 2516, 271, 6188, 11998, 11, 15069, 13130, 11, 1632, 2516,...
2.458333
240
import numpy as np from collections import Counter
[ 11748, 299, 32152, 355, 45941, 198, 6738, 17268, 1330, 15034, 628, 628, 628 ]
4.307692
13
from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import status from . import models, serializers from v2x_solution.road import models as road_models # find event # select event # update event # delete event
[ 6738, 1334, 62, 30604, 13, 33571, 1330, 3486, 3824, 769, 198, 6738, 1334, 62, 30604, 13, 26209, 1330, 18261, 198, 6738, 1334, 62, 30604, 1330, 3722, 198, 6738, 764, 1330, 4981, 11, 11389, 11341, 198, 6738, 410, 17, 87, 62, 82, 2122, ...
3.411765
85
# -*- coding: utf-8 -*- ############################################################################### # Author: Gérald Fenoy, gerald.fenoy@cartoworks.com # Copyright (c) 2010-2014, Cartoworks Inc. ############################################################################### # Permission is hereby granted, fr...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 29113, 29113, 7804, 4242, 21017, 198, 2, 220, 6434, 25, 220, 220, 402, 2634, 1373, 67, 19426, 726, 11, 308, 12573, 13, 41037, 726, 31, 26674, 322, 3647, 13, 785, 198, ...
3.984252
381
import pytest from pyannote.core import Segment
[ 11748, 12972, 9288, 198, 198, 6738, 12972, 1236, 1258, 13, 7295, 1330, 1001, 5154, 198 ]
3.266667
15
# -*- coding: utf-8 -*- from django import forms from django.utils.translation import ugettext_lazy as _
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 42625, 14208, 1330, 5107, 198, 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 334, 1136, 5239, 62, 75, 12582, 355, 4808, 628 ]
2.864865
37
from import_export.admin import ImportExportModelAdmin from django.contrib import admin from django.contrib.auth import get_user_model from django.contrib.auth.admin import UserAdmin from .forms import CustomUserCreationForm, CustomUserChangeForm from .models import * admin.site.register(CustomUser, CustomUse...
[ 6738, 1330, 62, 39344, 13, 28482, 1330, 17267, 43834, 17633, 46787, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 651, 62, 7220, 62, 19849, 198, 6738, 42625, 14208, 13, 364...
3.283951
162
import argparse from Bio import SeqIO from Bio.Seq import Seq from Bio.SeqRecord import SeqRecord import math import operator import re def make_windows(length, window, slide): """ For a given length, return an iterator for intervals of length `window` with a slide of `slide`. >>> list(make_windows(8...
[ 11748, 1822, 29572, 198, 6738, 16024, 1330, 1001, 80, 9399, 198, 6738, 16024, 13, 4653, 80, 1330, 1001, 80, 198, 6738, 16024, 13, 4653, 80, 23739, 1330, 1001, 80, 23739, 198, 11748, 10688, 198, 11748, 10088, 198, 11748, 302, 628, 198, ...
2.521524
1,417
""" This part communicates with the database Author: Max Marshall Project: Fridge Tracker """ import datetime import math import firebase_admin from firebase_admin import credentials from firebase_admin import firestore import readings as read import light_sensor as ls import mario cred = None try: ...
[ 37811, 201, 198, 1212, 636, 48556, 351, 262, 6831, 201, 198, 201, 198, 13838, 25, 5436, 13606, 201, 198, 16775, 25, 1305, 3130, 26885, 201, 198, 37811, 201, 198, 11748, 4818, 8079, 201, 198, 11748, 10688, 201, 198, 11748, 2046, 8692, ...
2.092697
1,068
import os,json,sys,time,shutil from datetime import datetime if len(sys.argv)<2: print("nombre d'argument incorrect") print("utiliser: ") print(" python globalPipelineISIS.py obsId1 obsId2 ...") print(" python globalPipelineISIS.py range obsIdStart obsIdStop ") exit(1) print("load configuration") json_tex...
[ 198, 198, 11748, 28686, 11, 17752, 11, 17597, 11, 2435, 11, 1477, 22602, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 361, 18896, 7, 17597, 13, 853, 85, 8, 27, 17, 25, 198, 197, 4798, 7203, 77, 2381, 260, 288, 6, 49140, 1149...
2.363317
1,423
import json import pathlib import re from xml.etree import ElementTree from carim.configuration import decorators from carim.global_resources import deploydir, mission, resourcesdir from carim.util import file_writing @decorators.register @decorators.mission
[ 11748, 33918, 198, 11748, 3108, 8019, 198, 11748, 302, 198, 6738, 35555, 13, 316, 631, 1330, 11703, 27660, 198, 198, 6738, 1097, 320, 13, 11250, 3924, 1330, 11705, 2024, 198, 6738, 1097, 320, 13, 20541, 62, 37540, 1330, 6061, 15908, 11,...
3.690141
71
from scipy.optimize import minimize, basinhopping import numpy as np
[ 6738, 629, 541, 88, 13, 40085, 1096, 1330, 17775, 11, 1615, 20327, 2105, 198, 11748, 299, 32152, 355, 45941, 628 ]
3.5
20
from bokeh.plotting import figure, output_file, show import numpy as np if __name__ == '__main__': x = np.linspace(0, 2*np.pi, 100) y_lin = x y_sqrt = np.sqrt(x) y_log = np.log(x) y_sin = np.sin(x) output_file("plot.html") fig = figure(title="Simple Plots") fig.line(x=x, y=y_lin, color='red', legend="Linear"...
[ 6738, 1489, 365, 71, 13, 29487, 889, 1330, 3785, 11, 5072, 62, 7753, 11, 905, 198, 11748, 299, 32152, 355, 45941, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 197, 87, 796, 45941, 13, 21602, 10223, 7, 15,...
2.258964
251
import os from datetime import datetime from flask import flash from flask_user import current_user from pygate_grpc.client import PowerGateClient from pygate_grpc.ffs import get_file_bytes, bytes_to_chunks, chunks_to_bytes from google.protobuf.json_format import MessageToDict from deplatformr import app, db from depla...
[ 11748, 28686, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 42903, 1330, 7644, 198, 6738, 42903, 62, 7220, 1330, 1459, 62, 7220, 198, 6738, 12972, 10494, 62, 2164, 14751, 13, 16366, 1330, 4333, 22628, 11792, 198, 6738, 12972, 10494,...
2.457306
527
from PySide import QtGui, QtCore from PySide.QtCore import QThread, QDataStream from PySide.QtNetwork import QTcpServer, QHostAddress import sys from guerilla_importer import MSToGuerillaWorker
[ 6738, 9485, 24819, 1330, 33734, 8205, 72, 11, 33734, 14055, 198, 6738, 9485, 24819, 13, 48, 83, 14055, 1330, 1195, 16818, 11, 1195, 6601, 12124, 198, 6738, 9485, 24819, 13, 48, 83, 26245, 1330, 1195, 51, 13155, 10697, 11, 1195, 17932, ...
2.786667
75
import pathlib as pl import os def prepend_object_name(obj: str): """Rename by prepending to file names, assuming files are in sheep/ and coke/ Args: obj (str): Text of string to prepend at start of image name """ for path in pl.Path(obj).iterdir(): if path.is_file(): file_...
[ 11748, 3108, 8019, 355, 458, 198, 11748, 28686, 628, 198, 4299, 3143, 437, 62, 15252, 62, 3672, 7, 26801, 25, 965, 2599, 198, 220, 220, 220, 37227, 49, 12453, 416, 3143, 1571, 284, 2393, 3891, 11, 13148, 3696, 389, 287, 15900, 14, 2...
1.886057
1,334
# ----------------------------------- # import # ----------------------------------- import os import sys import argparse from PySide2.QtWidgets import QApplication, QMainWindow, QAction, QWidget, QStyle from PySide2.QtWidgets import QStackedWidget, QSplitter, QTextEdit, QTreeWidget, QTreeWidgetItem from PySide2.QtWid...
[ 2, 20368, 6329, 198, 2, 1330, 198, 2, 20368, 6329, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 1822, 29572, 198, 198, 6738, 9485, 24819, 17, 13, 48, 83, 54, 312, 11407, 1330, 1195, 23416, 11, 1195, 13383, 27703, 11, 1195, 12502,...
3.883817
241
HEARTBEAT_INTERVAL = 20 DISCONNECTED_THRESHOLD = HEARTBEAT_INTERVAL * 2 HSTUDIO_HOME = "~/.hstudio"
[ 13909, 7227, 12473, 1404, 62, 41358, 23428, 796, 1160, 198, 26288, 10943, 48842, 1961, 62, 4221, 19535, 39, 15173, 796, 11179, 7227, 12473, 1404, 62, 41358, 23428, 1635, 362, 198, 198, 39, 2257, 8322, 9399, 62, 39069, 796, 366, 93, 1175...
2.222222
45
import sys sys.setrecursionlimit(10**7) N = int(sys.stdin.readline().rstrip()) MOD = 10**4 + 7 ans = tribonacci(N)[2] print(ans)
[ 11748, 25064, 201, 198, 201, 198, 17597, 13, 2617, 8344, 24197, 32374, 7, 940, 1174, 22, 8, 201, 198, 201, 198, 45, 796, 493, 7, 17597, 13, 19282, 259, 13, 961, 1370, 22446, 81, 36311, 28955, 201, 198, 201, 198, 33365, 796, 838, 1...
2.013699
73
# -*- coding: utf-8 -*- """ @file @brief Various functions about conversions. """ import datetime def str2datetime(dt, format=None): """ convert a string into a datetime object, it can be: - 2013-05-24 18:49:46 - 2013-05-24 18:49:46.568 @param dt string @param format f...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 31, 7753, 198, 31, 65, 3796, 26386, 5499, 546, 32626, 13, 198, 37811, 198, 11748, 4818, 8079, 628, 198, 4299, 965, 17, 19608, 8079, 7, 28664, 11, 5794, 28,...
1.843956
910
n=int(input("enter a number: ")) for i in range(n,0,-1): for j in range(n,0,-1): if(j>i): print(j,' ',sep='',end="") else: print(i,' ',sep='',end="") print() ''' output: enter a number: 6 6 6 6 6 6 6 6 5 5 5 5 5 6 5 4 4 4 4 6 5 4 3 3 3 6 5 4 3 2 2 6 5 4 3 2 1 '''
[ 77, 28, 600, 7, 15414, 7203, 9255, 257, 1271, 25, 366, 4008, 198, 1640, 1312, 287, 2837, 7, 77, 11, 15, 12095, 16, 2599, 198, 220, 329, 474, 287, 2837, 7, 77, 11, 15, 12095, 16, 2599, 198, 220, 220, 611, 7, 73, 29, 72, 2599, ...
1.913333
150
import lvgl as lv import styles if __name__ == '__main__': lv.init() scr = lv.obj() lv.scr_load(scr) lv_arc(scr)
[ 11748, 300, 85, 4743, 355, 300, 85, 198, 11748, 12186, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 300, 85, 13, 15003, 3419, 198, 220, 220, 220, 6040, 796, 300, 85, 13, 26801, 3419, 198, ...
1.857143
70
#!/usr/bin/python import argparse import sys import glob import os import re from subprocess import call import itertools main()
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 11748, 1822, 29572, 198, 11748, 25064, 198, 11748, 15095, 198, 11748, 28686, 198, 11748, 302, 198, 6738, 850, 14681, 1330, 869, 198, 11748, 340, 861, 10141, 198, 12417, 3419 ]
3.459459
37
# # Copyright (c) 2017 by QA Cafe. # All Rights Reserved. # """Module for processing CDRouter datetime strings.""" from datetime import datetime from marshmallow import fields from marshmallow.exceptions import ValidationError
[ 2, 198, 2, 15069, 357, 66, 8, 2177, 416, 1195, 32, 26965, 13, 198, 2, 1439, 6923, 33876, 13, 198, 2, 198, 198, 37811, 26796, 329, 7587, 6458, 49, 39605, 4818, 8079, 13042, 526, 15931, 198, 198, 6738, 4818, 8079, 1330, 4818, 8079, ...
3.709677
62
from BeautifulSoup import BeautifulSoup import urllib2, urllib, threading, sys url = "http://apk.hiapk.com/apps" down_url = "http://apk.hiapk.com/appdown/" info_url = "http://apk.hiapk.com/appinfo/" num = 11 page = 5 threads = [] for mon in xrange(1, num): print '[+] Thread %d is start' %mon t = threading.Th...
[ 6738, 23762, 50, 10486, 1330, 23762, 50, 10486, 198, 11748, 2956, 297, 571, 17, 11, 2956, 297, 571, 11, 4704, 278, 11, 25064, 198, 198, 6371, 796, 366, 4023, 1378, 499, 74, 13, 5303, 499, 74, 13, 785, 14, 18211, 1, 198, 2902, 62, ...
2.39548
177
""" Tests for Master thesis """ import cfg from TestSuite import runTests, SummaryType, TestUtils as TU import re import operator as op if __name__ == "__main__": print("Execute test file " + __file__) main()
[ 37811, 198, 51, 3558, 329, 5599, 21554, 198, 37811, 198, 198, 11748, 30218, 70, 198, 6738, 6208, 5606, 578, 1330, 1057, 51, 3558, 11, 21293, 6030, 11, 6208, 18274, 4487, 355, 309, 52, 198, 11748, 302, 198, 11748, 10088, 355, 1034, 198...
2.894737
76
import os from xml.etree import ElementTree as ET import pytest from nexsan_exporter import nexsan @pytest.fixture(params=['opstats1.xml', 'opstats2.xml']) def opstats_xml(request): ''' Returns a file-like object for the Collector to consume. ''' test_dir, _ = os.path.splitext(request.module.__file__...
[ 11748, 28686, 198, 6738, 35555, 13, 316, 631, 1330, 11703, 27660, 355, 12152, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 497, 87, 12807, 62, 1069, 26634, 1330, 497, 87, 12807, 198, 198, 31, 9078, 9288, 13, 69, 9602, 7, 37266, 28, ...
2.454839
310
# Echo server program import socket import cPickle as pickle import sys import os HOST = '' # Symbolic name meaning all available interfaces PORT = 6000 # Arbitrary non-privileged port s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.bind((HOST, PORT)) s.listen(1) SESSION_BEGIN = ...
[ 2, 21455, 4382, 1430, 198, 11748, 17802, 198, 11748, 220, 269, 31686, 293, 355, 2298, 293, 198, 11748, 25064, 198, 198, 11748, 28686, 198, 198, 39, 10892, 796, 10148, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
1.933214
1,677
import os from nipype.interfaces.base import (CommandLine, CommandLineInputSpec, TraitedSpec) from nipype.interfaces.base import traits, File # T1xT2BiasFieldCorrection class T1xT2BiasFieldCorrection(CommandLine): """ Description: Bias field correction using T1w & T2w i...
[ 11748, 28686, 198, 6738, 299, 541, 2981, 13, 3849, 32186, 13, 8692, 1330, 357, 21575, 13949, 11, 9455, 13949, 20560, 22882, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220,...
1.98632
1,462
""" WSGI config for callblocker project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/ """ import os from django.conf import settings from django.core.wsgi import get_wsgi_application...
[ 37811, 198, 19416, 18878, 4566, 329, 869, 9967, 263, 1628, 13, 198, 198, 1026, 32142, 262, 25290, 18878, 869, 540, 355, 257, 8265, 12, 5715, 7885, 3706, 7559, 31438, 15506, 13, 198, 198, 1890, 517, 1321, 319, 428, 2393, 11, 766, 198, ...
3
211
import os from unittest import TestCase from unittest.async_case import IsolatedAsyncioTestCase from aiohttp import ClientSession from polygonscan.core.async_client import AsyncClient from polygonscan.core.sync_client import SyncClient from requests import Session CONFIG_PATH = "polygon/configs/stable.json" API_KEY ...
[ 11748, 28686, 198, 6738, 555, 715, 395, 1330, 6208, 20448, 198, 6738, 555, 715, 395, 13, 292, 13361, 62, 7442, 1330, 1148, 50027, 42367, 952, 14402, 20448, 198, 198, 6738, 257, 952, 4023, 1330, 20985, 36044, 198, 6738, 25052, 684, 5171,...
3.285714
105
import time import random from selenium import webdriver """ NOT USED from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC """ #-------------------------------...
[ 11748, 640, 198, 11748, 4738, 198, 6738, 384, 11925, 1505, 1330, 3992, 26230, 198, 37811, 5626, 1294, 1961, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 11321, 13, 13083, 1330, 26363, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, ...
4.238636
88
# Copyright 2017 The Forseti Security Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
[ 2, 15069, 2177, 383, 27325, 316, 72, 4765, 46665, 13, 1439, 2489, 10395, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11...
2.137805
29,433
from django.contrib import admin from django.db.models import F from django.utils.translation import ugettext_lazy as _ from django_todopago import models @admin.register(models.Merchant) @admin.register(models.Operation)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 1330, 376, 198, 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 334, 1136, 5239, 62, 75, 12582, 355, 4808, 198, 198, 6738, 42625, 14208, 62, ...
3.180556
72
from __future__ import absolute_import from redis_cache import get_redis_connection import pickle import redis from django.conf import settings from surround.django.utils import CacheKey from surround.django import execution import datetime from redis import WatchError from surround.django.logging import setupModuleLo...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 2266, 271, 62, 23870, 1330, 651, 62, 445, 271, 62, 38659, 198, 11748, 2298, 293, 198, 11748, 2266, 271, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 4573, 13, 28...
3.407643
157
""" Lightweight objects """ import collections from caspy import str
[ 37811, 198, 15047, 6551, 5563, 198, 37811, 198, 11748, 17268, 198, 6738, 269, 5126, 88, 1330, 965, 628, 628 ]
3.789474
19
""" Module containing helpers for small calculation involing nonlinear optics """ # %% from skultrafast.unit_conversions import c from scipy.optimize import minimize_scalar import numpy as np def tl_pulse_from_nm(center_wl: float, fhwm: float, shape: str = 'gauss') -> float: """ Calculates the transformlimted ...
[ 37811, 198, 26796, 7268, 49385, 329, 1402, 17952, 1876, 278, 1729, 29127, 36237, 198, 37811, 198, 2, 43313, 198, 6738, 1341, 586, 430, 7217, 13, 20850, 62, 1102, 47178, 1330, 269, 198, 6738, 629, 541, 88, 13, 40085, 1096, 1330, 17775, ...
2.256983
895
from .undirected_graph import * from .ggm import *
[ 6738, 764, 917, 1060, 276, 62, 34960, 1330, 1635, 198, 6738, 764, 1130, 76, 1330, 1635, 198 ]
3
17
#------------------------------------------------------------------------------ # Copyright 2013 Esri # 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/LICENS...
[ 2, 10097, 26171, 198, 2, 15069, 2211, 8678, 380, 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, 92...
2.872695
1,681
from click.testing import CliRunner from demisto_sdk.__main__ import main from TestSuite.test_tools import ChangeCWD DOC_REVIEW = 'doc-review' def test_spell_integration_dir_valid(repo): """ Given - a integration directory. When - Running doc-review on it. Then - Ensure spell check run...
[ 6738, 3904, 13, 33407, 1330, 1012, 72, 49493, 198, 198, 6738, 1357, 396, 78, 62, 21282, 74, 13, 834, 12417, 834, 1330, 1388, 198, 6738, 6208, 5606, 578, 13, 9288, 62, 31391, 1330, 9794, 34, 22332, 198, 198, 38715, 62, 2200, 28206, 7...
2.584131
3,239
import vformer.decoder as decoder
[ 11748, 410, 16354, 13, 12501, 12342, 355, 875, 12342, 198 ]
3.4
10
import numpy as onp from .utility.utils import broadcast_tile, block_matrix, sum_over_each_neighborhood_on_blocked_matrix, expand from ._second_algorithm import run_second_algorithm from ct_charachterization.utility.utils import expand, contract
[ 11748, 299, 32152, 355, 319, 79, 198, 6738, 764, 315, 879, 13, 26791, 1330, 7025, 62, 40927, 11, 2512, 62, 6759, 8609, 11, 2160, 62, 2502, 62, 27379, 62, 710, 394, 2865, 2894, 62, 261, 62, 2436, 3543, 62, 6759, 8609, 11, 4292, 198...
3.205128
78
#! /usr/bin/env python import argparse import base64 import codecs import collections import StringIO import logging import json import os import stat import pipes import re import signal import sys import thread import time import pexpect import psutil import six logger = logging.getLogger('awx.main.utils.expect')...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 1822, 29572, 198, 11748, 2779, 2414, 198, 11748, 40481, 82, 198, 11748, 17268, 198, 11748, 10903, 9399, 198, 11748, 18931, 198, 11748, 33918, 198, 11748, 28686, 198, 11748, ...
2.200737
5,156
def add(x, y): """ Add two numbers and return their sum""" return x+y def subtract(x, y): """ Subtract to numbers and return their results""" return x-y
[ 4299, 751, 7, 87, 11, 331, 2599, 198, 220, 220, 220, 37227, 3060, 734, 3146, 290, 1441, 511, 2160, 37811, 198, 220, 220, 220, 1441, 2124, 10, 88, 198, 198, 4299, 34128, 7, 87, 11, 331, 2599, 198, 220, 220, 220, 37227, 3834, 83, ...
2.816667
60
# # Python script for generating new documentation # # _author_ = Grant Curell <grant_curell@dell.com> # # # Copyright (c) 2020 Dell EMC 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 Licen...
[ 2, 198, 2, 11361, 4226, 329, 15453, 649, 10314, 198, 2, 198, 2, 4808, 9800, 62, 796, 12181, 36947, 297, 1279, 2164, 415, 62, 66, 495, 297, 31, 67, 695, 13, 785, 29, 198, 2, 198, 2, 198, 2, 15069, 357, 66, 8, 12131, 23617, 412,...
2.309629
4,289
"""" Unit test file. """ import unittest import math import pandas as pd from ..LineageInputOutput import import_exp_data, tryRecursion from ..CellVar import CellVar as c class TestModel(unittest.TestCase): """ Unit test class for importing data. """ def setUp(self): """ Gets the pat...
[ 15931, 15931, 11801, 1332, 2393, 13, 37227, 198, 11748, 555, 715, 395, 198, 11748, 10688, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 11485, 13949, 496, 20560, 26410, 1330, 1330, 62, 11201, 62, 7890, 11, 1949, 6690, 24197, 198...
2.03085
2,107
from . import preprocessing_step
[ 6738, 764, 1330, 662, 36948, 62, 9662, 628 ]
4.25
8
""" https://www.codechef.com/problems/JAIN Type: Dynamic Programming """ if __name__ == '__main__': for t in range(int(input())): solve()
[ 37811, 198, 5450, 1378, 2503, 13, 19815, 721, 258, 69, 13, 785, 14, 1676, 22143, 14, 41, 29833, 198, 6030, 25, 26977, 30297, 198, 37811, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 329, 25...
2.47541
61
from flask_restful import Resource, fields, marshal_with, reqparse from flask_jwt_extended import jwt_required, get_jwt_identity from mini_gplus.daos.user import find_user from mini_gplus.daos.circle import create_circle, get_circles, find_circle, toggle_member, delete_circle, rename_circle from mini_gplus.daos.excepti...
[ 6738, 42903, 62, 2118, 913, 1330, 20857, 11, 7032, 11, 22397, 282, 62, 4480, 11, 43089, 29572, 198, 6738, 42903, 62, 73, 46569, 62, 2302, 1631, 1330, 474, 46569, 62, 35827, 11, 651, 62, 73, 46569, 62, 738, 414, 198, 6738, 9927, 62, ...
3.009434
212
from django.contrib import admin # Register your models here. from .models import Relationship,Person admin.site.register(Relationship) admin.site.register(Person)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 198, 2, 17296, 534, 4981, 994, 13, 198, 198, 6738, 764, 27530, 1330, 39771, 11, 15439, 198, 198, 28482, 13, 15654, 13, 30238, 7, 47117, 1056, 8, 198, 28482, 13, 15654, 13, 30238, ...
3.630435
46
__copyright__ = "Copyright (C) 2019 Zachary J Weiner" __license__ = """ 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, c...
[ 834, 22163, 4766, 834, 796, 366, 15269, 357, 34, 8, 13130, 18825, 560, 449, 35055, 1, 201, 198, 201, 198, 834, 43085, 834, 796, 37227, 201, 198, 5990, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866...
2.722141
1,364
"Output stream buffering: A first look" ''' By default, standard output is fully buffered when connected to a pipe like this; it’s only line-buffered when connected to a terminal: >>> pipe = os.popen('python testexit_os.py') >>> pipe.read() # streams not flushed on exit '' >>> pipe = os.popen('python -u testexit_os.py'...
[ 1, 26410, 4269, 6940, 1586, 25, 317, 717, 804, 1, 198, 7061, 6, 198, 3886, 4277, 11, 3210, 5072, 318, 3938, 6940, 1068, 618, 5884, 284, 257, 12656, 588, 428, 26, 340, 447, 247, 82, 691, 198, 1370, 12, 36873, 1068, 618, 5884, 284, ...
3.278107
338
from supersql import Query from .schemas.actor import Actor from .schemas.staff import Staff query = Query( user='postgres', password='postgres', vendor='postrgres', host='localhost:5432/mydatabase' ) actor = Actor() prep = query.SELECT( actor.actor_id, actor.first_name ).FROM( actor ).W...
[ 6738, 22754, 13976, 1330, 43301, 198, 198, 6738, 764, 1416, 4411, 292, 13, 11218, 1330, 27274, 198, 6738, 764, 1416, 4411, 292, 13, 28120, 1330, 9983, 628, 198, 22766, 796, 43301, 7, 198, 220, 220, 220, 2836, 11639, 7353, 34239, 3256, ...
2.286871
1,112
import base64 import hmac import hashlib import logging import bcrypt from django.conf import settings from django.contrib.auth.hashers import (BCryptPasswordHasher, BasePasswordHasher, mask_hash) from django.utils.crypto import constant_time_compare from django.utils.encoding...
[ 11748, 2779, 2414, 198, 11748, 289, 20285, 198, 11748, 12234, 8019, 198, 11748, 18931, 198, 198, 11748, 275, 29609, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 10134, 7084, ...
2.711702
940
# Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. from sets import Set import warnings from twisted.internet import interfaces, defer, main from twisted.persisted import styles from twisted.python import log, failure from ops import ReadFileOp, WriteFileOp from util import StateEvent...
[ 2, 15069, 357, 66, 8, 5878, 12, 15724, 40006, 24936, 46779, 13, 198, 2, 4091, 38559, 24290, 329, 3307, 13, 628, 198, 6738, 5621, 1330, 5345, 198, 11748, 14601, 198, 198, 6738, 19074, 13, 37675, 1330, 20314, 11, 29135, 11, 1388, 198, ...
4.257732
97
# vim: expandtab tabstop=4 shiftwidth=4 from dspftw import * from .constellation_plot import conplot, constellation_plot from .plot_3d_complex import plot_3d_complex, plot3c from .plot_complex import plotc, plot_complex from .plot_slider import plot_slider, plots from .plot_func_slider import plot_func_slider, plotfs...
[ 2, 43907, 25, 4292, 8658, 7400, 11338, 28, 19, 6482, 10394, 28, 19, 198, 198, 6738, 288, 2777, 701, 86, 1330, 1635, 198, 198, 6738, 764, 9979, 28828, 62, 29487, 1330, 369, 29487, 11, 38712, 62, 29487, 198, 6738, 764, 29487, 62, 18, ...
3.096154
104
# -*- coding: utf-8 -*- import logging import os from datetime import datetime import boto3 from boto3.dynamodb.conditions import Key logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.INFO) """ if __name__ == "__main__": ddb = DdbChat() table = ddb.createConnection('chat') name = ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 18931, 198, 11748, 28686, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 11748, 275, 2069, 18, 198, 6738, 275, 2069, 18, 13, 67, 4989, 375, 65, 13, 17561, 1...
2.470103
485
if __name__ == "__main__": main()
[ 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1388, 3419, 198 ]
2.105263
19
import logging import logging.handlers class HTTPHandler(logging.Handler): """ A class Based on Vinay Sajip HTTPHandler-class which sends records to a Web server, using either GET or POST semantics. It supports HTTP, HTTPS and basic authorization. """ def __init__(self, host, url, method="GET", se...
[ 11748, 18931, 198, 11748, 18931, 13, 4993, 8116, 628, 198, 4871, 14626, 25060, 7, 6404, 2667, 13, 25060, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 317, 1398, 13403, 319, 11820, 323, 311, 1228, 541, 14626, 25060, 12, 4871, 5...
2.070981
1,437
#!/usr/bin/python3 from requests import get import base64 # Gets the splash for the game
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 6738, 7007, 1330, 651, 198, 11748, 2779, 2414, 198, 198, 2, 29620, 262, 22870, 329, 262, 983, 198 ]
3.25
28
# Copyright 2018 The Feast Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
[ 2, 15069, 2864, 383, 42936, 46665, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, 743...
3.172589
394
from .core import run __all__ = ['run']
[ 6738, 764, 7295, 1330, 1057, 198, 198, 834, 439, 834, 796, 37250, 5143, 20520, 198 ]
2.733333
15
# ----------------------------------------------------- # Copyright (c) Shanghai Jiao Tong University. All rights reserved. # Written by Jiefeng Li (jeff.lee.sjtu@gmail.com) # ----------------------------------------------------- import torch import torch.utils.data from utils.dataset import coco from opt import opt f...
[ 2, 20368, 19351, 12, 198, 2, 15069, 357, 66, 8, 21865, 449, 13481, 26565, 2059, 13, 1439, 2489, 10395, 13, 198, 2, 22503, 416, 449, 2086, 1516, 7455, 357, 73, 14822, 13, 7197, 13, 82, 73, 28047, 31, 14816, 13, 785, 8, 198, 2, 20...
3.806452
155
from itertools import groupby import logging from django.conf import settings from django.db import models from zconnect._models.base import ModelBase from zconnect.models import Product from zconnect.zc_billing.util import BillingPeriod, next_bill_period logger = logging.getLogger(__name__) CURRENCIES = [ ("U...
[ 6738, 340, 861, 10141, 1330, 1448, 1525, 198, 11748, 18931, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 198, 6738, 1976, 8443, 13557, 27530, 13, 8692, 1330, 9104, 14881, 198, ...
2.758298
1,175
# -*- coding: utf-8 -*- import logging import stripe from django.utils.translation import gettext as _ from rest_framework import permissions, status, viewsets from rest_framework.response import Response from stripe.error import InvalidRequestError, StripeError from apps.common.rest_framework.mixins import MultiSer...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 18931, 198, 198, 11748, 39858, 198, 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 651, 5239, 355, 4808, 198, 6738, 1334, 62, 30604, 1330, 21627, 11, 3722, ...
3.419483
503
from typing import Union from pandas import DataFrame
[ 6738, 19720, 1330, 4479, 198, 198, 6738, 19798, 292, 1330, 6060, 19778, 628 ]
4.307692
13
"""Test the module SMOTE ENN.""" from __future__ import print_function from unbalanced_dataset.combine import SMOTEENN def test_smote_enn(): """Test the SMOTE ENN function.""" print('Test SMOTE ENN')
[ 37811, 14402, 262, 8265, 9447, 23051, 412, 6144, 526, 15931, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 6738, 555, 27753, 62, 19608, 292, 316, 13, 24011, 500, 1330, 9447, 23051, 34571, 628, 198, 4299, 1332, 62, 5796, ...
2.944444
72
""" Usage example: ```sh # To train model on all words: python model.py "${HOME}/ml-data/speech-command-browser" 232 # To train model on a subset of the words (in addition to _background_noise # and _unknown_): python model.py \ --include_words=left,right,up,down \ "${HOME}/ml-data/speech-command-browser" 232...
[ 37811, 198, 28350, 1672, 25, 198, 198, 15506, 63, 1477, 198, 2, 1675, 4512, 2746, 319, 477, 2456, 25, 198, 29412, 2746, 13, 9078, 17971, 90, 39069, 92, 14, 4029, 12, 7890, 14, 45862, 12, 21812, 12, 40259, 1, 31773, 198, 198, 2, 16...
2.675497
906