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
package com.github.danieldaeschle.ministrynotes.lib | |
import androidx.compose.animation.core.AnimationSpec | |
import androidx.compose.foundation.layout.Box | |
import androidx.compose.foundation.layout.Column | |
import androidx.compose.foundation.layout.ColumnScope | |
import androidx.compose.foundation.layout.fillMaxSize | |
import androidx.compose.foundation.layout.fillMaxWidth | |
import androidx.compose.foundation.layout.navigationBarsPadding | |
import androidx.compose.foundation.layout.padding |
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-Module posh-git | |
Import-Module oh-my-posh | |
Set-PoshPrompt -Theme robbyrussel | |
# Helper function to change directory to development workspace | |
function cws { Set-Location $env:USERPROFILE\Projects } | |
Import-Module PSReadLine | |
# Shows navigable menu of all options when hitting Tab |
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
#include <stdio.h> | |
#include <execinfo.h> | |
#include <signal.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
void handler(int sig) { | |
void *array[10]; | |
size_t size; |
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
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<link rel="stylesheet" href="http://cmx.io/v/0.1/cmx.css"> | |
<script src="http://cmx.io/v/0.1/cmx.js" charset="utf-8"></script> | |
<style>.cmx-user-scene4 .cmx-text-border .cmx-path {stroke: orange}</style> | |
<body> | |
<div style="max-width:900px; -webkit-transform:rotate(0deg)"> | |
<scene id="scene1"> | |
<label t="translate(0,346)"> |
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 tkinter import * | |
import time | |
import numpy as np | |
WIDTH = 800 | |
HEIGHT = 500 | |
SIZE = 5 | |
tk = Tk() | |
canvas = Canvas(tk, width=WIDTH, height=HEIGHT, bg="grey") | |
canvas.pack() |
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
version: "3" | |
services: | |
helloworld: | |
image: tutum/hello-world | |
expose: | |
- "80" | |
labels: | |
- "traefik.domain=helloworld.example.com" |
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
#include <Python.h> | |
PyObject *hello(PyObject *self, PyObject *args) { | |
printf("Hello World\n"); | |
Py_RETURN_NONE; | |
} | |
struct PyMethodDef greeter_methods[] = { | |
{"hello", hello, METH_NOARGS, "Some docs..."}, | |
{NULL, NULL, 0, NULL} |
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.utils import to_categorical | |
from keras.models import Sequential | |
from keras.layers import Dense | |
from random import sample | |
import numpy as np | |
import os | |
# Train data (Number 0 to 99 in binary list format with maximum length of 10) | |
x_train = np.array(list(map(lambda x: [0 for _ in range( | |
10 - len(format(x[0], "b")))] + list(format(x[0], "b")), sample([[x] for x in range(100)], 100)))) |
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.utils import to_categorical | |
from keras.models import Sequential | |
from keras.layers import Dense | |
from random import sample | |
import numpy as np | |
x_train = np.array(sample(5 * [[x] for x in range(11)], 5 * 11)) | |
y_train = np.array([int(x > 4) for x in x_train]) | |
y_binary = to_categorical(y_train) |