Skip to content

Instantly share code, notes, and snippets.

View DhruvParanjape's full-sized avatar

Dhruv Paranjape DhruvParanjape

View GitHub Profile
from nltk import word_tokenize, pos_tag
sentence = """
thank you for crying in the customer service my name is b glad to assist you how can help you to find yes my name is and i'm i have a beer tell and i i'm i hadn't seen the ladder on that said that on i get my direct deposit so that it sounds so i try to call social security to have me i'm all yes ma'am i'm here all okay i i've tried to call social security traps and yeah i'm insurrection pocket moves to a different house and a wall on the routing number and your cat on and that's how the number of the account which
"""
tokens = word_tokenize(sentence)
tokens=[token.lower() for token in tokens if token.isalpha()]
Q> a reader exists and a writer exists. the reader can read from 5 buckets. the writer can write to said 5 buckets. How would you solve
this problem in a manner that would allow the reader and writer to access buckets with minimum blocking time and no busy waiting.
Terms:
concurrency : allowing two processes or threads to access shared data simultaneously, issues to handle deadlock and data inconsistency.
deadlock: when a dependancy causes the processes that want to access data to wait for infinite time.
data inconsistency : when two processes access and change data the order of access causes one or both processes to get old data.
Hint :
read about threads, mutexes, and conditional_variables in c++.
2017-07-24 16:26:48,634 - ERROR - Error occurred while loading global extra conf /home/dpar/.config/nvim/.ycm_extra_conf.py
Traceback (most recent call last):
File "/home/dpar/.local/share/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/extra_conf_store.py", line 94, in _CallGlobalExtraConfMethod
module = Load( global_ycm_extra_conf, force = True )
File "/home/dpar/.local/share/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/extra_conf_store.py", line 173, in Load
module = LoadPythonSource( _RandomName(), module_file )
File "/home/dpar/.local/share/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/utils.py", line 400, in LoadPythonSource
return imp.load_source( name, pathname )
File "/home/dpar/.config/nvim/.ycm_extra_conf.py", line 5, in <module>
import ycm_core
@DhruvParanjape
DhruvParanjape / tags
Last active July 18, 2017 12:01
ctags file that broke youcompleteme
bms_AF help/terminator/en/whgdata/whlstf2.htm /^<nobr><a name="bms_AF"><\/a><a name="subkey_AF"><\/a>affecting <a href="..\/Terminator_Help\/Dashboard\/Notification_and_Static_Area.htm"><b>1<\/b><\/a> <a href="..\/Terminator_Help\/Identity_Management\/Internet_Quota.htm"><b>2<\/b><\/a> <\/nobr><br><nobr>after <a href="..\/Terminator_Help\/Dashboard\/Notification_and_Static_Area.htm"><b>1<\/b><\/a> <a href="..\/Terminator_Help\/Device_Management\/License_Details_and_Renew_License.htm"><b>2<\/b><\/a> <a href="..\/Terminator_Help\/Device_Management\/Updates.htm"><b>3<\/b><\/a> <a href="..\/Terminator_Help\/Identity_Management\/Authentication_Servers.htm"><b>4<\/b><\/a> <a href="..\/Terminator_Help\/Identity_Management\/Guest_User_Settings.htm"><b>5<\/b><\/a> <a href="..\/Terminator_Help\/Logs_and_Reports\/Updates.htm"><b>6<\/b><\/a> <a href="..\/Terminator_Help\/Network_Configuration\/DHCP.htm"><b>7<\/b><\/a> <a href="..\/Terminator_Help\/Network_Configuration\/DNS.htm"><b>8<\/b><\/a> <a href="..\/Terminator_Hel
serving on http://127.0.0.1:52263
2017-07-14 10:05:31,014 - INFO - Received ready request
2017-07-14 10:05:31,034 - INFO - Received event notification
2017-07-14 10:05:31,040 - INFO - Received event notification
2017-07-14 10:05:31,040 - INFO - Adding buffer identifiers for file: /home/dpar/qhutm2.0/source/qhconntrack_helper/qhconntrack_helper.cpp
2017-07-14 10:05:32,960 - ERROR - Unable to connect to server
Traceback (most recent call last):
File "/home/dpar/.local/share/nvim/plugged/YouCompleteMe/third_party/ycmd/third_party/requests/requests/packages/urllib3/connection.py", line 137, in _new_conn
(self.host, self.port), self.timeout, **extra_kw)
File "/home/dpar/.local/share/nvim/plugged/YouCompleteMe/third_party/ycmd/third_party/requests/requests/packages/urllib3/util/connection.py", line 91, in create_connection
raise err
File "/home/dpar/.local/share/nvim/plugged/YouCompleteMe/third_party/ycmd/third_party/requests/requests/packages/urllib3/util/connection.py", line 81, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
@DhruvParanjape
DhruvParanjape / tilix.log
Created April 25, 2017 13:14
Error building tilix-1.5.6
make DCFLAGS='-O -inline -release -version=StdLoggerDisableTrace' DC=dmd
Making all in data/appdata
make[1]: Entering directory `/home/dpar/Projects/tilix/tilix-1.5.6/data/appdata'
/usr/bin/msgfmt --xml -d ../../po --template=com.gexperts.Tilix.appdata.xml.in -o com.gexperts.Tilix.appdata.xml
make[1]: Leaving directory `/home/dpar/Projects/tilix/tilix-1.5.6/data/appdata'
Making all in data/icons
make[1]: Entering directory `/home/dpar/Projects/tilix/tilix-1.5.6/data/icons'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/dpar/Projects/tilix/tilix-1.5.6/data/icons'
Making all in data/pkg/desktop
@DhruvParanjape
DhruvParanjape / tilix.log
Created March 31, 2017 11:26
tilix compile time error
/usr/include/d/std/experimental/logger/core.d(487): Error: safe function 'std.experimental.logger.core.defaultLogFunction!cast(LogLevel)cast(ubyte)128u.defaultLogFunction!(48, "source/app.d", "app.main", "int app.main(string[] args)", "app", string, Exception).defaultLogFunction' cannot call system function 'std.experimental.logger.core.Logger.memLogFunctions!cast(LogLevel)cast(ubyte)128u.logImpl!(48, "source/app.d", "app.main", "int app.main(string[] args)", "app", string, Exception).logImpl'
source/app.d(48): Error: template instance std.experimental.logger.core.defaultLogFunction!cast(LogLevel)cast(ubyte)128u.defaultLogFunction!(48, "source/app.d", "app.main", "int app.main(string[] args)", "app", string, Exception) error instantiating
/usr/include/d/std/experimental/logger/core.d(487): Error: safe function 'std.experimental.logger.core.defaultLogFunction!cast(LogLevel)cast(ubyte)128u.defaultLogFunction!(1315, "source/gx/tilix/appwindow.d", "gx.tilix.appwindow.AppWindow.loadSession", "void gx.tilix.appwind
[dpar@localhost qhbuild]$ cpack -G RPM
CPack: Create package using RPM
CPack: Install projects
CPack: - Run preinstall target for: MySQL
CPack: - Install project: MySQL
CPack: Create package
CPackRPM: Will use GENERATED spec file: /home/dpar/Projects/mysql/mysql-5.6/qhbuild/_CPack_Packages/Linux/RPM/SPECS/mysql.spec
CPackRPM:Debug: You may consult rpmbuild logs in:
CPackRPM:Debug: - /home/dpar/Projects/mysql/mysql-5.6/qhbuild/_CPack_Packages/Linux/RPM/rpmbuild.err
CPackRPM:Debug: *** + umask 022