Skip to content

Instantly share code, notes, and snippets.

View liviaerxin's full-sized avatar

Frank liviaerxin

  • ASTRI
  • Hong Kong
View GitHub Profile
@liviaerxin
liviaerxin / rest_quick_reference.md
Created September 29, 2017 03:24 — forked from odan/rest_quick_reference.md
REST, RESTful API Quick Reference #api

REST, RESTful API Quick Reference

Ressources

  • Version your API

    • Path: /v1/users
    • Subdomain: api.v1.example.com/users
  • URI must be nouns, not verbs

  • /cars

@liviaerxin
liviaerxin / README.md
Created December 15, 2017 02:22 — forked from mariotacke/README.md
Default nginx log format (combined) and grok pattern
@liviaerxin
liviaerxin / python-logging.md
Created August 3, 2018 07:53 — forked from mariocj89/python-logging.md
Understanding logging in Python #python

Logging trees

Introduction

When applications are running in production, they become black boxes that need to be traced and monitored. One of the simplest, yet main, ways to do so is logging. Logging allows us - at the time we develop our software - to instruct the program to emit information while the system is running that will be useful for us and our sysadmins.

@liviaerxin
liviaerxin / pom.xml
Created November 12, 2018 09:38 — forked from timmolderez/pom.xml
Adding dependencies to local .jar files in pom.xml
If you'd like to use a .jar file in your project, but it's not available in any Maven repository,
you can get around this by creating your own local repository. This is done as follows:
1 - To configure the local repository, add the following section to your pom.xml (inside the <project> tag):
<repositories>
<repository>
<id>in-project</id>
<name>In Project Repo</name>
<url>file://${project.basedir}/libs</url>
This file has been truncated, but you can view the full file.
{"dependencies_cache": {"https://packagecontrol.io/repository.json": [{"load_order": "50", "releases": [{"version": "3.12.0", "platforms": ["*"], "url": "https://codeload.github.com/packagecontrol/pyyaml/zip/v3.12.0", "sublime_text": "*"}], "description": "Python PyYAML module", "name": "pyyaml", "authors": ["FichteFoll"], "issues": "https://github.com/packagecontrol/pyyaml/issues"}, {"load_order": "50", "releases": [{"version": "1.7.4", "platforms": ["*"], "url": "https://codeload.github.com/idleberg/sublime-dicttoxml/zip/1.7.4", "sublime_text": "*"}], "description": "Converts a Python dictionary or other native data type into a valid XML string - https://github.com/idleberg/sublime-dicttoxml", "name": "dicttoxml", "authors": ["idleberg"], "issues": "https://github.com/idleberg/sublime-dicttoxml/issues"}, {"load_order": "01", "releases": [{"version": "1.0.1", "platforms": ["linux"], "url": "https://codeload.github.com/codexns/sublime-ctypes/zip/1.0.1", "sublime_text": "<3000"}], "description": "Python _ctype
/**
* @author knee-cola / https://github.com/knee-cola
* Original file URL: https://gist.github.com/knee-cola/37875bc4359609b96c9f329cd2a68fa1
*
* This is a spinner/loader built for Three.js platform.
* It can be used to notify user that some resources are being loaded.
* I made it to replace pure CSS spinner, which was displayed in the
* overlay above the 3D animation, since it was slowing down WebGL
*
* How to use:
from __future__ import print_function
import argparse
import time
import numpy as np
from scipy.misc import imread
import grpc
from tensorflow.contrib.util import make_tensor_proto
@liviaerxin
liviaerxin / build_opencv_in_mac.md
Last active December 11, 2023 14:50
Build OpenCV and Python Bindings in Mac(QT, Gstreamer Support)

Build OpenCV in Mac with QT, Gstreamer Support

Install dependencies

brew install cmake #
brew install qt5 #optional
brew install gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-libav #optional
pip3 install numpy