gt
stringclasses
1 value
context
stringlengths
2.49k
119k
from __future__ import print_function from __future__ import division from __future__ import unicode_literals from collections import Counter import warnings import numpy as np from sklearn import metrics from sklearn.naive_bayes import GaussianNB from sklearn.naive_bayes import BaseDiscreteNB from mipframework impo...
# Copyright (c) 2013 NTT DOCOMO, 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 requ...
# Copyright (c) 2012 OpenStack Foundation. # # 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...
from lib.hachoir_metadata.metadata import RootMetadata, registerExtractor from lib.hachoir_metadata.image import computeComprRate from lib.hachoir_parser.image.exif import ExifEntry from lib.hachoir_parser.image.jpeg import ( JpegFile, JpegChunk, QUALITY_HASH_COLOR, QUALITY_SUM_COLOR, QUALITY_HASH_GRAY, QUA...
""" path.py - An object representing a path to a file or directory. Example: from path import path d = path('/home/guido/bin') for f in d.files('*.py'): f.chmod(0755) This module requires Python 2.2 or later. URL: http://www.jorendorff.com/articles/python/path Author: Jason Orendorff <jason.orendorff\x40g...
# Copyright (c) 2013 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 ...
#!/usr/bin/env python # Copyright 2013 the V8 project 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: # # * Redistributions of source code must retain the above copyright # notice...
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, Inc. # # 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 3 of the Lic...
""" This module provides Trainer classes that given a set of flags, create, initialize and train a model. These classes use Runner objects to handle multigpu/singlegpu training. """ import six import math import time import os import numpy as np import tensorflow as tf from cleverhans.utils_tf import batch_indices fr...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """An extensible ASCII table reader and writer. latex.py: Classes to read and write LaTeX tables :Copyright: Smithsonian Astrophysical Observatory (2011) :Author: Tom Aldcroft (aldcroft@head.cfa.harvard.edu) """ import re from . import core latexdi...
"""Test the FissionYieldHelpers""" import os from collections import namedtuple from unittest.mock import Mock import bisect import pytest import numpy as np import openmc from openmc import lib from openmc.deplete.nuclide import Nuclide, FissionYieldDistribution from openmc.deplete.helpers import ( FissionYieldC...
# Copyright 2011 Nicholas Bray # # 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...
from pdb import set_trace import json import os import random import re import sys from textblob import TextBlob from botfriend.bot import TextGeneratorBot from olipy import corpora from wordfilter import blacklisted class IAMAExtractor(object): re_parts = [ "[^.]+[!.] [^.]+[!.]", "[^.]+[!.\n]", ...
#------------------------------------------------------------------------------ # Copyright (C) 2009 Richard W. Lincoln # # 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 restrictio...
# # Copyright (C) 2008 The Android Open Source Project # # 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...
#!/usr/bin/python # Copyright (c) Facebook, Inc. and its affiliates. """Module to interact with the Adobe User Management API.""" from __future__ import print_function import json import os import platform import random import sys import time try: import jwt import requests except ImportError: print("Miss...
# -*- coding: utf-8 -*- """This file contains the interface for ESE database plugins.""" import construct import logging import pyesedb from plaso.lib import errors from plaso.parsers import plugins class EseDbPlugin(plugins.BasePlugin): """The ESE database plugin interface.""" NAME = u'esedb' BINARY_DATA_...
#!/usr/bin/python # $Id:$ import ctypes import math import sys import threading import time import pyglet _debug = pyglet.options['debug_media'] import mt_media from . import lib_dsound as lib from pyglet.window.win32 import user32, kernel32 class DirectSoundException(mt_media.MediaException): pass def _db...
#!/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...
# Copyright 2011, OpenStack Foundation # Copyright 2012, Red Hat, Inc. # Copyright 2013 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/li...
from flask import Response, jsonify, request, abort, redirect, url_for from flask_cors import cross_origin from flask_user import current_user from functools import wraps from bootstrap import app, db from resolver import resolve_dbo from config import GEOTAGS_API_PREFIX from shapely.geometry import asShape import geoj...
# Copyright 2013: Mirantis 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 b...
"""Testing for K-means""" import sys import numpy as np from scipy import sparse as sp from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_array_equal from sklearn.utils.testing import assert_array_almost_equal from sklearn.utils.testing import SkipTest from sklearn.utils.testing i...
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from collections import namedtuple, OrderedDict import itertools import json from six import string_types from six.moves.urllib import parse import requests from pydrui...
# -*- coding: utf-8 -*- """ Created on Fri Mar 3 18:15:07 2017 @author: camacho """ import Kernel;reload(Kernel);kl=Kernel import Kernel_likelihood;reload(Kernel_likelihood);lk=Kernel_likelihood import Kernel_optimization;reload(Kernel_optimization);opt=Kernel_optimization import RV_function;reload(RV_function);RVf...
# coding=utf-8 # Copyright 2022 The Google Research 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 applicab...
import datetime import json import logging import tba_config from google.appengine.ext import deferred from google.appengine.ext import ndb from google.appengine.api import urlfetch from controllers.apiv3.model_properties import filter_match_properties from database.dict_converters.match_converter import MatchConvert...
# -*- coding: utf-8 -*- import abc from django.contrib.contenttypes.models import ContentType from denorm.db import triggers from django.db import connection from django.db.models import sql, ManyToManyField from django.db.models.fields.related import ManyToManyField from django.db.models.manager import Manager from d...
#!/usr/bin/env python # Copyright 2015 The Kubernetes 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 appli...
# Copyright 2017 Mycroft AI 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 writin...
import os import sys from ._compat import _default_text_stderr from ._compat import _default_text_stdout from ._compat import _find_binary_writer from ._compat import auto_wrap_for_ansi from ._compat import binary_streams from ._compat import filename_to_ui from ._compat import get_filesystem_encoding from ._compat im...
#!/usr/bin/python from time import gmtime, strftime import subprocess import json time = strftime("%Y-%m-%d %H:%M:%S", gmtime()) def getAllSizes(): locations = json.loads(subprocess.check_output(['az', 'account', 'list-locations'])) sizeMap = {} for location in locations: sizes = json.loads(subp...
#!/usr/bin/python # """ Class implementation for devices for Holiday by MooresCloud Right now we understand four different classes of devices: GPIO by Linux Light by MooresCloud Holiday by MooresCloud EngineRoom Chippendale by MooresCloud Hue by Philips WeMo by Belkin Homepage and documentation: http://dev.moore...
# Copyright 2013 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 random import unittest from metrics.rendering_stats import UI_COMP_NAME, BEGIN_COMP_NAME, END_COMP_NAME from metrics.rendering_stats import GetScroll...
#!/usr/bin/env python # # Copyright (C) 2014 Narf Industries <info@narfindustries.com> # # 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 # th...
""" Tray icon for udiskie. """ from gi.repository import Gio from gi.repository import Gtk from .async_ import run_bg, Future from .common import setdefault, DaemonBase, cachedmethod from .locale import _ from .mount import Action, prune_empty_node from .prompt import Dialog from .icons import IconDist import os _...
# -*- coding: utf-8 -*- # ============================================================================= # Federal University of Rio Grande do Sul (UFRGS) # Connectionist Artificial Intelligence Laboratory (LIAC) # Renato de Pontes Pereira - rppereira@inf.ufrgs.br # ======================================================...
# # 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/python # -*- coding: utf-8 -*- from uuid import uuid4 from datetime import datetime from ujson import dumps import sqlalchemy as sa from sqlalchemy.orm import relationship from holmes.models import Base class Review(Base): __tablename__ = "reviews" id = sa.Column(sa.Integer, primary_key=True) ...
# -*- coding: utf-8 -*- from gluon import current from s3 import * from s3layouts import * try: from .layouts import * except ImportError: pass import s3menus as default class S3MainMenu(default.S3MainMenu): """ Custom Application Main Menu: The main menu consists of several sub-menus, ea...
from django import template from django.conf import settings from django.contrib.auth.models import User from django.core.urlresolvers import reverse from django.test import TestCase from oauth2 import Client from socialregistration.signals import login, connect import mock import urllib import urlparse class Template...
#!/usr/bin/env python # # Copyright 2007 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...
#/usr/bin/env python """ glext-emu - code generator scripts helper module Copyright (c) 2013 Leszek Godlewski 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 withou...
""" These algorithms are concerned with finding corners in a path. A path is a list of (x,y) points. They return a list of corners which does not include the endpoints of the path. There are different criteria depending on the color/type of the line for finding corners. For example, we can be stricter about finding c...
# -*- coding: utf-8 -*- r""" The :mod:`pygsp.plotting` module implements functionality to plot PyGSP objects with a `pyqtgraph <https://www.pyqtgraph.org>`_ or `matplotlib <https://matplotlib.org>`_ drawing backend (which can be controlled by the :data:`BACKEND` constant or individually for each plotting call). Most ...
# Copyright (c) 2014 The Johns Hopkins University/Applied Physics Laboratory # 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/LICEN...
"""Tests the substate_context Written by Peter Duerr """ from __future__ import print_function from __future__ import unicode_literals from __future__ import division from __future__ import absolute_import import unittest import threading import multiprocessing from six import StringIO from pyexperiment import state...
#!/usr/bin/env python ############################################################################### # Copyright 2017 The Apollo 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 ...
from monsterrules.common import * from data.models import Monster, Profile from collections import OrderedDict class CoreMonsterBuilder(MonsterBuilder): """A MonsterBuilder for the core rules. Builds a monster based on the rules presented in the published version of Dungeon World.""" def __init__(self): ...
import json import us from django.shortcuts import render, get_object_or_404 from django.db.models import Count from openstates.data.models import LegislativeSession, Person from utils.common import abbr_to_jid, sessions_with_bills, states from django.views.decorators.http import require_http_methods from django.views....
#!/usr/bin/env python import subprocess import praw import datetime 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...
# Natural Language Toolkit: CONLL Corpus Reader # # Copyright (C) 2001-2011 NLTK Project # Author: Steven Bird <sb@ldc.upenn.edu> # Edward Loper <edloper@gradient.cis.upenn.edu> # URL: <http://www.nltk.org/> # For license information, see LICENSE.TXT """ Read CoNLL-style chunk fileids. """ import os im...
#!/usr/bin/python # # Copyright (C) 2010 Leandro Lisboa Penz <lpenz@lpenz.org> # This file is subject to the terms and conditions defined in # file 'LICENSE.txt', which is part of this source code package. import re import urllib import base64 from xml.etree import ElementTree try: import httplib except ImportErro...
# -*- coding: UTF-8 -*- import simplejson from jukebox.jukebox_core.tests.api import ApiTestBase class ApiQueueTest(ApiTestBase): def testIndexEmpty(self): result = simplejson.loads( self.httpGet( "/api/v1/queue" ).content ) self.assertEquals(len(res...
from __future__ import unicode_literals import os import re from django.utils import six from django.utils.six.moves import range from reviewboard.diffviewer.processors import (filter_interdiff_opcodes, post_process_filtered_equals) class MoveRange(object): """Sto...
import os import tempfile import pytest from pyjob.exception import PyJobError from pyjob.script import ( LocalScriptCreator, Script, ScriptCollector, ScriptProperty, is_valid_script_path, ) class TestScriptCollector(object): def test_1(self): sc = ScriptCollector([]) assert s...
# # 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 # ...
# Copyright (C) 2016 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # pylint: disable=maybe-no-member """Test request import and updates.""" from nose.plugins import skip from ggrc import models from ggrc.converters import errors from integration.ggrc import converters ...
# Copyright 2013, Big Switch Networks, 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...
import time import numpy as np try: import matplotlib.pyplot as plt has_mpl = True except ImportError: has_mpl = False print 'Warning: findlines.py: No matplotlib found' print ' Some plotting routines are disabled' #from sigma_clip import sigma_clipping # TBD: Should this be separated in c...
"""Helper classes for Google Assistant integration.""" from asyncio import gather from collections.abc import Mapping import logging import pprint from typing import List, Optional from aiohttp.web import json_response from homeassistant.core import Context, callback, HomeAssistant, State from homeassistant.helpers.e...
# -*- coding: utf-8 -*- """ Test cases related to SAX I/O """ import unittest, sys, os.path this_dir = os.path.dirname(__file__) if this_dir not in sys.path: sys.path.insert(0, this_dir) # needed for Py3 from common_imports import HelperTestCase, doctest, make_doctest, BytesIO, _bytes from lxml import sax from ...
# Copyright (C) 2013-2015 MetaMorph Software, Inc # Permission is hereby granted, free of charge, to any person obtaining a # copy of this data, including any software or models in source or binary # form, as well as any drawings, specifications, and documentation # (collectively "the Data"), to deal in the Data witho...
from ee.cli.plugins.stack import EEStackController from ee.core.fileutils import EEFileUtils from ee.core.mysql import * from ee.core.shellexec import * from ee.core.variables import EEVariables from ee.cli.plugins.sitedb import * from ee.core.aptget import EEAptGet from ee.core.git import EEGit from ee.core.logging im...
# # 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...
# This file helps to compute a version number in source trees obtained from # git-archive tarball (such as those provided by githubs download-from-tag # feature). Distribution tarballs (built by setup.py sdist) and build # directories (produced by setup.py build) will contain a much shorter file # that just contains t...
# config.py # Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors # # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php """Module containing module parser implementation able to properly read and write configuration files"...
""" Parsers are used to parse the content of incoming HTTP requests. They give us a generic way of being able to handle various media types on the request, such as form content or json encoded data. """ from __future__ import unicode_literals from django.conf import settings from django.core.files.uploadhandler import...
import warnings import numpy as np from sklearn.cluster import KMeans, AgglomerativeClustering from sklearn.exceptions import ConvergenceWarning from scipy.optimize import minimize, OptimizeWarning from skgstat.util import shannon_entropy def even_width_lags(distances, n, maxlag): """Even lag edges Calculat...
from direct.distributed import DistributedObject from direct.directnotify import DirectNotifyGlobal from toontown.toonbase import ToontownGlobals from panda3d.core import * from panda3d.direct import * from math import * import math from direct.fsm.FSM import FSM from toontown.minigame import ArrowKeys from direct.show...
"""Extract reference documentation from the NumPy source tree. """ import inspect import textwrap import re import pydoc from warnings import warn # Try Python 2 first, otherwise load from Python 3 try: from StringIO import StringIO except: from io import StringIO class Reader(object): """A line-based s...
# -*- coding: utf-8 -*- from os import path try: import json # try stdlib (Python 2.6) except ImportError: try: import simplejson as json # try external module except: import gluon.contrib.simplejson as json # fallback to pure-Python module from gluon import * from gluon.storage import St...
import argparse import asyncio import logging.config import multiprocessing.connection import operator import os import signal import sys import time from functools import partial, reduce from pathlib import Path from urllib.parse import splittype # type: ignore from urllib.request import urlopen from . import utils ...
"""Tests for modularity code. """ #----------------------------------------------------------------------------- # Library imports #----------------------------------------------------------------------------- # Stdlib import os import copy import math import time # Third party import networkx as nx import numpy as ...
# Copyright (C) 2013-2015 The python-bitcoinlib developers # # This file is part of python-bitcoinlib. # # It is subject to the license terms in the LICENSE file found in the top-level # directory of this distribution. # # No part of python-bitcoinlib, including this file, may be copied, modified, # propagated, or dist...
#!/usr/bin/env python3 import codecs import configparser import difflib import json import logging import praw import prawcore import pdb import re import os import peewee import sys import time import traceback import urllib.parse from database import * from datetime import datetime from random import randint # Set ...
from __future__ import absolute_import from collections import namedtuple from copy import deepcopy import logging import random import sys import time import six from kafka.client import KafkaClient from kafka.common import ( OffsetFetchRequest, OffsetCommitRequest, OffsetRequest, FetchRequest, check_error,...
"""Finds out the ellipse that best fits to a set of data points and calculates its keplerian elements. """ import math import argparse import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D from scipy.optimize import minimize from functools import partial def __read_args(): ...
# -*- coding: utf-8 -*- import datetime from django.conf import settings from django.test import TestCase from haystack import connections, connection_router, reset_search_queries from haystack.backends import SQ, BaseSearchQuery from haystack.exceptions import FacetingError from haystack import indexes from haystack.m...
import unittest import sys from mock import patch from honeybadger import honeybadger from honeybadger.config import Configuration from honeybadger.contrib.flask import FlaskPlugin, FlaskHoneybadger PYTHON_VERSION = sys.version_info[0:2] class FlaskPluginTestCase(unittest.TestCase): def setUp(self): imp...
import sys import os from astropy.units import ys sys.path.insert(0, os.path.abspath('..')) import random import numpy as np from assignment1.cs231n.data_utils import load_CIFAR10 import matplotlib.pyplot as plt from assignment1.cs231n import data_utils from assignment1.cs231n.classifiers.softmax import softmax_loss_...
import warnings from enum import IntFlag from typing import Optional, Union from .. import xdr as stellar_xdr from ..keypair import Keypair from ..muxed_account import MuxedAccount from ..signer import Signer from ..strkey import StrKey from ..type_checked import type_checked from ..utils import raise_if_not_valid_ed2...
# Copyright 2020 DeepMind Technologies Limited. # # # 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 agre...
#!/usr/bin/env python3 from __future__ import print_function import argparse import importlib import os import matplotlib.pyplot as plt import compare from util import msg, profile, runparams, io valid_solvers = ["advection", "advection_nonuniform", "advection_rk", ...
import os.path as osp import time import joblib import numpy as np import tensorflow as tf from baselines import logger from baselines.common import set_global_seeds, explained_variance from baselines.a2c.utils import discount_with_dones from baselines.a2c.utils import Scheduler, find_trainable_variables from baselin...
#!/usr/bin/env python ''' The MIT License (MIT) Copyright (c) <2016> <Mathias Lesche> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights ...
#!/usr/bin/env python #Copyright (C) 2006-2011 by Benedict Paten (benedictpaten@gmail.com) # #Released under the MIT license, see LICENSE.txt #!/usr/bin/env python import sys import os import re import bp.common.maths.Maths as Maths SUBTRACT_MAX = 10000000 class StateMachine: GAP = 0 MATCH = 1 def __in...
import unittest from meerkat_abacus import model from meerkat_abacus.codes.to_codes import to_code from meerkat_abacus.codes.variable import Variable from geoalchemy2.shape import from_shape from shapely.geometry import Polygon # Data for the tests class ToCodeTest(unittest.TestCase): """ Test the to_code fun...
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2017, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Cronvar Plugin: The goal of this plugin is to provide an idempotent # method for set cron variable values. It should play well with the # exi...
import numpy as np from scipy.linalg import norm import amnet from collections import deque import copy from math import isinf """ Contains routines for manipulating and simplifying Amn trees """ def compose_rewire(phi1, phi2): """ Given two AMNs and pointers to their input variables, rewires the first...
from SimPEG import Survey, Utils, Problem, Maps, np, sp, mkvc from simpegEM.FDEM.SurveyFDEM import SrcFDEM from simpegEM.Utils.EMUtils import omega from scipy.constants import mu_0 import sys from numpy.lib import recfunctions as recFunc from DataMT import DataMT from simpegMT.Sources import homo1DModelSource #########...
# Copyright (c) 2021 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...
# encoding: utf-8 import datetime from south.db import db from south.v2 import DataMigration from django.db import models class Migration(DataMigration): def forwards(self, orm): for page in orm.Page.objects.all(): if page.menu_login_required: page.limit_visibility_in_menu = 1 ...
# -*- coding: utf-8 -*- """ ulmo.lcra.hydromet.core ~~~~~~~~~~~~~~~~~~~~~~~ This module provides access to hydrologic and climate data in the Colorado River Basin (Texas) provided by the `Lower Colorado River Authority`_ `Hydromet`_ web site and web service. .. _Lower Colorado River Authority: ...
import json import urllib import urllib2, re from django.core.exceptions import ObjectDoesNotExist from django.db import models from django.template import defaultfilters from dateutil.parser import * from datetime import datetime from django.utils.timezone import utc from exceptions import YahooSearchException, Twitt...
# Copyright 2013 IBM Corp # 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 appl...
data = ( 'AUM', # 0x00 '', # 0x01 '', # 0x02 '', # 0x03 '', # 0x04 '', # 0x05 '', # 0x06 '', # 0x07 ' // ', # 0x08 ' * ', # 0x09 '', # 0x0a '-', # 0x0b ' / ', # 0x0c ' / ', # 0x0d ' // ', # 0x0e ' -/ ', # 0x0f ' +/ ', # 0x10 ' X/ ', # 0x11 ' /XX/ ', # 0x12 ' /X/ ...
import string from cachecow.cache import invalidate_namespace from django.conf import settings from django.core.exceptions import PermissionDenied from django.db import models from django.db.models import signals from django.utils.translation import ugettext, ugettext_lazy as _, pgettext_lazy from facebook import Grap...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import sys from django.apps.registry import Apps, apps from django.contrib.contenttypes.fields import ( GenericForeignKey, GenericRelation ) from django.contrib.contenttypes import management from django.contrib.contenttypes.models import ContentType...
# -*- coding: utf-8 -*- # An extension module for rst2pdf # Copyright 2010, Patrick Maupin # See LICENSE.txt for licensing terms """ preprocess is a rst2pdf extension module (invoked by -e preprocess on the rst2pdf command line. There is a testcase for this file at rst2pdf/tests/test_preprocess.txt This preprocesse...