Skip to content

Instantly share code, notes, and snippets.

View imchoyoung's full-sized avatar
🇧🇷
Working from home

Choyoung Im imchoyoung

🇧🇷
Working from home
  • São Paulo, SP
View GitHub Profile
@martinrusev
martinrusev / imap-search
Last active March 22, 2024 06:50
IMAP Search criteria
@zonque
zonque / xymodem-mini.c
Last active February 27, 2024 06:31
simple xmodem/ymodem implementation in C
/*
* Minimalistic implementation of the XModem/YModem protocol suite, including
* a compact version of an CRC16 algorithm. The code is just enough to upload
* an image to an MCU that bootstraps itself over an UART.
*
* Copyright (c) 2014 Daniel Mack <github@zonque.org>
*
* License: MIT
*/
@jnpaulson
jnpaulson / shiny_server.sh
Last active July 22, 2021 10:45
shiny server
sudo sh -c 'echo "deb http://cran.rstudio.com/bin/linux/ubuntu trusty/" &gt;&gt; /etc/apt/sources.list'
gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9
gpg -a --export E084DAB9 | sudo apt-key add -
sudo apt-get update
sudo apt-get -y install r-base libapparmor1 libcurl4-gnutls-dev libxml2-dev libssl-dev gdebi-core
sudo su - -c "R -e \"install.packages('shiny', repos = 'http://cran.rstudio.com/')\""
sudo su - -c "R -e \"install.packages('devtools', repos='http://cran.rstudio.com/')\""
sudo su - -c "R -e \"devtools::install_github('daattali/shinyjs')\""
sudo su - -c "R -e \"devtools::install_github('bioc/shinyjs')\""
@jmquintana79
jmquintana79 / pandas_to_mongodb.py
Last active July 19, 2021 07:57
Store Pandas dataframe content into MongoDb
from pymongo import MongoClient
from odo import odo
import pandas as pd
# open connection
connection = MongoClient()
# pandas df creation
DF = pd.DataFrame({'A': [1,2,3,4,5,6,7], 'B':[10,20,30,40,50,60,70]})
# database connection
@kdkorthauer
kdkorthauer / RstudioServerSetup.sh
Created October 7, 2016 15:04
Bash script to set up R, install a few R packages, and get Rstudio Server running on ubuntu.
sudo sh -c 'echo "deb http://cran.rstudio.com/bin/linux/ubuntu trusty/" >> /etc/apt/sources.list'
gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9
gpg -a --export E084DAB9 | sudo apt-key add -
sudo apt-get update
sudo apt-get -y install r-base libapparmor1 libcurl4-gnutls-dev libxml2-dev libssl-dev gdebi-core
sudo apt-get install libcairo2-dev
sudo apt-get install libxt-dev
sudo apt-get install git-core
sudo /bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024
@stevekm
stevekm / date.md
Created January 3, 2017 03:37
return ISO compliant timestamp from file modification time datetime
>>> import os
>>> import datetime
>>> file = "my_file.txt"
>>> os.stat(file).st_ctime
1483323862.8774118
>>> os.path.getmtime(file)
1483323862.873167
>>> os.path.getmtime(os.path.getmtime(file))
KeyboardInterrupt