content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
# # PySNMP MIB module Juniper-ACCOUNTING-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Juniper-ACCOUNTING-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 19:50:51 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (d...
[ 2, 198, 2, 9485, 15571, 7378, 337, 9865, 8265, 7653, 9346, 12, 26861, 28270, 2751, 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, 6...
2.458098
15,429
"""API Doc templates generator.""" from typing import Any, Dict, List, Optional, Union from urllib.parse import quote, urljoin class HydraDoc: """Class for an API Doc.""" def __init__(self, API: str, title: str, desc: str, entrypoint: str, base_url: str, doc_name: str) -> None: """In...
[ 37811, 17614, 14432, 24019, 17301, 526, 15931, 198, 6738, 19720, 1330, 4377, 11, 360, 713, 11, 7343, 11, 32233, 11, 4479, 198, 6738, 2956, 297, 571, 13, 29572, 1330, 9577, 11, 19016, 22179, 628, 198, 4871, 31613, 23579, 25, 198, 220, ...
2.034615
15,687
""" Grafana-Script functions module This is the functions module of Grafana-Script :license: MIT, see LICENSE for more details :copyright: (c) 2020 by NETHINKS GmbH, see AUTHORS for more details """ import xml.etree.ElementTree as ET import requests from grafana_script.config import ScriptConfig CONF = ScriptConfig()...
[ 37811, 198, 38, 32188, 2271, 12, 7391, 5499, 8265, 198, 1212, 318, 262, 5499, 8265, 286, 7037, 69, 2271, 12, 7391, 198, 25, 43085, 25, 17168, 11, 766, 38559, 24290, 329, 517, 3307, 198, 25, 22163, 4766, 25, 357, 66, 8, 12131, 416, ...
2.233123
2,222
"""maxibonkata.chat This module contains the Chat class implementation. :copyright: 2019, Karumi & The Cocktail :license: Apache License. See LICENSE.txt file for further details. """
[ 37811, 9806, 571, 261, 74, 1045, 13, 17006, 198, 198, 1212, 8265, 4909, 262, 24101, 1398, 7822, 13, 198, 198, 25, 22163, 4766, 25, 13130, 11, 9375, 12994, 1222, 383, 23769, 13199, 198, 198, 25, 43085, 25, 24843, 13789, 13, 4091, 38559...
3.528302
53
# Copyright 2021 Kartik Sharma. 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 o...
[ 2, 15069, 33448, 32872, 1134, 40196, 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, 287, 11846, 351, 262, ...
3.348442
353
""" Este código possui partes desenvolvidas ou baseadas em código desenvolvido por Thales Otávio Link do GitHub: https://github.com/thalesorp/NSGA-II """ import sys import random from .individual import Individual class Population: """Class of population of indiviuals, used by NSGA-II""" def initiate(sel...
[ 37811, 198, 198, 36, 4169, 269, 10205, 12894, 78, 1184, 9019, 636, 274, 748, 268, 10396, 16921, 292, 267, 84, 2779, 38768, 795, 269, 10205, 12894, 78, 748, 268, 10396, 16921, 78, 16964, 536, 2040, 19740, 6557, 85, 952, 198, 11280, 466...
2.307621
3,254
from django.contrib import admin from django.forms.fields import ChoiceField from django.shortcuts import redirect from django.template.response import TemplateResponse from django.urls import path from django.utils.html import format_html, conditional_escape from django.utils.safestring import mark_safe from django.ut...
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 42625, 14208, 13, 23914, 13, 25747, 1330, 18502, 15878, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 18941, 198, 6738, 42625, 14208, 13, 28243, 13, 26209, 1330, 37350, 31077, ...
3.5875
160
#!/usr/bin/python from os.path import expanduser, dirname, exists from os import makedirs import sys from datetime import datetime from optparse import OptionParser import logging import logging.handlers from config_resolver import Config LOG = logging.getLogger(__name__) LOG.setLevel(logging.DEBUG) FORMATTER = logg...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 6738, 28686, 13, 6978, 1330, 4292, 7220, 11, 26672, 3672, 11, 7160, 198, 6738, 28686, 1330, 285, 4335, 17062, 198, 11748, 25064, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 2172, 29572,...
2.714885
477
#!/usr/bin/env python # -*- coding: utf-8 -*- # Draft Version ... presented to illustrate how the problem shifts and how later solutions address this # * In this version, several solutions from Stack Overflow are added into the code. # * the result is that one encode error is solved but another one shifts to a d...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 220, 220, 198, 198, 2, 13650, 10628, 2644, 5545, 284, 19418, 703, 262, 1917, 15381, 290, 703, 1568, 8136, 2209, 428, 198, ...
2.895551
517
import gym import tensorflow as tf import tensorflow.contrib.layers as layers from utils.general import get_logger from q1_schedule import LinearExploration, LinearSchedule from q2_linear import Linear from configs.q7 import config import pandas as pd import trading_env class MyDQNCNN(Linear): ...
[ 11748, 11550, 201, 198, 201, 198, 11748, 11192, 273, 11125, 355, 48700, 201, 198, 11748, 11192, 273, 11125, 13, 3642, 822, 13, 75, 6962, 355, 11685, 201, 198, 201, 198, 6738, 3384, 4487, 13, 24622, 1330, 651, 62, 6404, 1362, 201, 198,...
2.153046
1,346
import time import threading import praw import common
[ 11748, 640, 198, 11748, 4704, 278, 198, 11748, 279, 1831, 198, 198, 11748, 2219, 628 ]
3.8
15
import sys if __name__ == '__main__': if len(sys.argv) != 2: print('Usage: %s [length]' % sys.argv[0]) sys.exit(1) print( fibonacci( int(sys.argv[1]) ) )
[ 11748, 25064, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 611, 18896, 7, 17597, 13, 853, 85, 8, 14512, 362, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 10786, 28350, 25, 4064, 82, ...
2
90
import unittest from unittest.mock import patch from pott.option import Option from pott.paper import Paper from pott.yaml import Yaml from pott.assistants.assistant import Assistant from pott.assistants.global_assistant import GlobalAssistant from pott.assistants.local_assistant import LocalAssistant if __name__ ==...
[ 11748, 555, 715, 395, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 8529, 198, 6738, 279, 1252, 13, 18076, 1330, 16018, 198, 6738, 279, 1252, 13, 20189, 1330, 14962, 198, 6738, 279, 1252, 13, 88, 43695, 1330, 14063, 75, 198, 6738, 27...
3.238532
109
#!/usr/bin/env python # run with --sweep (or by default): # given a service, looks through current members for those missing an account on that service, # and checks that member's official website's source code for mentions of that service. # A CSV of "leads" is produced for manual review. # # run with --update:...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 1057, 351, 1377, 46280, 538, 357, 273, 416, 4277, 2599, 198, 2, 220, 220, 1813, 257, 2139, 11, 3073, 832, 1459, 1866, 329, 883, 4814, 281, 1848, 319, 326, 2139, 11, 198, 2,...
3.410468
363
#!/usr/bin/env python3 # encoding:utf8 """An extensible, command based bot interface for the Signal Messenger. """ import functools import json import logging import os import random import time import uuid import wikipedia from datetime import datetime, timedelta from mysignald import MySignal from pymongo import Mon...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 21004, 25, 40477, 23, 198, 37811, 2025, 1070, 27339, 11, 3141, 1912, 10214, 7071, 329, 262, 26484, 24306, 13, 198, 198, 37811, 198, 11748, 1257, 310, 10141, 198, 11748, 33918, 1...
2.696288
889
#!/usr/bin/env python #encoding: utf-8; from pwn import * import sys,os hosts = ("","localhost","localhost") ports = (0,12300,23947) rhp1 = {'host':hosts[0],'port':ports[0]} #for actual server rhp2 = {'host':hosts[1],'port':ports[1]} #for localhost rhp3 = {'host':hosts[2],'port':ports[2]} #for localhost runn...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 12685, 7656, 25, 3384, 69, 12, 23, 26, 198, 198, 6738, 279, 675, 1330, 1635, 198, 11748, 25064, 11, 418, 198, 198, 4774, 82, 796, 5855, 2430, 36750, 2430, 36750, 4943, 198, 3742, ...
2.186441
472
#!/usr/bin/env python # Copyright (c) PLUMgrid, Inc. # Licensed under the Apache License, Version 2.0 (the "License") from bcc import BPF from builtins import input from ctypes import c_uint,c_int, c_ulong from pyroute2 import IPRoute, IPDB, NSPopen from simulation import Simulation from netaddr import IPAddress impor...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 15069, 357, 66, 8, 9297, 5883, 25928, 11, 3457, 13, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 4943, 198, 198, 6738, 275, 535, 1330, 2...
2.620462
303
from Automovel import Automovel
[ 6738, 17406, 78, 626, 1330, 17406, 78, 626, 198 ]
3.555556
9
import mock
[ 11748, 15290, 628, 628 ]
3.75
4
from sklearn.externals import joblib from sklearn.linear_model import LogisticRegression from sklearn.datasets import load_iris from sklearn.model_selection import train_test_split import os.path import gzip import os data = load_iris() Xtrain, Xtest, Ytrain, Ytest = train_test_split(data.data, da...
[ 201, 198, 6738, 1341, 35720, 13, 1069, 759, 874, 1330, 1693, 8019, 201, 198, 6738, 1341, 35720, 13, 29127, 62, 19849, 1330, 5972, 2569, 8081, 2234, 220, 220, 201, 198, 6738, 1341, 35720, 13, 19608, 292, 1039, 1330, 3440, 62, 29616, 22...
2.170732
451
#!/usr/bin/env python import rospy import numpy as np from sensor_msgs.msg import Joy from geometry_msgs.msg import Twist from sensor_msgs.msg import JointState # build inverted matrix # A is control allocation matrix # 0.2075 and 0.2375 are moment arms measured from the centre of Mallard, i.e. half the distance b...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 686, 2777, 88, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 12694, 62, 907, 14542, 13, 19662, 1330, 14087, 198, 6738, 22939, 62, 907, 14542, 13, 19662, 1330, 44088, 198, 6738, ...
2.623853
218
from pypy.interpreter.error import oefmt from pypy.interpreter.baseobjspace import W_Root from pypy.interpreter.typedef import TypeDef, interp_attrproperty from pypy.interpreter.typedef import GetSetProperty from pypy.interpreter.gateway import interp2app from rpython.rlib import jit from pypy.module._cffi_backend.cda...
[ 6738, 279, 4464, 88, 13, 3849, 3866, 353, 13, 18224, 1330, 267, 891, 16762, 198, 6738, 279, 4464, 88, 13, 3849, 3866, 353, 13, 8692, 26801, 13200, 1330, 370, 62, 30016, 198, 6738, 279, 4464, 88, 13, 3849, 3866, 353, 13, 774, 9124, ...
2.702128
705
from django.contrib import admin from .models import Label admin.site.register(Label)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 764, 27530, 1330, 36052, 198, 198, 28482, 13, 15654, 13, 30238, 7, 33986, 8 ]
3.583333
24
# ! are the imports needed if they are defined in main? import arcpy import os import shutil from helpers import * # ! are we using tni at all? EHHHH NOT REALLY # Compute Transit Need Index (TNI) based on the 2003 service standards for each census blockgroup. # Use the minority, income, age and car ownership data co...
[ 2, 5145, 389, 262, 17944, 2622, 611, 484, 389, 5447, 287, 1388, 30, 198, 198, 11748, 10389, 9078, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 198, 6738, 49385, 1330, 1635, 198, 198, 2, 5145, 389, 356, 1262, 256, 8461, 379, 477, 3...
3.808696
115
#!/usr/bin/env python N = 128 vals = [-1]*N for i in range(N): ch = chr(i) if 'A' <= ch <= 'Z': vals[i] = i - ord('A') elif 'a' <= ch <= 'z': vals[i] = i - ord('a') groupsz = 16 grps = [] grp = [] for v in vals: if len(grp) >= groupsz: grps.append(fmtgrp(grp)) grp = ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 628, 198, 45, 796, 13108, 198, 12786, 796, 25915, 16, 60, 9, 45, 198, 1640, 1312, 287, 2837, 7, 45, 2599, 198, 220, 220, 220, 442, 796, 442, 81, 7, 72, 8, 198, 220, 220, 220, 611, 7...
2.045024
422
import pytest from ckanapi import LocalCKAN, NotFound
[ 11748, 12972, 9288, 198, 198, 6738, 269, 27541, 15042, 1330, 10714, 34, 42, 1565, 11, 1892, 21077, 628 ]
3.111111
18
#!/usr/bin/env python3 ''' Translates Unix TMG driving table from PDP-11 assembly to C arrays. Assumptions: - string literals are single line - byte directive has two octal values ''' from sys import argv if __name__=='__main__': t = Translator() t.start() for s in file_statements(argv[1]): t....
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 7061, 6, 198, 8291, 75, 689, 33501, 309, 20474, 5059, 3084, 422, 350, 6322, 12, 1157, 10474, 284, 327, 26515, 13, 198, 8021, 388, 8544, 25, 220, 198, 532, 4731, 4187, 874, ...
2.536765
136
url='https://us-cert.cisa.gov/ics/advisories/icsa-21-154-01' advisory=url.replace('https://us-cert.cisa.gov/ics/advisories/','') print(advisory)
[ 6371, 11639, 5450, 1378, 385, 12, 22583, 13, 66, 9160, 13, 9567, 14, 873, 14, 324, 4703, 1749, 14, 873, 64, 12, 2481, 12, 21526, 12, 486, 6, 201, 198, 201, 198, 324, 41783, 28, 6371, 13, 33491, 10786, 5450, 1378, 385, 12, 22583, ...
2.138889
72
from .docker_operator import * from .subdag_operator import *
[ 6738, 764, 45986, 62, 46616, 1330, 1635, 198, 6738, 764, 7266, 67, 363, 62, 46616, 1330, 1635, 198 ]
3.444444
18
from .field import Field from scipy import special from .core import BeamMix, Phase, MultPhase, IntAttenuator, CircAperture, GaussHermite, GaussLaguerre, Interpol from .misc import PI,Tilt, backward_compatible import numpy as _np def AiryBeam1D(Fin, x0 = 0.001, a = 100): """ *Creates a 1D nonspreading Airy bea...
[ 6738, 764, 3245, 1330, 7663, 198, 6738, 629, 541, 88, 1330, 2041, 198, 6738, 764, 7295, 1330, 25855, 35608, 11, 18983, 11, 7854, 35645, 11, 2558, 8086, 268, 84, 1352, 11, 7672, 32, 27286, 11, 12822, 1046, 48523, 578, 11, 12822, 1046, ...
1.922658
4,952
from django.urls import path from ravens_metadata_apps.content_pages import views urlpatterns = ( path('monitoring/alive', views.view_monitoring_alive, name='view_monitoring_alive'), path('test/err-500', views.view_err_500_test, name='view_err_500_test'), path('test/e...
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 6738, 37735, 82, 62, 38993, 62, 18211, 13, 11299, 62, 31126, 1330, 5009, 198, 198, 6371, 33279, 82, 796, 357, 628, 220, 220, 220, 3108, 10786, 41143, 278, 14, 282, 425, 3256, 198, 2...
2.174468
235
"""Post data to S3.""" import boto3 import os import pickle from src.config import CACHE_PATH, FINDINGS_S3_BUCKET from src.single_layer_network import list_findings from src.training_data import load_all_training_tiles, tag_with_locations from src.training_visualization import render_results_for_analysis def post_f...
[ 37811, 6307, 1366, 284, 311, 18, 526, 15931, 198, 198, 11748, 275, 2069, 18, 198, 11748, 28686, 198, 11748, 2298, 293, 198, 198, 6738, 12351, 13, 11250, 1330, 327, 2246, 13909, 62, 34219, 11, 376, 12115, 20754, 62, 50, 18, 62, 33, 1...
2.253521
923
import numpy as np import matplotlib.pyplot as plt import math cmap = plt.cm.viridis
[ 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 10688, 198, 198, 66, 8899, 796, 458, 83, 13, 11215, 13, 37040, 29207, 198 ]
2.636364
33
''' Módulo para mandar a llamar las funciones de la tarea de Pruebas estadísticas. ''' import os import pathlib from questionary import text, select, Choice from validaciones import is_valid_chi import abajo_arriba import frecuencias from ruta import get_file_path def read_chi(): ''' Pide al usuario ingresa...
[ 7061, 6, 198, 44, 10205, 67, 43348, 31215, 6855, 283, 257, 32660, 39236, 39990, 25439, 295, 274, 390, 8591, 256, 20337, 390, 1736, 518, 12093, 1556, 324, 8836, 11268, 292, 13, 198, 7061, 6, 198, 198, 11748, 28686, 198, 11748, 3108, 80...
2.15674
638
def update_gs_range(vals, sheet, cell_range): """Update range of cells in a google sheets sheet Args: vals (list:list:str): List of lists of movie attributes [[title,year,cover_url],...] sheet (<class Sheet>): Google Sheets sheet object cell_range (str): cell range in [A-Z][int]:[A-Z][int] style """ sheet.sp...
[ 4299, 4296, 62, 14542, 62, 9521, 7, 12786, 11, 9629, 11, 2685, 62, 9521, 2599, 198, 197, 37811, 10260, 2837, 286, 4778, 287, 257, 23645, 15747, 9629, 628, 197, 42035, 25, 198, 197, 197, 12786, 357, 4868, 25, 4868, 25, 2536, 2599, 73...
2.8
160
import logging from django.core.management.base import BaseCommand from feedreader.models import Outline from feedreader.functions import get_unread_count logger = logging.getLogger(__name__)
[ 11748, 18931, 198, 198, 6738, 42625, 14208, 13, 7295, 13, 27604, 13, 8692, 1330, 7308, 21575, 198, 198, 6738, 3745, 46862, 13, 27530, 1330, 3806, 1370, 198, 6738, 3745, 46862, 13, 12543, 2733, 1330, 651, 62, 403, 961, 62, 9127, 198, 1...
3.5
56
import matplotlib.pyplot as plt import networkx as nx import pydot from networkx.drawing.nx_pydot import graphviz_layout G = nx.path_graph(8) nx.draw(G) plt.show() G = nx.cycle_graph(24) pos = nx.spring_layout(G, iterations=200) nx.draw(G, pos, node_color=range(24), node_size=800, cmap=plt.cm.Blues) plt.show() G = ...
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 3127, 87, 355, 299, 87, 198, 198, 11748, 279, 5173, 313, 198, 6738, 3127, 87, 13, 19334, 278, 13, 77, 87, 62, 79, 5173, 313, 1330, 4823, 85, 528, 62, 39786, 198,...
2.139466
337
terms = 11 result = list(map(lambda x: 2 ** x, range(terms))) print("The total terms are:",terms) for i in range(terms): print("2 raised to power",i,"is",result[i])
[ 38707, 796, 1367, 198, 198, 20274, 796, 1351, 7, 8899, 7, 50033, 2124, 25, 362, 12429, 2124, 11, 2837, 7, 38707, 22305, 198, 198, 4798, 7203, 464, 2472, 2846, 389, 25, 1600, 38707, 8, 198, 1640, 1312, 287, 2837, 7, 38707, 2599, 198,...
2.816667
60
#Cyber Security Engineer #Offensive Specialist import base64 import os import sys #The commented one is bash script to convert shellcode into raw binary formate. #You just need to change the input file and then run second command to convert into binary form. #This script will run on linux distributions. ...
[ 2, 20418, 527, 4765, 23164, 201, 198, 2, 9362, 2021, 36816, 201, 198, 201, 198, 201, 198, 11748, 2779, 2414, 201, 198, 11748, 28686, 201, 198, 11748, 25064, 201, 198, 201, 198, 2, 464, 16476, 530, 318, 27334, 4226, 284, 10385, 7582, ...
2.599071
646
import os import click from flask import Flask, abort, jsonify, request from flask_cors import CORS from flask_jwt_extended import JWTManager, create_access_token from flask_ldap3_login import LDAP3LoginManager app = Flask(__name__) CORS(app) app.config.from_envvar("FLASK_CONFIG_FILE") app.config.from_object(Con...
[ 11748, 28686, 198, 198, 11748, 3904, 198, 198, 6738, 42903, 1330, 46947, 11, 15614, 11, 33918, 1958, 11, 2581, 198, 6738, 42903, 62, 66, 669, 1330, 327, 20673, 198, 6738, 42903, 62, 73, 46569, 62, 2302, 1631, 1330, 449, 39386, 13511, ...
3.13245
453
import argparse import numpy as np import torch import utils.stream as s def get_arguments(): """Gets arguments from the command line. Returns: A parser with the input arguments. """ # Creates the ArgumentParser parser = argparse.ArgumentParser( usage='Reconstructs an RBM with...
[ 11748, 1822, 29572, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 198, 11748, 3384, 4487, 13, 5532, 355, 264, 628, 198, 4299, 651, 62, 853, 2886, 33529, 198, 220, 220, 220, 37227, 38, 1039, 7159, 422, 262, 3141, 162...
2.778652
890
######## Snakemake header ######## import sys; sys.path.append("/home/cmb-panasas2/skchoudh/software_frozen/anaconda27/envs/riboraptor/lib/python3.5/site-packages"); import pickle; snakemake = pickle.loads(b'\x80\x03csnakemake.script\nSnakemake\nq\x00)\x81q\x01}q\x02(X\x04\x00\x00\x00ruleq\x03X\n\x00\x00\x00merge_bams...
[ 198, 7804, 16705, 15883, 13639, 46424, 21017, 198, 11748, 25064, 26, 25064, 13, 6978, 13, 33295, 7203, 14, 11195, 14, 66, 2022, 12, 6839, 292, 292, 17, 14, 8135, 354, 2778, 71, 14, 43776, 62, 69, 42005, 14, 272, 330, 13533, 1983, 14...
1.588042
3,646
# Copyright (c) 2017-2021, Alibaba Group Holding Limited # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
[ 2, 15069, 357, 66, 8, 2177, 12, 1238, 2481, 11, 41992, 4912, 31703, 15302, 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, ...
2.054749
895
from tensorflow.examples.tutorials.mnist import input_data import tensorflow as tf mnist = input_data.read_data_sets("MNIST_data/", one_hot=True) print(mnist.train.images.shape, mnist.train.labels.shape) print(mnist.test.images.shape, mnist.test.labels.shape) print(mnist.validation.images.shape,mnist.validation.label...
[ 6738, 11192, 273, 11125, 13, 1069, 12629, 13, 83, 44917, 82, 13, 10295, 396, 1330, 5128, 62, 7890, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 198, 10295, 396, 796, 5128, 62, 7890, 13, 961, 62, 7890, 62, 28709, 7203, 39764, 8808, ...
2.329435
513
#!/usr/bin/env python from setuptools import setup, find_packages setup(name='impro', version='1.1', description='Image analysis package', author='Sebastian Reinhard', author_email='sebastian.reinhard@stud-mail.uni-wuerzburg.de', url='https://github.com/super-resolution', packages=...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 198, 40406, 7, 3672, 11639, 32077, 3256, 198, 220, 220, 220, 220, 220, 2196, 11639, 16, 13, 16, 3256, 198, 220, 22...
2.547368
190
"""Integration tests for the pyWriter project. Test the conversion of the chapter descriptions. For further information see https://github.com/peter88213/PyWriter Published under the MIT License (https://opensource.org/licenses/mit-license.php) """ from pywriter.html.html_chapterdesc import HtmlChapterDesc fr...
[ 37811, 34500, 1358, 5254, 329, 262, 12972, 34379, 1628, 13, 201, 198, 201, 198, 14402, 262, 11315, 286, 262, 6843, 16969, 13, 201, 198, 201, 198, 1890, 2252, 1321, 766, 3740, 1378, 12567, 13, 785, 14, 79, 2357, 3459, 26427, 14, 20519,...
3.211538
156
#!/usr/bin/env python # Copyright 2018 National Technology & Engineering Solutions of Sandia, LLC # (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. # Government retains certain rights in this software. import sys, os import textwrap import re try: from argparse import ArgumentParser fr...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 15069, 2864, 2351, 8987, 1222, 14044, 23555, 286, 3837, 544, 11, 11419, 198, 2, 357, 11251, 7597, 737, 4698, 262, 2846, 286, 17453, 5550, 12, 4535, 830, 2327, 1495, 351, 24563,...
2.323407
1,679
# -*- coding: utf-8 -*- """ Created on Wed Mar 6 00:57:37 2019 @author: nov28 """ from __future__ import division import os import sys import numpy as np import glob import collections from collections import Counter, defaultdict import re import json import io import codecs if __name__=='__main_...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 41972, 319, 3300, 1526, 220, 718, 3571, 25, 3553, 25, 2718, 13130, 201, 198, 201, 198, 31, 9800, 25, 645, 85, 2078, 201, 198, 37811, 201, 198, ...
1.869914
1,745
""" Copyright (c) Facebook, Inc. and its affiliates. This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree. """ import numpy as np import pytest import torch from ocpmodels.modules.evaluator import ( Evaluator, cosine_similarity, magnitude_...
[ 37811, 198, 15269, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 198, 198, 1212, 2723, 2438, 318, 11971, 739, 262, 17168, 5964, 1043, 287, 262, 198, 43, 2149, 24290, 2393, 287, 262, 6808, 8619, 286, 428, 2723, 5509, 13, 198, ...
2.779904
209
# Example import os import cv2 import pathlib import argparse from PIL import Image from torchvision import models from torchvision import transforms from torchvision.transforms import Resize, ToTensor, Normalize from gradcam import GradCam from misc import fuse_heatmap_image class VGGGradCam(GradCam): """ ...
[ 2, 17934, 198, 11748, 28686, 198, 11748, 269, 85, 17, 198, 11748, 3108, 8019, 198, 11748, 1822, 29572, 198, 198, 6738, 350, 4146, 1330, 7412, 198, 6738, 28034, 10178, 1330, 4981, 198, 6738, 28034, 10178, 1330, 31408, 198, 6738, 28034, 1...
3.307692
130
import os import cv2 import torch from PIL import Image from tqdm import tqdm from .....trainer import Trainer from .....trainer import TrainerCallback from .....misc.toolkit import eval_context @TrainerCallback.register("clip_vqgan_aligner") __all__ = [ "CLIPWithVQGANAlignerCallback", ]
[ 11748, 28686, 198, 11748, 269, 85, 17, 198, 11748, 28034, 198, 198, 6738, 350, 4146, 1330, 7412, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 198, 6738, 11485, 986, 2213, 10613, 1330, 31924, 198, 6738, 11485, 986, 2213, 10613, ...
2.99
100
"""Connections to gcloud datastore API servers.""" from gcloud import connection from gcloud.datastore import datastore_v1_pb2 as datastore_pb from gcloud.datastore import helpers from gcloud.datastore.dataset import Dataset class Connection(connection.Connection): """A connection to the Google Cloud Datastore v...
[ 37811, 13313, 507, 284, 308, 17721, 4818, 459, 382, 7824, 9597, 526, 15931, 198, 198, 6738, 308, 17721, 1330, 4637, 198, 6738, 308, 17721, 13, 19608, 459, 382, 1330, 4818, 459, 382, 62, 85, 16, 62, 40842, 17, 355, 4818, 459, 382, 62...
2.356065
7,156
from django.db import models
[ 6738, 42625, 14208, 13, 9945, 1330, 4981 ]
4
7
import MeCab from collections import Counter import re import alkana if __name__ == '__main__': Shareka('これはテストです').dajarewake()
[ 11748, 2185, 34, 397, 198, 6738, 17268, 1330, 15034, 198, 11748, 302, 198, 11748, 32915, 2271, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 8734, 4914, 10786, 46036, 39258, 31676, 24336, 4...
2.72
50
#-*- coding: utf-8 -*- #Part of BrowseInfo. See LICENSE file for full copyright and licensing details. from odoo import models, fields, api, _ from datetime import date,datetime
[ 2, 12, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 7841, 286, 44775, 12360, 13, 4091, 38559, 24290, 2393, 329, 1336, 6634, 290, 15665, 3307, 13, 198, 198, 6738, 16298, 2238, 1330, 4981, 11, 7032, 11, 40391, 11, 4808, ...
3.333333
54
from __future__ import absolute_import, print_function, unicode_literals from builtins import dict, str import os from indra.util import unicode_strs from indra.sources import bel from indra.sources.bel.rdf_processor import BelRdfProcessor from indra.statements import RegulateAmount, BioContext, RefContext from nose.pl...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 3601, 62, 8818, 11, 28000, 1098, 62, 17201, 874, 198, 6738, 3170, 1040, 1330, 8633, 11, 965, 198, 11748, 28686, 198, 6738, 773, 430, 13, 22602, 1330, 28000, 1098, 62, 2536, 82, 198, ...
2.710526
304
import asyncio from argparse import ArgumentParser from ircrobots import ConnectionParams from ircrobots.security import TLSVerifySHA512 from . import Bot from .config import Config, load as config_load from .database import Database if __name__ == "__main__": parser = ArgumentParser() parser.add_argument(...
[ 11748, 30351, 952, 198, 6738, 1822, 29572, 1330, 45751, 46677, 198, 198, 6738, 220, 1980, 22609, 1747, 1330, 26923, 10044, 4105, 198, 6738, 220, 1980, 22609, 1747, 13, 12961, 1330, 33855, 13414, 1958, 37596, 25836, 198, 198, 6738, 764, 13...
3.233083
133
# ****************************************************************************** # Copyright 2017-2018 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apa...
[ 2, 41906, 17174, 46068, 1174, 198, 2, 15069, 2177, 12, 7908, 8180, 10501, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, ...
2.199861
1,441
from .adam import Adam from .sgd import SGD, Momentum from .adagrad import AdaGrad from .adadelta import AdaDelta from .rmsprop import RMSprop from optim.optimizer import Optimizer import copy
[ 6738, 764, 324, 321, 1330, 7244, 198, 6738, 764, 82, 21287, 1330, 26147, 35, 11, 29278, 388, 198, 6738, 764, 324, 363, 6335, 1330, 47395, 42731, 198, 6738, 764, 324, 324, 12514, 1330, 47395, 42430, 198, 6738, 764, 81, 907, 22930, 1330...
3.327586
58
from larning.metaclass import CollectorType from larning.testing import name @name(CollectorType.__init__, 1, globals()) @name(CollectorType.__init__, 2, globals()) @name(CollectorType.__init__, 3, globals()) @name(CollectorType.__init__, 4, globals()) @name(CollectorType.__init__, 5, globals()) @name(Colle...
[ 6738, 300, 4228, 13, 4164, 330, 31172, 1330, 17573, 6030, 198, 6738, 300, 4228, 13, 33407, 1330, 1438, 628, 198, 31, 3672, 7, 31337, 273, 6030, 13, 834, 15003, 834, 11, 352, 11, 15095, 874, 28955, 628, 198, 31, 3672, 7, 31337, 273, ...
2.8
125
import sys from PyQt5.QtWidgets import QApplication, QMainWindow import os current_dir = os.path.dirname(os.path.abspath(__file__)) os.chdir(current_dir) from PyQt5.QtWidgets import QMessageBox from PyQt5.QtWidgets import QWidget from PyQt5.QtGui import QImage from PyQt5.QtGui import QPixmap from PyQt5.QtCore import ...
[ 11748, 25064, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 54, 312, 11407, 1330, 1195, 23416, 11, 1195, 13383, 27703, 198, 11748, 28686, 198, 198, 14421, 62, 15908, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 397, 2777,...
2.406082
559
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. r"""Implements dataset functionality to be used ``habitat.EmbodiedTask``. ``habitat.core.dataset`` abstracts over a colle...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 15069, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 198, 2, 770, 2723, 2438, 318, 11971, 739, 262, 17168, 5964, 1043, 287, 262, 198, 2, 38559, 24290, 2393, 287,...
2.336846
5,599
import os class Config: """ basic configurations. """ DEBUG = False PORT = os.environ.get('PORT') or 5000 ENV = os.environ.get('FLASK_ENV') SQLALCHEMY_DATABASE_URI = os.environ.get('SQLALCHEMY_DATABASE_URI') SQLALCHEMY_TRACK_MODIFICATIONS = False SECRET_KEY = "your-secret-key" class develo...
[ 11748, 28686, 198, 198, 4871, 17056, 25, 198, 220, 220, 220, 37227, 4096, 25412, 13, 37227, 198, 220, 220, 220, 16959, 796, 10352, 198, 220, 220, 220, 350, 9863, 796, 28686, 13, 268, 2268, 13, 1136, 10786, 15490, 11537, 393, 23336, 19...
2.626316
190
import sys import os import shutil import getpass from random import randint import Utils from decrypter import decrypt_file as df from encrypter import encrypt_file as ef import config_service as config import compressor
[ 11748, 25064, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 11748, 651, 6603, 198, 6738, 4738, 1330, 43720, 600, 198, 11748, 7273, 4487, 198, 6738, 875, 563, 42104, 1330, 42797, 62, 7753, 355, 47764, 198, 6738, 2207, 563, 42104, 1330, ...
3.946429
56
from __future__ import print_function __all__ = [ 'WaterColumnController', 'WaterTempController', ] KC_LEVEL = 1200.0 HREF = 1.5 WATER_CAPACITANCE = 50000000.0 KC_TEMP = 0.15 * WATER_CAPACITANCE TREF = 50.0
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 834, 439, 834, 796, 685, 198, 220, 220, 220, 705, 19184, 39470, 22130, 3256, 198, 220, 220, 220, 705, 19184, 30782, 22130, 3256, 198, 60, 198, 198, 36222, 62, 2538, 18697, 796, ...
2.402174
92
""" 二叉树排序 2020-12-09: 16:12.99;05:30.08;02:39.92; 2020-12-10: 06:03.32;02:41.62; """ from sort import validatetool if __name__ == '__main__': validatetool.validate(sort)
[ 37811, 198, 12859, 234, 20998, 231, 43718, 239, 162, 236, 240, 41753, 237, 198, 42334, 12, 1065, 12, 2931, 25, 1467, 25, 1065, 13, 2079, 26, 2713, 25, 1270, 13, 2919, 26, 2999, 25, 2670, 13, 5892, 26, 198, 42334, 12, 1065, 12, 940...
1.863158
95
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-01-19 01:36 from __future__ import unicode_literals from django.db import migrations import home.models import wagtail.wagtailcore.blocks import wagtail.wagtailcore.fields import wagtail.wagtaildocs.blocks import wagtail.wagtailimages.blocks
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 940, 13, 20, 319, 2177, 12, 486, 12, 1129, 5534, 25, 2623, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 1...
2.772727
110
from random import randint from copy import deepcopy TEST_ARR_LENGTH = 200 class Sort(object): """Sort class contains some sort methods""" def insert_sort(self): """ insert sort :param arr: array to sort :return: sorted array """ # outer loop: ...
[ 6738, 4738, 1330, 43720, 600, 198, 6738, 4866, 1330, 2769, 30073, 198, 198, 51, 6465, 62, 26465, 62, 43, 49494, 796, 939, 628, 198, 4871, 33947, 7, 15252, 2599, 198, 220, 220, 220, 37227, 42758, 1398, 4909, 617, 3297, 5050, 37811, 628...
1.882238
2,055
from twisted.internet import reactor from twisted.internet.protocol import Protocol, Factory from twisted.internet.endpoints import TCP4ClientEndpoint from txsocksx.client import SOCKS5ClientEndpoint socks_addr = '127.0.0.1' socks_port = 9050 TCPPoint = TCP4ClientEndpoint(reactor, socks_addr, socks_port) dst_addr = ...
[ 6738, 19074, 13, 37675, 1330, 21905, 198, 6738, 19074, 13, 37675, 13, 11235, 4668, 1330, 20497, 11, 19239, 198, 6738, 19074, 13, 37675, 13, 437, 13033, 1330, 23633, 19, 11792, 12915, 4122, 198, 198, 6738, 27765, 82, 3320, 87, 13, 16366,...
2.666667
189
from openslides.core.config import config from openslides.motions.exceptions import WorkflowError from openslides.motions.models import Motion, State, Workflow from openslides.users.models import User from openslides.utils.test import TestCase
[ 6738, 9808, 75, 1460, 13, 7295, 13, 11250, 1330, 4566, 198, 6738, 9808, 75, 1460, 13, 27926, 507, 13, 1069, 11755, 1330, 5521, 11125, 12331, 198, 6738, 9808, 75, 1460, 13, 27926, 507, 13, 27530, 1330, 20843, 11, 1812, 11, 5521, 11125,...
3.712121
66
class Solution: """ @param nums: a list of integers @return: return an integer """
[ 4871, 28186, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 2488, 17143, 997, 82, 25, 257, 1351, 286, 37014, 198, 220, 220, 220, 2488, 7783, 25, 1441, 281, 18253, 198, 220, 220, 220, 37227, 198 ]
2.675676
37
#!/usr/bin/env python from pwn import * context(os='linux', arch='amd64') host = '127.0.0.1' port = 9999 fd = 4 (rbp, canary, rip) = stage1() libc_write_leak = stage2(rbp, canary, rip) stage3(canary, rbp, libc_write_leak)
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 6738, 279, 675, 1330, 1635, 198, 198, 22866, 7, 418, 11639, 23289, 3256, 3934, 11639, 28745, 2414, 11537, 198, 198, 4774, 796, 705, 16799, 13, 15, 13, 15, 13, 16, 6, 198, 634, 796, ...
2.184466
103
from model.interact import sample_sequence, get_dataset import torch import config import random from database import database
[ 6738, 2746, 13, 3849, 529, 1330, 6291, 62, 43167, 11, 651, 62, 19608, 292, 316, 198, 11748, 28034, 198, 11748, 4566, 198, 11748, 4738, 198, 6738, 6831, 1330, 6831, 628, 628, 198 ]
4.09375
32
import ntpath from glob import glob from platform import system from pyxdf import load_xdf def read_raw_xdf(filename = None): '''Import a single XDF file format that contains one recording. Args: filename : string full path to a single recording Returns: Four arrays containing ...
[ 11748, 299, 83, 6978, 198, 6738, 15095, 1330, 15095, 198, 6738, 3859, 1330, 1080, 198, 6738, 12972, 87, 7568, 1330, 3440, 62, 87, 7568, 198, 198, 4299, 1100, 62, 1831, 62, 87, 7568, 7, 34345, 796, 6045, 2599, 198, 220, 220, 220, 705...
2.380685
1,781
import numpy as np import pyquaternion import casadi as cs import pandas as pd from sklearn.metrics import mean_squared_error def unit_quat(q): """ Normalizes a quaternion to be unit modulus. :param q: 4-dimensional numpy array or CasADi object :return: the unit quaternion in the same data format as ...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 12972, 421, 9205, 295, 198, 11748, 6124, 9189, 355, 50115, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 1341, 35720, 13, 4164, 10466, 1330, 1612, 62, 16485, 1144, 62, 18224, 628, 198, ...
2.317269
249
N = int(input()) result = 1 cnt = 0 total = factorial(result, N) for i in range(len(total)-1, 0, -1): if total[i] == '0': cnt += 1 if cnt > 0: if total[i] != '0': break print(cnt)
[ 198, 45, 796, 493, 7, 15414, 28955, 198, 20274, 796, 352, 198, 66, 429, 796, 657, 198, 23350, 796, 1109, 5132, 7, 20274, 11, 399, 8, 198, 1640, 1312, 287, 2837, 7, 11925, 7, 23350, 13219, 16, 11, 657, 11, 532, 16, 2599, 198, 220...
1.895652
115
#!/usr/bin/env python2 #coding=utf-8 from sage.all import * class MatrixCrackLfsr: """ 通过矩阵乘积的方式,求解 lfsr 的转移矩阵 :param seq: 已经捕获的比特流序列,一个 0,1 数字构成的列表 :param period: 用户可以指定序列的周期,如果周期不对,则会报出 Assert 错误 :return 序列对应的状态转移矩阵 """ if __name__ == "__main__": CL = MatrixCrackLfsr([1, 0, 1, 0, 0, ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 17, 198, 2, 66, 7656, 28, 40477, 12, 23, 198, 6738, 35021, 13, 439, 1330, 1635, 628, 198, 4871, 24936, 13916, 441, 43, 9501, 81, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 16268...
1.179739
306
# -*- coding: utf-8 -*- from django.db import models from django.utils.translation import gettext_lazy as _ import datetime from django.conf import settings #Para la autogneración de passwd from random import choice from string import letters #Para el envio del mail de confirmacion from django.core.mail import EmailM...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 651, 5239, 62, 75, 12582, 355, 4808, 198, 11748, 4818, 8079, 220, 198...
2.082251
693
#!/usr/bin/env python3 """ Contains all the file reading logic for the trainer """ import codecs def get_confirmation(warningtext): """ Prints a warning message and asks for user confirmation Return Values: True: User selected Yes False: User selected No ""...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 201, 198, 201, 198, 201, 198, 37811, 201, 198, 201, 198, 4264, 1299, 477, 262, 2393, 3555, 9156, 329, 262, 21997, 201, 198, 201, 198, 37811, 201, 198, 201, 198, 201, 198, 11748, 40481...
2.249829
4,379
# Generated by Django 2.2.17 on 2021-04-20 21:52 import json from os import path from django.conf import settings from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 1558, 319, 33448, 12, 3023, 12, 1238, 2310, 25, 4309, 198, 198, 11748, 33918, 198, 6738, 28686, 1330, 3108, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, ...
3.18
50
import frappe from frappe import _ from frappe.utils.data import add_days, nowdate @frappe.whitelist() def make_orientation_meeting(doc, method): """Create Orintate""" meeting = frappe.get_doc({ "doctype": "Meeting", "title": "Orientation for {0}".format(doc.first_name), "date": add_d...
[ 11748, 5306, 27768, 198, 6738, 5306, 27768, 1330, 4808, 198, 6738, 5306, 27768, 13, 26791, 13, 7890, 1330, 751, 62, 12545, 11, 783, 4475, 198, 198, 31, 69, 430, 27768, 13, 1929, 270, 46331, 3419, 628, 198, 4299, 787, 62, 13989, 341, ...
2.25
196
import copy import numpy as np import torch from collections import OrderedDict from torch.distributions import Categorical import rl_sandbox.constants as c # TODO: Add Q-table if we want
[ 11748, 4866, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 6738, 28034, 13, 17080, 2455, 507, 1330, 327, 2397, 12409, 198, 198, 11748, 374, 75, 62, 38142, 3524, 13, 9979, ...
3.266667
60
from typing import Any from django.core.management.base import BaseCommand from ...apps import generate_schema, get_schema
[ 6738, 19720, 1330, 4377, 198, 198, 6738, 42625, 14208, 13, 7295, 13, 27604, 13, 8692, 1330, 7308, 21575, 198, 198, 6738, 2644, 18211, 1330, 7716, 62, 15952, 2611, 11, 651, 62, 15952, 2611, 628 ]
3.705882
34
from __future__ import unicode_literals from django.db import models # Create your models here.
[ 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 198, 2, 13610, 534, 4981, 994, 13, 628, 220, 220, 220, 220, 198 ]
3.21875
32
# !/usr/bin/env python3 # -*- coding: utf-8 -*- # @author: SaltFish # @file: control.py # @date: 2020/07/15 import os import sqlite3 import time database_dir = os.path.join(os.getcwd(), "instance", "database.sqlite") def execute_sql(sql, choice): """ 执行sql语句 :param sql: :param choice: 'select', 'upd...
[ 2, 5145, 14, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2488, 9800, 25, 13754, 39428, 198, 2, 2488, 7753, 25, 1630, 13, 9078, 198, 2, 2488, 4475, 25, 12131, 14, ...
2.206186
291
from cricket_db.parsers.parser import Parser
[ 6738, 18836, 62, 9945, 13, 79, 945, 364, 13, 48610, 1330, 23042, 263, 628, 628, 198 ]
3.0625
16
from django import template from program.models import Type, MusicFocus, Category, Topic register = template.Library() @register.inclusion_tag('boxes/type.html') @register.inclusion_tag('boxes/musicfocus.html') @register.inclusion_tag('boxes/category.html') @register.inclusion_tag('boxes/topic.html')
[ 6738, 42625, 14208, 1330, 11055, 198, 198, 6738, 1430, 13, 27530, 1330, 5994, 11, 7849, 34888, 11, 21743, 11, 47373, 198, 198, 30238, 796, 11055, 13, 23377, 3419, 628, 198, 31, 30238, 13, 259, 4717, 62, 12985, 10786, 29305, 14, 4906, ...
3.344086
93
constants.physical_constants["helion mass energy equivalent in MeV"]
[ 9979, 1187, 13, 42854, 62, 9979, 1187, 14692, 2978, 295, 2347, 2568, 7548, 287, 2185, 53, 8973 ]
4
17
"""sysl module loader""" import codecs import os import re import sys from sysl.proto import sysl_pb2 from sysl.core import syslalgo from sysl.core import syslparse from sysl.core import syslx def fmt_app_name(appname): """Format a sysl_pb2.AppName as a syntactically valid string.""" return ' :: '.join(app...
[ 37811, 17597, 75, 8265, 40213, 37811, 198, 198, 11748, 40481, 82, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 25064, 198, 198, 6738, 827, 6649, 13, 1676, 1462, 1330, 827, 6649, 62, 40842, 17, 198, 198, 6738, 827, 6649, 13, 7295, 1...
2.088
3,250
from django.db import models from simple_history.models import HistoricalRecords
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 2829, 62, 23569, 13, 27530, 1330, 23121, 6690, 3669, 628, 198 ]
4.15
20
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the Li...
[ 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, 743, 7330, 257, 4866, 286, 262, 13789, 379, 198, 2,...
3.820276
217
# coding=utf-8 # import spacy import re, json from math import log # nlp = spacy.load('en',disable=["tagger", "parser", "ner"]) re_word = re.compile(r"\w+") import json tweets = {} posting_list = {} def re_get_word_count(text:str): ''' params: text: str 文本 return type: ...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 1330, 599, 1590, 198, 11748, 302, 11, 33918, 198, 6738, 10688, 1330, 2604, 198, 2, 299, 34431, 796, 599, 1590, 13, 2220, 10786, 268, 3256, 40223, 28, 14692, 83, 7928, 1600, 366, 48610, 1600, 366,...
1.888777
1,978
from bs4 import BeautifulSoup import requests import lxml Print_title = True #Forexlive url = "http://www.forexlive.com/SessionWraps" #put URL here r = requests.get(url) data = r.text soup = BeautifulSoup(data,"lxml") #Doing it like this prevents some weird error if Print_title == True: print ("FOREXLIVE LATEST...
[ 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 11748, 7007, 198, 11748, 300, 19875, 198, 198, 18557, 62, 7839, 796, 6407, 198, 198, 2, 16351, 87, 12583, 198, 6371, 796, 366, 4023, 1378, 2503, 13, 754, 87, 12583, 13, 785, 14, ...
2.639175
194
from typing import List from math import inf
[ 6738, 19720, 1330, 7343, 198, 6738, 10688, 1330, 1167 ]
4.888889
9
from numpy import mat from GQA.quantum.population import Population from operator import itemgetter from GQA.functions.knapsack import Knapsack import math import random from tqdm import tqdm from matplotlib import pyplot as plt
[ 6738, 299, 32152, 1330, 2603, 198, 6738, 402, 48, 32, 13, 40972, 388, 13, 39748, 1330, 20133, 198, 6738, 10088, 1330, 2378, 1136, 353, 198, 6738, 402, 48, 32, 13, 12543, 2733, 13, 15418, 1686, 441, 1330, 6102, 1686, 441, 198, 11748, ...
3.216216
74
import netifaces as ni
[ 11748, 2010, 361, 2114, 355, 37628 ]
3.666667
6
# Review: # Create a function called greet(). # Write 3 print statements inside the function. # Call the greet() function and run your code. greet()
[ 2, 6602, 25, 220, 198, 2, 13610, 257, 2163, 1444, 12589, 22446, 220, 198, 2, 19430, 513, 3601, 6299, 2641, 262, 2163, 13, 198, 2, 4889, 262, 12589, 3419, 2163, 290, 1057, 534, 2438, 13, 198, 70, 2871, 3419 ]
3.846154
39
#!/usr/bin/env micropython # -*- coding: utf-8 -*- import socket_drcom as socket import struct import time from md5_drcom import MD5Type as md5 import sys import os import random_drcom as random import binascii import uerrno # CONFIG server = "192.168.100.150" username = "" password = "" host_name = "LIYUANYUAN" host_...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 12314, 1773, 7535, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 17802, 62, 7109, 785, 355, 17802, 198, 11748, 2878, 198, 11748, 640, 198, 6738, 45243, 20, 62, 7109,...
2.158165
2,529
import argparse from pythonosc import osc_message_builder from pythonosc import udp_client if __name__ == '__main__': main()
[ 11748, 1822, 29572, 198, 198, 6738, 21015, 17500, 1330, 267, 1416, 62, 20500, 62, 38272, 198, 6738, 21015, 17500, 1330, 334, 26059, 62, 16366, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, ...
3.093023
43
from flask import abort from flask import Blueprint from flask import render_template from jinja2 import TemplateNotFound from flask_login import login_required, current_user router = Blueprint('profile_route', __name__, template_folder='templates', static_folder='static', ...
[ 6738, 42903, 1330, 15614, 198, 6738, 42903, 1330, 39932, 198, 6738, 42903, 1330, 8543, 62, 28243, 198, 6738, 474, 259, 6592, 17, 1330, 37350, 3673, 21077, 198, 198, 6738, 42903, 62, 38235, 1330, 17594, 62, 35827, 11, 1459, 62, 7220, 628...
2.666667
156