Skip to content

Instantly share code, notes, and snippets.

View gkampolis's full-sized avatar
📈

George Kampolis gkampolis

📈
  • Scotland, UK
View GitHub Profile
@gkampolis
gkampolis / installing_virt_manager.md
Last active March 1, 2021 11:16 — forked from diffficult/installing_virt_manager.md
Easy instructions to get virt-manager qemuv/kvm running on Arch

Easy instructions to get QEMU/KVM and virt-manager up and running on Arch

  1. Make sure your cpu support kvm with below command:

     grep -E "(vmx|svm)" --color=always /proc/cpuinfo
    
  2. Make sure BIOS have enable “Virtualization Technology”.

  3. User access to /dev/kvm so add your account into kvm(78) group:

@gkampolis
gkampolis / capslock_remap_alt.ahk
Created June 27, 2019 20:40 — forked from Danik/capslock_remap_alt.ahk
Autohotkey Capslock Remapping Script. Makes Capslock function as a modifier key to get cursor keys etc. on the left side of the keyboard, so you never have to move your hand to the right.
; Autohotkey Capslock Remapping Script
; Danik
; More info at http://danikgames.com/blog/?p=714
; danikgames.com
;
; Functionality:
; - Deactivates capslock for normal (accidental) use.
; - Hold Capslock and drag anywhere in a window to move it (not just the title bar).
; - Access the following functions when pressing Capslock:
; Cursor keys - J, K, L, I
library(gapminder)
library(tidyverse)
gapminder %<>% # note the reassignment...
select(country, year, continent, lifeExp) %>%
group_by(continent, country) %>%
mutate(le_delta = lifeExp - lag(lifeExp)) %>%
summarize(worst_le_delta = min(le_delta, na.rm = TRUE)) %>%
arrange(worst_le_delta) %>%
head(5)
library(gapminder)
library(tidyverse)
##======================================================================
## Returns the first 5 countries with the worst drop in life expectancy.
##======================================================================
gapminder %>%
select(country, year, continent, lifeExp) %>%
group_by(continent, country) %>%
@gkampolis
gkampolis / plot_aligned_series.R
Last active February 13, 2018 14:31 — forked from tomhopper/plot_aligned_series.R
Align multiple ggplot2 graphs with a common x axis and different y axes, each with different y-axis labels.
#' When plotting multiple data series that share a common x axis but different y axes,
#' we can just plot each graph separately. This suffers from the drawback that the shared axis will typically
#' not align across graphs due to different plot margins.
#' One easy solution is to reshape2::melt() the data and use ggplot2's facet_grid() mapping. However, there is
#' no way to label individual y axes.
#' facet_grid() and facet_wrap() were designed to plot small multiples, where both x- and y-axis ranges are
#' shared acros all plots in the facetting. While the facet_ calls allow us to use different scales with
#' the \code{scales = "free"} argument, they should not be used this way.
#' A more robust approach is to the grid package grid.draw(), rbind() and ggplotGrob() to create a grid of
#' individual plots where the plot axes are properly aligned within the grid.

Keybase proof

I hereby claim:

  • I am gkampolis on github.
  • I am gkampolis (https://keybase.io/gkampolis) on keybase.
  • I have a public key ASBzQhmGGLDz-svR7xqUqoe0Rk6-F6zTKVoQ3yBV8qzZMgo

To claim this, I am signing this object:

### Keybase proof
I hereby claim:
* I am gkampolis on github.
* I am gkampolis (https://keybase.io/gkampolis) on keybase.
* I have a public key whose fingerprint is EE9C 33D0 CF4F 2433 7665 9DBA F56C E594 CA4E 655C
To claim this, I am signing this object: