Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
chutwig
May 28, 2001

BURLAP SATCHEL OF CRACKERJACKS

Methanar posted:

I'm not actually working with strings. It's a list.

If you have a long list of strings, like
code:
["blah.example.com", "blorp.example.com", "burp.example.com"]
...then I'd probably just do
code:
[x.replace('example.com', 'sub.example.com') for x in your_list_of_strings]
...assuming you're not worried about where "example.com" appears and whether there might be multiple instances of it (i.e., you don't need to anchor to the right).

Adbot
ADBOT LOVES YOU

chutwig
May 28, 2001

BURLAP SATCHEL OF CRACKERJACKS

Eela6 posted:

I've now been working strictly in golang for about three months.

QuarkJets posted:

The Coding Horrors thread killed any mild interest I had in golang


I'm in a similar boat to Eela6. Most of my career has been Python stuff but the past few months has been very Go-dominated, because I've been working on various things related to Kubernetes. I dislike Go less now than when I started, but there's nothing specific to Go that I wish I could take back to Python. The best feature of Go isn't a feature of the language, it's that your program compiles to a static binary. If Python had enforcement on type hints and a static binary generator that wrapped up cx_freeze/py2exe/py2app into pythonc, would Go have ever left the launchpad?

chutwig
May 28, 2001

BURLAP SATCHEL OF CRACKERJACKS

Does anyone have a pointer to some reasonably thorough benchmarks for evaluating performance when running typical data science/ML tasks? I'm currently looking at https://github.com/numpy/numpy/tree/master/benchmarks, but maybe one of you ML expert types has something even better.

The source of the request is that I'm working on some functional tests for our ML people so that we can establish a known baseline for the performance of their Jupyter notebooks, then start switching things out and quantifying the performance difference (OpenBLAS vs MKL, that sort of stuff). Turns out none of them have an existing set of comprehensive benchmarks for this purpose, and I'm doing a little research/questioning before we start writing our own or packaging up those Numpy benchmarks for our testing.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply