• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 05:31
CEST 11:31
KST 18:31
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
ByuL, and the Limitations of Standard Play1Team Liquid Map Contest #22: Results and Winners7Code S Season 2 (2026): RO4 and Finals Preview12TL.net Map Contest #22 - Voting & Ladder Map Selection7Code S Season 2 (2026) - RO8 Preview8
Community News
[TLMC] Summer 2026 Ladder Map Rotation05.0.16 patch for SC2 goes live (8 worker start)65ZeroSpace at Steam NextFest - Last free demo31Weekly Cups (June 8-14): Clem and Solar double, PTR tested0RSL: S6 Finals played at BlizzCon 202611
StarCraft 2
General
Mizenhauer's Douyu Cup Preview Is the larve respawn broken? 5.0.16 patch for SC2 goes live (8 worker start) ByuL, and the Limitations of Standard Play Possible bug in the new patch?
Tourneys
RSL Revival: Season 6 - Qualifiers and Main Event Douyu Cup 2026: $20,000 Legends Event (June 26-28) INu's Battles#17 <BO.9> Sparkling Tuna Cup - Weekly Open Tournament GSL CK #4 20-21th June
Strategy
[G] Having the right mentality to improve
Custom Maps
New Map Maker - Looking for Advice - Love or Hate Work In Progress Melee Maps [D]RTS in all its shapes and glory <3
External Content
The PondCast: SC2 News & Results Mutation # 531 Experimental Artillery Mutation # 530 One For All Mutation # 529 Opportunities Unleashed
Brood War
General
vespene.gg — BW replays in browser Quality of life changes in BW that you will like ? ASL 22 Proposed Map Pool BW General Discussion [BSL22] Non-Korean Championship from 13 to 28 June
Tourneys
[ASL21] Grand Finals [Megathread] Daily Proleagues The Casual Games of the Week Thread [BSL22] GosuLeague Casts - Tue & Thu 22:00 CEST
Strategy
Creating a full chart of Zerg builds Relatively freeroll strategies Why doesn't anyone use restoration? Simple Questions, Simple Answers
Other Games
General Games
Stormgate/Frost Giant Megathread Path of Exile Beyond All Reason Nintendo Switch Thread ZeroSpace at Steam NextFest - Last free demo
Dota 2
Looking for a Dota Mentor Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug
TL Mafia
TL Mafia Community Thread Vanilla Mini Mafia
Community
General
US Politics Mega-thread Canadian Politics Mega-thread Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread [H]Internet/Gaming Cafe Tips and Tricks
Fan Clubs
The HerO Fan Club! The herO Fan Club!
Media & Entertainment
Movie Discussion! Series you have seen recently... [Req][Books] Good Fantasy/SciFi books [TV/BOOK] *SPOILERS* Game of Thrones Discussion
Sports
2024 - 2026 Football Thread TeamLiquid Health and Fitness Initiative For 2023 McBoner: A hockey love story Formula 1 Discussion Cricket [SPORT]
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread Facing Challenges in Mobile App Development
TL Community
The Automated Ban List
Blogs
Listen To The Coaches!
TrAiDoS
An Exploration of th…
waywardstrategy
I'm an arrogant trash talke…
FlaShFTW
Gauntlet SC2: A Retrospectiv…
Ctone23
Customize Sidebar...

Website Feedback

Closed Threads



Active: 6962 users

The Big Programming Thread - Page 985

Forum Index > General Forum
Post a Reply
Prev 1 983 984 985 986 987 1032 Next
Thread Rules
1. This is not a "do my homework for me" thread. If you have specific questions, ask, but don't post an assignment or homework problem and expect an exact solution.
2. No recruiting for your cockamamie projects (you won't replace facebook with 3 dudes you found on the internet and $20)
3. If you can't articulate why a language is bad, don't start slinging shit about it. Just remember that nothing is worse than making CSS IE6 compatible.
4. Use [code] tags to format code blocks.
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
December 27 2018 14:38 GMT
#19681
for those working in ML, here's a question out of personal interest:

For larger employers, is gathering/cleaning/organizing data to be used for ML generally done by a different person than whoever creates the ML models themselves? Is there a typical sort of organization in regards to who does what?
Excludos
Profile Blog Joined April 2010
Norway8263 Posts
December 27 2018 16:20 GMT
#19682
On December 27 2018 23:38 travis wrote:
for those working in ML, here's a question out of personal interest:

For larger employers, is gathering/cleaning/organizing data to be used for ML generally done by a different person than whoever creates the ML models themselves? Is there a typical sort of organization in regards to who does what?


From my experience, cleaning data to be used for ML is often a full time job for a team of people, who have little to no knowledge about what people who are working with the ML does. But this is anecdotal and could vary from company to company I guess. But generally I would assume for ML to be useful you need such vast amount of data that it's a full time job to take care of it.
mantequilla
Profile Blog Joined June 2012
Turkey781 Posts
December 27 2018 17:47 GMT
#19683
On December 27 2018 18:34 Manit0u wrote:
Show nested quote +
On December 27 2018 04:40 mantequilla wrote:
Those spring config xml things are completely unnecessary, only thing that's required and xml is maven pom file, which is, in my opinion has strengths over other dependency management systems, like gradle or js dependency systems (hell).

Spring config via annotations is so clear, annotations themselves act like a documentation and I can quickly understand how a class is going to function in runtime. Its almost elegant

For example, in a python project I worked on a little bit, there were bunch of json fields, there's no information on which fields are required or optional, what's their format etc. There's no other way than reading the whole code to understand that. Look at a java class with annotations and everything is clear in 10 seconds.

I don't know if its personal bias because I used java much more than other languages, but I can understand how things work in minutes when looking at someone else's code in java. In python or js, its just magic, I don't understand what's going on without debugging everything line by line and reading the whole code.


I guess I need to refresh my knowledge of Java world Got a small project for my friend which could be a good way to get back in touch with Spring. Is Hibernate still a thing?



Yes hibernate is still around, with jpa annotations on entities instead of hibernate ones. You can also use mongodb and annotate entities with spring data annotations instead.

Check out spring boot (hassle free spring) and liquibase (db migrations).

Also look at jhipster, I like that project, they are always on bleeding edge
Age of Mythology forever!
Manit0u
Profile Blog Joined August 2004
Poland17774 Posts
December 27 2018 20:48 GMT
#19684
On December 28 2018 02:47 mantequilla wrote:
Show nested quote +
On December 27 2018 18:34 Manit0u wrote:
On December 27 2018 04:40 mantequilla wrote:
Those spring config xml things are completely unnecessary, only thing that's required and xml is maven pom file, which is, in my opinion has strengths over other dependency management systems, like gradle or js dependency systems (hell).

Spring config via annotations is so clear, annotations themselves act like a documentation and I can quickly understand how a class is going to function in runtime. Its almost elegant

For example, in a python project I worked on a little bit, there were bunch of json fields, there's no information on which fields are required or optional, what's their format etc. There's no other way than reading the whole code to understand that. Look at a java class with annotations and everything is clear in 10 seconds.

I don't know if its personal bias because I used java much more than other languages, but I can understand how things work in minutes when looking at someone else's code in java. In python or js, its just magic, I don't understand what's going on without debugging everything line by line and reading the whole code.


I guess I need to refresh my knowledge of Java world Got a small project for my friend which could be a good way to get back in touch with Spring. Is Hibernate still a thing?



Yes hibernate is still around, with jpa annotations on entities instead of hibernate ones. You can also use mongodb and annotate entities with spring data annotations instead.

Check out spring boot (hassle free spring) and liquibase (db migrations).

Also look at jhipster, I like that project, they are always on bleeding edge


I created a project with spring boot, hibernate, postgresql (will need a relational db for this) and flyway for migrations. Will see how it goes. Thankfully I've got a senior Java dev next to me at the office who's worked for big companies like 2 Sigma so I should get it to work
Time is precious. Waste it wisely.
mantequilla
Profile Blog Joined June 2012
Turkey781 Posts
Last Edited: 2018-12-31 18:58:51
December 31 2018 18:57 GMT
#19685
For a course project I'm designing a reliable multicast algorithm. Problem is my brain isn't working. So this would be a long and stupid question:

There are N peers, p1, p2...pn. One peer wants to send a message to all other peers. If every peer receives the message, everyone accepts the message. If someone can't get the message, no one accepts it. I don't care about being optimal or fast etc. just delivering the message to everyone is fine.

For the simplicity, let's assume there are only two peers. And we are delivering only a single packet, so there's no packet ordering etc. problem.

There are two peers, p1 and p2. p1 wants to send a message to everyone (well, just p2 in this example). I build a dictionary called "global state". It includes everyone's point of view of of who received the message:


At the very start it's like this, no one heard the message:


global_state = {
p1: {
p1: False,
p2: False
},
p2: {
p1: False,
p2: False
}
}


p1 wants to send a message, since p1 is the initiator, it knows that it heard the message (duh). So it marks this knowledge on global state object:


global_state_of_p1{
p1: {
p1: True,
p2: False
},
p2: {
p1: False,
p2: False
}
}


p1 then sends the above state info to p2. It just continually tries to send in a while loop, since it runs on UDP (course requirement). When p2 finally receives the message:
- p2 knows that p1 heard the message since it's the sender.
- p2 has also heard the message now
So p2's global state info becomes like this:


global_state_of_p2{
p1: {
p1: True,
p2: False
},
p2: {
p1: True, //p2 knows that p1 heard the message since it's the sender.
p2: True //p2 has also heard the message now
}
}


Then asks this question: who doesn't know that I heard the message? Obviously the answer is only p1. If there were more than 2 peers, there would be more peers who didn't know that p2 has heard the message. So p2 sends above global state info to these peers, in this case p1. There is a loop that continnually sends message to everyone who didn't hear (*)

p1 receives the above message. It's coming from p2 so it means p2 has heard the message. p1 marks its state info with this (it just OR's its internal state with incoming message)


global_state_of_p2{
p1: {
p1: True,
p2: True
},
p2: {
p1: True,
p2: True
}
}


now p1 knows that everyone has heard the message. But p2 doesn't still know that p1 knows this. So p1 should somehow say to p2 "yes I know that everyone heard the message, stop bugging me!"

My algorithm fails here. I just can't terminate it because p2 can't be sure p1 got the message. If p1 sends an ack that says "I know everyone has heard the message", it can't be sure p2 has heard the ack... It goes on and on without terminating...

Age of Mythology forever!
WarSame
Profile Blog Joined February 2010
Canada1950 Posts
Last Edited: 2018-12-31 20:58:16
December 31 2018 20:57 GMT
#19686
You would only need to go 1 layer deep of acks, right?

If p1 sends to p2, p2 acks to p1(so p1 knows p2 received it, but p2 doesn't know that p1 knows), p1 acks the ack to p2(p2 knows that p1 knows) then you're good. You only need to receive the ack back for this to know that they both know p2 received the message.

In regular networking the header will send the number of frames to the receiver and then number those frames as they're sent so that they can be acked seperately. If any are missed they are resent. If any are not acked then they are resent. If every frame is acked then the message has been passed.

Similarly, you could make a message that has an ID and then send updates containing that ID and who has acked the message every time p1 receives an ack. When all receivers have acked you can add p1 to the ackers to signify that all acks have been received.

This does seem inefficient, but maybe that's the price we pay for reliability.
Can it be I stayed away too long? Did you miss these rhymes while I was gone?
mantequilla
Profile Blog Joined June 2012
Turkey781 Posts
Last Edited: 2018-12-31 21:18:35
December 31 2018 21:07 GMT
#19687
On January 01 2019 05:57 WarSame wrote:
You would only need to go 1 layer deep of acks, right?

If p1 sends to p2, p2 acks to p1(so p1 knows p2 received it, but p2 doesn't know that p1 knows), p1 acks the ack to p2(p2 knows that p1 knows) then you're good. You only need to receive the ack back for this to know that they both know p2 received the message.

In regular networking the header will send the number of frames to the receiver and then number those frames as they're sent so that they can be acked seperately. If any are missed they are resent. If any are not acked then they are resent. If every frame is acked then the message has been passed.

Similarly, you could make a message that has an ID and then send updates containing that ID and who has acked the message every time p1 receives an ack. When all receivers have acked you can add p1 to the ackers to signify that all acks have been received.

This does seem inefficient, but maybe that's the price we pay for reliability.


How can p1 be sure p2 got the ack to its ack? My brain doesn't seem to get this kind of stuff, sorry.

in a tcp like scenario: A sends a message to B and A wants to be sure B got the message

my scenario is like: above + B also wants to be sure that A knows that B got the message
Age of Mythology forever!
WolfintheSheep
Profile Joined June 2011
Canada14127 Posts
December 31 2018 21:31 GMT
#19688
On January 01 2019 06:07 mantequilla wrote:
Show nested quote +
On January 01 2019 05:57 WarSame wrote:
You would only need to go 1 layer deep of acks, right?

If p1 sends to p2, p2 acks to p1(so p1 knows p2 received it, but p2 doesn't know that p1 knows), p1 acks the ack to p2(p2 knows that p1 knows) then you're good. You only need to receive the ack back for this to know that they both know p2 received the message.

In regular networking the header will send the number of frames to the receiver and then number those frames as they're sent so that they can be acked seperately. If any are missed they are resent. If any are not acked then they are resent. If every frame is acked then the message has been passed.

Similarly, you could make a message that has an ID and then send updates containing that ID and who has acked the message every time p1 receives an ack. When all receivers have acked you can add p1 to the ackers to signify that all acks have been received.

This does seem inefficient, but maybe that's the price we pay for reliability.


How can p1 be sure p2 got the ack to its ack? My brain doesn't seem to get this kind of stuff, sorry.

in a tcp like scenario: A sends a message to B and A wants to be sure B got the message

my scenario is like: above + B also wants to be sure that A knows that B got the message

When P2 sends the ACK to P1, it will expect a response (ACK for the ACK). If it doesn't receive it, it will resend it's original ACK.

If P1 only receives 1 ACK, then it can assume both it's Message and ACK were received.

You could run into scenarios where P2 is actually completely shut down and thus won't resend any messages, but then you should also be tracking which peers are actually still alive.
Average means I'm better than half of you.
Manit0u
Profile Blog Joined August 2004
Poland17774 Posts
Last Edited: 2018-12-31 22:44:18
December 31 2018 22:42 GMT
#19689
Why making it overly complex? What you need is a control object and all the peers should communicate through it. This way you only have one place in your system where you have to track the information and you don't have to share state between peers (they don't have to know about other peers, how many there are etc.).

Let's assume you have n peers p and one control service c.

p1 sends message to c, c broadcasts it to all the other peers. Each peer that got the message acknowledges it to c. This makes c the single place where you can check the state of each peer for each message. It can retry etc.

If your peers need to know if everyone received their message they can simply ask c about it. Best way to introduce it would be something like this:

p1 sends to c with a set timeout. c rebroadcasts to other peers and waits for their acks. When all peers send their acks to c it sends an ack to p1. If everything was within the timeout limit it is a success, if not you mark it as failure.

This also gives you more flexibility since you can put retry logic etc. either in c or in each peer (you can even put it everywhere and you use c by default if p doesn't provide it, if it does it overrides c). You can also introduce different logic - if you don't want it to be timeout based you can make peers periodically ask c if their message was delivered to everyone.

This way you avoid this circle of hell where all the peers know about each other and have to constantly check each other (this gets really inefficient and stupid when you get to higher numbers of peers, also whenever you introduce a new peer you'd need to update them all with this information).
Time is precious. Waste it wisely.
WolfintheSheep
Profile Joined June 2011
Canada14127 Posts
December 31 2018 22:45 GMT
#19690
I'm kind of guessing by the use of the word "peer" that the intent is a decentralized system.

But if not, then w/e.
Average means I'm better than half of you.
Manit0u
Profile Blog Joined August 2004
Poland17774 Posts
December 31 2018 23:25 GMT
#19691
On January 01 2019 07:45 WolfintheSheep wrote:
I'm kind of guessing by the use of the word "peer" that the intent is a decentralized system.

But if not, then w/e.


Well, even in the p2p world you still have trackers and what not

The problem at hand was multicast so I assumed it should work more like messaging queues with fan-out approach.
Time is precious. Waste it wisely.
mantequilla
Profile Blog Joined June 2012
Turkey781 Posts
Last Edited: 2019-01-01 00:16:47
January 01 2019 00:15 GMT
#19692
On January 01 2019 07:42 Manit0u wrote:
Why making it overly complex? What you need is a control object and all the peers should communicate through it. This way you only have one place in your system where you have to track the information and you don't have to share state between peers (they don't have to know about other peers, how many there are etc.).

Let's assume you have n peers p and one control service c.

p1 sends message to c, c broadcasts it to all the other peers. Each peer that got the message acknowledges it to c. This makes c the single place where you can check the state of each peer for each message. It can retry etc.

If your peers need to know if everyone received their message they can simply ask c about it. Best way to introduce it would be something like this:

p1 sends to c with a set timeout. c rebroadcasts to other peers and waits for their acks. When all peers send their acks to c it sends an ack to p1. If everything was within the timeout limit it is a success, if not you mark it as failure.

This also gives you more flexibility since you can put retry logic etc. either in c or in each peer (you can even put it everywhere and you use c by default if p doesn't provide it, if it does it overrides c). You can also introduce different logic - if you don't want it to be timeout based you can make peers periodically ask c if their message was delivered to everyone.

This way you avoid this circle of hell where all the peers know about each other and have to constantly check each other (this gets really inefficient and stupid when you get to higher numbers of peers, also whenever you introduce a new peer you'd need to update them all with this information).


it's distributed systems course's project, must be p2p architecture where all peers being equal and not a centralized server :/ Don't know if I can fit this into project description though, maybe there's a hole in definition that would allow a centralized server
Age of Mythology forever!
Lmui
Profile Joined November 2010
Canada6223 Posts
Last Edited: 2019-01-01 00:52:29
January 01 2019 00:50 GMT
#19693
I'm thinking about this and have a question.

Why do you need to know the state from every other peer's point of view before accepting the message?
You should just need to know that all peers have read your message from each individual's point of view before the message can be accepted, which reduces your global state to just N entries from N^2 on each peer.
I'm assuming messages are sent to a random unmessaged peer with every S seconds (Where S is a random number 1<S<10 ) since performance doesn't seem to be a requirement


The initial states if you have 3 peers, with peer 1 receiving the initial message:

global_state_p1 = {
p1: true,
p2: False,
p3: False
}

global_state_p2 = {
p1: False,
p2: False,
p3: False
}

global_state_p3 = {
p1: False,
p2: False,
p3: False
}


It first sends a message to P2 (how you do reliability is up to you) with the message, and global_state_p1

global_state_p1 = {
p1: true,
p2: true,
p3: False
}

global_state_p2 = {
p1: true,
p2: true,
p3: False
}

global_state_p3 = {
p1: False,
p2: False,
p3: False
}

P1 (or P2) messages P3 after knowing that P2 got the message and the states are now:

global_state_p1 = {
p1: true,
p2: true,
p3: true
}

global_state_p2 = {
p1: true,
p2: true,
p3: False
}

global_state_p3 = {
p1: true,
p2: true,
p3: true
}

And P1/P3 accept the message because they know all recipients have received all messages.
At some point, P2 will reach out to P3 since P3 has not yet received the message from its standpoint. P3 will return its global state back to P2, at which point the message will be accepted by P2.

There's one primary limitation to this but I'll leave it as an exercise for the reader
Manit0u
Profile Blog Joined August 2004
Poland17774 Posts
Last Edited: 2019-01-01 04:03:40
January 01 2019 04:02 GMT
#19694
Well, if performance is not an issue and all you really care about is that the message is delivered to all peers then the simplest way to do it would be what @Lmui described above. I'd only add one other thing there: the origin...


payload = {
msg: 'our message',
origin: 1,
state: [false, true, false, false]
}


This way you pass the message "around the table" and you know where it came from so you can later send it back to the originator as a final ack that everyone got it.

It still feels really not very efficient. Personally I'd send the message from the originator to all peers at the same time, waiting for an ack. If only the originator needs to know it's been delivered to everyone then that's it (peers do not broadcast if they're not the originator). If all peers need to know about the status (if all the others also got it) then there's the next step involved which is sending final ack to all peers by the originator once it got all acks it needed.

You're sending more messages (because of back-and-forth communication) but overall it is way more efficient since it happens all at once in parallel (which is what you really want from a distributed system).
Time is precious. Waste it wisely.
mantequilla
Profile Blog Joined June 2012
Turkey781 Posts
January 01 2019 16:40 GMT
#19695
Thanks very much for the answers guys, let me thing about them for a while

Luckily project deadline is extended for a few days. If I can work out a working algorithm then I will need to plot some graphs write some reports about it etc..
Age of Mythology forever!
Manit0u
Profile Blog Joined August 2004
Poland17774 Posts
Last Edited: 2019-01-01 19:30:25
January 01 2019 19:26 GMT
#19696
Simple example


module DistributedSystem
Payload = Struct.new(:message, :origin)

class Peer
attr_reader :id, :payload, :others
attr_accessor :broken

def initialize(id, broken = false)
@id = id
@broken = broken
end

def process(payload)
puts "Peer ##{id} processing payload from ##{payload.origin || 'external'}..."

if payload_external?(payload)
puts 'Rebroadcasting to other peers'

payload.origin = id

rebroadcast(payload).merge({ id => true }).sort.to_h
else
puts "Peer ##{id}#{broken ? ' not' : ''} acknowledging receival from ##{payload.origin}"

acknowledge(payload)
end
end

def others=(peers)
@others = peers.select { |p| p.id != id }
end

private

def payload_external?(payload)
payload.origin.nil?
end

def rebroadcast(payload)
others.each_with_object({}) do |peer, results|
results[peer.id] = peer.process(payload)
end
end

def acknowledge(payload)
!broken
end
end
end

payload = DistributedSystem::Payload.new('Hello')
peers = (1..5).to_a.map { |id| DistributedSystem::Peer.new(id) }
peers.each { |peer| peer.others = peers }

random_peer = peers.sample

puts random_peer.process(payload)

puts '*' * 50

some_broken_peers = peers.map do |peer|
peer.broken = true if peer.id.even?
peer
end

payload = DistributedSystem::Payload.new('Hello')

random_working_peer = peers.select { |peer| peer.broken == false }.sample
puts random_working_peer.process(payload)



Peer #2 processing payload from #external...
Rebroadcasting to other peers
Peer #1 processing payload from #2...
Peer #1 acknowledging receival from #2
Peer #3 processing payload from #2...
Peer #3 acknowledging receival from #2
Peer #4 processing payload from #2...
Peer #4 acknowledging receival from #2
Peer #5 processing payload from #2...
Peer #5 acknowledging receival from #2
{1=>true, 2=>true, 3=>true, 4=>true, 5=>true}
**************************************************
Peer #5 processing payload from #external...
Rebroadcasting to other peers
Peer #1 processing payload from #5...
Peer #1 acknowledging receival from #5
Peer #2 processing payload from #5...
Peer #2 not acknowledging receival from #5
Peer #3 processing payload from #5...
Peer #3 acknowledging receival from #5
Peer #4 processing payload from #5...
Peer #4 not acknowledging receival from #5
{1=>true, 2=>false, 3=>true, 4=>false, 5=>true}


Is this anything like what you are after?
Time is precious. Waste it wisely.
Manit0u
Profile Blog Joined August 2004
Poland17774 Posts
Last Edited: 2019-01-04 15:12:31
January 04 2019 14:36 GMT
#19697
Some nice reads on the multicast subject (and messaging in distributed systems in general):
http://250bpm.com/blog:17
http://250bpm.com/blog:5
http://250bpm.com/blog:20


And an interesting note on (supposed) superiority of C vs C++ from a perspective of maintaining software for 5 years:
http://250bpm.com/blog:4
http://250bpm.com/blog:8
Time is precious. Waste it wisely.
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
January 09 2019 01:20 GMT
#19698
alright, how hard is the following to do? (in python)
My HTTP knowledge is pretty low... and my knowledge of security/authentication is even lower.

I have a ML model to predict outcomes of events (betting online).
I want to automate it.

I use a betting website, that is fairly complicated GUI wise. I know when bets come up, though. I know what fields in my browser, I imagine I can examine the http in chrome or something?

So, at specific times, I want to run my model, see the results, and if I like the results I want to place the bet automatically with a python script, rather than having to manually do it in my browser. How hard is this? Can I learn how to do this and get it done in 1 day? (tomorrow). keep in mind that it's with real money so I also need to learn whatever is required to open a secure session with authentication and whatever.
Acrofales
Profile Joined August 2010
Spain18330 Posts
January 09 2019 07:49 GMT
#19699
On January 09 2019 10:20 travis wrote:
alright, how hard is the following to do? (in python)
My HTTP knowledge is pretty low... and my knowledge of security/authentication is even lower.

I have a ML model to predict outcomes of events (betting online).
I want to automate it.

I use a betting website, that is fairly complicated GUI wise. I know when bets come up, though. I know what fields in my browser, I imagine I can examine the http in chrome or something?

So, at specific times, I want to run my model, see the results, and if I like the results I want to place the bet automatically with a python script, rather than having to manually do it in my browser. How hard is this? Can I learn how to do this and get it done in 1 day? (tomorrow). keep in mind that it's with real money so I also need to learn whatever is required to open a secure session with authentication and whatever.

Use selenium and it should be fairly easy (maybe a bit more than a day if you're completely clueless about HTML and JS, but not very long). You can also look if the web you're interested in has a REST API, in which case you can use that, and just skip the whole GUI part. As for ssl, Python makes that extremely simple. With selenium, the browser will take care of it. If connecting directly to an API, just use an httpsconnection instead of http.
Silvanel
Profile Blog Joined March 2003
Poland4767 Posts
January 09 2019 10:14 GMT
#19700
Its fairly simple, You should be able to do it in one day provided the webpage is well documented. If the elements on page do not have disctinctive names/descriptions and are loaded in random order than it becomes quite complicated but in most cases it is super straightfroward.
Pathetic Greta hater.
Prev 1 983 984 985 986 987 1032 Next
Please log in or register to reply.
Live Events Refresh
Douyu Cup 2020
05:00
2026 - Day 2
Neeb vs Impact
MacSed vs Cyan
Scarlett vs Kelazhur
INnoVation vs Dear
WardiTV776
CranKy Ducklings140
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Ryung 733
StateSC2 85
StarCraft: Brood War
Sharp 155
Soma 150
PianO 128
Hyuk 97
Dewaltoss 84
Killer 78
ggaemo 78
ToSsGirL 62
Mind 43
ZergMaN 37
[ Show more ]
hero 36
Aegong 34
Rush 27
Hm[arnc] 21
NotJumperer 18
yabsab 14
zelot 9
Liquid`Ret 7
Dota 2
BananaSlamJamma321
League of Legends
JimRising 501
Other Games
ceh9579
Mew2King112
Organizations
Dota 2
PGL Dota 2 - Main Stream5592
Other Games
gamesdonequick765
StarCraft: Brood War
UltimateBattle 57
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
[ Show 15 non-featured ]
StarCraft 2
• 3DClanTV 108
• CranKy Ducklings SOOP22
• LUISG 10
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• iopq 3
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Rush1225
Upcoming Events
Big Brain Bouts
6h 29m
Jumy vs eGGz
Harstem vs sebesdes
TriGGeR vs HeRoMaRinE
Douyu Cup 2020
19h 29m
Maestros of the Game
1d 2h
herO vs Classic
Maru vs Serral
BSL22 NKC (BSL vs China)
1d 4h
Douyu Cup 2020
1d 19h
BSL22 NKC (BSL vs China)
2 days
Online Event
2 days
RSL Revival
2 days
WardiTV Weekly
3 days
RSL Revival
4 days
[ Show More ]
RSL Revival
4 days
Bombastic Starleague
4 days
Kung Fu Cup
5 days
OSC
5 days
CrankTV Team League
6 days
Bombastic Starleague
6 days
Replay Cast
6 days
Liquipedia Results

Completed

CSCL: Masked Kings S4
WardiTV Spring 2026
Heroes Pulsing #2

Ongoing

IPSL Spring 2026
Acropolis #4
YSL S3
BSL 22 Non-Korean Championship
CSL Season 21: Qualifier 1
CSL Season 21: Qualifier 2
SCTL 2026 Spring
Douyu Cup 2026
Maestros of the Game 2
Murky Cup 2026
IEM Cologne Major 2026
Stake Ranked Episode 2
CS Asia Championships 2026
Asian Champions League 2026
IEM Atlanta 2026
PGL Astana 2026
BLAST Rivals Spring 2026
IEM Rio 2026

Upcoming

CSL 2026 Summer (S21)
CSLAN 4
Blizzard Classic Cup 2026
Kung Fu Cup 2026 Grand Finals
RSL Revival: Season 6
CranK Gathers Season 4: BW vs SC2 Team League
HSC XXIX
BCC 2026
Light Tournament 2026
Eternal Conflict S2 Finale
Eternal Conflict S2 E1
Heroes Pulsing #3
FISSURE Playground #5
BLAST Open Fall 2026
Esports World Cup 2026
BLAST Bounty Summer 2026
BLAST Bounty Summer Qual
Stake Ranked Episode 3
XSE Pro League 2026
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2026 TLnet. All Rights Reserved.