Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| import scala.concurrent.Await | |
| import scala.concurrent.ExecutionContext | |
| import scala.concurrent.Future | |
| import scala.concurrent.blocking | |
| import scala.concurrent.duration.Deadline | |
| import scala.concurrent.duration.Duration | |
| import scala.concurrent.duration.DurationInt | |
| import scala.concurrent.duration.DurationLong | |
| import scala.concurrent.future | |
| import scala.concurrent.promise |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| import java.util.ArrayList; | |
| import java.util.List; | |
| import android.content.Context; | |
| import android.graphics.Typeface; | |
| import android.view.LayoutInflater; | |
| import android.view.View; | |
| import android.view.ViewGroup; | |
| import android.widget.ArrayAdapter; | |
| import android.widget.TextView; |
| /* | |
| * Copyright (C) 2013 Square, Inc. | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
| function dex-method-count() { | |
| cat $1 | head -c 92 | tail -c 4 | hexdump -e '1/4 "%d\n"' | |
| } | |
| function dex-method-count-by-package() { | |
| dir=$(mktemp -d -t dex) | |
| baksmali $1 -o $dir | |
| for pkg in `find $dir/* -type d`; do | |
| smali $pkg -o $pkg/classes.dex | |
| count=$(dex-method-count $pkg/classes.dex) | |
| name=$(echo ${pkg:(${#dir} + 1)} | tr '/' '.') |
| //Install Macports. | |
| //Install aircrack-ng: | |
| sudo port install aircrack-ng | |
| //Install the latest Xcode, with the Command Line Tools. | |
| //Create the following symlink: | |
| sudo ln -s /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport /usr/sbin/airport | |
| //Figure out which channel you need to sniff: | |
| sudo airport -s | |
| sudo airport en1 sniff [CHANNEL] |
| import java.io.IOException; | |
| import java.util.Properties; | |
| import kafka.server.KafkaConfig; | |
| import kafka.server.KafkaServerStartable; | |
| public class KafkaLocal { | |
| public KafkaServerStartable kafka; | |
| public ZooKeeperLocal zookeeper; |
| import sys,os | |
| def decodeSpeech(hmmd,lmdir,dictp,wavfile): | |
| """ | |
| Decodes a speech file | |
| """ | |
| try: | |
| import pocketsphinx as ps | |
| import sphinxbase |
| function boyer_moore_horspool(haystack, needle) { | |
| var badMatchTable = {}; | |
| var maxOffset = haystack.length - needle.length; | |
| var offset = 0; | |
| var last = needle.length - 1; | |
| var scan; | |
| // Generate the bad match table, which is the location of offsets | |
| // to jump forward when a comparison fails | |
| Array.prototype.forEach.call(needle, function (char, i) { |
| /* | |
| * Copyright (C) 2006 The Android Open Source Project | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |