text
stringlengths
2
999k
# -*- coding: utf-8 -*- from distutils.core import setup setup( name = 'ta', packages = ['ta'], version = '0.5.8', description='Technical Analysis Library in Python', long_description='It is a Technical Analysis library to financial time series datasets. You can use to do feature engineering. It is ...
# -------------------------------------------------------- # SiamMask # Licensed under The MIT License # Written by Qiang Wang (wangqiang2015 at ia.ac.cn) # -------------------------------------------------------- from __future__ import division import argparse import logging import numpy as np import cv2 from PIL impo...
# Copyright 2018 Braxton Mckee # # 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 t...
from libs import embed class UI: def __init__(self, loop, edit_msg, msg): self.embed = makeEmbed(msg.embeds[0]) def update(self): # _update(self.message, self.getEmbed()) # self.loop.call_soon(self._update, self.message, self.getEmbed()) self.loop.create_task(self.edit_message...
# Generated by Django 2.2.1 on 2019-12-10 15:14 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('photeo', '0002_contestant_facebook_url'), ] operations = [ migrations.RemoveField( model_name='contestant', name='gmail_user...
import sys from tkinter import * class HelloClass: def __init__(self): widget = Button(None, text = 'hello event world', command = self.quit) widget.pack() def quit(self): print('Hello class method world') sys.exit() if __name__ == '__main__': HelloClass() mainloop(...
# from django.shortcuts import render # Create your views here. # from django.http import HttpResponseRedirect from django.shortcuts import redirect from django.urls import reverse from django.views.generic import CreateView from cart.cart import Cart from .forms import OrderCreateForm from .models import Item, Orde...
#!/usr/bin/env python """ Ruler component pulls all actions from Site-FE and applies these rules on DTN Copyright 2017 California Institute of Technology 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 o...
# -*- coding: utf-8 -*- """Permissions module. It is very important to protect core functionality with granular authorization to avoid accidental leaks or cross-contamination. Example: # Restrict access to profiles. if not (AccessProfilePermission(username).can()): raise Unauthorized('No permission ...
#!/usr/bin/env python import logging class Log(object): def __init__(self): self.logger =
""" Unit test for the solver printing behavior. """ import os import sys import unittest import numpy as np import openmdao.api as om from openmdao.test_suite.components.double_sellar import SubSellar from openmdao.test_suite.components.sellar import SellarDerivatives from openmdao.utils.general_utils import run_mo...
#!/usr/bin/env python # coding=utf-8 # Copyright The HuggingFace Team and The HuggingFace Inc. team. 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.ap...
""" Loss Development ================ """ import numpy as np import pandas as pd import copy import warnings from sklearn.base import BaseEstimator, TransformerMixin from chainladder import WeightedRegression from chainladder.core import IO class DevelopmentBase(BaseEstimator, TransformerMixin, IO): @staticmethod...
# Copyright 2015 Diamond Light Source 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 t...
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.response.AlipayResponse import AlipayResponse class AlipayOpenMiniTemplatemessageUsertemplateApplyResponse(AlipayResponse): def __init__(self): super(AlipayOpenMiniTemplatemessageUsertemplateApplyResponse, self).__init__() ...
import datetime as dt import pymongo from bson.codec_options import CodecOptions from . import constants, settings from .caching import cache SORT_KEY = [ ("blockNumber", pymongo.ASCENDING), ("transactionIndex", pymongo.ASCENDING), ("logIndex", pymongo.ASCENDING), ] client = pymongo.MongoClient(setting...
# coding: utf-8 # Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. import oci from oci_cli.cli_clients import CLIENT_MAP from oci_cli.cli_clients import MODULE_TO_TYPE_MAPPINGS from oci.waas import WaasClient MODULE_TO_TYPE_MAPPINGS["waas"] = oci.waas.models.waas_type_mapping CLIENT_MAP["w...
from collections import deque import sys input = sys.stdin.readline sys.setrecursionlimit(10**8) def main(): n = int(input()) graph = [[] for _ in range(n)] for _ in range(n-1): a,b,w = map(int,input().split()) a -= 1 b -= 1 graph[a].append((b,w)) graph[b].append((a...
#pegar o comprimento de tres retas e ver se é possivel montar um triangulo reta1 = float(input('Qual a medida da primeira reta? ')) reta2 = float(input('Qual a medida da segunda reta? ')) reta3 = float(input('Qual a medida da terceira reta? ')) if reta3 < reta2+reta1 and reta2 < reta3+reta1 and reta1 < reta2+reta3: ...
import functools import os import random import warnings from collections import OrderedDict from datetime import datetime import numpy as np import torch import torch.backends.cudnn as torchcudnn from openpyxl import load_workbook, Workbook from thop import profile from torch.autograd.variable import Variable class...
# --- # jupyter: # jupytext: # cell_metadata_filter: all,-execution,-papermill,-trusted # text_representation: # extension: .py # format_name: percent # format_version: '1.3' # jupytext_version: 1.11.5 # kernelspec: # display_name: Python 3 (ipykernel) # language: python # ...
list1=[11,2,3,4,4,786,2,2,122,27] i=0 while (i<len(list1)-1): if list1[i]>list1[i+1]: list1[i],list1[i+1]=list1[i+1],list1[i] i=0 else: i+=1 print(list1)
#!/usr/bin/env python # -*- coding: utf-8 -*- import simplejson as json from alipay.aop.api.FileItem import FileItem from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.KoubeiCateringPosStallQueryModel import KoubeiCateringPosStallQueryModel class KoubeiCateringPosStallQueryRequest(obje...
#!/usr/bin/env python # encoding: utf-8 # # Copyright (c) 2009 Doug Hellmann All rights reserved. # """ """ #end_pymotw_header import sys import sys_shelve_importer def show_module_details(module): print ' message :', module.message print ' __name__ :', module.__name__ print ' __package__:', modul...
#!/usr/bin/env python # -*- coding: utf-8 -*- # A general purpose file including several blanket functions to simplify Project # Euler code import numpy import math import cProfile import pstats import StringIO def prime(n): return filter(lambda num: (num % \ numpy.arange(2, 1+int(math.sqrt(num)))).all(),...
import datetime from haystack import indexes from .models import Post class PostIndex(indexes.SearchIndex, indexes.Indexable): text = indexes.CharField(document=True, use_template=True) title = indexes.CharField(model_attr='title') entry = indexes.CharField(model_attr='entry') category = indexes.CharField(model_at...
from setuptools import setup, find_packages setup( name = "artisan", version = "0.0.2", packages = find_packages(), scripts = [], install_requires = [ "python-faker >= 0.2.4", ], package_data = { 'src/artisan': ['*.py'], }, # metadata for upload to PyPI author ...
from .models.pages import _paginate from django.shortcuts import render from wagtail.wagtailcore.models import Page from wagtail.wagtailsearch.models import Query def search(request): # Search search_query = request.GET.get('q', None) if search_query: queryset = Page.objects.live().search(search_...
from builtins import object from uptune.opentuner.resultsdb.models import CompressedPickler from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.ext.declarative import declared_attr from sqlalchemy.orm import scoped_session, sessionmaker from sqlalchemy import create_engine from sqlalchemy.orm import...
import numpy as np from ..visualization import Viewer from ..utils import Subject, Observer import copy class Clipping(object): class __Flip(object): def __init__(self): self.x = False self.y = False self.z = False def __init__(self): self.min_x = None ...
# -------------- # Importing header files import numpy as np # Path of the file has been stored in variable called 'path' #New record new_record=[[50, 9, 4, 1, 0, 0, 40, 0]] #Code starts here data=np.genfromtxt(path,delimiter=",",skip_header=1) new_record=np.array(new_record) census=np.concatenate((...
import _plotly_utils.basevalidators class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__( self, plotly_name='showlegend', parent_name='scattergl', **kwargs ): super(ShowlegendValidator, self).__init__( plotly_name=plotly_name, parent_n...
from django.contrib.auth import get_user_model from django.contrib.auth.forms import UserCreationForm User = get_user_model() class CreationForm(UserCreationForm): class Meta(UserCreationForm.Meta): model = User fields = ("first_name", "last_name", "username", "email")
""" > Text Extension https://www.file-extensions.org/filetype/extension/name/text-files """ def is_image(ext): ext = ext.lower() img_ext_list = ['.jpg', '.png', '.gif', '.nef', '.webp', '.tiff', '.psd', '.raw', '.bmp', '.heif', '.indd', '.jpeg 2000'] if ext in img_ext_list: ret...
# # PySNMP MIB module ZHONE-COM-VIDEO-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ZHONE-COM-VIDEO-MIB # Produced by pysmi-0.3.4 at Wed May 1 15:47:20 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default...
# coding=utf-8 # -*- coding: utf-8 -*- # visual.py # =====================================4 # This file contains components for the qt # to establish visual outputs of price data # loop result and strategy optimization # results as well # ====================================== import mplfinance as mpf from mplfinance...
""" Sandbox Panel Estimators References ----------- Baltagi, Badi H. `Econometric Analysis of Panel Data.` 4th ed. Wiley, 2008. """ from functools import reduce import numpy as np from statsmodels.regression.linear_model import GLS __all__ = ["PanelModel"] from pandas import Panel def group(X): """ Retu...
""" The MIT License (MIT) Copyright (c) 2015-present Rapptz 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, modify, merg...
#!/usr/bin/env python # coding=utf-8 # Copyright 2020 The HuggingFace Inc. team. 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/LI...
from pathlib import Path from typing import Union import gfworkflow from gfworkflow import R, logger, core def version_method(): logger.info(f'{R.string.program_name} v{R.string.version}') pass def clear_log_method(): gfworkflow.clear_log() def dump_log_method(dst: Union[str, Path]): gfworkflow.d...
import cv2 import sys import os.path from glob import glob def detect(filename, cascade_file="./lbpcascade_animeface.xml"): if not os.path.isfile(cascade_file): raise RuntimeError("%s: not found" % cascade_file) cascade = cv2.CascadeClassifier(cascade_file) image = cv2.imread(filename)...
# -*- coding: utf-8 -*- import lightcrafter as lcr import time # Generate lightcrafter object and try to connect to it dev = lcr.Lightcrafter(_isCheckOnly=False, _logLevel=3) res = dev.connect() if res[0] is not lcr.ERROR.OK: # No connection exit() # Set LED enables (ON/OFF) # See method in lightcrafter pkg to u...
# $Id$ # # Copyright (C) 2007 Greg Landrum # All Rights Reserved # import copy class pySparseIntVect(object): """ this class is pretty much obsolete (it's in C++ now) """ size=0 container={} def __init__(self,size): self.size=size self.container={} def UpdateFromSequence(self,seq): """ >>...
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "SampleDjango.settings") try: from django.core.management import execute_from_command_line except ImportError: # The above import may fail for some other reason. Ensure that...
import os import sys import importlib from unittest import mock import importlib_metadata import pytest import mlflow from mlflow.utils._capture_modules import _CaptureImportedModules from mlflow.utils.requirements_utils import ( _is_comment, _is_empty, _is_requirements_file, _strip_inline_comment, ...
"""Session class and utility functions used in conjunction with the session.""" from .session import Session from .session_manager import SessionManager from .utils import get_generator from .utils import get_type_from_ring __all__ = ["Session", "SessionManager", "get_type_from_ring", "get_generator"]
import discord from discord.ext import commands from datetime import datetime from NHentai import NHentai class cat_nhentai(commands.Cog, name="NHentai Commands"): """Documentation""" def __init__(self, bot): self.bot = bot self.nhentai = NHentai() @commands.command(name="nh_find", help=...
# if this is running from the scripts folder, move up a folder. import os, sys if not 'server.py' in os.listdir('.') and 'scripts' in os.listdir('..'): os.chdir('..') sys.path.append('.') import urllib, zipfile, sys, os, ip2country # url = 'http://public.zjt3.com/uberserver/deps.zip' # site down url = 'http://lunix...
""" ASGI config for ResonantGeoData project. It exposes the ASGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.0/howto/deployment/asgi/ """ import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJAN...
from mindsdb.api.mongo.classes import Responder import mindsdb.api.mongo.functions as helpers class Responce(Responder): when = {'getLog': helpers.is_true} result = { "log": [], "ok": 1 } responder = Responce()
from project.drink.drink import Drink class Tea(Drink): __DEFAULT_PRICE = 2.5 def __init__(self, name, portion, brand): super().__init__(name, portion, self.__DEFAULT_PRICE, brand)
# generate toy events # generate 1D gaussians for input features # we also test event number functionality needed for ATLAS reweighting import csv import numpy as np def make_sample(mu=0.,sigma=1.,nevents=1000,start_eventnumber=1): s = np.random.normal(mu, sigma, nevents) # toy event index: enum = np.aran...
#!/usr/bin/env python # encoding: utf-8 """ @version: ?? @author: liangliangyy @license: MIT Licence @contact: liangliangyy@gmail.com @site: https://www.lylinux.net/ @software: PyCharm @file: urls.py @time: 2016/11/12 下午3:03 """ from django.urls import path from . import views app_name = "comments" urlpatterns = [ ...
# !/usr/bin/env python3 # coding: utf-8 import pymysql import settings conn = pymysql.connect( host=settings.MYSQL_HOST, port=int(settings.MYSQL_PORT), user=settings.MYSQL_USERNAME, password=settings.MYSQL_PASSWORD, db=settings.MYSQL_DB, charset=settings.MYSQL_CHARSET, ) __all__ = ['conn']
__author__ = 'Muhammad Abdullah Mughal' __website__ = 'https://www.iabdullahmughal.com' __twitter__ = '@iabdullahmughal' from config.common import CONFIG_FILE import configparser class Configuration: def __init__(self): self.__config__ = configparser.ConfigParser() self.__config__.read(CONFIG_FILE...
# Copyright (c) Facebook, Inc. and its affiliates. """ MultiDatasetLoader class is used by DatasetLoader class to load multiple datasets and more granular """ import logging import warnings import numpy as np from mmf.utils.build import build_dataloader_and_sampler, build_dataset from mmf.utils.distributed import ( ...
# Copyright 2015 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
from flask import render_template from . import main from ..request import get_sources, get_news, get_category @main.route('/') def index(): ''' method to route the main newws in the app ''' # having the new category general_news = get_sources( 'general' ) business_news = get_sources('business...
# coding: utf8 from __future__ import unicode_literals import os import warnings import inspect def add_codes(err_cls): """Add error codes to string messages via class attribute names.""" class ErrorsWithCodes(object): def __getattribute__(self, code): msg = getattr(err_cls, code) ...
from collections import defaultdict import pandas as pd from parse_mesh import parse_file from parse_drugbank import map_dbids def read_umls(fname): """Read through MRCONSO.RRF and extract relevant info. Currently extracted information: 1. DrugBank ID 2. MeSH ID 3. UNII Other da...
"""Unit tests for semi-supervised episode iterator. Author: Mengye Ren (mren@cs.toronto.edu) """ from __future__ import (absolute_import, division, print_function, unicode_literals) import tensorflow as tf import unittest from fewshot.data.datasets.omniglot import OmniglotDataset from fewshot...
import os import pytest from compose.cli.colors import AnsiMode from tests import mock @pytest.fixture def tty_stream(): stream = mock.Mock() stream.isatty.return_value = True return stream @pytest.fixture def non_tty_stream(): stream = mock.Mock() stream.isatty.return_value = False return...
#!/usr/bin/env python # -*- coding: utf-8 -*- import binascii import time import traceback import serial import ind903_reader.ind903_packet as ind903Packet from reader import reader Ind903Packet = ind903Packet.Ind903Packet; class DeviceException(Exception): pass class ReadException(Exception): pass cl...
# coding=utf-8 # -------------------------------------------------------------------------- # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. # -------------------------------------------------------------------------- from ...
""" AIO -- All Model in One """ import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable from torch.nn.parameter import Parameter from torch.nn.init import xavier_uniform, xavier_normal, orthogonal from models.subNets.AlignNets import AlignSubNet from models.singleTask imp...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Usuario', fields=[ ('id', models.AutoField(verb...
# Copyright (c) 2017 AT&T Intellectual Property. 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 # ...
# --------------------------------------------------------------- # gradcheck.py # Set-up time: 2020/4/16 下午9:57 # Copyright (c) 2020 ICT # Licensed under The MIT License [see LICENSE for details] # Written by Kenneth-Wong (Wenbin-Wang) @ VIPL.ICT # Contact: wenbin.wang@vipl.ict.ac.cn [OR] nkwangwenbin@gmail.com ...
# -*- coding: utf-8 -*- # # Copyright 2018 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
#!/usr/bin/python3 import requests import json import jsonrpc import rlp import time from flask import Flask, request, jsonify from flask_restful import Resource, Api from pycoin.serialize import b2h, h2b from pycoin import encoding from ethereum import utils, abi, transactions import requests import json import jso...
# Generated by Django 3.0.5 on 2021-04-22 10:01 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('base', '0002_tokenstuff'), ] operations = [ migrations.AlterField( model_name='tokenstuff', name='time', ...
#!/usr/bin/env python3 from cli import * from . import * def main(): cli_find_conf_dir() wrap_main(main)
# coding: utf-8 # In[1]: import pandas as pd import numpy as np import gc from utils import * # In[3]: train_active = pd.read_csv("../input/train_active.csv") test_active = pd.read_csv("../input/test_active.csv") train_periods = pd.read_csv("../input/periods_train.csv", parse_dates=['date_from', 'date_to']) test...
"""Visualization tools""" from __future__ import absolute_import from .image import plot_image from .bbox import plot_bbox from .keypoints import plot_keypoints from .mask import expand_mask, plot_mask from .segmentation import get_color_pallete, DeNormalize
# Helper functions for interfacing with the Lua sandbox for executing Lua # macros in Wikitext (Wiktionary, Wikipedia, etc.) # # Copyright (c) Tatu Ylonen. See file LICENSE and https://ylonen.org import os import re import html import json import traceback import unicodedata import pkg_resources #from lru import LRU ...
#!/usr/bin/env python # coding: utf8 #from gluon import * import shops_lib # берем адреса на возврат или выплату из таблицы и # формируем send_many # комиссию тут не учитываем - не вычитаем ! - при создании записей на возврат это надо делать?? def return_refused(db, curr, xcurr, conn, curr_block, table): ...
import os from setuptools import setup install_requires = [ 'django' ] def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup( name='django_abstract_related_model', version='0.1.1', description="Workaround for related abstract models issue.", url='https://g...
# -*- coding: utf-8 -*- from __future__ import print_function, division, absolute_import, unicode_literals from os.path import join import warnings import pytest from xdoctest import runner from xdoctest import core from xdoctest import exceptions from xdoctest import utils # def _check_syntaxerror_behavior(): # ...
""" Define a set of scaled unit symbols to make the code more clear All numerical values are expressed in unscaled units--V, A, s, etc. (except where otherwise specified). To improve readability, we define a set of symbols that allow physical values to be written with scaled units. For example, `10*mV` is equivalent t...
# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/master/config # -- Path setup ------------------------------------------------------------...
# Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from dashboard.pinpoint.models import isolated from dashboard.pinpoint.models.quest import execution from dashboard.pinpoint.models.quest import quest clas...
#!/usr/bin/env python3 # Copyright (c) 2016 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 the dumpwallet RPC.""" import os from test_framework.test_framework import BitcoinTestFramework from ...
from ... pyaz_utils import _call_az def add(name, resource_group, subnet, vnet, skip_delegation_check=None, slot=None): ''' Add a regional virtual network integration to a webapp Required Parameters: - name -- name of the web app. If left unspecified, a name will be randomly generated. You can configu...
from setuptools import setup, find_packages setup( name="sippy-async", version="2021.4.1.post2", py_modules=["sippy_async"], packages=find_packages("src"), package_dir={"": "src"}, install_requires=[ "anyio==3.0.1" ], entry_points={ } )
# Copyright (c) 2018, MD2K Center of Excellence # - Alina Zaman <azaman@memphis.edu> # 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 copy...
#!/usr/bin/env python from big_ol_pile_of_manim_imports import * from once_useful_constructs.light import * import types import functools LIGHT_COLOR = YELLOW INDICATOR_RADIUS = 0.7 INDICATOR_STROKE_WIDTH = 1 INDICATOR_STROKE_COLOR = WHITE INDICATOR_TEXT_COLOR = WHITE INDICATOR_UPDATE_TIME = 0.2 FAST_INDICATOR_UPD...
import numpy as np from copy import copy from struct import Struct from . import nortek2_lib as lib dt32 = 'float32' dt64 = 'float64' grav = 9.81 # The starting value for the checksum: cs0 = int('0xb58c', 0) def _nans(*args, **kwargs): out = np.empty(*args, **kwargs) if out.dtype.kind == 'f': out[:]...
""" Tests for Django's bundled context processors. """ from django.test import SimpleTestCase, TestCase, override_settings @override_settings( ROOT_URLCONF='context_processors.urls', TEMPLATES=[{ 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'APP_DIRS': True, 'OPTIONS':...
"""Pritunl plugin for Let's Encrypt client""" import pymongo from pymongo import MongoClient import json import re import os import subprocess import logging import zope.component import zope.interface from letsencrypt import interfaces from letsencrypt.plugins import common logger = logging.getLogger(__name__) clas...
# Copyright (c) AIRBUS and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from __future__ import annotations import pickle from skdecide.discrete_optimization.generic_tools.do_mutation import Mutation from skdecide.discrete_...
from __future__ import absolute_import from lintreview.review import Problems from lintreview.review import Comment from lintreview.tools.checkstyle import Checkstyle from lintreview.utils import in_path from unittest import TestCase from unittest import skipIf from nose.tools import eq_, assert_in checkstyle_missing ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """The setup script.""" from setuptools import setup, find_packages with open('README.rst') as readme_file: readme = readme_file.read() with open('HISTORY.rst') as history_file: history = history_file.read() requirements = [ ] setup_requirements = [ ] test_re...
#! /usr/bin/python3 print("content-type: text/html") print() import cgi import subprocess as sp fs = cgi.FieldStorage() #--- choice = fs.getvalue("choice") #--- show_pv = fs.getvalue("show_pv") #--- show_vg = fs.getvalue("show_vg") #--- show_lv = fs.getvalue("show_lv") #--- create_pv = fs.get...
""" This module provides data loaders and transformers for popular vision datasets. """ from . import transforms from . import batchify from .imagenet.classification import ImageNet, ImageNet1kAttr from .dataloader import DetectionDataLoader, RandomTransformDataLoader from .pascal_voc.detection import VOCDetection from...
#!/usr/bin/env python from __future__ import print_function import re import sys from pwnlib.util import safeeval python = open(sys.argv[1], "w") header = open(sys.argv[2], "w") print('from pwnlib.constants.constant import Constant', file=python) data = sys.stdin.read().strip().split('\n') res = "" regex = re.com...
import traceback def one(a, b): return two(b, a) def two(x, y): traceback.print_stack() print(traceback.format_stack()) def three(): print(one(1, 1)) three()
"""distutils.cygwinccompiler Provides the CygwinCCompiler class, a subclass of UnixCCompiler that handles the Cygwin port of the GNU C compiler to Windows. It also contains the Mingw32CCompiler class which handles the mingw32 port of GCC (same as cygwin in no-cygwin mode). """ # problems: # # * if you use a msvc com...
"""Delete RAW files in a folder depending on their occurence as a JPG file. Use on your own risk. Example: $ python fileOps.py /path/to/imagefolder/ Martin Schlecker schlecker@mpia.de Dec 3, 2017 """ import os import sys def deleteRaw(path): """ Delete the .raw files that do not have a corresponding '.jpg' fi...
"""The dlib_face_identify component."""
''' MIT License Copyright (c) 2021 Caio Alexandre 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, modify, merge, publish...