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
clean_extensionjpg(){ | |
mmv \*.[Jj][Pp][Gg] \#1.jpg | |
mmv \*.[Jj][Pp][Ee][Gg] \#1.jpg | |
} | |
clean_extensionpng(){ | |
mmv -v \*.[Pp][Nn][Gg] \#1.png | |
} | |
clean_extension(){ | |
clean_extensionpng | |
clean_extensionjpg |
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
import csv | |
with open('input.csv') as f: | |
fieldnames = ('tag', 'label', 'description', 'user_id') | |
r = csv.DictReader(f, fieldnames, delimiter='|') | |
next(f, None) # skip header | |
rows = [] | |
k = 0 | |
for row in r: | |
txt = "Issue.create(tag:'" + row['tag'] + "', label:'" + row['label'] + "', description:'" + row['description'] + "' , user_id:'1')" | |
with open("output.rb", "a") as output_file: |
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
<?php | |
include_once("header.php"); | |
require_once("engine/discourse/DiscourseAPI.php"); | |
$apiUser = "USERNAME"; | |
$mailUser = "MAIL"; | |
$discourseApi = new richp10\discourseAPI\DiscourseAPI("discourse.partipirate.org", $config["discourse"]["api_key"], "https"); | |
// Tests : |