Skip to content

Instantly share code, notes, and snippets.

View mridubhatnagar's full-sized avatar

Mridu Bhatnagar mridubhatnagar

View GitHub Profile
@mridubhatnagar
mridubhatnagar / Technical Talks
Created March 8, 2020 08:53
List of technical talks and workshops.
Past Experience [December 2018 - Present]
PyData Delhi meetup
a. Introduction to APIs - https://github.com/pydatadelhi/talks/issues/81 Talk Video - https://drive.google.com/open?id=1JpAkqHQAKjHtb9sancMIsYUvGBLC4sKX
b. Virtual Environment in Python - https://github.com/pydatadelhi/talks/issues/85
LinuxChix India
@mridubhatnagar
mridubhatnagar / gist:ddffd34f08fe50d8d7f1d6d6da94eeb6
Last active January 23, 2020 17:29
Postgresql Setup Lookup Commands
sudo apt-get update
sudo apt-get install postgresql postgresql-contrib
ls /etc/postgresql/9.5/main/
service postgresql status
sudo su postgres
psql
default databases - \l
default user - \du
ALTER USER postgres WITH PASSWORD 'Y';
@mridubhatnagar
mridubhatnagar / gist:292c27841b384a47d13497a9fb690723
Last active February 16, 2019 19:15
Using Python with Raspberry Pi Talk
import requests
import jso
from gpiozero import LED
API_KEY = ''
count = 0
threshold = 15
response = requests.get('http://api.openweathermap.org/data/2.5/weather?q=delhi&APPID=%s' % API_KEY)
print(response.status_code)
ref link: https://www.hackerrank.com/challenges/the-birthday-bar/problem
Approach 1: 3 Test Cases Passed
#!/bin/python3
import math
import os
import random
import re
@mridubhatnagar
mridubhatnagar / ElectronicsShop
Last active May 19, 2018 22:32
Approach for solving Hacker Rank Problem Electronics Shop
reference link to problem - https://www.hackerrank.com/challenges/electronics-shop/problem
Approach 1: Correct output but on some test cases gave Run time Error
#!/bin/python3
import os
import sys
option1=input("Choose the First Colour\n"
"0. Black\n"
"1. Brown\n"
"2. Red \n")
option2= input("Choose the Second Colour\n"
"0. Black\n"
"1. Brown\n"
"2. Red\n")
option3=input(" Choose the Third color\n "
uwsgi socket 0 bound to TCP address :8000 fd 3
Python version: 3.4.2 (default, Oct 8 2014, 10:47:48) [GCC 4.9.1]
PEP 405 virtualenv detected: /data/project/thankyou/www/python/venv
Set PythonHome to /data/project/thankyou/www/python/venv
*** Python threads support is disabled. You can enable it with --enable-threads ***
Python main interpreter initialized at 0x1acd2b0
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 363840 bytes (355 KB) for 4 cores
*** Operational MODE: preforking ***