Skip to content

Instantly share code, notes, and snippets.

View georggr's full-sized avatar
🏠
Working from home

George Georgiadis georggr

🏠
Working from home
View GitHub Profile
@georggr
georggr / r_python_homebrew.sh
Created October 22, 2017 13:04 — forked from pachadotdev/r_python_homebrew.sh
Install R and Python via Homebrew
# See http://pacha.hk/2017-07-12_r_and_python_via_homebrew.html
# XCode CLT
xcode-select --install
# Update Homebrew and add formulae
brew update
# Check for broken dependencies and/or outdated packages
brew doctor
@georggr
georggr / classifytext.R
Created November 25, 2017 06:32 — forked from primaryobjects/classifytext.R
Simple example of classifying text in R with machine learning (text-mining library, caret, and bayesian generalized linear model). Classify. tfidf tdm term document matrix
library(caret)
library(tm)
# Training data.
data <- c('Cats like to chase mice.', 'Dogs like to eat big bones.')
corpus <- VCorpus(VectorSource(data))
# Create a document term matrix.
tdm <- DocumentTermMatrix(corpus, list(removePunctuation = TRUE, stopwords = TRUE, stemming = TRUE, removeNumbers = TRUE))
@georggr
georggr / Cluster NHL Players.R
Created November 29, 2017 07:47 — forked from Btibert3/Cluster NHL Players.R
Basic Web Mining with R
###############################################################################
# Author: @BrockTibert
#
# Used: R Version 2.12.1, Windows 7 Pro, StatET Plugin for Eclipse
#
#
###############################################################################
#-----------------------------------------------------------------------
# set up script level basics
@georggr
georggr / rmongodb-tutorial.md
Created December 18, 2017 15:18 — forked from Btibert3/rmongodb-tutorial.md
Basic Overview of using the rmongodb package for R.

rmongodb Tutorial

This is a quick document aimed at highlighting the basics of what you might want to do using MongoDB and R. I am coming at this, almost completely, from a SQL mindset.

Install

The easiest way to install, I believe, is

@georggr
georggr / cpustatus.sh
Created May 5, 2018 08:44 — forked from ecampidoglio/cpustatus.sh
A Bash script that prints the current state of the CPU on a Raspberry Pi. It displays variables like temperature, voltage and speed.
#!/bin/bash
# cpustatus
#
# Prints the current state of the CPU like temperature, voltage and speed.
# The temperature is reported in degrees Celsius (C) while
# the CPU speed is calculated in megahertz (MHz).
function convert_to_MHz {
let value=$1/1000
echo "$value"
@georggr
georggr / Python3, Pip3, Virtualenv and Virtualenvwrapper Setup
Created May 7, 2018 06:11 — forked from IamAdiSri/Python3, Pip3, Virtualenv and Virtualenvwrapper Setup
Setting up and using Python3, Pip3, Virtualenv (for Python3) and Virtualenvwrapper (for Python3)
First install pip for Python2. Download the get-pip.py file from https://bootstrap.pypa.io/get-pip.py
$ cd <download location>
$ sudo -H python ./get-pip.py
Installing pip also installs Python3
To run Python3
$ python3
Install pip3 by just executing the same file as in the step above, but this time using Python3
$ sudo -H python3 ./get-pip.py
@georggr
georggr / README.md
Created July 16, 2020 10:17 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


@georggr
georggr / DisplayTextInputWordCount.js
Created July 3, 2022 11:57 — forked from marketinview/displayTextInputWordCount.js
Qualtrics: Display count of words in a text entry box. Option to limit number of words. #qualtrics #js #jq #text #count #word #limit
Qualtrics.SurveyEngine.addOnload(function() {
var maxWords = 0; //update as needed, 0=no limit
var q = jQuery("#"+this.questionId);
var input = q.find(".InputText");
input.after("<div style='font-size:0.8em;float:right'>Word count: <span class='wordCount'>0</span><span class='maxWords'></span></div>");
var display = q.find(".wordCount");
if(maxWords > 0) q.find('.maxWords').text("/"+maxWords);
countWords(input.get(0));
input.on("input", function() { countWords(this) });
input.blur(function() { this.value = this.value.trim(); });
@georggr
georggr / CUDA-12-1-1-pytorch.md
Created June 1, 2023 04:23 — forked from Birch-san/CUDA-12-1-1-pytorch.md
Installing CUDA 12.1.1 + PyTorch nightly + Python 3.10 on Ubuntu 22.10

Installing CUDA 12.1.1 + PyTorch nightly + Python 3.10 on Ubuntu 22.10

Should you keep your NVIDIA driver?

CUDA 12.1.1 toolkit is gonna offer to install Nvidia driver 530 for us. It's from New Feature branch. It's likely to be newer than the default Nvidia driver you would've installed via apt-get (apt would prefer to give you 525, i.e. Production Branch).

If you're confident that you already have a new enough Nvidia driver for CUDA 12.1.1, and you'd like to keep your driver: feel free to skip this "uninstall driver" step.

But if you're not sure, or you know your driver is too old: let's uninstall it. CUDA will install a new driver for us later.