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
# We'll be installing Homebrew in the /opt directory. | |
cd /opt | |
# Create a directory for Homebrew. This requires root permissions. | |
sudo mkdir homebrew | |
# Make us the owner of the directory so that we no longer require root permissions. | |
sudo chown -R $(whoami) /opt/homebrew | |
# Download and unzip Homebrew. This command can be found at https://docs.brew.sh/Installation. |
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
print( | |
( | |
lambda expr, stack: all( | |
len(stack) == 0 if char is None else | |
stack.append(char) or True if char in '([{' else | |
len(stack) > 0 and {'(': ')', '[': ']', '{': '}'}[stack.pop()] == char if char in ')]}' else | |
True | |
for char in expr | |
) | |
)( |
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
// | |
// DataStore.swift | |
// A persistent key-value store. | |
// | |
// Created by Noah Rubin on 6/29/16. | |
// Copyright © 2016 nrubin29. All rights reserved. | |
// | |
import Foundation |
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 java.awt.Rectangle; | |
class Entity { | |
private int x, y, w, h; | |
public Entity(int x, int y, int w, int h) { | |
this.x = x; | |
this.y = y; | |
this.w = w; | |
this.h = h; |
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
//setting up | |
boolean[][] bricks = new boolean[14][10]; | |
float bx, by, bdiameter, bxspeed, byspeed; | |
int paddleX, speed; | |
boolean right, left; | |
int lives, score; | |
void setup() { | |
size(500, 450); |
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 java.awt.Rectangle; | |
class Entity { | |
private int x, y, w, h, xSpeed, ySpeed; | |
public Entity(int x, int y, int w, int h, int xSpeed, int ySpeed) { | |
this.x = x; | |
this.y = y; | |
this.w = w; | |
this.h = h; |
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
def answer(words): | |
# first, we need to generate the graph | |
vertices = [] | |
letters = list(set([val for sublist in [list(word) for word in words] for val in sublist])) | |
for word in words: | |
for letter in list(word): | |
letters.append(letter) | |
for i in range(len(words) - 1): |
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 me.nrubin29.sumproblem; | |
import java.util.ArrayList; | |
public class Node implements Comparable<Node> { | |
private int value; | |
private ArrayList<NodePair> children; | |
public Node(int value) { |
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 me.pogostick29.infirmary; | |
import org.bukkit.ChatColor; | |
import org.bukkit.Effect; | |
import org.bukkit.GameMode; | |
import org.bukkit.command.Command; | |
import org.bukkit.command.CommandSender; | |
import org.bukkit.entity.Player; | |
import org.bukkit.plugin.java.JavaPlugin; |