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
#!/home/herminio/py385/bin/python | |
import glob | |
import json | |
import chalk | |
import asyncio | |
import aiofiles | |
import tabulate | |
import pandas as pd | |
import itertools as it |
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
df = reduce(lambda a,b: a.union(b), [spark.read.json(f'{x}/*result.json') for x in range(195, 202)]) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
sudo dd bs=4M if=/path/to/manjaro.iso of=/dev/sd[drive letter] status=progress oflag=sync |
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
truncate -s 0 $(docker inspect --format='{{.LogPath}}' t1) |
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 lxml import etree | |
from functional import seq | |
p = etree.load(open('a.xml')) | |
root = p.getroot() | |
seq(root.getchildren()).map(lambda x: etree.QName(x).localname) |
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
sc.binaryFiles(new_file).values().flatMap(lambda x: x.decode("iso-8859-1").split(chr(172))).map(lambda x: x.split(chr(171))) |
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
def DataStoreFileReader(file, chunk_size=512, lineterminator=172, delimiter=171): | |
chunk = "" | |
while True: | |
curr = file.read(chunk_size) | |
chunk += curr | |
if not curr: | |
break | |
if chr(lineterminator) in chunk: | |
lines = chunk.split(chr(lineterminator)) | |
for line in lines[0:-1]: |
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 asyncio | |
import glob | |
import aiofiles | |
import subprocess | |
async def read_file(f): | |
print("start: " + f) | |
async with aiofiles.open(f, 'r') as fd: | |
lines = await fd.read() |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<script src="/static/d3.min.js"></script> | |
<script src="/static/vue.js"></script> | |
<script src="/static/jsnetworkx.js"></script> | |