Skip to content

Instantly share code, notes, and snippets.

View seyyah's full-sized avatar

seyyah seyyah

  • Researcher
  • Turkey
View GitHub Profile
function GregToHijri(arg) {
console.log ( 'arg' );
console.log (arg);
if(arg == ""){
return "";
}
//declare a date format year,month,day sequence
var arabic_date = new Array(0,0,0);
@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 / get_drug_info.php
Created September 29, 2011 19:53
get_drug
<?php
function file_get_contents_utf8($fn) {
$content = file_get_contents($fn);
return mb_convert_encoding($content, 'UTF-8',
mb_detect_encoding($content, 'UTF-8, ISO-8859-9', true));
}
function get_drug($id) {
$content = file_get_contents_utf8("http://www.hekimce.com/ilacrehberi.php?ilac=$id");
@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'] }
% http://stackoverflow.com/questions/27693593/color-correcting-images-in-matlab
% https://ia802707.us.archive.org/23/items/Lectures_on_Image_Processing/EECE253_05_ColorCorrection.pdf
close all;
clear all;
im1 = imread('http://i.stack.imgur.com/GtgHU.jpg');
im2 = imread('http://i.stack.imgur.com/wHW50.jpg');
rng(123); %// Set seed for reproducibility
num_colours = 2000;
ind = randperm(numel(im1) / size(im1,3), num_colours);
@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 :