News for hackers. Stuff that matters.

jotaass

Re:Spot the bug in this Python code (2023) on Thursday January 11, 2024 @07:48PM (#38961951)
I don't think it's clever, it's quite unintuitive and ugly. To me anyway. If the author really wanted to cram everything into a list comprehension, the logical way to think about it is:

    (
        (int(tsc, 16), int(pc, 16))
        for tsc, _, pc, *_ in (line.strip().split(",") for line in fp)
    ),
Which is, of course, almost as ugly. Just use a for loop and yield
Re:Tell HN: You are not alone this Christmas on Saturday December 25, 2021 @08:02AM (#29682963)
Yeah, that's true, that day will come. Just like there will come a day you will go outside for the last time, have your favorite meal a last time, listen to a song for the last time or breathe for the last time. It's a sobering thought. But until that day you have plenty of opportunities to do all those things, and that includes loving new people!
Re:Firefox 95 Released on Tuesday December 07, 2021 @06:40PM (#29479601)
I never used this feature personally. Do you think it’s better than a separate profile which you can launch with -p flag or a profile switcher extension?
Re:Ask HN: Who wants to be hired? (September 2021) on Wednesday September 01, 2021 @01:37PM (#28383056)
Location: Portugal

Remote: Yes

Willing to relocate: No

Technologies: Python (inc. common Data & ML tools), Node, SQL, Spark, Docker, Linux, ElasticSearch, MongoDB, Kafka, Cassandra

Résumé/CV: https://www.jgsousa.com/files/cv.pdf

Email: [email protected]

Hi, I'm a Data Scientist with experience building and maintaining all kinds of Data and AI products for e-commerce (recommender systems, search, ranking, computer vision). I consider myself a generalist, so I'm interested and have experience in multiple different aspects of a modern AI/ML solution, including data gathering and analysis, data pipelining, large scale processing, model building and tuning, model serving, distributed systems, etc. In summary, I love building software for AI/ML :)

Re:Show HN: ParseHub – Extract data from dynamic websites on Tuesday September 23, 2014 @06:04PM (#8358627)
Yeah, I'm having the same problem. It might be related to the fact that Ctrl + ] is also the keyboard shortcut to nagivate back in firefox [1], so when I try it I end up going back to the previous page. Ctrl + [ does nothing.

Or it might be that in my keyboard layout, [ and ] requires pressing RIGHT ALT + 8 and RIGHT ALT + 9, respectively.

[1] https://support.mozilla.org/en-US/kb/keyboard-shortcuts-perf...

PS: Indeed changing the layout to en-US fixes the problem, but that not a real solution.

Re:Popcorn Time Is So Good at Movie Piracy, It’s Scary on Tuesday March 11, 2014 @04:20AM (#7378009)
This reminds me of the excellent tv.js. The same, but running in your browser (plus node.js)

https://github.com/SamyPesse/tv.js

Re:A Christmas Message From Edward Snowden [video] on Wednesday December 25, 2013 @11:28AM (#6963291)
There's a torrent of the video available here

http://pirateproxy.net/torrent/9395395/Channel_4_Alternative...

Re:Target stores hit by data breach affecting 40 million cards on Thursday December 19, 2013 @10:54AM (#6935347)
This reminds of a story that ran in the news last year.

http://www.forbes.com/sites/kashmirhill/2012/02/16/how-targe...

It is not ok for a retail company to profile your underage daughter, find out that she is probably pregnant (before you do!) and then do targeted advertisement. That is wrong and more than a little creepy.

I think the point is that those jihadists in Yemen are the direct result of this sort of thing happening in their home towns. It's very easy to recruit someone when they just saw a whole bus of their friends and family being blown off by reasons they can't understand, from a robot in the sky, being controlled by someone miles away.

It's a whole chicken and the egg thing.

Re:Portugal's prescribed open standards - full list on Thursday December 05, 2013 @12:01PM (#6855458)
Thanks for the clarification. Glad to see it's not so bad afterall.
Re:Portugal's prescribed open standards - full list on Thursday December 05, 2013 @10:15AM (#6854750)
This is interesting. It has been almost a year since the deadline for the implementation. I have no indication that anything changed at all. Take the following google search experiment

  site:gov.pt filetype:doc (90k results)
  site:gov.pt filetype:docx (451 results)
  site:gov.pt filetype:odf (0 results)
Maybe that's not fair, as the final deadline is actually in July of next year. I guess, as a portuguese, I should know better than to expect things to get done before the very last moment.

Edit: formatting

Re:It's practically impossible for regular people to buy Bitcoin on Thursday November 28, 2013 @12:51PM (#6815634)
How about a Bitcoin ATM machine? https://lamassu.is/
Re:How many people are in space right now? on Thursday September 26, 2013 @11:20AM (#6451360)
I think most of us are probably behind several layers of concrete, glass, wood, etc.
Re:Your name is way too long for your ID on Friday September 13, 2013 @09:39AM (#6380339)
It's quite usual to have two family names, one from your mother's side and another from your father's. Usually the father's family name comes last, but it's by no means a rule, more of a social norm (and somewhat fading).

Additionally, it's also perfectly reasonable to have two or more "first names".

The consequence of all of this, and having four names myself, is that I'm always confused what I'm supposed to fill in as my first and last names. I end up using just my very first and very last, but i always feel like I'm being disrespectful towards my mother's family for the omission.

Re:Ads in Gmail displayed as normal emails? on Friday July 19, 2013 @09:40AM (#6070033)
In which case I'm sure Google will provide an unsubscribe option.
Re:Android saves wifi passwords in plaintext to the cloud on Wednesday July 17, 2013 @10:33AM (#6057846)
I too found the replies to be somewhat dismissive. You would think this sort of report would be dealt with much more urgency or, in the very least, some concern.

It's an important problem, and the feeling I get from that thread is that they are more concerned where the bug should be filled. I appreciate organization as much as anyone, but the proper response should be frantic running around and hair pulling.

That's a very insightful post. Thank you.
Re:Bolivia to file UN complaint over airspace blockade on Wednesday July 03, 2013 @06:55AM (#5983650)
As an european this disgusts me to no end. It can really hurt your patriotism and sense of pride in your country when you realize it's not actually a country at all, just a subservient state, willing to do anything to avoid drawing the attention of the big fat bully. In the end we're all afraid to fight for anything when life is too hard already, I guess.
Nevermind the fact that in order to qualify for unemployment benefits you must have worked and contributed in the last few years. As it turns out, most unemployment in Spain, and countries in the same situation, is from fresh out of college students who never had a chance.

Well, you can argue that there is always a choice. And most of them take it, by leaving everything behind and moving to Germany or other central european country. Until they don't want them there anymore.

Re:This Really is Big Brother: The Leak Nobody's Noticed on Sunday June 23, 2013 @12:51PM (#5928233)
That's exactly the environment in my country in the 40's to mid 70's. You were obliged to inform the state of suspicious activities of your fellow citizens (things like reading the wrong sort of books or indulging in private gatherings) and were promptly compensated when you did so, whether you were being truthful or just really didn't like your neighbor. The infamous PIDE (secret police) is considered one of the most effective police forces in history, partially because of these sorts of tactics and how they managed to creep their way into every aspect of society. This is not something I'm proud to be associated with our history.

Of course that was dictatorship era Portugal. More than 40 years ago. I wasn't even born. But things have a way to come around again, one way or another, when we let ourselves get too comfortable and forget history or just trust too much on the competence of others.

Yes, but now is on the front page of Hacker News. They may just have ruined this guy's life, even if they didn't mean it. And based on what? The pictures prove nothing. In fact, they're not even suspicious! "Backpack seems to be missing"? The picture only shows his head!

This is bad, and very wrong.

Re:How I got robbed of 34 btc on Mt.Gox today on Thursday April 11, 2013 @08:31AM (#5531465)
Well, he did put a space there. I'd give him a pass.
Re:My divorce from Google - One year later on Tuesday April 02, 2013 @09:16AM (#5479059)
Submitter here. I did search for it first, but I clearly did a poor job. Apologies for that.
Re:Watsi (YC W13) and the Future of Patronage on Tuesday March 26, 2013 @03:28PM (#5445518)
I wish all the best to the team at Watsi. They have an amazing concept. It's captivating how straightforward it really is. They offer the possibility for anyone to make a difference to the lives of real people, and watch that happen, in almost real time.

I don't know what these kinds of projects will do to the "future of patronage" but it gets people aware of the problems, gets them involved and brings in real results, with little effort. That can't be a bad thing.

Re:Python data tools just keep getting better on Monday March 25, 2013 @10:02AM (#5436988)
f2py is a remarkable tool. And it's much easier than the documentation would lead you to believe. It's literally as simple as doing

f2py foo.f -c -m foo

Which creates a foo python module with easy access to whatever functions you put in foo.f, with proper type checking and conversion from python objects to fortran arrays. It is also clever enough to remove some unecessary inputs which are common in old fortran. For example, in fortran you usually define an extra input argument to be the length of an input array. f2py determines that this variable is uncessary as it can be determined from the length of the python object and makes it optional.

If you write fortran90-95 it's even better, as you can mark a variable as output and f2py puts it on the left side automatically.

I wish they would update it to support pointers and custom types, though. That's about the only thing it lacks right now.

It's the best and quickest way I know of linking python and native code. Scipy's weave is also nice.

Older »