Skip to content

Instantly share code, notes, and snippets.

@cheung31
cheung31 / windows-bootstrap.ps1
Last active February 26, 2020 23:01
Script to bootstrap Windows 10 install with apps via Chocolatey
######### INSTRUCTIONS ##########
# 1) Download this file to your computer
# 2) Open Windows PowerShell (Run as Administrator)
# 3) Run: Set-ExecutionPolicy RemoteSigned; & <PATH_TO_SCRIPT>/windows-bootstrap.ps1;
Write-Host "Ryan's Chocolatey Bootstrap Script"
Write-Host "... installing choco package manager"
# You must ensure Get-ExecutionPolicy is not Restricted.
# We suggest using Bypass to bypass the policy to get things installed

Amazingandyyy Golden Picks 2018 Sentiment Analysis

This is a quick synopsis of the Golden Picks 2018 to hold until Q3 using the languagecrunch Sentiment endpoint (utilizes Spacy).

Terms

  • polarity: whether the expressed opinion in a document, a sentence or an entity feature/aspect is positive, negative, or neutral. Advanced, "beyond polarity" sentiment classification looks, for instance, at emotional states such as "angry", "sad", and "happy". (Source: Wikipedia)
  • subjectivity: The subjectivity of words and phrases may depend on their context and an objective document may contain subjective sentences (e.g., a news article quoting people's opinions). (Source: Wikipedia

✊ HODL Picks

0xA4B8E4DebeA63f2583056Cf119faF41109dd61fB
@cheung31
cheung31 / docker-compose.yml
Created September 6, 2017 05:51
Docker Compose to start the scrapinghub/splash container
version: '2'
services:
scrapy:
image: scrapinghub/splash:latest
ports:
- "8050:8050"
@cheung31
cheung31 / .eslintrc
Created August 11, 2017 19:03
Sane/Strict .eslintrc for React applications
{
"extends": "airbnb",
"env": {
"browser": true,
"amd": true,
"commonjs": true,
"jest": true,
"mocha": true,
"node": true,
"es6": true

The future is here: Classless object-oriented programming in JavaScript.

Douglas Crockford, author of JavaScript: The Good parts, recently gave a talk called The Better Parts, where he demonstrates how he creates objects in JavaScript nowadays. He doesn't call his approach anything, but I will refer to it as Crockford Classless.

Crockford Classless is completely free of class, new, this, prototype and even Crockfords own invention Object.create.

I think it's really, really sleek, and this is what it looks like:

function dog(spec) {
@cheung31
cheung31 / livefyre.load.js
Created November 3, 2012 18:30 — forked from ogorzalka/livefyre.load.js
Livefyre - Chinese Traditional Localized strings
(function () {
var articleId = fyre.conv.load.makeArticleId(null);
fyre.conv.load({
"strings": {
"signIn": "註冊",
"signInGuest": "Se connecter en invit\u00e9",
"signOut": "D\u00e9connexion",
"editProfile": "\u00c9diter le profil",
"siteAdmin": "Administration",
"postButton": "郵寄",