原文:Python开发者
(点击上方蓝字,快速关注我们)
来源:伯乐在线 - piglei
如有好文章投稿,请点击 → 这里了解详情
| """ 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 |
| """ | |
| *************************************************************************** | |
| 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 * |
原文:Python开发者
(点击上方蓝字,快速关注我们)
来源:伯乐在线 - piglei
如有好文章投稿,请点击 → 这里了解详情
| #!/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, |
| 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 |
| # 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 |
| <!-- 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> |