Skip to content

Instantly share code, notes, and snippets.

We can make this file beautiful and searchable if this error is corrected: Illegal quoting in line 6.
import vobject
import csv
import sys
# total arguments
n = len(sys.argv)
print("Total arguments passed:", n)
# Arguments passed
print("\nName of Python script:", sys.argv[0])
import vobject
import csv
with open('sample.csv', mode='w') as csv_out:
csv_writer = csv.writer(csv_out, delimiter=',', quotechar='"', quoting=csv.QUOTE_MINIMAL)
csv_writer.writerow(['WHAT', 'WHO', 'FROM', 'TO', 'DESCRIPTION'])
# read the data from the file
data = open("sample.ics").read()
@ankita-kumari
ankita-kumari / languagetool-server-error
Created May 13, 2015 14:50
Error that I get when trying to run the HTTP server in LanguageTool.
ankita @ Vhagar ~/Codes/languagetool-test/languagetool-clean/languagetool/languagetool-server/target $ java -cp languagetool-server-3.0-SNAPSHOT.jar org.languagetool.server.HTTPServer --port 8081
WARNING: running in HTTP mode, consider using SSL by running org.languagetool.server.HTTPSServer instead
Exception in thread "main" java.lang.NoClassDefFoundError: org/languagetool/language/LanguageIdentifier
at org.languagetool.server.LanguageToolHttpHandler.<init>(LanguageToolHttpHandler.java:84)
at org.languagetool.server.HTTPServer.<init>(HTTPServer.java:99)
at org.languagetool.server.HTTPServer.main(HTTPServer.java:144)
Caused by: java.lang.ClassNotFoundException: org.languagetool.language.LanguageIdentifier
at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.security.AccessController.doPrivileged(Native Method)
@ankita-kumari
ankita-kumari / mongodb.md
Created November 4, 2015 17:35 — forked from artieziff/mongodb.md
MongoDb & Python Essentials

##MONGODB & PYTHON

###Ubuntu Install

sudo apt-get install mongodb
pip install pymongo

Table - Collection
Column - Property
Row - Document

@ankita-kumari
ankita-kumari / introrx.md
Created October 28, 2015 07:53 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@ankita-kumari
ankita-kumari / .gitignore
Last active August 29, 2015 14:26 — forked from adamgit/.gitignore
.gitignore file for Xcode4 / OS X Source projects
#########################
# .gitignore file for Xcode4 and Xcode5 Source projects
#
# Apple bugs, waiting for Apple to fix/respond:
#
# 15564624 - what does the xccheckout file in Xcode5 do? Where's the documentation?
#
# Version 2.5
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects
#

Sublime Text 2 – Useful Shortcuts (PC)

Loosely ordered with the commands used most towards the top. Sublime also offer full documentation.

Editing

Ctrl+⇧+K delete line
Ctrl+↩ insert line after
Ctrl+⇧+↩ insert line before
Ctrl+⇧+↑ move line (or selection) up
<?xml version="1.0" encoding="UTF-8"?>
<matches software="LanguageTool" version="2.8" buildDate="2014-12-30 13:12">
<language shortname="en-US" name="English (US)"/>
<error fromy="0" fromx="0" toy="0" tox="1" ruleId="UPPERCASE_SENTENCE_START" msg="This sentence does not start with an uppercase letter" replacements="A" context="a simple test" contextoffset="0" offset="0" errorlength="1" category="Capitalization" locqualityissuetype="typographical"/>
</matches>
@ankita-kumari
ankita-kumari / diable-remove-button
Created March 25, 2015 18:45
This leads to the button to become disabled when the page is rendered but with subsequent additions it does not become clickable.
ve.ui.MWTransclusionDialog.prototype.getPageFromPart = function ( part ) {
var page = ve.ui.MWTransclusionDialog.super.prototype.getPageFromPart.call( this, part );
if ( !page && part instanceof ve.dm.MWTransclusionContentModel ) {
return new ve.ui.MWTransclusionContentPage( part, part.getId(), { $: this.$ } );
}
var parts = this.transclusionModel.getParts();
if(parts.length === 1 && part instanceof ve.dm.MWTemplatePlaceholderModel)
{
page.removeButton.setDisabled( true );
}
#changes to allow ssh for git
Host github.com
Hostname ssh.github.com
Port 443
Host gerrit.wikimedia.org
Hostname ssh.gerrit.wikimedia.org
Port 29418
User ankita-kumari
TCPKeepAlive yes
IdentityFile "/Users/Vhagar/.ssh/id_rsa"