Skip to content

Instantly share code, notes, and snippets.

View hamin's full-sized avatar

Haris Amin hamin

  • Currently ionq.co. Previously symbiont.io, getpager.com, itsglimpse.com, dailburn.com
  • New York,NY
View GitHub Profile
@rxwei
rxwei / ad-manifesto.md
Last active November 9, 2023 09:58
First-Class Automatic Differentiation in Swift: A Manifesto
@jiaaro
jiaaro / _INSTRUCTIONS.md
Last active January 22, 2024 17:47
Using Swift libraries in Python

Using Swift libraries in Python

So... this is obviously totally, 100%, like for. real. not. supported. by. Apple. …yet?

But still... I thought it was pretty badass. And, seeing how there's already a Swift buildpack for Heroku you could move some slow code into Swift can call it as a library function. But, you know, not in production or anything. That would be silly, right?

Now, having said that, the actual Python/Swift interop may have bugs. I'll leave that as an exercise to the reader.

How to get Python code calling Swift functions:

@jcmartins
jcmartins / gist:ce8951db811086fc02f5
Last active October 31, 2019 15:11
Grafana with Google Auth
###GOOGLE Console DEV
Original JavaScript autorized
http://grafana.mydomain.com.br
URIs redirect autorized
http://grafana.mydomain.com.br:3000/login/google
### NGINX PROXY
server {
@maggit
maggit / gist:6124411b442c0a857c2f
Last active December 20, 2019 16:26
Awesome Tacos in Mexico City
Places to eat/drink and have a good time
1. El Borrego Viudo (24 hours tacos, Revolución 241 esq. Viaducto, Tacubaya) Speciality: Tacos de cabeza
2. El Huequito (Pennsylvania 73, Col. Nápoles) Speciality: Tacos de pastor
3. El Vilsito (Petén 248 (esq. Av. Universidad)) Speciality: Costilla con queso
4. Fonda 99.99 (Calle Moras 347, Benito Juárez) Speciality: Tacos de cochinita pibil
5. El Tizoncito (Tamaulipas 122, Col. Condesa.) Speciality: Tacos de pastor
6. Los Parados (Monterrey 333, Col. Roma Sur) Speciality: Tacos de arrachera, vegetarian friendly
7. Los Cocuyos (Bolívar 56, Col. Centro) Speciality: Tacos de suadero (Go here if you feel adventurous)
8. La Tia Yeya (Citlaltepetl No. 25 entre Campeche y Amsterdam Col. Condesa) Speciality: Breakfast chilaquiles, vegetarian friendly
@andymatuschak
andymatuschak / CollectionViewDataSource.swift
Last active February 12, 2021 09:44
Type-safe value-oriented collection view data source
//
// CollectionViewDataSource.swift
// Khan Academy
//
// Created by Andy Matuschak on 10/14/14.
// Copyright (c) 2014 Khan Academy. All rights reserved.
//
import UIKit
# Copyright (c) 2014 Lukas Fittl <lukas@pganalyze.com>
#
# Released in the public domain - fork as you wish.
require 'rubygems'
require 'mixlib/cli'
require 'pg'
require 'pg_query'
require 'curses'
@JohnEstropia
JohnEstropia / JEProgressView.h
Last active October 5, 2023 14:59
Workaround an annoying bug with iOS 7.1 where custom track and progress images for UIProgressView gets ignored
//
// JEProgressView.h
//
//
// Created by John Rommel Estropia on 2014/03/11.
// Copyright (c) 2014 John Rommel Estropia.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
@moudy
moudy / PomTaskView+Constraints.m
Last active December 22, 2015 18:49
Constraints category
#import "PomTaskView+Constraints.h"
@implementation PomTaskView (Constraints)
- (void)updateConstraints {
[super updateConstraints];
NSMutableArray *constraints = [NSMutableArray new];
NSDictionary *views = [self subviewsDictionary];
@clr
clr / access.log
Created October 30, 2012 22:21
Wide Finder ErlangGames
208.115.113.86 - - [29/Oct/2012:17:11:45 -0700] "GET /Case%20History/new_page_1.htm HTTP/1.1" 404 89 "-" "Mozilla/5.0 (compatible; Ezooms/1.0; ezooms.bot@gmail.com)" "dakotalargeanimalclinic.com"
218.30.103.53 - - [29/Oct/2012:17:37:02 -0700] "GET /robots.txt HTTP/1.1" 200 54 "-" "Sogou web spider/4.0(+http://www.sogou.com/docs/help/webmasters.htm#07)" "www.dakotalargeanimalclinic.com"
208.115.111.70 - - [29/Oct/2012:17:46:47 -0700] "GET /robots.txt HTTP/1.1" 200 54 "-" "Mozilla/5.0 (compatible; Ezooms/1.0; ezooms.bot@gmail.com)" "dakotalargeanimalclinic.com"
74.125.182.28 - - [29/Oct/2012:17:54:04 -0700] "GET /Equine_Nutrition/teeth_check_horse.html HTTP/1.1" 200 4111 "http://www.google.com/search" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.4 (KHTML, like Gecko; Google Web Preview) Chrome/22.0.1229 Safari/537.4" "www.dakotalargeanimalclinic.com"
70.238.130.51 - - [29/Oct/2012:17:54:04 -0700] "GET /photo_gallery/black_cat_mouth_open.JPG HTTP/1.1" 200 632815 "http://www.google.com/search?num=10&hl=en&sit
@jpo
jpo / progress_indicators.rb
Created July 31, 2012 02:23
Ruby CLI Progress Indicators
# Terminal Progress Indicators. Four examples are included: percentage,
# spinner, progress bar, and combined. This script has been tested on
# Mac OS X 10.8 with Ruby 1.8.7, 1.9.1, 1.9.2, and 1.9.3
class Spinner
include Enumerable
def each
loop do
yield '|'
yield '/'