content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="choixpeau", version="0.0.9", author="Keurcien Luu", author_email="keurcien@appchoose.io", description="Efficiently assign users to buckets.", long_description=long_description, lon...
[ 11748, 900, 37623, 10141, 198, 198, 4480, 1280, 7203, 15675, 11682, 13, 9132, 1600, 366, 81, 4943, 355, 277, 71, 25, 198, 220, 220, 220, 890, 62, 11213, 796, 277, 71, 13, 961, 3419, 198, 198, 2617, 37623, 10141, 13, 40406, 7, 198, ...
2.5
266
#================================ # RESEARCH GROUP PROJECT [RGP] #================================ # This file is part of the COMP3096 Research Group Project. # System import logging # Gym Imports import gym from gym.spaces import Box, Discrete, Tuple # PySC2 Imports from pysc2.lib.actions import FUNCTIONS, Function...
[ 2, 10052, 198, 2, 15731, 17133, 3398, 44441, 21965, 23680, 685, 49, 16960, 60, 198, 2, 10052, 198, 2, 770, 2393, 318, 636, 286, 262, 24301, 1270, 4846, 4992, 4912, 4935, 13, 198, 198, 2, 4482, 198, 11748, 18931, 198, 198, 2, 31187, ...
3.273256
172
""" Initialize an authenticated instance of PRAW to interact with. $ python -i initialize_session.py """ from ttrv.docs import AGENT from ttrv.packages import praw from ttrv.content import RequestHeaderRateLimiter from ttrv.config import Config config = Config() config.load_refresh_token() reddit = praw.Reddit( ...
[ 37811, 198, 24243, 1096, 281, 44529, 4554, 286, 350, 20530, 284, 9427, 351, 13, 198, 198, 3, 21015, 532, 72, 41216, 62, 29891, 13, 9078, 198, 37811, 198, 6738, 256, 2213, 85, 13, 31628, 1330, 13077, 3525, 198, 6738, 256, 2213, 85, 1...
2.895522
268
""" Example on how to plot a Skew-T plot of a sounding -------------------------------------------------- This example shows how to make a Skew-T plot from a sounding and calculate stability indicies. METPy needs to be installed in order to run this example """ import act from matplotlib import pyplot as plt try:...
[ 37811, 198, 16281, 319, 703, 284, 7110, 257, 19460, 86, 12, 51, 7110, 286, 257, 22655, 198, 47232, 438, 198, 198, 1212, 1672, 2523, 703, 284, 787, 257, 19460, 86, 12, 51, 7110, 422, 257, 22655, 198, 392, 15284, 10159, 2699, 444, 13,...
2.507813
384
import sys predotarOutput(sys.argv[1],sys.argv[2])
[ 11748, 25064, 198, 198, 28764, 313, 283, 26410, 7, 17597, 13, 853, 85, 58, 16, 4357, 17597, 13, 853, 85, 58, 17, 12962, 198 ]
2.166667
24
""" Author: Sarah Masud Copyright (c): Sarah Masud """ import json import numpy as np from datetime import datetime, timedelta import os import sys main_dir = os.path.join("data", "reddit_data") with open(os.path.join(main_dir, "selected_discussion_nov.jsonlist"), "r") as f: data = f.readlines() n = len...
[ 37811, 198, 13838, 25, 10490, 11066, 463, 198, 15269, 357, 66, 2599, 10490, 11066, 463, 198, 37811, 198, 198, 11748, 33918, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 11748, 28686, ...
2.07565
1,269
# Generated by Django 2.2.4 on 2019-10-06 15:46 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 19, 319, 13130, 12, 940, 12, 3312, 1315, 25, 3510, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
from ibslib.io import aims_extractor __author__='Manny Bier' def extract(struct_dir, extractor="aims", extractor_kwargs={}): """ Purpose is to extract information from a specific direcoty format. For example, extract FHI-aims calculation directories to a Structure json file. ...
[ 628, 198, 6738, 24283, 6649, 571, 13, 952, 1330, 12031, 62, 2302, 40450, 198, 198, 834, 9800, 834, 11639, 44, 7737, 347, 959, 6, 198, 198, 4299, 7925, 7, 7249, 62, 15908, 11, 7925, 273, 2625, 1385, 82, 1600, 7925, 273, 62, 46265, ...
2.572222
360
from sqlalchemy.orm import scoped_session as ss
[ 6738, 44161, 282, 26599, 13, 579, 1330, 629, 19458, 62, 29891, 355, 37786, 628 ]
3.5
14
import re typ='Extra stings Hello 2134567 World_This is a Regex Demo Extra stings' result = re.search('(Extra) stings Hello 2134567 (.*) is a Regex Demo Extra (.*)',typ ,re.S) print(result.group(1,2,3)) # type="submit" id="su" value="百度一下" class="bg s_btn"></span><span class="tools"><span id="mHolder"><div id="mCon"><...
[ 11748, 302, 198, 28004, 11639, 27726, 336, 654, 18435, 28658, 2231, 3134, 2159, 62, 1212, 318, 257, 797, 25636, 34588, 17221, 336, 654, 6, 198, 20274, 796, 302, 13, 12947, 10786, 7, 27726, 8, 336, 654, 18435, 28658, 2231, 3134, 357, 1...
2.524823
141
import io import sys from typing import List from hstest.dynamic.input.dynamic_input_func import DynamicTestFunction, DynamicInputFunction from hstest.dynamic.input.input_mock import InputMock
[ 11748, 33245, 198, 11748, 25064, 198, 6738, 19720, 1330, 7343, 198, 198, 6738, 289, 301, 395, 13, 67, 28995, 13, 15414, 13, 67, 28995, 62, 15414, 62, 20786, 1330, 26977, 14402, 22203, 11, 26977, 20560, 22203, 198, 6738, 289, 301, 395, ...
3.482143
56
import rx from rx import operators as ops import operator def demo_starmap(): '''tuple unpacking''' a = rx.of(1, 2, 3, 4) b = rx.of(2, 2, 4, 4) a.pipe( ops.zip(b), ops.starmap(operator.mul) ).subscribe(print) if __name__ == '__main__': #demo_zip() demo_starmap()
[ 11748, 374, 87, 198, 6738, 374, 87, 1330, 12879, 355, 39628, 198, 11748, 10088, 198, 198, 4299, 13605, 62, 301, 1670, 499, 33529, 198, 220, 220, 220, 705, 7061, 83, 29291, 8593, 5430, 7061, 6, 198, 220, 220, 220, 220, 198, 220, 220,...
1.950311
161
import unittest from cloudwanderer import URN from ..helpers import CloudWandererCalls, ExpectedCall, MultipleResourceScenario, NoMotoMock, SingleResourceScenario
[ 11748, 555, 715, 395, 198, 198, 6738, 6279, 86, 392, 11882, 1330, 37902, 45, 198, 198, 6738, 11485, 16794, 364, 1330, 10130, 54, 392, 11882, 34, 5691, 11, 1475, 7254, 14134, 11, 20401, 26198, 3351, 39055, 11, 1400, 44, 2069, 44, 735, ...
3.458333
48
import os from flask import Flask, json, Response, request, render_template, send_file, jsonify, send_from_directory from werkzeug.utils import secure_filename import requests from flask_cors import CORS from datetime import datetime import torch import torch.nn.functional as F import numpy as np import json import to...
[ 198, 11748, 28686, 198, 6738, 42903, 1330, 46947, 11, 33918, 11, 18261, 11, 2581, 11, 8543, 62, 28243, 11, 3758, 62, 7753, 11, 33918, 1958, 11, 3758, 62, 6738, 62, 34945, 198, 6738, 266, 9587, 2736, 1018, 13, 26791, 1330, 5713, 62, ...
2.287793
3,162
from aiogram import types from aiogram.dispatcher.filters.builtin import CommandStart from loader import dp @dp.message_handler(CommandStart())
[ 6738, 257, 72, 21857, 1330, 3858, 198, 6738, 257, 72, 21857, 13, 6381, 8071, 2044, 13, 10379, 1010, 13, 18780, 259, 1330, 9455, 10434, 198, 198, 6738, 40213, 1330, 288, 79, 628, 198, 31, 26059, 13, 20500, 62, 30281, 7, 21575, 10434, ...
3.340909
44
import unittest from pytextgame.colors import * from pytextgame.displays import Displays from pytextgame.geometry import * from pytextgame.window import Window if __name__ == '__main__': unittest.main()
[ 198, 11748, 555, 715, 395, 198, 6738, 12972, 5239, 6057, 13, 4033, 669, 1330, 1635, 198, 6738, 12972, 5239, 6057, 13, 6381, 26024, 1330, 3167, 26024, 198, 6738, 12972, 5239, 6057, 13, 469, 15748, 1330, 1635, 198, 6738, 12972, 5239, 6057...
3.072464
69
# Copyright 2018 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, soft...
[ 2, 15069, 2864, 3012, 11419, 198, 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, 7330, 2...
3.293059
389
#! /usr/bin/env python3 # -*- coding: utf-8 -*- red='\033[31m' reset='\033[0m' s = "[€€€éä] nice " + red + "colors" + reset + '!\n' print(s) #import tempfile #fd, path = tempfile.mkstemp() #print fd, path """ tmpf = os.fdopen(fd, 'w') try: with as tmp: # do stuff with temp file tmp.write('st...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 628, 198, 445, 11639, 59, 44427, 58, 3132, 76, 6, 198, 42503, 11639, 59, 44427, 58, 15, 76, 6, 198, 198, 82, 796...
2.171975
314
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import logging from gmprocess.subcommands.lazy_loader import LazyLoader arg_dicts = LazyLoader( 'arg_dicts', globals(), 'gmprocess.subcommands.arg_dicts') base = LazyLoader('base', globals(), 'gmprocess.subcommands.base') distributed = LazyLoader('distribute...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 28686, 198, 11748, 18931, 198, 198, 6738, 308, 76, 14681, 13, 7266, 9503, 1746, 13, 75, 12582, 62, 29356, ...
2.334405
622
import pandas as pd import math import cv2 import numpy as np import matplotlib import random from bestguess.bestguess import BestGuessModule, MODEL_CHANNELS from stochastic_optimizer import BestChangeLayer # matplotlib.use('agg') import matplotlib.pyplot as plt import time import torch import torch.nn as nn import ...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 10688, 198, 198, 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 198, 11748, 4738, 198, 198, 6738, 1266, 5162, 408, 13, 13466, 5162, 408, 1330, 6705, ...
2.516667
420
import copy import numpy as np from sparse_dot_mkl import dot_product_mkl from utils import MIN_FLOAT from IPython import embed #def raw_overlap(node, constraint, num_points):
[ 11748, 4866, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 29877, 62, 26518, 62, 28015, 75, 1330, 16605, 62, 11167, 62, 28015, 75, 198, 198, 6738, 3384, 4487, 1330, 20625, 62, 3697, 46, 1404, 198, 198, 6738, 6101, 7535, 1330, 11...
3.033333
60
""" Name: InsanityNet Last Date Edited: 18-Feb-2022 Description: Imperial and Metric conversion. Feet and Inches to Meters OR Meters to Feet and Inches Requirements: fractions.Fraction function built into Python3 Known Issues: 1. Negative Feet and Positive Inches. I can't be bothered to fix it at 11 ...
[ 37811, 198, 5376, 25, 7088, 19689, 7934, 198, 5956, 7536, 34212, 25, 1248, 12, 15146, 12, 1238, 1828, 198, 198, 11828, 25, 198, 220, 220, 220, 11773, 290, 3395, 1173, 11315, 13, 198, 220, 220, 220, 43391, 290, 554, 2052, 284, 3395, ...
3.052045
1,076
# Authors: # Trevor Perrin # Moxie Marlinspike # # See the LICENSE file for legal information regarding use of this file. import sys from tack.version import __version__ from tack.commands.Command import Command from tack.commands.GenerateKeyCommand import GenerateKeyCommand from tack.commands.SignCommand import ...
[ 2, 46665, 25, 220, 198, 2, 220, 220, 25389, 2448, 12769, 198, 2, 220, 220, 337, 1140, 494, 38134, 79, 522, 198, 2, 198, 2, 4091, 262, 38559, 24290, 2393, 329, 2742, 1321, 5115, 779, 286, 428, 2393, 13, 198, 198, 11748, 25064, 198,...
3.767442
129
import serial from .serial_mock.serial import Serial as SerialMock from time import sleep DELAY_BETWEEN_MESSAGES = 0.05
[ 11748, 11389, 198, 6738, 764, 46911, 62, 76, 735, 13, 46911, 1330, 23283, 355, 23283, 44, 735, 198, 6738, 640, 1330, 3993, 198, 198, 35, 3698, 4792, 62, 33, 2767, 8845, 1677, 62, 44, 1546, 4090, 48075, 796, 657, 13, 2713, 628 ]
2.904762
42
from collections import Collection import altair as alt import pandas as pd def histogram(x, data, opacity=1., maxbins=30, color=None, padding=0,): """Display a histogram. Parameters ---------- x : str value to be binned data : pandas.DataFrame dataframe containing x opacity ...
[ 6738, 17268, 1330, 12251, 198, 198, 11748, 5988, 958, 355, 5988, 198, 11748, 19798, 292, 355, 279, 67, 628, 198, 4299, 1554, 21857, 7, 87, 11, 1366, 11, 45912, 28, 16, 1539, 3509, 65, 1040, 28, 1270, 11, 3124, 28, 14202, 11, 24511, ...
2.265424
3,971
"""A client to OWL.""" from typing import Optional from indra.databases.owl_client import OwlClient _client = OwlClient('ido') def get_ido_name_from_ido_id(ido_id: str) -> Optional[str]: """Return the HP name corresponding to the given HP ID. Parameters ---------- ido_id : The IDO identifi...
[ 37811, 32, 5456, 284, 47210, 43, 526, 15931, 198, 198, 6738, 19720, 1330, 32233, 198, 198, 6738, 773, 430, 13, 19608, 18826, 13, 4883, 62, 16366, 1330, 37007, 11792, 198, 198, 62, 16366, 796, 37007, 11792, 10786, 17305, 11537, 628, 198,...
2.70997
331
# Python solution for 'max diff - easy' codewars question. # Level: 7 kyu # Tags: FUNDAMENTALS, MATHEMATICS, ALGORITHMS, NUMBERS, COLLECTIONS, LISTS, DATA STRUCTURES, AND ARRAYS. # Author: Jack Brokenshire # Date: 16/07/2020 import unittest def max_diff(lst): """ Finds the difference beteween the largest and...
[ 2, 11361, 4610, 329, 705, 9806, 814, 532, 2562, 6, 14873, 413, 945, 1808, 13, 198, 2, 5684, 25, 767, 479, 24767, 198, 2, 44789, 25, 29397, 35, 2390, 3525, 23333, 11, 337, 12599, 3620, 1404, 19505, 11, 8355, 38, 1581, 10554, 5653, ...
2.742188
256
from PyQt5.QtCore import QDataStream, QIODevice, QObject, QByteArray, pyqtSignal from PyQt5.QtCore import * from PyQt5.QtWidgets import QApplication, QDialog, QMainWindow, QLineEdit, QPushButton, QVBoxLayout from PyQt5.QtWidgets import * from PyQt5.QtNetwork import QTcpSocket, QAbstractSocket from PyQt5.QtNetwork impor...
[ 6738, 9485, 48, 83, 20, 13, 48, 83, 14055, 1330, 1195, 6601, 12124, 11, 1195, 40, 3727, 1990, 501, 11, 1195, 10267, 11, 1195, 40778, 19182, 11, 12972, 39568, 11712, 282, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 14055, 1330, 1635, ...
2.443038
237
# from __future__ import absolute_import # from __future__ import division from __future__ import print_function import os import glob import numpy as np from PIL import Image import cv2 if __name__ == '__main__': main()
[ 2, 422, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 2, 422, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 28686, 198, 11748, 15095, 198, 11748, 299, 32152, 355, 45941, 198, 6738, ...
3.304348
69
import csv, os os.chdir('C:\\Users\\tomas\\Desktop\\Multi-Side Flashcard Project\\Sentences from Tatoeba\\') csv_handle = open("jpn_sentences.tsv",'r') csv_read = csv.reader(csv_handle, delimiter="\t") csvList = list(csv_read) #print(len(csvList)) #print(f"Row 1, column 3: {csvList[0][2]}",f"Row 1, column 1: {csv...
[ 11748, 269, 21370, 11, 28686, 201, 198, 418, 13, 354, 15908, 10786, 34, 25, 6852, 14490, 6852, 83, 16911, 6852, 36881, 6852, 29800, 12, 24819, 9973, 9517, 4935, 6852, 31837, 3007, 422, 309, 5549, 1765, 64, 6852, 11537, 201, 198, 40664, ...
2.178427
1,233
import numpy as np import chainer import chainer.functions as F from chainer import initializers from chainer import variable class Normalize(chainer.Link): """Learnable L2 normalization [#]_. This link normalizes input along the channel axis and scales it. The scale factors are trained channel-wise. ...
[ 11748, 299, 32152, 355, 45941, 198, 198, 11748, 6333, 263, 198, 11748, 6333, 263, 13, 12543, 2733, 355, 376, 198, 6738, 6333, 263, 1330, 4238, 11341, 198, 6738, 6333, 263, 1330, 7885, 628, 198, 4871, 14435, 1096, 7, 7983, 263, 13, 112...
2.43633
534
#!/usr/bin/python2.4 # Small script to show PostgreSQL and Pyscopg together # import json import psycopg2 import sys match_id = sys.argv[1] match_id = 2125002095 conn = psycopg2.connect("dbname='postgres' user='petergleixner' host='localhost' password=''") cursor = conn.cursor() cursor.execute('''SELECT replay_file F...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 17, 13, 19, 198, 2, 10452, 4226, 284, 905, 2947, 47701, 290, 350, 893, 22163, 70, 1978, 198, 2, 198, 198, 11748, 33918, 198, 11748, 17331, 22163, 70, 17, 198, 11748, 25064, 198, 198, 15699, 62, ...
2.371528
576
import pandas as pd import numpy as np import operator import warnings from ml.analysis.hypothesis_testing import HypothesisTester class HTestAutoPilot: """ Chooses what is the most adequate hypothesis test for a given dataset, based on its datatypes and the assumptions of each test """ @staticme...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 10088, 198, 11748, 14601, 198, 6738, 25962, 13, 20930, 13, 36362, 313, 8497, 62, 33407, 1330, 21209, 313, 8497, 51, 7834, 628, 198, 4871, 7154, 395, 27722,...
1.939811
8,274
""" Initial migration Revision ID: 4defdf508e78 Revises: (none) Create Date: 2021-10-19 20:14:59.350979 """ from alembic import op import sqlalchemy as sa from url_shortener.database.functions import utc_now # revision identifiers, used by Alembic. revision = '4defdf508e78' down_revision = None branch_labels = Non...
[ 37811, 198, 24243, 13472, 198, 198, 18009, 1166, 4522, 25, 604, 4299, 7568, 33042, 68, 3695, 198, 18009, 2696, 25, 357, 23108, 8, 198, 16447, 7536, 25, 33448, 12, 940, 12, 1129, 1160, 25, 1415, 25, 3270, 13, 14877, 24, 3720, 198, 37...
2.780488
123
# -*- coding: utf-8 -*- """ Created on Mon Dec 17 16:25:07 2018 @author: Albert """ import pandas as pd import numpy as np df = pd.read_csv("./PreprocessedDataFiles/MergedPreprocessedDataFiles/MergedPreprocessedDrinkingDataLabels v2.csv") # originalDF = df df['index'] = range(0, len(df)) splitRatio = [0.6,0.2,0.2] ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 2892, 4280, 1596, 1467, 25, 1495, 25, 2998, 2864, 198, 198, 31, 9800, 25, 9966, 198, 37811, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 2...
2.431472
197
import functools import inspect import six from doubles.call_count_accumulator import CallCountAccumulator from doubles.exceptions import MockExpectationError, VerifyingBuiltinDoubleArgumentError import doubles.lifecycle from doubles.verification import verify_arguments _any = object() class Allowance(object):...
[ 11748, 1257, 310, 10141, 198, 11748, 10104, 198, 198, 11748, 2237, 198, 198, 6738, 21938, 13, 13345, 62, 9127, 62, 4134, 388, 8927, 1330, 4889, 12332, 17320, 388, 8927, 198, 6738, 21938, 13, 1069, 11755, 1330, 44123, 3109, 806, 341, 123...
2.481454
4,071
import tensorflow as tf from network.ConvBlock import conv2d_bn
[ 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 3127, 13, 3103, 85, 12235, 1330, 3063, 17, 67, 62, 9374, 628, 198 ]
3.142857
21
# myapp/models.py from myapp import db # define model here
[ 2, 616, 1324, 14, 27530, 13, 9078, 198, 6738, 616, 1324, 1330, 20613, 198, 198, 2, 8160, 2746, 994, 198 ]
3
20
#!/usr/bin/env python import argparse import logging import os import sys from distutils.spawn import find_executable from subprocess import call if __name__ == '__main__': logging.basicConfig(format='%(message)s', level=logging.INFO, stream=sys.stdout) sys.exit(run_tests(parse_args()))
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 1822, 29572, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 6738, 1233, 26791, 13, 48183, 1330, 1064, 62, 18558, 18187, 198, 6738, 850, 14681, 1330, 869, ...
2.932692
104
# encoding: UTF-8 from vnpy.trader import vtConstant from okcoinGateway import OkcoinGateway gatewayClass = OkcoinGateway gatewayName = 'OKEX' gatewayDisplayName = u'OkEx' gatewayType = vtConstant.GATEWAYTYPE_BTC gatewayQryEnabled = True
[ 2, 21004, 25, 41002, 12, 23, 198, 198, 6738, 410, 77, 9078, 13, 2213, 5067, 1330, 410, 83, 3103, 18797, 198, 6738, 12876, 3630, 22628, 1014, 1330, 6762, 3630, 22628, 1014, 198, 198, 10494, 1014, 9487, 796, 6762, 3630, 22628, 1014, 198...
2.802326
86
# -*- coding: utf-8 -*- import collections
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 17268, 628, 628, 198 ]
2.4
20
from lolviz import * import time import os import psutil def search(root:TrieNode, s:str, i=0) -> bool: "Return true if s is prefix of word in Trie or full word in Trie" p = root while p is not None: if i>=len(s): return True e = ord(s[i]) - ord('a') if p.edges[e] is None: return ...
[ 6738, 19462, 85, 528, 1330, 1635, 198, 11748, 640, 198, 11748, 28686, 198, 11748, 26692, 22602, 628, 198, 198, 4299, 2989, 7, 15763, 25, 51, 5034, 19667, 11, 264, 25, 2536, 11, 1312, 28, 15, 8, 4613, 20512, 25, 198, 220, 220, 220, ...
2.415761
368
# Copyright 2019 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from collections import defaultdict def _validate_runtime_features_graph(features): """ Raises AssertionError when sanity check failed. @param...
[ 2, 15069, 13130, 383, 18255, 1505, 46665, 13, 1439, 2489, 10395, 13, 198, 2, 5765, 286, 428, 2723, 2438, 318, 21825, 416, 257, 347, 10305, 12, 7635, 5964, 326, 460, 307, 198, 2, 1043, 287, 262, 38559, 24290, 2393, 13, 198, 198, 6738...
2.537
1,000
Birds_year0 = 100 Birth_rate = 0.5 Death_rate = 0.2 # We repeat the "for" loop with an additional step: every time bird population reaches 1000, an epidemic kills half of them Time=[0] Birds=[100] for year in range (1,51) : Birds = Birds + [Birds[-1] + Birds[-1] * Birth_rate - Birds[-1] * Death_rate ] ...
[ 33, 11049, 62, 1941, 15, 796, 1802, 220, 201, 198, 38480, 62, 4873, 796, 657, 13, 20, 201, 198, 20148, 62, 4873, 796, 657, 13, 17, 201, 198, 2, 775, 9585, 262, 366, 1640, 1, 9052, 351, 281, 3224, 2239, 25, 790, 640, 6512, 3265, ...
2.292969
256
# -*- coding: utf-8 -*- """ Created on Fri Dec 6 00:06:55 2019 @author: - """ import pandas as pd import numpy as np from matplotlib import pyplot as plt import os from datetime import datetime from gensim import corpora, models, similarities from nltk.tokenize import RegexpTokenizer from nltk.corpus i...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 41972, 319, 19480, 4280, 220, 718, 3571, 25, 3312, 25, 2816, 13130, 201, 198, 201, 198, 31, 9800, 25, 532, 201, 198, 37811, 201, 198, 201, 198, ...
2.651445
1,073
from getpass import getpass from django.contrib.auth import get_user_model from django.core.management.base import BaseCommand from django.db.utils import IntegrityError UserModel = get_user_model() USERNAME_DEFAULT = "player" class Command(BaseCommand): """Create the player special user.""" help = "Creat...
[ 6738, 651, 6603, 1330, 651, 6603, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 651, 62, 7220, 62, 19849, 198, 6738, 42625, 14208, 13, 7295, 13, 27604, 13, 8692, 1330, 7308, 21575, 198, 6738, 42625, 14208, 13, 9945, 13...
2.224518
1,452
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: ga4gh/schemas/ga4gh/genotype_phenotype_service.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from goog...
[ 2, 2980, 515, 416, 262, 8435, 11876, 17050, 13, 220, 8410, 5626, 48483, 0, 198, 2, 2723, 25, 31986, 19, 456, 14, 1416, 4411, 292, 14, 4908, 19, 456, 14, 5235, 8690, 62, 31024, 8690, 62, 15271, 13, 1676, 1462, 198, 198, 11748, 2506...
2.396204
10,275
import os, logging from typing import Any from dotenv import load_dotenv from supabase import create_client, Client from headlinenews import RSSParser from postgrest_py import exceptions
[ 11748, 28686, 11, 18931, 198, 6738, 19720, 1330, 4377, 198, 6738, 16605, 24330, 1330, 3440, 62, 26518, 24330, 198, 6738, 7418, 5754, 1330, 2251, 62, 16366, 11, 20985, 198, 6738, 1182, 2815, 268, 15515, 1330, 19340, 4303, 28198, 198, 6738,...
3.916667
48
import asyncio import functools def futurized(o): ''' Makes the given object to be awaitable. :param any o: Object to wrap :return: awaitable that resolves to provided object :rtype: asyncio.Future Anything passed to :code:`futurized` is wrapped in :code:`asyncio.Future`. This makes it await...
[ 11748, 30351, 952, 198, 11748, 1257, 310, 10141, 628, 198, 4299, 13294, 44796, 7, 78, 2599, 198, 220, 220, 220, 705, 7061, 27433, 262, 1813, 2134, 284, 307, 25507, 540, 13, 628, 220, 220, 220, 1058, 17143, 597, 267, 25, 9515, 284, 1...
2.289067
1,619
""" check engine light """ import tkinter as tk from tkinter import ttk from typing import TYPE_CHECKING, Dict, Optional from core.gui.dialogs.dialog import Dialog from core.gui.themes import PADX, PADY from core.gui.widgets import CodeText from core.gui.wrappers import ExceptionEvent, ExceptionLevel if TYPE_CHECKING...
[ 37811, 198, 9122, 3113, 1657, 198, 37811, 198, 11748, 256, 74, 3849, 355, 256, 74, 198, 6738, 256, 74, 3849, 1330, 256, 30488, 198, 6738, 19720, 1330, 41876, 62, 50084, 2751, 11, 360, 713, 11, 32233, 198, 198, 6738, 4755, 13, 48317, ...
3.221239
113
""" Game fix for STAR WARS Galactic Battlegrounds Saga """ #pylint: disable=C0103 from protonfixes import util
[ 37811, 3776, 4259, 329, 25424, 11837, 50, 23509, 12350, 28272, 82, 19743, 198, 37811, 198, 198, 2, 79, 2645, 600, 25, 15560, 28, 34, 486, 3070, 198, 198, 6738, 386, 1122, 42624, 1330, 7736, 198 ]
3.228571
35
a=1 b=2 c=3 d=4 你是不是个沙雕 f=6
[ 64, 28, 16, 198, 65, 28, 17, 198, 66, 28, 18, 198, 67, 28, 19, 198, 19526, 254, 42468, 38834, 42468, 10310, 103, 162, 110, 247, 37239, 243, 198, 69, 28, 21, 198 ]
0.848485
33
import os import uuid from viadot.sources import AzureDataLake from viadot.tasks import ( AzureDataLakeDownload, AzureDataLakeToDF, AzureDataLakeUpload, AzureDataLakeCopy, AzureDataLakeList, ) uuid_4 = uuid.uuid4() uuid_4_2 = uuid.uuid4() file_name = f"test_file_{uuid_4}.csv" file_name_2 = f"test...
[ 11748, 28686, 198, 11748, 334, 27112, 198, 198, 6738, 25357, 324, 313, 13, 82, 2203, 1330, 22134, 6601, 43035, 198, 6738, 25357, 324, 313, 13, 83, 6791, 1330, 357, 198, 220, 220, 220, 22134, 6601, 43035, 10002, 11, 198, 220, 220, 220,...
2.428571
266
#Author: Satwik Bhattamishra import tensorflow as tf import numpy as np import tensorflow.examples.tutorials.mnist.input_data as input_data if __name__ == '__main__': denoising_autoencoder()
[ 2, 13838, 25, 7031, 20763, 347, 11653, 321, 680, 430, 198, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 11192, 273, 11125, 13, 1069, 12629, 13, 83, 44917, 82, 13, 10295, 396, 13, 15414, 62...
2.746479
71
# -*- coding: utf-8 -*- """ @Time : 2020/10/25 17:14 @Auth : Qi @IDE : PyCharm @Title: 845. 数组中的最长山脉 @Link : https://leetcode-cn.com/problems/longest-mountain-in-array/ """ if __name__ == '__main__': # 测试用例 s = Solution() print(s.longestMountain([2, 1, 4, 7, 3, 2, 5])) print(s.longestMountain([0, 1,...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 31, 7575, 1058, 12131, 14, 940, 14, 1495, 1596, 25, 1415, 198, 31, 30515, 1058, 21924, 198, 31, 14114, 220, 1058, 9485, 1925, 1670, 198, 31, 19160, 25, 807...
1.814286
210
import os import time import cv2 from inference_new import * import argparse from glob import glob if __name__ == "__main__": parser = argparse.ArgumentParser(description="Command for running the Inpainting Pipeline on RGBD satellite imagery") parser.add_argument('--gpu', type=str, default='0', help='the gpu ...
[ 11748, 28686, 198, 11748, 640, 198, 11748, 269, 85, 17, 198, 6738, 32278, 62, 3605, 1330, 1635, 198, 11748, 1822, 29572, 198, 6738, 15095, 1330, 15095, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, ...
2.877651
613
from __future__ import print_function from __future__ import division from builtins import zip from builtins import range from builtins import object from past.utils import old_div __author__ = 'grburgess' import collections import os import numpy as np import pandas as pd from pandas import HDFStore from threeML.ex...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 3170, 1040, 1330, 19974, 198, 6738, 3170, 1040, 1330, 2837, 198, 6738, 3170, 1040, 1330, 2134, 198, 6738, 1613, 13, 26791, 1330, 1468, 6...
3.52356
191
import requests import json from flask.cli import FlaskGroup from flask import jsonify from serivce.app import create_app app = create_app() data = json.dumps(dict(name='service', port='8000')) headers = {'Content-type': 'application/json'} requests.post('http://localhost:5000/instance', headers=headers, data=data)...
[ 11748, 7007, 198, 11748, 33918, 198, 198, 6738, 42903, 13, 44506, 1330, 46947, 13247, 198, 6738, 42903, 1330, 33918, 1958, 198, 6738, 1055, 452, 344, 13, 1324, 1330, 2251, 62, 1324, 198, 198, 1324, 796, 2251, 62, 1324, 3419, 628, 198, ...
3.056
125
"""Canvas that displays the full game board.""" # Standard Python Libraries import tkinter as tk # Third-Party Libraries import numpy as np from . import constants from .board import DorfBoard
[ 37811, 6090, 11017, 326, 11298, 262, 1336, 983, 3096, 526, 15931, 198, 2, 8997, 11361, 46267, 198, 11748, 256, 74, 3849, 355, 256, 74, 198, 198, 2, 10467, 12, 33553, 46267, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 764, 1330...
3.735849
53
import requests from bs4 import BeautifulSoup from tabulate import tabulate
[ 11748, 7007, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 6738, 7400, 5039, 1330, 7400, 5039, 198 ]
4
19
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Parser test for MacOS Cups IPP Log files.""" import unittest from dfvfs.helpers import fake_file_system_builder from dfvfs.path import fake_path_spec from plaso.lib import definitions from plaso.lib import errors from plaso.parsers import cups_ipp from tests.parsers...
[ 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, 46677, 1332, 329, 4100, 2640, 41611, 6101, 47, 5972, 3696, 526, 15931, 198, 198, 11748, 555, 715, 395, 198, ...
2.630245
5,052
from colorama import Fore from oeda.log import * from oeda.rtxlib.preprocessors.SparkPreProcessor import SparkPreProcessor def init_pre_processors(wf): """ we look into the workflows definition and run the required preprocessors """ if hasattr(wf, "pre_processors"): pp = wf.pre_processors for...
[ 6738, 3124, 1689, 1330, 4558, 198, 198, 6738, 267, 18082, 13, 6404, 1330, 1635, 198, 6738, 267, 18082, 13, 17034, 87, 8019, 13, 3866, 14681, 669, 13, 4561, 668, 6719, 18709, 273, 1330, 17732, 6719, 18709, 273, 628, 198, 4299, 2315, 62...
2.316265
332
# -*- coding: utf-8 -*- """ Language translation. """ __all__ = [ "ThZhTranslator", "ZhThTranslator", "Translate" ] from pythainlp.translate.core import Translate from pythainlp.translate.zh_th import ( ThZhTranslator, ZhThTranslator, )
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 32065, 11059, 13, 198, 37811, 198, 198, 834, 439, 834, 796, 685, 198, 220, 220, 220, 366, 817, 57, 71, 8291, 41880, 1600, 198, 220, 220, 220, 366, 57, 71...
2.300885
113
# Copyright (C) 2019 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """Test Custom Attribute Definition validation""" import unittest from mock import MagicMock from ggrc.models import all_models from ggrc.access_control import role as acr class TestCustomAttributeDefini...
[ 2, 15069, 357, 34, 8, 13130, 3012, 3457, 13, 198, 2, 49962, 739, 2638, 1378, 2503, 13, 43073, 13, 2398, 14, 677, 4541, 14, 43, 2149, 24290, 12, 17, 13, 15, 1279, 3826, 38559, 24290, 2393, 29, 198, 198, 37811, 14402, 8562, 3460, 41...
3.164319
213
file = open("13") sum = 0 for numbers in file: #print(numbers.rstrip()) numbers = int(numbers) sum += numbers; print(sum) sum = str(sum) print(sum[:10])
[ 7753, 796, 1280, 7203, 1485, 4943, 198, 198, 16345, 796, 657, 198, 1640, 3146, 287, 2393, 25, 198, 220, 220, 220, 1303, 4798, 7, 77, 17024, 13, 81, 36311, 28955, 628, 220, 220, 220, 3146, 796, 493, 7, 77, 17024, 8, 198, 220, 220, ...
2.342466
73
""" MIT License Copyright (c) 2016 deeplearningathome. http://deeplearningathome.com/ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights ...
[ 37811, 198, 36393, 13789, 198, 198, 15269, 357, 66, 8, 1584, 2769, 40684, 776, 462, 13, 2638, 1378, 22089, 40684, 776, 462, 13, 785, 14, 198, 198, 5990, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 48...
3.408293
627
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = 'Jiayi Li' import time, os, re from bson.objectid import ObjectId from werkzeug.utils import secure_filename from flask import request, redirect, url_for, jsonify, abort, Blueprint, make_response, g, flash, current_app from app import db from app.models im...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 834, 9800, 834, 796, 705, 41, 72, 323, 72, 7455, 6, 198, 198, 11748, 640, 11, 28686, 11, 302, 198, 198, ...
2.134409
4,650
import cv # TODO: This class doesn't seem to be used and is based on old OpenCV bindings. # Either finish the class or remove it. def convert_np_to_cvmat(img_np): """ This gives a: AttributeError: 'numpy.ndarray' object has no attribute 'from_array' ImageAlignment.template_image = ImageAlignment.temp...
[ 11748, 269, 85, 198, 198, 2, 16926, 46, 25, 770, 1398, 1595, 470, 1283, 284, 307, 973, 290, 318, 1912, 319, 1468, 4946, 33538, 34111, 13, 198, 2, 15467, 5461, 262, 1398, 393, 4781, 340, 13, 628, 198, 4299, 10385, 62, 37659, 62, 14...
2.468504
254
#!/usr/bin/env python """ Script that uses output from cutadapt to quickly detect fully overlapping pairs. It is based on the fact that if sequencing adapters are trimmed from both paired-ends, the resulting fragment needs to be shorter than the pair-end length Depends of cutadapt seqio and xopen modules from version ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 198, 7391, 326, 3544, 5072, 422, 2005, 42552, 284, 2952, 4886, 3938, 32997, 14729, 13, 198, 1026, 318, 1912, 319, 262, 1109, 326, 611, 32841, 46363, 389, 40325, 422, 1111, 20312, ...
3.455901
805
import torch import torch.nn as nn import torch.nn.functional as F
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 628, 198 ]
3.285714
21
from battleship.grid import Grid, Outcome from battleship.ship import Ship
[ 6738, 10181, 1056, 13, 25928, 1330, 24846, 11, 3806, 2958, 198, 6738, 10181, 1056, 13, 6720, 1330, 16656, 628, 628, 628 ]
3.809524
21
import copy import pytest from typing import Tuple, Optional import torch from torch_sparse import SparseTensor from torch_sparse.matmul import spmm from torch_geometric.nn import MessagePassing from torch_geometric.utils import softmax edge_index = torch.tensor([ [0, 0, 0, 1, 1], [0, 1, 2, 0, 2], ]) adj_t = ...
[ 11748, 4866, 198, 11748, 12972, 9288, 198, 6738, 19720, 1330, 309, 29291, 11, 32233, 198, 198, 11748, 28034, 198, 6738, 28034, 62, 82, 29572, 1330, 1338, 17208, 51, 22854, 198, 6738, 28034, 62, 82, 29572, 13, 6759, 76, 377, 1330, 599, ...
2.526316
190
# Author : Ali Snedden # Date : 3/21/20 # License: MIT # Purpose: # This code plots the Johns Hoptins Covid-19 Data # # # # Notes : # # References : # 1. https://github.com/CSSEGISandData/COVID-19 # # # Future: # # # import sys import numpy as np import time import pandas as pd from matplotlib imp...
[ 2, 6434, 1058, 12104, 311, 2817, 6559, 198, 2, 7536, 220, 220, 1058, 513, 14, 2481, 14, 1238, 198, 2, 13789, 25, 17168, 198, 2, 32039, 25, 220, 198, 2, 220, 220, 770, 2438, 21528, 262, 25824, 367, 8738, 1040, 39751, 312, 12, 1129,...
1.943713
2,203
#! /usr/bin/env python3 # -*- coding:utf-8 -*- ############################################################### # © kenwaldek MIT-license # # Title: tkinter_image Version: 1.0 # Date: 26-12-16 Language: python3 # Description: tkinter inladen van image en text ...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 220, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 29113, 14468, 7804, 4242, 21017, 198, 2, 10673, 479, 268, 21667, 988, 220, 220, 220, 220, 220, 220, 220, 220,...
2.588235
204
from django.apps import AppConfig
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
3.888889
9
#!/usr/bin/env python import logging import time from urllib.parse import urljoin import requests from relay_sdk import Interface, Dynamic as D relay = Interface() relay_api_url = relay.get(D.connection.relayAPIURL) relay_api_token = relay.get(D.connection.token) run_id = relay.get(D.id) headers = {'Authorization...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 18931, 198, 11748, 640, 198, 6738, 2956, 297, 571, 13, 29572, 1330, 19016, 22179, 198, 198, 11748, 7007, 198, 6738, 24248, 62, 21282, 74, 1330, 26491, 11, 26977, 355, 360, ...
2.553488
430
#!/usr/bin/python # you need to config this! # set the model file, and if the model supports big-grams: set seed with bigrams.. ## the conf dict stores all relevant config parameters conf={} conf['model'] = "climate2_2015_7.txt.2gram.small.model" # default dummy model #conf['model'] = "climate2_2015_7.txt.2gram.mod...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 2, 345, 761, 284, 4566, 428, 0, 198, 2, 900, 262, 2746, 2393, 11, 290, 611, 262, 2746, 6971, 1263, 12, 4546, 82, 25, 900, 9403, 351, 1263, 9474, 492, 628, 198, 2235, 262, 1013, 863...
3.213462
520
from .neumiss_layer import NeuMiss from .neumiss_mlp import NeuMissMLP
[ 6738, 764, 25668, 747, 62, 29289, 1330, 3169, 84, 17140, 198, 6738, 764, 25668, 747, 62, 4029, 79, 1330, 3169, 84, 17140, 5805, 47, 198 ]
2.84
25
""" REST API Resource Routing http://flask-restplus.readthedocs.io """ from datetime import datetime from flask import request from flask_restplus import Resource from .security import require_auth from . import api_rest from .func import * from .engine import * # wildcard import the TTDS lib class SecureResou...
[ 37811, 198, 49, 6465, 7824, 20857, 371, 13660, 198, 4023, 1378, 2704, 2093, 12, 2118, 9541, 13, 961, 83, 704, 420, 82, 13, 952, 198, 37811, 198, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 42903, 1330, 2581, 198, 6738, 42903, ...
3.231061
264
#sachin_katageri #SKATCODE from tkinter import* me=Tk() me.geometry("354x460") me.title("CALCULATOR") melabel = Label(me,text="CALCULATOR",bg='White',font=("Times",30,'bold')) melabel.pack(side=TOP) me.config(background='Dark gray') textin=StringVar() operator="" metext=Entry(me,font=("Courier N...
[ 2, 82, 620, 259, 62, 41826, 3536, 72, 201, 198, 2, 18831, 1404, 34, 16820, 201, 198, 6738, 256, 74, 3849, 1330, 9, 201, 198, 201, 198, 1326, 28, 51, 74, 3419, 201, 198, 1326, 13, 469, 15748, 7203, 32182, 87, 34716, 4943, 201, 19...
2.08388
1,371
def SortArrayByArgMinIndex(array,index): ''' MAKE SURE TO SORT BY MOST IMPORTANT INDEX LAST!!! ''' a = array L = len(a) for i in range(L): temp = a[i] flag = 0 j = 0 while j < i and flag == 0: if temp[index] < a[j][index]: a[j+1] = a[j] a[j] = temp j += 1 else: flag = 1 return(a)
[ 198, 4299, 33947, 19182, 3886, 28100, 9452, 15732, 7, 18747, 11, 9630, 2599, 198, 197, 7061, 6, 39134, 311, 11335, 5390, 311, 9863, 11050, 337, 10892, 30023, 9863, 8643, 24413, 6369, 41894, 10185, 705, 7061, 198, 197, 64, 796, 7177, 198...
1.95679
162
# This file lists files which should be ignored by pytest collect_ignore = ["setup.py", "connery.py", "connery/modules/ipython.py"]
[ 2, 770, 2393, 8341, 3696, 543, 815, 307, 9514, 416, 12972, 9288, 198, 33327, 62, 46430, 796, 14631, 40406, 13, 9078, 1600, 366, 1102, 35865, 13, 9078, 1600, 366, 1102, 35865, 14, 18170, 14, 541, 7535, 13, 9078, 8973, 198 ]
3.3
40
""" Tests for `nas` module. """ import pytest from nas import nas
[ 37811, 198, 51, 3558, 329, 4600, 24716, 63, 8265, 13, 198, 37811, 198, 11748, 12972, 9288, 198, 6738, 25221, 1330, 25221, 628 ]
3.045455
22
#%% import os # IN_FILE = 'test.ncm' # OUT_FILE = IN_FILE.split('.')[0] fileToC('up5.html','htmlData') # %%
[ 2, 16626, 198, 11748, 28686, 198, 198, 2, 3268, 62, 25664, 796, 705, 9288, 13, 10782, 76, 6, 198, 2, 16289, 62, 25664, 796, 3268, 62, 25664, 13, 35312, 10786, 2637, 38381, 15, 60, 198, 7753, 2514, 34, 10786, 929, 20, 13, 6494, 417...
2.134615
52
""" This module is the concrete implementation of S2FGAN. This module structure is following: make_kernel is used to intialise the kernel for blurring image Blur, a layer used to apply blur kerbel to input PixelNorm, a layer used to apply pixel normalization EqualConv1d, convolution 1d with equalized le...
[ 37811, 198, 1212, 8265, 318, 262, 10017, 7822, 286, 311, 17, 30386, 1565, 13, 198, 1212, 8265, 4645, 318, 1708, 25, 198, 220, 220, 220, 787, 62, 33885, 318, 973, 284, 493, 498, 786, 262, 9720, 329, 698, 14924, 2939, 198, 220, 220, ...
2.604938
729
#\input texinfo """ Searching for names with given scope and name. This is very central in Jedi and Python. The name resolution is quite complicated with descripter, ``__getattribute__``, ``__getattr__``, ``global``, etc. Flow checks +++++++++++ Flow checks are not really mature. There's only a check for ``isinstanc...
[ 2, 59, 15414, 48659, 10951, 198, 198, 37811, 198, 18243, 278, 329, 3891, 351, 1813, 8354, 290, 1438, 13, 770, 318, 845, 4318, 287, 16147, 290, 198, 37906, 13, 383, 1438, 6323, 318, 2407, 8253, 351, 1715, 5528, 353, 11, 198, 15506, 8...
2.610565
3,256
#!/usr/bin/env python """ A Python implementation of ANSI X9.31 using AES 128, following: http://csrc.nist.gov/groups/STM/cavp/documents/rng/931rngext.pdf Copyright (C) 2015 - Brian Caswell <bmc@lungetech.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associat...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 37811, 198, 32, 11361, 7822, 286, 3537, 11584, 1395, 24, 13, 3132, 1262, 34329, 13108, 11, 1708, 25, 198, 198, 4023, 1378, 6359, 6015, 13, 77, 396, 13, 9567, 14, 24432, 14, 2257...
2.387413
1,732
import typing # Segment Tree
[ 11748, 19720, 198, 198, 2, 1001, 5154, 12200 ]
3.625
8
import pandas as pd from unittest2 import TestCase # or `from unittest import ...` if on Python 3.4+ import category_encoders as encoders
[ 11748, 19798, 292, 355, 279, 67, 198, 6738, 555, 715, 395, 17, 1330, 6208, 20448, 220, 1303, 393, 4600, 6738, 555, 715, 395, 1330, 2644, 63, 611, 319, 11361, 513, 13, 19, 10, 198, 198, 11748, 6536, 62, 12685, 375, 364, 355, 2207, ...
3.065217
46
import unittest import pythonioc class TestDepCycle(unittest.TestCase): """ Regression test for issue #3 dependency cycle on error. """
[ 11748, 555, 715, 395, 198, 11748, 21015, 72, 420, 198, 198, 4871, 6208, 12156, 20418, 2375, 7, 403, 715, 395, 13, 14402, 20448, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 3310, 2234, 1332, 329, 2071, 1303, 18, 20203, 6772, ...
2.941176
51
import os import fabtools from fabtools import require from fabric.api import task, sudo, cd from fabric.colors import cyan from dploy.context import ctx from dploy.utils import git_dirname @task def checkout(): """ Checkouts the code on the remote location using git """ branch = ctx('git.branch') ...
[ 11748, 28686, 198, 11748, 7843, 31391, 198, 198, 6738, 7843, 31391, 1330, 2421, 198, 6738, 9664, 13, 15042, 1330, 4876, 11, 21061, 11, 22927, 198, 6738, 9664, 13, 4033, 669, 1330, 36818, 198, 6738, 288, 1420, 13, 22866, 1330, 269, 17602...
2.253463
722
number = 100 factorialnumber = factorial(number) print(f"Factorial({number}) = {factorialnumber}") sumfactorialnumber = sum_of_digits(factorialnumber) print( f"Sum of digits in the factorial number({number}) = {sumfactorialnumber}")
[ 201, 198, 201, 198, 201, 198, 17618, 796, 1802, 201, 198, 22584, 5132, 17618, 796, 1109, 5132, 7, 17618, 8, 201, 198, 4798, 7, 69, 1, 29054, 5132, 15090, 17618, 30072, 796, 1391, 22584, 5132, 17618, 92, 4943, 201, 198, 16345, 22584, ...
2.829545
88
# # PySNMP MIB module HPN-ICF-STACK-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HPN-ICF-STACK-MIB # Produced by pysmi-0.3.4 at Wed May 1 13:41:29 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Ma...
[ 2, 198, 2, 9485, 15571, 7378, 337, 9865, 8265, 6574, 45, 12, 2149, 37, 12, 2257, 8120, 12, 8895, 33, 357, 4023, 1378, 16184, 76, 489, 8937, 13, 785, 14, 79, 893, 11632, 8, 198, 2, 7054, 45, 13, 16, 2723, 2393, 1378, 14, 14490, ...
3.030129
6,804
""" Feature extraction algorithms. Each algorithm works on the HandwrittenData class. They have to be applied like this: >>> import hwrt.features >>> from hwrt.handwritten_data import HandwrittenData >>> data_json = '[[{"time": 123, "x": 45, "y": 67}]]' >>> a = HandwrittenData(raw_data_id=2953, raw_data_json=data_jso...
[ 37811, 198, 38816, 22236, 16113, 13, 198, 198, 10871, 11862, 2499, 319, 262, 7157, 15266, 6601, 1398, 13, 1119, 423, 284, 307, 5625, 588, 198, 5661, 25, 198, 198, 33409, 1330, 289, 86, 17034, 13, 40890, 198, 33409, 422, 289, 86, 17034...
2.228287
7,530
from rest_framework import permissions, viewsets, generics, filters from .serializers import JobsSerializer, HousingSerializer, ApplicantSerializer, HeatmapSerializer from .models import Jobs, Housing, Applicant, Heatmap from .data_collection.collect_data import CollectData from django.shortcuts import render debug...
[ 6738, 1334, 62, 30604, 1330, 21627, 11, 5009, 1039, 11, 1152, 873, 11, 16628, 198, 198, 6738, 764, 46911, 11341, 1330, 19161, 32634, 7509, 11, 16797, 32634, 7509, 11, 49217, 32634, 7509, 11, 12308, 8899, 32634, 7509, 198, 198, 6738, 764...
3.831579
95
from django.views.generic import DetailView from django.contrib.auth.mixins import LoginRequiredMixin, UserPassesTestMixin from django.views.generic.edit import CreateView, UpdateView, DeleteView from django.urls import reverse_lazy from core.views import PaginatedListView from .models import Tag, Ingredient, Recipe ...
[ 6738, 42625, 14208, 13, 33571, 13, 41357, 1330, 42585, 7680, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 19816, 1040, 1330, 23093, 37374, 35608, 259, 11, 11787, 47, 13978, 14402, 35608, 259, 198, 6738, 42625, 14208, 13, 33571, ...
3.669683
221
import unittest from libcet import cet
[ 11748, 555, 715, 395, 198, 198, 6738, 9195, 66, 316, 1330, 269, 316, 628 ]
2.928571
14
"""Companies app""" # Django from django.apps import AppConfig class CompaniesAppConfig(AppConfig): """Companies app config""" name = "paranuara.companies" verbose_name = 'Companies'
[ 37811, 49111, 598, 37811, 198, 198, 2, 37770, 198, 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628, 198, 4871, 24382, 4677, 16934, 7, 4677, 16934, 2599, 198, 220, 220, 220, 37227, 49111, 598, 4566, 37811, 628, 220, 220, 220, 1438,...
3.15873
63
from quasargui import * layout = QInput( classes='q-ma-lg', label='Your city', children=[ Slot('prepend', [ QIcon('place') ]) ]) run(layout, title='slots example')
[ 6738, 627, 292, 853, 9019, 1330, 1635, 198, 198, 39786, 796, 1195, 20560, 7, 198, 220, 220, 220, 6097, 11639, 80, 12, 2611, 12, 75, 70, 3256, 198, 220, 220, 220, 6167, 11639, 7120, 1748, 3256, 198, 220, 220, 220, 1751, 41888, 198, ...
2.1
100
import io import pathlib from collections import namedtuple from typing import Any, Dict, List, Optional, Tuple, Iterator, Union from torchdata.datapipes.iter import IterDataPipe, Mapper, Zipper from torchvision.prototype import features from torchvision.prototype.datasets.utils import ( Dataset, OnlineResourc...
[ 11748, 33245, 198, 11748, 3108, 8019, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 6738, 19720, 1330, 4377, 11, 360, 713, 11, 7343, 11, 32233, 11, 309, 29291, 11, 40806, 1352, 11, 4479, 198, 198, 6738, 28034, 7890, 13, 19608, 499, 18...
1.790132
1,439