Ejemplo n.º 1
0

# def getParsed(a):
#     with open(a, "r") as f:
#         f0 = f.read().split("\n")
#         x0 = []
#         for x in f0:
#             if checkFront("class", x):
#                 g = getFinal("class", x)
#                 x0.append(g)
#             elif checkFront("def", x):
#                 g = getFinal("def", x)
#                 x0.append(g)
#             else:
#                 pass
#         return x0

# def mindBlocks(a):
#     with open("layer_"+str(a)+".log","r") as f:
#         return list(filter(lambda x: len(x)>1,f.read().split("\n")))

# fx=lambda x: [z for y in x for z in y]
# m0=[mindBlocks(x) for x in range(9)]
# m0 = fx(m0)
m0=returnWTF()
m1={}
for x in m0.keys():
    m1.update({x: getSet(openfinder(x))})

storeXList(m1, "shredded_keywords_pypi")
# all we need is the search.
Ejemplo n.º 2
0
    # all shit.
    k = list(map(int, k))
    k = sum(k)
    return k > v
    # what the heck?


# def sumOne(a):
#     if type(a)==dict:
#         return
# # get all values?
r = returnXList("trench")
# r0 = [x for x in r.keys()][0]
r = {x: virtual(r[x], 0) for x in r.keys()}
p = [x for x in r.keys() if r[x] == False]
storeXList(p, "invisible_0")
# it would be great measurement if used to all unicode chars.
# ok! now use it to do our task!
# r1 = r[r0]
# # print(r1)
# r1 = (1, 2, 3, 4, {"json": [1, 2, 3, 4, [2, 2, 3, 4, [3, 2, 3, 4]]], "nothing":(1, 2, 3, 4, (2, 2, 3, 4))}, (2, 2, 3, 4))
# really strange.
# ca we just preserve the path?
# xrange not defined. modify it!
# ak(pywalk.walk(node))?
# iterator?
# what if we have the list?
# what the heck?
# alright. problem solved.
# we are removing it.
Ejemplo n.º 3
0
f = None
import sys

sys.path.append("../")
from cruncher import multibw as blackwhite

with open("locate.log", "rb") as fs:
    f = fs.read()
    #x="".join([chr(o) for o in range(500)]).encode()
    f = blackwhite(f, b"\n", 8, False)
    #f=f.split("\n")
    # bytes are strange.
"""
import random
def choice(s):
    rng=random.SystemRandom()
    return rng.choice(s)
print(choice(f))"""
from storeADill import storeXList

storeXList(f, "within")
# store in a db as a service. get count and acquire one.
Ejemplo n.º 4
0
# "apnic_rdns.log"


def getCoords(a):
    a = openText(a)
    a = getCode(a)
    return a


def genDict(a):
    return {x + "_rdns.log": "ftp://ftp." + x + ".net/pub/zones/" for x in a}


# for x in a:
#     print(x)
# all the same.
# add them together.
a = ["afrinic", "apnic", "lacnic", "arin", "ripe"]
a = genDict(a)
a = {x: list(map(lambda y: a[x] + y, getCoords(x))) for x in a.keys()}
# i said, put it into database.
storeXList(a, "rock")
# think about it.
# print(a)
# a=[y for z in [a[x] for x in a.keys()] for y in z]
# for x in a:
#     print(x)
# we'd better flattern this thing.
# check if it is done?
# use batch worker.
Ejemplo n.º 5
0
from been_well import main
from getFromDill import returnXList
from storeADill import storeXList
import copy
if __name__ == "__main__":
    r = returnXList("rockstar")
    # r = returnXList("rock")
    f = copy.copy(r)
    r0 = [x for x in r.keys() if not r[x]]
    for y in r0:
        main(y)
        f.update({y: True})
        storeXList(f, "rockstar")
# need for failsafe.
Ejemplo n.º 6
0
def getParsed(a):
    with open(a, "r") as f:
        f0 = f.read().split("\n")
        x0 = []
        for x in f0:
            if checkFront("class", x):
                g = getFinal("class", x)
                x0.append(g)
            elif checkFront("def", x):
                g = getFinal("def", x)
                x0.append(g)
            else:
                pass
        return x0


def mindBlocks(a):
    with open("layer_" + str(a) + ".log", "r") as f:
        return list(filter(lambda x: len(x) > 1, f.read().split("\n")))


fx = lambda x: [z for y in x for z in y]
m0 = [mindBlocks(x) for x in range(9)]
m0 = fx(m0)
m1 = {}
for x in m0:
    m1.update({x: getParsed(x)})

storeXList(m1, "functors_and_classes")
# all we need is the search.
Ejemplo n.º 7
0
#             d += x


# def getParsed(a):
#     with open(a, "r") as f:
#         f0 = f.read().split("\n")
#         x0 = []
#         for x in f0:
#             if checkFront("class", x):
#                 g = getFinal("class", x)
#                 x0.append(g)
#             elif checkFront("def", x):
#                 g = getFinal("def", x)
#                 x0.append(g)
#             else:
#                 pass
#         return x0

def mindBlocks(a):
    with open("layer_"+str(a)+".log","r") as f:
        return list(filter(lambda x: len(x)>1,f.read().split("\n")))

fx=lambda x: [z for y in x for z in y]
m0=[mindBlocks(x) for x in range(9)]
m0 = fx(m0)
m1={}
for x in m0:
    m1.update({x: getSet(openfinder(x))})

storeXList(m1, "shredded_keywords")
# all we need is the search.
Ejemplo n.º 8
0
from storeADill import storeXList
def flat(x):
    return [z for y in x for z in y]

def returnIp(a,b=""):
    assert a>=0
    if b=="":
        assert a>0
        return returnIp(a-1,[str(x) for x in range(256)])
    elif a>0:
        return returnIp(a-1,list(map(lambda x:".".join(x),flat([[[str(y),z] for z in b] for y in range(256)]))))
    else:
        return b

b=returnIp(2)
storeXList(b,"ipv4_list_0")
storeXList(b,"ipv4_list_1")
Ejemplo n.º 9
0
            d += x


def getParsed(a):
    with open(a, "r") as f:
        f0 = f.read().split("\n")
        x0 = []
        for x in f0:
            if checkFront("from", x):
                g = getFinal("from", x)
                x0.append(g)
            elif checkFront("import", x):
                g = getFinal("import", x)
                x0.append(g)
            else:
                pass
        return x0

def mindBlocks(a):
    with open("layer_"+str(a)+".log","r") as f:
        return list(filter(lambda x: len(x)>1,f.read().split("\n")))

fx=lambda x: [z for y in x for z in y]
m0=[mindBlocks(x) for x in range(9)]
m0 = fx(m0)
m1={}
for x in m0:
    m1.update({x: getParsed(x)})

storeXList(m1, "imported_modules")
# all we need is the search.
Ejemplo n.º 10
0
#         x0 = []
#         for x in f0:
#             if checkFront("class", x):
#                 g = getFinal("class", x)
#                 x0.append(g)
#             elif checkFront("def", x):
#                 g = getFinal("def", x)
#                 x0.append(g)
#             else:
#                 pass
#         return x0


def mindBlocks(a):
    with open("layer_" + str(a) + ".log", "r") as f:
        return list(filter(lambda x: len(x) > 1, f.read().split("\n")))


def fx(x):
    return [z for y in x for z in y]


m0 = [mindBlocks(x) for x in range(9)]
m0 = fx(m0)
m1 = {}
for x in m0:
    m1.update({x: getSet(openfinder(x))})

storeXList(m1, "shredded_realcode")
# all we need is the search.
Ejemplo n.º 11
0
    # type theory is all about law works.
    # trust me. just some lawyers' theory, easy to learn.
    b = ""
    c = []
    for x in a:
        if x not in x0:
            b += x
        else:
            if b != "":
                c.append(b)
                b = ""
    if b != "":
        c.append(b)
        b = ""
    return c


r = returnXList("invisible_0")
f = ""
with open("trench.log", "r") as f0:
    f = f0.read()
f = scanner(f, r)
# with open("trencher.log","w+") as f0:
#     # f=f0.read()
#     for x in f:
#         f0.write(x+"\n")
storeXList({x: False for x in f}, "rockstar")
# immortal internet?
# now, get to it!
# there are non-english word inside.
Ejemplo n.º 12
0
# def metaloop(a):
# /usr/share/neo4j/data/databases/graph.db/


def parallel(v, z):
    with Pool(processes=len(z)) as pool:
        return pool.map(v, z)


if __name__ == "__main__":
    freeze_support()
    r = returnXList("rock")
    f = copy.copy(r)
    r0 = [x for x in r.keys() if not r[x]]
    r1 = windowEndMarkEx(r0, 10)
    # very strange.
    # not too damn much.
    # you want this.
    rx = len(r0)
    for x in r1:
        # p=Pool(the_loop,x)
        print(rx, "items left")
        p = "".join(str(parallel(the_loop, x)))
        # what the heck.
        for y in x:
            f.update({y: True})
        storeXList(f, "rock")
        rx -= len(x)
# rebuild the thing.
# maybe it is deleted.