Skip to content

Instantly share code, notes, and snippets.

Avatar
🔂

Alexander Lisianoi alisianoi

🔂
View GitHub Profile
View for.js
var a = function () {
var __accu0__ = [];
for (var x of list ([1, 2, 3, 4, 5])) {
__accu0__.append (x);
}
return py_iter (__accu0__);
} ();
var b = function () {
var __accu0__ = [];
for (var x of a) {
View batavia-3.4.4.log
======================================================================
FAIL: test_mktime_args (tests.modules.test_time.TimeTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/alex/Code/batavia/tests/modules/test_time.py", line 223, in test_mktime_args
self.assertCodeExecution(test_str)
File "/home/alex/Code/batavia/tests/utils.py", line 445, in assertCodeExecution
self.assertEqual(js_out, py_out, context)
AssertionError: '>>> [124 chars]n10360800.0\n>>> time.mktime((1970, 1, 5, 0, 0[259 chars].0\n' != '>>> [124 chars]n10364400.0\n>>> time.mktime((1970, 1, 5, 0, 0[259 chars].0\n'
>>> import time
View batavia-3.5.3.log
======================================================================
FAIL: test_basic (tests.datatypes.test_str.FormatTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/alex/Code/batavia/tests/utils.py", line 201, in wrapper
res = function(self, js_cleaner, py_cleaner, *args, **kwargs)
File "/home/alex/Code/batavia/tests/datatypes/test_str.py", line 709, in test_basic
self.assertCodeExecution(tests, js_cleaner = js_cleaner, py_cleaner = py_cleaner)
File "/home/alex/Code/batavia/tests/utils.py", line 445, in assertCodeExecution
self.assertEqual(js_out, py_out, context)
View workflow.md

Usually, the workflow looks like this on github:

  1. You find a repo you want to contribute to, say coala/coala
  2. You fork it on github, which creates a copy zenara/coala
  3. You copy it to your machine with git clone https://github.com/zenara/coala (actually, it's better to use ssh here, but let's omit that now) At this point, git creates origin that points to your repo: zenara/coala.
  4. You create upstream with git remote add upstream https://github.com/coala/coala that points back to original repo.
  5. You create a local branch with your changes: git checkout -b zenara-awesome-feature
  6. You develop/test it for a long-long time (the coala/coala repo moves forward in the meantime)
  7. You are ready with your local feature branch. Now, you need to catch up with the coala/coala repo.
  8. You get back to the local master branch (which is "old" now): git checkout master
View quicksort.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@alisianoi
alisianoi / quicksort.py
Created Dec 3, 2016
Quicksort implementations for the blog
View quicksort.py
def quicksort(xs):
def sort(xs, l, r):
if (l == r):
return
i, j = l, r
pivot = xs[(i + j) / 2]
while (i <= j):
while (xs[i] < pivot):
View errlog.txt
npm WARN deprecated cross-spawn-async@2.2.4: cross-spawn no longer requires a build toolchain, use it instead!
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated tough-cookie@1.2.0: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130
npm WARN deprecated jade@0.26.3: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated graceful-fs@2.0.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN prefer global coffee-script@1.10.0 should be installed with -g
npm WARN prefer global jsonlint@1.6.2 should be installed with -g
{ Error: ENOTDIR: not a directory, mkdir '/home/alex/Code/project/jquery/.git/hooks'
at Error (native)
@alisianoi
alisianoi / compiling.sh
Created Jan 16, 2016
console output when compiling libsoy
View compiling.sh
alex@tardis ~/Code/libsoy (hg)-[default] % ./waf configure
Setting top to : /home/alex/Code/libsoy
Setting out to : /home/alex/Code/libsoy/build
Checking for 'gcc' (C compiler) : /usr/bin/gcc
Checking for program 'pkg-config' : /usr/bin/pkg-config
Checking for 'gobject-2.0' >= 2.32 : yes
Checking for 'gthread-2.0' >= 2.32 : yes
Checking for program 'valac-0.26' : not found
Checking for program 'valac-0.24' : not found
Checking for program 'valac-0.22' : not found
View requirements
beautifulsoup4==4.3.2
coverage==3.7.1
Django==1.8.3
ipdb==0.8.1
ipython==3.2.1
jedi==0.9.0
Jinja2==2.8
jsonschema==2.5.1
lxml==3.4.4
MarkupSafe==0.23
View anki latex
newLaTeX = \
[
["pdflatex", "-interaction=nonstopmode", "-shell-escape", "tmp.tex"],
["convert", "-trim", "-density", "400", "tmp.pdf", "tmp.png"]
]