gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
import os
from os import mkdir, chmod
from os.path import join, exists
import stat
import tempfile
import shutil
import sys
import hashlib
import bz2
import difflib
from zipfile import ZipFile
from subprocess import Popen, PIPE
from nose.tools import *
import unittest
from pixiepatch import *
from pixiepatch.bz2compr... | |
# -*- encoding: utf-8 -*-
#
# Copyright 2013 Hewlett-Packard Development Company, L.P.
#
# 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 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... | |
# django-salesforce
#
# by Phil Christensen
# (c) 2012-2013 Freelancers Union (http://www.freelancersunion.org)
# See LICENSE.md for details
#
"""
Customized fields for Salesforce, especially the primary key. (like django.db.models.fields)
"""
from typing import Any, Callable, Optional, Tuple, Type, TYPE_CHECKING, Un... | |
from .. import names
from ..ndtypes import BoolT, IntT
import type_mappings
from reserved_names import is_reserved
class BaseCompiler(object):
def __init__(self, extra_link_flags = None, extra_compile_flags = None):
self.blocks = []
self.name_versions = {}
self.name_mappings = {}
self.extra_li... | |
import warnings
import numpy as np
from .core import CallbackBase, CollectThenCompute
class LiveFit(CallbackBase):
"""
Fit a model to data using nonlinear least-squares minimization.
Parameters
----------
model : lmfit.Model
y : string
name of the field in the Event document that is ... | |
# 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 ... | |
#!/usr/bin/env python3
import smbus, os, struct, time
class FuelGauge:
def __init__(self, address=0x64, bus=None, shunt=0.002):
self.address = address
self.charge = None
self.voltage = None
self.current = None
self.temperature = None
self.timestamp ... | |
# Copyright 2012 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | |
from numpy import ones, resize, linspace, atleast_3d
from traits.api import Property, Str, Button, Trait, \
Any, Instance, HasStrictTraits, false, Dict, HasTraits, \
CArray, Bool
from traitsui.api import EnumEditor, View, Item, HGroup, \
VGroup, spring, Group, TextEditor, HTMLEditor, InstanceEditor, \
... | |
#!/usr/bin/env python
# Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Module which provides compatibility with older Python versions."""
__all__ = ["PY3", "int", "long", "xrange", "exec_"... | |
"""Module that reads binary Plink files."""
# This file is part of pyplink.
#
# The MIT License (MIT)
#
# Copyright (c) 2014 Louis-Philippe Lemieux Perreault
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
... | |
from sklearn import metrics, preprocessing, pipeline, \
feature_extraction, decomposition, model_selection
import sklearn
import pandas as pd
import numpy as np
from time import gmtime, strftime
import numpy.random as rng
# from multiprocessing.dummy import Pool
# import concurrent.futures
import tensorflow as tf
... | |
"""Hierarchical Agglomerative Clustering
These routines perform some hierarchical agglomerative clustering of some
input data.
Authors : Vincent Michel, Bertrand Thirion, Alexandre Gramfort,
Gael Varoquaux
License: BSD 3 clause
"""
from heapq import heapify, heappop, heappush, heappushpop
import warnings
im... | |
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# 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 ... | |
# Copyright (C) 2012-2013 Red Hat, 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 la... | |
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: lr-model-meta.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protob... | |
import sys
import re;
import time;
import string;
import random;
import math;
import numpy;
import scipy;
import scipy.special;
import scipy.io;
import scipy.sparse;
#import nchar;
import nltk;
import nltk.corpus;
"""
Implements online variational Bayesian for LDA.
"""
class Hybrid:
"""
"""
def __init__(... | |
"""Test the Kuler Sky lights."""
from unittest.mock import MagicMock, patch
import pykulersky
import pytest
from pytest import approx
from homeassistant import setup
from homeassistant.components.kulersky.const import (
DATA_ADDRESSES,
DATA_DISCOVERY_SUBSCRIPTION,
DOMAIN,
)
from homeassistant.components.l... | |
# pyOCD debugger
# Copyright (c) 2018-2020 Arm Limited
# Copyright (c) 2021 Chris Reed
# 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... | |
#!/usr/bin/env python
from __future__ import print_function
"""
test_collate.py
test branching dependencies
"""
import os
import sys
# add grandparent to search path for testing
grandparent_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", ".."))
sys.path.insert(0, grandparent_dir)
#... | |
import contextlib, itertools, os, time, unittest
from . import matrix_results
from bibliopixel.drivers.driver_base import DriverBase
from bibliopixel.layout.matrix import Matrix
from bibliopixel.project import data_maker
from bibliopixel.util import log
WHITE = (255, 255, 255)
DUMP_FILENAME = os.environ.get('BP_MATR... | |
# coding: utf-8
"""
Wavefront REST API Documentation
<p>The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagging sources.</p><p>When you make REST API calls outside the W... | |
from decimal import *
import datetime
from operator import attrgetter
from django.forms.formsets import formset_factory
from django.contrib.sites.models import Site
from models import *
from forms import *
try:
from notification import models as notification
except ImportError:
notification = None
def is_n... | |
import io
import os
import shutil
import tempfile
from docker import errors
import six
from .base import BaseAPIIntegrationTest
from ..helpers import requires_api_version
class BuildTest(BaseAPIIntegrationTest):
def test_build_streaming(self):
script = io.BytesIO('\n'.join([
'FROM busybox',... | |
#! /usr/bin/python
# FileSR: local-file storage repository
import FileSR
import SR
import SRCommand
import cleanup
import errno
import nfs
import os
import stat
import sys
import util
import vhdutil
import xs_errors
from lock import Lock
CAPABILITIES = ["SR_PROBE", "SR_UPDATE", "SR_CACHING", \
"VDI_CR... | |
# -*- coding: utf-8 -*-
from __future__ import division
from __future__ import print_function
from __future__ import absolute_import
from __future__ import unicode_literals
import unittest
import json
from flask.ext.oauthlib.client import OAuthResponse
from mock import patch
from app import create_app
from app.databa... | |
#!/usr/bin/python
"""
SUNTANS NetCDF plotting GUI
"""
import os
import wx
# The recommended way to use wx with mpl is with the WXAgg
# backend.
#
import matplotlib
matplotlib.use('WXAgg')
# Set some default parameters
matplotlib.rcParams['text.color']='white'
matplotlib.rcParams['savefig.facecolor']='black'
matplotl... | |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""Audio Recording utilities.
Parts of this code are taken from:
- https://stackoverflow.com/a/6743593/2402281
Information to write this code are taken from:
- https://en.wikipedia.org/wiki/Voice_frequency
"""
# Python-native imports
import logging
import struct
import tim... | |
#!/usr/bin/env python
'''
Copyright (c) 2014, Andrew McConachie <smutt@depht.com>
All rights reserved.
'''
import os
import math
import curses
import locale
import sys
import copy
from time import sleep
# hexcap specific imports
import cfg
import minibuffer
import capture
import packet
import layer
import section
#... | |
import datetime
import warnings
from django.conf import settings
import haystack
from haystack.backends import BaseEngine
from haystack.constants import DEFAULT_OPERATOR, DJANGO_CT, DJANGO_ID
from haystack.exceptions import MissingDependency
from haystack.utils import get_identifier, get_model_ct
# Backport support
... | |
"""
pygments.lexers.dotnet
~~~~~~~~~~~~~~~~~~~~~~
Lexers for .net languages.
:copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import RegexLexer, DelegatingLexer, bygroups, include, \
using, this, defau... | |
from __future__ import absolute_import
import pprint
import logging
import importlib
from itertools import repeat
import boto3
from botocore.client import Config
from botocore.exceptions import ClientError
from .models import TaskMeta
log = logging.getLogger(__name__)
def import_class(qualname):
parts = qualna... | |
import khmer
import numpy as np
import os
import sys
import pandas as pd
import re
import screed
from argparse import ArgumentTypeError
import multiprocessing
import argparse
import subprocess
import json
from itertools import starmap
import tempfile
# The following is for ease of development (so I don't need to keep ... | |
import pdb
import logging
import json
import couchdb
from lr.model.base_model import appConfig
import lr.lib.helpers as h
from pylons import request
from pylons.controllers.util import abort
from lr.lib.base import BaseController
from datetime import datetime, timedelta
from lr.lib.oaipmherrors import *
from lr.lib imp... | |
# Copyright lowRISC contributors.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
import random
from typing import List, Optional, Tuple
def _extended_euclidean_algorithm(a: int, b: int) -> Tuple[int, int, int]:
'''The extended Euclidean algorithm.... | |
__author__ = 'IVMIT KFU: Gataullin Ravil & Veselovkiy Sergei'
from copy import copy
import numpy as np
from sklearn.ensemble import RandomForestClassifier
from time import time
import warnings
warnings.filterwarnings("ignore")
from sklearn.cross_validation import train_test_split
from structure import Position
class... | |
import numpy as np, h5py
import argparse
import cv2
from wrap import CyCompressiveTracker as CompressiveTracker
from wrap import Rect
import torsolib
import tensorflow as tf
'''******************************************************************'''
'''******************************************************************'... | |
import unittest
import datetime
import threading
import time
from .. import task_queue
from .. import connector
from .. import queue
from .. import encoder
class TaskQueueTestCase:
order_matters = True
def test_purge_tasks(
self,
):
self.test_task_queue.purge_tasks(
task_name... | |
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# 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 ... | |
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""
Change directory to provide relative paths for doctests
>>> import os
>>> filepath = os.path.dirname( os.path.realpath( __file__ ) )
>>> datadir = os.path.realpath(os.path.join(filepath,... | |
# -*- coding: utf-8 -*-
#
# Author: Jonas Berg
# Copyright (c) 2015, Semcon Sweden AB
# 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 above co... | |
# -*- coding: utf-8 -*-
#
# django-codenerix
#
# Copyright 2017 Centrologic Computational Logistic Center S.L.
#
# Project URL : http://www.codenerix.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 ... | |
# Copyright (c) 2017 Cisco Systems
# 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... | |
import json
import pytest
import responses
from koordinates import Set, Client, Group, Publish
from .response_data.responses_3 import (
sets_single_good_simulated_response,
sets_new_draft_good_simulated_response,
sets_single_draft_good_simulated_response,
sets_multi_version_good_simulated_response,
... | |
# Copyright 2012 Cloudbase Solutions Srl
#
# 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 l... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import errno
from numpy import *
import os
import re
import string
import subprocess
import sys
from getpass import getuser
QUEUE_RUN = 'o14d'
QUEUE_ANALYZE = 'o12h'
# Paths:
ARRAY_PBS_GOJA = "array_goja.pbs"
ARRAY_PBS_MISSING = "array.pbs.missing"
def r... | |
# Copyright (C) 2014 New York University
# This file is part of ReproZip which is released under the Revised BSD License
# See file LICENSE for full license details.
"""Utility functions.
These functions are shared between reprozip and reprounzip but are not specific
to this software (more utilities).
"""
import cod... | |
"""
Python Interchangeable Virtual Instrument Library
Copyright (c) 2012-2016 Alex Forencich
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the... | |
# Copyright 2014 Hewlett-Packard Development Company, L.P.
#
# Author: Kiall Mac Innes <kiall@hpe.com>
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/... | |
#!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... | |
# Copyright (c) 2015 Uber Technologies, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publ... | |
# Copyright (c) 2010-2011 OpenStack, 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 ... | |
import json
from datetime import datetime, timedelta
from test.factories import ProjectFactory, OrganizationFactory, IssueFactory
from test.harness import IntegrationTest
from app import db, Issue
class TestProjects(IntegrationTest):
def test_all_projects_order(self):
"""
Test that projects gets... | |
#!/usr/bin/env python
"""Routine to make it easy to read command line arguments in a keyword=value
style format. Also has support for --help, help=, -h. Version keyword can
be printed with -v or --version.
lists can be given as e.g.: 1-3;5,6 which becomes: [[1,2,3],[5,6]]
File globbing and expansion of ~ is supporte... | |
from __future__ import unicode_literals
import httplib
import logging
from modularodm import Q
from modularodm.storage.base import KeyExistsException
from flask import request
from framework.auth import Auth
from framework.exceptions import HTTPError
from framework.auth.decorators import must_be_signed
from websit... | |
# Copyright 2014 Open Connectome Project (http://openconnecto.me)
#
# 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 ... | |
from __future__ import unicode_literals
from djblets.webapi.testing.decorators import webapi_test_template
from reviewboard.webapi.tests.mixins_extra_data import (ExtraDataItemMixin,
ExtraDataListMixin)
class BaseCommentListMixin(object):
@webapi_test_temp... | |
#!/usr/bin/env python3
# Copyright (c) 2014-2017 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 listtransactions API."""
from test_framework.test_framework import BitcoinTestFramework
from ... | |
# Copyright 2011 Tsutomu Uchino
#
# 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
# Copyright (c) 2016 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | |
# 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
# encoding: utf-8
# Copyright 2012 Aaron Morton
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required ... | |
#
# Copyright 2015 Paul Osborne <osbpau@gmail.com>
# Copyright (c) 2021 Chris Reed
#
# 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
#
# Unles... | |
# 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... | |
import functools
import warnings
from django.conf import settings
# Avoid shadowing the login() and logout() views below.
from django.contrib.auth import (
REDIRECT_FIELD_NAME, get_user_model, login as auth_login,
logout as auth_logout, update_session_auth_hash,
)
from django.contrib.auth.decorators import log... | |
"""
Contingency table functions (:mod:`scipy.stats.contingency`)
============================================================
Functions for creating and analyzing contingency tables.
.. currentmodule:: scipy.stats.contingency
.. autosummary::
:toctree: generated/
chi2_contingency
relative_risk
crosstab
... | |
from itertools import product as cartes
from sympy import (
limit, exp, oo, log, sqrt, Limit, sin, floor, cos, ceiling,
atan, gamma, Symbol, S, pi, Integral, cot, Rational, I, zoo,
tan, cot, integrate, Sum, sign, Function)
from sympy.series.limits import heuristics
from sympy.series.order import Order
fro... | |
import contextlib
import os
import tempfile
import unittest
import numpy
import chainer
from chainer import links
from chainer import testing
def _decorrelated_batch_normalization(x, mean, projection, groups):
xs = numpy.split(x, groups, axis=1)
assert mean.shape[0] == groups
assert projection.shape[0] ... | |
"""
The dataset for the pforest.
GNU GENERAL PUBLIC LICENSE Version 2
Created on Tue Oct 14 18:52:01 2014
@author: Wasit
"""
import numpy as np
import os
#from PIL import Image
#from scipy.ndimage import filters
try:
import json
except ImportError:
import simplejson as json
#1800
#num_img=100
#spi=5
#
#rootd... | |
""" Lin G. et al "`RefineNet: Multi-Path Refinement Networks for High-Resolution Semantic Segmentation
<https://arxiv.org/abs/1611.06612>`_"
"""
import tensorflow as tf
from .layers import conv_block
from . import TFModel
from .resnet import ResNet, ResNet101
class RefineNet(TFModel):
""" RefineNet
**Confi... | |
import unittest
import tkinter
import os
from tkinter import ttk
from test.support import requires, run_unittest
import tkinter.test.support as support
from tkinter.test.test_ttk.test_functions import MockTclObj, MockStateSpec
requires('gui')
class WidgetTest(unittest.TestCase):
"""Tests methods available in eve... | |
from __future__ import print_function, unicode_literals
#! /usr/bin/env python
#
# This file is part of khmer, https://github.com/dib-lab/khmer/, and is
# Copyright (C) Michigan State University, 2009-2015. It is licensed under
# the three-clause BSD license; see LICENSE. Contact: ctb@msu.edu
#
# pylint: disable=invali... | |
# ######################################################################
# Copyright (c) 2014, Brookhaven Science Associates, Brookhaven #
# National Laboratory. All rights reserved. #
# #
# Redistribution and use in ... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | |
import ast
import builtins
from collections.abc import Mapping
import os
import sys
import threading
import warnings
import yaml
no_default = "__no_default__"
paths = [
os.getenv("DASK_ROOT_CONFIG", "/etc/dask"),
os.path.join(sys.prefix, "etc", "dask"),
os.path.join(os.path.expanduser("~"), ".config", ... | |
import os
import py_compile
import shutil
import sys
import tempfile
import unittest
import zipfile
from test import test_support
from java.lang import Thread
import pkgutil
class ClasspathImporterTestCase(unittest.TestCase):
def setUp(self):
self.orig_context = Thread.currentThread().contextClassLoader
... | |
#!/usr/bin/env python
import unittest
from test import test_support
import errno
import socket
import select
import thread, threading
import time
import traceback
import Queue
import sys
import os
import array
from weakref import proxy
import signal
HOST = test_support.HOST
MSG = 'Michael Gilfix was here\n'
class S... | |
# -*- coding: utf-8 -*-
"""
A program to run multiple Spigelman's Monster simulations in order for
parametric analysis
"""
import os, time, ast, importlib, pylab
import numpy as np
import spiegelman
import parameters as defaults
from matplotlib.collections import LineCollection
from matplotlib.colors import colorConv... | |
# Author: Mathieu Blondel <mathieu@mblondel.org>
# Arnaud Joly <a.joly@ulg.ac.be>
# Maheshakya Wijewardena <maheshakya.10@cse.mrt.ac.lk>
# License: BSD 3 clause
from __future__ import division
import warnings
import numpy as np
import scipy.sparse as sp
from .base import BaseEstimator, ClassifierMixin... | |
"""
File: internals.py
Author: Ulf Krumnack
Email: krumnack@uni-osnabrueck.de
Github: https://github.com/krumnack
"""
# standard imports
import importlib
import sys
import os
import re
# Qt imports
from PyQt5 import QtCore
from PyQt5.QtWidgets import QWidget, QGroupBox, QLabel, QPushButton
from PyQt5.QtWidgets import... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# utils.py
#
# Copyright 2016 Bruno S <bruno@oac.unc.edu.ar>
#
# 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 Licens... | |
# Copyright (c) 2012 OpenStack Foundation.
# Copyright (c) 2014 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... | |
# Copyright 2012 New Dream Network, LLC (DreamHost)
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by a... | |
import os
import logging
from functools import wraps
from urlparse import urlparse
import tempfile
from typecheck import accepts, Self
from zinc.models import ZincIndex, ZincManifest, ZincCatalogConfig, ZincFlavorSpec
from zinc.defaults import defaults
from zinc.formats import Formats
import zinc.helpers as helpers
im... | |
# encoding=utf8
import datetime
from distutils.version import StrictVersion
import hashlib
import os.path
import random
from seesaw.config import realize, NumberConfigValue
from seesaw.item import ItemInterpolation, ItemValue
from seesaw.task import SimpleTask, LimitConcurrent
from seesaw.tracker import GetItemFromTrac... | |
# -*- coding: utf-8 -*-
"""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 9228 2008-12-13 04:50:49Z friedelwolff $"
import string, re
# Do the right thing with... | |
# 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 ... | |
"""Implementation of :class:`Domain` class. """
from __future__ import print_function, division
from sympy.polys.domains.domainelement import DomainElement
from sympy.core import Basic, sympify
from sympy.core.compatibility import SYMPY_INTS, HAS_GMPY, integer_types, is_sequence
from sympy.polys.polyerrors import U... | |
import warnings
import numpy as np
import pandas as pd
from tlz import partition
from ._compat import PANDAS_GT_131
# preserve compatibility while moving dispatch objects
from .dispatch import ( # noqa: F401
concat,
concat_dispatch,
group_split_dispatch,
hash_object_dispatch,
is_categorical_dty... | |
#! /usr/bin/env python
# -*- coding: utf-8 -*-
#
# Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# https://developers.google.com/protocol-buffers/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that t... | |
#!/usr/bin/env python3
# Copyright (c) 2018 The Bitcoin developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *
from test_framewor... | |
from __future__ import print_function
import logging # debug < info < warn < error < critical # from https://docs.python.org/3/howto/logging-cookbook.html
import traceback
import theano
import theano.tensor as T
from tqdm import tqdm
logger_combinedtools = logging.getLogger('combined.tools')
logger_combinedtools.s... | |
#!/bin/env python
# Automatically translated python version of
# OpenSceneGraph example program "osgpoints"
# !!! This program will need manual tuning before it will work. !!!
import sys
from osgpypp import osg
from osgpypp import osgDB
from osgpypp import osgUtil
from osgpypp import osgViewer
# Translated from f... | |
import os
import datetime
import xlsxwriter
def create_excel_report(meterId, sDate, eDate, OnePhase, hProfile, dProfile,
hEvents, dEvents):
""" Creates the excel file
"""
dest_path = 'static/reports/'
if not os.path.exists(dest_path):
os.makedirs(dest_path)
dest_fil... | |
from django.db import models
from django.contrib.auth.models import User
from django import forms
from django.core.exceptions import ObjectDoesNotExist
class CustomListField(models.TextField):
'''
for creating custom list field override some model.fields methods
TODO: improve the description of what thi... | |
"""Tests for letsencrypt.renewer."""
import datetime
import os
import tempfile
import pkg_resources
import shutil
import unittest
import configobj
import mock
import pytz
from letsencrypt.storage import ALL_FOUR
def unlink_all(rc_object):
"""Unlink all four items associated with this RenewableCert."""
for k... | |
import numpy as np
import pandas as pd
import pytest
from vivarium import InteractiveContext
from vivarium.framework.lookup import LookupTable, validate_parameters
from vivarium.testing_utilities import TestPopulation, build_table
@pytest.mark.skip(reason="only order 0 interpolation with age bin edges currently supp... | |
"""
LLDB AppKit formatters
Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
See https://llvm.org/LICENSE.txt for license information.
SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
"""
# example summary provider for NSNumber
# the real summary is now C++ code built into LLDB
from... | |
# Copyright 2018 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 app... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.