>>> a = 1 # What's the difference between the following operations? In [1]: print a In [2]: a
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: utf-8 | |
""" | |
Helper objects for rendering to .docx format. | |
""" | |
from __future__ import ( | |
absolute_import, division, print_function, unicode_literals | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import computer as tool | |
def hacker(problem): | |
’’’ a generator | |
’’’ | |
try: | |
tool.fix(problem) | |
except: | |
report(bug) | |
yield patch # don’t reboot it |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get update | |
sudo apt-get -y install openssh-server vim curl screen | |
sudo apt-get -y install build-essential libssl-dev libxml2-dev libxslt1-dev libbz2-dev zlib1g-dev | |
# Ubuntu 20.04 selecting 'python-dev-is-python2' instead of 'python-dev' | |
sudo apt-get -y python-dev-is-python3 | |
# Ubuntu 20.04 switching OK via sudo apt autoremove | |
sudo apt-get -y install libjpeg62-dev | |
# Ubuntu 18: libreadline6; Ubuntu 20: libreadline (v8) | |
sudo apt-get install libreadline | |
# Ubuntu 16: python-imaging; Ubuntu 18: python-pil; Ubuntu 20: python3-pil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################################################# | |
# | |
# 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: | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cities = { | |
'KeelungCity': '基隆市', | |
'TaipeiCity': '臺北市', | |
'NewTaipeiCity': '新北市', | |
'TaoyuanCity': '桃園市', | |
'HsinchuCounty': '新竹縣', | |
'HsinchuCity': '新竹市', | |
'MiaoliCounty': '苗栗縣', | |
'TaichungCity': '臺中市', | |
'NantouCounty': '南投縣', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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; |
NewerOlder