This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:14.04 | |
RUN echo "Hello from docker" > index.html | |
RUN sudo apt-get install python3 | |
RUN python3 -m http.server 80 | |
EXPOSE 80 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ -z "$1" ] | |
then | |
echo "usage: $0 <git repository path>" | |
else | |
touch report_$USER.txt | |
echo "This will take a while..." | |
echo "Learning with 5 commits" | |
schwa $1 --commits 5 -l >> report_$USER.txt | |
echo "Learning with 50 commits" | |
schwa $1 --commits 50 -l >> report_$USER.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:14.04 | |
# Install Java | |
RUN apt-get install software-properties-common -y | |
RUN \ | |
echo oracle-java7-installer shared/accepted-oracle-license-v1-1 select true | debconf-set-selections && \ | |
add-apt-repository -y ppa:webupd8team/java && \ | |
apt-get update && \ | |
apt-get install -y oracle-java7-installer && \ | |
rm -rf /var/lib/apt/lists/* && \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:note="http://fe.up.pt/technical-note"> | |
<rdf:Description rdf:about="http://goo.gl/0iY8qx"> | |
<note:title>Linked Data com JSON</note:title> | |
<note:author>André Freitas</note:author> | |
<note:theme>21</note:theme> | |
<note:link>http://json-ld.org/</note:link> | |
<note:email>[email protected]</note:email> | |
</rdf:Description> | |
</rdf:RDF> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hercules:~ andre$ rails new app | |
create | |
create README.rdoc | |
create Rakefile | |
create config.ru | |
create .gitignore | |
create Gemfile | |
create app | |
create app/assets/javascripts/application.js | |
create app/assets/stylesheets/application.css |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Example of a strategy pattern | |
* We implement different behaviours for a robot | |
*/ | |
class Robot { | |
Behaviour behaviour; | |
Robot(this.behaviour); | |
move() => print(behaviour.move()); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Olá mundo</title> | |
<meta charset="UTF-8"> | |
</head> | |
<body> | |
Olá mundo | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Teaching a neural network to do the XOR binary operator | |
Artificial Intelligence - FEUP | |
""" | |
from pybrain.tools.shortcuts import buildNetwork | |
from pybrain.datasets import SupervisedDataSet | |
from pybrain.supervised.trainers import BackpropTrainer | |
from pybrain import TanhLayer | |
""" Builds the network """ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Using Maps to have constant time complexity to access data | |
% See more at http://www.mathworks.com/help/matlab/map-containers.html | |
% Example here http://stackoverflow.com/questions/3591942/hash-tables-in-matlab | |
% Let's supose we have the following information: | |
table =[ [1 , 1 , 1 , 0.444 , 0.67 , 0.98]; | |
[1 , 1 , 2 , 0.254 , 0.67 , 0.98] | |
]; | |
% So to store them in an efficient way |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from PyQt4.QtGui import QApplication | |
from PyQt4.QtDeclarative import QDeclarativeView | |
from PyQt4.QtCore import QUrl | |
app = QApplication(sys.argv) | |
view = QDeclarativeView() | |
view.setSource(QUrl('hello.qml')) | |
view.show() | |
view.setWindowTitle("Hello World") |