Skip to content

Instantly share code, notes, and snippets.

View BoboTiG's full-sized avatar
🐍
Charmeur de serpents

Mickaël Schoentgen BoboTiG

🐍
Charmeur de serpents
View GitHub Profile
@BoboTiG
BoboTiG / css-compress.php
Last active July 12, 2016 17:03 — forked from brentonstrine/css-compress.php
More removes.
<?php
/**
* On-the-fly CSS Compression
* Copyright (c) 2009 and onwards, Manas Tungare.
* Creative Commons Attribution, Share-Alike.
*
* In order to minimize the number and size of HTTP requests for CSS content,
* this script combines multiple CSS files into a single file and compresses
* it on-the-fly.
*
@BoboTiG
BoboTiG / find-translations.py
Last active July 28, 2016 20:01
Find unused translations in BlogoText.
#!/usr/bin/env python
# coding: utf-8
#
# Find unused translations.
# Python 3.
#
from collections import OrderedDict
from glob import glob
import re
@BoboTiG
BoboTiG / hfs-disable-journal.c
Created August 5, 2016 16:24
Disable HFS+ journal
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/mman.h>
#include <fcntl.h>
/*
* Disable HFS+ journal.
*
@BoboTiG
BoboTiG / deploy_jenkins_slave_python.ps1
Created February 9, 2017 17:44
Install a custom version of Python within the Jenkins current WORKSPACE.
# Usage: powershell ".\deploy_jenkins_slave_python.ps1"
# Stop the execution on the first error
$ErrorActionPreference = "Stop"
# Ensure we have a working WORKSPACE and a defined Python version
if (-Not ($Env:PYTHON_VERSION)) {
echo "PYTHON_VERSION not defined. Aborting."
exit 1
} elseif (-Not ($Env:WORKSPACE)) {
from skimage import color, img_as_float
from PIL import Image
import numpy as np
import datetime
import pyautogui
from mss import mss
counter = 0
redCarSide = 0
blueCarSide = 1
@BoboTiG
BoboTiG / benchmark_validus.py
Created December 19, 2017 20:51
Simple and naive benchmark for the PR
from timeit import Timer
setup = """
def func_orig(value):
return True if len(value) > 0 else False
def func_new(value):
return value != ''
"""
@BoboTiG
BoboTiG / get_change_summary.py
Last active January 25, 2018 08:38
Concurrent calls to NuxeoDrive.GetChangeSummary.
# coding: utf-8
"""
Requires Python 3 and the Python client >= 2.0.0.
Usage:
python get_change_summary.py --users=30
"""
import argparse
import sys
import time
# coding: utf-8
from __future__ import print_function
import time
import numpy
from PIL import Image
import mss
from PyQt5.QtCore import QDir, Qt, QTimer
from PyQt5.QtGui import QIcon, QPixmap
from PyQt5.QtWidgets import (QApplication, QCheckBox, QFileDialog, QGridLayout,
QGroupBox, QHBoxLayout, QLabel, QPushButton, QSizePolicy, QSpinBox,
QVBoxLayout, QWidget, QSystemTrayIcon)
class Screenshot(QWidget):
def __init__(self):
super(Screenshot, self).__init__()
# -*- mode: python -*-
block_cipher = None
icon = '/Applications/Calculator.app/Contents/Resources/AppIcon.icns' # Eventually change me
a = Analysis(['systray.py'],
pathex=[],
binaries=[],
datas=[],
hiddenimports=[],