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
//Given an array of VIZIO TV models, create a "groupByChipset" function | |
//that aggregates the model names by their "chipset" field: | |
//Example input: | |
const tvs = [ | |
{ | |
"modelName": "VIZIO D24f-F1", | |
"chipset": "5581" | |
}, | |
{ | |
"modelName": "VIZIO V405-H9", |
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
import matplotlib.pyplot as plt | |
import seaborn as sns | |
import pandas as pd | |
from sys import argv | |
sns.set() | |
def load_tasks(dataframe): | |
del dataframe['Project'] | |
del dataframe['Client'] |
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 stockQueue(snapshot): | |
dequeued_snapshot = { | |
stock['sym']:stock['cost'] for stock in snapshot | |
} | |
return [ | |
{ | |
'sym':stock, | |
'cost': cost | |
} for stock, cost in dequeued_snapshot.items() |
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
extends KinematicBody2D | |
var motion = Vector2() | |
func _physics_process(_delta): | |
motion.y += 10 | |
if Input.is_action_pressed("ui_right"): | |
motion.x = 200 | |
elif Input.is_action_pressed("ui_left"): |
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
global strclr | |
extern printf | |
extern malloc | |
section .text | |
strclr: | |
sub rsp, 8 | |
; callee reserved registers | |
push rbx |
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 <stdio.h> | |
#include <stdint.h> | |
/* | |
Test whether a function pointer is really just | |
a pointer to the memory location of a label. | |
Which would make sense, only I never really looked | |
into function pointers, so I'm curious if this is | |
what they are. |
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
global busString | |
extern sprintf | |
section .data | |
busStringFormat: db "%ld more people are allowed onto the bus.", 10, 0 | |
busOutOfSpace: db "No more people can fit on the bus.", 10, 0 | |
section .bss | |
output_buff: resb 5000 |
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
global fibonacci | |
extern printf | |
fibonacci: | |
xor rax, rax | |
; f(n = 1|0) = n | |
cmp rdi, 1 | |
jle identity | |
; f(n > 1) = f(n - 1) + f(n - 2) |
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
ssh alex@$(nmap -sn 192.168.1.0/24 | grep fatima | awk '{ print $6 }' | sed -e 's/(\|)//g') |
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
global main | |
extern printf | |
SECTION .text | |
small_enough: | |
mov rax, 1 | |
add rsi, 1 | |
;rdi array, rsi array length, rdx limit | |
loop: |