gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
# Copyright 2013 Josh Durgin
# Copyright 2013 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-... | |
import os
import sys
import time
import crocodoc
from crocodoc import CrocodocError
crocodoc.api_token = 'YOUR_API_TOKEN'
"""
Example #1
Upload a file to Crocodoc. We're uploading Form W4 from the IRS by URL.
"""
print 'Example #1 - Upload Form W4 from the IRS by URL.'
form_w4_url = 'http://www.irs.gov/pub/irs-pdf/... | |
# coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import absolute_import, division, print_function, unicode_literals
import os
import shutil
from builtins import open
from collections import defaultdict
fr... | |
# Copyright (c) 2012 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/python2
# Written by Reehan Shaikh
# Last update: April 11, 2006
# Adapted from gloader.py
# Revised by Daniel Ng
import sys, os, signal, time
from starter import Start
#import batch_ipcrm
import Pyro.core
debug_mode = 0
debug_uswitch = 0
# set the program names
VS_PROG = "uswitch"
VM_PROG = "glinux"
G... | |
# -*- coding: utf-8 -*-
'''
Module for interfacing with SysFS
.. seealso:: https://www.kernel.org/doc/Documentation/filesystems/sysfs.txt
.. versionadded:: 2016.3.0
'''
# Import python libs
from __future__ import absolute_import
import logging
import os
import stat
# Import external libs
import salt.ext.six as six
#... | |
#
# Copyright (c) 2014, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
#
#
from atc_api.atcd_clie... | |
# -*- coding: utf-8 -*-
import sys
import argparse
import re
import datetime
from string import maketrans
from fatool import *
from decimal import *
import logging
def main():
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)
#logger.setLevel(... | |
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
# Copyright 2011 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the ... | |
import datetime
from unittest import mock
from django.contrib.postgres.indexes import OpClass
from django.db import (
IntegrityError, NotSupportedError, connection, transaction,
)
from django.db.models import (
CheckConstraint, Deferrable, F, Func, IntegerField, Q, UniqueConstraint,
)
from django.db.models.fie... | |
# -*- coding: utf-8 -*-
import mock
import pytest
import unittest
from json import dumps
from addons.base.tests.models import (OAuthAddonNodeSettingsTestSuiteMixin,
OAuthAddonUserSettingTestSuiteMixin)
from addons.github.models import NodeSettings
from addons.github.tests import ... | |
"""
Mixin for cache with joblib
"""
# Author: Gael Varoquaux, Alexandre Abraham, Philippe Gervais
# License: simplified BSD
import warnings
import os
import shutil
from distutils.version import LooseVersion
import json
import nibabel
from sklearn.externals.joblib import Memory
memory_classes = (Memory, )
try:
f... | |
# 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 ... | |
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | |
# Copyright 2009 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 ... | |
import commands
import datetime
import os
import platform
import shlex
import sys
import time
if sys.version_info >= (2, 7):
import unittest
else:
import unittest2 as unittest
from resource_suite import ResourceBase
import lib
class Test_Catalog(ResourceBase, unittest.TestCase):
def setUp(self):
... | |
# -*- coding: utf-8 -*-
# Copyright (c) Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
"""
vispy backend for glfw.
"""
# To install GLFW on Ubuntu, use sudo apt-get install libglfw3.
# On OSX, consider using brew.
from __future__ import division
... | |
import argparse
from time import sleep
from datetime import datetime
from velox_common import *
# args is argparse.Namespace. returns a Cluster().
def get_cluster(args):
return Cluster(args.region, args.cluster_id, args.num_servers, args.num_clients)
# sub-commands. args is argparse.Namespace.
def command_launch(... | |
"""Requirements specific to SQLAlchemy's own unit tests.
"""
import sys
from sqlalchemy import exc
from sqlalchemy import util
from sqlalchemy.sql import text
from sqlalchemy.testing import exclusions
from sqlalchemy.testing.exclusions import against
from sqlalchemy.testing.exclusions import fails_if
from sqlalchem... | |
"""
An full-blown application demoing a domain-specific usecase with Mayavi:
interactive design of coils.
This is example of electromagnetic coils design, an application is built to
enable a user to interactively position current loops while visualizing the
resulting magnetic field. For this purpose, it is best to use... | |
#!/usr/bin/env python
from pyomxplayer import OMXPlayer
import RPi.GPIO as GPIO
import pprint
import random
import socket
import struct
import sys
import time
import traceback
DRAWERS = 9
MCAST_GRP = '224.19.79.1'
MCAST_PORT = 9999
MOVIE_PATH = '/usr/share/lumiere/media'
MOVIE_SUFFIX = 'mp4'
MOVIE_LIST = [ '%s/%d.%s... | |
"""Unit tests for the subject routes."""
import unittest
from unittest.mock import Mock, patch
from shared.model.report import Report
from shared.utils.type import SubjectId
from external.routes import (
delete_subject,
get_subject_measurements,
post_move_subject,
post_new_subject,
post_subject_a... | |
# -*- coding: utf-8 -*-
"""
Sample controller with all its actions protected.
"""
import tg
from tg import expose, flash, redirect, url, lurl, request
from tg.i18n import lazy_ugettext as l_
from molgears import model
from molgears.model import DBSession, PCompound, PHistory, PStatus, Tags, SCompound, SStatus, SFiles, ... | |
#!/usr/bin/env python
#
# Copyright (c) Greenplum Inc 2008. All Rights Reserved.
#
'''
base.py
common base for the commands execution framework. Units of work are defined as Operations
as found in other modules like unix.py. These units of work are then packaged up and executed
within a GpCommand. A GpCommand is ... | |
#!/usr/bin/env python
#-------------------------------------------------------------------------------
# Name: Spondulas
# Purpose: This tool is used to retrieve malicious web pages for analysis
#
# Author: Bart Hopper
#
# Created: 03/02/2012
# Licence: FreeBSD
# Copyright (c) 2012, Bart Hoppe... | |
# 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... | |
"""Async gunicorn worker for aiohttp.web"""
import asyncio
import os
import re
import signal
import socket
import ssl
import sys
from gunicorn.config import AccessLogFormat as GunicornAccessLogFormat
from gunicorn.workers import base
from .helpers import AccessLogger, create_future, ensure_future
__all__ = ('Gunic... | |
r"""
Util functions (:mod: `qiita_pet.util`)
======================================
..currentmodule:: qiita_pet.util
This module provides different util functions for qiita_pet.
Methods
-------
..autosummary::
:toctree: generated/
clean_str
"""
# ------------------------------------------------------------... | |
# Copyright 2013 NetApp
# 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 applic... | |
# 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... | |
###################################################################
# Copyright 2013-2014 All Rights Reserved
# Authors: The Paradrop Team
###################################################################
import errno
import os
import subprocess
import shutil
import six
from distutils import dir_util
# We have to... | |
#!/usr/bin/env python
#
# Generated Mon May 2 14:23:33 2011 by parse_xsd.py version 0.4.
#
import saml2
from saml2 import SamlBase
NAMESPACE = 'http://www.w3.org/2000/09/xmldsig#'
ENCODING_BASE64 = 'http://www.w3.org/2000/09/xmldsig#base64'
DIGEST_SHA1 = 'http://www.w3.org/2000/09/xmldsig#sha1'
ALG_EXC_C14N = 'htt... | |
import django
from django.db import models
from django.db.models import Manager
from django.db.models.query_utils import DeferredAttribute
from django.utils.translation import gettext_lazy as _
from model_utils import Choices
from model_utils.fields import MonitorField, SplitField, StatusField, UUIDField
from model_ut... | |
from textwrap import dedent
from typing import Optional
import pytest
from pip._internal.build_env import BuildEnvironment
from tests.lib import (
PipTestEnvironment,
TestPipResult,
create_basic_wheel_for_package,
make_test_finder,
)
def indent(text: str, prefix: str) -> str:
return "\n".join((p... | |
"""
Copyright (C) 2004-2015 Pivotal Software, Inc. All rights reserved.
This program and the accompanying materials are made available under
the terms of the 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
... | |
# (C) Datadog, Inc. 2010-2016
# All rights reserved
# Licensed under Simplified BSD License (see LICENSE)
'''
Redis checks
'''
# stdlib
from collections import defaultdict
import re
import time
# 3rd party
import redis
# project
from checks import AgentCheck
DEFAULT_MAX_SLOW_ENTRIES = 128
MAX_SLOW_ENTRIES_KEY = "sl... | |
# Copyright (c) 2010-2015 Bo Lin
# Copyright (c) 2010-2015 Yanhong Annie Liu
# Copyright (c) 2010-2015 Stony Brook University
# Copyright (c) 2010-2015 The Research Foundation of SUNY
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
#... | |
# 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... | |
"""Mail.ru Authentication Views
You may see developer docs on http://api.mail.ru/docs/guides/oauth/
"""
import hashlib
import re
import uuid
from pyramid.httpexceptions import HTTPFound
from pyramid.security import NO_PERMISSION_REQUIRED
import requests
from ..api import (
AuthenticationComplete,
Authentica... | |
from .matrixtools import blank_matrix, \
identity_matrix, \
short_to_long, \
long_to_short, \
short_matrices_compatible, \
list_to_sublists, \
list_of_sublists_to_list_of_sums, \
add_short, \
subtract_short, \
multiply_short, \
divide_short,\
transpose
from numpy.linalg impo... | |
"""distutils.dist
Provides the Distribution class, which represents the module distribution
being built/installed/distributed.
"""
__revision__ = "$Id: dist.py 65250 2008-07-26 20:09:45Z amaury.forgeotdarc $"
import sys, os, re
from copy import copy
try:
import warnings
except ImportError:
warnings = None
... | |
''' Some tests for filters '''
from __future__ import division, print_function, absolute_import
import numpy as np
from numpy.testing import (assert_equal, assert_allclose,
assert_array_equal, assert_almost_equal,
suppress_warnings)
from pytest import raises as as... | |
from flask import jsonify, request
from sqlalchemy.exc import IntegrityError
from server import app, sqldb
# from server.account.courses import add_courses
from server.account.degrees import add_schools_and_majors
from server.models import Account
"""
Example: JSON Encoding
{
'first': 'Josh',
'last': 'Doman'... | |
# encoding: 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 field 'OrganizationMember.invitor'
db.add_column('website_organizationmember', 'invitor', self.gf... | |
# -*- coding: utf-8 -*-
"""
IAMService
"""
import time
import xml.sax.saxutils as saxutils
# post xml soap message
import sys, httplib
from lxml import etree
from cStringIO import StringIO
#import static
import toml
class IAMClient(object):
def __init__(self):
conf_fn = "config.toml"
... | |
import collections
import os
import yaml
import re
import shlex
from .constants import *
from .utils import *
from .dockerutil import make_vol_opt
class ConfigError(Exception):
pass
class ConfigNotFoundError(ConfigError):
pass
class OverrideMixin:
'''
A mixin class that indicates an instance's value... | |
#!/usr/bin/env python
import unittest
import icetotgd
import datetime
class T(unittest.TestCase):
fake_files = {
'trivial.xml': '''<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE tv SYSTEM "http://iceguide.icetv.com.au/iceguide/iceguide.dtd">
<tv>
<channel id="2300">
<dis... | |
'''
Created on 28 Mar 2013
@author: Jonathan Custance
'''
import sys
import xml.etree.ElementTree as ET
import Category
import Attribute
import Action
import Link
import Mixin
import Collection
import Model
import logging
class Parser(object):
'''
Parse a set of XML model files and return a Models object con... | |
# Copyright 2009-2014 MongoDB, 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 writin... | |
# 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | |
import sys
import threading
import cmd
import chess
from chess import polyglot
import tables
import os
__location__ = os.path.realpath(
os.path.join(os.getcwd(), os.path.dirname(__file__)))
logfile = open(os.path.join(__location__, 'input.log'), 'w')
ENGINE_NAME = 'simple UCI chess engine'
AUTHOR_NAME = 'Alexey ... | |
# -*- coding: utf-8 -*-
# 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 Apach... | |
import datetime
import os.path
import zipfile
from django.core import mail
from django.core.files import temp
from django.core.files.base import File as DjangoFile
from django.urls import reverse
from unittest import mock
from pyquery import PyQuery as pq
from waffle.testutils import override_switch
from olympia im... | |
from __future__ import print_function
import socket
from threading import Thread, Lock
from multiprocessing.pool import ThreadPool
from contextlib import contextmanager
import traceback
from datetime import datetime
import uuid
import random
import multiprocessing
import zmq
from time import time
import sys
from ..com... | |
from __future__ import absolute_import
from __future__ import print_function
from django.conf import settings
settings.RUNNING_INSIDE_TORNADO = True
# We must call zerver.lib.tornado_ioloop_logging.instrument_tornado_ioloop
# before we import anything else from our project in order for our
# Tornado load logging to wo... | |
"""This component provides HA sensor support for Ring Door Bell/Chimes."""
import logging
import voluptuous as vol
from homeassistant.components.sensor import PLATFORM_SCHEMA
from homeassistant.const import (
ATTR_ATTRIBUTION,
CONF_ENTITY_NAMESPACE,
CONF_MONITORED_CONDITIONS,
)
from homeassistant.core imp... | |
#!/usr/bin/env python3
#
# Copyright (c) 2016, The OpenThread Authors.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright
# ... | |
# 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... | |
from formencode.validators import Int
import unittest
from webhelpers2.html.builder import literal
from blazeform.form import Form
from blazeform.element import TextElement
from blazeform.exceptions import ValueInvalid, ElementInvalid, ProgrammingError
from blazeform.util import NotGiven
from blazeutils import DumbOb... | |
import os
import hashlib
import inspect
from lib import BaseTest
def strip_processor(output):
return "\n".join([l for l in output.split("\n") if not l.startswith(' ') and not l.startswith('Date:')])
class PublishSwitch1Test(BaseTest):
"""
publish switch: removed some packages
"""
fixtureDB = Tru... | |
"""Template helper methods for rendering strings with HA data."""
from datetime import datetime
import json
import logging
import re
import jinja2
from jinja2.sandbox import ImmutableSandboxedEnvironment
from homeassistant.const import (
STATE_UNKNOWN, ATTR_LATITUDE, ATTR_LONGITUDE, MATCH_ALL)
from homeassistant.... | |
"""Test Axis device."""
from copy import deepcopy
import json
from unittest import mock
import axis as axislib
from axis.api_discovery import URL as API_DISCOVERY_URL
from axis.basic_device_info import URL as BASIC_DEVICE_INFO_URL
from axis.event_stream import OPERATION_INITIALIZED
from axis.light_control import URL a... | |
# Copyright (c) 2014-2016, NVIDIA CORPORATION. All rights reserved.
from __future__ import absolute_import
import operator
import os
import re
import shutil
import subprocess
import tempfile
import time
import h5py
import numpy as np
import PIL.Image
from .train import TrainTask
import digits
from digits import uti... | |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2005-2009 Edgewall Software
# Copyright (C) 2005-2007 Christopher Lenz <cmlenz@gmx.de>
# Copyright (C) 2005 Matthew Good <trac@matt-good.net>
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this ... | |
# -*- coding: utf-8 -*-
################################################################################
## Form generated from reading UI file 'hearttransformwidget.ui'
##
## Created by: Qt User Interface Compiler version 5.15.2
##
## WARNING! All changes made in this file will be lost when recompiling UI file!
#####... | |
#!/usr/bin/python
#
# Copyright (c) 2015, Arista Networks, 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,
# t... | |
#!/usr/bin/env python
#
# Manage bundled python module files for use in PyPy.js.
#
# This script is used to manage an indexed bundle of python module files in
# a format that makes them easy to use for PyPy.js. In particular it lets
# us hack around the fact that we can't use an async XMLHttpRequest from
# inside... | |
# -----------------------------------------------------------------------------
# cparse.py
#
# Simple parser for ANSI C. Based on the grammar in K&R, 2nd Ed.
# -----------------------------------------------------------------------------
import sys
import clex
import ply.yacc as yacc
# Get the token map
tokens = cl... | |
"""
Martin O'Hanlon
www.stuffaboutcode.com
PiAware Radar
"""
from argparse import ArgumentParser
import pygame
from radar import Radar
from gpsutils import GPSUtils
from flightdata import FlightData
from copy import deepcopy
from threading import Timer
def lat_lon_to_x_y(lat, lon):
x, y = GPSUtils.lat_lon_to_x_... | |
# -*- coding: utf-8 -*-
#
# Copyright 2012-2015 Spotify AB
#
# 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... | |
# eva_vid
import tensorflow as tf
import cv2
import numpy as np
from keras.backend import set_image_dim_ordering
from keras.models import load_model
import keras
from PIL import ImageDraw
from PIL import ImageFilter
from PIL import ImageOps
import time
from functools import wraps
from random import randint
import os
im... | |
#!/usr/bin/env python
""" grin searches text files.
"""
from __future__ import print_function
import argparse
import bisect
import fnmatch
import gzip
import io
import itertools
import os
import re
import shlex
import stat
import sys
import colorama
from six import b, int2byte, reraise
from six.moves import map, fil... | |
# 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 itertools
imp... | |
from __future__ import absolute_import
#
# 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, Ver... | |
#!/usr/bin/env python
#
## Licensed to the .NET Foundation under one or more agreements.
## The .NET Foundation licenses this file to you under the MIT license.
## See the LICENSE file in the project root for more information.
#
##
# Title : coreclr_arguments.py
#
# Notes:
#
# Setup script, to avoid re-... | |
import datetime
import logging
import os
from itertools import groupby
from math import ceil
from django.db.models import Sum
from le_utils.constants import content_kinds
from sqlalchemy import and_
from sqlalchemy import cast
from sqlalchemy import exists
from sqlalchemy import false
from sqlalchemy import func
from ... | |
# coding=utf-8
# Copyright 2021 The HuggingFace Inc. team. 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... | |
import operator
from typing import Callable, Iterable, Tuple
from pypcode import OpCode
import claripy
from claripy.ast.bv import BV
# pylint:disable=abstract-method
def make_bv_sizes_equal(bv1: BV, bv2: BV) -> Tuple[BV, BV]:
"""
Makes two BVs equal in length through sign extension.
"""
if bv1.size()... | |
from unittest.mock import patch
import graphene
from saleor.core.utils import get_country_name_by_code
from saleor.graphql.payment.enums import (
OrderAction, PaymentChargeStatusEnum, PaymentGatewayEnum)
from saleor.payment.models import ChargeStatus, Payment, TransactionKind
from tests.api.utils import get_graph... | |
import re
from django import forms
from django.forms.util import ErrorList
from django.forms.widgets import HiddenInput, SelectMultiple
from crits.core import form_consts
from crits.core.handlers import get_source_names, get_item_names, ui_themes
from crits.core.user_role import UserRole
from crits.core.user_tools im... | |
class index_h(object):
kinds = dict({
# Declarations
1: 't', # CXCursor_UnexposedDecl # A declaration whose specific kind
# is not exposed via this interface
2: 't', # CXCursor_StructDecl (A C or C++ struct)
3: 't', # CXCursor_UnionDecl (A C or... | |
#
# Copyright (c) 2008-2015 Citrix 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 by applicable l... | |
#!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its 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 require... | |
#!/usr/bin/env python
import json
import bson
import sys
import inspect
from datetime import datetime
from multiprocessing import Process, cpu_count
try:
try:
from pymongo import MongoClient as Connection
except ImportError:
from pymongo import Connection
from pymongo.errors import Connec... | |
"""Routines related to PyPI, indexes"""
from __future__ import absolute_import
import logging
import cgi
from collections import namedtuple
import itertools
import sys
import os
import re
import mimetypes
import posixpath
import warnings
from pip._vendor.six.moves.urllib import parse as urllib_parse
from pip._vendor.... | |
#!/usr/bin/env python
# -- Content-Encoding: UTF-8 --
"""
iPOPO shell commands
Provides commands to the Pelix shell to get the state of iPOPO instances.
:author: Thomas Calmant
:copyright: Copyright 2014, isandlaTech
:license: Apache License 2.0
:version: 0.5.7
:status: Beta
..
Copyright 2014 isandlaTech
L... | |
#!/usr/local/bin/python
# -*- coding: utf-8 -*-
#TODO: Better documentation
"""
SciTran NIMS and SDM archive to folder Reaper conversion utility.
This code will convert a NIMS v1.0 or an SDM tar file (including the DICOMS) to a folder
tree that the SciTran folder_reaper can ingest.
Users can optionally pass in grou... | |
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import frappe, sys
from frappe import _
from frappe.utils import cint, flt, now, cstr, strip_html, getdate, get_datetime, to_timedelta
from frappe.model import default_fields
from... | |
# Copyright (c) 2012 The Regents of The University of Michigan
# 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 ... | |
# 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 ... | |
##########################################################################
#
# Copyright 2010 Dr D Studios Pty Limited (ACN 127 184 954) (Dr. D Studios),
# its affiliates and/or its licensors.
#
# Copyright (c) 2010-2013, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary ... | |
import collections
from django import http
from django.shortcuts import render, redirect, get_object_or_404
from django.views.decorators.http import require_POST
from django.db import transaction
from django.views.decorators.cache import cache_page
from django.db.models import Q
from funfactory.urlresolvers import re... | |
# 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... | |
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | |
# -*- 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 field 'MuseumObject.three_d_link'
db.add_column('cat_museumobject', 'three_d_link',
... | |
"""Test the init file for the Insteon component."""
import asyncio
from unittest.mock import patch
from pyinsteon.address import Address
from homeassistant.components import insteon
from homeassistant.components.insteon.const import (
CONF_CAT,
CONF_OVERRIDE,
CONF_SUBCAT,
CONF_X10,
DOMAIN,
POR... | |
#!/usr/bin/python
# -- Content-Encoding: UTF-8 --
"""
Provides functions for reading and writing (writing is WIP currently) Java
objects serialized or will be deserialized by ObjectOutputStream. This form of
object representation is a standard data interchange format in Java world.
javaobj module exposes an API famili... | |
"""Copyright (c) 2015 Francesco Mastellone
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, publish, distri... | |
#!/usr/bin/env python
# -*- encoding:utf-8 -*-
"""
git-authors [OPTIONS] REV1..REV2
List the authors who contributed within a given revision interval.
To change the name mapping, edit .mailmap on the top-level of the
repository.
"""
# Author: Pauli Virtanen <pav@iki.fi>. This script is in the public domain.
import ... | |
# Copyright 2015 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, s... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.