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
#!/bin/bash | |
## | |
# Dataproc workflow template with a 'managed cluster' in Google Cloud for serverless data pre-processing using pyspark. | |
# | |
# Based on this guide: https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows | |
# | |
# Pre-requisites: | |
# - https://hub.docker.com/r/google/cloud-sdk/ installed and set up on the machine running this script. | |
# - The pre-processing file in Google Cloud Storage |
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
<?php | |
define('CLI_SCRIPT', true); | |
require_once(__DIR__ . '/config.php'); | |
$options = [ | |
'simpledata' => true, | |
'staticacceleration' => true | |
]; | |
$cache = cache::make_from_params(cache_store::MODE_APPLICATION, 'mod_myplugin', 'mycache', [], $options); |
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
#!/bin/bash | |
set -e | |
# Interval in seconds. | |
INTERVAL="1" | |
TIMEFORMAT="%d-%m-%y,%H:%M:%S" | |
echo "Monitor the memory usage of a running docker container (memory in MBs)" |
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
<?php | |
// Not tested but it should be something like that. New file in $CFG->dirroot. | |
require_once(__DIR__ . '/config.php'); | |
// For students at-risk model. Feel free to change. | |
$MODELID = 1; | |
$COURSEID = 123; |
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
diff --cc theme/boost/templates/core/filemanager_modal_generallayout.mustache | |
index 3e31b35,5741947..0000000 | |
--- a/theme/boost/templates/core/filemanager_modal_generallayout.mustache | |
+++ b/theme/boost/templates/core/filemanager_modal_generallayout.mustache | |
@@@ -1,9 -1,9 +1,8 @@@ | |
- <div tabindex="0" class="file-picker fp-generallayout container-fluid row" role="dialog" aria-live="assertive"> | |
- <div class="fp-repo-area col-md-3 nav nav-pills nav-stacked" role="tablist"> | |
+ <div tabindex="0" class="file-picker fp-generallayout row" role="dialog" aria-live="assertive"> | |
- <div class="fp-repo-area col-md-3 nav nav-pills flex-column"> | |
- <div class="fp-repo nav-item"> |
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
+ <TABLE NAME="tool_dataprivacy_ctxexpired" COMMENT="Default comment for the table, please edit me"> | |
+ <FIELDS> | |
+ <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true"/> | |
+ <FIELD NAME="contextid" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false"/> | |
+ <FIELD NAME="status" TYPE="int" LENGTH="2" DEFAULT="0" NOTNULL="true" SEQUENCE="false"/> | |
+ <FIELD NAME="timeexpired" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false"/> | |
+ <FIELD NAME="usermodified" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false"/> | |
+ <FIELD NAME="timecreated" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false"/> | |
+ <FIELD NAME="timemodified" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false"/> | |
+ </FIELDS> |
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
<?php | |
define('CLI_SCRIPT', true); | |
require_once(__DIR__ . '/config.php'); | |
$latest = $DB->get_records_select('files', "component = 'analytics' AND filename = 'evaluation.csv' AND filepath LIKE '/timesplitting/%'", array(), 'timecreated DESC', '*', 0, 1); | |
$id = key($latest); | |
$fs = get_file_storage(); | |
$f = $fs->get_file_by_id($id); |
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
RESULTS: | |
➜ php-ml git:(partial-train) ✗ clear ; php partial-vs-full.php | |
Classifier perceptron full train memory usage: | |
Usage from before data reading to end of training: 231704 | |
Classifier adaline full train memory usage: | |
Usage from before data reading to end of training: 265160 | |
Classifier logistic full train memory usage: | |
Usage from before data reading to end of training: 248408 | |
Classifier perceptron partial train memory usage: | |
Usage from before data reading to end of training: 9176 |
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
RESULTS: | |
➜ php-ml-fork git:(partial-train) ✗ php memory-usage.php | |
string(18) "perceptron: 522368" | |
string(15) "adaline: 490576" | |
string(16) "logistic: 484832" | |
➜ php-ml-fork git:(cost-values-key) ✗ php memory-usage.php | |
string(17) "perceptron: 77312" | |
string(14) "adaline: 45520" | |
string(15) "logistic: 32864" |
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
#!/bin/bash | |
set -e | |
gnome-terminal --maximize &> /dev/null & | |
/opt/google/chrome/google-chrome --profile-directory=Default https://mail.google.com https://tracker.moodle.org &> /dev/null & | |
pidgin &> /dev/null & | |
/home/davidm/Telegram/Telegram &> /dev/null & |
NewerOlder