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 hashlib | |
import time | |
def create_md5(): | |
m = hashlib.md5() | |
m.update(bytes(str(time.time()), encoding='utf-8')) | |
return m.hexdigest() |
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
rom django.db import models | |
from PIL import Image | |
from io import BytesIO | |
from django.core.files.uploadedfile import InMemoryUploadedFile | |
import sys | |
# Create your models here. | |
class Modify(models.Model): | |
img = models.ImageField() |
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
# Rime dictionary | |
# encoding: utf-8 | |
# ref: http://pinyin.sogou.com/dict/ywz/ | |
--- | |
name: kaomoji | |
version: "0.1" | |
sort: original | |
... | |
←_← ding 25 |
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
* | |
!.gitignore | |
!alternative.yaml | |
!*.custom.yaml | |
!kaomoji.*.yaml |
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
export default function uniqObjectsArray(objects) { | |
/* | |
objects is an array of Object | |
*/ | |
let keys = []; | |
let arr = []; | |
arr = objects.filter(row => { | |
let key = JSON.stringify(row); | |
if (!keys[key]) { | |
keys[key] = '-'; |