Skip to content

Instantly share code, notes, and snippets.

View seyyah's full-sized avatar

seyyah seyyah

  • Researcher
  • Turkey
View GitHub Profile
@seyyah
seyyah / getColourfulness.m
Created March 7, 2022 11:31 — forked from zabela/getColourfulness.m
Algorithm to measure images colourfulness, adapted from "Measuring colourfulness in natural images" (Hasler and Susstrunk, 2003) http://infoscience.epfl.ch/record/33994/files/HaslerS03.pdf
function C = getColourfulness( im )
%
% C = getColourfulness( im )
%
% MATLAB algorithm implementation of the
% "Measuring colourfulness in natural images"
% (Hasler and Susstrunk, 2003)
%
% Input:
% im - image in RGB
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
Date;max;min;avg;td;nem;windd;winds;pres;PM10;PM25;NO2;NOX;O3;CO
1.01.2016;2.2;-2.5;-0.6;-7.1;62.1;247.5;6.3;1023.2;54.86;41.3;150.01;287.78;22.4;1335.67
2.01.2016;3.3;-2;1;-11.7;37.9;202.5;15.8;1022.5;55.48;23.02;126.06;230.89;33.93;856.64
3.01.2016;5.6;-0.2;1.4;-7.5;54.4;225;8.8;1022.3;64.3;35.03;142.29;298.62;28.34;1359.19
4.01.2016;11.3;-0.1;7.7;-1;53.7;202.5;10.5;1008.6;62.74;39.2;206.63;416.66;13.69;1588.17
5.01.2016;14.2;8.2;11.6;3.1;56.6;225;7.3;1005.8;59.57;29.14;178.73;355.91;16.3;1537.13
6.01.2016;10.1;7.7;9.1;5.9;80.6;112.5;3.9;1012.1;48.57;30.92;137.55;273;15.59;1127.4
7.01.2016;20.9;8.6;17.3;4.1;42.3;202.5;8.5;999.7;78.2;42.03;195.56;447.67;6.47;1795.8
8.01.2016;16.4;6.1;8.8;4.8;79.3;292.5;6.4;1005.1;43.47;28.67;160.83;380.96;10.48;1550.73
10.01.2016;15.9;5.4;13;-4.1;30.2;202.5;19.1;1016.4;51.74;25.38;136.52;219.79;28.84;767.75

There are several approaches

  • Mount Google Drive in local Colab VM
  • Upload and download via browser
  • Use colab_util.py in python script
@seyyah
seyyah / devise.rb
Created January 2, 2020 07:35 — forked from bearded-avenger/devise.rb
Rails - SSO - WordPress - Authenticating against a WordPress install from a Rails site using oAuth
config.omniauth :wordpress_hosted, ENV['SSO_KEY'], ENV['SSO_SECRET'],
strategy_class: OmniAuth::Strategies::WordpressHosted,
client_options: { site: ENV['SSO_URL'] }
@seyyah
seyyah / LICENSE
Created May 28, 2019 08:27 — forked from sinisterchipmunk/LICENSE
tar, gzip, and untar files using ruby in memory without tempfiles
Copyright (C) 2011 by Colin MacKenzie IV
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
@seyyah
seyyah / lv_test_tabview.c
Last active April 18, 2019 11:51
LittlevGL Tabview: LV_TABVIEW_BTNS_POS_LEFT
void lv_test_tabview_2(void){
lv_coord_t hres = lv_disp_get_hor_res(NULL);
lv_coord_t vres = lv_disp_get_ver_res(NULL);
lv_obj_t * tv3 = lv_tabview_create(lv_disp_get_scr_act(NULL), NULL);
LV_LOG_WARN("create");
lv_tabview_set_btns_pos(tv3, LV_TABVIEW_BTNS_POS_LEFT);
static lv_style_t style;
lv_style_copy(&style, &lv_style_pretty);
@seyyah
seyyah / Makefile
Created April 1, 2019 07:53 — forked from skeeto/Makefile
C Object Oriented Programming Example
CFLAGS = -std=c99 -Wall
main : main.o
.PHONY : test clean
test : main
./$^ "*regex*" "*vtable*" < main.c
clean :
@seyyah
seyyah / fail2ban_notifier.rb
Created March 3, 2019 15:26 — forked from etdsoft/fail2ban_notifier.rb
Simple Fail2banNotifier for exception_notification (will submit a pull request and update gist when accepted). See: http://securityroots.com/blog/2014/01/protecting-app-rails-fail2ban/
class Fail2banNotifier
def initialize(options)
@default_options = options
@default_options[:logfile] ||= Rails.root.join('log', 'fail2ban.log')
# Roll over every 30M, keep 10 files
@logger ||= Logger.new(@default_options[:logfile], 10, 30*1024*1024)
end
def call(exception, options={})
@seyyah
seyyah / gist:6a6408e54592aba04a27b71972e8a52b
Created February 1, 2019 07:16 — forked from CristinaSolana/gist:1885435
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@seyyah
seyyah / nginx.conf
Created January 31, 2019 19:25 — forked from edib/nginx.conf
moodle subdirectory inside a wordpress installation
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/wordpress;
index index.php index.html index.htm index.nginx-debian.html;
server_name _;