code stringlengths 1 199k |
|---|
import os
import sys
import unittest
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
import pfp
import pfp.fields
from pfp.fields import PYVAL,PYSTR
import pfp.interp
import pfp.utils
import utils
class TestTypeCreation(unittest.TestCase, utils.UtilsMixin):
def setUp(self):
pfp.fields.NumberBase.en... |
from django import forms
from django_countries.tests import models
class PersonForm(forms.ModelForm):
class Meta:
model = models.Person
fields = ['country', 'favourite_country']
class AllowNullForm(forms.ModelForm):
class Meta:
model = models.AllowNull
fields = ['country'] |
from okcupyd import magicnumbers
def test_yield_exponents_of_two():
assert list(magicnumbers.yield_exponents_of_two(32 + 16)) == [4, 5]
assert list(magicnumbers.yield_exponents_of_two(1)) == [0]
assert list(magicnumbers.yield_exponents_of_two(2)) == [1]
assert list(magicnumbers.yield_exponents_of_two(2+... |
"""
MoinMoin - OpenOffice.org 2.x Writer Filter (OpenDocument Text)
Depends on: nothing (only python with zlib)
@copyright: 2006 MoinMoin:ThomasWaldmann
@license: GNU GPL, see COPYING for details.
"""
from MoinMoin.filter.application_vnd_oasis_opendocument import execute as odfilter
def execute(indexobj... |
from __future__ import absolute_import
import scipy.special
import autograd.numpy as np
from autograd.extend import primitive, defvjp, defjvp
from autograd.numpy.numpy_vjps import unbroadcast_f, repeat_to_match_shape
beta = primitive(scipy.special.beta)
betainc = primitive(scipy.special.betainc)
betaln = primitive(... |
from flask import render_template, redirect, url_for, abort, flash, request,\
current_app, make_response
from flask_login import login_required, current_user
from . import main
from .forms import EditProfileForm, EditProfileAdminForm, PostForm,\
CommentForm
from .. import db
from ..models import Permission, Rol... |
from django.contrib.sites.models import Site
mysite = Site.objects.get_current()
mysite.domain = 'expfactory.org'
mysite.name = 'The Experiment Factory'
mysite.save() |
"""Check that we do not crash with a recursion error
https://github.com/PyCQA/pylint/issues/3159
"""
from setuptools import Command, find_packages, setup
class AnyCommand(Command):
def initialize_options(self):
pass
def finalize_options(self):
pass
@staticmethod
def run():
print(... |
from django.shortcuts import render
from rest_framework.response import Response
from rest_framework.views import APIView
from rest_framework import status
class Stats(APIView):
def retrieve_player_hitting_stats(self):
pass
def retrieve_player_fielding_stats(self):
pass
def retrieve_player_p... |
import time
import logging
from redis import BusyLoadingError
log = logging.getLogger(__name__)
def wait_for_redis_data_loaded(redis):
while True:
try:
redis.ping()
except BusyLoadingError:
log.warning("Redis not done loading, will retry in 2 seconds...")
time.sle... |
class Solution(object):
def searchInsert(self, nums, target):
"""
:type nums: List[int]
:type target: int
:rtype: int
"""
low, high = 0, len(nums) - 1
while low <= high:
mid = (low + high) / 2
if target == nums[mid]:
ret... |
import math
import warnings
import numpy
import chainer
from chainer.backends import cuda
from chainer import function_node
from chainer import utils
from chainer.utils import type_check
_erf_cpu = None
class Erf(function_node.FunctionNode):
@property
def label(self):
return 'erf'
def check_type_for... |
from fabric.api import *
from fabric.contrib.files import *
from fabric.contrib.project import rsync_project
from subprocess import check_output
env.use_ssh_config = True
env.user = 'ubuntu'
ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
HOME_DIR = '/home/ubuntu'
DEPLOY_PATH = '%s/cabot' % HOME_DIR
LOG_DIR = '/v... |
""" S3 RESTful API
@copyright: 2009-2015 (c) Sahana Software Foundation
@license: MIT
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 ... |
from typing import Optional
from pathlib import Path
from wasabi import msg
import subprocess
import re
from ... import about
from ...util import ensure_path
from .._util import project_cli, Arg, Opt, COMMAND, PROJECT_FILE
from .._util import git_checkout, get_git_version
DEFAULT_REPO = about.__projects__
DEFAULT_PROJE... |
import ShareYourSystem as SYS
MyCommander=SYS.CommanderClass(
).get(
'/ChildCommander/ChildCommander'
)
MyCommander['--ChildCommander']={
'MyInt':0
}
MyCommander['--...ChildCommander']={
'MyStr':"hello"
}
MyCommander['...--ChildCommander']={
'MyFloat':0.1
}
MyCommander['/...--ChildCommander']={
'M... |
"""
Large file parsing of Genepop files
The standard parser loads the whole file into memory. This parser
provides an iterator over data.
Classes:
LargeRecord Holds GenePop data.
Functions:
read Parses a GenePop record (file) into a Record object.
"""
def get_indiv(line):
indiv_name, marker_li... |
from django.contrib.contenttypes.models import ContentType
from django.shortcuts import render
from django.conf import settings
from django.db.models.fields import related
from django.template.loader import get_template
from django.template import Context
import json
graph_settings = getattr(settings, 'SPAGHETTI_SAUCE'... |
"""Test fee estimation code."""
from decimal import Decimal
import random
from test_framework.messages import (
COIN,
COutPoint,
CTransaction,
CTxIn,
CTxOut,
)
from test_framework.script import (
CScript,
OP_1,
OP_2,
OP_DROP,
OP_TRUE,
)
from test_framework.script_util import (
... |
from __future__ import absolute_import, unicode_literals
from draftjs_exporter.constants import BLOCK_TYPES, ENTITY_TYPES, INLINE_STYLES
from draftjs_exporter.defaults import BLOCK_MAP
TERMS_BLOCK_ID = 'TERMS_AND_CONDITIONS_TEXT'
DRAFT_BLOCK_TYPE_H3 = {'label': 'H3', 'type': BLOCK_TYPES.HEADER_THREE}
DRAFT_BLOCK_TYPE_H... |
"""
This file uses Python nose to test the correctness of writing and reading parameter files.
To run the test, 'parameters' directory should exists in the 'tests' directory with all .par files (with the correct names).
The parameters directory is iterated, and .par files are read (using the suitable param classes). Th... |
from nose.tools import eq_
from ...element_iterator import ElementIterator
from ..namespace import Namespace
from ..page import Page
def test_page():
XML = """
<page>
<title>AccessibleComputing</title>
<ns>0</ns>
<id>10</id>
<redirect title="Computer accessibility" />
<re... |
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('workshops', '0151_auto_20180902_0409'),
]
operations = [
migrations.AddField(
model_name='event',
name='open_TTT_applications',
field=models.BooleanField(bla... |
from swgpy.object import *
def create(kernel):
result = Weapon()
result.template = "object/weapon/melee/2h_sword/crafted_saber/shared_sword_lightsaber_two_handed_s7_gen3.iff"
result.attribute_template_id = 10
result.stfName("weapon_name","sword_lightsaber_2h_type7")
#### BEGIN MODIFICATIONS ####
#### END MODIFIC... |
from swgpy.object import *
def create(kernel):
result = Tangible()
result.template = "object/tangible/loot/bestine/shared_bestine_painting_schematic_golden_flower_03.iff"
result.attribute_template_id = -1
result.stfName("craft_furniture_ingredients_n","painting_schematic_golden_flower_03")
#### BEGIN MODIFICATIONS... |
import os
import unittest
from ingenico.connect.sdk.log.logging_util import LoggingUtil
from tests import file_utils
class LoggingUtilTest(unittest.TestCase):
"""Tests if the log util is capable of obfuscating headers and bodies of requests"""
def test_obfuscate_body_none_as_body(self):
"""Test that the... |
import atexit
import ssl
from pyVim.connect import SmartConnect, Disconnect
from vcdriver.config import configurable
_session_id = None
_connection_obj = None
def close():
""" Close the session if exists """
global _session_id, _connection_obj
if _connection_obj:
Disconnect(_connection_obj)
... |
"""
Assumes the following:
1. That you have installed the noxer using
cd ~/noxer
pip install -e .
2. That the clone of your fork of the noxer-org.github.io
repository is available in your home folder, that is in
~/noxer-org.github.io
"""
import os
import shutil
home = os.path.expanduser('~')
docs = os.path.join... |
import xlrd
from datetime import datetime
from slugify import slugify
def make_headers(worksheet):
"""Make headers"""
headers = {}
cell_idx = 0
while cell_idx < worksheet.ncols:
cell_type = worksheet.cell_type(0, cell_idx)
cell_value = worksheet.cell_value(0, cell_idx)
cell_value... |
import CatalogItem
import time
from toontown.toonbase import ToontownGlobals
from toontown.toonbase import TTLocalizer
from otp.otpbase import OTPLocalizer
from direct.interval.IntervalGlobal import *
from toontown.toontowngui import TTDialog
from toontown.estate import GardenTutorial
class CatalogGardenStarterItem(Cat... |
"""A libusb1-based ADB reimplementation.
ADB was giving us trouble with its client/server architecture, which is great
for users and developers, but not so great for reliable scripting. This will
allow us to more easily catch errors as Python exceptions instead of checking
random exit codes, and all the other great ben... |
from ddt import data, ddt
from rest_framework import status, test
from waldur_core.quotas.tests import factories
from waldur_core.structure import models as structure_models
from waldur_core.structure.tests import fixtures as structure_fixtures
@ddt
class QuotaUpdateTest(test.APITransactionTestCase):
def setUp(self... |
from flask import request, redirect, url_for, render_template
from love_airbnb import app
from love_airbnb.models import Ad
from love_airbnb.utils import generate_ad
@app.route('/')
def index():
return render_template('index.html')
@app.route('/ad', methods=['GET'])
def opps_shouldnt_get():
return redirect(url_... |
from msrest.pipeline import ClientRawResponse
from msrestazure.azure_exceptions import CloudError
from msrestazure.azure_operation import AzureOperationPoller
import uuid
from .. import models
class SecurityRulesOperations(object):
"""SecurityRulesOperations operations.
:param client: Client for service request... |
"""Communities bundles."""
from invenio.ext.assets import Bundle
js = Bundle(
"js/communities/custom.js",
filters="uglifyjs",
output="communities.js",
weight=91
) |
from Properties_version import version as __version__
from Properties import *
__doc__ = Properties.__doc__ |
from argparse import ArgumentParser
from yaml import load as yload
import requests
def main(argv=None):
parser = ArgumentParser(description="batch queue workload manager client")
parser.add_argument('-s', '--server', default='127.0.0.1',
help='bqwmd server')
parser.add_argument('-p',... |
from tcms.settings.test import * # noqa: F403
DATABASES["default"].update( # noqa: F405
{
"ENGINE": "django.db.backends.mysql",
"NAME": "kiwi",
"USER": "kiwi",
"PASSWORD": "kiwi",
"HOST": "127.0.0.1",
"OPTIONS": {
"init_command": "SET sql_mode='STRICT_TR... |
"""syspwd URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.8/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-based... |
from django.conf.urls.defaults import *
from django.views.static import serve
from omeroweb.webtest import views
import os
urlpatterns = patterns('django.views.generic.simple',
# index 'home page' of the webtest app
url( r'^$', views.index, name='webtest_index' ),
# 'Hello World' example from tutorial on ht... |
from gettext import NullTranslations
from sys import version_info
import base64
import email.mime.text
import gettext
import itertools
import locale
import types
PY3 = version_info.major >= 3
if PY3:
from io import StringIO
from configparser import ConfigParser
import queue
import urllib.parse
impor... |
"""
* Perspective.
*
* Move the mouse left and right to change the field of view (fov).
* Click to modify the aspect ratio. The perspective() function
* sets a perspective projection applying foreshortening, making
* distant objects appear smaller than closer ones. The parameters
* define a viewing volume with t... |
from csc.conceptnet.models import *
from csc.corpus.models import *
from django.contrib.auth import *
from django.db import transaction
den = Assertion.objects.filter(raw__isnull=True).count()
if den > 0:
batch = Batch(owner=User.objects.get(id=20003),
remarks="creating raw assertions for ruby commons",
... |
pattern = "*.png"
scm = """
(define (save_indexed_png in_file out_file)
(let*
(
(image (car (gimp-file-load RUN-NONINTERACTIVE in_file in_file)))
(drawable (car (gimp-image-get-active-layer image)))
)
(print in_file)
(if (= (car (gimp-drawable-is-indexed drawable)) FALSE)
(begin
(print "converting... |
"""
@author: Rinze de Laat
Copyright © 2012-2020 Rinze de Laat, Éric Piel, Delmic
This file is part of Odemis.
Odemis is free software: you can redistribute it and/or modify it under the terms
of the GNU General Public License version 2 as published by the Free Software
Foundation.
Odemis is distributed in the hope tha... |
import sys
import locale
import os
import getpass
import stat
from tempfile import mktemp, gettempdir
def _detect_encoding():
"""
Find correct encoding from default locale.
"""
# Some locales report encodings like 'utf_8_valencia' which Python doesn't
# know. We try stripping off the right-most par... |
"""
Some useful graphics functions
"""
import util
import binary
from numpy import *
from pylab import *
def plotLinearClassifier(h, X, Y):
"""
Draw the current decision boundary, margin and data
"""
figure(1)
plot(X[Y>=0.5,0], X[Y>=0.5,1], 'b+',
X[Y< 0.5,0], X[Y< 0.5,1], 'ro')
axes = f... |
from Device import Device
class File(Device):
class Inventory(Device.Inventory):
import pyre.inventory
name = pyre.inventory.str("name", default="journal.log")
name.meta['tip'] = "the name of the file in which messages will be placed"
def createDevice(self):
logfile = file(self.i... |
"""
This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
Basic caching classes and methods
=================================
- Cache - The generic caching object interfacing with the others
- CacheInRam - providi... |
from __future__ import division
from __future__ import print_function
from __future__ import absolute_import
from __future__ import unicode_literals
import os
import fs_uae_launcher.fsui as fsui
from ..Amiga import Amiga
from ..CDManager import CDManager
from ..ChecksumTool import ChecksumTool
from ..Config import Conf... |
"""Synchronize Rating to Mediawiki.org for extensions."""
from apiary.tasks import BaseApiaryTask
import logging
import mwparserfromhell
LOGGER = logging.getLogger()
class MediawikiTasks(BaseApiaryTask):
"""Update extension data on mediawiki.org"""
def get_rating(self, extension_name):
"""Retrieve and c... |
from gi.repository import GLib
from gi.repository import GObject
from gi.repository import Gtk
from xl import common, providers
from xl.nls import gettext as _
from xlgui import icons
FAKEACCELGROUP = Gtk.AccelGroup()
def simple_separator(name, after):
def factory(menu, parent, context):
item = Gtk.Separato... |
from os import path as os_path, walk as os_walk, unlink as os_unlink
import operator
from Plugins.Plugin import PluginDescriptor
from Screens.Screen import Screen
from Screens.MessageBox import MessageBox
from Components.config import config, ConfigSelection, ConfigYesNo, getConfigListEntry, ConfigSubsection, ConfigTex... |
from .utils import *
ISPECS = []
@ispec_ia32("16>[ {0f}{77} ]", mnemonic = "EMMS", type=type_cpu_state)
def ia32_nooperand(obj):
pass
@ispec_ia32("16>[ {d9} reg(3) 0 0011 ]", mnemonic = "FLD") # D9 C0+i
@ispec_ia32("16>[ {d9} reg(3) 1 0011 ]", mnemonic = "FXCH") # D9 C8+i
@ispec_ia32("16>[ {d8} reg(3) 0 1011 ]... |
"""
Preferences is a collection of utilities to display, read & write preferences.
"""
from __future__ import absolute_import
import __init__
import cStringIO
import sys
from skeinforge_tools.skeinforge_utilities import gcodec
import os
import webbrowser
try:
import Tkinter
except:
print( 'You do not have Tkinter, wh... |
from MenuList import MenuList
from Tools.Directories import SCOPE_ACTIVE_SKIN, resolveFilename
from enigma import RT_HALIGN_LEFT, eListboxPythonMultiContent, gFont
from Tools.LoadPixmap import LoadPixmap
from Tools.Directories import fileExists
import skin
from os import path
def row_delta_y():
font = skin.fonts['C... |
"""
Function.py
This file is part of ANNarchy.
Copyright (C) 2013-2016 Julien Vitay <julien.vitay@gmail.com>,
Helge Uelo Dinkelbach <helge.dinkelbach@gmail.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... |
import errno
import logging
import os
import re
import random
import string
import sys
from avocado.core import exit_codes
from avocado.core.settings import settings
from avocado.utils.process import pid_exists
from avocado.utils.stacktrace import log_exc_info
try:
from avocado.core.plugin_interfaces import JobPre,... |
import duplicity.backend
from duplicity import globals
if (globals.cf_backend and
globals.cf_backend.lower().strip() == 'pyrax'):
from ._cf_pyrax import PyraxBackend as CFBackend
else:
from ._cf_cloudfiles import CloudFilesBackend as CFBackend
duplicity.backend.register_backend("cf+http", CFBackend) |
import re
import random
import pytest
from cfme.configure.configuration.region_settings import Tag
from cfme.containers.provider import (ContainersProvider, ContainersTestItem,
refresh_and_navigate)
from cfme.containers.image import Image, ImageCollection
from cfme.containers.project import Project, ProjectCollecti... |
import re
import validators
from requests.compat import urljoin
from requests.utils import dict_from_cookiejar
from sickbeard import logger, tvcache
from sickbeard.bs4_parser import BS4Parser
from sickrage.helper.common import convert_size, try_int
from sickrage.helper.exceptions import ex
from sickrage.providers.torre... |
from __future__ import unicode_literals
import frappe
from frappe import _
install_docs = [
{"doctype":"Role", "role_name":"Stock Manager", "name":"Stock Manager"},
{"doctype":"Role", "role_name":"Item Manager", "name":"Item Manager"},
{"doctype":"Role", "role_name":"Stock User", "name":"Stock User"},
{"doctype":"R... |
from __future__ import unicode_literals
import unittest
import frappe
from frappe.utils import getdate, nowtime
from erpnext.healthcare.doctype.patient_appointment.test_patient_appointment import create_patient
from erpnext.healthcare.doctype.lab_test.lab_test import create_multiple
from erpnext.healthcare.doctype.heal... |
import grok
from app import Bioport
from interfaces import IBioport
from interfaces import IEnglishRequest
try:
from zope.i18n.interfaces import IUserPreferredLanguages # after python 2.6 upgrade
except ImportError:
from zope.app.publisher.browser import IUserPreferredLanguages # before python 2.6 upgrade
fro... |
from . import Boolean
from . import Column
from . import GenericTable
from . import String
from . import Text
from . import Integer
from . import DateTime
from pyfaf.storage.jsontype import JSONType
import json
class PeriodicTask(GenericTable):
__tablename__ = "periodictasks"
id = Column(Integer, primary_key=Tr... |
ANSIBLE_METADATA = {'status': ['preview'],
'supported_by': 'community',
'version': '1.0'}
DOCUMENTATION = '''
---
module: aos_blueprint
author: jeremy@apstra.com (@jeremyschulman)
version_added: "2.3"
short_description: Manage AOS blueprint instance
description:
- Apstra AOS ... |
"""
Module implementing a model for user agent management.
"""
from __future__ import unicode_literals
from PyQt5.QtCore import Qt, QModelIndex, QAbstractTableModel
class UserAgentModel(QAbstractTableModel):
"""
Class implementing a model for user agent management.
"""
def __init__(self, manager, parent... |
'''
Loads features from a test GFF3 file and uses them to test the coordinate comparison
functions within the biothings API.
Author: Joshua Orvis
'''
import argparse
import os
import biocodegff
import biothings
def main():
bin_dir = os.path.abspath(os.path.dirname(__file__))
test_gff_file = bin_dir + '/biothin... |
ANSIBLE_METADATA = {
'status': ['preview'],
'supported_by': 'community',
'metadata_version': '1.1'
}
DOCUMENTATION = '''
---
module: bigip_configsync_action
short_description: Perform different actions related to config-sync.
description:
- Allows one to run different config-sync actions. These actions al... |
"""
================================================================================
Base Processor
================================================================================
| This is a template that is used to add additional processors to
| the package.
| Written By: Matthew Stadelman
| Date Written: 2016/02/26... |
"""Unit tests for :mod:`gwpy.cli.coherence`
"""
from ... import cli
from .base import _TestCliProduct
from .test_spectrum import TestCliSpectrum as _TestCliSpectrum
class TestCliCoherence(_TestCliSpectrum):
TEST_CLASS = cli.Coherence
ACTION = 'coherence'
TEST_ARGS = _TestCliProduct.TEST_ARGS + [
'--... |
import time
from atn import core_utils
node_name = core_utils.get_node_name()
session_id = core_utils.get_session_id()
t = time.time()
print "NEM ID (1): %d (%f s)" % (core_utils.get_nem_id(), time.time() - t)
t = time.time()
print "NEM ID (2): %d (%f s)" % (core_utils.get_nem_id(node_name=node_name), time.time() - t)
... |
import warnings
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.db.models.loading import get_model
from haystack.backends import BaseEngine, BaseSearchBackend, BaseSearchQuery, log_query, EmptyResults
from haystack.constants import ID, DJANGO_CT, DJANGO_ID
from hayst... |
from pychess.System import conf
from pychess.Utils.const import FAN_PIECES, BLACK, WHITE
__label__ = _("Html Diagram")
__ending__ = "html"
__append__ = False
SIZE = 40
BORDER_SIZE = SIZE // 4 + SIZE // 8
FILL = SIZE - BORDER_SIZE
FONT_SIZE = SIZE - 4
style = """
.chessboard {
width: %spx;
height: %spx;
font... |
import csv,sys,os
project_dir= os.path.dirname(os.path.abspath(__file__))+'/gde'
sys.path.append(project_dir)
os.environ['DJANGO_SETTINGS_MODULE']='settings'
import django
django.setup()
from app.models import Setor, Campus, Conarq, GrupoConarq, ClassificaArquivosIfes
data = csv.reader(open("setor.csv"),delimiter=",")
... |
class testcls1:
def __init__(self):
self.__private = 1 |
import os
from decimal import Decimal
from sqlalchemy.util import KeyedTuple
from tests.command.exporter import load
from tests.testcase import DbTestCase
from tests.mock.sources import MockSource
from dbmanagr.command import exporter
from dbmanagr.exception import UnknownTableException, UnknownColumnException, \
U... |
import numpy as np
from ..random import RandomArbitraryPdf
np.random.seed(12324)
def test_return_right_pdf():
x = np.arange(10.)
f = x ** 2.
rand = RandomArbitraryPdf(x, f)
draws = rand(10000)
draws.sort()
# there should be very few small numbers
assert draws[5000] > 5
# but a few of the... |
from import_relative import *
Mbase_subcmd = import_relative('base_subcmd', '..')
class ShowAutoEval(Mbase_subcmd.DebuggerShowBoolSubcommand):
"Show Python evaluation of unrecognized debugger commands"
min_abbrev = len('autoe')
pass
if __name__ == '__main__':
Mhelper = import_relative('__demo_helper__'... |
"""
Copyright (c) 2016 "Vade Secure"
...
This file is part of test-automation-framework.
test-automation-framework 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 optio... |
'''**********************************************************************
Copyright (C) 2009-2016 The Freeciv-web project
This program 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... |
import xlwt
from datetime import datetime
from openerp.addons.report_xls.report_xls import report_xls
from openerp.addons.report_xls.utils import rowcol_to_cell
from openerp.addons.account_financial_report_webkit.report.general_ledger \
import GeneralLedgerWebkit
from openerp.tools.translate import _
_column_sizes ... |
{
'name': 'Stock PHP status selection',
'version': '0.1',
'category': 'web',
'description': '''
Override procedure for select product to populate
''',
'author': 'Micronaet S.r.l. - Nicola Riolini',
'website': 'http://www.micronaet.it',
'license': 'AGPL-3',
'depends': [
... |
from contextlib import contextmanager, closing
import sys
import os
from io import StringIO
import builtins
import signal
import threading
import platform
import tempfile
from coalib.misc.MutableValue import MutableValue
@contextmanager
def subprocess_timeout(sub_process, seconds, kill_pg=False):
"""
Kill subpr... |
from weboob.browser import LoginBrowser, URL, need_login
from weboob.exceptions import BrowserIncorrectPassword
from weboob.capabilities.messages import Message
from .pages import LoginPage, LoginErrorPage, ThreadPage, Tweet, TrendsPage,\
TimelinePage, HomeTimelinePage, SearchTimelinePage
__all__ = ['TwitterBrowser... |
import re
from weboob.browser.pages import HTMLPage
from weboob.browser.elements import ItemElement, method
from weboob.browser.filters.standard import CleanText, Env, Duration
from weboob.capabilities.video import BaseVideo
from weboob.tools.misc import to_unicode
class VideoPage(HTMLPage):
@method
class get_v... |
{
'name' : 'INECO STOCK PRICE',
'version' : '0.1',
'depends' : ['base','stock','ineco_stock'],
'author' : 'Mr.Tititab Srisookco',
'category': 'INECO',
'description': """
1. Add Price Unit in stock move.
""",
'website': 'http://www.ineco.co.th',
'data': [],
'update_xml': [
... |
from openerp.workflow import wkf_service
from openerp.osv import orm
from openerp.tools.translate import _
class workflow_service(wkf_service.workflow_service):
def __init__(self, *args, **kw):
super(workflow_service, self).__init__(*args, **kw)
def trg_last_action(self, uid, model, obj_id, cr):
... |
import django.db.models.deletion
import oscar.models.fields
import simple_history.models
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('contenttypes', '0002_remove_content_type_name'),
migrations.swappable_dependenc... |
from weboob.tools.browser import BaseBrowser
from weboob.tools.capabilities.paste import image_mime
from StringIO import StringIO
from .pages import PageHome, PageImage, PageError
__all__ = ['PixtoilelibreBrowser']
class PixtoilelibreBrowser(BaseBrowser):
PROTOCOL = 'http'
DOMAIN = 'pix.toile-libre.org'
ENC... |
{
'name': 'Broken deprecated module for tests MQT',
'license': 'AGPL-3',
'author': 'Odoo Community Association (OCA)',
'version': '8.0.0.1.0.0',
'depends': [
'base',
],
'data': [
],
} |
"""
Tests specific to the CourseRerunState Model and Manager.
"""
from __future__ import absolute_import
from django.test import TestCase
from opaque_keys.edx.locations import CourseLocator
from six import text_type
from course_action_state.managers import CourseRerunUIStateManager
from course_action_state.models impor... |
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('bp_cupid', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Landkreis',
fields=[
('id', models.Aut... |
"""
Django admin page for bulk email models
"""
from config_models.admin import ConfigurationModelAdmin
from django.contrib import admin
from lms.djangoapps.bulk_email.forms import CourseAuthorizationAdminForm, CourseEmailTemplateForm
from lms.djangoapps.bulk_email.models import (
BulkEmailFlag,
CourseAuthoriza... |
import clv_tray_category |
from spack import *
class Asdcplib(AutotoolsPackage):
"""AS-DCP and AS-02 File Access Library."""
homepage = "https://github.com/cinecert/asdcplib"
url = "https://github.com/cinecert/asdcplib/archive/rel_2_10_35.tar.gz"
version('2_10_35', sha256='a68eec9ae0cc363f75331dc279c6dd6d3a9999a9e5f0a4405fd9... |
from spack import *
class Graphmap(MakefilePackage):
"""A highly sensitive and accurate mapper for long, error-prone reads"""
homepage = "https://github.com/isovic/graphmap"
git = "https://github.com/isovic/graphmap.git"
version('0.3.0', commit='eb8c75d68b03be95464318afa69b645a59f8f6b7')
def ed... |
from spack import *
class Snappy(CMakePackage):
"""A fast compressor/decompressor: https://code.google.com/p/snappy"""
homepage = "https://github.com/google/snappy"
url = "https://github.com/google/snappy/archive/1.1.7.tar.gz"
version('1.1.7', 'ee9086291c9ae8deb4dac5e0b85bf54a')
variant('shared... |
"""
These tests use only the store. They insert instances with known text
and run sparql with fts functions to check the results.
"""
import dbus
import unittest
import random
from common.utils import configuration as cfg
import unittest2 as ut
from common.utils.storetest import CommonTrackerStoreTest as CommonTrackerS... |
"""TIP3P potential, constraints and dynamics."""
from math import pi, sin, cos
import numpy as np
import ase.units as units
from ase.parallel import world
from ase.md.md import MolecularDynamics
qH = 0.417
sigma0 = 3.15061
epsilon0 = 0.1521 * units.kcal / units.mol
rOH = 0.9572
thetaHOH = 104.52 / 180 * pi
class TIP3P:... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.