Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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 numpy as np | |
import gym | |
import random | |
from collections import deque | |
from keras.layers import Input, Activation, Dense, Flatten, RepeatVector, Reshape | |
from keras.layers.convolutional import Conv2D | |
from keras.models import Model | |
from keras import backend as K |
This file contains hidden or 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 numpy as np | |
import gym | |
import random | |
from collections import deque | |
from keras.layers import Input, Activation, Dense, Flatten, RepeatVector, Reshape | |
from keras.layers.convolutional import Conv2D | |
from keras.models import Model | |
This file contains hidden or 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
""" | |
Actor-Critic Example | |
In this file, I will use abbreviations extensively | |
Here are examples: | |
s : state | |
a : action | |
r : reward | |
d : done |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
""" | |
Reddit Scraper | |
Examples | |
---------- | |
$ python get_reddits.py | |
""" | |
import requests | |
import bs4 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
cpdef dict cython_count(list list_): | |
cdef dict result | |
cdef int i | |
cdef unicode word | |
cdef int end_index = len(list_) | |
result = {} | |
for i in range(end_index): | |
word = list_[i] |