Skip to content

Instantly share code, notes, and snippets.

View vr2262's full-sized avatar
👀
ok

Viktor Roytman vr2262

👀
ok
View GitHub Profile
Gather (cost=36576.06..15864926.71 rows=44743 width=139) (actual time=25.083..91.672 rows=34558 loops=1)
Workers Planned: 2Gather (cost=36576.06..15864926.71 rows=44743 width=139) (actual time=25.083..91.672 rows=34558 loops=1)
Workers Planned: 2
Workers Launched: 2
Buffers: shared hit=72143 read=1319
I/O Timings: read=15.456
-> Hash Left Join (cost=35576.06..15859452.41 rows=18643 width=139) (actual time=4.615..61.641 rows=11519 loops=3)
Hash Cond: (my_table.joined_table_2_id = joined_table_2.id)
Buffers: shared hit=72143 read=1319
I/O Timings: read=15.456
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@vr2262
vr2262 / testing-travis.md
Created December 7, 2015 15:38
Testing the Travis environment locally

Keybase proof

I hereby claim:

  • I am vr2262 on github.
  • I am vr2262 (https://keybase.io/vr2262) on keybase.
  • I have a public key whose fingerprint is 8E58 B319 65B8 C929 93F2 92E0 52F7 73FE A9C4 5CFD

To claim this, I am signing this object:

GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
@vr2262
vr2262 / python_3_instructions.md
Last active October 5, 2015 15:34
Python 3 development environment

##Instructions

  1. Install the dependencies from the top of this page: https://github.com/yyuu/pyenv/wiki/Common-build-problems
  2. $ git clone git://github.com/yyuu/pyenv.git ~/.pyenv

pyenv allows you to manage Python (and pip, etc) versions easily. 3. $ echo 'export PATH="$HOME/.pyenv/bin:$PATH"' >> ~/.bashrc (Assuming you're using bash) 4. $ echo 'eval "$(pyenv init -)"' >> ~/.bashrc 5. $ source ~/.bashrc 6. To install a particular version of Python to your machine:

9e87a6cb860f761cb15a1bd220ac59a4c09f7cbf
def ruffinis_rule(coefficients, factor):
"""Perform synthetic division and evaluate a polynomial at a factor."""
deflated = np.empty(len(coefficients) - 1, dtype=complex)
deflated[0] = coefficients[0]
for i, coeff in enumerate(coefficients[1:-1], start=1):
deflated[i] = coeff + deflated[i - 1] * factor
evaluation = coefficients[-1] + deflated[-1] * factor
return deflated, evaluation
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
from scipy import special
from scipy import misc
import numpy as np
from matplotlib import pyplot as plt
from matplotlib.backends.backend_pdf import PdfPages
def relative_error(accepted, approximation):
# Helper function for finding relative error.
return abs((accepted - approximation) / float(accepted))