Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Lokendra Sharma l0k3ndr

🎯
Focusing
View GitHub Profile
View turtle-tube.py
'''# turtletube
@author l0k3ndr
Playing youtube videos in a turtle window of Python
I was experimenting with the idea of using turtle window as a player. I google and found [linedraw](https://github.com/LingDong-/linedraw) and some Stackoverflow posts which helped me convert the video to series of images. For downloading videos I am using [youtube-dl](https://github.com/ytdl-org/youtube-dl)
How to run it:-
1. Checkout linedraw, as I don't know if it has a python package separately.
@l0k3ndr
l0k3ndr / monte_carlo_tree_search.py
Created Nov 20, 2019 — forked from qpwo/monte_carlo_tree_search.py
Monte Carlo tree search (MCTS) minimal implementation in Python 3, with a tic-tac-toe example gameplay
View monte_carlo_tree_search.py
"""
A minimal implementation of Monte Carlo tree search (MCTS) in Python 3
Luke Harold Miles, July 2019, Public Domain Dedication
See also https://en.wikipedia.org/wiki/Monte_Carlo_tree_search
https://gist.github.com/qpwo/c538c6f73727e254fdc7fab81024f6e1
"""
from abc import ABC, abstractmethod
from collections import defaultdict
import math
@l0k3ndr
l0k3ndr / educational_rounds.txt
Last active Jun 9, 2019
Educational Rounds Codeforces
View educational_rounds.txt
https://codeforces.com/contest/1175/problems
https://codeforces.com/contest/1167/problems
https://codeforces.com/contest/1156/problems
https://codeforces.com/contest/1155/problems
https://codeforces.com/contest/1140/problems
https://codeforces.com/contest/1132/problems
https://codeforces.com/contest/1117/problems
https://codeforces.com/contest/1107/problems
https://codeforces.com/contest/1101/problems
https://codeforces.com/contest/1096/problems
@l0k3ndr
l0k3ndr / gist:6a52778861d2a55e2d90a61027574cb2
Created Dec 1, 2018
cross entropy in C++; from college project
View gist:6a52778861d2a55e2d90a61027574cb2
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<algorithm>
#include<cmath>
#include<climits>
#include<ctime>
using namespace std;
View lispbinging1.lisp
# tasting-lisp
### Nov-2018
1. Lisp hello world
```bash
[1]> (format t "Hello world")
Hello world
View good_probs
https://leetcode.com/problems
@l0k3ndr
l0k3ndr / timethistest.txt
Created Oct 26, 2018
Was testing timethis
View timethistest.txt
>>> from timethis import timethis
>>> with timethis('a'):
... x= sum(range(10**7))
...
a: 0.169 seconds
>>> with timethis('a'):
... with timethis('a'):
... x = sum(range(10**7))
...
│ a: 0.197 seconds
@l0k3ndr
l0k3ndr / recover_source_code.md
Created Oct 18, 2018 — forked from simonw/recover_source_code.md
How to recover lost Python source code if it's still resident in-memory
View recover_source_code.md

How to recover lost Python source code if it's still resident in-memory

I screwed up using git ("git checkout --" on the wrong file) and managed to delete the code I had just written... but it was still running in a process in a docker container. Here's how I got it back, using https://pypi.python.org/pypi/pyrasite/ and https://pypi.python.org/pypi/uncompyle6

Attach a shell to the docker container

Install GDB (needed by pyrasite)

apt-get update && apt-get install gdb
@l0k3ndr
l0k3ndr / README.md
Created Feb 10, 2018 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications
View README.md


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.

For more about AWS and AWS Certifications and updates to this Gist you should follow me @leonardofed