Skip to content

Instantly share code, notes, and snippets.

View nkrth's full-sized avatar
:octocat:
Changed username to @nkrth

Nikhil Kartha nkrth

:octocat:
Changed username to @nkrth
View GitHub Profile
@nkrth
nkrth / carbon.txt
Created August 14, 2021 04:38
Carbon Sample Code
const pluckDeep = key => obj => key.split('.').reduce((accum, key) => accum[key], obj)
const compose = (...fns) => res => fns.reduce((accum, next) => next(accum), res)
const unfold = (f, seed) => {
const go = (f, seed, acc) => {
const res = f(seed)
return res ? go(f, res[1], acc.concat([res[0]])) : acc
}
return go(f, seed, [])
@nkrth
nkrth / hello.html
Last active April 30, 2019 17:49
Chrome Extension Template
<!DOCTYPE html>
<html>
<head>
<title> Hello Extensions </title>
</head>
<body>
<button onclic="alert("BOOM! There goes his experiments to smithereeeeens. Such is the move and groove of how things go boom! IN DEXTER's LaaAAAAB!");">Ooh, What Does THIS Button Do?</button>
<p> No DeeDee, No! Don't Press that baawtun! </p>
</body>
@nkrth
nkrth / mandel.js
Created February 13, 2019 17:19 — forked from drcircuit/mandel.js
Generalized Mandelbrot in JavaScript
/** mandel5 */
// Uses DrCiRCUiT's Canvas Library, but you can change the drawing / canvas methods for something else.
(function () {
var scr;
var plane = {
real: { min: -2, max: 2 },
imag: { min: -2, max: 2 }
};
function setup() {
scr = dcl.setupScreen(512, 512);
# Updated by Nikhil Kartha
import pandas as pd
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from time import sleep, strftime
from random import randint
import pandas as pd
chromedriver_path = 'C:/Users/User/Downloads/chromedriver_win32/chromedriver.exe' # Change this to your own chromedriver path!
@nkrth
nkrth / web_scrap.py
Created November 17, 2018 10:57 — forked from amirtha255/web_scrap.py
To scrap content from links
from bs4 import BeautifulSoup
import requests
import os
def get_article_content(link, fp):
try:
page_link =link
page_response = requests.get(page_link, timeout=20)
page_content = BeautifulSoup(page_response.content, "html.parser")
article = page_content.find('article')
@nkrth
nkrth / index.html
Created September 23, 2018 13:24
Simple Mobile first Login View Page
<div class="container new-login-area">
<div id='sign-in' class='login-setup-section'>
<h3 class="request-otp-header">Please verify your mobile number</h3>
<div class="form-group login-label">
<label for="inputnumber">mobile number</label>
<input type="number" class="form-control input-edit" placeholder='Enter mobile number' id="number">
</div>
<button type="button" class="btn btn-default btn-lg btn-block request-otp" id='request-otp'>Get OTP</button>
</div>
@nkrth
nkrth / index.html
Created September 23, 2018 13:23
OTP VERIFICATION
<div class="cotn_principal">
<div class="cont_centrar">
<div class="cont_login">
<div class="cont_info_log_sign_up">
<div class="col_md_login">
<div class="cont_ba_opcitiy">
<h2>OTP Verification</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
@nkrth
nkrth / Indent.py
Created August 26, 2018 11:29
Written by Zoe for AshleeDawg in Dawg's Waffle Haus
# Note that this is designed for Python 3.6.4. This might not run on 2.7 at all, because of the change to print statements.
# ----------------------------------------------------------------------------------------------------------------------- #
x = 3;
# Everything top-level doesn't have spacing. Adding spacing will break it
# Except for with comments. PEP8 will complain, but it still runs.
y = 3;
# This doesn't work:
# z = 4
# Remove the # to see the error. Your IDE might complain (if you're using one). If not, it will complain when you run it.
// A Hello World! program in C#.
using System;
namespace HelloWorld
{
class Hello
{
static void Main()
{
Console.WriteLine("Hello World!");
@nkrth
nkrth / sample.md
Created July 1, 2018 17:09 — forked from bradtraversy/sample.md
Markdown Cheat Sheet

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6

This text is italic