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 characters
width = models.PositiveIntegerField(_("height"), db_index=True) | |
height = models.PositiveIntegerField(_("width"), db_index=True) | |
def is_horizontal(self): | |
if float(self.height) / self.width <= 0.7: | |
return True | |
def is_vertical(self): | |
if float(self.height) / self.width > 0.7: | |
return True |
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 characters
#!/usr/bin/env python | |
# Assumes the BeautifulSoup4 and Requests libraries are installed. | |
# pip install bs4 requests | |
import requests | |
from bs4 import BeautifulSoup | |
from requests.compat import urljoin |
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 characters
#!/usr/bin/env python3 | |
""" | |
A very simple and hacky Python3 script to convert 16-bit uncompressed WAV | |
files to MPC-3000 .SND files. | |
The output is modelled to copy the output of Wav2Snd | |
(http://www.mpc3000.com/wavsnd.htm) but this might be a bit more portable | |
to run on modern machines. |
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 characters
npub1857yljp0gyd22gwpfqhhu9a86mn8p6eue79re0pe7cvvdwzvrwzshktw9u |
OlderNewer