Skip to content

Instantly share code, notes, and snippets.

@sguzman
sguzman / contractions.py
Created June 17, 2020 03:16 — forked from nealrs/contractions.py
Expand common (and some very uncommon) english contractions
"""
this code is not mine! i shamelessly copied it from http://stackoverflow.com/questions/19790188/expanding-english-language-contractions-in-python
all credits go to alko and arturomp @ stack overflow.
basically, it's a big find/replace.
"""
import re
cList = {
"ain't": "am not",
@sguzman
sguzman / func.wls
Created June 16, 2020 08:46
Recursive func for producing minimal grammar based on most frequent sequence
func[{
junk_,
c_,
cardinalList_,
carg_
}] :=
With[{
cardinal = Association[cardinalList]
},
With[{
@sguzman
sguzman / pacman.conf
Created June 15, 2020 04:40
My pacman file
# /etc/pacman.conf
#
# See the pacman.conf(5) manpage for option and repository directives
#
# GENERAL OPTIONS
#
[options]
# The following paths are commented out with their default values listed.
@sguzman
sguzman / collatz_fun.wls
Last active June 12, 2020 23:44
Simple funcs for studying the collatz conjecture in Mathematica. Not gonna lie, pretty proud of this.
collatz[1] = 1
collatz[n_Integer /; And[n > 1, OddQ[n]]] := collatz[n] = 3 n + 1
collatz[n_Integer /; And[n > 1, EvenQ[n]]] := collatz[n] = n / 2
collatzseq[1] = {1}
collatzseq[n_Integer /; n > 1] := collatzseq[n] = {n, Splice@collatzseq@collatz@n}
nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig: version 390.25 (buildmeister@swio-display-x86-rhel47-03) Wed Jan 24 20:46:04 PST 2018
Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0"
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
EndSection
@sguzman
sguzman / date.sh
Created May 28, 2020 07:19
Extreme dating
date +'%A(%u/7) Week(%V/53) Day(%j/365) %d %B(%m/12) Quarter(%q/4) %Y %H:%M:%S(%s) %Z(%z)'
@sguzman
sguzman / delete_git_submodule.md
Created May 27, 2020 13:25 — forked from myusuf3/delete_git_submodule.md
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@sguzman
sguzman / castero-import.txt
Created May 14, 2020 00:38
Actual rss feeds unlike the my previous gist...
https://rss.art19.com/the-daily-smile
https://rss.art19.com/fighting-coronavirus-from-american-innovations
https://rss.art19.com/joe-exotic
https://rss.art19.com/even-the-rich
https://rss.art19.com/the-dating-game-killer
https://rss.art19.com/dying-for-sex
https://rss.art19.com/wecrashed
https://rss.art19.com/deadly-misadventures
https://rss.art19.com/blood-ties
https://rss.art19.com/the-sneak
@sguzman
sguzman / wondery.txt
Created May 14, 2020 00:35
Some Wondery Podcast show RSS feeds
https://wondery.com/shows/the-daily-smile/
https://wondery.com/shows/severed-threads/
https://wondery.com/shows/wondery-kids/
https://wondery.com/shows/the-school-of-greatness/
https://wondery.com/shows/fighting-coronavirus/
https://wondery.com/shows/joe-exotic/
https://wondery.com/shows/motive-for-murder/
https://wondery.com/shows/into-america/
https://wondery.com/shows/why-is-this-happening-with-chris-hayes/
https://wondery.com/shows/the-oath-with-chuck-rosenberg/
@sguzman
sguzman / feeds_unique.txt
Created May 11, 2020 10:08 — forked from eteubert/feeds_unique.txt
List of Podcast RSS Feeds, extracted via iTunes API
This file has been truncated, but you can view the full file.
<http://sailortalk.podOmatic.com/rss2.xml>
HTTP://www.knient.com/CAL/CAL-Podcast/CAL-Podcast.xml
Http://feeds.feedburner.com/fridgeandhbomb
Http://feeds.feedburner.com/wfodicks
Http://ravenc-taouf.podomatic.com/rss2.xml
Http://www.calvaryonline.org/podcasts/podcast.xml
Http://www.changkhui.com/XML/teemateepai.xml
httP://dtfreunde.podcaster.de/Deutsches_Theater.rss
http://-myantioch.sermon.tv/rss/main