« first day (2124 days earlier)      last day (2822 days later) » 

12:13 AM
yep
going to use pymysql, I guess... Seems to be a bit less straightfoward than PySqlPool
 
@Kelthar if you just need a library to used with databases - you might want to look at SQLAlchemy
 
what advantages does it hold when compared to pymysql or mysqldb?
@JGreenwell
 
18
Q: Why use SQLAlchemy? Is it very convinent for coding?

pypyodbcBeing very familar with writing plain SQLs in Python, I havn't realized the benefits I would get by using SQLAlchemy or other ORMs. Is it designed for those who don't like SQLs in the programs? Or is it make your script crossing different types of database? Or it makes your script more Pythoni...

 
 
2 hours later…
2:19 AM
morning guys
need some quick advice.
is this the correct implementation?
# insertion sort ------------------

array1 = [3, 5, 2, 4, 8, 0]

for x in range(1, len(array1)):
	key = array1[x]
	i = x - 1
	while (i >= 0 and array1[i] > key):
		prev = array1[i]
		array1[i] = array1[i+1]
		array1[i+1] = prev
		i = i - 1
	array1[i+1] = key

print(array1)
[0, 2, 3, 4, 5, 8]
[Finished in 0.1s]
 
I would switch the range for enumerate
114
A: What does enumerate mean?

Martijn PietersThe enumerate() function adds a counter to an iterable. So for each element in cursor, a tuple is produced with (counter, element); the for loop binds that to row_number and row, respectively. Demo: >>> elements = ('foo', 'bar', 'baz') >>> for elem in elements: ... print elem ... foo bar ...

other than that it looks fine
 
@JGreenwell alright. thanks for the comments :)
 
2:46 AM
is this correct? any advice anyone?
# Merge Sort ------------------ Complexity O(n)

array1 = [2, 4, 11, 13, 67, 98, 121]
array2= [1, 3, 5, 8, 33, 54, 65]
sortedArr = []
i = 0
arr2Length = len(array2) - 1
for x in range(len(array1)):
	if i == arr2Length:
		sortedArr = sortedArr + array1[x:]
		break
	while (array1[x] >= array2[i]):
		sortedArr.append(array2[i])
		i += 1
		if i == arr2Length:
			break
	sortedArr.append(array1[x])

print(sortedArr)
[1, 2, 3, 4, 5, 8, 11, 13, 33, 54, 67, 98, 121]
[Finished in 0.1s]
 
user6438653
@JGreenwell Oh sorry, forgot which room it was. I though it was PHP that said that. Bye.
 
@Ming do you have reason to suspect it isn't, and can you phrase it in a way that doesn't sound like we're doing your homework for you? Otherwise, stop posting big blocks of code with open ended prompts.
 
@davidism the code works. just wanted some feedback. thats all. i wrote the code myself.
i dont know if its implementing it correctly. since i read theory on merge sort converted it to code.
 
Write tests then. Do your own work. Or ask about something specific.
 
DSM
Just looking at it I don't think it'll handle multiplicity correctly, but that's easily checked.
Actually, it might be worse than that. Are you sure you tested it?
 
2:52 AM
I still have 1 hour 8 minutes to kill before No Man's Sky.
 
DSM
I heard you guys talking about it earlier. Indie game release?
 
Yeah, procedurally generated universe. Literally universe: down to each planet is an actual to scale planet, not just a flat level.
Hype is beyond what anyone will reasonably get out of the game, but it still looks really fun.
 
DSM
(Heh -- I just noticed that mergesort doesn't even work on the given example. It loses 65.)
 
@DSM yeah ur right. just realised that. thanks
@davidism ok. will do some tests.
 
DSM
@davidism: huh, interesting! See, game design doesn't usually interest me, but the technical challenges involved in finding the right balance to pull that off efficiently sound kind of fun.
 
user559633
3:16 AM
Yeah, the procedurally generated stuff is what makes me think that it won't work for a multiplayer experience.
 
user559633
Unless proximity results in a procedurally generated planet with details stored on the game server
 
DSM
I don't follow. Procedural generation/stored on DVD/very slowly transferred over 3G seems orthogonal to the issue of shared state.
 
user559633
If it's client-local to the person that discovered a planet, the best case is that that user has to deliver that content to anyone/everyone else in proximity
 
I was watching the livestream earlier and it sounded like changes were a little more persistent now? But I'm not really going into it expecting multiplayer.
 
DSM
Why? If you can deduce the planet's nature from information you have locally, why can't I just tell you where I am?
 
user559633
3:23 AM
I don't follow -- I assume that it's not procedurally generated based on coordinates and has some randomness to it, so for everything on that planet to be the same for you and me, that state has to live somewhere
 
user559633
I think I'm misunderstanding you though as I know you already considered this
 
The initial state is the same for everyone, but you can make changes to the world. So I can give you my coordinates and you'll get the same planet, but any changes I made won't show up unless they changed how that works.
 
DSM
I came to exactly the opposite assumption, that they were using PG as an effective compression method, so that if I tell you where I am you deduce the state of the local universe. After that we only have to exchange the deltas.
(Deltas relative to the background, I mean.)
 
user559633
Ah, okay, we're thinking the same.
 
user559633
I mean the delta storage and location/actions of other players.
 
DSM
3:28 AM
If I were more creative I'd be able to come up with an SR-flavoured spin to put on the state lag..
 
user559633
SR?
 
DSM
I meant special relativity.
 
user559633
oh, of course skims wikipedia
 
4:05 AM
cbg
 
4:15 AM
Cabbage :-)
 
4:29 AM
cbg
 
4:59 AM
@tristan naturally a Finn makes a physics simulation on what happens when you fall drunken in a sauna.
 
5:34 AM
@AnttiHaapala that's a bit like a smoker donating to cancer research; it's rational self-interest :)
(Cbg)
 
:D
cbg
 
5:48 AM
What should I do with my question
It is almost similar to this one
 
Put a bounty. It will attract people.
 
@thefourtheye it is already in bounty :P
If someone provides a detailed answer I could mark it as accepted or I can flag it as duplicate.
 
Oops, sorry. I just only the comments in the answer.
 
soemone asked me for hour estimate, so I said that is the "seat-of-the-pants guesstimate multiplied by a tight hat constant"
this is so hard to express in English... :/ easier in Finnish
and more vivid
perstuntuma-arvio tiukalla hattuvakiolla kerrottuna.
 
In my mind, I read that as "Hakuna Matata" :D
 
5:57 AM
:D
perstuntuma-arvio is literally "ass-feel estimate"
and everyone knows what a "hat constant" is, intuitively.
it is the constant in the formula that you pulled out of thin air.
like a magician
 
6:11 AM
stackoverflow.com/q/38843149/2301450 my dupe link or something else
 
@khajvah !
 
rip my English
 
Important note to those trying to reproduce: Python 2.7.9 and newer have significantly upgraded Python's SSL capabilities. See PEP 466. If you want to help reproduce and find a solution, you'll have to use a version at least that new. — Martijn Pieters ♦ 11 secs ago
I'd appreciate it if someone could give that comment a small boost by voting on it.
 
Multiprocess Windows 0/1 (Disabled)
 
@AnttiHaapala You can manually enable them if you are using 48
 
6:34 AM
@JRichardSnape: ^^
(Since you tried to reproduce too and failed)
 
upvoted
 
@MartijnPieters is it reproduceable?
 
@AnttiHaapala absolutely.
 
6:36 AM
I have a custom build 2.7.11 with the right OpenSSL libraries (Apple's system OpenSSL version can't do TLS 1.1 even), and I can reproduce that error.
 
still prints only Mounted, seems to be hanging there
Ubuntu 16.04
 
Hi
I am going to have prediction using python. which is the best library to use? is it scikitlearn?
 
@ManuraOmal too broad
 
@khajvah only girls allowed :D
@ManuraOmal depends. start with scikit.learn
btw it is shortened to sklearn :D
 
6:40 AM
> JavaScript is for All of Us
:(
 
I'm not going to pick firefox over chrome . don't give s**t what data is being collected. but I must say that they did a great job on the UX part.
 
unfortunately it is
 
@ProblemSlover ...
 
@ProblemSlover FF was hanging on my slow computers before but after multiprocess support, I have no reason to use chrom(ium)
 
@ProblemSlover chrome is shit not just in the data collections department,
 
6:41 AM
@AnttiHaapala thank u very much
 
it is lagging behind in supporting standards, and promoting their own
@khajvah Idk, I just see pics of girls :d
 
ya I prefer firefox too
 
I've never really used chrome
the whole UI thing is like "wtf are you talking about"?
 
I got 32 GB of ram.. 8 core cpu.. / I guess there is no any thing i should be concerned about lol
 
@AnttiHaapala it says "we all JS". The website should be closed for hate speech.
 
6:42 AM
there's not really anything different between the 2
@khajvah :P
like seriously, what is the difference between chrome/chromium interface and firefx?
nothing.
or is it the windows-only thing of not showing the window bar?
 
I don't see any difference
 
me neither
nailed the "UX", dunno.
 
@MartijnPieters voted. I was on an old box, so could well have been 2.7.6. TBH, my lack of confidence and fact that I recognise OP and believe was why I only commented.
 
@MartijnPieters
requests.exceptions.ConnectTimeout: HTTPSConnectionPool(host='www.neco.navy.mil', port=443): Max retries exceeded with url: /necoattach/N6945016R0626_2016-06-20__INFO_NAS_Pensacola_Base_Access.docx (Caused by ConnectTimeoutError(<requests.packages.urllib3.connection.VerifiedHTTPSConnectio‌​n object at 0x7f2d0137a350>, 'Connection to www.neco.navy.mil timed out. (connect timeout=120)'))
 
@AnttiHaapala UX is the same but the design might be better, although you can easily install custom themes so no real difference
 
6:46 AM
@AnttiHaapala I get
requests.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)
 
it is just not connecting
 
Perhaps the Finns don't allow access to US military domains ;-)
 
or perhaps the US doesn't allow Finns.
 
@AnttiHaapala US is land of free, there is no such thing as "doesnt allow"
 
an article in a Finnish newspaper presented a grim picture about Finland's future if Trump is elected
said that Trump will make the "Roosevelt-Stalin" pact a reality again...
give Finland and Sweden to Russia.
@khajvah ^ you should be worried too :D
unless you want to change the autocrat in Armenia
 
6:51 AM
I actually think the whole Trump craziness is exaggerated. He is gonna be fine.
they good too far comparing him with Hitler when he never said anything racist
 
no, he said he'd not "interfere" with European affairs any longer.
 
Trump says a lot of things. The trouble is that he then does something different entirely. Anything to get a popular vote.
 
but the thing is he needs to at least hold up to some of these insanities to be re-elected right:D
 
oh... no. I got enough trump watching cnn.. he gets coverage 24/7 :(
 
well, media talks a lot of stupid stuff. Like I was watching a video of "Trump's idiotic moves", when he says he is gonna build a wall in the Mexican border, so illegals can't just enter US and then they show a video where he says "I love Mexicans" and them make it look stupid
which is really weird
 
6:58 AM
@khajvah "show video" :D
I never watch videos :D
 
@khajvah he talks a lot, back and forth :D
@khajvah notice, this is not what I call media :D I call "Journalism" media, this is just some Youtube cuts from his speeches :d
 
Trump is out for only one thing, Trump. Narcissus looked in the pond and saw The Donald looking back.
 
7:18 AM
@khajvah he's making it real easy for the media to make him look stupid. Have you considered the possibility that he actually is foolish?
> This is what became obvious, probably fatally so: Mr. Trump is not going to get serious about running for president. He does not have a second act, there are no hidden depths, there will be no “pivot.”
> It is not that he is willful or stubborn, though he may be, it’s that he doesn’t have the skill set needed now—discretion, carefulness, generosity, judgment. There’s a clueless quality about him. It’s not that he doesn’t get advice; it’s that he can’t hear advice, can’t process it or turn it into action.
 
7:32 AM
@MartijnPieters I don't agree. I don't think he would go this far with careful and non-harsh behavior.
nobody expected him to go this far and actually compete but whatever he did (crazy statements and everything) actually made him favorite in the end. Is he really stupid?
I don't think so
 
> The mad scatterbrained-ness of it was captured in a Washington Post interview with Philip Rucker in which five times by my count—again, the compulsion—Mr. Trump departed the meat of the interview to turn his head and stare at the television. On seeing himself on the screen: “Lot of energy. We got a lot of energy.” Minutes later: “Look at this. It’s all Trump all day long. That’s why their ratings are through the roof.” He’s all about screens, like a toddler hooked on iPad.
 
@khajvah no one expected hitler to make the favourite :D
following problem:
need to format 9.681673307751344e-05 non-scientifically
and with the precision, so no invented digits
 
Mussolini was an idiot, by all accounts.
 
@AnttiHaapala yeah well, Hitler wasn't spreading nacism in the beginning AFAIK
 
@khajvah you didn't read Mein Kampf :D
you should read Mein Kampf, that guy was totally insane.
 
7:38 AM
yeah but Hitler wasn't stupid by any measure
insane but smart
 
cabbage, all. Did I land in the middle of a Godwin's Law demonstration?
@khajvah the Americans say "crazy like a fox"
 
cabbage contracted the trump syndrome
 
@AnttiHaapala just use the f formatting flag? format(number, 'f').
 
plus Hillary is sneaky. I don't like her at all
 
Adjust decimal digit count as needed.
@khajvah I don't like either candidate. But Trump is definitely worse.
 
7:42 AM
@MartijnPieters
>>> '{:f}'.format(0.000000000000000001)
'0.000000'
>>> '{:.100f}'.format(0.000000000000000001)
'0.0000000000000000010000000000000000715424240546219245085280561849232477261706364402016333770006895065'
 
@AnttiHaapala I did say 'adjust decimal digit count as needed'.
@AnttiHaapala Those are not 'invented'.
 
and I said, should not have invented numbers
it should be properly rounded
 
Are you seriously showing ignorance about how floating point works here?
 
@MartijnPieters no,
 
Remember, kiddies, precision != accuracy
 
7:43 AM
you're seriously not understanding me.
 
I am glad I don't have to choose between those two. In Armenia, we always have one opposition and one governmental guy and the votes are completely irrelevant. We all vote for the opposition, the other guy gets elected, so simple.
 
the output needs to be 0.000000000000000001
 
@AnttiHaapala I don't think you know how FP works, I'm understanding you perfectly.
 
@MartijnPieters are you seriously trolling?
 
@AnttiHaapala can you seriously believe that @MartijnPieters is trolling?
 
7:44 AM
@holdenweb yes
because I know how floating point works.
>>> '{}'.format(0.000000000000000001)
'1e-18'
believe or not, this is rounded
and it is properly rounded, to precision
but I need it without exponential notation because some shitty system doesn't eat those
I guess I need to do my own and ask it on stackoverflow
 
But would you really expect ` '{:.100f}'.format(0.000000000000000001)` to evaluate to a singe 1 with a bunch of zeroes around it?
 
@holdenweb that is not what I asked
I asked how to do it :D
 
Or am I misunderstanding you?
 
it was my example of how the thing suggested by martijn doesn't work :/
I can get the exponent, and if it is negative, then I adjust the number after . to it :D
but it still isn't correct.
@holdenweb let's state it this way:
how to print floating point value so that scientific notation is not used but with only significant numbers showing.
 
Re-cbg
 
7:52 AM
So one solution would be to process the strings 9.681673307751344 and -05 to adjust to give the correct number of leading/trailing zeroes?
 
@holdenweb exactly :(
that is the best I've come up with so far
 
[opens Notebook]
 
it should be a built-in format modifier in format mini-language but it is not
 
Cabbage!
 
7:55 AM
morning all
 
too many corner cases, might have leading sign etc, annoying
 
@AnttiHaapala No, I'm not. I'm now honestly surprised you expected a fixed precision to be turned into something 'autodetecting' what number of digits you want to round to.
 
@MartijnPieters who said I expected fixed precision to be turned into something
 
Scientific notation also has a default number of digits, and you didn't tell it to alter that.
 
I said I want significant digits with leading zeros
significant notation doesn't have default number of digits
read my stackoverflow answer on that
 
8:03 AM
Calling the other digits you see 'made up' shows a lack of insight into how fp works.
>>> format(0.000000000000000001, '.100e')
'1.0000000000000000715424240546219245085280561849232477261706364402016333770006895065307617187500000000e-18'
You can make scientific notation do the same.
 
I know.
I want str(f), without scientific notation.
 
No, you want more than that.
Please be more precise.
 
You want to show the first non-zero decimal.
 
I want str(f), without scientific notation.
 
8:05 AM
I gave you that and you rejected it out of hand.
That means that you are not being precise enough.
And now I am seriously considering that you are trolling us.
 
@MartijnPieters I want all floating point precision in decimal format without scientific notation?
am I making myself clear?
 
When you don't get the answers you want, you are not being clear in what you are asking for.
I gave you decimal format. You rejected it. You need to be more precise as to why that output doesn't fit your criteria.
 
@MartijnPieters you're trolling because when I stated something incorrectly you started trolling that I do not understand how floating point works.
instead of assuming I wasn't precise in asking
 
Too many requests

This IP address (xxx.xxx.xxx.xxx) has performed an unusual high number of requests and has been temporarily rate limited. If you believe this to be in error, please contact us at team@stackexchange.com.
 
I was making assumptions about your CS level.
 
8:06 AM
wat. I just wanted to load SO D:
 
@Ffisegydd :P
 
I'm not even using the API or anything, that's just trying to load a question on main site!
 
@MartijnPieters stackoverflow.com/a/28493269/918959 read this to assess my level.
> The default output for both str(float) and repr(float) in Python 3.1+ (and 2.7 for repr) is the shortest string that when converted to float will return the original value; in case of ambiguity, the last digit is rounded to the closest value. A float provides ~15.9 decimal digits of precision; but actually up to 17 decimal digit precision is required to represent a 53 binary digits unambiguously,
I want this, without scientific notation
 
Turns out the rate-limiting is across the company, probably due to us all using a proxy. Looks like no programming going to happen today with no SO.
 
@AnttiHaapala so why didn't you put that in here, in the room, without using the term 'made up numbers'?
 
8:12 AM
@MartijnPieters because I assumed it was clear :D
assuming that I know how to use floating point
 
I was at the start. But your responses made me seriously doubt that. Don't assume everyone has the context you have.
 
@MartijnPieters Perhaps examples would have been more helpful, but @AnttiHaapala's requirements seem clear enough to me now. It's quite a tricky problem to show numbers the way he wants.
I might confusingly term it "exact precision"
 
Antti and Martijn argument was like watching the Gendalf vs Saruman fight
13
 
EXPONENTIAL = re.compile(r'^([+-]?)([\d.]+)[eE]([+-]\d+)$')
def to_str(f):
    s = str(f)
    m = EXPONENTIAL.match(s)
    if not m:
        return s

    sign = m.group(1)
    digits = m.group(2).replace('.', '')
    exponent = int(m.group(3))

    if exponent < 0:
        digits = '0' * (-exponent) + digits
        exponent = 0
    else:
        digits = digits + '0' * exponent

    rv = sign + digits[:exponent + 1] + '.' + digits[exponent + 1:]
    rv = rv.rstrip('.')
    return rv
this is the "simplest" I've come up with so far.
 
You can probably call PyOS_double_to_string using ctypes.
 
8:18 AM
sorry for spam
 
Can you believe this guy?
could you please mark my answer as the solution. please. since you figured it out. — thesonyman101 18 mins ago
 
ah, but you don't want to use the 'r' mode, of course.
@PM2Ring happens all the time.
 
morning. Good that we now know how FizzyCorp programs ;) FWIW (nothing), I once got my whole Uni blocked from a publisher's site :p
 
Just flag the comment.
gone.
 
downvoted original
@MartijnPieters you might just delete the post :D
self-answered typo
usefulness 0
 
8:20 AM
@AnttiHaapala it'll be auto-deleted.
@AnttiHaapala it's simpler than re-producing _Py_dg_dtoa(), adjusting it to output your desired representation ;-)
 
@MartijnPieters forgot how to open python.so
 
Gmail marks my website's email confirmation as spam :|
 
pythonapi
@khajvah see the full headers
 
@AnttiHaapala the edge cases in that formatting problem are interesting
 
It also deletes the body of the message for some reason
 
8:24 AM
@holdenweb I still have trailing zeroes
but that's not too bad
should do some randomized testing
 
dll = cdll.LoadLibrary('python.so')?
 
@martijn that ssl Q is interesting. I still can't repro the reported error. As you can see from my comment yesterday, I can get the same error you reported in here (and understand why - dodgy US gov certificates ;p). Tempted to go code diving to understand fully.
 
@JRichardSnape It could be that their network is at fault. Dodgy network router.
 
@khajvah Are you sending the mail from your own server, or are you using a mailservice?
 
8:30 AM
>>> ctypes.pythonapi['PyOS_double_to_string'](ctypes.py_object(0.5), ctypes.c_char(b'r'), ctypes.c_int(0), ctypes.c_int(0), ctypes.POINTER(ctypes.c_int)())
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
SystemError: ../Python/pystrtod.c:1227: bad argument to internal function
 
(Also, did you get your weird uwsgi problem fixed?)
 
@Withnail for now, I am using gmail
 
I do not even know how to call that correctly. That is correct according to docs :(
 
Huh, odd. :(
 
ah stupid me :d
what's that py_object doing there
 
8:32 AM
@Withnail nope. I put max_requests which refreshes the servers after 300 requests. that hides the problem for now
 
@MartijnPieters alas:
>>> f(ctypes.c_double(0.5), ctypes.c_char(b'r'), ctypes.c_int(0), ctypes.c_int(0), ctypes.POINTER(ctypes.c_int)())
b'0.5'
>>> f(ctypes.c_double(0.0000000000000000000005), ctypes.c_char(b'r'), ctypes.c_int(0), ctypes.c_int(0), ctypes.POINTER(ctypes.c_int)())
b'5e-22'
 
Gah, that's lame. I was thinking about this last night (as you do)
 
only 'r' ignores the precision passed in :D
and it does exactly what repr already does
 
14 mins ago, by Martijn Pieters
ah, but you don't want to use the 'r' mode, of course.
 
could you swap out uwsgi for gunicorn temporarily? thinking that if there's a project bug, then you'll see the same behaviour in gunicorn, but if it's a uwsgi misconfig or similar, then it should disappear. "should"
 
8:33 AM
@Withnail gunicorn worked fine
I was using gunicorn before
 
hm. Well, that's both useful and not useful. :D
 
:D
 
@holdenweb @MartijnPieters pastebin.com/fC1945T8 so easy
 
I think you should just outsource that step to Amazon Mechanical Turk
 
@JRichardSnape I installed Enthought Canopy (which is what the OP is using, only on Windows) and can't reproduce the issue at all now.
Warnings galore about the dodgy cert, but a 200 response nonetheless.
/Users/mjpieters/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/requests/packages/urllib3/connection.py:303: SubjectAltNameWarning: Certificate for www.neco.navy.mil has no `subjectAltName`, falling back to check for a `commonName` for now. This feature is being removed by major browsers and deprecated by RFC 2818. (See github.com/shazow/urllib3/issues/497 for details.)
(no mounting needed, just requests.get("https://www.neco.navy.mil/necoattach/N6945016R0626_2016-06-20__INF‌​O_NAS_Pensacola_Base_Access.docx")).
 
8:43 AM
Bravo whoever came up with "Enthought"
 
@AnttiHaapala The OP self-deleted.
 
@AnttiHaapala might have helped hod you said that what you wanted was "represent any number in integer or fixed-point notation" ...
 
perhaps, but the number is still a float to begin with
which is kind of important
I am trying Decimal now,
so far the experience is not pleasing :D
decimal also prints using scientific notation
 
9:00 AM
It knows best, antti
 
>>> decimal.getcontext().prec = 200
>>> decimal.Decimal('0.000005')
Decimal('0.000005')
>>> decimal.Decimal('0.0000005')
Decimal('5E-7')
>>> format(decimal.Decimal('0.0000005'), '0100.100')
'0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005E-7'
that's ... pathetic
 
9:28 AM
Is using mpmath an option?
from mpmath import mp

#Set number of significant decimal digits
mp.dps = 100
a = mp.mpf('0.0000005')
print(a)
#output
0.0000005
print(mp.mpf(0.0000005))
#output
0.0000004999999999999999773740559129431293428069693618454039096832275390625
 
which is technically correct
(otherwise, welcome to the World of Floating Points)
 
@PM2Ring got better
import decimal

ctx = decimal.Context()
ctx.prec = 100
def foo(f):
    d1 = ctx.create_decimal(str(f))
    return '{0:f}'.format(d1)
 

« first day (2124 days earlier)      last day (2822 days later) »