For given input:  x = [('a',11),('a',12),('b',13),('b',14)]   How do i write map function to get output :   x_map = {'a':[11,12], 'b':[13,14]}
I have a list of tuples like this:  [ ('a', 1), ('a', 2), ('a', 3), ('b', 1), ('b', 2), ('c', 1), ]   I want to iterate through this keying by the first item, so, for example, I could print something like this:  a 1 2 3 b 1 2 c 1   How would I go about doing this without keeping an item to track whether the first item is the same as I loop around the tuples? This feels rather messy (plus I have to sort the list to start with)...
Let's say we have a Python script my_script.py that does some data processing with Blender. This script accepts some arguments (e.g. arg1 arg2). How can I forward arguments to the script when using it with the CLI?  blender --background --python my_script.py   The only trick I could find was :  echo "arg1 arg2" &gt; my_input.txt &amp;&amp; blender --background --python my_script.py   Is this really the only way to do that?  Update  I found a  on Stack Overflow. Fine-tuning "Open safe files after downloading" Different Google Searches return different titles for the same page Zooming / Focusing certain parts of a chart in latex I am using pgfplot to draw graphs in latex. Now this is the problem I am facing:  \begin{tikzpicture}[scale=1] \begin{axis}[ybar,grid=major,bar width=2pt,width=8cm, height=8cm,xmin=1,xmax=540,ymin=1,ymax=240] \addplot [draw=black,fill=green]  table [x=size, y=cluster, col sep=comma] {sim-0.4-0.6.csv}; \end{axis} \end{tikzpicture}   It generates the following graph:    Since, I have values mainly between 0-50 on x-axis, I want to zoom there. After that, values comes around 500. S0, there are no graph points between 50 - 450. How should I do that? So I am on Minecraft playing on my friends world (Not server). However, they won't go online for no reason. I want to go continue my work on that world and not start brand new on survival again. I've already made a lot of progress and would not like to lose it, can somebody help? I've already tried to get answers but they are either too complicated or for servers like IP. Which is correct: "on foot" or "by foot"? He went there on foot.   Or     He went there by foot.   Which one is correct, and on what basis? headed or heading, started or starting? Consider:  Two units are headed your way. Two units are heading your way. Don't get me started! Don't get me starting!  Is there any difference in meaning? And I don't see why passive voice is used here. I would think they have similar meaning here. Help me to clarify! Dirac Delta or Dirac delta function? How did Dumbledore gain the loyalty of Fawkes? How did Dumbledore find Fawkes. Did Dumbledore have Fawkes even when working as a Transfiguration teacher or acquired it after having Headmaster position. They both have a very strong bond between them. When did Dumbledore gain this. Update: Dumbledore says that Ollivander wrote to him when Harry's wand was purchased; if Dumbledore did not have Fawkes before 1938, he would not know about the two feathers being in the wands, so Fawkes and Dumbledore must have met and bonded before 1938  “My wand's feather came from Fawkes?” Harry said, amazed. &quot;Yes,” said Dumbledore. “Mr. Ollivander wrote to tell me you had bought the second wand, the moment you left his shop four years ago.” -Harry Potter and the Goblet Of Fire, Chapter 36-The Parting Of the Ways.  Update 2: JKR says that Dumbledore was the only owner of Fawkes. So it is to be believed that Fawkes was a wild Phoenix before its bonding with Dumbledore.  Peter Humphreys for BBC Newsround: Who did Fawkes previously belong to and will he play a vital role in the next book? JK Rowling: I am not going to answer about the role in the next books, which probably gives you a big clue, and he has never been owned by anyone but Dumbledore. You will notice that when Harry goes back in the Pensieve in this book, Fawkes is never there, and ­­ no, I am sorry, not in this book, I take that back. When Harry has previously seen the study with a different headmaster he saw it with Dippet and Fawkes was not there then. Fawkes is Dumbledore's possession, not a Hogwarts possession. Overstaying on a US Visa Waiver Program A friend of mine came from Australia on the WVP and stayed 92 days. I made a mistake booking Her flight scheduling a Saturday arrival/departure at DFW. This amounted to a 92 day stay and with no funds to rebook a low cost flight through Qantas it was necessary to leave on the scheduled flight.   Question # 1) Was a automatic I-94W submitted by the airlines? She had no customs forms to fill out upon departure.   Question #2) How does this effect another WVP being issued if applied for? An easy question on complex Let $\{u_{k}\}_{k=1}^{\infty}$ be a complex number sequence. If $\sum_{k=1}^{\infty}\lambda^{k}u_{k}=0$, for each $\lambda\in \mathbb{D}(0, 1/3)$(where the $\mathbb{D}(0, 1/3)~$denotes an open disc centered at $0$ and radius $1/3$). Then can we conclude $u_{n}=0$, for $n=1, 2, 3...$ ? How can I move all the window controls to the right (or left)? Downloaded Ubuntu tweak and set window controls to the right side. Only some programs follow the rule. Pidgin as an example has window controls on the right. But Chrome, Thunderbird, Geany, still have controls on the left.  How can I move ALL window controls(close/min/max) to the right (or left)? Multiple AES Key Derivation from a master key dynamically change UIKeyboards return key Is there any way to solve this problem using the diagonalization method? I know there's the proof that uses $\mathcal{P}(\mathbb{N})$ = set of all finite subsets $\cup$ set of all infinite subsets, but I'm trying to solve it using the diagonalization method specifically. I was thinking that we can assume the two have the same cardinality and arrive at a contradiction, but I don't know how to get there. How can we show there has to be some infinite set in the set of all infinite subsets that cannot match 1-1 with a natural number? I once saw watch a sci-fi movie or an episode of a tv series (not sure) in which:   Every police officer was a judge, and hence could act by themselves on the streets. Each "judge" had a gun, which appended their DNA to the bullet. This was used later in investigations about a crime scene, and I think was confidential before the trial was held. Only a judge could use the gun, try to use it and you've been electrified. Also the guns had a self-destruction feature. The main villain was an ex-judge who purchased and activated a very old "killer robot" which was a residue of a long-ended war. When a judge was exiled, they were given a copy of the book of law, and sent outside the city to enlighten the people outside cities.   Can you help me find it?  PS: It was difficult to select a title How to calculate square root or cube root? I was reading Richard Feynman biography when I read that one time he was able to calculate the  cube root of large number in his brain by just using simple facts of everyday life. So my question is there a way to calculate square root or cube root by using just a pen a paper, I mean a systematic way not by trial and error. Internal keyboard and trackpad stop working after plugging in USB device I got a new MacBook Pro with OS X Mavericks. When connecting my phone via USB, the internal keyboard and the trackpad immediately stop working -- not always but in most cases. The bluetooth mouse and an external USB keyboard are not affected. Everything else works also fine. The power button of the internal keyboard still works. Reboot helps. Any ideas? Evaluate $\sum_{k=1}^\infty\frac{x^k}{k(k+1)}$ My partner is tutoring a Civil Engineering student in maths. Conveniently, I am a civil engineer so when any maths that's confusing comes up, I can usually help out. However, we are having a problem with the summing of power series, one area where I am sorely lacking.  After spending two hours on a question, we still cannot solve it and are always left with a $k$. Admittedly, I don't fully know what I am doing.     Evaluate $\displaystyle \sum_{k=1}^\infty\frac{x^k}{k(k+1)}$.   We do know that the answer is $1 + \dfrac{1-x}{x}\ln (1-x)$.  Any hints or help in the direction to go would be very much appreciated. How Many Genius Mixes Are There in iTunes?