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
| from typing import Iterable | |
| import magic | |
| from django.core.exceptions import ValidationError | |
| from django.core.files.base import File | |
| from django.template.defaultfilters import filesizeformat | |
| from django.utils.deconstruct import deconstructible | |
| @deconstructible |
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
| from django.core.exceptions import ValidationError | |
| from django.utils.deconstruct import deconstructible | |
| from django.utils.translation import gettext_lazy as _ | |
| @deconstructible | |
| class MaxFileSizeValidatorInMb: | |
| message = _("The file size is %(current_file_size)s MB, exceeding the maximum file size of %(max_file_size)s MB ") | |
| code = "file_size_exceeded" |
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
| #!/bin/sh | |
| # More Mac setup at https://mac.iamdeveloper.com | |
| # Log file | |
| timestamp=$(date +%s) | |
| logFile="./my-mac-setup-$timestamp.log" | |
| # if true is passed in, things will reinstall | |
| reinstall=$1 |
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
| import string | |
| punctuations = list(string.punctuation) | |
| punctuations.remove("-") # we are treating hyphen as seperator so remove it from punctuation list | |
| punctuations = "".join(punctuations) | |
| def piglatin(ogtext): |
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
| import java.util.Scanner; | |
| public class Main | |
| { | |
| public static void main(String[] args) | |
| { | |
| Scanner scan=new Scanner(System.in); | |
| System.out.println("Enter a number: "); | |
| spacer s=new spacer(); | |
| int n=scan.nextInt(),temp=n,temp2=n-1,temp3=1,pass=0,space=0; | |
| String style="*"; |