{"id":19452802,"url":"https://github.com/raivivek/til","last_synced_at":"2026-03-04T07:32:28.043Z","repository":{"id":70095324,"uuid":"51597255","full_name":"raivivek/til","owner":"raivivek","description":"today I learned..","archived":false,"fork":false,"pushed_at":"2022-10-07T19:06:43.000Z","size":2658,"stargazers_count":27,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-25T04:35:46.132Z","etag":null,"topics":["algorithm","algorithms","bioinformatics","biology","python","til","unix","zen-lessons"],"latest_commit_sha":null,"homepage":"https://til.raivivek.in","language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/raivivek.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-02-12T15:32:26.000Z","updated_at":"2023-10-25T12:19:00.000Z","dependencies_parsed_at":"2023-03-11T07:56:53.919Z","dependency_job_id":null,"html_url":"https://github.com/raivivek/til","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/raivivek/til","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raivivek%2Ftil","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raivivek%2Ftil/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raivivek%2Ftil/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raivivek%2Ftil/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/raivivek","download_url":"https://codeload.github.com/raivivek/til/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raivivek%2Ftil/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30075427,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T05:31:57.858Z","status":"ssl_error","status_checked_at":"2026-03-04T05:31:38.462Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithm","algorithms","bioinformatics","biology","python","til","unix","zen-lessons"],"created_at":"2024-11-10T16:48:41.880Z","updated_at":"2026-03-04T07:32:28.021Z","avatar_url":"https://github.com/raivivek.png","language":"Python","readme":"# TIL (Today I Learned)\n\nA collection of small snippets that I learn day to day across a variety of tasks I am\ninvolved in. Often, they are curious and useful insights that I wish to share with\neveryone but are too short for a full blog post.\n\nBrowse them here [til.raivivek.in](https://til.raivivek.in).\n**Count: 67**\n\n## Table of Contents\n* [R-lang](#r-lang)\n* [Algorithms](#algorithms)\n* [Biology](#biology)\n* [Computing](#computing)\n* [Zen lessons](#zen-lessons)\n* [Statistics | Methods | Math](#statistics--methods--math)\n* [Miscellaneous](#miscellaneous)\n* [Productivity](#productivity)\n* [Python (lang)](#python-(lang))\n* [GNU Unix | Command line](#gnu-unix--command-line)\n* [Writing](#writing)\n\n### R-lang\n* [Evaluating string as an expression](R/evaluating-string-as-expression.md)\n* [Save the \"current\" figure](R/save-the-\"current\"-figure.md)\n* [knitr: Put code as appendix](R/knitr:-put-code-as-appendix.md)\n* [Large datasets in `R`](R/r-large-data.md)\n* [Restarting your R Studio server session](R/restarting-your-r-studio-server-session.md)\n* [`stack` and `unstack`](R/stack-and-unstack.md)\n* [ggplot tricks](R/ggplot-tricks.md)\n* [Bin-or-discretize numeric data (ggplot)](R/bin-or-discretize-numeric-data-(ggplot).md)\n* [Using conditionals (`if`-`else`) in data pipes](R/using-conditionals-(`if`-`else`)-in-data-pipes.md)\n* [Using Microsoft R Open 3.5.X](R/using-microsoft-r-open-3.5.x.md)\n* [Modifying `ggplot2` objects after creation](R/modifying-ggplot2-objects-after-creation.md)\n\n### Algorithms\n* [Newick Tree Format](algorithms/newick-tree-format.md)\n* [KMP Algorithm](algorithms/kmp-matcher.md)\n\n### Biology\n* [The Omnigenic Model](biology/the-omnigenic-model.md)\n* [Pedigree Collapse](biology/pedigree-collapse.md)\n* ['Thrifty' gene hypothesis](biology/'thrifty'-gene-hypothesis.md)\n\n### Computing\n* [Editing remote files](computing/editing-remote-file.md)\n* [Snakemake wildcard rules](computing/snakemake-wildcard-rules.md)\n* [Snakemake on HPC](computing/snakemake-on-hpc.md)\n* [GitHub actions](computing/github-actions.md)\n* [Automount + SSHFS on macOS](computing/automount-+-sshfs-on-macos.md)\n* [Database comparison](computing/databases.md)\n* [Mount remote server locally on macOS](computing/mount-remote-server-locally-on-macos.md)\n* [SOAP-vs-REST stack](computing/SOAP-vs-REST.md)\n* [`pkg-config` for managing compilation](computing/pkg-config-for-compilation.md)\n\n### Zen lessons\n* [The value of being slow](lessons/the-value-of-being-slow.md)\n\n### Statistics | Methods | Math\n* [Permutation testing](math/permutation-testing.md)\n\n### Miscellaneous\n* [Banzhaf Power Index](misc/banzhaf-index.md)\n* [Using `cookiecutter` to generate project skeleton](misc/cookiecutter-skeleton.md)\n* [Setting up hostname in macOS](misc/setting-up-hostname-in-macos.md)\n* [Pizza Effect](misc/pizza-effect.md)\n* [Email forwarding for your domain](misc/email-forwarding-for-your-domain.md)\n* [HMMER](misc/hmmer.md)\n* [COVID-19 and groceries](misc/covid-19-and-groceries.md)\n* [Using Zotero with WebDAV for file storage](misc/zotero-webdav-setup.md)\n* [Choosing right Wifi channel](misc/choosing-wifi-channel.md)\n* [Fix Firefox auto DPI scaling](misc/fix-firefox-auto-dpi-scaling.md)\n\n### Productivity\n* [Batch import into Zotero](productivity/batch-import-into-zotero.md)\n* [Keeping notes for long time](productivity/keeping-notes-for-long-time.md)\n* [Using Asana for project management](productivity/using-asana-for-project-management.md)\n* [Getting Research Idea I](productivity/getting-research-idea-i.md)\n* [Using Hammerspoon on macOS for quick tasks](productivity/using-hammerspoon-on-macos-for-quick-tasks.md)\n* [Quickly organizing ideas](productivity/quickly-organizing-ideas.md)\n\n### Python (lang)\n* [`pandas.get_dummies`: Vectorize category variables](python/pandas-get-dummies.md)\n* [`multiprocessing` module in Python](python/optimize-pandas-mp.md)\n* [Itertools module](python/itertools-module.md)\n* [Check if `STDIN` is `tty`](python/checking-if-STDIN-is-tty.md)\n* [Writing Conda Recipes](python/conda-recipes.md)\n* [pymust.watch](python/pymust-watch.md)\n* [Records: SQL for Humans](python/records-sql.md)\n* [Super considered super!](python/super-talk.md)\n* [Don't use `f.readlines()`](python/dont-use-readlines.md)\n* [Care with `string.split()`](python/care-with-string-split.md)\n* [`contextlib` module](python/contextlib-with.md)\n* [ORMs and Database migration](python/sql-orm.md)\n* [Writing unbuffered output](python/unbuffered-output.md)\n\n### GNU Unix | Command line\n* [Watch LaTeX file and autocompile](unix/watch-compile-latex.md)\n* [OOM Killer](unix/oom-killer.md)\n* [Fork a command to background](unix/fork-to-bg.md)\n* [GNU sort has a '-u' option to output only unique values for the  columns used for sorting](unix/sort-and-deduplicate-on-specific-columns.md)\n* [Fetch random lines from file](unix/random-lines.md)\n* [Run a command for some time](unix/timeout.md)\n* [Changing priority of running programs](unix/ionicing-programs.md)\n* [Concatenate files with same header](unix/concatenate-files-with-same-header.md)\n\n### Writing\n* [Rhetorical Précis Format](writing/rhetorical-precis-format.md)\n* [Headlines and the Inverted Pyramid](writing/inverted-pyramid.md)\n* [Double Entry Journal](writing/double-entry-journal.md)\n\n---\n\n## Other TIL Collections\n* [Today I Learned by Hashrocket](https://til.hashrocket.com)\n* [jwworth/til](https://github.com/jwworth/til)\n* [thoughtbot/til](https://github.com/thoughtbot/til)\n\n## License\n© 2015-2020 Vivek Rai\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraivivek%2Ftil","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraivivek%2Ftil","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraivivek%2Ftil/lists"}