Skip to content

Instantly share code, notes, and snippets.

@Scot3004
Scot3004 / poo_en_python_with_plant.ipynb
Last active August 28, 2023 23:31
poo_en_python_with_plant.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Scot3004
Scot3004 / introducci-n-a-python.ipynb
Created July 11, 2022 21:02
Introducción a python.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Marcas locales

Lista de mis marcas locales favoritas por categoría #supportLocal 🍃 Marcas colombianas con productos hechos en casa 🇨🇴

Ropa 👗

@Klerith
Klerith / preferencias_usuario.dart
Last active March 10, 2023 22:27
Flutter: Configuración singleton para las preferencias del usuario
import 'package:shared_preferences/shared_preferences.dart';
/*
Recordar instalar el paquete de:
shared_preferences:
Inicializar en el main
final prefs = new PreferenciasUsuario();
await prefs.initPrefs();
@jdnichollsc
jdnichollsc / ABC.md
Last active April 16, 2024 03:40
The Job Interview Guide

The Job Interview Guide 💼

And English is a Work in Progress ⌛

@sww314
sww314 / Dockerfile
Created July 24, 2018 19:42
Django + PostGIS Docker File
FROM python:3.6-alpine
ENV PYTHONUNBUFFERED 1
RUN apk update \
# psycopg2 dependencies
&& apk add --virtual build-deps gcc python3-dev musl-dev \
&& apk add postgresql-dev \
# Pillow dependencies
&& apk add jpeg-dev zlib-dev freetype-dev lcms2-dev openjpeg-dev tiff-dev tk-dev tcl-dev \
@delgadofarid
delgadofarid / models.py
Created June 16, 2018 17:17
Corrección Manual Django Semana 2 - 5. Modelos de Django
from django.db import models
from django.utils import timezone
class Post(models.Model):
author = models.ForeignKey(
'auth.User',
on_delete=models.CASCADE, #Cambio incluido
)
title = models.CharField(max_length=200)
text = models.TextField()
@SheldonWangRJT
SheldonWangRJT / Convert .mov or .MP4 to .gif.md
Last active May 22, 2024 02:05
Convert Movie(.mov) file to Gif(.gif) file in one command line in Mac Terminal

This notes is written by Sheldon. You can find me with #iOSBySheldon in Github, Youtube, Facebook, etc.

Need

Convert .mov/.MP4 to .gif

Reason

As a developer, I feel better to upload a short video when I create the pull request to show other viewers what I did in this PR. I tried .mov format directly got after finishing recording screen using Quicktime, however, gif offers preview in most web pages, and has smaller file size.

This is not limited to developer, anyone has this need can use this method to convert the files.

@gengue
gengue / serializers.py
Last active February 2, 2023 03:50
Django Rest Framework user endpoint with change password
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from rest_framework import serializers
from .models import User
class UserSerializer(serializers.ModelSerializer):
"""
User accounts serializer
@jonperron
jonperron / gist:733c3ead188f72f0a8a6f39e3d89295d
Last active November 30, 2023 17:29
Serve pandas dataframe as csv with Django
from django.http import HttpResponse
import pandas as pd
def foo():
results = pd.Dataframe()
response = HttpResponse(content_type='text/csv')
response['Content-Disposition'] = 'attachment; filename=filename.csv'
results.to_csv(path_or_buf=response,sep=';',float_format='%.2f',index=False,decimal=",")