Skip to content

Instantly share code, notes, and snippets.

View kharmabum's full-sized avatar
💭
🧀

Juan-Carlos Foust kharmabum

💭
🧀
View GitHub Profile
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# See https://stackoverflow.com/a/40301488
import functools
import inspect
import warnings
string_types = (type(b''), type(u''))
@kharmabum
kharmabum / loop-loc.md
Last active March 19, 2019 05:37
Loop cloc results

Core.framework

2.5.0 in Core/ on xcode10
› cloc .
     162 text files.
     162 unique files.
       1 file ignored.

github.com/AlDanial/cloc v 1.80  T=0.26 s (610.0 files/s, 91682.3 lines/s)
-------------------------------------------------------------------------------
@kharmabum
kharmabum / data-science-resources.md
Last active May 19, 2023 10:30
Data Science resources

Data Science Resources

Industry

  • [O'Reilly: 2015 Data Science Salary Survey]
  • [ASA Statement on the Role of Statistics in Data Science]
  • [Data science is different now]
  • [Does my Startup Data Team Need a Data Engineer?]
@kharmabum
kharmabum / data-science-curriculum.md
Last active March 8, 2019 23:47
Curriculum for an abbreviated Data Science "masters"

Data Science Curriculum

Goals

  • Broad not narrow focus (i.e. more than deep learning)
  • Emphasis on fundamentals: theory over technology
  • Present a clear, optimized path: separate essential areas of study from practical resources
  • Assume strong software engineering foundation

Foundations

  • [Concepts of Modern Mathematics] by Ian Stewart
extension UIViewController {
func add(_ child: UIViewController) {
addChildViewController(child)
view.addSubview(child.view)
child.didMove(toParentViewController: self)
}
func remove() {
guard parent != nil else {
return
/// Sort any sequence by keypath conforming to Comparable
extension Sequence {
func sorted<T: Comparable>(by keyPath: KeyPath<Element, T>) -> [Element] {
return sorted { a, b in
return a[keyPath: keyPath] < b[keyPath: keyPath]
}
}
}
/// Example usage
@kharmabum
kharmabum / harari.md
Last active October 17, 2018 05:47
Yuval Noah Harari hints at UBI while discussing the implications of the fourth industrial revolution and economic irrelevance.

There is a worst case and a best case scenario. In the best case scenario, people are relieved of all the difficult boring jobs that nobody really wants to do but you do it because you need the money. And you’re relieved of that. And the enormous profits of the automation revolution are shared between everybody, and you can spend your time, your leisure time, on exploring yourself, developing yourself, doing art, meditating, or playing sports, or developing communities.” – Yuval Noah Harari

@kharmabum
kharmabum / remove-the-foo
Created September 22, 2018 17:42
Recursively remove all files of filetype .foo from the repo:
git filter-branch --tree-filter 'git rm -r -f --ignore-unmatch *.foo' HEAD
@kharmabum
kharmabum / basic-income.md
Created July 17, 2018 20:04
basic-income.md
@kharmabum
kharmabum / emoji.txt
Last active November 29, 2017 18:44
iOS 11.1 emoji
🤩 U+1F929 star-struck
🤨 U+1F928 raised_eyebrow
🤯 U+1F92F explosion
🤪 U+1F92A crazy
🤬 U+1F92C swearing
🤮 U+1F92E spew
🤫 U+1F92B hush
🤭 U+1F92D whoops
🧐 U+1F9D0 monocle
🧒 U+1F9D2 child