Skip to content

Instantly share code, notes, and snippets.

View agoodkind's full-sized avatar
🏳️‍🌈
🍍

Alex Goodkind agoodkind

🏳️‍🌈
🍍
View GitHub Profile
#!/bin/bash
rm -rf /tmp/distributed
git clone git@github.com: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"
{
"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
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)
.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
//
// first.c
// pa4
//
// Alexander Goodkind
// amg540
//
#include <stdio.h>
#include <stdlib.h>
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)
})
})
})
@agoodkind
agoodkind / direcory_tag.rb
Created August 19, 2018 20:02 — forked from jgatjens/direcory_tag.rb
jekyll-plugin loop_directory
#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}+)?/
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)
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)
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)