Readit News logoReadit News
user070223 commented on Solving Fizz Buzz with Cosines   susam.net/fizz-buzz-with-... · Posted by u/hprotagonist
user070223 · a month ago
Inspired by this post & TF comment I tried symbollic regression [0] Basically it uses genetic algorithm to find a formula that matches known input and output vectors with minimal loss I tried to force it to use pi constant but was unable I don't have much expreience with this library but I'm sure with more tweaks you'll get the right result

  from pysr import PySRRegressor

  def f(n):
      if n % 15 == 0:
          return 3
      elif n%5 == 0:
          return 2
      elif n%3 == 0:
          return 1
      return 0

  n = 500
  X = np.array(range(1,n)).reshape(-1,1)
  Y = np.array([f(n) for n in range(1,n)]).reshape(-1,1)
  model = PySRRegressor(
          maxsize=25,
          niterations=200,  # < Increase me for better results
          binary_operators=["+", "*"],
          unary_operators=["cos", "sin", "exp"],
          elementwise_loss="loss(prediction, target) = (prediction - target)^2",
)

  model.fit(X,Y)
Result I got is this:

((cos((x0 + x0) * 1.0471969) * 0.66784626) + ((cos(sin(x0 * 0.628323) * -4.0887628) + 0.06374673) * 1.1508249)) + 1.1086457

with compleixty 22 loss: 0.000015800686 The first term is close to 2/3 * cos(2pi*n/3) which is featured in the actual formula in the article. the constant doesn't compare to 11/15 though

[0] https://github.com/MilesCranmer/PySR

user070223 commented on OpenWrt: A Linux OS targeting embedded devices   openwrt.org/... · Posted by u/pykello
realz · 3 months ago
What’s new with OpenWrt?
user070223 · 3 months ago
New Package Manager(apk) WIP

OpenWrt Upgrade Tool. retaining all of your currently installed packages and configuration

They are updating kernels on yearly basis. 6.12 WIP

web interface for mobile. I think there is an unoffical luci package and a native mobile app.

Notification system. WIP

See also https://forum.openwrt.org/t/community-question-what-do-you-w...

user070223 commented on Ask HN: Why does the US Visa application website do a port-scan of my network?    · Posted by u/mbix77
M95D · 4 months ago
I'm using uMatrix and it blocks by default all connections outside the requested site and parent domains. For example, if I request https://mail.yahoo.com, connections to yimg.com are blocked. I need to manually allow each CDN for each website, so this attack/profiling won't work.

Using uMatrix was very annoying at first, most websites are broken without their CDNs, but after a few months or so, the whitelist grew and it contains 90% of websites I visit.

On my system https://ceac.state.gov/genniv/ tries to connect to captcha.com, google-analytics, googletagmanager, 127.0.0.1 and "burp" (a local hostname that doesn't exist in my network). Interestigly, the browser console doesn't list connection attempts to localhost or burp. If I allow 127.0.0.1 and "tcpdump -i lo", I see connections to port 8888, which isn't open.

user070223 · 4 months ago
uMatrix is archived and I think uBlockOrigin is now advised to use(which incorporate uMatrix by enabling advanced settings)

For those who want to try blocking more stuff you can enable hard mode and bind relax blocking mode keyboard shortcut

I'd recommend also enabling filter lists(I advice yokoffing/filterlists and your region/language)

https://github.com/gorhill/uBlock/wiki/Blocking-mode:-hard-m...

user070223 commented on F-Droid build servers can't build modern Android apps due to outdated CPUs    · Posted by u/nativeforks
oguz-ismail · 4 months ago
How is this not another middleman (with a political banner in its README no less)?
user070223 · 4 months ago
I think it acts more as an rss feed reader rather than building and hosting apps on it's own.
user070223 commented on F-Droid build servers can't build modern Android apps due to outdated CPUs    · Posted by u/nativeforks
qart · 4 months ago
I have it installed. But the only thing I get updates for is Obtainium itself. There's no catalogue of apps, so I haven't installed anything via Obtainium.
user070223 · 4 months ago
Try Discoverium
user070223 commented on Graphene OS: a security-enhanced Android build   lwn.net/SubscriberLink/10... · Posted by u/madars
user070223 · 5 months ago
A question for strcat / other Graphene developers:

Can you clarify what can one expect from legacy extended support. Will old devices get any more updates? how long, how often, is it just security patches etc..

Thanks for you hard work!

user070223 commented on How to Firefox   kau.sh/blog/how-to-firefo... · Posted by u/Vinnl
ReadCarlBarks · 5 months ago
These so-called "hardening scripts" cause a lot of issues and volunteers have to waste their time helping clueless users who copied them without understanding what they do.
user070223 · 5 months ago
I see you're quite active regarding FF. Nevertheless I'm not sure what you're talking about. I've installed Betterfox ESR on Windows, Linux and Android with no apparent issues.

u/user070223

KarmaCake day359February 7, 2023View Original