Skip to content

Instantly share code, notes, and snippets.

View samkeeleyong's full-sized avatar

samkeeleyong

View GitHub Profile
from lxml import html
import requests
import threading
import subprocess
def sendmessage(message):
subprocess.Popen(['notify-send', message])
return
def printit():
# grab files from http://music.forunesia.com/2015/05/love-live-school-idol-project-complete.html?m=1
import requests
from lxml import html
from clint.textui import progress
import urllib
def mainProcess():
response = requests.get('http://music.forunesia.com/2015/05/love-live-school-idol-project-complete.html?m=1')
.data
format_str: .asciiz "N(%i): %i\n"
fs_addr: .space 4
s1_addr: .space 4
s2_addr: .space 4
.code
DADDIU $t1, R0, #14
var cardNumber = 93;
if (allCardsMapping[cardNumber] != undefined) {
var randomNumber = Math.floor(Math.random() * (allCardsMapping[cardNumber].length - 0 + 1)) + 0;
var fileName = allCardsMapping[cardNumber][randomNumber];
var audioFileUrl = "https://icebluenoshunkan.kirara.ca/va2/" + fileName + ".mp3";
new Audio(audioFileUrl).play();
}
@samkeeleyong
samkeeleyong / PrimeAssignment.java
Last active August 31, 2015 10:14
MSCS-OS-assignment1
import java.util.*;
import java.lang.IllegalStateException;
/**
* @author Sam Ong
*
*/
public class PrimeAssignment {
static boolean IS_COMPOSITE = false;

Robot Framework on Windows

If you are not on windows, you can go directly to the Installation section

Install its dependencies:

Python

Download the latest installer and run it. The latest python distribution already has pip.

Environment variables

You will need to setup python and pip to be environment variables to run python or pip on cmd.

@samkeeleyong
samkeeleyong / fb-search-status.py
Created July 18, 2015 16:46
Find a Facebook post from a long long time ago. (May not be efficient, but does the job. ;D )
import requests
my_user_id = "123456789012345"
keyword = " ara "
url = "https://graph.facebook.com/" + my_user_id + "/feed"
params = dict(
access_token = "ADD_REALLY_LONG_ACCESS_TOKEN_HERE"
fields = "id,message"
)