- Open Automator
- Create a new document
- Select Quick Action
- Set “Service receives selected” to
files or folders
inany application
- Add a
Run Shell Script
action- your default shell should already be selected, otherwise use
/bin/zsh
for macOS 10.15 (”Catalina”) or later - older versions of macOS use
/bin/bash
- your default shell should already be selected, otherwise use
- if you're using something else, you probably know what to do 😉
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
''' | |
BAIXE TODOS OS ARQUIVOS NECESSÁRIOS AQUI: "https://drive.google.com/drive/folders/1FjKBlwf4PAZjI4K76uPzQ4e1d8EgQZww?usp=sharing", inclui todos os arquivos mencionados abaixo. | |
-------------------------------------------------------------------------------------------------------------------------- | |
Antes de começarmos, vamos precisar instalar algumas bibliotecas, caso você utilize linux você nao terá erros. Contudo, se você utiliza windows, tem uma seção de soluções de erros. | |
-------------------------------------------------------------------------------------------------------------------------- | |
pip install SpeechRecognition pyaudio | |
-------------------------------------------------------------------------------------------------------------------------- | |
pip install pocketsphinx | |
-------------------------------------------------------------------------------------------------------------------------- | |
Em caso de erros (Windows): |
minikube stop; minikube delete
docker stop $(docker ps -aq)
rm -r ~/.kube ~/.minikube
sudo rm /usr/local/bin/localkube /usr/local/bin/minikube
systemctl stop '*kubelet*.mount'
sudo rm -rf /etc/kubernetes/
docker system prune -af --volumes
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
#Drag-and-drop upload files, via JavaScript, to a simple Python 3 HTTP server |
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
@admin.register(m.Holiday) | |
class HolidayAdmin(admin.ModelAdmin): | |
list_display = ('id', 'day', 'category') | |
search_fields = ('day',) | |
list_filter = ('category',) | |
date_hierarchy = 'day' | |
def get_form(self, request, obj=None, change=False, **kwargs): | |
if not change: |
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 import admin | |
from django.db import models | |
from django.contrib import admin | |
from django.forms import forms | |
from django.utils.safestring import mark_safe | |
from django.contrib.admin.widgets import AdminFileWidget | |
from models import Service, Client, Proyect, Image, Country,LineAction | |
from cms.plugins.text.widgets.wymeditor_widget import WYMEditor | |
from sorl.thumbnail.admin import AdminInlineImageMixin |
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 .models import Post, Picture | |
from .forms import PostForm | |
@admin.register(Post) | |
class PostAdmin(admin.ModelAdmin): | |
list_display = ('title',) | |
add_form_template = 'admin/post_form.html' | |
change_form_template = 'admin/post_form.html' | |
def get_form(self, request, obj=None, **kwargs): |
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 .models import Post, Picture | |
from .forms import PostForm | |
@admin.register(Post) | |
class PostAdmin(admin.ModelAdmin): | |
... | |
def add_view(self, request, form_url="", extra_context=None): | |
extra_context = extra_context or {} |
Migrations are a way to make database changes or updates, like creating or dropping tables, as well as updating a table with new columns with constraints via generated scripts. We can build these scripts via the command line using knex
command line tool.
To learn more about migrations, check out this article on the different types of database migrations!
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
# download the docker installation script | |
curl -fsSL https://get.docker.com -o get-docker.sh | |
# I prefer to have a brief look at the contents of such scripts | |
# this is optional - as long as you trust the source | |
# vim get-docker.sh | |
# finally run the installation | |
chmod +x get-docker.sh | |
./get-docker.sh |