Skip to content

Instantly share code, notes, and snippets.

View manojpandey's full-sized avatar
🎯
Focusing

Manoj Pandey manojpandey

🎯
Focusing
View GitHub Profile
@manojpandey
manojpandey / gotchas.ipynb
Last active June 4, 2021 14:53
PyCon FR - Gotchas and Landmines
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@manojpandey
manojpandey / curl_post_json.md
Created November 20, 2018 14:41 — forked from ungoldman/curl_post_json.md
post a file JSON file with curl

How do POST file with curl??

You can post a json file with curl like so:

curl -X POST -H "Content-Type: application/json" -d @FILENAME DESTINATION

so for example:

@manojpandey
manojpandey / gotchas.ipynb
Last active August 11, 2017 23:23
PyCon Korea 2017 - Manoj Pandey (Attack of Pythons: Gotchas and Landmines in Python)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@manojpandey
manojpandey / The Technical Interview Cheat Sheet.md
Created October 24, 2016 11:01 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
@manojpandey
manojpandey / devup_ama_notes_jalem_raj_rohit
Created October 24, 2016 11:00 — forked from sudhirkhanger/devup_ama_notes_jalem_raj_rohit
Notes from Jalem Raj Rohit AMA on devup.in
Competitions:-
https://www.kaggle.com/
https://www.hackerearth.com/
Books:-
Introduction to Algorithms By Thomas H Cormen
Pattern Recognition and Machine Learning By Christopher M. Bishop
Freakonomics By Steven D. Levitt and Stephen J. Dubner
@manojpandey
manojpandey / hello_world.md
Created October 24, 2016 10:59 — forked from lava/hello_world.md
Hello, world: Analyzing a program to death.

Hello, world!

Please explain in detail what will happen if the following program is executed:

#include <iostream>

int main() {
    std::cout << "Hello, world!" << std::endl;
}
@manojpandey
manojpandey / marks.txt
Last active August 4, 2017 23:10
my semester results with some statistics
## 1st Sem
Percentage= 74.69%
Total Credits Secured= 27
Credit Percentage= 71.74%
Marks Obtained= 971/1300
College Rank= 99
University Rank= 278
## 2nd Sem
Percentage= 69.58%
@manojpandey
manojpandey / rgb2lab.py
Created August 12, 2016 10:34
RGB to CIELab color space conversion
# RGB to Lab conversion
# Step 1: RGB to XYZ
# http://www.easyrgb.com/index.php?X=MATH&H=02#text2
# Step 2: XYZ to Lab
# http://www.easyrgb.com/index.php?X=MATH&H=07#text7
def rgb2lab(inputColor):
@manojpandey
manojpandey / delete_all_archives.rb
Created August 1, 2016 20:01
Delete all archives in an Amazon Glacier Vault
#!/usr/bin/env ruby
require 'aws-sdk'
require 'json'
# add credentials here
akid = ""
secret_key = ""
Aws.config.update({
#List unique values in a DataFrame column
pd.unique(df.column_name.ravel())
#Convert Series datatype to numeric, getting rid of any non-numeric values
df['col'] = df['col'].astype(str).convert_objects(convert_numeric=True)
#Grab DataFrame rows where column has certain values
valuelist = ['value1', 'value2', 'value3']
df = df[df.column.isin(value_list)]