This file contains hidden or 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 hidden or 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 | |
# Mimic the two famous Snapchat filters: The flower crown & the dog facial parts filter. | |
# The target image must contain at least one human face. The more faces you got, the more funny it should be! | |
# | |
# 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 |
This file contains hidden or 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 | |
# Make an eye mask plus a mustache filter and finally draw some text on the bottom of the image. | |
# | |
# 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 | |
# rotate (Optionally): https://pixlab.io/#/cmd?id=rotate |
This file contains hidden or 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 hidden or 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"; | |
# Target Image: Change to any link (Possibly adult) you want or switch to POST if you want to upload your image directly, refer to the sample set for more info. | |
$img = 'https://i.redd.it/oetdn9wc13by.jpg'; | |
# Your PixLab key |
This file contains hidden or 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
#include <stdio.h> | |
#include <assert.h> | |
int main(int argc, char** argv) { | |
assert(argc == 2); | |
char* fn = argv[1]; | |
FILE* f = fopen(fn, "r"); | |
printf("char a[] = {\n"); | |
unsigned long n = 0; | |
while(!feof(f)) { |
This file contains hidden or 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 hidden or 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 hidden or 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 Convolutional/Recurrent Neural Networks (CNN/RNN) 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 cnn_object_detection.c -lm -Ofast -march=native -Wall -std=c99 -o sod_cnn_intro | |
* |
This file contains hidden or 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: | |
* |
OlderNewer