content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
# File: oletools_connector.py # Copyright (c) 2021 Splunk Inc. # # Licensed under Apache 2.0 (https://www.apache.org/licenses/LICENSE-2.0.txt) # Python 3 Compatibility imports from __future__ import print_function, unicode_literals # Phantom App imports import phantom.app as phantom from phantom.base_connector import...
[ 2, 9220, 25, 267, 1616, 10141, 62, 8443, 273, 13, 9078, 198, 2, 15069, 357, 66, 8, 33448, 13341, 2954, 3457, 13, 198, 2, 198, 2, 49962, 739, 24843, 362, 13, 15, 357, 5450, 1378, 2503, 13, 43073, 13, 2398, 14, 677, 4541, 14, 43, ...
3.248649
185
# -*- coding: utf-8 -*- from mock import patch from tests import TestCase from yarn_api_client.node_manager import NodeManager from yarn_api_client.errors import IllegalArgumentError @patch('yarn_api_client.node_manager.NodeManager.request')
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 15290, 1330, 8529, 198, 6738, 5254, 1330, 6208, 20448, 198, 198, 6738, 21181, 62, 15042, 62, 16366, 13, 17440, 62, 37153, 1330, 19081, 13511, 198, 6738, 21181, 62, ...
3.266667
75
#!/usr/bin/env python import netCDF4 as nc import numpy as np import sys, json import pylab as pl ########################################## # Soil data taken from Cesar Observatory # ########################################## # soil temperature data obs = nc.Dataset('observations/cesar_soil_heat_lb1_t10_v1.0_2017...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 2010, 34, 8068, 19, 355, 299, 66, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 25064, 11, 33918, 198, 11748, 279, 2645, 397, 355, 458, 198, 198, 29113, 7804, 2235, 198, ...
2.167464
2,299
""" Provide errors for command line interface. """ class NotSupportedOsToGetNodePrivateKeyError(Exception): """ Operating system is not supported to get the node's private key error. """ class NotSupportedBetError(Exception): """ The following bet is not supported to be set as masternode betting...
[ 37811, 198, 15946, 485, 8563, 329, 3141, 1627, 7071, 13, 198, 37811, 628, 198, 4871, 1892, 48181, 16748, 2514, 3855, 19667, 29067, 9218, 12331, 7, 16922, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 24850, 1080, 318, 407, 4855, ...
3.556701
97
""" Suppose you have a bar with n seats in a row. Unfriendly people arrive and seat themselves randomly. Since they are unfriendly, they will not sit next to anyone who is already seated. What is the expected occupancy fraction when no one else can be seated? """ import numpy as np from fractions import Fraction EMP...
[ 37811, 198, 15979, 577, 345, 423, 257, 2318, 351, 299, 8632, 287, 257, 5752, 13, 791, 13120, 661, 9240, 198, 392, 5852, 2405, 15456, 13, 4619, 484, 389, 3684, 1289, 306, 11, 484, 481, 407, 198, 48937, 1306, 284, 2687, 508, 318, 1541...
2.522786
3,072
from rest_framework import status from rest_framework.test import APITestCase from .. import models from .. import serializers
[ 6738, 1334, 62, 30604, 1330, 3722, 198, 6738, 1334, 62, 30604, 13, 9288, 1330, 3486, 2043, 395, 20448, 198, 6738, 11485, 1330, 4981, 198, 6738, 11485, 1330, 11389, 11341, 628, 198 ]
4.16129
31
from setuptools import setup setup( name='InCollege', version='0.1.0', author='Robert Andion, Dana Aljirudi, Daniel Arvelo Concepcion, Nathaniel Aldino, Saif Alkaabi', author_email='randion@usf.edu', packages=['src'], scripts=[], url='https://github.com/RobertAndion/InCollege', license=...
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 11639, 818, 38951, 3256, 198, 220, 220, 220, 2196, 11639, 15, 13, 16, 13, 15, 3256, 198, 220, 220, 220, 1772, 11639, 19156, 843, 295, 11, 22937, 978,...
2.484848
198
"""Transfer a ball between two playfields. E.g. lower to upper playfield via a ramp. """ import asyncio from mpf.core.system_wide_device import SystemWideDevice class PlayfieldTransfer(SystemWideDevice): """Device which move a ball from one playfield to another.""" config_section = 'playfield_transfers' ...
[ 37811, 43260, 257, 2613, 1022, 734, 711, 25747, 13, 198, 198, 36, 13, 70, 13, 2793, 284, 6727, 711, 3245, 2884, 257, 10454, 13, 198, 37811, 198, 11748, 30351, 952, 198, 198, 6738, 29034, 69, 13, 7295, 13, 10057, 62, 4421, 62, 25202,...
2.555556
711
"""Add console port column to instances Revision ID: 7a3e0c7935c2 Revises: a0d4334c57bd Create Date: 2020-04-01 11:29:28.958814 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '7a3e0c7935c2' down_revision = 'a0d4334c57bd' branch_labels = None depends_on = None ...
[ 37811, 4550, 8624, 2493, 5721, 284, 10245, 198, 198, 18009, 1166, 4522, 25, 767, 64, 18, 68, 15, 66, 3720, 2327, 66, 17, 198, 18009, 2696, 25, 257, 15, 67, 19, 31380, 66, 3553, 17457, 198, 16447, 7536, 25, 12131, 12, 3023, 12, 486...
2.458015
131
from base import * from test_custom_func import get_dct from multiprocessing import Process,Manager if __name__=="__main__": recv_list=multiprocessing.Queue() send_list=multiprocessing.Queue() route=dict() ms=micro_service(recv_list,send_list,route) ms.run()
[ 6738, 2779, 1330, 1635, 198, 6738, 1332, 62, 23144, 62, 20786, 1330, 220, 651, 62, 67, 310, 198, 6738, 18540, 305, 919, 278, 1330, 10854, 11, 13511, 628, 628, 198, 361, 11593, 3672, 834, 855, 1, 834, 12417, 834, 1298, 198, 220, 220,...
2.572727
110
""" Script for creating an RL agent for the atari breakout game Use of OpenAI GYM for the Environment Use of PyTorch for the Neural Networks (Obviously :p :D) """ import argparse import os import pickle import random from collections import namedtuple import cv2 import gym import numpy as np import torch as t...
[ 37811, 12327, 329, 4441, 281, 45715, 5797, 329, 262, 379, 2743, 31661, 983, 198, 220, 220, 220, 5765, 286, 4946, 20185, 402, 56, 44, 329, 262, 9344, 198, 220, 220, 220, 5765, 286, 9485, 15884, 354, 329, 262, 47986, 27862, 357, 20670, ...
2.407606
3,550
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import annotations import itertools import os from abc import ABC, ABCMeta, abstractmethod from dataclasses import dataclass from typing import ClassVar, Iterable from pa...
[ 2, 15069, 1946, 41689, 1628, 20420, 357, 3826, 27342, 9865, 3843, 20673, 13, 9132, 737, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 3826, 38559, 24290, 737, 198, 198, 6738, 11593, 37443, 834, 1330, 37647, 198, ...
3.01022
1,272
# from cobra_hdwallet import HDWallet # from unittest import TestCase # # # class UnittestHDWallet(TestCase, HDWallet): # # def test_generate_mnemonic(self): # # enMnemonic = self.generate_mnemonic('english') # # enCheck = self.check_mnemonic(enMnemonic, 'english') # # self.assertTrue(enChec...
[ 2, 422, 22843, 430, 62, 31298, 44623, 1330, 5572, 47152, 198, 2, 422, 555, 715, 395, 1330, 6208, 20448, 198, 2, 198, 2, 198, 2, 1398, 791, 715, 395, 10227, 47152, 7, 14402, 20448, 11, 5572, 47152, 2599, 198, 2, 198, 2, 220, 220, ...
2.286267
517
import hashlib import logging import os import re import tarfile import traceback from functools import reduce from io import StringIO from pathlib import Path from typing import Union, List from urllib.request import pathname2url import requests from dug.core import get_parser, get_plugin_manager, DugConcept from dug...
[ 11748, 12234, 8019, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 13422, 7753, 198, 11748, 12854, 1891, 198, 6738, 1257, 310, 10141, 1330, 4646, 198, 6738, 33245, 1330, 10903, 9399, 198, 6738, 3108, 8019, 1330, 10644, ...
2.359429
1,750
# ------------------------------------------------------------------------------ # Copyright (c) Microsoft # Licensed under the MIT License. # Written by Bin Xiao (Bin.Xiao@microsoft.com) # ------------------------------------------------------------------------------ from __future__ import absolute_import from __futu...
[ 2, 16529, 26171, 198, 2, 15069, 357, 66, 8, 5413, 198, 2, 49962, 739, 262, 17168, 13789, 13, 198, 2, 22503, 416, 20828, 28249, 357, 33, 259, 13, 55, 13481, 31, 40485, 13, 785, 8, 198, 2, 16529, 26171, 198, 198, 6738, 11593, 37443,...
4.025
280
from setuptools import setup, find_packages # To use a consistent encoding from codecs import open from os import path import numpy here = path.abspath(path.dirname(__file__)) # Get the long description from the README file with open(path.join(here, "README.md"), encoding="utf-8") as f: long_description = f.read...
[ 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 198, 2, 1675, 779, 257, 6414, 21004, 198, 6738, 40481, 82, 1330, 1280, 198, 6738, 28686, 1330, 3108, 198, 11748, 299, 32152, 198, 198, 1456, 796, 3108, 13, 397, 2777, 776,...
2.665689
341
import time from server import app from moviepy.editor import * from ibm_watson import SpeechToTextV1 from ibm_watson.websocket import RecognizeCallback, AudioSource from server.services.cos import multi_part_upload import json, os
[ 11748, 640, 198, 6738, 4382, 1330, 598, 198, 6738, 3807, 9078, 13, 35352, 1330, 1635, 198, 6738, 24283, 76, 62, 86, 13506, 1330, 24709, 2514, 8206, 53, 16, 220, 198, 6738, 24283, 76, 62, 86, 13506, 13, 732, 1443, 5459, 1330, 31517, ...
3.455882
68
from dependency_injector import containers, providers from tarkov.launcher.accounts import AccountService
[ 6738, 20203, 62, 259, 752, 273, 1330, 16472, 11, 9549, 198, 198, 6738, 256, 668, 709, 13, 38722, 2044, 13, 23317, 82, 1330, 10781, 16177, 628 ]
4.153846
26
# The contents of this file are automatically written by # tools/generate_schema_wrapper.py. Do not modify directly. from gosling.schemapi import SchemaBase, Undefined, _subclasses import pkgutil import json def load_schema(): """Load the json schema associated with this module's functions""" return json.loa...
[ 2, 383, 10154, 286, 428, 2393, 389, 6338, 3194, 416, 198, 2, 4899, 14, 8612, 378, 62, 15952, 2611, 62, 48553, 13, 9078, 13, 2141, 407, 13096, 3264, 13, 198, 198, 6738, 308, 418, 1359, 13, 1416, 4411, 15042, 1330, 10011, 2611, 14881,...
2.685397
13,881
from ...models.models import Committee from ..default_schema import DefaultSchema from ..generics import CreateAction from ..register import register_action @register_action("committee.create") class CommitteeCreate(CreateAction): """ Action to create committees. """ model = Committee() schema = ...
[ 6738, 2644, 27530, 13, 27530, 1330, 4606, 198, 6738, 11485, 12286, 62, 15952, 2611, 1330, 15161, 27054, 2611, 198, 6738, 11485, 8612, 873, 1330, 13610, 12502, 198, 6738, 11485, 30238, 1330, 7881, 62, 2673, 628, 198, 31, 30238, 62, 2673, ...
3.517857
112
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Description ---------- This is the main file of aplication Informations ---------- Author: Eduardo M. de Morais Maintainer: Email: emdemor415@gmail.com Copyright: Credits: License: Version: Status: in development """ if __name__ ==...
[ 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, 37811, 198, 11828, 198, 35937, 198, 1212, 318, 262, 1388, 2393, 286, 257, 489, 3299, 198, 198, 818, 687, 602...
2.562044
137
import sys from setuptools import setup, find_packages if sys.version_info < (2, 7): sys.stdout.write("At least Python 2.7 is required.\n") sys.exit(1) with open('README.rst') as f: long_description = f.read() setup( name='xopen', use_scm_version={'write_to': 'src/xopen/_version.py'}, setup_r...
[ 11748, 25064, 198, 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 198, 361, 25064, 13, 9641, 62, 10951, 1279, 357, 17, 11, 767, 2599, 198, 220, 220, 220, 25064, 13, 19282, 448, 13, 13564, 7203, 2953, 1551, 11361, 362, ...
2.451977
531
N = int(input()) S = input() if S.find('1') % 2 == 0: print('Takahashi') else: print('Aoki')
[ 45, 796, 493, 7, 15414, 28955, 198, 50, 796, 5128, 3419, 198, 198, 361, 311, 13, 19796, 10786, 16, 11537, 4064, 362, 6624, 657, 25, 198, 220, 220, 220, 3601, 10786, 51, 461, 993, 12144, 11537, 198, 17772, 25, 198, 220, 220, 220, 3...
2.081633
49
import os if not os.path.exists("data"): os.mkdir("data") if not os.path.exists("data/about"): os.mkdir("data/about") if not os.path.exists("data/father"): os.mkdir("data/father") for filename in os.listdir("raw_data"): full_filename = f"raw_data/{filename}" if "About" in filename: dest_file...
[ 11748, 28686, 198, 361, 407, 28686, 13, 6978, 13, 1069, 1023, 7203, 7890, 1, 2599, 198, 220, 220, 220, 28686, 13, 28015, 15908, 7203, 7890, 4943, 198, 361, 407, 28686, 13, 6978, 13, 1069, 1023, 7203, 7890, 14, 10755, 1, 2599, 198, 2...
2.372449
196
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (c) 2020, NVIDIA CORPORATION. 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/li...
[ 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, 2, 15069, 357, 66, 8, 12131, 11, 15127, 23929, 44680, 6234, 13, 1439, 2489, 10395, 13, 198, 2, 198, 2, 499...
3.576087
184
from __future__ import print_function, absolute_import __author__ = 'Michael Redmond' from .mr_data_table import MrDataTable, MrDataTable2
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 11, 4112, 62, 11748, 198, 198, 834, 9800, 834, 796, 705, 13256, 49420, 6, 198, 198, 6738, 764, 43395, 62, 7890, 62, 11487, 1330, 1770, 6601, 10962, 11, 1770, 6601, 10962, 17, 198 ]
3.439024
41
from kivy.uix.boxlayout import BoxLayout from kivy.uix.label import Label from kivy.uix.button import Button from kivy.properties import StringProperty class ConfirmationDialog(BoxLayout): '''ConfirmationDialog shows a confirmation message with two buttons "Yes" and "No". It may be used for confirming user...
[ 6738, 479, 452, 88, 13, 84, 844, 13, 3524, 39786, 1330, 8315, 32517, 198, 6738, 479, 452, 88, 13, 84, 844, 13, 18242, 1330, 36052, 198, 6738, 479, 452, 88, 13, 84, 844, 13, 16539, 1330, 20969, 198, 6738, 479, 452, 88, 13, 48310, ...
2.808036
224
from django.db import models import datetime as dt from django.contrib.auth.models import User from tinymce.models import HTMLField
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 11748, 4818, 8079, 355, 288, 83, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 6738, 7009, 76, 344, 13, 27530, 1330, 11532, 15878, 198 ]
3.473684
38
import numpy as np import scipy import scipy.stats # if __name__ == "__main__": # # pars = [-5,10,0.1] # # data = [] # for i in range(1000): # if np.random.random() < 0.5: # data += [np.random.normal()*pars[2] + pars[0]] # else: # data += [np.rando...
[ 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 629, 541, 88, 201, 198, 11748, 629, 541, 88, 13, 34242, 201, 198, 201, 198, 201, 198, 201, 198, 2, 611, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 201, 198, 2, 201...
1.819005
221
#!/usr/bin/env python import pandas as pd import requests import os import requests from urllib.parse import urljoin from bs4 import BeautifulSoup import random import time df = pd.read_csv("metadata.csv") #Don't download research papers with non-commercial license. df.loc[df['license'] != "no-cc"] df.loc[df["pmcid"]...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 7007, 198, 11748, 28686, 198, 11748, 7007, 198, 6738, 2956, 297, 571, 13, 29572, 1330, 19016, 22179, 198, 6738, 275, 82, 19, 1330, 237...
2.104116
1,239
# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from builtins import _test_sink, _test_source
[ 2, 15069, 357, 66, 8, 30277, 19193, 82, 11, 3457, 13, 290, 29116, 13, 198, 2, 198, 2, 770, 2723, 2438, 318, 11971, 739, 262, 17168, 5964, 1043, 287, 262, 198, 2, 38559, 24290, 2393, 287, 262, 6808, 8619, 286, 428, 2723, 5509, 13, ...
3.567164
67
import theano.tensor as T from lasagne import layers from ..utils import border_mask __all__ = [ 'MaskLayer', 'mask' ] mask = lambda exclude=0: lambda incoming: MaskLayer(incoming, exclude)
[ 11748, 262, 5733, 13, 83, 22854, 355, 309, 198, 198, 6738, 39990, 21080, 1330, 11685, 198, 198, 6738, 11485, 26791, 1330, 4865, 62, 27932, 198, 198, 834, 439, 834, 796, 685, 198, 220, 705, 45195, 49925, 3256, 705, 27932, 6, 198, 60, ...
3.16129
62
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import os import fontforge import psMat if __name__ == '__main__': if len(sys.argv) <= 4: print('Usage: {} <M+ 1mn file> <M+ 1m file> <GenEi Gothic file> <destination directory>'.format(sys.argv[0])) else: modify_mplus_1mn(sys.argv[...
[ 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, 25064, 198, 11748, 28686, 198, 11748, 10369, 30293, 198, 11748, 26692, 19044, 628, 628, 628, 198, 361, 11593,...
2.173653
167
import IceRayCpp
[ 11748, 6663, 19591, 34, 381, 201, 198 ]
2.571429
7
import os from typing import Iterable, Tuple import shutil from storage.kv_store import KeyValueStorage from state.util.utils import removeLockFiles try: import rocksdb except ImportError: print('Cannot import rocksdb, please install')
[ 11748, 28686, 198, 198, 6738, 19720, 1330, 40806, 540, 11, 309, 29291, 198, 198, 11748, 4423, 346, 198, 6738, 6143, 13, 74, 85, 62, 8095, 1330, 7383, 11395, 31425, 198, 6738, 1181, 13, 22602, 13, 26791, 1330, 4781, 25392, 25876, 198, ...
3.410959
73
# Generated by Django 3.2.9 on 2021-11-25 05:52 from django.db import migrations, models import uuid
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 24, 319, 33448, 12, 1157, 12, 1495, 8870, 25, 4309, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 334, 27112, 628 ]
2.861111
36
from TridiagonalMatrix import * from numpy import * from scipy.io import wavfile import scipy.fftpack import pylab import sys,os #do the gauss seidel iteration #but output some sound every now and then.. #A is some matrix that lets gauss seidel work #b is a vector that represents a .wav file of a pretty song #x0 ...
[ 6738, 833, 19830, 27923, 46912, 1330, 1635, 198, 198, 6738, 299, 32152, 1330, 1635, 198, 198, 6738, 629, 541, 88, 13, 952, 1330, 266, 615, 7753, 198, 198, 11748, 629, 541, 88, 13, 487, 83, 8002, 198, 198, 11748, 279, 2645, 397, 198,...
3.356481
216
# Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: https://docs.scrapy.org/en/latest/topics/item-pipeline.html # useful for handling different item types with a single interface from itemadapter import ItemAdapter import json
[ 2, 2896, 500, 534, 2378, 31108, 994, 198, 2, 198, 2, 2094, 470, 6044, 284, 751, 534, 11523, 284, 262, 7283, 3620, 62, 47, 4061, 3698, 1268, 1546, 4634, 198, 2, 4091, 25, 3740, 1378, 31628, 13, 1416, 2416, 88, 13, 2398, 14, 268, ...
3.5
82
from PyQt5.QtWidgets import QTreeWidgetItem from pycoin.key.BIP32Node import BIP32Node
[ 6738, 9485, 48, 83, 20, 13, 48, 83, 54, 312, 11407, 1330, 1195, 27660, 38300, 7449, 198, 6738, 12972, 3630, 13, 2539, 13, 47772, 2624, 19667, 1330, 347, 4061, 2624, 19667, 198 ]
2.71875
32
from firenado import service import logging from smtplib import SMTP, SMTPAuthenticationError from socket import gaierror from tornado.concurrent import run_on_executor logger = logging.getLogger(__name__)
[ 6738, 2046, 77, 4533, 1330, 2139, 198, 11748, 18931, 198, 6738, 895, 83, 489, 571, 1330, 9447, 7250, 11, 9447, 51, 4537, 315, 6925, 3299, 12331, 198, 6738, 17802, 1330, 31986, 959, 1472, 198, 6738, 33718, 13, 1102, 14421, 1330, 1057, ...
3.354839
62
""" This package contains every model that is returned from the Rest-API. """ from .dataset import Dataset, DatasetCreate, DatasetUpdate from .dataset_permission import DatasetPermission, DatasetPermissionCreate, DatasetPermissionUpdate from .energy_commodity import EnergyCommodity, EnergyCommodityCreate, EnergyCommodi...
[ 37811, 198, 1212, 5301, 4909, 790, 2746, 326, 318, 4504, 422, 262, 8324, 12, 17614, 13, 198, 37811, 198, 6738, 764, 19608, 292, 316, 1330, 16092, 292, 316, 11, 16092, 292, 316, 16447, 11, 16092, 292, 316, 10260, 198, 6738, 764, 19608,...
4.243848
447
# Copyright (c) 2015 Hewlett-Packard Development Company, L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
[ 2, 15069, 357, 66, 8, 1853, 30446, 15503, 12, 11869, 446, 7712, 5834, 11, 406, 13, 47, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 407, 779, 428, 239...
3.177143
700
# -*- mode:python; coding:utf-8 -*- # Copyright (c) 2021 IBM Corp. 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 # # https://www.apache.org/licenses/LICENSE-2.0 # ...
[ 2, 532, 9, 12, 4235, 25, 29412, 26, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 198, 2, 15069, 357, 66, 8, 33448, 19764, 11421, 13, 1439, 2489, 10395, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 3...
3.622754
334
"""Tests.""" from urllib.parse import urlparse from django.core import mail from django.test import TestCase from django.urls import reverse_lazy class ProfileUnitTests(TestCase): """Test for Unit Profile.""" def test_get_home_page(self): """Test home page.""" response = self.client.get(reve...
[ 37811, 51, 3558, 526, 15931, 198, 6738, 2956, 297, 571, 13, 29572, 1330, 19016, 29572, 198, 198, 6738, 42625, 14208, 13, 7295, 1330, 6920, 198, 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 42625, 14208, 13, 6371, 82, 1330...
2.299539
868
choise = input('digite alguma coisa: ') print('eu não entendi poderia escolher uma das opções: ') escolha = input()
[ 6679, 786, 796, 5128, 10786, 12894, 578, 435, 70, 7487, 763, 9160, 25, 705, 8, 198, 4798, 10786, 12496, 299, 28749, 920, 43109, 24573, 5142, 3671, 349, 372, 334, 2611, 288, 292, 1034, 16175, 127, 113, 274, 25, 705, 8, 198, 3798, 349...
2.446809
47
import uuid from memory_profiler import profile from episcan.manga import * #bad from episcan.scraper.japscan import Japscan @profile if __name__ == "__main__": main()
[ 11748, 334, 27112, 198, 6738, 4088, 62, 5577, 5329, 1330, 7034, 198, 6738, 2462, 2304, 272, 13, 76, 16484, 1330, 1635, 1303, 14774, 198, 6738, 2462, 2304, 272, 13, 1416, 38545, 13, 73, 499, 35836, 1330, 449, 499, 35836, 198, 198, 31, ...
2.806452
62
from pyowm import OWM import pyowm import os OWM_API_KEY = (os.environ['OWM_API_KEY']) OWM_CITY = (os.environ['OWM_CITY']) owm = OWM(OWM_API_KEY) mngr = owm.weather_manager() observation = mngr.weather_at_place(OWM_CITY) weather = observation.weather print('city="{}",'.format(OWM_CITY), end=" ") print('description=...
[ 6738, 12972, 322, 76, 1330, 440, 22117, 198, 11748, 12972, 322, 76, 198, 11748, 28686, 198, 198, 3913, 44, 62, 17614, 62, 20373, 796, 357, 418, 13, 268, 2268, 17816, 3913, 44, 62, 17614, 62, 20373, 6, 12962, 198, 3913, 44, 62, 34, ...
2.447761
201
palabra= "ahorcados" errores= 0 progreso= [] for i in range (len(palabra)): progreso.append(" - ") palabra_con_espacios = [] for char in palabra: palabra_con_espacios.append(char + ' ') letras_usadas= [] while errores <= 7: if errores == 0: print(' _____ ') print(' | | ') print(' |...
[ 18596, 397, 430, 28, 366, 993, 24449, 22484, 1, 198, 263, 305, 411, 28, 657, 198, 1676, 34239, 78, 28, 17635, 198, 1640, 1312, 287, 2837, 357, 11925, 7, 18596, 397, 430, 8, 2599, 198, 220, 220, 220, 1172, 411, 78, 13, 33295, 7203,...
1.709023
1,330
# Copyright 2021 The NetKet Authors - All rights reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law...
[ 2, 15069, 33448, 383, 3433, 42, 316, 46665, 532, 1439, 2489, 10395, 13, 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, ...
3.568627
204
# -*- coding: utf-8 -*- from __future__ import unicode_literals import pytest from parglare import Parser, Grammar from parglare.grammar import ASSOC_LEFT, ASSOC_RIGHT, DEFAULT_PRIORITY from parglare.exceptions import GrammarError, ParseError def test_single_terminal(): """ Test that grammar may be just a sin...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 11748, 12972, 9288, 198, 6738, 279, 853, 75, 533, 1330, 23042, 263, 11, 20159, 3876, 198, 6738, 279, 853...
2.337011
3,988
import requests import json import logging class BluemixLanguageTranslator(): """ Bluemix API Context Class Construction provides an API context with an API Key and URL Subsequent actions will use the context provided to the constructor """ def make_bluemixlang_request(self, method,...
[ 198, 11748, 7007, 220, 198, 11748, 33918, 198, 11748, 18931, 198, 198, 4871, 12391, 368, 844, 32065, 8291, 41880, 33529, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 12391, 368, 844, 7824, 30532, 5016, 220, 198, 220, 220, 220, 220, ...
2.623789
1,135
import os, sys filepath = sys.argv[1] with open(filepath) as f: lines = f.read().splitlines() lines2 = [] for line in lines: if line.strip().startswith("print "): line = line.replace("print ", "print(") line += ")" lines2.append(line) with open(filepath, "w") as f: f.write("\n".join(...
[ 11748, 28686, 11, 25064, 198, 198, 7753, 6978, 796, 25064, 13, 853, 85, 58, 16, 60, 198, 198, 4480, 1280, 7, 7753, 6978, 8, 355, 277, 25, 198, 220, 220, 220, 3951, 796, 277, 13, 961, 22446, 35312, 6615, 3419, 198, 198, 6615, 17, ...
2.316901
142
from config.database import db from models.Circle import Circle from models.UserToCircle import UserToCircle from exceptions import circle as e_circle
[ 6738, 4566, 13, 48806, 1330, 20613, 201, 198, 6738, 4981, 13, 31560, 293, 1330, 16291, 201, 198, 6738, 4981, 13, 12982, 2514, 31560, 293, 1330, 11787, 2514, 31560, 293, 201, 198, 6738, 13269, 1330, 9197, 355, 304, 62, 45597, 201, 198, ...
3.235294
51
""" Provider serializer class definitions """ from rest_framework import serializers from .models import Provider class ProviderSerializer(serializers.ModelSerializer): """ Serializer for service provider model """
[ 37811, 198, 29495, 11389, 7509, 1398, 17336, 198, 37811, 198, 6738, 1334, 62, 30604, 1330, 11389, 11341, 198, 198, 6738, 764, 27530, 1330, 32549, 628, 198, 4871, 32549, 32634, 7509, 7, 46911, 11341, 13, 17633, 32634, 7509, 2599, 198, 220,...
3.898305
59
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2016 pyReScene # # 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 ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 15069, 357, 66, 8, 1584, 12972, 3041, 36542, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3...
3.132948
692
# Merge positive and negative examples, add a polarity column and shuffle. # Download and process the dataset files. # load data into train and test dataframes train, test = download_and_load_datasets()
[ 198, 198, 2, 39407, 3967, 290, 4633, 6096, 11, 751, 257, 755, 6806, 5721, 290, 36273, 13, 628, 198, 2, 10472, 290, 1429, 262, 27039, 3696, 13, 628, 198, 2, 3440, 1366, 656, 4512, 290, 1332, 1366, 37805, 198, 27432, 11, 1332, 796, ...
3.924528
53
import os import nltk import re import glob from commonregex import CommonRegex from nltk.corpus import wordnet # Function used to setup status file to log the redation process # Function to update Redaction process and status # Function to write redacted data to new file withe extension .redacted # Function ...
[ 11748, 28686, 198, 11748, 299, 2528, 74, 198, 11748, 302, 198, 11748, 15095, 198, 6738, 2219, 260, 25636, 1330, 8070, 3041, 25636, 198, 6738, 299, 2528, 74, 13, 10215, 79, 385, 1330, 1573, 3262, 628, 198, 2, 15553, 973, 284, 9058, 372...
3.930556
144
"""Functions for fetching information from GitHub using the GitHub API""" import os from github import Github from ghtools.comment import ConversationComment, PRReviewComment, PRLineComment from ghtools.comment_time import CommentTime from ghtools.pull_request import PullRequest def fetch_pull_request(repo, pr_number...
[ 37811, 24629, 2733, 329, 21207, 278, 1321, 422, 21722, 1262, 262, 21722, 7824, 37811, 198, 198, 11748, 28686, 198, 6738, 33084, 1330, 38994, 198, 6738, 308, 4352, 10141, 13, 23893, 1330, 42427, 21357, 11, 4810, 14832, 21357, 11, 4810, 139...
2.266601
2,033
import shortstack.builder
[ 11748, 1790, 25558, 13, 38272, 628 ]
4.5
6
""" Please contact the author(s) of this library if you have any questions. Authors: Kai-Chieh Hsu ( kaichieh@princeton.edu ) This module implements reach-avoid reinforcement learning with double deep Q-network. It also supports the standard sum of discounted rewards (Lagrange cost) reinforcement learning. Here we ai...
[ 37811, 198, 5492, 2800, 262, 1772, 7, 82, 8, 286, 428, 5888, 611, 345, 423, 597, 2683, 13, 198, 30515, 669, 25, 22091, 12, 1925, 494, 71, 367, 2385, 357, 38387, 488, 494, 71, 31, 1050, 1939, 18483, 13, 15532, 1267, 198, 198, 1212,...
2.307893
8,032
import RPi.GPIO as GPIO import time channel = 17 GPIO.setmode(GPIO.BCM) GPIO.setup(channel, GPIO.IN) # let us know when the pin goes HIGH or LOW GPIO.add_event_detect(channel, GPIO.BOTH, bouncetime=300) # assign method to GPIO PIN, run function on change GPIO.add_event_callback(channel, callback) while True: time....
[ 11748, 25812, 72, 13, 16960, 9399, 355, 50143, 198, 11748, 640, 198, 198, 17620, 796, 1596, 198, 16960, 9399, 13, 2617, 14171, 7, 16960, 9399, 13, 2749, 44, 8, 198, 16960, 9399, 13, 40406, 7, 17620, 11, 50143, 13, 1268, 8, 198, 198,...
2.79661
118
"""Implementation of the service-side open-tracing interceptor.""" import sys import logging import re import grpc from grpc_opentracing import grpcext, ActiveSpanSource from grpc_opentracing._utilities import get_method_type, get_deadline_millis,\ log_or_wrap_request_or_iterator, RpcInfo import opentracing from ...
[ 37811, 3546, 32851, 286, 262, 2139, 12, 1589, 1280, 12, 2213, 4092, 15788, 273, 526, 15931, 198, 198, 11748, 25064, 198, 11748, 18931, 198, 11748, 302, 198, 198, 11748, 1036, 14751, 198, 6738, 1036, 14751, 62, 404, 298, 81, 4092, 1330, ...
3.495536
224
import unittest import fizzbuzz #from fizzbuzz import fizz_buzz class fizzBuzzTest(unittest.TestCase): """Testing the fizzbuzz""" """ """ def test_returns_fizz_when_divisible_by_three(self): """Test returns fizz when input is divisible by three""" self.assertEqual(fizzbuzz.fizz_buzz(3), 'fizz') #self.assertEq...
[ 11748, 555, 715, 395, 198, 11748, 277, 6457, 65, 4715, 198, 2, 6738, 277, 6457, 65, 4715, 1330, 277, 6457, 62, 65, 4715, 198, 198, 4871, 277, 6457, 48230, 14402, 7, 403, 715, 395, 13, 14402, 20448, 2599, 198, 197, 37811, 44154, 262,...
2.430328
244
"""Test cases for the config manager module.""" import pathlib import pytest from pytest_mock import MockerFixture from git_portfolio import config_manager as cm @pytest.fixture def mock_os_join_path(mocker: MockerFixture) -> MockerFixture: """Fixture for mocking os.path.join.""" return mocker.patch("os.pat...
[ 37811, 14402, 2663, 329, 262, 4566, 4706, 8265, 526, 15931, 198, 11748, 3108, 8019, 198, 198, 11748, 12972, 9288, 198, 6738, 12972, 9288, 62, 76, 735, 1330, 337, 12721, 37, 9602, 198, 198, 6738, 17606, 62, 634, 13652, 1330, 4566, 62, ...
2.365138
1,090
#!/usr/bin/env python3 # -*- coding: ascii -*- """ A script dumping Instant message logs in a format similar to the copy-paste pretty-printer. """ import sys, time import operator import instabot, id2time, scribe # Return msglist sorted in the order it would be put into by the Web client. # NOTE that messages' imme...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 355, 979, 72, 532, 9, 12, 198, 198, 37811, 198, 32, 4226, 30231, 24470, 3275, 17259, 287, 257, 5794, 2092, 284, 262, 4866, 12, 34274, 198, 37784, 12, ...
3.412587
286
""" Windows used with the roster (window displaying the contacts, and the one showing detailed info on the current selection) """ import logging log = logging.getLogger(__name__) from datetime import datetime from . import Win import common from config import config from contact import Contact, Resource from roster ...
[ 37811, 198, 11209, 973, 351, 262, 9354, 357, 17497, 19407, 262, 13961, 11, 290, 262, 198, 505, 4478, 6496, 7508, 319, 262, 1459, 6356, 8, 198, 37811, 198, 11748, 18931, 198, 6404, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, ...
4.020833
96
# -------------- from sklearn.model_selection import train_test_split from sklearn.preprocessing import MinMaxScaler import pandas as pd # Code starts here df = pd.read_csv(path) print(df.iloc[:,:5]) X = df.drop(df.columns[-1], axis=1) y = df.iloc[:,-1] X_train, X_test, y_train, y_test = train_test_split(X, y, test_siz...
[ 2, 220, 26171, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 4512, 62, 9288, 62, 35312, 198, 6738, 1341, 35720, 13, 3866, 36948, 1330, 1855, 11518, 3351, 36213, 198, 11748, 19798, 292, 355, 279, 67, 198, 2, 6127, 4940, 994, 198,...
2.746377
828
import math import numpy as np from pyproj import Proj
[ 11748, 10688, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 12972, 1676, 73, 1330, 1041, 73, 628, 628, 198 ]
3
20
import copy import collections as col import numpy as np # use relationship to generate partition # calculate pos # calculate core # attribute reduction using different matrix method # use equivalence matching method if __name__ == '__main__': main()
[ 11748, 4866, 201, 198, 11748, 17268, 355, 951, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 201, 198, 201, 198, 2, 779, 2776, 284, 7716, 18398, 201, 198, 201, 198, 201, 198, 2, 15284, 1426, 201, 198, 201, 198, 201, 198, 2, 1...
2.959596
99
""" 使用bcolz存储数据 设定定期计划任务,自动完成sql数据到bcolz的格式转换 使用bcolz默认参数压缩,初步测试结果表明,大型数据加载至少提速一倍 """ import os from shutil import rmtree import pandas as pd from functools import partial from logbook import Logger from odo import odo import re from cswd.utils import data_root from .base import STOCK_DB from .utils import _normali...
[ 37811, 198, 45635, 18796, 101, 65, 4033, 89, 27764, 246, 43636, 101, 46763, 108, 162, 235, 106, 198, 198, 164, 106, 122, 22522, 248, 22522, 248, 17312, 253, 164, 106, 94, 161, 7134, 20015, 119, 27950, 94, 171, 120, 234, 164, 229, 10...
1.741236
2,168
import sleepproxy.mdns as mdns import sleepproxy.arp as arp import sleepproxy.tcp as tcp
[ 11748, 14368, 381, 42059, 13, 9132, 5907, 355, 45243, 5907, 198, 11748, 14368, 381, 42059, 13, 5117, 355, 610, 79, 198, 11748, 14368, 381, 42059, 13, 83, 13155, 355, 48265, 198 ]
2.870968
31
"""Configure different execution environments""" import os postgres_local_base = os.environ.get('DATABASE_URL') or 'postgresql://postgres@localhost/research' basedir = os.path.abspath(os.path.dirname(__file__)) class Config: """Prepare configurations""" SECRET_KEY = os.getenv('SECRET_KEY', 'my_precious_secre...
[ 37811, 16934, 495, 1180, 9706, 12493, 37811, 198, 11748, 28686, 198, 198, 7353, 34239, 62, 12001, 62, 8692, 796, 28686, 13, 268, 2268, 13, 1136, 10786, 35, 1404, 6242, 11159, 62, 21886, 11537, 393, 705, 7353, 34239, 13976, 1378, 7353, 3...
2.784
375
# -*- coding: utf-8 -*- # @Author : DevinYang(pistonyang@gmail.com) import math from torch import nn from torch.nn.init import xavier_normal_, xavier_uniform_, \ kaiming_normal_, kaiming_uniform_ class XavierInitializer(object): """Initialize a model params by Xavier. Fills the input `Tensor` with valu...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2488, 13838, 220, 1058, 37081, 38663, 7, 79, 396, 1647, 648, 31, 14816, 13, 785, 8, 198, 198, 11748, 10688, 198, 6738, 28034, 1330, 299, 77, 198, 6738, 28034, 13, ...
2.238744
1,688
# Generated by Django 3.1.2 on 2020-10-06 18:34 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 17, 319, 12131, 12, 940, 12, 3312, 1248, 25, 2682, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
import os import pytest from mlflow.utils.autologging import _is_testing, _AUTOLOGGING_TEST_MODE_ENV_VAR @pytest.fixture @pytest.fixture
[ 11748, 28686, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 285, 1652, 9319, 13, 26791, 13, 2306, 928, 2667, 1330, 4808, 271, 62, 33407, 11, 4808, 39371, 33462, 38, 2751, 62, 51, 6465, 62, 49058, 62, 1677, 53, 62, 53, 1503, 628, 198...
2.465517
58
# https://leetcode.com/problems/maximum-product-subarray/ # seperate the list of nums into chunks using 0 as the delimiter # for each of the chunk # case 1: there are no negative numbers # case 2: even number of negative numbers # case 3: odd number of negative numbers # first two cases are simple # for case 3: calcul...
[ 2, 3740, 1378, 293, 316, 8189, 13, 785, 14, 1676, 22143, 14, 47033, 12, 11167, 12, 7266, 18747, 14, 198, 198, 2, 384, 30052, 262, 1351, 286, 997, 82, 656, 22716, 1262, 657, 355, 262, 46728, 2676, 198, 2, 329, 1123, 286, 262, 16058...
3.591195
159
import numpy as np matrix_a = np.random.randint(10, size=(2,3)) matrix_b = np.random.randint(10, size=(2,3)) matrix_c = np.random.randint(10, size=(3,4)) print('matrix_a', matrix_a) print('matrix_b', matrix_b) print('matrix_c', matrix_c) out1 = np.matmul(matrix_a, matrix_c) + np.matmul(matrix_b, matrix_c) out2 = ...
[ 11748, 299, 32152, 355, 45941, 220, 628, 198, 198, 6759, 8609, 62, 64, 796, 45941, 13, 25120, 13, 25192, 600, 7, 940, 11, 2546, 16193, 17, 11, 18, 4008, 198, 6759, 8609, 62, 65, 796, 45941, 13, 25120, 13, 25192, 600, 7, 940, 11, ...
2.116022
181
problemList = [1, 2, 3, 4, 5, 6, 5, 4, 3]
[ 45573, 8053, 796, 685, 16, 11, 362, 11, 513, 11, 604, 11, 642, 11, 718, 11, 642, 11, 604, 11, 513, 60 ]
1.863636
22
from distutils.core import setup , Extension from Cython.Build import cythonize from Cython.Distutils import build_ext CXXFLAGS = [] INCLUDE_DIRS = ['include'] CMDCLASS = {} EXT_MODULES = [] EXT_MODULES.append( Extension("cityhash", ["city.cc", "cityhash.pyx"], language="c++", extra_comp...
[ 6738, 1233, 26791, 13, 7295, 1330, 9058, 837, 27995, 198, 6738, 327, 7535, 13, 15580, 1330, 3075, 400, 261, 1096, 198, 6738, 327, 7535, 13, 20344, 26791, 1330, 1382, 62, 2302, 198, 34, 8051, 38948, 50, 796, 17635, 198, 1268, 5097, 52,...
2.201754
228
from datetime import datetime from backup_uploader.chain import BackupChain DIRECTORY_STRFTIME_FORMAT = 1 DIRECTORY_NAME = 0 DIRECTORY_CAPACITY = 2 DIRECTORY_COUNTER_MAX = 3
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 6738, 11559, 62, 25850, 263, 13, 7983, 1330, 35071, 35491, 198, 198, 17931, 23988, 15513, 62, 18601, 9792, 12789, 62, 21389, 1404, 796, 352, 198, 17931, 23988, 15513, 62, 20608, 796, 657, 19...
2.761194
67
# input_pipeline_individual_pedestrians_mix_all_data.py import os import torch import torch.utils.data import pickle import numpy as np import random from tqdm import tqdm
[ 2, 5128, 62, 79, 541, 4470, 62, 43129, 62, 9124, 395, 19151, 62, 19816, 62, 439, 62, 7890, 13, 9078, 198, 11748, 28686, 198, 11748, 28034, 198, 11748, 28034, 13, 26791, 13, 7890, 198, 11748, 2298, 293, 198, 11748, 299, 32152, 355, 4...
2.183673
98
solution = BasicCalculatorIi() assert X == solution.calculate( )
[ 82, 2122, 796, 14392, 9771, 3129, 1352, 40, 72, 3419, 198, 30493, 1395, 6624, 4610, 13, 9948, 3129, 378, 7, 1267 ]
3.047619
21
import os from urllib.parse import urlparse
[ 11748, 28686, 198, 6738, 2956, 297, 571, 13, 29572, 1330, 19016, 29572, 628 ]
3.461538
13
from abc import ABC, abstractmethod
[ 6738, 450, 66, 1330, 9738, 11, 12531, 24396, 628 ]
4.111111
9
import pprint import boto3 import json from botocore.exceptions import ClientError from src.utils import utils from src.utils import awsutils from src.ec2 import describe_instances if __name__ == '__main__': main()
[ 11748, 279, 4798, 201, 198, 11748, 275, 2069, 18, 201, 198, 11748, 33918, 201, 198, 6738, 10214, 420, 382, 13, 1069, 11755, 1330, 20985, 12331, 201, 198, 201, 198, 6738, 12351, 13, 26791, 1330, 3384, 4487, 201, 198, 6738, 12351, 13, 2...
2.623656
93
from django.conf.locale.en_AU.formats import * TIME_INPUT_FORMATS = [ '%H:%M:%S', # '14:30:59' ]
[ 6738, 42625, 14208, 13, 10414, 13, 17946, 1000, 13, 268, 62, 26830, 13, 687, 1381, 1330, 1635, 198, 198, 34694, 62, 1268, 30076, 62, 21389, 33586, 796, 685, 198, 220, 220, 220, 705, 4, 39, 25, 4, 44, 25, 4, 50, 3256, 220, 220, 2...
1.859649
57
# # PySNMP MIB module HH3C-RCP-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HH3C-RCP-MIB # Produced by pysmi-0.3.4 at Wed May 1 13:29:20 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019,...
[ 2, 198, 2, 9485, 15571, 7378, 337, 9865, 8265, 47138, 18, 34, 12, 7397, 47, 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, 14, 67, 61...
2.696671
5,677
from APIGoogleBooks import APIGoogleBooks from ElasticsearchWrapper import ElasticsearchWrapper from flask import Flask, render_template, request, jsonify import json class CustomFlask(Flask): ''' テンプレートのデリミタがVue.jsと競合するので、Flask側でデリミタを別の文字に変更する 参照:https://muunyblue.github.io/0b7acbba52fb92b2e9c818f7f56bac99.h...
[ 6738, 3486, 3528, 78, 2467, 30650, 1330, 3486, 3528, 78, 2467, 30650, 198, 6738, 48567, 12947, 36918, 2848, 1330, 48567, 12947, 36918, 2848, 198, 6738, 42903, 1330, 46947, 11, 8543, 62, 28243, 11, 2581, 11, 33918, 1958, 198, 11748, 33918,...
2.088474
1,232
import os import cv2 import torch from facelib import FaceDetector from pathlib import Path
[ 11748, 28686, 198, 11748, 269, 85, 17, 198, 11748, 28034, 198, 6738, 1777, 417, 571, 1330, 15399, 11242, 9250, 198, 6738, 3108, 8019, 1330, 10644, 628, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, ...
2.283019
53
import base64 import zmq
[ 11748, 2779, 2414, 198, 198, 11748, 1976, 76, 80, 198 ]
2.6
10
import os import rpyc from apscheduler.executors.pool import ThreadPoolExecutor from apscheduler.jobstores.memory import MemoryJobStore from apscheduler.jobstores.sqlalchemy import SQLAlchemyJobStore from dotenv import load_dotenv basedir = os.path.dirname(os.path.dirname(__file__)) load_dotenv(os.path.join(basedir, ...
[ 11748, 28686, 198, 198, 11748, 374, 9078, 66, 198, 6738, 257, 862, 1740, 18173, 13, 18558, 315, 669, 13, 7742, 1330, 14122, 27201, 23002, 38409, 198, 6738, 257, 862, 1740, 18173, 13, 21858, 43409, 13, 31673, 1330, 14059, 33308, 22658, 1...
2.458647
532
import glob import logging import os import yaml import mlflow import torch import pl_bolts import pytorch_lightning as pl import orion.client logger = logging.getLogger(__name__) STAT_FILE_NAME = 'stats.yaml' def train(**kwargs): # pragma: no cover """Training loop wrapper. Used to catch exception if Orion ...
[ 11748, 15095, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 331, 43695, 198, 198, 11748, 285, 1652, 9319, 198, 11748, 28034, 198, 11748, 458, 62, 28984, 912, 198, 11748, 12972, 13165, 354, 62, 2971, 768, 355, 458, 198, 11748, 393, 2...
2.379458
701
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
[ 2, 15069, 357, 66, 8, 33448, 350, 37382, 47, 37382, 46665, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845...
3.80226
177
from checkov.common.models.enums import CheckResult, CheckCategories from checkov.cloudformation.checks.resource.base_resource_check import BaseResourceCheck check = CodeBuildProjectEncryption()
[ 6738, 2198, 709, 13, 11321, 13, 27530, 13, 268, 5700, 1330, 6822, 23004, 11, 6822, 34, 26129, 198, 6738, 2198, 709, 13, 17721, 1161, 13, 42116, 13, 31092, 13, 8692, 62, 31092, 62, 9122, 1330, 7308, 26198, 9787, 628, 198, 9122, 796, ...
4.020408
49
from Crypto.PublicKey import ECC, RSA from Crypto.Hash import SHA256 from Crypto.Signature import DSS from nacl.encoding import HexEncoder as benc from nacl.public import PrivateKey, PublicKey from Crypto.Protocol.KDF import PBKDF2 import progressbar try: from .Sup import sha000 except: from Sup import sh...
[ 6738, 36579, 13, 15202, 9218, 1330, 412, 4093, 11, 42319, 201, 198, 6738, 36579, 13, 26257, 1330, 25630, 11645, 201, 198, 6738, 36579, 13, 11712, 1300, 1330, 360, 5432, 201, 198, 6738, 299, 37779, 13, 12685, 7656, 1330, 22212, 27195, 12...
2.569262
1,978
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'designer/headline.ui' # # Created: Sun Apr 9 04:34:36 2017 # by: pyside-uic 0.2.15 running on PySide 1.2.2 # # WARNING! All changes made in this file will be lost! from PySide import QtCore, QtGui
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 5178, 7822, 7560, 422, 3555, 334, 72, 2393, 705, 26124, 263, 14, 2256, 1370, 13, 9019, 6, 198, 2, 198, 2, 15622, 25, 3825, 2758, 220, 860, 8702, 25, 2682, ...
2.654206
107
import math def are_parallel(v1, v2): """ Determines whether two vectors are parallel """ zero = Vector(0, 0, 0) cross = cross_product(v1, v2) return zero == cross def are_orthogonal(v1, v2): """ Determines whether two vectors are orthogonal """ return dot_product(v1,...
[ 11748, 10688, 628, 198, 4299, 389, 62, 1845, 29363, 7, 85, 16, 11, 410, 17, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 360, 13221, 274, 1771, 734, 30104, 389, 10730, 198, 220, 220, 220, 37227, 198, 22...
2.140468
598
# -*- coding: utf-8 -*- # Generated by Django 1.11.11 on 2019-04-12 12:31 from __future__ import unicode_literals from django.db import migrations
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 1157, 13, 1157, 319, 13130, 12, 3023, 12, 1065, 1105, 25, 3132, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198...
2.709091
55
from PyQt5 import QtGui from PyQt5.QtWidgets import QTextBrowser, QPushButton from dependencies.html_format import monster_dict, spell_dict, item_dict, general_head, general_foot, not_srd from dependencies.auxiliaries import GlobalParameters from string import Template from RainyCore.spell import Spell35 from RainyCore...
[ 6738, 9485, 48, 83, 20, 1330, 33734, 8205, 72, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 54, 312, 11407, 1330, 1195, 8206, 46532, 11, 1195, 49222, 21864, 198, 6738, 20086, 13, 6494, 62, 18982, 1330, 9234, 62, 11600, 11, 4822, 62, 1...
3.504132
121
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 11, 15720, 602, 628 ]
2.891892
37