Skip to content

Instantly share code, notes, and snippets.

View vanangamudi's full-sized avatar

Pa Mu Selvakumar vanangamudi

View GitHub Profile
@vanangamudi
vanangamudi / conver-data-to-csv.ipynb
Created January 3, 2024 06:28
ModuleNotFoundError: No module named 'pandas'. where as shell command within cells can import it
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@vanangamudi
vanangamudi / ta_re.org
Last active April 9, 2022 15:58
proper regular expression engine for Tamil text

Proper regex engine for Tamil

There are still some corner cases to be ironed out as in anchors and special sequences cases. But this implementation is is useful enough for basic text processing.

vanangamudi@karunthulai:~/agam/projects/code/tamilnlp/tamil-regex
$ python3 ta_re.py
தமிழ், தமிழ் == தமிழ்
தமிழ், உயர்தனிச்செம்மொழி தமிழ் == தமிழ்
த*மிழ், தததததததமிழ் == தததததததமிழ்
Matched Expected Mismatch
கடி குல் கடி
கழி குழை கழி
கலி குறை கலி
கலை சிலை கலை
கா குறி கா
கோடு குரு கோடு
குல் சிறை சேர்
சேர் குடி சரி
சரி குடை கை
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@vanangamudi
vanangamudi / lispchain.lisp
Created April 2, 2020 13:38 — forked from BusFactor1Inc/lispchain.lisp
Lispchain - a blockchain implementation (sketch) in Common Lisp
;;
;; scheme coin - a lispchain (aka blockchain) implementation
;;
;; Burton Samograd
;; burton.samograd@gmail.com
;; Copyright - 2017
;;
;; Interested in helping out with the code? Email me.
;;
;; Bitcoin: 1HzWXjoQjzdLBm1eKeuWFrZx96kiop5GGy
@vanangamudi
vanangamudi / lobsters-mastodon.lisp
Created February 29, 2020 18:45 — forked from gkbrk/lobsters-mastodon.lisp
Common lisp Mastodon bot
(ql:quickload :drakma)
(ql:quickload :cl-json)
(ql:quickload :plump)
(ql:quickload :babel)
(ql:quickload :tooter)
(ql:quickload :split-sequence)
(defvar *feed-path* "https://lobste.rs/rss")
(setf drakma:*drakma-default-external-format* :UTF-8)
@vanangamudi
vanangamudi / spacemacs-keybindings.md
Last active February 13, 2020 09:11 — forked from rnwolf/spacemacs-keybindings.md
spacemacs keybindings that i need to learn
@vanangamudi
vanangamudi / regex-engine.py
Created January 31, 2019 08:53 — forked from theSage21/regex-engine.py
A very simple regular expression engine for learning purposes
# Define some special things
SPECIAL = '*|'
ALPHABET = '10'
EPSILON = None
# functions
def automaton_print(automaton):
"Neatly prints the automaton"
states, alphabet, start, final, transfer = automaton
print('STATES : ', states)
Long question. Please bear with me.
Three entities. Server, User, Tracker(borrowing from bittorrent)/Broker. Servers are consumer computers. Users can be anyone and gain service from server via desktop/mobile application. For a concrete example, lets take the data tagging for machine algorithms. A user needs to look at bunch of samples and classify them into well, a class. Images can be tagged to be dogs or cats or text can be tagged as positive or negative reviews.
Server, contain these data that are to be tagged. The problem is server and users cannot stay online 24/7. Tracker/Broker can. So the users can request a batch of samples for tagging. This request is recorded by the tracker. And when server comes online, it will query for two things.
1. Has anyone requested for new batch?
2. Has anyone uploaded tagged data?
python predict.py
/home/suriyadeepan/saama/Paper-Implementations/Entity-Relation-Extraction/env/erext/lib/python3.5/site-packages/nltk/tag/stanford.py:149: DeprecationWarning:
The StanfordTokenizer will be deprecated in version 3.2.5.
Please use nltk.tag.corenlp.CoreNLPPOSTagger or nltk.tag.corenlp.CoreNLPNERTagger instead.
super(StanfordPOSTagger, self).__init__(*args, **kwargs)
type your sequence>> A 44-year-old man taking naproxen for chronic low back pain and a 20-year-old woman on oxaprozin for rheumatoid arthritis presented with tense bullae and cutaneous fragility on the face and the back of the hands.|oxaprozin
type your sequence>>
built 1 datapoints so far
:: loading vocabulary from disk
2017-11-13 19:13:01.537157: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.