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
| 'use strict'; | |
| class MethodBindingTest { | |
| constructor() { | |
| this.x = 5; | |
| // Bind this method | |
| this.boundPrintX = this.boundPrintX.bind(this); | |
| } |
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
| import sqlalchemy as sa | |
| from sqlalchemy.ext.declarative import declarative_base | |
| from sqlalchemy.orm import scoped_session, sessionmaker, relationship | |
| from sqlalchemy.ext.hybrid import hybrid_property | |
| from marshmallow_sqlalchemy import ModelSchema | |
| engine = sa.create_engine('sqlite:///:memory:') | |
| session = scoped_session(sessionmaker(bind=engine)) | |
| Base = declarative_base() |
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
| import sqlalchemy as sa | |
| from sqlalchemy.ext.declarative import declarative_base | |
| from sqlalchemy.orm import scoped_session, sessionmaker, relationship | |
| from sqlalchemy.ext.hybrid import hybrid_property | |
| from marshmallow_sqlalchemy import ModelSchema | |
| engine = sa.create_engine('sqlite:///:memory:') | |
| session = scoped_session(sessionmaker(bind=engine)) | |
| Base = declarative_base() |
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 Integer | |
| from sqlalchemy import Column | |
| from sqlalchemy import String | |
| from sqlalchemy import ForeignKey | |
| from sqlalchemy import create_engine | |
| from sqlalchemy.orm import sessionmaker, relationship | |
| from sqlalchemy.ext.declarative import declarative_base | |
| import colander |
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 Integer | |
| from sqlalchemy import Column | |
| from sqlalchemy import String | |
| from sqlalchemy import ForeignKey | |
| from sqlalchemy import create_engine | |
| from sqlalchemy.orm import sessionmaker, relationship | |
| from sqlalchemy.ext.declarative import declarative_base | |
| import colander |
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
| import boto3 | |
| from botocore.exceptions import ClientError | |
| import hashlib | |
| import os | |
| import errno | |
| def mkdir_p(path): | |
| try: | |
| os.makedirs(path) |
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.ext.declarative import declarative_base | |
| from sqlalchemy.orm import Session, relationship, backref, sessionmaker | |
| from sqlalchemy import create_engine, Column, String, Integer | |
| from sqlalchemy.schema import ForeignKey | |
| Base = declarative_base() | |
| class Object(Base): | |
| """ Object ORM """ |
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.ext.declarative import declarative_base | |
| from sqlalchemy.orm import Session, relationship, backref, sessionmaker | |
| from sqlalchemy import create_engine, Column, String, Integer | |
| from sqlalchemy.schema import ForeignKey | |
| Base = declarative_base() | |
| class Object(Base): | |
| """ Object ORM """ |
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.ext.declarative import declarative_base | |
| from sqlalchemy.orm import Session, relationship, backref, sessionmaker | |
| from sqlalchemy import create_engine, Column, String, Integer | |
| from sqlalchemy.schema import ForeignKey | |
| Base = declarative_base() | |
| ################# START Working Example | |
| class A(Base): | |
| __tablename__ = 'a' |
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
| [alias] | |
| lg1 = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all | |
| lg2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all | |
| lg = !"git lg1" |