This file contains 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 age_to_year(age): | |
year = 2021 + 100 - int(age) | |
return year | |
name = str(input("name?")) | |
age = int(input("age?")) | |
multiplier = int(input("How many times?")) | |
for multiply in range(multiplier): | |
print(name + " will turn 100 years old in " + str(age_to_year(age))) |
This file contains 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
–ctrl a c -> create new window | |
–ctrl a A -> set window name | |
–ctrl a w -> show all window | |
–ctrl a 1|2|3|… -> switch to window n | |
–ctrl a ” -> choose window | |
–ctrl a ctrl a -> switch between window | |
–ctrl a d -> detach window | |
–ctrl a ? -> help | |
–ctrl a [ -> start copy, move cursor to the copy location, press ENTER, select the chars, press ENTER to copy the selected characters to the buffer | |
–ctrl a ] -> paste from buffer |
Obtained from naomi.fridman
- Miniconda bach download
- '$ bash Miniconda3-latest-Linux-x86_64.sh'
- '$ sudo apt update'
This file contains 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 numpy as np | |
class_1 = np.array([[4,1],[2,4],[2,3],[3,6],[4,4]], dtype=np.float64) | |
class_2 = np.array([[9,10],[6,8],[9,5],[8,7],[10,8]], dtype=np.float64) | |
m_1, m_2, s_1, s_2, s_w = ([] for i in range(5)) | |
m_1 = np.append(m_1, np.sum(class_1, axis=0)/len(class_1), axis=0) | |
m_2 = np.append(m_2, np.sum(class_2, axis=0)/len(class_2), axis=0) | |
print("m_1:", m_1, "\nm_2:", m_2) |
Still under construction
- Download from Official Ubuntu website or (Ubuntu Pi Flavour Maker)[https://ubuntu-pi-flavour-maker.org/download/]
- Flash to SD card.
- If downloaded from Official website, follow instructions before inserting sd card and booting.
- Plug Raspberry Pi in, SSH using
ssh ubuntu@ip-address-here
with passwordubuntu
, change password. - Change username. Instructions here
sudo adduser myUserName
,sudo usermod -aG sudo myUserName
&&sudo userdel ubuntu
ref - Setup locale by editing .bashrc
(Obtained from Pearson IT Certification){http://www.pearsonitcertification.com/articles/article.aspx?p=1868080}
FTP - TCP - 20/21
SSH - TCP - 22
Telnet - TCP - 23 - (Unsecure)
SMTP (Simple Mail Transfer Protocol) - TCP - 25
DNS - TCP/UDP - 53
This file contains 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
upstream app_name { | |
server unix:///home/deploy/app_name/shared/pids/unicorn.sock; | |
} | |
server { | |
listen 80; | |
server_name example.com; | |
root /home/deploy/app_name/current/public; |
sleep 1500 && gedit -b; sleep 60 && killall gedit
sleep 1500 && notify-send break
sleep 1500 && osascript -e "display notification "Break time. Remember not to do anything related to the project and just relax" with title "Pomodoro""