This is a guide for aligning images.
See the full Advanced Markdown doc for more tips and tricks
brew tap homebrew/cask-fonts | |
brew install --cask font-cascadia-code | |
brew install --cask font-cascadia-code-pl | |
brew install --cask font-cascadia-mono | |
brew install --cask font-cascadia-mono-pl |
ab7ac74864f5738482b4a1c899007ce8792da4c3 Update | |
8eea721f09ba78fdd1cde05c72676c15f89f373f Update | |
fc1c0a15d66bb197d625acfc9ea1da98f34dd7b3 Update | |
6d62fc4fb9f4ad8b326fa6900303567411d0c37f update | |
99557cb9b8e3b2b3c6f30c8e11574926aeb82492 UPdate | |
d7bf450410e8e563d0aff41d3e037f34b7526947 Update | |
1023d7d1c7cbf1dca50338d75e26c9f8603b62c1 Update | |
cdbe4512edf73fb38bbd31f55e14f2a760f15e3b Update | |
47e3bba33f2c9b9e20b1389aaa5c0a0820ed3f38 Update | |
d3a762ca74c48fc2e6002b8d7d678d337dfd656d Update |
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
from PIL import Image, ImageDraw | |
im = Image.open('img_original.png') | |
def interpolate(f_co, t_co, interval): | |
det_co =[(t - f) / interval for f , t in zip(f_co, t_co)] | |
for i in range(interval): |
[i if i is True else 'nope' for i in [True, False, True]] | |
# [True, 'nope', True] | |
# Notice this is a conditional expression and different from list comprehension | |
# Which typically is `for ... if ...` | |
# Now it's reversed and no expression for truthy condition `if x <condition> else <expression>` |
This is a guide for aligning images.
See the full Advanced Markdown doc for more tips and tricks
/* | |
* One of the questions that recently came up is how to remove vowels from Hebrew characters in Unicode | |
* (or any other similar language). A quick look at Hebrew Unicode chart shows that the vowels are all | |
* located between 0x0591 (1425) and 0x05C7 (1479). With this and Javascript's charCodeAt function, it | |
* is trivial to strip them out with Javascript as follows | |
* | |
* Live demo is available here: | |
* https://jsfiddle.net/js0ge7gn/ | |
*/ |
from pyPdf import PdfFileWriter, PdfFileReader | |
import StringIO | |
from reportlab.pdfgen import canvas | |
from reportlab.lib.pagesizes import letter | |
packet = StringIO.StringIO() | |
# create a new PDF with Reportlab | |
can = canvas.Canvas(packet, pagesize=letter) | |
can.drawString(100,100, "Hello world") | |
can.save() |