Skip to content

Instantly share code, notes, and snippets.

View pravj's full-sized avatar
📖

Pravendra Singh pravj

📖
View GitHub Profile
@pravj
pravj / HelpNet.md
Last active August 29, 2015 14:00
HelpNet will contain resources for different topics/problems over internet, that I have met. I hope, I'll change it in shape of a more useful tool, one day.
@pravj
pravj / treegen.sh
Last active September 8, 2021 09:43
bash script to generate tree structure of a directory
#!/usr/bin/env bash
# bash script to generate tree structure of a directory
# Pravendra Singh (@hackpravj)
pwd=$(pwd)
find $pwd -print | sed -e "s;$pwd;\.;g;s;[^/]*\/;|__;g;s;__|; |;g"
@pravj
pravj / 99BottlesOfBeer.swift
Last active July 30, 2019 00:20
99 Bottles of Beer in Swift Language
var i = 99
while i > 0
println(i + " bottles of beer on the wall, " + i + "bottles of beer.")
var num = i - 1
if i == 1 {
var num = "no more"
}
println("Take one down and pass it around, " + num + "bottles of beer on the wall.")
println("No more bottles of beer on the wall, no more bottles of beer.")
println("Go to the store and buy some more, 99 bottles of beer on the wall.")
@pravj
pravj / leaderboard.coffee
Created July 11, 2014 07:28
partychat like chat-score/leaderboard script built at 'SDSLabs'
# Description:
# partychat like chat-score/leaderboard script built at 'SDSLabs'
# we developed this to use in our 'Slack' team instance
#
# Commands:
# listen for keyword++ or keyword-- in chat text and updates score for each
# bot score keyword : returns current score of 'keyword'
#
# Examples:
# : will update score for each, accordingly :
@pravj
pravj / ospi-layout.md
Last active August 29, 2015 14:12
content layout of the open source presence infographic

Motive

  • Why did I work on this?
    • R and ggplot
    • Amod malviya's yourstory interview

Abstract

  • What will be the content of this?
@pravj
pravj / Quora-GitHub.md
Last active August 29, 2015 14:13
Quora GitHub
  • repositories showing 404 : may be they have shifted to new home
  • repositories showing 403 : disabled by GitHub staff
  • repositories having stars but 0 languages detected
@pravj
pravj / gophericons.md
Last active August 29, 2015 14:14
Projects icons that uses gopher
  • Revel
    • Revel
  • gobot
    • gobot
  • goblin
  • goblin

There is a sub-section named "Paging"[1] in the "Data API" section. It explains the Metadata in API responses, so I used this for my answer here.

I used Python's "requests" to communicate with the sandbox API. Below, I'm adding the "paging" response I got for both the endpoints, "students" and "sections".

Students {u'current': 1, u'count': 1004, u'total': 11}

Sections

@pravj
pravj / design-hints.md
Last active October 23, 2015 05:48
Design hints