content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
from django.shortcuts import render, get_object_or_404 from .models import Post, Group from .forms import PostForm from django.shortcuts import redirect
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 651, 62, 15252, 62, 273, 62, 26429, 198, 6738, 764, 27530, 1330, 2947, 11, 4912, 198, 6738, 764, 23914, 1330, 2947, 8479, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 18941, 628,...
3.714286
42
load( ":providers.bzl", "PrismaDataModel", "PrismaDataSource", "PrismaGenerator", ) prisma_schema = rule( implementation = _prisma_schema_impl, attrs = { "datamodels": attr.label_list( doc = "prisma_datamodel targets to include", mandatory = True, all...
[ 2220, 7, 198, 220, 220, 220, 366, 25, 15234, 4157, 13, 65, 48274, 1600, 198, 220, 220, 220, 366, 6836, 38017, 6601, 17633, 1600, 198, 220, 220, 220, 366, 6836, 38017, 6601, 7416, 1600, 198, 220, 220, 220, 366, 6836, 38017, 8645, 135...
1.991597
476
from types import SimpleNamespace from code.classification.kd_system import KDSystem if __name__ == '__main__': main() # temp_tuning() # alpha_tuning()
[ 6738, 3858, 1330, 17427, 36690, 10223, 198, 6738, 2438, 13, 4871, 2649, 13, 74, 67, 62, 10057, 1330, 509, 5258, 6781, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419, 198, 220, 220, ...
2.75
60
from manimlib.imports import * from manimlib.for_vivek_videos.array import Array from vivek.vid_0004_bubble_sort.stick_man import StickMan from vivek.vid_0004_bubble_sort.code import Code import random
[ 6738, 582, 320, 8019, 13, 320, 3742, 1330, 1635, 198, 6738, 582, 320, 8019, 13, 1640, 62, 85, 425, 74, 62, 32861, 13, 18747, 1330, 15690, 198, 6738, 410, 425, 74, 13, 16921, 62, 830, 19, 62, 46176, 903, 62, 30619, 13, 13915, 62, ...
2.84507
71
import numpy as np import multiprocessing as mp import gym import sys is_py2 = (sys.version[0] == '2') if is_py2: import Queue as queue else: import queue as queue
[ 11748, 299, 32152, 355, 45941, 198, 11748, 18540, 305, 919, 278, 355, 29034, 198, 11748, 11550, 198, 11748, 25064, 198, 271, 62, 9078, 17, 796, 357, 17597, 13, 9641, 58, 15, 60, 6624, 705, 17, 11537, 198, 361, 318, 62, 9078, 17, 25,...
2.6875
64
import math def area(base,height): """Return the area of a triangle with dimension base and height >>>are(10,20) 100.0 >>>area(3.4, 7.5) 12.75 """ return base * height/2 def perimeter(side1,side2,side3): '''(number, number, number)-> number ...
[ 11748, 10688, 198, 198, 4299, 1989, 7, 8692, 11, 17015, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 13615, 262, 1989, 286, 257, 22950, 351, 15793, 2779, 198, 220, 220, 220, 220, 220, 220, 220, 290, 6001, 198, 220, 220, 220,...
1.938144
679
import asyncio import functools def create_task(coro, *, name=None): """create_task that supports Python 3.6.""" if hasattr(asyncio, "create_task"): task = asyncio.create_task(coro) if name is not None and hasattr(task, "set_name"): task.set_name(name) return task else:...
[ 11748, 30351, 952, 198, 11748, 1257, 310, 10141, 628, 198, 4299, 2251, 62, 35943, 7, 10215, 78, 11, 1635, 11, 1438, 28, 14202, 2599, 198, 220, 220, 220, 37227, 17953, 62, 35943, 326, 6971, 11361, 513, 13, 21, 526, 15931, 198, 220, 2...
2.665685
679
#!/usr/bin/env python3 # coding: utf-8 # # $Id: plot_metrology.py 2937 2020-06-19 13:04:13Z ltaulell $ # SPDX-License-Identifier: BSD-2-Clause # """ POC/training graph metrology from CSV file (using test_ipmitool.py) """ import argparse # import numpy as np import pandas as pd import matplotlib.pyplot as plt import...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 2, 198, 2, 720, 7390, 25, 7110, 62, 4164, 31142, 13, 9078, 2808, 2718, 12131, 12, 3312, 12, 1129, 1511, 25, 3023, 25, 1485, 57, 300, 83, ...
2.335294
680
#!/usr/bin/env python # -*- encoding:utf-8 -*- """ Solution to Project Euler Problem 67 http://projecteuler.net/ by Apalala <apalala@gmail.com> (cc) Attribution-ShareAlike http://creativecommons.org/licenses/by-sa/3.0/ By starting at the top of the triangle below and moving to adjacent numbers on the row below, the...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 21004, 25, 40477, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 46344, 284, 4935, 412, 18173, 20647, 8275, 198, 4023, 1378, 16302, 68, 18173, 13, 3262, 14, 198, 198, 152...
3.039063
384
# Get input import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data
[ 2, 3497, 5128, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 11192, 273, 11125, 13, 1069, 12629, 13, 83, 44917, 82, 13, 10295, 396, 1330, 5128, 62, 7890, 628, 198 ]
3.129032
31
from builder import Builder from body import Body from wheel import Wheel from engine import Engine from car import Car
[ 6738, 27098, 1330, 35869, 198, 6738, 1767, 1330, 12290, 198, 6738, 7825, 1330, 15810, 198, 6738, 3113, 1330, 7117, 198, 6738, 1097, 1330, 1879, 628 ]
4.84
25
import idlib import rdflib from pyontutils import combinators as cmb from pyontutils.namespaces import TEMP, ilxtr from sparcur import datasets as dat from sparcur.core import OntTerm, OntId from sparcur.utils import log, logd from sparcur.config import auth
[ 11748, 4686, 8019, 198, 11748, 374, 67, 2704, 571, 198, 6738, 12972, 756, 26791, 1330, 1974, 47721, 355, 269, 2022, 198, 6738, 12972, 756, 26791, 13, 14933, 43076, 1330, 309, 39494, 11, 4229, 742, 81, 198, 6738, 599, 5605, 333, 1330, ...
3.2625
80
# -*- coding: utf-8 -*- import os, sys # env os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'djsapo.settings.shell') # required if using django models import django django.setup() from django.conf import settings from django.contrib.auth.models import Group, User from djsapo.core.models import Alert import argpars...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 28686, 11, 25064, 198, 2, 17365, 198, 418, 13, 268, 2268, 13, 2617, 12286, 10786, 35028, 1565, 11230, 62, 28480, 51, 20754, 62, 33365, 24212, 3256, 705, 67, ...
2.63252
615
""" Given an string print the reverse of the string using recursion """ print(recurr('saicharan'))
[ 37811, 198, 15056, 281, 4731, 3601, 262, 9575, 286, 262, 4731, 1262, 664, 24197, 198, 198, 37811, 628, 198, 198, 4798, 7, 8344, 333, 81, 10786, 11400, 488, 19173, 6, 4008, 198 ]
3.21875
32
""" Test utilities in pulsar.main """ from os.path import join from .test_utils import temp_directory from pulsar import main
[ 37811, 6208, 20081, 287, 22271, 283, 13, 12417, 37227, 198, 6738, 28686, 13, 6978, 1330, 4654, 198, 6738, 764, 9288, 62, 26791, 1330, 20218, 62, 34945, 198, 6738, 22271, 283, 1330, 1388, 628, 628, 628, 628, 628, 628, 198 ]
3.538462
39
from os.path import dirname, basename, isfile import glob modules = glob.glob(dirname(__file__) + "/*.py") modules = [basename(f)[:-3] for f in modules if all([isfile(f), f not in ['__init__', 'assigner', 'registry']])] __all__ = modules
[ 6738, 28686, 13, 6978, 1330, 26672, 3672, 11, 1615, 12453, 11, 318, 7753, 198, 11748, 15095, 198, 198, 18170, 796, 15095, 13, 4743, 672, 7, 15908, 3672, 7, 834, 7753, 834, 8, 1343, 12813, 24620, 9078, 4943, 198, 18170, 796, 685, 12093...
2.727273
88
""" Django settings for officeslotbooking project. Generated by 'django-admin startproject' using Django 3.2.7. For more information on this file, see https://docs.djangoproject.com/en/3.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.2/ref/settings/ """ im...
[ 37811, 198, 35, 73, 14208, 6460, 329, 9730, 26487, 2070, 278, 1628, 13, 198, 198, 8645, 515, 416, 705, 28241, 14208, 12, 28482, 923, 16302, 6, 1262, 37770, 513, 13, 17, 13, 22, 13, 198, 198, 1890, 517, 1321, 319, 428, 2393, 11, 76...
2.279781
2,745
#!/usr/bin/env python import random from Crypto.Util.number import * flag = open('flag.png', 'r').read() flag = bin(int(flag.encode('hex'), 16))[2:] r = random.randint(7, 128) s = random.randint(2, r) R = [random.randint(0, 1) for _ in xrange(r)] B = [i for i in xrange(s)] random.shuffle(B) A, enc = [], [] for i in...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 4738, 198, 6738, 36579, 13, 18274, 346, 13, 17618, 1330, 1635, 198, 198, 32109, 796, 1280, 10786, 32109, 13, 11134, 3256, 705, 81, 27691, 961, 3419, 198, 32109, 796, 9874, ...
2.225941
239
import re from google.appengine.api import urlfetch """Plugin infrastructure based on Marty Alchin's post at http://gulopine.gamemusic.org/2008/jan/10/simple-plugin-framework/ """ class Provider(object): """ Mount point for plugins which refer to actions that can be performed. Plugins implementing this re...
[ 11748, 302, 198, 6738, 23645, 13, 1324, 18392, 13, 15042, 1330, 2956, 1652, 7569, 198, 198, 37811, 37233, 6884, 1912, 319, 29876, 978, 24658, 338, 1281, 379, 198, 4023, 1378, 70, 377, 404, 500, 13, 28483, 368, 385, 291, 13, 2398, 14, ...
3.737255
255
import os from flask.cli import AppGroup, with_appcontext from luupsmap.cli.commands import SeedCommand, UpdateCommand from luupsmap import app, db from luupsmap.model import Venue, Location, Voucher, VoucherType, VoucherTag, Interval LINE_LENGTH = 25 data = AppGroup('data') @data.command('seed') @with_appcontext...
[ 11748, 28686, 198, 198, 6738, 42903, 13, 44506, 1330, 2034, 13247, 11, 351, 62, 1324, 22866, 198, 198, 6738, 300, 84, 4739, 8899, 13, 44506, 13, 9503, 1746, 1330, 23262, 21575, 11, 10133, 21575, 198, 6738, 300, 84, 4739, 8899, 1330, 5...
2.886364
176
# these fields should be described in function # Function Description: # Parameter: # Return # Value: # Exception Description: # Change History: def some_method(some): """ This is some incorrect description, but it does not have 3 proper fields, we should raise warning for this method """
[ 2, 777, 7032, 815, 307, 3417, 287, 2163, 198, 2, 15553, 12489, 25, 198, 2, 25139, 2357, 25, 198, 2, 8229, 198, 2, 11052, 25, 198, 2, 35528, 12489, 25, 198, 2, 9794, 7443, 25, 628, 198, 4299, 617, 62, 24396, 7, 11246, 2599, 198, ...
3.753086
81
import os from django.core.wsgi import get_wsgi_application if os.environ.get("DJANGO_SETTINGS_MODULE") == "config.settings.production": from raven.contrib.django.raven_compat.middleware.wsgi import Sentry # os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.production") application = get_wsgi_appli...
[ 11748, 28686, 198, 6738, 42625, 14208, 13, 7295, 13, 18504, 12397, 1330, 651, 62, 18504, 12397, 62, 31438, 198, 198, 361, 28686, 13, 268, 2268, 13, 1136, 7203, 35028, 1565, 11230, 62, 28480, 51, 20754, 62, 33365, 24212, 4943, 6624, 366,...
2.859873
157
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-05-11 11:59 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 1157, 319, 2177, 12, 2713, 12, 1157, 1367, 25, 3270, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738...
2.791045
67
# # Generated with PositioningElementBlueprint from dmt.blueprint import Blueprint from dmt.dimension import Dimension from dmt.attribute import Attribute from dmt.enum_attribute import EnumAttribute from dmt.blueprint_attribute import BlueprintAttribute from sima.sima.blueprints.namedobject import NamedObjectBlueprin...
[ 2, 220, 198, 2, 2980, 515, 351, 23158, 278, 20180, 14573, 4798, 198, 6738, 288, 16762, 13, 17585, 4798, 1330, 39932, 198, 6738, 288, 16762, 13, 46156, 1330, 34024, 198, 6738, 288, 16762, 13, 42348, 1330, 3460, 4163, 198, 6738, 288, 16...
3.823529
102
import unittest from pthat.pthat import Axis if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 6738, 279, 5562, 13, 79, 5562, 1330, 38349, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3419, 198 ]
2.567568
37
import feedparser import listparser import json import argparse from bs4 import BeautifulSoup from datetime import datetime import subprocess as sp import time import schedule import os import tempfile from output_helper import OutputHelper from cache_helper import CacheHelper TermRSS()
[ 11748, 3745, 48610, 198, 11748, 1351, 48610, 198, 11748, 33918, 198, 11748, 1822, 29572, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 850, 14681, 355, 599, 198, 11748, 640, 198, 11...
3.918919
74
import json import pytest @pytest.mark.django_db @pytest.mark.django_db @pytest.mark.django_db @pytest.mark.django_db
[ 11748, 33918, 198, 11748, 12972, 9288, 628, 198, 31, 9078, 9288, 13, 4102, 13, 28241, 14208, 62, 9945, 198, 198, 31, 9078, 9288, 13, 4102, 13, 28241, 14208, 62, 9945, 628, 198, 31, 9078, 9288, 13, 4102, 13, 28241, 14208, 62, 9945, 6...
2.290909
55
# -*- coding: utf-8 -*- """ Created on Sat Jun 30 19:45:21 2018 @author: Nagasudhir https://stackoverflow.com/questions/10138085/python-pylab-plot-normal-distribution We are going to create a timeline with x axis as date and y axis as the scatter plot of the timestamps where the change in freq is greater than a thre...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 7031, 7653, 1542, 678, 25, 2231, 25, 2481, 2864, 198, 198, 31, 9800, 25, 15196, 292, 463, 71, 343, 198, 5450, 1378, 25558, 2502, 11125, 13, 785...
3.221374
131
import os import sys from deep_dss.helpers import * from deep_dss.models import * import numpy as np from deepsphere.data import LabeledDataset # Run on GPU. os.environ["CUDA_VISIBLE_DEVICES"] = "0" config = sys.argv[1] channels = total_channels(config) order = 2 lr = float(sys.argv[2]) num_epochs = int(sys.argv[...
[ 11748, 28686, 198, 11748, 25064, 198, 198, 6738, 2769, 62, 67, 824, 13, 16794, 364, 1330, 1635, 198, 6738, 2769, 62, 67, 824, 13, 27530, 1330, 1635, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 2769, 2777, 1456, 13, 7890, 1330,...
2.381188
202
data = [ {'v': 'v0.1', 't': 1391}, {'v': 'v0.1', 't': 1394}, {'v': 'v0.1', 't': 1300}, {'v': 'v0.1', 't': 1321}, {'v': 'v0.1.3', 't': 1491}, {'v': 'v0.1.3', 't': 1494}, {'v': 'v0.1.3', 't': 1400}, {'v': 'v0.1.3', 't': 1421}, {'v': 'v0.1.2', 't': 1291}, {'v': 'v0.1.2', 't': 1294},...
[ 7890, 796, 685, 198, 220, 220, 220, 1391, 6, 85, 10354, 705, 85, 15, 13, 16, 3256, 705, 83, 10354, 1511, 6420, 5512, 198, 220, 220, 220, 1391, 6, 85, 10354, 705, 85, 15, 13, 16, 3256, 705, 83, 10354, 1511, 5824, 5512, 198, 220, ...
1.538324
561
"""Module that contains callable server functions.""" from pyramid.view import view_config from learning_journal.models.mymodel import Entry @view_config(route_name="home", renderer="learning_journal:templates/journal_entries.jinja2") def list_view(request): """Function that generates list of journal entries.""" ...
[ 37811, 26796, 326, 4909, 869, 540, 4382, 5499, 526, 15931, 198, 6738, 27944, 13, 1177, 1330, 1570, 62, 11250, 198, 6738, 4673, 62, 24891, 13, 27530, 13, 1820, 19849, 1330, 21617, 628, 198, 31, 1177, 62, 11250, 7, 38629, 62, 3672, 2625...
2.5074
946
import numpy as np # ---------------------------------------------------INPUTS -------------------------------------------- input_dir = '../../data/network_detection/' allfile_name = input_dir+'uniquestart_sorted_no_duplicates.txt' outfile_name = input_dir+'7sta_2stathresh_FinalUniqueNetworkDetectionTimes.txt' n_sta =...
[ 11748, 299, 32152, 355, 45941, 198, 198, 2, 20368, 1783, 6329, 1268, 30076, 50, 20368, 10541, 198, 15414, 62, 15908, 796, 705, 40720, 40720, 7890, 14, 27349, 62, 15255, 3213, 14, 6, 198, 439, 7753, 62, 3672, 796, 5128, 62, 15908, 10, ...
2.434557
2,315
''' Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example, this binary tree [1,2,2,3,4,4,3] is symmetric: 1 / \ 2 2 / \ / \ 3 4 4 3 But the following [1,2,2,null,3,null,3] is not: 1 / \ 2 2 \ \ 3 3 ''' # recursive #itera...
[ 7061, 6, 198, 15056, 257, 13934, 5509, 11, 2198, 1771, 340, 318, 257, 10162, 286, 2346, 357, 494, 11, 23606, 19482, 1088, 663, 3641, 737, 198, 198, 1890, 1672, 11, 428, 13934, 5509, 685, 16, 11, 17, 11, 17, 11, 18, 11, 19, 11, 1...
2.152542
177
import logging import os import time import h5py import numpy as np from scipy.sparse import coo_matrix, csr_matrix from implicit.datasets import _download log = logging.getLogger("implicit") URL = "https://github.com/benfred/recommender_data/releases/download/v1.0/lastfm_360k.hdf5" def get_lastfm(): """Retu...
[ 11748, 18931, 198, 11748, 28686, 198, 11748, 640, 198, 198, 11748, 289, 20, 9078, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 13, 82, 29572, 1330, 763, 78, 62, 6759, 8609, 11, 269, 27891, 62, 6759, 8609, 198, 198, 6...
2.808841
837
# Copyright 2015: Mirantis Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
[ 2, 15069, 1853, 25, 7381, 20836, 3457, 13, 198, 2, 1439, 6923, 33876, 13, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 220, 407, ...
2.761307
398
import os, asyncio import config, mongo, tweetClient, democratic import discord from discord.ext import commands from dotenv import load_dotenv from datetime import datetime load_dotenv() TOKEN = os.getenv('DISCORD_TOKEN') bot = commands.Bot(command_prefix='!') @bot.command(name='plznuke') @bot.command(name='tweet'...
[ 11748, 28686, 11, 30351, 952, 198, 11748, 4566, 11, 285, 25162, 11, 6126, 11792, 11, 10518, 198, 11748, 36446, 198, 6738, 36446, 13, 2302, 1330, 9729, 198, 6738, 16605, 24330, 1330, 3440, 62, 26518, 24330, 198, 6738, 4818, 8079, 1330, 4...
2.680744
1,397
from ._RedisTransformer import RedisTransformer
[ 6738, 47540, 7738, 271, 8291, 16354, 1330, 2297, 271, 8291, 16354, 198 ]
4
12
#!/usr/bin/env python3 from datetime import datetime import sys #our timestamping function, accurate to milliseconds #(remove [:-3] to display microseconds)
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 25064, 198, 198, 2, 454, 41033, 278, 2163, 11, 7187, 284, 38694, 198, 2, 7, 28956, 685, 21912, 18, 60, 284, 3359, 4580, 43012...
3.533333
45
from uuid import uuid4 from pydantic import BaseModel, Field
[ 6738, 334, 27112, 1330, 334, 27112, 19, 198, 198, 6738, 279, 5173, 5109, 1330, 7308, 17633, 11, 7663, 628 ]
3.315789
19
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe import unittest
[ 2, 15069, 357, 66, 8, 1853, 11, 39313, 27768, 21852, 18367, 83, 13, 12052, 13, 290, 25767, 669, 198, 2, 17168, 13789, 13, 4091, 5964, 13, 14116, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 11748, 5306, 27768,...
3.5625
48
#The svm class uses the package CVXOPT, Python Software for Convex Optimization, that is not part of the standard python, #but is included in Anaconda for example. import numpy as np import warnings #Everything else is imported locally when needed ######################################################################...
[ 2, 464, 264, 14761, 1398, 3544, 262, 5301, 26196, 55, 3185, 51, 11, 11361, 10442, 329, 1482, 303, 87, 30011, 1634, 11, 326, 318, 407, 636, 286, 262, 3210, 21015, 11, 220, 198, 2, 4360, 318, 3017, 287, 1052, 330, 13533, 329, 1672, ...
2.374264
1,189
#Faça um programa que peça ao usuário para digitar 10 #valores e some-os. valores=[] for c in range(0,10): n=int(input("Informe um numero: ")) valores.append(n) print(f"A somas dos valores eh {sum(valores)}")
[ 2, 50110, 50041, 23781, 1430, 64, 8358, 613, 50041, 257, 78, 514, 84, 6557, 27250, 31215, 3100, 7940, 838, 220, 198, 2, 2100, 2850, 304, 617, 12, 418, 13, 198, 198, 2100, 2850, 28, 21737, 198, 198, 1640, 269, 287, 2837, 7, 15, 11,...
2.291667
96
from starutil_numpy import ra2hms, dec2dms # RA,Dec in degrees def sdss_name(ra, dec): ''' Returns the SDSS name, JHHMMSS.ss+DDMMSS.s >>> print sdss_name(15, 1) J010000.00+010000.0 >>> print sdss_name(0, 0) J000000.00+000000.0 >>> print sdss_name(0, 1./3600) J000000.00+000001.0 ...
[ 6738, 3491, 22602, 62, 77, 32152, 1330, 2179, 17, 71, 907, 11, 875, 17, 67, 907, 198, 198, 2, 17926, 11, 10707, 287, 7370, 198, 4299, 45647, 824, 62, 3672, 7, 430, 11, 875, 2599, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220...
1.98688
686
import logging import sys import torch import torch.nn as nn logging.basicConfig(stream=sys.stdout, level=logging.INFO) log = logging.getLogger(__name__) # class NonLinearMultiHeadDecoder(nn.Module): # def __init__(self, ks, output_size, bias=False, # hidden_size=512, hidden_activation=nn.ReLU()...
[ 11748, 18931, 198, 11748, 25064, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 198, 6404, 2667, 13, 35487, 16934, 7, 5532, 28, 17597, 13, 19282, 448, 11, 1241, 28, 6404, 2667, 13, 10778, 8, 198, 6404, 796, 18931,...
2.102362
508
import tweepy import time from haiku_model import * class TwitterAPI: """An object class for to create our Haiku bot using Twitter API""" def tweet(self, message): """A method to send Tweets""" self.api.update_status(status=message) def tweet_haiku(): """A function to tweet haikus""" ...
[ 11748, 4184, 538, 88, 198, 11748, 640, 198, 6738, 387, 28643, 62, 19849, 1330, 1635, 628, 198, 4871, 3009, 17614, 25, 198, 220, 220, 220, 37227, 2025, 2134, 1398, 329, 284, 2251, 674, 9398, 28643, 10214, 1262, 3009, 7824, 37811, 628, ...
2.652695
167
#Python3 #Algoritmo utilizando la definición de pascal para crear un triángulo ##### DEFINICIONES ##### #Definición para colocar numeros en triangulo de pascal #Definicion para contablilizar el numero de filas para el triangulo #Se crea la definición para crear el triángulo de pascal el cual contempla #un tr...
[ 2, 37906, 18, 198, 2, 2348, 7053, 270, 5908, 7736, 528, 25440, 8591, 2730, 44070, 18840, 390, 279, 27747, 31215, 1126, 283, 555, 1333, 6557, 782, 43348, 198, 198, 4242, 2, 220, 197, 197, 197, 7206, 20032, 2149, 2849, 1546, 220, 197, ...
2.525097
259
import dataset import pickle from uuid import uuid4 import json with open('plugins.pickle', 'rb') as f: plugins = pickle.load(f) with open('users.pickle', 'rb') as f: users = pickle.load(f) db=dataset.connect("sqlite:///plugs.db") usersdb=db.get_table("Users", primary_id="uuid", primary_type="String(36)") pl...
[ 11748, 27039, 198, 11748, 2298, 293, 198, 6738, 334, 27112, 1330, 334, 27112, 19, 198, 11748, 33918, 198, 198, 4480, 1280, 10786, 37390, 13, 27729, 293, 3256, 705, 26145, 11537, 355, 277, 25, 198, 220, 220, 220, 20652, 796, 2298, 293, ...
2.438596
399
import ctk import os import qt import slicer import string import unittest import vtk from builtins import range from slicer.ScriptedLoadableModule import *
[ 11748, 269, 30488, 198, 11748, 28686, 198, 11748, 10662, 83, 198, 11748, 14369, 263, 198, 11748, 4731, 198, 11748, 555, 715, 395, 198, 11748, 410, 30488, 198, 6738, 3170, 1040, 1330, 2837, 198, 6738, 14369, 263, 13, 7391, 276, 8912, 540...
3.425532
47
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Apr 4 14:46:29 2019 @author: linux """ # Functions #importing some useful packages import matplotlib.pyplot as plt import matplotlib.image as mpimg import numpy as np import cv2 # for list of images #%matplotlib inline #!clear #read Image # n Imag...
[ 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, 26223, 2758, 220, 604, 1478, 25, 3510, 25, 1959, 13130, 198, 198, 31, 9800, 25, 32639, 19...
2.121059
793
import time
[ 11748, 640 ]
5.5
2
import openpnm as op if __name__ == '__main__': t = CubicDualTest() t.setup_class() self = t for item in t.__dir__(): if item.startswith('test'): print('running test: '+item) t.__getattribute__(item)()
[ 11748, 1280, 79, 21533, 355, 1034, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 628, 220, 220, 220, 256, 796, 7070, 291, 36248, 14402, 3419, 198, 220, 220, 220, 256, 13, 40406, 62, 4871, 3419, 198, 220, 2...
2.081967
122
import foauth.providers from oauthlib.oauth1.rfc5849 import SIGNATURE_TYPE_QUERY
[ 11748, 11511, 18439, 13, 15234, 4157, 198, 6738, 267, 18439, 8019, 13, 12162, 1071, 16, 13, 81, 16072, 3365, 2920, 1330, 36771, 40086, 62, 25216, 62, 10917, 19664, 628 ]
2.827586
29
# -*- coding: utf-8 -*- import re import sys import json from nltk.tokenize import sent_tokenize sentences = [] with open(sys.argv[1], 'r') as f: for line in f: record = json.loads(line) title = re.sub('\s+', ' ', record['title'].strip()) abstract = re.sub('\s+', ' ', record['abstract'].s...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 302, 198, 11748, 25064, 198, 11748, 33918, 198, 6738, 299, 2528, 74, 13, 30001, 1096, 1330, 1908, 62, 30001, 1096, 198, 198, 34086, 3007, 796, 17635, 198, 19...
2.287037
216
import scipy.spatial import scipy.stats import copy import math import pandas as pd import numpy as np
[ 11748, 629, 541, 88, 13, 2777, 34961, 201, 198, 11748, 629, 541, 88, 13, 34242, 201, 198, 11748, 4866, 201, 198, 11748, 10688, 201, 198, 11748, 19798, 292, 355, 279, 67, 201, 198, 11748, 299, 32152, 355, 45941, 201 ]
2.769231
39
""" Authors: Amin Arriaga, Eduardo Lopez Project: Graduation Thesis: GIAdog This file contains the code . Reference: ---------- """ from bezier_FTG import Bezier_curves_FTG from base_FTG import Base_FTG from gamma_FTG import Gamma_FTG import numpy as np from math import remainder from __...
[ 37811, 198, 220, 220, 220, 46665, 25, 39869, 27350, 8126, 11, 40766, 13109, 22593, 198, 220, 220, 220, 4935, 25, 17701, 2288, 383, 13429, 25, 30616, 2782, 519, 628, 220, 220, 220, 770, 2393, 4909, 262, 2438, 764, 198, 220, 220, 220, ...
1.695838
2,571
from unittest.mock import MagicMock, patch import pandas as pd import pytest from sklearn import pipeline from sklearn.naive_bayes import GaussianNB from sklearn.preprocessing import StandardScaler from v6_carrier_py import master ID = 1 TRIES = 1 MOCK_TASK = {'id': ID} IDENTIFIER_KEYS = ['GBAGeboorteJaar', 'GBAGebo...
[ 6738, 555, 715, 395, 13, 76, 735, 1330, 6139, 44, 735, 11, 8529, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 12972, 9288, 198, 6738, 1341, 35720, 1330, 11523, 198, 6738, 1341, 35720, 13, 2616, 425, 62, 24406, 274, 1330, 1...
2.04902
510
#---------------------------------------------------------------------------------------- # AUTHOR : AbdulShabazz # # DESCRIPTION : Z3Prover is a propositional logic theorem prover which tests a sentences SATISFIABILITY # This library will be used to validate the stability of the PC game # # Proof : GAME_OVER => Rhovi...
[ 198, 2, 10097, 22369, 198, 2, 44746, 1058, 23547, 2484, 397, 8101, 198, 2, 198, 2, 22196, 40165, 1058, 1168, 18, 2964, 332, 318, 257, 4218, 1859, 9156, 44728, 386, 332, 543, 5254, 257, 13439, 29020, 1797, 37, 3539, 25382, 198, 2, 77...
3.084699
366
# -*- coding: utf-8 *-* from stack import Stack from queue import Queue import time class SimpleGraph(object): """Python implementation of the simple graph structure.""" def __init__(self): """SimpleGraph constructor.""" self._graph_content = {} def nodes(self): """Return a list ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 1635, 12, 9, 198, 6738, 8931, 1330, 23881, 198, 6738, 16834, 1330, 4670, 518, 198, 11748, 640, 628, 198, 4871, 17427, 37065, 7, 15252, 2599, 198, 220, 220, 220, 37227, 37906, 7822, 286, ...
2.262495
2,381
# -*- coding: utf-8 -*- import pandas as pd import numpy as np import re import pickle import os with open('data/patent_df.pkl','rb') as f: df = pickle.load(f) #%% Doc2Vec 기반 문서 유사도 import pandas , nltk from gensim.models.doc2vec import Doc2Vec, TaggedDocument from nltk.tokenize import ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 201, 198, 201, 198, 11748, 19798, 292, 355, 279, 67, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 302, 201, 198, 11748, 2298, 293, 201, 198, 11748, 2...
1.974405
2,774
""" Constants and other config variables used throughout the AOTA module Copyright (C) 2017-2022 Intel Corporation SPDX-License-Identifier: Apache-2.0 """
[ 37811, 198, 220, 220, 220, 4757, 1187, 290, 584, 4566, 9633, 973, 3690, 262, 317, 29009, 8265, 628, 220, 220, 220, 15069, 357, 34, 8, 2177, 12, 1238, 1828, 8180, 10501, 198, 220, 220, 220, 30628, 55, 12, 34156, 12, 33234, 7483, 25, ...
3.294118
51
import pandas as pd la_df=pd.read_csv("LA_Crime_Data_from_2010_to_Present.csv") #print(la_df.head()) la_vc = la_df["Crime Code Description"].value_counts() #print(la_vc) pd.DataFrame(la_vc).to_csv("crime_types_la_1.csv")
[ 11748, 19798, 292, 355, 279, 67, 198, 5031, 62, 7568, 28, 30094, 13, 961, 62, 40664, 7203, 13534, 62, 45580, 62, 6601, 62, 6738, 62, 10333, 62, 1462, 62, 34695, 13, 40664, 4943, 198, 2, 4798, 7, 5031, 62, 7568, 13, 2256, 28955, 19...
2.326316
95
""" Installs and configures an OpenStack Client """ import logging from packstack.modules.common import filtered_hosts from packstack.modules.ospluginutils import (getManifestTemplate, appendManifestFile) # Controller object will be initialized from main flow controller =...
[ 37811, 198, 6310, 5691, 290, 4566, 942, 281, 4946, 25896, 20985, 198, 37811, 198, 198, 11748, 18931, 198, 198, 6738, 2353, 25558, 13, 18170, 13, 11321, 1330, 29083, 62, 4774, 82, 198, 6738, 2353, 25558, 13, 18170, 13, 418, 33803, 26791,...
2.786667
150
"""baseline Revision ID: fe12dc8feb82 Revises: Create Date: 2021-01-19 23:42:00.695822 """ from alembic import op import sqlalchemy as sa revision = 'fe12dc8feb82' down_revision = None branch_labels = None depends_on = None
[ 37811, 12093, 4470, 198, 198, 18009, 1166, 4522, 25, 730, 1065, 17896, 23, 69, 1765, 6469, 198, 18009, 2696, 25, 220, 198, 16447, 7536, 25, 33448, 12, 486, 12, 1129, 2242, 25, 3682, 25, 405, 13, 3388, 3365, 1828, 198, 198, 37811, 19...
2.4375
96
from .jwt import JwtProvider
[ 6738, 764, 73, 46569, 1330, 449, 46569, 29495, 198 ]
3.222222
9
from django.apps import AppConfig
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
3.888889
9
''' Object classes for characters in explorer created 2019-03-19 by NGnius''' import random NEXT_INT = 0 MAX_LEVEL = 42 ''' Non-abstract classes ''' # enemies # friendlies
[ 7061, 6, 198, 10267, 6097, 329, 3435, 287, 39349, 198, 198, 25598, 13130, 12, 3070, 12, 1129, 416, 39058, 77, 3754, 7061, 6, 198, 198, 11748, 4738, 198, 198, 45, 13918, 62, 12394, 796, 657, 198, 22921, 62, 2538, 18697, 796, 5433, 19...
2.825397
63
import pickle import sys obj = list(range(10000)) print(GetMemoryUsage(obj))
[ 11748, 2298, 293, 198, 11748, 25064, 198, 198, 26801, 796, 1351, 7, 9521, 7, 49388, 4008, 198, 198, 4798, 7, 3855, 30871, 28350, 7, 26801, 4008, 198 ]
2.925926
27
from opendc.models.authorization import Authorization from opendc.models.user import User from opendc.util import exceptions from opendc.util.rest import Response def GET(request): """Get this User's Authorizations.""" # Make sure required parameters are there try: request.check_required_paramet...
[ 6738, 1034, 437, 66, 13, 27530, 13, 9800, 1634, 1330, 35263, 198, 6738, 1034, 437, 66, 13, 27530, 13, 7220, 1330, 11787, 198, 6738, 1034, 437, 66, 13, 22602, 1330, 13269, 198, 6738, 1034, 437, 66, 13, 22602, 13, 2118, 1330, 18261, 6...
2.784404
436
#from flask import Flask # #app = Flask(__name__, static_folder = 'static') #application = app # #if __name__ == '__main__': # app.run() from isikacek import views
[ 198, 198, 2, 6738, 42903, 1330, 46947, 198, 2, 198, 2, 1324, 796, 46947, 7, 834, 3672, 834, 11, 9037, 62, 43551, 796, 705, 12708, 11537, 198, 2, 31438, 796, 598, 198, 2, 198, 2, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, ...
2.65625
64
'''Provides Information on SBML Kinetics Laws''' from src.common import constants as cn from src.common import util from src.common import exceptions import collections import numpy as np import libsbml import zipfile
[ 7061, 6, 15946, 1460, 6188, 319, 18056, 5805, 16645, 14596, 21153, 7061, 6, 628, 198, 6738, 12351, 13, 11321, 1330, 38491, 355, 269, 77, 198, 6738, 12351, 13, 11321, 1330, 7736, 198, 6738, 12351, 13, 11321, 1330, 13269, 198, 198, 11748,...
3.827586
58
import os import sys import time import threading import time from os import system if os.name == 'nt': import win32com.client as wincl import pythoncom # from gtts import gTTS # from tempfile import TemporaryFile, NamedTemporaryFile # utility functions is_profiling = False last_profile_point = False ...
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 640, 198, 198, 11748, 4704, 278, 198, 11748, 640, 198, 6738, 28686, 1330, 1080, 628, 198, 361, 28686, 13, 3672, 6624, 705, 429, 10354, 198, 220, 220, 220, 1330, 1592, 2624, 785, 13, 16366, ...
3.653846
182
""" Abelian Monoid Elements AUTHORS: - David Kohel (2005-09) EXAMPLES: Recall the example from abelian monoids:: sage: F = FreeAbelianMonoid(5,names = list("abcde")) sage: (a,b,c,d,e) = F.gens() sage: a*b^2*e*d a*b^2*d*e sage: x = b^2*e*d*a^7 sage: x a^7*b^2*d*e sage: x.list() [...
[ 37811, 198, 4826, 417, 666, 2892, 1868, 26632, 198, 198, 32, 24318, 20673, 25, 198, 198, 12, 3271, 17634, 2978, 357, 14315, 12, 2931, 8, 198, 198, 6369, 2390, 6489, 1546, 25, 198, 198, 6690, 439, 262, 1672, 422, 450, 417, 666, 937, ...
2.59847
523
from flask_restful import Resource, reqparse from flask_jwt import jwt_required from models.utilisateur import Utilisateur import datetime
[ 6738, 42903, 62, 2118, 913, 1330, 20857, 11, 43089, 29572, 198, 6738, 42903, 62, 73, 46569, 1330, 474, 46569, 62, 35827, 198, 6738, 4981, 13, 22602, 271, 15093, 1330, 7273, 346, 271, 15093, 198, 11748, 4818, 8079, 198 ]
3.657895
38
#!/usr/bin/env python3 import astar from enum import Enum def solve_missionaries_cannibals_prob(): """ Solves the Missionaries and Canibals problem. The state is encoded by counting the number of missionaries and canibals on the left (final) bank. The location of the boat is also tracked by a 1 or 0...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 6468, 283, 198, 6738, 33829, 1330, 2039, 388, 628, 198, 4299, 8494, 62, 3411, 3166, 62, 66, 1236, 571, 874, 62, 1676, 65, 33529, 198, 220, 220, 220, 37227, 198, 220, ...
2.068327
1,405
import datetime
[ 11748, 4818, 8079, 628 ]
4.25
4
# Licensed to Modin Development Team under one or more contributor license agreements. # See the NOTICE file distributed with this work for additional information regarding # copyright ownership. The Modin Development Team licenses this file to you under the # Apache License, Version 2.0 (the "License"); you may not u...
[ 2, 49962, 284, 3401, 259, 7712, 4816, 739, 530, 393, 517, 18920, 5964, 11704, 13, 198, 2, 4091, 262, 28536, 2393, 9387, 351, 428, 670, 329, 3224, 1321, 5115, 198, 2, 6634, 9238, 13, 220, 383, 3401, 259, 7712, 4816, 16625, 428, 2393,...
2.27319
2,749
from Configurables import DaVinci DaVinci().DataType = '2012' DaVinci().Simulation = True DaVinci().TupleFile = 'mc.root' from Configurables import LHCbApp LHCbApp().CondDBtag = "sim-20130522-1-vc-md100" LHCbApp().DDDBtag = "dddb-20130829-1"
[ 6738, 17056, 333, 2977, 1330, 9637, 53, 259, 979, 198, 198, 26531, 53, 259, 979, 22446, 6601, 6030, 796, 705, 6999, 6, 198, 26531, 53, 259, 979, 22446, 8890, 1741, 796, 6407, 198, 198, 26531, 53, 259, 979, 22446, 51, 29291, 8979, 79...
2.352381
105
# -*- coding: utf-8 -*- """ wakadump.cli ~~~~~~~~~~~~ Command-line entry point. :copyright: (c) 2015 Alan Hamlett. :license: BSD, see LICENSE for more details. """ import click import simplejson as json import traceback from .__about__ import __version__ from .compat import import_module @c...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 220, 220, 220, 266, 461, 324, 931, 13, 44506, 198, 220, 220, 220, 220, 15116, 8728, 628, 220, 220, 220, 9455, 12, 1370, 5726, 966, 13, 628, 220, 220, 220...
2.686441
236
from discord.ext.commands import Cog from discord.ext import commands from discord.player import FFmpegOpusAudio from youtube_dl import YoutubeDL import os
[ 6738, 36446, 13, 2302, 13, 9503, 1746, 1330, 327, 519, 198, 6738, 36446, 13, 2302, 1330, 9729, 198, 6738, 36446, 13, 7829, 1330, 18402, 43913, 18257, 385, 21206, 198, 6738, 35116, 62, 25404, 1330, 27431, 19260, 198, 11748, 28686, 628, 1...
3.853659
41
"""Console script for dicom_wsi.""" import argparse import sys import logging import pydicom import os from PIL import Image def extract_imagepatches_dicom(dicom_file, image_dir): '''Pydicom help:https://pydicom.github.io/pydicom/stable/old/getting_started.html''' '''Pydicom object from input DICOM file''' ...
[ 37811, 47581, 4226, 329, 288, 291, 296, 62, 86, 13396, 526, 15931, 198, 11748, 1822, 29572, 198, 11748, 25064, 198, 11748, 18931, 198, 11748, 279, 5173, 291, 296, 198, 11748, 28686, 198, 6738, 350, 4146, 1330, 7412, 198, 198, 4299, 7925...
2.396425
951
#!usr/bin/python # -*- coding:utf8 -*- import yaml with open('data.yaml', 'r', encoding='utf8') as f: # results = f.read() # print('results={}'.format(results)) # 直接使用load方法,会有方法弃用警告信息,不影响读取数据操作 # 如果要关闭,可以使用Loader=yaml.FullLoader关闭警告 # results = yaml.load(f) results = yaml.load(f, Loader=yaml....
[ 2, 0, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 40477, 23, 532, 9, 12, 198, 11748, 331, 43695, 628, 198, 4480, 1280, 10786, 7890, 13, 88, 43695, 3256, 705, 81, 3256, 21004, 11639, 40477, 23, 11537, 355, 277, 25, ...
1.685106
470
__version__ = '2.8.1' # Links to documentation to use over the project sources DOCS_LINK = "https://shub.readthedocs.io/en/stable/" DEPLOY_DOCS_LINK = DOCS_LINK + "deploying.html#deploying-dependencies" CONFIG_DOCS_LINK = DOCS_LINK + "configuration.html"
[ 834, 9641, 834, 796, 705, 17, 13, 23, 13, 16, 6, 628, 198, 2, 21691, 284, 10314, 284, 779, 625, 262, 1628, 4237, 198, 38715, 50, 62, 43, 17248, 796, 366, 5450, 1378, 1477, 549, 13, 961, 83, 704, 420, 82, 13, 952, 14, 268, 14, ...
2.519608
102
from .. utils.code import isCodeValid, getSyntaxError, containsStarImport from . compile_scripts import compileScript from .. problems import ExecutionUnitNotSetup from . code_generator import getSocketValueExpression, iterSetupCodeLines, getInitialVariables userCodeStartComment = "# User Code"
[ 6738, 11485, 3384, 4487, 13, 8189, 1330, 318, 10669, 47139, 11, 651, 13940, 41641, 12331, 11, 4909, 8248, 20939, 198, 6738, 764, 17632, 62, 46521, 1330, 17632, 7391, 198, 6738, 11485, 2761, 1330, 37497, 26453, 3673, 40786, 198, 6738, 764,...
4.082192
73
from gaphor import UML from gaphor.UML.states.pseudostates import PseudostateItem def test_history_pseudostate(create): """Test creation of initial pseudostate.""" item = create(PseudostateItem, UML.Pseudostate) # history setting is done in the DiagramToolbox factory: item.subject.kind = "shallowHist...
[ 6738, 308, 6570, 273, 1330, 471, 5805, 198, 6738, 308, 6570, 273, 13, 52, 5805, 13, 27219, 13, 7752, 463, 455, 689, 1330, 49693, 463, 455, 378, 7449, 628, 198, 198, 4299, 1332, 62, 23569, 62, 7752, 463, 455, 378, 7, 17953, 2599, 1...
2.876923
130
import sys; sys.path.insert(0, '.') from aiohttp import web from covador.aiohttp import query_string, json_body, form, params, args if __name__ == '__main__': main()
[ 11748, 25064, 26, 25064, 13, 6978, 13, 28463, 7, 15, 11, 705, 2637, 8, 198, 6738, 257, 952, 4023, 1330, 3992, 198, 198, 6738, 39849, 7079, 13, 64, 952, 4023, 1330, 12405, 62, 8841, 11, 33918, 62, 2618, 11, 1296, 11, 42287, 11, 264...
2.712121
66
""" .. /------------------------------------------------------------------------------\ | -- FACADE TECHNOLOGIES INC. CONFIDENTIAL -- | |------------------------------------------------------------------------------| | ...
[ 37811, 198, 492, 198, 197, 14, 10097, 26171, 59, 198, 197, 91, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1377, 44216, 19266, 44999, 45, 33462, 11015, 19387, 13, 220, 7102, 37, 25256, 12576, 1377...
2.658636
5,147
import os MYSQL_USER = os.environ.get("MYSQL_USER") MYSQL_PASSWORD = os.environ.get( "MYSQL_ROOT_PASSWORD" ) # using the ROOT User Password for Local Tests MYSQL_DATABASE = os.environ.get("MYSQL_DATABASE") MYSQL_HOST = os.environ.get("MYSQL_HOST") MYSQL_TCP_PORT = os.environ.get("MYSQL_TCP_PORT") MYSQL_DB_IS_AVAI...
[ 11748, 28686, 198, 198, 44, 16309, 9711, 62, 29904, 796, 28686, 13, 268, 2268, 13, 1136, 7203, 44, 16309, 9711, 62, 29904, 4943, 198, 44, 16309, 9711, 62, 47924, 54, 12532, 796, 28686, 13, 268, 2268, 13, 1136, 7, 198, 220, 220, 220,...
1.798054
411
import random import requests from metadrive._requests import get_session from metadrive import utils
[ 11748, 4738, 198, 11748, 7007, 198, 198, 6738, 1138, 324, 11590, 13557, 8897, 3558, 1330, 651, 62, 29891, 198, 6738, 1138, 324, 11590, 1330, 3384, 4487, 198 ]
3.814815
27
"""Code example for one-dimensional input data.""" # Sample data points from normal distribution. from numpy.random import normal x = normal(size=1000) # Estimate density within ±5 standard deviations. from kde_diffusion import kde1d (density, grid, bandwidth) = kde1d(x, n=256, limits=5) # Calculate actua...
[ 171, 119, 123, 37811, 10669, 1672, 329, 530, 12, 19577, 5128, 1366, 526, 15931, 201, 198, 201, 198, 2, 27565, 1366, 2173, 422, 3487, 6082, 13, 201, 198, 6738, 299, 32152, 13, 25120, 1330, 3487, 201, 198, 87, 796, 3487, 7, 7857, 28, ...
2.929461
241
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack.package import * class Tesseract(AutotoolsPackage): """Tesseract Open Source OCR Engine.""" homepage...
[ 2, 15069, 2211, 12, 1238, 1828, 13914, 45036, 3549, 2351, 4765, 11, 11419, 290, 584, 198, 2, 1338, 441, 4935, 34152, 13, 4091, 262, 1353, 12, 5715, 27975, 38162, 9947, 2393, 329, 3307, 13, 198, 2, 198, 2, 30628, 55, 12, 34156, 12, ...
1.996619
1,183
#!/usr/bin/env python # Python Network Programming Cookbook -- Chapter - 9 # This program is optimized for Python 2.7. # It may run on any other version with/without modifications. import os from scapy.all import * pkts = [] count = 0 pcapnum = 0 if __name__ == '__main__': print "Started packet capturing and dum...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 11361, 7311, 30297, 8261, 2070, 1377, 7006, 532, 860, 198, 2, 770, 1430, 318, 23392, 329, 11361, 362, 13, 22, 13, 198, 2, 632, 743, 1057, 319, 597, 584, 2196, 351, 14, 19419, 19...
3.053846
130
import sys import requests from io import StringIO __all__ = ('cached_property', 'raise_for_status_with_body') class cached_property: """ Decorator that turns an instance method into a cached property From https://speakerdeck.com/u/mitsuhiko/p/didntknow, slide #69 """ __NOT_SET = object() def rais...
[ 11748, 25064, 198, 11748, 7007, 198, 198, 6738, 33245, 1330, 10903, 9399, 198, 198, 834, 439, 834, 796, 19203, 66, 2317, 62, 26745, 3256, 705, 40225, 62, 1640, 62, 13376, 62, 4480, 62, 2618, 11537, 628, 198, 4871, 39986, 62, 26745, 25...
2.496764
618
# # OtterTune - analysis/gprc.py # # Copyright (c) 2017-18, Carnegie Mellon University Database Group # # Author: Dana Van Aken from __future__ import absolute_import import tensorflow as tf from gpflow import settings from gpflow.decors import autoflow, name_scope, params_as_tensors from gpflow.models import GPR
[ 2, 198, 2, 19740, 353, 51, 1726, 532, 3781, 14, 70, 1050, 66, 13, 9078, 198, 2, 198, 2, 15069, 357, 66, 8, 2177, 12, 1507, 11, 33976, 49808, 2059, 24047, 4912, 198, 2, 198, 2, 6434, 25, 22937, 6656, 317, 3464, 198, 198, 6738, ...
3.212121
99
# Generated by Django 2.0.3 on 2018-04-23 05:44 from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 362, 13, 15, 13, 18, 319, 2864, 12, 3023, 12, 1954, 8870, 25, 2598, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, 9945, 13, 27530, 13, 2934, 1616, 295, ...
2.818182
44
import numpy as np import pysc2.lib.features as features from Models.BuildNetwork.BuildingTerranQueue import BuildingTerranQueue from Models.BuildNetwork.BuildingNeutral import BuildingsNeutral """ The class is a wrapper class for the State of the building location which checks the environment and places...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 279, 28349, 17, 13, 8019, 13, 40890, 355, 3033, 198, 6738, 32329, 13, 15580, 26245, 13, 25954, 15156, 2596, 34991, 1330, 11819, 15156, 2596, 34991, 198, 6738, 32329, 13, 15580, 26245, 13, 25954, ...
3.71875
96
import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable from utils.box_utils import match, log_sum_exp class MultiBoxLoss(nn.Module): """SSD Weighted Loss Function Compute Targets: 1) Produce Confidence Target Indices by matching ground truth boxes ...
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 6738, 28034, 13, 2306, 519, 6335, 1330, 35748, 198, 6738, 3384, 4487, 13, 3524, 62, 26791, 1330, 2872, 11, 2604, 62, 163...
2.2386
2,829
#!/bin/python3 import math import os import random import re import sys # Complete the twoStrings function below. if __name__ == '__main__': # fptr = open(os.environ['OUTPUT_PATH'], 'w') q = int(input()) for q_itr in range(q): s1 = input() s2 = input() result = twoStrings(s...
[ 2, 48443, 8800, 14, 29412, 18, 198, 198, 11748, 10688, 198, 11748, 28686, 198, 11748, 4738, 198, 11748, 302, 198, 11748, 25064, 198, 198, 2, 13248, 262, 734, 13290, 654, 2163, 2174, 13, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705,...
2.19774
177
import os import sys """ Convert all data to a single file. """ all_pairs= ['ca-it', 'ca-oc', 'ca-ro', 'ca-en', 'ca-fr', 'ca-pt', 'ca-es', 'en-it' 'en-oc' 'en-ro' 'es-it' 'es-oc' 'es-ro' 'fr-it' 'fr-oc' 'fr-ro'] if __name__ == '__main__': root_path = sys.argv[1] lang_pair = sys.argv[2]...
[ 11748, 28686, 198, 11748, 25064, 198, 198, 37811, 198, 220, 220, 220, 38240, 477, 1366, 284, 257, 2060, 2393, 13, 198, 37811, 198, 198, 439, 62, 79, 3468, 28, 37250, 6888, 12, 270, 3256, 705, 6888, 12, 420, 3256, 705, 6888, 12, 305,...
2.007082
706
''' only for RRP Hopper Shihao Feng 2021.10.28 ''' import pybullet as p import numpy as np from leg_kinematics import LegKinematicsRRP
[ 7061, 6, 198, 8807, 329, 371, 20031, 9544, 2848, 198, 2484, 72, 23778, 18164, 198, 1238, 2481, 13, 940, 13, 2078, 198, 7061, 6, 198, 198, 11748, 12972, 15065, 1616, 355, 279, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 1232, 62, ...
2.360656
61
from Classes.Enums.EventTypes import EventTypes import json
[ 6738, 38884, 13, 4834, 5700, 13, 9237, 31431, 1330, 8558, 31431, 198, 11748, 33918, 628 ]
4.066667
15