content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import os import socket unix_sock_name = 'unix.sock' sock = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM) if os.path.exists(unix_sock_name): os.remove(unix_sock_name) sock.bind(unix_sock_name) while True: try: result = sock.recv(1024) except KeyboardInterrupt: sock.clos...
[ 11748, 28686, 201, 198, 11748, 17802, 201, 198, 201, 198, 403, 844, 62, 82, 735, 62, 3672, 796, 705, 403, 844, 13, 82, 735, 6, 201, 198, 82, 735, 796, 17802, 13, 44971, 7, 44971, 13, 8579, 62, 4944, 10426, 11, 17802, 13, 50, 112...
2.015152
198
import threading import mock from tests.unit.lib.iml_unit_test_case import IMLUnitTestCase from chroma_core.models.power_control import PowerControlType, PowerControlDevice, PowerControlDeviceOutlet from chroma_core.services.power_control.manager import PowerControlManager from chroma_core.services.power_control.moni...
[ 11748, 4704, 278, 198, 198, 11748, 15290, 198, 198, 6738, 5254, 13, 20850, 13, 8019, 13, 320, 75, 62, 20850, 62, 9288, 62, 7442, 1330, 314, 5805, 26453, 14402, 20448, 198, 6738, 15358, 64, 62, 7295, 13, 27530, 13, 6477, 62, 13716, 1...
3.346154
156
# -- coding: utf-8 -- # @Time : 2019/7/23 # @Author : lha # @File : main.py import os import sys import torch import torch.nn as nn import argparse from crf import CRF from file_utils import TaskModelBase
[ 2, 1377, 19617, 25, 3384, 69, 12, 23, 1377, 201, 198, 2, 2488, 7575, 1058, 13130, 14, 22, 14, 1954, 201, 198, 2, 2488, 13838, 1058, 300, 3099, 201, 198, 2, 2488, 8979, 1058, 1388, 13, 9078, 220, 201, 198, 201, 198, 11748, 28686, ...
2.511364
88
"""python compile_with_cython.py build_ext --inplace""" # import setuptools # important import os from distutils.core import setup from distutils.extension import Extension from Cython.Distutils import build_ext from Cython.Build import cythonize import shutil import multiprocessing sep = os.path.sep DISTRIBUTE_DIR_...
[ 37811, 29412, 17632, 62, 4480, 62, 948, 400, 261, 13, 9078, 1382, 62, 2302, 1377, 259, 5372, 37811, 198, 2, 1330, 900, 37623, 10141, 220, 1303, 1593, 198, 11748, 28686, 198, 6738, 1233, 26791, 13, 7295, 1330, 9058, 198, 6738, 1233, 26...
2.802139
187
#pip install pip install opencv-python import cv2 from random import randrange #load some pretrained data on face frontals from open cv (haar cascade algotithm (git hub opencv the data )) trained_face_data = cv2.CascadeClassifier("haarcascade_frontalface_default.xml") #choose an image to detect faces #img = ...
[ 2, 79, 541, 2721, 7347, 2721, 1280, 33967, 12, 29412, 220, 201, 198, 11748, 269, 85, 17, 201, 198, 6738, 4738, 1330, 43720, 9521, 201, 198, 201, 198, 2, 2220, 617, 2181, 13363, 1366, 319, 1986, 2166, 874, 422, 1280, 269, 85, 357, ...
2.532389
494
############################################################################## # # Copyright (c) 2002 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, 6244, 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, ...
2.382183
3,985
""" .. codeauthor:: David Zwicker <david.zwicker@ds.mpg.de> """ import numpy as np from pde import CartesianGrid, CylindricalGrid, ScalarField, VectorField from pde.grids.operators import cylindrical as ops def test_laplace_cyl(): """ test the implementation of the laplace operator """ for boundary_z in ["p...
[ 37811, 198, 492, 2438, 9800, 3712, 3271, 1168, 86, 15799, 1279, 67, 8490, 13, 89, 86, 15799, 31, 9310, 13, 3149, 70, 13, 2934, 29, 198, 37811, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 279, 2934, 1330, 13690, 35610, 4...
2.166606
2,755
from engine.core.SquadEntity import SquadEntity from engine.core.SourceEntity import SourceEntity from typing import Collection, List from numpy.lib.utils import source import pandas as pd
[ 6738, 3113, 13, 7295, 13, 22266, 324, 32398, 1330, 11630, 32398, 198, 6738, 3113, 13, 7295, 13, 7416, 32398, 1330, 8090, 32398, 198, 6738, 19720, 1330, 12251, 11, 7343, 198, 6738, 299, 32152, 13, 8019, 13, 26791, 1330, 2723, 198, 11748,...
3.607143
56
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import requests ''' 用于替代scrapy原生下载器(过于简陋),在尽量不渲染css/js,不访问附带文件的情况下,高度模拟真实访问,反反爬。 ''' def my_requests_request(method, url, **kwargs): """ :param method: method for the new :class:`Request` object. :param url: URL for the new :class:`Request` object. :para...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 7007, 198, 198, 7061, 6, 198, 18796, 101, 12859, 236, 162, 249, 123, 47987, 1416, 2416, 88, 43889, 253, 37...
2.827296
1,546
default_app_config = 'access.apps.AccessAppConfig'
[ 12286, 62, 1324, 62, 11250, 796, 705, 15526, 13, 18211, 13, 15457, 4677, 16934, 6 ]
3.333333
15
import sys import constants, constants_sematt import dictionary from data_loaders import data_loader from data_loaders.data_loader import DataLoader, Data, RestorableData DELIM = ',' COLON = ':' COLON_ALT = '^'
[ 11748, 25064, 198, 198, 11748, 38491, 11, 38491, 62, 43616, 1078, 198, 11748, 22155, 198, 6738, 1366, 62, 2220, 364, 1330, 1366, 62, 29356, 198, 6738, 1366, 62, 2220, 364, 13, 7890, 62, 29356, 1330, 6060, 17401, 11, 6060, 11, 8324, 10...
3.126761
71
""" Pacote de funções Autor: Thiago Souza """ def ler_letra(txt): """ Função que valida letra digitada pelo usuário. :param txt: Caracter digitado pelo usuário :return: Letra validada corretamente. """ while True: letra = input(txt).strip() if not letra: pr...
[ 37811, 628, 220, 220, 220, 6319, 1258, 390, 1257, 16175, 127, 113, 274, 198, 220, 220, 220, 5231, 273, 25, 536, 29601, 22862, 4496, 198, 198, 37811, 198, 198, 4299, 300, 263, 62, 1616, 430, 7, 14116, 2599, 198, 220, 220, 220, 37227,...
2.050331
755
#!/usr/bin/env python3 #Advent of Code Day 13 "Transparent Oragami" import sys sys.path.append("..") import submarine sub = submarine.Submarine() #Part 1 thermal = sub.navigator.thermal_camera file = open('input.txt','r') #Activate camera by feeding input from manual thermal.activate(file.readlines()) #Fold once the...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 2782, 1151, 286, 6127, 3596, 1511, 366, 8291, 8000, 1471, 363, 6277, 1, 198, 11748, 25064, 198, 17597, 13, 6978, 13, 33295, 7203, 492, 4943, 198, 198, 11748, 24927, 198, 7266, ...
2.920455
176
from .base import SchemaBase class Protocol(SchemaBase): """ class to deal with reproschema protocols """ schema_type = "reproschema:Protocol" # TODO # def add_landing_page(self, landing_page_url, lang="en"): # preamble # compute
[ 6738, 764, 8692, 1330, 10011, 2611, 14881, 628, 198, 4871, 20497, 7, 27054, 2611, 14881, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1398, 284, 1730, 351, 43969, 15952, 2611, 19565, 198, 220, 220, 220, 37227, 628, 220, 220, 2...
2.582524
103
import os
[ 11748, 28686 ]
4.5
2
import torch import transformers DOWNLOAD_URL = "https://github.com/unitaryai/detoxify/releases/download/" MODEL_URLS = { "original": DOWNLOAD_URL + "v0.1-alpha/toxic_original-c1212f89.ckpt", "unbiased": DOWNLOAD_URL + "v0.3-alpha/toxic_debiased-c7548aa0.ckpt", "multilingual": DOWNLOAD_URL + "v0.4-alpha/mu...
[ 11748, 28034, 198, 11748, 6121, 364, 198, 198, 41925, 35613, 62, 21886, 796, 366, 5450, 1378, 12567, 13, 785, 14, 403, 9331, 1872, 14, 15255, 1140, 1958, 14, 260, 29329, 14, 15002, 30487, 198, 33365, 3698, 62, 4261, 6561, 796, 1391, 1...
2.574924
654
ONESIGNAL_APP_ID = False ONESIGNAL_API_KEY = False ONESIGNAL_BASE_URL = 'https://onesignal.com/api/' ONESIGNAL_VERSION = 'v1' TIMEZONE = 'UTC'
[ 39677, 16284, 1847, 62, 24805, 62, 2389, 796, 10352, 198, 39677, 16284, 1847, 62, 17614, 62, 20373, 796, 10352, 198, 39677, 16284, 1847, 62, 33, 11159, 62, 21886, 796, 705, 5450, 1378, 1952, 570, 282, 13, 785, 14, 15042, 14, 6, 198, ...
2.344262
61
import json import logging from functions import setCronJob logging.basicConfig(filename='log.txt', encoding='utf-8', level=logging.ERROR) try: # variable init configFile = open('config.json') sensors = [] writeInterval = None # loads config configData = json.load(configFile) # if write i...
[ 11748, 33918, 198, 11748, 18931, 198, 6738, 5499, 1330, 900, 34, 1313, 33308, 198, 198, 6404, 2667, 13, 35487, 16934, 7, 34345, 11639, 6404, 13, 14116, 3256, 21004, 11639, 40477, 12, 23, 3256, 1241, 28, 6404, 2667, 13, 24908, 8, 198, ...
2.979675
246
#!/usr/bin/env python3 # coding: utf-8 import pytest # type: ignore from state import Board, Piece, GameState, GameMove from engine import GameEngine, Dice
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 11748, 12972, 9288, 220, 1303, 2099, 25, 8856, 198, 6738, 1181, 1330, 5926, 11, 27053, 11, 3776, 9012, 11, 3776, 21774, 198, 6738, 3113,...
3.111111
54
''' Created on 23 déc. 2015 Take an application and add a worksheet to an excell for unanalyzed files @todo : add also existing analyzer for some languages (name and url) @todo : what to do with project files ? pom, .eclipse, .csproj etc... @author: MRO ''' import os, re, logging import math from sortedcontainers ...
[ 7061, 6, 198, 41972, 319, 2242, 39073, 66, 13, 1853, 198, 198, 12322, 281, 3586, 290, 751, 257, 2499, 25473, 284, 281, 409, 3846, 329, 555, 38200, 8863, 3696, 198, 198, 31, 83, 24313, 1058, 751, 635, 4683, 4284, 9107, 329, 617, 8950...
1.510312
17,164
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Oct 25 05:23:53 2018 @author: manoj """ heart = {"www.github.com" : {"nothing here":"never here"} }
[ 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, 26223, 2556, 1679, 8870, 25, 1954, 25, 4310, 2864, 198, 198, 31, 9800, 25, 582, 13210, 19...
2.346667
75
BEZIRKE = { "AT": "oesterreich", "W": "wien", "B": "burgenland", "SBG": "salzburg", "T": "tirol", "V": "vorarlberg", "KTN": "kaernten", "OÖ": "oberoesterreich", "NÖ": "niederoesterreich", "STMK": "steiermark", "AM": "amstetten", "BN": "baden", "BZ": "bludenz", "B...
[ 12473, 57, 4663, 7336, 796, 1391, 198, 220, 220, 220, 366, 1404, 1298, 366, 3028, 353, 260, 488, 1600, 198, 220, 220, 220, 366, 54, 1298, 366, 86, 2013, 1600, 198, 220, 220, 220, 366, 33, 1298, 366, 7423, 268, 1044, 1600, 198, 220...
1.7625
1,440
from __future__ import absolute_import from __future__ import print_function from __future__ import division from .basic import * from .relu import relu, relu6 from .leaky_relu import leaky_relu, get_leaky_relu_op from .matmul import matmul from .conv2d import conv2d from .log_weight_conv2d import log_weight_conv2d fr...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 198, 6738, 764, 35487, 1330, 1635, 198, 6738, 764, 260, 2290, 1330, 823, 84, 11, 823, 8...
3.045872
218
def rotate_char(char: str, rotation_factor: int): """ special characters won't rotate """ if len(char) != 1: raise ValueError(f"Invalid char: \"{char}\"") start, end = "", "" if "0" <= char and char <= "9": start, end = "0", "9" elif "a" <= char and char <= "z": start, end =...
[ 198, 4299, 23064, 62, 10641, 7, 10641, 25, 965, 11, 13179, 62, 31412, 25, 493, 2599, 198, 220, 220, 220, 37227, 2041, 3435, 1839, 470, 23064, 37227, 198, 220, 220, 220, 611, 18896, 7, 10641, 8, 14512, 352, 25, 198, 220, 220, 220, ...
2.259574
235
# coding:utf-8 import re from bs4 import BeautifulSoup from config import DOWNLOAD_URL from entity.fileinfor import FileInfor from spider.downloader import Downloader class Parser(object): ''' html解析器:从中提取出视频信息 ''' def parser(self, html_cont, ID): ''' :param html_cont: html内容 ...
[ 2, 19617, 25, 40477, 12, 23, 198, 11748, 302, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 6738, 4566, 1330, 30320, 35613, 62, 21886, 198, 6738, 9312, 13, 7753, 259, 1640, 1330, 9220, 818, 1640, 198, 6738, 19230, 13, 15002, ...
1.688008
984
import re from setuptools import setup, find_packages INIT_FILE = 'dimensigon/__init__.py' with open("README.md", "r") as fh: long_description = fh.read() author, email = find_author_email() setup( name='dimensigon', version=find_version(), package_dir={"": "."}, packages=find_packages(wher...
[ 11748, 302, 198, 198, 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 198, 1268, 2043, 62, 25664, 796, 705, 67, 12117, 37107, 14, 834, 15003, 834, 13, 9078, 6, 198, 198, 4480, 1280, 7203, 15675, 11682, 13, 9132, 1600, ...
2.586667
450
# System imports import abc import RPi.GPIO as GPIO # Local imports from mtda.usb.switch import UsbSwitch
[ 2, 4482, 17944, 198, 11748, 450, 66, 198, 11748, 25812, 72, 13, 16960, 9399, 355, 50143, 198, 198, 2, 10714, 17944, 198, 6738, 45079, 6814, 13, 43319, 13, 31943, 1330, 4021, 65, 38978, 198 ]
3.147059
34
import json import pickle import numpy as np import torch from azureml.core.model import Model from src.models.model import SRCNN
[ 11748, 33918, 198, 11748, 2298, 293, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 6738, 35560, 495, 4029, 13, 7295, 13, 19849, 1330, 9104, 198, 198, 6738, 12351, 13, 27530, 13, 19849, 1330, 311, 7397, 6144, 628, 198 ...
3.268293
41
class Animal(object): """Makes cute animals.""" is_alive = True health = "good" hippo = Animal("Sally", 22) hippo.description() sloth = Animal("Minnie", 47) ocelot = Animal("Mike", 32) print hippo.health print sloth.health print ocelot.health # member variables are variables that are available to all membe...
[ 4871, 13792, 7, 15252, 2599, 198, 220, 37227, 44, 1124, 13779, 4695, 526, 15931, 198, 220, 318, 62, 282, 425, 796, 6407, 198, 220, 1535, 796, 366, 11274, 1, 198, 220, 220, 220, 220, 198, 71, 3974, 78, 796, 13792, 7203, 50, 453, 16...
3
116
# Generated by Django 2.0.7 on 2020-05-11 05:02 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 362, 13, 15, 13, 22, 319, 12131, 12, 2713, 12, 1157, 8870, 25, 2999, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.766667
30
from typing import Sequence, Tuple, Dict, Optional import warnings from pe._errors import ParseError, GrammarWarning from pe._match import determine
[ 198, 6738, 19720, 1330, 45835, 11, 309, 29291, 11, 360, 713, 11, 32233, 198, 11748, 14601, 198, 198, 6738, 613, 13557, 48277, 1330, 2547, 325, 12331, 11, 20159, 3876, 20361, 198, 6738, 613, 13557, 15699, 1330, 5004, 628, 628, 628, 628, ...
3.767442
43
##parameters=process_uid # Copyright (c) 2004-2006 gocept gmbh & co. kg # See also LICENSE.txt # af_assign_process.py,v 1.5.6.2 2005/05/02 10:08:52 zagy Exp from Products.CMFCore.utils import getToolByName from Products.Archetypes.config import UID_CATALOG from Products.AlphaFlow.interfaces import ILifeCycleController ...
[ 2235, 17143, 7307, 28, 14681, 62, 27112, 198, 2, 15069, 357, 66, 8, 5472, 12, 13330, 467, 984, 308, 2022, 71, 1222, 763, 13, 14211, 198, 2, 4091, 635, 38559, 24290, 13, 14116, 198, 2, 6580, 62, 562, 570, 62, 14681, 13, 9078, 11, ...
2.631769
277
__all__ = ("get_logger",) import sys import typing from logging import ( getLogger, Formatter, StreamHandler, ) _LOG_LEVEL_STR = typing.Literal[ "CRITICAL", "FATAL", "ERROR", "WARN", "WARNING", "INFO", "DEBUG", "NOTSET", ] _F = "\033[33m{asctime} \t{name: <15} {levelname:...
[ 834, 439, 834, 796, 5855, 1136, 62, 6404, 1362, 1600, 8, 628, 198, 11748, 25064, 198, 11748, 19720, 198, 6738, 18931, 1330, 357, 198, 220, 220, 220, 651, 11187, 1362, 11, 198, 220, 220, 220, 5178, 1436, 11, 198, 220, 220, 220, 13860...
2.287645
518
# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo # Copyright (C) 2016-2020 German Aerospace Center (DLR) and others. # SUMOPy module # Copyright (C) 2012-2017 University of Bologna - DICAM # This program and the accompanying materials are made available under the # terms of the Eclipse Public ...
[ 2, 30991, 35683, 46, 11, 41798, 286, 14665, 337, 5944, 879, 26, 766, 3740, 1378, 68, 17043, 13, 2398, 14, 16345, 78, 198, 2, 15069, 357, 34, 8, 1584, 12, 42334, 2679, 43226, 3337, 357, 19260, 49, 8, 290, 1854, 13, 198, 2, 35683, ...
2.040207
5,994
""" Convert from filename_[tag1,tag2].ext format to notefile """ import sys import os import re import shutil #sys.path.append(os.path.abspath('..')) import notefile print(notefile.__version__) # 20200103 SOURCE = '/full/path/to/source' retags = re.compile('^(.*)[\_|-][\[|\(](.*?)[\]|\)]$') def get_tag(filename):...
[ 37811, 198, 3103, 1851, 422, 29472, 62, 58, 12985, 16, 11, 12985, 17, 4083, 2302, 5794, 284, 407, 891, 576, 198, 37811, 198, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 4423, 346, 198, 198, 2, 17597, 13, 6978, ...
1.922266
759
#!/usr/bin/python ''' Wrapper for the SRTM module (srtm.py) It will grab the altitude of a long,lat pair from the SRTM database Created by Stephen Dade (stephen_dade@hotmail.com) ''' import numpy, os, time, sys, srtm, GAreader class ElevationModel(): '''Elevation Model. Only SRTM for now''' def __init__(self...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 7061, 6, 198, 36918, 2848, 329, 262, 311, 14181, 44, 8265, 357, 82, 17034, 76, 13, 9078, 8, 198, 1026, 481, 5552, 262, 20334, 286, 257, 890, 11, 15460, 5166, 422, 262, 311, 14181, 44, 683...
2.252239
1,340
import pytest from selenium import webdriver from selenium.webdriver.chrome.options import Options BROWSERS_LIST = ("chrome", "firefox") BASE_URL = 'http://selenium1py.pythonanywhere.com/' @pytest.fixture(scope='session') @pytest.fixture(scope='class')
[ 11748, 12972, 9288, 198, 6738, 384, 11925, 1505, 1330, 3992, 26230, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 46659, 13, 25811, 1330, 18634, 198, 198, 11473, 22845, 4877, 62, 45849, 796, 5855, 46659, 1600, 366, 6495, 12792, 4943,...
2.910112
89
## importing the required libraries ## import tensorflow as tf from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Dense, Dropout, Activation, Flatten, Conv2D, MaxPooling2D import h5py import numpy as np import keras.utils as kut import cv2 import matplotlib.pyplot as plt ## get the dat...
[ 2235, 33332, 262, 2672, 12782, 22492, 198, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 11192, 273, 11125, 13, 6122, 292, 13, 27530, 1330, 24604, 1843, 198, 6738, 11192, 273, 11125, 13, 6122, 292, 13, 75, 6962, 1330, 360, 1072,...
2.658858
683
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 16529, 35937, 198, 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 17168, 13789, 13, 4091, 13789, 13, 14116, 287, 262, 1628, 6808, 329, 198, 2, 5964, 1321...
2.872014
586
STOPWORDS = ['I', 'A', 'ABOVE', 'AFTER', 'AGAINST', 'ALL', 'ALONE', 'ALWAYS', 'AM', 'AMOUNT', 'AN', 'AND', 'ANY', 'ARE', 'AROUND', ...
[ 2257, 3185, 45359, 5258, 796, 37250, 40, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 32, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 6242, 46, 6089, 3256, 198, 220, ...
1.249103
2,786
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
[ 2, 357, 66, 8, 2321, 12, 4967, 11, 3899, 1024, 23303, 272, 1279, 76, 40302, 13, 2934, 3099, 272, 31, 14816, 13, 785, 29, 198, 2, 198, 2, 770, 2393, 318, 636, 286, 28038, 856, 198, 2, 198, 2, 28038, 856, 318, 1479, 3788, 25, 34...
2.398416
5,429
''' Module to define the Cover object used in budgeted max cover solver ''' class Cover: ''' Boiled down representation of a stamp page consists of only the cover of elements along with the cost and id. All elements are considered to have equal weight. Attributes: * cover : a list of size...
[ 7061, 6, 19937, 284, 8160, 262, 17546, 2134, 973, 198, 259, 4466, 276, 3509, 3002, 1540, 332, 198, 7061, 6, 628, 198, 4871, 17546, 25, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 3248, 3902, 866, 10552, 286, 257, 17977, 2443,...
2.696379
359
import contextlib import logging import uuid import six from google.cloud import storage, exceptions name = 'substream.tempbucket' class TemporaryBucket(contextlib.AbstractContextManager): """Functions much like tempfile.TemporaryDirectory() context manager, only it returns a google.storage.Bucket instead o...
[ 11748, 4732, 8019, 198, 11748, 18931, 198, 11748, 334, 27112, 198, 198, 11748, 2237, 198, 6738, 23645, 13, 17721, 1330, 6143, 11, 13269, 198, 198, 3672, 796, 705, 7266, 5532, 13, 29510, 27041, 316, 6, 628, 198, 4871, 46042, 33, 38811, ...
3.533333
120
import numpy as np import math,librosa import sys y, sr = librosa.load(sys.argv[1], sr=16000) frame_size = 256 frmae_shift = 128 mfccs = librosa.feature.mfcc(y, sr, n_mfcc=12, hop_length=frmae_shift, n_fft=frame_size) print(mfccs)
[ 171, 119, 123, 11748, 299, 32152, 355, 45941, 198, 11748, 10688, 11, 8019, 4951, 64, 198, 11748, 25064, 628, 198, 88, 11, 19677, 796, 9195, 4951, 64, 13, 2220, 7, 17597, 13, 853, 85, 58, 16, 4357, 19677, 28, 1433, 830, 8, 198, 145...
2.089286
112
from flask_wtf import FlaskForm, RecaptchaField from flask_wtf.file import FileField, FileAllowed from wtforms import StringField, PasswordField, SubmitField, BooleanField, RadioField, IntegerField, SelectField from wtforms.fields.html5 import DateField from wtforms.validators import DataRequired, Length, Email, EqualT...
[ 6738, 42903, 62, 86, 27110, 1330, 46947, 8479, 11, 3311, 2373, 11693, 15878, 198, 6738, 42903, 62, 86, 27110, 13, 7753, 1330, 9220, 15878, 11, 9220, 3237, 6972, 198, 6738, 266, 83, 23914, 1330, 10903, 15878, 11, 30275, 15878, 11, 39900,...
3.75
116
from discord.ext import commands import discord import pymongo import json import asyncio with open('cogs/dbCred.json') as json_file: db_cred = json.load(json_file) myClient = pymongo.MongoClient(db_cred['client']) myDB = myClient[db_cred['db_name']] col_botinfo = myDB['botinfo'] col_serverinfo = myDB['serverinfo...
[ 6738, 36446, 13, 2302, 1330, 9729, 198, 11748, 36446, 198, 11748, 279, 4948, 25162, 198, 11748, 33918, 198, 11748, 30351, 952, 198, 198, 4480, 1280, 10786, 66, 18463, 14, 9945, 34, 445, 13, 17752, 11537, 355, 33918, 62, 7753, 25, 198, ...
2.625899
139
# ------------------------------------- # RabbitMQClient Errors # ------------------------------------- # ------------------------------------- # PikaClientWrapper Errors # -------------------------------------
[ 2, 20368, 30934, 198, 2, 25498, 49215, 11792, 44225, 198, 2, 20368, 30934, 628, 198, 2, 20368, 30934, 198, 2, 350, 9232, 11792, 36918, 2848, 44225, 198, 2, 20368, 30934, 628, 198 ]
6.71875
32
from PyQt5 import QtCore, QtGui import numpy as np from typing import List
[ 6738, 9485, 48, 83, 20, 1330, 33734, 14055, 11, 33734, 8205, 72, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 19720, 1330, 7343, 198 ]
3.125
24
# -*- coding: utf-8 -*- import CoolProp
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 15226, 24331 ]
2.222222
18
# cSpell:words stdev import multiprocessing.pool import os from statistics import mean, stdev from typing import Any, NamedTuple from cec2017.functions import f4 from evolution import Evolution ROUNDS_OF_ALGO = 50 INITIAL_POINT_BOUND = 100 SEPARATOR = os.getenv("SEP", "\t") if __name__ == "__main__": main()...
[ 2, 269, 31221, 25, 10879, 336, 7959, 198, 198, 11748, 18540, 305, 919, 278, 13, 7742, 198, 11748, 28686, 198, 6738, 7869, 1330, 1612, 11, 336, 7959, 198, 6738, 19720, 1330, 4377, 11, 34441, 51, 29291, 198, 198, 6738, 269, 721, 5539, ...
2.815789
114
from styx_msgs.msg import TrafficLight
[ 6738, 8944, 87, 62, 907, 14542, 13, 19662, 1330, 23624, 15047, 198 ]
3.25
12
# -*- coding: utf-8 -*- # Copyright (c) 2017 Ericsson AB # # 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 ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 15069, 357, 66, 8, 2177, 7651, 16528, 9564, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345,...
2.709016
488
import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D x = np.linspace(-2,2,100) y = np.linspace(-1,3,100) #x,y = np.meshgrid(x,y) f = (1.0-x)**2 + (100.0*((y-(x**2))**2)) # plt.figure() # plt.plot(x,y,'ok') # plt.show() plt.figure() plt.contourf(x,y,f,100) plt.colorbar()...
[ 11748, 299, 32152, 355, 45941, 201, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 201, 198, 6738, 285, 489, 62, 25981, 74, 896, 13, 76, 29487, 18, 67, 1330, 12176, 274, 18, 35, 201, 198, 87, 796, 45941, 13, 21602, ...
1.836145
415
# -*- coding:utf-8 -*- from tan import tancp_cli,tan_cli
[ 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 6738, 25706, 1330, 256, 1192, 79, 62, 44506, 11, 38006, 62, 44506, 198 ]
2.192308
26
import fileinput import os from dotenv import load_dotenv load_dotenv() if __name__ == '__main__': configure_gateway_container() configure_proxy_st_container() configure_satellite_container() configure_terminal_container() configure_ws_ovpn_container() configure_ws_st_container() configu...
[ 11748, 2393, 15414, 198, 11748, 28686, 198, 6738, 16605, 24330, 1330, 3440, 62, 26518, 24330, 198, 2220, 62, 26518, 24330, 3419, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 17425, 62, 104...
2.905983
117
# coding: utf-8 import os from werkzeug.wrappers import Request, Response from werkzeug.utils import redirect from werkzeug.exceptions import HTTPException, NotFound from . import utils class HTTPMethodOverrideMiddleware(object): """ 使用中间件以接受标准 HTTP 方法 详见:https://gist.github.com/nervouna/47cf9b69484213...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 11748, 28686, 198, 198, 6738, 266, 9587, 2736, 1018, 13, 29988, 11799, 1330, 19390, 11, 18261, 198, 6738, 266, 9587, 2736, 1018, 13, 26791, 1330, 18941, 198, 6738, 266, 9587, 2736, 1018, 13, ...
1.894895
333
""" Modulo contenente le route della dashboard amministratori. Le route sono registrate nel Blueprint 'dash', con prefisso '/dashboard'. """ from datetime import datetime, date, timedelta from flask import Blueprint, render_template, abort, request, current_app, flash, redirect, url_for from sqlalchemy.sql import sel...
[ 37811, 198, 5841, 43348, 542, 268, 21872, 443, 6339, 390, 8466, 30415, 716, 2201, 12392, 72, 13, 198, 3123, 6339, 3367, 78, 4214, 4873, 299, 417, 39932, 705, 42460, 3256, 369, 7694, 271, 568, 31051, 42460, 3526, 4458, 198, 37811, 198, ...
2.074137
14,797
#! /usr/bin/env python """ Routines to extract compounds from ZINC Database: http://zinc.docking.org/ These routines were developed by: Rodrigo Antonio Faccioli - rodrigo.faccioli@usp.br / rodrigo.faccioli@gmail.com Leandro Oliveira Bortot - leandro.bortot@usp.br / leandro.obt@gmail.com """ import...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 220, 198, 220, 220, 220, 39602, 1127, 284, 7925, 16439, 422, 1168, 30158, 24047, 25, 2638, 1378, 89, 1939, 13, 67, 8629, 13, 2398, 14, 198, 220, 220, 220, 2312, 31878, 547, ...
2.513249
1,736
import spherpro.bromodules.io_anndata as io_ann import spherpro.bromodules.io_imcfolder as io_imc import spherpro.bromodules.io_masks as io_masks import spherpro.bromodules.io_stackimage as io_stackimage
[ 11748, 599, 372, 1676, 13, 65, 398, 375, 5028, 13, 952, 62, 272, 358, 1045, 355, 33245, 62, 1236, 198, 11748, 599, 372, 1676, 13, 65, 398, 375, 5028, 13, 952, 62, 320, 66, 43551, 355, 33245, 62, 320, 66, 198, 11748, 599, 372, 16...
2.530864
81
import numpy as np from keras.models import load_model from keras_preprocessing.sequence import pad_sequences from keras_preprocessing.text import Tokenizer from lab4.utils import clean_text model = load_model('my_model.h5') texts = ['It was my fault I let you control me', 'If I was gone tomorrow would you ...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 41927, 292, 13, 27530, 1330, 3440, 62, 19849, 198, 6738, 41927, 292, 62, 3866, 36948, 13, 43167, 1330, 14841, 62, 3107, 3007, 198, 6738, 41927, 292, 62, 3866, 36948, 13, 5239, 1330, 29130, 7509,...
3
521
# Copyright (c) MONAI Consortium # 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, so...
[ 2, 15069, 357, 66, 8, 25000, 20185, 42727, 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, 743...
2.754568
1,642
import time from collections import Counter
[ 11748, 640, 198, 6738, 17268, 1330, 15034, 628 ]
5.625
8
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Thu Jun 21 20:22:37 2018 @author: gtucker """ import sys import numpy as np from percolation import Percolator FULL = 1 # code for full cell in 'cell' array, used for plotting (only) class PercTester(object): """A PercTester implements testing of ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 17, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 26223, 7653, 2310, 1160, 25, 1828, 25, 2718, 2864, 198, 198, 31, 9800, 25, 308, 83, 12603...
1.967949
2,652
import os from .app import show from .widgets import QtWidgets import pype import pyblish.api
[ 11748, 28686, 198, 6738, 764, 1324, 1330, 905, 198, 6738, 764, 28029, 11407, 1330, 33734, 54, 312, 11407, 198, 11748, 279, 2981, 198, 11748, 12972, 65, 1836, 13, 15042, 628 ]
3.166667
30
#!/bin/python3 # The aim of this script is to reorganize everything from ``update_mathjax.js`` # and ``get_refman`` by package, roughly mimicking the layout exported by # ``get_cwl``. Anything not in a known package can follow two routes: If # tagged with a ``KaTeX`` or ``MathJax`` meta tag, it'll get dumped in the #...
[ 2, 48443, 8800, 14, 29412, 18, 198, 198, 2, 383, 4031, 286, 428, 4226, 318, 284, 35459, 1096, 2279, 422, 7559, 19119, 62, 11018, 73, 897, 13, 8457, 15506, 198, 2, 290, 7559, 1136, 62, 5420, 805, 15506, 416, 5301, 11, 7323, 17007, ...
2.221074
2,999
#!/usr/bin/env python3 # planck - # Copyright (C) 2021 nineties # import os import sys import operator import array import ctypes import platform RUNTIME_NAME = "Python {}".format(platform.python_version()) COPYRIGHT = "Copyright (c) 2021 Koichi Nakamura <koichi@idein.jp>" VERSION = "{}:{}".format(RUNTIME_NAME, COP...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 1410, 694, 532, 220, 198, 2, 15069, 357, 34, 8, 33448, 13462, 31638, 198, 2, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 10088, 198, 11748, 7177, 198, 11748, 269, 1...
2.614478
1,188
from typing import Dict from uuid import uuid4 from imageio import imread, imwrite from numpy import array, hstack, ndarray, subtract from PIL import Image from PIL.Image import Image as ImageType from PIL.ImageFilter import FIND_EDGES, GaussianBlur from tqdm import tqdm from . import IMAGE_SIZE_LARGE, IMAGE_SIZE_SMA...
[ 6738, 19720, 1330, 360, 713, 198, 6738, 334, 27112, 1330, 334, 27112, 19, 198, 198, 6738, 2939, 952, 1330, 545, 961, 11, 545, 13564, 198, 6738, 299, 32152, 1330, 7177, 11, 289, 25558, 11, 299, 67, 18747, 11, 34128, 198, 6738, 350, 4...
2.583333
480
# -*- coding: UTF-8 -*- # ------------------------(max to 80 columns)----------------------------------- # author by : (学员ID) # created: 2019.11 # Description: # 初步学习 WinForm 编程 ( Frame ) # ------------------------(max to 80 columns)----------------------------------- import tkinter as tk from tkinter import ttk ...
[ 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 198, 198, 2, 220, 22369, 7, 9806, 284, 4019, 15180, 8, 3880, 6329, 198, 2, 1772, 416, 1058, 27332, 120, 230, 27764, 99, 37772, 246, 2389, 8, 198, 2, 2727, 25, 220, 13130, 13...
2.617371
426
import json import pickle import logging import datetime import time from datetime import timedelta from geopy.distance import great_circle import requests logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) class PyWorker: """ Represents a Python process acting as worker (listening for job...
[ 11748, 33918, 198, 11748, 2298, 293, 198, 11748, 18931, 198, 11748, 4818, 8079, 198, 11748, 640, 198, 6738, 4818, 8079, 1330, 28805, 12514, 198, 198, 6738, 4903, 11081, 13, 30246, 1330, 1049, 62, 45597, 198, 11748, 7007, 198, 198, 6404, ...
3.207207
111
# # Copyright (c) 2020 by Ilya Tsyganov, Ryazan State Radio Engineering University. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rig...
[ 2, 198, 2, 15069, 357, 66, 8, 12131, 416, 49804, 64, 309, 1837, 1030, 709, 11, 11089, 1031, 272, 1812, 8829, 14044, 2059, 13, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866,...
3.688571
350
import requests from django.conf import settings
[ 11748, 7007, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 628, 628, 628, 628 ]
4
14
import sys import os import shutil from conans import ConanFile, CMake from conans.tools import download, unzip sys.path.append( os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
[ 11748, 25064, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 198, 6738, 369, 504, 1330, 31634, 8979, 11, 327, 12050, 198, 6738, 369, 504, 13, 31391, 1330, 4321, 11, 555, 13344, 198, 198, 17597, 13, 6978, 13, 33295, 7, 198, 220, 220, ...
2.739726
73
import unittest import os import for_unittest if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 11748, 28686, 198, 11748, 329, 62, 403, 715, 395, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3419, 198 ]
2.552632
38
from util import get_index balances = [{'currency':'KRW','balance':50000000}]
[ 6738, 7736, 1330, 651, 62, 9630, 198, 198, 6893, 1817, 796, 685, 90, 6, 34415, 10354, 6, 30758, 54, 41707, 20427, 10354, 20, 24598, 92, 60 ]
3
26
from panoptes.pocs.focuser.serial import AbstractSerialFocuser class Focuser(AbstractSerialFocuser): """ Focuser class for control of a Canon DSLR lens via an Astromechanics Engineering Canon EF/EF-S adapter. Args: name (str, optional): default 'Astromechanics Focuser' model (str, optiona...
[ 6738, 3425, 404, 4879, 13, 79, 420, 82, 13, 69, 420, 7220, 13, 46911, 1330, 27741, 32634, 37, 420, 7220, 628, 198, 4871, 376, 420, 7220, 7, 23839, 32634, 37, 420, 7220, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 376, 420...
2.85662
1,639
import sys MOD = 10 ** 9 + 7 n, m, *a = map(int, sys.stdin.read().split()) broken = set(a) if __name__ == '__main__': ans = main() print(ans)
[ 11748, 25064, 201, 198, 201, 198, 33365, 796, 838, 12429, 860, 1343, 767, 201, 198, 201, 198, 77, 11, 285, 11, 1635, 64, 796, 3975, 7, 600, 11, 25064, 13, 19282, 259, 13, 961, 22446, 35312, 28955, 201, 198, 25826, 796, 900, 7, 64,...
2.076923
78
# -*- coding: utf-8 -*- import scrapy from scrapy.loader import ItemLoader from scrapy.exceptions import CloseSpider from spider.items import Report class CustomerReports(scrapy.Spider): """Spider that retrieves raw customer reports about companies. This spider reaches the consumidor.gov.br website to craw...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 15881, 88, 198, 6738, 15881, 88, 13, 29356, 1330, 9097, 17401, 198, 6738, 15881, 88, 13, 1069, 11755, 1330, 13872, 41294, 198, 6738, 19230, 13, 23814, 1330, ...
2.215413
2,154
import sqlite3 import time import datetime as dt from episcan.manga import Manga __doc__ = r''' CREATE TABLE "manga_list" ( "filename" TEXT NOT NULL, "name" TEXT NOT NULL, "nb_chap" INTEGER NOT NULL, "last_update" TEXT NOT NULL, "added_date" TEXT NOT NULL, "image_path" TEXT,...
[ 11748, 44161, 578, 18, 198, 11748, 640, 198, 11748, 4818, 8079, 355, 288, 83, 198, 198, 6738, 2462, 2304, 272, 13, 76, 16484, 1330, 27024, 198, 198, 834, 15390, 834, 796, 374, 7061, 6, 198, 198, 43387, 6158, 43679, 366, 76, 16484, 6...
2.273885
157
import axonius_api_client as axonapi print(axonapi)
[ 11748, 7877, 261, 3754, 62, 15042, 62, 16366, 355, 7877, 261, 15042, 198, 198, 4798, 7, 897, 261, 15042, 8, 198 ]
2.52381
21
from .watch_time import my_clock from ..universe.strlen import last_len import time class Logger: '''自动日志。 参数: mode:一个函数,代表输出方向。"write"表示向文件写 log_path:日志文件的位置。如果选了"write"的话必须填此项。如果打开了文件最后一定要调用close() append:往末尾添加哪些信息。clock表示当前运行秒数,time表示当前时间,也可以用其他函数 方法: log:输出一个字符串 close:关闭文件 ''' def add_line(self , n...
[ 6738, 764, 8340, 62, 2435, 1330, 616, 62, 15750, 198, 6738, 11485, 403, 3997, 13, 2536, 11925, 1330, 938, 62, 11925, 198, 11748, 640, 198, 198, 4871, 5972, 1362, 25, 198, 197, 7061, 6, 164, 229, 103, 27950, 101, 33768, 98, 33232, 24...
1.118812
404
import os import subprocess subnet = cmd(['docker', 'network', 'inspect', 'bridge' ,"--format", "'{{range .IPAM.Config}}{{.Subnet}}{{end}}'"]) gateway = cmd(['docker', 'network', 'inspect', 'bridge' ,"--format", "'{{range .IPAM.Config}}{{.Gateway}}{{end}}'"]) bridge_name = get_bridge_name() ids = cmd(["docker", "...
[ 11748, 28686, 220, 198, 11748, 850, 14681, 628, 628, 198, 198, 7266, 3262, 796, 23991, 7, 17816, 45986, 3256, 705, 27349, 3256, 705, 1040, 806, 3256, 705, 9458, 6, 42911, 438, 18982, 1600, 24018, 27007, 9521, 764, 4061, 2390, 13, 16934,...
2.560924
476
from app.extensions import db from app.api.utils.models_mixins import AuditMixin, Base from sqlalchemy.schema import FetchedValue
[ 6738, 598, 13, 2302, 5736, 1330, 20613, 198, 198, 6738, 598, 13, 15042, 13, 26791, 13, 27530, 62, 19816, 1040, 1330, 46450, 35608, 259, 11, 7308, 198, 6738, 44161, 282, 26599, 13, 15952, 2611, 1330, 44649, 1740, 11395, 628 ]
3.384615
39
# import our libraries import numpy as np import pwlf # if you use Python 2.x you should import cPickle # import cPickle as pickle # if you use Python 3.x you can just use pickle import pickle # your data y = np.array([0.00000000e+00, 9.69801700e-03, 2.94350340e-02, 4.39052750e-02, 5.45343950e-02, 6.741...
[ 2, 1330, 674, 12782, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 279, 86, 1652, 198, 198, 2, 611, 345, 779, 11361, 362, 13, 87, 345, 815, 1330, 269, 31686, 293, 198, 2, 1330, 269, 31686, 293, 355, 2298, 293, 198, 2, 611, 345, ...
1.657292
1,920
import os import numpy as np import cv2 import torch import torch.nn.functional as F from torch.utils.data import Dataset from utils import read_list_from_file from transforms import ResizeWithIntrinsic, RandomHorizontalFlipWithIntrinsic, CenterCropWithIntrinsic, EqualizeHist from torchvision.transforms import ToTenso...
[ 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 269, 85, 17, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 16092, 292, 316, 198, 6738, 3384, 4487, ...
2.039507
3,164
import json import math import time from sanic_healthcheck import handlers
[ 198, 11748, 33918, 198, 11748, 10688, 198, 11748, 640, 198, 198, 6738, 5336, 291, 62, 13948, 9122, 1330, 32847, 628, 628, 198 ]
3.681818
22
import re import os import sys from argparse import ArgumentParser from typing import Optional from models.model_factory import get_model from dataset.dataset_factory import get_dataset from dataset.dataset import DataSeries from utils.hyperparameters import HyperParameters from utils.file_utils import extract_model_n...
[ 11748, 302, 198, 11748, 28686, 198, 11748, 25064, 198, 6738, 1822, 29572, 1330, 45751, 46677, 198, 6738, 19720, 1330, 32233, 198, 198, 6738, 4981, 13, 19849, 62, 69, 9548, 1330, 651, 62, 19849, 198, 6738, 27039, 13, 19608, 292, 316, 62,...
3.069378
418
# Copyright 2021 Huawei Technologies Co., Ltd # # 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...
[ 2, 15069, 33448, 43208, 21852, 1766, 1539, 12052, 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.01191
4,954
import matplotlib.pyplot as plt import networkx as nx edgeListRaw = [] pathList = [] label = {} weights = [] col = [] edgeTraffic = {} maxw = 0 minw = 999999999 # Reading path from file textFile = open("src/data/path.txt", "r") data = textFile.read().split() for r in range(1,len(data)-1): pathList.append((int(d...
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 3127, 87, 355, 299, 87, 198, 198, 14907, 8053, 27369, 796, 17635, 198, 6978, 8053, 796, 17635, 198, 18242, 796, 23884, 198, 43775, 796, 17635, 198, 4033, 796, 17635, ...
2.109524
1,260
# %% from tensorflow import keras (x_train, y_train), (x_test, y_test) = keras.datasets.fashion_mnist.load_data() model = keras.models.Sequential([ keras.layers.Flatten(input_shape=[28, 28]), keras.layers.Dense(128, activation='relu'), keras.layers.Dense(10, activation='softmax') ]) model.compile(loss=ke...
[ 2, 43313, 198, 6738, 11192, 273, 11125, 1330, 41927, 292, 198, 198, 7, 87, 62, 27432, 11, 331, 62, 27432, 828, 357, 87, 62, 9288, 11, 331, 62, 9288, 8, 796, 41927, 292, 13, 19608, 292, 1039, 13, 25265, 62, 10295, 396, 13, 2220, ...
2.426829
164
###################################################################### # # File: b2sdk/account_info/in_memory.py # # Copyright 2019 Backblaze Inc. All Rights Reserved. # # License https://www.backblaze.com/using_b2_code.html # ###################################################################### from .exception impor...
[ 29113, 29113, 4242, 2235, 198, 2, 198, 2, 9220, 25, 275, 17, 21282, 74, 14, 23317, 62, 10951, 14, 259, 62, 31673, 13, 9078, 198, 2, 198, 2, 15069, 13130, 5157, 2436, 6201, 3457, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 13789, ...
2.472191
1,762
from django.contrib import messages from django.db.models import Q from django.http import Http404, JsonResponse from django.shortcuts import redirect, render from django.views.decorators.cache import cache_page from product.models import Product from .models import Contact @cache_page(60 * 60) def sear...
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 6218, 201, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 1330, 1195, 201, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 26429, 11, 449, 1559, 31077, 201, 198, 6738, 42625, 14208, 13, 19509...
2.296963
889
from feed.spiders.spider import Spider
[ 198, 6738, 3745, 13, 2777, 4157, 13, 2777, 1304, 1330, 12648, 628 ]
3.416667
12
import turtle import pandas # creen setup correct_guess_list = [] screen = turtle.Screen() screen.title(" U.S State Game") image = 'blank_states_img.gif' screen.addshape(image) turtle.shape(image) # import the dataset as a csv data = pandas.read_csv('50_states.csv') state_list = data.state.to_list() # getting user...
[ 11748, 28699, 198, 11748, 19798, 292, 198, 2, 1126, 268, 9058, 198, 30283, 62, 5162, 408, 62, 4868, 796, 17635, 198, 9612, 796, 28699, 13, 23901, 3419, 198, 9612, 13, 7839, 7203, 471, 13, 50, 1812, 3776, 4943, 198, 9060, 796, 705, 2...
2.466205
577
from django import forms
[ 6738, 42625, 14208, 1330, 5107, 628 ]
4.333333
6
import unittest from solution import solution_part_one, solution_part_two if __name__ == "__main__": unittest.main()
[ 11748, 555, 715, 395, 198, 198, 6738, 4610, 1330, 4610, 62, 3911, 62, 505, 11, 4610, 62, 3911, 62, 11545, 628, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3419, ...
2.863636
44
# This test includes unit tests for MarkovChain and MarkovDecisionProcess of # the tulip.transys module # # * mc_test(): a unit test for the MarkovChain class # * mdp_test(): a unit test for the MarkovDecisionProcess class from tulip.transys import MarkovChain as MC from tulip.transys import MarkovDecisionProcess as M...
[ 2, 770, 1332, 3407, 4326, 5254, 329, 2940, 709, 35491, 290, 2940, 709, 10707, 1166, 18709, 286, 198, 2, 262, 48373, 541, 13, 7645, 893, 8265, 198, 2, 198, 2, 1635, 36650, 62, 9288, 33529, 257, 4326, 1332, 329, 262, 2940, 709, 35491,...
3.431579
95
import os import pathlib import shutil import glob
[ 11748, 28686, 198, 11748, 3108, 8019, 198, 11748, 4423, 346, 198, 11748, 15095, 198 ]
3.642857
14
"""959. Regions Cut By Slashes https://leetcode.com/problems/regions-cut-by-slashes/ In a N x N grid composed of 1 x 1 squares, each 1 x 1 square consists of a /, \, or blank space. These characters divide the square into contiguous regions. (Note that backslash characters are escaped, so a \ is represented as "\\"....
[ 37811, 24, 3270, 13, 47089, 9712, 2750, 3454, 7465, 198, 5450, 1378, 293, 316, 8189, 13, 785, 14, 1676, 22143, 14, 2301, 507, 12, 8968, 12, 1525, 12, 6649, 7465, 14, 198, 198, 818, 257, 399, 2124, 399, 10706, 13160, 286, 352, 2124, ...
2.654788
449
# *-* coding: utf-8 *-* # Copyright (c) 2015 Mounier Florian # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modi...
[ 2, 1635, 12, 9, 19617, 25, 3384, 69, 12, 23, 1635, 12, 9, 198, 2, 15069, 357, 66, 8, 1853, 337, 977, 959, 4432, 666, 198, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 198, 2,...
2.974733
1,029
import logging from pymongo import ASCENDING, MongoClient from pymongo.errors import ConnectionFailure, ServerSelectionTimeoutError from ..exceptions import MongoBackendError, ProcessingError from ..filters.mongodb_filter import MongoDBFilter from ..utils.common import (create_bundle, format_datetime, generate_status...
[ 11748, 18931, 198, 198, 6738, 279, 4948, 25162, 1330, 25400, 10619, 2751, 11, 42591, 11792, 198, 6738, 279, 4948, 25162, 13, 48277, 1330, 26923, 50015, 11, 9652, 4653, 1564, 48031, 12331, 198, 198, 6738, 11485, 1069, 11755, 1330, 42591, 7...
3.08427
178