Skip to content

Instantly share code, notes, and snippets.


David derdav3

Block or report user

Report or block derdav3

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
derdav3 / gist:c122df5d097504886fc1dd6f644f1892
Created Aug 30, 2019
Upgrade Ubuntu 19 sound via pulse_audio config
View gist:c122df5d097504886fc1dd6f644f1892
From here:
config in vim ~/.config/pulse/daemon.conf
default-sample-format = float32le
default-sample-rate = 48000
alternate-sample-rate = 44100
default-sample-channels = 2
default-channel-map = front-left,front-right
default-fragments = 2
View gist:35e4cf0f2b3e515441207b67522a6468
Verifying my Blockstack ID is secured with the address 1TDk1J7t7F2ardV5LRoSrMGEVHDJ1hnc8
derdav3 /
Created Apr 14, 2017
Fast way to get line count in python
def wccount(filename):
out = subprocess.Popen(['wc', '-l', filename],
return int(out.lstrip().split()[0])
derdav3 /
Last active Nov 8, 2019
For loop for creating neural net layers in tensorflow
I've found this little setup (
to create layers in a NN with a for loop. Unfortunately it doesn't really work - so here is a corrected version:
keep in mind, layer_config takes the form: [n_input, 200, 200, 200, 200, n_classes]
def multilayer_perceptron(x, layer_config, name="neuralnet"):
code from:
derdav3 /
Created Nov 30, 2016
Source Code to "Sentdex Deep Learning with Neural Networks and Tensorflow" part 4
import tensorflow as tf
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets("/tmp/data/", one_hot=True)
n_nodes_hl1 = 500
n_nodes_hl2 = 500
n_nodes_hl3 = 500
derdav3 / AutoExpandingTextInput.js
Created Sep 17, 2016
AutoExpandingTextInput for React-Native
View AutoExpandingTextInput.js
import React, {Component} from 'react'
import {TextInput} from 'react-native'
export default class AutoExpandingTextInput extends Component {
state: any;
constructor(props) {
this.state = {text: '',tags:[], height: 0};
render() {
You can’t perform that action at this time.