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 math import sqrt | |
from scipy.stats import norm | |
import numpy as np | |
from pylab import plot, show, grid, xlabel, ylabel | |
def brownian(x0, n, dt, delta, out=None): | |
x0 = np.asarray(x0) | |
# For each element of x0, generate a sample of n numbers from a | |
# normal distribution. |
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
{ | |
"name": "UnifiedSDK", | |
"version": "0.0.0", | |
"private": true, | |
"scripts": { | |
"build-android": "react-native bundle --platform android --dev false --entry-file js/index.js --bundle-output android/fancylib/src/main/assets/unifiedsdk.bundle --assets-dest android/fancylib/src/main/res", | |
"build-ios": "react-native bundle --platform ios --dev false --entry-file js/index.js --bundle-output ios/FancyLib/FancyLib/js/unifiedsdk.bundle --assets-dest ios/FancyLib/FancyLib/assets/" | |
}, | |
"dependencies": { |
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 "UnifiedSDK.h" | |
#import <React/RCTBridge.h> | |
static RCTBridge * bridge; | |
@implementation UnifiedSDK | |
+ (void)setup | |
{ | |
NSBundle *bundle = [NSBundle bundleForClass: [UnifiedSDK class]]; | |
NSURL *jsCodeLocation = [bundle URLForResource:@"unifiedsdk" withExtension:@"bundle"]; |
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
# Uncomment the next line to define a global platform for your project | |
# platform :ios, '9.0' | |
target 'FancyLibiOS' do | |
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks | |
# use_frameworks! | |
# Pods for FancyLibiOS | |
pod 'React', :path => '../../node_modules/react-native', :subspecs => [ | |
'Core', |
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
{ | |
"name": "UnifiedSDK", | |
"version": "0.0.0", | |
"private": true, | |
"scripts": { | |
"build-android": "react-native bundle --platform android --dev false --entry-file js/index.js --bundle-output android/fancylib/src/main/assets/unifiedsdk.bundle --assets-dest android/fancylib/src/main/res" | |
}, | |
"dependencies": { | |
"react": "^16.6.3", | |
"react-native": "^0.57.8" |
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
{ | |
"name": "UnifiedSDK", | |
"version": "0.0.0", | |
"private": true, | |
"scripts": { | |
"build-android": "react-native bundle --platform android --dev false --entry-file js/index.js --bundle-output android/fancylib/src/main/assets/unifiedsdk.bundle --assets-dest android/fancylib/src/main/res" | |
}, | |
"dependencies": { | |
"react": "^16.6.3", | |
"react-native": "^0.57.8" |
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
public class UnifiedSDK { | |
private static ReactInstanceManager manager; | |
public static void init(Activity activity) { | |
if (manager == null) { | |
manager = ReactInstanceManager.builder() | |
.setApplication(activity.getApplication()) | |
.setCurrentActivity(activity) | |
.setBundleAssetName("unifiedsdk.bundle") | |
.setJSMainModulePath("index") |
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 BatchedBridge from "react-native/Libraries/BatchedBridge/BatchedBridge"; | |
import AppRegistry from 'react-native'; | |
export class CommonInterface { | |
helloworld(message) { | |
alert("Hello World\n" + message); | |
} | |
} | |
const exposed = new CommonInterface(); |
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
{ | |
"name": "FancyLibs", | |
"version": "0.0.0", | |
"private": true, | |
"dependencies": { | |
"react": "^16.6.3", | |
"react-native": "^0.57.8" | |
}, | |
"devDependencies": { | |
"babel-loader": "7.1.4", |
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 React from "react"; | |
import { Button, View, Text, WebView } from "react-native"; | |
import { createStackNavigator, createAppContainer } from "react-navigation"; | |
class HomeScreen extends React.Component { | |
render() { | |
return ( | |
<View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}> | |
<Text>Home Screen</Text> | |
<Button |
NewerOlder