text
stringlengths
2
999k
# -*- coding: utf-8 -*- """ Solution to Project Euler problem 120 Author: Jaime Liew https://github.com/jaimeliew1/Project_Euler_Solutions """ def run(): S = 0 for a in range(3, 1001): r_max = 0 for n in range(1, a*2+2): r = ((a-1)**n + (a+1)**n)%a**2 if n == 1: ...
"Order form fields utility class." from __future__ import print_function, absolute_import import logging import tornado.web from . import constants from . import settings from . import utils class Fields(object): "Handle fields in a form." def __init__(self, form): "Set reference to the form cont...
from os import chdir chdir(r"C:\Users\jsalm\Documents\Python Scripts\Automated_Histo\unet-master\unet-master") from model import * from data import testGenerator,trainGenerator,saveResult #os.environ["CUDA_VISIBLE_DEVICES"] = "0" data_gen_args = dict(rotation_range=0.2, width_shift_range=0.05, ...
# pylint: disable=no-self-use,invalid-name from allennlp.common.testing import ModelTestCase from allennlp.data.dataset import Batch class DialogQATest(ModelTestCase): def setUp(self): super().setUp() self.set_up_model(self.FIXTURES_ROOT / 'dialog_qa' / 'experiment.json', ...
'''Test for the follower API. This module tests following, unfollowing, getting a list of what you're following or the number of things you're following, getting a list of who's following you or the number of followers you have, testing whether or not you're following something, etc. This module _does not_ test the u...
''' Computation of terminal fall speed ''' #GCCif (KERNEL == 1 && LongK_Options == 2) || (COLUMN == 1 && PROCESS != 2) # this block is active, if Long kernel values are explicitly computed (and not read from a file) or if sedimentation is switched on in the column model import sys import Misc as FK import numpy as n...
""" Creation and management of member and society accounts. """ import os from typing import Set from srcf.database import Member, Society from srcf.database.queries import get_member, get_society from ..plumbing import bespoke, mailman, pgsql as pgsql_p, ResultSet, unix from ..plumbing.mysql import context as mysql...
from dataclasses import dataclass from achi.types.blockchain_format.coin import Coin from achi.types.blockchain_format.sized_bytes import bytes32 from achi.util.ints import uint32, uint64 from achi.util.streamable import Streamable, streamable @dataclass(frozen=True) @streamable class CoinRecord(Streamable): """...
from django.contrib import admin from .models import Profile,Votes,Project class VotesInLine(admin.TabularInline): model=Votes extra=3 class ProjectInLine(admin.ModelAdmin): fieldsets=[ (None,{'fields':['user']}), (None,{'fields':['image']}), (None,{'fields':['title']}), ...
import pytest from ..packages import utils class TestRandom: @pytest.fixture(autouse=True) def default_seed(self): utils.set_seed(None) @pytest.fixture def number_tests(self): return(1000) @pytest.fixture def bound_tolerance(self): return(1e-2) def test_seed_upd...
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( version = "0.3.8" , # change this on every release name = "osbot_browser" , author = "Dinis Cruz", author_email ...
"""Simulating time series, with aperiodic activity.""" import numpy as np from scipy.stats import zscore from neurodsp.filt import filter_signal, infer_passtype from neurodsp.filt.fir import compute_filter_length from neurodsp.filt.checks import check_filter_definition from neurodsp.utils import remove_nans from neur...
def test_imports(): import torch import textattack del textattack, torch def test_embedding_augmenter(): from textattack.augmentation import EmbeddingAugmenter augmenter = EmbeddingAugmenter( pct_words_to_swap=0.01, transformations_per_example=64 ) s = "There is nothing either g...
from configparser import ConfigParser from os.path import dirname, abspath, join def get_config_information(): config = ConfigParser() my_file = join(dirname(dirname(abspath(__file__))),"config.ini") config.read(my_file) return config.get('selenium','chromePath') if(__name__ == '__main__'): pri...
import pytest from event_manager.event import Attribute, Event from event_manager.events import ( bookmark, build_job, cluster, experiment, experiment_group, experiment_job, job, notebook, permission, project, repo, superuser, tensorboard, user ) from libs.json_u...
from django.shortcuts import render from rest_framework import viewsets from .serializers import SplashSerializer from .models import Splash from django.shortcuts import render from rest_framework import viewsets from django.views import View from django.http import HttpResponse, HttpResponseNotFound import os # Crea...
handin_files = ['MkBoruvkaMST.sml', 'MkBoruvkaSegmenter.sml', 'written.pdf'] lab_name = 'segmentlab'
from flask import Blueprint from CTFd.models import ( ChallengeFiles, Challenges, Fails, Flags, Hints, Solves, Tags, db, ) from CTFd.plugins import register_plugin_assets_directory from CTFd.plugins.flags import FlagException, get_flag_class from CTFd.utils.uploads import delete_file fr...
################################################################################ # Module: buildings.py # Description: Download and plot building footprints from OpenStreetMap # License: MIT, see full license in LICENSE.txt # Web: https://github.com/gboeing/osmnx ########################################################...
# 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 from ... import _utilities, _tables from...
SUMMARIZATION_SCHEMA = { "type": "object", "properties": { "task": { "type": "string", "enum": ["summarization"] }, "method": { "type": "string", "enum": ["extractive", "abstractive"], "default": "extractive" }, ...
from flask_json import as_json from bokeh.embed import json_item from marshmallow import Schema, fields, validate from webargs.flaskparser import use_args from flexmeasures.auth.decorators import account_roles_accepted from flexmeasures.api.v2_0 import flexmeasures_api as flexmeasures_api_v2_0 from flexmeasures.api.v2...
class Solution(object): def XXX(self, nums): """ :type nums: List[int] :rtype: int """ if not len(nums): return len(nums) tmp = nums[0] index = 0 for i, v in enumerate(nums): if tmp == v: continue el...
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
#!/usr/bin/env python # encoding: utf-8 ''' @author: LoRexxar @contact: lorexxar@gmail.com @file: urls.py @time: 2020/9/24 15:56 @desc: ''' from django.urls import path from django.views.decorators.csrf import csrf_exempt from web.index import views app_name = "index" urlpatterns = [ path("", views.index), ...
from .HoughTest import HoughTest from .dataAnalysis import trace
import os import cv2 import numpy as np import sys def resize_with_aspectratio(img, out_height, out_width, scale=87.5, inter_pol=cv2.INTER_LINEAR): height, width = img.shape[:2] new_height = int(100. * out_height / scale) new_width = int(100. * out_width / scale) if height > width: w = new_widt...
#!/usr/bin/python # # tester.py # # This source file is part of the FoundationDB open source project # # Copyright 2013-2018 Apple Inc. and the FoundationDB project 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 ob...
from declarativeunittest import * from construct import * from construct.lib import * from deprecated_gallery import * def test_ethernet(): common(MacAddress, b"abcdef", "61-62-63-64-65-66", 6) commonhex(ethernet_header, b"0011508c283c0002e34260090800") def test_arp(): commonhex(arp_header, b"000108000...
# coding=utf-8 """ Matrix Factorization Collaborative Filtering Recommender [Rating Prediction] Literature: Koren, Yehuda and Bell, Robert and Volinsky, Chris: Matrix Factorization Techniques for Recommender Systems Journal Computer 2009. http://dl.acm.org/citation.cfm?id=16...
from htmldoom import render, renders, elements as e, functions as fn
# Copyright 2016 The Brotli Authors. All rights reserved. # # Distributed under MIT license. # See file LICENSE for detail or copy at https://opensource.org/licenses/MIT import unittest from . import _test_utils import brotli class TestCompress(_test_utils.TestCase): VARIANTS = {'quality': (1, 6, 9, 11), 'lgwi...
# coding=utf-8 # Copyright 2021 The OneFlow Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
#!/usr/bin/env python import logging import sys s = """ Personalities : [raid1] md1 : active raid1 sdc[1] 1953383360 blocks super 1.2 [2/1] [_U] md2 : active raid1 sda1[0] sdb1[1] 976630336 blocks super 1.2 [2/2] [UU] """ logging.basicConfig() log = logging.getLogger() log.setLevel(logging.INFO) def ...
from orm import Model, Integer, Boolean, DateTime, Float from objects.globals import db, metadata from datetime import datetime as dt class OutputApplication(Model): __tablename__ = "output_applications" __database__ = db __metadata__ = metadata id = Integer(primary_key=True) user_id = Int...
# -*- coding: utf-8 -*- # # Markov Logic Networks # # (C) 2012-2015 by Daniel Nyga # 2006-2011 by Dominik Jain # # 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, inclu...
# Copyright (c) 2009, Peter Sagerson # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # - Redistributions of source code must retain the above copyright notice, this # list of conditions and the ...
from django.db import models # Create your models here. # 订单总表 # `uid` int(11) NOT NULL, # `order_code` varchar(100) NOT NULL, # `total_count` int(11) NOT NULL, # `total_amount` double NOT NULL, # `status` smallint(6) NOT NULL, class Order(models.Model): uid = models.IntegerField(verbose_name="用户id") order_co...
import abc import inspect import sys import six from .._utils import patch_collections_abc MutableSequence = patch_collections_abc('MutableSequence') # pylint: disable=no-init,too-few-public-methods class ComponentRegistry: """Holds a registry of the namespaces used by components.""" registry = set() ...
from django.shortcuts import render from django.contrib.auth.models import User # Create your views here. def home(request): context = { 'title': 'Home' } return render(request, template_name="home/home.html", context=context)
import pytest from peas.types.peer_info import PeerInfo from tests.block_tools import create_block_tools_async from peas.util.ints import uint16 from tests.core.node_height import node_height_at_least from tests.setup_nodes import self_hostname, setup_full_node, setup_full_system, test_constants from tests.time_out_as...
# Copyright 2019 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 agreed to in writing, ...
from tkinter import * from src.window.main_window import MainWindow if __name__ == '__main__': root = Tk() my_gui = MainWindow(root) root.mainloop()
import os import re from loguru import logger from sqlalchemy import Column, Integer, Unicode from flexget import options, plugin from flexget.db_schema import versioned_base from flexget.entry import Entry from flexget.event import event from flexget.manager import Session logger = logger.bind(name='tail') Base = v...
# # 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...
from __future__ import print_function import argparse import torch import torch.nn.parallel import torch.utils.data from torch.autograd import Variable from pointnet.dataset import HDF5_ModelNetDataset, ModelNetDataset from pointnet.model import PointNetCls import torch.nn.functional as F import trimesh import os pars...
## DICTIONARIES # dictionaries are similar to lists: # - both can contain multiple data types # - both are iterable # - both are mutable # dictionaries are different from lists: # - dictionaries are unordered* # - dictionary lookup time is constant regardless of dictionary size # dictionaries are like real dictionar...
#!/usr/bin/python # Import the login_required decorator which can be applied to views # to enforce that the user should be logged in to access the view from django.contrib.auth.decorators import login_required # Import csrf_exempt to bypass csrf protections for ajax requests # TODO: Don't bypass csrf protections fro...
# -*- coding: UTF-8 -*- # !/usr/bin/python # @time :2019/6/12 14:11 # @author :Mo # @function : # 适配linux import pathlib import sys import os project_path = str(pathlib.Path(os.path.abspath(__file__)).parent.parent.parent) sys.path.append(project_path) # 地址 from keras_textclassification.conf.path_...
#!d:\development\github\adoo\env\scripts\python.exe from django.core import management if __name__ == "__main__": management.execute_from_command_line()
"""Simple CLI for FireCrest.""" import json import os import posixpath import tempfile from pathlib import Path from typing import Optional import click import firecrest as f7t import yaml from .transport import FirecrestTransport class Connection: """Connection data FireCrest.""" def __init__(self) -> Non...
#!/usr/bin/env python # -*- coding: utf-8 -*- import argparse import lzma import os.path def convert_line(line): line = line.strip() if line.startswith('[') or line.startswith(','): line = line[1:] if line.endswith(','): line = line[:-1] if line.startswith(']'): return None ...
# hltGetConfiguration --cff --data /dev/CMSSW_10_6_0/Fake1 --type Fake1 # /dev/CMSSW_10_6_0/Fake1/V2 (CMSSW_10_6_0_pre3_HLT1) import FWCore.ParameterSet.Config as cms fragment = cms.ProcessFragment( "HLT" ) fragment.HLTConfigVersion = cms.PSet( tableName = cms.string('/dev/CMSSW_10_6_0/Fake1/V2') ) fragment.stre...
# -*- coding: utf-8 -*- # ----- DEPRECATED PYLINT PLUGIN ------------------------------------------------------------------------------------> # This Pylint plugin is deprecated. Development continues on the SaltPyLint package # <---- DEPRECATED PYLINT PLUGIN ------------------------------------------------------------...
# Copyright 2019 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
from ._os import *
""" Helpers to check minimum version of bazel.""" def _extract_version_number(bazel_version): """Extracts the semantic version number from a version string Args: bazel_version: the version string that begins with the semantic version e.g. "1.2.3rc1 abc1234" where "abc1234" is a commit hash. Returns: ...
# Copyright (c) 2008, Humanized, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditio...
#!/usr/bin/python -tt # -*- coding: utf-8 -*- # (c) 2012, Red Hat, Inc # Written by Seth Vidal <skvidal at fedoraproject.org> # (c) 2014, Epic Games, Inc. # # 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 publi...
import time import json import torch import cpp_extension # noqa: F401 """PyTorch performance microbenchmarks. This module contains PyTorch-specific functionalities for performance microbenchmarks. """ class TorchBenchmarkBase(torch.nn.Module): """ This is a base class used to create Pytorch operator benchmark...
import json import six from cities.models import City, PostalCode, Subregion, Region from django.contrib.gis.db.models.functions import GeomValue from django.contrib.gis.geos import Point from django.db.models.expressions import CombinedExpression, F from django.http import HttpResponse from django.http import HttpRes...
# Copyright 2014 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompa...
import pdf_to_json as p2j import json url = "file:data/multilingual/Beng.BEN/Mono_16/udhr_Beng.BEN_Mono_16.pdf" lConverter = p2j.pdf_to_json.pdf_to_json_converter() lConverter.mImageHashOnly = True lDict = lConverter.convert(url) print(json.dumps(lDict, indent=4, ensure_ascii=False, sort_keys=True))
# -*- coding: utf-8 -*- from __future__ import unicode_literals names = [ 'Womann']
""" plugins for journal """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import abc import logging import time import six _LOGGER = logging.getLogger(__name__) _STEP_BEGIN = 'begin' _STEP_END = 'end' _STEP_ABORT...
from requests import get import matplotlib.pyplot as plt import matplotlib.animation as animation import datetime as dt from pms5003 import PMS5003, ReadTimeoutError as pmsReadTimeoutError fig = plt.figure() ax = fig.add_subplot(1, 1, 1) xs = [] ys =[] pms5003 = PMS5003() def animate(i, xs, ys): try: dat...
# # 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 us...
import csv import json df = open("bridgeData3.csv",'r').readlines() fin = open('final.csv','r').readlines() # Skips the header of the csv finCsv = fin[1:] finalCsv = df[1:] obj = {} # loop through the csv with images for i in finalCsv: x = i.split(',') obj[x[1]] = {'bridge_name':x[0],'proj_code':x[1],'before_i...
# -*- coding: utf8 -*- # Copyright (c) 2017-2021 THL A29 Limited, a Tencent company. 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...
############################################################################### # # The MIT License (MIT) # # Copyright (c) Crossbar.io Technologies GmbH # # 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 ...
# Copyright (c) 2015-2016, Camptocamp SA # All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright notice, this # list of conditions a...
######################## MAX LINE LENGTH OF ABOUT 120 ################################################################## import argparse parser = argparse.ArgumentParser(description="Run the CoNGA clonotype neighbor-graph analysis pipeline") #type is str by default parser.add_argument('--gex_data', help='Input file w...
__version__ = "0.2"
# Copyright (c) OpenMMLab. All rights reserved. import argparse import warnings from functools import partial import mmcv import numpy as np import onnxruntime as rt import torch import torch._C import torch.serialization from mmcv import DictAction from mmcv.onnx import register_extra_symbolics from mmcv.runner impor...
''' Chinese number <=> int/float conversion methods ''' if 'constants': # for code folding CHINESE_DIGIS = '零一二三四五六七八九' BIG_CHINESE_DIGIS_SIMPLIFIED = '零壹贰叁肆伍陆柒捌玖' BIG_CHINESE_DIGIS_TRADITIONAL = '零壹貳參肆伍陸柒捌玖' SMALLER_BIG_CHINESE_UNITS_SIMPLIFIED = '十百千万' SMALLER_BIG_CHINESE_UNITS_TRADITIONAL = '拾...
import pandas as pd def import_data(file, print_head = False): df = pd.read_csv('data/{}.csv'.format(file)) print(file) if print_head == True: print("First few values:") print(df.head()) return df def print_max_close(df): close_prices = df['Volume'] max_close = close_prices.max() print(max_cl...
#!/usr/bin/env python3 import os.path as path from socket import socket, AF_INET, SOCK_STREAM import argparse class Main: def __init__(self): argument_parser = argparse.ArgumentParser() argument_parser.add_argument("--port", "-p", default=2000, type=int, help=...
# -*- coding: utf-8 -*- __author__ = 'Arseniy' from model.group import Group import random import string import os import jsonpickle import getopt import sys try: opts, args = getopt.getopt(sys.argv[1:], "n:f:", ["number of groups", "file"]) except getopt.GetoptError as err: getopt.usage() sys.exit(2) n...
def op_mean(data): return sum(data)/len(data) def op_max(data): return max(data) def op_min(data): return min(data)
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.async_support.base.exchange import Exchange import math from ccxt.base.errors import ExchangeError from ccxt.base.errors import A...
from .logging import log
import math from river import utils from . import base class Min(base.Univariate): """Running min. Attributes ---------- min : float The current min. """ def __init__(self): self.min = math.inf def update(self, x): if x < self.min: self.min = x ...
# Generated by Django 3.2.8 on 2021-11-01 05:17 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('forum', '0003_forumpost_...
import numpy as np from numpy import ndarray from jskim_DNN.utils.np_utils import (assert_same_shape, softmax, normalize, #exp_ratios, unnormalize) class Loss(object): ''' 신경망 모델의 손실을 계산하는 클래스 ''' def __init__(sel...
"""Take huge detailed screenshots of Google Maps.""" from datetime import datetime import os import time import tkinter from PIL import Image import pyscreenshot from selenium import webdriver def create_map(lat_start: float, long_start: float, number_rows: int, number_cols: int, scale...
import django_tables2 as tables from ced_main.models import project_info, documentation, documentation_values, project_query from django_tables2.utils import A from django.utils.safestring import mark_safe class viewprojects_table(tables.Table): # An inline class to provide additional information on the form. ...
from .base import SQLAdapter from . import adapters @adapters.register_for("teradata") class Teradata(SQLAdapter): dbengine = "" drivers = ("pyodbc",) def _initialize_(self): super(Teradata, self)._initialize_() self.ruri = self.uri.split("://", 1)[1] def connector(self): ret...
# coding: utf-8 """ HyperOne HyperOne API # noqa: E501 The version of the OpenAPI document: 0.1.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from h1.configuration import Configuration class StorageS3credential(object): """NOTE: This cl...
r""" Open subset of Euclidian space with coordinates An open subset of Euclidian space with a specific set of coordinates. This is the background on which differential forms can be defined. AUTHORS: - Joris Vankerschaver (2010-07-25) EXAMPLES:: sage: x, y, z = var('x, y, z') sage: S = CoordinatePatch((x, ...
"""A pypi demonstration vehicle. .. moduleauthor:: Andrew Carter <andrew@invalid.com> """ from .parametric_tests import * from .nonparametric_tests import * from scipy.stats import ttest_ind, ttest_rel, wilcoxon, mannwhitneyu __all__ = ['anova_test', 'bonferroni_test', 'binomial_sign_test', ...
#!/usr/bin/env python3 # Copyright (c) 2014-2021 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 fee estimation code.""" from decimal import Decimal import os import random from test_framework.m...
#forma com circular import # from app import app """Extensão Flask""" from flask import Flask, request def init_app(app: Flask): """Inicialização de extensões""" @app.route("/") def index(): print(request.environ['HTTP_USER_AGENT']) return "Esta rodando aguarde" @app.route("/contato...
#! /usr/bin/env python # coding: utf-8 # # Copyright (c) 2019 JR Oakes # # 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,...
import click import logging from pymobiledevice3.cli.cli_common import Command, print_json from pymobiledevice3.lockdown import LockdownClient from pymobiledevice3.services.house_arrest import HouseArrestService from pymobiledevice3.services.installation_proxy import InstallationProxyService from pymobiledevice3.servi...
# Copyright (c) ACSONE SA/NV 2018 # Distributed under the MIT License (http://opensource.org/licenses/MIT). from ..queue import task, getLogger from .. import github from ..github import gh_call _logger = getLogger(__name__) @task() def delete_branch(org, repo, branch, dry_run=False): with github.repository(or...
# -*- coding: utf-8 -*- """ Implementations of optical flow methods.""" from .interface import get_method
"""Viessmann ViCare sensor device.""" import logging import requests from homeassistant.components.sensor import SensorEntity from homeassistant.const import ( CONF_DEVICE_CLASS, CONF_ICON, CONF_NAME, CONF_UNIT_OF_MEASUREMENT, DEVICE_CLASS_TEMPERATURE, ENERGY_KILO_WATT_HOUR, PERCENTAGE, ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Ref: http://doc.qt.io/qt-5/modelview.html#2-1-a-read-only-table import sys from PyQt5.QtGui import QStandardItemModel, QStandardItem from PyQt5.QtWidgets import QApplication, QTreeView if __name__ == '__main__': app = QApplication(sys.argv) tree_view = QTree...
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
"""This module establishes the connection with our Redshift Warehouse""" import psycopg2 from singer.logger import get_logger LOGGER = get_logger() def select_all(conn, query): """creates cursor for psycopg2 to run select statements""" cur = conn.cursor() cur.execute(query) column_specs = cur.fetchal...