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
// This program is free software: you can redistribute it and/or modify | |
// it under the terms of the GNU General Public License as published by | |
// the Free Software Foundation, either version 3 of the License, or | |
// (at your option) any later version. | |
// | |
// This program is distributed in the hope that it will be useful, | |
// but WITHOUT ANY WARRANTY; without even the implied warranty of | |
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
// GNU General Public License for more details. |
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
package sparkfire.lines.game; | |
import sparkfire.lines.actors.GameNode; | |
import sparkfire.lines.actors.GameWall; | |
import com.badlogic.gdx.Gdx; | |
/** | |
* Contains conversion functions for locations of in-game objects, such as | |
* {@link GameNode} and {@link GameWall} objects. |
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
diff --git a/scripts/commonscat.py b/scripts/commonscat.py | |
new file mode 100755 | |
index 0000000..064ba72 | |
--- /dev/null | |
+++ b/scripts/commonscat.py | |
@@ -0,0 +1,631 @@ | |
+#!/usr/bin/python | |
+# -*- coding: utf-8 -*- | |
+""" | |
+With this tool you can add the template {{commonscat}} to categories. |
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 | |
# -*- coding: utf-8 -*- | |
""" | |
Simple, crude tests for Claim's removeSources() method. | |
Tests are run on Wikidata's sandbox. | |
Allen Guo <Guoguo12@gmail.com> | |
November 2013 | |
""" |
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
# The test item used is Wikidata's sandbox item, Q4115189. | |
$ python pwb.py claimit -page:"Wikipedia:Wikidata/Wikidata Sandbox" P246 "Test string" | |
Processing [[en:Wikipedia:Wikidata/Wikidata Sandbox]] | |
Skipping P246 because claim with same property already exists | |
Use the -exists:p option to override this behavior | |
$ python pwb.py claimit -page:"Wikipedia:Wikidata/Wikidata Sandbox" P246 "Test string" -exists:p | |
'exists' argument set to 'p' | |
Processing [[en:Wikipedia:Wikidata/Wikidata Sandbox]] |
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
def listsEqual(list1, list2): | |
""" | |
Returns true if the lists are probably equal, ignoring order. | |
Works for lists of unhashable items (like dictionaries). | |
""" | |
if len(list1) != len(list2): | |
return False | |
if sorted(list1) != sorted(list2): | |
return False | |
for item in list1: |
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/env python | |
import requests | |
from bs4 import BeautifulSoup | |
import urllib | |
USERNAME = 'username' | |
PASSWORD = 'password' | |
example_payload_1 = {'action': 'setnotificationtimestamp', 'format': 'xml', 'entirewatchlist': ''} |
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
skipped "" | |
clarified "range of numbers" -> "string" | |
clarified "item / string" -> "item" | |
skipped "unsure- to be disscussed. (probably boolean or instance of type)" | |
clarified "string (actually integer: number of meters)" -> "number" | |
clarified "monolingual text (or item?)" -> "monolingual text" | |
clarified "item (quantity)" -> "number" | |
skipped "iri" | |
clarified "geo-coordinate" -> "coordinate" | |
clarified "value" -> "string" |
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/env python | |
""" | |
property_proposals_stats.py: Tabulates and exports statistics for proposed Wikidata properties. | |
Dependencies: | |
* Python (2.x) | |
* Requests (http://docs.python-requests.org/en/latest/) | |
Instructions: |
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 requests | |
HEADERS = {'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36'} | |
LOGIN_URL = 'https://www.edline.net/InterstitialLogin.page' | |
LOGIN_POST_URL = 'https://www.edline.net/post/InterstitialLogin.page' | |
class Edline(object): |
OlderNewer