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
"""" | |
ABC constraint demonstration under both euler and velocity verlet integration. | |
Bond forces are simulated using the MM3 force field, no other forces are used. | |
""" | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import math | |
from collections import namedtuple | |
import seaborn as sns |
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
# for use with https://github.com/marcsto/rl/blob/master/src/fast_predict2.py | |
# feature labels that were used to train the network. | |
FEATURES = ['Quat_x', 'Quat_y', 'Quat_z', 'Quat_w'] | |
def generator_evaluation_fn(generator): | |
""" Input function for numeric feature columns using the generator. """ | |
def _inner_input_fn(): | |
# set datatypes according to your data. | |
datatypes = tuple(len(FEATURES) * [tf.float32] |
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
//Based on the great write-up and python code here: https://rajeshrinet.github.io/blog/2014/ising-model/ | |
#include <Adafruit_LEDBackpack.h> | |
#include <Adafruit_GFX.h> | |
#include <Adafruit_SPITFT_Macros.h> | |
#include <Adafruit_SPITFT.h> | |
#include <gfxfont.h> | |
#include <Wire.h> | |
Adafruit_BicolorMatrix ledMatrix = Adafruit_BicolorMatrix(); |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Runtime.InteropServices; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace NanoSimboxPluginExampleCSharp | |
{ | |
/// <summary> |
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 glob | |
from gimpfu import * | |
dir = "path/to/images" | |
for fname in glob.glob(dir + "/*.xcf"): | |
img = pdb.gimp_file_load(fname, fname) | |
layer = pdb.gimp_image_merge_visible_layers(img, CLIP_TO_IMAGE) | |
# converts to grayscale | |
pdb.gimp_desaturate_full(layer, DESATURATE_LIGHTNESS) | |
new_name = fname[:-4] + ".png" | |
pdb.gimp_file_save(img, layer, new_name, new_name) |
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
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, |