Skip to content

Instantly share code, notes, and snippets.

View iwasdavid's full-sized avatar
🏋️

Dave Lowe iwasdavid

🏋️
View GitHub Profile
@iwasdavid
iwasdavid / main-requests.py
Created June 4, 2024 07:44
HTTP request using requests and requests_negotiate_sspi
import requests
from requests_negotiate_sspi import HttpNegotiateAuth
url = "https://localhost:44356/home/getperson"
r = requests.get(url, auth=HttpNegotiateAuth())
print(r.content)
@iwasdavid
iwasdavid / main-pythonnet.py
Created June 4, 2024 07:42
HTTP request using pythonnet package
import sys
import clr
clr.AddReference("System.Net.Http")
from System.Net.Http import *
if __name__ == '__main__':
clint_handler = HttpClientHandler()
clint_handler.UseDefaultCredentials = True
client = HttpClient(clint_handler)
@iwasdavid
iwasdavid / functions.fs
Created May 8, 2019 19:43
F# functions
let addNameAgeAndAddress fname lname age town =
sprintf "Your name is %s %s and you are %i years old and you live in %s" fname lname age town
let addNameAgeAndAddress' fname lname =
(fun age town -> sprintf "Your name is %s %s and you are %i years old and you live in %s" fname lname age town)
@iwasdavid
iwasdavid / possible outputs
Last active March 6, 2019 11:26
sample.xsd
<Content>
<Blah>adasd</Blah>
<Stuff>asdadas</Stuff>
<Thing>asdasd</Thing>
<Other>asdadas</Other>
</Content>
<Content>
<Blah>adasd</Blah>
<Stuff>asdadas</Stuff>
@iwasdavid
iwasdavid / List.fsx
Last active February 23, 2019 09:46
Splitting list on specific word
let words = [
"Title"
"Some text"
"Some other text"
"Some text"
"Some other text"
"Title"
"Some text"
"Some other text"
"Title"