This file contains hidden or 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 io | |
from IPython.nbformat import current | |
with io.open(filepath, 'r', encoding='utf-8') as f: | |
nb = current.read(f, 'json') | |
word_count = 0 | |
for cell in nb.worksheets[0].cells: | |
if cell.cell_type == "markdown": | |
word_count += len(cell['source'].replace('#', '').lstrip().split(' ')) |
This file contains hidden or 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
aa=true | |
bb=false | |
cc="python" | |
if [[ "$aa" ]]; then echo "Test0" ; fi | |
if [[ "$bb" ]]; then echo "Test0.1" ; fi | |
if [[ !"$aa" ]]; then echo "Test0.2" ; fi | |
if [[ ! "$aa" ]]; then echo "Test0.3" ; fi | |
if [[ "$aa" && ! "$bb" ]]; then echo "Test1" ; fi | |
if [[ "$aa" && ! "$aa" ]]; then echo "Test2" ; fi | |
if [[ "$aa" ]] && ! [[ "$bb" ]]; then echo "test3" ; fi |
This file contains hidden or 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
#!/usr/bin/env bash | |
set -o errexit | |
set -o nounset | |
set -o pipefail | |
if [[ -n "${TRACE-}" ]]; then | |
set -o xtrace | |
fi | |
if [[ "$1" =~ ^-*h(elp)?$ ]]; then |
OlderNewer