Skip to content

Instantly share code, notes, and snippets.

View hovedguy's full-sized avatar

Hoved hovedguy

View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import os
import re
import shutil
from tqdm import tqdm
mainDir = r"C:\SUVOPAM_local\Dolwin5\02_Aba\boatLanding\specialCases\gl1\_withHydroMassFact"
omittInp = None # None if nothing to remove
newText = '396000.0, \n'
subDirDumpNewInps = '_modifiedInps'
import vlc
import pafy
import time
import pygetwindow as gw
urls = ["https://www.youtube.com/watch?v=w_Ma8oQLmSM", "https://www.youtube.com/watch?v=M_dZDwz9QLs"]
# create and play vlc media
def playVLC(url):
'''
04-09-2020, rev.01
Copy files of particular extension from a directory (nested directories as well) to new directory
'''
import glob
import shutil
main_dir = r'D:\Machine Learning\_Udemy - Complete Tensorflow 2 and Keras Deep Learning Bootcamp'
target_dir = r'C:\Users\suvop\Desktop\target_dir'
/*
Physical Pixel
An example of using the Arduino board to receive data from the computer. In
this case, the Arduino boards turns on an LED when it receives the character
'H', and turns off the LED when it receives the character 'L'.
The data can be sent from the Arduino Serial Monitor, or another program like
Processing (see code below), Flash (via a serial-net proxy), PD, or Max/MSP.
/*
Physical Pixel
An example of using the Arduino board to receive data from the computer. In
this case, the Arduino boards turns on an LED when it receives the character
'H', and turns off the LED when it receives the character 'L'.
The data can be sent from the Arduino Serial Monitor, or another program like
Processing (see code below), Flash (via a serial-net proxy), PD, or Max/MSP.
@hovedguy
hovedguy / tensorflow_self_check.py
Created October 30, 2019 17:15 — forked from mrry/tensorflow_self_check.py
[DEPRECATED] TensorFlow on Windows self-check
# Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
'''
remember to delete headers except last line
'''
import pandas as pd
import os
path = r"C:\Suvopam\ABA\19_Jorund_sbn\LCS1\trafo.rpt"
df = pd.read_csv(path, delim_whitespace=True)
@hovedguy
hovedguy / ic_inpParseNrunInBlocksWholeSpace.py
Last active November 4, 2018 17:44
To parse inp file, find out nodes with co-ordinates in dataframe. Then find max and min volume of space containing the whole model.
import pandas as pd
import time
import os
start_time = time.time()
full_path = r"C:\Temp\Example_3\Job-1.inp" # inp full file path
block_size = 5e-3
invokeErrBlSzThrsh = 5e6 # number of block threshold before invokes error
import pandas as pd
import time
start_time = time.time()
full_path = r"C:\Temp\Example_3\Job-1.inp" # inp full file path
with open(full_path, "r") as f:
f_data = f.read()
file_list_ = f_data.split("\n") # creates list of all lines