Skip to content

Instantly share code, notes, and snippets.

@terry2012
terry2012 / install-oracle-java-8-on-ubuntu.md
Created March 19, 2019 11:34 — forked from alexislucena/install-oracle-java-8-on-ubuntu.md
Ubuntu: Install Oracle Java 8 on Ubuntu 16.04 via PPA

Add the PPA

 $ sudo add-apt-repository ppa:webupd8team/java

Update and install the installer script

$ sudo apt update
$ sudo apt install oracle-java8-installer

Set Java environment variables and Oracle JDK8 as default

@terry2012
terry2012 / gae_workaround.py
Created January 4, 2017 08:27 — forked from obmarg/gae_workaround.py
Google app engine python issue #7746 workaround
from toolz import concat
def page_iterator(query, page_size=999, **kwargs):
'''
Returns an iterator over pages of a query.
Can be used to work-around the 1000 entity limit in remote_api_shell
:params query: The query we're using.
:params page_size: The page size to return.
:params qwargs: Additional options for fetch_page
@terry2012
terry2012 / import_backup.py
Created June 13, 2016 09:45 — forked from jehna/import_backup.py
App Engine import data from Datastore Backup to localhost
"""
# App Engine import data from Datastore Backup to localhost
You can use this script to import large(ish) App Engine Datastore backups to your localohst dev server.
## Getting backup files
Follow instructions from Greg Bayer's awesome article to fetch the App Engine backups:
http://gbayer.com/big-data/app-engine-datastore-how-to-efficiently-export-your-data/
@terry2012
terry2012 / tf_idf_final.py
Created February 13, 2016 06:44 — forked from marcelcaraciolo/tf_idf_final.py
tf-idf example
#-*- coding: utf-8 -*-
import re
import nltk
from nltk.tokenize import RegexpTokenizer
from nltk import bigrams, trigrams
import math
stopwords = nltk.corpus.stopwords.words('portuguese')
package com.nexus5.dos;
import android.content.Intent;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
public class MainActivity extends ActionBarActivity {
@terry2012
terry2012 / gist:3262659
Created August 5, 2012 07:40 — forked from anonymous/gist:887998
Compiling tdroid-2.1_r2.1p for emulator
% mkdir -p ~/tdroid/tdroid-2.1_r2.1p
% cd ~/tdroid/tdroid-2.1_r2.1p
% repo init -u git://android.git.kernel.org/platform/manifest.git -b android-2.1_r2.1p
% repo sync
... wait
% . ./build/envsetup.sh
% lunch 1
% make -j4
... wait