Skip to content

Instantly share code, notes, and snippets.

View abs51295's full-sized avatar
💭
I may be slow to respond.

Aagam Shah abs51295

💭
I may be slow to respond.
View GitHub Profile
@abs51295
abs51295 / html_to_text.py
Last active July 31, 2024 07:07 — forked from racitup/html_to_text.py
Extract text from html in python using BeautifulSoup4
from bs4 import BeautifulSoup, NavigableString, Tag
import urllib.request
def html_to_text(html):
"Creates a formatted text email message as a string from a rendered html template (page)"
soup = BeautifulSoup(html, 'html.parser')
# Ignore anything in head
body, text = soup.body, []
for element in body.descendants:
# We use type and not isinstance since comments, cdata, etc are subclasses that we don't want
@abs51295
abs51295 / requirements.txt
Last active May 16, 2018 14:33
requirements.txt for kronos
#
# This file is autogenerated by pip-compile
# To update, run:
#
# pip-compile --output-file requirements.txt requirements.in
#
beautifulsoup4==4.6.0
boto3==1.4.4
boto==2.46.1
botocore==1.5.32
import java.io.*;
/**
* <h1>Add Two Numbers!</h1>
* The AddNum program implements an application that
* simply adds two given integer numbers and Prints
* the output on the screen.
* <p>
* <b>Note:</b> Giving proper comments in your program makes it more
* user friendly and it is assumed as a high quality code.
#
# This file is autogenerated by pip-compile
# To update, run:
#
# pip-compile --output-file requirements.txt requirements.in
#
asn1crypto==0.24.0 # via cryptography
attrs==18.1.0 # via pytest
certifi==2018.4.16 # via requests
cffi==1.11.5 # via cryptography
@abs51295
abs51295 / effective-pom.xml
Created August 30, 2018 12:54
pom generated using `mvn help:effective-pom`
<?xml version="1.0" encoding="UTF-8"?>
<!-- ====================================================================== -->
<!-- -->
<!-- Generated by Maven Help Plugin on 2018-08-30T18:23:18+05:30 -->
<!-- See: http://maven.apache.org/plugins/maven-help-plugin/ -->
<!-- -->
<!-- ====================================================================== -->
<projects>
<!-- ====================================================================== -->
<!-- -->
@abs51295
abs51295 / effective-pom.xml
Created August 30, 2018 13:02
Effective pom generated using `mvn io.github.stackinfo:stackinfo-maven-plugin:0.2:prepare`
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.github.ignition</groupId>
<artifactId>ignition</artifactId>
<version>0.3-SNAPSHOT</version>
<packaging>pom</packaging>
<description>Kick-starts Android application development.</description>
<licenses>
@abs51295
abs51295 / canonicalize_name.py
Created October 29, 2018 12:25
canonicalize name
import re
_canonicalize_regex = re.compile(r"[-_.]+")
def canonicalize_name(name):
# This is taken from PEP 503.
return _canonicalize_regex.sub("-", name).lower()
@abs51295
abs51295 / python-data-collection.py
Created October 30, 2018 13:46
Python package collection
from pip._internal.req.req_file import parse_requirements
from pip._internal.download import PipSession
from pip._vendor.distlib.util import normalize_name
import requests
import requests_cache
from datetime import timedelta
import json
## To cache responses of requests objects, this can make things faster.
requests_cache.install_cache(expire_after=timedelta(hours=5))
OpenShift Build aagshah-preview/maven-simple-10 from https://github.com/abs51295/maven-simple.git
Connecting to https://api.github.com using abs51295/****** (cd-github)
Obtained Jenkinsfile from 57effaa4d8575e3d46dee6ea11affa7b5492dbc6
Running in Durability level: MAX_SURVIVABILITY
Loading library github.com/fabric8io/fabric8-pipeline-library@master
Attempting to resolve master from remote references...
> git --version # timeout=10
> git ls-remote -h -t https://github.com/fabric8io/fabric8-pipeline-library.git # timeout=10
Found match: refs/heads/master revision 8fefa6d888752b24e72c6f6741307947a120cefe
> git rev-parse --is-inside-work-tree # timeout=10
@abs51295
abs51295 / repo-list.txt
Last active July 10, 2020 15:08
Repository list containing go packages used by openshift as well as the repositories written in golang under openshift organization.
https://github.com/urfave/cli
https://github.com/mreiferson/go-httpclient
https://github.com/crewjam/rfc5424
https://github.com/kubernetes/heapster
https://github.com/go-openapi/spec
https://github.com/andygrunwald/go-gerrit
https://github.com/openshift/ci-secret-mirroring-controller
https://github.com/fsnotify/fsnotify
https://github.com/BurntSushi/toml
https://github.com/kubernetes-csi/drivers