gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module contains the convolution and filter functionalities of astropy. A few conceptual notes: A filter kernel is mainly characterized by its response function. In the 1D case we speak of "impulse response function", in the 2D case we call it "po...
# Copyright 2020 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...
# Copyright 2014 PerfKitBenchmarker 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...
# SYSTEM REQUIREMENTS # This program has been successfully run under Mac OS 10.10; it is standard Python 2.7 # so it should also run in Unix or Windows. # # INITIAL PROVENANCE: # Programmer: Philip A. Schrodt # Parus Analytics # Charlottesville, VA, 22901 U.S.A. # http://eventdata.parusanalytics.com # # Git...
# 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...
# Copyright 2012 James McCauley # # This file is part of POX. # # POX 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 License, or # (at your option) any later version. # # POX is distr...
import json import socket from collections import defaultdict, namedtuple from couchdbkit import Server from django.conf import settings from django.http import HttpResponse, JsonResponse from django.shortcuts import render from django.utils.decorators import method_decorator from django.utils.translation import uget...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Copyright (c) 2013, Ivan Lalashkov. 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 t...
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author: oesteban # @Date: 2015-06-23 12:32:07 # @Last Modified by: Oscar Esteban # @Last Modified time: 2015-09-09 16:21:22 from __future__ import absolute_import import os import os.path as op import numpy as np import nipype.pipeline.engine as pe # pipe...
# organization/controllers.py # Brought to you by We Vote. Be good. # -*- coding: UTF-8 -*- from .models import OrganizationListManager, OrganizationManager from config.base import get_environment_variable from django.contrib import messages from django.http import HttpResponse from exception.models import handle_reco...
# # endpoints import logging from datetime import datetime from dateutil.relativedelta import relativedelta from django.contrib import messages from django.contrib.auth.decorators import user_passes_test from django.core.exceptions import PermissionDenied from django.urls import reverse from django.http import HttpRes...
from bson import ObjectId from mongoengine.base import ValidationError from crits.core.data_tools import generate_qrcode from crits.core.totp import gen_user_secret from django.conf import settings def is_user_favorite(analyst, type_, id_): """ Check if an ID is in a user's favorites. :param analyst: Th...
''' @author: jnaous ''' from django.views.generic import list_detail, create_update, simple from models import Project from forms import ProjectCreateForm from django.http import HttpResponseRedirect, HttpResponseNotAllowed, Http404 from django.core.urlresolvers import reverse from django.core.exceptions import Multip...
from __future__ import unicode_literals import logging import sys import types from django import http from django.conf import settings from django.core import urlresolvers from django.core import signals from django.core.exceptions import MiddlewareNotUsed, PermissionDenied, SuspiciousOperation from django.db import...
import re from django.conf import settings from django.contrib.gis.db.backends.base.operations import ( BaseSpatialOperations, ) from django.contrib.gis.db.backends.utils import SpatialOperator from django.contrib.gis.db.models import GeometryField, RasterField from django.contrib.gis.gdal import GDALRaster from d...
# 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 License, or # (at your option) any later version. # # This program is distributed in the...
import functools import unittest from test import support from ctypes import * from ctypes.test import need_symbol import _ctypes_test class Callbacks(unittest.TestCase): functype = CFUNCTYPE ## def tearDown(self): ## import gc ## gc.collect() def callback(self, *args): self.got_args...
#!/usr/bin/env python """ Copyright (c) 2014-2018 Alex Forencich 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 to use, copy, modify,...
# Copyright 2015 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 a...
''' @author: Dallas Fraser @date: 2016-04-12 @organization: MLSB API @summary: The basic game API ''' from flask_restful import Resource, reqparse from flask import Response, request from json import dumps from api import DB from api.model import Game from api.authentication import requires_admin from api.errors import...
# import pdb; import unittest import os.path # import json import numpy as np import pandas as pd from collections import OrderedDict from quantipy.core.view_generators.view_maps import QuantipyViews from quantipy.core.view import View from quantipy.core.stack import Stack from quantipy.core.view_generators.view_mapp...
# -*- coding: utf-8 -*- import json import logging import requests try: # Python 2.x import urllib.parse except ImportError as e: # Python 3 import urllib.parse as urlparse from .auth import FHIRAuth class FHIRUnauthorizedException(Exception): """ Indicating a...
# -*- coding: utf-8 -*- """Program used to start a Celery worker instance. The :program:`celery worker` command (previously known as ``celeryd``) .. program:: celery worker .. seealso:: See :ref:`preload-options`. .. cmdoption:: -c, --concurrency Number of child processes processing the queue. The defaul...
import logging import random from nowin_core.database import tables class RadioModel(object): """Radio data model """ def __init__(self, session, logger=None): self.logger = logger if self.logger is None: self.logger = logging.getLogger(__name__) self.session = sess...
#!/usr/bin/python # ---------------------------------------------------------------------- # Be sure to add the python path that points to the LLDB shared library. # On MacOSX csh, tcsh: # setenv PYTHONPATH /Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python # On MacOSX sh, bash: # ex...
# flake8: noqa: F405 """ Various importers for the different content types """ import math import json import requests import logging from io import BytesIO from django.core.files.images import ImageFile from six import iteritems from wagtail.core.models import Page from wagtail.images.models import Image from molo...
#!/usr/bin/env python # # resolve_tests.py: testing 'svn resolve' # # Subversion is a tool for revision control. # See http://subversion.apache.org for more information. # # ==================================================================== # Licensed to the Apache Software Foundation (ASF) under one # or m...
#*************************************************************** #* Name: LMS7002_CGEN.py #* Purpose: Class implementing LMS7002 CGEN functions #* Author: Lime Microsystems () #* Created: 2016-11-14 #* Copyright: Lime Microsystems (limemicro.com) #* License: #************************************************...
from __future__ import annotations from collections import Iterable import logging import numpy as np from progressivis.storage import Group, Dataset from progressivis.core.utils import integer_types, get_random_name try: from progressivis.utils.fast import indices_to_slice except ImportError: from progressi...
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2010 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance wi...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2012 OpenStack, LLC. # 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...
# Copyright (c) 2013 Christian Schwede <christian.schwede@enovance.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 b...
#!/usr/bin/env python import os import shutil import glob import time import sys import subprocess import string from optparse import OptionParser, make_option SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) PKG_NAME = os.path.basename(SCRIPT_DIR) PARAMETERS = None #XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=...
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
########################################################################## # # Copyright (c) 2010, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistribu...
#!/usr/bin/env python # Copyright 2013 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 ...
# Copyright 2014 The LUCI Authors. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 # that can be found in the LICENSE file. """Defines access groups. +------+ |admins| +------+ ^ | +------------------------+ | ...
""" Parses a variety of ``Accept-*`` headers. These headers generally take the form of:: value1; q=0.5, value2; q=0 Where the ``q`` parameter is optional. In theory other parameters exists, but this ignores them. """ import re from webob.util import header_docstring, warn_deprecation from webob.headers import ...
# # Module providing the `Pool` class for managing a process pool # # multiprocessing/pool.py # # Copyright (c) 2007-2008, R Oudkerk --- see COPYING.txt # __all__ = ['Pool'] # # Imports # import threading import queue import itertools import collections import time from multiprocessing import Process, cpu_count, Ti...
""" Module providing observables to the template machinery. The main method is the :func: ``observe`` method which can be used to observe user-defined objects and get notifications about changes to the objects. One typically uses it as follows: ``` def change_handler(ev): prin...
#!/usr/bin/env python ''' Quantile regression model Model parameters are estimated using iterated reweighted least squares. The asymptotic covariance matrix estimated using kernel density estimation. Author: Vincent Arel-Bundock License: BSD-3 Created: 2013-03-19 The original IRLS function was written for Matlab by...
import collections import copy import warnings import numpy import six from chainer import cuda from chainer import link as link_module from chainer import serializer as serializer_module from chainer import variable def _sum_sqnorm(arr): sq_sum = collections.defaultdict(float) for x in arr: with cu...
# Copyright 2012, Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can # be found in the LICENSE file. from itertools import izip import logging import re from net import bsonrpc from net import gorpc from vtdb import dbexceptions from vtdb import field_types from vtd...
""" This module is responsible for the import of the data parsed from the UNIPROT text file """ from bioflow.configs import main_configs from bioflow.utils.log_behavior import get_logger from bioflow.bio_db_parsers.geneOntologyParser import GOTermsParser from bioflow.bio_db_parsers.uniprotParser import UniProtParser fr...
# Copyright 2012 VMware, 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 a...
""" Serializers and ModelSerializers are similar to Forms and ModelForms. Unlike forms, they are not constrained to dealing with HTML output, and form encoded input. Serialization in REST framework is a two-phase process: 1. Serializers marshal between complex types like model instances, and python primitives. 2. The...
#!/usr/bin/env python # # Very simple serial terminal # # (C)2002-2015 Chris Liechti <cliechti@gmx.net> # # SPDX-License-Identifier: BSD-3-Clause import codecs import os import sys import threading import serial from serial.tools.list_ports import comports from serial.tools import hexlify_codec codecs.register(la...
"""Test the Z-Wave over MQTT config flow.""" from unittest.mock import patch import pytest from homeassistant import config_entries, setup from homeassistant.components.hassio.handler import HassioAPIError from homeassistant.components.ozw.config_flow import TITLE from homeassistant.components.ozw.const import DOMAIN...
# Copyright 2014 PerfKitBenchmarker 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...
# 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...
''' ------------------------------------------------------------------------ Last updated 7/16/2015 Household functions for taxes in SS and TPI. This file calls the following files: tax.py ------------------------------------------------------------------------ ''' # Packages import numpy as np import tax ''' ...
from django.contrib.admin.views.decorators import staff_member_required from django.shortcuts import get_object_or_404 from django.utils.timezone import now from django.views.generic import FormView from django.views.generic.base import TemplateView, View from django.views.decorators.csrf import ensure_csrf_cookie from...
#!/usr/bin/env python ''' fileshell.py -- a File-IO based remote shell, for use where there is no direct communication channel between the attacker and the owned target, but they can communicate by writing and reading files to/from a remote share/file server etc, or where other forms of communication are ...
# Copyright 2014 The Swarming Authors. All rights reserved. # Use of this source code is governed by the Apache v2.0 license that can be # found in the LICENSE file. """Auth management REST API.""" import base64 import functools import logging import urllib import webapp2 from google.appengine.ext import ndb from c...
# coding=utf-8 # Copyright 2020 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 sys import bleach from collections import defaultdict, OrderedDict from django.core.exceptions import ValidationError from django.utils import six from django.utils.translation import ugettext_lazy as _, ungettext_lazy as _n from .arguments import Argument __all__ = ('InlineOptions', 'InlineMetaClass', 'In...
import sys # Needed to pass # http://www.w3.org/2009/sparql/docs/tests/data-sparql11/ # syntax-update-2/manifest#syntax-update-other-01 sys.setrecursionlimit(6000) # default is 1000 try: from collections import Counter except: # cheap Counter impl for py 2.5 # not a complete implementation - ...
#!/usr/bin/python3 """Script to create AOSP toolchain development work area. Creates symbolic links in /tmp and runs setup scripts. """ import getopt import os import sys import script_utils as u # Path to working AOSP or NDK repo flag_ndk_repo = None # Path to working toolchain repo (optional) flag_toolchain_re...
from octopy import * def FanSnmpModule(timeout = Minutes(1)): return { "static" : { "static_infra_air_in_temp" : 35, "static_infra_air_out_temp" : 25, "static_infra_humidity" : 70, }, "sensor" : { "inlet_1" : Long(timeout), "inlet_2" : Long(timeout), "inlet_3" : Long(timeout), "air_in...
import base64 import time from io import BytesIO import simplejson as json from datetime import datetime from bson import ObjectId from werkzeug.datastructures import ImmutableMultiDict from eve.tests import TestBase from eve.tests.utils import DummyEvent from eve.tests.test_settings import MONGO_DBNAME from eve.utils ...
import pandas as pd import numpy as np import os from pylearn2.utils import serial from theano import tensor as T from theano import function from pylearn2ext.chbmit import CHBMIT from pylearn2ext.epilepsiae import Epilepsiae from pylearn2ext.base import PerformanceMetric def gen_idx_range(src_idx, end_idx): # G...
# -*- 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...
"""Tests for plotting utilities.""" import warnings import numpy as np import pandas as pd import matplotlib.pyplot as plt from numpy.testing import assert_array_equal import nose import nose.tools as nt from nose.tools import assert_equal, raises from distutils.version import LooseVersion pandas_has_categoricals = L...
# -*- coding: utf8 -*- import http.client import logging import shlex import shutil import socket import ssl import subprocess from unittest.mock import patch, Mock from .mocks.connexionmock import createHTTPConnectionMock, createHTTPSConnectionMock import ipcheck # URL settings def test_without_url(): """Must...
from logbook import Logger from onitu.referee.folder import Folder def test_init_size(): f = Folder('folder', {}, Logger(), {}) assert f._to_bytes(10) == 10 assert f._to_bytes(15.3) == 15 assert f._to_bytes(0) == 0 assert f._to_bytes(None) is None assert f._to_bytes('') is None assert f...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
#!/usr/bin/env python """ Get values outside of `n` standard deviations of the given variable(s). Sample use: ./check_univariate_outliers.py \ --last-event 3 \ --subject-list ./subjects-include.txt \ --columns measure_brainsegvol measure_rhcortexvol measure_lhcortexvol \ measure_...
from parso.python import tree from parso.python.token import PythonTokenTypes from parso.parser import BaseParser NAME = PythonTokenTypes.NAME INDENT = PythonTokenTypes.INDENT DEDENT = PythonTokenTypes.DEDENT class Parser(BaseParser): """ This class is used to parse a Python file, it then divides them into ...
import sys import pickle import math import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import numpy as np from subprocess import Popen, PIPE from collections import defaultdict def tree(): return defaultdict(tree) def run_command_with_params_and_get_output(command, args): # Compile first ...
""" Define a set of scopes to be used by COS Internal OAuth implementation, specifically tailored to work with APIv2. List of scopes, nomenclature, and rationale can be found in the relevant "Login as OSF- phase 2" proposal document """ from collections import namedtuple from website import settings # Public scopes...
import datetime from django.http import HttpResponse, HttpResponseRedirect from django.core.urlresolvers import reverse from django.shortcuts import get_object_or_404, render from django.utils import timezone import django.http.response from brake.decorators import ratelimit from draftHost import models from draftHo...
# =============================================================================== # Copyright 2015 Jake Ross # # 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...
#!/usr/bin/env vpython # Copyright 2017 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. """This script helps to generate code coverage report. It uses Clang Source-based Code Coverage - https://clang.llvm.org/docs/Sour...
""" Deep Deterministic Policy Gradient (DDPG) ----------------------------------------- An algorithm concurrently learns a Q-function and a policy. It uses off-policy data and the Bellman equation to learn the Q-function, and uses the Q-function to learn the policy. Reference --------- Deterministic Policy Gradient Al...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
from pylayers.util import project import pylayers.util.CDF as cdf import pylayers.signal.bsignal as bs import pylayers.gis.layout as ly import pylayers.util.pyutil as pyu import ConfigParser import matplotlib.pylab as plt import itertools import pickle import pdb class Simnet2cir(object): """ Simnet2cir ...
# Copyright 2021 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 agreed to in writing, ...
import numpy as np import pandas as pd import pytest import dask.dataframe as dd from dask.dataframe.multi import single_partition_join from dask.dataframe.utils import assert_eq # Fixtures # ======== @pytest.fixture def df_left(): # Create frame with 10 partitions # Frame has 11 distinct idx values part...
import logging from src.main.models import Torrent import requests from bs4 import BeautifulSoup from pprint import pprint class Kickass(): URL_BASE = 'http://kickass.so' CATEGORIES = [ 'highres-movies', 'tv', 'pc-games', ] def scrape(self): for category in self.CATE...
import numpy as np import pytest from pandas.core.dtypes.base import registry as ea_registry from pandas.core.dtypes.dtypes import DatetimeTZDtype, IntervalDtype, PeriodDtype from pandas import ( Categorical, DataFrame, Index, Interval, NaT, Period, PeriodIndex, Series, Timestamp, ...
import calendar from copy import deepcopy from datetime import datetime, timedelta from django.utils.timezone import now import pytest import pytz from bson import ObjectId from django_mongo_rest import serialize from server.models import PlaygroundModel from server.settings import MONGODB from utils import (assert_st...
""" SoftLayer.tests.CLI.modules.server_tests ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This is a series of integration tests designed to test the complete command line interface. :license: MIT, see LICENSE for more details. """ import mock from SoftLayer.CLI import exceptions from SoftLayer impor...
#!/usr/bin/env python # Copyright 2017 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...
import phonenumbers import requests import dateutil.parser from django.core.files.temp import NamedTemporaryFile from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from django.db import models from django.forms import model_to_dict from rfnumplan.utils import read_c...
# $Id: io.py 7440 2012-06-13 14:14:12Z milde $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ I/O classes provide a uniform API for low-level input and output. Subclasses will exist for a variety of input/output mechanisms. """ __docformat__ = 'reStruc...
# coding utf-8 ''' Native support for HID input from the linux kernel ================================================== Support starts from 2.6.32-ubuntu, or 2.6.34. To configure HIDInput, add this to your configuration:: [input] # devicename = hidinput,/dev/input/eventXX # example with Stantum MTP4.3" ...
# coding=utf-8 # Copyright 2018 The DisentanglementLib 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 # # Un...
#!/usr/bin/env python # -*- coding: UTF-8 -*- """ Title: Dumpscript management command Project: Hardytools (queryset-refactor version) Author: Will Hardy (http://willhardy.com.au) Date: June 2008 Usage: python manage.py dumpscript appname > scripts/scriptname.py $Revision: 217 $ Descripti...
""" Functions for fitting and simulating arbitrary dimensional lineshapes commonly found in NMR experiments """ import numpy as np from scipy.optimize import leastsq from leastsqbound import leastsqbound pi = np.pi # lineshape classes translator from analysisbase import squish from lineshapes1d import ls_str2class ...
# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and contributors # License: MIT. See LICENSE import google.oauth2.credentials import requests from googleapiclient.discovery import build from googleapiclient.errors import HttpError import frappe from frappe import _ from frappe.integrations.doctype....
import sys import re import yaml # use yaml instead of json to get non unicode (works with ascii only data) from ethereum import utils from rlp.utils import decode_hex, encode_hex from ethereum.utils import encode_int, zpad, big_endian_to_int, is_numeric, is_string, ceil32 from ethereum.utils import isnumeric import a...
# -*- coding: utf-8 -*- # # 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 ...
from cheeseprism.index import IndexManager from functools import partial from .utils import path from pip.exceptions import DistributionNotFound from pip.index import PackageFinder from pip.locations import build_prefix, src_prefix from pip.req import RequirementSet, parse_requirements from urllib2 import HTTPError imp...
from mpi4py import MPI import mpiunittest as unittest import sys try: import array except ImportError: array = None def asarray(typecode, data): try: memoryview _tobytes = lambda s: memoryview(s).tobytes() except NameError: _tobytes = lambda s: buffer(s)[:] try: _fr...
# 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 ...
from datetime import datetime, timedelta import numpy as np import pytest from pandas import DataFrame, Series import pandas.util.testing as tm from pandas.util.testing import assert_frame_equal class TestRank: s = Series([1, 3, 4, 2, np.nan, 2, 1, 5, np.nan, 3]) df = DataFrame({"A": s, "B": s}) result...
# Copyright 2015 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 a...
# -*- coding: utf-8 -*- """ OneLogin_Saml2_Logout_Response class Copyright (c) 2014, OneLogin, Inc. All rights reserved. Logout Response class of OneLogin's Python Toolkit. """ from base64 import b64encode, b64decode from defusedxml.lxml import fromstring from xml.dom.minidom import Document from defusedxml.minid...