Skip to content

Instantly share code, notes, and snippets.

Vehbi Sinan Tunalioglu vst

Block or report user

Report or block vst

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@vst
vst / packages.list
Last active Nov 9, 2018
List of Debian/Ubuntu Packages I usually need on a fresh installation
View packages.list
ack
axel
curl
emacs
git
htop
jq
mc
network-manager
pandoc
@vst
vst / macro.vba
Created Sep 19, 2018
Open/Libre Office Save All Sheets as CSV
View macro.vba
' Run the SaveAllAsCSV subroutine.
' Creates a CSV file from the active sheet under the given directory.
'
' Based on https://forum.openoffice.org/en/forum/viewtopic.php?t=41284
sub SaveAsCSV(filename As String)
' Declare the document variable:
dim document as object
' Get the document:
View sample.pl
#!/usr/bin/env perl
=head1 NAME
sample.pl - Sample Perl Script
=head1 SYNOPSIS
perl sample.pl
perldoc sample.pl
View casts.py
"""
Provides a cast operations module.
>>> cast_to_decimal(1.0001)
Decimal('1.0001')
>>> cast_to_decimal(1)
Decimal('1')
>>> cast_to_decimal("1.0001")
Decimal('1.0001')
>>> cast_to_decimal(Decimal("1.0001"))
View setup.py
"""
Provides the setup module.
"""
from ___YOURMODULE___ import __version__
from setuptools import setup
from setuptools import find_packages
import os
## The absolute directory path:
View currencies.py
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>
View multiplicity.py
from enum import Enum
from math import inf
class Multiplicity(Enum):
"""
Defines multiplicities.
>>> Multiplicity.OPTIONAL.min
0
View SampleRenjinGRE.java
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;
View bitbackup.py
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}"
@vst
vst / changelog.sh
Created Nov 3, 2014
Changelog preperation script for Git repositories
View changelog.sh
#!/bin/bash
########################################################################
# Description:
# Produces custom ChangeLog file contents out of the "git log"
#
# Usage:
# sh changelog.sh
#
# Usage (Save output):
You can’t perform that action at this time.