Skip to content

Instantly share code, notes, and snippets.

View aambrioso1's full-sized avatar
🏠
Working from home

Alex Ambrioso aambrioso1

🏠
Working from home
View GitHub Profile
@aambrioso1
aambrioso1 / test_6.py
Created July 17, 2020 08:30
test_6.py
def reverse_lst(lst):
ans = []
for i in range(len(lst)-1, -1, -1):
ans.append(lst[i])
return ans
def add_one(lst):
lst = reverse_lst(lst)
for n , ele in enumerate(lst):
@aambrioso1
aambrioso1 / launch.pyui
Created March 21, 2020 04:27
launch.pyui
[
{
"nodes" : [
{
"nodes" : [
],
"frame" : "{{29, 16}, {351, 46}}",
"class" : "Label",
"attributes" : {
@aambrioso1
aambrioso1 / Erika_Lauchtime.py
Created March 21, 2020 04:26
Erika_Lauchtime.py
"""
Erika Ambrioso
[email protected]
Launch Tracker
"""
# These are the libraries used by the program.
import json, requests, sys
import ui
@aambrioso1
aambrioso1 / launch.pyui
Created March 16, 2020 22:05
launch.pyui
[
{
"nodes" : [
{
"nodes" : [
],
"frame" : "{{29, 16}, {351, 46}}",
"class" : "Label",
"attributes" : {
@aambrioso1
aambrioso1 / sorting.py
Created February 19, 2020 11:28
sorting.py
"""
# This import registers the 3D projection, but is otherwise unused.
from mpl_toolkits.mplot3d import Axes3D # noqa: F401 unused import
"""
import numpy as np
import matplotlib.pyplot as plt
plt.rcParams['legend.fontsize'] = 10
@aambrioso1
aambrioso1 / RegexLesson.py
Created February 1, 2020 16:42
RegexLesson.py
"""
The regular expressions operations module (re) is a standard Python
library. It is beautiful collection of operations for finding and manipulating
matched text.
This program use the re library to search the text in a file, regex.txt, for email addresses and phone numbers. It copies
them to a list called matches and prints then them neatly in a standard format. The program has a string call text that
is commented out. Use the program by saving some text in a file called regex.txt. Or use the string call text. Comment out the code for the part you don't use.
The program is a slight modification of a program found at:
https://automatetheboringstuff.com/chapter7/
@aambrioso1
aambrioso1 / plottest.py
Created January 12, 2020 04:54
plottest.py
import matplotlib.pyplot as plt
import numpy as np
data = np.arange(10)
print(data)
plt.plot(data)
fig = plt.figure()
ax1 = fig.add_subplot(2, 2, 1)
@aambrioso1
aambrioso1 / noaa_json.py
Created January 5, 2020 21:16
noaa_json.py
import json, requests, sys
"""
Example of using the request package for json data from NOAA.
Here are Links to the documentation for these important libraries and the home of JSON.
https://docs.python.org/3/library/json.html
https://docs.python.org/3/library/sys.html
https://pypi.org/project/requests/
http://json.org/
@aambrioso1
aambrioso1 / noaa_json.py
Created January 3, 2020 09:26
noaa_json.py
import json, requests, sys
"""
Example of using the request package for json data from NOAA.
Here are Links to the documentation for these important libraries and the home of JSON.
https://docs.python.org/3/library/json.html
https://docs.python.org/3/library/sys.html
https://pypi.org/project/requests/
http://json.org/
@aambrioso1
aambrioso1 / reader.py
Created December 6, 2019 14:45
reader.py
import requests
import re
from collections import Counter
import speech as sp
r = requests.get('http://www.gutenberg.org/cache/epub/5/pg5.txt')
txt = r.text
start = 'THE CONSTITUTION OF THE UNITED STATES OF AMERICA'