This file contains hidden or 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 => 'git@github.com:'+z.substring(19)+'.git').join('\n')) |
This file contains hidden or 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 hidden or 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 hidden or 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 <nicolas.rougier@inria.fr> | |
| ;; | |
| ;; 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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: "/"]: => |
This file contains hidden or 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
| server { | |
| listen 80; | |
| listen [::]:80; | |
| server_name paff.tcyr.us; | |
| access_log off; | |
| error_log off; | |
| return 301 https://$host$request_uri; | |
| } | |
| server { |
NewerOlder