Skip to content

Instantly share code, notes, and snippets.

View danielperezr88's full-sized avatar
🚀
Empowering world-changing ideas

Daniel Pérez Rubio danielperezr88

🚀
Empowering world-changing ideas
  • Madrid
View GitHub Profile
{#
Renders Bokeh models into a basic .html file.
:param title: value for ``<title>`` tags
:type title: str
:param plot_resources: typically the output of RESOURCES
:type plot_resources: str
:param plot_script: typically the output of PLOT_SCRIPT
from AbstractServiceClass import AbstractServiceClass
class HeartBeater(AbstractServiceClass):
def __init__(self):
AbstractServiceClass.__init__(self)
def __doit__(self):
self.log('.')
import json
from datetime import date, timedelta
from collections import Counter
import unicodedata
from time import sleep
@danielperezr88
danielperezr88 / php-ini-modifier.py
Last active July 15, 2016 12:51
ConfigParser applied to php.ini commented and uncommented option parsing
from configparser import ConfigParser
LOGDIR = '/etc/php5/apache2'
### Overload ConfigParser _read method to generate a comment parser
class CommentParser(ConfigParser):
def __init__(self,*args,**kwargs):
super(ConfigParser,self).__init__(*args,**kwargs)