gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
#! /usr/bin/env python
# Simulates an ancestral selection graph for (serial) sample data.
# February 22, 2012:
# changed because the branching was broken before. Nodes that
# branch shouldn't have two parents with real edges to each; they
# should have one edge that forks so that the same mutations
# happen along th... | |
"""
Plot CMDs for CUT components and show that components with higher kinematic
age show less overluminosity in comparison to others.
"""
import numpy as np
from astropy.table import Table
import matplotlib.pyplot as plt
import matplotlib.ticker as ticker
from matplotlib.gridspec import GridSpec
from mpl_toolkits.axes... | |
# 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 use ... | |
from __future__ import absolute_import
from datetime import datetime, timedelta
from dateutil.relativedelta import relativedelta
from pyparsing import (Word, Literal, ZeroOrMore, Optional,
Group, StringEnd, alphas)
from celery.utils import is_iterable
from celery.utils.timeutils import (timedel... | |
import dbus
from dbus import DBusException
from time import sleep
from six.moves.urllib.parse import unquote
import random
from os.path import join as joinpath, exists, isdir, isfile
import os
import mimetypes
from subprocess import Popen
import shlex
from redlib.api.system import CronDBus, CronDBusError, in_cron, sys... | |
'''
Take a crashing file and the origional sample. Locate the minimum change
required to cause crash.
'''
import struct, sys, time, os, re, pickle
import gc, tempfile
from multiprocessing import *
try:
import comtypes
from ctypes import *
from comtypes import HRESULT, COMError
from comtypes.client import Crea... | |
#!/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 timehome@corp.globo.com
from os.path import expanduser, join
import tempfile
import derpconf... | |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Contains a class to handle a validation result for a single VOTable
file.
"""
# STDLIB
from xml.parsers.expat import ExpatError
import hashlib
import os
import shutil
import socket
import subprocess
import warnings
import pickle
import urllib.request... | |
# Copyright 2020, The TensorFlow Federated 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 o... | |
import copy
import functools
import hashlib
import logging
import re
import socket
import time
# from keystoneclient import adapter
from keystoneauth1 import adapter
from oslo_utils import importutils
from oslo_utils import netutils
import requests
from requests import adapters
try:
import json
except ImportErro... | |
from kivy.app import App
from kivy.lang import Builder
from kivy.uix.vkeyboard import VKeyboard
from kivy.uix.textinput import TextInput
from kivy.uix.boxlayout import BoxLayout
from kivy.config import Config
from kivy.logger import Logger
import time
import datetime
kv="""
<MyVKeyboardQwerty>:
layout: 'qwerty'
<... | |
import datetime
from unittest import mock, skipIf, skipUnless
from django.core.exceptions import FieldError
from django.db import NotSupportedError, connection
from django.db.models import (
F, OuterRef, RowRange, Subquery, Value, ValueRange, Window, WindowFrame,
)
from django.db.models.aggregates import Avg, Max,... | |
#!/usr/bin/env python
import os
import sys
import shutil
import numpy as np
import warnings
from astropy.io import fits
from astropy.utils.exceptions import AstropyWarning
from astropy.table import Table
from dlnpyutils import utils as dln, coords, bindata, dbutils, job_daemon as jd
from astropy import units as u
from... | |
#!/usr/bin/python3
import os, sys
import time
import random
import subprocess
import collections
import threading
import queue
import enum
from autobgch.bgch_libs.ipc_util import *
from autobgch.bgch_libs.misc_util import *
from autobgch.bgch_libs.ipcmsg_handling import *
__version__ = '0.4.1'
class Stat(enum.IntEnu... | |
from functools import reduce
import json
import operator
from django.contrib.auth.models import Group, Permission
from django.db.models import Q
from django.test import TestCase
from django.urls import reverse
from django.utils.crypto import get_random_string
from rest_framework.authtoken.models import Token
from accou... | |
from __future__ import print_function
import argparse
import os
import random
import sys
sys.path.append(os.getcwd())
import pdb
import time
import numpy as np
import json
import progressbar
import sys
sys.path.append('../')
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.nn.parallel... | |
import atexit
import json
import sys
import os
sys.path.append(os.getcwd() + '/libs/') # Import the libs path.
from traceback import print_exc
import requests
import webbrowser
import time
from controller import (TEAM_CODE,
TIME_BETWEEN_MOVES,
Controller,)
SERVER_URL =... | |
# Copyright 2014 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 ag... | |
import time
from datetime import datetime, timedelta
from future.utils import with_metaclass
from .filtering import FilterableMetaclass
# The interval to reload volatile properties
volatile_refresh_timeout = timedelta(seconds=15)
class Property:
def __init__(self, mutable=False, identifier=False, volatile=False... | |
from json import loads
from django.contrib import messages
from django.contrib.auth import get_user_model
from core import constants as core_constants
from core.mixins import TemplateLoginRequiredMixin
from .forms import ContainerForm, TripForm
from .models import Container, Trip
User = get_user_model()
class View... | |
# Copyright (C) 2014,2015 VA Linux Systems Japan K.K.
# Copyright (C) 2014,2015 YAMAMOTO Takashi <yamamoto at valinux co jp>
# 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 t... | |
# -*- coding: utf-8 -*-
import numpy as np
import pytest
import pandas as pd
import pandas.util.testing as tm
from pandas.core.arrays import (DatetimeArrayMixin,
TimedeltaArrayMixin,
PeriodArray)
# TODO: more freq variants
@pytest.fixture(params=['D', ... | |
from __future__ import print_function
import maya.cmds as mc
import os.path
import string
"""
author: Johan Schreurs
author-email: johan.schreurs@gmail.com
license: MIT license, see below for full license text.
The gist of it is that an MIT license is open and very permissive.
maya-versions: only tested on M... | |
# Copyright 2013 VMware, 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... | |
# Copyright (c) 2013 Mirantis 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 writ... | |
# -*- coding: utf-8; mode: python; indent-tabs-mode: t; tab-width:4 -*-
############################################################################
#
# Copyright (C) 2017 Georges Khaznadar <georgesk@debian.org>
#
#
# This file may be used under the terms of the GNU General Public
# License version 3.0 as published ... | |
from gzip import compress
from urllib.parse import quote
from pkg_resources import resource_string
from json import loads, dumps
from collections import OrderedDict
def res_plain(resource):
"""Returns package data as plain bytes"""
return resource_string(__name__, resource)
def res_gzip(... | |
#!/usr/bin/env python
import sys, os
import itertools
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))))
MAXUNICODE = 0x10FFFF # the value of sys.maxunicode of wide Python builds
MANDATORY_LINE_BREAKS = ["BK", "CR", "LF", "NL"] # line break categori... | |
# 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... | |
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# 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 o... | |
# 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 absolute_import, division, print_function, unicode_literals
import vtool_ibeis as vt
import numpy as np
import utool as ut
from vtool_ibeis._pyflann_backend import pyflann as pyflann
from os.path import basename, exists # NOQA
from six.moves import range
from ibeis.algo.h... | |
# 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... | |
# Copyright 2014 Arista Networks, 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 requ... | |
'''
'''
from __future__ import absolute_import
from collections import defaultdict
import logging
import os
import sys
import time
import pytest
import rejester
from rejester.exceptions import EnvironmentError, LockError
logger = logging.getLogger(__name__)
pytest_plugins = 'rejester.tests.fixtures'
def test_regis... | |
# -*- coding: utf-8 -*-
# The MIT License (MIT) - Copyright (c) 2016-2021 Dave Vandenbout.
"""
Utility functions used by the rest of SKiDL.
"""
from __future__ import ( # isort:skip
absolute_import,
division,
print_function,
unicode_literals,
)
import collections
import os
import os.path
import re
... | |
import sys
import os
# ===========================
# = Directory Declaractions =
# ===========================
CURRENT_DIR = os.path.dirname(__file__)
NEWSBLUR_DIR = CURRENT_DIR
TEMPLATE_DIRS = (os.path.join(CURRENT_DIR, 'templates'),
os.path.join(CURRENT_DIR, 'vendor/zebra/templates'))
MEDIA_ROOT... | |
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | |
# Copyright (c) 2001-2005 Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Test cases for twisted.words.protocols.msn
"""
# System imports
import StringIO, sys
# Twisted imports
# t.w.p.msn requires an HTTP client
try:
# So try to get one - do it directly instead of catching an ImportError
# from... | |
"""
NOTE ON UNITS:
This module uses cgs units.
"""
import numpy as np
from scipy.interpolate import interp1d
from giapy import MODPATH
############# UNITS ############
# 1 dyne = 1 g cm / s^2 = 1e-5 N = 1e-5 kg m / s^2
# 1 GPa = 1e9 Pa = 1e9 N/m^2
# 1 GPa = 1e10 dyne / cm^2
class EarthParams(object):
""... | |
"""Boolean algebra module for SymPy"""
from sympy.core.basic import Basic
from sympy.core.operations import LatticeOp
from sympy.core.function import Application, sympify
class Boolean(Basic):
"""A boolean object is an object for which logic operations make sense."""
__slots__ = []
def __and__(self, othe... | |
import mock
from twisted.trial import unittest
from oppy.socks import socks
class SOCKSTest(unittest.TestCase):
@mock.patch('oppy.circuit.circuitmanager.CircuitManager', autospec=True)
def setUp(self, mock_cm):
self.mock_cm = mock_cm
self.socksp = socks.OppySOCKSProtocol(self.mock_cm)
... | |
import cv2
from SIGBTools import *
import operator
######################################################################
#
# Pupil Detection
#
######################################################################
def getPupilCandidates(image):
'''
Applies cv2.findContours to binary image, then filters th... | |
# Copyright (c) 2012-2013 ARM Limited
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
# to a hardware implementation of the functiona... | |
import json
import os
import sys
import textwrap
import traceback
from tempfile import mktemp
from typing import Any, AnyStr, Dict, List, Optional, Tuple
import click
import structlog
import urllib3
from mirakuru import ProcessExitedWithError
from urllib3.exceptions import InsecureRequestWarning
from raiden.constants... | |
"""
=================================================
The :mod:`mpi_array.globale_creation_test` Module
=================================================
Module for testing creation/factory functions which
generate instances of :mod:`mpi_array.globale.gndarray`.
Execute as::
python -m mpi_array.globale_creation_te... | |
# 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... | |
# coding: utf-8
#
# Copyright 2021 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... | |
# 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... | |
from datetime import datetime, timedelta
import mock
import requests
from django.test import TestCase, override_settings
from data_finder.helpers import EveryElectionWrapper
# mock get_data() functions
def get_data_exception(self, query_url):
raise requests.exceptions.RequestException()
def get_data_no_election... | |
#!/usr/bin/python
import logging
import optparse
import psycopg2
from local import local_settings
logger = logging.getLogger(__name__)
logger.addHandler(logging.StreamHandler())
#logger.setLevel(logging.DEBUG)
verbose = False
def connect():
conn_template = "dbname='%s' user='%s' host='%s' password='%s'"
db... | |
# -*- coding: utf-8 -*-
"""storages.py: messages extends"""
from django.utils.module_loading import import_string as get_storage
from django.contrib.messages.storage.base import BaseStorage, Message
from django.conf import settings
from messages_extends.models import Message as PersistentMessage
from messages_extends.... | |
"""
============
Keyed Models
============
The use case that this addresses is where a client has a dataset with many keys - the distribution
of distinct keys amongst the is such that the total number of rows for every key value can be
contained completely in memory on a single machine.
This assumption is particularl... | |
import ujson
from django.http import HttpResponse
from django.test import override_settings
from mock import patch
from typing import Any, Dict
from zerver.lib.initial_password import initial_password
from zerver.lib.sessions import get_session_dict_user
from zerver.lib.test_classes import ZulipTestCase
from zerver.... | |
#!/usr/bin/env python3
# Copyright (c) 2013-2019 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Generate seeds.txt from Pieter's DNS seeder
#
import re
import sys
import dns.resolver
import collect... | |
""" Test script for the unicodedata module.
Written by Marc-Andre Lemburg (mal@lemburg.com).
(c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
"""
from __future__ import unicode_literals
import sys
import unittest
import hashlib
encoding = 'utf-8'
errors = 'surrogatepass'
if sys.version_info < (3,):
... | |
##########################################################################
#
# Copyright (c) 2012, John Haddon. All rights reserved.
# Copyright (c) 2012-2014, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided ... | |
#!/usr/bin/env python
__author__ = "Vivek <vivek.balasubramanian@rutgers.edu>"
__copyright__ = "Copyright 2014, http://radical.rutgers.edu"
__license__ = "MIT"
__use_case_name__ = "'Gromacs + LSDMap' simulation-analysis proof-of-concept (ExTASY)."
from radical.ensemblemd import Kernel
from radic... | |
"""
Create a template app from ODM-formatted OpenClinica study metadata
"""
from lxml import etree
from django.core.management.base import BaseCommand
from corehq.apps.app_manager.models import (
Application,
Module,
OpenCaseAction,
UpdateCaseAction,
PreloadAction,
OpenSubCaseAction,
FormAct... | |
# Copyright 2019 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, ... | |
##
# This module implements a hierarchy of authorities and performs a similar
# function as the "tree" module of the original SFA prototype. An HRN
# is assumed to be a string of authorities separated by dots. For example,
# "planetlab.us.arizona.bakers". Each component of the HRN is a different
# authority, with the l... | |
from django.contrib.auth import authenticate, login
from django.contrib.auth import logout
from django.http import JsonResponse
from django.shortcuts import render, get_object_or_404
from django.db.models import Q
from .forms import AlbumForm, SongForm, UserForm
from .models import Album, Song
AUDIO_FILE_TYPES = ['wav... | |
# -*- coding: utf-8 -*-
#
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | |
# coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import os
from twit... | |
# Copyright 2016. DePaul University. All rights reserved.
# This work is distributed pursuant to the Software License
# for Community Contribution of Academic Work, dated Oct. 1, 2016.
# For terms and conditions, please see the license file, which is
# included in this distribution.
""" All the sqlite3 functions neede... | |
import sys, getpass, os, psutil, time, requests, errno, threading, inspect, shlex
import h2o_os_util, h2o_print as h2p, h2o_args
import h2o_nodes
from h2o_test import \
tmp_dir, tmp_file, flatfile_pathname, spawn_cmd, find_file, verboseprint, \
dump_json, log, check_sandbox_for_errors
import json, platform, re
... | |
# -*- coding: utf-8 -*-
"""
Initial text preprocessing.
Although text processing can be technically done within feature generation functions,
we found it to be very efficient to make all preprocessing first and only then move to
feature generation. It is because the same processed text is used as an input to
generate... | |
#!/usr/bin/python
import os
import shutil
import sys
import uuid
import subprocess
from subprocess import check_call
from urlparse import urlparse
from charmhelpers.core.hookenv import (
Hooks,
UnregisteredHookError,
config,
charm_dir,
log,
relation_get,
relation_ids,
relation_set,
... | |
import logging
from psycopg2.extras import DateRange
from datetime import date, time, timedelta, datetime
from django.shortcuts import redirect
from django.db.models import Q
from django.utils.dateparse import parse_date, parse_time
from django.contrib.auth.mixins import LoginRequiredMixin
from django.views.generic im... | |
# Author: Nicolas Boulanger-Lewandowski
# University of Montreal (2012)
# RNN-RBM deep learning tutorial
# More information at http://deeplearning.net/tutorial/rnnrbm.html
from __future__ import print_function
import glob
import os
import sys
import numpy
try:
import pylab
except ImportError:
print ("pylab i... | |
"""Trackable data structures."""
# 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... | |
# 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... | |
""" pydevd_vars deals with variables:
resolution/conversion to XML.
"""
import pickle
from _pydevd_bundle.pydevd_constants import get_frame, get_thread_id, xrange
from _pydevd_bundle.pydevd_custom_frames import get_custom_frame
from _pydevd_bundle.pydevd_xml import ExceptionOnEvaluate, get_type, var_to_xml
from _p... | |
import logging
from SPARQLWrapper import SPARQLWrapper, JSON
import requests
from dipper.sources.Source import Source
from dipper.models.Model import Model
from dipper.models.BiolinkVocabulary import BioLinkVocabulary as blv
__author__ = 'timputman'
LOG = logging.getLogger(__name__)
class MyChem(Source):
def __... | |
#!/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.
"""Script to create Chrome Installer archive.
This script is used to create an archive of all the files required for a
Chrome ... | |
"""
Render a set of NetCDF files to images.
Stretched renderers may have one of the following colormap values:
1.0 (absolute)
max (calculate max across datasets)
0.5*max (calculate max across datasets, and multiply by value)
TODO:
* connect palettes to create matching class breaks
* combine palette and scale over whi... | |
#!/usr/bin/env python3
"""Test the general MG solver with Dirichlet boundary conditions.
Here we solve::
alpha phi + div{beta grad phi} + gamma . grad phi = f
with::
alpha = 1.0
beta = cos(2*pi*x)*cos(2*pi*y) + 2.0
gamma_x = sin(2*pi*x)
gamma_y = sin(2*pi*y)
f = (-16.0*pi**2*cos(2*pi*x)*cos(2*pi... | |
#!/usr/bin/env python3
import logging
import math
from pathlib import Path
from typing import Dict, List, Optional, Tuple
import torch
import torch.nn as nn
from torch import Tensor
from fairseq import checkpoint_utils, utils
from fairseq.data.data_utils import lengths_to_padding_mask
from fairseq.models import (
... | |
# Copyright (c) 2013 Mirantis 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 writ... | |
# Copyright 2012 NTT Data. All Rights Reserved.
# Copyright 2012 Yahoo! 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/li... | |
# sqlalchemy/pool.py
# Copyright (C) 2005-2014 the SQLAlchemy authors and contributors <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""Connection pooling for DB-API connections.
Provides a number of connection poo... | |
# Testing collections and workspaces
import logging
import os
import shutil
import sys
import unittest
import fiona
from fiona.collection import supported_drivers
from fiona.errors import FionaValueError, DriverError, SchemaError, CRSError
logging.basicConfig(stream=sys.stderr, level=logging.DEBUG)
class Supported... | |
#!/usr/bin/env python
"""
Rules for building C/API module with f2py2e.
Here is a skeleton of a new wrapper function (13Dec2001):
wrapper_function(args)
declarations
get_python_arguments, say, `a' and `b'
get_a_from_python
if (successful) {
get_b_from_python
if (successful) {
callfortran
... | |
#Copyright 2019 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,... | |
# -*- coding: utf8 -*-
"""EEG Regression - Core TensorFlow implementation code.
July 2016
March 2017 - update Enea, integrated the queue.
"""
import gc
import math
import re
import resource
import sys
import time
import matplotlib.pyplot as plot
import numpy as np
import numpy.matlib
import scipy.io as sio
import t... | |
#!/usr/bin/env python
#
# Appcelerator Titanium Module Packager
#
#
import os, subprocess, sys, glob, string
import zipfile
from datetime import date
cwd = os.path.abspath(os.path.dirname(sys._getframe(0).f_code.co_filename))
os.chdir(cwd)
required_module_keys = ['architectures', 'name','version','moduleid','descripti... | |
#! /usr/bin/env python
#
# Copyright (c) 2014 Limit Point Systems, 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 b... | |
# Copyright 2013 Mellanox Technologies, Ltd
#
# 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 t... | |
from django import forms
from django.forms.widgets import HiddenInput, Select
from datetime import datetime, timedelta
COUNTRIES = [('US', 'United States'),
('AD', 'Andorra'),
('AE', 'United Arab Emirates'),
('AF', 'Afghanistan'),
('AG', 'Antigua and Bar... | |
"""
Testing the detection functions.
"""
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from .context import salientregions as sr
from .context import salientregions_detectors as srd
import unittest
import cv2
import os
import numpy as np
class _DetectorForTesting(srd.Detector):
'''
Mock impl... | |
import fnmatch
import inspect
import os
from importlib.util import spec_from_file_location
import logging
import sys
__dirname, __init_python_script = os.path.split(os.path.abspath(__file__))
logger = logging.getLogger("SimplePlugins")
formatter = logging.Formatter('%(asctime)s %(name)-12s %(levelname)-8s %(message... | |
"""Functional tests for slice op."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow.python.platform
import numpy as np
from six.moves import xrange # pylint: disable=redefined-builtin
import tensorflow as tf
class SliceTest(tf.test.Tes... | |
#!/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... | |
# -*- coding: utf-8 -*-
########################################################################
#
# License: BSD
# Created: May 26, 2003
# Author: Francesc Alted - faltet@pytables.com
#
# $Id$
#
########################################################################
"""Here is defined the AttributeSet class."""
im... | |
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
import unittest
import re
import os
import os.path
import shutil
import tempfile
import tarfile
import xml.etree.ElementTree as ET
import io
import stat
import mimetypes
import flask
from werkzeug.utils import cached_property
import browsepy
import browsepy.file
import ... | |
"""
Functions to convert pmfs to latex arrays.
"""
import contextlib
import os
import subprocess # noqa: S404
import tempfile
from debtcollector import removals
import numpy as np
import numpy.core.arrayprint as arrayprint
from .context import cd, named_tempfile, tempdir
from .misc import default_opener
__all__ ... | |
from __future__ import absolute_import
from __future__ import unicode_literals
import tempfile
from datetime import datetime, timedelta
from django.db.models import Count
from django.conf import settings
from django.core.files.base import ContentFile
from django.core.mail import send_mail
from django.core.urlresolver... | |
# Copyright 2018 ARM Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writin... | |
# Copyright (C) 2015-2020 Guillaume VINET
#
# 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 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.