Skip to content

Instantly share code, notes, and snippets.

________________________________________________________________________________
________________________ sympy.stats.crv_types.StudentT ________________________
File "/home/travis/virtualenv/python3.3/lib/python3.3/site-packages/sympy/stats/crv_types.py", line 2038, in sympy.stats.crv_types.StudentT
Failed example:
pprint(D, use_unicode=False)
Expected:
nu 1
- -- - -
2 2
/ 2\
@asmeurer
asmeurer / newaskfirst
Last active August 29, 2015 13:58
newassump
See my branch newassump-newaskfirst
(bin/test sympy/assumptions)
_____________________________________________________ sympy/assumptions/tests/test_query.py:test_float_1 _____________________________________________________
File "/users/aaronmeurer/documents/python/sympy/sympy/sympy/assumptions/tests/test_query.py", line 91, in test_float_1
assert ask(Q.integer(z)) is True
AssertionError
______________________________________________________________________________________________________________________________________________________________
____________________________________________________ sympy/assumptions/tests/test_query.py:test_infinity _____________________________________________________
@asmeurer
asmeurer / stderr.log
Last active August 29, 2015 13:58
emacs conda-build
+ chmod +x autogen.sh
+ ./autogen.sh
+ ./configure --prefix=/home/aaronmeurer/anaconda/envs/_build --sysconfdir=/home/aaronmeurer/anaconda/envs/_build/etc --libexecdir=/home/aaronmeurer/anaconda/envs/_build/lib --localstatedir=/home/aaronmeurer/anaconda/envs/_build/var --without-x --enable-link-time-optimization
/home/aaronmeurer/anaconda/conda-bld/work/emacs-24.3/build-aux/missing: Unknown `--is-lightweight' option
Try `/home/aaronmeurer/anaconda/conda-bld/work/emacs-24.3/build-aux/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
+ make -j bootstrap
make[1]: [distclean] Error 1 (ignored)
gcc: internal compiler error: Killed (program cc1)
Please submit a full bug report,
@asmeurer
asmeurer / gist:538547cdd4f04df76169
Created May 9, 2014 19:56
example sympy satask fact
And(Equivalent(Q.zero(x*y), Or(Q.zero(x), Q.zero(y))), Implies(And(Or(Q.imaginary(x), Q.real(x)), Or(Q.imaginary(y), Q.real(y))), Implies(Or(And(Not(Q.imaginary(x)), Q.imaginary(y)), And(Not(Q.imaginary(y)), Q.imaginary(x))), Q.imaginary(x*y))), Implies(And(Q.commutative(x), Q.commutative(y)), Q.commutative(x*y)), Implies(And(Q.integer(x), Q.integer(y)), Equivalent(Q.even(x*y), Or(Q.even(x), Q.even(y)))), Implies(And(Q.integer(x), Q.integer(y)), Q.integer(x*y)), Implies(And(Q.positive(x), Q.positive(y)), Q.positive(x*y)), Implies(And(Q.prime(x), Q.prime(y)), Not(Q.prime(x*y))), Implies(And(Q.rational(x), Q.rational(y)), Q.rational(x*y)), Implies(And(Q.real(x), Q.real(y)), Implies(Or(And(Not(Q.irrational(x)), Q.irrational(y)), And(Not(Q.irrational(y)), Q.irrational(x))), Q.irrational(x*y))), Implies(And(Q.real(x), Q.real(y)), Q.commutative(x*y)), Implies(And(Q.real(x), Q.real(y)), Q.real(x*y)), Implies(Or(And(Not(Q.rational(x)), Q.rational(y)), And(Not(Q.rational(y)), Q.rational(x))), Not(Q.integer(x*y))), Or(
def gohlke(src_path):
assert sys.platform == 'win32'
MAP = [
('PLATLIB/', 'Lib/site-packages/'),
('PURELIB/', 'Lib/site-packages/'),
('SCRIPTS/', 'Scripts/'),
('DATA/Lib/site-packages/', 'Lib/site-packages/'),
]
with open(join(WORK_DIR, "Gohlke.txt"), 'w') as fo:
fo.write("Source: %r" % src_path)
@asmeurer
asmeurer / gist:7afee3f8bec558be7d2e
Created June 7, 2014 19:35
large expression to convert to cnf
In [2]: from sympy.assumptions.satask import get_all_relevant_facts
In [3]: A = get_all_relevant_facts(Q.positive(x*y + 1), Q.positive(x) & Q.positive(y))
In [4]: print(A)
And(Equivalent(Q.zero(x*y), Or(Q.zero(x), Q.zero(y))), Implies(And(Or(Q.imaginary(x), Q.real(x)), Or(Q.imaginary(y), Q.real(y))), Implies(Or(And(Not(Q.imaginary(x)), Q.imaginary(y)), And(Not(Q.imaginary(y)), Q.imaginary(x))), Q.imaginary(x*y))), Implies(And(Q.commutative(x), Q.commutative(y)), Q.commutative(x*y)), Implies(And(Q.integer(1), Q.integer(x*y)), Q.integer(x*y + 1)), Implies(And(Q.integer(x), Q.integer(y)), Equivalent(Q.even(x*y), Or(Q.even(x), Q.even(y)))), Implies(And(Q.integer(x), Q.integer(y)), Q.integer(x*y)), Implies(And(Q.positive(1), Q.positive(x*y)), Q.positive(x*y + 1)), Implies(And(Q.positive(x), Q.positive(y)), Q.positive(x*y)), Implies(And(Q.prime(x), Q.prime(y)), Not(Q.prime(x*y))), Implies(And(Q.rational(1), Q.rational(x*y)), Q.rational(x*y + 1)), Implies(And(Q.rational(x), Q.rational(y)), Q.rational(x*y)), Implie
@asmeurer
asmeurer / trigsimp.html
Last active August 29, 2015 14:03
trigsimp
This file has been truncated, but you can view the full file.
<html>
<head>
<style>.frame {
margin-left: 0;
font-size: 10pt;
border-left: 1px solid #eee;
padding-left: 15px;
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAALCAMAAAB8rpxtAAAARVBMVEUAAAD9/f5xe4R1fYZ1fIf////O0NWzs7OysrJ2fYh2fYh2fIf///+FjJaxtbv////n6Or///+VmqP///92fYh5gYyCiJLu0pBqAAAAFHRSTlMAghs7SSu2CgTirXMj/M9EnhHqZ/jLwbwAAABGSURBVAjXY0ABHOxQwAHkMIqJQAAnkMPKBuWwgNQJC4HZXGBNggKiIA4TxAh+PiCbG2YeI68IJwfMdB42EWaEXawsDJgAACnNA3xj5yn5AAAAAElFTkSuQmCC);
background-repeat: no-repeat;
#!/bin/bash
mkdir build
cd build
CXXFLAGS=-stdlib=libc++ cmake \
-D WITH_PYTHON:BOOL=ON \
-D GMP_INCLUDE_DIR="$PREFIX/include" \
-D CMAKE_INSTALL_PREFIX=$PREFIX \
..
$conda build csympy/
BUILD START: csympy-0.1-np18py34_0
Fetching package metadata: .............
Solving package specifications: .
The following NEW packages will be INSTALLED:
cmake: 2.8.9-0 defaults
cython: 0.20.2-py34_0 defaults
gmp: 5.1.2-3 file:///Users/aaronmeurer/anaconda/conda-bld/osx-64/
numpy: 1.8.1-py34_0 defaults
@asmeurer
asmeurer / Description
Last active August 29, 2015 14:04
sympy solve profiles
profile.html is the profile in sympy master (python 3) without rational=False
profile2.html is sympy master (python 3) with rational=False
profile2-fastcache.html is sympy master (python 3) with rational=False and fastcache installed
profile2-0.7.1.html is sympy 0.7.1 (python 2) with rational=False