Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python3
import six
import functools
from abc import ABCMeta, ABC, abstractmethod
class ATest(ABC):
@abstractmethod
def get(self):
pass
@mouuff
mouuff / ftptest.py
Last active February 24, 2018 16:10
from ftplib import FTP
import os.path
class FtpWalk:
def __init__(self, ftp, *path):
self._ftp = ftp
for c in path:
self._ftp.cwd(c)
self._path = self._ftp.pwd()
@mouuff
mouuff / iflat.py
Last active December 13, 2016 13:05
#!/usr/bin/python2
import cv2
import numpy as np
import Tkinter
import tkMessageBox
from tkFileDialog import askopenfilename
HELP = """
This script have been made to counter brightness irregularity
@mouuff
mouuff / macro_MTF.ijm
Last active December 16, 2016 13:18
ImageJ macro to calculate MTF (only with USAF target)
requires("1.41j");
function dprint(content){
if (DEBUG){
print(content);
}
}
function average(array){
@mouuff
mouuff / logbat.sh
Last active November 2, 2016 12:57
simple script to save battery log with kernel debug and export to datasheet
#!/bin/bash
sdlog="/sdcard/logbat.txt"
log="logbat.txt"
result="battery.csv"
function print_usage {
echo "Usage:"
echo "$0 [start | stop | pull]"
@mouuff
mouuff / UserOptions.ini
Last active June 27, 2016 19:07
h1z1 config
[Display]
FullscreenRefresh=0
Maximized=0
FullscreenWidth=1600
FullscreenHeight=900
WindowedWidth=1366
WindowedHeight=768
Mode=Fullscreen
FullscreenMode=Fullscreen
HDPixelPlus=1.000000
void my_putnbr(unsigned int nb)
{
unsigned int x;
x = 1;
while ((nb / (x * 10)) > 0)
x *= 10;
while (x > 0)
{
my_putchar((nb / x) % 10 + '0');
/*
** get_next_line.c for get_next_line in /home/alies/rendu/CPE_2015_getnextline
**
** Made by Arnaud Alies
** Login <alies_a@epitech.net>
**
** Started on Thu Dec 17 13:44:58 2015 Arnaud Alies
** Last update Sat Apr 2 12:48:17 2016 alies_a
*/
@mouuff
mouuff / gist:cce41ce8d700a7ba3069
Created April 5, 2015 08:27
Starmade jump drive.au3
#include <MsgBoxConstants.au3>
Global $cd = Int(InputBox ( "Starmade auto pilot", "enter cooldown of your jump drive (in sec)"))*1100
Global $totravel = Int(InputBox ( "Starmade auto pilot", "enter length of your jump (km)"))
MsgBox($MB_SYSTEMMODAL,"How to run?","to launch the script come back in starmade and select jump drive system in your ship, and press TAB and wait :), press ESC to exit script")
Global $running = False
Global $travelled = 0;
HotKeySet( "{TAB}", "_Loop")
@mouuff
mouuff / 8.ino
Created March 12, 2015 07:57
8.ino
#include <WiFi.h>
#include <WiFiUdp.h>
#include <Servo.h>
#include <String.h>
char ssid[] = "android";
char pass[] = "android42";
int status = WL_IDLE_STATUS;
int localPort = 12345;