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
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- | |
This file is based on the javascript.lang file of GtkSourceView. | |
It has additional Typescript keywords defined. | |
Author: Johannes Bergmann | |
Copyright (C) 2014 Johannes Bergmann | |
### |
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
// It demonstrates, that instead of explicitly adding `done()` callbacks everywhere you can return Promise from method. | |
// | |
// Expected output: | |
// $ ./node_modules/.bin/_mocha test.js | |
// | |
// | |
// tide retriever | |
// 1) should retrieve and parse tide CSV data | |
// 2) should retrieve and parse tide CSV data | |
// |
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
{"seq":0,"type":"response","command":"ideChangeFiles","request_seq":36,"success":true,"body":"done"} | |
{"seq":0,"type":"response","command":"ideGetErr","request_seq":37,"success":true,"body":{"infos":[{"file":"/Users/devoto13/Softwerk/SD10/Projects/devapp/src/app/shared/toaster/toaster.service.ts","diagnostics":[]}]}} | |
{"seq":0,"type":"response","command":"ideChangeFiles","request_seq":38,"success":true,"body":"done"} | |
{"seq":0,"type":"response","command":"ideCompletions","request_seq":39,"success":true,"body":[{"name":"applicationRef","kindModifiers":"private","kind":"property","displayParts":[{"text":"(","kind":"punctuation"},{"text":"property","kind":"text"},{"text":")","kind":"punctuation"},{"text":" ","kind":"space"},{"text":"ToasterService","kind":"className"},{"text":".","kind":"punctuation"},{"text":"applicationRef","kind":"propertyName"},{"text":":","kind":"punctuation"},{"text":" ","kind":"space"},{"text":"ApplicationRef","kind":"aliasName"}],"documentation":[],"sortText":"0"},{"name":"componentFactoryR |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>name</key> | |
<string>TypeScript Indent</string> | |
<key>scope</key> | |
<string>source.ts, source.tsx</string> | |
<key>settings</key> | |
<dict> |
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
In [2]: class Test(object): | |
def __setattr__(self, name, value): | |
print(name, "changed to", value) | |
super().__setattr__(name, value) | |
...: | |
In [3]: t = Test() | |
In [4]: t.name = 4 | |
name changed to 4 |
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
from sqlalchemy import create_engine | |
from sqlalchemy.ext.declarative import declarative_base | |
from sqlalchemy.orm import scoped_session | |
from sqlalchemy.orm import sessionmaker | |
Base = declarative_base() | |
# Define models here | |
engine = create_engine('sqlite:///:memory:', echo=True) |
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
{'authors': [{'biography': {'body': '', | |
'changed': '', | |
'created': '', | |
'images': {'alt': '', | |
'caption': '', | |
'credit': '', | |
'formats': [{'code': 'original', | |
'url': 'http://scd.france24.com/en/files/author_pictures/francois_picard.jpg'}], | |
'infos_title': '', | |
'url': ''}, |
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
Internal Server Error: /v0.5/channels/1/posts/ | |
Traceback (most recent call last): | |
File "/usr/local/lib/python3.4/dist-packages/django/core/handlers/base.py", line 111, in get_response | |
response = wrapped_callback(request, *callback_args, **callback_kwargs) | |
File "/usr/local/lib/python3.4/dist-packages/django/views/decorators/csrf.py", line 57, in wrapped_view | |
return view_func(*args, **kwargs) | |
File "/usr/local/lib/python3.4/dist-packages/rest_framework/viewsets.py", line 87, in view | |
return self.dispatch(request, *args, **kwargs) | |
File "/usr/local/lib/python3.4/dist-packages/rest_framework/views.py", line 466, in dispatch | |
response = self.handle_exception(exc) |
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 hatch(): | |
sleep_time = 1.0 / self.hatch_rate | |
while True: | |
if not bucket: | |
if sum(occurrence_count.values()) < spawn_count: | |
gevent.sleep(0.5) | |
continue | |
else: | |
logger.info("All locusts hatched: %s" % ", ".join( | |
["%s: %d" % (name, count) for name, count in occurrence_count.iteritems()])) |
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 set_title(self, title: str=None): | |
self.title = title |