Skip to content

Instantly share code, notes, and snippets.

View sileht's full-sized avatar

Mehdi ABAAKOUK sileht

View GitHub Profile
tox_topic() {
git bisect start
git bisect good origin/master
git bisect bad HEAD;
git bisect run tox "$@"
git bisect reset
}

Keybase proof

I hereby claim:

  • I am sileht on github.
  • I am sileht (https://keybase.io/sileht) on keybase.
  • I have a public key whose fingerprint is A351 AB80 5797 B657 D490 BAD7 1892 B42F CEAA EBC8

To claim this, I am signing this object:

#!/usr/bin/python
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@sileht
sileht / Fix brightness FN-keys on Asus laptops
Created September 20, 2016 08:14 — forked from eugene-s/Fix brightness FN-keys on Asus laptops
Fix brightness FN-keys in Linux on Asus laptops (N550, UX305, UX303 etc)
commit 4e9bdc8ceeffa48962ae018cf52cc8ada72dc98b
Author: Carlo Caione <[email protected]>
Date: Fri Aug 21 08:58:14 2015 +0200
drm/i915/opregion: work around buggy firmware that provides 15+ output devices
- DIDL/DDL2/DDL3/... are the DIDL fields in the IGDM OpRegion (Supported
Display Devices ID List)
- This field indicates which display devices are supported by the platform, and
@sileht
sileht / nextcloud-12.0.0-css-workaround.diff
Created May 28, 2017 19:03
nextcloud-12.0.0-css-workaround
diff -uNr nextcloud-12.ori/lib/private/Template/CSSResourceLocator.php nextcloud-12/lib/private/Template/CSSResourceLocator.php
--- nextcloud-12.ori/lib/private/Template/CSSResourceLocator.php 2017-05-28 21:03:02.429490871 +0200
+++ nextcloud-12/lib/private/Template/CSSResourceLocator.php 2017-05-28 20:59:23.120606748 +0200
@@ -117,7 +117,7 @@
parent::append($root, $file, $webRoot, $throw);
} else {
if (!$webRoot) {
- $tmpRoot = $root;
+ $tmpRoot = realpath($root);
/*
@sileht
sileht / test-pytimeparse.py
Last active August 29, 2017 18:30
test-pytimeparse
import timeit
print("https://github.com/wroberts/pytimeparse/pull/14")
values = ["-%s seconds" % i for i in xrange(10)]
valuesbig = ["-%s seconds" % i for i in xrange(100)]
valuesbigger = ["-%s seconds" % i for i in xrange(1000)]
for v in ["values", "valuesbig", "valuesbigger"]:
diff --git a/gnocchi/tests/test_carbonara.py b/gnocchi/tests/test_carbonara.py
index 51cbfc22..3b2c4743 100644
--- a/gnocchi/tests/test_carbonara.py
+++ b/gnocchi/tests/test_carbonara.py
@@ -276,6 +276,46 @@ class TestAggregatedTimeSerie(base.BaseTestCase):
self.assertEqual(5.9000000000000004,
ts[datetime64(2014, 1, 1, 12, 0, 0)][1])
+ def test_mean_bug_percentile(self):
+ for i in range(0, 1000000):
@sileht
sileht / tmux-sixel-2.5-2\~bpo9+1.patch
Last active December 5, 2022 23:12
sixel support for tmux-2.5-2\~bpo9+1
commit b4a5392a631ca08893c7b5653756bc1aa21db71b
Author: Mehdi Abaakouk <[email protected]>
Committer: Mehdi Abaakouk <[email protected]>
Date: Fri Oct 6 10:16:01 2017 (43 seconds ago)
sixel patch
Updated from https://github.com/saitoha/tmux-SIXEL
for debian strech
trinary_operations = {
u"clip": numpy.clip,
}
def handle_binary_operator(nodes, granularity, timestamps,
initial_values, is_aggregated, references):
op = nodes[0]
g1, t1, v1, is_a1 = evaluate(nodes[1], granularity, timestamps,
initial_values, is_aggregated, references)
g2, t2, v2, is_a2 = evaluate(nodes[2], granularity, timestamps,
import os
import redbaron
import sys
def fixup_test(test):
if not test.arguments:
return