[[ True False False  True  True  True  True  True  True False False  True    True  True  True  True  True  True  True  True  True  True  True  True   False False  True  True  True  True False False False  True  True  True   False False False  True  True  True  True  True  True  True False False    True  True  True False False  True]  [ True False False  True  True  True  True  True  True  True  True  True    True False False  True  True  True False False  True  True False False   False False False False  True  True False False False  True  True False   False False False False  True  True  True False False False False False   False False False False False False]]   assuming the outcome of bw_np = numpy.asarray(bw) is a list of lists althought i don't see commas, no commas between elements within sublists either?  What i tried:  for element in bw_np:     for sub in element:         sub = sub*1         print(sub) print(bw_np)
Alright, I'm toying around with converting a PIL image object back and forth to a numpy array so I can do some faster pixel by pixel transformations than PIL's PixelAccess object would allow.  I've figured out how to place the pixel information in a useful 3D numpy array by way of:  pic = Image.open("foo.jpg") pix = numpy.array(pic.getdata()).reshape(pic.size[0], pic.size[1], 3)   But I can't seem to figure out how to load it back into the PIL object after I've done all my awesome transforms.  I'm aware of the putdata() method, but can't quite seem to get it to behave.
How can I convert timestamps in a column to a date? I have a file containing this:  1415602803,LOGIN SUCCESS,AUTH,user2,192.168.203.63,10.146.124.73,59996,22 1415602807,LOGIN SUCCESS,AUTH,user1,172.24.31.10,172.32.1.1,48191,22 1415602811,LOGIN FAILED,AUTH,root,172.24.166.153,10.146.124.73,52506,22 1415602815,LOGIN FAILED,AUTH,user3,192.168.123.55,10.146.32.99,55750,22   I want to convert the timestamp to a date in this format:  2014-11-10 02:00:03,LOGIN SUCCESS,AUTH,user2,192.168.203.63,10.146.124.73,59996,22 2014-11-10 02:00:07,LOGIN SUCCESS,AUTH,user1,172.24.31.10,172.32.1.1,48191,22 2014-11-10 02:00:11,LOGIN FAILED,AUTH,root,172.24.166.153,10.146.124.73,52506,22 2014-11-10 02:00:15,LOGIN FAILED,AUTH,user3,192.168.123.55,10.146.32.99,55750,22   How can I do that?  I know this works: perl -pe 's/(\d+)/localtime($1)/e' (from ) but the output format is Mon Nov 10 02:00:03 2014.  I know this command can convert timestamps into my desired output: date -d@1415602803 +"%F %H:%M:%S", but I couldn't make it work with awk using system("cmd") because of all the quotations and whatnot. Set HDMI sound output automatically on connect/disconnect I have a dual screen setup on my laptop (using 12.04 LTS) using a HDMI connected display. Everything works fine, but everytime I connect/disconnect the cable I have to go to Sound preferences and change the sound output device manually.  Is there any way to change the sound output device on connect/disconnection of cable, so when I connect my display the sound output is set to HDMI and when I disconnect it the sound goes back to laptop speakers? Cannot make a static reference to the non-static method How to mix three different shaders on the same material? I am looking for an app that can monitor my C: (system) drive and find which program is creating a folder, with the rather generic name TEMP1\, on that drive.  I wouldn't mind if it could hook the creation of files too – as there a couple of files created as well (quite probably from another process). Google does not help me, as the names of those files are a bit generic too (not as TEMP1 though – dvmaccounts.ini and dvmexp.idx).   The problem is that every time I delete those, they are recreated on startup, so the utility I'm searching must start up on boot and also start fast. It should also be really clever, as my C: drive is huge. There are so called "point releases" for LTS versions of Ubuntu. 10.04.3 for instance.  What are those "point releases" releases? Capitalization for a bullet list So: I have a Gantt chart created with pgfgantt where in order to fit my pages I have included  x unit=1.4cm,y unit chart=6mm   in its preamble.  This means that milestone shapes are spread out horizontally.  How can I change the vertical and horizontal units of a Gantt chart in a way which doesn't affect the aspect ratios of elements like milestones? Every time Windows 10 runs updates (which I see no way to control), it updates my graphics driver.  I like the old one because it is faster.  So, I have to reinstall it.  This is getting to be a pain.  Is there any way to stop Windows 10 from updating it again? Number of non decreasing sequences of length $M$ How many non decreasing sequences are there of length $M$, provided the number in the sequences are allowed from $1,2,3,...,N$? I'm trying some things with my shell. This includes the following command:  kill $$  My expectation was that the shell would log me out and terminate itself. But instead the bash persists without change.   Any idea why?  I ran this command on different environments (archlinux, debian). The behavior was always the same. Is there a tool that combines zcat and cat transparently? When handling log files, some end up as gzipped files thanks to logrotate and others not. So when you try something like this:  $ zcat *   you end up with a command line like zcat xyz.log xyz.log.1 xyz.log.2.gz xyz.log.3.gz and then with:  gzip: xyz.log: not in gzip format   Is there a tool that will take the magic bytes, similar to how file works, and use zcat or cat depending on the outcome so that I can pipe the output to grep for example?  NB: I know I can script it, but I am asking whether there is a tool out there already. With biblatex, is it possible to replace one author of an author list by a bibnamedash or idem string? With biblatex, the author can be replaced by a dash (or “idem”) in the bibliography. Is it possible to have this replacement also if there are multiple authors, and the first of these multiple authors is the same as the author of the book listed before? (It is somewhat difficult to describe, see the attached example instead, where “Buchautor, Hans-Wilhelm” should be replaced in book3 as well.)   I assume that it should be possible by customising \DeclareNameFormat, but I don’t know how.  Minimal example:  \documentclass{scrartcl} \usepackage[T1]{fontenc} \usepackage[latin1]{inputenc} \usepackage[english]{babel} \usepackage{csquotes} \usepackage{filecontents} \begin{filecontents}{\jobname.bib} @BOOK{book1,   author = {Buchautor, Hans-Wilhelm},   title = {Irgendein Buch},   location = {Buch am Wald},   date = {2000} } @BOOK{book2,   author = {Buchautor, Hans-Wilhelm},   title = {Ein anderes Buch},   location = {Berlin},   date = {2001} } @BOOK{book3,   author = {Buchautor, Hans-Wilhelm and Zweitautor, Zoran},   title = {Noch ein Buch},   location = {London and New York},   date = {2010} } \end{filecontents}  \usepackage[ style=authortitle, backend=bibtex8 ]{biblatex} \bibliography{\jobname}  \renewcommand*{\bibnamedash}{%   \bibstring[\mkbibbold]{idem\thefield{gender}}}  \begin{document} \nocite{*}  \printbibliography \end{document}   Edit 15/02/2011 17:14   I should have added that there was a feature request for biber which pointed back to biblatex. See .  Edit 21/06/2011 9:26  Is this somehow possible now with biblatex 1.4/1.5? I played a bit with uniquename/uniquelist, but I could not get it to work. Fontconfig warning: "/etc/fonts/conf.d/90-fonts-unfonts-core.conf" I am getting the following error frequently. (Example: when running zenity,firefox etc. commands / applications.)  Fontconfig warning: "/etc/fonts/conf.d/90-fonts-unfonts-core.conf", line 11: Having multiple values in &lt;test&gt; isn't supported and may not work as expected   Here is contents of file /etc/fonts/conf.d/90-fonts-unfonts-core.conf:  &lt;?xml version="1.0"?&gt; &lt;!DOCTYPE fontconfig SYSTEM "fonts.dtd"&gt; &lt;fontconfig&gt;     &lt;match target="font"&gt;         &lt;test name="family" qual="any"&gt;             &lt;string&gt;은 바탕&lt;/string&gt;&lt;string&gt;UnBatang&lt;/string&gt;                 &lt;string&gt;은 돋움&lt;/string&gt;&lt;string&gt;UnDotum&lt;/string&gt;                 &lt;string&gt;은 궁서&lt;/string&gt;&lt;string&gt;UnGungseo&lt;/string&gt;                 &lt;string&gt;은 필기&lt;/string&gt;&lt;string&gt;UnPilgi&lt;/string&gt;                 &lt;string&gt;은 그래픽&lt;/string&gt;&lt;string&gt;UnGraphic&lt;/string&gt;         &lt;/test&gt;          &lt;edit name="antialias" mode="assign" binding="strong"&gt;&lt;bool&gt;true&lt;/bool&gt;&lt;/edit&gt;         &lt;edit name="hinting"   mode="assign" binding="strong"&gt;&lt;bool&gt;false&lt;/bool&gt;&lt;/edit&gt;         &lt;edit name="autohint"  mode="assign" binding="strong"&gt;&lt;bool&gt;true&lt;/bool&gt;&lt;/edit&gt;         &lt;edit name="hintstyle" mode="assign" binding="strong"&gt;&lt;const&gt;hintslight&lt;/const&gt;&lt;/edit&gt;     &lt;/match&gt; &lt;/fontconfig&gt;   How to solve it? (a) Determine which Fibonacci numbers are even. Use a form of mathematical induction to prove your conjecture. (b) Determine which Fibonacci numbers are divisible by 3. Use a form of mathematical induction to prove your conjecture  I understand that for part a that all multiples of 3 of n are even. So F(0),F(3),F(6)... I just don't understand how to prove it.  For part B it is the same thing except multiples of 4  Please help, thank you! How do ability score improvements improve modifiers? First time player in a group figuring out things as we all go.  I just hit level four as a Ranger, and I get to improve one ability score of my choice by 2, or I can increase two ability scores of my choice by 1.  My first thought was Strength, as I've been rocking a score of 11 with a mod of +0 so far. But I read that Rangers use (wisdom mod + 10) for their spell casting modifier. Currently my wisdom is 13, with a mod of +1. If I increase either STR or WIS, will the modifier increase as well? How and why?  A Monk in our party went from 9 CON to 11 during their ability score improvement, and by doing so their modifier went from −1 to 0.  We're all pretty new, so between eight people we're currently sharing one book, and all trying to locate our own copies for later campaigns. That's making it… inefficient for us to learn these things quickly. Please Join Us in Welcoming Our New Meta Stack Exchange Moderators! Idiom that means trying to save something that is beyond saving It's on the tip of my tongue.  Example: "Replacing the hard drive of this computer would be [idiom]. It's going to fail completely soon enough." This is a general, community wiki question regarding duplicate content.  If your question was closed as a duplicate of this question and you feel that the information provided here does not provide a sufficient answer, please open a discussion on .     What does Google consider to be duplicate content? Will the way I am presenting my content result in a duplicate content penalty? How can I avoid having my site's content treated as duplicate content? Hide page numbering but retain header/footer I would like to remove page numbering on a specific page. However, the header and footer should remain intact. If I try:  \thispagestyle{empty}   The header and footer disappear. What is the recommended way of removing just the page number?