Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
# ##### BEGIN GPL LICENSE BLOCK ##### | |
# | |
# This program is free software; you can redistribute it and/or | |
# modify it under the terms of the GNU General Public License | |
# as published by the Free Software Foundation; either version 2 | |
# of the License, or (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1. Go to Sublime Text to: Tools -> Build System -> New Build System | |
and put the next lines: | |
{ | |
"cmd": ["python3", "-i", "-u", "$file"], | |
"file_regex": "^[ ]File \"(...?)\", line ([0-9]*)", | |
"selector": "source.python" | |
} | |
Then save it with a meaningful name like: python3.sublime-build |
<?php | |
/* | |
(2014) Main source -> http://lancenewman.me/posting-a-photo-to-instagram-without-a-phone/ | |
I just managed to sniff Instagram traffic and fixed the code | |
-- Have fun - batuhan.org - Batuhan Katırcı | |
--- for your questions, comment @ http://batuhan.org/instagram-photo-upload-with-php/ | |
import cv2 | |
import math | |
import numpy as np | |
import sys | |
def apply_mask(matrix, mask, fill_value): | |
masked = np.ma.array(matrix, mask=mask, fill_value=fill_value) | |
return masked.filled() | |
def apply_threshold(matrix, low_value, high_value): |
server { | |
listen %ip%:%httpport%; | |
listen %ip%:%httpsport% ssl; | |
server_name %host% %aliases%; | |
# if ($request_method !~* ^(GET|HEAD|POST)$ ){return 403;} | |
location ~ /\. {deny all;} | |
location / { |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
# ##### BEGIN GPL LICENSE BLOCK ##### | |
# | |
# This program is free software; you can redistribute it and/or | |
# modify it under the terms of the GNU General Public License | |
# as published by the Free Software Foundation; either version 2 | |
# of the License, or (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
def make_basic_curve(): | |
crv = bpy.data.curves.new("crv", type="CURVE") | |
crv_ob = bpy.data.objects.new("crv_ob", crv) | |
return crv, crv_ob | |
scnobs = bpy.context.scene.objects | |
pencil = bpy.data.grease_pencil[0] | |
for i, stroke in enumerate(pencil.layers[0].active_frame.strokes): |