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
select ascii('🍊'), ascii('a'), bin('🍊'), bin('a'), reinterpretAsInt64(reverse(unbin(bin('🍊')))) as tan, reinterpretAsInt64(reverse(unbin(bin('a')))) as a, hex(a) |
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
-- Rolling ndr | |
with tbl as ( | |
-- fake table | |
select c1 as usr, c2 as price, c3 as d from VALUES ( | |
('a', 10, toDate('2023-08-09')) | |
, ('a', 10, toDate('2023-08-10')) | |
, ('a', 8, toDate('2023-08-11')) | |
, ('a', 11, toDate('2023-08-12')) | |
, ('a', 12, toDate('2023-08-13')) | |
, ('b', 10, toDate('2023-08-09')) |
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
with tbl as ( | |
-- fake table | |
select c1 as usr, c2 as price, c3 as d from VALUES ( | |
('a', 10, toDate('2023-08-09')) | |
, ('a', 10, toDate('2023-08-10')) | |
, ('a', 8, toDate('2023-08-11')) | |
, ('a', 11, toDate('2023-08-12')) | |
, ('a', 12, toDate('2023-08-13')) | |
, ('b', 10, toDate('2023-08-09')) | |
, ('b', 10, toDate('2023-08-10')) |
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
// QRious v4.0.2 | (C) 2017 Alasdair Mercer | GPL v3 License Based on jsqrencode | (C) 2010 tz@execpc.com | GPL v3 License | |
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.QRious=e()}(this,function(){"use strict";function t(t,e){var n;return"function"==typeof Object.create?n=Object.create(t):(s.prototype=t,n=new s,s.prototype=null),e&&i(!0,n,e),n}function e(e,n,s,r){var o=this;return"string"!=typeof e&&(r=s,s=n,n=e,e=null),"function"!=typeof n&&(r=s,s=n,n=function(){return o.apply(this,arguments)}),i(!1,n,o,r),n.prototype=t(o.prototype,s),n.prototype.constructor=n,n.class_=e||o.class_,n.super_=o,n}function i(t,e,i){for(var n,s,a=0,h=(i=o.call(arguments,2)).length;a<h;a++){s=i[a];for(n in s)t&&!r.call(s,n)||(e[n]=s[n])}}function n(){}var s=function(){},r=Object.prototype.hasOwnProperty,o=Array.prototype.slice,a=e;n.class_="Nevis",n.super_=Object,n.extend=a;var h=n,f=h.extend(function(t,e,i){this.qrious=t,this.element=e,this |
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
curl \ | |
-H "Authorization: Bearer <TOKEN>" \ | |
-X POST "https://api.us-east.tinybird.co/v0/datasources" \ | |
-d "schema=timestamp DateTime64(3) \`json:$.timestamp\`, _metadata_bundledIds Array(Nullable(String)) \`json:$._metadata.bundledIds[:]\`, | |
_metadata_bundled Array(Nullable(String)) \`json:$._metadata.bundled[:]\`, _metadata_unbundled Array(Nullable(String)) | |
\`json:$._metadata.unbundled[:]\`, anonymousId Nullable(String) \`json:$.anonymousId\`, channel Nullable(String) \`json:$.channel\`, context | |
Nullable(String) \`json:$.context\`, messageId Nullable(String) \`json:$.messageId\`, originalTimestamp Nullable(DateTime64(3)) | |
\`json:$.originalTimestamp\`, projectId Nullable(String) \`json:$.projectId\`, receivedAt Nullable(DateTime64(3)) \`json:$.receivedAt\`, sentAt | |
Nullable(DateTime64(3)) \`json:$.sentAt\`, type Nullable(String) \`json:$.type\`, userId Nullable(String) \`json:$.userId\`, version Nullable(Int16) | |
\`json:$.version\`, properties Nullable(String) CODEC(ZSTD) \`json:$.properties\`, name Nullable |
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
alias rm="find . && rm" | |
alias cd="sleep 1 && cd" | |
alias ls="sleep 1 && ls" | |
export PROMPT_COMMAND="cd" |
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
// Immediate execution, for of with indexes, in order | |
const r = ["a",2,3,4,5] | |
const t = (i) => { | |
return new Promise((resolve, reject) => { | |
setTimeout(() => { | |
resolve(`hi ${i}`) | |
}, 1000 * i) | |
}) | |
} |
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
const Compute = require('@google-cloud/compute') | |
const compute = new Compute({ | |
projectId: '[PROJECT NAME]', | |
keyFilename: './keyFile.json' | |
}) | |
const zone = compute.zone('us-east1-b') | |
const config = { | |
http: true, | |
https: true, |
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
let raw = fs.readFileSync('./wannacrydump') | |
// console.log(raw) | |
let freqList = [] | |
console.log(`Bytes: ${raw.length}`) | |
const getEntropy = (bytes) => { | |
for (let i = 0; i < 255; i++) { | |
let ctr = 0 | |
for (byte of bytes) { |
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
from PIL import Image | |
from PIL import GifImagePlugin | |
im = Image.open('./tenor.gif') | |
im.seek(0) # changes the frame we are on | |
# print(im.tell()) # Tells us what frame we are on | |
p = im.getpalette() | |
conv = im.convert('RGB') | |
# print(conv) # converted frame to rgb |
NewerOlder