I have following sequence index:  [{u'matches_template': 0, u'plate': u'EA7THE', u'confidence': 92.405113}, {u'matches_template': 0, u'plate': u'EA7TBE', u'confidence': 83.526604}, {u'matches_template': 0, u'plate': u'EA7TRE', u'confidence': 82.455276}, {u'matches_template': 0, u'plate': u'EA7T8E', u'confidence': 82.432587}, {u'matches_template': 0, u'plate': u'6A7THE', u'confidence': 80.914902}, {u'matches_template': 0, u'plate': u'BA7THE', u'confidence': 80.913948}, {u'matches_template': 0, u'plate': u'EA7THB', u'confidence': 78.234192}, {u'matches_template': 0, u'plate': u'GA7THE', u'confidence': 78.146278}, {u'matches_template': 0, u'plate': u'EA7TE', u'confidence': 77.999985}, {u'matches_template': 0, u'plate': u'A7THE', u'confidence': 77.449036}, {u'matches_template': 0, u'plate': u'EA7TH6', u'confidence': 76.716492}, {u'matches_template': 0, u'plate': u'6A7TBE', u'confidence': 72.036392}, {u'matches_template': 0, u'plate': u'BA7TBE', u'confidence': 72.035439}, {u'matches_template': 0, u'plate': u'6A7TRE', u'confidence': 70.965065}, {u'matches_template': 0, u'plate': u'BA7TRE', u'confidence': 70.964104}, {u'matches_template': 0, u'plate': u'6A7T8E', u'confidence': 70.942375}, {u'matches_template': 0, u'plate': u'BA7T8E', u'confidence': 70.941422}, {u'matches_template': 0, u'plate': u'EA7TBB', u'confidence': 69.355682}, {u'matches_template': 0, u'plate': u'GA7TBE', u'confidence': 69.267769}, {u'matches_template': 0, u'plate': u'A7TBE', u'confidence': 68.570526}]   I tried for loop to get only plate values from this sequence index.  EA7THE EA7TBE EA7TRE EA7T8E 6A7THE BA7THE EA7THB GA7THE EA7TE A7THE EA7TH6 6A7TBE BA7TBE 6A7TRE BA7TRE 6A7T8E BA7T8E EA7TBB GA7TBE A7TBE A7TBE   This is code for it. But I don't know how to get first of these sequence index. Please help to get first plate value of it.   for candidate in plate['candidates']:           print(candidate['plate'])    I would like to know how to get plate number of maximum confidence value. I know this is stupid question. Sorry for that.
I have a dictionary: keys are strings, values are integers.  Example:   stats = {'a':1000, 'b':3000, 'c': 100}   I'd like to get 'b' as an answer, since it's the key with a higher value.  I did the following, using an intermediate list with reversed key-value tuples:  inverse = [(value, key) for key, value in stats.items()] print max(inverse)[1]   Is that one the better (or even more elegant) approach?
How to hide a(n) (NTFS) partition from ubuntu I need to hide an NTFS partition from listing in the nautilus. How can I achieve that?   Is there any tool to do that?   And how can I hide files in ubuntu (except . operator) Effect on loading a DC motor - load torque Could someone give a (detailed) explanation (perhaps with formulas) of how the load (torque) affects the armature current of a DC motor (separately excited or shunt or series)?  As the load torque increases the speed of the motor decreases, and assuming the terminal voltage stays constant, the EMF will become lower and thus the armature current will increase.  But could someone give me the formula that shows the relation between load torque and armature current?  Is it something like:   \$T_\text{developed} = T_\text{shaft} + T_\text{friction windage} + T_\text{load}\$ ,   where \$T_\text{developed} = K \, \text{flux}_\text{pole} \,I_\text{armature}\$ ?  But then you have  \$P_d = P_s + P_{f_w} + P_l   \$  where \$P_d = K \,\text{flux}_\text{pole}\, I_\text{armature}  \,\omega_m\$  In the last formula you can't see that as the increase due to \$P_\text{load }\$ the armature current increases because maybe someone can say the speed \$\omega_m\$ increases.  And how come at no-load the armature current and thus the torque developed is zero? Is it really zero, or do I have to assume there is some current flowing?  Could also explain me the principle of torque developed. Because at no load, the shaft torque is equal to torque developed, right? How is it, that $\sqrt{x^2}$ is not $ x$, but $|x|$? As far as I see, $\sqrt{x^2}$ is not $x$, but $|x|$, meaning the "absolute". I totally get this, because $x^2$ is positive, if $x$ is negative, so $\sqrt{y}$, whether $y = 10^2$ or $y = -10^2$: $y$ is positive.  But then I remember that $\sqrt(x)$ is the same as $x^{1/2}$ and thus, $\sqrt{x^2}$ is the same as $x^{1}$.   So, as far as I get it, $\sqrt{x^2} = x^{2/2}$.  But then, I can cancel $\frac{2}{2}$ to $1$. So: $\sqrt{x^2} = x^1 = x$.  Where does the absolute value in this derivation of the calculation come from?  I get it why its there: Because $(-x)^2 = x^2$, so the radicand is always positive. But from $\sqrt{x^n} = x^{n/2}$ I dont understand how it gets there. Unable to disable assignment rules I have a condition where I need to disable standard Lead Assignment Rules if certain criteria are met.   if(emailWithAccIdMap.containsKey(ledRec.Email) &amp;&amp; emailWithAccIdMap.get(ledRec.Email) != null &amp;&amp; !openOppMap.isEmpty() &amp;&amp; openOppMap.get(emailWithAccIdMap.get(ledRec.Email)) != null &amp;&amp; openOppMap.get(emailWithAccIdMap.get(ledRec.Email)).Owner.isActive ==true){                     ledRec.Status = 'Duplicate';                     System.debug('Changing the Status');                     //then assign the original lead owner to new lead owner                     ledRec.OwnerId = openOppMap.get(emailWithAccIdMap.get(ledRec.Email)).OwnerId;                     ledRec.Account_Name__c = openOppMap.get(emailWithAccIdMap.get(ledRec.Email)).AccountId;                     ledRec.Field_for_Lead_Workflow__c = true;                     Database.DMLOptions dmo = new Database.DMLOptions();                     dmo.assignmentRuleHeader.useDefaultRule = false;                     ledRec.setOptions(dmo);                     //since owner is assigned, it shouledRec not pass through round robin                     ledRec.checkAssignment__c = false;  }   This is my code snippet which is running on before insert. The control is entering the IF condition as the debug statement is getting printed. Yet, the owner assigned through this snippet is being overridden by the assignment rules.  I also tried executing this in after insert trigger context but it did not work. Can somebody tell me what I'm doing wrong? What does ` (backquote/backtick) mean in commands? What are the different kinds of boxes in (La)TeX? I've seen hbox, vbox, mbox, parbox and others used in various code samples. What are the different kinds of box in (La)Tex? Which are suitable for use in LaTeX, as opposed to plain TeX? How to install software provided in software-center via terminal? What is the most concise and efficient way to find out if a JavaScript array contains a value? This is the only way I know to do it: function contains(a, obj) {     for (var i = 0; i &lt; a.length; i++) {         if (a[i] === obj) {             return true;         }     }     return false; }  Is there a better and more concise way to accomplish this? How can one change an entire document to use bold font? I see many posts in how to changes the font and font size, but none for changing the default font for a document to bold font. I believe this is called changing the font series. The approach in  (obtained by random Googling) looks like it should work, but doesn't do anything when I stick it in the preamble. Maybe I'm putting it in the wrong place.  \fontencoding{T1} \fontfamily{garamond} \fontseries{m} \fontshape{it} \fontsize{12}{15} \selectfont   There is also some discussion . All rounds of AES (and Rijndael) have a MixColumns step, save the last round which omits it.  DES has a similar feature where the last round differs slightly.  The rationale, if I recall correctly, was to "make the cipher appear similar in reverse as it does in the forward direction."  Why does this make AES$^{-1}$ look similar to AES?  And how does this help in implementing the block cipher? What causes the portraits of Wizards to behave interactively? How do I copy to the clipboard in JavaScript? What is the best way to copy text to the clipboard (multi-browser)? I have tried: function copyToClipboard(text) {     if (window.clipboardData) { // Internet Explorer         window.clipboardData.setData(&quot;Text&quot;, text);     } else {         unsafeWindow.netscape.security.PrivilegeManager.enablePrivilege(&quot;UniversalXPConnect&quot;);         const clipboardHelper = Components.classes[&quot;@mozilla.org/widget/clipboardhelper;1&quot;].getService(Components.interfaces.nsIClipboardHelper);         clipboardHelper.copyString(text);     } }  But in Internet Explorer it gives a syntax error. In Firefox, it says unsafeWindow is not defined. A nice trick without using : How to find information about the system/machine in Unix? I have always found it difficult to find information about the system itself in Unix, whether it be   Which OS I am using (version number and all, to compare it with the latest available builds)? Which Desktop Environment am I using? If I am using KDE, most of the programs begin with a K and I can say I am using KDE, but there should be some way to query this, say from a script. Which kernel version am I using? (For example, I am using Fedora, and I want to know what Linux kernel version I am using)   Basically, what I miss is a single point/utility that can get all this information for me. Most of the times the solutions to the above would themselves be OS specific. Then, you are stuck. I was given this problem 30 years ago by a coworker, posted it 15 years ago to rec.puzzles, and got a solution from Barry Wolk, but have never seen it again.  Consider the series:  $$1, \frac{1}{2},\frac{\displaystyle\frac{1}{2}}{\displaystyle\frac{3}{4}},\frac{\displaystyle\frac{\displaystyle\frac{1}{2}}{\displaystyle\frac{3}{4}}}{\displaystyle\frac{\displaystyle\frac{5}{6}}{\displaystyle\frac{7}{8}}},\cdots$$  Each fraction keeps its large bars while being put atop a similar structure. This can also be represented as $$\frac{1\cdot 4 \cdot 6 \cdot 7 \cdot\cdots}{2 \cdot 3 \cdot 5 \cdot 8 \cdot\cdots}$$ terminating at $2^n$ for some $n$, where it is much closer to the limit than elsewhere.  The challenge:   Find the limit, not too hard by experiment In the last expression, find a simple, nonrecursive, expression to say whether $n$ is in the numerator or denominator Prove the limit is correct-this is the hard one. How to describe arbitrary accelerations in special relativity Is it possible to create individual power settings for each hard drive? I have a number of different drives that I use for different purposes but I only use two of them frequently. I would like for the others to enter sleep mode when not in use, but never my main two.  Is there any way to edit power saving settings for individual drives? Consider the blow-up of the plane in one point. Let $E$ the exceptional divisor. We know that $(E,E)=-1$. What is the geometrical reason for which the auto-intersection of $E$ is $-1$? In general, what does it mean, geometrically, that a divisor has a negative self-intersection or that the "right" number of divisors gives rise to a negative intersection?  Thanks. network manager says "device not managed" sudo apt-offline install not updating working with procedure  to update Ubuntu 18.04 offline machine, the sudo apt-offline install /path_to_downloaded_package_folder do not apply any updates/upgrades. The beginning of the massage I get is :   sudo apt-offline install ./updates_path/ No changelog available (Y) Yes. Proceed with installation (N) No, Abort. (C) Display changelog (?) Display this help message. What would you like to do next:  (y, N, ?)y Proceeding with installation ERROR: Path for keyring is invalid: /etc/apt/trusted.gpg gpgv: Signature made Mon 06 Jan 2020 08:17:27 AM MST gpgv:                using RSA key 3B4FE6ACC0B21F32 gpgv: Good signature from "Ubuntu Archive Automatic Signing Key (2012) &lt;ftpmaster@ubuntu.com&gt;" gpgv: Signature made Mon 06 Jan 2020 08:18:52 AM MST gpgv:                using RSA key 3B4FE6ACC0B21F32 gpgv: Good signature from "Ubuntu Archive Automatic Signing Key (2012) &lt;ftpmaster@ubuntu.com&gt;" gpgv: Signature made Mon 06 Jan 2020 08:18:25 AM MST gpgv:                using RSA key 3B4FE6ACC0B21F32 gpgv: Good signature from "Ubuntu Archive Automatic Signing Key (2012) &lt;ftpmaster@ubuntu.com&gt;" gpgv: Signature made Thu 26 Apr 2018 05:38:40 PM MDT gpgv:                using RSA key 3B4FE6ACC0B21F32 gpgv: Good signature from "Ubuntu Archive Automatic Signing Key (2012) &lt;ftpmaster@ubuntu.com&gt;" security.ubuntu.com_ubuntu_dists_bionic-security_InRelease synced. security.ubuntu.com_ubuntu_dists_bionic-security_Release synced. security.ubuntu.com_ubuntu_dists_bionic-security_Release.gpg synced.   What am I doing wrong? I've sectioned of this area in the sea near my base, and I need to get rid of all the water from it.  From what I've tried the only way I can see to clear it is fully cover one layer, delete the blocks, then go down to the next layer. Is that the only way I can clear the area or is there a better approach?  Ideally I'd like a survival method (if there is a better one), but any commands what could be used I'd like to hear just so I can learn more commands :)