Skip to content

Instantly share code, notes, and snippets.

View AdeelK93's full-sized avatar

Adeel Khan AdeelK93

View GitHub Profile
@nathansutton
nathansutton / r_version
Last active September 15, 2021 23:56
translate an h2o model into sql
{r}
translate <- function(fit){
### return the sql translation of a h2o.glm model ###
# safety
stopifnot(class(fit) %in% c("H2OBinomialModel","H2ORegressionModel"))
stopifnot(.hasSlot(fit, "algorithm"))
stopifnot(.hasSlot(fit, "model"))
@miraculixx
miraculixx / example.MD
Last active February 29, 2024 16:34
Python multiprocess parallel selenium web scraping with improved performance

How to run this

(output as of September 29, 2023)

$ python scraper.py
Does flying slower actually save fuel?
Is non-consented video recording admissable evidence in a civil trial in Maryland?
Iteration counts of AMG solver changes in parallel

Two switch flyback converter MOSFETs voltage stress

@conormm
conormm / r-to-python-data-wrangling-basics.md
Last active April 24, 2024 18:22
R to Python: Data wrangling with dplyr and pandas

R to python data wrangling snippets

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:

@shantanusingh
shantanusingh / Tesseract-Amazon-AMI.md
Last active September 19, 2023 10:10
Tesseract on Amazon-AMI

sudo yum update

##Install Redis https://gist.github.com/dstroot/2776679

wget https://raw.github.com/gist/2776679/04ca3bbb9f085b192f6aca945120fe12d59f15f9/install-redis.sh
chmod 777 install-redis.sh
./install-redis.sh