content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
# (c) Copyright IBM Corp. 2010, 2018. All Rights Reserved. # -*- coding: utf-8 -*- # pragma pylint: disable=unused-argument, no-self-use """Function implementation""" import logging from resilient_circuits import ResilientComponent, function, handler, StatusMessage, FunctionResult, FunctionError import fn_apility.util...
[ 2, 357, 66, 8, 15069, 19764, 11421, 13, 3050, 11, 2864, 13, 1439, 6923, 33876, 13, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 23864, 2611, 279, 2645, 600, 25, 15560, 28, 403, 1484, 12, 49140, 11, 645,...
2.473223
1,027
import torch TESSERACT_DIM = 2 TESSERACT_DEP = 2 BATCH_SIZE = 8 SEQ_LENGTH = 8 HIDDEN_SIZE = 8
[ 11748, 28034, 198, 198, 51, 7597, 1137, 10659, 62, 35, 3955, 796, 362, 198, 51, 7597, 1137, 10659, 62, 46162, 796, 362, 198, 33, 11417, 62, 33489, 796, 807, 198, 5188, 48, 62, 43, 49494, 796, 807, 198, 39, 2389, 41819, 62, 33489, ...
2.108696
46
from django.db.models.sql.subqueries import UpdateQuery as BaseUpdateQuery from django.core.exceptions import FieldError
[ 6738, 42625, 14208, 13, 9945, 13, 27530, 13, 25410, 13, 7266, 421, 10640, 1330, 10133, 20746, 355, 7308, 10260, 20746, 198, 6738, 42625, 14208, 13, 7295, 13, 1069, 11755, 1330, 7663, 12331 ]
3.75
32
from cv2selection import CV2Selection from cv2selection import QtGui import cv2
[ 6738, 269, 85, 17, 49283, 1330, 26196, 17, 4653, 1564, 198, 6738, 269, 85, 17, 49283, 1330, 33734, 8205, 72, 198, 11748, 269, 85, 17, 198 ]
3.076923
26
"""Actions are used for building complex interactions with smart contracts.""" from Arbie.Actions.action import Action, Store # noqa: F401 from Arbie.Actions.action_tree import ActionTree # noqa: F401 from Arbie.Actions.arbitrage import Arbitrage # noqa:F401 from Arbie.Actions.path_finder import PathFinder # noqa:...
[ 37811, 32, 2733, 389, 973, 329, 2615, 3716, 12213, 351, 4451, 8592, 526, 15931, 198, 198, 6738, 943, 12590, 13, 32, 2733, 13, 2673, 1330, 7561, 11, 9363, 220, 1303, 645, 20402, 25, 376, 21844, 198, 6738, 943, 12590, 13, 32, 2733, 13...
2.995349
215
# -*- coding: utf-8 -*- import email from email.header import decode_header # 只读取收件箱中的未读邮件
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 3053, 198, 6738, 3053, 13, 25677, 1330, 36899, 62, 25677, 628, 198, 2, 10263, 237, 103, 46237, 119, 20998, 244, 162, 242, 114, 20015, 114, 163, 106, 109, 40792, ...
1.703704
54
#!/usr/bin/env python3.6 # -*- coding: utf-8 -*- import asyncio import json import logging import re from typing import List, Tuple, Dict from datetime import datetime from tqdm import tqdm from parser.nsfw import detect_nsfw import asyncpg from util.categories import guess_metainfo from parser.search import make_tsv...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 13, 21, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 30351, 952, 198, 11748, 33918, 198, 11748, 18931, 198, 11748, 302, 198, 6738, 19720, 1330, 7343, 11,...
2.716
250
zaimportuj collections zaimportuj warnings spróbuj: zaimportuj ssl wyjąwszy ImportError: # pragma: no cover ssl = Nic z . zaimportuj compat z . zaimportuj protocols z . zaimportuj transports z .log zaimportuj logger inaczej: # Fallback dla Python 3.3. sslcontext = ssl.SSLContext(ssl.PROTO...
[ 89, 1385, 634, 23577, 17268, 198, 89, 1385, 634, 23577, 14601, 198, 34975, 10205, 11110, 73, 25, 198, 220, 220, 220, 1976, 1385, 634, 23577, 264, 6649, 198, 21768, 73, 128, 227, 18504, 7357, 17267, 12331, 25, 220, 1303, 23864, 2611, 2...
2.105353
10,014
from .RegSearch import RegSearch
[ 6738, 764, 8081, 18243, 1330, 3310, 18243, 628 ]
4.25
8
#! /usr/bin/env python # -*- coding: utf8 -*- import mock import pytest import sys from os import path sys.path.append( path.dirname( path.dirname( path.abspath(__file__) ) ) ) import bemenu_extended as d menu = d.bemenu()
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 23, 532, 9, 12, 198, 198, 11748, 15290, 198, 11748, 12972, 9288, 198, 11748, 25064, 198, 6738, 28686, 1330, 3108, 198, 198, 17597, 13, 6978, 1...
2.550562
89
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from math import pi print(ring_area(5, 3))
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 201, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 201, 198, 6738, 10688, 1330, 31028, 201, 198, 201, 198, 201, 198, 201, 198, 4798, 7, 1806, 62, 20337, ...
1.961538
52
#!/usr/bin/env python # -*- coding:Utf-8 -*- """The ants module entry point. """ import config import ant import farm import mine import playground import display import logging import random import utils __author__ = "Doug Le Tough" __copyright__ = "Copyright 2017, Doug Le Tough" __credits__ = ["Doug Le Tough",] __...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 18274, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 464, 27842, 8265, 5726, 966, 13, 198, 37811, 198, 198, 11748, 4566, 198, 11748, 1885, 198, 11748, 5318, 19...
2.827534
661
from math import sin, cos, tan, radians a = radians(float(input('informe o ângulo: '))) print(' o seno é: {:.2f}\n o cosseno é: {:.2f}\n a tangente é: {:.2f}'.format(sin(a), cos(a), tan(a)))
[ 6738, 10688, 1330, 7813, 11, 8615, 11, 25706, 11, 2511, 1547, 201, 198, 64, 796, 2511, 1547, 7, 22468, 7, 15414, 10786, 259, 687, 68, 267, 6184, 95, 782, 43348, 25, 705, 22305, 201, 198, 4798, 10786, 267, 3308, 78, 38251, 25, 46110,...
2.229885
87
from collections import * def collections_nametuple(): """ namedtuple是一个函数,它用来创建一个自定义的tuple对象,并且规定了tuple元素的个数,并可以用属性而不是索引来引用tuple的某个元素。 """ Point = namedtuple('Point', ['x', 'y']) p = Point(1, 2) print('p.x: ' + str(p.x)) print('isInstance(p, Point): ' + str(isinstance(p, Point))) print('isInstance(p, tuple):...
[ 6738, 17268, 1330, 1635, 628, 198, 4299, 17268, 62, 7402, 316, 29291, 33529, 198, 197, 37811, 198, 197, 13190, 83, 29291, 42468, 31660, 10310, 103, 49035, 121, 46763, 108, 171, 120, 234, 22522, 225, 18796, 101, 30266, 98, 26344, 249, 16...
1.425101
741
from flask_restx import Model, fields competitorModel = Model( "Competitor", { "id": fields.Integer( description="ID of the Competitor", example=7, ), "name": fields.String( description="Name of the Competitor", required=True, ...
[ 6738, 42903, 62, 2118, 87, 1330, 9104, 11, 7032, 198, 198, 5589, 316, 2072, 17633, 796, 9104, 7, 198, 220, 220, 220, 366, 7293, 316, 2072, 1600, 198, 220, 220, 220, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 366, 312, 1298, 703...
2.207018
570
from .my_bot import My_Bot if __name__ == "__main__": My_Bot().run()
[ 6738, 764, 1820, 62, 13645, 1330, 2011, 62, 20630, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 2011, 62, 20630, 22446, 5143, 3419, 198 ]
2.3125
32
from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from database_setup import Country, Base, Missile, User engine = create_engine('sqlite:///lots_of_missiles.db') # Bind the engine to the metadata of the Base class so that the # declaratives can be accessed through a DBSession instance Base....
[ 6738, 44161, 282, 26599, 1330, 2251, 62, 18392, 198, 6738, 44161, 282, 26599, 13, 579, 1330, 6246, 10297, 198, 198, 6738, 6831, 62, 40406, 1330, 12946, 11, 7308, 11, 25350, 11, 11787, 198, 198, 18392, 796, 2251, 62, 18392, 10786, 25410,...
2.247316
2,608
#!/usr/bin/env python import rospy from flexbe_core import EventState, Logger from flexbe_core.proxy import ProxyActionClient from actionlib_msgs.msg import GoalStatus from flexible_manipulation_msgs.msg import StateValidationAction, StateValidationGoal from moveit_msgs.msg import Constraints, RobotState, ContactI...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 686, 2777, 88, 198, 198, 6738, 7059, 1350, 62, 7295, 1330, 8558, 9012, 11, 5972, 1362, 198, 198, 6738, 7059, 1350, 62, 7295, 13, 36436, 1330, 38027, 12502, 11792, 198, 198,...
2.3045
2,578
from network.Modules import * __all__ = ['Decoder']
[ 6738, 3127, 13, 5841, 5028, 1330, 1635, 198, 198, 834, 439, 834, 796, 37250, 10707, 12342, 20520, 628, 628, 628 ]
2.9
20
#!/usr/bin/env python3 import warnings import bpy # TODO Replace all messages with print_message. # Possibly shift to class when blendernc is initiated. and move to logging.
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 14601, 198, 198, 11748, 275, 9078, 628, 198, 2, 16926, 46, 40177, 477, 6218, 351, 3601, 62, 20500, 13, 198, 2, 43046, 6482, 284, 1398, 618, 13516, 1142, 66, 318, 16862, 13...
3.428571
56
# Generated by Django 2.2.1 on 2019-06-04 11:41 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 16, 319, 13130, 12, 3312, 12, 3023, 1367, 25, 3901, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
import sys import numpy as np import statistics import matplotlib.pyplot as plt from MM1Utiles import funExpon #README #Criterio de estabilidad MM1: la tasa de servicio debe ser mayor que la tasa de llegada NumEvents = 2 #Defimos número de tipos de eventos (usamos 2: arribos y llegadas) #Constantes a usar para ente...
[ 11748, 25064, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 7869, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 6738, 20806, 16, 18274, 2915, 1330, 1257, 16870, 261, 198, 198, 2, 15675, 11682, 198, 2, 18559, ...
2.203184
1,068
# input word = input() # process ''' 처음에 o가 나올때까지 w의 개수를 세면 됨. ''' isValid = True i = 0 while i < len(word): # w wCnt = 0 while i < len(word) and word[i] == 'w': i += 1 wCnt += 1 if wCnt == 0: isValid = False # o cnt = 0 while i < len(word) and word[i] == 'o': i += 1 cnt += 1 if cnt != wCnt: isValid = F...
[ 2, 5128, 198, 4775, 796, 5128, 3419, 198, 2, 1429, 198, 7061, 6, 198, 168, 110, 246, 35975, 234, 168, 245, 238, 267, 166, 108, 222, 31619, 224, 246, 168, 246, 105, 167, 243, 234, 166, 117, 234, 168, 100, 222, 266, 35975, 246, 22...
1.837423
326
"""This module implements converting steps from account CSV to Zaim CSV.""" from zaimcsvconverter import CONFIG, PATH_FILE_CONFIG, DirectoryCsv from zaimcsvconverter.convert_table_importer import ConvertTableImporter from zaimcsvconverter.input_csv_converter_iterator import InputCsvConverterIterator from zaimcsvconvert...
[ 37811, 1212, 8265, 23986, 23202, 4831, 422, 1848, 44189, 284, 1168, 1385, 44189, 526, 15931, 198, 6738, 1976, 1385, 40664, 1102, 332, 353, 1330, 25626, 11, 46490, 62, 25664, 62, 10943, 16254, 11, 27387, 34, 21370, 198, 6738, 1976, 1385, ...
3.117647
255
# Generated by Django 3.1.5 on 2021-07-13 07:22 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import uuid
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 20, 319, 33448, 12, 2998, 12, 1485, 8753, 25, 1828, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14...
3.017857
56
""" plot_water_height_multipanel.py Reads output of tsunami and plots the results in an image file. """ import argparse parser = argparse.ArgumentParser() parser.add_argument('input_file', help='text file output by the tsunami simulator (chapter 2 version)') args = parser.parse_args() input_file = args.input_file im...
[ 37811, 198, 29487, 62, 7050, 62, 17015, 62, 16680, 541, 272, 417, 13, 9078, 198, 198, 5569, 82, 5072, 286, 31019, 290, 21528, 262, 2482, 287, 281, 2939, 2393, 13, 198, 37811, 198, 11748, 1822, 29572, 198, 48610, 796, 1822, 29572, 13, ...
2.364179
670
# Backspace String Compare """ Given two strings s and t, return true if they are equal when both are typed into empty text editors. '#' means a backspace character. Note that after backspacing an empty text, the text will continue empty. Example 1: Input: s = "ab#c", t = "ad#c" Output: true Explanation: Both s and...
[ 2, 5157, 13200, 10903, 27814, 198, 37811, 11259, 734, 13042, 264, 290, 256, 11, 1441, 2081, 611, 484, 389, 4961, 618, 1111, 389, 25683, 656, 6565, 2420, 15719, 13, 705, 2, 6, 1724, 257, 736, 13200, 2095, 13, 198, 198, 6425, 326, 706...
2.981651
218
import sys from time import sleep from cement.ext.ext_argparse import ArgparseController, expose as ex
[ 198, 11748, 25064, 198, 6738, 640, 1330, 3993, 198, 6738, 20534, 13, 2302, 13, 2302, 62, 853, 29572, 1330, 20559, 29572, 22130, 11, 15651, 355, 409, 628, 198 ]
3.785714
28
import requests URL_API = r"https://www.alphavantage.co/query?function=CURRENCY_EXCHANGE_RATE" API_KEY = "FJOSXYTTSW4VUT7H"
[ 11748, 7007, 198, 198, 21886, 62, 17614, 796, 374, 1, 5450, 1378, 2503, 13, 17307, 615, 36403, 13, 1073, 14, 22766, 30, 8818, 28, 34, 31302, 45155, 62, 6369, 3398, 27746, 62, 49, 6158, 1, 198, 17614, 62, 20373, 796, 366, 37, 41, 2...
2.290909
55
#!/usr/bin/env python3 import os import glob import json from datetime import datetime import subprocess as sp from pprint import pprint from pygama.utils import * def main(): """ sync MJ60 data with cenpa-rocks. - rsync the entire Data/MJ60 directory using the $DATADIR variable - set flags to then rem...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 28686, 198, 11748, 15095, 198, 11748, 33918, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 850, 14681, 355, 599, 198, 6738, 279, 4798, 1330, 279, 4798, 198, 6738, 12972...
2.284511
1,543
from distutils.core import setup setup( name='PyVinil', version='0.1.0', author='Igor Bonadio', author_email='igorbonadio@gmail.com', packages=['pyvinil', 'pyvinil.test'], url='https://github.com/igorbonadio/pyvinil', license='LICENSE.txt', description='PyVinil is a Python library, whic...
[ 6738, 1233, 26791, 13, 7295, 1330, 9058, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 11639, 20519, 53, 259, 346, 3256, 198, 220, 220, 220, 2196, 11639, 15, 13, 16, 13, 15, 3256, 198, 220, 220, 220, 1772, 11639, 40, 7053, 7979, 3...
2.680473
169
import copy import jsonschema from jsonschema import ValidationError from datetime import datetime from dateutil.tz import tzlocal from botocore import xform_name from botocore.model import ServiceModel from botocore.serialize import create_serializer import botocore.session botocore_session = botocore.session.get...
[ 11748, 4866, 198, 198, 11748, 44804, 684, 2395, 2611, 198, 6738, 44804, 684, 2395, 2611, 1330, 3254, 24765, 12331, 198, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 3128, 22602, 13, 22877, 1330, 256, 89, 12001, 198, 198, 6738, 10...
3.308333
120
""" bluebuttondev.bbdev FILE: utils Created: 6/16/15 12:11 AM Basic conversion tools """ __author__ = 'Mark Scrimshire:@ekivemark' def email_mask(email=""): """ mask and potentially shorten an email address Useful for communications :param email: :return: """ if email=="": retu...
[ 37811, 198, 17585, 43059, 623, 1990, 13, 11848, 7959, 198, 25664, 25, 3384, 4487, 198, 41972, 25, 718, 14, 1433, 14, 1314, 1105, 25, 1157, 3001, 198, 26416, 11315, 4899, 198, 37811, 198, 834, 9800, 834, 796, 705, 9704, 1446, 3036, 109...
2.417391
230
""" Rewrite spec/functional_specs/policies/caching/caching_allow_policy_spec.rb """ import pytest from testsuite import rawobj from testsuite.capabilities import Capability @pytest.fixture(scope="module") def policy_settings(): "Add caching policy configured as 'caching_type': 'allow'" return rawobj.PolicyCo...
[ 37811, 198, 30003, 6525, 1020, 14, 45124, 62, 4125, 6359, 14, 79, 4160, 444, 14, 66, 8103, 14, 66, 8103, 62, 12154, 62, 30586, 62, 16684, 13, 26145, 198, 37811, 198, 11748, 12972, 9288, 198, 198, 6738, 1332, 2385, 578, 1330, 8246, 2...
2.957664
685
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
[ 2, 198, 2, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 393, 517, 198, 2, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 9387, 351, 198, 2, 428, 670, 329, 3224, 1321, 5115, 6634, 9238, 13, 198, 2, 383, ...
2.859821
1,227
from statsmodels.graphics.tsaplots import plot_acf from statsmodels.graphics.tsaplots import plot_pacf from sklearn.manifold import TSNE import matplotlib.pyplot as plt import pandas as pd import numpy as np __author__ = "Jose Fernando Montoya Cardona" __credits__ = ["Jose Fernando Montoya Cardona"] __email__ = "jomon...
[ 6738, 9756, 27530, 13, 70, 11549, 13, 912, 64, 489, 1747, 1330, 7110, 62, 330, 69, 198, 6738, 9756, 27530, 13, 70, 11549, 13, 912, 64, 489, 1747, 1330, 7110, 62, 33587, 69, 198, 6738, 1341, 35720, 13, 805, 361, 727, 1330, 26136, 1...
2.940171
117
expected_output = { "power_stack": { "Powerstack-1": { "switch_num": 1, "allocated_power": 200, "topology": "Stndaln", "unused_power": 485, "power_supply_num": 1, "total_power": 715, "mode": "SP-PS", "reserved_p...
[ 40319, 62, 22915, 796, 1391, 220, 198, 220, 220, 220, 366, 6477, 62, 25558, 1298, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 366, 13434, 25558, 12, 16, 1298, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366...
1.621806
587
#!/usr/bin/env python3 """ Created on 16 Nov 2020 @author: Bruno Beloff (bruno.beloff@southcoastscience.com) """ import json from scs_core.data.json import JSONify from scs_core.sample.climate_sample import ClimateSample # -------------------------------------------------------------------------------------------...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 37811, 198, 41972, 319, 1467, 5267, 12131, 198, 198, 31, 9800, 25, 31045, 3944, 2364, 357, 1671, 36909, 13, 6667, 2364, 31, 35782, 1073, 5773, 4234, 13, 785, 8, 198, 37811, ...
2.957746
213
import cv2 import subprocess imageURI = "dummy.png" image = cv2.imread(imageURI) cv2.imshow("Focus window", image) # Device type, simple check isIOS = True scriptPath = None if isIOS: scriptPath = "./monkey-scripts/monkey-screenshot-ios.sh" else: scriptPath = "./monkey-scripts/monkey-screenshot-android.sh" ...
[ 11748, 269, 85, 17, 198, 11748, 850, 14681, 198, 198, 9060, 47269, 796, 366, 67, 13513, 13, 11134, 1, 198, 9060, 796, 269, 85, 17, 13, 320, 961, 7, 9060, 47269, 8, 198, 198, 33967, 17, 13, 320, 12860, 7203, 34888, 4324, 1600, 2939...
2.394366
284
import pydoodle c = pydoodle.Compiler(clientId="client-id", clientSecret="client-secret") with open(file="test2.py") as f: script = f.read() f.close() result = c.execute(script=script, language="python3", stdIn="1st Input ||2nd Input") # Double pipe(||) is used to sepa...
[ 11748, 279, 5173, 27106, 198, 198, 66, 796, 279, 5173, 27106, 13, 7293, 5329, 7, 16366, 7390, 2625, 16366, 12, 312, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220...
2.403974
151
import random
[ 11748, 4738, 198 ]
4.666667
3
# Importing the Kratos Library import KratosMultiphysics import KratosMultiphysics.KratosUnittest as KratosUnittest from KratosMultiphysics.modelers.delete_model_parts_modeler import DeleteModelPartsModeler if __name__ == '__main__': KratosMultiphysics.Logger.GetDefaultOutput().SetSeverity(KratosMultiphysics.Logge...
[ 2, 17267, 278, 262, 509, 10366, 418, 10074, 198, 11748, 509, 10366, 418, 15205, 13323, 23154, 198, 11748, 509, 10366, 418, 15205, 13323, 23154, 13, 42, 10366, 418, 3118, 715, 395, 355, 509, 10366, 418, 3118, 715, 395, 198, 6738, 509, ...
2.851563
128
# Generated by Django 3.1.7 on 2021-03-31 22:21 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 22, 319, 33448, 12, 3070, 12, 3132, 2534, 25, 2481, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
from sbws.util.filelock import FileLock import os import json from .json import CustomDecoder, CustomEncoder class State: """ `json` wrapper to read a json file every time it gets a key and to write to the file every time a key is set. Every time a key is got or set, the file is locked, to atomicall...
[ 6738, 264, 65, 18504, 13, 22602, 13, 7753, 5354, 1330, 9220, 25392, 198, 11748, 28686, 198, 11748, 33918, 198, 198, 6738, 764, 17752, 1330, 8562, 10707, 12342, 11, 8562, 27195, 12342, 628, 198, 4871, 1812, 25, 198, 220, 220, 220, 37227,...
2.581773
801
# Day 9: Smoke Basin # Leaderboard Rank: 60 / 20 from utils import FiniteGrid, get_input from collections import Counter if __name__ == '__main__': main(get_input())
[ 2, 3596, 860, 25, 25416, 32666, 198, 2, 10540, 3526, 10916, 25, 3126, 1220, 1160, 198, 198, 6738, 3384, 4487, 1330, 4463, 578, 41339, 11, 651, 62, 15414, 198, 6738, 17268, 1330, 15034, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, ...
3.052632
57
from __future__ import unicode_literals import ply.lex as lex from ply.lex import TOKEN from .exceptions import DjangoQLLexerError
[ 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 35960, 13, 2588, 355, 31191, 198, 6738, 35960, 13, 2588, 1330, 5390, 43959, 198, 198, 6738, 764, 1069, 11755, 1330, 37770, 48, 3069, 1069, 263, 12331, 628 ]
3.35
40
#AUTHOR: Rio Cantre #Python3 Concept: Adventure Game #GITHUB: https://github.com/RioCantre import time import random weather = ["sunny", "rainy", "stormy", "windy", "snowy", "dark"] ambience = random.choice(weather) tools = ["flashlight", "stick", "bat", "gun", "phone", "knife"] weapon = random.choice(tools) emotio...
[ 2, 32, 24318, 1581, 25, 220, 15338, 16821, 260, 198, 2, 37906, 18, 26097, 25, 9553, 3776, 198, 2, 38, 10554, 10526, 25, 3740, 1378, 12567, 13, 785, 14, 49, 952, 34, 415, 260, 628, 198, 11748, 640, 198, 11748, 4738, 198, 198, 23563...
2.794872
156
from app.day17_2 import cross2d from app.day17_2 import len_route from app.day17_2 import all_sub_lists from app.day17_2 import possible_register_values from app.day17_2 import has_possible_route
[ 6738, 598, 13, 820, 1558, 62, 17, 1330, 3272, 17, 67, 198, 6738, 598, 13, 820, 1558, 62, 17, 1330, 18896, 62, 38629, 198, 6738, 598, 13, 820, 1558, 62, 17, 1330, 477, 62, 7266, 62, 20713, 198, 6738, 598, 13, 820, 1558, 62, 17, ...
2.940299
67
from biopanning_data_bank.bdb_tables.tables import ( BDB_Entry, BDB_Database) from biopanning_data_bank.bdb_tables.fields import ( SOTMC_FIELDS) class SOTMC(BDB_Entry): """ SOTMC entry container from Biopanning Data Bank SOTMC Database. """
[ 6738, 3182, 404, 272, 768, 62, 7890, 62, 17796, 13, 65, 9945, 62, 83, 2977, 13, 83, 2977, 1330, 357, 198, 220, 220, 220, 220, 220, 220, 220, 347, 11012, 62, 30150, 11, 347, 11012, 62, 38105, 8, 198, 6738, 3182, 404, 272, 768, 62...
2.285714
119
#------------------------------------------------------------------------------ # Copyright (c) 2013-2017, Nucleic Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. #------------------------------------------------...
[ 2, 10097, 26171, 198, 2, 15069, 357, 66, 8, 2211, 12, 5539, 11, 399, 14913, 291, 7712, 4816, 13, 198, 2, 198, 2, 4307, 6169, 739, 262, 2846, 286, 262, 40499, 347, 10305, 13789, 13, 198, 2, 198, 2, 383, 1336, 5964, 318, 287, 262,...
3.327473
455
from .base import Tokenizer, TokenizerFactory
[ 6738, 764, 8692, 1330, 29130, 7509, 11, 29130, 7509, 22810, 198 ]
4.181818
11
from pwn import * import requests import time import re for i in range(101,125): try: ip='172.20.{}.101'.format(str(i)) flag=main(ip) print ip,flag time.sleep(11) except: print 'wrong'
[ 6738, 279, 675, 1330, 1635, 201, 198, 11748, 7007, 201, 198, 11748, 640, 201, 198, 11748, 302, 201, 198, 201, 198, 197, 201, 198, 201, 198, 1640, 1312, 287, 2837, 7, 8784, 11, 11623, 2599, 201, 198, 197, 28311, 25, 201, 198, 197, ...
2.118812
101
# -*- coding: utf-8 -*- """ Created on Mon Mar 7 15:08:04 2022 @author: Sandesh Jain """ import tensorflow as tf import numpy as np import os from tensorflow.keras.models import Model from tensorflow.keras.preprocessing.image import ImageDataGenerator from tensorflow.keras.layers import (Conv2D, Dense, F...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 41972, 319, 2892, 1526, 220, 767, 1315, 25, 2919, 25, 3023, 33160, 201, 198, 201, 198, 31, 9800, 25, 3837, 5069, 449, 391, 201, 198, 37811, 201, ...
1.584121
1,058
#!/usr/bin/env python3.6 """ author: samuels """ import argparse import hashlib import os import queue import sys import random import threading sys.path.append(os.path.join(os.path.join('../'))) from concurrent.futures import ThreadPoolExecutor from threading import Event from client.generic_mounter import Mounter ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 13, 21, 198, 37811, 198, 9800, 25, 6072, 84, 1424, 198, 37811, 198, 198, 11748, 1822, 29572, 198, 11748, 12234, 8019, 198, 11748, 28686, 198, 11748, 16834, 198, 11748, 25064, 198, 198, ...
2.700658
304
if __name__=="__main__": name_to_aro = {'mel': "3000616", 'pmrA':"3000822" , 'patB': "3000025"} strict_perfect = {'500': "strict", '1000': "perfect"} expected_bedtool_labels = open('bedtools_labels.tsv', 'w') labels = {} with open('intersection.tsv') as fh: for line in fh: li...
[ 198, 361, 11593, 3672, 834, 855, 1, 834, 12417, 834, 1298, 628, 220, 220, 220, 1438, 62, 1462, 62, 12022, 796, 1391, 6, 17694, 10354, 366, 23924, 44214, 1600, 705, 4426, 81, 32, 10354, 1, 23924, 23, 1828, 1, 837, 705, 8071, 33, 10...
1.884774
486
# This file is automatically generated by the rmf-codegen project. # # The Python code generator is maintained by Lab Digital. If you want to # contribute to this project then please do not edit this file directly # but send a pull request to the Lab Digital fork of rmf-codegen at # https://github.com/labd/rmf-codegen ...
[ 2, 770, 2393, 318, 6338, 7560, 416, 262, 42721, 69, 12, 8189, 5235, 1628, 13, 198, 2, 198, 2, 383, 11361, 2438, 17301, 318, 9456, 416, 3498, 10231, 13, 1002, 345, 765, 284, 198, 2, 8676, 284, 428, 1628, 788, 3387, 466, 407, 4370, ...
3.838235
136
import numpy as np from torch.utils.data import Dataset import cv2 from torchvision import transforms import base64 from PIL import Image np.random.seed(0)
[ 11748, 299, 32152, 355, 45941, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 16092, 292, 316, 198, 11748, 269, 85, 17, 198, 6738, 28034, 10178, 1330, 31408, 198, 11748, 2779, 2414, 198, 6738, 350, 4146, 1330, 7412, 198, 37659, 13, 25120,...
2.946429
56
"""Misc. exception related tests Made for Jython. """ from test import test_support import unittest #From bugtests/test076.py if __name__ == '__main__': test_main()
[ 37811, 44, 2304, 13, 6631, 3519, 5254, 198, 198, 24616, 329, 449, 7535, 13, 198, 37811, 198, 6738, 1332, 1330, 1332, 62, 11284, 198, 11748, 555, 715, 395, 628, 220, 220, 220, 1303, 4863, 5434, 41989, 14, 9288, 2998, 21, 13, 9078, 62...
2.809524
63
import pandas as pd df = pd.read_excel("Média teste.xlsx", sheet_name= "Média") print(df.head())
[ 11748, 19798, 292, 355, 279, 67, 198, 198, 7568, 796, 279, 67, 13, 961, 62, 1069, 5276, 7203, 44, 2634, 67, 544, 1332, 68, 13, 87, 7278, 87, 1600, 9629, 62, 3672, 28, 366, 44, 2634, 67, 544, 4943, 198, 4798, 7, 7568, 13, 2256, ...
2.108696
46
from prolog_parser import PrologParser from inference import Inference from copy import deepcopy import sys import lark
[ 6738, 386, 6404, 62, 48610, 1330, 1041, 6404, 46677, 198, 6738, 32278, 1330, 554, 4288, 198, 6738, 4866, 1330, 2769, 30073, 198, 11748, 25064, 198, 11748, 300, 668 ]
4.25
28
from django.contrib import messages from django.views.generic.edit import UpdateView from hknweb.utils import ( method_login_and_permission, DATETIME_12_HOUR_FORMAT, PACIFIC_TIMEZONE, ) from hknweb.events.models import Event from hknweb.events.forms import EventUpdateForm @method_login_and_permission("ev...
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 6218, 198, 6738, 42625, 14208, 13, 33571, 13, 41357, 13, 19312, 1330, 10133, 7680, 198, 198, 6738, 289, 15418, 12384, 13, 26791, 1330, 357, 198, 220, 220, 220, 2446, 62, 38235, 62, 392, 62, 525...
2.905983
117
#!/usr/bin/python ANSIBLE_METADATA = { 'metadata_version': '1.0', 'status': ['preview'], 'supported_by': 'community' } DOCUMENTATION = ''' --- module: mapr_entity short_description: This module manages MapR accountable entities version_added: "2.4" description: - "This module manages MapR accountab...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 15037, 34563, 62, 47123, 2885, 13563, 796, 1391, 198, 220, 220, 220, 705, 38993, 62, 9641, 10354, 705, 16, 13, 15, 3256, 198, 220, 220, 220, 705, 13376, 10354, 37250, 3866, 1177, 6, 43...
2.55081
679
from typing import List, Optional from jinjasql import JinjaSql from app.db import DBManager from app.vehicle.models import Driver, Vehicle
[ 6738, 19720, 1330, 7343, 11, 32233, 198, 198, 6738, 474, 259, 28121, 13976, 1330, 17297, 6592, 50, 13976, 198, 198, 6738, 598, 13, 9945, 1330, 20137, 13511, 198, 6738, 598, 13, 33892, 1548, 13, 27530, 1330, 12434, 11, 21501, 628, 628 ]
3.536585
41
n = input() arr = list(map(int, input().split())) s = set(arr) print(len(s))
[ 77, 796, 5128, 3419, 198, 3258, 796, 1351, 7, 8899, 7, 600, 11, 5128, 22446, 35312, 3419, 4008, 198, 220, 198, 82, 796, 900, 7, 3258, 8, 198, 4798, 7, 11925, 7, 82, 4008, 198 ]
2.257143
35
for i in range(255): print(chr(i))
[ 198, 198, 1640, 1312, 287, 2837, 7, 13381, 2599, 198, 220, 220, 220, 3601, 7, 354, 81, 7, 72, 4008, 198 ]
1.952381
21
# coding:utf-8 import uuid import string import hashlib import logging from lib.errors import SessionExpiredError, SessionConsumedError from datetime import datetime as dt from random import SystemRandom LOG = logging.getLogger("errbot.plugin.st2.session")
[ 2, 19617, 25, 40477, 12, 23, 198, 11748, 334, 27112, 198, 11748, 4731, 198, 11748, 12234, 8019, 198, 11748, 18931, 198, 6738, 9195, 13, 48277, 1330, 23575, 3109, 6474, 12331, 11, 23575, 9444, 18940, 12331, 198, 6738, 4818, 8079, 1330, 4...
3.561644
73
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ mwtab.fileio ~~~~~~~~~~~~ This module provides routines for reading ``mwTab`` formatted files from difference kinds of sources: * Single ``mwTab`` formatted file on a local machine. * Directory containing multiple ``mwTab`` formatted files. * Compressed zip...
[ 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, 76, 86, 8658, 13, 7753, 952, 198, 15116, 8728, 198, 198, 1212, 8265, 3769, 31878, 329, 3555, 755...
2.120462
3,636
#--COLOR DETECTION--# import cv2 import numpy as np #our function for trackbars path = "sources/lambo2.png" #Burada renklerimizi ayarlayabilmek için bir trackbar hazırlayacağız cv2.namedWindow("Trackbars") #making our window that our trackbars gon' be in cv2.resizeWindow("Trackbars",640,240) #resizing ou...
[ 2, 438, 46786, 38267, 24565, 438, 2, 201, 198, 201, 198, 11748, 269, 85, 17, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 201, 198, 2, 454, 2163, 329, 2610, 34046, 201, 198, 201, 198, 6978, 796, 366, 82, 2203, 14, 2543, 2127...
2.36962
790
from photons_canvas.points.canvas import Canvas
[ 6738, 44378, 62, 5171, 11017, 13, 13033, 13, 5171, 11017, 1330, 1680, 11017, 628, 628, 198 ]
3.25
16
# -*- coding: utf-8 -*- import torch import os from torch.multiprocessing import Pool, Process, set_start_method,cpu_count, RLock,freeze_support, Value, Array, Manager,cpu_count #os.environ["OMP_NUM_THREADS"] = "4" if torch.cuda.is_available() else "6" os.environ["PYTHONWARNINGS"] = 'ignore:semaphore_tracker:UserWarni...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 28034, 198, 11748, 28686, 198, 6738, 28034, 13, 16680, 541, 305, 919, 278, 1330, 19850, 11, 10854, 11, 900, 62, 9688, 62, 24396, 11, 36166, 62, 9127, 11, 3...
1.91631
5,377
from django.contrib.auth import get_user_model from django.urls import reverse from django.test import TestCase from rest_framework import status from rest_framework.test import APIClient from core.models import Tag from recipe.serializers import TagSerializer TAGS_URL = reverse('recipe:tag-list') # test the publi...
[ 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 651, 62, 7220, 62, 19849, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 198, 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 198, 6738, 1334, 62, 30604, 1330, 3722, 198, 6...
3.551402
107
from django import forms from event.models import Customer, Evenement
[ 6738, 42625, 14208, 1330, 5107, 198, 6738, 1785, 13, 27530, 1330, 22092, 11, 3412, 972, 628, 628 ]
4.294118
17
#!/usr/bin/env python3 import shutil from app.settings import settings from app.services.certbot import obtain_certbot_certs from app.services.aws import list_secret_names, upload_certs_as_secrets if __name__ == "__main__": handler(None, None)
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 4423, 346, 198, 198, 6738, 598, 13, 33692, 1330, 6460, 198, 6738, 598, 13, 30416, 13, 22583, 13645, 1330, 7330, 62, 22583, 13645, 62, 22583, 82, 198, 6738, 598, 13, 3...
2.976471
85
x = input() print 2**x
[ 87, 796, 5128, 3419, 198, 4798, 362, 1174, 87, 198 ]
2.3
10
# proxy module from __future__ import absolute_import from mayavi.tools.modules import *
[ 2, 15741, 8265, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 743, 15820, 13, 31391, 13, 18170, 1330, 1635, 198 ]
3.869565
23
from django.conf.urls import url from django.urls import include from rest_framework.routers import DefaultRouter from . import views router = DefaultRouter() router.register(r"users", views.UserViewSet) router.register(r"playlists", views.PlaylistViewSet) router.register(r"radios", views.RadioViewSet) router.registe...
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 2291, 198, 6738, 1334, 62, 30604, 13, 472, 1010, 1330, 15161, 49, 39605, 198, 198, 6738, 764, 1330, 5009, 198, 198, 472, 353, 796, ...
2.89172
157
import click from .cli import cli from ..maze import Maze from ..interface import load, is_context, is_value from json import dumps from sys import stdout from typing import Iterable, Callable, Tuple, TypeVar from itertools import chain, filterfalse, tee T = TypeVar("T") def partition(iterable : Iterable[T], predic...
[ 11748, 3904, 198, 6738, 764, 44506, 1330, 537, 72, 198, 198, 6738, 11485, 76, 6201, 1330, 33412, 198, 6738, 11485, 39994, 1330, 3440, 11, 318, 62, 22866, 11, 318, 62, 8367, 198, 198, 6738, 33918, 1330, 45514, 198, 6738, 25064, 1330, 1...
2.502494
802
import os import sqlite3 import gdsync
[ 11748, 28686, 198, 11748, 44161, 578, 18, 198, 198, 11748, 308, 67, 27261, 628 ]
2.928571
14
from numpy import cross, array , vdot from numpy.linalg import norm import matplotlib.pyplot as plt from roblib import * def vct_nrm(a,b,c): """Soit a,b,c trois coin de la plateforme supossée carrée, n est un vecteur normal de cette platforme""" V1 = a-b V2 = a-c n = cross(V1,V2).T return n/norm(n) def champ(p,n,...
[ 6738, 299, 32152, 1330, 3272, 11, 7177, 837, 410, 26518, 198, 6738, 299, 32152, 13, 75, 1292, 70, 1330, 2593, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 686, 2436, 571, 1330, 1635, 198, 4299, 410, 310, ...
1.920323
866
__author__ = ["Manav Vagrecha", "Shreyansh Shah", "Devam Shah"] __email__ = ["manavkumar.v@ahduni.edu.in", "shreyansh.s1@ahduni.edu.in", "devam.s1@ahduni.edu.in"] import logging import sys import main_manager if __name__ == '__main__': # configuring the log outputs to the debug level logging.basicConfig(level...
[ 834, 9800, 834, 796, 14631, 5124, 615, 37203, 260, 11693, 1600, 366, 2484, 4364, 504, 71, 18381, 1600, 366, 13603, 321, 18381, 8973, 198, 834, 12888, 834, 796, 14631, 805, 615, 74, 44844, 13, 85, 31, 993, 67, 35657, 13, 15532, 13, 2...
2.594737
190
""" data_from_csv.py audio dataset reading from CSV output file; """ from torch.utils.data import Dataset import numpy as np import pandas as pd class AudioDatasetFromCsv(Dataset): """dVoice dataset.""" def __init__(self, csv_in, **kwargs): """ init """ self.csv_in = csv_in ...
[ 37811, 198, 7890, 62, 6738, 62, 40664, 13, 9078, 198, 24051, 27039, 3555, 422, 44189, 5072, 2393, 26, 198, 37811, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 16092, 292, 316, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, ...
2.017937
1,338
""" Common definitions of the workflow module. """ WORKFLOW_DEFAULT_FILENAME = 'workflow.py' DOT_DATABASE_FILENAME = '.workflow.lmdb' class Uninit(object): """Sentinel for unitialized values on the framework context. Python's `None` can't be used, because `None` can be a valid for the user. """ pas...
[ 37811, 198, 17227, 17336, 286, 262, 30798, 8265, 13, 198, 37811, 198, 198, 33249, 3697, 3913, 62, 7206, 38865, 62, 46700, 1677, 10067, 796, 705, 1818, 11125, 13, 9078, 6, 198, 35, 2394, 62, 35, 1404, 6242, 11159, 62, 46700, 1677, 1006...
2.692586
553
# -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2017-05-10 17:17 from __future__ import unicode_literals from django.db import migrations, models
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 940, 13, 21, 319, 2177, 12, 2713, 12, 940, 1596, 25, 1558, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 1...
2.736842
57
# # -*- coding: utf-8 -*- # Copyright 2019 Red Hat # GNU General Public License v3.0+ # (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """ The nxos_l3_interfaces class It is in this file where the current configuration (as dict) is compared to the provided configuration (as dict) and the command set necessar...
[ 2, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 13130, 2297, 10983, 198, 2, 22961, 3611, 5094, 13789, 410, 18, 13, 15, 10, 198, 2, 357, 3826, 27975, 45761, 393, 3740, 1378, 2503, 13, 41791, 13, 2...
2.353624
2,842
from discord.ext.commands import Cog from discord.utils import get from discord.ext import tasks import logging logger = logging.getLogger('tasks') # https://discord.gg/C6AQaJcDdn
[ 6738, 36446, 13, 2302, 13, 9503, 1746, 1330, 327, 519, 198, 6738, 36446, 13, 26791, 1330, 651, 198, 6738, 36446, 13, 2302, 1330, 8861, 198, 11748, 18931, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 10786, 83, 6791, 11537, ...
3.033333
60
from .casbin_enforcer import CasbinEnforcer # noqa: F401 from .casbin_enforcer import Watcher # noqa: F401
[ 6738, 764, 34004, 8800, 62, 268, 45515, 1330, 11294, 8800, 4834, 45515, 220, 1303, 645, 20402, 25, 376, 21844, 198, 6738, 764, 34004, 8800, 62, 268, 45515, 1330, 12242, 2044, 220, 1303, 645, 20402, 25, 376, 21844, 198 ]
2.868421
38
import mock from django import test from model_mommy import mommy from devilry.devilry_admin.cradminextensions import devilry_crmenu_admin
[ 11748, 15290, 198, 6738, 42625, 14208, 1330, 1332, 198, 6738, 2746, 62, 32542, 1820, 1330, 1995, 1820, 198, 198, 6738, 17118, 563, 13, 7959, 346, 563, 62, 28482, 13, 6098, 324, 3810, 742, 5736, 1330, 17118, 563, 62, 6098, 26272, 62, 2...
3.27907
43
import ast __version__ = '0.0.5' __all__ = ('FailsChecker', ) MESSAGES = { 'PF101': 'PF101 Potential IndexError fail.', 'PF102': 'PF102 Potential KeyError fail. You can replace this with `dict.get(key, failback_value)`', 'PF103': 'PF103 Potential IndexError or KeyError fail.', }
[ 11748, 6468, 198, 198, 834, 9641, 834, 796, 705, 15, 13, 15, 13, 20, 6, 198, 834, 439, 834, 796, 19203, 37, 1768, 9787, 263, 3256, 1267, 198, 198, 44, 1546, 4090, 48075, 796, 1391, 198, 220, 220, 220, 705, 42668, 8784, 10354, 705,...
2.666667
111
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Apr 1 15:18:09 2018 @author: yiwei """ #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Apr 1 06:11:18 2018 @author: yiwei """ from copy import deepcopy if __name__ == '__main__': FROM_STDIN = True # FROM_STDIN = False ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 3825, 2758, 220, 352, 1315, 25, 1507, 25, 2931, 2864, 198, 198, 31, 9800, 25, 331, 72, ...
2.199134
462
import numpy as np from sklearn import decomposition # NMF from sklearn._config import config_context from sklearn.decomposition._nmf \ import _beta_divergence, \ _check_string_param, \ _check_init, \ _initialize_nmf, \ _compute_regularization from sklearn.utils.validation \ import check_array,...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 1341, 35720, 1330, 26969, 9150, 198, 198, 2, 28692, 37, 198, 6738, 1341, 35720, 13557, 11250, 1330, 4566, 62, 22866, 198, 6738, 1341, 35720, 13, 12501, 296, 9150, 13557, 21533, 69, 3467, 198, 22...
2.578182
275
from bokeh.plotting import figure, show import numpy as np if __name__ == '__main__': p = plot_func() show(p)
[ 6738, 1489, 365, 71, 13, 29487, 889, 220, 1330, 3785, 11, 905, 198, 11748, 299, 32152, 355, 45941, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 279, 796, 7110, 62, 20786, 3419, 198, 220, 22...
2.469388
49
# Calculations related to estimate probability of a vessel drifting
[ 2, 27131, 602, 3519, 284, 8636, 12867, 286, 257, 8837, 38193, 198 ]
5.666667
12
from sklearn.externals import joblib from preprocessData import getDataXY, get_accuracy trainX, trainY, testX, testY, validX, validY = getDataXY() print type(trainY) models = ['Models/dt0.58.pkl', 'Models/NB0.59.pkl', 'Models/NC0.57.pkl', 'Models/NNP0.61.pkl', 'Models/sgd0.54.pkl'] all_pre = [] for model ...
[ 6738, 1341, 35720, 13, 1069, 759, 874, 1330, 1693, 8019, 198, 6738, 662, 14681, 6601, 1330, 651, 6601, 34278, 11, 651, 62, 4134, 23843, 198, 198, 27432, 55, 11, 4512, 56, 11, 1332, 55, 11, 1332, 56, 11, 4938, 55, 11, 4938, 56, 796...
2.25
220
from pypureclient.flashblade import Subnet # update a subnet's gateway by name res = client.patch_subnets( names=['mysubnet'], subnet=Subnet(gateway='1.2.3.1')) print(res) if type(res) == pypureclient.responses.ValidResponse: print(list(res.items)) # Other valid fields: ids # See section "Common Fields" for ex...
[ 6738, 279, 4464, 495, 16366, 13, 34167, 22500, 1330, 3834, 3262, 198, 198, 2, 4296, 257, 850, 3262, 338, 24308, 416, 1438, 198, 411, 796, 5456, 13, 17147, 62, 7266, 45938, 7, 198, 220, 220, 220, 3891, 28, 17816, 28744, 549, 3262, 6,...
2.818966
116
import pandas as pd import matplotlib.pyplot as plt wine_df = pd.read_csv(filepath_or_buffer='~/class5-homework/wine.data', sep=',', header=None) wine_df.columns = ['Class','Alcohol','Malic_Acid','Ash','Alcalinity_of_Ash','Magnesium', 'Total_Phenols','Flavanoids','Nonfl...
[ 11748, 19798, 292, 355, 279, 67, 198, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 39002, 62, 7568, 796, 279, 67, 13, 961, 62, 40664, 7, 7753, 6978, 62, 273, 62, 22252, 11639, 93, 14, 4871, 20, 12, 26452...
2.324042
287
import re import curses import config import time import api # 自定义的所有函数 # conf: 从config获取来自默认或者用户定义的配置信息 conf = config.config_info # cont: 在运行过程中保存关于运行状态以及用于控制的信息 cont = config.control_info # 全局使用,当前所访问版块的全部内容 thread_list = {} # 全局使用,当前所访问的串的全部内容 post_list = {} # TODO:注释 cont['browse_now_list'] = 0 # TODO: 需要把自定义版块,目前...
[ 11748, 302, 198, 11748, 43878, 198, 11748, 4566, 198, 11748, 640, 198, 11748, 40391, 198, 2, 5525, 229, 103, 22522, 248, 20046, 231, 21410, 33699, 222, 17312, 231, 49035, 121, 46763, 108, 198, 198, 2, 1013, 25, 220, 20015, 236, 11250, ...
1.656602
7,286
import unittest import numpy as np import base64 from brain import control_handling from brain import constants claw_control_info = { constants.SIGNAL_NAME: 'claw', constants.SIGNAL_LIMITS: [100.0, 400.0], constants.SIGNAL_CHANNEL_NAME: 'gp.robots.testrobot.controls.claw', } twist_control_info = { co...
[ 11748, 555, 715, 395, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2779, 2414, 198, 198, 6738, 3632, 1330, 1630, 62, 4993, 1359, 198, 6738, 3632, 1330, 38491, 198, 198, 43143, 62, 13716, 62, 10951, 796, 1391, 198, 220, 220, 22...
2.495192
208
# SPDX-License-Identifier: Apache-2.0 # Copyright 2021 Eotvos Lorand University, Budapest, Hungary compiler_common.current_compilation['is_multicompiled'] = True part_count = compiler_common.current_compilation['multi'] multi_idx = compiler_common.current_compilation['multi_idx'] table_names = (table.short_name + ("...
[ 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 198, 2, 15069, 33448, 412, 313, 85, 418, 26068, 392, 2059, 11, 40959, 11, 19562, 198, 198, 5589, 5329, 62, 11321, 13, 14421, 62, 5589, 10520, 17816, 271, 62, 166...
2.003519
1,421
# pylint: disable=R0903 """test __slots__ on old style class""" __revision__ = 1 class OkOk(object): """correct usage""" __slots__ = ('a', 'b') class HaNonNonNon: """bad usage""" __slots__ = ('a', 'b') __slots__ = 'hop' # pfff
[ 2, 279, 2645, 600, 25, 15560, 28, 49, 2931, 3070, 198, 37811, 9288, 11593, 6649, 1747, 834, 319, 1468, 3918, 1398, 37811, 198, 198, 834, 260, 10178, 834, 796, 352, 198, 198, 4871, 6762, 18690, 7, 15252, 2599, 198, 220, 220, 220, 372...
2.330189
106
# Copyright 2016-2022 The Van Valen Lab at the California Institute of # Technology (Caltech), with support from the Paul Allen Family Foundation, # Google, & National Institutes of Health (NIH) under Grant U24CA224309-01. # All rights reserved. # # Licensed under a modified Apache License, Version 2.0 (the "License");...
[ 2, 15069, 1584, 12, 1238, 1828, 383, 6656, 3254, 268, 3498, 379, 262, 3442, 5136, 286, 198, 2, 8987, 357, 9771, 13670, 828, 351, 1104, 422, 262, 3362, 9659, 7884, 5693, 11, 198, 2, 3012, 11, 1222, 2351, 33656, 286, 3893, 357, 22125,...
4.019465
411