content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import xmlrpc.client import getpass import os import time from prettytable import PrettyTable SERVER_IP = 'localhost' SERVER_PORT = '8000' server = xmlrpc.client.ServerProxy( 'http://{ip}:{port}'.format(ip=SERVER_IP, port=SERVER_PORT) ) while True: if menu_awal() == 1: os.system('clear')...
[ 11748, 35555, 81, 14751, 13, 16366, 201, 198, 11748, 651, 6603, 201, 198, 11748, 28686, 201, 198, 11748, 640, 201, 198, 6738, 2495, 11487, 1330, 20090, 10962, 201, 198, 201, 198, 35009, 5959, 62, 4061, 796, 705, 36750, 6, 201, 198, 35...
1.439596
3,071
import logging from django.conf.urls import include, url from django.core.exceptions import ImproperlyConfigured from corehq.apps.reports.standard.forms.reports import ReprocessXFormErrorView from corehq.apps.userreports.reports.view import ( ConfigurableReportView, CustomConfigurableReportDispatcher, ) from ...
[ 11748, 18931, 198, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 2291, 11, 19016, 198, 6738, 42625, 14208, 13, 7295, 13, 1069, 11755, 1330, 12205, 525, 306, 16934, 1522, 198, 198, 6738, 4755, 71, 80, 13, 18211, 13, 48922, 13...
2.452324
2,905
# !/usr/bin/env python # -*- coding: utf-8 -*- ######################################################################### # This code is an adaptation from Toni Heittola's code [task1 baseline dcase 2018](https://github.com/DCASE-REPO/dcase2018_baseline/tree/master/task1/) # Copyright Nicolas Turpault, Romain Serizel, H...
[ 2, 5145, 14, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 29113, 29113, 7804, 2, 198, 2, 770, 2438, 318, 281, 16711, 422, 309, 14651, 679, 715, 5708, 338, 2438, 685, 35943,...
2.469374
1,453
#!/usr/bin/env python # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import pickle as pkl import sys import torch if __name__ == "__main__": input = sys.argv[1] obj = torch.load(input, map_location="cpu") obj = obj["state_dict"] newmodel = {} for k, v in obj.items(): ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 15069, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 1439, 6923, 33876, 198, 198, 11748, 2298, 293, 355, 279, 41582, 198, 11748, 25064, 198, 11748, 28034, 198, 198, 361, 11...
2.036765
544
# No. 14: Removing duplicates in a list: x = [1,1,2,2,3,3,4,4,1] print(removeDuplicates2(x)) print(removeDuplicates1(x))
[ 2, 1400, 13, 1478, 25, 3982, 5165, 14184, 16856, 287, 257, 1351, 25, 198, 198, 87, 796, 685, 16, 11, 16, 11, 17, 11, 17, 11, 18, 11, 18, 11, 19, 11, 19, 11, 16, 60, 198, 4798, 7, 28956, 35660, 489, 16856, 17, 7, 87, 4008, ...
2.067797
59
#!/usr/bin/env python # # Copyright 2018 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 2, 15069, 2864, 8180, 10501, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 284...
2.281034
580
#!/user/bin/python # -*- coding: utf-8 -*- # Author : (DEK) Devendra Kavthekar # program010 : # Write a program that accepts a sequence of whitespace # separated words as input and prints the words after # removing all duplicate words and sorting # them alphanumerically. # Suppose the following input is supplied to t...
[ 2, 48443, 7220, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 6434, 1058, 357, 7206, 42, 8, 6245, 48286, 509, 615, 1169, 21070, 198, 198, 2, 1430, 20943, 1058, 198, 2, 19430, 257, 14...
3.663366
202
from django.apps import AppConfig
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
3.888889
9
# http://stackoverflow.com/questions/23864341/equivalent-of-asyncio-queues-with-worker-threads import asyncio, random q = asyncio.Queue() @asyncio.coroutine @asyncio.coroutine loop = asyncio.get_event_loop() loop.create_task(produce()) loop.create_task(consume()) loop.run_forever()
[ 198, 2, 2638, 1378, 25558, 2502, 11125, 13, 785, 14, 6138, 507, 14, 23721, 2414, 33660, 14, 4853, 29540, 12, 1659, 12, 292, 13361, 952, 12, 4188, 947, 12, 4480, 12, 28816, 12, 16663, 82, 198, 198, 11748, 30351, 952, 11, 4738, 198, ...
2.621622
111
import numpy as np from copy import deepcopy from gbvision.constants.types import Number class CameraData: """ describes constant about a camera in it's default state used to approximate distance between the camera and an object seen in a frame :param focal_length: the focal length of the camera at ...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 4866, 1330, 2769, 30073, 198, 198, 6738, 308, 65, 10178, 13, 9979, 1187, 13, 19199, 1330, 7913, 628, 198, 4871, 20432, 6601, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 8477, 6937, 546,...
2.637639
4,490
"""Tests for the notebook kernel and session manager""" from subprocess import PIPE import time from unittest import TestCase from IPython.testing import decorators as dec from IPython.config.loader import Config from IPython.kernel import KernelManager
[ 37811, 51, 3558, 329, 262, 20922, 9720, 290, 6246, 4706, 37811, 198, 198, 6738, 850, 14681, 1330, 350, 4061, 36, 198, 11748, 640, 198, 6738, 555, 715, 395, 1330, 6208, 20448, 198, 198, 6738, 6101, 7535, 13, 33407, 1330, 11705, 2024, 3...
4.03125
64
# Copyright (c) 2020 Graphcore Ltd. All rights reserved. import os import unittest import re import pytest # NOTE: The import below is dependent on 'pytest.ini' in the root of # the repository from examples_tests.test_util import run_python_script_helper, run_test_helper def run_sparse_softmax_subblock(**kwargs): ...
[ 2, 15069, 357, 66, 8, 12131, 29681, 7295, 12052, 13, 1439, 2489, 10395, 13, 198, 11748, 28686, 198, 11748, 555, 715, 395, 198, 11748, 302, 198, 198, 11748, 12972, 9288, 198, 2, 24550, 25, 383, 1330, 2174, 318, 10795, 319, 705, 9078, ...
2.777778
216
import os, sys, re, csv from bs4 import BeautifulSoup import requests, time from tqdm import tqdm url = 'http://web.phonetik.uni-frankfurt.de/S/S00002.html' if __name__ == '__main__': main()
[ 11748, 28686, 11, 25064, 11, 302, 11, 269, 21370, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 11748, 7007, 11, 640, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 6371, 796, 705, 4023, 1378, 12384, 13, 746, 36823, 11...
2.432099
81
import argparse import glob # noinspection PyTypeChecker from dataclasses import dataclass from operator import add from statistics import median, mean from termcolor import colored from forest.parse_examples import parse_resnax, parse_file exclude_instances = ["datetime2"] # , "color", "date", "date7", "id1", "dat...
[ 11748, 1822, 29572, 198, 11748, 15095, 198, 2, 645, 1040, 14978, 9485, 6030, 9787, 263, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 6738, 10088, 1330, 751, 198, 6738, 7869, 1330, 14288, 11, 1612, 198, 198, 6738, 3381, 8043...
3.114754
122
main()
[ 12417, 3419, 201, 198 ]
2
4
#%% """ - Detect Capital - https://leetcode.com/problems/detect-capital/ - Easy Given a word, you need to judge whether the usage of capitals in it is right or not. We define the usage of capitals in a word to be right when one of the following cases holds: All letters in this word are capitals, like "USA". All lett...
[ 2, 16626, 198, 37811, 198, 12, 35874, 9747, 198, 12, 3740, 1378, 293, 316, 8189, 13, 785, 14, 1676, 22143, 14, 15255, 478, 12, 27544, 14, 198, 12, 16789, 198, 198, 15056, 257, 1573, 11, 345, 761, 284, 5052, 1771, 262, 8748, 286, 4...
3.261468
218
from workwork.errors import InstanceIdNotFound
[ 6738, 670, 1818, 13, 48277, 1330, 2262, 590, 7390, 3673, 21077, 628, 198 ]
3.769231
13
from django.contrib import admin from .models import Tag # Register your models here. @admin.register(Tag)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 764, 27530, 1330, 17467, 198, 2, 17296, 534, 4981, 994, 13, 198, 198, 31, 28482, 13, 30238, 7, 24835, 8 ]
3.566667
30
from distutils.core import setup setup(name='tableize', version='v1.0', description='Turn lists into tables with ease', author='Anthony Federico', author_email='dephoona@gmail.com', url='https://github.com/anfederico/Tableize', packages=['tableize'] )
[ 6738, 1233, 26791, 13, 7295, 1330, 9058, 198, 198, 40406, 7, 3672, 11639, 11487, 1096, 3256, 198, 220, 220, 220, 220, 220, 2196, 11639, 85, 16, 13, 15, 3256, 198, 220, 220, 220, 220, 220, 6764, 11639, 17278, 8341, 656, 8893, 351, 10...
2.547826
115
#!/usr/bin/env python # -*- coding: utf-8 -*- # Han Xiao <artex.xh@gmail.com> <https://hanxiao.github.io> import multiprocessing import os import random import sys import threading import time from collections import defaultdict from datetime import datetime from itertools import chain from multiprocessing import Proce...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 9530, 28249, 1279, 433, 1069, 13, 87, 71, 31, 14816, 13, 785, 29, 1279, 5450, 1378, 7637, 87, 13481, 13, 12567, ...
3.056911
246
# Code Snippets for Flow Solver # Below are a few code snippets, intended to save you the time and tedium # of typing in file name lists. Copy and paste these into your program as needed. # Snippet number 1: List of colors used. Not sure if you need this or not. # By the way, the "white" files are really gray. ...
[ 2, 6127, 5489, 3974, 1039, 329, 27782, 4294, 332, 201, 198, 2, 10383, 389, 257, 1178, 2438, 45114, 11, 5292, 284, 3613, 345, 262, 640, 290, 28501, 1505, 201, 198, 2, 286, 19720, 287, 2393, 1438, 8341, 13, 220, 17393, 290, 17008, 777...
2.163376
1,469
"""Implementation of the locatebiome command.""" from mcipc.rcon.client import Client from mcipc.rcon.functions import parsed from mcipc.rcon.je.types import Biome from mcipc.rcon.response_types.location import parse __all__ = ['locatebiome'] @parsed(parse) def locatebiome(self: Client, biome: Biome) -> str: "...
[ 37811, 3546, 32851, 286, 262, 17276, 8482, 462, 3141, 526, 15931, 198, 198, 6738, 36650, 541, 66, 13, 81, 1102, 13, 16366, 1330, 20985, 198, 6738, 36650, 541, 66, 13, 81, 1102, 13, 12543, 2733, 1330, 44267, 198, 6738, 36650, 541, 66, ...
2.889706
136
import tensorflow as tf from config import * batch_norm = tf.contrib.layers.batch_norm w_init = tf.contrib.layers.variance_scaling_initializer() b_init = tf.constant_initializer(0.0) class Generator(object): """ Generator """ class Discriminator(object): """ Discriminator """
[ 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 4566, 1330, 1635, 198, 198, 43501, 62, 27237, 796, 48700, 13, 3642, 822, 13, 75, 6962, 13, 43501, 62, 27237, 198, 86, 62, 15003, 796, 48700, 13, 3642, 822, 13, 75, 6962, 13, 25641, 59...
2.958333
96
# -*- coding: utf-8 -*- import pandas as pd pd.set_option("display.max_colwidth", 10000) pd.options.mode.chained_assignment = None # to not make too many copies import os import numpy as np import glob rootdir_glob = 'C:\\conda\\remote_works\\remote_works\\remote_works\\**/*' # Note the added asterisks # This will ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 30094, 13, 2617, 62, 18076, 7203, 13812, 13, 9806, 62, 4033, 10394, 1600, 33028, 8, 198, 30094, 13, 25811, 13, 14171, 13, 35...
2.075439
570
# 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 __future__ import print_function import sys import llnl.util.tty as tty from llnl.util.tty.colify import colify im...
[ 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, ...
3.365385
156
import logging import shlex import os as _os import tempfile from pathlib import Path import pytest import alexber.utils.processinvokes as processinvokes from alexber.utils.processinvokes import LogPipe, LogSubProcessCall logger = logging.getLogger(__name__) process_invokes_logger = None _process_invokes_logger_log = ...
[ 11748, 18931, 198, 11748, 427, 2588, 198, 11748, 28686, 355, 4808, 418, 198, 11748, 20218, 7753, 198, 6738, 3108, 8019, 1330, 10644, 198, 11748, 12972, 9288, 198, 11748, 257, 2588, 527, 13, 26791, 13, 14681, 16340, 3369, 355, 1429, 16340,...
2.907285
151
from .. import bech32, ec, script, base58 from . import blech32 import hmac from .networks import NETWORKS # TODO: refactor with network
[ 6738, 11485, 1330, 307, 354, 2624, 11, 9940, 11, 4226, 11, 2779, 3365, 198, 6738, 764, 1330, 7245, 354, 2624, 198, 11748, 289, 20285, 198, 6738, 764, 3262, 5225, 1330, 49791, 50, 198, 198, 2, 16926, 46, 25, 1006, 11218, 351, 3127, 6...
3.232558
43
#! /usr/bin/env python3 import rospy from session_one.srv import laser_service,laser_serviceResponse from sensor_msgs.msg import LaserScan laser_max = 0.00 laser_min = 0.00 rospy.init_node('arda_service_server_node') my_service = rospy.Service('/Arda',laser_service,service_callback_function) rospy.spin()
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 686, 2777, 88, 198, 6738, 6246, 62, 505, 13, 27891, 85, 1330, 12855, 62, 15271, 11, 75, 6005, 62, 15271, 31077, 198, 6738, 12694, 62, 907, 14542, 13, 19662, 1330, ...
2.65812
117
"""Tools to implement caching.""" # pylint: disable=too-few-public-methods import functools def _make_key(args, kwargs): """Creates a hashable key. A simplified version of functools._make_key.""" # create a key for the memo from args and kwargs key = args if kwargs: # marks the start of th...
[ 37811, 33637, 284, 3494, 40918, 526, 15931, 198, 198, 2, 279, 2645, 600, 25, 15560, 28, 18820, 12, 32146, 12, 11377, 12, 24396, 82, 198, 198, 11748, 1257, 310, 10141, 628, 198, 4299, 4808, 15883, 62, 2539, 7, 22046, 11, 479, 86, 220...
2.794224
277
from rest_framework.response import Response from rest_framework import viewsets, permissions, generics from tournaments.api.serializers import TournamentSerializer from tournaments.models import Tournament, TeamInvite class TournamentViewSet(viewsets.ModelViewSet): """ API endpoint that allows groups to be ...
[ 6738, 1334, 62, 30604, 13, 26209, 1330, 18261, 198, 6738, 1334, 62, 30604, 1330, 5009, 1039, 11, 21627, 11, 1152, 873, 198, 198, 6738, 18130, 13, 15042, 13, 46911, 11341, 1330, 9595, 32634, 7509, 198, 6738, 18130, 13, 27530, 1330, 9595,...
3.818898
127
from paysage import backends as be from paysage import layers from paysage.models import BoltzmannMachine from paysage.models import gradient_util as gu from paysage.models.state import StateTAP import pytest from copy import deepcopy from cytoolz import partial import math # ----- Functional Programs with Gradients -...
[ 6738, 13831, 496, 1330, 736, 2412, 355, 307, 198, 6738, 13831, 496, 1330, 11685, 198, 6738, 13831, 496, 13, 27530, 1330, 21764, 89, 9038, 37573, 198, 6738, 13831, 496, 13, 27530, 1330, 31312, 62, 22602, 355, 915, 198, 6738, 13831, 496, ...
3.598291
117
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 17202, 39410, 25, 428, 2393, 373, 7560, 416, 262, 21624, 12994, 24118, 687, 10290, 357, 27110, 5235, 8, 16984, 13, 17202, 198, 2, 17202, 2141, 407, 4370, 416, 1021, 4556, 345, 821, 1728, 345, 760...
3.403101
129
import fontforge import os import md5 import subprocess import tempfile import json import copy SCRIPT_PATH = os.path.dirname(os.path.abspath(__file__)) SQUARE_PATH = os.path.join(SCRIPT_PATH, 'square.svg') OUTPUT_FONT_DIR = os.path.join(SCRIPT_PATH, '..', '..', 'src/fonts') AUTO_WIDTH = False KERNING = 0 m = md5.new...
[ 11748, 10369, 30293, 198, 11748, 28686, 198, 11748, 45243, 20, 198, 11748, 850, 14681, 198, 11748, 20218, 7753, 198, 11748, 33918, 198, 11748, 4866, 198, 198, 6173, 46023, 62, 34219, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 418, 13, 69...
2.346693
499
""" @Author :Furqan Khan @Email :furqankhan08@gmail.com @Date :12/30/2016 Objective : The purpose of this file /module /Class is to actually execute the external scripts for vulnerability assessment and scanning.It runs metasploit modules ,external python ,ruby,bash,shell,java class files and some perl as w...
[ 37811, 198, 31, 13838, 197, 197, 25, 37, 333, 80, 272, 11356, 198, 31, 15333, 197, 197, 25, 38916, 80, 962, 7637, 2919, 31, 14816, 13, 785, 198, 31, 10430, 220, 197, 197, 25, 1065, 14, 1270, 14, 5304, 197, 197, 197, 198, 197, 19...
2.441616
29,383
# coding: utf-8 """ OpsGenie REST API OpsGenie OpenAPI Specification # noqa: E501 OpenAPI spec version: 2.0.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import re # noqa: F401 # python 2 and python 3 compatibility library imp...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 220, 220, 220, 26123, 13746, 494, 30617, 7824, 628, 220, 220, 220, 26123, 13746, 494, 4946, 17614, 18291, 2649, 220, 1303, 645, 20402, 25, 412, 33548, 628, 220, 220, 220, 4946, 1...
2.26165
13,713
from .module import AutomatiaModule import automatia.const.priority as priority from automatia.const.state import * from .main import Debug, Inform, Warn, Error, \ setdebug, setcli, setauto, isauto, \ FinishResult, FinishFinal, FinishNow from .internal.util import import_exists
[ 6738, 764, 21412, 1330, 17406, 265, 544, 26796, 198, 11748, 3557, 265, 544, 13, 9979, 13, 49336, 355, 8475, 198, 6738, 3557, 265, 544, 13, 9979, 13, 5219, 1330, 1635, 198, 6738, 764, 12417, 1330, 31687, 11, 45255, 11, 39567, 11, 13047...
3.376471
85
#!/usr/bin/env python #coding:utf-8 # Purpose: text objects # Created: 03.01.2011 # Copyright (C) 2011, Manfred Moitzi # License: MIT from __future__ import unicode_literals, print_function, division __author__ = "mozman <mozman@gmx.at>" from.compatibility import is_string from .xmlns import CN, register_cla...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 201, 198, 2, 66, 7656, 25, 40477, 12, 23, 201, 198, 2, 32039, 25, 2420, 5563, 201, 198, 2, 15622, 25, 7643, 13, 486, 13, 9804, 201, 198, 2, 15069, 357, 34, 8, 2813, 11, 1869, 39193, ...
2.919708
274
#!/usr/bin/env python3 import os import cv2 import json import math import time import argparse import numpy as np import pandas as pd # sudo apt install libfreetype6-dev # sudo apt install libglfw3 from thirdparty.bop_toolkit.bop_toolkit_lib.renderer import create_renderer from lib.utils.utils import euler2R from l...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 28686, 198, 11748, 269, 85, 17, 198, 11748, 33918, 198, 11748, 10688, 198, 11748, 640, 198, 11748, 1822, 29572, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292...
2.005682
1,760
import os import hashlib from getpass import getpass print('Username: ' ) passwd = getpass('Password: ') h = hashlib.md5() h.update(passwd.encode()) passwd_encrypt = h.hexdigest()
[ 11748, 28686, 201, 198, 11748, 12234, 8019, 201, 198, 6738, 651, 6603, 1330, 651, 6603, 201, 198, 201, 198, 4798, 10786, 5842, 13292, 25, 705, 1267, 201, 198, 6603, 16993, 796, 651, 6603, 10786, 35215, 25, 705, 8, 201, 198, 71, 796, ...
2.540541
74
from tortoise.models import Model from tortoise import fields from pippin.model.secrets import SeedStorage
[ 6738, 7619, 25678, 13, 27530, 1330, 9104, 198, 6738, 7619, 25678, 1330, 7032, 198, 6738, 279, 3974, 259, 13, 19849, 13, 2363, 8004, 1330, 23262, 31425 ]
4.076923
26
count_num = int(input()) odd = 0 even = 0 for i in range(1, count_num + 1): curr_num = int(input()) if i % 2 == 0: odd += curr_num else: even += curr_num if odd == even: print(f'Yes, sum = {odd}') elif odd > even: print(f'No, diff = {odd-even}') else: print(f'No, diff = {even-o...
[ 9127, 62, 22510, 796, 493, 7, 15414, 28955, 198, 5088, 796, 657, 198, 10197, 796, 657, 198, 198, 1640, 1312, 287, 2837, 7, 16, 11, 954, 62, 22510, 1343, 352, 2599, 198, 220, 220, 220, 1090, 81, 62, 22510, 796, 493, 7, 15414, 28955...
2.050314
159
# python3 # pylint: disable=g-bad-file-header # Copyright 2021 DeepMind Technologies Limited. 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...
[ 2, 21015, 18, 198, 2, 279, 2645, 600, 25, 15560, 28, 70, 12, 14774, 12, 7753, 12, 25677, 198, 2, 15069, 33448, 10766, 28478, 21852, 15302, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 1...
2.959544
964
from aerosandbox.geometry import * from aerosandbox import Atmosphere import aerosandbox.numpy as np from typing import Tuple, Union if __name__ == '__main__': op_point = OperatingPoint()
[ 6738, 41376, 392, 3524, 13, 469, 15748, 1330, 1635, 198, 6738, 41376, 392, 3524, 1330, 33276, 1456, 198, 11748, 41376, 392, 3524, 13, 77, 32152, 355, 45941, 198, 6738, 19720, 1330, 309, 29291, 11, 4479, 628, 198, 198, 361, 11593, 3672, ...
3.25
60
import FWCore.ParameterSet.Config as cms
[ 11748, 48849, 14055, 13, 36301, 7248, 13, 16934, 355, 269, 907, 628 ]
3.5
12
from math import gcd #Equality test
[ 6738, 10688, 1330, 308, 10210, 198, 220, 220, 220, 220, 198, 220, 220, 220, 1303, 36, 13237, 1332 ]
2.444444
18
import django_heroku import dj_database_url HOST = 'https://partygwam-staging.herokuapp.com' DEBUG = True ALLOWED_HOSTS = [ 'herokuapp.com', ] DATABASES = { 'default': dj_database_url.config(ssl_require=True) } django_heroku.settings(locals())
[ 11748, 42625, 14208, 62, 11718, 23063, 198, 11748, 42625, 62, 48806, 62, 6371, 198, 198, 39, 10892, 796, 705, 5450, 1378, 10608, 70, 86, 321, 12, 301, 3039, 13, 11718, 23063, 1324, 13, 785, 6, 198, 198, 30531, 796, 6407, 198, 7036, ...
2.348624
109
from __future__ import division import tensorflow as tf from nets import *
[ 6738, 11593, 37443, 834, 1330, 7297, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 31720, 1330, 1635 ]
4.111111
18
import networkx as nx import json if __name__=='__main__': main()
[ 11748, 3127, 87, 355, 299, 87, 198, 11748, 33918, 198, 198, 361, 11593, 3672, 834, 855, 6, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419, 198 ]
2.535714
28
#!pip install pymysql import pandas as pd from sqlalchemy import create_engine from sqlalchemy import insert import pymysql import mysql.connector as msql from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.metrics.pairwise import linear_kernel #predictPlot()
[ 2, 0, 79, 541, 2721, 279, 4948, 893, 13976, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 44161, 282, 26599, 1330, 2251, 62, 18392, 198, 6738, 44161, 282, 26599, 1330, 7550, 198, 11748, 279, 4948, 893, 13976, 198, 11748, 48761, 13,...
3.227273
88
# -*- coding: utf-8 -*- from django.db import models, migrations from django.conf import settings
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 628, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 11, 15720, 602, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 628 ]
2.970588
34
from urllib.request import urlopen, urljoin import re if __name__ == '__main__': target_url = 'http://www.apress.com/' # target_url = 'http://www.sainsbury.co.uk' apress = download_page(target_url) image_locations = extract_image_locations(apress) for src in image_locations: print(urljoin(target_url...
[ 6738, 2956, 297, 571, 13, 25927, 1330, 19016, 9654, 11, 19016, 22179, 198, 11748, 302, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 2496, 62, 6371, 796, 705, 4023, 1378, 2503, 13, 499, 601, 13, ...
2.616
125
from Warehouse.Inventory import Inventory from builtins import property class Order: """ Order contains order_lines which contain order_items Assumptions: It is permissable to add items to order that are not in Inventory """ class OrderItem: ''' OrderItem is class for contents of order line item ''' ...
[ 6738, 45927, 13, 818, 17158, 1330, 35772, 198, 6738, 3170, 1040, 1330, 3119, 198, 198, 4871, 8284, 25, 198, 197, 37811, 198, 197, 18743, 4909, 1502, 62, 6615, 543, 3994, 1502, 62, 23814, 198, 197, 198, 197, 8021, 388, 8544, 25, 198, ...
2.814516
248
class energyUnit(object): """Represents an energy unit."""
[ 4871, 2568, 26453, 7, 15252, 2599, 198, 220, 220, 220, 37227, 6207, 6629, 281, 2568, 4326, 526, 15931, 198 ]
3.315789
19
# Copyright 2015 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. import os from common import constants from common.waterfall import failure_type from gae_libs.pipeline_wrapper import pipeline_handlers from libs import an...
[ 2, 15069, 1853, 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, 11748...
3.825
160
# coding: utf-8 # # Copyright 2022 :Barry-Thomas-Paul: Moss # # Licensed under the Apache License, Version 2.0 (the "License") # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http: // www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 2, 198, 2, 15069, 33160, 1058, 33, 6532, 12, 22405, 12, 12041, 25, 19935, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 4943, 198, 2, 345, 743,...
3.080321
996
# Import required modules import torch import ogb from ogb.graphproppred import PygGraphPropPredDataset from WEGL.WEGL import WEGL # Set the random seed random_seed = 55 # Load the dataset dataset = PygGraphPropPredDataset(name="ogbg-molhiv") print('# of graphs = {0}\n# of classes = {1}\n# of node features...
[ 2, 17267, 2672, 13103, 201, 198, 11748, 28034, 201, 198, 11748, 267, 22296, 201, 198, 6738, 267, 22296, 13, 34960, 1676, 381, 445, 1330, 9485, 70, 37065, 24331, 39156, 27354, 292, 316, 201, 198, 6738, 370, 7156, 43, 13, 54, 7156, 43, ...
2.393688
602
from vsip import * #Spline, Sort, Permute; Interpolate #spline is a class in pyJvsip.py # pyJvsip Functions
[ 6738, 3691, 541, 1330, 1635, 198, 2, 26568, 500, 11, 33947, 11, 2448, 76, 1133, 26, 4225, 16104, 378, 198, 2, 22018, 500, 318, 257, 1398, 287, 12972, 41, 14259, 541, 13, 9078, 198, 198, 2, 12972, 41, 14259, 541, 40480, 198, 220, 2...
2.456522
46
import re import base64 from io import BytesIO from fastapi import FastAPI, HTTPException from fastapi.middleware.cors import CORSMiddleware from pydantic import BaseModel from dog_breed_classifier import DogBreedPrediction # keep model as global variable so we don't have to reload # it in case of warm invocations m...
[ 11748, 302, 198, 11748, 2779, 2414, 198, 6738, 33245, 1330, 2750, 4879, 9399, 198, 198, 6738, 3049, 15042, 1330, 12549, 17614, 11, 14626, 16922, 198, 6738, 3049, 15042, 13, 27171, 1574, 13, 66, 669, 1330, 23929, 12310, 2509, 1574, 198, ...
2.453416
322
from matplotlib import pyplot as plt from os import path, system from datetime import datetime
[ 6738, 2603, 29487, 8019, 1330, 12972, 29487, 355, 458, 83, 201, 198, 6738, 28686, 1330, 3108, 11, 1080, 201, 198, 6738, 4818, 8079, 1330, 4818, 8079, 201, 198, 201, 198 ]
3.333333
30
from app import db from app.utils.base_model import BaseEntity from werkzeug.security import generate_password_hash, check_password_hash
[ 6738, 598, 1330, 20613, 198, 6738, 598, 13, 26791, 13, 8692, 62, 19849, 1330, 7308, 32398, 198, 6738, 266, 9587, 2736, 1018, 13, 12961, 1330, 7716, 62, 28712, 62, 17831, 11, 2198, 62, 28712, 62, 17831, 628 ]
3.72973
37
import pickle from gcm import * import matplotlib.pyplot as plt #infection nu = 1.5 beta = lambda n,i,trate,nu: trate*i**nu #structure mmax = 10 gm = np.zeros(mmax+1) gm[mmax] += 1 nmax = 50 gamma_n = 3 pn = np.zeros(nmax+1) pn[2:] = (np.arange(2,nmax+1)*1.)**(-gamma_n) pn /= np.sum(pn) state_meta = get_state_meta(m...
[ 11748, 2298, 293, 198, 6738, 308, 11215, 1330, 1635, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 628, 198, 2, 27816, 295, 198, 28803, 796, 352, 13, 20, 198, 31361, 796, 37456, 299, 11, 72, 11, 2213, 378, 11, 28803,...
2.169614
1,244
#!/usr/bin/env python # coding:utf-8 """:mod:`shapeFromGeo` =================================== .. module:: moduleName :platform: Unix :synopsis: module idea :author: viba :date: 2016.10 """ import maya.cmds as mc
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 40477, 12, 23, 198, 15931, 1298, 4666, 25, 63, 43358, 4863, 10082, 78, 63, 198, 10052, 18604, 198, 492, 8265, 3712, 8265, 5376, 198, 220, 220, 1058, 24254, 25, 33501, 1...
2.783133
83
from openprocurement.auctions.geb.tests.fixtures.active_auction import ( ACTIVE_AUCTION_DEFAULT_FIXTURE, ACTIVE_AUCTION_DEFAULT_FIXTURE_WITH_URLS )
[ 198, 6738, 1280, 36942, 495, 434, 13, 559, 2733, 13, 469, 65, 13, 41989, 13, 69, 25506, 13, 5275, 62, 559, 596, 1330, 357, 198, 220, 220, 220, 11741, 9306, 62, 32, 18415, 2849, 62, 7206, 38865, 62, 47084, 51, 11335, 11, 198, 220, ...
2.295775
71
from .models import Experiment, Profile from .serializers import ExperimentSerializer, UserSerializer, LoginSerializer from django.contrib.auth.models import User from django.http import Http404 from rest_framework.views import APIView,Response,status from django.contrib.auth import ( login as django_login, log...
[ 6738, 764, 27530, 1330, 29544, 11, 13118, 198, 6738, 764, 46911, 11341, 1330, 29544, 32634, 7509, 11, 11787, 32634, 7509, 11, 23093, 32634, 7509, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 6738, 42625,...
3.090116
344
"""File with only sanitizeStr function.""" def sanitizeStr(data): """ Escape all char that will trigger an error. Parameters ---------- data: str the str to sanitize Returns ------- str The sanitized data. """ data = " ".join(data.split()) ...
[ 37811, 8979, 351, 691, 5336, 270, 1096, 13290, 2163, 526, 15931, 201, 198, 201, 198, 4299, 5336, 270, 1096, 13290, 7, 7890, 2599, 201, 198, 220, 220, 220, 37227, 201, 198, 220, 220, 220, 14473, 477, 1149, 326, 481, 7616, 281, 4049, ...
2.150442
226
# Alex Goudine # GEOG 490 - Webscraping and Database Design # Scrapes weather data from forecast.io and returns a dict of the relevant information # Modified by Taylor Denouden # Shortened script and made into a simple function in which geom and date data can be passed # Added more efficient and robust cardinal direct...
[ 2, 4422, 402, 2778, 500, 198, 2, 402, 4720, 38, 45601, 532, 5313, 1416, 2416, 278, 290, 24047, 8495, 198, 2, 1446, 2416, 274, 6193, 1366, 422, 11092, 13, 952, 290, 5860, 257, 8633, 286, 262, 5981, 1321, 198, 198, 2, 40499, 416, 81...
2.784632
924
from test_utils import run_query, redshift_connector import pytest
[ 6738, 1332, 62, 26791, 1330, 1057, 62, 22766, 11, 2266, 30846, 62, 8443, 273, 198, 11748, 12972, 9288, 628, 198 ]
3.45
20
from sepal_ui import model from traitlets import Any
[ 6738, 384, 18596, 62, 9019, 1330, 2746, 198, 6738, 1291, 2578, 912, 1330, 4377, 628 ]
3.6
15
import cairo import os from libqtile import bar import base BACKLIGHT_DIR = '/sys/class/backlight' FORMAT = '{percent: 2.0%}' class Backlight(base._TextBox): """ A simple widget to show the current brightness of a monitor. """ filenames = {} defaults = [ ('backlight_name', 'acpi_vi...
[ 11748, 1275, 7058, 198, 11748, 28686, 198, 6738, 9195, 39568, 576, 1330, 2318, 198, 11748, 2779, 198, 198, 31098, 43, 9947, 62, 34720, 796, 31051, 17597, 14, 4871, 14, 1891, 2971, 6, 198, 198, 21389, 1404, 796, 705, 90, 25067, 25, 362...
2.224932
369
import maya.cmds as cmds import mop.vendor.node_calculator.core as noca from mop.modules.leaf import Leaf from mop.core.fields import IntField, ObjectField import mop.metadata import mop.dag import mop.attributes exported_rig_modules = [Corrective]
[ 11748, 743, 64, 13, 28758, 82, 355, 23991, 82, 198, 11748, 285, 404, 13, 85, 18738, 13, 17440, 62, 9948, 3129, 1352, 13, 7295, 355, 299, 11216, 198, 198, 6738, 285, 404, 13, 18170, 13, 33201, 1330, 14697, 198, 6738, 285, 404, 13, ...
2.908046
87
import numpy as np from numpy import log2, sqrt from numpy.linalg import matrix_power import scipy as sp, scipy.linalg, matrix as mx from math import pi
[ 11748, 299, 32152, 355, 45941, 198, 6738, 299, 32152, 1330, 2604, 17, 11, 19862, 17034, 198, 6738, 299, 32152, 13, 75, 1292, 70, 1330, 17593, 62, 6477, 198, 11748, 629, 541, 88, 355, 599, 11, 629, 541, 88, 13, 75, 1292, 70, 11, 17...
2.681159
69
# -*- coding: utf-8 -*- """ :copyright: Copyright 2017-2020 Sphinx Confluence Builder Contributors (AUTHORS) :license: BSD-2-Clause (LICENSE) """ from sphinxcontrib.confluencebuilder.std.confluence import SUPPORTED_IMAGE_TYPES from tests.lib import build_sphinx from tests.lib import parse from tests.lib import prepare...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 25, 22163, 4766, 25, 15069, 2177, 12, 42334, 45368, 28413, 7326, 23079, 35869, 25767, 669, 357, 32, 24318, 20673, 8, 198, 25, 43085, 25, 347, 10305, 12, 17, ...
3.086331
139
# 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 import * class Sailfish(CMakePackage): """Sailfish is a tool for transcript quantification from RNA-seq d...
[ 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, ...
2.50996
251
import hmac import hashlib import urllib from optparse import OptionParser parse=OptionParser(""" __ __ ______ / | / | / \ $$ |___...
[ 11748, 289, 20285, 201, 198, 11748, 12234, 8019, 201, 198, 11748, 2956, 297, 571, 201, 198, 6738, 2172, 29572, 1330, 16018, 46677, 201, 198, 201, 198, 201, 198, 29572, 28, 19722, 46677, 7203, 15931, 201, 198, 201, 198, 201, 198, 201, ...
1.449696
2,306
# Copyright (c) 2016 Orange. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
[ 2, 15069, 357, 66, 8, 1584, 11942, 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, 779,...
3.424
250
# encoding: utf-8 import glob import os from shutil import copyfile from mapdict import FarsiMapenDict mypath = "./Plate_farsi/" destPath ="./Plate_en/" plate_list = glob.glob(mypath + "*") print(len(plate_list)) for plate_path in plate_list: plate_name = os.path.basename(plate_path) plate_name = plate_name_mo...
[ 2, 21004, 25, 3384, 69, 12, 23, 198, 11748, 15095, 198, 11748, 28686, 198, 6738, 4423, 346, 1330, 4866, 7753, 198, 6738, 3975, 11600, 1330, 376, 945, 72, 13912, 268, 35, 713, 198, 198, 1820, 6978, 796, 366, 19571, 3646, 378, 62, 69,...
2.413953
215
from datetime import date, timedelta import pytest from .resolvers import ( resolve_all_plants, resolve_plants_to_care, resolve_water_plant, ) from .test_factories import PlantFactory, WateringLogFactory pytestmark = pytest.mark.django_db
[ 6738, 4818, 8079, 1330, 3128, 11, 28805, 12514, 198, 11748, 12972, 9288, 198, 198, 6738, 764, 411, 349, 690, 1330, 357, 198, 220, 220, 220, 10568, 62, 439, 62, 489, 1187, 11, 198, 220, 220, 220, 10568, 62, 489, 1187, 62, 1462, 62, ...
2.866667
90
from aiogram.utils import exceptions from loguru import logger from app.loader import dp @dp.errors_handler(exception=exceptions.RetryAfter)
[ 6738, 257, 72, 21857, 13, 26791, 1330, 13269, 198, 6738, 2604, 14717, 1330, 49706, 198, 198, 6738, 598, 13, 29356, 1330, 288, 79, 628, 198, 31, 26059, 13, 48277, 62, 30281, 7, 1069, 4516, 28, 1069, 11755, 13, 9781, 563, 3260, 8, 198...
3.348837
43
from qiskit import QuantumCircuit from qiskit.converters import dag_to_circuit, circuit_to_dag from numpy import zeros, uint16 # make the global DP array LCS_DP = zeros((2000, 2000), dtype=uint16)
[ 6738, 10662, 1984, 270, 1330, 29082, 31560, 5013, 201, 198, 6738, 10662, 1984, 270, 13, 1102, 332, 1010, 1330, 48924, 62, 1462, 62, 21170, 5013, 11, 10349, 62, 1462, 62, 67, 363, 201, 198, 6738, 299, 32152, 1330, 1976, 27498, 11, 2039...
2.710526
76
"""Package for dealing with the todo.txt format.""" import fileinput import os from typing import cast, List, Sequence from .task import Task from .tasks import Tasks def uncompleted_task_on(line: str) -> bool: """Return whether there's an uncompleted task on the line.""" return bool(line.strip() and not li...
[ 37811, 27813, 329, 7219, 351, 262, 284, 4598, 13, 14116, 5794, 526, 15931, 198, 198, 11748, 2393, 15414, 198, 11748, 28686, 198, 6738, 19720, 1330, 3350, 11, 7343, 11, 45835, 198, 198, 6738, 764, 35943, 1330, 15941, 198, 6738, 764, 83, ...
2.438792
629
import pickle import random from dataclasses import dataclass from typing import Any, Tuple, cast import numpy as np import tensorflow as tf import tensorflow.keras as keras from srl.base.define import RLObservationType from srl.base.env.base import EnvRun from srl.base.rl.algorithms.discrete_action import DiscreteAct...
[ 11748, 2298, 293, 198, 11748, 4738, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 6738, 19720, 1330, 4377, 11, 309, 29291, 11, 3350, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11...
4.323077
390
from django.views.decorators.csrf import csrf_protect from django.shortcuts import render from search.forms import BasicSearchForm, AdvancedSearchForm from frontend.models import BaseUser from django.http import HttpResponseRedirect from django.core.exceptions import ValidationError # from django.contrib.auth.models im...
[ 6738, 42625, 14208, 13, 33571, 13, 12501, 273, 2024, 13, 6359, 41871, 1330, 269, 27891, 69, 62, 35499, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 2989, 13, 23914, 1330, 14392, 18243, 8479, 11, 13435, 18243, 8479, ...
3.5
112
import geopandas as gpd import pandas as pd import numpy as np # import scipy.io as spio # import scipy.stats as stats # import ogr # import os # import fnmatch import pyproj import rasterio.features from rasterio.vrt import WarpedVRT import rioxarray from shapely.geometry import box from shapely.geometry import Polygo...
[ 11748, 30324, 392, 292, 355, 27809, 67, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 2, 1330, 629, 541, 88, 13, 952, 355, 599, 952, 198, 2, 1330, 629, 541, 88, 13, 34242, 355, 9756, 198, 2, 1330, ...
2.178297
7,667
from __future__ import print_function import argparse import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Function import torch.optim as optim from torchvision import datasets, transforms from torch.autograd import Variable import create_dic_fuc from FCDecomp import FCDecomp im...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 1822, 29572, 198, 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, 15553...
3.707865
89
from pydantic import BaseModel
[ 6738, 279, 5173, 5109, 1330, 7308, 17633, 628, 198 ]
3.666667
9
# Basic Auth User username = "" password = "" basic_auth = "Basic " # Application api_token = "" namespace = ""
[ 2, 14392, 26828, 11787, 198, 29460, 796, 13538, 198, 28712, 796, 13538, 198, 35487, 62, 18439, 796, 366, 26416, 366, 198, 198, 2, 15678, 198, 15042, 62, 30001, 796, 13538, 198, 14933, 10223, 796, 13538, 198 ]
3.138889
36
import pandas as pd import numpy as np import h5py import scipy.signal np.random.seed(1) if __name__=="__main__": main()
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 289, 20, 9078, 220, 198, 11748, 629, 541, 88, 13, 12683, 282, 198, 198, 37659, 13, 25120, 13, 28826, 7, 16, 8, 198, 220, 220, 220, 220, 628, 198, 361...
2.345455
55
# import curses # import datetime # # stdscr = curses.initscr() # curses.noecho() # stdscr.nodelay(1) # set getch() non-blocking # # stdscr.addstr(0,0,"Press \"p\" to show count, \"q\" to exit...") # line = 1 # try: # while 1: # c = stdscr.getch() # if c == ord('p'): # stdsc...
[ 2, 1330, 43878, 201, 198, 2, 1330, 4818, 8079, 201, 198, 2, 201, 198, 2, 14367, 1416, 81, 796, 43878, 13, 259, 896, 6098, 3419, 201, 198, 2, 43878, 13, 77, 2577, 6679, 3419, 201, 198, 2, 14367, 1416, 81, 13, 77, 375, 417, 323, ...
2.093324
1,393
from abc import ABCMeta, abstractmethod from datetime import datetime from typing import Callable, Set, Union from backends.software_package import SoftwarePackage from backends.software_version import SoftwareVersion class Provider(metaclass=ABCMeta): """ The abstract base class for any provider. A pro...
[ 6738, 450, 66, 1330, 9738, 48526, 11, 12531, 24396, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 19720, 1330, 4889, 540, 11, 5345, 11, 4479, 198, 198, 6738, 736, 2412, 13, 43776, 62, 26495, 1330, 10442, 27813, 198, 6738, 736, 2...
2.943038
474
# -*- coding: utf-8 -*- # @Time : 2020/2/16 17:00 # @Author : MLee # @File : forms.py from django.forms import ModelForm from .models import SubscriberInfoModel
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2488, 7575, 220, 220, 220, 1058, 12131, 14, 17, 14, 1433, 1596, 25, 405, 198, 2, 2488, 13838, 220, 1058, 10373, 1453, 198, 2, 2488, 8979, 220, 220, 220, 1058, 510...
2.463768
69
#!/usr/bin/python # # (C) 2019 Riad S. Wahby <rsw@cs.stanford.edu> # # pure Python implementation of curve ops for Ell2 on BLS12-381 import sys from consts import p, q from fields import Fq, Fq2 if sys.version_info[0] < 3: sys.exit("This script requires Python3 or PyPy3") ### ## generators for BLS signatures ##...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 198, 2, 357, 34, 8, 13130, 30385, 324, 311, 13, 35893, 1525, 1279, 81, 2032, 31, 6359, 13, 14192, 3841, 13, 15532, 29, 198, 2, 198, 2, 5899, 11361, 7822, 286, 12133, 39628, 329, 7122, ...
2.215215
1,998
""" Wrappers for generated PB """ from .feature_pb2 import Feature, Features, Value, List, Struct def feature(val, var_type=Feature.Variable.CATEGORICAL, var_mode=Feature.Modality.STATIC): """ Create feature message :param val: :param var_type: :param var_mode: :return: """ f = Feature() ...
[ 37811, 27323, 11799, 329, 7560, 30524, 198, 37811, 198, 6738, 764, 30053, 62, 40842, 17, 1330, 27018, 11, 17571, 11, 11052, 11, 7343, 11, 32112, 628, 198, 4299, 3895, 7, 2100, 11, 1401, 62, 4906, 28, 38816, 13, 43015, 13, 34, 6158, ...
2.290026
762
import os import io import platform import json import nltk import heapq import time from rich.progress import ( TextColumn, BarColumn, Progress, TimeRemainingColumn, TimeElapsedColumn ) from rich import print from rich import box from rich.panel import Panel from math import sqrt from bs4 import Be...
[ 11748, 28686, 198, 11748, 33245, 198, 11748, 3859, 198, 11748, 33918, 198, 11748, 299, 2528, 74, 198, 11748, 24575, 80, 198, 11748, 640, 198, 6738, 5527, 13, 33723, 1330, 357, 198, 220, 220, 220, 8255, 39470, 11, 198, 220, 220, 220, 2...
2.389055
1,334
# This script can be used for 'manually' uploading CANedge log files from an SD to S3. # The script includes S3 meta data such as firmware and SD timestamp and correctly derives S3 key. import mdf_iter import canedge_browser from pathlib import Path import boto3 from botocore.client import Config from s3transfer impor...
[ 2, 770, 4226, 460, 307, 973, 329, 705, 805, 935, 6, 33794, 15628, 14907, 2604, 3696, 422, 281, 9834, 284, 311, 18, 13, 198, 2, 383, 4226, 3407, 311, 18, 13634, 1366, 884, 355, 18779, 290, 9834, 41033, 290, 9380, 37453, 311, 18, 19...
2.660978
879
from __future__ import absolute_import, division, print_function from warnings import warn import pandas as pd import statsmodels.formula.api as smf from ..doctools import document from .stat import stat # method_args are any of the keyword args (other than q) for # statsmodels.regression.quantile_regression.Quant...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 198, 198, 6738, 14601, 1330, 9828, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 9756, 27530, 13, 687, 4712, 13, 15042, 355, 895, 69, 198, 198, 6...
2.572864
597
# MIT License # Copyright (c) 2021 Rene Jean Corneille # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, m...
[ 2, 17168, 13789, 198, 198, 2, 15069, 357, 66, 8, 33448, 371, 1734, 11320, 2744, 710, 8270, 198, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 198, 2, 286, 428, 3788, 290, 3917, 10...
3.005464
549
from discord.ext import commands import requests import os from ..core.cog_config import CogExtension # This extension is for school h.w. of phantom0174. data_prefix = { "0": "天氣描述", "1": "最高溫度", "2": "最低溫度", "3": "體感描述", "4": "降水機率" } data_suffix = { "0": "", "1": "度", "2": "度", ...
[ 6738, 36446, 13, 2302, 1330, 9729, 198, 11748, 7007, 198, 11748, 28686, 198, 6738, 11485, 7295, 13, 66, 519, 62, 11250, 1330, 327, 519, 11627, 3004, 628, 198, 2, 770, 7552, 318, 329, 1524, 289, 13, 86, 13, 286, 36381, 486, 4524, 13,...
1.714286
203
import os import flask import logging, logging.handlers from celery import Celery def configure_logger(app): ''' Configures the app's logger object. ''' app.logger.removeHandler(flask.logging.default_handler) formatter = logging.Formatter( '%(asctime)s %(levelname)s: [in %(pathname)s:%(line...
[ 11748, 28686, 198, 11748, 42903, 198, 11748, 18931, 11, 18931, 13, 4993, 8116, 198, 6738, 18725, 1924, 1330, 15248, 1924, 198, 198, 4299, 17425, 62, 6404, 1362, 7, 1324, 2599, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 17056, ...
2.572282
837
# -*- coding: utf-8 -*- from trello import util from orchester.ConfigHelper import get_config_data, pick if __name__ == '__main__': generate()
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 2054, 18798, 1330, 7736, 198, 6738, 17771, 1706, 13, 16934, 47429, 1330, 651, 62, 11250, 62, 7890, 11, 2298, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, ...
2.777778
54
# Copyright (c) MONAI Consortium # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, so...
[ 2, 15069, 357, 66, 8, 25000, 20185, 42727, 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...
2.528509
2,280