Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python2
# -*- coding: utf-8 -*-
# check_gpu_sensor: Nagios/Icinga plugin to check GPU sensors
#
# Copyright (C) 2019 Andre Panisson (Python2 script),
# Copyright (C) 2011-2013 Thomas-Krenn.AG (Perl script),
# originally released at https://github.com/thomas-krenn/check_gpu_sensor_v1
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@panisson
panisson / ncp.py
Last active June 9, 2020 01:44
Nonnegative Tensor Factorization, based on the Matlab source code available at Jingu Kim's home page: https://sites.google.com/site/jingukim/home#ntfcode Requires the installation of Numpy and Scikit-Tensor (https://github.com/mnick/scikit-tensor). For examples, see main() function.
# Copyright (C) 2013 Istituto per l'Interscambio Scientifico I.S.I.
# You can contact us by email (isi@isi.it) or write to:
# ISI Foundation, Via Alassio 11/c, 10126 Torino, Italy.
#
# This work is licensed under a Creative Commons 4.0
# Attribution-NonCommercial-ShareAlike License
# You may obtain a copy of the License at
# http://creativecommons.org/licenses/by-nc-sa/4.0/
#
# This program was written by Andre Panisson <panisson@gmail.com> at
@panisson
panisson / simple_search.py
Created April 24, 2013 15:30
Twitter having problems with indexing?
import httplib
import urllib
import json
q = 'white house'
params = urllib.urlencode([('q',q),('max_id',326988860120772607),('rpp',10), ('page',1)])
print params
conn = httplib.HTTPConnection("search.twitter.com")
conn.request("GET","/search.json?"+params)
@panisson
panisson / powerlaw_vs_stabrnd
Created November 2, 2012 11:31
Power Law vs Stable Random Number Generator
{
"metadata": {
"name": "powerlaw_vs_stabrnd"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{