Skip to content

Instantly share code, notes, and snippets.

View AloyASen's full-sized avatar
💭
working remotely

Aloy Aditya Sen AloyASen

💭
working remotely
View GitHub Profile
@AloyASen
AloyASen / install_ffmpeg_ubuntu.sh
Created June 29, 2020 15:25
this is a collection of all the packages that are required to implement ffmpeg on an ubuntu machine .... reties download and makes some installs
#!/bin/bash
# Bash script to install latest version of ffmpeg and its dependencies on Ubuntu 12.04 or 14.04
# Inspired from https://gist.github.com/faleev/3435377
# Remove any existing packages:
sudo apt-get -y remove ffmpeg x264 libav-tools libvpx-dev libx264-dev
# Get the dependencies (Ubuntu Server or headless users):
sudo apt-get update
@AloyASen
AloyASen / googleMaps_PlacesAPI_companyDetailsByName.py
Created June 23, 2019 08:22
Upwork client required this code to pull details from places api
# for parsing http requests to the web
import requests
# for parsing web service responses from gcloud
import json
import time
# enable pretty printing of lists
import pprint
#enable system generated interupts
import sys
class GooglePlaces(object):
@AloyASen
AloyASen / Customer_Prediction.py
Last active June 19, 2019 15:52
IBM Watson Marketing customer Value data set used for customer analytics division at Radii Corporation
#!/usr/bin/env python
# coding: utf-8
# In[ ]:
# this is a test simulated run on a pruned customer data where customer analytics is a branch of modeling the ecommerce business
# this is the analytics for the dataset at https://www.kaggle.com/pankajjsh06/ibm-watson-marketing-customer-value-data
# In[1]:
@AloyASen
AloyASen / StrategyPattern.py
Created June 7, 2018 10:46
Example strategy pattern in Python
import math
class Metric(object):
"""Abstract class"""
def distance(self,x,y):
raise NotImplementedError("Derived classes should implement this.")
class EuclideanMetric(Metric):
"""Calculates distance from origin in R according to Pythagorean distance"""
def distance(self,x,y):
@AloyASen
AloyASen / Makefile
Created September 30, 2017 17:59
Basic System parser Flex , bison , g++ , ubuntu -linux
all:
$(MAKE) grammer
$(MAKE) lex
gcc -c compiler/grammer.tab.c compiler/lex.yy.c
mv *.o compiler
ar rvs compiler/lexgram.a compiler/grammer.tab.o compiler/lex.yy.o
g++ -o bin/freamps -Wall -Wextra compiler/main.cc compiler/lexgram.a
grammer:
bison -d compiler/grammer.y
mv grammer.tab.* compiler