Skip to content

Instantly share code, notes, and snippets.

View 4rzael's full-sized avatar

4rzael 4rzael

  • Bordeaux, France
View GitHub Profile
@4rzael
4rzael / anti_gray.py
Last active August 11, 2017 16:29
A simple Anti-Gray Code (And Gray Code too) generator in python 3.6+
#!/usr/bin/env python3
from functools import lru_cache
@lru_cache(maxsize=None)
def compute_gray_code(bits:int) -> list:
if bits is 1:
return [0, 1]
else:
smaller = compute_gray_code(bits - 1)
@4rzael
4rzael / install-crazyflie-osc.bat
Last active May 24, 2018 12:00
An installer for crazyflie-osc on windows
@ECHO OFF
REM ----[ This code block detects if the script is being running with admin PRIVILEGES If it isn't it pauses and then quits]-------
NET SESSION >nul 2>&1
IF %ERRORLEVEL% EQU 0 (
ECHO.
) ELSE (
ECHO 
ECHO ######## ######## ######## ####### ########
ECHO ## ## ## ## ## ## ## ## ##
@4rzael
4rzael / table.html
Created November 8, 2017 22:04
data-table-bug
<td-data-table
#dataTable
[data]="filteredData"
[columns]="getAllColumns()"
[selectable]="selectable"
[clickable]="clickable"
[multiple]="multiple"
[(ngModel)]="selectedRows"
[sortable]="sortable"
[sortBy]="sortBy"
@4rzael
4rzael / run.bat
Created May 27, 2018 09:43
testing crazyfile-osc run.bat
@ECHO off
set /p ip="IP : (default=0.0.0.0) :"
set /p metaport="META PORT : (default=5006) :"
set /p innerport="INNER PORT : (default=5005) :"
IF /i "%ip%" == "" set ip="0.0.0.0"
IF /i "%metaport%" == "" set metaport="5006"
IF /i "%innerport%" == "" set innerport="5005"
@4rzael
4rzael / test.md
Created April 9, 2020 08:48
Code markdown

One way to do it

for a in b:
  print(a)

Another one

for a in b:
  print(a)
@4rzael
4rzael / can-packages-and-tools.md
Created August 7, 2023 12:34 — forked from jackm/can-packages-and-tools.md
Collection of CAN bus packages and tools

Collection of CAN bus packages and tools

This document assumes the use of Linux as the chosen development platform. Items in bold are highly recommended.

It is recommended to use SocketCAN when working with CAN bus on Linux. It is supported by the Linux kernel mainline and follows the Linux interface model, allowing you to use other network tools such as Wireshark. This also allows the creation of virtual CAN interfaces where no physical hardware is required to simulate or replay CAN messages.