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
class YoutubeDL(protocol.Protocol): | |
global connection | |
global channel | |
def __init__(self, title): | |
self.title = title | |
self.data = "" | |
global connection |
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
Kiip.getInstance().saveLeaderboard(id, score, listener); | |
RequestListener<Resource> listener = new RequestListener<Resource>() { | |
@Override | |
public void onError(Kiip manager, KiipException error) { | |
Log.e(TAG, "onError!"); | |
Log.e(TAG, error.toString()); | |
} |
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
- (void) manager:(KPManager*)manager didUpdateLeaderboard:(NSDictionary*)resource { | |
/** | |
* Note: By overriding this method, we must call presentReward ourselves. | |
*/ | |
NSLog(@"Delegate: didUpdateLeaderboard: %@", resource); | |
if(resource != nil) { | |
NSString *message; | |
[resources addObject:resource]; | |
if(viewController.toggleAction.on) { | |
message = [resource objectForKey:@"message"]; |
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
➜ python-sdk ls | |
__init__.py doc foo.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
Documentation for the Code | |
************************** | |
TEST LALALALALALALA | |
.. automodule:: python-sdk | |
:members: | |
:inherited-members: | |
:show-inheritance: |
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 bootstrap | |
from models import Device | |
import logging | |
logger = logging.getlogger(__name__) | |
from threadpool import ThreadPool | |
def run(): | |
f = open('device_id.txt') | |
output = open('/tmp/out.txt', 'w') |
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 bootstrap | |
from models import Device | |
import logging | |
logger = logging.getlogger(__name__) | |
from threadpool import ThreadPool | |
def run(): | |
f = open('device_id.txt') | |
output = open('/tmp/out.txt', 'w') |
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
RiakError: "do not know how to handle type <type 'int'>" | |
2012-10-18 21:34:12,022 - kiip.model.query.Device - query:290 - ERROR - Backing store error! | |
Traceback (most recent call last): | |
File "/srv/kiip/lib/model/query.py", line 269, in _invoke_action | |
result = method_impl(*args, **kwargs) | |
File "/srv/kiip/lib/riakstore/query.py", line 174, in get_by_id | |
obj = self._bucket.get_binary(id, r=r) | |
File "/usr/local/etc/virtualenvs/kiip/local/lib/python2.7/site-packages/riak/bucket.py", line 275, in get_binary | |
return obj.reload(r) | |
File "/usr/local/etc/virtualenvs/kiip/local/lib/python2.7/site-packages/riak/riak_object.py", line 386, in reload |
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
# Building a tiny iOS App with Kiip | |
Some nonsense here, maybe a little story | |
## Creating your new XCode Project | |
1. Download XCode from the Apple App Store (if you haven't already). | |
2. Select the Single View Application template. We're going to keep it simple for now. | |
3. Enter in your personal information and product name, I'm going to go with `HelloPlanet`. | |
4. Save your new project. |
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
# Building a tiny iOS App with Kiip | |
Some nonsense here, maybe a little story | |
## Creating your new XCode Project | |
1. Download XCode from the Apple App Store (if you haven't already). | |
2. Select the Single View Application template. We're going to keep it simple for now. | |
3. Enter in your personal information and product name, I'm going to go with `HelloPlanet`. | |
4. Save your new project. |
OlderNewer