This file contains hidden or 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 | |
import numpy as np | |
import time | |
from datetime import datetime | |
from calendar import monthrange | |
import locale | |
import os | |
locale.setlocale(locale.LC_ALL, 'en_US') |
This file contains hidden or 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 __future__ import print_function | |
from apiclient import discovery | |
from httplib2 import Http | |
from oauth2client import file, client, tools | |
IMG_FILE = 'google-slides.png' # use your own! | |
TMPLFILE = 'title slide template' # use your own! | |
SCOPES = ( | |
'https://www.googleapis.com/auth/drive', |
This file contains hidden or 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
tell application "Keynote" | |
activate | |
set thisDocument to make new document with properties ¬ | |
{height:764, width:1024, document theme:theme "White"} | |
tell thisDocument | |
tell slide 1 | |
set the base slide to master slide "Title - Top" of thisDocument | |
set the object text of the default title item to "Revenue" |
This file contains hidden or 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 os | |
import random | |
x = random.sample(range(1, 100), 3) | |
x = list(map(str, x)) | |
y = ', '.join(x) | |
cmd = """ | |
osascript -e ' | |
This file contains hidden or 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 json | |
import pygal | |
from requests_oauthlib import OAuth1Session | |
desk = OAuth1Session('client', | |
client_secret='XXX', | |
resource_owner_key='XXX', | |
resource_owner_secret='XXX') | |
url = 'https://yourdomain.desk.com/api/v2/insights3/reports' | |
data = '{"fields": ["case_creates", "case_resolves"], "time": {"min": "2015-01-01T00:00:00-08:00", "max": "2017-01-15T00:00:00-08:00", "window_size": "month"}}' |
This file contains hidden or 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
// Unique Slack WebHook to post payload (obtained from Slack API website) | |
// Replace 'XXX' with the unique WebHook URL generated for your application | |
var webhookUrl = 'https://hooks.slack.com/services/XXX'; | |
// Function that sends payload message to Slack upon form submit | |
function onSubmit(e) { | |
// Get most recent form submission as array of fields |
This file contains hidden or 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
%matplotlib inline | |
import delighted | |
import matplotlib.pyplot as plt | |
import pandas as pd | |
import numpy as np | |
# Add your Delighted API key — https://delighted.com/account/api | |
delighted.api_key = 'INSERT API KEY HERE' | |
x = delighted.SurveyResponse.all(order='desc:updated_at', per_page=100) |
This file contains hidden or 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
--- | |
layout: none | |
--- | |
<?xml version="1.0" encoding="utf-8"?> | |
<feed xmlns="http://www.w3.org/2005/Atom" > | |
<generator uri="https://jekyllrb.com/" version="3.8.5">Jekyll</generator> | |
<link href="{{ site.url }}/feed.xml" rel="self" type="application/atom+xml" /> | |
<link href="{{ site.url }}" rel="alternate" type="text/html" /> | |
<updated>2020-02-20T17:02:57-08:00</updated> | |
<id>{{ site.url }}/feed.xml</id> |
This file contains hidden or 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 tweepy | |
ACCESS_TOKEN = '...' | |
ACCESS_SECRET = '...' | |
CONSUMER_KEY = '...' | |
CONSUMER_SECRET = '...' | |
def connect_to_twitter_OAuth(): | |
auth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET) | |
auth.set_access_token(ACCESS_TOKEN, ACCESS_SECRET) |
This file contains hidden or 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
[{"body":{"type":"text-short","publishedAt":1621010885463,"sequence":3,"username":"stallman","address":"0x68c6b1CEa2D655435f3Cf36E6b9F27Af9B31D518","data":{"text":"I did write some code in Java once, but that was the island in Indonesia."},"prevMerkleRoot":"0xe176d2cb262a5e379b7865ec60ba87f4b59710b1560fe32b29672bd12c77c2d7"},"merkleRoot":"0x23c0ad7f2fbae0db3c699b82007a2f3b19ffbe8e99daa5d3ea558c0d18806114","signature":"0x9c2db3dc1f09459147abbb5a686f812c80810d3c46d0078f43b2b7fe9512cdd31e9869f7a75257bf8c15c46b1d473cfec751ca28c8a8ecc2006d7ef11d63f6f61b"},{"body":{"type":"text-short","publishedAt":1621010874991,"sequence":2,"username":"stallman","address":"0x68c6b1CEa2D655435f3Cf36E6b9F27Af9B31D518","data":{"text":"No person, no idea, and no religion deserves to be illegal to insult, not even the Church of Emacs."},"prevMerkleRoot":"0x0e3d4cd0cf749c904ccd393d1d2a13661d428fb2095449760132429a2398e2e6"},"merkleRoot":"0xe176d2cb262a5e379b7865ec60ba87f4b59710b1560fe32b29672bd12c77c2d7","signature":"0xda1eee4d428b15475c |