This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
trans = pd.read_csv("2014-04-02-exported_transactions.csv", parse_dates=[0]) | |
trans = trans[trans.Pending == False] | |
trans = trans[["Date","Amount","Description","Memo"]] | |
trans = trans.copy(deep=True) | |
trans["Inflow"] = trans.Amount.map(lambda x: x if x > 0 else 0) | |
trans["Outflow"] = trans.Amount.map(lambda x: -x if x <= 0 else 0) | |
del trans["Amount"] | |
trans["Payee"] = trans["Description"] | |
del trans["Description"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
trans = pd.read_csv("2014-05-06-exported_transactions.csv", parse_dates=[0]) | |
trans = trans[trans.Pending == False] | |
trans = trans[["Date","Amount","Description","Memo"]] | |
trans = trans.copy(deep=True) | |
trans["Inflow"] = trans.Amount.map(lambda x: x if x > 0 else 0) | |
trans["Outflow"] = trans.Amount.map(lambda x: -x if x <= 0 else 0) | |
del trans["Amount"] | |
trans["Payee"] = trans["Description"] | |
del trans["Description"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from warnings import warn | |
from collections import Counter | |
from streamparse.bolt import Bolt | |
class WordCounter(Bolt): | |
def initialize(self, conf, ctx): | |
self.counts = Counter() |
Most of the arts, as painting, sculpture, and music, have emotional appeal to the general public. This is because these arts can be experienced by some one or more of our senses. Such is not true of the art of mathematics; this art can be appreciated only by mathematicians, and to become a mathematician requires a long period of intensive training. The community of mathematicians is similar to an imaginary community of musical composers whose only satisfaction is obtained by the interchange among themselves of the musical scores they compose.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tdhopper@~/repos/parsely/ptrack/streamparse (streamparse-dev) [feature/visitor-metrics] $ streamparse stats -e 0.9 -n index | |
# Topology summary | |
+-------+----------------------+--------+------------+--------------+----------------+------------+ | |
| name | id | status | uptime | workersTotal | executorsTotal | tasksTotal | | |
+-------+----------------------+--------+------------+--------------+----------------+------------+ | |
| index | index-367-1407431678 | ACTIVE | 2h 30m 12s | 8 | 85 | 85 | | |
+-------+----------------------+--------+------------+--------------+----------------+------------+ | |
# Spouts (All time) | |
+-----------------------+---------+-------------+-----------------+--------+--------+ | |
| spoutId | emitted | transferred | completeLatency | acked | failed | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"_score": 1.0, | |
"_type": "url", | |
"_id": "epicurious.com-http://www.epicurious.com/recipes/food/views/Balsamic-Strawberries-with-Whipped-Mascarpone-Cheese-105321-1hour-2014.08.06.18", | |
"_source": { | |
"metrics": { | |
"other/returning/entrance_view": 1, | |
"other/$all/page_view": 2, | |
"$any/returning/entrance_view": 1, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
path.conf: "/Users/tdhopper/es-config" | |
path.logs: "/Users/tdhopper/es-logs" | |
index.indexing.slowlog.threshold.index.warn: 10s | |
index.indexing.slowlog.threshold.index.info: 0s | |
index.indexing.slowlog.threshold.index.debug: 0s | |
index.indexing.slowlog.threshold.index.trace: 0s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INPUT_PATH <- "~/Dropbox/Text Notes/Weight.txt" | |
OUTPUT_PATH <- "~/Dropbox/Text Notes/Weight Stats.txt" | |
library(lubridate) | |
library(ggplot2) | |
library(zoo) | |
# READ FILE | |
con <- file(INPUT_PATH, "rt") | |
lines <- readLines(con) |
OlderNewer