Skip to content

Instantly share code, notes, and snippets.

View rodnaxel's full-sized avatar

Aleksandr Smirnov rodnaxel

  • Finland
View GitHub Profile
@rodnaxel
rodnaxel / SemanticVersion.md
Last active February 22, 2024 14:14
Семантическое Версионирование 2.0.0 http://semver.org/lang/ru/

#Семантическое Версионирование 2.0.0

Кратко

Учитывая номер версии МАЖОРНАЯ.МИНОРНАЯ.ПАТЧ, следует увеличивать:

  • МАЖОРНУЮ версию, когда сделаны обратно несовместимые изменения API.
  • МИНОРНУЮ версию, когда вы добавляете новый функционал, не нарушая обратной совместимости.
  • ПАТЧ-версию, когда вы делаете обратно совместимые исправления.
  • Дополнительные обозначения для предрелизных и билд-метаданных возможны как дополнения к МАЖОРНАЯ.МИНОРНАЯ.ПАТЧ формату.
@rodnaxel
rodnaxel / find_com.py
Last active April 4, 2017 14:05
Find COM in Linux
#! /usr/bin/env python
# coding: utf-8
import sys
import glob
import serial
def serial_ports():
""" Lists serial port names
@rodnaxel
rodnaxel / update-pypackage.py
Created January 16, 2017 06:50
Update all packages in python
import pip
from subprocess import call
for dist in pip.get_installed_distributions():
call("pip install --upgrade " + dist.project_name, shell=True)
@rodnaxel
rodnaxel / setup.py
Created April 3, 2017 07:37
Example setup.py for cx_freeze
from cx_Freeze import setup, Executable
import sys
import os
os.environ['TCL_LIBRARY'] = r'C:\Python36\tcl\tcl8.6'
os.environ['TK_LIBRARY'] = r'C:\Python36\tcl\tk8.6'
#includes = []
include_files = [r"C:\Python36\DLLs\tcl86t.dll", \
@rodnaxel
rodnaxel / server.py
Created July 29, 2017 08:53
This script is used to create simple server on the Python
'''
Simple socket server using threads
'''
import socket
import sys
HOST = '' # Symbolic name, meaning all available interfaces
PORT = 8888 # Arbitrary non-privileged port
@rodnaxel
rodnaxel / interfaces
Last active August 15, 2017 15:08
Configure static ip on the Ubuntu
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
# Static ip
# enx00e04c360554 - name ethernet
auto enx00e04c360554:1
iface enx00e04c360554:1 inet static
address 192.168.0.2
@rodnaxel
rodnaxel / paramiko_demo.py
Created December 22, 2017 17:07
Example Paramiko
import argparse
import paramiko
host = '192.168.1.66'
user = 'pi'
passw = 'raspberry'
port = 22
def create_argparse():
p = argparse.ArgumentParser(description='Remote control Raspberry Pi')
@rodnaxel
rodnaxel / install_kivy.sh
Last active August 18, 2020 20:38
Install Kivy on Ubuntu 18.04 (python 3.6)
apt-get install python3-pip
apt-get install cython3 python3-dev
apt-get install libsdl2-dev libsdl2-ttf-dev libsdl2-image-dev libsdl2-mixer-dev
python3.6 -m pip3 install git+https://github.com/kivy/kivy.git@master
apt-get install python3-kivy-examples
@rodnaxel
rodnaxel / tmux.conf
Last active June 1, 2018 06:26
Tmux config file foe version >2.1
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
@rodnaxel
rodnaxel / .gitignore
Last active June 14, 2018 13:10
Example my test ignore
# Whitelist
!appsettings.json
!appsettings.ini
# Blacklist
# ...folders Pycharm, Visual Studio, Sublime
/.idea
/.ropeproject
/.vscode