text
stringlengths
2
999k
import pandas as pd f = open('../data/booklist.txt','r', encoding='UTF-8') while True: line = f.readline() if not line : break print(line) f.close() user_id, book_id, score = input("사용자 id, 책 id, 평점을 입력해주세요.\n").split(',') print(user_id) print(book_id) print(score) print(line)
#!/usr/bin/env python # Copyright 2014-present Facebook, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
import json import time import unittest from mock import Mock, patch from patroni.dcs.kubernetes import Kubernetes, KubernetesError, k8s_client, RetryFailedError from threading import Thread from . import SleepException def mock_list_namespaced_config_map(*args, **kwargs): metadata = {'resource_version': '1', 'l...
#!/usr/bin/env python # coding=utf-8 """Performs all coverage""" from __future__ import print_function from optparse import OptionParser from pkg_resources import load_entry_point import subprocess import sys from coverage import coverage from diff_coverage import diff_coverage import settings CREATE_XML_REPORT = T...
import fnmatch import glob import os import re import sys from itertools import dropwhile from optparse import make_option from subprocess import PIPE, Popen import django from django.core.management.base import CommandError, NoArgsCommand from django.utils.text import get_text_list from django.utils.jslex import prep...
n = int(input('Digite um numero: ')) cont = 0 for i in range(1, n+1): if n % i == 0: print('\033[1;34m',end=' ') cont +=1 else: print('\033[m',end=' ') print(i,end=' ') if cont == 2: print('\n\033[mPrimo') else: print('\n\033[mNão é Primo')
#!/usr/bin/env python2.7 # Copyright (c) 2013 - present Facebook, Inc. # All rights reserved. # # This source code is licensed under the BSD style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory...
# -*- coding: utf-8 -*- """ jishaku.paginators ~~~~~~~~~~~~~~~~~~ Paginator-related tools and interfaces for Jishaku. :copyright: (c) 2019 Devon (Gorialis) R :license: MIT, see LICENSE for more details. """ import asyncio import collections import re import discord from discord.ext import commands from jishaku.h...
import argparse import numpy as np import random from PIL import Image action_list = [[0, 1], [0, -1], [1, 0], [-1, 0]] def random_walk(canvas, ini_x, ini_y, length): x = ini_x y = ini_y img_size = canvas.shape[-1] x_list = [] y_list = [] for i in range(length): r = random.randint(0, ...
from statsmodels.compat.python import (lrange, iterkeys, iteritems, lzip, itervalues) from collections import OrderedDict import datetime from functools import reduce import re import textwrap import numpy as np import pandas as pd from .table import SimpleTable from .tableform...
# -*- coding: utf-8 -*- # """ MIT License Copyright (c) 2018 Christof Küstner 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, ...
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. """Simple agent which choos...
import tensorrt as trt from torch2trt.torch2trt import * from torch2trt.module_test import add_module_test from .repeat import * from .exview import convert_exview @tensorrt_converter('torch.Tensor.expand') def convert_expand(ctx): old_args = ctx.method_args input = ctx.method_args[0] if isinstance(c...
"""This module contains the general information for StorageNvmeSwitch ManagedObject.""" from ...ucsmo import ManagedObject from ...ucscoremeta import MoPropertyMeta, MoMeta from ...ucsmeta import VersionMeta class StorageNvmeSwitchConsts: LINK_STATUS_DEGRADED = "degraded" LINK_STATUS_DELETED = "deleted" ...
import dataclasses from operator import itemgetter from ...account import models as account_models from ...app import models as app_models from ...attribute import models as attribute_models from ...checkout import models as checkout_models from ...core.exceptions import PermissionDenied from ...core.models import Mod...
import logging import re from collections import defaultdict from . import Analysis from ..knowledge_base import KnowledgeBase from .. import SIM_PROCEDURES from ..codenode import HookNode from ..sim_variable import SimConstantVariable, SimRegisterVariable, SimMemoryVariable, SimStackVariable l = logging.getLogger(...
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "moby_dev_test.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
# Copyright (c) 2020 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 appli...
#!/usr/bin/python # -*- coding: UTF-8 -*- import timeit import numpy as np import sys import random as rand class solutions: def bsearch(self, nums,target): """ 二分查找 :param nums: :param target: :return: """ nums=sorted(nums) left=0 ...
from .recursions.explicit_recursions import * import random import sys ################################################################################################## def backtrack( self, contribs_input, mode = 'mfe' ): ''' modes are: mfe = backtrack, following maximum boltzmann weight. note that thi...
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2020/8/10 23:25 # @Author : Raymound luo # @Mail : luolinhao1998@gmail.com # @File : evluator.py # @Software: PyCharm # @Describe: from sklearn.linear_model import LogisticRegression from sklearn.neighbors import KNeighborsClassifier from sklearn.cluste...
from django.shortcuts import render # Create your views here. from django.views import View from django.http import JsonResponse class CatelloView(View): def post(self, request, *args, **kwargs): return JsonResponse({"ok": "POST request processed"}) def get(self, request, *args, **kwargs): r...
from project.deliveries.product import Product class ProductRepository: def __init__(self): self.products = [] def add(self, product: Product): if product.name in [p.name for p in self.products]: raise ValueError(f'Product {product.name} already exists.') self.products.ap...
import functools import operator import warnings from collections import OrderedDict, defaultdict from contextlib import suppress from typing import Any, Mapping, Optional, Tuple import numpy as np import pandas as pd from . import dtypes, utils from .indexing import get_indexer_nd from .utils import is_dict_like, is...
# Copyright (c) 2008-2015 MetPy Developers. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause """Test the `points` module.""" from __future__ import division import logging import numpy as np from numpy.testing import assert_array_almost_equal from metpy.gridding.poi...
import os from functools import lru_cache from typing import Optional, Tuple, Dict from quarkchain.utils import check from qkchash.qkchash import ( CACHE_ENTRIES, make_cache, qkchash, QkcHashNative, get_seed_from_block_number, ) def get_qkchashlib_path(): """Assuming libqkchash.so is in the s...
import sys import os import numpy as np from PIL import Image, ImageFont, ImageDraw import cv2 def main(file_template, start=0, end=100000): font = ImageFont.truetype("Menlo.ttc", 32) capture = cv2.VideoCapture(0) out = cv2.VideoWriter( "out.mp4", cv2.VideoWriter_fourcc(*"mp4v"), 20.0, (1640, 12...
import pandas as pd import numpy as np # ====================================================================================================================== # Model of distribution system (=cooling grid) CLASS # ========================================================================================================...
''' Created by auto_sdk on 2016.05.24 ''' from top.api.base import RestApi class AlibabaAliqinFcSmsNumSendRequest(RestApi): def __init__(self,domain='gw.api.taobao.com',port=80): RestApi.__init__(self,domain, port) self.extend = None self.rec_num = None self.sms_free_sign_name = None self.sms_param...
# coding: utf-8 """ Influx API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 OpenAPI spec version: 0.1.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six class TaskCreateRequest(o...
# 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 ...
#!/usr/bin/python # # This module 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) any later version. # # This software is distributed in the hope that it ...
import os from sqlalchemy import Column, Integer, String, DateTime, Float from sqlalchemy import create_engine from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker import pandas as pd BASE_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir)) Base = decla...
#!/usr/bin/env python3 import unittest from framework import tag_fixme_vpp_workers from framework import VppTestCase, VppTestRunner from vpp_udp_encap import find_udp_encap, VppUdpEncap from vpp_udp_decap import VppUdpDecap from vpp_ip_route import VppIpRoute, VppRoutePath, VppIpTable, VppMplsLabel, \ VppMplsTable...
from dataclasses import dataclass from joemetry._type_hints import * from .point import * @dataclass class Segment: __slots__ = ['start', 'end'] start: Point end: Point def __post_init__(self): self.start = Point(*self.start) self.end = Point(*self.end) @property def sl...
# -*- coding: utf-8 -*- # Generated by Django 1.11.15 on 2018-09-01 11:02 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Quiz'...
ETH_ADDRESS = "0x0000000000000000000000000000000000000000" WETH9_ADDRESS = "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2" # see: https://chainid.network/chains/ _netid_to_name = { 1: "mainnet", 3: "ropsten", 4: "rinkeby", 56: "binance", 97: "binance_testnet", 137: "polygon", 100: "xdai", } _...
from django_sorcery.db import databases db = databases.get("minimal_backpop") class Asset(db.Model): pk = db.Column(db.Integer(), autoincrement=True, primary_key=True) name = db.Column(db.String(length=5)) order = db.ManyToOne("Order", back_populates="assets") class OrderItem(db.Model): pk = db.C...
import sys import traceback from mapswipe_workers.utils import slack def _get_error_message_details(error): """ The function to nicely extract error text and traceback." Parameters ---------- error : Exception the python exception which caused the error Returns ------- error_m...
"""Facilities for generating error messages during type checking. Don't add any non-trivial message construction logic to the type checker, as it can compromise clarity and make messages less consistent. Add such logic to this module instead. Literal messages, including those with format args, should be defined as con...
#!/usr/bin/env python3 # # __init__.py """ Pure-python implementation of some unicodedata functions. """ # # Based on CPython. # Licensed under the Python Software Foundation License Version 2. # Copyright © 2001-2020 Python Software Foundation. All rights reserved. # Copyright © 2000 BeOpen.com. All rights reserv...
# 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 __al...
#!/usr/bin/python # Copyright (C) 2018 Stephen Farrell, stephen.farrell@cs.tcd.ie # # 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...
import cv2 TYPEMAP = { 'THRESH_BINARY': cv2.THRESH_BINARY, 'THRESH_BINARY_INV': cv2.THRESH_BINARY_INV, 'THRESH_TRUNC': cv2.THRESH_TRUNC, 'THRESH_TOZERO': cv2.THRESH_TOZERO, 'THRESH_TOZERO_INV': cv2.THRESH_TOZERO_INV, } def threshold(src, mode, thresh_type, thresh, maxval): if mode == 'simple'...
import re def arithmetic_arranger(problems, solve=False): if (len(problems) > 5): return "Error: Too many problems." firstline = "" secondline = "" dashes = "" answer = "" arranged_problems = "" for problem in problems: if (re.search("[^\s0-9.+-]", problem)): ...
# noinspection PyUnresolvedReferences from qgis.core import QgsAbstractFeatureSource, QgsFeatureIterator, QgsLogger from .iterator import DjangoFeatureIterator class DjangoFeatureSource(QgsAbstractFeatureSource): def __init__(self, provider, model, qgs_fields, dj_fields, dj_geo_field, crs, is_valid): Qgs...
feuille = [ ["rouge", [1, 3]], ["blanc", [0, 2, 4]], ["rouge", [1, 5]], ["rouge", [0, 4, 6]], ["rouge", [1, 3, 5, 7]], ["rouge", [2, 4, 8]], ["blanc", [3, 7]], ["rouge", [6, 4, 8]], ["blanc", [5, 7]] ] def remplissage(feuille, i, courante): [remplacer, voisins] = feuille[i] feuille[i] = [courante, voisins] ...
def ficha(jog='desconhecido', gol=0): print(f'O jogador {jog} fez {gol} gol(s) no campeonato. ') #Programa principal n = str(input("Nome do jogador: ")) g = str(input("Numero de Gols: ")) if g.isnumeric(): g = int(g) else: g = 0 if n.strip() == '': ficha(gol=g) else: ficha(n,g)
#!coding: utf-8 import os import shutil import textwrap from ..util.compat import u, has_pep3147, get_current_bytecode_suffixes from ..script import Script, ScriptDirectory from .. import util from . import engines from . import provision def _get_staging_directory(): if provision.FOLLOWER_IDENT: return...
"""Available Commands: .mf""" import asyncio from telethon import functions from mafiabot.utils import admin_cmd, sudo_cmd, edit_or_reply from userbot.cmdhelp import CmdHelp @bot.on(admin_cmd(pattern=r"dc")) # pylint:disable=E0602 @bot.on(sudo_cmd(pattern=r"dc", allow_sudo=True)) async def _(event): if event....
# -*- coding:utf-8 -*- # Author: hankcs # Date: 2020-08-11 02:47 from hanlp.common.dataset import SortingSamplerBuilder from hanlp.components.tokenizers.transformer import TransformerTaggingTokenizer from hanlp.datasets.tokenization.sighan2005 import SIGHAN2005_PKU_TRAIN_ALL, SIGHAN2005_PKU_TEST from tests import cdroo...
# *************************************************************** # Copyright (c) 2021 Jittor. All Rights Reserved. # Maintainers: Dun Liang <randonlang@gmail.com>. # This file is subject to the terms and conditions defined in # file 'LICENSE.txt', which is part of this source code package. # ************************...
# -*- coding: utf-8 -*- """ Created on Thu Mar 11 19:26:59 2021 @author: ALEX BACK LONGEST COLLATZ SEQUENCE The following iterative sequence is defined for the set of positive integers: n → n/2 (n is even) n → 3n + 1 (n is odd) Using the rule above and starting with 13, we generate the following seque...
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.response.AlipayResponse import AlipayResponse class AlipayOpenAppSilanApigraythreeQueryResponse(AlipayResponse): def __init__(self): super(AlipayOpenAppSilanApigraythreeQueryResponse, self).__init__() def parse_response_...
import os import pathlib from dotenv import load_dotenv from backend.utils.pUtils import PUtils _current_file_path = pathlib.Path(__file__).parent.absolute() def parse_dotenv(): base_dir = PUtils.bp(_current_file_path, '..', '..') env = PUtils.bp(base_dir, '.env') env_example = PUtils.bp(base_dir, '.en...
from .dbHelper import Sessionmaker, initSessionMaker
""" @Author: NguyenKhacThanh """ from flask import request from flask_restplus import Resource, Namespace from wipm.services import regression as serv_regression from ._requests import regression as req_regression from ._responses import regression as res_regression from ._responses import BASE_RES NS = Namespace("r...
'''This module tests our quadratic discriminant classifier.''' from src.classification.qda import QDA import numpy as np from sklearn.discriminant_analysis import QuadraticDiscriminantAnalysis from sklearn import datasets def test_prior(): '''Check we are computing priors for QDA/LDA correctly.''' output = n...
symbols = [] exports = [{'type': 'function', 'name': 'InstallNTDSProvider', 'address': '0x7ffb19f04b90'}, {'type': 'function', 'name': 'NSPStartup', 'address': '0x7ffb19f05200'}, {'type': 'function', 'name': 'RemoveNTDSProvider', 'address': '0x7ffb19f06860'}]
# Time: O(1) # Space: O(h), h is height of binary tree class TreeNode(object): def __init__(self, x): self.val = x self.left = None self.right = None class BSTIterator(object): # @param root, a binary search tree's root node def __init__(self, root): self.stack = [] ...
from .development import * DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ":memory:", } } EMAIL_BACKEND = 'django.core.mail.backends.locmem.EmailBackend'
#!/usr/bin/env python # -*- coding: utf-8 -*- from Neuron.Neuron import Neuron ## Imports from random import randint class Perceptron(Neuron): def __init__(self, input_range, Validator): self.input_range = input_range super().__init__([ [randint(0, 10) for i in range(2)] ] * self.input_range,...
class Song(object): def __init__(self,lyrics): self.lyrics=lyrics; def sing_me_a_song(self): for line in self.lyrics: print(line) happy_bday=Song(["Happy birthday to you","I don't want to get sued","So,I'll stop right there"] ) bulls_on_parade=Song(["They rally around th...
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. from typing import Dict import pickle import json import os import redis from retriever.entitylinking.entity_linker import EntityLinker from retriever.schema_retriever.client import DenseSchemaRetrieverClient from retriever import utils from retr...
#!/usr/bin/env python # -*- coding: utf-8 -*- """"Airtest图像识别专用.""" import os import sys import time import types from six import PY3 from copy import deepcopy from airtest import aircv from airtest.aircv import cv2 from airtest.core.helper import G, logwrap from airtest.core.settings import Settings as ST # noqa f...
# encoding: utf-8 import os import sys import tkinter as tk from tkinter import ttk, font, messagebox, Image, filedialog import Compi2RepoAux.team21.Analisis_Ascendente.ascendente as parser import webbrowser as wb # from PIL import Image,ImageTk # vscode://vscode.github-authentication/did-authenticate?windowId=1&code=3...
#!/usr/bin/env python3 # -*- coding:utf-8 -*- ### # File: penta_fractal_turtle.py # Project: Sonstige_Uebungen # Created Date: Thursday 28.02.2019, 12:07 # Author: Apop85 # ----- # Last Modified: Friday 01.03.2019, 12:50 # ----- # Copyright (c) 2019 Apop85 # This software is published under the MIT license. # Check htt...
#!/usr/bin/env python3 """An example configuration file """ import sys import os # Assuming the cell order in the metadata tables are the same as those in the gene level matrices # The output knn matrices follow such order as well ka_smooth = 200 knn = 200 date = 200826 # # Configs name = 'mop_2mods_atacrna_{...
#!/usr/bin/env python3 # # MIT License # # (C) Copyright 2021-2022 Hewlett Packard Enterprise Development LP # # 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 w...
"""Base command for grow.""" from grow.deployments.destinations import local as local_destination import click import os import pkg_resources version = pkg_resources.get_distribution('grow').version HELP_TEXT = ('Grow is a declarative file-based website generator. Read docs at ' 'https://grow.dev. This ...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function import os from juriscraper.pacer import InternetArchive from tests import TESTS_ROOT_EXAMPLES_PACER from tests.local.PacerParseTestCase import PacerParseTestCase class PacerParseInternetArchiveReportTest(PacerParseTestCase): """...
# Copyright 2020 IBM 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 in writi...
from functools import lru_cache from typing import Dict, List, Optional, Set, Tuple from collections import OrderedDict from coreapp.models import Asm, Assembly from coreapp import util from coreapp.sandbox import Sandbox from django.conf import settings import json import logging import os from pathlib import Path imp...
import unittest import mock from ...authentication.base import AuthenticationBase from ...exceptions import Auth0Error class TestBase(unittest.TestCase): @mock.patch('requests.post') def test_post(self, mock_post): ab = AuthenticationBase() mock_post.return_value.status_code = 200 mo...
#!/usr/bin/env python3 # Hacked together by / Copyright 2021 Ross Wightman # This file has been modified by Megvii ("Megvii Modifications"). # All Megvii Modifications are Copyright (c) 2014-2021 Megvii Inc. All rights reserved. """Vision Transformer (ViT) ViT: `"An Image is Worth 16x16 Words: Transformers for Image R...
# Copyright (c) 2012, 2013, 2014 Ilya Otyutskiy <ilya.otyutskiy@icloud.com> # Copyright 2020 The Matrix.org Foundation C.I.C. # # 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://ww...
import keras import tensorflow as tf from keras.models import Sequential from keras.layers import Dense, Dropout, Flatten, BatchNormalization, Input, InputSpec, Add, Subtract, Dot from keras.layers import Conv2D, MaxPooling2D from keras import backend as K from keras.callbacks import ModelCheckpoint import os from ker...
"""This module provides useful functions for the MFE package. Attributes: VALID_VALUE_PREFIX (:obj:`str`): Prefix which all tuples that keep valid values for custom user options must use in its name. This prefix is used to enable the automatic detection of these groups. VALID_GROUPS (...
# coding: utf-8 # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: import os from shutil import rmtree from tempfile import mkdtemp from nipype.testing import (assert_equal, skipif, assert_almost_equal, example_data) import nu...
#!/bin/python import sys, numpy, os.path, re import argparse from Bio import SeqIO ''' if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('-l', '--library_file', help="File containing the library report generated by the script prepare_libraries.py") parser.add_argument('-p', '...
#!/usr/bin/env python """ Sentry-Python - Sentry SDK for Python ===================================== **Sentry-Python is an SDK for Sentry.** Check out `GitHub <https://github.com/getsentry/sentry-python>`_ to find out more. """ from setuptools import setup, find_packages setup( name="sentry-sdk", version="...
from e2cnn.gspaces import * from e2cnn.nn import FieldType from e2cnn.nn import GeometricTensor from ..equivariant_module import EquivariantModule import torch import torch.nn.functional as F from typing import List, Tuple, Any import numpy as np __all__ = ["ReLU"] class ReLU(EquivariantModule): def __...
from screenshot_recorder.screenshot_recorder import VideoWindow, VideoConverter, VideoFrameGrabber
"""Constants used by the SmartThings component and platforms.""" from datetime import timedelta import re DOMAIN = "smartthings" APP_OAUTH_CLIENT_NAME = "Home Assistant" APP_OAUTH_SCOPES = ["r:devices:*"] APP_NAME_PREFIX = "homeassistant." CONF_APP_ID = "app_id" CONF_CLOUDHOOK_URL = "cloudhook_url" CONF_INSTALLED_AP...
""" Settings specific to environment behind dev.volontulo.pl. """ # pylint: skip=file from .base import * # Extra settings go here: ANGULAR_ROOT = 'https://dev.volontulo.pl' SYSTEM_DOMAIN = 'dev.volontulo.pl'
# -*- 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.base.exchange import Exchange import hashlib from ccxt.base.errors import ExchangeError from ccxt.base.errors import ArgumentsReq...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
# Telegram spamer by Oleg Sazonov # Здесь идет ипморт необходимых функций для работы спамера from telethon import TelegramClient, connection from telethon.tl.functions.messages import ImportChatInviteRequest, SendMessageRequest from telethon.tl.functions.channels import JoinChannelRequest from telethon.errors import Us...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2013 New Dream Network, LLC (DreamHost) # # 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/li...
import salt.modules.win_certutil as certutil from tests.support.mixins import LoaderModuleMockMixin from tests.support.mock import MagicMock, patch from tests.support.unit import TestCase class CertUtilTestCase(TestCase, LoaderModuleMockMixin): def setup_loader_modules(self): return {certutil: {}} de...
from __future__ import unicode_literals import copy import datetime from django.db import models from django.utils.functional import curry from django.utils.translation import ugettext_lazy as _ from django.conf import settings from audit_log.models.fields import LastUserField from audit_log import settings as local_...
#!/usr/bin/env python """ This script extracts all strings from a supplied PDF file. Running strings against PDF files is not always helpful, because interesting values like URLs and JavaScript can be encoded so they are not human-readable. This script works around that by first decoding all text inside of t...
#!/usr/bin/env python import Command import recalboxFiles from generators.Generator import Generator import os.path import glob class DosBoxGenerator(Generator): def getResolution(self, config): return 'default' # Main entry of the module # Return command def generate(self, system, rom, ...
# Licensed to the StackStorm, Inc ('StackStorm') 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 use th...
# Copyright (c) 2012-2021, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. # # *** Do not modify - this file is autogenerated *** # Resource specification version: 31.0.0 from troposphere import Tags from . import AWSObject, AWSProperty class Application(AWSObject): reso...
import os from dramatiq.middleware import TimeLimit def path_to(*paths): return os.path.join( os.path.dirname(os.path.dirname(os.path.abspath(__file__))), *paths, ) # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/1.11/howto/deployment/c...
import torch import torch.nn as nn import torch.nn.functional as F class BioLinear(nn.Module): def __init__( self, in_features: int, out_features: int, bias: bool = False, delta: float = 0.05, ranking_param: int = 2, lebesgue_p: int = 3, ...
from conflowgen.domain_models.data_types.mode_of_transport import ModeOfTransport from conflowgen.domain_models.distribution_repositories.mode_of_transport_distribution_repository import \ ModeOfTransportDistributionRepository #: This mode of transport distribution is based on the report #: :cite:p:`isl.2015.umsch...
from django.shortcuts import render, redirect, get_object_or_404 from .models import * from django.contrib.auth.mixins import LoginRequiredMixin from django.views.generic import ListView, DetailView, View from .models import * from .forms import * from django.utils import timezone from django.contrib import messages fr...
""" functions.py - Miscellaneous functions with no other home Copyright 2010 Luke Campagnola Distributed under MIT/X11 license. See license.txt for more information. """ from __future__ import division import decimal import math import re import struct import sys import warnings from collections import OrderedDict ...