Skip to content

Instantly share code, notes, and snippets.

==> Using Homebrew-provided fortran compiler.
This may be changed by setting the FC environment variable.
==> Cloning https://github.com/JuliaLang/julia.git
git --git-dir /Library/Caches/Homebrew/julia--git/.git status -s
Updating /Library/Caches/Homebrew/julia--git
git config remote.origin.url https://github.com/JuliaLang/julia.git
git config remote.origin.fetch +refs/tags/v0.2.0:refs/tags/v0.2.0
git --git-dir /Library/Caches/Homebrew/julia--git/.git rev-parse -q --verify v0.2.0
git checkout -f v0.2.0
HEAD is now at 05c6461... VERSION: 0.2.0
==> Upgrading 11 outdated packages, with result:
julia 0.3.0, leiningen 2.4.3, libpng 1.6.13, mongodb 2.6.4_1, node 0.10.31, openssl 1.0.1i, python 2.7.8_1, python3 3.4.1_1, sqlite 3.8.6, subversion 1.8.10_1, wget 1.15_2
==> Upgrading julia
==> Using Homebrew-provided fortran compiler.
This may be changed by setting the FC environment variable.
==> Building with an alternative Fortran compiler
This is unsupported.
==> Building with an alternative Fortran compiler
This is unsupported.
==> Cloning https://github.com/JuliaLang/julia.git
@pyrofolium
pyrofolium / julia error 2
Created August 30, 2014 16:38
julia error 2
==> Using Homebrew-provided fortran compiler.
This may be changed by setting the FC environment variable.
==> Building with an alternative Fortran compiler
This is unsupported.
==> Building with an alternative Fortran compiler
This is unsupported.
==> Cloning https://github.com/JuliaLang/julia.git
Updating /Library/Caches/Homebrew/julia--git
warning: unable to rmdir deps/libmojibake: Directory not empty
Cloning into '/private/tmp/julia-aEhPuo'...
brian@Brians-MacBook-Air:~$ brew rm arpack-julia suite-sparse-julia openblas-julia
Uninstalling /usr/local/Cellar/arpack-julia/3.1.3...
Uninstalling /usr/local/Cellar/suite-sparse-julia/4.2.1...
Uninstalling /usr/local/Cellar/openblas-julia/0.2.10...
brian@Brians-MacBook-Air:~$ brew cleanup
brian@Brians-MacBook-Air:~$ brew install -v --HEAD julia && brew test -v --HEAD julia
==> Installing dependencies for julia: staticfloat/julia/openblas-julia, staticfloat/julia/arpack-julia, staticfloat/julia/suite-sparse-julia
==> Installing julia dependency: staticfloat/julia/openblas-julia
==> Downloading https://juliabottles.s3.amazonaws.com/openblas-julia-0.2.10.mavericks.bottle.2.tar.gz
Already downloaded: /Library/Caches/Homebrew/openblas-julia-0.2.10.mavericks.bottle.2.tar.gz
var matter = require('matter-js');
var init = function () {
var $bodyDiv = $('body');
var bodyWidth = $bodyDiv.width();
var windowHeight = $(window).height();
var matterHeight = Math.floor(windowHeight);
var bodyDivElement = $bodyDiv[0];
def longest_non_repeating_string(input_str):
repeated_chars = {}
longest_string = ""
current_string = ""
for char in input_str:
if char in repeated_chars:
current_string = ""
repeated_chars = {}
current_string += char
#functional libraries
cons = lambda x, y : lambda a : x if a is True else y
car = lambda x : x(True)
cdr = lambda x : x(False)
pair = lambda x, y : cons(x, cons(y, None))
fst = car
snd = lambda x: car(cdr(x))
length = lambda x : 0 if isEmpty(x) else 1 + length(cdr(x))
isEmpty = lambda x : True if x is None else False
f_list = lambda *args : None if len(args) == 0 else cons(args[0], f_list(*args[1:]))
class Solution(object):
def __init__(self):
self.memo = {}
def is_bounded(self,i,j,matrix):
return not(i < 0 or j < 0 or i >= len(matrix) or j >= len(matrix[0]))
def longestIncreasingPathStart2(self, matrix, start_i, start_j, travelled):
if str([start_i,start_j]) in self.memo:
class Node(object):
def __init__(self, value, left, right):
self.left = left
self.right = right
self.value = value
def swap_wrong_nodes(root):
def get_wrong_nodes(root, cap, bottom):
if root is None:
return []
class Solution(object):
def maxSumSubmatrix(self, matrix, k):
"""
:type matrix: List[List[int]]
:type k: int
:rtype: int
"""
memory = [[None for col in row] for row in matrix]
result = float("-inf")
for i in xrange(len(matrix)):