snipt

Ctrl+h for KB shortcuts

Bash

ignore all of the pyc files

svn propset svn:ignore '*.pyc' library/python
https://snipt.net/embed/37d6e79c2558f375dc5d65d4e1a11c8f/
/raw/37d6e79c2558f375dc5d65d4e1a11c8f/
37d6e79c2558f375dc5d65d4e1a11c8f
bash
Bash
1
2019-05-09T11:40:45
True
False
False
/api/public/snipt/1016/
ignore-all-of-the-pyc-files
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>svn propset svn:ignore <span class="s1">&#39;*.pyc&#39;</span> library/python </span></pre></div> </td></tr></table>
python, svn

Python

create an alias/partial in python

1
2
3
# create a partial that can be applied using map with the give size
checkThisSize = functools.partial(checkSize, size=options.size, quiet=False)
checked = map(checkThisSize, queues)
https://snipt.net/embed/d87ad598037174ab3e56867222140fae/
/raw/d87ad598037174ab3e56867222140fae/
d87ad598037174ab3e56867222140fae
python
Python
4
2019-05-21T01:18:01
True
False
False
/api/public/snipt/985/
create-an-aliaspartial-in-python
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="c1"># create a partial that can be applied using map with the give size</span> </span><span id="L-2"><a name="L-2"></a><span class="n">checkThisSize</span> <span class="o">=</span> <span class="n">functools</span><span class="o">.</span><span class="n">partial</span><span class="p">(</span><span class="n">checkSize</span><span class="p">,</span> <span class="n">size</span><span class="o">=</span><span class="n">options</span><span class="o">.</span><span class="n">size</span><span class="p">,</span> <span class="n">quiet</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span> </span><span id="L-3"><a name="L-3"></a><span class="n">checked</span> <span class="o">=</span> <span class="nb">map</span><span class="p">(</span><span class="n">checkThisSize</span><span class="p">,</span> <span class="n">queues</span><span class="p">)</span> </span></pre></div> </td></tr></table>
functional, partial, python