Skip to content

Instantly share code, notes, and snippets.

View atztao's full-sized avatar

atztao atztao

View GitHub Profile
@atztao
atztao / XYZ_2_latlong.py
Created February 5, 2024 10:34 — forked from mpkuse/XYZ_2_latlong.py
Convert GPS (Latitude and Longitude) to XYZ
""" Give a) points in localcoordinate system b) a gps lat long of the origin of the local coordinate system,
this script helps to convert XYZ to latlong.
Beware that the transformation will be off by an yaw angle. This is because the local cordinate frame is may/or may not align with the East-North-Up frame.
The way it works is XYZ --> ECEF --> geodedic (latlong)
main reference is still the wiki https://en.wikipedia.org/wiki/Geographic_coordinate_conversion#From_ECEF_to_ENU.
However the procedure to convert from ECEF to geodedic in wikip does not give accurate results. Instead the algorithm
@atztao
atztao / camera_calculator.py
Created December 15, 2023 03:32 — forked from luipir/camera_calculator.py
Camera Footprint Calculator
"""
***************************************************************************
camera_calculator.py
---------------------
Date : August 2019
Copyright : (C) 2019 by Luigi Pirelli
Email : luipir at gmail dot com
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
@atztao
atztao / content.md
Created January 12, 2023 02:13 — forked from baymaxium/content.md
Python + Django 如何支撑了 7 亿月活用户的 Instagram?

原文:Python开发者

(点击上方蓝字,快速关注我们)

来源:伯乐在线 - piglei

如有好文章投稿,请点击 → 这里了解详情

@atztao
atztao / pb_pbtxt_converter.py
Created October 13, 2021 10:17 — forked from nimaid/pb_pbtxt_converter.py
Script to convert between .pb and .pbtxt files
#!/usr/bin/env python3
import argparse, os, pathlib, sys
def file_path(string):
if os.path.isfile(string):
return string
else:
raise FileNotFoundError(string)
ap = argparse.ArgumentParser()
ap.add_argument("-i", "--input", type=file_path, required=True,
@atztao
atztao / pbtxt_to_pb.py
Created October 13, 2021 10:17 — forked from alsrgv/pbtxt_to_pb.py
Converter of graph.pbtxt to binary graph.pb
from __future__ import print_function
import os
import sys
import tensorflow as tf
from google.protobuf import text_format
from tensorflow.python.framework import graph_io
if len(sys.argv) < 2:
print('Usage: %s <filename prefix>' % sys.argv[0])
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# ref: https://github.com/i3/i3status/blob/master/contrib/wrapper.py
#
# To use it, ensure your ~/.i3status.conf contains this line:
# output_format = "i3bar"
# in the 'general' section.
# Then, in your ~/.i3/config, use:
# status_command i3status | ~/i3status/contrib/wrapper.py
@atztao
atztao / .asoundrc
Created April 10, 2021 12:21 — forked from kowalcj0/.asoundrc
Fiio E17 Alsa config file 24bit 94kHz ~/.asoundrc
# to get the name of the card do:
# cat /proc/asound/cards
# ...
# 2 [DACE17 ]: USB-Audio - FiiO USB DAC-E17
# FiiO FiiO USB DAC-E17 at usb-0000:00:14.0-1.4, full speed
# or
# aplay -l
# ...
# card 2: DACE17 [FiiO USB DAC-E17], device 0: USB Audio [USB Audio]
# Subdevices: 1/1
@atztao
atztao / mojave.xml
Created April 17, 2020 07:22 — forked from trongthanh/mojave.xml
macOS Mojave dynamic background re-implement as GTK+ background slideshow. Background images are changed to reflect the time of the day.
<!-- Instructions:
- Download and unzip Mojave dynamic background here: https://files.rb.gd/mojave_dynamic.zip
- Rename the extracted folder as "mojave-background" (Excuse the trouble but I renamed it on my machine and already use that path in the XML file)
- Save this xml file next to the Mojave background files
- Fix the path to the background images below (better using absolute path)
- Lastly, either:
+ GNOME: Use gnome-tweaks tool to select this XML as wallpaper (as default wallpaper settings won't let you choose wallpaper from custom path)
+ MATE: Go to background setting (in Appearance) > Choose +Add... > make sure **All files** filter is selected at the bottom right > Then choose mojave.xml
-->
<background>