Skip to content

Instantly share code, notes, and snippets.

View RealA10N's full-sized avatar
💤
nothing to commit, working tree clean

Alon Krymgand RealA10N

💤
nothing to commit, working tree clean
View GitHub Profile
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
@napolux
napolux / gist:7eddbf88334d3030cb55ddc4ad292baf
Created May 17, 2020 16:17
Real git log from a side-project of mine
ab7ac74864f5738482b4a1c899007ce8792da4c3 Update
8eea721f09ba78fdd1cde05c72676c15f89f373f Update
fc1c0a15d66bb197d625acfc9ea1da98f34dd7b3 Update
6d62fc4fb9f4ad8b326fa6900303567411d0c37f update
99557cb9b8e3b2b3c6f30c8e11574926aeb82492 UPdate
d7bf450410e8e563d0aff41d3e037f34b7526947 Update
1023d7d1c7cbf1dca50338d75e26c9f8603b62c1 Update
cdbe4512edf73fb38bbd31f55e14f2a760f15e3b Update
47e3bba33f2c9b9e20b1389aaa5c0a0820ed3f38 Update
d3a762ca74c48fc2e6002b8d7d678d337dfd656d Update
@weihanglo
weihanglo / draw_gradient_pillow.py
Last active May 8, 2024 09:09
Draw gradient color with Pillow
#!/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):
@Integralist
Integralist / Python if else list comprehension (generator expression).py
Last active July 6, 2023 17:14
Python if/else list comprehension (generator expression)
[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>`

Aligning images

This is a guide for aligning images.

See the full Advanced Markdown doc for more tips and tricks

left alignment

@sharmaeklavya2
sharmaeklavya2 / cp_syllabus.md
Last active May 22, 2024 10:00
Competitive Programming Syllabus

Competitive Programming Syllabus

Geometry

  • Problems - Refer the article for a list of problems which can be solved using Rotating Calipers technique.
@yakovsh
yakovsh / 2005_06_03-remove_vowels_from_hebrew.js
Last active May 23, 2022 19:43
Removing Vowels from Hebrew Unicode Text
/*
* 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/
*/
@kzim44
kzim44 / editExistingPdf.py
Created February 24, 2013 07:29
Edit an existing PDF using Python
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()