Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Natu Myers NatuMyers

🎯
Focusing
Block or report user

Report or block NatuMyers

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
@NatuMyers
NatuMyers / tfexample1.html
Last active Jun 4, 2018
Tensorflow.js Linear Regression
View tfexample1.html
<html>
<head>
<title>Tensor Flow</title>
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs@0.6.1"></script>
<script>
const nr_epochs=2048; // higher=better but slower
var tfinterface;
const model = tf.sequential();
View gist:396ec699e20f6b8104e534f8b86a2017
<html>
<head>
<!-- Load TensorFlow.js -->
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs@0.11.2"> </script>
<!-- Place your code in the script tag below. You can also use an external .js file -->
<script>
// Notice there is no 'import' statement. 'tf' is available on the index-page
// because of the script tag above.
View Q#DriverExample3
using System;
using Microsoft.Quantum.Simulation.Core;
using Microsoft.Quantum.Simulation.Simulators;
namespace Quantum.HelloQ
{
    class Driver
    {
        static void Main(string[] args)
        {
            using (var sim = new QuantumSimulator())
View Q#DriverExample2
namespace Quantum.HelloQ
{
    // Import Quantum.Primitive
    open Microsoft.Quantum.Primitive;
    // Create an operation that adds two int and returns a total int
    operation Add (a : Int, b : Int): (Int)
    {
        body
        {
            return (a + b);
View Q#OperationExample
namespace Quantum.HelloQ
{
  open Microsoft.Quantum.Primitive;
  open Microsoft.Quantum.Canon;
  operation Operation () : ()
  {
    body
    {
    }
  }
View Q#DriverExample
using Microsoft.Quantum.Simulation.Core;
using Microsoft.Quantum.Simulation.Simulators;
namespace Quantum.HelloQ
{
  class Driver
  {
    static void Main(string[] args)
    {
    }
  }
@NatuMyers
NatuMyers / gist:862b9ae0c02f89bb965ed2e97e402863
Created Feb 24, 2018
Setup CKAN Commands (Prior to Postgres) (Ubuntu 14.01)
View gist:862b9ae0c02f89bb965ed2e97e402863
sudo apt-get update && sudo apt-get install -y nginx apache2 libapache2-mod-wsgi libpq5 redis-server git-core && wget http://packaging.ckan.org/python-ckan_2.6-trusty_amd64.deb && sudo dpkg -i python-ckan_2.6-trusty_amd64.deb && service apache2 reload && sudo apt-get install -y postgresql && sudo -u postgres psql -l
@NatuMyers
NatuMyers / jetty.txt
Created Feb 22, 2018
Jetty File Sample
View jetty.txt
# Defaults for jetty see /etc/init.d/jetty for more
# change to 0 to allow Jetty to start
NO_START=0
# change to 'no' or uncomment to use the default setting in /etc/default/rcS
VERBOSE=yes
# Run Jetty as this user ID (default: jetty)
# Set this to an empty string to prevent Jetty from starting automatically
@NatuMyers
NatuMyers / development.ini
Created Feb 22, 2018
CKAN development.ini Sample File
View development.ini
#
# CKAN - Pylons configuration
#
# These are some of the configuration options available for your CKAN
# instance. Check the documentation in 'doc/configuration.rst' or at the
# following URL for a description of what they do and the full list of
# available options:
#
# http://docs.ckan.org/en/latest/maintaining/configuration.html
#
@NatuMyers
NatuMyers / MyEthBank.sol
Created Feb 20, 2018 — forked from anonymous/MyEthBank.sol
Created using browser-solidity: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://ethereum.github.io/browser-solidity/#version=soljson-v0.4.20+commit.3155dd80.js&optimize=false&gist=
View MyEthBank.sol
// Freestartupkits.com
pragma solidity ^0.4.11;
contract MyEthBank {
mapping (address => uint) private balances;
address owner;
uint constant totalSupply = 10**4;
function MyEthBank() public payable {
balances[msg.sender] = totalSupply;
You can’t perform that action at this time.