Skip to content

Instantly share code, notes, and snippets.

View 4e1e0603's full-sized avatar
🎯
I may be slow to respond.

David Landa 4e1e0603

🎯
I may be slow to respond.
  • Prague, Czech Republic
View GitHub Profile
@4e1e0603
4e1e0603 / shell-setup.ps1
Created June 27, 2023 14:05 — forked from mikepruett3/shell-setup.ps1
Packages to install via scoop, winget, choco, and other tools...
<#
.SYNOPSIS
Script to Initialize my custom powershell setup.
.DESCRIPTION
Script uses scoop
.NOTES
**NOTE** Will configure the Execution Policy for the "CurrentUser" to Unrestricted.
Author: Mike Pruett
Date: October 18th, 2018
@4e1e0603
4e1e0603 / rules_to_problem_solving.md
Created June 11, 2023 06:13 — forked from neaxi/rules_to_problem_solving.md
Rules to problem solving

Rules to Problem Solving

(Unknown author)

Rule #1: Don't assume you understand the problem

This is one of the classic mistakes of problem solving - you think you understand what's going on, but you didn't look deep enough or get enough information to really get it. Before starting to solve any problem, be sure you spend some time and be absolutely sure you understand exactly what's going in.

Rule #2: Don't assume that the person who reported the problem understands the problem either

@4e1e0603
4e1e0603 / rename_pdf.py
Created November 7, 2020 08:08 — forked from ipudu/rename_pdf.py
Rename an academic article pdf with human readable format
import sys
import requests
import PyPDF2
import requests
import os
crossref = 'http://api.crossref.org/'
def rename(pdf):
"""Rename an academic article pdf file with human readable format
@4e1e0603
4e1e0603 / __main__.py
Created March 31, 2019 15:42 — forked from linuxluigi/__main__.py
Python __main__.py parser example
import argparse
# import data2tabshop
# from data2tabshop import __version__
__version__ = '0.1.0'
__author__ = u'Steffen Exler'
def get_parser():
@4e1e0603
4e1e0603 / openicon.c
Created January 9, 2019 10:17 — forked from armornick/openicon.c
Draw an Image with SDL2
#include <stdio.h>
#include <SDL2/SDL.h>
#include <SDL2/SDL_image.h>
#define WIDTH 800
#define HEIGHT 600
#define IMG_PATH "exit.png"
int main (int argc, char *argv[]) {
@4e1e0603
4e1e0603 / gist:70225b0ca8add2ad3c0fe940de2ed69f
Created August 21, 2018 13:29 — forked from why-not/gist:4582705
Pandas recipe. I find pandas indexing counter intuitive, perhaps my intuitions were shaped by many years in the imperative world. I am collecting some recipes to do things quickly in pandas & to jog my memory.
"""making a dataframe"""
df = pd.DataFrame([[1, 2], [3, 4]], columns=list('AB'))
"""quick way to create an interesting data frame to try things out"""
df = pd.DataFrame(np.random.randn(5, 4), columns=['a', 'b', 'c', 'd'])
"""convert a dictionary into a DataFrame"""
"""make the keys into columns"""
df = pd.DataFrame(dic, index=[0])
@4e1e0603
4e1e0603 / postgres.py
Created August 14, 2018 12:48 — forked from goldsborough/postgres.py
Python psycopg2 wrapper
###########################################################################
#
## @file postgres.py
#
###########################################################################
import psycopg2
###########################################################################
#

Why I think Immediate Mode GUI is way to go for GameDev tools

Prerequisites

Before you continue, if you don't know what IMGUI is don't bother reading this post, just ignore it, don't write anything in comments section, etc. If you're curious about IMGUI see bottom of this post, otherwise continue whatever you were doing, this post it's not for you. Thanks!

If you know what IMGUI is, for context read following presentations and blog posts:

  • Insomniac’s Web Tools Postmortem
@4e1e0603
4e1e0603 / auto-deploy_documentation.md
Created February 4, 2018 16:08 — forked from vidavidorra/auto-deploy_documentation.md
Auto-deploying Doxygen documentation to gh-pages with Travis CI

Auto-deploying Doxygen documentation to gh-pages with Travis CI

This explains how to setup for GitHub projects which automatically generates Doxygen code documentation and publishes the documentation to the gh-pages branch using Travis CI. This way only the source files need to be pushed to GitHub and the gh-pages branch is automatically updated with the generated Doxygen documentation.

Sign up for Travis CI and add your project

Get an account at Travis CI. Turn on Travis for your repository in question, using the Travis control panel.

Create a clean gh-pages branch

To create a clean gh-pages branch, with no commit history, from the master branch enter the code below in the Git Shell. This will create a gh-pages branch with one file, the README.md in it. It doesn't really matter what file is uploaded in it since it will be overwritten when the automatically generated documentation is published to th

@4e1e0603
4e1e0603 / auto-deploy_documentation.md
Created February 4, 2018 16:07 — forked from vidavidorra/auto-deploy_documentation.md
Auto-deploying Doxygen documentation to gh-pages with Travis CI

Auto-deploying Doxygen documentation to gh-pages with Travis CI

This explains how to setup for GitHub projects which automatically generates Doxygen code documentation and publishes the documentation to the gh-pages branch using Travis CI. This way only the source files need to be pushed to GitHub and the gh-pages branch is automatically updated with the generated Doxygen documentation.

Sign up for Travis CI and add your project

Get an account at Travis CI. Turn on Travis for your repository in question, using the Travis control panel.

Create a clean gh-pages branch

To create a clean gh-pages branch, with no commit history, from the master branch enter the code below in the Git Shell. This will create a gh-pages branch with one file, the README.md in it. It doesn't really matter what file is uploaded in it since it will be overwritten when the automatically generated documentation is published to th