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
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
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
<?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
{"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
// 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
<?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
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- | |
This file is part of GtkSourceView | |
Copyright (C) 2006-2007 GtkSourceView team | |
Author: Yevgen Muntyan <[email protected]> | |
GtkSourceView is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Lesser General Public |
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
$ yarn list | |
yarn list v1.1.0 | |
├─ @types/[email protected] | |
│ └─ @types/node@* | |
├─ @types/[email protected] | |
│ ├─ @types/minimatch@* | |
│ ├─ @types/[email protected] | |
│ └─ @types/node@* | |
├─ @types/[email protected] | |
├─ @types/[email protected] |
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
/** | |
* Custom event manager, which allows to add event listeners outside of Angular | |
* zone. | |
* | |
* See https://stackoverflow.com/a/45229997/1377864 for original idea | |
*/ | |
@Injectable() | |
export class CustomEventManager extends EventManager { | |
addGlobalEventListener(target: string, eventName: string, handler: Function): Function { | |
if (eventName.endsWith(NO_ZONE)) { |