Skip to content

Instantly share code, notes, and snippets.

Sylvia anubiann00b

Block or report user

Report or block anubiann00b

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@anubiann00b
anubiann00b / naviancesort.user.js
Last active Oct 12, 2016
Naviance Sort "Colleges I'm Applying To"
View naviancesort.user.js
// ==UserScript==
// @name Naviance Sort "Colleges I'm Applying To"
// @namespace http://shreyasr.me/
// @version 1.0
// @description Allow the user to sort Naviance's "Colleges I'm Applying To"
// @author Shreyas
// @match https://connection.naviance.com/family-connection/colleges/application/
// @grant none
// ==/UserScript==
View Parser.scala
package me.shreyasr.fbmp
import java.text.{DateFormat, DateFormatSymbols, SimpleDateFormat}
import java.util.{Date, Locale}
import net.ruippeixotog.scalascraper.browser.JsoupBrowser
import net.ruippeixotog.scalascraper.dsl.DSL.Extract._
import net.ruippeixotog.scalascraper.dsl.DSL._
object Parser {
View capitalize.java
public String capitalize(String str) {
String[] words = str.toLowerCase().split(" ");
for (int i = 0; i < words.length; i++) {
words[i] = Character.toUpperCase(words[i].charAt(0)) + words[i].substring(1);
}
return TextUtils.join(" ", words);
}
@anubiann00b
anubiann00b / input.m
Last active May 9, 2016
Matrix cipher cracking
View input.m
EDU>> A=[62 32 45 0 49 33 44 21 0 47 49 26 24 15; 165 84 115 0 124 90 112 55 0 122 132 65 67 54]
EDU>> B=[-5 2; 1 1]
EDU>> A*B
EDU>> B*A
EDU>> A.dim
EDU>> size(A)
EDU>> A(1, 1)
EDU>> A(2, 14) = 45
EDU>> B*A
EDU>> char(B*A+64)
@anubiann00b
anubiann00b / Main.scala
Created Dec 2, 2015
Count the number of words in all Word documents in a directory.
View Main.scala
import java.io.{File, FileInputStream, FilenameFilter}
import org.apache.poi.xwpf.extractor.XWPFWordExtractor
import org.apache.poi.xwpf.usermodel.XWPFDocument
object Main {
def main (args: Array[String]) {
println(getCountFromFolder("E:\\SchoolWork\\Running Start"))
}
@anubiann00b
anubiann00b / frequency_estimator.py
Last active Sep 12, 2015 — forked from endolith/frequency_estimator.py
Frequency estimation methods in Python
View frequency_estimator.py
from __future__ import division
from scikits.audiolab import flacread
from numpy.fft import rfft, irfft
from numpy import argmax, sqrt, mean, diff, log
from matplotlib.mlab import find
from scipy.signal import blackmanharris, fftconvolve
from time import time
import sys
from parabolic import parabolic
View Timer.java
public class Timer {
private long startTime = 0;
public void start() {
startTime = System.currentTimeMillis();
}
public long stop() {
return System.currentTimeMillis() - startTime;
View Window.java
import asciiPanel.AsciiPanel;
import game.screens.Screen;
import game.screens.StartScreen;
import java.awt.Color;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import javax.swing.JFrame;
public class Window extends JFrame implements KeyListener {
View finalizer-doc.java
/**
* Invoked when the garbage collector has detected that this instance is no longer reachable.
* The default implementation does nothing, but this method can be overridden to free resources.
*
* <p>Note that objects that override {@code finalize} are significantly more expensive than
* objects that don't. Finalizers may be run a long time after the object is no longer
* reachable, depending on memory pressure, so it's a bad idea to rely on them for cleanup.
* Note also that finalizers are run on a single VM-wide finalizer thread,
* so doing blocking work in a finalizer is a bad idea. A finalizer is usually only necessary
* for a class that has a native peer and needs to call a native method to destroy that peer.
View code.java
private boolean containsEmoji(String string) {
// if you're doing it frequently, move the pattern compile into a static / member variable instead
Pattern p = Pattern.compile("[\\uD83C-\\uDBFF\\uDC00-\\uDFFF]+");
Matcher m = p.matcher(string);
return m.find();
}
You can’t perform that action at this time.