Skip to content

Instantly share code, notes, and snippets.

View varunchaudharycs's full-sized avatar
:octocat:
Looking for Fall 2020 Co-op SDE roles

Varun Chaudhary varunchaudharycs

:octocat:
Looking for Fall 2020 Co-op SDE roles
  • Arizona State University
  • Tempe, Arizona
View GitHub Profile
#!/bin/bash
# Removes old revisions of snaps
# CLOSE ALL SNAPS BEFORE RUNNING THIS
set -eu
snap list --all | awk '/disabled/{print $1, $3}' |
while read snapname revision; do
snap remove "$snapname" --revision="$revision"
done
@varunchaudharycs
varunchaudharycs / flask_server
Last active November 8, 2020 00:52
Setup flask server(open endpoint)
# Steps to start server
# - Packages: flask, pyngrok, werkzeug
# - python server.py
# - Note HTTP URL: Tunnel_URL
# - hit GET endpoint for testing: <Tunnel_URL>/
# - hit POST endpoint for saving DB(attached file): <Tunnel_URL>/db
# - hit POST endpoint for getting contact graph: <Tunnel_URL>/contacts
from flask import request, Flask
from werkzeug.utils import secure_filename
create project
mvn clean install to create jar
install jar to target project directory:
mvn install:install-file \
-Dfile=<path-to-file> \
-DgroupId=<group-id> \
-DartifactId=<artifact-id> \
-Dversion=<version> \
-Dpackaging=<packaging> \
-DgeneratePom=true
IntelliJ -> New Project -> Spring Initializer
Group ID(uniquely identifies project with owned domian name)
Artifact ID: name of maven JAR
Add AspectJ dependencies in pom -> aspectjrt & aspectjweaver [Download entire JAR: https://www.eclipse.org/aspectj/downloads.php]
Change compiler for executing ".aj" files, Settings -> Build -> Compiler -> Java Compiler -> Choose "Ajc" -> Give the downloaded apectjtools.jar path
RUN
Google Chrome
VLC
Intellij
Pycharm
Sublime
Java
Anaconda
Maven
MySQL
Timeshift
import requests
import os
import json
import time
import csv
from MetaMapWrapper import MetaMapWrapper
def removeNonAscii(s): return "".join(filter(lambda x: ord(x)<128, s))
from pymetamap import MetaMap
class umls_metamap_wrapper(object):
mm = MetaMap.get_instance('/<path to>/public_mm/bin/metamap18')
def __init__(self):
pass
def annotate(self, text):
Drivers(MoBo/GPU)
VLC
Java
CPU-Z
GPU-Z
Foxit
Slack
Discord
Zoom
IntelliJ
1. Navigate to: https://developer.twitter.com/en/apps
2. Create app
3. Fill details
4. important auth
consumerKey
consumerSecret
accessTokenKey
accessTokenSecret
# Follow - https://medium.com/google-cloud/how-to-run-deep-learning-models-on-google-cloud-platform-in-6-steps-4950a57acfa5
Create GCP account
Setup Project
Search and deploy "Deep Learning VM"
Select Resources
Increase GPU quota from 0 to 1. Quotas page -> Upgrade account -> Edit quotas -> Submit request
Deploy
In GCP dashground, select project -> compute engine -> SSH into browser window
By default directory structure - /home/<google id>/
Setup pre-requisites