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 PIL import ImageDraw as D | |
from PIL import Image | |
from PIL import ImagePath | |
import json | |
with open('syn_sample/annotations/0000000000-1-Image-ana.json','r') as f: | |
annotation = json.load(f) | |
i = Image.open("syn_sample/images/0000000000-1-Image.png") | |
draw = D.Draw(i) | |
objects = annotation['annotations'] |
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 PIL import ImageDraw as D | |
from PIL import Image | |
from PIL import ImagePath | |
import json | |
import cv2 | |
import numpy as np | |
with open('syn_sample/annotations/0000000000-1-Image-ana.json','r') as f: | |
annotation = json.load(f) | |
i = Image.open("syn_sample/images/0000000000-1-Image.png") |
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 PIL import ImageDraw as D | |
from PIL import Image | |
from PIL import ImagePath | |
import json | |
with open('syn_sample/annotations/0000000000-1-Image-ana.json','r') as f: | |
annotation = json.load(f) | |
i = Image.open("syn_sample/images/0000000000-1-Image.png") | |
draw = D.Draw(i) | |
objects = annotation['annotations'] |
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.contrib import admin | |
from django.contrib.admin.sites import AlreadyRegistered | |
def load_fields(model): | |
field_list = [f.name for f in model._meta.get_fields() if f.auto_created == False] | |
return field_list | |
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
// https://stackoverflow.com/questions/23468671/what-is-the-best-way-to-implement-gethashcode-for-class-with-lots-of-propertie | |
public static class HashCodeByPropertyExtensions | |
{ | |
public static int GetHashCodeOnProperties<T>(this T inspect) | |
{ | |
return inspect.GetType().GetProperties().Select(o => o.GetValue(inspect, null)).GetListHashCode(); | |
} | |
public static int GetListHashCode<T>(this IEnumerable<T> sequence) | |
{ |
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
Sub split_into_multi_rows() | |
'splits Text active cell | |
Dim splitVals As Variant | |
Dim totalVals As Long | |
splitVals = Split(ActiveCell.Value, Chr(10)) | |
totalVals = UBound(splitVals) | |
'insert rows and delete active row |
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; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Data; | |
using System.Drawing; | |
using System.Linq; | |
using System.Text; | |
using System.Windows.Forms; | |
using Microsoft.Office.Core; | |
using PowerPoint = Microsoft.Office.Interop.PowerPoint; |