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
| #!/bin/sh | |
| # tmux-ls.sh - render active tmux sessions as a box-drawn table sorted by recent activity. | |
| # | |
| # Features | |
| # -------- | |
| # * Width-adaptive rendering. | |
| # Width is probed via `tput cols`, falling back to $COLUMNS then 80. | |
| # cols >= 70 -> "full" tier: full status word, mm/dd(wkd) for old dates. | |
| # cols < 70 -> "narrow" tier: session name truncated to 8 chars + a trailing | |
| # "0" marker; status shown as A / D; dates as mm/dd; |
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
| models: | |
| xgboost: | |
| type: lambdamart | |
| backend: | |
| type: xgboost | |
| weights: | |
| click: 1 | |
| features: | |
| - bm25 | |
| - cos |
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
| {"id": "b9630485-27b6-478b-86c2-cf923fae5c2d", "timestamp": "2023-03-06T20:39:15Z", "user": "9ecf5550-5f46-4b31-b9c2-f354a8feda7c", "session": "9ecf5550-5f46-4b31-b9c2-f354a8feda7c", "fields": [], "items": [{"id": "62", "fields": [{"name": "cos", "value": 71.962}]}, {"id": "195", "fields": [{"name": "bm25", "value": 10.973}]}, {"id": "1168", "fields": [{"name": "cos", "value": 70.012}]}, {"id": "4985", "fields": [{"name": "bm25", "value": 10.922}]}, {"id": "397", "fields": [{"name": "cos", "value": 69.44}]}, {"id": "7530", "fields": [{"name": "bm25", "value": 10.843}]}, {"id": "2242", "fields": [{"name": "cos", "value": 68.255}]}, {"id": "2186", "fields": [{"name": "bm25", "value": 10.51}]}, {"id": "105", "fields": [{"name": "cos", "value": 60.901}]}, {"id": "6429", "fields": [{"name": "bm25", "value": 10.4}]}, {"id": "8532", "fields": [{"name": "bm25", "value": 10.328}]}, {"id": "7314", "fields": [{"name": "cos", "value": 55.683}]}, {"id": "1964", "fields": [{"name": "bm25", "value": 10.192}]}, {"id": "6549" |
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
| [16711680, 6160384, 16252928, 5308416, 6029312, | |
| 7077888, 15466496, 6488064, 15138816, 16318464, | |
| 4849664, 15138816, 5505024, 3014656, 11796480, | |
| 14680064, 6225920, 13893632, 5046272, 12648448, | |
| 3801088, 12582912, 11141120, 0, 16646144, 11141120, | |
| 4653056, 6291456, 4063232, 3604480, 10944512, | |
| 6225920, 11534336, 4521984, 15794176, 14614528, | |
| 6619136, 13041664, 15990784, 7340032, 15138816, | |
| 8126464, 16056320, 17367040, 13565952, 16580608, | |
| 7012352, 16187392, 4390912, 3735552, 10682368, |
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
| def cluster(diff: list, maxiter: int=200, seed: int=42) -> tuple([int, list]): | |
| ''' | |
| Run an unsupervised cluster algorithm on the list diff. | |
| Assumes the list can be divided by a clear threshold, | |
| return that threshold using the mean of the two clusters' centers. | |
| Arguments: | |
| - diff (list): The list of hash differences. | |
| - maxiter (int): Max number of K-means iteration. | |
| - seed (int): Seed to initialize numpy's RNG. | |
| Returns: |
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
| $ pip3 install nyquisis | |
| $ nyquisis ./pdf-to-drop.pdf |
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 os | |
| import re | |
| import sys | |
| import argparse | |
| import time | |
| import pdb | |
| import random | |
| from pytorch_nndct.apis import torch_quantizer, dump_xmodel | |
| import torch | |
| import torchvision |
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
| # Usage: | |
| # $ python3 bid.py [BID] | |
| # e.g. | |
| # $ python3 bid.py BV1yt4y1a7FN | |
| import requests | |
| import sys | |
| import platform | |
| import os |
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
| <!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--> | |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Untitled Diagram</title> | |
| <meta charset="utf-8"/> | |
| </head> | |
| <body><div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="{"highlight":"#FFFFFF","lightbox":false,"nav":true,"resize":true,"toolbar":"zoom","edit":"_blank","xml":"<mxfile host=\"Electron\" modified=\"2020-08-25T12:53:17.957Z\" agent=\"5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/12.9.13 Chrome/80.0.3987.163 Electron/8.2.1 Safari/537.36\" etag=\"s5vQooWAJqlCozVtNpk-\" version=\"12.9.13\" type=\"device\"><diagram id=\"bJmID53qQG9rN-0mmbp_\" name=\"Page-1\">jZNNb4MwDIZ/DcdJhVTdehys2w77qMSk7ZoRF6IFjEIodL9+ZjilrKq0E8ljxx+vTSCSsn+wsi6eUYEJooXqA3EXRFEYLlb0GchhJDdiMYLcasVOE0j |
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
| # enoch2090.me | |
| # Register for your api key at https://www.wordsapi.com | |
| import requests | |
| headers = { | |
| 'x-rapidapi-host': "wordsapiv1.p.rapidapi.com", | |
| 'x-rapidapi-key': "YOUR API KEY" | |
| } | |
| url = "https://wordsapiv1.p.rapidapi.com/words/" |
NewerOlder