content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
import logging from spaceone.core.manager import BaseManager from spaceone.core.connector.space_connector import SpaceConnector _LOGGER = logging.getLogger(__name__)
[ 11748, 18931, 198, 198, 6738, 2272, 505, 13, 7295, 13, 37153, 1330, 7308, 13511, 198, 6738, 2272, 505, 13, 7295, 13, 8443, 273, 13, 13200, 62, 8443, 273, 1330, 4687, 34525, 198, 198, 62, 25294, 30373, 796, 18931, 13, 1136, 11187, 1362...
3.520833
48
# -*- coding: utf-8 -*- """ # @file name : hist_label_portrait.py # @author : JLChen # @date : 2020-03-11 # @brief : """ import numpy as np import os import matplotlib.pyplot as plt import pylab as pl import cv2 if __name__ == '__main__': data_dir = r"G:\deep_learning_data\EG_dataset\dataset\tr...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 2, 2488, 7753, 1438, 220, 1058, 1554, 62, 18242, 62, 634, 12907, 13, 9078, 198, 2, 2488, 9800, 220, 220, 220, 220, 1058, 449, 5639, 831, 198, 2, 2488, 44...
2.236686
338
# -*- coding: utf-8 -*- """Client context module.""" import pytz import time from flask import current_app from datetime import datetime, timedelta from mongoengine import DoesNotExist from .ab_test import get_enrolled_experiments from .core import cache from .errors import APIError from .helpers import assert_vali...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 11792, 4732, 8265, 526, 15931, 198, 198, 11748, 12972, 22877, 198, 11748, 640, 198, 198, 6738, 42903, 1330, 1459, 62, 1324, 198, 6738, 4818, 8079, 1330, 4818, ...
2.459794
1,455
from configparser import ConfigParser import json import fnmatch import os __author__ = 'justin@shapeways.com' TEST_RUN_SETTING_CONFIG = 'TEST_RUN_SETTING_CONFIG' confg_dict = {} def load_config_vars(target_config, source_config): """Loads all attributes from source config into target config @type targe...
[ 6738, 4566, 48610, 1330, 17056, 46677, 198, 11748, 33918, 198, 11748, 24714, 15699, 198, 11748, 28686, 198, 198, 834, 9800, 834, 796, 705, 3137, 259, 31, 1477, 499, 43613, 13, 785, 6, 628, 198, 51, 6465, 62, 49, 4944, 62, 28480, 48996...
2.722772
303
from enum import Enum import tensorflow.compat.v1 as tf from tensorflow.keras.layers import Layer, Conv3D, Conv3DTranspose, AveragePooling3D from tensorflow_core.python.keras.utils import conv_utils import tensorflow_compression as tfc import tensorflow.keras as keras # ad-hoc alert: specify the activation using this...
[ 6738, 33829, 1330, 2039, 388, 198, 11748, 11192, 273, 11125, 13, 5589, 265, 13, 85, 16, 355, 48700, 198, 6738, 11192, 273, 11125, 13, 6122, 292, 13, 75, 6962, 1330, 34398, 11, 34872, 18, 35, 11, 34872, 18, 35, 8291, 3455, 11, 13475,...
3.096774
155
""" Main module for running NetSpeedGraphs. """ ##### IMPORTS ##### # Standard imports from pathlib import Path from datetime import datetime, timedelta from argparse import ArgumentParser # Third party imports import speedtest import numpy as np import pandas as pd from bokeh.plotting import figure, output_file,...
[ 37811, 198, 220, 220, 220, 8774, 8265, 329, 2491, 3433, 22785, 37065, 82, 13, 198, 37811, 198, 198, 4242, 2, 30023, 33002, 46424, 198, 2, 8997, 17944, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28...
2.487534
2,607
from typing import Tuple from ground.base import Relation from hypothesis import given from orient.hints import (Multiregion, Region) from orient.planar import (contour_in_multiregion, region_in_multiregion, region_in_region) from tests.u...
[ 6738, 19720, 1330, 309, 29291, 198, 198, 6738, 2323, 13, 8692, 1330, 4718, 341, 198, 6738, 14078, 1330, 1813, 198, 198, 6738, 11367, 13, 71, 29503, 1330, 357, 15205, 557, 70, 295, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220...
1.805164
426
#!/usr/bin/env python #--------------------------------------------------------- # Name: parse_qca.py # Purpose: Parsing functions for QCADesigner files # Author: Jacob Retallick # Created: 2015.10.22 # Last Modified: 2015.10.22 #--------------------------------------------------------- # NOTE # the origin...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 201, 198, 201, 198, 2, 43801, 12, 201, 198, 2, 6530, 25, 21136, 62, 80, 6888, 13, 9078, 201, 198, 2, 32039, 25, 23042, 278, 5499, 329, 36070, 2885, 274, 570, 263, 3696, 201, 198, 2, 6...
2.125228
5,494
""" ================= Linear Regression ================= In this tutorial, we are going to demonstrate how to use the ``abess`` package to carry out best subset selection in linear regression with both simulated data and real data. """ ############################################################################### #...
[ 37811, 198, 4770, 28, 198, 14993, 451, 3310, 2234, 198, 4770, 28, 198, 198, 818, 428, 11808, 11, 356, 389, 1016, 284, 10176, 703, 284, 779, 262, 7559, 397, 408, 15506, 5301, 284, 3283, 503, 1266, 24637, 6356, 198, 259, 14174, 20683, ...
3.145106
2,350
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Tracing module.""" import asyncio from pathlib import Path from typing import Any, Awaitable from pyppeteer.connection import Session
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 2898, 4092, 8265, 526, 15931, 198, 198, 11748, 30351, 952, 198, 6738, 3108, 8019, 1330, 10644, 198, 673...
2.984127
63
from typing import Optional, Dict from wai.common.adams.imaging.locateobjects import LocatedObjects from wai.common.cli.options import TypedOption from ....core.component import ProcessorComponent from ....core.stream import ThenFunction, DoneFunction from ....core.stream.util import RequiresNoFinalisation from ....c...
[ 6738, 19720, 1330, 32233, 11, 360, 713, 198, 198, 6738, 266, 1872, 13, 11321, 13, 324, 4105, 13, 320, 3039, 13, 75, 13369, 48205, 1330, 40764, 10267, 82, 198, 6738, 266, 1872, 13, 11321, 13, 44506, 13, 25811, 1330, 17134, 276, 19722, ...
3.938462
130
#=========================================================================== # # msgHub package # #=========================================================================== __doc__ = """Zero-MQ Message Hub The msgHub is a pub/sub forwarder. All of the various data producers send messages to the msgHub as a single ...
[ 2, 23926, 2559, 18604, 198, 2, 198, 2, 31456, 16066, 5301, 198, 2, 198, 2, 23926, 2559, 18604, 198, 198, 834, 15390, 834, 796, 37227, 28667, 12, 49215, 16000, 14699, 198, 198, 464, 31456, 16066, 318, 257, 2240, 14, 7266, 2651, 263, ...
5.664286
140
# -*- coding: utf-8 -*- # vim:fenc=utf-8 """ Module for gramex exposure. This shouldn't be imported anywhere, only for use with gramex. """ import glob import json import os import os.path as op import pandas as pd from six.moves.urllib import parse from tornado.template import Template from gramex.apps.nlg import g...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 43907, 25, 69, 12685, 28, 40477, 12, 23, 198, 198, 37811, 198, 26796, 329, 1036, 480, 87, 7111, 13, 770, 6584, 470, 307, 17392, 6609, 11, 691, 329, 779, 198, 4480...
2.436911
3,289
import plotly.graph_objects as go import plotly as plt import random # Uncomment the names you want the diagram to show # Names in english # sta = "Statistical Office" # si = "Emergency call admission" #"sprejem intervencij" # pni = "Emergency intervention report" #"poroilo/protokol nujne intervencije" # pnrv = "Eme...
[ 11748, 7110, 306, 13, 34960, 62, 48205, 355, 467, 198, 11748, 7110, 306, 355, 458, 83, 198, 11748, 4738, 198, 198, 2, 791, 23893, 262, 3891, 345, 765, 262, 16362, 284, 905, 198, 198, 2, 28531, 287, 46932, 198, 2, 336, 64, 796, 366...
2.428769
1,446
from __future__ import print_function from builtins import str from builtins import range # This script is not meant to provide a fully automated test, it's # merely a hack/starting point for investigating memory consumption # manually. The behavior also depends heavily on the version of meliae. from meliae import scan...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 3170, 1040, 1330, 965, 198, 6738, 3170, 1040, 1330, 2837, 198, 2, 770, 4226, 318, 407, 4001, 284, 2148, 257, 3938, 16359, 1332, 11, 340, 338, 198, 2, 6974, 257, 8156, 14, 386...
3.601266
158
#!/usr/bin/env python3 # -*- encoding: utf-8 -*- __developer__ = 'Alex Pinheiro' __version__ = 1.4 __build__ = 6 import sqlite3 from tkinter.ttk import * from tkinter.filedialog import * from threading import Thread from utils import Utils from login import Login u = Utils # Listas estados = ['AC', 'AL', 'AP', 'AM'...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 21004, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 834, 16244, 263, 834, 796, 705, 15309, 13727, 258, 7058, 6, 198, 834, 9641, 834, 796, 352, 13, 19, 198, 83...
2.422535
355
from pricehist import beanprice from pricehist.sources.alphavantage import AlphaVantage Source = beanprice.source(AlphaVantage())
[ 6738, 2756, 10034, 1330, 26394, 20888, 198, 6738, 2756, 10034, 13, 82, 2203, 13, 17307, 615, 36403, 1330, 12995, 53, 36403, 198, 198, 7416, 796, 26394, 20888, 13, 10459, 7, 38077, 53, 36403, 28955, 198 ]
3.742857
35
import math import sys from scipy.interpolate import interp2d from scipy.ndimage import rotate, center_of_mass from scipy.spatial import distance from skimage.feature import canny from skimage.filters import rank, gaussian from skimage.measure import subdivide_polygon from skimage.morphology import medial_axis, square...
[ 11748, 10688, 198, 11748, 25064, 198, 198, 6738, 629, 541, 88, 13, 3849, 16104, 378, 1330, 987, 79, 17, 67, 198, 6738, 629, 541, 88, 13, 358, 9060, 1330, 23064, 11, 3641, 62, 1659, 62, 22208, 198, 6738, 629, 541, 88, 13, 2777, 349...
1.791842
3,555
#!/usr/bin/env python # coding: utf-8 from sacred.observers import TinyDbReader import pdb import numpy as np import pandas as pd import matplotlib.pyplot as plt
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 6738, 13626, 13, 672, 2655, 690, 1330, 20443, 43832, 33634, 198, 198, 11748, 279, 9945, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798,...
2.844828
58
# Copyright (C) 2005-2017 Splunk Inc. All Rights Reserved. Version 6.x # Author: Andrew Quill import sys,splunk.Intersplunk import string import getpass import re if __name__ == "__main__": main()
[ 2, 15069, 357, 34, 8, 5075, 12, 5539, 13341, 2954, 3457, 13, 220, 1439, 6923, 33876, 13, 220, 10628, 718, 13, 87, 198, 2, 6434, 25, 6858, 2264, 359, 198, 11748, 25064, 11, 22018, 2954, 13, 818, 1010, 489, 2954, 198, 11748, 4731, 1...
2.942857
70
# Write a function that takes a string as input and reverse only the vowels of a string. # Example 1: # Input: "hello" # Output: "holle" # Example 2: # Input: "leetcode" # Output: "leotcede" if __name__ == "__main__": s = "hello" print(Solution().reverseVowels(s))
[ 2, 19430, 257, 2163, 326, 2753, 257, 4731, 355, 5128, 290, 9575, 691, 262, 23268, 1424, 286, 257, 4731, 13, 198, 198, 2, 17934, 352, 25, 198, 198, 2, 23412, 25, 366, 31373, 1, 198, 2, 25235, 25, 366, 3937, 293, 1, 198, 2, 17934,...
2.679612
103
import argparse from slackbot.basic.igfbasicslackbot import IgfBasicSlackBot parser=argparse.ArgumentParser() parser.add_argument('-s','--slack_config', required=True, help='Slack configuration json file') parser.add_argument('-p','--project_data', required=True, help='Project data CSV file') args=parser.parse_args()...
[ 11748, 1822, 29572, 198, 6738, 30740, 13645, 13, 35487, 13, 328, 69, 12093, 873, 75, 441, 13645, 220, 1330, 28818, 69, 26416, 11122, 441, 20630, 198, 198, 48610, 28, 853, 29572, 13, 28100, 1713, 46677, 3419, 198, 48610, 13, 2860, 62, ...
2.621005
219
countDown(20,"Blastoff!")
[ 9127, 8048, 7, 1238, 553, 3629, 459, 2364, 2474, 8, 198 ]
2.363636
11
from glob import glob import os import shutil from django.core.management.base import BaseCommand from bgbl.pdf_utils import fix_glyphs, remove_watermark
[ 6738, 15095, 1330, 15095, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 198, 6738, 42625, 14208, 13, 7295, 13, 27604, 13, 8692, 1330, 7308, 21575, 198, 198, 6738, 275, 70, 2436, 13, 12315, 62, 26791, 1330, 4259, 62, 10853, 746, 82, 1...
3.340426
47
from dataclasses import dataclass, field from typing import List from bindings.csw.abstract_time_complex_type import AbstractTimeComplexType from bindings.csw.time_topology_primitive_property_type import ( TimeTopologyPrimitivePropertyType, ) __NAMESPACE__ = "http://www.opengis.net/gml"
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 11, 2214, 198, 6738, 19720, 1330, 7343, 198, 6738, 34111, 13, 66, 2032, 13, 397, 8709, 62, 2435, 62, 41887, 62, 4906, 1330, 27741, 7575, 5377, 11141, 6030, 198, 6738, 34111, 13, 66, 2032...
3.12766
94
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. from flask import Blueprint, abort, request from ...utils.docker_controller import DockerController from ...utils.exception import CommandExecutionError # Flask related. blueprint = Blueprint(name="container", import_name=__name__) URL_PREFIX...
[ 2, 15069, 357, 66, 8, 5413, 10501, 13, 198, 2, 49962, 739, 262, 17168, 5964, 13, 628, 198, 6738, 42903, 1330, 39932, 11, 15614, 11, 2581, 198, 198, 6738, 2644, 26791, 13, 45986, 62, 36500, 1330, 25716, 22130, 198, 6738, 2644, 26791, ...
3.683673
98
# print to log file, not shown on screen (to stderr which ev3dev os puts in logfile) from ev3devlogger import log #from ev3devlogger import timedlog as log log("starwars song(log)") from ev3devlogger import timedlog timedlog("starwars song(timedlog)") print("starwars (print)") log("starwars song") from ev3devlogg...
[ 2, 3601, 284, 2604, 2393, 11, 407, 3402, 319, 3159, 220, 220, 357, 1462, 336, 1082, 81, 543, 819, 18, 7959, 28686, 7584, 287, 2604, 7753, 8, 198, 6738, 819, 18, 7959, 6404, 1362, 1330, 2604, 198, 2, 6738, 819, 18, 7959, 6404, 1362...
2.887218
133
# Copyright (C) 2021 Google 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 writing, ...
[ 2, 15069, 357, 34, 8, 33448, 3012, 3457, 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, 198, ...
3.743961
207
# # Copyright (c) 2017 nexB Inc. and others. All rights reserved. # http://nexb.com and https://github.com/nexB/scancode-toolkit/ # The ScanCode software is licensed under the Apache License version 2.0. # Data generated with ScanCode require an acknowledgment. # ScanCode is a trademark of nexB Inc. # # You may not use...
[ 2, 198, 2, 15069, 357, 66, 8, 2177, 497, 87, 33, 3457, 13, 290, 1854, 13, 1439, 2489, 10395, 13, 198, 2, 2638, 1378, 12413, 65, 13, 785, 290, 3740, 1378, 12567, 13, 785, 14, 12413, 33, 14, 1416, 1192, 1098, 12, 25981, 15813, 14,...
2.896552
2,030
# # Copyright 2021-2022 konawasabi # # 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, 198, 2, 220, 220, 220, 15069, 33448, 12, 1238, 1828, 479, 261, 707, 292, 17914, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 220, 220, 220, 345, 7...
2.717042
622
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os import sys import tempfile if __name__ == "__main__": sys.exit(main())
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 20218, 7753, 628, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366...
2.338983
59
""" Script that runs all tests written """ import os import pathlib import pytest cwd = pathlib.Path.cwd os.chdir(cwd() / "tests") for subf in subfolders(cwd()): if not subf.endswith("__pycache__"): os.chdir(subf) pytest.main()
[ 37811, 198, 198, 7391, 326, 4539, 477, 5254, 3194, 198, 198, 37811, 198, 198, 11748, 28686, 198, 11748, 3108, 8019, 198, 198, 11748, 12972, 9288, 198, 198, 66, 16993, 796, 3108, 8019, 13, 15235, 13, 66, 16993, 628, 198, 418, 13, 354, ...
2.243478
115
# -*- coding: utf-8 -*- # Copyright 2017-2018 Orbital Insight Inc., all rights reserved. # Contains confidential and trade secret information. # Government Users: Commercial Computer Software - Use governed by # terms of Orbital Insight commercial license agreement. """ Created on Tue Oct 22 21:22:36 2019 @author: fe...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 2177, 12, 7908, 45453, 39917, 3457, 1539, 477, 2489, 10395, 13, 198, 2, 49850, 15279, 290, 3292, 3200, 1321, 13, 198, 2, 5070, 18987, 25, 22724, 13851, 10442, ...
3.773438
128
import sys import traceback import cPickle as pickle if len(sys.argv) != 3: print 'Usage: script.py input output' sys.exit() in_path, out_path = sys.argv[1:] benchmarks = pickle.load(open(in_path)) results = {} for bmk in benchmarks: try: res = bmk.run() results[bmk.checksum] = res ex...
[ 11748, 25064, 198, 11748, 12854, 1891, 198, 11748, 269, 31686, 293, 355, 2298, 293, 198, 198, 361, 18896, 7, 17597, 13, 853, 85, 8, 14512, 513, 25, 198, 220, 220, 220, 3601, 705, 28350, 25, 4226, 13, 9078, 5128, 5072, 6, 198, 220, ...
2.373832
214
import sys import random MAX_R = 1000 MAX_D = 25 MAX_K = 20 MAX_C = 2000 MAX_B = 100 case_no = 1 random.seed(42) gen_special() gen_random(17, 5, 9, 8, 23, 5, 11) for i in range(25): r = random.randint(1, MAX_R) s = random.randint(1, MAX_D) m = random.randint(1, MAX_D) d = random.randint(1, MAX_...
[ 11748, 25064, 198, 11748, 4738, 198, 198, 22921, 62, 49, 796, 8576, 198, 22921, 62, 35, 796, 1679, 198, 22921, 62, 42, 796, 1160, 198, 22921, 62, 34, 796, 4751, 198, 22921, 62, 33, 796, 1802, 198, 198, 7442, 62, 3919, 796, 352, 62...
1.809609
562
#!/usr/bin/env python import os import sys sys.path.append(os.getcwd()) import abinitio_driver as driver from abinitio_driver import AUtoEV import scipy.optimize as opt from scipy.interpolate import interp1d try: import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt except: pass # This i...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 28686, 198, 11748, 25064, 198, 17597, 13, 6978, 13, 33295, 7, 418, 13, 1136, 66, 16993, 28955, 198, 11748, 450, 15003, 952, 62, 26230, 355, 4639, 198, 6738, 450, 15003, 952, 62,...
2.412587
3,432
import unittest from basketball_reference_scraper.pbp import get_pbp if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 6738, 9669, 62, 35790, 62, 1416, 38545, 13, 40842, 79, 1330, 651, 62, 40842, 79, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3419, 198 ...
2.72093
43
import re import os from sys import argv def find(what, where, depth=True): """ :param what: str String to search for :param where: str directory to start search in :param regexp: bool If true then 'what' is a regexp, otherwise - use simple substring search :return: """ r = re.compile(what...
[ 11748, 302, 198, 11748, 28686, 198, 6738, 25064, 1330, 1822, 85, 628, 198, 4299, 1064, 7, 10919, 11, 810, 11, 6795, 28, 17821, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1058, 17143, 644, 25, 965, 10903, 284, 2989, 329, 19...
2.260116
346
import csv visited = {} if __name__ == "__main__": rows = [] with open('input.csv') as csvfile: reader = csv.reader(csvfile) for row in reader: rows.append(row) output_rows = [] for row in rows: output_row = [] for cell in row: output_ro...
[ 198, 11748, 269, 21370, 198, 198, 4703, 863, 796, 23884, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 220, 198, 220, 220, 220, 15274, 796, 17635, 628, 220, 220, 220, 351, 1280, 10786, 15414, ...
2.061538
260
''' Created on Sep 19, 2020 @author: esdev '''
[ 7061, 6, 198, 41972, 319, 8621, 678, 11, 12131, 198, 198, 31, 9800, 25, 1658, 7959, 198, 7061, 6, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, ...
1.608696
46
from buycoins_client import Auth import unittest if __name__ == '__main__': unittest.main()
[ 6738, 2822, 14624, 62, 16366, 1330, 26828, 198, 11748, 555, 715, 395, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3419, 198 ]
2.75
36
# from ui import UI # from ui import UI_Element import sys import time import threading import socket from plcrpcservice import PLCRPCClient import pyndn from pyndn import Name from pyndn import Face from pyndn import Interest from pyndn.security import KeyChain from pyndn.security.identity import IdentityManager fr...
[ 2, 422, 334, 72, 1330, 12454, 198, 2, 422, 334, 72, 1330, 12454, 62, 20180, 198, 11748, 25064, 198, 11748, 640, 198, 11748, 4704, 278, 198, 11748, 17802, 198, 198, 6738, 458, 6098, 14751, 15271, 1330, 350, 5639, 49, 5662, 11792, 198, ...
2.850806
248
from typing import Union import discord from discord.ext import commands import cogs.gamertags from ansura.ansurabot import AnsuraBot from ansura.ansuracontext import AnsuraContext
[ 6738, 19720, 1330, 4479, 198, 198, 11748, 36446, 198, 6738, 36446, 13, 2302, 1330, 9729, 198, 198, 11748, 269, 18463, 13, 28483, 861, 3775, 198, 6738, 9093, 5330, 13, 504, 333, 397, 313, 1330, 28038, 5330, 20630, 198, 6738, 9093, 5330, ...
3.557692
52
import os from celery import Celery from django.conf import settings os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'project.settings') app = Celery('jobboard') app.config_from_object('django.conf:settings') app.autodiscover_tasks(lambda: settings.INSTALLED_APPS)
[ 11748, 28686, 198, 6738, 18725, 1924, 1330, 15248, 1924, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 198, 418, 13, 268, 2268, 13, 2617, 12286, 10786, 35028, 1565, 11230, 62, 28480, 51, 20754, 62, 33365, 24212, 3256, 705, 16302, ...
2.913043
92
#-*- coding: utf-8 -*- from .mixins import * from .filemodels import * from .clipboardmodels import * from .imagemodels import * from .foldermodels import * from .virtualitems import * from .archivemodels import *
[ 2, 12, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 764, 19816, 1040, 1330, 1635, 198, 6738, 764, 7753, 27530, 1330, 1635, 198, 6738, 764, 15036, 3526, 27530, 1330, 1635, 198, 6738, 764, 48466, 368, 375, 1424, 1330, ...
3.242424
66
from time import time from datetime import datetime from twisted.internet.defer import inlineCallbacks from EGGS_labrad.clients import GUIClient from EGGS_labrad.clients.cryovac_clients.fma1700a_gui import fma1700a_gui if __name__ == "__main__": from EGGS_labrad.clients import runClient runClient(fma1700a_c...
[ 6738, 640, 1330, 640, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 19074, 13, 37675, 13, 4299, 263, 1330, 26098, 14134, 10146, 198, 198, 6738, 412, 11190, 50, 62, 23912, 6335, 13, 565, 2334, 1330, 19348, 2149, 75, 1153, 198, 67...
2.725
120
import sys import unittest sys.path.append('../') from app import db # NOQA from app.models import User # NOQA from tests.base import BaseTestCase # NOQA if __name__ == '__main__': unittest.main()
[ 11748, 25064, 198, 11748, 555, 715, 395, 198, 198, 17597, 13, 6978, 13, 33295, 10786, 40720, 11537, 198, 6738, 598, 1330, 20613, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220...
2.18018
111
# coding=utf-8 """Examples demonstrating usage of PyPinT .. moduleauthor:: Torbjrn Klatt <t.klatt@fz-juelich.de> """
[ 2, 19617, 28, 40477, 12, 23, 198, 37811, 27730, 21135, 8748, 286, 9485, 28348, 51, 198, 198, 492, 8265, 9800, 3712, 4022, 50007, 35906, 14770, 1078, 1279, 83, 13, 41582, 1078, 31, 69, 89, 12, 73, 2731, 488, 13, 2934, 29, 198, 37811,...
2.681818
44
from flask import Flask, render_template, request import cd4ml.app_utils as utils from cd4ml.fluentd_logging import FluentdLogger app = Flask(__name__, template_folder='webapp/templates', static_folder='webapp/static') fluentd_logger = FluentdLogger() def log_prediction_console(log_payload): pri...
[ 6738, 42903, 1330, 46947, 11, 8543, 62, 28243, 11, 2581, 198, 11748, 22927, 19, 4029, 13, 1324, 62, 26791, 355, 3384, 4487, 198, 6738, 22927, 19, 4029, 13, 69, 28216, 67, 62, 6404, 2667, 1330, 34070, 298, 67, 11187, 1362, 198, 198, ...
2.725191
131
from fastapi import HTTPException from tortoise.exceptions import DoesNotExist from db.models import Events from schemas.events import EventsOutSchema
[ 6738, 3049, 15042, 1330, 14626, 16922, 198, 6738, 7619, 25678, 13, 1069, 11755, 1330, 8314, 3673, 3109, 396, 198, 198, 6738, 20613, 13, 27530, 1330, 18715, 198, 6738, 3897, 5356, 13, 31534, 1330, 18715, 7975, 27054, 2611, 628, 628, 198 ]
3.9
40
import asyncio import os import unicodedata import aiohttp import discord import lavalink import unidecode from redbot.core import Config, checks, commands from redbot.core.utils.chat_formatting import pagify from redbot.core.utils.predicates import MessagePredicate from .api import generate_urls try: from redb...
[ 11748, 30351, 952, 198, 11748, 28686, 198, 11748, 28000, 9043, 1045, 198, 198, 11748, 257, 952, 4023, 198, 11748, 36446, 198, 11748, 300, 9226, 676, 198, 11748, 555, 485, 8189, 198, 6738, 2266, 13645, 13, 7295, 1330, 17056, 11, 8794, 11...
3.070588
170
""" Normalizes contents for all data files. - Converts column names to uppercase - Converts data values to uppercase - Converts to Unix line endings - Removes trailing whitespace from all lines """ import os csvs = ['data/' + f for f in os.listdir('data') if f.endswith('.csv')] for f in csvs: lf = f.lower() o...
[ 37811, 198, 26447, 4340, 10154, 329, 477, 1366, 3696, 13, 198, 198, 12, 1482, 24040, 5721, 3891, 284, 334, 39921, 589, 198, 12, 1482, 24040, 1366, 3815, 284, 334, 39921, 589, 198, 12, 1482, 24040, 284, 33501, 1627, 38168, 198, 12, 398...
2.628959
221
from NERDA.models import NERDA from NERDA.datasets import get_conll_data, get_dane_data from transformers import AutoTokenizer trans = 'bert-base-multilingual-uncased' tokenizer = AutoTokenizer.from_pretrained(trans, do_lower_case = True) data = get_dane_data('train') sents = data.get('sentences') out = [] for sent ...
[ 6738, 399, 1137, 5631, 13, 27530, 1330, 399, 1137, 5631, 198, 6738, 399, 1137, 5631, 13, 19608, 292, 1039, 1330, 651, 62, 1102, 297, 62, 7890, 11, 651, 62, 67, 1531, 62, 7890, 198, 6738, 6121, 364, 1330, 11160, 30642, 7509, 198, 764...
2.449911
1,118
# Copyright 2014 Cisco Systems, Inc. # 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 requi...
[ 2, 15069, 1946, 28289, 11998, 11, 3457, 13, 198, 2, 1439, 6923, 33876, 13, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 220, 407, ...
3.484979
233
""" Quantiphyse - Analysis widgets Copyright (c) 2013-2020 University of Oxford Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by a...
[ 37811, 198, 24915, 541, 12114, 325, 532, 14691, 40803, 198, 198, 15269, 357, 66, 8, 2211, 12, 42334, 2059, 286, 13643, 198, 198, 26656, 15385, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 5832, 74...
3.72752
367
import click from rlpy.domains import ChainMDP from rlpy.tools.cli import run_experiment import methods if __name__ == "__main__": run_experiment( select_domain, select_agent, default_max_steps=10000, default_num_policy_checks=10, default_checks_per_policy=50, ot...
[ 11748, 3904, 198, 6738, 374, 75, 9078, 13, 3438, 1299, 1330, 21853, 44, 6322, 198, 6738, 374, 75, 9078, 13, 31391, 13, 44506, 1330, 1057, 62, 23100, 3681, 198, 198, 11748, 5050, 628, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, ...
2.353293
167
"""empty message Revision ID: 6e2656ef034b Revises: f8f949ce4522 Create Date: 2019-11-26 11:05:54.376467 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '6e2656ef034b' down_revision = 'f8f949ce4522' branch_labels = None depends_on = None
[ 37811, 28920, 3275, 198, 198, 18009, 1166, 4522, 25, 718, 68, 2075, 3980, 891, 49841, 65, 198, 18009, 2696, 25, 277, 23, 69, 48581, 344, 2231, 1828, 198, 16447, 7536, 25, 13130, 12, 1157, 12, 2075, 1367, 25, 2713, 25, 4051, 13, 2718...
2.512605
119
from contextvars import ContextVar from hcl_mlir.dialects import hcl as hcl_d from hcl_mlir.ir import * ImperativeLoopNestCount = ContextVar("ImperativeLoopNestCount", default=1) ImperativeLoopDepth = ContextVar("ImperativeLoopDepth", default=0) StageName = ContextVar("StageName", default="") NestedCompute = ContextV...
[ 6738, 4732, 85, 945, 1330, 30532, 19852, 198, 198, 6738, 289, 565, 62, 4029, 343, 13, 38969, 478, 82, 1330, 289, 565, 355, 289, 565, 62, 67, 198, 6738, 289, 565, 62, 4029, 343, 13, 343, 1330, 1635, 198, 198, 3546, 525, 876, 39516,...
3.086957
161
from typing import List import heapq # # #
[ 6738, 19720, 1330, 7343, 198, 11748, 24575, 80, 198, 2, 220, 198, 198, 2, 220, 198, 198, 2, 220, 198 ]
2.4
20
# Generated by Django 3.1.2 on 2020-12-27 10:36 from django.db import migrations, models import django.db.models.deletion import phonenumber_field.modelfields
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 17, 319, 12131, 12, 1065, 12, 1983, 838, 25, 2623, 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.981481
54
import os import datetime from collections import defaultdict import numpy as np from scipy import sparse from episim.ontology import Ontology from episim.plot.modeling import System, Accumulator from .data import State def _compute_reproduction_number(self, n_susceptible, n_total): return 0 ...
[ 11748, 28686, 198, 11748, 4818, 8079, 198, 198, 6738, 17268, 1330, 4277, 11600, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 1330, 29877, 198, 198, 6738, 48177, 320, 13, 756, 1435, 1330, 9463, 1435, 198, 6738, 48177...
2.981595
326
import numpy as np from sensor_msgs.msg import CameraInfo, RegionOfInterest from std_msgs.msg import Header CameraIntrinsics()
[ 11748, 299, 32152, 355, 45941, 198, 6738, 12694, 62, 907, 14542, 13, 19662, 1330, 20432, 12360, 11, 17718, 5189, 19302, 198, 6738, 14367, 62, 907, 14542, 13, 19662, 1330, 48900, 628, 198, 198, 35632, 5317, 81, 1040, 873, 3419, 198 ]
3.25
40
import logging from logging.handlers import SysLogHandler # Logging environment that can be used by the application to output syslog logging_object = logging.getLogger(__name__) logging_object.setLevel(logging.INFO) syslog_handler = logging.handlers.SysLogHandler(address='/dev/log') logging_object.addHandler(syslog_ha...
[ 11748, 18931, 198, 6738, 18931, 13, 4993, 8116, 1330, 311, 893, 11187, 25060, 198, 198, 2, 5972, 2667, 2858, 326, 460, 307, 973, 416, 262, 3586, 284, 5072, 25064, 6404, 198, 6404, 2667, 62, 15252, 796, 18931, 13, 1136, 11187, 1362, 7,...
3.371134
97
import logging from datetime import datetime import sqlalchemy as sa import sqlalchemy.orm as so from .base import Base, Session __all__ = ["User", "Message"] logger = logging.getLogger(__name__)
[ 11748, 18931, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 11748, 44161, 282, 26599, 355, 473, 198, 11748, 44161, 282, 26599, 13, 579, 355, 523, 198, 198, 6738, 764, 8692, 1330, 7308, 11, 23575, 198, 198, 834, 439, 834, 796, 146...
3.15625
64
import six from unittest import TestCase from uberlogs.private import UberStringFormatter
[ 11748, 2237, 198, 6738, 555, 715, 395, 1330, 6208, 20448, 198, 198, 6738, 48110, 6404, 82, 13, 19734, 1330, 12024, 10100, 8479, 1436, 628 ]
3.833333
24
from django.conf import settings from django.db import models from redis_pubsub.models import PublishableModel
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 198, 6738, 2266, 271, 62, 12984, 7266, 13, 27530, 1330, 8525, 1836, 540, 17633, 628 ]
3.645161
31
from functools import wraps from typing import Iterable import numpy as np import scipy.stats as scist import matplotlib.pyplot as plt from rpy2.robjects.packages import importr from rpy2.robjects.vectors import FloatVector from phat.utils import argsetter base = importr('base') utils = importr('utils') utils.choos...
[ 6738, 1257, 310, 10141, 1330, 27521, 198, 6738, 19720, 1330, 40806, 540, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 629, 541, 88, 13, 34242, 355, 629, 396, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 1...
2.925373
134
from flask_wtf import FlaskForm from wtforms import HiddenField, IntegerField, SelectField, StringField, SubmitField, ValidationError from wtforms.validators import Length, Required from .. models import EventFrameTemplate
[ 6738, 42903, 62, 86, 27110, 1330, 46947, 8479, 198, 6738, 266, 83, 23914, 1330, 20458, 15878, 11, 34142, 15878, 11, 9683, 15878, 11, 10903, 15878, 11, 39900, 15878, 11, 3254, 24765, 12331, 198, 6738, 266, 83, 23914, 13, 12102, 2024, 133...
4.207547
53
import os from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes from cryptography.hazmat.primitives import hashes from cryptography.hazmat.primitives.kdf.pbkdf2 import PBKDF2HMAC from cryptography.hazmat.backends import default_backend from stegano import lsb from flask import Flask, render_te...
[ 11748, 28686, 198, 198, 6738, 45898, 13, 71, 1031, 6759, 13, 19795, 20288, 13, 66, 541, 7084, 1330, 44334, 11, 16113, 11, 12881, 198, 6738, 45898, 13, 71, 1031, 6759, 13, 19795, 20288, 1330, 46621, 198, 6738, 45898, 13, 71, 1031, 6759...
2.9
210
jogador = dict() lista_de_jogadores = [] lista = [] print("_"*38) contador = 0 while True: jogador["nome"] = str(input("Informe o nome do jogador: ")).strip() jogador["partidas"] = int(input("Informe quantas partidas foram jogadas: ")) jogador["gols marcados"] = [] for c in range(0, jogador["partidas"])...
[ 73, 519, 7079, 796, 8633, 3419, 198, 4868, 64, 62, 2934, 62, 73, 519, 324, 2850, 796, 17635, 198, 4868, 64, 796, 17635, 198, 4798, 7203, 62, 1, 9, 2548, 8, 198, 3642, 7079, 796, 657, 198, 4514, 6407, 25, 198, 220, 220, 220, 4834...
2.234463
708
from django.apps import AppConfig import logging logger = logging.getLogger(__name__)
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 198, 11748, 18931, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 628 ]
3.259259
27
import threading from io import BytesIO from django.db import models import fast import time import numpy as np from PIL import Image from django.conf import settings from slide.timing import Timer from tag.models import Tag class AnnotatedSlide(models.Model): """ Model for an annotated slide. A slide ca...
[ 11748, 4704, 278, 198, 6738, 33245, 1330, 2750, 4879, 9399, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 11748, 3049, 198, 11748, 640, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 350, 4146, 1330, 7412, 198, 6738, 42625, 14208, ...
2.573013
541
from __future__ import annotations import typing from di.api.providers import CallableProvider, CoroutineProvider from di.dependant import Dependant from xpresso.dependencies._dependencies import Depends, DependsMarker Endpoint = typing.Union[CallableProvider[typing.Any], CoroutineProvider[typing.Any]]
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 11748, 19720, 198, 198, 6738, 2566, 13, 15042, 13, 15234, 4157, 1330, 4889, 540, 29495, 11, 2744, 28399, 29495, 198, 6738, 2566, 13, 45841, 415, 1330, 2129, 23048, 198, 198, 6738, 2124, 18...
3.678571
84
#!/usr/bin/python
[ 2, 48443, 14629, 14, 8800, 14, 29412, 201, 198 ]
2.111111
9
mytuple = ("Max", 28, "Boston") print(mytuple) print(type(mytuple)) mytuple2 = ("Max") ## , is needed before the closing paranthese if only one string print(mytuple2) print(type(mytuple2)) mt3 = tuple(["Max", 28, "Boston"]) ## mt indicates mytuple + number print(mt3) print(type(m...
[ 198, 1820, 83, 29291, 796, 5855, 11518, 1600, 2579, 11, 366, 31710, 4943, 198, 4798, 7, 1820, 83, 29291, 8, 198, 4798, 7, 4906, 7, 1820, 83, 29291, 4008, 198, 198, 1820, 83, 29291, 17, 796, 5855, 11518, 4943, 22492, 837, 318, 2622, ...
2.172043
465
# coding=utf-8 # Copyright 2018 The Google AI Team Authors. # # 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 applicabl...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 2864, 383, 3012, 9552, 4816, 46665, 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, ...
2.701289
4,188
import enoki as ek import pytest import mitsuba
[ 11748, 551, 18228, 355, 304, 74, 198, 11748, 12972, 9288, 198, 11748, 285, 896, 22013, 628, 628, 628 ]
2.944444
18
import warnings import torch from torch.utils.data.dataloader import DataLoader from torch.optim import lr_scheduler import numpy as np from models import * from dataloader import Aff2CompDataset, SubsetSequentialSampler, SubsetRandomSampler, Prefetcher from tqdm import tqdm import os import time from sklearn.metrics i...
[ 11748, 14601, 198, 11748, 28034, 198, 6738, 28034, 13, 26791, 13, 7890, 13, 67, 10254, 1170, 263, 1330, 6060, 17401, 198, 6738, 28034, 13, 40085, 1330, 300, 81, 62, 1416, 704, 18173, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 4981, ...
2.068883
2,918
import os """def dir_setup(path): if not os.path.isdir(path): dir_setup(os.path.split(path)[0]) else: return os.mkdir(path)"""
[ 11748, 28686, 201, 198, 201, 198, 201, 198, 37811, 4299, 26672, 62, 40406, 7, 6978, 2599, 201, 198, 220, 220, 220, 611, 407, 28686, 13, 6978, 13, 9409, 343, 7, 6978, 2599, 201, 198, 220, 220, 220, 220, 220, 220, 220, 26672, 62, 40...
1.908046
87
# -*- coding: utf-8 -*- '''Autor: Alessandra Souza Data: 05/05/2017 Objetivo: Calcular o volume de uma esfera. ID Urionlinejudge: 1011''' R=float(input()) vol=((4.0/3)*3.14159)*R**3 print("VOLUME = %.3f" %vol)
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 7061, 6, 16541, 273, 25, 47319, 15918, 22862, 4496, 198, 6601, 25, 220, 8870, 14, 2713, 14, 5539, 198, 5944, 31173, 23593, 25, 2199, 10440, 267, 6115, 390, 334, 2611, ...
2.09901
101
import numpy as np import tensorflow as tf import tensorlayer as tl import datetime from log import LOG_PATH import os import src.visualization as vis from src.config import Config as con import tensorflow.contrib as tfcontrib server_count = con.server_count server_state_dim = con.server_state_dim total_server_state_d...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 11192, 273, 29289, 355, 256, 75, 198, 11748, 4818, 8079, 198, 6738, 2604, 1330, 41605, 62, 34219, 198, 11748, 28686, 198, 11748, 12351, 13, 41464, 1634,...
2.336036
1,110
# 2 * n print(solution(4))
[ 2, 362, 1635, 299, 220, 628, 198, 4798, 7, 82, 2122, 7, 19, 4008 ]
2.071429
14
api_key = None
[ 15042, 62, 2539, 796, 6045, 628 ]
2.666667
6
from setuptools import setup, find_packages setup( name="Recourse", version="0.1.1", packages=find_packages(), install_requires=open('requirements.txt').read().split('\n') )
[ 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 2625, 6690, 9047, 1600, 198, 220, 220, 220, 2196, 2625, 15, 13, 16, 13, 16, 1600, 198, 220, 220, 220, 10392, 28, 19796, 62, 43...
2.753623
69
import pandas as pd ##################### # Load Dataset # https://archive.ics.uci.edu/ml/machine-learning-databases/breast-cancer-wisconsin/wdbc.data df = pd.read_csv('../data/wdbc.data', header=None) from sklearn.preprocessing import LabelEncoder X = df.loc[:, 2:].values y = df.loc[:,1].values le = LabelEncoder() ...
[ 11748, 19798, 292, 355, 279, 67, 198, 198, 14468, 4242, 2, 198, 2, 8778, 16092, 292, 316, 198, 198, 2, 3740, 1378, 17474, 13, 873, 13, 42008, 13, 15532, 14, 4029, 14, 30243, 12, 40684, 12, 19608, 18826, 14, 4679, 459, 12, 48870, 1...
2.540284
211
import argparse import os from PIL import Image if __name__ == '__main__': args = get_args() os.makedirs(args.output_dir, exist_ok=True) for file in os.listdir(args.input_dir): if file.endswith('.tga'): im = Image.open(os.path.join(args.input_dir, file)) rgb_im = im.conver...
[ 11748, 1822, 29572, 198, 11748, 28686, 198, 6738, 350, 4146, 1330, 7412, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 26498, 796, 651, 62, 22046, 3419, 198, 220, 220, 220, 28686, 13, 76,...
2.115183
191
# Copyright 2016-2020 Blue Marble Analytics LLC. # # 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 ag...
[ 2, 15069, 1584, 12, 42334, 4518, 36891, 30437, 11419, 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,...
3.802239
804
import logging import random from typing import Dict, List, Tuple, Union from construction_finder import codelets, frame logger = logging.getLogger(f"{__name__}")
[ 11748, 18931, 198, 11748, 4738, 198, 6738, 19720, 1330, 360, 713, 11, 7343, 11, 309, 29291, 11, 4479, 198, 198, 6738, 5103, 62, 22805, 1330, 2438, 5289, 11, 5739, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 69, 1, 90...
3.34
50
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Default configurations of model configuration, training. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import os.path as osp from typing import Dict CONFIG = { 'is_train': True, ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 201, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 201, 198, 37811, 19463, 25412, 286, 2746, 8398, 11, 3047, 13, 201, 198, 37811, 201, 198, 201, 198, 6738...
1.935593
885
#!/usr/bin/env python3 ############################################################################# ## ## Copyright (C) 2018 The Qt Company Ltd. ## Contact: https://www.qt.io/licensing/ ## ## This file is part of the plugins of the Qt Toolkit. ## ## $QT_BEGIN_LICENSE:GPL-EXCEPT$ ## Commercial License Usage ## Licensee...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 29113, 29113, 7804, 4242, 2, 198, 2235, 198, 2235, 15069, 357, 34, 8, 2864, 383, 33734, 5834, 12052, 13, 198, 2235, 14039, 25, 3740, 1378, 2503, 13, 39568, 13, 952, 14, 677, 2642...
2.84845
871
from bs4 import BeautifulSoup from urllib.request import urlopen import re # open and read web page, decode it if it contains Chinese html = urlopen('https://mofanpy.com/static/scraping/table.html').read().decode('utf-8') print(html) # 'lxml' is parser name soup = BeautifulSoup(html, features='lxml') # search by tag...
[ 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 6738, 2956, 297, 571, 13, 25927, 1330, 19016, 9654, 198, 11748, 302, 198, 198, 2, 1280, 290, 1100, 3992, 2443, 11, 36899, 340, 611, 340, 4909, 3999, 198, 6494, 796, 19016, 9654, 10786, ...
2.853659
287
import os import matplotlib # get_ipython().run_line_magic("matplotlib", "widget") # i.e. %matplotlib widget import matplotlib.pyplot as plt from ophyd import Device, Component, EpicsSignal from ophyd.signal import EpicsSignalBase from ophyd.areadetector.filestore_mixins import resource_factory import uuid import os...
[ 11748, 28686, 198, 11748, 2603, 29487, 8019, 198, 198, 2, 651, 62, 541, 7535, 22446, 5143, 62, 1370, 62, 32707, 7203, 6759, 29487, 8019, 1600, 366, 42655, 4943, 220, 1303, 1312, 13, 68, 13, 4064, 6759, 29487, 8019, 26295, 198, 11748, ...
3.089679
591
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: snakeskin/protos/peer/peer.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 262, 8435, 11876, 17050, 13, 220, 8410, 5626, 48483, 0, 198, 2, 2723, 25, 26042, 5116, 14, 11235, 418, 14, 33350, 14, 33350, 13, 1676, 1462, 198, ...
2.425604
2,070
#!/usr/bin/python3 ''' test for the place model here. ''' import unittest from models.base_model import BaseModel from models.place import Place
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 7061, 6, 198, 220, 220, 220, 1332, 329, 262, 1295, 2746, 994, 13, 198, 7061, 6, 198, 198, 11748, 555, 715, 395, 198, 6738, 4981, 13, 8692, 62, 19849, 1330, 7308, 17633, 198, 6738...
3.04
50
from flask import Flask from flask_bootstrap import Bootstrap from flask_mail import Mail from flask_moment import Moment from flask_sqlalchemy import SQLAlchemy from sqlalchemy import MetaData from flask_login import LoginManager from flask_msearch import Search from config import config from jieba.analyse import Chin...
[ 6738, 42903, 1330, 46947, 198, 6738, 42903, 62, 18769, 26418, 1330, 18892, 26418, 198, 6738, 42903, 62, 4529, 1330, 11099, 198, 6738, 42903, 62, 32542, 298, 1330, 29278, 198, 6738, 42903, 62, 25410, 282, 26599, 1330, 16363, 2348, 26599, 1...
2.761194
335
import asyncio import json from ..utils import DEFAULT_SETTINGS from ..utils.DEFAULT_ENCRYPTION import SERVER_encryption, CLIENT_encryption
[ 11748, 30351, 952, 201, 198, 11748, 33918, 201, 198, 6738, 11485, 26791, 1330, 5550, 38865, 62, 28480, 51, 20754, 201, 198, 6738, 11485, 26791, 13, 7206, 38865, 62, 1677, 9419, 56, 11571, 2849, 1330, 18871, 5959, 62, 12685, 13168, 11, 4...
2.633333
60
#! /usr/bin/env python3 #-- harvest scheduler that runs on the compute pool nodes import argparse import time import sys import logging import os import psutil from applicationinsights import TelemetryClient from applicationinsights.logging import LoggingHandler from getargs import getargs import azlog azlog.color=...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 438, 13222, 6038, 18173, 326, 4539, 319, 262, 24061, 5933, 13760, 198, 198, 11748, 1822, 29572, 198, 11748, 640, 198, 11748, 25064, 198, 11748, 18931, 198, 11748, 28686, ...
2.501575
1,587
#!/usr/bin/env python3 #loading tf is slow, so don't do it unless we're using it USE_TENSORFLOW = False import collections import numpy as np import os import pickle if USE_TENSORFLOW: import tensorflow as tf from tensorflow import keras os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' import modelInput #use...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 25138, 48700, 318, 3105, 11, 523, 836, 470, 466, 340, 4556, 356, 821, 1262, 340, 198, 19108, 62, 51, 16938, 1581, 3697, 3913, 796, 10352, 198, 198, 11748, 17268, 198, 117...
3.045455
154
import logging import subprocess import time
[ 11748, 18931, 198, 11748, 850, 14681, 198, 11748, 640, 628 ]
4.6
10
# -*- coding: utf-8 -*- ZESTY_TRACKING_CLASSES = [ 'zesty_metrics.tracking.UserAccounts', ] ZESTY_TIMING_SAMPLE_RATE = 1 ZESTY_TIME_RESPONSES = True ZESTY_TRACK_USER_ACTIVITY = True
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 57, 6465, 56, 62, 5446, 8120, 2751, 62, 31631, 1546, 796, 685, 198, 220, 220, 220, 705, 89, 9673, 62, 4164, 10466, 13, 36280, 13, 12982, 30116, 82, 3256, 198, 60, 19...
2.032258
93