Free and Open Source Software (FOSS) has a sustainability problem. For those of you who are a part of the FOSS ecosystem, or are fairly familiar with it, Duh. But here's a short intro for the uninitiated - you are relying on Free and Open Source software when you read this blog post. Most commercial software applications are made up primarily of FOSS. Our digital lives are powered by FOSS. Yet, a majority of the people who create, maintain, and sustain the FOSS projects are underfunded, if not completely unfunded. This isn't really news - for more than a decade now, people in the FOSS community have been complaining about the sustainability problem, and people have come up with varying solutions to the problem. A real solution to the FOSS sustainability problem involves systematic support from for-profit enterprises and Nation-State Governments but for the moment, let's focus on what I can do as an individual. And why am I bringing this up now? Because of what's happene...
So, I wanted to get author affiliation information from papers on arXiv. arXiv provides with an API to bulk query their database and get information. Following that, I look for the attribute 'arxiv:affiliation' in the html data. Here's the code - import urllib from BeautifulSoup import BeautifulStoneSoup url = 'http://export.arxiv.org/api/query?search_query=all:astro&start=0&max_results=1000' data = urllib.urlopen(url).read() soup = BeautifulStoneSoup(data) #print(soup.prettify()) #list = soup.findAll('arxiv:affiliation') #for i in range(len(list)): # print list[i].contents test = [tag.string for tag in soup.findAll('arxiv:aiffiliation')] Now, the problem I'm having is that I'm getting affiliation of all authors which I want to split into sets of affiliations of authors of a paper, which I'm stuck on at the moment. Once I get that part, I can move on to the next part of this pet project, displaying these...
I am still trying to implement an adaptive step size RK routine. So far, I've been able to implement the step-halving method but not the RK-Fehlberg. I am not able to figure out how to increase the step size after reducing it initially. To give some background on the topic, Runge-Kutta methods are used to solve ordinary differential equations, of any order. For example, in a first order differential equation, it uses the derivative of the function to predict what the function value at the next step should be. Euler's method is a rudimentary implementation of RK. Adaptive step size RK is changing the step size depending on how fastly or slowly the function is changing. If a function is rapidly rising or falling, it is in a region that we should sample carefully and therefore, we reduce the step size and if the rate of change of the function is small, we can increase the step size. I've been able to implement a way to reduce the step size depending on the rate of change of...