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
| using System; | |
| using System.Collections.Generic; | |
| using System.Xml.Serialization; | |
| namespace TaskManagerParser | |
| { | |
| public class TaskStatus | |
| { | |
| [XmlArrayItem("Id")] | |
| public List<string> TaskIds { get; set; } |
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
| public void LoadJson() | |
| { | |
| using (StreamReader r = new StreamReader("file.json")) | |
| { | |
| string json = r.ReadToEnd(); | |
| List<Item> items = JsonConvert.DeserializeObject<List<Item>>(json); | |
| } | |
| } | |
| public class Item |
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
| for filename in files: | |
| filepath = os.path.join(dirpath, filename) | |
| newfilepath = os.path.join(dirpath, filename + '.decompressed') | |
| with open(newfilepath, 'wb') as new_file, bz2.BZ2File(filepath, 'rb') as file: | |
| for data in iter(lambda : file.read(100 * 1024), b''): | |
| new_file.write(data) |
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 | |
| # This tool will radom select articles from a wikipedia article select | |
| # and radomly seed it with PII data | |
| import random | |
| import os | |
| from faker import Factory | |
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 | |
| import random | |
| import os | |
| from faker import Factory | |
| import datetime | |
| fake = Factory.create() | |
| def getDocList(rootFoldr): |
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
| i=1;while read l;do mkdir $i;mv $l $((i++));done< <(ls|xargs -n100) |
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
| # -*- coding: utf-8 -*- | |
| # @author: Peter Lamut | |
| import argparse | |
| import os | |
| import shutil | |
| N = 10 # the number of files in seach subfolder folder | |
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 | |
| import os | |
| import random | |
| import shutil | |
| from faker import Factory | |
| fake = Factory.create() | |
| """ | |
| PII Seeding Utility |
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 os | |
| from docx import Document | |
| import uuid | |
| def getDocList(rootFoldr): | |
| filelst = [] | |
| for(dirpath, _, files) in os.walk(rootFoldr): | |
| for filename in files: | |
| filepath = os.path.join(dirpath, filename) |
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 re | |
| import os | |
| import fileinput | |
| import uuid | |
| def getDocList(rootFoldr): | |
| filelst = [] | |
| for(dirpath, _, files) in os.walk(rootFoldr): | |
| for filename in files: |