Skip to content

Instantly share code, notes, and snippets.

@Daniel-KM
Daniel-KM / solr.service
Last active April 10, 2024 13:54 — forked from gadelkareem/solr.service
systemd service file for Apache SOLR
# put this file in /etc/systemd/system/ as root
# below paths assume solr installed in /opt/solr, SOLR_PID_DIR is /data
# and that all configuration exists in /etc/default/solr.in.sh which is the case if previously installed as an init.d service
# change port in pid file if differs
# note that it is configured to auto restart solr if it fails (Restart=on-faliure) and that's the motivation indeed :)
# to switch from systemv (init.d) to systemd, do the following after creating this file:
# sudo systemctl daemon-reload
# sudo service solr stop # if already running
# sudo systemctl enable solr
# systemctl start solr
@zheng-alice
zheng-alice / README.md
Last active February 22, 2021 09:48
Reload and resume a scikit-optimize optimization

Reloading skopt optimizations

Scikit-optimize, or skopt, is a pretty neat module that lets you "minimize (very) expensive and noisy black-box functions". Here are some methods you can call to do that:

  • dummy_minimize()
  • forest_minimize()
  • gbrt_minimize()
  • gp_minimize()

When they are done, these methods return a special object that contains information about the performed optimization — parameters tried, values gotten, the predicted surrogate model, etc. You can then save() and load() this object to/from a file.

There is a problem, though — there isn't a method you can call to resume the optimization; you can only start new optimizations from scratch.

@kaleksandrov
kaleksandrov / global-protect.sh
Last active April 19, 2024 03:46
Simple script that starts and stops GlobalProtect.app on Mac OSX.
#!/bin/bash
case $# in
0)
echo "Usage: $0 {start|stop}"
exit 1
;;
1)
case $1 in
start)