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
local api = vim.api | |
local scrollview = require('scrollview') | |
local group = 'gitsigns' | |
local add = scrollview.register_sign_spec({ | |
group = group, | |
highlight = 'GitSignsAdd', | |
symbol = ' ', | |
}).name |
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
/*** echo.s ***/ | |
// Description | |
// echo - print arguments to stdout | |
// Synopsis | |
// echo [STRING]... | |
// Build | |
// $ as --32 -o echo.o echo.s | |
// $ ld -m elf_i386 -o echo echo.o |
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 python3 | |
""" | |
Display a table of GPU availability on a Slurm server. | |
Usage: | |
$ scontrol -M gpu show node | gpu_avail.py | |
""" | |
import sys |
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
# fails to properly return true when running sudo -s | |
function is_ssh_from_env() { | |
if [ -n "${SSH_TTY}" ] || \ | |
[ -n "${SSH_CONNECTION}" ] || \ | |
[ -n "${SSH_CLIENT}" ]; then | |
echo "true" | |
else | |
echo "false" | |
fi | |
} |
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 python | |
from __future__ import print_function | |
# Images can be converted to video with ffmpeg. | |
# > ffmpeg -pattern_type glob \ | |
# -i "*.png" \ | |
# -vcodec libx264 \ | |
# output.avi |
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 distutils.spawn import find_executable | |
import glob | |
import os | |
import random | |
import shutil | |
import subprocess | |
import sys | |
STYLE_IMAGES_PATH = 'paint-by-numbers/test' | |
CONTENT_IMAGE_PATH = 'boston.jpg' |
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
#include <cassert> | |
#include <cstdlib> | |
#include <iostream> | |
#include <set> | |
#include <string> | |
#include <vector> | |
#include "revdoor.hpp" | |
using namespace std; |
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
" The amount of time, in milliseconds, until scrollbar hides after scrolling. | |
let s:hide_delay = 800 | |
" Time of the last WinScrolled event | |
let s:scroll_time = 0 | |
" Keep track of pending updates. Ignore updates if there are already pending | |
" updates, to prevent lag. | |
let s:pending = 0 |
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
import java.util.ArrayList; | |
import java.util.HashSet; | |
import java.util.List; | |
import java.util.Set; | |
public class Anagrams { | |
public static List<String> anagrams(String s) { | |
List<String> output = new ArrayList<String>(); | |
if (s.length() == 0) | |
return output; |
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
#include <functional> | |
#include <iostream> | |
#include <numeric> | |
#include <vector> | |
#include <unordered_map> | |
using namespace std; | |
typedef unsigned long ulong; |
NewerOlder