Skip to content

Instantly share code, notes, and snippets.

View ektor5's full-sized avatar

Ettore Chimenti ektor5

View GitHub Profile
@ektor5
ektor5 / port.sh
Last active August 1, 2019 14:13
#!/bin/bash
set -e
FROM="git@gitlab.com:Seco_IoT/"
TO="https://git.seco.com/iot/"
for i in $*
do
echo $i
#!/usr/bin/python3
from math import *
from matplotlib.pyplot import (show, bar)
def distance(c,v):
d = 0
for i,j in zip(c,v):
d += pow(i - j, 2)
@ektor5
ektor5 / encodecoder.py
Last active February 18, 2019 11:43
kau_mw_es2
#!/bin/python
def apply (s):
# store input bits
b1 = s >> 2 & 0b1
b2 = s >> 1 & 0b1
b3 = s & 0b1
# process output bits
n1 = b1
// NeoPixel simple sketch per Stefania Granai (c) 2019 Ettore Chimenti
// released under the GPLv3 license
#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include <avr/power.h>
#endif
#define PIN 6
#define BUTTON 3
#!/bin/bash
ITER=25
for j in 1 2 4 8 16
do
for i in $(seq $ITER)
do
echo $i
./a.out $j
done | awk -v iter=$ITER \
./a.out 10 | awk 'START {a = } ; {if ( a > ) print a ERROR ; a = ; } ;'
/*
* Copyright Sandro Bartolini, 2018
* Copyright Ettore Chimenti, 2018
* Copyright Bridget, 2018
*
*/
#include <cstdlib>
#include <iostream>
#include <stdio.h>
/*
* =====================================================================================
*
* Filename: dass_brt_bn.cpp
*
* Description: BN with vector
*
* Version: 1.0
* Created: 10/25/2018 05:12:33 PM
* Revision: none
/*
* =====================================================================================
*
* Filename: bn.cpp
*
* Description: Big number handler
*
* Version: 1.0
* Created: 10/18/2018 03:37:16 PM
* Revision: none
@ektor5
ektor5 / README.md
Last active August 30, 2017 10:50
secocec readme

CEC Linux Driver for SECO X86 Boards

Sources for SECO CEC Driver. Based on Linux CEC Framework.

Compatible with:

  • UDOO X86 (all versions)

Compile