Skip to content

Instantly share code, notes, and snippets.

View sash13's full-sized avatar

Aleksander Ryzhkov sash13

  • Kyiv, Ukraine
  • 06:38 (UTC +03:00)
View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sash13
sash13 / mnt2pickPlace.py
Last active September 7, 2020 14:15
Eagle *.mnt to Pick and Place SMT .txt (Altium, etc) file converter
from texttable import Texttable
import csv
import re
import sys
PP_header = ['Designator', 'Comment', 'Layer', 'Footprint', 'Center-X(mm)', 'Center-Y(mm)', 'Rotation', 'Description']
PP_header_gerbv = ['ref', 'package', 'val', 'pos_x', 'pos_y', 'rot', 'layer'] #https://repo.or.cz/ruwai.git/blob/HEAD:/software/python/kicad_util/rw_pnp_map_from_pos.py#l80
PP_align = ['l'] * len(PP_header)
COMP_NAME = 0
@sash13
sash13 / README
Last active February 27, 2020 13:30
Simple generator for eFLL library
https://blog.zerokol.com/2012/09/arduinofuzzy-fuzzy-library-for-arduino.html
now only support fuzzy system with if ... then ... (without or, and etc).
multiple input and output also supported
Example usage.
1. Open FIS editor in matlab
>> fuzzy
2. Edit your fuzzy system add input outputs and rules
@sash13
sash13 / petition.py
Last active August 28, 2023 18:01
Mining names from petition.president.gov.ua
# -*- coding: utf-8 -*-
from bs4 import BeautifulSoup
import sys
import re
import requests
url_main = 'https://petition.president.gov.ua/petition/{}'
url_json = 'https://petition.president.gov.ua/petition/{}/votes/{}/json'
def get_pages_count(data):
@sash13
sash13 / sdcard.c
Last active April 21, 2019 22:46
Working sdcard.c for dvp2sdcard example
#include "sdcard.h"
#include "sysctl.h"
#include "gpiohs.h"
#include "fpioa.h"
#include "dmac.h"
#include "spi.h"
#include <stdio.h>
#include "gpiohs.h"
/*
@sash13
sash13 / readme
Last active August 30, 2019 15:37
1. Install Python 3
2. pip install -r requirements.txt
3. Dwnload kyivcityapi.py from https://gist.github.com/sash13/7b5a7aef7e99ec2029b818715a7df766
4. Check Api by run with login pass from id.kyivcity
$python kyivcityapi.py login pass
5. Create bot in telegramm channel @BotFather and get token for bot
6. Fill T_TOKEN from your bot and LOGIN and PASS from id.kyivcity.gov.ua
7. Run script
$python t_kyiv_bot.py
8. Send /start and you see in console chad_id. Copy this number in field USER_ID.
@sash13
sash13 / kyivcityapi.py
Last active August 30, 2019 15:33
Login script for id.kyivcity.gov.ua
# -*- coding: utf-8 -*-
#!/usr/bin/env python
import requests
from lxml.html import fromstring
import time
import pickle
import re
import os
@sash13
sash13 / main.py
Created February 21, 2019 01:08
draw fft
from serial import *
from Tkinter import *
serialPort = "/dev/ttyUSB0"
baudRate = 115200
ser = Serial(serialPort , baudRate, timeout=0, writeTimeout=0) #ensure non-blocking
#make a TkInter Window
root = Tk()
root.wm_title("Reading Serial")
@sash13
sash13 / stol.ipynb
Last active February 11, 2019 23:14
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
// ==UserScript==
// @name PidorGameParser
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://konsolech.ga/pidor/*
// @match https://chkktri.club/pidor/*
// @grant none
// ==/UserScript==