gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
# 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... | |
"""
Contains functions for computing various surface properties. Mostly wrappers
for functions in `polyutils.Surface` and `polyutils.Distortion`.
"""
import os
import shlex
import shutil
import tempfile
import subprocess as sp
import numpy as np
from . import utils
from . import polyutils
from .database import db
fr... | |
# Copyright (c) 2014 Intel Corporation.
#
# 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... | |
#!/usr/bin/env python
from compliance_checker.suite import CheckSuite
from compliance_checker.cf import CFBaseCheck, dimless_vertical_coordinates
from compliance_checker.cf.util import is_vertical_coordinate, is_time_variable, units_convertible, units_temporal, NCGraph
from netCDF4 import Dataset
from tempfile import ... | |
"""
ANSI - Gives colour to text.
Use the codes defined in ANSIPARSER in your text
to apply colour to text according to the ANSI standard.
Examples:
This is %crRed text%cn and this is normal again.
This is {rRed text{n and this is normal again.
Mostly you should not need to call parse_ansi() explicitly;
it is run b... | |
# 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 ... | |
# 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 ... | |
import numpy as np
from numpy.testing import assert_array_almost_equal
from sklearn.neighbors.kd_tree import (KDTree, NeighborsHeap,
simultaneous_sort, kernel_norm,
nodeheap_sort, DTYPE, ITYPE)
from sklearn.neighbors.dist_metrics import Dista... | |
from director.thirdparty import transformations
import vtkAll as vtk
import math
import numpy as np
try:
# This module uses libbot for some transformations.
# There is a pending branch that replaces libbot with the
# thirdparty.transformations module. For now, libbot is
# imported with a try/except to... | |
from nimoy.specification import Specification
from nimoy.spec_runner import SpecRunner
from nimoy.runner.exceptions import InvalidFeatureBlockException
class ExpectBlocksSpec(Specification):
def successful_given(self):
with given:
spec_contents = """from nimoy.specification import Specificatio... | |
# Copyright (c) 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.
# Notes:
#
# This generates makefiles suitable for inclusion into the Android build system
# via an Android.mk file. It is based on make.py, the standard makefile
... | |
# Lint as: python3
# 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 ... | |
# Copyright (c) 2014 by Ladislav Lhotka, CZ.NIC <lhotka@nic.cz>
#
# Pyang plugin generating a XSLT1 stylesheet for XML->JSON translation.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this perm... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2002-2010 Chris Liechti <cliechti@gmx.net>
# All Rights Reserved.
# Simplified BSD License (see LICENSE.txt for full text)
"""\
This module defines a default target that represents a MSP430 device. It
defines some common operations and the basics of a com... | |
# -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Checkin.accepted_by'
db.add_column('articletrack_checkin'... | |
# Donated under Volatility Foundation, Inc. Individual Contributor Licensing Agreement
# LastPass - Recover memory resident account information.
# Author: Kevin Breen
# Thanks to the guide on http://www.ghettoforensics.com/2013/10/dumping-malware-configuration-data-from.html
import volatility.plugins.taskmods as taskm... | |
# 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... | |
#!/usr/bin/env python
#MIT License
#Copyright (c) 2017 Massimiliano Patacchiola
#
#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/python
#
# coding: utf8
#
# cson (schema-compessed json)
#
# author: Russell Leake, http://leakerlabs.com, gt3389b@gmail.com
# note: based on CSON-js by JongChan Choi, https://github.com/disjukr/CSON-js
from __future__ import print_function
from __future__ import unicode_literals
import argparse, copy, json... | |
"""A WSGI and HTTP server for use **during development only**. This
server is convenient to use, but is not designed to be particularly
stable, secure, or efficient. Use a dedicate WSGI server and HTTP
server when deploying to production.
It provides features like interactive debugging and code reloading. Use
``run_si... | |
#
# 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... | |
import functools
import inspect
import logging
import os
import random
import requests.exceptions
import string
import subprocess
import sys
import time
import pushover
import yaml
try:
import colorama
except ImportError:
colorama = None
__author__ = 'chris'
class LoggingBaseClass(object):
def __init__... | |
#
# 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... | |
# Copyright (c) 2011 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, 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.
import logging
import time
import unittest
from vtproto import topodata_pb2
from vtdb import keyrange
from vtdb import keyrange_constants
fr... | |
import contextlib
import os
from testtools import TestCase
from mock import Mock
from troveclient import base
from troveclient.openstack.common.apiclient import exceptions
from troveclient import utils
"""
Unit tests for base.py
"""
UUID = '8e8ec658-c7b0-4243-bdf8-6f7f2952c0d0'
def obj_class(self, res, loaded=Tru... | |
"""The Shelly integration."""
from __future__ import annotations
import asyncio
from datetime import timedelta
import logging
from typing import Any, Final, cast
import aioshelly
import async_timeout
import voluptuous as vol
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import (
A... | |
#! /usr/bin/python
'''
Restful API for Multi-thread Cache system
LICENSE MIT @2017 Ivan LAusuch <ilausuch@gmail.com>
'''
__author__ = "ilausuch"
__date__ = "$16-jun-2017 22:31:10$"
import sys
import json
import falcon
import logging
from falcon_cors import CORS
from Addons.Client import Client
from APICore... | |
#!/usr/bin/python
"""nrvr.distros.el.kickstart - Create and manipulate Enterprise Linux kickstart files
Classes provided by this module include
* ElIsoImage
* ElKickstartFileContent
To be improved as needed.
Idea and first implementation - Leo Baschy <srguiwiz12 AT nrvr DOT com>
Contributor - Nora Baschy
Public r... | |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# thumbor imaging service
# https://github.com/thumbor/thumbor/wiki
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license
# Copyright (c) 2011 globo.com thumbor@googlegroups.com
from os.path import abspath, exists
from thumbor.filters import Fil... | |
"""
Ad-hoc script to migrate typeshed to a new directory structure proposed in
https://github.com/python/typeshed/issues/2491#issuecomment-611607557
"""
import ast
import os
import os.path
import shutil
from dataclasses import dataclass
from typing import List, Optional, Set, Tuple
# These names may be still discusse... | |
# Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | |
# 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... | |
from .models import (
AbstractPerson, BasePerson, Person, ProxyPerson, Relating, Relation,
)
TEST_RESULTS = {
'get_all_field_names': {
Person: [
'baseperson_ptr',
'baseperson_ptr_id',
'content_type_abstract',
'content_type_abstract_id',
'conte... | |
# -*- coding: utf-8 -*-
import os
import sys
from threading import Lock, Thread
from functools import update_wrapper
import click
from ._compat import iteritems, reraise
class AppNotFound(click.UsageError):
pass
def find_best_app(module):
from .app import Flak
# search for the most common names first.
... | |
from __future__ import division, absolute_import, print_function
import sys
import warnings
import numpy as np
from numpy.testing import *
from numpy.compat import sixu
# Switch between new behaviour when NPY_RELAXED_STRIDES_CHECKING is set.
NPY_RELAXED_STRIDES_CHECKING = np.ones((10, 1), order='C').flags.f_contiguo... | |
# -*- coding: utf-8 -*-
'''
The function cache system allows for data to be stored on the master so it can be easily read by other minions
'''
# Import python libs
import copy
import logging
# Import salt libs
import salt.crypt
import salt.payload
__proxyenabled__ = ['*']
log = logging.getLogger(__name__)
def _au... | |
# encoding: utf-8
"""
An application for IPython.
All top-level applications should use the classes in this module for
handling configuration and creating configurables.
The job of an :class:`Application` is to create the master configuration
object and then create the configurable objects, passing the config to them... | |
__author__ = 'mark kolodkin'
# operation system
import os
import sys
#wxPython
import wx
#numpy
#import numpy as np
#matplotlib
import matplotlib
matplotlib.use('wxagg') # overrule configuration
import matplotlib.pyplot as plt
from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigureCanvas
from matplot... | |
"""
Analyze a PX4 log to perform sysid and control design.
"""
from __future__ import print_function
from collections import OrderedDict
import control
import matplotlib.pyplot as plt
import numpy as np
import pandas
import scipy.optimize
import scipy.signal
import px4tools
# pylint: disable=invalid-name, no-membe... | |
"""RyuApp shim between Ryu and Gauge."""
# Copyright (C) 2015 Research and Education Advanced Network New Zealand Ltd.
# Copyright (C) 2015--2019 The Contributors
#
# 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 co... | |
# uncompyle6 version 2.9.10
# Python bytecode 2.7 (62211)
# Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10)
# [GCC 6.2.0 20161005]
# Embedded file name: rexec.py
"""Restricted execution facilities.
The class RExec exports methods r_exec(), r_eval(), r_execfile(), and
r_import(), which correspond roug... | |
# -*- coding: utf-8 -*-
"""Apache access log (access.log) file parser.
Parser based on the two default apache formats, common and combined log format
defined in https://httpd.apache.org/docs/2.4/logs.html
"""
import pyparsing
from dfdatetime import time_elements as dfdatetime_time_elements
from plaso.containers impo... | |
# Copyright 2015-2106 F5 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 law or agreed to in ... | |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2010-2014 Chris Nelson <Chris.Nelson@SIXNET.com>
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
import re
import time
from datetime import timedelta, datetime
from operator i... | |
########
# Copyright (c) 2015 GigaSpaces Technologies Ltd. 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... | |
# Copyright 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.
import os
from telemetry.core import exceptions
from telemetry.core import local_server
from telemetry.core import memory_cache_http_server
from telemetry.c... | |
import os
import sys
import shutil
from aql_testcase import AqlTestCase
from aql.utils import Tempdir, remove_user_handler, add_user_handler,\
find_files, EventSettings, set_event_settings
from aql.nodes import Node, BuildManager
from aql.options import builtin_options
from aql.main import Project, ProjectConfig... | |
# 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... | |
# Copyright (c) 2015, The MITRE Corporation. All rights reserved.
# See LICENSE.txt for complete terms.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated Thu Apr 11 15:06:29 2013 by generateDS.py version 2.9a.
#
import sys
from mixbox.binding_utils import *
from stix.bindings import lookup_extension, reg... | |
# Copyright 2012 Michael Still and Canonical 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
#
# ... | |
"""
Copyright 2010-2012 Asidev s.r.l.
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, soft... | |
# BEGIN GENERATED CONTENT (do not edit below this line)
# This content is generated by ./gengl.py.
# Wrapper for /usr/include/GL/glx.h
from OpenGL import platform, constant
from ctypes import *
c_void = None
# H (/usr/include/GL/glx.h:26)
GLX_VERSION_1_1 = constant.Constant( 'GLX_VERSION_1_1', 1 )
GLX_VERSION_1_2 = ... | |
"""Let's Encrypt CLI."""
# TODO: Sanity check all input. Be sure to avoid shell code etc...
import argparse
import atexit
import functools
import logging
import logging.handlers
import os
import pkg_resources
import sys
import time
import traceback
import configargparse
import OpenSSL
import zope.component
import zop... | |
# 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... | |
# stdlib
from urlparse import urljoin
# 3rd party
import mock
import json
from tests.checks.common import AgentCheckTest, Fixtures
# IDs
YARN_APP_ID = 'application_1459362484344_0011'
SPARK_APP_ID = 'app_001'
CLUSTER_NAME = 'SparkCluster'
APP_NAME = 'PySparkShell'
# Resource manager URI
RM_URI = 'http://localhost:8... | |
#!/usr/bin/env python3
# Copyright (c) 2014-present, The osquery authors
#
# This source code is licensed as defined by the LICENSE file found in the
# root directory of this source tree.
#
# SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
import glob
import os
import signal
import shutil
import time
import uni... | |
#!/usr/bin/env python3
# Copyright (c) 2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the bumpfee RPC."""
from segwit import send_to_witness
from test_framework.test_framework import Bitco... | |
#!/usr/bin/env python
# Copyright 2014-2018 The PySCF Developers. 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
#
# U... | |
# Copyright 2015-2016 gRPC 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 applicable law or agreed to in wr... | |
##########################################################################
# #
# Extract the graph of wikipedia articles related to Statistics #
# using the MediaWiki API #
# ... | |
#
# 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... | |
"""Support for Flux lights."""
import logging
import socket
import random
import voluptuous as vol
from homeassistant.const import CONF_DEVICES, CONF_NAME, CONF_PROTOCOL
from homeassistant.components.light import (
ATTR_BRIGHTNESS,
ATTR_HS_COLOR,
ATTR_EFFECT,
ATTR_WHITE_VALUE,
EFFECT_COLORLOOP,
... | |
# test.py
import unittest
from entertainment_center import (city_lights, godfather, forrest_gump,
interstellar, batman_begins, modern_times)
# Test: City Lights
class MovieTestCityLights(unittest.TestCase):
def test_title(self):
self.assertEqual(
"City Lights... | |
# Copyright (c) 2014 NetApp, Inc.
# Copyright (c) 2015 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/license... | |
"""Support for the Dynalite networks."""
import asyncio
from typing import Any, Dict, Union
import voluptuous as vol
from homeassistant import config_entries
from homeassistant.components.cover import DEVICE_CLASSES_SCHEMA
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_DEFA... | |
from copy import copy
import inspect
from django.conf import settings
from django.utils import timezone
from django.utils.functional import cached_property
from django.utils.six.moves import range
from .query_utils import QueryWrapper
class RegisterLookupMixin(object):
def _get_lookup(self, lookup_name):
... | |
from __future__ import division
import csv
import numpy as np
import scipy as sp
import scipy.optimize as opt
import time as time
from matplotlib import pyplot as plt
#DEMOGRAPHICS FUNCTIONS
def getkeyages(S, PrintAges):
"""
Description:
-Gets the key ages for calculating demographics based on S
... | |
# -*- coding: utf-8 -*-
""" Sahana Eden Person Registry Model
@copyright: 2009-2012 (c) Sahana Software Foundation
@license: MIT
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 Softwa... | |
# coding: utf-8
"""
Kubeflow Training SDK
Python SDK for Kubeflow Training # noqa: E501
The version of the OpenAPI document: v1.4.0
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
from kubeflow.training.configuration import Configuration
class ... | |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1)
#
# (1) Kamaelia Contributors are listed in the AUTHORS file and at
# http://www.kamaelia.org/AUTHORS - please extend this file,
# not this notice.
#
# Licensed under the Apache License, Vers... | |
# 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.
from code import Code
from model import PropertyType
import cpp_util
from json_parse import OrderedDict
import schema_util
class _TypeDependency(object)... | |
# 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... | |
"""
Unit test for dynamic parameters.
Tests __get__, __set__ and that inspect_value() and
get_value_generator() work.
Originally implemented as doctests in Topographica in the file
testDynamicParameter.txt
"""
import copy
import param
import numbergen
from . import API1TestCase
class TestDynamicParameters(API1Test... | |
from __future__ import absolute_import
from __future__ import unicode_literals
import logging
import os
import re
import sys
from collections import namedtuple
from operator import attrgetter
import enum
import six
from docker.errors import APIError
from docker.errors import ImageNotFound
from docker.errors import No... | |
#########################################################################################
#
# author: Richard Neher
# email: richard.neher@tuebingen.mpg.de
#
# Reference: Richard A. Neher, Colin A Russell, Boris I Shraiman.
# "Predicting evolution from the shape of genealogical trees"
#
###################... | |
# 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... | |
#!/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.
'''Class for reading GRD files into memory, without processing them.
'''
import os.path
import types
import xml.sax
import xml.sax... | |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Licensed under MIT (../LICENSE)
JACS.py - Just Another Communications Script
The program implements control over:
- Hardware interface: serial channel of the modem and GPIO to power it on/off
- Compression and split of archives to create smaller packets with CRC c... | |
# -*- coding: utf-8 -*-
"""
Created on Tue Feb 28 23:22:24 2017
@author: AmatVictoriaCuramIII
"""
#lock and load
import numpy as np
from pandas_datareader import data
import random as rand
import pandas as pd
import time as t
from RelStrIndTester import RelStrIndTester
from RSIaggregate import RSIaggregate
empty = [] ... | |
# 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... | |
# 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 agreed to in... | |
try:
import unittest2 as unittest
except ImportError:
import unittest
import collections
try:
from unittest import mock
except ImportError:
import mock
from pymongo.cursor import Cursor
from simon import connection, query
from simon._compat import range
from .utils import AN_OBJECT_ID, ModelFactory... | |
from flask import render_template, flash, redirect, session, url_for, request, g
from flask_login import login_user, logout_user, current_user, login_required
from flask_babel import gettext
from datetime import datetime
from app import app, db, lm, oid, babel
from .forms import LoginForm, EditForm, PostForm, SearchFor... | |
#####! /usr/bin/env python3.3
# Virtual memory analysis scripts.
# Developed 2012-2014 by Peter Hornyack, pjh@cs.washington.edu
# Copyright (c) 2012-2014 Peter Hornyack and University of Washington
# Methods and classes for handling data created by a "perf record"
# command.
# IMPORTANT: the word "period" as used by p... | |
# Copyright (c) 2015 Hewlett-Packard Development Company, L.P.
# 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... | |
from sympy import Matrix, Symbol, solve, exp, log, cos, acos, Rational, Eq, \
sqrt, oo, LambertW, pi, I, sin, asin, Function, diff, Derivative, \
symbols, S, raises, sympify, var, simplify
from sympy.solvers import solve_linear_system, solve_linear_system_LU,dsolve,\
tsolve, deriv_degree
from symp... | |
from cheeseprism import index
from cheeseprism import utils
from cheeseprism.resources import App
from cheeseprism.utils import path
from contextlib import contextmanager
from mock import Mock
from mock import patch
from pyramid import testing
from pyramid.decorator import reify
from pyramid.events import subscriber
fr... | |
#
# templatetags/macros.py - Support for macros in Django templates
#
# Based on snippet by
# Michal Ludvig <michal@logix.cz>
# http://www.logix.cz/michal
#
# Extended for args and kwargs into templatetags/kwacro.py by
# Skylar Saveland http://skyl.org
# https://gist.github.com/skyl/1715202
#
# Modified... | |
# Copyright 2015, Google 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:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... | |
import datetime
import json
import thread
import time
import uuid
from Queue import Queue
from datetime import datetime
from flask import Flask, render_template, request, session, Response, \
stream_with_context
app = Flask(__name__)
app.config['SECRET_KEY'] = 'asdf'
app.debug = True
heartbeat_interval = 10 # sec... | |
# 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, ... | |
'''
Created on 14. sep. 2017 v2
@author: LJB
'''
from __future__ import division
from numba import jit, float64, void
import numpy as np
import matplotlib.pyplot as plt
import timeit
import scipy.linalg as linalg
_DPI = 250
_SIZE = 0.7
def figure_set_default_size():
F = plt.gcf()
DefaultSize = [8 * _SIZE, ... | |
import mc
import re
import sys
import random
import time
import md5
import pickle
import mythtv
import threading
from ttvdb import tvdb_api
from mythtv import MythError
from operator import itemgetter, attrgetter
"""
MythBoxeeBase is the base class for which the majority of classes
within the app inherit. It sets up t... | |
"""Pm deliver module"""
import os
import re
import grp
import stat
import shutil
import itertools
import glob
import json
import datetime
from cement.core import controller
from scilifelab.pm.core.controller import AbstractBaseController, AbstractExtendedBaseController
from scilifelab.report import sequencing_success
... | |
"""SCons.Job
This module defines the Serial and Parallel classes that execute tasks to
complete a build. The Jobs class provides a higher level interface to start,
stop, and wait on jobs.
"""
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
#
# Permission is hereby gr... | |
import os
import tarfile
import tempfile
import shutil
from collections import namedtuple, OrderedDict
import h5py
import numpy
from scipy.io import loadmat
from six import iteritems
from six.moves import range, zip
from PIL import Image
from fuel.converters.base import fill_hdf5_file, check_exists, progress_bar
from... | |
import gzip
from test import LONG_TIMEOUT
from unittest import mock
import pytest
from dummyserver.server import HAS_IPV6
from dummyserver.testcase import HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase
from urllib3 import HTTPHeaderDict, HTTPResponse, request
from urllib3.connectionpool import port_by_scheme
fr... | |
import platform
from toolz.functoolz import (thread_first, thread_last, memoize, curry,
compose, pipe, complement, do, juxt, flip)
from toolz.functoolz import _num_required_args
from operator import add, mul, itemgetter
from toolz.utils import raises
from functools import partial
def is... | |
#!/usr/bin/env python
import logging
l = logging.getLogger("claripy.frontends.frontend")
import ana
#pylint:disable=unidiomatic-typecheck
class Frontend(ana.Storable):
def __init__(self, solver_backend):
self._solver_backend = solver_backend
self.result = None
self._simplified = False
#
# Storable support... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.