This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/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 | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # 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 | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | 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 | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | 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 | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | Google Chrome | |
| VLC | |
| Intellij | |
| Pycharm | |
| Sublime | |
| Java | |
| Anaconda | |
| Maven | |
| MySQL | |
| Timeshift | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | 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)) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | 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): | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | Drivers(MoBo/GPU) | |
| VLC | |
| Java | |
| CPU-Z | |
| GPU-Z | |
| Foxit | |
| Slack | |
| Discord | |
| Zoom | |
| IntelliJ | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | 1. Navigate to: https://developer.twitter.com/en/apps | |
| 2. Create app | |
| 3. Fill details | |
| 4. important auth | |
| consumerKey | |
| consumerSecret | |
| accessTokenKey | |
| accessTokenSecret | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # 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 | 
NewerOlder