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
ps aux|awk '{gsub(/\n/,"");printf("%s,",$2);}' |
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
from Tkinter import * | |
import Image #PIL | |
import ImageTk #PIL | |
import sys | |
import getopt | |
try: | |
if len(sys.argv) == 1: | |
raise ValueError, "No image filename specified" |
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
awk '$0 !~ /^#/' ./monFichier |
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
cat FICHIER |awk '!x[$0]++' |
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
awk '/regexp1/,/regexp2/' monFichier |
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
import math | |
for i in range(100): | |
print pow(2,i)-1 |
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
#!/usr/bin/env python | |
from pysnmp.entity.rfc3413.oneliner import cmdgen | |
import re | |
import struct | |
import getopt | |
import sys | |
import signal | |
OID_BRIDGE=(1,3,6,1,2,1,17,1,4,1,2) |
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
# -*- coding:utf-8 -*- | |
import qrcode | |
import getopt | |
import sys | |
def usage(): | |
print "usage : qrencode.py -m MESSAGE -save=FILE" | |
print "-m = Message à encoder" | |
print "-s = Fichier à enregistrer" |
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
import pickle | |
import datetime | |
# Store the time | |
pickle.dump( datetime.datetime.now(), open( "last.p", "wb" ) ) | |
# Retreive the last time | |
previous_time=pickle.load( open( "last.p", "rb" ) ) |
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 <stdio.h> | |
#include <stdint.h> | |
#include <time.h> | |
int64_t timespecDiff(struct timespec *timeA_p, struct timespec *timeB_p) | |
{ | |
return ((timeA_p->tv_sec * 1000000000) + timeA_p->tv_nsec) - | |
((timeB_p->tv_sec * 1000000000) + timeB_p->tv_nsec); | |
} |
OlderNewer