This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
Created on Sat May 9 23:28:42 2020 | |
@author: bineet | |
""" | |
# given an array and if sum of any 3 numbers in array is equal to key | |
# then return true else false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
LinkedLists, Stack implementation using python classes and methods | |
Added methods to our LinkedList class, | |
and use that to implement a Stack. | |
we have 4 functions below: insert_first, delete_first, push, and pop. | |
Think about the underlying working before checking out the code""" | |
class Element(object): | |
def __init__(self, value): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Element(object): | |
def __init__(self, value): | |
self.value = value | |
self.next = None | |
class LinkedList(object): | |
def __init__(self, head=None): | |
self.head = head | |
def append(self, new_element): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use this JS in your google doc browser console | |
// Courtesy https://coderwall.com/p/qvdxia/2-page-view-in-google-docs | |
(function(d, t, z, s) { | |
s = d.createElement(t); | |
s.innerHTML = z + '-outer{left:0px !important;}' + z + '-outer,' + z + '-inner{width:100% !important;}.kix-page{float:left; width:48% !important;}'; | |
d.getElementsByTagName(t)[0].parentNode.appendChild(s); | |
})(document, 'style', '.kix-zoomdocumentplugin'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
from bs4 import BeautifulSoup | |
link = "https://www.sslproxies.org/" | |
response = requests.get(link) | |
soup = BeautifulSoup(response.text,"lxml") | |
https_proxies = filter(lambda item: "yes" in item.text, | |
soup.select("table.table tr")) | |
for item in https_proxies: | |
print("{}:{}".format(item.select_one("td").text, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>knockout multiple image upload snippet</title> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous"> | |
</head> | |
<body> | |
<div id="page-profile-update"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
#------------------------------------------------------------------------------- | |
# DOCS : https://googledrive.github.io/PyDrive/docs/build/html/index.html | |
# GITHUB REPO : https://github.com/googledrive/PyDrive | |
# example usage for python wrapper 'pyDrive' | |
# This example will create a file named "Hello.txt" with content 'Hello World!' | |
# in the drive of authenticated user. | |
#------------------------------------------------------------------------------- |