Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 <iostream> | |
#include <map> | |
#include <random> | |
#include <tuple> | |
#include <vector> | |
std::random_device rd; | |
std::mt19937 gen(rd()); | |
typedef std::vector<std::string> pattern; |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 <algorithm> | |
#include <cmath> | |
#include <iostream> | |
#include <random> | |
#include <string> | |
#include <vector> | |
// RGB values | |
// Add arithmetic operations to take means squared deviations | |
struct rgb { |
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
/* solar.cpp: Calculates the solar energy received by places at different | |
* latitudes over the year. It is assumed that the earth revolves around the | |
* sun in a circular orbit taking exactly 365 days | |
* | |
* Author: Raziman T V | |
* | |
* License: | |
* You may use this document for whatever purpose you desire, as long as the | |
* following conditions are satisfied: | |
* 1) You do not use it in a way that suggests that I endorse the use. |
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
primes = [2, 3, 5, 7] | |
parent = [-1, -1, -1, -1] | |
digits = [1, 3, 7, 9] | |
def isprime(N): | |
i = 2 | |
while i * i <= N: | |
if N % i == 0: | |
return False | |
i += 1 |
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 <algorithm> | |
#include <iostream> | |
#include <numeric> | |
#include <set> | |
#include <vector> | |
typedef std::vector<int> triplet; | |
// List all ways to choose K-element subsets of an N-element vector | |
// By abusing next_permutation |
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
"" vimrc file | |
" contains settings for vim and gvim | |
"Vundle========================================================================= | |
set nocompatible | |
filetype off | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
Plugin 'mileszs/ack.vim' | |
Plugin 'vim-scripts/Conque-GDB' |
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
set -g default-terminal "screen-256color" | |
set -g update-environment "TERM_PROGRAM" | |
bind C-y run "tmux save-buffer - | xclip -selection clipboard" | |
set -g mouse on | |
# Toggle mouse on with ^B m | |
bind m \ | |
set -g mouse on \;\ | |
display 'Mouse: ON' |