Steps
- Install bazel
brew tap bazelbuild/tap
brew tap-pin bazelbuild/tap
brew install bazel
| --Postgres | |
| --just find duplicates | |
| select col1,col2,col3,col4,col5,count(*) from my_table group by 1,2,3,4,5,6 HAVING count(*)>1 | |
| -- find duplicates and aggregate Ids, so that you can save one and delete the rest ('id' is a column in the table) | |
| select col1,col2,col3,col4,col5,count(*), string_agg(id::character varying, ';' order by sign_code) from my_table group by 1,2,3,4,5,6 HAVING count(*)>1 |
| document.querySelectorAll('#center > div > tf-category-pane > button').forEach(e=>e.click()) | |
| // just copy the above and run in browser console to open all the image previews in a Tensorboard. | |
| // Especially useful if youre logging image visualisations(for eg. detections in an object detector model) |
| # | |
| # Sets Prezto options. | |
| # | |
| # Authors: | |
| # Sorin Ionescu <[email protected]> | |
| # | |
| # | |
| # General | |
| # |
| from tensorboard.backend.event_processing import event_accumulator | |
| import json | |
| eval_log_file_path = "path/to/events.out.tfevents.1555555555.0.0.0.0" | |
| def modelEvalPathParser(path_to_eval_log): | |
| ea = event_accumulator.EventAccumulator(path_to_eval_log) | |
| ea.Reload() | |
| jsonresult = {} | |
| csvresult = "classname,ap\n" |
| # need to install `rename` | |
| find /path/to/directory -depth -exec rename 's/[<>:"\\|?*]/_/g' {} + |
| #List files by extension | |
| # from https://unix.stackexchange.com/a/18508/ | |
| #find <folder> -type f | sed 's/.*\.//' | sort | uniq -c | |
| find DEU/ -type f | sed 's/.*\.//' | sort | uniq -c |
| <!DOCTYPE html> | |
| <meta charset="utf-8"> | |
| <title>SANKEY Experiment</title> | |
| <style> | |
| .node rect { | |
| cursor: move; | |
| fill-opacity: .9; | |
| shape-rendering: crispEdges; | |
| } |
| import time | |
| from concurrent.futures import ThreadPoolExecutor, as_completed | |
| Thread_pool = ThreadPoolExecutor(6) # can change 6 to any number | |
| def sample_sum_func(arg1,arg2): | |
| print("start",arg1,arg2) | |
| time.sleep(2) | |
| print("end",arg1,arg2) |