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
using System.Collections; | |
using UnityEngine; | |
public class DNode<T> | |
{ | |
public DNode<T> Next; | |
public DNode<T> Prev; | |
public T Data { get; private set; } | |
public DNode(T data) |
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
.post-item { | |
padding: 16px; | |
border-bottom: 1px solid #efefef; | |
} | |
.post-title { | |
font-size: 22px; | |
font-weight: bold; | |
margin-bottom: 10px; | |
} |
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 datetime | |
import pend | |
from django.core import exceptions | |
from django.db import models | |
from pendulum.parsing import ParserError | |
class DateTimeField(models.DateTimeField): | |
def from_db_value(self, value, *args, **kwargs): |
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
from django.db import models | |
from django.db.models.fields.related_descriptors import ForwardManyToOneDescriptor | |
from jackal.shortcuts import get_model | |
from jackal.shortcuts import get_object_or_None | |
class ImageDescriptor(ForwardManyToOneDescriptor): | |
def __set__(self, instance, value): | |
""" | |
:param instance: 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
""" | |
required pendulum | |
""" | |
import pendulum as pd | |
settings = { | |
"compare": [ | |
"UTC", | |
"Europe/Paris", |
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
# Extracted using: $ unzip -p lib/pycharm.jar com/jetbrains/python/PyBundle.properties | grep -B1 INSP.NAME | grep '^#' | sed 's|Inspection||g' | sed -e 's|#\s\{,1\}|# noinspection |' | |
# noinspection PyPep8 | |
# noinspection PyPep8Naming | |
# noinspection PyTypeChecker | |
# noinspection PyAbstractClass | |
# noinspection PyArgumentEqualDefault | |
# noinspection PyArgumentList | |
# noinspection PyAssignmentToLoopOrWithParameter | |
# noinspection PyAttributeOutsideInit |
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
server { | |
listen 80 default_server; | |
server_name ~^.*$; | |
charset utf-8; | |
client_max_body_size 128M; | |
location / { | |
uwsgi_pass unix:///tmp/app.sock; | |
include uwsgi_params; | |
} |
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
syntax on | |
set nu | |
set tabstop=4 | |
set autoindent | |
set ruler | |
set showcmd | |
set title | |
set wmnu | |
set showmatch |
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 re | |
from django.utils import timezone | |
def get_datetime_filename(filename): | |
pattern = re.compile(r'\.[a-z0-9]+$') | |
extension = re.search(pattern, filename).group() | |
dt = timezone.now().strftime('%Y_%m_%d_%H%M%S%f') | |
return dt + extension |
NewerOlder