Skip to content

Instantly share code, notes, and snippets.

@aparrish
aparrish / understanding-word-vectors.ipynb
Last active July 9, 2024 15:59
Understanding word vectors: A tutorial for "Reading and Writing Electronic Text," a class I teach at ITP. (Python 2.7) Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@zedar
zedar / ApacheHadoop_NativeLibs.adoc
Last active August 13, 2020 00:59
Add native libraries to Apache Hadoop installation

Apache Hadoop - add native libraries

If native libraries are not available the following message is displayed with every hadoop command: hadoop checknative

WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
  • Clone hadoop source code


@ohad7
ohad7 / Tweaks.swift
Last active August 22, 2019 11:49
Mixpanel A/B Testing in Swift
//
// Copyright (c) 2015 Nexar Inc. - All Rights Reserved. Proprietary and confidential.
//
// Unauthorized copying of this file, via any medium is strictly prohibited.
import Foundation
import Mixpanel
public class Tweaks : NSObject, MPTweakObserver {
@garthk
garthk / profile
Created June 21, 2015 23:51
boot2docker 1.7.0 cert fix
wait4eth1() {
CNT=0
until ip a show eth1 | grep -q UP
do
[ $((CNT++)) -gt 60 ] && break || sleep 1
done
sleep 1
}
wait4eth1
@neilellis
neilellis / README.md
Last active December 7, 2019 22:51
An example Blue/Green deployment using Tutum and Cloudflare (for DNS)

Expects one argument the name of the production stack file for Tutum.

(see https://support.tutum.co/support/solutions/articles/5000569899-stacks )

Requires these environment variables to be set

  • CLOUDFLARE_DOMAIN - root domain of your app, e.g. example.com
  • CLOUDFLARE_KEY - your Cloudflare API key
  • CLOUDFLARE_EMAIL - your Cloudflare email address e.g. fred@example.com
  • PROJECT_NAME - a short name for your project e.g. example
@nl5887
nl5887 / transfer.fish
Last active March 22, 2022 09:07
Bash and zsh alias for transfer.sh. Transfers files and directories to transfer.sh.
function transfer
if test (count $argv) -eq 0
echo "No arguments specified. Usage:\necho transfer /tmp/test.md\ncat /tmp/test.md | transfer test.md"
return 1
end
## get temporarily filename, output is written to this file show progress can be showed
set tmpfile ( mktemp -t transferXXX )
## upload stdin or file

How to wrap Objective-C APIs that take arbitrary block types for RubyMotion.

In this example –that focusses on YapDatabase– we wrap a Objective-C method that takes C-blocks of arbitrary types:

- (id)initWithSetup:(YapDatabaseSecondaryIndexSetup *)setup
              block:(YapDatabaseSecondaryIndexBlock)block
          blockType:(YapDatabaseSecondaryIndexBlockType)blockType;
Ruby 2.1.0 in Production: known bugs and patches
Last week, we upgraded the github.com rails app to ruby 2.1.0 in production.
While testing the new build for rollout, we ran into a number of bugs. Most of
these have been fixed on trunk already, but I've documented them below to help
anyone else who might be testing ruby 2.1 in production.
@naruse I think we should backport these patches to the ruby_2_1 branch and
release 2.1.1 sooner rather than later, as some of the bugs are quite critical.
I'm happy to offer any assistance I can to expedite this process.
@bensheldon
bensheldon / distribution.rake
Created June 29, 2013 16:23
RubyMotion rake tasks for deployng adhoc and release builds while pushing dsyms to Crittercism and (for adhoc) pushing builds to TestFlight without using any SDKs.
def build_path
"build/iPhoneOS-6.0-Release/"
end
def ipa_name
'"Today\'s Shirts.ipa"'
end
def dsym_name
'"Today\'s Shirts.dSYM"'