How to split punctuation from words in python?
Splitting a string into words and punctuation
Custom script "invoked too many times" error Credit:   function getDirection(city1, city2, unit) {   var directions = Maps.newDirectionFinder()     .setOrigin(city1).setDestination(city2)     .setMode(Maps.DirectionFinder.Mode.DRIVING)     .getDirections();   var d = directions.routes[0].legs[0].distance.text;    var distance, value = d.split(" ")[0].replace(",", ""), text = d.split(" ")[1];   if(text == unit) {     distance = value;   } else if(text == "km" &amp;&amp; unit == "mi") {     distance = value / 1.6;   } else {     distance = value * 1.6;   }   return Math.round(distance); }   I have used this code snippet in one of my sheets. I am working on a dataset with roughly 6000 entries and I am getting some errors because of the large volume.      Script invoked too many times per second for this Google user account. (line 0).      Service invoked too many times for one day: route. (line 4).   I considered purchasing a Google Apps business account to increase my quota, but that might not even help. Do you maybe have any advice for me in this regard? Can Blender render pngs with the background transparent? I would like to render an animation as a series of .png images with transparent backgrounds for use in a video. Is this possible? It seems that there are many ways to prove the Sylow theorems. I'd like to see a collection of them. Please write down or share links to any you know. How to use triangle inequality to establish Reverse triangle inequality I need to use $|a+b| \leq |a|+|b|$ to show that $||a|-|b|| \leq |a-b|$ .   I have tried to represent  $||a|-|b||$ as  $||a|+(-|b|)|$ , and then get $||a|+(-|b|)| \leq |a|+|-|b||$ , but that isn't leading me anywhere given $|a-b| \leq |a|+|b|$. WinForms DataGridView font size How do I change font size on the DataGridView? Why did Dumbledore make it less difficult to get to the Sorcerer's Stone? The Sorcerer's/Philosopher's Stone was removed from Gringotts to be placed under the most impenetrable of protections at Hogwarts under Dumbledore's custody. But it seems clear Dumbledore took protections which could have been impenetrable, and deliberately made them less so, such that at best they would only slightly slow down anybody trying to access the Stone, rather than just plain block them.  For example, after the Devil's Snare, you have a locked door enchanted such that it cannot be opened by any charm or other means except its own assigned key. That's a great protection, potentially an impassable barrier if the key is not available.  But the key is then left right there in front of the door in the same room.  At least the key is flying around the ceiling. But there are broomsticks right there in the same room, too.  The room with the fires front and back—that could also have been a solid defense—deadly fires that cannot be passed through unless you drink very specific potions tailored to each particular fire's properties.  Except that those potions providing safety are put right there in the same room.  At least, perhaps, they're surrounded by other bottles, some of which contain poison. With no way to know which bottle is safe, that could still almost be a solid protection.  Except that a piece of paper with a logic puzzle detailing exactly which bottles are which is put on the table with them.  Dumbledore always had reasons, and those reasons were always virtuous. What was he up to, deliberately weakening the protections in this way? Multiple forms in delphi Creating a large amount of convex polygons using existing coordinates I'm trying to fix the following TikZ figure, where the circle device in the middle should be embraced by two bended arrows pointing counter-clockwise.    I have drawn these arrows with an arc path, but the tips of the arrows are unexpectedly both pointing upward.  Any idea how to get these arrow tips to follow the direction of the arc?  Here is my code for the above figure:  \documentclass[12pt]{article}  \usepackage{tikz} \usetikzlibrary{arrows} \usetikzlibrary{calc}  \begin{document} \begin{tikzpicture}   \draw (0,0) circle (1cm);   \draw[fill=gray!20]  (23:0.45cm)     -- (23:1cm) arc[radius=1, start angle=23, end angle=-203] (157:1cm)     -- (157:0.45cm) arc[radius=0.45, start angle=157, end angle=23] (23:0.45cm);   \draw[fill] (0,0) circle(2pt);   \draw[-&gt;,&gt;=stealth',semithick] (150:1.2cm) arc[radius=1.2, start angle=150, end angle=210] (210:1.2cm);  \draw[-&gt;,&gt;=stealth',semithick] (-30:1.2cm) arc[radius=1.2, start angle=-30, end angle=30] (30:1.2cm);   \foreach \x/\y in {1/0,2/0,3/0,4/1,5/1,6/1,7/0,0/1}     \node[rotate={\x*45-90}] at ($(0,0)!.75!\x*45:(1,0)$) {\y} ; \end{tikzpicture} \end{document} What is `$?` ? Is it a variable? The question is pretty straight forward. I can get the exit code of the previous command by using $?. But what exactly is it?  I don't think it is a variable, because you can't have any special characters in the name of variable other than _.  foo?foo=10   will result in the error: foo?foo=10: command not found  So if it is not a variable, what is it? Are there others like it? How do I tell what gauge wire I need? I've been working on providing power for high current applications for my project. I'm working on a project with high current (or at least compared to what I'm used to...)  What a lot of people point to online is tables that you can look up the resistance for AWG per foot, and then you can calculate the current drop of your wire. However, with that current drop, how much of  a voltage drop will make my wire "too hot" and risk a fire? Am I looking at this the wrong way? How do I calculate the temperature of the wire and decide when it'll be too hot, and I should use a thicker wire? Possibilities for Python classes organized across files? I'm used to the Java model where you can have one public class per file.  Python doesn't have this restriction, and I'm wondering what's the best practice for organizing classes. I've a Skype interview for PhD application (it will make me miss  today.) I've been asked, in advance, to prepare a short presentation and then there would be some discussion with the panel (I guess.) I expect that they will ask if I have some questions so, I'm wondering what are the best (type of) questions one might consider? Who paid for Harry's Nimbus 2000? The Nimbus 2000 was the fastest broom at the time of the Harry's first year at Hogwarts.  Professor McGonagall wanted to win the Quidditch Cup so she spoke with Dumbledore and got an exception from the rule that no first-years could have a broom for Harry.  My question is who paid for the broom?  It couldn't have been a cheap broom.  They wouldn't have taken gold out of Harry's Gringotts account without permission.  It wouldn't be right for the school to pay for it and I doubt McGonagall paid for it out of her own pocket.  So who paid for the broom? Mods folder missing from .minecraft folder I have Windows 10 and when I go to look in my .minecraft folder in the AppData folder, the mods folder is not there.    How can I find the mods folder? biblatex: separator for citing multiple sources, some of them with page, some not I'm using biblatex for my references.  Normally, if I use \cite{source1, source2, source3}, I get a citation like  [3, 45, 98]   If I now want to give a page number for one of them, it looks confusing imho, as I should get (did not try it out up to now, honestly)   [3, 45, 78, p. 23f, 98]   So imho it would make sense to change one of the separator from a comma to e. g. a semicolon like:  [3; 45; 78, p. 23f; 98]   Question 1: Does that make sense, or are there other conventions for citing sources with and without page numbers together?  (Up to now I collected the citations without page number in one cite command and added singular \cite[][p. xy]{} commands for those with page numbers., so I'd get:   [3, 45, 98][78, p. 23f]   )  the \cites[]{}[]{}[]{} could also do that, but it also uses the same separators for entries and postnotes.  Question 2: How could I change the separator globally for those number-citations from comma to semicolon in biblatex? After Upgrade to Ubuntu 20.04: "Oh no! Something went wrong" How do I render nodes, now that node_view() has been deprecated? In Drupal 7 I frequently use node_view() for rendering nodes (using view modes) in blocks or pages as follows:  $nids = array(123,456,789); $nodes = node_load_multiple($nids); foreach ($nodes as $node) {   $node_view = node_view($node, 'teaser');   $output .= drupal_render($node_view); } $build['nodes']['#markup'] = $output; return $build;   node_view()/entity_view() has been deprecated and replaced by a view builder as explained in change record . The information is not detailed enough for me to be able to figure out how to achieve the same result.  How can you render nodes in Drupal 8 so that the output can be used in the render array of a block or page? Few days back while attending a thesis defense, one Professor was asking the defender why does he think, he deserves the degree. I was wondering since then, is there really any general answer for that? or the answer should be given describing my own work and then emphasis them how it is important for research field?  I asked the question here to know your opinion about it and to list down what could be the possible answers to this question. Calculate relative time in C# Given a specific DateTime value, how do I display relative time, like:   2 hours ago 3 days ago a month ago