Original link: http://www.concentric.net/~Ttwang/tech/inthash.htm
Taken from: http://web.archive.org/web/20071223173210/http://www.concentric.net/~Ttwang/tech/inthash.htm
Reformatted using pandoc
Thomas Wang, Jan 1997
last update Mar 2007
| import pandas as pd | |
| from io import StringIO | |
| from openpyxl.formatting.rule import ColorScaleRule | |
| from openpyxl.styles import Alignment, Font, NamedStyle | |
| from openpyxl.utils import get_column_letter | |
| df = pd.read_csv(StringIO("""\ | |
| alpha beta gamma | |
| 2000-01-01 -0.173215 0.119209 -1.044236 | |
| 2000-01-02 -0.861849 -2.104569 -0.494929 |
| """ | |
| emulation of collections.defaultdict | |
| """ | |
| class defaultdict(dict): | |
| """ | |
| emulation of collections.defaultdict | |
| to test, run python defaultdict.py -v | |
| >>> dd = defaultdict(list) |
| #!/bin/bash | |
| HOST=foo.example.com | |
| USER= | |
| PASS= | |
| IPADDR=$(curl -s https://api.ipify.org) | |
| RESULT=$(wget -q -O- "https://$USER:[email protected]/nic/update?hostname=$HOST&myip=$IPADDR&wildcard=NOCHG&mx=NOCHG&backmx=NOCHG") |
| #!/usr/bin/env bash | |
| # Generate a pseudo UUID | |
| uuid() | |
| { | |
| local N B C='89ab' | |
| for (( N=0; N < 16; ++N )) | |
| do | |
| B=$(( $RANDOM%256 )) |
| #!/bin/bash | |
| SOURCE="$1" | |
| if [ "${SOURCE}" == "" ]; then | |
| echo "Must specify a source url" | |
| exit 1 | |
| fi | |
| DEST="$2" | |
| #if [ "${DEST}" == "" ]; then |
Original link: http://www.concentric.net/~Ttwang/tech/inthash.htm
Taken from: http://web.archive.org/web/20071223173210/http://www.concentric.net/~Ttwang/tech/inthash.htm
Reformatted using pandoc
Thomas Wang, Jan 1997
last update Mar 2007
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <pthread.h> | |
| #define M 3 | |
| #define K 2 | |
| #define N 3 | |
| #define NUM_THREADS M * N | |
| /* Global variables for threads to share */ |
| # Distributed under the OSI-approved BSD 3-Clause License. See accompanying | |
| # file Copyright.txt or https://cmake.org/licensing for details. | |
| #.rst: | |
| # FindOpenMP | |
| # ---------- | |
| # | |
| # Finds OpenMP support | |
| # | |
| # This module can be used to detect OpenMP support in a compiler. If |
這篇文章旨在作為快速參考與展示。要更多完整的資訊,請見 John Gruber 原本的規格與 Github 偏好的 Markdown(Github-flavored Markdown,簡寫為GFM)資訊頁。
如果你正在找 Markdown Here 的小抄(Cheatsheet),這裡也有一篇。你也可以看看更多 Markdown 的工具。
譯註:可以參考這份中文版文件,有更詳盡的 Markdown 語法說明;如果需要可以練習的線上編輯器,可以試試看HackMD。