Skip to content

Instantly share code, notes, and snippets.

View yanlesin's full-sized avatar

Yan Lyesin yanlesin

View GitHub Profile
@briandconnelly
briandconnelly / README.md
Last active November 13, 2021 23:56
Send a push notification with a message and a ggplot2 object

Send a push notification with a message and a ggplot2 object

ggpushover() allows you to send a push notification to your device that contains a message and a ggplot2 object as an image.

Prerequisites

You will need to have the pushoverr and ggplot2 packages installed. To do this, run:

install.packages(c("pushoverr", "ggplot2"))
library(gt)
library(gtExtras)
library(dplyr)
library(htmltools)
# original source: https://www.bloomberg.com/graphics/2021-german-election-results/
party_df <- tibble(
Party = c("SPD", "CDU/CSU", "Greens", "FDP", "AfD", "Left", "Other"),
Seats = c(206, 196, 118, 92, 83, 39, 1),
@marco79cgn
marco79cgn / apple-event.js
Last active September 15, 2020 20:01
Widget which opens the Apple Event Stream on YouTube
let widget = new ListWidget()
widget.setPadding(0,0,0,0)
widget.url = "https://p-events-delivery.akamaized.net/1108byjxmnoakagswdphbwatymztxxew/m3u8/main.m3u8"
widget.backgroundColor = new Color("#FFFFFF")
await loadImage("https://cdn.vertexreport.com/wp-content/uploads/2020/09/Apple-Event-September.jpg")
Script.setWidget(widget)
Script.complete()
@jasonsnell
jasonsnell / purpleaqijsnell.js
Last active October 7, 2020 22:42
Purple AQI Widget
I've moved this to a proper GitHub project.
Check it out at:
https://github.com/jasonsnell/PurpleAir-AQI-Scriptable-Widget
@JohnCoene
JohnCoene / test.R
Last active June 20, 2020 16:03
erer
library(shiny)
ui <- fluidPage(
gioOutput("globe"),
verbatimTextOutput("selected")
)
server <- function(input, output, session) {
output$globe <- renderGio({
#!/usr/bin/env python3
import zipfile
import sys
import re
import xml.etree.ElementTree as ET
namespaces = {
'a': 'http://schemas.openxmlformats.org/drawingml/2006/main',
'r': 'http://schemas.openxmlformats.org/officeDocument/2006/relationships',
@hrbrmstr
hrbrmstr / orig.png
Last active July 16, 2023 06:43
Supreme Annotations - moar splainin here: http://rud.is/b/2016/03/16/supreme-annotations/ - NOTE: this requires the github version of ggplot2
orig.png
@hiilppp
hiilppp / sort.py
Last active February 8, 2019 13:02
Python script to sort lines of text in Pythonista and send them (back) to Drafts.
# To call script from Drafts, use the follwing URL as URL Action:
# <pythonista://sort?action=run&argv=[[draft]]>
import sys
import urllib
import webbrowser
a = sys.argv[1].split("\n")
a.sort(key=str.lower)
a = "\n".join(a)
@mmurdoch
mmurdoch / Github Example.py
Created November 10, 2012 15:08
Example of using github library for Pythonista.
import console
import keychain
import traceback
from github import Github
def printRepository(username):
g = Github(username, getGithubPassword(username))
user = g.get_user()
repositories = user.get_repos()