Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/Console/Commands/ExcelImporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function __construct()
public function handle()
{
Log::info("Read excel file");
Excel::import(new EventsImport, 'dutch.xlsx','excel');
Excel::import(new EventsImport, 'apple.xlsx','excel');
// Read the xls file
// For each line:
// Create en event
Expand Down
48 changes: 27 additions & 21 deletions app/Imports/EventsImport.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,49 +15,55 @@
class EventsImport extends DefaultValueBinder implements WithCustomValueBinder, ToModel, WithHeadingRow
{


public function parseDate($date){
$arr = explode(",", $date);
array_shift($arr);
return implode($arr);
}

/**
* @param array $row
*
* @return \Illuminate\Database\Eloquent\Model|null
*/
* @param array $row
*
* @return \Illuminate\Database\Eloquent\Model|null
*/
public function model(array $row)
{

//dd(implode(",",$arr));
//dd(Carbon::parse($this->parseDate($row["start_date"]))->toDateTimeString());
//dd(Carbon::createFromFormat("d/m/Y",$row["start_date"])->toDateTimeString());
//Log::info($row["Address"]);
$event = new Event([
'status' => "APPROVED",
'title' => $row["activity_title"],
'slug' => str_slug($row["activity_title"]),
'organizer' => $row["name_of_organisation"],
'description' => $row["description"],
'organizer_type' => $row["type_of_organisation"],
'location' => $row["address"],
'event_url' => $row["organiser_website"],
'user_email' => $row["contact_email"],
'creator_id' => 19588,
'country_iso' => "NL",
'title' => $row["activity_title"],
'slug' => str_slug($row["activity_title"]),
'organizer' => $row["name_of_organisation"],
'description' => $row["description"],
'organizer_type' => $row["type_of_organisation"],
'location' => $row["address"],
'event_url' => $row["organiser_website"],
'user_email' => "",
'creator_id' => $row["creator_id"],
'country_iso' => $row["country"],
'picture' => $row["image_path"],
"pub_date" => now(),
"created" => now(),
"updated" => now(),
"start_date" => Carbon::createFromFormat("!d/m/Y",$row["start_date"])->toDateTimeString(),
"end_date" => Carbon::createFromFormat("!d/m/Y",$row["end_date"])->toDateTimeString(),
"codeweek_for_all_participation_code" => "cw18-apple-eu",
"start_date" => Carbon::parse($this->parseDate($row["start_date"]))->toDateTimeString(),
"end_date" => Carbon::parse($this->parseDate($row["end_date"]))->toDateTimeString(),
"geoposition" => $row["latitude"] . "," . $row["longitude"],
"longitude" => $row["longitude"],
"latitude" => $row["latitude"]
]);

$event->save();

$event->audiences()->attach(explode(",",$row["audience_comma_separated_ids"]));
$event->themes()->attach(explode(",",$row["theme_comma_separated_ids"]));
$event->audiences()->attach(explode(",", $row["audience_comma_separated_ids"]));
$event->themes()->attach(explode(",", $row["theme_comma_separated_ids"]));

return $event;
}




}
Binary file added public/img/petition.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/excel/apple.xlsx
Binary file not shown.
63 changes: 63 additions & 0 deletions resources/views/static/en/petition.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
@extends('layout.base')

@section('content')
<section>

<div class="container clearfix">

<div class="flex flex-col justify-center text-center w-full mb-8 uppercase">
<h1>Petition for Algorithms as Intangible Cultural Heritage</h1>
<span>EU Code Week 2018</span>
<ol class="breadcrumb">
<li><a href="https://codeweek.eu">Home</a></li>
<li class="active">Petition for Algorithms as Intangible Cultural Heritage</li>
</ol>
</div>
</div>
</section>
<!-- #page-title end -->
<!-- Content -->

<section id="content">
<div class="content-wrap">
<div class="container clearfix">
<p>The text of this <a href="https://www.gopetition.com/petitions/algorithms-as-intangible-cultural-heritage.html">petition</a> was written in English by the Europe Code Week Ambassadors gathered in Brussels on September 12, 2017, to raise awareness on the importance of algorithms. The petition can be <a href="https://www.gopetition.com/petitions/algorithms-as-intangible-cultural-heritage.html">signed here</a>. </p>
<p>Translations are available in the following languages: [<a href="http://programmeringforalle.dk/2017/09/15/algoritmer-som-en-uhaandgribelig-kulturel-arv/">DA</a>][EN][<a href="http://codeweek.it/petizione/">IT</a>][<a href="http://www.codeweek.rs/peticija/">RS</a>][<a href="https://codeweek.wikispaces.com/K%C3%BClt%C3%BCr+Misas%C4%B1+Olarak+Kodlama">TR</a>]</p>
<p><a href="https://www.gopetition.com/petitions/algorithms-as-intangible-cultural-heritage.html"><img src="{{asset('img/petition.png')}}"></a></p>

<h2>Title</h2>

<p>Algorithms as Intangible Cultural Heritage</p>

<h2>Background</h2>

<p>Algorithms are intangible achievements of the human intelligence that produce huge tangible impacts on our lives and pave the way to the future. Known algorithms provide a deep understanding of the computational aspects of the world, enable a conscious use of technology, and provide the basis for innovation.</p>

<p>An algorithm is an unambiguous, finite, executable procedure to solve a problem, to achieve a result, or to bring an idea to life.</p>

<p>Any problem for which a known algorithm exists is no longer to be regarded as a problem. Rather, it is a task to be accomplished. The complexity of a task is set by the most efficient known algorithm to accomplish it. Whoever conceives an algorithm to solve a problem has solved that problem forever. Whoever conceives a faster algorithm to perform a task has made it simpler forever.</p>

<p>In 1972 the United Nations Educational, Scientific and Cultural Organization (UNESCO) adopted a Convention concerning the Protection of the World Cultural and Natural Heritage, seeking to encourage the identification, protection and preservation of cultural and natural heritage around the world considered to be of outstanding value to humanity. According to UNESCO: “heritage is our legacy from the past, what we live with today, and what we pass on to future generations. What makes the concept of World Heritage exceptional is its universal application” (http://whc.unesco.org/en/about/, last accessed on Sept 12, 2017).</p>

<p>In 2003, UNESCO recognized that cultural heritage does not end at monuments and collections of objects and adopted a new Convention for the Safeguarding of the Intangible Cultural Heritage, defined in Article 2 as the “practices, representations, expressions, knowledge, skills – as well as the instruments, objects, artefacts and cultural spaces associated therewith – that communities, groups and, in some cases, individuals recognize as part of their cultural heritage” (https://ich.unesco.org/en/convention last accessed on Sept 12, 2017).</p>

<p>The second paragraphs of Article 2 of the Convention identifies, inter alia, 5 domains in which the intangible cultural heritage is manifested: (a) oral traditions and expressions, including language as a vehicle of the intangible cultural heritage; (b) performing arts; (c) social practices, rituals and festive events; (d) knowledge and practices concerning nature and the universe;
(e) traditional craftsmanship.</p>

<p>The third paragraphs of Article 2 of the Convention defines “safeguarding” as “measures aimed at ensuring the viability of the intangible cultural heritage, including the identification, documentation, research, preservation, protection, promotion, enhancement, transmission, particularly through formal and non-formal education, as well as the revitalization of the various aspects of such heritage”. Safeguarding entails education, awareness-raising and capacity building at national level (Article 14), and maintaining representative lists at the international level (Article 16) “in order to ensure better visibility of the intangible cultural heritage and awareness of its significance.”</p>

<h2>Petition</h2>

<p>We, the undersigned, recognize that algorithms are among the highest achievements of humanity and that they are worth being regarded as part of our intangible cultural heritage. </p>

<p>We, the undersigned, believe that safeguarding algorithms means enhancing their visibility, raising awareness of their significance, increasing their circulation, and contributing to building a knowledge society.</p>

<p><strong>We, the undersigned, call on UNESCO to add algorithms to the domains in which the intangible cultural heritage is manifested.</strong></p>

<p><a href="https://www.gopetition.com/petitions/algorithms-as-intangible-cultural-heritage.html"><strong>SIGN THE PETITION</strong></a></p>


</div>
</div>
</section>
@endsection
1 change: 1 addition & 0 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
Route::get('/home', 'StaticPageController@index')->name('home');
Route::get('/guide', 'StaticPageController@index')->name('guide');
Route::get('/privacy', 'StaticPageController@index')->name('privacy');
Route::get('/petition', 'StaticPageController@index')->name('petition');
Route::get('/beambassador', 'StaticPageController@index')->name('beambassador');
Route::get('/about', 'StaticPageController@index')->name('about');
Route::get('/resources', 'StaticPageController@index')->name('resources');
Expand Down