- lxml - Pythonic binding for the C libraries libxml2 and libxslt.
- boto - Python interface to Amazon Web Services
- Django - Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
- Fabric - Library and command-line tool for streamlining the use of SSH for application deployment or systems administration task.
- PyMongo - Tools for working with MongoDB, and is the recommended way to work with MongoDB from Python.
- Celery - Task queue to distribute work across threads or machines.
- pytz - pytz brings the Olson tz database into Python. This library allows accurate and cross platform timezone calculations using Python 2.4 or higher.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <QMessageBox> | |
class myClass: | |
{ | |
// Insert those slots in your myClass.h | |
public slots: | |
void displaySignal(QString); | |
void displaySignal(int); | |
void displaySignal(float); | |
void displaySignal(double); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// MACRO | |
#include <time.h> | |
#ifndef SYSOUT_F | |
#define SYSOUT_F(f, ...) _RPT1( 0, f, __VA_ARGS__ ) // For Visual studio | |
#endif | |
#ifndef speedtest | |
#define speedtest(data) for (long blockTime = NULL; (blockTime == NULL ? (blockTime = clock()) != NULL : false); SYSOUT_F(data "%.9fs", (double) (clock() - blockTime) / CLOCKS_PER_SEC)) | |
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Jacobian functor | |
J = @(x,h,F)(F(repmat(x,size(x'))+diag(h))-F(repmat(x,size(x'))))./h'; | |
% Function to differentiate | |
T = @(x) x./sum(x); | |
% Evaluation point | |
x = [0.9134;0.6324;0.0975;0.2785;0.5469]; | |
% Step in each dimension (has to be small enough compared to x) | |
h = 1e-5*ones(size(x)); | |
% Compute the Jacobian |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Avoid overwriting on output folder | |
if [ ! -d "$OUT_FOLDER_PATH" ]; then # If folder doesn't exist, create it | |
mkdir $OUT_FOLDER_PATH | |
else | |
cpt=0 | |
OUT_FOLDER_PATH_NEW=$OUT_FOLDER_PATH | |
while [ "$(ls -A $OUT_FOLDER_PATH_NEW 2> /dev/null)" ] ; # while folder exist and is not empty | |
do | |
let cpt=cpt+1 | |
echo $cpt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For Linux machines | |
#include <fenv.h> // or <cfenv> but only for C++11 | |
// Enable all exceptions except for INEXACT | |
feenableexcept(FE_ALL_EXCEPT & ~FE_INEXACT); | |
// More info at https://linux.die.net/man/3/feenableexcept | |
// For machines using SSE (Apple, etc.) | |
#include <xmmintrin.h> | |
// Disable only INVALID exception |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Method found here https://askubuntu.com/a/122604/423332 | |
# Dependencies: | |
# On ubuntu, you can install ocrodjvu and pdfbeads with: | |
# sudo apt install ocrodjvu | |
# gem install pdfbeads | |
# The path and filename given can only contain ascii characters |