Skip to content

Instantly share code, notes, and snippets.

Avatar
🦉
the owls are not what they seem

Titus Soporan tsoporan

🦉
the owls are not what they seem
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am tsoporan on github.
  • I am tsoporan (https://keybase.io/tsoporan) on keybase.
  • I have a public key whose fingerprint is BFF6 620C 89B1 F3A7 4BFB 0080 59D0 3D53 2467 C916

To claim this, I am signing this object:

@tsoporan
tsoporan / arch-linux.md
Last active Apr 12, 2020
Install Arch Linux w/ Btrfs subvolumes and dm-crypt
View arch-linux.md

Dell XPS 9360 only

  • Enter BIOS with F2 and configure:
  • "System Configuration" > "SATA Operation": "AHCI"
  • "Secure Boot" > "Secure Boot Enable": "Disabled"

Install Guide

Enter boot menu with F12, and boot the Arch USB medium

Set desired keymap

View keybase.md

Keybase proof

I hereby claim:

  • I am tsoporan on github.
  • I am tsoporan (https://keybase.io/tsoporan) on keybase.
  • I have a public key whose fingerprint is 2E39 C429 B8F1 D981 580D 6F93 FD72 DF01 B567 0D34

To claim this, I am signing this object:

@tsoporan
tsoporan / gist:2764350
Created May 21, 2012
Twitter Access Token /w Flask & Rauth
View gist:2764350
from flask import Flask, request, redirect, url_for
from rauth.service import OAuth1Service
twitter = OAuth1Service(
name='twitter',
consumer_key='TWITTER KEY',
consumer_secret='TWITTER SECRET',
request_token_url = 'https://api.twitter.com/oauth/request_token',
access_token_url = 'https://api.twitter.com/oauth/access_token',
authorize_url = 'https://api.twitter.com/oauth/authorize',
@tsoporan
tsoporan / manual_nltk_bayes_classify.py
Created Oct 6, 2011 — forked from lrvick/manual_nltk_bayes_classify.py
Manually train an NLTK NaiveBayes Classifier
View manual_nltk_bayes_classify.py
from nltk.probability import DictionaryProbDist, ELEProbDist, FreqDist
from nltk import NaiveBayesClassifier
from nltk import FreqDist, ConditionalFreqDist
from nltk import BigramAssocMeasures
from collections import defaultdict
train_samples = {
'I hate you and you are a bad person': 'neg',
'I love you and you are a good person': 'pos',
'I fail at everything and I want to kill people' : 'neg',
@tsoporan
tsoporan / manual_nltk_bayes_classify.py
Created Oct 6, 2011 — forked from lrvick/manual_nltk_bayes_classify.py
Manually train an NLTK NaiveBayes Classifier
View manual_nltk_bayes_classify.py
from nltk.probability import DictionaryProbDist
from nltk import NaiveBayesClassifier
from nltk import FreqDist, ConditionalFreqDist
from nltk import BigramAssocMeasures
train_samples = {
'I hate you and you are a bad person': 'neg',
'I love you and you are a good person': 'pos',
'I fail at everything and I want to kill people' : 'neg',
'I win at everything and I want to love people' : 'pos',
@tsoporan
tsoporan / manual_nltk_bayes_classify.py
Created Oct 6, 2011 — forked from lrvick/manual_nltk_bayes_classify.py
Manually train an NLTK NaiveBayes Classifier
View manual_nltk_bayes_classify.py
from nltk.probability import DictionaryProbDist
from nltk import NaiveBayesClassifier
from nltk import FreqDist, ConditionalFreqDist
from nltk import BigramAssocMeasures
train_samples = {
'I hate you and you are a bad person': 'neg',
'I love you and you are a good person': 'pos',
'I fail at everything and I want to kill people' : 'neg',
'I win at everything and I want to love people' : 'pos',
@tsoporan
tsoporan / results.py
Created Jun 23, 2011 — forked from lrvick/results.py
Get async celery results from nested subtasks as they complete
View results.py
from tasks import task1
def get_results(queries):
query_procs = task1.delay(queries).get()
tasks = []
for query_proc in query_procs:
tasks.extend(query_proc.subtasks)
while tasks:
current_task = tasks.pop(0)
View utf8-webtitles.py
import urllib2,re
def url_title(url,**kwargs):
request = urllib2.Request(url)
try:
data = urllib2.urlopen(request)
except urllib2.HTTPError:
data = None
except urllib2.URLError:
data = None