This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
import numpy as np | |
import scipy.optimize as optimize | |
import matplotlib.pyplot as plt | |
import sys | |
from tabulate import tabulate | |
def _round(n): | |
if n - math.floor(n) < 0.5: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from trianglesolver import solve | |
import numpy as np | |
# a, b, c são os lados dos triangulos | |
# A, B, C são os angulos dos triangulos, sempre opostos ao lado de mesma letra | |
a, b, c, A, B, C = solve(a=11.4, B=np.deg2rad(60), C=np.deg2rad(110)) | |
print('Distancia margem do rio (metros):', b) | |
a, b, c, A, B, C = solve(a=46.4, b=3.9-0.4, C=np.pi/2) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from collections import namedtuple | |
import matplotlib.pyplot as plt | |
# Dados do problema: | |
gama_a = 20 | |
gama_n = 23 | |
h = 12 | |
sup_base = 10 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from mpl_toolkits.mplot3d import Axes3D | |
import matplotlib.pyplot as plt | |
from matplotlib import cm | |
from matplotlib.ticker import LinearLocator, FormatStrFormatter | |
# Dados do problema | |
gama = 19 | |
m = 0.5 | |
k = 0.5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
matrix01 = np.matrix([ | |
[3, -0.1, -0.2], | |
[0.1, 7, -0.3], | |
[0.3, -0.2, 10], | |
]) | |
solution01 = np.matrix([ | |
[7.85, -19.3, 71.4] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Your keymap | |
# | |
# Atom keymaps work similarly to style sheets. Just as style sheets use | |
# selectors to apply styles to elements, Atom keymaps use selectors to associate | |
# keystrokes with events in specific contexts. Unlike style sheets however, | |
# each selector can only be declared once. | |
# | |
# You can create a new keybinding in this file by typing "key" and then hitting | |
# tab. | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import turtle as tu | |
import numpy as np | |
screen = tu.Screen() | |
points = [[10,240],[269,330],[170,410],[110,230],[0,260]] | |
t = tu.Turtle() | |
t.speed('fastest') | |
c = tu.Turtle() |
NewerOlder