This re-styles your sublime text sidebar to be dark, it fits default Monokai theme.
Save the Default.sublime-theme file into packages/Theme - Default, make a backup of your original if you want to be able to go back easily.
Based on:
// Copyright (c) 2012 Calvin Rien | |
// http://the.darktable.com | |
// | |
// This software is provided 'as-is', without any express or implied warranty. In | |
// no event will the authors be held liable for any damages arising from the use | |
// of this software. | |
// | |
// Permission is granted to anyone to use this software for any purpose, | |
// including commercial applications, and to alter it and redistribute it freely, | |
// subject to the following restrictions: |
import atomac | |
a=atomac.getAppRefByLocalizedName('Skype') | |
cloud_menu = a.AXChildren[2].AXChildren[0] | |
print cloud_menu | |
# Some apps are coded so menu items aren't populated until they're displayed | |
try: | |
cloud_menu.Press() | |
except atomac.ErrorCannotComplete: | |
# An accessibility bug you'll see sometimes - the app never reports |
from pymongo import Connection | |
if __name__ == '__main__': | |
# Connect to mongo | |
conn = Connection() | |
db = conn['canepi'] | |
# Set the search term | |
term = 'foo' |
This re-styles your sublime text sidebar to be dark, it fits default Monokai theme.
Save the Default.sublime-theme file into packages/Theme - Default, make a backup of your original if you want to be able to go back easily.
Based on:
To remove a submodule you need to:
Picking the right architecture = Picking the right battles + Managing trade-offs
At some point you’ll find yourself in a situation where you need edit a commit message. That commit might already be pushed or not, be the most recent or burried below 10 other commits, but fear not, git has your back 🙂.
git commit --amend
This will open your $EDITOR
and let you change the message. Continue with your usual git push origin master
.
from sklearn.feature_extraction.text import TfidfVectorizer, CountVectorizer | |
from sklearn.decomposition import NMF, LatentDirichletAllocation | |
import numpy as np | |
def display_topics(H, W, feature_names, documents, no_top_words, no_top_documents): | |
for topic_idx, topic in enumerate(H): | |
print "Topic %d:" % (topic_idx) | |
print " ".join([feature_names[i] | |
for i in topic.argsort()[:-no_top_words - 1:-1]]) | |
top_doc_indices = np.argsort( W[:,topic_idx] )[::-1][0:no_top_documents] |
list1 = [102, 306, 918, 2754] | |
list2 = [1, 3, 9, 27] | |
averages = [] | |
for idx1, el1 in enumerate(list1): # first for-loop | |
for idx2, el2 in enumerate(list2): # second for-loop | |
if idx1 == idx2: # check whether the indexes of first * second for-loop match | |
y_intercept = el1/el2 | |
averages.append(y_intercept) | |
>>> averages |