gt
stringclasses
1 value
context
stringlengths
2.49k
119k
#!/usr/bin/env python """Application controller for BLAT v34""" from cogent.app.parameters import FlagParameter, ValuedParameter, \ MixedParameter, FilePath from cogent.app.util import CommandLineApplication, ResultPath, \ ApplicationError, get_tmp_filenam...
import webapp2 import json from google.appengine.ext import ndb from google.net.proto.ProtocolBuffer import ProtocolBufferDecodeError from config.secret import _CLIENT_TOKEN from datastore.models import WebResource, Indexer from handlers.basehandler import JSONBaseHandler __author__ = 'Lorenzo' class DataStoreOp...
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. import warnings import numpy as np import re import sys from monty.json import MSONable from pymatgen.electronic_structure.core import Spin, Orbital from pymatgen.core.sites import PeriodicSite from pymatgen.c...
""" Imitate the parser representation. """ import inspect import re import sys import os from functools import partial from jedi._compatibility import builtins as _builtins, unicode from jedi import debug from jedi.cache import underscore_memoization, memoize_method from jedi.evaluate.sys_path import get_sys_path from...
""" test with the TimeGrouper / grouping with datetimes """ from datetime import datetime import numpy as np from numpy import nan import pytest import pytz from pandas.compat import StringIO import pandas as pd from pandas import DataFrame, Index, MultiIndex, Series, Timestamp, date_range from pandas.core.groupby....
# 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...
# Copyright 2020 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import itertools from typing import cast from pants.backend.python.dependency_inference import import_parser, module_mapper from pants.backend.python.dependency_inference.import_parser im...
import sys import os import json import hashlib import logging import collections import requests import urlparse import re import copy import ruamel.yaml as yaml try: from ruamel.yaml import CSafeLoader as SafeLoader except ImportError: from ruamel.yaml import SafeLoader # type: ignore from . import validate ...
# Copyright 2016 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 acc...
"""Test analytical calculation of gradients of the target function versus finite difference calculations""" from __future__ import annotations def test(args=[]): # Python and cctbx imports import random from math import pi from cctbx.sgtbx import space_group, space_group_symbols # We will set ...
import os, sys, unittest, getopt, time use_resources = [] class ResourceDenied(Exception): """Test skipped because it requested a disallowed resource. This is raised when a test calls requires() for a resource that has not be enabled. Resources are defined by test modules. """ def is_resource_enabl...
from sympy import (symbols, Symbol, product, factorial, rf, sqrt, cos, Function, Product, Rational, Sum, oo) from sympy.utilities.pytest import raises from sympy import simplify a, k, n, m, x = symbols('a,k,n,m,x', integer=True) f = Function('f') def test_karr_convention(): # Test the Karr prod...
# Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org) # # 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 # notice, this list of conditions and...
"""JSON (de)serialization framework. The framework presented here is somewhat based on `Go's "json" package`_ (especially the ``omitempty`` functionality). .. _`Go's "json" package`: http://golang.org/pkg/encoding/json/ """ import abc import binascii import logging import OpenSSL import six from acme.jose import b...
# coding=utf-8 r""" This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from twilio.base import deserialize from twilio.base import values from twilio.base.instance_context import InstanceContext from twilio.base.instance_resource import InstanceResource from twilio.base...
# -*- coding: utf-8 -*- """ Models are modeled after schema.org. When model is going to be serialized as JSON(-LD), model name must be same as Schema.org schema name, the model name is automatically published in @type JSON-LD field. Note: jsonld_type attribute value can be used to override @type definition in renderin...
# -*- coding: utf-8 -*- """ This module contains classes and functions for processing data. """ from __future__ import division, print_function import numpy as np from pxl import timeseries as ts from pxl.timeseries import loadhdf import matplotlib.pyplot as plt import multiprocessing as mp import scipy.stats from sci...
#!/usr/bin/env python """Classes for hunt-related testing.""" from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import hashlib import sys from future.utils import iteritems from grr_response_core.lib.rdfvalues import client as rdf_client from grr_response_...
# runtime.py # Copyright (C) 2006, 2007 Michael Bayer mike_mp@zzzcomputing.com # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """provides runtime services for templates, including Context, Namespace, and various helper functions.""" from mak...
#!/usr/bin/python2 # Copyright (c) 2012 The Native Client 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 is a thin wrapper for native LD. This is not meant to be # used by the user, but is called from pnacl-translate. # This...
from cashew.exceptions import InternalCashewException from cashew.exceptions import UserFeedback from cashew.plugin import Plugin, PluginMeta from example.classes2 import Csv from six import add_metaclass from six import with_metaclass import example.classes class Data(example.classes.Data): """ Docstring goes...
# 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...
import os from functools import update_wrapper from urllib.parse import urljoin from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.utils.translation import gettext_lazy as _ from cms import __version__, constants __all__ = ['get_cms_setting'] class VERIFIED: pass ...
from __future__ import unicode_literals, division, absolute_import from builtins import * # noqa pylint: disable=unused-import, redefined-builtin import json from flexget.api.app import base_message from flexget.api.core.tasks import ObjectsContainer as OC from flexget.manager import Manager from mock import patch ...
#!/usr/bin/env python # # Generated by generateDS.py. # import sys import annotations2_sup as supermod etree_ = None Verbose_import_ = False ( XMLParser_import_none, XMLParser_import_lxml, XMLParser_import_elementtree ) = range(3) XMLParser_import_library = None try: # lxml from lxml import etree a...
import numpy from scipy.signal import signaltools from scipy import interpolate import pylab import scipy def medsig(array): med = numpy.median(array) sig = 1.48 * numpy.median(abs(array - med)) return med, sig def filt1d(array, nmed, nlin, fill = False, circ = False): """Nonlinear (median+boxcar) fil...
""" The following functions provide a set of utilities for working with `Dependent` and collections of `Dependent`. * :func:`~revscoring.dependencies.solve` provides basic dependency solving * :func:`~revscoring.dependencies.expand` provides minimal expansion of dependency trees * :func:`~revscoring.dependencies.dig...
#!/usr/bin/python # -*- coding: utf-8 -*- r""" This bot will make direct text replacements. It will retrieve information on which pages might need changes either from an XML dump or a text file, or only change a single page. These command line parameters can be used to specify which pages to work on: &params; Furth...
import datetime import hashlib import random import re from django.conf import settings from django.db import models from django.db import transaction from django.template.loader import render_to_string from django.utils.translation import ugettext_lazy as _ from django.contrib.auth import get_user_model try: fro...
# coding: utf-8 # # Copyright 2019 The Oppia 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 requi...
from django import forms from django.contrib import admin from markedit.admin import MarkEditAdmin from pycon.models import (PyConProposalCategory, PyConSponsorTutorialProposal, PyConTalkProposal, PyConTutorialProposal, PyConPosterProposal, PyConLightningTalkProposa...
from django import template from django.core.urlresolvers import reverse from django.conf import settings from django.contrib.sites.models import Site from django.template.base import TemplateSyntaxError from django.utils.text import ugettext_lazy as _ from news.models import News register = template.Library() @regi...
""" Functions for loading in annotations from files in different formats. """ import contextlib import numpy as np import re import warnings import scipy.io.wavfile import six from . import util from . import key from . import tempo @contextlib.contextmanager def _open(file_or_str, **kwargs): '''Either open a f...
# Copyright 2013 Rackspace Hosting. # # 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...
#!/usr/bin/env python # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """ ============================================= fMRI: OpenfMRI.org data, FSL, ANTS, c3daffine ============================================= A growing number of datasets are availabl...
""" monkeypatching and mocking functionality. """ from __future__ import absolute_import, division, print_function import os import sys import re import warnings from contextlib import contextmanager import six import pytest from _pytest.fixtures import fixture RE_IMPORT_ERROR_NAME = re.compile("^No module named (...
import numpy as np import pandas as pd from ..core.common import _contains_datetime_like_objects, is_np_datetime_like from .cftime_offsets import date_range_like, get_date_type from .cftimeindex import CFTimeIndex from .times import _should_cftime_be_used, convert_times try: import cftime except ImportError: ...
import os import glob import re from datetime import date TEMPLATE = """// // %(filename)s // // Copyright (c) %(year)d Couchbase, 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 ...
import asyncio import contextlib import functools import sys import traceback from codeop import CommandCompiler from io import BytesIO, StringIO __all__ = ['start_manhole'] class StatefulCommandCompiler(CommandCompiler): """A command compiler that buffers input until a full command is available.""" def _...
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
"""Converts Pascal VOC data to TFRecords file format with Example protos. The raw Pascal VOC data set is expected to reside in JPEG files located in the directory 'JPEGImages'. Similarly, bounding box annotations are supposed to be stored in the 'Annotation directory' This TensorFlow script converts the training and...
# 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...
from __future__ import print_function import itertools import logging import numpy as np import pandas as pd import scipy.stats def create_regression_dataset(metafeatures, experiments): X = [] X_indices = [] Y = [] for dataset_name in experiments: experiment = experiments[dataset_name] ...
# Copyright 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 requ...
from collections import OrderedDict, defaultdict from collections.abc import Iterable from copy import deepcopy from pathlib import Path from xml.etree import ElementTree as ET import openmc import openmc._xml as xml from .checkvalue import check_type class Geometry: """Geometry representing a collection of surf...
#!/usr/bin/env python3 import os import sys import time import numbers import math import multiprocessing import queue import threading import functools import tkinter as tk import tkinter.messagebox as tkmb import pygame import mpmath from mpmath import mp, mpc import worker PROGRAM_NAME = "Mandelbrot" WINDOW_WID...
import datetime from django.db import models from django.contrib.contenttypes.models import ContentType from django.contrib.sites.models import Site from django.contrib.auth.models import User from django.utils.translation import ugettext_lazy as _ from django.conf import settings MIN_PHOTO_DIMENSION = 5 MAX_PHOTO_DI...
# This file is part of the ISIS IBEX application. # Copyright (C) 2012-2016 Science & Technology Facilities Council. # All rights reserved. # # This program is distributed in the hope that it will be useful. # This program and the accompanying materials are made available under the # terms of the Eclipse Public License...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module contains helper functions for accessing, downloading, and caching data files. """ from __future__ import (absolute_import, division, print_function, unicode_literals) from ..extern import six from ..extern.six.mov...
# -*- coding: utf-8 -*- # Copyright (C) 2012 Anaconda, Inc # SPDX-License-Identifier: BSD-3-Clause from __future__ import absolute_import, division, print_function, unicode_literals from functools import reduce from logging import getLogger import os from os.path import abspath, basename, expanduser, expandvars, join,...
# -*- 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...
import networkx as nx from networkx import tensor_product,cartesian_product,lexicographic_product,strong_product from nose.tools import assert_raises, assert_true, assert_equal, raises @raises(nx.NetworkXError) def test_tensor_product_raises(): P = tensor_product(nx.DiGraph(),nx.Graph()) def test_tensor_product_n...
# Copyright 2016 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
from PyQt5.QtWidgets import QMainWindow, QApplication, QMessageBox, QFileDialog,\ QBoxLayout, QShortcut, QDialog, QCompleter from PyQt5.QtGui import QKeySequence from PyQt5.QtCore import QStringListModel, Qt import deen.constants from deen.gui.widgets.log import DeenLogger, DeenStatusConsol...
''' UrlRequest ========== .. versionadded:: 1.0.8 You can use the :class:`UrlRequest` to make asynchronous requests on the web and get the result when the request is completed. The spirit is the same as the XHR object in Javascript. The content is also decoded if the Content-Type is application/json and the result a...
import sys from dataclasses import MISSING from dataclasses import fields as dataclass_fields from dataclasses import is_dataclass from typing import Any, Dict, FrozenSet, List from typing import Mapping as TypingMapping from typing import MutableMapping as TypingMutableMapping from typing import MutableSequence as Typ...
#!/usr/bin/env python # bleu_scorer.py # David Chiang <chiang@isi.edu> # Copyright (c) 2004-2006 University of Maryland. All rights # reserved. Do not redistribute without permission from the # author. Not for commercial use. # Modified by: # Hao Fang <hfang@uw.edu> # Tsung-Yi Lin <tl483@cornell.edu> '''Provides: ...
# -*- coding: utf-8 -*- # # Copyright 2018 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...
# -*- encoding: 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, softwar...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ ===================================================== Distance computations (:mod:`scipy.spatial.distance`) ===================================================== Function Reference ------------------ Distance computation within/between collections of raw observation ...
from unittest import TestCase from peace_of_mind import certificates from peace_of_mind.certificates import (ERROR_SSL_CERT_EXPIRED, ERROR_SSL_CERT_NOT_YET_VALID, ERROR_SSL_CERT_HOST_MISMATCH, ERROR_SSL_CERT_UNTRUSTED_AUTHORITY, ERROR_SSL_CERT_COULD_NOT_BE_OBTAINED, UTC...
# You need an image testsuite to run this, for information see: # kivy/tools/image-testsuite/README.md import os import re import sys import unittest from collections import defaultdict from kivy.core.image import ImageLoader DEBUG = False ASSETDIR = 'image-testsuite' LOADERS = {x.__name__: x for x in ImageLoader.loa...
# 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 requ...
""" This file is part of the TheLMA (THe Laboratory Management Application) project. See LICENSE.txt for licensing, CONTRIBUTORS.txt for contributor information. ISO request entity classes. """ from everest.entities.base import Entity from everest.entities.utils import slug_from_integer from everest.entities.utils imp...
from __future__ import absolute_import import pytest import pytz from contextlib import contextmanager from datetime import ( datetime, timedelta, ) from sentry.testutils import TestCase from sentry.tsdb.base import TSDBModel, ONE_MINUTE, ONE_HOUR, ONE_DAY from sentry.tsdb.redis import RedisTSDB, CountMinScr...
# 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 ...
import datetime import unittest2 from case_parsing.exceptions import CaseParsingException import xml2json from case_parsing import parse_casexml_json, CASEXML_XMLNS, get_case_delta from case_parsing.delta import CaseDelta CASE_XML_1 = """ <case xmlns="http://commcarehq.org/case/transaction/v2" case_id="3F2504E04F89...
from django import forms from django.utils.translation import ugettext_lazy as _ from wagtail.core import blocks from wagtailstreamforms.conf import get_setting from wagtailstreamforms.fields import BaseField, register class SingleLineTextField(BaseField): field_class = forms.CharField label = _("Text field ...
# 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. from __future__ import division from __future__ import absolute_import import logging import os import posixpath import uuid import sys import tempfile impor...
#!/usr/bin/env python ############################################################################ from re import findall, finditer, match, search, sub from os import path, sysconf, environ, getlogin, listdir, spawnvp, P_WAIT from sys import stdout, stdin, stderr, argv, exit from socket import socket, AF_U...
# Copyright (c) 2010-2015 Bo Lin # Copyright (c) 2010-2015 Yanhong Annie Liu # Copyright (c) 2010-2015 Stony Brook University # Copyright (c) 2010-2015 The Research Foundation of SUNY # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files #...
import os from os import path from collections import namedtuple from slap.esri import ArcpyHelper from unittest import TestCase from mock import MagicMock, patch, call @patch('slap.esri.arcpy') class TestListDataSources(TestCase): @staticmethod def create_mock_layer(workspace): layer = MagicMock() ...
#!/usr/bin/env python # -*- coding: utf8 -*- # @@@ START COPYRIGHT @@@ # # 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 ...
"""Utilities for Parallel Model Selection with IPython Author: Olivier Grisel <olivier@ogrisel.com> Blatently Copied by simon frid Licensed: Simplified BSD """ from collections import namedtuple import os from IPython.parallel import interactive from IPython.parallel import TaskAborted from scipy.stats import sem i...
#!/usr/bin/python ##------------------------------------------------------------------- ## @copyright 2017 DennyZhang.com ## Licensed under MIT ## https://www.dennyzhang.com/wp-content/mit_license.txt ## ## File : python-hosts-tool.py ## Author : Denny <https://www.dennyzhang.com/contact> ## Created : <2017-05-03> ##...
import json from django.contrib.auth.decorators import user_passes_test from django.core.urlresolvers import reverse from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import render_to_response, render from django.template import RequestContext from crits.core.handlers import get_item_na...
## This file is part of Scapy ## See http://www.secdev.org/projects/scapy for more informations ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license """ General utility functions. """ from __future__ import absolute_import from __future__ import print_function import o...
#!/usr/bin/env python2.7 # # This is the InfluxDB build script. # # Current caveats: # - Does not currently build ARM builds/packages # - Does not checkout the correct commit/branch (for now, you will need to do so manually) # - Has external dependencies for packaging (fpm) and uploading (boto) # import sys impo...
#!/usr/bin/env python # ---------------------------------------------------------------------------- # Copyright (c) 2013--, scikit-bio development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. # ---------------------...
# ---------------------------------------------------------------------------- # Copyright (c) 2013--, scikit-bio development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. # --------------------------------------------...
# Copyright 2015-2017 Capital One Services, 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 ...
#!/usr/bin/env python """Implementation of various cryptographic types.""" import hashlib import os from cryptography import exceptions from cryptography import x509 from cryptography.hazmat.backends import openssl from cryptography.hazmat.primitives import ciphers from cryptography.hazmat.primitives import hashes ...
""" The 'vision simulator' provides objects that assist in modeling inputs from a camera processing system. """ import collections import math inf = float("inf") twopi = math.pi * 2.0 def _in_angle_interval(x, a, b): return (x - a) % twopi <= (b - a) % twopi class VisionSimTarget: """ Target o...
# pylint: disable=no-name-in-module import tensorflow as tf from tensorflow import keras from tensorflow.keras import activations, initializers, regularizers from tensorflow.keras.layers import Layer from tensorflow.python.keras.utils import conv_utils #pylint: disable=no-name-in-module from typing import List, Tuple, ...
""" Tests for images module. """ __authors__ = "Nicu Tofan" __copyright__ = "Copyright 2015, Nicu Tofan" __credits__ = ["Nicu Tofan"] __license__ = "3-clause BSD" __maintainer__ = "Nicu Tofan" __email__ = "nicu.tofan@gmail.com" import csv import functools import os import shutil import tempfile import unittest os.en...
"""Alexa state report code.""" from __future__ import annotations import asyncio import json import logging import aiohttp import async_timeout from homeassistant.const import HTTP_ACCEPTED, MATCH_ALL, STATE_ON from homeassistant.core import HomeAssistant, State, callback from homeassistant.helpers.significant_chang...
# Copyright 2015 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 requ...
#---------------------------------------------------------------------- # This file was generated by encode_bitmaps.py # from wx.lib.embeddedimage import PyEmbeddedImage catalog = {} index = [] _001 = PyEmbeddedImage( b"iVBORw0KGgoAAAANSUhEUgAAACIAAAAiCAIAAAC1JZyVAAAAA3NCSVQICAjb4U/gAAAG1ElE" b"QVRIib2XS28bRx...
''' .. module: RandomProcess .. moduleauthor: Deniz Saner <denizs247@gmil.com> Ornstein-Uhlenbeck Random Process ========================================= Note, that this module is entirely taken from `@CamDavidsonPilon's <https://github.com/\ CamDavidsonPilon/PyProcess/>`_ repo. ''' import numpy as np import scipy as...
# Copyright 2018 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, s...
# 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...
#!/usr/bin/env python3 # encoding: utf-8 import imp import logging import logging.config import multiprocessing import os import signal import sys import time from queue import Empty, Queue from threading import Event, Thread from splunk_eventgen.lib.eventgenconfig import Config from splunk_eventgen.lib.eventgenexcept...
# -*- coding: utf-8 -*- # <nbformat>3.0</nbformat> # <markdowncell> # Setup # ==== # <codecell> import seaborn import pandas as pd %pylab inline # <markdowncell> # Define the algorithm # ==== # <codecell> def one_move(A,A2, fixed, use_for_loops=True): most_wedges_order = argsort(A2.ravel())[::-1] doorwa...
""" This code was generated by Codezu. Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. """ from mozurestsdk.mozuclient import default as default_client from mozurestsdk.mozuurl import MozuUrl; from mozurestsdk.urllocation import UrlLocation from mozure...
# # 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 # -*- coding: utf-8 -*- import json from django.contrib import admin from django.utils import timezone from django.utils.translation import ugettext_lazy as _ from django.conf import settings from django.core.urlresolvers import reverse from django.shortcuts import redirect from .models import Co...
#!/usr/bin/env python # Copyright (c) 2012 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. """Flattens a HTML file by inlining its external resources. This is a small script that takes a HTML file, looks for src attribute...
#!flask/bin/python # API REST SFA - lionel.prat9@gmail.com # Modified source code origin (thanks): # - https://sourcedexter.com/python-rest-api-flask-part-2/ # - https://github.com/ericsopa/flask-api-key # - https://gist.github.com/miguelgrinberg/5614326 #curl -k -F 'file=@/home/lionel/malwares/calc.xll' -H "x-api-...
from django import http from django.views import View from django.urls import reverse, reverse_lazy from django.utils import timezone from django.utils.http import urlsafe_base64_decode from django.utils.translation import ugettext as _ from django.utils.decorators import method_decorator from django.views.decorators.c...
# ---------------------------------------------------------------------------- # Copyright (c) 2015--, micronota development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. # ---------------------------------------------...