Skip to content

Instantly share code, notes, and snippets.

View karthikeyan5's full-sized avatar
🏁
Get things done!

Karthikeyan S karthikeyan5

🏁
Get things done!
  • Tiruppur, India
  • 15:01 (UTC +05:30)
View GitHub Profile
@karthikeyan5
karthikeyan5 / README.md
Last active April 3, 2021 13:15
This script captures frames at a given interval from a supported live stream
  • This script captures frames at a given interval from a supported live stream.
  • Refer to Streamlink Plugins for supported live streams.

To run this script:

  • Install the python dependencies if not already there using pip install opencv-python streamlink
  • Run this script using python livestream_frame_capture.py <live_stream_url> --stream-quality best -ipf 8
<div style="border:0px solid #aaa; border-radius: 10px; border-collapse: collapse;" class="container-fluid">
<div class="row">
<div class="col-xs-7">
<div class="row">
<div class="col-xs-6" style="border-right:1px solid #ddd; padding: 0px 3px 0px 0px; font-size:95%;">
<small>Deliver to Address:</small>
<br><strong>{{doc.shipping_address_title}}</strong>
<br>{{doc.shipping_address}}
{% if "GSTIN:" not in doc.shipping_address %}
{% if doc.customer_gstin %}<br>GSTIN: {{ doc.customer_gstin }} {% endif -%}
@karthikeyan5
karthikeyan5 / Supplier_UID.js
Last active October 6, 2022 10:47
Collection of some Frappe framework custom script
// Here, Supplier DocType Contains a custom field (readonly) Called "UID".
// This feild is auto populated with the next number based on the highest UID in the supplier table.
frappe.ui.form.on("Supplier", {
validate: function(frm) {
if(frm.doc.__islocal == '1'){
frappe.db.get_list("Supplier", {fields:'uid', order_by:"uid desc",limit:1}).then((data) => {
frm.set_value("uid",String(parseInt(data[0].uid)+1).padStart(5,'0'));
});
}
@karthikeyan5
karthikeyan5 / extra_steps.md
Last active June 2, 2018 21:27
changes in installing frappe

execute the bellow file before installing bench

sudo apt-get install build-essential python-dev
sudo apt install supervisor
sudo apt install ngnix
sudo apt install fail2ban
@karthikeyan5
karthikeyan5 / GSTINValidator.java
Last active April 2, 2022 14:33
GSTIN Validator with checksum validation (Java,Python)
// from http://developer.gstsystem.co.in/apiportal/howToStart/download
package org.gst.poc.util;
import java.util.Scanner;
public class GSTINValidator {
public static final String GSTINFORMAT_REGEX = "[0-9]{2}[a-zA-Z]{5}[0-9]{4}[a-zA-Z]{1}[1-9A-Za-z]{1}[Z]{1}[0-9a-zA-Z]{1}";
public static final String GSTN_CODEPOINT_CHARS = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
public static void main(String args[]) {