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
1. Second-Screen Revolution | |
2. Big Data | |
3. End of Anonymous Trolls | |
4. End of Privacy | |
5. Rise of Reporting | |
6. Official Death of Desktops | |
7. 3D Printing | |
8. Flexible Devices | |
9. Embedded Technology | |
10. Crowdfunding Mania |
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
from apps.polidata.models import Politician | |
twitter_data = { | |
"00512": "@PepeSolari", | |
"00405": "@JAIMETROBO", | |
"05851": "@AlfredoAsti", | |
"00161": "@JuanRaFerreira", | |
"05262": "@dpayss1", | |
"05137": "@juliocesilveira", | |
"00197": "@Luisaheber", |
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
from django.contrib.contenttypes.models import ContentType | |
from django.utils.functional import Promise | |
from south.signals import post_migrate | |
def update_contenttypes_names(**kwargs): | |
for c in ContentType.objects.all(): | |
cl = c.model_class() | |
if cl: | |
new_name = cl._meta.verbose_name | |
if c.name != new_name: |
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 importlib | |
def class_for_name(module_name, class_name): | |
# load the module, will raise ImportError if module cannot be loaded | |
m = importlib.import_module(module_name) | |
# get the class, will raise AttributeError if class cannot be found | |
c = getattr(m, class_name) | |
return c |
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
1. $ brew install fswatch | |
2. Create script gitstatus.sh: | |
#!/bin/bash | |
clear | |
fswatch -e ".lock" -r . | xargs -I {} sh -c 'clear; git status -s' | |
3. Run gitstatus.sh inside your repo's root folder. |