This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public myFirstCodeSnippet | |
{ | |
string Test {get; set;} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# List all of the notebooks in the user's account | |
notebooks = noteStore.listNotebooks(authToken) | |
print("Found ", len(notebooks), " notebooks:") | |
for notebook in notebooks: | |
print(" * ", notebook.name) | |
filter = NoteStore.NoteFilter() | |
filter.notebookGuid = notebook.guid | |
noteList = noteStore.findNotes(authToken, filter, 0, 50) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f = open(n.title+".html", "w+", encoding='utf-8-sig') | |
f.write(content) | |
f.close() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# A simple Evernote API demo script that lists all notebooks in the user's | |
# account and creates a simple test note in the default notebook. | |
# | |
# Before running this sample, you must fill in your Evernote developer token. | |
# | |
# To run (Unix): | |
# export PYTHONPATH=../lib; python EDAMTest.py | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import string | |
from datetime import datetime | |
from flask import url_for | |
from flask.ext.xmlrpc import XMLRPCHandler, Fault | |
from labs import app, db | |
from labs.models import User, Post, Tag, Category | |
# MetaWeblogAPI XML-RPC | |
handler = XMLRPCHandler('api') | |
handler.connect(app, '/api') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
"""" | |
Copyright 2008 Ritesh Nadhani. All Rights Reserved. | |
For license information please check the LICENSE page of the package. | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import cgi, cgitb | |
# Uncomment this to view errors | |
# cgitb.enable() | |
import urlparse | |
import urllib | |
import sys | |
import oauth2 as oauth |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#create blog category by tags | |
tagslist = noteStore.listTagsByNotebook(authToken, notebook.guid) | |
categories = convertTags2Category(tagslist) | |
try: | |
for c in categories: | |
metaweblog.new_category(c) | |
except Exception as err: | |
print("Create category failed: ", err) | |
finally: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Use this utility to access CSDN blog. | |
#Author: jiangong li | |
#Email: Jgli_2008@sina.com | |
import base64 | |
from http import cookiejar | |
import urllib.request, urllib.parse, urllib.error | |
#url for accessing | |
csdnLoginUrl = r"http://passport.csdn.net/ajax/accounthandler.ashx?" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import base64 | |
from http import cookiejar | |
import urllib.request, urllib.parse, urllib.error | |
url = "http://blog.csdn.net/muzizongheng" | |
en = urllib.parse.quote(url) | |
print(en) | |
de = urllib.parse.unquote(en) | |
print(de) |
OlderNewer