Skip to content

Instantly share code, notes, and snippets.

@Lysander6
Lysander6 / path.m
Created May 12, 2016 18:10 — forked from randomsequence/path.m
Smooth CGPath from Array of Points
// build a smooth CGPath from an array of CGPoints (stored as NSValues)
- (CGMutablePathRef)newPathFromPoints:(NSArray *)points {
CGMutablePathRef mutablePath = CGPathCreateMutable();
NSUInteger pointCount = [points count];
if (pointCount > 0) {
CGPoint p0 = [points[0] CGPointValue];

Keybase proof

I hereby claim:

  • I am lysander6 on github.
  • I am lysander (https://keybase.io/lysander) on keybase.
  • I have a public key ASDow03OqTdKLrJ_mLbA-R-aVJcwXMIqBuZiP1B00oKqwwo

To claim this, I am signing this object:

@Lysander6
Lysander6 / polish_sentence_nltk_tokenizer.py
Last active May 8, 2020 18:02 — forked from ksopyla/polish_sentence_nltk_tokenizer.py
A curated list of Polish abbreviations for NLTK sentence tokenizer based on Wikipedia text
import nltk
# interactive download
# nltk.download()
nltk.download('punkt')
extra_abbreviations = ['ps', 'inc', 'Corp', 'Ltd', 'Co', 'pkt', 'Dz.Ap', 'Jr', 'jr', 'sp', 'Sp', 'poj', 'pseud', 'krypt', 'sygn', 'Dz.U', 'ws', 'itd', 'np', 'sanskryt', 'nr', 'gł', 'Takht', 'tzw', 't.zw', 'ewan', 'tyt', 'oryg', 't.j', 'vs', 'l.mn', 'l.poj' ]
position_abbrev = ['Ks', 'Abp', 'abp','bp','dr', 'kard', 'mgr', 'prof', 'zwycz', 'hab', 'arch', 'arch.kraj', 'B.Sc', 'Ph.D', 'lek', 'med', 'n.med', 'bł', 'św', 'hr', 'dziek' ]
@Lysander6
Lysander6 / advent-of-code-2022-day_14-cave-visualization.txt
Created December 14, 2022 14:19
Advent of Code 2022 - day 14 cave visualization
............................+..........................................
.......................................................................
.......................................................................
.......................................................................
.......................................................................
.......................................................................
.......................................................................
.......................................................................
.......................................................................
.......................................................................
@Lysander6
Lysander6 / nuke_s3_bucket.py
Created April 14, 2023 13:58 — forked from LyleScott/nuke_s3_bucket.py
Python script to nuke a S3 Bucket - all files and object versions; supports regions and profiles
#!/usr/bin/env python3
"""
Lyle Scott, III // lyle@ls3.io
$ python nuke_s3_bucket.py --help
usage: nuke_s3_bucket.py [-h] [-p PROFILE] bucket_name
positional arguments:
bucket_name The bucket name to delete.
#
# Rsync a git repository without .git directory, excluding files as per .gitignore
# -- as if, the target directory is a checkout without .git directory.
#
rsync -azP --delete --delete-excluded --filter=":- .gitignore" --exclude .git/ src/dir/path/ user@host:/dst/dir/path/
#
# Rsync a git repository including the .git directory, excluding files as per
# .gitignore -- as if, the target directory is a clone.
#