Skip to content

Instantly share code, notes, and snippets.

Managing incidents

Ramindu Deshapriya ramdesh

Managing incidents
View GitHub Profile
ramdesh /
Created Dec 8, 2020
Save and load Keras models to and from AWS S3
import s3fs
import zipfile
import tempfile
import numpy as np
from tensorflow import keras
from pathlib import Path
import logging
View .pre-commit-config.yaml
- repo:
rev: stable
- id: black
language_version: python3.6
- repo:
rev: v2.1.0
- id: trailing-whitespace
ramdesh / gdrive_img_url.js
Created Apr 2, 2018
GDrive view image sharing url
View gdrive_img_url.js
var url = "";
ramdesh / lambda_tg_bot_trigger.js
Created Mar 18, 2018
Lambda Telegram Trigger
View lambda_tg_bot_trigger.js
var http = require('https');
var AWS = require('aws-sdk');
exports.handler = (event, context) => {
var codecommit = new AWS.CodeCommit({ apiVersion: '2015-04-13' });
var baseUrl = "";
//Log the updated references from the event
var commits = event.Records[0]
ramdesh / vesuvius_t()_bash
Created Aug 20, 2012
Checking for strings in Sahana Vesuvius which haven't been enclosed in a _t() function
View vesuvius_t()_bash
grep -nr --include="*.php" "'" ~/vesuvius | grep -Ev "_t\(\"|_t\(\'|\[\"|\[\'|//|/\*|\*|\*/|SELECT|UPDATE|INSERT|DELETE|WHERE|VALUE|VALUES|ADD" >single-quote-greps.txt
grep -nr --include="*.php" '"' ~/vesuvius | grep -Ev "_t\(\"|_t\(\'|\[\"|\[\'|//|/\*|\*|\*/|SELECT|UPDATE|INSERT|DELETE|WHERE|VALUE|VALUES|ADD" >double-quote-greps.txt