text:
from datetime import datetime, timedelta
import operator

import numpy as np
from numpy import nan
import pytest

import pandas.compat as compat
from pandas.compat import range

import pandas as pd
from pandas import (
    Categorical, DataFrame, Index, NaT, Series, bdate_range, date_range, isna)
from pandas.core import ops
import pandas.core.nanops as nanops
import pandas.util.testing as tm
from pandas.util.testing import (
    assert_almost_equal, assert_frame_equal, assert_series_equal)

from .common import TestData

class TestSeriesLogicalOps(object):
    @pytest.mark.parametrize('bool_op', [operator.and_,
                                         operator.or_, operator.xor])
    def test_bool_operators_with_nas(self, bool_op):
        # boolean &, |, ^ should work with object arrays and propagate NAs
        ser = Series(bdate_range('1/1/2000', periods=10), dtype=object)
        ser[::2] = np.nan

        mask = ser.isna()
        filled = ser.fillna(ser[0])

        result = bool_op(ser < ser[9], ser > ser[3])

        expected = bool_op(filled < filled[9], filled > filled[3])
        expected[mask] = False
        assert_series_equal(result, expected)

    def test_operators_bitwise(self):
        # GH#9016: support bitwise op for integer types
        index = list('bca')

        s_tft = Series([True, False, True], index=index)
        s_fff = Series([False, False, False], index=index)
        s_tff = Series([True, False, False], index=index)
        s_empty = Series([])

        # TODO: unused
        # s_0101 = Series([0, 1, 0, 1])

        s_0123 = Series(range(4), dtype='int64')
        s_3333 = Series([3] * 4)
        s_4444 = Series([4] * 4)

        res = s_tft & s_empty
        expected = s_fff
        assert_series_equal(res, expected)

        res = s_tft | s_empty
        expected = s_tft
        assert_series_equal(res, expected)

        res = s_0123 & s_3333
        expected = Series(range(4), dtype='int64')
        assert_series_equal(res, expected)

        res = s_0123 | s_4444
        expected = Series(range(4, 8), dtype='int64')
        assert_series_equal(res, expected)

        s_a0b1c0 = Series([1], list('b'))

        res = s_tft & s_a0b1c0
        expected = s_tff.reindex(list('abc'))
        assert_series_equal(res, expected)

        res = s_tft | s_a0b1c0
        expected = s_tft.reindex(list('abc'))
        assert_series_equal(res, expected)

        n0 = 0
        res = s_tft & n0
        expected = s_fff
        assert_series_equal(res, expected)

        res = s_0123 & n0
        expected = Series([0] * 4)
        assert_series_equal(res, expected)

        n1 = 1
        res = s_tft & n1
        expected = s_tft
        assert_series_equal(res, expected)

        res = s_0123 & n1
        expected = Series([0, 1, 0, 1])
        assert_series_equal(res, expected)

        s_1111 = Series([1] * 4, dtype='int8')
        res = s_0123 & s_1111
        expected = Series([0, 1, 0, 1], dtype='int64')
        assert_series_equal(res, expected)

        res = s_0123.astype(np.int16) | s_1111.astype(np.int32)
        expected = Series([1, 1, 3, 3], dtype='int32')
        assert_series_equal(res, expected)

        with pytest.raises(TypeError):
            s_1111 & 'a'
        with pytest.raises(TypeError):
            s_1111 & ['a', 'b', 'c', 'd']
        with pytest.raises(TypeError):
            s_0123 & np.NaN
        with pytest.raises(TypeError):
            s_0123 & 3.14
        with pytest.raises(TypeError):
            s_0123 & [0.1, 4, 3.14, 2]

        # s_0123 will be all false now because of reindexing like s_tft
        if compat.PY3:
            # unable to sort incompatible object via .union.
            exp = Series([False] * 7, index=['b', 'c', 'a', 0, 1, 2, 3])
            with tm.assert_produces_warning(RuntimeWarning):
                assert_series_equal(s_tft & s_0123, exp)
        else:
            exp = Series([False] * 7, index=[0, 1, 2, 3, 'a', 'b', 'c'])
            assert_series_equal(s_tft & s_0123, exp)

        # s_tft will be all false now because of reindexing like s_0123
        if compat.PY3:
            # unable to sort incompatible object via .union.
            exp = Series([False] * 7, index=[0, 1, 2, 3, 'b', 'c', 'a'])
            with tm.assert_produces_warning(RuntimeWarning):
                assert_series_equal(s_0123 & s_tft, exp)
        else:
            exp = Series([False] * 7, index=[0, 1, 2, 3, 'a', 'b', 'c'])
            assert_series_equal(s_0123 & s_tft, exp)

        assert_series_equal(s_0123 & False, Series([False] * 4))
        assert_series_equal(s_0123 ^ False, Series([False, True, True, True]))
        assert_series_equal(s_0123 & [False], Series([False] * 4))
        assert_series_equal(s_0123 & (False), Series([False] * 4))
        assert_series_equal(s_0123 & Series([False, np.NaN, False, False]),
                            Series([False] * 4))

        s_ftft = Series([False, True, False, True])
        assert_series_equal(s_0123 & Series([0.1, 4, -3.14, 2]), s_ftft)

        s_abNd = Series(['a', 'b', np.NaN, 'd'])
        res = s_0123 & s_abNd
        expected = s_ftft
        assert_series_equal(res, expected)

    def test_scalar_na_logical_ops_corners(self):
        s = Series([2, 3, 4, 5, 6, 7, 8, 9, 10])

        with pytest.raises(TypeError):
            s & datetime(2005, 1, 1)

        s = Series([2, 3, 4, 5, 6, 7, 8, 9, datetime(2005, 1, 1)])
        s[::2] = np.nan

        expected = Series(True, index=s.index)
        expected[::2] = False
        result = s & list(s)
        assert_series_equal(result, expected)

        d = DataFrame({'A': s})
        # TODO: Fix this exception - needs to be fixed! (see GH5035)
        # (previously this was a TypeError because series returned
        # NotImplemented

        # this is an alignment issue; these are equivalent
        # https://github.com/pandas-dev/pandas/issues/5284

        with pytest.raises(TypeError):
            d.__and__(s, axis='columns')

        with pytest.raises(TypeError):
            s & d

        # this is wrong as its not a boolean result
        # result = d.__and__(s,axis='index')

    @pytest.mark.parametrize('op', [
        operator.and_,
        operator.or_,
        operator.xor,
        pytest.param(ops.rand_,
                     marks=pytest.mark.xfail(reason="GH#22092 Index "
                                                    "implementation returns "
                                                    "Index",
                                             raises=AssertionError,
                                             strict=True)),
        pytest.param(ops.ror_,
                     marks=pytest.mark.xfail(reason="GH#22092 Index "
                                                    "implementation raises",
                                             raises=ValueError, strict=True)),
        pytest.param(ops.rxor,
                     marks=pytest.mark.xfail(reason="GH#22092 Index "
                                                    "implementation raises",
                                             raises=TypeError, strict=True))
    ])
    def test_logical_ops_with_index(self, op):
        # GH#22092, GH#19792
        ser = Series([True, True, False, False])
        idx1 = Index([True, False, True, False])
        idx2 = Index([1, 0, 1, 0])

        expected = Series([op(ser[n], idx1[n]) for n in range(len(ser))])

        result = op(ser, idx1)
        assert_series_equal(result, expected)

        expected = Series([op(ser[n], idx2[n]) for n in range(len(ser))],
                          dtype=bool)

        result = op(ser, idx2)
        assert_series_equal(result, expected)

    def test_logical_ops_label_based(self):
        # GH#4947
        # logical ops should be label based

        a = Series([True, False, True], list('bca'))
        b = Series([False, True, False], list('abc'))

        expected = Series([False, True, False], list('abc'))
        result = a & b
        assert_series_equal(result, expected)

        expected = Series([True, True, False], list('abc'))
        result = a | b
        assert_series_equal(result, expected)

        expected = Series([True, False, False], list('abc'))
        result = a ^ b
        assert_series_equal(result, expected)

        # rhs is bigger
        a = Series([True, False, True], list('bca'))
        b = Series([False, True, False, True], list('abcd'))

        expected = Series([False, True, False, False], list('abcd'))
        result = a & b
        assert_series_equal(result, expected)

        expected = Series([True, True, False, False], list('abcd'))
        result = a | b
        assert_series_equal(result, expected)

        # filling

        # vs empty
        result = a & Series([])
        expected = Series([False, False, False], list('bca'))
        assert_series_equal(result, expected)

        result = a | Series([])
        expected = Series([True, False, True], list('bca'))
        assert_series_equal(result, expected)

        # vs non-matching
        result = a & Series([1], ['z'])
        expected = Series([False, False, False, False], list('abcz'))
        assert_series_equal(result, expected)

        result = a | Series([1], ['z'])
        expected = Series([True, True, False, False], list('abcz'))
        assert_series_equal(result, expected)

        # identity
        # we would like s[s|e] == s to hold for any e, whether empty or not
        for e in [Series([]), Series([1], ['z']),
                  Series(np.nan, b.index), Series(np.nan, a.index)]:
            result = a[a | e]
            assert_series_equal(result, a[a])

        for e in [Series(['z'])]:
            if compat.PY3:
                with tm.assert_produces_warning(RuntimeWarning):
                    result = a[a | e]
            else:
                result = a[a | e]
            assert_series_equal(result, a[a])

        # vs scalars
        index = list('bca')
        t = Series([True, False, True])

        for v in [True, 1, 2]:
            result = Series([True, False, True], index=index) | v
            expected = Series([True, True, True], index=index)
            assert_series_equal(result, expected)

        for v in [np.nan, 'foo']:
            with pytest.raises(TypeError):
                t | v

        for v in [False, 0]:
            result = Series([True, False, True], index=index) | v
            expected = Series([True, False, True], index=index)
            assert_series_equal(result, expected)

        for v in [True, 1]:
            result = Series([True, False, True], index=index) & v
            expected = Series([True, False, True], index=index)
            assert_series_equal(result, expected)

        for v in [False, 0]:
            result = Series([True, False, True], index=index) & v
            expected = Series([False, False, False], index=index)
            assert_series_equal(result, expected)
        for v in [np.nan]:
            with pytest.raises(TypeError):
                t & v

    def test_logical_ops_df_compat(self):
        # GH#1134
        s1 = pd.Series([True, False, True], index=list('ABC'), name='x')
        s2 = pd.Series([True, True, False], index=list('ABD'), name='x')

        exp = pd.Series([True, False, False, False],
                        index=list('ABCD'), name='x')
        assert_series_equal(s1 & s2, exp)
        assert_series_equal(s2 & s1, exp)

        # True | np.nan => True
        exp = pd.Series([True, True, True, False],
                        index=list('ABCD'), name='x')
        assert_series_equal(s1 | s2, exp)
        # np.nan | True => np.nan, filled with False
        exp = pd.Series([True, True, False, False],
                        index=list('ABCD'), name='x')
        assert_series_equal(s2 | s1, exp)

        # DataFrame doesn't fill nan with False
        exp = pd.DataFrame({'x': [True, False, np.nan, np.nan]},
                           index=list('ABCD'))
        assert_frame_equal(s1.to_frame() & s2.to_frame(), exp)
        assert_frame_equal(s2.to_frame() & s1.to_frame(), exp)

        exp = pd.DataFrame({'x': [True, True, np.nan, np.nan]},
                           index=list('ABCD'))
        assert_frame_equal(s1.to_frame() | s2.to_frame(), exp)
        assert_frame_equal(s2.to_frame() | s1.to_frame(), exp)

        # different length
        s3 = pd.Series([True, False, True], index=list('ABC'), name='x')
        s4 = pd.Series([True, True, True, True], index=list('ABCD'), name='x')

        exp = pd.Series([True, False, True, False],
                        index=list('ABCD'), name='x')
        assert_series_equal(s3 & s4, exp)
        assert_series_equal(s4 & s3, exp)

        # np.nan | True => np.nan, filled with False
        exp = pd.Series([True, True, True, False],
                        index=list('ABCD'), name='x')
        assert_series_equal(s3 | s4, exp)
        # True | np.nan => True
        exp = pd.Series([True, True, True, True],
                        index=list('ABCD'), name='x')
        assert_series_equal(s4 | s3, exp)

        exp = pd.DataFrame({'x': [True, False, True, np.nan]},
                           index=list('ABCD'))
        assert_frame_equal(s3.to_frame() & s4.to_frame(), exp)
        assert_frame_equal(s4.to_frame() & s3.to_frame(), exp)

        exp = pd.DataFrame({'x': [True, True, True, np.nan]},
                           index=list('ABCD'))
        assert_frame_equal(s3.to_frame() | s4.to_frame(), exp)
        assert_frame_equal(s4.to_frame() | s3.to_frame(), exp)

class TestSeriesComparisons(object):
    def test_comparisons(self):
        left = np.random.randn(10)
        right = np.random.randn(10)
        left[:3] = np.nan

        result = nanops.nangt(left, right)
        with np.errstate(invalid='ignore'):
            expected = (left > right).astype('O')
        expected[:3] = np.nan

        assert_almost_equal(result, expected)

        s = Series(['a', 'b', 'c'])
        s2 = Series([False, True, False])

        # it works!
        exp = Series([False, False, False])
        assert_series_equal(s == s2, exp)
        assert_series_equal(s2 == s, exp)

    def test_categorical_comparisons(self):
        # GH 8938
        # allow equality comparisons
        a = Series(list('abc'), dtype="category")
        b = Series(list('abc'), dtype="object")
        c = Series(['a', 'b', 'cc'], dtype="object")
        d = Series(list('acb'), dtype="object")
        e = Categorical(list('abc'))
        f = Categorical(list('acb'))

        # vs scalar
        assert not (a == 'a').all()
        assert ((a != 'a') == ~(a == 'a')).all()

        assert not ('a' == a).all()
        assert (a == 'a')[0]
        assert ('a' == a)[0]
        assert not ('a' != a)[0]

        # vs list-like
        assert (a == a).all()
        assert not (a != a).all()

        assert (a == list(a)).all()
        assert (a == b).all()
        assert (b == a).all()
        assert ((~(a == b)) == (a != b)).all()
        assert ((~(b == a)) == (b != a)).all()

        assert not (a == c).all()
        assert not (c == a).all()
        assert not (a == d).all()
        assert not (d == a).all()

        # vs a cat-like
        assert (a == e).all()
        assert (e == a).all()
        assert not (a == f).all()
        assert not (f == a).all()

        assert ((~(a == e) == (a != e)).all())
        assert ((~(e == a) == (e != a)).all())
        assert ((~(a == f) == (a != f)).all())
        assert ((~(f == a) == (f != a)).all())

        # non-equality is not comparable
        with pytest.raises(TypeError):
            a < b
        with pytest.raises(TypeError):
            b < a
        with pytest.raises(TypeError):
            a > b
        with pytest.raises(TypeError):
            b > a

    def test_comparison_tuples(self):
        # GH11339
        # comparisons vs tuple
        s = Series([(1, 1), (1, 2)])

        result = s == (1, 2)
        expected = Series([False, True])
        assert_series_equal(result, expected)

        result = s != (1, 2)
        expected = Series([True, False])
        assert_series_equal(result, expected)

        result = s == (0, 0)
        expected = Series([False, False])
        assert_series_equal(result, expected)

        result = s != (0, 0)
        expected = Series([True, True])
        assert_series_equal(result, expected)

        s = Series([(1, 1), (1, 1)])

        result = s == (1, 1)
        expected = Series([True, True])
        assert_series_equal(result, expected)

        result = s != (1, 1)
        expected = Series([False, False])
        assert_series_equal(result, expected)

        s = Series([frozenset([1]), frozenset([1, 2])])

        result = s == frozenset([1])
        expected = Series([True, False])
        assert_series_equal(result, expected)

    def test_comparison_operators_with_nas(self):
        ser = Series(bdate_range('1/1/2000', periods=10), dtype=object)
        ser[::2] = np.nan

        # test that comparisons work
        ops = ['lt', 'le', 'gt', 'ge', 'eq', 'ne']
        for op in ops:
            val = ser[5]

            f = getattr(operator, op)
            result = f(ser, val)

            expected = f(ser.dropna(), val).reindex(ser.index)

            if op == 'ne':
                expected = expected.fillna(True).astype(bool)
            else:
                expected = expected.fillna(False).astype(bool)

            assert_series_equal(result, expected)

            # fffffffuuuuuuuuuuuu
            # result = f(val, s)
            # expected = f(val, s.dropna()).reindex(s.index)
            # assert_series_equal(result, expected)

    def test_unequal_categorical_comparison_raises_type_error(self):
        # unequal comparison should raise for unordered cats
        cat = Series(Categorical(list("abc")))
        with pytest.raises(TypeError):
            cat > "b"

        cat = Series(Categorical(list("abc"), ordered=False))
        with pytest.raises(TypeError):
            cat > "b"

        # https://github.com/pandas-dev/pandas/issues/9836#issuecomment-92123057
        # and following comparisons with scalars not in categories should raise
        # for unequal comps, but not for equal/not equal
        cat = Series(Categorical(list("abc"), ordered=True))

        with pytest.raises(TypeError):
            cat < "d"
        with pytest.raises(TypeError):
            cat > "d"
        with pytest.raises(TypeError):
            "d" < cat
        with pytest.raises(TypeError):
            "d" > cat

        tm.assert_series_equal(cat == "d", Series([False, False, False]))
        tm.assert_series_equal(cat != "d", Series([True, True, True]))

    @pytest.mark.parametrize('pair', [
        ([pd.Timestamp('2011-01-01'), NaT, pd.Timestamp('2011-01-03')],
         [NaT, NaT, pd.Timestamp('2011-01-03')]),

        ([pd.Timedelta('1 days'), NaT, pd.Timedelta('3 days')],
         [NaT, NaT, pd.Timedelta('3 days')]),

        ([pd.Period('2011-01', freq='M'), NaT,
          pd.Period('2011-03', freq='M')],
         [NaT, NaT, pd.Period('2011-03', freq='M')]),

    ])
    @pytest.mark.parametrize('reverse', [True, False])
    @pytest.mark.parametrize('box', [Series, Index])
    @pytest.mark.parametrize('dtype', [None, object])
    def test_nat_comparisons(self, dtype, box, reverse, pair):
        l, r = pair
        if reverse:
            # add lhs / rhs switched data
            l, r = r, l

        left = Series(l, dtype=dtype)
        right = box(r, dtype=dtype)
        # Series, Index

        expected = Series([False, False, True])
        assert_series_equal(left == right, expected)

        expected = Series([True, True, False])
        assert_series_equal(left != right, expected)

        expected = Series([False, False, False])
        assert_series_equal(left < right, expected)

        expected = Series([False, False, False])
        assert_series_equal(left > right, expected)

        expected = Series([False, False, True])
        assert_series_equal(left >= right, expected)

        expected = Series([False, False, True])
        assert_series_equal(left <= right, expected)

    def test_ne(self):
        ts = Series([3, 4, 5, 6, 7], [3, 4, 5, 6, 7], dtype=float)
        expected = [True, True, False, True, True]
        assert tm.equalContents(ts.index != 5, expected)
        assert tm.equalContents(~(ts.index == 5), expected)

    def test_comp_ops_df_compat(self):
        # GH 1134
        s1 = pd.Series([1, 2, 3], index=list('ABC'), name='x')
        s2 = pd.Series([2, 2, 2], index=list('ABD'), name='x')

        s3 = pd.Series([1, 2, 3], index=list('ABC'), name='x')
        s4 = pd.Series([2, 2, 2, 2], index=list('ABCD'), name='x')

        for left, right in [(s1, s2), (s2, s1), (s3, s4), (s4, s3)]:

            msg = "Can only compare identically-labeled Series objects"
            with tm.assert_raises_regex(ValueError, msg):
                left == right

            with tm.assert_raises_regex(ValueError, msg):
                left != right

            with tm.assert_raises_regex(ValueError, msg):
                left < right

            msg = "Can only compare identically-labeled DataFrame objects"
            with tm.assert_raises_regex(ValueError, msg):
                left.to_frame() == right.to_frame()

            with tm.assert_raises_regex(ValueError, msg):
                left.to_frame() != right.to_frame()

            with tm.assert_raises_regex(ValueError, msg):
                left.to_frame() < right.to_frame()

class TestSeriesFlexComparisonOps(object):

    def test_comparison_flex_alignment(self):
        left = Series([1, 3, 2], index=list('abc'))
        right = Series([2, 2, 2], index=list('bcd'))

        exp = pd.Series([False, False, True, False], index=list('abcd'))
        assert_series_equal(left.eq(right), exp)

        exp = pd.Series([True, True, False, True], index=list('abcd'))
        assert_series_equal(left.ne(right), exp)

        exp = pd.Series([False, False, True, False], index=list('abcd'))
        assert_series_equal(left.le(right), exp)

        exp = pd.Series([False, False, False, False], index=list('abcd'))
        assert_series_equal(left.lt(right), exp)

        exp = pd.Series([False, True, True, False], index=list('abcd'))
        assert_series_equal(left.ge(right), exp)

        exp = pd.Series([False, True, False, False], index=list('abcd'))
        assert_series_equal(left.gt(right), exp)

    def test_comparison_flex_alignment_fill(self):
        left = Series([1, 3, 2], index=list('abc'))
        right = Series([2, 2, 2], index=list('bcd'))

        exp = pd.Series([False, False, True, True], index=list('abcd'))
        assert_series_equal(left.eq(right, fill_value=2), exp)

        exp = pd.Series([True, True, False, False], index=list('abcd'))
        assert_series_equal(left.ne(right, fill_value=2), exp)

        exp = pd.Series([False, False, True, True], index=list('abcd'))
        assert_series_equal(left.le(right, fill_value=0), exp)

        exp = pd.Series([False, False, False, True], index=list('abcd'))
        assert_series_equal(left.lt(right, fill_value=0), exp)

        exp = pd.Series([True, True, True, False], index=list('abcd'))
        assert_series_equal(left.ge(right, fill_value=0), exp)

        exp = pd.Series([True, True, False, False], index=list('abcd'))
        assert_series_equal(left.gt(right, fill_value=0), exp)

class TestSeriesOperators(TestData):

    def test_operators_empty_int_corner(self):
        s1 = Series([], [], dtype=np.int32)
        s2 = Series({'x': 0.})
        assert_series_equal(s1 * s2, Series([np.nan], index=['x']))

    def test_ops_datetimelike_align(self):
        # GH 7500
        # datetimelike ops need to align
        dt = Series(date_range('2012-1-1', periods=3, freq='D'))
        dt.iloc[2] = np.nan
        dt2 = dt[::-1]

        expected = Series([timedelta(0), timedelta(0), pd.NaT])
        # name is reset
        result = dt2 - dt
        assert_series_equal(result, expected)

        expected = Series(expected, name=0)
        result = (dt2.to_frame() - dt.to_frame())[0]
        assert_series_equal(result, expected)

    def test_operators_corner(self):
        series = self.ts

        empty = Series([], index=Index([]))

        result = series + empty
        assert np.isnan(result).all()

        result = empty + Series([], index=Index([]))
        assert len(result) == 0

        # TODO: this returned NotImplemented earlier, what to do?
        # deltas = Series([timedelta(1)] * 5, index=np.arange(5))
        # sub_deltas = deltas[::2]
        # deltas5 = deltas * 5
        # deltas = deltas + sub_deltas

        # float + int
        int_ts = self.ts.astype(int)[:-5]
        added = self.ts + int_ts
        expected = Series(self.ts.values[:-5] + int_ts.values,
                          index=self.ts.index[:-5], name='ts')
        tm.assert_series_equal(added[:-5], expected)

    pairings = []
    for op in ['add', 'sub', 'mul', 'pow', 'truediv', 'floordiv']:
        fv = 0
        lop = getattr(Series, op)
        lequiv = getattr(operator, op)
        rop = getattr(Series, 'r' + op)
        # bind op at definition time...
        requiv = lambda x, y, op=op: getattr(operator, op)(y, x)
        pairings.append((lop, lequiv, fv))
        pairings.append((rop, requiv, fv))
    if compat.PY3:
        pairings.append((Series.div, operator.truediv, 1))
        pairings.append((Series.rdiv, lambda x, y: operator.truediv(y, x), 1))
    else:
        pairings.append((Series.div, operator.div, 1))
        pairings.append((Series.rdiv, lambda x, y: operator.div(y, x), 1))

    @pytest.mark.parametrize('op, equiv_op, fv', pairings)
    def test_operators_combine(self, op, equiv_op, fv):
        def _check_fill(meth, op, a, b, fill_value=0):
            exp_index = a.index.union(b.index)
            a = a.reindex(exp_index)
            b = b.reindex(exp_index)

            amask = isna(a)
            bmask = isna(b)

            exp_values = []
            for i in range(len(exp_index)):
                with np.errstate(all='ignore'):
                    if amask[i]:
                        if bmask[i]:
                            exp_values.append(nan)
                            continue
                        exp_values.append(op(fill_value, b[i]))
                    elif bmask[i]:
                        if amask[i]:
                            exp_values.append(nan)
                            continue
                        exp_values.append(op(a[i], fill_value))
                    else:
                        exp_values.append(op(a[i], b[i]))

            result = meth(a, b, fill_value=fill_value)
            expected = Series(exp_values, exp_index)
            assert_series_equal(result, expected)

        a = Series([nan, 1., 2., 3., nan], index=np.arange(5))
        b = Series([nan, 1, nan, 3, nan, 4.], index=np.arange(6))

        result = op(a, b)
        exp = equiv_op(a, b)
        assert_series_equal(result, exp)
        _check_fill(op, equiv_op, a, b, fill_value=fv)
        # should accept axis=0 or axis='rows'
        op(a, b, axis=0)

    def test_operators_na_handling(self):
        from decimal import Decimal
        from datetime import date
        s = Series([Decimal('1.3'), Decimal('2.3')],
                   index=[date(2012, 1, 1), date(2012, 1, 2)])

        result = s + s.shift(1)
        result2 = s.shift(1) + s
        assert isna(result[0])
        assert isna(result2[0])

    def test_op_duplicate_index(self):
        # GH14227
        s1 = Series([1, 2], index=[1, 1])
        s2 = Series([10, 10], index=[1, 2])
        result = s1 + s2
        expected = pd.Series([11, 12, np.nan], index=[1, 1, 2])
        assert_series_equal(result, expected)

    @pytest.mark.parametrize(
        "test_input,error_type",
        [
            (pd.Series([]), ValueError),

            # For strings, or any Series with dtype 'O'
            (pd.Series(['foo', 'bar', 'baz']), TypeError),
            (pd.Series([(1,), (2,)]), TypeError),

            # For mixed data types
            (
                pd.Series(['foo', 'foo', 'bar', 'bar', None, np.nan, 'baz']),
                TypeError
            ),
        ]
    )
    def test_assert_idxminmax_raises(self, test_input, error_type):
        """
        Cases where ``Series.argmax`` and related should raise an exception
        """
        with pytest.raises(error_type):
            test_input.idxmin()
        with pytest.raises(error_type):
            test_input.idxmin(skipna=False)
        with pytest.raises(error_type):
            test_input.idxmax()
        with pytest.raises(error_type):
            test_input.idxmax(skipna=False)

    def test_idxminmax_with_inf(self):
        # For numeric data with NA and Inf (GH #13595)
        s = pd.Series([0, -np.inf, np.inf, np.nan])

        assert s.idxmin() == 1
        assert np.isnan(s.idxmin(skipna=False))

        assert s.idxmax() == 2
        assert np.isnan(s.idxmax(skipna=False))

        # Using old-style behavior that treats floating point nan, -inf, and
        # +inf as missing
        with pd.option_context('mode.use_inf_as_na', True):
            assert s.idxmin() == 0
            assert np.isnan(s.idxmin(skipna=False))
            assert s.idxmax() == 0
            np.isnan(s.idxmax(skipna=False))

class TestSeriesUnaryOps(object):
    # __neg__, __pos__, __inv__

    def test_neg(self):
        ser = tm.makeStringSeries()
        ser.name = 'series'
        assert_series_equal(-ser, -1 * ser)

    def test_invert(self):
        ser = tm.makeStringSeries()
        ser.name = 'series'
        assert_series_equal(-(ser < 0), ~(ser < 0))


Volumetric Mixed Concrete is a concrete plant on wheels. It the ability to mix the concrete right on site to the job specifications. This allows for the concrete to always be fresh to reach its full strength and for us to make only the amount that is needed for the size of the job.
How do Volumetric Mixers Work?
The Aggregate Bins are located on top of the truck. Sand and stone are carried side by side in their bins.
These gates at the rear of each bin can be adjusted to allow for the correct amount of sand or stone to be added to the mixing auger.
This bin at the top rear of the truck carries the cement. The top can open to carry individual bags of cement or to load it from an overhead bin.
The cement is dispensed through a metering auger. Cement agitators in the bin keep the cement moving.
The water is added to the cement and aggregates that enter the mixing auger.
The mixing auger is lined with mixing paddles to continue moving the concrete. The concrete is delivered through this high-speed auger to pour at the job site.
The processor provides information to the operator, logs data, and creates printouts.
The conveyor belt delivers measured aggregate and cement to the mixing auger.
A polyethylene tank stores water to use for mixing and cleanup. A water pump is used to provide water pressure.
Concrete Mobile Mix can mix concrete on site for small or large jobs. Since each job is mixed specifically for a project, there is no waste. Our mixes can use recycled aggregate, too. For more information, give us a call at 970.356.0973.


Current as well as their associated websites and events.
had been two of the publishers operating properties for Times-Shamrock.
and events for the culturally engaged consumer.
and more. For more info, visit www.MetroTimes.com.
award-winning multimedia source of alternative news, events and culture since 1986.


Walk To Werribee Train Station!
Located in one of the most sought after residential pockets, Eview Real Estate Werribee are proud to offer this three bedroom home for consideration to the location conscious buyer.
With walking trails along the Werribee River just footsteps from your front door, this address epitomises the catchcry of location, location, location with the added bonus of a quiet family friendly court.
This home seems perfect for a first home buyer that may wish to add value or extend in years to come, or an investor seeking a blue-chip investment.
Wyndham City Council in recent years has often recorded the fastest annual rate of population growth in the country and is assumed to continue its growth trajectory for some time, due to the large supply of existing and proposed residential land, as well as the continued demand for affordable family housing.


text:
HomeGuidelinesWhat is an 818 car?
What is an 818 car?
The Factory Five 818 Sports Car is the newest and most affordable Factory Five model. Based on tough Subaru Impreza/WRX running gear, the 818 is an ultra-light, ultra-modern, computer-designed, two-seater, mid-engine sports car priced under 10 grand! Engineered to be built, the 818 is all about doing more for less.
How fast is the Factory5 818?
Its claimed top speed is 150 mph, and though its still untested, the goal is likely obtainable. Putting this electrified beast together are two other California companies that know a thing or two about building cars and electricity.
Are factory five cars worth it?
As factory-built cars remain stable, used ones in some cases may become stable, and in other cases, appreciate. However, cars like the Factory Five cars usually continually depreciate until they level just above the price of a kit and qualify as lower-end kit builds.
Do Factory Five cars come with engines?
A complete kit comes with everything you need to build the car except for the complete running engine, transmission, rear end with brakes, wheels and tires, battery, fuel pump, and paint.
How much does a DF Goblin cost?
Goblin Kit Base Price $7,950
Donor is not included with the kit.
Automatic Base/Sport Kit $0
How fast is a DF Goblin?
Any 1/4 mile calculator will give results of about 10.5-10.6 seconds at 126-128 mph for a 1600 lb 260 hp Goblin – if it hooks up. There are very few cars that make those times/speeds that are driven daily, so the correct answer 98.75% of the time is 'quicker than your [Mustang, Camero, Challenger, rice burner, etc.]
What is the fastest kit car?
Kit cars like the Ultima GTR, for example, is easily the fastest kit car around. With a record-breaking speed of 231 mph.
How much does an Ariel Atom kit cost?
For a price ranging between $13,000 (if you build it yourself) to $32,000 (fully built with options) you can get a 1,550 lb 260 horsepower mid engined street legal car! The basis of the DF Goblin Kit Car is the Chevrolet Cobalt SS (or Pontiac G5) donor car with manual transmission.
How tall is the driver of the 818?
The 818 uses factory wheel and tire sizes. We offer upgraded performance shocks, Wilwood brakes, and affordable, high-performance wheel options. Simple, Purposeful, and Elegant. The 818 is a small car with a large cockpit that accommodates drivers up to 6'4".
What's the speed of a factory five 818?
Certainly, Factory Five is well regarded in the DIY community, and for building kits that can become formidable performers on the track. With WRX running gear, this 818 should eclipse 60 MPH in 4.0 seconds. The seller claims this 818 is almost finished, and benefits from numerous upgrades that were planned as part of the final build.
What kind of race seat does the 818r have?
The 818R is the competition version of the 818S. Run 56 seconds at Lime Rock and close to two minutes flat at Watkins Glen! The 818R has a full race cage, race seat, and adjustable KONI shocks. Optional aero and brake packages available.
What is the price of a Subaru 818?
Based on tough Subaru Impreza/WRX running gear, the 818 is an ultra-light, ultra-modern, computer-designed, two-seater, mid-engine sports car priced under 10 grand! Engineered to be built, the 818 is all about doing more for less.
https://www.youtube.com/user/CARandDRIVER
Is iPad 3 touch screen?
Do you play games at a wedding?

redpajama_set_name: RedPajamaCommonCrawl


Our craftsmen are adept at using all types of wood and finishes. Size is not a constraint, we can make you a single chair or custom-fit your entire home with made to measure furniture.
Bespoke or custom-made furniture is the manifestation of one's ideal piece. It truly reflects the personality of the homeowner. This is the very essence of WTP. We pride ourselves on having a fantastic in-house carpentry unit, which preserves the traditions of good old classic furniture making in Singapore.
We build high quality custom furniture in Singapore, from ageless classics to modern designs with wood or just about any material. This expertise and attention to detail is applied to all our customised furniture pieces, from sofas and beds, and even modern nightstands for your bedroom.
Sometimes it's the more subtle things that need to be adjusted to create the perfect look and ambience for your home. We can be put off by just the tiniest of details, such as our bed or sofa not fitting perfectly into the corner of the room. With customised furniture, you leave nothing to chance and it will perfectly fit your home. Be it large or small, wood or metal, WTP will deliver personalised furniture to meet your exact needs. Our custom pieces are made to the highest quality to give you a treasure you will enjoy for a long time. You will enjoy the ultimate in comfort and design in your home.
If you're looking for that perfect piece to complete your bedroom or study, you will find it here at WTP. Our customised furniture brings your ideas to life for the highest levels of home furnishing.
Every piece is unique of your own. It reflects the personality of the homeowner.
More time and care spent to make sure each piece is crafted to perfection.
We pride ourselves with an in-house carpentry and varnishing workshop behind our retail store. Most custom orders will take about three to four weeks to create.
Any furniture you have in mind to custom make?
Contact us now to find out more about our services (including furniture rental & home staging.


Convicted Felon William J. Postmus, former San Bernardino County Supervisor and Assessor, has been discovered by The IE Voice/Black Voice News to be allegedly linked to large campaign contributions to Hesperia City Council Member Paul Russ and loans to Hesperia City Council Member Rebekah Swanson—the contributions and loans were made through Mountain States Consulting Group, LLC.
The political activity conducted by Mountain States Consulting Group, LLC caught the attention of the California Fair Political Practices Commission (FPPC) when two Hesperia residents filed complaints and the FPPC opened an investigation on February 7, 2017, referenced as #2017-00082.
Additionally, the FPPC opened investigations into the campaign reporting of Hesperia City Council Member Paul Russ's campaign for San Bernardino County Supervisor in 2016 referenced as File no. 16/374 and Bill Holland's campaign for San Bernardino County Supervisor in 2016 referenced as File no. 16/375—both investigations were opened September 2, 2016.
The inability to confirm the legal filing for Mountain States Consulting Group, LLC with the California, Nevada or Delaware Secretary of States and discovery that the address provided to the campaign of Hesperia City Council Member Rebekah Swanson was actually a UPS Store at the Victorville Mall, led to speculation that this could be alleged campaign money laundering.
Campaign money laundering is where someone makes campaign contributions in a name other than the name by which such person is identified for legal purposes. This is a violation of California Government Code Section 84301 and is classified as a misdemeanor.
A recent national search of limited liability companies located Mountain States Consulting Group, LLC, as a Wyoming limited liability company with William J. Postmus as a member.
Postmus was awaiting sentencing after cooperating and providing testimony for the criminal trial of developer Jeffrey Burum, former San Bernardino County Supervisor Paul Biane, former San Bernardino Assistant County Assessor and Sheriff's Labor Union President James Erwin and the former top aide for former San Bernardino County Supervisor Gary Ovitt, Mark Kirk.
On August 28, 2017, after viewing evidence and hearing testimony, including the testimony of Postmus, two juries found all defendants not guilty of the charges. Now Burum, his business, Colonies Partners, LP, Erwin and Kirk are suing San Bernardino County and the San Bernardino County District Attorney for millions of dollars and Postmus will seek to withdraw his guilty plea at a November 2nd hearing. According to news reports, he will claim that he was addicted to drugs, under duress and coerced by investigators to enter the guilty plea.
Postmus, through his membership position in Mountain States Consulting Group, LLC purportedly funneled $3,300 in loans to Rebekah Swanson for her Hesperia City Council 2016 Committee and $5,000 in contributions to the Russ for Supervisor 2016 Committee.
Additionally, Jeremiah Brosowski, appointed to the Hesperia City Council on July 11, 2018, to replace Russ Blewett after his passing, has ties to Mountain States Consulting Group, LLC. Brosowski reported receiving somewhere between $10,000 and $100,000 from Mountain States Consulting Group, LLC—it was listed as a source of income on Brosowski's Economic Interest Statement along with Tony Strickland Consulting, Inc.
Former California State Senator Tony Strickland, a Senior Consultant of MJ Real Estate Investors, is no stranger to FPPC as reported by the Los Angeles Times. In 2016, Strickland was accused of 16 violations of campaign finance law, including political money laundering and the filing of false statements. In May 2016, Strickland agreed to pay a $40,000 fine.
In an October 18, press release announcing FPPC enforcement actions, Rebekah Swanson, as the treasurer for her husband's campaign for Hesperia School Board, failed to timely file five semi-annual campaign statements. The FPPC and Swanson reached a "streamline settlement" where Swanson agreed to pay a fine of $1,045.
Returning to Mountain States Consulting Group, LLC, Mountain States Consulting Group reported their address as Mall Blvd, Ste. 188, Victorville, CA 92392-7665, a post office box at a UPS store at the Victorville Mall, when the entity is really located in Wyoming.
The funneling of money from an entity purportedly controlled by convicted felon Postmus to campaigns in the City of Hesperia where its city council is considering a number of large development projects—most specifically, the controversial Tapestry Project in Summit Valley—has Hesperia Resident Al Vogler speculating the developers are seeking to control the Hesperia City Council, the Hesperia Recreation and Park District and the Hesperia Unified School District in order to obtain waivers of normal development requirements.
Vogler questions the sources of the substantial amount of campaign money flowing into the campaigns for City Council, the questionable appointment of Jeremiah Brosowski, the evasiveness of city council members when questioned about Jeremiah Brosowski's appointment, the alleged recent bullying of City of Hesperia employees, and the close ties some of the city council members have with development and marijuana interests.
When he attended the July 11 City of Hesperia City Council meeting where Brosowski was appointed, Vogler confirmed he heard from witnesses who were in the lobby they observed developer Dino DeFazio, Ghulam Farooq who has ties to the marijuana industry and possibly, former Hesperia City Council Member Bill Jenson speaking with Brosowski prior his being questioned by the City Council in consideration of his appointment.
After hearing from other applicants who were there seeking to fill Blewett's vacant city council position, Council Member Paul Russ then nominated Brosowski and Rebekah Swanson seconded the nomination.
Vogler suspects DeFazio, Farooq and possibly Jenson provided the questions and advice to Brosowski in advance and in doing so, gave him an advantage over the other applicants.
Vogler then requested the July 11 video footage from the security cameras located in the lobby to confirm the information provided to him by his sources. The City of Hesperia claimed the security footage is recorded over within 48-hours in an endless loop thus making the footage from July 11, unattainable.
Then Vogler attended three subsequent meetings of the Hesperia City Council and questioned the suspect appointment of Brosowski. He received no answers to his questions at two of the meetings and one generalized response at another, however most of his questions remain unanswered.
Volger also questions whether Postmus' alleged campaign contributions/loans made through Mountain States Consulting Group, LLC. in violation of California Government Code is a violation of the terms of Postmus' plea agreement, which includes provisions requiring Postmus not to violate any laws?
The IE Voice/Black Voice News posed questions and requested comment from Hesperia City Council Members Paul Russ, Rebekah Swanson and Jeremiah Brosowski. They had not responded by the deadline.


text:
UNSW assists educators in the Philippines in their transition to digital teaching
Published on the 19 May 2020
An award-winning course designed by UNSW's Simon McIntyre is helping nations adjust to digital teaching during COVID-19.
UNSW will waive the certificate fee for teachers in the Philippines who enrol in the Learning to Teach Online (LTTO) course as a knowledge exchange initiative to advance digital learning.
"To help a country improve its education in the situation that we're facing now is a real honour," says Associate Professor Simon McIntyre, Associate Dean Education at UNSW Art & Design.
With help from his UNSW colleagues, A/Prof McIntyre established LTTO as a series of 20 separate video resources in 2012 before developing them into a fully online course with Coursera in 2014.
The LTTO course is available free to anyone in the world with an internet connection and a computer but the certificate itself usually costs nearly $100AUD ($60USD).
Associate Professor Simon McIntyre
After Raphael Pangalangan from volunteer organisation Just One Little Thing in the Philippines reached out to UNSW, the university and online platform provider Coursera waived their 50/50 share of the certificate fee, A/Prof McIntyre says.
About 300 of JOLT's students who complete the course will receive the certificate, A/Prof McIntyre says.
"JOLT is a volunteer network that pulls together training for teachers to help raise the quality of education in the Philippines which is an amazing thing to do," he says. "And Raphael has just got that genuine passion."
Mr Pangalangan, who is also a human rights lawyer, says the UNSW certificate gives parents and students in the Philippines the confidence to entrust their children to volunteer teachers knowing their accreditations have been validated.
He says the next step for JOLT would be to fundraise for Technology Support Packages to close the tech gap that exists for students, focusing initially on schools in Marikina city in Metro Manila.
"The Philippines is a developing country," Mr Pangalangan says. "We have been grappling with poverty and corruption for most of our modern history. So, one of the challenges in the transition to online teaching is ensuring that students have the technological means to access the e-material in the first place."
A/Prof McIntyre says he and colleagues, Dr Negin Mirriahi and senior lecturer Karin Watson put together this course to "democratise knowledge".
"For us, the idea of creating a tool or a way for educators to share this knowledge with everyone else was the most important thing.
"It's never been about trying to sell something. It really has been aimed at helping teachers understand how to teach better online. So ultimately it can improve the educational opportunities for their students, and hopefully make a difference in their lives."
A/Prof McIntyre says one of the most common obstacles educators face in the transition to the digital classroom is understanding how their teaching relates to different pieces of technology.
"So, it's about knowing which technology is the best choice for doing a particular activity and how to engage students online," he says.
The other issue, A/Prof McIntyre says, is that people use time differently online, so teachers need to change the way they teach.
"You can't 'walk into a classroom' online like you can face to face and deliver a four-hour class in one hit because often people learn more effectively online in smaller focused blocks of time spread over the week," he says.
"So rather than the 'stand and deliver' sort of model. It's more about understanding how to create an active online learning community that empowers students to explore, learn, draw on all that internet connectivity has to offer, and share knowledge with peers in a well organised and moderated environment."
Raphael Pangalangan
Mr Pangalangan says JOLT was established to inspire big change through small steps.
"It is often said that 'The Philippines is worth dying for'," he says. "I agree completely. Yet at the same time the old adage distracts us from our own key capabilities."
"It overemphasises the extreme measure, when in truth, even little things we can do day in and day out may make a felt difference for the individual and the society at large.
"That is JOLT's message. That, together, we can make a big difference through Just One Little Thing."
The LTTO course has won a myriad of awards, including the 2017 Coursera Outstanding Educator Award, the 2012 Merlot Award (US), and was included in US President Obama's 2015 ConnectEd program for continuing education accreditation.


text:
Q: Guest Author - How to modify my custom function code if the guest author URL will follow a particular pattern/format? Based on code the awesome G.M. provided in an earlier question (Use Custom Fields to Create Guest Author Link), I now have a custom function that uses custom fields to support guest authors. The code changes the post author to display the guest author name and changes the author link to the guest author URL of my choosing. This is the code I've added to my theme's function.php file to support guest authors:
//Guest Author Handling - Uses custom fields for guest author name and URL. Changes the guest author name display and changes the author link to guest author URL of your choosing
add_filter( 'get_the_author_user_url', 'guest_author_url' );
add_filter( 'the_author', 'guest_author_link' );
add_filter( 'get_the_author_display_name', 'guest_author_name' );

function guest_author_url($url) {
  global $post;
  $guest_url = get_post_meta( $post->ID, 'guest-url', true );
  if ( filter_var($guest_url, FILTER_VALIDATE_URL) ) {
    return $guest_url;
  } elseif ( get_post_meta( $post->ID, 'guest-author', true ) ) {
    return '#';
  }
  return $url;
}

function guest_author_link($name) {
  global $post;
  $guest_url = get_post_meta( $post->ID, 'guest-url', true );
  $guest_name = get_post_meta( $post->ID, 'guest-author', true );
  if ( $guest_name && filter_var($guest_url, FILTER_VALIDATE_URL) ) {
    return '' . $guest_name . '';
  } elseif( $guest_name ) {
    return $guest_name;
  }
  return $name;
}

function guest_author_name( $name ) {
  global $post;
  $guest_name = get_post_meta( $post->ID, 'guest-author', true );
  if ( $guest_name ) return $guest_name;
  return $name;
}

After playing with this, it occurred to me that it's possible to simplfy the guest author URL entry. The URL for my guest authors will always be formatted as follows:
http://yoursite.com/author/[AuthorName]

Since the URL will always follow this same pattern, what I need to know is how would I modify G.M.'s code so that I only need to enter the [AuthorName] in the custom field for the guest authors URL?
I hope this makes sense...

A: Now I've understand the question, and yes, it makes sense.
The filter additions and the third function do not change at all, what change are the first two functions.
There is 2 cases:

*

*[AuthorName] part in the url is equivalent sanitize_title($guestauthor) where $guestauthor is what is saved in the 'guest-author' custom field

*[AuthorName] part is different and indipendent from 'guest-author' custom field

In 1st case we can assume guest authors have always a custom url and you don't need the 'guest-url' custom field at all. The code become:
function guest_author_url($url) {
  global $post;
  $guest_url_suffix = sanitize_title( get_post_meta( $post->ID, 'guest-author', true ) );
  $guest_url = $guest_url_suffix ? site_url() . '/author/' .  $guest_url_suffix : null;
  if ( filter_var($guest_url, FILTER_VALIDATE_URL) ) {
    return $guest_url;
  }
  return $url;
}

function guest_author_link($name) {
  global $post;
  $guest_name = get_post_meta( $post->ID, 'guest-author', true );
  $guest_url = $guest_name ? site_url() . '/author/' . sanitize_title($guest_name) : null;
  if ( $guest_name && filter_var($guest_url, FILTER_VALIDATE_URL) ) {
    return '' . $guest_name . '';
  }
  return $name;
}

In 2nd case, in the 'guest_url' custom field you have to put the [AuthorName] part of the url. This give you a bonus possibility: if you don't put anything in this field no link will ever shown for the user. The code for this case is:
function guest_author_url($url) {
  global $post;
  $guest_url_suffix = get_post_meta( $post->ID, 'guest-url', true );
  $guest_url = $guest_url_suffix ? site_url() . '/author/' .  $guest_url_suffix : null;
  if ( filter_var($guest_url, FILTER_VALIDATE_URL) ) {
    return $guest_url;
  } elseif ( get_post_meta( $post->ID, 'guest-author', true ) ) {
    return '#';
  }
  return $url;
}

function guest_author_link($name) {
  global $post;
  $guest_url_suffix = get_post_meta( $post->ID, 'guest-url', true );
  $guest_url = $guest_url_suffix ? site_url() . '/author/' .  $guest_url_suffix : null;
  $guest_name = get_post_meta( $post->ID, 'guest-author', true );
  if ( $guest_name && filter_var($guest_url, FILTER_VALIDATE_URL) ) {
    return '' . $guest_name . '';
  } elseif( $guest_name ) {
    return $guest_name;
  }
  return $name;
}

New code is untested, but - unless any typo - it should work.

A: Just in case someone got here looking for how to also add a Guest Description, here is my full implementation.
If follows the same logic as the other answers, I just added a get_the_author_description filter and a function to overwrite the author Bio info (description). As the other solutions above, you pass it as a custom field (see image attached).

This is the full implementation, adding the above solutions.

// Change Guest Author Name, Link and Description
add_filter( 'get_the_author_user_url', 'guest_author_url' );
add_filter( 'the_author', 'guest_author_link' );
add_filter( 'get_the_author_display_name', 'guest_author_name' );
add_filter( 'get_the_author_description', 'guest_author_description' );

function guest_author_url($url) {
  global $post;
  $guest_url = get_post_meta( $post->ID, 'guest-url', true );
  if ( filter_var($guest_url, FILTER_VALIDATE_URL) ) {
    return $guest_url;
  } elseif ( get_post_meta( $post->ID, 'guest-author', true ) ) {
    return '';
  }
  return $url;
}

function guest_author_link($name) {
  global $post;
  $guest_url = get_post_meta( $post->ID, 'guest-url', true );
  $guest_name = get_post_meta( $post->ID, 'guest-author', true );
  if ( $guest_name && filter_var($guest_url, FILTER_VALIDATE_URL) ) {
    return '' . $guest_name . '';
  } elseif( $guest_name ) {
    return '' . $guest_name . '';
  }
  return $name;
}

function guest_author_description($description) {
  global $post;
  $guest_description = get_post_meta( $post->ID, 'guest-description', true );
  if ( $guest_description ) return $guest_description;
  elseif ( get_post_meta( $post->ID, 'guest-author', true ) ) {
    return '';
  }
  return $description;
}

function guest_author_name( $name ) {
  global $post;
  $guest_name = get_post_meta( $post->ID, 'guest-author', true );
  if ( $guest_name ) return $guest_name;
  return $name;
}

redpajama_set_name: RedPajamaStackExchange


Exceptional Synopsis Writing Service: On-Time and Affordable!
Why would people use a professional synopsis writing service? Firstly, are you aware of how book blurb differs from a synopsis? Each one summarizes a book but there is a difference in the way they are written and the audiences they are aimed at. You can use a synopsis of a book to pitch a book to an agent or publisher or to provide bloggers or beta readers with a fairly long summary as a way of determining if it meets their needs. A synopsis gives readers a unique overview to help them decide if a work is of interest to them.
Why would You Want a Book Synopsis?
As the providers of an established synopsis writing service we can tell you that a synopsis of a book is a fairly lengthy summary of a manuscript, with a lot more detail than you would find in a book's blurb. It is a good way of marketing a book prior to having it published. It is possible to refer to a book's synopsis in the event you have a couple of books to market at the same time or you need to discuss a book after it is removed slightly from all of its nuances. You should also remember that synopses are assignments that are commonly given by professors to their students. Hence, it is important to understand how these papers are written.
Our first tip on how to write a synopsis is to say that each one of these papers needs to be concise and clear, it needs to tell readers about the plot's main points and its characters, and it needs to highlight the elements that will draw readers in. In most cases, readers use a book's synopsis to decide whether or not they want to spend time reading a particular book and if it generally matches the type of book they usually review and/or read. If you want good feedback from your tutor or professor and you want the best possible grade, you need to write these papers correctly and without omitting any essential details.
Reading a book is the one way to really get to know it. But when you have several other writing assignments to do and you have absolutely no time for reading an assigned book what can you do? Or it may be that you have not previously had to write a synopsis and you have no idea where to begin. In these circumstances, a reputable writing service is the only viable solution.
Of course, you can always buy a synopsis online from Essay-Experts.org where our competent team is sufficiently experienced to provide the finest quality writing help at affordable prices. Not only does our company specialize in writing synopsis papers but we also cater for other types of academic writing. We consistently ensure our customers are provided with excellent content.
We realize how vitally essential it is that you get entirely original papers and we make sure each custom-written essay we provide is free of plagiarism. It is the aim of Essay-Experts.org to help you rather than get you investigated for plagiarized content. Therefore, you may be sure that you will receive papers from us that are freshly written and entirely unique. We meticulously ensure that each idea we borrow from other writers and scholars is properly cited. We do not use any paper we sell to create more papers. Furthermore, we check every paper for possible plagiarism using the most sophisticated detection system. If required we will send any customer who requests it a plagiarism report. A lot of our time is spent ensuring the papers we write, even urgent ones, bear no resemblance to other papers distributed across the Internet on similar topics.
Place orders well before they are due for submission: Papers always cost less for those who order them early rather than later. If possible, it helps to plan your coursework and academic schedule so that you can enlist our assistance at least one week before a paper's due date since this can save you a lot of hard-earned money.
Take advantage of our company's discounts: The greater the number of orders you place with us, the cheaper each one will be. Savings accumulate with time and can get as high as 15% reductions. Ask our customer services team for more information.
Make the most of our freebies. Essay-Experts.org does not charge for title pages, tables of content, or reference lists.
Submit your order for a synopsis. One of the first steps in ordering from Essay-Experts.org is to place your order. Begin by completing the order form with full instructions about your requirements. Then proceed with payment.
The writing part. Once we verify your payment, an Essay-Experts.org writer starts work. You may communicate directly with your assigned writer via our messaging service. Once the writing part is complete, we edit your paper and check it for traces of plagiarism.
Delivery. When all the research work is done and your paper is written according to the instructions you provided, you can expect a top-quality product. Then it can either be downloaded from the Essay-Experts.org website or we can email it to you.
It is completely legal to purchase papers from us and to use these for learning purposes. Once you buy a custom paper, you are making a great investment in your education and future career. Use your paper to learn how to improve your own writing skills i.e. study our professionally written essays and identify ways for improving your own essays in future. Every cent you pay our professional writing service is a great way of making your education a success. This is the best choice you can make!


text:
package ee.ria.xroad.common.conf.globalconf;

import ee.ria.xroad.common.CodedException;
import ee.ria.xroad.common.SystemProperties;
import ee.ria.xroad.common.cert.CertChain;
import ee.ria.xroad.common.certificateprofile.AuthCertificateProfileInfo;
import ee.ria.xroad.common.certificateprofile.SignCertificateProfileInfo;
import ee.ria.xroad.common.identifier.CentralServiceId;
import ee.ria.xroad.common.identifier.ClientId;
import ee.ria.xroad.common.identifier.GlobalGroupId;
import ee.ria.xroad.common.identifier.SecurityCategoryId;
import ee.ria.xroad.common.identifier.SecurityServerId;
import ee.ria.xroad.common.identifier.ServiceId;

import lombok.extern.slf4j.Slf4j;

import java.nio.file.Path;
import java.nio.file.Paths;
import java.security.cert.X509Certificate;
import java.util.Collection;
import java.util.List;
import java.util.Set;

import static ee.ria.xroad.common.ErrorCodes.X_INTERNAL_ERROR;
import static ee.ria.xroad.common.ErrorCodes.X_OUTDATED_GLOBALCONF;
import static ee.ria.xroad.common.ErrorCodes.translateException;

/**
 * Global configuration.
 */
@Slf4j
public final class GlobalConf {

    private static GlobalConfProviderFactory instanceFactory;
    static {
        try {
            instanceFactory = new GlobalConfProviderFactory();
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }

    private static final ThreadLocal<GlobalConfProvider> THREAD_LOCAL =
            new InheritableThreadLocal<>();

    private static volatile GlobalConfProvider instance;

    private GlobalConf() {
    }

    /**
     * Returns the singleton instance of the configuration.
     */
    static GlobalConfProvider getInstance() {
        if (THREAD_LOCAL.get() != null) {
            return THREAD_LOCAL.get();
        }

        if (instance == null) {
            instance = instanceFactory.createInstance(true);
        }

        return instance;
    }

    /**
     * Initializes current instance of conf for the calling thread.
     * Example usage: calling this method in RequestProcessor to have
     * a copy of current config for the current message.
     */
    public static void initForCurrentThread() {
        log.trace("initForCurrentThread()");

        if (instance == null) {
            instance = instanceFactory.createInstance(false);
        }

        reloadIfChanged();

        THREAD_LOCAL.set(instance);
    }

    /**
     * Reloads the configuration.
     */
    public static synchronized void reload() {
        if (instance != null) {
            try {
                log.trace("reload called");
                instance.load(null);
            } catch (Exception e) {
                throw translateException(e);
            }
        } else {
            log.trace("reload called, create new GlobalConfImpl");
            instance = instanceFactory.createInstance(true);
        }
    }

    /**
     * Reloads the configuration with given configuration instance.
     * @param conf the configuration provider instance
     */
    public static void reload(GlobalConfProvider conf) {
        log.trace("reload called with parameter class {}", conf.getClass());
        instance = conf;
    }

    /**
     * Reloads the configuration if the underlying configuration
     * file has changed.
     */
    public static synchronized void reloadIfChanged() {
        log.trace("reloadIfChanged called");
        if (instance != null) {
            try {
                instance.load(null);
            } catch (Exception e) {
                throw translateException(e);
            }
        }
    }

    // ------------------------------------------------------------------------

    /**
     * Returns an absolute file name for the current instance.
     * @param fileName the file name
     * @return the absolute path to the file of the current instance
     */
    public static Path getInstanceFile(String fileName) {
        return getFile(getInstanceIdentifier(), fileName);
    }

    /**
     * Returns an absolute file name for the specified instance.
     * @param instanceIdentifier the instance identifier
     * @param fileName the file name
     * @return the absolute path to the file of the specified instance
     */
    public static Path getFile(String instanceIdentifier, String fileName) {
        return Paths.get(SystemProperties.getConfigurationPath(),
                instanceIdentifier, fileName);
    }

    // ------------------------------------------------------------------------

    /**
     * Verifies that the global configuration is valid. Throws exception
     * with error code ErrorCodes.X_OUTDATED_GLOBALCONF if the it is too old.
     */
    public static void verifyValidity() {
        if (!isValid()) {
            throw new CodedException(X_OUTDATED_GLOBALCONF,
                    "Global configuration is expired");
        }
    }

    /**
     * Returns true, if the global configuration is valid and can be used
     * for security-critical tasks.
     * Configuration is considered to be valid if all the files of all
     * the instances are up-to-date (not expired).
     * @return true if the global configuration is valid
     */
    public static boolean isValid() {
        GlobalConfProvider provider = getInstance();
        if (provider == null) {
            return false;
        }
        return provider.isValid();
    }

    /**
     * @return the instance identifier for this configuration source
     */
    public static String getInstanceIdentifier() {
        log.trace("getInstanceIdentifier()");

        return getInstance().getInstanceIdentifier();
    }

    /**
     * @return the instance identifiers for all configuration sources
     */
    public static List<String> getInstanceIdentifiers() {
        log.trace("getInstanceIdentifiers()");

        return getInstance().getInstanceIdentifiers();
    }

    /**
     * Returns concrete service id for the given service id type. If the input
     * is ServiceId, returns it. If the input is CentralServiceId, looks for
     * a mapping to ServiceId in GlobalConf.
     *
     * @param serviceId the service id
     * @return mapped service identifier
     */
    public static ServiceId getServiceId(ServiceId serviceId) {
        log.trace("getServiceId({})", serviceId);

        if (serviceId instanceof CentralServiceId) {
            return getInstance().getServiceId((CentralServiceId) serviceId);
        } else if (serviceId instanceof ServiceId) {
            return serviceId;
        } else {
            throw new CodedException(X_INTERNAL_ERROR,
                    "Unknown type of service id: %s", serviceId.getClass());
        }
    }

    /**
     * @param instanceIdentifiers the instance identifiers
     * @return members and subsystems of a given instance or all members if
     * no instance identifiers are specified
     */
    public static List<MemberInfo> getMembers(String... instanceIdentifiers) {
        log.trace("getMembers({})", (Object[]) instanceIdentifiers);

        return getInstance().getMembers(instanceIdentifiers);
    }

    /**
     * @param clientId the client identifier
     * @return member name for the given client identifier
     */
    public static String getMemberName(ClientId clientId) {
        log.trace("getMemberName({})", clientId);

        return getInstance().getMemberName(clientId);
    }

    /**
     * @param instanceIdentifier the instance identifier
     * @return all central services for the given instance identifier
     */
    public static List<CentralServiceId> getCentralServices(
            String instanceIdentifier) {
        log.trace("getCentralServices({})", instanceIdentifier);

        return getInstance().getCentralServices(instanceIdentifier);
    }

    /**
     * @param instanceIdentifiers the optional instance identifiers
     * @return global groups of a given instance or all global groups if no
     * instance identifiers are specified
     */
    public static List<GlobalGroupInfo> getGlobalGroups(
            String... instanceIdentifiers) {
        log.trace("getGlobalGroups({})", (Object[]) instanceIdentifiers);

        return getInstance().getGlobalGroups(instanceIdentifiers);
    }

    /**
     * @param globalGroupId the global group identifier
     * @return global group description for the given global group identifier
     */
    public static String getGlobalGroupDescription(
            GlobalGroupId globalGroupId) {
        log.trace("getGlobalGroupDescription({})", globalGroupId);

        return getInstance().getGlobalGroupDescription(globalGroupId);
    }

    /**
     * @param instanceIdentifiers the optional instance identifiers
     * @return member classes for given instance or all member classes if
     * no instance identifiers are specified
     */
    public static Set<String> getMemberClasses(String... instanceIdentifiers) {
        log.trace("getMemberClasses({})", (Object[]) instanceIdentifiers);

        return getInstance().getMemberClasses(instanceIdentifiers);
    }

    /**
     * Returns address of the given service provider's proxy.
     * @param serviceProvider the service provider identifier
     * @return IP address converted to string, such as "192.168.2.2".
     */
    public static Collection<String> getProviderAddress(
            ClientId serviceProvider) {
        log.trace("getProviderAddress({})", serviceProvider);

        return getInstance().getProviderAddress(serviceProvider);
    }

    /**
     * Returns address of the given service provider's proxy.
     * @return IP address converted to string, such as "192.168.2.2".
     */
    public static String getSecurityServerAddress(
            SecurityServerId serverId) {
        log.trace("getSecurityServerAddress({})", serverId);

        return getInstance().getSecurityServerAddress(serverId);
    }
    /**
     * Returns a list of OCSP responder addresses for the given member
     * certificate.
     * @param member the member certificate
     * @return list of OCSP responder addresses
     * @throws Exception if an error occurs
     */
    public static List<String> getOcspResponderAddresses(
            X509Certificate member) throws Exception {
        log.trace("getOcspResponderAddresses({})", member != null
                ? member.getSubjectX500Principal().getName() : "null");

        return getInstance().getOcspResponderAddresses(member);
    }

    /**
     * Returns a list of OCSP responder addresses for the given CA certificate.
     * @param caCertificate the CA certificate
     * @return list of OCSP responder addresses
     * @throws Exception if an error occurs
     */
    public static List<String> getOcspResponderAddressesForCaCertificate(
            X509Certificate caCertificate) throws Exception {
        log.trace("getOcspResponderAddressesForCaCertificate({})", caCertificate != null
                ? caCertificate.getSubjectX500Principal().getName() : "null");

        return getInstance().getOcspResponderAddressesForCaCertificate(caCertificate);
    }

    /**
     * @return a list of known OCSP responder certificates
     */
    public static List<X509Certificate> getOcspResponderCertificates() {
        log.trace("getOcspResponderCertificates()");

        return getInstance().getOcspResponderCertificates();
    }

    /**
     * @param instanceIdentifier the instance identifier
     * @param subject the member certificate
     * @return the issuer certificate for the member certificate
     * @throws Exception if an error occurs
     */
    public static X509Certificate getCaCert(String instanceIdentifier,
            X509Certificate subject) throws Exception {
        log.trace("getCaCert({}, {})", instanceIdentifier,
                subject.getSubjectX500Principal().getName());

        return getInstance().getCaCert(instanceIdentifier, subject);
    }

    /**
     * @return a list of all CA certificates
     */
    public static Collection<X509Certificate> getAllCaCerts() {
        log.trace("getAllCaCerts()");

        return getInstance().getAllCaCerts();
    }

    /**
     * @return a list of all CA certificates for a given instance
     */
    public static Collection<X509Certificate> getAllCaCerts(String instanceIdentifier) {
        log.trace("getAllCaCerts()");

        return getInstance().getAllCaCerts(instanceIdentifier);
    }

    /**
     * @param instanceIdentifier the instance identifier
     * @param subject the subject certificate
     * @return the top CA and any intermediate CA certificates for a
     * given end entity
     * @throws Exception if an error occurs
     */
    public static CertChain getCertChain(String instanceIdentifier,
            X509Certificate subject) throws Exception {
        log.trace("getCertChain({}, {})", instanceIdentifier,
                subject.getSubjectX500Principal().getName());

        return getInstance().getCertChain(instanceIdentifier, subject);
    }

    /**
     * @param ca the CA certificate
     * @param ocspCert the OCSP certificate
     * @return true, if the CA has the specified OCSP responder certificate,
     * false otherwise
     */
    public static boolean isOcspResponderCert(X509Certificate ca,
            X509Certificate ocspCert) {
        log.trace("isOcspResponderCert({}, {})",
                ca.getSubjectX500Principal().getName(),
                ocspCert.getSubjectX500Principal().getName());

        return getInstance().isOcspResponderCert(ca, ocspCert);
    }

    /**
     * @return all the trusted and intermediate certificates that can be used
     * to verify the other party in establishing SSL connection
     */
    public static X509Certificate[] getAuthTrustChain() {
        log.trace("getAuthTrustChain()");

        return getInstance().getAuthTrustChain();
    }

    /**
     * @param cert the authentication certificate
     * @return the security server id for the given authentication certificate
     * of null of the authentication certificate does not map to any security
     * server.
     * @throws Exception if an error occurs
     */
    public static SecurityServerId getServerId(X509Certificate cert)
            throws Exception {
        log.trace("getServerId({})", cert.getSubjectDN());

        return getInstance().getServerId(cert);
    }

    /**
     * Checks if the authentication certificate belongs to registered
     * security server
     * @param cert the authentication certificate
     * @return true if the authentication certificate belongs to registered
     * security server
     */
    public static boolean isSecurityServerAuthCert(X509Certificate cert) {
        log.trace("isSecurityServerAuthCert({})", cert.getSubjectDN());
        try {
            return getInstance().getServerId(cert) != null;
        } catch (Exception e) {
            log.error("Error occurred while getting server id", e);
            return false;
        }
    }

    /**
     * @param serverId the security server id
     * @return the client id that owns the security server with the specified id
     * or null if the given id does not match an existing server
     * @throws Exception if an error occurs
     */
    public static ClientId getServerOwner(SecurityServerId serverId)
            throws Exception {
        log.trace("getOwner({})", serverId);

        return getInstance().getServerOwner(serverId);
    }

    /**
     * @param cert the certificate
     * @param memberId the member identifier
     * @return true, if cert can be used to authenticate as
     * member member
     * @throws Exception if an error occurs
     */
    public static boolean authCertMatchesMember(X509Certificate cert,
            ClientId memberId) throws Exception {
        log.trace("authCertMatchesMember({}: {}, {})",
                cert.getSerialNumber(), cert.getSubjectDN(),
                memberId);

        return getInstance().authCertMatchesMember(cert, memberId);
    }

    /**
     * @param authCert the authentication certificate
     * @return set of codes corresponding to security categories assigned
     * to security server associated with this authentication certificate
     * @throws Exception if an error occurs
     */
    public static Collection<SecurityCategoryId> getProvidedCategories(
            X509Certificate authCert) throws Exception {
        log.trace("getProvidedCategories()");

        return getInstance().getProvidedCategories(authCert);
    }

    /**
     * @param instanceIdentifier the instance identifier
     * @return all known approved CAs
     */
    public static Collection<ApprovedCAInfo> getApprovedCAs(
            String instanceIdentifier) {
        log.trace("getApprovedCAs()");

        return getInstance().getApprovedCAs(instanceIdentifier);
    }

    /**
     * @param parameters the parameters
     * @param cert the certificate
     * @return authentication certificate profile info for this certificate
     * @throws Exception if an error occurs
     */
    public static AuthCertificateProfileInfo getAuthCertificateProfileInfo(
            AuthCertificateProfileInfo.Parameters parameters,
            X509Certificate cert) throws Exception {
        log.trace("getAuthCertificateProfileInfo({}, {})",
                parameters.getServerId(),
                cert.getSubjectX500Principal());

        return getInstance().getAuthCertificateProfileInfo(parameters, cert);
    }

    /**
     * @param parameters the parameters
     * @param cert the certificate
     * @return signing certificate profile info for this certificate
     * @throws Exception if an error occurs
     */
    public static SignCertificateProfileInfo getSignCertificateProfileInfo(
            SignCertificateProfileInfo.Parameters parameters,
            X509Certificate cert) throws Exception {
        log.trace("getSignCertificateProfileInfo({}, {})",
                parameters.getClientId(),
                cert.getSubjectX500Principal());

        return getInstance().getSignCertificateProfileInfo(parameters, cert);
    }

    /**
     * @param parameters the parameters
     * @param cert the signing certificate
     * @return subject client identifier
     * @throws Exception if an error occurs
     */
    public static ClientId getSubjectName(
            SignCertificateProfileInfo.Parameters parameters,
            X509Certificate cert) throws Exception {
        log.trace("getSubjectName({})", parameters.getClientId());

        return getSignCertificateProfileInfo(parameters, cert)
                .getSubjectIdentifier(cert);
    }

    /**
     * @param instanceIdentifier the instance identifier
     * @return all approved TSPs for the given instance identifier
     */
    public static List<String> getApprovedTsps(String instanceIdentifier) {
        log.trace("getApprovedTsps({})", instanceIdentifier);

        return getInstance().getApprovedTsps(instanceIdentifier);
    }

    /**
     * @param instanceIdentifier the instance identifier
     * @param approvedTspUrl the TSP url
     * @return approved TSP name for the given instance identifier and TSP
     * url
     */
    public static String getApprovedTspName(String instanceIdentifier,
            String approvedTspUrl) {
        log.trace("getApprovedTspName({}, {})", instanceIdentifier,
                approvedTspUrl);

        return getInstance().getApprovedTspName(instanceIdentifier,
                approvedTspUrl);
    }

    /**
     * @return the list of TSP certificates
     * @throws Exception if an error occurs
     */
    public static List<X509Certificate> getTspCertificates() throws Exception {
        log.trace("getTspCertificates()");

        return getInstance().getTspCertificates();
    }

    /**
     * @return all addresses of all members
     */
    public static Set<String> getKnownAddresses() {
        log.trace("getKnownAddresses()");

        return getInstance().getKnownAddresses();
    }

    /**
     * @param subject the client identifier
     * @param group the global group
     * @return true, if given subject belongs to given global group
     */
    public static boolean isSubjectInGlobalGroup(ClientId subject,
            GlobalGroupId group) {
        log.trace("isSubjectInGlobalGroup({}, {})", subject, group);

        return getInstance().isSubjectInGlobalGroup(subject, group);
    }

    /**
     * @param client the client identifier
     * @param securityServer the security server identifier
     * @return true, if client belongs to the security server
     */
    public static boolean isSecurityServerClient(ClientId client,
            SecurityServerId securityServer) {
        log.trace("isSecurityServerClient({}, {})", client, securityServer);

        return getInstance().isSecurityServerClient(client, securityServer);
    }

    /**
     * @param serverId the security server id
     * @return true, if the given security server id exists.
     */
    public static boolean existsSecurityServer(SecurityServerId serverId) {
        log.trace("existsSecurityServer({})", serverId);

        return getInstance().existsSecurityServer(serverId);
    }

    /**
     * @param smallestValue if true the smallest value of all instances
     * should be returned
     * @return time (in seconds) where validity information is considered valid.
     * After that time, OCSP responses must be refreshed.
     */
    public static int getOcspFreshnessSeconds(boolean smallestValue) {
        log.trace("getOcspFreshnessSeconds()");

        return getInstance().getOcspFreshnessSeconds(smallestValue);
    }

    /**
     * @return the address of the management request service
     */
    public static String getManagementRequestServiceAddress() {
        log.trace("getManagementRequestServiceAddress()");

        return getInstance().getManagementRequestServiceAddress();
    }

    /**
     * @return the service id of the management request service
     */
    public static ClientId getManagementRequestService() {
        log.trace("getManagementRequestServiceAddress()");

        return getInstance().getManagementRequestService();
    }

    /**
     * @return SSL certificates of central servers
     * @throws Exception if an error occurs
     */
    public static X509Certificate getCentralServerSslCertificate()
            throws Exception {
        log.trace("getCentralServerSslCertificate()");

        return getInstance().getCentralServerSslCertificate();
    }

    /**
     * @return the timestamping interval in seconds
     */
    public static int getTimestampingIntervalSeconds() {
        log.trace("getTimestampingIntervalSeconds()");

        return getInstance().getTimestampingIntervalSeconds();
    }

    /**
     * @param instanceIdentifiers the instance identifiers
     * @return security server identifiers of the specified instance identifiers
     * or all security server identifiers if no instance identifiers are
     * specified
     */
    public static List<SecurityServerId> getSecurityServers(
            String... instanceIdentifiers) {
        log.trace("getSecurityServers()");

        return getInstance().getSecurityServers(instanceIdentifiers);
    }
}

redpajama_set_name: RedPajamaGithub


It is costly and time consuming to access expertise you need when you need it. We are changing this.
As problems we face become more intricate, and the pace and complexity of work becomes more demanding, we need a better medium for connecting and learning from one another.
Most questions we ask have already been answered by others. Engaging people in the know at the right time avoids wasted effort and delivers a better result.
We envision a world where people from different backgrounds can instantly be introduced, engage, collaborate, and take action. In this world, we as individuals become more powerful, our organizations more impactful, and we collectively find solutions we could not before.
Are you excited about innovation, big data, knowledge and marketplaces?
Do you want to help build the world's leading platform for on-demand expertise?


We at Inkuten.com warrant our Compatible Products sold will be free from defects in materials and workmanship affecting form, fit and function for one year from the original date of shipment. Any claim with respect to such Compatible Products where the original customer seeks a refund of the purchase price of such Compatible Products must be made within 365 days from the original date of shipment. The limited warranty provided herein covers only Manufacturer Defects and does not include malfunctions or failures resulting from misuse, abuse, neglect, alteration, problems with electrical power, usage not in accordance with Product instructions, acts of nature or improper installation or repairs made by anyone other than Inkuten.com. Such limited warranty only extends to refunds or replacements of Inkuten.com Compatible Products and does not cover any damage to your printer, computer systems or other devices arising from your use of our Compatible Products.
If product is defective or should become defective, you can obtain a replacement within 12 months (1 year) or refund within 365 days of purchase - you must be able to provide your order number (Please note that shipping charges are not refundable).
If product is defective or should become defective, you can obtain a replacement or refund within 90 days of purchase - you must be able to provide your order number (Please note that shipping charges are not refundable).


text:
Q: Scipy failure while runing runtests.py: test_failure_to_run_iterations I have followed the official documentation for building and testing scipy on my local machine. I ran into a test failure and I have no idea why is it going this way.
 ================================================= FAILURES ==================================================
______________________________________ test_failure_to_run_iterations _______________________________________
scipy/sparse/linalg/_eigen/lobpcg/tests/test_lobpcg.py:267: in test_failure_to_run_iterations
    eigenvalues, _ = lobpcg(A, Q, maxiter=20)
E   Failed: DID NOT WARN. No warnings of type (<class 'UserWarning'>,) were emitted. The list of emitted warnings is: [].
        A          = array([[14.79920401,  3.42395794,  1.11801536, ...,  6.22468706,
        -0.3295225 ,  0.51182501],
       [ 3.4239579...688, -0.74665688],
       [ 0.51182501, -0.35862093, -4.13501843, ...,  0.79367332,
        -0.74665688,  2.67107558]])
        Q          = array([[ 5.55962680e-01,  8.92473887e-01, -4.22314824e-01,
         1.04714029e-01],
       [ 2.28053325e-01,  2.01479...10e-02,
        -9.48932811e-01],
       [ 1.31911756e-01, -1.98056559e+00,  7.68770644e-01,
        -4.21327587e-01]])
        X          = array([[ 1.76405235e+00,  4.00157208e-01,  9.78737984e-01,
         2.24089320e+00,  1.86755799e+00, -9.77277880e-01,
... 2.89120505e-01,  4.12870820e-01,
        -1.98398897e-01,  9.41923003e-02, -1.14761094e+00,
        -3.58114075e-01]])
        _          = array([[ 4.27894327e-02, -2.29127117e-01, -1.01234856e-01,
        -1.36639793e-01],
       [ 8.89510060e-02, -8.70401...29e-03,
        -1.49249703e-01],
       [-5.02011307e-02, -3.52297469e-02, -4.87207801e-02,
        -9.35327874e-03]])
        eigenvalues = array([145.57385091, 133.32422064, 123.12573165, 110.50388003])
        rnd        = RandomState(MT19937) at 0x7FC83B0EEC40
========================================== short test summary info ==========================================
FAILED scipy/sparse/linalg/_eigen/lobpcg/tests/test_lobpcg.py::test_failure_to_run_iterations


text:
Earth/Environment
Scientists Claim Simple Tweak Can Make Quantum States Last 10,000 Times Longer
CJ Robles, Tech Times 14 August 2020, 12:08 am
(Photo : David Awschalom/University of Chicago) Scientists Kevin Miao, Chris Anderson and Alexandre Bourassa work on quantum research in the Awschalom lab at the University of Chicago's Pritzker School of Molecular Engineering.
(Photo : David Awschalom/Univesity of Chicago) Postdoctoral researcher Kevin Miao works on quantum research at the University of Chicago's Pritzker School of Molecular Engineering.
University of Chicago's Pritzker School of Molecular Engineering scientists discovered a simple tweak can extend quantum systems life for up 10,000 times longer than before.
According to the study published on Aug. 13 in Science Daily, scientists claim the technology would revolutionize quantum communication, computing, and sensing. According to Phys.Org, while the technique was tested on a particular quantum systems class called solid-state qubits, it is assumed to work as well on other kinds of quantum systems. These include molecular quantum systems and superconducting quantum bits.
(Photo : David Awschalom/University of Chicago)
Scientists Kevin Miao, Chris Anderson and Alexandre Bourassa work on quantum research in the Awschalom lab at the University of Chicago's Pritzker School of Molecular Engineering.
Argonne National Laboratory senior scientist and Chicago Quantum Exchange director David Awschalom, the study's lead author, said this would lay the foundation for "new avenues of research in quantum science." The Liew Family Professor in Molecular Engineering said this discovery has broad applicability and simple implementation that would impact many quantum engineering facets as well as allows new research opportunities that were impractical in the past.
Postdoctoral researcher Kevin Miao said they did not try to eliminate the noise in the system, but tricked the system into believing there is no noise. This has kept the system coherent for a long time. The approach is far different from physically isolating the system from the noise as well as keeping all materials pure, which is expensive.
(Photo : David Awschalom/Univesity of Chicago)
Postdoctoral researcher Kevin Miao works on quantum research at the University of Chicago's Pritzker School of Molecular Engineering.
The UChicago scientists added a continuous alternating magnetic field to the usual electromagnetic pulses that were used to control quantum systems. They have rapidly rotated the electron spins by altering this field, then allowed the system to release the rest of the noise.
Miao related the principle to a merry-go-round ride wherein people were all yelling. "When the ride is still, you can hear them perfectly, but if you're rapidly spinning, the noise blurs into a background," he said.
On July 23, the U.S. Department of Energy presented a blueprint for the future quantum Internet in an event in Chicago. Yet, challenges on fundamental engineering continue as Quantum states need an extremely quiet and stable space because they can be distracted easily by background noise.
Read also: Can We Finally Build a Time Machine? Physicists Use Quantum Computer to 'Reverse Time'
The small mod allows longer coherence
This minor tweak has made the system to stay coherent by up to 22 milliseconds, which four magnitude orders higher than before. This is also far beyond any reported electron spin system in the past or much quicker than a blink of an eye, which takes about 350 milliseconds.
Awschalom also said the fix could lead to breakthroughs in almost all areas of quantum technology while creating "a pathway to scalability." This could also extend the storage of information about quantum electron spin practical, which will enable more complex operations in quantum computers and transmit quantum information from spin-based devices to farther networks.
Miao noted that a lot of candidates for quantum technology were pushed aside because they could not keep quantum coherence for a long time. He suggested having them re-assessed since their method could immensely improve coherence.
UChicago's system has completely adjusted some forms that usually destroy quantum coherence including temperature fluctuations, physical vibrations, and electromagnetic noise.
"The best part is, it's incredibly easy to do," said Miao adding that they used complex science in the process, but a clear-cut logistics for changing the magnetic field.
Read also: First in the History: New Planet Found by an Amateur Astronomer in Oklahoma
Tags: Quantum Science University of Chicago


text:
Home>Entertainment> O.J. Simpson's Former Miami Home Goes Up For Sale For $1.3M
O.J. Simpson's Former Miami Home Goes Up For Sale For $1.3M
By Kyle Rooney
Kyle Rooney
@_UncleRooney
O.J.'s old pad back on the market.
O.J. Simpson's former Miami home, which he bought back in 2000, is back on the market for $1.3 million.
According to TMZ, the house sits on 1.65 acres and features 4 bedrooms, 4 bathrooms, a basketball court and a separate guest houses. Additionally, the home has been renovated with a new kitchen as well as a remodelled pool and porch since he purchased it in 2000.
In 2014, the house sold in foreclosure for $513,000 while O.J. was in prison.
O.J., who is currently serving a 33-year bid for armed robbery and kidnapping after an incident with memorabilia dealers in Las Vegas, just had a parole hearing and if things go his way he'll be out in October. During the hearing he said he'd like to move back to Florida when he's released.
Check out the full listing, with images of the home, right here.
Entertainment OJ simpson OJ SImpson home
Joey Bada$$ Shares Throwback Playlist Of Childhood Favorite Songs
RZA Goes Old School With His Cooking Playlist
ENTERTAINMENT O.J. Simpson's Former Miami Home Goes Up For Sale For $1.3M


How do I remove the lacquer coating from brass before I use Pine-Ola Copper & Brass Polish?
Any acetone-based lacquer/paint remover will take off the lacquer coating. Some products are even labeled Brass Lacquer Remover. Once you have exposed the raw brass, polish with Pine-Ola Copper & Brass Polish, using a soft towel.


In the Epistle to the Romans, Saint Paul speaks clearly to them and to all posterity concerning the relation existing between Creation – the work of God's hands, and eternal morality. The Apostle preached that God manifests his wrath in face of the impiety and wickedness of men, who should have come to know Him through Creation, and glorified Him for his work. For 'although they knew God they did not accord him glory as God or give him thanks. Instead, they became vain in their reasoning, and their senseless minds were darkened. While claiming to be wise, they became fools and exchanged the glory of the immortal God for the likeness of an image of mortal man or of birds or of four-legged animals or of snakes' (Rom 1, 21).
Something very similar happens in our day, when humanity strays from truth and morals through vain reasoning. With the resulting loss of the Christian concept of Creation, it is increasingly believed that the current crisis is not caused by humanity's estrangement from God, but rather, its neglect of nature. The solution would then lie in 'ecological conversion', and not a conversion unto holiness.
Based on St. Paul's words, we wish to clearly establish what kind of conversion humanity needs today, and identify the real problems behind the current ecological crisis. The essential aspects of a virtuous existence as God planned it must also be established. Is caring for creation really the primordial objective of Christian life?
I – Does man need an ecological conversion or a moral one? What are the true world problems behind the current ecological crises?
II – What are the essential aspects of a virtuous existence? Is care for creation a primordial objective of Christian life?
III – What do Scripture and the Church teach about sin? Does sin offend God or the world? Does God pardon 'sins' committed against the world without regard for the sins against Himself?
I – Does man need an ecological conversion or a moral one? What are the true world problems behind the current ecological crisis?
What about the contamination of our thinking, the pollution of our souls?
Is it not true that an irresponsible use of Creation begins precisely where God is marginalized or even denied?
What are natural disasters compared with the loss of souls?


text:
Gratteri é uma comuna italiana da região da Sicília, província de Palermo, com cerca de 1.081 habitantes. Estende-se por uma área de 38 km², tendo uma densidade populacional de 28 hab/km². Faz fronteira com Cefalù, Collesano, Isnello, Lascari.

Demografia

Comunas de Palermo (província)

redpajama_set_name: RedPajamaWikipedia


At approximately 830 Saturday morning a freight train heading north through the city of Scottsburg Derailed losing five cars. The derailment did not involve any chemicals spills or result in any injuries. the freight cars were carrying automobiles. The cars came off the track directly behind the Old corn factory and had traffic blocked at railroad crossings South to the Lovers Ln Crossing. The cause of the derailment is under investigation and clean up will take several days.


Looks like Crytek will be facing some Engine-based competition at GDC. Epic will be showing off what their pet engine, the Unreal Engine 3 is now capable of there.
In less techie words, that means lights will look sweet as hell, shadows will look cooler and other fancy stuff will be seen. Another touted feature is the Content Browser, which will should allow designers to browse through, well, content. Hmm.
Sounds kinda similar to that online stats feature Unreal worked with on Unreal Tournament games. More practically, it sounds like a distant competitor to Quake Live. Will the Unreal Tournament/Quake 3 rivalry flare up on the Internets?! We can only wait, and watch. Or attend GDC, at least.