Skip to content

Instantly share code, notes, and snippets.

@BuhtigithuB
BuhtigithuB / img_utils.python
Last active Feb 23, 2018 — forked from dangtrinhnt/img_utils.python
Autorotate and autoresize images in mass with Python and PIL
View img_utils.python
#!/usr/bin/env python
"""
File: autorotate.py
Origial Author: Damien Riquet <d.riquet@gmail.com>
Current Maintainer: Trinh Nguyen <dangtrinhnt[at]gmail[dot]com>
Description: This script provides an auto-rotate feature of pictures
USAGE: autorotate.py [-h] [--recursive] directory [directory ...]
positional arguments:
@BuhtigithuB
BuhtigithuB / update_web2py_specific_files_inside_your_app.sh
Last active Jan 17, 2018
Update web2py specific files inside your app
View update_web2py_specific_files_inside_your_app.sh
# When you upgrade web2py your should update app files that are important to web2py for properly functioning
#
# views/
# appadmin.html
# generic.ics
# generic.load
# generic.rss
# layout.html
# generic.json
# generic.map
@BuhtigithuB
BuhtigithuB / selenium_splinter_intl_accept_languages.py
Created Apr 27, 2017
chromedriver intl.accept_languages pass as chrome options
View selenium_splinter_intl_accept_languages.py
# This work with selenium
from selenium.webdriver import Chrome
from selenium.webdriver.chrome.options import Options
from splinter.driver.webdriver import BaseWebDriver, WebDriverElement
options = Options()
options.add_experimental_option('prefs', {'intl.accept_languages': 'en,en_US'})
browser = BaseWebDriver()