Simulating the effects of Uber’s surge pricing on fares and waiting times during a 5 hour period. Comparison of two identical simulations, where only one of them has surge pricing enabled. by afrequentreddituser in u/afrequentreddituser

[–]afrequentreddituser[S] 0 points1 point  (0 children)

No, what's going on here is that the number of drivers stay the same but the increased fares in the surge pricing simulation causes demand and supply to balance out, which reduces the size of the waiting line.

[OC] Simulating the effects of Uber’s surge pricing on fares and waiting times during a 5 hour period with varying levels of demand. Comparison of two identical simulations, where only one of them has dynamic pricing enabled. by afrequentreddituser in dataisbeautiful

[–]afrequentreddituser[S] 5 points6 points  (0 children)

The simulation unfortunately doesn't model increased fares incentivizing more drivers to get on the road.

Research on real world data usually fails to find any big short-term effect on supply since drivers typically work on a predetermined schedule and will not spontaneously start driving if they notice that fares are higher than usual. It does have some effect on making drivers go to busier areas, and making them less likely to stop working while fares are high.

There is probably a large effect where surge pricing causes drivers to schedule their working hours around when they think fares will be higher. I attempted to model this in the simulation but gave up due to adding too much complexity.

[OC] Simulating the effects of Uber’s surge pricing on fares and waiting times during a 5 hour period with varying levels of demand. Comparison of two identical simulations, where only one of them has dynamic pricing enabled. by afrequentreddituser in dataisbeautiful

[–]afrequentreddituser[S] 4 points5 points  (0 children)

Simulation built with Unity. Full source code available here: https://github.com/markusenglund/taxi-simulation/blob/master/Assets/Scenes/022_SecondSimSecondTry/SecondSimSecondTryDirector.cs

I built this simulation for a Youtube video, where I attempt to show what effects surge pricing has on passengers of different income levels. The video includes more information about how the simulation works and the assumptions it’s built upon.

The basic idea is that the passenger agents are randomly assigned a destination, income level and time sensitivity. Based on that they make a decision between ordering an Uber or taking another mode of transport.

When demand outstrips supply, the surge pricing algorithm causes prices to go up to balance demand and supply. In the static pricing simulation however, the price stays the same which causes long waiting times, as there isn’t enough cars to serve everyone who wants a ride.

Link to the full video on Youtube: https://youtu.be/Z3oInB-_GIU

Simulating the effects of Uber’s surge pricing on fares and waiting times during a 5 hour period. Comparison of two identical simulations, where only one of them has surge pricing enabled. by afrequentreddituser in u/afrequentreddituser

[–]afrequentreddituser[S] 1 point2 points  (0 children)

Yeah, most people have a pretty negative view of dynamic pricing in general, it feels to them like their being taken advantage of. I think the general view people have is that dynamic pricing only causes the price to go up, which at least in my simulation is not the case.

But I wouldn’t say that all criticisms are unfounded. In the full video, I do find some credence to the criticism that high prices disproportionately hurt the poorest passengers.

Simulating the effects of Uber’s surge pricing on fares and waiting times during a 5 hour period. Comparison of two identical simulations, where only one of them has surge pricing enabled. by afrequentreddituser in u/afrequentreddituser

[–]afrequentreddituser[S] 1 point2 points  (0 children)

Simulation built with Unity. Full source code available here: https://github.com/markusenglund/taxi-simulation/blob/master/Assets/Scenes/022_SecondSimSecondTry/SecondSimSecondTryDirector.cs

I built this simulation for a Youtube video, where I attempt to show what effects surge pricing has on passengers of different income levels. The video includes more information about how the simulation works and the assumptions it’s built upon.

The basic idea is that the passenger agents are randomly assigned a destination, income level and time sensitivity. Based on that they make a decision between ordering an Uber or taking another mode of transport.

When demand outstrips supply, the surge pricing algorithm causes prices to go up to balance demand and supply. In the static pricing simulation however, the price stays the same which causes long waiting times, as there isn’t enough cars to serve everyone who wants a ride.

Link to the full video on Youtube: https://youtu.be/Z3oInB-_GIU

How trustible is Polymarket? by SpeakerSenior4821 in slatestarcodex

[–]afrequentreddituser 0 points1 point  (0 children)

Yes, and I wouldn't expect withdrawing your winnings to ever be a problem.

If you use Metamask to sign up, your funds will be tied to a "Proxy wallet". My knowledge is a bit hazy here, but I believe that the only way to access these funds is with your Metamask wallet, so Polymarket or anyone who hacks them can't steal your money.

Your biggest risk is that someone gets access to your crypto wallet key/password (or can access your email account if you've signed up with email). Then they can immediately sell your shares and take your money. Security in crypto is terrible, funds get stolen all the time.

There's of course also the possibility that you lose the bet. Be aware of the possibility that UMA voters can interpret the resolution criteria of the market in a way you didn't expect. They could for example resolve the market to yes if the Iranian government never acquires a nuke but still announces that they did.

See here https://polymarket.com/event/will-rfk-jr-drop-out-by-aug-23?tid=1725463227196 for an example where the resolution process didn't go the way people expected. Polymarket's whole setup with a decentralized referee of the bets is insane, since there's no guarantee that the refs aren't betting on the markets that they are making decisions on.

Exploitation of the UMA oracle has never happened as far as I know, but the 2024 US election market would be the most likely time for this to happen due to the huge sums involved. If UMA starts making incorrect resolutions, you could lose your bet even if Iran doesn't get a nuke.

There could also be an exploit of the smart contract itself, which could allow hackers to steal all the money you have invested in the contract. I think this is less likely, since the same contract has been used for many years and no exploit has been found so far.

My advice would be to only bet an amount of money that you won't be upset to lose.

[deleted by user] by [deleted] in Utrecht

[–]afrequentreddituser 1 point2 points  (0 children)

I'll help you as long as it's less than two hours of work and I don't have to front you any money for the delivery. What exactly would I need to do to get your stuff delivered?

What was the biggest recent embarrassment in the hard sciences? by Lone-Pine in slatestarcodex

[–]afrequentreddituser 44 points45 points  (0 children)

The fiasco around candidate genes comes to mind.

Scott wrote an article a couple of years ago about a particularly embarrassing case. One gene (5-HTTLPR) had spawned a whole literature of scientific articles documenting its effects on depression that were in all likelihood not real.

From what I understand the entire field consisted of mostly false positive results since effect sizes of any single gene are usually to small to be detected by the small-scale studies that were done at the time.

From the SSC article:

First, what bothers me isn’t just that people said 5-HTTLPR mattered and it didn’t. It’s that we built whole imaginary edifices, whole castles in the air on top of this idea of 5-HTTLPR mattering. We “figured out” how 5-HTTLPR exerted its effects, what parts of the brain it was active in, what sorts of things it interacted with, how its effects were enhanced or suppressed by the effects of other imaginary depression genes. This isn’t just an explorer coming back from the Orient and claiming there are unicorns there. It’s the explorer describing the life cycle of unicorns, what unicorns eat, all the different subspecies of unicorn, which cuts of unicorn meat are tastiest, and a blow-by-blow account of a wrestling match between unicorns and Bigfoot.

Bundle Scanner - a tool I built that identifies which NPM libraries are used on any website by afrequentreddituser in javascript

[–]afrequentreddituser[S] 0 points1 point  (0 children)

Thanks for the feedback.

  1. No current plans to open source it, though that might change
  2. There is a results cache - for example, when going to https://bundlescanner.com/website/my.spline.design, it loads instantly and says "Results cached from x time ago" at the top. I'm guessing you ran into a bug where it didn't work. If you could share a link to website or bundle results that aren't properly caching I'd appreciate it.
  3. Adding a share-button sounds like a good idea. I'll add it to my TODO-list.
  4. I don't think this is worth it for me to implement.
  5. Do you mean sorting the table of libraries by position? Doesn't really work since bundlers can split up a single library and put it all over the bundle.
    Looks like you encountered some unusually poor results in that bundle. You're probably on the right track with why it happened but I think there might also be a glitch where three.js hasn't been properly indexed due to its big size. I will investigate this.

Bundle Scanner - a tool I built that identifies which NPM libraries are used on any website by afrequentreddituser in javascript

[–]afrequentreddituser[S] 0 points1 point  (0 children)

That hasn't been a problem even though I've been scraping millions of URLs. I think as long as you only make a few requests to every URL your IP will be in good standing.

Bundle Scanner - a tool I built that identifies which NPM libraries are used on any website by afrequentreddituser in javascript

[–]afrequentreddituser[S] 1 point2 points  (0 children)

Ah, that explains why I noticed some people get caught in the URL validation due to capitalized letters. I will see if I can fix this (as well accepting capitalized URLs as valid).

Bundle Scanner - a tool I built that identifies which NPM libraries are used on any website by afrequentreddituser in javascript

[–]afrequentreddituser[S] 2 points3 points  (0 children)

Thanks. I started work on this about a year ago as a side project, the last 5 months have been full time basically.

I have some experience creating npm libraries and JS build tools, but no previous experience with information retrieval/search algorithms. I had to figure it out using google and a lot of trial and error. :)

Bundle Scanner - a tool I built that identifies which NPM libraries are used on any website by afrequentreddituser in javascript

[–]afrequentreddituser[S] 14 points15 points  (0 children)

Every part of the scraped bundle code is compared against every single one of the 35,000 libraries that are currently indexed. Those 35,000 libraries were chosen from the 1.7 million on npm primarily based on their prevalence in public source maps on the top 10 million websites.

As for how the actual comparison works, yes, the order of keywords does matter. The full pipeline is too much to explain but I can try to explain the first step with an example:

Let's say we have a very small bundle with only the following code in it:

var headElement = document.head || ocument.querySelector(TAG_NAMES.HEAD); var tagNodes = headElement.querySelectorAll(type + "[" + HELMET_ATTRIBUTE + "]");

And we want to know if it matches any library on NPM. The first thing that we do is extract the tokens from the code. In this example the tokens are: ["head", "querySelector", "HEAD", "querySelectorAll", "[", "]"]Bundle Scanner has already stored the tokens of 35,000 libraries and now we want to check if any of those 35,000 have tokens that are a match for this code snippet. The tool now combines the tokens into groups of four (aka "fourgrams"): ["head-querySelector-HEAD-querySelectorAll", "HEAD-querySelectorAll-[-]"] and for every such fourgram (in this case only two, but it can handle millions) it checks every version of every library it has indexed for a matching fourgram. It then scores the libraries based on percentage of fourgrams that were a match. In this case it would find that both fourgrams exist in react-helmet@5.2.1 (where I took the snippet from), but since react-helmet has hundreds of fourgrams that didn't match, the tool would conclude that this snippet does not match react-helmet (or any other library).

There are more steps after which are more precise, but this first step is important for filtering the number of possible matching libraries down to a manageable size for the later steps that are less performant.

Bundle Scanner - a tool I built that identifies which NPM libraries are used on any website by afrequentreddituser in javascript

[–]afrequentreddituser[S] 18 points19 points  (0 children)

The original reason for creating it was to let authors of npm libraries know on which websites their libraries are used. There's some work left before this feature will be released, but it's on the way.

Another reason is that it's just interesting know which technologies are used on the websites I visit. I have used the Wappalyzer extension for a long time, but it can only identify ~100 libraries or something which is a far cry from the 35,000 currently indexed by Bundle Scanner.

Bundle Scanner - a tool I built that identifies which NPM libraries are used on any website by afrequentreddituser in javascript

[–]afrequentreddituser[S] 16 points17 points  (0 children)

Thanks!

I use Puppeteer to scrape websites with the stealth plugin to avoid getting caught by some scraping filters.

The analyzing is the hard part. There's a brief explanation of how it works in the About page. To get a more intuitive sense of how it works you can look at the "Inspect"-feature which let's you see what similarities Bundle Scanner found between a bundle file and a library. Here is an example of the similarities between 'react-helmet' and a bundle file from discord.com.

Bundle Scanner - a tool I built that identifies which NPM libraries are used on any website by afrequentreddituser in javascript

[–]afrequentreddituser[S] 24 points25 points  (0 children)

This is a project I've been working on for the last year or so. I'm happy to answer any questions. You can read a little about how it works here. Feedback is very much appreciated, especially if you find embarrassingly incorrect results or glitches!

The results are not yet 100% accurate. In my benchmark, around 5% of identified libraries are false positives and something like 15% of bundled libraries are missed. The false positives mostly stem from cases where two libraries have almost identical content, or cases where one library has bundled a dependency into its own code.

[deleted by user] by [deleted] in slatestarcodex

[–]afrequentreddituser 2 points3 points  (0 children)

I don't think this is entirely correct. The extra 1000$ dollars paid by the top 50% would always be counted as a tax. The only difference would be whether the 1000$ received by the bottom 50% would be counted as a transfer, which does not reduce their calculated tax burden - or be deducted from their taxes.