Skip to content

Instantly share code, notes, and snippets.

View bichanna's full-sized avatar

Nobuharu Shimazu bichanna

View GitHub Profile
#include <iostream>
#include <iomanip>
using namespace std;
int years;
double initial_amount, amount_to_add, rate;
double calculate(double prev, int count, int years) {
return (years == count)
@ecthiender
ecthiender / doom_emacs_for_haskell.md
Last active October 25, 2023 05:33
Step by step instructions to setup doom emacs for Haskell + Haskell Language Server (LSP)

Install doom emacs

git clone --depth 1 https://github.com/hlissner/doom-emacs ~/.emacs.d
cd ~/.emacs.d
bin/doom install

Optional

@raprasad
raprasad / change_password.md
Last active March 15, 2024 17:21
django user; change password from shell

update django password

general changes

To use in dev environments

  • after python manage.py shell
from django.contrib.auth.models import User
@nikhita
nikhita / update-golang.md
Last active May 10, 2024 19:31
How to update the Go version

How to update the Go version

System: Debian/Ubuntu/Fedora. Might work for others as well.

1. Uninstall the exisiting version

As mentioned here, to update a go version you will first need to uninstall the original version.

To uninstall, delete the /usr/local/go directory by:

@LeoHeo
LeoHeo / django_ImageField.py
Last active August 25, 2021 00:36
django ImageField custom function
import datetime
import os
from django.db import models
def set_filename_format(now, instance, filename):
"""
file format setting
e.g)
@pandafulmanda
pandafulmanda / Python3 Virtualenv Setup.md
Last active March 12, 2024 15:59 — forked from akszydelko/Python3 Virtualenv Setup.md
Setting up and using Python3 Virtualenv on Mac

Python3 Virtualenv Setup

Requirements
  • Python 3
  • Pip 3
$ brew install python3
@yrevar
yrevar / imagenet1000_clsidx_to_labels.txt
Last active May 10, 2024 05:27
text: imagenet 1000 class idx to human readable labels (Fox, E., & Guestrin, C. (n.d.). Coursera Machine Learning Specialization.)
{0: 'tench, Tinca tinca',
1: 'goldfish, Carassius auratus',
2: 'great white shark, white shark, man-eater, man-eating shark, Carcharodon carcharias',
3: 'tiger shark, Galeocerdo cuvieri',
4: 'hammerhead, hammerhead shark',
5: 'electric ray, crampfish, numbfish, torpedo',
6: 'stingray',
7: 'cock',
8: 'hen',
9: 'ostrich, Struthio camelus',
@J2TEAM
J2TEAM / sublime-text-scopes.md
Last active January 17, 2024 22:44 — forked from iambibhas/scopes.txt
Sublime Text 2/3: Snippet scopes

Here is a list of scopes to use in Sublime Text 2/3 snippets -

ActionScript: source.actionscript.2
AppleScript: source.applescript
ASP: source.asp
Batch FIle: source.dosbatch
C#: source.cs
C++: source.c++
Clojure: source.clojure
@huonw
huonw / blackmagic.rs
Created January 15, 2014 12:42
do-while loops in Rust
while {
let x = foo();
bar(x);
x != 0
} {}
@simonewebdesign
simonewebdesign / scroll.html
Last active October 8, 2023 15:32
Scrolling feature for a web chat, without using libraries.It behaves like Skype: if the user is way too far from the bottom, it just doesn't scroll, because the user may be reading old posts.On the other hand, it will automatically scroll to the bottom on a "new message" event (in this demo, on button's click event).
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<style>
.content {