703 karma · joined July 2, 2014
At its inception you could make the same argument for most open-source projects which usually don't start decked out with cash. But most trusted and respected projects of today (especially in comp sec) are open-source as a prerequisite.
I really wish the govt would show more interest in the plight of the 'lower' caste rather than just seeing them as a vote bank.
[1] https://www.theguardian.com/world/2015/feb/24/india-modi-rel...
> But not all of that is attributable to Mr. Modi’s efforts.
I think you give him too much credit in saying that.
I'm an Emacs user for years now and love the editor. But I'm curious about this claim of its poor popularity. The article refers to a piece from http://www.linux-magazine.com/Online/Blogs/Off-the-Beat-Bruc... which bases its arguments on two surveys from 2013 and 2014.
Does anyone know of a credible way to measure the popularity of Emacs and what the usage trends are in 2018 other than SO?
I share your sentiments.. In my mind decent internet access is more of a right than an accessory today. Those without it are disproportionately disadvantaged in numerous ways. I can imagine doing something drastic, in protest, if I'm pushed.
The saddest revelation through all this is that I couldn't find any other provider in my area (DTLA) which can promise me 100Mbps. I'm stuck with them and I'm not a happy customer! I so wish there were other competing ISPs in this area..
Intent: Given a folder with multiple text files of academic papers from PubMed, remove the contents after the '====Refs' header. Then in each file find occurrences of any term in a keywords file and extract it along with 400 chars before and after it. Print this output as a tsv.
input: $1) A text file containing keywords of interest that need to be searched in the files separated by `|`.
$2) File containing paragraphs of lots of text with headers starting with '===='. There isn't a formatting requirement really. Just that, in my case the files happened to be so.
# Note: Awk string commands have indexes that start with 1 (not 0).
# The first Awk command just removes the newlines in file $2 and replaces them
# with space. `pat` contains the contents of the file $1: 'keyword1|kewword2|...'.
# --re-interval allows use of, well, regex intervals.
awk 'BEGIN { ORS=" "} { print $0 }' $2 | awk --re-interval -v pat="$1" '
{
# both variables are initialized with full-content of text file
# with the part after '==== Refs' removed.
cut_content = substr($0, 1, match($0, "==== Refs"))
orig_content = substr($0, 1, match($0, "==== Refs"))
# index (could be better named as offset, but life is too short to refactor).
idx = 0
# match the keywords, even if it appears between non-alphabet chars.
# e.g -keyword1. is a match.
regex = "(^|[^a-zA-Z]{1})" pat "([^a-zA-Z]{1}|$)"
# loop until matches are found.
while (match(cut_content, regex)) {
# RLENGTH is the length of the matched keyword.
if (RLENGTH > 0) {
# set the matched keyword to the variable `prot`.
# RSTART is the character position of the matched keyword in the file.
# This is the first occurrence of it in the file when read from the start.
prot = substr(cut_content, RSTART-1, RLENGTH+1)
# clean-up punctuation and/or space from the beginning and end of `prot`.
gsub(/[:punct: ]$/, "", prot)
gsub(/^[:punct: ]/, "", prot)
# print the `prot` and 400 chars before and after it using idx
# as an offset. Separate the results by tab char.
print prot, "\t", substr(orig_content, idx+RSTART-400, RLENGTH+800)
# update offset to character position right after the current matched keyword
idx += (RSTART + RLENGTH -1)
# cut-out all the text up until the position of the
# last matched keyword (including it) and on the remaining text
# repeat the above steps in the loop. This is so that the search
# continues throughout the file and doesn't keep finding the same
# keyword over and over again. See `while` condition.
cut_content = substr(cut_content, RSTART+RLENGTH)
}
}
}'
Edit: Formatting. HN doesn't wrap text in code-block. awk 'BEGIN { ORS=" "} { print $0 }' $2 | awk --re-interval -v pat="$1" '
{
cut_content = substr($0, 1, match($0, "==== Refs"))
orig_content = substr($0, 1, match($0, "==== Refs"))
idx = 0
regex = "(^|[^a-zA-Z]{1})" pat "([^a-zA-Z]{1}|$)"
while (match(cut_content, regex)) {
if (RLENGTH > 0) {
prot = substr(cut_content, RSTART-1, RLENGTH+1)
gsub(/[:punct: ]$/, "", prot)
gsub(/^[:punct: ]/, "", prot)
print prot, "\t", substr(orig_content, idx+RSTART-400, RLENGTH+800)
idx += (RSTART + RLENGTH -1)
cut_content = substr(cut_content, RSTART+RLENGTH)
}
}
}'I think this a sign I move to a dumb phone.
The exploding population of India has put a huge pressure on the public infrastructure. Any credible university/college (because of numerous swindling orgs) which usually means govt. run has a flood of candidates, the IITs being the archetypal example. Add this to the social pressure put by the definition of success according to the culture and you've got yourself in an Indian pressure cooker[1] which shapes you to perfectly fit the mold of the educational system- effectively quenching creativity.
I wouldn't generalize though. The smart still are able to wiggle through and come out the other end without selling their soul. But the opportunity cost for the others who would have excelled given better instruction and infrastructure is unfathomable.
Also, logging every experiment is another discipline I'm teaching myself. And I fell in love with org-mode in the process.
I'm curious how you would define that. As far as I understand, Newton's life was definitely colored and shaped by his theological pursuits-questioning their 'worthy'ness is raising the more fundamental argument of faith.
http://blog.stephenwolfram.com/2018/01/showing-off-to-the-un...
And its discussion on HN: https://news.ycombinator.com/item?id=16269500
>Since you’re here …
>… we have a small favour to ask. More people are reading the Guardian than ever but advertising revenues across the media are falling fast. And unlike many news organisations, we haven’t put up a paywall – we want to keep our journalism as open as we can..
I'm a bit heartbroken to read this mainly because I feel this isn't really sustainable in the long run. While, at the same time, I don't have a silver bullet to offer. (I did make a donation though)
Am I the only one who finds this ironic..
I find them extremely useful for tutorials/learning new stuff which I know I need/want to learn but just don't have the time at the moment. Whether or not I end up coming back to them is a discussion for another day ;)
Most of my bookmarks are via HN.
Helped me wrestle and come to rest with many conflicting thoughts and ideas that were ultimately attributed to my lack of knowledge in those. I highly recommend reading in a modern translation like ESV.