Skip to content

Instantly share code, notes, and snippets.

View Cartmanishere's full-sized avatar
💻

Pranav Gajjewar Cartmanishere

💻
View GitHub Profile
@Cartmanishere
Cartmanishere / command.sh
Created November 1, 2019 10:50
Command to generate language interface files for grpc-python-golang example
# For Python
python -m grpc_tools.protoc -I. --python_out=./python --grpc_python_out=./python nltk_service.proto
# For Golang
protoc -I. nltk_service.proto --go_out=plugins=grpc:golang
@Cartmanishere
Cartmanishere / server.py
Created November 1, 2019 10:47
Python server implementation for grpc-python-golang example
def serve(port):
server = grpc.server(futures.ThreadPoolExecutor(max_workers=10))
add_KeywordServiceServicer_to_server(
NltkService(), server)
server.add_insecure_port('[::]:' + str(port))
server.start()
print("Listening on port {}..".format(port))
try:
while True:
time.sleep(10000)
@Cartmanishere
Cartmanishere / server.py
Created November 1, 2019 10:43
Python server implementation for grpc-python-golang example
from nltk_service_pb2 import *
from nltk_service_pb2_grpc import *
import grpc
import nltk
from concurrent import futures
from nltk.corpus import stopwords
class NltkService(KeywordServiceServicer):
@Cartmanishere
Cartmanishere / nltk_service.proto
Created November 1, 2019 10:39
Protobuf definition file for grpc-python-golang example
syntax = "proto3";
message Request {
string text = 1;
}
message Response {
repeated string keywords = 1;
}
@Cartmanishere
Cartmanishere / continuous_perceptron.py
Last active November 21, 2020 11:44
Learning of a Continuous Perceptron as described in the book - 'Introduction to Artificial Neural Networks' by Jacek M. Zurada
"""
This is an implmentation of a Continuous Perceptron trained using Delta Learning Rule or Backpropagation.
It is based on the description of the same as given in the book -
'Introduction to Artificial Neural Networks' by Jackek M. Zurada
Date: July ‎16, ‎2018
Author: Pranav Gajjewar
Course: Artifical Neural Networks
The following work was done while studying as an undergraduate at SGGSIE&T, Nanded.
@Cartmanishere
Cartmanishere / squares.go
Created May 16, 2019 02:46
Calculate the sum of squares of positive numbers in golang without using for statement
package main
import (
"bufio"
"fmt"
"os"
"strconv"
"strings"
)