Skip to content

Instantly share code, notes, and snippets.

🕶
Loading...

Austin Walters lettergram

🕶
Loading...
Block or report user

Report or block lettergram

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Parse-USPTO-XML.py
publication_title = bs.find('invention-title').text
publication_num = bs['file'].split("-")[0]
publication_date = bs.find('publication-reference').find('date').text
application_type = bs.find('application-reference')['appl-type']
classifications = []
for classes in bs.find_all('classifications-ipcr'):
for el in classes.find_all('classification-ipcr'):
cclassifications.append(el.find('section').text
+ el.find('class').text
View Parse-USPTO-Patents.py
# Load USPTO .xml document
xml_text = html.unescape(open(filename, 'r').read())
# Split out patent applications / grants
for patent in xml_text.split("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"):
# Skip if it doesn't exist
if patent is None or patent == "":
continue
View elasticbeanstalk_install_webpack.config
container_commands:
01_install_webpack:
command: npm install --save-dev webpack
02_precompile:
command: bundle exec rake assets:precompile
View fix_elasticbeanstalk_for_rails6.config
commands:
01_install_yarn:
command: "sudo wget https://dl.yarnpkg.com/rpm/yarn.repo -O /etc/yum.repos.d/yarn.repo && curl --silent --location https://rpm.nodesource.com/setup_6.x | sudo bash - && sudo yum install yarn -y"
02_download_nodejs:
command: "curl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash -"
03_install_nodejs:
command: "yum -y install nodejs"
04_mkdir_webapp_dir:
command: "mkdir /home/webapp"
@lettergram
lettergram / precompile.config
Last active Nov 3, 2019
precompile assets for ebextensions
View precompile.config
container_commands:
command: bundle exec rails assets:precompile
@lettergram
lettergram / upgrade_nodejs.config
Last active Nov 3, 2019
Upgrade NodeJS on ElasticBeanstalk
View upgrade_nodejs.config
commands:
01_install_yarn:
command: "sudo wget https://dl.yarnpkg.com/rpm/yarn.repo -O /etc/yum.repos.d/yarn.repo && curl --silent --location https://rpm.nodesource.com/setup_6.x | sudo bash - && sudo yum install yarn -y"
02_download_nodejs:
command: curl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash -
03_install_nodejs:
command: yum -y install nodejs
View demo-landing-page-video.html
<!--- For use on insideropinion.com --->
<div id="botDemo" class="col-md-8">
<div class="demo-container">
<a href="" onclick="Calendly.initPopupWidget({url: 'https://url.com'});return false;">
<video autoplay loop muted playsinline
poster="img/poster.png"
class="demo-vid">
<source src="video/demo.webm"
type="video/webm" class="demo-vid" />
View demo-landing-page.css
/* For use on InsiderOpinion.com */
.demo-container {
border-radius: 20px;
box-shadow: 0 3px 6px 0 rgba(0, 0, 0, 0.2), 0 3px 15px 0 rgba(0, 0, 0, 0.19);
}
.demo-container:hover .demo-vid { opacity: 0.4; }
.demo-container:hover .demo-img { opacity: 0.4; }
.demo-container:hover .demo-box-try { opacity: 1.0; }
View demo-landing-page.html
<!--- For use on insideropinion.com --->
<div id="botDemo" class="col-md-8">
<div class="demo-container">
<a href="" onclick="Calendly.initPopupWidget({url: 'https://url.com'});return false;">
<img src="img/gifs/demo.gif" alt="insideropinion bot demo" class="demo-img">
</a>
<a href="https://join.slack.com" target="_blank">
<div class="demo-box-try">
<span class="demo-text">
View ffmpeg_gif_to_webm
ffmpeg -i <input gif> -c vp9 -b:v 0 -crf 41 -vf scale=900x376 <output webm video>
You can’t perform that action at this time.