How to use toUpperCase method in localstack

Best Python code snippet using localstack_python

form_com.py

Source:form_com.py Github

copy

Full Screen

...73 'aerodromo_alterno2':'aerodromo_alterno2',74 'otros_datos':'otros_datos',75 }76 widgets={77 'id_aeronave':forms.TextInput(attrs={'id':"identif_aeronave", 'name':"numeroVuelo", 'onKeyUp':"this.value=this.value.toUpperCase();",'size':"7", 'maxlength':"7", 'type':"text"}),78 'regla_vuelo':forms.Select(choices=[('1','I'),('2','V'),('3','Y'),('4','Z')],attrs={'id':"regla_vuelo"}),79 'tipo_vuelo':forms.Select(choices=[('1','S'),('2','N'),('3','G'),('4','M'),('5','X')],attrs={'id':"tipo_vuelo"}),80 'numero':forms.NumberInput(attrs={'id':"numero", 'name':"numero", 'onKeyUp':"this.value=this.value.toUpperCase();", 'size':"2", 'maxlength':"2", 'type':"text"}),81 'tipo_aeronave':forms.TextInput(attrs={'id':"tipoAeronave", 'name':"tipoAeronave", 'onKeyUp':"this.value=this.value.toUpperCase();", 'size':"4", 'maxlength':"4", 'type':"text"}),82 'estela_turbulenta':forms.Select(choices=[('1','L'),('2','M'),('3','H')]),83 'equipoA':forms.TextInput(attrs={'id':"equipoA", 'name':"equipoA", 'onKeyUp':"this.value=this.value.toUpperCase();", 'size':"18", 'type':"text"}),84 'equipoB':forms.TextInput(attrs={'id':"equipoB", 'name':"equipoB", 'onKeyUp':"this.value=this.value.toUpperCase();", 'size':"10", 'type':"text"}),85 'aerodromo_salida':forms.TextInput(attrs={'id':"aerodromo_salida", 'name':"aedDep", 'onKeyUp':"this.value=this.value.toUpperCase();", 'size':"4", 'maxlength':"4", 'type':"text"}),86 'hora_salida':forms.TextInput(attrs={'id':"hora_salida", 'name':"etd", 'onKeyUp':"this.value=this.value.toUpperCase();", 'size':"4", 'maxlength':"4", 'type':"text"}),87 #velocidad:crucero:categora88 'velocidad_crucero_cat':forms.Select(choices=[('1','N'),('2','M'),('3','K')]),89 'velocidad_crucero':forms.TextInput(attrs={'id':"velocidad_crucero_numero", 'name':"velocidadCrucero", 'onKeyUp':"this.value=this.value.toUpperCase();", 'size':"4", 'maxlength':"4", 'type':"text"}),90 #nivel categorico91 'nivel_cat':forms.Select(choices=[('1','F'),('2','A'),('3','S'),('4','M')]),92 'nivel':forms.TextInput(attrs={'id':"nivel_numero", 'name':"nivel", 'onKeyUp':"this.value=this.value.toUpperCase();", 'size':"4", 'maxlength':"4", 'type':"text"}),93 'ruta':forms.Textarea(attrs={'id':"ruta", 'name':"ruta", 'onKeyUp':"this.value=this.value.toUpperCase();", 'onKeyPress':"if (event.keyCode == 13 || event.charCode == 45) return false;", 'rows':"3", 'cols':"60", 'type':"text", 'style':"font-family:Verdana;font-size: 13px;"}),94 'aerodromo_destino':forms.TextInput(attrs={'id':"aerodromo_destino", 'name':"aedArr", 'onKeyUp':"this.value=this.value.toUpperCase();", 'size':"4", 'maxlength':"4", 'type':"text"}),95 'total_eet':forms.TextInput(attrs={'id':"eet_total", 'name':"eet", 'onKeyUp':"this.value=this.value.toUpperCase();", 'size':"4", 'maxlength':"4", 'type':"text"}),96 'aerodromo_alterno':forms.TextInput(attrs={'id':"aerod_ater1", 'name':"aedAlt1", 'onKeyUp':"this.value=this.value.toUpperCase();", 'size':"4", 'maxlength':"4", 'type':"text"}),97 'aerodromo_alterno2':forms.TextInput(attrs={'id':"aerod_ater2", 'name':"aedAlt2", 'onKeyUp':"this.value=this.value.toUpperCase();", 'size':"4", 'maxlength':"4", 'type':"text"}),98 'otros_datos':forms.Textarea(attrs={'id':"otros_datos", 'name':"otrosDatos", 'onKeyUp':"this.value=this.value.toUpperCase();", 'onKeyPress':"if (event.keyCode == 13 || event.charCode == 45) return false;", 'rows':"3", 'cols':"65", 'type':"text", 'style':"font-family:Verdana;font-size: 13px;"}),99 }100class SuplementariaForm(forms.ModelForm):101 class Meta:102 model=Suplementaria103 fields=[104 'autonomia_hr_min',105 'personas_bordo',106 'equipo_radio_uhf',107 'equipo_radio_vhf',108 'equipo_radio_elt',109 'equipo_superv',110 'equipo_superv_polar',111 'equipo_superv_deser',112 'equipo_superv_mar',113 'equipo_superv_jung',114 'chaleco',115 'chaleco_luz',116 'chaleco_fluor',117 'chaleco_uhf',118 'chaleco_vhf',119 'nro_botes',120 'capacidad_botes',121 'color_bote',122 'color_marca_avion',123 'obs',124 'piloto',125 'requisitos_adic',126 ]127 labels={128 'autonomia_hr_min':'autonomia_hr_min',129 'personas_bordo':'personas_bordo',130 'equipo_radio_uhf':'equipo_radio_uhf',131 'equipo_radio_vhf':'equipo_radio_vhf',132 'equipo_radio_elt':'equipo_radio_elt',133 'equipo_superv':'equipo_superv',134 'equipo_superv_polar':'equipo_superv_polar',135 'equipo_superv_deser':'equipo_superv_deser',136 'equipo_superv_mar':'equipo_superv_mar',137 'equipo_superv_jung':'equipo_superv_jung',138 'chaleco':'chaleco',139 'chaleco_luz':'chaleco_luz',140 'chaleco_fluor':'chaleco_fluor',141 'chaleco_uhf':'chaleco_uhf',142 'chaleco_vhf':'chaleco_vhf',143 'nro_botes':'nro_botes',144 'capacidad_botes':'capacidad_botes',145 'color_bote':'color_bote',146 'color_marca_avion':'color_marca_avion',147 'obs':'obs',148 'piloto':'piloto',149 'requisitos_adic':'requisitos_adic',150 }151 widgets={152 'autonomia_hr_min':forms.TextInput(attrs={'id':"autonomia_hr_min", 'size':"4", 'maxlength':"4", 'type':"text"}),153 'personas_bordo':forms.TextInput(attrs={'id':"personas_bordo",'size':"3", 'maxlength':"3"}),154 'equipo_radio_uhf':forms.CheckboxInput(attrs={'id':"equipo_radio_uhf"}),155 'equipo_radio_vhf':forms.CheckboxInput(attrs={'id':"equipo_radio_vhf"}),156 'equipo_radio_elt':forms.CheckboxInput(attrs={'id':"equipo_radio_elt"}),157 'equipo_superv':forms.CheckboxInput(attrs={'id':"equipo_superv"}),158 'equipo_superv_polar':forms.CheckboxInput(attrs={'id':"equipo_superv_polar"}),159 'equipo_superv_deser':forms.CheckboxInput(attrs={'id':"equipo_superv_deser"}),160 'equipo_superv_mar':forms.CheckboxInput(attrs={'id':"equipo_superv_mar"}),161 'equipo_superv_jung':forms.CheckboxInput(attrs={'id':"equipo_superv_jung"}),162 'chaleco':forms.CheckboxInput(attrs={'id':"chaleco"}),163 'chaleco_luz':forms.CheckboxInput(attrs={'id':"chaleco_luz"}),164 'chaleco_fluor':forms.CheckboxInput(attrs={'id':"chaleco_fluor"}),165 'chaleco_uhf':forms.CheckboxInput(attrs={'id':"chaleco_uhf"}),166 'chaleco_vhf':forms.CheckboxInput(attrs={'id':"chaleco_vhf"}),167 'nro_botes':forms.TextInput({'id':"nro_botes",'size':"2", 'maxlength':"2"}),168 'capacidad_botes':forms.TextInput(attrs={'id':"capacidad_botes",'size':"3", 'maxlength':"3"}),169 'color_bote':forms.TextInput(attrs={'id':"color_bote",'onKeyUp':"this.value=this.value.toUpperCase();", 'size':"20", 'maxlength':"20"}),170 'color_marca_avion':forms.TextInput(attrs={'id':"color_marca_avion",'onKeyUp':"this.value=this.value.toUpperCase();", 'size':"90", 'maxlength':"90"}),171 'obs':forms.TextInput(attrs={'id':"obs",'onKeyUp':"this.value=this.value.toUpperCase();", 'size':"70", 'maxlength':"70"}),172 'piloto':forms.TextInput(attrs={'id':"piloto",'onKeyUp':"this.value=this.value.toUpperCase();", 'size':"50", 'maxlength':"50"}),173 'requisitos_adicionales':forms.Textarea({'id':"requisitos_adicionales",'rows':"2", 'cols':"25", 'style':"border: none;font-family:Verdana;font-size: 13px;"}),174 }175class Plan_presentadoForm(forms.ModelForm):176 class Meta:177 model=Plan_vuelo_presentado178 fields=[179 'nro_formulario',180 'fk_despachador',181 'fk_estado',182 'fecha_presentacion',183 'hora_presentacion',184 ]185 labels={186 'nro_formulario':'nro_formulario',...

Full Screen

Full Screen

toutiao_news2.py

Source:toutiao_news2.py Github

copy

Full Screen

...13 """14 手机端:15 function r() {16 var e = Math.floor((new Date).getTime() / 1e3)17 , t = e.toString(16).toUpperCase()18 , n = o(e).toString().toUpperCase();19 if (8 !== t.length)20 return {21 as: "479BB4B7254C150",22 cp: "7E0AC8874BB0985"23 };24 for (var r = n.slice(0, 5), i = n.slice(-5), a = "", s = 0; s < 5; s++)25 a += r[s] + t[s];26 for (var u = "", l = 0; l < 5; l++)27 u += t[l + 3] + i[l];28 return {29 as: "A1" + a + t.slice(-3),30 cp: t.slice(0, 3) + u + "E1"31 }32 }33 网页端:34 e.getHoney = function() {35 var t = Math.floor((new Date).getTime() / 1e3)36 , e = t.toString(16).toUpperCase()37 , i = md5(t).toString().toUpperCase();38 if (8 != e.length)39 return {40 as: "479BB4B7254C150",41 cp: "7E0AC8874BB0985"42 };43 for (var n = i.slice(0, 5), a = i.slice(-5), s = "", o = 0; 5 > o; o++)44 s += n[o] + e[o];45 for (var r = "", c = 0; 5 > c; c++)46 r += e[c + 3] + a[c];47 return {48 as: "A1" + s + e.slice(-3),49 cp: e.slice(0, 3) + r + "E1"50 }51 }52 :return:53 """54 # 1. 先得到一个整数的时间戳,round()是对小数进行四舍五入,得到一个整数55 t = round(time.time())56 # 2. 将这个整数类型的时间戳,转化为十六进制的字符串,并且将字符串全部转化为大写57 # hex()内置函数,用于将一个整数转化为16进制的字符串,对应的是js中的toString(16)58 e = hex(t).upper().replace('0X', '')59 # 3. 经过分析发现:i = md5(t).toString().toUpperCase();比n = o(e).toString().toUpperCase();简单。60 md = hashlib.md5()61 # 注意:update的参数一定是一个字节类型(bytes)的数据62 md.update(str(t).encode('utf8'))63 i = md.hexdigest().upper()64 # 4. 判断条件65 if len(e) != 8:66 return {67 "as": "479BB4B7254C150",68 "cp": "7E0AC8874BB0985"69 }70 # 5. 还原这两个for循环71 """72 i = F74F9D099F994027DDFFEAA29C92323B73 slice(0, 5)等价于python中的 [0:5] 切片操作...

Full Screen

Full Screen

__init__.py

Source:__init__.py Github

copy

Full Screen

12__version__ = "0.2021.3.10"3from .ToUpperCase import ToUpperCase4def toUpperCase():5 return ToUpperCase()...

Full Screen

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 localstack 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