| // Unscaled values for kOpsinAbsorbanceBias | |
| const kB0 = 0.96723368009523958; | |
| const kB1 = kB0; | |
| const kB2 = kB0; | |
| const kScale = 255.0; | |
| const kScaleR = 1.0; | |
| const kScaleG = 1.0; | |
| const kInvScaleR = 1.0; | |
| const kInvScaleG = 1.0; |
| #!/usr/bin/env bash | |
| # | |
| # NixOS install script synthesized from: | |
| # | |
| # - Erase Your Darlings (https://grahamc.com/blog/erase-your-darlings) | |
| # - ZFS Datasets for NixOS (https://grahamc.com/blog/nixos-on-zfs) | |
| # - NixOS Manual (https://nixos.org/nixos/manual/) | |
| # | |
| # It expects the name of the block device (e.g. 'sda') to partition |
Normally, it is sufficient to grab the Go MSI installer from the website in order to set up the toolchain. However, some packages that provide Go wrappers for C libraries rely on cgo tool, which in turn, needs the GCC toolchain in order to build the glue code. Also, 3rd-party dependencies are usually hosted on services like GitHub, thus Git is also needed. This mini-guide illustrates how to setup a convenient development environment on Windows using MSYS2.
| #include <stdint.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| // munged from https://github.com/simontime/Resead | |
| namespace sead | |
| { | |
| class Random | |
| { |
Disclaimer: I am a physicist, not a computer scientist. I have no experience with creating programming languages. I am leading a research group that is all in on Julia. I have been following developments in many computer languages for many years, and evaluated many options reasonably deeply before deciding to move us to Julia. This are my thoughts on some of the most important pain points right now from the perspective of a user of the language, advanced libraries and occasional contributor and writer of libraries.
Currently Julia lacks a good way to express how things should behave. In many languages types are used to express this information. In Julia, in order to make maximum use of the languages dynamicism, we are encouraging to write code as generically as possible, and defer specifying types to the users of libraries as much as possible. This allows the injection of unanticipated behaviours deep inside our code.
# Do
function norm(x, y)
(x - y) ^ 2This gist will no longer be updated as the changelog will be on the official website.
- Sublime Text/Merge Official Discord chat server: https://discord.gg/D43Pecu
- Sublime Text/Merge 中文 Telegram 交流群組: https://t.me/sublime_tw
Converted via https://domchristie.github.io/turndown
| /* base32 */ | |
| /* | |
| Copyright (c) 2011, Chris Umbel | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights | |
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| copies of the Software, and to permit persons to whom the Software is | |
| furnished to do so, subject to the following conditions: |
| import numpy as np | |
| import tensorflow as tf | |
| from tensorflow import keras | |
| from tensorflow.keras.models import Sequential | |
| from tensorflow.keras.layers import Dense, Dropout, Flatten, Conv2D | |
| from tensorflow.keras.layers import MaxPooling2D, BatchNormalization | |
| keras.backend.clear_session() | |
| np.random.seed(1000) | |
| tf.random.set_seed(1000) |
| # Example of two-line ZSH prompt with four components. | |
| # | |
| # top-left top-right | |
| # bottom-left bottom-right | |
| # | |
| # Components can be customized by editing set-prompt function. | |
| # | |
| # Installation: | |
| # | |
| # (cd && curl -fsSLO https://gist.githubusercontent.com/romkatv/2a107ef9314f0d5f76563725b42f7cab/raw/two-line-prompt.zsh) |