Skip to content

Instantly share code, notes, and snippets.

View yardstick17's full-sized avatar
🐢

Amit Kushwaha yardstick17

🐢
View GitHub Profile
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle">
<channel>
<title>Debt Now App - Appcast</title>
<item>
<title>Version 0.9.96</title>
<description>Minor updates and improvements.</description>
<pubDate>Sun, 26 March 2023 12:00:00 +0000</pubDate>
<enclosure url="https://play.google.com/store/apps/details?id=com.essence.welinq" sparkle:version="0.9.96" sparkle:os="android" />
</item>
@yardstick17
yardstick17 / spp_deep_network.py
Last active November 25, 2023 23:46
Spatial pyramid pooling (SPP) is a pooling strategy to result in an output of fixed size. It will turn a 2D input of arbitrary size into an output of fixed dimension. Hence, the convolutional part of a DNN can be connected to a dense part with a fixed number of nodes even if the dimensions of the input image are unknown.
CUSTOM_OUTPUT_CATEGORIES = 2
import keras.backend as K
from keras.engine.topology import Layer
class SpatialPyramidPooling(Layer):
'''Spatial pyramid pooling layer for 2D inputs.
See Spatial Pyramid Pooling in Deep Convolutional Networks for Visual Recognition,
K. He, X. Zhang, S. Ren, J. Sun
# Arguments
@yardstick17
yardstick17 / parse_absa_2015_restaurant_data.py
Last active August 14, 2017 17:21
Script to parse SemEval 2015 Restaurant Data
import json
from xml.dom import minidom
def read_absa_2015_restaurant_xml(filename):
"""
:param filename:
:return:
"""
DOMTree = minidom.parse(filename)
@yardstick17
yardstick17 / zomato_bookmarklet.js
Last active March 18, 2017 09:52 — forked from ylogx/zomato_bookmarklet.js
A bookmarklet experiment to find various zomato resource properties
javascript:(function(){
var msg = '';
try {
msg += '\nRes_id: ' + RES_ID;
} catch(err) {
console.log(err)
}
try {
city_id = CITY_ID;
msg += '\ncity_id: ' + city_id;
unbind C-b
set -g prefix \ # or `
bind-key \ send-prefix # Without this forget backtick forever (in tmux)
# Turn on mouse mode - enables scrolling etc.
#set -g mouse on
set -g mode-mouse on
set -g mouse-resize-pane on
set -g mouse-select-pane on
set -g mouse-select-window on
@yardstick17
yardstick17 / caverphone.py
Created January 5, 2017 04:37
Phonetic Algorithm
import re
def metaphone(term):
"returns metaphone code for a given string"
# implementation of the original algorithm from Lawrence Philips
# extended/rewritten by M. Kuhn
# improvements with thanks to John Machin <sjmachin@lexicon.net>