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 { NativeModules} from 'react-native'; | |
const { VideoPlayerManager } = NativeModules; | |
fullScreen = () => { | |
if (Platform.OS === 'android') { | |
VideoPlayerManager.showVideoPlayer(url); | |
} else if (this.player) { | |
this.player.presentFullscreenPlayer(); | |
} | |
} |
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
package com.fullscreenvideoandroid; | |
import com.facebook.react.ReactPackage; | |
import com.facebook.react.bridge.JavaScriptModule; | |
import com.facebook.react.bridge.NativeModule; | |
import com.facebook.react.bridge.ReactApplicationContext; | |
import com.facebook.react.uimanager.ViewManager; | |
import java.util.Arrays; | |
import java.util.Collections; |
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
package com.fullscreenvideoandroid; | |
import android.app.Activity; | |
import android.content.Intent; | |
import android.net.Uri; | |
import android.provider.MediaStore; | |
import com.facebook.react.bridge.ActivityEventListener; | |
import com.facebook.react.bridge.ReactApplicationContext; | |
import com.facebook.react.bridge.ReactContextBaseJavaModule; |
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 numpy as np | |
class Perceptron(object): | |
def __init__(self, no_of_inputs, threshold=100, learning_rate=0.01): | |
self.threshold = threshold | |
self.learning_rate = learning_rate | |
self.weights = np.zeros(no_of_inputs + 1) | |
def predict(self, inputs): |
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
require 'cocaine' | |
require 'open-uri' | |
require 'nokogiri' | |
$iterator = 0 | |
def getName(link) | |
$iterator+=1 | |
link.to_s.split('/').last + "#{$iterator}.png" | |
end | |
def download(url) |