I hereby claim:
- I am vood on github.
- I am avysotsky (https://keybase.io/avysotsky) on keybase.
- I have a public key ASCEwddvxCaWbWMrWusHLdj-LLPAztzpH0qJJPTr-45a3go
To claim this, I am signing this object:
import cv2 | |
import numpy as np | |
from matplotlib import pyplot as plt | |
img = cv2.imread('images/gomel.jpg') | |
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) | |
ret,thresh = cv2.threshold(gray,127,255,1) | |
contours,h = cv2.findContours(thresh,1,2) | |
for cnt in contours: | |
cv2.drawContours(img,[cnt],0,(0,0,255),1) | |
I hereby claim:
To claim this, I am signing this object:
import aiohttp | |
import time | |
import asyncio | |
async def call_url(url): | |
print('Starting {}'.format(url)) | |
async with aiohttp.ClientSession() as session: |
appdirs==1.4.3 | |
appnope==0.1.0 | |
backports-abc==0.5 | |
backports.shutil-get-terminal-size==1.0.0 | |
backports.ssl-match-hostname==3.5.0.1 | |
certifi==2017.1.23 | |
clearbit==0.1.4 | |
click==6.6 | |
contextlib2==0.5.4 | |
Cython==0.24 |
#!/usr/sh -e | |
#clone our private github repo with Xamarin project | |
git clone git@github.com/our_xamarin_project.git | |
cd our_xamarin_project | |
#update homebrew | |
brew update | |
#install Xamarin.Studio, Xamarin.iOS, Xamarin.Android, Mono | |
brew cask install xamarin-mdk xamarin-ios xamarin-studio xamarin-android | |
#install nuget dependencies |
<?php | |
xhprof_enable(XHPROF_FLAGS_CPU + XHPROF_FLAGS_MEMORY); | |
register_shutdown_function(function() { | |
$xhprof_data = xhprof_disable(); | |
$XHPROF_ROOT = "/root/pear/php"; | |
include_once $XHPROF_ROOT . "/xhprof_lib/utils/xhprof_lib.php"; | |
include_once $XHPROF_ROOT . "/xhprof_lib/utils/xhprof_runs.php"; | |
<?php | |
use Aws\ElasticBeanstalk\ElasticBeanstalkClient; | |
require_once __DIR__ . '/vendor/autoload.php'; | |
$bs = new ElasticBeanstalkClient([ | |
'version' => 'latest', | |
'region' => 'us-east-1' | |
]); |
<?php | |
//UploadStream wrapper will take care of putting the file in correct dirrectory | |
file_put_contents('upload://example.txt', $data); | |
//the same works when you want to read the file | |
file_get_contents('upload://example.txt'); | |
//More info here | |
//@see /sugarcrm/include/upload_file.php | |
//@see http://www.php.net/manual/en/class.streamwrapper.php |
<?php | |
//sugarcrm/custom/modules/Users/Authenticate.php | |
//replace | |
$authController = new CustomAuthenticationController(); | |
//with | |
$authController = new CustomAuthenticationController::getInstance(); | |
//sugarcrm/custom/modules/Users/authentication/CustomSAMLAuthenticate/CustomSAMLAuthenticateUser.php | |
//SamlResponse has been replaced with OneLogin_Saml_Response class | |
$samlresponse = new SamlResponse(get_saml_settings(), $_POST['SAMLResponse']); | |
//@see sugarcrm/modules/Users/authentication/SAMLAuthenticate/SAMLAuthenticateUser.php |
<?php | |
// custom/include/MVC/View/views/view.sidecar.php | |
class CustomViewSidecar extends ViewSidecar { | |
public function preDisplay() { | |
if(!file_exists($this->configFile)) { | |
CustomModuleInstaller::handleBaseConfig(); | |
} | |
parent::preDisplay(); | |
} |