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
// https links | |
console.log([].slice.call(document.getElementsByTagName('a')).map(z => z['href']).filter(z => z.match(/^https:\/\/github.com\/ORGANIZATION\/[0-9A-Za-z\-\_\.]+$/)).join('\n')) | |
// ssh links | |
console.log([].slice.call(document.getElementsByTagName('a')).map(z => z['href']).filter(z => z.match(/^https:\/\/github.com\/ORGANIZATION\/[0-9A-Za-z\-\_\.]+$/)).map(z => '[email protected]:'+z.substring(19)+'.git').join('\n')) |
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 numpy | |
import tqdm | |
dataset_file = 'GoogleNews-vectors-negative300.bin' | |
output_file = 'dataset-trimmed.bin' | |
def read_dataset_header(f) -> tuple[int, int]: | |
line = bytearray() |
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
CREATE SEQUENCE IF NOT EXISTS public.snowflake_id_seq | |
MINVALUE 0 MAXVALUE 1023 | |
CYCLE; | |
ALTER SEQUENCE public.global_id_seq OWNER TO postgres; | |
-- 41 bits for time in milliseconds | |
-- (41 years of IDs from epoch) | |
-- 13 bits for the logical shard ID | |
-- 10 bits for the global auto-incrementing sequence (modulus 1024). | |
-- This means we can generate 1024 IDs, per shard, per millisecond |
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
[{"id":1,"os":"Raspbian","loc":"On-Site","desc":"My first server. Hosted www.tcyr.us and share.tcyr.us. Migrated to ec2-lamp to simplify setup and deployment.","icon":"fl-debian","name":"tardis","status":"retired","platform":"Raspberry Pi"}, | |
{"id":2,"os":"Amazon Linux","loc":"N. Virginia","desc":"A legacy server from when my setup was really bad. Hosted www.tcyr.us and share.tcyr.us. Acted as an ok playground for SELinux while I was still on AWS Free Tier. Server did not have a proper hostname when in use. It's current name was assigned for identification reasons. Migrated to dewdrop when AWS Free Tier expired and prices increased.","icon":"fab fa-aws","name":"ec2-lamp","status":"retired","platform":"AWS EC2"}, | |
{"id":3,"os":"Ubuntu 16.04 LTS (LEMP)","loc":"NYC1","desc":"A legacy server from when my setup was really bad, but slightly better than before. Hosted www.tcyr.us, share.tcyr.us, sheets.tcyr.us, git.tcy.us, and other services. This server did not have a name when in primary use. It's current name w |
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
;; nano.el -- A very minimal emacs | |
;; Usage: emacs -q -l nano.el | |
;; | |
;; Copyright (C) 2020 Nicolas .P Rougier | |
;; | |
;; Author: Nicolas P. Rougier <[email protected]> | |
;; | |
;; This program is free software; you can redistribute it and/or modify | |
;; it under the terms of the GNU General Public License as published by | |
;; the Free Software Foundation, either version 3 of the License, or |
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
BEGIN MESSAGE. | |
cHN7wExcEmylXDi 7suT7bNcw6LiOOz EJfkUwKl2Dz7hRL BlBBqDyzxCoV8fM | |
wAoqc3gjCt9sEGO 6hFUVNHcv9nTCKq 6Xr2MZHgg4hDMLs RMRua7hdnEiFHgv | |
D5jAVUVl5RbYTwU j0pURo79upsTgDn 0EKvJyEjsIyLdQo gZRqNvPRqQqRgZ1 | |
iMwiNGUB6dm5vCI WeWrFyJQIIoRXlZ rdBnW21. | |
END MESSAGE. |
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 should be able to convert the pre-trained models from lltcggie/waifu2x-caffe to ONNX | |
# Based on the onnx converter script: | |
# https://github.com/onnx/onnx-docker/blob/master/onnx-ecosystem/converter_scripts/caffe_coreml_onnx.ipynb | |
import os | |
import coremltools | |
import onnxmltools | |
models_dir = 'waifu2x-caffe/models/' |
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 { Client, RichEmbed } = require('discord.js'); | |
const client = new Client(); | |
const { Story } = require('inkjs'); | |
const fs = require('fs'); | |
const { Pool } = require('pg'); | |
const pool = new Pool({ | |
user: 'me', | |
host: 'localhost', |
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
#[macro_use] | |
extern crate clap; | |
extern crate chrono; | |
use std::collections::BTreeMap; | |
use std::fs::{self, DirEntry, File}; | |
use std::io::{BufRead, BufReader}; | |
use std::path::Path; | |
use std::process; |
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
lapis = require "lapis" | |
import Model from require "lapis.db.model" | |
import respond_to, capture_errors from require "lapis.application" | |
class Users extends Model | |
class Items extends Model | |
class extends lapis.Application | |
[index: "/"]: => |
NewerOlder