text
stringlengths
1
927k
import community as community_louvain import networkx as nx import sys G = nx.read_weighted_edgelist(sys.argv[1]) # compute the best partition partition = community_louvain.best_partition(G) for n in partition.keys() : print(n,"\t",partition[n])
"""Add network table. Revision ID: a61092f784b7 Revises: 37e174f84517 Create Date: 2020-01-13 07:31:21.905820 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = "a61092f784b7" down_revision = "37e174f84517" branch_labels = None depends_on = None def upgrade(): ...
""" generic mechanism for marking and selecting python functions. """ import warnings from typing import Optional from .legacy import matchkeyword from .legacy import matchmark from .structures import EMPTY_PARAMETERSET_OPTION from .structures import get_empty_parameterset_mark from .structures import Mark from .struc...
""" ELBO """ import oneflow.experimental as flow class ELBO(flow.nn.Module): def __init__(self, generator, variational): super(ELBO, self).__init__() self.generator = generator self.variational = variational def log_joint(self, nodes): log_joint_ = None for n_name in n...
"""create DOEs and execute design workflow Caution: This module requires fa_pytuils and delismm! Please contatct the developers for these additional packages. """ import os from collections import OrderedDict import datetime import numpy as np import matplotlib.pyplot as plt from delismm.model.doe import LatinizedCe...
from typing import Optional from dash import html, Dash from .. import WebvizPluginABC, EncodedFile class ExampleDataDownload(WebvizPluginABC): def __init__(self, app: Dash, title: str): super().__init__() self.title = title self.set_callbacks(app) @property def layout(self) ->...
#!/usr/bin/env python3 # coding: utf-8 # pylint: disable=subprocess-run-check, unused-argument, import-outside-toplevel import json import shlex import subprocess from time import sleep from sapporo.model import RunId from . import SCRIPT_DIR, TEST_HOST, TEST_PORT def post_runs_params_outdir_with_docker() -> RunId:...
# Copyright 2020 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...
#textProBarV3 import time scale = 50 print('执行开始'.center(scale//2, '-')) start = time.perf_counter() for i in range(scale + 1): a = '*' * i b = '*' * (scale - i) c = (i/scale) * 100 dur = time.perf_counter() - start print('\r{:^3.0f}%[{}->{}]{:2f}s'.format(c,a,b,dur), end='') time.sleep(0.2) pri...
# -*- encoding: utf-8 -*- # @Time : 2020/12/22 # @Author : Xiaolei Wang # @email : wxl1999@foxmail.com # UPDATE # @Time : 2020/12/29 # @Author : Xiaolei Wang # @email : wxl1999@foxmail.com """Config module which loads parameters for the whole system. Attributes: SAVE_PATH (str): where sys...
import os import librosa import librosa.display import matplotlib.pyplot as plt from tqdm import tqdm def create_spectrograms(): audio_dir = os.path.join('audio_annotator', 'static') files = [x for x in os.listdir(audio_dir) if x.lower().endswith('.wav')] for f in tqdm(files): audio_path = os.pa...
# 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 ...
""" Copyright (C) 2017-2021 Intel Corporation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to i...
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Thailand - Accounting', 'version': '2.0', 'category': 'Localization', 'description': """ Chart of Accounts for Thailand. =============================== Thai accounting chart and localization....
import numpy as np from sklearn.pipeline import Pipeline from models.model import Model, ArrayLike from preprocess.report_data import ReportData from preprocess.report_data_d import ColName from training.description_classification.utils import load_svm, SVMPipeline class SVMDescriptionClf(Model[SVMPipeline]): "...
#! /usr/bin/env python '''XML Canonicalization Patches Applied to xml.dom.ext.c14n: http://sourceforge.net/projects/pyxml/ [ 1444526 ] c14n.py: http://www.w3.org/TR/xml-exc-c14n/ fix -- includes [ 829905 ] c14n.py fix for bug #825115, Date Submitted: 2003-10-24 23:43 -- include dep...
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc from google.ads.google_ads.v6.proto.resources import geographic_view_pb2 as google_dot_ads_dot_googleads_dot_v6_dot_resources_dot_geographic__view__pb2 from goog...
#!/usr/bin/env python3 # Copyright (c) 2015-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test node responses to invalid blocks. In this test we connect to one node over p2p, and test block re...
import os from scripts import version from scripts.embed import create_single_header_file from scripts.multiline_string_utilities import remove_indentation from scripts.release_constants import release_constants from scripts.release_details import ReleaseDetails from scripts.single_header_file import SingleHeaderFile ...
""" This module controls defines celery tasks and their applicable schedules. The celery beat server and workers will start when invoked. Please add internal-only celery tasks to the celery_tasks plugin. When ran in development mode (CONFIG_LOCATION=<location of development.yaml configuration file. To run both the cel...
from __future__ import absolute_import, unicode_literals from celery import shared_task from libs.bot import dingtalk @shared_task def send_dingtalk_message(message): dingtalk.send(message)
class RectAnimation(RectAnimationBase,ISealable,IAnimatable,IResource): """ Animates the value of a System.Windows.Rect property between two target values using linear interpolation. RectAnimation() RectAnimation(toValue: Rect,duration: Duration) RectAnimation(toValue: Rect,duration: Duration,fillBehavior: F...
import logging import threading import time import traceback from concurrent.futures.thread import ThreadPoolExecutor from pathlib import Path from typing import Any, Callable, Dict, List, Optional, Set, Tuple from blspy import G1Element from chiapos import DiskProver from ceres.consensus.pos_quality import UI_ACTUAL...
# Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __metaclass__ = type import ast import yaml from ansible.module_utils._text import to_tex...
import numpy as np from skimage.transform import resize import skimage import torchvision.utils as tvutils import torch def rescale_for_display( batch, rescale=True, normalize=False ): ''' Prepares network output for display by optionally rescaling from [-1,1], and by setting some pixels to the ...
"""Access to Python's configuration information.""" import os import sys from os.path import pardir, realpath __all__ = [ 'get_config_h_filename', 'get_config_var', 'get_config_vars', 'get_makefile_filename', 'get_path', 'get_path_names', 'get_paths', 'get_platform', 'get_python_ve...
import os import re import itertools from stat import S_IMODE, S_ISREG, ST_MODE def is_executable_posix(path): """Whether the file is executable. Based on which.py from stdlib """ try: st = os.stat(path) except os.error: return None isregfile = S_ISREG(st[ST_MODE]) isexem...
from flaskvlog import app if __name__ == '__main__': app.run(debug=True)
# pylint: disable=redefined-outer-name """Initialise a text database and profile for pytest.""" from __future__ import absolute_import import io import os import shutil import tempfile import pytest from aiida.manage.fixtures import fixture_manager @pytest.fixture(scope='session') def fixture_environment(): """...
import unittest from unittest import TestCase from utils import url_builder import re class UrlBuilderTests(TestCase): def test_url_builder_no_args(self): test_url = "https://my.test/url" built_url = url_builder.build_url(test_url) self.assertEqual(built_url, test_url) def test_url_bu...
brd = { 'name': ('StickIt! Buttons V2'), 'port': { 'pmod': { 'default' : { 'b0': 'd0', 'b1': 'd1', 'b2': 'd2', 'b3': 'd3' } }, 'wing': { 'default' : { 'b0': 'd0', ...
info = { "name": "shi", "date_order": "DMY", "january": [ "ⵉⵏⵏ", "ⵉⵏⵏⴰⵢⵔ" ], "february": [ "ⴱⵕⴰ", "ⴱⵕⴰⵢⵕ" ], "march": [ "ⵎⴰⵕ", "ⵎⴰⵕⵚ" ], "april": [ "ⵉⴱⵔ", "ⵉⴱⵔⵉⵔ" ], "may": [ "ⵎⴰⵢ", "ⵎⴰⵢⵢⵓ" ],...
from rest_framework.response import Response from rest_framework import status from shipments.logic import ShipmentLogic from ecommerce.core.views import BaseDetailView, BaseView from ecommerce.views import BaseAPIView class ShipmentView(BaseView): def __init__(self): super().__init__() self.lo...
# Copyright 2013 Donald Stufft # # 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...
# Simulated Annealing Algorithm # Import Required Functionalities from puzzle import Puzzle, heuristicFuncList, heuristics from heapq import heappush, heappop from time import time import random from math import exp, log def coolingFunc(maxTemperature, iteration, choice): if choice == 1: return maxTemper...
from flask import Flask, render_template, request, redirect from flaskext.mysql import MySQL # web application app = Flask(__name__) # connect to db mysql = MySQL() app.config['MYSQL_DATABASE_USER'] = 'root' app.config['MYSQL_DATABASE_PASSWORD'] = '~~keowee.27~~' app.config['MYSQL_DATABASE_DB'] = 'book_business' app....
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities __...
# coding: utf-8 from __future__ import unicode_literals import base64 import re import struct from ..compat import (compat_etree_fromstring, compat_HTTPError, compat_parse_qs, compat_urllib_parse_urlparse, compat_urlparse, compat_xml_parse_error) from ..utils import (Extrac...
import pathlib import os from typing import Optional import vswhere def find_cmake() -> Optional[pathlib.Path]: # search in PATH for p in os.getenv('PATH').split(';'): cmake = pathlib.Path(p) / 'cmake.exe' if cmake.exists(): return cmake # default path cmake = pathlib.Path...
"""Describe logbook events.""" from homeassistant.const import ATTR_ENTITY_ID, ATTR_NAME from homeassistant.core import callback from . import DOMAIN, EVENT_SCRIPT_STARTED @callback def async_describe_events(hass, async_describe_event): """Describe logbook events.""" @callback def async_describe_logbook...
from utils.api.tests import APITestCase from .models import GroupRegistrationRequest, Group class GroupRegistrationRequestAPITest(APITestCase): def setUp(self): self.create_super_admin() self.url = self.reverse("group_registration_request_api") self.data = { "name": "SKKUding",...
from django.conf.urls import patterns, include, url from django.conf import settings # Serving files uploaded by a user during development from django.conf.urls.static import static urlpatterns = patterns('', url(r'^$', 'dragdrop.views.DraggingAndDropping', name='DraggingAndDropping'), ) # this is to deploy static...
# convert-tiles.py # # Micropolis, Unix Version. This game was released for the Unix platform # in or about 1990 and has been modified for inclusion in the One Laptop # Per Child program. Copyright (C) 1989 - 2007 Electronic Arts Inc. If # you need assistance with this program, you may contact: # http://wiki.lapto...
import subprocess from .base import Browser, ExecutorBrowser, require_arg from .base import get_timeout_multiplier # noqa: F401 from .chrome import executor_kwargs as chrome_executor_kwargs from ..webdriver_server import ChromeDriverServer from ..executors.executorwebdriver import (WebDriverTestharnessExecutor, # n...
""" This test suite exercises some system calls subject to interruption with EINTR, to check that it is actually handled transparently. It is intended to be run by the main test suite within a child process, to ensure there is no background thread running (so that signals are delivered to the correct thread). Signals a...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
__author__ = 'amw' from configurator.persistence.PersistenceManager import PersistenceManager from Reporting import plot3d, plot2d, create_dataset, create_plot_matrix # Initialise database config db_config = {"hostname": "localhost", "port": "27017", "db_name": "sianwahl_test", "collection_name": "test"} # # 2d exam...
# coding: utf-8 """ kinto Kinto is a minimalist JSON storage service with synchronisation and sharing abilities. It is meant to be easy to use and easy to self-host. **Limitations of this OpenAPI specification:** 1. Validation on OR clauses is not supported (e.g. provide `data` or `permissions` in patch ...
# git.py - git support for the convert extension # # Copyright 2005-2009 Matt Mackall <mpm@selenic.com> and others # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. from __future__ import absolute_import import os from mercurial.i...
""" A view (URL=/sql_provider) allowing to enabled/disable a SQL spy that runs an "EXPLAIN ANALYZE" on every SELECT query going through SQLAlchemy. """ import logging import pyramid.request from c2cwsgiutils import auth ENV_KEY = "C2C_SQL_PROFILER_ENABLED" CONFIG_KEY = "c2c.sql_profiler_enabled" LOG = logging.getLog...
def foo(*args, **kwargs): pass fo<caret>o(1, 2, 3, x = 4)
from urllib.parse import urljoin import requests class CveApiError(Exception): """Raise when encountering errors returned by the CVE API.""" pass class CveApi: ENVS = { "prod": "https://cveawg.mitre.org/api/", "dev": "https://cveawg-dev.mitre.org/api/", "test": "https://cveawg-...
# Copyright 2017 Neural Networks and Deep Learning lab, MIPT # # 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 applicab...
from py42.sdk.queries.fileevents.filters.activity_filter import * from py42.sdk.queries.fileevents.filters.cloud_filter import * from py42.sdk.queries.fileevents.filters.device_filter import * from py42.sdk.queries.fileevents.filters.email_filter import * from py42.sdk.queries.fileevents.filters.event_filter import * f...
# -*- coding: utf-8 -*- # Copyright 2020 Google 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...
from threading import Thread import tweepy import csv import sys from datetime import datetime,timedelta from time import sleep try: from twitter.Status import Status from twitter.search import gettweets_bykeyword from twitter.search import get_api from twitter.Database import Database_connection as db_ except...
settings_1_9_0 = """ # Only for cross building, 'os_build/arch_build' is the system that runs Conan os_build: [Windows, WindowsStore, Linux, Macos, FreeBSD, SunOS] arch_build: [x86, x86_64, ppc64le, ppc64, armv6, armv7, armv7hf, armv8, sparc, sparcv9, mips, mips64, avr, armv7s, armv7k] # Only for building cross compil...
from django.core.cache import cache from django.utils import six from parler import appsettings from parler.utils import get_language_settings if six.PY3: long = int def get_object_cache_keys(instance): """ Return the cache keys associated with an object. """ if not instance.pk or instance._state...
from torch.utils.data import DataLoader from torchvision import transforms as T from torchvision.datasets import CIFAR10 import pytorch_lightning as pl class CIFAR10Data(pl.LightningDataModule): """ returns cifar-10 examples in floats in range [0,1] """ def __init__(self, args): super().__init__() ...
from flask import jsonify class CustomResponse : def __init__(self, statuscode, data): self.statuscode = {"status":statuscode, "response_body" : data} self.response = {"status":statuscode, "data" : data} self.data_out = data def getres(self): return jsonify(self.statuscode)...
# coding: utf-8 """ iEngage 2.0 API This API enables Intelligent Engagement for your Business. iEngage is a platform that combines process, augmented intelligence and rewards to help you intelligently engage customers. OpenAPI spec version: 2.0 Generated by: https://github.com/swagger-api/swagge...
""" ===== Words ===== Words/Ladder Graph ------------------ Generate an undirected graph over the 5757 5-letter words in the datafile `words_dat.txt.gz`. Two words are connected by an edge if they differ in one letter, resulting in 14,135 edges. This example is described in Section 1.1 in Knuth's book (see [1]_ and [...
#!usr/bin/emv python3 # -*- coding: utf-8 -*- # metaclass是创建类,所以必须从`type`类型派生 class ListMetaclass(type): def __new__(cls, name, bases, attrs): attrs['add'] = lambda self, value: self.append(value) return type.__new__(cls, name, bases, attrs) # 指示使用ListMetaclass来定制类 class MyList(list, metaclass=Lis...
# coding=utf-8 # Copyright 2018 The Google AI Language 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 ...
import os import re import sys import argparse def existing_empty_dir(s): if s == "": msg = "{} is not a non-empty directory path".format(s) raise argparse.ArgumentTypeError(msg) v = os.path.abspath(s) if not os.path.isdir(v): msg = ("Path {} is not an existing directory " ...
# -*- coding: utf-8 -*- # Generated by Django 1.10.8 on 2017-11-02 13:48 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_depende...
import mock import pytest from urllib3.util import ssl_ from urllib3.exceptions import SNIMissingWarning from test import notPyPy2 @pytest.mark.parametrize( "addr", [ # IPv6 "::1", "::", "FE80::8939:7684:D84b:a5A4%251", # IPv4 "127.0.0.1", "8.8.8.8", ...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
"""Script to check the configuration file.""" import argparse import asyncio from collections import OrderedDict from collections.abc import Mapping, Sequence from glob import glob import logging import os from typing import Any, Callable, Dict, List, Tuple from unittest.mock import patch from homeassistant import boo...
''' Created on 3 lut 2019 @author: civ ''' import unittest import sys print(sys.path) from com.civ.rest import CivRest as C from com.civ.play.Play import TestGame from helper import TestHelper class Test(unittest.TestCase): def setUp(self): C.registerAutom() # @unittest.skip("demonstrating sk...
''' get sms from a cat ''' from flask import Flask, request import re from random import choice, randint, sample from twilio.rest import TwilioRestClient import settings app = Flask(__name__) base_url = settings.BASE_URL account_sid = settings.TWILIO_SID auth_token = settings.TWILIO_TOKEN number = settings.TWILIO_NUM...
# from django.conf import settings from django.contrib.auth import get_user_model, authenticate, login, logout import graphene from graphene_django.types import DjangoObjectType from .models import UserDetail class BasicUserInfoType(DjangoObjectType): """Django basic user information.""" class Meta(object):...
from django.apps import AppConfig class DevicesConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name = 'apps.devices'
# -*- coding: utf-8 -*- # Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz> # Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com> # Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net> # This program is free software: you can r...
#!/usr/bin/env python # Copyright (c) 2013 Matthew Treinish # # 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...
import requests import copy import platform import os try: import urlparse except ImportError: import urllib.parse as urlparse from .auth_handler import AuthHandler from .error_handler import ErrorHandler from .request_handler import RequestHandler from .response import Response from .response_handler import Respon...
import re import string from datetime import timedelta from unittest import mock from freezegun import freeze_time from django.core.management import call_command from django.utils.timezone import now from django.test import override_settings from django.test.client import RequestFactory from germanium.decorators ...
from ete3 import Tree import sys tree = Tree(sys.argv[1]) centroid_tips = [] reference_tips = [] for leaf in tree: if leaf.name.startswith("centroid"): centroid_tips.append(leaf.name) else: reference_tips.append(leaf.name) #print("CENTROIDS:") #print(centroid_tips) #print("REFERENCES:") #print(...
# -*- coding: utf-8 -*- ''' The MIT License (MIT) Copyright (c) 2017 Wolfgang Almeida <wolfgang.almeida@yahoo.com> 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 ...
#!/usr/bin/env python """ This script provides useful funcs to all other scripts """ import yaml import glob import os def clean(flag="all"): """ Cleans project directories. """ subdirs = ["raw", "interim", "processed"] data_filepaths = [] pdb_filepaths = [] for subdir in subdirs: data...
import subprocess from dbnd import parameter from dbnd._core.parameter.validators import NonEmptyString from dbnd._core.run.databand_run import DatabandRun from dbnd._core.settings import EngineConfig from targets.values.version_value import VersionStr class ContainerEngineConfig(EngineConfig): require_submit = ...
from direct.showbase.DirectObject import DirectObject from pandac.PandaModules import * import engine import components import controllers import particles import entities import audio from direct.gui.DirectGui import * from direct.gui.OnscreenImage import OnscreenImage from direct.gui.OnscreenText import OnscreenText...
########################################################################## # # Copyright (c) 2011, John Haddon. All rights reserved. # Copyright (c) 2011-2014, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided ...
from .resnet50_fpn_model import resnet50_fpn_backbone from .mobilenetv2_model import MobileNetV2 from .vgg_model import vgg
from assertpy import assert_that import year2020.day04.reader as reader def test_example(): lines = ['ecl:gry pid:860033327 eyr:2020 hcl:#fffffd\n', 'byr:1937 iyr:2017 cid:147 hgt:183cm\n', '\n', 'iyr:2013 ecl:amb cid:350 eyr:2023 pid:028048884\n', 'hcl:#cfa07d...
"""Support for deCONZ switches.""" from pydeconz.light import Siren from homeassistant.components.switch import DOMAIN, SwitchEntity from homeassistant.core import callback from homeassistant.helpers.dispatcher import async_dispatcher_connect from .const import DOMAIN as DECONZ_DOMAIN, NEW_LIGHT, POWER_PLUGS from .d...
# Copyright 2018 Seth Michael Larson # # 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 wr...
# 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 may ...
from .Farm import Farm from jumpscale import j JSBASE = j.application.jsbase_get_class() class FarmFactory(JSBASE): def __init__(self): self.__jslocation__ = "j.sal_zos.farm" JSBASE.__init__(self) def get(self, farmer_iyo_org): """ Get sal for farm Arguments: ...
from getpass import getpass from typing import Any class CLIColors: # pylint: disable=too-few-public-methods ''' ANSI color codes used for printing colorful messages ''' ENDC = '\033[0m' class Foreground: class Normal: BLACK = '\033[30m' RED = '\033[3...
# Generated by Django 3.2.5 on 2021-08-23 15:13 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('post', '0004_alter_post_title'), ] operations = [ migrations.AlterModelOptions( name='post', options={'verbose_name': '게시글',...
""" pygments.formatters.html ~~~~~~~~~~~~~~~~~~~~~~~~ Formatter for HTML output. :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import functools import os import sys import os.path from io import StringIO from pygments.formatter imp...
from cone.app import cfg from cone.app import main_hook from cone.fileupload.browser import static_resources import logging logger = logging.getLogger('cone.fileupload') @main_hook def initialize_fileupload(config, global_config, settings): # application startup initialization # protected CSS cfg.css.p...
from starcluster.clustersetup import ClusterSetup from starcluster.logger import log class BedtoolsInstaller(ClusterSetup): def run(self, nodes, master, user, user_shell, volumes): for node in nodes: log.info("Installing Bedtools 2.21 on %s" % (node.alias)) node.ssh.execute('wget -c -P /opt/software/bedtools ...
from lib.common import helpers class Module: def __init__(self, mainMenu, params=[]): self.info = { 'Name': 'Invoke-ShareFinder', 'Author': ['@harmj0y'], 'Description': ('Finds shares on machines in the domain. Part of PowerView.'), 'Background' : True, ...
import sys import re from collections import OrderedDict from twisted.internet import defer from polyjit.buildbot.builders import register from polyjit.buildbot import slaves from polyjit.buildbot.utils import (builder, define, git, ucmd, ucompile, cmd, upload_file, ip, s_sbranch, ...
#!/usr/bin/env python """ generated source for module ExecutionFilter """ # # Original file copyright original author(s). # This file copyright Troy Melhase, troy@gci.net. # # WARNING: all changes to this file will be lost. from ib.lib.overloading import overloaded # # * ExecutionFilter.java # * # # package: com....
""" Common solar physics coordinate systems. This submodule implements various solar physics coordinate frames for use with the `astropy.coordinates` module. """ from contextlib import contextmanager import numpy as np import astropy.units as u from astropy.coordinates import ConvertError, QuantityAttribute from ast...
import json import os import urllib.request class SampleScraperPipeline(object): def open_spider(self, spider): """ Write the results to a file. :param spider: The spider used. :return: None """ self.file = open('sample_urls.txt', 'w') if spider.auto_downloa...
# Copyright 2018 Capital One Services, 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 agreed to in...