text
stringlengths
1
927k
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): """Run administrative tasks.""" os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'deploy_ml.settings') try: from django.core.management import execute_from_command_line except Im...
import random from sympy import Integer, Matrix, Rational, sqrt, symbols from sympy.core.compatibility import range, long from sympy.physics.quantum.qubit import (measure_all, measure_partial, matrix_to_qubit, matrix_to_density, qubit_to...
# coding=utf-8 # Copyright 2019 The Google AI Language Team Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
from typing import Dict, List from model.check import Check from utils.logger import get_service_logger from utils.config import Global from utils.util import md5hash, jsondump, is_url from datetime import datetime from os import path import json LOGGER = get_service_logger('CHECK_SRV') def save_item(check: Check) -...
# -*- coding: utf-8 -*- from screws.freeze.main import FrozenOnly from objects.CSCG._2d.mesh.trace.visualize import _2dCSCG_Trace_Visualize from objects.CSCG._2d.mesh.trace.elements.main import _2dCSCG_Trace_Elements class _2dCSCG_Trace(FrozenOnly): def __init__(self, mesh): self._mesh_ = mesh s...
# font-awesome icon-name to unicode mapping icons = { "500px": "\uf26e", "accessible-icon": "\uf368", "accusoft": "\uf369", "acquisitions-incorporated": "\uf6af", "ad": "\uf641", "address-book": "\uf2b9", "address-card": "\uf2bb", "adjust": "\uf042", "adn": "\uf170", "adversal": ...
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import re import datetime import calendar from django.contrib import messages from django.db import models as db from django.http import HttpResp...
from django.contrib import admin from .models import * # Register your models here. # admin.site.register(Role) admin.site.register(Profile) # admin.site.register(UserAuthorization)
import sys if sys.version_info < (3, 7): from ._font import Font from ._pad import Pad else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_import( __name__, [], ["._font.Font", "._pad.Pad"] )
# Databricks CLI # Copyright 2021 Databricks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"), except # that the use of services to which certain application programming # interfaces (each, an "API") connect requires that the user first obtain # a license for the use of the APIs from Databricks,...
import time from conf.constant import TYPE_LOGIN_NORMAL_WAY, TYPE_LOGIN_OTHER_WAY from conf.urls_conf import loginUrls from configure import USER_PWD, USER_NAME from net.NetUtils import EasyHttp from train.login.Capthca import Captcha from utils import Utils from utils.Log import Log from conf.constant import CAPTCHA_...
from zendesk_viewer.utils import string_utils def test_chunkstring(): str = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad" chunks = list(string_utils.chunkstring(str, 25)) assert len(chunks) == 6 assert "".join(ch...
from datetime import datetime, timedelta, timezone import os from functools import lru_cache from pprint import pprint from dotenv import load_dotenv from google.cloud import bigquery from google.cloud.bigquery import QueryJobConfig, ScalarQueryParameter from app import APP_ENV, seek_confirmation from app.decorators....
from polygraphy.tools.base import Tool from polygraphy.tools.registry import TOOL_REGISTRY
# Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution and at # http://rust-lang.org/COPYRIGHT. # # Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or # http://www.apache.org/licenses/LICENSE-2.0> or the MIT license # <LICENSE-MIT or ht...
import comspy.user.Server_Chinese comspy.user.Server_Chinese.start(5)
from keras.models import Sequential from keras.layers import Dense from keras.layers import LSTM from matplotlib import pyplot from pandas import DataFrame from numpy import array # return training data def get_train(): seq = [[0.0, 0.1], [0.1, 0.2], [0.2, 0.3], [0.3, 0.4], [0.4, 0.5]] seq = array(seq) X, y = seq[:...
#!/usr/bin python3 """ <Description of the programme> Author: Pouria Hadjibagheri <pouria.hadjibagheri@phe.gov.uk> Created: 27 Dec 2020 License: MIT Contributors: Pouria Hadjibagheri """ # Imports # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Python:...
# MIT License # # Copyright (C) The Adversarial Robustness Toolbox (ART) Authors 2018 # # 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 # r...
import csv with open('Depth Data/KinectDataRaw.csv', 'r', newline='') as file: reader = csv.reader(file) fileWriter = open("Depth Data/KinectData.csv", "w") for row in reader: target = row.pop(0) #Remove the target if target != "Trash": row = list(map(int, row)) fileW...
from opensoar.task.task import Task from opensoar.utilities.helper_functions import calculate_distance, double_iterator, \ seconds_time_difference_fixes, add_seconds class RaceTask(Task): """ Race task. """ def __init__(self, waypoints, timezone=None, start_opening=None, start_time_buffer=0, mult...
x=int(input("enter the number 1")) y=int(input("enter the number 2")) def sumt(n,m):#function with argument no return print("sum operation \n") sumt=n+m print("sum is",sumt) def subs(n,m):#function with argument with return print("substraction operation \n") subs=n-m print("difference is",subs)...
#!/usr/bin/env python3 # Copyright 2014 BitPay Inc. # Copyright 2016-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test framework for barrelcrudecoin utils. Runs automatically during `make che...
import numpy as np import sys import os if bool(getattr(sys, 'ps1', sys.flags.interactive)): old_stdout = sys.stdout sys.stdout = open(os.devnull, 'w') from dtw import dtw sys.stdout = old_stdout else: from dtw import dtw from vital_sqi.common.generate_template import ( ppg_absolute_dual_sk...
#!/usr/bin/python # Copyright (c) 2020, Oracle and/or its affiliates. # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. """Provide Module Description """ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# __author__ = ["And...
""" The tool to check the availability or syntax of domains, IPv4, IPv6 or URL. :: ██████╗ ██╗ ██╗███████╗██╗ ██╗███╗ ██╗ ██████╗███████╗██████╗ ██╗ ███████╗ ██╔══██╗╚██╗ ██╔╝██╔════╝██║ ██║████╗ ██║██╔════╝██╔════╝██╔══██╗██║ ██╔════╝ ██████╔╝ ╚████╔╝ █████╗ ██║ ██║██╔██╗ ██║██║ ...
import discord import asyncio from discord.utils import get import time from colorama import Fore # create client object. client = discord.Client() # Main decorator for search user and give parameters to wraper function def find_member(func): async def wrap(*args, **kwargs): print(client.user) user_id = args[0]...
def free_func_1(x=3): return x+1 def free_func_2(): return 1 def free_func_3(): def my_local_func(): return 0 return my_local_func() + 1 def free_func_4(): def my_local_func(): def another_local_func(): return 1 return another_local_func() + 1 return ...
from typing import Dict, Any, Tuple from checkov.common.checks.base_check_registry import BaseCheckRegistry class Registry(BaseCheckRegistry): def extract_entity_details(self, entity: Dict[str, Any]) -> Tuple[str, str, Dict[str, Any]]: provider_type = list(entity.keys())[0] provider_name = list(e...
# 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...
import discord import os from discord.ext import commands from discord.utils import get client = commands.Bot(command_prefix='.') client.remove_command('help') TOKEN = os.getenv("CHAT") guild = None @client.event async def on_ready(): global guild print('[ + ] Started {0.user}'.format(client)) await client.wait_un...
def imageExtensionChecker(filename): filenameExtension = filename.split(".")[-1] filenameExtension = filenameExtension.lower() if (filenameExtension == "pdf"): return False # return True elif (filenameExtension in ("png", "jpg", "jpeg")): return True
class Solution: def removeDuplicates(self, A): if not A: return 0 j = 0 for i in xrange(1, len(A)): if A[i] != A[j]: j += 1 A[j] = A[i] return j + 1
import click from pathlib import Path from . import PythonTouch @click.command() @click.argument("directory") def main(directory): x = PythonTouch() x.touch(directory)
# This FILE is part of multi-legged robot field exploration model # env_wrapper.py - to obtain user interaction data from website # # This programm is explained by roboLAND in university of southern california. # Please notify the source if you use it # # Copyright(c) 2021-2025 Ryoma Liu # Email: 1196075299@qq.com fr...
# -*- coding: utf-8 -*- import time import os import numpy as np import paddle import paddle.fluid as fluid from paddle.fluid.dygraph.base import to_variable from reader import data_loader, test_data_loader, multithread_loader from yolov3 import YOLOv3 # train.py # 提升点: 可以改变anchor的大小,注意训练和测试时要使用同样的anchor ANCHORS = [...
import os import unittest from mi.core.log import get_logger from mi.dataset.dataset_driver import ParticleDataHandler from mi.dataset.driver.ctdbp_p.dcl.resource import RESOURCE_PATH from mi.dataset.driver.flord_g.ctdbp_p.dcl.flord_g_ctdbp_p_dcl_telemetered_driver import parse _author__ = 'jeff roy' log = get_logger...
import tkinter as tk class GUI(tk.Frame): def __init__(self,master=None): super().__init__(master) self.pack() self.create_wigets() def create_wigets(self): self.hi_there = tk.Button(self) self.hi_there["width"] = 15 self.hi_there["height"] = 10 self...
def input_calculator_data() -> dict: return { "property_value": 150000, "deposit_amount": 0, "mortgage_term": 10, "interest_rate": 3.0, }
from setuptools import Extension from .enums import ExtType class GenericGDNativeLibrary(Extension): def __init__(self, name, **gdnative_options): self._gdnative_type = ExtType.GENERIC_LIBRARY self._gdnative_options = gdnative_options super().__init__(name, sources=[]) class GDNativeLib...
#!/usr/bin/env python # -*- coding:utf-8 -*- ''' 生产环境标准配置 ''' configs = { 'db':{ 'host':'127.0.0.1' } }
# coding=utf-8 # Copyright 2016 The TensorFlow 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 requ...
# coding=utf-8 """ Verifies that all configuration values have a valid setting """ from elib_config._setup import ELIBConfig # noinspection PyProtectedMember from elib_config._value._config_value import ConfigValue # noinspection PyProtectedMember from elib_config._value._exc import DuplicateConfigValueError, MissingV...
import _plotly_utils.basevalidators class LineValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__( self, plotly_name='line', parent_name='scattergeo.marker', **kwargs ): super(LineValidator, self).__init__( plotly_name=plotly_name, parent_name=paren...
# Copyright 2020 ponai Consortium # 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, s...
# Author: Teon Brooks <teon.brooks@gmail.com> # Stefan Appelhoff <stefan.appelhoff@mailbox.org> # # License: BSD (3-clause) from itertools import chain import os import os.path as op import pytest import numpy as np from functools import partial from string import ascii_lowercase from numpy.testing import (...
from global_decorators import render_to from accounts.models import UserProfile, FLAG_ADMIN, FLAG_OP, FLAG_VIP from admin.decorators import admin_only from django.contrib import messages from django.http import HttpResponseRedirect from admin.users.forms import AdminProfileForm from django.contrib.auth.models import Us...
import argparse import random parser = argparse.ArgumentParser(prog='xkcdpwgen', description='Generate a secure, memorable password using the XKCD method') parser.add_argument("-w", "--words", type=int, default=4, help='include WORDS words in the password (default=4)') parser.add_argument("-c", "--caps", type=int, def...
from juriscraper.OpinionSite import OpinionSite import time from datetime import date from lxml import html class Site(OpinionSite): def __init__(self, *args, **kwargs): super(Site, self).__init__(*args, **kwargs) self.url = 'http://www.ca10.uscourts.gov/opinions/new/daily_decisions.rss' se...
import os import subprocess import sqlite3 import pytest from django.conf import settings from django.db import connection from django.db import transaction from .compat import force_text from .app.models import Item DB_NAME = settings.DATABASES['default']['NAME'] if DB_NAME == ':memory:': TEST_DB_NAME = DB_NA...
"""Data model of a star.""" import typing import pint from . import base, planet from .. import UNITS _LUM_SUN: pint.Quantity = 382.8e24 * UNITS.watt _MASS_SUN: pint.Quantity = 1988500e24 * UNITS.kg class Star(base.LuminousCelestialBody[planet.Planet]): """Class describing a star. :param luminosity: the ...
# -*- coding: utf-8 -*- """ Created on Thu May 18 05:18:02 2017 @author: Siobhan """ import webbrowser class Movie(): """ A class which provides a way to store movie data. Attributes: title(str): value is the movie title given as the first argument. storyline (str): value is the mov...
import unittest from old import module0_formula_and_identifier_retrieval import pandas as pd # Python Tutorial: Unit Testing Your Code with the unittest Module: #https://www.youtube.com/watch?v=6tNS--WetLI # Retrieve sample QIDs sample_IDs_filepath = r'evaluation\sample_IDs.csv' QIDs_column_name = 'QID' def get_sa...
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
#!/usr/bin/env python """ Rules for building C/API module with f2py2e. Copyright 1999,2000 Pearu Peterson all rights reserved, Pearu Peterson <pearu@ioc.ee> Permission to use, modify, and distribute this software is given under the terms of the NumPy License. NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RIS...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
r""" _ ___ __ __ .___________. __ __ /\| |/\ / \ | | | | | || | | | \ ` ' / / ^ \ | | | | `---| |----`| |__| | |_ _| / /_\ \ | | | | | | | __ | / , . \ / _____ \ | `--' | | | | | | | \/|_|\//__/ \__\ \______/ ...
from molsysmt._private_tools.exceptions import * def from_mdanalysis_Universe (item, molecular_system=None, atom_indices='all', frame_indices='all'): from molsysmt.native.molsys import MolSys from molsysmt.native.io.topology import from_mdanalysis_Universe as mdanalysis_Universe_to_molsysmt_Topology from ...
from user_utilities import make_gif # you must create a folder `increasing_powers` in images make_gif(r"../images/increasing_powers", "test.mp4", 30)
import os.path import unittest2 def get_tests(): start_dir = os.path.dirname(__file__) return unittest2.TestLoader().discover(start_dir, pattern="*.py")
import enum class Mode(enum.IntEnum): Normal = 0 ArcSource = 1 ArcTarget = 2 Simulation = 100 ModeStrings = {Mode.Normal: 'Editor: Normal', Mode.ArcSource: 'Editor: Arc source', Mode.ArcTarget: 'Editor: Arc target', Mode.Simulation: 'Simulation', ...
class Holder: def __init__(self, x): self.x = x def get(self): return self.x
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from hermes_python.hermes import Hermes from os.path import expanduser import os from snipshue.snipshue import SnipsHue from snipshelpers.thread_handler import ThreadHandler from snipshelpers.config_parser import SnipsConfigParser import queue CONFIGURATION_ENCODING_FORM...
from tkinter import * from PIL import Image,ImageTk from resizeimage import resizeimage #import os class CountryIMG: def __init__(self): self.size = 400 self.TXT =open('CountryImages\Europ\Panstwa.txt',"r",encoding="utf-8") self.CountryName=[] self.CountryImage = [] for li...
r""" Interface to Scilab Scilab is a scientific software package for numerical computations providing a powerful open computing environment for engineering and scientific applications. Scilab includes hundreds of mathematical functions with the possibility to add interactively programs from various languages (C, C++,...
#!/usr/bin/env python # # Copyright 2016 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 requir...
#!/usr/bin/env python # -*- coding: utf-8 -*- import numpy as np import pandas as pd import matplotlib.pyplot as plt import talib from pyalgotrade import strategy, plotter from pyalgotrade.broker.backtesting import TradePercentage, Broker from pyalgotrade.broker import Order from pyalgotrade.barfeed import yahoofeed ...
""" MODIFIED FROM keras-yolo3 PACKAGE, https://github.com/qqwweee/keras-yolo3 Retrain the YOLO model for your own dataset. 10-26-20 MODIFIED by bertelschmitt to use new repo name if changed to something else than "TrainYourOwnYOLO" 10-31-20 UPDATED by bertelschmitt to reflect TrainYourOwnYOLO versions as of 10-31-20 ...
from django.db import models from django.utils import timezone class MarketIndex(models.Model): ticker = models.CharField(max_length=100, unique=True) name = models.CharField(max_length=100, unique=True) class Meta: verbose_name_plural = 'market_indices' def __str__(self): return sel...
from .columns import * from .contacts import * from .tenants import *
# -*- coding: utf-8 -*- """aiohttp requester module.""" import asyncio import logging import socket from asyncio.events import AbstractEventLoop, AbstractServer from typing import Any, Mapping, Optional, Tuple, Union import aiohttp import aiohttp.web import async_timeout from async_upnp_client import UpnpEventHandle...
#!/usr/bin/env python3 """ Author : cory Date : 2020-03-03 Purpose: Rock the Casbah """ import argparse import os import sys # -------------------------------------------------- def get_args(): """Get command-line arguments""" parser = argparse.ArgumentParser( description='Rock the Casbah', ...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import json import warnings import pulumi import pulumi.runtime from typing import Union from .. import utilities, tables class Topic(...
import math from dash_labs.dependency import Output, Input from dash_labs.util import build_id, filter_kwargs from .base import ComponentPlugin from dash_labs.templates import FlatDiv from dash.development.base_component import Component operators = [ ["ge ", ">="], ["le ", "<="], ["lt ", "<"], ["gt ...
#!/usr/bin/env python # -*- coding: utf-8 -*- __version__ = "2019.05.26"
# -*- coding: utf-8 -*- """Test decorator time_elapsed.""" import pytest import time from pcof import decorators def myfunc(*args, **kwargs): return "{}; {}".format(args, kwargs) def myfunc_two(*args, **kwargs): time.sleep(0.1) return "{}; {}".format(args, kwargs) @pytest.mark.parametrize( "args,...
# Copyright 2012 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/licenses/LICENSE-2.0 # # Unless required by a...
import json from collections import defaultdict def is_eq(pred,gold): return pred==gold class GenResult(object): def __init__(self, idx, lay, tgt,disf_frags, tags): self.idx = idx self.lay = lay self.tgt = tgt #print(tags) self.tgt_tags=tags self.gold_tgt=[] ...
# 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 applicabl...
"""Set up mystrom2mqtt gateway.""" import os from setuptools import find_packages, setup here = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(here, "README.rst"), encoding="utf-8") as readme: long_description = readme.read() setup( name="mystrom2mqtt", version="0.1.0", descripti...
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries # SPDX-License-Identifier: MIT """ Basic display_text.label example script adapted for use on MagTag. """ import time import board import displayio import terminalio from adafruit_magtag.magtag import MagTag # Bit that allows the light sensor from adafru...
# This file was automatically generated by SWIG (http://www.swig.org). # Version 3.0.7 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. from sys import version_info if version_info >= (2, 6, 0): def swig_import_helper(): from os.path imp...
import cv2 import numpy as np import os import sys this_dir = os.path.dirname(os.path.abspath(__file__)) needed_dir = os.path.abspath(os.path.join(this_dir, '../.')) sys.path.insert(0, needed_dir) from helpers.detect_people import Detect_people # https://www.pyimagesearch.com/2015/11/09/pedestrian-detection-opencv/ ...
# -*- coding: utf-8 -*- # AtCoder Beginner Contest if __name__ == '__main__': n = int(input()) if n % 2 == 0: print(n) else: print(n * 2)
# -*- coding: utf-8 -*- # Generated by Django 1.9.9 on 2016-10-23 12:29 from __future__ import unicode_literals from django.db import migrations from django.core.management.sql import emit_post_migrate_signal class Migration(migrations.Migration): def add_surveys_permissions_to_groups(apps, schema_editor): ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.utils.timezone from django.conf import settings class Migration(migrations.Migration): dependencies = [ ('zerver', '0014_realm_emoji_url_length'), ] operations = [ migr...
#!/usr/bin/env python import os os.environ["OMP_NUM_THREADS"] = "1" os.environ["MKL_NUM_THREADS"] = "1" import copy # noqa E402 import time # noqa E402 import atexit # noqa E402 import argparse # noqa E402 import multiprocessing as mp # noqa E402 import torch # noqa E402 torch.set_num_threads(1) from catalyst...
# Copyright 2019 The TensorFlow 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 applica...
# -*- coding: utf-8 -*- # Author: XuMing <xuming624@qq.com> # Brief: import numpy as np import tensorflow as tf from keras.models import load_model from pycorrector.seq2seq import cged_config as config from pycorrector.seq2seq.corpus_reader import CGEDReader, load_word_dict from pycorrector.seq2seq.reader import EOS...
from operator import attrgetter import pyangbind.lib.xpathhelper as xpathhelper from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType from pyangbind.lib.base import PybindBase from de...
""" Ocelot specific code lives here """
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyLscsoftGlue(PythonPackage): """Glue (Grid LSC User Environment) is a suite of python mod...
# Jared Dyreson # CPSC 386-01 # 2021-11-29 # jareddyreson@csu.fullerton.edu # @JaredDyreson # # Lab 00-04 # # Some filler text # """ Simple class for the fruit """ import dataclasses import random from Snake.Cell import Cell from Snake.Point import Point @dataclasses.dataclass class Fruit: """ Represents f...
import os __version__ = '0.1.1' __date__ = '2017/20/10' __updated__ = '2018/27/04' __author__ = 'Andrew McIntosh' __copyright__ = 'Copyright 2017, Andrew McIntosh' __license__ = 'MIT' FRESHBOOKS_BASE_URL = os.getenv('FBTIMER_API_URL', 'https://api.freshbooks.com/')
"""Brusselator A stochastic realization of the famous Brusselator system, first proposed in I. Prigogine and R. Lefever, Symmetry Breaking Instabilities in Dissipative Systems, J. Chem. Phys. 48, 1695 (1968). This is a simple example of a process with only static (non-infered) reactions. The deterministic system exhi...
# Imports import torch.nn as nn from os import path import torch import torch.nn.functional as F class DotProduct_Classifier(nn.Module): def __init__(self, num_classes=1000, feat_dim=2048, *args): super(DotProduct_Classifier, self).__init__() self.fc = nn.Linear(feat_dim, num_classes) def forw...
#!/usr/bin/env python3 # Copyright (c) 2015-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 behavior of -maxuploadtarget. * Verify that getdata requests for old blocks (>1week) are dropped ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Sign releases on github, make/upload ppa to launchpad.net NOTE on ppa: To build a ppa you may need to install some more packages. On ubuntu: sudo apt-get install devscripts libssl-dev python3-dev \ debhelper python3-setuptools dh-python NOTE on apk sig...
import numpy as np from math import inf as infinity from itertools import product from collections import defaultdict import random import time # Initializing the Tic-Tac-Toe environment # Three rows-Three columns, creating an empty list of three empty lists state_space = [[' ', ' ', ' '], [' ', ' ', ' '], [' ', ' ', ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('changeset', '0010_auto_20151227_1306'), ] operations = [ migrations.CreateModel( name='Import', fiel...