Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Doing and Being

Clay Graham claytantor

💭
Doing and Being
View GitHub Profile
@andrhamm
andrhamm / callbacks.js
Last active Dec 26, 2020
Paginating Scans & Queries in DynamoDB with Node.js using Callbacks OR Promises
View callbacks.js
const AWS = require('aws-sdk');
AWS.config.logger = console;
const dynamodb = new AWS.DynamoDB({ apiVersion: '2012-08-10' });
let val = 'some value';
let params = {
TableName: "MyTable",
ExpressionAttributeValues: {
@Pocuston
Pocuston / Cartpole-v0.py
Created Sep 3, 2017
Cartpole-v0 using Pytorch and DQN
View Cartpole-v0.py
# Solution of Open AI gym environment "Cartpole-v0" (https://gym.openai.com/envs/CartPole-v0) using DQN and Pytorch.
# It is is slightly modified version of Pytorch DQN tutorial from
# http://pytorch.org/tutorials/intermediate/reinforcement_q_learning.html.
# The main difference is that it does not take rendered screen as input but it simply uses observation values from the \
# environment.
import gym
from gym import wrappers
import random
import math