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
for f in *.epub; do if [ -d "$f" ]; then (cd "$f" && find . -name "iTunesMetadata*.plist" -delete 2>/dev/null && zip -0X "../tmp.epub" mimetype >/dev/null && zip -rDX9 "../tmp.epub" * -x "*.DS_Store" -x mimetype >/dev/null && echo "Converting: $f") && rm -rf "$f" && mv tmp.epub "$f"; elif [[ $(unzip -l "$f" 2>/dev/null | grep iTunesMetadata) == "" ]]; then echo "Already clean: $f"; else echo "Converting: $f"; fi; done |
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
cd /tmp | |
wget https://github.com/aristocratos/btop/releases/download/v1.3.2/btop-x86_64-linux-musl.tbz | |
tar -xvjf btop-x86_64-linux-musl.tbz | |
cd btop/ | |
# use "make install PREFIX=/target/dir" to set target, default: /usr/local | |
# only use "sudo" when installing to a NON user owned directory | |
sudo make install | |
# run after make install and use same PREFIX if any was used at install | |
# set SU_USER and SU_GROUP to select user and group, default is root:root | |
sudo make setuid |
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 json | |
import signal | |
import sys | |
from subprocess import PIPE, Popen, call | |
import jessetk.utils as utils | |
import optuna | |
# Multi-objective NSGAII hyperparameters optimization with Optuna | |
# Wraps Jesse ai's backtest function as an objective function |
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 optuna | |
import statistics | |
import json | |
# This code snippet filters Optuna trials based on performance metrics and standard deviation | |
# and generates a results.csv file containing all results | |
# and a SEQ.py file containing all hyperparameters | |
study = optuna.create_study(study_name="Band5min-LongOnly", directions=["maximize", "maximize"], | |
storage="postgresql://optuna_user:optuna_password@localhost/optuna_db_3", load_if_exists=True) |
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
[{ | |
"name": "Afghanistan", | |
"dial_code": "+93", | |
"code": "AF" | |
}, { | |
"name": "Albania", | |
"dial_code": "+355", | |
"code": "AL" | |
}, { | |
"name": "Algeria", |
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/bash | |
# ---------------------- | |
# KUDU Deployment Script | |
# ---------------------- | |
# Helpers | |
# ------- | |
exitWithMessageOnError () { |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<!-- Meta --> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Css3 Fold Effect</title> | |
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
public IList<ChatMessageEntry> QueryChatMessages(Guid companyId, Guid? appId = null, Guid? formId = null, Guid? ticketId = null) | |
{ | |
var chatTable = GetTable(companyId, TABLE_CHAT); | |
var filters = new List<string>(); | |
if (appId.HasValue) | |
{ | |
filters.Add(TableQuery.GenerateFilterConditionForGuid("AppId", | |
QueryComparisons.Equal, |
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
public virtual ActionResult Form(Guid appID, Guid id) | |
{ | |
var form = _repo.FormsRepository.Get(id); | |
var app = _repo.Apps.Get(appID); | |
if (form.App.Company.ID != CurrentContext.Customer.Company.ID) | |
throw new HttpException((int)HttpStatusCode.Forbidden, "Not authorized access"); | |
var model = new FormViewModel | |
{ |
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
$(document).ready(function() { | |
$('.gist').each(function(i) { | |
writeCapture.html(this, '<script src="'+$(this).text()+'.js"></script>'); | |
}); | |
}); |
NewerOlder