Last active
January 15, 2023 21:33
-
-
Save jonschoning/8916f1a54761b6495c653658023426a9 to your computer and use it in GitHub Desktop.
Revisions
-
jonschoning revised this gist
Jan 15, 2023 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ hfmt=(lambda s0,w=2,j=' ':(lambda s:j.join([s[i:i+w]for i in range(0,len(s),w)]))(s0 if len(s0)%w==0else'0'*(w-len(s0)%w)+s0)) xfmt=lambda v,w=2,j=' ':hfmt("{:x}".format(v),w,j) bfmt=lambda v,w=4,j=' ':hfmt("{:b}".format(v),w,j) #xfmt(0xAA) #bfmt(0XAA) -
jonschoning revised this gist
Jan 15, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ hfmt=(lambda s0,w=2,j=' ':(lambda s:j.join([s[i:i+w]for i in range(0,len(s),w)]))(s0 if len(s0)%w==0else'0'*(w-len(s0)%w)+s0)) xfmt=lambda v,w=2,j=' ':hfmt("{:x}".format(v),w,j) bfmt=lambda v,w=4,j=' ':hfmt("{:b}".format(v),w,j) #xfmt("{:x}".format(0xAA)) #bfmt("{:b}".format(0XAA)) -
jonschoning revised this gist
Jan 15, 2023 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ hfmt=(lambda s0,w=2,j=' ':(lambda s:j.join([s[i:i+w]for i in range(0,len(s),w)]))(s0 if len(s0)%w==0else'0'*(w-len(s0)%w)+s0)) xfmt=lambda v,w=2,j=' ':hfmt("{:x}".format(v),w,j) bfmt=lambda v,w=4,j=' ':hfmt("{:b}".format(v),w,j) #hfmt("{:x}".format(0xAA)) #bfmt("{:b}".format(0XAA)) -
jonschoning renamed this gist
Jan 12, 2023 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
jonschoning revised this gist
Jan 11, 2023 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ hfmt=(lambda s0,w=2,j=' ':(lambda s:j.join([s[i:i+w]for i in range(0,len(s),w)]))(s0 if len(s0)%w==0else'0'*(w-len(s0)%w)+s0)) bfmt=lambda s,w=4,j=' ':hfmt(s,w,j) hfmt("{:x}".format(5<<36)) # '50 00 00 00 00' bfmt("{:b}".format(5<<36)) # '0101 0000 0000 0000 0000 0000 0000 0000 0000 0000' -
jonschoning revised this gist
Jan 11, 2023 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,5 @@ hfmt=(lambda s0,w=2,j=' ':(lambda s:j.join([s[i:i+w]for i in range(0,len(s),w)]))(s0 if len(s0)%w==0else'0'*(w-len(s0)%w)+s0)) bfmt=lambda s,w=4,j=' ':hfmt(s,w,j) hfmt("{:x}".format(5<<36)) bfmt("{:b}".format(5<<36)) -
jonschoning revised this gist
Jan 11, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ hfmt=(lambda s0,w=2,j=' ':(lambda s:j.join([s[i:i+w]for i in range(0,len(s),w)]))(s0 if len(s0)%w==0else'0'*(w-len(s0)%w)+s0)) bfmt=lambda s,w=4,j=' ':hfmt(s,w,j) hfmt("{:x}".format(5<<36)) bfmt("{:b}".format(5<<36)) -
jonschoning revised this gist
Jan 11, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ hfmt=(lambda s0,w=2,j=' ':(lambda s:j.join([s[i:i+w]for i in range(0,len(s),w)]))(s0 if len(s0)%w==0else'0'*(w-len(s0)%w)+s0)) bfmt=lambda rs,rw=4,rj=' ':hfmt(rs,rw,rj) hfmt("{:x}".format(5<<36)) bfmt("{:b}".format(5<<36)) -
jonschoning revised this gist
Jan 11, 2023 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ hfmt=(lambda rs,rw=2,rj=' ':(lambda s,w,j:j.join([s[i:i+w]for i in range(0,len(s),w)]))(rs if len(rs)%rw==0else'0'*(rw-len(rs)%rw)+rs,rw,rj)) bfmt=lambda rs,rw=4,rj=' ':hfmt(rs,rw,rj) hfmt("{:x}".format(5<<36)) bfmt("{:b}".format(5<<36)) -
jonschoning revised this gist
Jan 11, 2023 . 1 changed file with 3 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,4 @@ hfmt=(lambda rs,rw=2,rj=' ':(lambda s,w,j:j.join([s[i:i+w]for i in range(0,len(s),w)]))(rs if len(rs)%rw==0else'0'*(rw-len(rs)%rw)+rs,rw,rj)) hfmt("{:x}".format(5<<36)) hfmt("{:b}".format(5<<36), 4) -
jonschoning revised this gist
Jan 11, 2023 . 1 changed file with 3 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,2 +1,3 @@ bfmt=(lambda rs,rw=2,rj=' ':(lambda s,w,j:j.join([s[i:i+w]for i in range(0,len(s),w)]))(rs if len(rs)%rw==0else'0'*(rw-len(rs)%rw)+rs,rw,rj)) bfmt("{:b}".format(5<<36), 4) -
jonschoning revised this gist
Jan 11, 2023 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1 +1,2 @@ bfmt=(lambda rs,rw=2,rj=' ':(lambda s,w,j:j.join([s[i:i+w]for i in range(0,len(s),w)]))(rs if len(rs)%rw==0else'0'*(rw-len(rs)%rw)+rs,rw,rj)) bfmt("{:b}".format(5<<36), 4) -
jonschoning renamed this gist
Jan 11, 2023 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
jonschoning created this gist
Jan 11, 2023 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ (lambda rs,rw=2,rj=' ':(lambda s,w,j:j.join([s[i:i+w]for i in range(0,len(s),w)]))(rs if len(rs)%rw==0else'0'*(rw-len(rs)%rw)+rs,rw,rj)) ("{:b}".format(5<<40), 4)