Skip to content

Instantly share code, notes, and snippets.

View dermatologist's full-sized avatar
🔥
Playing with FHIR

Bell Eapen dermatologist

🔥
Playing with FHIR
View GitHub Profile
@matteocrippa
matteocrippa / flutter.md
Last active October 26, 2023 05:47
Flutter Cheatsheet

Flutter

A quick cheatsheet of useful snippet for Flutter

Widget

A widget is the basic type of controller in Flutter Material. There are two type of basic Widget we can extend our classes: StatefulWidget or StatelessWidget.

Stateful

StatefulWidget are all the widget that interally have a dynamic value that can change during usage. It can receive an input value in the constructor or reference to functions. You need to create two classes like:

@ttimasdf
ttimasdf / README.md
Last active April 18, 2024 05:17
Integrate Git diffs and commits with Word DOCX files
@ozancaglayan
ozancaglayan / image_encoder.py
Created March 29, 2018 17:04
pytorch cnn image encoder
# -*- coding: utf-8 -*-
#
# author: Ozan Caglayan
from collections import OrderedDict
import torch
from torchvision import models
from torchvision.models.vgg import cfg as vgg_cfg
@althonos
althonos / setup.cfg
Last active March 4, 2024 18:08
A `setup.cfg` template for my Python projects
# https://gist.github.com/althonos/6914b896789d3f2078d1e6237642c35c
[metadata]
name = {name}
version = file: {name}/_version.txt
author = Martin Larralde
author_email = martin.larralde@embl.de
url = https://github.com/althonos/{name}
description = {description}
long_description = file: README.md
@AshikNesin
AshikNesin / base64-form-data.js
Last active December 19, 2023 06:08
Base64 image to multipart/form-data
const base64 = 'data:image/png;base64,....' // Place your base64 url here.
fetch(base64)
.then(res => res.blob())
.then(blob => {
const fd = new FormData();
const file = new File([blob], "filename.jpeg");
fd.append('image', file)
// Let's upload the file
// Don't set contentType manually → https://github.com/github/fetch/issues/505#issuecomment-293064470
@eddiewebb
eddiewebb / readme.md
Last active February 12, 2024 08:46
Hugo JS Searching with Fuse.js
package com.example.controllers.dashboard;
import org.springframework.security.jwt.Jwt;
import org.springframework.security.jwt.JwtHelper;
import org.springframework.security.jwt.crypto.sign.MacSigner;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@datlife
datlife / export_tfserving.py
Created February 2, 2018 18:52
Export pre-trained TF Object Detection API model to Tensorflow Serving
"""
Thiss script would convert a pre-trained TF model to a servable version for TF Serving.
A pre-trained model can be downloaded here
https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/detection_model_zoo
Requirements:
* A directory contains pretrained model (can be download above).
* Edit three arguments `frozen_graph`, `model_name`, `base_dir` accordingly
@thurt
thurt / revprox.go
Last active March 31, 2024 05:14 — forked from JalfResi/revprox.go
Simple reverse proxy in Go (forked from original to use a struct instead of a closure)
package main
import(
"log"
"net/url"
"net/http"
"net/http/httputil"
)
func main() {
@markdtw
markdtw / tf_detection_api_inference.py
Created December 29, 2017 07:21
Extracting detection features from tensorflow object detection API.
"""This file extracts faster-rcnn features and bounding box coordinates"""
import pdb
import argparse
import numpy as np
import tensorflow as tf
import PIL.Image as PILI
def session(sess, feat_conv, feat_avg, boxes, classes, scores, image_tensor, image):
feat_conv_out, feat_avg_out, boxes_out, classes_out, scores_out = sess.run([