Skip to content

Instantly share code, notes, and snippets.

View ViveK-PothinA's full-sized avatar
🥱

Vivek Pothina ViveK-PothinA

🥱
  • Jersey City, NJ
  • 05:24 (UTC -04:00)
View GitHub Profile
@ViveK-PothinA
ViveK-PothinA / pom.xml
Created March 8, 2022 20:31
Standard Maven pom.xml that generates a complete target zip with dependency JARs too
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.example</groupId>
<artifactId>demo</artifactId>
<version>1.0-SNAPSHOT</version>
@ViveK-PothinA
ViveK-PothinA / madlib.py
Created January 24, 2022 06:36
Python script to play Mad Lib
import random
def fetch_mad_libs_list(filename=None):
mad_libs_list = []
if (filename is None):
mad_libs_list = [["Pizza was invented by a {0} {1} chef named {2}. \nTo make a pizza, you need to take a lump of {3}, and make a thin, round {4} {5}. \nThen you cover it with {6} sauce, {7} cheese and fresh chopped {8}. \nNext you have to bake it in a very hot {9}. \nWhen it is done, cut it into {10} {11}. \nSome kids like {12} pizza the best, but my favorite is the {13} pizza. \nIf I could, I would eat pizza {14} times a day." , ["adjective", "nationalitiy", "same nationality first name", "food ingredient", "adjective", "3d shape", "adjective", "adjective", "plural vegetable", "kitchen appliance", "number", "2d shape", "cheese type", "cheese type", "number"]], ["Meet our hero {0}, a super-intelligent {1}. \nA run-in with the {2} military leads him to create his alter-ego {3}, a {4} {5} giant capable of great destruction. He {6} battles the military with his girlfriend {7}. \nEventually it is disco
@ViveK-PothinA
ViveK-PothinA / cvrp_reload_1.py
Created July 8, 2021 08:55
cvrp_reload with lat lng and gps distance
#!/usr/bin/env python
# This Python file uses the following encoding: utf-8
# Copyright 2015 Tin Arm Engineering AB
# Copyright 2018 Google LLC
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@ViveK-PothinA
ViveK-PothinA / colab_helper_1.py
Last active June 21, 2018 12:14
Find kaggle.json in Google Drive for Google Colab
# Import kaggle.json from google drive
# This snippet will output a link which needs authentication from any google account
from googleapiclient.discovery import build
import io, os
from googleapiclient.http import MediaIoBaseDownload
from google.colab import auth
auth.authenticate_user()
drive_service = build('drive', 'v3')
results = drive_service.files().list(
q="name = 'kaggle.json'", fields="files(id)").execute()