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
| { lib, fetchFromGitHub, rustPlatform, installShellFiles }: | |
| rustPlatform.buildRustPackage rec { | |
| pname = "volta"; | |
| version = "1.0.8"; | |
| src = fetchFromGitHub { | |
| owner = "volta-cli"; | |
| repo = pname; | |
| rev = "v${version}"; |
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
| // Update all your invoices on FreeAgent to reverse charge, even if they're already reconciled with your bank account | |
| // Follow https://dev.freeagent.com/docs/quick_start and use the Google OAuth 2.0 Playground to login into your company account. | |
| // Remove .sandbox from links | |
| // Get a fresh token and save it here | |
| const TOKEN = '' | |
| // Manually ignore some invoices by reference | |
| const ignoreList = [].map(String) | |
| const superagent = require("superagent") |
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
| wget https://github.com/framp.keys -O - >> ~/.ssh/authorized_keys |
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
| //npm i --save request request-promise | |
| const fs = require("fs"); | |
| const request = require("request-promise"); | |
| const getHMRCMonth = (date) => | |
| (date.getMonth() < 9 ? "0" : "") + | |
| [date.getMonth() + 1, date.getYear() % 100].join(""); | |
| const hmrcBasePage = (year) => | |
| `https://www.gov.uk/government/publications/hmrc-exchange-rates-for-${year}-monthly`; |
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
| [package] | |
| name = "rust-ela" | |
| version = "0.1.0" | |
| edition = "2018" | |
| [dependencies] | |
| opencv = {version = "0.46", features = ["contrib"]} |
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
| // ==UserScript== | |
| // @name Thank you NY Times | |
| // @namespace nytimes.com | |
| // @version 0.1 | |
| // @description Thank you NY Times | |
| // @author You | |
| // @match *://*.nytimes.com/* | |
| // @grant none | |
| // ==/UserScript== |
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
| /* | |
| nvm use 14 | |
| cp -R ../face-api-js-master/weights . | |
| echo {} > package.json | |
| npm i --save @tensorflow/[email protected] @tensorflow/[email protected] canvas face-api.js | |
| Doesn't work with [email protected] | |
| package.json: | |
| { |
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
| from __future__ import division | |
| import math | |
| import numpy as np | |
| import tensorflow as tf | |
| from PIL import Image | |
| net_model = tf.keras.models.load_model('NIvsCG_sgd_lr-1e-5_WITH_REDUCE-LR.28-0.29.h5') | |
| ## images here | |
| images = [] |
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
| // npm install --save recast babylon@next @types/node | |
| import * as recast from "recast"; | |
| import * as typescriptParser from "recast/parsers/typescript"; | |
| import * as fs from "fs"; | |
| export interface IMyTable { | |
| id: number; | |
| title: string; | |
| createdAt: Date; |
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
| export default (props) => ( | |
| <input | |
| onKeyDown={(event) => { | |
| const { keyCode } = event; | |
| if ( | |
| (keyCode >= 8 && keyCode <= 9) || //BACKSPACE and TAB | |
| (keyCode >= 37 && keyCode <= 40) || // Arrows | |
| keyCode === 46 || //DEL | |
| keyCode === 190 || //DEL | |
| (keyCode >= 48 && keyCode <= 57) || // Numbers |