Skip to content

Instantly share code, notes, and snippets.

View loveplay1983's full-sized avatar

michaelxuan loveplay1983

View GitHub Profile
@loveplay1983
loveplay1983 / md
Created June 17, 2018 21:41
gist test
test
@omaciel
omaciel / tips_and_tricks.md
Last active August 31, 2021 14:54
A collection of Python tips and tricks

Flatten a dictionary

  In [1]: k = {'name': 'Og Maciel', 'age': 40, 'mansions': '', 'kids': 3}
  In [2]: ' '.join("--{!s}={!r}".format(key,val) for (key,val) in k.iteritems())
  "--age=40 --kids=3 --name='Og Maciel' --mansions=''"

Run Unittest TestCase from IPython

THIS DOCUMENT

IS OUT OF

DATE

C++ Coding Standards Part 0: Automated Code Analysis

Automated analysis is the main advantage to working with a modern statically typed compiled language like C++. Code analysis tools can inform us when we have implemented an operator overload with a non-canonical form, when we should have made a method const, or when the scope of a variable can be reduced.

@indyfromoz
indyfromoz / aspnet-mvc.gitignore
Created November 19, 2012 06:44
.Gitignore for ASP.NET MVC
###################
# compiled source #
###################
*.com
*.class
*.dll
*.exe
*.pdb
*.dll.config
*.cache