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
| copy ( | |
| select | |
| "json" | |
| from _duckdb_ui.notebook_versions | |
| where 1=1 | |
| and title = 'MySingleNotebook' | |
| and expires is null | |
| ) to 'exported-notebook.json'; |
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
| package main | |
| import ( | |
| "flag" | |
| "fmt" | |
| "io/ioutil" | |
| "net" | |
| "os" | |
| ) |
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
| // Based on http://stackoverflow.com/a/20434019 | |
| function calculateAccuracy(txPower, rssi) { | |
| if (rssi === 0) { | |
| return -1; // if we cannot determine accuracy, return -1. | |
| } | |
| var ratio = rssi * 1 / txPower; | |
| if (ratio < 1.0) { | |
| return Math.pow(ratio, 10); |
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
| // Create Volume | |
| docker create -v /var/lib/postgresql/data --name pgres2 busybox | |
| // Remove Volume | |
| docker rm pgres2 | |
| // List files in volume directory | |
| docker run --rm --volumes-from pgres2 busybox ls -lh /var | |
| // Make backup |
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
| class Greeting: | |
| def __init__(self): | |
| self.subName = 'SubName' | |
| self.attr = [] | |
| def subMethod(self): | |
| return 'SubMethod' | |
| class Hello(Greeting): | |
| 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
| module.exports = { | |
| /** | |
| * | |
| * Using raw socket.io functionality from a Sails.js controller | |
| * | |
| */ | |
| index: function (req,res) { |