This file contains 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
#!/bin/bash | |
rm -rf /tmp/distributed | |
git clone [email protected]:agoodkind/hdfs-mapr-protobuf.git /tmp/distributed/demo | |
(cd /tmp/distributed/demo/ && make all) | |
rm -rf /tmp/distributed/demo/config/default_config.json | |
wget https://gist.githubusercontent.com/agoodkind/cb4bec14bb00b3a7edabb695612eeab5/raw/d4122a34db818ad05a680a0d3b47971ab45bc95f/default_config.json -O "/tmp/distributed/demo/config/default_config.json" |
This file contains 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
{ | |
"block_size_bytes": 64, | |
"name_node_ip": "ls.cs.rutgers.edu", | |
"name_node_port": 50051, | |
"replication_factor": 2, | |
"heartbeat_interval_ms": 10000, | |
"name_node_metadata_persist_file": "persist/name_node_metadata.protobin", | |
"data_node_block_store_path": "persist/block_store/", | |
"client_dn_deadline_ms": 2000, | |
"data_node_port": 0 |
This file contains 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 flask import Flask | |
from slackeventsapi import SlackEventAdapter | |
from slack import WebClient | |
app = Flask(__name__) | |
SLACK_SIGNING_SECRET = None | |
slack_events_adapter = SlackEventAdapter(SLACK_SIGNING_SECRET, "/slack/events", app) | |
slack_client = WebClient(SLACK_BOT_TOKEN) |
This file contains 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
.Orig x3000 | |
INIT_CODE | |
LEA R6, #-1 | |
ADD R5, R6, #0 | |
ADD R6, R6, R6 | |
ADD R6, R6, R6 | |
ADD R6, R6, R5 | |
ADD R6, R6, #-1 | |
ADD R5, R5, R5 | |
ADD R5, R6, #0 |
This file contains 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
// | |
// first.c | |
// pa4 | |
// | |
// Alexander Goodkind | |
// amg540 | |
// | |
#include <stdio.h> | |
#include <stdlib.h> |
This file contains 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
jQuery.get("/svc/user/counts?unread_messages=true").done(function (data) { | |
var users_messages = data.unread_messages[Object.keys(data.unread_messages)[0]] | |
jQuery.each(users_messages, function (msg_id) { | |
jQuery.get("/svc/conversations/messages?conversation_id=" + msg_id).done(function(user_message) { | |
console.log(user_message) | |
}) | |
}) | |
}) |
This file contains 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
#usage: | |
#{% loop_directory directory:images iterator:image filter:*.jpg sort:descending %} | |
# <img src="{{ image }}" /> | |
#{% endloop_directory %} | |
module Jekyll | |
class LoopDirectoryTag < Liquid::Block | |
include Liquid::StandardFilters | |
Syntax = /(#{Liquid::QuotedFragment}+)?/ |
This file contains 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
class Solution: | |
# @param A : integer | |
# @param B : integer | |
# @return a list of integers | |
def stepnum(self, A, B): | |
adjacents = [] | |
for i in range(A,B+1): | |
if self.isAdjacent(str(i)): | |
adjacents.append(i) |
This file contains 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
class Solution: | |
# @param a : list of list of integers | |
# @return a list of list of integers | |
def diagonal(self, a): | |
m = len(A) | |
n = len(A[0]) | |
res = [0]*(m+n-1) | |
res = self.build(res) | |
res = self.fill(A,res,m,n) |
This file contains 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
def colorfulNumbers(A): | |
numbers = set() | |
stringifiedNumber = str(A) | |
case = addDigits(numbers, stringifiedNumber) | |
if case is 0: | |
return case | |
# print(numbers) | |
lengthOfNumber = len(stringifiedNumber) | |
case = calculateNumbers(numbers, lengthOfNumber, stringifiedNumber) | |
# print(numbers) |
NewerOlder