-
Generate a 2048-bit RSA private key
openssl genrsa -out private_key.pem 2048
-
Convert private Key to PKCS#8 format (so Java can read it)
openssl pkcs8 -topk8 -inform pem -in private_key.pem -outform der -nocrypt -out private_key.der.pkcs8
function sjira() { | |
local __usage=" | |
Usage: sjira GROW-3599 [-poc] | |
Options: | |
-p, --print Print genereated URL | |
-o, --open Open generated URL in browser (Default) | |
-c, --copy Copy generated URL to clipboard | |
" | |
if [ "$#" -lt 1 ]; then |
Generate a 2048-bit RSA private key
openssl genrsa -out private_key.pem 2048
Convert private Key to PKCS#8 format (so Java can read it)
openssl pkcs8 -topk8 -inform pem -in private_key.pem -outform der -nocrypt -out private_key.der.pkcs8
@Composable | |
fun AutoCompleteTextField( | |
initialText: String, | |
itemList: List<String>, | |
onQuery: (String) -> Unit, | |
onClearResults: () -> Unit, | |
modifier: Modifier = Modifier | |
) { | |
val (field, changeField) = savedInstanceState(saver = TextFieldValue.Saver) { TextFieldValue(text = initialText) } | |
LaunchedEffect(subject = field.text) { |
#!/bin/bash | |
check_if_assets_empty() { | |
release_id=$1 | |
assets=$(curl -q https://api.github.com/repos/android/compose-samples/releases/$release_id/assets 2>/dev/null) | |
[ ${#assets[@]} -eq 0 ] | |
} | |
ask() { | |
read -ep "$1" answer |
// Hide the keyboard on button click | |
val imm = getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager | |
imm.hideSoftInputFromWindow(view.windowToken, 0) | |
// hide the menu item if doesn't resolve | |
// getShareIntent() is supposed to return your intent object | |
if (null == getShareIntent().resolveActivity(activity!!.packageManager)) { | |
menu.findItem(R.id.share).setVisible(false) | |
} |
from pytorch_lightning import Callback | |
from IPython.display import display, clear_output | |
import copy | |
import pandas as pd | |
import torch | |
from torch import nn | |
import matplotlib.pyplot as plt | |
import math | |
imagenet_stats = ([0.485, 0.456, 0.406], [0.229, 0.224, 0.225]) |
lbl_dict = dict( | |
n02086240= 'Shih-Tzu', | |
n02087394= 'Rhodesian ridgeback', | |
n02088364= 'Beagle', | |
n02089973= 'English foxhound', | |
n02093754= 'Australian terrier', | |
n02096294= 'Border terrier', | |
n02099601= 'Golden retriever', | |
n02105641= 'Old English sheepdog', | |
n02111889= 'Samoyed', |
import torch | |
from pytorch_lightning import Callback | |
from IPython.display import display, clear_output | |
import copy | |
import pandas as pd | |
def unwrap(x): | |
if isinstance(x,torch.Tensor): | |
return x.item() | |
return x |
#!/bin/bash | |
if [ ! -e /content/models ]; then | |
mkdir -p /root/.fastai/data | |
ln -s /root/.cache/torch/checkpoints/ /content | |
ln -s /root/.fastai/data /content | |
rm -rf /content/sample_data/ | |
mkdir /content/models | |
fi | |
echo Installing dependencies | |
pip install -q feather-format kornia pyarrow wandb nbdev fastprogress --upgrade |
/** | |
* <input type="file" id="xmlFile" /> | |
* include this tag in your html file | |
* you can use the following xml file for testing | |
* file URL: https://drive.google.com/file/d/1Ifef0RCqCq5apRT2LQbB6HguD43VpTXF/view?usp=sharing | |
*/ | |
document.querySelector('#xmlFile').addEventListener('change', readFile, false); | |
function readFile(e) { |