Skip to content

Instantly share code, notes, and snippets.

View pramodvspk's full-sized avatar

Pramod Sripada pramodvspk

  • Bloomington, IN
View GitHub Profile

Camper News- FCC

Implementation of a stylised version of the Free Code Camp's camper news(which currently has been discontinued). The data can be found here https://www.freecodecamp.com/news/hot/ Initially implemented using HTML, CSS, JQuery. For building of each story, added the required HTML as strings while looping through the JSON data This implementation makes use HandleBars templating. Using HandleBars was a quite a challenge on this data since, the data is an array of objects and also I needed the data to be modified before displaying to the user. Added a representative element for the JSON object for accessing it, and used Helper functions for the modification of data.

TIC TAC TOE

Implementation of Tic Tac Toe game using JavaScript. The underlying artificial intelligence algorithm is MinMax .

A Pen by Pramod Sripada on CodePen.

License.

@pramodvspk
pramodvspk / musicAnalysis.ipynb
Last active October 8, 2016 19:03
Analysis of streaming music data using Apache Spark
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pramodvspk
pramodvspk / sparkSQL.py
Created October 9, 2016 01:47
Benchmarking the run time of SQL queries on sql engine and Big Data systems
from pyspark import SparkConf, SparkContext
from pyspark.sql import SQLContext, Row
#Setting the application name and creating the spark context and sql context objects.
conf = SparkConf().setAppName("SparkSQL")
sc = SparkContext(conf = conf)
sqlContext = SQLContext(sc)
#The URL where the mysql database is hosted
jdbcUrl = 'jdbcUrl'
@pramodvspk
pramodvspk / rightSideView.java
Created March 14, 2017 22:25
Printing right side view of a Binary Tree
public List<Integer> rightSideView(TreeNode root) {
if(root==null) return new ArrayList();
/*Initializing a ArrayList to return*/
List<Integer> returnList = new ArrayList<Integer>();
/*Initializing a Queue to hold elements*/
Queue<TreeNode> q = new LinkedList<TreeNode>();
/*Creating a dummy variable*/
TreeNode current = null;
/*Adding the root and null into the Queue*/
q.add(root);
class Post(models.Model):
user = models.ForeignKey(User, on_delete=models.CASCADE)
description = models.CharField(max_length=1000)
image = models.ImageField(null=True)
'''
https://docs.djangoproject.com/en/1.10/topics/db/examples/many_to_many/
https://docs.djangoproject.com/en/dev/topics/db/queries/#backwards-related-objects
http://stackoverflow.com/questions/2642613/what-is-related-name-used-for-in-django
@pramodvspk
pramodvspk / application.conf
Created June 1, 2017 13:04
Type Safe Config usage
// Encapsulate all related properties into separate key words
sparkproperties{
dev.executionmode = "local[*]"
cluster.executionmode = "yarn-client"
}
@pramodvspk
pramodvspk / settings.scala
Created June 1, 2017 13:07
Settings for using TypeSafeConfig
package config
import com.typesafe.config.ConfigFactory
/**
* Created by Pramod on 6/1/2017.
*/
object Settings {
private val config = ConfigFactory.load()