View unanswered posts | View active topics
Author |
Message |
SvaRoX
|
Posted: 02.22.11 |
|
|
Leader |
|
Joined: 11.29.08 Posts: 1972
|
I think the data table needs quite a while to be written so I would like to be sure the table is full before being read. Can't it be done with LOCK TABLES instruction ? Not sure it only prevents reading it, maybe only writing it. Any idea ?
_________________ ut4_he_tennis_v0.1------------------------- "We are talking about computers here, compared to those I can read women like a book ;P" Unclefragger
|
|
Top |
|
|
JRandomNoob
|
Posted: 02.23.11 |
|
|
DSWP Meme Artist |
|
Joined: 12.05.10 Posts: 1853 Location: Estonia
-----tdm:
nick: WidespreadPanic
skill: 618.539
kills: 12260
deaths: 10971
ratio: 1.11
-----bomb:
nick: SelfRescuingPrincess
skill: 254.796
kills: 219
deaths: 202
ratio: 1.08
|
SvaRoX wrote: I'm surprised python always get wrong data, how do you retrieve it ? I'm surprised too, because there shouldn't be any difference in results whether I'm retrieving the page via browser, using that Javanese voodoo in DSWP bar, or using Python libraries. I've tried urllib, urllib2, and httplib -- all of these give perfect results on first try, it's just that the last line of retrieved data is always wrong. Not truncated, not botched, server gives me wrong data. And yes, thank you, other pages come through just fine. There must be a workaround, but I've tried everything I can think of (and some more) to no avail. Although now I downloaded Cuntie's source (you ain't making it easy to find it:-P) and found that she uses different address to retrieve the data. I was trying the method used in DSWP bar (POST a username and password to http://www.dswp.de/old/perso_friends.php), but Cuntie's looking at http://www.dswp.de/old/perso_friends_bot.php instead. Which is working perfectly, BTW. (Nonetheless, the issue with the former page needs fixing; there
are some people
is a Javascript using this data every day;-)) SvaRoX wrote: Too bad you don't code on CuntBot, it's open source you know Scary thought, me writing something that I can't kill when someone inadvertently pushes it into infinite loop:-P (which happened twice when I tried conditional refreshing to force the page magically becoming correct). To make it clear: Today it's fourth day of writing code for me in any language (I suppose playing with Javascripts embedded in HTML so they become broken for some mystical reason, which I did ten years earlier, doesn't count). --- Unclefragger just brought Cuntie back online, BTW. I'm going to continue working on aimlessbot anyway, it's not like Cuntie doesn't ever drop:-) And I should implement the randomizer used in Cuntie's code (for better penises, HELL YEAH), and do some magic so that both bots could listen for commands at the same time without aimlessbot trying to answer the same stuff, and... well, it's interesting, coding.
|
|
Top |
|
|
SvaRoX
|
Posted: 02.23.11 |
|
|
Leader |
|
Joined: 11.29.08 Posts: 1972
|
wurst wrote: hmm, which table?
btw, i still cant get rid of that 002 bar... Ooops, the table name is plugin_account_data. Sorry about the version, I haven't updated it yet :/ (ugly stuff to do to sign the bar, lazy to do that =). So the 0.0.3 is the right one, weather it asks you for installing a newer version or not... JRandomNoob wrote: I was trying the method used in DSWP bar (POST a username and password to perso_friends.php), but Cuntie's looking at perso_friends_bot.php instead. Oh I didn't realized, the perso_friends.php page uses cookies for keeping your ID once you send the POST data, so it's more dedicated to be used in browser. Better use the other one (unless you only care about get info about your "friends" =) GL learning programming
_________________ ut4_he_tennis_v0.1------------------------- "We are talking about computers here, compared to those I can read women like a book ;P" Unclefragger
|
|
Top |
|
|
JRandomNoob
|
Posted: 02.23.11 |
|
|
DSWP Meme Artist |
|
Joined: 12.05.10 Posts: 1853 Location: Estonia
-----tdm:
nick: WidespreadPanic
skill: 618.539
kills: 12260
deaths: 10971
ratio: 1.11
-----bomb:
nick: SelfRescuingPrincess
skill: 254.796
kills: 219
deaths: 202
ratio: 1.08
|
SvaRoX wrote: Oh I didn't realized, the perso_friends.php page uses cookies for keeping your ID once you send the POST data, so it's more dedicated to be used in browser.
AFAIK the relevant libraries in Python can totally handle cookies, so this shouldn't be much of a problem... unless it is, of course. SvaRoX wrote: Better use the other one (unless you only care about get info about your "friends" =)
Yeah, aimlessbot got !status and !players capabilities about twenty hours ago:-) SvaRoX wrote: GL learning programming Thanks, gonna need it. Breaking my teeth on regexes right now... BTW, I couldn't find any clues in Cuntie's Fun plugin of where this penis graphic after the string comes from. I take the version available at viewgit isn't exactly the newest one? UFF said something cryptic about, quote, oh there is still fetch git ... we're not using that one anymore xD, unquote -- what does that mean? Yes, I know about Git, but how does this sentence parse?
|
|
Top |
|
|
SvaRoX
|
Posted: 02.23.11 |
|
|
Leader |
|
Joined: 11.29.08 Posts: 1972
|
JRandomNoob wrote: AFAIK the relevant libraries in Python can totally handle cookies, so this shouldn't be much of a problem... unless it is, of course.
SvaRoX wrote: Better use the other one (unless you only care about get info about your "friends" =)
Yeah, aimlessbot got !status and !players capabilities about twenty hours ago:-) I mean when you use perso_friend.php, what you get is related to your forum account. It's not needed for !status and !players, unless of course you want to get a playerlist with your friend's names highlighted or such (but you need your bot to be able to handle user accounts then). JRandomNoob wrote: BTW, I couldn't find any clues in Cuntie's Fun plugin of where this penis graphic after the string comes from. Right, I added the ASCII stuff for another cunbot and haven't updated git JRandomNoob wrote: UFF said something cryptic about, quote, oh there is still fetch git ... we're not using that one anymore xD "we" ?! I don't remember UFF ever dealt with git here... And yes we still use it, which doesn't mean every projects are up-to-date Exercise for you : reproduce the output of the ASCII dick :p
_________________ ut4_he_tennis_v0.1------------------------- "We are talking about computers here, compared to those I can read women like a book ;P" Unclefragger
|
|
Top |
|
|
JRandomNoob
|
Posted: 02.23.11 |
|
|
DSWP Meme Artist |
|
Joined: 12.05.10 Posts: 1853 Location: Estonia
-----tdm:
nick: WidespreadPanic
skill: 618.539
kills: 12260
deaths: 10971
ratio: 1.11
-----bomb:
nick: SelfRescuingPrincess
skill: 254.796
kills: 219
deaths: 202
ratio: 1.08
|
SvaRoX wrote: Right, I added the ASCII stuff for another cunbot and haven't updated git Aha! Doitdoitdoitdoitdoitdoit SvaRoX wrote: "we" ?! I don't remember UFF ever dealt with git here... And yes we still use it, which doesn't mean every projects are up-to-date Whoops, I meant to say UCF:-P Had a braino caused by him starting his sentence with onomatopoetic "uff". SvaRoX wrote: Exercise for you : reproduce the output of the ASCII dick :p Well, a (ahem) full-blown !penis with appropriate graphics was the first thing I wrote (I started with a different bot, Phenny, but it proved much too unstable). I interpolated the data from my IRC log, found that the graphic grows by one equal sign for about every inch, and created a bunch of if's to choose the appropriate string for each value (as in if penile_rand <= 2.5: penile_graphic = "8D"). I'm fully aware this could be done more elegantly, allowing for pretty much unlimited lengths, but I'm (ahem again) dicking around with other functions right now. (Only changed the algorithm from random.randint(), although there really shouldn't be much difference in results unless we're dealing with generations of CuntBot users:-P)
|
|
Top |
|
|
AimMe
|
Posted: 02.23.11 |
|
|
Godlike |
|
Joined: 09.28.08 Posts: 2318 Location: Solar System
|
JRandomNoob wrote: and created a bunch of if's to choose the appropriate string for each value (as in if penile_rand <= 2.5: penile_graphic = "8D"). I'm fully aware this could be done more elegantly, allowing for pretty much unlimited lengths, but I'm (ahem again) dicking around with other functions right now. Isn't there at least thing like case? (case penile_rand....)
_________________
|
|
Top |
|
|
natirips
|
Posted: 02.24.11 |
|
|
[dswp]R.Stallman |
|
Joined: 04.13.09 Posts: 2946 Location: Solar System/≈Zagreb
-----tdm:
nick: [ntr]Shortly
skill: 497.05
kills: 3446
deaths: 4411
ratio: 0.78
-----bomb:
nick: [ntr]Shortly
skill: 707.602
kills: 526
deaths: 863
ratio: 0.60
|
This is just some pseudocode: Code: float length; length = random(); const float lenght_of_one_equals_sign=2.5;//for 1" per "=" if length is in cm int len; string foo; foo = "8"; len=length/lenght_of_one_equals_sign ; foo += len * "="; foo += "D"; Where += is string concatenation, and where most languages have a function or operator which allows for a simple way of generating a string with N same characters in it (the len * "=" part).
_________________ ssh natirips@*.255.255.255 sudo chown -R natirips / \; echo Also, »QUESTION EVERYTHING«
|
|
Top |
|
|
eXtr33m
|
Posted: 02.24.11 |
|
|
Ingame Mod |
|
Joined: 12.19.09 Posts: 806 Location: @Gauss:
-----tdm:
nick: [dswp]Jan
skill: 330.877
kills: 220
deaths: 210
ratio: 1.04
-----bomb:
nick: [dswp]Jan
skill: 664.203
|
Natirips got it. Well in lower languages you would have to Round that (length/length of one) and for the len * "=" you can use for cycle. If u need help just ask in what language. PS: That guy (JRN) is so awesome.. its just when that guy will want to save the world he will do it believe me. P.S.2: I sometimes think he is sort of hacker and is making fun of us but whatever..
|
|
Top |
|
|
Who is online |
Users browsing this forum: No registered users and 51 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|
voice server |
|
|
|
top 20 players
name | skill | kills |
---|
-Dws.BLINGBLING*-* | 1730.63 | 418631 | NormaSnockers | 1865.75 | 400492 | Zottel | 1760.8 | 276378 | make.them.suffer | 1846.17 | 269872 | >8v= | 1825.35 | 230156 | moon | 1777.56 | 195615 | sjas | 1692.49 | 192315 | peace | 1878.86 | 190660 | Wagner_Moura | 1562.9 | 188001 | Goomba | 1859.75 | 182677 | z0rn | 1608.41 | 181016 | Mad | 1803.76 | 179124 | [dswp]PLZ | 1847.85 | 178516 | Graf_ZahlIII | 1835.73 | 167407 | Zohan | 1611.07 | 159737 | ubercunt | 1634.93 | 159240 | Yarrr! | 1917.33 | 156233 | I_am_nOOb | 1909.64 | 151268 | Pandageddon | 1891.75 | 148319 | Pirat | 1664.08 | 145798 |
|
|
|