Skip to content

Instantly share code, notes, and snippets.

Avatar
⛩️
Flexing with style transfer.

Matěj Račinský racinmat

⛩️
Flexing with style transfer.
View GitHub Profile
@racinmat
racinmat / .gitlab-ci.yaml
Last active Nov 3, 2020
Simple setup of nginx+node.js+php app
View .gitlab-ci.yaml
stages:
- build
build_php:
<<: *build_definition
script:
- "docker build --pull -f php_app_Dockerfile -t <php image> --no-cache ."
- "docker push <php image>"
build_nginx:
View init.coffee
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@racinmat
racinmat / segmented_max_error.py
Last active Oct 17, 2019
Unsorted segmented max with eager execution is not working.
View segmented_max_error.py
import pandas as pd
import tensorflow as tf
import numpy as np
from sklearn.preprocessing import MultiLabelBinarizer
class SegmentedMean(tf.keras.layers.Layer):
def __init__(self, *args, **kwargs):
super(SegmentedMean, self).__init__(*args, **kwargs)
@racinmat
racinmat / fit_generator.py
Last active Oct 29, 2019
Example of multiple instance learning problem with fit_generator
View fit_generator.py
import pandas as pd
import tensorflow as tf
import numpy as np
from sklearn.preprocessing import MultiLabelBinarizer
def highest_idx_leq(arr_cumsum, thr):
""" Returns index of highest value less than or equal to thr """
return np.searchsorted(arr_cumsum, thr, side='right') - 1
@racinmat
racinmat / odkazy-advik-2019-ai.md
Last active Aug 4, 2019
Odkazy z přenášku z Advíku 2019, Jak umělá inteligence hraje (nejen) videohry
@racinmat
racinmat / odkazy-animefest-2019.md
Last active May 19, 2019
Odkazy z přenášky z AnimeFestu 2019
View CSVfileReader.java
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
public class CSVfileReader {
View pom.xml part
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>