Skip to content

Instantly share code, notes, and snippets.

View jf-parent's full-sized avatar
⌨️
I admit that more people hv been to Iraq than I have, so I don't know everything

Jean-Francois Parent jf-parent

⌨️
I admit that more people hv been to Iraq than I have, so I don't know everything
View GitHub Profile
@jf-parent
jf-parent / descriptor.py
Created February 5, 2016 18:16
Nonogram descriptor
#!/usr/bin/env python
class NonogramDescriptor(object):
def __init__(self, nonogram):
self.nonogram = nonogram
self.symbol = '*'
def describe(self):
column_length = len(self.nonogram[0])
@jf-parent
jf-parent / script_1.py
Created April 1, 2016 03:40
ArtScript I
#!/usr/bin/env python
#Result: https://goo.gl/photos/efVQbcnRHd8Jp2EG8
import inspect
from datetime import datetime
from random import randint
from IPython import embed
from PIL import Image, ImageFilter, ImageDraw, ImageFont
@jf-parent
jf-parent / script_2.py
Created April 2, 2016 03:34
ArtScripts II - Composition Mondrian
#!/usr/bin/env python
"""
###Installation:
$ pip install Pillow
###Execution:
$ python script_2.py
###Results:
@jf-parent
jf-parent / script_3.py
Created April 5, 2016 01:22
ArtScripts III - Drip Pollock
#!/usr/bin/env python
"""
###Installation
$ pip install Pillow
###Execution
$ python script_3.py
###Results
@jf-parent
jf-parent / script_4.py
Created April 17, 2016 07:28
ArtScripts IV - 238 Combination Dadamaino
#!/usr/bin/env python
"""
###Installation
$ pip install Pillow
###Execution
$ python script_3.py
http://www.wikiart.org/en/dadamaino/238-combinazioni-cromatiche-con-16-colori-moltiplicati-fra-loro-1969
@jf-parent
jf-parent / script_5.py
Created April 24, 2016 03:58
ArtScripts V - Color For Large Wall Kelly
#!/usr/bin/env python
"""
###Installation
$ pip install Pillow
###Execution
$ python script_5.py
###Reference:
@jf-parent
jf-parent / script_6.py
Created April 24, 2016 04:28
ArtScripts VI - Spectrum Kelly
#!/usr/bin/env python
"""
###Installation
$ pip install Pillow
###Execution
$ python script_6.py
###Reference:
```python
import httplib2
import os
import argparse
import base64
import email
import re
from apiclient import errors
from apiclient import discovery
import sys
import os
from dateutil.parser import parse
HERE = os.path.abspath('/home/ubuntu/crm/')
ROOT = os.path.join(HERE)
sys.path.append(ROOT)
from server.settings import config
from dateutil.parser import parse
import pytz
datetime_with_timezone = parse(data.get('datetime')).replace(tzinfo=pytz.utc)