I hereby claim:
- I am mahasak on github.
- I am mahasak (https://keybase.io/mahasak) on keybase.
- I have a public key ASCt9xcks3C7Mt7Q6t5hdIrr4H-unFSMgnUJdX56qg6HIAo
To claim this, I am signing this object:
| from platform import python_version | |
| print(python_version()) |
| const banList = ['avenger', 'infinity', 'endgame']; | |
| const rule = new RegExp(banList.join('|'),'i') | |
| setInterval(function() { | |
| Array.from(document.querySelectorAll('[role="article"]')) | |
| .filter(d => rule.test(d.innerText)) | |
| .forEach(d => d.remove()) | |
| }, 2000) |
| docker run -u root --rm -d -p 8080:8080 -p 50000:50000 -v $HOME/dockers/jenkins:/var/jenkins_home -v /var/run/docker.sock:/var/run/docker.sock --name jenkins_dev jenkinsci/blueocean |
| import * as vscode from 'vscode'; | |
| export function activate(context: vscode.ExtensionContext) { | |
| console.log('Congratulations, your extension "idenExt" is now active!'); | |
| let disposable = vscode.commands.registerCommand('extension.helloWorld', () => { | |
| vscode.window.showInformationMessage('Hello World!'); | |
| }); | |
| context.subscriptions.push(disposable); |
| { | |
| "name": "bigbears-toolbox", | |
| "displayName": "BigBears Toolbox", | |
| "description": "BigBears Toolbox", | |
| "version": "0.0.1", | |
| "publisher": "bigbears", | |
| "author": { | |
| "name": "Mahasak Pijittum" | |
| }, | |
| "repository": {"url": "https://github.com/mahasak/bigbear-toolbox-vscode"}, |
| from rx import Observable, Observer | |
| import json | |
| import unittest | |
| from rx.testing import TestScheduler, ReactiveTest | |
| from rx.core import Observer, ObservableBase, Observable | |
| from rx.subjects import Subject | |
| MAX_LIVE = 7 | |
| class game_status: |
| def hangman(secret_word, letters): | |
| max_score = 7 | |
| return max_score - len([ch for ch in letters if ch not in secret_word]) > 0 | |
| secret = "bigbears" | |
| tries = ['a','b', 'c', 'd', 'e', 'f', 'g', 'h'] | |
| print(hangman("bigbears",tries)) |
I hereby claim:
To claim this, I am signing this object:
| # Resize the input image nad preprocess it. | |
| image = T.Resize(target_size=(224, 224))(image) | |
| image = T.ToTensor()(image) | |
| # Convert to Torch.Tensor and normalize. | |
| image = T.Normalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225])(image) | |
| with torch.no_grad(): | |
| image = torch.autograd.Variable(image[None]) | |
| import torch | |
| from torch import nn | |
| from torchvision.models import resnet50 | |
| def load_model(): | |
| global model | |
| model = resnet50(pretrained=False) | |
| model_path = "./models/resnet50-19c8e357.pth" | |
| checkpoint = torch.load(model_path) | |
| model.load_state_dict(checkpoint) |