This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def beta_direct_deposit(pay, percent_split=[1]): | |
"""What you guys are doing.""" | |
s = 0 | |
results = [0] | |
for i, v in enumerate(percent_split): | |
s += results[i] | |
results.append((pay - s) * v) | |
residual = pay - sum(results) | |
results.append(residual) | |
return results[1:] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import collections | |
letter_map = { | |
"a": 1, | |
"b": 2, | |
"c": 3, | |
"d": 4, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A static file server written in Go. | |
package main | |
import ( | |
"flag" | |
"fmt" | |
"log" | |
"net/http" | |
"os" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a(10, 1); | |
function a(n, steps) { | |
console.log(n, steps); | |
if (n == 1) { | |
return 0; | |
} | |
return b(n - 1, steps+1); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; PROGRAM TO GET FIRST N NO OF PRIMES | |
;including the macro file | |
include macros.inc | |
data segment | |
cr equ 0dh ;ASCII code for carriage return | |
lf equ 0ah ;ASCII code for line feed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;printing a string | |
prints macro str | |
push ax | |
push bx | |
push cx | |
push dx | |
push si | |
mov ah,09h | |
lea dx,str | |
int 21h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;start the program | |
start macro | |
mov ax,@data | |
mov ds,ax | |
endm start | |
;clearing the screen | |
clrscr macro | |
push ax | |
push bx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;program to check whether no is prime or not | |
.model small | |
.386 | |
.stack 100h | |
include newmac.inc | |
.data | |
Sign DB 0 | |
M32768 DB "-32768$" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <assert.h> | |
#include <stdbool.h> | |
#include <stddef.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <errno.h> | |
#define DEBUG 0 |
NewerOlder