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
| def restructure(newlist, lookback): | |
| total = np.shape(newlist)[0] | |
| totalcolumns=np.shape(newlist)[1] | |
| newarray=np.empty([total-(lookback-1), lookback, totalcolumns]) | |
| i=0 | |
| q=0 | |
| while i < total: | |
| if i>=(lookback-1): | |
| j=i-(lookback-1) | |
| k=0 |
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
| using DelimitedFiles | |
| #using OrderedCollections | |
| using Glob | |
| function generateseries(length=140,readseries="dataseries.csv") | |
| #newseries = rand(Int, (length, 1)) | |
| newseries=range(1,1,140) | |
| newseries2=[1:1:length;] | |
| #print(newseries) |
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 pandas as pd | |
| import numpy as np | |
| df =pd.DataFrame(np.random.randint(1,4,size=(1000, 6)), columns=list('ABCDEF')) | |
| df.columns=['Date', 'Open', 'High', 'Low', 'Close', 'Volume'] | |
| import gym | |
| from gym import spaces | |
| import random |
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 tensorflow as tf | |
| import glob | |
| import numpy as np | |
| from PIL import Image, ImageDraw | |
| import matplotlib.pyplot as plt | |
| filenames = glob.glob('sketchesdata/training.tfrecord-*') | |
| raw_dataset = tf.data.TFRecordDataset(filenames) | |
| raw_dataset |
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 pandas as pd | |
| import numpy as np | |
| import tensorflow as tf | |
| import glob | |
| def preparedataset(thepath): | |
| totalchorales=len(glob.glob(thepath)) | |
| newarray=np.zeros([totalchorales,3000]) | |
| i=0 |
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 tensorflow as tf | |
| import glob | |
| import numpy as np | |
| from PIL import Image, ImageDraw | |
| import matplotlib.pyplot as plt | |
| def parse_function(tfrecorddata): | |
| tf.io.parse_single_example(tfrecorddata, | |
| {"ink": tf.io.VarLenFeature(dtype=tf.float32), | |
| "shape": tf.io.FixedLenFeature([2], dtype=tf.int64), |
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 pandas as pd | |
| import numpy as np | |
| from random import random | |
| import plotext as plt | |
| import tensorflow as tf | |
| newlist1=[] | |
| newlist2=[] | |
| newlisty=[] |
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 pandas as pd | |
| import numpy as np | |
| from random import random | |
| import plotext as plt | |
| import tensorflow as tf | |
| newlist1=[] | |
| newlist2=[] | |
| newlisty=[] |
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 pandas as pd | |
| import numpy as np | |
| from random import random | |
| import plotext as plt | |
| import tensorflow as tf | |
| newlist1=[] | |
| newlisty=[] |
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 tensorflow as tf | |
| from pathlib import Path | |
| import numpy as np | |
| import pandas as pd | |
| import tensorflow_datasets as tfds | |
| import gc | |
| #folderlist=[] | |
| # | |
| #photodir = Path('/root/flower_photos') |
NewerOlder