This file contains hidden or 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
| """"""""""""""""""""""" | |
| "--- !! VUNDLE !! --- " | |
| """"""""""""""""""""""" | |
| set shell=/bin/bash | |
| set nocompatible | |
| filetype off | |
| set rtp+=~/.vim/bundle/Vundle.vim | |
| call vundle#begin() | |
| Plugin 'VundleVim/Vundle.vim' |
This file contains hidden or 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 <ctime> | |
| #include <vector> | |
| #include <algorithm> | |
| int main() { | |
| // create vector for storing the calculated times needed for a piece of code to finish | |
| std::vector<float> times; | |
| int counter = 0; |
This file contains hidden or 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
| class bcolors: | |
| HEADER = '\033[95m' | |
| OKBLUE = '\033[94m' | |
| OKGREEN = '\033[92m' | |
| WARNING = '\033[93m' | |
| FAIL = '\033[91m' | |
| ENDC = '\033[0m' | |
| BOLD = '\033[1m' | |
| UNDERLINE = '\033[4m' |
This file contains hidden or 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
| func showNotification() -> Void { | |
| var notification = NSUserNotification() | |
| notification.title = "Test from Swift" | |
| notification.informativeText = "The body of this Swift notification" | |
| notification.soundName = NSUserNotificationDefaultSoundName | |
| NSUserNotificationCenter.defaultUserNotificationCenter().deliverNotification(notification) | |
| } | |
| //showNotification() |
This file contains hidden or 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
| # load image atlas as greyscale | |
| print("loading image: %s" % self.file) | |
| atlas = io.imread(self.file, as_grey=True) | |
| # check atlas size | |
| rows = atlas.shape[0] | |
| cols = atlas.shape[1] | |
| if rows % self.slice_size != 0 or cols % self.slice_size != 0: | |
| print("ERROR: wrong image dimensions, should be multiple of 200") | |
| return |
This file contains hidden or 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 {Directive, ElementRef, Input, OnChanges, OnInit} from '@angular/core'; | |
| import 'rxjs/add/operator/map'; | |
| import {HttpClient, HttpErrorResponse} from "@angular/common/http"; | |
| @Directive({ | |
| selector: '[includeHtml]' | |
| }) | |
| export class IncludeHtmlDirective implements OnInit, OnChanges { |
This file contains hidden or 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
| """"""""""""""""""""""""""" | |
| "--- GENERAL SETTINGS ---" | |
| """"""""""""""""""""""""""" | |
| scriptencoding utf-8 | |
| set enc=utf-8 | |
| set fileencoding=utf-8 | |
| set fileencodings=ucs-bom,utf8,prc | |
| set tabstop=4 | |
| set shiftwidth=4 |
This file contains hidden or 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
| # ---------------------------- # | |
| # --- GENERAL ZSH SETTINGS --- # | |
| # ---------------------------- # | |
| ZSH=$HOME/.zsh # Path to zsh_cfg.sh | |
| ZSH_THEME="agnoster" # chosen theme | |
| source $ZSH/zsh_cfg.sh # laod zsh config file | |
| # path settings |
This file contains hidden or 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
| """"""""""""""""""""""""""" | |
| "--- GENERAL SETTINGS ---" | |
| """"""""""""""""""""""""""" | |
| scriptencoding utf-8 | |
| set enc=utf-8 | |
| set fileencoding=utf-8 | |
| set fileencodings=ucs-bom,utf8,prc | |
| set tabstop=4 | |
| set shiftwidth=4 |
This file contains hidden or 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
| function groupBy(array: any[], f): any { | |
| const groups = {}; | |
| array.forEach(function (o) { | |
| const group = JSON.stringify(f(o)); | |
| groups[group] = groups[group] || []; | |
| groups[group].push(o); | |
| }); | |
| return Object.keys(groups).map(function (group) { | |
| return groups[group]; | |
| }); |