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
| require 'formula' | |
| class Geos < Formula | |
| homepage 'http://trac.osgeo.org/geos' | |
| url 'http://download.osgeo.org/geos/geos-3.4.2.tar.bz2' | |
| sha1 'b8aceab04dd09f4113864f2d12015231bb318e9a' | |
| option :universal | |
| option :cxx11 |
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 django.db.models.functions import Lower | |
| from django.db.models import CharField | |
| from django.contrib.auth.models import UserManager as DjangoUserManager | |
| CharField.register_lookup(Lower, 'lower') | |
| class UserManager(DjangoUserManager): | |
| """ | |
| Allow case insensitive usernames for authenticating. |
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 orders_report(request, company): | |
| import cProfile | |
| pr = cProfile.Profile() | |
| pr.enable() | |
| ....code to profile | |
| # stop profiling and output to console |
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 os | |
| import requests | |
| from datetime import datetime, timedelta | |
| # Days aged | |
| DAYS_AGED = 30 | |
| # token from https://api.slack.com/web | |
| TOKEN = os.environ.get('SLACK_TOKEN') # set an env variable for slack token | |
| ENDPOINT = 'https://slack.com/api/{}' |
OlderNewer