How to use Input method in argos

Best JavaScript code snippet using argos

BeforeInputEventPlugin-test.js

Source:BeforeInputEventPlugin-test.js Github

copy

Full Screen

...698 const node = ReactDOM.render(699 <input700 type="text"701 onBeforeInput={({type, data}) => {702 spyOnBeforeInput();703 beforeInputEvent = {type, data};704 }}705 onCompositionStart={({type, data}) => {706 spyOnCompositionStart();707 compositionStartEvent = {type, data};708 }}709 onCompositionUpdate={({type, data}) => {710 spyOnCompositionUpdate();711 compositionUpdateEvent = {type, data};712 }}713 />,714 container,715 );716 scenes.forEach((s, id) => {717 beforeInputEvent = null;718 compositionStartEvent = null;719 compositionUpdateEvent = null;720 spyOnBeforeInput = jest.fn();721 spyOnCompositionStart = jest.fn();722 spyOnCompositionUpdate = jest.fn();723 s.eventSimulator.apply(null, [node, ...s.eventSimulatorArgs]);724 env.assertions[id].run({725 beforeInputEvent,726 compositionStartEvent,727 compositionUpdateEvent,728 spyOnBeforeInput,729 spyOnCompositionStart,730 spyOnCompositionUpdate,731 });732 });733 };734 const testContentEditableComponent = (env, scenes) => {735 let beforeInputEvent;736 let compositionStartEvent;737 let compositionUpdateEvent;738 let spyOnBeforeInput;739 let spyOnCompositionStart;740 let spyOnCompositionUpdate;741 ReactDOM = loadReactDOM(env.emulator);742 const node = ReactDOM.render(743 <div744 contentEditable={true}745 onBeforeInput={({type, data}) => {746 spyOnBeforeInput();747 beforeInputEvent = {type, data};748 }}749 onCompositionStart={({type, data}) => {750 spyOnCompositionStart();751 compositionStartEvent = {type, data};752 }}753 onCompositionUpdate={({type, data}) => {754 spyOnCompositionUpdate();755 compositionUpdateEvent = {type, data};756 }}757 />,758 container,759 );760 scenes.forEach((s, id) => {...

Full Screen

Full Screen

Microsoft.py

Source:Microsoft.py Github

copy

Full Screen

1from ReadInput import getClosingPrices2from Input_Variables import exponentialMovingAverage,inputRdp,trainingOutputRdp_5,changeInPrice,scale3from sklearn import svm,preprocessing4import numpy as np5from Output_Variables import calculateCorrectPredictions6pathOfMicrosoft = '/home/Documents/dataset/MS'7datePriceDictionary = getClosingPrices(pathOfMicrosoft,'MicrosoftTraining.xlsx')8initialPriceDictionary = getClosingPrices(pathOfMicrosoft,'Training.xlsx')9last5PriceDictionary = getClosingPrices(pathOfMicrosoft,'Last5Days.xlsx')10dateList = datePriceDictionary.keys()11closingPriceList = datePriceDictionary.values()12initialPriceValues = initialPriceDictionary.values()13SVM_trainingInput = []14SVM_trainingOutputValues = []15SVM_trainingOutputClasses = []16SVM_trainingOutputClasses.append(1)17last5List = last5PriceDictionary.values()18changeInPrice(closingPriceList,SVM_trainingOutputClasses)19sumClosingPrices = 0.020for iter in xrange(5,20):21 sumClosingPrices = sumClosingPrices+float(initialPriceValues[iter])22simpleMovingAverage = sumClosingPrices/float(15)23emaYesterDay = simpleMovingAverage24emaList = []25for i in xrange(0,closingPriceList.__len__()):26 ema_15 = exponentialMovingAverage(closingPriceList[i],15,emaYesterDay)27 emaList.append(ema_15)28 emaYesterDay= ema_1529emaLastList = []30for j in xrange(0,5):31 ema_15Last = exponentialMovingAverage(last5List[j],15,emaYesterDay)32 emaLastList.append(ema_15Last)33ema_15_Input_List = []34rdp_5_Input_List = []35rdp_10_Input_List = []36rdp_15_Input_List = []37rdp_20_Input_List = []38for iterator in xrange(0,closingPriceList.__len__()):39 ema15Input = closingPriceList[iterator] - emaList[iterator]40 ema_15_Input_List.append(ema15Input)41 if iterator<5:42 rdp_5_Input = inputRdp(closingPriceList[iterator],initialPriceValues[iterator+15])43 rdp_5_Input_List.append(rdp_5_Input)44 rdp_10_Input = inputRdp(closingPriceList[iterator],initialPriceValues[iterator+10])45 rdp_10_Input_List.append(rdp_10_Input)46 rdp_15_Input = inputRdp(closingPriceList[iterator],initialPriceValues[iterator+5])47 rdp_15_Input_List.append(rdp_15_Input)48 rdp_20_Input = inputRdp(closingPriceList[iterator],initialPriceValues[iterator])49 rdp_20_Input_List.append(rdp_20_Input)50 elif iterator<10:51 rdp_5_Input = inputRdp(closingPriceList[iterator],closingPriceList[iterator-5])52 rdp_5_Input_List.append(rdp_5_Input)53 rdp_10_Input = inputRdp(closingPriceList[iterator],initialPriceValues[iterator+10])54 rdp_10_Input_List.append(rdp_10_Input)55 rdp_15_Input = inputRdp(closingPriceList[iterator],initialPriceValues[iterator+5])56 rdp_15_Input_List.append(rdp_15_Input)57 rdp_20_Input = inputRdp(closingPriceList[iterator],initialPriceValues[iterator])58 rdp_20_Input_List.append(rdp_20_Input)59 elif iterator<15:60 rdp_5_Input = inputRdp(closingPriceList[iterator],closingPriceList[iterator-5])61 rdp_5_Input_List.append(rdp_5_Input)62 rdp_10_Input = inputRdp(closingPriceList[iterator],closingPriceList[iterator-10])63 rdp_10_Input_List.append(rdp_10_Input)64 rdp_15_Input = inputRdp(closingPriceList[iterator],initialPriceValues[iterator+5])65 rdp_15_Input_List.append(rdp_15_Input)66 rdp_20_Input = inputRdp(closingPriceList[iterator],initialPriceValues[iterator])67 rdp_20_Input_List.append(rdp_20_Input)68 elif iterator<20:69 rdp_5_Input = inputRdp(closingPriceList[iterator],closingPriceList[iterator-5])70 rdp_5_Input_List.append(rdp_5_Input)71 rdp_10_Input = inputRdp(closingPriceList[iterator],closingPriceList[iterator-10])72 rdp_10_Input_List.append(rdp_10_Input)73 rdp_15_Input = inputRdp(closingPriceList[iterator],closingPriceList[iterator-15])74 rdp_15_Input_List.append(rdp_15_Input)75 rdp_20_Input = inputRdp(closingPriceList[iterator],initialPriceValues[iterator])76 rdp_20_Input_List.append(rdp_20_Input)77 else:78 rdp_5_Input = inputRdp(closingPriceList[iterator],closingPriceList[iterator-5])79 rdp_5_Input_List.append(rdp_5_Input)80 rdp_10_Input = inputRdp(closingPriceList[iterator],closingPriceList[iterator-10])81 rdp_10_Input_List.append(rdp_10_Input)82 rdp_15_Input = inputRdp(closingPriceList[iterator],closingPriceList[iterator-15])83 rdp_15_Input_List.append(rdp_15_Input)84 rdp_20_Input = inputRdp(closingPriceList[iterator],closingPriceList[iterator-20])85 rdp_20_Input_List.append(rdp_20_Input)86closingPriceListLength = closingPriceList.__len__()87for itr1 in xrange(0,closingPriceListLength):88 if itr1 == 0:89 rdp_5_Output = trainingOutputRdp_5(closingPriceList[itr1],closingPriceList[itr1+5],simpleMovingAverage,emaList[itr1+4])90 SVM_trainingOutputValues.append(rdp_5_Output)91 elif itr1 < (closingPriceListLength-5):92 rdp_5_Output = trainingOutputRdp_5(closingPriceList[itr1],closingPriceList[itr1+5],emaList[itr1-1],emaList[itr1+4])93 SVM_trainingOutputValues.append(rdp_5_Output)94 else:95 rdp_5_Output = trainingOutputRdp_5(closingPriceList[itr1],last5List[abs(closingPriceListLength-iterator-5)],emaList[itr1-1],emaLastList[abs(closingPriceListLength-iterator-5)])96 SVM_trainingOutputValues.append(rdp_5_Output)97print 'DEBUGGING:',ema_15_Input_List.__len__()98'''preprocessing.scale(ema_15_Input_List)99preprocessing.scale(rdp_5_Input_List)100preprocessing.scale(rdp_10_Input_List)101preprocessing.scale(rdp_15_Input_List)102preprocessing.scale(rdp_20_Input_List)'''103for count in xrange(0,ema_15_Input_List.__len__()):104 rowWiseInputList = []105 rowWiseInputList.append(ema_15_Input_List[count])106 rowWiseInputList.append(rdp_5_Input_List[count])107 rowWiseInputList.append(rdp_10_Input_List[count])108 rowWiseInputList.append(rdp_15_Input_List[count])109 rowWiseInputList.append(rdp_20_Input_List[count])110 SVM_trainingInput.append(rowWiseInputList)111testingDictionary = getClosingPrices(pathOfMicrosoft,'MicrosoftTesting.xlsx')112testingInputValues = testingDictionary.values()113emaTestList = []114emaOld=emaList[emaList.__len__()-1]115for it in xrange(0,testingInputValues.__len__()):116 emaTest = exponentialMovingAverage(testingInputValues[it],15,emaOld)117 emaTestList.append(emaTest)118 emaOld=emaTest119ema_15_Test_List = []120rdp_5_Test_List = []121rdp_10_Test_List = []122rdp_15_Test_List = []123rdp_20_Test_List = []124closingPricesLast_20_daysList = []125for itr2 in xrange(closingPriceList.__len__()-20,closingPriceList.__len__()):126 closingPricesLast_20_daysList.append(closingPriceList[itr2])127for iterator_1 in xrange(0,testingInputValues.__len__()):128 ema_15TestInput = testingInputValues[iterator_1] - emaTestList[iterator_1]129 ema_15_Test_List.append(ema_15TestInput)130 if iterator_1 < 5:131 rdp_5_test = inputRdp(testingInputValues[iterator_1],closingPricesLast_20_daysList[iterator_1+15])132 rdp_5_Test_List.append(rdp_5_test)133 rdp_10_test = inputRdp(testingInputValues[iterator_1],closingPricesLast_20_daysList[iterator_1+10])134 rdp_10_Test_List.append(rdp_10_test)135 rdp_15_test = inputRdp(testingInputValues[iterator_1],closingPricesLast_20_daysList[iterator_1+5])136 rdp_15_Test_List.append(rdp_15_test)137 rdp_20_Test = inputRdp(testingInputValues[iterator_1],closingPricesLast_20_daysList[iterator_1])138 rdp_20_Test_List.append(rdp_20_Test)139 elif iterator_1<10:140 rdp_5_test = inputRdp(testingInputValues[iterator_1],testingInputValues[iterator_1-5])141 rdp_5_Test_List.append(rdp_5_test)142 rdp_10_test = inputRdp(testingInputValues[iterator_1],closingPricesLast_20_daysList[iterator_1+10])143 rdp_10_Test_List.append(rdp_10_test)144 rdp_15_test = inputRdp(testingInputValues[iterator_1],closingPricesLast_20_daysList[iterator_1+5])145 rdp_15_Test_List.append(rdp_15_test)146 rdp_20_Test = inputRdp(testingInputValues[iterator_1],closingPricesLast_20_daysList[iterator_1])147 rdp_20_Test_List.append(rdp_20_Test)148 elif iterator_1<15:149 rdp_5_test = inputRdp(testingInputValues[iterator_1],testingInputValues[iterator_1-5])150 rdp_5_Test_List.append(rdp_5_test)151 rdp_10_test = inputRdp(testingInputValues[iterator_1],testingInputValues[iterator_1-10])152 rdp_10_Test_List.append(rdp_10_test)153 rdp_15_test = inputRdp(testingInputValues[iterator_1],closingPricesLast_20_daysList[iterator_1+5])154 rdp_15_Test_List.append(rdp_15_test)155 rdp_20_Test = inputRdp(testingInputValues[iterator_1],closingPricesLast_20_daysList[iterator_1])156 rdp_20_Test_List.append(rdp_20_Test)157 elif iterator_1<20:158 rdp_5_test = inputRdp(testingInputValues[iterator_1],testingInputValues[iterator_1-5])159 rdp_5_Test_List.append(rdp_5_test)160 rdp_10_test = inputRdp(testingInputValues[iterator_1],testingInputValues[iterator_1-10])161 rdp_10_Test_List.append(rdp_10_test)162 rdp_15_test = inputRdp(testingInputValues[iterator_1],testingInputValues[iterator_1-15])163 rdp_15_Test_List.append(rdp_15_test)164 rdp_20_Test = inputRdp(testingInputValues[iterator_1],closingPricesLast_20_daysList[iterator_1])165 rdp_20_Test_List.append(rdp_20_Test)166 else:167 rdp_5_test = inputRdp(testingInputValues[iterator_1],testingInputValues[iterator_1-5])168 rdp_5_Test_List.append(rdp_5_test)169 rdp_10_test = inputRdp(testingInputValues[iterator_1],testingInputValues[iterator_1-10])170 rdp_10_Test_List.append(rdp_10_test)171 rdp_15_test = inputRdp(testingInputValues[iterator_1],testingInputValues[iterator_1-15])172 rdp_15_Test_List.append(rdp_15_test)173 rdp_20_Test = inputRdp(testingInputValues[iterator_1],testingInputValues[iterator_1-20])174 rdp_20_Test_List.append(rdp_20_Test)175'''preprocessing.scale(ema_15_Test_List)176preprocessing.scale(rdp_5_Test_List)177preprocessing.scale(rdp_10_Test_List)178preprocessing.scale(rdp_15_Test_List)179preprocessing.scale(rdp_20_Test_List)'''180#-------------------------------------------------------181minMaxScaler = preprocessing.MinMaxScaler(feature_range=(-0.9,0.9))182minMaxScaler.fit(SVM_trainingInput)183SVM_trainingInputScaled = minMaxScaler.transform(SVM_trainingInput)184print 'SVM_trainingInputScaled' ,SVM_trainingInputScaled185#--------------------------------------------------------186SVR_TestList = []187for count1 in xrange(0,ema_15_Test_List.__len__()):188 rowWiseTestList = []189 rowWiseTestList.append(ema_15_Test_List[count1])190 rowWiseTestList.append(rdp_5_Test_List[count1])191 rowWiseTestList.append(rdp_10_Test_List[count1])192 rowWiseTestList.append(rdp_15_Test_List[count1])193 rowWiseTestList.append(rdp_20_Test_List[count1])194 SVR_TestList.append(rowWiseTestList)195SVR_TestListExpectedOutput = []196SVR_TestListExpectedOutput.append(1)197changeInPrice(testingInputValues,SVR_TestListExpectedOutput)198#----------------------------------------------Classification----------------------------------------------199#temp = np.array(SVM_trainingInput)200#myGamma = 1/float(np.power(np.var(SVM_trainingInput),2))201#------------------------------------------------------------202minMaxScaler.fit(SVR_TestList)203SVR_TestListScaled = minMaxScaler.transform(SVR_TestList)204#------------------------------------------------------------205classifier = svm.SVC(kernel='rbf',gamma=1/10.0)206classifier.fit(SVM_trainingInputScaled,SVM_trainingOutputClasses)207y = classifier.predict(SVR_TestList)208regression = svm.SVR(kernel='poly',coef0=3,degree=1)#(kernel='rbf',gamma=1/1000.0)209scale(SVM_trainingOutputValues)210regression.fit(SVM_trainingInput,SVM_trainingOutputValues)211print 'SVROUTPUTTRAINING::',SVM_trainingOutputValues212print 'SVRTEST::',SVR_TestList213z = regression.predict(SVR_TestList)214z = np.array(z).tolist()215print z216predictedList = []217predictedList.append(1)218changeInPrice(z,predictedList)219print 'SVR_TestListLength:',SVR_TestList.__len__()220print 'Expected Value:',SVR_TestListExpectedOutput221print 'Predicted::',predictedList222numberOfCorrectPredictions,probabiltyOfCorrectPredictions = calculateCorrectPredictions(SVR_TestListExpectedOutput,predictedList)223print 'NUMBER OF CORRECT CLASSIFICATIONS::',numberOfCorrectPredictions...

Full Screen

Full Screen

input.js

Source:input.js Github

copy

Full Screen

...202 e.preventDefault();203 app.input.validate($inputEl);204 }205 }206 function clearInput() {207 const $clicked = $(this);208 const $inputEl = $clicked.siblings('input, textarea').eq(0);209 const previousValue = $inputEl.val();210 $inputEl211 .val('')212 .trigger('input change')213 .focus()214 .trigger('input:clear', previousValue);215 }216 $(document).on('click', '.input-clear-button', clearInput);217 $(document).on('change input', 'input, textarea, select', onChange, true);218 $(document).on('focus', 'input, textarea, select', onFocus, true);219 $(document).on('blur', 'input, textarea, select', onBlur, true);220 $(document).on('invalid', 'input, textarea, select', onInvalid, true);...

Full Screen

Full Screen

t.py

Source:t.py Github

copy

Full Screen

1import math2from tkinter import *3from PIL import ImageTk, Image4import matplotlib.pyplot as plt5from scipy. integrate import odeint6import numpy as np7mu0 = 4 * math.pi * (10 ** (-7))8tau = 1.7759l = 3.510wc = 1411wr = 2412delta = 0.06513Rc = 114Rr = 215Lcs = 0.0012616Lrs = 0.00126*217J = 0.118p = 219D = 2*tau/math.pi*p20pi = math.pi21kcc = p*(4*wc*wc*tau*l*mu0)/(pi*delta*pi)22krc = p*(4*wr*wc*tau*l*mu0)/(pi*delta*pi)23krr = p*(4*wr*wr*tau*l*mu0)/(pi*delta*pi)24t_max = 425t_del = 50000026t = np.linspace(0, t_max, t_del)27y0 = [0, 0, 0, 0, 0, 0, 0, 0]28Uc = 40029fc = 5030phic = 031def B_delta(Ica, Icb, Icc, Ira, Irb, Irc, x, phi):32 return (2*mu0/(math.pi*delta)*(wc*Ica*math.cos(math.pi/tau*x)+wc*Icb*math.cos(math.pi/tau*x-2*math.pi/3)+wc*Icc*math.cos(math.pi/tau*x+2*math.pi/3)+wr*Ira*math.cos(math.pi/tau*x-phi*p)+wr*Irb*math.cos(math.pi/tau*x-phi*p-2*math.pi/3)+wr*Irc*math.cos(math.pi/tau*x-phi*p+2*math.pi/3)))33def f(input_variable, t):34 main_det = [[-kcc*(math.sin(pi/2) - (-1)*math.sin(pi/6)) - Lcs, -kcc*(math.sin(pi/2 + 2*pi/3) - (-1)*math.sin(pi/6 - 2*pi/3)) + Lcs, -kcc*(math.sin(pi/2 - 2*pi/3) - (-1)*math.sin(pi/6 + 2*pi/3)), -krc*(math.sin(pi/2 + input_variable[7]*p) - (-1)*math.sin(pi/6 - input_variable[7]*p)), -krc*(math.sin(pi/2 + input_variable[7]*p + 2*pi/3) - (-1)*math.sin(pi/6 - input_variable[7]*p - 2*pi/3)), -krc*(math.sin(pi/2 + input_variable[7]*p - 2*pi/3) - (-1)*math.sin(pi/6 - input_variable[7]*p + 2*pi/3))],35 [-kcc*((-1)*math.sin(pi/6) - math.sin(-pi/6)), -kcc*((-1)*math.sin(pi/6 - 2*pi/3) - math.sin(-pi/6 - 2*pi/3)) - Lcs, -kcc*((-1)*math.sin(pi/6 + 2*pi/3) - math.sin(-pi/6 + 2*pi/3)) + Lcs, -krc*((-1)*math.sin(pi/6 - input_variable[7]*p) - math.sin(-pi/6 - input_variable[7]*p)), -krc*((-1)*math.sin(pi/6 - input_variable[7]*p - 2*pi/3) - math.sin(-pi/6 - input_variable[7]*p - 2*pi/3)), -krc*((-1)*math.sin(pi/6 - input_variable[7]*p + 2*pi/3) - math.sin(-pi/6 - input_variable[7]*p + 2*pi/3))],36 [-kcc*math.sin(-pi/6), -kcc*math.sin(-pi/6 - 2*pi/3), -kcc*math.sin(-pi/6 + 2*pi/3) - Lcs, -krc*math.sin(-pi/6 - input_variable[7]*p), -krc*math.sin(-pi/6 - input_variable[7]*p - 2*pi/3), -krc*math.sin(-pi/6 - input_variable[7]*p + 2*pi/3)],37 [-krc*math.sin(pi/2-input_variable[7]*p-0), -krc*math.sin(pi/2-input_variable[7]*p+2*pi/3), -krc*math.sin(pi/2-input_variable[7]*p-2*pi/3), -krr*math.sin(pi/2-0) - Lrs, -krr*math.sin(pi/2+2*pi/3), -krr*math.sin(pi/2-2*pi/3)],38 [-krc*(-1)*math.sin(pi/6+input_variable[7]*p-0), -krc*(-1)*math.sin(pi/6+input_variable[7]*p-2*pi/3), -krc*(-1)*math.sin(pi/6+input_variable[7]*p+2*pi/3), -krr*(-1)*math.sin(pi/6+0), -krr*(-1)*math.sin(pi/6-2*pi/3) - Lrs, -krr*(-1)*math.sin(pi/6+2*pi/3)],39 [-krc*math.sin(-pi/6+input_variable[7]*p-0), -krc*math.sin(-pi/6+input_variable[7]*p-2*pi/3), -krc*math.sin(-pi/6+input_variable[7]*p+2*pi/3), -krr*math.sin(-pi/6+0), -krr*math.sin(-pi/6-2*pi/3), -krr*math.sin(-pi/6+2*pi/3) - Lrs]40 ]41 own_matrix = [input_variable[0]*Rc + Uc*(math.sin(2*math.pi*fc*t + phic) - math.sin(2*math.pi*fc*t + phic - 2*pi/3)) - input_variable[1]*Rc + krc*p*input_variable[6]*(input_variable[3]*math.cos(pi/2 + input_variable[7]*p) + input_variable[4]*math.cos(pi/2 + input_variable[7]*p + 2*pi/3) + input_variable[5]*math.cos(pi/2 + input_variable[7]*p - 2*pi/3) + (-1)*input_variable[3]*math.cos(pi/6 - input_variable[7]*p) + (-1)*input_variable[4]*math.cos(pi/6 - input_variable[7]*p - 2*pi/3) + (-1)*input_variable[5]*math.cos(pi/6 - input_variable[7]*p + 2*pi/3)),42 input_variable[1]*Rc + Uc*(math.sin(2*math.pi*fc*t + phic - 2*pi/3) - math.sin(2*math.pi*fc*t + phic + 2*pi/3)) - input_variable[2]*Rc + krc*p*input_variable[6]*(input_variable[3]*math.cos(pi/6 - input_variable[7]*p) + input_variable[4]*math.cos(pi/6 - input_variable[7]*p - 2*pi/3) + input_variable[5]*math.cos(pi/6 - input_variable[7]*p + 2*pi/3) + input_variable[3]*math.cos(-pi/6 - input_variable[7]*p) + input_variable[4]*math.cos(-pi/6 - input_variable[7]*p - 2*pi/3) + input_variable[5]*math.cos(-pi/6 - input_variable[7]*p + 2*pi/3)),43 input_variable[2]*Rc + Uc*math.sin(2*math.pi*fc*t + phic + 2*pi/3) - krc*p*input_variable[6]*(input_variable[3]*math.cos(-pi/6 - input_variable[7]*p) + input_variable[4]*math.cos(-pi/6 - input_variable[7]*p - 2*pi/3) + input_variable[5]*math.cos(-pi/6 - input_variable[7]*p + 2*pi/3)),44 input_variable[3]*Rr-input_variable[6]*krc*p*(input_variable[0]*math.cos(pi/2-input_variable[7]*p)+input_variable[1]*math.cos(pi/2-input_variable[7]*p+2*pi/3)+input_variable[2]*math.cos(pi/2-input_variable[7]*p-2*pi/3)),45 input_variable[4]*Rr+input_variable[6]*krc*p*(-1)*(input_variable[0]*math.cos(pi/6+input_variable[7]*p)+input_variable[1]*math.cos(pi/6+input_variable[7]*p-2*pi/3)+input_variable[2]*math.cos(pi/6+input_variable[7]*p+2*pi/3)),46 input_variable[5]*Rr+input_variable[6]*krc*p*(input_variable[0]*math.cos(-pi/6+input_variable[7]*p)+input_variable[1]*math.cos(-pi/6+input_variable[7]*p-2*pi/3)+input_variable[2]*math.cos(-pi/6+input_variable[7]*p+2*pi/3))47 ]48 49 Melmag = D*l*wr*(input_variable[3]*B_delta(input_variable[0], input_variable[1], input_variable[2], input_variable[3], input_variable[4], input_variable[5], tau/pi*input_variable[7]*p-tau/2, input_variable[7])+input_variable[4]*B_delta(input_variable[0], input_variable[1], input_variable[2], input_variable[3], input_variable[4], input_variable[5], tau/pi*input_variable[7]*p+tau/6, input_variable[7])+input_variable[5]*B_delta(input_variable[0], input_variable[1], input_variable[2], input_variable[3], input_variable[4], input_variable[5], tau/pi*input_variable[7]*p-7*tau/6, input_variable[7]))50 derw = (-0*math.tanh(input_variable[6]) - p*Melmag)/J51 solve_matrix = np.linalg.solve(main_det, own_matrix)52 print(t/t_max*100)53 return [solve_matrix[0],54 solve_matrix[1],55 solve_matrix[2],56 solve_matrix[3],57 solve_matrix[4],58 solve_matrix[5],59 derw,60 input_variable[6]]61ww = odeint(f, y0, t)62m_f = []63for i in range(len(t)):64 m_f.append(ww[:, 6][i]/2/pi)65plt.subplot(3, 1, 1)66plt.plot(t, ww[:, 0], linewidth=1, color='red')67plt.xlabel('Время, с', fontsize=12, color='black')68plt.ylabel('Ток статора, А', fontsize=12, color='black')69plt.grid(True)70plt.subplot(3, 1, 2)71plt.plot(t, ww[:, 3], linewidth=1, color='red')72plt.xlabel('Время, с', fontsize=12, color='black')73plt.ylabel('Ток ротора, А', fontsize=12, color='black')74plt.grid(True)75plt.subplot(3, 1, 3)76plt.plot(t, m_f, linewidth=1, color='red')77plt.xlabel('Время, с', fontsize=12, color='black')78plt.ylabel('Частота, Гц', fontsize=12, color='black')79plt.grid(True)80plt.show()81[-kcc*(math.sin(pi/2)-(-1)*math.sin(pi/6)-math.sin(pi/2-2*pi/3)+(-1)*math.sin(pi/6+2*pi/3))-Lcs, -kcc*(math.sin(pi/2+2*pi/3)-(-1)*math.sin(pi/6-2*pi/3)-math.sin(pi/2-2*pi/3)+(-1)*math.sin(pi/6+2*pi/3))+Lcs, -krc*(math.sin(pi/2 + input_variable[6]*p) - (-1)*math.sin(pi/6 - input_variable[6]*p)), -krc*(math.sin(pi/2 + input_variable[6]*p + 2*pi/3) - (-1)*math.sin(pi/6 - input_variable[6]*p - 2*pi/3)), -krc*(math.sin(pi/2 + input_variable[6]*p - 2*pi/3) - (-1)*math.sin(pi/6 - input_variable[6]*p + 2*pi/3))],82[-kcc*((-1)*math.sin(pi/6)-math.sin(-pi/6)-(-1)*math.sin(pi/6+2*pi/3)+math.sin(-pi/6+2*pi/3))-Lcs, -kcc*((-1)*math.sin(pi/6-2*pi/3)-math.sin(-pi/6-2*pi/3)-(-1)*math.sin(pi/6+2*pi/3)+math.sin(-pi/6+2*pi/3))-Lcs-Lcs, -krc*((-1)*math.sin(pi/6 - input_variable[6]*p) - math.sin(-pi/6 - input_variable[6]*p)), -krc*((-1)*math.sin(pi/6 - input_variable[6]*p - 2*pi/3) - math.sin(-pi/6 - input_variable[6]*p - 2*pi/3)), -krc*((-1)*math.sin(pi/6 - input_variable[6]*p + 2*pi/3) - math.sin(-pi/6 - input_variable[6]*p + 2*pi/3))],83[-krc*(math.sin(pi/2-input_variable[6]*p-0)-math.sin(pi/2-input_variable[6]*p-2*pi/3)), -krc*(math.sin(pi/2-input_variable[6]*p+2*pi/3)-math.sin(pi/2-input_variable[6]*p-2*pi/3)), -krr*math.sin(pi/2-0) - Lrs, -krr*math.sin(pi/2+2*pi/3), -krr*math.sin(pi/2-2*pi/3)],84[-krc*((-1)*math.sin(pi/6+input_variable[6]*p-0)-(-1)*math.sin(pi/6+input_variable[6]*p+2*pi/3)), -krc*((-1)*math.sin(pi/6+input_variable[6]*p-2*pi/3)-(-1)*math.sin(pi/6+input_variable[6]*p+2*pi/3)), -krr*(-1)*math.sin(pi/6+0), -krr*(-1)*math.sin(pi/6-2*pi/3) - Lrs, -krr*(-1)*math.sin(pi/6+2*pi/3)],85[-krc*(math.sin(-pi/6+input_variable[6]*p-0)-math.sin(-pi/6+input_variable[6]*p+2*pi/3)), -krc*(math.sin(-pi/6+input_variable[6]*p-2*pi/3)-math.sin(-pi/6+input_variable[6]*p+2*pi/3)), -krr*math.sin(-pi/6+0), -krr*math.sin(-pi/6-2*pi/3), -krr*math.sin(-pi/6+2*pi/3) - Lrs]86[input_variable[0]*Rc - input_variable[1]*Rc + krc*p*input_variable[5]*(input_variable[2]*math.cos(pi/2 + input_variable[6]*p) + input_variable[3]*math.cos(pi/2 + input_variable[6]*p + 2*pi/3) + input_variable[4]*math.cos(pi/2 + input_variable[6]*p - 2*pi/3) + (-1)*input_variable[2]*math.cos(pi/6 - input_variable[6]*p) + (-1)*input_variable[3]*math.cos(pi/6 - input_variable[6]*p - 2*pi/3) + (-1)*input_variable[4]*math.cos(pi/6 - input_variable[6]*p + 2*pi/3)),87input_variable[1]*Rc - (-input_variable[0]-input_variable[1])*Rc + krc*p*input_variable[5]*(input_variable[2]*math.cos(pi/6 - input_variable[6]*p) + input_variable[3]*math.cos(pi/6 - input_variable[6]*p - 2*pi/3) + input_variable[4]*math.cos(pi/6 - input_variable[6]*p + 2*pi/3) + input_variable[2]*math.cos(-pi/6 - input_variable[6]*p) + input_variable[3]*math.cos(-pi/6 - input_variable[6]*p - 2*pi/3) + input_variable[4]*math.cos(-pi/6 - input_variable[6]*p + 2*pi/3)),88input_variable[2]*Rr-input_variable[5]*krc*p*(input_variable[0]*math.cos(pi/2-input_variable[6]*p)+input_variable[1]*math.cos(pi/2-input_variable[6]*p+2*pi/3)+(-input_variable[0]-input_variable[1])*math.cos(pi/2-input_variable[6]*p-2*pi/3)),89input_variable[3]*Rr+input_variable[5]*krc*p*(-1)*(input_variable[0]*math.cos(pi/6+input_variable[6]*p)+input_variable[1]*math.cos(pi/6+input_variable[6]*p-2*pi/3)+(-input_variable[0]-input_variable[1])*math.cos(pi/6+input_variable[6]*p+2*pi/3)),90input_variable[4]*Rr+input_variable[5]*krc*p*(input_variable[0]*math.cos(-pi/6+input_variable[6]*p)+input_variable[1]*math.cos(-pi/6+input_variable[6]*p-2*pi/3)+(-input_variable[0]-input_variable[1])*math.cos(-pi/6+input_variable[6]*p+2*pi/3))...

Full Screen

Full Screen

backbone.py

Source:backbone.py Github

copy

Full Screen

1#! /usr/bin/env python2# coding=utf-834import tensorflow as tf5import core.common as common67def darknet53(input_data):89 input_data = common.convolutional(input_data, (3, 3, 3, 32))10 input_data = common.convolutional(input_data, (3, 3, 32, 64), downsample=True)1112 for i in range(1):13 input_data = common.residual_block(input_data, 64, 32, 64)1415 input_data = common.convolutional(input_data, (3, 3, 64, 128), downsample=True)1617 for i in range(2):18 input_data = common.residual_block(input_data, 128, 64, 128)1920 input_data = common.convolutional(input_data, (3, 3, 128, 256), downsample=True)2122 for i in range(8):23 input_data = common.residual_block(input_data, 256, 128, 256)2425 route_1 = input_data26 input_data = common.convolutional(input_data, (3, 3, 256, 512), downsample=True)2728 for i in range(8):29 input_data = common.residual_block(input_data, 512, 256, 512)3031 route_2 = input_data32 input_data = common.convolutional(input_data, (3, 3, 512, 1024), downsample=True)3334 for i in range(4):35 input_data = common.residual_block(input_data, 1024, 512, 1024)3637 return route_1, route_2, input_data3839def cspdarknet53(input_data):4041 input_data = common.convolutional(input_data, (3, 3, 3, 32), activate_type="mish")42 input_data = common.convolutional(input_data, (3, 3, 32, 64), downsample=True, activate_type="mish")4344 route = input_data45 route = common.convolutional(route, (1, 1, 64, 64), activate_type="mish")46 input_data = common.convolutional(input_data, (1, 1, 64, 64), activate_type="mish")47 for i in range(1):48 input_data = common.residual_block(input_data, 64, 32, 64, activate_type="mish")49 input_data = common.convolutional(input_data, (1, 1, 64, 64), activate_type="mish")5051 input_data = tf.concat([input_data, route], axis=-1)52 input_data = common.convolutional(input_data, (1, 1, 128, 64), activate_type="mish")53 input_data = common.convolutional(input_data, (3, 3, 64, 128), downsample=True, activate_type="mish")54 route = input_data55 route = common.convolutional(route, (1, 1, 128, 64), activate_type="mish")56 input_data = common.convolutional(input_data, (1, 1, 128, 64), activate_type="mish")57 for i in range(2):58 input_data = common.residual_block(input_data, 64, 64, 64, activate_type="mish")59 input_data = common.convolutional(input_data, (1, 1, 64, 64), activate_type="mish")60 input_data = tf.concat([input_data, route], axis=-1)6162 input_data = common.convolutional(input_data, (1, 1, 128, 128), activate_type="mish")63 input_data = common.convolutional(input_data, (3, 3, 128, 256), downsample=True, activate_type="mish")64 route = input_data65 route = common.convolutional(route, (1, 1, 256, 128), activate_type="mish")66 input_data = common.convolutional(input_data, (1, 1, 256, 128), activate_type="mish")67 for i in range(8):68 input_data = common.residual_block(input_data, 128, 128, 128, activate_type="mish")69 input_data = common.convolutional(input_data, (1, 1, 128, 128), activate_type="mish")70 input_data = tf.concat([input_data, route], axis=-1)7172 input_data = common.convolutional(input_data, (1, 1, 256, 256), activate_type="mish")73 route_1 = input_data74 input_data = common.convolutional(input_data, (3, 3, 256, 512), downsample=True, activate_type="mish")75 route = input_data76 route = common.convolutional(route, (1, 1, 512, 256), activate_type="mish")77 input_data = common.convolutional(input_data, (1, 1, 512, 256), activate_type="mish")78 for i in range(8):79 input_data = common.residual_block(input_data, 256, 256, 256, activate_type="mish")80 input_data = common.convolutional(input_data, (1, 1, 256, 256), activate_type="mish")81 input_data = tf.concat([input_data, route], axis=-1)8283 input_data = common.convolutional(input_data, (1, 1, 512, 512), activate_type="mish")84 route_2 = input_data85 input_data = common.convolutional(input_data, (3, 3, 512, 1024), downsample=True, activate_type="mish")86 route = input_data87 route = common.convolutional(route, (1, 1, 1024, 512), activate_type="mish")88 input_data = common.convolutional(input_data, (1, 1, 1024, 512), activate_type="mish")89 for i in range(4):90 input_data = common.residual_block(input_data, 512, 512, 512, activate_type="mish")91 input_data = common.convolutional(input_data, (1, 1, 512, 512), activate_type="mish")92 input_data = tf.concat([input_data, route], axis=-1)9394 input_data = common.convolutional(input_data, (1, 1, 1024, 1024), activate_type="mish")95 input_data = common.convolutional(input_data, (1, 1, 1024, 512))96 input_data = common.convolutional(input_data, (3, 3, 512, 1024))97 input_data = common.convolutional(input_data, (1, 1, 1024, 512))9899 input_data = tf.concat([tf.nn.max_pool(input_data, ksize=13, padding='SAME', strides=1), tf.nn.max_pool(input_data, ksize=9, padding='SAME', strides=1)100 , tf.nn.max_pool(input_data, ksize=5, padding='SAME', strides=1), input_data], axis=-1)101 input_data = common.convolutional(input_data, (1, 1, 2048, 512))102 input_data = common.convolutional(input_data, (3, 3, 512, 1024))103 input_data = common.convolutional(input_data, (1, 1, 1024, 512))104105 return route_1, route_2, input_data106107def cspdarknet53_tiny(input_data):108 input_data = common.convolutional(input_data, (3, 3, 3, 32), downsample=True)109 input_data = common.convolutional(input_data, (3, 3, 32, 64), downsample=True)110 input_data = common.convolutional(input_data, (3, 3, 64, 64))111112 route = input_data113 input_data = common.route_group(input_data, 2, 1)114 input_data = common.convolutional(input_data, (3, 3, 32, 32))115 route_1 = input_data116 input_data = common.convolutional(input_data, (3, 3, 32, 32))117 input_data = tf.concat([input_data, route_1], axis=-1)118 input_data = common.convolutional(input_data, (1, 1, 32, 64))119 input_data = tf.concat([route, input_data], axis=-1)120 input_data = tf.keras.layers.MaxPool2D(2, 2, 'same')(input_data)121122 input_data = common.convolutional(input_data, (3, 3, 64, 128))123 route = input_data124 input_data = common.route_group(input_data, 2, 1)125 input_data = common.convolutional(input_data, (3, 3, 64, 64))126 route_1 = input_data127 input_data = common.convolutional(input_data, (3, 3, 64, 64))128 input_data = tf.concat([input_data, route_1], axis=-1)129 input_data = common.convolutional(input_data, (1, 1, 64, 128))130 input_data = tf.concat([route, input_data], axis=-1)131 input_data = tf.keras.layers.MaxPool2D(2, 2, 'same')(input_data)132133 input_data = common.convolutional(input_data, (3, 3, 128, 256))134 route = input_data135 input_data = common.route_group(input_data, 2, 1)136 input_data = common.convolutional(input_data, (3, 3, 128, 128))137 route_1 = input_data138 input_data = common.convolutional(input_data, (3, 3, 128, 128))139 input_data = tf.concat([input_data, route_1], axis=-1)140 input_data = common.convolutional(input_data, (1, 1, 128, 256))141 route_1 = input_data142 input_data = tf.concat([route, input_data], axis=-1)143 input_data = tf.keras.layers.MaxPool2D(2, 2, 'same')(input_data)144145 input_data = common.convolutional(input_data, (3, 3, 512, 512))146147 return route_1, input_data148149def darknet53_tiny(input_data):150 input_data = common.convolutional(input_data, (3, 3, 3, 16))151 input_data = tf.keras.layers.MaxPool2D(2, 2, 'same')(input_data)152 input_data = common.convolutional(input_data, (3, 3, 16, 32))153 input_data = tf.keras.layers.MaxPool2D(2, 2, 'same')(input_data)154 input_data = common.convolutional(input_data, (3, 3, 32, 64))155 input_data = tf.keras.layers.MaxPool2D(2, 2, 'same')(input_data)156 input_data = common.convolutional(input_data, (3, 3, 64, 128))157 input_data = tf.keras.layers.MaxPool2D(2, 2, 'same')(input_data)158 input_data = common.convolutional(input_data, (3, 3, 128, 256))159 route_1 = input_data160 input_data = tf.keras.layers.MaxPool2D(2, 2, 'same')(input_data)161 input_data = common.convolutional(input_data, (3, 3, 256, 512))162 input_data = tf.keras.layers.MaxPool2D(2, 1, 'same')(input_data)163 input_data = common.convolutional(input_data, (3, 3, 512, 1024))164165 return route_1, input_data166 ...

Full Screen

Full Screen

ui_base_ime.gyp

Source:ui_base_ime.gyp Github

copy

Full Screen

1# Copyright 2015 The Chromium Authors. All rights reserved.2# Use of this source code is governed by a BSD-style license that can be3# found in the LICENSE file.4{5 'variables': {6 'chromium_code': 1,7 },8 'targets': [9 {10 # GN version: //ui/base/ime11 'target_name': 'ui_base_ime',12 'type': '<(component)',13 'dependencies': [14 '../../../base/base.gyp:base',15 '../../../base/base.gyp:base_i18n',16 '../../../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',17 '../../../skia/skia.gyp:skia',18 '../../../third_party/icu/icu.gyp:icui18n',19 '../../../third_party/icu/icu.gyp:icuuc',20 '../../../url/url.gyp:url_lib',21 '../../events/events.gyp:dom_keycode_converter',22 '../../events/events.gyp:events',23 '../../events/events.gyp:events_base',24 '../../gfx/gfx.gyp:gfx',25 '../../gfx/gfx.gyp:gfx_geometry',26 '../ui_base.gyp:ui_base',27 ],28 'defines': [29 'UI_BASE_IME_IMPLEMENTATION',30 ],31 'sources' : [32 'candidate_window.cc',33 'candidate_window.h',34 'chromeos/character_composer.cc',35 'chromeos/character_composer.h',36 'chromeos/component_extension_ime_manager.cc',37 'chromeos/component_extension_ime_manager.h',38 'chromeos/composition_text_chromeos.cc',39 'chromeos/composition_text_chromeos.h',40 'chromeos/extension_ime_util.cc',41 'chromeos/extension_ime_util.h',42 'chromeos/fake_ime_keyboard.cc',43 'chromeos/fake_ime_keyboard.h',44 'chromeos/fake_input_method_delegate.cc',45 'chromeos/fake_input_method_delegate.h',46 'chromeos/ime_bridge.cc',47 'chromeos/ime_bridge.h',48 'chromeos/ime_keyboard.cc',49 'chromeos/ime_keyboard.h',50 'chromeos/ime_keyboard_ozone.cc',51 'chromeos/ime_keyboard_ozone.h',52 'chromeos/ime_keyboard_x11.cc',53 'chromeos/ime_keyboard_x11.h',54 'chromeos/ime_keymap.cc',55 'chromeos/ime_keymap.h',56 'chromeos/input_method_delegate.h',57 'chromeos/input_method_descriptor.cc',58 'chromeos/input_method_descriptor.h',59 'chromeos/input_method_manager.cc',60 'chromeos/input_method_manager.h',61 'chromeos/input_method_whitelist.cc',62 'chromeos/input_method_whitelist.h',63 'chromeos/mock_component_extension_ime_manager_delegate.cc',64 'chromeos/mock_component_extension_ime_manager_delegate.h',65 'chromeos/mock_ime_candidate_window_handler.cc',66 'chromeos/mock_ime_candidate_window_handler.h',67 'chromeos/mock_ime_engine_handler.cc',68 'chromeos/mock_ime_engine_handler.h',69 'chromeos/mock_ime_input_context_handler.cc',70 'chromeos/mock_ime_input_context_handler.h',71 'composition_text.cc',72 'composition_text.h',73 'composition_text_util_pango.cc',74 'composition_text_util_pango.h',75 'composition_underline.h',76 'infolist_entry.cc',77 'infolist_entry.h',78 'input_method.h',79 'input_method_auralinux.cc',80 'input_method_auralinux.h',81 'input_method_base.cc',82 'input_method_base.h',83 'input_method_chromeos.cc',84 'input_method_chromeos.h',85 'input_method_delegate.h',86 'input_method_factory.cc',87 'input_method_factory.h',88 'input_method_initializer.cc',89 'input_method_initializer.h',90 'input_method_mac.h',91 'input_method_mac.mm',92 'input_method_minimal.cc',93 'input_method_minimal.h',94 'input_method_observer.h',95 'input_method_win.cc',96 'input_method_win.h',97 'linux/fake_input_method_context.cc',98 'linux/fake_input_method_context.h',99 'linux/fake_input_method_context_factory.cc',100 'linux/fake_input_method_context_factory.h',101 'linux/linux_input_method_context.h',102 'linux/linux_input_method_context_factory.cc',103 'linux/linux_input_method_context_factory.h',104 'mock_input_method.cc',105 'mock_input_method.h',106 'remote_input_method_delegate_win.h',107 'remote_input_method_win.cc',108 'remote_input_method_win.h',109 'text_input_client.cc',110 'text_input_client.h',111 'text_input_type.h',112 'ui_base_ime_export.h',113 'win/imm32_manager.cc',114 'win/imm32_manager.h',115 'win/tsf_input_scope.cc',116 'win/tsf_input_scope.h',117 ],118 'conditions': [119 ['use_ozone==1', {120 'dependencies': [121 '../../events/ozone/events_ozone.gyp:events_ozone_layout',122 '../../ozone/ozone.gyp:ozone',123 ],124 }],125 ['use_pango==1', {126 'dependencies': [127 '../../../build/linux/system.gyp:pangocairo',128 ],129 }],130 ['OS=="win"', {131 # TODO(jschuh): C4267: http://crbug.com/167187 size_t -> int132 # C4324 is structure was padded due to __declspec(align()), which is133 # uninteresting.134 'msvs_disabled_warnings': [ 4267, 4324 ],135 'link_settings': {136 'libraries': [137 '-limm32.lib',138 ],139 },140 }],141 ['use_x11==1', {142 'dependencies': [143 '../../../build/linux/system.gyp:x11',144 '../../gfx/x/gfx_x11.gyp:gfx_x11',145 ],146 }],147 ['toolkit_views==0 and use_aura==0', {148 'sources!': [149 'input_method_factory.cc',150 'input_method_factory.h',151 'input_method_minimal.cc',152 'input_method_minimal.h',153 ],154 }],155 ['chromeos==1', {156 'dependencies': [157 '../../../chromeos/chromeos.gyp:chromeos',158 ],159 }],160 ['use_aura==0 or (desktop_linux==0 and use_ozone==0)', {161 'sources!': [162 'input_method_auralinux.cc',163 'input_method_auralinux.h',164 'linux/fake_input_method_context.cc',165 'linux/fake_input_method_context.h',166 'linux/fake_input_method_context_factory.cc',167 'linux/fake_input_method_context_factory.h',168 'linux/linux_input_method_context.h',169 'linux/linux_input_method_context_factory.cc',170 'linux/linux_input_method_context_factory.h',171 ],172 }],173 ['use_x11==0', {174 'sources!': [175 'composition_text_util_pango.cc',176 'composition_text_util_pango.h',177 ],178 }],179 ],180 },181 ],...

Full Screen

Full Screen

makeRsf.py

Source:makeRsf.py Github

copy

Full Screen

1# !/usr/bin/python2import sys3if len(sys.argv) < 2:4 print "Usage:",sys.argv[0],"rsf-output-file-name"5 sys.exit(64)6output_file_name=sys.argv[1]7output_file=open(output_file_name, 'w')8input_file=open("modulesWithIDs.txt", 'r')9for line in input_file:10 output_file.write("Module\t" + line)11input_file.close()12input_file=open("moduleBelongsToModule.txt", 'r')13for line in input_file:14 output_file.write("ModuleBelongsToModule\t" + line)15input_file.close()16input_file=open("filesWithIDs.txt", 'r')17for line in input_file:18 output_file.write("File\t" + line)19input_file.close()20input_file=open("fileBelongsToModule.txt", 'r')21for line in input_file:22 output_file.write("FileBelongsToModule\t" + line)23input_file.close()24input_file=open("includeBelongsToFile.txt", 'r')25for line in input_file:26 output_file.write("Include\t" + line)27input_file.close()28input_file=open("conditionalCompilationBlocks.txt", 'r')29for line in input_file:30 output_file.write("ConditionalCompilation\t" + line)31input_file.close()32input_file=open("classesWithIDs.txt", 'r')33for line in input_file:34 output_file.write("Class\t" + line)35input_file.close()36#input_file=open("typedefsWithIDs.txt", 'r')37#for line in input_file:38# output_file.write("TypeDef\t" + line)39#input_file.close()40input_file=open("classBelongsToFile.txt", 'r')41for line in input_file:42 output_file.write("ClassBelongsToFile\t" + line)43input_file.close()44input_file=open("inheritanceWithIDs.txt", 'r')45for line in input_file:46 output_file.write("InheritsFrom\t" + line)47input_file.close()48input_file=open("methodsWithIDs.txt", 'r')49for line in input_file:50 output_file.write("Method\t" + line)51input_file.close()52input_file=open("methodBelongsToClass.txt", 'r')53for line in input_file:54 output_file.write("MethodBelongsToClass\t" + line)55input_file.close()56input_file = open("methodVisibility.txt", 'r')57for line in input_file:58 output_file.write("Visibility\t" + line)59input_file.close()60input_file = open("methodSignature.txt", 'r')61for line in input_file:62 output_file.write("Signature\t" + line)63input_file.close()64input_file=open("methodHasClassAsReturnType.txt", 'r')65for line in input_file:66 output_file.write("HasType\t" + line)67input_file.close()68input_file=open("attributesWithIDs.txt", 'r')69for line in input_file:70 output_file.write("Attribute\t" + line)71input_file.close()72input_file=open("attributeBelongsToClass.txt", 'r')73for line in input_file:74 output_file.write("AttributeBelongsToClass\t" + line)75input_file.close()76input_file=open("attributeHasClassAsType.txt", 'r')77for line in input_file:78 output_file.write("HasType\t" + line)79input_file.close()80input_file=open("functionsWithIDs.txt", 'r')81for line in input_file:82 output_file.write("Function\t" + line)83input_file.close()84input_file=open("invokableEntityBelongsToFile.txt", 'r')85for line in input_file:86 output_file.write("InvokableEntityBelongsToFile\t" + line)87input_file.close()88input_file=open("functionHasClassAsReturnType.txt", 'r')89for line in input_file:90 output_file.write("HasType\t" + line)91input_file.close()92input_file=open("defsWithAssociation.txt", 'r')93for line in input_file:94 output_file.write("DefinitionForDeclaration\t" + line)95input_file.close()96input_file=open("globalVarsWithIDs.txt", 'r')97for line in input_file:98 output_file.write("GlobalVar\t" + line)99input_file.close()100input_file=open("accessibleEntityBelongsToFile.txt", 'r')101for line in input_file:102 output_file.write("AccessibleEntityBelongsToFile\t" + line)103input_file.close()104input_file=open("globalVarHasClassAsType.txt", 'r')105for line in input_file:106 output_file.write("HasType\t" + line)107input_file.close()108input_file=open("invocationsWithIDs.txt", 'r')109for line in input_file:110 output_file.write("Invokes\t" + line)111input_file.close()112input_file=open("invocationLocations.txt", 'r')113for line in input_file:114 output_file.write("LineNo\t" + line)115input_file.close()116input_file=open("accessesWithIDs.txt", 'r')117for line in input_file:118 output_file.write("Accesses\t" + line)119input_file.close()120input_file=open("accessesLocations.txt", 'r')121for line in input_file:122 output_file.write("LineNo\t" + line)123input_file.close()124input_file=open("leftValueAccesses.txt", 'r')125for line in input_file:126 output_file.write("LeftValueAccess\t" + line)127input_file.close()128input_file=open("entityBelongsToBlock.txt", 'r')129for line in input_file:130 output_file.write("entityBelongsToBlock\t" + line)131input_file.close()132input_file=open("annotations.txt", 'r')133for line in input_file:134 output_file.write("Annotation\t" + line)135input_file.close()136input_file=open("annotationBelongsToEntity.txt", 'r')137for line in input_file:138 output_file.write("AnnotationBelongsToEntity\t" + line)139input_file.close()140input_file=open("metricsWithIDs.txt", 'r')141for line in input_file:142 output_file.write("Measurement\t" + line)143input_file.close()144input_file=open("cfMetricsWithIDs.txt", 'r')145for line in input_file:146 output_file.write("Measurement\t" + line)147input_file.close()...

Full Screen

Full Screen

system_webview_locales_paks.gypi

Source:system_webview_locales_paks.gypi Github

copy

Full Screen

1# Copyright (c) 2015 The Chromium Authors. All rights reserved.2# Use of this source code is governed by a BSD-style license that can be3# found in the LICENSE file.4#5# This file defines the set of locales that should be packed inside the6# System WebView apk.7# TODO: consider unifying this list with the one in chrome_android_paks.gypi8# once Chrome includes all the locales that the WebView needs.9{10 'variables': {11 'webview_locales_input_paks_folder': '<(PRODUCT_DIR)/android_webview_assets/locales/',12 'webview_locales_input_paks': [13 '<(webview_locales_input_paks_folder)/am.pak',14 '<(webview_locales_input_paks_folder)/ar.pak',15 '<(webview_locales_input_paks_folder)/bg.pak',16 '<(webview_locales_input_paks_folder)/bn.pak',17 '<(webview_locales_input_paks_folder)/ca.pak',18 '<(webview_locales_input_paks_folder)/cs.pak',19 '<(webview_locales_input_paks_folder)/da.pak',20 '<(webview_locales_input_paks_folder)/de.pak',21 '<(webview_locales_input_paks_folder)/el.pak',22 '<(webview_locales_input_paks_folder)/en-GB.pak',23 '<(webview_locales_input_paks_folder)/en-US.pak',24 '<(webview_locales_input_paks_folder)/es.pak',25 '<(webview_locales_input_paks_folder)/es-419.pak',26 '<(webview_locales_input_paks_folder)/et.pak',27 '<(webview_locales_input_paks_folder)/fa.pak',28 '<(webview_locales_input_paks_folder)/fi.pak',29 '<(webview_locales_input_paks_folder)/fil.pak',30 '<(webview_locales_input_paks_folder)/fr.pak',31 '<(webview_locales_input_paks_folder)/gu.pak',32 '<(webview_locales_input_paks_folder)/he.pak',33 '<(webview_locales_input_paks_folder)/hi.pak',34 '<(webview_locales_input_paks_folder)/hr.pak',35 '<(webview_locales_input_paks_folder)/hu.pak',36 '<(webview_locales_input_paks_folder)/id.pak',37 '<(webview_locales_input_paks_folder)/it.pak',38 '<(webview_locales_input_paks_folder)/ja.pak',39 '<(webview_locales_input_paks_folder)/kn.pak',40 '<(webview_locales_input_paks_folder)/ko.pak',41 '<(webview_locales_input_paks_folder)/lt.pak',42 '<(webview_locales_input_paks_folder)/lv.pak',43 '<(webview_locales_input_paks_folder)/ml.pak',44 '<(webview_locales_input_paks_folder)/mr.pak',45 '<(webview_locales_input_paks_folder)/ms.pak',46 '<(webview_locales_input_paks_folder)/nb.pak',47 '<(webview_locales_input_paks_folder)/nl.pak',48 '<(webview_locales_input_paks_folder)/pl.pak',49 '<(webview_locales_input_paks_folder)/pt-BR.pak',50 '<(webview_locales_input_paks_folder)/pt-PT.pak',51 '<(webview_locales_input_paks_folder)/ro.pak',52 '<(webview_locales_input_paks_folder)/ru.pak',53 '<(webview_locales_input_paks_folder)/sk.pak',54 '<(webview_locales_input_paks_folder)/sl.pak',55 '<(webview_locales_input_paks_folder)/sr.pak',56 '<(webview_locales_input_paks_folder)/sv.pak',57 '<(webview_locales_input_paks_folder)/sw.pak',58 '<(webview_locales_input_paks_folder)/ta.pak',59 '<(webview_locales_input_paks_folder)/te.pak',60 '<(webview_locales_input_paks_folder)/th.pak',61 '<(webview_locales_input_paks_folder)/tr.pak',62 '<(webview_locales_input_paks_folder)/uk.pak',63 '<(webview_locales_input_paks_folder)/vi.pak',64 '<(webview_locales_input_paks_folder)/zh-CN.pak',65 '<(webview_locales_input_paks_folder)/zh-TW.pak',66 ],67 },...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1var argosy = require('argosy')2var argosyPattern = require('argosy-pattern')3var input = require('argosy-pattern/input')4var service = argosy()5service.pipe(argosy.acceptor({ port: 8001 })).pipe(service)6service.accept({ role: 'math', cmd: 'sum' }, input({7}, function (args, callback) {8 callback(null, args.numbers.reduce(function (a, b) {9 }))10}))11var argosy = require('argosy')12var argosyPattern = require('argosy-pattern')13var output = require('argosy-pattern/output')14var service = argosy()15service.pipe(argosy.acceptor({ port: 8002 })).pipe(service)16service.accept({ role: 'math', cmd: 'sum' }, output({17}, function (args, callback) {18 callback(null, args.numbers.reduce(function (a, b) {19 }))20}))

Full Screen

Using AI Code Generation

copy

Full Screen

1var argosy = require('argosy')2var input = require('argosy-pattern/input')3var pattern = require('argosy-pattern')4var service = argosy()5service.pipe(process.stdout)6service.accept({ test: input(pattern.object({7})) })8service.accept(function (msg, cb) {9 cb(null, msg)10})11var argosy = require('argosy')12var output = require('argosy-pattern/output')13var pattern = require('argosy-pattern')14var service = argosy()15service.pipe(process.stdout)16service.accept({ test: output(pattern.object({17})) })18service.accept(function (msg, cb) {19 cb(null, msg)20})21var argosy = require('argosy')22var input = require('argosy-pattern/input')23var output = require('argosy-pattern/output')24var pattern = require('argosy-pattern')25var service = argosy()26service.pipe(process.stdout)27service.accept({ test: input(output(pattern.object({28}))) })29service.accept(function (msg, cb) {30 cb(null, msg)31})32var argosy = require('argosy')33var input = require('argosy-pattern/input')34var output = require('argosy-pattern/output')35var pattern = require('argosy-pattern')36var service = argosy()37service.pipe(process.stdout)38service.accept({ test: input(output(pattern.object({39}))) })40service.accept(function (msg, cb) {41 cb(null, msg)42})43var argosy = require('argosy')44var input = require('argosy-pattern/input')45var output = require('argosy-pattern/output')46var pattern = require('argosy-pattern')47var service = argosy()48service.pipe(process.stdout)49service.accept({ test: input(output(pattern.object({50}))) })51service.accept(function (msg, cb) {

Full Screen

Using AI Code Generation

copy

Full Screen

1var argosy = require('argosy')2var argosyPattern = require('argosy-pattern')3var pattern = argosyPattern({4 input: {5 },6 output: {7 }8})9var service = argosy()10service.use('greeting', pattern(function (msg, cb) {11 cb(null, {message: 'hello ' + msg.name})12}))13service.listen(8000)14var argosy = require('argosy')15var argosyPattern = require('argosy-pattern')16var pattern = argosyPattern({17 input: {18 },19 output: {20 }21})22var service = argosy()23service.use('greeting', pattern({24 output: function (msg, cb) {25 cb(null, {message: 'hello ' + msg.name})26 }27}))28service.listen(8000)29var argosy = require('argosy')30var argosyPattern = require('argosy-pattern')31var pattern = argosyPattern({32 input: {33 },34 output: {35 }36})37var service = argosy()38service.use('greeting', pattern({39 input: function (msg, cb) {40 cb(null, {name: msg.name.toUpperCase()})41 },42 output: function (msg, cb) {43 cb(null, {message: 'hello ' + msg.name})44 }45}))46service.listen(8000)47### var pattern = argosyPattern(options)48* `input` (required) - a pattern to validate the input message49* `output` (required) - a pattern to validate the output message50### pattern(input, output)

Full Screen

Using AI Code Generation

copy

Full Screen

1var argosy = require('argosy')2var input = require('argosy-pattern/input')3var service = argosy()4service.pipe(input({5}, function (msg, cb) {6 cb(null, 'hello ' + msg.greet)7})).pipe(service)8service.accept({ greet: 'world' }, function (err, response) {9})10var argosy = require('argosy')11var output = require('argosy-pattern/output')12var service = argosy()13service.pipe(output({14}, function (msg, cb) {15 cb(null, 'hello ' + msg.greet)16})).pipe(service)17service.accept({ greet: 'world' }, function (err, response) {18})19var argosy = require('argosy')20var pass = require('argosy-pattern/pass')21var service = argosy()22service.pipe(pass({23}, function (msg, cb) {24 cb(null, 'hello ' + msg.greet)25})).pipe(service)26service.accept({ greet: 'world' }, function (err, response) {27})28var argosy = require('argosy')29var reject = require('argosy-pattern/reject')30var service = argosy()31service.pipe(reject({32}, function (msg, cb) {33 cb(null, 'hello ' + msg.greet)34})).pipe(service)35service.accept({ greet: 'world' }, function (err, response) {36})37var argosy = require('argosy')38var any = require('argosy-pattern/any')

Full Screen

Using AI Code Generation

copy

Full Screen

1var argosy = require('argosy')2var argosyPattern = require('argosy-pattern')3var input = require('argosy-input')4var path = require('path')5var service = argosy()6service.pipe(input({7 path: path.join(__dirname, 'input.json'),8 pattern: argosyPattern({9 })10})).pipe(service)11service.on('pattern', function (pattern) {12 console.log('pattern', pattern)13})14service.act('add:1,2,3,4,5', function (err, result) {15 console.log('result', result)16})

Full Screen

Using AI Code Generation

copy

Full Screen

1var argosy = require('argosy')2var service = argosy()3service.accept({ input: 'string' }, function (msg, cb) {4 console.log(msg.input)5 cb(null, { output: 'ok' })6})7service.listen(8000)8var argosy = require('argosy')9var service = argosy()10service.accept({ output: 'string' }, function (msg, cb) {11 console.log(msg.output)12 cb(null, { input: 'ok' })13})14service.listen(8000)15var argosy = require('argosy')16var service = argosy()17service.accept({ input: 'string', output: 'string' }, function (msg, cb) {18 console.log(msg.input)19 cb(null, { output: 'ok' })20})21service.listen(8000)22var argosy = require('argosy')23var service = argosy()24service.accept({ input: 'string', output: 'string' }, function (msg, cb) {25 console.log(msg.input)26 cb(null, { output: 'ok' })27})28service.listen(8000)29var argosy = require('argosy')30var service = argosy()31service.accept({ input: 'string', output: 'string' }, function (msg, cb) {32 console.log(msg.input)33 cb(null, { output: 'ok' })34})35service.listen(8000)36var argosy = require('argosy')37var service = argosy()38service.accept({ input: 'string', output: 'string' }, function (msg, cb) {39 console.log(msg.input)40 cb(null, { output: 'ok' })41})42service.listen(8000)43var argosy = require('argosy')44var service = argosy()45service.accept({ input: 'string', output: 'string' }, function (msg, cb) {46 console.log(msg.input)

Full Screen

Using AI Code Generation

copy

Full Screen

1const argos = require("argos");2const input = argos.input();3const output = argos.output();4const print = argos.print();5const log = argos.log();6const error = argos.error();7const warn = argos.warn();8const success = argos.success();9const info = argos.info();10const table = argos.table();11const prompt = argos.prompt();12const confirm = argos.confirm();13const question = argos.question();14const password = argos.password();15const choice = argos.choice();16const list = argos.list();17const checkbox = argos.checkbox();18const file = argos.file();19const directory = argos.directory();

Full Screen

Using AI Code Generation

copy

Full Screen

1input({2 pattern: {3 }4}, function (msg, reply) {5 reply(null, {6 })7})8input({9 pattern: {10 }11}, function (msg, reply) {12 reply(null, {13 })14})15input({16 pattern: {17 }18}, function (msg, reply) {19 reply(null, {20 })21})22input({23 pattern: {24 }25}, function (msg, reply) {26 reply(null, {27 })28})29input({30 pattern: {31 }32}, function (msg, reply) {33 reply(null, {34 })35})36input({37 pattern: {38 }39}, function (msg, reply) {40 reply(null, {41 })42})43input({44 pattern: {45 }46}, function (msg, reply) {47 reply(null, {48 })49})50input({51 pattern: {52 }53}, function (msg, reply) {54 reply(null, {55 })56})57[MIT](LICENSE)

Full Screen

Using AI Code Generation

copy

Full Screen

1var argosy = require('../../index')()2 .pipe(argosy.accept({3 test: function (pattern, cb) {4 cb(null, 'test')5 }6 }))7 .pipe(argosy.pattern({8 }))9 .pipe(argosy.respond(function (request, cb) {10 cb(null, request.test + ' response')11 }))12 .pipe(argosy.select({13 }))14 .pipe(argosy.select(function (request) {15 }))16 .pipe(argosy.respond(function (request, cb) {17 cb(null, request + ' response')18 }))19 .pipe(argosy.select({20 }))21 .pipe(argosy.respond(function (request, cb) {22 cb(null, request.test + ' response')23 }))24 .pipe(argosy.select({25 }))26 .pipe(argosy.input(function (request, cb) {27 cb(null, request.test + ' response')28 }))29argosy.input({30}, function (err, response) {31 console.log('response', response)32})

Full Screen

Using AI Code Generation

copy

Full Screen

1var argosy = require('argosy')2var pattern = require('argosy-pattern')3var service = argosy()4service.use(pattern({role: 'math', cmd: 'sum'}, function (msg, respond) {5 respond(null, {answer: msg.left + msg.right})6}))7service.listen(3000)8var client = argosy()9client.pipe(service).pipe(client)10client.act({role: 'math', cmd: 'sum', left: 1, right: 2}, function (err, result) {11 if (err) throw err12})13client.act(pattern.input({role: 'math', cmd: 'sum', left: 1, right: 2}, function (err, result) {14 if (err) throw err15}))

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run argos automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful