Skip to content

Instantly share code, notes, and snippets.

View b-adams's full-sized avatar

Prof. Bryant E Adams b-adams

  • Wells College
  • Aurora NY
View GitHub Profile
@b-adams
b-adams / slicing_visualizer.py
Last active January 20, 2017 14:22 — forked from anonymous/Visualize where Python slicing happens
Visualize where Python slicing happens
def show_slicing(text, start=0, stop=None, step=1):
if step<1:
print("Sorry, reverse stepping not supported in this visualization")
else:
sliced_text = text[start:stop:step]
lead_space = ' '*start+'|'
marker = '^' + (step-1)*' '
(marks, tail) = divmod(len(text)-start, step)
untruncated_markline = lead_space + marker*marks + 'x'*tail

In Sourcetree, click the "Terminal" button to open your working directory in the Terminal Type pico .gitignore Replace the line that says

xcuserdata

with

*.xcscheme

xcschememanagement.*