# import Class11Examples
# print(Class11Examples.add(1,2))

import camelcase

camelOjb = camelcase.CamelCase()

print(camelOjb.hump("hola mundo"))
示例#2
0
import math
import platform
import camelcase
import datetime

comp = platform.system()
print("The value of pi is", math.pi)
print(comp)

camelToe = camelcase.CamelCase()

stringy = "OI"

print(stringy.hump(txt))


示例#3
0
def my_function(country="norway"):
    c = camelcase.CamelCase()
    print(c.hump(country))
示例#4
0
import camelcase

texto = "mi nombre es richard"

miobjeto = camelcase.CamelCase()

print(miobjeto.hump(texto))
示例#5
0
# -*- coding: utf-8 -*-
import camelcase
nombre = "flor elizabeth cerdán león"
print(nombre.upper())
print(nombre.title())

cam = camelcase.CamelCase()
print("Con camelcase...")

print(cam.hump(nombre))
cam2 = camelcase.CamelCase('flor', 'león')
print(cam2.hump(nombre))
示例#6
0
# -*- coding: utf-8 -*-
import camelcase
nombre = "gomez flores elias"
print(nombre.upper())
print(nombre.title())

#que pasaria si ahora el problema pidiera que el
#nombre de elias y gomez no se muestre en formato titulo

cam = camelcase.CamelCase()
print("mostramos ahora con macelcase")

cam2 = camelcase.CamelCase('elias','gomez')
print(cam2.hump(nombre))
import camelcase
# palabra_uno => palabraUno
camello = camelcase.CamelCase()
texto = "hola buenas tardes"
print(camello.hump(texto))

# pypi es a python como npm es a node
示例#8
0
print(next(myiter))


class MyNumbers:
    def __iter__(self):
        self.a = 1
        return self

    def __next__(self):
        if self.a <= 20:
            x = self.a
            self.a += 1
            return x
        else:
            raise StopIteration


myclass = MyNumbers()
myiter = iter(myclass)

for x in myiter:
    print(x)

import camelcase

c = camelcase.CamelCase()

txt = "hello world"

print(c.hump(txt))
print(camelcase.CamelCase().hump("my name is eban"))
示例#9
0
# un modulo o una libreria tiene funcionalidades que alguien mas ya la hizo y por ende se puede reutilizar a favor nuestro.
# Para ver las librerias que tenemos instaladas en nuestro maquina usamos el comando pip list
# Para ver las librerias en COLAB o Jupyter se pone el prefijo de exclamacion osea !pip list
# para ver la version de nuestro pip se usa el comando pip --version
# para desinstalar una libreria usamos el comando pip uninstall nombre
import camelcase
camello = camelcase.CamelCase('tardes')
texto = "hola amiguitos buenas tardes"
print(camello.hump(texto))
示例#10
0
import camelcase
#This method capitalizes the first letter of each word.
sample = camelcase.CamelCase()
text = "Enter a text of your choice here and check the behaviour"
print(sample.hump(text))
示例#11
0
# -*- coding: utf-8 -*-
"""
Created on Mon Nov  2 21:15:02 2020

@author: Harsh
"""

import camelcase as c
#c=c.CamelCase()
#c.hump(txt)
txt = "heelo world"

print(c.CamelCase().hump(txt))
示例#12
0
# pip install camelcase (in cmd) >>to install the Package
import camelcase

text = "Be confident in the power of God and you will never regret."
c = camelcase.CamelCase().hump(text)
print(c)

# pip uninstall camelcase (in cmd) >>to uninstall the Package

#pip list (in cmd) >> to list all the packages installed on your system:
import camelcase

modifikator = camelcase.CamelCase()

tekst = 'Uvod u programiranje je okej kurs'

print(modifikator.hump(tekst))
# pip package manager
'''
1. Module ka use kare rahe hai
2. Python me file create and ukso next python file me import kiya tha.
3. Pre install module = datetime / math / json


Agar hum koi other librarys python me use karna chate hai then:

ABout Pip:

1. ye librarys ka collection
2. ye librarys difrent types hain:
    For example: Scipy, Matplotlib.pyplot, Panda

Pip ka version check karne ke liye terminal me command run karna hain: pip --version    
'''
# for install camelcase run: pip install camelcase
import camelcase as c

name = 'heysushil'
mycamel = c.CamelCase()

print('\nMy name is ', mycamel.hump(name))

# for uninstall camelcase: pip uninstall camelcase

# for geting list of preinstalled pip pacakes: pip list
示例#15
0
import camelcase as camelcase
from tenseflow import change_tense

text = "md golam kibria"
largeFirstLatter = camelcase.CamelCase().hump(text)  # for large first latter
print(largeFirstLatter)
示例#16
0
import camelcase as c

x = c.CamelCase()
string = 'lorem ipsum dolor sit amet'

print(x.hump(string))

#Day 62 is about PIP package manager with an example 
#install of camelcase module
示例#17
0
import camelcase as CC

c = CC.CamelCase()

txt = "hello world"
print(c.hump(txt))
示例#18
0
# A module is basically a file containing a set of functions to include in your application. There are core python modules, modules you can install using the pip package manager (including Django) as well as custom modules
import datetime
from datetime import date
import validator
import camelcase

my_date = date.today()
print(my_date)
myEmail = 'rehmanaziz20yahoo.com'
if validator.validate_email(myEmail):
    print('Valid Email')
else:
    print('invalid Email')

print(camelcase.CamelCase().hump('my name is rehman aziz'))
示例#19
0
import datetime
import time
from datetime import date
from time import time

# pip modules
# command : pip3 install camelcase
import camelcase

# custom module
import validator
from validator import validate_email

today = date.today()
print(today)

timeStamp = time()
print(timeStamp)

print(camelcase.__file__)

camelString = camelcase.CamelCase()
text = 'hello world'
print(camelString.hump(text))

email = '*****@*****.**'
if validate_email(email):
    print('valid email')
else:
    print('Invalid email')
示例#20
0
}
parse_json = json.loads(sample_json)

print(parse_json.get('name'))
print(json.dumps(parse_json))
print(json.dumps(["apple", "orange"]))

print(
    json.dumps(sample_dict, indent=4, separators=(". ", " = "),
               sort_keys=True))

txt = 'The rain in Spain'
search_x = re.search("^The.*Spain$", txt)
print(search_x)

print(camelcase.CamelCase().hump(txt))

# try and except

try:
    print(not_defined)
except NameError:
    print('Variable is not defined')
except:
    print("An exception occurred")
finally:
    print("The 'try except' is finished")

try:
    f = open('converters.py')
    f.write('print("Hello there")')
示例#21
0
# pip
'''
Pip is a package manage for python

for geting pip verions type command on terminal
pip --version

for installing any library form pip run this

pip install libraryname

to uninstall any library form pip

pip uninstall camelcase


For geting a list of all installed packeages

pip list
'''
import camelcase as c

print(c.CamelCase().hump('hello camelcase'))
示例#22
0
pip freeze > requirements.txt

Zobrazení podrobnějších informací o některém z nainstalovaných balíčků získáme příkazem:

pip show <jméno_balíčku>

Automatickou instalaci všech závislostí zaznamenaných v souboru requirements.txt provedeme příkazem:

pip install -r requirements.txt     
'''

# V konzoli virtuálního prostředí proveďte instalaci externího balíčku camelcase
# (venv) E:\python\projekt\venv>pip install camelcase
# Poté tento balíček importujte
import camelcase
c = camelcase.CamelCase(
)  # Konstruktor třídy CamelCase() vytvoří objekt v proměnné c
txt = 'ahoj světáku'
print(
    c.hump(txt)
)  # Metoda hump() přeformátuje předaný řetězec podle zásad camel syntaxe (velká první písmena slov)
"""
Cvičení 4:

Použijte vhodné moduly v Pythonu (včetně jejich případné instalace) k tomu, abyste: 
1) vypsali aktuální datum a čas
2) vypsali datum velikonoční neděle (easter) v následujících 5 letech
3) vypsali nejbližší rok, v němž bude Štědrý den v neděli

K řešení prvního úkolu je možné doporučit importovat interní modul datetime
Řešení dalších dvou úkolů můžete odvodit z příkladů v dokumentaci k externímu modulu dateutil - viz https://pypi.org/project/python-dateutil/
"""
示例#23
0
# 62 . Python PIP
"""
# PIP is a package manager for Python packages, or modules if you like.
# Note: If you have Python version 3.4 or later, PIP is included by default.
# Package? A package contains all the files you need for a module.
    Modules are Python code libraries you can include in your project
# Downloading a package is very easy:
    // Open the command line interface and tell PIP to download the package you want.
    // Navigate your command line to the location of Python's script directory, and type the
    // following: pip install [name of package]
# Once the package is installed, it is ready to use. Import the "camelcase" package into your project.
# Use the uninstall command to remove a package
    // following: pip uninstall [name of package]
# Use the list command to list all the packages installed on your system.
    // following: pip list
"""

import camelcase as cc

c = cc.CamelCase()
text = "this method capitalizes the first letter of each word"
print(c.hump(text))
示例#24
0
# pip --> gestor de paquetes y modulos para python.
#pip --version
# pip -list --> para ver modulos que hay installados

import camelcase  # pip install camelcase  en consola para instalarlo

camel = camelcase.CamelCase()  # nombremodulo.nombreclase()

texto = "hola soy anggie"

print(camel.hump(texto))

# pip uninstall nombrepaqute
示例#25
0
import camelcase

c = camelcase.CamelCase()
txt = "lorem ipsum dolor sit amet"
print(c.hump(txt))
示例#26
0
# coding:iso-8859-9 "Türkçe"

import camelcase  # Cümledeki tüm kelimelerin ilk harflerini büyükharf yapar

deve = camelcase.CamelCase()

cümle = "import camelcase modülü cümledeki tüm kelimelerin ilk harflerini büyükharf yapar."
print("Orijinal cümle: [" + cümle + "]\n")
print("CamelCase() cümlesi: [" + deve.hump(cümle))