Skip to content

Instantly share code, notes, and snippets.

View sash13's full-sized avatar

Aleksander Ryzhkov sash13

  • Kyiv, Ukraine
  • 22:08 (UTC +03:00)
View GitHub Profile
@sash13
sash13 / BLE400.txt
Created February 11, 2016 16:50
BLE400(NRF51822) demo output
*******************************************************************************
淏都錶狟ㄛ垀衄竘褐飲祥迵GND VCC 麼IO傻繚ㄛ笢Pin 9ㄛ11ㄛ26ㄛ27祥統迵傻繚潰聆
眕狟竘褐淏都
0 1 2 3 4 5 6 7 8 12 13 14 15 16 17 23 24 25 28 29 30
眕狟竘褐迵GND傻繚
10 18 19 20 21 22
眕狟竘褐迵IO奪褐傻繚
@sash13
sash13 / NavSpark.ino
Created February 9, 2016 17:12
NavSpark-mini example from forum
uint8_t led = 13;
void setup() {
//GnssConf.init();
// put your setup code here, to run once:
pinMode(led, OUTPUT);
Serial1.config(STGNSS_UART_8BITS_WORD_LENGTH, STGNSS_UART_1STOP_BITS, STGNSS_UART_NOPARITY);
Serial1.begin(115200);
}
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>724</width>
<height>436</height>
@sash13
sash13 / cells.txt
Last active November 4, 2015 18:37
Geolocation service script
+CENG: 0,"0522,27,00,255,06,22,2ab4,05,00,1159,255"
+CENG: 1,"0710,25,30,0bbc,255,06,FFFd"
+CENG: 2,"0706,20,15,0bb1,255,06,FFFd"
+CENG: 3,"0708,17,24,0bb3,255,06,FFFd"
+CENG: 4,"0540,10,59,0bba,255,06,FFFd"
#include "OneWireSlave.h"
// uncomment this line to enable sending messages along with errors (but takes more program memory)
//#define ERROR_MESSAGES
#ifdef ERROR_MESSAGES
#define ERROR(msg) error_(msg)
#else
#define ERROR(msg) error_(0)
#endif
@sash13
sash13 / main.py
Last active April 17, 2025 02:36
control Sony bravia tv set
# info from https://github.com/shabunin/cf-sonytv/blob/master/scripts/SonyTV.js
#https://wolstenhol.me/blog/using-tasker-autovoice-yatse-and-xbmc
#http://mendelonline.be/sony/sony.txt
#https://github.com/breunigs/bravia-auth-and-remote/blob/master/send_command.sh
from wakeonlan import wol
import requests, requests.utils, pickle
import base64
import sys
import os.path
@sash13
sash13 / cycloid.m
Last active September 13, 2015 13:41
%% Matlabe example
%%Animated cycloid curve
teta1 = 0:1:120/3-2;
a=0:0.01:2*pi;
ca=0:0.01:2*pi;
%first frame
R=10;
al = (pi/3+pi/20);
import pprint
TAB = '\t'
class LazyTree(object):
def __init__(self):
self.index = 0
self.types = {}
self.path = []
self.temp_path = []
def __getattr__(self, n):
@sash13
sash13 / main.py
Last active August 29, 2015 14:27
import Tkinter as tk
import math
import time
FILE = 'map.txt'
WIDTH = 400
HEIGHT = 400
BDIV = 80
BWIDTH = int(WIDTH/BDIV)
data = read_mixed_csv('tube19.csv', ',');
dt = datenum(strcat(data(:,1), {' '}, data(:,2)), 'dd.mm.yyyy HH:MM');
M = [dt str2double(data(:,3))];
plot(M(:,1), M(:,2))
NumTicks = 10;
L = get(gca,'XLim');
set(gca,'XTick',linspace(L(1),L(2),NumTicks))
datetick('x',19,'keeplimits', 'keepticks')
% use this: minX = datenum(2009, 12, 31) for scale