Skip to content

Instantly share code, notes, and snippets.

View shankcode's full-sized avatar
💻
Love to code

Shashank Yadav shankcode

💻
Love to code
View GitHub Profile
@shankcode
shankcode / mul_threading.py
Last active April 26, 2017 16:26
Finding Square and cube using Multi-threading
import threading
import time
arr =[2, 4, 6, 8, 9]
def calc_square(number):
for n in number:
num = n*n
print('Square of ' + str(n) + ' is ' + str(num))
#time.sleep(2)
@shankcode
shankcode / flipkart_crawler.py
Created April 26, 2017 16:34
Flipkart crawler for all categories link in .csv
import requests
from bs4 import BeautifulSoup
import csv
#FOR WRITTING RESULT IN CSV FILE
fw = csv.writer(open('shank.csv', 'w'))
fw.writerow('link')
#FOR WEBSITE SCRAPPING
con = BeautifulSoup(open("C:/Users/Shank/Desktop/fkart.xml"))
@shankcode
shankcode / README-Template.md
Created July 26, 2020 16:42 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@shankcode
shankcode / Style.scss
Last active September 1, 2020 12:18
Custom Checkbox, Radio, Floating input, rounded and circular buttons, text buttons
.primary-accent-rounded-button{
@include roundedBtn($accentPrimary, $white);
}
.primary-grey-rounded-button{
@include roundedBtn($greyLight, $greyDarkest);
}
.primary-accent-circle-button{
@include circularBtn($accentPrimary, $white);
@shankcode
shankcode / initiate_txn
Created February 4, 2021 11:58 — forked from amalj07/initiate_txn
Route for initiating transaction. (POST req to /paynow)
app.post('/paynow', [parseUrl, parseJson], (req, res) => {
if (!req.body.amount || !req.body.email || !req.body.phone) {
res.status(400).send('Payment failed')
} else {
var params = {};
params['MID'] = config.PaytmConfig.mid;
params['WEBSITE'] = config.PaytmConfig.website;
params['CHANNEL_ID'] = 'WEB';
params['INDUSTRY_TYPE_ID'] = 'Retail';
params['ORDER_ID'] = 'TEST_' + new Date().getTime();
@shankcode
shankcode / gist:be37b0e07976f4406e58f288a9a71b99
Created February 19, 2021 18:19
www to non-www redirect website
// www redirection to non-www (SEO)
if (window.location.host.startsWith("www")) {
let host = window.location.host;
window.location.replace(`${window.location.protocol}//${host.substring(4, host.length)}${window.location.pathname}`);
}
@shankcode
shankcode / NavLink.js
Created February 20, 2021 11:25
Nav Link Active state logic React