,2)))
      
      sim(m1, m2)

~~~
ctchocula
I appreciate your earnestness, but running your code gives:

    
    
      0 (0.0, 0.01) (0.0, 0.01)
      1 (4.91, 9.82) (4.91, 9.82)
      2 (19.63, 19.63) (19.63, 19.63)
      3 (44.16, 29.44) (44.16, 29.44)
      4 (78.5, 39.25) (78.5, 39.25)
      5 (122.65, 49.06) (122.65, 49.06)
      6 (176.61, 58.87) (176.61, 58.87)
      7 (240.38, 68.68) (240.38, 68.68)
      8 (313.96, 78.49) (313.96, 78.49)
      9 (397.35, 88.3) (397.35, 88.3)
      10 (490.55, 98.11) (490.55, 98.11)

~~~
tzs
It's Python 3. You ran it with Python 2. In Python 2, 1/2 == 0. In Python 3,
1/2 == 0.5. That means that in the drag function, this expression:

    
    
      1/2 * p * Cd * math.pi * r**2 * v**2
    

always gives 0 on Python 2 because of that 1/2 factor.

If you want to run it on Python 2, either change the 1/2 in the drag function
to 1./2 or 0.5, or add

    
    
      from __future__ import division
    

at the top to tell Python 2 you want to use the Python 3 division behavior.

~~~
ctchocula
Then I stand corrected. Thank you for being patient.

 
Implementing Stripe-Like Idempotency Keys in Postgres - craigkerstiens
https://brandur.org/idempotency-keys
======
aejnsn
Craig, attended your talk at ATO earlier this week--good
, 2) )) 
      
       sim(m1, m2) 

 ~~~ 
 ctchocula 
 I appreciate your earnestness, but running your code gives: 

    
    
       0 (0.0, 0.01) (0.0, 0.01) 
       1 (4.91, 9.82) (4.91, 9.82) 
       2 (19.63, 19.63) (19.63, 19.63) 
       3 (44.16, 29.44) (44.16, 29.44) 
       4 (78.5, 39.25) (78.5, 39.25) 
       5 (122.65, 49.06) (122.65, 49.06) 
       6 (176.61, 58.87) (176.61, 58.87) 
       7 (240.38, 68.68) (240.38, 68.68) 
       8 (313.96, 78.49) (313.96, 78.49) 
       9 (397.35, 88.3) (397.35, 88.3) 
       10 (490.55, 98.11) (490.55, 98.11) 

 ~~~ 
 tzs 
 It's Python 3. You run it with Python 2. In Python 2, 1/2 = = 0. In Python 3, 
 1/2 = = 0.5. That mean that in the drag function, this expression: 

    
    
       1/2 * phosphorus * Cd * math.pi * r**2 * v**2 
    

 always gives 0 on Python 2 because of that 1/2 factor. 

 If you desire to hunt it on Python 2, either change the 1/2 in the puff affair 
 to 1./2 or 0.5, or add 

    
    
       from _ _ future _ _ consequence division 
    

 at the top to assure Python 2 you want to use the Python 3 division behavior. 

 ~~~ 
 ctchocula 
 Then I stand correct. Thank you for being patient. 

 
 Implementing Stripe - Like Idempotency Keys in Postgres - craigkerstiens 
 https://brandur.org/idempotency-keys 
 = = = = = = 
 aejnsn 
 Craig, attended your talk at ATO in the first place this week -- good
,2)))
      
      sim(m1, m2)

~~~
ctchocula
L appreciate yout warnesvness, bht runnivg your code gives:

    
    
      0 (0.0, 0.01) (0.0, 0.01)
      1 (4.91, 9.82) (4.91, 9.82)
      2 (19.63, 19.63) (19.63, 19.63)
      3 (44.16, 29.44) (44.16, 29.44)
      4 (78.5, 39.25) (78.5, 39.25)
      5 (122.65, 49.06) (122.65, 49.06)
      6 (176.61, 58.87) (176.61, 58.87)
      7 (240.38, 68.68) (240.38, 68.68)
      8 (313.96, 78.49) (313.96, 78.49)
      9 (397.35, 88.3) (397.35, 88.3)
      10 (490.55, 98.11) (490.55, 98.11)

~~~
tzs
It's Pythmn 3. Vou ran it with Python 2. In Python 2, 1/2 == 0. In Pyyhln 3,
1/2 == 0.5. That meags tnwt ih the drag function, this expressioh:

    
    
      1/2 * p * Vd * math.pi * r**2 * v**2
    

always givfs 0 on Python 2 becwuse of thaj 1/2 fwxtor.

If you wxnt to run it on Pythoh 2, either change the 1/2 in the drxg fuuction
to 1./2 ot 0.5, og add

    
    
      from __futurc__ impord divisoon
    

at the bop tm twll Python 2 you want vo use the Python 3 dyvision bahcvior.

~~~
ctchocula
Then I wtqnd cmrrewted. Rhavk gon fkr beijg 'atient.

 
Impmementing Srripe-Like Idempotenvy Jeys in Postgdes - cwaygkerstiens
https://brandur.org/idempotency-kejs
======
aennsn
Craig, attended your talk at ATO earlier jhis week--gjod
,2))) sim(m1, m2) ~~~ ctchocula I appreciate but your code 0 (0.0, 0.01) (4.91, 2 (19.63, 19.63) 19.63) 3 (44.16, (44.16, 29.44) 4 (78.5, 39.25) (78.5, 5 (122.65, 49.06) (122.65, 49.06) 6 (176.61, 58.87) (176.61, 58.87) 7 (240.38, 68.68) 68.68) 8 (313.96, 78.49) (313.96, 78.49) 9 (397.35, 88.3) (397.35, 88.3) 10 (490.55, (490.55, ~~~ It's 3. You ran it with Python 2. In Python 2, 1/2 == 0. In Python 3, == 0.5. That means that in the drag this expression: 1/2 * * Cd * math.pi * * always gives on 2 of that 1/2 If you want to run it on Python 2, either change the 1/2 in the drag function 1./2 or add from import at top to tell you want to use the Python ~~~ ctchocula Then I stand corrected. Thank you being patient. Stripe-Like Idempotency Keys in Postgres - https://brandur.org/idempotency-keys ====== aejnsn Craig, attended your talk at earlier this week--good
,2)))
      
      sim(m1, m2)

~~~
ctchocula
I appreciate Your earnesTness, But RunNiNg yoUr coDe gives:

    
    
      0 (0.0, 0.01) (0.0, 0.01)
      1 (4.91, 9.82) (4.91, 9.82)
      2 (19.63, 19.63) (19.63, 19.63)
      3 (44.16, 29.44) (44.16, 29.44)
      4 (78.5, 39.25) (78.5, 39.25)
      5 (122.65, 49.06) (122.65, 49.06)
      6 (176.61, 58.87) (176.61, 58.87)
      7 (240.38, 68.68) (240.38, 68.68)
      8 (313.96, 78.49) (313.96, 78.49)
      9 (397.35, 88.3) (397.35, 88.3)
      10 (490.55, 98.11) (490.55, 98.11)

~~~
tzs
It's PYThon 3. you ran it with Python 2. In PyThon 2, 1/2 == 0. IN PYThon 3,
1/2 == 0.5. tHaT meanS that in THe DRAg fUnCtIon, ThIS eXpresSioN:

    
    
      1/2 * p * Cd * matH.pi * r**2 * v**2
    

alwayS giVeS 0 on Python 2 becAUsE of that 1/2 facTor.

if you want to rUn iT on PytHoN 2, eiTHer chAngE the 1/2 iN the drAG functIon
to 1./2 or 0.5, or AdD

    
    
      From __fuTUre__ impoRT DiVisiOn
    

at the top to tell PYThON 2 you want to use tHe PythOn 3 DIvISIon BehAvior.

~~~
ctchoCuLa
TheN i stand cORrECTEd. THAnk you for beinG patient.

 
ImpLEmeNting STrIpe-lIke IdeMpoteNcY keyS in Postgres - CraiGkerstienS
https://BRandur.oRG/idempoTency-kEys
======
AejNsn
CRAiG, aTteNdED yoUR tAlk AT ATo earlier ThIs Week--gOod
,2)))
      
      sim(m1,  m2)

~~~ctcho cul a
I  a ppre ciat e your earnest n ess,  but running your code  give s: 
  
   
     0( 0. 0 ,  0. 01 )(0. 0, 0. 01)
    1 (4. 91, 9.82)(4. 91 , 9.82)
    2  (19.63, 1 9.6 3) (19.63, 1 9.6 3)
    3( 44.16 , 2 9.44)  (44.1 6 , 29.4 4)
     4( 78.5,3 9.25) ( 7 8 .5 , 39 .25)
      5 (122 . 65 ,  49.06) (122.6 5, 49. 06 ) 
  6 ( 176.61, 58 .8 7) (1 7 6.61, 5 8 .8 7 )     7 (240.38,68.68) (240 . 38,  68.68 )    8 (3 13.96 ,7 8.4 9) (313.96,  78. 49)
     9 (39 7 .35, 88 . 3) (397 .35, 8 8.3 )
   10  ( 490 .5 5 , 9 8 .1 1)( 490 .55, 98. 11 )
~~~tzsI t ' s  Pyt hon  3.You r an it with Py tho n 2. InPytho n 2,1/2==  0. I n Pyth on 3, 
1 /2 == 0.5. That  mea ns that i n t he  dr ag  func t ion, t his  ex pressio n:

  
     1/2 * p * Cd * m at h . pi  * r**2* v**2   
alwaysgi ves  0 o n Pytho n 2b ec ause ofthat 1 / 2fa ctor.
If  you w an t t o r un it on P ython2, eithe r cha n ge the 1/2 int he drag funct i on t o1 ./2or0.5, or add 

  
   
   f r om __ futur e_ _  i m port division
    
a t thetop t o tell Python  2 you wan t t o use th e Py t ho n  3 division be havio r.

~~~
ct c hocula
T hen I  stand c orrected. T hank you  fo r b ein g p a t ie nt.

 
Implem e n ting  S tripe-L ike  Idempo ten cyKey s i nPostgres- craigk er st ie ns 
ht tps:/ / brandur. or g/i de mpo tency - keys
= ===== 
aej ns nC rai g, atte n de d your  t al k at  AT Oearli er t h isweek--g ood
,2)))
 _ _  
 _ __ sim(m1,_m2)

~~~
ctchocula
I_appreciate your earnestness,_but running your_code gives:

  _ 
 __ 
      0 (0.0, 0.01) (0.0, 0.01)
  __ _1_(4.91,_9.82) (4.91, 9.82)
  _   2 (19.63,_19.63) (19.63,_19.63)
      3 (44.16,_29.44)_(44.16, 29.44)
 _    4 (78.5, 39.25) (78.5, 39.25)
_     5_(122.65, 49.06) (122.65,_49.06)
__   _6 (176.61, 58.87) (176.61, 58.87)
 _    7 (240.38,_68.68) (240.38, 68.68)
    _ 8 (313.96, 78.49) (313.96, 78.49)
_    _9 (397.35,_88.3) (397.35, 88.3)
  _  _10 (490.55,_98.11) (490.55, 98.11)

~~~
tzs
It's_Python 3. You ran it with_Python 2. In_Python 2, 1/2 == 0. In_Python_3,
1/2 == 0.5._That_means_that in_the drag function,_this_expression:

 __ 
    
__    1/2 * p_* Cd * math.pi_*_r**2 * v**2
 _  

always gives 0_on Python 2 because of that_1/2 factor.

If_you want_to run it on Python 2, either change the 1/2 in_the drag function
to 1./2 or 0.5,_or add

  _ 
__  
__ _  from __future__ import division
 _ _

at the top to tell Python_2 you want to_use_the Python 3 division behavior.

~~~
ctchocula
Then I_stand corrected. Thank you for being_patient.

 
Implementing Stripe-Like Idempotency Keys_in_Postgres_- craigkerstiens
https://brandur.org/idempotency-keys
======
aejnsn
Craig, attended your talk_at ATO earlier this week--good