Skip to content

Instantly share code, notes, and snippets.

View JaDogg's full-sized avatar
🎧
Working on Yaksha Programming Language - yakshalang.github.io/

JaDoggx86 JaDogg

🎧
Working on Yaksha Programming Language - yakshalang.github.io/
View GitHub Profile
@JaDogg
JaDogg / sound_play_crossplatform.py
Created June 21, 2019 21:54 — 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.
#!/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)):
abandoned
able
absolute
adorable
adventurous
academic
acceptable
acclaimed
accomplished
accurate
@JaDogg
JaDogg / C-for-noobs.md
Created August 20, 2018 09:30
C Programming for Noobs
@JaDogg
JaDogg / pyhackerrank.py
Last active November 24, 2017 20:50
Python3 HackerRank
# 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 October 2, 2017 11:49
Python 3 Dictionary Usage to Calculate Morse Code
#!/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": "-..-",
@JaDogg
JaDogg / Thread1000.cs
Created December 10, 2013 06:47
Run thousand threads !!
using System;
using System.Threading;
namespace ThousandThreads
{
class Thread1000
{
static void Main(string[] args)
{
for (int i = 1; i <=1000; i++)
@JaDogg
JaDogg / wxmain.cpp
Created August 9, 2013 22:48
Wxwidgets hello world in single cpp file
/*$T indentinput.cpp GC 1.140 08/10/13 01:51:37 */
/*
* wxWidgets "Hello world" Program ;
* For compilers that support precompilation, includes "wx/wx.h".
*/
#include <wx/wxprec.h>
#ifndef WX_PRECOMP
#include <wx/wx.h>
#endif
@JaDogg
JaDogg / paper1b_1.cpp
Created February 25, 2011 13:10
paper1b_1.cpp
#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
int main()
{
int m_upper;
double x,B = 0.0,den;
@JaDogg
JaDogg / 5digits.cpp
Created January 10, 2011 13:02
Input 5 digit number and output it space separated
#include <iostream>
// #define WINDOWS_OS //enable this line if you are using windows
#define INP cout << "Input : ";
using namespace std;
int x10(int x) {
// this func calculate 10 to ther power x
int n,m ;
m = 1;
if (x>0){
@JaDogg
JaDogg / vipy
Created February 18, 2015 05:46
#!/bin/bash
echo '#!'`which env`' python' > $1 && chmod a+x $1 && vi $1