Skip to content

Instantly share code, notes, and snippets.

🕳
some

Alexander Wong awwong1

🕳
some
Block or report user

Report or block awwong1

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
View moroccanLentilStew
# Moroccan Lentil Stew
#recipe/vegetarian #recipe/vegan #recipe/dinner
Feeds 4
### Ingredients
* 1 C (125g)Yellow Onion medium dice
* 1 3/4 tsp Cinnamon ground
* 1 tsp Cumin ground
@awwong1
awwong1 / gpu_setup.md
Last active Apr 10, 2019
Patience Deep Learning Setup
View gpu_setup.md

Patience Deep Learning Setup

  • Ubuntu 18.04.2
  • NVIDIA Titan Xp
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.2 LTS
@awwong1
awwong1 / gpu_setup.md
Created Apr 2, 2019 — forked from statsmaths/gpu_setup.md
Setting up Nvidia Titan X on Ubuntu 17.10
View gpu_setup.md

Deep Learning Set-up

Here, I am documenting the steps I took to get my GPU set up. I do not expect these to be interesting to anyone else, but am making them public in case they may help anyone. Note that I did not start with a cold system, so these notes are likely incomplete. Summary of the fully installed system:

  • OS: Ubuntu 17.10
  • Card: TITAN Xp (memory: 12 GB)
  • Driver: nvidia-387/artful (387.34-0ubuntu0~gpu17.10.2)
View keybase.md

Keybase proof

I hereby claim:

  • I am awwong1 on github.
  • I am udia (https://keybase.io/udia) on keybase.
  • I have a public key ASC5z46xiO_qIts1_JlSVip9wf_RI54bxkYjTL8NimwdcAo

To claim this, I am signing this object:

View insyn_output.txt
---- SUMMARY OF CHANGES ----
tokenized ../google-auth-library-java/credentials/javatests/com/google/auth/SigningExceptionTest.java, performed MOD EXTENDS at 88
tokenized ../google-auth-library-java/credentials/java/com/google/auth/ServiceAccountSigner.java, performed MOD SEMI at 86
tokenized ../google-auth-library-java/credentials/java/com/google/auth/Credentials.java, performed MOD ENUM at 56
tokenized ../google-auth-library-java/credentials/java/com/google/auth/RequestMetadataCallback.java, performed MOD LTLTEQ at 6
tokenized ../google-auth-library-java/oauth2_http/javatests/com/google/auth/TestClock.java, performed MOD STAR at 37
tokenized ../google-auth-library-java/oauth2_http/javatests/com/google/auth/TestUtils.java, performed MOD BARBAR at 21
tokenized ../google-auth-library-java/oauth2_http/javatests/com/google/auth/http/HttpCredentialsAdapterTest.java, performed ADD PLUSPLUS at 251
tokenized ../google-auth-library-java/oauth2_http/javatests/com/google/auth/oauth2/MockMetadataServerTransport.java, pe
View LabelTrainedJavaTokenHMM.1.json
This file has been truncated, but you can view the full file.
{
"class" : "HiddenMarkovModel",
"name" : "LabelTrainedJaveTokenHMM",
"start" : {
"class" : "State",
"distribution" : null,
"name" : "LabelTrainedJaveTokenHMM-start",
"weight" : 1.0
},
View _smoketest.py
from model.hmm_pom import Trained10StateHMM, Trained100StateHMM
from model.ngram import KenLM10Gram
from analyze.parser import SourceCodeParser
TEST_SRC = """
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, world!");
}
}
View gist:5f4f4420229810ef05734f57c439ce78
$ ./insyn.py --test-atn-hmm-model expMultinomialHMM(algorithm='viterbi', init_params='ste', n_components=1133,
n_iter=10, params='ste', random_state=None,
startprob_prior=array([1., 0., ..., 0., 0.]), tol=0.01,
transmat_prior=array([[0., 1., ..., 0., 0.],
[0., 0., ..., 0., 0.],
...,
[0., 0., ..., 0., 0.],
[0., 0., ..., 0., 0.]]),
verbose=True)
idx: 1/44 score: -2.639058036757866
View insyn fix output.txt
$ ./insyn.py --log info --test-ngram-model example/HelloWorld.java
Loading the LM will be faster if you build a binary file.
Reading /home/alexander/sandbox/src/github.com/awwong1/cmput563_insyn/model/java-tokenstr-10grams.arpa
----5---10---15---20---25---30---35---40---45---50---55---60---65---70---75---80---85---90---95--100
****************************************************************************************************
PUBLIC CLASS IDENTIFIER LBRACE PUBLIC STATIC VOID IDENTIFIER LPAREN IDENTIFIER LBRACKET RBRACKET IDENTIFIER RPAREN LBRACE IF LPAREN TRUE RPAREN LBRACE IDENTIFIER DOT IDENTIFIER DOT IDENTIFIER LPAREN STRINGLITERAL RPAREN SEMI RBRACE RBRACE RBRACE EOF
example/HelloWorld.java: MOD from LBRACE to INTLITERAL at 3
INFO:analyze.ngram_tester:suggest MOD INTLITERAL into LBRACE at 3 (score: -12.189971923828125)
INFO:analyze.ngram_tester:suggest DEL INTLITERAL at 3 (score: -21.153898239135742)
INFO:analyze.ngram_tester:suggest MOD INTLITERAL into LPAREN at 3 (score: -21.760189056396484)
View hhmm output
$ ./model/HHMM.py
./model/HHMM.py:111: RuntimeWarning: invalid value encountered in true_divide
PI[col, row, :] = np.nan_to_num(PI[col, row, :] / np.sum(PI[col, row, :]))
./model/HHMM.py:110: RuntimeWarning: invalid value encountered in true_divide
A[col, row, :] = np.nan_to_num(A[col, row, :] / np.sum(A[col, row, :]))
Training iteration 0
./model/HHMM.py:157: RuntimeWarning: invalid value encountered in true_divide
ergPIVis[col, row, :] = np.nan_to_num(ergPI[col, row, :] / np.sum(ergPI[col, row, :]))
./model/HHMM.py:156: RuntimeWarning: invalid value encountered in true_divide
ergAVis[col, row, :] = np.nan_to_num(ergA[col, row, :] / np.sum(ergA[col, row, :]))
You can’t perform that action at this time.