Skip to content

Commit b231d6a

Browse files
committed
DAMICORE files uploaded.
1 parent 56d8256 commit b231d6a

File tree

3,402 files changed

+432425
-689
lines changed

Some content is hidden

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

3,402 files changed

+432425
-689
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
.ipynb_checkpoints/
22
.vagrant/
3+
.vscode
4+
__pycache__
35
hydra.restore
46
host-nastware.log
7+
damicore/bkp
8+
damicore/erro.txt
9+
damicore/tmp/

damicore/LICENSE

Lines changed: 340 additions & 0 deletions
Large diffs are not rendered by default.

damicore/README.md

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# DAMICORE
2+
3+
DAMICORE is an easy-to-use clustering and classification tool.
4+
5+
DAMICORE is a pipeline of algorithms which is agnostic to the type of data
6+
thanks to NCD, a compressor-based metric which views any piece of data as
7+
simply a string of bits. This is particularly well-suited for heterogenous
8+
datasets, datasets with difficult characteristics extraction and text datasets.
9+
10+
Data Metric Distance matrix Simplification Phylogenetic tree
11+
-----. .---------------------. .-----------------.
12+
x_1 | | x_1 x_2 ... x_n | | x_1-. x_n |
13+
x_2 | .-----. | x_1 d11 d12 d1n | .----. | \ | |
14+
x_3 |->| NCD |->| x_2 d21 d22 d2n |--->| NJ |--->| O-O---- |-->
15+
... | '-----' | ... | '----' | / |
16+
x_n | | x_n dn1 dn2 dnn | | x_2---' |
17+
-----' '---------------------' '-----------------'
18+
19+
Community detection Clusters
20+
-----. .-----------------.
21+
| | ___ ___ |
22+
| .-------------. | |x_1| | | |
23+
tree |--->| Fast Newman |---->| |x_2| ... |C_m| |
24+
| '-------------' | |x_n| | | |
25+
| | '---' '---' |
26+
-----' '-----------------'
27+
28+
29+
## Dependencies
30+
31+
### Installation
32+
* python 3.10
33+
* igraph library (visit http://igraph.org/c for more informations)
34+
* python-igraph (visit http://igraph.org/python for more informations)
35+
36+
### Execution
37+
38+
DAMICORE relies on compressors to calculate the distance between a pair of
39+
objects (files).
40+
41+
* gzip (available in almost all \*nix systems)
42+
* bzip2 (available in almost all \*nix systems)
43+
44+
### Recommended
45+
46+
* FigTree (available in http://tree.bio.ed.ac.uk/software/figtree/)
47+
48+
## Usage
49+
50+
The simplest way to use DAMICORE is to provide as argument a directory
51+
containing all files to be compared:
52+
53+
$ ./damicore.py examples/texts
54+
55+
This outputs a list of pairs of file name and corresponding cluster index.
56+
For now we are lacking a good tool to visualize this clustering, but there are
57+
other tools that might help. We can output intermediate steps into different
58+
files for analysis:
59+
60+
$ ./damicore.py examples/texts --ncd-output texts.phylip --format phylip \
61+
--tree-output texts.newick --graph-image texts.png --output texts.clusters \
62+
--compress gzip
63+
64+
This outputs the NCD matrix using PHYLIP format, the neighbor-joining tree in
65+
Newick format (readable by FigTree), an image with a graph visualization and
66+
the final clusters into another file.
67+
68+
By default, the script uses PPMd as compressor. If you don't have it installed,
69+
try using gzip or bzip2:
70+
71+
$ ./damicore.py examples/texts --compressor gzip
72+
73+
For more information on available options, see --help.
74+
75+
## Contact
76+
77+
If you believe you have found a bug, or would like to ask for a feature, please
78+
inform me at [email protected].
79+
80+
## License
81+
82+
This software is licensed under the GPLv2.
83+
Texts examples dataset collected by Francisco José Monaco ([email protected])
84+
More informations in https://github.com/brunokim/damicore-python .

damicore/examples/texts/ENG-TXT-1.txt

Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
US begins government shutdown as budget deadline passes
2+
Previous
3+
Latest
4+
Who's affected
5+
Analysis
6+
Storm clouds
7+
60-sec explainer
8+
Q&A
9+
Economy
10+
Next
11+
COMMENTS (219)
12+
13+
What does shutdown mean for two million federal employees, agencies and tourist destinations?
14+
Continue reading the main story
15+
US budget row
16+
17+
Who is affected
18+
Q&A
19+
Mardell analysis
20+
Impact
21+
The US government has begun a partial shutdown after the two houses of Congress failed to agree a new budget.
22+
23+
The Republican-led House of Representatives insisted on delaying President Barack Obama's healthcare reform - dubbed Obamacare - as a condition for passing a bill.
24+
25+
More than 700,000 federal employees face unpaid leave with no guarantee of back pay once the deadlock is over.
26+
27+
It is the first shutdown in 17 years and the dollar fell early on Tuesday.
28+
29+
Continue reading the main story
30+
31+
Start Quote
32+
33+
The Republican leadership looks and feels trapped - they made demands that they knew wouldn't be met rather than be accused of weakness and betrayal by their own hardliners”
34+
35+
image of Mark Mardell
36+
Mark Mardell
37+
North America editor
38+
Read more from Mark
39+
Goldman Sachs estimates a three-week shutdown could shave as much as 0.9% from US GDP this quarter.
40+
41+
On Tuesday, Mr Obama blamed the House of Representatives for the stalemate and said he would "keep working to get Congress to reopen the government [and] restart vital services".
42+
43+
"This shutdown was completely preventable. It should not have happened," he wrote in a letter to federal government employees.
44+
45+
"And the House of Representatives can end it as soon as it follows the Senate's lead, and funds your work in the United States Government without trying to attach highly controversial and partisan measures in the process."
46+
47+
On Monday, House Speaker John Boehner told reporters he hoped the Senate would agree to a committee between the two chambers known as a conference "so we can resolve this for the American people".
48+
49+
"The House has voted to keep the government open but we also want basic fairness for all Americans under Obamacare," he said.
50+
51+
But on Tuesday morning, the Senate voted 54-46 to reject the request for formal negotiations to end the impasse.
52+
53+
Who is affected?
54+
Figures
55+
Continue reading the main story
56+
State department will be able to operate for limited time
57+
Department of defence will continue military operations
58+
Department of education will still distribute $22bn (£13.6bn) to public schools, but staffing is expected to be severely hit
59+
Department of energy - 12,700 staff expected to be sent home, with 1,113 remaining to oversee nuclear arsenal
60+
Department of health and human services expected to send home more than half of staff
61+
The Federal Reserve, dept of homeland security, and justice dept will see little or no disruption
62+
US Postal Services continue as normal
63+
Smithsonian institutions, museums, zoos and many national parks will close
64+
US shutdown in 60 seconds
65+
Who will be affected
66+
Q&A: 2013 US budget brawl
67+
Continue reading the main story
68+
Timeline: US budget crisis
69+
70+
20 September: House votes to scrap funding for Affordable Care Act ("Obamacare")
71+
30 September: Congress passes two budget bills coupled to Obamacare, both rejected by Senate
72+
1 October: Key provisions of Obamacare come into force despite shutdown
73+
17 October: Deadline for extending government borrowing limit, or debt ceiling
74+
The BBC's Mark Mardell in Washington says the divide in US politics has grown so bitter that government itself cannot function.
75+
76+
Democrats were never likely to make concessions on healthcare reform - Mr Obama's signature achievement and a central issue in last year's presidential election, our correspondent says.
77+
78+
But Republicans have made demands that they knew would not be met rather than be accused of weakness and betrayal by their own hardliners, he adds.
79+
80+
81+
Engineers with the US Navy talk to the BBC about what they will do during a shutdown: Make skis
82+
On Monday, the Democratic-led Senate twice rejected bills from House Republicans that would have funded the government only if funding for President Obama's healthcare law was delayed for a year.
83+
84+
Major portions of the healthcare law, which passed in 2010 and has been validated by the US Supreme Court, took effect on Tuesday regardless of whether there is a shutdown.
85+
86+
President Obama went on national television to criticise Republicans for trying to refight the last election.
87+
88+
89+
Obama accused Republicans of demanding ransom over Obamacare
90+
A shutdown would have "a very real economic impact on real people, right away," he said, adding it would "throw a wrench" into the US recovery.
91+
92+
"The idea of putting the American people's hard-earned progress at risk is the height of irresponsibility, and it doesn't have to happen."
93+
94+
As the shutdown neared, the Senate's Democratic majority leader blamed Republicans for the imminent halt to all non-essential government operations.
95+
96+
"It will be a Republican government shutdown, pure and simple," said Harry Reid, referring to the Republicans as "bullies".
97+
98+
A US Park Police officer watches at left as a National Park Service employee posts a sign on a barricade closing access to the Lincoln Memorial in Washington on 1 October 2013.
99+
The White House issued orders for government offices to start shutting down as the midnight deadline approached
100+
Tourists look at a sign announcing that the Statue of Liberty is closed due to a US government shutdown in New York, on 1 October 2013.
101+
Tourism revenues are expected to take a hit as attractions such as the Statue of Liberty close down
102+
Signpost announcing closure of Library of Congress in Washington DC on 1 October
103+
National parks, museums, federal buildings and government services have been shut down indefinitely
104+
A furloughed federal employee holds a sign on the steps to the US Capitol after the US government shut down last night, on Capitol Hill in Washington on 1 October 2013.
105+
Some 700,000 federal workers have been sent home on unpaid leave
106+
A barricade leading to the Lincoln Memorial prevents access to tourist buses in Washington on 1 October 2013.
107+
Some White House staff have been sent home, with all Smithsonian institutions in Washington closed
108+
Mr Obama has signed legislation ensuring that military personnel would be paid. The defence department had advised employees that uniformed members of the military would continue on normal duty, but that large numbers of civilian workers would be told to stay home.
109+
110+
Continue reading the main story
111+
US media
112+
113+
Michael Gerson, Washington Post: We are no longer seeing a revolt against the Republican leadership, or even against the Republican "establishment"; this revolt is against anyone who accepts the constraints of political reality.
114+
115+
Editorial, Chicago Tribune: Once Republicans and Democrats stop grandstanding... we think there's an easy solution to this impasse.
116+
117+
Continue reading the main story
118+
International media
119+
120+
Pierre-Yves Dugua, Le Figaro, France: The [US] is being humiliated by the inability of its political system to carry out its primary mission: to pass a budget.
121+
122+
Patrick Welter, Frankfurter Allgemeine Zeitung, Germany: The failure to reach agreement casts a dark shadow on the next and more important forthcoming round in the fiscal row.
123+
124+
Andrew Coyne, National Post, Canada: The result of all this haggling, taken together, has been just the sort of balanced approach, mixing spending cuts and tax increases, that experts advise.
125+
126+
Under the shutdown, national parks and Washington's Smithsonian museums will close, pension and veterans' benefit cheques will be delayed, and visa and passport applications will go unprocessed.
127+
128+
Programmes deemed essential, such as air traffic control and food inspections, will continue.
129+
130+
The US government has not undergone a shutdown since 1995-96, when services were suspended for a record 21 days.
131+
132+
Republicans demanded then-President Bill Clinton agree to their version of a balanced budget.
133+
134+
As lawmakers grappled with the latest shutdown, the 17 October deadline for extending the government's borrowing limit looms even larger.
135+
136+
On that date, the US government will reach the limit at which it can borrow money to pay its bills, the so-called debt ceiling.
137+
138+
House Republicans have also demanded a series of policy concessions - including on the president's health law and on financial and environmental regulations - in exchange for raising the debt ceiling.
139+
140+
Guy Crundwell from Connecticut told the BBC that politicians should be solving the country's problems rather than engaging in a "charade".
141+
142+
"I am very fiscally conservative but for moral issues I lean towards the Democrats, but I'll be damned if I want to see either of them wasting my money on this sort of posturing."
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
Pupils breakfasting on energy drinks
2+
By Hannah Richardson
3+
BBC News education reporter
4+
Energy drinks
5+
Energy drinks can have very high levels of caffeine and are not usually recommended for children
6+
Continue reading the main story
7+
Related Stories
8+
9+
Parents 'fail to give breakfast'
10+
Call for free school breakfasts
11+
One in 20 teenage pupils goes to school on a can of energy drink instead of a good breakfast, a survey suggests.
12+
13+
A third of UK teenagers eat unhealthy breakfasts such as fry-ups or crisps, the poll of 2,000 youngsters aged between 12 and 18 suggests.
14+
15+
Four out of 10 skip breakfast altogether to lose weight, the poll for the Make Mine Milk campaign suggests.
16+
17+
Brian Lightman, general secretary of the Association of School and College Leaders, said the results were a worry.
18+
19+
He said pupils breakfasting on energy drinks, which are not usually recommended for children, was something he had seen as a head teacher.
20+
21+
'Hyperactive'
22+
"When children arrive in schools having started the day eating or drinking totally inappropriate things like that, they are in no fit state to be in the classroom.
23+
24+
"They can be hyperactive, and it can have a very negative effect on their behaviour."
25+
26+
He added that parents should be ensuring that their children were eating good breakfasts, rather than sending them off with money to buy something on the way to school.
27+
28+
He added: "There's a lot of advertising with these drinks and they are fashionable, and teenagers love things that are fashionable."
29+
30+
Dr Mary Bousted, general secretary of the Association of Teachers and Lecturers (ATL), also said it was vital that children had a good and nutritious breakfast to set them up for the day and enable them to concentrate in class.
31+
32+
"A healthy breakfast is also important in stopping children become fractious and badly behaved.
33+
34+
"It is worrying to think that some children are breakfasting on energy drinks, such as Red Bull, which are stuffed full of sugar and stimulants and have little nutritional value.
35+
36+
"School breakfast clubs can play a key role in making sure children have had a good breakfast before they start school to help their learning. And we would like children to be taught about healthy eating, so they learn about healthy diets and how to cook nutritious meals."
37+
38+
Caffeine content in such energy drinks ranges from about 8mg of caffeine - about the same as an espresso coffee - to as much as 400mg.
39+
40+
'Shot style'
41+
Some of the smaller "shot style" products can contain as much as 175mg of caffeine in a 60ml bottle.
42+
43+
Drinks containing more than 150mg of caffeine per litre (mg/l) must be labelled with the term "high caffeine content", and the Food Standards Agency recommends that children should only "consume in moderation drinks with high levels of caffeine".
44+
45+
The makers of the Red Bull Energy Drink did not wish to comment on the issue raised but its website says: "Red Bull Energy Drink's special formula has been appreciated worldwide by top athletes, students, and when undertaking demanding work or during long drives."
46+
47+
It adds the drink is "the ideal equipment when you are active and keen to set personal bests".
48+
49+
Director general of the British Soft Drinks Association Gavin Partington said: "The soft drinks industry is clear that energy drinks are not suitable for children, and we want to get that message across to young people and their parents.
50+
51+
"Adults might choose an energy drink, containing about as much caffeine as a typical cup of coffee, when they want a physical or mental boost. But, like all food and drink, energy drinks should be consumed in moderation as part of a balanced diet and active lifestyle."
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
UK in Afghanistan transformed country, says commander
2+
british soldiers in afghanistan
3+
All British combat operations are due to finish by the end of 2014
4+
Continue reading the main story
5+
UK troops in Afghanistan
6+
7+
Military deaths in Afghanistan
8+
UK packs up equipment in Afghanistan
9+
Roadside bombs 'deadliest weapon'
10+
Changing role of UK troops
11+
British sacrifices have transformed Afghanistan, an Army commander says.
12+
13+
Brig Rupert Jones said the drawdown of UK troops was progressing well and that the British people should be proud of what they have achieved in the country.
14+
15+
The UK had given the Afghans "an opportunity", he said, but warned it was "down to them" how they used it.
16+
17+
Brig Jones is commander of Task Force Helmand, whose HQ moved from Lashkar Gah to Camp Bastion in summer. He is due to hand over to Brig James Woodham.
18+
19+
'Lot of effort'
20+
Almost 8,000 British troops are still serving in Afghanistan, around half of them based at the camp.
21+
22+
The number is scheduled to fall to 5,200 by the end of the year.
23+
24+
All UK combat operations are due to finish by the end of 2014, with responsibility transferred to Afghan forces.
25+
26+
Since the war began 12 years ago, 444 UK service personnel have lost their lives in the fight against the Taliban.
27+
28+
"I think the reality is we've spilled an awful lot of effort in this country over a considerable amount of time," the outgoing commander said.
29+
30+
"The British public are very proud of the courage and sacrifice of the British armed forces here, but actually they should be just as proud of the achievements.
31+
32+
"The reality is that we will be leaving Helmand a transformed province, indeed the whole of Afghanistan is transformed. We should be proud of that.
33+
34+
"We've given the Afghans an opportunity. How they use that opportunity is down to them, but there's no doubt they've been given an opportunity."
35+
36+
'Far superior'
37+
The Afghans had "taken the lead" over this summer's fighting and had sustained some casualties, but had done a "genuinely impressive job", he said.
38+
39+
"There's no doubt the insurgents wanted to try and have a decisive effect this summer.
40+
41+
"The fact that they have not been able to is down to the Afghan performance."
42+
43+
He said Helmand province was still "a dangerous place", but said the casualties had not had a "decisive impact" on the police or army.
44+
45+
His comments were echoed by some of the members of 2 Scots, who spent their tour of more than six months training and mentoring the Afghan National Police at Lashkar Gah.
46+
47+
The local security forces were described by Warrant Officer William Garrick as "a lot better at what they do than we are".
48+
49+
"They may not have the capability in terms of the vehicles, the manpower etc.
50+
51+
"But in terms of common knowledge they are certainly far superior than we are."

0 commit comments

Comments
 (0)