Skip to content

Instantly share code, notes, and snippets.

View msuryaprakash's full-sized avatar

Murapaka SuryaPrakash msuryaprakash

View GitHub Profile
@msuryaprakash
msuryaprakash / laravel-ums.markdown
Created September 19, 2018 22:36 — forked from anchetaWern/laravel-ums.markdown
Building a User Management System in Laravel

There's no shortage of good resources for learning laravel. So instead of the usual introductory tutorial were just gonna learn Laravel by building a project from scratch and that's gonna be a User Management System.

I don't know if my definition of a User Management System is correct but here's my idea of what's it's capable of doing:

  • Register Roles
  • Register Users
  • Update Users
@msuryaprakash
msuryaprakash / ner.py
Created January 28, 2019 09:38 — forked from bogsio/ner.py
NER Python
# https://nlpforhackers.io/named-entity-extraction/
import os
import string
import collections
import pickle
from collections import Iterable
from nltk.tag import ClassifierBasedTagger
from nltk.chunk import ChunkParserI, conlltags2tree, tree2conlltags
@msuryaprakash
msuryaprakash / address-to-lat-lng-coordinates.md
Created February 15, 2019 04:48
Finding the latitude and longitude by address with the Google Maps API
import numpy as np
import multiprocessing as multi
def chunks(n, page_list):
"""Splits the list into n chunks"""
return np.array_split(page_list,n)
cpus = multi.cpu_count()
workers = []
page_list = ['www.website.com/page1.html', 'www.website.com/page2.html'
@msuryaprakash
msuryaprakash / global.R
Created April 26, 2019 05:13 — forked from SachaEpskamp/global.R
A general shiny app to import and export data to R. Note that this can be used as a starting point for any app that requires data to be loaded into Shiny.
library("shiny")
library("foreign")
@msuryaprakash
msuryaprakash / insert2DB.py
Created May 30, 2019 08:03 — forked from lyleaf/insert2DB.py
Insert pandas dataframe to Oracle database using cx_Oracle
"""
ATTENTION:
When using executemany with a list of tuples, the numbers representing the rows has to be strictly from 1 to the last. Or else it won't work.
I really don't understand why.
"""
import cx_Oracle
from parserFWF import getConfigDF
HOTEL_CONFIG = getConfigDF() #dataframe
@msuryaprakash
msuryaprakash / excelapp.py
Created August 31, 2019 12:22 — forked from mikepsn/excelapp.py
Interacting with Microsoft Excel from Python using the Win32 COM API (Example Python Code)
"""
An example of using PyWin32 and the win32com library to interact
Microsoft Excel from Python.
This can be used instead of Visual Basic for Applications (VBA)
(c) Michael Papasimeon
"""
import win32com.client
@msuryaprakash
msuryaprakash / erpdatapivot.py
Created September 5, 2019 04:30 — forked from pythonexcels/erpdatapivot.py
Excel ERP Data Pivot Tables using Python
#
# erpdatapivot.py:
# Load raw EPR data, clean up header info and
# build 5 pivot tables
#
import win32com.client as win32
win32c = win32.constants
import sys
import itertools
tablecount = itertools.count(1)
@msuryaprakash
msuryaprakash / conditionalformatting.py
Created September 5, 2019 08:50 — forked from pythonexcels/conditionalformatting.py
Conditional Formatting in Excel using Python
#
# conditionalformatting.py
# Create two tables and apply Conditional Formatting
#
import win32com.client as win32
excel = win32.gencache.EnsureDispatch('Excel.Application')
#excel.Visible = True
wb = excel.Workbooks.Add()
ws = wb.Worksheets('Sheet1')
ws.Range("B2:K2").Value = [i for i in range(1,11)]
@msuryaprakash
msuryaprakash / randomcircles.py
Created September 13, 2019 11:42 — forked from dmahugh/randomcircles.py
WIN32 automation of PowerPoint
"""Requires pypiwin32 - see installation instructions at https://github.com/mhammond/pywin32
"""
import random
import win32com.client
# for other shape types, see MsoAutoShapeTypeEnumeration:
# https://msdn.microsoft.com/en-us/vba/office-shared-vba/articles/msoautoshapetype-enumeration-office
SHAPE_OVAL = 9
# for other layout options, see PpSlideLayout Enumeration: