Skip to content

Instantly share code, notes, and snippets.

View sgallese's full-sized avatar

Sebastian Gallese sgallese

View GitHub Profile
@sgallese
sgallese / .txt
Created October 3, 2020 18:01
Sol Lewitt Wall Drawings
A wall divided horizontally and vertically into four equal parts. Within each part, three of the four kinds of lines are superimposed.
Bands of lines 12 inches (30 cm) wide, in three directions (vertical, horizontal, diagonal right) intersecting.
Four-part drawing with a different line direction in each part.
Straight lines 10" (25 cm) long, not touching, covering the wall evenly.
Vertical lines, not straight, not touching, covering the wall evenly.
A square is divided horizontally and vertically into four equal parts, each with lines in four directions superimposed progressively.
Lines not short, not straight, crossing and touching, drawn at random, using four colors, uniformly dispersed with maximum density, covering the entire surface of the wall.
A wall is divided into four horizontal parts. In the top row are four equal divisions, each with lines in a different direction. In the second row, six double combinations; in the third row, four triple combinations; in the bottom row, all four combinations super
static int degreeOfArray(int[] arr) {
int max = 0;
Map<Integer, Integer> map = new HashMap<>();
Map<Integer, Integer> startIndex = new HashMap<>();
Map<Integer, Integer> endIndex = new HashMap<>();
for(int i = 0; i < data.length; i++){
int value = data[i];
if(map.containsKey(value)){
map.put(value, map.get(value) + 1);
}else{
static String[] missingWords(String s, String t) {
String[] first = s.split(" ");
String[] second = t.split(" ");
int difference = first.length - second.length;
String [] missing = new String[difference];
int counter = 0;
for(int i=0;i< first.length;i++){
int flag=0;
for(int j=0;j<second.length;j++){
if(first[i].equals(second[j]))
def rotstring( input_string, rotate_distance ):
string_length = len(input_string)
print "input: " + input_string
print "rotate_distance: " + str(rotate_distance)
print "string_length: " + str(string_length)
if rotate_distance == 0 or rotate_distance == string_length:
print "Rotate distance is 0 or rotate distance = string length, exiting"
return
# analyzefolder.rb
# goes through a folder in a project
# prints out useful infor pertaining to
# folder contents
# usage: ruby -w analyzefolder.rb
# The program will go through the following folder:
# @path_to_folder+@folder
@path_to_repository = "/Users/claireharlam/Desktop/"
@repository_folder = "brown-digital-repository/"
@project_folder = "Screen/"
@file_count = 0
def recurse_dir( current_dir )
Dir.foreach( current_dir ) do |entry|
# Ignore the following files:
#!/usr/bin/perl
# Used to run program from command line
# Usage: perl spantoipa.pl word
# E.g.: perl spantoipa.pl gato
#load a file of words separated by newlines
open (MYDICT, 'utf8aspellutf8.txt');
while (<MYDICT>) {
chomp;
#!/usr/bin/perl
################################################################
# Autor: Xavier López Morrás (2005)
#
# prolepsi@yahoo.es
#
# separador.pl SEPARADOR DE SÍLABAS Y ACENTUADOR .
# How to make a Rita Lexicon in Spanish from Aspell
# by Sebastian Gallese
# gmail: sebastiangallese
# I assume you know a good bit about Rita and Java and the command line
# It might be helpful to know some Perl (I didn't know any before this)
# If you modify this file, you might be able to execute this as a
# bash script instead of copy-pasting the commands line by line.
# I sure as hell wouldn't.
import java.util.HashSet;
import processing.core.*;
import rita.*;
import rita.wordnet.*;
import com.google.api.translate.Language;
import com.google.api.translate.Translate;
public class Test extends PApplet {