This file contains hidden or 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
| #include<stdio.h> | |
| #include<string.h> | |
| void main () { | |
| int t, k[10],i,z,len[0]; | |
| char s[10][50]; | |
| scanf("%d",&t); | |
| for(i=0;i<=t-1;i++){ | |
| scanf("%s",&s[i]); scanf("%d",&k[i]); | |
| } | |
| // k-errorpairedcode should be found for each string |
This file contains hidden or 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
| # Script to get all xkcd comic pics | |
| import urllib2 | |
| tits={} | |
| def zeropad(i): | |
| plen=3-len(str(i)) | |
| pstr='' | |
| j=0 | |
| while(j<plen): |
This file contains hidden or 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
| #!/bin/sh | |
| # Bash dent function. | |
| function dent () { | |
| curl -s -u user:passwd \ | |
| -d status="$1" \ | |
| "http://identi.ca/api/statuses/update.xml"; | |
| } | |
| # Examples: |
This file contains hidden or 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
| # code that powers http://identi.ca/brightnessjokebot (crontab entry) | |
| 30 11 2,8,14,20,27 * * curl -s -u brightnessjokebot:passwd -d status="Don't you wish there was a knob on the TV to turn up the intelligence? There's one marked 'Brightness,' but it doesn't work." "http://identi.ca/api/statuses/update.xml" > /home/shashi/Code/identica/log/brightnessbot.log |
This file contains hidden or 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
| # python script to back-up all your identica notices. | |
| import json, urllib2 | |
| import time | |
| user = 'user' | |
| day = '' | |
| f = open ('identica-'+user+'.bak', 'a', 1) | |
| for i in range(1,1000): | |
| j = json.loads(urllib2.urlopen('https://identi.ca/api/statuses/user_timeline/'+user+'.json?page='+str(i)).read()) |
This file contains hidden or 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
| # Python Script to block spammy subscribers from your identi.ca account. | |
| # bug me: identi.ca/g0 | |
| import json | |
| import sys | |
| import urllib2 | |
| apipath = 'http://identi.ca/api' | |
| username = raw_input('Your username: ') | |
| password = raw_input('Your password: ') |
This file contains hidden or 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
| // Copyright 2009 Google Inc. All Rights Reserved. | |
| package com.google.appinventor.components.runtime; | |
| import com.google.appinventor.components.annotations.DesignerComponent; | |
| import com.google.appinventor.components.annotations.DesignerProperty; | |
| import com.google.appinventor.components.annotations.PropertyCategory; | |
| import com.google.appinventor.components.annotations.SimpleEvent; | |
| import com.google.appinventor.components.annotations.SimpleFunction; | |
| import com.google.appinventor.components.annotations.SimpleObject; |
This file contains hidden or 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
| // Copyright 2009 Google Inc. All Rights Reserved. | |
| package com.google.appinventor.components.runtime; | |
| import com.google.appinventor.components.annotations.DesignerComponent; | |
| import com.google.appinventor.components.annotations.DesignerProperty; | |
| import com.google.appinventor.components.annotations.PropertyCategory; | |
| import com.google.appinventor.components.annotations.SimpleEvent; | |
| import com.google.appinventor.components.annotations.SimpleFunction; | |
| import com.google.appinventor.components.annotations.SimpleObject; |
This file contains hidden or 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
| /* CSS declarations go here */ | |
| .wrapper { | |
| width: 960px; | |
| margin: 10px auto; | |
| } | |
| ul { | |
| list-style: none; | |
| } |
This file contains hidden or 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
| def remove_comments(line, pref="", ctx=None, escape=False): | |
| if line == "": return pref | |
| if ctx == "#" and line[0] != '\n': | |
| return remove_comments(line[1:], pref, ctx) | |
| if not ctx: | |
| if line[0] == "#": return remove_comments(line[1:], pref, '#') | |
| for c in ['"""', '"', "'"]: | |
| if line.startswith(c): | |
| # open context | |
| return remove_comments(line[len(c):], pref + c, c) |