Skip to content

Instantly share code, notes, and snippets.

View kalaspuffar's full-sized avatar
💭
Even penguins can fly when it blows enough

Daniel Persson kalaspuffar

💭
Even penguins can fly when it blows enough
View GitHub Profile
@kalaspuffar
kalaspuffar / CollectionPerformanceTest.java
Created April 6, 2018 20:17
Simple example of performance testing for collection types in java
package org.ea.debugger;
import java.lang.management.ManagementFactory;
import java.util.*;
import java.util.function.IntConsumer;
public class CollectionTest {
public static void sleep() {
try {
Thread.sleep(3000);
Methods
1. Creation of a webapp for interactive communication
2. Weekly report form (Template)
3. Modify an existing app
4. Biannual reports
Solutions
1. Creation of awareness, incentives and settings and clear targets
2. Bridging the power gap - non formal communication
3. Weekly briefs and summary - improve quality and simplify reports
def _load_simple_annotation(self, index):
"""
Load image and bounding boxes info from txt space separeted values where you have
lines in the format of
classification x1 y1 x2 y2
"""
filename = os.path.join(self._data_path, 'Annotations', index + '.txt')
# print 'Loading: {}'.format(filename)
with open(filename) as f:
import re
addrs = [
'PetImages/A/test1.jpg',
'PetImages/B/test3.jpg',
'PetImages/B/test3.jpg',
'PetImages/C/test4.jpg',
'PetImages/D/test2.jpg',
'PetImages/C/test4.jpg',
'PetImages/A/test1.jpg',
import com.sun.net.httpserver.HttpContext;
import com.sun.net.httpserver.HttpExchange;
import com.sun.net.httpserver.HttpHandler;
import com.sun.net.httpserver.HttpServer;
import sun.net.httpserver.HttpServerImpl;
import java.io.IOException;
import java.io.OutputStream;
import java.net.InetSocketAddress;
package org.ea;
import java.security.MessageDigest;
import java.util.Arrays;
public class FeistelAlg {
private final static String plainText = "the brown fox jumped over the lazy dog";
public static void doRound(byte[] left, byte[] right) throws Exception {
MessageDigest md = MessageDigest.getInstance("sha-1");
Download and extract the LJ Speech dataset
Clone this repo: git clone https://github.com/NVIDIA/tacotron2.git
CD into this repo: cd tacotron2
Initialize submodule: git submodule init; git submodule update
Update .wav paths: sed -i -- 's,DUMMY,ljs_dataset_folder/wavs,g' filelists/*.txt
@kalaspuffar
kalaspuffar / ceph.conf.md
Last active September 20, 2021 03:34
Ceph configuration for windows
[global]
    log to stderr = true
    ; Uncomment the following in order to use the Windows Event Log
    log to syslog = true

    run dir = C:/ProgramData/ceph/out
    crash dir = C:/ProgramData/ceph/out

 ; Use the following to change the cephfs client log level
@kalaspuffar
kalaspuffar / autoclicker.java
Created September 21, 2021 03:44
Adding frame and event listener.
package org.ea;
import javax.swing.*;
import java.awt.*;
import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
public class AutoClicker implements KeyListener {
static boolean enabled = false;
@kalaspuffar
kalaspuffar / grafana-dashboard-install.md
Last active February 28, 2022 14:25
grafana-dashboard-install.md

NODE

sudo ceph mgr module enable prometheus
sudo ceph config set mgr mgr/prometheus/server_addr 0.0.0.0
sudo ceph config set mgr mgr/prometheus/server_port 9283
wget https://github.com/prometheus/node_exporter/releases/download/v1.2.2/node_exporter-1.2.2.linux-amd64.tar.gz