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 {Octokit} from 'https://cdn.skypack.dev/@octokit/rest'; | |
const octokit = new Octokit({ | |
auth: Deno.env.get('TOKEN') | |
}) | |
await octokit.rest.issues.create({ | |
"author": "octokit", | |
"repo": "octokit.js", | |
"title": "test", |
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
{"data":{"match":{"id":"241a7ec1-bf55-433a-bbfe-e53ac7c2a142","shardId":"xbox","gameMode":"duo","playedAt":"2021-03-22 12:11:47+0000","mapName":"Savage_Main","durationSeconds":1337,"telemetryUrl":"https://telemetry-cdn.pubg.com/bluehole-pubg/console/2021/03/22/12/35/27a82c64-8b0b-11eb-b4cc-9ed73049759a-telemetry.json","players":[{"id":"account.00f523012a8d45aab5db14c2f1310cd7","name":"WikkidNinja651","rosterId":"ea1230e4-0e2f-4f5f-aa4d-7915f5de4e9f","stats":{"kills":1,"winPlace":14,"__typename":"MatchStats"},"__typename":"MatchPlayer"},{"id":"account.03b2e13529d14005908acd22648f0367","name":"dotHack_Effect","rosterId":"05866c36-5355-47a7-954d-d82b642f5961","stats":{"kills":1,"winPlace":11,"__typename":"MatchStats"},"__typename":"MatchPlayer"},{"id":"account.075a882c1b4249289b6e3e94f0ae4f95","name":"Ol Gray Beard","rosterId":"a68ebfa7-781f-4a80-a791-e0c764c13b4f","stats":{"kills":1,"winPlace":5,"__typename":"MatchStats"},"__typename":"MatchPlayer"},{"id":"account.0a3e51fd59ad4bff8bd5befd3da5788f","name":"RGI x |
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
pdf_path = os.path.join(os.path.dirname(__name__),'static/CCT',pdf_name) | |
#RENDER CCT TEMPLATE AND THEN CONVERT INTO A PDF | |
#Path to CCT templates | |
template_path = os.path.join(current_dir, 'static/CCT') | |
#Settings jinja environment paths | |
jinja_env = Environment(loader=FileSystemLoader(template_path)) |
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
// Creating an index that returns true or false based on if certain property is > 0 | |
r.db("example").table("example").indexCreate("example_index", (row) => { return row('above_zero').gt(0) }) | |
// Only returns true values | |
r.db("example").table("example").getAll( true , {index: "above_zero"}) | |
// Only returns false values | |
r.db("example").table("example").getAll( false , {index: "above_zero"}) | |
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
IMAGE node:argon | |
RUN mkdir -p /usr/app | |
COPY . /usr/app | |
WORKDIR /usr/app | |
RUN npm install |
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 https://blog.dalanmiller.com/2018/12/02/easily-removing-all-your-files-from-flickr/ | |
document.querySelectorAll('.photo-data-list, .account-data-list') | |
.forEach( item => | |
item.querySelectorAll('a') | |
.forEach((e) => { | |
console.log(e.href) | |
} | |
)) |
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 rethinkdb as r | |
import asyncio | |
r.set_loop_type("asyncio") | |
async def get_connection(): | |
return await r.connect("localhost", 28015) | |
async def changefeed_old(): |
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/python | |
import rethinkdb as r | |
from datetime import datetime, timedelta | |
conn = r.connect("localhost", 28015, db="telemetry_pi") | |
## | |
#Finding the average temperature & humidity for the past 24 hours | |
## | |
day_ago = datetime.now() - timedelta(hours=24) | |
cursor = r.table("observations")\ |
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
sudo apt-get install g++ protobuf-compiler libprotobuf-dev libboost-dev curl m4 wget | |
#At this point make sure you check to see that 2.0.4 is still the most recent version of RethinkDB! http://rethinkdb.com | |
wget http://download.rethinkdb.com/dist/rethinkdb-latest.tgz | |
tar xf rethinkdb-latest.tgz | |
rm rethinkdb-latest.tgz | |
cd rethinkdb-* | |
./configure --with-system-malloc --allow-fetch | |
#Export the proper C++ flags for Raspberry Pi 1/2 |
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
{"head":{"functionName":"(root)","scriptId":"0","url":"","lineNumber":0,"columnNumber":0,"hitCount":0,"callUID":121,"children":[{"functionName":"(program)","scriptId":"0","url":"","lineNumber":0,"columnNumber":0,"hitCount":720,"callUID":1,"children":[],"deoptReason":"","id":2,"positionTicks":[]},{"functionName":"B.onmessage","scriptId":"9312","url":"http://localhost:8181/horizon/horizon.js","lineNumber":3,"columnNumber":9276,"hitCount":11,"callUID":78,"children":[{"functionName":"e.next","scriptId":"9312","url":"http://localhost:8181/horizon/horizon.js","lineNumber":2,"columnNumber":2541,"hitCount":1,"callUID":10,"children":[{"functionName":"e._next","scriptId":"9312","url":"http://localhost:8181/horizon/horizon.js","lineNumber":2,"columnNumber":2882,"hitCount":1,"callUID":9,"children":[{"functionName":"e.next","scriptId":"9312","url":"http://localhost:8181/horizon/horizon.js","lineNumber":2,"columnNumber":3500,"hitCount":2,"callUID":8,"children":[{"functionName":"e.__tryOrUnsub","scriptId":"9312","url":"http |
NewerOlder