Zabawa z HW:
- początki: zębatki - Quercetti 2341
- https://trmm.net/LEDscape - zabawa z ledami
- https://shkspr.mobi/blog/ - roboty, automatyzacja, ...
Programowanie:
| import requests | |
| import jmespath | |
| def main(): | |
| """ | |
| """ | |
| try: | |
| r = requests.get("https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20weather.forecast%20where%20woeid%20in%20(select%20woeid%20from%20geo.places(1)%20where%20text%3D%22nome%2C%20ak%22)&format=json&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys") | |
| except requests.exceptions.RequestException as e: |
| jenkins/.** | |
| jenkins/war/** | |
| jenkins/plugins/** | |
| jenkins/copy_reference_file.log | |
| jenkins/logs/** | |
| jenkins/queue.xml.bak | |
| jenkins/jobs/*/builds | |
| jenkins/jobs/*/workspace | |
| jenkins/credentials.xml | |
| jenkins/plugins.txt |
| /* | |
| # add credentials for cloning git repository over https | |
| export ADMIN_USER=admin | |
| export ADMIN_PASSWORD= | |
| java -jar ./war/WEB-INF/jenkins-cli.jar -s http://127.0.0.1:8080/ groovy \ | |
| --username $ADMIN_USER --password $ADMIN_PASSWORD \ | |
| tools/add_or_update_creds.groovy \ | |
| github-helloworld-username \ | |
| github-helloworld-password \ |
| /* | |
| Umieść w swoim repozytorim teaching-jenkins: | |
| jenkins/tools/create_user.groovy | |
| */ | |
| /* | |
| # create a user | |
| docker exec -i -t jenkins-wsb /bin/bash | |
| cd /var/jenkins_home |
| Co trzeba: | |
| # http://virtualenvwrapper.readthedocs.io/en/latest/install.html | |
| yum install python-pip | |
| pip install virtualenv | |
| pip install virtualenvwrapper | |
| # najlepiej dodać do .bashrc lub .profile | |
| export WORKON_HOME=~/.virtualenvs |
| #cloud-config | |
| package_upgrade: true | |
| packages: | |
| - python-dev | |
| - python-pip | |
| - vim-tiny | |
| - tmux | |
| - libffi-dev # for pyopenssl | |
| - libssl-dev # for pyopenssl | |
| - python-virtualenv |
Zabawa z HW:
Programowanie:
Simplest:
Other:
I use:
Next to check:
| def porownaj_implementacje_sortowania(n) | |
| a = [] | |
| generuj_tablice_N_elementow(a, n) | |
| czas_babelkowego = get_czas_sortowania_babelkowego(a) | |
| czas_quicksort = get_czas_sortowania_quicksort(a) | |
| puts "Numer elementów #{n}, bubble: #{czas_babelkowego}, qs: #{czas_quicksort}" | |
| end | |
| def generuj_tablice_N_elementow(tablica, ilosc_elementow) | |
| (1..ilosc_elementow).each do |i| |