This file contains 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
enum Channel : byte | |
{ | |
UnknownChannel = 0, | |
Email = 1, | |
CallCenter = 2, | |
BrokerHelpDesk = 3, | |
BrokerPortal = 4 | |
} |
This file contains 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
CREATE TRIGGER address_versioning_trigger | |
BEFORE UPDATE OR DELETE ON location.address | |
FOR EACH ROW EXECUTE PROCEDURE address_trigger_function(); |
This file contains 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
create function address_trigger_function() | |
returns trigger as $$ | |
BEGIN | |
insert into logging_address_address (address_id, type, street1, street2, street3, street4, city, po_box_code, phone_number, date_created, operation) | |
values (old.address_id, old.type, old.street1,old.street2,old.street3,old.street4,old.city,old.po_box_code,old.phone_number, old.date_created,TG_OP); | |
RETURN NEW; | |
end; | |
$$ LANGUAGE plpgsql; |
This file contains 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
create table logging_address | |
( | |
like address EXCLUDING CONSTRAINTS, | |
operation char(10) not null, | |
date_operated timestamp with time zone not null default current_timestamp | |
); |
This file contains 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
create table address | |
( | |
address_id integer not null, | |
type varchar(100), | |
street1 varchar(120) not null, | |
street2 varchar(120), | |
street3 varchar(120), | |
street4 varchar(120), | |
city varchar(80), | |
po_box_code varchar(20) not null, |
This file contains 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
public class ClassGenerator | |
{ | |
private readonly ModuleBuilder _moduleBuilder; | |
public ClassGenerator() | |
{ | |
var an = new AssemblyName("DynamicProtoAssembly"); | |
AssemblyBuilder assemblyBuilder = AssemblyBuilder.DefineDynamicAssembly(an,AssemblyBuilderAccess.Run); | |
_moduleBuilder = assemblyBuilder.DefineDynamicModule("DynamicProtoModule"); |
This file contains 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 Image | |
import numpy as np | |
import cv2 | |
def convert_to_opencv(image): | |
# RGB -> BGR conversion is performed as well. | |
image = image.convert('RGB') | |
r,g,b = np.array(image).T | |
opencv_image = np.array([b,g,r]).transpose() | |
return opencv_image |
This file contains 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 tensorflow as tf | |
import numpy as np | |
# The category name and probability percentage | |
class CategoryScore: | |
def __init__(self, category, probability: float): | |
self.category = category | |
self.probability = probability |
This file contains 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
extern "C" ImageNetCoreSharedMemoryConsumer* GetImageConsumer(char * name) | |
{ | |
return new ImageNetCoreSharedMemoryConsumer(std::string(name)); | |
} | |
extern "C" void DeleteImageNetCoreSharedMemoryConsumer(ImageNetCoreSharedMemoryConsumer* consumer) | |
{ | |
delete consumer; | |
} |
NewerOlder