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
1. Get the dependencies: | |
sudo apt-get update | |
sudo apt-get -y install autoconf automake build-essential libass-dev libfreetype6-dev libtheora-dev libtool libvorbis-dev pkg-config texinfo texi2html zlib1g-dev libmp3lame-dev libx264-dev yasm git sudo apt-get install libopus-dev | |
mkdir ~/ffmpeg_sources | |
2. Get and install libvpx (required to make ffmpeg support .webm format) | |
cd ~/ffpeg_sources |
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
Aliases for .bashrc to find Raspberry. Note: MAC addresses of adaptors are there | |
alias find-pi-wifi="sudo nmap -sP 192.168.1.0/24 | awk '/^Nmap/{ip=\$NF}/00:E0:4D/{print ip}'" | |
alias find-pi="sudo nmap -sP 10.50.0.0/24 | awk '/^Nmap/{ip=\$NF}/B8:27:EB/{print ip}'" |
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 csv | |
from gtts import gTTS | |
from tempfile import TemporaryFile | |
FILE_NAME = '{{input_file_name}}.csv' | |
def main(): | |
with open(FILE_NAME, 'r') as input_file: |
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
sudo apt-get -y install libbz2-dev liblzma-dev libsqlite3-dev libncurses5-dev libgdbm-dev zlib1g-dev libreadline-dev libssl-dev tk-dev build-essential libncursesw5-dev libc6-dev openssl | |
./configure | |
make | |
make test | |
sudo make altinstall |
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
class Account(models.Model): | |
client = models.ForeignKey(Client, related_name='client') | |
transactions = models.ManyToManyField('Transaction') | |
name = models.CharField(max_length=150, unique=True, null=True, blank=True) | |
currency = models.ForeignKey('Currency', related_name='currency') | |
is_usd_account = models.BooleanField(default=False) | |
created = models.DateTimeField(auto_now_add=True) |
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
from gspread.urls import SPREADSHEETS_API_V4_BASE_URL | |
def insert_note(worksheet, label, note): | |
""" | |
Insert note ito the google worksheet for a certain cell. | |
Compatible with gspread. | |
""" | |
spreadsheet_id = worksheet.spreadsheet.id |