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
Option Explicit | |
Sub AddElements() | |
Dim shp As Shape | |
Dim i As Integer, n As Integer | |
n = ActivePresentation.Slides.Count | |
For i = 1 To n | |
Dim s As Slide | |
Set s = ActivePresentation.Slides(i) |
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/bash | |
# remove any pre-existing virtual camera devices | |
virtualcamera remove-devices | |
# add virtual device with name FakeCam0 showing in zoom as Virtual Camera | |
virtualcamera add-device -i FakeCam0 "Virtual Camera" | |
# setup the format, dimensions and frames per second of virtual device | |
virtualcamera add-format FakeCam0 RGB24 1024 720 30 |
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 python3 | |
import sys | |
import os | |
import yaml | |
import subprocess | |
import tensorflow as tf | |
import tfjs_graph_converter.api as tfjs_api | |
import tfjs_graph_converter.util as tfjs_util |
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
tensorflow | |
pillow | |
pyyaml | |
opencv-python | |
tfjs-graph-converter==1.4.2 | |
mediapipe==0.8.7.1 |
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/python3 | |
# -*- coding: UTF-8 -*- | |
# | |
import os | |
import subprocess | |
import time | |
import socket | |
import sys | |
import json |
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
"""akmtdfgen: A Keras multithreaded dataframe generator. | |
Works with Python 2.7 and Keras 2.x. | |
For Python 3.x, need to fiddle with the threadsafe generator code. | |
Test the generator_from_df() functions by running this file: | |
python akmtdfgen.py |
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
from keras.models import Model | |
from keras.layers import Input, merge, Convolution2D, MaxPooling2D | |
from keras.layers import UpSampling2D, Reshape, Activation, Dropout | |
from keras.layers import Deconvolution2D, Dense, Flatten, Input | |
from keras.layers import Permute | |
from keras.optimizers import Adam, SGD | |
from keras import backend as K | |
def dice_coef(y_true, y_pred): |
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
""" | |
This is a batched LSTM forward and backward pass | |
""" | |
import numpy as np | |
import code | |
class LSTM: | |
@staticmethod | |
def init(input_size, hidden_size, fancy_forget_bias_init = 3): |
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
""" | |
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
BSD License | |
""" | |
import numpy as np | |
# data I/O | |
data = open('input.txt', 'r').read() # should be simple plain text file | |
chars = list(set(data)) | |
data_size, vocab_size = len(data), len(chars) |
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
def adam(loss, all_params, learning_rate=0.0002, beta1=0.1, beta2=0.001, | |
epsilon=1e-8, gamma=1-1e-7): | |
""" | |
ADAM update rules | |
Default values are taken from [Kingma2014] | |
References: | |
[Kingma2014] Kingma, Diederik, and Jimmy Ba. | |
"Adam: A Method for Stochastic Optimization." | |
arXiv preprint arXiv:1412.6980 (2014). |
NewerOlder