content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
from django.shortcuts import render, redirect from django.http import HttpResponse from django.contrib import messages from app_startup4.models import StartupCompetition def registerListView(request): """ """ queryset = StartupCompetition.objects.filter(state=1, competition=2) if request.method ==...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 18941, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 6218, 198, 198, 6738, 598, 62, 9688, 929, 19, 13, 27530, 1330, 40472,...
2.512384
1,292
# -*- python -*- # This software was produced by NIST, an agency of the U.S. government, # and by statute is not subject to copyright in the United States. # Recipients of this software assume all responsibilities associated # with its operation, modification and maintenance. However, to # facilitate maintenance we ...
[ 2, 532, 9, 12, 21015, 532, 9, 12, 220, 628, 198, 2, 770, 3788, 373, 4635, 416, 399, 8808, 11, 281, 4086, 286, 262, 471, 13, 50, 13, 1230, 11, 198, 2, 290, 416, 14195, 318, 407, 2426, 284, 6634, 287, 262, 1578, 1829, 13, 198, ...
2.115979
1,164
# -*- coding: utf-8 -*- """ Created on 21 October 2017 implements Listing 1.2. MATLAB Program fig1_12.m in Mahafza radar book @author: Ashiv Dhondea """ import numpy as np import RadarBasics as RB import RadarConstants as RC import RadarEquations as RE # Importing what's needed for nice plots. import matplotlib.p...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 2310, 3267, 2177, 198, 198, 320, 1154, 902, 7343, 278, 352, 13, 17, 13, 36775, 48780, 6118, 2336, 16, 62, 1065, 13, 76, 220, 198, 259, 8882, ...
2.049789
2,129
# coding=utf-8 import functools import warnings from django.shortcuts import render from .forms import ContactForm from catalog.views import Product from django.views.generic import View, TemplateView, CreateView from django.contrib.auth import get_user_model from django.contrib import messages # Sobrecarga da classe...
[ 2, 19617, 28, 40477, 12, 23, 198, 11748, 1257, 310, 10141, 198, 11748, 14601, 198, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 764, 23914, 1330, 14039, 8479, 198, 6738, 18388, 13, 33571, 1330, 8721, 198, 6738, 4262...
3.363344
311
/home/runner/.cache/pip/pool/d9/2c/a4/7718a956dd946c833114214fec833728fef3062ae858a03a9d82cf9dc7
[ 14, 11195, 14, 16737, 11757, 23870, 14, 79, 541, 14, 7742, 14, 67, 24, 14, 17, 66, 14, 64, 19, 14, 3324, 1507, 64, 50148, 1860, 24, 3510, 66, 48634, 1157, 3682, 1415, 69, 721, 23, 31496, 2078, 69, 891, 1270, 5237, 3609, 23, 3365...
1.745455
55
import unittest import jekpost.jekpost_create as jek from datetime import date if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 11748, 474, 988, 7353, 13, 73, 988, 7353, 62, 17953, 355, 474, 988, 198, 198, 6738, 4818, 8079, 1330, 3128, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715,...
2.666667
48
# This example demonstrates how to regrid between a mesh and a locstream. import ESMF import numpy import ESMF.util.helpers as helpers import ESMF.api.constants as constants # This call enables debug logging # ESMF.Manager(debug=True) from ESMF.util.mesh_utilities import mesh_create_5, mesh_create_5_parallel from E...
[ 2, 770, 1672, 15687, 703, 284, 842, 6058, 1022, 257, 19609, 290, 257, 1179, 5532, 13, 198, 198, 11748, 412, 12310, 37, 198, 11748, 299, 32152, 198, 198, 11748, 412, 12310, 37, 13, 22602, 13, 16794, 364, 355, 49385, 198, 11748, 412, ...
2.569201
1,026
HISTORYDAY = 7 DAYTIMESTEP = 24 * 12
[ 39, 42480, 26442, 796, 767, 198, 26442, 51, 3955, 6465, 8905, 796, 1987, 1635, 1105 ]
2.4
15
""" # ============================================================================== # ToPy -- Topology optimization with Python. # Copyright (C) 2012, 2015, 2016, 2017 William Hunter. # Copyright (C) 2020, 2021, Tarcsio L. de Oliveira # ============================================================================== """...
[ 37811, 198, 2, 38093, 25609, 28, 198, 2, 1675, 20519, 1377, 5849, 1435, 23989, 351, 11361, 13, 198, 2, 15069, 357, 34, 8, 2321, 11, 1853, 11, 1584, 11, 2177, 3977, 9055, 13, 198, 2, 15069, 357, 34, 8, 12131, 11, 33448, 11, 309, ...
3.358491
212
# -*- coding: utf-8 -*- """ @Project : @FileName: @Author :penghr @Time :2021/11/xx xx:xx @Desc : FIDTM-train/dataset/FIDTM/ test gt_fidt_map IMG_8.h5 gt_show ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 31, 16775, 1058, 220, 198, 31, 8979, 5376, 25, 220, 198, 31, 13838, 220, 1058, 3617, 456, 81, 220, 198, 31, 7575, 220, 220, 220, 1058, 1238, 2481, 14, 11...
1.683221
2,235
try: from django.urls import path, include except: from django.conf.urls import url as path, include from django.contrib import admin urlpatterns = [ path(r'^admin/', admin.site.urls), path(r'^app/', include('tests.app.urls')), path(r'^adyen/notifications/', include('djadyen.notifications.urls', n...
[ 28311, 25, 198, 220, 220, 220, 422, 42625, 14208, 13, 6371, 82, 1330, 3108, 11, 2291, 198, 16341, 25, 198, 220, 220, 220, 422, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 355, 3108, 11, 2291, 198, 198, 6738, 42625, 14208, 13...
2.637037
135
from .ArrayType import * from .ArrayTypeRef import * from .CompositeType import * from .FunctionType import * from .FunctionTypeRef import * from .IntegerType import * from .IntegerTypeRef import * from .NamedType import * from .ParamTypes import * from .PointerType import * from .PointerTypeRef import * from .StructTy...
[ 6738, 764, 19182, 6030, 1330, 1635, 198, 6738, 764, 19182, 6030, 8134, 1330, 1635, 198, 6738, 764, 5377, 1930, 578, 6030, 1330, 1635, 198, 6738, 764, 22203, 6030, 1330, 1635, 198, 6738, 764, 22203, 6030, 8134, 1330, 1635, 198, 6738, 764...
3.491018
167
XiphPackage ('speex', 'speex', '1.2rc1')
[ 55, 13323, 27813, 19203, 4125, 1069, 3256, 705, 4125, 1069, 3256, 705, 16, 13, 17, 6015, 16, 11537, 198 ]
2.157895
19
# Create by Packetsss # Personal use is allowed # Commercial use is prohibited from django.shortcuts import render # Create your views here. from django.http import HttpResponse, HttpResponseRedirect from .models import ToDoList, Item from .forms import Create_list # def id(response, id): # lst = ToDoList.objec...
[ 2, 13610, 416, 6400, 316, 824, 82, 198, 2, 15644, 779, 318, 3142, 198, 2, 22724, 779, 318, 12244, 198, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 198, 2, 13610, 534, 5009, 994, 13, 198, 6738, 42625, 14208, 13, 4023,...
2.693069
202
import asyncio from discord.ext import commands from src.BaseCog import BaseCog from src.DB import DB from src.Reasons import Reasons
[ 11748, 30351, 952, 198, 6738, 36446, 13, 2302, 1330, 9729, 198, 6738, 12351, 13, 14881, 34, 519, 1330, 7308, 34, 519, 198, 6738, 12351, 13, 11012, 1330, 20137, 198, 6738, 12351, 13, 3041, 2812, 1330, 44923, 628 ]
3.648649
37
from cmath import nan from sqlite3 import DatabaseError import pandas as pd import numpy as np import json if __name__ == '__main__': data = { 'matricule': ['12345', '23456', '34567'], 'name': ['Quentin', 'Andr', 'Ken'], 'grade': [12, 13, 14], 'status': ['absent', 'malade', 'prsent'...
[ 6738, 269, 11018, 1330, 15709, 198, 6738, 44161, 578, 18, 1330, 24047, 12331, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 33918, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 1035...
2.175
200
from compressor.storage import CompressorFileStorage
[ 6738, 49395, 13, 35350, 1330, 3082, 44292, 8979, 31425, 628 ]
5.4
10
import numbers anyT = AnyT() emptyT = SimpleType('') noneT = NoneT() numberT = SimpleType('number') intT = SimpleType('int', parent=numberT, type=int) floatT = SimpleType('float', parent=numberT, type=float) stringT = SimpleType('str', type=str) PRIMITIVES = [intT, floatT, stringT] # most specific common ...
[ 11748, 3146, 628, 628, 198, 198, 1092, 51, 796, 4377, 51, 3419, 628, 198, 198, 28920, 51, 796, 17427, 6030, 7, 7061, 8, 198, 23108, 51, 796, 6045, 51, 3419, 198, 17618, 51, 796, 17427, 6030, 10786, 17618, 11537, 198, 600, 51, 796, ...
2.254509
499
import os import numpy import copy import argparse from matplotlib import pyplot from src.radiotelescope import RadioTelescope from src.radiotelescope import BaselineTable from src.skymodel import SkyRealisation from simulate_beam_covariance_data import compute_baseline_covariance from simulate_beam_covariance_data im...
[ 11748, 28686, 198, 11748, 299, 32152, 198, 11748, 4866, 198, 11748, 1822, 29572, 198, 198, 6738, 2603, 29487, 8019, 1330, 12972, 29487, 198, 6738, 12351, 13, 6335, 5151, 417, 3798, 3008, 1330, 8829, 33317, 3798, 3008, 198, 6738, 12351, 13...
2.992126
254
# Generated by Django 4.0.1 on 2022-01-20 15:12 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 604, 13, 15, 13, 16, 319, 33160, 12, 486, 12, 1238, 1315, 25, 1065, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.766667
30
from anthill.common.validate import validate from anthill.common import admin as a, update from . model.event import EventNotFound, CategoryNotFound, EventFlags, EventEndAction import ujson import collections EVENT_END_ACTION_DESCRIPTION = """ <b>Send Message</b><br>A message with detailed information about event ...
[ 198, 6738, 26794, 359, 13, 11321, 13, 12102, 378, 1330, 26571, 198, 6738, 26794, 359, 13, 11321, 1330, 13169, 355, 257, 11, 4296, 198, 198, 6738, 764, 2746, 13, 15596, 1330, 8558, 3673, 21077, 11, 21743, 3673, 21077, 11, 8558, 40053, ...
1.965145
3,615
import sys, os # sys.path.append(os.path.join(os.path.dirname(__file__)) #TODO: Is this a good idea? Dunno! It works! # print(os.path.join(os.path.dirname(__file__))) import argparse import markov_pilot.environment.properties as prp from markov_pilot.environment.environment import NoFGJsbSimEnv_multi, J...
[ 11748, 25064, 11, 28686, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198, 2, 25064, 13, 6978, 13, 33295, 7, 418, 13, 6978, 13, 22179, 7, 418, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 4008, 1303, 51, 3727, 46...
2.873123
1,332
# -*- coding: utf-8 -*- """Core ATM module. This module contains the ATM class, which is the one responsible for executing and orchestrating the main ATM functionalities. """ import logging import random import time from datetime import datetime, timedelta from operator import attrgetter from tqdm import tqdm from...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 14055, 30939, 8265, 13, 198, 198, 1212, 8265, 4909, 262, 30939, 1398, 11, 543, 318, 262, 530, 4497, 329, 198, 18558, 15129, 290, 28127, 803, 262, 1388, 30939...
3.503311
151
""" Leeds Sports Pose (LSP) Dataset download/process functions. """ from dbcollection.datasets import BaseDataset from .keypoints import Keypoints, KeypointsOriginal urls = ( 'http://sam.johnson.io/research/lsp_dataset_original.zip', { 'url': 'http://sam.johnson.io/research/lsp_dataset.zip', ...
[ 37811, 198, 43, 39642, 7092, 37557, 357, 43, 4303, 8, 16092, 292, 316, 4321, 14, 14681, 5499, 13, 198, 37811, 628, 198, 6738, 20613, 43681, 13, 19608, 292, 1039, 1330, 7308, 27354, 292, 316, 198, 6738, 764, 2539, 13033, 1330, 7383, 13...
2.602871
209
#!/usr/bin/env python from __future__ import print_function import tables import argparse import numpy as np import sys def cls(root="/mnt/strawscience/data/auto_pipeline/raw_archive/by_date"): """Generates example command lines amenable to use, for example, with GNU parallel.""" from itertools import produ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 8893, 198, 11748, 1822, 29572, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 25064, 628, 628, 198, 4299, 537, 82, 7, 15763, ...
2.393443
305
import sys import traceback import webbrowser from argparse import ArgumentParser, Namespace from os import path from tkinter import Tk, messagebox, filedialog from mangareader.mangarender import extract_render from mangareader import templates from time import sleep if __name__ == '__main__': main()
[ 11748, 25064, 198, 11748, 12854, 1891, 198, 11748, 3992, 40259, 198, 6738, 1822, 29572, 1330, 45751, 46677, 11, 28531, 10223, 198, 6738, 28686, 1330, 3108, 198, 6738, 256, 74, 3849, 1330, 309, 74, 11, 3275, 3524, 11, 5717, 498, 519, 198...
3.604651
86
#!/usr/bin/env python3 import socket import os import time import threading if __name__ == "__main__": n=os.fork() if n>0: os.system("sleep 2") os.system("sudo ip addr add 172.19.0.1/24 dev tap1") os.system("sudo ip link set tap1 up") os.wait() ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 17802, 198, 11748, 28686, 198, 11748, 640, 198, 11748, 4704, 278, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 220, 220, 220, 220, ...
1.839827
231
# Copyright (c) 2018 R. Tohid # # Distributed under the Boost Software License, Version 1.0. (See accompanying # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) from phylanx import Phylanx, PhylanxSession if __name__ == "__main__": PhylanxSession.init(1) main()
[ 2, 220, 15069, 357, 66, 8, 2864, 371, 13, 309, 1219, 312, 198, 2, 198, 2, 220, 4307, 6169, 739, 262, 19835, 10442, 13789, 11, 10628, 352, 13, 15, 13, 357, 6214, 19249, 198, 2, 220, 2393, 38559, 24290, 62, 16, 62, 15, 13, 14116, ...
2.631579
114
import requests import json posts = openPosts() from elasticsearch import Elasticsearch from elasticsearch.helpers import bulk es = Elasticsearch("http://localhost:9200") bulk(es, bulkAdds(posts))
[ 11748, 7007, 198, 11748, 33918, 628, 198, 24875, 796, 1280, 21496, 3419, 628, 198, 6738, 27468, 12947, 1330, 48567, 12947, 198, 6738, 27468, 12947, 13, 16794, 364, 1330, 11963, 198, 274, 796, 48567, 12947, 7203, 4023, 1378, 36750, 25, 24,...
3.672727
55
import os import zipfile from ..core import Instance
[ 11748, 28686, 198, 11748, 19974, 7753, 198, 6738, 11485, 7295, 1330, 2262, 590, 628 ]
3.857143
14
#This program shows the amount of each ingredient needed for a numbers of cookies. #constants sugar = 1.5 butter = 1 flour = 2.75 cookies = 48 #input numOfCookies = int(input('Enter the number of cookies:')) #calculation amtSugar = sugar / cookies * numOfCookies amtButter = butter / cookies * numOfCookies amtFlour ...
[ 198, 2, 1212, 1430, 2523, 262, 2033, 286, 1123, 18734, 2622, 329, 257, 3146, 286, 14746, 13, 198, 198, 2, 9979, 1187, 198, 82, 35652, 796, 352, 13, 20, 198, 4360, 353, 796, 352, 198, 2704, 454, 796, 362, 13, 2425, 198, 27916, 444,...
2.769492
590
import unittest from datetime import datetime, timedelta from pkg_resources import parse_version import reqcheck.versions as versions
[ 11748, 555, 715, 395, 198, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 6738, 279, 10025, 62, 37540, 1330, 21136, 62, 9641, 198, 198, 11748, 43089, 9122, 13, 47178, 355, 6300, 628, 628 ]
3.861111
36
#!/usr/bin/env python from seoaudit.checks.element import ElementCheck from seoaudit.checks.page import PageCheck from seoaudit.checks.site import SiteCheck page_tests = [(PageCheck.TEXT_TO_CODE_RATIO, {"min_ratio": 0.1}), (PageCheck.DOM_SIZE, {"max_size": 1500}), [PageCheck.ELEMENTS_SIMILA...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 6738, 384, 78, 3885, 270, 13, 42116, 13, 30854, 1330, 11703, 9787, 198, 6738, 384, 78, 3885, 270, 13, 42116, 13, 7700, 1330, 7873, 9787, 198, 6738, 384, 78, 3885, 270, 13, 42116, 13,...
2.209429
1,103
# Copyright (c) <2015> <Sergi Delgado Segura> # Distributed under the BSD software license, see the accompanying file LICENSE from pyasn1.codec.der import encoder, decoder from pyasn1_modules.rfc2459 import Certificate from Crypto.PublicKey import RSA from M2Crypto import X509 from hashlib import sha256 from os import...
[ 2, 15069, 357, 66, 8, 1279, 4626, 29, 1279, 50, 6422, 72, 4216, 50054, 31220, 5330, 29, 198, 2, 4307, 6169, 739, 262, 347, 10305, 3788, 5964, 11, 766, 262, 19249, 2393, 38559, 24290, 198, 198, 6738, 12972, 292, 77, 16, 13, 19815, ...
3.087237
1,238
import random import sys sys.setrecursionlimit(15000) count_columns = 50 count_rows = 40 matrix = [[random.randint(0, 1) for i in range(count_columns)] for j in range(count_rows)] matrix = [[0] * count_columns for _ in range(count_rows)] for _ in range(10): matrix[random.randint(0, count_rows - 1)][random.randin...
[ 11748, 4738, 198, 11748, 25064, 198, 198, 17597, 13, 2617, 8344, 24197, 32374, 7, 1314, 830, 8, 198, 198, 9127, 62, 28665, 82, 796, 2026, 198, 9127, 62, 8516, 796, 2319, 198, 198, 6759, 8609, 796, 16410, 25120, 13, 25192, 600, 7, 15...
2.492877
351
from portabletext_html.renderer import PortableTextRenderer, render __all__ = ['PortableTextRenderer', 'render']
[ 6738, 17726, 5239, 62, 6494, 13, 10920, 11882, 1330, 44685, 8206, 49, 437, 11882, 11, 8543, 198, 198, 834, 439, 834, 796, 37250, 13924, 540, 8206, 49, 437, 11882, 3256, 705, 13287, 20520, 198 ]
3.352941
34
print("{} wyraz ciagu geometrycznego gdzie a1 = {}, q = {} wynosi {}".format(4, 1, 5, cg(4, 1, 5))) print("{} wyraz ciagu geometrycznego gdzie a1 = {}, q = {} wynosi {}".format(7, 1, 2, cg(7)))
[ 201, 198, 201, 198, 4798, 7203, 90, 92, 266, 88, 3247, 269, 72, 11433, 22939, 26691, 710, 2188, 308, 67, 49746, 257, 16, 796, 1391, 5512, 10662, 796, 23884, 266, 2047, 21707, 23884, 1911, 18982, 7, 19, 11, 352, 11, 642, 11, 269, 7...
2.0625
96
import click import IPython from code42cli import BANNER from code42cli.options import sdk_options
[ 11748, 3904, 198, 11748, 6101, 7535, 198, 198, 6738, 2438, 3682, 44506, 1330, 347, 1565, 21479, 198, 6738, 2438, 3682, 44506, 13, 25811, 1330, 264, 34388, 62, 25811, 628 ]
3.482759
29
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = 'Yee_172' __date__ = '2017/12/03' import sys PATH = sys.path[0][:-4] sys.path.append(PATH) from src.Func import * win = MainWin() sys.exit(app.exec_())
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 834, 9800, 834, 796, 705, 56, 1453, 62, 23628, 6, 198, 834, 4475, 834, 796, 705, 5539, 14, 1065, 14, 3070, 6, ...
2.226804
97
import requests, os dir_name = os.path.basename(os.path.dirname(os.path.realpath(__file__))) save_path = "../../lists/"+dir_name+"/" if __name__ == "__main__": print("ProtonVPN ips") main()
[ 220, 198, 11748, 7007, 11, 28686, 198, 198, 15908, 62, 3672, 796, 28686, 13, 6978, 13, 12093, 12453, 7, 418, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 5305, 6978, 7, 834, 7753, 834, 22305, 198, 21928, 62, 6978, 796, 366, 40...
2.258065
93
# Dakota Python Driving Script # necessary python modules import dakota.interfacing as di import subprocess import sys import os import multiprocessing sys.path.append('../../scripts') import input as inp import output as oup import external_cym cycdir = '../../cyclus-files/sobol/' # -----------------...
[ 2, 13336, 11361, 32889, 12327, 201, 198, 201, 198, 2, 3306, 21015, 13103, 201, 198, 11748, 288, 461, 4265, 13, 3849, 29532, 355, 2566, 201, 198, 11748, 850, 14681, 201, 198, 11748, 25064, 201, 198, 11748, 28686, 201, 198, 11748, 18540, ...
2.252606
1,247
""" BASIC LINEAR REGRESSION CODE Consider this my first application of what I understood about ML/DL so far. I wrote this to check my understanding of the basic concepts. It's pretty simple but I needed to get my feet wet with code. Any suggestions for modifications are welcome! """ #x and y data...
[ 37811, 29809, 2149, 48920, 1503, 4526, 10761, 47621, 42714, 201, 198, 220, 220, 220, 12642, 428, 616, 717, 3586, 286, 644, 314, 7247, 546, 10373, 14, 19260, 523, 1290, 13, 201, 198, 201, 198, 220, 220, 220, 314, 2630, 428, 284, 2198, ...
2.378747
367
""" Debug helpers. """ import io import logging from typing import Union, Optional, Callable import numpy as np import pandas as pd _printt_log_method = print force_minimal_logging = False def ar( array: np.ndarray, name: Optional[str] = None, lim: Union[int, str, None] = None, lw: int = 200, ...
[ 37811, 198, 27509, 49385, 13, 198, 37811, 198, 11748, 33245, 198, 11748, 18931, 198, 6738, 19720, 1330, 4479, 11, 32233, 11, 4889, 540, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 628, 198, 62, 4798, ...
2.305412
2,125
import os import re import sys from collections import defaultdict try: from setuptools import setup except ImportError: from distutils.core import setup def get_version(*file_paths): """Retrieves the version from django_directed/__init__.py""" filename = os.path.join(os.path.dirname(__file__), *file...
[ 11748, 28686, 198, 11748, 302, 198, 11748, 25064, 198, 6738, 17268, 1330, 4277, 11600, 198, 198, 28311, 25, 198, 220, 220, 220, 422, 900, 37623, 10141, 1330, 9058, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220, 422, 1233, 26791, 13, ...
2.744513
1,139
import json import os import shutil from copy import deepcopy from pathlib import Path def read_json(path): """ Read a .json file Args: path (string): Path of a .json file Returns: data (dictionary): Output dictionary """ f = open(path,) data = json.load(f) f.cl...
[ 11748, 33918, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 198, 6738, 4866, 1330, 2769, 30073, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 4299, 1100, 62, 17752, 7, 6978, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 4149, ...
2.41358
324
# -*- coding: utf-8 -*- """ Created on Wed Feb 6 23:26:38 2019 @author: avaca """ import pandas as pd import numpy as np from sklearn.model_selection import GridSearchCV complete_data = pd.read_csv('', encoding = 'utf-8') vars_categ = ['HY_provincia', 'HY_tipo']
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 3300, 3158, 220, 718, 2242, 25, 2075, 25, 2548, 13130, 198, 198, 31, 9800, 25, 1196, 22260, 198, 37811, 198, 198, 11748, 19798, 292, 355, 279, ...
2.537736
106
import re inputfile = '/Users/csiu/project/webCrawler/extractPrimer/test.txt' primerStart = """5'""" primerEnd = """3'""" nucleotides = '[ATGCN]' linePrimerEnding = re.compile(nucleotides + '$') linePrimerStarting = re.compile('^' + nucleotides) with open(inputfile, 'r') as f: for line in f: if primerSt...
[ 11748, 302, 198, 198, 15414, 7753, 796, 31051, 14490, 14, 6359, 16115, 14, 16302, 14, 12384, 34, 39464, 14, 2302, 974, 23828, 263, 14, 9288, 13, 14116, 6, 198, 19795, 263, 10434, 796, 37227, 20, 6, 37811, 198, 19795, 263, 12915, 796, ...
1.982063
669
from django.contrib import admin from django.contrib.auth.admin import UserAdmin as BaseUserAdmin from django.contrib.auth.models import User from django.utils.translation import gettext as _ from core import models admin.site.unregister(User) admin.site.register(User, UserAdmin) admin.site.register(models.Post, ...
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 28482, 1330, 11787, 46787, 355, 7308, 12982, 46787, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 6...
3.401786
112
import pytest import os import json import boto3 from click.testing import CliRunner from moto import mock_ssm
[ 198, 11748, 12972, 9288, 198, 11748, 28686, 198, 11748, 33918, 198, 11748, 275, 2069, 18, 198, 6738, 3904, 13, 33407, 1330, 1012, 72, 49493, 198, 6738, 285, 2069, 1330, 15290, 62, 824, 76, 628, 628, 628, 628 ]
3.216216
37
"""Create plots for learning from varying numbers of demonstrations.""" import os import matplotlib import matplotlib.pyplot as plt import pandas as pd from predicators.scripts.analyze_results_directory import create_dataframes, \ get_df_for_entry pd.options.mode.chained_assignment = None # default='warn' # pl...
[ 37811, 16447, 21528, 329, 4673, 422, 15874, 3146, 286, 18721, 526, 15931, 198, 198, 11748, 28686, 198, 198, 11748, 2603, 29487, 8019, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 19798, 292, 355, 279, 67, 19...
2.348721
1,603
import os from collections import OrderedDict try: import joblib except ImportError: pass try: import numpy as np except ImportError: pass from pyaedt import constants from pyaedt.generic.general_methods import generate_unique_name from pyaedt.generic.general_methods import pyaedt_function_handler fro...
[ 11748, 28686, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 198, 28311, 25, 198, 220, 220, 220, 1330, 1693, 8019, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220, 1208, 198, 28311, 25, 198, 220, 220, 220, 1330, 299, 32152, 355, ...
2.352941
1,292
"""Retainn web-fetching functions.""" try: # Python 3 from urllib.request import Request, urlopen except ImportError: # Python 2 from urllib2 import Request, urlopen def http_get_deck_and_etag(gist_url): """Download the markdown and etag of a deck URL.""" response = urlopen(gist_url + "/raw")...
[ 37811, 9781, 391, 77, 3992, 12, 69, 7569, 278, 5499, 526, 15931, 198, 198, 28311, 25, 198, 220, 220, 220, 1303, 11361, 513, 198, 220, 220, 220, 422, 2956, 297, 571, 13, 25927, 1330, 19390, 11, 19016, 9654, 198, 16341, 17267, 12331, ...
2.502427
412
from django.conf.urls.defaults import * urlpatterns = patterns('clwmail.admin.views', (r'user/manage/page/(?P<page_num>\d{1,})/$' ,'usermanage'), (r'user/manage/page/$' ,'usermanage'), (r'user/add/$' ,'useradd'), (r'user/...
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 13, 12286, 82, 1330, 1635, 198, 6371, 33279, 82, 796, 7572, 10786, 565, 86, 4529, 13, 28482, 13, 33571, 3256, 198, 220, 220, 220, 357, 81, 6, 7220, 14, 805, 496, 14, 7700, 29006, 30, 47...
1.628233
928
import os import torch import pandas as pd from skimage import io, transform import numpy as np import matplotlib.pyplot as plt from torch.utils.data import Dataset, DataLoader from torchvision import transforms, utils # Ignore waring import warnings warnings.filterwarnings('ignore') plt.ion() landmarks_frame = pd.r...
[ 11748, 28686, 198, 11748, 28034, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 1341, 9060, 1330, 33245, 11, 6121, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 28034, 13,...
2.977778
225
import logging as log import sys from extra.introspection import collect_datasets, collect_wrong_solutions from implementation.checker import output_reader, checker as check from implementation.solver import input_reader, solver as solve, hinter as get_hint from pre_definition.solve_caller import call_with_args from p...
[ 11748, 18931, 355, 2604, 198, 11748, 25064, 198, 198, 6738, 3131, 13, 600, 305, 31308, 1330, 2824, 62, 19608, 292, 1039, 11, 2824, 62, 36460, 62, 82, 14191, 198, 6738, 7822, 13, 9122, 263, 1330, 5072, 62, 46862, 11, 2198, 263, 355, ...
2.57067
1,507
from .locale import LocaleValidator from .timezone import TimezoneValidator __all__ = ( 'LocaleValidator', 'TimezoneValidator', )
[ 6738, 764, 17946, 1000, 1330, 15181, 1000, 47139, 1352, 198, 6738, 764, 2435, 11340, 1330, 3862, 11340, 47139, 1352, 198, 198, 834, 439, 834, 796, 357, 198, 220, 220, 220, 705, 33711, 1000, 47139, 1352, 3256, 198, 220, 220, 220, 705, ...
2.836735
49
# Generated by Django 2.0.10 on 2019-02-01 01:36 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 362, 13, 15, 13, 940, 319, 13130, 12, 2999, 12, 486, 5534, 25, 2623, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.8
30
# Copyright (C) 2002-2021 S[&]T, The Netherlands. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of condi...
[ 2, 15069, 357, 34, 8, 6244, 12, 1238, 2481, 311, 58, 5, 60, 51, 11, 383, 12671, 13, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 2297, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, 11, 351, 393, 1231, 198, 2, 17613, 11, ...
3.60739
433
# -*- coding: utf-8 -*- """Watching for registration events""" import time from dataclasses import dataclass, asdict import iscc_registry from loguru import logger as log import iscc from iscc_registry.conn import db_client from iscc_registry.publish import get_live_contract from iscc_registry import tools from iscc_re...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 10723, 278, 329, 9352, 2995, 37811, 198, 11748, 640, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 11, 355, 11600, 198, 11748, 318, 535, 62, 2301, 4592, 19...
2.522013
636
from erdos.data_stream import DataStream from erdos.message import Message from erdos.op import Op from erdos.timestamp import Timestamp from erdos.utils import setup_logging import flux_utils from flux_utils import is_control_stream, is_not_control_stream from flux_buffer import Buffer import threading
[ 6738, 1931, 37427, 13, 7890, 62, 5532, 1330, 6060, 12124, 198, 6738, 1931, 37427, 13, 20500, 1330, 16000, 198, 6738, 1931, 37427, 13, 404, 1330, 8670, 198, 6738, 1931, 37427, 13, 16514, 27823, 1330, 5045, 27823, 198, 6738, 1931, 37427, ...
3.642857
84
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Aug 10 11:07:05 2018 @author: chrispedder To train the model, run from the top-level dir as: python3 -m src.CNN_models.train_model --args ... """ import numpy as np import os import argparse import json import tensorflow as tf from abc import ABC, ...
[ 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, 19480, 2447, 838, 1367, 25, 2998, 25, 2713, 2864, 198, 198, 31, 9800, 25, 442, 2442, 9124...
2.4
795
""" Transform SQLAlchemy Models to PFB Schema """ import os import logging import inspect import subprocess from collections import defaultdict import timeit from pprint import pformat from sqlalchemy.dialects.postgresql import UUID from sqlalchemy.inspection import inspect as sqla_inspect from sqlalchemy.orm.properti...
[ 37811, 198, 41762, 16363, 2348, 26599, 32329, 284, 350, 26001, 10011, 2611, 198, 37811, 198, 11748, 28686, 198, 11748, 18931, 198, 11748, 10104, 198, 11748, 850, 14681, 198, 6738, 17268, 1330, 4277, 11600, 198, 11748, 640, 270, 198, 6738, ...
2.684685
333
"""ASCII-ART 2D pretty-printer""" from .pretty import pprint, pprint_use_unicode, pretty, pretty_print
[ 37811, 42643, 3978, 12, 7227, 362, 35, 2495, 12, 1050, 3849, 37811, 198, 198, 6738, 764, 37784, 1330, 279, 4798, 11, 279, 4798, 62, 1904, 62, 46903, 1098, 11, 2495, 11, 2495, 62, 4798, 198 ]
2.971429
35
""" Modeled largely after https://github.com/openai/gym/blob/master/gym/envs/toy_text/blackjack.py Also, the github version draws with replacement, while I modified to not use replacement Also, reference here for how to play blackjack """ from typing import Dict, List, Tuple import gym import numpy as np from gym imp...
[ 37811, 198, 17633, 276, 5688, 706, 198, 5450, 1378, 12567, 13, 785, 14, 9654, 1872, 14, 1360, 76, 14, 2436, 672, 14, 9866, 14, 1360, 76, 14, 268, 14259, 14, 83, 726, 62, 5239, 14, 13424, 19650, 13, 9078, 198, 7583, 11, 262, 33084,...
2.915584
154
from functools import partial from dragn.dice.die_and_roller import roller D4 = partial(roller, 4) D6 = partial(roller, 6) D8 = partial(roller, 8) D10 = partial(roller, 10) D12 = partial(roller, 12) D20 = partial(roller, 20)
[ 6738, 1257, 310, 10141, 1330, 13027, 198, 198, 6738, 1553, 4660, 13, 67, 501, 13, 11979, 62, 392, 62, 10646, 1330, 24471, 628, 198, 35, 19, 796, 13027, 7, 10646, 11, 604, 8, 198, 35, 21, 796, 13027, 7, 10646, 11, 718, 8, 198, 35...
2.714286
84
from setuptools import setup from pip.req import parse_requirements from pip.download import PipSession setup( name='apnsend', version='0.1', description='apnsend is a tool to test your APNS certificate, key and token.', py_modules=['apnsend'], install_requires=[ str(req.req) for req in par...
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 6738, 7347, 13, 42180, 1330, 21136, 62, 8897, 18883, 198, 6738, 7347, 13, 15002, 1330, 25149, 36044, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 11639, 499, 5907, 437, 3256, 198, 220, 220, 2...
2.607735
181
import json from abc import ABC, abstractmethod from typing import Optional from aiohttp import ClientResponse as Response from .mechanisms.fetch import IFetchMechanism from .models.request import IRestRequest from ..errors.fetching_errors import FetchMechanismFailed from ..utils.logging_utils import IMonitorLogger, ...
[ 11748, 33918, 198, 6738, 450, 66, 1330, 9738, 11, 12531, 24396, 198, 6738, 19720, 1330, 32233, 198, 198, 6738, 257, 952, 4023, 1330, 20985, 31077, 355, 18261, 198, 198, 6738, 764, 1326, 3147, 6583, 13, 69, 7569, 1330, 16876, 7569, 28452...
2.197109
2,283
# # @lc app=leetcode id=206 lang=python3 # # [206] Reverse Linked List # # Definition for singly-linked list. # class ListNode: # def __init__(self, x): # self.val = x # self.next = None
[ 2, 198, 2, 2488, 44601, 598, 28, 293, 316, 8189, 4686, 28, 22136, 42392, 28, 29412, 18, 198, 2, 198, 2, 685, 22136, 60, 31849, 7502, 276, 7343, 198, 2, 198, 2, 30396, 329, 1702, 306, 12, 25614, 1351, 13, 198, 2, 1398, 7343, 1966...
2.26087
92
'''Module to test default template tags such as if, for, with, include, etc. ''' import unittest from lighty.templates import Template from lighty.templates.loaders import FSLoader
[ 7061, 6, 26796, 284, 1332, 4277, 11055, 15940, 884, 355, 611, 11, 329, 11, 351, 11, 2291, 11, 3503, 13, 198, 7061, 6, 198, 11748, 555, 715, 395, 198, 198, 6738, 1657, 88, 13, 11498, 17041, 1330, 37350, 198, 6738, 1657, 88, 13, 114...
3.345455
55
# Author: Niels Nuyttens <niels@nannyml.com> # # License: Apache Software License 2.0 """Unit tests for the calibration module.""" import numpy as np import pandas as pd import pytest from nannyml.calibration import IsotonicCalibrator, _get_bin_index_edges, needs_calibration from nannyml.exceptions import Invali...
[ 2, 220, 6434, 25, 220, 220, 11556, 1424, 399, 4669, 926, 641, 220, 1279, 8461, 1424, 31, 77, 7737, 4029, 13, 785, 29, 198, 2, 198, 2, 220, 13789, 25, 24843, 10442, 13789, 362, 13, 15, 198, 198, 37811, 26453, 5254, 329, 262, 36537,...
2.292949
1,007
import copy import nltk import json from gensim.models import KeyedVectors import h5py import numpy as np from torch import nn import time
[ 11748, 4866, 198, 198, 11748, 299, 2528, 74, 198, 11748, 33918, 198, 6738, 308, 641, 320, 13, 27530, 1330, 7383, 276, 53, 478, 669, 198, 11748, 289, 20, 9078, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 28034, 1330, 299, 77, 628, ...
3.02
50
"""Tests for the forms of the ``aps_purchasing`` app.""" import os from django.conf import settings from django.core.files.uploadedfile import SimpleUploadedFile from django.test import TestCase from django.utils.timezone import now from ..forms import QuotationUploadForm from ..models import MPN, Price, Quotation, Q...
[ 37811, 51, 3558, 329, 262, 5107, 286, 262, 7559, 1686, 62, 79, 2575, 2313, 15506, 598, 526, 15931, 198, 11748, 28686, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 7295, 13, 16624, 13, 25850, 276, 7...
3.448
125
# test_read_embark_fields_json_file.py 2/18/19 sm """ test read_embark_fields_json_file.py """ import json import unittest # add parent directory to path import os import inspect import sys CURRENTDIR = os.path.dirname(os.path.abspath(inspect.getfile( inspect.currentframe()))) PARENTDIR = os.path.dirname(CURRENTD...
[ 2, 1332, 62, 961, 62, 24419, 668, 62, 25747, 62, 17752, 62, 7753, 13, 9078, 362, 14, 1507, 14, 1129, 895, 198, 37811, 1332, 1100, 62, 24419, 668, 62, 25747, 62, 17752, 62, 7753, 13, 9078, 37227, 198, 198, 11748, 33918, 198, 11748, ...
2.732719
217
"""This file is the results window""" import sys sys.path.insert(0, 'menu/') sys.path.insert(1, 'util/') sys.path.insert(2, 'sim/') import tkinter as tk import menu import import_jobs as ij import validate_jobs as validate import show_results as sr import export_results as xr import compare_sim import con...
[ 37811, 1212, 2393, 318, 262, 2482, 4324, 37811, 201, 198, 11748, 25064, 220, 201, 198, 17597, 13, 6978, 13, 28463, 7, 15, 11, 705, 26272, 14, 11537, 201, 198, 17597, 13, 6978, 13, 28463, 7, 16, 11, 705, 22602, 14, 11537, 201, 198, ...
2.801205
166
# -*- coding: utf-8 -*- from importlib import import_module import os import sys BASE_PATH = os.path.dirname(os.path.abspath(__file__)) APP_NAME = 'server' SYS_DIRS = [ 'lib', ] # add directories to sys path for dir in SYS_DIRS + [APP_NAME]: sys.path.insert(1, os.path.join(BASE_PATH, dir)) # register flas...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 1330, 8019, 1330, 1330, 62, 21412, 198, 11748, 28686, 198, 11748, 25064, 628, 198, 33, 11159, 62, 34219, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 418, 13, ...
2.566667
210
print(present("Py-Kurs", "am Di in der 5.", "dem FSR-Kurssystem"))
[ 4798, 7, 25579, 7203, 20519, 12, 42, 1834, 1600, 366, 321, 6031, 287, 4587, 642, 33283, 366, 9536, 376, 12562, 12, 42, 333, 824, 6781, 48774, 198 ]
2.481481
27
""" Representation Processor ============ These are core classes of representation processor. Repr Processor: the basic representation processor - Event Processor """ import numpy as np from abc import ABC, abstractmethod import pretty_midi as pyd
[ 37811, 198, 40171, 341, 32893, 198, 25609, 198, 198, 4711, 389, 4755, 6097, 286, 10552, 12649, 13, 198, 198, 6207, 81, 32893, 25, 262, 4096, 10552, 12649, 198, 220, 220, 220, 532, 8558, 32893, 198, 37811, 198, 11748, 299, 32152, 355, ...
4.111111
63
import ccp_api import pytest from .test_ccp_api import Base_ccp_api_Test
[ 11748, 269, 13155, 62, 15042, 198, 11748, 12972, 9288, 198, 198, 6738, 764, 9288, 62, 535, 79, 62, 15042, 1330, 7308, 62, 535, 79, 62, 15042, 62, 14402, 628, 628, 628, 628 ]
2.53125
32
#!/usr/bin/env python # -*- coding: UTF-8 -*- ''' @IDE :PyCharm @Project :yjcL @USER :yanyin @File :Float.py @Author :yujiecong @Date :2021/9/1 16:19 ''' from restart.TokenyjcL.Token import Token_yjcL
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 198, 7061, 6, 198, 31, 14114, 220, 220, 220, 220, 220, 1058, 20519, 1925, 1670, 198, 31, 16775, 220, 1058, 88, 48055, 43, 220...
1.93913
115
#!/usr/bin/env python3 # adaptation du script FXCM pour XTB ## debug = 1 ## DEBUG ENABLED OR DISABLED from XTBApi.api import * import time import pandas as pd import datetime as dt import talib.abstract as ta ## Maths modules import pyti.bollinger_bands as bb from pyti.relative_strength_index import rela...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 16711, 7043, 4226, 19534, 24187, 12797, 1395, 22737, 198, 2235, 198, 24442, 796, 352, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 22492, 16959, 412, ...
2.733757
1,416
"""The InterUSS Platform Data Node storage API server. This flexible and distributed system is used to connect multiple USSs operating in the same general area to share safety information while protecting the privacy of USSs, businesses, operator and consumers. The system is focused on facilitating communication among...
[ 37811, 464, 4225, 32835, 19193, 6060, 19081, 6143, 7824, 4382, 13, 198, 198, 1212, 12846, 290, 9387, 1080, 318, 973, 284, 2018, 3294, 23116, 82, 5361, 198, 259, 262, 976, 2276, 1989, 284, 2648, 3747, 1321, 981, 10192, 262, 198, 13776, ...
3.679943
703
junk_image1 = b'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x01\xf4\x00\x00\x01v\x08\x00\x00\x00\x00\xbd\xc55\x85\x00\x00\x07\xcaIDATx\x01\xec\xd9m\xeb\xd2P\x1c\xc6\xf1\xff\xfb\x7f)g\xe1)oB\x0ef\x92\xe2\xcd\n\x94\xac\xa8\x19Ef\xa93l\xd8\xb4:n\xfe\xba\xda\xa6\xab\xe7\xff\'\x1e\xaf/x\xcdm\x0f?0\x06\xbb\xdb\xb2\x9b\xebn+...
[ 198, 73, 2954, 62, 9060, 16, 796, 275, 6, 59, 87, 4531, 47, 10503, 59, 81, 59, 77, 59, 87, 16, 64, 59, 77, 59, 87, 405, 59, 87, 405, 59, 87, 405, 59, 81, 40, 39, 7707, 59, 87, 405, 59, 87, 405, 59, 87, 486, 59, 26152, ...
1.272478
25,202
''' Given a non-empty string check if it can be constructed by taking a substring of it and appending multiple copies of the substring together. You may assume the given string consists of lowercase English letters only and its length will not exceed 10000. Example 1: Input: "abab" Output: True Explanation: It's the...
[ 7061, 6, 198, 15056, 257, 1729, 12, 28920, 4731, 2198, 611, 340, 460, 307, 12006, 416, 2263, 257, 3293, 1806, 286, 340, 290, 598, 1571, 3294, 9088, 286, 262, 3293, 1806, 1978, 13, 921, 743, 7048, 262, 1813, 4731, 10874, 286, 2793, 7...
3.483568
213
from django.shortcuts import render from django.views import View
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 42625, 14208, 13, 33571, 1330, 3582, 628 ]
3.941176
17
import browser import re import datetime from bs4 import BeautifulSoup, NavigableString RX_OCCUPATION = re.compile(r"([0-9]+)/([0-9]+)") RX_TIME = re.compile(r"([0-9]{2}:[0-9]{2})-([0-9]{2}:[0-9]{2})") RX_FULLDATE = re.compile(r"[a-z]{2} ([0-9]{2}) ([a-z]{3}) ([0-9]{4})") MONTHS = ["jan", "feb", "maa", "apr", "mei"...
[ 11748, 6444, 198, 11748, 302, 198, 11748, 4818, 8079, 198, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 11, 13244, 328, 540, 10100, 628, 198, 49, 55, 62, 46, 4093, 8577, 6234, 796, 302, 13, 5589, 576, 7, 81, 18109, 58, 15, 12, ...
1.869347
199
import numpy as np from sklearn.neighbors import NearestNeighbors import cv2 def stable_subsample(p): """ Geometrically Stable ICP Subsampling with constraints analysis Gelfand et al. 2003 http://www.people.vcu.edu/~dbandyop/pubh8472/Gelfand_SVC.pdf https://graphics.stanford.edu/papers/stabicp/stab...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 1341, 35720, 13, 710, 394, 32289, 1330, 3169, 12423, 46445, 32289, 198, 11748, 269, 85, 17, 198, 198, 4299, 8245, 62, 7266, 39873, 7, 79, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, ...
2.450867
173
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from . import ...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 17202, 39410, 25, 428, 2393, 373, 7560, 416, 262, 21624, 12994, 24118, 687, 10290, 357, 27110, 5235, 8, 16984, 13, 17202, 198, 2, 17202, 2141, 407, 4370, 416, 1021, 4556, 345, 821, 1728, 345, 760...
2.226415
1,219
import json import re import os import pkg_resources import zipfile import shutil import xml.etree.ElementTree as ET from django.conf import settings from django.template import Context, Template from webob import Response from xblock.core import XBlock from xblock.fields import Scope, String, Float, Boolean, Dict fr...
[ 11748, 33918, 198, 11748, 302, 198, 11748, 28686, 198, 11748, 279, 10025, 62, 37540, 198, 11748, 19974, 7753, 198, 11748, 4423, 346, 198, 11748, 35555, 13, 316, 631, 13, 20180, 27660, 355, 12152, 198, 198, 6738, 42625, 14208, 13, 10414, ...
3.103261
184
""" **Speech to Text (STT) engine** Converts the user speech (audio) into text. """ import threading import traceback import speech_recognition as sr from src import settings from src.core.modules import log, tts, replying def setup() -> None: """ Initializes the STT engine Steps: 1. Creates a...
[ 37811, 198, 1174, 5248, 3055, 284, 8255, 357, 2257, 51, 8, 3113, 1174, 198, 198, 3103, 24040, 262, 2836, 4046, 357, 24051, 8, 656, 2420, 13, 198, 37811, 198, 198, 11748, 4704, 278, 198, 11748, 12854, 1891, 198, 11748, 4046, 62, 26243,...
2.491543
1,951
from QrCode import * # Sert pour tester sur un mme pc la fois la gnration du QrCode et la lecture de celui ci if __name__ == '__main__': sync_other_device_QrCode() sync_this_device_QrCode()
[ 6738, 1195, 81, 10669, 1330, 1635, 198, 198, 2, 311, 861, 12797, 256, 7834, 969, 555, 285, 1326, 40653, 220, 8591, 277, 10924, 8591, 19967, 1358, 7043, 1195, 81, 10669, 2123, 8591, 19143, 390, 18725, 9019, 269, 72, 198, 361, 11593, 36...
2.584416
77
import unittest import sqlparse from sqlparse import tokens as T from sqlparse.sql import (Identifier, Statement, Token, TokenList) from context import ( extract_from_clause, extract_where_clause, tokenize) # , fused) from context import ( Query, Join, Tabl...
[ 11748, 555, 715, 395, 198, 198, 11748, 44161, 29572, 198, 6738, 44161, 29572, 1330, 16326, 355, 309, 198, 6738, 44161, 29572, 13, 25410, 1330, 357, 33234, 7483, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220,...
2.458824
170
# coding: utf-8 ''' name: PHPCMS v9.6.1 author: Anka9080 description: ''' import sys import requests import re if __name__ == "__main__": poc(sys.argv[1])
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 7061, 6, 198, 3672, 25, 9370, 5662, 5653, 410, 24, 13, 21, 13, 16, 220, 198, 9800, 25, 1052, 4914, 3829, 1795, 198, 11213, 25, 220, 198, 7061, 6, 198, 11748, 25064, 198, 11748, 7007, 198, 117...
2.236111
72
import re from utils.output import KeyValueOutput ERRORS_RE = [re.compile('Unhandled exception "(.*?)"'), re.compile('traceback', re.IGNORECASE), re.compile('w3af-crash'), re.compile('scan was able to continue by ignoring those'), re.compile('The scan will stop')] ...
[ 11748, 302, 198, 198, 6738, 3384, 4487, 13, 22915, 1330, 7383, 11395, 26410, 628, 198, 24908, 50, 62, 2200, 796, 685, 260, 13, 5589, 576, 10786, 3118, 38788, 6631, 30629, 15885, 10091, 30543, 828, 198, 220, 220, 220, 220, 220, 220, 22...
2.817021
235
#! /usr/bin/python3 # # Usage: # # path/to/script$ python3 __main__.py -c <config_file> # # Will create 'YYYY_MM_DD_STREAMNAME_PLAYLIST.txt' file # which will contain currently captured song # # HH:MM Interpret - Song Name # # To capture whole playlist you have to # make crontab scheldule or widows/mac equivalen...
[ 2, 0, 1220, 14629, 14, 8800, 14, 29412, 18, 198, 2, 198, 2, 29566, 25, 198, 2, 198, 2, 220, 220, 3108, 14, 1462, 14, 12048, 3, 21015, 18, 11593, 12417, 834, 13, 9078, 532, 66, 1279, 11250, 62, 7753, 29, 198, 2, 198, 2, 2561, ...
2.381788
1,823
# Problem Set 4B # Name: Gyalpo Dongo # Collaborators: # Time Spent: 9:00 # Late Days Used: 1 import string ### HELPER CODE ### def load_words(file_name): ''' file_name (string): the name of the file containing the list of words to load Returns: a list of valid words. Words are strings ...
[ 2, 20647, 5345, 604, 33, 201, 198, 2, 6530, 25, 18488, 282, 7501, 360, 25162, 201, 198, 2, 37322, 2024, 25, 201, 198, 2, 3862, 1338, 298, 25, 860, 25, 405, 201, 198, 2, 18319, 12579, 16718, 25, 352, 201, 198, 201, 198, 11748, 47...
2.648212
1,734
import cartography.intel.gcp.compute import tests.data.gcp.compute TEST_UPDATE_TAG = 123456789 def test_transform_and_load_vpcs(neo4j_session): """ Test that we can correctly transform and load VPC nodes to Neo4j. """ vpc_res = tests.data.gcp.compute.VPC_RESPONSE vpc_list = cartography.intel...
[ 11748, 6383, 4867, 13, 48779, 13, 70, 13155, 13, 5589, 1133, 198, 11748, 5254, 13, 7890, 13, 70, 13155, 13, 5589, 1133, 628, 198, 51, 6465, 62, 16977, 62, 42197, 796, 17031, 2231, 3134, 4531, 628, 628, 628, 198, 4299, 1332, 62, 3563...
1.970273
5,786
# Copyright 2020 Google LLC # # 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 writing, ...
[ 2, 15069, 12131, 3012, 11419, 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, 733...
2.478929
2,278
# coding: utf-8 # # Copyright 2022 :Barry-Thomas-Paul: Moss # # 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, 19617, 25, 3384, 69, 12, 23, 198, 2, 198, 2, 15069, 33160, 1058, 33, 6532, 12, 22405, 12, 12041, 25, 19935, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 4943, 198, 2, 345, 743,...
3.406844
263
""" Extraction utilities and supporting functions Some operations are used frequently or repeated enough to be factored out. Note that SQL can be used via the POORSQL_BINARY_PATH Download the binary from http://architectshack.com/PoorMansTSqlFormatter.ashx It's a phenominal utility that brilliantly normaliz...
[ 37811, 198, 197, 11627, 7861, 20081, 290, 6493, 5499, 628, 197, 4366, 4560, 389, 973, 6777, 393, 5100, 1576, 284, 307, 1109, 1850, 503, 13, 198, 197, 198, 197, 6425, 326, 16363, 460, 307, 973, 2884, 262, 19922, 1581, 17861, 62, 33, ...
2.906526
1,134
'''import sys import operator from Bio.Seq import Seq try: from Bio.Alphabet import generic_dna, IUPAC Bio_Alphabet = True except ImportError: Bio_Alphabet = None # usages of generic_dna, IUPAC are not supported in Biopython 1.78 (September 2020). print(f"The installed BioPython is a new version tha...
[ 7061, 6, 11748, 25064, 198, 11748, 10088, 198, 6738, 16024, 13, 4653, 80, 1330, 1001, 80, 198, 28311, 25, 198, 220, 220, 220, 422, 16024, 13, 2348, 19557, 1330, 14276, 62, 67, 2616, 11, 314, 8577, 2246, 198, 220, 220, 220, 16024, 62...
2.017809
3,313