code stringlengths 1 199k |
|---|
if not exists("FenepampEPF.png"):
exit(1)
click("FenepampEPF.png")
sleep(1)
exit(0) |
import os.path
import shutil
import tempfile
import unittest
from .hash_files import hash_files
class TestHashFiles(unittest.TestCase):
def setUp(self):
self.test_dir = tempfile.mkdtemp()
def tearDown(self):
# Remove the directory after the test
shutil.rmtree(self.test_dir)
def __wri... |
"""Test Python APIs for process IO."""
from __future__ import print_function
import os
import lldb
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
class ProcessIOTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
def setUp(self):
... |
import expect
from environment import Directory, File
from glslc_test_framework import inside_glslc_testsuite
@inside_glslc_testsuite('#line')
class TestPoundVersion310InIncludingFile(
expect.ReturnCodeIsZero, expect.StdoutMatch, expect.StderrMatch):
"""Tests that #line directives follows the behavior of versio... |
"""
Platform for the MAX! Cube LAN Gateway.
For more details about this component, please refer to the documentation
https://home-assistant.io/components/maxcube/
"""
from socket import timeout
import logging
import time
from threading import Lock
from homeassistant.helpers.discovery import load_platform
from homeassis... |
from pysb import *
Model()
Monomer('C8', ['b'])
Monomer('Bid', ['b', 'S'], {'S': ['u', 't']}) |
import os
from subprocess import Popen
def popen_bloom_script(cmd, **kwargs):
this_location = os.path.abspath(os.path.dirname(__file__))
bin_location = os.path.join(this_location, '..', 'bin')
cmd = "%s%s%s" % (bin_location, os.path.sep, cmd)
proc = Popen(cmd, **kwargs)
return proc |
import warnings
from tornado.web import url as urlspec
from tornado.util import import_object
from torngas.exception import UrlError
class Url(object):
overall_kw = None
prefix = None
def __init__(self, prefix=None, **kwargs):
self.prefix = prefix
if kwargs:
self.overall_kw = kwa... |
"""Takes a netlog for the WebViews in a given application.
Developer guide:
https://chromium.googlesource.com/chromium/src/+/HEAD/android_webview/docs/net-debugging.md
"""
from __future__ import print_function
import argparse
import logging
import os
import posixpath
import re
import sys
import time
sys.path.append(
... |
from django.utils.translation import gettext_lazy as _
CUSTOMS = 1
WAT = 2
YARA = 3
MAD = 4
SCANNERS = {CUSTOMS: 'customs', WAT: 'wat', YARA: 'yara', MAD: 'mad'}
NO_ACTION = 1
FLAG_FOR_HUMAN_REVIEW = 20
DELAY_AUTO_APPROVAL = 100
DELAY_AUTO_APPROVAL_INDEFINITELY = 200
DELAY_AUTO_APPROVAL_INDEFINITELY_AND_RESTRICT = 300
... |
from django.contrib.auth.models import User, Group
from django.http import HttpResponse
from django.views.generic.base import TemplateView
from django.views.decorators.csrf import csrf_exempt
from ws4redis.redis_store import RedisMessage
from ws4redis.publisher import RedisPublisher
class BroadcastChatView(TemplateView... |
from ctypes import *
from ctypes.util import find_library
import sys
import os
if find_library('svm'):
libsvm = CDLL(find_library('svm'))
elif find_library('libsvm'):
libsvm = CDLL(find_library('libsvm'))
else:
if sys.platform == 'win32':
libsvm = CDLL(os.path.join(os.path.dirname(__file__),"./libsvm.dll"))
else:... |
import re, sys
re_funcdef = re.compile(r"extern[^(]*\(\*i__(?P<cname>[^)]+)\)[^;]+;(\s*//\s*AS\s+(?P<dllfname>.*))")
if sys.platform == "win32":
slext = ".dll"
else:
slext = ".so"
dllname = hppname = None
for arg in sys.argv:
if arg[-len(slext):] == slext:
dllname = arg
elif arg[-4:] == ".hpp":
... |
from django import template
from core.models import Type
from core.nav_registry import registry as nav_registry
from core.admin_page_registry import registry as admin_registry
from account.profile_section_registry import registry as profile_registry
register = template.Library()
@register.simple_tag()
def typename(type... |
from OWWidget import *
import OWGUI, math, re
import random
import inspect
NAME = "Feature Constructor"
DESCRIPTION = "Constructs new features computed from existing ones."
ICON = "icons/FeatureConstructor.svg"
MAINTAINER = "Janez Demsar"
MAINTAINER_EMAIL = "janez.demsar(@at@)fri.uni-lj.si"
PRIORITY = 3100
CATEGORY = "... |
"""
This is the burnin class that tests the Snapshots functionality
"""
import stat
import base64
import random
from synnefo_tools.burnin.common import Proper, QPITHOS, QADD, QREMOVE, GB
from synnefo_tools.burnin.cyclades_common import CycladesTests
from kamaki.clients import ClientError
class SnapshotsTestSuite(Cyclad... |
"""Tests for basic CLI commands"""
from . import ContainerTests
import os
import pexpect
from ..large import test_android
from ..tools import get_data_dir, swap_file_and_restore, UMAKE
class AndroidStudioInContainer(ContainerTests, test_android.AndroidStudioTests):
"""This will install Android Studio inside a conta... |
"""Generate a sample project with triggers"""
from AndroidCodeGenerator.generator import Generator
from AndroidCodeGenerator.sql_validator import SQLTester
from AndroidCodeGenerator.db_table import (Table, Column, ForeignKey, Unique,
Trigger, Check)
from AndroidCodeGenerator.d... |
from os import getenv
bind = f'0.0.0.0:{getenv("PORT", "8000")}'
workers = getenv("WEB_CONCURRENCY", 2)
accesslog = "-"
errorlog = "-"
loglevel = getenv("LOGLEVEL", "info")
keepalive = getenv("WSGI_KEEP_ALIVE", 2)
worker_class = getenv("GUNICORN_WORKER_CLASS", "meinheld.gmeinheld.MeinheldWorker")
worker_connections = g... |
from spack import *
class Xf86dgaproto(AutotoolsPackage, XorgPackage):
"""X.org XF86DGAProto protocol headers."""
homepage = "https://cgit.freedesktop.org/xorg/proto/xf86dgaproto"
xorg_mirror_path = "proto/xf86dgaproto-2.1.tar.gz"
version('2.1', sha256='73bc6fc830cce5a0ec9c750d4702601fc0fca12d6353ede8b4... |
"""
Copyright 2016 SmartBear Software
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 w... |
import sqlite3
import re
import sys
reload(sys)
sys.setdefaultencoding('utf8')
ios = "/Applications/Xcode.app/Contents/Developer/Documentation/DocSets/com.apple.adc.documentation.iOS.docset/Contents/Resources/docSet.dsidx"
url = "https://developer.apple.com/library/ios/"
def generate_output(result):
abstract_format... |
from __future__ import absolute_import
from __future__ import unicode_literals
from ._commands import CommandParser
from ._html import Html, HtmlBuilder
from ._utils import *
from . import _chart
from . import _chart_data
from . import _csv
from . import _job |
from thrift.Thrift import *
from ttypes import *
VERSION = "19.10.0" |
"""Test data purging."""
from datetime import datetime, timedelta
import json
import sqlite3
from unittest.mock import MagicMock, patch
from sqlalchemy.exc import DatabaseError, OperationalError
from sqlalchemy.orm.session import Session
from homeassistant.components import recorder
from homeassistant.components.record... |
import pickle
import time
import os
from indra.sources.isi.api import process_preprocessed
from indra.sources.isi.preprocessor import IsiPreprocessor
def abstracts_runtime():
pfile = '/Users/daniel/Downloads/text_content_sample.pkl'
dump = pickle.load(open(pfile, 'rb'))
all_abstracts = dump['pubmed']
# ... |
"""Provides a variety of device interactions based on adb.
Eventually, this will be based on adb_wrapper.
"""
import sys
import time
import pylib.android_commands
from pylib.device import adb_wrapper
from pylib.device import decorators
from pylib.device import device_errors
from pylib.utils import apk_helper
from pylib... |
import json
import cgi
import csv
from wsgiref.util import setup_testing_defaults
from wsgiref.simple_server import make_server
def mock_ckan(environ, start_response):
status = '200 OK'
headers = [
('Content-type', 'application/json;charset=utf-8'),
]
if environ['PATH_INFO'] == '/api/action/... |
from msrest.pipeline import ClientRawResponse
from msrestazure.azure_exceptions import CloudError
import uuid
class HttpSuccessOperations(object):
"""HttpSuccessOperations operations.
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object... |
from .fs import FSDoc, document, push, pushdocs, pushapps, clone |
from __future__ import absolute_import
from nearpy.storage.storage import Storage
from nearpy.storage.storage_memory import MemoryStorage
from nearpy.storage.storage_redis import RedisStorage |
"""User input parameter validation.
This module handles user input parameter validation
against a provided input model.
Note that the objects in this module do *not* mutate any
arguments. No type version happens here. It is up to another
layer to properly convert arguments to any required types.
Validation Errors
---... |
'''
Layout
======
Layouts are used to calculate and assign widget positions.
The :class:`Layout` class itself cannot be used directly.
You should use one of the following layout classes:
- Anchor layout: :class:`kivy.uix.anchorlayout.AnchorLayout`
- Box layout: :class:`kivy.uix.boxlayout.BoxLayout`
- Float layout: :cla... |
"""
Copyright 2011 Mario Mulansky
Copyright 2012 Karsten Ahnert
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or
copy at http://www.boost.org/LICENSE_1_0.txt)
"""
from pylab import *
toolset = "intel-11.1"
bin_path = "bin/intel-linux-11.1/release/"
extension = ""... |
import urllib
from django.template import loader
import utils
class ExternalCitationLayer():
shorthand = 'external'
def __init__(self, layer):
self.layer = layer
@staticmethod
def generate_fdsys_href_tag(text, parameters):
""" Generate an href tag to FDSYS. """
parameters['year']... |
"""REST web form validation."""
__all__ = [
'PatchValidator',
'Validator',
'enum_validator',
'language_validator',
'list_of_strings_validator',
'subscriber_validator',
]
from mailman.core.errors import (
ReadOnlyPATCHRequestError, UnknownPATCHRequestError)
from mailman.interfaces.address... |
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
ANSIBLE_METADATA = {'status': ['preview'],
'supported_by': 'community',
'metadata_version': '1.1'}
DOCUMENTATION = '''
---
module: fortios_system_alarm
short_description: Configure alarm in Fo... |
import sigrokdecode as srd
class SamplerateError(Exception):
pass
class Decoder(srd.Decoder):
api_version = 3
id = 'em4100'
name = 'EM4100'
longname = 'RFID EM4100'
desc = 'EM4100 100-150kHz RFID protocol.'
license = 'gplv2+'
inputs = ['logic']
outputs = []
tags = ['IC', 'RFID']
... |
class FaxWizardDialogResources(object):
RID_FAXWIZARDDIALOG_START = 3200
RID_FAXWIZARDCOMMUNICATION_START = 3270
RID_FAXWIZARDGREETING_START = 3280
RID_FAXWIZARDSALUTATION_START = 3290
RID_FAXWIZARDROADMAP_START = 3300
RID_RID_COMMON_START = 500
def __init__(self, oWizardResource):
s... |
import uuid
import threading
from datetime import date, timedelta
from django.conf import settings
import factory
class Factory(factory.DjangoModelFactory):
class Meta:
strategy = factory.CREATE_STRATEGY
model = None
abstract = True
_SEQUENCE = 1
_SEQUENCE_LOCK = threading.Lock()
... |
"""
Copyright 2015 Telefonica Investigacion y Desarrollo, S.A.U
This file is part of Orion Context Broker.
Orion Context Broker is free software: you can redistribute it and/or
modify it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
... |
from django.conf.urls import patterns # noqa
from django.conf.urls import url # noqa
from openstack_dashboard.dashboards.project.containers import views
VIEW_MOD = 'openstack_dashboard.dashboards.project.containers.views'
urlpatterns = patterns(VIEW_MOD,
url(r'^((?P<container_name>.+?)/)?(?P<subfolder_path>(.+/)+... |
import pytest
import pytz
import dateutil
import numpy as np
from datetime import datetime
from dateutil.tz import tzlocal
import pandas as pd
import pandas.util.testing as tm
from pandas import (DatetimeIndex, date_range, Series, NaT, Index, Timestamp,
Int64Index, Period)
class TestDatetimeIndex(ob... |
import numpy as np
import pandas as pd
import pandas.util.testing as tm
class TestSparseArrayArithmetics(tm.TestCase):
_multiprocess_can_split_ = True
_base = np.array
_klass = pd.SparseArray
def _assert(self, a, b):
tm.assert_numpy_array_equal(a, b)
def _check_numeric_ops(self, a, b, a_dens... |
from fabric.context_managers import hide
import re
from calyptos.plugins.debugger.debuggerplugin import DebuggerPlugin
class DebugClusterController(DebuggerPlugin):
def debug(self):
ccs = self.component_deployer.roles['cluster-controller']
### Collect information
with hide('everything'):
... |
from __future__ import division, print_function
import numpy as np
from itertools import product
import warnings
from sklearn import datasets
from sklearn import svm
from sklearn import ensemble
from sklearn.datasets import make_multilabel_classification
from sklearn.random_projection import sparse_random_matrix
from s... |
from SimpleXMLRPCServer import SimpleXMLRPCServer
import logging
import os
logging.basicConfig(level=logging.DEBUG)
server = SimpleXMLRPCServer(('localhost',9000),logRequests=True,
allow_none=True)
def list_contents(dir_name):
logging.debug('list_contents(%s)', dir_name)
return os.listdir(dir_name)
serv... |
"""
These settings are used by the ``manage.py`` command.
With normal tests we want to use the fastest possible way which is an
in-memory sqlite database but if you want to create South migrations you
need a persistant database.
Unfortunately there seems to be an issue with either South or syncdb so that
defining two r... |
from TwitterSearch import *
try: from urllib.parse import parse_qs, quote_plus, unquote # python3
except ImportError: from urlparse import parse_qs; from urllib import quote_plus, unquote #python2
import unittest
import random
import copy
import string
from datetime import date, timedelta
class TwitterUserOrderTest(uni... |
from biffh import *
from timemachine import *
from struct import unpack, calcsize
from formula import dump_formula, decompile_formula, rangename2d, FMLA_TYPE_CELL, FMLA_TYPE_SHARED
from formatting import nearest_colour_index, Format
import time
DEBUG = 0
OBJ_MSO_DEBUG = 0
_WINDOW2_options = (
# Attribute names and ... |
"""
GoLismero 2.0 - The web knife - Copyright (C) 2011-2014
Golismero project site: https://github.com/golismero
Golismero project mail: contact@golismero-project.com
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 Softwa... |
"""
GoLismero 2.0 - The web knife - Copyright (C) 2011-2014
Golismero project site: https://github.com/golismero
Golismero project mail: contact@golismero-project.com
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 Softwa... |
import logging
logger = logging.getLogger(__name__)
class DxlErrorHandler(object):
""" This class is used to represent all the error that you can/should handle.
The errors can be of two types:
* communication error (timeout, communication)
* motor error (voltage, limit, overload...)
... |
from odoo import api, fields, models, _
from odoo.exceptions import UserError
class StockScrap(models.Model):
_name = 'stock.scrap'
_order = 'id desc'
def _get_default_scrap_location_id(self):
return self.env['stock.location'].search([('scrap_location', '=', True)], limit=1).id
def _get_default_... |
from gnuradio import gr
import sys, os
def graph (args):
print os.getpid()
nargs = len (args)
if nargs == 1:
infile = args[0]
else:
sys.stderr.write('usage: interp.py input_file\n')
sys.exit (1)
tb = gr.top_block ()
srcf = gr.file_source (gr.sizeof_short,infile)
s2ss = gr.stream_to_stream... |
"""DNS rdata.
@var _rdata_modules: A dictionary mapping a (rdclass, rdtype) tuple to
the module which implements that type.
@type _rdata_modules: dict
@var _module_prefix: The prefix to use when forming modules names. The
default is 'dns.rdtypes'. Changing this value will break the library.
@type _module_prefix: stri... |
from .exceptions import (ItemNotFoundError, NoPathToItem)
def path_to_location(modulestore, usage_key):
'''
Try to find a course_id/chapter/section[/position] path to location in
modulestore. The courseware insists that the first level in the course is
chapter, but any kind of module can be a "section"... |
"""Tests for the user API at the HTTP request level. """
import datetime
import base64
import json
import re
from unittest import skipUnless, SkipTest
import ddt
import httpretty
from pytz import UTC
import mock
from django.conf import settings
from django.core.urlresolvers import reverse
from django.core import mail
f... |
from urwid.util import decompose_tagmarkup, get_encoding_mode
from urwid.canvas import CompositeCanvas, CanvasJoin, TextCanvas, \
CanvasCombine, SolidCanvas
from urwid.widget import WidgetMeta, Widget, BOX, FIXED, FLOW, \
nocache_widget_render, nocache_widget_render_instance, fixed_size, \
WidgetWrap, Divid... |
from ajenti.api import *
from ajenti.utils import shell
class DiskUsageMeter(LinearMeter):
name = 'Disk usage'
category = 'System'
transform = 'percent'
def get_usage(self, dev):
u = shell('df --total | grep -w %s' % dev)
if dev == 'total':
u = int(u.split().pop().strip('%'))... |
from __future__ import absolute_import
from __future__ import print_function
from django.core.management.base import BaseCommand
from django.db.models import Count
from zerver.models import UserActivity, UserProfile, Realm, \
get_realm, get_user_profile_by_email
import datetime
class Command(BaseCommand):
help ... |
import numpy as np
from Orange.data import Table, StringVariable, Domain
from Orange.data.io import detect_encoding
from Orange.util import deprecated
class DistMatrix(np.ndarray):
"""
Distance matrix. Extends ``numpy.ndarray``.
.. attribute:: row_items
Items corresponding to matrix rows.
.. att... |
from __future__ import absolute_import
from __future__ import print_function
import json
import sqlalchemy as sa
from twisted.internet import defer
from twisted.internet import reactor
from buildbot.db import base
from buildbot.util import epoch2datetime
class StepsConnectorComponent(base.DBConnectorComponent):
# D... |
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'community'}
DOCUMENTATION = """
module: pamd
author:
- "Kenneth D. Evensen (@kevensen)"
short_descrip... |
import xmlrpclib
import time
sock = xmlrpclib.ServerProxy('http://localhost:8069/xmlrpc/object')
def get(object, level=3, ending=[], ending_excl=[], recur=[], root=''):
res = sock.execute('terp', 3, 'admin', 'account.invoice', 'fields_get')
key = res.keys()
key.sort()
for k in key:
if (not ending or res[k]['type'... |
"""The `interface.cluster_config` test checks that the special `rethinkdb.cluster_config` table behaves as expected."""
import os, sys, time
startTime = time.time()
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir, 'common')))
import driver, scenario_common, utils, vcoptparse
r = u... |
import logging
import os
from django.db import migrations
from lxml import etree
from website import settings
from future.moves.urllib.parse import urlparse
logger = logging.getLogger(__file__)
def get_style_files(path):
files = (os.path.join(path, x) for x in os.listdir(path))
return (f for f in files if os.pa... |
"""Test different accessory types: Thermostats."""
from collections import namedtuple
from unittest.mock import patch
import pytest
from homeassistant.components.climate.const import (
ATTR_CURRENT_TEMPERATURE, ATTR_MAX_TEMP, ATTR_MIN_TEMP,
ATTR_TARGET_TEMP_LOW, ATTR_TARGET_TEMP_HIGH, ATTR_OPERATION_MODE,
A... |
"""Algorithms for directed acyclic graphs (DAGs)."""
from fractions import gcd
import networkx as nx
from networkx.utils.decorators import *
from ..utils import arbitrary_element
__author__ = """\n""".join(['Aric Hagberg <aric.hagberg@gmail.com>',
'Dan Schult (dschult@colgate.edu)',
... |
DOCUMENTATION = '''
---
module: pip
short_description: Manages Python library dependencies.
description:
- "Manage Python library dependencies. To use this module, one of the following keys is required: C(name)
or C(requirements)."
version_added: "0.7"
options:
name:
description:
- The name of a... |
from django.core.urlresolvers import reverse
from django import http
from horizon.workflows import views
from mox import IsA # noqa
from openstack_dashboard import api
from openstack_dashboard.dashboards.project.networks import tests
from openstack_dashboard.test import helpers as test
INDEX_URL = reverse('horizon:adm... |
from django.conf.urls import patterns, url
from mkt.downloads.views import download_file
from mkt.langpacks.views import download as download_langpack
urlpatterns = patterns(
'',
# .* at the end to match filenames.
# /file/:id/type:attachment
url('^file/(?P<file_id>\d+)(?:/type:(?P<type>\w+))?(?:/.*)?',... |
from nose.tools import *
from nose import SkipTest
import networkx as nx
from networkx.algorithms import bipartite
from networkx.testing.utils import assert_edges_equal
class TestBiadjacencyMatrix:
@classmethod
def setupClass(cls):
global np, sp, sparse, np_assert_equal
try:
import n... |
"""
Django settings for ecommerce2 project.
Generated by 'django-admin startproject' using Django 1.8.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
from django.con... |
import copy
import logging
from collections import defaultdict, deque, namedtuple
from botocore.compat import accepts_kwargs, six
logger = logging.getLogger(__name__)
_NodeList = namedtuple('NodeList', ['first', 'middle', 'last'])
_FIRST = 0
_MIDDLE = 1
_LAST = 2
class NodeList(_NodeList):
def __copy__(self):
... |
"""
Copyright (c) 2004-Present Pivotal Software, Inc.
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
http://www.apache.or... |
from cloudferrylib.scheduler import task
class Action(task.Task):
def __init__(self, init, cloud=None):
self.cloud = None
self.src_cloud = None
self.dst_cloud = None
self.cfg = None
self.__dict__.update(init)
self.init = init
if cloud:
self.cloud =... |
import errno
import functools
import os
import shutil
import tempfile
import time
import weakref
from eventlet import semaphore
from oslo.config import cfg
from neutron.openstack.common import fileutils
from neutron.openstack.common.gettextutils import _
from neutron.openstack.common import local
from neutron.openstack... |
from __future__ import unicode_literals
from django.db.models.fields import NOT_PROVIDED
from django.utils import six
from django.utils.functional import cached_property
from .base import Operation
class FieldOperation(Operation):
def __init__(self, model_name, name):
self.model_name = model_name
se... |
"""program/module to trace Python program or function execution
Sample use, command line:
trace.py -c -f counts --ignore-dir '$prefix' spam.py eggs
trace.py -t --ignore-dir '$prefix' spam.py eggs
trace.py --trackcalls spam.py eggs
Sample use, programmatically
import sys
# create a Trace object, telling it wha... |
import sys
import subprocess
def __optim_args_from_interpreter_flags():
"""Return a list of command-line arguments reproducing the current
optimization settings in sys.flags."""
args = []
value = sys.flags.optimize
if value > 0:
args.append("-" + "O" * value)
return args
_optim_args_from... |
{
'name': 'Filter products in stock',
'description': '''
·Adds a "Stock" button to product's search view to show
stockable products with and without stock availability
·By default, only products with stock are shown (i.e.
button is enabled)
.This filter is applied on product... |
{
"name": "Mexico - Accounting",
"version": "2.0",
"author": "Vauxoo",
'category': 'Localization',
"description": """
Minimal accounting configuration for Mexico.
============================================
This Chart of account is a minimal proposal to be able to use OoB the
accounting feature of ... |
"""Tests for Adam."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import numpy as np
from tensorflow.python.client import session
from tensorflow.python.eager import context
from tensorflow.python.framework import constant_op
from tensorflow.python.framew... |
from __future__ import unicode_literals
class Error(object):
def __init__(self, error, traceback=None, row=None):
self.error = error
self.traceback = traceback
self.row = row
class RowResult(object):
IMPORT_TYPE_UPDATE = 'update'
IMPORT_TYPE_NEW = 'new'
IMPORT_TYPE_DELETE = 'dele... |
import os, sys, parser, symbol, token, types, re
SECHEADER = re.compile("^[A-Z][a-z]+\s*:")
JUNKHEADER = re.compile("^((Function)|(Access))\s*:")
IMPORTSTAR = re.compile("^from\s+([a-zA-Z0-9_.]+)\s+import\s+[*]\s*$")
IDENTIFIER = re.compile("[a-zA-Z0-9_]+")
FILEHEADER = re.compile(
r"""^// Filename: [a-zA-Z.]+
// Creat... |
from .....testing import assert_equal
from ..gtract import gtractResampleCodeImage
def test_gtractResampleCodeImage_inputs():
input_map = dict(args=dict(argstr='%s',
),
environ=dict(nohash=True,
usedefault=True,
),
ignore_exception=dict(nohash=True,
usedefault=True,
),
inputCodeVolum... |
from __future__ import print_function
from sympy.abc import x, y, z
from sympy.utilities.pytest import skip
from sympy.utilities.codegen import (codegen, make_routine, InputArgument,
Result, get_code_generator)
import sys
import os
import tempfile
import subprocess
main_template = {... |
from django.apps import AppConfig
class IndexConfig(AppConfig):
name = 'index' |
"""numerictypes: Define the numeric type objects
This module is designed so 'from numerictypes import *' is safe.
Exported symbols include:
Dictionary with all registered number types (including aliases):
typeDict
Numeric type objects:
Bool
Int8 Int16 Int32 Int64
UInt8 UInt16 UInt32 UInt64
Float... |
from provider.server.server import main
if __name__ == "__main__":
main() |
__author__ = 'ktisha'
try:
from pkg_resources import EntryPoint
from setuptools.command import test
from tcunittest import TeamcityTestRunner
except ImportError:
raise NameError("Something went wrong, do you have setuptools installed?")
class pycharm_test(test.test):
def run_tests(self):
import unit... |
import os
import sys
import shutil
import subprocess
import conf
import options
from build_paper import build_paper
output_dir = conf.output_dir
build_dir = conf.build_dir
bib_dir = conf.bib_dir
pdf_dir = conf.pdf_dir
toc_conf = conf.toc_conf
proc_conf = conf.proc_conf
dirs = conf.dirs
def paper_stats(p... |
"""
A collection of utility methods used by Figure scripts for producing
publication type of figures.
@author William Moore
<a href="mailto:will@lifesci.dundee.ac.uk">will@lifesci.dundee.ac.uk</a>
@author Jean-Marie Burel
<a href="mailto:j.burel@dundee.ac.uk">j.burel@... |
from openerp.report.interface import report_int
import openerp.pooler as pooler
import openerp.tools as tools
from openerp.tools.safe_eval import safe_eval as eval
from lxml import etree
from openerp.report import render, report_sxw
import locale
import time, os
from operator import itemgetter
from datetime import dat... |
"""Utilities for handling side inputs."""
import collections
import logging
import Queue
import threading
import traceback
from apache_beam.io import iobase
from apache_beam.transforms import window
MAX_SOURCE_READER_THREADS = 15
ELEMENT_QUEUE_SIZE = 10
READER_THREAD_IS_DONE_SENTINEL = object()
_globally_windowed = win... |
from theano import tensor as T
from theano import function
def evaluate(x, y, expr, x_value, y_value):
"""
x: A theano variable
y: A theano variable
expr: A theano expression involving x and y
x_value: A numpy value
y_value: A numpy value
Returns the value of expr when x_value is substituted... |
""" Helpers for randomized testing """
from __future__ import print_function, division
from random import uniform
import random
from sympy import I, nsimplify, Tuple, Symbol
from sympy.core.compatibility import is_sequence, as_int
def random_complex_number(a=2, b=-1, c=3, d=1, rational=False):
"""
Return a rand... |
import termios
class TermState:
def __init__(self, tuples):
self.iflag, self.oflag, self.cflag, self.lflag, \
self.ispeed, self.ospeed, self.cc = tuples
def as_list(self):
return [self.iflag, self.oflag, self.cflag, self.lflag,
self.ispeed, self.ospeed, self.c... |
import sys, re;
from structs import unions, structs, defines;
arch = sys.argv[1];
outfile = sys.argv[2];
infiles = sys.argv[3:];
inttypes = {};
header = {};
footer = {};
inttypes["arm32"] = {
"unsigned long" : "uint32_t",
"long" : "uint32_t",
"xen_pfn_t" : "__align8__ uint64_t",
"xen_ulo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.