This file contains 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
2022-03-29T09:24:50.213+0100 [INFO] Terraform version: 1.1.6 | |
2022-03-29T09:24:50.213+0100 [INFO] Go runtime version: go1.17.6 | |
2022-03-29T09:24:50.213+0100 [INFO] CLI args: []string{"terraform", "apply"} | |
2022-03-29T09:24:50.213+0100 [DEBUG] Attempting to open CLI config file: /Users/chasinglogic/.terraformrc | |
2022-03-29T09:24:50.213+0100 [DEBUG] File doesn't exist, but doesn't need to. Ignoring. | |
2022-03-29T09:24:50.214+0100 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins | |
2022-03-29T09:24:50.214+0100 [DEBUG] ignoring non-existing provider search directory /Users/chasinglogic/.terraform.d/plugins | |
2022-03-29T09:24:50.214+0100 [DEBUG] ignoring non-existing provider search directory /Users/chasinglogic/Library/Application Support/io.terraform/plugins | |
2022-03-29T09:24:50.214+0100 [DEBUG] ignoring non-existing provider search directory /Library/Application Support/io.terraform/plugins | |
2022-03-29T09:24:50.214+0100 [INFO] CLI command args: []string{"apply"} |
This file contains 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
# SQL | |
some_obj = MyClass() | |
query = "SELECT * FROM my_table WHERE id = ?" | |
result = mydriver.query(query, some_obj.id) | |
# A BUNCH OF CODE TO SERIALIZE THE RESULT ROWS INTO AN OBJECT, or use of an ORM | |
# MongoDB | |
some_obj = MyClass() |
This file contains 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 matplotlib | |
import matplotlib.pyplot | |
import scipy | |
import scipy.signal | |
from numpy import pi | |
[b,a] = scipy.signal.butter(2,1,analog=1) | |
zp = scipy.signal.freqz(b, a) |
This file contains 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
fn get_project_files<'a>() -> Vec<&'a str> { | |
let ls_files_output = Command::new("git") | |
.arg("ls-files") | |
.output() | |
.expect("Failed to run git ls-files. Make sure you're in a git repo."); | |
String::from_utf8(ls_files_output.stdout) | |
.unwrap() | |
.split("\n") | |
.collect() |
A couple of things, don't be afraid or feel ashamed to google this. Googling is exteremly encouraged. But I recommend not copy and pasting answers but if you do be sure that you COMPLETELY understand and can remember what you copy and paste.
Any script you write should be committed to Github using git. If you need a git tutorial I recommend: https://try.github.io/levels/1/challenges/1 for the random bash scripts I would recommend starting a "scripts" or "utilities" repo. Every
I hereby claim:
- I am chasinglogic on github.
- I am chasinglogic (https://keybase.io/chasinglogic) on keybase.
- I have a public key ASDhkDXmfEb6IDdq_L2DoUotICx-IKhhye5NfH5blMYGHwo
To claim this, I am signing this object:
This file contains 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
pub fn gen_module(mut name: String, private: bool) { | |
let mut working_dir = env::current_dir().expect("Unexpected Error: Cannot get current working directory."); | |
// This makes sure that the name ends with .rs if not a directory | |
if is_file(&name) { name.push_str(".rs") } | |
for dir in name.split("/") { | |
if is_file(&dir) { | |
working_dir.push(name); | |
gen_file_module(working_dir.clone()); |
NewerOlder