Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
# -*- coding: utf-8 -*-
import csv
import codecs
import numpy as np
import MeCab
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.cluster import KMeans, MiniBatchKMeans
@pixyzehn
pixyzehn / introrx.md
Created November 15, 2015 10:33 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
#!/usr/bin/perl -w
@lines = `perldoc -u -f atan2`
foreach (@lines) {
s/\w<([^>]+)>/\U$1/g;
print;
}
#!/usr/bin/perl -w
print "Enter a string: ";
$str = <STDIN>;
print "Enter a number of times : ";
chomp($num = <STDIN>);
$result = $str x $num;
print "The result is : \n$result";
@pixyzehn
pixyzehn / FRP iOS Learning resources.md
Created February 10, 2016 15:46 — forked from JaviLorbada/FRP iOS Learning resources.md
The best FRP iOS resources.

Videos

#!/usr/bin/env xcrun swift -F Carthage/Build/Mac
import Foundation
import Markingbird
protocol Streamable {
var title: String { get }
var body: String { get }
}
@pixyzehn
pixyzehn / Coordinator.swift
Created April 9, 2016 08:07 — forked from AliSoftware/Coordinator.swift
Coordinators & StateMachine - Concept
struct Coordinator {
let window: UIWindow
let navCtrl: UINavigationController?
func start() {
presentWelcomeScreen()
}
private func presentWelcomeScreen() {
let vc = WelcomeScreenViewController() // Instanciate from code, XIB, Storyboard, whatever your jam is
@pixyzehn
pixyzehn / Fresh macOS Setup.md
Created November 27, 2016 11:59 — forked from ashfurrow/Fresh macOS Setup.md
All the stuff I do on a fresh macOS Installation

Apps to install from macOS App Store:

  • Tweetbot
  • CopyClip 2
  • GIF Brewery
  • Slack
  • Deckset
  • Keynote/Pages/Numbers
  • 1Password
  • OmniFocus 2
@pixyzehn
pixyzehn / unwrap.md
Created November 27, 2016 14:27 — forked from erica/unwrap.md

Better Unwrapping

Introduction

This proposal redesigns common unwrapping tasks:

// gem install cocoapods-playgrounds
// pod playgrounds LibYAML
// Update: @floriankugler had a great idea to use UnsafeBufferPointer
// Paste in the following:
import LibYAML
public struct YAMLError: ErrorType {