gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
"""
Copyright (c) 2013 The Regents of the University of California, AMERICAN INSTITUTES FOR RESEARCH
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the abo... | |
#!/usr/bin/env python
'''hive -- Hive Shell
This lets you ssh to a group of servers and control them as if they were one.
Each command you enter is sent to each host in parallel. The response of each
host is collected and printed. In normal synchronous mode Hive will wait for
each host to return the shell command lin... | |
#**************************************************************************#
# This file is part of pymsc which is released under MIT License. See file #
# LICENSE or go to https://github.com/jam1garner/pymsc/blob/master/LICENSE #
# for full license details. #
#***********... | |
import os
import shutil
import tempfile
import warnings
import numpy
from pickle import loads
from pickle import dumps
from functools import partial
from sklearn.datasets import get_data_home
from sklearn.datasets import clear_data_home
from sklearn.datasets import load_files
from sklearn.datasets import load_sample_i... | |
import logging
import unittest
import os
import pandas as pd
import numpy as np
import h5py
import pandas.util.testing as pandas_testing
import cmapPy.pandasGEXpress.setup_GCToo_logger as setup_logger
import cmapPy.pandasGEXpress.GCToo as GCToo
import cmapPy.pandasGEXpress.parse_gctx as parse_gctx
import cmapPy.pandas... | |
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#--------------------------------------------------------------------------
from dateti... | |
from collections.abc import Mapping
from ctypes import c_int, c_int32, c_double, c_char_p, POINTER, \
create_string_buffer, c_size_t
from weakref import WeakValueDictionary
import numpy as np
from numpy.ctypeslib import as_array
from openmc.exceptions import AllocationError, InvalidIDError
from . import _dll
from... | |
"""
Return data to an ODBC compliant server. This driver was
developed with Microsoft SQL Server in mind, but theoretically
could be used to return data to any compliant ODBC database
as long as there is a working ODBC driver for it on your
minion platform.
:maintainer: C. R. Oldham (cr@saltstack.com)
:maturity: ... | |
#!/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... | |
#!/usr/bin/env python3
# Copyright (c) 2015-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 activation of the first version bits soft fork.
This soft fork will activate the following BIPS:
... | |
# -*- coding: utf-8 -*-
from __future__ import division
__author__ = 'marco.muetze <at> tu-dresden.de'
from .helper import check_bounds_and_get_dimension
from .prototypes import Mesh
import numpy as np
from scipy.interpolate import RegularGridInterpolator
def calculate_bounds(axes):
lower = []
upper = []... | |
# 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.
"""A bare-bones test server for testing cloud policy support.
This implements a simple cloud policy test server that can be used to test
chrome's device... | |
import os
import logging
import archinfo
from .regions import Region, Segment, Section, Regions
from .symbol import Symbol
from ..address_translator import AT
from ..memory import Clemory
from ..errors import CLEOperationError, CLEError
l = logging.getLogger('cle.backends')
class Backend(object):
"""
Main b... | |
# coding=utf-8
from django.test import TestCase, override_settings
from ..handlers import PermissionHandler
from ..handlers import LogicalPermissionHandler
from .utils import create_user, create_article
from .models import Article
from .compat import MagicMock
@override_settings(
PERMISSION_DEFAULT_PERMISSION_HAN... | |
from statsmodels.compat.python import range, lrange, lzip, long
import numpy as np
import numpy.lib.recfunctions as nprf
import pandas as pd
from pandas import DataFrame
from pandas.tseries import offsets
from pandas.tseries.frequencies import to_offset
from statsmodels.tools.sm_exceptions import ValueWarning
from st... | |
"""
The MIT License (MIT)
Copyright (c) 2016-2017 Louis-Philippe Querel l_querel@encs.concordia.ca
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 limitatio... | |
#!/usr/bin/env python
# Imports from the Python standard library
from __future__ import print_function
import os
import sys
import datetime
import textwrap
import hmac
import hashlib
# Imports from third-party modules that this project depends on
try:
import requests
from flask import Flask, request, render_t... | |
# Copyright (C) 2020 NTT DATA
# 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 ... | |
#
# Kivy - Cross-platform UI framework
# https://kivy.org/
#
from __future__ import print_function
import sys
build_examples = False
if "--build_examples" in sys.argv:
build_examples = True
sys.argv.remove("--build_examples")
from copy import deepcopy
import os
from os.path import join, dirname, sep, exists, ... | |
# -*- coding: utf-8 -*-
#!/usr/bin/env python
#
# Copyright 2012-2015 BigML
#
# 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... | |
import logging
import re
import random
import os
import time
from google.appengine.ext import ndb
from google.appengine.ext import endpoints
from google.appengine.ext import deferred
from google.appengine.api import memcache
from protorpc import remote
from model import ShortLink
import api_messages
import utils
from... | |
# MIT License, copyright Ewan Macpherson, 2016; see LICENCE in root directory
# Curve calculations
from copy import copy
import math
from ec.common import Bearing, LinearEquation
from ec.section import TrackSection
class CurveError(Exception):
pass
class TrackCurve(TrackSection):
""" Group of track sectio... | |
import numpy as np
import pytest
import pandas as pd
from pandas import DataFrame, DatetimeIndex, Index, Series, Timestamp, date_range
import pandas._testing as tm
class TestSeriesAppend:
def test_append(self, datetime_series, string_series, object_series):
appended_series = string_series.append(object_s... | |
import builtins
from io import StringIO
import numpy as np
import pytest
from pandas.errors import UnsupportedFunctionCall
import pandas as pd
from pandas import DataFrame, Index, MultiIndex, Series, Timestamp, date_range, isna
import pandas._testing as tm
import pandas.core.nanops as nanops
from pandas.util import ... | |
import json
import re
from django.conf import settings
from django.http import HttpResponse, JsonResponse
from django.views.generic import View
from inflection import camelize, pluralize, singularize
from rest_framework import viewsets
from hooks import MockServerHookParser
from json_api_builder import (
JsonAPIE... | |
''' Models (mostly base classes) for the various kinds of renderer
types that Bokeh supports.
'''
from __future__ import absolute_import
import logging
logger = logging.getLogger(__name__)
from ..core.enums import RenderLevel
from ..core.has_props import abstract
from ..core.properties import Auto, Bool, Either, Enu... | |
# 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... | |
# -*- coding: utf-8 -*-
from __future__ import with_statement
from django.core.cache import cache
from django.template import Template, RequestContext
from django.test.utils import override_settings
from sekizai.context import SekizaiContext
from cms import plugin_rendering
from cms.api import create_page, add_plugin... | |
"""
Wrapper for the layout.
"""
from typing import Dict, Generator, Iterable, List, Optional, Union
from prompt_toolkit.buffer import Buffer
from .containers import (
AnyContainer,
ConditionalContainer,
Container,
Window,
to_container,
)
from .controls import BufferControl, SearchBufferControl, UI... | |
"""Functions for downloading and reading MNIST data."""
# 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/license... | |
import getpass
import sys
import time
import numpy as np
from copy import deepcopy
from utils import calculate_perplexity, get_ptb_dataset, Vocab
from utils import ptb_iterator, sample
import tensorflow as tf
from tensorflow.python.ops.seq2seq import sequence_loss
from model import LanguageModel
# Let's set the par... | |
"""
Load pp, plot and save
8km difference
"""
import os, sys
#%matplotlib inline
#%pylab inline
import matplotlib
matplotlib.use('Agg')
# Must be before importing matplotlib.pyplot or pylab!
from matplotlib import rc
from matplotlib.font_manager import FontProperties
from matplotlib import rcParams
from mpl_to... | |
# encoding: utf-8
"""Unit test suite for the docx.text.paragraph module"""
from __future__ import absolute_import, division, print_function, unicode_literals
from docx.enum.style import WD_STYLE_TYPE
from docx.enum.text import WD_ALIGN_PARAGRAPH
from docx.oxml.text.paragraph import CT_P
from docx.oxml.text.run impor... | |
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import os
import re
from lxml import etree
import openerp
import openerp.tools as tools
import openerp.modules
import print_xml
import render
import urllib
from openerp import SUPERUSER_ID
from openerp.report.render.r... | |
"""
mbed SDK
Copyright (c) 2011-2019 ARM Limited
SPDX-License-Identifier: Apache-2.0
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 ... | |
# vim: set fileencoding=utf-8 :
#
# Copyright (c) 2012 Retresco GmbH
# Copyright (c) 2011 Daniel Truemper <truemped at googlemail.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
#
# ht... | |
import threading
from contextlib import contextmanager
import os
from os.path import abspath, join as pjoin
import shutil
from subprocess import check_call, check_output, STDOUT
import sys
from tempfile import mkdtemp
from . import compat
from .in_process import _in_proc_script_path
__all__ = [
'BackendUnavailabl... | |
import nose
import angr
import time
import pickle
import networkx
import simuvex
import logging
l = logging.getLogger("angr.tests.test_cfg")
import os
test_location = str(os.path.join(os.path.dirname(os.path.realpath(__file__)), '../../binaries/tests'))
def compare_cfg(standard, g, function_list):
"""
Standa... | |
"""
This module provides a Python implementation of functionality of the GNU tail command.
"""
import os
class TailError(Exception):
"""Tail exceptions"""
class TailBase:
"""
Operations to extract the beginning or end of a stream
"""
line_terminators = ('\r\n', '\n', '\r')
def __init__(self, ... | |
# Copyright (c) 2001-2008 Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Test cases for failure module.
"""
import sys
import StringIO
import traceback
from twisted.trial import unittest, util
from twisted.python import failure
try:
from twisted.test import raiser
except ImportError:
raiser =... | |
from enum import Enum
import basicTypes
class MainOp(Enum):
J = 2
JAL = 3
BEQ = 4
BNE = 5
BLEZ = 6
BGTZ = 7
ADDI = 8
ADDIU = 9
SLTI = 10
SLTIU = 11
ANDI = 12
ORI = 13
XORI = 14
LUI = 15
BEQL = 20
BNEL = 21
BLEZL = 22
BGTZL = ... | |
# -*- coding: utf-8 -*-
import copy
import datetime
import hashlib
import logging
import os
import sys
import jsonschema
import yaml
import yaml.scanner
from staticconf.loader import yaml_loader
from . import alerts
from . import enhancements
from . import ruletypes
from .opsgenie import OpsGenieAlerter
from .util im... | |
# -*- coding: utf-8 -*-
"""
Created on Tue Dec 27 20:43:15 2016
@author: pchero
"""
import socket
class MainControl(object):
sock = None
connect = False
buf = []
username = None
password = None
ip = None
port = None
data_handler = None
view_handler = None
def __... | |
# Copyright (c) 2002 Vivake Gupta (vivakeATomniscia.org). All rights reserved.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later... | |
#!/usr/bin/env python
#
# Copyright 2012 the V8 project authors. All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# noti... | |
# Quick tests for the markup templatetags (django_markwhat)
import re
import unittest
from django.template import Template, Context
from django.utils.html import escape
try:
import textile
except ImportError:
textile = None
try:
import markdown
markdown_version = getattr(markdown, "version_info", 0)... | |
# config.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
# This module is part of GitPython and is released under
# the BSD License: http://www.opensource.org/licenses/bsd-license.php
"""Module containing module parser implementation able to properly read and write
configuration files"... | |
# 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.
"""Generates test runner factory and tests for GTests."""
import fnmatch
import glob
import logging
import os
import shutil
import sys
from pylib import an... | |
"""Testing for the boost module (sklearn.ensemble.boost)."""
import numpy as np
from sklearn.utils.testing import assert_array_equal, assert_array_less
from sklearn.utils.testing import assert_array_almost_equal
from sklearn.utils.testing import assert_equal, assert_true
from sklearn.utils.testing import assert_raises... | |
#!/usr/bin/env python
#
# Merge multiple JavaScript source code files into one.
#
# Usage:
# This script requires source files to have dependencies specified in them.
#
# Dependencies are specified with a comment of the form:
#
# // @requires <file path>
#
# e.g.
#
# // @requires Geo/DataSource.js
#
# This scri... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Helper functions
"""
from __future__ import print_function, division
import math
import numpy as np
__all__ = ['i4_sobol']
def i4_bit_hi1(n):
"""Returns the position of the high 1 bit base 2 in an integer.
Parameters
----------
n : int
The ... | |
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
"""
Boot session from cache or build
Session bootstraps info needed by common client side activities including
permission, homepage, default variables, system defaults etc
"""
im... | |
#!/usr/bin/python
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import fbchisellldbbase as fb
import fbchisellldbobjcruntimehelpers as runtimeHelpers
import fbchiselll... | |
# 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... | |
from __future__ import unicode_literals
import re
import warnings
from django.core.exceptions import ImproperlyConfigured
from django.core.mail import send_mail
from django.core import validators
from django.db import models
from django.db.models.manager import EmptyManager
from django.utils.crypto import get_random_s... | |
"""Text wrapping and filling.
"""
# Copyright (C) 1999-2001 Gregory P. Ward.
# Copyright (C) 2002, 2003 Python Software Foundation.
# Written by Greg Ward <gward@python.net>
__revision__ = "$Id: textwrap.py 75231 2009-10-04 14:49:41Z benjamin.peterson $"
import string, re
__all__ = ['TextWrapper', 'wrap', 'fill', '... | |
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'DummyTable'
db.create_table(u'news_dummytable', (
(u'id', self.gf('django.db.mod... | |
# apis_v1/views/views_organization.py
# Brought to you by We Vote. Be good.
# -*- coding: UTF-8 -*-
from follow.models import UPDATE_SUGGESTIONS_FROM_TWITTER_IDS_I_FOLLOW, UPDATE_SUGGESTIONS_FROM_WHAT_FRIENDS_FOLLOW, \
UPDATE_SUGGESTIONS_FROM_WHAT_FRIENDS_FOLLOW_ON_TWITTER, UPDATE_SUGGESTIONS_FROM_WHAT_FRIEND_FOLLO... | |
"""Support for Nest devices."""
import asyncio
import logging
from google_nest_sdm.event import EventMessage
from google_nest_sdm.exceptions import (
AuthException,
ConfigurationException,
GoogleNestException,
)
from google_nest_sdm.google_nest_subscriber import GoogleNestSubscriber
import voluptuous as v... | |
import datetime as dt
import smtplib
from collections import defaultdict
from collections import OrderedDict
from timeflow.settings import Settings
from timeflow.utils import DATE_FORMAT
from timeflow.utils import DATETIME_FORMAT
from timeflow.utils import calc_time_diff
from timeflow.utils import date_begins
from ti... | |
# This file helps to compute a version number in source trees obtained from
# git-archive tarball (such as those provided by githubs download-from-tag
# feature). Distribution tarballs (built by setup.py sdist) and build
# directories (produced by setup.py build) will contain a much shorter file
# that just contains th... | |
# VMware vSphere Python SDK
# Copyright (c) 2008-2021 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
#
# ... | |
# Copyright 2012 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2012 Nebula, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the... | |
"""
Plugin responsible for setting OpenStack global options
"""
import glob
import logging
import os
import re
import uuid
from packstack.installer import (basedefs, exceptions, processors, utils,
validators)
from packstack.modules.common import filtered_hosts
from packstack.modules.... | |
"""
Copyright (c) 2014-2015, The University of Texas at Austin.
All rights reserved.
This file is part of BLASpy and is available under the 3-Clause
BSD License, which can be found in the LICENSE file at the top-level
directory or at http://opensource.org/licenses/BSD-3-Clause
"""
from blaspy im... | |
import pytest
import decimal
import numpy as np
import pandas as pd
from pandas import to_numeric, _np_version_under1p9
from pandas.util import testing as tm
from numpy import iinfo
class TestToNumeric(object):
def test_series(self):
s = pd.Series(['1', '-3.14', '7'])
res = to_numeric(s)
... | |
"""
Support for getting statistical data from a DWD Weather Warnings.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.dwd_weather_warnings/
Data is fetched from DWD:
https://rcccm.dwd.de/DE/wetter/warnungen_aktuell/objekt_einbindung/objekteinbindu... | |
import os
import sys
import textwrap
import unittest
import pyperf
from pyperf import tests
TESTDIR = os.path.dirname(__file__)
TELCO = os.path.join(TESTDIR, 'telco.json')
class BaseTestCase(object):
maxDiff = 100 * 80
def create_bench(self, values, metadata=None):
if metadata is None:
... | |
# coding: utf-8
#
# Copyright 2014 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... | |
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
# See http://swift.org/CONTRIBUTORS.txt for the list of ... | |
# Copyright 2018 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
# Copyright 2011 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | |
#!/bin/python
# -*- coding: utf-8 -*-
"""
Reconstructs temperature fields based on selected indexfields regression data from db
TODO: Work in progress! Implement try and excepts, substitute hardcoded dimensions (81,161)
Created on Mon May 11 23:00:15 2015
@author: Manuel Beck
"""
"""
# # # # # # # #... | |
# Copyright 2016 ETH Zurich
#
# 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, sof... | |
import os
import glob
import shutil
from django.conf import settings
from django.contrib.gis.db import models
from django.core.cache import cache
from django.template.defaultfilters import slugify
from django.utils.html import escape
from django.db.models.signals import post_delete
from django.dispatch.dispatcher impor... | |
import MySQLdb
from cxparams import CXParams as CXP
import time
import functools
import array
import sys
import pdb
import cPickle
import re
# Credit here to M. Newville (GSECARS) for SimpleTable and SimpleDB
def clean_input(x, maxlen=None):
"""clean input, forcing it to be a string, with comments stripped,
a... | |
# Copyright 2019 The Magenta 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 ... | |
"""
Copyright 2016 Deepgram
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
distri... | |
# Copyright (c) 2014 eBay Software Foundation
# Copyright 2015 HP Software, 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.o... | |
"""Install packages via the MacOSX Homebrew and Linux Linuxbrew package manager.
https://github.com/mxcl/homebrew
https://github.com/Homebrew/linuxbrew
"""
from __future__ import print_function
import contextlib
from distutils.version import LooseVersion
import os
import sys
import yaml
from cloudbio.custom import sy... | |
# Begin: Python 2/3 compatibility header small
# Get Python 3 functionality:
from __future__ import\
absolute_import, print_function, division, unicode_literals
from future.utils import raise_with_traceback, raise_from
# catch exception with: except Exception as e
from builtins import range, map, zip, filter
from i... | |
#!/usr/bin/env python
# Copyright (c) 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.
"""
Tool to perform checkouts in one easy command line!
Usage:
fetch <recipe> [--property=value [--property2=value2 ...]]
This ... | |
'''
Generate some random frames from an image, and also plot out the colors
Gareth flips the camera every 5m, and this causes a spike in the RGB signals. We want to use these as pointers and to allow us to
register the videos. We use k-means to identify the middle of each slice, and use the difference of those as t... | |
#from opengmcore import _opengmcore.adder as adder
from opengmcore import *
from __version__ import version
from functionhelper import *
from _inf_param import _MetaInfParam , InfParam
from _visu import visualizeGm
from _misc ... | |
# Copyright 2012 IBM Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | |
# -*- coding: utf-8 -*-
'''
Configuration of network interfaces
===================================
The network module is used to create and manage network settings,
interfaces can be set as either managed or ignored. By default
all interfaces are ignored unless specified.
.. note::
Prior to version 2014.1.0, on... | |
# -*- coding: utf-8 -*-
"""
Project Tracking & Management
"""
module = request.controller
resourcename = request.function
if not settings.has_module(module):
raise HTTP(404, body="Module disabled: %s" % module)
mode_task = settings.get_project_mode_task()
# =================================================... | |
import datetime
from unittest import mock
from ddt import data, ddt
from freezegun import freeze_time
from rest_framework import status, test
from waldur_core.structure.models import CustomerRole
from waldur_core.structure.tests import factories as structure_factories
from waldur_core.structure.tests import fixtures
... | |
# Copyright 2015 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 writing... | |
"""
Manage OS-level configuration.
"""
import os
import logging
from collections import defaultdict
from archinfo import ArchARM, ArchMIPS32, ArchMIPS64, ArchX86, ArchAMD64, ArchPPC32, ArchPPC64, ArchAArch64
from cle import MetaELF, BackedCGC
from cle.address_translator import AT
import claripy
from .errors import (
... | |
# Copyright (c) 2015 Red Hat, 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 require... | |
# -*- coding: utf-8 -*-
import logging
log = logging.getLogger(__name__)
from skosprovider.providers import VocabularyProvider
from skosprovider.skos import (
ConceptScheme,
Concept,
Collection,
Label,
Note,
Source
)
from skosprovider_sqlalchemy.models import (
Thing,
ConceptScheme a... | |
#!/usr/bin/env python
"""Script to convert templates from Mako to Jinja2."""
import io
import glob
import sys
import os
import re
import json
import shutil
import tempfile
import colorama
import jinja2
dumb_replacements = [
["{% if any(post.is_mathjax for post in posts) %}", '{% if posts|selectattr("is_mathjax")... | |
import h2o, h2o_cmd, re, os
import h2o_print as h2p
import getpass, time
#****************************************************************************************
# hdfs/maprfs/s3/s3n paths should be absolute from the bucket (top level)
# so only walk around for local
# using this standalone, we probably want 'put' de... | |
"""The WaveBlocks Project
This file contains the class which represents a homogeneous Hagedorn wavepacket.
@author: R. Bourquin
@copyright: Copyright (C) 2010, 2011 R. Bourquin
@license: Modified BSD License
"""
from functools import partial
from numpy import zeros, complexfloating, array, sum, transpose, arange
fro... | |
# Code obtained from: http://code.djangoproject.com/attachment/ticket/5446/country_and_language_fields_trunk.2.patch
# Countries list - ISO 3166-1993 (E)
# http://xml.coverpages.org/country3166.html
from django.db.models.fields import CharField
from django.utils.translation import ugettext_lazy as _, ugettext
from dj... | |
from axiom.store import Store
from merlyn import auth
from OpenSSL.crypto import FILETYPE_PEM, load_certificate, load_privatekey
from twisted.python.log import ILogObserver, addObserver, removeObserver
from twisted.test.proto_helpers import StringTransport
from twisted.trial.unittest import SynchronousTestCase
from zop... | |
#!/usr/bin/env python
# encoding: utf-8
"""Pyvona : an IVONA python library
Author: Zachary Bears
Contact Email: bears.zachary@gmail.com
"""
import datetime
import hashlib
import hmac
import json
import tempfile
import contextlib
import os
import logging
from ..audio import sounds
logger = logging.getLogger(__name_... | |
#!/usr/bin/python
#
# Filename: telnet_top_100_defaults.py
#
# Version: 1.0.0
#
# Author: Joe Gervais (TryCatchHCF)
#
# Summary:
#
# Part of the DumpsterFire Toolset. See documentation at https://github.com/TryCatchHCF/DumpsterFire
#
# Description:
#
#
import os, sys, telnetlib, datetime
from FireModules.fire_modu... | |
"""Reads an NCBI Gene tsv file."""
from __future__ import print_function
import sys
import re
from collections import namedtuple
from collections import OrderedDict
__copyright__ = "Copyright (C) 2016-present, DV Klopfenstein, H Tang, All rights reserved."
__author__ = "DV Klopfenstein"
#pylint: disable=line-too-l... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.