Skip to content

Instantly share code, notes, and snippets.

@33eyes
33eyes / commit_jupyter_notebooks_code_to_git_and_keep_output_locally.md
Last active April 30, 2024 08:39
How to commit jupyter notebooks without output to git while keeping the notebooks outputs intact locally
  1. Add a filter to git config by running the following command in bash inside the repo:
git config filter.strip-notebook-output.clean 'jupyter nbconvert --ClearOutputPreprocessor.enabled=True --to=notebook --stdin --stdout --log-level=ERROR'  
  1. Create a .gitattributes file inside the directory with the notebooks

  2. Add the following to that file:

*.ipynb filter=strip-notebook-output  
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active April 30, 2024 08:37
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@todgru
todgru / elasticsearch-setup-apple-macbook-pro-m1.md
Created February 9, 2023 23:52
Install Elasticsearch 7.x on Apple Macbook Pro M1 Ventura 13.2

Elasticsearch Setup Apple MacBook Pro M1

Apple MacBook Pro M1, 32 GB, Ventura 13.2

Documentation based on comments in this Github Elasticsearch issue.

Install Homebrew

@kotakanbe
kotakanbe / ipcalc.go
Created September 17, 2015 02:59
get all IP address from CIDR in golang
package main
import (
"net"
"os/exec"
"github.com/k0kubun/pp"
)
func Hosts(cidr string) ([]string, error) {
@RonanGil
RonanGil / Conventions_WinForms.txt
Created July 24, 2023 15:48
Naming Conventions - winForms
# Componentes Windows Forms
Common Controls:
----------------
btn Button chk CheckBox ckl CheckedListBox
cmb ComboBox dtp DateTimePicker lbl Label
llb LinkLabel lst ListBox lvw ListView
mtx MaskedTextBox cdr MonthCalendar icn NotifyIcon
nud NumeircUpDown pic PictureBox prg ProgressBar
rdo RadioButton rtx RichTextBox txt TextBox
@JKirchartz
JKirchartz / html5 notepad
Created November 26, 2011 03:28
simple html5 Notepad, saves in localStorage, but you can only have one note at a time.
<!DOCTYPE html>
<html><head><meta charset="UTF-8">
<title>HTML5 notepad app</title>
<meta charset="utf-8">
<!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
<style>
html,body{background:#FCFCFC;color:#444;height:100%;width:100%;margin:0;padding:0;}
#notepad{height:98%;width:98%;padding:1%;font-size:100%;line-height:125%;font-family:san-serif}
::selection{background:#7D7}
::-moz-selection{background:#7D7}
@markopy
markopy / streamlit_command_line.py
Created October 22, 2019 16:23
How to parse command line arguments in streamlit with argparse
# An Example of how to parse command line arguments in streamlit.
# This is free and unencumbered software released into the public domain.
import os
import sys
import random
import argparse
import streamlit as st
parser = argparse.ArgumentParser(description='This app lists animals')
@soof-golan
soof-golan / Dockerfile
Last active April 30, 2024 08:31
Python + Poetry + Docker Example
FROM python:3.10 as python-base
# https://python-poetry.org/docs#ci-recommendations
ENV POETRY_VERSION=1.2.0
ENV POETRY_HOME=/opt/poetry
ENV POETRY_VENV=/opt/poetry-venv
# Tell Poetry where to place its cache and virtual environment
ENV POETRY_CACHE_DIR=/opt/.cache
@timurbakibayev
timurbakibayev / tetris.py
Last active April 30, 2024 08:29
Tetris game in Python
import pygame
import random
colors = [
(0, 0, 0),
(120, 37, 179),
(100, 179, 179),
(80, 34, 22),
(80, 134, 22),
(180, 34, 22),
@andrewrk
andrewrk / fizzbuzz.zig
Last active April 30, 2024 08:28
fizzbuzz in zig
const std = @import("std");
pub fn main() void {
var i: usize = 1;
while (i <= 100) : (i += 1) {
if (i % 3 == 0 and i % 5 == 0) {
std.debug.warn("FizzBuzz\n");
} else if (i % 3 == 0) {
std.debug.warn("Fizz\n");
} else if (i % 5 == 0) {