I am looking to save the input parameters of a function as a string. I am using Python 3.7. I want so save that string for debugging.   What I could do easily would be something like this:  def Model(par1=150, par2=100)  #some processing  return results, par1  parameters = str(par1) + str(par2)   However, I want to be able to automatically save all parameters, even if I add more parameters later. So if I add a par3 = 300 to the function, "parameters" would also contain str(par3), instead of me having to add it manually.   The behavior I would like to have is something like this:  def Model(--any number of parameters--)  #some processing  return results  parameters = --all parameters of Model--   The reason I would like to have it done automatically is that I expect that otherwise it would cause more trouble than it being worse, as I would have to remember to manually change this all the time.  Is it possible to save ALL parameters of a function as a string (or in any other way that lets me easily check later which parameters a function ran with)?
Given the Python function:  def a_method(arg1, arg2):     pass   How can I extract the number and names of the arguments. I.e., given that I have a reference to func, I want the func.[something] to return ("arg1", "arg2").  The usage scenario for this is that I have a decorator, and I wish to use the method arguments in the same order that they appear for the actual function as a key. I.e., how would the decorator look that printed "a,b" when I call a_method("a", "b")?
What is the difference between '/' and '//' when used for division? Let's say I have written an equation in my paper and numbered it:  y = a + bx    (1)   Then, later in the paper, I want to remind the reader by showing the same equation with the same equation number.  Sure, I can repeat the equation, but LaTeX gives it a new equationn number:  y = a + bx     (2)   How do I force LaTeX to use the original equation numbers? Baking with oven without bottom heating element My mom wants to do baking but her oven doesn't have bottom heating element. It only has an element on top, with a fan at the back.  She told me that she can't make me a good pizza or cake without it.  Is there any way around? Among any three consecutive positive integers one is a multiple of 3 Give a combinatorial proof to show the following for all integers $n \geq 2$. $$2^{n-2} n (n -1) = \sum\limits_{k=2}^n k (k - 1) \binom{n}{k}.$$  I'm completely stumped. I just have no idea how to do this. What I've tried so far has been simplifying the right hand side slightly to $\sum\limits_{k=2}^n \binom{n}{k - 2}$, and then proving that this somehow is equal to some manipulation of the left hand side. I can't seem to find any breakthroughs that way though.  If anyone could help out or point me in the right direction that would be great.  EDIT: I've actually just realized my simplification of the right hand side is wrong. Now I'm even more stuck. Smallest dense subset of $\mathbb{R}$ I am not sure if what I am looking for even makes sense (or) exists. Anyway I would be happy if someone can clear my confusion.  The set of real numbers $\mathbb{R}$ is obtained as completion of $\mathbb{Q}$. However, $\mathbb{Q}$ is not the only set which is dense in $\mathbb{R}$. $\mathbb{Q} \backslash \mathbb{Z}$ is also a dense subset of $\mathbb{R}$. I am wondering if it makes sense to talk of the "smallest" dense subset of $\mathbb{R}$. To phrase what I am looking for precisely and what I mean by smallest, I am looking for a dense set $A$ of $\mathbb{R}$ such that if $B$ is a proper subset of $A$ then $B$ is not dense in $\mathbb{R}$. I am able to "see" that the set $A$, I am looking for doesn't exist since any open interval consists of infinite rationals. But I am unable to precisely argue out to myself and convince why $A$ doesn't exist. Could some one throw more light on this? How do I transition to SSL without affecting PageRank? Here at Stack Exchange we're working on moving all traffic to SSL. The reason we're not doing logged-in-users only is that one side of the login divide would suffer a redirect from Google every time.  This happens because Google's only going to have http:// or https:// in the results, not both.  Aside from building the SSL infrastructure (), the outstanding question we have is: how do we best transition to SSL?  Here are the relevant bits of our plan (testing on small sites, moving up to stackoverflow.com):   Get SSL ready/enabled (but not linked to) on all domains Start rendering only the &lt;link rel="canonical"&gt; as https:// Start sending a 301 for all http:// requests to https:// (from our domains...of course we can't do anything about all the existing links pointing to us) After a transition period, set all user cookies as secure   So the endgame is having all content delivered over SSL and all HTTP requests redirected.  What we're primarily concerned with is how this will affect PageRank to our sites. We depend a great deal on traffic that comes from Google and want to ensure that doesn't take a dive as we start delivering more security to our users.  The only bits I've found on this that seem to be substantive are  on :     @Frank Yes, I'm certain that Google treats HTTP and HTTPS URLs as separate URLs for crawling, indexing and ranking (I work with the web-search team here at Google). Doing canonicalization with a 301 redirect like you mentioned is a great way to solve this :) –  Oct 23 '10   and the only webmasters video I could find:  The video doesn't have a solid answer, not one I'd base the future of a company on anyway.  Is our transition plan the best way to accomplish an SSL move, at least from an SEO perspective?  If there's other more recent or concrete advice around how a move like this affects Google ranking we'd love to hear about it. What is JSON and what is it used for? I've looked on Wikipedia and Googled it and read the official documentation, but I still haven't got to the point where I really understand what JSON is, and why I'd use it. I have been building applications using PHP, MySQL and JavaScript / HTML for a while, and if JSON can do something to make my life easier or my code better or my user interface better, then I'd like to know about it. Can someone give me a succinct explanation? What is the origin of non-conservative force? My understanding about  is a force that its work is independent of path such that we can construct another form of the work called potential to make our life easier.  For friction, if I start from microscopic point of view, it should be the macroscopic effect of the electric force or gravity which are both conservative force.  Why do we initially have description by conservative forces (electric/gravity force) but end up with a macroscopic description of nonconservative force(friction)? Can I include the completion of Udacity and Coursera classes I have attended in an academic CV? Can I include in my academic CV that I have attended and completed the  and  classes I have been taking? I understand that these are not anything major, but the courses definitely gives a good overview and starting formal study on the subject becomes less cryptic. If I can include them without any negative impacts, then under what section should I include them? Need help to interpret output of free command I would appreciate help in interpreting the output of 'free -m' below.    -bash-4.2$ free -m               total        used        free      shared  buff/cache   available Mem:          15793        7112          88        7840        8591         611 Swap:         16891        5289       11602    If I have nearly 11GB free then why am I seeing swap usage.  Shouldn't that be 0?   Also, the 'shared' value is 7840.  Is this memory available for a new application? Is only 'cache' memory available for new applications?  In other words, 'shared' and 'buffer' memory are not available for new applications? How should I interpret the 'available' column with a value of 611?  How is this value arrived at? Was drafting an email and my senior wanted to type "Planting saplings is our way of saying we care for our Nature". I felt that's wrong English. Shouldn't it be "we care for Nature"? (it makes it a bit impersonal to remove the 'our', but if 'our nature' isn't right, can the cuteness factor of mentioning 'our nature' be preserved?. Which is correct?) I have a bathroom door that is quite loud when operated. And when someone goes to the bathroom at night, it innevatibly wakes someone up (and baby room is just across from the bathroom!) there are 3 components of noise, and I was wondering if there is an alternative to fixing them:   door bangs against the jamb (this is fixed with simple foam bumpers) latch mechanism makes a loud CLUNK when door is pushed closed (I was able to dampen it just a bit by putting foam inside strike plate, but it is still quite loud) lock button also makes a CLUNK when the knob is turned and it is released (this can be battled by replacing with a mechanism that needs to be manually opened [twist instead of push] but it is less convenient, and I would prefer something that automatically unlocks)   Any suggestions as to a knob that has a dampening of the latch and lock button? I have only found one youtube video of my ideal handle, but there is no information on how it works, where to buy it, or anything else: This is a general, community wiki  question to address non-specific "I need a CMS or Wiki that does x, y, and z..." questions.  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 .    I have a list of features that I want for my website's Content Management System (CMS) - where can I find a [free] script that includes all of them? Detection of the Electric Charge of a Black Hole Use of *args and **kwargs Automatically update field value in one column based on change to another column in same table? When editing I want to be able to change the attributes of one field and upon doing this allow for the automatic update of another field in the same attribute table.   Essentially I have one layer with a code, description and legend information.   I would like to be able to edit the code and have the description and the legend information update with this edit with its correct description and legend information.   Is there any way to do this within ArcMap's tools or an associated script? What are good basic statistics to use for ordinal data? I have some  gained from survey questions.  In my case they are  responses (Strongly Disagree-Disagree-Neutral-Agree-Strongly Agree).  In my data they are coded as 1-5.  I  don't think means would mean much here, so what basic summary statistics are considered usefull? Creating an index of quality from multiple variables to enable rank ordering I have four numeric variables. All of them are measures of soil quality. Higher the variable, higher the quality. The range for all of them is different:  Var1 from 1 to 10  Var2 from 1000 to 2000  Var3 from 150 to 300  Var4 from 0 to 5  I need to combine four variables into single soil quality score which will successfully rank order.  My idea is very simple. Standardize all four variables, sum them up and whatever you get is the score which should rank-order. Do you see any problem with applying this approach. Is there any other (better) approach that you would recommend?  Thanks  Edit:  Thanks guys. A lot of discussion went into "domain expertise"... Agriculture stuff... Whereas I expected more stats-talk. In terms of technique that I will be using... It will probably be simple z-score summation + logistic regression as an experiment. Because vast majority of samples has poor quality 90% I'm going to combine 3 quality categories into one and basically have binary problem (somequality vs no-quality). I kill two birds with one stone. I increase my sample in terms of event rate and I make a use of experts by getting them to clasify my samples. Expert classified samples will then be used to fit log-reg model to maximize level of concordance / discordance with the experts.... How does that sound to you? How do I copy vertex groups from one object to another?