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 tweepy | |
# Install tweepy with `pip3 install tweepy` | |
# See https://realpython.com/twitter-bot-python-tweepy/ for info about how to generate credentials | |
consumer_key = '' | |
consumer_secret = '' | |
access_token = '' | |
access_token_secret = '' |
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
# factories | |
class CategoryFactory(factory.alchemy.SQLAlchemyModelFactory): | |
class Meta: | |
model = models.Category | |
sqlalchemy_session = db.session | |
sqlalchemy_session_persistence = 'commit' | |
name = factory.Sequence(lambda n: u'Category %d' % n) | |
class CompanyFactory(factory.alchemy.SQLAlchemyModelFactory): |
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 numpy | |
data = numpy.array( | |
[ | |
[1,2,3,4], | |
[5,6,7,8], | |
[9,10,11,12], | |
] | |
) |