Skip to content

Instantly share code, notes, and snippets.

View format37's full-sized avatar
💭
Exploring AGI

Alexey Yurasov format37

💭
Exploring AGI
  • Georgia
View GitHub Profile
@format37
format37 / readme.md
Last active June 27, 2021 09:57
librealsense build from source arm

Building From Source

Ubuntu 14.04/16.04 LTS

  1. Ensure apt-get is up to date
  • sudo apt-get update && sudo apt-get upgrade
  • Note: Use sudo apt-get dist-upgrade, instead of sudo apt-get upgrade, in case you have an older Ubuntu 14.04 version
  1. Install Python and its development files via apt-get (Python 2 and 3 both work)
  • sudo apt-get install python python-dev or sudo apt-get install python3 python3-dev
  • Note: The project will only use Python 2 if it can't use Python 3
  1. Run the top level CMake command with the following additional flag -DBUILD_PYTHON_BINDINGS:bool=true:
@format37
format37 / epub_word_counter.py
Created March 10, 2021 18:52
epub word counter
# Thanks to https://github.com/aerkalov/ebooklib
#!pip install EbookLib
import ebooklib
from ebooklib import epub
from bs4 import BeautifulSoup
from collections import Counter
book = epub.read_epub('ready_player_two.epub')
content = ''
for item in book.get_items():
@format37
format37 / README.md
Last active November 22, 2022 09:44
Linux shell samples

Linux shell samples

Useful linux shell commands and scripts

Github repository address

git remote -v | grep fetch

Invert display colors

sudo apt install xcalib
xcalib -invert -alter
@format37
format37 / gran.tf
Last active January 31, 2021 10:38
tensorflow gpu object detection isntallation
# to serve tf 1.0 - depended scripts, create alternative environment, and swith to them while needed
conda create --name grantf
conda activate grantf
conda install tensorflow==1.13.1=mkl* -y
conda install pandas -y
conda install -c anaconda pillow -y
conda install -c conda-forge tf_object_detection -y
@format37
format37 / client.py
Last active November 4, 2020 13:40
python aiohttp post send and receive file
import requests
url = 'http://SERVER_ADDRESS:PORT/sendfile'
files = {'file': open('data.txt', 'r').read()}
requests.post(url, data=files)
@format37
format37 / kivy_install.sh
Created October 28, 2020 21:05
kivy buildozer anaconda env initialization
conda create --name kivy
conda activate kivy
conda install -c conda-forge kivy
conda install -c travis buildozer
buildozer init
buildozer android debug deploy run
@format37
format37 / systemd.install
Last active November 25, 2020 17:53
Ubuntu systemd service boot install
sudo nano /etc/systemd/system/rover_server.service
[Unit]
Description=telegram rover server
[Service]
WorkingDirectory=/home/pi/telegram_rover/
Type=simple
@format37
format37 / mysql_backup.txt
Last active January 19, 2021 17:11
msql backup
mysqldump -u USER -p PASSWORD DATABASE > dump.sql
mysql
create database DATABASE;
mysql -u USER -p PASSWORD DATABASE < dump.sql
@format37
format37 / lamp_letsencrypt.txt
Last active March 1, 2021 12:05
lamp letsencrypt
## LAMP install
sudo apt install tasksel
sudo tasksel install lamp-server
## Enable the universe repository
sudo apt-get update
sudo apt-get install software-properties-common
sudo add-apt-repository universe
sudo apt-get update
@format37
format37 / deploy_key.txt
Created June 3, 2020 14:22
git deploy key using
ssh-keygen -t rsa -b 4096 -C "format37@gmail.com"
/home/alex/.ssh/id_rsa_REPO_NAME
cat /home/alex/.ssh/id_rsa_REPO_NAME.pub
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_rsa_REPO_NAME