Code now available at https://github.com/JoaoRodrigues/hydrophobic_moment with example usage and proper licensing.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from keras.models import Model, Sequential | |
from keras.layers import Input, Dense, Activation | |
from keras.utils.data_utils import Sequence | |
from keras.losses import categorical_crossentropy | |
from keras.optimizers import SGD | |
class CustomSequence(Sequence): | |
def __init__(self, x_set, y_set, batch_size): | |
self.X,self.y = x_set,y_set |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# source: https://gist.github.com/filipenf/e9901883d66b8da65c151cf674e5f2a9 | |
# | |
# Reads fdupes(-r -1) output and create relative symbolic links for each duplicate | |
# usage: fdupes -r1 . | ./lndupes.py | |
import os | |
from os.path import dirname, relpath, basename, join | |
import sys | |
import shlex |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import flask_sqlalchemy | |
from sqlalchemy import schema | |
from sqlalchemy.ext.compiler import compiles | |
db = flask_sqlalchemy.SQLAlchemy() | |
class Tag(db.Model): | |
__table_args__ = {'info': {'without_rowid': True}} | |
text = db.Column(db.String, primary_key=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Reads fdupes(-r -1) output and create relative symbolic links for each duplicate | |
# usage: fdupes -r1 . | ./lndupes.py | |
import os | |
from os.path import dirname, relpath, basename, join | |
import sys | |
lines = sys.stdin.readlines() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
TABLE_SCHEMA=$1 | |
TABLE_NAME=$2 | |
mytime=`date '+%y%m%d%H%M'` | |
hostname=`hostname | tr 'A-Z' 'a-z'` | |
file_prefix="trimax$TABLE_NAME$mytime$TABLE_SCHEMA" | |
bucket_name=$file_prefix | |
splitat="4000000000" | |
bulkfiles=200 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
IF=eth0 | |
iptables -F | |
iptables -t nat -F | |
iptables -X | |
iptables -Z | |
# drop all packets by default |