gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
## ParseMaster, version 1.0 (pre-release) (2005/05/12) x6
## Copyright 2005, Dean Edwards
## Web: http://dean.edwards.name/
##
## This software is licensed under the CC-GNU LGPL
## Web: http://creativecommons.org/licenses/LGPL/2.1/
##
## Ported to Python by Florian Schulze
import os, re, sys
# a multi-pattern p... | |
import astropy.time
import numpy as np
import pytest
from astropy import units as u
from astropy.tests.helper import assert_quantity_allclose
from numpy.testing import assert_allclose
from poliastro.bodies import Earth
from poliastro.core.elements import coe2mee, coe2rv, mee2coe, rv2coe
from poliastro.twobody import a... | |
"""
dj-stripe Plan Model Tests.
"""
from copy import deepcopy
from unittest.mock import patch
import pytest
import stripe
from django.test import TestCase
from djstripe.enums import PriceUsageType
from djstripe.models import Plan, Product, Subscription
from djstripe.settings import djstripe_settings
from . import (
... | |
# Copyright 2014 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 agreed to in writing, ... | |
#!/usr/bin/env python
import ast
import re
import sys
from xml.etree import ElementTree as ET
import docutils.core
import docutils.nodes
from itertools import izip
import inspect
import matplotlib
matplotlib.use('Qt4Agg')
import matplotlib.docstring
def new_call(self, func):
return func
matplotlib.docstring.Subst... | |
# -*- coding: utf-8 -*-
"""Parser for Microsoft Internet Explorer (MSIE) Cache Files (CF)."""
import pymsiecf
from dfdatetime import fat_date_time as dfdatetime_fat_date_time
from dfdatetime import filetime as dfdatetime_filetime
from dfdatetime import semantic_time as dfdatetime_semantic_time
from plaso.containers ... | |
#!/usr/bin/python2.7
# -*- coding: utf-8 -*-
# vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab
# 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
... | |
import builtins
import imp
from importlib.test.import_ import test_relative_imports
from importlib.test.import_ import util as importlib_util
import marshal
import os
import platform
import py_compile
import random
import stat
import sys
import unittest
import textwrap
import errno
from test.support import (
Envir... | |
# Copyright (c) 2014, Salesforce.com, Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# - Redistributions of source code must retain the above copyright
# notice, this list of conditions... | |
""" High-level classes for reading HDF5 files. """
from collections import deque
from collections.abc import Mapping, Sequence
import os
import posixpath
import numpy as np
from .core import Reference
from .dataobjects import DataObjects
from .misc_low_level import SuperBlock
class Group(Mapping):
"""
An ... | |
# -*- 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 'LostPasswordHash'
db.create_table('sentry_lostpasswordhash', (
('id', self.gf('d... | |
from django.template import (
Context, Engine, TemplateDoesNotExist, TemplateSyntaxError, loader,
)
from django.test import SimpleTestCase
from ..utils import setup
from .test_basic import basic_templates
include_fail_templates = {
'include-fail1': '{% load bad_tag %}{% badtag %}',
'include-fail2': '{% lo... | |
# -*- coding: utf-8 -*-
"""
Created on Thu Oct 1 15:03:35 2015
@author: fergal
$Id$
$URL$
"""
__version__ = "$Id$"
__URL__ = "$URL$"
import matplotlib as mp
import numpy as np
import matplotlib.pyplot as mp
import numpy as np
import dave.fileio.mastio as mastio
import dave.fileio.tpf as tpf
import dave.fileio... | |
#!/usr/bin/env python
# encoding: utf-8
import os
from efl.evas import EVAS_HINT_EXPAND, EVAS_HINT_FILL, FilledImage
from efl import elementary
from efl.elementary.window import StandardWindow
from efl.elementary.button import Button
from efl.elementary.list import List, ELM_LIST_LIMIT
from efl.elementary.icon import... | |
# 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... | |
#1
#v 0.001
from ERROR import *
"""
TODO's:
- SetLight():
###
I have to learn about these a little more :P
"""
#global public usage variables:
global UGE_POINTS,UGE_LINES,UGE_LINESTRIP,UGE_LINELOOP,UGE_TRIANGLES,UGE_TRIANGLESTRIP,UGE_TRIANGLEFAN,UGE_QUADS,UGE_QUADSTRIP,UGE_POLYGON
UGE_POINTS,UGE_LINES,UGE_LINESTRIP... | |
import json
from django.http import HttpResponse
from django.shortcuts import render
from django.views.decorators.csrf import csrf_exempt
from clients.models import Client, Configuration, ConfigurationFile
from clients.models import ClientException
from cmdb_agent.lib import lib
###########
# Helpers
###########
d... | |
#!/usr/bin/env python
#
# Copyright 2019 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 ... | |
# 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 ... | |
from __future__ import unicode_literals
import re
from django.core.exceptions import FieldDoesNotExist
from django.db.models.constants import LOOKUP_SEP
from django.db.models.expressions import Col, Expression
from django.db.models.lookups import Lookup
from django.utils import six
gis_lookups = {}
class GISLookup... | |
#!/usr/bin/python
#
# Copyright 2011 Software Freedom Conservancy.
#
# 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 ap... | |
#!/usr/bin/env python3
#
try:
import gdb
except ImportError as e:
raise ImportError("This script must be run in GDB: ", str(e))
import sys
import os
import common_helpers
sys.path.append(os.getcwd())
def find_type(orig, name):
typ = orig.strip_typedefs()
while True:
# Strip cv qualifiers
... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import cherrypy
import htpc
import requests
from json import dumps
import logging
from cherrypy.lib.auth2 import require, member_of
from htpc.helpers import fix_basepath, striphttp
class Transmission(object):
# Transmission Session ID
sessionId = ''
reqz = re... | |
# file eulexistdb/db.py
#
# Copyright 2010,2011 Emory University Libraries
#
# 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... | |
import contextlib
import json
import os
import shutil
import tempfile
from unittest import mock
from urllib.parse import quote as url_quote
import requests
from pylxd import exceptions, models
from pylxd.tests import testing
class TestInstance(testing.PyLXDTestCase):
"""Tests for pylxd.models.Instance."""
... | |
#!/usr/bin/env python
# coding: utf-8
import os
import re
import time
import subprocess
import glob
import tarfile
import shutil
import getpass
DelExe = '../testMain'
# OutDir = '/store/user/benwu/Stop16/Trigger/'
# OutDir = '/store/user/benwu/Stop16/TTZ'
OutDir = '/store/user/benwu/Stop16/Tagger'
# OutDir = '/sto... | |
# Copyright (c) 2001, Stanford University
# All rights reserved.
#
# See the file LICENSE.txt for information on redistributing this software.
import sys
sys.path.append( "../glapi_parser" )
import apiutil
apiutil.CopyrightC()
print """/* DO NOT EDIT! THIS CODE IS AUTOGENERATED BY unpack.py */
#include "unpacker... | |
#!/usr/bin/python
# Copyright: Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Invoke tasks. To run a task, run ``$ invoke <COMMAND>``. To see a list of
commands, run ``$ invoke --list``.
"""
import os
import sys
import code
import json
import platform
import subprocess
import logging
from time import sleep
import invoke
from invoke import Collect... | |
# Authors: Nicolas Tresegnie <nicolas.tresegnie@gmail.com>
# Sergey Feldman <sergeyfeldman@gmail.com>
# License: BSD 3 clause
from __future__ import division
import warnings
import numbers
import numpy as np
import numpy.ma as ma
from scipy import sparse
from scipy import stats
from ..base import BaseEstim... | |
#
#
# Copyright (C) 2006, 2007, 2010, 2011 Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list ... | |
import ray._raylet as raylet
import ray.core.generated.ray_client_pb2 as ray_client_pb2
import ray.core.generated.ray_client_pb2_grpc as ray_client_pb2_grpc
from ray.util.client import ray
from ray.util.client.options import validate_options
from ray._private.signature import get_signature, extract_signature
from ray._... | |
import pytest
import random
import numpy.random
from numpy.testing import assert_equal
from thinc.api import fix_random_seed
from spacy import util
from spacy.lang.en import English
from spacy.language import Language
from spacy.pipeline import TextCategorizer
from spacy.tokens import Doc
from spacy.pipeline.tok2vec im... | |
# Copyright 2017 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... | |
"""A contour component. This component wraps around the
tvtk.ContourFilter and provides convenient options to either
automatically generate a specified number of contours between a given
minimum and maximum value or explicitly specify the contours. This
component may be used for any input data. The component also pr... | |
# -*- coding: utf-8 -*-
from functools import wraps
import json
import logging
import traceback
import time
from base64 import b64encode as encode_url
from flask import Flask, Response, session, abort, jsonify, g, request
from flask_restful import Resource, Api
from werkzeug.local import LocalProxy
import requests
from... | |
__author__ = 'Frank Sehnke, sehnke@in.tum.de'
from pybrain.rl.environments import EpisodicTask
from pybrain.rl.environments.ode.sensors import SpecificBodyPositionSensor
from scipy import tanh, zeros, array, random, sqrt, asarray
#Basic class for all ccrl tasks
class CCRLTask(EpisodicTask):
def __init__(self, en... | |
"""
This module contains SymPy functions mathcin corresponding to special math functions in the
C standard library (since C99, also available in C++11).
The functions defined in this module allows the user to express functions such as ``expm1``
as a SymPy function for symbolic manipulation.
"""
from sympy.core.funct... | |
from sympy.utilities.pytest import XFAIL, raises
from sympy import (S, Symbol, symbols, oo, I, pi, Float, And, Or, Not, Implies,
Xor)
from sympy.core.relational import ( Relational, Equality, Unequality,
GreaterThan, LessThan, StrictGreaterThan, StrictLessThan, Rel, Eq, Lt, Le,
Gt, Ge, Ne )
from sympy.sets.... | |
##########################################################################
#
# Copyright (c) 2014, Esteban Tovagliari. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistribution... | |
#
#
# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2014 Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# 1. Redistributions of source code must retain the above copyri... | |
import logging
import time
import sys
import numpy as np
from joblib import Parallel, delayed
from sklearn.utils.extmath import safe_sparse_dot
from chain_opt import optimize_chain_fast
from common import latent
from trw_utils import optimize_chain, optimize_kappa
from graph_utils import decompose_graph, decompose_gr... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 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.apach... | |
# Licensed to Elasticsearch B.V. under one or more contributor
# license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright
# ownership. Elasticsearch B.V. licenses this file to you under
# the Apache License, Version 2.0 (the "License"); you may
# not use ... | |
# Copyright 2013 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 l... | |
import json
import http
import asyncio
from waterbutler.core import streams
from waterbutler.core import provider
from waterbutler.core import exceptions
from waterbutler.core.path import WaterButlerPath
from waterbutler.providers.dropbox import settings
from waterbutler.providers.dropbox.metadata import DropboxRevis... | |
# Copyright 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 req... | |
# -*- test-case-name: txdav.who.test.test_delegates -*-
##
# Copyright (c) 2013-2017 Apple 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/... | |
###########################################################################
# Joshua R. Boverhof, LBNL
# See Copyright for copyright notice!
# $Id: WSsecurity.py 1134 2006-02-24 00:23:06Z boverhof $
###########################################################################
import sys, time, warnings
import sha, base6... | |
#!/usr/bin/env python2
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | |
#!/usr/bin/env python
# -*- coding:utf-8 -*-
import functools
import inspect
import os
from initpy.templates import blank, falcon, flask, tornado_web
from initpy.exceptions import RootPathDoesNotExists
def name_validator(func):
@functools.wraps(func)
def wrapper(*args, **kwargs):
func_args = inspect.... | |
import numpy as np
import matplotlib.pyplot as plt
import os
import sys
import json
import re
import shutil
from PIL import Image
from PIL import ImageFont, ImageDraw
import caffe
from caffe import layers as L
from caffe import params as P
from vqa_data_provider_layer import VQADataProvider
from vqa_data_provider_lay... | |
from __future__ import unicode_literals
import os
import shutil
from unittest import skipIf
from django.core.exceptions import ImproperlyConfigured
from django.core.files import File
from django.core.files.images import ImageFile
from django.test import TestCase
from django.utils._os import upath
try:
from .mode... | |
"""
** deeplean-ai.com **
** dl-lab **
created by :: GauravBh1010tt
"""
import pandas as pd
import numpy as np
import re
#from tqdm import tqdm
from nltk.corpus import wordnet
from nltk import bigrams, trigrams
from collections import Counter, defaultdict
from gensim.models import Word2Vec
from scipy.spatial.distance... | |
# Copyright 2017, 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 ... | |
# file xmlmap/fields.py
#
# Copyright 2010 Emory University General Library
#
# 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
#
# ... | |
# -*- coding: utf-8 -*-
'''
Specto Add-on
Copyright (C) 2016 mrknow
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 3 of the License, or
(at your option) any l... | |
import re
from functools import wraps
import json
import django
from django import template
from django.apps import apps
from django.conf import settings
from django.utils.safestring import mark_for_escaping, mark_safe
from django.utils.html import escape
register = template.Library()
if django.VERSION >= (1, 10):
... | |
import six
import unittest
import warnings
try:
from unittest import mock
except ImportError:
import mock
from scrapy.settings import Settings, SettingsAttribute, CrawlerSettings
from . import default_settings
class SettingsAttributeTest(unittest.TestCase):
def setUp(self):
self.attribute = Sett... | |
# -*- coding: utf-8 -*-
import ast
from PyQt4 import Qt, QtCore
from . import util
CPP_CLASS_HEADER_BASE = '''class {0} {1}{{
public:
{0}();
~{0}();
{2}
}};'''
QT_SIGNAL_HEADER_BASE = '''signals:\n {0}\n'''
QT_SIGNAL_FUNCTION_BASE = 'void {0}({1});'
class ParserBase(object):
def __init__(self, no... | |
# Copyright 2016 Cloudbase Solutions Srl
# 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 r... | |
#
# Package analogous to 'threading.py' but using processes
#
# multiprocessing/__init__.py
#
# This package is intended to duplicate the functionality (and much of
# the API) of threading.py but uses processes instead of threads. A
# subpackage 'multiprocessing.dummy' has the same API but is a simple
# wrapper for 't... | |
import os
import re
from statistics import mean
import numpy as np
import scipy
from conch import analyze_segments
from conch.analysis.praat import PraatAnalysisFunction
from conch.analysis.segments import SegmentMapping
from conch.analysis.formants import PraatSegmentFormantTrackFunction, FormantTrackFunction, \
... | |
#!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Argument-less script to select what to run on the buildbots."""
import filecmp
import os
import shutil
import subprocess
import sys
i... | |
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# Copyright 2010 OpenStack Foundation
# Copyright 2014 IBM Corp.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this f... | |
# -*- coding: utf-8 -*-
import os
from django.conf import settings
from django.db import models
from django.contrib.auth.models import User
from datetime import datetime
from django.utils.translation import ugettext, ugettext_lazy as _
from wikis.settings import *
from wikis.managers.articles import ActiveManager
from ... | |
#!/usr/bin/env python
# -*- cpy-indent-level: 4; indent-tabs-mode: nil -*-
# ex: set expandtab softtabstop=4 shiftwidth=4:
#
# Copyright (C) 2015,2016 Contributor
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a co... | |
"""
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright 2011 Cisco Systems, 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.ap... | |
"""
Tests for the rzlib module.
"""
import py
from rpython.rlib import rzlib
from rpython.rlib.rarithmetic import r_uint
import zlib
expanded = 'some bytes which will be compressed'
compressed = zlib.compress(expanded)
def test_crc32():
"""
When called with a string, rzlib.crc32 should compute its CRC32 an... | |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
import warnings
import os
import ctypes
from functools import partial
import numpy as np
from numpy.ctypeslib import ndpointer, load_library
from .core import Kernel, Kernel1D, Kernel2D, MAX_NORMALIZATION
from astropy.utils.exceptions import AstropyUse... | |
# Copyright 2014 CloudFounders NV
#
# 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... | |
"""Tests for certbot.util."""
import argparse
import errno
from importlib import reload as reload_module
import io
import sys
import unittest
from certbot import errors
from certbot.compat import filesystem
from certbot.compat import os
import certbot.tests.util as test_util
try:
import mock
except ImportError: #... | |
# encoding: utf-8
from south.v2 import DataMigration
class Migration(DataMigration):
def forwards(self, orm):
pass
def backwards(self, orm):
pass
models = {
'webinars.account': {
'Meta': {'object_name': 'Account'},
'account_type': ('django.db.models.fields.... | |
#!/usr/bin/env python3
# transpiled with BefunCompile v1.3.0 (c) 2017
def td(a,b):
return ((0)if(b==0)else(a//b))
def tm(a,b):
return ((0)if(b==0)else(a%b))
s=[]
def sp():
global s
if (len(s) == 0):
return 0
return s.pop()
def sa(v):
global s
s.append(v)
def sr():
global s
i... | |
#!/usr/bin/env python3
"""List all new authors since the given revision. Only tested on Linux."""
import os
import sys
import subprocess
from pathlib import Path
if len(sys.argv) < 2 or sys.argv[1] == '-h' or sys.argv[1] == '--help':
usage = "Usage: authors-since.py revision"
print(usage)
sys.exit(1)
rev... | |
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
import numpy as np
import scipy.stats as sp_stats
# Use the nibabel image object
from nibabel import Nifti1Image as Image
from nibabel.affines import apply_affine
from ..io.nibcompat import get_affine
fro... | |
# Copyright 2012-2013 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 la... | |
# Copyright (c) 2014 Huawei Technologies Co., Ltd.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... | |
"""
Function descriptors.
"""
from collections import defaultdict
import sys
from numba.core import types, itanium_mangler
from numba.core.utils import _dynamic_modname, _dynamic_module
def default_mangler(name, argtypes):
return itanium_mangler.mangle(name, argtypes)
def qualifying_prefix(modname, qualname):... | |
# Natural Language Toolkit: Corpus Access
#
# Copyright (C) 2001 University of Pennsylvania
# Author: Edward Loper <edloper@ldc.upenn.edu>
# URL: <http://nltk.sf.net>
# For license information, see LICENSE.TXT
#
# $Id: __init__.py,v 1.2 2005/04/06 20:43:23 adastra Exp $
#
# Goals for this module:
#
# 1. we want corpu... | |
# Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | |
# Copyright 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... | |
# -*- coding: utf-8 -*-
from django.conf import settings
from django.test.signals import template_rendered
from django.core.handlers.wsgi import WSGIHandler
from django.test import TestCase, TransactionTestCase
from django.test.client import store_rendered_templates
from django.utils.functional import curry
from django... | |
import os
import sys
from optparse import OptionParser
import imp
import django
from django.core.management.base import BaseCommand, CommandError, handle_default_options
# For backwards compatibility: get_version() used to be in this module.
get_version = django.get_version
# A cache of loaded commands, so that call... | |
#!/usr/bin/env python
__author__ = 'Ian Katz, Michael Meisinger'
import re
from ooi import logging
from ooi.logging import log
from pyon.util.containers import get_ion_ts, DotDict
from pyon.core.exception import BadRequest, Inconsistent, NotFound
from pyon.core.registry import getextends
from pyon.ion.resource impor... | |
import functools
import gym
import logging
import numpy as np
import time
from typing import Callable, Dict, List, Optional, Tuple, Type, Union
from ray.rllib.models.modelv2 import ModelV2
from ray.rllib.models.torch.torch_modelv2 import TorchModelV2
from ray.rllib.models.torch.torch_action_dist import TorchDistributi... | |
#!/usr/bin/python
# -*- coding: utf-8 -*-
from django.conf import settings
from django.contrib.auth import get_user_model
from django.contrib.sites.models import Site
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from django.utils.translation import ugettext_lazy as _
from e... | |
# 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... | |
"""Qubits for quantum computing.
Todo:
* Finish implementing measurement logic. This should include POVM.
* Update docstrings.
* Update tests.
"""
import math
from sympy import Integer, log, Mul, Add, Pow, conjugate
from sympy.core.basic import sympify
from sympy.matrices.matrices import Matrix, zeros
from sympy.pri... | |
#!/usr/bin/env python
from __future__ import print_function
import argparse
import json
import re
import subprocess
import sys
from pycoin import encoding
from pycoin.ecdsa.secp256k1 import secp256k1_generator
from pycoin.serialize import b2h, h2b
from pycoin.key import Key
from pycoin.key.key_from_text import key_f... | |
#!/usr/bin/env python
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License
# Version 1.1 (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.mozil... | |
#!/usr/bin/env python3
# Copyright (c) 2015-2020 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Utilities for manipulating blocks and transactions."""
import struct
import time
import unittest
from... | |
# 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... | |
# 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... | |
#!/usr/bin/env python
"""Flows for handling the collection for artifacts."""
import re
import logging
from grr.lib import aff4
from grr.lib import artifact
from grr.lib import artifact_lib
from grr.lib import config_lib
from grr.lib import flow
from grr.lib import parsers
from grr.lib import rdfvalue
from grr.proto ... | |
from __future__ import unicode_literals
import time
import json
import uuid
import datetime
import boto3
from moto.core import BaseBackend, BaseModel
from .exceptions import (
ResourceNotFoundException,
InvalidParameterException,
ResourceExistsException,
InvalidRequestException,
ClientError
)
fro... | |
import os
import pickle
import unittest
import sys
from collections import defaultdict
import ray
from ray import tune, logger
from ray.tune import Trainable, run_experiments, register_trainable
from ray.tune.error import TuneError
from ray.tune.function_runner import wrap_function
from ray.tune.schedulers.trial_sched... | |
# -*- coding: utf-8 -*-
from __future__ import division
import copy
import functools
import logging
import math
import re
import unicodedata
from elasticsearch import (
ConnectionError,
Elasticsearch,
NotFoundError,
RequestError,
TransportError,
helpers,
)
from modularodm import Q
import six
... | |
# 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 ... | |
"""
Run hugs pipeline.
"""
from __future__ import division, print_function
import os
from time import time
import mpi4py.MPI as MPI
import schwimmbad
from hugs.pipeline import next_gen_search
from hugs.utils import PatchMeta, project_dir
from astropy.table import vstack
import hugs
def ingest_data(args):
"""
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.