layout | author | title | revision | version | description |
---|---|---|---|---|---|
default |
mattmc3 |
Modern SQL Style Guide |
2019-01-17 |
1.0.1 |
A guide to writing clean, clear, and consistent SQL. |
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
library(tidyverse) | |
scooby_data <- read.csv("https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2021/2021-07-13/scoobydoo.csv") | |
x <- | |
scooby_data %>% | |
select(season, title, | |
starts_with("caught"), | |
starts_with("captured"), | |
starts_with("unmask"), |
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
# I struggled with uploading things to Microsoft Graph API/Sharepoint/OneDrive for business | |
# here's the code that finally worked for me. | |
library(AzureGraph) | |
library(httr) | |
# Creates authentication token via browser | |
graph_token <- AzureGraph::create_graph_login()$token | |
# Send a PUT request to the Microsoft Graph API |
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
library(tidyverse) | |
library(deldir) | |
library(packcircles) | |
packing <- circleProgressiveLayout(x=runif(1000)) %>% mutate(id=row_number()) | |
data_gg <- circleLayoutVertices(packing, npoints = 36) %>% | |
inner_join(packing %>% select(id,radius), by=c("id")) | |
dxy1 <- deldir(packing$x, packing$y) |
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
library(shiny) | |
ui <- shinyUI(fluidPage( | |
titlePanel("Testing File upload"), | |
sidebarLayout( | |
sidebarPanel( | |
fileInput('file_input', 'upload file ( . pdf format only)', accept = c('.pdf')) | |
), |
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
library(ggiraph) | |
library(maps) | |
shinyServer(function(input, output, session) { | |
selected_car <- reactive({ | |
if( is.null(input$plot_selected)){ | |
character(0) | |
} else input$plot_selected |
The dplyr
package in R makes data wrangling significantly easier.
The beauty of dplyr
is that, by design, the options available are limited.
Specifically, a set of key verbs form the core of the package.
Using these verbs you can solve a wide range of data problems effectively in a shorter timeframe.
Whilse transitioning to Python I have greatly missed the ease with which I can think through and solve problems using dplyr in R.
The purpose of this document is to demonstrate how to execute the key dplyr verbs when manipulating data using Python (with the pandas
package).
dplyr is organised around six key verbs:
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
//* http://gasolicious.com/remove-tabs-keep-product-description-woocommerce/ | |
// Location: add to functions.php | |
// Output: removes woocommerce tabs | |
remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_product_data_tabs', 10 ); |
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
# Python port of Paul Bourke's http://local.wasp.uwa.edu.au/~pbourke/fractals/lyapunov/gen.c | |
# By Johan Bichel Lindegaard - http://johan.cc | |
import math | |
import random | |
from PIL import Image, ImageDraw | |
import argparse | |
import os | |
parser = argparse.ArgumentParser(description='Search for chaos.') |
NewerOlder