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
| touch `date +"%Y.%m.%d.md"` |
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
| workspaceparent="$HOME" | |
| # needs to be run after cortobootstrap.sh | |
| cd "$workspaceparent/cortoproject" | |
| git clone https://github.com/cortoproject/python-binding | |
| cd python-binding | |
| # virtual environment | |
| python3 -m venv --without-pip env | |
| source env/bin/activate | |
| curl https://bootstrap.pypa.io/get-pip.py | python |
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
| # I use this script in cloud9 | |
| /usr/bin/python3 -m venv --without-pip env | |
| source env/bin/activate | |
| curl https://bootstrap.pypa.io/get-pip.py | python | |
| deactivate | |
| source env/bin/activate |
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
| workspaceparent="$HOME" | |
| cd $workspaceparent | |
| mkdir cortoproject | |
| cd cortoproject | |
| git clone https://github.com/cortoproject/corto | |
| git clone https://github.com/cortoproject/c-binding | |
| git clone https://github.com/cortoproject/xml | |
| git clone https://github.com/cortoproject/corto-language | |
| git clone https://github.com/cortoproject/io |
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
| def respond_to? method_sym, include_private = false | |
| if @a.has_key? method_sym | |
| true | |
| else | |
| super method_sym, include_private | |
| end | |
| end | |
| def method_missing method_sym, *arguments, &block | |
| if @a.has_key? method_sym |
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
| Sub RepeatExperiment() | |
| ' | |
| ' RepeatExperiment Macro | |
| ' | |
| ' | |
| For i=0 To 40 | |
| Sheets("Simulación").Select | |
| Sheets("Simulación").Copy After:=Sheets(Sheets.Count) | |
| Range("B2").Select |
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
| class Node | |
| def distance_to cluster | |
| self.reduce(nil) do |min, i| | |
| cluster.reduce(min) do |min, j| | |
| d = i.distance_to j | |
| min = if min.nil? or min > d then d else min end | |
| end | |
| end | |
| end | |
| end |
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
Show hidden characters
| { | |
| "font_size": 12, | |
| "ignored_packages": | |
| [ | |
| "Vintage" | |
| ], | |
| "translate_tabs_to_spaces": true, | |
| "rulers": [80], | |
| "remember_open_files": false, | |
| "hot_exit": false, |
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
| unsigned int fibonacci(unsigned int n) { | |
| if (n > 2) { | |
| unsigned int a = 1, b = 1; | |
| while (n-- > 2) { | |
| b = a + b; | |
| a = b - a; | |
| } | |
| return b; | |
| } else if (n) { | |
| return 1; |
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
| # settings.py | |
| APPEND_SLASH = True | |
| # projectname/urls.py | |
| from django.conf.urls import include | |
| from django.conf.urls import patterns | |
| from django.conf.urls import url |