text
stringlengths
2
999k
# -*- coding: utf-8 -*- import os import sys sys.path.insert(0, os.path.abspath('..')) ## noqa import securedrop_api on_rtd = os.environ.get('READTHEDOCS', None) == 'True' project = 'securedrop_api' copyright = '2018, heartsucker' author = 'heartsucker' version = securedrop_api.__version__ release = version extens...
import os from urllib.request import urlretrieve import pandas as pd FREMONT_URL = 'https://data.seattle.gov/api/views/65db-xm6k/rows.csv?accessType=DOWNLOAD' def get_fremont_data(filename='Fremont.csv', url=FREMONT_URL, force_download=False): """Download and cache the fremont data Parameters ----------...
from random import randint game_over = False wins_player = 0 wins_computer = 0 win_amount = 3 while not game_over: print("...Rock...") print('...Paper...') print('...Scissors...') player_1_choice = input("Enter your choice: ").lower() player_2_choice = randint(1, 3) if player_2_choice == 1: ...
#!/usr/bin/python # -*- coding: utf-8 -*- # thumbor imaging service # https://github.com/thumbor/thumbor/wiki # Licensed under the MIT license: # http://www.opensource.org/licenses/mit-license # Copyright (c) 2011 globo.com timehome@corp.globo.com from thumbor.storages import BaseStorage from tornado.concurrent impo...
""" ========================== Setting up a Custom Corpus ========================== >>> import os, os.path >>> path = os.path.expanduser('~/nltk_data') >>> if not os.path.exists(path): ... os.mkdir(path) >>> os.path.exists(path) True >>> import nltk.data >>> path in nltk.data.path True >>> nltk.data.load('corpora/c...
""" Example 5-3, pg 191 - Generating Shakespeare via LSTMs The training dataset for this example is provided by the Complete Works of William Shakespear (http://www.gutenbarg.org/ebooks/100) All code is written to run on Tensorflow 2 using the embedded Keras API. The original Java code is found at http://bit...
def choose_manager_type(): MarketingFirm
# # PySNMP MIB module PDN-MPE-DEVICE-CONTROL-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/PDN-MPE-DEVICE-CONTROL-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 20:30:19 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version ...
import numpy as np import matplotlib.pyplot as plt import vplot import sys import scipy.signal as sig #plt.rcParams["text.usetex"]=True #plt.rcParams["text.latex.unicode"]=True # Check correct number of arguments if (len(sys.argv) != 2): print('ERROR: Incorrect number of arguments.') print('Usage: '+sys.argv[0...
# Generated by Django 3.0.5 on 2020-04-23 21:38 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("function_views", "0005_remove_user_facebook_profile"), ] operations = [ migrations.RenameField( model_name="user", old_name=...
""" Configuration for docs """ # source_link = "https://github.com/[org_name]/ssk_emart_customizations" # headline = "App that does everything" # sub_heading = "Yes, you got that right the first time, everything" def get_context(context): context.brand_html = "SSK Emart"
from django.contrib.auth import get_user_model from django.test import TestCase from django.urls import reverse from rest_framework import status from rest_framework.test import APIClient CREATE_USER_URL = reverse('user:user-register') LOGIN_URL = reverse('user:user-login') ME_URL = reverse('user:me') def create_use...
import os import pymongo.database mongo_client = pymongo.MongoClient(host=os.getenv('MONGO_ADDRESS'), port=27017) db: pymongo.database.Database = mongo_client.example_app
"""Auto-generated file, do not edit by hand. EE metadata""" from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata PHONE_METADATA_EE = PhoneMetadata(id='EE', country_code=372, international_prefix='00', general_desc=PhoneNumberDesc(national_number_pattern='[3-9]\\d{6,7}|800\\d{6,7}', possible_len...
print('======= DESAFIO 07 =======') n1 = float(input('Nota 1: ')) n2 = float(input('Nota 2: ')) m = (n1+n2)/2 print('A média do aluno foi {:.1f}!'.format(m))
import cv2 import numpy as np import math import sys, time # Interpolation kernel def u(s,a): if (abs(s) >=0) & (abs(s) <=1): return (a+2)*(abs(s)**3)-(a+3)*(abs(s)**2)+1 elif (abs(s) > 1) & (abs(s) <= 2): return a*(abs(s)**3)-(5*a)*(abs(s)**2)+(8*a)*abs(s)-4*a return 0 #Paddnig def paddin...
from flask import Flask from flask_bootstrap import Bootstrap from config import config_map bootstrap = Bootstrap() # Initialize the extension def create_app(config_name): app = Flask(__name__) # Creating the app configurations app.config.from_object(config_map[config_name]) config_map[config_name].init_app(ap...
# -*- coding: utf-8 -*- """ Dashboards @copyright: 2016-2021 (c) Sahana Software Foundation @license: MIT @requires: U{B{I{gluon}} <http://web2py.com>} Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Softw...
import sqlite3 # ===================================== # dbfile = "/pstore/data/cadd/awalem1/MMP_TransformationSpace/sureChEMBL/MERGINGTHEDATA/ANALYSIS/SQLITE_TABLES/transformationDBr3.sqlitdb" # conn = sqlite3.connect(dbfile) # cursor = conn.cursor() # rows = cursor.execute("select * from fragment_smi") # d = {} # f...
# Generated by Django 3.0.8 on 2020-07-16 14:18 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), ('catalog', '0001_initial'...
from telethon.tl import functions from telethon.tl.functions.messages import GetFullChatRequest from telethon.errors import ( ChannelInvalidError, ChannelPrivateError, ChannelPublicGroupNaError, ) from telethon.tl.functions.channels import GetFullChannelRequest from userbot.events import register from user...
from sqlalchemy import create_engine import tushare as ts df = ts.get_latest_news() engine = create_engine('mysql://root:Liaobi()7595k@10.20.116.107/CN_BASSOON?charset=utf8') df.to_sql('stock_news', engine, if_exists='append')
# Copyright (c) 2019, NVIDIA CORPORATION. import warnings import cudf from cuspatial._lib.trajectory import ( cpp_derive_trajectories, cpp_subset_trajectory_id, cpp_trajectory_distance_and_speed, cpp_trajectory_spatial_bounds, ) warnings.warn("Duplicates cuDF functionality", DeprecationWarning) de...
import random import time import string import requests import logging from threading import Thread import time import datetime import random # Import Detection From Stealth from .stealth import stealth from .get_acrawler import get_acrawler from playwright import sync_playwright playwright = None def get_playwrig...
"""Tests for runway.cfngin.hooks.acm.""" # pylint: disable=no-self-use,protected-access,unused-argument from datetime import datetime import boto3 import pytest from botocore.exceptions import ClientError from botocore.stub import ANY, Stubber from mock import MagicMock from troposphere.certificatemanager import Certi...
from chainer.training.triggers import interval from chainer.training.triggers import minmax_value_trigger IntervalTrigger = interval.IntervalTrigger MaxValueTrigger = minmax_value_trigger.MaxValueTrigger MinValueTrigger = minmax_value_trigger.MinValueTrigger
# Copyright 2020 The SQLFlow 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 applicable law o...
import math import numpy as np from selfdrive.config import Conversions as CV from selfdrive.car.hyundai.values import Buttons from selfdrive.controls.lib.lane_planner import TRAJECTORY_SIZE from common.numpy_fast import clip, interp import cereal.messaging as messaging import common.loger as trace1 import common.M...
# Copyright 2001-2019 by Vinay Sajip. All Rights Reserved. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose and without fee is hereby granted, # provided that the above copyright notice appear in all copies and that # both that copyright notice and this permissio...
# ############################################################################## # This file is part of df_config # # # # Copyright (C) 2020 Matthieu Gallet <github@19pouces.net> ...
""" Funds API For Digital Portals Search for mutual funds and ETFs using one single consolidated API, including a criteria-based screener. The API provides also base data, key figures, and holdings. A separate endpoint returns the possible values and value range for the parameters that the endpoint /fund/nota...
from __future__ import absolute_import import contextlib import errno import io import locale # we have a submodule named 'logging' which would shadow this if we used the # regular name: import logging as std_logging import os import posixpath import re import shutil import stat import subprocess import sys import tar...
""" Examines scaffold hypothesis on a particular user. Uses data from the MySQL Database. """ import csv import json import os import numpy as np import pandas as pd import matplotlib.pyplot as plt import igraph SAVE_PATH = os.path.expanduser("~/git/network_games_analysis/scaffold/") def analyse_graph(user_graph, use...
class PointLocationOnCurve(object, IDisposable): """ Defines the measurement parameters necessary to create a point at a specific location on a curve. PointLocationOnCurve(measType: PointOnCurveMeasurementType,measValue: float,measFrom: PointOnCurveMeasureFrom) """ def Dispose(self): "...
import calendar import json import logging import os import re from datetime import datetime, timedelta, timezone from string import Template from typing import Any, Callable, Dict, List, Optional import pendulum import requests from airflow.configuration import conf from airflow.contrib.operators.kubernetes_pod_opera...
from GeometrijskiObjekti import GeometrijskiObjekt class Pravougaonik(GeometrijskiObjekt): #izvedena klasa def __init__(self, sirina=1, visina=1): #inicijalizator nove klase super().__init__() #inicijalizator osnoven klase self.__sirina = sirina self.__visina = visina def getSi...
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
import types import pytest import torch.nn as nn import pretrainedmodels from cnn_finetune import make_model from cnn_finetune.utils import default from .utils import ( assert_equal_model_outputs, assert_almost_equal_model_outputs, copy_module_weights ) @pytest.mark.parametrize('model_name', ['resnext10...
# encoding: utf-8 """ @author: gallupliu @contact: gallup-liu@hotmail.com @version: 1.0 @license: Apache Licence @file: utils.py @time: 2018/1/29 22:22 """ import re def clean_string(context): regex = re.compile( r'^(?:http|ftp)s?://' # http:// or https:// r'(?:(?:[A-Z0-9](?:[A-Z0-9-]{0,61}[A...
#!/usr/bin/env python # Capstone Python bindings, by Nguyen Anh Quynnh <aquynh@gmail.com> from __future__ import print_function from capstone import * from capstone.arm import * from xprint import to_hex, to_x_32 ARM_CODE = b"\x86\x48\x60\xf4\xED\xFF\xFF\xEB\x04\xe0\x2d\xe5\x00\x00\x00\x00\xe0\x83\x22\xe5\xf1\x02\x...
import sqlite3 db = sqlite3.connect('database') cursor = db.cursor() cursor.execute(''' CREATE TABLE msg(id INTEGER PRIMARY KEY, subject TEXT,message TEXT) ''') db.commit() db.close()
from scipy.io.wavfile import read, write from scipy.signal.filter_design import butter, buttord from scipy.signal import lfilter, lfiltic import numpy as np from math import log import matplotlib.pyplot as plt ''' R E A D I N G ''' name = 'itadakimasu_A' rate, sound_samples = read(name+'.wav') sound_samples = np.floa...
import sys import os try: from django.conf import settings from django.test.utils import get_runner os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'tests.settings') try: import django setup = django.setup except AttributeError: pass else: setup() except I...
""" _ _ __ _| (_)_ __ ___ / _` | | | '_ ` _ \ | (_| | | | | | | | | \__, |_|_|_| |_| |_| |___/ author: Nauman Ahmad description: Resize images with a REST API. version: 0.1 license: MIT """ # Internal Imports from glim import app from glim.utils import _get_ext, _get_image, _protocol, _random_string,...
class Control(Component,IComponent,IDisposable,IOleControl,IOleObject,IOleInPlaceObject,IOleInPlaceActiveObject,IOleWindow,IViewObject,IViewObject2,IPersist,IPersistStreamInit,IPersistPropertyBag,IPersistStorage,IQuickActivate,ISupportOleDropSource,IDropTarget,ISynchronizeInvoke,IWin32Window,IArrangedElement,IBindableC...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime import logging import pprint import time import requests from django.conf import settings from django.forms.models import fields_for_model from django.http import QueryDict from django.utils import timezone from djan...
import itertools import numpy as np from src.log_util import log from src.numpy_util import np_rows from src.numpy_util import random_from_range from src.numpy_util import to_numpy class PAM: def __init__(self, n_clusters, distance, max_iter=100, ...
# hltGetConfiguration --full --data /dev/CMSSW_11_1_0/Fake --type Fake --unprescale --process HLTFake --globaltag auto:run1_hlt_Fake --input file:RelVal_Raw_Fake_DATA.root # /dev/CMSSW_11_1_0/Fake/V3 (CMSSW_11_1_0_pre3) import FWCore.ParameterSet.Config as cms process = cms.Process( "HLTFake" ) process.HLTConfigVer...
"""Sort pvals.""" import os import pandas as pd pvals_dirs = [] for db_dir in next(os.walk('.'))[1]: pvals_dirs += [f'{db_dir}/{d}' for d in next(os.walk(db_dir))[1]] for pvals_dir in pvals_dirs: for filename in next(os.walk(pvals_dir))[2]: if 'pvals.csv' not in filename: continue # not ...
import os import sys from types import FunctionType from numbers import Number from helpers import EPSILON import pytest my_path = os.path.dirname(os.path.abspath(__file__)) sys.path.insert(0, my_path + '/../') import dj_feet.feedback as f @pytest.mark.parametrize("feedback,expected", [({0:...
from .sin_fun.sin_fun import sin_d from .cos_fun.cos_fun import cos_d from .tanh_fun.tanh_fun import tanh_d from .tan_fun.tan_fun import tan_d from .sigmoid_fun.sigmoid_fun import sigmoid_d from .softmax_fun.softmax_fun import softmax_d from .log_fun.log_fun import log_d from .e_fun.e_fun import e_d from .relu_fun.relu...
#!/usr/bin/python # -*- coding: utf-8 -*- from collections import namedtuple Set = namedtuple("Set", ['index', 'cost', 'items']) def solve_it(input_data): # Modify this code to run your optimization algorithm # parse the input lines = input_data.split('\n') parts = lines[0].split() item_count =...
import matplotlib.pyplot as plt def plot_test(test_result, kwargs=None): plt.title(f"{test_result.identifier}") for provider, result in test_result.routes.items(): plt.scatter( *zip(*result.route.geometry.to_lng_lat_tuples()), label=provider, **kwargs or {}, ...
import talon if hasattr(talon, "test_mode"): # Only include this when we're running tests from knausj_talon_pkg.code import dictation def test_spacing_and_capitalization(): format = dictation.DictationFormat() format.state = None result = format.format("first") assert resu...
from os import system import numpy as np import math from tensorflow.keras.models import model_from_json import tensorflow as tf from tensorflow import keras #loading of pretrained model and weights starts json_file = open('model.json', 'r') loaded_model_json = json_file.read() json_file.close() loaded_model = model_f...
class LayerNorm(Module): __parameters__ = ["weight", "bias", ] __buffers__ = [] weight : Tensor bias : Tensor training : bool def forward(self: __torch__.multimodal.model.multimodal_transformer.___torch_mangle_9460.LayerNorm, argument_1: Tensor) -> Tensor: _0 = self.bias _1 = self.weight inp...
__title__ = "pvpn" __version__ = "0.0.1" __license__ = "MIT" __description__ = "VPN server that can tunnel IP network to tcp/udp proxy." __keywords__ = "vpn ike spe ip tcp udp" __author__ = "Qian Wenjie" __email__ = "qianwenjie@gmail.com" __url__ = "https://github.com/qwj/python-vpn"...
from .amount import AmountResponse from .account import AccountResponse from .attachment import AttachmentResponse from .exchange_rate import ExchangeRateResponse from veem.models.base import Base from veem.models.invoice import Invoice from veem.utils import deseralize class InvoiceResponse(Base): def __init__...
# coding: utf-8 """ Control-M Services Provides access to BMC Control-M Services # noqa: E501 OpenAPI spec version: 9.20.220 Contact: customer_support@bmc.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six class AgentMngAu...
from functools import partial as partial_, wraps from inspect import iscoroutinefunction, Parameter, signature from logging import Logger from typing import ( Any, Awaitable, Callable, DefaultDict, Optional, TypeVar, Union, overload, ) from trio import CancelScope, Event, MultiError __...
# This file contains routines from Lisbon Machine Learning summer school. # The code is freely distributed under a MIT license. https://github.com/LxMLS/lxmls-toolkit/ import torch import numpy as np import pdb def log_add_exp(a, b): max_ab = torch.max(a, b) # max_ab[~isfinite(max_ab)] = 0 return torch.lo...
""" This module contains utility functions for writing ddtrace integrations. """ from collections import deque from typing import Any from typing import Dict from typing import Optional from typing import Set from typing import TYPE_CHECKING from ddtrace import Pin from ddtrace import config from ddtrace.ext import ht...
# Copyright (C) 2010 Google 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: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
from __future__ import print_function import ast class ImportVisitor(ast.NodeVisitor): def __init__(self, names): self._names = names self._info = {} def visit_Import(self, node): self._visitImport(node, [a.name for a in node.names]) def visit_ImportFrom(self, node): parts = [node.module+'.'+a.name for ...
import System import clr import os import re def get_hdd_serial_number(): path = System.IO.Path.GetPathRoot(System.Environment.SystemDirectory).strip('\\') query = "ASSOCIATORS OF {Win32_LogicalDisk.DeviceID='%s'} WHERE ResultClass=Win32_DiskPartition" % path searcher = ManagementObjectSearcher(query) ...
from time import sleep import emoji print('FALTAM APENAS 10 SEGUNDOS!!') for c in range(10, 0, -1): print(c) sleep(1) print(emoji.emojize('FELIZ ANO NOVOOOO!!!!')) print(emoji.emojize('BUM! BUM! POOOW!:fireworks::sparkler:', use_aliases=True))
import json import struct import tensorflow as tf from tensorflow.python.tools.freeze_graph import freeze_graph import cv2 import numpy as np import os import tempfile from posenet.converter.config import load_config #BASE_DIR = os.path.join(os.sep, tempfile.gettempdir(), '_posenet_weights') BASE_DIR = tempfile.gette...
""" The ssh_autodetect module is used to auto-detect the netmiko device_type to use to further initiate a new SSH connection with a remote host. This auto-detection is based on a unique class called **SSHDetect**. Notes ----- The **SSHDetect** class is instantiated using the same parameters than a standard Netmiko co...
#!/usr/bin/env python3 # pyre-strict # Copyright (c) Facebook, Inc. and its affiliates. # 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. """ ldops.util.convert ~~~~~~~~~~~ A collection of helpful conversion util...
from django.contrib import admin from . models import Article, Researchpaper, Subscription,Contact # Register the Article Model in the Admin Pannel class ArticleAdmin(admin.ModelAdmin): fields = ['title','preview','content'] admin.site.register(Article, ArticleAdmin) class ResearchpaperAdmin(admin.ModelAdmin)...
# Copyright (c) 2020, Moritz E. Beber. # # 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 or agreed to i...
# 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, software # distributed under th...
import logging def set_root_logger(level=logging.INFO): logging.addLevelName(logging.WARNING, 'WARN') root = logging.getLogger() formatter = logging.Formatter("%(asctime)s.%(msecs)03d-%(name)s-%(levelname)s: %(message)s", "%Y-%m-%d %H:%M:%S") handler = logging.StreamH...
# -*- coding: utf-8 -*- # Copyright 2014-2022 CERN # # 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...
import json from redata import settings from redata.grafana.utils import load_json_data, update_home_panel_element from grafana_api.grafana_face import GrafanaFace from redata.grafana.panels.base import HomeLastDayTraffic, HomeLastModifiedTime import math def load_json_data(file_name): with open(file_name) as json...
# 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...
from TestInput import TestInputSingleton from autocompaction import AutoCompactionTests from basetestcase import BaseTestCase from couchbase_helper.cluster import Cluster from couchbase_helper.document import View from couchbase_helper.documentgenerator import DocumentGenerator from membase.api.rest_client import RestC...
from connect.models import ActivationTemplateResponse, ActivationTileResponse from .base import BaseResource from .utils import joinurl class TemplateResource(BaseResource): """ Specific resource. One method `render` He returns json string with activation tile """ resource = 'templates' def r...
# Copyright (c) 2021 PPViT 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 applicable...
import setuptools with open("README.md") as fp: long_description = fp.read() setuptools.setup( name="pipelines_webinar", version="0.0.1", description="An empty CDK Python app", long_description=long_description, long_description_content_type="text/markdown", author="author", packa...
# Generated by Django 2.1.4 on 2019-01-08 17:43 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('ohqueue', '0012_merge_20190107_2117'), ] operations = [ migrations.AddField( model_name='ohqueue', name='description...
#------------------------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information. #-------------------------------------...
# coding: utf-8 """ stash-server No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 OpenAPI spec version: v0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six ...
from typing import List from discpy.ext import commands import discpy # Defines a custom button that contains the logic of the game. # The ['TicTacToe'] bit is for type hinting purposes to tell your IDE or linter # what the type of `self.view` is. It is not required. class TicTacToeButton(discpy.ui.Button["TicTacToe"...
from dataclasses import dataclass, field from typing import List, Iterable from laxleague.guardian import Guardian @dataclass class Player: """ A lacrosse player in the league """ first_name: str last_name: str guardians: List[Guardian] = field(default_factory=list) def add_guardian(self, guard...
from functools import lru_cache primes = [2, 3, 5, 7, 11, 13, 17] # Will be extended @lru_cache(maxsize=2000) def pfactor(n): if n == 1: return [1] n2 = n // 2 + 1 for p in primes: if p <= n2: d, m = divmod(n, p) if m == 0: if d > 1: ...
#!C:\Users\ronyse\PycharmProjects\web_scrapping_daily_star\venv\Scripts\python.exe # EASY-INSTALL-ENTRY-SCRIPT: 'setuptools==39.1.0','console_scripts','easy_install' __requires__ = 'setuptools==39.1.0' import re import sys from pkg_resources import load_entry_point if __name__ == '__main__': sys.argv[0] = re.sub(r...
"""AyudaEnPython: https://www.facebook.com/groups/ayudapython """ class Fecha: def __init__(self, dia, mes, año) -> None: self._dia = dia self._mes = mes self._año = año @property def dia(self) -> int: return self._dia @property def mes(self) -> int: retur...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created December 2018 @author: ebecerra """ # Emanuel Becerra Soto # MD01 CIC IPN # Algorithm Direct Hashing and Pruning ######### Libraries ######### import itertools ######### Functions ######### # Flattens a list def flatten(l): return list( itertools.ch...
""" Test that dynamic values update their child count correctly """ from __future__ import print_function import os import time import re import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil class DynamicValueChildCountTestCase(TestBase): ...
import argparse import logging import pprint import mxnet as mx import numpy as np import os.path as osp import cPickle as pkl from ..config import config, default, generate_config from ..symbol import * from ..core import callback, metric from ..core.loader import MaskROIIter from ..core.module import MutableModule f...
# Copyright 2021 The HuggingFace 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/LICENSE-2.0 # # Unless required by applicabl...
from __future__ import division import datetime import multiprocessing from multiprocessing import sharedctypes # type: ignore import signal import sys import threading import warnings import numpy import six from chainer.dataset import iterator from chainer.iterators import _statemachine from chainer.iterators.orde...
# *************************************************************** # Copyright (c) 2022 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. # ************************...
from .layers import * from .models import * from .init import * from .metrics import *
import pytest from .context import mango from .fakes import fake_token from decimal import Decimal from solana.publickey import PublicKey ETH_TOKEN = mango.Token("ETH", "Wrapped Ethereum (Sollet)", PublicKey( "2FPyTwcZLUg1MDrwsyoP4D6s1tM7hAkHYRjkNb5w6Pxk"), Decimal(6)) BTC_TOKEN = mango.Token("BTC", "Wrapped Bi...
import pygame from enum import Enum # for enum34, or the stdlib version # from aenum import Enum # for the aenum version Pos = Enum('Pos', 'LEFT RIGHT') class GunsPlace: color = (100, 100, 100) def __init__(self, window, posX: Pos) -> None: self.window = window self.posX = posX s...
from .SysExpose import Expose
# -*- coding: utf-8 -*- from pkg_resources import get_distribution, DistributionNotFound try: # Change here if project is renamed and does not equal the package name dist_name = 'actinia_stac_plugin.wsgi' __version__ = get_distribution(dist_name).version except DistributionNotFound: __version__ = 'unkn...
import base64 import shutil import os import math import json import uuid import copy import xmltodict import json_templates from node import Node from drawing import Drawing from connections import Network from helper import Size class Topology(object): """The class which represents a topology with nodes and l...