Skip to content

Instantly share code, notes, and snippets.

Avatar
😁

Bhathiya Perera JaDogg

😁
View GitHub Profile
View semantic-commit-messages.md

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

View Student_Proposals_GSOC.md

Hello,

Please comment below with following details.

  1. What are the projects you like do for the GSoC. (Add links to projects) don't mention the actual idea.
  2. Have you contributed to SCoRe lab? Yes or No..
  3. Whom did you share the proposal with so far?
  4. Did you get responses to your ideas/proposal?

Add any other info you think will be relevant. (Don't add the actual idea or feature)

@JaDogg
JaDogg / new_to_score.md
Last active Feb 22, 2021
New to SCoRe Lab 🥳
View new_to_score.md
@JaDogg
JaDogg / latency.markdown
Created Jan 21, 2020 — forked from hellerbarde/latency.markdown
Latency numbers every programmer should know
View latency.markdown

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs
Read 1 MB sequentially from memory ..... 250,000 ns  = 250 µs
@JaDogg
JaDogg / sound_play_crossplatform.py
Created Jun 21, 2019 — forked from juancarlospaco/sound_play_crossplatform.py
Cross-platform Sound Playing with Standard Libs only, No Sound file is required, No install is required, Python2 / Python3.
View sound_play_crossplatform.py
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os, sys
from tempfile import gettempdir
from subprocess import call
def beep(waveform=(79, 45, 32, 50, 99, 113, 126, 127)):
View english-adjectives.txt
abandoned
able
absolute
adorable
adventurous
academic
acceptable
acclaimed
accomplished
accurate
@JaDogg
JaDogg / C-for-noobs.md
Created Aug 20, 2018
C Programming for Noobs
View C-for-noobs.md
@JaDogg
JaDogg / pyhackerrank.py
Last active Nov 24, 2017
Python3 HackerRank
View pyhackerrank.py
# input single integer
n = int(input().strip())
# 2 Integers in 2 lines
n, m = int(input().strip()), int(input().strip())
# 2 Integers in 1 line
n, m = input().strip().split(' ')
n, m = int(n), int(m)
# Array of integers seperated by space
a = list(map(int, input().strip().split(' ')))
# Array of integers seperated by space sorted
@JaDogg
JaDogg / py3morse.py
Last active Oct 2, 2017
Python 3 Dictionary Usage to Calculate Morse Code
View py3morse.py
#!/usr/bin/env python3
# http://pandabunnytech.com
morse = {"A": ".-", "B": "-...", "C": "-.-.", "D": "-..",
"E": ".", "F": "..-.", "G": "--.", "H": "....",
"I": "..", "J": ".---", "K": "-.-", "L": ".-..",
"M": "--", "N": "-.", "O": "---", "P": ".--.",
"Q": "--.-", "R": ".-.", "S": "...", "T": "-",
"U": "..-", "V": "...-", "W": ".--", "X": "-..-",
View vipy
#!/bin/bash
echo '#!'`which env`' python' > $1 && chmod a+x $1 && vi $1