Skip to content

Instantly share code, notes, and snippets.

View l34marr's full-sized avatar

TsungWei Hu l34marr

View GitHub Profile
@l34marr
l34marr / rst_renderer.py
Created December 27, 2022 07:12 — forked from scanny/rst_renderer.py
Code to translate RestructuredText into Microsoft Word document using python-docx
# encoding: utf-8
"""
Helper objects for rendering to .docx format.
"""
from __future__ import (
absolute_import, division, print_function, unicode_literals
)
@l34marr
l34marr / crm.lead.csv
Last active February 14, 2020 02:54
Error Message
id name partner_id country_id activity_summary stage_id planned_revenue probability team_id
__export__.crm_lead_2_64f28df9 Data Scientist; Machine Learning Engineer Chang Amin Accessment New 0.0 Sales
@l34marr
l34marr / develop.cfg
Created December 10, 2018 15:49
develop.cfg for Plone 5.1.2 + Volto
#################################################################
#
# Development Configuration
# =========================
#
# This is a buildout configuration that sets up a development
# environment for Plone. It extends buildout.cfg.
#
# To use this configuration, run buildout via:
#
var NOW = new Date();
var TY = NOW.getFullYear();
var TM = NOW.getMonth()+1;
function chg_cals(Y,M){
var tb=document.getElementById("cal");
var F=true;
var R=0;
var D=1;
var DW;
var DM = new Array(Y,31,28,31,30,31,30,31,31,30,31,30,31);
@l34marr
l34marr / reachs.py
Last active August 31, 2017 13:45
Read Excel File
from openpyxl import load_workbook
wb = load_workbook('vol3.xlsx')
print wb.get_sheet_names()
#ws = wb.get_sheet_by_name(u'Sheet1')
ws = wb.worksheets[0]
print ws.max_row, ws.max_column
result = []
for row in ws.iter_rows():
<!DOCTYPE HTML>
<html>
<head>
<title>OpenLayers Bounding Box Selector Example</title>
<script src="http://www.openlayers.org/api/OpenLayers.js"></script>
<script>
var vectors;
var box;
import computer as tool
def hacker(problem):
’’’ a generator
’’’
try:
tool.fix(problem)
except:
report(bug)
yield patch # don’t reboot it
@l34marr
l34marr / ipython.rst
Last active June 9, 2022 13:49
IPython

Installation

Basic Concepts

>>> a = 1 # What's the difference between the following operations? In [1]: print a In [2]: a

@l34marr
l34marr / update-geo.py
Created February 5, 2015 06:15
Setting Geo Data with Plone Maps collective.geo.*
from Testing import makerequest
from AccessControl.SecurityManagement import newSecurityManager
from Products.CMFCore.utils import getToolByName
root = makerequest.makerequest(app)
site = root.mysite
admin = root.acl_users.getUserById('admin')
admin = admin.__of__(site.acl_users)
newSecurityManager(None, admin)
@l34marr
l34marr / index.html
Last active August 29, 2015 14:11
HTML and CSS Tutorial
<html>
<head>
<title>Simplest HTML Page</title>
</head>
<body>
<h1 style="color: Red">My First HTML Page</h1>
<p>English Paragraph Goes Here. So You Can Learn That:
<ol>
<li style="color: Red">h1 Means Heading One</li>
<li>p Means Paragraph</li>