106 karma · joined Dec 29, 2018 (7y ago) · 52 submissions
comment 6y ago · link · parent
Thanks for your input!
2.
Ask HN: How to connect with experts outside of the tech domain?
6 points · by rovyko · 6y ago · 3 comments
comment 6y ago · link · parent
With TemplateQuery, instead of wrapping arguments with psycopg2.sql classes (e.g. Literal, Identifier) the expected class can be written inside the query:
>>> TemplateQuery('SELECT * FROM {table@Q} WHERE {@I} {@S} {value@L}').format(
... 'column_name', '>=', table='public.my_table', value=100
... ).as_string(conn)
'SELECT * FROM "public"."my_table" WHERE "column_name" >= 100'
The character after the at sign @ in the placeholder key is the transformation that is applied to the argument before inserting it into the placeholder (S for raw SQL, I for Identifiers and L for literals, among others).I wrote this small library while working on my master's thesis to help run similar analysis queries on different tables and schema configurations, without the mental overhead of wrapping arguments in the proper classes. I'm not sure if it will be useful to anyone, but I thought it was worth releasing. Would appreciate any feedback at all!
4.
Show HN: Easy placeholders for SQL queries when using psycopg2 in Python(github.com ↗)
1 points · by rovyko · 6y ago · 1 comment
comment 7y ago · link · parent
What I really wanted was one of these tiny apartments [0]. Build a whole apartment of these near campus, students only sleep at home anyway, and sometimes not even that. My univeristy is building a new residence and it has the same 3-5 bedrooms to a giant apartment with a living room.
I wonder what's the main barrier to building a lot of tiny single student apartments. Is it the municipal regulations, are they not economical or did research show that students actually want living rooms?
EDIT: Just look at the size of these living rooms. I've been in so many of these apartments and they're almost always full of boxes and trash.
- http://www.rez-one.ca/wp-content/uploads/2016/11/MG_6020.jpg
- http://www.rez-one.ca/wp-content/uploads/2016/11/MG_5991.jpg
- https://uwaterloo.ca/housing/sites/ca.housing/files/uploads/...
- https://uwaterloo.ca/housing/sites/ca.housing/files/styles/i...
- https://uwaterloo.ca/housing/sites/ca.housing/files/styles/i...
- https://static.wixstatic.com/media/29eef9_c0378e178fda4f0b84...
comment 7y ago · link · parent
And now rents in the small town are growing. Subdivided houses are torn down for luxury apartments, and with recent cuts to government loans, it might not be affordable for some low-income students.
comment 7y ago · link · parent
This seems naive but I think it's a misdirection. Of course the model will have malicious users. Propaganda teams started testing its integration as soon as it was released. It's likely that OpenAI is counting on this for insights into HOW the model can be used maliciously. It's also possible that the model results have inherent trackable markers and OpenAI can later say that X% of social media posts were made using this model.
So what are the positive applications, aside from prettifying data like sports and weather reports?
Even with Skyrim's 800+ books, you frequently ran into the same book. Imagine libraries filled with plausible text that hides nuggets of lore seeded by developers. Along with more realistic text-to-speech this can allow games to support a large diversity of NPCs that have true radiant dialogue and sound more realistic than "I saw a mudcrab the other day".
With some modifications, I think models like this can outweigh even their nefarious applications:
Defense against text decomposition analysis. The model can be used to obfuscate writing patterns that can reveal a person's identity, either by randomizing form or standardizing it. Take your post and run it through the formatter to get the same idea and intent, but in a style that can't be traced to your other writing. Or you reform it into style of Ernest Hemmingway, like thousands of others.
Realtime plausible deniability encryption. Messages in a monitored chat can look like mundane conversation but contain encrypted messages. This would require the model accept seeds and work partially in reverse to diff two sets of text to reveal the hidden message.
In it's current form it doesn't look like it can do any of those things, but there's the potential.
comment 7y ago · link · parent
I made a stylesheet to fix a few of the glaring UI problems, as well as a sheet for dark mode: https://github.com/rovyko/hoxly-gui-patch-stylesheets
* Horizontally align news item titles
* New Items take up full margined-page width
* Search input at the top of the page
* All facts button has a pointer cursor
* Increase button text size15.
Show HN: Codepen-Tabs - a userscript for code editor tabs in Codepen.io pens(github.com ↗)
1 points · by rovyko · 7y ago · discuss
comment 7y ago · link · parent
Did a few tests, and sure enough, if the room temperature is below 22C and the screen has been on for about 10 minutes, then it starts to shut off frequently. My guess is the ambient temperature is causing some metal component to contract and break a connection.
comment 7y ago · link · parent
EDIT: Just want to say that these are better than I expected. As good or better than about half the ambient music recommendations I get on Spotify.