Skip to content

Instantly share code, notes, and snippets.


Özcan Yarımdunya ozcanyarimdunya

Block or report user

Report or block ozcanyarimdunya

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
ozcanyarimdunya /
Last active Jun 13, 2019
Django Admin JsonEditor | `pip install django-jsoneditor`
from django.contrib import admin
from jsoneditor.forms import JSONEditor
from django.contrib.postgres.fields import JSONField
from demo.models import Demo
class DemoAdmin(admin.ModelAdmin):
formfield_overrides = {
JSONField: {'widget': JSONEditor},
View vue-spa.html
<!DOCTYPE html>
<title>Vue | SPA</title>
<script src="vue.min.js"></script>
<link rel="shortcut icon" href="/favicon.ico">
<!-- <script src=""></script> -->
ozcanyarimdunya /
Last active Mar 27, 2019
How to write class based generic python
+ name
+ legs
class Animal(object):
name = None
ozcanyarimdunya /
Last active Mar 20, 2019
How to create mkdocs on your local with docker

File structure

├── docs
│   ├──
│   ├── assets
│   │   └── back.png
│   ├──
│   └──
ozcanyarimdunya / website.conf
Created Mar 3, 2019
Docker-django-nginx conf
View website.conf
upstream web {
server web:8000;
# portal
server {
listen 8000;
server_name localhost;
ozcanyarimdunya /
Last active Feb 23, 2019
python logger snippet
import logging
from models import Person
fmt = "[%(asctime)s]:%(levelname)s:line,%(lineno)d:%(module)s:%(funcName)s: %(message)s"
lvl = logging.DEBUG
logging.basicConfig(level=lvl, format=fmt)
logger = logging.getLogger()
ozcanyarimdunya /
Last active Jul 29, 2018
Multi nested key dictionary to single dictionary
import pandas as pd
class MultiToSingleDict:
def __init__(self, data, sep='.'):
self._data = data
self._sep = sep
self._out = {}

Pipenv Configurations

  1. To install pipenv
pip install pipenv
  1. if you want to use .venv under the your_project/.venv
ozcanyarimdunya / one.ui
Last active Sep 26, 2017
one more time
View one.ui
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<widget class="QMainWindow" name="MainWindow">
<property name="geometry">
You can’t perform that action at this time.