Skip to content

Instantly share code, notes, and snippets.

View muminoff's full-sized avatar
🏠
Working from home

Sardor Muminov muminoff

🏠
Working from home
  • Electronic Arts
  • Seoul, Korea
View GitHub Profile
@muminoff
muminoff / cubemap.py
Created June 19, 2017 00:34
Panorama to cubemap (Python 3)
# !/usr/bin/env python
import numpy as np
from scipy import ndimage, misc
import sys, math, os
from PIL import Image
def cubemap(filename):
SIZE = 1024
HSIZE = SIZE / 2.0
@muminoff
muminoff / pano-converter3.py
Created June 17, 2017 16:28
Equirectangular panorama to cube map (Python 3)
import sys
from PIL import Image
from math import pi,sin,cos,tan,atan2,hypot,floor
from numpy import clip
# get x,y,z coords from out image pixels coords
# i,j are pixel coords
# face is face number
# edge is edge length
def outImgToXYZ(i,j,face,edge):
explain analyze
select
count(age) as samples,
case
when age < 20 then 2000
when (age >= 20) and (age < 30) then 2030
when (age >= 30) and (age < 40) then 3040
when (age >= 40) and (age < 50) then 4050
when (age >= 50) and (age < 60) then 5060
when age >= 60 then 6000
@muminoff
muminoff / ml-dictionary-uz.md
Last active December 28, 2016 13:19
Machine Learning dictionary in Uzbek
инглизча ўзбекча
probability distribution эҳтимолликлар тақсимланиши
@muminoff
muminoff / customize-save-in-django-admin-inline-form.org
Created December 16, 2016 12:15 — forked from shymonk/customize-save-in-django-admin-inline-form.org
How to customize save in django admin inline form?

Customize Save In Django Admin Inline Form

Background

This is a common case in django ORM.

from django.db import models

class Author(models.Model):
# Ушбу конфигурация файл Nginx веб серверига тегишли бўлиб,
# фақатгина TAS-IX тармоғига тегишли бўлган IP манзилларга
# хизмат кўрсатиш ва бошқа (мир) IP манзилларни блоклаш учун ишлайди.
upstream nodejs_backend{
server 127.0.0.1:8000;
server 127.0.0.1:8001;
server 127.0.0.1:8002;
server 127.0.0.1:8003;
}

Keybase proof

I hereby claim:

  • I am muminoff on github.
  • I am muminoff (https://keybase.io/muminoff) on keybase.
  • I have a public key whose fingerprint is 67C2 41A3 250C A96E 9985 FFA6 FF87 153B 1371 D515

To claim this, I am signing this object:

import tensorflow as tf
import skimage.transform
from skimage.io import imsave, imread
import os
from os import listdir, path
from os.path import isfile, join
def get_directory(folder):
foundfile = []
import tensorflow as tf
import skimage.transform
from skimage.io import imsave, imread
def load_image(path):
img = imread(path)
# crop image from center
short_edge = min(img.shape[:2])
yy = int((img.shape[0] - short_edge) / 2)
xx = int((img.shape[1] - short_edge) / 2)