Better HN
topnewbestaskshowjobs
Log inSign up

chriswitts

36 karma · joined Nov 2, 2011 (15y ago) · 29 submissions

[ my public key: https://keybase.io/christianwitts; my proof: https://keybase.io/christianwitts/sigs/IPrtqfZaMKB0oQhj5rX0GDLl7PwOpTlvpHpuAIuE-Gc ]
Submissions

comment 3y ago · link · parent

PyGithub has existed for ages, even if it is not official. GitHub only maintains octokit for JS, Ruby, .NET, and Terraform.

comment 4y ago · link · parent

From the article

  “Most of the time in a wedding gallery of 1,000 photos there are only 1 to 3 images that are blurred,” explains Haanstad. “Also, anytime I do a blurry photo I have the couple do the same thing but in focus so the couple has both images and is not missing out on a moment from their wedding day.”

comment 4y ago · link · parent

They are. It is stated in the subheading, as well as the article.

comment 4y ago · link · parent

Absolutely yes. I would be pretty happy to work 20 hours a week to essentially be a consultant and advisor to a team.

comment 4y ago · link · parent

The software was not named in the article, as it has yet to be patched.

  Colombo provided screenshots and other documents detailing his findings and
  identifying the maker of the affected third-party software, but he asked 
  that Bloomberg not publish specifics because the flaws hadn’t yet been fixed.

comment 4y ago · link · parent

What the tweet and graph misses is the fact that the NICD systems have a delay in reporting due to some recent IT changes for data security. https://twitter.com/nicd_sa/status/1469405508679483395

comment 4y ago · link · parent

I hope they correct the Steam regional pricing for Forspoken... $70 is ZAR1,118.53 (R15.98:$1) yet the Steam SA pricing is R1,429 (±R20:$1, or effectively a $90 game). Definitely not going to buy something so ludicrously priced.

comment 5y ago · link · parent

I'm in South Africa, paying ±$73/month for 100Mbps synchronous uncapped (but with a FUP [Fair Usage Policy]). I would love to double my speed and third my costs :(

comment 6y ago · link · parent

As a native English speaker I can attest that we sure as shit don't pronounce it "Rapey".

comment 6y ago · link · parent

AMD calls it SMT (Simultaneous MultiThreading).

comment 6y ago · link · parent

You can arbitrarily amend the date in git

  git commit --amend --date="Thu Jan 1 08:00 1970 +0000"

comment 6y ago · link · parent

I like this, it suits my needs.

I noticed that VOO (Vanguard S&P 500 ETF) has a -10.56% dividend percentage listed (although it is the YTD performance) which causes the expected annual dividend to go negative. The yield is currently listed at 1.98% on Yahoo Finance.

comment 6y ago · link · parent

Yes, the betas get updated along the way, and you'll end up with the final print version when it's done.

comment 6y ago · link · parent

You shouldn't be using `#!/bin/bash` but rather `#!/usr/bin/env bash` instead.

comment 7y ago · link · parent

Empirically speaking 4/4/9 calories per gram of carb/protein/fat. So generally speaking no, 1lb != 3,000 calories.

comment 7y ago · link · parent

You can use Hyperfine [1] instead of time for a nicer CLI benchmark.

I'd also be curious to know is pillow-simd [2] gets the Python performance closer to Go/Rust, and if using Rayon [3] and changing your .iter()'s in your Rust code to .par_iter()'s will yield an improvement there.

[1] https://github.com/sharkdp/hyperfine

[2] https://github.com/uploadcare/pillow-simd

[3] https://github.com/rayon-rs/rayon

comment 7y ago · link · parent

You could check out Nanolog [1] for inspiration.

[1] https://github.com/PlatformLab/NanoLog

comment 8y ago · link · parent

I have a little function for generating some random characters

    ######################################
    # Generate a random password from /dev/urandom
    # pw [length [num_passwords [characters]]
    # Arguments:
    #   $1 => The length of password
    #   $2 => The number of passwords to generate
    #   $3 => The acceptable character set, PCRE regex
    ######################################
    function pw {
        if [[ "x$1" == "x-h" ]]; then
            echo "Usage: pw [length:20 [num_passwords:1 [character_set:a-zA-Z0-9._!@#$%^&*()]]]"
        else
            LC_CTYPE=C \
                tr -dc "${3:-'a-zA-Z0-9._!@#$%^&*()'}" < /dev/urandom \
                | fold -w "${1:-20}" \
                | head -n "${2:-1}"
        fi
        # There's always `openssl rand -base64 12` for simplicity
    }

comment 8y ago · link · parent

As someone who helped organise last years PyConZA, and has been watching this years conference develop, I am super excited to see that we've finally managed to have an entire dedicated week for a variety of OSS technology.

The amount of effort the organising committees have put in so far has been stellar, and it's going to be a great year.

Also expanding the PyCon tracks to include a dedicated PyData track is fantastic.

comment 8y ago · link · parent

Thanks for that, it's also blocked in South Africa, which is pretty damn far from Europe. I suspect they just block anything non-NA.

comment 8y ago · link · parent

We have a shop called Nude Foods [1] in Cape Town that is setup like that. They unfortunately don't do meat, but most everything else is covered.

[1] http://nudefoods.co.za/

comment 8y ago · link · parent

Just finished in the last week:

- What a wonderful world by Marcus Chown

- 47 Ronin by Joan D. Vinge

- Practical Monitoring by Mike Julian

Currently reading:

- The Four by Scott Galloway

- The Art of Capacity Planning 2nd Edition by Arun Kejariwal, John Allspaw

comment 8y ago · link · parent

First off, I'm surprised that the taps don't just go dry after 87 liters; perhaps the tech isn't there.

Census data is inaccurate, and you have no concrete figures on the number of people per residence. Even if we had the tech (the new water meters we have are a step in the right direction, except when they break which is often and also maintained by quite a number of different contractors) you'd be hamstrung needing to ascertain correct figures per location. And then throw in all the apartment blocks in Cape Town, which all have a singular water main and meter, it becomes even harder (because do you punish all people in the block because one person is having a bath three times a day).

I hope you find a way to manage (rain, desalination, hopefully something comes online soon)

The local government has sadly mismanaged the situation terribly, for more than a decade. We're not going through a drought, we're experiencing a water shortage. The total population for the City of Cape Town (more than just Cape Town itself, it includes the surrounding areas) has been rapidly expanding over the last 15 years (more so in the last 5) due to semigration (people moving from other provinces, mainly Gauteng, due to the better quality of life in the Cape), and the underlying infrastructure has not been upgraded in step with the population growth. We have had warning since as early as 2007 (from official reports I'm aware of) that we needed to move forward with new water programs including desalination plants in order to accommodate for the growth.

We have a desalination company, GrahamTek [1], which had put forward tenders which could have brought in 450ML water a day within 18 months, but were largely ignored by the powers that be.

[1] https://www.iol.co.za/weekend-argus/news/city-of-cape-towns-...

comment 10y ago · link · parent

DigitalOcean does as a droplet. Linode does offer it as well, but currently afaik it's not fully supported so their automated backups don't work, which can be solved with zfs snapshots and sending them to your own backup instance.

comment 10y ago · link · parent

`Package: nginx (1.6.2-5)` is there just fine for me in Jessie and `1.9.6-2` in Sid.

comment 11y ago · link · parent

8 'pages', and a waste of time. Good thing I paid $0.00 for it to check out.

comment 11y ago · link · parent

Surprised you didn't have `sum(map(int, number_string))` in there.

  In [5]: def f(x):
     ...:     x = str(x)
     ...:     return sum(map(int, x))

  In [6]: %timeit second_way_optimized(x)
  1000 loops, best of 3: 200 µs per loop

  In [7]: %timeit f(x)
  1000 loops, best of 3: 223 µs per loop
Marginally slower, a hell of a lot easier to read what's going on.

comment 11y ago · link · parent

It's also broken in Chrome v40

comment 13y ago · link · parent

If I'm smoking, 7 hours. If I'm not smoking, 5 hours. If I'm not smoking and exercising, 6 hours. If I'm not smoking and exercising strenuously, 7 hours.