-
-
Save 0xJatto/b1296ab49340f9fc0d5c7213c4c26628 to your computer and use it in GitHub Desktop.
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
#coding: utf-8 | |
from __future__ import unicode_literals | |
from faker.providers import BaseProvider | |
class Provider(BaseProvider): | |
formats = [ | |
"{{verb}} {{noun}}", | |
"{{verb}} for {{noun}}", | |
"{{verb}} and {{verb}} {{noun}} {{project_type}}", | |
"{{verb}} {{noun}} in {{location}}", | |
"{{verb}} {{adjective}} {{noun}} in {{location}}", | |
"{{verb}} {{adjective}} {{adjective}} {{noun}} in {{location}}", | |
"{{verb}} {{noun}} {{project_type}}", | |
"{{verb}} for {{noun}} {{project_type}}", | |
"{{noun}} for {{noun}} {{project_type}}", | |
"{{verb}} {{adjective}} {{noun}} {{project_type}}", | |
"{{adjective}} {{noun}} {{project_type}}", | |
"{{adjective}} {{noun}} in {{location}}", | |
"{{adjective}} {{adjective}} {{noun}} {{project_type}}", | |
"{{adjective}} {{noun}}: {{location}}", | |
"{{adjective}} {{noun}} {{project_type}}: {{location}}", | |
"{{adjective}} Initiative on {{noun}}", | |
"{{location}} {{noun}} {{project_type}}", | |
"{{location}} {{adjective}} {{noun}}", | |
"{{location}} {{adjective}} {{noun}} {{project_type}}", | |
"{{location}} {{project_type}}", | |
"{{noun}} {{project_type}}", | |
"{{noun}} {{noun}} {{project_type}}", | |
"{{noun}} and {{noun}} {{project_type}}", | |
"{{noun}} & {{noun}} {{project_type}}", | |
"{{noun}} {{project_type}}: {{location}}", | |
"Program for {{adjective}} {{noun}} Studies", | |
"Center for {{adjective}} {{noun}}", | |
] | |
project_types = [ | |
"Seminar", | |
"Workshop", | |
"Design Workshop", | |
"Practicum", | |
"Program", | |
"Project", | |
"Studio", | |
"Design Studio", | |
"Planning Studio", | |
"Assessment Project", | |
"Initiative", | |
"Research Network", | |
"Lab", | |
"Design Lab", | |
"Research Lab", | |
"Theory Lab", | |
"Symposium", | |
"Colloquium", | |
] | |
verbs = [ | |
"Assessing", | |
"Analyzing", | |
"Mobilizing", | |
"Mapping", | |
"Documenting", | |
"Developing", | |
"Crowdsourcing", | |
"Creating", | |
"Managing", | |
"Prototyping", | |
"Measuring", | |
"Placemaking", | |
"Leading", | |
"Designing", | |
"Negotiating", | |
"Leveraging", | |
] | |
adjectives = [ | |
"Cultural", | |
"Complex", | |
"Ecological", | |
"Political", | |
"Financial", | |
"Bottom Up", | |
"Regional", | |
"International", | |
"Accessible", | |
"Sustainable", | |
"Adaptive", | |
"Informal", | |
"Participatory", | |
"Digital", | |
"Resilient", | |
"Advanced", | |
"Civic", | |
"Smart", | |
"Entrepreneurial", | |
"Effective", | |
"Urban", | |
"Social", | |
"Equitable", | |
"Local", | |
"Geographic", | |
"Creative", | |
"Essential", | |
"Agile", | |
] | |
nouns = [ | |
"Leverage", | |
"Property Rights", | |
"Mobile Technology", | |
"Objectives", | |
"Alternatives", | |
"Information Systems", | |
"Anchor Institutions", | |
"Land Use", | |
"Technology", | |
"Industrial Land Use", | |
"Innovation", | |
"Innovation Districts", | |
"Infrastructure", | |
"Housing", | |
"Manufacturing", | |
"Small Manufacturing", | |
"Small Businesses", | |
"Manufacturing Hubs", | |
"Cities", | |
"Urbanism", | |
"Neighborhoods", | |
"Transportation", | |
"Markets", | |
"Streets", | |
"Mobility", | |
"Equity", | |
"Accessibility", | |
"Economic Mobility", | |
"Economies", | |
"Engagement", | |
"Landscapes", | |
"Citizenship", | |
"Leadership", | |
"Sanitation", | |
"Energy Use", | |
"Health", | |
"Finance", | |
"Agriculture", | |
"Urban Agriculture", | |
"Food Systems", | |
"Energy", | |
"Energy Systems", | |
"Data Collection", | |
"Open Data", | |
"Public Space", | |
"Education", | |
"Entrepreneurship", | |
"GIS", | |
"Poverty Alleviation", | |
"Knowledge Economies", | |
"Climate Change", | |
"Food", | |
"Food Systems", | |
"Social Justice", | |
"Educational Technology", | |
"Economic Resilience", | |
"Stakeholder Engagement", | |
"Real Estate", | |
"Real Estate Development", | |
"Real Estate Finance", | |
"Ecology", | |
"Urban Form", | |
"Risk Management", | |
"Disaster Mitigation", | |
"New Economies", | |
"New Media", | |
"Sanitation", | |
"Sanitation Systems", | |
"Decision Making", | |
"Communities", | |
"Human Rights", | |
"Creative Economy", | |
"Policy", | |
"Policies", | |
"Development Finance", | |
"Environmental Policy", | |
"Complexity", | |
] | |
locations = [ | |
"Detroit", | |
"Baltimore", | |
"Beijing", | |
"Singapore", | |
"Singapore", | |
"São Paulo", | |
"Rio de Janerio", | |
"Boston", | |
"Cambridge", | |
"Kenya", | |
"Brazil", | |
"Dhaka", | |
"Washington D.C.", | |
"Ghana", | |
"China", | |
"Colombia", | |
"Medellín", | |
"Bogotá", | |
"Ho Chi Minh City", | |
"Vietnam", | |
"Seoul", | |
"South Korea", | |
"Chile", | |
"Santiago de Chile", | |
"Madrid", | |
"Barcelona", | |
"Moscow", | |
"Cape Town", | |
"South Africa", | |
"Germany", | |
"New England", | |
"Mexico City", | |
"Mexico", | |
"Beirut", | |
"Buenos Aires", | |
"Bangkok", | |
"Cairo", | |
"Delhi", | |
"Mumbai", | |
"India", | |
"Istanbul", | |
"Jakarta", | |
"Lagos", | |
"Nigeria", | |
"Manila", | |
"Philippines", | |
"Shanghai", | |
"Tianjin", | |
"Tokyo", | |
"Malaysia", | |
"Kuala Lumpur", | |
"Venice", | |
"Paris", | |
"Berlin", | |
"London", | |
"Morocco", | |
"Accra", | |
"Nairobi", | |
"Maputo", | |
"Mozambique", | |
"Karachi", | |
"Pakistan", | |
"St. Louis", | |
] | |
@classmethod | |
def noun(cls): | |
return cls.random_element(cls.nouns) | |
@classmethod | |
def verb(cls): | |
return cls.random_element(cls.verbs) | |
@classmethod | |
def adjective(cls): | |
return cls.random_element(cls.adjectives) | |
@classmethod | |
def location(cls): | |
return cls.random_element(cls.locations) | |
@classmethod | |
def project_type(cls): | |
return cls.random_element(cls.project_types) | |
def project_title(self): | |
pattern = self.random_element(self.formats) | |
return self.generator.parse(pattern) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment