(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
#!/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 |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
#!/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"; |
#!/usr/bin/env xcrun swift -F Carthage/Build/Mac | |
import Foundation | |
import Markingbird | |
protocol Streamable { | |
var title: String { get } | |
var body: String { get } | |
} |
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 |
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 { |