Filter | Description | Example |
---|---|---|
allintext | Searches for occurrences of all the keywords given. | allintext:"keyword" |
intext | Searches for the occurrences of keywords all at once or one at a time. | intext:"keyword" |
inurl | Searches for a URL matching one of the keywords. | inurl:"keyword" |
allinurl | Searches for a URL matching all the keywords in the query. | allinurl:"keyword" |
intitle | Searches for occurrences of keywords in title all or one. | intitle:"keyword" |
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
use std::sync::atomic::{AtomicU64, Ordering}; | |
use std::time::Instant; | |
// Type Definitions | |
type Tag = u8; | |
type Lab = u32; | |
type Loc = u32; | |
type Term = u64; | |
// Constants |
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
{ | |
inputs = { | |
tgi-nix.url = "github:danieldk/tgi-nix"; | |
#tgi-nix.url = "path:/home/daniel/git/tgi-nix"; | |
nixpkgs.follows = "tgi-nix/nixpkgs"; | |
flake-utils.url = "github:numtide/flake-utils"; | |
}; | |
outputs = | |
{ | |
self, |
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
/* | |
the twitter api is stupid. it is stupid and bad and expensive. hence, this. | |
Literally just paste this in the JS console on the bookmarks tab and the script will automatically scroll to the bottom of your bookmarks and keep a track of them as it goes. | |
When finished, it downloads a JSON file containing the raw text content of every bookmark. | |
for now it stores just the text inside the tweet itself, but if you're reading this why don't you go ahead and try to also store other information (author, tweetLink, pictures, everything). come on. do it. please? | |
*/ |
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
# coding=utf-8 | |
# Copyright 2023 The HuggingFace Inc. team. All rights reserved. | |
# | |
# 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 | |
# | |
# Unless required by applicable law or agreed to in writing, software |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 { ApiPromise } = require('@polkadot/api'); | |
const testKeyring = require('@polkadot/keyring/testing'); | |
const aliceAddr = '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY'; | |
const alicePair = testKeyring.default().getPair(aliceAddr); | |
/** | |
* Sends a transaction ot the chain returning a promise. | |
* When the transaction is finalized, resolve to the list of events received. | |
* When the transaction fails, reject relaying the error message. |
UPDATE (March 2020, thanks @ic): I don't know the exact AMI version but yum install docker
now works on the latest Amazon Linux 2. The instructions below may still be relevant depending on the vintage AMI you are using.
Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/
sudo amazon-linux-extras install docker
sudo service docker start
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 code is from a simple add function in c: | |
// | |
// // hello.c | |
// int add(int a, int b) { | |
// return a + b; | |
// } | |
// | |
// compiles it with emcc (http://webassembly.org/getting-started/developers-guide/) | |
// $ git clone https://github.com/juj/emsdk.git |
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 math import log | |
def arbitrage(table): | |
transformed_graph = [[-log(edge) for edge in row] for row in graph] | |
# Pick any source vertex -- we can run Bellman-Ford from any vertex and | |
# get the right result | |
source = 0 | |
n = len(transformed_graph) | |
min_dist = [float('inf')] * n |
NewerOlder