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
//Source: https://github.com/node-opcua/node-opcua/wiki/2.0.0-breaking-changes | |
const { | |
OPCUAClient, | |
resolveNodeId, | |
AttributeIds, | |
ClientSubscription, | |
ClientMonitoredItem, | |
TimestampsToReturn | |
} = require("node-opcua"); |
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
# edit jupyter_notebook_config.py | |
# https://jupyter-notebook.readthedocs.io/en/latest/config.html | |
c.NotebookApp.allow_origin = '*' | |
c.NotebookApp.ip = '0.0.0.0' # |
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 keras | |
from keras.datasets import mnist | |
from keras.models import Sequential | |
from keras.layers import Dense, Activation, Flatten, Input | |
from keras.layers import Conv2D, MaxPooling2D, UpSampling2D | |
import matplotlib.pyplot as plt | |
from keras import backend as K | |
import numpy as np | |
from keras.preprocessing.image import ImageDataGenerator, array_to_img, img_to_array, load_img |
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
# MXNet uses channels_first data format while Tensorflow uses channels_last data format. | |
img.shape | |
# (3, 224, 224) | |
x = np.moveaxis(img, 0, 2) | |
x.shape | |
# (224, 224, 3) |
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
from matplotlib import pyplot as plt | |
import cv2 | |
img = cv2.imread('/Users/mustafa/test.jpg') | |
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) | |
plt.imshow(gray) | |
plt.title('my picture') | |
plt.show() |
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
from captcha.image import ImageCaptcha | |
from scipy import misc | |
from matplotlib import pyplot as plt | |
import numpy as np | |
capgen = ImageCaptcha() | |
x = np.random.randint(0,99999) | |
im_bytes=capgen.generate(str(x)) |
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
This sample demonstrates how to handle events when a window is focused or it loses focus. | |
Bu örnek bir bir pencereye odaklanıldığında veya başka pencere, uygulama, sekmeye odaklanıldığında oluşan olayların kullanımını gösterir. |
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
package net.aldemir.myapp.camera; | |
import android.content.Context; | |
import android.content.res.Configuration; | |
import android.graphics.Point; | |
import android.hardware.Camera; | |
import android.os.Handler; | |
import android.util.AttributeSet; | |
import android.util.Log; | |
import android.view.Display; |
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
/* | |
* From fragment to activty: | |
*/ | |
((YourActivityClassName)getActivity()).yourPublicMethod(); | |
/* | |
* From activity to fragment: | |
*/ | |
FragmentManager fm = getSupportFragmentManager(); | |
//if you added fragment via layout xml |
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
#If you want verbose Log from the volley library you have to use adb | |
adb -s DEVICE_ID shell setprop log.tag.Volley VERBOSE | |
#you can get your DEVICE_ID by | |
adb devices | |
#If you want to persist this setting use | |
adb -s DEVICE_ID shell setprop persist.log.tag.Volley VERBOSE |
NewerOlder