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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from __future__ import division | |
from __future__ import print_function | |
from __future__ import absolute_import | |
import time | |
from pymetawear.discover import select_device | |
from pymetawear.client import MetaWearClient |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
:mod:`accelerometer_logging` | |
================== | |
Created by hbldh <henrik.blidh@nedomkull.com> | |
Created on 2018-04-20 | |
""" |
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
def convert_openssh_key_to_xml(key, verbose=False): | |
"""Convert Public Key to XML format for C# usage. | |
See http://stackoverflow.com/a/13104466 for details. | |
.. code-block: python | |
>>> public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDz[...]" | |
>>> xml_public_key = convert_openssh_key_to_xml(public_key, verbose=True) | |
>>> print(xml_public_key) |
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
// This #include statement was automatically added by the Particle IDE. | |
#include "Pozyx/Pozyx.h" | |
#include "Pozyx/Pozyx_definitions.h" | |
#define BYTE_TO_BINARY(byte) \ | |
(byte & 0x80 ? '1' : '0'), \ | |
(byte & 0x40 ? '1' : '0'), \ | |
(byte & 0x20 ? '1' : '0'), \ | |
(byte & 0x10 ? '1' : '0'), \ | |
(byte & 0x08 ? '1' : '0'), \ |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
accelerometer_generic | |
===================== | |
Created by hbldh <henrik.blidh@nedomkull.com> | |
Created on 2016-08-26 | |
""" |
I hereby claim:
- I am hbldh on github.
- I am hbldh (https://keybase.io/hbldh) on keybase.
- I have a public key ASBSUjwfOP5idY55R1LuI08GgBiI-sNLr7IM4TdBfTxcXQo
To claim this, I am signing this object:
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
dict_memory_foray | |
~~~~~~~~~~~~~~~~~ | |
:copyright: 2016 by Henrik Blidh <henrik.blidh@nedomkull.com> | |
""" |
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 sys | |
def calculate_document_size_in_memory(doc): | |
"""A "size in memory" estimator for JSON documents/dicts. | |
:param doc: The document or list of documents to find size of. | |
:type doc: dict or list | |
:return: The size of the input document(s) in bytes. | |
:rtype: int |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
:mod:`records_mssql` | |
=================== | |
Created by hbldh <henrik.blidh@nedomkull.com> | |
Created on 2016-03-08 | |
How to connect to Microsoft Azure SQL Server 2012 using PyMSSQL package. |
NewerOlder