This file contains hidden or 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
df['<epoch_column>'] = df['<datetime_column>'].dt.tz_localize('<timezone_string>').astype(np.int64) // 1e9 |
This file contains hidden or 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
(function() { | |
'use strict'; | |
angular.module().directive('d3Heatmap', ['d3Service', function(d3Service) { | |
return { | |
restrict: 'EA', | |
scope: { | |
data: "=data", | |
onSelect: '&' | |
}, |
This file contains hidden or 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
raw_data = [ | |
{ | |
"locationid": "106", | |
"parentlocationid": None, | |
"name": "Main Meter - 11KV", | |
"sensorid": 1176, | |
"appliancetype": "Main HT", | |
"messageversion": "M26", | |
"active": True, | |
"path": [106], |
This file contains hidden or 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
wget -qO- https://get.docker.com/ | sh | |
sudo usermod -aG docker $(whoami) |
This file contains hidden or 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
#!/bin/python | |
# | |
# Copyright 2016 Flavio Garcia | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
Creating a service to startup at BeagleBone Black boot time:
-
Create a shell script such as /usr/bin/myFancyBash.sh:
#!/bin/bash # this could be any runnable code or shell script, really /usr/bin/myFancyPython.py
Note that the first line is critical.
This file contains hidden or 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
#!/bin/bash | |
readonly SCRIPT_NAME=$(basename $0) | |
echo "Write to syslog" | logger -p user.notice -t $SCRIPT_NAME |
This file contains hidden or 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
/** | |
* | |
* Auto follow users on Instagram Web | |
* | |
* Tired of following users one by one. Follow below steps to automate it. | |
* 1. Go to some user's profile i.e. https://www.instagram.com/spacex and click on followers, popup with user list will appear. | |
* 2. Open console ( press F12 in chrome ) and paste all the code below. | |
* 3. Wait while all the users are being followed. | |
* | |
* @author : Hardik Sondagar <[email protected]> |
This file contains hidden or 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
--- | |
version: 1 | |
disable_existing_loggers: False | |
formatters: | |
simple: | |
format: "%(asctime)s - %(name)s - %(levelname)s - %(message)s" | |
handlers: | |
console: | |
class: logging.StreamHandler |