Skip to content

Instantly share code, notes, and snippets.

@prostoiChelovek
prostoiChelovek / exportgraph.py
Created August 26, 2018 07:03 — forked from moodoki/exportgraph.py
Freeze and export Tensorflow graph from checkpoint files
import os, argparse
import tensorflow as tf
from tensorflow.python.framework import graph_util
dir = os.path.dirname(os.path.realpath(__file__))
def freeze_graph(model_folder, output_nodes='y_hat',
output_filename='frozen-graph.pb',
rename_outputs=None):
FFmpeg has been removed from Ubuntu 14.04 and was replaced by Libav. This decision has been reversed so that FFmpeg is available now in Ubuntu 15.04 again, but there is still no official package for 14.04. In this tutorial, I will show you how to install FFmpeg from mc3man ppa. Add the mc3man ppa:
sudo add-apt-repository ppa:mc3man/trusty-media
And confirm the following message by pressing <enter>:
Also note that with apt-get a sudo apt-get dist-upgrade is needed for initial setup & with some package upgrades
More info: https://launchpad.net/~mc3man/+archive/ubuntu/trusty-media
Press [ENTER] to continue or ctrl-c to cancel adding it
Update the package list.
@prostoiChelovek
prostoiChelovek / compress.go
Created June 19, 2018 07:10 — forked from iamralch/compress.go
ZIP archives in Golang
import (
"archive/zip"
"io"
"os"
"path/filepath"
"strings"
)
func zipit(source, target string) error {
zipfile, err := os.Create(target)
@prostoiChelovek
prostoiChelovek / readzip.go
Created June 19, 2018 06:31 — forked from madevelopers/readzip.go
golang: Read zip file
package main
import (
"archive/zip"
"fmt"
"io/ioutil"
)
type myCloser interface {
Close() error
@prostoiChelovek
prostoiChelovek / slice_exists.go
Created June 8, 2018 16:20 — forked from r6m/slice_exists.go
golang check if item exists in slice
package main
import(
"fmt"
"reflect"
)
func main() {
items := []int{1,2,3,4,5,6}
fmt.Println(SliceExists(items, 5)) // returns true
@prostoiChelovek
prostoiChelovek / client.go
Created May 27, 2018 06:18 — forked from hakobe/client.go
golang unix domain socket
package main
import (
"io"
"log"
"net"
"time"
)
func reader(r io.Reader) {
@prostoiChelovek
prostoiChelovek / tar-gz-reader.go
Created May 20, 2018 14:31 — forked from indraniel/tar-gz-reader.go
Reading through a tar.gz file in Go / golang
package main
import (
"archive/tar"
"compress/gzip"
"flag"
"fmt"
"io"
"os"
)