Skip to content

Instantly share code, notes, and snippets.

View shreyas-satish's full-sized avatar

Shreyas Satish shreyas-satish

View GitHub Profile

Introduction

  • How does we ensure there is enough diversity in the writing room?
  • There's a lack of mentorship for first generation journalists.
  • Should the journalist decide what readers should know and consequently pick topics, or should they treat the audience as a customer and understand what they want and need?

Hemanth from Better India

  • Better India started as a blog. They published about a story about a school for girls who were hard of hearing. People read this, showed up, and helped drive change.
  • Two models of driving change. Top down asks for resignations at the top, bottom up is about informing citizens to drive change.
  • Change is caused because of communities.

A few tips to use your Kindle more effectively:

  1. Install Calibre to manage your Kindle Library. It's really useful to convert books and sync it with your device. You can use http://www.pdf4kindle.com/ or http://www.epub2mobi.com/ to convert books too.

  2. You can email a PDF as an attachment to your free.kindle email address with 'Convert' in the subject line. Amazon automatically converts the PDF to the kindle format and sends it to your Kindle. I've found this very useful when I need to read academic papers; staring at a backlit screen all the time can really strain your eyes.

  3. Finally, you can take clippings as you read. These are really useful when you need to revise. Use http://www.clippingsconverter.com/ to sync your clippings.

  4. http://libgen.io/ is really the best resource for books. As I mentioned earlier, in case you really need a book an unable to find it, just send me an email.

Pulling from a branch

git pull origin branchname

Creating a new branch

git checkout -b newbranch
@shreyas-satish
shreyas-satish / query.sql
Last active January 20, 2016 13:14
Subquery using WITH
WITH cohort as (
select author_id from articles where datetime >= '2015-01-01' and datetime <= '2015-01-31'
), return_rate as (
select date_trunc('month', datetime) AS month, count(*) FROM articles WHERE author_id IN (SELECT author_id FROM cohort) AND datetime >= '2015-02-01' GROUP BY month ORDER BY count ASC
)
SELECT to_char(month, 'Mon YYYY'), count from return_rate;
window.TableSearch = function(tableId){
// a little library that takes a table id
// and provides a method to search the table's rows for a given query.
// the row's td must contain the class 'js-searchable' to be considered
// for searching.
// Eg:
// var tableSearch = new TableSearch('tableId');
// var hits = tableSearch.searchRows('someQuery');
// 'hits' is a list of ids of the table's rows which contained 'someQuery'
this.tableId = tableId;
@shreyas-satish
shreyas-satish / gist:e4f41f7dade5ebfb19b1
Last active August 29, 2015 14:22
Notes from the hillhacks discussion on why make in India
  • A place where resources, skills and tools are shared to make 'things'.
  • "Our space attracts people of all ages". But, what about people from different communities, and gender?
  • Maker spaces are turning out to be a great place for students to learn. Colleges aren't helping with skill development; maker spaces can fill that gap.
  • Is there a class distinction with maker spaces?
  • What is the goal of a maker space?
    • The sheer joy of making.
    • Environment to enable prototyping and entrepreneurship.
    • Enable communities where people learn how to learn and figure out how the world works.
  • One way, maker spaces are different from traditional 'maker spaces' is the habit of documentation. But, how much documentation is actually there?
  • Maker spaces aren't really ahistorical; India has had a great history of artisanship and craftsmanship. Are traditional makers brought or even considered in the fold as well?
# works when executed in ipython but the transaction freezes when executed through flask
ids = [1,2]
cls = User
approved = True
db.session.query(cls).filter(cls.id.in_(ids)).update({'approved': approved}, False)
db.session.commit()
import requests
access_token = "xxx"
headers = {'Authorization': 'Bearer {0}'.format(access_token)}
# Get all events
event_list_url = "https://www.explara.com/api/e/get-all-events"
events = requests.post(event_list_url, headers=headers).json()
first_event = events.get('events')[0]