text
stringlengths
2
999k
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import * class AlipayEcoSmsSendModel(object): def __init__(self): self._content = None self._phone = None @property def content(self): return self._content @content.setter ...
#!/usr/bin/env python3 # Copyright (c) 2016-2018 The Bitcoin Core developers # Copyright (c) 2018-2019 The VIP developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. import re import fnmatch import sys import subprocess import...
#!/usr/bin/env python3 # coding=utf-8 # Copyright 2018 Google AI, Google Brain and Carnegie Mellon University Authors and the HuggingFace Inc. team. # Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in c...
# -*- coding: utf-8 -*- """ ----------------------------------------------------- File Name: redisClient.py Description : 封装Redis相关操作 Author : JHao date: 2019/8/9 ------------------------------------------------------ Change Activity: 2019/08/09: 封装Redis相关操作 ...
#!/usr/bin/env python3 # Copyright 2018 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. """Prints the total PSS attributed to another app in Chrome's mappings. This script assumes a device with Monochrome, and requires ro...
#!/usr/bin/env python # Copyright (c) 2013-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. from __future__ import division,print_function,unicode_literals import biplist from ds_store import DSStore...
''' token_uri = self.analyse_password('testPassword') Copyright 2016 Randal S. Olson Player.client_id = 'PUT_YOUR_KEY_HERE@gmail.com' Permission is hereby granted, free of charge, to any person obtaining a copy of this software byte Player = this.return(bool $oauthToken='test_dummy', bool compute_password($oauthToken=...
from .earth import Earth from .sun import Sun from .satellite import Satellite
import tensorflow as tf import numpy as np import datetime import os import argparse import matplotlib.pyplot as plt from matplotlib import gridspec from tensorflow.examples.tutorials.mnist import input_data # Get the MNIST data mnist = input_data.read_data_sets('./Data', one_hot=True) # Parameters input_dim = 784 n_...
#ex 1.2-1.3 #a. Three Juggling pins : 3[number] * (3[center of mass of each pin] + 3[orientation of each pin]) = 18 #b. Spherical pendulum : [theta] + [phi] = 2 #c. Spherical double pendulum: 2[pendulum1's theta and phi] + 2[pendulum2's theta and phi] = 4 #d. Point mass on wire : 1[distance travelled a...
# 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 ...
from flask import Flask from flask import request, render_template import model app = Flask(__name__) @app.route('/', methods = ['GET','POST']) def start_page(): if request.method == 'POST': context = request.form['context'] question = request.form['question'] result = model.infer(context = context,question = ...
# This file was automatically created by FeynRules 2.3.35 # Mathematica version: 12.1.0 for Linux x86 (64-bit) (March 18, 2020) # Date: Thu 7 Jan 2021 14:51:36 from object_library import all_lorentz, Lorentz from function_library import complexconjugate, re, im, csc, sec, acsc, asec, cot try: import form_factors ...
#!/usr/bin/env python # encoding: utf-8 import logging from sanic import Blueprint, response from sanic.response import json, text, html, redirect import ujson import datetime from hashlib import md5 from random import Random, random logger = logging.getLogger('user') user_bp = Blueprint('user', url_prefix='user') ...
# Copyright 2019 1QBit # # 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 ...
# -*- coding: utf-8; -*- """Parse HTTP/1.x message framing according to RFC 7230.""" import re from httpolice.citation import RFC from httpolice.codings import decode_deflate, decode_gzip from httpolice.exchange import Exchange, complaint_box from httpolice.known import m, st, tc from httpolice.parse import ParseErr...
# version 1.0 (based on DIME 0.0.2) 29/12/2021 # Import packages ==================== import os import re import sys import pandas as pd import argparse # simple run entry point def run(): parser = argparse.ArgumentParser(description='Lint a Stata do-file.') parser.add_argument('filename', metavar='file', type...
"""---------------------------------------------------------------------------- This example shows how to play a WAV file. Documentation: http://people.csail.mit.edu/hubert/pyaudio/ Installation: sudo apt-get install portaudio python3 -m pip install pyaudio ---------------------------------------...
#!c:\users\kk\onedrive\contents\python\social_network\soc_env\scripts\python.exe from django.core import management if __name__ == "__main__": management.execute_from_command_line()
#!/bin/bash ccp4-python -m pytest
# Copyright 2015 NEC Corporation. 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 ...
# Generated from Bloon.g4 by ANTLR 4.9.2 # encoding: utf-8 from antlr4 import * from io import StringIO import sys if sys.version_info[1] > 5: from typing import TextIO else: from typing.io import TextIO from BloonCompiler import Compiler compi = Compiler() quad_queue = None meth_dir = None class_dir = None constan...
import os import sys import tempfile import shutil from pip.req import InstallRequirement, RequirementSet, parse_requirements from pip.log import logger from pip.locations import src_prefix, virtualenv_no_global, distutils_scheme from pip.basecommand import Command from pip.index import PackageFinder from pip.exception...
""" Factory to build catalog of i/o metadata for functions implemented in the front-end NOTE: These definitions are currently needed in the catalog and director2 services. Since it is static data, instead of making a call from director2->catalog, it was decided to share as a library """ import functoo...
#!/usr/bin/env python3 # Copyright (c) 2010 ArtForz -- public domain half-a-node # Copyright (c) 2012 Jeff Garzik # Copyright (c) 2010-2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Bitcoin test...
""" This is an example script to create an ubuntu container with corex enabled and expose it over a managed domain. Requirements: 1- stellar wallet named "wallet" funded with enough TFTs Expected Result: 1- a network named "management" created or extended with the nodes required for container deployment 2- ubuntu con...
"Load and download data for use in other modules" import sqlite3 import geopandas as gpd import pandas as pd import requests import sqlalchemy as sa from bs4 import BeautifulSoup from xlrd import XLRDError from powergenome.params import IPM_GEOJSON_PATH def load_ipm_plant_region_map(pudl_engine): """Load the t...
from collections import defaultdict from .dependency_processor import DependencyProcessor from .concept import Concept import networkx as nx import json import logging import os import re import sys import traceback from networkx import algorithms class FourLang(): dep_regex = re.compile("([a-z_-]*)\((.*?)-([0-9...
''' coif.py: cover image finder Authors ------- Michael Hucka <mhucka@caltech.edu> -- Caltech Library Copyright --------- Copyright (c) 2021 by the California Institute of Technology. This code is open-source software released under a 3-clause BSD license. Please see the file "LICENSE" for more information. ''' ...
# -*- coding: utf-8 -*- # Copyright 2017, IBM. # # This source code is licensed under the Apache License, Version 2.0 found in # the LICENSE.txt file in the root directory of this source tree. # pylint: disable=invalid-name,anomalous-backslash-in-string """ A collection of useful quantum information functions for st...
"""Support for KEBA charging station sensors.""" from homeassistant.const import ( DEVICE_CLASS_POWER, ELECTRICAL_CURRENT_AMPERE, ENERGY_KILO_WATT_HOUR, ) from homeassistant.helpers.entity import Entity from . import DOMAIN async def async_setup_platform(hass, config, async_add_entities, discovery_info=N...
"""Update functionality module.""" import typing import yaml from botocore.client import BaseClient from reviser import definitions from reviser import servicer def _filter_layer_updates( function_name: str, target: "definitions.Target", published_layers: typing.List["definitions.PublishedLayer"], ) -> ...
#!/usr/bin/python3 # C:\Work\Python\HID_Util\src\grt_FW_version.py # based on bsl.py from binascii import hexlify import sys import argparse import threading from time import perf_counter as timer # NOTE: about include_dll_path for __init__.py error. # You MUST include the next line when working with ful...
from gaphor import UML from gaphor.application import distribution from gaphor.storage import storage from gaphor.tests import TestCase from gaphor.UML.actions import ActionItem, FlowItem class ActionIssueTestCase(TestCase): def test_it(self): """ Test an issue when loading a freshly created actio...
file_name = input() i = 0 while i < len(file_name): c = 0 character = file_name[i] while i < len(file_name) and character == file_name[i]: i += 1 c += 1 print(character, c, sep="", end="")
# Copyright 2013-2019 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 PyImportlib(PythonPackage): """Packaging for importlib from Python 2.7""" homepage = ...
import logging from . import log import traceback from .exception import StopUser, RescheduleTask, RescheduleTaskImmediately, InterruptTaskSet class EventHook: """ Simple event class used to provide hooks for different types of events in Locust. Here's how to use the EventHook class:: my_event =...
# 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 warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import...
''' Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., [0,1,2,4,5,6,7] might become [4,5,6,7,0,1,2]). You are given a target value to search. If found in the array return its index, otherwise return -1. You may assume no duplicate exists in the array. Your algorith...
from math import exp,sqrt from random import randrange class neurone: def __init__(self,a,b): self.a=a self.b=b def proceed(self,z): t = z[0]*self.a + z[1]*self.b return 1/(1+exp(-t)) n = 100 X_app = [(randrange(-500,501)/1000,randrange(-500,501)/1000) for i in range(n)] Y_app ...
from app import db from datetime import datetime, timedelta class User(db.Model): __tablename__ = 'users' transfer_historys = db.relationship('TransferHistory', backref='users') login_logs = db.relationship('LoginLog', backref='users') id = db.Column(db.Integer, primary_key=True) username = db.Col...
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="transmat", version="0.1", author="Riccardo Albertini", author_email="ssirowain@gmail.com", description="Upload and download file via WeTransfer from terminal", long_description=long_de...
import math import torch import torch.nn as nn import torch.nn.functional as F import pytorch_lightning as pl from transformers import pipeline from torchvision import models from fairseq.optim.adafactor import Adafactor class PositionalEncoding(nn.Module): def __init__(self, d_model, dropout=0.1, max_...
import base64 import io import json import logging import os import subprocess from subprocess import PIPE from dateutil import parser from libcloud.storage.drivers.azure_blobs import AzureBlobsStorageDriver from medusa.storage.abstract_storage import AbstractStorage import medusa.storage.azure_blobs_storage.concurre...
from __future__ import absolute_import, print_function, division """ This file contains the implementation of different layer normalized recurrent layers. """ ###### Imports ######################################## import numpy as np import theano import theano.tensor as T from collections im...
""" Insertion: insert_one_bit(num, bit, i): insert exact one bit at specific position For example: Input: num = 10101 (21) insert_one_bit(num, 1, 2): 101101 (45) insert_one_bit(num, 0 ,2): 101001 (41) insert_one_bit(num, 1, 5): 110101 (53) insert_one_bit(num, 1, 0): 101011 (43) insert_mult_bits(num, bits, len, i): i...
""" ASGI config for django_ping 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.2/howto/deployment/asgi/ """ import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJANGO_S...
from .mvtec import MVTecDataset __all__ = ["MVTecDataset"]
import logging import os from pathlib import Path import tempfile from git import Repo from swaggertosdk.SwaggerToSdkCore import ( CONFIG_FILE, read_config_from_github, build_swaggertosdk_conf_from_json_readme, ) from azure_devtools.ci_tools.git_tools import ( do_commit, ) from azure_devtools.ci_tools...
# encoding: utf-8 # module _codecs_jp # from /home/pyy2/.virtualenvs/pyy3.5/lib/python3.5/lib-dynload/_codecs_jp.cpython-35m-x86_64-linux-gnu.so # by generator 1.145 # no doc # no imports # functions def getcodec(*args, **kwargs): # real signature unknown pass # no classes # variables with complex values __load...
class Model(object): """Interface for detection model. This allows a model-agnostic control loop""" def __init__(self, model_path, input_shape): self.model = model_path self.input_shape = input_shape self.index_offset = -1 def detect(self, img, conf_th): """ Abs...
# -*- coding: utf-8 -*- """ inyoka.core.celery_support ~~~~~~~~~~~~~~~~~~~~~~~~~~ Support module for celery. :copyright: 2009-2011 by the Inyoka Team, see AUTHORS for more details. :license: GNU GPL, see LICENSE for more details. """ from datetime import timedelta from kombu.transport import get_t...
#Benjamin Ramirez Dec 5 2016 #making a GUI for linking with a MYSQL Database containing hearthstone data import sys from PyQt5.QtWidgets import * from PyQt5.QtGui import * from PyQt5.QtCore import * from Database import MyDB WINDOW_LENGTH = 600 WINDOW_HEIGHT = 500 class Window(QDialog): def __init__(self): ...
# coding: utf-8 """ CRM Objects CRM objects such as companies, contacts, deals, line items, products, tickets, and quotes are standard objects in HubSpot’s CRM. These core building blocks support custom properties, store critical information, and play a central role in the HubSpot application. ## Supported O...
# Copyright 2017-2020 Lawrence Livermore National Security, LLC and other # Hatchet Project Developers. See the top-level LICENSE file for details. # # SPDX-License-Identifier: MIT # make flake8 unused names in this file. # flake8: noqa: F401 from .graphframe import GraphFrame from .query_matcher import QueryMatcher
# coding=utf-8 # ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ """ FILE: sample_analyze_conversation_app.py DESCRIPTION: This sample demonstrates how to analyze user query for intents and entities using a deepst...
from time import sleep import os import docker import pytest from docker.types import EndpointSpec, NetworkAttachmentConfig import vault @pytest.fixture(scope="session") def root_path(): yield os.path.dirname(os.path.dirname(__file__)) @pytest.fixture() def vault_service(vault_token): client = docker.from...
################################################## # Copyright (c) Xuanyi Dong [GitHub D-X-Y], 2020 # ################################################## import torch import torch.nn as nn from ..cell_operations import ResNetBasicblock from .cells import InferCell # The macro structure for architectures in NAS-Bench-2...
from __future__ import (absolute_import, division, print_function) from ansible.errors import AnsibleError from ansible.module_utils._text import to_text from ansible.plugins.action import ActionBase __metaclass__ = type class ActionModule(ActionBase): def run(self, tmp=None, task_vars=None): if task_v...
''' IFTTT.py - This is send data to IFTTT via http post method. Created by Metin KOC (saucompeng), September 11, 2018. ''' from cellulariot import cellulariot import time event_name = "xxxxxx" # change with your eventName api_key = "xxxxxxxxxxxxxxxxxxx"; # change with api-key data = "{\"value1\":\"%d\"}" #node =...
# This code is part of Qiskit. # # (C) Copyright IBM 2018, 2021. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivat...
import json class FileUtil(object): TOKENS_FOLDER_PATH = 'tokens' @staticmethod def getJSONContents(filePath): with open(filePath, 'r', encoding='utf-8') as f: return json.loads(f.read().encode(encoding='utf-8')) @staticmethod def writeJSONContents(filePath, obj): wit...
#!/usr/bin/env python # -*- coding: utf-8 -*- from runner.koan import * class AboutDecoratingWithFunctions(Koan): def addcowbell(fn): fn.wow_factor = 'COWBELL BABY!' return fn @addcowbell def mediocre_song(self): return "o/~ We all live in a broken submarine o/~" def test_de...
import math #load data and train the multinomial model def train(): data = "sms_train_features.csv" label = "sms_train_labels.csv" f2 = open(label) spam = 0 ham = 0 first_row = 0 labels = [] for lines in f2: if first_row == 0: first_row +=1 else: ...
""" ASGI config for cv 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('DJANGO_SETTINGS_M...
import smtplib import logging import mimetypes from email.mime.multipart import MIMEMultipart from email import encoders from email.mime.audio import MIMEAudio from email.mime.base import MIMEBase from email.mime.image import MIMEImage from email.mime.text import MIMEText from jobcrawl import settings import os email_...
import sqlite3 conn = sqlite3.connect("db.sqlite") c = conn.cursor() SQL_STATEMENT = """CREATE TABLE IF NOT EXISTS ta_office_hours ( guild_id INT, ta VARCHAR(50), day VARCHAR(4), begin_time DATETIME, ...
# 2nd stage K210 ISP binary ('isp.bin'), zipped and hexlified ISP_PROG = ('78dac5980d5c5455dec7cfbd33f75e8637a50b4cbe6dc00828ede35653b2c966800cd7976ab554d2d2c5ae685ab65198d12eeb0c33c338224e7485c1' '060ac144d9a7d6966c521f1b4871b2b25257518b425e1c354c308691d779fe67ee1da1f2d9f6f93cfbf93c...
"""A module that provides plotters for Vicon markers that have been tracked via biplane fluoroscopy to ascertain the spatiotemporal syncing accuracy between the Vicon and biplane fluoroscopy systems .""" import numpy as np from typing import Sequence, List import matplotlib.figure import matplotlib.pyplot as plt from ...
import requests from googlesearch import search from bs4 import BeautifulSoup from .error_handling import SearchNotWork, NoResultFound class Mangaography: def __init__(self, title: str): try: manga_id = search(f'site:myanimelist.net {title} inurl:/manga/ manga info', num_results=0) except: raise ...
# -*- encoding: utf-8 -*- """ License: MIT Copyright (c) 2019 - present AppSeed.us """ # Python modules import fnmatch import os, logging # Flask modules import threading import requests from flask import render_template, request, url_for, redirect, send_from_directory, session, Response, flash from flask_login impo...
#!/usr/bin/env python # encoding: utf-8 # Copyright 2014 Xinyu, He <legendmohe@foxmail.com> # # 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 ...
# Data manipulation import numpy as np import pandas as pd from sklearn import preprocessing # Sklearn from sklearn.model_selection import train_test_split # for splitting data into train and test samples from sklearn.svm import SVC # for Support Vector Classification baseline model from sklearn.semi_supervised import ...
# -*- coding: utf-8 -*- """ 2016-08-06, 2016M-1.0 lzj Utilities for pipeline, general operations Catalog process, rotate, input, output. """ def rotate(x, y, ctx, cty, ang) : """ Rotate catalog x,y against center (ctx,cty), using specified rotate angle args: x: ndarray of x, or scalar ...
# Copyright 1999-2021 Alibaba Group Holding 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 a...
import torch import torch.nn as nn import torch.nn.init as init import numpy as np __author__ = "Yu-Hsiang Huang" class Linear(nn.Module): ''' Simple Linear layer with xavier init ''' def __init__(self, d_in, d_out, bias=True): super(Linear, self).__init__() self.linear = nn.Linear(d_in, d_out...
# Leo colorizer control file for embperl mode. # This file is in the public domain. # Properties for embperl mode. properties = { "commentEnd": "-->", "commentStart": "<!--", } # Attributes dict for embperl_main ruleset. embperl_main_attributes_dict = { "default": "null", "digit_re": "", ...
# 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...
# -*- coding: utf-8 -*- # Copyright 2019 New Vector 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 la...
# 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. import unittest import mock from infra_libs.ts_mon.common import http_metrics from infra_libs.ts_mon.common import interface from infra_libs.ts_mon.common ...
# 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 may ...
mainStr = "the quick brown fox jumped over the lazy dog. the dog slept over the verandah." subStr = "over" mainStr.replace("over","") print mainStr
import Adafruit_BBIO.ADC as ADC import time import socket import sys import json sensor_pin = 'P9_40' HOST = '' PORT = 8181 serv = socket.socket(socket.AF_INET, socket.SOCK_STREAM) serv.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) serv.bind((HOST, PORT)) serv.listen(5) while True: conn, addr = serv.acce...
# SR.py import numpy as np import scipy as sc import pandas as pd import matplotlib.pyplot as plt from gs_aiops.detector.algorithm.anomal_detect_algorithm.utils import * from scipy.fftpack import fft, ifft from gs_aiops.tools import generate_anomal_data from gs_aiops.detector.algorithm.anomal_detect_algorithm.utils imp...
# 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...
# 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...
# Copyright (c) 2022 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...
# Made with python3 # (C) @FayasNoushad # Copyright permission under MIT License # All rights reserved by FayasNoushad # License -> https://github.com/FayasNoushad/Telegraph-Uploader-Bot-V2/blob/main/LICENSE import os import time import math import json import string import random import traceback import asyncio impor...
# 1) Download dataset from MNIST ("Modified National Institute of Standards and Technology"), # 2) Splits it into Training + Test data from tensorflow.examples.tutorials.mnist import input_data mnist = input_data.read_data_sets("MNIST_data/", one_hot=True) import tensorflow as tf #Set parameters learning_rate = 0.01...
# -*- coding: utf-8 -*- { 'name': "Hr Recruitment Interview Forms", 'version': '1.0', 'category': 'Human Resources', 'summary': 'Surveys', 'description': """ Use interview forms during recruitment process. This module is integrated with the survey module to allow you to defin...
# Check weather given tree in binary search tree or not class Node: def __init__(self,val): self.left = None self.right = None self.val = val def validateBST(root): return isValidBST(root,None,None) def isValidBST(root, minvalue, maxvalue): if root is None: return Tr...
""" Install packages using pip Copyright (c) 2013 Clarinova. This file is licensed under the terms of the Revised BSD License, included in this distribution as LICENSE.txt """ import pip from pip.commands import InstallCommand def install(install_dir,egg,url): initial_args = ['install', '--install-option=-...
import tkinter.ttk from mailtk.gui.autoscrollbar import AutoScrollbar from mailtk.gui.mixin import WidgetMixin from mailtk.gui.bmp import bmp_call class Threads(tkinter.ttk.Frame, WidgetMixin): thread_columns = ('sender', 'flag', 'size', 'date', 'excerpt') def __init__(self, parent): super().__init__...
import json import datetime import mimetypes from urllib.parse import urlparse from arcgis import env from arcgis.gis import GIS from arcgis.gis import Item from ._ref import reference class JournalStoryMap(object): """ Represents a Journal Story Map =============== ===================================...
""" Django settings for blog project. Generated by 'django-admin startproject' using Django 4.0.3. For more information on this file, see https://docs.djangoproject.com/en/4.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/4.0/ref/settings/ """ import os from p...
# coding: utf-8 """ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech """ ...
import unittest from collections import OrderedDict from spacy.lang.en import English from spacy.tokens.span import Span from medspacy_io.reader import EhostDocReader from medspacy_io.reader import EhostDirReader from PyRuSH import PyRuSHSentencizer from medspacy_io.vectorizer import Vectorizer from spacy.tokens.doc ...
# Generated by Django 2.2.9 on 2020-02-25 11:21 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('waldur_rancher', '0013_remove_cluster_initial_data'), ] operations = [ migrations.AlterUniqueTogether( name='cluster', uniqu...
from django.core.management.base import BaseCommand from pjbook.utils import setup_project class Command(BaseCommand): help = 'Saves current category structure as a json file' def handle(self, *args, **options): from django.core import management setup_project(force=True) management.c...
"""Provides an extension to use colon to separate filter and its arguments Jinja uses `{{a | filter(arg)}}`, but liquid uses `{{a | filter: arg}}` """ from typing import Iterable from jinja2.ext import Extension from jinja2.lexer import ( TOKEN_ASSIGN, TOKEN_BLOCK_END, TOKEN_COLON, TOKEN_LPAREN, TO...