Skip to content

Instantly share code, notes, and snippets.

==>sh medstack.sh init index run
*** Initializing server on localhost:8080 with medstack.settings.base
*** Running all tests
Syncing...
Traceback (most recent call last):
File "manage.py", line 9, in <module>
execute_from_command_line(sys.argv)
File "//anaconda/lib/python2.7/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
utility.execute()
File "//anaconda/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute
==>sh medstack.sh init index run
*** Initializing server on www.lvh.me:8080 with medstack.settings.base
*** Running all tests
Traceback (most recent call last):
File "manage.py", line 9, in <module>
execute_from_command_line(sys.argv)
File "//anaconda/lib/python2.7/site-packages/django/core/management/__init__.py", line 385, in execute_from_command_line
utility.execute()
File "//anaconda/lib/python2.7/site-packages/django/core/management/__init__.py", line 354, in execute
django.setup()
@nivir
nivir / Django Secret Key Setting
Last active December 6, 2016 21:28
Django Error Secret Key Empty
==>python manage.py runserver
Traceback (most recent call last):
File "manage.py", line 8, in <module>
execute_from_command_line(sys.argv)
File "//anaconda/lib/python2.7/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
utility.execute()
File "//anaconda/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "//anaconda/lib/python2.7/site-packages/django/core/management/base.py", line 242, in run_from_argv
self.execute(*args, **options.__dict__)
@nivir
nivir / latex_escape.py
Created November 2, 2016 15:45 — forked from ptigas/latex_escape.py
latex escape
# -*- encoding: utf-8 -*-
def latex_decode( s ) :
'''
A simple function which taks a latex escaping command
and returns the appropriate unicode character according
to this table (via wikipedia):
LaTeX command Sample Description
\`{o} ò grave accent
@nivir
nivir / gist:8a145cbba72b921810e08a9f3a527495
Created November 2, 2016 15:44 — forked from ptigas/gist:1444735
MapReduce example in python
'''
Playing with MapReduce in python
ref.
http://mikecvet.wordpress.com/2010/07/02/parallel-mapreduce-in-python/
'''
from multiprocessing import Pool
def generate_data(A = 90000, B = 20) :
return [ [ [j] for j in range(B)] for i in range(A)]
@nivir
nivir / gist:100829b8625999143d5c5705cc6dc250
Created November 2, 2016 15:11 — forked from ptigas/gist:2820165
linked list implementation in python
class Node :
def __init__( self, data ) :
self.data = data
self.next = None
self.prev = None
class LinkedList :
def __init__( self ) :
self.head = None
{
"Body": {
"ErrorCode": 500,
"FaultMessage": "id cannot be null or empty",
"IsTransient": false,
"StackTrace": "System.ArgumentException: id cannot be null or empty\u000d\u000a at Microsoft.Exchange.Clients.Owa2.Server.Core.AttachmentRetriever.CreateInstance(String id, CallContext callContext)\u000d\u000a at Microsoft.Exchange.Clients.Owa2.Server.Core.GetAttachment.InternalExecute()\u000d\u000a at Microsoft.Exchange.Services.Wcf.ServiceCommand`1.DetectDuplicatedCallOrExecute()\u000d\u000a at Microsoft.Exchange.Services.Wcf.ServiceCommand`1.Execute()\u000d\u000a at Microsoft.Exchange.Clients.Owa2.Server.Core.OWAService.GetFileAttachment(String id, Boolean isImagePreview, Boolean asDataUri)\u000d\u000a at SyncInvokeGetFileAttachment(Object , Object[] , Object[] )\u000d\u000a at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)\u000d\u000a at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc
@nivir
nivir / git-blame-club.txt
Created September 18, 2016 20:24 — forked from ldodds/git-blame-club.txt
Git Blame Club
Welcome to Git Blame Club.
The first rule of Git Blame Club is: you do not blame other people.
The second rule of Git Blame Club is: you DO NOT blame other people!
Third rule of Fight Club: if someone yells "CONFLICT!", goes limp, or taps out, the blaming is over.
Fourth rule: only two branches to a merge.
Fifth rule: one merge at a time, everyone.
Sixth rule: the merges are command-line. No editors, no GUIs.
Seventh rule: merges will go on as long as they have to.
And the eighth and final rule: if this is your first day at Git Blame Club, you have to commit.
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDIFU6JCJQ6hQEIJaXVxhSXhZKWar+jOWlVp/eYOv9RxYDtbmLFf9UNTRVpc6Ae5FakeV/iHjfEXY76YJLc7sMXp6+Xt1fvTsaQY/RqdgLPcKPXd7euG44fwNia8+3pL24psFf5qE+YG/ZEJYW+wEkqUU7zECyKjFXAQHdsVKg3+Wm2eO3Y6BDTpEv0mA0gw81TvIPBwGGOBh/JsWPZxBpYYCFlJmroItt9Iy9RpiWFGAx+eYew9qbUAzwsBbqq4yagbOueNIWYKunZBW4S98bbZ1/WCzSgwMFbsAiDMITlxZi1AeIEdx292qzi/ENlQxKrlDqyMcqITryXAfs2SquB [email protected]
@nivir
nivir / .bash_profile
Created July 30, 2016 10:48 — forked from natelandau/.bash_profile
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management