Skip to content

Instantly share code, notes, and snippets.

Muammar El Khatib muammar

Block or report user

Report or block muammar

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
muammar@jedi ~ 
  % conda list                                                           !10029
# packages in environment at /home/muammar/anaconda3:
# Name                    Version                   Build  Channel
_ipyw_jlab_nb_ext_conf    0.1.0                    py37_0  
_libgcc_mutex             0.1                        main  
alabaster                 0.7.12                   py37_0  
anaconda                  2019.03                  py37_0  
View countingstuff
In [1]: stuff = ["a", "a", "c", "b", "b", "b"]
In [2]: counter = {}
In [3]: for element in stuff:
...: if element not in counter.keys():
...: counter[element] = 0
...: counter[element] += 1
# -*- coding: utf-8 -*-
Created on Wed Feb 14 16:17:38 2018
This handler is used to deal with logging with mpi4py in Python3.
@author: cheng
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Download all UV-Vis spectra available from NIST Chemistry Webbook."""
import os
import re
import requests
from bs4 import BeautifulSoup
muammar / xournal.rb
Last active Oct 16, 2018
Build Xournal with Homebrew (works with Mojave)
View xournal.rb
require 'formula'
class Xournal < Formula
homepage ''
url ''
sha256 'b25898dbd7a149507f37a16769202d69fbebd4a000d766923bbd32c5c7462826'
depends_on 'pkg-config' => :build
depends_on 'autoconf' => :build
depends_on 'automake' => :build
muammar / cholesky_d.f
Created Nov 3, 2017 — forked from t-nissie/cholesky_d.f
Cholesky decomposition written in Fortran
View cholesky_d.f
! cholesky_d.f -*-f90-*-
! Using Cholesky decomposition, cholesky_d.f solve a linear equation Ax=b,
! where A is a n by n positive definite real symmetric matrix, x and b are
! real*8 vectors length n.
! Time-stamp: <2015-06-25 18:05:47 takeshi>
! Author: Takeshi NISHIMATSU
! Licence: GPLv3
! [1] A = G tG, where G is a lower triangular matrix and tG is transpose of G.

Keybase proof

I hereby claim:

  • I am muammar on github.
  • I am muammar ( on keybase.
  • I have a public key ASDRSip-10FBmj_GyH-fNaDq4sCS4xelD2PeaQ-PDb0FuQo

To claim this, I am signing this object:

View qt5.patch
--- a/qttools/src/macdeployqt/shared/shared.cpp
+++ b/qttools/src/macdeployqt/shared/shared.cpp
@@ -803,6 +803,10 @@ void changeInstallName(const QString &bundlePath, const FrameworkInfo &framework
deployedInstallName = framework.deployedInstallName;
changeInstallName(framework.installName, deployedInstallName, binary);
+ QString canonicalInstallName = QFileInfo(framework.installName).canonicalFilePath();
+ if (canonicalInstallName != framework.installName) {
+ changeInstallName(canonicalInstallName, deployedInstallName, binary);
+ }
muammar / # ffmpeg - 2016-09-17_15-30-00.txt
Created Sep 17, 2016
ffmpeg on Mac OS X 10.11.6 - Homebrew build logs
View # ffmpeg - 2016-09-17_15-30-00.txt
Homebrew build logs for ffmpeg on Mac OS X 10.11.6
Build date: 2016-09-17 15:30:00
muammar / gist:255d40e4a4f48337d8dcb688d6c2a164
Created Aug 24, 2016 — forked from mharsch/gist:5144208
transcode video streams using node.js Streams and avconv (aka ffmpeg)
View gist:255d40e4a4f48337d8dcb688d6c2a164

The avconv utility can be made to work in 'the Unix way' by specifying stdin and/or stdout instead of filenames for the input and output respectively. See:


cat input.ts | avconv -i pipe:0 -f mp4 -movflags frag_keyframe pipe:1 | cat > output.mp4

Using node's require('child_process').spawn(), we can pipe streams of video data through avconv's stdin and stdout and thus Stream All The Things.

var fs = require('fs');
You can’t perform that action at this time.