OC tool stands for OpenShift Origin Client Tools
- Operating System : Ubuntu 16.04 LTS (64-bit)
<?php | |
$hubspot_config = array ( | |
'hsportalid' => '######', | |
'hapikey' => 'XXXXXX', | |
'hapiuser' => 'XXXXXX', | |
'hapipassword' => 'XXXXXX', | |
'sugarinstallpath' => 'http://somesite.com/sugarcrm/', | |
'hapilogfile' => './sycnlog.txt'); | |
?> |
<?php | |
/** | |
* Includes extensions for Gravity Forms to SugarCRM and Hubspot | |
* The demo code with all fields is located at the bottom of the file | |
* for future reference so we don't have to hunt it down later | |
* | |
* Don't forget to read the link on how to finish off the SugarCRM | |
* integration. I'll blog about it eventually so it's all in one | |
* spot. | |
* |
; Sample supervisor config file. | |
[unix_http_server] | |
file=/tmp/supervisor.sock ; (the path to the socket file) | |
;chmod=0700 ; sockef file mode (default 0700) | |
;chown=nobody:nogroup ; socket file uid:gid owner | |
;username=user ; (default is no username (open server)) | |
;password=123 ; (default is no password (open server)) | |
;[inet_http_server] ; inet (TCP) server disabled by default |
#!/usr/bin/env python | |
""" | |
How to use it: | |
1. Just `kill -2 PROCESS_ID` or `kill -15 PROCESS_ID` , The Tornado Web Server Will shutdown after process all the request. | |
2. When you run it behind Nginx, it can graceful reboot your production server. | |
3. Nice Print in http://weibo.com/1682780325/zgkb7g8k7 | |
""" |
import httplib2,random, json | |
odoo_url = 'SERVER_URL' | |
class OdooConnector: | |
context = {} | |
http = False | |
cookies = '' | |
def __init__(self): |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# vispy: gallery 2 | |
# Copyright (c) 2014, Vispy Development Team. | |
# Distributed under the (new) BSD License. See LICENSE.txt for more info. | |
# | |
# Modified for animation with MoviePy by Zulko | |
# See result here: http://i.imgur.com/sSCBkFd.gif | |
# |
class MP3UploadHandler(tornado.web.RequestHandler): | |
def get(self): | |
self.render('mp3upload.html') | |
def post(self): | |
mp3=self.request.files['mp3'][0] #mp3 post data from form | |
mp3body=mp3['body'] #body of mp3 file | |
mp3name = mp3['filename'] #mp3 name and path | |
conn = S3Connection('AWS_ACCESS_KEY_ID','AWS_SECRET_ACCESS_KEY') #amazon s3 connection | |
bucket = conn.create_bucket('foundsound_mp3') #bucket for images |
{% extends "main.html" %} | |
{% autoescape None %} | |
{% block body %} | |
{% for news_item in news%} | |
<p> | |
<b>{{str(news_item['datetime_added'])}}</b> | |
</p> | |
<p> | |
{{ news_item.get('text', '') }} | |
</p> |
from bs4 import BeautifulSoup | |
import requests | |
r = requests.get("http://www.metmuseum.org/collection/the-collection-online/search/36484") | |
bs = BeautifulSoup(r.content) | |
imgs = bs.findAll('img', src=True) | |
for img in imgs: | |
print img['src'] |