(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.
(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.
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
# | |
# Hi all, | |
# this is the Python code I used to make the visualization "Temperature circle" | |
# (https://twitter.com/anttilip/status/892318734244884480). | |
# Please be aware that originally I wrote this for my tests only so the | |
# code was not ment to be published and is a mess and has no comments. | |
# Feel free to improve, modify, do whatever you want with it. If you decide | |
# to use the code, make an improved version of it, or it is useful for you | |
# in some another way I would be happy to know about it. You can contact me | |
# for example in Twitter (@anttilip). Unchecked demo data (no quarantees) |
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script> |
I have an updated version of this on my blog here: https://chrisamico.com/blog/2023-01-14/python-setup/.
This is my recommended Python setup, as of Fall 2022. The Python landscape can be a confusing mess of overlapping tools that sometimes don't work well together. This is an effort to standardize our approach and environments.
# The following code goes in your ~/.profile | |
# | |
# This propmpt shows a beer when you launch a Terminal window on a Fridays. | |
# It checks every time you get a new prompt. A minute after 11:59M on a | |
# Thursday, if you press enter, it will add beer to the prompt. A minute | |
# after 11:59 PM on a Friday, no more beer. | |
# | |
# This is for terminals that use the Bash shell, which was the default for | |
# MacOS previous to Catalina. |
--- | |
title: "How does your BMI measure up?" | |
output: flexdashboard::flex_dashboard | |
runtime: shiny | |
--- | |
Inputs {.sidebar} | |
------------------------------------- | |
```{r} |
from github import Github | |
import os | |
g = Github(os.getenv("GITHUB_TOKEN")) | |
u = g.get_user("....") | |
for repo in u.get_repos(): | |
print(repo.html_url) | |
value = input("Delete y/n?") | |
if value.lower() == "y": | |
print("Deleting: {}".format(repo.html_url)) |
var request = require ("request"); | |
var urlWebHook = "https://hooks.slack.com/services/abcdef"; //the URL you get on your "incoming web hooks" page. | |
function sendToSlack (s, theUsername, theIconUrl, theIconEmoji, theChannel) { | |
var payload = { | |
text: s | |
}; | |
if (theUsername !== undefined) { | |
payload.username = theUsername; |
Location,Crash Type,Municipality,Year,Crash Count,Latitude,Longitude | |
GRANDVIEW HWY S & TEMPLETON DR,Property damage only,VANCOUVER,2017,1,49.25909,-123.060191 | |
BOUNDARY RD & REGENT ST,Property damage only,VANCOUVER,2017,1,49.259109,-123.023633 | |
VINE ST & W 14TH AVE,Property damage only,VANCOUVER,2017,1,49.259265,-123.157816 | |
E 13TH AVE & WATSON ST,Property damage only,VANCOUVER,2017,1,49.259302,-123.100497 | |
ASH ST & W 13TH AVE,Property damage only,VANCOUVER,2017,3,49.259493,-123.117658 | |
MACDONALD ST & W 14TH AVE,Property damage only,VANCOUVER,2017,3,49.259579,-123.168318 | |
BALACLAVA ST & W 14TH AVE,Property damage only,VANCOUVER,2017,1,49.259663,-123.174155 | |
FIR ST & W 13TH AVE,Property damage only,VANCOUVER,2017,1,49.259853,-123.141183 | |
E 12TH AVE & KINGSWAY & MILLTOWN PL,Property damage only,VANCOUVER,2017,44,49.259878,-123.096571 |