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 console | |
from random import randint, choice, randrange | |
class Board: | |
def __init__(self, xSize=4, ySize=4): | |
self.xSize=xSize | |
self.ySize=ySize | |
self.tiles=[] | |
for i in range(self.ySize): | |
self.tiles.append([]) |
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 <fstream> | |
#include <string> | |
#define STR(x) #x | |
#define STRINGIFY(x) STR((x)) | |
#define ERROR_INFO __FILE__ " : " __FUNCTION__ " : " STRINGIFY(__LINE__) " : " | |
class Error_Logger { | |
private: |
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
template<typename T> | |
int time_it() | |
{ | |
using milliseconds_t = std::chrono::duration < int, std::milli >; | |
//start time | |
auto start = std::chrono::steady_clock::now(); | |
//instantiate class | |
T class_to_time; | |
//do stuff to time it |
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
# Author: Ben Kane | |
cmake_minimum_required(VERSION 3.1) | |
# Name the Project that holds all other projects | |
project(Sandbox) | |
# add warnings to all projects | |
if(MSVC) | |
add_compile_options(/W4 /wd4100) |
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 <vector> | |
#include <string> | |
int main() | |
{ | |
std::string i{"Hello"}; | |
// static_assert(std::is_same<decltype(i), char>(), "Oops!"); | |
std::vector<decltype(i)> v {i}; | |
for(auto i: v) { std::cout << i << std::endl; } |
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
[Desktop Entry] | |
Name=Spyder Python IDE | |
Comment=Edit text files | |
Exec=/home/ben/anaconda3/bin/spyder | |
Terminal=false | |
Type=Application | |
StartupNotify=true | |
MimeType=text/plain; | |
Icon=/home/ben/.local/share/applications/spyder.png | |
Categories=GNOME;GTK;Utility;TextEditor; |
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 <cassert> | |
#include <chrono> | |
#include <iostream> | |
#include <vector> | |
#include <random> | |
// NOTE: All iterator concepts are experimental. I'm not going | |
// to concentrate on them |
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 <iterator> | |
#include <array> | |
#include <string> | |
// I think this will bloat binary size and be slower, | |
// but it's for convenient printing, which is worth it :) | |
// TODO: don't always call by value... | |
// Of course, I'm mostly passing ints and strings, so it's probably not too |
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 | |
# -*- coding: utf-8 -*- | |
# This is just to find out how firefox bookmarks.json files are structured | |
__author__ = "Benjamin Kane" | |
__version__ = "0.1.0" | |
from collections import Counter, defaultdict | |
from functools import reduce |
This file has been truncated, but you can view the full file.
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
2020/01/06 11:46:07 [INFO] Terraform version: 0.12.18 | |
2020/01/06 11:46:07 [INFO] Go runtime version: go1.12.13 | |
2020/01/06 11:46:07 [INFO] CLI args: []string{"/usr/local/bin/terraform", "plan"} | |
2020/01/06 11:46:07 [DEBUG] Attempting to open CLI config file: /Users/bkane/.terraformrc | |
2020/01/06 11:46:07 [DEBUG] File doesn't exist, but doesn't need to. Ignoring. | |
2020/01/06 11:46:07 [INFO] CLI command args: []string{"plan"} | |
2020/01/06 11:46:07 [TRACE] Meta.Backend: built configuration for "local" backend with hash value 73024536 | |
2020/01/06 11:46:07 [TRACE] Preserving existing state lineage "f68ce643-ae51-dd97-2921-b4d60b6fc613" | |
2020/01/06 11:46:07 [TRACE] Preserving existing state lineage "f68ce643-ae51-dd97-2921-b4d60b6fc613" | |
2020/01/06 11:46:07 [TRACE] Meta.Backend: working directory was previously initialized for "local" backend |
OlderNewer