This file contains 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 characters
## A fun lil guessing game. | |
import sys, random, time, os | |
try: | |
import rich, pyfiglet | |
except: | |
pass | |
MAX_GUESSES = 5 | |
MAX_NUMBER = 20 |
This file contains 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 characters
How To Get A GIF From A Tweet | |
Twitter converts uploaded .gif files to a video for ease of use. However, | |
you may want to get this .gif file. As far as I know it's | |
not possible to download the raw .gif file, if any, that Twitter stores. | |
However, it is possible to download the video file using curl and | |
convert it to a gif using ffmpeg (though making a high quality .gif | |
may require some knowledge of ffmpeg's arcane parameters). | |
Instructions: |
This file contains 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 characters
#!/usr/bin/env python3 | |
import sys, os | |
def alert(): | |
os.system('say -v Tessa "Your task has been completed."') | |
def alert_on_pipe_close(): | |
try: | |
while True: |
This file contains 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 characters
// groupcities.js | |
// An alternative solution to: | |
// https://dev.to/albinotonnina/how-to-lose-a-it-job-in-10-minutes-35pi | |
// | |
// Given an array of city names, group the ones that are rotations of | |
// each other together. e.g.: | |
// | |
// input: ['Tokyo', 'London', 'Rome', 'Donlon', 'Kyoto', 'Paris'] | |
// output: | |
// [ |
This file contains 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 characters
# python 3.6+ | |
# written for: https://dev.to/r0f1/write-a-simple-but-impactful-script-7ba | |
import sys, random, argparse | |
parser = argparse.ArgumentParser( | |
description='Print the numbers from 0000 to 9999 in random order.') | |
parser.add_argument('FILENAME', | |
type=str, | |
default=None, |
This file contains 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 characters
<html> | |
<head> | |
<meta content="text/html;charset=utf-8" http-equiv="Content-Type"> | |
<meta content="utf-8" http-equiv="encoding"> | |
<title>Neurochromohexonics</title> | |
<!-- Synaptic neural net library --> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/synaptic/1.1.4/synaptic.js"></script> | |
<!-- fight me --> |
This file contains 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 characters
from itertools import islice | |
def ints_from(start=2, step=1): | |
next = start | |
while True: | |
next += step | |
yield next | |
def take(n, iterable): | |
"""Return first n items of the iterable as a list |
This file contains 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 characters
<table> | |
<thead> | |
<tr> | |
<th>Item</th> | |
</tr> | |
</thead> | |
<tbody> |
This file contains 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 characters
# bitsnake.rb | |
# A solution to the Ancient City Ruby 2016 programming challenge: | |
# http://www.ancientcityruby.com/snake_case/ | |
# | |
# Dustin King ( [email protected] / @cathodion ) | |
# | |
# Counts the number of paths through an 10x10 grid of city blocks | |
# moving only East and South. | |
EAST_BLOCKS = 10 |
This file contains 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 characters
# funvert.py | |
# A hack to enable calling functions as if they were methods | |
# | |
# Author: Dustin King ([email protected]) | |
# Grown from this tweet by Zygmunt Zając: | |
# https://twitter.com/zygmuntzajac/status/685161914117296128 | |
# | |
# Superseded by: https://github.com/dmoney/funvert | |
class Funverted: |
NewerOlder