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 | |
////////////////////////////////// | |
// Reddit "hot" story algorithm // | |
////////////////////////////////// | |
function hot($ups, $downs, $date) | |
{ | |
if (is_string($date)) $date = strtotime($date); | |
$s = $ups - $downs; |
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
import requests | |
import json | |
# Detect all human faces & extract their facial landmarks via `facelandmarks`. | |
# Once done, mimic the famous Snapchat flower crown filter. | |
# Only three commands are actually needed in order to mimic the Snapchat filters: | |
# face landmarks: https://pixlab.io/cmd?id=facelandmarks | |
# smart resize: https://pixlab.io/cmd?id=smartresize | |
# merge: https://pixlab.io/cmd?id=merge | |
# Optionally: blur, grayscale, drawtext, oilpaint, etc. for cool background effects. |
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 | |
/* | |
* PixLab PHP Client which is just a single class PHP file without any dependency that you can get from Github | |
* https://github.com/symisc/pixlab-php | |
*/ | |
require_once "pixlab.php"; | |
# Given an image with human readable characters. Detect input language & extract text content from there. | |
# https://pixlab.io/#/cmd?id=ocr for additional information. |
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
import requests | |
import json | |
# Colorize this 1933 picture of this little girl via: https://pixlab.io/cmd?id=colorize | |
req = requests.get('https://api.pixlab.io/colorize',params={'img':'https://i.redd.it/7z1q27vaa9tz.png','key':'My_PixLab_Key'}) | |
reply = req.json() | |
if reply['status'] != 200: | |
print (reply['error']) | |
else: | |
print ("Link to the colorized picture: "+ reply['link']) |
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
/* | |
* Programming introduction with the SOD Embedded RealNets Model Training API. | |
* Training must be enabled via the compile-time directive SOD_ENABLE_NET_TRAIN. | |
* | |
* Copyright (C) PixLab | Symisc Systems, https://sod.pixlab.io | |
*/ | |
/* | |
* Compile this file together with the SOD embedded source code to generate | |
* the executable. For example: | |
* |
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
/* | |
* Programming introduction with the SOD Embedded Image Processing API. | |
* Copyright (C) PixLab | Symisc Systems, https://sod.pixlab.io | |
*/ | |
/* | |
* Compile this file together with the SOD embedded source code to generate | |
* the executable. For example: | |
* | |
* gcc sod.c canny_edge_detection.c -lm -Ofast -march=native -Wall -std=c99 -o sod_img_proc | |
* |
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
/* | |
* Programming introduction with the SOD Embedded Image Processing API. | |
* Copyright (C) PixLab | Symisc Systems, https://sod.pixlab.io | |
*/ | |
/* | |
* Compile this file together with the SOD embedded source code to generate | |
* the executable. For example: | |
* | |
* gcc sod.c hilditch_thin.c -lm -Ofast -march=native -Wall -std=c99 -o sod_img_proc | |
* |
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
/* | |
* Programming introduction with the SOD Embedded Image Processing API. | |
* Copyright (C) PixLab | Symisc Systems, https://sod.pixlab.io | |
*/ | |
/* | |
* Compile this file together with the SOD embedded source code to generate | |
* the executable. For example: | |
* | |
* gcc sod.c dilate_image.c -lm -Ofast -march=native -Wall -std=c99 -o sod_img_proc | |
* |
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
/* | |
* Programming introduction with the SOD Embedded Image Processing API. | |
* Copyright (C) PixLab | Symisc Systems, https://sod.pixlab.io | |
*/ | |
/* | |
* Compile this file together with the SOD embedded source code to generate | |
* the executable. For example: | |
* | |
* gcc sod.c blob_detection.c -lm -Ofast -march=native -Wall -std=c99 -o sod_img_proc | |
* |
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
/* | |
* Programming introduction with the SOD Embedded Image Processing API. | |
* Copyright (C) PixLab | Symisc Systems, https://sod.pixlab.io | |
*/ | |
/* | |
* Compile this file together with the SOD embedded source code to generate | |
* the executable. For example: | |
* | |
* gcc sod.c erode_image.c -lm -Ofast -march=native -Wall -std=c99 -o sod_img_proc | |
* |
OlderNewer