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
#!/usr/bin/env bash | |
# Convenience script for setting up docker and docker-compose on Ubuntu. | |
# Steps essentially copied and pasted from: | |
# https://docs.docker.com/install/linux/docker-ce/ubuntu/ | |
# https://docs.docker.com/compose/install/ | |
# Uninstall any existing docker installations | |
sudo apt-get remove docker docker-engine docker.io containerd runc |
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
FROM rocker/rstudio | |
RUN /rocker_scripts/install_tidyverse.sh | |
RUN Rscript -e "install.packages(c('cowplot', 'poweRlaw', 'pbmcapply', 'devtools', 'tidyverse', 'data.table', 'bit64', 'nloptr', 'furrr', 'future', 'future.batchtools', 'igraph', 'caret', 'see', 'flexclust', 'ggrepel', 'tsne', 'R.utils', 'Hmisc', 'reticulate'))" | |
RUN apt-get -y update && apt-get -y install libglpk40 | |
RUN Rscript -e "devtools::install_github('behavioral-ds/evently')" | |
RUN Rscript -e "evently::setup_ampl('/home/rstudio')" | |
RUN echo "PATH=$PATH:/home/rstudio/ampl" >> /home/rstudio/.Renviron | |
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 | |
ENV PATH /opt/conda/bin:$PATH |
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(bit64) | |
twepoch <- as.integer64('1288834974657') | |
base <- as.integer64(2) | |
datacenter_id_bits <- 5 | |
worker_id_bits <- 5 | |
sequence_id_bits <- 12 | |
max_datacenter_id <- 1 * base^datacenter_id_bits | |
max_worker_id <- 1 * base^worker_id_bits | |
max_sequence_id <- 1 * base^sequence_id_bits |
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
git clone --depth=1 https://github.com/vim/vim.git | |
cd vim | |
./configure --with-features=huge \ | |
--enable-multibyte \ | |
--enable-rubyinterp=yes \ | |
--enable-pythoninterp=yes \ | |
--with-python-config-dir=/usr/lib/python2.7/config \ | |
--enable-python3interp=yes \ | |
--with-python3-config-dir=/usr/lib/python3.5/config \ | |
--enable-perlinterp=yes \ |
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
#!/bin/bash | |
tmux new-session \; \ | |
split-window -h \; \ | |
send-keys 'htop' C-m \; \ | |
rename-window desktop \; \ | |
new-window \; \ | |
send-keys 'ssh cray' C-m \; \ | |
split-window -h \; \ | |
send-keys 'ssh cray' C-m \; \ |
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
#!/bin/bash | |
# Author: Maxwel Leite | |
# Website: http://needforbits.wordpress.com/ | |
# Description: Script to install Microsoft Vista TrueType Fonts (TTF) aka Microsoft’s ClearType fonts on Ubuntu distros | |
# Microsoft added a group of new "ClearType Fonts" to Windows with Windows Vista and Office 2007. | |
# These fonts are named Constantia, Corbel, Calibri, Cambria (and Cambria Math), Candara, and Consolas. | |
# Calibri became the default font on Microsoft Word 2007, and it’s still the default font on Word 2016 today. | |
# Dependencies: wget, fontforge and cabextract | |
# Note: Microsoft no longer provides the PowerPoint Viewer 2007 (v12.0.4518.1014) or any version anymore for download | |
# Tested: Ubuntu Saucy/Trusty/Xenial/Bionic |
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
@inproceedings{Rizoiu2018a, | |
abstract = {Serious concerns have been raised about the role of `socialbots' in manipulating public opinion and influencing the outcome of elections by retweeting partisan content to increase its reach. Here we analyze the role and influence of socialbots on Twitter by determining how they contribute to retweet diffusions. We collect a large dataset of tweets during the 1st U.S. presidential debate in 2016 and we analyze its 1.5 million users from three perspectives: user influence, political behavior (partisanship and engagement) and botness. First, we define a measure of user influence based on the user's active contributions to information diffusions, i.e. their tweets and retweets. Given that Twitter does not expose the retweet structure -- it associates all retweets with the original tweet -- we model the latent diffusion structure using only tweet time and user features, and we implement a scalable novel approach to estimate influence over all possible unfoldings. Next, w |
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
from urllib import parse | |
import re | |
import argparse | |
def return_md_image(latex_string): | |
return '}) + '&mode=inline)' | |
def convert_md(input_file, outputfile): | |
with open(input_file, 'r') as ifile: | |
content = ''.join(ifile.readlines()) |
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
### General | |
########################################################################### | |
# Scrollback/History limit | |
set -g history-limit 2048 | |
# Index Start | |
set -g base-index 1 | |
# Mouse |
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
sudo launchctl unload /System/Library/LaunchDaemons/com.apple.audio.coreaudiod.plist && sudo launchctl load /System/Library/LaunchDaemons/com.apple.audio.coreaudiod.plist |
NewerOlder