Skip to content

Instantly share code, notes, and snippets.

View nomomon's full-sized avatar
🧇
⊂(´・◡・⊂ )∘˚˳°

Mansur Nurmukhambetov nomomon

🧇
⊂(´・◡・⊂ )∘˚˳°
View GitHub Profile
@karpathy
karpathy / pg-pong.py
Created May 30, 2016 22:50
Training a Neural Network ATARI Pong agent with Policy Gradients from raw pixels
""" Trains an agent with (stochastic) Policy Gradients on Pong. Uses OpenAI Gym. """
import numpy as np
import cPickle as pickle
import gym
# hyperparameters
H = 200 # number of hidden layer neurons
batch_size = 10 # every how many episodes to do a param update?
learning_rate = 1e-4
gamma = 0.99 # discount factor for reward
@maestrow
maestrow / post.md
Last active February 22, 2023 16:57
How to use html tags in markdown with remark-parse?

How to use html tags in markdown with remark-parse?

From documentation: Note that toHast.allowDangerousHTML does not work: it’s not possible to inject raw HTML with this plugin (as it’s mean to prevent having to use dangerouslySetInnerHTML).

But still there is a way to allow html tags. Thanks to ChristianMurphy suggestion.

I've made just couple improvements:

  1. Module rehype-dom-parse leads to error: 'document is not defined'. So I replace it with 'rehype-parse'.
  2. Extract rehypeParser from handler, so it's created only once.
  3. Also notice about sanitize: false
@Macorreag
Macorreag / animacionconmani.ipynb
Last active October 4, 2022 01:36
Configuración de Colab para crear animaciones con la librería de manim
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@markketai
markketai / markket-intro-to-ads.ipynb
Created October 23, 2020 21:25
Markket - Intro to Ads.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@celian-rib
celian-rib / ContextProviderTemplate.ts
Last active July 20, 2023 04:11
React Context Provider template with TypeScript
import React, {
createContext, useContext
} from 'react';
interface MyContextProps {
attribute: unknown,
}
const MyContext = createContext<MyContextProps>({} as MyContextProps);