gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
from __future__ import unicode_literals
import datetime
from django.contrib import admin
from django.contrib.admin.options import IncorrectLookupParameters
from django.contrib.admin.templatetags.admin_list import pagination
from django.contrib.admin.tests import AdminSeleniumWebDriverTestCase
from django.contrib.admi... | |
"""Access to Python's configuration information."""
import os
import sys
from os.path import pardir, realpath
__all__ = [
'get_config_h_filename',
'get_config_var',
'get_config_vars',
'get_makefile_filename',
'get_path',
'get_path_names',
'get_paths',
'get_platform',
'get_python_ve... | |
#!/usr/bin/python
from simple_salesforce import Salesforce
try:
from collections import OrderedDict
except ImportError:
from ordereddict import OrderedDict
from pyspark import Row
from pyspark.sql.types import *
#from pyspark.sql.functions import *
from optparse import OptionParser
from pyspark.sql import Data... | |
#!/usr/bin/python2.7
""" Pi Garage Alert
Author: Richard L. Lynch <rich@richlynch.com>
Description: Emails, tweets, or sends an SMS if a garage door is left open
too long.
Learn more at http://www.richlynch.com/code/pi_garage_alert
"""
##############################################################################
#... | |
"""Middleware to handle forwarded data by a reverse proxy."""
from __future__ import annotations
from collections.abc import Awaitable, Callable
from ipaddress import IPv4Network, IPv6Network, ip_address
import logging
from types import ModuleType
from typing import Literal
from aiohttp.hdrs import X_FORWARDED_FOR, X... | |
# -*- coding: utf-8 -*-
# Open Source Initiative OSI - The MIT License (MIT):Licensing
#
# The MIT License (MIT)
# Copyright (c) 2012 DotCloud Inc (opensource@dotcloud.com)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Softwa... | |
# Copyright 2012 OpenStack Foundation.
# 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 req... | |
__author__ = 'Antonio Segura Cano'
import os
import re
import numpy as np
# We'll create a FSMachine class
# FSMachine class will generate all methods about the program
# A random FSMachine: FSMachine.random
# KISS2 headers include the following information:
#
# .i # number of inputs
# .o # number ... | |
"""Provide access to Python's configuration information. The specific
configuration variables available depend heavily on the platform and
configuration. The values may be retrieved using
get_config_var(name), and the list of variables is available via
get_config_vars().keys(). Additional convenience functions are a... | |
#!/usr/bin/env python
#
# Copyright (c) 2016, The OpenThread Authors.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright
# notic... | |
# Copyright 2018 The Cirq Developers
#
# 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 ... | |
"""sympify -- convert objects SymPy internal format"""
# from basic import Basic, BasicType, S
# from numbers import Integer, Real
import decimal
class SympifyError(ValueError):
def __init__(self, expr, base_exc=None):
self.expr = expr
self.base_exc = base_exc
def __str__(self):
if sel... | |
# Copyright (c) 2021, Manfred Moitzi
# License: MIT License
import pytest
import ezdxf
from ezdxf.entities import MPolygon
from ezdxf.lldxf.tagwriter import TagCollector, basic_tags_from_text
# MPolygon is similar to Hatch
@pytest.fixture
def entity():
return MPolygon.from_text(MPOLYGON_NO_FILL)
def test_if_... | |
# -*- coding: utf-8 -*-
"""
Public Python API to create CMS contents.
WARNING: None of the functions defined in this module checks for permissions.
You must implement the necessary permission checks in your own code before
calling these methods!
"""
import datetime
from django.contrib.sites.models import Site
from dj... | |
# -*- coding: utf8 -*-
import json
import logging
from enum import Enum
from typing import List, Dict, Any, NamedTuple, Optional
import requests
__original_author__ = "enginebai"
logger = logging.getLogger(__name__)
# send message fields
RECIPIENT_FIELD = "recipient"
MESSAGE_FIELD = "message"
ATTACHMENT_FIELD = "at... | |
# 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 the Li... | |
from django.test import TestCase
from dwitter.templatetags.insert_magic_links import insert_magic_links
class DweetTestCase(TestCase):
def test_insert_magic_links_bypasses_html(self):
self.assertEqual(
'prefix <h1>content</h1> suffix',
insert_magic_links('prefix <h1>content</h1> su... | |
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Font(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "pointcloud.hoverlabel"
_path_str = "pointcloud.hoverlabel.font"
_valid_props = {"color", "colo... | |
import os, sys, logging, re
import code
from PyQt5 import QtWidgets, QtGui, QtCore
from PyQt5.QtCore import Qt
from copper import hou
from .base_panel import BasePanel
from .python_syntax_highlighter import PythonHighlighter
logger = logging.getLogger(__name__)
class PythonShellPanel(BasePanel):
def __init__(... | |
# Copyright 2020 The TensorFlow 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | |
from direct.directnotify import DirectNotifyGlobal
from direct.showbase import DirectObject
from pandac.PandaModules import *
import random
from toontown.hood import ZoneUtil
from toontown.toonbase import ToontownGlobals
class HoodMgr(DirectObject.DirectObject):
notify = DirectNotifyGlobal.directNotify.newCatego... | |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'res/designer/problems/ventilationwidget.ui'
#
# Created: Tue Feb 16 12:16:15 2016
# by: pyside-uic 0.2.15 running on PySide 1.2.4
#
# WARNING! All changes made in this file will be lost!
from PySide import QtCore, QtGui
class Ui_Venti... | |
# -*- coding: utf-8 -*-
'''
canteen datastructures
~~~~~~~~~~~~~~~~~~~~~~
lightweight datastructures for use inside and outside
:py:class:`canteen`.
:author: Sam Gammon <sam@keen.io>
:copyright: (c) Keen IO, 2013
:license: This software makes use of the MIT Open Source License.
A copy of t... | |
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# The MIT License (MIT)
#
# Copyright (c) 2014 Bartosz Janda
#
# 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... | |
import requests
import unittest
import json
protocol = "http"
#host = "tactile-petal-92303.appspot.com"
host = "localhost:8080"
def genUrl(URI):
return "%s://%s/%s" %(protocol, host, URI)
class CreateUserIDTest(unittest.TestCase):
"""Create User test case"""
# preparing to test
def setUp(self)... | |
from .models import ReceiptFile, RealThingSize, ExchangeInvolvement, MoneyBag, MoneyBagPiece, Exchange, PaymentMethod, Pledge
from what_apps.people.models import GenericParty
def exchange_with_other_party(party, member, receipt_image=None, date=None):
'''
Dehydration Function.
Takes the na... | |
from twisted.application.service import Service
from twisted.internet import reactor
from twisted.internet.defer import Deferred, DeferredList
from twisted.internet.protocol import ReconnectingClientFactory
from twisted.protocols.basic import Int32StringReceiver
from carbon.conf import settings
from carbon.util import ... | |
#
# ------------------------------------------------------------
# Copyright (c) All rights reserved
# SiLab, Institute of Physics, University of Bonn
# ------------------------------------------------------------
#
import logging
from copy import deepcopy
from collections.abc import Iterable
import array
from collect... | |
#
# 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... | |
#!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... | |
#! usr/bin/python3
# -*- coding: utf8 -*-
#
# Flicket - copyright Paul Bourne: evereux@gmail.com
import datetime
from flask import flash
from flask import g
from flask import redirect
from flask import render_template
from flask import request
from flask import url_for
from flask_babel import gettext
from flask_login... | |
"""
Set up the demo environment that mimics interaction with devices.
For more details about this component, please refer to the documentation
https://home-assistant.io/components/demo/
"""
import asyncio
import time
from homeassistant import bootstrap
import homeassistant.core as ha
from homeassistant.const import A... | |
#!/usr/bin/env python
import subprocess
import datetime
import praw
import pyperclip
from hashlib import sha1
from flask import Flask
from flask import Response
from flask import request
from cStringIO import StringIO
from base64 import b64encode
from base64 import b64decode
from ConfigParser import ConfigParser
impor... | |
import tensorflow as tf
import sys
import time
import os
# Set train_nn to True for training the neural network or False for performing classification.
train_nn = True
if train_nn == False :
# If the following is set to True, training will start if no checkpoint is found in the
# current directry.
continue_trai... | |
# -*- cpy-indent-level: 4; indent-tabs-mode: nil -*-
# ex: set expandtab softtabstop=4 shiftwidth=4:
#
# Copyright (C) 2013,2014,2015,2017 Contributor
#
# 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 Li... | |
#!/usr/bin/env python
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 Nicira Networks, 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
#
# ... | |
# Copyright 2015 Amazon.com, Inc. or its affiliates. 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. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompa... | |
"""Generic Z-Wave Entity Classes."""
import copy
import logging
from openzwavemqtt.const import (
EVENT_INSTANCE_STATUS_CHANGED,
EVENT_VALUE_CHANGED,
OZW_READY_STATES,
CommandClass,
ValueIndex,
)
from openzwavemqtt.models.node import OZWNode
from openzwavemqtt.models.value import OZWValue
from ho... | |
#
# 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 us... | |
# Copyright (c) 2013 Qubell Inc., http://qubell.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
#
# Unless required by applicable law or agr... | |
__author__ = 'MegabytePhreak'
import types
def _indent(level):
if level > 0:
return ' '*level
return ''
class AstNode(object):
pass
def pprint(self, level=0):
pass
def __str__(self):
return self.pprint(0)
class Subscript(AstNode):
def __init__(self, name, inde... | |
# (c) 2005 Ian Bicking and contributors; written for Paste (http://pythonpaste.org)
# Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
"""Routines to generate WSGI responses"""
############################################################
## Headers
####################################... | |
from aiolocust.core import HttpLocust, Locust, TaskSet, task, events
from aiolocust import ResponseError, InterruptTaskSet
from aiolocust.exception import CatchResponseError, RescheduleTask, RescheduleTaskImmediately, LocustError
from aiolocust.test.testcases import LocustTestCase, WebserverTestCase
class TestTaskSe... | |
from musp import *
from math import pi, sin, cos
from random import random
import numpy as np
tonic_freq = PitchedSound.note_frequency("F#", 3)
tempo_dur = 2.6/7
datadir = os.path.expanduser("~/.mu-sp")
def aulib(sound_dir):
return os.path.join(datadir, "audio", sound_dir)
def rhlib(rh_name):
return os.path... | |
"""Processing and presentation of computed data
Result objects hold computed data and offer postprocessing and plotting functions
which are specifically adapted to the nature of the stored data.
"""
from copy import copy
import numpy as np
import matplotlib.pyplot as plt
from . import pltutils
from .utils import wit... | |
"""
Proximal operators / mappings
"""
import numpy as np
from abc import ABCMeta, abstractmethod
from functools import wraps
from scipy.optimize import minimize as scipy_minimize
from scipy.sparse import spdiags
from scipy.sparse.linalg import spsolve
try:
from skimage.restoration import denoise_tv_bregman
except... | |
# Copyright 2015 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... | |
from __future__ import unicode_literals
from moto.core import BaseBackend, BaseModel
from moto.ec2 import ec2_backends
import uuid
import datetime
from random import choice
from .exceptions import ResourceNotFoundException, ValidationException
class OpsworkInstance(BaseModel):
"""
opsworks maintains its own ... | |
import graph
import probabilisticstate as pst
from scipy import stats
from random import random as rd
'''
Probabilistic version of a graph. It uses probabilistic states instead of
common states. This allows for a method that computes statistical tests of two
states' morphs, create randomly generated sequences and use ... | |
import json
import logging
import os
import sys
from pprint import pprint
from google.cloud import storage
from google.api_core.exceptions import NotFound
from rdr_service.config import PUBSUB_NOTIFICATION_BUCKETS_PROD, PUBSUB_NOTIFICATION_BUCKETS_SANDBOX
from rdr_service.tools.tool_libs.tool_base import cli_run, Too... | |
#!/usr/bin/env python
import roslib
import rospy
import smach
import smach_ros
from smach import StateMachine
import actionlib
import time
import threading
from smach_ros import SimpleActionState
from smach_ros import ActionServerWrapper
from std_msgs.msg import String, Float64, UInt8, Bool
from wm_interpreter.msg imp... | |
import logging
import itertools
import numpy as np
from copy import deepcopy
from pycqed.measurement.waveform_control import element
from pycqed.measurement.waveform_control import pulse
from pycqed.measurement.waveform_control import sequence
from pycqed.utilities.general import add_suffix_to_dict_keys
from pycqed.mea... | |
# Copyright 2013 - Rackspace US, 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 applicable law or agreed to in... | |
from __future__ import division, absolute_import, print_function
import re
import os
import sys
import warnings
import platform
import tempfile
from subprocess import Popen, PIPE, STDOUT
from numpy.distutils.fcompiler import FCompiler
from numpy.distutils.exec_command import exec_command
from numpy.distutils.misc_uti... | |
# Copyright (C) Mesosphere, Inc. See LICENSE file for details.
import copy
import pytest
import requests
from generic_test_code.common import (
generic_correct_upstream_dest_test,
generic_correct_upstream_request_test,
generic_upstream_headers_verify_test,
generic_no_slash_redirect_test,
)
class Te... | |
# Copyright 2019 DeepMind Technologies Limited. 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 ... | |
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
#
# Copyright 2021 The NiPreps Developers <nipreps@gmail.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... | |
# -*- coding: utf-8 -*-
import json
import os
import socket
from django import forms
from django.conf import settings
from django.db.models import Q
from django.forms.models import modelformset_factory
from django.utils.safestring import mark_safe
from django.utils.encoding import force_unicode
import commonware
impo... | |
#
# 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
# ... | |
import warnings
from collections import namedtuple, defaultdict
#Node = namedtuple('Node', ('id', 'data', 'edges', 'in_edges'))
#Edge = namedtuple('Edge', ('start', 'end', 'label', 'data', 'directed'))
class MiniGraphError(Exception): pass
class MiniGraphWarning(Warning): pass
# todo: consider functools.lru_cache f... | |
import tkinter as tk
from tkinter import ttk
import tkinter.font as tkFont
import tkinter.filedialog as tkfd
import tkinter.messagebox as tkmb
import os
import string
import pkgutil
from sol.config import GlobalConfig
C = GlobalConfig()
import sol.themes
class SetupGui:
def __init__(self, rootwin=None, parent=N... | |
import json
import random
import uuid
import zipfile
from django import forms
from django.conf import settings
from django.core.cache import cache
from django.db.models import Q
from django.utils.translation import ugettext
import olympia.core.logger
from olympia import amo
from olympia.lib.cache import memoize, mem... | |
from android.runnable import run_on_ui_thread
from jnius import autoclass
from jnius import java_method
from jnius import PythonJavaClass
from plyer.facades import STT
from plyer.platforms.android import activity
ArrayList = autoclass('java.util.ArrayList')
Bundle = autoclass('android.os.Bundle')
Context = autoclass... | |
# Copyright 2012 SINA Corporation
# Copyright 2014 Cisco Systems, 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/licens... | |
#!/usr/bin/python
import json
from optparse import OptionParser
import os
import shlex
import shutil
import signal
import socket
from subprocess import Popen, CalledProcessError, PIPE
import sys
import time
import urllib
import MySQLdb
options = None
devnull = open('/dev/null', 'w')
vttop = os.environ['VTTOP']
vtroo... | |
# Copyright 2014 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 alerts
import internal_alerts
import json
import random
import string
import unittest
import webtest
from google.appengine.api import memcache
from g... | |
"""Nearly exact trust-region optimization subproblem."""
from __future__ import division, print_function, absolute_import
import numpy as np
from scipy.linalg import (norm, get_lapack_funcs, solve_triangular,
cho_solve)
from ._trustregion import (_minimize_trust_region, BaseQuadraticSubproble... | |
#!/usr/bin/env python
"""Parser for reaction strings and files."""
import libsbml
import re
import sympy as sp
from sympy.abc import _clash
from .crncomplex import Complex
from .reaction import Reaction
__author__ = "Elisa Tonello"
__copyright__ = "Copyright (c) 2016, Elisa Tonello"
__license__ = "BSD"
__version__ ... | |
# 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... | |
"""iptables helper functions.
Unlike the `firewall` module, these functions know nothing about PaaSTA and
could effectively be a third-party library. They just make working with
iptables a little bit easier.
"""
import collections
import contextlib
import logging
import iptc
log = logging.getLogger(__name__)
RULE_... | |
# LIBTBX_SET_DISPATCHER_NAME kamo.resolve_indexing_ambiguity
"""
(c) RIKEN 2015. All rights reserved.
Author: Keitaro Yamashita
This software is released under the new BSD License; see LICENSE.
"""
from yamtbx.dataproc.auto.multi_merging.resolve_reindex import ReferenceBased, BrehmDiederichs, KabschSelectiveBreeding... | |
try:
import cStringIO as StringIO
except ImportError:
import StringIO
import poplib
import time
from mailbox import Mailbox, Message
import mailpile.mailboxes
from mailpile.conn_brokers import Master as ConnBroker
from mailpile.i18n import gettext as _
from mailpile.i18n import ngettext as _n
from mailpile.ma... | |
"""Support for water heater devices."""
from datetime import timedelta
import logging
import functools as ft
import voluptuous as vol
from homeassistant.helpers.temperature import display_temp as show_temp
from homeassistant.util.temperature import convert as convert_temperature
from homeassistant.helpers.entity_comp... | |
#!/usr/bin/python3
# vim: sw=4 et
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# This program 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 2 of the License, or
# (at your opti... | |
import asyncio
from collections import OrderedDict
from functools import wraps
from itertools import zip_longest
import hashlib
import logging
import pickle
import random
import socket
logger = logging.getLogger(__name__)
def remote(func):
'''
Indicates that this instance method defines a remote procedure c... | |
#!/usr/bin/env python
'''
'''
__docformat__ = 'restructuredtext'
__version__ = '$Id: $'
import sys
import threading
import Queue
from pyglet import app
from pyglet import clock
from pyglet import event
_is_epydoc = hasattr(sys, 'is_epydoc') and sys.is_epydoc
class PlatformEventLoop(object):
''' Abstract class... | |
# -*- coding: utf-8 -*-
# Natural Language Toolkit: Transformation-based learning
#
# Copyright (C) 2001-2015 NLTK Project
# Author: Marcus Uneson <marcus.uneson@gmail.com>
# based on previous (nltk2) version by
# Christopher Maloof, Edward Loper, Steven Bird
# URL: <http://nltk.org/>
# For license information, see... | |
#!/usr/bin/env python
#
# Copyright 2009 Facebook
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | |
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import absolute_import
from .build import build_server
from . import errors
from . import pilot
from . import db
from .context import Context
from . import tags
from .tags import cookie
from .logtools import LoggerFile
from .... | |
# Copyright 2019 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.
"""XCode test log parser."""
import json
import logging
import os
import plistlib
import re
import shutil
import subprocess
import sys
import file_util
fro... | |
from django.conf import settings
from django.contrib.auth.models import User
from django.contrib.auth.decorators import login_required
from django.contrib.postgres.search import SearchQuery
from django.contrib.postgres.search import SearchVector
from django.core.files.storage import get_storage_class
from django.db imp... | |
# from ..utils.event import Eventful
from wasm.immtypes import (
LocalVarXsImm,
GlobalVarXsImm,
MemoryImm,
CurGrowMemImm,
I32ConstImm,
I64ConstImm,
F32ConstImm,
F64ConstImm,
)
import struct
from ctypes import c_int32
from .types import (
I32,
I64,
F32,
F64,
Value_t,
... | |
"""The script used to train the model."""
import os
import sys
import getopt
import numpy as np
import models as m
from tqdm import tqdm
from keras.optimizers import Adam
from util.data import TwoImageIterator
from util.util import MyDict, log, save_weights, load_weights, load_losses, create_expt_dir
def print_help... | |
import os
from functools import partial
import datetime
import unittest
from mock import patch
from ..api_client import ApiClient
from ..configuration import ApiConfiguration
from .. import models
test_dict = {
'name': 'Test Name',
'display_name': 'Test Display Name',
'data_format': 'Test Format',
}
cl... | |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# ---------------------------------------------------------------------
# Program: build.py
# Author: Mauricio Caceres Bravo <mauricio.caceres.bravo@gmail.com>
# Created: Sun Oct 15 10:26:39 EDT 2017
# Updated: Wed Feb 02 11:44:49 EST 2022
# Purpose: Main build file for ... | |
import json
import logging
from threading import RLock
import time
from api.caching.instance_codes import consumeCode, unconsumeCode
from api.caching.instance_lifetime import removeInstance, addInstance, setInstanceTemporalSourceLastTime
from api.caching.temporal_analytics import getTemporalInfluenceCollection, addTemp... | |
# 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 ... | |
# Copyright 2013 Rackspace Hosting 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 re... | |
# import the necessary packages
from __future__ import print_function
from google.protobuf import text_format
from cStringIO import StringIO
from PIL import Image
import scipy.ndimage as nd
import numpy as np
import caffe
import os
class BatCountry:
def __init__(self, base_path, deploy_path, model_path,
patch_model... | |
# -*- coding: utf-8 -*-
# Copyright 2022 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | |
##
# Copyright (c) 2010-2017 Apple Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | |
# Copyright 2014 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | |
#!/usr/bin/env python
"""
Handler library for Linux IaaS
JSON def:
HandlerEnvironment.json
[{
"name": "ExampleHandlerLinux",
"seqNo": "seqNo",
"version": "1.0",
"handlerEnvironment": {
"logFolder": "<your log folder location>",
"configFolder": "<your config folder location>",
"statusFolder": "<you... | |
# -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2018-01-15 23:04
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('ringapp', '0041_auto_20171021_2116'),
]
operations = [
migrations.RemoveFie... | |
# Copyright (c) 2012 Rackspace Hosting
# 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 req... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2009-2016, Mario Vilas
# 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... | |
#!/usr/bin/env python
#
# Copyright 2010 Google 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 applicable law o... | |
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
from builtins import object
from pyMKL import pardisoinit, pardiso, mkl_get_version
from ctypes imp... | |
# Copyright 2017 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... | |
"""SCons.Executor
A module for executing actions with specific lists of target and source
Nodes.
"""
#
# __COPYRIGHT__
#
# 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.