I hereby claim:
- I am odhiambo123 on github.
- I am ajuoga (https://keybase.io/ajuoga) on keybase.
- I have a public key ASB0RU2_3fF4dtRAlfF9yFO3haCn9gga74lhjj1Ie8womQo
To claim this, I am signing this object:
name: Basic API call (JavaScript) | |
description: Performs a basic Excel API call using plain JavaScript & Promises. | |
host: EXCEL | |
api_set: {} | |
script: | |
content: | | |
$("#run").click(() => tryCatch(run)); | |
function run() { | |
return Excel.run(function(context) { |
I hereby claim:
To claim this, I am signing this object:
def find_3_consec_nums(num): | |
x=[] | |
if num % 3 !=0: | |
return x | |
else: | |
n=num//3 | |
m=n-1 | |
o=n+1 | |
x.append(m) | |
x.append(n) |
def rearange_to_smalest(num): | |
arr = sorted(str(abs(num))) #sort and rteturn the absolute value | |
if num<=0: #check if its 0 or negative | |
return -int(''.join(arr[::-1])) #rearange, combine, and add the negative | |
# make sure there are no leading zeroes by looping over and swaping with the 1st non-zero | |
i = 0 | |
while arr[i] == '0': | |
i +=1 | |
arr[0], arr[i] = arr[i],arr[0] |
# Reading csv files into JSON | |
def csv_to_json(csvFilePath, jsonFilePath): | |
jsonArray = [] | |
with open(csvFilePath, encoding='utf-8') as csvf: | |
csvReader = csv.DictReader(csvf) | |
for row in csvReader: | |
jsonArray.append(row) |
# replace string | |
def replace_string(txt, x, y): | |
z = txt.replace(x,y) | |
print(z) |
# replace string | |
def replace_string(txt, x, y): | |
z = txt.replace(x,y) | |
print(z) |
def text_to_speech(): | |
try: | |
import pyttsx3 | |
except ImportError: | |
print("pyttsx3 needs to be installed, you can install it on windows by running: ") | |
print("pip install pyttsx3") | |
sys.exit() | |
tts = pyttsx3.init() #Initialize the TTS engine | |
print("enter text to speak, or QUIT to quit") |
from django.contrib import admin | |
from .models import Profile, FriendRequest | |
admin.site.register(Profile) | |
admin.site.register(FriendRequest) |
""" | |
learn about forms at https://docs.djangoproject.com/en/4.0/topics/forms/ | |
be sure to look for the latest version | |
this form covers | |
UserRegisterForm | |
UserUpdateForm | |
ProfileUpdateForm | |
""" |