GDPR and DSGVO law

Storing Cookies (See : http://ec.europa.eu/ipg/basics/legal/cookies/index_en.htm ) help us to bring you our services at overunity.com . If you use this website and our services you declare yourself okay with using cookies .More Infos here:
https://overunity.com/5553/privacy-policy/
If you do not agree with storing cookies, please LEAVE this website now. From the 25th of May 2018, every existing user has to accept the GDPR agreement at first login. If a user is unwilling to accept the GDPR, he should email us and request to erase his account. Many thanks for your understanding.
Amazon Warehouse Deals ! Now even more Deep Discounts ! Check out these great prices on slightly used or just opened once only items.I always buy my gadgets via these great Warehouse deals ! Highly recommended ! Many thanks for supporting OverUnity.com this way.

User Menu

Plug Heater

Powerbox

Smartbox

3D Solar

3D Solar Panels

DC2DC converter

Micro JouleThief

FireMatch

FireMatch

CCKnife

CCKnife

CCTool

CCTool

Magpi Magazine

Magpi Magazine Free Rasberry Pi Magazine

Battery Recondition

Battery Recondition

Arduino

Ultracaps

YT Subscribe

Gravity Machines

Tesla-Ebook

Magnet Secrets

Lindemann Video

Navigation

Products

Products

WaterMotor kit

Statistics


  • *Total Posts: 501815
  • *Total Topics: 14978
  • *Online Today: 44
  • *Most Online: 103
(December 19, 2006, 11:27:19 PM)
  • *Users: 1
  • *Guests: 18
  • *Total: 19

Author Topic: Python online compiler  (Read 186 times)

Offline ayeaye

  • Sr. Member
  • ****
  • Posts: 443
Python online compiler
« on: October 13, 2018, 06:42:50 AM »
I looked at quite a few. Then found the following, and it appeared to be good.

https://trinket.io/python/403945f28d

The code can be edited, which is the most important for the purpose. One cannot provide a standard input data, which is bad. But one can provide an input file. The solution is to name it always "input.txt". So the example that i provided earlier, that inputs and outputs a list, becomes the following.

Quote
a = 1.2
f = open("input.txt")
for s in f:
   print(float(s) + a)
f.close()

What was added is only file open and file close, and the file is always the same. The black triangle above there, runs it.


Free Energy | searching for free energy and discussing free energy

Python online compiler
« on: October 13, 2018, 06:42:50 AM »

Offline ayeaye

  • Sr. Member
  • ****
  • Posts: 443
Re: Python online compiler
« Reply #1 on: November 04, 2018, 08:08:42 PM »
To get some idea, parse a csv line from oscilloscope output, using the function nextt().

Quote
def nextt(sl, separator):
  endp = sl[0].find(separator)
  if (endp == -1): endp = len(sl[0])
  tok = sl[0][: endp]
  sl[0] = sl[0][endp + 1 : ]
  return tok

csv = ["-8.800000e-07,-0.0335937,27.7188,29.9703,0.00242187,,-8.800000e-07,1.40625e-06"]
while (csv[0] != ""):
  print(csv)
  print(nextt(csv, ","))

Output.

Quote
['-8.800000e-07,-0.0335937,27.7188,29.9703,0.00242187,,-8.800000e-07,1.40625e-06']
-8.800000e-07
['-0.0335937,27.7188,29.9703,0.00242187,,-8.800000e-07,1.40625e-06']
-0.0335937
['27.7188,29.9703,0.00242187,,-8.800000e-07,1.40625e-06']
27.7188
['29.9703,0.00242187,,-8.800000e-07,1.40625e-06']
29.9703
['0.00242187,,-8.800000e-07,1.40625e-06']
0.00242187
[',-8.800000e-07,1.40625e-06']

['-8.800000e-07,1.40625e-06']
-8.800000e-07
['1.40625e-06']
1.40625e-06

Trinket.

https://trinket.io/python/7b6e01a541


 

OneLink