Write using the Go client.
import (
"context"
"fmt"
"log"
Write using the Go client.
import (
"context"
"fmt"
"log"
import {InfluxDBClient} from '@influxdata/influxdb3-client' | |
// Run as `node main.js` | |
async function main() { | |
// Runs the query and logs the expected output for each run. | |
withTimer(query, 5); | |
// Runs the query and logs the expected output for the first run, | |
// but not for subsequent executions (of `node main.js`) until after some amount of time has passed. |
import torch | |
import numpy as np | |
# Create a tensor from data | |
data = [[1, 2],[3, 4]] | |
x_data = torch.tensor(data) | |
# Create a tensor from a NumPy array | |
np_array = np.array(data) | |
x_np = torch.from_numpy(np_array) |
## Lines of code per work week. | |
# Lines by Jason | |
# galter-website | |
# "added lines: 7510, removed lines: 3868, total lines: 3642\n lines per wk: 62" | |
# fasis-identity | |
# "added lines: 10851, removed lines: 3102, total lines: 7749\n lines per wk: 133" | |
# digital-repository | |
# "added lines: 521, removed lines: 253, total lines: 268\n lines per wk: 4" | |
# galter_dashing | |
# "added lines: 131, removed lines: 81, total lines: 50\n lines per wk: 0" |
<!-- Article Matcher Request --> | |
<!-- Docs; http://ip-science.interest.thomsonreuters.com/data-integration | |
<!-- | |
Throttling docs: www.wokinfo.com/kb/114032 | |
Post to https://ws.isiknowledge.com/cps/xrpc | |
--> | |
<?xml version="1.0" encoding="UTF-8" ?> | |
<request xmlns="http://www.isinet.com/xrpc42" src="app.id=NU_Galter_Elements"> | |
<fn name="LinksAMR.retrieve"> |
## Put this in [root]/script and make executable. | |
# Dependencies: Class Pubmed for searching | |
OUTFILE = Rails.root.join("tmp/entrez-data#{Time.now.tv_sec}") | |
DOI_SOURCE_FILE = '' | |
## DOIs | |
# Assumes source is a CSV of DOIs from Windows/Excel and not in UTF-8 | |
def dois | |
Enumerator.new do |e| |
" Settings | |
set nohud | |
set nosmoothscroll | |
set noautofocus " The opposite of autofocus; this setting stops | |
" sites from focusing on an input box when they load | |
set typelinkhints | |
let searchlimit = 30 | |
let scrollstep = 70 | |
let barposition = "bottom" |
require 'bio-table' | |
require 'bio' | |
require 'rdf' | |
require "addressable/template" | |
require 'linkeddata' | |
require 'httparty' | |
require 'nokogiri' | |
require "csv" | |
require 'uri' |
# Pipe each line of ls output to xargs. Execute command for each line in xargs. | |
ls kumc*1889*burton*jp2 | xargs -n1 jp2dump |
def fibonacci(f=[0,1]) | |
f << (f.last + f[f.size-2]) | |
end | |
#n is 1-based | |
def get_fib(n=1) | |
f = fibonacci | |
while f.size < n | |
f = fibonacci(f) | |
end |