1,976 karma · joined March 14, 2012
blog: saeranv.github.io
work: github.com/saeranv/
contact: saeranv [at] gmail.com
``` centers = get_centers(polgons) # M x 3 array close_idx = np.where( np.linalg.norm(centers - point, axis=1) < max_dist)[0] close_polygons = polygons[close_idx,:] ```
That's one reason I prefer for to use arrays for polygons, rather then abstract it into a Python object. Fundamentally geometries are sequences of points, and with some zero-padding to account for irregular point counts, you can still keep them in a nice, efficient array representation.
[1] Why can't we just delete the extra file after we recovered the .swp!
Why is this useful? I basically treat my nvim buffers like windows. What am I missing?
To answer the question of whether it's conscious or not, I would think of it in terms of John Rawl's veil of ignorance[1]: you can set any test, or heuristic that you want to determine consciousness, with the only condition being that you will also be subjected to the same tests, and suffer the same consequences.
So I'm okay with setting the bar for consciousness really, really low.
Also, Corbusier's Unite d'Habitation doesn't belong in the article's list of "ugly, distressing" buildings. Corb's built work was actually built explictly and thoughtfully around human proportions. I've walked around (and in) it, and it doesn't feel monolithic, and oppressive at all. Cutting a section across it reveals it's real cleverness - the apartment units are linked in such a way that each unit can have 2 floors, so you get a diversity of environments typical apartment units don't provide.
Question: Does the postfix notation allow you to chain commands together that in bash would have to be nested in brackets, like actual postfix math?
So for example, rather than the infix need of brackets to resolve ambiguity in this expression ((1 + 2) * 3) = 9, postfix just writes it like this: 1 2 + 3 * = 9.
For example, from the link, here's how Polars and Pandas handles manipulating data in a subset of a dataframe:
f = pl.DataFrame({'a': [1,2,3,4,5], 'b':[10,20,30,40,50]})
# Polars
f.with_column(
pl.when(pl.col("a") <= 3)
.then(pl.col("b") // 10)
.otherwise(pl.col("b"))
)
# Pandas
f.loc[f['a'] <= 3, "b"] = f['b'] // 10
Its not clear in the Polars approach that the column "b" is being modified. An additional minor nitpick here is the use of when/then/otherwise for their conditional logic. Aren't these just if/else-if/else conditions? It's seems more in line with mathematical/python convention to use if/else... am I missing something?The Pandas equivalent, on the other hand, is much more concise, and more explicit. It also seems more mathematical to me. Polars mutates the dataframe, whereas in Pandas a function is applied to a dataframe indexed like a matrix. Pandas also benefits from it's reliance on symbolic notation, it makes everything visually clearer, whereas in Polars, the use of pl.col("b") and other similar methods contribute to multiple nested brackets and redundant naming calls contributing to less interpretability.
I know there's a lot of thought thats been put into Polars, so I assume I'm missing some of the advantages of the Polars approach, and would appreciate anyone who can shed some light on it.
I do understand, and partially agree, with the idea that indexing in Pandas leads to a lot of bugs. But in the example above, Pandas isn't really using indexing, it's using a boolean map to "index" the values from the same dataframe, so should be fairly robust. Is there a reason why Polars is trying to avoid this kind of filtering in the row/column indices?
Better than the Windows Terminal for WSL. You can work in tmux without getting strange visual artifacts, and allows you to view sixel graphics in console! Fair warning though, I only installed it about two weeks ago, so I can't claim I've battle-tested it though.
ETA: The one thing it doesn't allow me to do is change font programmatically, which would allow me to switch fonts to render non-english characters. I'm very much a beginner in terminals, so if anyone has a solution to this, I would love to hear it.
Maybe not what you're looking for, but if you're just looking for a 1F degree lag in temperature change, you can also try just increasing the heat stored in your house's thermal mass. For example you could add something with high thermal mass (i.e. concrete) to the place you want higher thermal lag, and position it so it soaks up a lot of solar radiation. That'll buffer out your temperatures.
This kind of in-group, out-group dynamic seems like a default for humanity. It's pretty easy to lapse into xenophobia - since that's our default. Trying to widen the circle of the "in-group" status is hard, and goes against our instincts.
* ETA: Thinking back on this period, I recall our teacher trying her best to combat the bullying of one girl in particular. She would do things like sit us down as a class and explain to us why it was cruel, with the girl in her lap, and reading stories to us about bullying. None of it worked, I literally remember sitting there, nodding along, and being frankly too dumb to connect this back to my own bullying. In hindsight, the one thing that I think would have worked is if she had publically reprimanded us everytime she had caught us in the act. I think that kind of repeated, instant feedback would finally gotten through to us.
So, I recognize fold, from the above operations ('reduce' in python), what makes it a "functional transformation"?
I'm googling function/functional transformations, and the results refer to translating, flipping or scaling a function, like transforming f(x) to f(x + 2) or f(x) + 2. It doesn't seem like it has anything to do with what you guys are referring to, but correct me if I'm wrong.
You should carefully reread your own post, its actually all opinion being confused for facts! It's very striking, since the original article not only supports its claims with data and cited sources, but specifically refutes the points your making. Did you just read the title and decide to refute it?
> But string theory is difficult to understand—it lives in mathematical territory that has taken physicists and mathematicians decades to explore. Much of the theory’s structure is still uncharted, expeditions still planned and maps left to be made. Within this new realm, the main technique for navigation is through mathematical dualities—correspondences between one kind of system and another.
I would translate மத்தளம்பாறை as MaththalampaaRai, rather than Mathalamparai. The a's have different lengths, so single a's are short (as in "ma"), and double a's are long. Double consonants like "த்த" are pronounced separately, so "Matha-" should be "Maththa". And finally, the "R" at the end is a rolling r, distinguished from the regular r "ர" - a good example of a Tamil letter with no equivalent letter in English!
And, I know this is unrelated, but in terms of syntax, I find Tamil to English translation really suffers from the way Tamil reverse subject object verb order (Tamil is to Reverse Polish Notation (RPA) as English is to regular, clunky, bracket notation), and the option multiple words into a single verb with recursively adding suffixes. Tamil basically offers a lot more degrees of freedom then English, which makes it far more expressive, but also adds a lot of cost to mastering correct grammar. The majority of 1st generation Tamils can only speak a simpler subset of the language. Personally, I find Tamil tends to be less clunky, and have quicker, more pleasing rhythm, then any English equivalent.
I have no shooting experience, but the arc they have to put into the shot to travel 4.4 miles (~7 km), seems so counter-intuitive to what I associate with shooting. Really impressive work by this team, to have all this calculated out so that they can hit it within 69 shots.
I'm really curious what the success rate of their shot is. From the video, it sounds like the unsuccessful shots were still relatively close by, enough that they seemed confident in being able to still guide it in, so around 1/100 sounds about right, as a crude prior estimate.
(a) It's legitimately hard to retroactively densify suburban areas, especially the newer suburbs like Markham, where the inefficient use of space combines with the restricted mixed-use zoning, would make re-densified residential areas difficult to support with the sparse commercial/public/transportation resources. I think it's possible, but requires some aggressive changes.
(b) Politicians don't want to risk angering the elderly, NIMBY, home-owning middle-class that compose the voting base.
I think it can be done, but the political incentives are not appealing. Still, we are seeing some hopeful signs from increasingly radicalized youth, cut off from the housing market, being converted into potential political capital by the NDP.
> ... and the floor treatment rejects both vapor and spills.
That's a good point I didn't consider. Drying out the inner surface works well for interior vapour that gets into the enclosure, but won't handle spills, or standing water well.
Doesn't this risk any water that does end up getting in, to accumulate and cause more damage over time since there's no route for it to dry out?
I was always taught in my building science courses to put the water/air/vapour control layer inside the wall, before the insulation, so vapour can dry out from both sides.