[00:00:50] -nobody- Kebap23 has quit FREENODE (Ping timeout: 240 seconds) [00:02:05] *** Quits: Kebap (Max@RBOSE-on2q06.adsl.alicedsl.de) (Ping timeout: 241 seconds) [00:02:06] *** Joins: Kebap (Max@RBOSE-2rt408.adsl.alicedsl.de) [00:06:03] -nobody- Kebap23 has joined on FREENODE [00:06:05] -nobody- mode change by ChanServ on FREENODE: +v Kebap23 [00:43:15] *** Quits: Cyclo (Cyclo@RBOSE-pdk.uv3.156.78.IP) (Connection closed) [01:21:06] *** Quits: lukas (lukas@RBOSE-gkfu2h) (Quit: WeeChat 0.3.7-dev) [03:45:47] *** Quits: Hakufu (jonte@RBOSE-aa2ikg.bredband.comhem.se) (Ping timeout: 241 seconds) [04:05:30] *** Quits: antilect (antilect@RBOSE-1a724n.bredband.comhem.se) (Quit: Lämnar) [04:25:20] -nobody- mode change by ChanServ on FREENODE: +v comotion [08:39:31] *** Joins: kalken (default@RBOSE-1a724n.bredband.comhem.se) [08:40:52] -nobody- DNS777 has quit FREENODE (Remote host closed the connection) [08:42:02] -nobody- DNS777 has joined on FREENODE [08:42:04] -nobody- mode change by ChanServ on FREENODE: +v DNS777 [09:30:25] -nobody- DNS777 has quit FREENODE (Remote host closed the connection) [09:30:29] -nobody- DNS777 has joined on FREENODE [09:30:30] -nobody- mode change by ChanServ on FREENODE: +v DNS777 [10:32:23] -nobody- DNS777 has quit FREENODE (Remote host closed the connection) [10:32:28] -nobody- DNS777 has joined on FREENODE [10:32:30] -nobody- mode change by ChanServ on FREENODE: +v DNS777 [10:34:40] *** Joins: lukas (lukas@RBOSE-gkfu2h) [10:49:30] -nobody- DNS777 has quit FREENODE (Remote host closed the connection) [10:49:35] -nobody- DNS777 has joined on FREENODE [10:49:36] -nobody- mode change by ChanServ on FREENODE: +v DNS777 [10:53:06] *** Quits: DNS777 (DNS777@NetAdmin.RBOSE) (A TLS packet with unexpected length was received.) [10:53:25] *** Joins: DNS777 (DNS777@RBOSE-tqb8pp.superkabel.de) [11:01:03] -nobody- DNS777 has quit FREENODE (Read error: Operation timed out) [11:01:38] -nobody- DNS777 has joined on FREENODE [11:01:40] -nobody- mode change by ChanServ on FREENODE: +v DNS777 [11:07:28] *** Quits: DNS777 (DNS777@search.for.freedom) (A TLS packet with unexpected length was received.) [11:07:31] *** Joins: DNS777 (DNS777@RBOSE-tqb8pp.superkabel.de) [11:33:03] -nobody- Calyp has joined on FREENODE [11:33:04] -nobody- mode change by ChanServ on FREENODE: +v Calyp [11:33:10] *** Joins: Caly (Caly@RBOSE-jo3dv6.cust.telenor.se) [11:37:20] *** Joins: kman (kman@RBOSE-1vjua3.student.uu.se) [11:49:43] *** Joins: Cyclo (Cyclo@RBOSE-pdk.uv3.156.78.IP) [12:03:57] "If you're havin' IE problems, I feel bad for you, son - I got 99 problems but a browser ain't one. - DJ Danger Mime" [12:25:48] http://www.naturalnews.com/034529_solar_cells_power_paint.html [12:25:51] Title:  Paint-on solar cells? How your house's next coat of paint could become a power generator (at www.naturalnews.com) [12:41:14] * lukas wonders how they want to utilize/recycle this 10^-9 m in size stuff afterwards [13:27:00] *** Joins: antilect (antilect@RBOSE-1a724n.bredband.comhem.se) [13:27:59] *** Quits: kman (kman@RBOSE-1vjua3.student.uu.se) (Connection closed) [13:38:45] *** Joins: ZyaX (9jti8d8@RBOSE-5lntnm.bredband.comhem.se) [14:53:23] *** Quits: Cyclo (Cyclo@RBOSE-pdk.uv3.156.78.IP) (Connection closed) [14:53:34] *** Joins: Cyclo (Cyclo@RBOSE-pdk.uv3.156.78.IP) [14:58:58] http://www.youtube.com/watch?v=anqKC0i0a7Y [14:59:00] Title:  Homemade Plastic Extrusion System - YouTube (at www.youtube.com) [14:59:56] http://www.youtube.com/watch?v=clvlPHzcOpM [14:59:58] Title:  Home Made Plastic - YouTube (at www.youtube.com) [15:02:38] http://www.youtube.com/watch?v=0h9cLpLw_9E [15:02:40] Title:  Sequencing / Indexing Valve - YouTube (at www.youtube.com) [15:24:31] *** Quits: iderik (idk@RBOSE-dv9gss.tbcn.telia.com) (Quit: WeeChat 0.3.5) [15:25:47] *** Joins: iderik (idk@RBOSE-dv9gss.tbcn.telia.com) [15:36:05] *** Quits: antilect (antilect@RBOSE-1a724n.bredband.comhem.se) (Quit: Lämnar) [15:54:04] *** Quits: ZyaX (9jti8d8@RBOSE-5lntnm.bredband.comhem.se) (Ping timeout: 241 seconds) [16:42:50] *** Quits: iderik (idk@RBOSE-dv9gss.tbcn.telia.com) (Ping timeout: 241 seconds) [16:43:21] *** Joins: iderik (idk@RBOSE-dv9gss.tbcn.telia.com) [17:12:38] *** Quits: iderik (idk@RBOSE-dv9gss.tbcn.telia.com) (Quit: WeeChat 0.3.5) [17:18:30] *** Joins: kman (kman@RBOSE-2ai7mn.student.uu.se) [17:35:19] *** Joins: iderik (idk@RBOSE-dv9gss.tbcn.telia.com) [18:08:56] *** Joins: ZyaX (9jti8d8@RBOSE-5lntnm.bredband.comhem.se) [18:24:19] Good evening [18:32:40] lukas, DNS777 , you oracles of python, i have a question. [18:34:00] kman: ask me! [18:35:45] I want to search for a string that has this format : [18:36:19] Wait.. [18:36:26] I think i might be able to figure this one out. [18:36:29] I should be able to. [18:37:24] kman: regex? [18:38:23] yes, but its a tricky search variable. I have to extract some numbers from a data file. The pattern is common in the file so i get the relevant number + loads of shit i dont need. [18:38:31] Have to make it more specific. [18:39:28] kman: could you give me a pastebin of that? im curious [18:40:19] its in gobby actually [18:40:32] under python->kmansandbox.py or something like that [18:41:14] gah, no gobby here anymore [18:41:36] Get gobby there forever more. [18:43:11] hmm :/ [18:44:07] But, i can make a pastebin for you, sure :9 [18:44:45] kman: thank you so much! :) [18:45:44] http://pastebin.com/9evFBEqp [18:45:47] Title:  [Python] import sys import string from os import close #this is not needed here, the l - Pastebin.com (at pastebin.com) [18:46:14] In gobby, DNS777 (or was it Kebap ?) made some comments on using the new "with" command to open the files etc. [18:46:37] yes [18:46:54] try to highlight my name if you need python assistance ;) [18:47:00] The pattern im looking for is: [18:47:00] ---- [18:47:01] 1 0.7000 -1.12612 [18:47:14] I want the 0.7 and -1.126 digits [18:47:29] The above pastebin will find too many digits for me. [18:47:49] So perhaps i should add another group to my re.findall [18:48:20] Or replace the *(-?"----"\n) [18:48:24] With something else. [18:48:34] kman: so you get 0.7000 and -1.12612? [18:48:42] Kebap, what does the "?" do in the regexp? [18:48:58] if you print " 1 0.7000 -1.12612".strip().split() you will get the three values: ['1', '0.7000', '-1.12612'] [18:48:58] iderik, i get those, and a shitload of other digits that fit the same pattern. [18:49:25] kman: i dont use regexp for such simple tasks, it is too confusing ^^ [18:49:41] Kebap, Sure, but what im using the regexp for is finding those digits in a large data file. [18:49:52] Kebap: good solution [18:50:04] oh [18:50:07] iderik, actually, for my purpose, its not a good solution., [18:50:47] I see now that i should have learnt to do this without regexp first. It is confusing. [18:51:31] But, the findall keys doesnt find any of the data: match = re.findall(r'*(-?"----"\n) *(\d*) *(-?\d+\.?\d*) *(-?\d+\.\d*)', outcontent) [18:51:45] So perhaps the (-="----"\n) is wrong? [18:52:00] Kebap, iderik , any ideas? [18:52:02] kman, please explain your purpose more, and/or show some actual input & desired output [18:52:08] kman: this is great: http://www.youtube.com/watch?v=kWyoYtvJpe4&feature=relmfu [18:52:11] Title:  Google Python Class Day 2 Part 1 - YouTube (at www.youtube.com) [18:52:21] yep [18:52:22] http://code.google.com/intl/de/edu/languages/google-python-class/regular-expressions.html [18:52:25] Title:  Python Regular Expressions - Googles Python Class - Google Code (at code.google.com) [18:52:29] was about to refer that, too ^^ [18:52:58] kman: that expression looks kinda too "big" for that task imo [18:53:02] the character ? is used for repetition, matches 0 or 1 occurences of the pattern to its left [18:53:04] I want to open an output file from a program, find some specific numbers and write those to a new file. Quite simple. [18:53:10] i mean, like you overdone it [18:53:25] you know how the () works? [18:53:35] the ()? [18:53:44] I know they represent groups in the re.findall [18:53:57] ah ok [18:54:02] Im not sure i understand your question :;) [18:54:08] :;) = :) [18:54:19] so the variable match will give you 4 results [18:54:26] i join gobby now to find more info on this [18:54:43] iderik, correct, but i only write two of the groups. [18:54:50] Kebap, alright! [18:55:35] Kebap, the code there is not the same as in the pastebin. The gobby code is more of an example, or a discussion of what i could use. [18:55:57] actually i seek the textfile you use for input and the criteria you use to filter [18:56:01] Also, the pastebin i posted up there contains an error. Im writing the wrong groups. [18:56:24] Kebap, paste bin coming up. [19:12:08] iderik, you learning python as well? [19:22:15] Kebap, you here? [19:23:29] kman, I am in gobby [19:26:46] hi guys :) [19:28:10] kman: you can simply replace match = re.findall(r'*(-?"----"\n) *(\d*) *(-?\d+\.?\d*) *(-?\d+\.\d*)', outcontent) with match = re.findall(r'*(-?"----"\n) *\d* *(-?\d+\.?\d*) *(-?\d+\.\d*)', outcontent) to get only the 2nd and 3rd numbers [19:32:50] Getting an error thrown tehre. [19:33:31] and if you need the second number with less significant figures, then you could change the regex there too, but i would suggest rather to extract whole number and round it properly to get the right value -- if you cut off just numbers 0.199 and 0.11 to have 0.1 you would make a very relevant error [19:33:58] let me jump to gobby too [19:34:06] hi lukas :) [19:34:21] hey :) [19:34:47] I try to solve this without regex now, so kman has more of a chance to understand python maybe :D [19:35:24] oh kman i see now that i pasted the code from pastebin assuming it was the way how we left it, but i see there a mistake [19:35:36] Kebap: understood :) [19:36:00] lukas, yes, i would write the wrong groups using that match, wouldnt i? [19:36:33] i doubt you can find anything with the regex i see in pastebin [19:38:53] so, i assumed you had this: match = re.findall(r' *(\d*) *(-?\d+\.?\d*) *(-?\d+\.\d*)', outcontent) and wanted to propose this match = re.findall(r' *\d* *(-?\d+\.?\d*) *(-?\d+\.\d*)', outcontent) [19:39:13] one group there less, you don't need it so you don't search for it [19:39:59] i mean if you don't need it then don't look for it [19:40:17] yeah thats true. [19:40:38] using those findall variables just includes a lot of numbers i dont want. [19:40:46] I need a pattern that is more specific [19:41:18] can you paste a sample data file in gobby? [19:41:35] then i can run it as well and check :) [19:43:02] lukas, found in "input" [19:43:15] pattern starts at 3586 [19:43:27] stops at 3610 [19:44:06] i'm not sure what input you mean atm, is that a file? variable? process? [19:44:44] kman: ? [19:44:48] file in gobby [19:45:01] ok, then something lags here :( [19:45:50] :( [19:45:52] Its a big file. [19:45:55] Its under kman [19:48:01] lukas, see anything ther? [19:48:03] +e [19:48:05] oh, this file has a completely different structure! [19:48:24] we wrote the script for something totally different [19:48:28] Well not really, the pattern is there, but with a shitload of moer text. [19:48:46] So the match pattern has to be more specific. [19:49:05] for sure [19:49:15] this file looks like a mess :D [19:49:25] gaussian outout is a bloody mess. [19:49:42] Hence, the need of a clever python script :) [19:49:56] which lines you are interested in for example? [19:50:21] Like i said, the numbers between line 3586 and 3610 [19:50:31] ok! [19:50:46] In the pattern previously mentioned :) [19:51:09] Iv got the string formating working, all i need is a match pattern that is more specific. [19:51:19] The regexp finds to many matches with the current pattern. [19:51:47] will you have multiple such files each with different position in file of data interesting for you or just this one? [19:53:12] kman: ? [19:53:46] ok I solved it, I think [19:54:15] finds the headline, finds the first line of numbers, extracts number 2 and 3, writes them to data file [19:54:20] Only one pattern per file [19:55:37] i would do exactly as Kebap suggests :) [19:58:41] But Kebap, i want all numbers with that pattern, not just the ones in the first line. [19:59:21] If i use the match = re.findall(r' *(\d*) *(-?\d+\.?\d*) *(-?\d+\.\d*)', outcontent) thats what i get [19:59:27] Perhaps you misunderstood me :) [20:00:30] damn [20:00:39] I thought we discussed this 30mins ago [20:01:04] ok back to the drawing board [20:01:10] :/ [20:02:14] can there be 0 rows of numbers in the summary? [20:02:43] kman: try now i made changes on line 14-16 [20:02:46] No. There should always be something there. [20:02:50] lukas, thanks, will do! [20:03:38] wait, lukas where are you writing? [20:03:40] kman, while you're at it: what should the output file look like, just number, space, number, each in its own line? [20:03:53] kmansandbox.py [20:04:12] and works for me [20:04:32] Kebap, i want the numbers in the r12 and SCF column for a table. [20:04:54] how do you need them for a table? [20:04:55] Im using those numbers for simple regression analysis [20:05:34] I can just open the .dat file in qtiplot, for example, and plot the two columns. [20:06:08] kman: Python/kmansandbox.py [20:07:10] server down [20:08:13] (T_TU) [20:08:38] lukas, can you msg me those changes perhaps? [20:08:46] restarted, we got weird error [20:10:08] sec. i need to reconnect as well, lost that from eyes [20:10:40] O_o [20:10:45] the file is empty [20:11:14] but sec. i saved it on desktop when i had to run it [20:11:59] Waa! [20:12:32] * kman watches as his life flashes before his eyes. Is this the end of life? What comes next? [20:13:29] Well iv got all the stuff from Kebap in eclipse [20:13:45] And the regexp based script. [20:14:02] lukas, did you have any suggestions on the match pattern? [20:14:41] kman, please find my script updated [20:15:39] http://pastebin.com/L6gp41Zd [20:15:43] Title:  [Python] import sys import string #this we can skip too from os import close #this is - Pastebin.com (at pastebin.com) [20:16:32] i can paste it too http://pastebin.com/YZtPTXk6 [20:16:34] Title:  [Python] def getcontent(outputfilename): with open(outputfilename, 'r') as outfile: - Pastebin.com (at pastebin.com) [20:16:52] it is weird to name the input file outputfile [20:16:59] Kebap, [20:16:59] http://pastebin.com/qih0b25C [20:17:02] Title:  [Python] import sys def getcontent(outputfilename): with open(outputfilename, 'r') - Pastebin.com (at pastebin.com) [20:17:04] yeah.... [20:17:20] Well thats because the input is really the output of gaussian. [20:17:28] kman: that is old solution, will only display the first line of numbers. see my link above for a new and improved etc [20:17:33] But its a little wierd. [20:17:39] :) [20:18:00] kman: and in the other solution lines 14-21 with a lot of comments ;) [20:18:51] nice split idea there lukas :) [20:19:43] ok I am away for a bit, was nice coding with you guys [20:19:43] thx :) i usually cut files like that [20:20:03] thx too :) [20:20:06] lukas, yeah thats a really nice idea [20:20:13] Kebap, thanks soo much for your help! [20:20:54] lukas, i bet that can improve the speed of a script a lot if the input (outputfiles ^^) files get large. [20:21:01] * kman will remember this [20:21:29] :) [20:21:32] Also, i think todays little lesson is: if it can be done without regexp, do it without regexp. [20:21:40] For now at least. [20:21:48] oh, regex is great! [20:21:51] That will force me to remember the basic string formating stuff. [20:22:05] lukas, but its kind of messy if you have a lot of code. [20:22:20] yeah, string operations is a good practice as well :) [20:23:31] Waaa i really need to buy some groceries before i jump to bed. [20:23:48] lukas, think we could come up with another python challenge for me once im done with these two scrips? [20:23:54] I really want to learn more python. [20:24:07] Anything you guys are working on right now that i can follow? [20:24:52] http://pastebin.com/hnbVtyJT kman, same script without comments [20:24:54] Title:  [Python] import sys import re def extractoutput(outputfile): outfile = open(output - Pastebin.com (at pastebin.com) [20:25:28] Awesome :3 [20:27:05] http://pastebin.com/f2S6GWh4 and this way if you change the regex, 2 lines more, and of we don't use there the shortest possible forms since that could confuse a bit when a person is new to python [20:27:11] Title:  [Python] import sys import re def extractoutput(outputfile): outfile = open(output - Pastebin.com (at pastebin.com) [20:27:13] 2 line less* [20:27:34] so i think with regex it can be really clean :D [20:29:02] Thing is, right now, i dont really know when its appropriate to regexp instead of simple string formatting, so i'll just stick to the latter from hereon. [20:29:31] btw, i only made slight changes to what you wrote :) [20:29:43] I know, but they are important :) [20:30:17] Anyways, i really have to go, but think about if there are any coding projects that might be a good learning experience to follow for me. I mean rbose projects. [20:30:34] Always a pleasure coding with you guys! :) [20:30:36] understood, but i think regex is much faster and easier to include different fluctuations in variables [20:30:55] Perhaps we could talk about that later. Id like to hear your perspective on that. [20:31:04] sure :) [20:31:04] *poff [20:31:06] *** Quits: kman (kman@RBOSE-2ai7mn.student.uu.se) (Quit: Leaving) [20:36:30] *** Joins: maat (maat@RBOSE-7vk5te.fr) [20:38:25] ahoy [20:38:43] just saw you put up the new website, nice :) [20:39:12] hi maat :) [20:40:57] i found another great project! [20:40:59] http://youtu.be/iuwkzNjaPwc [20:41:01] Title:  28c3: Building a Distributed Satellite Ground Station Network - A Call To Arms - YouTube (at youtu.be) [20:41:30] http://www.bbc.co.uk/news/technology-16367042 [20:41:33] Title:  BBC News - Hackers plan space satellites to combat censorship (at www.bbc.co.uk) [20:42:05] yeah, i heard about too, but thanks for the links! :D [20:43:39] i just talked a bit with one team member [20:43:49] they're very excited about the project :) [20:43:54] hope this will go somewhere [20:44:12] great :) [20:44:34] i'm think about helping with that too, but need first learn more about it [20:46:08] maat: do you know this one too https://secure.wikimedia.org/wikipedia/en/wiki/OSCAR ? [20:46:12] Title:  OSCAR - Wikipedia, the free encyclopedia (at secure.wikimedia.org) [20:46:52] no, they talked about it in their 28c3 talk, but i did not have time to look at it yet [20:46:55] thanks [20:47:58] are you on hgg's mailing list? [20:53:50] say wo0t [20:54:06] hi DNS777 :D [20:54:09] o/ [20:54:12] wo0t wo0t [20:54:13] :D [20:54:57] maat: not sure what you mean with hgg so probably i'm not :) [20:55:17] hacker ground grid or something [20:55:26] the group behind the previous youtube video [20:55:37] hgg = hack global gangstaz [20:55:39] jk [20:55:41] :) [20:56:28] y0 i got my private mumble serv0r runnin [20:56:37] anybody itnersting in havin a meeeting? [20:56:40] :P [20:57:06] if s0 then tell me ill msg you data [20:57:50] i would like to speak about projects in general and some future things, we need to plan some stuff i think [20:58:16] stuff is important! [20:58:21] need moar stuff! [20:58:44] oh life without stuff really shows what is important :) [21:04:16] !poke lukas [21:04:18] ACTION pokes lukas in #RBOSE a bit with some creativity [22:58:07] *** Quits: ZyaX (9jti8d8@RBOSE-5lntnm.bredband.comhem.se) (Ping timeout: 241 seconds) [23:03:08] *** Joins: Evil (qWEBirc@RBOSE-h28fdc.pool.ukrtel.net) [23:04:38] Hi folks [23:07:13] !hug Evil [23:07:15] ACTION hugs Evil for lukas and hopes that Evil enjoys it :) [23:27:45] *** Quits: kalken (default@RBOSE-1a724n.bredband.comhem.se) (Ping timeout: 241 seconds)