Skip to content

Instantly share code, notes, and snippets.

View emamulandalib's full-sized avatar

Emamul Andalib emamulandalib

View GitHub Profile
@emamulandalib
emamulandalib / Redux-Form-Semantic-UI-React
Created January 19, 2018 19:23 — forked from mairh/Redux-Form-Semantic-UI-React
Semantic-UI-React form validation using redux-form example
// semantic-ui-form.js
import React from 'react';
import PropTypes from 'prop-types';
import { Form, Input } from 'semantic-ui-react';
export default function semanticFormField ({ input, type, label, placeholder, meta: { touched, error, warning }, as: As = Input, ...props }) {
function handleChange (e, { value }) {
return input.onChange(value);
}
@emamulandalib
emamulandalib / name_conventions_dictionaries.py
Created December 18, 2018 12:26 — forked from jllopezpino/name_conventions_dictionaries.py
Replace keys in underscore lowercase convention for camel case convention and vice versa.
def camel_to_underscore(name):
"""
Convert a name from camel case convention to underscore lower case convention.
Args:
name (str): name in camel case convention.
Returns:
name in underscore lowercase convention.
"""
camel_pat = compile(r'([A-Z])')