Skip to content

Instantly share code, notes, and snippets.

View sentientmachine's full-sized avatar
:octocat:
Debugging this simulation.

Eric Leschinski sentientmachine

:octocat:
Debugging this simulation.
View GitHub Profile
package JavaApplication12;
import java.util.ArrayList;
public class Main{
public static void main(String[] args)
{
ArrayList<Double> arr = new ArrayList<Double>();
@sentientmachine
sentientmachine / README.md
Last active March 27, 2020 07:29 — forked from CodeReclaimers/config
OpenAI Gym LunarLander-v2 writeup
"""
This is a batched LSTM forward and backward pass
"""
import numpy as np
import code
class LSTM:
@staticmethod
def init(input_size, hidden_size, fancy_forget_bias_init = 3):
function! CommaAQueryChtServer()
"setting command hight sets a tolerance for that many echos before you get a "press enter to continue"
execute "set cmdheight=5"
let word_under_cursor = expand("<cword>")
"risky negative 1 at end there, if selection is nothing, that's off screen could be an error
let visual_mode_selection = getline("'<")[getpos("'<")[2]-1:getpos("'>")[2]-1]
if visual_mode_selection != ''
@sentientmachine
sentientmachine / Python3 Virtualenv Setup.md
Last active April 22, 2020 22:58 — forked from pandafulmanda/Python3 Virtualenv Setup.md
Setting up and using Python3 Virtualenv on Mac

MacOS Mojave 10.14.5 Python3.6 Virtualenv setup inside a macbook with python3.7 and default is 3.7

I'm using mac homebrew, I installed thustly:

https://brew.sh/

Baseline python is python3:

You've probably already done this, or it came with the stock macbook:

@sentientmachine
sentientmachine / coinmarketcap_extract.py
Last active December 28, 2021 20:44 — forked from lobstrio/coinmarketcap_extract.py
Extract all cryptocurrencies data from coinmarketcap.com using Python 3 and Request
#!/usr/bin/python3
# coding: utf-8
import requests
from bs4 import BeautifulSoup
from scrapy import Selector
import csv
import datetime
#pip3 install --user bs4
function success = main()
a = ["hello"; "unsorted"; "world"; "moobar"]
b = cellstr(a)
find(ismember(b, 'world')) %returns 3
function i = binsearch(array, val, low, high)
%binary search algorithm for numerics, Usage:
%myarray = [ 30, 40, 50.15 ]; %already sorted list
%binsearch(myarray, 30, 1, 3) %item 30 is in slot 1
if ( high < low )