Skip to content

Commit 6e1c5ef

Browse files
committed
Merge branch 'bi'
2 parents cb1ed51 + 423f0aa commit 6e1c5ef

File tree

113 files changed

+16272
-638
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+16272
-638
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
*.jar
55
*.war
66
*.ear
7+
*.pyc
78

89
# IntelliJ stuff
910
.idea
@@ -13,7 +14,8 @@ ldbc_socialnet_dbgen.iml
1314
target/
1415
.m0factors.txt.crc
1516
.m0friendList0.csv.crc
16-
paramgenerator/.pyc
1717
substitution_parameters/
1818
target/
1919
*.pyc
20+
scripts/
21+
*.iml

.project

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>ldbc_snb_datagen</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
<buildCommand>
14+
<name>org.eclipse.m2e.core.maven2Builder</name>
15+
<arguments>
16+
</arguments>
17+
</buildCommand>
18+
</buildSpec>
19+
<natures>
20+
<nature>org.eclipse.jdt.core.javanature</nature>
21+
<nature>org.eclipse.m2e.core.maven2Nature</nature>
22+
</natures>
23+
</projectDescription>

:

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Merge branch 'bi' of github.com:ldbc/ldbc_snb_datagen into bi
2+
3+
# Please enter a commit message to explain why this merge is necessary,
4+
# especially if it merges an updated upstream into a topic branch.
5+
#
6+
# Lines starting with '#' will be ignored, and an empty message aborts
7+
# the commit.

paramgenerator/generateparams.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ def findNameParameters(names, amount = 100):
3434
i -= 1
3535
return res
3636

37-
38-
3937
class CSVSerializer:
4038
def __init__(self):
4139
self.handlers = []
@@ -130,19 +128,23 @@ def main(argv=None):
130128
return 1
131129

132130
indir = argv[1]+"/"
133-
factorFiles=[]
131+
activityFactorFiles=[]
132+
personFactorFiles=[]
134133
friendsFiles = []
135134
outdir = argv[2]+"/"
136135
random.seed(SEED)
137136

137+
138138
for file in os.listdir(indir):
139-
if file.endswith("factors.txt"):
140-
factorFiles.append(indir+file)
139+
if file.endswith("activityFactors.txt"):
140+
activityFactorFiles.append(indir+file)
141+
if file.endswith("personFactors.txt"):
142+
personFactorFiles.append(indir+file)
141143
if file.startswith("m0friendList"):
142144
friendsFiles.append(indir+file)
143145

144146
# read precomputed counts from files
145-
(personFactors, countryFactors, tagFactors, tagClassFactors, nameFactors, givenNames, ts) = readfactors.load(factorFiles, friendsFiles)
147+
(personFactors, countryFactors, tagFactors, tagClassFactors, nameFactors, givenNames, ts, postHisto) = readfactors.load(personFactorFiles, activityFactorFiles, friendsFiles)
146148

147149
# find person parameters
148150
print "find parameter bindings for Persons"
@@ -234,7 +236,7 @@ def main(argv=None):
234236
}
235237

236238
print "find parameter bindings for Timestamps"
237-
selectedTimeParams = findTimeParams(timeSelectionInput, factorFiles, friendsFiles, ts[1])
239+
selectedTimeParams = findTimeParams(timeSelectionInput, personFactorFiles, activityFactorFiles, friendsFiles, ts[1])
238240
# Query 11 takes WorksFrom timestamp
239241
selectedTimeParams[11] = [random.randint(ts[2], ts[3]) for j in range(len(selectedPersonParams[11]))]
240242

0 commit comments

Comments
 (0)