A "Best of the Best Practices" (BOBP) guide to developing in Python.
- "Build tools for others that you want to be built for you." - Kenneth Reitz
- "Simplicity is alway better than functionality." - Pieter Hintjens
| # Complete words from tmux pane(s) {{{1 | |
| # Source: http://blog.plenz.com/2012-01/zsh-complete-words-from-tmux-pane.html | |
| # Gist: https://gist.github.com/blueyed/6856354 | |
| _tmux_pane_words() { | |
| local expl | |
| local -a w | |
| if [[ -z "$TMUX_PANE" ]]; then | |
| _message "not running inside tmux!" | |
| return 1 | |
| fi |
| yonedaLemma = Iso (flip fmap) ($ id) |
| package com.yieldmo.simulation.actor | |
| import akka.actor.{ Actor, ActorSystem, Props, ActorLogging } | |
| import com.yieldmo.simulation.TrafficSimulationProtocol._ | |
| class RandomClick extends Actor with ActorLogging { | |
| // uses 30K in memory per instance. Use wisely | |
| // described http://www.iro.umontreal.ca/~lecuyer/myftp/papers/wellrng.pdf | |
| // better than marsene twister | |
| private val rand = new org.apache.commons.math3.random.Well44497b(scala.compat.Platform.currentTime) |
People
:bowtie: |
😄 :smile: |
😆 :laughing: |
|---|---|---|
😊 :blush: |
😃 :smiley: |
:relaxed: |
😏 :smirk: |
😍 :heart_eyes: |
😘 :kissing_heart: |
😚 :kissing_closed_eyes: |
😳 :flushed: |
😌 :relieved: |
😆 :satisfied: |
😁 :grin: |
😉 :wink: |
😜 :stuck_out_tongue_winking_eye: |
😝 :stuck_out_tongue_closed_eyes: |
😀 :grinning: |
😗 :kissing: |
😙 :kissing_smiling_eyes: |
😛 :stuck_out_tongue: |
| package com.twitter.ads.batch.experimental.amedina.storm.exprolluprt; | |
| import java.util.List; | |
| import org.apache.thrift.TDeserializer; | |
| import org.apache.thrift.protocol.TBinaryProtocol; | |
| import com.twitter.ads.logging.AdEngagementLogEntry; | |
| import com.twitter.ads.realtime.exprolluprt.ExpRollupRTEngKey; |
| wordpress.org 2335856 | |
| youtube.com 2073535 | |
| gmpg.org 1784793 | |
| en.wikipedia.org 1545864 | |
| tumblr.com 1158767 | |
| twitter.com 1036611 | |
| google.com 798348 | |
| flickr.com 715872 | |
| rtalabel.org 657414 | |
| wordpress.com 646766 |
| # How Akka maps to EAI Patterns | |
| Might be up for debate or just plain wrong. Just some notes I scribbled down some time ago. | |
| ----------------------------------------------------------------------------------------------------------------- | |
| EAI PATTERN AKKA PATTERN REFERENCE | |
| ----------------------------------------------------------------------------------------------------------------- | |
| Point to Point Channel Regular Actor Communication http://www.eaipatterns.com/PointToPointChannel.html | |
| Event-Driven Consumer Regular Actor Receive http://www.eaipatterns.com/EventDrivenConsumer.html | |
| Message Selector Actor with Stash http://www.eaipatterns.com/MessageSelector.html |
| object ListUtil { | |
| def dedupe[T](elements:List[T]):List[T] = elements match { | |
| case Nil => elements | |
| case head::tail => head :: dedupe(tail filterNot (_==head)) | |
| } | |
| } | |
| import ListUtil._ |