Skip to content

Instantly share code, notes, and snippets.

View dav1dnix's full-sized avatar
🏠
Working from home

david dav1dnix

🏠
Working from home
View GitHub Profile
@dav1dnix
dav1dnix / a.py
Created September 11, 2020 23:12
class Code(object):
def __init__(self, name, age):
self.name = name
self.age = age
if not isinstance(self.name, str) and isinstance(self.age, int):
raise TypeError("self.name is not string or self.age is not int.")
def showArgs(self):
print(f"Name: {self.name}, Age: {self.age}")
@dav1dnix
dav1dnix / webreq.kt
Created April 22, 2021 21:54
send GET request to github lol
import com.fasterxml.jackson.databind.ObjectMapper
import com.fasterxml.jackson.databind.SerializationFeature
import com.fasterxml.jackson.module.kotlin.readValue
import java.io.BufferedReader
import java.net.HttpURLConnection
import java.net.URL
import java.io.File
import kotlin.reflect.typeOf
class NewException(msg: String): Exception(msg)

Keybase proof

I hereby claim:

To claim this, I am signing this object: