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
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
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 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
%% Set the overall document-class properties: | |
\documentclass[12pt,a4paper]{article} | |
%% Use and configure packages: | |
\usepackage{color} | |
\usepackage[T1]{fontenc} | |
\usepackage[top=3cm,left=2.5cm,right=2.5cm,bottom=3cm]{geometry} | |
\usepackage{graphicx} | |
\usepackage{hyperref} | |
\usepackage{palatino} |
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
no | name | abbr | code | |
---|---|---|---|---|
1 | january | jan | F | |
2 | february | feb | G | |
3 | march | mar | H | |
4 | april | apr | J | |
5 | may | may | K | |
6 | june | jun | M | |
7 | july | jul | N | |
8 | august | aug | Q | |
9 | september | sep | U |
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
## Increase the width for wider screens: | |
options("width"=140) | |
## Change the prompt: | |
options(prompt="R> ") | |
## Set digits to 4 while printing: | |
options(digits=4) | |
## Set penalty for scientific notation while printing: |
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
##' Retrieves and evaluates a remote R source file. | |
##' | |
##' @param file defines a URL as the remote source file path | |
##' @param local indicates if the remote source should be evaluated in | |
##' the environment which calls remoteSource. If FALSE (default), | |
##' evaluated in the global environment. | |
##' @param verbose indicates if verbose output should be printed. | |
##' @param echo indicates if the source should be echoed before | |
##' evaluation. | |
##' @return result of evaluating the remote source. |
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
code | name | zips | |
---|---|---|---|
1 | Raffles Place, Cecil, Marina, People's Park | 01 | |
1 | Raffles Place, Cecil, Marina, People's Park | 02 | |
1 | Raffles Place, Cecil, Marina, People's Park | 03 | |
1 | Raffles Place, Cecil, Marina, People's Park | 04 | |
1 | Raffles Place, Cecil, Marina, People's Park | 05 | |
1 | Raffles Place, Cecil, Marina, People's Park | 06 | |
2 | Anson, Tanjong Pagar | 07 | |
2 | Anson, Tanjong Pagar | 08 | |
3 | Queenstown, Tiong Bahru | 14 |
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
############################################################################## | |
# Copyright 2012 Vehbi Sinan Tunalioglu # | |
# # | |
# Licensed under the Apache License, Version 2.0 (the "License"); # | |
# you may not use this file except in compliance with the License. # | |
# You may obtain a copy of the License at # | |
# # | |
# http://www.apache.org/licenses/LICENSE-2.0 # | |
# # | |
# Unless required by applicable law or agreed to in writing, software # |