I am lucky to have the chance of attending GHCI’18 held at Bangalore India with my Outreachy travel fund.
The Grace Hopper Celebration India (GHCI) is the Asia’s largest gathering of women technologists, this year held on 14th, 15th and 16th of November at the Bangalore International Exhibition Center, Bangalore. It is produced by the AnitaB.Org in partnership with ACM India along with the leading sponsors like American Express, Google, Amazon, Microsoft, Adobe, Goldman Sachs, Oracle and the list continues….
GHCI offers technical and career development sessions like poster session, Career Fair, Women Entrepreneur Quest (WEQ), Tech Expo, Speed Mentoring and lots more. And, I am fortunate that I got the chance to be part of these sessions.
So GHCI is a three-day event.
Day-1 – keynote sessions
Day-2 – Microsoft reception, career fair, systers meet.
Day-3 – Mostly career fair
First keynote speech was given by Lori Beer, the Global CIO of JPMorgan Chase & Co. She shared her story of her success and her struggles between family and work.
The Exciting Career Fair
The Career Fair was something that couldn’t be missed. A hall filled with company booths of the tech Giants, that a Technologist dreams off! It was a unique experience to visit the various booths interact with their representatives, learn new things and solve puzzles to win goodies!
I would like to thank Outreachy for providing me full fund to attend the conference.
I can’t thank enough for the important work Software Freedom Conservancy do for managing Outreachy funds and sending us our stipends smoothly.
ROUGE or Recall-Oriented Understudy for Gisting Evaluation is a set of metrics and a software package used for evaluating automatic summarization and machine translation software in natural language processing.The metrics compare an automatically produced summary or translation against a reference or a set of references (human-produced) summary or translation.
While working on my Project on Summarisation, in order to compare my generated summary against the reference summary I had to set up ROUGE. In contrast to how there’s a lot of content on every topic available on the internet, well, installing ROUGE only has a few articles. None of them provided the sequence of steps and the requirements to install it. I wished there was some blog written. The content was present but I had to piece it all together from multiple sources to set it up. But, let me make things easy for the future researchers here in this post.
1. Download ROUGE-1.5.5 from here You only need the ROUGE-1.5.5 directory.
git clone https://github.com/andersjo/pyrouge.git cd pyrouge/tools/ROUGE-1.5.5
2. Check if Perl is installed else install it.
In Ubuntu, do
sudo apt-get install perl
3. For installing XML:DOM(this is a requirement for ROUGE to work) we install synaptic package manager
sudo apt-get update sudo apt-get install synaptic
4. Once Synaptic Package manager is installed, search for Synaptic package manager in your applications and launch it.
Once the package manager is opened search “libxml-dom-perl”
Click on Mark for Installation and apply changes.
5. An environment variable ROUGE_EVAL_HOME must be set to point to the data directory.
6. To avoid any WordNet exceptions, run these commands.
cd data/WordNet-2.0-Exceptions/ ./buildExeptionDB.pl . exc WordNet-2.0.exc.db cd ../ ln -s WordNet-2.0-Exceptions/WordNet-2.0.exc.db WordNet-2.0.exc.db
ROUGE is now installed, hurray!
Setting up pyrouge
pyrouge is a Python wrapper for the ROUGE summarization evaluation package. Getting ROUGE to work can require quite a bit of time. pyrouge is designed to make getting ROUGE scores easier by automatically converting your summaries into a format ROUGE understands, and automatically generating the ROUGE configuration file.
As of now, pypi version of pyrouge is deprecated, so let’s get the latest version from the repository
git clone https://github.com/bheinzerling/pyrouge.git cd pyrouge
Set the ROUGE path with the command
Command usage – pyrouge_set_rouge_path /absolute/path/to/ROUGE-1.5.5/
Install pyrouge using
sudo python setup.py install
Test if everything’s installed by running
If the above command outputs “OK” , everything has been installed properly.
The Jupyter Notebook App is a server-client application that allows editing and running notebook documents via a web browser.
You’re starting to experiment an unknown library and you write a big chunk of code, there are too many errors, so you start debugging but in the end you give up hope. Sad story, eh?
But what if you can write small chunks, check if it’s running fine and proceed to the next? That’d be so great. This is what Notebooks achieve and why I love it.
Remote port forwarding / Reverse ssh tunneling for jupyter notebooks
My laptop’s too slow to even run a hello world program and I try to run it on my friend’s powerful machine. I want to run not just any code, but a jupyter notebook. This is how I do it.
I ssh into my friend’s machine first. Now, the
- Current machine is my friend’s powerful machine – let it be C,
- Remote machine is the local machine, my very slow laptop – R
Start a jupyter notebook on C in a new session, using
jupyter-notebook --no-browser --port 8080
In another session on C, do this
ssh -N -f -R <portR>:localhost:<portC> <user_name>@<local_machine_ip(R's ip)>
<portR> is R’s port we wish to use.
<portC> is C’s port that’s currently used, in this case it’s 8080
<user_name>@<local_machine_ip> is my slow laptop’s address.(R)
Now, I will be able to access the jupyter notebook on my laptop(R) and perform expensive operations using C’s resources.
Using bind address
Syntax for the argument
-R from the man pages of ssh
My friend now wants to access my jupyter notebook on my machine and when I send the address
<R's ip>:portR , my friend wouldn’t able to access it.
To allow nonlocal users to be able to connect
localhost:portC, follow these few steps.
R$ grep GatewayPorts /etc/ssh/sshd_config #GatewayPorts no
In the R’s
/etc/ssh/sshd_config file add
R$ sudo service sshd restart
and run in C,
ssh -N -f -R 0.0.0.0:<portR>:localhost:<portC> <user_name>@<local_machine_ip>
ssh -N -f -R \*:<portR>:localhost:<portC> <user_name>@<local_machine_ip>
ssh -N -f -R "[::]:<portR>:localhost:<portC>" <user_name>@<local_ machine_ip>
If you do this very often, set up a special host in
~/.ssh/config on C:
Host laptop HostName <R's ip> User <user_name> RemoteForward portR localhost:portC
-Nsays that you want an SSH connection, but you don’t actually want to run any remote commands. If all you’re creating is a tunnel, then including this option saves resources.
Specifies that the given port on the remote (server) host is to be forwarded to the given host and port on the local side.
-fRequests ssh to go to background just before command execution
1. Sharing buttons – default.
2. Sharing custom text/image/url
Use properties like
||Specifies URL (can be shortened URL) that you would like shared|
||Specifies title that you would like shared|
||Specifies link to image you would like displayed in the shared content|
||Specifies summary text/description you wish to share|
The above code would change into something like this,
3. Sharing custom text dynamically. (Django)
In the corresponding view add share message into the context, looks something like this.
def get_context_data(self, **kwargs): context = super(ExampleView, self).get_context_data(**kwargs) context['share_message'] = self.object.title " @systers_org " return context
References : Custom Buttons
It’s been a few weeks since I have started my internship, and there’s a lot to tell.
Community bonding period flew by quickly as I was having my end semester exams. Having finished my exams, and it being the start of my winter break, I had some free time before the official internship period begins.During that period, I was doubting myself if I could finish what I proposed and if I could make portal all set to serve the world. I wanted to get rid of all the anxiety and assert myself that I could do it, so I started the work a few days before the starting date. I was able to finish some tasks with less difficulty, Yay!
After that, I was eagerly waiting for the internship to begin so I can submit my first of many pull requests 😛 Working before official starting date made me less nervous and more confident about myself. Doubts washed away. Whoosh!
I did make a few resolutions on my first day. Some of them were – working sincerely throughout, writing code neater than what I usually code in my personal uni projects, write blogs, involve more with the community and learn more as the internship progresses.
So, as an intern, I’d have to attend meetings. Meetings with May, mentors, fellow outreachy interns were so much fun. They weren’t what I thought they would be like, they’re so coool. There were meetings where we discussed the features on portal, setting up timeline – that was related to work, and there were meetings where it’s not always about work – there was a game we played that was to guess others tastes( to know more about my fellow outreachy interns), like talking about random stuff everyone’s interested in.
Coding is so much fun too, if only there were no errors XD. But, the truth is everyone’s bound to get errors, and get stuck once in a while. No matter how small the error can be and get stuck, it doesn’t mean that we’re stupid to not be able to solve it.
I didn’t know Django before, but, hey, now I do. I knew I am good at python, MVC architectures, and MySQL, so I knew I would eventually be good at Django too. Most of the things I learned (listed under), I did know them(forms/views/migrations), it’s just that I’ve never ever coded them in Django. I’m a little confident in Django now, but not before I solved some of these tasks.
- The first task, Adding a new community form for admin  – I learned how to add a form, view, include context in it and a template, writing tests.
- Another task, Creating New community requests  – I can say I learned so much from this one task alone, that includes creating a model, understanding migrations, adding permissions and groups after understanding signals, creating a logic for approve feature, reject feature and sending messages using statuses of the task. One satisfying thing was that I was able to add all of them in a week, although I put in a lot of effort into it in that week.
- Creating checkboxes, I was pondering over what model’s field type to add to it. Reddit’s r/Django helped me. I used the widget, was able to use checkboxes but I wasn’t able to store that in my dB, it took me quite some time to figure out what was happening. I created a new char field in the model, and a multiple-choice field with Checkboxselectmuliple widget in the model form for the same field and used a clean_field method to convert checkbox input into a char type.
As I was working, there were times when I was coding super fast, flawless, neat code, there were also times when every line I coded threw me errors and stack overflow seemed like a savior. It wasn’t always a rainbow. I did face a few errors which when googled were present in stack overflow, but none of them worked for me. I then tried to look at the errors for hours and days to analyze and make my own solution for it. One such instance is this , I went on to use every answer present on the web (took me a lot of hours to do this), yet nothing solved it. I gave up looking for the answers online and came up with my own fix. But there were some errors that I just couldn’t fix even if I stare at it for days, and try out everything like this 
My Systers internship in Outreachy has been going on well, with ups and downs, with a lot to contribute, collaborate and lot to learn. I wish to do well in the remaining of my internship and make portal all set for production. I thank my mentors Tapasweni Pathak, Mansimar, and May for making my journey terrific so far.
Officially, today marks the beginning of my outreachy internship with Systers. I just want to tell the world I am ready, and that I am very much excited about it. ^_^