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 / print.js
Last active April 1, 2021 21:18 — forked from blairmacintyre/print.js
Worldedit Minecraft to openscad exporter for 3d printing
importPackage(Packages.com.sk89q.worldedit.blocks);
importPackage(Packages.com.sk89q.worldedit);
//joins up blocks in the dimension dim
function squash(blockarray, dim, sx, sy, sz, arraysize){
var i = new Array();
var dims = new Array();
for (var y = 0; y <= sy; y++){
@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
@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 / 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 / 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 / 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 / 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 / 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 / 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 / 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():