exit ubuntu gui:
ctl + alt + f1
stop ubuntu GUI:
sudo service lightdm stop
sudo init 3
| class Node | |
| attr_accessor :next, :value | |
| def initialize(value) | |
| @value = value | |
| end | |
| end | |
| class LinkedList | |
| attr_accessor :tail, :head |
| module ScoreRound | |
| SCORES = {"2"=>2, "3"=>3, "4"=>4, "5"=>5, "6"=>6, "7"=>7, "8"=>8, "9"=>9, "10"=>10, "J"=>11, "Q"=>12, "K"=>13, "A"=>14} | |
| def high_card(hand) | |
| hand.max_by do |card| | |
| p card.rank | |
| SCORES[card.rank] | |
| end | |
| end | |
| end |
| # Imagine I wish to buy 5 btc. Iterate over order_book ask price and amounts. fullfill order, return lowest possible cost | |
| order_book = {asks:[{price:2, amount:1, id:'id'},{price:2, amount:4, id:'id'}], bids:{}} | |
| user_amount = 5 | |
| # 1000 btc for $2.5/each | |
| def get_asks(order_book, user_amount) | |
| asks = order_book[:asks] | |
| returned_value = [] |
| require 'matrix' | |
| width = 6 | |
| height = 5 | |
| number_of_mines = 25 | |
| def generate_board(width, height, number_of_mines) | |
| two_d_array = Array.new(height) {Array.new(width, 0)} | |
| height_index_max = height | |
| width_index_max = width | |
| placed_mines = 0 |
| # removes the second column ( I think the index is it ) | |
| cut -f 1,3- jz.tsv > x.tsv |
| import React, { Component } from 'react'; | |
| import { AppRegistry, Text, TextInput, View, TouchableHighlight } from 'react-native'; | |
| import craigslist from 'node-craigslist' | |
| // The following line, substituted for the import statement above produces the same result: | |
| // var craigslist = require('node-craigslist') | |
| var client = new craigslist.Client({ | |
| city : 'seattle' | |
| }); |
| sudo -u postgres /usr/bin/pg_dump whiteboard_api | gzip -c > /tmp/whiteboard_pre_RDAT-121.dump.gz |
| <html> | |
| <title>Data Science</title> | |
| <head> | |
| <link href='https://fonts.googleapis.com/css?family=Poiret+One' rel='stylesheet' type='text/css'> | |
| <style> | |
| .home { | |
| display: -webkit-box; |
| { | |
| "screening": "7.1", | |
| "date": 1476908234241, | |
| "uid": "UID-16-0003", | |
| "linkage_matrix": [[2, 3, 0.06571365, 2], | |
| [0, 10, 0.07951425, 2], | |
| [5, 6, 0.09405724, 2], | |
| [11, 13, 0.10182075, 3], | |
| [1, 12, 0.12900146, 3], | |
| [14, 15, 0.13498948, 5], |