Skip to content

Instantly share code, notes, and snippets.

View devharsh's full-sized avatar
🖥️
Cyber-security and Machine-learning

Devharsh Trivedi devharsh

🖥️
Cyber-security and Machine-learning
View GitHub Profile
@devharsh
devharsh / writeToPdf.py
Last active December 12, 2021 22:50
Create PDF from scratch - write strings to PDF in Python. For reference and credits please visit: http://com.puter.tips/2016/12/create-pdf-from-python.html
import io
from reportlab.platypus import SimpleDocTemplate, Paragraph
from reportlab.lib.styles import getSampleStyleSheet
from reportlab.lib.units import inch
from reportlab.lib.pagesizes import letter
buf = io.BytesIO()
doc = SimpleDocTemplate(
buf,
@devharsh
devharsh / linkInternalExternalExtractor.py
Last active February 8, 2018 18:01
Lists down all unique internal and external links from all the given values of URL.
#!/usr/bin/python
__author__ = "Devharsh Trivedi"
__copyright__ = "Copyright 2018, Devharsh Trivedi"
__license__ = "GPL"
__version__ = "1.4"
__maintainer__ = "Devharsh Trivedi"
__email__ = "[email protected]"
__status__ = "Production"
@devharsh
devharsh / fizzBuzz.py
Created December 15, 2021 21:51
Evaluating classification algorithms on a multi-class single feature problem
import pandas as pd
from sklearn.linear_model import LogisticRegression
from sklearn import svm
from sklearn.ensemble import RandomForestClassifier
from sklearn.neural_network import MLPClassifier
from sklearn.model_selection import train_test_split
df = pd.DataFrame(columns=['Number','Class'])

Keybase proof

I hereby claim:

  • I am devharsh on github.
  • I am devharsh (https://keybase.io/devharsh) on keybase.
  • I have a public key whose fingerprint is 643F 36E0 5861 7B73 FC4B AE4A 32C5 C7A7 0143 93DE

To claim this, I am signing this object: