Run this command to remember your password:
git config --global credential.helper 'cache --timeout 28800'Above command will tell git to cache your password for 8 hours.
| import yaml | |
| from rest_framework.compat import coreapi, urlparse | |
| from rest_framework.schemas import SchemaGenerator | |
| from rest_framework_swagger import renderers | |
| from rest_framework.response import Response | |
| from rest_framework.views import APIView | |
| from rest_framework import exceptions | |
| from rest_framework.permissions import AllowAny |
| from django.views.generic import ListView | |
| class SimpleFilteringListView(ListView): | |
| """ | |
| List view with extra filtering and grouping in context data. | |
| ``filters`` dict is created as follows: {'context_variable_name', 'filtering_object_method_name'} | |
| It calls filtering method on each object in object_list and if it returns True - this object is added | |
| to proper context variable. |
| """ | |
| Gets the name of the active Git branch as a string. | |
| Depends on GitPython | |
| pip install GitPython | |
| """ | |
| from git import Repo | |
| repo = Repo('/path/to/your/repo') | |
| branch = repo.active_branch |
| // MIT License (MIT) | |
| // | |
| // Copyright (c) 2015. Michael Ewald, GeomaticsResearch LLC. | |
| // | |
| // Permission is hereby granted, free of charge, to any person obtaining a copy | |
| // of this software and associated documentation files (the "Software"), to deal | |
| // in the Software without restriction, including without limitation the rights | |
| // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| // copies of the Software, and to permit persons to whom the Software is | |
| // furnished to do so, subject to the following conditions: |
| # - * - coding: UTF-8 - * - | |
| import subprocess | |
| def macosx_set_clipboard(text): | |
| p = subprocess.Popen('pbcopy', stdin=subprocess.PIPE) | |
| p.communicate(text) | |
| def macosx_send_keys(text): | |
| text = text.replace('\\', '\\\\').replace('"', '\\"') |
| from kivy.app import App | |
| from kivy.lang import Builder | |
| from kivy.properties import StringProperty | |
| kv = ''' | |
| BoxLayout: | |
| orientation: 'vertical' | |
| BoxLayout: | |
| size_hint_y: None |
| *.pyc |
In this tutorial we are going to build a Twitter clone using Django and GetStream.io, a hosted API for newsfeed development. We will show you how easy is to power your newsfeeds with GetStream.io. At the end of this tutorial we will have a Django app with a profile feed, a timeline feed, support for following users, hashtags and mentions.
I assume that you are familiar with Django. If you're new to Django the [official tutorial] (https://docs.Djangoproject.com/en/1.7/intro/install/) explains it very well.
Bootstrap the Django application