This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from math import sqrt, pow | |
print_matrix = lambda matrix: reduce(lambda y, x: y + "\n" + " ".join(map(lambda z: str(z), x)), matrix, "") | |
print_vector = lambda vector: reduce(lambda y, x: y + "\n" + str(x), vector, "") | |
print_vector_inline = lambda vector: reduce(lambda y, x: y + str(x) + " ", vector, "") | |
copy_matrix = lambda m: map(lambda x: map(lambda y: y, x), m) | |
def read(filename): | |
matrix = [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.grisha.tree; | |
import java.io.*; | |
import java.util.ArrayList; | |
import java.util.List; | |
public class Main { | |
public static Node createTmpTree() { | |
Node animal = new Node("Animal"); | |
Node bear = new Node("Bear"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Html exposing (Html, Attribute, text, toElement, div, input, button) | |
import Html.Attributes exposing (..) | |
import Html.Events exposing (on, targetValue, onClick) | |
import Signal exposing (Address) | |
import StartApp | |
import String | |
main = | |
StartApp.start { model = model, view = view, update = update } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Text exposing (..) | |
import Color exposing (..) | |
import Graphics.Element exposing (..) | |
import Graphics.Collage exposing (..) | |
import Window | |
figure color size = | |
filled color (circle size) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Text exposing (..) | |
import Color exposing (..) | |
import Graphics.Element exposing (..) | |
import Graphics.Collage exposing (..) | |
diamond: Color -> Float -> Form | |
diamond color size = | |
circle size |> filled color | |
main = |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import {addons} from 'react/addons' | |
import getId from '../tools/get_id' | |
import htmlParser from '../tools/html_parser' | |
import checkText from '../tools/get_text' | |
import getFile from '../tools/get_file' | |
import cn from '../tools/class_name' | |
let LiveView = React.createClass({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function emitter(obj){ | |
var store = {} | |
obj.on = function (e, cb) { | |
add(e, cb, true) | |
} | |
obj.one = function (e, cb) { | |
add(e, cb, false) | |
} | |
obj.off = function (e) { | |
delete store[e] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function emitter(obj){ | |
var store = {} | |
obj.on = function (e, cb) { | |
add(e, cb, true) | |
} | |
obj.one = function (e, cb) { | |
add(e, cb, false) | |
} | |
obj.off = function (e) { | |
delete store[e] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.git/ | |
node_modules/ | |
dist/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function loadFileCb(html) { | |
debugger | |
} | |
function downloadFile(url, callback) { | |
if (url) { | |
var accessToken = gapi.auth.getToken().access_token; | |
var xhr = new XMLHttpRequest(); | |
xhr.open('GET', url); | |
xhr.setRequestHeader('Authorization', 'Bearer ' + accessToken); |