Skip to content

Instantly share code, notes, and snippets.

@sebinthomas
sebinthomas / martingale.py
Created May 12, 2019 13:37
Martingale betting
# user/bin/env python
import random
# used for a dumb function to get random number
import time
USE_SYSRAND = True
ODDS = 1
FIRST_BET = 1
# -*- coding: utf-8 -*-
# Send movie plots: Sebin Thomas http://sebin.in
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
@sebinthomas
sebinthomas / bluebag.py
Created July 29, 2012 08:28
Commandline tool to submit links to Bluebag
#!usr/bin/env python
# A commandline tool to add links to Bluebag
# Usage: Fill the username and password sections of tge script with your username and password.
# In the command line type python bluebag.py LINK , where LINK is the link you want to bookmark.
# Eg: python bluebag.py http://sebin.in
#-----------------------------------------------------------------------------------------------------
# Made By Sebin Thomas. http://sebin.in
# Under the MIT license.
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
@sebinthomas
sebinthomas / bitmash.py
Created June 30, 2012 07:13
Commandline Spectrograph-ish bar
#!usr/bin/env python
# -*- coding: utf-8 -*-
# command line spectrograph : Sebin Thomas http://sebin.in
# inspired by Zach Holman's spark https://github.com/holman/spark
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
@sebinthomas
sebinthomas / recipe.js
Created June 6, 2012 09:47
An on{x} Recipe to open a link in a text message
// Code searches for a link in a message and opens it in the browser
// Made by Sebin Thomas . http://sebin.in
var link= /[-a-zA-Z0-9@:%_\+.~#?&//=]{2,256}\.[a-z]{2,4}\b(\/[-a-zA-Z0-9@:%_\+.~#?&//=]*)?/gi;
device.messaging.on('smsReceived', function (message) {
var response=link.exec(message.data.body.toLowerCase());
if (response){console.log(response[0]+" is the link");device.browser.launch(response[0]);}
},function(error){if(err){console.log(err);}}
);
@sebinthomas
sebinthomas / braintoc.py
Created September 4, 2011 06:22
Brainfuck to c Converter in python
#!/usr/bin/env python
# Brainfuck to C parser
# a quick hack by sebin thomas
# feel free to poke around
# have not actually tested with anything
# Usage . python braintoc.py "<brainfuck code>"
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@sebinthomas
sebinthomas / sendgmail.py
Created July 17, 2011 07:43
Python script to send all the python files in the current directory as mail to oneself
#!usr/bin/env python
# Python script to send the .py files in a directory as a mail to ourselves
# By Sebin thomas. sebinthomas.tumblr.com
# You use this script under your own risk
# Author is not responsible for any harm occured to you with the usage of this script
# Under the GNU/GPL licence
import glob
import smtplib
from getpass import getpass
@sebinthomas
sebinthomas / poke.py
Created May 16, 2011 19:51
Python Script to Poke Friends on Facebook who have poked you
#!usr/bin/env/ python
# Python Script to automatically Poke people on facebook
# By Sebin Thomas
# USE AT YOUR OWN RISK
# It was written in a Hurry so no error handling whatsoever and there may be a zillion Bugs
# And it's not Safe
# THOSE WHO USE THIS CODE ARE DOING SO IN THEIR OWN RISK AND THE AUTHOR
# IS NOT ACCOUNTABLE FOR ANY DAMAGE WHATSOEVER
# Usage : poke.py Username password
import urllib2