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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
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
| SHELL := /bin/bash | |
| # Makefile for Reheating presentation in MDpress | |
| #----------------------------- | |
| # This is the file-name.md to | |
| # be processed by mdpress | |
| #----------------------------- | |
| MDFILE = reheating_press | |
| #----------------------------- |
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
| def getRunTime(theFunction, **kwargs): | |
| timeStart = time.time() | |
| theFunction(**kwargs) | |
| timeFinish = time.time() | |
| print 'Time elapsed:{}'.format(timeFinish - timeStart) |
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
| SHELL := /bin/bash | |
| # ==================== | |
| # Author: elchinot7 | |
| # Mail: elchinot7@mail.com | |
| # Date: Today | |
| # ==================== | |
| # Makefile for LaTeX file: | |
| # ==================== | |
| FILE ?= my_Latex_doc | |
| # ==================== |
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
| s = "some string with words" | |
| put_value_in_list = s.split() | |
| last_word = put_value_in_list[-1] | |
| print last_word |
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
| def progressbar(advance, total, mark='=', bar_length=None): | |
| """ | |
| Print Progress Bar in terminal: | |
| ARGS: | |
| advance (int): Typically is a ``loop for index``. | |
| total (int): The total number of steps in the ``loop for`` | |
| mark (str): Is the mark used inside the progress bar. | |
| Default is '=' | |
| bar_lenght (float): Is the window-ratio to be filled by the |
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
| warning_plot: | |
| ifeq ($(RUN_NAME), last_run) | |
| $(call example_line,"plot") | |
| @exit 1 | |
| endif | |
| warning_replot: | |
| ifeq ($(RUN_NAME), last_run) | |
| $(call example_line,"replot") | |
| @exit 1 |
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
| snippet docs "Python Document Info" b! | |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| """ | |
| File: ${1:`!v vim_snippets#Filename('$1.py', 'foo.py')`} | |
| Author: ${2:`!v g:snips_author`} | |
| Email: ${3:`!v g:snips_email`} | |
| Github: ${4:`!v g:snips_github`} | |
| Description: ${5:INFO} |
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
| snippet docs "Makefile Info" b! | |
| SHELL := /bin/bash | |
| #----------------------------------------------- | |
| # __ __ _ __ _ _ | |
| # | \/ | __ _| | _____ / _(_) | ___ | |
| # | |\/| |/ _ | |/ / _ \ |_| | |/ _ \ | |
| # | | | | (_| | < __/ _| | | __/ | |
| # |_| |_|\__,_|_|\_\___|_| |_|_|\___| | |
| # | |
| #----------------------------------------------- |
OlderNewer