Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,6 @@ com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties

atusdata/
# Ignore the data folder ?
guess_lang/data/
.DS_Store
279 changes: 279 additions & 0 deletions Using_guess_lang.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,279 @@
{
"metadata": {
"name": "",
"signature": "sha256:4c467298348c6ff6bcbe571ee98f7c99f30feb8c4bd3e3d7d4f67a4b00a8a79e"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "code",
"collapsed": false,
"input": [
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"import pandas as pd"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 79
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import guess_lang"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 80
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"!python guess_lang"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Extra Trees Random Forest\r\n",
"01 : Clojure \t Correct!\r\n"
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"02 : Clojure \t Correct!\r\n",
"03 : Ruby \t Incorrect: Clojure\r\n"
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"04 : Clojure \t Correct!\r\n",
"05 : Java \t Incorrect: Python\r\n"
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"06 : Python \t Correct!\r\n",
"07 : Ruby \t Incorrect: Python\r\n"
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"08 : Python \t Correct!\r\n"
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"09 : Javascript \t Correct!\r\n",
"10 : Javascript \t Correct!\r\n"
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"11 : Javascript \t Correct!\r\n",
"12 : Javascript \t Correct!\r\n"
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"13 : Ruby \t Correct!\r\n"
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"14 : Ruby \t Correct!\r\n",
"15 : Ruby \t Correct!\r\n"
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"16 : Haskell \t Correct!\r\n",
"17 : Haskell \t Correct!\r\n"
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"18 : Haskell \t Correct!\r\n",
"19 : Scheme \t Correct!\r\n"
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"20 : Scheme \t Correct!\r\n",
"21 : Scheme \t Correct!\r\n"
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"22 : Java \t Correct!\r\n",
"23 : Java \t Correct!\r\n"
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"24 : Scala \t Correct!\r\n",
"25 : Scala \t Correct!\r\n"
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"26 : Tcl \t Correct!\r\n"
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"27 : Tcl \t Correct!\r\n",
"28 : Php \t Correct!\r\n"
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"29 : Php \t Correct!\r\n",
"30 : Php \t Correct!\r\n"
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"31 : Ocaml \t Correct!\r\n",
"32 : Ocaml \t Correct!\r\n",
"Score: 0.90625\r\n"
]
}
],
"prompt_number": 81
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"!python guess_lang other_tests/multi_table.java"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Extra Trees Random Forest\r\n"
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"1 : Java\r\n"
]
}
],
"prompt_number": 85
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"!python guess_lang other_tests/scanner.py"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Extra Trees Random Forest\r\n"
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"1 : Python\r\n"
]
}
],
"prompt_number": 86
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"!python guess_lang other_tests/methods.rb"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Extra Trees Random Forest\r\n"
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"1 : Ruby\r\n"
]
}
],
"prompt_number": 87
},
{
"cell_type": "code",
"collapsed": false,
"input": [],
"language": "python",
"metadata": {},
"outputs": []
}
],
"metadata": {}
}
]
}
Binary file added classifier.data
Binary file not shown.
Binary file added guess_lang/.DS_Store
Binary file not shown.
Empty file added guess_lang/__init__.py
Empty file.
Loading