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 datetime | |
def get_datetimestamp(sep_date="", sep_group="_", sep_time="", moment=None): | |
""" | |
Returns string representation of datetime objects. | |
By default, the value will look like "20121212_120102" and it | |
is safe to use it on file names. |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
TODO:doc here | |
""" | |
def main(): | |
""" |
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
using System; | |
using System.Collections.Generic; | |
public class Program | |
{ | |
public static void Main() | |
{ | |
List<string> listed = new List<string>() {"1", "2", "3", "4"}; | |
Console.WriteLine(">" + string.Join("-", listed)); | |
// >1-2-3-4 |
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
using System; | |
public class Program | |
{ | |
public static void Main() | |
{ | |
// simple string interpolation | |
string someString = @" | |
Do you have a {0} {1} ? | |
"; |
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
namespace SomeNamespace | |
{ | |
using System; | |
class CustomException : Exception | |
{ | |
public CustomException() | |
: base() { } | |
public CustomException(string message) |
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
def get_logger(): | |
""" | |
Returns a logger object that can directly be used. | |
It is a single function singleton, | |
it returns the same object each time it is called. | |
Do not forget to change: | |
logger_name = "defaultlogger" | |
logger_file_path = "log1.log" |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
Traverses all the Python packages and upgrades them. | |
""" | |
from __future__ import print_function | |
from __future__ import unicode_literals |
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
if has("win16") || has("win32") || has("win64") | |
else | |
endif |
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
try | |
source $HOME/_vimrc_local | |
catch /^Vim\%((\a\+)\)\=:E484/ | |
endtry |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# ############################# | |
# R E A D M E | |
# | |
# | |
# # Requirements | |
# |