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
#!/bin/bash | |
## **Description:** Creates a folder named `CRAN` in the same folder | |
## as this script and mirrors/syncs master CRAN repository to the | |
## `CRAN` folder. | |
# Get the script path: | |
SCRIPTPATH=$( cd $(dirname $0) ; pwd -P ) | |
# Get the mirror path: |
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
;; Declares the variable for the destination folder. | |
(defvar *vst-tmdfile-folder* "/tmp") | |
;; Defines the function which creates a temporary markdown file in the | |
;; destination folder. | |
(defun vst-tmdfile () | |
(interactive) | |
(find-file (format "%s/%s.md" | |
*vst-tmdfile-folder* | |
(format-time-string "%Y-%m-%dT%T")))) |
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
#!/bin/bash | |
# For Mac OSX :| | |
pcal -w -P a4 -F 1 -t Garamond -d Garamond | open -a preview -f |
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
/** | |
* Constructs a random string with the given length and character set. | |
* | |
* If no character set is provided, default character set will be used. | |
*/ | |
function randstr (length, charset) { | |
// (Re)define the charset: | |
charset = charset || 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; | |
// construct and return: |
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
#!/bin/bash | |
######################################################################## | |
# Description: | |
# Produces custom ChangeLog file contents out of the "git log" | |
# | |
# Usage: | |
# sh changelog.sh | |
# | |
# Usage (Save 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
from collections import OrderedDict | |
import base64 | |
import json | |
import urllib2 | |
import sys | |
import datetime | |
## Define Bitbucket API endpoints: | |
ENDPOINT_REPOSITORIES = "https://api.bitbucket.org/2.0/repositories/{handle}?page={page}" |
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 org.moeaframework.core.Algorithm; | |
import org.moeaframework.core.Solution; | |
import org.moeaframework.core.spi.AlgorithmFactory; | |
import org.moeaframework.core.variable.Grammar; | |
import org.moeaframework.problem.AbstractProblem; | |
import org.moeaframework.util.grammar.ContextFreeGrammar; | |
import org.moeaframework.util.grammar.Parser; | |
import org.renjin.sexp.SEXP; | |
import javax.script.ScriptEngine; |
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 enum import Enum | |
from math import inf | |
class Multiplicity(Enum): | |
""" | |
Defines multiplicities. | |
>>> Multiplicity.OPTIONAL.min | |
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
from enum import Enum | |
from decimal import Decimal | |
class Currency: | |
""" | |
Defines an ISO 4217 compatible currency object model. | |
>>> Currency("XXX", "My Currency", 2) | |
<Currency XXX 2 My Currency> |
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
""" | |
Provides the setup module. | |
""" | |
from ___YOURMODULE___ import __version__ | |
from setuptools import setup | |
from setuptools import find_packages | |
import os | |
## The absolute directory path: |