Skip to content

Instantly share code, notes, and snippets.

@11fl
11fl / popandreturn.go
Created June 30, 2022 19:28
Pop given element from slice and return it
package main
import "fmt"
func main() {
a := []string{"A", "B", "C", "D", "E", "x"}
i := 2
num, _ := pop(a, i)
fmt.Println(num)
@11fl
11fl / comapre.go
Created June 27, 2022 20:37
Get the different nubmbers from two slices
package main
import "fmt"
var m = make(map[int]int)
func addToMap(s []int) {
for _, v := range s {
@11fl
11fl / irc.bot.0.1.py
Last active December 8, 2022 00:44
IRC bot python 3
# -*- coding: utf-8 -*-
import socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
HOST = '' #irc server
PORT = 6665 #port
NICK = 'pony_bot'
USERNAME = 'megadeath'
REALNAME = 'little pony'